From: support Date: Wed, 21 Sep 2022 17:02:58 +0000 (+0000) Subject: Built motion from commit 37a7748e.|2.6.15 X-Git-Url: http://repos.xcallymotion.com/base/%22angular-material.themes.css//%22?a=commitdiff_plain;h=59dd6c8ac86d98b016c2cbce64bbcd31dc6f8e22;p=motion2.git Built motion from commit 37a7748e.|2.6.15 --- diff --git a/apidoc/api_project.js b/apidoc/api_project.js index f525d05..5fc00b6 100644 --- a/apidoc/api_project.js +++ b/apidoc/api_project.js @@ -17,7 +17,7 @@ define({ "apidoc": "0.3.0", "generator": { "name": "apidoc", - "time": "2022-09-21T12:14:09.609Z", + "time": "2022-09-21T16:54:29.047Z", "url": "http://apidocjs.com", "version": "0.24.0" } diff --git a/apidoc/api_project.json b/apidoc/api_project.json index 50d94cb..7e8c3b8 100644 --- a/apidoc/api_project.json +++ b/apidoc/api_project.json @@ -17,7 +17,7 @@ "apidoc": "0.3.0", "generator": { "name": "apidoc", - "time": "2022-09-21T12:14:09.609Z", + "time": "2022-09-21T16:54:29.047Z", "url": "http://apidocjs.com", "version": "0.24.0" } diff --git a/public/index.html b/public/index.html index dc2d59c..65db536 100644 --- a/public/index.html +++ b/public/index.html @@ -16,7 +16,7 @@ - + diff --git a/public/styles/app.a5020095.css b/public/styles/app.92b3fd32.css similarity index 69% rename from public/styles/app.a5020095.css rename to public/styles/app.92b3fd32.css index 876c8db..696f312 100644 --- a/public/styles/app.a5020095.css +++ b/public/styles/app.92b3fd32.css @@ -1 +1 @@ -[data-ng-click],[ng-click],[x-ng-click]{cursor:pointer}.ms-container{width:100%!important}.dark-lime-fg{color:#575b2e!important}.dark-red-fg{color:#9e3333!important}.iron-fg{color:#555865!important}.light-brown-fg{color:#645733!important}.ms-container .ms-list{height:380px!important}.ms-container .ms-selectable li.ms-elem-selectable,.ms-container .ms-selection li.ms-elem-selection{padding:6px 12px!important;height:34px!important}md-input-container:not(.md-input-has-value) input:not(:focus){color:inherit!important}.ms-container .ms-search{height:34px;margin-bottom:5px;border:solid 1px #e5e5e5;background-color:#fff;box-shadow:none;width:100%;padding-left:6px}.ms-container .ms-footer{text-align:center}.no-border{border:none!important}.left .motion-spinner{border-top-color:#00d7cc!important;border-left-color:#00d7cc!important}.right .motion-spinner{border-top-color:#00d7cc!important;border-right-color:#00d7cc!important}.md-option-info-text{font-size:10px}md-pagination-wrapper{width:auto!important}md-autocomplete.no-container-margin md-autocomplete-wrap md-input-container{margin:0!important}md-dialog.report-selection-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}md-dialog.advanced-search-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}.md-dialog-action-center{justify-content:center!important}.flag-24{height:24px}button.auto-width{min-width:auto!important}button.size-8{transform:scale(.8)}md-icon.auto-size{height:auto!important;width:auto!important}md-switch.auto-height{height:auto!important}.hidden{visibility:hidden}.user-profile-section-help{background:#fcf20f0f;border:1px solid rgba(0,0,0,.12);padding:5px}.email-preview-message{display:-webkit-box;margin:0 auto;display:block;height:200px;line-height:1.4;-webkit-line-clamp:10;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis;word-break:break-all}button.advanced-search.md-accent-bg.md-button.md-default-theme:not([disabled]).md-icon-button:hover{background-color:#0091ea}.blink{animation:blink 2s ease-in infinite}.no-click{pointer-events:none}.spinner-overlay{position:absolute;top:0;right:0;bottom:0;left:0;z-index:2;background:rgba(43,43,43,.5)}ms-quick-filter[disabled]{pointer-events:none;opacity:.7}ms-search-bar[disabled]{pointer-events:none;opacity:.7}@keyframes blink{from,to{opacity:1}50%{opacity:0}}textarea.api-key-area{background:0 0;resize:none}.badge{min-width:20px;height:20px;line-height:20px;padding:0 7px;font-size:11px;font-weight:700;border-radius:20px;transition:opacity .2s ease-in-out .1s}md-tooltip.multiline div.md-content{height:auto!important}.auto-margin{margin:auto}md-menu-item md-menu.no-margin button{display:inline-block;border-radius:0;margin:auto 0;font-size:15px;text-transform:none;font-weight:400;height:100%;padding-left:16px;padding-right:16px;width:100%}md-date-range md-menu span.md-select-value{border-bottom-color:rgba(0,0,0,.12)}.keep-on-top{z-index:9999!important}.margin-auto{margin:auto}.xenialab-violet-light-bg{background-color:#9c4fd3!important}.xenialab-violet-light-fg{color:#9c4fd3!important}.no-margin-top{margin-top:0!important}.no-margin-bottom{margin-bottom:0!important}.disabled-button{display:inline-block;position:relative;cursor:default;min-height:36px;min-width:88px;line-height:36px;vertical-align:middle;align-items:center;text-align:center;border-radius:3px;box-sizing:border-box;user-select:none;outline:0;border:0;padding:0 6px;margin:6px 8px;background:rgba(0,0,0,.12);color:rgba(0,0,0,.38);white-space:nowrap;text-transform:uppercase;font-weight:500;font-size:14px;font-style:inherit;font-variant:inherit;font-family:inherit;text-decoration:none;overflow:hidden}.word-break-all{word-break:break-all}.mw-150{max-width:150px!important}@supports (-ms-ime-align:auto){md-tabs{display:inline!important}}@supports (-ms-accelerator:true){md-tabs{display:inline!important}}@supports (-moz-transform:translate(0,0)){md-tabs{display:inline!important}}body[dir=rtl] table.md-table td.md-cell,body[dir=rtl] table.md-table th.md-column{text-align:right!important}body[dir=rtl] table.md-table td.md-cell md-checkbox,body[dir=rtl] table.md-table th.md-column md-checkbox{margin-right:12px!important}body[dir=rtl] .ms-navigation .ms-navigation-node .ms-navigation-item>.ms-navigation-button .icon{margin:0 0 0 16px!important}body[dir=rtl] .ms-navigation .ms-navigation-node .ms-navigation-item>a.ms-navigation-button{padding-right:45px}body[dir=rtl] .md-table-pagination>.buttons{direction:ltr}body[dir=rtl] .md-table-pagination>.buttons>.label{direction:rtl}body[dir=rtl] .header .logo .logo-icon{margin:5px 0 0 15px!important}body[dir=rtl] md-switch .md-container{margin-right:inherit!important}#toasty.toasty-position-top-right{top:64px}.preview_cancel{padding:5px;float:left;background-color:red}.preview_open{padding:5px;float:right;background-color:green}.hover-token{cursor:pointer}body,html{height:100%;position:relative}body{margin:0;padding:0}[tabindex='-1']:focus{outline:0}.inset{padding:10px}a.md-no-style,button.md-no-style{font-weight:400;background-color:inherit;text-align:left;border:none;padding:0;margin:0}button,input,select,textarea{vertical-align:baseline}button,html input[type=button],input[type=reset],input[type=submit]{cursor:pointer;-webkit-appearance:button}button[disabled],html input[type=button][disabled],input[type=reset][disabled],input[type=submit][disabled]{cursor:default}textarea{vertical-align:top;overflow:auto}input[type=search]{-webkit-appearance:textfield;box-sizing:content-box;-webkit-box-sizing:content-box}input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration{-webkit-appearance:none}input:-webkit-autofill{text-shadow:none}.md-visually-hidden{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;text-transform:none;width:1px}.md-shadow{position:absolute;top:0;left:0;bottom:0;right:0;border-radius:inherit;pointer-events:none}.md-shadow-bottom-z-1{box-shadow:0 2px 5px 0 rgba(0,0,0,.26)}.md-shadow-bottom-z-2{box-shadow:0 4px 8px 0 rgba(0,0,0,.4)}.md-shadow-animated.md-shadow{transition:box-shadow .28s cubic-bezier(.4,0,.2,1)}.md-ripple-container{pointer-events:none;position:absolute;overflow:hidden;left:0;top:0;width:100%;height:100%;transition:all .55s cubic-bezier(.25,.8,.25,1)}.md-ripple{position:absolute;transform:translate(-50%,-50%) scale(0);transform-origin:50% 50%;opacity:0;border-radius:50%}.md-ripple.md-ripple-placed{transition:margin .9s cubic-bezier(.25,.8,.25,1),border .9s cubic-bezier(.25,.8,.25,1),width .9s cubic-bezier(.25,.8,.25,1),height .9s cubic-bezier(.25,.8,.25,1),opacity .9s cubic-bezier(.25,.8,.25,1),transform .9s cubic-bezier(.25,.8,.25,1)}.md-ripple.md-ripple-scaled{transform:translate(-50%,-50%) scale(1)}.md-ripple.md-ripple-active,.md-ripple.md-ripple-full,.md-ripple.md-ripple-visible{opacity:.2}.md-ripple.md-ripple-remove{animation:md-remove-ripple .9s cubic-bezier(.25,.8,.25,1)}@keyframes md-remove-ripple{0%{opacity:.15}100%{opacity:0}}.md-padding{padding:8px}.md-margin{margin:8px}.md-scroll-mask{position:absolute;background-color:transparent;top:0;right:0;bottom:0;left:0;z-index:50}.md-scroll-mask>.md-scroll-mask-bar{display:block;position:absolute;background-color:#fafafa;right:0;top:0;bottom:0;z-index:65;box-shadow:inset 0 0 1px rgba(0,0,0,.3)}.md-no-momentum{-webkit-overflow-scrolling:auto}.md-no-flicker{-webkit-filter:blur(0)}@media (min-width:960px){.md-padding{padding:16px}}body[dir=ltr],body[dir=rtl],html[dir=ltr],html[dir=rtl]{unicode-bidi:embed}bdo[dir=rtl]{direction:rtl;unicode-bidi:bidi-override}bdo[dir=ltr]{direction:ltr;unicode-bidi:bidi-override}body,html{-webkit-tap-highlight-color:transparent;-webkit-touch-callout:none;min-height:100%;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.md-display-4{font-size:112px;font-weight:300;letter-spacing:-.010em;line-height:112px}.md-display-3{font-size:56px;font-weight:400;letter-spacing:-.005em;line-height:56px}.md-display-2{font-size:45px;font-weight:400;line-height:64px}.md-display-1{font-size:34px;font-weight:400;line-height:40px}.md-headline{font-size:24px;font-weight:400;line-height:32px}.md-title{font-size:20px;font-weight:500;letter-spacing:.005em}.md-subhead{font-size:16px;font-weight:400;letter-spacing:.010em;line-height:24px}.md-body-1{font-size:14px;font-weight:400;letter-spacing:.010em;line-height:20px}.md-body-2{font-size:14px;font-weight:500;letter-spacing:.010em;line-height:24px}.md-caption{font-size:12px;letter-spacing:.020em}.md-button{letter-spacing:.010em}button,html,input,select,textarea{font-family:Roboto,"Helvetica Neue",sans-serif}button,input,select,textarea{font-size:100%}@keyframes md-autocomplete-list-out{0%{animation-timing-function:linear}50%{opacity:0;height:40px;animation-timing-function:ease-in}100%{height:0;opacity:0}}@keyframes md-autocomplete-list-in{0%{opacity:0;height:0;animation-timing-function:ease-out}50%{opacity:0;height:40px}100%{opacity:1;height:40px}}md-autocomplete{border-radius:2px;display:block;height:40px;position:relative;overflow:visible;min-width:190px}md-autocomplete[disabled] input{cursor:default}md-autocomplete[md-floating-label]{border-radius:0;background:0 0;height:auto}md-autocomplete[md-floating-label] md-input-container{padding-bottom:0}md-autocomplete[md-floating-label] md-autocomplete-wrap{height:auto}md-autocomplete[md-floating-label] button{position:absolute;top:auto;bottom:0;right:0;width:30px;height:30px}md-autocomplete md-autocomplete-wrap{display:flex;flex-direction:row;box-sizing:border-box;position:relative;overflow:visible;height:40px}md-autocomplete md-autocomplete-wrap.md-menu-showing{z-index:51}md-autocomplete md-autocomplete-wrap input,md-autocomplete md-autocomplete-wrap md-input-container{flex:1 1 0%;box-sizing:border-box;min-width:0}md-autocomplete md-autocomplete-wrap md-progress-linear{position:absolute;bottom:-2px;left:0}md-autocomplete md-autocomplete-wrap md-progress-linear.md-inline{bottom:40px;right:2px;left:2px;width:auto}md-autocomplete md-autocomplete-wrap md-progress-linear .md-mode-indeterminate{position:absolute;top:0;left:0;width:100%;height:3px;transition:none}md-autocomplete md-autocomplete-wrap md-progress-linear .md-mode-indeterminate .md-container{transition:none;height:3px}md-autocomplete md-autocomplete-wrap md-progress-linear .md-mode-indeterminate.ng-enter{transition:opacity .15s linear}md-autocomplete md-autocomplete-wrap md-progress-linear .md-mode-indeterminate.ng-enter.ng-enter-active{opacity:1}md-autocomplete md-autocomplete-wrap md-progress-linear .md-mode-indeterminate.ng-leave{transition:opacity .15s linear}md-autocomplete md-autocomplete-wrap md-progress-linear .md-mode-indeterminate.ng-leave.ng-leave-active{opacity:0}md-autocomplete input:not(.md-input){font-size:14px;box-sizing:border-box;border:none;box-shadow:none;outline:0;background:0 0;width:100%;padding:0 15px;line-height:40px;height:40px}md-autocomplete input:not(.md-input)::-ms-clear{display:none}md-autocomplete button{position:relative;line-height:20px;text-align:center;width:30px;height:30px;cursor:pointer;border:none;border-radius:50%;padding:0;font-size:12px;background:0 0;margin:auto 5px}md-autocomplete button:after{content:'';position:absolute;top:-6px;right:-6px;bottom:-6px;left:-6px;border-radius:50%;transform:scale(0);opacity:0;transition:all .4s cubic-bezier(.25,.8,.25,1)}md-autocomplete button:focus{outline:0}md-autocomplete button:focus:after{transform:scale(1);opacity:1}md-autocomplete button md-icon{position:absolute;top:50%;left:50%;transform:translate3d(-50%,-50%,0) scale(.9)}md-autocomplete button md-icon path{stroke-width:0}md-autocomplete button.ng-enter{transform:scale(0);transition:transform .15s ease-out}md-autocomplete button.ng-enter.ng-enter-active{transform:scale(1)}md-autocomplete button.ng-leave{transition:transform .15s ease-out}md-autocomplete button.ng-leave.ng-leave-active{transform:scale(0)}@media screen and (-ms-high-contrast:active){md-autocomplete input{border:1px solid #fff}md-autocomplete li:focus{color:#fff}}.md-virtual-repeat-container.md-autocomplete-suggestions-container{position:absolute;box-shadow:0 2px 5px rgba(0,0,0,.25);height:225.5px;max-height:225.5px;z-index:100}.md-virtual-repeat-container.md-not-found{height:48px}.md-autocomplete-suggestions{margin:0;list-style:none;padding:0}.md-autocomplete-suggestions li{font-size:14px;overflow:hidden;padding:0 15px;line-height:48px;height:48px;transition:background .15s linear;margin:0;white-space:nowrap;text-overflow:ellipsis}.md-autocomplete-suggestions li:focus{outline:0}.md-autocomplete-suggestions li:not(.md-not-found-wrapper){cursor:pointer}@media screen and (-ms-high-contrast:active){.md-autocomplete-suggestions,md-autocomplete{border:1px solid #fff}}md-backdrop{transition:opacity 450ms;position:absolute;top:0;bottom:0;left:0;right:0;z-index:50}md-backdrop.md-menu-backdrop{position:fixed!important;z-index:99}md-backdrop.md-select-backdrop{z-index:81;transition-duration:0}md-backdrop.md-dialog-backdrop{z-index:79}md-backdrop.md-bottom-sheet-backdrop{z-index:69}md-backdrop.md-sidenav-backdrop{z-index:59}md-backdrop.md-click-catcher{position:absolute}md-backdrop.md-opaque{opacity:.48}md-backdrop.md-opaque.ng-enter{opacity:0}md-backdrop.md-opaque.ng-enter.md-opaque.ng-enter-active{opacity:.48}md-backdrop.md-opaque.ng-leave{opacity:.48;transition:opacity .4s}md-backdrop.md-opaque.ng-leave.md-opaque.ng-leave-active{opacity:0}md-bottom-sheet{position:absolute;left:0;right:0;bottom:0;padding:8px 16px 88px 16px;z-index:70;border-top-width:1px;border-top-style:solid;transform:translate3d(0,80px,0);transition:all .4s cubic-bezier(.25,.8,.25,1);transition-property:transform}md-bottom-sheet.md-has-header{padding-top:0}md-bottom-sheet.ng-enter{opacity:0;transform:translate3d(0,100%,0)}md-bottom-sheet.ng-enter-active{opacity:1;display:block;transform:translate3d(0,80px,0)!important}md-bottom-sheet.ng-leave-active{transform:translate3d(0,100%,0)!important;transition:all .3s cubic-bezier(.55,0,.55,.2)}md-bottom-sheet .md-subheader{background-color:transparent;font-family:Roboto,"Helvetica Neue",sans-serif;line-height:56px;padding:0;white-space:nowrap}md-bottom-sheet md-inline-icon{display:inline-block;height:24px;width:24px;fill:#444}md-bottom-sheet md-list-item{display:flex;outline:0}md-bottom-sheet md-list-item:hover{cursor:pointer}md-bottom-sheet.md-list md-list-item{padding:0;align-items:center;height:48px}md-bottom-sheet.md-grid{padding-left:24px;padding-right:24px;padding-top:0}md-bottom-sheet.md-grid md-list{display:flex;flex-direction:row;flex-wrap:wrap;transition:all .5s;align-items:center}md-bottom-sheet.md-grid md-list-item{flex-direction:column;align-items:center;transition:all .5s;height:96px;margin-top:8px;margin-bottom:8px}@media (max-width:960px){md-bottom-sheet.md-grid md-list-item{flex:1 1 33.3333333333%;max-width:33.3333333333%}md-bottom-sheet.md-grid md-list-item:nth-of-type(3n+1){align-items:flex-start}md-bottom-sheet.md-grid md-list-item:nth-of-type(3n){align-items:flex-end}}@media (min-width:960px) and (max-width:1279px){md-bottom-sheet.md-grid md-list-item{flex:1 1 25%;max-width:25%}}@media (min-width:1280px) and (max-width:1919px){md-bottom-sheet.md-grid md-list-item{flex:1 1 16.6666666667%;max-width:16.6666666667%}}@media (min-width:1920px){md-bottom-sheet.md-grid md-list-item{flex:1 1 14.2857142857%;max-width:14.2857142857%}}md-bottom-sheet.md-grid md-list-item::before{display:none}md-bottom-sheet.md-grid md-list-item .md-list-item-content{display:flex;flex-direction:column;align-items:center;width:48px;padding-bottom:16px}md-bottom-sheet.md-grid md-list-item .md-grid-item-content{border:1px solid transparent;display:flex;flex-direction:column;align-items:center;width:80px}md-bottom-sheet.md-grid md-list-item .md-grid-text{font-weight:400;line-height:16px;font-size:13px;margin:0;white-space:nowrap;width:64px;text-align:center;text-transform:none;padding-top:8px}@media screen and (-ms-high-contrast:active){md-bottom-sheet{border:1px solid #fff}}button.md-button::-moz-focus-inner{border:0}.md-button{display:inline-block;position:relative;cursor:pointer;min-height:36px;min-width:88px;line-height:36px;vertical-align:middle;align-items:center;text-align:center;border-radius:3px;box-sizing:border-box;user-select:none;outline:0;border:0;padding:0 6px;margin:6px 8px;background:0 0;color:currentColor;white-space:nowrap;text-transform:uppercase;font-weight:500;font-size:14px;font-style:inherit;font-variant:inherit;font-family:inherit;text-decoration:none;overflow:hidden;transition:box-shadow .4s cubic-bezier(.25,.8,.25,1),background-color .4s cubic-bezier(.25,.8,.25,1)}.md-button:focus{outline:0}.md-button:focus,.md-button:hover{text-decoration:none}.md-button.ng-hide,.md-button.ng-leave{transition:none}.md-button.md-cornered{border-radius:0}.md-button.md-icon{padding:0;background:0 0}.md-button.md-raised:not([disabled]){box-shadow:0 2px 5px 0 rgba(0,0,0,.26)}.md-button.md-icon-button{margin:0 6px;height:40px;min-width:0;line-height:24px;padding:8px;width:40px;border-radius:50%}.md-button.md-icon-button .md-ripple-container{border-radius:50%;background-clip:padding-box;overflow:hidden;-webkit-mask-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAIAAACQd1PeAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAA5JREFUeNpiYGBgAAgwAAAEAAGbA+oJAAAAAElFTkSuQmCC)}.md-button.md-fab{z-index:20;line-height:56px;min-width:0;width:56px;height:56px;vertical-align:middle;box-shadow:0 2px 5px 0 rgba(0,0,0,.26);border-radius:50%;background-clip:padding-box;overflow:hidden;transition:all .3s cubic-bezier(.55,0,.55,.2);transition-property:background-color,box-shadow,transform}.md-button.md-fab.md-fab-bottom-right{top:auto;right:20px;bottom:20px;left:auto;position:absolute}.md-button.md-fab.md-fab-bottom-left{top:auto;right:auto;bottom:20px;left:20px;position:absolute}.md-button.md-fab.md-fab-top-right{top:20px;right:20px;bottom:auto;left:auto;position:absolute}.md-button.md-fab.md-fab-top-left{top:20px;right:auto;bottom:auto;left:20px;position:absolute}.md-button.md-fab .md-ripple-container{border-radius:50%;background-clip:padding-box;overflow:hidden;-webkit-mask-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAIAAACQd1PeAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAA5JREFUeNpiYGBgAAgwAAAEAAGbA+oJAAAAAElFTkSuQmCC)}.md-button.md-fab.md-mini{line-height:40px;width:40px;height:40px}.md-button.md-fab.ng-hide,.md-button.md-fab.ng-leave{transition:none}.md-button:not([disabled]).md-fab.md-focused,.md-button:not([disabled]).md-raised.md-focused{box-shadow:0 2px 5px 0 rgba(0,0,0,.26)}.md-button:not([disabled]).md-fab:active,.md-button:not([disabled]).md-raised:active{box-shadow:0 4px 8px 0 rgba(0,0,0,.4)}.md-button .md-ripple-container{border-radius:3px;background-clip:padding-box;overflow:hidden;-webkit-mask-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAIAAACQd1PeAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAA5JREFUeNpiYGBgAAgwAAAEAAGbA+oJAAAAAElFTkSuQmCC)}.md-button.md-icon-button md-icon,button.md-button.md-fab md-icon{display:block}.md-toast-open-top .md-button.md-fab-top-left,.md-toast-open-top .md-button.md-fab-top-right{transition:all .4s cubic-bezier(.25,.8,.25,1);transform:translate3d(0,42px,0)}.md-toast-open-top .md-button.md-fab-top-left:not([disabled]).md-focused,.md-toast-open-top .md-button.md-fab-top-left:not([disabled]):hover,.md-toast-open-top .md-button.md-fab-top-right:not([disabled]).md-focused,.md-toast-open-top .md-button.md-fab-top-right:not([disabled]):hover{transform:translate3d(0,41px,0)}.md-toast-open-bottom .md-button.md-fab-bottom-left,.md-toast-open-bottom .md-button.md-fab-bottom-right{transition:all .4s cubic-bezier(.25,.8,.25,1);transform:translate3d(0,-42px,0)}.md-toast-open-bottom .md-button.md-fab-bottom-left:not([disabled]).md-focused,.md-toast-open-bottom .md-button.md-fab-bottom-left:not([disabled]):hover,.md-toast-open-bottom .md-button.md-fab-bottom-right:not([disabled]).md-focused,.md-toast-open-bottom .md-button.md-fab-bottom-right:not([disabled]):hover{transform:translate3d(0,-43px,0)}.md-button-group{display:flex;flex:1;width:100%}.md-button-group>.md-button{flex:1;display:block;overflow:hidden;width:0;border-width:1px 0 1px 1px;border-radius:0;text-align:center;text-overflow:ellipsis;white-space:nowrap}.md-button-group>.md-button:first-child{border-radius:2px 0 0 2px}.md-button-group>.md-button:last-child{border-right-width:1px;border-radius:0 2px 2px 0}@media screen and (-ms-high-contrast:active){.md-button.md-fab,.md-button.md-raised{border:1px solid #fff}}md-card{box-sizing:border-box;display:flex;flex-direction:column;margin:8px;box-shadow:0 1px 3px 0 rgba(0,0,0,.2),0 1px 1px 0 rgba(0,0,0,.14),0 2px 1px -1px rgba(0,0,0,.12)}md-card md-card-header{padding:16px;display:flex;flex-direction:row}md-card md-card-header:first-child md-card-avatar{margin-right:12px}[dir=rtl] md-card md-card-header:first-child md-card-avatar{margin-right:auto;margin-left:12px}md-card md-card-header:last-child md-card-avatar{margin-left:12px}[dir=rtl] md-card md-card-header:last-child md-card-avatar{margin-left:auto;margin-right:12px}md-card md-card-header md-card-avatar{width:40px;height:40px}md-card md-card-header md-card-avatar .md-user-avatar,md-card md-card-header md-card-avatar md-icon{border-radius:50%}md-card md-card-header md-card-avatar md-icon{padding:8px}md-card md-card-header md-card-avatar+md-card-header-text{max-height:40px}md-card md-card-header md-card-avatar+md-card-header-text .md-title{font-size:14px}md-card md-card-header md-card-header-text{display:flex;flex:1;flex-direction:column}md-card md-card-header md-card-header-text .md-subhead{font-size:14px}md-card md-card-title-media img,md-card>img,md-card>md-card-header img{box-sizing:border-box;display:flex;flex:0 0 auto;width:100%;height:auto}md-card md-card-title{padding:24px 16px 16px;display:flex;flex:1 1 auto;flex-direction:row}md-card md-card-title+md-card-content{padding-top:0}md-card md-card-title md-card-title-text{flex:1;flex-direction:column;display:flex}md-card md-card-title md-card-title-text .md-subhead{padding-top:0;font-size:14px}md-card md-card-title md-card-title-text:only-child .md-subhead{padding-top:12px}md-card md-card-title md-card-title-media{margin-top:-8px}md-card md-card-title md-card-title-media .md-media-sm{height:80px;width:80px}md-card md-card-title md-card-title-media .md-media-md{height:112px;width:112px}md-card md-card-title md-card-title-media .md-media-lg{height:152px;width:152px}md-card md-card-content{display:block;padding:16px}md-card md-card-content>p:first-child{margin-top:0}md-card md-card-content>p:last-child{margin-bottom:0}md-card md-card-content .md-media-xl{height:240px;width:240px}md-card .md-actions,md-card md-card-actions{margin:8px}md-card .md-actions.layout-column .md-button:not(.md-icon-button),md-card md-card-actions.layout-column .md-button:not(.md-icon-button){margin:2px 0}md-card .md-actions.layout-column .md-button:not(.md-icon-button):first-of-type,md-card md-card-actions.layout-column .md-button:not(.md-icon-button):first-of-type{margin-top:0}md-card .md-actions.layout-column .md-button:not(.md-icon-button):last-of-type,md-card md-card-actions.layout-column .md-button:not(.md-icon-button):last-of-type{margin-bottom:0}md-card .md-actions.layout-column .md-button.md-icon-button,md-card md-card-actions.layout-column .md-button.md-icon-button{margin-top:6px;margin-bottom:6px}md-card .md-actions md-card-icon-actions,md-card md-card-actions md-card-icon-actions{flex:1;justify-content:flex-start;display:flex;flex-direction:row}md-card .md-actions:not(.layout-column) .md-button:not(.md-icon-button),md-card md-card-actions:not(.layout-column) .md-button:not(.md-icon-button){margin:0 4px}md-card .md-actions:not(.layout-column) .md-button:not(.md-icon-button):first-of-type,md-card md-card-actions:not(.layout-column) .md-button:not(.md-icon-button):first-of-type{margin-left:0}[dir=rtl] md-card .md-actions:not(.layout-column) .md-button:not(.md-icon-button):first-of-type,[dir=rtl] md-card md-card-actions:not(.layout-column) .md-button:not(.md-icon-button):first-of-type{margin-left:auto;margin-right:0}md-card .md-actions:not(.layout-column) .md-button:not(.md-icon-button):last-of-type,md-card md-card-actions:not(.layout-column) .md-button:not(.md-icon-button):last-of-type{margin-right:0}[dir=rtl] md-card .md-actions:not(.layout-column) .md-button:not(.md-icon-button):last-of-type,[dir=rtl] md-card md-card-actions:not(.layout-column) .md-button:not(.md-icon-button):last-of-type{margin-right:auto;margin-left:0}md-card .md-actions:not(.layout-column) .md-button.md-icon-button,md-card md-card-actions:not(.layout-column) .md-button.md-icon-button{margin-left:6px;margin-right:6px}md-card .md-actions:not(.layout-column) .md-button.md-icon-button:first-of-type,md-card md-card-actions:not(.layout-column) .md-button.md-icon-button:first-of-type{margin-left:12px}[dir=rtl] md-card .md-actions:not(.layout-column) .md-button.md-icon-button:first-of-type,[dir=rtl] md-card md-card-actions:not(.layout-column) .md-button.md-icon-button:first-of-type{margin-left:auto;margin-right:12px}md-card .md-actions:not(.layout-column) .md-button.md-icon-button:last-of-type,md-card md-card-actions:not(.layout-column) .md-button.md-icon-button:last-of-type{margin-right:12px}[dir=rtl] md-card .md-actions:not(.layout-column) .md-button.md-icon-button:last-of-type,[dir=rtl] md-card md-card-actions:not(.layout-column) .md-button.md-icon-button:last-of-type{margin-right:auto;margin-left:12px}md-card .md-actions:not(.layout-column) .md-button+md-card-icon-actions,md-card md-card-actions:not(.layout-column) .md-button+md-card-icon-actions{flex:1;justify-content:flex-end;display:flex;flex-direction:row}md-card md-card-footer{margin-top:auto;padding:16px}@media screen and (-ms-high-contrast:active){md-card{border:1px solid #fff}}.md-image-no-fill>img{width:auto;height:auto}.md-contact-chips .md-chips md-chip{padding:0 25px 0 0}[dir=rtl] .md-contact-chips .md-chips md-chip{padding:0 0 0 25px}.md-contact-chips .md-chips md-chip .md-contact-avatar{float:left}[dir=rtl] .md-contact-chips .md-chips md-chip .md-contact-avatar{float:right}.md-contact-chips .md-chips md-chip .md-contact-avatar img{height:32px;border-radius:16px}.md-contact-chips .md-chips md-chip .md-contact-name{display:inline-block;height:32px;margin-left:8px}[dir=rtl] .md-contact-chips .md-chips md-chip .md-contact-name{margin-left:auto;margin-right:8px}.md-contact-suggestion{height:56px}.md-contact-suggestion img{height:40px;border-radius:20px;margin-top:8px}.md-contact-suggestion .md-contact-name{margin-left:8px;width:120px}[dir=rtl] .md-contact-suggestion .md-contact-name{margin-left:auto;margin-right:8px}.md-contact-suggestion .md-contact-email,.md-contact-suggestion .md-contact-name{display:inline-block;overflow:hidden;text-overflow:ellipsis}.md-contact-chips-suggestions li{height:100%}.md-chips{display:block;font-family:Roboto,"Helvetica Neue",sans-serif;font-size:16px;padding:0 0 8px 3px;vertical-align:middle}.md-chips:after{content:'';display:table;clear:both}[dir=rtl] .md-chips{padding:0 3px 8px 0}.md-chips.md-readonly .md-chip-input-container{min-height:32px}.md-chips:not(.md-readonly){cursor:text}.md-chips.md-removable md-chip{padding-right:22px}[dir=rtl] .md-chips.md-removable md-chip{padding-right:0;padding-left:22px}.md-chips.md-removable md-chip .md-chip-content{padding-right:4px}[dir=rtl] .md-chips.md-removable md-chip .md-chip-content{padding-right:0;padding-left:4px}.md-chips md-chip{cursor:default;border-radius:16px;display:block;height:32px;line-height:32px;margin:8px 8px 0 0;padding:0 12px 0 12px;float:left;box-sizing:border-box;max-width:100%;position:relative}[dir=rtl] .md-chips md-chip{margin:8px 0 0 8px}[dir=rtl] .md-chips md-chip{float:right}.md-chips md-chip .md-chip-content{display:block;float:left;white-space:nowrap;max-width:100%;overflow:hidden;text-overflow:ellipsis}[dir=rtl] .md-chips md-chip .md-chip-content{float:right}.md-chips md-chip .md-chip-content:focus{outline:0}.md-chips md-chip._md-chip-content-edit-is-enabled{-webkit-user-select:none;-moz-user-select:none;-khtml-user-select:none;-ms-user-select:none}.md-chips md-chip .md-chip-remove-container{position:absolute;right:0;line-height:22px}[dir=rtl] .md-chips md-chip .md-chip-remove-container{right:auto;left:0}.md-chips md-chip .md-chip-remove{text-align:center;width:32px;height:32px;min-width:0;padding:0;background:0 0;border:none;box-shadow:none;margin:0;position:relative}.md-chips md-chip .md-chip-remove md-icon{height:18px;width:18px;position:absolute;top:50%;left:50%;transform:translate3d(-50%,-50%,0)}.md-chips .md-chip-input-container{display:block;line-height:32px;margin:8px 8px 0 0;padding:0;float:left}[dir=rtl] .md-chips .md-chip-input-container{margin:8px 0 0 8px}[dir=rtl] .md-chips .md-chip-input-container{float:right}.md-chips .md-chip-input-container input:not([type]),.md-chips .md-chip-input-container input[type=email],.md-chips .md-chip-input-container input[type=number],.md-chips .md-chip-input-container input[type=tel],.md-chips .md-chip-input-container input[type=text],.md-chips .md-chip-input-container input[type=url]{border:0;height:32px;line-height:32px;padding:0}.md-chips .md-chip-input-container input:not([type]):focus,.md-chips .md-chip-input-container input[type=email]:focus,.md-chips .md-chip-input-container input[type=number]:focus,.md-chips .md-chip-input-container input[type=tel]:focus,.md-chips .md-chip-input-container input[type=text]:focus,.md-chips .md-chip-input-container input[type=url]:focus{outline:0}.md-chips .md-chip-input-container md-autocomplete,.md-chips .md-chip-input-container md-autocomplete-wrap{background:0 0;height:32px}.md-chips .md-chip-input-container md-autocomplete md-autocomplete-wrap{box-shadow:none}.md-chips .md-chip-input-container md-autocomplete input{position:relative}.md-chips .md-chip-input-container input{border:0;height:32px;line-height:32px;padding:0}.md-chips .md-chip-input-container input:focus{outline:0}.md-chips .md-chip-input-container md-autocomplete,.md-chips .md-chip-input-container md-autocomplete-wrap{height:32px}.md-chips .md-chip-input-container md-autocomplete{box-shadow:none}.md-chips .md-chip-input-container md-autocomplete input{position:relative}.md-chips .md-chip-input-container:not(:first-child){margin:8px 8px 0 0}[dir=rtl] .md-chips .md-chip-input-container:not(:first-child){margin:8px 0 0 8px}.md-chips .md-chip-input-container input{background:0 0;border-width:0}.md-chips md-autocomplete button{display:none}@media screen and (-ms-high-contrast:active){.md-chip-input-container,md-chip{border:1px solid #fff}.md-chip-input-container md-autocomplete{border:none}}.md-inline-form md-checkbox{margin:19px 0 18px}md-checkbox{box-sizing:border-box;display:inline-block;margin-bottom:16px;white-space:nowrap;cursor:pointer;outline:0;user-select:none;position:relative;min-width:20px;min-height:20px;margin-left:0;margin-right:16px}[dir=rtl] md-checkbox{margin-left:16px}[dir=rtl] md-checkbox{margin-right:0}md-checkbox:last-of-type{margin-left:0;margin-right:0}md-checkbox.md-focused:not([disabled]) .md-container:before{left:-8px;top:-8px;right:-8px;bottom:-8px}md-checkbox.md-focused:not([disabled]):not(.md-checked) .md-container:before{background-color:rgba(0,0,0,.12)}md-checkbox.md-align-top-left>div.md-container{top:12px}md-checkbox .md-container{position:absolute;top:50%;transform:translateY(-50%);box-sizing:border-box;display:inline-block;width:20px;height:20px;left:0;right:auto}[dir=rtl] md-checkbox .md-container{left:auto}[dir=rtl] md-checkbox .md-container{right:0}md-checkbox .md-container:before{box-sizing:border-box;background-color:transparent;border-radius:50%;content:'';position:absolute;display:block;height:auto;left:0;top:0;right:0;bottom:0;transition:all .5s;width:auto}md-checkbox .md-container:after{box-sizing:border-box;content:'';position:absolute;top:-10px;right:-10px;bottom:-10px;left:-10px}md-checkbox .md-container .md-ripple-container{position:absolute;display:block;width:auto;height:auto;left:-15px;top:-15px;right:-15px;bottom:-15px}md-checkbox .md-icon{box-sizing:border-box;transition:240ms;position:absolute;top:0;left:0;width:20px;height:20px;border-width:2px;border-style:solid;border-radius:2px}md-checkbox.md-checked .md-icon{border-color:transparent}md-checkbox.md-checked .md-icon:after{box-sizing:border-box;transform:rotate(45deg);position:absolute;left:4.6666666667px;top:.2222222222px;display:table;width:6.6666666667px;height:13.3333333333px;border-width:2px;border-style:solid;border-top:0;border-left:0;content:''}md-checkbox[disabled]{cursor:default}md-checkbox.md-indeterminate .md-icon:after{box-sizing:border-box;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);display:table;width:12px;height:2px;border-width:2px;border-style:solid;border-top:0;border-left:0;content:''}md-checkbox .md-label{box-sizing:border-box;position:relative;display:inline-block;vertical-align:middle;white-space:normal;user-select:text;margin-left:30px;margin-right:0}[dir=rtl] md-checkbox .md-label{margin-left:0}[dir=rtl] md-checkbox .md-label{margin-right:30px}md-content{display:block;position:relative;overflow:auto;-webkit-overflow-scrolling:touch}md-content[md-scroll-y]{overflow-y:auto;overflow-x:hidden}md-content[md-scroll-x]{overflow-x:auto;overflow-y:hidden}@media print{md-content{overflow:visible!important}}md-calendar{font-size:13px;user-select:none}.md-calendar-scroll-mask{display:inline-block;overflow:hidden;height:308px}.md-calendar-scroll-mask .md-virtual-repeat-scroller{overflow-y:scroll;-webkit-overflow-scrolling:touch}.md-calendar-scroll-mask .md-virtual-repeat-scroller::-webkit-scrollbar{display:none}.md-calendar-scroll-mask .md-virtual-repeat-offsetter{width:100%}.md-calendar-scroll-container{box-shadow:inset -3px 3px 6px rgba(0,0,0,.2);display:inline-block;height:308px;width:346px}.md-calendar-date{height:44px;width:44px;text-align:center;padding:0;border:none;box-sizing:content-box}.md-calendar-date:first-child{padding-left:16px}[dir=rtl] .md-calendar-date:first-child{padding-left:0;padding-right:16px}.md-calendar-date:last-child{padding-right:16px}[dir=rtl] .md-calendar-date:last-child{padding-right:0;padding-left:16px}.md-calendar-date.md-calendar-date-disabled{cursor:default}.md-calendar-date-selection-indicator{transition:background-color,color .4s cubic-bezier(.25,.8,.25,1);border-radius:50%;display:inline-block;width:40px;height:40px;line-height:40px}.md-calendar-date:not(.md-disabled) .md-calendar-date-selection-indicator{cursor:pointer}.md-calendar-month-label{height:44px;font-size:14px;font-weight:500;padding:0 0 0 24px}[dir=rtl] .md-calendar-month-label{padding:0 24px 0 0}md-calendar-month .md-calendar-month-label:not(.md-calendar-month-label-disabled){cursor:pointer}.md-calendar-month-label md-icon{transform:rotate(180deg)}[dir=rtl] .md-calendar-month-label md-icon{transform:none}.md-calendar-month-label span{vertical-align:middle}.md-calendar-day-header{table-layout:fixed;border-spacing:0;border-collapse:collapse}.md-calendar-day-header th{height:40px;width:44px;text-align:center;padding:0;border:none;box-sizing:content-box;font-weight:400}.md-calendar-day-header th:first-child{padding-left:16px}[dir=rtl] .md-calendar-day-header th:first-child{padding-left:0;padding-right:16px}.md-calendar-day-header th:last-child{padding-right:16px}[dir=rtl] .md-calendar-day-header th:last-child{padding-right:0;padding-left:16px}.md-calendar{table-layout:fixed;border-spacing:0;border-collapse:collapse}.md-calendar tr:last-child td{border-bottom-width:1px;border-bottom-style:solid}.md-calendar:first-child{border-top:1px solid transparent}.md-calendar tbody,.md-calendar td,.md-calendar tr{vertical-align:middle;box-sizing:content-box}md-datepicker{white-space:nowrap;overflow:hidden;padding-right:18px;margin-right:-18px;vertical-align:middle}[dir=rtl] md-datepicker{padding-right:0;padding-left:18px}[dir=rtl] md-datepicker{margin-right:auto;margin-left:-18px}.md-inline-form md-datepicker{margin-top:12px}.md-datepicker-button{display:inline-block;box-sizing:border-box;background:0 0;vertical-align:middle;position:relative}.md-datepicker-button:before{top:0;left:0;bottom:0;right:0;position:absolute;content:'';speak:none}.md-datepicker-input{font-size:14px;box-sizing:border-box;border:none;box-shadow:none;outline:0;background:0 0;min-width:120px;max-width:328px;padding:0 0 5px}.md-datepicker-input::-ms-clear{display:none}._md-datepicker-floating-label>md-datepicker{overflow:visible}._md-datepicker-floating-label>md-datepicker .md-datepicker-input-container{border:none}._md-datepicker-floating-label>md-datepicker .md-datepicker-button{float:left;margin-top:-2.5px}[dir=rtl] ._md-datepicker-floating-label>md-datepicker .md-datepicker-button{float:right}._md-datepicker-floating-label._md-datepicker-has-calendar-icon>label:not(.md-no-float):not(.md-container-ignore){right:18px;left:auto;width:calc(100% - 84px)}[dir=rtl] ._md-datepicker-floating-label._md-datepicker-has-calendar-icon>label:not(.md-no-float):not(.md-container-ignore){right:auto}[dir=rtl] ._md-datepicker-floating-label._md-datepicker-has-calendar-icon>label:not(.md-no-float):not(.md-container-ignore){left:18px}._md-datepicker-floating-label._md-datepicker-has-calendar-icon .md-input-message-animation{margin-left:64px}[dir=rtl] ._md-datepicker-floating-label._md-datepicker-has-calendar-icon .md-input-message-animation{margin-left:auto;margin-right:64px}.md-datepicker-input-container{position:relative;border-bottom-width:1px;border-bottom-style:solid;display:inline-block;width:auto}.md-icon-button+.md-datepicker-input-container{margin-left:12px}[dir=rtl] .md-icon-button+.md-datepicker-input-container{margin-left:auto;margin-right:12px}.md-datepicker-input-container.md-datepicker-focused{border-bottom-width:2px}.md-datepicker-is-showing .md-scroll-mask{z-index:99}.md-datepicker-calendar-pane{position:absolute;top:0;left:-100%;z-index:100;border-width:1px;border-style:solid;background:0 0;transform:scale(0);transform-origin:0 0;transition:transform .2s cubic-bezier(.25,.8,.25,1)}.md-datepicker-calendar-pane.md-pane-open{transform:scale(1)}.md-datepicker-input-mask{height:40px;width:340px;position:relative;overflow:hidden;background:0 0;pointer-events:none;cursor:text}.md-datepicker-calendar{opacity:0;transition:opacity .2s cubic-bezier(.5,0,.25,1)}.md-pane-open .md-datepicker-calendar{opacity:1}.md-datepicker-calendar md-calendar:focus{outline:0}.md-datepicker-expand-triangle{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);width:0;height:0;border-left:5px solid transparent;border-right:5px solid transparent;border-top:5px solid}.md-datepicker-triangle-button{position:absolute;right:0;top:5px;transform:translateY(-25%) translateX(45%)}[dir=rtl] .md-datepicker-triangle-button{right:auto;left:0}[dir=rtl] .md-datepicker-triangle-button{transform:translateY(-25%) translateX(-45%)}.md-datepicker-triangle-button.md-button.md-icon-button{height:36px;width:36px;position:absolute;padding:8px}md-datepicker[disabled] .md-datepicker-input-container{border-bottom-color:transparent}md-datepicker[disabled] .md-datepicker-triangle-button{display:none}.md-datepicker-open{overflow:hidden}.md-datepicker-open .md-datepicker-input-container,.md-datepicker-open input.md-input{border-bottom-color:transparent}.md-datepicker-open .md-datepicker-triangle-button,.md-datepicker-open.md-input-has-placeholder>label,.md-datepicker-open.md-input-has-value>label{display:none}.md-datepicker-pos-adjusted .md-datepicker-input-mask{display:none}.md-datepicker-calendar-pane .md-calendar{transform:translateY(-85px);transition:transform .65s cubic-bezier(.25,.8,.25,1);transition-delay:125ms}.md-datepicker-calendar-pane.md-pane-open .md-calendar{transform:translateY(0)}.md-dialog-is-showing{max-height:100%}.md-dialog-container{display:flex;justify-content:center;align-items:center;position:absolute;top:0;left:0;width:100%;height:100%;z-index:80;overflow:hidden}md-dialog{opacity:0;min-width:240px;max-width:80%;max-height:80%;position:relative;overflow:auto;box-shadow:0 7px 8px -4px rgba(0,0,0,.2),0 13px 19px 2px rgba(0,0,0,.14),0 5px 24px 4px rgba(0,0,0,.12);display:flex;flex-direction:column}md-dialog.md-transition-in{opacity:1;transition:all .4s cubic-bezier(.25,.8,.25,1);transform:translate(0,0) scale(1)}md-dialog.md-transition-out{opacity:0;transition:all .4s cubic-bezier(.25,.8,.25,1);transform:translate(0,100%) scale(.2)}md-dialog>form{display:flex;flex-direction:column;overflow:auto}md-dialog .md-dialog-content{padding:24px}md-dialog md-dialog-content{order:1;flex-direction:column;overflow:auto;-webkit-overflow-scrolling:touch}md-dialog md-dialog-content:not([layout=row])>:first-child:not(.md-subheader){margin-top:0}md-dialog md-dialog-content:focus{outline:0}md-dialog md-dialog-content .md-subheader{margin:0}md-dialog md-dialog-content .md-dialog-content-body{width:100%}md-dialog md-dialog-content .md-prompt-input-container{width:100%;box-sizing:border-box}md-dialog .md-actions,md-dialog md-dialog-actions{display:flex;order:2;box-sizing:border-box;align-items:center;justify-content:flex-end;margin-bottom:0;padding-right:8px;padding-left:16px;min-height:52px;overflow:hidden}[dir=rtl] md-dialog .md-actions,[dir=rtl] md-dialog md-dialog-actions{padding-right:16px}[dir=rtl] md-dialog .md-actions,[dir=rtl] md-dialog md-dialog-actions{padding-left:8px}md-dialog .md-actions .md-button,md-dialog md-dialog-actions .md-button{margin-bottom:8px;margin-left:8px;margin-right:0;margin-top:8px}[dir=rtl] md-dialog .md-actions .md-button,[dir=rtl] md-dialog md-dialog-actions .md-button{margin-left:0}[dir=rtl] md-dialog .md-actions .md-button,[dir=rtl] md-dialog md-dialog-actions .md-button{margin-right:8px}md-dialog.md-content-overflow .md-actions,md-dialog.md-content-overflow md-dialog-actions{border-top-width:1px;border-top-style:solid}@media screen and (-ms-high-contrast:active){md-dialog{border:1px solid #fff}}@media (max-width:959px){md-dialog.md-dialog-fullscreen{min-height:100%;min-width:100%;border-radius:0}}md-divider{display:block;border-top-width:1px;border-top-style:solid;margin:0}md-divider[md-inset]{margin-left:80px}[dir=rtl] md-divider[md-inset]{margin-left:auto;margin-right:80px}.layout-gt-lg-row>md-divider,.layout-gt-md-row>md-divider,.layout-gt-sm-row>md-divider,.layout-gt-xs-row>md-divider,.layout-lg-row>md-divider,.layout-md-row>md-divider,.layout-row>md-divider,.layout-sm-row>md-divider,.layout-xl-row>md-divider,.layout-xs-row>md-divider{border-top-width:0;border-right-width:1px;border-right-style:solid}md-fab-speed-dial{position:relative;display:flex;align-items:center;z-index:20}md-fab-speed-dial.md-fab-bottom-right{top:auto;right:20px;bottom:20px;left:auto;position:absolute}md-fab-speed-dial.md-fab-bottom-left{top:auto;right:auto;bottom:20px;left:20px;position:absolute}md-fab-speed-dial.md-fab-top-right{top:20px;right:20px;bottom:auto;left:auto;position:absolute}md-fab-speed-dial.md-fab-top-left{top:20px;right:auto;bottom:auto;left:20px;position:absolute}md-fab-speed-dial:not(.md-hover-full){pointer-events:none}md-fab-speed-dial:not(.md-hover-full) .md-fab-action-item,md-fab-speed-dial:not(.md-hover-full) md-fab-trigger{pointer-events:auto}md-fab-speed-dial:not(.md-hover-full).md-is-open{pointer-events:auto}md-fab-speed-dial ._md-css-variables{z-index:20}md-fab-speed-dial.md-is-open .md-fab-action-item{align-items:center}md-fab-speed-dial md-fab-actions{display:flex;height:auto}md-fab-speed-dial md-fab-actions .md-fab-action-item{transition:all .3s cubic-bezier(.55,0,.55,.2)}md-fab-speed-dial.md-down{flex-direction:column}md-fab-speed-dial.md-down md-fab-trigger{order:1}md-fab-speed-dial.md-down md-fab-actions{flex-direction:column;order:2}md-fab-speed-dial.md-up{flex-direction:column}md-fab-speed-dial.md-up md-fab-trigger{order:2}md-fab-speed-dial.md-up md-fab-actions{flex-direction:column-reverse;order:1}md-fab-speed-dial.md-left{flex-direction:row}md-fab-speed-dial.md-left md-fab-trigger{order:2}md-fab-speed-dial.md-left md-fab-actions{flex-direction:row-reverse;order:1}md-fab-speed-dial.md-left md-fab-actions .md-fab-action-item{transition:all .3s cubic-bezier(.55,0,.55,.2)}md-fab-speed-dial.md-right{flex-direction:row}md-fab-speed-dial.md-right md-fab-trigger{order:1}md-fab-speed-dial.md-right md-fab-actions{flex-direction:row;order:2}md-fab-speed-dial.md-right md-fab-actions .md-fab-action-item{transition:all .3s cubic-bezier(.55,0,.55,.2)}md-fab-speed-dial.md-fling-remove .md-fab-action-item>*,md-fab-speed-dial.md-scale-remove .md-fab-action-item>*{visibility:hidden}md-fab-speed-dial.md-fling .md-fab-action-item{opacity:1}md-fab-speed-dial.md-fling.md-animations-waiting .md-fab-action-item{opacity:0;transition-duration:0s}md-fab-speed-dial.md-scale .md-fab-action-item{transform:scale(0);transition:all .3s cubic-bezier(.55,0,.55,.2);transition-duration:.1428571429s}md-fab-toolbar{display:block}md-fab-toolbar.md-fab-bottom-right{top:auto;right:20px;bottom:20px;left:auto;position:absolute}md-fab-toolbar.md-fab-bottom-left{top:auto;right:auto;bottom:20px;left:20px;position:absolute}md-fab-toolbar.md-fab-top-right{top:20px;right:20px;bottom:auto;left:auto;position:absolute}md-fab-toolbar.md-fab-top-left{top:20px;right:auto;bottom:auto;left:20px;position:absolute}md-fab-toolbar .md-fab-toolbar-wrapper{display:block;position:relative;overflow:hidden;height:68px}md-fab-toolbar md-fab-trigger{position:absolute;z-index:20}md-fab-toolbar md-fab-trigger button{overflow:visible!important}md-fab-toolbar md-fab-trigger .md-fab-toolbar-background{display:block;position:absolute;z-index:21;opacity:1;transition:all .3s cubic-bezier(.55,0,.55,.2)}md-fab-toolbar md-fab-trigger md-icon{position:relative;z-index:22;opacity:1;transition:all .2s ease-in}md-fab-toolbar.md-left md-fab-trigger{right:0}[dir=rtl] md-fab-toolbar.md-left md-fab-trigger{right:auto;left:0}md-fab-toolbar.md-left .md-toolbar-tools{flex-direction:row-reverse}md-fab-toolbar.md-left .md-toolbar-tools>.md-button:first-child{margin-right:.6rem}[dir=rtl] md-fab-toolbar.md-left .md-toolbar-tools>.md-button:first-child{margin-right:auto;margin-left:.6rem}md-fab-toolbar.md-left .md-toolbar-tools>.md-button:first-child{margin-left:-.8rem}[dir=rtl] md-fab-toolbar.md-left .md-toolbar-tools>.md-button:first-child{margin-left:auto;margin-right:-.8rem}md-fab-toolbar.md-left .md-toolbar-tools>.md-button:last-child{margin-right:8px}[dir=rtl] md-fab-toolbar.md-left .md-toolbar-tools>.md-button:last-child{margin-right:auto;margin-left:8px}md-fab-toolbar.md-right md-fab-trigger{left:0}[dir=rtl] md-fab-toolbar.md-right md-fab-trigger{left:auto;right:0}md-fab-toolbar.md-right .md-toolbar-tools{flex-direction:row}md-fab-toolbar md-toolbar{background-color:transparent!important;pointer-events:none;z-index:23}md-fab-toolbar md-toolbar .md-toolbar-tools{padding:0 20px;margin-top:3px}md-fab-toolbar md-toolbar .md-fab-action-item{opacity:0;transform:scale(0);transition:all .3s cubic-bezier(.55,0,.55,.2);transition-duration:.15s}md-fab-toolbar.md-is-open md-fab-trigger>button{box-shadow:none}md-fab-toolbar.md-is-open md-fab-trigger>button md-icon{opacity:0}md-fab-toolbar.md-is-open .md-fab-action-item{opacity:1;transform:scale(1)}md-grid-list{box-sizing:border-box;display:block;position:relative}md-grid-list md-grid-tile,md-grid-list md-grid-tile-footer,md-grid-list md-grid-tile-header,md-grid-list md-grid-tile>figure{box-sizing:border-box}md-grid-list md-grid-tile{display:block;position:absolute}md-grid-list md-grid-tile figure{display:flex;align-items:center;justify-content:center;height:100%;position:absolute;top:0;right:0;bottom:0;left:0;padding:0;margin:0}md-grid-list md-grid-tile md-grid-tile-footer,md-grid-list md-grid-tile md-grid-tile-header{display:flex;flex-direction:row;align-items:center;height:48px;color:#fff;background:rgba(0,0,0,.18);overflow:hidden;position:absolute;left:0;right:0}md-grid-list md-grid-tile md-grid-tile-footer h3,md-grid-list md-grid-tile md-grid-tile-footer h4,md-grid-list md-grid-tile md-grid-tile-header h3,md-grid-list md-grid-tile md-grid-tile-header h4{font-weight:400;margin:0 0 0 16px}md-grid-list md-grid-tile md-grid-tile-footer h3,md-grid-list md-grid-tile md-grid-tile-header h3{font-size:14px}md-grid-list md-grid-tile md-grid-tile-footer h4,md-grid-list md-grid-tile md-grid-tile-header h4{font-size:12px}md-grid-list md-grid-tile md-grid-tile-header{top:0}md-grid-list md-grid-tile md-grid-tile-footer{bottom:0}@media screen and (-ms-high-contrast:active){md-grid-tile{border:1px solid #fff}md-grid-tile-footer{border-top:1px solid #fff}}md-icon{margin:auto;background-repeat:no-repeat no-repeat;display:inline-block;vertical-align:middle;fill:currentColor;height:24px;width:24px;min-height:24px;min-width:24px}md-icon svg{pointer-events:none;display:block}md-icon[md-font-icon]{line-height:24px;width:auto}md-input-container{display:inline-block;position:relative;padding:2px;margin:18px 0;vertical-align:middle}md-input-container:after{content:'';display:table;clear:both}md-input-container.md-block{display:block}md-input-container .md-errors-spacer{float:right;min-height:24px;min-width:1px}[dir=rtl] md-input-container .md-errors-spacer{float:left}md-input-container>md-icon{position:absolute;top:8px;left:2px;right:auto}[dir=rtl] md-input-container>md-icon{left:auto}[dir=rtl] md-input-container>md-icon{right:2px}md-input-container input[type=color],md-input-container input[type=date],md-input-container input[type=datetime-local],md-input-container input[type=datetime],md-input-container input[type=email],md-input-container input[type=month],md-input-container input[type=number],md-input-container input[type=password],md-input-container input[type=search],md-input-container input[type=tel],md-input-container input[type=text],md-input-container input[type=time],md-input-container input[type=url],md-input-container input[type=week],md-input-container textarea{-moz-appearance:none;-webkit-appearance:none}md-input-container input[type=date],md-input-container input[type=datetime-local],md-input-container input[type=month],md-input-container input[type=time],md-input-container input[type=week]{min-height:26px}md-input-container textarea{resize:none;overflow:hidden}md-input-container textarea.md-input{min-height:26px;-ms-flex-preferred-size:auto}md-input-container textarea[md-no-autogrow]{height:auto;overflow:auto}md-input-container label:not(.md-container-ignore){position:absolute;bottom:100%;left:0;right:auto}[dir=rtl] md-input-container label:not(.md-container-ignore){left:auto}[dir=rtl] md-input-container label:not(.md-container-ignore){right:0}md-input-container label:not(.md-container-ignore).md-required:after{content:' *';font-size:13px;vertical-align:top}md-input-container .md-placeholder,md-input-container label:not(.md-no-float):not(.md-container-ignore){overflow:hidden;text-overflow:ellipsis;white-space:nowrap;width:100%;order:1;pointer-events:none;-webkit-font-smoothing:antialiased;padding-left:3px;padding-right:0;z-index:1;transform:translate3d(0,28px,0) scale(1);transition:transform .4s cubic-bezier(.25,.8,.25,1);max-width:100%;transform-origin:left top}[dir=rtl] md-input-container .md-placeholder,[dir=rtl] md-input-container label:not(.md-no-float):not(.md-container-ignore){padding-left:0}[dir=rtl] md-input-container .md-placeholder,[dir=rtl] md-input-container label:not(.md-no-float):not(.md-container-ignore){padding-right:3px}[dir=rtl] md-input-container .md-placeholder,[dir=rtl] md-input-container label:not(.md-no-float):not(.md-container-ignore){transform-origin:right top}md-input-container .md-placeholder{position:absolute;top:0;opacity:0;transition-property:opacity,transform;transform:translate3d(0,30px,0)}md-input-container.md-input-focused .md-placeholder{opacity:1;transform:translate3d(0,24px,0)}md-input-container.md-input-has-value .md-placeholder{transition:none;opacity:0}md-input-container:not(.md-input-has-value) input:not(:focus),md-input-container:not(.md-input-has-value) input:not(:focus)::-webkit-datetime-edit-ampm-field,md-input-container:not(.md-input-has-value) input:not(:focus)::-webkit-datetime-edit-day-field,md-input-container:not(.md-input-has-value) input:not(:focus)::-webkit-datetime-edit-hour-field,md-input-container:not(.md-input-has-value) input:not(:focus)::-webkit-datetime-edit-millisecond-field,md-input-container:not(.md-input-has-value) input:not(:focus)::-webkit-datetime-edit-minute-field,md-input-container:not(.md-input-has-value) input:not(:focus)::-webkit-datetime-edit-month-field,md-input-container:not(.md-input-has-value) input:not(:focus)::-webkit-datetime-edit-second-field,md-input-container:not(.md-input-has-value) input:not(:focus)::-webkit-datetime-edit-text,md-input-container:not(.md-input-has-value) input:not(:focus)::-webkit-datetime-edit-week-field,md-input-container:not(.md-input-has-value) input:not(:focus)::-webkit-datetime-edit-year-field{color:transparent}md-input-container .md-input{order:2;display:block;margin-top:0;background:0 0;padding-top:2px;padding-bottom:1px;padding-left:2px;padding-right:2px;border-width:0 0 1px 0;line-height:26px;height:30px;-ms-flex-preferred-size:26px;border-radius:0;border-style:solid;width:100%;box-sizing:border-box;float:left}[dir=rtl] md-input-container .md-input{float:right}md-input-container .md-input:focus{outline:0}md-input-container .md-input:invalid{outline:0;box-shadow:none}md-input-container .md-input.md-no-flex{flex:none!important}md-input-container .md-char-counter{text-align:right;padding-right:2px;padding-left:0}[dir=rtl] md-input-container .md-char-counter{text-align:left}[dir=rtl] md-input-container .md-char-counter{padding-right:0}[dir=rtl] md-input-container .md-char-counter{padding-left:2px}md-input-container .md-input-messages-animation{position:relative;order:4;overflow:hidden;clear:left}[dir=rtl] md-input-container .md-input-messages-animation{clear:right}md-input-container .md-input-messages-animation.ng-enter .md-input-message-animation{opacity:0;margin-top:-100px}md-input-container .md-char-counter,md-input-container .md-input-message-animation{font-size:12px;line-height:14px;overflow:hidden;transition:all .3s cubic-bezier(.55,0,.55,.2);opacity:1;margin-top:0;padding-top:5px}md-input-container .md-char-counter:not(.md-char-counter),md-input-container .md-input-message-animation:not(.md-char-counter){padding-right:5px;padding-left:0}[dir=rtl] md-input-container .md-char-counter:not(.md-char-counter),[dir=rtl] md-input-container .md-input-message-animation:not(.md-char-counter){padding-right:0}[dir=rtl] md-input-container .md-char-counter:not(.md-char-counter),[dir=rtl] md-input-container .md-input-message-animation:not(.md-char-counter){padding-left:5px}md-input-container:not(.md-input-invalid) .md-auto-hide .md-input-message-animation{opacity:0;margin-top:-100px}md-input-container .md-input-message-animation:not(.ng-animate){opacity:0;margin-top:-100px}md-input-container .md-input-message-animation.ng-enter{opacity:0;margin-top:-100px}md-input-container.md-input-focused label:not(.md-no-float),md-input-container.md-input-has-placeholder label:not(.md-no-float),md-input-container.md-input-has-value label:not(.md-no-float){transform:translate3d(0,6px,0) scale(.75);transition:transform cubic-bezier(.25,.8,.25,1) .4s,width cubic-bezier(.25,.8,.25,1) .4s}md-input-container.md-input-has-value label{transition:none}md-input-container .md-input.ng-invalid.ng-dirty,md-input-container.md-input-focused .md-input,md-input-container.md-input-resized .md-input{padding-bottom:0;border-width:0 0 2px 0}[disabled] md-input-container .md-input,md-input-container .md-input[disabled]{background-position:bottom -1px left 0;background-size:4px 1px;background-repeat:repeat-x}md-input-container.md-icon-float{transition:margin-top .4s cubic-bezier(.25,.8,.25,1)}md-input-container.md-icon-float>label{pointer-events:none;position:absolute}md-input-container.md-icon-float>md-icon{top:8px;left:2px;right:auto}[dir=rtl] md-input-container.md-icon-float>md-icon{left:auto}[dir=rtl] md-input-container.md-icon-float>md-icon{right:2px}md-input-container.md-icon-left>label .md-placeholder,md-input-container.md-icon-left>label:not(.md-no-float):not(.md-container-ignore),md-input-container.md-icon-right>label .md-placeholder,md-input-container.md-icon-right>label:not(.md-no-float):not(.md-container-ignore){width:calc(100% - 36px - 18px)}md-input-container.md-icon-left{padding-left:36px;padding-right:0}[dir=rtl] md-input-container.md-icon-left{padding-left:0}[dir=rtl] md-input-container.md-icon-left{padding-right:36px}md-input-container.md-icon-left>label{left:36px;right:auto}[dir=rtl] md-input-container.md-icon-left>label{left:auto}[dir=rtl] md-input-container.md-icon-left>label{right:36px}md-input-container.md-icon-right{padding-left:0;padding-right:36px}[dir=rtl] md-input-container.md-icon-right{padding-left:36px}[dir=rtl] md-input-container.md-icon-right{padding-right:0}md-input-container.md-icon-right>md-icon:last-of-type{margin:0;right:2px;left:auto}[dir=rtl] md-input-container.md-icon-right>md-icon:last-of-type{right:auto}[dir=rtl] md-input-container.md-icon-right>md-icon:last-of-type{left:2px}md-input-container.md-icon-left.md-icon-right{padding-left:36px;padding-right:36px}md-input-container.md-icon-left.md-icon-right>label .md-placeholder,md-input-container.md-icon-left.md-icon-right>label:not(.md-no-float):not(.md-container-ignore){width:calc(100% - (36px * 2))}.md-resize-wrapper{position:relative}.md-resize-wrapper:after{content:'';display:table;clear:both}.md-resize-handle{position:absolute;bottom:-5px;left:0;height:10px;background:0 0;width:100%;cursor:ns-resize}@media screen and (-ms-high-contrast:active){md-input-container.md-default-theme>md-icon{fill:#fff}}md-list{display:block;padding:8px 0 8px 0}md-list .md-subheader{font-size:14px;font-weight:500;letter-spacing:.010em;line-height:1.2em}md-list.md-dense md-list-item,md-list.md-dense md-list-item .md-list-item-inner{min-height:48px}md-list.md-dense md-list-item .md-list-item-inner::before,md-list.md-dense md-list-item::before{content:'';min-height:48px;visibility:hidden;display:inline-block}md-list.md-dense md-list-item .md-list-item-inner md-icon:first-child,md-list.md-dense md-list-item md-icon:first-child{width:20px;height:20px}md-list.md-dense md-list-item .md-list-item-inner>md-icon:first-child:not(.md-avatar-icon),md-list.md-dense md-list-item>md-icon:first-child:not(.md-avatar-icon){margin-right:36px}[dir=rtl] md-list.md-dense md-list-item .md-list-item-inner>md-icon:first-child:not(.md-avatar-icon),[dir=rtl] md-list.md-dense md-list-item>md-icon:first-child:not(.md-avatar-icon){margin-right:auto;margin-left:36px}md-list.md-dense md-list-item .md-avatar,md-list.md-dense md-list-item .md-avatar-icon,md-list.md-dense md-list-item .md-list-item-inner .md-avatar,md-list.md-dense md-list-item .md-list-item-inner .md-avatar-icon{margin-right:20px}[dir=rtl] md-list.md-dense md-list-item .md-avatar,[dir=rtl] md-list.md-dense md-list-item .md-avatar-icon,[dir=rtl] md-list.md-dense md-list-item .md-list-item-inner .md-avatar,[dir=rtl] md-list.md-dense md-list-item .md-list-item-inner .md-avatar-icon{margin-right:auto;margin-left:20px}md-list.md-dense md-list-item .md-avatar,md-list.md-dense md-list-item .md-list-item-inner .md-avatar{flex:none;width:36px;height:36px}md-list.md-dense md-list-item.md-2-line .md-list-item-text.md-offset,md-list.md-dense md-list-item.md-2-line>.md-no-style .md-list-item-text.md-offset,md-list.md-dense md-list-item.md-3-line .md-list-item-text.md-offset,md-list.md-dense md-list-item.md-3-line>.md-no-style .md-list-item-text.md-offset{margin-left:56px}[dir=rtl] md-list.md-dense md-list-item.md-2-line .md-list-item-text.md-offset,[dir=rtl] md-list.md-dense md-list-item.md-2-line>.md-no-style .md-list-item-text.md-offset,[dir=rtl] md-list.md-dense md-list-item.md-3-line .md-list-item-text.md-offset,[dir=rtl] md-list.md-dense md-list-item.md-3-line>.md-no-style .md-list-item-text.md-offset{margin-left:auto;margin-right:56px}md-list.md-dense md-list-item.md-2-line .md-list-item-text h3,md-list.md-dense md-list-item.md-2-line .md-list-item-text h4,md-list.md-dense md-list-item.md-2-line .md-list-item-text p,md-list.md-dense md-list-item.md-2-line>.md-no-style .md-list-item-text h3,md-list.md-dense md-list-item.md-2-line>.md-no-style .md-list-item-text h4,md-list.md-dense md-list-item.md-2-line>.md-no-style .md-list-item-text p,md-list.md-dense md-list-item.md-3-line .md-list-item-text h3,md-list.md-dense md-list-item.md-3-line .md-list-item-text h4,md-list.md-dense md-list-item.md-3-line .md-list-item-text p,md-list.md-dense md-list-item.md-3-line>.md-no-style .md-list-item-text h3,md-list.md-dense md-list-item.md-3-line>.md-no-style .md-list-item-text h4,md-list.md-dense md-list-item.md-3-line>.md-no-style .md-list-item-text p{line-height:1.05;font-size:12px}md-list.md-dense md-list-item.md-2-line .md-list-item-text h3,md-list.md-dense md-list-item.md-2-line>.md-no-style .md-list-item-text h3,md-list.md-dense md-list-item.md-3-line .md-list-item-text h3,md-list.md-dense md-list-item.md-3-line>.md-no-style .md-list-item-text h3{font-size:13px}md-list.md-dense md-list-item.md-2-line,md-list.md-dense md-list-item.md-2-line>.md-no-style{min-height:60px}md-list.md-dense md-list-item.md-2-line::before,md-list.md-dense md-list-item.md-2-line>.md-no-style::before{content:'';min-height:60px;visibility:hidden;display:inline-block}md-list.md-dense md-list-item.md-2-line .md-avatar-icon,md-list.md-dense md-list-item.md-2-line>.md-avatar,md-list.md-dense md-list-item.md-2-line>.md-no-style .md-avatar-icon,md-list.md-dense md-list-item.md-2-line>.md-no-style>.md-avatar{margin-top:12px}md-list.md-dense md-list-item.md-3-line,md-list.md-dense md-list-item.md-3-line>.md-no-style{min-height:76px}md-list.md-dense md-list-item.md-3-line::before,md-list.md-dense md-list-item.md-3-line>.md-no-style::before{content:'';min-height:76px;visibility:hidden;display:inline-block}md-list.md-dense md-list-item.md-3-line>.md-avatar,md-list.md-dense md-list-item.md-3-line>.md-no-style>.md-avatar,md-list.md-dense md-list-item.md-3-line>.md-no-style>md-icon:first-child,md-list.md-dense md-list-item.md-3-line>md-icon:first-child{margin-top:16px}md-list-item{position:relative}md-list-item.md-proxy-focus.md-focused .md-no-style{transition:background-color .15s linear}md-list-item._md-button-wrap{position:relative}md-list-item._md-button-wrap>div.md-button:first-child{display:flex;align-items:center;justify-content:flex-start;padding:0 16px;margin:0;font-weight:400;text-align:left;border:medium none}[dir=rtl] md-list-item._md-button-wrap>div.md-button:first-child{text-align:right}md-list-item._md-button-wrap>div.md-button:first-child>.md-button:first-child{position:absolute;top:0;left:0;height:100%;margin:0;padding:0}md-list-item._md-button-wrap>div.md-button:first-child .md-list-item-inner{width:100%;min-height:inherit}md-list-item .md-no-style,md-list-item.md-no-proxy{position:relative;padding:0 16px;flex:1 1 auto}md-list-item .md-no-style.md-button,md-list-item.md-no-proxy.md-button{font-size:inherit;height:inherit;text-align:left;text-transform:none;width:100%;white-space:normal;flex-direction:inherit;align-items:inherit;border-radius:0;margin:0}[dir=rtl] md-list-item .md-no-style.md-button,[dir=rtl] md-list-item.md-no-proxy.md-button{text-align:right}md-list-item .md-no-style.md-button>.md-ripple-container,md-list-item.md-no-proxy.md-button>.md-ripple-container{border-radius:0}md-list-item .md-no-style:focus,md-list-item.md-no-proxy:focus{outline:0}md-list-item.md-clickable:hover{cursor:pointer}md-list-item md-divider{position:absolute;bottom:0;left:0;width:100%}[dir=rtl] md-list-item md-divider{left:auto;right:0}md-list-item md-divider[md-inset]{left:72px;width:calc(100% - 72px);margin:0!important}[dir=rtl] md-list-item md-divider[md-inset]{left:auto;right:72px}md-list-item,md-list-item .md-list-item-inner{display:flex;justify-content:flex-start;align-items:center;min-height:48px;height:auto}md-list-item .md-list-item-inner::before,md-list-item::before{content:'';min-height:48px;visibility:hidden;display:inline-block}md-list-item .md-list-item-inner>div.md-primary>md-icon:not(.md-avatar-icon),md-list-item .md-list-item-inner>div.md-secondary>md-icon:not(.md-avatar-icon),md-list-item .md-list-item-inner>md-icon.md-secondary:not(.md-avatar-icon),md-list-item .md-list-item-inner>md-icon:first-child:not(.md-avatar-icon),md-list-item>div.md-primary>md-icon:not(.md-avatar-icon),md-list-item>div.md-secondary>md-icon:not(.md-avatar-icon),md-list-item>md-icon.md-secondary:not(.md-avatar-icon),md-list-item>md-icon:first-child:not(.md-avatar-icon){width:24px;margin-top:16px;margin-bottom:12px;box-sizing:content-box}md-list-item .md-list-item-inner md-checkbox.md-secondary,md-list-item .md-list-item-inner>div.md-primary>md-checkbox,md-list-item .md-list-item-inner>div.md-secondary>md-checkbox,md-list-item .md-list-item-inner>md-checkbox,md-list-item md-checkbox.md-secondary,md-list-item>div.md-primary>md-checkbox,md-list-item>div.md-secondary>md-checkbox,md-list-item>md-checkbox{align-self:center}md-list-item .md-list-item-inner md-checkbox.md-secondary .md-label,md-list-item .md-list-item-inner>div.md-primary>md-checkbox .md-label,md-list-item .md-list-item-inner>div.md-secondary>md-checkbox .md-label,md-list-item .md-list-item-inner>md-checkbox .md-label,md-list-item md-checkbox.md-secondary .md-label,md-list-item>div.md-primary>md-checkbox .md-label,md-list-item>div.md-secondary>md-checkbox .md-label,md-list-item>md-checkbox .md-label{display:none}md-list-item .md-list-item-inner>md-icon:first-child:not(.md-avatar-icon),md-list-item>md-icon:first-child:not(.md-avatar-icon){margin-right:32px}[dir=rtl] md-list-item .md-list-item-inner>md-icon:first-child:not(.md-avatar-icon),[dir=rtl] md-list-item>md-icon:first-child:not(.md-avatar-icon){margin-right:auto;margin-left:32px}md-list-item .md-avatar,md-list-item .md-avatar-icon,md-list-item .md-list-item-inner .md-avatar,md-list-item .md-list-item-inner .md-avatar-icon{margin-top:8px;margin-bottom:8px;margin-right:16px;border-radius:50%;box-sizing:content-box}[dir=rtl] md-list-item .md-avatar,[dir=rtl] md-list-item .md-avatar-icon,[dir=rtl] md-list-item .md-list-item-inner .md-avatar,[dir=rtl] md-list-item .md-list-item-inner .md-avatar-icon{margin-right:auto;margin-left:16px}md-list-item .md-avatar,md-list-item .md-list-item-inner .md-avatar{flex:none;width:40px;height:40px}md-list-item .md-avatar-icon,md-list-item .md-list-item-inner .md-avatar-icon{padding:8px}md-list-item .md-avatar-icon svg,md-list-item .md-list-item-inner .md-avatar-icon svg{width:24px;height:24px}md-list-item .md-list-item-inner>md-checkbox,md-list-item>md-checkbox{width:24px;margin-left:3px;margin-right:29px;margin-top:16px}[dir=rtl] md-list-item .md-list-item-inner>md-checkbox,[dir=rtl] md-list-item>md-checkbox{margin-left:29px}[dir=rtl] md-list-item .md-list-item-inner>md-checkbox,[dir=rtl] md-list-item>md-checkbox{margin-right:3px}md-list-item .md-list-item-inner .md-secondary-container,md-list-item .md-secondary-container{display:flex;align-items:center;flex-shrink:0;margin:auto;margin-right:0;margin-left:auto}[dir=rtl] md-list-item .md-list-item-inner .md-secondary-container,[dir=rtl] md-list-item .md-secondary-container{margin-right:auto}[dir=rtl] md-list-item .md-list-item-inner .md-secondary-container,[dir=rtl] md-list-item .md-secondary-container{margin-left:0}md-list-item .md-list-item-inner .md-secondary-container .md-button:last-of-type,md-list-item .md-list-item-inner .md-secondary-container .md-icon-button:last-of-type,md-list-item .md-secondary-container .md-button:last-of-type,md-list-item .md-secondary-container .md-icon-button:last-of-type{margin-right:0}[dir=rtl] md-list-item .md-list-item-inner .md-secondary-container .md-button:last-of-type,[dir=rtl] md-list-item .md-list-item-inner .md-secondary-container .md-icon-button:last-of-type,[dir=rtl] md-list-item .md-secondary-container .md-button:last-of-type,[dir=rtl] md-list-item .md-secondary-container .md-icon-button:last-of-type{margin-right:auto;margin-left:0}md-list-item .md-list-item-inner .md-secondary-container md-checkbox,md-list-item .md-secondary-container md-checkbox{margin-top:0;margin-bottom:0}md-list-item .md-list-item-inner .md-secondary-container md-checkbox:last-child,md-list-item .md-secondary-container md-checkbox:last-child{width:24px;margin-right:0}[dir=rtl] md-list-item .md-list-item-inner .md-secondary-container md-checkbox:last-child,[dir=rtl] md-list-item .md-secondary-container md-checkbox:last-child{margin-right:auto;margin-left:0}md-list-item .md-list-item-inner .md-secondary-container md-switch,md-list-item .md-secondary-container md-switch{margin-top:0;margin-bottom:0;margin-right:-6px}[dir=rtl] md-list-item .md-list-item-inner .md-secondary-container md-switch,[dir=rtl] md-list-item .md-secondary-container md-switch{margin-right:auto;margin-left:-6px}md-list-item .md-list-item-inner>.md-list-item-inner>p,md-list-item .md-list-item-inner>p,md-list-item>.md-list-item-inner>p,md-list-item>p{flex:1 1 auto;margin:0}md-list-item.md-2-line,md-list-item.md-2-line>.md-no-style,md-list-item.md-3-line,md-list-item.md-3-line>.md-no-style{align-items:flex-start;justify-content:center}md-list-item.md-2-line.md-long-text,md-list-item.md-2-line>.md-no-style.md-long-text,md-list-item.md-3-line.md-long-text,md-list-item.md-3-line>.md-no-style.md-long-text{margin-top:8px;margin-bottom:8px}md-list-item.md-2-line .md-list-item-text,md-list-item.md-2-line>.md-no-style .md-list-item-text,md-list-item.md-3-line .md-list-item-text,md-list-item.md-3-line>.md-no-style .md-list-item-text{flex:1 1 auto;margin:auto;text-overflow:ellipsis;overflow:hidden}md-list-item.md-2-line .md-list-item-text.md-offset,md-list-item.md-2-line>.md-no-style .md-list-item-text.md-offset,md-list-item.md-3-line .md-list-item-text.md-offset,md-list-item.md-3-line>.md-no-style .md-list-item-text.md-offset{margin-left:56px}[dir=rtl] md-list-item.md-2-line .md-list-item-text.md-offset,[dir=rtl] md-list-item.md-2-line>.md-no-style .md-list-item-text.md-offset,[dir=rtl] md-list-item.md-3-line .md-list-item-text.md-offset,[dir=rtl] md-list-item.md-3-line>.md-no-style .md-list-item-text.md-offset{margin-left:auto;margin-right:56px}md-list-item.md-2-line .md-list-item-text h3,md-list-item.md-2-line>.md-no-style .md-list-item-text h3,md-list-item.md-3-line .md-list-item-text h3,md-list-item.md-3-line>.md-no-style .md-list-item-text h3{font-size:16px;font-weight:400;letter-spacing:.010em;margin:0;line-height:1.2em;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}md-list-item.md-2-line .md-list-item-text h4,md-list-item.md-2-line>.md-no-style .md-list-item-text h4,md-list-item.md-3-line .md-list-item-text h4,md-list-item.md-3-line>.md-no-style .md-list-item-text h4{font-size:14px;letter-spacing:.010em;margin:3px 0 1px 0;font-weight:400;line-height:1.2em;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}md-list-item.md-2-line .md-list-item-text p,md-list-item.md-2-line>.md-no-style .md-list-item-text p,md-list-item.md-3-line .md-list-item-text p,md-list-item.md-3-line>.md-no-style .md-list-item-text p{font-size:14px;font-weight:500;letter-spacing:.010em;margin:0;line-height:1.6em}md-list-item.md-2-line,md-list-item.md-2-line>.md-no-style{height:auto;min-height:72px}md-list-item.md-2-line::before,md-list-item.md-2-line>.md-no-style::before{content:'';min-height:72px;visibility:hidden;display:inline-block}md-list-item.md-2-line .md-avatar-icon,md-list-item.md-2-line>.md-avatar,md-list-item.md-2-line>.md-no-style .md-avatar-icon,md-list-item.md-2-line>.md-no-style>.md-avatar{margin-top:12px}md-list-item.md-2-line>.md-no-style>md-icon:first-child,md-list-item.md-2-line>md-icon:first-child{align-self:flex-start}md-list-item.md-2-line .md-list-item-text,md-list-item.md-2-line>.md-no-style .md-list-item-text{flex:1 1 auto}md-list-item.md-3-line,md-list-item.md-3-line>.md-no-style{height:auto;min-height:88px}md-list-item.md-3-line::before,md-list-item.md-3-line>.md-no-style::before{content:'';min-height:88px;visibility:hidden;display:inline-block}md-list-item.md-3-line>.md-avatar,md-list-item.md-3-line>.md-no-style>.md-avatar,md-list-item.md-3-line>.md-no-style>md-icon:first-child,md-list-item.md-3-line>md-icon:first-child{margin-top:16px}.md-open-menu-container{position:fixed;left:0;top:0;z-index:100;opacity:0;border-radius:2px}.md-open-menu-container md-menu-divider{margin-top:4px;margin-bottom:4px;height:1px;min-height:1px;max-height:1px;width:100%}.md-open-menu-container md-menu-content>*{opacity:0}.md-open-menu-container:not(.md-clickable){pointer-events:none}.md-open-menu-container.md-active{opacity:1;transition:all .4s cubic-bezier(.25,.8,.25,1);transition-duration:.2s}.md-open-menu-container.md-active>md-menu-content>*{opacity:1;transition:all .3s cubic-bezier(.55,0,.55,.2);transition-duration:.2s;transition-delay:.1s}.md-open-menu-container.md-leave{opacity:0;transition:all .3s cubic-bezier(.55,0,.55,.2);transition-duration:250ms}md-menu-content{display:flex;flex-direction:column;padding:8px 0;max-height:304px;overflow-y:auto}md-menu-content.md-dense{max-height:208px}md-menu-content.md-dense md-menu-item{height:32px;min-height:0}md-menu-item{display:flex;flex-direction:row;min-height:48px;height:48px;align-content:center;justify-content:flex-start}md-menu-item>*{width:100%;margin:auto 0;padding-left:16px;padding-right:16px}md-menu-item>a.md-button{padding-top:5px}md-menu-item>.md-button{text-align:left;display:inline-block;border-radius:0;margin:auto 0;font-size:15px;text-transform:none;font-weight:400;height:100%;padding-left:16px;padding-right:16px;width:100%}md-menu-item>.md-button::-moz-focus-inner{padding:0;border:0}[dir=rtl] md-menu-item>.md-button{text-align:right}md-menu-item>.md-button md-icon{margin:auto 16px auto 0}[dir=rtl] md-menu-item>.md-button md-icon{margin:auto 0 auto 16px}md-menu-item>.md-button p{display:inline-block;margin:auto}md-menu-item>.md-button span{margin-top:auto;margin-bottom:auto}md-menu-item>.md-button .md-ripple-container{border-radius:inherit}md-toolbar .md-menu{height:auto;margin:auto;padding:0}@media (max-width:959px){md-menu-content{min-width:112px}md-menu-content[width="3"]{min-width:168px}md-menu-content[width="4"]{min-width:224px}md-menu-content[width="5"]{min-width:280px}md-menu-content[width="6"]{min-width:336px}md-menu-content[width="7"]{min-width:392px}}@media (min-width:960px){md-menu-content{min-width:96px}md-menu-content[width="3"]{min-width:192px}md-menu-content[width="4"]{min-width:256px}md-menu-content[width="5"]{min-width:320px}md-menu-content[width="6"]{min-width:384px}md-menu-content[width="7"]{min-width:448px}}md-toolbar.md-menu-toolbar h2.md-toolbar-tools{line-height:1rem;height:auto;padding:28px;padding-bottom:12px}md-toolbar.md-has-open-menu{position:relative;z-index:100}md-menu-bar{padding:0 20px;display:block;position:relative;z-index:2}md-menu-bar .md-menu{display:inline-block;padding:0;position:relative}md-menu-bar button{font-size:14px;padding:0 10px;margin:0;border:0;background-color:transparent;height:40px}md-menu-bar md-backdrop.md-menu-backdrop{z-index:-2}md-menu-content.md-menu-bar-menu.md-dense{max-height:none;padding:16px 0}md-menu-content.md-menu-bar-menu.md-dense md-menu-item.md-indent{position:relative}md-menu-content.md-menu-bar-menu.md-dense md-menu-item.md-indent>md-icon{position:absolute;padding:0;width:24px;top:6px;left:24px}[dir=rtl] md-menu-content.md-menu-bar-menu.md-dense md-menu-item.md-indent>md-icon{left:auto;right:24px}md-menu-content.md-menu-bar-menu.md-dense md-menu-item.md-indent .md-menu>.md-button,md-menu-content.md-menu-bar-menu.md-dense md-menu-item.md-indent>.md-button{padding:0 32px 0 64px}[dir=rtl] md-menu-content.md-menu-bar-menu.md-dense md-menu-item.md-indent .md-menu>.md-button,[dir=rtl] md-menu-content.md-menu-bar-menu.md-dense md-menu-item.md-indent>.md-button{padding:0 64px 0 32px}md-menu-content.md-menu-bar-menu.md-dense .md-button{min-height:0;height:32px;display:flex}md-menu-content.md-menu-bar-menu.md-dense .md-button span{flex-grow:1}md-menu-content.md-menu-bar-menu.md-dense .md-button span.md-alt-text{flex-grow:0;align-self:flex-end;margin:0 8px}md-menu-content.md-menu-bar-menu.md-dense md-menu-divider{margin:8px 0}md-menu-content.md-menu-bar-menu.md-dense .md-menu>.md-button,md-menu-content.md-menu-bar-menu.md-dense md-menu-item>.md-button{text-align:left}[dir=rtl] md-menu-content.md-menu-bar-menu.md-dense .md-menu>.md-button,[dir=rtl] md-menu-content.md-menu-bar-menu.md-dense md-menu-item>.md-button{text-align:right}md-menu-content.md-menu-bar-menu.md-dense .md-menu{padding:0}md-menu-content.md-menu-bar-menu.md-dense .md-menu>.md-button{position:relative;margin:0;width:100%;text-transform:none;font-weight:400;border-radius:0;padding-left:16px}[dir=rtl] md-menu-content.md-menu-bar-menu.md-dense .md-menu>.md-button{padding-left:0;padding-right:16px}md-menu-content.md-menu-bar-menu.md-dense .md-menu>.md-button:after{display:block;content:'\25BC';position:absolute;top:0;speak:none;transform:rotate(270deg) scaleY(.45) scaleX(.9);right:28px}[dir=rtl] md-menu-content.md-menu-bar-menu.md-dense .md-menu>.md-button:after{transform:rotate(90deg) scaleY(.45) scaleX(.9)}[dir=rtl] md-menu-content.md-menu-bar-menu.md-dense .md-menu>.md-button:after{right:auto;left:28px}.md-nav-bar{border-style:solid;border-width:0 0 1px;height:48px;position:relative}._md-nav-bar-list{outline:0;list-style:none;margin:0;padding:0;box-sizing:border-box;display:flex;flex-direction:row}.md-nav-item:first-of-type{margin-left:8px}.md-button._md-nav-button{line-height:24px;margin:0 4px;padding:12px 16px;transition:background-color .35s cubic-bezier(.35,0,.25,1)}.md-button._md-nav-button:focus{outline:0}.md-button._md-nav-button:hover{background-color:inherit}md-nav-ink-bar{bottom:0;height:2px;left:auto;position:absolute;right:auto;background-color:#000}md-nav-ink-bar._md-left{transition:left 125ms cubic-bezier(.35,0,.25,1),right .25s cubic-bezier(.35,0,.25,1)}md-nav-ink-bar._md-right{transition:left .25s cubic-bezier(.35,0,.25,1),right 125ms cubic-bezier(.35,0,.25,1)}md-nav-extra-content{min-height:48px;padding-right:12px}.md-panel-outer-wrapper{height:100%;left:0;position:absolute;top:0;width:100%}._md-panel-hidden{display:none}._md-panel-fullscreen{border-radius:0;left:0;min-height:100%;min-width:100%;position:fixed;top:0}._md-panel-shown .md-panel{opacity:1;transition:none}.md-panel{opacity:0;position:fixed}.md-panel._md-panel-shown{opacity:1;transition:none}.md-panel._md-panel-animate-enter{opacity:1;transition:all .3s cubic-bezier(0,0,.2,1)}.md-panel._md-panel-animate-leave{opacity:1;transition:all .3s cubic-bezier(.4,0,1,1)}.md-panel._md-panel-animate-fade-out,.md-panel._md-panel-animate-scale-out{opacity:0}.md-panel._md-panel-backdrop{height:100%;position:absolute;width:100%}.md-panel._md-opaque-enter{opacity:.48;transition:opacity .3s cubic-bezier(0,0,.2,1)}.md-panel._md-opaque-leave{transition:opacity .3s cubic-bezier(.4,0,1,1)}@keyframes indeterminate-rotate{0%{transform:rotate(0)}100%{transform:rotate(360deg)}}md-progress-circular{position:relative;display:block}md-progress-circular._md-progress-circular-disabled{visibility:hidden}md-progress-circular.md-mode-indeterminate svg{animation:indeterminate-rotate 2.9s linear infinite}md-progress-circular svg{position:absolute;overflow:visible;top:0;left:0}md-progress-linear{display:block;position:relative;width:100%;height:5px;padding-top:0!important;margin-bottom:0!important}md-progress-linear._md-progress-linear-disabled{visibility:hidden}md-progress-linear .md-container{display:block;position:relative;overflow:hidden;width:100%;height:5px;transform:translate(0,0) scale(1,1)}md-progress-linear .md-container .md-bar{position:absolute;left:0;top:0;bottom:0;width:100%;height:5px}md-progress-linear .md-container .md-dashed:before{content:"";display:none;position:absolute;margin-top:0;height:5px;width:100%;background-color:transparent;background-size:10px 10px!important;background-position:0 -23px}md-progress-linear .md-container .md-bar1,md-progress-linear .md-container .md-bar2{transition:transform .2s linear}md-progress-linear .md-container.md-mode-query .md-bar1{display:none}md-progress-linear .md-container.md-mode-query .md-bar2{transition:all .2s linear;animation:query .8s infinite cubic-bezier(.39,.575,.565,1)}md-progress-linear .md-container.md-mode-determinate .md-bar1{display:none}md-progress-linear .md-container.md-mode-indeterminate .md-bar1{animation:md-progress-linear-indeterminate-scale-1 4s infinite,md-progress-linear-indeterminate-1 4s infinite}md-progress-linear .md-container.md-mode-indeterminate .md-bar2{animation:md-progress-linear-indeterminate-scale-2 4s infinite,md-progress-linear-indeterminate-2 4s infinite}md-progress-linear .md-container.ng-hide ._md-progress-linear-disabled md-progress-linear .md-container{animation:none}md-progress-linear .md-container.ng-hide ._md-progress-linear-disabled md-progress-linear .md-container .md-bar1{animation-name:none}md-progress-linear .md-container.ng-hide ._md-progress-linear-disabled md-progress-linear .md-container .md-bar2{animation-name:none}md-progress-linear .md-container.md-mode-buffer{background-color:transparent!important;transition:all .2s linear}md-progress-linear .md-container.md-mode-buffer .md-dashed:before{display:block;animation:buffer 3s infinite linear}@keyframes query{0%{opacity:1;transform:translateX(35%) scale(.3,1)}100%{opacity:0;transform:translateX(-50%) scale(0,1)}}@keyframes buffer{0%{opacity:1;background-position:0 -23px}50%{opacity:0}100%{opacity:1;background-position:-200px -23px}}@keyframes md-progress-linear-indeterminate-scale-1{0%{transform:scaleX(.1);animation-timing-function:linear}36.6%{transform:scaleX(.1);animation-timing-function:cubic-bezier(.334731432,.124819821,.785843996,1)}69.15%{transform:scaleX(.83);animation-timing-function:cubic-bezier(.225732004,0,.233648906,1.3709798)}100%{transform:scaleX(.1)}}@keyframes md-progress-linear-indeterminate-1{0%{left:-105.166666667%;animation-timing-function:linear}20%{left:-105.166666667%;animation-timing-function:cubic-bezier(.5,0,.701732,.495818703)}69.15%{left:21.5%;animation-timing-function:cubic-bezier(.302435,.38135197,.55,.956352125)}100%{left:95.4444444444%}}@keyframes md-progress-linear-indeterminate-scale-2{0%{transform:scaleX(.1);animation-timing-function:cubic-bezier(.205028172,.057050836,.57660995,.453970841)}19.15%{transform:scaleX(.57);animation-timing-function:cubic-bezier(.152312994,.196431957,.648373778,1.00431535)}44.15%{transform:scaleX(.91);animation-timing-function:cubic-bezier(.25775882,-.003163357,.211761916,1.38178961)}100%{transform:scaleX(.1)}}@keyframes md-progress-linear-indeterminate-2{0%{left:-54.8888888889%;animation-timing-function:cubic-bezier(.15,0,.5150584,.409684966)}25%{left:-17.25%;animation-timing-function:cubic-bezier(.3103299,.284057684,.8,.733718979)}48.35%{left:29.5%;animation-timing-function:cubic-bezier(.4,.627034903,.6,.902025796)}100%{left:117.388888889%}}md-radio-button{box-sizing:border-box;display:block;margin-bottom:16px;white-space:nowrap;cursor:pointer;position:relative}md-radio-button[disabled]{cursor:default}md-radio-button[disabled] .md-container{cursor:default}md-radio-button .md-container{position:absolute;top:50%;transform:translateY(-50%);box-sizing:border-box;display:inline-block;width:20px;height:20px;cursor:pointer;left:0;right:auto}[dir=rtl] md-radio-button .md-container{left:auto}[dir=rtl] md-radio-button .md-container{right:0}md-radio-button .md-container .md-ripple-container{position:absolute;display:block;width:auto;height:auto;left:-15px;top:-15px;right:-15px;bottom:-15px}md-radio-button .md-container:before{box-sizing:border-box;background-color:transparent;border-radius:50%;content:'';position:absolute;display:block;height:auto;left:0;top:0;right:0;bottom:0;transition:all .5s;width:auto}md-radio-button.md-align-top-left>div.md-container{top:12px}md-radio-button .md-off{box-sizing:border-box;position:absolute;top:0;left:0;width:20px;height:20px;border-style:solid;border-width:2px;border-radius:50%;transition:border-color ease .28s}md-radio-button .md-on{box-sizing:border-box;position:absolute;top:0;left:0;width:20px;height:20px;border-radius:50%;transition:transform ease .28s;transform:scale(0)}md-radio-button.md-checked .md-on{transform:scale(.5)}md-radio-button .md-label{box-sizing:border-box;position:relative;display:inline-block;margin-left:30px;margin-right:0;vertical-align:middle;white-space:normal;pointer-events:none;width:auto}[dir=rtl] md-radio-button .md-label{margin-left:0}[dir=rtl] md-radio-button .md-label{margin-right:30px}md-radio-group.layout-column md-radio-button,md-radio-group.layout-gt-lg-column md-radio-button,md-radio-group.layout-gt-md-column md-radio-button,md-radio-group.layout-gt-sm-column md-radio-button,md-radio-group.layout-gt-xs-column md-radio-button,md-radio-group.layout-lg-column md-radio-button,md-radio-group.layout-md-column md-radio-button,md-radio-group.layout-sm-column md-radio-button,md-radio-group.layout-xl-column md-radio-button,md-radio-group.layout-xs-column md-radio-button{margin-bottom:16px}md-radio-group.layout-gt-lg-row md-radio-button,md-radio-group.layout-gt-md-row md-radio-button,md-radio-group.layout-gt-sm-row md-radio-button,md-radio-group.layout-gt-xs-row md-radio-button,md-radio-group.layout-lg-row md-radio-button,md-radio-group.layout-md-row md-radio-button,md-radio-group.layout-row md-radio-button,md-radio-group.layout-sm-row md-radio-button,md-radio-group.layout-xl-row md-radio-button,md-radio-group.layout-xs-row md-radio-button{margin-top:0;margin-bottom:0;margin-left:0;margin-right:16px}[dir=rtl] md-radio-group.layout-gt-lg-row md-radio-button,[dir=rtl] md-radio-group.layout-gt-md-row md-radio-button,[dir=rtl] md-radio-group.layout-gt-sm-row md-radio-button,[dir=rtl] md-radio-group.layout-gt-xs-row md-radio-button,[dir=rtl] md-radio-group.layout-lg-row md-radio-button,[dir=rtl] md-radio-group.layout-md-row md-radio-button,[dir=rtl] md-radio-group.layout-row md-radio-button,[dir=rtl] md-radio-group.layout-sm-row md-radio-button,[dir=rtl] md-radio-group.layout-xl-row md-radio-button,[dir=rtl] md-radio-group.layout-xs-row md-radio-button{margin-left:16px}[dir=rtl] md-radio-group.layout-gt-lg-row md-radio-button,[dir=rtl] md-radio-group.layout-gt-md-row md-radio-button,[dir=rtl] md-radio-group.layout-gt-sm-row md-radio-button,[dir=rtl] md-radio-group.layout-gt-xs-row md-radio-button,[dir=rtl] md-radio-group.layout-lg-row md-radio-button,[dir=rtl] md-radio-group.layout-md-row md-radio-button,[dir=rtl] md-radio-group.layout-row md-radio-button,[dir=rtl] md-radio-group.layout-sm-row md-radio-button,[dir=rtl] md-radio-group.layout-xl-row md-radio-button,[dir=rtl] md-radio-group.layout-xs-row md-radio-button{margin-right:0}md-radio-group.layout-gt-lg-row md-radio-button:last-of-type,md-radio-group.layout-gt-md-row md-radio-button:last-of-type,md-radio-group.layout-gt-sm-row md-radio-button:last-of-type,md-radio-group.layout-gt-xs-row md-radio-button:last-of-type,md-radio-group.layout-lg-row md-radio-button:last-of-type,md-radio-group.layout-md-row md-radio-button:last-of-type,md-radio-group.layout-row md-radio-button:last-of-type,md-radio-group.layout-sm-row md-radio-button:last-of-type,md-radio-group.layout-xl-row md-radio-button:last-of-type,md-radio-group.layout-xs-row md-radio-button:last-of-type{margin-left:0;margin-right:0}md-radio-group:focus{outline:0}md-radio-group.md-focused .md-checked .md-container:before{left:-8px;top:-8px;right:-8px;bottom:-8px}md-radio-group[disabled] md-radio-button{cursor:default}md-radio-group[disabled] md-radio-button .md-container{cursor:default}.md-inline-form md-radio-group{margin:18px 0 19px}.md-inline-form md-radio-group md-radio-button{display:inline-block;height:30px;padding:2px;box-sizing:border-box;margin-top:0;margin-bottom:0}@media screen and (-ms-high-contrast:active){md-radio-button.md-default-theme .md-on{background-color:#fff}}md-input-container:not([md-no-float]) .md-select-placeholder span:first-child{transition:transform .4s cubic-bezier(.25,.8,.25,1);transform-origin:left top}[dir=rtl] md-input-container:not([md-no-float]) .md-select-placeholder span:first-child{transform-origin:right top}md-input-container.md-input-focused:not([md-no-float]) .md-select-placeholder span:first-child{transform:translateY(-22px) translateX(-2px) scale(.75)}.md-select-menu-container{position:fixed;left:0;top:0;z-index:90;opacity:0;display:none;transform:translateY(-1px)}.md-select-menu-container:not(.md-clickable){pointer-events:none}.md-select-menu-container md-progress-circular{display:table;margin:24px auto!important}.md-select-menu-container.md-active{display:block;opacity:1}.md-select-menu-container.md-active md-select-menu{transition:all .4s cubic-bezier(.25,.8,.25,1);transition-duration:150ms}.md-select-menu-container.md-active md-select-menu>*{opacity:1;transition:all .3s cubic-bezier(.55,0,.55,.2);transition-duration:150ms;transition-delay:.1s}.md-select-menu-container.md-leave{opacity:0;transition:all .3s cubic-bezier(.55,0,.55,.2);transition-duration:250ms}md-input-container>md-select{margin:0;order:2}md-input-container:not(.md-input-has-value) md-select.ng-required:not(.md-no-asterisk) .md-select-value span:first-child:after,md-input-container:not(.md-input-has-value) md-select[required]:not(.md-no-asterisk) .md-select-value span:first-child:after{content:' *';font-size:13px;vertical-align:top}md-input-container.md-input-invalid md-select .md-select-value{border-bottom-style:solid;padding-bottom:1px}md-select{display:flex;margin:20px 0 26px 0}md-select.ng-required.ng-invalid:not(.md-no-asterisk) .md-select-value span:first-child:after,md-select[required].ng-invalid:not(.md-no-asterisk) .md-select-value span:first-child:after{content:' *';font-size:13px;vertical-align:top}md-select[disabled] .md-select-value{background-position:0 bottom;background-size:4px 1px;background-repeat:repeat-x;margin-bottom:-1px}md-select:focus{outline:0}md-select[disabled]:hover{cursor:default}md-select:not([disabled]):hover{cursor:pointer}md-select:not([disabled]).ng-invalid.ng-touched .md-select-value{border-bottom-style:solid;padding-bottom:1px}md-select:not([disabled]):focus .md-select-value{border-bottom-width:2px;border-bottom-style:solid;padding-bottom:0}md-select:not([disabled]):focus.ng-invalid.ng-touched .md-select-value{padding-bottom:0}md-input-container.md-input-has-value .md-select-value>span:not(.md-select-icon){transform:translate3d(0,1px,0)}.md-select-value{display:flex;align-items:center;padding:2px 2px 1px;border-bottom-width:1px;border-bottom-style:solid;background-color:transparent;position:relative;box-sizing:content-box;min-width:64px;min-height:26px;flex-grow:1}.md-select-value>span:not(.md-select-icon){max-width:100%;flex:1 1 auto;text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.md-select-value>span:not(.md-select-icon) .md-text{display:inline}.md-select-value .md-select-icon{display:block;align-items:flex-end;text-align:end;width:24px;margin:0 4px;transform:translate3d(0,-2px,0);font-size:1.2rem}.md-select-value .md-select-icon:after{display:block;content:'\25BC';position:relative;top:2px;speak:none;font-size:13px;transform:scaleY(.5) scaleX(1)}.md-select-value.md-select-placeholder{display:flex;order:1;pointer-events:none;-webkit-font-smoothing:antialiased;padding-left:2px;z-index:1}md-select-menu{display:flex;flex-direction:column;box-shadow:0 1px 3px 0 rgba(0,0,0,.2),0 1px 1px 0 rgba(0,0,0,.14),0 2px 1px -1px rgba(0,0,0,.12);max-height:256px;min-height:48px;overflow-y:hidden;transform-origin:left top;transform:scale(1)}md-select-menu.md-reverse{flex-direction:column-reverse}md-select-menu:not(.md-overflow) md-content{padding-top:8px;padding-bottom:8px}[dir=rtl] md-select-menu{transform-origin:right top}md-select-menu md-content{min-width:136px;min-height:48px;max-height:256px;overflow-y:auto}md-select-menu>*{opacity:0}md-option{cursor:pointer;position:relative;display:flex;align-items:center;width:auto;transition:background .15s linear;padding:0 16px 0 16px;height:48px}md-option[disabled]{cursor:default}md-option:focus{outline:0}md-option .md-text{-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;width:auto;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}md-optgroup{display:block}md-optgroup label{display:block;font-size:14px;text-transform:uppercase;padding:16px;font-weight:500}md-optgroup md-option{padding-left:32px;padding-right:32px}@media screen and (-ms-high-contrast:active){.md-select-backdrop{background-color:transparent}md-select-menu{border:1px solid #fff}}md-select-menu[multiple] md-option.md-checkbox-enabled{padding-left:40px;padding-right:16px}[dir=rtl] md-select-menu[multiple] md-option.md-checkbox-enabled{padding-left:16px}[dir=rtl] md-select-menu[multiple] md-option.md-checkbox-enabled{padding-right:40px}md-select-menu[multiple] md-option.md-checkbox-enabled .md-container{position:absolute;top:50%;transform:translateY(-50%);box-sizing:border-box;display:inline-block;width:20px;height:20px;left:0;right:auto}[dir=rtl] md-select-menu[multiple] md-option.md-checkbox-enabled .md-container{left:auto}[dir=rtl] md-select-menu[multiple] md-option.md-checkbox-enabled .md-container{right:0}md-select-menu[multiple] md-option.md-checkbox-enabled .md-container:before{box-sizing:border-box;background-color:transparent;border-radius:50%;content:'';position:absolute;display:block;height:auto;left:0;top:0;right:0;bottom:0;transition:all .5s;width:auto}md-select-menu[multiple] md-option.md-checkbox-enabled .md-container:after{box-sizing:border-box;content:'';position:absolute;top:-10px;right:-10px;bottom:-10px;left:-10px}md-select-menu[multiple] md-option.md-checkbox-enabled .md-container .md-ripple-container{position:absolute;display:block;width:auto;height:auto;left:-15px;top:-15px;right:-15px;bottom:-15px}md-select-menu[multiple] md-option.md-checkbox-enabled .md-icon{box-sizing:border-box;transition:240ms;position:absolute;top:0;left:0;width:20px;height:20px;border-width:2px;border-style:solid;border-radius:2px}md-select-menu[multiple] md-option.md-checkbox-enabled[selected] .md-icon{border-color:transparent}md-select-menu[multiple] md-option.md-checkbox-enabled[selected] .md-icon:after{box-sizing:border-box;transform:rotate(45deg);position:absolute;left:4.6666666667px;top:.2222222222px;display:table;width:6.6666666667px;height:13.3333333333px;border-width:2px;border-style:solid;border-top:0;border-left:0;content:''}md-select-menu[multiple] md-option.md-checkbox-enabled[disabled]{cursor:default}md-select-menu[multiple] md-option.md-checkbox-enabled.md-indeterminate .md-icon:after{box-sizing:border-box;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);display:table;width:12px;height:2px;border-width:2px;border-style:solid;border-top:0;border-left:0;content:''}md-select-menu[multiple] md-option.md-checkbox-enabled .md-container{margin-left:10.6666666667px;margin-right:auto}[dir=rtl] md-select-menu[multiple] md-option.md-checkbox-enabled .md-container{margin-left:auto}[dir=rtl] md-select-menu[multiple] md-option.md-checkbox-enabled .md-container{margin-right:10.6666666667px}md-sidenav{box-sizing:border-box;position:absolute;flex-direction:column;z-index:60;width:320px;max-width:320px;bottom:0;overflow:auto;-webkit-overflow-scrolling:touch}md-sidenav ul{list-style:none}md-sidenav.md-closed{display:none}md-sidenav.md-closed-add,md-sidenav.md-closed-remove{display:flex;transition:.2s ease-in all}md-sidenav.md-closed-add.md-closed-add-active,md-sidenav.md-closed-remove.md-closed-remove-active{transition:all .4s cubic-bezier(.25,.8,.25,1)}md-sidenav.md-locked-open-add,md-sidenav.md-locked-open-remove{position:static;display:flex;transform:translate3d(0,0,0)}md-sidenav.md-locked-open,md-sidenav.md-locked-open-remove.md-closed,md-sidenav.md-locked-open.md-closed,md-sidenav.md-locked-open.md-closed.md-sidenav-left,md-sidenav.md-locked-open.md-closed.md-sidenav-right{position:static;display:flex;transform:translate3d(0,0,0)}md-sidenav.md-locked-open-remove-active{transition:width .3s cubic-bezier(.55,0,.55,.2),min-width .3s cubic-bezier(.55,0,.55,.2);width:0!important;min-width:0!important}md-sidenav.md-closed.md-locked-open-add{width:0!important;min-width:0!important;transform:translate3d(0,0,0)}md-sidenav.md-closed.md-locked-open-add-active{transition:width .3s cubic-bezier(.55,0,.55,.2),min-width .3s cubic-bezier(.55,0,.55,.2);width:320px;min-width:320px;transform:translate3d(0,0,0)}.md-sidenav-backdrop.md-locked-open{display:none}.md-sidenav-left,md-sidenav{left:0;top:0;transform:translate3d(0,0,0)}.md-sidenav-left.md-closed,md-sidenav.md-closed{transform:translate3d(-100%,0,0)}.md-sidenav-right{left:100%;top:0;transform:translate(-100%,0)}.md-sidenav-right.md-closed{transform:translate(0,0)}@media (min-width:600px){md-sidenav{max-width:400px}}@media (max-width:456px){md-sidenav{width:calc(100% - 56px);min-width:calc(100% - 56px);max-width:calc(100% - 56px)}}@media screen and (-ms-high-contrast:active){.md-sidenav-left,md-sidenav{border-right:1px solid #fff}.md-sidenav-right{border-left:1px solid #fff}}@keyframes sliderFocusThumb{0%{transform:scale(.7)}30%{transform:scale(1)}100%{transform:scale(.7)}}@keyframes sliderDiscreteFocusThumb{0%{transform:scale(.7)}50%{transform:scale(.8)}100%{transform:scale(0)}}@keyframes sliderDiscreteFocusRing{0%{transform:scale(.7);opacity:0}50%{transform:scale(1);opacity:1}100%{transform:scale(0)}}md-slider{height:48px;min-width:128px;position:relative;margin-left:4px;margin-right:4px;padding:0;display:block;flex-direction:row}md-slider *,md-slider :after{box-sizing:border-box}md-slider .md-slider-wrapper{outline:0;width:100%;height:100%}md-slider .md-slider-content{position:relative}md-slider .md-track-container{width:100%;position:absolute;top:23px;height:2px}md-slider .md-track{position:absolute;left:0;right:0;height:100%}md-slider .md-track-fill{transition:all .4s cubic-bezier(.25,.8,.25,1);transition-property:width,height}md-slider .md-track-ticks{position:absolute;left:0;right:0;height:100%}md-slider .md-track-ticks canvas{width:100%;height:100%}md-slider .md-thumb-container{position:absolute;left:0;top:50%;transform:translate3d(-50%,-50%,0);transition:all .4s cubic-bezier(.25,.8,.25,1);transition-property:left,right,bottom}[dir=rtl] md-slider .md-thumb-container{left:auto;right:0}md-slider .md-thumb{z-index:1;position:absolute;left:-10px;top:14px;width:20px;height:20px;border-radius:20px;transform:scale(.7);transition:all .4s cubic-bezier(.25,.8,.25,1)}[dir=rtl] md-slider .md-thumb{left:auto;right:-10px}md-slider .md-thumb:after{content:'';position:absolute;width:20px;height:20px;border-radius:20px;border-width:3px;border-style:solid;transition:inherit}md-slider .md-sign{display:flex;align-items:center;justify-content:center;position:absolute;left:-14px;top:-17px;width:28px;height:28px;border-radius:28px;transform:scale(.4) translate3d(0,67.5px,0);transition:all .3s cubic-bezier(.35,0,.25,1)}md-slider .md-sign:after{position:absolute;content:'';left:0;border-radius:16px;top:19px;border-left:14px solid transparent;border-right:14px solid transparent;border-top-width:16px;border-top-style:solid;opacity:0;transform:translate3d(0,-8px,0);transition:all .2s cubic-bezier(.35,0,.25,1)}[dir=rtl] md-slider .md-sign:after{left:auto;right:0}md-slider .md-sign .md-thumb-text{z-index:1;font-size:12px;font-weight:700}md-slider .md-focus-ring{position:absolute;left:-17px;top:7px;width:34px;height:34px;border-radius:34px;transform:scale(.7);opacity:0;transition:all .35s cubic-bezier(.35,0,.25,1)}[dir=rtl] md-slider .md-focus-ring{left:auto;right:-17px}md-slider .md-disabled-thumb{position:absolute;left:-14px;top:10px;width:28px;height:28px;border-radius:28px;transform:scale(.5);border-width:4px;border-style:solid;display:none}[dir=rtl] md-slider .md-disabled-thumb{left:auto;right:-14px}md-slider.md-min .md-sign{opacity:0}md-slider:focus{outline:0}md-slider.md-dragging .md-thumb-container,md-slider.md-dragging .md-track-fill{transition:none}md-slider:not([md-discrete]) .md-sign,md-slider:not([md-discrete]) .md-track-ticks{display:none}md-slider:not([md-discrete]):not([disabled]) .md-slider-wrapper .md-thumb:hover{transform:scale(.8)}md-slider:not([md-discrete]):not([disabled]) .md-slider-wrapper.md-focused .md-focus-ring{transform:scale(1);opacity:1}md-slider:not([md-discrete]):not([disabled]) .md-slider-wrapper.md-focused .md-thumb{animation:sliderFocusThumb .7s cubic-bezier(.35,0,.25,1)}md-slider:not([md-discrete]):not([disabled]).md-active .md-slider-wrapper .md-thumb{transform:scale(1)}md-slider[md-discrete]:not([disabled]) .md-slider-wrapper.md-focused .md-focus-ring{transform:scale(0);animation:sliderDiscreteFocusRing .5s cubic-bezier(.35,0,.25,1)}md-slider[md-discrete]:not([disabled]) .md-slider-wrapper.md-focused .md-thumb{animation:sliderDiscreteFocusThumb .5s cubic-bezier(.35,0,.25,1)}md-slider[md-discrete]:not([disabled]) .md-slider-wrapper.md-focused .md-thumb,md-slider[md-discrete]:not([disabled]).md-active .md-thumb{transform:scale(0)}md-slider[md-discrete]:not([disabled]) .md-slider-wrapper.md-focused .md-sign,md-slider[md-discrete]:not([disabled]) .md-slider-wrapper.md-focused .md-sign:after,md-slider[md-discrete]:not([disabled]).md-active .md-sign,md-slider[md-discrete]:not([disabled]).md-active .md-sign:after{opacity:1;transform:translate3d(0,0,0) scale(1)}md-slider[md-discrete][disabled][readonly] .md-thumb{transform:scale(0)}md-slider[md-discrete][disabled][readonly] .md-sign,md-slider[md-discrete][disabled][readonly] .md-sign:after{opacity:1;transform:translate3d(0,0,0) scale(1)}md-slider[disabled] .md-track-fill{display:none}md-slider[disabled] .md-track-ticks{opacity:0}md-slider[disabled]:not([readonly]) .md-sign{opacity:0}md-slider[disabled] .md-thumb{transform:scale(.5)}md-slider[disabled] .md-disabled-thumb{display:block}md-slider[md-vertical]{flex-direction:column;min-height:128px;min-width:0}md-slider[md-vertical] .md-slider-wrapper{flex:1;padding-top:12px;padding-bottom:12px;width:48px;align-self:center;display:flex;justify-content:center}md-slider[md-vertical] .md-track-container{height:100%;width:2px;top:0;left:calc(50% - (2px / 2))}md-slider[md-vertical] .md-thumb-container{top:auto;margin-bottom:23px;left:calc(50% - 1px);bottom:0}md-slider[md-vertical] .md-thumb-container .md-thumb:after{left:1px}md-slider[md-vertical] .md-thumb-container .md-focus-ring{left:-16px}md-slider[md-vertical] .md-track-fill{bottom:0}md-slider[md-vertical][md-discrete] .md-sign{left:-40px;top:9.5px;transform:scale(.4) translate3d(67.5px,0,0)}md-slider[md-vertical][md-discrete] .md-sign:after{top:9.5px;left:19px;border-top:14px solid transparent;border-right:0;border-bottom:14px solid transparent;border-left-width:16px;border-left-style:solid;opacity:0;transform:translate3d(0,-8px,0);transition:all .2s ease-in-out}md-slider[md-vertical][md-discrete] .md-sign .md-thumb-text{z-index:1;font-size:12px;font-weight:700}md-slider[md-vertical][md-discrete] .md-focused .md-sign:after,md-slider[md-vertical][md-discrete].md-active .md-sign:after,md-slider[md-vertical][md-discrete][disabled][readonly] .md-sign:after{top:0}md-slider[md-vertical][disabled][readonly] .md-thumb{transform:scale(0)}md-slider[md-vertical][disabled][readonly] .md-sign,md-slider[md-vertical][disabled][readonly] .md-sign:after{opacity:1;transform:translate3d(0,0,0) scale(1)}md-slider[md-invert]:not([md-vertical]) .md-track-fill{left:auto;right:0}[dir=rtl] md-slider[md-invert]:not([md-vertical]) .md-track-fill{left:0}[dir=rtl] md-slider[md-invert]:not([md-vertical]) .md-track-fill{right:auto}md-slider[md-invert][md-vertical] .md-track-fill{bottom:auto;top:0}md-slider-container{display:flex;align-items:center;flex-direction:row}md-slider-container>:first-child:not(md-slider),md-slider-container>:last-child:not(md-slider){min-width:25px;max-width:42px;height:25px;transition:all .4s cubic-bezier(.25,.8,.25,1);transition-property:color,max-width}md-slider-container>:first-child:not(md-slider){margin-right:16px}[dir=rtl] md-slider-container>:first-child:not(md-slider){margin-right:auto;margin-left:16px}md-slider-container>:last-child:not(md-slider){margin-left:16px}[dir=rtl] md-slider-container>:last-child:not(md-slider){margin-left:auto;margin-right:16px}md-slider-container[md-vertical]{flex-direction:column}md-slider-container[md-vertical]>:first-child:not(md-slider),md-slider-container[md-vertical]>:last-child:not(md-slider){margin-right:0;margin-left:0;text-align:center}md-slider-container md-input-container input[type=number]{text-align:center;padding-left:15px;height:50px;margin-top:-25px}[dir=rtl] md-slider-container md-input-container input[type=number]{padding-left:0;padding-right:15px}@media screen and (-ms-high-contrast:active){md-slider.md-default-theme .md-track{border-bottom:1px solid #fff}}.md-sticky-clone{z-index:2;top:0;left:0;right:0;position:absolute!important;transform:translate3d(-9999px,-9999px,0)}.md-sticky-clone[sticky-state=active]{transform:translate3d(0,0,0)}.md-sticky-clone[sticky-state=active]:not(.md-sticky-no-effect) .md-subheader-inner{animation:subheaderStickyHoverIn .3s ease-out both}@keyframes subheaderStickyHoverIn{0%{box-shadow:0 0 0 0 transparent}100%{box-shadow:0 2px 4px 0 rgba(0,0,0,.16)}}@keyframes subheaderStickyHoverOut{0%{box-shadow:0 2px 4px 0 rgba(0,0,0,.16)}100%{box-shadow:0 0 0 0 transparent}}.md-subheader-wrapper:not(.md-sticky-no-effect){transition:.2s ease-out margin}.md-subheader-wrapper:not(.md-sticky-no-effect) .md-subheader{margin:0}.md-subheader-wrapper:not(.md-sticky-no-effect).md-sticky-clone{z-index:2}.md-subheader-wrapper:not(.md-sticky-no-effect)[sticky-state=active]{margin-top:-2px}.md-subheader-wrapper:not(.md-sticky-no-effect):not(.md-sticky-clone)[sticky-prev-state=active] .md-subheader-inner:after{animation:subheaderStickyHoverOut .3s ease-out both}.md-subheader{display:block;font-size:14px;font-weight:500;line-height:1em;margin:0;position:relative}.md-subheader .md-subheader-inner{display:block;padding:16px}.md-subheader .md-subheader-content{display:block;z-index:1;position:relative}.md-inline-form md-switch{margin-top:18px;margin-bottom:19px}md-switch{margin:16px 0;white-space:nowrap;cursor:pointer;outline:0;user-select:none;height:30px;line-height:28px;align-items:center;display:flex;margin-left:inherit;margin-right:16px}[dir=rtl] md-switch{margin-left:16px}[dir=rtl] md-switch{margin-right:inherit}md-switch:last-of-type{margin-left:inherit;margin-right:0}[dir=rtl] md-switch:last-of-type{margin-left:0}[dir=rtl] md-switch:last-of-type{margin-right:inherit}md-switch[disabled]{cursor:default}md-switch[disabled] .md-container{cursor:default}md-switch .md-container{cursor:grab;width:36px;height:24px;position:relative;user-select:none;margin-right:8px;float:left}[dir=rtl] md-switch .md-container{margin-right:auto;margin-left:8px}md-switch:not([disabled]) .md-dragging,md-switch:not([disabled]).md-dragging .md-container{cursor:grabbing}md-switch.md-focused:not([disabled]) .md-thumb:before{left:-8px;top:-8px;right:-8px;bottom:-8px}md-switch.md-focused:not([disabled]):not(.md-checked) .md-thumb:before{background-color:rgba(0,0,0,.12)}md-switch .md-label{border-color:transparent;border-width:0;float:left}md-switch .md-bar{left:1px;width:34px;top:5px;height:14px;border-radius:8px;position:absolute}md-switch .md-thumb-container{top:2px;left:0;width:16px;position:absolute;transform:translate3d(0,0,0);z-index:1}md-switch.md-checked .md-thumb-container{transform:translate3d(100%,0,0)}md-switch .md-thumb{position:absolute;margin:0;left:0;top:0;outline:0;height:20px;width:20px;border-radius:50%;box-shadow:0 1px 3px 0 rgba(0,0,0,.2),0 1px 1px 0 rgba(0,0,0,.14),0 2px 1px -1px rgba(0,0,0,.12)}md-switch .md-thumb:before{background-color:transparent;border-radius:50%;content:'';position:absolute;display:block;height:auto;left:0;top:0;right:0;bottom:0;transition:all .5s;width:auto}md-switch .md-thumb .md-ripple-container{position:absolute;display:block;width:auto;height:auto;left:-20px;top:-20px;right:-20px;bottom:-20px}md-switch:not(.md-dragging) .md-bar,md-switch:not(.md-dragging) .md-thumb,md-switch:not(.md-dragging) .md-thumb-container{transition:all 80ms linear;transition-property:transform,background-color}md-switch:not(.md-dragging) .md-bar,md-switch:not(.md-dragging) .md-thumb{transition-delay:50ms}@media screen and (-ms-high-contrast:active){md-switch.md-default-theme .md-bar{background-color:#666}md-switch.md-default-theme.md-checked .md-bar{background-color:#9e9e9e}md-switch.md-default-theme .md-thumb{background-color:#fff}}@keyframes md-tab-content-hide{0%{opacity:1}50%{opacity:1}100%{opacity:0}}md-tab-data{position:absolute;top:0;left:0;right:0;bottom:0;z-index:-1;opacity:0}md-tabs{display:block;margin:0;border-radius:2px;overflow:hidden;position:relative;flex-shrink:0}md-tabs:not(.md-no-tab-content):not(.md-dynamic-height){min-height:248px}md-tabs[md-align-tabs=bottom]{padding-bottom:48px}md-tabs[md-align-tabs=bottom] md-tabs-wrapper{position:absolute;bottom:0;left:0;right:0;height:48px;z-index:2}md-tabs[md-align-tabs=bottom] md-tabs-content-wrapper{top:0;bottom:48px}md-tabs.md-dynamic-height md-tabs-content-wrapper{min-height:0;position:relative;top:auto;left:auto;right:auto;bottom:auto;overflow:visible}md-tabs.md-dynamic-height md-tab-content.md-active{position:relative}md-tabs[md-border-bottom] md-tabs-wrapper{border-width:0 0 1px;border-style:solid}md-tabs[md-border-bottom]:not(.md-dynamic-height) md-tabs-content-wrapper{top:49px}md-tabs-wrapper{display:block;position:relative;transform:translate3d(0,0,0)}md-tabs-wrapper md-next-button,md-tabs-wrapper md-prev-button{height:100%;width:32px;position:absolute;top:50%;transform:translateY(-50%);line-height:1em;z-index:2;cursor:pointer;font-size:16px;background:transparent no-repeat center center;transition:all .5s cubic-bezier(.35,0,.25,1)}md-tabs-wrapper md-next-button:focus,md-tabs-wrapper md-prev-button:focus{outline:0}md-tabs-wrapper md-next-button.md-disabled,md-tabs-wrapper md-prev-button.md-disabled{opacity:.25;cursor:default}md-tabs-wrapper md-next-button.ng-leave,md-tabs-wrapper md-prev-button.ng-leave{transition:none}md-tabs-wrapper md-next-button md-icon,md-tabs-wrapper md-prev-button md-icon{position:absolute;top:50%;left:50%;transform:translate3d(-50%,-50%,0)}md-tabs-wrapper md-prev-button{left:0;background-image:url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPCEtLSBHZW5lcmF0b3I6IEFkb2JlIElsbHVzdHJhdG9yIDE3LjEuMCwgU1ZHIEV4cG9ydCBQbHVnLUluIC4gU1ZHIFZlcnNpb246IDYuMDAgQnVpbGQgMCkgIC0tPiA8IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPiA8c3ZnIHZlcnNpb249IjEuMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgeD0iMHB4IiB5PSIwcHgiIHdpZHRoPSIyNHB4IiBoZWlnaHQ9IjI0cHgiIHZpZXdCb3g9IjAgMCAyNCAyNCIgZW5hYmxlLWJhY2tncm91bmQ9Im5ldyAwIDAgMjQgMjQiIHhtbDpzcGFjZT0icHJlc2VydmUiPiA8ZyBpZD0iSGVhZGVyIj4gPGc+IDxyZWN0IHg9Ii02MTgiIHk9Ii0xMjA4IiBmaWxsPSJub25lIiB3aWR0aD0iMTQwMCIgaGVpZ2h0PSIzNjAwIi8+IDwvZz4gPC9nPiA8ZyBpZD0iTGFiZWwiPiA8L2c+IDxnIGlkPSJJY29uIj4gPGc+IDxwb2x5Z29uIHBvaW50cz0iMTUuNCw3LjQgMTQsNiA4LDEyIDE0LDE4IDE1LjQsMTYuNiAxMC44LDEyIAkJIiBzdHlsZT0iZmlsbDp3aGl0ZTsiLz4gPHJlY3QgZmlsbD0ibm9uZSIgd2lkdGg9IjI0IiBoZWlnaHQ9IjI0Ii8+IDwvZz4gPC9nPiA8ZyBpZD0iR3JpZCIgZGlzcGxheT0ibm9uZSI+IDxnIGRpc3BsYXk9ImlubGluZSI+IDwvZz4gPC9nPiA8L3N2Zz4NCg==)}[dir=rtl] md-tabs-wrapper md-prev-button{left:auto;right:0}md-tabs-wrapper md-next-button{right:0;background-image:url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPCEtLSBHZW5lcmF0b3I6IEFkb2JlIElsbHVzdHJhdG9yIDE3LjEuMCwgU1ZHIEV4cG9ydCBQbHVnLUluIC4gU1ZHIFZlcnNpb246IDYuMDAgQnVpbGQgMCkgIC0tPiA8IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPiA8c3ZnIHZlcnNpb249IjEuMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgeD0iMHB4IiB5PSIwcHgiIHdpZHRoPSIyNHB4IiBoZWlnaHQ9IjI0cHgiIHZpZXdCb3g9IjAgMCAyNCAyNCIgZW5hYmxlLWJhY2tncm91bmQ9Im5ldyAwIDAgMjQgMjQiIHhtbDpzcGFjZT0icHJlc2VydmUiPiA8ZyBpZD0iSGVhZGVyIj4gPGc+IDxyZWN0IHg9Ii02MTgiIHk9Ii0xMzM2IiBmaWxsPSJub25lIiB3aWR0aD0iMTQwMCIgaGVpZ2h0PSIzNjAwIi8+IDwvZz4gPC9nPiA8ZyBpZD0iTGFiZWwiPiA8L2c+IDxnIGlkPSJJY29uIj4gPGc+IDxwb2x5Z29uIHBvaW50cz0iMTAsNiA4LjYsNy40IDEzLjIsMTIgOC42LDE2LjYgMTAsMTggMTYsMTIgCQkiIHN0eWxlPSJmaWxsOndoaXRlOyIvPiA8cmVjdCBmaWxsPSJub25lIiB3aWR0aD0iMjQiIGhlaWdodD0iMjQiLz4gPC9nPiA8L2c+IDxnIGlkPSJHcmlkIiBkaXNwbGF5PSJub25lIj4gPGcgZGlzcGxheT0iaW5saW5lIj4gPC9nPiA8L2c+IDwvc3ZnPg0K)}[dir=rtl] md-tabs-wrapper md-next-button{right:auto;left:0}md-tabs-wrapper md-next-button md-icon{transform:translate3d(-50%,-50%,0) rotate(180deg)}md-tabs-wrapper.md-stretch-tabs md-pagination-wrapper{width:100%;display:flex;flex-direction:row}md-tabs-wrapper.md-stretch-tabs md-pagination-wrapper md-tab-item{flex-grow:1}md-tabs-canvas{position:relative;overflow:hidden;display:block;height:48px}md-tabs-canvas:after{content:'';display:table;clear:both}md-tabs-canvas .md-dummy-wrapper{position:absolute;top:0;left:0}[dir=rtl] md-tabs-canvas .md-dummy-wrapper{left:auto;right:0}md-tabs-canvas.md-paginated{margin:0 32px}md-tabs-canvas.md-center-tabs{display:flex;flex-direction:column;text-align:center}md-tabs-canvas.md-center-tabs .md-tab{float:none;display:inline-block}md-pagination-wrapper{height:48px;display:block;transition:transform .5s cubic-bezier(.35,0,.25,1);position:absolute;width:999999px;left:0;transform:translate3d(0,0,0)}md-pagination-wrapper:after{content:'';display:table;clear:both}[dir=rtl] md-pagination-wrapper{left:auto;right:0}md-pagination-wrapper.md-center-tabs{position:relative;width:auto;margin:0 auto}md-tabs-content-wrapper{display:block;position:absolute;top:48px;left:0;right:0;bottom:0;overflow:hidden}md-tab-content{display:block;position:absolute;top:0;left:0;right:0;bottom:0;transition:transform .5s cubic-bezier(.35,0,.25,1);overflow:auto;transform:translate3d(0,0,0)}md-tab-content.md-no-scroll{bottom:auto;overflow:hidden}md-tab-content.md-no-transition,md-tab-content.ng-leave{transition:none}md-tab-content.md-left:not(.md-active){transform:translateX(-100%);animation:1s md-tab-content-hide;opacity:0}[dir=rtl] md-tab-content.md-left:not(.md-active){transform:translateX(100%)}md-tab-content.md-left:not(.md-active) *{transition:visibility 0s linear;transition-delay:.5s;visibility:hidden}md-tab-content.md-right:not(.md-active){transform:translateX(100%);animation:1s md-tab-content-hide;opacity:0}[dir=rtl] md-tab-content.md-right:not(.md-active){transform:translateX(-100%)}md-tab-content.md-right:not(.md-active) *{transition:visibility 0s linear;transition-delay:.5s;visibility:hidden}md-tab-content>div.ng-leave{animation:1s md-tab-content-hide}md-ink-bar{position:absolute;left:auto;right:auto;bottom:0;height:2px}md-ink-bar.md-left{transition:left 125ms cubic-bezier(.35,0,.25,1),right .25s cubic-bezier(.35,0,.25,1)}md-ink-bar.md-right{transition:left .25s cubic-bezier(.35,0,.25,1),right 125ms cubic-bezier(.35,0,.25,1)}md-tab{position:absolute;z-index:-1;left:-9999px}.md-tab{font-size:14px;text-align:center;line-height:24px;padding:12px 24px;transition:background-color .35s cubic-bezier(.35,0,.25,1);cursor:pointer;white-space:nowrap;position:relative;text-transform:uppercase;float:left;font-weight:500;box-sizing:border-box;overflow:hidden;text-overflow:ellipsis}[dir=rtl] .md-tab{float:right}.md-tab.md-focused{box-shadow:none;outline:0}.md-tab.md-active{cursor:default}.md-tab.md-disabled{pointer-events:none;touch-action:pan-y;user-select:none;-webkit-user-drag:none;opacity:.5;cursor:default}.md-tab.ng-leave{transition:none}md-toolbar+md-tabs{border-top-left-radius:0;border-top-right-radius:0}.md-toast-text{padding:0 6px}md-toast{position:absolute;z-index:105;box-sizing:border-box;cursor:default;overflow:hidden;padding:8px;opacity:1;transition:all .4s cubic-bezier(.25,.8,.25,1)}md-toast .md-toast-content{display:flex;direction:row;align-items:center;max-height:168px;max-width:100%;min-height:48px;padding:0 18px;box-shadow:0 2px 5px 0 rgba(0,0,0,.26);border-radius:2px;font-size:14px;overflow:hidden;transform:translate3d(0,0,0) rotateZ(0);transition:all .4s cubic-bezier(.25,.8,.25,1);justify-content:flex-start}md-toast .md-toast-content::before{content:'';min-height:48px;visibility:hidden;display:inline-block}[dir=rtl] md-toast .md-toast-content{justify-content:flex-end}md-toast .md-toast-content span{flex:1 1 0%;box-sizing:border-box;min-width:0}md-toast.md-capsule{border-radius:24px}md-toast.md-capsule .md-toast-content{border-radius:24px}md-toast.ng-leave-active .md-toast-content{transition:all .3s cubic-bezier(.55,0,.55,.2)}md-toast.md-swipedown .md-toast-content,md-toast.md-swipeleft .md-toast-content,md-toast.md-swiperight .md-toast-content,md-toast.md-swipeup .md-toast-content{transition:all .4s cubic-bezier(.25,.8,.25,1)}md-toast.ng-enter{opacity:0}md-toast.ng-enter .md-toast-content{transform:translate3d(0,100%,0)}md-toast.ng-enter.md-top .md-toast-content{transform:translate3d(0,-100%,0)}md-toast.ng-enter.ng-enter-active{opacity:1}md-toast.ng-enter.ng-enter-active .md-toast-content{transform:translate3d(0,0,0)}md-toast.ng-leave.ng-leave-active .md-toast-content{opacity:0;transform:translate3d(0,100%,0)}md-toast.ng-leave.ng-leave-active.md-swipeup .md-toast-content{transform:translate3d(0,-50%,0)}md-toast.ng-leave.ng-leave-active.md-swipedown .md-toast-content{transform:translate3d(0,50%,0)}md-toast.ng-leave.ng-leave-active.md-top .md-toast-content{transform:translate3d(0,-100%,0)}md-toast .md-action{line-height:19px;margin-left:24px;margin-right:0;cursor:pointer;text-transform:uppercase;float:right}md-toast .md-button{min-width:0;margin-right:0;margin-left:12px}[dir=rtl] md-toast .md-button{margin-right:12px}[dir=rtl] md-toast .md-button{margin-left:0}@media (max-width:959px){md-toast{left:0;right:0;width:100%;max-width:100%;min-width:0;border-radius:0;bottom:0;padding:0}md-toast.ng-leave.ng-leave-active.md-swipeup .md-toast-content{transform:translate3d(0,-50%,0)}md-toast.ng-leave.ng-leave-active.md-swipedown .md-toast-content{transform:translate3d(0,50%,0)}}@media (min-width:960px){md-toast{min-width:304px}md-toast.md-bottom{bottom:0}md-toast.md-left{left:0}md-toast.md-right{right:0}md-toast.md-top{top:0}md-toast._md-start{left:0}[dir=rtl] md-toast._md-start{left:auto;right:0}md-toast._md-end{right:0}[dir=rtl] md-toast._md-end{right:auto;left:0}md-toast.ng-leave.ng-leave-active.md-swipeleft .md-toast-content{transform:translate3d(-50%,0,0)}md-toast.ng-leave.ng-leave-active.md-swiperight .md-toast-content{transform:translate3d(50%,0,0)}}@media (min-width:1920px){md-toast .md-toast-content{max-width:568px}}@media screen and (-ms-high-contrast:active){md-toast{border:1px solid #fff}}.md-toast-animating{overflow:hidden!important}md-toolbar{box-sizing:border-box;display:flex;flex-direction:column;position:relative;z-index:2;font-size:20px;min-height:64px;width:100%}md-toolbar._md-toolbar-transitions{transition-duration:.5s;transition-timing-function:cubic-bezier(.35,0,.25,1);transition-property:background-color,fill,color}md-toolbar.md-whiteframe-z1-add,md-toolbar.md-whiteframe-z1-remove{transition:box-shadow .5s linear}md-toolbar md-toolbar-filler{width:72px}md-toolbar *,md-toolbar :after,md-toolbar :before{box-sizing:border-box}md-toolbar.ng-animate{transition:none}md-toolbar.md-tall{height:128px;min-height:128px;max-height:128px}md-toolbar.md-medium-tall{height:88px;min-height:88px;max-height:88px}md-toolbar.md-medium-tall .md-toolbar-tools{height:48px;min-height:48px;max-height:48px}md-toolbar>.md-indent{margin-left:64px}[dir=rtl] md-toolbar>.md-indent{margin-left:auto;margin-right:64px}md-toolbar~md-content>md-list{padding:0}md-toolbar~md-content>md-list md-list-item:last-child md-divider{display:none}.md-toolbar-tools{font-size:20px;letter-spacing:.005em;box-sizing:border-box;font-weight:400;display:flex;align-items:center;flex-direction:row;width:100%;height:64px;max-height:64px;padding:0 16px;margin:0}.md-toolbar-tools h1,.md-toolbar-tools h2,.md-toolbar-tools h3{font-size:inherit;font-weight:inherit;margin:inherit}.md-toolbar-tools a{color:inherit;text-decoration:none}.md-toolbar-tools .fill-height{display:flex;align-items:center}.md-toolbar-tools .md-button{margin-top:0;margin-bottom:0}.md-toolbar-tools .md-button,.md-toolbar-tools .md-button.md-icon-button md-icon{transition-duration:.5s;transition-timing-function:cubic-bezier(.35,0,.25,1);transition-property:background-color,fill,color}.md-toolbar-tools .md-button.md-icon-button md-icon.ng-animate,.md-toolbar-tools .md-button.ng-animate{transition:none}.md-toolbar-tools>.md-button:first-child{margin-left:-8px}[dir=rtl] .md-toolbar-tools>.md-button:first-child{margin-left:auto;margin-right:-8px}.md-toolbar-tools>.md-button:last-child{margin-right:-8px}[dir=rtl] .md-toolbar-tools>.md-button:last-child{margin-right:auto;margin-left:-8px}.md-toolbar-tools>md-menu:last-child{margin-right:-8px}[dir=rtl] .md-toolbar-tools>md-menu:last-child{margin-right:auto;margin-left:-8px}.md-toolbar-tools>md-menu:last-child>.md-button{margin-right:0}[dir=rtl] .md-toolbar-tools>md-menu:last-child>.md-button{margin-right:auto;margin-left:0}@media screen and (-ms-high-contrast:active){.md-toolbar-tools{border-bottom:1px solid #fff}}@media (min-width:0) and (max-width:959px) and (orientation:portrait){md-toolbar{min-height:56px}.md-toolbar-tools{height:56px;max-height:56px}}@media (min-width:0) and (max-width:959px) and (orientation:landscape){md-toolbar{min-height:48px}.md-toolbar-tools{height:48px;max-height:48px}}md-tooltip{position:absolute;z-index:100;overflow:hidden;pointer-events:none;border-radius:4px;font-weight:500;font-size:14px}@media (min-width:960px){md-tooltip{font-size:10px}}md-tooltip .md-content{position:relative;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;transform-origin:center top;transform:scale(0);opacity:0;height:32px;line-height:32px;padding-left:16px;padding-right:16px}@media (min-width:960px){md-tooltip .md-content{height:22px;line-height:22px;padding-left:8px;padding-right:8px}}md-tooltip .md-content.md-show-add{transition:all .4s cubic-bezier(.25,.8,.25,1);transition-duration:.2s;transform:scale(0);opacity:0}md-tooltip .md-content.md-show,md-tooltip .md-content.md-show-add-active{transform:scale(1);opacity:.9;transform-origin:center top}md-tooltip .md-content.md-show-remove{transition:all .4s cubic-bezier(.25,.8,.25,1);transition-duration:.2s}md-tooltip .md-content.md-show-remove.md-show-remove-active{transform:scale(0);opacity:0}md-tooltip.md-hide{transition:all .3s cubic-bezier(.55,0,.55,.2)}md-tooltip.md-show{transition:all .4s cubic-bezier(.25,.8,.25,1);pointer-events:auto}.md-virtual-repeat-container{box-sizing:border-box;display:block;margin:0;overflow:hidden;padding:0;position:relative}.md-virtual-repeat-container .md-virtual-repeat-scroller{bottom:0;box-sizing:border-box;left:0;margin:0;overflow-x:hidden;padding:0;position:absolute;right:0;top:0;-webkit-overflow-scrolling:touch}.md-virtual-repeat-container .md-virtual-repeat-sizer{box-sizing:border-box;height:1px;display:block;margin:0;padding:0;width:1px}.md-virtual-repeat-container .md-virtual-repeat-offsetter{box-sizing:border-box;left:0;margin:0;padding:0;position:absolute;right:0;top:0}.md-virtual-repeat-container.md-orient-horizontal .md-virtual-repeat-scroller{overflow-x:auto;overflow-y:hidden}.md-virtual-repeat-container.md-orient-horizontal .md-virtual-repeat-offsetter{bottom:16px;right:auto;white-space:nowrap}[dir=rtl] .md-virtual-repeat-container.md-orient-horizontal .md-virtual-repeat-offsetter{right:auto;left:auto}.md-whiteframe-1dp,.md-whiteframe-z1{box-shadow:0 1px 3px 0 rgba(0,0,0,.2),0 1px 1px 0 rgba(0,0,0,.14),0 2px 1px -1px rgba(0,0,0,.12)}.md-whiteframe-2dp{box-shadow:0 1px 5px 0 rgba(0,0,0,.2),0 2px 2px 0 rgba(0,0,0,.14),0 3px 1px -2px rgba(0,0,0,.12)}.md-whiteframe-3dp{box-shadow:0 1px 8px 0 rgba(0,0,0,.2),0 3px 4px 0 rgba(0,0,0,.14),0 3px 3px -2px rgba(0,0,0,.12)}.md-whiteframe-4dp,.md-whiteframe-z2{box-shadow:0 2px 4px -1px rgba(0,0,0,.2),0 4px 5px 0 rgba(0,0,0,.14),0 1px 10px 0 rgba(0,0,0,.12)}.md-whiteframe-5dp{box-shadow:0 3px 5px -1px rgba(0,0,0,.2),0 5px 8px 0 rgba(0,0,0,.14),0 1px 14px 0 rgba(0,0,0,.12)}.md-whiteframe-6dp{box-shadow:0 3px 5px -1px rgba(0,0,0,.2),0 6px 10px 0 rgba(0,0,0,.14),0 1px 18px 0 rgba(0,0,0,.12)}.md-whiteframe-7dp,.md-whiteframe-z3{box-shadow:0 4px 5px -2px rgba(0,0,0,.2),0 7px 10px 1px rgba(0,0,0,.14),0 2px 16px 1px rgba(0,0,0,.12)}.md-whiteframe-8dp{box-shadow:0 5px 5px -3px rgba(0,0,0,.2),0 8px 10px 1px rgba(0,0,0,.14),0 3px 14px 2px rgba(0,0,0,.12)}.md-whiteframe-9dp{box-shadow:0 5px 6px -3px rgba(0,0,0,.2),0 9px 12px 1px rgba(0,0,0,.14),0 3px 16px 2px rgba(0,0,0,.12)}.md-whiteframe-10dp,.md-whiteframe-z4{box-shadow:0 6px 6px -3px rgba(0,0,0,.2),0 10px 14px 1px rgba(0,0,0,.14),0 4px 18px 3px rgba(0,0,0,.12)}.md-whiteframe-11dp{box-shadow:0 6px 7px -4px rgba(0,0,0,.2),0 11px 15px 1px rgba(0,0,0,.14),0 4px 20px 3px rgba(0,0,0,.12)}.md-whiteframe-12dp{box-shadow:0 7px 8px -4px rgba(0,0,0,.2),0 12px 17px 2px rgba(0,0,0,.14),0 5px 22px 4px rgba(0,0,0,.12)}.md-whiteframe-13dp,.md-whiteframe-z5{box-shadow:0 7px 8px -4px rgba(0,0,0,.2),0 13px 19px 2px rgba(0,0,0,.14),0 5px 24px 4px rgba(0,0,0,.12)}.md-whiteframe-14dp{box-shadow:0 7px 9px -4px rgba(0,0,0,.2),0 14px 21px 2px rgba(0,0,0,.14),0 5px 26px 4px rgba(0,0,0,.12)}.md-whiteframe-15dp{box-shadow:0 8px 9px -5px rgba(0,0,0,.2),0 15px 22px 2px rgba(0,0,0,.14),0 6px 28px 5px rgba(0,0,0,.12)}.md-whiteframe-16dp{box-shadow:0 8px 10px -5px rgba(0,0,0,.2),0 16px 24px 2px rgba(0,0,0,.14),0 6px 30px 5px rgba(0,0,0,.12)}.md-whiteframe-17dp{box-shadow:0 8px 11px -5px rgba(0,0,0,.2),0 17px 26px 2px rgba(0,0,0,.14),0 6px 32px 5px rgba(0,0,0,.12)}.md-whiteframe-18dp{box-shadow:0 9px 11px -5px rgba(0,0,0,.2),0 18px 28px 2px rgba(0,0,0,.14),0 7px 34px 6px rgba(0,0,0,.12)}.md-whiteframe-19dp{box-shadow:0 9px 12px -6px rgba(0,0,0,.2),0 19px 29px 2px rgba(0,0,0,.14),0 7px 36px 6px rgba(0,0,0,.12)}.md-whiteframe-20dp{box-shadow:0 10px 13px -6px rgba(0,0,0,.2),0 20px 31px 3px rgba(0,0,0,.14),0 8px 38px 7px rgba(0,0,0,.12)}.md-whiteframe-21dp{box-shadow:0 10px 13px -6px rgba(0,0,0,.2),0 21px 33px 3px rgba(0,0,0,.14),0 8px 40px 7px rgba(0,0,0,.12)}.md-whiteframe-22dp{box-shadow:0 10px 14px -6px rgba(0,0,0,.2),0 22px 35px 3px rgba(0,0,0,.14),0 8px 42px 7px rgba(0,0,0,.12)}.md-whiteframe-23dp{box-shadow:0 11px 14px -7px rgba(0,0,0,.2),0 23px 36px 3px rgba(0,0,0,.14),0 9px 44px 8px rgba(0,0,0,.12)}.md-whiteframe-24dp{box-shadow:0 11px 15px -7px rgba(0,0,0,.2),0 24px 38px 3px rgba(0,0,0,.14),0 9px 46px 8px rgba(0,0,0,.12)}@media screen and (-ms-high-contrast:active){md-whiteframe{border:1px solid #fff}}@media print{[md-whiteframe],md-whiteframe{background-color:#fff}}.ng-cloak,.x-ng-cloak,[data-ng-cloak],[ng-cloak],[ng\:cloak],[x-ng-cloak]{display:none!important}@-moz-document url-prefix(){.layout-fill{margin:0;width:100%;min-height:100%;height:100%}}.flex-order{order:0}.flex-order--20{order:-20}.flex-order--19{order:-19}.flex-order--18{order:-18}.flex-order--17{order:-17}.flex-order--16{order:-16}.flex-order--15{order:-15}.flex-order--14{order:-14}.flex-order--13{order:-13}.flex-order--12{order:-12}.flex-order--11{order:-11}.flex-order--10{order:-10}.flex-order--9{order:-9}.flex-order--8{order:-8}.flex-order--7{order:-7}.flex-order--6{order:-6}.flex-order--5{order:-5}.flex-order--4{order:-4}.flex-order--3{order:-3}.flex-order--2{order:-2}.flex-order--1{order:-1}.flex-order-0{order:0}.flex-order-1{order:1}.flex-order-2{order:2}.flex-order-3{order:3}.flex-order-4{order:4}.flex-order-5{order:5}.flex-order-6{order:6}.flex-order-7{order:7}.flex-order-8{order:8}.flex-order-9{order:9}.flex-order-10{order:10}.flex-order-11{order:11}.flex-order-12{order:12}.flex-order-13{order:13}.flex-order-14{order:14}.flex-order-15{order:15}.flex-order-16{order:16}.flex-order-17{order:17}.flex-order-18{order:18}.flex-order-19{order:19}.flex-order-20{order:20}.flex-offset-0,.offset-0{margin-left:0}[dir=rtl] .flex-offset-0,[dir=rtl] .offset-0{margin-left:auto;margin-right:0}.flex-offset-5,.offset-5{margin-left:5%}[dir=rtl] .flex-offset-5,[dir=rtl] .offset-5{margin-left:auto;margin-right:5%}.flex-offset-10,.offset-10{margin-left:10%}[dir=rtl] .flex-offset-10,[dir=rtl] .offset-10{margin-left:auto;margin-right:10%}.flex-offset-15,.offset-15{margin-left:15%}[dir=rtl] .flex-offset-15,[dir=rtl] .offset-15{margin-left:auto;margin-right:15%}.flex-offset-20,.offset-20{margin-left:20%}[dir=rtl] .flex-offset-20,[dir=rtl] .offset-20{margin-left:auto;margin-right:20%}.flex-offset-25,.offset-25{margin-left:25%}[dir=rtl] .flex-offset-25,[dir=rtl] .offset-25{margin-left:auto;margin-right:25%}.flex-offset-30,.offset-30{margin-left:30%}[dir=rtl] .flex-offset-30,[dir=rtl] .offset-30{margin-left:auto;margin-right:30%}.flex-offset-35,.offset-35{margin-left:35%}[dir=rtl] .flex-offset-35,[dir=rtl] .offset-35{margin-left:auto;margin-right:35%}.flex-offset-40,.offset-40{margin-left:40%}[dir=rtl] .flex-offset-40,[dir=rtl] .offset-40{margin-left:auto;margin-right:40%}.flex-offset-45,.offset-45{margin-left:45%}[dir=rtl] .flex-offset-45,[dir=rtl] .offset-45{margin-left:auto;margin-right:45%}.flex-offset-50,.offset-50{margin-left:50%}[dir=rtl] .flex-offset-50,[dir=rtl] .offset-50{margin-left:auto;margin-right:50%}.flex-offset-55,.offset-55{margin-left:55%}[dir=rtl] .flex-offset-55,[dir=rtl] .offset-55{margin-left:auto;margin-right:55%}.flex-offset-60,.offset-60{margin-left:60%}[dir=rtl] .flex-offset-60,[dir=rtl] .offset-60{margin-left:auto;margin-right:60%}.flex-offset-65,.offset-65{margin-left:65%}[dir=rtl] .flex-offset-65,[dir=rtl] .offset-65{margin-left:auto;margin-right:65%}.flex-offset-70,.offset-70{margin-left:70%}[dir=rtl] .flex-offset-70,[dir=rtl] .offset-70{margin-left:auto;margin-right:70%}.flex-offset-75,.offset-75{margin-left:75%}[dir=rtl] .flex-offset-75,[dir=rtl] .offset-75{margin-left:auto;margin-right:75%}.flex-offset-80,.offset-80{margin-left:80%}[dir=rtl] .flex-offset-80,[dir=rtl] .offset-80{margin-left:auto;margin-right:80%}.flex-offset-85,.offset-85{margin-left:85%}[dir=rtl] .flex-offset-85,[dir=rtl] .offset-85{margin-left:auto;margin-right:85%}.flex-offset-90,.offset-90{margin-left:90%}[dir=rtl] .flex-offset-90,[dir=rtl] .offset-90{margin-left:auto;margin-right:90%}.flex-offset-95,.offset-95{margin-left:95%}[dir=rtl] .flex-offset-95,[dir=rtl] .offset-95{margin-left:auto;margin-right:95%}.flex-offset-33,.offset-33{margin-left:calc(100% / 3)}.flex-offset-66,.offset-66{margin-left:calc(200% / 3)}[dir=rtl] .flex-offset-66,[dir=rtl] .offset-66{margin-left:auto;margin-right:calc(200% / 3)}.layout-align,.layout-align-start-stretch{justify-content:flex-start;align-content:stretch;align-items:stretch}.layout-align-start,.layout-align-start-center,.layout-align-start-end,.layout-align-start-start,.layout-align-start-stretch{justify-content:flex-start}.layout-align-center,.layout-align-center-center,.layout-align-center-end,.layout-align-center-start,.layout-align-center-stretch{justify-content:center}.layout-align-end,.layout-align-end-center,.layout-align-end-end,.layout-align-end-start,.layout-align-end-stretch{justify-content:flex-end}.layout-align-space-around,.layout-align-space-around-center,.layout-align-space-around-end,.layout-align-space-around-start,.layout-align-space-around-stretch{justify-content:space-around}.layout-align-space-between,.layout-align-space-between-center,.layout-align-space-between-end,.layout-align-space-between-start,.layout-align-space-between-stretch{justify-content:space-between}.layout-align-center-start,.layout-align-end-start,.layout-align-space-around-start,.layout-align-space-between-start,.layout-align-start-start{align-items:flex-start;align-content:flex-start}.layout-align-center-center,.layout-align-end-center,.layout-align-space-around-center,.layout-align-space-between-center,.layout-align-start-center{align-items:center;align-content:center;max-width:100%}.layout-align-center-center>*,.layout-align-end-center>*,.layout-align-space-around-center>*,.layout-align-space-between-center>*,.layout-align-start-center>*{max-width:100%;box-sizing:border-box}.layout-align-center-end,.layout-align-end-end,.layout-align-space-around-end,.layout-align-space-between-end,.layout-align-start-end{align-items:flex-end;align-content:flex-end}.layout-align-center-stretch,.layout-align-end-stretch,.layout-align-space-around-stretch,.layout-align-space-between-stretch,.layout-align-start-stretch{align-items:stretch;align-content:stretch}.flex{flex:1;box-sizing:border-box}.flex-grow{flex:1 1 100%;box-sizing:border-box}.flex-initial{flex:0 1 auto;box-sizing:border-box}.flex-auto{flex:1 1 auto;box-sizing:border-box}.flex-none{flex:0 0 auto;box-sizing:border-box}.flex-noshrink{flex:1 0 auto;box-sizing:border-box}.flex-nogrow{flex:0 1 auto;box-sizing:border-box}.flex-0{flex:1 1 0%;max-width:0%;max-height:100%;box-sizing:border-box}.layout-row>.flex-0{flex:1 1 0%;max-width:0%;max-height:100%;box-sizing:border-box;min-width:0}.layout-column>.flex-0{flex:1 1 0%;max-width:100%;max-height:0%;box-sizing:border-box}.layout-row>.flex-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-row>.flex-0{flex:1 1 0%;max-width:0%;max-height:100%;box-sizing:border-box;min-width:0}.layout-column>.flex-0{flex:1 1 0%;max-width:100%;max-height:0%;box-sizing:border-box;min-height:0}.flex-5{flex:1 1 5%;max-width:5%;max-height:100%;box-sizing:border-box}.layout-row>.flex-5{flex:1 1 5%;max-width:5%;max-height:100%;box-sizing:border-box}.layout-column>.flex-5{flex:1 1 5%;max-width:100%;max-height:5%;box-sizing:border-box}.layout-row>.flex-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-row>.flex-5{flex:1 1 5%;max-width:5%;max-height:100%;box-sizing:border-box}.layout-column>.flex-5{flex:1 1 5%;max-width:100%;max-height:5%;box-sizing:border-box}.flex-10{flex:1 1 10%;max-width:10%;max-height:100%;box-sizing:border-box}.layout-row>.flex-10{flex:1 1 10%;max-width:10%;max-height:100%;box-sizing:border-box}.layout-column>.flex-10{flex:1 1 10%;max-width:100%;max-height:10%;box-sizing:border-box}.layout-row>.flex-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-row>.flex-10{flex:1 1 10%;max-width:10%;max-height:100%;box-sizing:border-box}.layout-column>.flex-10{flex:1 1 10%;max-width:100%;max-height:10%;box-sizing:border-box}.flex-15{flex:1 1 15%;max-width:15%;max-height:100%;box-sizing:border-box}.layout-row>.flex-15{flex:1 1 15%;max-width:15%;max-height:100%;box-sizing:border-box}.layout-column>.flex-15{flex:1 1 15%;max-width:100%;max-height:15%;box-sizing:border-box}.layout-row>.flex-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-row>.flex-15{flex:1 1 15%;max-width:15%;max-height:100%;box-sizing:border-box}.layout-column>.flex-15{flex:1 1 15%;max-width:100%;max-height:15%;box-sizing:border-box}.flex-20{flex:1 1 20%;max-width:20%;max-height:100%;box-sizing:border-box}.layout-row>.flex-20{flex:1 1 20%;max-width:20%;max-height:100%;box-sizing:border-box}.layout-column>.flex-20{flex:1 1 20%;max-width:100%;max-height:20%;box-sizing:border-box}.layout-row>.flex-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-row>.flex-20{flex:1 1 20%;max-width:20%;max-height:100%;box-sizing:border-box}.layout-column>.flex-20{flex:1 1 20%;max-width:100%;max-height:20%;box-sizing:border-box}.flex-25{flex:1 1 25%;max-width:25%;max-height:100%;box-sizing:border-box}.layout-row>.flex-25{flex:1 1 25%;max-width:25%;max-height:100%;box-sizing:border-box}.layout-column>.flex-25{flex:1 1 25%;max-width:100%;max-height:25%;box-sizing:border-box}.layout-row>.flex-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-row>.flex-25{flex:1 1 25%;max-width:25%;max-height:100%;box-sizing:border-box}.layout-column>.flex-25{flex:1 1 25%;max-width:100%;max-height:25%;box-sizing:border-box}.flex-30{flex:1 1 30%;max-width:30%;max-height:100%;box-sizing:border-box}.layout-row>.flex-30{flex:1 1 30%;max-width:30%;max-height:100%;box-sizing:border-box}.layout-column>.flex-30{flex:1 1 30%;max-width:100%;max-height:30%;box-sizing:border-box}.layout-row>.flex-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-row>.flex-30{flex:1 1 30%;max-width:30%;max-height:100%;box-sizing:border-box}.layout-column>.flex-30{flex:1 1 30%;max-width:100%;max-height:30%;box-sizing:border-box}.flex-35{flex:1 1 35%;max-width:35%;max-height:100%;box-sizing:border-box}.layout-row>.flex-35{flex:1 1 35%;max-width:35%;max-height:100%;box-sizing:border-box}.layout-column>.flex-35{flex:1 1 35%;max-width:100%;max-height:35%;box-sizing:border-box}.layout-row>.flex-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-row>.flex-35{flex:1 1 35%;max-width:35%;max-height:100%;box-sizing:border-box}.layout-column>.flex-35{flex:1 1 35%;max-width:100%;max-height:35%;box-sizing:border-box}.flex-40{flex:1 1 40%;max-width:40%;max-height:100%;box-sizing:border-box}.layout-row>.flex-40{flex:1 1 40%;max-width:40%;max-height:100%;box-sizing:border-box}.layout-column>.flex-40{flex:1 1 40%;max-width:100%;max-height:40%;box-sizing:border-box}.layout-row>.flex-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-row>.flex-40{flex:1 1 40%;max-width:40%;max-height:100%;box-sizing:border-box}.layout-column>.flex-40{flex:1 1 40%;max-width:100%;max-height:40%;box-sizing:border-box}.flex-45{flex:1 1 45%;max-width:45%;max-height:100%;box-sizing:border-box}.layout-row>.flex-45{flex:1 1 45%;max-width:45%;max-height:100%;box-sizing:border-box}.layout-column>.flex-45{flex:1 1 45%;max-width:100%;max-height:45%;box-sizing:border-box}.layout-row>.flex-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-row>.flex-45{flex:1 1 45%;max-width:45%;max-height:100%;box-sizing:border-box}.layout-column>.flex-45{flex:1 1 45%;max-width:100%;max-height:45%;box-sizing:border-box}.flex-50{flex:1 1 50%;max-width:50%;max-height:100%;box-sizing:border-box}.layout-row>.flex-50{flex:1 1 50%;max-width:50%;max-height:100%;box-sizing:border-box}.layout-column>.flex-50{flex:1 1 50%;max-width:100%;max-height:50%;box-sizing:border-box}.layout-row>.flex-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-row>.flex-50{flex:1 1 50%;max-width:50%;max-height:100%;box-sizing:border-box}.layout-column>.flex-50{flex:1 1 50%;max-width:100%;max-height:50%;box-sizing:border-box}.flex-55{flex:1 1 55%;max-width:55%;max-height:100%;box-sizing:border-box}.layout-row>.flex-55{flex:1 1 55%;max-width:55%;max-height:100%;box-sizing:border-box}.layout-column>.flex-55{flex:1 1 55%;max-width:100%;max-height:55%;box-sizing:border-box}.layout-row>.flex-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-row>.flex-55{flex:1 1 55%;max-width:55%;max-height:100%;box-sizing:border-box}.layout-column>.flex-55{flex:1 1 55%;max-width:100%;max-height:55%;box-sizing:border-box}.flex-60{flex:1 1 60%;max-width:60%;max-height:100%;box-sizing:border-box}.layout-row>.flex-60{flex:1 1 60%;max-width:60%;max-height:100%;box-sizing:border-box}.layout-column>.flex-60{flex:1 1 60%;max-width:100%;max-height:60%;box-sizing:border-box}.layout-row>.flex-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-row>.flex-60{flex:1 1 60%;max-width:60%;max-height:100%;box-sizing:border-box}.layout-column>.flex-60{flex:1 1 60%;max-width:100%;max-height:60%;box-sizing:border-box}.flex-65{flex:1 1 65%;max-width:65%;max-height:100%;box-sizing:border-box}.layout-row>.flex-65{flex:1 1 65%;max-width:65%;max-height:100%;box-sizing:border-box}.layout-column>.flex-65{flex:1 1 65%;max-width:100%;max-height:65%;box-sizing:border-box}.layout-row>.flex-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-row>.flex-65{flex:1 1 65%;max-width:65%;max-height:100%;box-sizing:border-box}.layout-column>.flex-65{flex:1 1 65%;max-width:100%;max-height:65%;box-sizing:border-box}.flex-70{flex:1 1 70%;max-width:70%;max-height:100%;box-sizing:border-box}.layout-row>.flex-70{flex:1 1 70%;max-width:70%;max-height:100%;box-sizing:border-box}.layout-column>.flex-70{flex:1 1 70%;max-width:100%;max-height:70%;box-sizing:border-box}.layout-row>.flex-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-row>.flex-70{flex:1 1 70%;max-width:70%;max-height:100%;box-sizing:border-box}.layout-column>.flex-70{flex:1 1 70%;max-width:100%;max-height:70%;box-sizing:border-box}.flex-75{flex:1 1 75%;max-width:75%;max-height:100%;box-sizing:border-box}.layout-row>.flex-75{flex:1 1 75%;max-width:75%;max-height:100%;box-sizing:border-box}.layout-column>.flex-75{flex:1 1 75%;max-width:100%;max-height:75%;box-sizing:border-box}.layout-row>.flex-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-row>.flex-75{flex:1 1 75%;max-width:75%;max-height:100%;box-sizing:border-box}.layout-column>.flex-75{flex:1 1 75%;max-width:100%;max-height:75%;box-sizing:border-box}.flex-80{flex:1 1 80%;max-width:80%;max-height:100%;box-sizing:border-box}.layout-row>.flex-80{flex:1 1 80%;max-width:80%;max-height:100%;box-sizing:border-box}.layout-column>.flex-80{flex:1 1 80%;max-width:100%;max-height:80%;box-sizing:border-box}.layout-row>.flex-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-row>.flex-80{flex:1 1 80%;max-width:80%;max-height:100%;box-sizing:border-box}.layout-column>.flex-80{flex:1 1 80%;max-width:100%;max-height:80%;box-sizing:border-box}.flex-85{flex:1 1 85%;max-width:85%;max-height:100%;box-sizing:border-box}.layout-row>.flex-85{flex:1 1 85%;max-width:85%;max-height:100%;box-sizing:border-box}.layout-column>.flex-85{flex:1 1 85%;max-width:100%;max-height:85%;box-sizing:border-box}.layout-row>.flex-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-row>.flex-85{flex:1 1 85%;max-width:85%;max-height:100%;box-sizing:border-box}.layout-column>.flex-85{flex:1 1 85%;max-width:100%;max-height:85%;box-sizing:border-box}.flex-90{flex:1 1 90%;max-width:90%;max-height:100%;box-sizing:border-box}.layout-row>.flex-90{flex:1 1 90%;max-width:90%;max-height:100%;box-sizing:border-box}.layout-column>.flex-90{flex:1 1 90%;max-width:100%;max-height:90%;box-sizing:border-box}.layout-row>.flex-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-row>.flex-90{flex:1 1 90%;max-width:90%;max-height:100%;box-sizing:border-box}.layout-column>.flex-90{flex:1 1 90%;max-width:100%;max-height:90%;box-sizing:border-box}.flex-95{flex:1 1 95%;max-width:95%;max-height:100%;box-sizing:border-box}.layout-row>.flex-95{flex:1 1 95%;max-width:95%;max-height:100%;box-sizing:border-box}.layout-column>.flex-95{flex:1 1 95%;max-width:100%;max-height:95%;box-sizing:border-box}.layout-row>.flex-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-row>.flex-95{flex:1 1 95%;max-width:95%;max-height:100%;box-sizing:border-box}.layout-column>.flex-95{flex:1 1 95%;max-width:100%;max-height:95%;box-sizing:border-box}.flex-100{flex:1 1 100%;max-width:100%;max-height:100%;box-sizing:border-box}.layout-row>.flex-100{flex:1 1 100%;max-width:100%;max-height:100%;box-sizing:border-box}.layout-column>.flex-100{flex:1 1 100%;max-width:100%;max-height:100%;box-sizing:border-box}.layout-row>.flex-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-row>.flex-100{flex:1 1 100%;max-width:100%;max-height:100%;box-sizing:border-box}.layout-column>.flex-100{flex:1 1 100%;max-width:100%;max-height:100%;box-sizing:border-box}.layout-row>.flex-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-row>.flex{min-width:0}.layout-column>.flex-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-column>.flex{min-height:0}.layout,.layout-column,.layout-row{box-sizing:border-box;display:-webkit-box;display:-webkit-flex;display:-moz-box;display:-ms-flexbox;display:flex}.layout-column{flex-direction:column}.layout-row{flex-direction:row}.layout-padding-sm>*,.layout-padding>.flex-sm{padding:4px}.layout-padding,.layout-padding-gt-sm,.layout-padding-gt-sm>*,.layout-padding-md,.layout-padding-md>*,.layout-padding>*,.layout-padding>.flex,.layout-padding>.flex-gt-sm,.layout-padding>.flex-md{padding:8px}.layout-padding-gt-lg>*,.layout-padding-gt-md>*,.layout-padding-lg>*,.layout-padding>.flex-gt-lg,.layout-padding>.flex-gt-md,.layout-padding>.flex-lg{padding:16px}.layout-margin-sm>*,.layout-margin>.flex-sm{margin:4px}.layout-margin,.layout-margin-gt-sm,.layout-margin-gt-sm>*,.layout-margin-md,.layout-margin-md>*,.layout-margin>*,.layout-margin>.flex,.layout-margin>.flex-gt-sm,.layout-margin>.flex-md{margin:8px}.layout-margin-gt-lg>*,.layout-margin-gt-md>*,.layout-margin-lg>*,.layout-margin>.flex-gt-lg,.layout-margin>.flex-gt-md,.layout-margin>.flex-lg{margin:16px}.layout-wrap{flex-wrap:wrap}.layout-nowrap{flex-wrap:nowrap}.layout-fill{margin:0;width:100%;min-height:100%;height:100%}@media (max-width:599px){.hide-xs:not(.show-xs):not(.show),.hide:not(.show-xs):not(.show){display:none}.flex-order-xs--20{order:-20}.flex-order-xs--19{order:-19}.flex-order-xs--18{order:-18}.flex-order-xs--17{order:-17}.flex-order-xs--16{order:-16}.flex-order-xs--15{order:-15}.flex-order-xs--14{order:-14}.flex-order-xs--13{order:-13}.flex-order-xs--12{order:-12}.flex-order-xs--11{order:-11}.flex-order-xs--10{order:-10}.flex-order-xs--9{order:-9}.flex-order-xs--8{order:-8}.flex-order-xs--7{order:-7}.flex-order-xs--6{order:-6}.flex-order-xs--5{order:-5}.flex-order-xs--4{order:-4}.flex-order-xs--3{order:-3}.flex-order-xs--2{order:-2}.flex-order-xs--1{order:-1}.flex-order-xs-0{order:0}.flex-order-xs-1{order:1}.flex-order-xs-2{order:2}.flex-order-xs-3{order:3}.flex-order-xs-4{order:4}.flex-order-xs-5{order:5}.flex-order-xs-6{order:6}.flex-order-xs-7{order:7}.flex-order-xs-8{order:8}.flex-order-xs-9{order:9}.flex-order-xs-10{order:10}.flex-order-xs-11{order:11}.flex-order-xs-12{order:12}.flex-order-xs-13{order:13}.flex-order-xs-14{order:14}.flex-order-xs-15{order:15}.flex-order-xs-16{order:16}.flex-order-xs-17{order:17}.flex-order-xs-18{order:18}.flex-order-xs-19{order:19}.flex-order-xs-20{order:20}.flex-offset-xs-0,.offset-xs-0{margin-left:0}[dir=rtl] .flex-offset-xs-0,[dir=rtl] .offset-xs-0{margin-left:auto;margin-right:0}.flex-offset-xs-5,.offset-xs-5{margin-left:5%}[dir=rtl] .flex-offset-xs-5,[dir=rtl] .offset-xs-5{margin-left:auto;margin-right:5%}.flex-offset-xs-10,.offset-xs-10{margin-left:10%}[dir=rtl] .flex-offset-xs-10,[dir=rtl] .offset-xs-10{margin-left:auto;margin-right:10%}.flex-offset-xs-15,.offset-xs-15{margin-left:15%}[dir=rtl] .flex-offset-xs-15,[dir=rtl] .offset-xs-15{margin-left:auto;margin-right:15%}.flex-offset-xs-20,.offset-xs-20{margin-left:20%}[dir=rtl] .flex-offset-xs-20,[dir=rtl] .offset-xs-20{margin-left:auto;margin-right:20%}.flex-offset-xs-25,.offset-xs-25{margin-left:25%}[dir=rtl] .flex-offset-xs-25,[dir=rtl] .offset-xs-25{margin-left:auto;margin-right:25%}.flex-offset-xs-30,.offset-xs-30{margin-left:30%}[dir=rtl] .flex-offset-xs-30,[dir=rtl] .offset-xs-30{margin-left:auto;margin-right:30%}.flex-offset-xs-35,.offset-xs-35{margin-left:35%}[dir=rtl] .flex-offset-xs-35,[dir=rtl] .offset-xs-35{margin-left:auto;margin-right:35%}.flex-offset-xs-40,.offset-xs-40{margin-left:40%}[dir=rtl] .flex-offset-xs-40,[dir=rtl] .offset-xs-40{margin-left:auto;margin-right:40%}.flex-offset-xs-45,.offset-xs-45{margin-left:45%}[dir=rtl] .flex-offset-xs-45,[dir=rtl] .offset-xs-45{margin-left:auto;margin-right:45%}.flex-offset-xs-50,.offset-xs-50{margin-left:50%}[dir=rtl] .flex-offset-xs-50,[dir=rtl] .offset-xs-50{margin-left:auto;margin-right:50%}.flex-offset-xs-55,.offset-xs-55{margin-left:55%}[dir=rtl] .flex-offset-xs-55,[dir=rtl] .offset-xs-55{margin-left:auto;margin-right:55%}.flex-offset-xs-60,.offset-xs-60{margin-left:60%}[dir=rtl] .flex-offset-xs-60,[dir=rtl] .offset-xs-60{margin-left:auto;margin-right:60%}.flex-offset-xs-65,.offset-xs-65{margin-left:65%}[dir=rtl] .flex-offset-xs-65,[dir=rtl] .offset-xs-65{margin-left:auto;margin-right:65%}.flex-offset-xs-70,.offset-xs-70{margin-left:70%}[dir=rtl] .flex-offset-xs-70,[dir=rtl] .offset-xs-70{margin-left:auto;margin-right:70%}.flex-offset-xs-75,.offset-xs-75{margin-left:75%}[dir=rtl] .flex-offset-xs-75,[dir=rtl] .offset-xs-75{margin-left:auto;margin-right:75%}.flex-offset-xs-80,.offset-xs-80{margin-left:80%}[dir=rtl] .flex-offset-xs-80,[dir=rtl] .offset-xs-80{margin-left:auto;margin-right:80%}.flex-offset-xs-85,.offset-xs-85{margin-left:85%}[dir=rtl] .flex-offset-xs-85,[dir=rtl] .offset-xs-85{margin-left:auto;margin-right:85%}.flex-offset-xs-90,.offset-xs-90{margin-left:90%}[dir=rtl] .flex-offset-xs-90,[dir=rtl] .offset-xs-90{margin-left:auto;margin-right:90%}.flex-offset-xs-95,.offset-xs-95{margin-left:95%}[dir=rtl] .flex-offset-xs-95,[dir=rtl] .offset-xs-95{margin-left:auto;margin-right:95%}.flex-offset-xs-33,.offset-xs-33{margin-left:calc(100% / 3)}.flex-offset-xs-66,.offset-xs-66{margin-left:calc(200% / 3)}[dir=rtl] .flex-offset-xs-66,[dir=rtl] .offset-xs-66{margin-left:auto;margin-right:calc(200% / 3)}.layout-align-xs,.layout-align-xs-start-stretch{justify-content:flex-start;align-content:stretch;align-items:stretch}.layout-align-xs-start,.layout-align-xs-start-center,.layout-align-xs-start-end,.layout-align-xs-start-start,.layout-align-xs-start-stretch{justify-content:flex-start}.layout-align-xs-center,.layout-align-xs-center-center,.layout-align-xs-center-end,.layout-align-xs-center-start,.layout-align-xs-center-stretch{justify-content:center}.layout-align-xs-end,.layout-align-xs-end-center,.layout-align-xs-end-end,.layout-align-xs-end-start,.layout-align-xs-end-stretch{justify-content:flex-end}.layout-align-xs-space-around,.layout-align-xs-space-around-center,.layout-align-xs-space-around-end,.layout-align-xs-space-around-start,.layout-align-xs-space-around-stretch{justify-content:space-around}.layout-align-xs-space-between,.layout-align-xs-space-between-center,.layout-align-xs-space-between-end,.layout-align-xs-space-between-start,.layout-align-xs-space-between-stretch{justify-content:space-between}.layout-align-xs-center-start,.layout-align-xs-end-start,.layout-align-xs-space-around-start,.layout-align-xs-space-between-start,.layout-align-xs-start-start{align-items:flex-start;align-content:flex-start}.layout-align-xs-center-center,.layout-align-xs-end-center,.layout-align-xs-space-around-center,.layout-align-xs-space-between-center,.layout-align-xs-start-center{align-items:center;align-content:center;max-width:100%}.layout-align-xs-center-center>*,.layout-align-xs-end-center>*,.layout-align-xs-space-around-center>*,.layout-align-xs-space-between-center>*,.layout-align-xs-start-center>*{max-width:100%;box-sizing:border-box}.layout-align-xs-center-end,.layout-align-xs-end-end,.layout-align-xs-space-around-end,.layout-align-xs-space-between-end,.layout-align-xs-start-end{align-items:flex-end;align-content:flex-end}.layout-align-xs-center-stretch,.layout-align-xs-end-stretch,.layout-align-xs-space-around-stretch,.layout-align-xs-space-between-stretch,.layout-align-xs-start-stretch{align-items:stretch;align-content:stretch}.flex-xs{flex:1;box-sizing:border-box}.flex-xs-grow{flex:1 1 100%;box-sizing:border-box}.flex-xs-initial{flex:0 1 auto;box-sizing:border-box}.flex-xs-auto{flex:1 1 auto;box-sizing:border-box}.flex-xs-none{flex:0 0 auto;box-sizing:border-box}.flex-xs-noshrink{flex:1 0 auto;box-sizing:border-box}.flex-xs-nogrow{flex:0 1 auto;box-sizing:border-box}.flex-xs-0{flex:1 1 0%;max-width:0%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xs-0{flex:1 1 0%;max-width:0%;max-height:100%;box-sizing:border-box;min-width:0}.layout-column>.flex-xs-0{flex:1 1 0%;max-width:100%;max-height:0%;box-sizing:border-box}.layout-row>.flex-xs-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xs-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-xs-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-xs-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-xs-row>.flex-xs-0{flex:1 1 0%;max-width:0%;max-height:100%;box-sizing:border-box;min-width:0}.layout-xs-column>.flex-xs-0{flex:1 1 0%;max-width:100%;max-height:0%;box-sizing:border-box;min-height:0}.flex-xs-5{flex:1 1 5%;max-width:5%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xs-5{flex:1 1 5%;max-width:5%;max-height:100%;box-sizing:border-box}.layout-column>.flex-xs-5{flex:1 1 5%;max-width:100%;max-height:5%;box-sizing:border-box}.layout-row>.flex-xs-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xs-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-xs-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-xs-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-xs-row>.flex-xs-5{flex:1 1 5%;max-width:5%;max-height:100%;box-sizing:border-box}.layout-xs-column>.flex-xs-5{flex:1 1 5%;max-width:100%;max-height:5%;box-sizing:border-box}.flex-xs-10{flex:1 1 10%;max-width:10%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xs-10{flex:1 1 10%;max-width:10%;max-height:100%;box-sizing:border-box}.layout-column>.flex-xs-10{flex:1 1 10%;max-width:100%;max-height:10%;box-sizing:border-box}.layout-row>.flex-xs-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xs-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-xs-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-xs-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-xs-row>.flex-xs-10{flex:1 1 10%;max-width:10%;max-height:100%;box-sizing:border-box}.layout-xs-column>.flex-xs-10{flex:1 1 10%;max-width:100%;max-height:10%;box-sizing:border-box}.flex-xs-15{flex:1 1 15%;max-width:15%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xs-15{flex:1 1 15%;max-width:15%;max-height:100%;box-sizing:border-box}.layout-column>.flex-xs-15{flex:1 1 15%;max-width:100%;max-height:15%;box-sizing:border-box}.layout-row>.flex-xs-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xs-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-xs-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-xs-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-xs-row>.flex-xs-15{flex:1 1 15%;max-width:15%;max-height:100%;box-sizing:border-box}.layout-xs-column>.flex-xs-15{flex:1 1 15%;max-width:100%;max-height:15%;box-sizing:border-box}.flex-xs-20{flex:1 1 20%;max-width:20%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xs-20{flex:1 1 20%;max-width:20%;max-height:100%;box-sizing:border-box}.layout-column>.flex-xs-20{flex:1 1 20%;max-width:100%;max-height:20%;box-sizing:border-box}.layout-row>.flex-xs-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xs-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-xs-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-xs-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-xs-row>.flex-xs-20{flex:1 1 20%;max-width:20%;max-height:100%;box-sizing:border-box}.layout-xs-column>.flex-xs-20{flex:1 1 20%;max-width:100%;max-height:20%;box-sizing:border-box}.flex-xs-25{flex:1 1 25%;max-width:25%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xs-25{flex:1 1 25%;max-width:25%;max-height:100%;box-sizing:border-box}.layout-column>.flex-xs-25{flex:1 1 25%;max-width:100%;max-height:25%;box-sizing:border-box}.layout-row>.flex-xs-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xs-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-xs-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-xs-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-xs-row>.flex-xs-25{flex:1 1 25%;max-width:25%;max-height:100%;box-sizing:border-box}.layout-xs-column>.flex-xs-25{flex:1 1 25%;max-width:100%;max-height:25%;box-sizing:border-box}.flex-xs-30{flex:1 1 30%;max-width:30%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xs-30{flex:1 1 30%;max-width:30%;max-height:100%;box-sizing:border-box}.layout-column>.flex-xs-30{flex:1 1 30%;max-width:100%;max-height:30%;box-sizing:border-box}.layout-row>.flex-xs-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xs-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-xs-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-xs-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-xs-row>.flex-xs-30{flex:1 1 30%;max-width:30%;max-height:100%;box-sizing:border-box}.layout-xs-column>.flex-xs-30{flex:1 1 30%;max-width:100%;max-height:30%;box-sizing:border-box}.flex-xs-35{flex:1 1 35%;max-width:35%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xs-35{flex:1 1 35%;max-width:35%;max-height:100%;box-sizing:border-box}.layout-column>.flex-xs-35{flex:1 1 35%;max-width:100%;max-height:35%;box-sizing:border-box}.layout-row>.flex-xs-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xs-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-xs-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-xs-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-xs-row>.flex-xs-35{flex:1 1 35%;max-width:35%;max-height:100%;box-sizing:border-box}.layout-xs-column>.flex-xs-35{flex:1 1 35%;max-width:100%;max-height:35%;box-sizing:border-box}.flex-xs-40{flex:1 1 40%;max-width:40%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xs-40{flex:1 1 40%;max-width:40%;max-height:100%;box-sizing:border-box}.layout-column>.flex-xs-40{flex:1 1 40%;max-width:100%;max-height:40%;box-sizing:border-box}.layout-row>.flex-xs-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xs-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-xs-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-xs-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-xs-row>.flex-xs-40{flex:1 1 40%;max-width:40%;max-height:100%;box-sizing:border-box}.layout-xs-column>.flex-xs-40{flex:1 1 40%;max-width:100%;max-height:40%;box-sizing:border-box}.flex-xs-45{flex:1 1 45%;max-width:45%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xs-45{flex:1 1 45%;max-width:45%;max-height:100%;box-sizing:border-box}.layout-column>.flex-xs-45{flex:1 1 45%;max-width:100%;max-height:45%;box-sizing:border-box}.layout-row>.flex-xs-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xs-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-xs-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-xs-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-xs-row>.flex-xs-45{flex:1 1 45%;max-width:45%;max-height:100%;box-sizing:border-box}.layout-xs-column>.flex-xs-45{flex:1 1 45%;max-width:100%;max-height:45%;box-sizing:border-box}.flex-xs-50{flex:1 1 50%;max-width:50%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xs-50{flex:1 1 50%;max-width:50%;max-height:100%;box-sizing:border-box}.layout-column>.flex-xs-50{flex:1 1 50%;max-width:100%;max-height:50%;box-sizing:border-box}.layout-row>.flex-xs-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xs-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-xs-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-xs-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-xs-row>.flex-xs-50{flex:1 1 50%;max-width:50%;max-height:100%;box-sizing:border-box}.layout-xs-column>.flex-xs-50{flex:1 1 50%;max-width:100%;max-height:50%;box-sizing:border-box}.flex-xs-55{flex:1 1 55%;max-width:55%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xs-55{flex:1 1 55%;max-width:55%;max-height:100%;box-sizing:border-box}.layout-column>.flex-xs-55{flex:1 1 55%;max-width:100%;max-height:55%;box-sizing:border-box}.layout-row>.flex-xs-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xs-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-xs-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-xs-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-xs-row>.flex-xs-55{flex:1 1 55%;max-width:55%;max-height:100%;box-sizing:border-box}.layout-xs-column>.flex-xs-55{flex:1 1 55%;max-width:100%;max-height:55%;box-sizing:border-box}.flex-xs-60{flex:1 1 60%;max-width:60%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xs-60{flex:1 1 60%;max-width:60%;max-height:100%;box-sizing:border-box}.layout-column>.flex-xs-60{flex:1 1 60%;max-width:100%;max-height:60%;box-sizing:border-box}.layout-row>.flex-xs-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xs-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-xs-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-xs-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-xs-row>.flex-xs-60{flex:1 1 60%;max-width:60%;max-height:100%;box-sizing:border-box}.layout-xs-column>.flex-xs-60{flex:1 1 60%;max-width:100%;max-height:60%;box-sizing:border-box}.flex-xs-65{flex:1 1 65%;max-width:65%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xs-65{flex:1 1 65%;max-width:65%;max-height:100%;box-sizing:border-box}.layout-column>.flex-xs-65{flex:1 1 65%;max-width:100%;max-height:65%;box-sizing:border-box}.layout-row>.flex-xs-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xs-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-xs-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-xs-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-xs-row>.flex-xs-65{flex:1 1 65%;max-width:65%;max-height:100%;box-sizing:border-box}.layout-xs-column>.flex-xs-65{flex:1 1 65%;max-width:100%;max-height:65%;box-sizing:border-box}.flex-xs-70{flex:1 1 70%;max-width:70%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xs-70{flex:1 1 70%;max-width:70%;max-height:100%;box-sizing:border-box}.layout-column>.flex-xs-70{flex:1 1 70%;max-width:100%;max-height:70%;box-sizing:border-box}.layout-row>.flex-xs-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xs-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-xs-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-xs-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-xs-row>.flex-xs-70{flex:1 1 70%;max-width:70%;max-height:100%;box-sizing:border-box}.layout-xs-column>.flex-xs-70{flex:1 1 70%;max-width:100%;max-height:70%;box-sizing:border-box}.flex-xs-75{flex:1 1 75%;max-width:75%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xs-75{flex:1 1 75%;max-width:75%;max-height:100%;box-sizing:border-box}.layout-column>.flex-xs-75{flex:1 1 75%;max-width:100%;max-height:75%;box-sizing:border-box}.layout-row>.flex-xs-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xs-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-xs-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-xs-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-xs-row>.flex-xs-75{flex:1 1 75%;max-width:75%;max-height:100%;box-sizing:border-box}.layout-xs-column>.flex-xs-75{flex:1 1 75%;max-width:100%;max-height:75%;box-sizing:border-box}.flex-xs-80{flex:1 1 80%;max-width:80%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xs-80{flex:1 1 80%;max-width:80%;max-height:100%;box-sizing:border-box}.layout-column>.flex-xs-80{flex:1 1 80%;max-width:100%;max-height:80%;box-sizing:border-box}.layout-row>.flex-xs-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xs-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-xs-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-xs-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-xs-row>.flex-xs-80{flex:1 1 80%;max-width:80%;max-height:100%;box-sizing:border-box}.layout-xs-column>.flex-xs-80{flex:1 1 80%;max-width:100%;max-height:80%;box-sizing:border-box}.flex-xs-85{flex:1 1 85%;max-width:85%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xs-85{flex:1 1 85%;max-width:85%;max-height:100%;box-sizing:border-box}.layout-column>.flex-xs-85{flex:1 1 85%;max-width:100%;max-height:85%;box-sizing:border-box}.layout-row>.flex-xs-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xs-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-xs-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-xs-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-xs-row>.flex-xs-85{flex:1 1 85%;max-width:85%;max-height:100%;box-sizing:border-box}.layout-xs-column>.flex-xs-85{flex:1 1 85%;max-width:100%;max-height:85%;box-sizing:border-box}.flex-xs-90{flex:1 1 90%;max-width:90%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xs-90{flex:1 1 90%;max-width:90%;max-height:100%;box-sizing:border-box}.layout-column>.flex-xs-90{flex:1 1 90%;max-width:100%;max-height:90%;box-sizing:border-box}.layout-row>.flex-xs-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xs-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-xs-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-xs-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-xs-row>.flex-xs-90{flex:1 1 90%;max-width:90%;max-height:100%;box-sizing:border-box}.layout-xs-column>.flex-xs-90{flex:1 1 90%;max-width:100%;max-height:90%;box-sizing:border-box}.flex-xs-95{flex:1 1 95%;max-width:95%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xs-95{flex:1 1 95%;max-width:95%;max-height:100%;box-sizing:border-box}.layout-column>.flex-xs-95{flex:1 1 95%;max-width:100%;max-height:95%;box-sizing:border-box}.layout-row>.flex-xs-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xs-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-xs-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-xs-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-xs-row>.flex-xs-95{flex:1 1 95%;max-width:95%;max-height:100%;box-sizing:border-box}.layout-xs-column>.flex-xs-95{flex:1 1 95%;max-width:100%;max-height:95%;box-sizing:border-box}.flex-xs-100{flex:1 1 100%;max-width:100%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xs-100{flex:1 1 100%;max-width:100%;max-height:100%;box-sizing:border-box}.layout-column>.flex-xs-100{flex:1 1 100%;max-width:100%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xs-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xs-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-xs-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-xs-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-xs-row>.flex-xs-100{flex:1 1 100%;max-width:100%;max-height:100%;box-sizing:border-box}.layout-xs-column>.flex-xs-100{flex:1 1 100%;max-width:100%;max-height:100%;box-sizing:border-box}.layout-xs-row>.flex-xs-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-xs-row>.flex-xs-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-xs-row>.flex{min-width:0}.layout-xs-column>.flex-xs-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-xs-column>.flex-xs-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-xs-column>.flex{min-height:0}.layout-xs,.layout-xs-column,.layout-xs-row{box-sizing:border-box;display:-webkit-box;display:-webkit-flex;display:-moz-box;display:-ms-flexbox;display:flex}.layout-xs-column{flex-direction:column}.layout-xs-row{flex-direction:row}}@media (min-width:600px){.flex-order-gt-xs--20{order:-20}.flex-order-gt-xs--19{order:-19}.flex-order-gt-xs--18{order:-18}.flex-order-gt-xs--17{order:-17}.flex-order-gt-xs--16{order:-16}.flex-order-gt-xs--15{order:-15}.flex-order-gt-xs--14{order:-14}.flex-order-gt-xs--13{order:-13}.flex-order-gt-xs--12{order:-12}.flex-order-gt-xs--11{order:-11}.flex-order-gt-xs--10{order:-10}.flex-order-gt-xs--9{order:-9}.flex-order-gt-xs--8{order:-8}.flex-order-gt-xs--7{order:-7}.flex-order-gt-xs--6{order:-6}.flex-order-gt-xs--5{order:-5}.flex-order-gt-xs--4{order:-4}.flex-order-gt-xs--3{order:-3}.flex-order-gt-xs--2{order:-2}.flex-order-gt-xs--1{order:-1}.flex-order-gt-xs-0{order:0}.flex-order-gt-xs-1{order:1}.flex-order-gt-xs-2{order:2}.flex-order-gt-xs-3{order:3}.flex-order-gt-xs-4{order:4}.flex-order-gt-xs-5{order:5}.flex-order-gt-xs-6{order:6}.flex-order-gt-xs-7{order:7}.flex-order-gt-xs-8{order:8}.flex-order-gt-xs-9{order:9}.flex-order-gt-xs-10{order:10}.flex-order-gt-xs-11{order:11}.flex-order-gt-xs-12{order:12}.flex-order-gt-xs-13{order:13}.flex-order-gt-xs-14{order:14}.flex-order-gt-xs-15{order:15}.flex-order-gt-xs-16{order:16}.flex-order-gt-xs-17{order:17}.flex-order-gt-xs-18{order:18}.flex-order-gt-xs-19{order:19}.flex-order-gt-xs-20{order:20}.flex-offset-gt-xs-0,.offset-gt-xs-0{margin-left:0}[dir=rtl] .flex-offset-gt-xs-0,[dir=rtl] .offset-gt-xs-0{margin-left:auto;margin-right:0}.flex-offset-gt-xs-5,.offset-gt-xs-5{margin-left:5%}[dir=rtl] .flex-offset-gt-xs-5,[dir=rtl] .offset-gt-xs-5{margin-left:auto;margin-right:5%}.flex-offset-gt-xs-10,.offset-gt-xs-10{margin-left:10%}[dir=rtl] .flex-offset-gt-xs-10,[dir=rtl] .offset-gt-xs-10{margin-left:auto;margin-right:10%}.flex-offset-gt-xs-15,.offset-gt-xs-15{margin-left:15%}[dir=rtl] .flex-offset-gt-xs-15,[dir=rtl] .offset-gt-xs-15{margin-left:auto;margin-right:15%}.flex-offset-gt-xs-20,.offset-gt-xs-20{margin-left:20%}[dir=rtl] .flex-offset-gt-xs-20,[dir=rtl] .offset-gt-xs-20{margin-left:auto;margin-right:20%}.flex-offset-gt-xs-25,.offset-gt-xs-25{margin-left:25%}[dir=rtl] .flex-offset-gt-xs-25,[dir=rtl] .offset-gt-xs-25{margin-left:auto;margin-right:25%}.flex-offset-gt-xs-30,.offset-gt-xs-30{margin-left:30%}[dir=rtl] .flex-offset-gt-xs-30,[dir=rtl] .offset-gt-xs-30{margin-left:auto;margin-right:30%}.flex-offset-gt-xs-35,.offset-gt-xs-35{margin-left:35%}[dir=rtl] .flex-offset-gt-xs-35,[dir=rtl] .offset-gt-xs-35{margin-left:auto;margin-right:35%}.flex-offset-gt-xs-40,.offset-gt-xs-40{margin-left:40%}[dir=rtl] .flex-offset-gt-xs-40,[dir=rtl] .offset-gt-xs-40{margin-left:auto;margin-right:40%}.flex-offset-gt-xs-45,.offset-gt-xs-45{margin-left:45%}[dir=rtl] .flex-offset-gt-xs-45,[dir=rtl] .offset-gt-xs-45{margin-left:auto;margin-right:45%}.flex-offset-gt-xs-50,.offset-gt-xs-50{margin-left:50%}[dir=rtl] .flex-offset-gt-xs-50,[dir=rtl] .offset-gt-xs-50{margin-left:auto;margin-right:50%}.flex-offset-gt-xs-55,.offset-gt-xs-55{margin-left:55%}[dir=rtl] .flex-offset-gt-xs-55,[dir=rtl] .offset-gt-xs-55{margin-left:auto;margin-right:55%}.flex-offset-gt-xs-60,.offset-gt-xs-60{margin-left:60%}[dir=rtl] .flex-offset-gt-xs-60,[dir=rtl] .offset-gt-xs-60{margin-left:auto;margin-right:60%}.flex-offset-gt-xs-65,.offset-gt-xs-65{margin-left:65%}[dir=rtl] .flex-offset-gt-xs-65,[dir=rtl] .offset-gt-xs-65{margin-left:auto;margin-right:65%}.flex-offset-gt-xs-70,.offset-gt-xs-70{margin-left:70%}[dir=rtl] .flex-offset-gt-xs-70,[dir=rtl] .offset-gt-xs-70{margin-left:auto;margin-right:70%}.flex-offset-gt-xs-75,.offset-gt-xs-75{margin-left:75%}[dir=rtl] .flex-offset-gt-xs-75,[dir=rtl] .offset-gt-xs-75{margin-left:auto;margin-right:75%}.flex-offset-gt-xs-80,.offset-gt-xs-80{margin-left:80%}[dir=rtl] .flex-offset-gt-xs-80,[dir=rtl] .offset-gt-xs-80{margin-left:auto;margin-right:80%}.flex-offset-gt-xs-85,.offset-gt-xs-85{margin-left:85%}[dir=rtl] .flex-offset-gt-xs-85,[dir=rtl] .offset-gt-xs-85{margin-left:auto;margin-right:85%}.flex-offset-gt-xs-90,.offset-gt-xs-90{margin-left:90%}[dir=rtl] .flex-offset-gt-xs-90,[dir=rtl] .offset-gt-xs-90{margin-left:auto;margin-right:90%}.flex-offset-gt-xs-95,.offset-gt-xs-95{margin-left:95%}[dir=rtl] .flex-offset-gt-xs-95,[dir=rtl] .offset-gt-xs-95{margin-left:auto;margin-right:95%}.flex-offset-gt-xs-33,.offset-gt-xs-33{margin-left:calc(100% / 3)}.flex-offset-gt-xs-66,.offset-gt-xs-66{margin-left:calc(200% / 3)}[dir=rtl] .flex-offset-gt-xs-66,[dir=rtl] .offset-gt-xs-66{margin-left:auto;margin-right:calc(200% / 3)}.layout-align-gt-xs,.layout-align-gt-xs-start-stretch{justify-content:flex-start;align-content:stretch;align-items:stretch}.layout-align-gt-xs-start,.layout-align-gt-xs-start-center,.layout-align-gt-xs-start-end,.layout-align-gt-xs-start-start,.layout-align-gt-xs-start-stretch{justify-content:flex-start}.layout-align-gt-xs-center,.layout-align-gt-xs-center-center,.layout-align-gt-xs-center-end,.layout-align-gt-xs-center-start,.layout-align-gt-xs-center-stretch{justify-content:center}.layout-align-gt-xs-end,.layout-align-gt-xs-end-center,.layout-align-gt-xs-end-end,.layout-align-gt-xs-end-start,.layout-align-gt-xs-end-stretch{justify-content:flex-end}.layout-align-gt-xs-space-around,.layout-align-gt-xs-space-around-center,.layout-align-gt-xs-space-around-end,.layout-align-gt-xs-space-around-start,.layout-align-gt-xs-space-around-stretch{justify-content:space-around}.layout-align-gt-xs-space-between,.layout-align-gt-xs-space-between-center,.layout-align-gt-xs-space-between-end,.layout-align-gt-xs-space-between-start,.layout-align-gt-xs-space-between-stretch{justify-content:space-between}.layout-align-gt-xs-center-start,.layout-align-gt-xs-end-start,.layout-align-gt-xs-space-around-start,.layout-align-gt-xs-space-between-start,.layout-align-gt-xs-start-start{align-items:flex-start;align-content:flex-start}.layout-align-gt-xs-center-center,.layout-align-gt-xs-end-center,.layout-align-gt-xs-space-around-center,.layout-align-gt-xs-space-between-center,.layout-align-gt-xs-start-center{align-items:center;align-content:center;max-width:100%}.layout-align-gt-xs-center-center>*,.layout-align-gt-xs-end-center>*,.layout-align-gt-xs-space-around-center>*,.layout-align-gt-xs-space-between-center>*,.layout-align-gt-xs-start-center>*{max-width:100%;box-sizing:border-box}.layout-align-gt-xs-center-end,.layout-align-gt-xs-end-end,.layout-align-gt-xs-space-around-end,.layout-align-gt-xs-space-between-end,.layout-align-gt-xs-start-end{align-items:flex-end;align-content:flex-end}.layout-align-gt-xs-center-stretch,.layout-align-gt-xs-end-stretch,.layout-align-gt-xs-space-around-stretch,.layout-align-gt-xs-space-between-stretch,.layout-align-gt-xs-start-stretch{align-items:stretch;align-content:stretch}.flex-gt-xs{flex:1;box-sizing:border-box}.flex-gt-xs-grow{flex:1 1 100%;box-sizing:border-box}.flex-gt-xs-initial{flex:0 1 auto;box-sizing:border-box}.flex-gt-xs-auto{flex:1 1 auto;box-sizing:border-box}.flex-gt-xs-none{flex:0 0 auto;box-sizing:border-box}.flex-gt-xs-noshrink{flex:1 0 auto;box-sizing:border-box}.flex-gt-xs-nogrow{flex:0 1 auto;box-sizing:border-box}.flex-gt-xs-0{flex:1 1 0%;max-width:0%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-xs-0{flex:1 1 0%;max-width:0%;max-height:100%;box-sizing:border-box;min-width:0}.layout-column>.flex-gt-xs-0{flex:1 1 0%;max-width:100%;max-height:0%;box-sizing:border-box}.layout-row>.flex-gt-xs-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-xs-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-xs-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-xs-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-xs-row>.flex-gt-xs-0{flex:1 1 0%;max-width:0%;max-height:100%;box-sizing:border-box;min-width:0}.layout-gt-xs-column>.flex-gt-xs-0{flex:1 1 0%;max-width:100%;max-height:0%;box-sizing:border-box;min-height:0}.flex-gt-xs-5{flex:1 1 5%;max-width:5%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-xs-5{flex:1 1 5%;max-width:5%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-xs-5{flex:1 1 5%;max-width:100%;max-height:5%;box-sizing:border-box}.layout-row>.flex-gt-xs-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-xs-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-xs-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-xs-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-xs-row>.flex-gt-xs-5{flex:1 1 5%;max-width:5%;max-height:100%;box-sizing:border-box}.layout-gt-xs-column>.flex-gt-xs-5{flex:1 1 5%;max-width:100%;max-height:5%;box-sizing:border-box}.flex-gt-xs-10{flex:1 1 10%;max-width:10%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-xs-10{flex:1 1 10%;max-width:10%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-xs-10{flex:1 1 10%;max-width:100%;max-height:10%;box-sizing:border-box}.layout-row>.flex-gt-xs-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-xs-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-xs-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-xs-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-xs-row>.flex-gt-xs-10{flex:1 1 10%;max-width:10%;max-height:100%;box-sizing:border-box}.layout-gt-xs-column>.flex-gt-xs-10{flex:1 1 10%;max-width:100%;max-height:10%;box-sizing:border-box}.flex-gt-xs-15{flex:1 1 15%;max-width:15%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-xs-15{flex:1 1 15%;max-width:15%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-xs-15{flex:1 1 15%;max-width:100%;max-height:15%;box-sizing:border-box}.layout-row>.flex-gt-xs-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-xs-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-xs-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-xs-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-xs-row>.flex-gt-xs-15{flex:1 1 15%;max-width:15%;max-height:100%;box-sizing:border-box}.layout-gt-xs-column>.flex-gt-xs-15{flex:1 1 15%;max-width:100%;max-height:15%;box-sizing:border-box}.flex-gt-xs-20{flex:1 1 20%;max-width:20%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-xs-20{flex:1 1 20%;max-width:20%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-xs-20{flex:1 1 20%;max-width:100%;max-height:20%;box-sizing:border-box}.layout-row>.flex-gt-xs-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-xs-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-xs-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-xs-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-xs-row>.flex-gt-xs-20{flex:1 1 20%;max-width:20%;max-height:100%;box-sizing:border-box}.layout-gt-xs-column>.flex-gt-xs-20{flex:1 1 20%;max-width:100%;max-height:20%;box-sizing:border-box}.flex-gt-xs-25{flex:1 1 25%;max-width:25%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-xs-25{flex:1 1 25%;max-width:25%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-xs-25{flex:1 1 25%;max-width:100%;max-height:25%;box-sizing:border-box}.layout-row>.flex-gt-xs-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-xs-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-xs-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-xs-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-xs-row>.flex-gt-xs-25{flex:1 1 25%;max-width:25%;max-height:100%;box-sizing:border-box}.layout-gt-xs-column>.flex-gt-xs-25{flex:1 1 25%;max-width:100%;max-height:25%;box-sizing:border-box}.flex-gt-xs-30{flex:1 1 30%;max-width:30%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-xs-30{flex:1 1 30%;max-width:30%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-xs-30{flex:1 1 30%;max-width:100%;max-height:30%;box-sizing:border-box}.layout-row>.flex-gt-xs-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-xs-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-xs-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-xs-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-xs-row>.flex-gt-xs-30{flex:1 1 30%;max-width:30%;max-height:100%;box-sizing:border-box}.layout-gt-xs-column>.flex-gt-xs-30{flex:1 1 30%;max-width:100%;max-height:30%;box-sizing:border-box}.flex-gt-xs-35{flex:1 1 35%;max-width:35%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-xs-35{flex:1 1 35%;max-width:35%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-xs-35{flex:1 1 35%;max-width:100%;max-height:35%;box-sizing:border-box}.layout-row>.flex-gt-xs-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-xs-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-xs-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-xs-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-xs-row>.flex-gt-xs-35{flex:1 1 35%;max-width:35%;max-height:100%;box-sizing:border-box}.layout-gt-xs-column>.flex-gt-xs-35{flex:1 1 35%;max-width:100%;max-height:35%;box-sizing:border-box}.flex-gt-xs-40{flex:1 1 40%;max-width:40%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-xs-40{flex:1 1 40%;max-width:40%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-xs-40{flex:1 1 40%;max-width:100%;max-height:40%;box-sizing:border-box}.layout-row>.flex-gt-xs-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-xs-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-xs-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-xs-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-xs-row>.flex-gt-xs-40{flex:1 1 40%;max-width:40%;max-height:100%;box-sizing:border-box}.layout-gt-xs-column>.flex-gt-xs-40{flex:1 1 40%;max-width:100%;max-height:40%;box-sizing:border-box}.flex-gt-xs-45{flex:1 1 45%;max-width:45%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-xs-45{flex:1 1 45%;max-width:45%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-xs-45{flex:1 1 45%;max-width:100%;max-height:45%;box-sizing:border-box}.layout-row>.flex-gt-xs-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-xs-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-xs-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-xs-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-xs-row>.flex-gt-xs-45{flex:1 1 45%;max-width:45%;max-height:100%;box-sizing:border-box}.layout-gt-xs-column>.flex-gt-xs-45{flex:1 1 45%;max-width:100%;max-height:45%;box-sizing:border-box}.flex-gt-xs-50{flex:1 1 50%;max-width:50%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-xs-50{flex:1 1 50%;max-width:50%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-xs-50{flex:1 1 50%;max-width:100%;max-height:50%;box-sizing:border-box}.layout-row>.flex-gt-xs-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-xs-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-xs-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-xs-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-xs-row>.flex-gt-xs-50{flex:1 1 50%;max-width:50%;max-height:100%;box-sizing:border-box}.layout-gt-xs-column>.flex-gt-xs-50{flex:1 1 50%;max-width:100%;max-height:50%;box-sizing:border-box}.flex-gt-xs-55{flex:1 1 55%;max-width:55%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-xs-55{flex:1 1 55%;max-width:55%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-xs-55{flex:1 1 55%;max-width:100%;max-height:55%;box-sizing:border-box}.layout-row>.flex-gt-xs-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-xs-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-xs-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-xs-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-xs-row>.flex-gt-xs-55{flex:1 1 55%;max-width:55%;max-height:100%;box-sizing:border-box}.layout-gt-xs-column>.flex-gt-xs-55{flex:1 1 55%;max-width:100%;max-height:55%;box-sizing:border-box}.flex-gt-xs-60{flex:1 1 60%;max-width:60%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-xs-60{flex:1 1 60%;max-width:60%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-xs-60{flex:1 1 60%;max-width:100%;max-height:60%;box-sizing:border-box}.layout-row>.flex-gt-xs-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-xs-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-xs-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-xs-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-xs-row>.flex-gt-xs-60{flex:1 1 60%;max-width:60%;max-height:100%;box-sizing:border-box}.layout-gt-xs-column>.flex-gt-xs-60{flex:1 1 60%;max-width:100%;max-height:60%;box-sizing:border-box}.flex-gt-xs-65{flex:1 1 65%;max-width:65%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-xs-65{flex:1 1 65%;max-width:65%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-xs-65{flex:1 1 65%;max-width:100%;max-height:65%;box-sizing:border-box}.layout-row>.flex-gt-xs-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-xs-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-xs-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-xs-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-xs-row>.flex-gt-xs-65{flex:1 1 65%;max-width:65%;max-height:100%;box-sizing:border-box}.layout-gt-xs-column>.flex-gt-xs-65{flex:1 1 65%;max-width:100%;max-height:65%;box-sizing:border-box}.flex-gt-xs-70{flex:1 1 70%;max-width:70%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-xs-70{flex:1 1 70%;max-width:70%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-xs-70{flex:1 1 70%;max-width:100%;max-height:70%;box-sizing:border-box}.layout-row>.flex-gt-xs-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-xs-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-xs-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-xs-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-xs-row>.flex-gt-xs-70{flex:1 1 70%;max-width:70%;max-height:100%;box-sizing:border-box}.layout-gt-xs-column>.flex-gt-xs-70{flex:1 1 70%;max-width:100%;max-height:70%;box-sizing:border-box}.flex-gt-xs-75{flex:1 1 75%;max-width:75%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-xs-75{flex:1 1 75%;max-width:75%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-xs-75{flex:1 1 75%;max-width:100%;max-height:75%;box-sizing:border-box}.layout-row>.flex-gt-xs-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-xs-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-xs-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-xs-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-xs-row>.flex-gt-xs-75{flex:1 1 75%;max-width:75%;max-height:100%;box-sizing:border-box}.layout-gt-xs-column>.flex-gt-xs-75{flex:1 1 75%;max-width:100%;max-height:75%;box-sizing:border-box}.flex-gt-xs-80{flex:1 1 80%;max-width:80%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-xs-80{flex:1 1 80%;max-width:80%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-xs-80{flex:1 1 80%;max-width:100%;max-height:80%;box-sizing:border-box}.layout-row>.flex-gt-xs-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-xs-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-xs-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-xs-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-xs-row>.flex-gt-xs-80{flex:1 1 80%;max-width:80%;max-height:100%;box-sizing:border-box}.layout-gt-xs-column>.flex-gt-xs-80{flex:1 1 80%;max-width:100%;max-height:80%;box-sizing:border-box}.flex-gt-xs-85{flex:1 1 85%;max-width:85%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-xs-85{flex:1 1 85%;max-width:85%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-xs-85{flex:1 1 85%;max-width:100%;max-height:85%;box-sizing:border-box}.layout-row>.flex-gt-xs-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-xs-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-xs-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-xs-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-xs-row>.flex-gt-xs-85{flex:1 1 85%;max-width:85%;max-height:100%;box-sizing:border-box}.layout-gt-xs-column>.flex-gt-xs-85{flex:1 1 85%;max-width:100%;max-height:85%;box-sizing:border-box}.flex-gt-xs-90{flex:1 1 90%;max-width:90%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-xs-90{flex:1 1 90%;max-width:90%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-xs-90{flex:1 1 90%;max-width:100%;max-height:90%;box-sizing:border-box}.layout-row>.flex-gt-xs-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-xs-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-xs-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-xs-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-xs-row>.flex-gt-xs-90{flex:1 1 90%;max-width:90%;max-height:100%;box-sizing:border-box}.layout-gt-xs-column>.flex-gt-xs-90{flex:1 1 90%;max-width:100%;max-height:90%;box-sizing:border-box}.flex-gt-xs-95{flex:1 1 95%;max-width:95%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-xs-95{flex:1 1 95%;max-width:95%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-xs-95{flex:1 1 95%;max-width:100%;max-height:95%;box-sizing:border-box}.layout-row>.flex-gt-xs-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-xs-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-xs-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-xs-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-xs-row>.flex-gt-xs-95{flex:1 1 95%;max-width:95%;max-height:100%;box-sizing:border-box}.layout-gt-xs-column>.flex-gt-xs-95{flex:1 1 95%;max-width:100%;max-height:95%;box-sizing:border-box}.flex-gt-xs-100{flex:1 1 100%;max-width:100%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-xs-100{flex:1 1 100%;max-width:100%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-xs-100{flex:1 1 100%;max-width:100%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-xs-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-xs-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-xs-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-xs-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-xs-row>.flex-gt-xs-100{flex:1 1 100%;max-width:100%;max-height:100%;box-sizing:border-box}.layout-gt-xs-column>.flex-gt-xs-100{flex:1 1 100%;max-width:100%;max-height:100%;box-sizing:border-box}.layout-gt-xs-row>.flex-gt-xs-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-gt-xs-row>.flex-gt-xs-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-gt-xs-row>.flex{min-width:0}.layout-gt-xs-column>.flex-gt-xs-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-gt-xs-column>.flex-gt-xs-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-xs-column>.flex{min-height:0}.layout-gt-xs,.layout-gt-xs-column,.layout-gt-xs-row{box-sizing:border-box;display:-webkit-box;display:-webkit-flex;display:-moz-box;display:-ms-flexbox;display:flex}.layout-gt-xs-column{flex-direction:column}.layout-gt-xs-row{flex-direction:row}}@media (min-width:600px) and (max-width:959px){.hide-gt-xs:not(.show-gt-xs):not(.show-sm):not(.show),.hide:not(.show-gt-xs):not(.show-sm):not(.show){display:none}.hide-sm:not(.show-gt-xs):not(.show-sm):not(.show){display:none}.flex-order-sm--20{order:-20}.flex-order-sm--19{order:-19}.flex-order-sm--18{order:-18}.flex-order-sm--17{order:-17}.flex-order-sm--16{order:-16}.flex-order-sm--15{order:-15}.flex-order-sm--14{order:-14}.flex-order-sm--13{order:-13}.flex-order-sm--12{order:-12}.flex-order-sm--11{order:-11}.flex-order-sm--10{order:-10}.flex-order-sm--9{order:-9}.flex-order-sm--8{order:-8}.flex-order-sm--7{order:-7}.flex-order-sm--6{order:-6}.flex-order-sm--5{order:-5}.flex-order-sm--4{order:-4}.flex-order-sm--3{order:-3}.flex-order-sm--2{order:-2}.flex-order-sm--1{order:-1}.flex-order-sm-0{order:0}.flex-order-sm-1{order:1}.flex-order-sm-2{order:2}.flex-order-sm-3{order:3}.flex-order-sm-4{order:4}.flex-order-sm-5{order:5}.flex-order-sm-6{order:6}.flex-order-sm-7{order:7}.flex-order-sm-8{order:8}.flex-order-sm-9{order:9}.flex-order-sm-10{order:10}.flex-order-sm-11{order:11}.flex-order-sm-12{order:12}.flex-order-sm-13{order:13}.flex-order-sm-14{order:14}.flex-order-sm-15{order:15}.flex-order-sm-16{order:16}.flex-order-sm-17{order:17}.flex-order-sm-18{order:18}.flex-order-sm-19{order:19}.flex-order-sm-20{order:20}.flex-offset-sm-0,.offset-sm-0{margin-left:0}[dir=rtl] .flex-offset-sm-0,[dir=rtl] .offset-sm-0{margin-left:auto;margin-right:0}.flex-offset-sm-5,.offset-sm-5{margin-left:5%}[dir=rtl] .flex-offset-sm-5,[dir=rtl] .offset-sm-5{margin-left:auto;margin-right:5%}.flex-offset-sm-10,.offset-sm-10{margin-left:10%}[dir=rtl] .flex-offset-sm-10,[dir=rtl] .offset-sm-10{margin-left:auto;margin-right:10%}.flex-offset-sm-15,.offset-sm-15{margin-left:15%}[dir=rtl] .flex-offset-sm-15,[dir=rtl] .offset-sm-15{margin-left:auto;margin-right:15%}.flex-offset-sm-20,.offset-sm-20{margin-left:20%}[dir=rtl] .flex-offset-sm-20,[dir=rtl] .offset-sm-20{margin-left:auto;margin-right:20%}.flex-offset-sm-25,.offset-sm-25{margin-left:25%}[dir=rtl] .flex-offset-sm-25,[dir=rtl] .offset-sm-25{margin-left:auto;margin-right:25%}.flex-offset-sm-30,.offset-sm-30{margin-left:30%}[dir=rtl] .flex-offset-sm-30,[dir=rtl] .offset-sm-30{margin-left:auto;margin-right:30%}.flex-offset-sm-35,.offset-sm-35{margin-left:35%}[dir=rtl] .flex-offset-sm-35,[dir=rtl] .offset-sm-35{margin-left:auto;margin-right:35%}.flex-offset-sm-40,.offset-sm-40{margin-left:40%}[dir=rtl] .flex-offset-sm-40,[dir=rtl] .offset-sm-40{margin-left:auto;margin-right:40%}.flex-offset-sm-45,.offset-sm-45{margin-left:45%}[dir=rtl] .flex-offset-sm-45,[dir=rtl] .offset-sm-45{margin-left:auto;margin-right:45%}.flex-offset-sm-50,.offset-sm-50{margin-left:50%}[dir=rtl] .flex-offset-sm-50,[dir=rtl] .offset-sm-50{margin-left:auto;margin-right:50%}.flex-offset-sm-55,.offset-sm-55{margin-left:55%}[dir=rtl] .flex-offset-sm-55,[dir=rtl] .offset-sm-55{margin-left:auto;margin-right:55%}.flex-offset-sm-60,.offset-sm-60{margin-left:60%}[dir=rtl] .flex-offset-sm-60,[dir=rtl] .offset-sm-60{margin-left:auto;margin-right:60%}.flex-offset-sm-65,.offset-sm-65{margin-left:65%}[dir=rtl] .flex-offset-sm-65,[dir=rtl] .offset-sm-65{margin-left:auto;margin-right:65%}.flex-offset-sm-70,.offset-sm-70{margin-left:70%}[dir=rtl] .flex-offset-sm-70,[dir=rtl] .offset-sm-70{margin-left:auto;margin-right:70%}.flex-offset-sm-75,.offset-sm-75{margin-left:75%}[dir=rtl] .flex-offset-sm-75,[dir=rtl] .offset-sm-75{margin-left:auto;margin-right:75%}.flex-offset-sm-80,.offset-sm-80{margin-left:80%}[dir=rtl] .flex-offset-sm-80,[dir=rtl] .offset-sm-80{margin-left:auto;margin-right:80%}.flex-offset-sm-85,.offset-sm-85{margin-left:85%}[dir=rtl] .flex-offset-sm-85,[dir=rtl] .offset-sm-85{margin-left:auto;margin-right:85%}.flex-offset-sm-90,.offset-sm-90{margin-left:90%}[dir=rtl] .flex-offset-sm-90,[dir=rtl] .offset-sm-90{margin-left:auto;margin-right:90%}.flex-offset-sm-95,.offset-sm-95{margin-left:95%}[dir=rtl] .flex-offset-sm-95,[dir=rtl] .offset-sm-95{margin-left:auto;margin-right:95%}.flex-offset-sm-33,.offset-sm-33{margin-left:calc(100% / 3)}.flex-offset-sm-66,.offset-sm-66{margin-left:calc(200% / 3)}[dir=rtl] .flex-offset-sm-66,[dir=rtl] .offset-sm-66{margin-left:auto;margin-right:calc(200% / 3)}.layout-align-sm,.layout-align-sm-start-stretch{justify-content:flex-start;align-content:stretch;align-items:stretch}.layout-align-sm-start,.layout-align-sm-start-center,.layout-align-sm-start-end,.layout-align-sm-start-start,.layout-align-sm-start-stretch{justify-content:flex-start}.layout-align-sm-center,.layout-align-sm-center-center,.layout-align-sm-center-end,.layout-align-sm-center-start,.layout-align-sm-center-stretch{justify-content:center}.layout-align-sm-end,.layout-align-sm-end-center,.layout-align-sm-end-end,.layout-align-sm-end-start,.layout-align-sm-end-stretch{justify-content:flex-end}.layout-align-sm-space-around,.layout-align-sm-space-around-center,.layout-align-sm-space-around-end,.layout-align-sm-space-around-start,.layout-align-sm-space-around-stretch{justify-content:space-around}.layout-align-sm-space-between,.layout-align-sm-space-between-center,.layout-align-sm-space-between-end,.layout-align-sm-space-between-start,.layout-align-sm-space-between-stretch{justify-content:space-between}.layout-align-sm-center-start,.layout-align-sm-end-start,.layout-align-sm-space-around-start,.layout-align-sm-space-between-start,.layout-align-sm-start-start{align-items:flex-start;align-content:flex-start}.layout-align-sm-center-center,.layout-align-sm-end-center,.layout-align-sm-space-around-center,.layout-align-sm-space-between-center,.layout-align-sm-start-center{align-items:center;align-content:center;max-width:100%}.layout-align-sm-center-center>*,.layout-align-sm-end-center>*,.layout-align-sm-space-around-center>*,.layout-align-sm-space-between-center>*,.layout-align-sm-start-center>*{max-width:100%;box-sizing:border-box}.layout-align-sm-center-end,.layout-align-sm-end-end,.layout-align-sm-space-around-end,.layout-align-sm-space-between-end,.layout-align-sm-start-end{align-items:flex-end;align-content:flex-end}.layout-align-sm-center-stretch,.layout-align-sm-end-stretch,.layout-align-sm-space-around-stretch,.layout-align-sm-space-between-stretch,.layout-align-sm-start-stretch{align-items:stretch;align-content:stretch}.flex-sm{flex:1;box-sizing:border-box}.flex-sm-grow{flex:1 1 100%;box-sizing:border-box}.flex-sm-initial{flex:0 1 auto;box-sizing:border-box}.flex-sm-auto{flex:1 1 auto;box-sizing:border-box}.flex-sm-none{flex:0 0 auto;box-sizing:border-box}.flex-sm-noshrink{flex:1 0 auto;box-sizing:border-box}.flex-sm-nogrow{flex:0 1 auto;box-sizing:border-box}.flex-sm-0{flex:1 1 0%;max-width:0%;max-height:100%;box-sizing:border-box}.layout-row>.flex-sm-0{flex:1 1 0%;max-width:0%;max-height:100%;box-sizing:border-box;min-width:0}.layout-column>.flex-sm-0{flex:1 1 0%;max-width:100%;max-height:0%;box-sizing:border-box}.layout-row>.flex-sm-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-sm-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-sm-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-sm-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-sm-row>.flex-sm-0{flex:1 1 0%;max-width:0%;max-height:100%;box-sizing:border-box;min-width:0}.layout-sm-column>.flex-sm-0{flex:1 1 0%;max-width:100%;max-height:0%;box-sizing:border-box;min-height:0}.flex-sm-5{flex:1 1 5%;max-width:5%;max-height:100%;box-sizing:border-box}.layout-row>.flex-sm-5{flex:1 1 5%;max-width:5%;max-height:100%;box-sizing:border-box}.layout-column>.flex-sm-5{flex:1 1 5%;max-width:100%;max-height:5%;box-sizing:border-box}.layout-row>.flex-sm-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-sm-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-sm-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-sm-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-sm-row>.flex-sm-5{flex:1 1 5%;max-width:5%;max-height:100%;box-sizing:border-box}.layout-sm-column>.flex-sm-5{flex:1 1 5%;max-width:100%;max-height:5%;box-sizing:border-box}.flex-sm-10{flex:1 1 10%;max-width:10%;max-height:100%;box-sizing:border-box}.layout-row>.flex-sm-10{flex:1 1 10%;max-width:10%;max-height:100%;box-sizing:border-box}.layout-column>.flex-sm-10{flex:1 1 10%;max-width:100%;max-height:10%;box-sizing:border-box}.layout-row>.flex-sm-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-sm-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-sm-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-sm-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-sm-row>.flex-sm-10{flex:1 1 10%;max-width:10%;max-height:100%;box-sizing:border-box}.layout-sm-column>.flex-sm-10{flex:1 1 10%;max-width:100%;max-height:10%;box-sizing:border-box}.flex-sm-15{flex:1 1 15%;max-width:15%;max-height:100%;box-sizing:border-box}.layout-row>.flex-sm-15{flex:1 1 15%;max-width:15%;max-height:100%;box-sizing:border-box}.layout-column>.flex-sm-15{flex:1 1 15%;max-width:100%;max-height:15%;box-sizing:border-box}.layout-row>.flex-sm-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-sm-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-sm-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-sm-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-sm-row>.flex-sm-15{flex:1 1 15%;max-width:15%;max-height:100%;box-sizing:border-box}.layout-sm-column>.flex-sm-15{flex:1 1 15%;max-width:100%;max-height:15%;box-sizing:border-box}.flex-sm-20{flex:1 1 20%;max-width:20%;max-height:100%;box-sizing:border-box}.layout-row>.flex-sm-20{flex:1 1 20%;max-width:20%;max-height:100%;box-sizing:border-box}.layout-column>.flex-sm-20{flex:1 1 20%;max-width:100%;max-height:20%;box-sizing:border-box}.layout-row>.flex-sm-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-sm-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-sm-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-sm-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-sm-row>.flex-sm-20{flex:1 1 20%;max-width:20%;max-height:100%;box-sizing:border-box}.layout-sm-column>.flex-sm-20{flex:1 1 20%;max-width:100%;max-height:20%;box-sizing:border-box}.flex-sm-25{flex:1 1 25%;max-width:25%;max-height:100%;box-sizing:border-box}.layout-row>.flex-sm-25{flex:1 1 25%;max-width:25%;max-height:100%;box-sizing:border-box}.layout-column>.flex-sm-25{flex:1 1 25%;max-width:100%;max-height:25%;box-sizing:border-box}.layout-row>.flex-sm-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-sm-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-sm-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-sm-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-sm-row>.flex-sm-25{flex:1 1 25%;max-width:25%;max-height:100%;box-sizing:border-box}.layout-sm-column>.flex-sm-25{flex:1 1 25%;max-width:100%;max-height:25%;box-sizing:border-box}.flex-sm-30{flex:1 1 30%;max-width:30%;max-height:100%;box-sizing:border-box}.layout-row>.flex-sm-30{flex:1 1 30%;max-width:30%;max-height:100%;box-sizing:border-box}.layout-column>.flex-sm-30{flex:1 1 30%;max-width:100%;max-height:30%;box-sizing:border-box}.layout-row>.flex-sm-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-sm-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-sm-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-sm-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-sm-row>.flex-sm-30{flex:1 1 30%;max-width:30%;max-height:100%;box-sizing:border-box}.layout-sm-column>.flex-sm-30{flex:1 1 30%;max-width:100%;max-height:30%;box-sizing:border-box}.flex-sm-35{flex:1 1 35%;max-width:35%;max-height:100%;box-sizing:border-box}.layout-row>.flex-sm-35{flex:1 1 35%;max-width:35%;max-height:100%;box-sizing:border-box}.layout-column>.flex-sm-35{flex:1 1 35%;max-width:100%;max-height:35%;box-sizing:border-box}.layout-row>.flex-sm-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-sm-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-sm-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-sm-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-sm-row>.flex-sm-35{flex:1 1 35%;max-width:35%;max-height:100%;box-sizing:border-box}.layout-sm-column>.flex-sm-35{flex:1 1 35%;max-width:100%;max-height:35%;box-sizing:border-box}.flex-sm-40{flex:1 1 40%;max-width:40%;max-height:100%;box-sizing:border-box}.layout-row>.flex-sm-40{flex:1 1 40%;max-width:40%;max-height:100%;box-sizing:border-box}.layout-column>.flex-sm-40{flex:1 1 40%;max-width:100%;max-height:40%;box-sizing:border-box}.layout-row>.flex-sm-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-sm-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-sm-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-sm-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-sm-row>.flex-sm-40{flex:1 1 40%;max-width:40%;max-height:100%;box-sizing:border-box}.layout-sm-column>.flex-sm-40{flex:1 1 40%;max-width:100%;max-height:40%;box-sizing:border-box}.flex-sm-45{flex:1 1 45%;max-width:45%;max-height:100%;box-sizing:border-box}.layout-row>.flex-sm-45{flex:1 1 45%;max-width:45%;max-height:100%;box-sizing:border-box}.layout-column>.flex-sm-45{flex:1 1 45%;max-width:100%;max-height:45%;box-sizing:border-box}.layout-row>.flex-sm-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-sm-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-sm-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-sm-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-sm-row>.flex-sm-45{flex:1 1 45%;max-width:45%;max-height:100%;box-sizing:border-box}.layout-sm-column>.flex-sm-45{flex:1 1 45%;max-width:100%;max-height:45%;box-sizing:border-box}.flex-sm-50{flex:1 1 50%;max-width:50%;max-height:100%;box-sizing:border-box}.layout-row>.flex-sm-50{flex:1 1 50%;max-width:50%;max-height:100%;box-sizing:border-box}.layout-column>.flex-sm-50{flex:1 1 50%;max-width:100%;max-height:50%;box-sizing:border-box}.layout-row>.flex-sm-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-sm-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-sm-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-sm-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-sm-row>.flex-sm-50{flex:1 1 50%;max-width:50%;max-height:100%;box-sizing:border-box}.layout-sm-column>.flex-sm-50{flex:1 1 50%;max-width:100%;max-height:50%;box-sizing:border-box}.flex-sm-55{flex:1 1 55%;max-width:55%;max-height:100%;box-sizing:border-box}.layout-row>.flex-sm-55{flex:1 1 55%;max-width:55%;max-height:100%;box-sizing:border-box}.layout-column>.flex-sm-55{flex:1 1 55%;max-width:100%;max-height:55%;box-sizing:border-box}.layout-row>.flex-sm-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-sm-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-sm-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-sm-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-sm-row>.flex-sm-55{flex:1 1 55%;max-width:55%;max-height:100%;box-sizing:border-box}.layout-sm-column>.flex-sm-55{flex:1 1 55%;max-width:100%;max-height:55%;box-sizing:border-box}.flex-sm-60{flex:1 1 60%;max-width:60%;max-height:100%;box-sizing:border-box}.layout-row>.flex-sm-60{flex:1 1 60%;max-width:60%;max-height:100%;box-sizing:border-box}.layout-column>.flex-sm-60{flex:1 1 60%;max-width:100%;max-height:60%;box-sizing:border-box}.layout-row>.flex-sm-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-sm-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-sm-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-sm-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-sm-row>.flex-sm-60{flex:1 1 60%;max-width:60%;max-height:100%;box-sizing:border-box}.layout-sm-column>.flex-sm-60{flex:1 1 60%;max-width:100%;max-height:60%;box-sizing:border-box}.flex-sm-65{flex:1 1 65%;max-width:65%;max-height:100%;box-sizing:border-box}.layout-row>.flex-sm-65{flex:1 1 65%;max-width:65%;max-height:100%;box-sizing:border-box}.layout-column>.flex-sm-65{flex:1 1 65%;max-width:100%;max-height:65%;box-sizing:border-box}.layout-row>.flex-sm-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-sm-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-sm-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-sm-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-sm-row>.flex-sm-65{flex:1 1 65%;max-width:65%;max-height:100%;box-sizing:border-box}.layout-sm-column>.flex-sm-65{flex:1 1 65%;max-width:100%;max-height:65%;box-sizing:border-box}.flex-sm-70{flex:1 1 70%;max-width:70%;max-height:100%;box-sizing:border-box}.layout-row>.flex-sm-70{flex:1 1 70%;max-width:70%;max-height:100%;box-sizing:border-box}.layout-column>.flex-sm-70{flex:1 1 70%;max-width:100%;max-height:70%;box-sizing:border-box}.layout-row>.flex-sm-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-sm-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-sm-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-sm-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-sm-row>.flex-sm-70{flex:1 1 70%;max-width:70%;max-height:100%;box-sizing:border-box}.layout-sm-column>.flex-sm-70{flex:1 1 70%;max-width:100%;max-height:70%;box-sizing:border-box}.flex-sm-75{flex:1 1 75%;max-width:75%;max-height:100%;box-sizing:border-box}.layout-row>.flex-sm-75{flex:1 1 75%;max-width:75%;max-height:100%;box-sizing:border-box}.layout-column>.flex-sm-75{flex:1 1 75%;max-width:100%;max-height:75%;box-sizing:border-box}.layout-row>.flex-sm-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-sm-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-sm-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-sm-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-sm-row>.flex-sm-75{flex:1 1 75%;max-width:75%;max-height:100%;box-sizing:border-box}.layout-sm-column>.flex-sm-75{flex:1 1 75%;max-width:100%;max-height:75%;box-sizing:border-box}.flex-sm-80{flex:1 1 80%;max-width:80%;max-height:100%;box-sizing:border-box}.layout-row>.flex-sm-80{flex:1 1 80%;max-width:80%;max-height:100%;box-sizing:border-box}.layout-column>.flex-sm-80{flex:1 1 80%;max-width:100%;max-height:80%;box-sizing:border-box}.layout-row>.flex-sm-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-sm-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-sm-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-sm-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-sm-row>.flex-sm-80{flex:1 1 80%;max-width:80%;max-height:100%;box-sizing:border-box}.layout-sm-column>.flex-sm-80{flex:1 1 80%;max-width:100%;max-height:80%;box-sizing:border-box}.flex-sm-85{flex:1 1 85%;max-width:85%;max-height:100%;box-sizing:border-box}.layout-row>.flex-sm-85{flex:1 1 85%;max-width:85%;max-height:100%;box-sizing:border-box}.layout-column>.flex-sm-85{flex:1 1 85%;max-width:100%;max-height:85%;box-sizing:border-box}.layout-row>.flex-sm-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-sm-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-sm-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-sm-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-sm-row>.flex-sm-85{flex:1 1 85%;max-width:85%;max-height:100%;box-sizing:border-box}.layout-sm-column>.flex-sm-85{flex:1 1 85%;max-width:100%;max-height:85%;box-sizing:border-box}.flex-sm-90{flex:1 1 90%;max-width:90%;max-height:100%;box-sizing:border-box}.layout-row>.flex-sm-90{flex:1 1 90%;max-width:90%;max-height:100%;box-sizing:border-box}.layout-column>.flex-sm-90{flex:1 1 90%;max-width:100%;max-height:90%;box-sizing:border-box}.layout-row>.flex-sm-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-sm-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-sm-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-sm-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-sm-row>.flex-sm-90{flex:1 1 90%;max-width:90%;max-height:100%;box-sizing:border-box}.layout-sm-column>.flex-sm-90{flex:1 1 90%;max-width:100%;max-height:90%;box-sizing:border-box}.flex-sm-95{flex:1 1 95%;max-width:95%;max-height:100%;box-sizing:border-box}.layout-row>.flex-sm-95{flex:1 1 95%;max-width:95%;max-height:100%;box-sizing:border-box}.layout-column>.flex-sm-95{flex:1 1 95%;max-width:100%;max-height:95%;box-sizing:border-box}.layout-row>.flex-sm-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-sm-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-sm-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-sm-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-sm-row>.flex-sm-95{flex:1 1 95%;max-width:95%;max-height:100%;box-sizing:border-box}.layout-sm-column>.flex-sm-95{flex:1 1 95%;max-width:100%;max-height:95%;box-sizing:border-box}.flex-sm-100{flex:1 1 100%;max-width:100%;max-height:100%;box-sizing:border-box}.layout-row>.flex-sm-100{flex:1 1 100%;max-width:100%;max-height:100%;box-sizing:border-box}.layout-column>.flex-sm-100{flex:1 1 100%;max-width:100%;max-height:100%;box-sizing:border-box}.layout-row>.flex-sm-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-sm-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-sm-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-sm-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-sm-row>.flex-sm-100{flex:1 1 100%;max-width:100%;max-height:100%;box-sizing:border-box}.layout-sm-column>.flex-sm-100{flex:1 1 100%;max-width:100%;max-height:100%;box-sizing:border-box}.layout-sm-row>.flex-sm-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-sm-row>.flex-sm-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-sm-row>.flex{min-width:0}.layout-sm-column>.flex-sm-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-sm-column>.flex-sm-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-sm-column>.flex{min-height:0}.layout-sm,.layout-sm-column,.layout-sm-row{box-sizing:border-box;display:-webkit-box;display:-webkit-flex;display:-moz-box;display:-ms-flexbox;display:flex}.layout-sm-column{flex-direction:column}.layout-sm-row{flex-direction:row}}@media (min-width:960px){.flex-order-gt-sm--20{order:-20}.flex-order-gt-sm--19{order:-19}.flex-order-gt-sm--18{order:-18}.flex-order-gt-sm--17{order:-17}.flex-order-gt-sm--16{order:-16}.flex-order-gt-sm--15{order:-15}.flex-order-gt-sm--14{order:-14}.flex-order-gt-sm--13{order:-13}.flex-order-gt-sm--12{order:-12}.flex-order-gt-sm--11{order:-11}.flex-order-gt-sm--10{order:-10}.flex-order-gt-sm--9{order:-9}.flex-order-gt-sm--8{order:-8}.flex-order-gt-sm--7{order:-7}.flex-order-gt-sm--6{order:-6}.flex-order-gt-sm--5{order:-5}.flex-order-gt-sm--4{order:-4}.flex-order-gt-sm--3{order:-3}.flex-order-gt-sm--2{order:-2}.flex-order-gt-sm--1{order:-1}.flex-order-gt-sm-0{order:0}.flex-order-gt-sm-1{order:1}.flex-order-gt-sm-2{order:2}.flex-order-gt-sm-3{order:3}.flex-order-gt-sm-4{order:4}.flex-order-gt-sm-5{order:5}.flex-order-gt-sm-6{order:6}.flex-order-gt-sm-7{order:7}.flex-order-gt-sm-8{order:8}.flex-order-gt-sm-9{order:9}.flex-order-gt-sm-10{order:10}.flex-order-gt-sm-11{order:11}.flex-order-gt-sm-12{order:12}.flex-order-gt-sm-13{order:13}.flex-order-gt-sm-14{order:14}.flex-order-gt-sm-15{order:15}.flex-order-gt-sm-16{order:16}.flex-order-gt-sm-17{order:17}.flex-order-gt-sm-18{order:18}.flex-order-gt-sm-19{order:19}.flex-order-gt-sm-20{order:20}.flex-offset-gt-sm-0,.offset-gt-sm-0{margin-left:0}[dir=rtl] .flex-offset-gt-sm-0,[dir=rtl] .offset-gt-sm-0{margin-left:auto;margin-right:0}.flex-offset-gt-sm-5,.offset-gt-sm-5{margin-left:5%}[dir=rtl] .flex-offset-gt-sm-5,[dir=rtl] .offset-gt-sm-5{margin-left:auto;margin-right:5%}.flex-offset-gt-sm-10,.offset-gt-sm-10{margin-left:10%}[dir=rtl] .flex-offset-gt-sm-10,[dir=rtl] .offset-gt-sm-10{margin-left:auto;margin-right:10%}.flex-offset-gt-sm-15,.offset-gt-sm-15{margin-left:15%}[dir=rtl] .flex-offset-gt-sm-15,[dir=rtl] .offset-gt-sm-15{margin-left:auto;margin-right:15%}.flex-offset-gt-sm-20,.offset-gt-sm-20{margin-left:20%}[dir=rtl] .flex-offset-gt-sm-20,[dir=rtl] .offset-gt-sm-20{margin-left:auto;margin-right:20%}.flex-offset-gt-sm-25,.offset-gt-sm-25{margin-left:25%}[dir=rtl] .flex-offset-gt-sm-25,[dir=rtl] .offset-gt-sm-25{margin-left:auto;margin-right:25%}.flex-offset-gt-sm-30,.offset-gt-sm-30{margin-left:30%}[dir=rtl] .flex-offset-gt-sm-30,[dir=rtl] .offset-gt-sm-30{margin-left:auto;margin-right:30%}.flex-offset-gt-sm-35,.offset-gt-sm-35{margin-left:35%}[dir=rtl] .flex-offset-gt-sm-35,[dir=rtl] .offset-gt-sm-35{margin-left:auto;margin-right:35%}.flex-offset-gt-sm-40,.offset-gt-sm-40{margin-left:40%}[dir=rtl] .flex-offset-gt-sm-40,[dir=rtl] .offset-gt-sm-40{margin-left:auto;margin-right:40%}.flex-offset-gt-sm-45,.offset-gt-sm-45{margin-left:45%}[dir=rtl] .flex-offset-gt-sm-45,[dir=rtl] .offset-gt-sm-45{margin-left:auto;margin-right:45%}.flex-offset-gt-sm-50,.offset-gt-sm-50{margin-left:50%}[dir=rtl] .flex-offset-gt-sm-50,[dir=rtl] .offset-gt-sm-50{margin-left:auto;margin-right:50%}.flex-offset-gt-sm-55,.offset-gt-sm-55{margin-left:55%}[dir=rtl] .flex-offset-gt-sm-55,[dir=rtl] .offset-gt-sm-55{margin-left:auto;margin-right:55%}.flex-offset-gt-sm-60,.offset-gt-sm-60{margin-left:60%}[dir=rtl] .flex-offset-gt-sm-60,[dir=rtl] .offset-gt-sm-60{margin-left:auto;margin-right:60%}.flex-offset-gt-sm-65,.offset-gt-sm-65{margin-left:65%}[dir=rtl] .flex-offset-gt-sm-65,[dir=rtl] .offset-gt-sm-65{margin-left:auto;margin-right:65%}.flex-offset-gt-sm-70,.offset-gt-sm-70{margin-left:70%}[dir=rtl] .flex-offset-gt-sm-70,[dir=rtl] .offset-gt-sm-70{margin-left:auto;margin-right:70%}.flex-offset-gt-sm-75,.offset-gt-sm-75{margin-left:75%}[dir=rtl] .flex-offset-gt-sm-75,[dir=rtl] .offset-gt-sm-75{margin-left:auto;margin-right:75%}.flex-offset-gt-sm-80,.offset-gt-sm-80{margin-left:80%}[dir=rtl] .flex-offset-gt-sm-80,[dir=rtl] .offset-gt-sm-80{margin-left:auto;margin-right:80%}.flex-offset-gt-sm-85,.offset-gt-sm-85{margin-left:85%}[dir=rtl] .flex-offset-gt-sm-85,[dir=rtl] .offset-gt-sm-85{margin-left:auto;margin-right:85%}.flex-offset-gt-sm-90,.offset-gt-sm-90{margin-left:90%}[dir=rtl] .flex-offset-gt-sm-90,[dir=rtl] .offset-gt-sm-90{margin-left:auto;margin-right:90%}.flex-offset-gt-sm-95,.offset-gt-sm-95{margin-left:95%}[dir=rtl] .flex-offset-gt-sm-95,[dir=rtl] .offset-gt-sm-95{margin-left:auto;margin-right:95%}.flex-offset-gt-sm-33,.offset-gt-sm-33{margin-left:calc(100% / 3)}.flex-offset-gt-sm-66,.offset-gt-sm-66{margin-left:calc(200% / 3)}[dir=rtl] .flex-offset-gt-sm-66,[dir=rtl] .offset-gt-sm-66{margin-left:auto;margin-right:calc(200% / 3)}.layout-align-gt-sm,.layout-align-gt-sm-start-stretch{justify-content:flex-start;align-content:stretch;align-items:stretch}.layout-align-gt-sm-start,.layout-align-gt-sm-start-center,.layout-align-gt-sm-start-end,.layout-align-gt-sm-start-start,.layout-align-gt-sm-start-stretch{justify-content:flex-start}.layout-align-gt-sm-center,.layout-align-gt-sm-center-center,.layout-align-gt-sm-center-end,.layout-align-gt-sm-center-start,.layout-align-gt-sm-center-stretch{justify-content:center}.layout-align-gt-sm-end,.layout-align-gt-sm-end-center,.layout-align-gt-sm-end-end,.layout-align-gt-sm-end-start,.layout-align-gt-sm-end-stretch{justify-content:flex-end}.layout-align-gt-sm-space-around,.layout-align-gt-sm-space-around-center,.layout-align-gt-sm-space-around-end,.layout-align-gt-sm-space-around-start,.layout-align-gt-sm-space-around-stretch{justify-content:space-around}.layout-align-gt-sm-space-between,.layout-align-gt-sm-space-between-center,.layout-align-gt-sm-space-between-end,.layout-align-gt-sm-space-between-start,.layout-align-gt-sm-space-between-stretch{justify-content:space-between}.layout-align-gt-sm-center-start,.layout-align-gt-sm-end-start,.layout-align-gt-sm-space-around-start,.layout-align-gt-sm-space-between-start,.layout-align-gt-sm-start-start{align-items:flex-start;align-content:flex-start}.layout-align-gt-sm-center-center,.layout-align-gt-sm-end-center,.layout-align-gt-sm-space-around-center,.layout-align-gt-sm-space-between-center,.layout-align-gt-sm-start-center{align-items:center;align-content:center;max-width:100%}.layout-align-gt-sm-center-center>*,.layout-align-gt-sm-end-center>*,.layout-align-gt-sm-space-around-center>*,.layout-align-gt-sm-space-between-center>*,.layout-align-gt-sm-start-center>*{max-width:100%;box-sizing:border-box}.layout-align-gt-sm-center-end,.layout-align-gt-sm-end-end,.layout-align-gt-sm-space-around-end,.layout-align-gt-sm-space-between-end,.layout-align-gt-sm-start-end{align-items:flex-end;align-content:flex-end}.layout-align-gt-sm-center-stretch,.layout-align-gt-sm-end-stretch,.layout-align-gt-sm-space-around-stretch,.layout-align-gt-sm-space-between-stretch,.layout-align-gt-sm-start-stretch{align-items:stretch;align-content:stretch}.flex-gt-sm{flex:1;box-sizing:border-box}.flex-gt-sm-grow{flex:1 1 100%;box-sizing:border-box}.flex-gt-sm-initial{flex:0 1 auto;box-sizing:border-box}.flex-gt-sm-auto{flex:1 1 auto;box-sizing:border-box}.flex-gt-sm-none{flex:0 0 auto;box-sizing:border-box}.flex-gt-sm-noshrink{flex:1 0 auto;box-sizing:border-box}.flex-gt-sm-nogrow{flex:0 1 auto;box-sizing:border-box}.flex-gt-sm-0{flex:1 1 0%;max-width:0%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-sm-0{flex:1 1 0%;max-width:0%;max-height:100%;box-sizing:border-box;min-width:0}.layout-column>.flex-gt-sm-0{flex:1 1 0%;max-width:100%;max-height:0%;box-sizing:border-box}.layout-row>.flex-gt-sm-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-sm-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-sm-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-sm-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-sm-row>.flex-gt-sm-0{flex:1 1 0%;max-width:0%;max-height:100%;box-sizing:border-box;min-width:0}.layout-gt-sm-column>.flex-gt-sm-0{flex:1 1 0%;max-width:100%;max-height:0%;box-sizing:border-box;min-height:0}.flex-gt-sm-5{flex:1 1 5%;max-width:5%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-sm-5{flex:1 1 5%;max-width:5%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-sm-5{flex:1 1 5%;max-width:100%;max-height:5%;box-sizing:border-box}.layout-row>.flex-gt-sm-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-sm-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-sm-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-sm-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-sm-row>.flex-gt-sm-5{flex:1 1 5%;max-width:5%;max-height:100%;box-sizing:border-box}.layout-gt-sm-column>.flex-gt-sm-5{flex:1 1 5%;max-width:100%;max-height:5%;box-sizing:border-box}.flex-gt-sm-10{flex:1 1 10%;max-width:10%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-sm-10{flex:1 1 10%;max-width:10%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-sm-10{flex:1 1 10%;max-width:100%;max-height:10%;box-sizing:border-box}.layout-row>.flex-gt-sm-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-sm-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-sm-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-sm-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-sm-row>.flex-gt-sm-10{flex:1 1 10%;max-width:10%;max-height:100%;box-sizing:border-box}.layout-gt-sm-column>.flex-gt-sm-10{flex:1 1 10%;max-width:100%;max-height:10%;box-sizing:border-box}.flex-gt-sm-15{flex:1 1 15%;max-width:15%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-sm-15{flex:1 1 15%;max-width:15%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-sm-15{flex:1 1 15%;max-width:100%;max-height:15%;box-sizing:border-box}.layout-row>.flex-gt-sm-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-sm-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-sm-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-sm-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-sm-row>.flex-gt-sm-15{flex:1 1 15%;max-width:15%;max-height:100%;box-sizing:border-box}.layout-gt-sm-column>.flex-gt-sm-15{flex:1 1 15%;max-width:100%;max-height:15%;box-sizing:border-box}.flex-gt-sm-20{flex:1 1 20%;max-width:20%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-sm-20{flex:1 1 20%;max-width:20%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-sm-20{flex:1 1 20%;max-width:100%;max-height:20%;box-sizing:border-box}.layout-row>.flex-gt-sm-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-sm-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-sm-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-sm-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-sm-row>.flex-gt-sm-20{flex:1 1 20%;max-width:20%;max-height:100%;box-sizing:border-box}.layout-gt-sm-column>.flex-gt-sm-20{flex:1 1 20%;max-width:100%;max-height:20%;box-sizing:border-box}.flex-gt-sm-25{flex:1 1 25%;max-width:25%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-sm-25{flex:1 1 25%;max-width:25%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-sm-25{flex:1 1 25%;max-width:100%;max-height:25%;box-sizing:border-box}.layout-row>.flex-gt-sm-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-sm-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-sm-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-sm-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-sm-row>.flex-gt-sm-25{flex:1 1 25%;max-width:25%;max-height:100%;box-sizing:border-box}.layout-gt-sm-column>.flex-gt-sm-25{flex:1 1 25%;max-width:100%;max-height:25%;box-sizing:border-box}.flex-gt-sm-30{flex:1 1 30%;max-width:30%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-sm-30{flex:1 1 30%;max-width:30%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-sm-30{flex:1 1 30%;max-width:100%;max-height:30%;box-sizing:border-box}.layout-row>.flex-gt-sm-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-sm-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-sm-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-sm-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-sm-row>.flex-gt-sm-30{flex:1 1 30%;max-width:30%;max-height:100%;box-sizing:border-box}.layout-gt-sm-column>.flex-gt-sm-30{flex:1 1 30%;max-width:100%;max-height:30%;box-sizing:border-box}.flex-gt-sm-35{flex:1 1 35%;max-width:35%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-sm-35{flex:1 1 35%;max-width:35%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-sm-35{flex:1 1 35%;max-width:100%;max-height:35%;box-sizing:border-box}.layout-row>.flex-gt-sm-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-sm-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-sm-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-sm-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-sm-row>.flex-gt-sm-35{flex:1 1 35%;max-width:35%;max-height:100%;box-sizing:border-box}.layout-gt-sm-column>.flex-gt-sm-35{flex:1 1 35%;max-width:100%;max-height:35%;box-sizing:border-box}.flex-gt-sm-40{flex:1 1 40%;max-width:40%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-sm-40{flex:1 1 40%;max-width:40%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-sm-40{flex:1 1 40%;max-width:100%;max-height:40%;box-sizing:border-box}.layout-row>.flex-gt-sm-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-sm-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-sm-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-sm-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-sm-row>.flex-gt-sm-40{flex:1 1 40%;max-width:40%;max-height:100%;box-sizing:border-box}.layout-gt-sm-column>.flex-gt-sm-40{flex:1 1 40%;max-width:100%;max-height:40%;box-sizing:border-box}.flex-gt-sm-45{flex:1 1 45%;max-width:45%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-sm-45{flex:1 1 45%;max-width:45%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-sm-45{flex:1 1 45%;max-width:100%;max-height:45%;box-sizing:border-box}.layout-row>.flex-gt-sm-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-sm-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-sm-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-sm-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-sm-row>.flex-gt-sm-45{flex:1 1 45%;max-width:45%;max-height:100%;box-sizing:border-box}.layout-gt-sm-column>.flex-gt-sm-45{flex:1 1 45%;max-width:100%;max-height:45%;box-sizing:border-box}.flex-gt-sm-50{flex:1 1 50%;max-width:50%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-sm-50{flex:1 1 50%;max-width:50%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-sm-50{flex:1 1 50%;max-width:100%;max-height:50%;box-sizing:border-box}.layout-row>.flex-gt-sm-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-sm-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-sm-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-sm-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-sm-row>.flex-gt-sm-50{flex:1 1 50%;max-width:50%;max-height:100%;box-sizing:border-box}.layout-gt-sm-column>.flex-gt-sm-50{flex:1 1 50%;max-width:100%;max-height:50%;box-sizing:border-box}.flex-gt-sm-55{flex:1 1 55%;max-width:55%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-sm-55{flex:1 1 55%;max-width:55%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-sm-55{flex:1 1 55%;max-width:100%;max-height:55%;box-sizing:border-box}.layout-row>.flex-gt-sm-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-sm-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-sm-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-sm-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-sm-row>.flex-gt-sm-55{flex:1 1 55%;max-width:55%;max-height:100%;box-sizing:border-box}.layout-gt-sm-column>.flex-gt-sm-55{flex:1 1 55%;max-width:100%;max-height:55%;box-sizing:border-box}.flex-gt-sm-60{flex:1 1 60%;max-width:60%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-sm-60{flex:1 1 60%;max-width:60%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-sm-60{flex:1 1 60%;max-width:100%;max-height:60%;box-sizing:border-box}.layout-row>.flex-gt-sm-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-sm-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-sm-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-sm-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-sm-row>.flex-gt-sm-60{flex:1 1 60%;max-width:60%;max-height:100%;box-sizing:border-box}.layout-gt-sm-column>.flex-gt-sm-60{flex:1 1 60%;max-width:100%;max-height:60%;box-sizing:border-box}.flex-gt-sm-65{flex:1 1 65%;max-width:65%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-sm-65{flex:1 1 65%;max-width:65%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-sm-65{flex:1 1 65%;max-width:100%;max-height:65%;box-sizing:border-box}.layout-row>.flex-gt-sm-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-sm-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-sm-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-sm-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-sm-row>.flex-gt-sm-65{flex:1 1 65%;max-width:65%;max-height:100%;box-sizing:border-box}.layout-gt-sm-column>.flex-gt-sm-65{flex:1 1 65%;max-width:100%;max-height:65%;box-sizing:border-box}.flex-gt-sm-70{flex:1 1 70%;max-width:70%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-sm-70{flex:1 1 70%;max-width:70%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-sm-70{flex:1 1 70%;max-width:100%;max-height:70%;box-sizing:border-box}.layout-row>.flex-gt-sm-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-sm-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-sm-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-sm-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-sm-row>.flex-gt-sm-70{flex:1 1 70%;max-width:70%;max-height:100%;box-sizing:border-box}.layout-gt-sm-column>.flex-gt-sm-70{flex:1 1 70%;max-width:100%;max-height:70%;box-sizing:border-box}.flex-gt-sm-75{flex:1 1 75%;max-width:75%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-sm-75{flex:1 1 75%;max-width:75%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-sm-75{flex:1 1 75%;max-width:100%;max-height:75%;box-sizing:border-box}.layout-row>.flex-gt-sm-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-sm-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-sm-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-sm-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-sm-row>.flex-gt-sm-75{flex:1 1 75%;max-width:75%;max-height:100%;box-sizing:border-box}.layout-gt-sm-column>.flex-gt-sm-75{flex:1 1 75%;max-width:100%;max-height:75%;box-sizing:border-box}.flex-gt-sm-80{flex:1 1 80%;max-width:80%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-sm-80{flex:1 1 80%;max-width:80%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-sm-80{flex:1 1 80%;max-width:100%;max-height:80%;box-sizing:border-box}.layout-row>.flex-gt-sm-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-sm-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-sm-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-sm-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-sm-row>.flex-gt-sm-80{flex:1 1 80%;max-width:80%;max-height:100%;box-sizing:border-box}.layout-gt-sm-column>.flex-gt-sm-80{flex:1 1 80%;max-width:100%;max-height:80%;box-sizing:border-box}.flex-gt-sm-85{flex:1 1 85%;max-width:85%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-sm-85{flex:1 1 85%;max-width:85%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-sm-85{flex:1 1 85%;max-width:100%;max-height:85%;box-sizing:border-box}.layout-row>.flex-gt-sm-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-sm-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-sm-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-sm-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-sm-row>.flex-gt-sm-85{flex:1 1 85%;max-width:85%;max-height:100%;box-sizing:border-box}.layout-gt-sm-column>.flex-gt-sm-85{flex:1 1 85%;max-width:100%;max-height:85%;box-sizing:border-box}.flex-gt-sm-90{flex:1 1 90%;max-width:90%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-sm-90{flex:1 1 90%;max-width:90%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-sm-90{flex:1 1 90%;max-width:100%;max-height:90%;box-sizing:border-box}.layout-row>.flex-gt-sm-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-sm-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-sm-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-sm-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-sm-row>.flex-gt-sm-90{flex:1 1 90%;max-width:90%;max-height:100%;box-sizing:border-box}.layout-gt-sm-column>.flex-gt-sm-90{flex:1 1 90%;max-width:100%;max-height:90%;box-sizing:border-box}.flex-gt-sm-95{flex:1 1 95%;max-width:95%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-sm-95{flex:1 1 95%;max-width:95%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-sm-95{flex:1 1 95%;max-width:100%;max-height:95%;box-sizing:border-box}.layout-row>.flex-gt-sm-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-sm-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-sm-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-sm-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-sm-row>.flex-gt-sm-95{flex:1 1 95%;max-width:95%;max-height:100%;box-sizing:border-box}.layout-gt-sm-column>.flex-gt-sm-95{flex:1 1 95%;max-width:100%;max-height:95%;box-sizing:border-box}.flex-gt-sm-100{flex:1 1 100%;max-width:100%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-sm-100{flex:1 1 100%;max-width:100%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-sm-100{flex:1 1 100%;max-width:100%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-sm-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-sm-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-sm-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-sm-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-sm-row>.flex-gt-sm-100{flex:1 1 100%;max-width:100%;max-height:100%;box-sizing:border-box}.layout-gt-sm-column>.flex-gt-sm-100{flex:1 1 100%;max-width:100%;max-height:100%;box-sizing:border-box}.layout-gt-sm-row>.flex-gt-sm-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-gt-sm-row>.flex-gt-sm-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-gt-sm-row>.flex{min-width:0}.layout-gt-sm-column>.flex-gt-sm-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-gt-sm-column>.flex-gt-sm-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-sm-column>.flex{min-height:0}.layout-gt-sm,.layout-gt-sm-column,.layout-gt-sm-row{box-sizing:border-box;display:-webkit-box;display:-webkit-flex;display:-moz-box;display:-ms-flexbox;display:flex}.layout-gt-sm-column{flex-direction:column}.layout-gt-sm-row{flex-direction:row}}@media (min-width:960px) and (max-width:1279px){.hide-gt-sm:not(.show-gt-xs):not(.show-gt-sm):not(.show-md):not(.show),.hide-gt-xs:not(.show-gt-xs):not(.show-gt-sm):not(.show-md):not(.show),.hide:not(.show-gt-xs):not(.show-gt-sm):not(.show-md):not(.show){display:none}.hide-md:not(.show-md):not(.show-gt-sm):not(.show-gt-xs):not(.show){display:none}.flex-order-md--20{order:-20}.flex-order-md--19{order:-19}.flex-order-md--18{order:-18}.flex-order-md--17{order:-17}.flex-order-md--16{order:-16}.flex-order-md--15{order:-15}.flex-order-md--14{order:-14}.flex-order-md--13{order:-13}.flex-order-md--12{order:-12}.flex-order-md--11{order:-11}.flex-order-md--10{order:-10}.flex-order-md--9{order:-9}.flex-order-md--8{order:-8}.flex-order-md--7{order:-7}.flex-order-md--6{order:-6}.flex-order-md--5{order:-5}.flex-order-md--4{order:-4}.flex-order-md--3{order:-3}.flex-order-md--2{order:-2}.flex-order-md--1{order:-1}.flex-order-md-0{order:0}.flex-order-md-1{order:1}.flex-order-md-2{order:2}.flex-order-md-3{order:3}.flex-order-md-4{order:4}.flex-order-md-5{order:5}.flex-order-md-6{order:6}.flex-order-md-7{order:7}.flex-order-md-8{order:8}.flex-order-md-9{order:9}.flex-order-md-10{order:10}.flex-order-md-11{order:11}.flex-order-md-12{order:12}.flex-order-md-13{order:13}.flex-order-md-14{order:14}.flex-order-md-15{order:15}.flex-order-md-16{order:16}.flex-order-md-17{order:17}.flex-order-md-18{order:18}.flex-order-md-19{order:19}.flex-order-md-20{order:20}.flex-offset-md-0,.offset-md-0{margin-left:0}[dir=rtl] .flex-offset-md-0,[dir=rtl] .offset-md-0{margin-left:auto;margin-right:0}.flex-offset-md-5,.offset-md-5{margin-left:5%}[dir=rtl] .flex-offset-md-5,[dir=rtl] .offset-md-5{margin-left:auto;margin-right:5%}.flex-offset-md-10,.offset-md-10{margin-left:10%}[dir=rtl] .flex-offset-md-10,[dir=rtl] .offset-md-10{margin-left:auto;margin-right:10%}.flex-offset-md-15,.offset-md-15{margin-left:15%}[dir=rtl] .flex-offset-md-15,[dir=rtl] .offset-md-15{margin-left:auto;margin-right:15%}.flex-offset-md-20,.offset-md-20{margin-left:20%}[dir=rtl] .flex-offset-md-20,[dir=rtl] .offset-md-20{margin-left:auto;margin-right:20%}.flex-offset-md-25,.offset-md-25{margin-left:25%}[dir=rtl] .flex-offset-md-25,[dir=rtl] .offset-md-25{margin-left:auto;margin-right:25%}.flex-offset-md-30,.offset-md-30{margin-left:30%}[dir=rtl] .flex-offset-md-30,[dir=rtl] .offset-md-30{margin-left:auto;margin-right:30%}.flex-offset-md-35,.offset-md-35{margin-left:35%}[dir=rtl] .flex-offset-md-35,[dir=rtl] .offset-md-35{margin-left:auto;margin-right:35%}.flex-offset-md-40,.offset-md-40{margin-left:40%}[dir=rtl] .flex-offset-md-40,[dir=rtl] .offset-md-40{margin-left:auto;margin-right:40%}.flex-offset-md-45,.offset-md-45{margin-left:45%}[dir=rtl] .flex-offset-md-45,[dir=rtl] .offset-md-45{margin-left:auto;margin-right:45%}.flex-offset-md-50,.offset-md-50{margin-left:50%}[dir=rtl] .flex-offset-md-50,[dir=rtl] .offset-md-50{margin-left:auto;margin-right:50%}.flex-offset-md-55,.offset-md-55{margin-left:55%}[dir=rtl] .flex-offset-md-55,[dir=rtl] .offset-md-55{margin-left:auto;margin-right:55%}.flex-offset-md-60,.offset-md-60{margin-left:60%}[dir=rtl] .flex-offset-md-60,[dir=rtl] .offset-md-60{margin-left:auto;margin-right:60%}.flex-offset-md-65,.offset-md-65{margin-left:65%}[dir=rtl] .flex-offset-md-65,[dir=rtl] .offset-md-65{margin-left:auto;margin-right:65%}.flex-offset-md-70,.offset-md-70{margin-left:70%}[dir=rtl] .flex-offset-md-70,[dir=rtl] .offset-md-70{margin-left:auto;margin-right:70%}.flex-offset-md-75,.offset-md-75{margin-left:75%}[dir=rtl] .flex-offset-md-75,[dir=rtl] .offset-md-75{margin-left:auto;margin-right:75%}.flex-offset-md-80,.offset-md-80{margin-left:80%}[dir=rtl] .flex-offset-md-80,[dir=rtl] .offset-md-80{margin-left:auto;margin-right:80%}.flex-offset-md-85,.offset-md-85{margin-left:85%}[dir=rtl] .flex-offset-md-85,[dir=rtl] .offset-md-85{margin-left:auto;margin-right:85%}.flex-offset-md-90,.offset-md-90{margin-left:90%}[dir=rtl] .flex-offset-md-90,[dir=rtl] .offset-md-90{margin-left:auto;margin-right:90%}.flex-offset-md-95,.offset-md-95{margin-left:95%}[dir=rtl] .flex-offset-md-95,[dir=rtl] .offset-md-95{margin-left:auto;margin-right:95%}.flex-offset-md-33,.offset-md-33{margin-left:calc(100% / 3)}.flex-offset-md-66,.offset-md-66{margin-left:calc(200% / 3)}[dir=rtl] .flex-offset-md-66,[dir=rtl] .offset-md-66{margin-left:auto;margin-right:calc(200% / 3)}.layout-align-md,.layout-align-md-start-stretch{justify-content:flex-start;align-content:stretch;align-items:stretch}.layout-align-md-start,.layout-align-md-start-center,.layout-align-md-start-end,.layout-align-md-start-start,.layout-align-md-start-stretch{justify-content:flex-start}.layout-align-md-center,.layout-align-md-center-center,.layout-align-md-center-end,.layout-align-md-center-start,.layout-align-md-center-stretch{justify-content:center}.layout-align-md-end,.layout-align-md-end-center,.layout-align-md-end-end,.layout-align-md-end-start,.layout-align-md-end-stretch{justify-content:flex-end}.layout-align-md-space-around,.layout-align-md-space-around-center,.layout-align-md-space-around-end,.layout-align-md-space-around-start,.layout-align-md-space-around-stretch{justify-content:space-around}.layout-align-md-space-between,.layout-align-md-space-between-center,.layout-align-md-space-between-end,.layout-align-md-space-between-start,.layout-align-md-space-between-stretch{justify-content:space-between}.layout-align-md-center-start,.layout-align-md-end-start,.layout-align-md-space-around-start,.layout-align-md-space-between-start,.layout-align-md-start-start{align-items:flex-start;align-content:flex-start}.layout-align-md-center-center,.layout-align-md-end-center,.layout-align-md-space-around-center,.layout-align-md-space-between-center,.layout-align-md-start-center{align-items:center;align-content:center;max-width:100%}.layout-align-md-center-center>*,.layout-align-md-end-center>*,.layout-align-md-space-around-center>*,.layout-align-md-space-between-center>*,.layout-align-md-start-center>*{max-width:100%;box-sizing:border-box}.layout-align-md-center-end,.layout-align-md-end-end,.layout-align-md-space-around-end,.layout-align-md-space-between-end,.layout-align-md-start-end{align-items:flex-end;align-content:flex-end}.layout-align-md-center-stretch,.layout-align-md-end-stretch,.layout-align-md-space-around-stretch,.layout-align-md-space-between-stretch,.layout-align-md-start-stretch{align-items:stretch;align-content:stretch}.flex-md{flex:1;box-sizing:border-box}.flex-md-grow{flex:1 1 100%;box-sizing:border-box}.flex-md-initial{flex:0 1 auto;box-sizing:border-box}.flex-md-auto{flex:1 1 auto;box-sizing:border-box}.flex-md-none{flex:0 0 auto;box-sizing:border-box}.flex-md-noshrink{flex:1 0 auto;box-sizing:border-box}.flex-md-nogrow{flex:0 1 auto;box-sizing:border-box}.flex-md-0{flex:1 1 0%;max-width:0%;max-height:100%;box-sizing:border-box}.layout-row>.flex-md-0{flex:1 1 0%;max-width:0%;max-height:100%;box-sizing:border-box;min-width:0}.layout-column>.flex-md-0{flex:1 1 0%;max-width:100%;max-height:0%;box-sizing:border-box}.layout-row>.flex-md-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-md-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-md-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-md-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-md-row>.flex-md-0{flex:1 1 0%;max-width:0%;max-height:100%;box-sizing:border-box;min-width:0}.layout-md-column>.flex-md-0{flex:1 1 0%;max-width:100%;max-height:0%;box-sizing:border-box;min-height:0}.flex-md-5{flex:1 1 5%;max-width:5%;max-height:100%;box-sizing:border-box}.layout-row>.flex-md-5{flex:1 1 5%;max-width:5%;max-height:100%;box-sizing:border-box}.layout-column>.flex-md-5{flex:1 1 5%;max-width:100%;max-height:5%;box-sizing:border-box}.layout-row>.flex-md-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-md-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-md-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-md-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-md-row>.flex-md-5{flex:1 1 5%;max-width:5%;max-height:100%;box-sizing:border-box}.layout-md-column>.flex-md-5{flex:1 1 5%;max-width:100%;max-height:5%;box-sizing:border-box}.flex-md-10{flex:1 1 10%;max-width:10%;max-height:100%;box-sizing:border-box}.layout-row>.flex-md-10{flex:1 1 10%;max-width:10%;max-height:100%;box-sizing:border-box}.layout-column>.flex-md-10{flex:1 1 10%;max-width:100%;max-height:10%;box-sizing:border-box}.layout-row>.flex-md-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-md-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-md-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-md-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-md-row>.flex-md-10{flex:1 1 10%;max-width:10%;max-height:100%;box-sizing:border-box}.layout-md-column>.flex-md-10{flex:1 1 10%;max-width:100%;max-height:10%;box-sizing:border-box}.flex-md-15{flex:1 1 15%;max-width:15%;max-height:100%;box-sizing:border-box}.layout-row>.flex-md-15{flex:1 1 15%;max-width:15%;max-height:100%;box-sizing:border-box}.layout-column>.flex-md-15{flex:1 1 15%;max-width:100%;max-height:15%;box-sizing:border-box}.layout-row>.flex-md-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-md-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-md-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-md-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-md-row>.flex-md-15{flex:1 1 15%;max-width:15%;max-height:100%;box-sizing:border-box}.layout-md-column>.flex-md-15{flex:1 1 15%;max-width:100%;max-height:15%;box-sizing:border-box}.flex-md-20{flex:1 1 20%;max-width:20%;max-height:100%;box-sizing:border-box}.layout-row>.flex-md-20{flex:1 1 20%;max-width:20%;max-height:100%;box-sizing:border-box}.layout-column>.flex-md-20{flex:1 1 20%;max-width:100%;max-height:20%;box-sizing:border-box}.layout-row>.flex-md-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-md-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-md-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-md-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-md-row>.flex-md-20{flex:1 1 20%;max-width:20%;max-height:100%;box-sizing:border-box}.layout-md-column>.flex-md-20{flex:1 1 20%;max-width:100%;max-height:20%;box-sizing:border-box}.flex-md-25{flex:1 1 25%;max-width:25%;max-height:100%;box-sizing:border-box}.layout-row>.flex-md-25{flex:1 1 25%;max-width:25%;max-height:100%;box-sizing:border-box}.layout-column>.flex-md-25{flex:1 1 25%;max-width:100%;max-height:25%;box-sizing:border-box}.layout-row>.flex-md-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-md-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-md-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-md-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-md-row>.flex-md-25{flex:1 1 25%;max-width:25%;max-height:100%;box-sizing:border-box}.layout-md-column>.flex-md-25{flex:1 1 25%;max-width:100%;max-height:25%;box-sizing:border-box}.flex-md-30{flex:1 1 30%;max-width:30%;max-height:100%;box-sizing:border-box}.layout-row>.flex-md-30{flex:1 1 30%;max-width:30%;max-height:100%;box-sizing:border-box}.layout-column>.flex-md-30{flex:1 1 30%;max-width:100%;max-height:30%;box-sizing:border-box}.layout-row>.flex-md-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-md-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-md-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-md-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-md-row>.flex-md-30{flex:1 1 30%;max-width:30%;max-height:100%;box-sizing:border-box}.layout-md-column>.flex-md-30{flex:1 1 30%;max-width:100%;max-height:30%;box-sizing:border-box}.flex-md-35{flex:1 1 35%;max-width:35%;max-height:100%;box-sizing:border-box}.layout-row>.flex-md-35{flex:1 1 35%;max-width:35%;max-height:100%;box-sizing:border-box}.layout-column>.flex-md-35{flex:1 1 35%;max-width:100%;max-height:35%;box-sizing:border-box}.layout-row>.flex-md-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-md-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-md-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-md-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-md-row>.flex-md-35{flex:1 1 35%;max-width:35%;max-height:100%;box-sizing:border-box}.layout-md-column>.flex-md-35{flex:1 1 35%;max-width:100%;max-height:35%;box-sizing:border-box}.flex-md-40{flex:1 1 40%;max-width:40%;max-height:100%;box-sizing:border-box}.layout-row>.flex-md-40{flex:1 1 40%;max-width:40%;max-height:100%;box-sizing:border-box}.layout-column>.flex-md-40{flex:1 1 40%;max-width:100%;max-height:40%;box-sizing:border-box}.layout-row>.flex-md-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-md-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-md-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-md-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-md-row>.flex-md-40{flex:1 1 40%;max-width:40%;max-height:100%;box-sizing:border-box}.layout-md-column>.flex-md-40{flex:1 1 40%;max-width:100%;max-height:40%;box-sizing:border-box}.flex-md-45{flex:1 1 45%;max-width:45%;max-height:100%;box-sizing:border-box}.layout-row>.flex-md-45{flex:1 1 45%;max-width:45%;max-height:100%;box-sizing:border-box}.layout-column>.flex-md-45{flex:1 1 45%;max-width:100%;max-height:45%;box-sizing:border-box}.layout-row>.flex-md-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-md-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-md-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-md-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-md-row>.flex-md-45{flex:1 1 45%;max-width:45%;max-height:100%;box-sizing:border-box}.layout-md-column>.flex-md-45{flex:1 1 45%;max-width:100%;max-height:45%;box-sizing:border-box}.flex-md-50{flex:1 1 50%;max-width:50%;max-height:100%;box-sizing:border-box}.layout-row>.flex-md-50{flex:1 1 50%;max-width:50%;max-height:100%;box-sizing:border-box}.layout-column>.flex-md-50{flex:1 1 50%;max-width:100%;max-height:50%;box-sizing:border-box}.layout-row>.flex-md-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-md-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-md-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-md-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-md-row>.flex-md-50{flex:1 1 50%;max-width:50%;max-height:100%;box-sizing:border-box}.layout-md-column>.flex-md-50{flex:1 1 50%;max-width:100%;max-height:50%;box-sizing:border-box}.flex-md-55{flex:1 1 55%;max-width:55%;max-height:100%;box-sizing:border-box}.layout-row>.flex-md-55{flex:1 1 55%;max-width:55%;max-height:100%;box-sizing:border-box}.layout-column>.flex-md-55{flex:1 1 55%;max-width:100%;max-height:55%;box-sizing:border-box}.layout-row>.flex-md-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-md-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-md-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-md-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-md-row>.flex-md-55{flex:1 1 55%;max-width:55%;max-height:100%;box-sizing:border-box}.layout-md-column>.flex-md-55{flex:1 1 55%;max-width:100%;max-height:55%;box-sizing:border-box}.flex-md-60{flex:1 1 60%;max-width:60%;max-height:100%;box-sizing:border-box}.layout-row>.flex-md-60{flex:1 1 60%;max-width:60%;max-height:100%;box-sizing:border-box}.layout-column>.flex-md-60{flex:1 1 60%;max-width:100%;max-height:60%;box-sizing:border-box}.layout-row>.flex-md-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-md-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-md-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-md-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-md-row>.flex-md-60{flex:1 1 60%;max-width:60%;max-height:100%;box-sizing:border-box}.layout-md-column>.flex-md-60{flex:1 1 60%;max-width:100%;max-height:60%;box-sizing:border-box}.flex-md-65{flex:1 1 65%;max-width:65%;max-height:100%;box-sizing:border-box}.layout-row>.flex-md-65{flex:1 1 65%;max-width:65%;max-height:100%;box-sizing:border-box}.layout-column>.flex-md-65{flex:1 1 65%;max-width:100%;max-height:65%;box-sizing:border-box}.layout-row>.flex-md-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-md-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-md-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-md-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-md-row>.flex-md-65{flex:1 1 65%;max-width:65%;max-height:100%;box-sizing:border-box}.layout-md-column>.flex-md-65{flex:1 1 65%;max-width:100%;max-height:65%;box-sizing:border-box}.flex-md-70{flex:1 1 70%;max-width:70%;max-height:100%;box-sizing:border-box}.layout-row>.flex-md-70{flex:1 1 70%;max-width:70%;max-height:100%;box-sizing:border-box}.layout-column>.flex-md-70{flex:1 1 70%;max-width:100%;max-height:70%;box-sizing:border-box}.layout-row>.flex-md-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-md-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-md-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-md-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-md-row>.flex-md-70{flex:1 1 70%;max-width:70%;max-height:100%;box-sizing:border-box}.layout-md-column>.flex-md-70{flex:1 1 70%;max-width:100%;max-height:70%;box-sizing:border-box}.flex-md-75{flex:1 1 75%;max-width:75%;max-height:100%;box-sizing:border-box}.layout-row>.flex-md-75{flex:1 1 75%;max-width:75%;max-height:100%;box-sizing:border-box}.layout-column>.flex-md-75{flex:1 1 75%;max-width:100%;max-height:75%;box-sizing:border-box}.layout-row>.flex-md-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-md-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-md-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-md-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-md-row>.flex-md-75{flex:1 1 75%;max-width:75%;max-height:100%;box-sizing:border-box}.layout-md-column>.flex-md-75{flex:1 1 75%;max-width:100%;max-height:75%;box-sizing:border-box}.flex-md-80{flex:1 1 80%;max-width:80%;max-height:100%;box-sizing:border-box}.layout-row>.flex-md-80{flex:1 1 80%;max-width:80%;max-height:100%;box-sizing:border-box}.layout-column>.flex-md-80{flex:1 1 80%;max-width:100%;max-height:80%;box-sizing:border-box}.layout-row>.flex-md-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-md-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-md-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-md-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-md-row>.flex-md-80{flex:1 1 80%;max-width:80%;max-height:100%;box-sizing:border-box}.layout-md-column>.flex-md-80{flex:1 1 80%;max-width:100%;max-height:80%;box-sizing:border-box}.flex-md-85{flex:1 1 85%;max-width:85%;max-height:100%;box-sizing:border-box}.layout-row>.flex-md-85{flex:1 1 85%;max-width:85%;max-height:100%;box-sizing:border-box}.layout-column>.flex-md-85{flex:1 1 85%;max-width:100%;max-height:85%;box-sizing:border-box}.layout-row>.flex-md-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-md-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-md-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-md-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-md-row>.flex-md-85{flex:1 1 85%;max-width:85%;max-height:100%;box-sizing:border-box}.layout-md-column>.flex-md-85{flex:1 1 85%;max-width:100%;max-height:85%;box-sizing:border-box}.flex-md-90{flex:1 1 90%;max-width:90%;max-height:100%;box-sizing:border-box}.layout-row>.flex-md-90{flex:1 1 90%;max-width:90%;max-height:100%;box-sizing:border-box}.layout-column>.flex-md-90{flex:1 1 90%;max-width:100%;max-height:90%;box-sizing:border-box}.layout-row>.flex-md-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-md-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-md-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-md-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-md-row>.flex-md-90{flex:1 1 90%;max-width:90%;max-height:100%;box-sizing:border-box}.layout-md-column>.flex-md-90{flex:1 1 90%;max-width:100%;max-height:90%;box-sizing:border-box}.flex-md-95{flex:1 1 95%;max-width:95%;max-height:100%;box-sizing:border-box}.layout-row>.flex-md-95{flex:1 1 95%;max-width:95%;max-height:100%;box-sizing:border-box}.layout-column>.flex-md-95{flex:1 1 95%;max-width:100%;max-height:95%;box-sizing:border-box}.layout-row>.flex-md-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-md-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-md-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-md-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-md-row>.flex-md-95{flex:1 1 95%;max-width:95%;max-height:100%;box-sizing:border-box}.layout-md-column>.flex-md-95{flex:1 1 95%;max-width:100%;max-height:95%;box-sizing:border-box}.flex-md-100{flex:1 1 100%;max-width:100%;max-height:100%;box-sizing:border-box}.layout-row>.flex-md-100{flex:1 1 100%;max-width:100%;max-height:100%;box-sizing:border-box}.layout-column>.flex-md-100{flex:1 1 100%;max-width:100%;max-height:100%;box-sizing:border-box}.layout-row>.flex-md-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-md-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-md-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-md-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-md-row>.flex-md-100{flex:1 1 100%;max-width:100%;max-height:100%;box-sizing:border-box}.layout-md-column>.flex-md-100{flex:1 1 100%;max-width:100%;max-height:100%;box-sizing:border-box}.layout-md-row>.flex-md-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-md-row>.flex-md-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-md-row>.flex{min-width:0}.layout-md-column>.flex-md-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-md-column>.flex-md-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-md-column>.flex{min-height:0}.layout-md,.layout-md-column,.layout-md-row{box-sizing:border-box;display:-webkit-box;display:-webkit-flex;display:-moz-box;display:-ms-flexbox;display:flex}.layout-md-column{flex-direction:column}.layout-md-row{flex-direction:row}}@media (min-width:1280px){.flex-order-gt-md--20{order:-20}.flex-order-gt-md--19{order:-19}.flex-order-gt-md--18{order:-18}.flex-order-gt-md--17{order:-17}.flex-order-gt-md--16{order:-16}.flex-order-gt-md--15{order:-15}.flex-order-gt-md--14{order:-14}.flex-order-gt-md--13{order:-13}.flex-order-gt-md--12{order:-12}.flex-order-gt-md--11{order:-11}.flex-order-gt-md--10{order:-10}.flex-order-gt-md--9{order:-9}.flex-order-gt-md--8{order:-8}.flex-order-gt-md--7{order:-7}.flex-order-gt-md--6{order:-6}.flex-order-gt-md--5{order:-5}.flex-order-gt-md--4{order:-4}.flex-order-gt-md--3{order:-3}.flex-order-gt-md--2{order:-2}.flex-order-gt-md--1{order:-1}.flex-order-gt-md-0{order:0}.flex-order-gt-md-1{order:1}.flex-order-gt-md-2{order:2}.flex-order-gt-md-3{order:3}.flex-order-gt-md-4{order:4}.flex-order-gt-md-5{order:5}.flex-order-gt-md-6{order:6}.flex-order-gt-md-7{order:7}.flex-order-gt-md-8{order:8}.flex-order-gt-md-9{order:9}.flex-order-gt-md-10{order:10}.flex-order-gt-md-11{order:11}.flex-order-gt-md-12{order:12}.flex-order-gt-md-13{order:13}.flex-order-gt-md-14{order:14}.flex-order-gt-md-15{order:15}.flex-order-gt-md-16{order:16}.flex-order-gt-md-17{order:17}.flex-order-gt-md-18{order:18}.flex-order-gt-md-19{order:19}.flex-order-gt-md-20{order:20}.flex-offset-gt-md-0,.offset-gt-md-0{margin-left:0}[dir=rtl] .flex-offset-gt-md-0,[dir=rtl] .offset-gt-md-0{margin-left:auto;margin-right:0}.flex-offset-gt-md-5,.offset-gt-md-5{margin-left:5%}[dir=rtl] .flex-offset-gt-md-5,[dir=rtl] .offset-gt-md-5{margin-left:auto;margin-right:5%}.flex-offset-gt-md-10,.offset-gt-md-10{margin-left:10%}[dir=rtl] .flex-offset-gt-md-10,[dir=rtl] .offset-gt-md-10{margin-left:auto;margin-right:10%}.flex-offset-gt-md-15,.offset-gt-md-15{margin-left:15%}[dir=rtl] .flex-offset-gt-md-15,[dir=rtl] .offset-gt-md-15{margin-left:auto;margin-right:15%}.flex-offset-gt-md-20,.offset-gt-md-20{margin-left:20%}[dir=rtl] .flex-offset-gt-md-20,[dir=rtl] .offset-gt-md-20{margin-left:auto;margin-right:20%}.flex-offset-gt-md-25,.offset-gt-md-25{margin-left:25%}[dir=rtl] .flex-offset-gt-md-25,[dir=rtl] .offset-gt-md-25{margin-left:auto;margin-right:25%}.flex-offset-gt-md-30,.offset-gt-md-30{margin-left:30%}[dir=rtl] .flex-offset-gt-md-30,[dir=rtl] .offset-gt-md-30{margin-left:auto;margin-right:30%}.flex-offset-gt-md-35,.offset-gt-md-35{margin-left:35%}[dir=rtl] .flex-offset-gt-md-35,[dir=rtl] .offset-gt-md-35{margin-left:auto;margin-right:35%}.flex-offset-gt-md-40,.offset-gt-md-40{margin-left:40%}[dir=rtl] .flex-offset-gt-md-40,[dir=rtl] .offset-gt-md-40{margin-left:auto;margin-right:40%}.flex-offset-gt-md-45,.offset-gt-md-45{margin-left:45%}[dir=rtl] .flex-offset-gt-md-45,[dir=rtl] .offset-gt-md-45{margin-left:auto;margin-right:45%}.flex-offset-gt-md-50,.offset-gt-md-50{margin-left:50%}[dir=rtl] .flex-offset-gt-md-50,[dir=rtl] .offset-gt-md-50{margin-left:auto;margin-right:50%}.flex-offset-gt-md-55,.offset-gt-md-55{margin-left:55%}[dir=rtl] .flex-offset-gt-md-55,[dir=rtl] .offset-gt-md-55{margin-left:auto;margin-right:55%}.flex-offset-gt-md-60,.offset-gt-md-60{margin-left:60%}[dir=rtl] .flex-offset-gt-md-60,[dir=rtl] .offset-gt-md-60{margin-left:auto;margin-right:60%}.flex-offset-gt-md-65,.offset-gt-md-65{margin-left:65%}[dir=rtl] .flex-offset-gt-md-65,[dir=rtl] .offset-gt-md-65{margin-left:auto;margin-right:65%}.flex-offset-gt-md-70,.offset-gt-md-70{margin-left:70%}[dir=rtl] .flex-offset-gt-md-70,[dir=rtl] .offset-gt-md-70{margin-left:auto;margin-right:70%}.flex-offset-gt-md-75,.offset-gt-md-75{margin-left:75%}[dir=rtl] .flex-offset-gt-md-75,[dir=rtl] .offset-gt-md-75{margin-left:auto;margin-right:75%}.flex-offset-gt-md-80,.offset-gt-md-80{margin-left:80%}[dir=rtl] .flex-offset-gt-md-80,[dir=rtl] .offset-gt-md-80{margin-left:auto;margin-right:80%}.flex-offset-gt-md-85,.offset-gt-md-85{margin-left:85%}[dir=rtl] .flex-offset-gt-md-85,[dir=rtl] .offset-gt-md-85{margin-left:auto;margin-right:85%}.flex-offset-gt-md-90,.offset-gt-md-90{margin-left:90%}[dir=rtl] .flex-offset-gt-md-90,[dir=rtl] .offset-gt-md-90{margin-left:auto;margin-right:90%}.flex-offset-gt-md-95,.offset-gt-md-95{margin-left:95%}[dir=rtl] .flex-offset-gt-md-95,[dir=rtl] .offset-gt-md-95{margin-left:auto;margin-right:95%}.flex-offset-gt-md-33,.offset-gt-md-33{margin-left:calc(100% / 3)}.flex-offset-gt-md-66,.offset-gt-md-66{margin-left:calc(200% / 3)}[dir=rtl] .flex-offset-gt-md-66,[dir=rtl] .offset-gt-md-66{margin-left:auto;margin-right:calc(200% / 3)}.layout-align-gt-md,.layout-align-gt-md-start-stretch{justify-content:flex-start;align-content:stretch;align-items:stretch}.layout-align-gt-md-start,.layout-align-gt-md-start-center,.layout-align-gt-md-start-end,.layout-align-gt-md-start-start,.layout-align-gt-md-start-stretch{justify-content:flex-start}.layout-align-gt-md-center,.layout-align-gt-md-center-center,.layout-align-gt-md-center-end,.layout-align-gt-md-center-start,.layout-align-gt-md-center-stretch{justify-content:center}.layout-align-gt-md-end,.layout-align-gt-md-end-center,.layout-align-gt-md-end-end,.layout-align-gt-md-end-start,.layout-align-gt-md-end-stretch{justify-content:flex-end}.layout-align-gt-md-space-around,.layout-align-gt-md-space-around-center,.layout-align-gt-md-space-around-end,.layout-align-gt-md-space-around-start,.layout-align-gt-md-space-around-stretch{justify-content:space-around}.layout-align-gt-md-space-between,.layout-align-gt-md-space-between-center,.layout-align-gt-md-space-between-end,.layout-align-gt-md-space-between-start,.layout-align-gt-md-space-between-stretch{justify-content:space-between}.layout-align-gt-md-center-start,.layout-align-gt-md-end-start,.layout-align-gt-md-space-around-start,.layout-align-gt-md-space-between-start,.layout-align-gt-md-start-start{align-items:flex-start;align-content:flex-start}.layout-align-gt-md-center-center,.layout-align-gt-md-end-center,.layout-align-gt-md-space-around-center,.layout-align-gt-md-space-between-center,.layout-align-gt-md-start-center{align-items:center;align-content:center;max-width:100%}.layout-align-gt-md-center-center>*,.layout-align-gt-md-end-center>*,.layout-align-gt-md-space-around-center>*,.layout-align-gt-md-space-between-center>*,.layout-align-gt-md-start-center>*{max-width:100%;box-sizing:border-box}.layout-align-gt-md-center-end,.layout-align-gt-md-end-end,.layout-align-gt-md-space-around-end,.layout-align-gt-md-space-between-end,.layout-align-gt-md-start-end{align-items:flex-end;align-content:flex-end}.layout-align-gt-md-center-stretch,.layout-align-gt-md-end-stretch,.layout-align-gt-md-space-around-stretch,.layout-align-gt-md-space-between-stretch,.layout-align-gt-md-start-stretch{align-items:stretch;align-content:stretch}.flex-gt-md{flex:1;box-sizing:border-box}.flex-gt-md-grow{flex:1 1 100%;box-sizing:border-box}.flex-gt-md-initial{flex:0 1 auto;box-sizing:border-box}.flex-gt-md-auto{flex:1 1 auto;box-sizing:border-box}.flex-gt-md-none{flex:0 0 auto;box-sizing:border-box}.flex-gt-md-noshrink{flex:1 0 auto;box-sizing:border-box}.flex-gt-md-nogrow{flex:0 1 auto;box-sizing:border-box}.flex-gt-md-0{flex:1 1 0%;max-width:0%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-md-0{flex:1 1 0%;max-width:0%;max-height:100%;box-sizing:border-box;min-width:0}.layout-column>.flex-gt-md-0{flex:1 1 0%;max-width:100%;max-height:0%;box-sizing:border-box}.layout-row>.flex-gt-md-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-md-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-md-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-md-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-md-row>.flex-gt-md-0{flex:1 1 0%;max-width:0%;max-height:100%;box-sizing:border-box;min-width:0}.layout-gt-md-column>.flex-gt-md-0{flex:1 1 0%;max-width:100%;max-height:0%;box-sizing:border-box;min-height:0}.flex-gt-md-5{flex:1 1 5%;max-width:5%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-md-5{flex:1 1 5%;max-width:5%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-md-5{flex:1 1 5%;max-width:100%;max-height:5%;box-sizing:border-box}.layout-row>.flex-gt-md-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-md-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-md-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-md-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-md-row>.flex-gt-md-5{flex:1 1 5%;max-width:5%;max-height:100%;box-sizing:border-box}.layout-gt-md-column>.flex-gt-md-5{flex:1 1 5%;max-width:100%;max-height:5%;box-sizing:border-box}.flex-gt-md-10{flex:1 1 10%;max-width:10%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-md-10{flex:1 1 10%;max-width:10%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-md-10{flex:1 1 10%;max-width:100%;max-height:10%;box-sizing:border-box}.layout-row>.flex-gt-md-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-md-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-md-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-md-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-md-row>.flex-gt-md-10{flex:1 1 10%;max-width:10%;max-height:100%;box-sizing:border-box}.layout-gt-md-column>.flex-gt-md-10{flex:1 1 10%;max-width:100%;max-height:10%;box-sizing:border-box}.flex-gt-md-15{flex:1 1 15%;max-width:15%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-md-15{flex:1 1 15%;max-width:15%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-md-15{flex:1 1 15%;max-width:100%;max-height:15%;box-sizing:border-box}.layout-row>.flex-gt-md-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-md-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-md-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-md-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-md-row>.flex-gt-md-15{flex:1 1 15%;max-width:15%;max-height:100%;box-sizing:border-box}.layout-gt-md-column>.flex-gt-md-15{flex:1 1 15%;max-width:100%;max-height:15%;box-sizing:border-box}.flex-gt-md-20{flex:1 1 20%;max-width:20%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-md-20{flex:1 1 20%;max-width:20%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-md-20{flex:1 1 20%;max-width:100%;max-height:20%;box-sizing:border-box}.layout-row>.flex-gt-md-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-md-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-md-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-md-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-md-row>.flex-gt-md-20{flex:1 1 20%;max-width:20%;max-height:100%;box-sizing:border-box}.layout-gt-md-column>.flex-gt-md-20{flex:1 1 20%;max-width:100%;max-height:20%;box-sizing:border-box}.flex-gt-md-25{flex:1 1 25%;max-width:25%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-md-25{flex:1 1 25%;max-width:25%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-md-25{flex:1 1 25%;max-width:100%;max-height:25%;box-sizing:border-box}.layout-row>.flex-gt-md-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-md-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-md-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-md-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-md-row>.flex-gt-md-25{flex:1 1 25%;max-width:25%;max-height:100%;box-sizing:border-box}.layout-gt-md-column>.flex-gt-md-25{flex:1 1 25%;max-width:100%;max-height:25%;box-sizing:border-box}.flex-gt-md-30{flex:1 1 30%;max-width:30%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-md-30{flex:1 1 30%;max-width:30%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-md-30{flex:1 1 30%;max-width:100%;max-height:30%;box-sizing:border-box}.layout-row>.flex-gt-md-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-md-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-md-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-md-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-md-row>.flex-gt-md-30{flex:1 1 30%;max-width:30%;max-height:100%;box-sizing:border-box}.layout-gt-md-column>.flex-gt-md-30{flex:1 1 30%;max-width:100%;max-height:30%;box-sizing:border-box}.flex-gt-md-35{flex:1 1 35%;max-width:35%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-md-35{flex:1 1 35%;max-width:35%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-md-35{flex:1 1 35%;max-width:100%;max-height:35%;box-sizing:border-box}.layout-row>.flex-gt-md-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-md-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-md-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-md-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-md-row>.flex-gt-md-35{flex:1 1 35%;max-width:35%;max-height:100%;box-sizing:border-box}.layout-gt-md-column>.flex-gt-md-35{flex:1 1 35%;max-width:100%;max-height:35%;box-sizing:border-box}.flex-gt-md-40{flex:1 1 40%;max-width:40%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-md-40{flex:1 1 40%;max-width:40%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-md-40{flex:1 1 40%;max-width:100%;max-height:40%;box-sizing:border-box}.layout-row>.flex-gt-md-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-md-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-md-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-md-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-md-row>.flex-gt-md-40{flex:1 1 40%;max-width:40%;max-height:100%;box-sizing:border-box}.layout-gt-md-column>.flex-gt-md-40{flex:1 1 40%;max-width:100%;max-height:40%;box-sizing:border-box}.flex-gt-md-45{flex:1 1 45%;max-width:45%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-md-45{flex:1 1 45%;max-width:45%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-md-45{flex:1 1 45%;max-width:100%;max-height:45%;box-sizing:border-box}.layout-row>.flex-gt-md-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-md-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-md-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-md-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-md-row>.flex-gt-md-45{flex:1 1 45%;max-width:45%;max-height:100%;box-sizing:border-box}.layout-gt-md-column>.flex-gt-md-45{flex:1 1 45%;max-width:100%;max-height:45%;box-sizing:border-box}.flex-gt-md-50{flex:1 1 50%;max-width:50%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-md-50{flex:1 1 50%;max-width:50%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-md-50{flex:1 1 50%;max-width:100%;max-height:50%;box-sizing:border-box}.layout-row>.flex-gt-md-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-md-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-md-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-md-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-md-row>.flex-gt-md-50{flex:1 1 50%;max-width:50%;max-height:100%;box-sizing:border-box}.layout-gt-md-column>.flex-gt-md-50{flex:1 1 50%;max-width:100%;max-height:50%;box-sizing:border-box}.flex-gt-md-55{flex:1 1 55%;max-width:55%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-md-55{flex:1 1 55%;max-width:55%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-md-55{flex:1 1 55%;max-width:100%;max-height:55%;box-sizing:border-box}.layout-row>.flex-gt-md-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-md-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-md-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-md-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-md-row>.flex-gt-md-55{flex:1 1 55%;max-width:55%;max-height:100%;box-sizing:border-box}.layout-gt-md-column>.flex-gt-md-55{flex:1 1 55%;max-width:100%;max-height:55%;box-sizing:border-box}.flex-gt-md-60{flex:1 1 60%;max-width:60%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-md-60{flex:1 1 60%;max-width:60%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-md-60{flex:1 1 60%;max-width:100%;max-height:60%;box-sizing:border-box}.layout-row>.flex-gt-md-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-md-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-md-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-md-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-md-row>.flex-gt-md-60{flex:1 1 60%;max-width:60%;max-height:100%;box-sizing:border-box}.layout-gt-md-column>.flex-gt-md-60{flex:1 1 60%;max-width:100%;max-height:60%;box-sizing:border-box}.flex-gt-md-65{flex:1 1 65%;max-width:65%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-md-65{flex:1 1 65%;max-width:65%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-md-65{flex:1 1 65%;max-width:100%;max-height:65%;box-sizing:border-box}.layout-row>.flex-gt-md-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-md-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-md-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-md-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-md-row>.flex-gt-md-65{flex:1 1 65%;max-width:65%;max-height:100%;box-sizing:border-box}.layout-gt-md-column>.flex-gt-md-65{flex:1 1 65%;max-width:100%;max-height:65%;box-sizing:border-box}.flex-gt-md-70{flex:1 1 70%;max-width:70%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-md-70{flex:1 1 70%;max-width:70%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-md-70{flex:1 1 70%;max-width:100%;max-height:70%;box-sizing:border-box}.layout-row>.flex-gt-md-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-md-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-md-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-md-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-md-row>.flex-gt-md-70{flex:1 1 70%;max-width:70%;max-height:100%;box-sizing:border-box}.layout-gt-md-column>.flex-gt-md-70{flex:1 1 70%;max-width:100%;max-height:70%;box-sizing:border-box}.flex-gt-md-75{flex:1 1 75%;max-width:75%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-md-75{flex:1 1 75%;max-width:75%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-md-75{flex:1 1 75%;max-width:100%;max-height:75%;box-sizing:border-box}.layout-row>.flex-gt-md-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-md-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-md-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-md-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-md-row>.flex-gt-md-75{flex:1 1 75%;max-width:75%;max-height:100%;box-sizing:border-box}.layout-gt-md-column>.flex-gt-md-75{flex:1 1 75%;max-width:100%;max-height:75%;box-sizing:border-box}.flex-gt-md-80{flex:1 1 80%;max-width:80%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-md-80{flex:1 1 80%;max-width:80%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-md-80{flex:1 1 80%;max-width:100%;max-height:80%;box-sizing:border-box}.layout-row>.flex-gt-md-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-md-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-md-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-md-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-md-row>.flex-gt-md-80{flex:1 1 80%;max-width:80%;max-height:100%;box-sizing:border-box}.layout-gt-md-column>.flex-gt-md-80{flex:1 1 80%;max-width:100%;max-height:80%;box-sizing:border-box}.flex-gt-md-85{flex:1 1 85%;max-width:85%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-md-85{flex:1 1 85%;max-width:85%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-md-85{flex:1 1 85%;max-width:100%;max-height:85%;box-sizing:border-box}.layout-row>.flex-gt-md-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-md-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-md-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-md-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-md-row>.flex-gt-md-85{flex:1 1 85%;max-width:85%;max-height:100%;box-sizing:border-box}.layout-gt-md-column>.flex-gt-md-85{flex:1 1 85%;max-width:100%;max-height:85%;box-sizing:border-box}.flex-gt-md-90{flex:1 1 90%;max-width:90%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-md-90{flex:1 1 90%;max-width:90%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-md-90{flex:1 1 90%;max-width:100%;max-height:90%;box-sizing:border-box}.layout-row>.flex-gt-md-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-md-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-md-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-md-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-md-row>.flex-gt-md-90{flex:1 1 90%;max-width:90%;max-height:100%;box-sizing:border-box}.layout-gt-md-column>.flex-gt-md-90{flex:1 1 90%;max-width:100%;max-height:90%;box-sizing:border-box}.flex-gt-md-95{flex:1 1 95%;max-width:95%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-md-95{flex:1 1 95%;max-width:95%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-md-95{flex:1 1 95%;max-width:100%;max-height:95%;box-sizing:border-box}.layout-row>.flex-gt-md-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-md-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-md-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-md-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-md-row>.flex-gt-md-95{flex:1 1 95%;max-width:95%;max-height:100%;box-sizing:border-box}.layout-gt-md-column>.flex-gt-md-95{flex:1 1 95%;max-width:100%;max-height:95%;box-sizing:border-box}.flex-gt-md-100{flex:1 1 100%;max-width:100%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-md-100{flex:1 1 100%;max-width:100%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-md-100{flex:1 1 100%;max-width:100%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-md-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-md-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-md-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-md-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-md-row>.flex-gt-md-100{flex:1 1 100%;max-width:100%;max-height:100%;box-sizing:border-box}.layout-gt-md-column>.flex-gt-md-100{flex:1 1 100%;max-width:100%;max-height:100%;box-sizing:border-box}.layout-gt-md-row>.flex-gt-md-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-gt-md-row>.flex-gt-md-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-gt-md-row>.flex{min-width:0}.layout-gt-md-column>.flex-gt-md-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-gt-md-column>.flex-gt-md-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-md-column>.flex{min-height:0}.layout-gt-md,.layout-gt-md-column,.layout-gt-md-row{box-sizing:border-box;display:-webkit-box;display:-webkit-flex;display:-moz-box;display:-ms-flexbox;display:flex}.layout-gt-md-column{flex-direction:column}.layout-gt-md-row{flex-direction:row}}@media (min-width:1280px) and (max-width:1919px){.hide-gt-md:not(.show-gt-xs):not(.show-gt-sm):not(.show-gt-md):not(.show-lg):not(.show),.hide-gt-sm:not(.show-gt-xs):not(.show-gt-sm):not(.show-gt-md):not(.show-lg):not(.show),.hide-gt-xs:not(.show-gt-xs):not(.show-gt-sm):not(.show-gt-md):not(.show-lg):not(.show),.hide:not(.show-gt-xs):not(.show-gt-sm):not(.show-gt-md):not(.show-lg):not(.show){display:none}.hide-lg:not(.show-lg):not(.show-gt-md):not(.show-gt-sm):not(.show-gt-xs):not(.show){display:none}.flex-order-lg--20{order:-20}.flex-order-lg--19{order:-19}.flex-order-lg--18{order:-18}.flex-order-lg--17{order:-17}.flex-order-lg--16{order:-16}.flex-order-lg--15{order:-15}.flex-order-lg--14{order:-14}.flex-order-lg--13{order:-13}.flex-order-lg--12{order:-12}.flex-order-lg--11{order:-11}.flex-order-lg--10{order:-10}.flex-order-lg--9{order:-9}.flex-order-lg--8{order:-8}.flex-order-lg--7{order:-7}.flex-order-lg--6{order:-6}.flex-order-lg--5{order:-5}.flex-order-lg--4{order:-4}.flex-order-lg--3{order:-3}.flex-order-lg--2{order:-2}.flex-order-lg--1{order:-1}.flex-order-lg-0{order:0}.flex-order-lg-1{order:1}.flex-order-lg-2{order:2}.flex-order-lg-3{order:3}.flex-order-lg-4{order:4}.flex-order-lg-5{order:5}.flex-order-lg-6{order:6}.flex-order-lg-7{order:7}.flex-order-lg-8{order:8}.flex-order-lg-9{order:9}.flex-order-lg-10{order:10}.flex-order-lg-11{order:11}.flex-order-lg-12{order:12}.flex-order-lg-13{order:13}.flex-order-lg-14{order:14}.flex-order-lg-15{order:15}.flex-order-lg-16{order:16}.flex-order-lg-17{order:17}.flex-order-lg-18{order:18}.flex-order-lg-19{order:19}.flex-order-lg-20{order:20}.flex-offset-lg-0,.offset-lg-0{margin-left:0}[dir=rtl] .flex-offset-lg-0,[dir=rtl] .offset-lg-0{margin-left:auto;margin-right:0}.flex-offset-lg-5,.offset-lg-5{margin-left:5%}[dir=rtl] .flex-offset-lg-5,[dir=rtl] .offset-lg-5{margin-left:auto;margin-right:5%}.flex-offset-lg-10,.offset-lg-10{margin-left:10%}[dir=rtl] .flex-offset-lg-10,[dir=rtl] .offset-lg-10{margin-left:auto;margin-right:10%}.flex-offset-lg-15,.offset-lg-15{margin-left:15%}[dir=rtl] .flex-offset-lg-15,[dir=rtl] .offset-lg-15{margin-left:auto;margin-right:15%}.flex-offset-lg-20,.offset-lg-20{margin-left:20%}[dir=rtl] .flex-offset-lg-20,[dir=rtl] .offset-lg-20{margin-left:auto;margin-right:20%}.flex-offset-lg-25,.offset-lg-25{margin-left:25%}[dir=rtl] .flex-offset-lg-25,[dir=rtl] .offset-lg-25{margin-left:auto;margin-right:25%}.flex-offset-lg-30,.offset-lg-30{margin-left:30%}[dir=rtl] .flex-offset-lg-30,[dir=rtl] .offset-lg-30{margin-left:auto;margin-right:30%}.flex-offset-lg-35,.offset-lg-35{margin-left:35%}[dir=rtl] .flex-offset-lg-35,[dir=rtl] .offset-lg-35{margin-left:auto;margin-right:35%}.flex-offset-lg-40,.offset-lg-40{margin-left:40%}[dir=rtl] .flex-offset-lg-40,[dir=rtl] .offset-lg-40{margin-left:auto;margin-right:40%}.flex-offset-lg-45,.offset-lg-45{margin-left:45%}[dir=rtl] .flex-offset-lg-45,[dir=rtl] .offset-lg-45{margin-left:auto;margin-right:45%}.flex-offset-lg-50,.offset-lg-50{margin-left:50%}[dir=rtl] .flex-offset-lg-50,[dir=rtl] .offset-lg-50{margin-left:auto;margin-right:50%}.flex-offset-lg-55,.offset-lg-55{margin-left:55%}[dir=rtl] .flex-offset-lg-55,[dir=rtl] .offset-lg-55{margin-left:auto;margin-right:55%}.flex-offset-lg-60,.offset-lg-60{margin-left:60%}[dir=rtl] .flex-offset-lg-60,[dir=rtl] .offset-lg-60{margin-left:auto;margin-right:60%}.flex-offset-lg-65,.offset-lg-65{margin-left:65%}[dir=rtl] .flex-offset-lg-65,[dir=rtl] .offset-lg-65{margin-left:auto;margin-right:65%}.flex-offset-lg-70,.offset-lg-70{margin-left:70%}[dir=rtl] .flex-offset-lg-70,[dir=rtl] .offset-lg-70{margin-left:auto;margin-right:70%}.flex-offset-lg-75,.offset-lg-75{margin-left:75%}[dir=rtl] .flex-offset-lg-75,[dir=rtl] .offset-lg-75{margin-left:auto;margin-right:75%}.flex-offset-lg-80,.offset-lg-80{margin-left:80%}[dir=rtl] .flex-offset-lg-80,[dir=rtl] .offset-lg-80{margin-left:auto;margin-right:80%}.flex-offset-lg-85,.offset-lg-85{margin-left:85%}[dir=rtl] .flex-offset-lg-85,[dir=rtl] .offset-lg-85{margin-left:auto;margin-right:85%}.flex-offset-lg-90,.offset-lg-90{margin-left:90%}[dir=rtl] .flex-offset-lg-90,[dir=rtl] .offset-lg-90{margin-left:auto;margin-right:90%}.flex-offset-lg-95,.offset-lg-95{margin-left:95%}[dir=rtl] .flex-offset-lg-95,[dir=rtl] .offset-lg-95{margin-left:auto;margin-right:95%}.flex-offset-lg-33,.offset-lg-33{margin-left:calc(100% / 3)}.flex-offset-lg-66,.offset-lg-66{margin-left:calc(200% / 3)}[dir=rtl] .flex-offset-lg-66,[dir=rtl] .offset-lg-66{margin-left:auto;margin-right:calc(200% / 3)}.layout-align-lg,.layout-align-lg-start-stretch{justify-content:flex-start;align-content:stretch;align-items:stretch}.layout-align-lg-start,.layout-align-lg-start-center,.layout-align-lg-start-end,.layout-align-lg-start-start,.layout-align-lg-start-stretch{justify-content:flex-start}.layout-align-lg-center,.layout-align-lg-center-center,.layout-align-lg-center-end,.layout-align-lg-center-start,.layout-align-lg-center-stretch{justify-content:center}.layout-align-lg-end,.layout-align-lg-end-center,.layout-align-lg-end-end,.layout-align-lg-end-start,.layout-align-lg-end-stretch{justify-content:flex-end}.layout-align-lg-space-around,.layout-align-lg-space-around-center,.layout-align-lg-space-around-end,.layout-align-lg-space-around-start,.layout-align-lg-space-around-stretch{justify-content:space-around}.layout-align-lg-space-between,.layout-align-lg-space-between-center,.layout-align-lg-space-between-end,.layout-align-lg-space-between-start,.layout-align-lg-space-between-stretch{justify-content:space-between}.layout-align-lg-center-start,.layout-align-lg-end-start,.layout-align-lg-space-around-start,.layout-align-lg-space-between-start,.layout-align-lg-start-start{align-items:flex-start;align-content:flex-start}.layout-align-lg-center-center,.layout-align-lg-end-center,.layout-align-lg-space-around-center,.layout-align-lg-space-between-center,.layout-align-lg-start-center{align-items:center;align-content:center;max-width:100%}.layout-align-lg-center-center>*,.layout-align-lg-end-center>*,.layout-align-lg-space-around-center>*,.layout-align-lg-space-between-center>*,.layout-align-lg-start-center>*{max-width:100%;box-sizing:border-box}.layout-align-lg-center-end,.layout-align-lg-end-end,.layout-align-lg-space-around-end,.layout-align-lg-space-between-end,.layout-align-lg-start-end{align-items:flex-end;align-content:flex-end}.layout-align-lg-center-stretch,.layout-align-lg-end-stretch,.layout-align-lg-space-around-stretch,.layout-align-lg-space-between-stretch,.layout-align-lg-start-stretch{align-items:stretch;align-content:stretch}.flex-lg{flex:1;box-sizing:border-box}.flex-lg-grow{flex:1 1 100%;box-sizing:border-box}.flex-lg-initial{flex:0 1 auto;box-sizing:border-box}.flex-lg-auto{flex:1 1 auto;box-sizing:border-box}.flex-lg-none{flex:0 0 auto;box-sizing:border-box}.flex-lg-noshrink{flex:1 0 auto;box-sizing:border-box}.flex-lg-nogrow{flex:0 1 auto;box-sizing:border-box}.flex-lg-0{flex:1 1 0%;max-width:0%;max-height:100%;box-sizing:border-box}.layout-row>.flex-lg-0{flex:1 1 0%;max-width:0%;max-height:100%;box-sizing:border-box;min-width:0}.layout-column>.flex-lg-0{flex:1 1 0%;max-width:100%;max-height:0%;box-sizing:border-box}.layout-row>.flex-lg-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-lg-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-lg-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-lg-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-lg-row>.flex-lg-0{flex:1 1 0%;max-width:0%;max-height:100%;box-sizing:border-box;min-width:0}.layout-lg-column>.flex-lg-0{flex:1 1 0%;max-width:100%;max-height:0%;box-sizing:border-box;min-height:0}.flex-lg-5{flex:1 1 5%;max-width:5%;max-height:100%;box-sizing:border-box}.layout-row>.flex-lg-5{flex:1 1 5%;max-width:5%;max-height:100%;box-sizing:border-box}.layout-column>.flex-lg-5{flex:1 1 5%;max-width:100%;max-height:5%;box-sizing:border-box}.layout-row>.flex-lg-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-lg-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-lg-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-lg-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-lg-row>.flex-lg-5{flex:1 1 5%;max-width:5%;max-height:100%;box-sizing:border-box}.layout-lg-column>.flex-lg-5{flex:1 1 5%;max-width:100%;max-height:5%;box-sizing:border-box}.flex-lg-10{flex:1 1 10%;max-width:10%;max-height:100%;box-sizing:border-box}.layout-row>.flex-lg-10{flex:1 1 10%;max-width:10%;max-height:100%;box-sizing:border-box}.layout-column>.flex-lg-10{flex:1 1 10%;max-width:100%;max-height:10%;box-sizing:border-box}.layout-row>.flex-lg-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-lg-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-lg-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-lg-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-lg-row>.flex-lg-10{flex:1 1 10%;max-width:10%;max-height:100%;box-sizing:border-box}.layout-lg-column>.flex-lg-10{flex:1 1 10%;max-width:100%;max-height:10%;box-sizing:border-box}.flex-lg-15{flex:1 1 15%;max-width:15%;max-height:100%;box-sizing:border-box}.layout-row>.flex-lg-15{flex:1 1 15%;max-width:15%;max-height:100%;box-sizing:border-box}.layout-column>.flex-lg-15{flex:1 1 15%;max-width:100%;max-height:15%;box-sizing:border-box}.layout-row>.flex-lg-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-lg-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-lg-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-lg-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-lg-row>.flex-lg-15{flex:1 1 15%;max-width:15%;max-height:100%;box-sizing:border-box}.layout-lg-column>.flex-lg-15{flex:1 1 15%;max-width:100%;max-height:15%;box-sizing:border-box}.flex-lg-20{flex:1 1 20%;max-width:20%;max-height:100%;box-sizing:border-box}.layout-row>.flex-lg-20{flex:1 1 20%;max-width:20%;max-height:100%;box-sizing:border-box}.layout-column>.flex-lg-20{flex:1 1 20%;max-width:100%;max-height:20%;box-sizing:border-box}.layout-row>.flex-lg-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-lg-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-lg-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-lg-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-lg-row>.flex-lg-20{flex:1 1 20%;max-width:20%;max-height:100%;box-sizing:border-box}.layout-lg-column>.flex-lg-20{flex:1 1 20%;max-width:100%;max-height:20%;box-sizing:border-box}.flex-lg-25{flex:1 1 25%;max-width:25%;max-height:100%;box-sizing:border-box}.layout-row>.flex-lg-25{flex:1 1 25%;max-width:25%;max-height:100%;box-sizing:border-box}.layout-column>.flex-lg-25{flex:1 1 25%;max-width:100%;max-height:25%;box-sizing:border-box}.layout-row>.flex-lg-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-lg-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-lg-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-lg-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-lg-row>.flex-lg-25{flex:1 1 25%;max-width:25%;max-height:100%;box-sizing:border-box}.layout-lg-column>.flex-lg-25{flex:1 1 25%;max-width:100%;max-height:25%;box-sizing:border-box}.flex-lg-30{flex:1 1 30%;max-width:30%;max-height:100%;box-sizing:border-box}.layout-row>.flex-lg-30{flex:1 1 30%;max-width:30%;max-height:100%;box-sizing:border-box}.layout-column>.flex-lg-30{flex:1 1 30%;max-width:100%;max-height:30%;box-sizing:border-box}.layout-row>.flex-lg-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-lg-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-lg-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-lg-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-lg-row>.flex-lg-30{flex:1 1 30%;max-width:30%;max-height:100%;box-sizing:border-box}.layout-lg-column>.flex-lg-30{flex:1 1 30%;max-width:100%;max-height:30%;box-sizing:border-box}.flex-lg-35{flex:1 1 35%;max-width:35%;max-height:100%;box-sizing:border-box}.layout-row>.flex-lg-35{flex:1 1 35%;max-width:35%;max-height:100%;box-sizing:border-box}.layout-column>.flex-lg-35{flex:1 1 35%;max-width:100%;max-height:35%;box-sizing:border-box}.layout-row>.flex-lg-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-lg-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-lg-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-lg-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-lg-row>.flex-lg-35{flex:1 1 35%;max-width:35%;max-height:100%;box-sizing:border-box}.layout-lg-column>.flex-lg-35{flex:1 1 35%;max-width:100%;max-height:35%;box-sizing:border-box}.flex-lg-40{flex:1 1 40%;max-width:40%;max-height:100%;box-sizing:border-box}.layout-row>.flex-lg-40{flex:1 1 40%;max-width:40%;max-height:100%;box-sizing:border-box}.layout-column>.flex-lg-40{flex:1 1 40%;max-width:100%;max-height:40%;box-sizing:border-box}.layout-row>.flex-lg-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-lg-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-lg-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-lg-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-lg-row>.flex-lg-40{flex:1 1 40%;max-width:40%;max-height:100%;box-sizing:border-box}.layout-lg-column>.flex-lg-40{flex:1 1 40%;max-width:100%;max-height:40%;box-sizing:border-box}.flex-lg-45{flex:1 1 45%;max-width:45%;max-height:100%;box-sizing:border-box}.layout-row>.flex-lg-45{flex:1 1 45%;max-width:45%;max-height:100%;box-sizing:border-box}.layout-column>.flex-lg-45{flex:1 1 45%;max-width:100%;max-height:45%;box-sizing:border-box}.layout-row>.flex-lg-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-lg-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-lg-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-lg-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-lg-row>.flex-lg-45{flex:1 1 45%;max-width:45%;max-height:100%;box-sizing:border-box}.layout-lg-column>.flex-lg-45{flex:1 1 45%;max-width:100%;max-height:45%;box-sizing:border-box}.flex-lg-50{flex:1 1 50%;max-width:50%;max-height:100%;box-sizing:border-box}.layout-row>.flex-lg-50{flex:1 1 50%;max-width:50%;max-height:100%;box-sizing:border-box}.layout-column>.flex-lg-50{flex:1 1 50%;max-width:100%;max-height:50%;box-sizing:border-box}.layout-row>.flex-lg-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-lg-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-lg-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-lg-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-lg-row>.flex-lg-50{flex:1 1 50%;max-width:50%;max-height:100%;box-sizing:border-box}.layout-lg-column>.flex-lg-50{flex:1 1 50%;max-width:100%;max-height:50%;box-sizing:border-box}.flex-lg-55{flex:1 1 55%;max-width:55%;max-height:100%;box-sizing:border-box}.layout-row>.flex-lg-55{flex:1 1 55%;max-width:55%;max-height:100%;box-sizing:border-box}.layout-column>.flex-lg-55{flex:1 1 55%;max-width:100%;max-height:55%;box-sizing:border-box}.layout-row>.flex-lg-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-lg-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-lg-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-lg-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-lg-row>.flex-lg-55{flex:1 1 55%;max-width:55%;max-height:100%;box-sizing:border-box}.layout-lg-column>.flex-lg-55{flex:1 1 55%;max-width:100%;max-height:55%;box-sizing:border-box}.flex-lg-60{flex:1 1 60%;max-width:60%;max-height:100%;box-sizing:border-box}.layout-row>.flex-lg-60{flex:1 1 60%;max-width:60%;max-height:100%;box-sizing:border-box}.layout-column>.flex-lg-60{flex:1 1 60%;max-width:100%;max-height:60%;box-sizing:border-box}.layout-row>.flex-lg-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-lg-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-lg-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-lg-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-lg-row>.flex-lg-60{flex:1 1 60%;max-width:60%;max-height:100%;box-sizing:border-box}.layout-lg-column>.flex-lg-60{flex:1 1 60%;max-width:100%;max-height:60%;box-sizing:border-box}.flex-lg-65{flex:1 1 65%;max-width:65%;max-height:100%;box-sizing:border-box}.layout-row>.flex-lg-65{flex:1 1 65%;max-width:65%;max-height:100%;box-sizing:border-box}.layout-column>.flex-lg-65{flex:1 1 65%;max-width:100%;max-height:65%;box-sizing:border-box}.layout-row>.flex-lg-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-lg-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-lg-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-lg-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-lg-row>.flex-lg-65{flex:1 1 65%;max-width:65%;max-height:100%;box-sizing:border-box}.layout-lg-column>.flex-lg-65{flex:1 1 65%;max-width:100%;max-height:65%;box-sizing:border-box}.flex-lg-70{flex:1 1 70%;max-width:70%;max-height:100%;box-sizing:border-box}.layout-row>.flex-lg-70{flex:1 1 70%;max-width:70%;max-height:100%;box-sizing:border-box}.layout-column>.flex-lg-70{flex:1 1 70%;max-width:100%;max-height:70%;box-sizing:border-box}.layout-row>.flex-lg-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-lg-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-lg-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-lg-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-lg-row>.flex-lg-70{flex:1 1 70%;max-width:70%;max-height:100%;box-sizing:border-box}.layout-lg-column>.flex-lg-70{flex:1 1 70%;max-width:100%;max-height:70%;box-sizing:border-box}.flex-lg-75{flex:1 1 75%;max-width:75%;max-height:100%;box-sizing:border-box}.layout-row>.flex-lg-75{flex:1 1 75%;max-width:75%;max-height:100%;box-sizing:border-box}.layout-column>.flex-lg-75{flex:1 1 75%;max-width:100%;max-height:75%;box-sizing:border-box}.layout-row>.flex-lg-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-lg-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-lg-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-lg-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-lg-row>.flex-lg-75{flex:1 1 75%;max-width:75%;max-height:100%;box-sizing:border-box}.layout-lg-column>.flex-lg-75{flex:1 1 75%;max-width:100%;max-height:75%;box-sizing:border-box}.flex-lg-80{flex:1 1 80%;max-width:80%;max-height:100%;box-sizing:border-box}.layout-row>.flex-lg-80{flex:1 1 80%;max-width:80%;max-height:100%;box-sizing:border-box}.layout-column>.flex-lg-80{flex:1 1 80%;max-width:100%;max-height:80%;box-sizing:border-box}.layout-row>.flex-lg-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-lg-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-lg-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-lg-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-lg-row>.flex-lg-80{flex:1 1 80%;max-width:80%;max-height:100%;box-sizing:border-box}.layout-lg-column>.flex-lg-80{flex:1 1 80%;max-width:100%;max-height:80%;box-sizing:border-box}.flex-lg-85{flex:1 1 85%;max-width:85%;max-height:100%;box-sizing:border-box}.layout-row>.flex-lg-85{flex:1 1 85%;max-width:85%;max-height:100%;box-sizing:border-box}.layout-column>.flex-lg-85{flex:1 1 85%;max-width:100%;max-height:85%;box-sizing:border-box}.layout-row>.flex-lg-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-lg-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-lg-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-lg-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-lg-row>.flex-lg-85{flex:1 1 85%;max-width:85%;max-height:100%;box-sizing:border-box}.layout-lg-column>.flex-lg-85{flex:1 1 85%;max-width:100%;max-height:85%;box-sizing:border-box}.flex-lg-90{flex:1 1 90%;max-width:90%;max-height:100%;box-sizing:border-box}.layout-row>.flex-lg-90{flex:1 1 90%;max-width:90%;max-height:100%;box-sizing:border-box}.layout-column>.flex-lg-90{flex:1 1 90%;max-width:100%;max-height:90%;box-sizing:border-box}.layout-row>.flex-lg-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-lg-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-lg-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-lg-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-lg-row>.flex-lg-90{flex:1 1 90%;max-width:90%;max-height:100%;box-sizing:border-box}.layout-lg-column>.flex-lg-90{flex:1 1 90%;max-width:100%;max-height:90%;box-sizing:border-box}.flex-lg-95{flex:1 1 95%;max-width:95%;max-height:100%;box-sizing:border-box}.layout-row>.flex-lg-95{flex:1 1 95%;max-width:95%;max-height:100%;box-sizing:border-box}.layout-column>.flex-lg-95{flex:1 1 95%;max-width:100%;max-height:95%;box-sizing:border-box}.layout-row>.flex-lg-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-lg-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-lg-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-lg-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-lg-row>.flex-lg-95{flex:1 1 95%;max-width:95%;max-height:100%;box-sizing:border-box}.layout-lg-column>.flex-lg-95{flex:1 1 95%;max-width:100%;max-height:95%;box-sizing:border-box}.flex-lg-100{flex:1 1 100%;max-width:100%;max-height:100%;box-sizing:border-box}.layout-row>.flex-lg-100{flex:1 1 100%;max-width:100%;max-height:100%;box-sizing:border-box}.layout-column>.flex-lg-100{flex:1 1 100%;max-width:100%;max-height:100%;box-sizing:border-box}.layout-row>.flex-lg-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-lg-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-lg-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-lg-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-lg-row>.flex-lg-100{flex:1 1 100%;max-width:100%;max-height:100%;box-sizing:border-box}.layout-lg-column>.flex-lg-100{flex:1 1 100%;max-width:100%;max-height:100%;box-sizing:border-box}.layout-lg-row>.flex-lg-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-lg-row>.flex-lg-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-lg-row>.flex{min-width:0}.layout-lg-column>.flex-lg-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-lg-column>.flex-lg-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-lg-column>.flex{min-height:0}.layout-lg,.layout-lg-column,.layout-lg-row{box-sizing:border-box;display:-webkit-box;display:-webkit-flex;display:-moz-box;display:-ms-flexbox;display:flex}.layout-lg-column{flex-direction:column}.layout-lg-row{flex-direction:row}}@media (min-width:1920px){.flex-order-gt-lg--20{order:-20}.flex-order-gt-lg--19{order:-19}.flex-order-gt-lg--18{order:-18}.flex-order-gt-lg--17{order:-17}.flex-order-gt-lg--16{order:-16}.flex-order-gt-lg--15{order:-15}.flex-order-gt-lg--14{order:-14}.flex-order-gt-lg--13{order:-13}.flex-order-gt-lg--12{order:-12}.flex-order-gt-lg--11{order:-11}.flex-order-gt-lg--10{order:-10}.flex-order-gt-lg--9{order:-9}.flex-order-gt-lg--8{order:-8}.flex-order-gt-lg--7{order:-7}.flex-order-gt-lg--6{order:-6}.flex-order-gt-lg--5{order:-5}.flex-order-gt-lg--4{order:-4}.flex-order-gt-lg--3{order:-3}.flex-order-gt-lg--2{order:-2}.flex-order-gt-lg--1{order:-1}.flex-order-gt-lg-0{order:0}.flex-order-gt-lg-1{order:1}.flex-order-gt-lg-2{order:2}.flex-order-gt-lg-3{order:3}.flex-order-gt-lg-4{order:4}.flex-order-gt-lg-5{order:5}.flex-order-gt-lg-6{order:6}.flex-order-gt-lg-7{order:7}.flex-order-gt-lg-8{order:8}.flex-order-gt-lg-9{order:9}.flex-order-gt-lg-10{order:10}.flex-order-gt-lg-11{order:11}.flex-order-gt-lg-12{order:12}.flex-order-gt-lg-13{order:13}.flex-order-gt-lg-14{order:14}.flex-order-gt-lg-15{order:15}.flex-order-gt-lg-16{order:16}.flex-order-gt-lg-17{order:17}.flex-order-gt-lg-18{order:18}.flex-order-gt-lg-19{order:19}.flex-order-gt-lg-20{order:20}.flex-offset-gt-lg-0,.offset-gt-lg-0{margin-left:0}[dir=rtl] .flex-offset-gt-lg-0,[dir=rtl] .offset-gt-lg-0{margin-left:auto;margin-right:0}.flex-offset-gt-lg-5,.offset-gt-lg-5{margin-left:5%}[dir=rtl] .flex-offset-gt-lg-5,[dir=rtl] .offset-gt-lg-5{margin-left:auto;margin-right:5%}.flex-offset-gt-lg-10,.offset-gt-lg-10{margin-left:10%}[dir=rtl] .flex-offset-gt-lg-10,[dir=rtl] .offset-gt-lg-10{margin-left:auto;margin-right:10%}.flex-offset-gt-lg-15,.offset-gt-lg-15{margin-left:15%}[dir=rtl] .flex-offset-gt-lg-15,[dir=rtl] .offset-gt-lg-15{margin-left:auto;margin-right:15%}.flex-offset-gt-lg-20,.offset-gt-lg-20{margin-left:20%}[dir=rtl] .flex-offset-gt-lg-20,[dir=rtl] .offset-gt-lg-20{margin-left:auto;margin-right:20%}.flex-offset-gt-lg-25,.offset-gt-lg-25{margin-left:25%}[dir=rtl] .flex-offset-gt-lg-25,[dir=rtl] .offset-gt-lg-25{margin-left:auto;margin-right:25%}.flex-offset-gt-lg-30,.offset-gt-lg-30{margin-left:30%}[dir=rtl] .flex-offset-gt-lg-30,[dir=rtl] .offset-gt-lg-30{margin-left:auto;margin-right:30%}.flex-offset-gt-lg-35,.offset-gt-lg-35{margin-left:35%}[dir=rtl] .flex-offset-gt-lg-35,[dir=rtl] .offset-gt-lg-35{margin-left:auto;margin-right:35%}.flex-offset-gt-lg-40,.offset-gt-lg-40{margin-left:40%}[dir=rtl] .flex-offset-gt-lg-40,[dir=rtl] .offset-gt-lg-40{margin-left:auto;margin-right:40%}.flex-offset-gt-lg-45,.offset-gt-lg-45{margin-left:45%}[dir=rtl] .flex-offset-gt-lg-45,[dir=rtl] .offset-gt-lg-45{margin-left:auto;margin-right:45%}.flex-offset-gt-lg-50,.offset-gt-lg-50{margin-left:50%}[dir=rtl] .flex-offset-gt-lg-50,[dir=rtl] .offset-gt-lg-50{margin-left:auto;margin-right:50%}.flex-offset-gt-lg-55,.offset-gt-lg-55{margin-left:55%}[dir=rtl] .flex-offset-gt-lg-55,[dir=rtl] .offset-gt-lg-55{margin-left:auto;margin-right:55%}.flex-offset-gt-lg-60,.offset-gt-lg-60{margin-left:60%}[dir=rtl] .flex-offset-gt-lg-60,[dir=rtl] .offset-gt-lg-60{margin-left:auto;margin-right:60%}.flex-offset-gt-lg-65,.offset-gt-lg-65{margin-left:65%}[dir=rtl] .flex-offset-gt-lg-65,[dir=rtl] .offset-gt-lg-65{margin-left:auto;margin-right:65%}.flex-offset-gt-lg-70,.offset-gt-lg-70{margin-left:70%}[dir=rtl] .flex-offset-gt-lg-70,[dir=rtl] .offset-gt-lg-70{margin-left:auto;margin-right:70%}.flex-offset-gt-lg-75,.offset-gt-lg-75{margin-left:75%}[dir=rtl] .flex-offset-gt-lg-75,[dir=rtl] .offset-gt-lg-75{margin-left:auto;margin-right:75%}.flex-offset-gt-lg-80,.offset-gt-lg-80{margin-left:80%}[dir=rtl] .flex-offset-gt-lg-80,[dir=rtl] .offset-gt-lg-80{margin-left:auto;margin-right:80%}.flex-offset-gt-lg-85,.offset-gt-lg-85{margin-left:85%}[dir=rtl] .flex-offset-gt-lg-85,[dir=rtl] .offset-gt-lg-85{margin-left:auto;margin-right:85%}.flex-offset-gt-lg-90,.offset-gt-lg-90{margin-left:90%}[dir=rtl] .flex-offset-gt-lg-90,[dir=rtl] .offset-gt-lg-90{margin-left:auto;margin-right:90%}.flex-offset-gt-lg-95,.offset-gt-lg-95{margin-left:95%}[dir=rtl] .flex-offset-gt-lg-95,[dir=rtl] .offset-gt-lg-95{margin-left:auto;margin-right:95%}.flex-offset-gt-lg-33,.offset-gt-lg-33{margin-left:calc(100% / 3)}.flex-offset-gt-lg-66,.offset-gt-lg-66{margin-left:calc(200% / 3)}[dir=rtl] .flex-offset-gt-lg-66,[dir=rtl] .offset-gt-lg-66{margin-left:auto;margin-right:calc(200% / 3)}.layout-align-gt-lg,.layout-align-gt-lg-start-stretch{justify-content:flex-start;align-content:stretch;align-items:stretch}.layout-align-gt-lg-start,.layout-align-gt-lg-start-center,.layout-align-gt-lg-start-end,.layout-align-gt-lg-start-start,.layout-align-gt-lg-start-stretch{justify-content:flex-start}.layout-align-gt-lg-center,.layout-align-gt-lg-center-center,.layout-align-gt-lg-center-end,.layout-align-gt-lg-center-start,.layout-align-gt-lg-center-stretch{justify-content:center}.layout-align-gt-lg-end,.layout-align-gt-lg-end-center,.layout-align-gt-lg-end-end,.layout-align-gt-lg-end-start,.layout-align-gt-lg-end-stretch{justify-content:flex-end}.layout-align-gt-lg-space-around,.layout-align-gt-lg-space-around-center,.layout-align-gt-lg-space-around-end,.layout-align-gt-lg-space-around-start,.layout-align-gt-lg-space-around-stretch{justify-content:space-around}.layout-align-gt-lg-space-between,.layout-align-gt-lg-space-between-center,.layout-align-gt-lg-space-between-end,.layout-align-gt-lg-space-between-start,.layout-align-gt-lg-space-between-stretch{justify-content:space-between}.layout-align-gt-lg-center-start,.layout-align-gt-lg-end-start,.layout-align-gt-lg-space-around-start,.layout-align-gt-lg-space-between-start,.layout-align-gt-lg-start-start{align-items:flex-start;align-content:flex-start}.layout-align-gt-lg-center-center,.layout-align-gt-lg-end-center,.layout-align-gt-lg-space-around-center,.layout-align-gt-lg-space-between-center,.layout-align-gt-lg-start-center{align-items:center;align-content:center;max-width:100%}.layout-align-gt-lg-center-center>*,.layout-align-gt-lg-end-center>*,.layout-align-gt-lg-space-around-center>*,.layout-align-gt-lg-space-between-center>*,.layout-align-gt-lg-start-center>*{max-width:100%;box-sizing:border-box}.layout-align-gt-lg-center-end,.layout-align-gt-lg-end-end,.layout-align-gt-lg-space-around-end,.layout-align-gt-lg-space-between-end,.layout-align-gt-lg-start-end{align-items:flex-end;align-content:flex-end}.layout-align-gt-lg-center-stretch,.layout-align-gt-lg-end-stretch,.layout-align-gt-lg-space-around-stretch,.layout-align-gt-lg-space-between-stretch,.layout-align-gt-lg-start-stretch{align-items:stretch;align-content:stretch}.flex-gt-lg{flex:1;box-sizing:border-box}.flex-gt-lg-grow{flex:1 1 100%;box-sizing:border-box}.flex-gt-lg-initial{flex:0 1 auto;box-sizing:border-box}.flex-gt-lg-auto{flex:1 1 auto;box-sizing:border-box}.flex-gt-lg-none{flex:0 0 auto;box-sizing:border-box}.flex-gt-lg-noshrink{flex:1 0 auto;box-sizing:border-box}.flex-gt-lg-nogrow{flex:0 1 auto;box-sizing:border-box}.flex-gt-lg-0{flex:1 1 0%;max-width:0%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-lg-0{flex:1 1 0%;max-width:0%;max-height:100%;box-sizing:border-box;min-width:0}.layout-column>.flex-gt-lg-0{flex:1 1 0%;max-width:100%;max-height:0%;box-sizing:border-box}.layout-row>.flex-gt-lg-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-lg-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-lg-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-lg-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-lg-row>.flex-gt-lg-0{flex:1 1 0%;max-width:0%;max-height:100%;box-sizing:border-box;min-width:0}.layout-gt-lg-column>.flex-gt-lg-0{flex:1 1 0%;max-width:100%;max-height:0%;box-sizing:border-box;min-height:0}.flex-gt-lg-5{flex:1 1 5%;max-width:5%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-lg-5{flex:1 1 5%;max-width:5%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-lg-5{flex:1 1 5%;max-width:100%;max-height:5%;box-sizing:border-box}.layout-row>.flex-gt-lg-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-lg-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-lg-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-lg-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-lg-row>.flex-gt-lg-5{flex:1 1 5%;max-width:5%;max-height:100%;box-sizing:border-box}.layout-gt-lg-column>.flex-gt-lg-5{flex:1 1 5%;max-width:100%;max-height:5%;box-sizing:border-box}.flex-gt-lg-10{flex:1 1 10%;max-width:10%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-lg-10{flex:1 1 10%;max-width:10%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-lg-10{flex:1 1 10%;max-width:100%;max-height:10%;box-sizing:border-box}.layout-row>.flex-gt-lg-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-lg-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-lg-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-lg-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-lg-row>.flex-gt-lg-10{flex:1 1 10%;max-width:10%;max-height:100%;box-sizing:border-box}.layout-gt-lg-column>.flex-gt-lg-10{flex:1 1 10%;max-width:100%;max-height:10%;box-sizing:border-box}.flex-gt-lg-15{flex:1 1 15%;max-width:15%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-lg-15{flex:1 1 15%;max-width:15%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-lg-15{flex:1 1 15%;max-width:100%;max-height:15%;box-sizing:border-box}.layout-row>.flex-gt-lg-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-lg-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-lg-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-lg-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-lg-row>.flex-gt-lg-15{flex:1 1 15%;max-width:15%;max-height:100%;box-sizing:border-box}.layout-gt-lg-column>.flex-gt-lg-15{flex:1 1 15%;max-width:100%;max-height:15%;box-sizing:border-box}.flex-gt-lg-20{flex:1 1 20%;max-width:20%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-lg-20{flex:1 1 20%;max-width:20%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-lg-20{flex:1 1 20%;max-width:100%;max-height:20%;box-sizing:border-box}.layout-row>.flex-gt-lg-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-lg-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-lg-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-lg-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-lg-row>.flex-gt-lg-20{flex:1 1 20%;max-width:20%;max-height:100%;box-sizing:border-box}.layout-gt-lg-column>.flex-gt-lg-20{flex:1 1 20%;max-width:100%;max-height:20%;box-sizing:border-box}.flex-gt-lg-25{flex:1 1 25%;max-width:25%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-lg-25{flex:1 1 25%;max-width:25%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-lg-25{flex:1 1 25%;max-width:100%;max-height:25%;box-sizing:border-box}.layout-row>.flex-gt-lg-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-lg-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-lg-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-lg-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-lg-row>.flex-gt-lg-25{flex:1 1 25%;max-width:25%;max-height:100%;box-sizing:border-box}.layout-gt-lg-column>.flex-gt-lg-25{flex:1 1 25%;max-width:100%;max-height:25%;box-sizing:border-box}.flex-gt-lg-30{flex:1 1 30%;max-width:30%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-lg-30{flex:1 1 30%;max-width:30%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-lg-30{flex:1 1 30%;max-width:100%;max-height:30%;box-sizing:border-box}.layout-row>.flex-gt-lg-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-lg-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-lg-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-lg-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-lg-row>.flex-gt-lg-30{flex:1 1 30%;max-width:30%;max-height:100%;box-sizing:border-box}.layout-gt-lg-column>.flex-gt-lg-30{flex:1 1 30%;max-width:100%;max-height:30%;box-sizing:border-box}.flex-gt-lg-35{flex:1 1 35%;max-width:35%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-lg-35{flex:1 1 35%;max-width:35%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-lg-35{flex:1 1 35%;max-width:100%;max-height:35%;box-sizing:border-box}.layout-row>.flex-gt-lg-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-lg-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-lg-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-lg-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-lg-row>.flex-gt-lg-35{flex:1 1 35%;max-width:35%;max-height:100%;box-sizing:border-box}.layout-gt-lg-column>.flex-gt-lg-35{flex:1 1 35%;max-width:100%;max-height:35%;box-sizing:border-box}.flex-gt-lg-40{flex:1 1 40%;max-width:40%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-lg-40{flex:1 1 40%;max-width:40%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-lg-40{flex:1 1 40%;max-width:100%;max-height:40%;box-sizing:border-box}.layout-row>.flex-gt-lg-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-lg-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-lg-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-lg-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-lg-row>.flex-gt-lg-40{flex:1 1 40%;max-width:40%;max-height:100%;box-sizing:border-box}.layout-gt-lg-column>.flex-gt-lg-40{flex:1 1 40%;max-width:100%;max-height:40%;box-sizing:border-box}.flex-gt-lg-45{flex:1 1 45%;max-width:45%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-lg-45{flex:1 1 45%;max-width:45%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-lg-45{flex:1 1 45%;max-width:100%;max-height:45%;box-sizing:border-box}.layout-row>.flex-gt-lg-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-lg-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-lg-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-lg-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-lg-row>.flex-gt-lg-45{flex:1 1 45%;max-width:45%;max-height:100%;box-sizing:border-box}.layout-gt-lg-column>.flex-gt-lg-45{flex:1 1 45%;max-width:100%;max-height:45%;box-sizing:border-box}.flex-gt-lg-50{flex:1 1 50%;max-width:50%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-lg-50{flex:1 1 50%;max-width:50%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-lg-50{flex:1 1 50%;max-width:100%;max-height:50%;box-sizing:border-box}.layout-row>.flex-gt-lg-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-lg-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-lg-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-lg-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-lg-row>.flex-gt-lg-50{flex:1 1 50%;max-width:50%;max-height:100%;box-sizing:border-box}.layout-gt-lg-column>.flex-gt-lg-50{flex:1 1 50%;max-width:100%;max-height:50%;box-sizing:border-box}.flex-gt-lg-55{flex:1 1 55%;max-width:55%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-lg-55{flex:1 1 55%;max-width:55%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-lg-55{flex:1 1 55%;max-width:100%;max-height:55%;box-sizing:border-box}.layout-row>.flex-gt-lg-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-lg-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-lg-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-lg-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-lg-row>.flex-gt-lg-55{flex:1 1 55%;max-width:55%;max-height:100%;box-sizing:border-box}.layout-gt-lg-column>.flex-gt-lg-55{flex:1 1 55%;max-width:100%;max-height:55%;box-sizing:border-box}.flex-gt-lg-60{flex:1 1 60%;max-width:60%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-lg-60{flex:1 1 60%;max-width:60%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-lg-60{flex:1 1 60%;max-width:100%;max-height:60%;box-sizing:border-box}.layout-row>.flex-gt-lg-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-lg-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-lg-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-lg-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-lg-row>.flex-gt-lg-60{flex:1 1 60%;max-width:60%;max-height:100%;box-sizing:border-box}.layout-gt-lg-column>.flex-gt-lg-60{flex:1 1 60%;max-width:100%;max-height:60%;box-sizing:border-box}.flex-gt-lg-65{flex:1 1 65%;max-width:65%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-lg-65{flex:1 1 65%;max-width:65%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-lg-65{flex:1 1 65%;max-width:100%;max-height:65%;box-sizing:border-box}.layout-row>.flex-gt-lg-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-lg-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-lg-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-lg-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-lg-row>.flex-gt-lg-65{flex:1 1 65%;max-width:65%;max-height:100%;box-sizing:border-box}.layout-gt-lg-column>.flex-gt-lg-65{flex:1 1 65%;max-width:100%;max-height:65%;box-sizing:border-box}.flex-gt-lg-70{flex:1 1 70%;max-width:70%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-lg-70{flex:1 1 70%;max-width:70%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-lg-70{flex:1 1 70%;max-width:100%;max-height:70%;box-sizing:border-box}.layout-row>.flex-gt-lg-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-lg-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-lg-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-lg-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-lg-row>.flex-gt-lg-70{flex:1 1 70%;max-width:70%;max-height:100%;box-sizing:border-box}.layout-gt-lg-column>.flex-gt-lg-70{flex:1 1 70%;max-width:100%;max-height:70%;box-sizing:border-box}.flex-gt-lg-75{flex:1 1 75%;max-width:75%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-lg-75{flex:1 1 75%;max-width:75%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-lg-75{flex:1 1 75%;max-width:100%;max-height:75%;box-sizing:border-box}.layout-row>.flex-gt-lg-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-lg-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-lg-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-lg-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-lg-row>.flex-gt-lg-75{flex:1 1 75%;max-width:75%;max-height:100%;box-sizing:border-box}.layout-gt-lg-column>.flex-gt-lg-75{flex:1 1 75%;max-width:100%;max-height:75%;box-sizing:border-box}.flex-gt-lg-80{flex:1 1 80%;max-width:80%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-lg-80{flex:1 1 80%;max-width:80%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-lg-80{flex:1 1 80%;max-width:100%;max-height:80%;box-sizing:border-box}.layout-row>.flex-gt-lg-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-lg-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-lg-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-lg-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-lg-row>.flex-gt-lg-80{flex:1 1 80%;max-width:80%;max-height:100%;box-sizing:border-box}.layout-gt-lg-column>.flex-gt-lg-80{flex:1 1 80%;max-width:100%;max-height:80%;box-sizing:border-box}.flex-gt-lg-85{flex:1 1 85%;max-width:85%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-lg-85{flex:1 1 85%;max-width:85%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-lg-85{flex:1 1 85%;max-width:100%;max-height:85%;box-sizing:border-box}.layout-row>.flex-gt-lg-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-lg-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-lg-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-lg-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-lg-row>.flex-gt-lg-85{flex:1 1 85%;max-width:85%;max-height:100%;box-sizing:border-box}.layout-gt-lg-column>.flex-gt-lg-85{flex:1 1 85%;max-width:100%;max-height:85%;box-sizing:border-box}.flex-gt-lg-90{flex:1 1 90%;max-width:90%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-lg-90{flex:1 1 90%;max-width:90%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-lg-90{flex:1 1 90%;max-width:100%;max-height:90%;box-sizing:border-box}.layout-row>.flex-gt-lg-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-lg-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-lg-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-lg-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-lg-row>.flex-gt-lg-90{flex:1 1 90%;max-width:90%;max-height:100%;box-sizing:border-box}.layout-gt-lg-column>.flex-gt-lg-90{flex:1 1 90%;max-width:100%;max-height:90%;box-sizing:border-box}.flex-gt-lg-95{flex:1 1 95%;max-width:95%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-lg-95{flex:1 1 95%;max-width:95%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-lg-95{flex:1 1 95%;max-width:100%;max-height:95%;box-sizing:border-box}.layout-row>.flex-gt-lg-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-lg-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-lg-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-lg-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-lg-row>.flex-gt-lg-95{flex:1 1 95%;max-width:95%;max-height:100%;box-sizing:border-box}.layout-gt-lg-column>.flex-gt-lg-95{flex:1 1 95%;max-width:100%;max-height:95%;box-sizing:border-box}.flex-gt-lg-100{flex:1 1 100%;max-width:100%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-lg-100{flex:1 1 100%;max-width:100%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-lg-100{flex:1 1 100%;max-width:100%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-lg-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-lg-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-lg-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-lg-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-lg-row>.flex-gt-lg-100{flex:1 1 100%;max-width:100%;max-height:100%;box-sizing:border-box}.layout-gt-lg-column>.flex-gt-lg-100{flex:1 1 100%;max-width:100%;max-height:100%;box-sizing:border-box}.layout-gt-lg-row>.flex-gt-lg-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-gt-lg-row>.flex-gt-lg-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-gt-lg-row>.flex{min-width:0}.layout-gt-lg-column>.flex-gt-lg-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-gt-lg-column>.flex-gt-lg-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-lg-column>.flex{min-height:0}.layout-gt-lg,.layout-gt-lg-column,.layout-gt-lg-row{box-sizing:border-box;display:-webkit-box;display:-webkit-flex;display:-moz-box;display:-ms-flexbox;display:flex}.layout-gt-lg-column{flex-direction:column}.layout-gt-lg-row{flex-direction:row}.flex-order-xl--20{order:-20}.flex-order-xl--19{order:-19}.flex-order-xl--18{order:-18}.flex-order-xl--17{order:-17}.flex-order-xl--16{order:-16}.flex-order-xl--15{order:-15}.flex-order-xl--14{order:-14}.flex-order-xl--13{order:-13}.flex-order-xl--12{order:-12}.flex-order-xl--11{order:-11}.flex-order-xl--10{order:-10}.flex-order-xl--9{order:-9}.flex-order-xl--8{order:-8}.flex-order-xl--7{order:-7}.flex-order-xl--6{order:-6}.flex-order-xl--5{order:-5}.flex-order-xl--4{order:-4}.flex-order-xl--3{order:-3}.flex-order-xl--2{order:-2}.flex-order-xl--1{order:-1}.flex-order-xl-0{order:0}.flex-order-xl-1{order:1}.flex-order-xl-2{order:2}.flex-order-xl-3{order:3}.flex-order-xl-4{order:4}.flex-order-xl-5{order:5}.flex-order-xl-6{order:6}.flex-order-xl-7{order:7}.flex-order-xl-8{order:8}.flex-order-xl-9{order:9}.flex-order-xl-10{order:10}.flex-order-xl-11{order:11}.flex-order-xl-12{order:12}.flex-order-xl-13{order:13}.flex-order-xl-14{order:14}.flex-order-xl-15{order:15}.flex-order-xl-16{order:16}.flex-order-xl-17{order:17}.flex-order-xl-18{order:18}.flex-order-xl-19{order:19}.flex-order-xl-20{order:20}.flex-offset-xl-0,.offset-xl-0{margin-left:0}[dir=rtl] .flex-offset-xl-0,[dir=rtl] .offset-xl-0{margin-left:auto;margin-right:0}.flex-offset-xl-5,.offset-xl-5{margin-left:5%}[dir=rtl] .flex-offset-xl-5,[dir=rtl] .offset-xl-5{margin-left:auto;margin-right:5%}.flex-offset-xl-10,.offset-xl-10{margin-left:10%}[dir=rtl] .flex-offset-xl-10,[dir=rtl] .offset-xl-10{margin-left:auto;margin-right:10%}.flex-offset-xl-15,.offset-xl-15{margin-left:15%}[dir=rtl] .flex-offset-xl-15,[dir=rtl] .offset-xl-15{margin-left:auto;margin-right:15%}.flex-offset-xl-20,.offset-xl-20{margin-left:20%}[dir=rtl] .flex-offset-xl-20,[dir=rtl] .offset-xl-20{margin-left:auto;margin-right:20%}.flex-offset-xl-25,.offset-xl-25{margin-left:25%}[dir=rtl] .flex-offset-xl-25,[dir=rtl] .offset-xl-25{margin-left:auto;margin-right:25%}.flex-offset-xl-30,.offset-xl-30{margin-left:30%}[dir=rtl] .flex-offset-xl-30,[dir=rtl] .offset-xl-30{margin-left:auto;margin-right:30%}.flex-offset-xl-35,.offset-xl-35{margin-left:35%}[dir=rtl] .flex-offset-xl-35,[dir=rtl] .offset-xl-35{margin-left:auto;margin-right:35%}.flex-offset-xl-40,.offset-xl-40{margin-left:40%}[dir=rtl] .flex-offset-xl-40,[dir=rtl] .offset-xl-40{margin-left:auto;margin-right:40%}.flex-offset-xl-45,.offset-xl-45{margin-left:45%}[dir=rtl] .flex-offset-xl-45,[dir=rtl] .offset-xl-45{margin-left:auto;margin-right:45%}.flex-offset-xl-50,.offset-xl-50{margin-left:50%}[dir=rtl] .flex-offset-xl-50,[dir=rtl] .offset-xl-50{margin-left:auto;margin-right:50%}.flex-offset-xl-55,.offset-xl-55{margin-left:55%}[dir=rtl] .flex-offset-xl-55,[dir=rtl] .offset-xl-55{margin-left:auto;margin-right:55%}.flex-offset-xl-60,.offset-xl-60{margin-left:60%}[dir=rtl] .flex-offset-xl-60,[dir=rtl] .offset-xl-60{margin-left:auto;margin-right:60%}.flex-offset-xl-65,.offset-xl-65{margin-left:65%}[dir=rtl] .flex-offset-xl-65,[dir=rtl] .offset-xl-65{margin-left:auto;margin-right:65%}.flex-offset-xl-70,.offset-xl-70{margin-left:70%}[dir=rtl] .flex-offset-xl-70,[dir=rtl] .offset-xl-70{margin-left:auto;margin-right:70%}.flex-offset-xl-75,.offset-xl-75{margin-left:75%}[dir=rtl] .flex-offset-xl-75,[dir=rtl] .offset-xl-75{margin-left:auto;margin-right:75%}.flex-offset-xl-80,.offset-xl-80{margin-left:80%}[dir=rtl] .flex-offset-xl-80,[dir=rtl] .offset-xl-80{margin-left:auto;margin-right:80%}.flex-offset-xl-85,.offset-xl-85{margin-left:85%}[dir=rtl] .flex-offset-xl-85,[dir=rtl] .offset-xl-85{margin-left:auto;margin-right:85%}.flex-offset-xl-90,.offset-xl-90{margin-left:90%}[dir=rtl] .flex-offset-xl-90,[dir=rtl] .offset-xl-90{margin-left:auto;margin-right:90%}.flex-offset-xl-95,.offset-xl-95{margin-left:95%}[dir=rtl] .flex-offset-xl-95,[dir=rtl] .offset-xl-95{margin-left:auto;margin-right:95%}.flex-offset-xl-33,.offset-xl-33{margin-left:calc(100% / 3)}.flex-offset-xl-66,.offset-xl-66{margin-left:calc(200% / 3)}[dir=rtl] .flex-offset-xl-66,[dir=rtl] .offset-xl-66{margin-left:auto;margin-right:calc(200% / 3)}.layout-align-xl,.layout-align-xl-start-stretch{justify-content:flex-start;align-content:stretch;align-items:stretch}.layout-align-xl-start,.layout-align-xl-start-center,.layout-align-xl-start-end,.layout-align-xl-start-start,.layout-align-xl-start-stretch{justify-content:flex-start}.layout-align-xl-center,.layout-align-xl-center-center,.layout-align-xl-center-end,.layout-align-xl-center-start,.layout-align-xl-center-stretch{justify-content:center}.layout-align-xl-end,.layout-align-xl-end-center,.layout-align-xl-end-end,.layout-align-xl-end-start,.layout-align-xl-end-stretch{justify-content:flex-end}.layout-align-xl-space-around,.layout-align-xl-space-around-center,.layout-align-xl-space-around-end,.layout-align-xl-space-around-start,.layout-align-xl-space-around-stretch{justify-content:space-around}.layout-align-xl-space-between,.layout-align-xl-space-between-center,.layout-align-xl-space-between-end,.layout-align-xl-space-between-start,.layout-align-xl-space-between-stretch{justify-content:space-between}.layout-align-xl-center-start,.layout-align-xl-end-start,.layout-align-xl-space-around-start,.layout-align-xl-space-between-start,.layout-align-xl-start-start{align-items:flex-start;align-content:flex-start}.layout-align-xl-center-center,.layout-align-xl-end-center,.layout-align-xl-space-around-center,.layout-align-xl-space-between-center,.layout-align-xl-start-center{align-items:center;align-content:center;max-width:100%}.layout-align-xl-center-center>*,.layout-align-xl-end-center>*,.layout-align-xl-space-around-center>*,.layout-align-xl-space-between-center>*,.layout-align-xl-start-center>*{max-width:100%;box-sizing:border-box}.layout-align-xl-center-end,.layout-align-xl-end-end,.layout-align-xl-space-around-end,.layout-align-xl-space-between-end,.layout-align-xl-start-end{align-items:flex-end;align-content:flex-end}.layout-align-xl-center-stretch,.layout-align-xl-end-stretch,.layout-align-xl-space-around-stretch,.layout-align-xl-space-between-stretch,.layout-align-xl-start-stretch{align-items:stretch;align-content:stretch}.flex-xl{flex:1;box-sizing:border-box}.flex-xl-grow{flex:1 1 100%;box-sizing:border-box}.flex-xl-initial{flex:0 1 auto;box-sizing:border-box}.flex-xl-auto{flex:1 1 auto;box-sizing:border-box}.flex-xl-none{flex:0 0 auto;box-sizing:border-box}.flex-xl-noshrink{flex:1 0 auto;box-sizing:border-box}.flex-xl-nogrow{flex:0 1 auto;box-sizing:border-box}.flex-xl-0{flex:1 1 0%;max-width:0%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xl-0{flex:1 1 0%;max-width:0%;max-height:100%;box-sizing:border-box;min-width:0}.layout-column>.flex-xl-0{flex:1 1 0%;max-width:100%;max-height:0%;box-sizing:border-box}.layout-row>.flex-xl-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xl-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-xl-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-xl-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-xl-row>.flex-xl-0{flex:1 1 0%;max-width:0%;max-height:100%;box-sizing:border-box;min-width:0}.layout-xl-column>.flex-xl-0{flex:1 1 0%;max-width:100%;max-height:0%;box-sizing:border-box;min-height:0}.flex-xl-5{flex:1 1 5%;max-width:5%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xl-5{flex:1 1 5%;max-width:5%;max-height:100%;box-sizing:border-box}.layout-column>.flex-xl-5{flex:1 1 5%;max-width:100%;max-height:5%;box-sizing:border-box}.layout-row>.flex-xl-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xl-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-xl-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-xl-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-xl-row>.flex-xl-5{flex:1 1 5%;max-width:5%;max-height:100%;box-sizing:border-box}.layout-xl-column>.flex-xl-5{flex:1 1 5%;max-width:100%;max-height:5%;box-sizing:border-box}.flex-xl-10{flex:1 1 10%;max-width:10%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xl-10{flex:1 1 10%;max-width:10%;max-height:100%;box-sizing:border-box}.layout-column>.flex-xl-10{flex:1 1 10%;max-width:100%;max-height:10%;box-sizing:border-box}.layout-row>.flex-xl-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xl-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-xl-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-xl-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-xl-row>.flex-xl-10{flex:1 1 10%;max-width:10%;max-height:100%;box-sizing:border-box}.layout-xl-column>.flex-xl-10{flex:1 1 10%;max-width:100%;max-height:10%;box-sizing:border-box}.flex-xl-15{flex:1 1 15%;max-width:15%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xl-15{flex:1 1 15%;max-width:15%;max-height:100%;box-sizing:border-box}.layout-column>.flex-xl-15{flex:1 1 15%;max-width:100%;max-height:15%;box-sizing:border-box}.layout-row>.flex-xl-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xl-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-xl-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-xl-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-xl-row>.flex-xl-15{flex:1 1 15%;max-width:15%;max-height:100%;box-sizing:border-box}.layout-xl-column>.flex-xl-15{flex:1 1 15%;max-width:100%;max-height:15%;box-sizing:border-box}.flex-xl-20{flex:1 1 20%;max-width:20%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xl-20{flex:1 1 20%;max-width:20%;max-height:100%;box-sizing:border-box}.layout-column>.flex-xl-20{flex:1 1 20%;max-width:100%;max-height:20%;box-sizing:border-box}.layout-row>.flex-xl-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xl-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-xl-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-xl-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-xl-row>.flex-xl-20{flex:1 1 20%;max-width:20%;max-height:100%;box-sizing:border-box}.layout-xl-column>.flex-xl-20{flex:1 1 20%;max-width:100%;max-height:20%;box-sizing:border-box}.flex-xl-25{flex:1 1 25%;max-width:25%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xl-25{flex:1 1 25%;max-width:25%;max-height:100%;box-sizing:border-box}.layout-column>.flex-xl-25{flex:1 1 25%;max-width:100%;max-height:25%;box-sizing:border-box}.layout-row>.flex-xl-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xl-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-xl-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-xl-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-xl-row>.flex-xl-25{flex:1 1 25%;max-width:25%;max-height:100%;box-sizing:border-box}.layout-xl-column>.flex-xl-25{flex:1 1 25%;max-width:100%;max-height:25%;box-sizing:border-box}.flex-xl-30{flex:1 1 30%;max-width:30%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xl-30{flex:1 1 30%;max-width:30%;max-height:100%;box-sizing:border-box}.layout-column>.flex-xl-30{flex:1 1 30%;max-width:100%;max-height:30%;box-sizing:border-box}.layout-row>.flex-xl-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xl-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-xl-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-xl-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-xl-row>.flex-xl-30{flex:1 1 30%;max-width:30%;max-height:100%;box-sizing:border-box}.layout-xl-column>.flex-xl-30{flex:1 1 30%;max-width:100%;max-height:30%;box-sizing:border-box}.flex-xl-35{flex:1 1 35%;max-width:35%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xl-35{flex:1 1 35%;max-width:35%;max-height:100%;box-sizing:border-box}.layout-column>.flex-xl-35{flex:1 1 35%;max-width:100%;max-height:35%;box-sizing:border-box}.layout-row>.flex-xl-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xl-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-xl-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-xl-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-xl-row>.flex-xl-35{flex:1 1 35%;max-width:35%;max-height:100%;box-sizing:border-box}.layout-xl-column>.flex-xl-35{flex:1 1 35%;max-width:100%;max-height:35%;box-sizing:border-box}.flex-xl-40{flex:1 1 40%;max-width:40%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xl-40{flex:1 1 40%;max-width:40%;max-height:100%;box-sizing:border-box}.layout-column>.flex-xl-40{flex:1 1 40%;max-width:100%;max-height:40%;box-sizing:border-box}.layout-row>.flex-xl-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xl-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-xl-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-xl-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-xl-row>.flex-xl-40{flex:1 1 40%;max-width:40%;max-height:100%;box-sizing:border-box}.layout-xl-column>.flex-xl-40{flex:1 1 40%;max-width:100%;max-height:40%;box-sizing:border-box}.flex-xl-45{flex:1 1 45%;max-width:45%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xl-45{flex:1 1 45%;max-width:45%;max-height:100%;box-sizing:border-box}.layout-column>.flex-xl-45{flex:1 1 45%;max-width:100%;max-height:45%;box-sizing:border-box}.layout-row>.flex-xl-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xl-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-xl-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-xl-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-xl-row>.flex-xl-45{flex:1 1 45%;max-width:45%;max-height:100%;box-sizing:border-box}.layout-xl-column>.flex-xl-45{flex:1 1 45%;max-width:100%;max-height:45%;box-sizing:border-box}.flex-xl-50{flex:1 1 50%;max-width:50%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xl-50{flex:1 1 50%;max-width:50%;max-height:100%;box-sizing:border-box}.layout-column>.flex-xl-50{flex:1 1 50%;max-width:100%;max-height:50%;box-sizing:border-box}.layout-row>.flex-xl-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xl-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-xl-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-xl-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-xl-row>.flex-xl-50{flex:1 1 50%;max-width:50%;max-height:100%;box-sizing:border-box}.layout-xl-column>.flex-xl-50{flex:1 1 50%;max-width:100%;max-height:50%;box-sizing:border-box}.flex-xl-55{flex:1 1 55%;max-width:55%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xl-55{flex:1 1 55%;max-width:55%;max-height:100%;box-sizing:border-box}.layout-column>.flex-xl-55{flex:1 1 55%;max-width:100%;max-height:55%;box-sizing:border-box}.layout-row>.flex-xl-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xl-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-xl-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-xl-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-xl-row>.flex-xl-55{flex:1 1 55%;max-width:55%;max-height:100%;box-sizing:border-box}.layout-xl-column>.flex-xl-55{flex:1 1 55%;max-width:100%;max-height:55%;box-sizing:border-box}.flex-xl-60{flex:1 1 60%;max-width:60%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xl-60{flex:1 1 60%;max-width:60%;max-height:100%;box-sizing:border-box}.layout-column>.flex-xl-60{flex:1 1 60%;max-width:100%;max-height:60%;box-sizing:border-box}.layout-row>.flex-xl-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xl-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-xl-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-xl-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-xl-row>.flex-xl-60{flex:1 1 60%;max-width:60%;max-height:100%;box-sizing:border-box}.layout-xl-column>.flex-xl-60{flex:1 1 60%;max-width:100%;max-height:60%;box-sizing:border-box}.flex-xl-65{flex:1 1 65%;max-width:65%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xl-65{flex:1 1 65%;max-width:65%;max-height:100%;box-sizing:border-box}.layout-column>.flex-xl-65{flex:1 1 65%;max-width:100%;max-height:65%;box-sizing:border-box}.layout-row>.flex-xl-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xl-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-xl-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-xl-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-xl-row>.flex-xl-65{flex:1 1 65%;max-width:65%;max-height:100%;box-sizing:border-box}.layout-xl-column>.flex-xl-65{flex:1 1 65%;max-width:100%;max-height:65%;box-sizing:border-box}.flex-xl-70{flex:1 1 70%;max-width:70%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xl-70{flex:1 1 70%;max-width:70%;max-height:100%;box-sizing:border-box}.layout-column>.flex-xl-70{flex:1 1 70%;max-width:100%;max-height:70%;box-sizing:border-box}.layout-row>.flex-xl-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xl-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-xl-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-xl-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-xl-row>.flex-xl-70{flex:1 1 70%;max-width:70%;max-height:100%;box-sizing:border-box}.layout-xl-column>.flex-xl-70{flex:1 1 70%;max-width:100%;max-height:70%;box-sizing:border-box}.flex-xl-75{flex:1 1 75%;max-width:75%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xl-75{flex:1 1 75%;max-width:75%;max-height:100%;box-sizing:border-box}.layout-column>.flex-xl-75{flex:1 1 75%;max-width:100%;max-height:75%;box-sizing:border-box}.layout-row>.flex-xl-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xl-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-xl-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-xl-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-xl-row>.flex-xl-75{flex:1 1 75%;max-width:75%;max-height:100%;box-sizing:border-box}.layout-xl-column>.flex-xl-75{flex:1 1 75%;max-width:100%;max-height:75%;box-sizing:border-box}.flex-xl-80{flex:1 1 80%;max-width:80%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xl-80{flex:1 1 80%;max-width:80%;max-height:100%;box-sizing:border-box}.layout-column>.flex-xl-80{flex:1 1 80%;max-width:100%;max-height:80%;box-sizing:border-box}.layout-row>.flex-xl-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xl-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-xl-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-xl-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-xl-row>.flex-xl-80{flex:1 1 80%;max-width:80%;max-height:100%;box-sizing:border-box}.layout-xl-column>.flex-xl-80{flex:1 1 80%;max-width:100%;max-height:80%;box-sizing:border-box}.flex-xl-85{flex:1 1 85%;max-width:85%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xl-85{flex:1 1 85%;max-width:85%;max-height:100%;box-sizing:border-box}.layout-column>.flex-xl-85{flex:1 1 85%;max-width:100%;max-height:85%;box-sizing:border-box}.layout-row>.flex-xl-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xl-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-xl-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-xl-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-xl-row>.flex-xl-85{flex:1 1 85%;max-width:85%;max-height:100%;box-sizing:border-box}.layout-xl-column>.flex-xl-85{flex:1 1 85%;max-width:100%;max-height:85%;box-sizing:border-box}.flex-xl-90{flex:1 1 90%;max-width:90%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xl-90{flex:1 1 90%;max-width:90%;max-height:100%;box-sizing:border-box}.layout-column>.flex-xl-90{flex:1 1 90%;max-width:100%;max-height:90%;box-sizing:border-box}.layout-row>.flex-xl-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xl-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-xl-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-xl-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-xl-row>.flex-xl-90{flex:1 1 90%;max-width:90%;max-height:100%;box-sizing:border-box}.layout-xl-column>.flex-xl-90{flex:1 1 90%;max-width:100%;max-height:90%;box-sizing:border-box}.flex-xl-95{flex:1 1 95%;max-width:95%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xl-95{flex:1 1 95%;max-width:95%;max-height:100%;box-sizing:border-box}.layout-column>.flex-xl-95{flex:1 1 95%;max-width:100%;max-height:95%;box-sizing:border-box}.layout-row>.flex-xl-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xl-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-xl-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-xl-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-xl-row>.flex-xl-95{flex:1 1 95%;max-width:95%;max-height:100%;box-sizing:border-box}.layout-xl-column>.flex-xl-95{flex:1 1 95%;max-width:100%;max-height:95%;box-sizing:border-box}.flex-xl-100{flex:1 1 100%;max-width:100%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xl-100{flex:1 1 100%;max-width:100%;max-height:100%;box-sizing:border-box}.layout-column>.flex-xl-100{flex:1 1 100%;max-width:100%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xl-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xl-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-xl-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-xl-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-xl-row>.flex-xl-100{flex:1 1 100%;max-width:100%;max-height:100%;box-sizing:border-box}.layout-xl-column>.flex-xl-100{flex:1 1 100%;max-width:100%;max-height:100%;box-sizing:border-box}.layout-xl-row>.flex-xl-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-xl-row>.flex-xl-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-xl-row>.flex{min-width:0}.layout-xl-column>.flex-xl-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-xl-column>.flex-xl-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-xl-column>.flex{min-height:0}.layout-xl,.layout-xl-column,.layout-xl-row{box-sizing:border-box;display:-webkit-box;display:-webkit-flex;display:-moz-box;display:-ms-flexbox;display:flex}.layout-xl-column{flex-direction:column}.layout-xl-row{flex-direction:row}.hide-gt-lg:not(.show-gt-xs):not(.show-gt-sm):not(.show-gt-md):not(.show-gt-lg):not(.show-xl):not(.show),.hide-gt-md:not(.show-gt-xs):not(.show-gt-sm):not(.show-gt-md):not(.show-gt-lg):not(.show-xl):not(.show),.hide-gt-sm:not(.show-gt-xs):not(.show-gt-sm):not(.show-gt-md):not(.show-gt-lg):not(.show-xl):not(.show),.hide-gt-xs:not(.show-gt-xs):not(.show-gt-sm):not(.show-gt-md):not(.show-gt-lg):not(.show-xl):not(.show),.hide:not(.show-gt-xs):not(.show-gt-sm):not(.show-gt-md):not(.show-gt-lg):not(.show-xl):not(.show){display:none}.hide-xl:not(.show-xl):not(.show-gt-lg):not(.show-gt-md):not(.show-gt-sm):not(.show-gt-xs):not(.show){display:none}}@media print{.hide-print:not(.show-print):not(.show){display:none!important}}md-menu[md-nest-level='1']{margin:0}md-menu[md-nest-level='1'] .md-button{display:inline-block;border-radius:0;margin:auto 0;font-size:15px;text-transform:none;font-weight:400;height:100%;padding-left:16px;padding-right:16px;width:100%}*{text-rendering:optimizeLegibility;-o-text-rendering:optimizeLegibility;-ms-text-rendering:optimizeLegibility;-moz-text-rendering:optimizeLegibility;-webkit-text-rendering:optimizeLegibility;-webkit-tap-highlight-color:transparent;box-sizing:border-box}:after,:before{box-sizing:border-box}:focus{outline:0}:not(md-input-container)>button,:not(md-input-container)>input[type=button],:not(md-input-container)>input[type=email],:not(md-input-container)>input[type=image],:not(md-input-container)>input[type=password],:not(md-input-container)>input[type=search],:not(md-input-container)>input[type=submit],:not(md-input-container)>input[type=tel],:not(md-input-container)>input[type=text],:not(md-input-container)>textarea{-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;appearance:none;-moz-appearance:none;-webkit-appearance:none;border:none;padding:0;margin:0}:not(md-input-container)>button,:not(md-input-container)>input[type=button],:not(md-input-container)>input[type=submit]{background:0 0}button{border-radius:0;font-family:inherit;font-size:inherit;padding:0;margin:0;appearance:none;-moz-appearance:none;-webkit-appearance:none}[layout]>*{min-height:auto;min-height:initial}md-card>:not(md-card-content) img,md-card>img{height:inherit;height:initial}.md-datepicker-calendar-pane *{box-sizing:initial}md-autocomplete-wrap>input[type=search]{background:#fff;padding:0 15px!important}md-backdrop.md-opaque{background-color:rgba(33,33,33,.48)!important}md-card md-card-header md-card-avatar md-icon{width:40px;height:40px}md-checkbox.no-label{margin:0}md-chip .md-chip-remove md-icon{margin-left:2px}md-chip .md-chip-remove md-icon svg{width:18px;height:18px;max-width:18px;max-height:18px;margin:4px}md-datepicker .md-datepicker-button{padding:0!important;margin:0!important;vertical-align:middle}md-datepicker .md-datepicker-input-container{margin-left:0}.md-inline-form md-datepicker{margin-top:14px}md-dialog md-dialog-content{padding:32px 24px 24px 24px}md-dialog md-dialog-actions{min-height:64px;padding-top:8px;padding-bottom:8px}md-dialog md-dialog-actions .md-button{margin:0 8px}md-input-container.no-errors-spacer .md-errors-spacer{display:none}md-input-container .input-hint{position:absolute;right:auto;bottom:7px;left:2px;font-size:12px;line-height:14px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-input-container.md-icon-left .input-hint{left:38px}md-list-item .md-list-item-text p{font-size:13px!important}.md-menu,md-menu{padding:0}md-menu-content.md-menu-bar-menu.md-dense{padding:8px 0}md-menu-content.md-menu-bar-menu.md-dense .md-button,md-menu-content.md-menu-bar-menu.md-dense md-menu-item{height:40px;line-height:40px}md-menu-content.md-menu-bar-menu.md-dense .md-button.md-indent>md-icon,md-menu-content.md-menu-bar-menu.md-dense md-menu-item.md-indent>md-icon{top:8px}.md-open-menu-container md-menu-content md-menu-item.selected{opacity:.4}md-menu-content md-menu-item .md-button{text-align:left}md-select.simplified{margin:0 8px}md-select.simplified .md-select-value{border:none!important;box-sizing:border-box;padding:0}md-select.simplified .md-select-value :first-child{transform:none;height:auto}md-select.simplified .md-select-value .md-select-icon{transform:none;font-size:16px}md-select.simplified .md-select-value .md-select-icon:after{top:1px}md-select[multiple] md-select-value>:first-child{display:flex}md-select[multiple] md-select-value>:first-child>:first-child{flex:0}md-select[multiple] md-select-value>:first-child .md-container{padding-right:6px}md-select[multiple] md-select-value>:first-child .md-container:first-of-type{padding-right:0}md-select-menu md-select-header{position:relative;display:flex;align-items:center;width:auto;height:48px;padding-left:10.667px;box-shadow:0 1px 0 0 rgba(0,0,0,.1),0 0 0 0 rgba(0,0,0,.14),0 0 0 0 rgba(0,0,0,.12);cursor:pointer}md-select-menu md-select-header input[type=search]{border:none;outline:0;height:100%;width:100%;padding:0}md-sidenav{-webkit-overflow-scrolling:touch}md-toolbar.colored-toolbar{color:rgba(255,255,255,.87)}md-toolbar.colored-toolbar md-menu-bar md-menu._md-open>button{background:rgba(0,0,0,.12)}md-toolbar.colored-toolbar md-menu._md-open>button{background:rgba(0,0,0,.12)}md-toolbar.colored-toolbar input{color:rgba(255,255,255,.87)!important}md-progress-circular[disabled]{visibility:hidden}body,html{overflow:hidden!important}#main{position:fixed;top:0;left:0;width:100vw;height:100vh}body.boxed{background:#3f4450}body.boxed #main{overflow:hidden!important;width:100%;max-width:1280px;margin:0 auto;box-shadow:0 0 12px rgba(0,0,0,.45)}#layout-content-only{position:relative;height:100%;max-height:100%}#layout-content-only #content{position:absolute;top:0;right:0;bottom:0;left:0}#layout-content-with-toolbar{position:relative;height:100%;max-height:100%}#layout-content-with-toolbar #content{position:absolute;top:64px;right:0;bottom:0;left:0}#layout-vertical-navigation{width:100%;height:100%;max-height:100%}#layout-vertical-navigation #content-container{position:relative;overflow:hidden;width:100%;height:100%}#layout-vertical-navigation #content-container #content{width:100%;height:100%;overflow:auto}#layout-vertical-navigation-fullwidth-toolbar{height:100%;max-height:100%}#layout-vertical-navigation-fullwidth-toolbar #main-container{position:relative}#layout-vertical-navigation-fullwidth-toolbar #main-container #content-container{position:relative;overflow:hidden}#layout-vertical-navigation-fullwidth-toolbar #main-container #content-container #content{position:absolute;top:0;right:0;bottom:0;left:0}#layout-vertical-navigation-fullwidth-toolbar-2{height:100%;max-height:100%}#layout-vertical-navigation-fullwidth-toolbar-2 #main-container{position:relative}#layout-vertical-navigation-fullwidth-toolbar-2 #main-container #content-container{position:relative;overflow:hidden}#layout-vertical-navigation-fullwidth-toolbar-2 #main-container #content-container #content{position:absolute;top:0;right:0;bottom:0;left:0}#layout-horizontal-navigation{height:100%;max-height:100%}#layout-horizontal-navigation #content-container{position:relative;overflow:hidden}#layout-horizontal-navigation #content-container #content{position:absolute;top:0;right:0;bottom:0;left:0}.page-layout{position:relative;overflow:hidden}.page-layout .top-bg{position:absolute;z-index:1;top:0;right:0;left:0;height:200px;background-image:url(/assets/images/backgrounds/header-bg.png);background-size:cover}.page-layout md-backdrop{z-index:50}.page-layout>.header .breadcrumb{margin-bottom:16px;font-weight:500;color:rgba(0,0,0,.54)}.page-layout>.header .breadcrumb md-icon{margin:0}.page-layout>.header .breadcrumb .separator{margin:0 8px}.page-layout>.header .title{font-size:34px}.page-layout.carded{min-height:100%;height:100%}.page-layout.carded.fullwidth.single-scroll{height:auto}.page-layout.carded.fullwidth.single-scroll>.center .content-card .content{overflow:hidden}.page-layout.carded.fullwidth>.center{position:relative;z-index:2;margin-left:32px;margin-right:32px}.page-layout.carded.fullwidth>.center .header{height:136px;min-height:136px;max-height:136px;padding:24px}.page-layout.carded.fullwidth>.center .content-card{background:#fff;box-shadow:0 4px 5px -2px rgba(0,0,0,.2),0 7px 10px 1px rgba(0,0,0,.14),0 2px 16px 1px rgba(0,0,0,.12);overflow:hidden}.page-layout.carded.fullwidth>.center .content-card .toolbar{padding:8px 24px;height:64px;min-height:64px;max-height:64px;border-bottom:1px solid rgba(0,0,0,.12)}.page-layout.carded.fullwidth>.center .content-card .content{padding:24px;background:#fff}.page-layout.carded.left-sidenav.single-scroll{height:auto}.page-layout.carded.left-sidenav.single-scroll>.center .content-card .content{overflow:hidden}.page-layout.carded.left-sidenav>.sidenav{width:240px;min-width:240px;max-width:240px;box-shadow:0 4px 5px -2px rgba(0,0,0,.2),0 7px 10px 1px rgba(0,0,0,.14),0 2px 16px 1px rgba(0,0,0,.12);z-index:51}.page-layout.carded.left-sidenav>.sidenav .header{height:200px;min-height:200px;max-height:200px;padding:24px}.page-layout.carded.left-sidenav>.sidenav .content{background:0 0;padding:24px}.page-layout.carded.left-sidenav>.sidenav.md-locked-open{width:220px;min-width:220px;max-width:220px;z-index:2;background:0 0;box-shadow:none}.page-layout.carded.left-sidenav>.sidenav.md-locked-open+.center{margin-left:0}.page-layout.carded.left-sidenav>.sidenav:not(.md-locked-open) .header{border-bottom:1px solid rgba(0,0,0,.12)}.page-layout.carded.left-sidenav>.sidenav:not(.md-locked-open) .content{overflow:hidden}.page-layout.carded.left-sidenav>.center{position:relative;z-index:2;margin-left:32px;margin-right:32px}.page-layout.carded.left-sidenav>.center .header{height:136px;min-height:136px;max-height:136px;padding:24px}.page-layout.carded.left-sidenav>.center .content-card{background:#fff;box-shadow:0 4px 5px -2px rgba(0,0,0,.2),0 7px 10px 1px rgba(0,0,0,.14),0 2px 16px 1px rgba(0,0,0,.12);overflow:hidden}.page-layout.carded.left-sidenav>.center .content-card .toolbar{padding:8px 24px;height:64px;min-height:64px;max-height:64px;border-bottom:1px solid rgba(0,0,0,.12)}.page-layout.carded.left-sidenav>.center .content-card .toolbar .sidenav-toggle{margin:0 8px 0 0!important;padding:0!important;border-radius:0}.page-layout.carded.left-sidenav>.center .content-card .content{padding:24px;background:#fff}.page-layout.carded.right-sidenav.single-scroll{height:auto}.page-layout.carded.right-sidenav.single-scroll>.center .content-card .content{overflow:hidden}.page-layout.carded.right-sidenav>.sidenav{width:240px;min-width:240px;max-width:240px;box-shadow:0 4px 5px -2px rgba(0,0,0,.2),0 7px 10px 1px rgba(0,0,0,.14),0 2px 16px 1px rgba(0,0,0,.12);z-index:51}.page-layout.carded.right-sidenav>.sidenav .header{height:200px;min-height:200px;max-height:200px;padding:24px 24px 24px 0}.page-layout.carded.right-sidenav>.sidenav .content{background:0 0;padding:24px 24px 24px 0}.page-layout.carded.right-sidenav>.sidenav.md-locked-open{width:196px;min-width:196px;max-width:196px;z-index:2;background:0 0;box-shadow:none}.page-layout.carded.right-sidenav>.sidenav:not(.md-locked-open) .header{padding:24px;border-bottom:1px solid rgba(0,0,0,.12)}.page-layout.carded.right-sidenav>.sidenav:not(.md-locked-open) .content{overflow:hidden;padding:24px}.page-layout.carded.right-sidenav>.center{position:relative;z-index:2;margin-left:32px;margin-right:32px}.page-layout.carded.right-sidenav>.center .header{height:136px;min-height:136px;max-height:136px;padding:24px}.page-layout.carded.right-sidenav>.center .content-card{background:#fff;box-shadow:0 4px 5px -2px rgba(0,0,0,.2),0 7px 10px 1px rgba(0,0,0,.14),0 2px 16px 1px rgba(0,0,0,.12);overflow:hidden}.page-layout.carded.right-sidenav>.center .content-card .toolbar{padding:8px 24px;height:64px;min-height:64px;max-height:64px;border-bottom:1px solid rgba(0,0,0,.12)}.page-layout.carded.right-sidenav>.center .content-card .toolbar .sidenav-toggle{margin:0 0 0 8px!important;padding:0!important;border-radius:0}.page-layout.carded.right-sidenav>.center .content-card .content{padding:24px;background:#fff}.page-layout.simple.fullwidth,.page-layout.simple.inner-sidenav{min-height:100%}.page-layout.simple.fullwidth>.header,.page-layout.simple.inner-sidenav>.header{height:200px;min-height:200px;max-height:200px;padding:24px;background-image:url(/assets/images/backgrounds/header-bg.png);background-size:cover}.page-layout.simple.fullwidth>.content,.page-layout.simple.inner-sidenav>.content{padding:24px}.page-layout.simple.left-sidenav{min-height:100%;height:100%}.page-layout.simple.left-sidenav.single-scroll{height:auto}.page-layout.simple.left-sidenav.single-scroll>.center{overflow:hidden}.page-layout.simple.left-sidenav.inner-sidenav>.content>md-sidenav{margin-right:24px}.page-layout.simple.left-sidenav .sidenav{width:240px;min-width:240px;max-width:240px;padding:24px;z-index:51;box-shadow:0 4px 5px -2px rgba(0,0,0,.2),0 7px 10px 1px rgba(0,0,0,.14),0 2px 16px 1px rgba(0,0,0,.12)}.page-layout.simple.left-sidenav .sidenav.md-locked-open{width:220px;min-width:220px;max-width:220px;z-index:2;box-shadow:none;background:0 0}.page-layout.simple.left-sidenav>.center{position:relative;overflow:auto;z-index:3;box-shadow:0 4px 5px -2px rgba(0,0,0,.2),0 7px 10px 1px rgba(0,0,0,.14),0 2px 16px 1px rgba(0,0,0,.12)}.page-layout.simple.left-sidenav>.center .header{height:200px;min-height:200px;max-height:200px;padding:24px;background-image:url(/assets/images/backgrounds/header-bg.png);background-size:cover}.page-layout.simple.left-sidenav>.center .content{padding:24px;background:#fff}.page-layout.simple.right-sidenav{min-height:100%;height:100%}.page-layout.simple.right-sidenav.single-scroll{height:auto}.page-layout.simple.right-sidenav.single-scroll>.center{overflow:hidden}.page-layout.simple.right-sidenav.inner-sidenav>.content>md-sidenav{margin-left:24px}.page-layout.simple.right-sidenav .sidenav{width:240px;min-width:240px;max-width:240px;padding:24px;z-index:51;box-shadow:0 4px 5px -2px rgba(0,0,0,.2),0 7px 10px 1px rgba(0,0,0,.14),0 2px 16px 1px rgba(0,0,0,.12)}.page-layout.simple.right-sidenav .sidenav.md-locked-open{width:220px;min-width:220px;max-width:220px;z-index:2;box-shadow:none;background:0 0}.page-layout.simple.right-sidenav>.center{position:relative;overflow:auto;z-index:3;box-shadow:0 4px 5px -2px rgba(0,0,0,.2),0 7px 10px 1px rgba(0,0,0,.14),0 2px 16px 1px rgba(0,0,0,.12)}.page-layout.simple.right-sidenav>.center .header{height:200px;min-height:200px;max-height:200px;padding:24px;background-image:url(/assets/images/backgrounds/header-bg.png);background-size:cover}.page-layout.simple.right-sidenav>.center .content{padding:24px;background:#fff}.page-layout.simple.inner-sidenav{height:auto}.page-layout.simple.inner-sidenav>.content>md-sidenav.md-locked-open{padding:0}.page-layout.simple.tabbed{width:100%;height:100%;min-height:100%}.page-layout.simple.tabbed>.header{height:200px;min-height:200px;max-height:200px;padding:24px;background-image:url(/assets/images/backgrounds/header-bg.png);background-size:cover}.page-layout.simple.tabbed>.content{width:100%;height:100%;overflow:hidden}.page-layout.simple.tabbed>.content>md-tabs>md-tabs-wrapper{background:#fff;box-shadow:0 1px 3px 0 rgba(0,0,0,.2),0 1px 1px 0 rgba(0,0,0,.14),0 2px 1px -1px rgba(0,0,0,.12);padding:0 24px}.page-layout.simple.tabbed>.content>md-tabs>md-tabs-wrapper md-tabs-canvas{height:56px}.page-layout.simple.tabbed>.content>md-tabs>md-tabs-wrapper md-tabs-canvas md-pagination-wrapper{height:56px}.page-layout.simple.tabbed>.content>md-tabs>md-tabs-wrapper md-tabs-canvas .md-tab{padding:16px 24px;text-transform:none}.page-layout.simple.tabbed>.content>md-tabs:not(.md-dynamic-height) md-tabs-content-wrapper{top:56px}.page-layout.simple.tabbed>.content>md-tabs>md-tabs-content-wrapper{width:100%;height:calc(100% - 56px)}.page-layout.simple.tabbed>.content>md-tabs>md-tabs-content-wrapper>md-tab-content.md-active{padding:24px;box-sizing:border-box;overflow:auto;width:100%;height:100%;display:block}.page-layout.simple.tabbed>.content>md-nav-bar .md-nav-bar{background:#fff;box-shadow:0 1px 3px 0 rgba(0,0,0,.2),0 1px 1px 0 rgba(0,0,0,.14),0 2px 1px -1px rgba(0,0,0,.12);border:none;height:56px}.page-layout.simple.tabbed>.content>md-nav-bar .md-nav-bar nav{margin:0 12px}.page-layout.simple.tabbed>.content>md-nav-bar .md-nav-bar nav .md-nav-item{height:56px}.page-layout.simple.tabbed>.content>md-nav-bar .md-nav-bar nav .md-nav-item ._md-nav-button{height:56px;line-height:32px}.page-layout.simple.tabbed>.content>md-nav-bar .md-nav-bar nav .md-nav-item ._md-nav-button-text{text-transform:none}.page-layout.blank{min-height:100%;padding:24px}.single-scroll .carded.fullwidth{height:auto}.single-scroll .carded.fullwidth>.center .content-card .content{overflow:hidden}.single-scroll .carded.left-sidenav{height:auto}.single-scroll .carded.left-sidenav>.center .content-card .content{overflow:hidden}.single-scroll .carded.right-sidenav{height:auto}.single-scroll .carded.right-sidenav>.center .content-card .content{overflow:hidden}.single-scroll .simple.left-sidenav{height:auto}.single-scroll .simple.left-sidenav>.center{overflow:hidden}.single-scroll .simple.right-sidenav{height:auto}.single-scroll .simple.right-sidenav>.center{overflow:hidden}@media screen and (max-width:1280px){.page-layout.simple.inner-sidenav.left-sidenav>.content,.page-layout.simple.inner-sidenav.right-sidenav>.content{height:auto!important}.page-layout.simple.inner-sidenav.left-sidenav>.content>md-sidenav,.page-layout.simple.inner-sidenav.right-sidenav>.content>md-sidenav{margin-left:0;margin-right:0}.sidenav-open .page-layout.simple.inner-sidenav{height:100%}}@media screen and (max-width:600px){.page-layout .top-bg{height:160px}.page-layout.carded.fullwidth>.center,.page-layout.carded.left-sidenav>.center,.page-layout.carded.right-sidenav>.center{margin-left:16px;margin-right:16px}.page-layout.carded.fullwidth>.center .header,.page-layout.carded.left-sidenav>.center .header,.page-layout.carded.right-sidenav>.center .header{height:96px;min-height:96px;max-height:96px;padding:16px}.page-layout.carded.fullwidth{height:auto}.page-layout.carded.fullwidth>.center .content-card .content{overflow:hidden}.page-layout.carded.left-sidenav,.page-layout.carded.right-sidenav{height:auto}.page-layout.carded.left-sidenav>.center .content-card .content,.page-layout.carded.right-sidenav>.center .content-card .content{overflow:hidden}.page-layout.simple.fullwidth>.header,.page-layout.simple.inner-sidenav>.header{height:160px;min-height:160px;max-height:160px;padding:16px}.page-layout.simple.left-sidenav>.center .header,.page-layout.simple.right-sidenav>.center .header{height:160px;min-height:160px;max-height:160px;padding:16px}.page-layout.simple.left-sidenav,.page-layout.simple.right-sidenav{height:auto}.page-layout.simple.left-sidenav>.center,.page-layout.simple.right-sidenav>.center{overflow:hidden}}.black-fg,.black-text{color:rgba(0,0,0,.87)!important}.black-fg .icon,.black-fg .secondary-text,.black-fg.icon,.black-fg.secondary-text,.black-text .icon,.black-text .secondary-text,.black-text.icon,.black-text.secondary-text{color:rgba(0,0,0,.54)!important}.black-fg .disabled-text,.black-fg .hint-text,.black-fg.disabled-text,.black-fg.hint-text,.black-text .disabled-text,.black-text .hint-text,.black-text.disabled-text,.black-text.hint-text{color:rgba(0,0,0,.26)!important}.black-fg .divider,.black-fg .faint-text,.black-fg.divider,.black-fg.faint-text,.black-text .divider,.black-text .faint-text,.black-text.divider,.black-text.faint-text{color:rgba(0,0,0,.12)!important}.white-fg,.white-text{color:#fff!important}.white-fg .icon,.white-fg .secondary-text,.white-fg.icon,.white-fg.secondary-text,.white-text .icon,.white-text .secondary-text,.white-text.icon,.white-text.secondary-text{color:rgba(255,255,255,.7)!important}.white-fg .disabled-text,.white-fg .hint-text,.white-fg.disabled-text,.white-fg.hint-text,.white-text .disabled-text,.white-text .hint-text,.white-text.disabled-text,.white-text.hint-text{color:rgba(255,255,255,.3)!important}.white-fg .divider,.white-fg .faint-text,.white-fg.divider,.white-fg.faint-text,.white-text .divider,.white-text .faint-text,.white-text.divider,.white-text.faint-text{color:rgba(255,255,255,.12)!important}.white-fg md-icon,.white-text md-icon{color:#fff}.white-fg md-progress-linear .md-container,.white-text md-progress-linear .md-container{background:rgba(255,255,255,.3)}.white-fg md-progress-linear .md-bar,.white-text md-progress-linear .md-bar{background:rgba(255,255,255,.7)}.red-50-bg{background-color:#ffebee!important}.md-red-50-bg{background-color:#ffebee!important;color:rgba(0,0,0,.87)}.red-50-fg{color:#ffebee!important}.red-50-border{border-color:#ffebee!important}.red-50-border-top{border-top-color:#ffebee!important}.red-50-border-right{border-right-color:#ffebee!important}.red-50-border-bottom{border-bottom-color:#ffebee!important}.red-50-border-left{border-left-color:#ffebee!important}.red-100-bg{background-color:#ffcdd2!important}.md-red-100-bg{background-color:#ffcdd2!important;color:rgba(0,0,0,.87)}.red-100-fg{color:#ffcdd2!important}.red-100-border{border-color:#ffcdd2!important}.red-100-border-top{border-top-color:#ffcdd2!important}.red-100-border-right{border-right-color:#ffcdd2!important}.red-100-border-bottom{border-bottom-color:#ffcdd2!important}.red-100-border-left{border-left-color:#ffcdd2!important}.red-200-bg{background-color:#ef9a9a!important}.md-red-200-bg{background-color:#ef9a9a!important;color:rgba(0,0,0,.87)}.red-200-fg{color:#ef9a9a!important}.red-200-border{border-color:#ef9a9a!important}.red-200-border-top{border-top-color:#ef9a9a!important}.red-200-border-right{border-right-color:#ef9a9a!important}.red-200-border-bottom{border-bottom-color:#ef9a9a!important}.red-200-border-left{border-left-color:#ef9a9a!important}.red-300-bg{background-color:#e57373!important}.md-red-300-bg{background-color:#e57373!important;color:rgba(0,0,0,.87)}.red-300-fg{color:#e57373!important}.red-300-border{border-color:#e57373!important}.red-300-border-top{border-top-color:#e57373!important}.red-300-border-right{border-right-color:#e57373!important}.red-300-border-bottom{border-bottom-color:#e57373!important}.red-300-border-left{border-left-color:#e57373!important}.red-400-bg{background-color:#ef5350!important}.md-red-400-bg{background-color:#ef5350!important;color:#fff}.red-400-fg{color:#ef5350!important}.red-400-border{border-color:#ef5350!important}.red-400-border-top{border-top-color:#ef5350!important}.red-400-border-right{border-right-color:#ef5350!important}.red-400-border-bottom{border-bottom-color:#ef5350!important}.red-400-border-left{border-left-color:#ef5350!important}.red-500-bg{background-color:#f44336!important}.md-red-500-bg{background-color:#f44336!important;color:#fff}.red-500-fg{color:#f44336!important}.red-500-border{border-color:#f44336!important}.red-500-border-top{border-top-color:#f44336!important}.red-500-border-right{border-right-color:#f44336!important}.red-500-border-bottom{border-bottom-color:#f44336!important}.red-500-border-left{border-left-color:#f44336!important}.md-red-bg{background-color:#f44336!important;color:#fff}.red-bg{background-color:#f44336!important}.red-fg{color:#f44336!important}.red-border{border-color:#f44336!important}.red-border-top{border-top-color:#f44336!important}.red-border-right{border-right-color:#f44336!important}.red-border-bottom{border-bottom-color:#f44336!important}.red-border-left{border-left-color:#f44336!important}.red-600-bg{background-color:#e53935!important}.md-red-600-bg{background-color:#e53935!important;color:#fff}.red-600-fg{color:#e53935!important}.red-600-border{border-color:#e53935!important}.red-600-border-top{border-top-color:#e53935!important}.red-600-border-right{border-right-color:#e53935!important}.red-600-border-bottom{border-bottom-color:#e53935!important}.red-600-border-left{border-left-color:#e53935!important}.red-700-bg{background-color:#d32f2f!important}.md-red-700-bg{background-color:#d32f2f!important;color:#fff}.red-700-fg{color:#d32f2f!important}.red-700-border{border-color:#d32f2f!important}.red-700-border-top{border-top-color:#d32f2f!important}.red-700-border-right{border-right-color:#d32f2f!important}.red-700-border-bottom{border-bottom-color:#d32f2f!important}.red-700-border-left{border-left-color:#d32f2f!important}.red-800-bg{background-color:#c62828!important}.md-red-800-bg{background-color:#c62828!important;color:rgba(255,255,255,.87)}.red-800-fg{color:#c62828!important}.red-800-border{border-color:#c62828!important}.red-800-border-top{border-top-color:#c62828!important}.red-800-border-right{border-right-color:#c62828!important}.red-800-border-bottom{border-bottom-color:#c62828!important}.red-800-border-left{border-left-color:#c62828!important}.red-900-bg{background-color:#b71c1c!important}.md-red-900-bg{background-color:#b71c1c!important;color:rgba(255,255,255,.87)}.red-900-fg{color:#b71c1c!important}.red-900-border{border-color:#b71c1c!important}.red-900-border-top{border-top-color:#b71c1c!important}.red-900-border-right{border-right-color:#b71c1c!important}.red-900-border-bottom{border-bottom-color:#b71c1c!important}.red-900-border-left{border-left-color:#b71c1c!important}.red-A100-bg{background-color:#ff8a80!important}.md-red-A100-bg{background-color:#ff8a80!important;color:rgba(0,0,0,.87)}.red-A100-fg{color:#ff8a80!important}.red-A100-border{border-color:#ff8a80!important}.red-A100-border-top{border-top-color:#ff8a80!important}.red-A100-border-right{border-right-color:#ff8a80!important}.red-A100-border-bottom{border-bottom-color:#ff8a80!important}.red-A100-border-left{border-left-color:#ff8a80!important}.red-A200-bg{background-color:#ff5252!important}.md-red-A200-bg{background-color:#ff5252!important;color:#fff}.red-A200-fg{color:#ff5252!important}.red-A200-border{border-color:#ff5252!important}.red-A200-border-top{border-top-color:#ff5252!important}.red-A200-border-right{border-right-color:#ff5252!important}.red-A200-border-bottom{border-bottom-color:#ff5252!important}.red-A200-border-left{border-left-color:#ff5252!important}.red-A400-bg{background-color:#ff1744!important}.md-red-A400-bg{background-color:#ff1744!important;color:#fff}.red-A400-fg{color:#ff1744!important}.red-A400-border{border-color:#ff1744!important}.red-A400-border-top{border-top-color:#ff1744!important}.red-A400-border-right{border-right-color:#ff1744!important}.red-A400-border-bottom{border-bottom-color:#ff1744!important}.red-A400-border-left{border-left-color:#ff1744!important}.red-A700-bg{background-color:#d50000!important}.md-red-A700-bg{background-color:#d50000!important;color:#fff}.red-A700-fg{color:#d50000!important}.red-A700-border{border-color:#d50000!important}.red-A700-border-top{border-top-color:#d50000!important}.red-A700-border-right{border-right-color:#d50000!important}.red-A700-border-bottom{border-bottom-color:#d50000!important}.red-A700-border-left{border-left-color:#d50000!important}.pink-50-bg{background-color:#fce4ec!important}.md-pink-50-bg{background-color:#fce4ec!important;color:rgba(0,0,0,.87)}.pink-50-fg{color:#fce4ec!important}.pink-50-border{border-color:#fce4ec!important}.pink-50-border-top{border-top-color:#fce4ec!important}.pink-50-border-right{border-right-color:#fce4ec!important}.pink-50-border-bottom{border-bottom-color:#fce4ec!important}.pink-50-border-left{border-left-color:#fce4ec!important}.pink-100-bg{background-color:#f8bbd0!important}.md-pink-100-bg{background-color:#f8bbd0!important;color:rgba(0,0,0,.87)}.pink-100-fg{color:#f8bbd0!important}.pink-100-border{border-color:#f8bbd0!important}.pink-100-border-top{border-top-color:#f8bbd0!important}.pink-100-border-right{border-right-color:#f8bbd0!important}.pink-100-border-bottom{border-bottom-color:#f8bbd0!important}.pink-100-border-left{border-left-color:#f8bbd0!important}.pink-200-bg{background-color:#f48fb1!important}.md-pink-200-bg{background-color:#f48fb1!important;color:rgba(0,0,0,.87)}.pink-200-fg{color:#f48fb1!important}.pink-200-border{border-color:#f48fb1!important}.pink-200-border-top{border-top-color:#f48fb1!important}.pink-200-border-right{border-right-color:#f48fb1!important}.pink-200-border-bottom{border-bottom-color:#f48fb1!important}.pink-200-border-left{border-left-color:#f48fb1!important}.pink-300-bg{background-color:#f06292!important}.md-pink-300-bg{background-color:#f06292!important;color:rgba(255,255,255,.87)}.pink-300-fg{color:#f06292!important}.pink-300-border{border-color:#f06292!important}.pink-300-border-top{border-top-color:#f06292!important}.pink-300-border-right{border-right-color:#f06292!important}.pink-300-border-bottom{border-bottom-color:#f06292!important}.pink-300-border-left{border-left-color:#f06292!important}.pink-400-bg{background-color:#ec407a!important}.md-pink-400-bg{background-color:#ec407a!important;color:rgba(255,255,255,.87)}.pink-400-fg{color:#ec407a!important}.pink-400-border{border-color:#ec407a!important}.pink-400-border-top{border-top-color:#ec407a!important}.pink-400-border-right{border-right-color:#ec407a!important}.pink-400-border-bottom{border-bottom-color:#ec407a!important}.pink-400-border-left{border-left-color:#ec407a!important}.pink-500-bg{background-color:#e91e63!important}.md-pink-500-bg{background-color:#e91e63!important;color:#fff}.pink-500-fg{color:#e91e63!important}.pink-500-border{border-color:#e91e63!important}.pink-500-border-top{border-top-color:#e91e63!important}.pink-500-border-right{border-right-color:#e91e63!important}.pink-500-border-bottom{border-bottom-color:#e91e63!important}.pink-500-border-left{border-left-color:#e91e63!important}.md-pink-bg{background-color:#e91e63!important;color:#fff}.pink-bg{background-color:#e91e63!important}.pink-fg{color:#e91e63!important}.pink-border{border-color:#e91e63!important}.pink-border-top{border-top-color:#e91e63!important}.pink-border-right{border-right-color:#e91e63!important}.pink-border-bottom{border-bottom-color:#e91e63!important}.pink-border-left{border-left-color:#e91e63!important}.pink-600-bg{background-color:#d81b60!important}.md-pink-600-bg{background-color:#d81b60!important;color:#fff}.pink-600-fg{color:#d81b60!important}.pink-600-border{border-color:#d81b60!important}.pink-600-border-top{border-top-color:#d81b60!important}.pink-600-border-right{border-right-color:#d81b60!important}.pink-600-border-bottom{border-bottom-color:#d81b60!important}.pink-600-border-left{border-left-color:#d81b60!important}.pink-700-bg{background-color:#c2185b!important}.md-pink-700-bg{background-color:#c2185b!important;color:rgba(255,255,255,.87)}.pink-700-fg{color:#c2185b!important}.pink-700-border{border-color:#c2185b!important}.pink-700-border-top{border-top-color:#c2185b!important}.pink-700-border-right{border-right-color:#c2185b!important}.pink-700-border-bottom{border-bottom-color:#c2185b!important}.pink-700-border-left{border-left-color:#c2185b!important}.pink-800-bg{background-color:#ad1457!important}.md-pink-800-bg{background-color:#ad1457!important;color:rgba(255,255,255,.87)}.pink-800-fg{color:#ad1457!important}.pink-800-border{border-color:#ad1457!important}.pink-800-border-top{border-top-color:#ad1457!important}.pink-800-border-right{border-right-color:#ad1457!important}.pink-800-border-bottom{border-bottom-color:#ad1457!important}.pink-800-border-left{border-left-color:#ad1457!important}.pink-900-bg{background-color:#880e4f!important}.md-pink-900-bg{background-color:#880e4f!important;color:rgba(255,255,255,.87)}.pink-900-fg{color:#880e4f!important}.pink-900-border{border-color:#880e4f!important}.pink-900-border-top{border-top-color:#880e4f!important}.pink-900-border-right{border-right-color:#880e4f!important}.pink-900-border-bottom{border-bottom-color:#880e4f!important}.pink-900-border-left{border-left-color:#880e4f!important}.pink-A100-bg{background-color:#ff80ab!important}.md-pink-A100-bg{background-color:#ff80ab!important;color:rgba(0,0,0,.87)}.pink-A100-fg{color:#ff80ab!important}.pink-A100-border{border-color:#ff80ab!important}.pink-A100-border-top{border-top-color:#ff80ab!important}.pink-A100-border-right{border-right-color:#ff80ab!important}.pink-A100-border-bottom{border-bottom-color:#ff80ab!important}.pink-A100-border-left{border-left-color:#ff80ab!important}.pink-A200-bg{background-color:#ff4081!important}.md-pink-A200-bg{background-color:#ff4081!important;color:#fff}.pink-A200-fg{color:#ff4081!important}.pink-A200-border{border-color:#ff4081!important}.pink-A200-border-top{border-top-color:#ff4081!important}.pink-A200-border-right{border-right-color:#ff4081!important}.pink-A200-border-bottom{border-bottom-color:#ff4081!important}.pink-A200-border-left{border-left-color:#ff4081!important}.pink-A400-bg{background-color:#f50057!important}.md-pink-A400-bg{background-color:#f50057!important;color:#fff}.pink-A400-fg{color:#f50057!important}.pink-A400-border{border-color:#f50057!important}.pink-A400-border-top{border-top-color:#f50057!important}.pink-A400-border-right{border-right-color:#f50057!important}.pink-A400-border-bottom{border-bottom-color:#f50057!important}.pink-A400-border-left{border-left-color:#f50057!important}.pink-A700-bg{background-color:#c51162!important}.md-pink-A700-bg{background-color:#c51162!important;color:#fff}.pink-A700-fg{color:#c51162!important}.pink-A700-border{border-color:#c51162!important}.pink-A700-border-top{border-top-color:#c51162!important}.pink-A700-border-right{border-right-color:#c51162!important}.pink-A700-border-bottom{border-bottom-color:#c51162!important}.pink-A700-border-left{border-left-color:#c51162!important}.purple-50-bg{background-color:#f3e5f5!important}.md-purple-50-bg{background-color:#f3e5f5!important;color:rgba(0,0,0,.87)}.purple-50-fg{color:#f3e5f5!important}.purple-50-border{border-color:#f3e5f5!important}.purple-50-border-top{border-top-color:#f3e5f5!important}.purple-50-border-right{border-right-color:#f3e5f5!important}.purple-50-border-bottom{border-bottom-color:#f3e5f5!important}.purple-50-border-left{border-left-color:#f3e5f5!important}.purple-100-bg{background-color:#e1bee7!important}.md-purple-100-bg{background-color:#e1bee7!important;color:rgba(0,0,0,.87)}.purple-100-fg{color:#e1bee7!important}.purple-100-border{border-color:#e1bee7!important}.purple-100-border-top{border-top-color:#e1bee7!important}.purple-100-border-right{border-right-color:#e1bee7!important}.purple-100-border-bottom{border-bottom-color:#e1bee7!important}.purple-100-border-left{border-left-color:#e1bee7!important}.purple-200-bg{background-color:#ce93d8!important}.md-purple-200-bg{background-color:#ce93d8!important;color:rgba(0,0,0,.87)}.purple-200-fg{color:#ce93d8!important}.purple-200-border{border-color:#ce93d8!important}.purple-200-border-top{border-top-color:#ce93d8!important}.purple-200-border-right{border-right-color:#ce93d8!important}.purple-200-border-bottom{border-bottom-color:#ce93d8!important}.purple-200-border-left{border-left-color:#ce93d8!important}.purple-300-bg{background-color:#ba68c8!important}.md-purple-300-bg{background-color:#ba68c8!important;color:#fff}.purple-300-fg{color:#ba68c8!important}.purple-300-border{border-color:#ba68c8!important}.purple-300-border-top{border-top-color:#ba68c8!important}.purple-300-border-right{border-right-color:#ba68c8!important}.purple-300-border-bottom{border-bottom-color:#ba68c8!important}.purple-300-border-left{border-left-color:#ba68c8!important}.purple-400-bg{background-color:#ab47bc!important}.md-purple-400-bg{background-color:#ab47bc!important;color:#fff}.purple-400-fg{color:#ab47bc!important}.purple-400-border{border-color:#ab47bc!important}.purple-400-border-top{border-top-color:#ab47bc!important}.purple-400-border-right{border-right-color:#ab47bc!important}.purple-400-border-bottom{border-bottom-color:#ab47bc!important}.purple-400-border-left{border-left-color:#ab47bc!important}.purple-500-bg{background-color:#9c27b0!important}.md-purple-500-bg{background-color:#9c27b0!important;color:rgba(255,255,255,.87)}.purple-500-fg{color:#9c27b0!important}.purple-500-border{border-color:#9c27b0!important}.purple-500-border-top{border-top-color:#9c27b0!important}.purple-500-border-right{border-right-color:#9c27b0!important}.purple-500-border-bottom{border-bottom-color:#9c27b0!important}.purple-500-border-left{border-left-color:#9c27b0!important}.md-purple-bg{background-color:#9c27b0!important;color:rgba(255,255,255,.87)}.purple-bg{background-color:#9c27b0!important}.purple-fg{color:#9c27b0!important}.purple-border{border-color:#9c27b0!important}.purple-border-top{border-top-color:#9c27b0!important}.purple-border-right{border-right-color:#9c27b0!important}.purple-border-bottom{border-bottom-color:#9c27b0!important}.purple-border-left{border-left-color:#9c27b0!important}.purple-600-bg{background-color:#8e24aa!important}.md-purple-600-bg{background-color:#8e24aa!important;color:rgba(255,255,255,.87)}.purple-600-fg{color:#8e24aa!important}.purple-600-border{border-color:#8e24aa!important}.purple-600-border-top{border-top-color:#8e24aa!important}.purple-600-border-right{border-right-color:#8e24aa!important}.purple-600-border-bottom{border-bottom-color:#8e24aa!important}.purple-600-border-left{border-left-color:#8e24aa!important}.purple-700-bg{background-color:#7b1fa2!important}.md-purple-700-bg{background-color:#7b1fa2!important;color:rgba(255,255,255,.87)}.purple-700-fg{color:#7b1fa2!important}.purple-700-border{border-color:#7b1fa2!important}.purple-700-border-top{border-top-color:#7b1fa2!important}.purple-700-border-right{border-right-color:#7b1fa2!important}.purple-700-border-bottom{border-bottom-color:#7b1fa2!important}.purple-700-border-left{border-left-color:#7b1fa2!important}.purple-800-bg{background-color:#6a1b9a!important}.md-purple-800-bg{background-color:#6a1b9a!important;color:rgba(255,255,255,.87)}.purple-800-fg{color:#6a1b9a!important}.purple-800-border{border-color:#6a1b9a!important}.purple-800-border-top{border-top-color:#6a1b9a!important}.purple-800-border-right{border-right-color:#6a1b9a!important}.purple-800-border-bottom{border-bottom-color:#6a1b9a!important}.purple-800-border-left{border-left-color:#6a1b9a!important}.purple-900-bg{background-color:#4a148c!important}.md-purple-900-bg{background-color:#4a148c!important;color:rgba(255,255,255,.87)}.purple-900-fg{color:#4a148c!important}.purple-900-border{border-color:#4a148c!important}.purple-900-border-top{border-top-color:#4a148c!important}.purple-900-border-right{border-right-color:#4a148c!important}.purple-900-border-bottom{border-bottom-color:#4a148c!important}.purple-900-border-left{border-left-color:#4a148c!important}.purple-A100-bg{background-color:#ea80fc!important}.md-purple-A100-bg{background-color:#ea80fc!important;color:rgba(0,0,0,.87)}.purple-A100-fg{color:#ea80fc!important}.purple-A100-border{border-color:#ea80fc!important}.purple-A100-border-top{border-top-color:#ea80fc!important}.purple-A100-border-right{border-right-color:#ea80fc!important}.purple-A100-border-bottom{border-bottom-color:#ea80fc!important}.purple-A100-border-left{border-left-color:#ea80fc!important}.purple-A200-bg{background-color:#e040fb!important}.md-purple-A200-bg{background-color:#e040fb!important;color:#fff}.purple-A200-fg{color:#e040fb!important}.purple-A200-border{border-color:#e040fb!important}.purple-A200-border-top{border-top-color:#e040fb!important}.purple-A200-border-right{border-right-color:#e040fb!important}.purple-A200-border-bottom{border-bottom-color:#e040fb!important}.purple-A200-border-left{border-left-color:#e040fb!important}.purple-A400-bg{background-color:#d500f9!important}.md-purple-A400-bg{background-color:#d500f9!important;color:#fff}.purple-A400-fg{color:#d500f9!important}.purple-A400-border{border-color:#d500f9!important}.purple-A400-border-top{border-top-color:#d500f9!important}.purple-A400-border-right{border-right-color:#d500f9!important}.purple-A400-border-bottom{border-bottom-color:#d500f9!important}.purple-A400-border-left{border-left-color:#d500f9!important}.purple-A700-bg{background-color:#a0f!important}.md-purple-A700-bg{background-color:#a0f!important;color:#fff}.purple-A700-fg{color:#a0f!important}.purple-A700-border{border-color:#a0f!important}.purple-A700-border-top{border-top-color:#a0f!important}.purple-A700-border-right{border-right-color:#a0f!important}.purple-A700-border-bottom{border-bottom-color:#a0f!important}.purple-A700-border-left{border-left-color:#a0f!important}.deep-purple-50-bg{background-color:#ede7f6!important}.md-deep-purple-50-bg{background-color:#ede7f6!important;color:rgba(0,0,0,.87)}.deep-purple-50-fg{color:#ede7f6!important}.deep-purple-50-border{border-color:#ede7f6!important}.deep-purple-50-border-top{border-top-color:#ede7f6!important}.deep-purple-50-border-right{border-right-color:#ede7f6!important}.deep-purple-50-border-bottom{border-bottom-color:#ede7f6!important}.deep-purple-50-border-left{border-left-color:#ede7f6!important}.deep-purple-100-bg{background-color:#d1c4e9!important}.md-deep-purple-100-bg{background-color:#d1c4e9!important;color:rgba(0,0,0,.87)}.deep-purple-100-fg{color:#d1c4e9!important}.deep-purple-100-border{border-color:#d1c4e9!important}.deep-purple-100-border-top{border-top-color:#d1c4e9!important}.deep-purple-100-border-right{border-right-color:#d1c4e9!important}.deep-purple-100-border-bottom{border-bottom-color:#d1c4e9!important}.deep-purple-100-border-left{border-left-color:#d1c4e9!important}.deep-purple-200-bg{background-color:#b39ddb!important}.md-deep-purple-200-bg{background-color:#b39ddb!important;color:rgba(0,0,0,.87)}.deep-purple-200-fg{color:#b39ddb!important}.deep-purple-200-border{border-color:#b39ddb!important}.deep-purple-200-border-top{border-top-color:#b39ddb!important}.deep-purple-200-border-right{border-right-color:#b39ddb!important}.deep-purple-200-border-bottom{border-bottom-color:#b39ddb!important}.deep-purple-200-border-left{border-left-color:#b39ddb!important}.deep-purple-300-bg{background-color:#9575cd!important}.md-deep-purple-300-bg{background-color:#9575cd!important;color:#fff}.deep-purple-300-fg{color:#9575cd!important}.deep-purple-300-border{border-color:#9575cd!important}.deep-purple-300-border-top{border-top-color:#9575cd!important}.deep-purple-300-border-right{border-right-color:#9575cd!important}.deep-purple-300-border-bottom{border-bottom-color:#9575cd!important}.deep-purple-300-border-left{border-left-color:#9575cd!important}.deep-purple-400-bg{background-color:#7e57c2!important}.md-deep-purple-400-bg{background-color:#7e57c2!important;color:#fff}.deep-purple-400-fg{color:#7e57c2!important}.deep-purple-400-border{border-color:#7e57c2!important}.deep-purple-400-border-top{border-top-color:#7e57c2!important}.deep-purple-400-border-right{border-right-color:#7e57c2!important}.deep-purple-400-border-bottom{border-bottom-color:#7e57c2!important}.deep-purple-400-border-left{border-left-color:#7e57c2!important}.deep-purple-500-bg{background-color:#673ab7!important}.md-deep-purple-500-bg{background-color:#673ab7!important;color:rgba(255,255,255,.87)}.deep-purple-500-fg{color:#673ab7!important}.deep-purple-500-border{border-color:#673ab7!important}.deep-purple-500-border-top{border-top-color:#673ab7!important}.deep-purple-500-border-right{border-right-color:#673ab7!important}.deep-purple-500-border-bottom{border-bottom-color:#673ab7!important}.deep-purple-500-border-left{border-left-color:#673ab7!important}.md-deep-purple-bg{background-color:#673ab7!important;color:rgba(255,255,255,.87)}.deep-purple-bg{background-color:#673ab7!important}.deep-purple-fg{color:#673ab7!important}.deep-purple-border{border-color:#673ab7!important}.deep-purple-border-top{border-top-color:#673ab7!important}.deep-purple-border-right{border-right-color:#673ab7!important}.deep-purple-border-bottom{border-bottom-color:#673ab7!important}.deep-purple-border-left{border-left-color:#673ab7!important}.deep-purple-600-bg{background-color:#5e35b1!important}.md-deep-purple-600-bg{background-color:#5e35b1!important;color:rgba(255,255,255,.87)}.deep-purple-600-fg{color:#5e35b1!important}.deep-purple-600-border{border-color:#5e35b1!important}.deep-purple-600-border-top{border-top-color:#5e35b1!important}.deep-purple-600-border-right{border-right-color:#5e35b1!important}.deep-purple-600-border-bottom{border-bottom-color:#5e35b1!important}.deep-purple-600-border-left{border-left-color:#5e35b1!important}.deep-purple-700-bg{background-color:#512da8!important}.md-deep-purple-700-bg{background-color:#512da8!important;color:rgba(255,255,255,.87)}.deep-purple-700-fg{color:#512da8!important}.deep-purple-700-border{border-color:#512da8!important}.deep-purple-700-border-top{border-top-color:#512da8!important}.deep-purple-700-border-right{border-right-color:#512da8!important}.deep-purple-700-border-bottom{border-bottom-color:#512da8!important}.deep-purple-700-border-left{border-left-color:#512da8!important}.deep-purple-800-bg{background-color:#4527a0!important}.md-deep-purple-800-bg{background-color:#4527a0!important;color:rgba(255,255,255,.87)}.deep-purple-800-fg{color:#4527a0!important}.deep-purple-800-border{border-color:#4527a0!important}.deep-purple-800-border-top{border-top-color:#4527a0!important}.deep-purple-800-border-right{border-right-color:#4527a0!important}.deep-purple-800-border-bottom{border-bottom-color:#4527a0!important}.deep-purple-800-border-left{border-left-color:#4527a0!important}.deep-purple-900-bg{background-color:#311b92!important}.md-deep-purple-900-bg{background-color:#311b92!important;color:rgba(255,255,255,.87)}.deep-purple-900-fg{color:#311b92!important}.deep-purple-900-border{border-color:#311b92!important}.deep-purple-900-border-top{border-top-color:#311b92!important}.deep-purple-900-border-right{border-right-color:#311b92!important}.deep-purple-900-border-bottom{border-bottom-color:#311b92!important}.deep-purple-900-border-left{border-left-color:#311b92!important}.deep-purple-A100-bg{background-color:#b388ff!important}.md-deep-purple-A100-bg{background-color:#b388ff!important;color:rgba(0,0,0,.87)}.deep-purple-A100-fg{color:#b388ff!important}.deep-purple-A100-border{border-color:#b388ff!important}.deep-purple-A100-border-top{border-top-color:#b388ff!important}.deep-purple-A100-border-right{border-right-color:#b388ff!important}.deep-purple-A100-border-bottom{border-bottom-color:#b388ff!important}.deep-purple-A100-border-left{border-left-color:#b388ff!important}.deep-purple-A200-bg{background-color:#7c4dff!important}.md-deep-purple-A200-bg{background-color:#7c4dff!important;color:#fff}.deep-purple-A200-fg{color:#7c4dff!important}.deep-purple-A200-border{border-color:#7c4dff!important}.deep-purple-A200-border-top{border-top-color:#7c4dff!important}.deep-purple-A200-border-right{border-right-color:#7c4dff!important}.deep-purple-A200-border-bottom{border-bottom-color:#7c4dff!important}.deep-purple-A200-border-left{border-left-color:#7c4dff!important}.deep-purple-A400-bg{background-color:#651fff!important}.md-deep-purple-A400-bg{background-color:#651fff!important;color:rgba(255,255,255,.87)}.deep-purple-A400-fg{color:#651fff!important}.deep-purple-A400-border{border-color:#651fff!important}.deep-purple-A400-border-top{border-top-color:#651fff!important}.deep-purple-A400-border-right{border-right-color:#651fff!important}.deep-purple-A400-border-bottom{border-bottom-color:#651fff!important}.deep-purple-A400-border-left{border-left-color:#651fff!important}.deep-purple-A700-bg{background-color:#6200ea!important}.md-deep-purple-A700-bg{background-color:#6200ea!important;color:rgba(255,255,255,.87)}.deep-purple-A700-fg{color:#6200ea!important}.deep-purple-A700-border{border-color:#6200ea!important}.deep-purple-A700-border-top{border-top-color:#6200ea!important}.deep-purple-A700-border-right{border-right-color:#6200ea!important}.deep-purple-A700-border-bottom{border-bottom-color:#6200ea!important}.deep-purple-A700-border-left{border-left-color:#6200ea!important}.indigo-50-bg{background-color:#e8eaf6!important}.md-indigo-50-bg{background-color:#e8eaf6!important;color:rgba(0,0,0,.87)}.indigo-50-fg{color:#e8eaf6!important}.indigo-50-border{border-color:#e8eaf6!important}.indigo-50-border-top{border-top-color:#e8eaf6!important}.indigo-50-border-right{border-right-color:#e8eaf6!important}.indigo-50-border-bottom{border-bottom-color:#e8eaf6!important}.indigo-50-border-left{border-left-color:#e8eaf6!important}.indigo-100-bg{background-color:#c5cae9!important}.md-indigo-100-bg{background-color:#c5cae9!important;color:rgba(0,0,0,.87)}.indigo-100-fg{color:#c5cae9!important}.indigo-100-border{border-color:#c5cae9!important}.indigo-100-border-top{border-top-color:#c5cae9!important}.indigo-100-border-right{border-right-color:#c5cae9!important}.indigo-100-border-bottom{border-bottom-color:#c5cae9!important}.indigo-100-border-left{border-left-color:#c5cae9!important}.indigo-200-bg{background-color:#9fa8da!important}.md-indigo-200-bg{background-color:#9fa8da!important;color:rgba(0,0,0,.87)}.indigo-200-fg{color:#9fa8da!important}.indigo-200-border{border-color:#9fa8da!important}.indigo-200-border-top{border-top-color:#9fa8da!important}.indigo-200-border-right{border-right-color:#9fa8da!important}.indigo-200-border-bottom{border-bottom-color:#9fa8da!important}.indigo-200-border-left{border-left-color:#9fa8da!important}.indigo-300-bg{background-color:#7986cb!important}.md-indigo-300-bg{background-color:#7986cb!important;color:#fff}.indigo-300-fg{color:#7986cb!important}.indigo-300-border{border-color:#7986cb!important}.indigo-300-border-top{border-top-color:#7986cb!important}.indigo-300-border-right{border-right-color:#7986cb!important}.indigo-300-border-bottom{border-bottom-color:#7986cb!important}.indigo-300-border-left{border-left-color:#7986cb!important}.indigo-400-bg{background-color:#5c6bc0!important}.md-indigo-400-bg{background-color:#5c6bc0!important;color:#fff}.indigo-400-fg{color:#5c6bc0!important}.indigo-400-border{border-color:#5c6bc0!important}.indigo-400-border-top{border-top-color:#5c6bc0!important}.indigo-400-border-right{border-right-color:#5c6bc0!important}.indigo-400-border-bottom{border-bottom-color:#5c6bc0!important}.indigo-400-border-left{border-left-color:#5c6bc0!important}.indigo-500-bg{background-color:#3f51b5!important}.md-indigo-500-bg{background-color:#3f51b5!important;color:rgba(255,255,255,.87)}.indigo-500-fg{color:#3f51b5!important}.indigo-500-border{border-color:#3f51b5!important}.indigo-500-border-top{border-top-color:#3f51b5!important}.indigo-500-border-right{border-right-color:#3f51b5!important}.indigo-500-border-bottom{border-bottom-color:#3f51b5!important}.indigo-500-border-left{border-left-color:#3f51b5!important}.md-indigo-bg{background-color:#3f51b5!important;color:rgba(255,255,255,.87)}.indigo-bg{background-color:#3f51b5!important}.indigo-fg{color:#3f51b5!important}.indigo-border{border-color:#3f51b5!important}.indigo-border-top{border-top-color:#3f51b5!important}.indigo-border-right{border-right-color:#3f51b5!important}.indigo-border-bottom{border-bottom-color:#3f51b5!important}.indigo-border-left{border-left-color:#3f51b5!important}.indigo-600-bg{background-color:#3949ab!important}.md-indigo-600-bg{background-color:#3949ab!important;color:rgba(255,255,255,.87)}.indigo-600-fg{color:#3949ab!important}.indigo-600-border{border-color:#3949ab!important}.indigo-600-border-top{border-top-color:#3949ab!important}.indigo-600-border-right{border-right-color:#3949ab!important}.indigo-600-border-bottom{border-bottom-color:#3949ab!important}.indigo-600-border-left{border-left-color:#3949ab!important}.indigo-700-bg{background-color:#303f9f!important}.md-indigo-700-bg{background-color:#303f9f!important;color:rgba(255,255,255,.87)}.indigo-700-fg{color:#303f9f!important}.indigo-700-border{border-color:#303f9f!important}.indigo-700-border-top{border-top-color:#303f9f!important}.indigo-700-border-right{border-right-color:#303f9f!important}.indigo-700-border-bottom{border-bottom-color:#303f9f!important}.indigo-700-border-left{border-left-color:#303f9f!important}.indigo-800-bg{background-color:#283593!important}.md-indigo-800-bg{background-color:#283593!important;color:rgba(255,255,255,.87)}.indigo-800-fg{color:#283593!important}.indigo-800-border{border-color:#283593!important}.indigo-800-border-top{border-top-color:#283593!important}.indigo-800-border-right{border-right-color:#283593!important}.indigo-800-border-bottom{border-bottom-color:#283593!important}.indigo-800-border-left{border-left-color:#283593!important}.indigo-900-bg{background-color:#1a237e!important}.md-indigo-900-bg{background-color:#1a237e!important;color:rgba(255,255,255,.87)}.indigo-900-fg{color:#1a237e!important}.indigo-900-border{border-color:#1a237e!important}.indigo-900-border-top{border-top-color:#1a237e!important}.indigo-900-border-right{border-right-color:#1a237e!important}.indigo-900-border-bottom{border-bottom-color:#1a237e!important}.indigo-900-border-left{border-left-color:#1a237e!important}.indigo-A100-bg{background-color:#8c9eff!important}.md-indigo-A100-bg{background-color:#8c9eff!important;color:rgba(0,0,0,.87)}.indigo-A100-fg{color:#8c9eff!important}.indigo-A100-border{border-color:#8c9eff!important}.indigo-A100-border-top{border-top-color:#8c9eff!important}.indigo-A100-border-right{border-right-color:#8c9eff!important}.indigo-A100-border-bottom{border-bottom-color:#8c9eff!important}.indigo-A100-border-left{border-left-color:#8c9eff!important}.indigo-A200-bg{background-color:#536dfe!important}.md-indigo-A200-bg{background-color:#536dfe!important;color:#fff}.indigo-A200-fg{color:#536dfe!important}.indigo-A200-border{border-color:#536dfe!important}.indigo-A200-border-top{border-top-color:#536dfe!important}.indigo-A200-border-right{border-right-color:#536dfe!important}.indigo-A200-border-bottom{border-bottom-color:#536dfe!important}.indigo-A200-border-left{border-left-color:#536dfe!important}.indigo-A400-bg{background-color:#3d5afe!important}.md-indigo-A400-bg{background-color:#3d5afe!important;color:#fff}.indigo-A400-fg{color:#3d5afe!important}.indigo-A400-border{border-color:#3d5afe!important}.indigo-A400-border-top{border-top-color:#3d5afe!important}.indigo-A400-border-right{border-right-color:#3d5afe!important}.indigo-A400-border-bottom{border-bottom-color:#3d5afe!important}.indigo-A400-border-left{border-left-color:#3d5afe!important}.indigo-A700-bg{background-color:#304ffe!important}.md-indigo-A700-bg{background-color:#304ffe!important;color:rgba(255,255,255,.87)}.indigo-A700-fg{color:#304ffe!important}.indigo-A700-border{border-color:#304ffe!important}.indigo-A700-border-top{border-top-color:#304ffe!important}.indigo-A700-border-right{border-right-color:#304ffe!important}.indigo-A700-border-bottom{border-bottom-color:#304ffe!important}.indigo-A700-border-left{border-left-color:#304ffe!important}.blue-50-bg{background-color:#e3f2fd!important}.md-blue-50-bg{background-color:#e3f2fd!important;color:rgba(0,0,0,.87)}.blue-50-fg{color:#e3f2fd!important}.blue-50-border{border-color:#e3f2fd!important}.blue-50-border-top{border-top-color:#e3f2fd!important}.blue-50-border-right{border-right-color:#e3f2fd!important}.blue-50-border-bottom{border-bottom-color:#e3f2fd!important}.blue-50-border-left{border-left-color:#e3f2fd!important}.blue-100-bg{background-color:#bbdefb!important}.md-blue-100-bg{background-color:#bbdefb!important;color:rgba(0,0,0,.87)}.blue-100-fg{color:#bbdefb!important}.blue-100-border{border-color:#bbdefb!important}.blue-100-border-top{border-top-color:#bbdefb!important}.blue-100-border-right{border-right-color:#bbdefb!important}.blue-100-border-bottom{border-bottom-color:#bbdefb!important}.blue-100-border-left{border-left-color:#bbdefb!important}.blue-200-bg{background-color:#90caf9!important}.md-blue-200-bg{background-color:#90caf9!important;color:rgba(0,0,0,.87)}.blue-200-fg{color:#90caf9!important}.blue-200-border{border-color:#90caf9!important}.blue-200-border-top{border-top-color:#90caf9!important}.blue-200-border-right{border-right-color:#90caf9!important}.blue-200-border-bottom{border-bottom-color:#90caf9!important}.blue-200-border-left{border-left-color:#90caf9!important}.blue-300-bg{background-color:#64b5f6!important}.md-blue-300-bg{background-color:#64b5f6!important;color:rgba(0,0,0,.87)}.blue-300-fg{color:#64b5f6!important}.blue-300-border{border-color:#64b5f6!important}.blue-300-border-top{border-top-color:#64b5f6!important}.blue-300-border-right{border-right-color:#64b5f6!important}.blue-300-border-bottom{border-bottom-color:#64b5f6!important}.blue-300-border-left{border-left-color:#64b5f6!important}.blue-400-bg{background-color:#42a5f5!important}.md-blue-400-bg{background-color:#42a5f5!important;color:rgba(0,0,0,.87)}.blue-400-fg{color:#42a5f5!important}.blue-400-border{border-color:#42a5f5!important}.blue-400-border-top{border-top-color:#42a5f5!important}.blue-400-border-right{border-right-color:#42a5f5!important}.blue-400-border-bottom{border-bottom-color:#42a5f5!important}.blue-400-border-left{border-left-color:#42a5f5!important}.blue-500-bg{background-color:#2196f3!important}.md-blue-500-bg{background-color:#2196f3!important;color:#fff}.blue-500-fg{color:#2196f3!important}.blue-500-border{border-color:#2196f3!important}.blue-500-border-top{border-top-color:#2196f3!important}.blue-500-border-right{border-right-color:#2196f3!important}.blue-500-border-bottom{border-bottom-color:#2196f3!important}.blue-500-border-left{border-left-color:#2196f3!important}.md-blue-bg{background-color:#2196f3!important;color:#fff}.blue-bg{background-color:#2196f3!important}.blue-fg{color:#2196f3!important}.blue-border{border-color:#2196f3!important}.blue-border-top{border-top-color:#2196f3!important}.blue-border-right{border-right-color:#2196f3!important}.blue-border-bottom{border-bottom-color:#2196f3!important}.blue-border-left{border-left-color:#2196f3!important}.blue-600-bg{background-color:#1e88e5!important}.md-blue-600-bg{background-color:#1e88e5!important;color:#fff}.blue-600-fg{color:#1e88e5!important}.blue-600-border{border-color:#1e88e5!important}.blue-600-border-top{border-top-color:#1e88e5!important}.blue-600-border-right{border-right-color:#1e88e5!important}.blue-600-border-bottom{border-bottom-color:#1e88e5!important}.blue-600-border-left{border-left-color:#1e88e5!important}.blue-700-bg{background-color:#1976d2!important}.md-blue-700-bg{background-color:#1976d2!important;color:#fff}.blue-700-fg{color:#1976d2!important}.blue-700-border{border-color:#1976d2!important}.blue-700-border-top{border-top-color:#1976d2!important}.blue-700-border-right{border-right-color:#1976d2!important}.blue-700-border-bottom{border-bottom-color:#1976d2!important}.blue-700-border-left{border-left-color:#1976d2!important}.blue-800-bg{background-color:#1565c0!important}.md-blue-800-bg{background-color:#1565c0!important;color:rgba(255,255,255,.87)}.blue-800-fg{color:#1565c0!important}.blue-800-border{border-color:#1565c0!important}.blue-800-border-top{border-top-color:#1565c0!important}.blue-800-border-right{border-right-color:#1565c0!important}.blue-800-border-bottom{border-bottom-color:#1565c0!important}.blue-800-border-left{border-left-color:#1565c0!important}.blue-900-bg{background-color:#0d47a1!important}.md-blue-900-bg{background-color:#0d47a1!important;color:rgba(255,255,255,.87)}.blue-900-fg{color:#0d47a1!important}.blue-900-border{border-color:#0d47a1!important}.blue-900-border-top{border-top-color:#0d47a1!important}.blue-900-border-right{border-right-color:#0d47a1!important}.blue-900-border-bottom{border-bottom-color:#0d47a1!important}.blue-900-border-left{border-left-color:#0d47a1!important}.blue-A100-bg{background-color:#82b1ff!important}.md-blue-A100-bg{background-color:#82b1ff!important;color:rgba(0,0,0,.87)}.blue-A100-fg{color:#82b1ff!important}.blue-A100-border{border-color:#82b1ff!important}.blue-A100-border-top{border-top-color:#82b1ff!important}.blue-A100-border-right{border-right-color:#82b1ff!important}.blue-A100-border-bottom{border-bottom-color:#82b1ff!important}.blue-A100-border-left{border-left-color:#82b1ff!important}.blue-A200-bg{background-color:#448aff!important}.md-blue-A200-bg{background-color:#448aff!important;color:#fff}.blue-A200-fg{color:#448aff!important}.blue-A200-border{border-color:#448aff!important}.blue-A200-border-top{border-top-color:#448aff!important}.blue-A200-border-right{border-right-color:#448aff!important}.blue-A200-border-bottom{border-bottom-color:#448aff!important}.blue-A200-border-left{border-left-color:#448aff!important}.blue-A400-bg{background-color:#2979ff!important}.md-blue-A400-bg{background-color:#2979ff!important;color:#fff}.blue-A400-fg{color:#2979ff!important}.blue-A400-border{border-color:#2979ff!important}.blue-A400-border-top{border-top-color:#2979ff!important}.blue-A400-border-right{border-right-color:#2979ff!important}.blue-A400-border-bottom{border-bottom-color:#2979ff!important}.blue-A400-border-left{border-left-color:#2979ff!important}.blue-A700-bg{background-color:#2962ff!important}.md-blue-A700-bg{background-color:#2962ff!important;color:#fff}.blue-A700-fg{color:#2962ff!important}.blue-A700-border{border-color:#2962ff!important}.blue-A700-border-top{border-top-color:#2962ff!important}.blue-A700-border-right{border-right-color:#2962ff!important}.blue-A700-border-bottom{border-bottom-color:#2962ff!important}.blue-A700-border-left{border-left-color:#2962ff!important}.light-blue-50-bg{background-color:#e1f5fe!important}.md-light-blue-50-bg{background-color:#e1f5fe!important;color:rgba(0,0,0,.87)}.light-blue-50-fg{color:#e1f5fe!important}.light-blue-50-border{border-color:#e1f5fe!important}.light-blue-50-border-top{border-top-color:#e1f5fe!important}.light-blue-50-border-right{border-right-color:#e1f5fe!important}.light-blue-50-border-bottom{border-bottom-color:#e1f5fe!important}.light-blue-50-border-left{border-left-color:#e1f5fe!important}.light-blue-100-bg{background-color:#b3e5fc!important}.md-light-blue-100-bg{background-color:#b3e5fc!important;color:rgba(0,0,0,.87)}.light-blue-100-fg{color:#b3e5fc!important}.light-blue-100-border{border-color:#b3e5fc!important}.light-blue-100-border-top{border-top-color:#b3e5fc!important}.light-blue-100-border-right{border-right-color:#b3e5fc!important}.light-blue-100-border-bottom{border-bottom-color:#b3e5fc!important}.light-blue-100-border-left{border-left-color:#b3e5fc!important}.light-blue-200-bg{background-color:#81d4fa!important}.md-light-blue-200-bg{background-color:#81d4fa!important;color:rgba(0,0,0,.87)}.light-blue-200-fg{color:#81d4fa!important}.light-blue-200-border{border-color:#81d4fa!important}.light-blue-200-border-top{border-top-color:#81d4fa!important}.light-blue-200-border-right{border-right-color:#81d4fa!important}.light-blue-200-border-bottom{border-bottom-color:#81d4fa!important}.light-blue-200-border-left{border-left-color:#81d4fa!important}.light-blue-300-bg{background-color:#4fc3f7!important}.md-light-blue-300-bg{background-color:#4fc3f7!important;color:rgba(0,0,0,.87)}.light-blue-300-fg{color:#4fc3f7!important}.light-blue-300-border{border-color:#4fc3f7!important}.light-blue-300-border-top{border-top-color:#4fc3f7!important}.light-blue-300-border-right{border-right-color:#4fc3f7!important}.light-blue-300-border-bottom{border-bottom-color:#4fc3f7!important}.light-blue-300-border-left{border-left-color:#4fc3f7!important}.light-blue-400-bg{background-color:#29b6f6!important}.md-light-blue-400-bg{background-color:#29b6f6!important;color:rgba(0,0,0,.87)}.light-blue-400-fg{color:#29b6f6!important}.light-blue-400-border{border-color:#29b6f6!important}.light-blue-400-border-top{border-top-color:#29b6f6!important}.light-blue-400-border-right{border-right-color:#29b6f6!important}.light-blue-400-border-bottom{border-bottom-color:#29b6f6!important}.light-blue-400-border-left{border-left-color:#29b6f6!important}.light-blue-500-bg{background-color:#03a9f4!important}.md-light-blue-500-bg{background-color:#03a9f4!important;color:rgba(0,0,0,.87)}.light-blue-500-fg{color:#03a9f4!important}.light-blue-500-border{border-color:#03a9f4!important}.light-blue-500-border-top{border-top-color:#03a9f4!important}.light-blue-500-border-right{border-right-color:#03a9f4!important}.light-blue-500-border-bottom{border-bottom-color:#03a9f4!important}.light-blue-500-border-left{border-left-color:#03a9f4!important}.md-light-blue-bg{background-color:#03a9f4!important;color:rgba(0,0,0,.87)}.light-blue-bg{background-color:#03a9f4!important}.light-blue-fg{color:#03a9f4!important}.light-blue-border{border-color:#03a9f4!important}.light-blue-border-top{border-top-color:#03a9f4!important}.light-blue-border-right{border-right-color:#03a9f4!important}.light-blue-border-bottom{border-bottom-color:#03a9f4!important}.light-blue-border-left{border-left-color:#03a9f4!important}.light-blue-600-bg{background-color:#039be5!important}.md-light-blue-600-bg{background-color:#039be5!important;color:#fff}.light-blue-600-fg{color:#039be5!important}.light-blue-600-border{border-color:#039be5!important}.light-blue-600-border-top{border-top-color:#039be5!important}.light-blue-600-border-right{border-right-color:#039be5!important}.light-blue-600-border-bottom{border-bottom-color:#039be5!important}.light-blue-600-border-left{border-left-color:#039be5!important}.light-blue-700-bg{background-color:#0288d1!important}.md-light-blue-700-bg{background-color:#0288d1!important;color:#fff}.light-blue-700-fg{color:#0288d1!important}.light-blue-700-border{border-color:#0288d1!important}.light-blue-700-border-top{border-top-color:#0288d1!important}.light-blue-700-border-right{border-right-color:#0288d1!important}.light-blue-700-border-bottom{border-bottom-color:#0288d1!important}.light-blue-700-border-left{border-left-color:#0288d1!important}.light-blue-800-bg{background-color:#0277bd!important}.md-light-blue-800-bg{background-color:#0277bd!important;color:#fff}.light-blue-800-fg{color:#0277bd!important}.light-blue-800-border{border-color:#0277bd!important}.light-blue-800-border-top{border-top-color:#0277bd!important}.light-blue-800-border-right{border-right-color:#0277bd!important}.light-blue-800-border-bottom{border-bottom-color:#0277bd!important}.light-blue-800-border-left{border-left-color:#0277bd!important}.light-blue-900-bg{background-color:#01579b!important}.md-light-blue-900-bg{background-color:#01579b!important;color:#fff}.light-blue-900-fg{color:#01579b!important}.light-blue-900-border{border-color:#01579b!important}.light-blue-900-border-top{border-top-color:#01579b!important}.light-blue-900-border-right{border-right-color:#01579b!important}.light-blue-900-border-bottom{border-bottom-color:#01579b!important}.light-blue-900-border-left{border-left-color:#01579b!important}.light-blue-A100-bg{background-color:#80d8ff!important}.md-light-blue-A100-bg{background-color:#80d8ff!important;color:rgba(0,0,0,.87)}.light-blue-A100-fg{color:#80d8ff!important}.light-blue-A100-border{border-color:#80d8ff!important}.light-blue-A100-border-top{border-top-color:#80d8ff!important}.light-blue-A100-border-right{border-right-color:#80d8ff!important}.light-blue-A100-border-bottom{border-bottom-color:#80d8ff!important}.light-blue-A100-border-left{border-left-color:#80d8ff!important}.light-blue-A200-bg{background-color:#40c4ff!important}.md-light-blue-A200-bg{background-color:#40c4ff!important;color:rgba(0,0,0,.87)}.light-blue-A200-fg{color:#40c4ff!important}.light-blue-A200-border{border-color:#40c4ff!important}.light-blue-A200-border-top{border-top-color:#40c4ff!important}.light-blue-A200-border-right{border-right-color:#40c4ff!important}.light-blue-A200-border-bottom{border-bottom-color:#40c4ff!important}.light-blue-A200-border-left{border-left-color:#40c4ff!important}.light-blue-A400-bg{background-color:#00b0ff!important}.md-light-blue-A400-bg{background-color:#00b0ff!important;color:rgba(0,0,0,.87)}.light-blue-A400-fg{color:#00b0ff!important}.light-blue-A400-border{border-color:#00b0ff!important}.light-blue-A400-border-top{border-top-color:#00b0ff!important}.light-blue-A400-border-right{border-right-color:#00b0ff!important}.light-blue-A400-border-bottom{border-bottom-color:#00b0ff!important}.light-blue-A400-border-left{border-left-color:#00b0ff!important}.light-blue-A700-bg{background-color:#0091ea!important}.md-light-blue-A700-bg{background-color:#0091ea!important;color:#fff}.light-blue-A700-fg{color:#0091ea!important}.light-blue-A700-border{border-color:#0091ea!important}.light-blue-A700-border-top{border-top-color:#0091ea!important}.light-blue-A700-border-right{border-right-color:#0091ea!important}.light-blue-A700-border-bottom{border-bottom-color:#0091ea!important}.light-blue-A700-border-left{border-left-color:#0091ea!important}.cyan-50-bg{background-color:#e0f7fa!important}.md-cyan-50-bg{background-color:#e0f7fa!important;color:rgba(0,0,0,.87)}.cyan-50-fg{color:#e0f7fa!important}.cyan-50-border{border-color:#e0f7fa!important}.cyan-50-border-top{border-top-color:#e0f7fa!important}.cyan-50-border-right{border-right-color:#e0f7fa!important}.cyan-50-border-bottom{border-bottom-color:#e0f7fa!important}.cyan-50-border-left{border-left-color:#e0f7fa!important}.cyan-100-bg{background-color:#b2ebf2!important}.md-cyan-100-bg{background-color:#b2ebf2!important;color:rgba(0,0,0,.87)}.cyan-100-fg{color:#b2ebf2!important}.cyan-100-border{border-color:#b2ebf2!important}.cyan-100-border-top{border-top-color:#b2ebf2!important}.cyan-100-border-right{border-right-color:#b2ebf2!important}.cyan-100-border-bottom{border-bottom-color:#b2ebf2!important}.cyan-100-border-left{border-left-color:#b2ebf2!important}.cyan-200-bg{background-color:#80deea!important}.md-cyan-200-bg{background-color:#80deea!important;color:rgba(0,0,0,.87)}.cyan-200-fg{color:#80deea!important}.cyan-200-border{border-color:#80deea!important}.cyan-200-border-top{border-top-color:#80deea!important}.cyan-200-border-right{border-right-color:#80deea!important}.cyan-200-border-bottom{border-bottom-color:#80deea!important}.cyan-200-border-left{border-left-color:#80deea!important}.cyan-300-bg{background-color:#4dd0e1!important}.md-cyan-300-bg{background-color:#4dd0e1!important;color:rgba(0,0,0,.87)}.cyan-300-fg{color:#4dd0e1!important}.cyan-300-border{border-color:#4dd0e1!important}.cyan-300-border-top{border-top-color:#4dd0e1!important}.cyan-300-border-right{border-right-color:#4dd0e1!important}.cyan-300-border-bottom{border-bottom-color:#4dd0e1!important}.cyan-300-border-left{border-left-color:#4dd0e1!important}.cyan-400-bg{background-color:#26c6da!important}.md-cyan-400-bg{background-color:#26c6da!important;color:rgba(0,0,0,.87)}.cyan-400-fg{color:#26c6da!important}.cyan-400-border{border-color:#26c6da!important}.cyan-400-border-top{border-top-color:#26c6da!important}.cyan-400-border-right{border-right-color:#26c6da!important}.cyan-400-border-bottom{border-bottom-color:#26c6da!important}.cyan-400-border-left{border-left-color:#26c6da!important}.cyan-500-bg{background-color:#00bcd4!important}.md-cyan-500-bg{background-color:#00bcd4!important;color:rgba(0,0,0,.87)}.cyan-500-fg{color:#00bcd4!important}.cyan-500-border{border-color:#00bcd4!important}.cyan-500-border-top{border-top-color:#00bcd4!important}.cyan-500-border-right{border-right-color:#00bcd4!important}.cyan-500-border-bottom{border-bottom-color:#00bcd4!important}.cyan-500-border-left{border-left-color:#00bcd4!important}.md-cyan-bg{background-color:#00bcd4!important;color:rgba(0,0,0,.87)}.cyan-bg{background-color:#00bcd4!important}.cyan-fg{color:#00bcd4!important}.cyan-border{border-color:#00bcd4!important}.cyan-border-top{border-top-color:#00bcd4!important}.cyan-border-right{border-right-color:#00bcd4!important}.cyan-border-bottom{border-bottom-color:#00bcd4!important}.cyan-border-left{border-left-color:#00bcd4!important}.cyan-600-bg{background-color:#00acc1!important}.md-cyan-600-bg{background-color:#00acc1!important;color:rgba(0,0,0,.87)}.cyan-600-fg{color:#00acc1!important}.cyan-600-border{border-color:#00acc1!important}.cyan-600-border-top{border-top-color:#00acc1!important}.cyan-600-border-right{border-right-color:#00acc1!important}.cyan-600-border-bottom{border-bottom-color:#00acc1!important}.cyan-600-border-left{border-left-color:#00acc1!important}.cyan-700-bg{background-color:#0097a7!important}.md-cyan-700-bg{background-color:#0097a7!important;color:#fff}.cyan-700-fg{color:#0097a7!important}.cyan-700-border{border-color:#0097a7!important}.cyan-700-border-top{border-top-color:#0097a7!important}.cyan-700-border-right{border-right-color:#0097a7!important}.cyan-700-border-bottom{border-bottom-color:#0097a7!important}.cyan-700-border-left{border-left-color:#0097a7!important}.cyan-800-bg{background-color:#00838f!important}.md-cyan-800-bg{background-color:#00838f!important;color:#fff}.cyan-800-fg{color:#00838f!important}.cyan-800-border{border-color:#00838f!important}.cyan-800-border-top{border-top-color:#00838f!important}.cyan-800-border-right{border-right-color:#00838f!important}.cyan-800-border-bottom{border-bottom-color:#00838f!important}.cyan-800-border-left{border-left-color:#00838f!important}.cyan-900-bg{background-color:#006064!important}.md-cyan-900-bg{background-color:#006064!important;color:#fff}.cyan-900-fg{color:#006064!important}.cyan-900-border{border-color:#006064!important}.cyan-900-border-top{border-top-color:#006064!important}.cyan-900-border-right{border-right-color:#006064!important}.cyan-900-border-bottom{border-bottom-color:#006064!important}.cyan-900-border-left{border-left-color:#006064!important}.cyan-A100-bg{background-color:#84ffff!important}.md-cyan-A100-bg{background-color:#84ffff!important;color:rgba(0,0,0,.87)}.cyan-A100-fg{color:#84ffff!important}.cyan-A100-border{border-color:#84ffff!important}.cyan-A100-border-top{border-top-color:#84ffff!important}.cyan-A100-border-right{border-right-color:#84ffff!important}.cyan-A100-border-bottom{border-bottom-color:#84ffff!important}.cyan-A100-border-left{border-left-color:#84ffff!important}.cyan-A200-bg{background-color:#18ffff!important}.md-cyan-A200-bg{background-color:#18ffff!important;color:rgba(0,0,0,.87)}.cyan-A200-fg{color:#18ffff!important}.cyan-A200-border{border-color:#18ffff!important}.cyan-A200-border-top{border-top-color:#18ffff!important}.cyan-A200-border-right{border-right-color:#18ffff!important}.cyan-A200-border-bottom{border-bottom-color:#18ffff!important}.cyan-A200-border-left{border-left-color:#18ffff!important}.cyan-A400-bg{background-color:#00e5ff!important}.md-cyan-A400-bg{background-color:#00e5ff!important;color:rgba(0,0,0,.87)}.cyan-A400-fg{color:#00e5ff!important}.cyan-A400-border{border-color:#00e5ff!important}.cyan-A400-border-top{border-top-color:#00e5ff!important}.cyan-A400-border-right{border-right-color:#00e5ff!important}.cyan-A400-border-bottom{border-bottom-color:#00e5ff!important}.cyan-A400-border-left{border-left-color:#00e5ff!important}.cyan-A700-bg{background-color:#00b8d4!important}.md-cyan-A700-bg{background-color:#00b8d4!important;color:rgba(0,0,0,.87)}.cyan-A700-fg{color:#00b8d4!important}.cyan-A700-border{border-color:#00b8d4!important}.cyan-A700-border-top{border-top-color:#00b8d4!important}.cyan-A700-border-right{border-right-color:#00b8d4!important}.cyan-A700-border-bottom{border-bottom-color:#00b8d4!important}.cyan-A700-border-left{border-left-color:#00b8d4!important}.teal-50-bg{background-color:#e0f2f1!important}.md-teal-50-bg{background-color:#e0f2f1!important;color:rgba(0,0,0,.87)}.teal-50-fg{color:#e0f2f1!important}.teal-50-border{border-color:#e0f2f1!important}.teal-50-border-top{border-top-color:#e0f2f1!important}.teal-50-border-right{border-right-color:#e0f2f1!important}.teal-50-border-bottom{border-bottom-color:#e0f2f1!important}.teal-50-border-left{border-left-color:#e0f2f1!important}.teal-100-bg{background-color:#b2dfdb!important}.md-teal-100-bg{background-color:#b2dfdb!important;color:rgba(0,0,0,.87)}.teal-100-fg{color:#b2dfdb!important}.teal-100-border{border-color:#b2dfdb!important}.teal-100-border-top{border-top-color:#b2dfdb!important}.teal-100-border-right{border-right-color:#b2dfdb!important}.teal-100-border-bottom{border-bottom-color:#b2dfdb!important}.teal-100-border-left{border-left-color:#b2dfdb!important}.teal-200-bg{background-color:#80cbc4!important}.md-teal-200-bg{background-color:#80cbc4!important;color:rgba(0,0,0,.87)}.teal-200-fg{color:#80cbc4!important}.teal-200-border{border-color:#80cbc4!important}.teal-200-border-top{border-top-color:#80cbc4!important}.teal-200-border-right{border-right-color:#80cbc4!important}.teal-200-border-bottom{border-bottom-color:#80cbc4!important}.teal-200-border-left{border-left-color:#80cbc4!important}.teal-300-bg{background-color:#4db6ac!important}.md-teal-300-bg{background-color:#4db6ac!important;color:rgba(0,0,0,.87)}.teal-300-fg{color:#4db6ac!important}.teal-300-border{border-color:#4db6ac!important}.teal-300-border-top{border-top-color:#4db6ac!important}.teal-300-border-right{border-right-color:#4db6ac!important}.teal-300-border-bottom{border-bottom-color:#4db6ac!important}.teal-300-border-left{border-left-color:#4db6ac!important}.teal-400-bg{background-color:#26a69a!important}.md-teal-400-bg{background-color:#26a69a!important;color:rgba(0,0,0,.87)}.teal-400-fg{color:#26a69a!important}.teal-400-border{border-color:#26a69a!important}.teal-400-border-top{border-top-color:#26a69a!important}.teal-400-border-right{border-right-color:#26a69a!important}.teal-400-border-bottom{border-bottom-color:#26a69a!important}.teal-400-border-left{border-left-color:#26a69a!important}.teal-500-bg{background-color:#009688!important}.md-teal-500-bg{background-color:#009688!important;color:#fff}.teal-500-fg{color:#009688!important}.teal-500-border{border-color:#009688!important}.teal-500-border-top{border-top-color:#009688!important}.teal-500-border-right{border-right-color:#009688!important}.teal-500-border-bottom{border-bottom-color:#009688!important}.teal-500-border-left{border-left-color:#009688!important}.md-teal-bg{background-color:#009688!important;color:#fff}.teal-bg{background-color:#009688!important}.teal-fg{color:#009688!important}.teal-border{border-color:#009688!important}.teal-border-top{border-top-color:#009688!important}.teal-border-right{border-right-color:#009688!important}.teal-border-bottom{border-bottom-color:#009688!important}.teal-border-left{border-left-color:#009688!important}.teal-600-bg{background-color:#00897b!important}.md-teal-600-bg{background-color:#00897b!important;color:#fff}.teal-600-fg{color:#00897b!important}.teal-600-border{border-color:#00897b!important}.teal-600-border-top{border-top-color:#00897b!important}.teal-600-border-right{border-right-color:#00897b!important}.teal-600-border-bottom{border-bottom-color:#00897b!important}.teal-600-border-left{border-left-color:#00897b!important}.teal-700-bg{background-color:#00796b!important}.md-teal-700-bg{background-color:#00796b!important;color:#fff}.teal-700-fg{color:#00796b!important}.teal-700-border{border-color:#00796b!important}.teal-700-border-top{border-top-color:#00796b!important}.teal-700-border-right{border-right-color:#00796b!important}.teal-700-border-bottom{border-bottom-color:#00796b!important}.teal-700-border-left{border-left-color:#00796b!important}.teal-800-bg{background-color:#00695c!important}.md-teal-800-bg{background-color:#00695c!important;color:rgba(255,255,255,.87)}.teal-800-fg{color:#00695c!important}.teal-800-border{border-color:#00695c!important}.teal-800-border-top{border-top-color:#00695c!important}.teal-800-border-right{border-right-color:#00695c!important}.teal-800-border-bottom{border-bottom-color:#00695c!important}.teal-800-border-left{border-left-color:#00695c!important}.teal-900-bg{background-color:#004d40!important}.md-teal-900-bg{background-color:#004d40!important;color:rgba(255,255,255,.87)}.teal-900-fg{color:#004d40!important}.teal-900-border{border-color:#004d40!important}.teal-900-border-top{border-top-color:#004d40!important}.teal-900-border-right{border-right-color:#004d40!important}.teal-900-border-bottom{border-bottom-color:#004d40!important}.teal-900-border-left{border-left-color:#004d40!important}.teal-A100-bg{background-color:#a7ffeb!important}.md-teal-A100-bg{background-color:#a7ffeb!important;color:rgba(0,0,0,.87)}.teal-A100-fg{color:#a7ffeb!important}.teal-A100-border{border-color:#a7ffeb!important}.teal-A100-border-top{border-top-color:#a7ffeb!important}.teal-A100-border-right{border-right-color:#a7ffeb!important}.teal-A100-border-bottom{border-bottom-color:#a7ffeb!important}.teal-A100-border-left{border-left-color:#a7ffeb!important}.teal-A200-bg{background-color:#64ffda!important}.md-teal-A200-bg{background-color:#64ffda!important;color:rgba(0,0,0,.87)}.teal-A200-fg{color:#64ffda!important}.teal-A200-border{border-color:#64ffda!important}.teal-A200-border-top{border-top-color:#64ffda!important}.teal-A200-border-right{border-right-color:#64ffda!important}.teal-A200-border-bottom{border-bottom-color:#64ffda!important}.teal-A200-border-left{border-left-color:#64ffda!important}.teal-A400-bg{background-color:#1de9b6!important}.md-teal-A400-bg{background-color:#1de9b6!important;color:rgba(0,0,0,.87)}.teal-A400-fg{color:#1de9b6!important}.teal-A400-border{border-color:#1de9b6!important}.teal-A400-border-top{border-top-color:#1de9b6!important}.teal-A400-border-right{border-right-color:#1de9b6!important}.teal-A400-border-bottom{border-bottom-color:#1de9b6!important}.teal-A400-border-left{border-left-color:#1de9b6!important}.teal-A700-bg{background-color:#00bfa5!important}.md-teal-A700-bg{background-color:#00bfa5!important;color:rgba(0,0,0,.87)}.teal-A700-fg{color:#00bfa5!important}.teal-A700-border{border-color:#00bfa5!important}.teal-A700-border-top{border-top-color:#00bfa5!important}.teal-A700-border-right{border-right-color:#00bfa5!important}.teal-A700-border-bottom{border-bottom-color:#00bfa5!important}.teal-A700-border-left{border-left-color:#00bfa5!important}.green-50-bg{background-color:#e8f5e9!important}.md-green-50-bg{background-color:#e8f5e9!important;color:rgba(0,0,0,.87)}.green-50-fg{color:#e8f5e9!important}.green-50-border{border-color:#e8f5e9!important}.green-50-border-top{border-top-color:#e8f5e9!important}.green-50-border-right{border-right-color:#e8f5e9!important}.green-50-border-bottom{border-bottom-color:#e8f5e9!important}.green-50-border-left{border-left-color:#e8f5e9!important}.green-100-bg{background-color:#c8e6c9!important}.md-green-100-bg{background-color:#c8e6c9!important;color:rgba(0,0,0,.87)}.green-100-fg{color:#c8e6c9!important}.green-100-border{border-color:#c8e6c9!important}.green-100-border-top{border-top-color:#c8e6c9!important}.green-100-border-right{border-right-color:#c8e6c9!important}.green-100-border-bottom{border-bottom-color:#c8e6c9!important}.green-100-border-left{border-left-color:#c8e6c9!important}.green-200-bg{background-color:#a5d6a7!important}.md-green-200-bg{background-color:#a5d6a7!important;color:rgba(0,0,0,.87)}.green-200-fg{color:#a5d6a7!important}.green-200-border{border-color:#a5d6a7!important}.green-200-border-top{border-top-color:#a5d6a7!important}.green-200-border-right{border-right-color:#a5d6a7!important}.green-200-border-bottom{border-bottom-color:#a5d6a7!important}.green-200-border-left{border-left-color:#a5d6a7!important}.green-300-bg{background-color:#81c784!important}.md-green-300-bg{background-color:#81c784!important;color:rgba(0,0,0,.87)}.green-300-fg{color:#81c784!important}.green-300-border{border-color:#81c784!important}.green-300-border-top{border-top-color:#81c784!important}.green-300-border-right{border-right-color:#81c784!important}.green-300-border-bottom{border-bottom-color:#81c784!important}.green-300-border-left{border-left-color:#81c784!important}.green-400-bg{background-color:#66bb6a!important}.md-green-400-bg{background-color:#66bb6a!important;color:rgba(0,0,0,.87)}.green-400-fg{color:#66bb6a!important}.green-400-border{border-color:#66bb6a!important}.green-400-border-top{border-top-color:#66bb6a!important}.green-400-border-right{border-right-color:#66bb6a!important}.green-400-border-bottom{border-bottom-color:#66bb6a!important}.green-400-border-left{border-left-color:#66bb6a!important}.green-500-bg{background-color:#4caf50!important}.md-green-500-bg{background-color:#4caf50!important;color:rgba(0,0,0,.87)}.green-500-fg{color:#4caf50!important}.green-500-border{border-color:#4caf50!important}.green-500-border-top{border-top-color:#4caf50!important}.green-500-border-right{border-right-color:#4caf50!important}.green-500-border-bottom{border-bottom-color:#4caf50!important}.green-500-border-left{border-left-color:#4caf50!important}.md-green-bg{background-color:#4caf50!important;color:rgba(0,0,0,.87)}.green-bg{background-color:#4caf50!important}.green-fg{color:#4caf50!important}.green-border{border-color:#4caf50!important}.green-border-top{border-top-color:#4caf50!important}.green-border-right{border-right-color:#4caf50!important}.green-border-bottom{border-bottom-color:#4caf50!important}.green-border-left{border-left-color:#4caf50!important}.green-600-bg{background-color:#43a047!important}.md-green-600-bg{background-color:#43a047!important;color:#fff}.green-600-fg{color:#43a047!important}.green-600-border{border-color:#43a047!important}.green-600-border-top{border-top-color:#43a047!important}.green-600-border-right{border-right-color:#43a047!important}.green-600-border-bottom{border-bottom-color:#43a047!important}.green-600-border-left{border-left-color:#43a047!important}.green-700-bg{background-color:#388e3c!important}.md-green-700-bg{background-color:#388e3c!important;color:#fff}.green-700-fg{color:#388e3c!important}.green-700-border{border-color:#388e3c!important}.green-700-border-top{border-top-color:#388e3c!important}.green-700-border-right{border-right-color:#388e3c!important}.green-700-border-bottom{border-bottom-color:#388e3c!important}.green-700-border-left{border-left-color:#388e3c!important}.green-800-bg{background-color:#2e7d32!important}.md-green-800-bg{background-color:#2e7d32!important;color:rgba(255,255,255,.87)}.green-800-fg{color:#2e7d32!important}.green-800-border{border-color:#2e7d32!important}.green-800-border-top{border-top-color:#2e7d32!important}.green-800-border-right{border-right-color:#2e7d32!important}.green-800-border-bottom{border-bottom-color:#2e7d32!important}.green-800-border-left{border-left-color:#2e7d32!important}.green-900-bg{background-color:#1b5e20!important}.md-green-900-bg{background-color:#1b5e20!important;color:rgba(255,255,255,.87)}.green-900-fg{color:#1b5e20!important}.green-900-border{border-color:#1b5e20!important}.green-900-border-top{border-top-color:#1b5e20!important}.green-900-border-right{border-right-color:#1b5e20!important}.green-900-border-bottom{border-bottom-color:#1b5e20!important}.green-900-border-left{border-left-color:#1b5e20!important}.green-A100-bg{background-color:#b9f6ca!important}.md-green-A100-bg{background-color:#b9f6ca!important;color:rgba(0,0,0,.87)}.green-A100-fg{color:#b9f6ca!important}.green-A100-border{border-color:#b9f6ca!important}.green-A100-border-top{border-top-color:#b9f6ca!important}.green-A100-border-right{border-right-color:#b9f6ca!important}.green-A100-border-bottom{border-bottom-color:#b9f6ca!important}.green-A100-border-left{border-left-color:#b9f6ca!important}.green-A200-bg{background-color:#69f0ae!important}.md-green-A200-bg{background-color:#69f0ae!important;color:rgba(0,0,0,.87)}.green-A200-fg{color:#69f0ae!important}.green-A200-border{border-color:#69f0ae!important}.green-A200-border-top{border-top-color:#69f0ae!important}.green-A200-border-right{border-right-color:#69f0ae!important}.green-A200-border-bottom{border-bottom-color:#69f0ae!important}.green-A200-border-left{border-left-color:#69f0ae!important}.green-A400-bg{background-color:#00e676!important}.md-green-A400-bg{background-color:#00e676!important;color:rgba(0,0,0,.87)}.green-A400-fg{color:#00e676!important}.green-A400-border{border-color:#00e676!important}.green-A400-border-top{border-top-color:#00e676!important}.green-A400-border-right{border-right-color:#00e676!important}.green-A400-border-bottom{border-bottom-color:#00e676!important}.green-A400-border-left{border-left-color:#00e676!important}.green-A700-bg{background-color:#00c853!important}.md-green-A700-bg{background-color:#00c853!important;color:rgba(0,0,0,.87)}.green-A700-fg{color:#00c853!important}.green-A700-border{border-color:#00c853!important}.green-A700-border-top{border-top-color:#00c853!important}.green-A700-border-right{border-right-color:#00c853!important}.green-A700-border-bottom{border-bottom-color:#00c853!important}.green-A700-border-left{border-left-color:#00c853!important}.light-green-50-bg{background-color:#f1f8e9!important}.md-light-green-50-bg{background-color:#f1f8e9!important;color:rgba(0,0,0,.87)}.light-green-50-fg{color:#f1f8e9!important}.light-green-50-border{border-color:#f1f8e9!important}.light-green-50-border-top{border-top-color:#f1f8e9!important}.light-green-50-border-right{border-right-color:#f1f8e9!important}.light-green-50-border-bottom{border-bottom-color:#f1f8e9!important}.light-green-50-border-left{border-left-color:#f1f8e9!important}.light-green-100-bg{background-color:#dcedc8!important}.md-light-green-100-bg{background-color:#dcedc8!important;color:rgba(0,0,0,.87)}.light-green-100-fg{color:#dcedc8!important}.light-green-100-border{border-color:#dcedc8!important}.light-green-100-border-top{border-top-color:#dcedc8!important}.light-green-100-border-right{border-right-color:#dcedc8!important}.light-green-100-border-bottom{border-bottom-color:#dcedc8!important}.light-green-100-border-left{border-left-color:#dcedc8!important}.light-green-200-bg{background-color:#c5e1a5!important}.md-light-green-200-bg{background-color:#c5e1a5!important;color:rgba(0,0,0,.87)}.light-green-200-fg{color:#c5e1a5!important}.light-green-200-border{border-color:#c5e1a5!important}.light-green-200-border-top{border-top-color:#c5e1a5!important}.light-green-200-border-right{border-right-color:#c5e1a5!important}.light-green-200-border-bottom{border-bottom-color:#c5e1a5!important}.light-green-200-border-left{border-left-color:#c5e1a5!important}.light-green-300-bg{background-color:#aed581!important}.md-light-green-300-bg{background-color:#aed581!important;color:rgba(0,0,0,.87)}.light-green-300-fg{color:#aed581!important}.light-green-300-border{border-color:#aed581!important}.light-green-300-border-top{border-top-color:#aed581!important}.light-green-300-border-right{border-right-color:#aed581!important}.light-green-300-border-bottom{border-bottom-color:#aed581!important}.light-green-300-border-left{border-left-color:#aed581!important}.light-green-400-bg{background-color:#9ccc65!important}.md-light-green-400-bg{background-color:#9ccc65!important;color:rgba(0,0,0,.87)}.light-green-400-fg{color:#9ccc65!important}.light-green-400-border{border-color:#9ccc65!important}.light-green-400-border-top{border-top-color:#9ccc65!important}.light-green-400-border-right{border-right-color:#9ccc65!important}.light-green-400-border-bottom{border-bottom-color:#9ccc65!important}.light-green-400-border-left{border-left-color:#9ccc65!important}.light-green-500-bg{background-color:#8bc34a!important}.md-light-green-500-bg{background-color:#8bc34a!important;color:rgba(0,0,0,.87)}.light-green-500-fg{color:#8bc34a!important}.light-green-500-border{border-color:#8bc34a!important}.light-green-500-border-top{border-top-color:#8bc34a!important}.light-green-500-border-right{border-right-color:#8bc34a!important}.light-green-500-border-bottom{border-bottom-color:#8bc34a!important}.light-green-500-border-left{border-left-color:#8bc34a!important}.md-light-green-bg{background-color:#8bc34a!important;color:rgba(0,0,0,.87)}.light-green-bg{background-color:#8bc34a!important}.light-green-fg{color:#8bc34a!important}.light-green-border{border-color:#8bc34a!important}.light-green-border-top{border-top-color:#8bc34a!important}.light-green-border-right{border-right-color:#8bc34a!important}.light-green-border-bottom{border-bottom-color:#8bc34a!important}.light-green-border-left{border-left-color:#8bc34a!important}.light-green-600-bg{background-color:#7cb342!important}.md-light-green-600-bg{background-color:#7cb342!important;color:rgba(0,0,0,.87)}.light-green-600-fg{color:#7cb342!important}.light-green-600-border{border-color:#7cb342!important}.light-green-600-border-top{border-top-color:#7cb342!important}.light-green-600-border-right{border-right-color:#7cb342!important}.light-green-600-border-bottom{border-bottom-color:#7cb342!important}.light-green-600-border-left{border-left-color:#7cb342!important}.light-green-700-bg{background-color:#689f38!important}.md-light-green-700-bg{background-color:#689f38!important;color:#fff}.light-green-700-fg{color:#689f38!important}.light-green-700-border{border-color:#689f38!important}.light-green-700-border-top{border-top-color:#689f38!important}.light-green-700-border-right{border-right-color:#689f38!important}.light-green-700-border-bottom{border-bottom-color:#689f38!important}.light-green-700-border-left{border-left-color:#689f38!important}.light-green-800-bg{background-color:#558b2f!important}.md-light-green-800-bg{background-color:#558b2f!important;color:#fff}.light-green-800-fg{color:#558b2f!important}.light-green-800-border{border-color:#558b2f!important}.light-green-800-border-top{border-top-color:#558b2f!important}.light-green-800-border-right{border-right-color:#558b2f!important}.light-green-800-border-bottom{border-bottom-color:#558b2f!important}.light-green-800-border-left{border-left-color:#558b2f!important}.light-green-900-bg{background-color:#33691e!important}.md-light-green-900-bg{background-color:#33691e!important;color:#fff}.light-green-900-fg{color:#33691e!important}.light-green-900-border{border-color:#33691e!important}.light-green-900-border-top{border-top-color:#33691e!important}.light-green-900-border-right{border-right-color:#33691e!important}.light-green-900-border-bottom{border-bottom-color:#33691e!important}.light-green-900-border-left{border-left-color:#33691e!important}.light-green-A100-bg{background-color:#ccff90!important}.md-light-green-A100-bg{background-color:#ccff90!important;color:rgba(0,0,0,.87)}.light-green-A100-fg{color:#ccff90!important}.light-green-A100-border{border-color:#ccff90!important}.light-green-A100-border-top{border-top-color:#ccff90!important}.light-green-A100-border-right{border-right-color:#ccff90!important}.light-green-A100-border-bottom{border-bottom-color:#ccff90!important}.light-green-A100-border-left{border-left-color:#ccff90!important}.light-green-A200-bg{background-color:#b2ff59!important}.md-light-green-A200-bg{background-color:#b2ff59!important;color:rgba(0,0,0,.87)}.light-green-A200-fg{color:#b2ff59!important}.light-green-A200-border{border-color:#b2ff59!important}.light-green-A200-border-top{border-top-color:#b2ff59!important}.light-green-A200-border-right{border-right-color:#b2ff59!important}.light-green-A200-border-bottom{border-bottom-color:#b2ff59!important}.light-green-A200-border-left{border-left-color:#b2ff59!important}.light-green-A400-bg{background-color:#76ff03!important}.md-light-green-A400-bg{background-color:#76ff03!important;color:rgba(0,0,0,.87)}.light-green-A400-fg{color:#76ff03!important}.light-green-A400-border{border-color:#76ff03!important}.light-green-A400-border-top{border-top-color:#76ff03!important}.light-green-A400-border-right{border-right-color:#76ff03!important}.light-green-A400-border-bottom{border-bottom-color:#76ff03!important}.light-green-A400-border-left{border-left-color:#76ff03!important}.light-green-A700-bg{background-color:#64dd17!important}.md-light-green-A700-bg{background-color:#64dd17!important;color:rgba(0,0,0,.87)}.light-green-A700-fg{color:#64dd17!important}.light-green-A700-border{border-color:#64dd17!important}.light-green-A700-border-top{border-top-color:#64dd17!important}.light-green-A700-border-right{border-right-color:#64dd17!important}.light-green-A700-border-bottom{border-bottom-color:#64dd17!important}.light-green-A700-border-left{border-left-color:#64dd17!important}.lime-50-bg{background-color:#f9fbe7!important}.md-lime-50-bg{background-color:#f9fbe7!important;color:rgba(0,0,0,.87)}.lime-50-fg{color:#f9fbe7!important}.lime-50-border{border-color:#f9fbe7!important}.lime-50-border-top{border-top-color:#f9fbe7!important}.lime-50-border-right{border-right-color:#f9fbe7!important}.lime-50-border-bottom{border-bottom-color:#f9fbe7!important}.lime-50-border-left{border-left-color:#f9fbe7!important}.lime-100-bg{background-color:#f0f4c3!important}.md-lime-100-bg{background-color:#f0f4c3!important;color:rgba(0,0,0,.87)}.lime-100-fg{color:#f0f4c3!important}.lime-100-border{border-color:#f0f4c3!important}.lime-100-border-top{border-top-color:#f0f4c3!important}.lime-100-border-right{border-right-color:#f0f4c3!important}.lime-100-border-bottom{border-bottom-color:#f0f4c3!important}.lime-100-border-left{border-left-color:#f0f4c3!important}.lime-200-bg{background-color:#e6ee9c!important}.md-lime-200-bg{background-color:#e6ee9c!important;color:rgba(0,0,0,.87)}.lime-200-fg{color:#e6ee9c!important}.lime-200-border{border-color:#e6ee9c!important}.lime-200-border-top{border-top-color:#e6ee9c!important}.lime-200-border-right{border-right-color:#e6ee9c!important}.lime-200-border-bottom{border-bottom-color:#e6ee9c!important}.lime-200-border-left{border-left-color:#e6ee9c!important}.lime-300-bg{background-color:#dce775!important}.md-lime-300-bg{background-color:#dce775!important;color:rgba(0,0,0,.87)}.lime-300-fg{color:#dce775!important}.lime-300-border{border-color:#dce775!important}.lime-300-border-top{border-top-color:#dce775!important}.lime-300-border-right{border-right-color:#dce775!important}.lime-300-border-bottom{border-bottom-color:#dce775!important}.lime-300-border-left{border-left-color:#dce775!important}.lime-400-bg{background-color:#d4e157!important}.md-lime-400-bg{background-color:#d4e157!important;color:rgba(0,0,0,.87)}.lime-400-fg{color:#d4e157!important}.lime-400-border{border-color:#d4e157!important}.lime-400-border-top{border-top-color:#d4e157!important}.lime-400-border-right{border-right-color:#d4e157!important}.lime-400-border-bottom{border-bottom-color:#d4e157!important}.lime-400-border-left{border-left-color:#d4e157!important}.lime-500-bg{background-color:#cddc39!important}.md-lime-500-bg{background-color:#cddc39!important;color:rgba(0,0,0,.87)}.lime-500-fg{color:#cddc39!important}.lime-500-border{border-color:#cddc39!important}.lime-500-border-top{border-top-color:#cddc39!important}.lime-500-border-right{border-right-color:#cddc39!important}.lime-500-border-bottom{border-bottom-color:#cddc39!important}.lime-500-border-left{border-left-color:#cddc39!important}.md-lime-bg{background-color:#cddc39!important;color:rgba(0,0,0,.87)}.lime-bg{background-color:#cddc39!important}.lime-fg{color:#cddc39!important}.lime-border{border-color:#cddc39!important}.lime-border-top{border-top-color:#cddc39!important}.lime-border-right{border-right-color:#cddc39!important}.lime-border-bottom{border-bottom-color:#cddc39!important}.lime-border-left{border-left-color:#cddc39!important}.lime-600-bg{background-color:#c0ca33!important}.md-lime-600-bg{background-color:#c0ca33!important;color:rgba(0,0,0,.87)}.lime-600-fg{color:#c0ca33!important}.lime-600-border{border-color:#c0ca33!important}.lime-600-border-top{border-top-color:#c0ca33!important}.lime-600-border-right{border-right-color:#c0ca33!important}.lime-600-border-bottom{border-bottom-color:#c0ca33!important}.lime-600-border-left{border-left-color:#c0ca33!important}.lime-700-bg{background-color:#afb42b!important}.md-lime-700-bg{background-color:#afb42b!important;color:rgba(0,0,0,.87)}.lime-700-fg{color:#afb42b!important}.lime-700-border{border-color:#afb42b!important}.lime-700-border-top{border-top-color:#afb42b!important}.lime-700-border-right{border-right-color:#afb42b!important}.lime-700-border-bottom{border-bottom-color:#afb42b!important}.lime-700-border-left{border-left-color:#afb42b!important}.lime-800-bg{background-color:#9e9d24!important}.md-lime-800-bg{background-color:#9e9d24!important;color:rgba(0,0,0,.87)}.lime-800-fg{color:#9e9d24!important}.lime-800-border{border-color:#9e9d24!important}.lime-800-border-top{border-top-color:#9e9d24!important}.lime-800-border-right{border-right-color:#9e9d24!important}.lime-800-border-bottom{border-bottom-color:#9e9d24!important}.lime-800-border-left{border-left-color:#9e9d24!important}.lime-900-bg{background-color:#827717!important}.md-lime-900-bg{background-color:#827717!important;color:#fff}.lime-900-fg{color:#827717!important}.lime-900-border{border-color:#827717!important}.lime-900-border-top{border-top-color:#827717!important}.lime-900-border-right{border-right-color:#827717!important}.lime-900-border-bottom{border-bottom-color:#827717!important}.lime-900-border-left{border-left-color:#827717!important}.lime-A100-bg{background-color:#f4ff81!important}.md-lime-A100-bg{background-color:#f4ff81!important;color:rgba(0,0,0,.87)}.lime-A100-fg{color:#f4ff81!important}.lime-A100-border{border-color:#f4ff81!important}.lime-A100-border-top{border-top-color:#f4ff81!important}.lime-A100-border-right{border-right-color:#f4ff81!important}.lime-A100-border-bottom{border-bottom-color:#f4ff81!important}.lime-A100-border-left{border-left-color:#f4ff81!important}.lime-A200-bg{background-color:#eeff41!important}.md-lime-A200-bg{background-color:#eeff41!important;color:rgba(0,0,0,.87)}.lime-A200-fg{color:#eeff41!important}.lime-A200-border{border-color:#eeff41!important}.lime-A200-border-top{border-top-color:#eeff41!important}.lime-A200-border-right{border-right-color:#eeff41!important}.lime-A200-border-bottom{border-bottom-color:#eeff41!important}.lime-A200-border-left{border-left-color:#eeff41!important}.lime-A400-bg{background-color:#c6ff00!important}.md-lime-A400-bg{background-color:#c6ff00!important;color:rgba(0,0,0,.87)}.lime-A400-fg{color:#c6ff00!important}.lime-A400-border{border-color:#c6ff00!important}.lime-A400-border-top{border-top-color:#c6ff00!important}.lime-A400-border-right{border-right-color:#c6ff00!important}.lime-A400-border-bottom{border-bottom-color:#c6ff00!important}.lime-A400-border-left{border-left-color:#c6ff00!important}.lime-A700-bg{background-color:#aeea00!important}.md-lime-A700-bg{background-color:#aeea00!important;color:rgba(0,0,0,.87)}.lime-A700-fg{color:#aeea00!important}.lime-A700-border{border-color:#aeea00!important}.lime-A700-border-top{border-top-color:#aeea00!important}.lime-A700-border-right{border-right-color:#aeea00!important}.lime-A700-border-bottom{border-bottom-color:#aeea00!important}.lime-A700-border-left{border-left-color:#aeea00!important}.yellow-50-bg{background-color:#fffde7!important}.md-yellow-50-bg{background-color:#fffde7!important;color:rgba(0,0,0,.87)}.yellow-50-fg{color:#fffde7!important}.yellow-50-border{border-color:#fffde7!important}.yellow-50-border-top{border-top-color:#fffde7!important}.yellow-50-border-right{border-right-color:#fffde7!important}.yellow-50-border-bottom{border-bottom-color:#fffde7!important}.yellow-50-border-left{border-left-color:#fffde7!important}.yellow-100-bg{background-color:#fff9c4!important}.md-yellow-100-bg{background-color:#fff9c4!important;color:rgba(0,0,0,.87)}.yellow-100-fg{color:#fff9c4!important}.yellow-100-border{border-color:#fff9c4!important}.yellow-100-border-top{border-top-color:#fff9c4!important}.yellow-100-border-right{border-right-color:#fff9c4!important}.yellow-100-border-bottom{border-bottom-color:#fff9c4!important}.yellow-100-border-left{border-left-color:#fff9c4!important}.yellow-200-bg{background-color:#fff59d!important}.md-yellow-200-bg{background-color:#fff59d!important;color:rgba(0,0,0,.87)}.yellow-200-fg{color:#fff59d!important}.yellow-200-border{border-color:#fff59d!important}.yellow-200-border-top{border-top-color:#fff59d!important}.yellow-200-border-right{border-right-color:#fff59d!important}.yellow-200-border-bottom{border-bottom-color:#fff59d!important}.yellow-200-border-left{border-left-color:#fff59d!important}.yellow-300-bg{background-color:#fff176!important}.md-yellow-300-bg{background-color:#fff176!important;color:rgba(0,0,0,.87)}.yellow-300-fg{color:#fff176!important}.yellow-300-border{border-color:#fff176!important}.yellow-300-border-top{border-top-color:#fff176!important}.yellow-300-border-right{border-right-color:#fff176!important}.yellow-300-border-bottom{border-bottom-color:#fff176!important}.yellow-300-border-left{border-left-color:#fff176!important}.yellow-400-bg{background-color:#ffee58!important}.md-yellow-400-bg{background-color:#ffee58!important;color:rgba(0,0,0,.87)}.yellow-400-fg{color:#ffee58!important}.yellow-400-border{border-color:#ffee58!important}.yellow-400-border-top{border-top-color:#ffee58!important}.yellow-400-border-right{border-right-color:#ffee58!important}.yellow-400-border-bottom{border-bottom-color:#ffee58!important}.yellow-400-border-left{border-left-color:#ffee58!important}.yellow-500-bg{background-color:#ffeb3b!important}.md-yellow-500-bg{background-color:#ffeb3b!important;color:rgba(0,0,0,.87)}.yellow-500-fg{color:#ffeb3b!important}.yellow-500-border{border-color:#ffeb3b!important}.yellow-500-border-top{border-top-color:#ffeb3b!important}.yellow-500-border-right{border-right-color:#ffeb3b!important}.yellow-500-border-bottom{border-bottom-color:#ffeb3b!important}.yellow-500-border-left{border-left-color:#ffeb3b!important}.md-yellow-bg{background-color:#ffeb3b!important;color:rgba(0,0,0,.87)}.yellow-bg{background-color:#ffeb3b!important}.yellow-fg{color:#ffeb3b!important}.yellow-border{border-color:#ffeb3b!important}.yellow-border-top{border-top-color:#ffeb3b!important}.yellow-border-right{border-right-color:#ffeb3b!important}.yellow-border-bottom{border-bottom-color:#ffeb3b!important}.yellow-border-left{border-left-color:#ffeb3b!important}.yellow-600-bg{background-color:#fdd835!important}.md-yellow-600-bg{background-color:#fdd835!important;color:rgba(0,0,0,.87)}.yellow-600-fg{color:#fdd835!important}.yellow-600-border{border-color:#fdd835!important}.yellow-600-border-top{border-top-color:#fdd835!important}.yellow-600-border-right{border-right-color:#fdd835!important}.yellow-600-border-bottom{border-bottom-color:#fdd835!important}.yellow-600-border-left{border-left-color:#fdd835!important}.yellow-700-bg{background-color:#fbc02d!important}.md-yellow-700-bg{background-color:#fbc02d!important;color:rgba(0,0,0,.87)}.yellow-700-fg{color:#fbc02d!important}.yellow-700-border{border-color:#fbc02d!important}.yellow-700-border-top{border-top-color:#fbc02d!important}.yellow-700-border-right{border-right-color:#fbc02d!important}.yellow-700-border-bottom{border-bottom-color:#fbc02d!important}.yellow-700-border-left{border-left-color:#fbc02d!important}.yellow-800-bg{background-color:#f9a825!important}.md-yellow-800-bg{background-color:#f9a825!important;color:rgba(0,0,0,.87)}.yellow-800-fg{color:#f9a825!important}.yellow-800-border{border-color:#f9a825!important}.yellow-800-border-top{border-top-color:#f9a825!important}.yellow-800-border-right{border-right-color:#f9a825!important}.yellow-800-border-bottom{border-bottom-color:#f9a825!important}.yellow-800-border-left{border-left-color:#f9a825!important}.yellow-900-bg{background-color:#f57f17!important}.md-yellow-900-bg{background-color:#f57f17!important;color:rgba(0,0,0,.87)}.yellow-900-fg{color:#f57f17!important}.yellow-900-border{border-color:#f57f17!important}.yellow-900-border-top{border-top-color:#f57f17!important}.yellow-900-border-right{border-right-color:#f57f17!important}.yellow-900-border-bottom{border-bottom-color:#f57f17!important}.yellow-900-border-left{border-left-color:#f57f17!important}.yellow-A100-bg{background-color:#ffff8d!important}.md-yellow-A100-bg{background-color:#ffff8d!important;color:rgba(0,0,0,.87)}.yellow-A100-fg{color:#ffff8d!important}.yellow-A100-border{border-color:#ffff8d!important}.yellow-A100-border-top{border-top-color:#ffff8d!important}.yellow-A100-border-right{border-right-color:#ffff8d!important}.yellow-A100-border-bottom{border-bottom-color:#ffff8d!important}.yellow-A100-border-left{border-left-color:#ffff8d!important}.yellow-A200-bg{background-color:#ff0!important}.md-yellow-A200-bg{background-color:#ff0!important;color:rgba(0,0,0,.87)}.yellow-A200-fg{color:#ff0!important}.yellow-A200-border{border-color:#ff0!important}.yellow-A200-border-top{border-top-color:#ff0!important}.yellow-A200-border-right{border-right-color:#ff0!important}.yellow-A200-border-bottom{border-bottom-color:#ff0!important}.yellow-A200-border-left{border-left-color:#ff0!important}.yellow-A400-bg{background-color:#ffea00!important}.md-yellow-A400-bg{background-color:#ffea00!important;color:rgba(0,0,0,.87)}.yellow-A400-fg{color:#ffea00!important}.yellow-A400-border{border-color:#ffea00!important}.yellow-A400-border-top{border-top-color:#ffea00!important}.yellow-A400-border-right{border-right-color:#ffea00!important}.yellow-A400-border-bottom{border-bottom-color:#ffea00!important}.yellow-A400-border-left{border-left-color:#ffea00!important}.yellow-A700-bg{background-color:#ffd600!important}.md-yellow-A700-bg{background-color:#ffd600!important;color:rgba(0,0,0,.87)}.yellow-A700-fg{color:#ffd600!important}.yellow-A700-border{border-color:#ffd600!important}.yellow-A700-border-top{border-top-color:#ffd600!important}.yellow-A700-border-right{border-right-color:#ffd600!important}.yellow-A700-border-bottom{border-bottom-color:#ffd600!important}.yellow-A700-border-left{border-left-color:#ffd600!important}.amber-50-bg{background-color:#fff8e1!important}.md-amber-50-bg{background-color:#fff8e1!important;color:rgba(0,0,0,.87)}.amber-50-fg{color:#fff8e1!important}.amber-50-border{border-color:#fff8e1!important}.amber-50-border-top{border-top-color:#fff8e1!important}.amber-50-border-right{border-right-color:#fff8e1!important}.amber-50-border-bottom{border-bottom-color:#fff8e1!important}.amber-50-border-left{border-left-color:#fff8e1!important}.amber-100-bg{background-color:#ffecb3!important}.md-amber-100-bg{background-color:#ffecb3!important;color:rgba(0,0,0,.87)}.amber-100-fg{color:#ffecb3!important}.amber-100-border{border-color:#ffecb3!important}.amber-100-border-top{border-top-color:#ffecb3!important}.amber-100-border-right{border-right-color:#ffecb3!important}.amber-100-border-bottom{border-bottom-color:#ffecb3!important}.amber-100-border-left{border-left-color:#ffecb3!important}.amber-200-bg{background-color:#ffe082!important}.md-amber-200-bg{background-color:#ffe082!important;color:rgba(0,0,0,.87)}.amber-200-fg{color:#ffe082!important}.amber-200-border{border-color:#ffe082!important}.amber-200-border-top{border-top-color:#ffe082!important}.amber-200-border-right{border-right-color:#ffe082!important}.amber-200-border-bottom{border-bottom-color:#ffe082!important}.amber-200-border-left{border-left-color:#ffe082!important}.amber-300-bg{background-color:#ffd54f!important}.md-amber-300-bg{background-color:#ffd54f!important;color:rgba(0,0,0,.87)}.amber-300-fg{color:#ffd54f!important}.amber-300-border{border-color:#ffd54f!important}.amber-300-border-top{border-top-color:#ffd54f!important}.amber-300-border-right{border-right-color:#ffd54f!important}.amber-300-border-bottom{border-bottom-color:#ffd54f!important}.amber-300-border-left{border-left-color:#ffd54f!important}.amber-400-bg{background-color:#ffca28!important}.md-amber-400-bg{background-color:#ffca28!important;color:rgba(0,0,0,.87)}.amber-400-fg{color:#ffca28!important}.amber-400-border{border-color:#ffca28!important}.amber-400-border-top{border-top-color:#ffca28!important}.amber-400-border-right{border-right-color:#ffca28!important}.amber-400-border-bottom{border-bottom-color:#ffca28!important}.amber-400-border-left{border-left-color:#ffca28!important}.amber-500-bg{background-color:#ffc107!important}.md-amber-500-bg{background-color:#ffc107!important;color:rgba(0,0,0,.87)}.amber-500-fg{color:#ffc107!important}.amber-500-border{border-color:#ffc107!important}.amber-500-border-top{border-top-color:#ffc107!important}.amber-500-border-right{border-right-color:#ffc107!important}.amber-500-border-bottom{border-bottom-color:#ffc107!important}.amber-500-border-left{border-left-color:#ffc107!important}.md-amber-bg{background-color:#ffc107!important;color:rgba(0,0,0,.87)}.amber-bg{background-color:#ffc107!important}.amber-fg{color:#ffc107!important}.amber-border{border-color:#ffc107!important}.amber-border-top{border-top-color:#ffc107!important}.amber-border-right{border-right-color:#ffc107!important}.amber-border-bottom{border-bottom-color:#ffc107!important}.amber-border-left{border-left-color:#ffc107!important}.amber-600-bg{background-color:#ffb300!important}.md-amber-600-bg{background-color:#ffb300!important;color:rgba(0,0,0,.87)}.amber-600-fg{color:#ffb300!important}.amber-600-border{border-color:#ffb300!important}.amber-600-border-top{border-top-color:#ffb300!important}.amber-600-border-right{border-right-color:#ffb300!important}.amber-600-border-bottom{border-bottom-color:#ffb300!important}.amber-600-border-left{border-left-color:#ffb300!important}.amber-700-bg{background-color:#ffa000!important}.md-amber-700-bg{background-color:#ffa000!important;color:rgba(0,0,0,.87)}.amber-700-fg{color:#ffa000!important}.amber-700-border{border-color:#ffa000!important}.amber-700-border-top{border-top-color:#ffa000!important}.amber-700-border-right{border-right-color:#ffa000!important}.amber-700-border-bottom{border-bottom-color:#ffa000!important}.amber-700-border-left{border-left-color:#ffa000!important}.amber-800-bg{background-color:#ff8f00!important}.md-amber-800-bg{background-color:#ff8f00!important;color:rgba(0,0,0,.87)}.amber-800-fg{color:#ff8f00!important}.amber-800-border{border-color:#ff8f00!important}.amber-800-border-top{border-top-color:#ff8f00!important}.amber-800-border-right{border-right-color:#ff8f00!important}.amber-800-border-bottom{border-bottom-color:#ff8f00!important}.amber-800-border-left{border-left-color:#ff8f00!important}.amber-900-bg{background-color:#ff6f00!important}.md-amber-900-bg{background-color:#ff6f00!important;color:rgba(0,0,0,.87)}.amber-900-fg{color:#ff6f00!important}.amber-900-border{border-color:#ff6f00!important}.amber-900-border-top{border-top-color:#ff6f00!important}.amber-900-border-right{border-right-color:#ff6f00!important}.amber-900-border-bottom{border-bottom-color:#ff6f00!important}.amber-900-border-left{border-left-color:#ff6f00!important}.amber-A100-bg{background-color:#ffe57f!important}.md-amber-A100-bg{background-color:#ffe57f!important;color:rgba(0,0,0,.87)}.amber-A100-fg{color:#ffe57f!important}.amber-A100-border{border-color:#ffe57f!important}.amber-A100-border-top{border-top-color:#ffe57f!important}.amber-A100-border-right{border-right-color:#ffe57f!important}.amber-A100-border-bottom{border-bottom-color:#ffe57f!important}.amber-A100-border-left{border-left-color:#ffe57f!important}.amber-A200-bg{background-color:#ffd740!important}.md-amber-A200-bg{background-color:#ffd740!important;color:rgba(0,0,0,.87)}.amber-A200-fg{color:#ffd740!important}.amber-A200-border{border-color:#ffd740!important}.amber-A200-border-top{border-top-color:#ffd740!important}.amber-A200-border-right{border-right-color:#ffd740!important}.amber-A200-border-bottom{border-bottom-color:#ffd740!important}.amber-A200-border-left{border-left-color:#ffd740!important}.amber-A400-bg{background-color:#ffc400!important}.md-amber-A400-bg{background-color:#ffc400!important;color:rgba(0,0,0,.87)}.amber-A400-fg{color:#ffc400!important}.amber-A400-border{border-color:#ffc400!important}.amber-A400-border-top{border-top-color:#ffc400!important}.amber-A400-border-right{border-right-color:#ffc400!important}.amber-A400-border-bottom{border-bottom-color:#ffc400!important}.amber-A400-border-left{border-left-color:#ffc400!important}.amber-A700-bg{background-color:#ffab00!important}.md-amber-A700-bg{background-color:#ffab00!important;color:rgba(0,0,0,.87)}.amber-A700-fg{color:#ffab00!important}.amber-A700-border{border-color:#ffab00!important}.amber-A700-border-top{border-top-color:#ffab00!important}.amber-A700-border-right{border-right-color:#ffab00!important}.amber-A700-border-bottom{border-bottom-color:#ffab00!important}.amber-A700-border-left{border-left-color:#ffab00!important}.orange-50-bg{background-color:#fff3e0!important}.md-orange-50-bg{background-color:#fff3e0!important;color:rgba(0,0,0,.87)}.orange-50-fg{color:#fff3e0!important}.orange-50-border{border-color:#fff3e0!important}.orange-50-border-top{border-top-color:#fff3e0!important}.orange-50-border-right{border-right-color:#fff3e0!important}.orange-50-border-bottom{border-bottom-color:#fff3e0!important}.orange-50-border-left{border-left-color:#fff3e0!important}.orange-100-bg{background-color:#ffe0b2!important}.md-orange-100-bg{background-color:#ffe0b2!important;color:rgba(0,0,0,.87)}.orange-100-fg{color:#ffe0b2!important}.orange-100-border{border-color:#ffe0b2!important}.orange-100-border-top{border-top-color:#ffe0b2!important}.orange-100-border-right{border-right-color:#ffe0b2!important}.orange-100-border-bottom{border-bottom-color:#ffe0b2!important}.orange-100-border-left{border-left-color:#ffe0b2!important}.orange-200-bg{background-color:#ffcc80!important}.md-orange-200-bg{background-color:#ffcc80!important;color:rgba(0,0,0,.87)}.orange-200-fg{color:#ffcc80!important}.orange-200-border{border-color:#ffcc80!important}.orange-200-border-top{border-top-color:#ffcc80!important}.orange-200-border-right{border-right-color:#ffcc80!important}.orange-200-border-bottom{border-bottom-color:#ffcc80!important}.orange-200-border-left{border-left-color:#ffcc80!important}.orange-300-bg{background-color:#ffb74d!important}.md-orange-300-bg{background-color:#ffb74d!important;color:rgba(0,0,0,.87)}.orange-300-fg{color:#ffb74d!important}.orange-300-border{border-color:#ffb74d!important}.orange-300-border-top{border-top-color:#ffb74d!important}.orange-300-border-right{border-right-color:#ffb74d!important}.orange-300-border-bottom{border-bottom-color:#ffb74d!important}.orange-300-border-left{border-left-color:#ffb74d!important}.orange-400-bg{background-color:#ffa726!important}.md-orange-400-bg{background-color:#ffa726!important;color:rgba(0,0,0,.87)}.orange-400-fg{color:#ffa726!important}.orange-400-border{border-color:#ffa726!important}.orange-400-border-top{border-top-color:#ffa726!important}.orange-400-border-right{border-right-color:#ffa726!important}.orange-400-border-bottom{border-bottom-color:#ffa726!important}.orange-400-border-left{border-left-color:#ffa726!important}.orange-500-bg{background-color:#ff9800!important}.md-orange-500-bg{background-color:#ff9800!important;color:rgba(0,0,0,.87)}.orange-500-fg{color:#ff9800!important}.orange-500-border{border-color:#ff9800!important}.orange-500-border-top{border-top-color:#ff9800!important}.orange-500-border-right{border-right-color:#ff9800!important}.orange-500-border-bottom{border-bottom-color:#ff9800!important}.orange-500-border-left{border-left-color:#ff9800!important}.md-orange-bg{background-color:#ff9800!important;color:rgba(0,0,0,.87)}.orange-bg{background-color:#ff9800!important}.orange-fg{color:#ff9800!important}.orange-border{border-color:#ff9800!important}.orange-border-top{border-top-color:#ff9800!important}.orange-border-right{border-right-color:#ff9800!important}.orange-border-bottom{border-bottom-color:#ff9800!important}.orange-border-left{border-left-color:#ff9800!important}.orange-600-bg{background-color:#fb8c00!important}.md-orange-600-bg{background-color:#fb8c00!important;color:rgba(0,0,0,.87)}.orange-600-fg{color:#fb8c00!important}.orange-600-border{border-color:#fb8c00!important}.orange-600-border-top{border-top-color:#fb8c00!important}.orange-600-border-right{border-right-color:#fb8c00!important}.orange-600-border-bottom{border-bottom-color:#fb8c00!important}.orange-600-border-left{border-left-color:#fb8c00!important}.orange-700-bg{background-color:#f57c00!important}.md-orange-700-bg{background-color:#f57c00!important;color:rgba(0,0,0,.87)}.orange-700-fg{color:#f57c00!important}.orange-700-border{border-color:#f57c00!important}.orange-700-border-top{border-top-color:#f57c00!important}.orange-700-border-right{border-right-color:#f57c00!important}.orange-700-border-bottom{border-bottom-color:#f57c00!important}.orange-700-border-left{border-left-color:#f57c00!important}.orange-800-bg{background-color:#ef6c00!important}.md-orange-800-bg{background-color:#ef6c00!important;color:#fff}.orange-800-fg{color:#ef6c00!important}.orange-800-border{border-color:#ef6c00!important}.orange-800-border-top{border-top-color:#ef6c00!important}.orange-800-border-right{border-right-color:#ef6c00!important}.orange-800-border-bottom{border-bottom-color:#ef6c00!important}.orange-800-border-left{border-left-color:#ef6c00!important}.orange-900-bg{background-color:#e65100!important}.md-orange-900-bg{background-color:#e65100!important;color:#fff}.orange-900-fg{color:#e65100!important}.orange-900-border{border-color:#e65100!important}.orange-900-border-top{border-top-color:#e65100!important}.orange-900-border-right{border-right-color:#e65100!important}.orange-900-border-bottom{border-bottom-color:#e65100!important}.orange-900-border-left{border-left-color:#e65100!important}.orange-A100-bg{background-color:#ffd180!important}.md-orange-A100-bg{background-color:#ffd180!important;color:rgba(0,0,0,.87)}.orange-A100-fg{color:#ffd180!important}.orange-A100-border{border-color:#ffd180!important}.orange-A100-border-top{border-top-color:#ffd180!important}.orange-A100-border-right{border-right-color:#ffd180!important}.orange-A100-border-bottom{border-bottom-color:#ffd180!important}.orange-A100-border-left{border-left-color:#ffd180!important}.orange-A200-bg{background-color:#ffab40!important}.md-orange-A200-bg{background-color:#ffab40!important;color:rgba(0,0,0,.87)}.orange-A200-fg{color:#ffab40!important}.orange-A200-border{border-color:#ffab40!important}.orange-A200-border-top{border-top-color:#ffab40!important}.orange-A200-border-right{border-right-color:#ffab40!important}.orange-A200-border-bottom{border-bottom-color:#ffab40!important}.orange-A200-border-left{border-left-color:#ffab40!important}.orange-A400-bg{background-color:#ff9100!important}.md-orange-A400-bg{background-color:#ff9100!important;color:rgba(0,0,0,.87)}.orange-A400-fg{color:#ff9100!important}.orange-A400-border{border-color:#ff9100!important}.orange-A400-border-top{border-top-color:#ff9100!important}.orange-A400-border-right{border-right-color:#ff9100!important}.orange-A400-border-bottom{border-bottom-color:#ff9100!important}.orange-A400-border-left{border-left-color:#ff9100!important}.orange-A700-bg{background-color:#ff6d00!important}.md-orange-A700-bg{background-color:#ff6d00!important;color:rgba(0,0,0,.87)}.orange-A700-fg{color:#ff6d00!important}.orange-A700-border{border-color:#ff6d00!important}.orange-A700-border-top{border-top-color:#ff6d00!important}.orange-A700-border-right{border-right-color:#ff6d00!important}.orange-A700-border-bottom{border-bottom-color:#ff6d00!important}.orange-A700-border-left{border-left-color:#ff6d00!important}.deep-orange-50-bg{background-color:#fbe9e7!important}.md-deep-orange-50-bg{background-color:#fbe9e7!important;color:rgba(0,0,0,.87)}.deep-orange-50-fg{color:#fbe9e7!important}.deep-orange-50-border{border-color:#fbe9e7!important}.deep-orange-50-border-top{border-top-color:#fbe9e7!important}.deep-orange-50-border-right{border-right-color:#fbe9e7!important}.deep-orange-50-border-bottom{border-bottom-color:#fbe9e7!important}.deep-orange-50-border-left{border-left-color:#fbe9e7!important}.deep-orange-100-bg{background-color:#ffccbc!important}.md-deep-orange-100-bg{background-color:#ffccbc!important;color:rgba(0,0,0,.87)}.deep-orange-100-fg{color:#ffccbc!important}.deep-orange-100-border{border-color:#ffccbc!important}.deep-orange-100-border-top{border-top-color:#ffccbc!important}.deep-orange-100-border-right{border-right-color:#ffccbc!important}.deep-orange-100-border-bottom{border-bottom-color:#ffccbc!important}.deep-orange-100-border-left{border-left-color:#ffccbc!important}.deep-orange-200-bg{background-color:#ffab91!important}.md-deep-orange-200-bg{background-color:#ffab91!important;color:rgba(0,0,0,.87)}.deep-orange-200-fg{color:#ffab91!important}.deep-orange-200-border{border-color:#ffab91!important}.deep-orange-200-border-top{border-top-color:#ffab91!important}.deep-orange-200-border-right{border-right-color:#ffab91!important}.deep-orange-200-border-bottom{border-bottom-color:#ffab91!important}.deep-orange-200-border-left{border-left-color:#ffab91!important}.deep-orange-300-bg{background-color:#ff8a65!important}.md-deep-orange-300-bg{background-color:#ff8a65!important;color:rgba(0,0,0,.87)}.deep-orange-300-fg{color:#ff8a65!important}.deep-orange-300-border{border-color:#ff8a65!important}.deep-orange-300-border-top{border-top-color:#ff8a65!important}.deep-orange-300-border-right{border-right-color:#ff8a65!important}.deep-orange-300-border-bottom{border-bottom-color:#ff8a65!important}.deep-orange-300-border-left{border-left-color:#ff8a65!important}.deep-orange-400-bg{background-color:#ff7043!important}.md-deep-orange-400-bg{background-color:#ff7043!important;color:rgba(0,0,0,.87)}.deep-orange-400-fg{color:#ff7043!important}.deep-orange-400-border{border-color:#ff7043!important}.deep-orange-400-border-top{border-top-color:#ff7043!important}.deep-orange-400-border-right{border-right-color:#ff7043!important}.deep-orange-400-border-bottom{border-bottom-color:#ff7043!important}.deep-orange-400-border-left{border-left-color:#ff7043!important}.deep-orange-500-bg{background-color:#ff5722!important}.md-deep-orange-500-bg{background-color:#ff5722!important;color:#fff}.deep-orange-500-fg{color:#ff5722!important}.deep-orange-500-border{border-color:#ff5722!important}.deep-orange-500-border-top{border-top-color:#ff5722!important}.deep-orange-500-border-right{border-right-color:#ff5722!important}.deep-orange-500-border-bottom{border-bottom-color:#ff5722!important}.deep-orange-500-border-left{border-left-color:#ff5722!important}.md-deep-orange-bg{background-color:#ff5722!important;color:#fff}.deep-orange-bg{background-color:#ff5722!important}.deep-orange-fg{color:#ff5722!important}.deep-orange-border{border-color:#ff5722!important}.deep-orange-border-top{border-top-color:#ff5722!important}.deep-orange-border-right{border-right-color:#ff5722!important}.deep-orange-border-bottom{border-bottom-color:#ff5722!important}.deep-orange-border-left{border-left-color:#ff5722!important}.deep-orange-600-bg{background-color:#f4511e!important}.md-deep-orange-600-bg{background-color:#f4511e!important;color:#fff}.deep-orange-600-fg{color:#f4511e!important}.deep-orange-600-border{border-color:#f4511e!important}.deep-orange-600-border-top{border-top-color:#f4511e!important}.deep-orange-600-border-right{border-right-color:#f4511e!important}.deep-orange-600-border-bottom{border-bottom-color:#f4511e!important}.deep-orange-600-border-left{border-left-color:#f4511e!important}.deep-orange-700-bg{background-color:#e64a19!important}.md-deep-orange-700-bg{background-color:#e64a19!important;color:#fff}.deep-orange-700-fg{color:#e64a19!important}.deep-orange-700-border{border-color:#e64a19!important}.deep-orange-700-border-top{border-top-color:#e64a19!important}.deep-orange-700-border-right{border-right-color:#e64a19!important}.deep-orange-700-border-bottom{border-bottom-color:#e64a19!important}.deep-orange-700-border-left{border-left-color:#e64a19!important}.deep-orange-800-bg{background-color:#d84315!important}.md-deep-orange-800-bg{background-color:#d84315!important;color:#fff}.deep-orange-800-fg{color:#d84315!important}.deep-orange-800-border{border-color:#d84315!important}.deep-orange-800-border-top{border-top-color:#d84315!important}.deep-orange-800-border-right{border-right-color:#d84315!important}.deep-orange-800-border-bottom{border-bottom-color:#d84315!important}.deep-orange-800-border-left{border-left-color:#d84315!important}.deep-orange-900-bg{background-color:#bf360c!important}.md-deep-orange-900-bg{background-color:#bf360c!important;color:#fff}.deep-orange-900-fg{color:#bf360c!important}.deep-orange-900-border{border-color:#bf360c!important}.deep-orange-900-border-top{border-top-color:#bf360c!important}.deep-orange-900-border-right{border-right-color:#bf360c!important}.deep-orange-900-border-bottom{border-bottom-color:#bf360c!important}.deep-orange-900-border-left{border-left-color:#bf360c!important}.deep-orange-A100-bg{background-color:#ff9e80!important}.md-deep-orange-A100-bg{background-color:#ff9e80!important;color:rgba(0,0,0,.87)}.deep-orange-A100-fg{color:#ff9e80!important}.deep-orange-A100-border{border-color:#ff9e80!important}.deep-orange-A100-border-top{border-top-color:#ff9e80!important}.deep-orange-A100-border-right{border-right-color:#ff9e80!important}.deep-orange-A100-border-bottom{border-bottom-color:#ff9e80!important}.deep-orange-A100-border-left{border-left-color:#ff9e80!important}.deep-orange-A200-bg{background-color:#ff6e40!important}.md-deep-orange-A200-bg{background-color:#ff6e40!important;color:rgba(0,0,0,.87)}.deep-orange-A200-fg{color:#ff6e40!important}.deep-orange-A200-border{border-color:#ff6e40!important}.deep-orange-A200-border-top{border-top-color:#ff6e40!important}.deep-orange-A200-border-right{border-right-color:#ff6e40!important}.deep-orange-A200-border-bottom{border-bottom-color:#ff6e40!important}.deep-orange-A200-border-left{border-left-color:#ff6e40!important}.deep-orange-A400-bg{background-color:#ff3d00!important}.md-deep-orange-A400-bg{background-color:#ff3d00!important;color:#fff}.deep-orange-A400-fg{color:#ff3d00!important}.deep-orange-A400-border{border-color:#ff3d00!important}.deep-orange-A400-border-top{border-top-color:#ff3d00!important}.deep-orange-A400-border-right{border-right-color:#ff3d00!important}.deep-orange-A400-border-bottom{border-bottom-color:#ff3d00!important}.deep-orange-A400-border-left{border-left-color:#ff3d00!important}.deep-orange-A700-bg{background-color:#dd2c00!important}.md-deep-orange-A700-bg{background-color:#dd2c00!important;color:#fff}.deep-orange-A700-fg{color:#dd2c00!important}.deep-orange-A700-border{border-color:#dd2c00!important}.deep-orange-A700-border-top{border-top-color:#dd2c00!important}.deep-orange-A700-border-right{border-right-color:#dd2c00!important}.deep-orange-A700-border-bottom{border-bottom-color:#dd2c00!important}.deep-orange-A700-border-left{border-left-color:#dd2c00!important}.brown-50-bg{background-color:#efebe9!important}.md-brown-50-bg{background-color:#efebe9!important;color:rgba(0,0,0,.87)}.brown-50-fg{color:#efebe9!important}.brown-50-border{border-color:#efebe9!important}.brown-50-border-top{border-top-color:#efebe9!important}.brown-50-border-right{border-right-color:#efebe9!important}.brown-50-border-bottom{border-bottom-color:#efebe9!important}.brown-50-border-left{border-left-color:#efebe9!important}.brown-100-bg{background-color:#d7ccc8!important}.md-brown-100-bg{background-color:#d7ccc8!important;color:rgba(0,0,0,.87)}.brown-100-fg{color:#d7ccc8!important}.brown-100-border{border-color:#d7ccc8!important}.brown-100-border-top{border-top-color:#d7ccc8!important}.brown-100-border-right{border-right-color:#d7ccc8!important}.brown-100-border-bottom{border-bottom-color:#d7ccc8!important}.brown-100-border-left{border-left-color:#d7ccc8!important}.brown-200-bg{background-color:#bcaaa4!important}.md-brown-200-bg{background-color:#bcaaa4!important;color:rgba(0,0,0,.87)}.brown-200-fg{color:#bcaaa4!important}.brown-200-border{border-color:#bcaaa4!important}.brown-200-border-top{border-top-color:#bcaaa4!important}.brown-200-border-right{border-right-color:#bcaaa4!important}.brown-200-border-bottom{border-bottom-color:#bcaaa4!important}.brown-200-border-left{border-left-color:#bcaaa4!important}.brown-300-bg{background-color:#a1887f!important}.md-brown-300-bg{background-color:#a1887f!important;color:#fff}.brown-300-fg{color:#a1887f!important}.brown-300-border{border-color:#a1887f!important}.brown-300-border-top{border-top-color:#a1887f!important}.brown-300-border-right{border-right-color:#a1887f!important}.brown-300-border-bottom{border-bottom-color:#a1887f!important}.brown-300-border-left{border-left-color:#a1887f!important}.brown-400-bg{background-color:#8d6e63!important}.md-brown-400-bg{background-color:#8d6e63!important;color:#fff}.brown-400-fg{color:#8d6e63!important}.brown-400-border{border-color:#8d6e63!important}.brown-400-border-top{border-top-color:#8d6e63!important}.brown-400-border-right{border-right-color:#8d6e63!important}.brown-400-border-bottom{border-bottom-color:#8d6e63!important}.brown-400-border-left{border-left-color:#8d6e63!important}.brown-500-bg{background-color:#795548!important}.md-brown-500-bg{background-color:#795548!important;color:rgba(255,255,255,.87)}.brown-500-fg{color:#795548!important}.brown-500-border{border-color:#795548!important}.brown-500-border-top{border-top-color:#795548!important}.brown-500-border-right{border-right-color:#795548!important}.brown-500-border-bottom{border-bottom-color:#795548!important}.brown-500-border-left{border-left-color:#795548!important}.md-brown-bg{background-color:#795548!important;color:rgba(255,255,255,.87)}.brown-bg{background-color:#795548!important}.brown-fg{color:#795548!important}.brown-border{border-color:#795548!important}.brown-border-top{border-top-color:#795548!important}.brown-border-right{border-right-color:#795548!important}.brown-border-bottom{border-bottom-color:#795548!important}.brown-border-left{border-left-color:#795548!important}.brown-600-bg{background-color:#6d4c41!important}.md-brown-600-bg{background-color:#6d4c41!important;color:rgba(255,255,255,.87)}.brown-600-fg{color:#6d4c41!important}.brown-600-border{border-color:#6d4c41!important}.brown-600-border-top{border-top-color:#6d4c41!important}.brown-600-border-right{border-right-color:#6d4c41!important}.brown-600-border-bottom{border-bottom-color:#6d4c41!important}.brown-600-border-left{border-left-color:#6d4c41!important}.brown-700-bg{background-color:#5d4037!important}.md-brown-700-bg{background-color:#5d4037!important;color:rgba(255,255,255,.87)}.brown-700-fg{color:#5d4037!important}.brown-700-border{border-color:#5d4037!important}.brown-700-border-top{border-top-color:#5d4037!important}.brown-700-border-right{border-right-color:#5d4037!important}.brown-700-border-bottom{border-bottom-color:#5d4037!important}.brown-700-border-left{border-left-color:#5d4037!important}.brown-800-bg{background-color:#4e342e!important}.md-brown-800-bg{background-color:#4e342e!important;color:rgba(255,255,255,.87)}.brown-800-fg{color:#4e342e!important}.brown-800-border{border-color:#4e342e!important}.brown-800-border-top{border-top-color:#4e342e!important}.brown-800-border-right{border-right-color:#4e342e!important}.brown-800-border-bottom{border-bottom-color:#4e342e!important}.brown-800-border-left{border-left-color:#4e342e!important}.brown-900-bg{background-color:#3e2723!important}.md-brown-900-bg{background-color:#3e2723!important;color:rgba(255,255,255,.87)}.brown-900-fg{color:#3e2723!important}.brown-900-border{border-color:#3e2723!important}.brown-900-border-top{border-top-color:#3e2723!important}.brown-900-border-right{border-right-color:#3e2723!important}.brown-900-border-bottom{border-bottom-color:#3e2723!important}.brown-900-border-left{border-left-color:#3e2723!important}.brown-A100-bg{background-color:#d7ccc8!important}.md-brown-A100-bg{background-color:#d7ccc8!important;color:rgba(255,255,255,.87)}.brown-A100-fg{color:#d7ccc8!important}.brown-A100-border{border-color:#d7ccc8!important}.brown-A100-border-top{border-top-color:#d7ccc8!important}.brown-A100-border-right{border-right-color:#d7ccc8!important}.brown-A100-border-bottom{border-bottom-color:#d7ccc8!important}.brown-A100-border-left{border-left-color:#d7ccc8!important}.brown-A200-bg{background-color:#bcaaa4!important}.md-brown-A200-bg{background-color:#bcaaa4!important;color:rgba(255,255,255,.87)}.brown-A200-fg{color:#bcaaa4!important}.brown-A200-border{border-color:#bcaaa4!important}.brown-A200-border-top{border-top-color:#bcaaa4!important}.brown-A200-border-right{border-right-color:#bcaaa4!important}.brown-A200-border-bottom{border-bottom-color:#bcaaa4!important}.brown-A200-border-left{border-left-color:#bcaaa4!important}.brown-A400-bg{background-color:#8d6e63!important}.md-brown-A400-bg{background-color:#8d6e63!important;color:rgba(255,255,255,.87)}.brown-A400-fg{color:#8d6e63!important}.brown-A400-border{border-color:#8d6e63!important}.brown-A400-border-top{border-top-color:#8d6e63!important}.brown-A400-border-right{border-right-color:#8d6e63!important}.brown-A400-border-bottom{border-bottom-color:#8d6e63!important}.brown-A400-border-left{border-left-color:#8d6e63!important}.brown-A700-bg{background-color:#5d4037!important}.md-brown-A700-bg{background-color:#5d4037!important;color:rgba(255,255,255,.87)}.brown-A700-fg{color:#5d4037!important}.brown-A700-border{border-color:#5d4037!important}.brown-A700-border-top{border-top-color:#5d4037!important}.brown-A700-border-right{border-right-color:#5d4037!important}.brown-A700-border-bottom{border-bottom-color:#5d4037!important}.brown-A700-border-left{border-left-color:#5d4037!important}.grey-50-bg{background-color:#fafafa!important}.md-grey-50-bg{background-color:#fafafa!important;color:rgba(0,0,0,.87)}.grey-50-fg{color:#fafafa!important}.grey-50-border{border-color:#fafafa!important}.grey-50-border-top{border-top-color:#fafafa!important}.grey-50-border-right{border-right-color:#fafafa!important}.grey-50-border-bottom{border-bottom-color:#fafafa!important}.grey-50-border-left{border-left-color:#fafafa!important}.grey-100-bg{background-color:#f5f5f5!important}.md-grey-100-bg{background-color:#f5f5f5!important;color:rgba(0,0,0,.87)}.grey-100-fg{color:#f5f5f5!important}.grey-100-border{border-color:#f5f5f5!important}.grey-100-border-top{border-top-color:#f5f5f5!important}.grey-100-border-right{border-right-color:#f5f5f5!important}.grey-100-border-bottom{border-bottom-color:#f5f5f5!important}.grey-100-border-left{border-left-color:#f5f5f5!important}.grey-200-bg{background-color:#eee!important}.md-grey-200-bg{background-color:#eee!important;color:rgba(0,0,0,.87)}.grey-200-fg{color:#eee!important}.grey-200-border{border-color:#eee!important}.grey-200-border-top{border-top-color:#eee!important}.grey-200-border-right{border-right-color:#eee!important}.grey-200-border-bottom{border-bottom-color:#eee!important}.grey-200-border-left{border-left-color:#eee!important}.grey-300-bg{background-color:#e0e0e0!important}.md-grey-300-bg{background-color:#e0e0e0!important;color:rgba(0,0,0,.87)}.grey-300-fg{color:#e0e0e0!important}.grey-300-border{border-color:#e0e0e0!important}.grey-300-border-top{border-top-color:#e0e0e0!important}.grey-300-border-right{border-right-color:#e0e0e0!important}.grey-300-border-bottom{border-bottom-color:#e0e0e0!important}.grey-300-border-left{border-left-color:#e0e0e0!important}.grey-400-bg{background-color:#bdbdbd!important}.md-grey-400-bg{background-color:#bdbdbd!important;color:rgba(0,0,0,.87)}.grey-400-fg{color:#bdbdbd!important}.grey-400-border{border-color:#bdbdbd!important}.grey-400-border-top{border-top-color:#bdbdbd!important}.grey-400-border-right{border-right-color:#bdbdbd!important}.grey-400-border-bottom{border-bottom-color:#bdbdbd!important}.grey-400-border-left{border-left-color:#bdbdbd!important}.grey-500-bg{background-color:#9e9e9e!important}.md-grey-500-bg{background-color:#9e9e9e!important;color:rgba(0,0,0,.87)}.grey-500-fg{color:#9e9e9e!important}.grey-500-border{border-color:#9e9e9e!important}.grey-500-border-top{border-top-color:#9e9e9e!important}.grey-500-border-right{border-right-color:#9e9e9e!important}.grey-500-border-bottom{border-bottom-color:#9e9e9e!important}.grey-500-border-left{border-left-color:#9e9e9e!important}.md-grey-bg{background-color:#9e9e9e!important;color:rgba(0,0,0,.87)}.grey-bg{background-color:#9e9e9e!important}.grey-fg{color:#9e9e9e!important}.grey-border{border-color:#9e9e9e!important}.grey-border-top{border-top-color:#9e9e9e!important}.grey-border-right{border-right-color:#9e9e9e!important}.grey-border-bottom{border-bottom-color:#9e9e9e!important}.grey-border-left{border-left-color:#9e9e9e!important}.grey-600-bg{background-color:#757575!important}.md-grey-600-bg{background-color:#757575!important;color:rgba(255,255,255,.87)}.grey-600-fg{color:#757575!important}.grey-600-border{border-color:#757575!important}.grey-600-border-top{border-top-color:#757575!important}.grey-600-border-right{border-right-color:#757575!important}.grey-600-border-bottom{border-bottom-color:#757575!important}.grey-600-border-left{border-left-color:#757575!important}.grey-700-bg{background-color:#616161!important}.md-grey-700-bg{background-color:#616161!important;color:rgba(255,255,255,.87)}.grey-700-fg{color:#616161!important}.grey-700-border{border-color:#616161!important}.grey-700-border-top{border-top-color:#616161!important}.grey-700-border-right{border-right-color:#616161!important}.grey-700-border-bottom{border-bottom-color:#616161!important}.grey-700-border-left{border-left-color:#616161!important}.grey-800-bg{background-color:#424242!important}.md-grey-800-bg{background-color:#424242!important;color:rgba(255,255,255,.87)}.grey-800-fg{color:#424242!important}.grey-800-border{border-color:#424242!important}.grey-800-border-top{border-top-color:#424242!important}.grey-800-border-right{border-right-color:#424242!important}.grey-800-border-bottom{border-bottom-color:#424242!important}.grey-800-border-left{border-left-color:#424242!important}.grey-900-bg{background-color:#212121!important}.md-grey-900-bg{background-color:#212121!important;color:rgba(255,255,255,.87)}.grey-900-fg{color:#212121!important}.grey-900-border{border-color:#212121!important}.grey-900-border-top{border-top-color:#212121!important}.grey-900-border-right{border-right-color:#212121!important}.grey-900-border-bottom{border-bottom-color:#212121!important}.grey-900-border-left{border-left-color:#212121!important}.grey-1000-bg{background-color:#000!important}.md-grey-1000-bg{background-color:#000!important}.grey-1000-fg{color:#000!important}.grey-1000-border{border-color:#000!important}.grey-1000-border-top{border-top-color:#000!important}.grey-1000-border-right{border-right-color:#000!important}.grey-1000-border-bottom{border-bottom-color:#000!important}.grey-1000-border-left{border-left-color:#000!important}.grey-A100-bg{background-color:#fff!important}.md-grey-A100-bg{background-color:#fff!important;color:rgba(0,0,0,.87)}.grey-A100-fg{color:#fff!important}.grey-A100-border{border-color:#fff!important}.grey-A100-border-top{border-top-color:#fff!important}.grey-A100-border-right{border-right-color:#fff!important}.grey-A100-border-bottom{border-bottom-color:#fff!important}.grey-A100-border-left{border-left-color:#fff!important}.grey-A200-bg{background-color:#eee!important}.md-grey-A200-bg{background-color:#eee!important;color:rgba(0,0,0,.87)}.grey-A200-fg{color:#eee!important}.grey-A200-border{border-color:#eee!important}.grey-A200-border-top{border-top-color:#eee!important}.grey-A200-border-right{border-right-color:#eee!important}.grey-A200-border-bottom{border-bottom-color:#eee!important}.grey-A200-border-left{border-left-color:#eee!important}.grey-A400-bg{background-color:#bdbdbd!important}.md-grey-A400-bg{background-color:#bdbdbd!important;color:rgba(0,0,0,.87)}.grey-A400-fg{color:#bdbdbd!important}.grey-A400-border{border-color:#bdbdbd!important}.grey-A400-border-top{border-top-color:#bdbdbd!important}.grey-A400-border-right{border-right-color:#bdbdbd!important}.grey-A400-border-bottom{border-bottom-color:#bdbdbd!important}.grey-A400-border-left{border-left-color:#bdbdbd!important}.grey-A700-bg{background-color:#616161!important}.md-grey-A700-bg{background-color:#616161!important;color:rgba(0,0,0,.87)}.grey-A700-fg{color:#616161!important}.grey-A700-border{border-color:#616161!important}.grey-A700-border-top{border-top-color:#616161!important}.grey-A700-border-right{border-right-color:#616161!important}.grey-A700-border-bottom{border-bottom-color:#616161!important}.grey-A700-border-left{border-left-color:#616161!important}.blue-grey-50-bg{background-color:#eceff1!important}.md-blue-grey-50-bg{background-color:#eceff1!important;color:rgba(0,0,0,.87)}.blue-grey-50-fg{color:#eceff1!important}.blue-grey-50-border{border-color:#eceff1!important}.blue-grey-50-border-top{border-top-color:#eceff1!important}.blue-grey-50-border-right{border-right-color:#eceff1!important}.blue-grey-50-border-bottom{border-bottom-color:#eceff1!important}.blue-grey-50-border-left{border-left-color:#eceff1!important}.blue-grey-100-bg{background-color:#cfd8dc!important}.md-blue-grey-100-bg{background-color:#cfd8dc!important;color:rgba(0,0,0,.87)}.blue-grey-100-fg{color:#cfd8dc!important}.blue-grey-100-border{border-color:#cfd8dc!important}.blue-grey-100-border-top{border-top-color:#cfd8dc!important}.blue-grey-100-border-right{border-right-color:#cfd8dc!important}.blue-grey-100-border-bottom{border-bottom-color:#cfd8dc!important}.blue-grey-100-border-left{border-left-color:#cfd8dc!important}.blue-grey-200-bg{background-color:#b0bec5!important}.md-blue-grey-200-bg{background-color:#b0bec5!important;color:rgba(0,0,0,.87)}.blue-grey-200-fg{color:#b0bec5!important}.blue-grey-200-border{border-color:#b0bec5!important}.blue-grey-200-border-top{border-top-color:#b0bec5!important}.blue-grey-200-border-right{border-right-color:#b0bec5!important}.blue-grey-200-border-bottom{border-bottom-color:#b0bec5!important}.blue-grey-200-border-left{border-left-color:#b0bec5!important}.blue-grey-300-bg{background-color:#90a4ae!important}.md-blue-grey-300-bg{background-color:#90a4ae!important;color:rgba(0,0,0,.87)}.blue-grey-300-fg{color:#90a4ae!important}.blue-grey-300-border{border-color:#90a4ae!important}.blue-grey-300-border-top{border-top-color:#90a4ae!important}.blue-grey-300-border-right{border-right-color:#90a4ae!important}.blue-grey-300-border-bottom{border-bottom-color:#90a4ae!important}.blue-grey-300-border-left{border-left-color:#90a4ae!important}.blue-grey-400-bg{background-color:#78909c!important}.md-blue-grey-400-bg{background-color:#78909c!important;color:#fff}.blue-grey-400-fg{color:#78909c!important}.blue-grey-400-border{border-color:#78909c!important}.blue-grey-400-border-top{border-top-color:#78909c!important}.blue-grey-400-border-right{border-right-color:#78909c!important}.blue-grey-400-border-bottom{border-bottom-color:#78909c!important}.blue-grey-400-border-left{border-left-color:#78909c!important}.blue-grey-500-bg{background-color:#607d8b!important}.md-blue-grey-500-bg{background-color:#607d8b!important;color:#fff}.blue-grey-500-fg{color:#607d8b!important}.blue-grey-500-border{border-color:#607d8b!important}.blue-grey-500-border-top{border-top-color:#607d8b!important}.blue-grey-500-border-right{border-right-color:#607d8b!important}.blue-grey-500-border-bottom{border-bottom-color:#607d8b!important}.blue-grey-500-border-left{border-left-color:#607d8b!important}.md-blue-grey-bg{background-color:#607d8b!important;color:#fff}.blue-grey-bg{background-color:#607d8b!important}.blue-grey-fg{color:#607d8b!important}.blue-grey-border{border-color:#607d8b!important}.blue-grey-border-top{border-top-color:#607d8b!important}.blue-grey-border-right{border-right-color:#607d8b!important}.blue-grey-border-bottom{border-bottom-color:#607d8b!important}.blue-grey-border-left{border-left-color:#607d8b!important}.blue-grey-600-bg{background-color:#546e7a!important}.md-blue-grey-600-bg{background-color:#546e7a!important;color:rgba(255,255,255,.87)}.blue-grey-600-fg{color:#546e7a!important}.blue-grey-600-border{border-color:#546e7a!important}.blue-grey-600-border-top{border-top-color:#546e7a!important}.blue-grey-600-border-right{border-right-color:#546e7a!important}.blue-grey-600-border-bottom{border-bottom-color:#546e7a!important}.blue-grey-600-border-left{border-left-color:#546e7a!important}.blue-grey-700-bg{background-color:#455a64!important}.md-blue-grey-700-bg{background-color:#455a64!important;color:rgba(255,255,255,.87)}.blue-grey-700-fg{color:#455a64!important}.blue-grey-700-border{border-color:#455a64!important}.blue-grey-700-border-top{border-top-color:#455a64!important}.blue-grey-700-border-right{border-right-color:#455a64!important}.blue-grey-700-border-bottom{border-bottom-color:#455a64!important}.blue-grey-700-border-left{border-left-color:#455a64!important}.blue-grey-800-bg{background-color:#37474f!important}.md-blue-grey-800-bg{background-color:#37474f!important;color:rgba(255,255,255,.87)}.blue-grey-800-fg{color:#37474f!important}.blue-grey-800-border{border-color:#37474f!important}.blue-grey-800-border-top{border-top-color:#37474f!important}.blue-grey-800-border-right{border-right-color:#37474f!important}.blue-grey-800-border-bottom{border-bottom-color:#37474f!important}.blue-grey-800-border-left{border-left-color:#37474f!important}.blue-grey-900-bg{background-color:#263238!important}.md-blue-grey-900-bg{background-color:#263238!important;color:rgba(255,255,255,.87)}.blue-grey-900-fg{color:#263238!important}.blue-grey-900-border{border-color:#263238!important}.blue-grey-900-border-top{border-top-color:#263238!important}.blue-grey-900-border-right{border-right-color:#263238!important}.blue-grey-900-border-bottom{border-bottom-color:#263238!important}.blue-grey-900-border-left{border-left-color:#263238!important}.blue-grey-A100-bg{background-color:#cfd8dc!important}.md-blue-grey-A100-bg{background-color:#cfd8dc!important;color:rgba(255,255,255,.87)}.blue-grey-A100-fg{color:#cfd8dc!important}.blue-grey-A100-border{border-color:#cfd8dc!important}.blue-grey-A100-border-top{border-top-color:#cfd8dc!important}.blue-grey-A100-border-right{border-right-color:#cfd8dc!important}.blue-grey-A100-border-bottom{border-bottom-color:#cfd8dc!important}.blue-grey-A100-border-left{border-left-color:#cfd8dc!important}.blue-grey-A200-bg{background-color:#b0bec5!important}.md-blue-grey-A200-bg{background-color:#b0bec5!important;color:rgba(255,255,255,.87)}.blue-grey-A200-fg{color:#b0bec5!important}.blue-grey-A200-border{border-color:#b0bec5!important}.blue-grey-A200-border-top{border-top-color:#b0bec5!important}.blue-grey-A200-border-right{border-right-color:#b0bec5!important}.blue-grey-A200-border-bottom{border-bottom-color:#b0bec5!important}.blue-grey-A200-border-left{border-left-color:#b0bec5!important}.blue-grey-A400-bg{background-color:#78909c!important}.md-blue-grey-A400-bg{background-color:#78909c!important;color:rgba(255,255,255,.87)}.blue-grey-A400-fg{color:#78909c!important}.blue-grey-A400-border{border-color:#78909c!important}.blue-grey-A400-border-top{border-top-color:#78909c!important}.blue-grey-A400-border-right{border-right-color:#78909c!important}.blue-grey-A400-border-bottom{border-bottom-color:#78909c!important}.blue-grey-A400-border-left{border-left-color:#78909c!important}.blue-grey-A700-bg{background-color:#455a64!important}.md-blue-grey-A700-bg{background-color:#455a64!important;color:rgba(255,255,255,.87)}.blue-grey-A700-fg{color:#455a64!important}.blue-grey-A700-border{border-color:#455a64!important}.blue-grey-A700-border-top{border-top-color:#455a64!important}.blue-grey-A700-border-right{border-right-color:#455a64!important}.blue-grey-A700-border-bottom{border-bottom-color:#455a64!important}.blue-grey-A700-border-left{border-left-color:#455a64!important}.white-500-bg{background-color:#fff!important}.md-white-500-bg{background-color:#fff!important;color:rgba(0,0,0,.87)}.white-500-fg{color:#fff!important}.white-500-border{border-color:#fff!important}.white-500-border-top{border-top-color:#fff!important}.white-500-border-right{border-right-color:#fff!important}.white-500-border-bottom{border-bottom-color:#fff!important}.white-500-border-left{border-left-color:#fff!important}.md-white-bg{background-color:#fff!important;color:rgba(0,0,0,.87)}.white-bg{background-color:#fff!important}.white-fg{color:#fff!important}.white-border{border-color:#fff!important}.white-border-top{border-top-color:#fff!important}.white-border-right{border-right-color:#fff!important}.white-border-bottom{border-bottom-color:#fff!important}.white-border-left{border-left-color:#fff!important}.black-500-bg{background-color:#000!important}.md-black-500-bg{background-color:#000!important;color:rgba(255,255,255,.87)}.black-500-fg{color:#000!important}.black-500-border{border-color:#000!important}.black-500-border-top{border-top-color:#000!important}.black-500-border-right{border-right-color:#000!important}.black-500-border-bottom{border-bottom-color:#000!important}.black-500-border-left{border-left-color:#000!important}.md-black-bg{background-color:#000!important;color:rgba(255,255,255,.87)}.black-bg{background-color:#000!important}.black-fg{color:#000!important}.black-border{border-color:#000!important}.black-border-top{border-top-color:#000!important}.black-border-right{border-right-color:#000!important}.black-border-bottom{border-bottom-color:#000!important}.black-border-left{border-left-color:#000!important}i,md-icon[md-font-icon]{font-size:24px;width:24px;height:24px;min-width:24px;min-height:24px;line-height:24px}i.s4,md-icon[md-font-icon].s4{font-size:4px!important;width:4px!important;height:4px!important;min-width:4px!important;min-height:4px!important;line-height:4px!important}i.s6,md-icon[md-font-icon].s6{font-size:6px!important;width:6px!important;height:6px!important;min-width:6px!important;min-height:6px!important;line-height:6px!important}i.s8,md-icon[md-font-icon].s8{font-size:8px!important;width:8px!important;height:8px!important;min-width:8px!important;min-height:8px!important;line-height:8px!important}i.s10,md-icon[md-font-icon].s10{font-size:10px!important;width:10px!important;height:10px!important;min-width:10px!important;min-height:10px!important;line-height:10px!important}i.s12,md-icon[md-font-icon].s12{font-size:12px!important;width:12px!important;height:12px!important;min-width:12px!important;min-height:12px!important;line-height:12px!important}i.s14,md-icon[md-font-icon].s14{font-size:14px!important;width:14px!important;height:14px!important;min-width:14px!important;min-height:14px!important;line-height:14px!important}i.s16,md-icon[md-font-icon].s16{font-size:16px!important;width:16px!important;height:16px!important;min-width:16px!important;min-height:16px!important;line-height:16px!important}i.s18,md-icon[md-font-icon].s18{font-size:18px!important;width:18px!important;height:18px!important;min-width:18px!important;min-height:18px!important;line-height:18px!important}i.s20,md-icon[md-font-icon].s20{font-size:20px!important;width:20px!important;height:20px!important;min-width:20px!important;min-height:20px!important;line-height:20px!important}i.s22,md-icon[md-font-icon].s22{font-size:22px!important;width:22px!important;height:22px!important;min-width:22px!important;min-height:22px!important;line-height:22px!important}i.s24,md-icon[md-font-icon].s24{font-size:24px!important;width:24px!important;height:24px!important;min-width:24px!important;min-height:24px!important;line-height:24px!important}i.s26,md-icon[md-font-icon].s26{font-size:26px!important;width:26px!important;height:26px!important;min-width:26px!important;min-height:26px!important;line-height:26px!important}i.s28,md-icon[md-font-icon].s28{font-size:28px!important;width:28px!important;height:28px!important;min-width:28px!important;min-height:28px!important;line-height:28px!important}i.s30,md-icon[md-font-icon].s30{font-size:30px!important;width:30px!important;height:30px!important;min-width:30px!important;min-height:30px!important;line-height:30px!important}i.s32,md-icon[md-font-icon].s32{font-size:32px!important;width:32px!important;height:32px!important;min-width:32px!important;min-height:32px!important;line-height:32px!important}i.s34,md-icon[md-font-icon].s34{font-size:34px!important;width:34px!important;height:34px!important;min-width:34px!important;min-height:34px!important;line-height:34px!important}i.s36,md-icon[md-font-icon].s36{font-size:36px!important;width:36px!important;height:36px!important;min-width:36px!important;min-height:36px!important;line-height:36px!important}i.s38,md-icon[md-font-icon].s38{font-size:38px!important;width:38px!important;height:38px!important;min-width:38px!important;min-height:38px!important;line-height:38px!important}i.s40,md-icon[md-font-icon].s40{font-size:40px!important;width:40px!important;height:40px!important;min-width:40px!important;min-height:40px!important;line-height:40px!important}i.s42,md-icon[md-font-icon].s42{font-size:42px!important;width:42px!important;height:42px!important;min-width:42px!important;min-height:42px!important;line-height:42px!important}i.s44,md-icon[md-font-icon].s44{font-size:44px!important;width:44px!important;height:44px!important;min-width:44px!important;min-height:44px!important;line-height:44px!important}i.s46,md-icon[md-font-icon].s46{font-size:46px!important;width:46px!important;height:46px!important;min-width:46px!important;min-height:46px!important;line-height:46px!important}i.s48,md-icon[md-font-icon].s48{font-size:48px!important;width:48px!important;height:48px!important;min-width:48px!important;min-height:48px!important;line-height:48px!important}i.s50,md-icon[md-font-icon].s50{font-size:50px!important;width:50px!important;height:50px!important;min-width:50px!important;min-height:50px!important;line-height:50px!important}i.s52,md-icon[md-font-icon].s52{font-size:52px!important;width:52px!important;height:52px!important;min-width:52px!important;min-height:52px!important;line-height:52px!important}i.s54,md-icon[md-font-icon].s54{font-size:54px!important;width:54px!important;height:54px!important;min-width:54px!important;min-height:54px!important;line-height:54px!important}i.s56,md-icon[md-font-icon].s56{font-size:56px!important;width:56px!important;height:56px!important;min-width:56px!important;min-height:56px!important;line-height:56px!important}i.s58,md-icon[md-font-icon].s58{font-size:58px!important;width:58px!important;height:58px!important;min-width:58px!important;min-height:58px!important;line-height:58px!important}i.s60,md-icon[md-font-icon].s60{font-size:60px!important;width:60px!important;height:60px!important;min-width:60px!important;min-height:60px!important;line-height:60px!important}i.s62,md-icon[md-font-icon].s62{font-size:62px!important;width:62px!important;height:62px!important;min-width:62px!important;min-height:62px!important;line-height:62px!important}i.s64,md-icon[md-font-icon].s64{font-size:64px!important;width:64px!important;height:64px!important;min-width:64px!important;min-height:64px!important;line-height:64px!important}i.s66,md-icon[md-font-icon].s66{font-size:66px!important;width:66px!important;height:66px!important;min-width:66px!important;min-height:66px!important;line-height:66px!important}i.s68,md-icon[md-font-icon].s68{font-size:68px!important;width:68px!important;height:68px!important;min-width:68px!important;min-height:68px!important;line-height:68px!important}i.s70,md-icon[md-font-icon].s70{font-size:70px!important;width:70px!important;height:70px!important;min-width:70px!important;min-height:70px!important;line-height:70px!important}i.s72,md-icon[md-font-icon].s72{font-size:72px!important;width:72px!important;height:72px!important;min-width:72px!important;min-height:72px!important;line-height:72px!important}i.s74,md-icon[md-font-icon].s74{font-size:74px!important;width:74px!important;height:74px!important;min-width:74px!important;min-height:74px!important;line-height:74px!important}i.s76,md-icon[md-font-icon].s76{font-size:76px!important;width:76px!important;height:76px!important;min-width:76px!important;min-height:76px!important;line-height:76px!important}i.s78,md-icon[md-font-icon].s78{font-size:78px!important;width:78px!important;height:78px!important;min-width:78px!important;min-height:78px!important;line-height:78px!important}i.s80,md-icon[md-font-icon].s80{font-size:80px!important;width:80px!important;height:80px!important;min-width:80px!important;min-height:80px!important;line-height:80px!important}i.s82,md-icon[md-font-icon].s82{font-size:82px!important;width:82px!important;height:82px!important;min-width:82px!important;min-height:82px!important;line-height:82px!important}i.s84,md-icon[md-font-icon].s84{font-size:84px!important;width:84px!important;height:84px!important;min-width:84px!important;min-height:84px!important;line-height:84px!important}i.s86,md-icon[md-font-icon].s86{font-size:86px!important;width:86px!important;height:86px!important;min-width:86px!important;min-height:86px!important;line-height:86px!important}i.s88,md-icon[md-font-icon].s88{font-size:88px!important;width:88px!important;height:88px!important;min-width:88px!important;min-height:88px!important;line-height:88px!important}i.s90,md-icon[md-font-icon].s90{font-size:90px!important;width:90px!important;height:90px!important;min-width:90px!important;min-height:90px!important;line-height:90px!important}i.s92,md-icon[md-font-icon].s92{font-size:92px!important;width:92px!important;height:92px!important;min-width:92px!important;min-height:92px!important;line-height:92px!important}i.s94,md-icon[md-font-icon].s94{font-size:94px!important;width:94px!important;height:94px!important;min-width:94px!important;min-height:94px!important;line-height:94px!important}i.s96,md-icon[md-font-icon].s96{font-size:96px!important;width:96px!important;height:96px!important;min-width:96px!important;min-height:96px!important;line-height:96px!important}i.s98,md-icon[md-font-icon].s98{font-size:98px!important;width:98px!important;height:98px!important;min-width:98px!important;min-height:98px!important;line-height:98px!important}i.s100,md-icon[md-font-icon].s100{font-size:100px!important;width:100px!important;height:100px!important;min-width:100px!important;min-height:100px!important;line-height:100px!important}i.s102,md-icon[md-font-icon].s102{font-size:102px!important;width:102px!important;height:102px!important;min-width:102px!important;min-height:102px!important;line-height:102px!important}i.s104,md-icon[md-font-icon].s104{font-size:104px!important;width:104px!important;height:104px!important;min-width:104px!important;min-height:104px!important;line-height:104px!important}i.s106,md-icon[md-font-icon].s106{font-size:106px!important;width:106px!important;height:106px!important;min-width:106px!important;min-height:106px!important;line-height:106px!important}i.s108,md-icon[md-font-icon].s108{font-size:108px!important;width:108px!important;height:108px!important;min-width:108px!important;min-height:108px!important;line-height:108px!important}i.s110,md-icon[md-font-icon].s110{font-size:110px!important;width:110px!important;height:110px!important;min-width:110px!important;min-height:110px!important;line-height:110px!important}i.s112,md-icon[md-font-icon].s112{font-size:112px!important;width:112px!important;height:112px!important;min-width:112px!important;min-height:112px!important;line-height:112px!important}i.s114,md-icon[md-font-icon].s114{font-size:114px!important;width:114px!important;height:114px!important;min-width:114px!important;min-height:114px!important;line-height:114px!important}i.s116,md-icon[md-font-icon].s116{font-size:116px!important;width:116px!important;height:116px!important;min-width:116px!important;min-height:116px!important;line-height:116px!important}i.s118,md-icon[md-font-icon].s118{font-size:118px!important;width:118px!important;height:118px!important;min-width:118px!important;min-height:118px!important;line-height:118px!important}i.s120,md-icon[md-font-icon].s120{font-size:120px!important;width:120px!important;height:120px!important;min-width:120px!important;min-height:120px!important;line-height:120px!important}i.s122,md-icon[md-font-icon].s122{font-size:122px!important;width:122px!important;height:122px!important;min-width:122px!important;min-height:122px!important;line-height:122px!important}i.s124,md-icon[md-font-icon].s124{font-size:124px!important;width:124px!important;height:124px!important;min-width:124px!important;min-height:124px!important;line-height:124px!important}i.s126,md-icon[md-font-icon].s126{font-size:126px!important;width:126px!important;height:126px!important;min-width:126px!important;min-height:126px!important;line-height:126px!important}i.s128,md-icon[md-font-icon].s128{font-size:128px!important;width:128px!important;height:128px!important;min-width:128px!important;min-height:128px!important;line-height:128px!important}i.s130,md-icon[md-font-icon].s130{font-size:130px!important;width:130px!important;height:130px!important;min-width:130px!important;min-height:130px!important;line-height:130px!important}i.s132,md-icon[md-font-icon].s132{font-size:132px!important;width:132px!important;height:132px!important;min-width:132px!important;min-height:132px!important;line-height:132px!important}i.s134,md-icon[md-font-icon].s134{font-size:134px!important;width:134px!important;height:134px!important;min-width:134px!important;min-height:134px!important;line-height:134px!important}i.s136,md-icon[md-font-icon].s136{font-size:136px!important;width:136px!important;height:136px!important;min-width:136px!important;min-height:136px!important;line-height:136px!important}i.s138,md-icon[md-font-icon].s138{font-size:138px!important;width:138px!important;height:138px!important;min-width:138px!important;min-height:138px!important;line-height:138px!important}i.s140,md-icon[md-font-icon].s140{font-size:140px!important;width:140px!important;height:140px!important;min-width:140px!important;min-height:140px!important;line-height:140px!important}i.s142,md-icon[md-font-icon].s142{font-size:142px!important;width:142px!important;height:142px!important;min-width:142px!important;min-height:142px!important;line-height:142px!important}i.s144,md-icon[md-font-icon].s144{font-size:144px!important;width:144px!important;height:144px!important;min-width:144px!important;min-height:144px!important;line-height:144px!important}i.s146,md-icon[md-font-icon].s146{font-size:146px!important;width:146px!important;height:146px!important;min-width:146px!important;min-height:146px!important;line-height:146px!important}i.s148,md-icon[md-font-icon].s148{font-size:148px!important;width:148px!important;height:148px!important;min-width:148px!important;min-height:148px!important;line-height:148px!important}i.s150,md-icon[md-font-icon].s150{font-size:150px!important;width:150px!important;height:150px!important;min-width:150px!important;min-height:150px!important;line-height:150px!important}i.s152,md-icon[md-font-icon].s152{font-size:152px!important;width:152px!important;height:152px!important;min-width:152px!important;min-height:152px!important;line-height:152px!important}i.s154,md-icon[md-font-icon].s154{font-size:154px!important;width:154px!important;height:154px!important;min-width:154px!important;min-height:154px!important;line-height:154px!important}i.s156,md-icon[md-font-icon].s156{font-size:156px!important;width:156px!important;height:156px!important;min-width:156px!important;min-height:156px!important;line-height:156px!important}i.s158,md-icon[md-font-icon].s158{font-size:158px!important;width:158px!important;height:158px!important;min-width:158px!important;min-height:158px!important;line-height:158px!important}i.s160,md-icon[md-font-icon].s160{font-size:160px!important;width:160px!important;height:160px!important;min-width:160px!important;min-height:160px!important;line-height:160px!important}i.s162,md-icon[md-font-icon].s162{font-size:162px!important;width:162px!important;height:162px!important;min-width:162px!important;min-height:162px!important;line-height:162px!important}i.s164,md-icon[md-font-icon].s164{font-size:164px!important;width:164px!important;height:164px!important;min-width:164px!important;min-height:164px!important;line-height:164px!important}i.s166,md-icon[md-font-icon].s166{font-size:166px!important;width:166px!important;height:166px!important;min-width:166px!important;min-height:166px!important;line-height:166px!important}i.s168,md-icon[md-font-icon].s168{font-size:168px!important;width:168px!important;height:168px!important;min-width:168px!important;min-height:168px!important;line-height:168px!important}i.s170,md-icon[md-font-icon].s170{font-size:170px!important;width:170px!important;height:170px!important;min-width:170px!important;min-height:170px!important;line-height:170px!important}i.s172,md-icon[md-font-icon].s172{font-size:172px!important;width:172px!important;height:172px!important;min-width:172px!important;min-height:172px!important;line-height:172px!important}i.s174,md-icon[md-font-icon].s174{font-size:174px!important;width:174px!important;height:174px!important;min-width:174px!important;min-height:174px!important;line-height:174px!important}i.s176,md-icon[md-font-icon].s176{font-size:176px!important;width:176px!important;height:176px!important;min-width:176px!important;min-height:176px!important;line-height:176px!important}i.s178,md-icon[md-font-icon].s178{font-size:178px!important;width:178px!important;height:178px!important;min-width:178px!important;min-height:178px!important;line-height:178px!important}i.s180,md-icon[md-font-icon].s180{font-size:180px!important;width:180px!important;height:180px!important;min-width:180px!important;min-height:180px!important;line-height:180px!important}i.s182,md-icon[md-font-icon].s182{font-size:182px!important;width:182px!important;height:182px!important;min-width:182px!important;min-height:182px!important;line-height:182px!important}i.s184,md-icon[md-font-icon].s184{font-size:184px!important;width:184px!important;height:184px!important;min-width:184px!important;min-height:184px!important;line-height:184px!important}i.s186,md-icon[md-font-icon].s186{font-size:186px!important;width:186px!important;height:186px!important;min-width:186px!important;min-height:186px!important;line-height:186px!important}i.s188,md-icon[md-font-icon].s188{font-size:188px!important;width:188px!important;height:188px!important;min-width:188px!important;min-height:188px!important;line-height:188px!important}i.s190,md-icon[md-font-icon].s190{font-size:190px!important;width:190px!important;height:190px!important;min-width:190px!important;min-height:190px!important;line-height:190px!important}i.s192,md-icon[md-font-icon].s192{font-size:192px!important;width:192px!important;height:192px!important;min-width:192px!important;min-height:192px!important;line-height:192px!important}i.s194,md-icon[md-font-icon].s194{font-size:194px!important;width:194px!important;height:194px!important;min-width:194px!important;min-height:194px!important;line-height:194px!important}i.s196,md-icon[md-font-icon].s196{font-size:196px!important;width:196px!important;height:196px!important;min-width:196px!important;min-height:196px!important;line-height:196px!important}i.s198,md-icon[md-font-icon].s198{font-size:198px!important;width:198px!important;height:198px!important;min-width:198px!important;min-height:198px!important;line-height:198px!important}i.s200,md-icon[md-font-icon].s200{font-size:200px!important;width:200px!important;height:200px!important;min-width:200px!important;min-height:200px!important;line-height:200px!important}i.s202,md-icon[md-font-icon].s202{font-size:202px!important;width:202px!important;height:202px!important;min-width:202px!important;min-height:202px!important;line-height:202px!important}i.s204,md-icon[md-font-icon].s204{font-size:204px!important;width:204px!important;height:204px!important;min-width:204px!important;min-height:204px!important;line-height:204px!important}i.s206,md-icon[md-font-icon].s206{font-size:206px!important;width:206px!important;height:206px!important;min-width:206px!important;min-height:206px!important;line-height:206px!important}i.s208,md-icon[md-font-icon].s208{font-size:208px!important;width:208px!important;height:208px!important;min-width:208px!important;min-height:208px!important;line-height:208px!important}i.s210,md-icon[md-font-icon].s210{font-size:210px!important;width:210px!important;height:210px!important;min-width:210px!important;min-height:210px!important;line-height:210px!important}i.s212,md-icon[md-font-icon].s212{font-size:212px!important;width:212px!important;height:212px!important;min-width:212px!important;min-height:212px!important;line-height:212px!important}i.s214,md-icon[md-font-icon].s214{font-size:214px!important;width:214px!important;height:214px!important;min-width:214px!important;min-height:214px!important;line-height:214px!important}i.s216,md-icon[md-font-icon].s216{font-size:216px!important;width:216px!important;height:216px!important;min-width:216px!important;min-height:216px!important;line-height:216px!important}i.s218,md-icon[md-font-icon].s218{font-size:218px!important;width:218px!important;height:218px!important;min-width:218px!important;min-height:218px!important;line-height:218px!important}i.s220,md-icon[md-font-icon].s220{font-size:220px!important;width:220px!important;height:220px!important;min-width:220px!important;min-height:220px!important;line-height:220px!important}i.s222,md-icon[md-font-icon].s222{font-size:222px!important;width:222px!important;height:222px!important;min-width:222px!important;min-height:222px!important;line-height:222px!important}i.s224,md-icon[md-font-icon].s224{font-size:224px!important;width:224px!important;height:224px!important;min-width:224px!important;min-height:224px!important;line-height:224px!important}i.s226,md-icon[md-font-icon].s226{font-size:226px!important;width:226px!important;height:226px!important;min-width:226px!important;min-height:226px!important;line-height:226px!important}i.s228,md-icon[md-font-icon].s228{font-size:228px!important;width:228px!important;height:228px!important;min-width:228px!important;min-height:228px!important;line-height:228px!important}i.s230,md-icon[md-font-icon].s230{font-size:230px!important;width:230px!important;height:230px!important;min-width:230px!important;min-height:230px!important;line-height:230px!important}i.s232,md-icon[md-font-icon].s232{font-size:232px!important;width:232px!important;height:232px!important;min-width:232px!important;min-height:232px!important;line-height:232px!important}i.s234,md-icon[md-font-icon].s234{font-size:234px!important;width:234px!important;height:234px!important;min-width:234px!important;min-height:234px!important;line-height:234px!important}i.s236,md-icon[md-font-icon].s236{font-size:236px!important;width:236px!important;height:236px!important;min-width:236px!important;min-height:236px!important;line-height:236px!important}i.s238,md-icon[md-font-icon].s238{font-size:238px!important;width:238px!important;height:238px!important;min-width:238px!important;min-height:238px!important;line-height:238px!important}i.s240,md-icon[md-font-icon].s240{font-size:240px!important;width:240px!important;height:240px!important;min-width:240px!important;min-height:240px!important;line-height:240px!important}i.s242,md-icon[md-font-icon].s242{font-size:242px!important;width:242px!important;height:242px!important;min-width:242px!important;min-height:242px!important;line-height:242px!important}i.s244,md-icon[md-font-icon].s244{font-size:244px!important;width:244px!important;height:244px!important;min-width:244px!important;min-height:244px!important;line-height:244px!important}i.s246,md-icon[md-font-icon].s246{font-size:246px!important;width:246px!important;height:246px!important;min-width:246px!important;min-height:246px!important;line-height:246px!important}i.s248,md-icon[md-font-icon].s248{font-size:248px!important;width:248px!important;height:248px!important;min-width:248px!important;min-height:248px!important;line-height:248px!important}i.s250,md-icon[md-font-icon].s250{font-size:250px!important;width:250px!important;height:250px!important;min-width:250px!important;min-height:250px!important;line-height:250px!important}i.s252,md-icon[md-font-icon].s252{font-size:252px!important;width:252px!important;height:252px!important;min-width:252px!important;min-height:252px!important;line-height:252px!important}i.s254,md-icon[md-font-icon].s254{font-size:254px!important;width:254px!important;height:254px!important;min-width:254px!important;min-height:254px!important;line-height:254px!important}i.s256,md-icon[md-font-icon].s256{font-size:256px!important;width:256px!important;height:256px!important;min-width:256px!important;min-height:256px!important;line-height:256px!important}@font-face{font-family:icomoon;src:url(../assets/icons/fonts/icomoon.eot?5km1tg);src:url(../assets/icons/fonts/icomoon.eot?#iefix5km1tg) format("embedded-opentype"),url(../assets/icons/fonts/icomoon.ttf?5km1tg) format("truetype"),url(../assets/icons/fonts/icomoon.woff?5km1tg) format("woff"),url(../assets/icons/fonts/icomoon.svg?5km1tg#icomoon) format("svg");font-weight:400;font-style:normal}[class*=' icon-'],[class^=icon-]{font-family:icomoon;speak:none;font-style:normal;font-weight:400;font-variant:normal;text-transform:none;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.icon-account-alert:before{content:'\e600'}.icon-account-box-outline:before{content:'\e601'}.icon-account-box:before{content:'\e602'}.icon-account-check:before{content:'\e603'}.icon-account-circle:before{content:'\e604'}.icon-account-key:before{content:'\e605'}.icon-account-location:before{content:'\e606'}.icon-account-minus:before{content:'\e607'}.icon-account-multiple-outline:before{content:'\e608'}.icon-account-multiple-plus:before{content:'\e609'}.icon-account-multiple:before{content:'\e60a'}.icon-account-network:before{content:'\e60b'}.icon-account-outline:before{content:'\e60c'}.icon-account-plus:before{content:'\e60d'}.icon-account-remove:before{content:'\e60e'}.icon-account-search:before{content:'\e60f'}.icon-account-switch:before{content:'\e610'}.icon-account:before{content:'\e611'}.icon-airballoon:before{content:'\e612'}.icon-airplane-off:before{content:'\e613'}.icon-airplane:before{content:'\e614'}.icon-alarm-check:before{content:'\e615'}.icon-alarm-multiple:before{content:'\e616'}.icon-alarm-off:before{content:'\e617'}.icon-alarm-plus:before{content:'\e618'}.icon-alarm:before{content:'\e619'}.icon-album:before{content:'\e61a'}.icon-alert-box:before{content:'\e61b'}.icon-alert-circle:before{content:'\e61c'}.icon-alert-octagon:before{content:'\e61d'}.icon-alert:before{content:'\e61e'}.icon-alpha:before{content:'\e61f'}.icon-alphabetical:before{content:'\e620'}.icon-amazon-clouddrive:before{content:'\e621'}.icon-amazon:before{content:'\e622'}.icon-ambulance:before{content:'\e623'}.icon-android-debug-bridge:before{content:'\e624'}.icon-android-studio:before{content:'\e625'}.icon-android:before{content:'\e626'}.icon-apple-finder:before{content:'\e627'}.icon-apple-ios:before{content:'\e628'}.icon-apple-mobileme:before{content:'\e629'}.icon-apple-safari:before{content:'\e62a'}.icon-apple:before{content:'\e62b'}.icon-appnet:before{content:'\e62c'}.icon-apps:before{content:'\e62d'}.icon-archive:before{content:'\e62e'}.icon-arrange-bring-forward:before{content:'\e62f'}.icon-arrange-bring-to-front:before{content:'\e630'}.icon-arrange-send-backward:before{content:'\e631'}.icon-arrange-send-to-back:before{content:'\e632'}.icon-arrow-all:before{content:'\e633'}.icon-arrow-bottom-left:before{content:'\e634'}.icon-arrow-bottom-right:before{content:'\e635'}.icon-arrow-collapse:before{content:'\e636'}.icon-arrow-down-bold-circle-outline:before{content:'\e637'}.icon-arrow-down-bold-circle:before{content:'\e638'}.icon-arrow-down-bold-hexagon-outline:before{content:'\e639'}.icon-arrow-down-bold:before{content:'\e63a'}.icon-arrow-down:before{content:'\e63b'}.icon-arrow-expand:before{content:'\e63c'}.icon-arrow-left-bold-circle-outline:before{content:'\e63d'}.icon-arrow-left-bold-circle:before{content:'\e63e'}.icon-arrow-left-bold-hexagon-outline:before{content:'\e63f'}.icon-arrow-left-bold:before{content:'\e640'}.icon-arrow-left:before{content:'\e641'}.icon-arrow-right-bold-circle-outline:before{content:'\e642'}.icon-arrow-right-bold-circle:before{content:'\e643'}.icon-arrow-right-bold-hexagon-outline:before{content:'\e644'}.icon-arrow-right-bold:before{content:'\e645'}.icon-arrow-right:before{content:'\e646'}.icon-arrow-top-left:before{content:'\e647'}.icon-arrow-top-right:before{content:'\e648'}.icon-arrow-up-bold-circle-outline:before{content:'\e649'}.icon-arrow-up-bold-circle:before{content:'\e64a'}.icon-arrow-up-bold-hexagon-outline:before{content:'\e64b'}.icon-arrow-up-bold:before{content:'\e64c'}.icon-arrow-up:before{content:'\e64d'}.icon-at:before{content:'\e64e'}.icon-attachment:before{content:'\e64f'}.icon-audiobook:before{content:'\e650'}.icon-auto-fix:before{content:'\e651'}.icon-auto-upload:before{content:'\e652'}.icon-baby:before{content:'\e653'}.icon-backburger:before{content:'\e654'}.icon-backup-restore:before{content:'\e655'}.icon-bank:before{content:'\e656'}.icon-barcode:before{content:'\e657'}.icon-barley:before{content:'\e658'}.icon-barrel:before{content:'\e659'}.icon-basecamp:before{content:'\e65a'}.icon-basket-fill:before{content:'\e65b'}.icon-basket-unfill:before{content:'\e65c'}.icon-basket:before{content:'\e65d'}.icon-battery-10:before{content:'\e65e'}.icon-battery-20:before{content:'\e65f'}.icon-battery-30:before{content:'\e660'}.icon-battery-40:before{content:'\e661'}.icon-battery-50:before{content:'\e662'}.icon-battery-60:before{content:'\e663'}.icon-battery-70:before{content:'\e664'}.icon-battery-80:before{content:'\e665'}.icon-battery-90:before{content:'\e666'}.icon-battery-alert:before{content:'\e667'}.icon-battery-charging-20:before{content:'\e668'}.icon-battery-charging-30:before{content:'\e669'}.icon-battery-charging-40:before{content:'\e66a'}.icon-battery-charging-60:before{content:'\e66b'}.icon-battery-charging-80:before{content:'\e66c'}.icon-battery-charging-90:before{content:'\e66d'}.icon-battery-charging-100:before{content:'\e66e'}.icon-battery-minus:before{content:'\e66f'}.icon-battery-negative:before{content:'\e670'}.icon-battery-outline:before{content:'\e671'}.icon-battery-plus:before{content:'\e672'}.icon-battery-positive:before{content:'\e673'}.icon-battery-standard:before{content:'\e674'}.icon-battery-unknown:before{content:'\e675'}.icon-battery:before{content:'\e676'}.icon-beach:before{content:'\e677'}.icon-beaker-empty-outline:before{content:'\e678'}.icon-beaker-empty:before{content:'\e679'}.icon-beaker-outline:before{content:'\e67a'}.icon-beaker:before{content:'\e67b'}.icon-beats:before{content:'\e67c'}.icon-beer:before{content:'\e67d'}.icon-behance:before{content:'\e67e'}.icon-bell-off:before{content:'\e67f'}.icon-bell-outline:before{content:'\e680'}.icon-bell-ring-outline:before{content:'\e681'}.icon-bell-ring:before{content:'\e682'}.icon-bell-sleep:before{content:'\e683'}.icon-bell:before{content:'\e684'}.icon-beta:before{content:'\e685'}.icon-bike:before{content:'\e686'}.icon-bing:before{content:'\e687'}.icon-binoculars:before{content:'\e688'}.icon-bio:before{content:'\e689'}.icon-bitbucket:before{content:'\e68a'}.icon-black-mesa:before{content:'\e68b'}.icon-blackberry:before{content:'\e68c'}.icon-blinds:before{content:'\e68d'}.icon-block-helper:before{content:'\e68e'}.icon-blogger:before{content:'\e68f'}.icon-bluetooth-audio:before{content:'\e690'}.icon-bluetooth-connect:before{content:'\e691'}.icon-bluetooth-settings:before{content:'\e692'}.icon-bluetooth-transfer:before{content:'\e693'}.icon-bluetooth:before{content:'\e694'}.icon-blur-linear:before{content:'\e695'}.icon-blur-off:before{content:'\e696'}.icon-blur-radial:before{content:'\e697'}.icon-blur:before{content:'\e698'}.icon-bone:before{content:'\e699'}.icon-book-multiple-variant:before{content:'\e69a'}.icon-book-multiple:before{content:'\e69b'}.icon-book-open:before{content:'\e69c'}.icon-book-variant:before{content:'\e69d'}.icon-book:before{content:'\e69e'}.icon-bookmark-check:before{content:'\e69f'}.icon-bookmark-music:before{content:'\e6a0'}.icon-bookmark-outline-plus:before{content:'\e6a1'}.icon-bookmark-outline:before{content:'\e6a2'}.icon-bookmark-plus:before{content:'\e6a3'}.icon-bookmark-remove:before{content:'\e6a4'}.icon-bookmark:before{content:'\e6a5'}.icon-border-all:before{content:'\e6a6'}.icon-border-bottom:before{content:'\e6a7'}.icon-border-color:before{content:'\e6a8'}.icon-border-horizontal:before{content:'\e6a9'}.icon-border-inside:before{content:'\e6aa'}.icon-border-left:before{content:'\e6ab'}.icon-border-none:before{content:'\e6ac'}.icon-border-outside:before{content:'\e6ad'}.icon-border-right:before{content:'\e6ae'}.icon-border-top:before{content:'\e6af'}.icon-border-vertical:before{content:'\e6b0'}.icon-bowling:before{content:'\e6b1'}.icon-box-download:before{content:'\e6b2'}.icon-box-upload:before{content:'\e6b3'}.icon-box:before{content:'\e6b4'}.icon-briefcase-checked:before{content:'\e6b5'}.icon-briefcase-download:before{content:'\e6b6'}.icon-briefcase-upload:before{content:'\e6b7'}.icon-briefcase:before{content:'\e6b8'}.icon-brightness-1:before{content:'\e6b9'}.icon-brightness-2:before{content:'\e6ba'}.icon-brightness-3:before{content:'\e6bb'}.icon-brightness-4:before{content:'\e6bc'}.icon-brightness-5:before{content:'\e6bd'}.icon-brightness-6:before{content:'\e6be'}.icon-brightness-7:before{content:'\e6bf'}.icon-brightness-auto:before{content:'\e6c0'}.icon-brightness:before{content:'\e6c1'}.icon-broom:before{content:'\e6c2'}.icon-brush:before{content:'\e6c3'}.icon-bug:before{content:'\e6c4'}.icon-bulletin-board:before{content:'\e6c5'}.icon-bullhorn:before{content:'\e6c6'}.icon-bus:before{content:'\e6c7'}.icon-cake-variant:before{content:'\e6c8'}.icon-cake:before{content:'\e6c9'}.icon-calculator:before{content:'\e6ca'}.icon-calendar-blank:before{content:'\e6cb'}.icon-calendar-check-multiple:before{content:'\e6cc'}.icon-calendar-check:before{content:'\e6cd'}.icon-calendar-clock:before{content:'\e6ce'}.icon-calendar-multiple:before{content:'\e6cf'}.icon-calendar-plus:before{content:'\e6d0'}.icon-calendar-remove:before{content:'\e6d1'}.icon-calendar-select:before{content:'\e6d2'}.icon-calendar-text:before{content:'\e6d3'}.icon-calendar-today:before{content:'\e6d4'}.icon-calendar:before{content:'\e6d5'}.icon-camcorder-box-off:before{content:'\e6d6'}.icon-camcorder-box:before{content:'\e6d7'}.icon-camcorder-off:before{content:'\e6d8'}.icon-camcorder:before{content:'\e6d9'}.icon-camera-front-variant:before{content:'\e6da'}.icon-camera-front:before{content:'\e6db'}.icon-camera-iris:before{content:'\e6dc'}.icon-camera-party-mode:before{content:'\e6dd'}.icon-camera-rear-variant:before{content:'\e6de'}.icon-camera-rear:before{content:'\e6df'}.icon-camera-switch:before{content:'\e6e0'}.icon-camera-timer:before{content:'\e6e1'}.icon-camera:before{content:'\e6e2'}.icon-cancel:before{content:'\e6e3'}.icon-candycane:before{content:'\e6e4'}.icon-car-wash:before{content:'\e6e5'}.icon-car:before{content:'\e6e6'}.icon-carrot:before{content:'\e6e7'}.icon-cart-outline:before{content:'\e6e8'}.icon-cart:before{content:'\e6e9'}.icon-cash-100:before{content:'\e6ea'}.icon-cash-multiple:before{content:'\e6eb'}.icon-cash-usd:before{content:'\e6ec'}.icon-cash:before{content:'\e6ed'}.icon-cast-connected:before{content:'\e6ee'}.icon-cast:before{content:'\e6ef'}.icon-castle:before{content:'\e6f0'}.icon-cat:before{content:'\e6f1'}.icon-cellphone-android:before{content:'\e6f2'}.icon-cellphone-dock:before{content:'\e6f3'}.icon-cellphone-iphone:before{content:'\e6f4'}.icon-cellphone-link-off:before{content:'\e6f5'}.icon-cellphone-link:before{content:'\e6f6'}.icon-cellphone-settings:before{content:'\e6f7'}.icon-cellphone:before{content:'\e6f8'}.icon-chair-school:before{content:'\e6f9'}.icon-chart-arc:before{content:'\e6fa'}.icon-chart-areaspline:before{content:'\e6fb'}.icon-chart-bar:before{content:'\e6fc'}.icon-chart-histogram:before{content:'\e6fd'}.icon-chart-line:before{content:'\e6fe'}.icon-chart-pie:before{content:'\e6ff'}.icon-check-all:before{content:'\e700'}.icon-check-bookmark:before{content:'\e701'}.icon-check-circle:before{content:'\e702'}.icon-check:before{content:'\e703'}.icon-checkbox-blank-circle-outline:before{content:'\e704'}.icon-checkbox-blank-circle:before{content:'\e705'}.icon-checkbox-blank-outline:before{content:'\e706'}.icon-checkbox-blank:before{content:'\e707'}.icon-checkbox-marked-circle-outline:before{content:'\e708'}.icon-checkbox-marked-circle:before{content:'\e709'}.icon-checkbox-marked-outline:before{content:'\e70a'}.icon-checkbox-marked:before{content:'\e70b'}.icon-checkbox-multiple-blank-outline:before{content:'\e70c'}.icon-checkbox-multiple-blank:before{content:'\e70d'}.icon-checkbox-multiple-marked-outline:before{content:'\e70e'}.icon-checkbox-multiple-marked:before{content:'\e70f'}.icon-checkerboard:before{content:'\e710'}.icon-chevron-double-down:before{content:'\e711'}.icon-chevron-double-left:before{content:'\e712'}.icon-chevron-double-right:before{content:'\e713'}.icon-chevron-double-up:before{content:'\e714'}.icon-chevron-down:before{content:'\e715'}.icon-chevron-left:before{content:'\e716'}.icon-chevron-right:before{content:'\e717'}.icon-chevron-up:before{content:'\e718'}.icon-church:before{content:'\e719'}.icon-cisco-webex:before{content:'\e71a'}.icon-city:before{content:'\e71b'}.icon-clapperboard:before{content:'\e71c'}.icon-clipboard-account:before{content:'\e71d'}.icon-clipboard-alert:before{content:'\e71e'}.icon-clipboard-arrow-down:before{content:'\e71f'}.icon-clipboard-arrow-left:before{content:'\e720'}.icon-clipboard-check:before{content:'\e721'}.icon-clipboard-outline:before{content:'\e722'}.icon-clipboard-text:before{content:'\e723'}.icon-clipboard:before{content:'\e724'}.icon-clippy:before{content:'\e725'}.icon-clock-fast:before{content:'\e726'}.icon-clock:before{content:'\e727'}.icon-close-circle-outline:before{content:'\e728'}.icon-close-circle:before{content:'\e729'}.icon-close-network:before{content:'\e72a'}.icon-close:before{content:'\e72b'}.icon-closed-caption:before{content:'\e72c'}.icon-cloud-check:before{content:'\e72d'}.icon-cloud-circle:before{content:'\e72e'}.icon-cloud-download:before{content:'\e72f'}.icon-cloud-outline-off:before{content:'\e730'}.icon-cloud-outline:before{content:'\e731'}.icon-cloud-upload:before{content:'\e732'}.icon-cloud:before{content:'\e733'}.icon-code-array:before{content:'\e734'}.icon-code-braces:before{content:'\e735'}.icon-code-equal:before{content:'\e736'}.icon-code-greater-than-or-equal:before{content:'\e737'}.icon-code-greater-than:before{content:'\e738'}.icon-code-less-than-or-equal:before{content:'\e739'}.icon-code-less-than:before{content:'\e73a'}.icon-code-not-equal-variant:before{content:'\e73b'}.icon-code-not-equal:before{content:'\e73c'}.icon-code-string:before{content:'\e73d'}.icon-code-tags:before{content:'\e73e'}.icon-codepen:before{content:'\e73f'}.icon-coffee-to-go:before{content:'\e740'}.icon-coffee:before{content:'\e741'}.icon-cog-box:before{content:'\e742'}.icon-cog:before{content:'\e743'}.icon-coin:before{content:'\e744'}.icon-color-helper:before{content:'\e745'}.icon-comment-account-outline:before{content:'\e746'}.icon-comment-account:before{content:'\e747'}.icon-comment-alert-outline:before{content:'\e748'}.icon-comment-alert:before{content:'\e749'}.icon-comment-check-outline:before{content:'\e74a'}.icon-comment-check:before{content:'\e74b'}.icon-comment-multipe-outline:before{content:'\e74c'}.icon-comment-outline:before{content:'\e74d'}.icon-comment-plus-outline:before{content:'\e74e'}.icon-comment-processing-outline:before{content:'\e74f'}.icon-comment-processing:before{content:'\e750'}.icon-comment-remove-outline:before{content:'\e751'}.icon-comment-text-outline:before{content:'\e752'}.icon-comment-text:before{content:'\e753'}.icon-comment:before{content:'\e754'}.icon-compare:before{content:'\e755'}.icon-compass-outline:before{content:'\e756'}.icon-compass:before{content:'\e757'}.icon-console:before{content:'\e758'}.icon-content-copy:before{content:'\e759'}.icon-content-cut:before{content:'\e75a'}.icon-content-duplicate:before{content:'\e75b'}.icon-content-paste:before{content:'\e75c'}.icon-content-save-all:before{content:'\e75d'}.icon-content-save:before{content:'\e75e'}.icon-contrast-box:before{content:'\e75f'}.icon-contrast-circle:before{content:'\e760'}.icon-contrast:before{content:'\e761'}.icon-controller-xbox:before{content:'\e762'}.icon-cow:before{content:'\e763'}.icon-credit-card-multiple:before{content:'\e764'}.icon-credit-card:before{content:'\e765'}.icon-crop-free:before{content:'\e766'}.icon-crop-landscape:before{content:'\e767'}.icon-crop-portrait:before{content:'\e768'}.icon-crop-square:before{content:'\e769'}.icon-crop:before{content:'\e76a'}.icon-crosshairs-gps:before{content:'\e76b'}.icon-crosshairs:before{content:'\e76c'}.icon-crown:before{content:'\e76d'}.icon-cube-outline:before{content:'\e76e'}.icon-cube-unfolded:before{content:'\e76f'}.icon-cube:before{content:'\e770'}.icon-cup-water:before{content:'\e771'}.icon-cup:before{content:'\e772'}.icon-currency-btc:before{content:'\e773'}.icon-currency-eur:before{content:'\e774'}.icon-currency-gbp:before{content:'\e775'}.icon-currency-inr:before{content:'\e776'}.icon-currency-rub:before{content:'\e777'}.icon-currency-try:before{content:'\e778'}.icon-currency-usd:before{content:'\e779'}.icon-cursor-default-outline:before{content:'\e77a'}.icon-cursor-default:before{content:'\e77b'}.icon-cursor-move:before{content:'\e77c'}.icon-cursor-pointer:before{content:'\e77d'}.icon-data:before{content:'\e77e'}.icon-debug-step-into:before{content:'\e77f'}.icon-debug-step-out:before{content:'\e780'}.icon-debug-step-over:before{content:'\e781'}.icon-decimal-decrease:before{content:'\e782'}.icon-decimal-increase:before{content:'\e783'}.icon-delete-variant:before{content:'\e784'}.icon-delete:before{content:'\e785'}.icon-deskphone:before{content:'\e786'}.icon-desktop-mac:before{content:'\e787'}.icon-desktop-tower:before{content:'\e788'}.icon-details:before{content:'\e789'}.icon-deviantart:before{content:'\e78a'}.icon-diamond:before{content:'\e78b'}.icon-dice-1:before{content:'\e78c'}.icon-dice-2:before{content:'\e78d'}.icon-dice-3:before{content:'\e78e'}.icon-dice-4:before{content:'\e78f'}.icon-dice-5:before{content:'\e790'}.icon-dice-6:before{content:'\e791'}.icon-dice:before{content:'\e792'}.icon-directions:before{content:'\e793'}.icon-disk-alert:before{content:'\e794'}.icon-disqus-outline:before{content:'\e795'}.icon-disqus:before{content:'\e796'}.icon-division-box:before{content:'\e797'}.icon-division:before{content:'\e798'}.icon-dns:before{content:'\e799'}.icon-document:before{content:'\e79a'}.icon-domain:before{content:'\e79b'}.icon-dots-horizontal:before{content:'\e79c'}.icon-dots-vertical:before{content:'\e79d'}.icon-download:before{content:'\e79e'}.icon-drag-horizontal:before{content:'\e79f'}.icon-drag-vertical:before{content:'\e7a0'}.icon-drag:before{content:'\e7a1'}.icon-drawing-box:before{content:'\e7a2'}.icon-drawing:before{content:'\e7a3'}.icon-dribbble-box:before{content:'\e7a4'}.icon-dribbble:before{content:'\e7a5'}.icon-drone:before{content:'\e7a6'}.icon-dropbox:before{content:'\e7a7'}.icon-drupal:before{content:'\e7a8'}.icon-duck:before{content:'\e7a9'}.icon-dumbbell:before{content:'\e7aa'}.icon-earth-off:before{content:'\e7ab'}.icon-earth:before{content:'\e7ac'}.icon-ebay:before{content:'\e7ad'}.icon-edge:before{content:'\e7ae'}.icon-eject:before{content:'\e7af'}.icon-elevation-decline:before{content:'\e7b0'}.icon-elevation-rise:before{content:'\e7b1'}.icon-elevator:before{content:'\e7b2'}.icon-email-open:before{content:'\e7b3'}.icon-email-secure:before{content:'\e7b4'}.icon-email:before{content:'\e7b5'}.icon-emoticon-cool:before{content:'\e7b6'}.icon-emoticon-devil:before{content:'\e7b7'}.icon-emoticon-happy:before{content:'\e7b8'}.icon-emoticon-neutral:before{content:'\e7b9'}.icon-emoticon-poop:before{content:'\e7ba'}.icon-emoticon-sad:before{content:'\e7bb'}.icon-emoticon-tongue:before{content:'\e7bc'}.icon-emoticon:before{content:'\e7bd'}.icon-engine-outline:before{content:'\e7be'}.icon-engine:before{content:'\e7bf'}.icon-equal-box:before{content:'\e7c0'}.icon-equal:before{content:'\e7c1'}.icon-eraser:before{content:'\e7c2'}.icon-escalator:before{content:'\e7c3'}.icon-etsy:before{content:'\e7c4'}.icon-evernote:before{content:'\e7c5'}.icon-exclamation:before{content:'\e7c6'}.icon-exit-to-app:before{content:'\e7c7'}.icon-export:before{content:'\e7c8'}.icon-eye-off:before{content:'\e7c9'}.icon-eye:before{content:'\e7ca'}.icon-eyedropper-variant:before{content:'\e7cb'}.icon-eyedropper:before{content:'\e7cc'}.icon-facebook-box:before{content:'\e7cd'}.icon-facebook:before{content:'\e7ce'}.icon-factory:before{content:'\e7cf'}.icon-fan:before{content:'\e7d0'}.icon-fast-forward:before{content:'\e7d1'}.icon-ferry:before{content:'\e7d2'}.icon-file-cloud:before{content:'\e7d3'}.icon-file-delimited:before{content:'\e7d4'}.icon-file-document-box:before{content:'\e7d5'}.icon-file-document:before{content:'\e7d6'}.icon-file-excel-box:before{content:'\e7d7'}.icon-file-excel:before{content:'\e7d8'}.icon-file-find:before{content:'\e7d9'}.icon-file-hidden:before{content:'\e7da'}.icon-file-image-box:before{content:'\e7db'}.icon-file-image:before{content:'\e7dc'}.icon-file-multiple:before{content:'\e7dd'}.icon-file-music:before{content:'\e7de'}.icon-file-outline:before{content:'\e7df'}.icon-file-pdf-box:before{content:'\e7e0'}.icon-file-pdf:before{content:'\e7e1'}.icon-file-powerpoint-box:before{content:'\e7e2'}.icon-file-powerpoint:before{content:'\e7e3'}.icon-file-presentation-box:before{content:'\e7e4'}.icon-file-video:before{content:'\e7e5'}.icon-file-word-box:before{content:'\e7e6'}.icon-file-word:before{content:'\e7e7'}.icon-file-xml:before{content:'\e7e8'}.icon-file:before{content:'\e7e9'}.icon-fill:before{content:'\e7ea'}.icon-film:before{content:'\e7eb'}.icon-filmstrip-off:before{content:'\e7ec'}.icon-filmstrip:before{content:'\e7ed'}.icon-filter-outline:before{content:'\e7ee'}.icon-filter-remove-outline:before{content:'\e7ef'}.icon-filter-remove:before{content:'\e7f0'}.icon-filter-variant:before{content:'\e7f1'}.icon-filter:before{content:'\e7f2'}.icon-fire:before{content:'\e7f3'}.icon-fish:before{content:'\e7f4'}.icon-flag-checkered-variant:before{content:'\e7f5'}.icon-flag-checkered:before{content:'\e7f6'}.icon-flag-outline-variant:before{content:'\e7f7'}.icon-flag-outline:before{content:'\e7f8'}.icon-flag-triangle:before{content:'\e7f9'}.icon-flag-variant:before{content:'\e7fa'}.icon-flag:before{content:'\e7fb'}.icon-flash-auto:before{content:'\e7fc'}.icon-flash-off:before{content:'\e7fd'}.icon-flash:before{content:'\e7fe'}.icon-flashlight-off:before{content:'\e7ff'}.icon-flashlight:before{content:'\e800'}.icon-flattr:before{content:'\e801'}.icon-flickr-after:before{content:'\e802'}.icon-flickr-before:before{content:'\e803'}.icon-flip-to-back:before{content:'\e804'}.icon-flip-to-front:before{content:'\e805'}.icon-floppy:before{content:'\e806'}.icon-flower:before{content:'\e807'}.icon-folder-account:before{content:'\e808'}.icon-folder-download:before{content:'\e809'}.icon-folder-google-drive:before{content:'\e80a'}.icon-folder-image:before{content:'\e80b'}.icon-folder-lock-open:before{content:'\e80c'}.icon-folder-lock:before{content:'\e80d'}.icon-folder-move:before{content:'\e80e'}.icon-folder-multiple-image:before{content:'\e80f'}.icon-folder-multiple-outline:before{content:'\e810'}.icon-folder-multiple:before{content:'\e811'}.icon-folder-outline-lock:before{content:'\e812'}.icon-folder-outline:before{content:'\e813'}.icon-folder-plus:before{content:'\e814'}.icon-folder-remove:before{content:'\e815'}.icon-folder-upload:before{content:'\e816'}.icon-folder:before{content:'\e817'}.icon-food-apple:before{content:'\e818'}.icon-food-variant:before{content:'\e819'}.icon-food:before{content:'\e81a'}.icon-football-helmet:before{content:'\e81b'}.icon-football:before{content:'\e81c'}.icon-format-align-center:before{content:'\e81d'}.icon-format-align-justify:before{content:'\e81e'}.icon-format-align-left:before{content:'\e81f'}.icon-format-align-right:before{content:'\e820'}.icon-format-bold:before{content:'\e821'}.icon-format-clear:before{content:'\e822'}.icon-format-color-fill:before{content:'\e823'}.icon-format-color:before{content:'\e824'}.icon-format-float-center:before{content:'\e825'}.icon-format-float-left:before{content:'\e826'}.icon-format-float-none:before{content:'\e827'}.icon-format-float-right:before{content:'\e828'}.icon-format-header-1:before{content:'\e829'}.icon-format-header-2:before{content:'\e82a'}.icon-format-header-3:before{content:'\e82b'}.icon-format-header-4:before{content:'\e82c'}.icon-format-header-5:before{content:'\e82d'}.icon-format-header-6:before{content:'\e82e'}.icon-format-header-decrease:before{content:'\e82f'}.icon-format-header-down:before{content:'\e830'}.icon-format-header-equal:before{content:'\e831'}.icon-format-header-increase:before{content:'\e832'}.icon-format-header-pound:before{content:'\e833'}.icon-format-header-up:before{content:'\e834'}.icon-format-indent-decrease:before{content:'\e835'}.icon-format-indent-increase:before{content:'\e836'}.icon-format-italic:before{content:'\e837'}.icon-format-line-spacing:before{content:'\e838'}.icon-format-list-bulleted:before{content:'\e839'}.icon-format-list-numbers:before{content:'\e83a'}.icon-format-object-inline:before{content:'\e83b'}.icon-format-object-square:before{content:'\e83c'}.icon-format-object-tight:before{content:'\e83d'}.icon-format-object-top-bottom:before{content:'\e83e'}.icon-format-paint:before{content:'\e83f'}.icon-format-paragraph:before{content:'\e840'}.icon-format-quote:before{content:'\e841'}.icon-format-size:before{content:'\e842'}.icon-format-strikethrough:before{content:'\e843'}.icon-format-subscript:before{content:'\e844'}.icon-format-superscript:before{content:'\e845'}.icon-format-text:before{content:'\e846'}.icon-format-textdirection-l-to-r:before{content:'\e847'}.icon-format-textdirection-r-to-l:before{content:'\e848'}.icon-format-underline:before{content:'\e849'}.icon-forum:before{content:'\e84a'}.icon-forward:before{content:'\e84b'}.icon-foursquare:before{content:'\e84c'}.icon-fridge:before{content:'\e84d'}.icon-fullscreen-exit:before{content:'\e84e'}.icon-fullscreen:before{content:'\e84f'}.icon-function:before{content:'\e850'}.icon-gamepad-variant:before{content:'\e851'}.icon-gamepad:before{content:'\e852'}.icon-gas-station:before{content:'\e853'}.icon-gavel:before{content:'\e854'}.icon-gender-female:before{content:'\e855'}.icon-gender-male-female:before{content:'\e856'}.icon-gender-male:before{content:'\e857'}.icon-gender-transgender:before{content:'\e858'}.icon-gift:before{content:'\e859'}.icon-git:before{content:'\e85a'}.icon-github-box:before{content:'\e85b'}.icon-github:before{content:'\e85c'}.icon-glass-flute:before{content:'\e85d'}.icon-glass-mug:before{content:'\e85e'}.icon-glass-stange:before{content:'\e85f'}.icon-glass-tulip:before{content:'\e860'}.icon-glasses:before{content:'\e861'}.icon-gmail:before{content:'\e862'}.icon-google-chrome:before{content:'\e863'}.icon-google-circles-communities:before{content:'\e864'}.icon-google-circles-extended:before{content:'\e865'}.icon-google-circles-invite:before{content:'\e866'}.icon-google-circles:before{content:'\e867'}.icon-google-controller-off:before{content:'\e868'}.icon-google-controller:before{content:'\e869'}.icon-google-drive:before{content:'\e86a'}.icon-google-earth:before{content:'\e86b'}.icon-google-glass:before{content:'\e86c'}.icon-google-maps:before{content:'\e86d'}.icon-google-pages:before{content:'\e86e'}.icon-google-play:before{content:'\e86f'}.icon-google-plus-box:before{content:'\e870'}.icon-google-plus:before{content:'\e871'}.icon-google:before{content:'\e872'}.icon-grid-off:before{content:'\e873'}.icon-grid:before{content:'\e874'}.icon-group:before{content:'\e875'}.icon-hand-pointing-right:before{content:'\e876'}.icon-hanger:before{content:'\e877'}.icon-hangouts:before{content:'\e878'}.icon-harddisk:before{content:'\e879'}.icon-headphones-box:before{content:'\e87a'}.icon-headphones-dots:before{content:'\e87b'}.icon-headphones:before{content:'\e87c'}.icon-headset-dock:before{content:'\e87d'}.icon-headset-off:before{content:'\e87e'}.icon-headset:before{content:'\e87f'}.icon-heart-box-outline:before{content:'\e880'}.icon-heart-box:before{content:'\e881'}.icon-heart-broken:before{content:'\e882'}.icon-heart-outline:before{content:'\e883'}.icon-heart:before{content:'\e884'}.icon-help-circle:before{content:'\e885'}.icon-help:before{content:'\e886'}.icon-hexagon-outline:before{content:'\e887'}.icon-hexagon:before{content:'\e888'}.icon-history:before{content:'\e889'}.icon-hololens:before{content:'\e88a'}.icon-home-modern:before{content:'\e88b'}.icon-home-variant:before{content:'\e88c'}.icon-home:before{content:'\e88d'}.icon-hops:before{content:'\e88e'}.icon-hospital-building:before{content:'\e88f'}.icon-hospital-marker:before{content:'\e890'}.icon-hospital:before{content:'\e891'}.icon-hotel:before{content:'\e892'}.icon-houzz-box:before{content:'\e893'}.icon-human-child:before{content:'\e894'}.icon-human-male-female:before{content:'\e895'}.icon-human:before{content:'\e896'}.icon-image-album:before{content:'\e897'}.icon-image-area-close:before{content:'\e898'}.icon-image-area:before{content:'\e899'}.icon-image-broken:before{content:'\e89a'}.icon-image-filter-black-white:before{content:'\e89b'}.icon-image-filter-center-focus:before{content:'\e89c'}.icon-image-filter-drama:before{content:'\e89d'}.icon-image-filter-frames:before{content:'\e89e'}.icon-image-filter-hdr:before{content:'\e89f'}.icon-image-filter-none:before{content:'\e8a0'}.icon-image-filter-tilt-shift:before{content:'\e8a1'}.icon-image-filter-vintage:before{content:'\e8a2'}.icon-image-filter:before{content:'\e8a3'}.icon-image:before{content:'\e8a4'}.icon-import:before{content:'\e8a5'}.icon-inbox:before{content:'\e8a6'}.icon-indent:before{content:'\e8a7'}.icon-information-outline:before{content:'\e8a8'}.icon-information:before{content:'\e8a9'}.icon-instagram:before{content:'\e8aa'}.icon-instapaper:before{content:'\e8ab'}.icon-internet-explorer:before{content:'\e8ac'}.icon-invert-colors:before{content:'\e8ad'}.icon-jira:before{content:'\e8ae'}.icon-jsfiddle:before{content:'\e8af'}.icon-keg:before{content:'\e8b0'}.icon-key-change:before{content:'\e8b1'}.icon-key-minus:before{content:'\e8b2'}.icon-key-plus:before{content:'\e8b3'}.icon-key-remove:before{content:'\e8b4'}.icon-key-variant:before{content:'\e8b5'}.icon-key:before{content:'\e8b6'}.icon-keyboard-backspace:before{content:'\e8b7'}.icon-keyboard-caps:before{content:'\e8b8'}.icon-keyboard-close:before{content:'\e8b9'}.icon-keyboard-off:before{content:'\e8ba'}.icon-keyboard-return:before{content:'\e8bb'}.icon-keyboard-tab:before{content:'\e8bc'}.icon-keyboard-variant:before{content:'\e8bd'}.icon-keyboard:before{content:'\e8be'}.icon-label-outline:before{content:'\e8bf'}.icon-label:before{content:'\e8c0'}.icon-language-csharp:before{content:'\e8c1'}.icon-language-css3:before{content:'\e8c2'}.icon-language-html5:before{content:'\e8c3'}.icon-language-javascript:before{content:'\e8c4'}.icon-language-python-text:before{content:'\e8c5'}.icon-language-python:before{content:'\e8c6'}.icon-laptop-chromebook:before{content:'\e8c7'}.icon-laptop-mac:before{content:'\e8c8'}.icon-laptop-windows:before{content:'\e8c9'}.icon-laptop:before{content:'\e8ca'}.icon-lastfm:before{content:'\e8cb'}.icon-launch:before{content:'\e8cc'}.icon-layers-off:before{content:'\e8cd'}.icon-layers:before{content:'\e8ce'}.icon-leaf:before{content:'\e8cf'}.icon-library-books:before{content:'\e8d0'}.icon-library-music:before{content:'\e8d1'}.icon-library-plus:before{content:'\e8d2'}.icon-library:before{content:'\e8d3'}.icon-lightbulb-outline:before{content:'\e8d4'}.icon-lightbulb:before{content:'\e8d5'}.icon-link-off:before{content:'\e8d6'}.icon-link-variant-off:before{content:'\e8d7'}.icon-link-variant:before{content:'\e8d8'}.icon-link:before{content:'\e8d9'}.icon-linkedin-box:before{content:'\e8da'}.icon-linkedin:before{content:'\e8db'}.icon-linode:before{content:'\e8dc'}.icon-linux:before{content:'\e8dd'}.icon-lock-outline:before{content:'\e8de'}.icon-lock-unlocked-outline:before{content:'\e8df'}.icon-lock-unlocked:before{content:'\e8e0'}.icon-lock:before{content:'\e8e1'}.icon-login:before{content:'\e8e2'}.icon-logout:before{content:'\e8e3'}.icon-looks:before{content:'\e8e4'}.icon-loupe:before{content:'\e8e5'}.icon-lumx:before{content:'\e8e6'}.icon-magnet-on:before{content:'\e8e7'}.icon-magnet:before{content:'\e8e8'}.icon-magnify-minus:before{content:'\e8e9'}.icon-magnify-plus:before{content:'\e8ea'}.icon-magnify:before{content:'\e8eb'}.icon-mail-ru:before{content:'\e8ec'}.icon-map-marker-circle:before{content:'\e8ed'}.icon-map-marker-multiple:before{content:'\e8ee'}.icon-map-marker-off:before{content:'\e8ef'}.icon-map-marker-radius:before{content:'\e8f0'}.icon-map-marker:before{content:'\e8f1'}.icon-map:before{content:'\e8f2'}.icon-margin:before{content:'\e8f3'}.icon-markdown:before{content:'\e8f4'}.icon-marker-check:before{content:'\e8f5'}.icon-martini:before{content:'\e8f6'}.icon-material-ui:before{content:'\e8f7'}.icon-maxcdn:before{content:'\e8f8'}.icon-medium:before{content:'\e8f9'}.icon-memory:before{content:'\e8fa'}.icon-menu-down:before{content:'\e8fb'}.icon-menu-left:before{content:'\e8fc'}.icon-menu-right:before{content:'\e8fd'}.icon-menu-up:before{content:'\e8fe'}.icon-menu:before{content:'\e8ff'}.icon-message-alert:before{content:'\e900'}.icon-message-draw:before{content:'\e901'}.icon-message-image:before{content:'\e902'}.icon-message-processing:before{content:'\e903'}.icon-message-reply:before{content:'\e904'}.icon-message-text-outline:before{content:'\e905'}.icon-message-text:before{content:'\e906'}.icon-message-video:before{content:'\e907'}.icon-message:before{content:'\e908'}.icon-microphone-dots:before{content:'\e909'}.icon-microphone-off:before{content:'\e90a'}.icon-microphone-outline:before{content:'\e90b'}.icon-microphone-settings:before{content:'\e90c'}.icon-microphone-variant-off:before{content:'\e90d'}.icon-microphone-variant:before{content:'\e90e'}.icon-microphone:before{content:'\e90f'}.icon-minus-box:before{content:'\e910'}.icon-minus-circle-outline:before{content:'\e911'}.icon-minus-circle:before{content:'\e912'}.icon-minus-network:before{content:'\e913'}.icon-minus:before{content:'\e914'}.icon-monitor-multiple:before{content:'\e915'}.icon-monitor:before{content:'\e916'}.icon-more:before{content:'\e917'}.icon-mouse-off:before{content:'\e918'}.icon-mouse-variant-off:before{content:'\e919'}.icon-mouse-variant:before{content:'\e91a'}.icon-mouse:before{content:'\e91b'}.icon-movie:before{content:'\e91c'}.icon-multiplication-box:before{content:'\e91d'}.icon-multiplication:before{content:'\e91e'}.icon-music-box-outline:before{content:'\e91f'}.icon-music-box:before{content:'\e920'}.icon-music-circle:before{content:'\e921'}.icon-music-note-eighth:before{content:'\e922'}.icon-music-note-half:before{content:'\e923'}.icon-music-note-off:before{content:'\e924'}.icon-music-note-quarter:before{content:'\e925'}.icon-music-note-sixteenth:before{content:'\e926'}.icon-music-note-whole:before{content:'\e927'}.icon-music-note:before{content:'\e928'}.icon-nature-people:before{content:'\e929'}.icon-nature:before{content:'\e92a'}.icon-navigation:before{content:'\e92b'}.icon-needle:before{content:'\e92c'}.icon-nest-protect:before{content:'\e92d'}.icon-nest-thermostat:before{content:'\e92e'}.icon-newspaper:before{content:'\e92f'}.icon-nfc-tap:before{content:'\e930'}.icon-nfc-variant:before{content:'\e931'}.icon-nfc:before{content:'\e932'}.icon-no:before{content:'\e933'}.icon-not-equal:before{content:'\e934'}.icon-note-outline:before{content:'\e935'}.icon-note-text:before{content:'\e936'}.icon-note:before{content:'\e937'}.icon-numeric-0-box-multiple-outline:before{content:'\e938'}.icon-numeric-0-box-outline:before{content:'\e939'}.icon-numeric-0-box:before{content:'\e93a'}.icon-numeric-1-box-multiple-outline:before{content:'\e93b'}.icon-numeric-1-box-outline:before{content:'\e93c'}.icon-numeric-1-box:before{content:'\e93d'}.icon-numeric-2-box-multiple-outline:before{content:'\e93e'}.icon-numeric-2-box-outline:before{content:'\e93f'}.icon-numeric-2-box:before{content:'\e940'}.icon-numeric-3-box-multiple-outline:before{content:'\e941'}.icon-numeric-3-box-outline:before{content:'\e942'}.icon-numeric-3-box:before{content:'\e943'}.icon-numeric-4-box-multiple-outline:before{content:'\e944'}.icon-numeric-4-box-outline:before{content:'\e945'}.icon-numeric-4-box:before{content:'\e946'}.icon-numeric-5-box-multiple-outline:before{content:'\e947'}.icon-numeric-5-box-outline:before{content:'\e948'}.icon-numeric-5-box:before{content:'\e949'}.icon-numeric-6-box-multiple-outline:before{content:'\e94a'}.icon-numeric-6-box-outline:before{content:'\e94b'}.icon-numeric-6-box:before{content:'\e94c'}.icon-numeric-7-box-multiple-outline:before{content:'\e94d'}.icon-numeric-7-box-outline:before{content:'\e94e'}.icon-numeric-7-box:before{content:'\e94f'}.icon-numeric-8-box-multiple-outline:before{content:'\e950'}.icon-numeric-8-box-outline:before{content:'\e951'}.icon-numeric-8-box:before{content:'\e952'}.icon-numeric-9-box-multiple-outline:before{content:'\e953'}.icon-numeric-9-box-outline:before{content:'\e954'}.icon-numeric-9-box:before{content:'\e955'}.icon-numeric-9-plus-box-multiple-outline:before{content:'\e956'}.icon-numeric-9-plus-box-outline:before{content:'\e957'}.icon-numeric-9-plus-box:before{content:'\e958'}.icon-numeric:before{content:'\e959'}.icon-nutriton:before{content:'\e95a'}.icon-odnoklassniki:before{content:'\e95b'}.icon-office:before{content:'\e95c'}.icon-oil:before{content:'\e95d'}.icon-omega:before{content:'\e95e'}.icon-onedrive:before{content:'\e95f'}.icon-open-in-app:before{content:'\e960'}.icon-open-in-new:before{content:'\e961'}.icon-ornament-variant:before{content:'\e962'}.icon-ornament:before{content:'\e963'}.icon-outbox:before{content:'\e964'}.icon-outdent:before{content:'\e965'}.icon-owl:before{content:'\e966'}.icon-package-down:before{content:'\e967'}.icon-package-up:before{content:'\e968'}.icon-package-variant-closed:before{content:'\e969'}.icon-package-variant:before{content:'\e96a'}.icon-package:before{content:'\e96b'}.icon-palette-advanced:before{content:'\e96c'}.icon-palette:before{content:'\e96d'}.icon-panda:before{content:'\e96e'}.icon-pandora:before{content:'\e96f'}.icon-panorama-fisheye:before{content:'\e970'}.icon-panorama-horizontal:before{content:'\e971'}.icon-panorama-vertical:before{content:'\e972'}.icon-panorama-wide-angle:before{content:'\e973'}.icon-panorama:before{content:'\e974'}.icon-paper-cut-vertical:before{content:'\e975'}.icon-paperclip:before{content:'\e976'}.icon-parking:before{content:'\e977'}.icon-pause-circle-outline:before{content:'\e978'}.icon-pause-circle:before{content:'\e979'}.icon-pause-octagon-outline:before{content:'\e97a'}.icon-pause-octagon:before{content:'\e97b'}.icon-pause:before{content:'\e97c'}.icon-paw:before{content:'\e97d'}.icon-pen:before{content:'\e97e'}.icon-pencil-box-outline:before{content:'\e97f'}.icon-pencil-box:before{content:'\e980'}.icon-pencil:before{content:'\e981'}.icon-people:before{content:'\e982'}.icon-percent:before{content:'\e983'}.icon-person-box:before{content:'\e984'}.icon-person-minus:before{content:'\e985'}.icon-person-plus:before{content:'\e986'}.icon-pharmacy:before{content:'\e987'}.icon-phone-bluetooth:before{content:'\e988'}.icon-phone-dots:before{content:'\e989'}.icon-phone-forward:before{content:'\e98a'}.icon-phone-hangup:before{content:'\e98b'}.icon-phone-in-talk:before{content:'\e98c'}.icon-phone-incoming:before{content:'\e98d'}.icon-phone-locked:before{content:'\e98e'}.icon-phone-log:before{content:'\e98f'}.icon-phone-missed:before{content:'\e990'}.icon-phone-outgoing:before{content:'\e991'}.icon-phone-paused:before{content:'\e992'}.icon-phone:before{content:'\e993'}.icon-picture:before{content:'\e994'}.icon-pig:before{content:'\e995'}.icon-pill:before{content:'\e996'}.icon-pin-off:before{content:'\e997'}.icon-pin:before{content:'\e998'}.icon-pine-tree-box:before{content:'\e999'}.icon-pine-tree:before{content:'\e99a'}.icon-pinterest-box:before{content:'\e99b'}.icon-pinterest:before{content:'\e99c'}.icon-pizza:before{content:'\e99d'}.icon-plane:before{content:'\e99e'}.icon-play-box-outline:before{content:'\e99f'}.icon-play-circle-outline:before{content:'\e9a0'}.icon-play-circle:before{content:'\e9a1'}.icon-play:before{content:'\e9a2'}.icon-playlist-minus:before{content:'\e9a3'}.icon-playlist-plus:before{content:'\e9a4'}.icon-playstation:before{content:'\e9a5'}.icon-plus-box:before{content:'\e9a6'}.icon-plus-circle-outline:before{content:'\e9a7'}.icon-plus-circle:before{content:'\e9a8'}.icon-plus-network:before{content:'\e9a9'}.icon-plus-one:before{content:'\e9aa'}.icon-plus:before{content:'\e9ab'}.icon-pocket:before{content:'\e9ac'}.icon-poll-box:before{content:'\e9ad'}.icon-poll:before{content:'\e9ae'}.icon-polymer:before{content:'\e9af'}.icon-popcorn:before{content:'\e9b0'}.icon-pound-box:before{content:'\e9b1'}.icon-pound:before{content:'\e9b2'}.icon-power-settings:before{content:'\e9b3'}.icon-power-socket:before{content:'\e9b4'}.icon-power:before{content:'\e9b5'}.icon-presentation-play:before{content:'\e9b6'}.icon-presentation:before{content:'\e9b7'}.icon-printer-3d:before{content:'\e9b8'}.icon-printer:before{content:'\e9b9'}.icon-pulse:before{content:'\e9ba'}.icon-puzzle:before{content:'\e9bb'}.icon-qrcode:before{content:'\e9bc'}.icon-quadcopter:before{content:'\e9bd'}.icon-quality-high:before{content:'\e9be'}.icon-question-mark-circle:before{content:'\e9bf'}.icon-quick-reply:before{content:'\e9c0'}.icon-quicktime:before{content:'\e9c1'}.icon-rabbit:before{content:'\e9c2'}.icon-radiator:before{content:'\e9c3'}.icon-radio-tower:before{content:'\e9c4'}.icon-radio:before{content:'\e9c5'}.icon-radioactive:before{content:'\e9c6'}.icon-radiobox-blank:before{content:'\e9c7'}.icon-radiobox-marked:before{content:'\e9c8'}.icon-raspberrypi:before{content:'\e9c9'}.icon-rdio:before{content:'\e9ca'}.icon-read:before{content:'\e9cb'}.icon-readability:before{content:'\e9cc'}.icon-receipt:before{content:'\e9cd'}.icon-recycle:before{content:'\e9ce'}.icon-reddit:before{content:'\e9cf'}.icon-redo-variant:before{content:'\e9d0'}.icon-redo:before{content:'\e9d1'}.icon-refresh:before{content:'\e9d2'}.icon-relative-scale:before{content:'\e9d3'}.icon-reload:before{content:'\e9d4'}.icon-remote:before{content:'\e9d5'}.icon-rename-box:before{content:'\e9d6'}.icon-repeat-off:before{content:'\e9d7'}.icon-repeat-once:before{content:'\e9d8'}.icon-repeat:before{content:'\e9d9'}.icon-replay:before{content:'\e9da'}.icon-reply-all:before{content:'\e9db'}.icon-reply:before{content:'\e9dc'}.icon-reproduction:before{content:'\e9dd'}.icon-resize-bottom-right:before{content:'\e9de'}.icon-responsive:before{content:'\e9df'}.icon-restore:before{content:'\e9e0'}.icon-rewind:before{content:'\e9e1'}.icon-ribbon:before{content:'\e9e2'}.icon-road:before{content:'\e9e3'}.icon-rocket:before{content:'\e9e4'}.icon-rotate-3d:before{content:'\e9e5'}.icon-rotate-left-variant:before{content:'\e9e6'}.icon-rotate-left:before{content:'\e9e7'}.icon-rotate-right-variant:before{content:'\e9e8'}.icon-rotate-right:before{content:'\e9e9'}.icon-routes:before{content:'\e9ea'}.icon-rss-box:before{content:'\e9eb'}.icon-ruler:before{content:'\e9ec'}.icon-run:before{content:'\e9ed'}.icon-sale:before{content:'\e9ee'}.icon-satellite-variant:before{content:'\e9ef'}.icon-satellite:before{content:'\e9f0'}.icon-scale-bathroom:before{content:'\e9f1'}.icon-scale:before{content:'\e9f2'}.icon-school:before{content:'\e9f3'}.icon-screen-rotation-lock:before{content:'\e9f4'}.icon-screen-rotation:before{content:'\e9f5'}.icon-script:before{content:'\e9f6'}.icon-security-network:before{content:'\e9f7'}.icon-security:before{content:'\e9f8'}.icon-select-all:before{content:'\e9f9'}.icon-select-inverse:before{content:'\e9fa'}.icon-select-off:before{content:'\e9fb'}.icon-select:before{content:'\e9fc'}.icon-send:before{content:'\e9fd'}.icon-server-minus:before{content:'\e9fe'}.icon-server-network-off:before{content:'\e9ff'}.icon-server-network:before{content:'\ea00'}.icon-server-off:before{content:'\ea01'}.icon-server-plus:before{content:'\ea02'}.icon-server-remove:before{content:'\ea03'}.icon-server-security:before{content:'\ea04'}.icon-server:before{content:'\ea05'}.icon-shape-plus:before{content:'\ea06'}.icon-share-variant:before{content:'\ea07'}.icon-share:before{content:'\ea08'}.icon-shield-outline:before{content:'\ea09'}.icon-shield:before{content:'\ea0a'}.icon-shopping-music:before{content:'\ea0b'}.icon-shopping:before{content:'\ea0c'}.icon-shuffle:before{content:'\ea0d'}.icon-sigma:before{content:'\ea0e'}.icon-sign-caution:before{content:'\ea0f'}.icon-signal:before{content:'\ea10'}.icon-silverware-fork:before{content:'\ea11'}.icon-silverware-spoon:before{content:'\ea12'}.icon-silverware-variant:before{content:'\ea13'}.icon-silverware:before{content:'\ea14'}.icon-sim-alert:before{content:'\ea15'}.icon-sim:before{content:'\ea16'}.icon-sitemap:before{content:'\ea17'}.icon-skip-next:before{content:'\ea18'}.icon-skip-previous:before{content:'\ea19'}.icon-skype-business:before{content:'\ea1a'}.icon-skype:before{content:'\ea1b'}.icon-sleep-off:before{content:'\ea1c'}.icon-sleep:before{content:'\ea1d'}.icon-smoking-off:before{content:'\ea1e'}.icon-smoking:before{content:'\ea1f'}.icon-snapchat:before{content:'\ea20'}.icon-snowman:before{content:'\ea21'}.icon-sofa:before{content:'\ea22'}.icon-sort-alphabetical:before{content:'\ea23'}.icon-sort-ascending:before{content:'\ea24'}.icon-sort-descending:before{content:'\ea25'}.icon-sort-numeric:before{content:'\ea26'}.icon-sort-variant:before{content:'\ea27'}.icon-sort:before{content:'\ea28'}.icon-soundcloud:before{content:'\ea29'}.icon-source-fork:before{content:'\ea2a'}.icon-source-pull:before{content:'\ea2b'}.icon-speaker-off:before{content:'\ea2c'}.icon-speaker:before{content:'\ea2d'}.icon-speedometer:before{content:'\ea2e'}.icon-spellcheck:before{content:'\ea2f'}.icon-spotify:before{content:'\ea30'}.icon-spotlight-beam:before{content:'\ea31'}.icon-spotlight:before{content:'\ea32'}.icon-spreadsheet:before{content:'\ea33'}.icon-square-inc-cash:before{content:'\ea34'}.icon-square-inc:before{content:'\ea35'}.icon-stackoverflow:before{content:'\ea36'}.icon-star-circle:before{content:'\ea37'}.icon-star-half:before{content:'\ea38'}.icon-star-of-david:before{content:'\ea39'}.icon-star-outline:before{content:'\ea3a'}.icon-star:before{content:'\ea3b'}.icon-steam:before{content:'\ea3c'}.icon-stethoscope:before{content:'\ea3d'}.icon-stocking:before{content:'\ea3e'}.icon-stop:before{content:'\ea3f'}.icon-store-24-hour:before{content:'\ea40'}.icon-store:before{content:'\ea41'}.icon-stove:before{content:'\ea42'}.icon-subway:before{content:'\ea43'}.icon-sunglasses:before{content:'\ea44'}.icon-swap-horizontal:before{content:'\ea45'}.icon-swap-vertical:before{content:'\ea46'}.icon-swim:before{content:'\ea47'}.icon-sword:before{content:'\ea48'}.icon-sync-alert:before{content:'\ea49'}.icon-sync-off:before{content:'\ea4a'}.icon-sync:before{content:'\ea4b'}.icon-tab-unselected:before{content:'\ea4c'}.icon-tab:before{content:'\ea4d'}.icon-table-column-plus-after:before{content:'\ea4e'}.icon-table-column-plus-before:before{content:'\ea4f'}.icon-table-column-remove:before{content:'\ea50'}.icon-table-column-width:before{content:'\ea51'}.icon-table-edit:before{content:'\ea52'}.icon-table-large:before{content:'\ea53'}.icon-table-row-height:before{content:'\ea54'}.icon-table-row-plus-after:before{content:'\ea55'}.icon-table-row-plus-before:before{content:'\ea56'}.icon-table-row-remove:before{content:'\ea57'}.icon-table:before{content:'\ea58'}.icon-tablet-android:before{content:'\ea59'}.icon-tablet-ipad:before{content:'\ea5a'}.icon-tablet:before{content:'\ea5b'}.icon-tag-faces:before{content:'\ea5c'}.icon-tag-multiple:before{content:'\ea5d'}.icon-tag-outline:before{content:'\ea5e'}.icon-tag-text-outline:before{content:'\ea5f'}.icon-tag:before{content:'\ea60'}.icon-taxi:before{content:'\ea61'}.icon-teamviewer:before{content:'\ea62'}.icon-telegram:before{content:'\ea63'}.icon-television-guide:before{content:'\ea64'}.icon-television:before{content:'\ea65'}.icon-temperature-celsius:before{content:'\ea66'}.icon-temperature-fahrenheit:before{content:'\ea67'}.icon-temperature-kelvin:before{content:'\ea68'}.icon-tennis:before{content:'\ea69'}.icon-tent:before{content:'\ea6a'}.icon-terrain:before{content:'\ea6b'}.icon-text-to-speech-off:before{content:'\ea6c'}.icon-text-to-speech:before{content:'\ea6d'}.icon-texture:before{content:'\ea6e'}.icon-theater:before{content:'\ea6f'}.icon-theme-light-dark:before{content:'\ea70'}.icon-thermometer-lines:before{content:'\ea71'}.icon-thermometer:before{content:'\ea72'}.icon-thumb-down-outline:before{content:'\ea73'}.icon-thumb-down:before{content:'\ea74'}.icon-thumb-up-outline:before{content:'\ea75'}.icon-thumb-up:before{content:'\ea76'}.icon-thumbs-up-down:before{content:'\ea77'}.icon-ticket-account:before{content:'\ea78'}.icon-ticket:before{content:'\ea79'}.icon-tie:before{content:'\ea7a'}.icon-tile-four:before{content:'\ea7b'}.icon-timelapse:before{content:'\ea7c'}.icon-timer-3:before{content:'\ea7d'}.icon-timer-10:before{content:'\ea7e'}.icon-timer-off:before{content:'\ea7f'}.icon-timer-sand:before{content:'\ea80'}.icon-timer:before{content:'\ea81'}.icon-timetable:before{content:'\ea82'}.icon-toggle-switch-off:before{content:'\ea83'}.icon-toggle-switch-on:before{content:'\ea84'}.icon-tooltip-edit:before{content:'\ea85'}.icon-tooltip-image:before{content:'\ea86'}.icon-tooltip-outline-plus:before{content:'\ea87'}.icon-tooltip-outline:before{content:'\ea88'}.icon-tooltip-text:before{content:'\ea89'}.icon-tooltip:before{content:'\ea8a'}.icon-tor:before{content:'\ea8b'}.icon-traffic-light:before{content:'\ea8c'}.icon-train:before{content:'\ea8d'}.icon-tram:before{content:'\ea8e'}.icon-transcribe-close:before{content:'\ea8f'}.icon-transcribe:before{content:'\ea90'}.icon-transfer:before{content:'\ea91'}.icon-trash:before{content:'\ea92'}.icon-tree:before{content:'\ea93'}.icon-trello:before{content:'\ea94'}.icon-trending-down:before{content:'\ea95'}.icon-trending-neutral:before{content:'\ea96'}.icon-trending-up:before{content:'\ea97'}.icon-truck:before{content:'\ea98'}.icon-tshirt-crew:before{content:'\ea99'}.icon-tshirt-v:before{content:'\ea9a'}.icon-tumblr-reblog:before{content:'\ea9b'}.icon-tumblr:before{content:'\ea9c'}.icon-twitch:before{content:'\ea9d'}.icon-twitter-box:before{content:'\ea9e'}.icon-twitter-circle:before{content:'\ea9f'}.icon-twitter-retweet:before{content:'\eaa0'}.icon-twitter:before{content:'\eaa1'}.icon-ubuntu:before{content:'\eaa2'}.icon-umbrella-outline:before{content:'\eaa3'}.icon-umbrella:before{content:'\eaa4'}.icon-undo-variant:before{content:'\eaa5'}.icon-undo:before{content:'\eaa6'}.icon-unfold-less:before{content:'\eaa7'}.icon-unfold-more:before{content:'\eaa8'}.icon-ungroup:before{content:'\eaa9'}.icon-untappd:before{content:'\eaaa'}.icon-upload:before{content:'\eaab'}.icon-usb:before{content:'\eaac'}.icon-vector-curve:before{content:'\eaad'}.icon-vector-point:before{content:'\eaae'}.icon-vector-square:before{content:'\eaaf'}.icon-verified:before{content:'\eab0'}.icon-vibration:before{content:'\eab1'}.icon-video-off:before{content:'\eab2'}.icon-video-switch:before{content:'\eab3'}.icon-video:before{content:'\eab4'}.icon-view-agenda:before{content:'\eab5'}.icon-view-array:before{content:'\eab6'}.icon-view-carousel:before{content:'\eab7'}.icon-view-column:before{content:'\eab8'}.icon-view-dashboard:before{content:'\eab9'}.icon-view-day:before{content:'\eaba'}.icon-view-headline:before{content:'\eabb'}.icon-view-list:before{content:'\eabc'}.icon-view-module:before{content:'\eabd'}.icon-view-quilt:before{content:'\eabe'}.icon-view-stream:before{content:'\eabf'}.icon-view-week:before{content:'\eac0'}.icon-vimeo:before{content:'\eac1'}.icon-vine:before{content:'\eac2'}.icon-vk-box:before{content:'\eac3'}.icon-vk-circle:before{content:'\eac4'}.icon-vk:before{content:'\eac5'}.icon-voicemail:before{content:'\eac6'}.icon-volume-high:before{content:'\eac7'}.icon-volume-low:before{content:'\eac8'}.icon-volume-medium:before{content:'\eac9'}.icon-volume-off:before{content:'\eaca'}.icon-volume:before{content:'\eacb'}.icon-vpn:before{content:'\eacc'}.icon-walk:before{content:'\eacd'}.icon-wallet-giftcard:before{content:'\eace'}.icon-wallet-membership:before{content:'\eacf'}.icon-wallet-travel:before{content:'\ead0'}.icon-wallet:before{content:'\ead1'}.icon-washing-machine:before{content:'\ead2'}.icon-watch-export:before{content:'\ead3'}.icon-watch-import:before{content:'\ead4'}.icon-watch:before{content:'\ead5'}.icon-water-off:before{content:'\ead6'}.icon-water-pump:before{content:'\ead7'}.icon-water:before{content:'\ead8'}.icon-weather-cloudy:before{content:'\ead9'}.icon-weather-fog:before{content:'\eada'}.icon-weather-hail:before{content:'\eadb'}.icon-weather-lightning:before{content:'\eadc'}.icon-weather-night:before{content:'\eadd'}.icon-weather-partlycloudy:before{content:'\eade'}.icon-weather-pouring:before{content:'\eadf'}.icon-weather-rainy:before{content:'\eae0'}.icon-weather-snowy:before{content:'\eae1'}.icon-weather-sunny:before{content:'\eae2'}.icon-weather-sunset-down:before{content:'\eae3'}.icon-weather-sunset-up:before{content:'\eae4'}.icon-weather-sunset:before{content:'\eae5'}.icon-weather-windy-variant:before{content:'\eae6'}.icon-weather-windy:before{content:'\eae7'}.icon-web:before{content:'\eae8'}.icon-webcam:before{content:'\eae9'}.icon-weight-kilogram:before{content:'\eaea'}.icon-weight:before{content:'\eaeb'}.icon-whatsapp:before{content:'\eaec'}.icon-wheelchair-accessibility:before{content:'\eaed'}.icon-white-balance-auto:before{content:'\eaee'}.icon-white-balance-incandescent:before{content:'\eaef'}.icon-white-balance-irradescent:before{content:'\eaf0'}.icon-white-balance-sunny:before{content:'\eaf1'}.icon-wifi:before{content:'\eaf2'}.icon-wii:before{content:'\eaf3'}.icon-wikipedia:before{content:'\eaf4'}.icon-window-close:before{content:'\eaf5'}.icon-window-closed:before{content:'\eaf6'}.icon-window-maximize:before{content:'\eaf7'}.icon-window-minimize:before{content:'\eaf8'}.icon-window-open:before{content:'\eaf9'}.icon-window-restore:before{content:'\eafa'}.icon-windows:before{content:'\eafb'}.icon-wordpress:before{content:'\eafc'}.icon-worker:before{content:'\eafd'}.icon-wunderlist:before{content:'\eafe'}.icon-xbox-controller-off:before{content:'\eaff'}.icon-xbox-controller:before{content:'\eb00'}.icon-xbox:before{content:'\eb01'}.icon-xda:before{content:'\eb02'}.icon-xml:before{content:'\eb03'}.icon-yeast:before{content:'\eb04'}.icon-yelp:before{content:'\eb05'}.icon-youtube-play:before{content:'\eb06'}.icon-youtube:before{content:'\eb07'}.icon-zip-box:before{content:'\eb08'}.avatar{width:40px;min-width:40px;height:40px;line-height:40px;margin:0 8px 0 0;border-radius:50%;font-size:17px;font-weight:500;text-align:center;color:#fff}.avatar.square{border-radius:0}.avatar.small{width:20px;min-width:20px;height:20px;line-height:20px}.avatar.big{width:72px;min-width:72px;height:72px;line-height:72px}.avatar.huge{width:96px;min-width:96px;height:96px;line-height:96px}.form-wrapper{background:#fff;padding:16px}.form-wrapper .form-title{font-size:21px;padding:8px 0}.navigation-simple .item{position:relative;cursor:pointer;text-align:left;margin:0;padding:0 24px;text-transform:none;line-height:48px;max-height:48px;height:48px}.navigation-simple .item md-icon{margin:0 16px 0 0}.navigation-simple .item .title{font-size:13px;font-weight:500;line-height:1}.navigation-simple .item.selected{background-color:rgba(0,0,0,.06)}.navigation-simple .subheader{font-size:13px;border-top:1px solid rgba(0,0,0,.12);font-weight:500;margin-top:8px}.navigation-simple .subheader.light{border-top:1px solid rgba(255,255,255,.12)}.navigation-simple md-divider{margin:8px 0}.simple-pagination{position:relative;display:inline-flex;flex-direction:row;box-shadow:0 1px 3px 0 rgba(0,0,0,.2),0 1px 1px 0 rgba(0,0,0,.14),0 2px 1px -1px rgba(0,0,0,.12);background-color:#fff;padding:0 8px}.simple-pagination .pagination-item{min-width:48px;min-height:56px;line-height:56px;border-radius:0;margin:0;font-weight:400;color:rgba(0,0,0,.54)}.simple-pagination .pagination-item:hover{color:rgba(0,0,0,.87)}.simple-pagination .pagination-item.active{cursor:default;color:rgba(0,0,0,.87)}.simple-pagination .pagination-item.disabled{cursor:default;color:rgba(0,0,0,.26)}.price-tables .price-table{position:relative;background-color:#fff;width:280px;border-radius:2px;margin:24px 24px 0 0;overflow:hidden}.price-tables .price-table.style-1 .package-type{font-size:17px;padding:16px 24px}.price-tables .price-table.style-1 .package-type .sale{font-size:13px;font-weight:600}.price-tables .price-table.style-1 .price{padding:32px 32px 16px 32px}.price-tables .price-table.style-1 .price .currency{padding-right:4px;font-size:24px;font-weight:500;color:rgba(0,0,0,.54)}.price-tables .price-table.style-1 .price .value{font-size:72px;font-weight:300;line-height:1}.price-tables .price-table.style-1 .price .period{padding:0 0 5px 4px;font-size:17px;color:rgba(0,0,0,.54)}.price-tables .price-table.style-1 md-divider{margin:16px 32px}.price-tables .price-table.style-1 .terms{padding:16px 32px;font-size:15px}.price-tables .price-table.style-1 .cta-button{margin:16px auto 32px auto;width:128px}.price-tables .price-table.style-2 .badge{position:absolute;top:0;left:50%;transform:translateX(-50%);font-size:11px;font-weight:500;padding:6px 8px}.price-tables .price-table.style-2 .package-type{padding:48px 32px 24px 32px;font-size:20px;font-weight:500;text-align:center}.price-tables .price-table.style-2 .price{padding:0 32px 8px 32px}.price-tables .price-table.style-2 .price .currency{padding-right:4px;font-size:24px;font-weight:500;color:rgba(0,0,0,.54)}.price-tables .price-table.style-2 .price .value{font-size:56px;font-weight:300;line-height:1}.price-tables .price-table.style-2 .period{padding:0 32px;font-size:15px;font-weight:500;color:rgba(0,0,0,.54);text-align:center}.price-tables .price-table.style-2 .terms{padding:32px;font-size:15px}.price-tables .price-table.style-2 .terms .term{padding-bottom:8px}.price-tables .price-table.style-2 .terms .term:last-child{padding-bottom:0}.price-tables .price-table.style-2 .cta-button{margin:8px auto 32px auto;width:128px}.price-tables .price-table.style-3 .package-type{padding:32px;text-align:center}.price-tables .price-table.style-3 .package-type .title{font-size:34px}.price-tables .price-table.style-3 .package-type .subtitle{font-size:17px;color:rgba(0,0,0,.54);font-weight:500}.price-tables .price-table.style-3 .price{padding:16px 32px}.price-tables .price-table.style-3 .price .currency{padding-right:4px;font-size:15px;font-weight:500}.price-tables .price-table.style-3 .price .value{font-size:34px;font-weight:300;line-height:1}.price-tables .price-table.style-3 .price .period{padding-left:4px;text-align:center}.price-tables .price-table.style-3 .terms{margin:32px;font-size:15px;color:rgba(0,0,0,.54)}.price-tables .price-table.style-3 .terms .term{padding-bottom:16px}.price-tables .price-table.style-3 .terms .term:last-child{padding-bottom:0}.price-tables .price-table.style-3 .cta-button{margin:8px 32px}.price-tables .price-table.style-3 .note{padding:8px 32px 16px 32px;text-align:center;color:rgba(0,0,0,.54)}.simple-table-container{background:#fff}.simple-table-container .table-title{font-size:20px;padding:24px}table.simple{width:100%;border:none;border-spacing:0;text-align:left}table.simple thead tr th{padding:16px 8px;font-weight:500;color:rgba(0,0,0,.54);border-bottom:1px solid rgba(0,0,0,.12);white-space:nowrap;min-width:120px}table.simple thead tr th:first-child{padding-left:24px}table.simple thead tr th:last-child{padding-right:24px}table.simple tbody tr td{padding:16px 8px;border-bottom:1px solid rgba(0,0,0,.12)}table.simple tbody tr td:first-child{padding-left:24px}table.simple tbody tr td:last-child{padding-right:24px}table.simple tbody tr:last-child td{border-bottom:none}table.simple.clickable tbody tr{cursor:pointer}table.simple.clickable tbody tr:hover{background:rgba(0,0,0,.03)}html{font-size:62.5%;font-family:Roboto,"Helvetica Neue",Arial,sans-serif;line-height:1.4;letter-spacing:-.1px}body{font-size:1.3rem}body,html{-webkit-font-smoothing:auto;-moz-osx-font-smoothing:auto}form{font-size:1.6rem}.h1,.h2,.h3,.h4,.h5,.h6,h1,h2,h3,h4,h5,h6{font-weight:400}.h1,h1{font-size:2.4rem}.h2,h2{font-size:2rem}.h3,h3{font-size:1.6rem}.h4,h4{font-size:1.4rem}.h5,h5{font-size:1.3rem}.h6,h6{font-size:1.2rem}a{text-decoration:none}a:active,a:hover{text-decoration:underline}abbr{cursor:help;border-bottom:1px dotted rgba(0,0,0,.54)}blockquote{border-left:3px solid rgba(0,0,0,.12);font-style:italic;margin:1em 0;padding-left:16px}blockquote footer{font-style:normal}blockquote footer:before{content:'\2014 \00A0'}blockquote.reverse{border-left:none;border-right:3px solid rgba(0,0,0,.12);text-align:right;padding-left:0;padding-right:16px}blockquote.reverse footer:before{content:''}blockquote.reverse footer:after{content:'\2014 \00A0'}code{font-family:Monaco,Menlo,Consolas,"Ubuntu Mono",monospace}code:not(.highlight){background:rgba(0,0,0,.065);color:#106cc8;margin:0 1px;padding:2px 3px;border-radius:2px}dl dt{font-weight:700}dl dd{margin:4px 0 16px 0}mark{background:#f7f49a}pre{line-height:1.6;margin:8px 16px;white-space:pre-wrap}small{font-size:80%}table thead tr th{text-align:left}.text-italic{font-style:italic}.text-semibold{font-weight:600}.text-bold,strong{font-weight:700}.text-strike{text-decoration:line-through}.text-super{vertical-align:super}.text-sub{vertical-align:sub}.text-capitalize{text-transform:capitalize}.text-lowercase{text-transform:lowercase}.text-uppercase{text-transform:uppercase}.text-left{text-align:left}.text-center{text-align:center}.text-right{text-align:right}.font-weight-100{font-weight:100}.font-weight-200{font-weight:200}.font-weight-300{font-weight:300}.font-weight-400{font-weight:400}.font-weight-500{font-weight:500}.font-weight-600{font-weight:600}.font-weight-700{font-weight:700}.font-weight-800{font-weight:800}.font-weight-900{font-weight:900}.font-size-2{font-size:2px}.font-size-4{font-size:4px}.font-size-6{font-size:6px}.font-size-8{font-size:8px}.font-size-10{font-size:10px}.font-size-12{font-size:12px}.font-size-14{font-size:14px}.font-size-16{font-size:16px}.font-size-18{font-size:18px}.font-size-20{font-size:20px}.font-size-22{font-size:22px}.font-size-24{font-size:24px}.font-size-26{font-size:26px}.font-size-28{font-size:28px}.font-size-30{font-size:30px}.font-size-32{font-size:32px}.font-size-34{font-size:34px}.font-size-36{font-size:36px}.font-size-38{font-size:38px}.font-size-40{font-size:40px}.font-size-42{font-size:42px}.font-size-44{font-size:44px}.font-size-46{font-size:46px}.font-size-48{font-size:48px}.font-size-50{font-size:50px}.font-size-52{font-size:52px}.font-size-54{font-size:54px}.font-size-56{font-size:56px}.font-size-58{font-size:58px}.font-size-60{font-size:60px}.font-size-62{font-size:62px}.font-size-64{font-size:64px}.font-size-66{font-size:66px}.font-size-68{font-size:68px}.font-size-70{font-size:70px}.font-size-72{font-size:72px}.font-size-74{font-size:74px}.font-size-76{font-size:76px}.font-size-78{font-size:78px}.font-size-80{font-size:80px}.font-size-82{font-size:82px}.font-size-84{font-size:84px}.font-size-86{font-size:86px}.font-size-88{font-size:88px}.font-size-90{font-size:90px}.font-size-92{font-size:92px}.font-size-94{font-size:94px}.font-size-96{font-size:96px}.font-size-98{font-size:98px}.font-size-100{font-size:100px}.font-size-102{font-size:102px}.font-size-104{font-size:104px}.font-size-106{font-size:106px}.font-size-108{font-size:108px}.font-size-110{font-size:110px}.font-size-112{font-size:112px}.font-size-114{font-size:114px}.font-size-116{font-size:116px}.font-size-118{font-size:118px}.font-size-120{font-size:120px}.line-height-2{line-height:2px}.line-height-4{line-height:4px}.line-height-6{line-height:6px}.line-height-8{line-height:8px}.line-height-10{line-height:10px}.line-height-12{line-height:12px}.line-height-14{line-height:14px}.line-height-16{line-height:16px}.line-height-18{line-height:18px}.line-height-20{line-height:20px}.line-height-22{line-height:22px}.line-height-24{line-height:24px}.line-height-26{line-height:26px}.line-height-28{line-height:28px}.line-height-30{line-height:30px}.line-height-32{line-height:32px}.line-height-34{line-height:34px}.line-height-36{line-height:36px}.line-height-38{line-height:38px}.line-height-40{line-height:40px}.line-height-42{line-height:42px}.line-height-44{line-height:44px}.line-height-46{line-height:46px}.line-height-48{line-height:48px}.line-height-50{line-height:50px}.line-height-52{line-height:52px}.line-height-54{line-height:54px}.line-height-56{line-height:56px}.line-height-58{line-height:58px}.line-height-60{line-height:60px}.line-height-62{line-height:62px}.line-height-64{line-height:64px}.line-height-66{line-height:66px}.line-height-68{line-height:68px}.line-height-70{line-height:70px}.line-height-72{line-height:72px}.line-height-74{line-height:74px}.line-height-76{line-height:76px}.line-height-78{line-height:78px}.line-height-80{line-height:80px}.line-height-82{line-height:82px}.line-height-84{line-height:84px}.line-height-86{line-height:86px}.line-height-88{line-height:88px}.line-height-90{line-height:90px}.line-height-92{line-height:92px}.line-height-94{line-height:94px}.line-height-96{line-height:96px}.line-height-98{line-height:98px}.line-height-100{line-height:100px}.line-height-102{line-height:102px}.line-height-104{line-height:104px}.line-height-106{line-height:106px}.line-height-108{line-height:108px}.line-height-110{line-height:110px}.line-height-112{line-height:112px}.line-height-114{line-height:114px}.line-height-116{line-height:116px}.line-height-118{line-height:118px}.line-height-120{line-height:120px}.text-boxed,.text-boxed-light{border-radius:2px;padding:4px 8px;margin:0 8px;font-size:11px;font-weight:500;color:rgba(0,0,0,.54);background-color:rgba(0,0,0,.12);white-space:nowrap}.text-boxed-light{background-color:rgba(255,255,255,.7)}.text-truncate{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.text-nowrap{white-space:nowrap}html,html *{scrollbar-width:thin;scrollbar-color:rgba(128,128,128,.25) rgba(128,128,128,.25)}::-webkit-scrollbar{width:8px;height:8px;background-color:transparent;box-shadow:none}::-webkit-scrollbar:hover{background-color:transparent}::-webkit-scrollbar-thumb{min-height:8px;min-width:8px;background-color:rgba(128,128,128,.25);box-shadow:none}::-webkit-scrollbar-thumb:hover{background-color:rgba(128,128,128,.125)}::-webkit-scrollbar-thumb:active{background-color:rgba(128,128,128,.15)}.angular-google-map-container{height:400px}.moment-picker .moment-picker-container{width:296px;border:none;border-radius:2px;box-shadow:0 2px 4px -1px rgba(0,0,0,.2),0 4px 5px 0 rgba(0,0,0,.14),0 1px 10px 0 rgba(0,0,0,.12);margin-left:0;padding:8px}.moment-picker .moment-picker-container td,.moment-picker .moment-picker-container th{min-width:0;width:40px;height:40px;padding:8px;text-shadow:none;border-radius:35px}.moment-picker .moment-picker-container td:hover,.moment-picker .moment-picker-container th:hover{background:#f5f5f5;background-image:none}.moment-picker .moment-picker-container td.selected{background:#03a9f4;background-image:none}.moment-picker .moment-picker-container .header-view th{border-radius:0;white-space:nowrap;width:auto}.moment-picker .moment-picker-container .header-view th:first-child,.moment-picker .moment-picker-container .header-view th:last-child{width:20%}.c3{transition:all .3s ease}.c3 svg{font:12px RobotoDraft,Roboto,'Helvetica Neue',sans-serif}.c3 line,.c3 path{fill:none;stroke:#000}.c3 text{font-family:Roboto,"Helvetica Neue",Arial,sans-serif;user-select:none}.c3 .c3-bars path,.c3 .c3-event-rect,.c3 .c3-legend-item-tile,.c3 .c3-xgrid-focus,.c3 .c3-ygrid{shape-rendering:crispEdges}.c3 .c3-chart-line{transition:all .3s ease}.c3 .c3-line{stroke-width:1px}.c3.stroke-3 .c3-line{stroke-width:3px}.c3.stroke-2 .c3-line{stroke-width:2px}.c3 .c3-circle{transition:all .3s ease;stroke:#fff;stroke-width:2}.c3 .c3-circle._expanded_{stroke-width:3;stroke:#fff}.c3 .c3-chart-arc path{stroke:#fff}.c3 .c3-chart-arc text{fill:#fff;font-size:13px}.c3 .c3-grid line{stroke:rgba(0,0,0,.04);stroke-width:1px;stroke-dasharray:0}.c3 .c3-grid text{fill:#aaa}.c3 .c3-axis .tick{stroke-width:0}.c3 .c3-axis text{fill:rgba(0,0,0,.33)}.c3 .c3-axis line,.c3 .c3-axis path{stroke:rgba(0,0,0,.04)}.c3 .c3-xgrid,.c3 .c3-ygrid{stroke-dasharray:0 0}.c3 .c3-text.c3-empty{fill:grey;font-size:2em}.c3 .c3-bar{stroke-width:0}.c3 .c3-bar._expanded_{fill-opacity:.75}.c3 .c3-target.c3-focused{opacity:1}.c3 .c3-target.c3-focused .c3-target.c3-focused path.c3-step,.c3 .c3-target.c3-focused path.c3-line{stroke-width:3px;transition:all .3s ease}.c3 .c3-target.c3-defocused{opacity:.3!important}.c3 .c3-region{fill:#4682b4;fill-opacity:.1}.c3 .c3-brush .extent{fill-opacity:.1}.c3 .c3-legend-item{font-size:12px}.c3 .c3-legend-item-hidden{opacity:.15}.c3 .c3-legend-background{opacity:.75;fill:#fff;stroke:#d3d3d3;stroke-width:1}.c3 .c3-tooltip-container{z-index:10}.c3 .c3-tooltip{border-collapse:collapse;border-spacing:0;background-color:#fff;empty-cells:show;box-shadow:0 2px 4px -1px rgba(0,0,0,.14),0 4px 5px 0 rgba(0,0,0,.098),0 1px 10px 0 rgba(0,0,0,.084);opacity:1;border-radius:2px;overflow:hidden;padding:4px 0}.c3 .c3-tooltip tr{border:none}.c3 .c3-tooltip th{background-color:transparent;font-size:14px;font-weight:400;padding:8px 12px;text-align:left;color:rgba(0,0,0,.54)}.c3 .c3-tooltip td{font-size:13px;padding:4px 12px!important;background-color:#fff;border-left:none;color:rgba(0,0,0,.84)}.c3 .c3-tooltip td>span{display:inline-block;width:10px;height:10px;margin-right:6px}.c3 .c3-tooltip td.value{font-size:14px!important;text-align:right;color:rgba(0,0,0,.84)}.c3 .c3-area{stroke-width:0;opacity:.2}.c3 .c3-chart-arcs-title{dominant-baseline:middle;font-size:1.3em}.c3 .c3-chart-arcs .c3-chart-arcs-background{fill:#e0e0e0;stroke:none}.c3 .c3-chart-arcs .c3-chart-arcs-gauge-unit{fill:#000;font-size:16px}.c3 .c3-chart-arcs .c3-chart-arcs-gauge-max{fill:#777}.c3 .c3-chart-arcs .c3-chart-arcs-gauge-min{fill:#777}.c3 .c3-chart-arc .c3-gauge-value{fill:#000}.ct-label{font-size:13px}.ct-chart-donut .ct-label,.ct-chart-pie .ct-label{font-size:13px}.bar-legend,.chart-legend,.doughnut-legend,.line-legend,.pie-legend,.polararea-legend,.radar-legend{margin-top:15px}table.dataTable{width:100%;margin:0 auto;clear:both;border-spacing:0}table.dataTable thead tr{background:#fff}table.dataTable thead th{text-align:left;vertical-align:middle;border-bottom:1px solid rgba(0,0,0,.12);padding:16px 8px}table.dataTable thead th:first-child{padding-left:24px}table.dataTable thead th:last-child{border-right:none;padding-right:24px}table.dataTable thead th:active{outline:0}table.dataTable thead th.dt-head-left{text-align:left}table.dataTable thead th.dt-head-center{text-align:center}table.dataTable thead th.dt-head-right{text-align:right}table.dataTable thead th.dt-head-justify{text-align:justify}table.dataTable thead th.dt-head-nowrap{white-space:nowrap}table.dataTable thead th .table-header .column-title{display:block;font-weight:600;white-space:nowrap}table.dataTable thead th .table-header .selectize-control{margin-top:15px}table.dataTable thead th .table-header .selectize-control.single .selectize-input{padding:7px 10px}table.dataTable thead th .table-header .selectize-control.single .selectize-input:after{right:10px;border-width:5px 4px 0 4px;border-color:rgba(0,0,0,.12) transparent transparent transparent}table.dataTable thead th .table-header .column-search-input{display:inline-block;margin-top:15px;width:100%;height:33px}table.dataTable thead td{padding:15px;vertical-align:middle}table.dataTable thead td:active{outline:0}table.dataTable thead td.dt-head-left{text-align:left}table.dataTable thead td.dt-head-center{text-align:center}table.dataTable thead td.dt-head-right{text-align:right}table.dataTable thead td.dt-head-justify{text-align:justify}table.dataTable thead td.dt-head-nowrap{white-space:nowrap}table.dataTable thead .sorting,table.dataTable thead .sorting_asc,table.dataTable thead .sorting_desc{background:0 0}table.dataTable thead .sorting .table-header .column-title,table.dataTable thead .sorting_asc .table-header .column-title,table.dataTable thead .sorting_desc .table-header .column-title{cursor:pointer}table.dataTable thead .sorting .table-header .column-title:after,table.dataTable thead .sorting_asc .table-header .column-title:after,table.dataTable thead .sorting_desc .table-header .column-title:after{position:relative;font-family:icomoon;font-weight:400;margin-left:10px;top:2px;font-size:16px;color:rgba(0,0,0,.54)}table.dataTable thead .sorting .table-header .column-title:after{content:'\eaa8'}table.dataTable thead .sorting_asc .table-header .column-title:after{content:'\e718'}table.dataTable thead .sorting_desc .table-header .column-title:after{content:'\e715'}table.dataTable tfoot th{font-weight:600;text-align:left;padding:10px 18px 6px 18px;border-top:1px solid #111}table.dataTable tfoot th.dt-head-left{text-align:left}table.dataTable tfoot th.dt-head-center{text-align:center}table.dataTable tfoot th.dt-head-right{text-align:right}table.dataTable tfoot th.dt-head-justify{text-align:justify}table.dataTable tfoot th.dt-head-nowrap{white-space:nowrap}table.dataTable tfoot td{padding:10px 18px 6px 18px;border-top:1px solid #111}table.dataTable tfoot td.dt-head-left{text-align:left}table.dataTable tfoot td.dt-head-center{text-align:center}table.dataTable tfoot td.dt-head-right{text-align:right}table.dataTable tfoot td.dt-head-justify{text-align:justify}table.dataTable tfoot td.dt-head-nowrap{white-space:nowrap}table.dataTable tbody tr{background-color:#fff}table.dataTable tbody tr.selected{background-color:#b0bed9}table.dataTable tbody tr.details-open td.detail-column i{background:#fff}table.dataTable tbody tr.details-row.odd tr{background:#fff}table.dataTable tbody tr.details-row>td{padding:0}table.dataTable tbody th{padding:14px 15px;vertical-align:middle}table.dataTable tbody th.dt-body-left{text-align:left}table.dataTable tbody th.dt-body-center{text-align:center}table.dataTable tbody th.dt-body-right{text-align:right}table.dataTable tbody th.dt-body-justify{text-align:justify}table.dataTable tbody th.dt-body-nowrap{white-space:nowrap}table.dataTable tbody td{padding:16px 8px;vertical-align:middle}table.dataTable tbody td:first-child{padding-left:24px}table.dataTable tbody td:last-child{padding-right:24px}table.dataTable tbody td.dt-body-left{text-align:left}table.dataTable tbody td.dt-body-center{text-align:center}table.dataTable tbody td.dt-body-right{text-align:right}table.dataTable tbody td.dt-body-justify{text-align:justify}table.dataTable tbody td.dt-body-nowrap{white-space:nowrap}table.dataTable th.dt-left{text-align:left}table.dataTable th.dt-center{text-align:center}table.dataTable th.dt-right{text-align:right}table.dataTable th.dt-justify{text-align:justify}table.dataTable th.dt-nowrap{white-space:nowrap}table.dataTable td.dt-left{text-align:left}table.dataTable td.dt-center{text-align:center}table.dataTable td.dataTables_empty{height:51px;text-align:center}table.dataTable td.dt-right{text-align:right}table.dataTable td.dt-justify{text-align:justify}table.dataTable td.dt-nowrap{white-space:nowrap}table.dataTable.row-border thead{border-bottom:1px solid rgba(0,0,0,.12)}table.dataTable.row-border tbody tr:first-child th{border-top:none}table.dataTable.row-border tbody tr:first-child td{border-top:none}table.dataTable.row-border tbody tr:last-child td{border-bottom:1px solid rgba(0,0,0,.12)}table.dataTable.row-border tbody th{border-top:1px solid rgba(0,0,0,.12)}table.dataTable.row-border tbody td{border-top:1px solid rgba(0,0,0,.12)}table.dataTable.cell-border tbody tr:first-child th{border-top:none}table.dataTable.cell-border tbody tr:first-child td{border-top:none}table.dataTable.cell-border tbody th{border-top:1px solid rgba(0,0,0,.12);border-right:1px solid rgba(0,0,0,.12)}table.dataTable.cell-border tbody th:last-child{border-right:none}table.dataTable.cell-border tbody td{border-top:1px solid rgba(0,0,0,.12);border-right:1px solid rgba(0,0,0,.12)}table.dataTable.cell-border tbody td:last-child{border-right:none}table.dataTable.stripe tbody tr.odd{background-color:#fff}table.dataTable.stripe tbody tr.odd.selected{background-color:#abb9d3}table.dataTable.hover tbody tr:hover{background-color:#f5f5f5}table.dataTable.hover tbody tr:hover.selected{background-color:#a9b7d1}table.dataTable.hover tbody tr.odd:hover{background-color:#f5f5f5}table.dataTable.hover tbody tr.odd:hover.selected{background-color:#a9b7d1}table.dataTable.hover tbody tr.even:hover{background-color:#f5f5f5}table.dataTable.hover tbody tr.even:hover.selected{background-color:#a9b7d1}table.dataTable.order-column tbody tr>.sorting_1{background-color:#f9f9f9}table.dataTable.order-column tbody tr>.sorting_2{background-color:#f9f9f9}table.dataTable.order-column tbody tr>.sorting_3{background-color:#f9f9f9}table.dataTable.order-column tbody tr.selected>.sorting_1{background-color:#acbad4}table.dataTable.order-column tbody tr.selected>.sorting_2{background-color:#acbad4}table.dataTable.order-column tbody tr.selected>.sorting_3{background-color:#acbad4}table.dataTable.order-column.stripe tbody tr.odd>.sorting_1{background-color:#f1f1f1}table.dataTable.order-column.stripe tbody tr.odd>.sorting_2{background-color:#f3f3f3}table.dataTable.order-column.stripe tbody tr.odd>.sorting_3{background-color:#f5f5f5}table.dataTable.order-column.stripe tbody tr.odd.selected>.sorting_1{background-color:#a6b3cd}table.dataTable.order-column.stripe tbody tr.odd.selected>.sorting_2{background-color:#a7b5ce}table.dataTable.order-column.stripe tbody tr.odd.selected>.sorting_3{background-color:#a9b6d0}table.dataTable.order-column.stripe tbody tr.even>.sorting_1{background-color:#f9f9f9}table.dataTable.order-column.stripe tbody tr.even>.sorting_2{background-color:#fbfbfb}table.dataTable.order-column.stripe tbody tr.even>.sorting_3{background-color:#fdfdfd}table.dataTable.order-column.stripe tbody tr.even.selected>.sorting_1{background-color:#acbad4}table.dataTable.order-column.stripe tbody tr.even.selected>.sorting_2{background-color:#adbbd6}table.dataTable.order-column.stripe tbody tr.even.selected>.sorting_3{background-color:#afbdd8}table.dataTable.order-column.hover tbody tr:hover>.sorting_1{background-color:#eaeaea}table.dataTable.order-column.hover tbody tr:hover>.sorting_2{background-color:#ebebeb}table.dataTable.order-column.hover tbody tr:hover>.sorting_3{background-color:#eee}table.dataTable.order-column.hover tbody tr:hover.selected>.sorting_1{background-color:#a1aec7}table.dataTable.order-column.hover tbody tr:hover.selected>.sorting_2{background-color:#a2afc8}table.dataTable.order-column.hover tbody tr:hover.selected>.sorting_3{background-color:#a4b2cb}table.dataTable.order-column.hover tbody tr.odd:hover>.sorting_1{background-color:#eaeaea}table.dataTable.order-column.hover tbody tr.odd:hover>.sorting_2{background-color:#ebebeb}table.dataTable.order-column.hover tbody tr.odd:hover>.sorting_3{background-color:#eee}table.dataTable.order-column.hover tbody tr.odd:hover.selected>.sorting_1{background-color:#a1aec7}table.dataTable.order-column.hover tbody tr.odd:hover.selected>.sorting_2{background-color:#a2afc8}table.dataTable.order-column.hover tbody tr.odd:hover.selected>.sorting_3{background-color:#a4b2cb}table.dataTable.order-column.hover tbody tr.even:hover>.sorting_1{background-color:#eaeaea}table.dataTable.order-column.hover tbody tr.even:hover>.sorting_2{background-color:#ebebeb}table.dataTable.order-column.hover tbody tr.even:hover>.sorting_3{background-color:#eee}table.dataTable.order-column.hover tbody tr.even:hover.selected>.sorting_1{background-color:#a1aec7}table.dataTable.order-column.hover tbody tr.even:hover.selected>.sorting_2{background-color:#a2afc8}table.dataTable.order-column.hover tbody tr.even:hover.selected>.sorting_3{background-color:#a4b2cb}table.dataTable.no-footer{border-bottom:none}table.dataTable.nowrap th{white-space:nowrap}table.dataTable.nowrap td{white-space:nowrap}table.dataTable.compact thead th{padding:5px 9px}table.dataTable.compact thead td{padding:5px 9px}table.dataTable.compact tfoot th{padding:5px 9px 3px 9px}table.dataTable.compact tfoot td{padding:5px 9px 3px 9px}table.dataTable.compact tbody th{padding:4px 5px}table.dataTable.compact tbody td{padding:4px 5px}.dataTables_wrapper{display:flex;flex:1 0 auto;flex-direction:column;min-height:0}.dataTables_wrapper .top{padding:16px 24px}.dataTables_wrapper .bottom{display:flex;min-height:64px;justify-content:space-between;padding:16px 8px;border-top:1px solid rgba(0,0,0,.12)}.dataTables_wrapper .bottom .left{display:flex;flex:0 0 50%;max-width:50%;align-self:center;padding:0 8px}.dataTables_wrapper .bottom .left .length{display:block}.dataTables_wrapper .bottom .right{display:flex;flex:0 0 50%;max-width:50%;align-self:center;justify-content:flex-end;padding:0 8px}.dataTables_wrapper .bottom .right .info{display:block;align-self:center}.dataTables_wrapper .bottom .right .info .dataTables_info{padding:0 8px;font-weight:600}.dataTables_wrapper .bottom .right .pagination{display:block;align-self:center;white-space:nowrap}.dataTables_wrapper .bottom .right .pagination .dataTables_paginate{padding:0;margin:0!important}.dataTables_wrapper .dataTables_filter{float:right}.dataTables_wrapper .dataTables_filter input{margin-left:.5em;border:1px solid rgba(0,0,0,.12);height:24px;padding:4px 8px}.dataTables_wrapper .dataTables_paginate .paginate_button{background:#fff;color:rgba(0,0,0,.87);border:1px solid rgba(0,0,0,.12);padding:9px 12px;border-radius:2px;cursor:pointer;user-select:none;margin:0 2px}.dataTables_wrapper .dataTables_paginate .paginate_button:hover{box-shadow:inset 999em 0 0 0 rgba(0,0,0,.05);color:rgba(0,0,0,.87)!important;border:1px solid rgba(0,0,0,.12)!important;background:0 0}.dataTables_wrapper .dataTables_paginate .paginate_button:active{box-shadow:inset 999em 0 0 0 rgba(0,0,0,.08),inset 0 1px 3px 0 rgba(0,0,0,.1),0 1px 0 0 rgba(255,255,255,.35)}.dataTables_wrapper .dataTables_paginate .paginate_button.current,.dataTables_wrapper .dataTables_paginate .paginate_button.disabled,.dataTables_wrapper .dataTables_paginate .paginate_button.disabled:active,.dataTables_wrapper .dataTables_paginate .paginate_button.disabled:hover{color:rgba(0,0,0,.54)!important;border-color:rgba(0,0,0,.12)!important;background:#fff!important;box-shadow:none!important;cursor:default}.dataTables_wrapper .dataTables_processing{position:absolute;top:50%;left:50%;width:100%;height:40px;margin-left:-50%;margin-top:-25px;padding-top:20px;text-align:center;font-size:1.2em;background-color:#fff;background:-webkit-gradient(linear,left top,right top,color-stop(0,rgba(255,255,255,0)),color-stop(25%,rgba(255,255,255,.9)),color-stop(75%,rgba(255,255,255,.9)),color-stop(100%,rgba(255,255,255,0)));background:-webkit-linear-gradient(left,rgba(255,255,255,0) 0,rgba(255,255,255,.9) 25%,rgba(255,255,255,.9) 75%,rgba(255,255,255,0) 100%);background:-moz-linear-gradient(left,rgba(255,255,255,0) 0,rgba(255,255,255,.9) 25%,rgba(255,255,255,.9) 75%,rgba(255,255,255,0) 100%);background:-ms-linear-gradient(left,rgba(255,255,255,0) 0,rgba(255,255,255,.9) 25%,rgba(255,255,255,.9) 75%,rgba(255,255,255,0) 100%);background:-o-linear-gradient(left,rgba(255,255,255,0) 0,rgba(255,255,255,.9) 25%,rgba(255,255,255,.9) 75%,rgba(255,255,255,0) 100%);background:linear-gradient(to right,rgba(255,255,255,0) 0,rgba(255,255,255,.9) 25%,rgba(255,255,255,.9) 75%,rgba(255,255,255,0) 100%)}.dataTables_wrapper .dataTables_scroll{display:flex;flex:1 1 0;flex-direction:column;clear:both;min-height:0}.dataTables_wrapper .dataTables_scroll table.dataTable{box-shadow:none}.dataTables_wrapper .dataTables_scroll table.dataTable.row-border thead{border:none}.dataTables_wrapper .dataTables_scroll .dataTables_scrollHead{display:flex;min-height:56px;box-shadow:0 0 0 1px rgba(0,0,0,.095),0 1px 1px 0 rgba(0,0,0,.1),0 2px 1px 0 rgba(0,0,0,.05);background:#fff;overflow:visible!important}.dataTables_wrapper .dataTables_scroll .dataTables_scrollHead tr th:last-child .table-header .column-title{position:relative;left:7px}.dataTables_wrapper .dataTables_scroll .dataTables_scrollBody{display:flex;overflow-x:hidden!important;overflow-y:scroll!important;-webkit-overflow-scrolling:touch}.dataTables_wrapper .dataTables_scroll .dataTables_scrollBody th>.dataTables_sizing{height:0;overflow:hidden;margin:0!important;padding:0!important}.dataTables_wrapper .dataTables_scroll .dataTables_scrollBody td>.dataTables_sizing{height:0;overflow:hidden;margin:0!important;padding:0!important}.dataTables_wrapper.no-footer .dataTables_scrollBody{border-bottom:none}.dataTables_wrapper.no-footer .dataTables_scrollBody table,.dataTables_wrapper.no-footer .dataTables_scrollHead table{border-bottom:none}.dataTables_wrapper:after{visibility:hidden;display:block;content:'';clear:both;height:0}table.dataTable .show-details{padding:5px 10px;font-weight:700}table.dataTable .action-buttons{display:flex;justify-content:center}table.dataTable .action-buttons .button{padding:8px}.fullpage-datatable .dataTables_wrapper{height:100%;max-height:100%}.explorer-11 .fullpage-datatable .dataTables_scroll{flex:1}table.dataTable.dtr-inline.collapsed.dtr-inline.collapsed>tbody>tr>td:first-child,table.dataTable.dtr-inline.collapsed.dtr-inline.collapsed>tbody>tr>th:first-child{padding-left:40px}table.dataTable.dtr-inline.collapsed.dtr-inline.collapsed>tbody>tr>td:first-child:before,table.dataTable.dtr-inline.collapsed.dtr-inline.collapsed>tbody>tr>th:first-child:before{content:'+';width:15px;height:15px;line-height:15px;top:50%;margin-top:-7px;left:8px;color:rgba(0,0,0,.54);background:0 0;border:none;box-shadow:0 0 0 2px rgba(0,0,0,.54);font-weight:700}table.dataTable.dtr-inline.collapsed.dtr-inline.collapsed>tbody>tr.parent>td:first-child:before,table.dataTable.dtr-inline.collapsed.dtr-inline.collapsed>tbody>tr.parent>th:first-child:before{background:0 0}table.dataTable.dtr-inline.collapsed>tbody>tr.child ul{display:block}table.dataTable.dtr-inline.collapsed>tbody>tr.child ul li{display:flex;flex-direction:row;align-items:center;justify-content:flex-start;border-bottom:1px solid rgba(0,0,0,.12);padding:8px 0}table.dataTable.dtr-inline.collapsed>tbody>tr.child ul li:first-child{padding-top:0}table.dataTable.dtr-inline.collapsed>tbody>tr.child ul li:last-child{border-bottom:none;padding-bottom:0}table.dataTable.dtr-inline.collapsed>tbody>tr.child ul li .dtr-title{margin-right:8px}[hljs],hljs{display:block;overflow-x:auto;color:#333;background:#f8f8f8;-webkit-text-size-adjust:none}.diff .hljs-header,.hljs-comment{color:#998;font-style:italic}.css .rule .hljs-keyword,.hljs-keyword,.hljs-request,.hljs-status,.hljs-subst,.hljs-winutils,.nginx .hljs-title{color:#333;font-weight:700}.hljs-hexcolor,.hljs-number,.ruby .hljs-constant{color:teal}.hljs-doctag,.hljs-string,.hljs-tag .hljs-value,.tex .hljs-formula{color:#d14}.hljs-id,.hljs-title,.scss .hljs-preprocessor{color:#900;font-weight:700}.hljs-list .hljs-keyword,.hljs-subst{font-weight:400}.hljs-class .hljs-title,.hljs-type,.tex .hljs-command,.vhdl .hljs-literal{color:#458;font-weight:700}.django .hljs-tag .hljs-keyword,.hljs-rule .hljs-property,.hljs-tag,.hljs-tag .hljs-title{color:navy;font-weight:400}.hljs-attribute,.hljs-name,.hljs-variable,.lisp .hljs-body{color:teal}.hljs-regexp{color:#009926}.clojure .hljs-keyword,.hljs-prompt,.hljs-symbol,.lisp .hljs-keyword,.ruby .hljs-symbol .hljs-string,.scheme .hljs-keyword,.tex .hljs-special{color:#990073}.hljs-built_in{color:#0086b3}.hljs-cdata,.hljs-doctype,.hljs-pi,.hljs-pragma,.hljs-preprocessor,.hljs-shebang{color:#999;font-weight:700}.hljs-deletion{background:#fdd}.hljs-addition{background:#dfd}.diff .hljs-change{background:#0086b3}.hljs-chunk{color:#aaa}nvd3{display:block;width:100%;height:100%}nvd3.remove-x-lines .nv-x .tick line{display:none}nvd3.remove-y-lines .nv-y .tick line{display:none}nvd3.remove-line-stroke .nv-groups path.nv-line{stroke-width:0!important}nvd3.remove-opacity .nv-groups .nv-group{fill-opacity:1!important}nvd3.show-line-points .nv-line .nv-scatter .nv-groups .nv-point{fill-opacity:1!important;stroke-opacity:1!important}.nvd3 text{font-family:Roboto,"Helvetica Neue",Arial,sans-serif}.nvd3 line.nv-guideline{stroke:rgba(0,0,0,.54)}.nvd3 .nv-groups .nv-point.hover{stroke-width:3px!important;fill-opacity:1!important;stroke-opacity:1!important}.nvtooltip{background:0 0;color:#fff;padding:0;border:none}.nvtooltip.gravity-n:after{display:block;position:absolute;content:'';width:0;height:0;left:50%;bottom:100%;margin-left:-5px;border:5px solid transparent;border-bottom-color:rgba(0,0,0,.87)}.nvtooltip.gravity-s:after{display:block;position:absolute;content:'';width:0;height:0;top:100%;left:50%;margin-left:-5px;border:5px solid transparent;border-top-color:rgba(0,0,0,.87)}.nvtooltip.gravity-e:after{display:block;position:absolute;content:'';width:0;height:0;top:50%;right:0;margin-top:-6px;margin-right:-11px;border:6px solid transparent;border-left-color:rgba(0,0,0,.87)}.nvtooltip.gravity-w:after{display:block;position:absolute;content:'';width:0;height:0;top:50%;margin-top:-6px;margin-left:-11px;border:6px solid transparent;border-right-color:rgba(0,0,0,.87)}.nvtooltip table{background:rgba(0,0,0,.87);padding:8px 12px;margin:0;border-radius:2px}.nvtooltip table tbody tr td.legend-color-guide div{border:none}.nvtooltip table tbody tr td:last-child{padding-right:0}.ta-root{display:block}.ta-root .ta-scroll-window.form-control{border:1px solid rgba(0,0,0,.12)}.ta-root.focussed>.ta-scroll-window.form-control{outline:0 solid transparent;border:1px solid rgba(0,0,0,.12);box-shadow:none}.ta-root textarea.ta-editor.ta-html{resize:vertical;width:100%!important;border:1px solid rgba(0,0,0,.12);padding:16px}.ta-root .ta-toolbar{border:1px solid rgba(0,0,0,.12);border-bottom:none;background:#f5f5f5}.ta-root .ta-toolbar .ta-group{display:flex;align-items:center;align-content:center;flex-wrap:wrap}.ta-root .ta-toolbar .ta-group #toolbarCC,.ta-root .ta-toolbar .ta-group #toolbarWC{display:inline-block!important;line-height:24px}.ta-root .ta-toolbar .ta-group .md-button{width:40px;min-width:40px;line-height:14px;height:36px;min-height:36px;padding:6px;margin:4px 0}.ta-root .ta-toolbar .ta-group .md-button i{font-size:20px;width:20px;height:20px;line-height:20px}.ng-cloak,.x-ng-cloak,[data-ng-cloak],[ng-cloak],[ng\:cloak],[x-ng-cloak]{display:none!important}.no-padding{padding:0!important}.no-margin{margin:0!important}.no-radius{border-radius:0}.divider-vertical{background:rgba(0,0,0,.12);height:24px;width:1px;margin:0 8px}.hidden{visibility:hidden;opacity:0}[fill-width]{min-width:100%}[fill-height]{min-height:100%}.full-height{height:100%!important}a img{display:block;outline:0}img{max-width:100%;height:auto;vertical-align:top;border:none}.scrollable{display:block;position:relative;overflow-x:auto;overflow-y:auto;-webkit-overflow-scrolling:touch}.scrollable.only-x{overflow-x:auto;overflow-y:hidden}.scrollable.only-y{overflow-x:hidden;overflow-y:auto}.flex-scrollable{position:relative;overflow-x:auto;overflow-y:auto;-webkit-overflow-scrolling:touch}.flex-scrollable.only-x{overflow-x:auto;overflow-y:hidden}.flex-scrollable.only-y{overflow-x:hidden;overflow-y:auto}.background-image-center{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);z-index:-1}.align-vertical:before{display:inline-block;height:100%;content:'';vertical-align:middle}.align-vertical .align-vertical-bottom,.align-vertical .align-vertical-middle,.align-vertical .align-vertical-top{display:inline-block}.align-vertical .align-vertical-top{vertical-align:top}.align-vertical .align-vertical-middle{vertical-align:middle}.align-vertical .align-vertical-bottom{vertical-align:bottom}.p-0,.padding-0{padding:0}.padding-top-0,.pt-0{padding-top:0}.padding-right-0,.pr-0{padding-right:0}.padding-bottom-0,.pb-0{padding-bottom:0}.padding-left-0,.pl-0{padding-left:0}.padding-horizontal-0,.ph-0{padding-left:0;padding-right:0}.padding-vertical-0,.pv-0{padding-top:0;padding-bottom:0}.p-5,.padding-5{padding:5px}.padding-top-5,.pt-5{padding-top:5px}.padding-right-5,.pr-5{padding-right:5px}.padding-bottom-5,.pb-5{padding-bottom:5px}.padding-left-5,.pl-5{padding-left:5px}.padding-horizontal-5,.ph-5{padding-left:5px;padding-right:5px}.padding-vertical-5,.pv-5{padding-top:5px;padding-bottom:5px}.p-10,.padding-10{padding:10px}.padding-top-10,.pt-10{padding-top:10px}.padding-right-10,.pr-10{padding-right:10px}.padding-bottom-10,.pb-10{padding-bottom:10px}.padding-left-10,.pl-10{padding-left:10px}.padding-horizontal-10,.ph-10{padding-left:10px;padding-right:10px}.padding-vertical-10,.pv-10{padding-top:10px;padding-bottom:10px}.p-15,.padding-15{padding:15px}.padding-top-15,.pt-15{padding-top:15px}.padding-right-15,.pr-15{padding-right:15px}.padding-bottom-15,.pb-15{padding-bottom:15px}.padding-left-15,.pl-15{padding-left:15px}.padding-horizontal-15,.ph-15{padding-left:15px;padding-right:15px}.padding-vertical-15,.pv-15{padding-top:15px;padding-bottom:15px}.p-20,.padding-20{padding:20px}.padding-top-20,.pt-20{padding-top:20px}.padding-right-20,.pr-20{padding-right:20px}.padding-bottom-20,.pb-20{padding-bottom:20px}.padding-left-20,.pl-20{padding-left:20px}.padding-horizontal-20,.ph-20{padding-left:20px;padding-right:20px}.padding-vertical-20,.pv-20{padding-top:20px;padding-bottom:20px}.p-25,.padding-25{padding:25px}.padding-top-25,.pt-25{padding-top:25px}.padding-right-25,.pr-25{padding-right:25px}.padding-bottom-25,.pb-25{padding-bottom:25px}.padding-left-25,.pl-25{padding-left:25px}.padding-horizontal-25,.ph-25{padding-left:25px;padding-right:25px}.padding-vertical-25,.pv-25{padding-top:25px;padding-bottom:25px}.p-30,.padding-30{padding:30px}.padding-top-30,.pt-30{padding-top:30px}.padding-right-30,.pr-30{padding-right:30px}.padding-bottom-30,.pb-30{padding-bottom:30px}.padding-left-30,.pl-30{padding-left:30px}.padding-horizontal-30,.ph-30{padding-left:30px;padding-right:30px}.padding-vertical-30,.pv-30{padding-top:30px;padding-bottom:30px}.p-35,.padding-35{padding:35px}.padding-top-35,.pt-35{padding-top:35px}.padding-right-35,.pr-35{padding-right:35px}.padding-bottom-35,.pb-35{padding-bottom:35px}.padding-left-35,.pl-35{padding-left:35px}.padding-horizontal-35,.ph-35{padding-left:35px;padding-right:35px}.padding-vertical-35,.pv-35{padding-top:35px;padding-bottom:35px}.p-40,.padding-40{padding:40px}.padding-top-40,.pt-40{padding-top:40px}.padding-right-40,.pr-40{padding-right:40px}.padding-bottom-40,.pb-40{padding-bottom:40px}.padding-left-40,.pl-40{padding-left:40px}.padding-horizontal-40,.ph-40{padding-left:40px;padding-right:40px}.padding-vertical-40,.pv-40{padding-top:40px;padding-bottom:40px}.p-45,.padding-45{padding:45px}.padding-top-45,.pt-45{padding-top:45px}.padding-right-45,.pr-45{padding-right:45px}.padding-bottom-45,.pb-45{padding-bottom:45px}.padding-left-45,.pl-45{padding-left:45px}.padding-horizontal-45,.ph-45{padding-left:45px;padding-right:45px}.padding-vertical-45,.pv-45{padding-top:45px;padding-bottom:45px}.p-50,.padding-50{padding:50px}.padding-top-50,.pt-50{padding-top:50px}.padding-right-50,.pr-50{padding-right:50px}.padding-bottom-50,.pb-50{padding-bottom:50px}.padding-left-50,.pl-50{padding-left:50px}.padding-horizontal-50,.ph-50{padding-left:50px;padding-right:50px}.padding-vertical-50,.pv-50{padding-top:50px;padding-bottom:50px}.p-55,.padding-55{padding:55px}.padding-top-55,.pt-55{padding-top:55px}.padding-right-55,.pr-55{padding-right:55px}.padding-bottom-55,.pb-55{padding-bottom:55px}.padding-left-55,.pl-55{padding-left:55px}.padding-horizontal-55,.ph-55{padding-left:55px;padding-right:55px}.padding-vertical-55,.pv-55{padding-top:55px;padding-bottom:55px}.p-60,.padding-60{padding:60px}.padding-top-60,.pt-60{padding-top:60px}.padding-right-60,.pr-60{padding-right:60px}.padding-bottom-60,.pb-60{padding-bottom:60px}.padding-left-60,.pl-60{padding-left:60px}.padding-horizontal-60,.ph-60{padding-left:60px;padding-right:60px}.padding-vertical-60,.pv-60{padding-top:60px;padding-bottom:60px}.p-65,.padding-65{padding:65px}.padding-top-65,.pt-65{padding-top:65px}.padding-right-65,.pr-65{padding-right:65px}.padding-bottom-65,.pb-65{padding-bottom:65px}.padding-left-65,.pl-65{padding-left:65px}.padding-horizontal-65,.ph-65{padding-left:65px;padding-right:65px}.padding-vertical-65,.pv-65{padding-top:65px;padding-bottom:65px}.p-70,.padding-70{padding:70px}.padding-top-70,.pt-70{padding-top:70px}.padding-right-70,.pr-70{padding-right:70px}.padding-bottom-70,.pb-70{padding-bottom:70px}.padding-left-70,.pl-70{padding-left:70px}.padding-horizontal-70,.ph-70{padding-left:70px;padding-right:70px}.padding-vertical-70,.pv-70{padding-top:70px;padding-bottom:70px}.p-75,.padding-75{padding:75px}.padding-top-75,.pt-75{padding-top:75px}.padding-right-75,.pr-75{padding-right:75px}.padding-bottom-75,.pb-75{padding-bottom:75px}.padding-left-75,.pl-75{padding-left:75px}.padding-horizontal-75,.ph-75{padding-left:75px;padding-right:75px}.padding-vertical-75,.pv-75{padding-top:75px;padding-bottom:75px}.p-80,.padding-80{padding:80px}.padding-top-80,.pt-80{padding-top:80px}.padding-right-80,.pr-80{padding-right:80px}.padding-bottom-80,.pb-80{padding-bottom:80px}.padding-left-80,.pl-80{padding-left:80px}.padding-horizontal-80,.ph-80{padding-left:80px;padding-right:80px}.padding-vertical-80,.pv-80{padding-top:80px;padding-bottom:80px}.p-85,.padding-85{padding:85px}.padding-top-85,.pt-85{padding-top:85px}.padding-right-85,.pr-85{padding-right:85px}.padding-bottom-85,.pb-85{padding-bottom:85px}.padding-left-85,.pl-85{padding-left:85px}.padding-horizontal-85,.ph-85{padding-left:85px;padding-right:85px}.padding-vertical-85,.pv-85{padding-top:85px;padding-bottom:85px}.p-90,.padding-90{padding:90px}.padding-top-90,.pt-90{padding-top:90px}.padding-right-90,.pr-90{padding-right:90px}.padding-bottom-90,.pb-90{padding-bottom:90px}.padding-left-90,.pl-90{padding-left:90px}.padding-horizontal-90,.ph-90{padding-left:90px;padding-right:90px}.padding-vertical-90,.pv-90{padding-top:90px;padding-bottom:90px}.p-95,.padding-95{padding:95px}.padding-top-95,.pt-95{padding-top:95px}.padding-right-95,.pr-95{padding-right:95px}.padding-bottom-95,.pb-95{padding-bottom:95px}.padding-left-95,.pl-95{padding-left:95px}.padding-horizontal-95,.ph-95{padding-left:95px;padding-right:95px}.padding-vertical-95,.pv-95{padding-top:95px;padding-bottom:95px}.p-100,.padding-100{padding:100px}.padding-top-100,.pt-100{padding-top:100px}.padding-right-100,.pr-100{padding-right:100px}.padding-bottom-100,.pb-100{padding-bottom:100px}.padding-left-100,.pl-100{padding-left:100px}.padding-horizontal-100,.ph-100{padding-left:100px;padding-right:100px}.padding-vertical-100,.pv-100{padding-top:100px;padding-bottom:100px}.p-8,.padding-8{padding:8px}.padding-top-8,.pt-8{padding-top:8px}.padding-right-8,.pr-8{padding-right:8px}.padding-bottom-8,.pb-8{padding-bottom:8px}.padding-left-8,.pl-8{padding-left:8px}.padding-horizontal-8,.ph-8{padding-left:8px;padding-right:8px}.padding-vertical-8,.pv-8{padding-top:8px;padding-bottom:8px}.p-16,.padding-16{padding:16px}.padding-top-16,.pt-16{padding-top:16px}.padding-right-16,.pr-16{padding-right:16px}.padding-bottom-16,.pb-16{padding-bottom:16px}.padding-left-16,.pl-16{padding-left:16px}.padding-horizontal-16,.ph-16{padding-left:16px;padding-right:16px}.padding-vertical-16,.pv-16{padding-top:16px;padding-bottom:16px}.p-24,.padding-24{padding:24px}.padding-top-24,.pt-24{padding-top:24px}.padding-right-24,.pr-24{padding-right:24px}.padding-bottom-24,.pb-24{padding-bottom:24px}.padding-left-24,.pl-24{padding-left:24px}.padding-horizontal-24,.ph-24{padding-left:24px;padding-right:24px}.padding-vertical-24,.pv-24{padding-top:24px;padding-bottom:24px}.p-32,.padding-32{padding:32px}.padding-top-32,.pt-32{padding-top:32px}.padding-right-32,.pr-32{padding-right:32px}.padding-bottom-32,.pb-32{padding-bottom:32px}.padding-left-32,.pl-32{padding-left:32px}.padding-horizontal-32,.ph-32{padding-left:32px;padding-right:32px}.padding-vertical-32,.pv-32{padding-top:32px;padding-bottom:32px}.p-48,.padding-48{padding:48px}.padding-top-48,.pt-48{padding-top:48px}.padding-right-48,.pr-48{padding-right:48px}.padding-bottom-48,.pb-48{padding-bottom:48px}.padding-left-48,.pl-48{padding-left:48px}.padding-horizontal-48,.ph-48{padding-left:48px;padding-right:48px}.padding-vertical-48,.pv-48{padding-top:48px;padding-bottom:48px}.p-56,.padding-56{padding:56px}.padding-top-56,.pt-56{padding-top:56px}.padding-right-56,.pr-56{padding-right:56px}.padding-bottom-56,.pb-56{padding-bottom:56px}.padding-left-56,.pl-56{padding-left:56px}.padding-horizontal-56,.ph-56{padding-left:56px;padding-right:56px}.padding-vertical-56,.pv-56{padding-top:56px;padding-bottom:56px}.p-64,.padding-64{padding:64px}.padding-top-64,.pt-64{padding-top:64px}.padding-right-64,.pr-64{padding-right:64px}.padding-bottom-64,.pb-64{padding-bottom:64px}.padding-left-64,.pl-64{padding-left:64px}.padding-horizontal-64,.ph-64{padding-left:64px;padding-right:64px}.padding-vertical-64,.pv-64{padding-top:64px;padding-bottom:64px}.p-72,.padding-72{padding:72px}.padding-top-72,.pt-72{padding-top:72px}.padding-right-72,.pr-72{padding-right:72px}.padding-bottom-72,.pb-72{padding-bottom:72px}.padding-left-72,.pl-72{padding-left:72px}.padding-horizontal-72,.ph-72{padding-left:72px;padding-right:72px}.padding-vertical-72,.pv-72{padding-top:72px;padding-bottom:72px}.p-88,.padding-88{padding:88px}.padding-top-88,.pt-88{padding-top:88px}.padding-right-88,.pr-88{padding-right:88px}.padding-bottom-88,.pb-88{padding-bottom:88px}.padding-left-88,.pl-88{padding-left:88px}.padding-horizontal-88,.ph-88{padding-left:88px;padding-right:88px}.padding-vertical-88,.pv-88{padding-top:88px;padding-bottom:88px}.p-96,.padding-96{padding:96px}.padding-top-96,.pt-96{padding-top:96px}.padding-right-96,.pr-96{padding-right:96px}.padding-bottom-96,.pb-96{padding-bottom:96px}.padding-left-96,.pl-96{padding-left:96px}.padding-horizontal-96,.ph-96{padding-left:96px;padding-right:96px}.padding-vertical-96,.pv-96{padding-top:96px;padding-bottom:96px}.m-0,.margin-0{margin:0}.margin-top-0,.mt-0{margin-top:0}.margin-right-0,.mr-0{margin-right:0}.margin-bottom-0,.mb-0{margin-bottom:0}.margin-left-0,.ml-0{margin-left:0}.margin-horizontal-0,.mh-0{margin-left:0;margin-right:0}.margin-vertical-0,.mv-0{margin-top:0;margin-bottom:0}.m-5,.margin-5{margin:5px}.margin-top-5,.mt-5{margin-top:5px}.margin-right-5,.mr-5{margin-right:5px}.margin-bottom-5,.mb-5{margin-bottom:5px}.margin-left-5,.ml-5{margin-left:5px}.margin-horizontal-5,.mh-5{margin-left:5px;margin-right:5px}.margin-vertical-5,.mv-5{margin-top:5px;margin-bottom:5px}.m-10,.margin-10{margin:10px}.margin-top-10,.mt-10{margin-top:10px}.margin-right-10,.mr-10{margin-right:10px}.margin-bottom-10,.mb-10{margin-bottom:10px}.margin-left-10,.ml-10{margin-left:10px}.margin-horizontal-10,.mh-10{margin-left:10px;margin-right:10px}.margin-vertical-10,.mv-10{margin-top:10px;margin-bottom:10px}.m-15,.margin-15{margin:15px}.margin-top-15,.mt-15{margin-top:15px}.margin-right-15,.mr-15{margin-right:15px}.margin-bottom-15,.mb-15{margin-bottom:15px}.margin-left-15,.ml-15{margin-left:15px}.margin-horizontal-15,.mh-15{margin-left:15px;margin-right:15px}.margin-vertical-15,.mv-15{margin-top:15px;margin-bottom:15px}.m-20,.margin-20{margin:20px}.margin-top-20,.mt-20{margin-top:20px}.margin-right-20,.mr-20{margin-right:20px}.margin-bottom-20,.mb-20{margin-bottom:20px}.margin-left-20,.ml-20{margin-left:20px}.margin-horizontal-20,.mh-20{margin-left:20px;margin-right:20px}.margin-vertical-20,.mv-20{margin-top:20px;margin-bottom:20px}.m-25,.margin-25{margin:25px}.margin-top-25,.mt-25{margin-top:25px}.margin-right-25,.mr-25{margin-right:25px}.margin-bottom-25,.mb-25{margin-bottom:25px}.margin-left-25,.ml-25{margin-left:25px}.margin-horizontal-25,.mh-25{margin-left:25px;margin-right:25px}.margin-vertical-25,.mv-25{margin-top:25px;margin-bottom:25px}.m-30,.margin-30{margin:30px}.margin-top-30,.mt-30{margin-top:30px}.margin-right-30,.mr-30{margin-right:30px}.margin-bottom-30,.mb-30{margin-bottom:30px}.margin-left-30,.ml-30{margin-left:30px}.margin-horizontal-30,.mh-30{margin-left:30px;margin-right:30px}.margin-vertical-30,.mv-30{margin-top:30px;margin-bottom:30px}.m-35,.margin-35{margin:35px}.margin-top-35,.mt-35{margin-top:35px}.margin-right-35,.mr-35{margin-right:35px}.margin-bottom-35,.mb-35{margin-bottom:35px}.margin-left-35,.ml-35{margin-left:35px}.margin-horizontal-35,.mh-35{margin-left:35px;margin-right:35px}.margin-vertical-35,.mv-35{margin-top:35px;margin-bottom:35px}.m-40,.margin-40{margin:40px}.margin-top-40,.mt-40{margin-top:40px}.margin-right-40,.mr-40{margin-right:40px}.margin-bottom-40,.mb-40{margin-bottom:40px}.margin-left-40,.ml-40{margin-left:40px}.margin-horizontal-40,.mh-40{margin-left:40px;margin-right:40px}.margin-vertical-40,.mv-40{margin-top:40px;margin-bottom:40px}.m-45,.margin-45{margin:45px}.margin-top-45,.mt-45{margin-top:45px}.margin-right-45,.mr-45{margin-right:45px}.margin-bottom-45,.mb-45{margin-bottom:45px}.margin-left-45,.ml-45{margin-left:45px}.margin-horizontal-45,.mh-45{margin-left:45px;margin-right:45px}.margin-vertical-45,.mv-45{margin-top:45px;margin-bottom:45px}.m-50,.margin-50{margin:50px}.margin-top-50,.mt-50{margin-top:50px}.margin-right-50,.mr-50{margin-right:50px}.margin-bottom-50,.mb-50{margin-bottom:50px}.margin-left-50,.ml-50{margin-left:50px}.margin-horizontal-50,.mh-50{margin-left:50px;margin-right:50px}.margin-vertical-50,.mv-50{margin-top:50px;margin-bottom:50px}.m-55,.margin-55{margin:55px}.margin-top-55,.mt-55{margin-top:55px}.margin-right-55,.mr-55{margin-right:55px}.margin-bottom-55,.mb-55{margin-bottom:55px}.margin-left-55,.ml-55{margin-left:55px}.margin-horizontal-55,.mh-55{margin-left:55px;margin-right:55px}.margin-vertical-55,.mv-55{margin-top:55px;margin-bottom:55px}.m-60,.margin-60{margin:60px}.margin-top-60,.mt-60{margin-top:60px}.margin-right-60,.mr-60{margin-right:60px}.margin-bottom-60,.mb-60{margin-bottom:60px}.margin-left-60,.ml-60{margin-left:60px}.margin-horizontal-60,.mh-60{margin-left:60px;margin-right:60px}.margin-vertical-60,.mv-60{margin-top:60px;margin-bottom:60px}.m-65,.margin-65{margin:65px}.margin-top-65,.mt-65{margin-top:65px}.margin-right-65,.mr-65{margin-right:65px}.margin-bottom-65,.mb-65{margin-bottom:65px}.margin-left-65,.ml-65{margin-left:65px}.margin-horizontal-65,.mh-65{margin-left:65px;margin-right:65px}.margin-vertical-65,.mv-65{margin-top:65px;margin-bottom:65px}.m-70,.margin-70{margin:70px}.margin-top-70,.mt-70{margin-top:70px}.margin-right-70,.mr-70{margin-right:70px}.margin-bottom-70,.mb-70{margin-bottom:70px}.margin-left-70,.ml-70{margin-left:70px}.margin-horizontal-70,.mh-70{margin-left:70px;margin-right:70px}.margin-vertical-70,.mv-70{margin-top:70px;margin-bottom:70px}.m-75,.margin-75{margin:75px}.margin-top-75,.mt-75{margin-top:75px}.margin-right-75,.mr-75{margin-right:75px}.margin-bottom-75,.mb-75{margin-bottom:75px}.margin-left-75,.ml-75{margin-left:75px}.margin-horizontal-75,.mh-75{margin-left:75px;margin-right:75px}.margin-vertical-75,.mv-75{margin-top:75px;margin-bottom:75px}.m-80,.margin-80{margin:80px}.margin-top-80,.mt-80{margin-top:80px}.margin-right-80,.mr-80{margin-right:80px}.margin-bottom-80,.mb-80{margin-bottom:80px}.margin-left-80,.ml-80{margin-left:80px}.margin-horizontal-80,.mh-80{margin-left:80px;margin-right:80px}.margin-vertical-80,.mv-80{margin-top:80px;margin-bottom:80px}.m-85,.margin-85{margin:85px}.margin-top-85,.mt-85{margin-top:85px}.margin-right-85,.mr-85{margin-right:85px}.margin-bottom-85,.mb-85{margin-bottom:85px}.margin-left-85,.ml-85{margin-left:85px}.margin-horizontal-85,.mh-85{margin-left:85px;margin-right:85px}.margin-vertical-85,.mv-85{margin-top:85px;margin-bottom:85px}.m-90,.margin-90{margin:90px}.margin-top-90,.mt-90{margin-top:90px}.margin-right-90,.mr-90{margin-right:90px}.margin-bottom-90,.mb-90{margin-bottom:90px}.margin-left-90,.ml-90{margin-left:90px}.margin-horizontal-90,.mh-90{margin-left:90px;margin-right:90px}.margin-vertical-90,.mv-90{margin-top:90px;margin-bottom:90px}.m-95,.margin-95{margin:95px}.margin-top-95,.mt-95{margin-top:95px}.margin-right-95,.mr-95{margin-right:95px}.margin-bottom-95,.mb-95{margin-bottom:95px}.margin-left-95,.ml-95{margin-left:95px}.margin-horizontal-95,.mh-95{margin-left:95px;margin-right:95px}.margin-vertical-95,.mv-95{margin-top:95px;margin-bottom:95px}.m-100,.margin-100{margin:100px}.margin-top-100,.mt-100{margin-top:100px}.margin-right-100,.mr-100{margin-right:100px}.margin-bottom-100,.mb-100{margin-bottom:100px}.margin-left-100,.ml-100{margin-left:100px}.margin-horizontal-100,.mh-100{margin-left:100px;margin-right:100px}.margin-vertical-100,.mv-100{margin-top:100px;margin-bottom:100px}.m-8,.margin-8{margin:8px}.margin-top-8,.mt-8{margin-top:8px}.margin-right-8,.mr-8{margin-right:8px}.margin-bottom-8,.mb-8{margin-bottom:8px}.margin-left-8,.ml-8{margin-left:8px}.margin-horizontal-8,.mh-8{margin-left:8px;margin-right:8px}.margin-vertical-8,.mv-8{margin-top:8px;margin-bottom:8px}.m-16,.margin-16{margin:16px}.margin-top-16,.mt-16{margin-top:16px}.margin-right-16,.mr-16{margin-right:16px}.margin-bottom-16,.mb-16{margin-bottom:16px}.margin-left-16,.ml-16{margin-left:16px}.margin-horizontal-16,.mh-16{margin-left:16px;margin-right:16px}.margin-vertical-16,.mv-16{margin-top:16px;margin-bottom:16px}.m-24,.margin-24{margin:24px}.margin-top-24,.mt-24{margin-top:24px}.margin-right-24,.mr-24{margin-right:24px}.margin-bottom-24,.mb-24{margin-bottom:24px}.margin-left-24,.ml-24{margin-left:24px}.margin-horizontal-24,.mh-24{margin-left:24px;margin-right:24px}.margin-vertical-24,.mv-24{margin-top:24px;margin-bottom:24px}.m-32,.margin-32{margin:32px}.margin-top-32,.mt-32{margin-top:32px}.margin-right-32,.mr-32{margin-right:32px}.margin-bottom-32,.mb-32{margin-bottom:32px}.margin-left-32,.ml-32{margin-left:32px}.margin-horizontal-32,.mh-32{margin-left:32px;margin-right:32px}.margin-vertical-32,.mv-32{margin-top:32px;margin-bottom:32px}.m-48,.margin-48{margin:48px}.margin-top-48,.mt-48{margin-top:48px}.margin-right-48,.mr-48{margin-right:48px}.margin-bottom-48,.mb-48{margin-bottom:48px}.margin-left-48,.ml-48{margin-left:48px}.margin-horizontal-48,.mh-48{margin-left:48px;margin-right:48px}.margin-vertical-48,.mv-48{margin-top:48px;margin-bottom:48px}.m-56,.margin-56{margin:56px}.margin-top-56,.mt-56{margin-top:56px}.margin-right-56,.mr-56{margin-right:56px}.margin-bottom-56,.mb-56{margin-bottom:56px}.margin-left-56,.ml-56{margin-left:56px}.margin-horizontal-56,.mh-56{margin-left:56px;margin-right:56px}.margin-vertical-56,.mv-56{margin-top:56px;margin-bottom:56px}.m-64,.margin-64{margin:64px}.margin-top-64,.mt-64{margin-top:64px}.margin-right-64,.mr-64{margin-right:64px}.margin-bottom-64,.mb-64{margin-bottom:64px}.margin-left-64,.ml-64{margin-left:64px}.margin-horizontal-64,.mh-64{margin-left:64px;margin-right:64px}.margin-vertical-64,.mv-64{margin-top:64px;margin-bottom:64px}.m-72,.margin-72{margin:72px}.margin-top-72,.mt-72{margin-top:72px}.margin-right-72,.mr-72{margin-right:72px}.margin-bottom-72,.mb-72{margin-bottom:72px}.margin-left-72,.ml-72{margin-left:72px}.margin-horizontal-72,.mh-72{margin-left:72px;margin-right:72px}.margin-vertical-72,.mv-72{margin-top:72px;margin-bottom:72px}.m-88,.margin-88{margin:88px}.margin-top-88,.mt-88{margin-top:88px}.margin-right-88,.mr-88{margin-right:88px}.margin-bottom-88,.mb-88{margin-bottom:88px}.margin-left-88,.ml-88{margin-left:88px}.margin-horizontal-88,.mh-88{margin-left:88px;margin-right:88px}.margin-vertical-88,.mv-88{margin-top:88px;margin-bottom:88px}.m-96,.margin-96{margin:96px}.margin-top-96,.mt-96{margin-top:96px}.margin-right-96,.mr-96{margin-right:96px}.margin-bottom-96,.mb-96{margin-bottom:96px}.margin-left-96,.ml-96{margin-left:96px}.margin-horizontal-96,.mh-96{margin-left:96px;margin-right:96px}.margin-vertical-96,.mv-96{margin-top:96px;margin-bottom:96px}.h-0,.height-0{height:0!important;min-height:0!important;max-height:0!important}.w-0,.width-0{width:0!important;min-width:0!important;max-width:0!important}.h-5,.height-5{height:5px!important;min-height:5px!important;max-height:5px!important}.w-5,.width-5{width:5px!important;min-width:5px!important;max-width:5px!important}.h-10,.height-10{height:10px!important;min-height:10px!important;max-height:10px!important}.w-10,.width-10{width:10px!important;min-width:10px!important;max-width:10px!important}.h-15,.height-15{height:15px!important;min-height:15px!important;max-height:15px!important}.w-15,.width-15{width:15px!important;min-width:15px!important;max-width:15px!important}.h-20,.height-20{height:20px!important;min-height:20px!important;max-height:20px!important}.w-20,.width-20{width:20px!important;min-width:20px!important;max-width:20px!important}.h-25,.height-25{height:25px!important;min-height:25px!important;max-height:25px!important}.w-25,.width-25{width:25px!important;min-width:25px!important;max-width:25px!important}.h-30,.height-30{height:30px!important;min-height:30px!important;max-height:30px!important}.w-30,.width-30{width:30px!important;min-width:30px!important;max-width:30px!important}.h-35,.height-35{height:35px!important;min-height:35px!important;max-height:35px!important}.w-35,.width-35{width:35px!important;min-width:35px!important;max-width:35px!important}.h-40,.height-40{height:40px!important;min-height:40px!important;max-height:40px!important}.w-40,.width-40{width:40px!important;min-width:40px!important;max-width:40px!important}.h-45,.height-45{height:45px!important;min-height:45px!important;max-height:45px!important}.w-45,.width-45{width:45px!important;min-width:45px!important;max-width:45px!important}.h-50,.height-50{height:50px!important;min-height:50px!important;max-height:50px!important}.w-50,.width-50{width:50px!important;min-width:50px!important;max-width:50px!important}.h-55,.height-55{height:55px!important;min-height:55px!important;max-height:55px!important}.w-55,.width-55{width:55px!important;min-width:55px!important;max-width:55px!important}.h-60,.height-60{height:60px!important;min-height:60px!important;max-height:60px!important}.w-60,.width-60{width:60px!important;min-width:60px!important;max-width:60px!important}.h-65,.height-65{height:65px!important;min-height:65px!important;max-height:65px!important}.w-65,.width-65{width:65px!important;min-width:65px!important;max-width:65px!important}.h-70,.height-70{height:70px!important;min-height:70px!important;max-height:70px!important}.w-70,.width-70{width:70px!important;min-width:70px!important;max-width:70px!important}.h-75,.height-75{height:75px!important;min-height:75px!important;max-height:75px!important}.w-75,.width-75{width:75px!important;min-width:75px!important;max-width:75px!important}.h-80,.height-80{height:80px!important;min-height:80px!important;max-height:80px!important}.w-80,.width-80{width:80px!important;min-width:80px!important;max-width:80px!important}.h-85,.height-85{height:85px!important;min-height:85px!important;max-height:85px!important}.w-85,.width-85{width:85px!important;min-width:85px!important;max-width:85px!important}.h-90,.height-90{height:90px!important;min-height:90px!important;max-height:90px!important}.w-90,.width-90{width:90px!important;min-width:90px!important;max-width:90px!important}.h-95,.height-95{height:95px!important;min-height:95px!important;max-height:95px!important}.w-95,.width-95{width:95px!important;min-width:95px!important;max-width:95px!important}.h-100,.height-100{height:100px!important;min-height:100px!important;max-height:100px!important}.w-100,.width-100{width:100px!important;min-width:100px!important;max-width:100px!important}.h-105,.height-105{height:105px!important;min-height:105px!important;max-height:105px!important}.w-105,.width-105{width:105px!important;min-width:105px!important;max-width:105px!important}.h-110,.height-110{height:110px!important;min-height:110px!important;max-height:110px!important}.w-110,.width-110{width:110px!important;min-width:110px!important;max-width:110px!important}.h-115,.height-115{height:115px!important;min-height:115px!important;max-height:115px!important}.w-115,.width-115{width:115px!important;min-width:115px!important;max-width:115px!important}.h-120,.height-120{height:120px!important;min-height:120px!important;max-height:120px!important}.w-120,.width-120{width:120px!important;min-width:120px!important;max-width:120px!important}.h-125,.height-125{height:125px!important;min-height:125px!important;max-height:125px!important}.w-125,.width-125{width:125px!important;min-width:125px!important;max-width:125px!important}.h-130,.height-130{height:130px!important;min-height:130px!important;max-height:130px!important}.w-130,.width-130{width:130px!important;min-width:130px!important;max-width:130px!important}.h-135,.height-135{height:135px!important;min-height:135px!important;max-height:135px!important}.w-135,.width-135{width:135px!important;min-width:135px!important;max-width:135px!important}.h-140,.height-140{height:140px!important;min-height:140px!important;max-height:140px!important}.w-140,.width-140{width:140px!important;min-width:140px!important;max-width:140px!important}.h-145,.height-145{height:145px!important;min-height:145px!important;max-height:145px!important}.w-145,.width-145{width:145px!important;min-width:145px!important;max-width:145px!important}.h-150,.height-150{height:150px!important;min-height:150px!important;max-height:150px!important}.w-150,.width-150{width:150px!important;min-width:150px!important;max-width:150px!important}.h-155,.height-155{height:155px!important;min-height:155px!important;max-height:155px!important}.w-155,.width-155{width:155px!important;min-width:155px!important;max-width:155px!important}.h-160,.height-160{height:160px!important;min-height:160px!important;max-height:160px!important}.w-160,.width-160{width:160px!important;min-width:160px!important;max-width:160px!important}.h-165,.height-165{height:165px!important;min-height:165px!important;max-height:165px!important}.w-165,.width-165{width:165px!important;min-width:165px!important;max-width:165px!important}.h-170,.height-170{height:170px!important;min-height:170px!important;max-height:170px!important}.w-170,.width-170{width:170px!important;min-width:170px!important;max-width:170px!important}.h-175,.height-175{height:175px!important;min-height:175px!important;max-height:175px!important}.w-175,.width-175{width:175px!important;min-width:175px!important;max-width:175px!important}.h-180,.height-180{height:180px!important;min-height:180px!important;max-height:180px!important}.w-180,.width-180{width:180px!important;min-width:180px!important;max-width:180px!important}.h-185,.height-185{height:185px!important;min-height:185px!important;max-height:185px!important}.w-185,.width-185{width:185px!important;min-width:185px!important;max-width:185px!important}.h-190,.height-190{height:190px!important;min-height:190px!important;max-height:190px!important}.w-190,.width-190{width:190px!important;min-width:190px!important;max-width:190px!important}.h-195,.height-195{height:195px!important;min-height:195px!important;max-height:195px!important}.w-195,.width-195{width:195px!important;min-width:195px!important;max-width:195px!important}.h-200,.height-200{height:200px!important;min-height:200px!important;max-height:200px!important}.w-200,.width-200{width:200px!important;min-width:200px!important;max-width:200px!important}.h-205,.height-205{height:205px!important;min-height:205px!important;max-height:205px!important}.w-205,.width-205{width:205px!important;min-width:205px!important;max-width:205px!important}.h-210,.height-210{height:210px!important;min-height:210px!important;max-height:210px!important}.w-210,.width-210{width:210px!important;min-width:210px!important;max-width:210px!important}.h-215,.height-215{height:215px!important;min-height:215px!important;max-height:215px!important}.w-215,.width-215{width:215px!important;min-width:215px!important;max-width:215px!important}.h-220,.height-220{height:220px!important;min-height:220px!important;max-height:220px!important}.w-220,.width-220{width:220px!important;min-width:220px!important;max-width:220px!important}.h-225,.height-225{height:225px!important;min-height:225px!important;max-height:225px!important}.w-225,.width-225{width:225px!important;min-width:225px!important;max-width:225px!important}.h-230,.height-230{height:230px!important;min-height:230px!important;max-height:230px!important}.w-230,.width-230{width:230px!important;min-width:230px!important;max-width:230px!important}.h-235,.height-235{height:235px!important;min-height:235px!important;max-height:235px!important}.w-235,.width-235{width:235px!important;min-width:235px!important;max-width:235px!important}.h-240,.height-240{height:240px!important;min-height:240px!important;max-height:240px!important}.w-240,.width-240{width:240px!important;min-width:240px!important;max-width:240px!important}.h-245,.height-245{height:245px!important;min-height:245px!important;max-height:245px!important}.w-245,.width-245{width:245px!important;min-width:245px!important;max-width:245px!important}.h-250,.height-250{height:250px!important;min-height:250px!important;max-height:250px!important}.w-250,.width-250{width:250px!important;min-width:250px!important;max-width:250px!important}.h-255,.height-255{height:255px!important;min-height:255px!important;max-height:255px!important}.w-255,.width-255{width:255px!important;min-width:255px!important;max-width:255px!important}.h-260,.height-260{height:260px!important;min-height:260px!important;max-height:260px!important}.w-260,.width-260{width:260px!important;min-width:260px!important;max-width:260px!important}.h-265,.height-265{height:265px!important;min-height:265px!important;max-height:265px!important}.w-265,.width-265{width:265px!important;min-width:265px!important;max-width:265px!important}.h-270,.height-270{height:270px!important;min-height:270px!important;max-height:270px!important}.w-270,.width-270{width:270px!important;min-width:270px!important;max-width:270px!important}.h-275,.height-275{height:275px!important;min-height:275px!important;max-height:275px!important}.w-275,.width-275{width:275px!important;min-width:275px!important;max-width:275px!important}.h-280,.height-280{height:280px!important;min-height:280px!important;max-height:280px!important}.w-280,.width-280{width:280px!important;min-width:280px!important;max-width:280px!important}.h-285,.height-285{height:285px!important;min-height:285px!important;max-height:285px!important}.w-285,.width-285{width:285px!important;min-width:285px!important;max-width:285px!important}.h-290,.height-290{height:290px!important;min-height:290px!important;max-height:290px!important}.w-290,.width-290{width:290px!important;min-width:290px!important;max-width:290px!important}.h-295,.height-295{height:295px!important;min-height:295px!important;max-height:295px!important}.w-295,.width-295{width:295px!important;min-width:295px!important;max-width:295px!important}.h-300,.height-300{height:300px!important;min-height:300px!important;max-height:300px!important}.w-300,.width-300{width:300px!important;min-width:300px!important;max-width:300px!important}.h-305,.height-305{height:305px!important;min-height:305px!important;max-height:305px!important}.w-305,.width-305{width:305px!important;min-width:305px!important;max-width:305px!important}.h-310,.height-310{height:310px!important;min-height:310px!important;max-height:310px!important}.w-310,.width-310{width:310px!important;min-width:310px!important;max-width:310px!important}.h-315,.height-315{height:315px!important;min-height:315px!important;max-height:315px!important}.w-315,.width-315{width:315px!important;min-width:315px!important;max-width:315px!important}.h-320,.height-320{height:320px!important;min-height:320px!important;max-height:320px!important}.w-320,.width-320{width:320px!important;min-width:320px!important;max-width:320px!important}.h-325,.height-325{height:325px!important;min-height:325px!important;max-height:325px!important}.w-325,.width-325{width:325px!important;min-width:325px!important;max-width:325px!important}.h-330,.height-330{height:330px!important;min-height:330px!important;max-height:330px!important}.w-330,.width-330{width:330px!important;min-width:330px!important;max-width:330px!important}.h-335,.height-335{height:335px!important;min-height:335px!important;max-height:335px!important}.w-335,.width-335{width:335px!important;min-width:335px!important;max-width:335px!important}.h-340,.height-340{height:340px!important;min-height:340px!important;max-height:340px!important}.w-340,.width-340{width:340px!important;min-width:340px!important;max-width:340px!important}.h-345,.height-345{height:345px!important;min-height:345px!important;max-height:345px!important}.w-345,.width-345{width:345px!important;min-width:345px!important;max-width:345px!important}.h-350,.height-350{height:350px!important;min-height:350px!important;max-height:350px!important}.w-350,.width-350{width:350px!important;min-width:350px!important;max-width:350px!important}.h-355,.height-355{height:355px!important;min-height:355px!important;max-height:355px!important}.w-355,.width-355{width:355px!important;min-width:355px!important;max-width:355px!important}.h-360,.height-360{height:360px!important;min-height:360px!important;max-height:360px!important}.w-360,.width-360{width:360px!important;min-width:360px!important;max-width:360px!important}.h-365,.height-365{height:365px!important;min-height:365px!important;max-height:365px!important}.w-365,.width-365{width:365px!important;min-width:365px!important;max-width:365px!important}.h-370,.height-370{height:370px!important;min-height:370px!important;max-height:370px!important}.w-370,.width-370{width:370px!important;min-width:370px!important;max-width:370px!important}.h-375,.height-375{height:375px!important;min-height:375px!important;max-height:375px!important}.w-375,.width-375{width:375px!important;min-width:375px!important;max-width:375px!important}.h-380,.height-380{height:380px!important;min-height:380px!important;max-height:380px!important}.w-380,.width-380{width:380px!important;min-width:380px!important;max-width:380px!important}.h-385,.height-385{height:385px!important;min-height:385px!important;max-height:385px!important}.w-385,.width-385{width:385px!important;min-width:385px!important;max-width:385px!important}.h-390,.height-390{height:390px!important;min-height:390px!important;max-height:390px!important}.w-390,.width-390{width:390px!important;min-width:390px!important;max-width:390px!important}.h-395,.height-395{height:395px!important;min-height:395px!important;max-height:395px!important}.w-395,.width-395{width:395px!important;min-width:395px!important;max-width:395px!important}.h-400,.height-400{height:400px!important;min-height:400px!important;max-height:400px!important}.w-400,.width-400{width:400px!important;min-width:400px!important;max-width:400px!important}.h-405,.height-405{height:405px!important;min-height:405px!important;max-height:405px!important}.w-405,.width-405{width:405px!important;min-width:405px!important;max-width:405px!important}.h-410,.height-410{height:410px!important;min-height:410px!important;max-height:410px!important}.w-410,.width-410{width:410px!important;min-width:410px!important;max-width:410px!important}.h-415,.height-415{height:415px!important;min-height:415px!important;max-height:415px!important}.w-415,.width-415{width:415px!important;min-width:415px!important;max-width:415px!important}.h-420,.height-420{height:420px!important;min-height:420px!important;max-height:420px!important}.w-420,.width-420{width:420px!important;min-width:420px!important;max-width:420px!important}.h-425,.height-425{height:425px!important;min-height:425px!important;max-height:425px!important}.w-425,.width-425{width:425px!important;min-width:425px!important;max-width:425px!important}.h-430,.height-430{height:430px!important;min-height:430px!important;max-height:430px!important}.w-430,.width-430{width:430px!important;min-width:430px!important;max-width:430px!important}.h-435,.height-435{height:435px!important;min-height:435px!important;max-height:435px!important}.w-435,.width-435{width:435px!important;min-width:435px!important;max-width:435px!important}.h-440,.height-440{height:440px!important;min-height:440px!important;max-height:440px!important}.w-440,.width-440{width:440px!important;min-width:440px!important;max-width:440px!important}.h-445,.height-445{height:445px!important;min-height:445px!important;max-height:445px!important}.w-445,.width-445{width:445px!important;min-width:445px!important;max-width:445px!important}.h-450,.height-450{height:450px!important;min-height:450px!important;max-height:450px!important}.w-450,.width-450{width:450px!important;min-width:450px!important;max-width:450px!important}.h-455,.height-455{height:455px!important;min-height:455px!important;max-height:455px!important}.w-455,.width-455{width:455px!important;min-width:455px!important;max-width:455px!important}.h-460,.height-460{height:460px!important;min-height:460px!important;max-height:460px!important}.w-460,.width-460{width:460px!important;min-width:460px!important;max-width:460px!important}.h-465,.height-465{height:465px!important;min-height:465px!important;max-height:465px!important}.w-465,.width-465{width:465px!important;min-width:465px!important;max-width:465px!important}.h-470,.height-470{height:470px!important;min-height:470px!important;max-height:470px!important}.w-470,.width-470{width:470px!important;min-width:470px!important;max-width:470px!important}.h-475,.height-475{height:475px!important;min-height:475px!important;max-height:475px!important}.w-475,.width-475{width:475px!important;min-width:475px!important;max-width:475px!important}.h-480,.height-480{height:480px!important;min-height:480px!important;max-height:480px!important}.w-480,.width-480{width:480px!important;min-width:480px!important;max-width:480px!important}.h-485,.height-485{height:485px!important;min-height:485px!important;max-height:485px!important}.w-485,.width-485{width:485px!important;min-width:485px!important;max-width:485px!important}.h-490,.height-490{height:490px!important;min-height:490px!important;max-height:490px!important}.w-490,.width-490{width:490px!important;min-width:490px!important;max-width:490px!important}.h-495,.height-495{height:495px!important;min-height:495px!important;max-height:495px!important}.w-495,.width-495{width:495px!important;min-width:495px!important;max-width:495px!important}.h-500,.height-500{height:500px!important;min-height:500px!important;max-height:500px!important}.w-500,.width-500{width:500px!important;min-width:500px!important;max-width:500px!important}.h-8,.height-8{height:8px!important;min-height:8px!important;max-height:8px!important}.w-8,.width-8{width:8px!important;min-width:8px!important;max-width:8px!important}.h-16,.height-16{height:16px!important;min-height:16px!important;max-height:16px!important}.w-16,.width-16{width:16px!important;min-width:16px!important;max-width:16px!important}.h-24,.height-24{height:24px!important;min-height:24px!important;max-height:24px!important}.w-24,.width-24{width:24px!important;min-width:24px!important;max-width:24px!important}.h-32,.height-32{height:32px!important;min-height:32px!important;max-height:32px!important}.w-32,.width-32{width:32px!important;min-width:32px!important;max-width:32px!important}.h-48,.height-48{height:48px!important;min-height:48px!important;max-height:48px!important}.w-48,.width-48{width:48px!important;min-width:48px!important;max-width:48px!important}.h-56,.height-56{height:56px!important;min-height:56px!important;max-height:56px!important}.w-56,.width-56{width:56px!important;min-width:56px!important;max-width:56px!important}.h-64,.height-64{height:64px!important;min-height:64px!important;max-height:64px!important}.w-64,.width-64{width:64px!important;min-width:64px!important;max-width:64px!important}.h-72,.height-72{height:72px!important;min-height:72px!important;max-height:72px!important}.w-72,.width-72{width:72px!important;min-width:72px!important;max-width:72px!important}.h-88,.height-88{height:88px!important;min-height:88px!important;max-height:88px!important}.w-88,.width-88{width:88px!important;min-width:88px!important;max-width:88px!important}.h-96,.height-96{height:96px!important;min-height:96px!important;max-height:96px!important}.w-96,.width-96{width:96px!important;min-width:96px!important;max-width:96px!important}.h-104,.height-104{height:104px!important;min-height:104px!important;max-height:104px!important}.w-104,.width-104{width:104px!important;min-width:104px!important;max-width:104px!important}.h-112,.height-112{height:112px!important;min-height:112px!important;max-height:112px!important}.w-112,.width-112{width:112px!important;min-width:112px!important;max-width:112px!important}.h-128,.height-128{height:128px!important;min-height:128px!important;max-height:128px!important}.w-128,.width-128{width:128px!important;min-width:128px!important;max-width:128px!important}.h-136,.height-136{height:136px!important;min-height:136px!important;max-height:136px!important}.w-136,.width-136{width:136px!important;min-width:136px!important;max-width:136px!important}.h-144,.height-144{height:144px!important;min-height:144px!important;max-height:144px!important}.w-144,.width-144{width:144px!important;min-width:144px!important;max-width:144px!important}.h-152,.height-152{height:152px!important;min-height:152px!important;max-height:152px!important}.w-152,.width-152{width:152px!important;min-width:152px!important;max-width:152px!important}.h-168,.height-168{height:168px!important;min-height:168px!important;max-height:168px!important}.w-168,.width-168{width:168px!important;min-width:168px!important;max-width:168px!important}.h-176,.height-176{height:176px!important;min-height:176px!important;max-height:176px!important}.w-176,.width-176{width:176px!important;min-width:176px!important;max-width:176px!important}.h-184,.height-184{height:184px!important;min-height:184px!important;max-height:184px!important}.w-184,.width-184{width:184px!important;min-width:184px!important;max-width:184px!important}.h-192,.height-192{height:192px!important;min-height:192px!important;max-height:192px!important}.w-192,.width-192{width:192px!important;min-width:192px!important;max-width:192px!important}.h-208,.height-208{height:208px!important;min-height:208px!important;max-height:208px!important}.w-208,.width-208{width:208px!important;min-width:208px!important;max-width:208px!important}.h-216,.height-216{height:216px!important;min-height:216px!important;max-height:216px!important}.w-216,.width-216{width:216px!important;min-width:216px!important;max-width:216px!important}.h-224,.height-224{height:224px!important;min-height:224px!important;max-height:224px!important}.w-224,.width-224{width:224px!important;min-width:224px!important;max-width:224px!important}.h-232,.height-232{height:232px!important;min-height:232px!important;max-height:232px!important}.w-232,.width-232{width:232px!important;min-width:232px!important;max-width:232px!important}.h-248,.height-248{height:248px!important;min-height:248px!important;max-height:248px!important}.w-248,.width-248{width:248px!important;min-width:248px!important;max-width:248px!important}.h-256,.height-256{height:256px!important;min-height:256px!important;max-height:256px!important}.w-256,.width-256{width:256px!important;min-width:256px!important;max-width:256px!important}.h-264,.height-264{height:264px!important;min-height:264px!important;max-height:264px!important}.w-264,.width-264{width:264px!important;min-width:264px!important;max-width:264px!important}.h-272,.height-272{height:272px!important;min-height:272px!important;max-height:272px!important}.w-272,.width-272{width:272px!important;min-width:272px!important;max-width:272px!important}.h-288,.height-288{height:288px!important;min-height:288px!important;max-height:288px!important}.w-288,.width-288{width:288px!important;min-width:288px!important;max-width:288px!important}.h-296,.height-296{height:296px!important;min-height:296px!important;max-height:296px!important}.w-296,.width-296{width:296px!important;min-width:296px!important;max-width:296px!important}.h-304,.height-304{height:304px!important;min-height:304px!important;max-height:304px!important}.w-304,.width-304{width:304px!important;min-width:304px!important;max-width:304px!important}.h-312,.height-312{height:312px!important;min-height:312px!important;max-height:312px!important}.w-312,.width-312{width:312px!important;min-width:312px!important;max-width:312px!important}.h-328,.height-328{height:328px!important;min-height:328px!important;max-height:328px!important}.w-328,.width-328{width:328px!important;min-width:328px!important;max-width:328px!important}.h-336,.height-336{height:336px!important;min-height:336px!important;max-height:336px!important}.w-336,.width-336{width:336px!important;min-width:336px!important;max-width:336px!important}.h-344,.height-344{height:344px!important;min-height:344px!important;max-height:344px!important}.w-344,.width-344{width:344px!important;min-width:344px!important;max-width:344px!important}.h-352,.height-352{height:352px!important;min-height:352px!important;max-height:352px!important}.w-352,.width-352{width:352px!important;min-width:352px!important;max-width:352px!important}.h-368,.height-368{height:368px!important;min-height:368px!important;max-height:368px!important}.w-368,.width-368{width:368px!important;min-width:368px!important;max-width:368px!important}.h-376,.height-376{height:376px!important;min-height:376px!important;max-height:376px!important}.w-376,.width-376{width:376px!important;min-width:376px!important;max-width:376px!important}.h-384,.height-384{height:384px!important;min-height:384px!important;max-height:384px!important}.w-384,.width-384{width:384px!important;min-width:384px!important;max-width:384px!important}.h-392,.height-392{height:392px!important;min-height:392px!important;max-height:392px!important}.w-392,.width-392{width:392px!important;min-width:392px!important;max-width:392px!important}.h-408,.height-408{height:408px!important;min-height:408px!important;max-height:408px!important}.w-408,.width-408{width:408px!important;min-width:408px!important;max-width:408px!important}.h-416,.height-416{height:416px!important;min-height:416px!important;max-height:416px!important}.w-416,.width-416{width:416px!important;min-width:416px!important;max-width:416px!important}.h-424,.height-424{height:424px!important;min-height:424px!important;max-height:424px!important}.w-424,.width-424{width:424px!important;min-width:424px!important;max-width:424px!important}.h-432,.height-432{height:432px!important;min-height:432px!important;max-height:432px!important}.w-432,.width-432{width:432px!important;min-width:432px!important;max-width:432px!important}.h-448,.height-448{height:448px!important;min-height:448px!important;max-height:448px!important}.w-448,.width-448{width:448px!important;min-width:448px!important;max-width:448px!important}.h-456,.height-456{height:456px!important;min-height:456px!important;max-height:456px!important}.w-456,.width-456{width:456px!important;min-width:456px!important;max-width:456px!important}.h-464,.height-464{height:464px!important;min-height:464px!important;max-height:464px!important}.w-464,.width-464{width:464px!important;min-width:464px!important;max-width:464px!important}.h-472,.height-472{height:472px!important;min-height:472px!important;max-height:472px!important}.w-472,.width-472{width:472px!important;min-width:472px!important;max-width:472px!important}.h-488,.height-488{height:488px!important;min-height:488px!important;max-height:488px!important}.w-488,.width-488{width:488px!important;min-width:488px!important;max-width:488px!important}.h-496,.height-496{height:496px!important;min-height:496px!important;max-height:496px!important}.w-496,.width-496{width:496px!important;min-width:496px!important;max-width:496px!important}.h-504,.height-504{height:504px!important;min-height:504px!important;max-height:504px!important}.w-504,.width-504{width:504px!important;min-width:504px!important;max-width:504px!important}.h-512,.height-512{height:512px!important;min-height:512px!important;max-height:512px!important}.w-512,.width-512{width:512px!important;min-width:512px!important;max-width:512px!important}.h-528,.height-528{height:528px!important;min-height:528px!important;max-height:528px!important}.w-528,.width-528{width:528px!important;min-width:528px!important;max-width:528px!important}.h-536,.height-536{height:536px!important;min-height:536px!important;max-height:536px!important}.w-536,.width-536{width:536px!important;min-width:536px!important;max-width:536px!important}.h-544,.height-544{height:544px!important;min-height:544px!important;max-height:544px!important}.w-544,.width-544{width:544px!important;min-width:544px!important;max-width:544px!important}.h-552,.height-552{height:552px!important;min-height:552px!important;max-height:552px!important}.w-552,.width-552{width:552px!important;min-width:552px!important;max-width:552px!important}.h-568,.height-568{height:568px!important;min-height:568px!important;max-height:568px!important}.w-568,.width-568{width:568px!important;min-width:568px!important;max-width:568px!important}.h-576,.height-576{height:576px!important;min-height:576px!important;max-height:576px!important}.w-576,.width-576{width:576px!important;min-width:576px!important;max-width:576px!important}.h-584,.height-584{height:584px!important;min-height:584px!important;max-height:584px!important}.w-584,.width-584{width:584px!important;min-width:584px!important;max-width:584px!important}.h-592,.height-592{height:592px!important;min-height:592px!important;max-height:592px!important}.w-592,.width-592{width:592px!important;min-width:592px!important;max-width:592px!important}.h-608,.height-608{height:608px!important;min-height:608px!important;max-height:608px!important}.w-608,.width-608{width:608px!important;min-width:608px!important;max-width:608px!important}.h-616,.height-616{height:616px!important;min-height:616px!important;max-height:616px!important}.w-616,.width-616{width:616px!important;min-width:616px!important;max-width:616px!important}.h-624,.height-624{height:624px!important;min-height:624px!important;max-height:624px!important}.w-624,.width-624{width:624px!important;min-width:624px!important;max-width:624px!important}.h-632,.height-632{height:632px!important;min-height:632px!important;max-height:632px!important}.w-632,.width-632{width:632px!important;min-width:632px!important;max-width:632px!important}.h-648,.height-648{height:648px!important;min-height:648px!important;max-height:648px!important}.w-648,.width-648{width:648px!important;min-width:648px!important;max-width:648px!important}.h-656,.height-656{height:656px!important;min-height:656px!important;max-height:656px!important}.w-656,.width-656{width:656px!important;min-width:656px!important;max-width:656px!important}.h-664,.height-664{height:664px!important;min-height:664px!important;max-height:664px!important}.w-664,.width-664{width:664px!important;min-width:664px!important;max-width:664px!important}.h-672,.height-672{height:672px!important;min-height:672px!important;max-height:672px!important}.w-672,.width-672{width:672px!important;min-width:672px!important;max-width:672px!important}.h-688,.height-688{height:688px!important;min-height:688px!important;max-height:688px!important}.w-688,.width-688{width:688px!important;min-width:688px!important;max-width:688px!important}.h-696,.height-696{height:696px!important;min-height:696px!important;max-height:696px!important}.w-696,.width-696{width:696px!important;min-width:696px!important;max-width:696px!important}.h-704,.height-704{height:704px!important;min-height:704px!important;max-height:704px!important}.w-704,.width-704{width:704px!important;min-width:704px!important;max-width:704px!important}.h-712,.height-712{height:712px!important;min-height:712px!important;max-height:712px!important}.w-712,.width-712{width:712px!important;min-width:712px!important;max-width:712px!important}.h-728,.height-728{height:728px!important;min-height:728px!important;max-height:728px!important}.w-728,.width-728{width:728px!important;min-width:728px!important;max-width:728px!important}.h-736,.height-736{height:736px!important;min-height:736px!important;max-height:736px!important}.w-736,.width-736{width:736px!important;min-width:736px!important;max-width:736px!important}.h-744,.height-744{height:744px!important;min-height:744px!important;max-height:744px!important}.w-744,.width-744{width:744px!important;min-width:744px!important;max-width:744px!important}.h-752,.height-752{height:752px!important;min-height:752px!important;max-height:752px!important}.w-752,.width-752{width:752px!important;min-width:752px!important;max-width:752px!important}.h-768,.height-768{height:768px!important;min-height:768px!important;max-height:768px!important}.w-768,.width-768{width:768px!important;min-width:768px!important;max-width:768px!important}.h-776,.height-776{height:776px!important;min-height:776px!important;max-height:776px!important}.w-776,.width-776{width:776px!important;min-width:776px!important;max-width:776px!important}.h-784,.height-784{height:784px!important;min-height:784px!important;max-height:784px!important}.w-784,.width-784{width:784px!important;min-width:784px!important;max-width:784px!important}.h-792,.height-792{height:792px!important;min-height:792px!important;max-height:792px!important}.w-792,.width-792{width:792px!important;min-width:792px!important;max-width:792px!important}.b,.border{border:1px solid rgba(0,0,0,.12)}.border-top,.bt{border-top:1px solid rgba(0,0,0,.12)}.border-right,.br{border-right:1px solid rgba(0,0,0,.12)}.bb,.border-bottom{border-bottom:1px solid rgba(0,0,0,.12)}.bl,.border-left{border-left:1px solid rgba(0,0,0,.12)}.bh,.border-horizontal{border-left:1px solid rgba(0,0,0,.12);border-right:1px solid rgba(0,0,0,.12)}.border-vertical,.bv{border-top:1px solid rgba(0,0,0,.12);border-bottom:1px solid rgba(0,0,0,.12)}.brad-1{border-radius:1px}.brad-2{border-radius:2px}.brad-3{border-radius:3px}.brad-4{border-radius:4px}.brad-5{border-radius:5px}.brad-6{border-radius:6px}.brad-7{border-radius:7px}.brad-8{border-radius:8px}.brad-9{border-radius:9px}.brad-10{border-radius:10px}.brad-11{border-radius:11px}.brad-12{border-radius:12px}@media all{.page-break{display:none}}@media print{.page-break{display:block;break-after:always;page-break-after:always}#main #vertical-navigation{display:none}#main #toolbar{display:none}#main #quick-panel{display:none}#main #content{position:relative!important;top:0!important;right:0!important;bottom:0!important;left:0!important;background:0 0!important}ms-theme-options{display:none}.ps-scrollbar-x-rail,.ps-scrollbar-y-rail{display:none!important}.printable{overflow:visible!important}.printable .template-layout{display:inline!important}}.advanced-search-container{border-bottom:1px rgba(0,0,0,.12) solid}.advanced-search-conditions{border-bottom:1px rgba(0,0,0,.12) solid;padding:4px 0}.advanced-search-conditions .errors{font-size:12px;color:#dd2c00;margin-top:10px}.advanced-search-conditions .advanced-search-chips md-chips-wrap{box-shadow:none}.advanced-search-conditions .advanced-search-chips md-chip{position:relative}.advanced-search-conditions .advanced-search-chips md-chip .md-chip-content md-chip-template span p.filter-text{display:inline-block;margin:0}.advanced-search-conditions .advanced-search-chips md-chip .md-chip-remove-container{position:absolute;right:4px;top:4px;margin-right:0;height:24px}.advanced-search-conditions .advanced-search-chips md-chip .md-chip-remove-container button.remove-filter{position:relative;height:24px;width:24px;line-height:30px;text-align:center;border-radius:50%;border:none;box-shadow:none;padding:0;margin:0;transition:background .15s linear;display:block}.advanced-search-conditions .advanced-search-chips md-chip .md-chip-remove-container button.remove-filter md-icon{position:absolute;top:50%;left:50%;transform:translate3d(-50%,-50%,0);color:#616161}.advanced-search-conditions .advanced-search-chips md-chip .md-chip-remove-container button.remove-filter md-icon:focus,.advanced-search-conditions .advanced-search-chips md-chip .md-chip-remove-container button.remove-filter md-icon:hover{color:rgba(255,0,0,.8)}.advanced-search-conditions .advanced-search-chips md-chips-wrap.md-removable md-chip md-chip-template{padding-right:5px}.advanced-search-bar{padding:10px 0}.advanced-search-bar md-input-container.no-errors{font-size:12px;transition:0s none;-webkit-transition:0s none;animation:0s none;-webkit-animation:0s none}.advanced-search-bar md-input-container.no-errors input{font-family:Arial Unicode MS,Arial,Helvetica}.advanced-search-bar md-input-container.no-errors .md-errors-spacer{min-height:0}md-option div div.operators-list{display:table}md-option div div.operators-list span{display:table-cell}md-option div div.operators-list span.operator-symbol{display:table-cell;font-size:14px;width:30px}.advanced-search-bar mdp-date-picker button{margin:0!important}.advanced-search-bar mdp-date-picker md-input-container{flex:1;margin:0}.advanced-search-bar mdp-date-picker md-input-container label{font-size:12px}.advanced-search-bar mdp-date-picker md-input-container .md-errors-spacer{min-height:0}.advanced-search-bar div md-date-range{font-size:12px;margin-left:10px}.advanced-search-bar div.autocomplete-input md-icon{margin:8px 8px 8px 0}.advanced-search-bar div.autocomplete-input md-autocomplete{font-size:12px!important}.advanced-search-bar div.autocomplete-input md-autocomplete md-autocomplete-wrap{height:0}.advanced-search-bar div.autocomplete-input md-autocomplete md-autocomplete-wrap md-input-container{margin:0}.advanced-search-bar div.autocomplete-input md-autocomplete md-autocomplete-wrap md-input-container input[type=search]{padding:0!important}.advanced-search-bar div.autocomplete-input md-autocomplete md-autocomplete-wrap md-input-container div.md-errors-spacer{min-height:0}md-toolbar.advanced-search-dialog-header{background-image:url(/assets/images/backgrounds/header-bg.png);background-position:top}.md-autocomplete-suggestions-container li .highlight,.md-autocomplete-suggestions-container.md-default-theme li .highlight{color:#ca1d1d;font-weight:700}.chip-disabled{opacity:.4}.ms-card{display:flex;flex-direction:row;padding:8px}.ms-card .ms-card-content-wrapper{position:relative;overflow:hidden;width:100%;max-width:400px;border-radius:2px;background:#fff;box-shadow:0 3px 1px -2px rgba(0,0,0,.14),0 2px 2px 0 rgba(0,0,0,.098),0 1px 5px 0 rgba(0,0,0,.084)}.ms-card .template-1 .media .image{width:100%;border-radius:2px 2px 0 0}.ms-card .template-10 .media{width:80px;min-width:80px;max-width:80px}.ms-card .template-2 .header .avatar .image{display:block;width:40px;height:40px;border-radius:20px}.ms-card .template-2 .media .image{width:100%}.ms-card .template-4 .info{position:absolute;right:0;bottom:0;left:0;z-index:2;background:rgba(0,0,0,.54)}.ms-card .template-4 .media{z-index:1}.ms-card .template-4 .media .image{width:100%}.ms-card .template-5 .media{width:80px;min-width:80px;max-width:80px}.ms-card .template-5 .info,.ms-card .template-5 .media{-ms-flex:0 1 auto}.ms-card .template-8 .media .image{width:100%;border-radius:2px 2px 0 0}.ms-card .template-9 .header .avatar .image{display:block;width:40px;height:40px;border-radius:20px}.ms-card .template-9 .media .image{width:100%}md-tooltip.client-side-logging-tooltip div.md-content{height:auto;max-width:200px;white-space:normal;text-align:center}md-list-item .md-list-item-text p.ms-dual-multiselect-line-xs{font-size:10px!important;padding-top:5px}md-list-item md-icon.hidden{visibility:hidden}md-icon.add-disabled{cursor:default!important;opacity:.4}md-list-item.read-only-mode{cursor:none!important}.ms-form-wizard{background:#fff;box-shadow:0 1px 3px 0 rgba(0,0,0,.2),0 1px 1px 0 rgba(0,0,0,.14),0 2px 1px -1px rgba(0,0,0,.12)}.ms-form-wizard md-tabs md-tabs-wrapper{box-shadow:0 1px 3px 0 rgba(0,0,0,.2),0 1px 1px 0 rgba(0,0,0,.14),0 2px 1px -1px rgba(0,0,0,.12)}.ms-form-wizard md-tabs md-tabs-wrapper md-tabs-canvas{height:72px}.ms-form-wizard md-tabs md-tabs-wrapper md-tabs-canvas md-pagination-wrapper{height:72px}.ms-form-wizard md-tabs md-tabs-wrapper md-tabs-canvas md-pagination-wrapper md-tab-item{opacity:1!important;padding:24px}.ms-form-wizard md-tabs md-tabs-wrapper md-tabs-canvas md-pagination-wrapper md-tab-item:before{content:'';display:block;position:absolute;top:50%;left:0;right:50%;border-bottom:1px solid rgba(0,0,0,.12);z-index:8}.ms-form-wizard md-tabs md-tabs-wrapper md-tabs-canvas md-pagination-wrapper md-tab-item:after{content:'';display:block;position:absolute;top:50%;left:50%;right:0;border-bottom:1px solid rgba(0,0,0,.12);z-index:8}.ms-form-wizard md-tabs md-tabs-wrapper md-tabs-canvas md-pagination-wrapper md-tab-item:first-of-type:before{display:none}.ms-form-wizard md-tabs md-tabs-wrapper md-tabs-canvas md-pagination-wrapper md-tab-item:last-of-type:after{display:none}.ms-form-wizard md-tabs md-tabs-wrapper md-tabs-canvas md-pagination-wrapper md-tab-item.md-disabled .ms-form-wizard-step-label .ms-form-wizard-step-number{background:rgba(0,0,0,.12)!important}.ms-form-wizard md-tabs md-tabs-wrapper md-tabs-canvas md-pagination-wrapper md-tab-item .md-ripple-container{z-index:11}.ms-form-wizard md-tabs md-tabs-wrapper md-tabs-canvas md-ink-bar{display:none!important}.ms-form-wizard .ms-form-wizard-step-label{display:inline-block;position:relative;background:#fff;z-index:10;padding:0 16px;line-height:24px}.ms-form-wizard .ms-form-wizard-step-label .ms-form-wizard-step-number{display:inline-block;vertical-align:middle;width:24px;height:24px;line-height:24px;font-size:14px;margin-right:12px;border-radius:50%;color:#fff!important}.ms-form-wizard .ms-form-wizard-step-label .ms-form-wizard-step-number i{line-height:24px!important}.ms-form-wizard .ms-form-wizard-step-label .ms-form-wizard-step-text{display:inline-block;vertical-align:middle;position:relative;line-height:24px}.ms-form-wizard .ms-form-wizard-form{padding:24px 16px}.ms-form-wizard .navigation{padding:16px}.ms-form-wizard .navigation .steps{display:flex;align-items:center;justify-content:center;padding:0 16px}.ms-form-wizard .navigation .steps span{width:5px;height:5px;margin:0 4px;border-radius:50%}.ms-form-wizard .navigation .steps span:not(.md-accent-bg){background:rgba(0,0,0,.12)}.ms-form-wizard .navigation .steps span.selected{width:8px;height:8px}ms-info-bar{display:block;position:relative;width:100%;height:44px;background-color:#e91e63;z-index:99998;box-shadow:0 1px 5px 0 rgba(0,0,0,.2),0 2px 2px 0 rgba(0,0,0,.14),0 3px 1px -2px rgba(0,0,0,.12)}ms-info-bar #ms-info-bar-message{padding:8px 16px;line-height:28px;font-size:14px}ms-info-bar #ms-info-bar-message a{overflow:hidden;height:48px;color:#fff}ms-masonry{width:100%;display:block}ms-masonry [ms-masonry-item],ms-masonry ms-masonry-item{transition:transform .3s ease;position:absolute;transform:translate3d(50vw,100vh,0)}ms-material-color-picker md-menu .md-button{font-size:12px}md-menu-content.ms-material-color-picker-menu-content{width:208px;max-width:208px;min-width:208px;padding:0;overflow:hidden}md-menu-content.ms-material-color-picker-menu-content header{height:48px;text-transform:uppercase}md-menu-content.ms-material-color-picker-menu-content header .md-button{display:flex;margin:0}md-menu-content.ms-material-color-picker-menu-content header>span{line-height:13px}md-menu-content.ms-material-color-picker-menu-content .colors{position:relative;width:208px;min-height:258px;height:258px;padding:4px}md-menu-content.ms-material-color-picker-menu-content .colors .color{position:relative;width:46px;height:46px;margin:2px;border-radius:0;cursor:pointer}md-menu-content.ms-material-color-picker-menu-content .colors .color .label{padding:2px;font-size:10px}md-menu-content.ms-material-color-picker-menu-content .colors .color .icon-check{position:absolute;top:2px;right:2px;font-size:16px;opacity:.7}ms-nav{display:block;position:relative;color:rgba(255,255,255,.7);user-select:none;z-index:70}ms-nav ms-nav-item{display:block;position:relative;line-height:48px}ms-nav ms-nav-item.ms-nav-title{line-height:32px;font-size:12px;font-weight:500;margin-top:8px;padding:0 24px;width:100%;color:rgba(255,255,255,.3);text-transform:uppercase;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}ms-nav ms-nav-item .ms-nav-button{display:flex;align-self:flex-start;align-items:center;position:relative;cursor:pointer;padding:0 48px 0 24px;color:rgba(255,255,255,.7);text-decoration:none}ms-nav ms-nav-item .ms-nav-button:not(.active):hover{background:rgba(0,0,0,.1);text-decoration:none}ms-nav ms-nav-item .ms-nav-button .ms-nav-label{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;transition:opacity .2s ease-in-out .1s}ms-nav ms-nav-item .ms-nav-button .arrow{position:absolute;top:16px;right:24px;margin:0;transition:transform .3s ease-in-out,opacity .2s ease-in-out .1s}ms-nav ms-nav-item .ms-nav-button .ms-nav-badge{position:absolute;top:50%;right:24px;min-width:20px;height:20px;line-height:20px;padding:0 7px;font-size:11px;font-weight:700;border-radius:20px;transform:translateY(-50%);transition:opacity .2s ease-in-out .1s}ms-nav ms-nav-item .ms-nav-button.active{color:#fff!important}ms-nav ms-nav-item .ms-nav-button.active .ms-nav-badge{background:#fff!important;color:rgba(0,0,0,.87)!important}ms-nav ms-nav-item .ms-nav-button.active i{color:#fff}ms-nav ms-nav-item i{color:rgba(255,255,255,.7);margin:0 16px 0 0}ms-nav .ms-nav-toggle ms-nav-toggle-items{display:none;overflow:hidden}ms-nav .ms-nav-toggle ms-nav-toggle-items.expand-animation{transition:height .35s cubic-bezier(.25,.46,.45,.94)}ms-nav .ms-nav-toggle ms-nav-toggle-items.collapse-animation{transition:height .35s cubic-bezier(.25,.46,.45,.94)}ms-nav .ms-nav-toggle ms-nav-toggle-items ms-nav-item .ms-nav-button{padding-left:58px}ms-nav .ms-nav-toggle ms-nav-toggle-items ms-nav-item ms-nav-toggle-items ms-nav-item .ms-nav-button{padding-left:68px}ms-nav .ms-nav-toggle ms-nav-toggle-items ms-nav-item ms-nav-toggle-items ms-nav-item ms-nav-toggle-items ms-nav-item .ms-nav-button{padding-left:78px}ms-nav .ms-nav-toggle ms-nav-toggle-items ms-nav-item ms-nav-toggle-items ms-nav-item ms-nav-toggle-items ms-nav-item ms-nav-toggle-items ms-nav-item .ms-nav-button{padding-left:88px}ms-nav .ms-nav-toggle ms-nav-toggle-items ms-nav-item ms-nav-toggle-items ms-nav-item ms-nav-toggle-items ms-nav-item ms-nav-toggle-items ms-nav-item ms-nav-toggle-items ms-nav-item .ms-nav-button{padding-left:98px}ms-nav .ms-nav-toggle.active>.ms-nav-button{color:#fff}ms-nav .ms-nav-toggle.active>.ms-nav-button a,ms-nav .ms-nav-toggle.active>.ms-nav-button md-icon{color:#fff}ms-nav .ms-nav-toggle[collapsed=false]>.ms-nav-button>.arrow{transform:rotate(90deg)}ms-nav>.ms-nav-toggle[collapsed=false]{background-color:rgba(0,0,0,.12)}@media only screen and (min-width:1280px){.ms-nav-folded #ms-nav-fold-close-overlay{position:absolute;top:0;right:0;bottom:0;left:0;background:0 0;z-index:998}.ms-nav-folded #ms-nav-fold-open-overlay{position:absolute;top:0;right:0;bottom:0;left:0;z-index:999}.ms-nav-folded:not(.ms-nav-folded-open) ms-nav ms-nav-item.ms-nav-title{height:32px}.ms-nav-folded:not(.ms-nav-folded-open) ms-nav ms-nav-item.ms-nav-title:before{content:'';display:block;position:relative;top:12px;width:16px;border-top:1px solid rgba(255,255,255,.12)}.ms-nav-folded:not(.ms-nav-folded-open) ms-nav ms-nav-item.ms-nav-title span{display:none}.ms-nav-folded:not(.ms-nav-folded-open) ms-nav ms-nav-item .ms-nav-button{height:48px}.ms-nav-folded:not(.ms-nav-folded-open) ms-nav ms-nav-item .ms-nav-button>.arrow,.ms-nav-folded:not(.ms-nav-folded-open) ms-nav ms-nav-item .ms-nav-button>.ms-nav-badge,.ms-nav-folded:not(.ms-nav-folded-open) ms-nav ms-nav-item .ms-nav-button>.ms-nav-label{opacity:0;visibility:hidden}}.ms-navigation{display:block;position:relative;color:rgba(255,255,255,.7);user-select:none}.ms-navigation li,.ms-navigation ul{padding:0;margin:0}.ms-navigation ul{display:block;overflow:hidden}.ms-navigation ul li{position:relative}.ms-navigation ul li.collapsed ul{display:none}.ms-navigation .animate-height{transition:height .25s cubic-bezier(.25,.46,.45,.94)}.ms-navigation .ms-navigation-node .ms-navigation-item{display:block;position:relative;cursor:pointer;color:rgba(255,255,255,.7)}.ms-navigation .ms-navigation-node .ms-navigation-item:hover{background:rgba(0,0,0,.1)}.ms-navigation .ms-navigation-node .ms-navigation-item>.ms-navigation-button{display:flex;position:relative;width:100%;height:48px;line-height:48px;flex-direction:row;justify-content:flex-start;align-items:center;padding-right:16px;color:rgba(255,255,255,.7);text-decoration:none;white-space:nowrap;overflow:hidden}.ms-navigation .ms-navigation-node .ms-navigation-item>.ms-navigation-button .icon{color:rgba(255,255,255,.7);margin:0 16px 0 0}.ms-navigation .ms-navigation-node .ms-navigation-item>.ms-navigation-button span{white-space:nowrap;overflow:hidden;opacity:1;transition:opacity .25s ease-in-out .1s}.ms-navigation .ms-navigation-node .ms-navigation-item>.ms-navigation-button a{white-space:nowrap;overflow:hidden;opacity:1;transition:opacity .25s ease-in-out .1s}.ms-navigation .ms-navigation-node .ms-navigation-item>.ms-navigation-button .arrow{margin:0;opacity:1;transition:transform .3s ease-in-out,opacity .25s ease-in-out .1s}.ms-navigation .ms-navigation-node .ms-navigation-item>.ms-navigation-button .badge{position:absolute;top:50%;right:16px;min-width:20px;height:20px;line-height:20px;padding:0 7px;font-size:11px;font-weight:700;border-radius:20px;transform:translateY(-50%);transition:opacity .2s ease-in-out .1s}.ms-navigation .ms-navigation-node .ms-navigation-item>.ms-navigation-button.active{color:#fff}.ms-navigation .ms-navigation-node .ms-navigation-item>.ms-navigation-button.active .icon{color:#fff}.ms-navigation .ms-navigation-node .ms-navigation-item>.ms-navigation-button.active .badge{background:#fff!important;color:rgba(0,0,0,.87)!important}.ms-navigation .ms-navigation-node:not(.collapsed)>.ms-navigation-item>.ms-navigation-button .arrow{transform:rotate(90deg)}.ms-navigation .ms-navigation-node.group>.ms-navigation-item{font-size:12px;font-weight:500;margin-top:8px;cursor:auto;background:0 0!important;text-transform:uppercase;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.ms-navigation .ms-navigation-node.group>.ms-navigation-item>.ms-navigation-button{height:32px;line-height:32px;color:rgba(255,255,255,.3)}.ms-navigation .ms-navigation-node:not(.group).has-children:not(.collapsed){background-color:rgba(0,0,0,.12)}.ms-navigation .ms-navigation-node:not(.group).has-children.collapsing{background-color:rgba(0,0,0,.12)}.ms-navigation .ms-navigation-node:not(.group).has-children .has-children:not(.collapsed){background:0 0}.ms-navigation li .ms-navigation-button{padding-left:24px}.ms-navigation li li .ms-navigation-button{padding-left:56px}.ms-navigation li li li .ms-navigation-button{padding-left:72px}.ms-navigation li li li li .ms-navigation-button{padding-left:88px}.ms-navigation li li li li li .ms-navigation-button{padding-left:104px}.ms-navigation li.group .ms-navigation-button{padding-left:24px}.ms-navigation li.group li .ms-navigation-button{padding-left:24px}.ms-navigation li.group li li .ms-navigation-button{padding-left:56px}.ms-navigation li.group li li li .ms-navigation-button{padding-left:72px}.ms-navigation li.group li li li li .ms-navigation-button{padding-left:88px}#horizontal-navigation{height:64px;min-height:64px;max-height:64px;background:#fff;z-index:54}#horizontal-navigation .ms-navigation-horizontal{display:flex;position:relative;user-select:none}#horizontal-navigation .ms-navigation-horizontal li,#horizontal-navigation .ms-navigation-horizontal ul{padding:0;margin:0;list-style:none}#horizontal-navigation .ms-navigation-horizontal .horizontal{display:flex;flex:1}#horizontal-navigation .ms-navigation-horizontal .horizontal li{position:relative;cursor:pointer}#horizontal-navigation .ms-navigation-horizontal .horizontal li:not(.active):hover{background:rgba(0,0,0,.12)}#horizontal-navigation .ms-navigation-horizontal .horizontal>li>.ms-navigation-horizontal-item>.ms-navigation-horizontal-button{display:block;float:left;padding:12px 14px}#horizontal-navigation .ms-navigation-horizontal .horizontal>li>.ms-navigation-horizontal-item>.ms-navigation-horizontal-button .arrow{display:none}#horizontal-navigation .ms-navigation-horizontal .horizontal>li>.ms-navigation-horizontal-item>.ms-navigation-horizontal-button.active{background:0 0;border-bottom:2px solid}#horizontal-navigation .ms-navigation-horizontal .horizontal>li:last-child{margin-right:0}#horizontal-navigation .ms-navigation-horizontal .horizontal>li li .ms-navigation-horizontal-item .ms-navigation-horizontal-button.active{color:#fff!important}#horizontal-navigation .ms-navigation-horizontal .horizontal .has-children ul{display:none;position:absolute;background:#fff;z-index:999;min-width:200px;box-shadow:0 5px 5px -3px rgba(0,0,0,.2),0 8px 10px 1px rgba(0,0,0,.14),0 3px 14px 2px rgba(0,0,0,.12);top:0;left:100%}#horizontal-navigation .ms-navigation-horizontal .horizontal .has-children:hover>ul{display:block}#horizontal-navigation .ms-navigation-horizontal .horizontal>.has-children>ul{top:100%;left:0}#horizontal-navigation .ms-navigation-horizontal .horizontal .ms-navigation-horizontal-item .ms-navigation-horizontal-button{display:flex;align-items:center;width:100%;color:rgba(0,0,0,.87);white-space:nowrap;padding:14px 16px;text-decoration:none}#horizontal-navigation .ms-navigation-horizontal .horizontal .ms-navigation-horizontal-item .ms-navigation-horizontal-button .icon{color:rgba(0,0,0,.54);margin-right:8px}#horizontal-navigation .ms-navigation-horizontal .horizontal .ms-navigation-horizontal-item .ms-navigation-horizontal-button .badge{min-width:20px;height:20px;line-height:20px;padding:0 7px;font-size:11px;font-weight:700;border-radius:20px;transition:opacity .2s ease-in-out .1s}#horizontal-navigation .ms-navigation-horizontal .horizontal .ms-navigation-horizontal-item .ms-navigation-horizontal-button .arrow{margin-left:8px}#horizontal-navigation .ms-navigation-horizontal .horizontal .ms-navigation-horizontal-item .ms-navigation-horizontal-button.active .badge{background:#fff!important;color:rgba(0,0,0,.87)!important}#horizontal-navigation .ms-navigation-horizontal .horizontal .ms-navigation-horizontal-item .ms-navigation-horizontal-button.active .icon{color:#fff}@media only screen and (min-width:960px){body.ms-navigation-folded:not(.ms-navigation-folded-open) .ms-navigation .animate-height{transition:none}body.ms-navigation-folded:not(.ms-navigation-folded-open) .ms-navigation .ms-navigation-node .ms-navigation-item .ms-navigation-button .icon{margin:0}body.ms-navigation-folded:not(.ms-navigation-folded-open) .ms-navigation .ms-navigation-node .ms-navigation-item .ms-navigation-button .arrow,body.ms-navigation-folded:not(.ms-navigation-folded-open) .ms-navigation .ms-navigation-node .ms-navigation-item .ms-navigation-button .badge,body.ms-navigation-folded:not(.ms-navigation-folded-open) .ms-navigation .ms-navigation-node .ms-navigation-item .ms-navigation-button .title{opacity:0;visibility:hidden}body.ms-navigation-folded:not(.ms-navigation-folded-open) .ms-navigation .ms-navigation-node.group>.ms-navigation-item .ms-navigation-button:before{content:'';display:block;position:relative;width:16px;border-top:1px solid rgba(255,255,255,.12)}body.ms-navigation-folded:not(.ms-navigation-folded-open) #ms-navigation-fold-expander{position:absolute;top:0;right:0;bottom:0;left:0;z-index:999}body.ms-navigation-folded #ms-navigation-fold-collapser{position:absolute;top:0;right:0;bottom:0;left:0;z-index:59}}@media only screen and (max-width:960px){body.ms-navigation-horizontal-mobile-menu-active #horizontal-navigation .navigation-toggle{height:64px;margin-right:16px}body.ms-navigation-horizontal-mobile-menu-active #horizontal-navigation .navigation-toggle .md-button{margin:0;width:64px;height:64px}body.ms-navigation-horizontal-mobile-menu-active #horizontal-navigation .ms-navigation-horizontal{display:block!important;background:#fff}#horizontal-navigation{z-index:60}#horizontal-navigation .ms-navigation-horizontal{position:absolute;display:none;top:0;right:0;bottom:0;left:0;padding:0 0 16px 0;z-index:9998;overflow-x:hidden;overflow-y:scroll}#horizontal-navigation .ms-navigation-horizontal .horizontal{flex-direction:column;min-height:100%;width:100%}#horizontal-navigation .ms-navigation-horizontal .horizontal li:not(.active):hover{background:0 0}#horizontal-navigation .ms-navigation-horizontal .horizontal li:not(.active) .ms-navigation-horizontal-item{margin:4px}#horizontal-navigation .ms-navigation-horizontal .horizontal li:not(.active) .ms-navigation-horizontal-item:hover{background:rgba(0,0,0,.12)}#horizontal-navigation .ms-navigation-horizontal .horizontal>li{padding:0 12px}#horizontal-navigation .ms-navigation-horizontal .horizontal>li>.ms-navigation-horizontal-item>.ms-navigation-horizontal-button{display:flex;float:none}#horizontal-navigation .ms-navigation-horizontal .horizontal>li>.ms-navigation-horizontal-item>.ms-navigation-horizontal-button .arrow{display:block}#horizontal-navigation .ms-navigation-horizontal .horizontal .has-children ul{position:relative;top:0;left:0;box-shadow:none}#horizontal-navigation .ms-navigation-horizontal .horizontal .has-children:hover>ul{display:none}#horizontal-navigation .ms-navigation-horizontal .horizontal .has-children .expanded>.ms-navigation-horizontal-button .arrow{transform:rotate(90deg)}#horizontal-navigation .ms-navigation-horizontal .horizontal .has-children .expanded+ul{display:block;margin-left:16px}#horizontal-navigation .ms-navigation-horizontal .horizontal .ms-navigation-horizontal-item{min-height:48px;height:48px}}md-dialog.md-phonebar-dialog{max-width:720px;width:720px}md-dialog.md-phonebar-dialog md-dialog-content{display:block;position:relative;height:500px}md-dialog.md-phonebar-dialog md-toolbar .title{font-size:17px}md-dialog.md-phonebar-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.md-phonebar-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}md-dialog.md-phonebar-dialog md-tabs{position:static}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}.ms-phonebar{height:64px;font-size:13px}.ms-phonebar .phonebar-container{height:64px;padding:0}.ms-phonebar .phonebar-container .quantity-indicator{display:inline-block;vertical-align:middle;width:8px;height:8px;border-radius:4px;margin-right:5px;margin-left:5px}.ms-phonebar .phonebar-container .sessions{overflow-x:auto}.ms-phonebar .phonebar-container .session{border-radius:3px;border:1px solid #dcdcdc;margin-left:3px;cursor:pointer}.ms-phonebar .phonebar-container .session-info{padding-left:3px;padding-right:3px;color:grey}.ms-phonebar .phonebar-container .session-button{border:1px solid grey;margin:3px}.ms-phonebar .phonebar-container .button-bar{border:1px solid grey}.ms-phonebar .phonebar-container .num-pad{position:fixed;border-radius:3px;border:1px solid #9e9e9e;top:80px;left:80px}.ms-phonebar .phonebar-container .num-pad-logo{height:40px;width:42px}.ms-phonebar .phonebar-container p{margin:0;padding:0 0 10px 0;line-height:10px;font-size:10px}.ms-phonebar .phonebar-container .span4{width:50px;float:left;margin:8px}.ms-phonebar .phonebar-container .num{border:1px solid #9e9e9e;-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px;height:50px;background-color:#fff;color:#333;cursor:pointer}.ms-phonebar .phonebar-container .num:hover{background-color:#9e9e9e;color:#fff;transition-property:background-color .2s linear 0s;-moz-transition:background-color .2s linear 0s;-webkit-transition:background-color .2s linear 0s;-o-transition:background-color .2s linear 0s}.ms-phonebar .phonebar-container .txt{font-size:20px;text-align:center;margin-top:3px;font-family:Lato,sans-serif;color:#333}.ms-phonebar .phonebar-container .small{font-size:15px}.ms-phonebar .phonebar-container .angucomplete-dropdown{top:45px;overflow-y:auto;max-height:200px}.ms-phonebar .phonebar-container .highlight{color:red}.ms-phonebar .phonebar-container .input-number{margin-left:5px;padding:8px;border:1px solid #ccc;border-radius:3px;box-sizing:border-box}.ms-phonebar .phonebar-container .phonebar{position:relative}.ms-phonebar .phonebar-container .phonebar>div{height:64px;min-width:44px}.ms-phonebar .phonebar-container .phonebar>div.dragging{cursor:grabbing}.ms-phonebar .phonebar-container .phonebar>div.dragging .md-ripple-container{display:none}.ms-phonebar .phonebar-container .phonebar>div.ghost .shortcut{opacity:.27}.ms-phonebar .phonebar-container.mobile-bar-active{position:absolute;top:0;right:0;bottom:0;left:0;background:#fff;z-index:99;max-width:none!important}.ms-phonebar .phonebar-container.mobile-bar-active .phonebar,.ms-phonebar .phonebar-container.mobile-bar-active .toggle-mobile-menu{display:flex!important}.ms-phonebar .phonebar-container.mobile-bar-active .toggle-mobile-menu{margin-left:14px}.ms-phonebar .phonebar-container.mobile-bar-active>div{border-right:1px solid rgba(0,0,0,.12)}.quick-filter-container md-select .md-select-value.md-select-placeholder{color:inherit}.quick-filter-container md-select[multiple] md-select-value>:first-child{max-width:250px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:block}.ms-responsive-table-wrapper{overflow-x:auto;overflow-y:hidden}.ms-search-bar{height:64px;font-size:13px}.ms-search-bar .ms-search-bar-collapser,.ms-search-bar .ms-search-bar-expander{cursor:pointer;padding:0 20px;margin:0;width:64px!important;height:64px!important;line-height:64px!important}.ms-search-bar .ms-search-bar-loader{width:64px!important;height:64px!important;line-height:64px!important}.ms-search-bar .ms-search-button-expanded{pointer-events:none}.ms-search-bar .ms-search-bar-collapser{display:none}.ms-search-bar input{background-color:transparent;font-size:16px}.ms-search-bar .ms-search-bar-results{position:absolute;top:64px;left:0;right:0;overflow-x:hidden;overflow-y:scroll;background:#fff;max-height:300px;box-shadow:0 1px 8px 0 rgba(0,0,0,.2),0 3px 4px 0 rgba(0,0,0,.14),0 3px 3px -2px rgba(0,0,0,.12)}.ms-search-bar .ms-search-bar-results .no-results{font-size:18px;padding:16px;color:rgba(0,0,0,.54)}.ms-search-bar .ms-search-bar-results .result{position:relative;height:56px;min-height:56px;max-height:56px;padding:16px;cursor:pointer}.ms-search-bar .ms-search-bar-results .result.selected{background:rgba(0,0,0,.07)}.ms-search-bar .ms-search-bar-results .result .icon-container{min-width:32px;margin-right:8px}.ms-search-bar .ms-search-bar-results .result .icon-container .square{width:6px;height:6px}.ms-search-bar .ms-search-bar-results .result .title{font-size:16px}.ms-search-bar .ms-search-bar-results .result .description{padding-top:6px;font-size:14px}.ms-search-bar.expanded{position:absolute;top:0;right:0;bottom:0;left:0;background:#fff;z-index:10}.ms-search-bar.expanded #ms-search-bar-input{display:block}.ms-search-bar.expanded .ms-search-bar-collapser{display:block}.ms-search-bar.down{top:64px;border-bottom:1px rgba(0,0,0,.12) solid}.ms-search-bar[disabled] input{pointer-events:none}body.ms-search-bar-expanded #toolbar{z-index:999!important}@media screen and (max-width:960px){.ms-search-bar-label{padding:0 8px 0 12px}}.ms-shortcuts{height:64px;font-size:13px}.ms-shortcuts .shortcuts-container{height:64px;padding:0 8px;max-width:400px}.ms-shortcuts .shortcuts-container .shortcuts{position:relative;overflow-x:scroll}.ms-shortcuts .shortcuts-container .shortcuts>div{height:64px;min-width:44px}.ms-shortcuts .shortcuts-container .shortcuts>div.dragging{cursor:grabbing}.ms-shortcuts .shortcuts-container .shortcuts>div.dragging .md-ripple-container{display:none}.ms-shortcuts .shortcuts-container .shortcuts>div.ghost .shortcut{opacity:.27}.ms-shortcuts .shortcuts-container .shortcuts>div .shortcut{margin:2px}.ms-shortcuts .shortcuts-container .shortcuts>div .shortcut .first-letter{display:inline-block;vertical-align:middle;font-size:20px;text-transform:uppercase;color:rgba(0,0,0,.54)}.ms-shortcuts .shortcuts-container .shortcut-menu{margin:0}.ms-shortcuts .shortcuts-container.mobile-bar-active{position:absolute;top:0;right:0;bottom:0;left:0;background:#fff;z-index:99;max-width:none!important}.ms-shortcuts .shortcuts-container.mobile-bar-active .shortcut-menu,.ms-shortcuts .shortcuts-container.mobile-bar-active .shortcuts,.ms-shortcuts .shortcuts-container.mobile-bar-active .toggle-mobile-menu{display:flex!important}.ms-shortcuts .shortcuts-container.mobile-bar-active .toggle-mobile-menu{margin-left:14px}.ms-shortcuts .shortcuts-container.mobile-bar-active>div{border-right:1px solid rgba(0,0,0,.12)}#ms-shortcut-add-menu{position:relative;width:240px;min-width:240px;max-width:240px}#ms-shortcut-add-menu .add-shortcut-button{width:48px;height:48px;padding:0 12px;margin:0}#ms-shortcut-add-menu .shortcut-search{height:45px;padding:0 8px}#ms-shortcut-add-menu .shortcut-search .search-icon{width:40px;height:40px;line-height:48px}#ms-shortcut-add-menu .shortcut-search .shortcut-loader{padding:10px}#ms-shortcut-add-menu .shortcut-search input{padding:8px}#ms-shortcut-add-menu .results{position:relative;overflow-y:scroll;max-height:233px;margin-top:8px;padding-top:8px;border-top:1px solid rgba(0,0,0,.12)}#ms-shortcut-add-menu .results .no-results{font-size:18px;padding:16px;color:rgba(0,0,0,.54)}#ms-shortcut-add-menu .results .result{position:relative;min-height:56px;padding:16px;cursor:pointer}#ms-shortcut-add-menu .results .result.selected{background:rgba(0,0,0,.07)}#ms-shortcut-add-menu .results .result .icon-container{min-width:32px;margin-right:8px}#ms-shortcut-add-menu .results .result .icon-container .square{width:6px;height:6px}#ms-shortcut-add-menu .results .result .title{font-size:16px}#ms-shortcut-add-menu .results .result .description{padding-top:6px;font-size:14px}#splash-screen{display:block;position:absolute;top:0;left:0;right:0;bottom:0;background-color:#3c4252;z-index:99999}#splash-screen.ng-leave{opacity:1;transition:all linear .2s}#splash-screen.ng-leave-active{opacity:0}#splash-screen .center{display:block;width:100%;position:absolute;top:50%;transform:translateY(-50%)}#splash-screen .logo{width:96px;height:96px;line-height:96px;margin:0 auto;font-family:Helvetica Neue,Helvetica,Arial,sans-serif;font-size:56px;text-align:center;border-radius:2px;background-color:#039be5;color:#fff;box-shadow:0 2px 14px 0 rgba(0,0,0,.22)}#splash-screen .spinner-wrapper{display:block;position:relative;width:100%;min-height:100px;height:100px}#splash-screen .spinner-wrapper .spinner{position:absolute;overflow:hidden;left:50%;margin-left:-50px;animation:outer-rotate 2.91667s linear infinite}#splash-screen .spinner-wrapper .spinner .inner{width:100px;height:100px;position:relative;animation:sporadic-rotate 5.25s cubic-bezier(.35,0,.25,1) infinite}#splash-screen .spinner-wrapper .spinner .inner .gap{position:absolute;left:49px;right:49px;top:0;bottom:0;border-top:10px solid;box-sizing:border-box}#splash-screen .spinner-wrapper .spinner .inner .left,#splash-screen .spinner-wrapper .spinner .inner .right{position:absolute;top:0;height:100px;width:50px;overflow:hidden}#splash-screen .spinner-wrapper .spinner .inner .left .half-circle,#splash-screen .spinner-wrapper .spinner .inner .right .half-circle{position:absolute;top:0;width:100px;height:100px;box-sizing:border-box;border:10px solid #4285f4;border-bottom-color:transparent;border-radius:50%}#splash-screen .spinner-wrapper .spinner .inner .left{left:0}#splash-screen .spinner-wrapper .spinner .inner .left .half-circle{left:0;border-right-color:transparent;animation:left-wobble 1.3125s cubic-bezier(.35,0,.25,1) infinite;-webkit-animation:left-wobble 1.3125s cubic-bezier(.35,0,.25,1) infinite}#splash-screen .spinner-wrapper .spinner .inner .right{right:0}#splash-screen .spinner-wrapper .spinner .inner .right .half-circle{right:0;border-left-color:transparent;animation:right-wobble 1.3125s cubic-bezier(.35,0,.25,1) infinite;-webkit-animation:right-wobble 1.3125s cubic-bezier(.35,0,.25,1) infinite}@keyframes outer-rotate{0%{transform:rotate(0) scale(.5)}100%{transform:rotate(360deg) scale(.5)}}@keyframes left-wobble{0%,100%{transform:rotate(130deg)}50%{transform:rotate(-5deg)}}@keyframes right-wobble{0%,100%{transform:rotate(-130deg)}50%{transform:rotate(5deg)}}@keyframes sporadic-rotate{12.5%{transform:rotate(135deg)}25%{transform:rotate(270deg)}37.5%{transform:rotate(405deg)}50%{transform:rotate(540deg)}62.5%{transform:rotate(675deg)}75%{transform:rotate(810deg)}87.5%{transform:rotate(945deg)}100%{transform:rotate(1080deg)}}.ms-stepper .ms-stepper-horizontal{background:#fff;box-shadow:0 1px 3px 0 rgba(0,0,0,.2),0 1px 1px 0 rgba(0,0,0,.14),0 2px 1px -1px rgba(0,0,0,.12)}.ms-stepper .ms-stepper-horizontal .ms-stepper-navigation-wrapper .ms-stepper-navigation{height:72px;min-height:72px;max-height:72px;background:#fff;box-shadow:0 1px 3px 0 rgba(0,0,0,.2),0 1px 1px 0 rgba(0,0,0,.14),0 2px 1px -1px rgba(0,0,0,.12)}.ms-stepper .ms-stepper-horizontal .ms-stepper-navigation-wrapper .ms-stepper-navigation .ms-stepper-navigation-item{display:flex;flex-direction:row;align-items:center;position:relative;height:72px;min-height:72px;max-height:72px;line-height:24px;margin:0;padding:24px;border-radius:0;cursor:pointer;font-size:14px;text-transform:none}.ms-stepper .ms-stepper-horizontal .ms-stepper-navigation-wrapper .ms-stepper-navigation .ms-stepper-navigation-item:after,.ms-stepper .ms-stepper-horizontal .ms-stepper-navigation-wrapper .ms-stepper-navigation .ms-stepper-navigation-item:before{content:'';display:block;position:absolute;top:50%;width:24px;border-bottom:1px solid rgba(0,0,0,.12)}.ms-stepper .ms-stepper-horizontal .ms-stepper-navigation-wrapper .ms-stepper-navigation .ms-stepper-navigation-item:before{left:0}.ms-stepper .ms-stepper-horizontal .ms-stepper-navigation-wrapper .ms-stepper-navigation .ms-stepper-navigation-item:after{right:0}.ms-stepper .ms-stepper-horizontal .ms-stepper-navigation-wrapper .ms-stepper-navigation .ms-stepper-navigation-item:first-child:before{display:none}.ms-stepper .ms-stepper-horizontal .ms-stepper-navigation-wrapper .ms-stepper-navigation .ms-stepper-navigation-item:last-child:after{display:none}.ms-stepper .ms-stepper-horizontal .ms-stepper-navigation-wrapper .ms-stepper-navigation .ms-stepper-navigation-item.current .title{font-weight:600;color:rgba(0,0,0,.87)}.ms-stepper .ms-stepper-horizontal .ms-stepper-navigation-wrapper .ms-stepper-navigation .ms-stepper-navigation-item.disabled{cursor:default}.ms-stepper .ms-stepper-horizontal .ms-stepper-navigation-wrapper .ms-stepper-navigation .ms-stepper-navigation-item.disabled .step{background:rgba(0,0,0,.12)}.ms-stepper .ms-stepper-horizontal .ms-stepper-navigation-wrapper .ms-stepper-navigation .ms-stepper-navigation-item.disabled .title{color:rgba(0,0,0,.27)}.ms-stepper .ms-stepper-horizontal .ms-stepper-navigation-wrapper .ms-stepper-navigation .ms-stepper-navigation-item.disabled .subtitle{color:rgba(0,0,0,.27)}.ms-stepper .ms-stepper-horizontal .ms-stepper-navigation-wrapper .ms-stepper-navigation .ms-stepper-navigation-item.optional{padding:16px 24px}.ms-stepper .ms-stepper-horizontal .ms-stepper-navigation-wrapper .ms-stepper-navigation .ms-stepper-navigation-item .step{width:24px;min-width:24px;height:24px;border-radius:50%;margin:0 8px 0 16px;color:#fff}.ms-stepper .ms-stepper-horizontal .ms-stepper-navigation-wrapper .ms-stepper-navigation .ms-stepper-navigation-item .step .icon{color:#fff;font-weight:700;line-height:24px!important}.ms-stepper .ms-stepper-horizontal .ms-stepper-navigation-wrapper .ms-stepper-navigation .ms-stepper-navigation-item .title{padding-right:16px;color:rgba(0,0,0,.54)}.ms-stepper .ms-stepper-horizontal .ms-stepper-navigation-wrapper .ms-stepper-navigation .ms-stepper-navigation-item .subtitle{font-size:12px;padding-right:16px;color:rgba(0,0,0,.54);line-height:1}.ms-stepper .ms-stepper-horizontal .ms-stepper-steps{padding:24px 16px}.ms-stepper .ms-stepper-horizontal .ms-stepper-controls{padding:0 16px 16px 16px}.ms-stepper .ms-stepper-horizontal .ms-stepper-controls .ms-stepper-dots{display:none;align-items:center;justify-content:center;padding:0 16px}.ms-stepper .ms-stepper-horizontal .ms-stepper-controls .ms-stepper-dots span{width:5px;height:5px;margin:0 4px;border-radius:50%}.ms-stepper .ms-stepper-horizontal .ms-stepper-controls .ms-stepper-dots span:not(.md-accent-bg){background:rgba(0,0,0,.12)}.ms-stepper .ms-stepper-horizontal .ms-stepper-controls .ms-stepper-dots span.selected{width:8px;height:8px}@media screen and (max-width:600px){.ms-stepper .ms-stepper-horizontal .ms-stepper-navigation-wrapper .ms-stepper-navigation{display:none}.ms-stepper .ms-stepper-horizontal .ms-stepper-controls .ms-stepper-dots{display:flex}}.ms-stepper .ms-stepper-vertical{position:relative;background:#fff;box-shadow:0 1px 3px 0 rgba(0,0,0,.2),0 1px 1px 0 rgba(0,0,0,.14),0 2px 1px -1px rgba(0,0,0,.12)}.ms-stepper .ms-stepper-vertical .ms-stepper-vertical-line{display:block;position:absolute;width:1px;top:32px;bottom:32px;left:43px;border-left:1px solid rgba(0,0,0,.12)}.ms-stepper .ms-stepper-vertical .ms-stepper-steps{padding:8px 0}.ms-stepper .ms-stepper-vertical .ms-stepper-steps .ms-stepper-step{display:block}.ms-stepper .ms-stepper-vertical .ms-stepper-steps .ms-stepper-step .ms-stepper-navigation-item{display:flex;flex-direction:row;align-items:center;position:relative;width:100%;height:72px;min-height:72px;max-height:72px;line-height:24px;margin:0;padding:0 24px;border-radius:0;cursor:pointer;font-size:14px;text-transform:none}.ms-stepper .ms-stepper-vertical .ms-stepper-steps .ms-stepper-step .ms-stepper-navigation-item:first-child:before{display:none}.ms-stepper .ms-stepper-vertical .ms-stepper-steps .ms-stepper-step .ms-stepper-navigation-item:last-child:after{display:none}.ms-stepper .ms-stepper-vertical .ms-stepper-steps .ms-stepper-step .ms-stepper-navigation-item:hover:not(.disabled) .step{background-color:#ececec;border-color:#ececec}.ms-stepper .ms-stepper-vertical .ms-stepper-steps .ms-stepper-step .ms-stepper-navigation-item.current .title{font-weight:600;color:rgba(0,0,0,.87)}.ms-stepper .ms-stepper-vertical .ms-stepper-steps .ms-stepper-step .ms-stepper-navigation-item.disabled{cursor:default}.ms-stepper .ms-stepper-vertical .ms-stepper-steps .ms-stepper-step .ms-stepper-navigation-item.disabled .title{color:rgba(0,0,0,.27)}.ms-stepper .ms-stepper-vertical .ms-stepper-steps .ms-stepper-step .ms-stepper-navigation-item.disabled .subtitle{color:rgba(0,0,0,.27)}.ms-stepper .ms-stepper-vertical .ms-stepper-steps .ms-stepper-step .ms-stepper-navigation-item.optional{padding:16px 24px}.ms-stepper .ms-stepper-vertical .ms-stepper-steps .ms-stepper-step .ms-stepper-navigation-item .step{width:40px;min-width:40px;height:40px;margin:0 16px 0 0;border-radius:50%;background:#fff;border:8px solid #fff;color:#fff;transition:border-color .4s cubic-bezier(.25,.8,.25,1),background-color .4s cubic-bezier(.25,.8,.25,1)}.ms-stepper .ms-stepper-vertical .ms-stepper-steps .ms-stepper-step .ms-stepper-navigation-item .step .icon{font-weight:700;line-height:28px!important}.ms-stepper .ms-stepper-vertical .ms-stepper-steps .ms-stepper-step .ms-stepper-navigation-item .title{padding-right:16px;color:rgba(0,0,0,.54)}.ms-stepper .ms-stepper-vertical .ms-stepper-steps .ms-stepper-step .ms-stepper-navigation-item .subtitle{font-size:12px;padding-right:16px;color:rgba(0,0,0,.54);line-height:1}.ms-stepper .ms-stepper-vertical .ms-stepper-steps .ms-stepper-step .ms-stepper-step-content{padding:0 24px 16px 64px}.ms-stepper .ms-stepper-vertical .ms-stepper-steps .ms-stepper-step .ms-stepper-controls{padding:0 16px 16px 56px}.ms-tab-scroll .scroll-arrow{height:inherit;padding:0}.ms-tab-scroll .bar-container{overflow:hidden}.ms-tab-scroll .scroll-container{overflow-x:hidden;overflow-y:hidden;transition:transform .2s ease-in-out}.ms-timeline .ms-timeline-loader{position:relative;display:flex;align-items:center;justify-content:center;width:56px;height:56px;margin:0 auto;background:#fff;font-weight:500;opacity:0;z-index:11;border-radius:50%}.ms-timeline .ms-timeline-loader.show{opacity:1}.ms-timeline .ms-timeline-loader .spinner{width:24px;height:24px;border:3px solid rgba(255,255,255,.35);border-top-color:#fff;border-radius:50%}.ms-widget .ms-widget-front{box-shadow:0 1px 3px 0 rgba(0,0,0,.2),0 1px 1px 0 rgba(0,0,0,.14),0 2px 1px -1px rgba(0,0,0,.12)}.ms-widget .ms-widget-back{box-shadow:0 1px 3px 0 rgba(0,0,0,.2),0 1px 1px 0 rgba(0,0,0,.14),0 2px 1px -1px rgba(0,0,0,.12)}.ms-widget.sidenav-widget .ms-widget-back,.ms-widget.sidenav-widget .ms-widget-front{box-shadow:none}.ms-widget .flip-to-front{position:absolute;top:0;right:0}.ms-widget .c3{height:100%}.ms-widget .chart-fill-8{margin:0 -8px -8px -8px}.ms-widget .chart-fill-16{margin:0 -16px -16px -16px}.ms-widget .chart-fill-24{margin:0 -24px -24px -24px}.ms-widget .chart-fill-32{margin:0 -32px -32px -32px}.ms-widget .chart-fill-40{margin:0 -40px -40px -40px}.ms-widget .chart-fill-48{margin:0 -48px -48px -48px}.ms-widget .chart-fill-56{margin:0 -56px -56px -56px}.ms-widget .chart-fill-64{margin:0 -64px -64px -64px}.ms-widget .chart-fill-72{margin:0 -72px -72px -72px}.ms-widget .chart-fill-80{margin:0 -80px -80px -80px}.ms-widget{position:relative;font-size:1.3rem;perspective:3000px;padding:12px}.ms-widget .ms-widget-front{display:flex;flex-direction:column;flex:1 1 auto;position:relative;overflow:hidden;visibility:visible;width:100%;opacity:1;z-index:10;border-radius:2px;transition:transform .5s ease-out 0s,visibility 0s ease-in .2s,opacity 0s ease-in .2s;transform:rotateY(0);backface-visibility:hidden}.ms-widget .ms-widget-back{display:block;position:absolute;overflow:hidden;visibility:hidden;opacity:0;z-index:10;top:12px;right:12px;bottom:12px;left:12px;border-radius:2px;transition:transform .5s ease-out 0s,visibility 0s ease-in .2s,opacity 0s ease-in .2s;transform:rotateY(180deg);backface-visibility:hidden}.ms-widget .md-button{margin:0}.ms-widget .md-button.md-icon-button{margin:0}.ms-widget.flipped .ms-widget-front{visibility:hidden;opacity:0;transform:rotateY(180deg)}.ms-widget.flipped .ms-widget-back{display:block;visibility:visible;opacity:1;transform:rotateY(360deg)}.ms-widget.sidenav-widget{padding:0}.ms-widget.ar-2-1 .widget{padding:0;position:relative}.ms-widget.ar-2-1 .widget:before{display:block;content:'';width:100%;padding-top:50%}.ms-widget.ar-2-1 .widget>.widget{position:absolute;top:8px;left:8px;right:8px;bottom:8px}.ms-widget.ar-1-1 .widget{padding:0;position:relative}.ms-widget.ar-1-1 .widget:before{display:block;content:'';width:100%;padding-top:100%}.ms-widget.ar-1-1 .widget>.widget{position:absolute;top:8px;left:8px;right:8px;bottom:8px}.ms-theme-options .ms-theme-options-button{position:absolute;top:160px;right:0;z-index:50;box-shadow:0 2px 4px -1px rgba(0,0,0,.2),0 4px 5px 0 rgba(0,0,0,.14),0 1px 10px 0 rgba(0,0,0,.12);width:48px;height:48px;line-height:48px;text-align:center;cursor:pointer;border-radius:0;margin:0;pointer-events:auto;opacity:.75}.ms-theme-options .ms-theme-options-button:hover{opacity:1}.ms-theme-options md-sidenav{width:384px;min-width:384px;max-width:384px}.ms-theme-options md-sidenav .ms-theme-options-list{background:#fff;z-index:12;pointer-events:auto}.ms-theme-options md-sidenav .ms-theme-options-list .theme-option{padding:16px}.ms-theme-options md-sidenav .ms-theme-options-list .theme-option.layout-options md-radio-button{width:160px;max-width:160px;margin:8px 8px 16px 8px}.ms-theme-options md-sidenav .ms-theme-options-list .theme-option.layout-options md-radio-button.md-checked ._md-label img,.ms-theme-options md-sidenav .ms-theme-options-list .theme-option.layout-options md-radio-button:hover ._md-label img{opacity:1;box-shadow:0 5px 5px -3px rgba(0,0,0,.2),0 8px 10px 1px rgba(0,0,0,.14),0 3px 14px 2px rgba(0,0,0,.12)}.ms-theme-options md-sidenav .ms-theme-options-list .theme-option.layout-options md-radio-button ._md-container{display:none}.ms-theme-options md-sidenav .ms-theme-options-list .theme-option.layout-options md-radio-button ._md-label{margin-left:0}.ms-theme-options md-sidenav .ms-theme-options-list .theme-option.layout-options md-radio-button ._md-label img{opacity:.8;margin-bottom:8px}.ms-theme-options md-sidenav .ms-theme-options-list .theme-option.color-palettes md-menu-item{max-width:192px}.ms-theme-options md-sidenav .ms-theme-options-list .theme-option.color-palettes .theme-button{border-bottom:16px solid;text-align:left;width:101px;height:88px;box-shadow:none;opacity:.8}.ms-theme-options md-sidenav .ms-theme-options-list .theme-option.color-palettes .theme-button.active,.ms-theme-options md-sidenav .ms-theme-options-list .theme-option.color-palettes .theme-button:hover{opacity:1;box-shadow:0 5px 5px -3px rgba(0,0,0,.2),0 8px 10px 1px rgba(0,0,0,.14),0 3px 14px 2px rgba(0,0,0,.12)}.ms-theme-options md-sidenav .ms-theme-options-list .theme-option md-radio-button{margin:8px}.ms-theme-options md-sidenav .ms-theme-options-list .theme-option .option-title{font-size:14px;font-weight:500;padding:0 8px 12px 8px}#error-404 .content{width:90%;max-width:512px;margin-top:128px}#error-404 .content .error-code{font-size:112px;text-align:center;line-height:1;margin-bottom:16px;font-weight:500}#error-404 .content .message{font-size:24px;text-align:center;color:rgba(0,0,0,.54)}#error-404 .content .search{width:100%;height:56px;line-height:56px;margin:48px auto 16px auto;padding:16px;background:#fff}#error-404 .content .search input{padding:0 0 0 16px}#error-404 .content .back-link{font-size:15px;text-align:center}#error-500 .content{width:90%;max-width:512px;margin-top:128px}#error-500 .content .error-code{font-size:112px;line-height:1;text-align:center;margin-bottom:16px;font-weight:500}#error-500 .content .message{font-size:24px;text-align:center;color:rgba(0,0,0,.54)}#error-500 .content .sub-message{font-size:17px;text-align:center;color:rgba(0,0,0,.54);margin:16px auto 48px auto}#error-500 .content .report-link{text-align:center;font-size:15px}#forgot-password{height:100%;background:url(/assets/images/backgrounds/tech.png) no-repeat;background-size:cover}#forgot-password #forgot-password-form-wrapper{flex:1 0 auto;padding:32px}#forgot-password #forgot-password-form-wrapper #forgot-password-form{width:384px;max-width:384px;padding:32px;text-align:center;background:#fff}#forgot-password #forgot-password-form-wrapper #forgot-password-form .logo{width:128px;height:128px;line-height:128px;font-size:86px;font-weight:500;margin:32px auto;color:#fff;border-radius:2px}#forgot-password #forgot-password-form-wrapper #forgot-password-form .title{font-size:17px;margin:16px 0 32px 0}#forgot-password #forgot-password-form-wrapper #forgot-password-form .logo_login{max-height:200px}#forgot-password #forgot-password-form-wrapper #forgot-password-form form{width:100%;text-align:left}#forgot-password #forgot-password-form-wrapper #forgot-password-form form .submit-button{width:220px;margin:16px auto;display:block}#forgot-password #forgot-password-form-wrapper #forgot-password-form .login{margin:32px auto 24px auto;width:250px;font-weight:500}#forgot-password #forgot-password-form-wrapper #forgot-password-form .login .text{margin-right:8px}@media screen and (max-width:600px){#forgot-password #forgot-password-form-wrapper{padding:16px}#forgot-password #forgot-password-form-wrapper #forgot-password-form{padding:24px;width:100%}#forgot-password #forgot-password-form-wrapper #forgot-password-form form .md-button{width:90%}}#login{height:100%;background:url(/assets/images/backgrounds/tech.png) no-repeat;background-size:cover}#login #login-form-wrapper{flex:1 0 auto;padding:32px}#login #login-form-wrapper #login-form{width:384px;max-width:384px;padding:32px;background:#fff;text-align:center}#login #login-form-wrapper #login-form .logo{width:128px;height:128px;line-height:128px;font-size:86px;font-weight:500;margin:32px auto;color:#fff;border-radius:2px}#login #login-form-wrapper #login-form .title{font-size:17px;margin:16px 0 32px 0}#login #login-form-wrapper #login-form .logo_login{max-height:200px}#login #login-form-wrapper #login-form form{width:100%;text-align:left}#login #login-form-wrapper #login-form form md-checkbox{margin:0}#login #login-form-wrapper #login-form form .remember-forgot-password{font-size:13px;margin-top:8px}#login #login-form-wrapper #login-form form .remember-forgot-password .remember-me{margin-bottom:16px}#login #login-form-wrapper #login-form form .remember-forgot-password .forgot-password{font-size:13px;font-weight:500;margin-bottom:16px}#login #login-form-wrapper #login-form form .submit-button{width:220px;margin:16px auto;display:block}#login #login-form-wrapper #login-form .register{margin:32px auto 24px auto;width:250px;font-weight:500}#login #login-form-wrapper #login-form .register .text{margin-right:8px}#login #login-form-wrapper #login-form .separator{font-size:15px;font-weight:600;margin:24px auto 16px auto;position:relative;overflow:hidden;width:100px;color:rgba(0,0,0,.54)}#login #login-form-wrapper #login-form .separator .text{display:inline-block;vertical-align:baseline;position:relative;padding:0 8px;z-index:9999}#login #login-form-wrapper #login-form .separator .text:after,#login #login-form-wrapper #login-form .separator .text:before{content:'';display:block;width:30px;position:absolute;top:10px;border-top:1px solid rgba(0,0,0,.12)}#login #login-form-wrapper #login-form .separator .text:before{right:100%}#login #login-form-wrapper #login-form .separator .text:after{left:100%}#login #login-form-wrapper #login-form .md-button.facebook,#login #login-form-wrapper #login-form .md-button.google{width:192px;text-transform:none;color:#fff;font-size:13px}#login #login-form-wrapper #login-form .md-button.facebook md-icon,#login #login-form-wrapper #login-form .md-button.google md-icon{color:#fff;margin:0 8px 0 0}#login #login-form-wrapper #login-form .md-button.google{background-color:#d73d32}#login #login-form-wrapper #login-form .md-button.facebook{background-color:#3f5c9a}@media screen and (max-width:600px){#login #login-form-wrapper{padding:16px}#login #login-form-wrapper #login-form{padding:24px;width:100%}#login #login-form-wrapper #login-form form .md-button{width:90%}#login #login-form-wrapper #login-form .md-button.facebook,#login #login-form-wrapper #login-form .md-button.google{width:80%}}md-dialog.extractedReport-dialog{max-width:720px;width:720px}md-dialog.extractedReport-dialog md-dialog-content{display:block;position:relative}md-dialog.extractedReport-dialog md-toolbar .title{font-size:17px}md-dialog.extractedReport-dialog md-input-container textarea{min-height:150px}md-dialog.extractedReport-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.extractedReport-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.extractedReport-dialog .date-container{padding:16px 0 24px 0}md-dialog.extractedReport-dialog .error-list{font-size:13px}md-dialog.extractedReport-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.extractedReport-dialog .error-list .error .message{font-weight:500}md-dialog.extractedReport-dialog .error-list .error .md-button{margin:0}md-dialog.extractedReport-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.extractedReport-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}#extractedReports{position:relative}#extractedReports>.header{height:76px;min-height:76px;max-height:76px}#extractedReports>.header .logo .logo-icon{margin:0 16px 0 0}#extractedReports>.header .logo .logo-text{font-size:24px}#extractedReports>.header md-icon{color:#fff}#extractedReports>.header .search-input-wrapper{position:relative}#extractedReports>.header .search-input-wrapper label{padding-right:4px;cursor:pointer}#extractedReports>.header .search-input-wrapper label md-icon{color:rgba(255,255,255,.8)}#extractedReports>.header .search-input-wrapper md-input-container .md-errors-spacer{display:none}#extractedReports>.header .search-input-wrapper md-input-container input{border-bottom:1px solid rgba(255,255,255,.8);color:rgba(255,255,255,.8);width:240px}#extractedReports>.header .search-input-wrapper md-input-container input::placeholder{color:rgba(255,255,255,.8)}#extractedReports>.header .search-input-wrapper md-input-container input:focus{border-bottom:1px solid #fff;color:#fff}#extractedReports>.header.selected-bar{position:absolute;top:0;left:0;right:0;z-index:999;background-image:none;opacity:1!important}#extractedReports>.header.selected-bar .close-button-wrapper{width:244px}#extractedReports>.content{position:absolute;top:76px;bottom:0;right:0;left:0}#extractedReports>.content .main{padding:16px 90px 0 4px;position:absolute;top:0;left:24px;right:0;bottom:0}#extractedReports>.content .main .no-results{box-shadow:0 1px 1px 0 rgba(0,0,0,.14)}#extractedReports #add-extractedReport-button{position:fixed;bottom:8px;right:8px;padding:0}#extractedReports #upload-extractedReport-button{position:fixed;bottom:8px;right:8px;padding:0}md-dialog.metric-dialog{max-width:720px;width:720px}md-dialog.metric-dialog md-dialog-content{display:block;position:relative}md-dialog.metric-dialog md-toolbar .title{font-size:17px}md-dialog.metric-dialog md-input-container textarea{min-height:150px}md-dialog.metric-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.metric-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.metric-dialog .date-container{padding:16px 0 24px 0}md-dialog.metric-dialog .error-list{font-size:13px}md-dialog.metric-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.metric-dialog .error-list .error .message{font-weight:500}md-dialog.metric-dialog .error-list .error .md-button{margin:0}md-dialog.metric-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.metric-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}#metrics{position:relative}#metrics>.header{height:76px;min-height:76px;max-height:76px}#metrics>.header .logo .logo-icon{margin:0 16px 0 0}#metrics>.header .logo .logo-text{font-size:24px}#metrics>.header md-icon{color:#fff}#metrics>.header .search-input-wrapper{position:relative}#metrics>.header .search-input-wrapper label{padding-right:4px;cursor:pointer}#metrics>.header .search-input-wrapper label md-icon{color:rgba(255,255,255,.8)}#metrics>.header .search-input-wrapper md-input-container .md-errors-spacer{display:none}#metrics>.header .search-input-wrapper md-input-container input{border-bottom:1px solid rgba(255,255,255,.8);color:rgba(255,255,255,.8);width:240px}#metrics>.header .search-input-wrapper md-input-container input::placeholder{color:rgba(255,255,255,.8)}#metrics>.header .search-input-wrapper md-input-container input:focus{border-bottom:1px solid #fff;color:#fff}#metrics>.header.selected-bar{position:absolute;top:0;left:0;right:0;z-index:999;background-image:none;opacity:1!important}#metrics>.header.selected-bar .close-button-wrapper{width:244px}#metrics>.content{position:absolute;top:76px;bottom:0;right:0;left:0}#metrics>.content .main{padding:16px 90px 0 4px;position:absolute;top:0;left:24px;right:0;bottom:0}#metrics>.content .main .no-results{box-shadow:0 1px 1px 0 rgba(0,0,0,.14)}#metrics #add-metric-button{position:fixed;bottom:8px;right:8px;padding:0}#metrics #upload-metric-button{position:fixed;bottom:8px;right:8px;padding:0}md-dialog.report-dialog{max-width:720px;width:720px}md-dialog.report-dialog md-dialog-content{display:block;position:relative}md-dialog.report-dialog md-toolbar .title{font-size:17px}md-dialog.report-dialog md-input-container textarea{min-height:150px}md-dialog.report-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.report-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.report-dialog .date-container{padding:16px 0 24px 0}md-dialog.report-dialog .error-list{font-size:13px}md-dialog.report-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.report-dialog .error-list .error .message{font-weight:500}md-dialog.report-dialog .error-list .error .md-button{margin:0}md-dialog.report-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.report-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.report-dialog{max-width:720px;width:720px}md-dialog.report-dialog md-dialog-content{display:block;position:relative}md-dialog.report-dialog md-toolbar .title{font-size:17px}md-dialog.report-dialog md-input-container textarea{min-height:150px}md-dialog.report-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.report-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.report-dialog .date-container{padding:16px 0 24px 0}md-dialog.report-dialog .error-list{font-size:13px}md-dialog.report-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.report-dialog .error-list .error .message{font-weight:500}md-dialog.report-dialog .error-list .error .md-button{margin:0}md-dialog.report-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.report-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.reportField-dialog{max-width:720px;width:720px}md-dialog.reportField-dialog md-dialog-content{display:block;position:relative}md-dialog.reportField-dialog md-toolbar .title{font-size:17px}md-dialog.reportField-dialog md-input-container textarea{min-height:150px}md-dialog.reportField-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.reportField-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.reportField-dialog .date-container{padding:16px 0 24px 0}md-dialog.reportField-dialog .error-list{font-size:13px}md-dialog.reportField-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.reportField-dialog .error-list .error .message{font-weight:500}md-dialog.reportField-dialog .error-list .error .md-button{margin:0}md-dialog.reportField-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.reportField-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}#analytics-report .header{height:76px;min-height:76px;max-height:76px}#analytics-report .header .goto-reports-button{margin-right:16px}#analytics-report .header .report-image{overflow:hidden;width:56px;height:56px;margin-right:16px;border:3px solid rgba(0,0,0,.12)}#analytics-report .header .report-image img{height:100%;width:auto;max-width:none}#analytics-report .header .subtitle{margin:6px 0 0 0}#analytics-report .report-detail-form-container{padding:24px;margin-bottom:24px}#analytics-report .report-detail-form-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}#analytics-report .report-detail-form-container .handle{cursor:move}#analytics-report .report-detail-form-container md-input-container md-switch{margin:0!important}#analytics-report .report-detail-form-container #report-image-uploader{position:relative}#analytics-report .report-detail-form-container #report-image-uploader.dropping .drop-text{display:flex}#analytics-report .report-detail-form-container #report-image-uploader .drop-text{display:none;position:absolute;top:0;right:0;bottom:0;left:0;padding:16px;text-align:center;border:2px dashed rgba(0,0,0,.12);background:#fff;font-size:20px;z-index:100}#analytics-report .report-detail-form-container #report-image-uploader .upload-button{margin-bottom:16px}#analytics-report .report-detail-form-container #report-image-uploader .report-image{position:relative;width:200px;height:200px;border:1px solid rgba(0,0,0,.12);margin:8px}#analytics-report .report-detail-form-container #report-image-uploader .report-image.uploading .overlay{position:absolute;top:0;right:0;bottom:0;left:0;background:rgba(0,0,0,.87)}#analytics-report .report-detail-form-container #report-image-uploader .report-image .media{max-height:100%}md-dialog.report-dialog{max-width:720px;width:720px}md-dialog.report-dialog md-dialog-content{display:block;position:relative}md-dialog.report-dialog md-toolbar .title{font-size:17px}md-dialog.report-dialog md-input-container textarea{min-height:150px}md-dialog.report-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.report-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.report-dialog .date-container{padding:16px 0 24px 0}md-dialog.report-dialog .error-list{font-size:13px}md-dialog.report-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.report-dialog .error-list .error .message{font-weight:500}md-dialog.report-dialog .error-list .error .md-button{margin:0}md-dialog.report-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.report-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}#reports{position:relative}#reports>.header{height:76px;min-height:76px;max-height:76px}#reports>.header .logo .logo-icon{margin:0 16px 0 0}#reports>.header .logo .logo-text{font-size:24px}#reports>.header md-icon{color:#fff}#reports>.header .search-input-wrapper{position:relative}#reports>.header .search-input-wrapper label{padding-right:4px;cursor:pointer}#reports>.header .search-input-wrapper label md-icon{color:rgba(255,255,255,.8)}#reports>.header .search-input-wrapper md-input-container .md-errors-spacer{display:none}#reports>.header .search-input-wrapper md-input-container input{border-bottom:1px solid rgba(255,255,255,.8);color:rgba(255,255,255,.8);width:240px}#reports>.header .search-input-wrapper md-input-container input::placeholder{color:rgba(255,255,255,.8)}#reports>.header .search-input-wrapper md-input-container input:focus{border-bottom:1px solid #fff;color:#fff}#reports>.header.selected-bar{position:absolute;top:0;left:0;right:0;z-index:999;background-image:none;opacity:1!important}#reports>.header.selected-bar .close-button-wrapper{width:244px}#reports>.content{position:absolute;top:76px;bottom:0;right:0;left:0}#reports>.content .main{padding:16px 90px 0 4px;position:absolute;top:0;left:24px;right:0;bottom:0}#reports>.content .main .no-results{box-shadow:0 1px 1px 0 rgba(0,0,0,.14)}md-dialog.report-dialog{max-width:720px;width:720px}md-dialog.report-dialog md-dialog-content{display:block;position:relative}md-dialog.report-dialog md-toolbar .title{font-size:17px}md-dialog.report-dialog md-input-container textarea{min-height:150px}md-dialog.report-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.report-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.report-dialog .date-container{padding:16px 0 24px 0}md-dialog.report-dialog .error-list{font-size:13px}md-dialog.report-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.report-dialog .error-list .error .message{font-weight:500}md-dialog.report-dialog .error-list .error .md-button{margin:0}md-dialog.report-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.report-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.web-dialog md-dialog-content{display:block;position:relative}md-dialog.web-dialog md-toolbar .title{font-size:17px}md-dialog.web-dialog md-input-container textarea{min-height:150px}md-dialog.web-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.web-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.web-dialog .date-container{padding:16px 0 24px 0}md-dialog.web-dialog .error-list{font-size:13px}md-dialog.web-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.web-dialog .error-list .error .message{font-weight:500}md-dialog.web-dialog .error-list .error .md-button{margin:0}md-dialog.web-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.web-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.odbc-dialog{max-width:720px;width:720px}md-dialog.odbc-dialog md-dialog-content{display:block;position:relative}md-dialog.odbc-dialog md-toolbar .title{font-size:17px}md-dialog.odbc-dialog md-input-container textarea{min-height:150px}md-dialog.odbc-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.odbc-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.odbc-dialog .date-container{padding:16px 0 24px 0}md-dialog.odbc-dialog .error-list{font-size:13px}md-dialog.odbc-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.odbc-dialog .error-list .error .message{font-weight:500}md-dialog.odbc-dialog .error-list .error .md-button{margin:0}md-dialog.odbc-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.odbc-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}#odbcs{position:relative}#odbcs>.header{height:76px;min-height:76px;max-height:76px}#odbcs>.header .logo .logo-icon{margin:0 16px 0 0}#odbcs>.header .logo .logo-text{font-size:24px}#odbcs>.header md-icon{color:#fff}#odbcs>.header .search-input-wrapper{position:relative}#odbcs>.header .search-input-wrapper label{padding-right:4px;cursor:pointer}#odbcs>.header .search-input-wrapper label md-icon{color:rgba(255,255,255,.8)}#odbcs>.header .search-input-wrapper md-input-container .md-errors-spacer{display:none}#odbcs>.header .search-input-wrapper md-input-container input{border-bottom:1px solid rgba(255,255,255,.8);color:rgba(255,255,255,.8);width:240px}#odbcs>.header .search-input-wrapper md-input-container input::placeholder{color:rgba(255,255,255,.8)}#odbcs>.header .search-input-wrapper md-input-container input:focus{border-bottom:1px solid #fff;color:#fff}#odbcs>.header.selected-bar{position:absolute;top:0;left:0;right:0;z-index:999;background-image:none;opacity:1!important}#odbcs>.header.selected-bar .close-button-wrapper{width:244px}#odbcs>.content{position:absolute;top:76px;bottom:0;right:0;left:0}#odbcs>.content .main{padding:16px 90px 0 4px;position:absolute;top:0;left:24px;right:0;bottom:0}#odbcs>.content .main .no-results{box-shadow:0 1px 1px 0 rgba(0,0,0,.14)}#odbcs #add-odbc-button{position:fixed;bottom:8px;right:8px;padding:0}#odbcs #upload-odbc-button{position:fixed;bottom:8px;right:8px;padding:0}md-dialog.project-dialog{max-width:720px;width:720px}md-dialog.project-dialog md-dialog-content{display:block;position:relative}md-dialog.project-dialog md-toolbar .title{font-size:17px}md-dialog.project-dialog md-input-container textarea{min-height:150px}md-dialog.project-dialog .date-container{padding:16px 0 24px 0}md-dialog.project-dialog .error-list{font-size:13px}md-dialog.project-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.project-dialog .error-list .error .message{font-weight:500}md-dialog.project-dialog .error-list .error .md-button{margin:0}md-dialog.project-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.project-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}md-dialog.project-dialog .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}#callysquare-project .header{height:76px;min-height:76px;max-height:76px}#callysquare-project .header .goto-projects-button{margin-right:16px}#callysquare-project .header .project-image{overflow:hidden;width:56px;height:56px;margin-right:16px;border:3px solid rgba(0,0,0,.12)}#callysquare-project .header .project-image img{height:100%;width:auto;max-width:none}#callysquare-project .header .subtitle{margin:6px 0 0 0}#callysquare-project .project-detail-form-container{padding:24px;margin-bottom:24px}#callysquare-project .project-detail-form-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}#callysquare-project .project-detail-form-container #project-image-uploader{position:relative}#callysquare-project .project-detail-form-container #project-image-uploader.dropping .drop-text{display:flex}#callysquare-project .project-detail-form-container #project-image-uploader .drop-text{display:none;position:absolute;top:0;right:0;bottom:0;left:0;padding:16px;text-align:center;border:2px dashed rgba(0,0,0,.12);background:#fff;font-size:20px;z-index:100}#callysquare-project .project-detail-form-container #project-image-uploader .upload-button{margin-bottom:16px}#callysquare-project .project-detail-form-container #project-image-uploader .project-image{position:relative;width:200px;height:200px;border:1px solid rgba(0,0,0,.12);margin:8px}#callysquare-project .project-detail-form-container #project-image-uploader .project-image.uploading .overlay{position:absolute;top:0;right:0;bottom:0;left:0;background:rgba(0,0,0,.87)}#callysquare-project .project-detail-form-container #project-image-uploader .project-image .media{max-height:100%}#callysquare-project>.callysquare-content{position:absolute;top:76px;bottom:0;left:0;right:0}#projects{position:relative}#projects>.header{height:76px;min-height:76px;max-height:76px}#projects>.header .logo .logo-icon{margin:0 16px 0 0}#projects>.header .logo .logo-text{font-size:24px}#projects>.header md-icon{color:#fff}#projects>.header .search-input-wrapper{position:relative}#projects>.header .search-input-wrapper label{padding-right:4px;cursor:pointer}#projects>.header .search-input-wrapper label md-icon{color:rgba(255,255,255,.8)}#projects>.header .search-input-wrapper md-input-container .md-errors-spacer{display:none}#projects>.header .search-input-wrapper md-input-container input{border-bottom:1px solid rgba(255,255,255,.8);color:rgba(255,255,255,.8);width:240px}#projects>.header .search-input-wrapper md-input-container input::placeholder{color:rgba(255,255,255,.8)}#projects>.header .search-input-wrapper md-input-container input:focus{border-bottom:1px solid #fff;color:#fff}#projects>.header.selected-bar{position:absolute;top:0;left:0;right:0;z-index:999;background-image:none;opacity:1!important}#projects>.header.selected-bar .close-button-wrapper{width:244px}#projects>.content{position:absolute;top:76px;bottom:0;right:0;left:0}#projects>.content .main{padding:16px 90px 0 4px;position:absolute;top:0;left:24px;right:0;bottom:0}#projects>.content .main .no-results{box-shadow:0 1px 1px 0 rgba(0,0,0,.14)}#projects #add-project-button{position:fixed;bottom:8px;right:8px;padding:0}md-dialog.squareRecording-dialog{max-width:720px;width:720px}md-dialog.squareRecording-dialog md-dialog-content{display:block;position:relative}md-dialog.squareRecording-dialog md-toolbar .title{font-size:17px}md-dialog.squareRecording-dialog md-input-container textarea{min-height:150px}md-dialog.squareRecording-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.squareRecording-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.squareRecording-dialog .date-container{padding:16px 0 24px 0}md-dialog.squareRecording-dialog .error-list{font-size:13px}md-dialog.squareRecording-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.squareRecording-dialog .error-list .error .message{font-weight:500}md-dialog.squareRecording-dialog .error-list .error .md-button{margin:0}md-dialog.squareRecording-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.squareRecording-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}#squareRecordings{position:relative}#squareRecordings>.header{height:76px;min-height:76px;max-height:76px}#squareRecordings>.header .logo .logo-icon{margin:0 16px 0 0}#squareRecordings>.header .logo .logo-text{font-size:24px}#squareRecordings>.header md-icon{color:#fff}#squareRecordings>.header .search-input-wrapper{position:relative}#squareRecordings>.header .search-input-wrapper label{padding-right:4px;cursor:pointer}#squareRecordings>.header .search-input-wrapper label md-icon{color:rgba(255,255,255,.8)}#squareRecordings>.header .search-input-wrapper md-input-container .md-errors-spacer{display:none}#squareRecordings>.header .search-input-wrapper md-input-container input{border-bottom:1px solid rgba(255,255,255,.8);color:rgba(255,255,255,.8);width:240px}#squareRecordings>.header .search-input-wrapper md-input-container input::placeholder{color:rgba(255,255,255,.8)}#squareRecordings>.header .search-input-wrapper md-input-container input:focus{border-bottom:1px solid #fff;color:#fff}#squareRecordings>.header.selected-bar{position:absolute;top:0;left:0;right:0;z-index:999;background-image:none;opacity:1!important}#squareRecordings>.header.selected-bar .close-button-wrapper{width:244px}#squareRecordings>.content{position:absolute;top:76px;bottom:0;right:0;left:0}#squareRecordings>.content .main{padding:16px 90px 0 4px;position:absolute;top:0;left:24px;right:0;bottom:0}#squareRecordings>.content .main .no-results{box-shadow:0 1px 1px 0 rgba(0,0,0,.14)}#squareRecordings #add-squareRecording-button{position:fixed;bottom:8px;right:8px;padding:0}#squareRecordings #upload-squareRecording-button{position:fixed;bottom:8px;right:8px;padding:0}#chatQueues{position:relative}#chatQueues>.header{height:76px;min-height:76px;max-height:76px}#chatQueues>.header .logo .logo-icon{margin:0 16px 0 0}#chatQueues>.header .logo .logo-text{font-size:24px}#chatQueues>.header md-icon{color:#fff}#chatQueues>.header .search-input-wrapper{position:relative}#chatQueues>.header .search-input-wrapper label{padding-right:4px;cursor:pointer}#chatQueues>.header .search-input-wrapper label md-icon{color:rgba(255,255,255,.8)}#chatQueues>.header .search-input-wrapper md-input-container .md-errors-spacer{display:none}#chatQueues>.header .search-input-wrapper md-input-container input{border-bottom:1px solid rgba(255,255,255,.8);color:rgba(255,255,255,.8);width:240px}#chatQueues>.header .search-input-wrapper md-input-container input::placeholder{color:rgba(255,255,255,.8)}#chatQueues>.header .search-input-wrapper md-input-container input:focus{border-bottom:1px solid #fff;color:#fff}#chatQueues>.header.selected-bar{position:absolute;top:0;left:0;right:0;z-index:999;background-image:none;opacity:1!important}#chatQueues>.header.selected-bar .close-button-wrapper{width:244px}#chatQueues>.content{position:absolute;top:76px;bottom:0;right:0;left:0}#chatQueues>.content .main{padding:16px 90px 0 4px;position:absolute;top:0;left:24px;right:0;bottom:0}#chatQueues>.content .main .no-results{box-shadow:0 1px 1px 0 rgba(0,0,0,.14)}#chatQueues #add-chatQueue-button{position:fixed;bottom:8px;right:8px;padding:0}#chatQueues #upload-chatQueue-button{position:fixed;bottom:8px;right:8px;padding:0}md-dialog.chatQueue-dialog{max-width:720px;width:720px}md-dialog.chatQueue-dialog md-dialog-content{display:block;position:relative}md-dialog.chatQueue-dialog md-toolbar .title{font-size:17px}md-dialog.chatQueue-dialog md-input-container textarea{min-height:150px}md-dialog.chatQueue-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.chatQueue-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.chatQueue-dialog .date-container{padding:16px 0 24px 0}md-dialog.chatQueue-dialog .error-list{font-size:13px}md-dialog.chatQueue-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.chatQueue-dialog .error-list .error .message{font-weight:500}md-dialog.chatQueue-dialog .error-list .error .md-button{margin:0}md-dialog.chatQueue-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.chatQueue-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}#chat-chatQueue .header{height:76px;min-height:76px;max-height:76px}#chat-chatQueue .header .goto-chatQueues-button{margin-right:16px}#chat-chatQueue .header .chatQueue-image{overflow:hidden;width:56px;height:56px;margin-right:16px;border:3px solid rgba(0,0,0,.12)}#chat-chatQueue .header .chatQueue-image img{height:100%;width:auto;max-width:none}#chat-chatQueue .header .subtitle{margin:6px 0 0 0}#chat-chatQueue .chatQueue-detail-form-container{padding:24px;margin-bottom:24px}#chat-chatQueue .chatQueue-detail-form-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}#chat-chatQueue .chatQueue-detail-form-container .handle{cursor:move}#chat-chatQueue .chatQueue-detail-form-container md-input-container md-switch{margin:0!important}#chat-chatQueue .chatQueue-detail-form-container #chatQueue-image-uploader{position:relative}#chat-chatQueue .chatQueue-detail-form-container #chatQueue-image-uploader.dropping .drop-text{display:flex}#chat-chatQueue .chatQueue-detail-form-container #chatQueue-image-uploader .drop-text{display:none;position:absolute;top:0;right:0;bottom:0;left:0;padding:16px;text-align:center;border:2px dashed rgba(0,0,0,.12);background:#fff;font-size:20px;z-index:100}#chat-chatQueue .chatQueue-detail-form-container #chatQueue-image-uploader .upload-button{margin-bottom:16px}#chat-chatQueue .chatQueue-detail-form-container #chatQueue-image-uploader .chatQueue-image{position:relative;width:200px;height:200px;border:1px solid rgba(0,0,0,.12);margin:8px}#chat-chatQueue .chatQueue-detail-form-container #chatQueue-image-uploader .chatQueue-image.uploading .overlay{position:absolute;top:0;right:0;bottom:0;left:0;background:rgba(0,0,0,.87)}#chat-chatQueue .chatQueue-detail-form-container #chatQueue-image-uploader .chatQueue-image .media{max-height:100%}#chat-chatQueue md-table-container thead tr th:not(:first-child):not(.no-padding){padding:0 20px 0 0!important}#chat-chatQueue md-table-container thead th.md-checkbox-column:not(.no-padding){padding:0 24px!important}#chat-chatQueue md-table-container tbody tr td:not(:first-child):not(.no-padding):not(.actions-padding){padding:0 20px 0 0!important}#chat-chatQueue md-table-container.font-size-12 td.md-cell{font-size:12px!important}#chatWebsites{position:relative}#chatWebsites>.header{height:76px;min-height:76px;max-height:76px}#chatWebsites>.header .logo .logo-icon{margin:0 16px 0 0}#chatWebsites>.header .logo .logo-text{font-size:24px}#chatWebsites>.header md-icon{color:#fff}#chatWebsites>.header .search-input-wrapper{position:relative}#chatWebsites>.header .search-input-wrapper label{padding-right:4px;cursor:pointer}#chatWebsites>.header .search-input-wrapper label md-icon{color:rgba(255,255,255,.8)}#chatWebsites>.header .search-input-wrapper md-input-container .md-errors-spacer{display:none}#chatWebsites>.header .search-input-wrapper md-input-container input{border-bottom:1px solid rgba(255,255,255,.8);color:rgba(255,255,255,.8);width:240px}#chatWebsites>.header .search-input-wrapper md-input-container input::placeholder{color:rgba(255,255,255,.8)}#chatWebsites>.header .search-input-wrapper md-input-container input:focus{border-bottom:1px solid #fff;color:#fff}#chatWebsites>.header.selected-bar{position:absolute;top:0;left:0;right:0;z-index:999;background-image:none;opacity:1!important}#chatWebsites>.header.selected-bar .close-button-wrapper{width:244px}#chatWebsites>.content{position:absolute;top:76px;bottom:0;right:0;left:0}#chatWebsites>.content .main{padding:16px 90px 0 4px;position:absolute;top:0;left:24px;right:0;bottom:0}#chatWebsites>.content .main .no-results{box-shadow:0 1px 1px 0 rgba(0,0,0,.14)}#chatWebsites #add-chatWebsite-button{position:fixed;bottom:8px;right:8px;padding:0}#chatWebsites #upload-chatWebsite-button{position:fixed;bottom:8px;right:8px;padding:0}md-dialog.chatWebsite-dialog{max-width:720px;width:720px}md-dialog.chatWebsite-dialog md-dialog-content{display:block;position:relative}md-dialog.chatWebsite-dialog md-toolbar .title{font-size:17px}md-dialog.chatWebsite-dialog md-input-container textarea{min-height:150px}md-dialog.chatWebsite-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.chatWebsite-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.chatWebsite-dialog .date-container{padding:16px 0 24px 0}md-dialog.chatWebsite-dialog .error-list{font-size:13px}md-dialog.chatWebsite-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.chatWebsite-dialog .error-list .error .message{font-weight:500}md-dialog.chatWebsite-dialog .error-list .error .md-button{margin:0}md-dialog.chatWebsite-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.chatWebsite-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.chatWebsite-dialog{max-width:720px;width:720px}md-dialog.chatWebsite-dialog md-dialog-content{display:block;position:relative}md-dialog.chatWebsite-dialog md-toolbar .title{font-size:17px}md-dialog.chatWebsite-dialog md-input-container textarea{min-height:150px}md-dialog.chatWebsite-dialog .date-container{padding:16px 0 24px 0}md-dialog.chatWebsite-dialog .error-list{font-size:13px}md-dialog.chatWebsite-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.chatWebsite-dialog .error-list .error .message{font-weight:500}md-dialog.chatWebsite-dialog .error-list .error .md-button{margin:0}md-dialog.chatWebsite-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.chatWebsite-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.chatWebsite-dialog{max-width:720px;width:720px}md-dialog.chatWebsite-dialog md-dialog-content{display:block;position:relative}md-dialog.chatWebsite-dialog md-toolbar .title{font-size:17px}md-dialog.chatWebsite-dialog md-input-container textarea{min-height:150px}md-dialog.chatWebsite-dialog .date-container{padding:16px 0 24px 0}md-dialog.chatWebsite-dialog .error-list{font-size:13px}md-dialog.chatWebsite-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.chatWebsite-dialog .error-list .error .message{font-weight:500}md-dialog.chatWebsite-dialog .error-list .error .md-button{margin:0}md-dialog.chatWebsite-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.chatWebsite-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.chatWebsite-dialog{max-width:720px;width:720px}md-dialog.chatWebsite-dialog md-dialog-content{display:block;position:relative}md-dialog.chatWebsite-dialog md-toolbar .title{font-size:17px}md-dialog.chatWebsite-dialog md-input-container textarea{min-height:150px}md-dialog.chatWebsite-dialog .date-container{padding:16px 0 24px 0}md-dialog.chatWebsite-dialog .error-list{font-size:13px}md-dialog.chatWebsite-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.chatWebsite-dialog .error-list .error .message{font-weight:500}md-dialog.chatWebsite-dialog .error-list .error .md-button{margin:0}md-dialog.chatWebsite-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.chatWebsite-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.chatWebsite-dialog{max-width:720px;width:720px}md-dialog.chatWebsite-dialog md-dialog-content{display:block;position:relative}md-dialog.chatWebsite-dialog md-toolbar .title{font-size:17px}md-dialog.chatWebsite-dialog md-input-container textarea{min-height:150px}md-dialog.chatWebsite-dialog .date-container{padding:16px 0 24px 0}md-dialog.chatWebsite-dialog .error-list{font-size:13px}md-dialog.chatWebsite-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.chatWebsite-dialog .error-list .error .message{font-weight:500}md-dialog.chatWebsite-dialog .error-list .error .md-button{margin:0}md-dialog.chatWebsite-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.chatWebsite-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.chatWebsite-dialog{max-width:720px;width:720px}md-dialog.chatWebsite-dialog md-dialog-content{display:block;position:relative}md-dialog.chatWebsite-dialog md-toolbar .title{font-size:17px}md-dialog.chatWebsite-dialog md-input-container textarea{min-height:150px}md-dialog.chatWebsite-dialog .date-container{padding:16px 0 24px 0}md-dialog.chatWebsite-dialog .error-list{font-size:13px}md-dialog.chatWebsite-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.chatWebsite-dialog .error-list .error .message{font-weight:500}md-dialog.chatWebsite-dialog .error-list .error .md-button{margin:0}md-dialog.chatWebsite-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.chatWebsite-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.chatWebsite-dialog{max-width:720px;width:720px}md-dialog.chatWebsite-dialog md-dialog-content{display:block;position:relative}md-dialog.chatWebsite-dialog md-toolbar .title{font-size:17px}md-dialog.chatWebsite-dialog md-input-container textarea{min-height:150px}md-dialog.chatWebsite-dialog .date-container{padding:16px 0 24px 0}md-dialog.chatWebsite-dialog .error-list{font-size:13px}md-dialog.chatWebsite-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.chatWebsite-dialog .error-list .error .message{font-weight:500}md-dialog.chatWebsite-dialog .error-list .error .md-button{margin:0}md-dialog.chatWebsite-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.chatWebsite-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.chatWebsite-dialog{max-width:720px;width:720px}md-dialog.chatWebsite-dialog md-dialog-content{display:block;position:relative}md-dialog.chatWebsite-dialog md-toolbar .title{font-size:17px}md-dialog.chatWebsite-dialog md-input-container textarea{min-height:150px}md-dialog.chatWebsite-dialog .date-container{padding:16px 0 24px 0}md-dialog.chatWebsite-dialog .error-list{font-size:13px}md-dialog.chatWebsite-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.chatWebsite-dialog .error-list .error .message{font-weight:500}md-dialog.chatWebsite-dialog .error-list .error .md-button{margin:0}md-dialog.chatWebsite-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.chatWebsite-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.chatWebsite-dialog{max-width:720px;width:720px}md-dialog.chatWebsite-dialog md-dialog-content{display:block;position:relative}md-dialog.chatWebsite-dialog md-toolbar .title{font-size:17px}md-dialog.chatWebsite-dialog md-input-container textarea{min-height:150px}md-dialog.chatWebsite-dialog .date-container{padding:16px 0 24px 0}md-dialog.chatWebsite-dialog .error-list{font-size:13px}md-dialog.chatWebsite-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.chatWebsite-dialog .error-list .error .message{font-weight:500}md-dialog.chatWebsite-dialog .error-list .error .md-button{margin:0}md-dialog.chatWebsite-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.chatWebsite-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.chatWebsite-dialog{max-width:720px;width:720px}md-dialog.chatWebsite-dialog md-dialog-content{display:block;position:relative}md-dialog.chatWebsite-dialog md-toolbar .title{font-size:17px}md-dialog.chatWebsite-dialog md-input-container textarea{min-height:150px}md-dialog.chatWebsite-dialog .date-container{padding:16px 0 24px 0}md-dialog.chatWebsite-dialog .error-list{font-size:13px}md-dialog.chatWebsite-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.chatWebsite-dialog .error-list .error .message{font-weight:500}md-dialog.chatWebsite-dialog .error-list .error .md-button{margin:0}md-dialog.chatWebsite-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.chatWebsite-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.chatWebsite-dialog{max-width:720px;width:720px}md-dialog.chatWebsite-dialog md-dialog-content{display:block;position:relative}md-dialog.chatWebsite-dialog md-toolbar .title{font-size:17px}md-dialog.chatWebsite-dialog md-input-container textarea{min-height:150px}md-dialog.chatWebsite-dialog .date-container{padding:16px 0 24px 0}md-dialog.chatWebsite-dialog .error-list{font-size:13px}md-dialog.chatWebsite-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.chatWebsite-dialog .error-list .error .message{font-weight:500}md-dialog.chatWebsite-dialog .error-list .error .md-button{margin:0}md-dialog.chatWebsite-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.chatWebsite-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.chatWebsite-dialog{max-width:720px;width:720px}md-dialog.chatWebsite-dialog md-dialog-content{display:block;position:relative}md-dialog.chatWebsite-dialog md-toolbar .title{font-size:17px}md-dialog.chatWebsite-dialog md-input-container textarea{min-height:150px}md-dialog.chatWebsite-dialog .date-container{padding:16px 0 24px 0}md-dialog.chatWebsite-dialog .error-list{font-size:13px}md-dialog.chatWebsite-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.chatWebsite-dialog .error-list .error .message{font-weight:500}md-dialog.chatWebsite-dialog .error-list .error .md-button{margin:0}md-dialog.chatWebsite-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.chatWebsite-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.chatWebsite-dialog{max-width:720px;width:720px}md-dialog.chatWebsite-dialog md-dialog-content{display:block;position:relative}md-dialog.chatWebsite-dialog md-toolbar .title{font-size:17px}md-dialog.chatWebsite-dialog md-input-container textarea{min-height:150px}md-dialog.chatWebsite-dialog .date-container{padding:16px 0 24px 0}md-dialog.chatWebsite-dialog .error-list{font-size:13px}md-dialog.chatWebsite-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.chatWebsite-dialog .error-list .error .message{font-weight:500}md-dialog.chatWebsite-dialog .error-list .error .md-button{margin:0}md-dialog.chatWebsite-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.chatWebsite-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.chatWebsite-dialog{max-width:720px;width:720px}md-dialog.chatWebsite-dialog md-dialog-content{display:block;position:relative}md-dialog.chatWebsite-dialog md-toolbar .title{font-size:17px}md-dialog.chatWebsite-dialog md-input-container textarea{min-height:150px}md-dialog.chatWebsite-dialog .date-container{padding:16px 0 24px 0}md-dialog.chatWebsite-dialog .error-list{font-size:13px}md-dialog.chatWebsite-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.chatWebsite-dialog .error-list .error .message{font-weight:500}md-dialog.chatWebsite-dialog .error-list .error .md-button{margin:0}md-dialog.chatWebsite-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.chatWebsite-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.chatWebsite-dialog{max-width:720px;width:720px}md-dialog.chatWebsite-dialog md-dialog-content{display:block;position:relative}md-dialog.chatWebsite-dialog md-toolbar .title{font-size:17px}md-dialog.chatWebsite-dialog md-input-container textarea{min-height:150px}md-dialog.chatWebsite-dialog .date-container{padding:16px 0 24px 0}md-dialog.chatWebsite-dialog .error-list{font-size:13px}md-dialog.chatWebsite-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.chatWebsite-dialog .error-list .error .message{font-weight:500}md-dialog.chatWebsite-dialog .error-list .error .md-button{margin:0}md-dialog.chatWebsite-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.chatWebsite-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.chatCannedAnswer-dialog{max-width:720px;width:720px}md-dialog.chatCannedAnswer-dialog md-dialog-content{display:block;position:relative}md-dialog.chatCannedAnswer-dialog md-toolbar .title{font-size:17px}md-dialog.chatCannedAnswer-dialog md-input-container textarea{min-height:150px}md-dialog.chatCannedAnswer-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.chatCannedAnswer-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.chatCannedAnswer-dialog .date-container{padding:16px 0 24px 0}md-dialog.chatCannedAnswer-dialog .error-list{font-size:13px}md-dialog.chatCannedAnswer-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.chatCannedAnswer-dialog .error-list .error .message{font-weight:500}md-dialog.chatCannedAnswer-dialog .error-list .error .md-button{margin:0}md-dialog.chatCannedAnswer-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.chatCannedAnswer-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.offlineMessage-dialog{max-width:720px;width:720px}md-dialog.offlineMessage-dialog md-dialog-content{display:block;position:relative}md-dialog.offlineMessage-dialog md-toolbar .title{font-size:17px}md-dialog.offlineMessage-dialog md-input-container textarea{min-height:150px}md-dialog.offlineMessage-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.offlineMessage-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.offlineMessage-dialog .date-container{padding:16px 0 24px 0}md-dialog.offlineMessage-dialog .error-list{font-size:13px}md-dialog.offlineMessage-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.offlineMessage-dialog .error-list .error .message{font-weight:500}md-dialog.offlineMessage-dialog .error-list .error .md-button{margin:0}md-dialog.offlineMessage-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.offlineMessage-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.chatProactiveAction-dialog{max-width:720px;width:720px}md-dialog.chatProactiveAction-dialog md-dialog-content{display:block;position:relative}md-dialog.chatProactiveAction-dialog md-toolbar .title{font-size:17px}md-dialog.chatProactiveAction-dialog md-input-container textarea{min-height:150px}md-dialog.chatProactiveAction-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.chatProactiveAction-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.chatProactiveAction-dialog .date-container{padding:16px 0 24px 0}md-dialog.chatProactiveAction-dialog .error-list{font-size:13px}md-dialog.chatProactiveAction-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.chatProactiveAction-dialog .error-list .error .message{font-weight:500}md-dialog.chatProactiveAction-dialog .error-list .error .md-button{margin:0}md-dialog.chatProactiveAction-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.chatProactiveAction-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}#chat-chatWebsite .header{height:76px;min-height:76px;max-height:76px}#chat-chatWebsite .header .goto-chatWebsites-button{margin-right:16px}#chat-chatWebsite .header .chatWebsite-image{overflow:hidden;width:56px;height:56px;margin-right:16px;border:3px solid rgba(0,0,0,.12)}#chat-chatWebsite .header .chatWebsite-image img{height:100%;width:auto;max-width:none}#chat-chatWebsite .header .subtitle{margin:6px 0 0 0}#chat-chatWebsite .chatWebsite-detail-form-container{padding:24px;margin-bottom:24px}#chat-chatWebsite .chatWebsite-detail-form-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}#chat-chatWebsite .chatWebsite-detail-form-container .handle{cursor:move}#chat-chatWebsite .chatWebsite-detail-form-container md-input-container md-switch{margin:0!important}#chat-chatWebsite .chatWebsite-detail-form-container #chatWebsite-image-uploader{position:relative}#chat-chatWebsite .chatWebsite-detail-form-container #chatWebsite-image-uploader.dropping .drop-text{display:flex}#chat-chatWebsite .chatWebsite-detail-form-container #chatWebsite-image-uploader .drop-text{display:none;position:absolute;top:0;right:0;bottom:0;left:0;padding:16px;text-align:center;border:2px dashed rgba(0,0,0,.12);background:#fff;font-size:20px;z-index:100}#chat-chatWebsite .chatWebsite-detail-form-container #chatWebsite-image-uploader .upload-button{margin-bottom:16px}#chat-chatWebsite .chatWebsite-detail-form-container #chatWebsite-image-uploader .chatWebsite-image{position:relative;width:200px;height:200px;border:1px solid rgba(0,0,0,.12);margin:8px}#chat-chatWebsite .chatWebsite-detail-form-container #chatWebsite-image-uploader .chatWebsite-image.uploading .overlay{position:absolute;top:0;right:0;bottom:0;left:0;background:rgba(0,0,0,.87)}#chat-chatWebsite .chatWebsite-detail-form-container #chatWebsite-image-uploader .chatWebsite-image .media{max-height:100%}#chat-chatWebsite .chatWebsite-detail-form-container upload-view div.upload-item md-input-container{padding:0!important}#chat-chatWebsite .chatWebsite-detail-form-container upload-view div.upload-item button.upload-button{margin:6px 8px 6px 0!important}#chat-chatWebsite .chatWebsite-detail-form-container upload-view div.upload-item button.upload-button md-icon{line-height:20px!important}#chat-chatWebsite .chatWebsite-detail-form-container upload-view div div.layout-row:not(.md-ripple-container){grid-template-columns:3em auto!important}#chat-chatWebsite .chatWebsite-detail-form-container upload-view div div.layout-row:not(.md-ripple-container) button.md-icon-button{margin:0!important}#chat-chatWebsite md-table-container thead tr th:not(:first-child):not(.no-padding){padding:0 20px 0 0!important}#chat-chatWebsite md-table-container thead th.md-checkbox-column:not(.no-padding){padding:0 24px!important}#chat-chatWebsite md-table-container tbody tr td:not(:first-child):not(.no-padding):not(.actions-padding){padding:0 20px 0 0!important}#chat-chatWebsite md-table-container.font-size-12 td.md-cell{font-size:12px!important}@media screen and (min-width:1921px){#chat-chatWebsite .actionAppData{width:800px!important}}@media screen and (max-width:1920px){#chat-chatWebsite .actionAppData{width:700px!important}}@media screen and (min-width:1751px) and (max-width:1919px){#chat-chatWebsite .actionAppData{width:600px!important}}@media screen and (min-width:1601px) and (max-width:1750px){#chat-chatWebsite .actionAppData{width:500px!important}}@media screen and (min-width:1537px) and (max-width:1600px){#chat-chatWebsite .actionAppData{width:450px!important}}@media screen and (min-width:1281px) and (max-width:1536px){#chat-chatWebsite .actionAppData{width:300px!important}}@media screen and (max-width:1280px){#chat-chatWebsite .actionAppData{width:150px!important}}@media screen and (max-width:960px){#chat-chatWebsite .actionAppData{width:80px!important}}#realtime{height:auto}#realtime>.content .blink{animation:blinker 2s linear infinite}#realtime>.content .avatar-wrapper{position:relative}#realtime>.content .avatar-wrapper .status{position:absolute;bottom:-3px;right:5px}#realtime>.content .search-input-wrapper{position:relative;margin-left:20px}#realtime>.content .search-input-wrapper label{padding:6px;cursor:pointer}#realtime>.content .search-input-wrapper md-input-container{padding-top:20px}#realtime>.content .main .labels{padding:8px 16px}#realtime>.content .main .labels .label{margin:0 0 2px 4px;padding:2px 5px;font-size:11px;white-space:nowrap;border-radius:2px}#realtime>.content .main .status{position:absolute;bottom:-3px;right:5px}#realtime>.content .main .avatar-wrapper{position:relative}#realtime>.content .main .avatar-wrapper .status{position:absolute;bottom:-3px;right:5px}#realtime>.content .custom-column{padding:0 24px!important}@keyframes blinker{50%{opacity:0}}#companies{position:relative}#companies>.header{height:76px;min-height:76px;max-height:76px}#companies>.header .logo .logo-icon{margin:0 16px 0 0}#companies>.header .logo .logo-text{font-size:24px}#companies>.header md-icon{color:#fff}#companies>.header .search-input-wrapper{position:relative}#companies>.header .search-input-wrapper label{padding-right:4px;cursor:pointer}#companies>.header .search-input-wrapper label md-icon{color:rgba(255,255,255,.8)}#companies>.header .search-input-wrapper md-input-container .md-errors-spacer{display:none}#companies>.header .search-input-wrapper md-input-container input{border-bottom:1px solid rgba(255,255,255,.8);color:rgba(255,255,255,.8);width:240px}#companies>.header .search-input-wrapper md-input-container input::placeholder{color:rgba(255,255,255,.8)}#companies>.header .search-input-wrapper md-input-container input:focus{border-bottom:1px solid #fff;color:#fff}#companies>.header.selected-bar{position:absolute;top:0;left:0;right:0;z-index:999;background-image:none;opacity:1!important}#companies>.header.selected-bar .close-button-wrapper{width:244px}#companies>.content{position:absolute;top:76px;bottom:0;right:0;left:0}#companies>.content .main{padding:16px 90px 0 4px;position:absolute;top:0;left:24px;right:0;bottom:0}#companies>.content .main .no-results{box-shadow:0 1px 1px 0 rgba(0,0,0,.14)}#companies #add-company-button{position:fixed;bottom:8px;right:8px;padding:0}#companies #upload-company-button{position:fixed;bottom:8px;right:8px;padding:0}md-dialog.company-dialog{max-width:720px;width:720px}md-dialog.company-dialog md-dialog-content{display:block;position:relative}md-dialog.company-dialog md-toolbar .title{font-size:17px}md-dialog.company-dialog md-input-container textarea{min-height:150px}md-dialog.company-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.company-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.company-dialog .date-container{padding:16px 0 24px 0}md-dialog.company-dialog .error-list{font-size:13px}md-dialog.company-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.company-dialog .error-list .error .message{font-weight:500}md-dialog.company-dialog .error-list .error .md-button{margin:0}md-dialog.company-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.company-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}#contactmanager-company .header{height:76px;min-height:76px;max-height:76px}#contactmanager-company .header .goto-companies-button{margin-right:16px}#contactmanager-company .header .company-image{overflow:hidden;width:56px;height:56px;margin-right:16px;border:3px solid rgba(0,0,0,.12)}#contactmanager-company .header .company-image img{height:100%;width:auto;max-width:none}#contactmanager-company .header .subtitle{margin:6px 0 0 0}#contactmanager-company .company-detail-form-container{padding:24px;margin-bottom:24px}#contactmanager-company .company-detail-form-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}#contactmanager-company .company-detail-form-container .handle{cursor:move}#contactmanager-company .company-detail-form-container md-input-container md-switch{margin:0!important}#contactmanager-company .company-detail-form-container #company-image-uploader{position:relative}#contactmanager-company .company-detail-form-container #company-image-uploader.dropping .drop-text{display:flex}#contactmanager-company .company-detail-form-container #company-image-uploader .drop-text{display:none;position:absolute;top:0;right:0;bottom:0;left:0;padding:16px;text-align:center;border:2px dashed rgba(0,0,0,.12);background:#fff;font-size:20px;z-index:100}#contactmanager-company .company-detail-form-container #company-image-uploader .upload-button{margin-bottom:16px}#contactmanager-company .company-detail-form-container #company-image-uploader .company-image{position:relative;width:200px;height:200px;border:1px solid rgba(0,0,0,.12);margin:8px}#contactmanager-company .company-detail-form-container #company-image-uploader .company-image.uploading .overlay{position:absolute;top:0;right:0;bottom:0;left:0;background:rgba(0,0,0,.87)}#contactmanager-company .company-detail-form-container #company-image-uploader .company-image .media{max-height:100%}#contactmanager-company md-table-container thead tr th:not(:first-child):not(.no-padding){padding:0 20px 0 0!important}#contactmanager-company md-table-container thead th.md-checkbox-column:not(.no-padding){padding:0 24px!important}#contactmanager-company md-table-container tbody tr td:not(:first-child):not(.no-padding):not(.actions-padding){padding:0 20px 0 0!important}#contactmanager-company md-table-container.font-size-12 td.md-cell{font-size:12px!important}#contacts{position:relative}#contacts>.header{height:76px;min-height:76px;max-height:76px}#contacts>.header .logo .logo-icon{margin:0 16px 0 0}#contacts>.header .logo .logo-text{font-size:24px}#contacts>.header md-icon{color:#fff}#contacts>.header .search-input-wrapper{position:relative}#contacts>.header .search-input-wrapper label{padding-right:4px;cursor:pointer}#contacts>.header .search-input-wrapper label md-icon{color:rgba(255,255,255,.8)}#contacts>.header .search-input-wrapper md-input-container .md-errors-spacer{display:none}#contacts>.header .search-input-wrapper md-input-container input{border-bottom:1px solid rgba(255,255,255,.8);color:rgba(255,255,255,.8);width:240px}#contacts>.header .search-input-wrapper md-input-container input::placeholder{color:rgba(255,255,255,.8)}#contacts>.header .search-input-wrapper md-input-container input:focus{border-bottom:1px solid #fff;color:#fff}#contacts>.header.selected-bar{position:absolute;top:0;left:0;right:0;z-index:999;background-image:none;opacity:1!important}#contacts>.header.selected-bar .close-button-wrapper{width:244px}#contacts>.content{position:absolute;top:76px;bottom:0;right:0;left:0}#contacts>.content .main{padding:16px 90px 0 4px;position:absolute;top:0;left:24px;right:0;bottom:0}#contacts>.content .main .no-results{box-shadow:0 1px 1px 0 rgba(0,0,0,.14)}#contacts #add-contact-button{position:fixed;bottom:8px;right:8px;padding:0}md-dialog.cm-contact-dialog{max-width:720px;width:720px}md-dialog.cm-contact-dialog md-dialog-content{display:block;position:relative}md-dialog.cm-contact-dialog md-toolbar .title{font-size:17px}md-dialog.cm-contact-dialog md-input-container textarea{min-height:150px}md-dialog.cm-contact-dialog .date-container{padding:16px 0 24px 0}md-dialog.cm-contact-dialog .error-list{font-size:13px}md-dialog.cm-contact-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.cm-contact-dialog .error-list .error .message{font-weight:500}md-dialog.cm-contact-dialog .error-list .error .md-button{margin:0}md-dialog.cm-contact-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.cm-contact-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.cm-contact-dialog{max-width:720px;width:720px}md-dialog.cm-contact-dialog md-dialog-content{display:block;position:relative}md-dialog.cm-contact-dialog md-toolbar .title{font-size:17px}md-dialog.cm-contact-dialog md-input-container textarea{min-height:150px}md-dialog.cm-contact-dialog .date-container{padding:16px 0 24px 0}md-dialog.cm-contact-dialog .error-list{font-size:13px}md-dialog.cm-contact-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.cm-contact-dialog .error-list .error .message{font-weight:500}md-dialog.cm-contact-dialog .error-list .error .md-button{margin:0}md-dialog.cm-contact-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.cm-contact-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.hopper-dialog{max-width:720px;width:720px}md-dialog.hopper-dialog md-dialog-content{display:block;position:relative}md-dialog.hopper-dialog md-toolbar .title{font-size:17px}md-dialog.hopper-dialog md-input-container textarea{min-height:150px}md-dialog.hopper-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.hopper-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.hopper-dialog .date-container{padding:16px 0 24px 0}md-dialog.hopper-dialog .error-list{font-size:13px}md-dialog.hopper-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.hopper-dialog .error-list .error .message{font-weight:500}md-dialog.hopper-dialog .error-list .error .md-button{margin:0}md-dialog.hopper-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.hopper-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}#cm-contact .pointer{cursor:pointer}#cm-contact .header{height:76px;min-height:76px;max-height:76px}#cm-contact .header .goto-contacts-button{margin-right:16px}#cm-contact .header .contact-image{overflow:hidden;width:56px;height:56px;margin-right:16px;border:3px solid rgba(0,0,0,.12)}#cm-contact .header .contact-image img{height:100%;width:auto;max-width:none}#cm-contact .header .subtitle{margin:6px 0 0 0}#cm-contact .contact-detail-form-container{padding:24px;margin-bottom:24px}#cm-contact .contact-detail-form-container md-input-container:not(.md-input-invalid)>md-icon.email{color:green}#cm-contact .contact-detail-form-container md-input-container:not(.md-input-invalid)>md-icon.firstname{color:#1e90ff}#cm-contact .contact-detail-form-container md-input-container.md-input-invalid>md-icon.email,#cm-contact .contact-detail-form-container md-input-container.md-input-invalid>md-icon.firstname{color:red}#cm-contact .contact-detail-form-container .hint{position:absolute;left:2px;right:auto;bottom:7px;font-size:10px;line-height:14px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.import-dialog{max-width:720px;width:720px}md-dialog.import-dialog md-dialog-content{display:block;position:relative}md-dialog.import-dialog md-toolbar .title{font-size:17px}md-dialog.import-dialog md-input-container textarea{min-height:150px}md-dialog.import-dialog .date-container{padding:16px 0 24px 0}md-dialog.import-dialog .error-list{font-size:13px}md-dialog.import-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.import-dialog .error-list .error .message{font-weight:500}md-dialog.import-dialog .error-list .error .md-button{margin:0}md-dialog.import-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.import-dialog .error-list .info{background-color:rgba(24,160,135,.08);border:1px solid rgba(24,160,135,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.import-dialog .error-list .info .message{font-weight:500}md-dialog.import-dialog .error-list .info .md-button{margin:0}md-dialog.import-dialog .error-list .info:last-child{margin-bottom:30px}md-dialog.import-dialog .contact-image{overflow:hidden;width:56px;height:56px;margin-right:16px;border:3px solid rgba(0,0,0,.12)}md-dialog.import-dialog .contact-image img{height:100%;width:auto;max-width:none}md-dialog.import-dialog .contact-image .media{max-height:100%}md-dialog.import-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.cm-contact-dialog{max-width:720px;width:720px}md-dialog.cm-contact-dialog md-dialog-content{display:block;position:relative}md-dialog.cm-contact-dialog md-toolbar .title{font-size:17px}md-dialog.cm-contact-dialog md-input-container textarea{min-height:150px}md-dialog.cm-contact-dialog .date-container{padding:16px 0 24px 0}md-dialog.cm-contact-dialog .error-list{font-size:13px}md-dialog.cm-contact-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.cm-contact-dialog .error-list .error .message{font-weight:500}md-dialog.cm-contact-dialog .error-list .error .md-button{margin:0}md-dialog.cm-contact-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.cm-contact-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.globalCustomField-dialog{max-width:720px;width:720px}md-dialog.globalCustomField-dialog md-dialog-content{display:block;position:relative}md-dialog.globalCustomField-dialog md-toolbar .title{font-size:17px}md-dialog.globalCustomField-dialog md-input-container textarea{min-height:150px}md-dialog.globalCustomField-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.globalCustomField-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.globalCustomField-dialog .date-container{padding:16px 0 24px 0}md-dialog.globalCustomField-dialog .error-list{font-size:13px}md-dialog.globalCustomField-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.globalCustomField-dialog .error-list .error .message{font-weight:500}md-dialog.globalCustomField-dialog .error-list .error .md-button{margin:0}md-dialog.globalCustomField-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.globalCustomField-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}#globalCustomFields{position:relative}#globalCustomFields>.header{height:76px;min-height:76px;max-height:76px}#globalCustomFields>.header .logo .logo-icon{margin:0 16px 0 0}#globalCustomFields>.header .logo .logo-text{font-size:24px}#globalCustomFields>.header md-icon{color:#fff}#globalCustomFields>.header .search-input-wrapper{position:relative}#globalCustomFields>.header .search-input-wrapper label{padding-right:4px;cursor:pointer}#globalCustomFields>.header .search-input-wrapper label md-icon{color:rgba(255,255,255,.8)}#globalCustomFields>.header .search-input-wrapper md-input-container .md-errors-spacer{display:none}#globalCustomFields>.header .search-input-wrapper md-input-container input{border-bottom:1px solid rgba(255,255,255,.8);color:rgba(255,255,255,.8);width:240px}#globalCustomFields>.header .search-input-wrapper md-input-container input::placeholder{color:rgba(255,255,255,.8)}#globalCustomFields>.header .search-input-wrapper md-input-container input:focus{border-bottom:1px solid #fff;color:#fff}#globalCustomFields>.header.selected-bar{position:absolute;top:0;left:0;right:0;z-index:999;background-image:none;opacity:1!important}#globalCustomFields>.header.selected-bar .close-button-wrapper{width:244px}#globalCustomFields>.content{position:absolute;top:76px;bottom:0;right:0;left:0}#globalCustomFields>.content .main{padding:16px 90px 0 4px;position:absolute;top:0;left:24px;right:0;bottom:0}#globalCustomFields>.content .main .no-results{box-shadow:0 1px 1px 0 rgba(0,0,0,.14)}#globalCustomFields #add-globalCustomField-button{position:fixed;bottom:8px;right:8px;padding:0}#globalCustomFields #upload-globalCustomField-button{position:fixed;bottom:8px;right:8px;padding:0}md-dialog.list-dialog{max-width:720px;width:720px}md-dialog.list-dialog md-dialog-content{display:block;position:relative}md-dialog.list-dialog md-toolbar .title{font-size:17px}md-dialog.list-dialog md-input-container textarea{min-height:150px}md-dialog.list-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.list-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.list-dialog .date-container{padding:16px 0 24px 0}md-dialog.list-dialog .error-list{font-size:13px}md-dialog.list-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.list-dialog .error-list .error .message{font-weight:500}md-dialog.list-dialog .error-list .error .md-button{margin:0}md-dialog.list-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.list-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.customField-dialog{max-width:720px;width:720px}md-dialog.customField-dialog md-dialog-content{display:block;position:relative}md-dialog.customField-dialog md-toolbar .title{font-size:17px}md-dialog.customField-dialog md-input-container textarea{min-height:150px}md-dialog.customField-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.customField-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.customField-dialog .date-container{padding:16px 0 24px 0}md-dialog.customField-dialog .error-list{font-size:13px}md-dialog.customField-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.customField-dialog .error-list .error .message{font-weight:500}md-dialog.customField-dialog .error-list .error .md-button{margin:0}md-dialog.customField-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.customField-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}#contactmanager-list .header{height:76px;min-height:76px;max-height:76px}#contactmanager-list .header .goto-lists-button{margin-right:16px}#contactmanager-list .header .list-image{overflow:hidden;width:56px;height:56px;margin-right:16px;border:3px solid rgba(0,0,0,.12)}#contactmanager-list .header .list-image img{height:100%;width:auto;max-width:none}#contactmanager-list .header .subtitle{margin:6px 0 0 0}#contactmanager-list .list-detail-form-container{padding:24px;margin-bottom:24px}#contactmanager-list .list-detail-form-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}#contactmanager-list .list-detail-form-container .handle{cursor:move}#contactmanager-list .list-detail-form-container md-input-container md-switch{margin:0!important}#contactmanager-list .list-detail-form-container #list-image-uploader{position:relative}#contactmanager-list .list-detail-form-container #list-image-uploader.dropping .drop-text{display:flex}#contactmanager-list .list-detail-form-container #list-image-uploader .drop-text{display:none;position:absolute;top:0;right:0;bottom:0;left:0;padding:16px;text-align:center;border:2px dashed rgba(0,0,0,.12);background:#fff;font-size:20px;z-index:100}#contactmanager-list .list-detail-form-container #list-image-uploader .upload-button{margin-bottom:16px}#contactmanager-list .list-detail-form-container #list-image-uploader .list-image{position:relative;width:200px;height:200px;border:1px solid rgba(0,0,0,.12);margin:8px}#contactmanager-list .list-detail-form-container #list-image-uploader .list-image.uploading .overlay{position:absolute;top:0;right:0;bottom:0;left:0;background:rgba(0,0,0,.87)}#contactmanager-list .list-detail-form-container #list-image-uploader .list-image .media{max-height:100%}#contactmanager-list md-table-container thead tr th:not(:first-child):not(.no-padding){padding:0 20px 0 0!important}#contactmanager-list md-table-container thead th.md-checkbox-column:not(.no-padding){padding:0 24px!important}#contactmanager-list md-table-container tbody tr td:not(:first-child):not(.no-padding):not(.actions-padding){padding:0 20px 0 0!important}#contactmanager-list md-table-container.font-size-12 td.md-cell{font-size:12px!important}#lists{position:relative}#lists>.header{height:76px;min-height:76px;max-height:76px}#lists>.header .logo .logo-icon{margin:0 16px 0 0}#lists>.header .logo .logo-text{font-size:24px}#lists>.header md-icon{color:#fff}#lists>.header .search-input-wrapper{position:relative}#lists>.header .search-input-wrapper label{padding-right:4px;cursor:pointer}#lists>.header .search-input-wrapper label md-icon{color:rgba(255,255,255,.8)}#lists>.header .search-input-wrapper md-input-container .md-errors-spacer{display:none}#lists>.header .search-input-wrapper md-input-container input{border-bottom:1px solid rgba(255,255,255,.8);color:rgba(255,255,255,.8);width:240px}#lists>.header .search-input-wrapper md-input-container input::placeholder{color:rgba(255,255,255,.8)}#lists>.header .search-input-wrapper md-input-container input:focus{border-bottom:1px solid #fff;color:#fff}#lists>.header.selected-bar{position:absolute;top:0;left:0;right:0;z-index:999;background-image:none;opacity:1!important}#lists>.header.selected-bar .close-button-wrapper{width:244px}#lists>.content{position:absolute;top:76px;bottom:0;right:0;left:0}#lists>.content .main{padding:16px 90px 0 4px;position:absolute;top:0;left:24px;right:0;bottom:0}#lists>.content .main .no-results{box-shadow:0 1px 1px 0 rgba(0,0,0,.14)}#lists #add-list-button{position:fixed;bottom:8px;right:8px;padding:0}#lists #upload-list-button{position:fixed;bottom:8px;right:8px;padding:0}#dashboard-custom .filter-header{background-image:url(/assets/images/backgrounds/header-bg.png);color:#fff}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}#agent-general{width:100%;height:100%;overflow:hidden}#agent-general .agent-content{width:100%;height:100%;overflow:auto}#agent-general .agent-content.overflow-hidden{overflow:hidden}#agent-general .agent-content md-tabs{width:100%;height:100%}#agent-general .agent-content md-tabs md-tabs-content-wrapper{width:100%;height:calc(100% - 48px)}#agent-general .agent-content md-tabs md-tabs-content-wrapper md-tab-content.md-active{width:100%;height:100%;overflow:auto}#agent-general .agent-general-home-navbar{flex-grow:1;overflow-y:auto;overflow-x:hidden}#agent-general .agent-general-home-navbar::-webkit-scrollbar{width:0;background:0 0}#agent-general .agent-general-home-navbar::-webkit-scrollbar-thumb{background:0 0;border-radius:0}#agent-general .agent-general-home-sections{width:100%;height:100%;overflow:auto}#agent-general .badge{min-width:20px;height:20px;line-height:20px;padding:0 7px;font-size:11px;font-weight:700;border-radius:20px;transition:opacity .2s ease-in-out .1s}#agent-general .table-header{background-image:url(/assets/images/backgrounds/header-bg.png);color:#fff;overflow-x:auto}#agent-general .table-header::-webkit-scrollbar-thumb{background-color:rgba(0,0,0,.2)}#agent-general .table-header .md-toolbar-tools div md-select .md-select-value.md-select-placeholder{color:#fff}#agent-general .table-header .md-toolbar-tools div md-select[disabled] .md-select-value.md-select-placeholder{color:#fff}#agent-general .table-header .md-toolbar-tools div md-select[disabled] .md-select-value.md-select-placeholder .md-select-icon{display:none}#agent-general .table-header ms-quick-filter .quick-filter-date-clear-button{color:#fff}#agent-general .tooltip-preview{position:relative;display:inline-block;text-decoration:underline}#agent-general .tooltip-preview .tooltip-preview-text{display:none;opacity:0;width:500px;height:216px;position:fixed;white-space:pre-line;z-index:99999999;overflow:hidden;transition:opacity cubic-bezier(.075,.82,.165,1)}#agent-general .tooltip-preview .tooltip-preview-text .tooltip-preview-text-container{width:100%;height:100%;overflow:hidden}#agent-general .tooltip-preview .tooltip-preview-text .tooltip-preview-text-container .email-preview-message{display:block;display:-webkit-box;margin:0 auto;width:100%;height:100%;line-height:1.4;-webkit-line-clamp:10;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis;word-break:break-all}#agent-general .tooltip-preview:hover .tooltip-preview-text{display:block;opacity:1}#agent-general .reload-list md-icon{color:#fff}#agent-general .advanced-search md-icon{color:#fff}#agent-general .create-new md-icon{color:#fff}#agent-general div.draft-manager-bar{background-color:#f5f5f5;position:sticky;height:34px;bottom:0;border-top:1px solid #e0e0e0}#agent-general div.draft-manager-bar ms-tab-scroll{overflow:hidden}#agent-general div.draft-manager-bar ms-tab-scroll div.draft-manager-tab{height:34px;border-right:1px solid #e0e0e0}#agent-general td.width-5,#agent-general th.width-5{width:5px!important;min-width:auto!important;max-width:none!important}#agent-general td.width-10,#agent-general th.width-10{width:10px!important;min-width:auto!important;max-width:none!important}#agent-general td.width-15,#agent-general th.width-15{width:15px!important;min-width:auto!important;max-width:none!important}#agent-general td.no-padding,#agent-general th.no-padding{padding:0!important}#agent-general span.contact-text{width:100px!important}#agent-general span.subject-text{width:300px!important}#agent-general span.no-margin-bottom{margin-bottom:0!important}#agent-general span.no-margin-top{margin-top:0!important}#agent-general md-table-container.interactions-list thead tr th:not(.no-padding):not(.id-header){padding:0 20px 0 0!important}#agent-general md-table-container.interactions-list tbody tr td:not(.no-padding):not(.actions-padding):not(.id){padding:0 20px 0 0!important}#agent-general td.actions-padding{padding:0 8px 0 0!important}#agent-general md-toolbar.md-table-toolbar[disabled]{pointer-events:none}#agent-general md-toolbar.md-table-toolbar[disabled] ms-search-bar{opacity:.7}#agent-general md-toolbar.md-table-toolbar[disabled] ms-quick-filter{opacity:.7}#agent-general md-toolbar.md-table-toolbar[disabled] button.advanced-search,#agent-general md-toolbar.md-table-toolbar[disabled] button.interaction-reload{opacity:.7}#agent-general md-card.call-info-card{min-width:220px}#agent-general md-card.call-info-card md-card-content,#agent-general md-card.call-info-card md-card-header{padding:10px!important}#agent-general md-card.call-info-card button.reload-button{padding:0;height:22px;width:auto}@media screen and (max-width:1280px){#agent-general span.contact-text{width:100px!important}}@media screen and (max-width:1920px){#agent-general span.contact-text{width:150px!important}}#agent-general-dialog{position:fixed;width:100%;height:100%}#agent-general-dialog .agent-content{position:fixed;top:0;bottom:0;left:0;right:0}body .md-select-menu-container{z-index:110}.md-toolbar-tools{font-size:12px}div.toolbar-quick-filter[disabled]{pointer-events:none;opacity:.7}md-dialog.agent-dialog{max-width:720px;width:720px}md-dialog.agent-dialog md-dialog-content{display:block;position:relative}md-dialog.agent-dialog md-toolbar .title{font-size:17px}md-dialog.agent-dialog md-input-container textarea{min-height:150px}md-dialog.agent-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.agent-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.agent-dialog .date-container{padding:16px 0 24px 0}md-dialog.agent-dialog .error-list{font-size:13px}md-dialog.agent-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.agent-dialog .error-list .error .message{font-weight:500}md-dialog.agent-dialog .error-list .error .md-button{margin:0}md-dialog.agent-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.agent-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.agent-dialog{max-width:720px;width:720px}md-dialog.agent-dialog md-dialog-content{display:block;position:relative}md-dialog.agent-dialog md-toolbar .title{font-size:17px}md-dialog.agent-dialog md-input-container textarea{min-height:150px}md-dialog.agent-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.agent-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.agent-dialog .date-container{padding:16px 0 24px 0}md-dialog.agent-dialog .error-list{font-size:13px}md-dialog.agent-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.agent-dialog .error-list .error .message{font-weight:500}md-dialog.agent-dialog .error-list .error .md-button{margin:0}md-dialog.agent-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.agent-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.contact-trigger-dialog{max-width:720px;width:720px}md-dialog.contact-trigger-dialog md-dialog-content{display:block;position:relative;max-height:400px;height:400px}md-dialog.contact-trigger-dialog md-toolbar{background-image:url(/assets/images/backgrounds/header-bg.png);background-position:top}md-dialog.contact-trigger-dialog md-toolbar .title{font-size:17px}md-dialog.contact-trigger-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}md-dialog.contact-trigger-dialog md-dialog-actions button.select-button{position:absolute;right:0;margin-right:16px}md-dialog md-grid-list.one-row-layout{height:150px;max-height:150px}md-dialog md-grid-list.two-rows-layout{height:300px;max-height:300px}md-dialog md-card.contact-info:hover{background-color:#e9eef1ad}@media screen and (max-width:1280px){md-dialog.contact-trigger-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.contact-trigger-dialog{width:90%}}md-dialog.agent-dialog{max-width:720px;width:720px}md-dialog.agent-dialog md-dialog-content{display:block;position:relative}md-dialog.agent-dialog md-toolbar .title{font-size:17px}md-dialog.agent-dialog md-input-container textarea{min-height:150px}md-dialog.agent-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.agent-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.agent-dialog .date-container{padding:16px 0 24px 0}md-dialog.agent-dialog .error-list{font-size:13px}md-dialog.agent-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.agent-dialog .error-list .error .message{font-weight:500}md-dialog.agent-dialog .error-list .error .md-button{margin:0}md-dialog.agent-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.agent-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.details-dialog{max-width:500px;width:500px}md-dialog.details-dialog md-dialog-content{display:block;position:relative}md-dialog.details-dialog md-toolbar .title{font-size:17px}md-dialog.details-dialog md-input-container textarea{min-height:150px}md-dialog.details-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.details-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.details-dialog .date-container{padding:16px 0 24px 0}md-dialog.details-dialog .error-list{font-size:13px}md-dialog.details-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.details-dialog .error-list .error .message{font-weight:500}md-dialog.details-dialog .error-list .error .md-button{margin:0}md-dialog.details-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.details-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}#interaction-app .tags{font-size:12px}#interaction-app .tags .tag{border-radius:2px;padding:3px 8px;background-color:rgba(0,0,0,.08)}#interaction-app .tags .tag .tag-color{width:8px;height:8px;margin-right:8px;border-radius:50%}#interaction-app .content-card{position:relative;height:100%}#interaction-app .content-card .interaction{background:linear-gradient(to bottom,rgba(255,255,255,.8) 0,rgba(255,255,255,.6) 20%,rgba(255,255,255,.8))}#interaction-app .content-card .interaction .avatar-small{width:30px;min-width:30px;height:30px;line-height:30px;margin:0 8px 0 0;border-radius:50%;font-size:17px;font-weight:500;text-align:center;color:#fff}#interaction-app .content-card .interaction .interaction-agents{min-height:40px;background-color:#f3f4f5;color:rgba(0,0,0,.87);border-bottom:1px solid rgba(0,0,0,.08)}#interaction-app .content-card .interaction .interaction-agents .responsive-interactions-button{padding:0}#interaction-app .content-card .interaction .interaction-agents .interaction-contact{cursor:pointer}#interaction-app .content-card .interaction .interaction-agents .interaction-contact .avatar{margin-right:16px}#interaction-app .content-card .interaction .interaction-toolbar{min-height:64px;background-color:#f3f4f5;color:rgba(0,0,0,.87);border-bottom:1px solid rgba(0,0,0,.08)}#interaction-app .content-card .interaction .interaction-toolbar md-icon{color:rgba(0,0,0,.87)}#interaction-app .content-card .interaction .interaction-toolbar .responsive-interactions-button{padding:0}#interaction-app .content-card .interaction .interaction-toolbar .interaction-contact{cursor:pointer}#interaction-app .content-card .interaction .interaction-toolbar .interaction-contact .avatar{margin-right:16px}#interaction-app .content-card .interaction .cannedarea{margin-right:7px;font-size:14px;border:1px solid #ccc;border-radius:3px;align-self:stretch}#interaction-app .content-card .interaction .cannedarea md-autocomplete-wrap{padding:0 1em}#interaction-app .content-card .interaction .emojionearea{margin-right:7px}#interaction-app .content-card .interaction #interaction-content{background:url(/assets/images/patterns/circles-light.png) repeat}#interaction-app .content-card .interaction #interaction-content .message-row .mail-content{padding:24px 0}#interaction-app .content-card .interaction #interaction-content .message-row .mail-content .subject{color:rgba(0,0,0,.54)}#interaction-app .content-card .interaction #interaction-content .message-row .mail-content .subject .subject-text{margin-right:4px;text-transform:lowercase}#interaction-app .content-card .interaction #interaction-content .message-row .mail-content .info{padding-bottom:16px}#interaction-app .content-card .interaction #interaction-content .message-row .mail-content .info .avatar{margin-right:16px}#interaction-app .content-card .interaction #interaction-content .message-row .mail-content .info .name{margin-right:8px;font-weight:500}#interaction-app .content-card .interaction #interaction-content .message-row .mail-content .info .toggle-details{padding-top:16px;cursor:pointer;font-weight:500}#interaction-app .content-card .interaction #interaction-content .message-row .mail-content .info .details{padding-top:8px}#interaction-app .content-card .interaction #interaction-content .message-row .mail-content .info .details .title{font-weight:500;margin-right:6px}#interaction-app .content-card .interaction #interaction-content .message-row .mail-content .info .details .detail{color:rgba(0,0,0,.54)}#interaction-app .content-card .interaction #interaction-content .message-row .bubble{position:relative;padding:6px 7px 8px 9px;background-color:#fff;border:1px solid #dcdfe1;border-radius:6px;word-break:break-word}#interaction-app .content-card .interaction #interaction-content .message-row .bubble:after,#interaction-app .content-card .interaction #interaction-content .message-row .bubble:before{content:' ';position:absolute;width:0;height:0}#interaction-app .content-card .interaction #interaction-content .message-row .bubble:after{left:-7px;right:auto;top:0;bottom:auto;border:11px solid;border-color:#fff transparent transparent transparent}#interaction-app .content-card .interaction #interaction-content .message-row .bubble:before{left:-9px;right:auto;top:-1px;bottom:auto;border:8px solid;border-color:#dcdfe1 transparent transparent transparent}#interaction-app .content-card .interaction #interaction-content .message-row .bubble .time{font-size:11px;margin-top:0;text-align:right}#interaction-app .content-card .interaction #interaction-content .message-row .bubble .message{white-space:pre-wrap}#interaction-app .content-card .interaction #interaction-content .message-row .bubble .message span{word-break:break-all}#interaction-app .content-card .interaction #interaction-content .message-row.in{padding:5px}#interaction-app .content-card .interaction #interaction-content .message-row.in .avatar{margin:0 16px 0 0}#interaction-app .content-card .interaction #interaction-content .message-row.in-right-aligned{padding:5px;align-items:flex-end}#interaction-app .content-card .interaction #interaction-content .message-row.in-right-aligned .avatar{order:2;margin:0 0 0 16px}#interaction-app .content-card .interaction #interaction-content .message-row.in-right-aligned .bubble{margin-left:auto;order:1}#interaction-app .content-card .interaction #interaction-content .message-row.in-right-aligned .bubble:after{right:-9px;left:auto;top:auto;bottom:0;border-color:transparent transparent #e8f5e9 transparent}#interaction-app .content-card .interaction #interaction-content .message-row.in-right-aligned .bubble:before{right:-11px;left:auto;-moz-transform:scaleX(-1);-o-transform:scaleX(-1);-webkit-transform:scaleX(-1);transform:scaleX(-1)}#interaction-app .content-card .interaction #interaction-content .message-row.out{padding:5px;align-items:flex-end}#interaction-app .content-card .interaction #interaction-content .message-row.out .avatar{order:2;margin:0 0 0 16px}#interaction-app .content-card .interaction #interaction-content .message-row.out .bubble{margin-left:auto;background-color:#e8f5e9;border:1px solid #dfebe0;order:1}#interaction-app .content-card .interaction #interaction-content .message-row.out .bubble:after{right:-7px;left:auto;top:auto;bottom:0;border-color:transparent transparent #e8f5e9 transparent}#interaction-app .content-card .interaction #interaction-content .message-row.out .bubble:before{right:-9px;left:auto;top:auto;bottom:-1px;border-color:transparent transparent #dfebe0 transparent}#interaction-app .content-card .interaction #interaction-content .message-row.out-left-aligned{padding:5px}#interaction-app .content-card .interaction #interaction-content .message-row.out-left-aligned .avatar{order:1;margin:0 16px 0 0}#interaction-app .content-card .interaction #interaction-content .message-row.out-left-aligned .bubble{background-color:#e8f5e9;border:1px solid #dfebe0;order:2}#interaction-app .content-card .interaction #interaction-content .message-row.out-left-aligned .bubble:after{right:-7px;left:auto;top:auto;bottom:0;border-color:transparent transparent #e8f5e9 transparent}#interaction-app .content-card .interaction #interaction-content .message-row.out-left-aligned .bubble:before{right:-9px;left:auto;top:auto;bottom:-1px;border-color:transparent transparent #dfebe0 transparent}#interaction-app .content-card .interaction .interaction-footer{min-height:64px;max-height:180px;background-color:#f3f4f5;color:rgba(0,0,0,.87);border-top:1px solid rgba(0,0,0,.08);padding:8px 8px 8px 16px}#interaction-app .content-card .interaction .interaction-footer .reply-form md-input-container{margin:0;padding-right:16px}#interaction-app .content-card .interaction .interaction-footer .reply-form md-input-container textarea{overflow:auto;max-height:80px;transition:height .2s ease}#interaction-app .content-card .interaction .interaction-footer .reply-form md-input-container textarea.grow{height:80px}#interaction-app .content-card .interaction .interaction-footer .reply-form md-input-container .md-errors-spacer{display:none}#interaction-app .content-card .interaction .interaction-footer .reply-form .md-button{margin:0}#interaction-app .content-card .info md-list-item{min-height:40px;height:52px}#interaction-app .content-card .start-point{background:linear-gradient(to bottom,rgba(255,255,255,.8) 0,rgba(255,255,255,.6) 20%,rgba(255,255,255,.8))}#interaction-app .content-card .start-point .big-circle{background:linear-gradient(to bottom,rgba(255,255,255,.8) 0,rgba(255,255,255,.6) 20%,rgba(255,255,255,.8));border-radius:50%;width:300px;height:300px;line-height:300px;text-align:center}#interaction-app .content-card .start-point .app-title{font-weight:500;font-size:32px;margin:12px 0}#interaction-app .content-card .start-point .secondary-text{font-size:16px}#interaction-app .content-card .sidenav md-toolbar{border-bottom:1px solid rgba(0,0,0,.08)}#interaction-app .content-card .sidenav md-toolbar .md-toolbar-tools-bottom .search{height:36px;line-height:36px;padding:8px;background:#fff;font-size:13px}#interaction-app .content-card .sidenav md-toolbar .md-toolbar-tools-bottom .search .icon{margin:0;color:rgba(0,0,0,.54)}#interaction-app .content-card .sidenav md-toolbar .md-toolbar-tools-bottom .search input{padding-left:12px;height:36px;color:rgba(0,0,0,.54)}#interaction-app .content-card .sidenav md-list.contact-list,#interaction-app .content-card .sidenav md-list.interaction-list{position:relative;transition:all .2s ease-out}#interaction-app .content-card .sidenav md-list.contact-list .subheader,#interaction-app .content-card .sidenav md-list.contact-list md-list-item,#interaction-app .content-card .sidenav md-list.interaction-list .subheader,#interaction-app .content-card .sidenav md-list.interaction-list md-list-item{position:absolute;right:0;left:0;width:100%;transition:transform .2s ease-out;background:#fff;will-change:transform}#interaction-app .content-card .sidenav md-list.contact-list .subheader.ng-leave,#interaction-app .content-card .sidenav md-list.contact-list md-list-item.ng-leave,#interaction-app .content-card .sidenav md-list.interaction-list .subheader.ng-leave,#interaction-app .content-card .sidenav md-list.interaction-list md-list-item.ng-leave{transform:translateY(0);display:none}#interaction-app .content-card .sidenav md-list.contact-list .subheader.ng-leave.ng-leave-active,#interaction-app .content-card .sidenav md-list.contact-list md-list-item.ng-leave.ng-leave-active,#interaction-app .content-card .sidenav md-list.interaction-list .subheader.ng-leave.ng-leave-active,#interaction-app .content-card .sidenav md-list.interaction-list md-list-item.ng-leave.ng-leave-active{transform:translateY(-100%)}#interaction-app .content-card .sidenav md-list.contact-list .subheader.ng-hide,#interaction-app .content-card .sidenav md-list.contact-list md-list-item.ng-hide,#interaction-app .content-card .sidenav md-list.interaction-list .subheader.ng-hide,#interaction-app .content-card .sidenav md-list.interaction-list md-list-item.ng-hide{display:none}#interaction-app .content-card .sidenav md-list.contact-list .subheader.ng-hide-add-active,#interaction-app .content-card .sidenav md-list.contact-list .subheader.ng-hide-remove-active,#interaction-app .content-card .sidenav md-list.contact-list md-list-item.ng-hide-add-active,#interaction-app .content-card .sidenav md-list.contact-list md-list-item.ng-hide-remove-active,#interaction-app .content-card .sidenav md-list.interaction-list .subheader.ng-hide-add-active,#interaction-app .content-card .sidenav md-list.interaction-list .subheader.ng-hide-remove-active,#interaction-app .content-card .sidenav md-list.interaction-list md-list-item.ng-hide-add-active,#interaction-app .content-card .sidenav md-list.interaction-list md-list-item.ng-hide-remove-active{display:block;transition-property:all}#interaction-app .content-card .sidenav md-list.contact-list .subheader,#interaction-app .content-card .sidenav md-list.interaction-list .subheader{padding-left:16px;font-size:20px;font-weight:300;height:88px;line-height:88px}#interaction-app .content-card .sidenav .no-results-message{position:absolute;width:100%;height:88px;padding:16px;background:#fff;font-size:15px;font-weight:400}#interaction-app .avatar-wrapper{position:relative}#interaction-app .avatar-wrapper .avatar{margin-top:0;margin-bottom:0}#interaction-app .status{position:absolute;top:28px;left:28px;border-radius:50%}#interaction-app .status.online{color:#4caf50}#interaction-app .status.online:before{content:'\e709'}#interaction-app .status.do-not-disturb{color:#f44336}#interaction-app .status.do-not-disturb:before{content:'\e912'}#interaction-app .status.away{background-color:#ffc107;color:#fff}#interaction-app .status.away:before{content:'\e727'}#interaction-app .status.offline{color:#4caf50;background-color:#fff}#interaction-app .status.offline:before{content:'\e704'}#interaction-app .editable-wrap{position:relative}#interaction-app .editable-wrap .editable-controls{display:flex;flex-direction:row;align-items:center;width:100%}#interaction-app .editable-wrap .editable-controls .editable-input{width:inherit;background-color:#fff;padding:8px;border:1px solid rgba(0,0,0,.12)}#interaction-app .editable-wrap .editable-controls .editable-buttons{display:inherit}#interaction-app .editable-wrap .editable-controls .editable-buttons .md-button{margin:0}#interaction-app .editable-wrap .editable-controls .editable-buttons .md-button:first-of-type{padding-right:0}#interaction-app .editable-wrap .editable-controls .editable-buttons .md-button .icon-cancel{color:rgba(0,0,0,.32)}#interaction-app .editable-click{cursor:pointer;text-decoration:none;color:inherit;border-bottom:none}#interaction-app .emoji-picker-icon{right:5px;cursor:pointer}#interaction-app .input-show-hide{transition:all linear .5s}#interaction-app .input-show-hide.ng-hide{opacity:0}#interaction-app div.interaction-reply-button-container{display:inline;padding-bottom:14px}#timeline{position:relative;height:auto;padding-bottom:30px}#timeline:before{display:block;position:absolute;z-index:10;content:'';width:2px;background:rgba(0,0,0,.08);top:0;left:50%;bottom:0;margin-left:-1px}#timeline .ms-timeline-item{overflow:hidden;position:relative;z-index:20;width:100%;margin:0 auto;max-width:1200px}#timeline .ms-timeline-item .timeline-card{order:1}#timeline .ms-timeline-item .timeline-card .interaction .header .avatar .image{display:block;width:40px;height:40px;border-radius:20px}#timeline .ms-timeline-item .timeline-card .interaction .media .image{width:100%}#timeline .ms-timeline-item .timeline-point{position:absolute;width:40px;height:40px;line-height:40px;text-align:center;border-radius:50%;left:50%;margin:16px 0 0 -28px;order:2}#timeline .ms-timeline-item .timeline-point md-icon{color:#fff}#timeline .ms-timeline-item .timeline-detail{flex:50% 0 0;padding-top:28px;order:3}#timeline .ms-timeline-item .timeline-detail .time{font-size:15px;padding-left:68px}#timeline .ms-timeline-item .timeline-detail .event{color:rgba(0,0,0,.54);padding-left:68px}#timeline .ms-timeline-item:nth-child(odd) .timeline-card{flex-direction:row-reverse}#timeline .ms-timeline-item:nth-child(even) .timeline-card{order:3;padding-right:0}#timeline .ms-timeline-item:nth-child(even) .timeline-card ms-card{padding-left:84px}#timeline .ms-timeline-item:nth-child(even) .timeline-detail{order:1;padding-left:0;text-align:right}#timeline .ms-timeline-item:nth-child(even) .timeline-detail .event,#timeline .ms-timeline-item:nth-child(even) .timeline-detail .time{padding-right:68px}#timeline .ms-timeline-item:first-child{padding-top:15px}#timeline .ms-timeline-item.animate .timeline-card{animation:slide-in-left .4s}#timeline .ms-timeline-item.animate .timeline-point{animation:slide-in-bottom .4s}#timeline .ms-timeline-item.animate .timeline-detail{animation:slide-in-right .4s}#timeline .ms-timeline-item:nth-child(even).animate .timeline-card{animation:slide-in-right .4s}#timeline .ms-timeline-item:nth-child(even).animate .timeline-detail{animation:slide-in-left .4s}#timeline.timeline-left .ms-timeline-item .timeline-card{order:1}#timeline.timeline-left .ms-timeline-item .timeline-card ms-card{padding-right:68px;padding-left:0;margin-left:auto}#timeline.timeline-left .ms-timeline-item .timeline-detail{order:3;text-align:left}#timeline.timeline-left .ms-timeline-item.animate .timeline-card{animation:slide-in-left .4s}#timeline.timeline-left .ms-timeline-item.animate .timeline-detail{animation:slide-in-right .4s}#timeline.timeline-right .ms-timeline-item .timeline-card{order:3}#timeline.timeline-right .ms-timeline-item .timeline-card ms-card{padding-left:68px;padding-right:0;margin-right:auto}#timeline.timeline-right .ms-timeline-item .timeline-detail{order:1;text-align:right}#timeline.timeline-right .ms-timeline-item .timeline-detail .event,#timeline.timeline-right .ms-timeline-item .timeline-detail .time{padding-right:68px;padding-left:0}#timeline.timeline-right .ms-timeline-item.animate .timeline-card{animation:slide-in-right .4s}#timeline.timeline-right .ms-timeline-item.animate .timeline-detail{animation:slide-in-left .4s}@media screen and (max-width:1280px){#timeline .ms-timeline-item,#timeline.timeline-left .ms-timeline-item,#timeline.timeline-right .ms-timeline-item{display:block}#timeline .ms-timeline-item .timeline-point,#timeline.timeline-left .ms-timeline-item .timeline-point,#timeline.timeline-right .ms-timeline-item .timeline-point{position:relative;left:auto;margin:0 auto 16px auto;padding:0}#timeline .ms-timeline-item .timeline-detail,#timeline.timeline-left .ms-timeline-item .timeline-detail,#timeline.timeline-right .ms-timeline-item .timeline-detail{padding:2px;margin-bottom:16px}#timeline .ms-timeline-item .timeline-detail .event,#timeline .ms-timeline-item .timeline-detail .time,#timeline.timeline-left .ms-timeline-item .timeline-detail .event,#timeline.timeline-left .ms-timeline-item .timeline-detail .time,#timeline.timeline-right .ms-timeline-item .timeline-detail .event,#timeline.timeline-right .ms-timeline-item .timeline-detail .time{padding-right:0;padding-left:0;text-align:center}#timeline .ms-timeline-item .timeline-card ms-card,#timeline.timeline-left .ms-timeline-item .timeline-card ms-card,#timeline.timeline-right .ms-timeline-item .timeline-card ms-card{margin:0 auto;padding:0}#timeline .ms-timeline-item:nth-child(even) .timeline-point,#timeline.timeline-left .ms-timeline-item:nth-child(even) .timeline-point,#timeline.timeline-right .ms-timeline-item:nth-child(even) .timeline-point{position:relative;left:auto;margin:0 auto 16px auto;padding:0}#timeline .ms-timeline-item:nth-child(even) .timeline-detail,#timeline.timeline-left .ms-timeline-item:nth-child(even) .timeline-detail,#timeline.timeline-right .ms-timeline-item:nth-child(even) .timeline-detail{padding:2px;margin-bottom:16px}#timeline .ms-timeline-item:nth-child(even) .timeline-detail .event,#timeline .ms-timeline-item:nth-child(even) .timeline-detail .time,#timeline.timeline-left .ms-timeline-item:nth-child(even) .timeline-detail .event,#timeline.timeline-left .ms-timeline-item:nth-child(even) .timeline-detail .time,#timeline.timeline-right .ms-timeline-item:nth-child(even) .timeline-detail .event,#timeline.timeline-right .ms-timeline-item:nth-child(even) .timeline-detail .time{padding-right:0;padding-left:0;text-align:center}#timeline .ms-timeline-item:nth-child(even) .timeline-card ms-card,#timeline.timeline-left .ms-timeline-item:nth-child(even) .timeline-card ms-card,#timeline.timeline-right .ms-timeline-item:nth-child(even) .timeline-card ms-card{margin:0 auto;padding:0}}md-dialog.compose-dialog{max-width:720px;width:720px}md-dialog.compose-dialog.mail-no-secret{max-height:97%;max-width:90%!important;width:100%!important}md-dialog.compose-dialog md-dialog-content{display:block;position:relative}md-dialog.compose-dialog md-toolbar .title{font-size:17px}md-dialog.compose-dialog md-toolbar .vertical-divider{position:absolute;border-right-width:.5px;border-right-style:solid;height:100%}md-dialog.compose-dialog md-chips md-chip{font-size:12px}md-dialog.compose-dialog md-chips .md-chip-input-container{width:100%}md-dialog.compose-dialog .to{position:relative}md-dialog.compose-dialog .to.hidden-cc input{padding-right:32px}md-dialog.compose-dialog .to.hidden-cc.hidden-bcc input{padding-right:56px}md-dialog.compose-dialog .to.hidden-bcc input{padding-right:32px}md-dialog.compose-dialog .to .cc-bcc{position:absolute;bottom:8px;right:0}md-dialog.compose-dialog .to .cc-bcc .show-bcc,md-dialog.compose-dialog .to .cc-bcc .show-cc{cursor:pointer;font-size:12px}md-dialog.compose-dialog .to .cc-bcc .show-bcc{margin-left:8px}md-dialog.compose-dialog .attachment-list{font-size:13px}md-dialog.compose-dialog .attachment-list .attachment{background-color:rgba(0,0,0,.08);border:1px solid rgba(0,0,0,.16);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.compose-dialog .attachment-list .attachment .filename{font-weight:500}md-dialog.compose-dialog .attachment-list .attachment .md-button{margin:0}md-dialog.compose-dialog .attachment-list .attachment:last-child{margin-bottom:0}md-dialog.compose-dialog .error-list{font-size:13px}md-dialog.compose-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.compose-dialog .error-list .error .message{font-weight:500}md-dialog.compose-dialog .error-list .error .md-button{margin:0}md-dialog.compose-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.compose-dialog .emojionearea{max-width:700px;min-height:300px}md-dialog.compose-dialog md-dialog-actions{position:relative;justify-content:space-between;border-top:1px solid rgba(0,0,0,.12);background-color:rgba(0,0,0,.03)}@media screen and (max-width:960px){md-dialog.compose-dialog{width:80%}}@media screen and (max-width:600px){md-dialog.compose-dialog{width:90%}}md-dialog.disposition-dialog{max-width:720px;width:720px}md-dialog.disposition-dialog md-dialog-content{display:block;position:relative}md-dialog.disposition-dialog md-toolbar .title{font-size:17px}md-dialog.disposition-dialog md-input-container textarea{min-height:150px}md-dialog.disposition-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.disposition-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.disposition-dialog .date-container{padding:16px 0 24px 0}md-dialog.disposition-dialog .error-list{font-size:13px}md-dialog.disposition-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.disposition-dialog .error-list .error .message{font-weight:500}md-dialog.disposition-dialog .error-list .error .md-button{margin:0}md-dialog.disposition-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.disposition-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.disposition-dialog{max-width:720px;width:720px}md-dialog.disposition-dialog md-dialog-content{display:block;position:relative}md-dialog.disposition-dialog md-toolbar .title{font-size:17px}md-dialog.disposition-dialog md-input-container textarea{min-height:150px}md-dialog.disposition-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.disposition-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.disposition-dialog .date-container{padding:16px 0 24px 0}md-dialog.disposition-dialog .error-list{font-size:13px}md-dialog.disposition-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.disposition-dialog .error-list .error .message{font-weight:500}md-dialog.disposition-dialog .error-list .error .md-button{margin:0}md-dialog.disposition-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.disposition-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.disposition-dialog{max-width:720px;width:720px}md-dialog.disposition-dialog md-dialog-content{display:block;position:relative}md-dialog.disposition-dialog md-toolbar .title{font-size:17px}md-dialog.disposition-dialog md-input-container textarea{min-height:150px}md-dialog.disposition-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.disposition-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.disposition-dialog .date-container{padding:16px 0 24px 0}md-dialog.disposition-dialog .error-list{font-size:13px}md-dialog.disposition-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.disposition-dialog .error-list .error .message{font-weight:500}md-dialog.disposition-dialog .error-list .error .md-button{margin:0}md-dialog.disposition-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.disposition-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}#dashboard-general>.center>.header{height:160px;min-height:160px;max-height:160px;padding-bottom:0}#dashboard-general>.center>.header .selected-general{background:rgba(0,0,0,.12);color:#fff;padding:8px 16px;height:40px;line-height:24px;font-size:16px}#dashboard-general>.center>.header .general-selector{margin-left:1px;border-radius:0;background:rgba(0,0,0,.12)}#dashboard-general>.center>.header .general-selector md-icon{color:#fff}#dashboard-general>.center>.content{background:0 0;padding:0}#dashboard-general>.center>.content>md-tabs>md-tabs-wrapper{background:#fff;box-shadow:0 1px 3px 0 rgba(0,0,0,.2),0 1px 1px 0 rgba(0,0,0,.14),0 2px 1px -1px rgba(0,0,0,.12);padding:0 24px}#dashboard-general>.center>.content>md-tabs>md-tabs-wrapper md-tabs-canvas{height:56px}#dashboard-general>.center>.content>md-tabs>md-tabs-wrapper md-tabs-canvas md-pagination-wrapper{height:56px}#dashboard-general>.center>.content>md-tabs>md-tabs-wrapper md-tabs-canvas .md-tab{padding:16px 24px;text-transform:none}#dashboard-general>.center>.content>md-tabs:not(.md-dynamic-height) md-tabs-content-wrapper{top:56px}#dashboard-general>.center>.content>md-tabs>md-tabs-content-wrapper md-tab-content{padding:12px}#dashboard-general>.sidenav{width:330px;min-width:330px;max-width:330px;padding:0;z-index:51;box-shadow:0 5px 5px -3px rgba(0,0,0,.2),0 8px 10px 1px rgba(0,0,0,.14),0 3px 14px 2px rgba(0,0,0,.12)}#dashboard-general>.sidenav.md-locked-open{width:250px;min-width:250px;max-width:250px;z-index:2;box-shadow:none;background:#eee}#dashboard-general .dashboard-container{padding:24px;margin-bottom:24px}#dashboard-general .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.faxAccount-dialog{max-width:720px;width:720px}md-dialog.faxAccount-dialog md-dialog-content{display:block;position:relative}md-dialog.faxAccount-dialog md-toolbar .title{font-size:17px}md-dialog.faxAccount-dialog md-input-container textarea{min-height:150px}md-dialog.faxAccount-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.faxAccount-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.faxAccount-dialog .date-container{padding:16px 0 24px 0}md-dialog.faxAccount-dialog .error-list{font-size:13px}md-dialog.faxAccount-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.faxAccount-dialog .error-list .error .message{font-weight:500}md-dialog.faxAccount-dialog .error-list .error .md-button{margin:0}md-dialog.faxAccount-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.faxAccount-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.faxAccount-dialog{max-width:720px;width:720px}md-dialog.faxAccount-dialog md-dialog-content{display:block;position:relative}md-dialog.faxAccount-dialog md-toolbar .title{font-size:17px}md-dialog.faxAccount-dialog md-input-container textarea{min-height:150px}md-dialog.faxAccount-dialog .date-container{padding:16px 0 24px 0}md-dialog.faxAccount-dialog .error-list{font-size:13px}md-dialog.faxAccount-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.faxAccount-dialog .error-list .error .message{font-weight:500}md-dialog.faxAccount-dialog .error-list .error .md-button{margin:0}md-dialog.faxAccount-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.faxAccount-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.faxAccount-dialog{max-width:720px;width:720px}md-dialog.faxAccount-dialog md-dialog-content{display:block;position:relative}md-dialog.faxAccount-dialog md-toolbar .title{font-size:17px}md-dialog.faxAccount-dialog md-input-container textarea{min-height:150px}md-dialog.faxAccount-dialog .date-container{padding:16px 0 24px 0}md-dialog.faxAccount-dialog .error-list{font-size:13px}md-dialog.faxAccount-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.faxAccount-dialog .error-list .error .message{font-weight:500}md-dialog.faxAccount-dialog .error-list .error .md-button{margin:0}md-dialog.faxAccount-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.faxAccount-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.faxAccount-dialog{max-width:720px;width:720px}md-dialog.faxAccount-dialog md-dialog-content{display:block;position:relative}md-dialog.faxAccount-dialog md-toolbar .title{font-size:17px}md-dialog.faxAccount-dialog md-input-container textarea{min-height:150px}md-dialog.faxAccount-dialog .date-container{padding:16px 0 24px 0}md-dialog.faxAccount-dialog .error-list{font-size:13px}md-dialog.faxAccount-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.faxAccount-dialog .error-list .error .message{font-weight:500}md-dialog.faxAccount-dialog .error-list .error .md-button{margin:0}md-dialog.faxAccount-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.faxAccount-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.faxAccount-dialog{max-width:720px;width:720px}md-dialog.faxAccount-dialog md-dialog-content{display:block;position:relative}md-dialog.faxAccount-dialog md-toolbar .title{font-size:17px}md-dialog.faxAccount-dialog md-input-container textarea{min-height:150px}md-dialog.faxAccount-dialog .date-container{padding:16px 0 24px 0}md-dialog.faxAccount-dialog .error-list{font-size:13px}md-dialog.faxAccount-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.faxAccount-dialog .error-list .error .message{font-weight:500}md-dialog.faxAccount-dialog .error-list .error .md-button{margin:0}md-dialog.faxAccount-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.faxAccount-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.faxAccount-dialog{max-width:720px;width:720px}md-dialog.faxAccount-dialog md-dialog-content{display:block;position:relative}md-dialog.faxAccount-dialog md-toolbar .title{font-size:17px}md-dialog.faxAccount-dialog md-input-container textarea{min-height:150px}md-dialog.faxAccount-dialog .date-container{padding:16px 0 24px 0}md-dialog.faxAccount-dialog .error-list{font-size:13px}md-dialog.faxAccount-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.faxAccount-dialog .error-list .error .message{font-weight:500}md-dialog.faxAccount-dialog .error-list .error .md-button{margin:0}md-dialog.faxAccount-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.faxAccount-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.faxAccount-dialog{max-width:720px;width:720px}md-dialog.faxAccount-dialog md-dialog-content{display:block;position:relative}md-dialog.faxAccount-dialog md-toolbar .title{font-size:17px}md-dialog.faxAccount-dialog md-input-container textarea{min-height:150px}md-dialog.faxAccount-dialog .date-container{padding:16px 0 24px 0}md-dialog.faxAccount-dialog .error-list{font-size:13px}md-dialog.faxAccount-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.faxAccount-dialog .error-list .error .message{font-weight:500}md-dialog.faxAccount-dialog .error-list .error .md-button{margin:0}md-dialog.faxAccount-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.faxAccount-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.faxAccount-dialog{max-width:720px;width:720px}md-dialog.faxAccount-dialog md-dialog-content{display:block;position:relative}md-dialog.faxAccount-dialog md-toolbar .title{font-size:17px}md-dialog.faxAccount-dialog md-input-container textarea{min-height:150px}md-dialog.faxAccount-dialog .date-container{padding:16px 0 24px 0}md-dialog.faxAccount-dialog .error-list{font-size:13px}md-dialog.faxAccount-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.faxAccount-dialog .error-list .error .message{font-weight:500}md-dialog.faxAccount-dialog .error-list .error .md-button{margin:0}md-dialog.faxAccount-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.faxAccount-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.faxAccount-dialog{max-width:720px;width:720px}md-dialog.faxAccount-dialog md-dialog-content{display:block;position:relative}md-dialog.faxAccount-dialog md-toolbar .title{font-size:17px}md-dialog.faxAccount-dialog md-input-container textarea{min-height:150px}md-dialog.faxAccount-dialog .date-container{padding:16px 0 24px 0}md-dialog.faxAccount-dialog .error-list{font-size:13px}md-dialog.faxAccount-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.faxAccount-dialog .error-list .error .message{font-weight:500}md-dialog.faxAccount-dialog .error-list .error .md-button{margin:0}md-dialog.faxAccount-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.faxAccount-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.faxAccount-dialog{max-width:720px;width:720px}md-dialog.faxAccount-dialog md-dialog-content{display:block;position:relative}md-dialog.faxAccount-dialog md-toolbar .title{font-size:17px}md-dialog.faxAccount-dialog md-input-container textarea{min-height:150px}md-dialog.faxAccount-dialog .date-container{padding:16px 0 24px 0}md-dialog.faxAccount-dialog .error-list{font-size:13px}md-dialog.faxAccount-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.faxAccount-dialog .error-list .error .message{font-weight:500}md-dialog.faxAccount-dialog .error-list .error .md-button{margin:0}md-dialog.faxAccount-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.faxAccount-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}#fax-faxAccount .header{height:76px;min-height:76px;max-height:76px}#fax-faxAccount .header .goto-faxAccounts-button{margin-right:16px}#fax-faxAccount .header .faxAccount-image{overflow:hidden;width:56px;height:56px;margin-right:16px;border:3px solid rgba(0,0,0,.12)}#fax-faxAccount .header .faxAccount-image img{height:100%;width:auto;max-width:none}#fax-faxAccount .header .subtitle{margin:6px 0 0 0}#fax-faxAccount .faxAccount-detail-form-container{padding:24px;margin-bottom:24px}#fax-faxAccount .faxAccount-detail-form-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}#fax-faxAccount .faxAccount-detail-form-container .handle{cursor:move}#fax-faxAccount .faxAccount-detail-form-container md-input-container md-switch{margin:0!important}#fax-faxAccount .faxAccount-detail-form-container #faxAccount-image-uploader{position:relative}#fax-faxAccount .faxAccount-detail-form-container #faxAccount-image-uploader.dropping .drop-text{display:flex}#fax-faxAccount .faxAccount-detail-form-container #faxAccount-image-uploader .drop-text{display:none;position:absolute;top:0;right:0;bottom:0;left:0;padding:16px;text-align:center;border:2px dashed rgba(0,0,0,.12);background:#fff;font-size:20px;z-index:100}#fax-faxAccount .faxAccount-detail-form-container #faxAccount-image-uploader .upload-button{margin-bottom:16px}#fax-faxAccount .faxAccount-detail-form-container #faxAccount-image-uploader .faxAccount-image{position:relative;width:200px;height:200px;border:1px solid rgba(0,0,0,.12);margin:8px}#fax-faxAccount .faxAccount-detail-form-container #faxAccount-image-uploader .faxAccount-image.uploading .overlay{position:absolute;top:0;right:0;bottom:0;left:0;background:rgba(0,0,0,.87)}#fax-faxAccount .faxAccount-detail-form-container #faxAccount-image-uploader .faxAccount-image .media{max-height:100%}#fax-faxAccount md-table-container thead tr th:not(:first-child):not(.no-padding){padding:0 20px 0 0!important}#fax-faxAccount md-table-container thead th.md-checkbox-column:not(.no-padding){padding:0 24px!important}#fax-faxAccount md-table-container tbody tr td:not(:first-child):not(.no-padding):not(.actions-padding){padding:0 20px 0 0!important}#fax-faxAccount md-table-container.font-size-12 td.md-cell{font-size:12px!important}@media screen and (min-width:1921px){#fax-faxAccount .actionAppData{width:800px!important}}@media screen and (max-width:1920px){#fax-faxAccount .actionAppData{width:700px!important}}@media screen and (min-width:1751px) and (max-width:1919px){#fax-faxAccount .actionAppData{width:600px!important}}@media screen and (min-width:1601px) and (max-width:1750px){#fax-faxAccount .actionAppData{width:500px!important}}@media screen and (min-width:1537px) and (max-width:1600px){#fax-faxAccount .actionAppData{width:450px!important}}@media screen and (min-width:1281px) and (max-width:1536px){#fax-faxAccount .actionAppData{width:300px!important}}@media screen and (max-width:1280px){#fax-faxAccount .actionAppData{width:150px!important}}@media screen and (max-width:960px){#fax-faxAccount .actionAppData{width:80px!important}}#faxAccounts{position:relative}#faxAccounts>.header{height:76px;min-height:76px;max-height:76px}#faxAccounts>.header .logo .logo-icon{margin:0 16px 0 0}#faxAccounts>.header .logo .logo-text{font-size:24px}#faxAccounts>.header md-icon{color:#fff}#faxAccounts>.header .search-input-wrapper{position:relative}#faxAccounts>.header .search-input-wrapper label{padding-right:4px;cursor:pointer}#faxAccounts>.header .search-input-wrapper label md-icon{color:rgba(255,255,255,.8)}#faxAccounts>.header .search-input-wrapper md-input-container .md-errors-spacer{display:none}#faxAccounts>.header .search-input-wrapper md-input-container input{border-bottom:1px solid rgba(255,255,255,.8);color:rgba(255,255,255,.8);width:240px}#faxAccounts>.header .search-input-wrapper md-input-container input::placeholder{color:rgba(255,255,255,.8)}#faxAccounts>.header .search-input-wrapper md-input-container input:focus{border-bottom:1px solid #fff;color:#fff}#faxAccounts>.header.selected-bar{position:absolute;top:0;left:0;right:0;z-index:999;background-image:none;opacity:1!important}#faxAccounts>.header.selected-bar .close-button-wrapper{width:244px}#faxAccounts>.content{position:absolute;top:76px;bottom:0;right:0;left:0}#faxAccounts>.content .main{padding:16px 90px 0 4px;position:absolute;top:0;left:24px;right:0;bottom:0}#faxAccounts>.content .main .no-results{box-shadow:0 1px 1px 0 rgba(0,0,0,.14)}#faxAccounts #add-faxAccount-button{position:fixed;bottom:8px;right:8px;padding:0}#faxAccounts #upload-faxAccount-button{position:fixed;bottom:8px;right:8px;padding:0}md-dialog.faxQueue-dialog{max-width:720px;width:720px}md-dialog.faxQueue-dialog md-dialog-content{display:block;position:relative}md-dialog.faxQueue-dialog md-toolbar .title{font-size:17px}md-dialog.faxQueue-dialog md-input-container textarea{min-height:150px}md-dialog.faxQueue-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.faxQueue-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.faxQueue-dialog .date-container{padding:16px 0 24px 0}md-dialog.faxQueue-dialog .error-list{font-size:13px}md-dialog.faxQueue-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.faxQueue-dialog .error-list .error .message{font-weight:500}md-dialog.faxQueue-dialog .error-list .error .md-button{margin:0}md-dialog.faxQueue-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.faxQueue-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}#fax-faxQueue .header{height:76px;min-height:76px;max-height:76px}#fax-faxQueue .header .goto-faxQueues-button{margin-right:16px}#fax-faxQueue .header .faxQueue-image{overflow:hidden;width:56px;height:56px;margin-right:16px;border:3px solid rgba(0,0,0,.12)}#fax-faxQueue .header .faxQueue-image img{height:100%;width:auto;max-width:none}#fax-faxQueue .header .subtitle{margin:6px 0 0 0}#fax-faxQueue .faxQueue-detail-form-container{padding:24px;margin-bottom:24px}#fax-faxQueue .faxQueue-detail-form-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}#fax-faxQueue .faxQueue-detail-form-container .handle{cursor:move}#fax-faxQueue .faxQueue-detail-form-container md-input-container md-switch{margin:0!important}#fax-faxQueue .faxQueue-detail-form-container #faxQueue-image-uploader{position:relative}#fax-faxQueue .faxQueue-detail-form-container #faxQueue-image-uploader.dropping .drop-text{display:flex}#fax-faxQueue .faxQueue-detail-form-container #faxQueue-image-uploader .drop-text{display:none;position:absolute;top:0;right:0;bottom:0;left:0;padding:16px;text-align:center;border:2px dashed rgba(0,0,0,.12);background:#fff;font-size:20px;z-index:100}#fax-faxQueue .faxQueue-detail-form-container #faxQueue-image-uploader .upload-button{margin-bottom:16px}#fax-faxQueue .faxQueue-detail-form-container #faxQueue-image-uploader .faxQueue-image{position:relative;width:200px;height:200px;border:1px solid rgba(0,0,0,.12);margin:8px}#fax-faxQueue .faxQueue-detail-form-container #faxQueue-image-uploader .faxQueue-image.uploading .overlay{position:absolute;top:0;right:0;bottom:0;left:0;background:rgba(0,0,0,.87)}#fax-faxQueue .faxQueue-detail-form-container #faxQueue-image-uploader .faxQueue-image .media{max-height:100%}#fax-faxQueue md-table-container thead tr th:not(:first-child):not(.no-padding){padding:0 20px 0 0!important}#fax-faxQueue md-table-container thead th.md-checkbox-column:not(.no-padding){padding:0 24px!important}#fax-faxQueue md-table-container tbody tr td:not(:first-child):not(.no-padding):not(.actions-padding){padding:0 20px 0 0!important}#fax-faxQueue md-table-container.font-size-12 td.md-cell{font-size:12px!important}#faxQueues{position:relative}#faxQueues>.header{height:76px;min-height:76px;max-height:76px}#faxQueues>.header .logo .logo-icon{margin:0 16px 0 0}#faxQueues>.header .logo .logo-text{font-size:24px}#faxQueues>.header md-icon{color:#fff}#faxQueues>.header .search-input-wrapper{position:relative}#faxQueues>.header .search-input-wrapper label{padding-right:4px;cursor:pointer}#faxQueues>.header .search-input-wrapper label md-icon{color:rgba(255,255,255,.8)}#faxQueues>.header .search-input-wrapper md-input-container .md-errors-spacer{display:none}#faxQueues>.header .search-input-wrapper md-input-container input{border-bottom:1px solid rgba(255,255,255,.8);color:rgba(255,255,255,.8);width:240px}#faxQueues>.header .search-input-wrapper md-input-container input::placeholder{color:rgba(255,255,255,.8)}#faxQueues>.header .search-input-wrapper md-input-container input:focus{border-bottom:1px solid #fff;color:#fff}#faxQueues>.header.selected-bar{position:absolute;top:0;left:0;right:0;z-index:999;background-image:none;opacity:1!important}#faxQueues>.header.selected-bar .close-button-wrapper{width:244px}#faxQueues>.content{position:absolute;top:76px;bottom:0;right:0;left:0}#faxQueues>.content .main{padding:16px 90px 0 4px;position:absolute;top:0;left:24px;right:0;bottom:0}#faxQueues>.content .main .no-results{box-shadow:0 1px 1px 0 rgba(0,0,0,.14)}#faxQueues #add-faxQueue-button{position:fixed;bottom:8px;right:8px;padding:0}#faxQueues #upload-faxQueue-button{position:fixed;bottom:8px;right:8px;padding:0}#realtime{height:auto}#realtime>.content .blink{animation:blinker 2s linear infinite}#realtime>.content .avatar-wrapper{position:relative}#realtime>.content .avatar-wrapper .status{position:absolute;bottom:-3px;right:5px}#realtime>.content .search-input-wrapper{position:relative;margin-left:20px}#realtime>.content .search-input-wrapper label{padding:6px;cursor:pointer}#realtime>.content .search-input-wrapper md-input-container{padding-top:20px}#realtime>.content .main .labels{padding:8px 16px}#realtime>.content .main .labels .label{margin:0 0 2px 4px;padding:2px 5px;font-size:11px;white-space:nowrap;border-radius:2px}#realtime>.content .main .status{position:absolute;bottom:-3px;right:5px}#realtime>.content .main .avatar-wrapper{position:relative}#realtime>.content .main .avatar-wrapper .status{position:absolute;bottom:-3px;right:5px}#realtime>.content .custom-column{padding:0 24px!important}@keyframes blinker{50%{opacity:0}}#profile .about-tab{max-width:1200px}#profile .about-tab .about{padding:8px}#profile .about-tab .about .general .location md-icon{line-height:13px!important}#profile .about-tab .about .work .job .company{padding:0 16px 0 0;font-weight:500}#profile .about-tab .about .work .job .date{color:rgba(0,0,0,.54)}#profile .about-tab .about-sidebar{padding:8px 8px 8px 32px}#profile .about-tab .about-sidebar .friends .content .friend{padding:4px}#profile .about-tab .about-sidebar .groups .content .group{margin-bottom:16px}#profile .about-tab .about-sidebar .groups .content .group:last-child{margin-bottom:0}#profile .about-tab .about-sidebar .groups .content .group .logo{border:1px solid rgba(0,0,0,.12);margin-right:16px}#profile .about-tab .about-sidebar .groups .content .group .name{font-weight:500;font-size:15px}#profile .about-tab .about-sidebar .groups .content .group .category,#profile .about-tab .about-sidebar .groups .content .group .members{color:rgba(0,0,0,.54)}#profile .about-tab .about-sidebar .groups .content .group .members{margin-top:16px}@media screen and (max-width:960px){#profile .about-tab .about-sidebar{padding:8px}}#maintenance{height:100%;background:url(/assets/images/backgrounds/tech.png) no-repeat;background-size:cover}#maintenance #maintenance-form-wrapper{flex:1 0 auto;padding:32px}#maintenance #maintenance-form-wrapper #maintenance-form{max-width:384px;padding:32px;background:#fff;text-align:center}#maintenance #maintenance-form-wrapper #maintenance-form .logo{width:128px;height:128px;line-height:128px;font-size:86px;font-weight:500;margin:32px auto;color:#fff;border-radius:2px}#maintenance #maintenance-form-wrapper #maintenance-form .title{font-size:17px;margin-top:16px}#maintenance #maintenance-form-wrapper #maintenance-form .subtitle{margin:16px 0;max-width:300px;color:rgba(0,0,0,.54);font-size:15px}@media screen and (max-width:600px){#maintenance #maintenance-form-wrapper{padding:16px}#maintenance #maintenance-form-wrapper #maintenance-form{padding:24px;width:100%}}md-dialog.deskAccount-dialog{max-width:720px;width:720px}md-dialog.deskAccount-dialog md-dialog-content{display:block;position:relative}md-dialog.deskAccount-dialog md-toolbar .title{font-size:17px}md-dialog.deskAccount-dialog md-input-container textarea{min-height:150px}md-dialog.deskAccount-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.deskAccount-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.deskAccount-dialog .date-container{padding:16px 0 24px 0}md-dialog.deskAccount-dialog .error-list{font-size:13px}md-dialog.deskAccount-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.deskAccount-dialog .error-list .error .message{font-weight:500}md-dialog.deskAccount-dialog .error-list .error .md-button{margin:0}md-dialog.deskAccount-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.deskAccount-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}#deskAccounts{position:relative}#deskAccounts>.header{height:76px;min-height:76px;max-height:76px}#deskAccounts>.header .logo .logo-icon{margin:0 16px 0 0}#deskAccounts>.header .logo .logo-text{font-size:24px}#deskAccounts>.header md-icon{color:#fff}#deskAccounts>.header .search-input-wrapper{position:relative}#deskAccounts>.header .search-input-wrapper label{padding-right:4px;cursor:pointer}#deskAccounts>.header .search-input-wrapper label md-icon{color:rgba(255,255,255,.8)}#deskAccounts>.header .search-input-wrapper md-input-container .md-errors-spacer{display:none}#deskAccounts>.header .search-input-wrapper md-input-container input{border-bottom:1px solid rgba(255,255,255,.8);color:rgba(255,255,255,.8);width:240px}#deskAccounts>.header .search-input-wrapper md-input-container input::placeholder{color:rgba(255,255,255,.8)}#deskAccounts>.header .search-input-wrapper md-input-container input:focus{border-bottom:1px solid #fff;color:#fff}#deskAccounts>.header.selected-bar{position:absolute;top:0;left:0;right:0;z-index:999;background-image:none;opacity:1!important}#deskAccounts>.header.selected-bar .close-button-wrapper{width:244px}#deskAccounts>.content{position:absolute;top:76px;bottom:0;right:0;left:0}#deskAccounts>.content .main{padding:16px 90px 0 4px;position:absolute;top:0;left:24px;right:0;bottom:0}#deskAccounts>.content .main .no-results{box-shadow:0 1px 1px 0 rgba(0,0,0,.14)}#deskAccounts #add-deskAccount-button{position:fixed;bottom:8px;right:8px;padding:0}#deskAccounts #upload-deskAccount-button{position:fixed;bottom:8px;right:8px;padding:0}md-dialog.deskConfiguration-dialog{max-width:720px;width:720px}md-dialog.deskConfiguration-dialog md-dialog-content{display:block;position:relative}md-dialog.deskConfiguration-dialog md-toolbar .title{font-size:17px}md-dialog.deskConfiguration-dialog md-input-container textarea{min-height:150px}md-dialog.deskConfiguration-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.deskConfiguration-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.deskConfiguration-dialog .date-container{padding:16px 0 24px 0}md-dialog.deskConfiguration-dialog .error-list{font-size:13px}md-dialog.deskConfiguration-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.deskConfiguration-dialog .error-list .error .message{font-weight:500}md-dialog.deskConfiguration-dialog .error-list .error .md-button{margin:0}md-dialog.deskConfiguration-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.deskConfiguration-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.deskAccount-item-dialog{max-width:720px;width:720px}md-dialog.deskAccount-item-dialog md-dialog-content{display:block;position:relative}md-dialog.deskAccount-item-dialog md-toolbar .title{font-size:17px}md-dialog.deskAccount-item-dialog md-input-container textarea{min-height:150px}md-dialog.deskAccount-item-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.deskAccount-item-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.deskAccount-item-dialog .date-container{padding:16px 0 24px 0}md-dialog.deskAccount-item-dialog .error-list{font-size:13px}md-dialog.deskAccount-item-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.deskAccount-item-dialog .error-list .error .message{font-weight:500}md-dialog.deskAccount-item-dialog .error-list .error .md-button{margin:0}md-dialog.deskAccount-item-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.deskAccount-item-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}#integrations-deskAccount .header{height:76px;min-height:76px;max-height:76px}#integrations-deskAccount .header .goto-deskAccounts-button{margin-right:16px}#integrations-deskAccount .header .deskAccount-image{overflow:hidden;width:56px;height:56px;margin-right:16px;border:3px solid rgba(0,0,0,.12)}#integrations-deskAccount .header .deskAccount-image img{height:100%;width:auto;max-width:none}#integrations-deskAccount .header .subtitle{margin:6px 0 0 0}#integrations-deskAccount .deskAccount-detail-form-container{padding:24px;margin-bottom:24px}#integrations-deskAccount .deskAccount-detail-form-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}#integrations-deskAccount .deskAccount-detail-form-container .handle{cursor:move}#integrations-deskAccount .deskAccount-detail-form-container md-input-container md-switch{margin:0!important}#integrations-deskAccount .deskAccount-detail-form-container #deskAccount-image-uploader{position:relative}#integrations-deskAccount .deskAccount-detail-form-container #deskAccount-image-uploader.dropping .drop-text{display:flex}#integrations-deskAccount .deskAccount-detail-form-container #deskAccount-image-uploader .drop-text{display:none;position:absolute;top:0;right:0;bottom:0;left:0;padding:16px;text-align:center;border:2px dashed rgba(0,0,0,.12);background:#fff;font-size:20px;z-index:100}#integrations-deskAccount .deskAccount-detail-form-container #deskAccount-image-uploader .upload-button{margin-bottom:16px}#integrations-deskAccount .deskAccount-detail-form-container #deskAccount-image-uploader .deskAccount-image{position:relative;width:200px;height:200px;border:1px solid rgba(0,0,0,.12);margin:8px}#integrations-deskAccount .deskAccount-detail-form-container #deskAccount-image-uploader .deskAccount-image.uploading .overlay{position:absolute;top:0;right:0;bottom:0;left:0;background:rgba(0,0,0,.87)}#integrations-deskAccount .deskAccount-detail-form-container #deskAccount-image-uploader .deskAccount-image .media{max-height:100%}#integrations-deskAccount md-table-container thead tr th:not(:first-child):not(.no-padding){padding:0 20px 0 0!important}#integrations-deskAccount md-table-container thead th.md-checkbox-column:not(.no-padding){padding:0 24px!important}#integrations-deskAccount md-table-container tbody tr td:not(:first-child):not(.no-padding):not(.actions-padding){padding:0 20px 0 0!important}#integrations-deskAccount md-table-container.font-size-12 td.md-cell{font-size:12px!important}md-dialog.dynamics365Account-dialog{max-width:720px;width:720px}md-dialog.dynamics365Account-dialog md-dialog-content{display:block;position:relative}md-dialog.dynamics365Account-dialog md-toolbar .title{font-size:17px}md-dialog.dynamics365Account-dialog md-input-container textarea{min-height:150px}md-dialog.dynamics365Account-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.dynamics365Account-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.dynamics365Account-dialog .date-container{padding:16px 0 24px 0}md-dialog.dynamics365Account-dialog .error-list{font-size:13px}md-dialog.dynamics365Account-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.dynamics365Account-dialog .error-list .error .message{font-weight:500}md-dialog.dynamics365Account-dialog .error-list .error .md-button{margin:0}md-dialog.dynamics365Account-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.dynamics365Account-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}#dynamics365Accounts{position:relative}#dynamics365Accounts>.header{height:76px;min-height:76px;max-height:76px}#dynamics365Accounts>.header .logo .logo-icon{margin:0 16px 0 0}#dynamics365Accounts>.header .logo .logo-text{font-size:24px}#dynamics365Accounts>.header md-icon{color:#fff}#dynamics365Accounts>.header .search-input-wrapper{position:relative}#dynamics365Accounts>.header .search-input-wrapper label{padding-right:4px;cursor:pointer}#dynamics365Accounts>.header .search-input-wrapper label md-icon{color:rgba(255,255,255,.8)}#dynamics365Accounts>.header .search-input-wrapper md-input-container .md-errors-spacer{display:none}#dynamics365Accounts>.header .search-input-wrapper md-input-container input{border-bottom:1px solid rgba(255,255,255,.8);color:rgba(255,255,255,.8);width:240px}#dynamics365Accounts>.header .search-input-wrapper md-input-container input::placeholder{color:rgba(255,255,255,.8)}#dynamics365Accounts>.header .search-input-wrapper md-input-container input:focus{border-bottom:1px solid #fff;color:#fff}#dynamics365Accounts>.header.selected-bar{position:absolute;top:0;left:0;right:0;z-index:999;background-image:none;opacity:1!important}#dynamics365Accounts>.header.selected-bar .close-button-wrapper{width:244px}#dynamics365Accounts>.content{position:absolute;top:76px;bottom:0;right:0;left:0}#dynamics365Accounts>.content .main{padding:16px 90px 0 4px;position:absolute;top:0;left:24px;right:0;bottom:0}#dynamics365Accounts>.content .main .no-results{box-shadow:0 1px 1px 0 rgba(0,0,0,.14)}#dynamics365Accounts #add-dynamics365Account-button{position:fixed;bottom:8px;right:8px;padding:0}#dynamics365Accounts #upload-dynamics365Account-button{position:fixed;bottom:8px;right:8px;padding:0}md-dialog.dynamics365Configuration-dialog{max-width:720px;width:720px}md-dialog.dynamics365Configuration-dialog md-dialog-content{display:block;position:relative}md-dialog.dynamics365Configuration-dialog md-toolbar .title{font-size:17px}md-dialog.dynamics365Configuration-dialog md-input-container textarea{min-height:150px}md-dialog.dynamics365Configuration-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.dynamics365Configuration-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.dynamics365Configuration-dialog .date-container{padding:16px 0 24px 0}md-dialog.dynamics365Configuration-dialog .error-list{font-size:13px}md-dialog.dynamics365Configuration-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.dynamics365Configuration-dialog .error-list .error .message{font-weight:500}md-dialog.dynamics365Configuration-dialog .error-list .error .md-button{margin:0}md-dialog.dynamics365Configuration-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.dynamics365Configuration-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.dynamics365Account-item-dialog{max-width:720px;width:720px}md-dialog.dynamics365Account-item-dialog md-dialog-content{display:block;position:relative}md-dialog.dynamics365Account-item-dialog md-toolbar .title{font-size:17px}md-dialog.dynamics365Account-item-dialog md-input-container textarea{min-height:150px}md-dialog.dynamics365Account-item-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.dynamics365Account-item-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.dynamics365Account-item-dialog .date-container{padding:16px 0 24px 0}md-dialog.dynamics365Account-item-dialog .error-list{font-size:13px}md-dialog.dynamics365Account-item-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.dynamics365Account-item-dialog .error-list .error .message{font-weight:500}md-dialog.dynamics365Account-item-dialog .error-list .error .md-button{margin:0}md-dialog.dynamics365Account-item-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.dynamics365Account-item-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}#integrations-dynamics365Account .header{height:76px;min-height:76px;max-height:76px}#integrations-dynamics365Account .header .goto-dynamics365Accounts-button{margin-right:16px}#integrations-dynamics365Account .header .dynamics365Account-image{overflow:hidden;width:56px;height:56px;margin-right:16px;border:3px solid rgba(0,0,0,.12)}#integrations-dynamics365Account .header .dynamics365Account-image img{height:100%;width:auto;max-width:none}#integrations-dynamics365Account .header .subtitle{margin:6px 0 0 0}#integrations-dynamics365Account .dynamics365Account-detail-form-container{padding:24px;margin-bottom:24px}#integrations-dynamics365Account .dynamics365Account-detail-form-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}#integrations-dynamics365Account .dynamics365Account-detail-form-container .handle{cursor:move}#integrations-dynamics365Account .dynamics365Account-detail-form-container md-input-container md-switch{margin:0!important}#integrations-dynamics365Account .dynamics365Account-detail-form-container #dynamics365Account-image-uploader{position:relative}#integrations-dynamics365Account .dynamics365Account-detail-form-container #dynamics365Account-image-uploader.dropping .drop-text{display:flex}#integrations-dynamics365Account .dynamics365Account-detail-form-container #dynamics365Account-image-uploader .drop-text{display:none;position:absolute;top:0;right:0;bottom:0;left:0;padding:16px;text-align:center;border:2px dashed rgba(0,0,0,.12);background:#fff;font-size:20px;z-index:100}#integrations-dynamics365Account .dynamics365Account-detail-form-container #dynamics365Account-image-uploader .upload-button{margin-bottom:16px}#integrations-dynamics365Account .dynamics365Account-detail-form-container #dynamics365Account-image-uploader .dynamics365Account-image{position:relative;width:200px;height:200px;border:1px solid rgba(0,0,0,.12);margin:8px}#integrations-dynamics365Account .dynamics365Account-detail-form-container #dynamics365Account-image-uploader .dynamics365Account-image.uploading .overlay{position:absolute;top:0;right:0;bottom:0;left:0;background:rgba(0,0,0,.87)}#integrations-dynamics365Account .dynamics365Account-detail-form-container #dynamics365Account-image-uploader .dynamics365Account-image .media{max-height:100%}#integrations-dynamics365Account md-table-container thead tr th:not(:first-child):not(.no-padding){padding:0 20px 0 0!important}#integrations-dynamics365Account md-table-container thead th.md-checkbox-column:not(.no-padding){padding:0 24px!important}#integrations-dynamics365Account md-table-container tbody tr td:not(:first-child):not(.no-padding):not(.actions-padding){padding:0 20px 0 0!important}#integrations-dynamics365Account md-table-container.font-size-12 td.md-cell{font-size:12px!important}md-dialog.freshdeskAccount-dialog{max-width:720px;width:720px}md-dialog.freshdeskAccount-dialog md-dialog-content{display:block;position:relative}md-dialog.freshdeskAccount-dialog md-toolbar .title{font-size:17px}md-dialog.freshdeskAccount-dialog md-input-container textarea{min-height:150px}md-dialog.freshdeskAccount-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.freshdeskAccount-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.freshdeskAccount-dialog .date-container{padding:16px 0 24px 0}md-dialog.freshdeskAccount-dialog .error-list{font-size:13px}md-dialog.freshdeskAccount-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.freshdeskAccount-dialog .error-list .error .message{font-weight:500}md-dialog.freshdeskAccount-dialog .error-list .error .md-button{margin:0}md-dialog.freshdeskAccount-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.freshdeskAccount-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.freshdeskConfiguration-dialog{max-width:720px;width:720px}md-dialog.freshdeskConfiguration-dialog md-dialog-content{display:block;position:relative}md-dialog.freshdeskConfiguration-dialog md-toolbar .title{font-size:17px}md-dialog.freshdeskConfiguration-dialog md-input-container textarea{min-height:150px}md-dialog.freshdeskConfiguration-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.freshdeskConfiguration-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.freshdeskConfiguration-dialog .date-container{padding:16px 0 24px 0}md-dialog.freshdeskConfiguration-dialog .error-list{font-size:13px}md-dialog.freshdeskConfiguration-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.freshdeskConfiguration-dialog .error-list .error .message{font-weight:500}md-dialog.freshdeskConfiguration-dialog .error-list .error .md-button{margin:0}md-dialog.freshdeskConfiguration-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.freshdeskConfiguration-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.freshdeskAccount-item-dialog{max-width:720px;width:720px}md-dialog.freshdeskAccount-item-dialog md-dialog-content{display:block;position:relative}md-dialog.freshdeskAccount-item-dialog md-toolbar .title{font-size:17px}md-dialog.freshdeskAccount-item-dialog md-input-container textarea{min-height:150px}md-dialog.freshdeskAccount-item-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.freshdeskAccount-item-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.freshdeskAccount-item-dialog .date-container{padding:16px 0 24px 0}md-dialog.freshdeskAccount-item-dialog .error-list{font-size:13px}md-dialog.freshdeskAccount-item-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.freshdeskAccount-item-dialog .error-list .error .message{font-weight:500}md-dialog.freshdeskAccount-item-dialog .error-list .error .md-button{margin:0}md-dialog.freshdeskAccount-item-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.freshdeskAccount-item-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}#integrations-freshdeskAccount .header{height:76px;min-height:76px;max-height:76px}#integrations-freshdeskAccount .header .goto-freshdeskAccounts-button{margin-right:16px}#integrations-freshdeskAccount .header .freshdeskAccount-image{overflow:hidden;width:56px;height:56px;margin-right:16px;border:3px solid rgba(0,0,0,.12)}#integrations-freshdeskAccount .header .freshdeskAccount-image img{height:100%;width:auto;max-width:none}#integrations-freshdeskAccount .header .subtitle{margin:6px 0 0 0}#integrations-freshdeskAccount .freshdeskAccount-detail-form-container{padding:24px;margin-bottom:24px}#integrations-freshdeskAccount .freshdeskAccount-detail-form-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}#integrations-freshdeskAccount .freshdeskAccount-detail-form-container .handle{cursor:move}#integrations-freshdeskAccount .freshdeskAccount-detail-form-container md-input-container md-switch{margin:0!important}#integrations-freshdeskAccount .freshdeskAccount-detail-form-container #freshdeskAccount-image-uploader{position:relative}#integrations-freshdeskAccount .freshdeskAccount-detail-form-container #freshdeskAccount-image-uploader.dropping .drop-text{display:flex}#integrations-freshdeskAccount .freshdeskAccount-detail-form-container #freshdeskAccount-image-uploader .drop-text{display:none;position:absolute;top:0;right:0;bottom:0;left:0;padding:16px;text-align:center;border:2px dashed rgba(0,0,0,.12);background:#fff;font-size:20px;z-index:100}#integrations-freshdeskAccount .freshdeskAccount-detail-form-container #freshdeskAccount-image-uploader .upload-button{margin-bottom:16px}#integrations-freshdeskAccount .freshdeskAccount-detail-form-container #freshdeskAccount-image-uploader .freshdeskAccount-image{position:relative;width:200px;height:200px;border:1px solid rgba(0,0,0,.12);margin:8px}#integrations-freshdeskAccount .freshdeskAccount-detail-form-container #freshdeskAccount-image-uploader .freshdeskAccount-image.uploading .overlay{position:absolute;top:0;right:0;bottom:0;left:0;background:rgba(0,0,0,.87)}#integrations-freshdeskAccount .freshdeskAccount-detail-form-container #freshdeskAccount-image-uploader .freshdeskAccount-image .media{max-height:100%}#integrations-freshdeskAccount md-table-container thead tr th:not(:first-child):not(.no-padding){padding:0 20px 0 0!important}#integrations-freshdeskAccount md-table-container thead th.md-checkbox-column:not(.no-padding){padding:0 24px!important}#integrations-freshdeskAccount md-table-container tbody tr td:not(:first-child):not(.no-padding):not(.actions-padding){padding:0 20px 0 0!important}#integrations-freshdeskAccount md-table-container.font-size-12 td.md-cell{font-size:12px!important}#freshdeskAccounts{position:relative}#freshdeskAccounts>.header{height:76px;min-height:76px;max-height:76px}#freshdeskAccounts>.header .logo .logo-icon{margin:0 16px 0 0}#freshdeskAccounts>.header .logo .logo-text{font-size:24px}#freshdeskAccounts>.header md-icon{color:#fff}#freshdeskAccounts>.header .search-input-wrapper{position:relative}#freshdeskAccounts>.header .search-input-wrapper label{padding-right:4px;cursor:pointer}#freshdeskAccounts>.header .search-input-wrapper label md-icon{color:rgba(255,255,255,.8)}#freshdeskAccounts>.header .search-input-wrapper md-input-container .md-errors-spacer{display:none}#freshdeskAccounts>.header .search-input-wrapper md-input-container input{border-bottom:1px solid rgba(255,255,255,.8);color:rgba(255,255,255,.8);width:240px}#freshdeskAccounts>.header .search-input-wrapper md-input-container input::placeholder{color:rgba(255,255,255,.8)}#freshdeskAccounts>.header .search-input-wrapper md-input-container input:focus{border-bottom:1px solid #fff;color:#fff}#freshdeskAccounts>.header.selected-bar{position:absolute;top:0;left:0;right:0;z-index:999;background-image:none;opacity:1!important}#freshdeskAccounts>.header.selected-bar .close-button-wrapper{width:244px}#freshdeskAccounts>.content{position:absolute;top:76px;bottom:0;right:0;left:0}#freshdeskAccounts>.content .main{padding:16px 90px 0 4px;position:absolute;top:0;left:24px;right:0;bottom:0}#freshdeskAccounts>.content .main .no-results{box-shadow:0 1px 1px 0 rgba(0,0,0,.14)}#freshdeskAccounts #add-freshdeskAccount-button{position:fixed;bottom:8px;right:8px;padding:0}#freshdeskAccounts #upload-freshdeskAccount-button{position:fixed;bottom:8px;right:8px;padding:0}md-dialog.freshsalesAccount-dialog{max-width:720px;width:720px}md-dialog.freshsalesAccount-dialog md-dialog-content{display:block;position:relative}md-dialog.freshsalesAccount-dialog md-toolbar .title{font-size:17px}md-dialog.freshsalesAccount-dialog md-input-container textarea{min-height:150px}md-dialog.freshsalesAccount-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.freshsalesAccount-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.freshsalesAccount-dialog .date-container{padding:16px 0 24px 0}md-dialog.freshsalesAccount-dialog .error-list{font-size:13px}md-dialog.freshsalesAccount-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.freshsalesAccount-dialog .error-list .error .message{font-weight:500}md-dialog.freshsalesAccount-dialog .error-list .error .md-button{margin:0}md-dialog.freshsalesAccount-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.freshsalesAccount-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.freshsalesConfiguration-dialog{max-width:720px;width:720px}md-dialog.freshsalesConfiguration-dialog md-dialog-content{display:block;position:relative}md-dialog.freshsalesConfiguration-dialog md-toolbar .title{font-size:17px}md-dialog.freshsalesConfiguration-dialog md-input-container textarea{min-height:150px}md-dialog.freshsalesConfiguration-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.freshsalesConfiguration-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.freshsalesConfiguration-dialog .date-container{padding:16px 0 24px 0}md-dialog.freshsalesConfiguration-dialog .error-list{font-size:13px}md-dialog.freshsalesConfiguration-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.freshsalesConfiguration-dialog .error-list .error .message{font-weight:500}md-dialog.freshsalesConfiguration-dialog .error-list .error .md-button{margin:0}md-dialog.freshsalesConfiguration-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.freshsalesConfiguration-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.freshsalesAccount-item-dialog{max-width:720px;width:720px}md-dialog.freshsalesAccount-item-dialog md-dialog-content{display:block;position:relative}md-dialog.freshsalesAccount-item-dialog md-toolbar .title{font-size:17px}md-dialog.freshsalesAccount-item-dialog md-input-container textarea{min-height:150px}md-dialog.freshsalesAccount-item-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.freshsalesAccount-item-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.freshsalesAccount-item-dialog .date-container{padding:16px 0 24px 0}md-dialog.freshsalesAccount-item-dialog .error-list{font-size:13px}md-dialog.freshsalesAccount-item-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.freshsalesAccount-item-dialog .error-list .error .message{font-weight:500}md-dialog.freshsalesAccount-item-dialog .error-list .error .md-button{margin:0}md-dialog.freshsalesAccount-item-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.freshsalesAccount-item-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}#integrations-freshsalesAccount .header{height:76px;min-height:76px;max-height:76px}#integrations-freshsalesAccount .header .goto-freshsalesAccounts-button{margin-right:16px}#integrations-freshsalesAccount .header .freshsalesAccount-image{overflow:hidden;width:56px;height:56px;margin-right:16px;border:3px solid rgba(0,0,0,.12)}#integrations-freshsalesAccount .header .freshsalesAccount-image img{height:100%;width:auto;max-width:none}#integrations-freshsalesAccount .header .subtitle{margin:6px 0 0 0}#integrations-freshsalesAccount .freshsalesAccount-detail-form-container{padding:24px;margin-bottom:24px}#integrations-freshsalesAccount .freshsalesAccount-detail-form-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}#integrations-freshsalesAccount .freshsalesAccount-detail-form-container .handle{cursor:move}#integrations-freshsalesAccount .freshsalesAccount-detail-form-container md-input-container md-switch{margin:0!important}#integrations-freshsalesAccount .freshsalesAccount-detail-form-container #freshsalesAccount-image-uploader{position:relative}#integrations-freshsalesAccount .freshsalesAccount-detail-form-container #freshsalesAccount-image-uploader.dropping .drop-text{display:flex}#integrations-freshsalesAccount .freshsalesAccount-detail-form-container #freshsalesAccount-image-uploader .drop-text{display:none;position:absolute;top:0;right:0;bottom:0;left:0;padding:16px;text-align:center;border:2px dashed rgba(0,0,0,.12);background:#fff;font-size:20px;z-index:100}#integrations-freshsalesAccount .freshsalesAccount-detail-form-container #freshsalesAccount-image-uploader .upload-button{margin-bottom:16px}#integrations-freshsalesAccount .freshsalesAccount-detail-form-container #freshsalesAccount-image-uploader .freshsalesAccount-image{position:relative;width:200px;height:200px;border:1px solid rgba(0,0,0,.12);margin:8px}#integrations-freshsalesAccount .freshsalesAccount-detail-form-container #freshsalesAccount-image-uploader .freshsalesAccount-image.uploading .overlay{position:absolute;top:0;right:0;bottom:0;left:0;background:rgba(0,0,0,.87)}#integrations-freshsalesAccount .freshsalesAccount-detail-form-container #freshsalesAccount-image-uploader .freshsalesAccount-image .media{max-height:100%}#integrations-freshsalesAccount md-table-container thead tr th:not(:first-child):not(.no-padding){padding:0 20px 0 0!important}#integrations-freshsalesAccount md-table-container thead th.md-checkbox-column:not(.no-padding){padding:0 24px!important}#integrations-freshsalesAccount md-table-container tbody tr td:not(:first-child):not(.no-padding):not(.actions-padding){padding:0 20px 0 0!important}#integrations-freshsalesAccount md-table-container.font-size-12 td.md-cell{font-size:12px!important}#freshsalesAccounts{position:relative}#freshsalesAccounts>.header{height:76px;min-height:76px;max-height:76px}#freshsalesAccounts>.header .logo .logo-icon{margin:0 16px 0 0}#freshsalesAccounts>.header .logo .logo-text{font-size:24px}#freshsalesAccounts>.header md-icon{color:#fff}#freshsalesAccounts>.header .search-input-wrapper{position:relative}#freshsalesAccounts>.header .search-input-wrapper label{padding-right:4px;cursor:pointer}#freshsalesAccounts>.header .search-input-wrapper label md-icon{color:rgba(255,255,255,.8)}#freshsalesAccounts>.header .search-input-wrapper md-input-container .md-errors-spacer{display:none}#freshsalesAccounts>.header .search-input-wrapper md-input-container input{border-bottom:1px solid rgba(255,255,255,.8);color:rgba(255,255,255,.8);width:240px}#freshsalesAccounts>.header .search-input-wrapper md-input-container input::placeholder{color:rgba(255,255,255,.8)}#freshsalesAccounts>.header .search-input-wrapper md-input-container input:focus{border-bottom:1px solid #fff;color:#fff}#freshsalesAccounts>.header.selected-bar{position:absolute;top:0;left:0;right:0;z-index:999;background-image:none;opacity:1!important}#freshsalesAccounts>.header.selected-bar .close-button-wrapper{width:244px}#freshsalesAccounts>.content{position:absolute;top:76px;bottom:0;right:0;left:0}#freshsalesAccounts>.content .main{padding:16px 90px 0 4px;position:absolute;top:0;left:24px;right:0;bottom:0}#freshsalesAccounts>.content .main .no-results{box-shadow:0 1px 1px 0 rgba(0,0,0,.14)}#freshsalesAccounts #add-freshsalesAccount-button{position:fixed;bottom:8px;right:8px;padding:0}#freshsalesAccounts #upload-freshsalesAccount-button{position:fixed;bottom:8px;right:8px;padding:0}md-dialog.salesforceAccount-dialog{max-width:720px;width:720px}md-dialog.salesforceAccount-dialog md-dialog-content{display:block;position:relative}md-dialog.salesforceAccount-dialog md-toolbar .title{font-size:17px}md-dialog.salesforceAccount-dialog md-input-container textarea{min-height:150px}md-dialog.salesforceAccount-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.salesforceAccount-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.salesforceAccount-dialog .date-container{padding:16px 0 24px 0}md-dialog.salesforceAccount-dialog .error-list{font-size:13px}md-dialog.salesforceAccount-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.salesforceAccount-dialog .error-list .error .message{font-weight:500}md-dialog.salesforceAccount-dialog .error-list .error .md-button{margin:0}md-dialog.salesforceAccount-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.salesforceAccount-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.salesforceConfiguration-dialog{max-width:720px;width:720px}md-dialog.salesforceConfiguration-dialog md-dialog-content{display:block;position:relative}md-dialog.salesforceConfiguration-dialog md-toolbar .title{font-size:17px}md-dialog.salesforceConfiguration-dialog md-input-container textarea{min-height:150px}md-dialog.salesforceConfiguration-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.salesforceConfiguration-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.salesforceConfiguration-dialog .date-container{padding:16px 0 24px 0}md-dialog.salesforceConfiguration-dialog .error-list{font-size:13px}md-dialog.salesforceConfiguration-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.salesforceConfiguration-dialog .error-list .error .message{font-weight:500}md-dialog.salesforceConfiguration-dialog .error-list .error .md-button{margin:0}md-dialog.salesforceConfiguration-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.salesforceConfiguration-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.salesforceAccount-item-dialog{max-width:720px;width:720px}md-dialog.salesforceAccount-item-dialog md-dialog-content{display:block;position:relative}md-dialog.salesforceAccount-item-dialog md-toolbar .title{font-size:17px}md-dialog.salesforceAccount-item-dialog md-input-container textarea{min-height:150px}md-dialog.salesforceAccount-item-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.salesforceAccount-item-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.salesforceAccount-item-dialog .date-container{padding:16px 0 24px 0}md-dialog.salesforceAccount-item-dialog .error-list{font-size:13px}md-dialog.salesforceAccount-item-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.salesforceAccount-item-dialog .error-list .error .message{font-weight:500}md-dialog.salesforceAccount-item-dialog .error-list .error .md-button{margin:0}md-dialog.salesforceAccount-item-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.salesforceAccount-item-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}#integrations-salesforceAccount .header{height:76px;min-height:76px;max-height:76px}#integrations-salesforceAccount .header .goto-salesforceAccounts-button{margin-right:16px}#integrations-salesforceAccount .header .salesforceAccount-image{overflow:hidden;width:56px;height:56px;margin-right:16px;border:3px solid rgba(0,0,0,.12)}#integrations-salesforceAccount .header .salesforceAccount-image img{height:100%;width:auto;max-width:none}#integrations-salesforceAccount .header .subtitle{margin:6px 0 0 0}#integrations-salesforceAccount .salesforceAccount-detail-form-container{padding:24px;margin-bottom:24px}#integrations-salesforceAccount .salesforceAccount-detail-form-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}#integrations-salesforceAccount .salesforceAccount-detail-form-container .handle{cursor:move}#integrations-salesforceAccount .salesforceAccount-detail-form-container md-input-container md-switch{margin:0!important}#integrations-salesforceAccount .salesforceAccount-detail-form-container #salesforceAccount-image-uploader{position:relative}#integrations-salesforceAccount .salesforceAccount-detail-form-container #salesforceAccount-image-uploader.dropping .drop-text{display:flex}#integrations-salesforceAccount .salesforceAccount-detail-form-container #salesforceAccount-image-uploader .drop-text{display:none;position:absolute;top:0;right:0;bottom:0;left:0;padding:16px;text-align:center;border:2px dashed rgba(0,0,0,.12);background:#fff;font-size:20px;z-index:100}#integrations-salesforceAccount .salesforceAccount-detail-form-container #salesforceAccount-image-uploader .upload-button{margin-bottom:16px}#integrations-salesforceAccount .salesforceAccount-detail-form-container #salesforceAccount-image-uploader .salesforceAccount-image{position:relative;width:200px;height:200px;border:1px solid rgba(0,0,0,.12);margin:8px}#integrations-salesforceAccount .salesforceAccount-detail-form-container #salesforceAccount-image-uploader .salesforceAccount-image.uploading .overlay{position:absolute;top:0;right:0;bottom:0;left:0;background:rgba(0,0,0,.87)}#integrations-salesforceAccount .salesforceAccount-detail-form-container #salesforceAccount-image-uploader .salesforceAccount-image .media{max-height:100%}#integrations-salesforceAccount md-table-container thead tr th:not(:first-child):not(.no-padding){padding:0 20px 0 0!important}#integrations-salesforceAccount md-table-container thead th.md-checkbox-column:not(.no-padding){padding:0 24px!important}#integrations-salesforceAccount md-table-container tbody tr td:not(:first-child):not(.no-padding):not(.actions-padding){padding:0 20px 0 0!important}#integrations-salesforceAccount md-table-container.font-size-12 td.md-cell{font-size:12px!important}#salesforceAccounts{position:relative}#salesforceAccounts>.header{height:76px;min-height:76px;max-height:76px}#salesforceAccounts>.header .logo .logo-icon{margin:0 16px 0 0}#salesforceAccounts>.header .logo .logo-text{font-size:24px}#salesforceAccounts>.header md-icon{color:#fff}#salesforceAccounts>.header .search-input-wrapper{position:relative}#salesforceAccounts>.header .search-input-wrapper label{padding-right:4px;cursor:pointer}#salesforceAccounts>.header .search-input-wrapper label md-icon{color:rgba(255,255,255,.8)}#salesforceAccounts>.header .search-input-wrapper md-input-container .md-errors-spacer{display:none}#salesforceAccounts>.header .search-input-wrapper md-input-container input{border-bottom:1px solid rgba(255,255,255,.8);color:rgba(255,255,255,.8);width:240px}#salesforceAccounts>.header .search-input-wrapper md-input-container input::placeholder{color:rgba(255,255,255,.8)}#salesforceAccounts>.header .search-input-wrapper md-input-container input:focus{border-bottom:1px solid #fff;color:#fff}#salesforceAccounts>.header.selected-bar{position:absolute;top:0;left:0;right:0;z-index:999;background-image:none;opacity:1!important}#salesforceAccounts>.header.selected-bar .close-button-wrapper{width:244px}#salesforceAccounts>.content{position:absolute;top:76px;bottom:0;right:0;left:0}#salesforceAccounts>.content .main{padding:16px 90px 0 4px;position:absolute;top:0;left:24px;right:0;bottom:0}#salesforceAccounts>.content .main .no-results{box-shadow:0 1px 1px 0 rgba(0,0,0,.14)}#salesforceAccounts #add-salesforceAccount-button{position:fixed;bottom:8px;right:8px;padding:0}#salesforceAccounts #upload-salesforceAccount-button{position:fixed;bottom:8px;right:8px;padding:0}md-dialog.servicenowAccount-dialog{max-width:720px;width:720px}md-dialog.servicenowAccount-dialog md-dialog-content{display:block;position:relative}md-dialog.servicenowAccount-dialog md-toolbar .title{font-size:17px}md-dialog.servicenowAccount-dialog md-input-container textarea{min-height:150px}md-dialog.servicenowAccount-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.servicenowAccount-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.servicenowAccount-dialog .date-container{padding:16px 0 24px 0}md-dialog.servicenowAccount-dialog .error-list{font-size:13px}md-dialog.servicenowAccount-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.servicenowAccount-dialog .error-list .error .message{font-weight:500}md-dialog.servicenowAccount-dialog .error-list .error .md-button{margin:0}md-dialog.servicenowAccount-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.servicenowAccount-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.servicenowConfiguration-dialog{max-width:720px;width:720px}md-dialog.servicenowConfiguration-dialog md-dialog-content{display:block;position:relative}md-dialog.servicenowConfiguration-dialog md-toolbar .title{font-size:17px}md-dialog.servicenowConfiguration-dialog md-input-container textarea{min-height:150px}md-dialog.servicenowConfiguration-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.servicenowConfiguration-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.servicenowConfiguration-dialog .date-container{padding:16px 0 24px 0}md-dialog.servicenowConfiguration-dialog .error-list{font-size:13px}md-dialog.servicenowConfiguration-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.servicenowConfiguration-dialog .error-list .error .message{font-weight:500}md-dialog.servicenowConfiguration-dialog .error-list .error .md-button{margin:0}md-dialog.servicenowConfiguration-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.servicenowConfiguration-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.servicenowAccount-item-dialog{max-width:720px;width:720px}md-dialog.servicenowAccount-item-dialog md-dialog-content{display:block;position:relative}md-dialog.servicenowAccount-item-dialog md-toolbar .title{font-size:17px}md-dialog.servicenowAccount-item-dialog md-input-container textarea{min-height:150px}md-dialog.servicenowAccount-item-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.servicenowAccount-item-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.servicenowAccount-item-dialog .date-container{padding:16px 0 24px 0}md-dialog.servicenowAccount-item-dialog .error-list{font-size:13px}md-dialog.servicenowAccount-item-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.servicenowAccount-item-dialog .error-list .error .message{font-weight:500}md-dialog.servicenowAccount-item-dialog .error-list .error .md-button{margin:0}md-dialog.servicenowAccount-item-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.servicenowAccount-item-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}#integrations-servicenowAccount .header{height:76px;min-height:76px;max-height:76px}#integrations-servicenowAccount .header .goto-servicenowAccounts-button{margin-right:16px}#integrations-servicenowAccount .header .servicenowAccount-image{overflow:hidden;width:56px;height:56px;margin-right:16px;border:3px solid rgba(0,0,0,.12)}#integrations-servicenowAccount .header .servicenowAccount-image img{height:100%;width:auto;max-width:none}#integrations-servicenowAccount .header .subtitle{margin:6px 0 0 0}#integrations-servicenowAccount .servicenowAccount-detail-form-container{padding:24px;margin-bottom:24px}#integrations-servicenowAccount .servicenowAccount-detail-form-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}#integrations-servicenowAccount .servicenowAccount-detail-form-container .handle{cursor:move}#integrations-servicenowAccount .servicenowAccount-detail-form-container md-input-container md-switch{margin:0!important}#integrations-servicenowAccount .servicenowAccount-detail-form-container #servicenowAccount-image-uploader{position:relative}#integrations-servicenowAccount .servicenowAccount-detail-form-container #servicenowAccount-image-uploader.dropping .drop-text{display:flex}#integrations-servicenowAccount .servicenowAccount-detail-form-container #servicenowAccount-image-uploader .drop-text{display:none;position:absolute;top:0;right:0;bottom:0;left:0;padding:16px;text-align:center;border:2px dashed rgba(0,0,0,.12);background:#fff;font-size:20px;z-index:100}#integrations-servicenowAccount .servicenowAccount-detail-form-container #servicenowAccount-image-uploader .upload-button{margin-bottom:16px}#integrations-servicenowAccount .servicenowAccount-detail-form-container #servicenowAccount-image-uploader .servicenowAccount-image{position:relative;width:200px;height:200px;border:1px solid rgba(0,0,0,.12);margin:8px}#integrations-servicenowAccount .servicenowAccount-detail-form-container #servicenowAccount-image-uploader .servicenowAccount-image.uploading .overlay{position:absolute;top:0;right:0;bottom:0;left:0;background:rgba(0,0,0,.87)}#integrations-servicenowAccount .servicenowAccount-detail-form-container #servicenowAccount-image-uploader .servicenowAccount-image .media{max-height:100%}#integrations-servicenowAccount md-table-container thead tr th:not(:first-child):not(.no-padding){padding:0 20px 0 0!important}#integrations-servicenowAccount md-table-container thead th.md-checkbox-column:not(.no-padding){padding:0 24px!important}#integrations-servicenowAccount md-table-container tbody tr td:not(:first-child):not(.no-padding):not(.actions-padding){padding:0 20px 0 0!important}#integrations-servicenowAccount md-table-container.font-size-12 td.md-cell{font-size:12px!important}#servicenowAccounts{position:relative}#servicenowAccounts>.header{height:76px;min-height:76px;max-height:76px}#servicenowAccounts>.header .logo .logo-icon{margin:0 16px 0 0}#servicenowAccounts>.header .logo .logo-text{font-size:24px}#servicenowAccounts>.header md-icon{color:#fff}#servicenowAccounts>.header .search-input-wrapper{position:relative}#servicenowAccounts>.header .search-input-wrapper label{padding-right:4px;cursor:pointer}#servicenowAccounts>.header .search-input-wrapper label md-icon{color:rgba(255,255,255,.8)}#servicenowAccounts>.header .search-input-wrapper md-input-container .md-errors-spacer{display:none}#servicenowAccounts>.header .search-input-wrapper md-input-container input{border-bottom:1px solid rgba(255,255,255,.8);color:rgba(255,255,255,.8);width:240px}#servicenowAccounts>.header .search-input-wrapper md-input-container input::placeholder{color:rgba(255,255,255,.8)}#servicenowAccounts>.header .search-input-wrapper md-input-container input:focus{border-bottom:1px solid #fff;color:#fff}#servicenowAccounts>.header.selected-bar{position:absolute;top:0;left:0;right:0;z-index:999;background-image:none;opacity:1!important}#servicenowAccounts>.header.selected-bar .close-button-wrapper{width:244px}#servicenowAccounts>.content{position:absolute;top:76px;bottom:0;right:0;left:0}#servicenowAccounts>.content .main{padding:16px 90px 0 4px;position:absolute;top:0;left:24px;right:0;bottom:0}#servicenowAccounts>.content .main .no-results{box-shadow:0 1px 1px 0 rgba(0,0,0,.14)}#servicenowAccounts #add-servicenowAccount-button{position:fixed;bottom:8px;right:8px;padding:0}#servicenowAccounts #upload-servicenowAccount-button{position:fixed;bottom:8px;right:8px;padding:0}md-dialog.sugarcrmAccount-dialog{max-width:720px;width:720px}md-dialog.sugarcrmAccount-dialog md-dialog-content{display:block;position:relative}md-dialog.sugarcrmAccount-dialog md-toolbar .title{font-size:17px}md-dialog.sugarcrmAccount-dialog md-input-container textarea{min-height:150px}md-dialog.sugarcrmAccount-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.sugarcrmAccount-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.sugarcrmAccount-dialog .date-container{padding:16px 0 24px 0}md-dialog.sugarcrmAccount-dialog .error-list{font-size:13px}md-dialog.sugarcrmAccount-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.sugarcrmAccount-dialog .error-list .error .message{font-weight:500}md-dialog.sugarcrmAccount-dialog .error-list .error .md-button{margin:0}md-dialog.sugarcrmAccount-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.sugarcrmAccount-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.sugarcrmConfiguration-dialog{max-width:720px;width:720px}md-dialog.sugarcrmConfiguration-dialog md-dialog-content{display:block;position:relative}md-dialog.sugarcrmConfiguration-dialog md-toolbar .title{font-size:17px}md-dialog.sugarcrmConfiguration-dialog md-input-container textarea{min-height:150px}md-dialog.sugarcrmConfiguration-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.sugarcrmConfiguration-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.sugarcrmConfiguration-dialog .date-container{padding:16px 0 24px 0}md-dialog.sugarcrmConfiguration-dialog .error-list{font-size:13px}md-dialog.sugarcrmConfiguration-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.sugarcrmConfiguration-dialog .error-list .error .message{font-weight:500}md-dialog.sugarcrmConfiguration-dialog .error-list .error .md-button{margin:0}md-dialog.sugarcrmConfiguration-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.sugarcrmConfiguration-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.sugarcrmAccount-item-dialog{max-width:720px;width:720px}md-dialog.sugarcrmAccount-item-dialog md-dialog-content{display:block;position:relative}md-dialog.sugarcrmAccount-item-dialog md-toolbar .title{font-size:17px}md-dialog.sugarcrmAccount-item-dialog md-input-container textarea{min-height:150px}md-dialog.sugarcrmAccount-item-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.sugarcrmAccount-item-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.sugarcrmAccount-item-dialog .date-container{padding:16px 0 24px 0}md-dialog.sugarcrmAccount-item-dialog .error-list{font-size:13px}md-dialog.sugarcrmAccount-item-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.sugarcrmAccount-item-dialog .error-list .error .message{font-weight:500}md-dialog.sugarcrmAccount-item-dialog .error-list .error .md-button{margin:0}md-dialog.sugarcrmAccount-item-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.sugarcrmAccount-item-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}#integrations-sugarcrmAccount .header{height:76px;min-height:76px;max-height:76px}#integrations-sugarcrmAccount .header .goto-sugarcrmAccounts-button{margin-right:16px}#integrations-sugarcrmAccount .header .sugarcrmAccount-image{overflow:hidden;width:56px;height:56px;margin-right:16px;border:3px solid rgba(0,0,0,.12)}#integrations-sugarcrmAccount .header .sugarcrmAccount-image img{height:100%;width:auto;max-width:none}#integrations-sugarcrmAccount .header .subtitle{margin:6px 0 0 0}#integrations-sugarcrmAccount .sugarcrmAccount-detail-form-container{padding:24px;margin-bottom:24px}#integrations-sugarcrmAccount .sugarcrmAccount-detail-form-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}#integrations-sugarcrmAccount .sugarcrmAccount-detail-form-container .handle{cursor:move}#integrations-sugarcrmAccount .sugarcrmAccount-detail-form-container md-input-container md-switch{margin:0!important}#integrations-sugarcrmAccount .sugarcrmAccount-detail-form-container #sugarcrmAccount-image-uploader{position:relative}#integrations-sugarcrmAccount .sugarcrmAccount-detail-form-container #sugarcrmAccount-image-uploader.dropping .drop-text{display:flex}#integrations-sugarcrmAccount .sugarcrmAccount-detail-form-container #sugarcrmAccount-image-uploader .drop-text{display:none;position:absolute;top:0;right:0;bottom:0;left:0;padding:16px;text-align:center;border:2px dashed rgba(0,0,0,.12);background:#fff;font-size:20px;z-index:100}#integrations-sugarcrmAccount .sugarcrmAccount-detail-form-container #sugarcrmAccount-image-uploader .upload-button{margin-bottom:16px}#integrations-sugarcrmAccount .sugarcrmAccount-detail-form-container #sugarcrmAccount-image-uploader .sugarcrmAccount-image{position:relative;width:200px;height:200px;border:1px solid rgba(0,0,0,.12);margin:8px}#integrations-sugarcrmAccount .sugarcrmAccount-detail-form-container #sugarcrmAccount-image-uploader .sugarcrmAccount-image.uploading .overlay{position:absolute;top:0;right:0;bottom:0;left:0;background:rgba(0,0,0,.87)}#integrations-sugarcrmAccount .sugarcrmAccount-detail-form-container #sugarcrmAccount-image-uploader .sugarcrmAccount-image .media{max-height:100%}#integrations-sugarcrmAccount md-table-container thead tr th:not(:first-child):not(.no-padding){padding:0 20px 0 0!important}#integrations-sugarcrmAccount md-table-container thead th.md-checkbox-column:not(.no-padding){padding:0 24px!important}#integrations-sugarcrmAccount md-table-container tbody tr td:not(:first-child):not(.no-padding):not(.actions-padding){padding:0 20px 0 0!important}#integrations-sugarcrmAccount md-table-container.font-size-12 td.md-cell{font-size:12px!important}#sugarcrmAccounts{position:relative}#sugarcrmAccounts>.header{height:76px;min-height:76px;max-height:76px}#sugarcrmAccounts>.header .logo .logo-icon{margin:0 16px 0 0}#sugarcrmAccounts>.header .logo .logo-text{font-size:24px}#sugarcrmAccounts>.header md-icon{color:#fff}#sugarcrmAccounts>.header .search-input-wrapper{position:relative}#sugarcrmAccounts>.header .search-input-wrapper label{padding-right:4px;cursor:pointer}#sugarcrmAccounts>.header .search-input-wrapper label md-icon{color:rgba(255,255,255,.8)}#sugarcrmAccounts>.header .search-input-wrapper md-input-container .md-errors-spacer{display:none}#sugarcrmAccounts>.header .search-input-wrapper md-input-container input{border-bottom:1px solid rgba(255,255,255,.8);color:rgba(255,255,255,.8);width:240px}#sugarcrmAccounts>.header .search-input-wrapper md-input-container input::placeholder{color:rgba(255,255,255,.8)}#sugarcrmAccounts>.header .search-input-wrapper md-input-container input:focus{border-bottom:1px solid #fff;color:#fff}#sugarcrmAccounts>.header.selected-bar{position:absolute;top:0;left:0;right:0;z-index:999;background-image:none;opacity:1!important}#sugarcrmAccounts>.header.selected-bar .close-button-wrapper{width:244px}#sugarcrmAccounts>.content{position:absolute;top:76px;bottom:0;right:0;left:0}#sugarcrmAccounts>.content .main{padding:16px 90px 0 4px;position:absolute;top:0;left:24px;right:0;bottom:0}#sugarcrmAccounts>.content .main .no-results{box-shadow:0 1px 1px 0 rgba(0,0,0,.14)}#sugarcrmAccounts #add-sugarcrmAccount-button{position:fixed;bottom:8px;right:8px;padding:0}#sugarcrmAccounts #upload-sugarcrmAccount-button{position:fixed;bottom:8px;right:8px;padding:0}md-dialog.vtigerAccount-dialog{max-width:720px;width:720px}md-dialog.vtigerAccount-dialog md-dialog-content{display:block;position:relative}md-dialog.vtigerAccount-dialog md-toolbar .title{font-size:17px}md-dialog.vtigerAccount-dialog md-input-container textarea{min-height:150px}md-dialog.vtigerAccount-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.vtigerAccount-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.vtigerAccount-dialog .date-container{padding:16px 0 24px 0}md-dialog.vtigerAccount-dialog .error-list{font-size:13px}md-dialog.vtigerAccount-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.vtigerAccount-dialog .error-list .error .message{font-weight:500}md-dialog.vtigerAccount-dialog .error-list .error .md-button{margin:0}md-dialog.vtigerAccount-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.vtigerAccount-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.vtigerConfiguration-dialog{max-width:720px;width:720px}md-dialog.vtigerConfiguration-dialog md-dialog-content{display:block;position:relative}md-dialog.vtigerConfiguration-dialog md-toolbar .title{font-size:17px}md-dialog.vtigerConfiguration-dialog md-input-container textarea{min-height:150px}md-dialog.vtigerConfiguration-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.vtigerConfiguration-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.vtigerConfiguration-dialog .date-container{padding:16px 0 24px 0}md-dialog.vtigerConfiguration-dialog .error-list{font-size:13px}md-dialog.vtigerConfiguration-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.vtigerConfiguration-dialog .error-list .error .message{font-weight:500}md-dialog.vtigerConfiguration-dialog .error-list .error .md-button{margin:0}md-dialog.vtigerConfiguration-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.vtigerConfiguration-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.vtigerAccount-item-dialog{max-width:720px;width:720px}md-dialog.vtigerAccount-item-dialog md-dialog-content{display:block;position:relative}md-dialog.vtigerAccount-item-dialog md-toolbar .title{font-size:17px}md-dialog.vtigerAccount-item-dialog md-input-container textarea{min-height:150px}md-dialog.vtigerAccount-item-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.vtigerAccount-item-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.vtigerAccount-item-dialog .date-container{padding:16px 0 24px 0}md-dialog.vtigerAccount-item-dialog .error-list{font-size:13px}md-dialog.vtigerAccount-item-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.vtigerAccount-item-dialog .error-list .error .message{font-weight:500}md-dialog.vtigerAccount-item-dialog .error-list .error .md-button{margin:0}md-dialog.vtigerAccount-item-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.vtigerAccount-item-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}#integrations-vtigerAccount .header{height:76px;min-height:76px;max-height:76px}#integrations-vtigerAccount .header .goto-vtigerAccounts-button{margin-right:16px}#integrations-vtigerAccount .header .vtigerAccount-image{overflow:hidden;width:56px;height:56px;margin-right:16px;border:3px solid rgba(0,0,0,.12)}#integrations-vtigerAccount .header .vtigerAccount-image img{height:100%;width:auto;max-width:none}#integrations-vtigerAccount .header .subtitle{margin:6px 0 0 0}#integrations-vtigerAccount .vtigerAccount-detail-form-container{padding:24px;margin-bottom:24px}#integrations-vtigerAccount .vtigerAccount-detail-form-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}#integrations-vtigerAccount .vtigerAccount-detail-form-container .handle{cursor:move}#integrations-vtigerAccount .vtigerAccount-detail-form-container md-input-container md-switch{margin:0!important}#integrations-vtigerAccount .vtigerAccount-detail-form-container #vtigerAccount-image-uploader{position:relative}#integrations-vtigerAccount .vtigerAccount-detail-form-container #vtigerAccount-image-uploader.dropping .drop-text{display:flex}#integrations-vtigerAccount .vtigerAccount-detail-form-container #vtigerAccount-image-uploader .drop-text{display:none;position:absolute;top:0;right:0;bottom:0;left:0;padding:16px;text-align:center;border:2px dashed rgba(0,0,0,.12);background:#fff;font-size:20px;z-index:100}#integrations-vtigerAccount .vtigerAccount-detail-form-container #vtigerAccount-image-uploader .upload-button{margin-bottom:16px}#integrations-vtigerAccount .vtigerAccount-detail-form-container #vtigerAccount-image-uploader .vtigerAccount-image{position:relative;width:200px;height:200px;border:1px solid rgba(0,0,0,.12);margin:8px}#integrations-vtigerAccount .vtigerAccount-detail-form-container #vtigerAccount-image-uploader .vtigerAccount-image.uploading .overlay{position:absolute;top:0;right:0;bottom:0;left:0;background:rgba(0,0,0,.87)}#integrations-vtigerAccount .vtigerAccount-detail-form-container #vtigerAccount-image-uploader .vtigerAccount-image .media{max-height:100%}#integrations-vtigerAccount md-table-container thead tr th:not(:first-child):not(.no-padding){padding:0 20px 0 0!important}#integrations-vtigerAccount md-table-container thead th.md-checkbox-column:not(.no-padding){padding:0 24px!important}#integrations-vtigerAccount md-table-container tbody tr td:not(:first-child):not(.no-padding):not(.actions-padding){padding:0 20px 0 0!important}#integrations-vtigerAccount md-table-container.font-size-12 td.md-cell{font-size:12px!important}#vtigerAccounts{position:relative}#vtigerAccounts>.header{height:76px;min-height:76px;max-height:76px}#vtigerAccounts>.header .logo .logo-icon{margin:0 16px 0 0}#vtigerAccounts>.header .logo .logo-text{font-size:24px}#vtigerAccounts>.header md-icon{color:#fff}#vtigerAccounts>.header .search-input-wrapper{position:relative}#vtigerAccounts>.header .search-input-wrapper label{padding-right:4px;cursor:pointer}#vtigerAccounts>.header .search-input-wrapper label md-icon{color:rgba(255,255,255,.8)}#vtigerAccounts>.header .search-input-wrapper md-input-container .md-errors-spacer{display:none}#vtigerAccounts>.header .search-input-wrapper md-input-container input{border-bottom:1px solid rgba(255,255,255,.8);color:rgba(255,255,255,.8);width:240px}#vtigerAccounts>.header .search-input-wrapper md-input-container input::placeholder{color:rgba(255,255,255,.8)}#vtigerAccounts>.header .search-input-wrapper md-input-container input:focus{border-bottom:1px solid #fff;color:#fff}#vtigerAccounts>.header.selected-bar{position:absolute;top:0;left:0;right:0;z-index:999;background-image:none;opacity:1!important}#vtigerAccounts>.header.selected-bar .close-button-wrapper{width:244px}#vtigerAccounts>.content{position:absolute;top:76px;bottom:0;right:0;left:0}#vtigerAccounts>.content .main{padding:16px 90px 0 4px;position:absolute;top:0;left:24px;right:0;bottom:0}#vtigerAccounts>.content .main .no-results{box-shadow:0 1px 1px 0 rgba(0,0,0,.14)}#vtigerAccounts #add-vtigerAccount-button{position:fixed;bottom:8px;right:8px;padding:0}#vtigerAccounts #upload-vtigerAccount-button{position:fixed;bottom:8px;right:8px;padding:0}md-dialog.zendeskAccount-dialog{max-width:720px;width:720px}md-dialog.zendeskAccount-dialog md-dialog-content{display:block;position:relative}md-dialog.zendeskAccount-dialog md-toolbar .title{font-size:17px}md-dialog.zendeskAccount-dialog md-input-container textarea{min-height:150px}md-dialog.zendeskAccount-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.zendeskAccount-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.zendeskAccount-dialog .date-container{padding:16px 0 24px 0}md-dialog.zendeskAccount-dialog .error-list{font-size:13px}md-dialog.zendeskAccount-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.zendeskAccount-dialog .error-list .error .message{font-weight:500}md-dialog.zendeskAccount-dialog .error-list .error .md-button{margin:0}md-dialog.zendeskAccount-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.zendeskAccount-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.zendeskAccount-item-dialog{max-width:720px;width:720px}md-dialog.zendeskAccount-item-dialog md-dialog-content{display:block;position:relative}md-dialog.zendeskAccount-item-dialog md-toolbar .title{font-size:17px}md-dialog.zendeskAccount-item-dialog md-input-container textarea{min-height:150px}md-dialog.zendeskAccount-item-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.zendeskAccount-item-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.zendeskAccount-item-dialog .date-container{padding:16px 0 24px 0}md-dialog.zendeskAccount-item-dialog .error-list{font-size:13px}md-dialog.zendeskAccount-item-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.zendeskAccount-item-dialog .error-list .error .message{font-weight:500}md-dialog.zendeskAccount-item-dialog .error-list .error .md-button{margin:0}md-dialog.zendeskAccount-item-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.zendeskAccount-item-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}#integrations-zendeskAccount .header{height:76px;min-height:76px;max-height:76px}#integrations-zendeskAccount .header .goto-zendeskAccounts-button{margin-right:16px}#integrations-zendeskAccount .header .zendeskAccount-image{overflow:hidden;width:56px;height:56px;margin-right:16px;border:3px solid rgba(0,0,0,.12)}#integrations-zendeskAccount .header .zendeskAccount-image img{height:100%;width:auto;max-width:none}#integrations-zendeskAccount .header .subtitle{margin:6px 0 0 0}#integrations-zendeskAccount .zendeskAccount-detail-form-container{padding:24px;margin-bottom:24px}#integrations-zendeskAccount .zendeskAccount-detail-form-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}#integrations-zendeskAccount .zendeskAccount-detail-form-container .handle{cursor:move}#integrations-zendeskAccount .zendeskAccount-detail-form-container md-input-container md-switch{margin:0!important}#integrations-zendeskAccount .zendeskAccount-detail-form-container #zendeskAccount-image-uploader{position:relative}#integrations-zendeskAccount .zendeskAccount-detail-form-container #zendeskAccount-image-uploader.dropping .drop-text{display:flex}#integrations-zendeskAccount .zendeskAccount-detail-form-container #zendeskAccount-image-uploader .drop-text{display:none;position:absolute;top:0;right:0;bottom:0;left:0;padding:16px;text-align:center;border:2px dashed rgba(0,0,0,.12);background:#fff;font-size:20px;z-index:100}#integrations-zendeskAccount .zendeskAccount-detail-form-container #zendeskAccount-image-uploader .upload-button{margin-bottom:16px}#integrations-zendeskAccount .zendeskAccount-detail-form-container #zendeskAccount-image-uploader .zendeskAccount-image{position:relative;width:200px;height:200px;border:1px solid rgba(0,0,0,.12);margin:8px}#integrations-zendeskAccount .zendeskAccount-detail-form-container #zendeskAccount-image-uploader .zendeskAccount-image.uploading .overlay{position:absolute;top:0;right:0;bottom:0;left:0;background:rgba(0,0,0,.87)}#integrations-zendeskAccount .zendeskAccount-detail-form-container #zendeskAccount-image-uploader .zendeskAccount-image .media{max-height:100%}#integrations-zendeskAccount md-table-container thead tr th:not(:first-child):not(.no-padding){padding:0 20px 0 0!important}#integrations-zendeskAccount md-table-container thead th.md-checkbox-column:not(.no-padding){padding:0 24px!important}#integrations-zendeskAccount md-table-container tbody tr td:not(:first-child):not(.no-padding):not(.actions-padding){padding:0 20px 0 0!important}#integrations-zendeskAccount md-table-container.font-size-12 td.md-cell{font-size:12px!important}md-dialog.zendeskConfiguration-dialog{max-width:720px;width:720px}md-dialog.zendeskConfiguration-dialog md-dialog-content{display:block;position:relative}md-dialog.zendeskConfiguration-dialog md-toolbar .title{font-size:17px}md-dialog.zendeskConfiguration-dialog md-input-container textarea{min-height:150px}md-dialog.zendeskConfiguration-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.zendeskConfiguration-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.zendeskConfiguration-dialog .date-container{padding:16px 0 24px 0}md-dialog.zendeskConfiguration-dialog .error-list{font-size:13px}md-dialog.zendeskConfiguration-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.zendeskConfiguration-dialog .error-list .error .message{font-weight:500}md-dialog.zendeskConfiguration-dialog .error-list .error .md-button{margin:0}md-dialog.zendeskConfiguration-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.zendeskConfiguration-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}#zendeskAccounts{position:relative}#zendeskAccounts>.header{height:76px;min-height:76px;max-height:76px}#zendeskAccounts>.header .logo .logo-icon{margin:0 16px 0 0}#zendeskAccounts>.header .logo .logo-text{font-size:24px}#zendeskAccounts>.header md-icon{color:#fff}#zendeskAccounts>.header .search-input-wrapper{position:relative}#zendeskAccounts>.header .search-input-wrapper label{padding-right:4px;cursor:pointer}#zendeskAccounts>.header .search-input-wrapper label md-icon{color:rgba(255,255,255,.8)}#zendeskAccounts>.header .search-input-wrapper md-input-container .md-errors-spacer{display:none}#zendeskAccounts>.header .search-input-wrapper md-input-container input{border-bottom:1px solid rgba(255,255,255,.8);color:rgba(255,255,255,.8);width:240px}#zendeskAccounts>.header .search-input-wrapper md-input-container input::placeholder{color:rgba(255,255,255,.8)}#zendeskAccounts>.header .search-input-wrapper md-input-container input:focus{border-bottom:1px solid #fff;color:#fff}#zendeskAccounts>.header.selected-bar{position:absolute;top:0;left:0;right:0;z-index:999;background-image:none;opacity:1!important}#zendeskAccounts>.header.selected-bar .close-button-wrapper{width:244px}#zendeskAccounts>.content{position:absolute;top:76px;bottom:0;right:0;left:0}#zendeskAccounts>.content .main{padding:16px 90px 0 4px;position:absolute;top:0;left:24px;right:0;bottom:0}#zendeskAccounts>.content .main .no-results{box-shadow:0 1px 1px 0 rgba(0,0,0,.14)}#zendeskAccounts #add-zendeskAccount-button{position:fixed;bottom:8px;right:8px;padding:0}#zendeskAccounts #upload-zendeskAccount-button{position:fixed;bottom:8px;right:8px;padding:0}md-dialog.zohoAccount-dialog{max-width:720px;width:720px}md-dialog.zohoAccount-dialog md-dialog-content{display:block;position:relative}md-dialog.zohoAccount-dialog md-toolbar .title{font-size:17px}md-dialog.zohoAccount-dialog md-input-container textarea{min-height:150px}md-dialog.zohoAccount-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.zohoAccount-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.zohoAccount-dialog .date-container{padding:16px 0 24px 0}md-dialog.zohoAccount-dialog .error-list{font-size:13px}md-dialog.zohoAccount-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.zohoAccount-dialog .error-list .error .message{font-weight:500}md-dialog.zohoAccount-dialog .error-list .error .md-button{margin:0}md-dialog.zohoAccount-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.zohoAccount-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.zohoConfiguration-dialog{max-width:720px;width:720px}md-dialog.zohoConfiguration-dialog md-dialog-content{display:block;position:relative}md-dialog.zohoConfiguration-dialog md-toolbar .title{font-size:17px}md-dialog.zohoConfiguration-dialog md-input-container textarea{min-height:150px}md-dialog.zohoConfiguration-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.zohoConfiguration-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.zohoConfiguration-dialog .date-container{padding:16px 0 24px 0}md-dialog.zohoConfiguration-dialog .error-list{font-size:13px}md-dialog.zohoConfiguration-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.zohoConfiguration-dialog .error-list .error .message{font-weight:500}md-dialog.zohoConfiguration-dialog .error-list .error .md-button{margin:0}md-dialog.zohoConfiguration-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.zohoConfiguration-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.zohoAccount-item-dialog{max-width:720px;width:720px}md-dialog.zohoAccount-item-dialog md-dialog-content{display:block;position:relative}md-dialog.zohoAccount-item-dialog md-toolbar .title{font-size:17px}md-dialog.zohoAccount-item-dialog md-input-container textarea{min-height:150px}md-dialog.zohoAccount-item-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.zohoAccount-item-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.zohoAccount-item-dialog .date-container{padding:16px 0 24px 0}md-dialog.zohoAccount-item-dialog .error-list{font-size:13px}md-dialog.zohoAccount-item-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.zohoAccount-item-dialog .error-list .error .message{font-weight:500}md-dialog.zohoAccount-item-dialog .error-list .error .md-button{margin:0}md-dialog.zohoAccount-item-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.zohoAccount-item-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}#integrations-zohoAccount .header{height:76px;min-height:76px;max-height:76px}#integrations-zohoAccount .header .goto-zohoAccounts-button{margin-right:16px}#integrations-zohoAccount .header .zohoAccount-image{overflow:hidden;width:56px;height:56px;margin-right:16px;border:3px solid rgba(0,0,0,.12)}#integrations-zohoAccount .header .zohoAccount-image img{height:100%;width:auto;max-width:none}#integrations-zohoAccount .header .subtitle{margin:6px 0 0 0}#integrations-zohoAccount .zohoAccount-detail-form-container{padding:24px;margin-bottom:24px}#integrations-zohoAccount .zohoAccount-detail-form-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}#integrations-zohoAccount .zohoAccount-detail-form-container .handle{cursor:move}#integrations-zohoAccount .zohoAccount-detail-form-container md-input-container md-switch{margin:0!important}#integrations-zohoAccount .zohoAccount-detail-form-container #zohoAccount-image-uploader{position:relative}#integrations-zohoAccount .zohoAccount-detail-form-container #zohoAccount-image-uploader.dropping .drop-text{display:flex}#integrations-zohoAccount .zohoAccount-detail-form-container #zohoAccount-image-uploader .drop-text{display:none;position:absolute;top:0;right:0;bottom:0;left:0;padding:16px;text-align:center;border:2px dashed rgba(0,0,0,.12);background:#fff;font-size:20px;z-index:100}#integrations-zohoAccount .zohoAccount-detail-form-container #zohoAccount-image-uploader .upload-button{margin-bottom:16px}#integrations-zohoAccount .zohoAccount-detail-form-container #zohoAccount-image-uploader .zohoAccount-image{position:relative;width:200px;height:200px;border:1px solid rgba(0,0,0,.12);margin:8px}#integrations-zohoAccount .zohoAccount-detail-form-container #zohoAccount-image-uploader .zohoAccount-image.uploading .overlay{position:absolute;top:0;right:0;bottom:0;left:0;background:rgba(0,0,0,.87)}#integrations-zohoAccount .zohoAccount-detail-form-container #zohoAccount-image-uploader .zohoAccount-image .media{max-height:100%}#integrations-zohoAccount md-table-container thead tr th:not(:first-child):not(.no-padding){padding:0 20px 0 0!important}#integrations-zohoAccount md-table-container thead th.md-checkbox-column:not(.no-padding){padding:0 24px!important}#integrations-zohoAccount md-table-container tbody tr td:not(:first-child):not(.no-padding):not(.actions-padding){padding:0 20px 0 0!important}#integrations-zohoAccount md-table-container.font-size-12 td.md-cell{font-size:12px!important}#zohoAccounts{position:relative}#zohoAccounts>.header{height:76px;min-height:76px;max-height:76px}#zohoAccounts>.header .logo .logo-icon{margin:0 16px 0 0}#zohoAccounts>.header .logo .logo-text{font-size:24px}#zohoAccounts>.header md-icon{color:#fff}#zohoAccounts>.header .search-input-wrapper{position:relative}#zohoAccounts>.header .search-input-wrapper label{padding-right:4px;cursor:pointer}#zohoAccounts>.header .search-input-wrapper label md-icon{color:rgba(255,255,255,.8)}#zohoAccounts>.header .search-input-wrapper md-input-container .md-errors-spacer{display:none}#zohoAccounts>.header .search-input-wrapper md-input-container input{border-bottom:1px solid rgba(255,255,255,.8);color:rgba(255,255,255,.8);width:240px}#zohoAccounts>.header .search-input-wrapper md-input-container input::placeholder{color:rgba(255,255,255,.8)}#zohoAccounts>.header .search-input-wrapper md-input-container input:focus{border-bottom:1px solid #fff;color:#fff}#zohoAccounts>.header.selected-bar{position:absolute;top:0;left:0;right:0;z-index:999;background-image:none;opacity:1!important}#zohoAccounts>.header.selected-bar .close-button-wrapper{width:244px}#zohoAccounts>.content{position:absolute;top:76px;bottom:0;right:0;left:0}#zohoAccounts>.content .main{padding:16px 90px 0 4px;position:absolute;top:0;left:24px;right:0;bottom:0}#zohoAccounts>.content .main .no-results{box-shadow:0 1px 1px 0 rgba(0,0,0,.14)}#zohoAccounts #add-zohoAccount-button{position:fixed;bottom:8px;right:8px;padding:0}#zohoAccounts #upload-zohoAccount-button{position:fixed;bottom:8px;right:8px;padding:0}md-dialog.project-dialog{max-width:720px;width:720px}md-dialog.project-dialog md-dialog-content{display:block;position:relative}md-dialog.project-dialog md-toolbar .title{font-size:17px}md-dialog.project-dialog md-input-container textarea{min-height:150px}md-dialog.project-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.project-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.project-dialog .date-container{padding:16px 0 24px 0}md-dialog.project-dialog .error-list{font-size:13px}md-dialog.project-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.project-dialog .error-list .error .message{font-weight:500}md-dialog.project-dialog .error-list .error .md-button{margin:0}md-dialog.project-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.project-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.session-dialog{max-width:720px;width:720px}md-dialog.session-dialog md-dialog-content{display:block;position:relative}md-dialog.session-dialog md-toolbar .title{font-size:17px}md-dialog.session-dialog md-input-container textarea{min-height:150px}md-dialog.session-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.session-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.session-dialog .date-container{padding:16px 0 24px 0}md-dialog.session-dialog .error-list{font-size:13px}md-dialog.session-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.session-dialog .error-list .error .message{font-weight:500}md-dialog.session-dialog .error-list .error .md-button{margin:0}md-dialog.session-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.session-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}#jscripty-project .header{height:76px;min-height:76px;max-height:76px}#jscripty-project .header .goto-projects-button{margin-right:16px}#jscripty-project .header .project-image{overflow:hidden;width:56px;height:56px;margin-right:16px;border:3px solid rgba(0,0,0,.12)}#jscripty-project .header .project-image img{height:100%;width:auto;max-width:none}#jscripty-project .header .subtitle{margin:6px 0 0 0}#jscripty-project .project-detail-form-container{padding:24px;margin-bottom:24px}#jscripty-project .project-detail-form-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}#jscripty-project .project-detail-form-container .handle{cursor:move}#jscripty-project .project-detail-form-container md-input-container md-switch{margin:0!important}#jscripty-project .project-detail-form-container #project-image-uploader{position:relative}#jscripty-project .project-detail-form-container #project-image-uploader.dropping .drop-text{display:flex}#jscripty-project .project-detail-form-container #project-image-uploader .drop-text{display:none;position:absolute;top:0;right:0;bottom:0;left:0;padding:16px;text-align:center;border:2px dashed rgba(0,0,0,.12);background:#fff;font-size:20px;z-index:100}#jscripty-project .project-detail-form-container #project-image-uploader .upload-button{margin-bottom:16px}#jscripty-project .project-detail-form-container #project-image-uploader .project-image{position:relative;width:200px;height:200px;border:1px solid rgba(0,0,0,.12);margin:8px}#jscripty-project .project-detail-form-container #project-image-uploader .project-image.uploading .overlay{position:absolute;top:0;right:0;bottom:0;left:0;background:rgba(0,0,0,.87)}#jscripty-project .project-detail-form-container #project-image-uploader .project-image .media{max-height:100%}#jscripty-project md-table-container thead tr th:not(:first-child):not(.no-padding){padding:0 20px 0 0!important}#jscripty-project md-table-container thead th.md-checkbox-column:not(.no-padding){padding:0 24px!important}#jscripty-project md-table-container tbody tr td:not(:first-child):not(.no-padding):not(.actions-padding){padding:0 20px 0 0!important}#jscripty-project md-table-container.font-size-12 td.md-cell{font-size:12px!important}#projects{position:relative}#projects>.header{height:76px;min-height:76px;max-height:76px}#projects>.header .logo .logo-icon{margin:0 16px 0 0}#projects>.header .logo .logo-text{font-size:24px}#projects>.header md-icon{color:#fff}#projects>.header .search-input-wrapper{position:relative}#projects>.header .search-input-wrapper label{padding-right:4px;cursor:pointer}#projects>.header .search-input-wrapper label md-icon{color:rgba(255,255,255,.8)}#projects>.header .search-input-wrapper md-input-container .md-errors-spacer{display:none}#projects>.header .search-input-wrapper md-input-container input{border-bottom:1px solid rgba(255,255,255,.8);color:rgba(255,255,255,.8);width:240px}#projects>.header .search-input-wrapper md-input-container input::placeholder{color:rgba(255,255,255,.8)}#projects>.header .search-input-wrapper md-input-container input:focus{border-bottom:1px solid #fff;color:#fff}#projects>.header.selected-bar{position:absolute;top:0;left:0;right:0;z-index:999;background-image:none;opacity:1!important}#projects>.header.selected-bar .close-button-wrapper{width:244px}#projects>.content{position:absolute;top:76px;bottom:0;right:0;left:0}#projects>.content .main{padding:16px 90px 0 4px;position:absolute;top:0;left:24px;right:0;bottom:0}#projects>.content .main .no-results{box-shadow:0 1px 1px 0 rgba(0,0,0,.14)}#projects #add-project-button{position:fixed;bottom:8px;right:8px;padding:0}#projects #upload-project-button{position:fixed;bottom:8px;right:8px;padding:0}md-dialog.mailAccount-dialog{max-width:720px;width:720px}md-dialog.mailAccount-dialog md-dialog-content{display:block;position:relative}md-dialog.mailAccount-dialog md-toolbar .title{font-size:17px}md-dialog.mailAccount-dialog md-input-container textarea{min-height:150px}md-dialog.mailAccount-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.mailAccount-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.mailAccount-dialog .date-container{padding:16px 0 24px 0}md-dialog.mailAccount-dialog .error-list{font-size:13px}md-dialog.mailAccount-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.mailAccount-dialog .error-list .error .message{font-weight:500}md-dialog.mailAccount-dialog .error-list .error .md-button{margin:0}md-dialog.mailAccount-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.mailAccount-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.mailAccount-dialog{max-width:720px;width:720px}md-dialog.mailAccount-dialog md-dialog-content{display:block;position:relative}md-dialog.mailAccount-dialog md-toolbar .title{font-size:17px}md-dialog.mailAccount-dialog md-input-container textarea{min-height:150px}md-dialog.mailAccount-dialog .date-container{padding:16px 0 24px 0}md-dialog.mailAccount-dialog .error-list{font-size:13px}md-dialog.mailAccount-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.mailAccount-dialog .error-list .error .message{font-weight:500}md-dialog.mailAccount-dialog .error-list .error .md-button{margin:0}md-dialog.mailAccount-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.mailAccount-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.mailAccount-dialog{max-width:720px;width:720px}md-dialog.mailAccount-dialog md-dialog-content{display:block;position:relative}md-dialog.mailAccount-dialog md-toolbar .title{font-size:17px}md-dialog.mailAccount-dialog md-input-container textarea{min-height:150px}md-dialog.mailAccount-dialog .date-container{padding:16px 0 24px 0}md-dialog.mailAccount-dialog .error-list{font-size:13px}md-dialog.mailAccount-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.mailAccount-dialog .error-list .error .message{font-weight:500}md-dialog.mailAccount-dialog .error-list .error .md-button{margin:0}md-dialog.mailAccount-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.mailAccount-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.mailAccount-dialog{max-width:720px;width:720px}md-dialog.mailAccount-dialog md-dialog-content{display:block;position:relative}md-dialog.mailAccount-dialog md-toolbar .title{font-size:17px}md-dialog.mailAccount-dialog md-input-container textarea{min-height:150px}md-dialog.mailAccount-dialog .date-container{padding:16px 0 24px 0}md-dialog.mailAccount-dialog .error-list{font-size:13px}md-dialog.mailAccount-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.mailAccount-dialog .error-list .error .message{font-weight:500}md-dialog.mailAccount-dialog .error-list .error .md-button{margin:0}md-dialog.mailAccount-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.mailAccount-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.mailAccount-dialog{max-width:720px;width:720px}md-dialog.mailAccount-dialog md-dialog-content{display:block;position:relative}md-dialog.mailAccount-dialog md-toolbar .title{font-size:17px}md-dialog.mailAccount-dialog md-input-container textarea{min-height:150px}md-dialog.mailAccount-dialog .date-container{padding:16px 0 24px 0}md-dialog.mailAccount-dialog .error-list{font-size:13px}md-dialog.mailAccount-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.mailAccount-dialog .error-list .error .message{font-weight:500}md-dialog.mailAccount-dialog .error-list .error .md-button{margin:0}md-dialog.mailAccount-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.mailAccount-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.mailAccount-dialog{max-width:720px;width:720px}md-dialog.mailAccount-dialog md-dialog-content{display:block;position:relative}md-dialog.mailAccount-dialog md-toolbar .title{font-size:17px}md-dialog.mailAccount-dialog md-input-container textarea{min-height:150px}md-dialog.mailAccount-dialog .date-container{padding:16px 0 24px 0}md-dialog.mailAccount-dialog .error-list{font-size:13px}md-dialog.mailAccount-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.mailAccount-dialog .error-list .error .message{font-weight:500}md-dialog.mailAccount-dialog .error-list .error .md-button{margin:0}md-dialog.mailAccount-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.mailAccount-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.mailAccount-dialog{max-width:720px;width:720px}md-dialog.mailAccount-dialog md-dialog-content{display:block;position:relative}md-dialog.mailAccount-dialog md-toolbar .title{font-size:17px}md-dialog.mailAccount-dialog md-input-container textarea{min-height:150px}md-dialog.mailAccount-dialog .date-container{padding:16px 0 24px 0}md-dialog.mailAccount-dialog .error-list{font-size:13px}md-dialog.mailAccount-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.mailAccount-dialog .error-list .error .message{font-weight:500}md-dialog.mailAccount-dialog .error-list .error .md-button{margin:0}md-dialog.mailAccount-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.mailAccount-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.mailAccount-dialog{max-width:720px;width:720px}md-dialog.mailAccount-dialog md-dialog-content{display:block;position:relative}md-dialog.mailAccount-dialog md-toolbar .title{font-size:17px}md-dialog.mailAccount-dialog md-input-container textarea{min-height:150px}md-dialog.mailAccount-dialog .date-container{padding:16px 0 24px 0}md-dialog.mailAccount-dialog .error-list{font-size:13px}md-dialog.mailAccount-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.mailAccount-dialog .error-list .error .message{font-weight:500}md-dialog.mailAccount-dialog .error-list .error .md-button{margin:0}md-dialog.mailAccount-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.mailAccount-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.mailAccount-dialog{max-width:720px;width:720px}md-dialog.mailAccount-dialog md-dialog-content{display:block;position:relative}md-dialog.mailAccount-dialog md-toolbar .title{font-size:17px}md-dialog.mailAccount-dialog md-input-container textarea{min-height:150px}md-dialog.mailAccount-dialog .date-container{padding:16px 0 24px 0}md-dialog.mailAccount-dialog .error-list{font-size:13px}md-dialog.mailAccount-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.mailAccount-dialog .error-list .error .message{font-weight:500}md-dialog.mailAccount-dialog .error-list .error .md-button{margin:0}md-dialog.mailAccount-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.mailAccount-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.mailAccount-dialog{max-width:720px;width:720px}md-dialog.mailAccount-dialog md-dialog-content{display:block;position:relative}md-dialog.mailAccount-dialog md-toolbar .title{font-size:17px}md-dialog.mailAccount-dialog md-input-container textarea{min-height:150px}md-dialog.mailAccount-dialog .date-container{padding:16px 0 24px 0}md-dialog.mailAccount-dialog .error-list{font-size:13px}md-dialog.mailAccount-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.mailAccount-dialog .error-list .error .message{font-weight:500}md-dialog.mailAccount-dialog .error-list .error .md-button{margin:0}md-dialog.mailAccount-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.mailAccount-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.mailAccount-dialog{max-width:720px;width:720px}md-dialog.mailAccount-dialog md-dialog-content{display:block;position:relative}md-dialog.mailAccount-dialog md-toolbar .title{font-size:17px}md-dialog.mailAccount-dialog md-input-container textarea{min-height:150px}md-dialog.mailAccount-dialog .date-container{padding:16px 0 24px 0}md-dialog.mailAccount-dialog .error-list{font-size:13px}md-dialog.mailAccount-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.mailAccount-dialog .error-list .error .message{font-weight:500}md-dialog.mailAccount-dialog .error-list .error .md-button{margin:0}md-dialog.mailAccount-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.mailAccount-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.mailCannedAnswer-dialog{max-width:720px;width:720px}md-dialog.mailCannedAnswer-dialog md-dialog-content{display:block;position:relative}md-dialog.mailCannedAnswer-dialog md-toolbar .title{font-size:17px}md-dialog.mailCannedAnswer-dialog md-input-container textarea{min-height:150px}md-dialog.mailCannedAnswer-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.mailCannedAnswer-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.mailCannedAnswer-dialog .date-container{padding:16px 0 24px 0}md-dialog.mailCannedAnswer-dialog .error-list{font-size:13px}md-dialog.mailCannedAnswer-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.mailCannedAnswer-dialog .error-list .error .message{font-weight:500}md-dialog.mailCannedAnswer-dialog .error-list .error .md-button{margin:0}md-dialog.mailCannedAnswer-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.mailCannedAnswer-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}#mail-mailAccount .header{height:76px;min-height:76px;max-height:76px}#mail-mailAccount .header .goto-mailAccounts-button{margin-right:16px}#mail-mailAccount .header .mailAccount-image{overflow:hidden;width:56px;height:56px;margin-right:16px;border:3px solid rgba(0,0,0,.12)}#mail-mailAccount .header .mailAccount-image img{height:100%;width:auto;max-width:none}#mail-mailAccount .header .subtitle{margin:6px 0 0 0}#mail-mailAccount .mailAccount-detail-form-container{padding:24px;margin-bottom:24px}#mail-mailAccount .mailAccount-detail-form-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}#mail-mailAccount .mailAccount-detail-form-container .handle{cursor:move}#mail-mailAccount .mailAccount-detail-form-container md-input-container md-switch{margin:0!important}#mail-mailAccount .mailAccount-detail-form-container #mailAccount-image-uploader{position:relative}#mail-mailAccount .mailAccount-detail-form-container #mailAccount-image-uploader.dropping .drop-text{display:flex}#mail-mailAccount .mailAccount-detail-form-container #mailAccount-image-uploader .drop-text{display:none;position:absolute;top:0;right:0;bottom:0;left:0;padding:16px;text-align:center;border:2px dashed rgba(0,0,0,.12);background:#fff;font-size:20px;z-index:100}#mail-mailAccount .mailAccount-detail-form-container #mailAccount-image-uploader .upload-button{margin-bottom:16px}#mail-mailAccount .mailAccount-detail-form-container #mailAccount-image-uploader .mailAccount-image{position:relative;width:200px;height:200px;border:1px solid rgba(0,0,0,.12);margin:8px}#mail-mailAccount .mailAccount-detail-form-container #mailAccount-image-uploader .mailAccount-image.uploading .overlay{position:absolute;top:0;right:0;bottom:0;left:0;background:rgba(0,0,0,.87)}#mail-mailAccount .mailAccount-detail-form-container #mailAccount-image-uploader .mailAccount-image .media{max-height:100%}#mail-mailAccount md-table-container thead tr th:not(:first-child):not(.no-padding){padding:0 20px 0 0!important}#mail-mailAccount md-table-container thead th.md-checkbox-column:not(.no-padding){padding:0 24px!important}#mail-mailAccount md-table-container tbody tr td:not(:first-child):not(.no-padding):not(.actions-padding){padding:0 20px 0 0!important}#mail-mailAccount md-table-container.font-size-12 td.md-cell{font-size:12px!important}@media screen and (min-width:1921px){#mail-mailAccount .actionAppData{width:800px!important}}@media screen and (max-width:1920px){#mail-mailAccount .actionAppData{width:700px!important}}@media screen and (min-width:1751px) and (max-width:1919px){#mail-mailAccount .actionAppData{width:600px!important}}@media screen and (min-width:1601px) and (max-width:1750px){#mail-mailAccount .actionAppData{width:500px!important}}@media screen and (min-width:1537px) and (max-width:1600px){#mail-mailAccount .actionAppData{width:450px!important}}@media screen and (min-width:1281px) and (max-width:1536px){#mail-mailAccount .actionAppData{width:300px!important}}@media screen and (max-width:1280px){#mail-mailAccount .actionAppData{width:150px!important}}@media screen and (max-width:960px){#mail-mailAccount .actionAppData{width:80px!important}}#mailAccounts{position:relative}#mailAccounts>.header{height:76px;min-height:76px;max-height:76px}#mailAccounts>.header .logo .logo-icon{margin:0 16px 0 0}#mailAccounts>.header .logo .logo-text{font-size:24px}#mailAccounts>.header md-icon{color:#fff}#mailAccounts>.header .search-input-wrapper{position:relative}#mailAccounts>.header .search-input-wrapper label{padding-right:4px;cursor:pointer}#mailAccounts>.header .search-input-wrapper label md-icon{color:rgba(255,255,255,.8)}#mailAccounts>.header .search-input-wrapper md-input-container .md-errors-spacer{display:none}#mailAccounts>.header .search-input-wrapper md-input-container input{border-bottom:1px solid rgba(255,255,255,.8);color:rgba(255,255,255,.8);width:240px}#mailAccounts>.header .search-input-wrapper md-input-container input::placeholder{color:rgba(255,255,255,.8)}#mailAccounts>.header .search-input-wrapper md-input-container input:focus{border-bottom:1px solid #fff;color:#fff}#mailAccounts>.header.selected-bar{position:absolute;top:0;left:0;right:0;z-index:999;background-image:none;opacity:1!important}#mailAccounts>.header.selected-bar .close-button-wrapper{width:244px}#mailAccounts>.content{position:absolute;top:76px;bottom:0;right:0;left:0}#mailAccounts>.content .main{padding:16px 90px 0 4px;position:absolute;top:0;left:24px;right:0;bottom:0}#mailAccounts>.content .main .no-results{box-shadow:0 1px 1px 0 rgba(0,0,0,.14)}#mailAccounts #add-mailAccount-button{position:fixed;bottom:8px;right:8px;padding:0}#mailAccounts #upload-mailAccount-button{position:fixed;bottom:8px;right:8px;padding:0}md-dialog.mailQueue-dialog{max-width:720px;width:720px}md-dialog.mailQueue-dialog md-dialog-content{display:block;position:relative}md-dialog.mailQueue-dialog md-toolbar .title{font-size:17px}md-dialog.mailQueue-dialog md-input-container textarea{min-height:150px}md-dialog.mailQueue-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.mailQueue-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.mailQueue-dialog .date-container{padding:16px 0 24px 0}md-dialog.mailQueue-dialog .error-list{font-size:13px}md-dialog.mailQueue-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.mailQueue-dialog .error-list .error .message{font-weight:500}md-dialog.mailQueue-dialog .error-list .error .md-button{margin:0}md-dialog.mailQueue-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.mailQueue-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}#mail-mailQueue .header{height:76px;min-height:76px;max-height:76px}#mail-mailQueue .header .goto-mailQueues-button{margin-right:16px}#mail-mailQueue .header .mailQueue-image{overflow:hidden;width:56px;height:56px;margin-right:16px;border:3px solid rgba(0,0,0,.12)}#mail-mailQueue .header .mailQueue-image img{height:100%;width:auto;max-width:none}#mail-mailQueue .header .subtitle{margin:6px 0 0 0}#mail-mailQueue .mailQueue-detail-form-container{padding:24px;margin-bottom:24px}#mail-mailQueue .mailQueue-detail-form-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}#mail-mailQueue .mailQueue-detail-form-container .handle{cursor:move}#mail-mailQueue .mailQueue-detail-form-container md-input-container md-switch{margin:0!important}#mail-mailQueue .mailQueue-detail-form-container #mailQueue-image-uploader{position:relative}#mail-mailQueue .mailQueue-detail-form-container #mailQueue-image-uploader.dropping .drop-text{display:flex}#mail-mailQueue .mailQueue-detail-form-container #mailQueue-image-uploader .drop-text{display:none;position:absolute;top:0;right:0;bottom:0;left:0;padding:16px;text-align:center;border:2px dashed rgba(0,0,0,.12);background:#fff;font-size:20px;z-index:100}#mail-mailQueue .mailQueue-detail-form-container #mailQueue-image-uploader .upload-button{margin-bottom:16px}#mail-mailQueue .mailQueue-detail-form-container #mailQueue-image-uploader .mailQueue-image{position:relative;width:200px;height:200px;border:1px solid rgba(0,0,0,.12);margin:8px}#mail-mailQueue .mailQueue-detail-form-container #mailQueue-image-uploader .mailQueue-image.uploading .overlay{position:absolute;top:0;right:0;bottom:0;left:0;background:rgba(0,0,0,.87)}#mail-mailQueue .mailQueue-detail-form-container #mailQueue-image-uploader .mailQueue-image .media{max-height:100%}#mail-mailQueue md-table-container thead tr th:not(:first-child):not(.no-padding){padding:0 20px 0 0!important}#mail-mailQueue md-table-container thead th.md-checkbox-column:not(.no-padding){padding:0 24px!important}#mail-mailQueue md-table-container tbody tr td:not(:first-child):not(.no-padding):not(.actions-padding){padding:0 20px 0 0!important}#mail-mailQueue md-table-container.font-size-12 td.md-cell{font-size:12px!important}#mailQueues{position:relative}#mailQueues>.header{height:76px;min-height:76px;max-height:76px}#mailQueues>.header .logo .logo-icon{margin:0 16px 0 0}#mailQueues>.header .logo .logo-text{font-size:24px}#mailQueues>.header md-icon{color:#fff}#mailQueues>.header .search-input-wrapper{position:relative}#mailQueues>.header .search-input-wrapper label{padding-right:4px;cursor:pointer}#mailQueues>.header .search-input-wrapper label md-icon{color:rgba(255,255,255,.8)}#mailQueues>.header .search-input-wrapper md-input-container .md-errors-spacer{display:none}#mailQueues>.header .search-input-wrapper md-input-container input{border-bottom:1px solid rgba(255,255,255,.8);color:rgba(255,255,255,.8);width:240px}#mailQueues>.header .search-input-wrapper md-input-container input::placeholder{color:rgba(255,255,255,.8)}#mailQueues>.header .search-input-wrapper md-input-container input:focus{border-bottom:1px solid #fff;color:#fff}#mailQueues>.header.selected-bar{position:absolute;top:0;left:0;right:0;z-index:999;background-image:none;opacity:1!important}#mailQueues>.header.selected-bar .close-button-wrapper{width:244px}#mailQueues>.content{position:absolute;top:76px;bottom:0;right:0;left:0}#mailQueues>.content .main{padding:16px 90px 0 4px;position:absolute;top:0;left:24px;right:0;bottom:0}#mailQueues>.content .main .no-results{box-shadow:0 1px 1px 0 rgba(0,0,0,.14)}#mailQueues #add-mailQueue-button{position:fixed;bottom:8px;right:8px;padding:0}#mailQueues #upload-mailQueue-button{position:fixed;bottom:8px;right:8px;padding:0}md-dialog.mailSubstatus-dialog{max-width:720px;width:720px}md-dialog.mailSubstatus-dialog md-dialog-content{display:block;position:relative}md-dialog.mailSubstatus-dialog md-toolbar .title{font-size:17px}md-dialog.mailSubstatus-dialog md-input-container textarea{min-height:150px}md-dialog.mailSubstatus-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.mailSubstatus-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.mailSubstatus-dialog .date-container{padding:16px 0 24px 0}md-dialog.mailSubstatus-dialog .error-list{font-size:13px}md-dialog.mailSubstatus-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.mailSubstatus-dialog .error-list .error .message{font-weight:500}md-dialog.mailSubstatus-dialog .error-list .error .md-button{margin:0}md-dialog.mailSubstatus-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.mailSubstatus-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}#mailSubtatuses{position:relative}#mailSubtatuses>.header{height:76px;min-height:76px;max-height:76px}#mailSubtatuses>.header .logo .logo-icon{margin:0 16px 0 0}#mailSubtatuses>.header .logo .logo-text{font-size:24px}#mailSubtatuses>.header md-icon{color:#fff}#mailSubtatuses>.header .search-input-wrapper{position:relative}#mailSubtatuses>.header .search-input-wrapper label{padding-right:4px;cursor:pointer}#mailSubtatuses>.header .search-input-wrapper label md-icon{color:rgba(255,255,255,.8)}#mailSubtatuses>.header .search-input-wrapper md-input-container .md-errors-spacer{display:none}#mailSubtatuses>.header .search-input-wrapper md-input-container input{border-bottom:1px solid rgba(255,255,255,.8);color:rgba(255,255,255,.8);width:240px}#mailSubtatuses>.header .search-input-wrapper md-input-container input::placeholder{color:rgba(255,255,255,.8)}#mailSubtatuses>.header .search-input-wrapper md-input-container input:focus{border-bottom:1px solid #fff;color:#fff}#mailSubtatuses>.header.selected-bar{position:absolute;top:0;left:0;right:0;z-index:999;background-image:none;opacity:1!important}#mailSubtatuses>.header.selected-bar .close-button-wrapper{width:244px}#mailSubtatuses>.content{position:absolute;top:76px;bottom:0;right:0;left:0}#mailSubtatuses>.content .main{padding:16px 90px 0 4px;position:absolute;top:0;left:24px;right:0;bottom:0}#mailSubtatuses>.content .main .no-results{box-shadow:0 1px 1px 0 rgba(0,0,0,.14)}#mailSubtatuses #add-mailSubstatus-button{position:fixed;bottom:8px;right:8px;padding:0}#mailSubtatuses #upload-mailSubstatus-button{position:fixed;bottom:8px;right:8px;padding:0}#realtime{height:auto}#realtime>.content .blink{animation:blinker 2s linear infinite}#realtime>.content .avatar-wrapper{position:relative}#realtime>.content .avatar-wrapper .status{position:absolute;bottom:-3px;right:5px}#realtime>.content .search-input-wrapper{position:relative;margin-left:20px}#realtime>.content .search-input-wrapper label{padding:6px;cursor:pointer}#realtime>.content .search-input-wrapper md-input-container{padding-top:20px}#realtime>.content .main .labels{padding:8px 16px}#realtime>.content .main .labels .label{margin:0 0 2px 4px;padding:2px 5px;font-size:11px;white-space:nowrap;border-radius:2px}#realtime>.content .main .status{position:absolute;bottom:-3px;right:5px}#realtime>.content .main .avatar-wrapper{position:relative}#realtime>.content .main .avatar-wrapper .status{position:absolute;bottom:-3px;right:5px}#realtime>.content .custom-column{padding:0 24px!important}@keyframes blinker{50%{opacity:0}}md-dialog.plugin-dialog{max-width:720px;width:720px}md-dialog.plugin-dialog md-dialog-content{display:block;position:relative}md-dialog.plugin-dialog md-toolbar .title{font-size:17px}md-dialog.plugin-dialog md-input-container textarea{min-height:150px}md-dialog.plugin-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.plugin-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.plugin-dialog .date-container{padding:16px 0 24px 0}md-dialog.plugin-dialog .error-list{font-size:13px}md-dialog.plugin-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.plugin-dialog .error-list .error .message{font-weight:500}md-dialog.plugin-dialog .error-list .error .md-button{margin:0}md-dialog.plugin-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.plugin-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}#marketplace-plugin .header{height:76px;min-height:76px;max-height:76px}#marketplace-plugin .header .goto-plugins-button{margin-right:16px}#marketplace-plugin .header .plugin-image{overflow:hidden;width:56px;height:56px;margin-right:16px;border:3px solid rgba(0,0,0,.12)}#marketplace-plugin .header .plugin-image img{height:100%;width:auto;max-width:none}#marketplace-plugin .header .subtitle{margin:6px 0 0 0}#marketplace-plugin .plugin-detail-form-container{padding:24px;margin-bottom:24px}#marketplace-plugin .plugin-detail-form-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}#marketplace-plugin .plugin-detail-form-container .handle{cursor:move}#marketplace-plugin .plugin-detail-form-container md-input-container md-switch{margin:0!important}#marketplace-plugin .plugin-detail-form-container #plugin-image-uploader{position:relative}#marketplace-plugin .plugin-detail-form-container #plugin-image-uploader.dropping .drop-text{display:flex}#marketplace-plugin .plugin-detail-form-container #plugin-image-uploader .drop-text{display:none;position:absolute;top:0;right:0;bottom:0;left:0;padding:16px;text-align:center;border:2px dashed rgba(0,0,0,.12);background:#fff;font-size:20px;z-index:100}#marketplace-plugin .plugin-detail-form-container #plugin-image-uploader .upload-button{margin-bottom:16px}#marketplace-plugin .plugin-detail-form-container #plugin-image-uploader .plugin-image{position:relative;width:200px;height:200px;border:1px solid rgba(0,0,0,.12);margin:8px}#marketplace-plugin .plugin-detail-form-container #plugin-image-uploader .plugin-image.uploading .overlay{position:absolute;top:0;right:0;bottom:0;left:0;background:rgba(0,0,0,.87)}#marketplace-plugin .plugin-detail-form-container #plugin-image-uploader .plugin-image .media{max-height:100%}#marketplace-plugin md-table-container thead tr th:not(:first-child):not(.no-padding){padding:0 20px 0 0!important}#marketplace-plugin md-table-container thead th.md-checkbox-column:not(.no-padding){padding:0 24px!important}#marketplace-plugin md-table-container tbody tr td:not(:first-child):not(.no-padding):not(.actions-padding){padding:0 20px 0 0!important}#marketplace-plugin md-table-container.font-size-12 td.md-cell{font-size:12px!important}#plugins{position:relative}#plugins>.header{height:76px;min-height:76px;max-height:76px}#plugins>.header .logo .logo-icon{margin:0 16px 0 0}#plugins>.header .logo .logo-text{font-size:24px}#plugins>.header md-icon{color:#fff}#plugins>.header .search-input-wrapper{position:relative}#plugins>.header .search-input-wrapper label{padding-right:4px;cursor:pointer}#plugins>.header .search-input-wrapper label md-icon{color:rgba(255,255,255,.8)}#plugins>.header .search-input-wrapper md-input-container .md-errors-spacer{display:none}#plugins>.header .search-input-wrapper md-input-container input{border-bottom:1px solid rgba(255,255,255,.8);color:rgba(255,255,255,.8);width:240px}#plugins>.header .search-input-wrapper md-input-container input::placeholder{color:rgba(255,255,255,.8)}#plugins>.header .search-input-wrapper md-input-container input:focus{border-bottom:1px solid #fff;color:#fff}#plugins>.header.selected-bar{position:absolute;top:0;left:0;right:0;z-index:999;background-image:none;opacity:1!important}#plugins>.header.selected-bar .close-button-wrapper{width:244px}#plugins>.content{position:absolute;top:76px;bottom:0;right:0;left:0}#plugins>.content .main{padding:16px 90px 0 4px;position:absolute;top:0;left:24px;right:0;bottom:0}#plugins>.content .main .no-results{box-shadow:0 1px 1px 0 rgba(0,0,0,.14)}#plugins #add-plugin-button{position:fixed;bottom:8px;right:8px;padding:0}#plugins #upload-plugin-button{position:fixed;bottom:8px;right:8px;padding:0}md-dialog.upload-dialog{max-width:720px;width:720px}md-dialog.upload-dialog md-dialog-content{display:block;position:relative}md-dialog.upload-dialog md-toolbar .title{font-size:17px}md-dialog.upload-dialog md-input-container textarea{min-height:150px}md-dialog.upload-dialog md-progress-linear{padding-top:16px!important}md-dialog.upload-dialog .date-container{padding:16px 0 24px 0}md-dialog.upload-dialog .error-list{font-size:13px}md-dialog.upload-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.upload-dialog .error-list .error .message{font-weight:500}md-dialog.upload-dialog .error-list .error .md-button{margin:0}md-dialog.upload-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.upload-dialog .plugin-image{overflow:hidden;max-width:148px;margin-right:16px;border:3px solid rgba(0,0,0,.12);padding:10px}md-dialog.upload-dialog .plugin-image img{width:auto;max-width:none}md-dialog.upload-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.ivrCampaign-dialog{max-width:720px;width:720px}md-dialog.ivrCampaign-dialog md-dialog-content{display:block;position:relative}md-dialog.ivrCampaign-dialog md-toolbar .title{font-size:17px}md-dialog.ivrCampaign-dialog md-input-container textarea{min-height:150px}md-dialog.ivrCampaign-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.ivrCampaign-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.ivrCampaign-dialog .date-container{padding:16px 0 24px 0}md-dialog.ivrCampaign-dialog .error-list{font-size:13px}md-dialog.ivrCampaign-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.ivrCampaign-dialog .error-list .error .message{font-weight:500}md-dialog.ivrCampaign-dialog .error-list .error .md-button{margin:0}md-dialog.ivrCampaign-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.ivrCampaign-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.hopper-dialog{max-width:720px;width:720px}md-dialog.hopper-dialog md-dialog-content{display:block;position:relative}md-dialog.hopper-dialog md-toolbar .title{font-size:17px}md-dialog.hopper-dialog md-input-container textarea{min-height:150px}md-dialog.hopper-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.hopper-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.hopper-dialog .date-container{padding:16px 0 24px 0}md-dialog.hopper-dialog .error-list{font-size:13px}md-dialog.hopper-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.hopper-dialog .error-list .error .message{font-weight:500}md-dialog.hopper-dialog .error-list .error .md-button{margin:0}md-dialog.hopper-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.hopper-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}#motiondialer-ivrCampaign .header{height:76px;min-height:76px;max-height:76px}#motiondialer-ivrCampaign .header .goto-ivrCampaigns-button{margin-right:16px}#motiondialer-ivrCampaign .header .ivrCampaign-image{overflow:hidden;width:56px;height:56px;margin-right:16px;border:3px solid rgba(0,0,0,.12)}#motiondialer-ivrCampaign .header .ivrCampaign-image img{height:100%;width:auto;max-width:none}#motiondialer-ivrCampaign .header .subtitle{margin:6px 0 0 0}#motiondialer-ivrCampaign .ivrCampaign-detail-form-container{padding:24px;margin-bottom:24px}#motiondialer-ivrCampaign .ivrCampaign-detail-form-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}#motiondialer-ivrCampaign .ivrCampaign-detail-form-container .handle{cursor:move}#motiondialer-ivrCampaign .ivrCampaign-detail-form-container md-input-container md-switch{margin:0!important}#motiondialer-ivrCampaign .ivrCampaign-detail-form-container #ivrCampaign-image-uploader{position:relative}#motiondialer-ivrCampaign .ivrCampaign-detail-form-container #ivrCampaign-image-uploader.dropping .drop-text{display:flex}#motiondialer-ivrCampaign .ivrCampaign-detail-form-container #ivrCampaign-image-uploader .drop-text{display:none;position:absolute;top:0;right:0;bottom:0;left:0;padding:16px;text-align:center;border:2px dashed rgba(0,0,0,.12);background:#fff;font-size:20px;z-index:100}#motiondialer-ivrCampaign .ivrCampaign-detail-form-container #ivrCampaign-image-uploader .upload-button{margin-bottom:16px}#motiondialer-ivrCampaign .ivrCampaign-detail-form-container #ivrCampaign-image-uploader .ivrCampaign-image{position:relative;width:200px;height:200px;border:1px solid rgba(0,0,0,.12);margin:8px}#motiondialer-ivrCampaign .ivrCampaign-detail-form-container #ivrCampaign-image-uploader .ivrCampaign-image.uploading .overlay{position:absolute;top:0;right:0;bottom:0;left:0;background:rgba(0,0,0,.87)}#motiondialer-ivrCampaign .ivrCampaign-detail-form-container #ivrCampaign-image-uploader .ivrCampaign-image .media{max-height:100%}#motiondialer-ivrCampaign md-table-container thead tr th:not(:first-child):not(.no-padding){padding:0 20px 0 0!important}#motiondialer-ivrCampaign md-table-container thead th.md-checkbox-column:not(.no-padding){padding:0 24px!important}#motiondialer-ivrCampaign md-table-container tbody tr td:not(:first-child):not(.no-padding):not(.actions-padding){padding:0 20px 0 0!important}#motiondialer-ivrCampaign md-table-container.font-size-12 td.md-cell{font-size:12px!important}#ivrCampaigns{position:relative}#ivrCampaigns>.header{height:76px;min-height:76px;max-height:76px}#ivrCampaigns>.header .logo .logo-icon{margin:0 16px 0 0}#ivrCampaigns>.header .logo .logo-text{font-size:24px}#ivrCampaigns>.header md-icon{color:#fff}#ivrCampaigns>.header .search-input-wrapper{position:relative}#ivrCampaigns>.header .search-input-wrapper label{padding-right:4px;cursor:pointer}#ivrCampaigns>.header .search-input-wrapper label md-icon{color:rgba(255,255,255,.8)}#ivrCampaigns>.header .search-input-wrapper md-input-container .md-errors-spacer{display:none}#ivrCampaigns>.header .search-input-wrapper md-input-container input{border-bottom:1px solid rgba(255,255,255,.8);color:rgba(255,255,255,.8);width:240px}#ivrCampaigns>.header .search-input-wrapper md-input-container input::placeholder{color:rgba(255,255,255,.8)}#ivrCampaigns>.header .search-input-wrapper md-input-container input:focus{border-bottom:1px solid #fff;color:#fff}#ivrCampaigns>.header.selected-bar{position:absolute;top:0;left:0;right:0;z-index:999;background-image:none;opacity:1!important}#ivrCampaigns>.header.selected-bar .close-button-wrapper{width:244px}#ivrCampaigns>.content{position:absolute;top:76px;bottom:0;right:0;left:0}#ivrCampaigns>.content .main{padding:16px 90px 0 4px;position:absolute;top:0;left:24px;right:0;bottom:0}#ivrCampaigns>.content .main .no-results{box-shadow:0 1px 1px 0 rgba(0,0,0,.14)}#ivrCampaigns #add-ivrCampaign-button{position:fixed;bottom:8px;right:8px;padding:0}#ivrCampaigns #upload-ivrCampaign-button{position:fixed;bottom:8px;right:8px;padding:0}md-dialog.queueCampaign-dialog{max-width:720px;width:720px}md-dialog.queueCampaign-dialog md-dialog-content{display:block;position:relative}md-dialog.queueCampaign-dialog md-toolbar .title{font-size:17px}md-dialog.queueCampaign-dialog md-input-container textarea{min-height:150px}md-dialog.queueCampaign-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.queueCampaign-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.queueCampaign-dialog .date-container{padding:16px 0 24px 0}md-dialog.queueCampaign-dialog .error-list{font-size:13px}md-dialog.queueCampaign-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.queueCampaign-dialog .error-list .error .message{font-weight:500}md-dialog.queueCampaign-dialog .error-list .error .md-button{margin:0}md-dialog.queueCampaign-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.queueCampaign-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.hopper-dialog{max-width:720px;width:720px}md-dialog.hopper-dialog md-dialog-content{display:block;position:relative}md-dialog.hopper-dialog md-toolbar .title{font-size:17px}md-dialog.hopper-dialog md-input-container textarea{min-height:150px}md-dialog.hopper-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.hopper-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.hopper-dialog .date-container{padding:16px 0 24px 0}md-dialog.hopper-dialog .error-list{font-size:13px}md-dialog.hopper-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.hopper-dialog .error-list .error .message{font-weight:500}md-dialog.hopper-dialog .error-list .error .md-button{margin:0}md-dialog.hopper-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.hopper-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}#motiondialer-queueCampaign .header{height:76px;min-height:76px;max-height:76px}#motiondialer-queueCampaign .header .goto-queueCampaigns-button{margin-right:16px}#motiondialer-queueCampaign .header .queueCampaign-image{overflow:hidden;width:56px;height:56px;margin-right:16px;border:3px solid rgba(0,0,0,.12)}#motiondialer-queueCampaign .header .queueCampaign-image img{height:100%;width:auto;max-width:none}#motiondialer-queueCampaign .header .subtitle{margin:6px 0 0 0}#motiondialer-queueCampaign .queueCampaign-detail-form-container{padding:24px;margin-bottom:24px}#motiondialer-queueCampaign .queueCampaign-detail-form-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}#motiondialer-queueCampaign .queueCampaign-detail-form-container .handle{cursor:move}#motiondialer-queueCampaign .queueCampaign-detail-form-container md-input-container md-switch{margin:0!important}#motiondialer-queueCampaign .queueCampaign-detail-form-container #queueCampaign-image-uploader{position:relative}#motiondialer-queueCampaign .queueCampaign-detail-form-container #queueCampaign-image-uploader.dropping .drop-text{display:flex}#motiondialer-queueCampaign .queueCampaign-detail-form-container #queueCampaign-image-uploader .drop-text{display:none;position:absolute;top:0;right:0;bottom:0;left:0;padding:16px;text-align:center;border:2px dashed rgba(0,0,0,.12);background:#fff;font-size:20px;z-index:100}#motiondialer-queueCampaign .queueCampaign-detail-form-container #queueCampaign-image-uploader .upload-button{margin-bottom:16px}#motiondialer-queueCampaign .queueCampaign-detail-form-container #queueCampaign-image-uploader .queueCampaign-image{position:relative;width:200px;height:200px;border:1px solid rgba(0,0,0,.12);margin:8px}#motiondialer-queueCampaign .queueCampaign-detail-form-container #queueCampaign-image-uploader .queueCampaign-image.uploading .overlay{position:absolute;top:0;right:0;bottom:0;left:0;background:rgba(0,0,0,.87)}#motiondialer-queueCampaign .queueCampaign-detail-form-container #queueCampaign-image-uploader .queueCampaign-image .media{max-height:100%}#motiondialer-queueCampaign md-table-container thead tr th:not(:first-child):not(.no-padding){padding:0 20px 0 0!important}#motiondialer-queueCampaign md-table-container thead th.md-checkbox-column:not(.no-padding){padding:0 24px!important}#motiondialer-queueCampaign md-table-container tbody tr td:not(:first-child):not(.no-padding):not(.actions-padding){padding:0 20px 0 0!important}#motiondialer-queueCampaign md-table-container.font-size-12 td.md-cell{font-size:12px!important}#queueCampaigns{position:relative}#queueCampaigns>.header{height:76px;min-height:76px;max-height:76px}#queueCampaigns>.header .logo .logo-icon{margin:0 16px 0 0}#queueCampaigns>.header .logo .logo-text{font-size:24px}#queueCampaigns>.header md-icon{color:#fff}#queueCampaigns>.header .search-input-wrapper{position:relative}#queueCampaigns>.header .search-input-wrapper label{padding-right:4px;cursor:pointer}#queueCampaigns>.header .search-input-wrapper label md-icon{color:rgba(255,255,255,.8)}#queueCampaigns>.header .search-input-wrapper md-input-container .md-errors-spacer{display:none}#queueCampaigns>.header .search-input-wrapper md-input-container input{border-bottom:1px solid rgba(255,255,255,.8);color:rgba(255,255,255,.8);width:240px}#queueCampaigns>.header .search-input-wrapper md-input-container input::placeholder{color:rgba(255,255,255,.8)}#queueCampaigns>.header .search-input-wrapper md-input-container input:focus{border-bottom:1px solid #fff;color:#fff}#queueCampaigns>.header.selected-bar{position:absolute;top:0;left:0;right:0;z-index:999;background-image:none;opacity:1!important}#queueCampaigns>.header.selected-bar .close-button-wrapper{width:244px}#queueCampaigns>.content{position:absolute;top:76px;bottom:0;right:0;left:0}#queueCampaigns>.content .main{padding:16px 90px 0 4px;position:absolute;top:0;left:24px;right:0;bottom:0}#queueCampaigns>.content .main .no-results{box-shadow:0 1px 1px 0 rgba(0,0,0,.14)}#queueCampaigns #add-queueCampaign-button{position:fixed;bottom:8px;right:8px;padding:0}#queueCampaigns #upload-queueCampaign-button{position:fixed;bottom:8px;right:8px;padding:0}#realtime{height:auto}#realtime>.content .blink{animation:blinker 2s linear infinite}#realtime>.content .avatar-wrapper{position:relative}#realtime>.content .avatar-wrapper .status{position:absolute;bottom:-3px;right:5px}#realtime>.content .search-input-wrapper{position:relative;margin-left:20px}#realtime>.content .search-input-wrapper label{padding:6px;cursor:pointer}#realtime>.content .search-input-wrapper md-input-container{padding-top:20px}#realtime>.content .main .labels{padding:8px 16px}#realtime>.content .main .labels .label{margin:0 0 2px 4px;padding:2px 5px;font-size:11px;white-space:nowrap;border-radius:2px}#realtime>.content .main .status{position:absolute;bottom:-3px;right:5px}#realtime>.content .main .avatar-wrapper{position:relative}#realtime>.content .main .avatar-wrapper .status{position:absolute;bottom:-3px;right:5px}#realtime>.content .custom-column{padding:0 24px!important}@keyframes blinker{50%{opacity:0}}md-dialog.openchannelAccount-dialog{max-width:720px;width:720px}md-dialog.openchannelAccount-dialog md-dialog-content{display:block;position:relative}md-dialog.openchannelAccount-dialog md-toolbar .title{font-size:17px}md-dialog.openchannelAccount-dialog md-input-container textarea{min-height:150px}md-dialog.openchannelAccount-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.openchannelAccount-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.openchannelAccount-dialog .date-container{padding:16px 0 24px 0}md-dialog.openchannelAccount-dialog .error-list{font-size:13px}md-dialog.openchannelAccount-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.openchannelAccount-dialog .error-list .error .message{font-weight:500}md-dialog.openchannelAccount-dialog .error-list .error .md-button{margin:0}md-dialog.openchannelAccount-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.openchannelAccount-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.openchannelAccount-dialog{max-width:720px;width:720px}md-dialog.openchannelAccount-dialog md-dialog-content{display:block;position:relative}md-dialog.openchannelAccount-dialog md-toolbar .title{font-size:17px}md-dialog.openchannelAccount-dialog md-input-container textarea{min-height:150px}md-dialog.openchannelAccount-dialog .date-container{padding:16px 0 24px 0}md-dialog.openchannelAccount-dialog .error-list{font-size:13px}md-dialog.openchannelAccount-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.openchannelAccount-dialog .error-list .error .message{font-weight:500}md-dialog.openchannelAccount-dialog .error-list .error .md-button{margin:0}md-dialog.openchannelAccount-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.openchannelAccount-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.openchannelAccount-dialog{max-width:720px;width:720px}md-dialog.openchannelAccount-dialog md-dialog-content{display:block;position:relative}md-dialog.openchannelAccount-dialog md-toolbar .title{font-size:17px}md-dialog.openchannelAccount-dialog md-input-container textarea{min-height:150px}md-dialog.openchannelAccount-dialog .date-container{padding:16px 0 24px 0}md-dialog.openchannelAccount-dialog .error-list{font-size:13px}md-dialog.openchannelAccount-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.openchannelAccount-dialog .error-list .error .message{font-weight:500}md-dialog.openchannelAccount-dialog .error-list .error .md-button{margin:0}md-dialog.openchannelAccount-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.openchannelAccount-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.openchannelAccount-dialog{max-width:720px;width:720px}md-dialog.openchannelAccount-dialog md-dialog-content{display:block;position:relative}md-dialog.openchannelAccount-dialog md-toolbar .title{font-size:17px}md-dialog.openchannelAccount-dialog md-input-container textarea{min-height:150px}md-dialog.openchannelAccount-dialog .date-container{padding:16px 0 24px 0}md-dialog.openchannelAccount-dialog .error-list{font-size:13px}md-dialog.openchannelAccount-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.openchannelAccount-dialog .error-list .error .message{font-weight:500}md-dialog.openchannelAccount-dialog .error-list .error .md-button{margin:0}md-dialog.openchannelAccount-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.openchannelAccount-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.openchannelAccount-dialog{max-width:720px;width:720px}md-dialog.openchannelAccount-dialog md-dialog-content{display:block;position:relative}md-dialog.openchannelAccount-dialog md-toolbar .title{font-size:17px}md-dialog.openchannelAccount-dialog md-input-container textarea{min-height:150px}md-dialog.openchannelAccount-dialog .date-container{padding:16px 0 24px 0}md-dialog.openchannelAccount-dialog .error-list{font-size:13px}md-dialog.openchannelAccount-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.openchannelAccount-dialog .error-list .error .message{font-weight:500}md-dialog.openchannelAccount-dialog .error-list .error .md-button{margin:0}md-dialog.openchannelAccount-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.openchannelAccount-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.openchannelAccount-dialog{max-width:720px;width:720px}md-dialog.openchannelAccount-dialog md-dialog-content{display:block;position:relative}md-dialog.openchannelAccount-dialog md-toolbar .title{font-size:17px}md-dialog.openchannelAccount-dialog md-input-container textarea{min-height:150px}md-dialog.openchannelAccount-dialog .date-container{padding:16px 0 24px 0}md-dialog.openchannelAccount-dialog .error-list{font-size:13px}md-dialog.openchannelAccount-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.openchannelAccount-dialog .error-list .error .message{font-weight:500}md-dialog.openchannelAccount-dialog .error-list .error .md-button{margin:0}md-dialog.openchannelAccount-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.openchannelAccount-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.openchannelAccount-dialog{max-width:720px;width:720px}md-dialog.openchannelAccount-dialog md-dialog-content{display:block;position:relative}md-dialog.openchannelAccount-dialog md-toolbar .title{font-size:17px}md-dialog.openchannelAccount-dialog md-input-container textarea{min-height:150px}md-dialog.openchannelAccount-dialog .date-container{padding:16px 0 24px 0}md-dialog.openchannelAccount-dialog .error-list{font-size:13px}md-dialog.openchannelAccount-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.openchannelAccount-dialog .error-list .error .message{font-weight:500}md-dialog.openchannelAccount-dialog .error-list .error .md-button{margin:0}md-dialog.openchannelAccount-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.openchannelAccount-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.openchannelAccount-dialog{max-width:720px;width:720px}md-dialog.openchannelAccount-dialog md-dialog-content{display:block;position:relative}md-dialog.openchannelAccount-dialog md-toolbar .title{font-size:17px}md-dialog.openchannelAccount-dialog md-input-container textarea{min-height:150px}md-dialog.openchannelAccount-dialog .date-container{padding:16px 0 24px 0}md-dialog.openchannelAccount-dialog .error-list{font-size:13px}md-dialog.openchannelAccount-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.openchannelAccount-dialog .error-list .error .message{font-weight:500}md-dialog.openchannelAccount-dialog .error-list .error .md-button{margin:0}md-dialog.openchannelAccount-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.openchannelAccount-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.openchannelAccount-dialog{max-width:720px;width:720px}md-dialog.openchannelAccount-dialog md-dialog-content{display:block;position:relative}md-dialog.openchannelAccount-dialog md-toolbar .title{font-size:17px}md-dialog.openchannelAccount-dialog md-input-container textarea{min-height:150px}md-dialog.openchannelAccount-dialog .date-container{padding:16px 0 24px 0}md-dialog.openchannelAccount-dialog .error-list{font-size:13px}md-dialog.openchannelAccount-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.openchannelAccount-dialog .error-list .error .message{font-weight:500}md-dialog.openchannelAccount-dialog .error-list .error .md-button{margin:0}md-dialog.openchannelAccount-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.openchannelAccount-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.openchannelAccount-dialog{max-width:720px;width:720px}md-dialog.openchannelAccount-dialog md-dialog-content{display:block;position:relative}md-dialog.openchannelAccount-dialog md-toolbar .title{font-size:17px}md-dialog.openchannelAccount-dialog md-input-container textarea{min-height:150px}md-dialog.openchannelAccount-dialog .date-container{padding:16px 0 24px 0}md-dialog.openchannelAccount-dialog .error-list{font-size:13px}md-dialog.openchannelAccount-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.openchannelAccount-dialog .error-list .error .message{font-weight:500}md-dialog.openchannelAccount-dialog .error-list .error .md-button{margin:0}md-dialog.openchannelAccount-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.openchannelAccount-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.openchannelAccount-dialog{max-width:720px;width:720px}md-dialog.openchannelAccount-dialog md-dialog-content{display:block;position:relative}md-dialog.openchannelAccount-dialog md-toolbar .title{font-size:17px}md-dialog.openchannelAccount-dialog md-input-container textarea{min-height:150px}md-dialog.openchannelAccount-dialog .date-container{padding:16px 0 24px 0}md-dialog.openchannelAccount-dialog .error-list{font-size:13px}md-dialog.openchannelAccount-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.openchannelAccount-dialog .error-list .error .message{font-weight:500}md-dialog.openchannelAccount-dialog .error-list .error .md-button{margin:0}md-dialog.openchannelAccount-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.openchannelAccount-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.openchannelAccount-dialog{max-width:720px;width:720px}md-dialog.openchannelAccount-dialog md-dialog-content{display:block;position:relative}md-dialog.openchannelAccount-dialog md-toolbar .title{font-size:17px}md-dialog.openchannelAccount-dialog md-input-container textarea{min-height:150px}md-dialog.openchannelAccount-dialog .date-container{padding:16px 0 24px 0}md-dialog.openchannelAccount-dialog .error-list{font-size:13px}md-dialog.openchannelAccount-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.openchannelAccount-dialog .error-list .error .message{font-weight:500}md-dialog.openchannelAccount-dialog .error-list .error .md-button{margin:0}md-dialog.openchannelAccount-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.openchannelAccount-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.openchannelAccount-dialog{max-width:720px;width:720px}md-dialog.openchannelAccount-dialog md-dialog-content{display:block;position:relative}md-dialog.openchannelAccount-dialog md-toolbar .title{font-size:17px}md-dialog.openchannelAccount-dialog md-input-container textarea{min-height:150px}md-dialog.openchannelAccount-dialog .date-container{padding:16px 0 24px 0}md-dialog.openchannelAccount-dialog .error-list{font-size:13px}md-dialog.openchannelAccount-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.openchannelAccount-dialog .error-list .error .message{font-weight:500}md-dialog.openchannelAccount-dialog .error-list .error .md-button{margin:0}md-dialog.openchannelAccount-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.openchannelAccount-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.openchannelAccount-dialog{max-width:720px;width:720px}md-dialog.openchannelAccount-dialog md-dialog-content{display:block;position:relative}md-dialog.openchannelAccount-dialog md-toolbar .title{font-size:17px}md-dialog.openchannelAccount-dialog md-input-container textarea{min-height:150px}md-dialog.openchannelAccount-dialog .date-container{padding:16px 0 24px 0}md-dialog.openchannelAccount-dialog .error-list{font-size:13px}md-dialog.openchannelAccount-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.openchannelAccount-dialog .error-list .error .message{font-weight:500}md-dialog.openchannelAccount-dialog .error-list .error .md-button{margin:0}md-dialog.openchannelAccount-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.openchannelAccount-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.openchannelCannedAnswer-dialog{max-width:720px;width:720px}md-dialog.openchannelCannedAnswer-dialog md-dialog-content{display:block;position:relative}md-dialog.openchannelCannedAnswer-dialog md-toolbar .title{font-size:17px}md-dialog.openchannelCannedAnswer-dialog md-input-container textarea{min-height:150px}md-dialog.openchannelCannedAnswer-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.openchannelCannedAnswer-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.openchannelCannedAnswer-dialog .date-container{padding:16px 0 24px 0}md-dialog.openchannelCannedAnswer-dialog .error-list{font-size:13px}md-dialog.openchannelCannedAnswer-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.openchannelCannedAnswer-dialog .error-list .error .message{font-weight:500}md-dialog.openchannelCannedAnswer-dialog .error-list .error .md-button{margin:0}md-dialog.openchannelCannedAnswer-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.openchannelCannedAnswer-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}#openchannel-openchannelAccount .header{height:76px;min-height:76px;max-height:76px}#openchannel-openchannelAccount .header .goto-openchannelAccounts-button{margin-right:16px}#openchannel-openchannelAccount .header .openchannelAccount-image{overflow:hidden;width:56px;height:56px;margin-right:16px;border:3px solid rgba(0,0,0,.12)}#openchannel-openchannelAccount .header .openchannelAccount-image img{height:100%;width:auto;max-width:none}#openchannel-openchannelAccount .header .subtitle{margin:6px 0 0 0}#openchannel-openchannelAccount .openchannelAccount-detail-form-container{padding:24px;margin-bottom:24px}#openchannel-openchannelAccount .openchannelAccount-detail-form-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}#openchannel-openchannelAccount .openchannelAccount-detail-form-container .handle{cursor:move}#openchannel-openchannelAccount .openchannelAccount-detail-form-container md-input-container md-switch{margin:0!important}#openchannel-openchannelAccount .openchannelAccount-detail-form-container #openchannelAccount-image-uploader{position:relative}#openchannel-openchannelAccount .openchannelAccount-detail-form-container #openchannelAccount-image-uploader.dropping .drop-text{display:flex}#openchannel-openchannelAccount .openchannelAccount-detail-form-container #openchannelAccount-image-uploader .drop-text{display:none;position:absolute;top:0;right:0;bottom:0;left:0;padding:16px;text-align:center;border:2px dashed rgba(0,0,0,.12);background:#fff;font-size:20px;z-index:100}#openchannel-openchannelAccount .openchannelAccount-detail-form-container #openchannelAccount-image-uploader .upload-button{margin-bottom:16px}#openchannel-openchannelAccount .openchannelAccount-detail-form-container #openchannelAccount-image-uploader .openchannelAccount-image{position:relative;width:200px;height:200px;border:1px solid rgba(0,0,0,.12);margin:8px}#openchannel-openchannelAccount .openchannelAccount-detail-form-container #openchannelAccount-image-uploader .openchannelAccount-image.uploading .overlay{position:absolute;top:0;right:0;bottom:0;left:0;background:rgba(0,0,0,.87)}#openchannel-openchannelAccount .openchannelAccount-detail-form-container #openchannelAccount-image-uploader .openchannelAccount-image .media{max-height:100%}#openchannel-openchannelAccount md-table-container thead tr th:not(:first-child):not(.no-padding){padding:0 20px 0 0!important}#openchannel-openchannelAccount md-table-container thead th.md-checkbox-column:not(.no-padding){padding:0 24px!important}#openchannel-openchannelAccount md-table-container tbody tr td:not(:first-child):not(.no-padding):not(.actions-padding){padding:0 20px 0 0!important}#openchannel-openchannelAccount md-table-container.font-size-12 td.md-cell{font-size:12px!important}@media screen and (min-width:1921px){#openchannel-openchannelAccount .actionAppData{width:800px!important}}@media screen and (max-width:1920px){#openchannel-openchannelAccount .actionAppData{width:700px!important}}@media screen and (min-width:1751px) and (max-width:1919px){#openchannel-openchannelAccount .actionAppData{width:600px!important}}@media screen and (min-width:1601px) and (max-width:1750px){#openchannel-openchannelAccount .actionAppData{width:500px!important}}@media screen and (min-width:1537px) and (max-width:1600px){#openchannel-openchannelAccount .actionAppData{width:450px!important}}@media screen and (min-width:1281px) and (max-width:1536px){#openchannel-openchannelAccount .actionAppData{width:300px!important}}@media screen and (max-width:1280px){#openchannel-openchannelAccount .actionAppData{width:150px!important}}@media screen and (max-width:960px){#openchannel-openchannelAccount .actionAppData{width:80px!important}}#openchannelAccounts{position:relative}#openchannelAccounts>.header{height:76px;min-height:76px;max-height:76px}#openchannelAccounts>.header .logo .logo-icon{margin:0 16px 0 0}#openchannelAccounts>.header .logo .logo-text{font-size:24px}#openchannelAccounts>.header md-icon{color:#fff}#openchannelAccounts>.header .search-input-wrapper{position:relative}#openchannelAccounts>.header .search-input-wrapper label{padding-right:4px;cursor:pointer}#openchannelAccounts>.header .search-input-wrapper label md-icon{color:rgba(255,255,255,.8)}#openchannelAccounts>.header .search-input-wrapper md-input-container .md-errors-spacer{display:none}#openchannelAccounts>.header .search-input-wrapper md-input-container input{border-bottom:1px solid rgba(255,255,255,.8);color:rgba(255,255,255,.8);width:240px}#openchannelAccounts>.header .search-input-wrapper md-input-container input::placeholder{color:rgba(255,255,255,.8)}#openchannelAccounts>.header .search-input-wrapper md-input-container input:focus{border-bottom:1px solid #fff;color:#fff}#openchannelAccounts>.header.selected-bar{position:absolute;top:0;left:0;right:0;z-index:999;background-image:none;opacity:1!important}#openchannelAccounts>.header.selected-bar .close-button-wrapper{width:244px}#openchannelAccounts>.content{position:absolute;top:76px;bottom:0;right:0;left:0}#openchannelAccounts>.content .main{padding:16px 90px 0 4px;position:absolute;top:0;left:24px;right:0;bottom:0}#openchannelAccounts>.content .main .no-results{box-shadow:0 1px 1px 0 rgba(0,0,0,.14)}#openchannelAccounts #add-openchannelAccount-button{position:fixed;bottom:8px;right:8px;padding:0}#openchannelAccounts #upload-openchannelAccount-button{position:fixed;bottom:8px;right:8px;padding:0}md-dialog.openchannelQueue-dialog{max-width:720px;width:720px}md-dialog.openchannelQueue-dialog md-dialog-content{display:block;position:relative}md-dialog.openchannelQueue-dialog md-toolbar .title{font-size:17px}md-dialog.openchannelQueue-dialog md-input-container textarea{min-height:150px}md-dialog.openchannelQueue-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.openchannelQueue-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.openchannelQueue-dialog .date-container{padding:16px 0 24px 0}md-dialog.openchannelQueue-dialog .error-list{font-size:13px}md-dialog.openchannelQueue-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.openchannelQueue-dialog .error-list .error .message{font-weight:500}md-dialog.openchannelQueue-dialog .error-list .error .md-button{margin:0}md-dialog.openchannelQueue-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.openchannelQueue-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}#openchannel-openchannelQueue .header{height:76px;min-height:76px;max-height:76px}#openchannel-openchannelQueue .header .goto-openchannelQueues-button{margin-right:16px}#openchannel-openchannelQueue .header .openchannelQueue-image{overflow:hidden;width:56px;height:56px;margin-right:16px;border:3px solid rgba(0,0,0,.12)}#openchannel-openchannelQueue .header .openchannelQueue-image img{height:100%;width:auto;max-width:none}#openchannel-openchannelQueue .header .subtitle{margin:6px 0 0 0}#openchannel-openchannelQueue .openchannelQueue-detail-form-container{padding:24px;margin-bottom:24px}#openchannel-openchannelQueue .openchannelQueue-detail-form-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}#openchannel-openchannelQueue .openchannelQueue-detail-form-container .handle{cursor:move}#openchannel-openchannelQueue .openchannelQueue-detail-form-container md-input-container md-switch{margin:0!important}#openchannel-openchannelQueue .openchannelQueue-detail-form-container #openchannelQueue-image-uploader{position:relative}#openchannel-openchannelQueue .openchannelQueue-detail-form-container #openchannelQueue-image-uploader.dropping .drop-text{display:flex}#openchannel-openchannelQueue .openchannelQueue-detail-form-container #openchannelQueue-image-uploader .drop-text{display:none;position:absolute;top:0;right:0;bottom:0;left:0;padding:16px;text-align:center;border:2px dashed rgba(0,0,0,.12);background:#fff;font-size:20px;z-index:100}#openchannel-openchannelQueue .openchannelQueue-detail-form-container #openchannelQueue-image-uploader .upload-button{margin-bottom:16px}#openchannel-openchannelQueue .openchannelQueue-detail-form-container #openchannelQueue-image-uploader .openchannelQueue-image{position:relative;width:200px;height:200px;border:1px solid rgba(0,0,0,.12);margin:8px}#openchannel-openchannelQueue .openchannelQueue-detail-form-container #openchannelQueue-image-uploader .openchannelQueue-image.uploading .overlay{position:absolute;top:0;right:0;bottom:0;left:0;background:rgba(0,0,0,.87)}#openchannel-openchannelQueue .openchannelQueue-detail-form-container #openchannelQueue-image-uploader .openchannelQueue-image .media{max-height:100%}#openchannel-openchannelQueue md-table-container thead tr th:not(:first-child):not(.no-padding){padding:0 20px 0 0!important}#openchannel-openchannelQueue md-table-container thead th.md-checkbox-column:not(.no-padding){padding:0 24px!important}#openchannel-openchannelQueue md-table-container tbody tr td:not(:first-child):not(.no-padding):not(.actions-padding){padding:0 20px 0 0!important}#openchannel-openchannelQueue md-table-container.font-size-12 td.md-cell{font-size:12px!important}#openchannelQueues{position:relative}#openchannelQueues>.header{height:76px;min-height:76px;max-height:76px}#openchannelQueues>.header .logo .logo-icon{margin:0 16px 0 0}#openchannelQueues>.header .logo .logo-text{font-size:24px}#openchannelQueues>.header md-icon{color:#fff}#openchannelQueues>.header .search-input-wrapper{position:relative}#openchannelQueues>.header .search-input-wrapper label{padding-right:4px;cursor:pointer}#openchannelQueues>.header .search-input-wrapper label md-icon{color:rgba(255,255,255,.8)}#openchannelQueues>.header .search-input-wrapper md-input-container .md-errors-spacer{display:none}#openchannelQueues>.header .search-input-wrapper md-input-container input{border-bottom:1px solid rgba(255,255,255,.8);color:rgba(255,255,255,.8);width:240px}#openchannelQueues>.header .search-input-wrapper md-input-container input::placeholder{color:rgba(255,255,255,.8)}#openchannelQueues>.header .search-input-wrapper md-input-container input:focus{border-bottom:1px solid #fff;color:#fff}#openchannelQueues>.header.selected-bar{position:absolute;top:0;left:0;right:0;z-index:999;background-image:none;opacity:1!important}#openchannelQueues>.header.selected-bar .close-button-wrapper{width:244px}#openchannelQueues>.content{position:absolute;top:76px;bottom:0;right:0;left:0}#openchannelQueues>.content .main{padding:16px 90px 0 4px;position:absolute;top:0;left:24px;right:0;bottom:0}#openchannelQueues>.content .main .no-results{box-shadow:0 1px 1px 0 rgba(0,0,0,.14)}#openchannelQueues #add-openchannelQueue-button{position:fixed;bottom:8px;right:8px;padding:0}#openchannelQueues #upload-openchannelQueue-button{position:fixed;bottom:8px;right:8px;padding:0}#realtime{height:auto}#realtime>.content .blink{animation:blinker 2s linear infinite}#realtime>.content .avatar-wrapper{position:relative}#realtime>.content .avatar-wrapper .status{position:absolute;bottom:-3px;right:5px}#realtime>.content .search-input-wrapper{position:relative;margin-left:20px}#realtime>.content .search-input-wrapper label{padding:6px;cursor:pointer}#realtime>.content .search-input-wrapper md-input-container{padding-top:20px}#realtime>.content .main .labels{padding:8px 16px}#realtime>.content .main .labels .label{margin:0 0 2px 4px;padding:2px 5px;font-size:11px;white-space:nowrap;border-radius:2px}#realtime>.content .main .status{position:absolute;bottom:-3px;right:5px}#realtime>.content .main .avatar-wrapper{position:relative}#realtime>.content .main .avatar-wrapper .status{position:absolute;bottom:-3px;right:5px}#realtime>.content .custom-column{padding:0 24px!important}@keyframes blinker{50%{opacity:0}}#plugin .filter-header{background-image:url(/assets/images/backgrounds/header-bg.png);color:#fff}md-dialog.predictive-dialog{max-width:720px;width:720px}md-dialog.predictive-dialog md-dialog-content{display:block;position:relative}md-dialog.predictive-dialog md-toolbar .title{font-size:17px}md-dialog.predictive-dialog md-input-container textarea{min-height:150px}md-dialog.predictive-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.predictive-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.predictive-dialog .date-container{padding:16px 0 24px 0}md-dialog.predictive-dialog .error-list{font-size:13px}md-dialog.predictive-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.predictive-dialog .error-list .error .message{font-weight:500}md-dialog.predictive-dialog .error-list .error .md-button{margin:0}md-dialog.predictive-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.predictive-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}#cloudProviders{position:relative}#cloudProviders>.header{height:76px;min-height:76px;max-height:76px}#cloudProviders>.header .logo .logo-icon{margin:0 16px 0 0}#cloudProviders>.header .logo .logo-text{font-size:24px}#cloudProviders>.header md-icon{color:#fff}#cloudProviders>.header .search-input-wrapper{position:relative}#cloudProviders>.header .search-input-wrapper label{padding-right:4px;cursor:pointer}#cloudProviders>.header .search-input-wrapper label md-icon{color:rgba(255,255,255,.8)}#cloudProviders>.header .search-input-wrapper md-input-container .md-errors-spacer{display:none}#cloudProviders>.header .search-input-wrapper md-input-container input{border-bottom:1px solid rgba(255,255,255,.8);color:rgba(255,255,255,.8);width:240px}#cloudProviders>.header .search-input-wrapper md-input-container input::placeholder{color:rgba(255,255,255,.8)}#cloudProviders>.header .search-input-wrapper md-input-container input:focus{border-bottom:1px solid #fff;color:#fff}#cloudProviders>.header.selected-bar{position:absolute;top:0;left:0;right:0;z-index:999;background-image:none;opacity:1!important}#cloudProviders>.header.selected-bar .close-button-wrapper{width:244px}#cloudProviders>.content{position:absolute;top:76px;bottom:0;right:0;left:0}#cloudProviders>.content .main{padding:16px 90px 0 4px;position:absolute;top:0;left:24px;right:0;bottom:0}#cloudProviders>.content .main .no-results{box-shadow:0 1px 1px 0 rgba(0,0,0,.14)}#cloudProviders #add-cloudProvider-button{position:fixed;bottom:8px;right:8px;padding:0}#cloudProviders #upload-cloudProvider-button{position:fixed;bottom:8px;right:8px;padding:0}md-dialog.cloudProvider-dialog{max-width:720px;width:720px}md-dialog.cloudProvider-dialog md-dialog-content{display:block;position:relative}md-dialog.cloudProvider-dialog md-toolbar .title{font-size:17px}md-dialog.cloudProvider-dialog md-input-container textarea{min-height:150px}md-dialog.cloudProvider-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.cloudProvider-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.cloudProvider-dialog .date-container{padding:16px 0 24px 0}md-dialog.cloudProvider-dialog .error-list{font-size:13px}md-dialog.cloudProvider-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.cloudProvider-dialog .error-list .error .message{font-weight:500}md-dialog.cloudProvider-dialog .error-list .error .md-button{margin:0}md-dialog.cloudProvider-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.cloudProvider-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.customization-dialog{max-width:720px;width:720px}md-dialog.customization-dialog md-dialog-content{display:block;position:relative}md-dialog.customization-dialog md-toolbar .title{font-size:17px}md-dialog.customization-dialog md-input-container textarea{min-height:150px}md-dialog.customization-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.customization-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.customization-dialog .date-container{padding:16px 0 24px 0}md-dialog.customization-dialog .error-list{font-size:13px}md-dialog.customization-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.customization-dialog .error-list .error .message{font-weight:500}md-dialog.customization-dialog .error-list .error .md-button{margin:0}md-dialog.customization-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.customization-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}#customizations{position:relative}#customizations>.header{height:76px;min-height:76px;max-height:76px}#customizations>.header .logo .logo-icon{margin:0 16px 0 0}#customizations>.header .logo .logo-text{font-size:24px}#customizations>.header md-icon{color:#fff}#customizations>.header .search-input-wrapper{position:relative}#customizations>.header .search-input-wrapper label{padding-right:4px;cursor:pointer}#customizations>.header .search-input-wrapper label md-icon{color:rgba(255,255,255,.8)}#customizations>.header .search-input-wrapper md-input-container .md-errors-spacer{display:none}#customizations>.header .search-input-wrapper md-input-container input{border-bottom:1px solid rgba(255,255,255,.8);color:rgba(255,255,255,.8);width:240px}#customizations>.header .search-input-wrapper md-input-container input::placeholder{color:rgba(255,255,255,.8)}#customizations>.header .search-input-wrapper md-input-container input:focus{border-bottom:1px solid #fff;color:#fff}#customizations>.header.selected-bar{position:absolute;top:0;left:0;right:0;z-index:999;background-image:none;opacity:1!important}#customizations>.header.selected-bar .close-button-wrapper{width:244px}#customizations>.content{position:absolute;top:76px;bottom:0;right:0;left:0}#customizations>.content .main{padding:16px 90px 0 4px;position:absolute;top:0;left:24px;right:0;bottom:0}#customizations>.content .main .no-results{box-shadow:0 1px 1px 0 rgba(0,0,0,.14)}#customizations>.content .customization-detail-form-container{padding:24px;margin-bottom:24px}#customizations>.content .customization-detail-form-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}#customizations>.content .customization-detail-form-container .handle{cursor:move}#customizations>.content .customization-detail-form-container md-input-container md-switch{margin:0!important}#customizations>.content .customization-detail-form-container #customization-image-uploader{position:relative}#customizations>.content .customization-detail-form-container #customization-image-uploader.dropping .drop-text{display:flex}#customizations>.content .customization-detail-form-container #customization-image-uploader .drop-text{display:none;position:absolute;top:0;right:0;bottom:0;left:0;padding:16px;text-align:center;border:2px dashed rgba(0,0,0,.12);background:#fff;font-size:20px;z-index:100}#customizations>.content .customization-detail-form-container #customization-image-uploader .upload-button{margin-bottom:16px}#customizations>.content .customization-detail-form-container #customization-image-uploader .customization-image{position:relative;width:200px;height:200px;border:1px solid rgba(0,0,0,.12);margin:8px}#customizations>.content .customization-detail-form-container #customization-image-uploader .customization-image.uploading .overlay{position:absolute;top:0;right:0;bottom:0;left:0;background:rgba(0,0,0,.87)}#customizations>.content .customization-detail-form-container #customization-image-uploader .customization-image .media{max-height:100%}#customizations #add-customization-button{position:fixed;bottom:8px;right:8px;padding:0}md-dialog.general-dialog{max-width:720px;width:720px}md-dialog.general-dialog md-dialog-content{display:block;position:relative}md-dialog.general-dialog md-toolbar .title{font-size:17px}md-dialog.general-dialog md-input-container textarea{min-height:150px}md-dialog.general-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.general-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.general-dialog .date-container{padding:16px 0 24px 0}md-dialog.general-dialog .error-list{font-size:13px}md-dialog.general-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.general-dialog .error-list .error .message{font-weight:500}md-dialog.general-dialog .error-list .error .md-button{margin:0}md-dialog.general-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.general-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}#generals{position:relative}#generals>.header{height:76px;min-height:76px;max-height:76px}#generals>.header .logo .logo-icon{margin:0 16px 0 0}#generals>.header .logo .logo-text{font-size:24px}#generals>.header md-icon{color:#fff}#generals>.header .search-input-wrapper{position:relative}#generals>.header .search-input-wrapper label{padding-right:4px;cursor:pointer}#generals>.header .search-input-wrapper label md-icon{color:rgba(255,255,255,.8)}#generals>.header .search-input-wrapper md-input-container .md-errors-spacer{display:none}#generals>.header .search-input-wrapper md-input-container input{border-bottom:1px solid rgba(255,255,255,.8);color:rgba(255,255,255,.8);width:240px}#generals>.header .search-input-wrapper md-input-container input::placeholder{color:rgba(255,255,255,.8)}#generals>.header .search-input-wrapper md-input-container input:focus{border-bottom:1px solid #fff;color:#fff}#generals>.header.selected-bar{position:absolute;top:0;left:0;right:0;z-index:999;background-image:none;opacity:1!important}#generals>.header.selected-bar .close-button-wrapper{width:244px}#generals>.content{position:absolute;top:76px;bottom:0;right:0;left:0}#generals>.content .main{padding:16px 90px 0 4px;position:absolute;top:0;left:24px;right:0;bottom:0}#generals>.content .main .no-results{box-shadow:0 1px 1px 0 rgba(0,0,0,.14)}#generals>.content .general-detail-form-container{padding:24px;margin-bottom:24px}#generals>.content .general-detail-form-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}#generals>.content .general-detail-form-container .handle{cursor:move}#generals>.content .general-detail-form-container md-input-container md-switch{margin:0!important}#generals>.content .general-detail-form-container #general-image-uploader{position:relative}#generals>.content .general-detail-form-container #general-image-uploader.dropping .drop-text{display:flex}#generals>.content .general-detail-form-container #general-image-uploader .drop-text{display:none;position:absolute;top:0;right:0;bottom:0;left:0;padding:16px;text-align:center;border:2px dashed rgba(0,0,0,.12);background:#fff;font-size:20px;z-index:100}#generals>.content .general-detail-form-container #general-image-uploader .upload-button{margin-bottom:16px}#generals>.content .general-detail-form-container #general-image-uploader .general-image{position:relative;width:200px;height:200px;border:1px solid rgba(0,0,0,.12);margin:8px}#generals>.content .general-detail-form-container #general-image-uploader .general-image.uploading .overlay{position:absolute;top:0;right:0;bottom:0;left:0;background:rgba(0,0,0,.87)}#generals>.content .general-detail-form-container #general-image-uploader .general-image .media{max-height:100%}#generals #add-general-button{position:fixed;bottom:8px;right:8px;padding:0}#license{position:relative}#license .blink{animation:blinker 2s linear infinite}#license>.header{height:76px;min-height:76px;max-height:76px}#license>.header .logo .logo-icon{margin:0 16px 0 0}#license>.header .logo .logo-text{font-size:24px}#license>.header md-icon{color:#fff}#license>.content{position:absolute;top:76px;bottom:0;right:0;left:0}#license>.content .main{padding:16px 90px 0 4px;position:absolute;top:0;left:24px;right:0;bottom:0}#license>.content .main .no-results{box-shadow:0 1px 1px 0 rgba(0,0,0,.14)}#license>.content .badge{position:absolute;top:0;left:50%;-webkit-transform:translateX(-50%);transform:translateX(-50%);font-size:11px;font-weight:500;padding:6px 8px}md-dialog.request-dialog{max-width:720px;width:720px}md-dialog.request-dialog md-dialog-content{display:block;position:relative}md-dialog.request-dialog md-toolbar .title{font-size:17px}md-dialog.request-dialog md-input-container textarea{min-height:150px}md-dialog.request-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.request-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.request-dialog .date-container{padding:16px 0 24px 0}md-dialog.request-dialog .error-list{font-size:13px}md-dialog.request-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.request-dialog .error-list .error .message{font-weight:500}md-dialog.request-dialog .error-list .error .md-button{margin:0}md-dialog.request-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.request-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.update-dialog{max-width:720px;width:720px}md-dialog.update-dialog md-dialog-content{display:block;position:relative}md-dialog.update-dialog md-toolbar .title{font-size:17px}md-dialog.update-dialog md-input-container textarea{min-height:60px}md-dialog.update-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.update-dialog .error-list{font-size:13px}md-dialog.update-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.update-dialog .error-list .error .message{font-weight:500}md-dialog.update-dialog .error-list .error .md-button{margin:0}md-dialog.update-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.update-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.network-dialog{max-width:720px;width:720px}md-dialog.network-dialog md-dialog-content{display:block;position:relative}md-dialog.network-dialog md-toolbar .title{font-size:17px}md-dialog.network-dialog md-input-container textarea{min-height:150px}md-dialog.network-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.network-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.network-dialog .date-container{padding:16px 0 24px 0}md-dialog.network-dialog .error-list{font-size:13px}md-dialog.network-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.network-dialog .error-list .error .message{font-weight:500}md-dialog.network-dialog .error-list .error .md-button{margin:0}md-dialog.network-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.network-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}#networks{position:relative}#networks>.header{height:76px;min-height:76px;max-height:76px}#networks>.header .logo .logo-icon{margin:0 16px 0 0}#networks>.header .logo .logo-text{font-size:24px}#networks>.header md-icon{color:#fff}#networks>.header .search-input-wrapper{position:relative}#networks>.header .search-input-wrapper label{padding-right:4px;cursor:pointer}#networks>.header .search-input-wrapper label md-icon{color:rgba(255,255,255,.8)}#networks>.header .search-input-wrapper md-input-container .md-errors-spacer{display:none}#networks>.header .search-input-wrapper md-input-container input{border-bottom:1px solid rgba(255,255,255,.8);color:rgba(255,255,255,.8);width:240px}#networks>.header .search-input-wrapper md-input-container input::placeholder{color:rgba(255,255,255,.8)}#networks>.header .search-input-wrapper md-input-container input:focus{border-bottom:1px solid #fff;color:#fff}#networks>.header.selected-bar{position:absolute;top:0;left:0;right:0;z-index:999;background-image:none;opacity:1!important}#networks>.header.selected-bar .close-button-wrapper{width:244px}#networks>.content{position:absolute;top:76px;bottom:0;right:0;left:0}#networks>.content .main{padding:16px 90px 0 4px;position:absolute;top:0;left:24px;right:0;bottom:0}#networks>.content .main .no-results{box-shadow:0 1px 1px 0 rgba(0,0,0,.14)}#networks #add-network-button{position:fixed;bottom:8px;right:8px;padding:0}#networks #upload-network-button{position:fixed;bottom:8px;right:8px;padding:0}#smtps{position:relative}#smtps>.header{height:76px;min-height:76px;max-height:76px}#smtps>.header .logo .logo-icon{margin:0 16px 0 0}#smtps>.header .logo .logo-text{font-size:24px}#smtps>.header md-icon{color:#fff}#smtps>.header .search-input-wrapper{position:relative}#smtps>.header .search-input-wrapper label{padding-right:4px;cursor:pointer}#smtps>.header .search-input-wrapper label md-icon{color:rgba(255,255,255,.8)}#smtps>.header .search-input-wrapper md-input-container .md-errors-spacer{display:none}#smtps>.header .search-input-wrapper md-input-container input{border-bottom:1px solid rgba(255,255,255,.8);color:rgba(255,255,255,.8);width:240px}#smtps>.header .search-input-wrapper md-input-container input::placeholder{color:rgba(255,255,255,.8)}#smtps>.header .search-input-wrapper md-input-container input:focus{border-bottom:1px solid #fff;color:#fff}#smtps>.header.selected-bar{position:absolute;top:0;left:0;right:0;z-index:999;background-image:none;opacity:1!important}#smtps>.header.selected-bar .close-button-wrapper{width:244px}#smtps>.content{position:absolute;top:76px;bottom:0;right:0;left:0}#smtps>.content .main{padding:16px 90px 0 4px;position:absolute;top:0;left:24px;right:0;bottom:0}#smtps>.content .main .no-results{box-shadow:0 1px 1px 0 rgba(0,0,0,.14)}#smtps>.content .smtp-detail-form-container{padding:24px;margin-bottom:24px}#smtps>.content .smtp-detail-form-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}#smtps>.content .smtp-detail-form-container .handle{cursor:move}#smtps>.content .smtp-detail-form-container md-input-container md-switch{margin:0!important}#smtps>.content .smtp-detail-form-container #smtp-image-uploader{position:relative}#smtps>.content .smtp-detail-form-container #smtp-image-uploader.dropping .drop-text{display:flex}#smtps>.content .smtp-detail-form-container #smtp-image-uploader .drop-text{display:none;position:absolute;top:0;right:0;bottom:0;left:0;padding:16px;text-align:center;border:2px dashed rgba(0,0,0,.12);background:#fff;font-size:20px;z-index:100}#smtps>.content .smtp-detail-form-container #smtp-image-uploader .upload-button{margin-bottom:16px}#smtps>.content .smtp-detail-form-container #smtp-image-uploader .smtp-image{position:relative;width:200px;height:200px;border:1px solid rgba(0,0,0,.12);margin:8px}#smtps>.content .smtp-detail-form-container #smtp-image-uploader .smtp-image.uploading .overlay{position:absolute;top:0;right:0;bottom:0;left:0;background:rgba(0,0,0,.87)}#smtps>.content .smtp-detail-form-container #smtp-image-uploader .smtp-image .media{max-height:100%}#smtps #add-smtp-button{position:fixed;bottom:8px;right:8px;padding:0}#system>.header{height:76px;min-height:76px;max-height:76px}#system>.header .logo .logo-icon{margin:0 16px 0 0}#system>.header .logo .logo-text{font-size:24px}#system>.header md-icon{color:#fff}#system .system-detail-form-container{padding:24px;margin-bottom:24px}#system .system-detail-form-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}#system .system-detail-form-container .handle{cursor:move}#system .system-detail-form-container md-input-container md-switch{margin:0!important}#system .system-detail-form-container #system-image-uploader{position:relative}#system .system-detail-form-container #system-image-uploader.dropping .drop-text{display:flex}#system .system-detail-form-container #system-image-uploader .drop-text{display:none;position:absolute;top:0;right:0;bottom:0;left:0;padding:16px;text-align:center;border:2px dashed rgba(0,0,0,.12);background:#fff;font-size:20px;z-index:100}#system .system-detail-form-container #system-image-uploader .upload-button{margin-bottom:16px}#system .system-detail-form-container #system-image-uploader .system-image{position:relative;width:200px;height:200px;border:1px solid rgba(0,0,0,.12);margin:8px}#system .system-detail-form-container #system-image-uploader .system-image.uploading .overlay{position:absolute;top:0;right:0;bottom:0;left:0;background:rgba(0,0,0,.87)}#system .system-detail-form-container #system-image-uploader .system-image .media{max-height:100%}#updates{position:relative}#updates>.header{height:76px;min-height:76px;max-height:76px}#updates>.header .logo .logo-icon{margin:0 16px 0 0}#updates>.header .logo .logo-text{font-size:24px}#updates>.header md-icon{color:#fff}#updates>.content{position:absolute;top:76px;bottom:0;right:0;left:0}#updates>.content .main{padding:16px 90px 0 4px;position:absolute;top:0;left:24px;right:0;bottom:0}#updates>.content .main .no-results{box-shadow:0 1px 1px 0 rgba(0,0,0,.14)}#realtime{height:auto}#realtime>.content .blink{animation:blinker 2s linear infinite}#realtime>.content .avatar-wrapper{position:relative}#realtime>.content .avatar-wrapper .status{position:absolute;bottom:-3px;right:5px}#realtime>.content .search-input-wrapper{position:relative;margin-left:20px}#realtime>.content .search-input-wrapper label{padding:6px;cursor:pointer}#realtime>.content .search-input-wrapper md-input-container{padding-top:20px}#realtime>.content .main .labels{padding:8px 16px}#realtime>.content .main .labels .label{margin:0 0 2px 4px;padding:2px 5px;font-size:11px;white-space:nowrap;border-radius:2px}#realtime>.content .main .status{position:absolute;bottom:-3px;right:5px}#realtime>.content .main .avatar-wrapper{position:relative}#realtime>.content .main .avatar-wrapper .status{position:absolute;bottom:-3px;right:5px}#realtime>.content .custom-column{padding:0 24px!important}@keyframes blinker{50%{opacity:0}}md-dialog.smsAccount-dialog{max-width:720px;width:720px}md-dialog.smsAccount-dialog md-dialog-content{display:block;position:relative}md-dialog.smsAccount-dialog md-toolbar .title{font-size:17px}md-dialog.smsAccount-dialog md-input-container textarea{min-height:150px}md-dialog.smsAccount-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.smsAccount-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.smsAccount-dialog .date-container{padding:16px 0 24px 0}md-dialog.smsAccount-dialog .error-list{font-size:13px}md-dialog.smsAccount-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.smsAccount-dialog .error-list .error .message{font-weight:500}md-dialog.smsAccount-dialog .error-list .error .md-button{margin:0}md-dialog.smsAccount-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.smsAccount-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.smsAccount-dialog{max-width:720px;width:720px}md-dialog.smsAccount-dialog md-dialog-content{display:block;position:relative}md-dialog.smsAccount-dialog md-toolbar .title{font-size:17px}md-dialog.smsAccount-dialog md-input-container textarea{min-height:150px}md-dialog.smsAccount-dialog .date-container{padding:16px 0 24px 0}md-dialog.smsAccount-dialog .error-list{font-size:13px}md-dialog.smsAccount-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.smsAccount-dialog .error-list .error .message{font-weight:500}md-dialog.smsAccount-dialog .error-list .error .md-button{margin:0}md-dialog.smsAccount-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.smsAccount-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.smsAccount-dialog{max-width:720px;width:720px}md-dialog.smsAccount-dialog md-dialog-content{display:block;position:relative}md-dialog.smsAccount-dialog md-toolbar .title{font-size:17px}md-dialog.smsAccount-dialog md-input-container textarea{min-height:150px}md-dialog.smsAccount-dialog .date-container{padding:16px 0 24px 0}md-dialog.smsAccount-dialog .error-list{font-size:13px}md-dialog.smsAccount-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.smsAccount-dialog .error-list .error .message{font-weight:500}md-dialog.smsAccount-dialog .error-list .error .md-button{margin:0}md-dialog.smsAccount-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.smsAccount-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.smsAccount-dialog{max-width:720px;width:720px}md-dialog.smsAccount-dialog md-dialog-content{display:block;position:relative}md-dialog.smsAccount-dialog md-toolbar .title{font-size:17px}md-dialog.smsAccount-dialog md-input-container textarea{min-height:150px}md-dialog.smsAccount-dialog .date-container{padding:16px 0 24px 0}md-dialog.smsAccount-dialog .error-list{font-size:13px}md-dialog.smsAccount-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.smsAccount-dialog .error-list .error .message{font-weight:500}md-dialog.smsAccount-dialog .error-list .error .md-button{margin:0}md-dialog.smsAccount-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.smsAccount-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.smsAccount-dialog{max-width:720px;width:720px}md-dialog.smsAccount-dialog md-dialog-content{display:block;position:relative}md-dialog.smsAccount-dialog md-toolbar .title{font-size:17px}md-dialog.smsAccount-dialog md-input-container textarea{min-height:150px}md-dialog.smsAccount-dialog .date-container{padding:16px 0 24px 0}md-dialog.smsAccount-dialog .error-list{font-size:13px}md-dialog.smsAccount-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.smsAccount-dialog .error-list .error .message{font-weight:500}md-dialog.smsAccount-dialog .error-list .error .md-button{margin:0}md-dialog.smsAccount-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.smsAccount-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.smsAccount-dialog{max-width:720px;width:720px}md-dialog.smsAccount-dialog md-dialog-content{display:block;position:relative}md-dialog.smsAccount-dialog md-toolbar .title{font-size:17px}md-dialog.smsAccount-dialog md-input-container textarea{min-height:150px}md-dialog.smsAccount-dialog .date-container{padding:16px 0 24px 0}md-dialog.smsAccount-dialog .error-list{font-size:13px}md-dialog.smsAccount-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.smsAccount-dialog .error-list .error .message{font-weight:500}md-dialog.smsAccount-dialog .error-list .error .md-button{margin:0}md-dialog.smsAccount-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.smsAccount-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.smsAccount-dialog{max-width:720px;width:720px}md-dialog.smsAccount-dialog md-dialog-content{display:block;position:relative}md-dialog.smsAccount-dialog md-toolbar .title{font-size:17px}md-dialog.smsAccount-dialog md-input-container textarea{min-height:150px}md-dialog.smsAccount-dialog .date-container{padding:16px 0 24px 0}md-dialog.smsAccount-dialog .error-list{font-size:13px}md-dialog.smsAccount-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.smsAccount-dialog .error-list .error .message{font-weight:500}md-dialog.smsAccount-dialog .error-list .error .md-button{margin:0}md-dialog.smsAccount-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.smsAccount-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.smsAccount-dialog{max-width:720px;width:720px}md-dialog.smsAccount-dialog md-dialog-content{display:block;position:relative}md-dialog.smsAccount-dialog md-toolbar .title{font-size:17px}md-dialog.smsAccount-dialog md-input-container textarea{min-height:150px}md-dialog.smsAccount-dialog .date-container{padding:16px 0 24px 0}md-dialog.smsAccount-dialog .error-list{font-size:13px}md-dialog.smsAccount-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.smsAccount-dialog .error-list .error .message{font-weight:500}md-dialog.smsAccount-dialog .error-list .error .md-button{margin:0}md-dialog.smsAccount-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.smsAccount-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.smsAccount-dialog{max-width:720px;width:720px}md-dialog.smsAccount-dialog md-dialog-content{display:block;position:relative}md-dialog.smsAccount-dialog md-toolbar .title{font-size:17px}md-dialog.smsAccount-dialog md-input-container textarea{min-height:150px}md-dialog.smsAccount-dialog .date-container{padding:16px 0 24px 0}md-dialog.smsAccount-dialog .error-list{font-size:13px}md-dialog.smsAccount-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.smsAccount-dialog .error-list .error .message{font-weight:500}md-dialog.smsAccount-dialog .error-list .error .md-button{margin:0}md-dialog.smsAccount-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.smsAccount-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.smsAccount-dialog{max-width:720px;width:720px}md-dialog.smsAccount-dialog md-dialog-content{display:block;position:relative}md-dialog.smsAccount-dialog md-toolbar .title{font-size:17px}md-dialog.smsAccount-dialog md-input-container textarea{min-height:150px}md-dialog.smsAccount-dialog .date-container{padding:16px 0 24px 0}md-dialog.smsAccount-dialog .error-list{font-size:13px}md-dialog.smsAccount-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.smsAccount-dialog .error-list .error .message{font-weight:500}md-dialog.smsAccount-dialog .error-list .error .md-button{margin:0}md-dialog.smsAccount-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.smsAccount-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.smsAccount-dialog{max-width:720px;width:720px}md-dialog.smsAccount-dialog md-dialog-content{display:block;position:relative}md-dialog.smsAccount-dialog md-toolbar .title{font-size:17px}md-dialog.smsAccount-dialog md-input-container textarea{min-height:150px}md-dialog.smsAccount-dialog .date-container{padding:16px 0 24px 0}md-dialog.smsAccount-dialog .error-list{font-size:13px}md-dialog.smsAccount-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.smsAccount-dialog .error-list .error .message{font-weight:500}md-dialog.smsAccount-dialog .error-list .error .md-button{margin:0}md-dialog.smsAccount-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.smsAccount-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.smsAccount-dialog{max-width:720px;width:720px}md-dialog.smsAccount-dialog md-dialog-content{display:block;position:relative}md-dialog.smsAccount-dialog md-toolbar .title{font-size:17px}md-dialog.smsAccount-dialog md-input-container textarea{min-height:150px}md-dialog.smsAccount-dialog .date-container{padding:16px 0 24px 0}md-dialog.smsAccount-dialog .error-list{font-size:13px}md-dialog.smsAccount-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.smsAccount-dialog .error-list .error .message{font-weight:500}md-dialog.smsAccount-dialog .error-list .error .md-button{margin:0}md-dialog.smsAccount-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.smsAccount-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.smsAccount-dialog{max-width:720px;width:720px}md-dialog.smsAccount-dialog md-dialog-content{display:block;position:relative}md-dialog.smsAccount-dialog md-toolbar .title{font-size:17px}md-dialog.smsAccount-dialog md-input-container textarea{min-height:150px}md-dialog.smsAccount-dialog .date-container{padding:16px 0 24px 0}md-dialog.smsAccount-dialog .error-list{font-size:13px}md-dialog.smsAccount-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.smsAccount-dialog .error-list .error .message{font-weight:500}md-dialog.smsAccount-dialog .error-list .error .md-button{margin:0}md-dialog.smsAccount-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.smsAccount-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.smsAccount-dialog{max-width:720px;width:720px}md-dialog.smsAccount-dialog md-dialog-content{display:block;position:relative}md-dialog.smsAccount-dialog md-toolbar .title{font-size:17px}md-dialog.smsAccount-dialog md-input-container textarea{min-height:150px}md-dialog.smsAccount-dialog .date-container{padding:16px 0 24px 0}md-dialog.smsAccount-dialog .error-list{font-size:13px}md-dialog.smsAccount-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.smsAccount-dialog .error-list .error .message{font-weight:500}md-dialog.smsAccount-dialog .error-list .error .md-button{margin:0}md-dialog.smsAccount-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.smsAccount-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.smsCannedAnswer-dialog{max-width:720px;width:720px}md-dialog.smsCannedAnswer-dialog md-dialog-content{display:block;position:relative}md-dialog.smsCannedAnswer-dialog md-toolbar .title{font-size:17px}md-dialog.smsCannedAnswer-dialog md-input-container textarea{min-height:150px}md-dialog.smsCannedAnswer-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.smsCannedAnswer-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.smsCannedAnswer-dialog .date-container{padding:16px 0 24px 0}md-dialog.smsCannedAnswer-dialog .error-list{font-size:13px}md-dialog.smsCannedAnswer-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.smsCannedAnswer-dialog .error-list .error .message{font-weight:500}md-dialog.smsCannedAnswer-dialog .error-list .error .md-button{margin:0}md-dialog.smsCannedAnswer-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.smsCannedAnswer-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}#sms-smsAccount .header{height:76px;min-height:76px;max-height:76px}#sms-smsAccount .header .goto-smsAccounts-button{margin-right:16px}#sms-smsAccount .header .smsAccount-image{overflow:hidden;width:56px;height:56px;margin-right:16px;border:3px solid rgba(0,0,0,.12)}#sms-smsAccount .header .smsAccount-image img{height:100%;width:auto;max-width:none}#sms-smsAccount .header .subtitle{margin:6px 0 0 0}#sms-smsAccount .smsAccount-detail-form-container{padding:24px;margin-bottom:24px}#sms-smsAccount .smsAccount-detail-form-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}#sms-smsAccount .smsAccount-detail-form-container .handle{cursor:move}#sms-smsAccount .smsAccount-detail-form-container md-input-container md-switch{margin:0!important}#sms-smsAccount .smsAccount-detail-form-container #smsAccount-image-uploader{position:relative}#sms-smsAccount .smsAccount-detail-form-container #smsAccount-image-uploader.dropping .drop-text{display:flex}#sms-smsAccount .smsAccount-detail-form-container #smsAccount-image-uploader .drop-text{display:none;position:absolute;top:0;right:0;bottom:0;left:0;padding:16px;text-align:center;border:2px dashed rgba(0,0,0,.12);background:#fff;font-size:20px;z-index:100}#sms-smsAccount .smsAccount-detail-form-container #smsAccount-image-uploader .upload-button{margin-bottom:16px}#sms-smsAccount .smsAccount-detail-form-container #smsAccount-image-uploader .smsAccount-image{position:relative;width:200px;height:200px;border:1px solid rgba(0,0,0,.12);margin:8px}#sms-smsAccount .smsAccount-detail-form-container #smsAccount-image-uploader .smsAccount-image.uploading .overlay{position:absolute;top:0;right:0;bottom:0;left:0;background:rgba(0,0,0,.87)}#sms-smsAccount .smsAccount-detail-form-container #smsAccount-image-uploader .smsAccount-image .media{max-height:100%}#sms-smsAccount md-table-container thead tr th:not(:first-child):not(.no-padding){padding:0 20px 0 0!important}#sms-smsAccount md-table-container thead th.md-checkbox-column:not(.no-padding){padding:0 24px!important}#sms-smsAccount md-table-container tbody tr td:not(:first-child):not(.no-padding):not(.actions-padding){padding:0 20px 0 0!important}#sms-smsAccount md-table-container.font-size-12 td.md-cell{font-size:12px!important}@media screen and (min-width:1921px){#sms-smsAccount .actionAppData{width:800px!important}}@media screen and (max-width:1920px){#sms-smsAccount .actionAppData{width:700px!important}}@media screen and (min-width:1751px) and (max-width:1919px){#sms-smsAccount .actionAppData{width:600px!important}}@media screen and (min-width:1601px) and (max-width:1750px){#sms-smsAccount .actionAppData{width:500px!important}}@media screen and (min-width:1537px) and (max-width:1600px){#sms-smsAccount .actionAppData{width:450px!important}}@media screen and (min-width:1281px) and (max-width:1536px){#sms-smsAccount .actionAppData{width:300px!important}}@media screen and (max-width:1280px){#sms-smsAccount .actionAppData{width:150px!important}}@media screen and (max-width:960px){#sms-smsAccount .actionAppData{width:80px!important}}#smsAccounts{position:relative}#smsAccounts>.header{height:76px;min-height:76px;max-height:76px}#smsAccounts>.header .logo .logo-icon{margin:0 16px 0 0}#smsAccounts>.header .logo .logo-text{font-size:24px}#smsAccounts>.header md-icon{color:#fff}#smsAccounts>.header .search-input-wrapper{position:relative}#smsAccounts>.header .search-input-wrapper label{padding-right:4px;cursor:pointer}#smsAccounts>.header .search-input-wrapper label md-icon{color:rgba(255,255,255,.8)}#smsAccounts>.header .search-input-wrapper md-input-container .md-errors-spacer{display:none}#smsAccounts>.header .search-input-wrapper md-input-container input{border-bottom:1px solid rgba(255,255,255,.8);color:rgba(255,255,255,.8);width:240px}#smsAccounts>.header .search-input-wrapper md-input-container input::placeholder{color:rgba(255,255,255,.8)}#smsAccounts>.header .search-input-wrapper md-input-container input:focus{border-bottom:1px solid #fff;color:#fff}#smsAccounts>.header.selected-bar{position:absolute;top:0;left:0;right:0;z-index:999;background-image:none;opacity:1!important}#smsAccounts>.header.selected-bar .close-button-wrapper{width:244px}#smsAccounts>.content{position:absolute;top:76px;bottom:0;right:0;left:0}#smsAccounts>.content .main{padding:16px 90px 0 4px;position:absolute;top:0;left:24px;right:0;bottom:0}#smsAccounts>.content .main .no-results{box-shadow:0 1px 1px 0 rgba(0,0,0,.14)}#smsAccounts #add-smsAccount-button{position:fixed;bottom:8px;right:8px;padding:0}#smsAccounts #upload-smsAccount-button{position:fixed;bottom:8px;right:8px;padding:0}md-dialog.smsQueue-dialog{max-width:720px;width:720px}md-dialog.smsQueue-dialog md-dialog-content{display:block;position:relative}md-dialog.smsQueue-dialog md-toolbar .title{font-size:17px}md-dialog.smsQueue-dialog md-input-container textarea{min-height:150px}md-dialog.smsQueue-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.smsQueue-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.smsQueue-dialog .date-container{padding:16px 0 24px 0}md-dialog.smsQueue-dialog .error-list{font-size:13px}md-dialog.smsQueue-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.smsQueue-dialog .error-list .error .message{font-weight:500}md-dialog.smsQueue-dialog .error-list .error .md-button{margin:0}md-dialog.smsQueue-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.smsQueue-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}#sms-smsQueue .header{height:76px;min-height:76px;max-height:76px}#sms-smsQueue .header .goto-smsQueues-button{margin-right:16px}#sms-smsQueue .header .smsQueue-image{overflow:hidden;width:56px;height:56px;margin-right:16px;border:3px solid rgba(0,0,0,.12)}#sms-smsQueue .header .smsQueue-image img{height:100%;width:auto;max-width:none}#sms-smsQueue .header .subtitle{margin:6px 0 0 0}#sms-smsQueue .smsQueue-detail-form-container{padding:24px;margin-bottom:24px}#sms-smsQueue .smsQueue-detail-form-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}#sms-smsQueue .smsQueue-detail-form-container .handle{cursor:move}#sms-smsQueue .smsQueue-detail-form-container md-input-container md-switch{margin:0!important}#sms-smsQueue .smsQueue-detail-form-container #smsQueue-image-uploader{position:relative}#sms-smsQueue .smsQueue-detail-form-container #smsQueue-image-uploader.dropping .drop-text{display:flex}#sms-smsQueue .smsQueue-detail-form-container #smsQueue-image-uploader .drop-text{display:none;position:absolute;top:0;right:0;bottom:0;left:0;padding:16px;text-align:center;border:2px dashed rgba(0,0,0,.12);background:#fff;font-size:20px;z-index:100}#sms-smsQueue .smsQueue-detail-form-container #smsQueue-image-uploader .upload-button{margin-bottom:16px}#sms-smsQueue .smsQueue-detail-form-container #smsQueue-image-uploader .smsQueue-image{position:relative;width:200px;height:200px;border:1px solid rgba(0,0,0,.12);margin:8px}#sms-smsQueue .smsQueue-detail-form-container #smsQueue-image-uploader .smsQueue-image.uploading .overlay{position:absolute;top:0;right:0;bottom:0;left:0;background:rgba(0,0,0,.87)}#sms-smsQueue .smsQueue-detail-form-container #smsQueue-image-uploader .smsQueue-image .media{max-height:100%}#sms-smsQueue md-table-container thead tr th:not(:first-child):not(.no-padding){padding:0 20px 0 0!important}#sms-smsQueue md-table-container thead th.md-checkbox-column:not(.no-padding){padding:0 24px!important}#sms-smsQueue md-table-container tbody tr td:not(:first-child):not(.no-padding):not(.actions-padding){padding:0 20px 0 0!important}#sms-smsQueue md-table-container.font-size-12 td.md-cell{font-size:12px!important}#smsQueues{position:relative}#smsQueues>.header{height:76px;min-height:76px;max-height:76px}#smsQueues>.header .logo .logo-icon{margin:0 16px 0 0}#smsQueues>.header .logo .logo-text{font-size:24px}#smsQueues>.header md-icon{color:#fff}#smsQueues>.header .search-input-wrapper{position:relative}#smsQueues>.header .search-input-wrapper label{padding-right:4px;cursor:pointer}#smsQueues>.header .search-input-wrapper label md-icon{color:rgba(255,255,255,.8)}#smsQueues>.header .search-input-wrapper md-input-container .md-errors-spacer{display:none}#smsQueues>.header .search-input-wrapper md-input-container input{border-bottom:1px solid rgba(255,255,255,.8);color:rgba(255,255,255,.8);width:240px}#smsQueues>.header .search-input-wrapper md-input-container input::placeholder{color:rgba(255,255,255,.8)}#smsQueues>.header .search-input-wrapper md-input-container input:focus{border-bottom:1px solid #fff;color:#fff}#smsQueues>.header.selected-bar{position:absolute;top:0;left:0;right:0;z-index:999;background-image:none;opacity:1!important}#smsQueues>.header.selected-bar .close-button-wrapper{width:244px}#smsQueues>.content{position:absolute;top:76px;bottom:0;right:0;left:0}#smsQueues>.content .main{padding:16px 90px 0 4px;position:absolute;top:0;left:24px;right:0;bottom:0}#smsQueues>.content .main .no-results{box-shadow:0 1px 1px 0 rgba(0,0,0,.14)}#smsQueues #add-smsQueue-button{position:fixed;bottom:8px;right:8px;padding:0}#smsQueues #upload-smsQueue-button{position:fixed;bottom:8px;right:8px;padding:0}#agents{position:relative}#agents>.header{height:76px;min-height:76px;max-height:76px}#agents>.header .logo .logo-icon{margin:0 16px 0 0}#agents>.header .logo .logo-text{font-size:24px}#agents>.header md-icon{color:#fff}#agents>.header .search-input-wrapper{position:relative}#agents>.header .search-input-wrapper label{padding-right:4px;cursor:pointer}#agents>.header .search-input-wrapper label md-icon{color:rgba(255,255,255,.8)}#agents>.header .search-input-wrapper md-input-container .md-errors-spacer{display:none}#agents>.header .search-input-wrapper md-input-container input{border-bottom:1px solid rgba(255,255,255,.8);color:rgba(255,255,255,.8);width:240px}#agents>.header .search-input-wrapper md-input-container input::placeholder{color:rgba(255,255,255,.8)}#agents>.header .search-input-wrapper md-input-container input:focus{border-bottom:1px solid #fff;color:#fff}#agents>.header.selected-bar{position:absolute;top:0;left:0;right:0;z-index:999;background-image:none;opacity:1!important}#agents>.header.selected-bar .close-button-wrapper{width:244px}#agents>.content{position:absolute;top:76px;bottom:0;right:0;left:0}#agents>.content .main{padding:16px 90px 0 4px;position:absolute;top:0;left:24px;right:0;bottom:0}#agents>.content .main .no-results{box-shadow:0 1px 1px 0 rgba(0,0,0,.14)}#agents #add-agent-button{position:fixed;bottom:8px;right:8px;padding:0}#agents #upload-agent-button{position:fixed;bottom:8px;right:8px;padding:0}md-dialog.agent-dialog{max-width:720px;width:720px}md-dialog.agent-dialog md-dialog-content{display:block;position:relative}md-dialog.agent-dialog md-toolbar .title{font-size:17px}md-dialog.agent-dialog md-input-container textarea{min-height:150px}md-dialog.agent-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.agent-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.agent-dialog .date-container{padding:16px 0 24px 0}md-dialog.agent-dialog .error-list{font-size:13px}md-dialog.agent-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.agent-dialog .error-list .error .message{font-weight:500}md-dialog.agent-dialog .error-list .error .md-button{margin:0}md-dialog.agent-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.agent-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}#staff-agent .header{height:76px;min-height:76px;max-height:76px}#staff-agent .header .goto-agents-button{margin-right:16px}#staff-agent .header .agent-image{overflow:hidden;width:56px;height:56px;margin-right:16px;border:3px solid rgba(0,0,0,.12)}#staff-agent .header .agent-image img{height:100%;width:auto;max-width:none}#staff-agent .header .subtitle{margin:6px 0 0 0}#staff-agent .agent-detail-form-container{padding:24px;margin-bottom:24px}#staff-agent .agent-detail-form-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}#staff-agent .agent-detail-form-container .handle{cursor:move}#staff-agent .agent-detail-form-container md-input-container md-switch{margin:0!important}#staff-agent .agent-detail-form-container #agent-image-uploader{position:relative}#staff-agent .agent-detail-form-container #agent-image-uploader.dropping .drop-text{display:flex}#staff-agent .agent-detail-form-container #agent-image-uploader .drop-text{display:none;position:absolute;top:0;right:0;bottom:0;left:0;padding:16px;text-align:center;border:2px dashed rgba(0,0,0,.12);background:#fff;font-size:20px;z-index:100}#staff-agent .agent-detail-form-container #agent-image-uploader .upload-button{margin-bottom:16px}#staff-agent .agent-detail-form-container #agent-image-uploader .agent-image{position:relative;width:200px;height:200px;border:1px solid rgba(0,0,0,.12);margin:8px}#staff-agent .agent-detail-form-container #agent-image-uploader .agent-image.uploading .overlay{position:absolute;top:0;right:0;bottom:0;left:0;background:rgba(0,0,0,.87)}#staff-agent .agent-detail-form-container #agent-image-uploader .agent-image .media{max-height:100%}#staff-agent md-table-container thead tr th:not(:first-child):not(.no-padding){padding:0 20px 0 0!important}#staff-agent md-table-container thead th.md-checkbox-column:not(.no-padding){padding:0 24px!important}#staff-agent md-table-container tbody tr td:not(:first-child):not(.no-padding):not(.actions-padding){padding:0 20px 0 0!important}#staff-agent md-table-container.font-size-12 td.md-cell{font-size:12px!important}md-dialog.team-dialog{max-width:720px;width:720px}md-dialog.team-dialog md-dialog-content{display:block;position:relative}md-dialog.team-dialog md-toolbar .title{font-size:17px}md-dialog.team-dialog md-input-container textarea{min-height:150px}md-dialog.team-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.team-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.team-dialog .date-container{padding:16px 0 24px 0}md-dialog.team-dialog .error-list{font-size:13px}md-dialog.team-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.team-dialog .error-list .error .message{font-weight:500}md-dialog.team-dialog .error-list .error .md-button{margin:0}md-dialog.team-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.team-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}#teams{position:relative}#teams>.header{height:76px;min-height:76px;max-height:76px}#teams>.header .logo .logo-icon{margin:0 16px 0 0}#teams>.header .logo .logo-text{font-size:24px}#teams>.header md-icon{color:#fff}#teams>.header .search-input-wrapper{position:relative}#teams>.header .search-input-wrapper label{padding-right:4px;cursor:pointer}#teams>.header .search-input-wrapper label md-icon{color:rgba(255,255,255,.8)}#teams>.header .search-input-wrapper md-input-container .md-errors-spacer{display:none}#teams>.header .search-input-wrapper md-input-container input{border-bottom:1px solid rgba(255,255,255,.8);color:rgba(255,255,255,.8);width:240px}#teams>.header .search-input-wrapper md-input-container input::placeholder{color:rgba(255,255,255,.8)}#teams>.header .search-input-wrapper md-input-container input:focus{border-bottom:1px solid #fff;color:#fff}#teams>.header.selected-bar{position:absolute;top:0;left:0;right:0;z-index:999;background-image:none;opacity:1!important}#teams>.header.selected-bar .close-button-wrapper{width:244px}#teams>.content{position:absolute;top:76px;bottom:0;right:0;left:0}#teams>.content .main{padding:16px 90px 0 4px;position:absolute;top:0;left:24px;right:0;bottom:0}#teams>.content .main .no-results{box-shadow:0 1px 1px 0 rgba(0,0,0,.14)}#teams #add-team-button{position:fixed;bottom:8px;right:8px;padding:0}#teams #upload-team-button{position:fixed;bottom:8px;right:8px;padding:0}md-dialog.telephone-dialog{max-width:720px;width:720px}md-dialog.telephone-dialog md-dialog-content{display:block;position:relative}md-dialog.telephone-dialog md-toolbar .title{font-size:17px}md-dialog.telephone-dialog md-input-container textarea{min-height:150px}md-dialog.telephone-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.telephone-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.telephone-dialog .date-container{padding:16px 0 24px 0}md-dialog.telephone-dialog .error-list{font-size:13px}md-dialog.telephone-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.telephone-dialog .error-list .error .message{font-weight:500}md-dialog.telephone-dialog .error-list .error .md-button{margin:0}md-dialog.telephone-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.telephone-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}#staff-telephone .header{height:76px;min-height:76px;max-height:76px}#staff-telephone .header .goto-telephones-button{margin-right:16px}#staff-telephone .header .telephone-image{overflow:hidden;width:56px;height:56px;margin-right:16px;border:3px solid rgba(0,0,0,.12)}#staff-telephone .header .telephone-image img{height:100%;width:auto;max-width:none}#staff-telephone .header .subtitle{margin:6px 0 0 0}#staff-telephone .telephone-detail-form-container{padding:24px;margin-bottom:24px}#staff-telephone .telephone-detail-form-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}#staff-telephone .telephone-detail-form-container .handle{cursor:move}#staff-telephone .telephone-detail-form-container md-input-container md-switch{margin:0!important}#staff-telephone .telephone-detail-form-container #telephone-image-uploader{position:relative}#staff-telephone .telephone-detail-form-container #telephone-image-uploader.dropping .drop-text{display:flex}#staff-telephone .telephone-detail-form-container #telephone-image-uploader .drop-text{display:none;position:absolute;top:0;right:0;bottom:0;left:0;padding:16px;text-align:center;border:2px dashed rgba(0,0,0,.12);background:#fff;font-size:20px;z-index:100}#staff-telephone .telephone-detail-form-container #telephone-image-uploader .upload-button{margin-bottom:16px}#staff-telephone .telephone-detail-form-container #telephone-image-uploader .telephone-image{position:relative;width:200px;height:200px;border:1px solid rgba(0,0,0,.12);margin:8px}#staff-telephone .telephone-detail-form-container #telephone-image-uploader .telephone-image.uploading .overlay{position:absolute;top:0;right:0;bottom:0;left:0;background:rgba(0,0,0,.87)}#staff-telephone .telephone-detail-form-container #telephone-image-uploader .telephone-image .media{max-height:100%}#staff-telephone md-table-container thead tr th:not(:first-child):not(.no-padding){padding:0 20px 0 0!important}#staff-telephone md-table-container thead th.md-checkbox-column:not(.no-padding){padding:0 24px!important}#staff-telephone md-table-container tbody tr td:not(:first-child):not(.no-padding):not(.actions-padding){padding:0 20px 0 0!important}#staff-telephone md-table-container.font-size-12 td.md-cell{font-size:12px!important}#telephones{position:relative}#telephones>.header{height:76px;min-height:76px;max-height:76px}#telephones>.header .logo .logo-icon{margin:0 16px 0 0}#telephones>.header .logo .logo-text{font-size:24px}#telephones>.header md-icon{color:#fff}#telephones>.header .search-input-wrapper{position:relative}#telephones>.header .search-input-wrapper label{padding-right:4px;cursor:pointer}#telephones>.header .search-input-wrapper label md-icon{color:rgba(255,255,255,.8)}#telephones>.header .search-input-wrapper md-input-container .md-errors-spacer{display:none}#telephones>.header .search-input-wrapper md-input-container input{border-bottom:1px solid rgba(255,255,255,.8);color:rgba(255,255,255,.8);width:240px}#telephones>.header .search-input-wrapper md-input-container input::placeholder{color:rgba(255,255,255,.8)}#telephones>.header .search-input-wrapper md-input-container input:focus{border-bottom:1px solid #fff;color:#fff}#telephones>.header.selected-bar{position:absolute;top:0;left:0;right:0;z-index:999;background-image:none;opacity:1!important}#telephones>.header.selected-bar .close-button-wrapper{width:244px}#telephones>.content{position:absolute;top:76px;bottom:0;right:0;left:0}#telephones>.content .main{padding:16px 90px 0 4px;position:absolute;top:0;left:24px;right:0;bottom:0}#telephones>.content .main .no-results{box-shadow:0 1px 1px 0 rgba(0,0,0,.14)}#telephones #add-telephone-button{position:fixed;bottom:8px;right:8px;padding:0}#telephones #upload-telephone-button{position:fixed;bottom:8px;right:8px;padding:0}md-dialog.userProfile-dialog{max-width:720px;width:720px}md-dialog.userProfile-dialog md-dialog-content{display:block;position:relative}md-dialog.userProfile-dialog md-toolbar .title{font-size:17px}md-dialog.userProfile-dialog md-input-container textarea{min-height:150px}md-dialog.userProfile-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.userProfile-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.userProfile-dialog .date-container{padding:16px 0 24px 0}md-dialog.userProfile-dialog .error-list{font-size:13px}md-dialog.userProfile-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.userProfile-dialog .error-list .error .message{font-weight:500}md-dialog.userProfile-dialog .error-list .error .md-button{margin:0}md-dialog.userProfile-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.userProfile-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}#staff-userProfile .header{height:76px;min-height:76px;max-height:76px}#staff-userProfile .header .goto-userProfiles-button{margin-right:16px}#staff-userProfile .header .userProfile-image{overflow:hidden;width:56px;height:56px;margin-right:16px;border:3px solid rgba(0,0,0,.12)}#staff-userProfile .header .userProfile-image img{height:100%;width:auto;max-width:none}#staff-userProfile .header .subtitle{margin:6px 0 0 0}#staff-userProfile .userProfile-detail-form-container{padding:24px;margin-bottom:24px}#staff-userProfile .userProfile-detail-form-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}#staff-userProfile .userProfile-detail-form-container .handle{cursor:move}#staff-userProfile .userProfile-detail-form-container md-input-container md-switch{margin:0!important}#staff-userProfile .userProfile-detail-form-container #userProfile-image-uploader{position:relative}#staff-userProfile .userProfile-detail-form-container #userProfile-image-uploader.dropping .drop-text{display:flex}#staff-userProfile .userProfile-detail-form-container #userProfile-image-uploader .drop-text{display:none;position:absolute;top:0;right:0;bottom:0;left:0;padding:16px;text-align:center;border:2px dashed rgba(0,0,0,.12);background:#fff;font-size:20px;z-index:100}#staff-userProfile .userProfile-detail-form-container #userProfile-image-uploader .upload-button{margin-bottom:16px}#staff-userProfile .userProfile-detail-form-container #userProfile-image-uploader .userProfile-image{position:relative;width:200px;height:200px;border:1px solid rgba(0,0,0,.12);margin:8px}#staff-userProfile .userProfile-detail-form-container #userProfile-image-uploader .userProfile-image.uploading .overlay{position:absolute;top:0;right:0;bottom:0;left:0;background:rgba(0,0,0,.87)}#staff-userProfile .userProfile-detail-form-container #userProfile-image-uploader .userProfile-image .media{max-height:100%}#staff-userProfile md-table-container thead tr th:not(:first-child):not(.no-padding){padding:0 20px 0 0!important}#staff-userProfile md-table-container thead th.md-checkbox-column:not(.no-padding){padding:0 24px!important}#staff-userProfile md-table-container tbody tr td:not(:first-child):not(.no-padding):not(.actions-padding){padding:0 20px 0 0!important}#staff-userProfile md-table-container.font-size-12 td.md-cell{font-size:12px!important}#userProfiles{position:relative}#userProfiles>.header{height:76px;min-height:76px;max-height:76px}#userProfiles>.header .logo .logo-icon{margin:0 16px 0 0}#userProfiles>.header .logo .logo-text{font-size:24px}#userProfiles>.header md-icon{color:#fff}#userProfiles>.header .search-input-wrapper{position:relative}#userProfiles>.header .search-input-wrapper label{padding-right:4px;cursor:pointer}#userProfiles>.header .search-input-wrapper label md-icon{color:rgba(255,255,255,.8)}#userProfiles>.header .search-input-wrapper md-input-container .md-errors-spacer{display:none}#userProfiles>.header .search-input-wrapper md-input-container input{border-bottom:1px solid rgba(255,255,255,.8);color:rgba(255,255,255,.8);width:240px}#userProfiles>.header .search-input-wrapper md-input-container input::placeholder{color:rgba(255,255,255,.8)}#userProfiles>.header .search-input-wrapper md-input-container input:focus{border-bottom:1px solid #fff;color:#fff}#userProfiles>.header.selected-bar{position:absolute;top:0;left:0;right:0;z-index:999;background-image:none;opacity:1!important}#userProfiles>.header.selected-bar .close-button-wrapper{width:244px}#userProfiles>.content{position:absolute;top:76px;bottom:0;right:0;left:0}#userProfiles>.content .main{padding:16px 90px 0 4px;position:absolute;top:0;left:24px;right:0;bottom:0}#userProfiles>.content .main .no-results{box-shadow:0 1px 1px 0 rgba(0,0,0,.14)}#userProfiles #add-userProfile-button{position:fixed;bottom:8px;right:8px;padding:0}#userProfiles #upload-userProfile-button{position:fixed;bottom:8px;right:8px;padding:0}md-dialog.user-dialog{max-width:720px;width:720px}md-dialog.user-dialog md-dialog-content{display:block;position:relative}md-dialog.user-dialog md-toolbar .title{font-size:17px}md-dialog.user-dialog md-input-container textarea{min-height:150px}md-dialog.user-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.user-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.user-dialog .date-container{padding:16px 0 24px 0}md-dialog.user-dialog .error-list{font-size:13px}md-dialog.user-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.user-dialog .error-list .error .message{font-weight:500}md-dialog.user-dialog .error-list .error .md-button{margin:0}md-dialog.user-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.user-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}#staff-user .header{height:76px;min-height:76px;max-height:76px}#staff-user .header .goto-users-button{margin-right:16px}#staff-user .header .user-image{overflow:hidden;width:56px;height:56px;margin-right:16px;border:3px solid rgba(0,0,0,.12)}#staff-user .header .user-image img{height:100%;width:auto;max-width:none}#staff-user .header .subtitle{margin:6px 0 0 0}#staff-user .user-detail-form-container{padding:24px;margin-bottom:24px}#staff-user .user-detail-form-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}#staff-user .user-detail-form-container .handle{cursor:move}#staff-user .user-detail-form-container md-input-container md-switch{margin:0!important}#staff-user .user-detail-form-container #user-image-uploader{position:relative}#staff-user .user-detail-form-container #user-image-uploader.dropping .drop-text{display:flex}#staff-user .user-detail-form-container #user-image-uploader .drop-text{display:none;position:absolute;top:0;right:0;bottom:0;left:0;padding:16px;text-align:center;border:2px dashed rgba(0,0,0,.12);background:#fff;font-size:20px;z-index:100}#staff-user .user-detail-form-container #user-image-uploader .upload-button{margin-bottom:16px}#staff-user .user-detail-form-container #user-image-uploader .user-image{position:relative;width:200px;height:200px;border:1px solid rgba(0,0,0,.12);margin:8px}#staff-user .user-detail-form-container #user-image-uploader .user-image.uploading .overlay{position:absolute;top:0;right:0;bottom:0;left:0;background:rgba(0,0,0,.87)}#staff-user .user-detail-form-container #user-image-uploader .user-image .media{max-height:100%}#staff-user md-table-container thead tr th:not(:first-child):not(.no-padding){padding:0 20px 0 0!important}#staff-user md-table-container thead th.md-checkbox-column:not(.no-padding){padding:0 24px!important}#staff-user md-table-container tbody tr td:not(:first-child):not(.no-padding):not(.actions-padding){padding:0 20px 0 0!important}#staff-user md-table-container.font-size-12 td.md-cell{font-size:12px!important}#users{position:relative}#users>.header{height:76px;min-height:76px;max-height:76px}#users>.header .logo .logo-icon{margin:0 16px 0 0}#users>.header .logo .logo-text{font-size:24px}#users>.header md-icon{color:#fff}#users>.header .search-input-wrapper{position:relative}#users>.header .search-input-wrapper label{padding-right:4px;cursor:pointer}#users>.header .search-input-wrapper label md-icon{color:rgba(255,255,255,.8)}#users>.header .search-input-wrapper md-input-container .md-errors-spacer{display:none}#users>.header .search-input-wrapper md-input-container input{border-bottom:1px solid rgba(255,255,255,.8);color:rgba(255,255,255,.8);width:240px}#users>.header .search-input-wrapper md-input-container input::placeholder{color:rgba(255,255,255,.8)}#users>.header .search-input-wrapper md-input-container input:focus{border-bottom:1px solid #fff;color:#fff}#users>.header.selected-bar{position:absolute;top:0;left:0;right:0;z-index:999;background-image:none;opacity:1!important}#users>.header.selected-bar .close-button-wrapper{width:244px}#users>.content{position:absolute;top:76px;bottom:0;right:0;left:0}#users>.content .main{padding:16px 90px 0 4px;position:absolute;top:0;left:24px;right:0;bottom:0}#users>.content .main .no-results{box-shadow:0 1px 1px 0 rgba(0,0,0,.14)}#users #add-user-button{position:fixed;bottom:8px;right:8px;padding:0}#users #upload-user-button{position:fixed;bottom:8px;right:8px;padding:0}#cannedAnswers{position:relative}#cannedAnswers>.header{height:76px;min-height:76px;max-height:76px}#cannedAnswers>.header .logo .logo-icon{margin:0 16px 0 0}#cannedAnswers>.header .logo .logo-text{font-size:24px}#cannedAnswers>.header md-icon{color:#fff}#cannedAnswers>.header .search-input-wrapper{position:relative}#cannedAnswers>.header .search-input-wrapper label{padding-right:4px;cursor:pointer}#cannedAnswers>.header .search-input-wrapper label md-icon{color:rgba(255,255,255,.8)}#cannedAnswers>.header .search-input-wrapper md-input-container .md-errors-spacer{display:none}#cannedAnswers>.header .search-input-wrapper md-input-container input{border-bottom:1px solid rgba(255,255,255,.8);color:rgba(255,255,255,.8);width:240px}#cannedAnswers>.header .search-input-wrapper md-input-container input::placeholder{color:rgba(255,255,255,.8)}#cannedAnswers>.header .search-input-wrapper md-input-container input:focus{border-bottom:1px solid #fff;color:#fff}#cannedAnswers>.header.selected-bar{position:absolute;top:0;left:0;right:0;z-index:999;background-image:none;opacity:1!important}#cannedAnswers>.header.selected-bar .close-button-wrapper{width:244px}#cannedAnswers>.content{position:absolute;top:76px;bottom:0;right:0;left:0}#cannedAnswers>.content .main{padding:16px 90px 0 4px;position:absolute;top:0;left:24px;right:0;bottom:0}#cannedAnswers>.content .main .no-results{box-shadow:0 1px 1px 0 rgba(0,0,0,.14)}#cannedAnswers #add-cannedAnswer-button{position:fixed;bottom:8px;right:8px;padding:0}#cannedAnswers #upload-cannedAnswer-button{position:fixed;bottom:8px;right:8px;padding:0}md-dialog.cannedAnswer-dialog{max-width:720px;width:720px}md-dialog.cannedAnswer-dialog md-dialog-content{display:block;position:relative}md-dialog.cannedAnswer-dialog md-toolbar .title{font-size:17px}md-dialog.cannedAnswer-dialog md-input-container textarea{min-height:150px}md-dialog.cannedAnswer-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.cannedAnswer-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.cannedAnswer-dialog .date-container{padding:16px 0 24px 0}md-dialog.cannedAnswer-dialog .error-list{font-size:13px}md-dialog.cannedAnswer-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.cannedAnswer-dialog .error-list .error .message{font-weight:500}md-dialog.cannedAnswer-dialog .error-list .error .md-button{margin:0}md-dialog.cannedAnswer-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.cannedAnswer-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}#contact_item_types{position:relative}#contact_item_types>.header{height:76px;min-height:76px;max-height:76px}#contact_item_types>.header .logo .logo-icon{margin:0 16px 0 0}#contact_item_types>.header .logo .logo-text{font-size:24px}#contact_item_types>.header md-icon{color:#fff}#contact_item_types>.header .search-input-wrapper{position:relative}#contact_item_types>.header .search-input-wrapper label{padding-right:4px;cursor:pointer}#contact_item_types>.header .search-input-wrapper label md-icon{color:rgba(255,255,255,.8)}#contact_item_types>.header .search-input-wrapper md-input-container .md-errors-spacer{display:none}#contact_item_types>.header .search-input-wrapper md-input-container input{border-bottom:1px solid rgba(255,255,255,.8);color:rgba(255,255,255,.8);width:240px}#contact_item_types>.header .search-input-wrapper md-input-container input::placeholder{color:rgba(255,255,255,.8)}#contact_item_types>.header .search-input-wrapper md-input-container input:focus{border-bottom:1px solid #fff;color:#fff}#contact_item_types>.header.selected-bar{position:absolute;top:0;left:0;right:0;z-index:999;background-image:none;opacity:1!important}#contact_item_types>.header.selected-bar .close-button-wrapper{width:244px}#contact_item_types>.content{position:absolute;top:76px;bottom:0;right:0;left:0}#contact_item_types>.content .main{padding:16px 90px 0 4px;position:absolute;top:0;left:24px;right:0;bottom:0}#contact_item_types>.content .main .no-results{box-shadow:0 1px 1px 0 rgba(0,0,0,.14)}#contact_item_types #add-contactItemType-button{position:fixed;bottom:8px;right:8px;padding:0}#contact_item_types #upload-contactItemType-button{position:fixed;bottom:8px;right:8px;padding:0}md-dialog.contactItemType-dialog{max-width:720px;width:720px}md-dialog.contactItemType-dialog md-dialog-content{display:block;position:relative}md-dialog.contactItemType-dialog md-toolbar .title{font-size:17px}md-dialog.contactItemType-dialog md-input-container textarea{min-height:150px}md-dialog.contactItemType-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.contactItemType-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.contactItemType-dialog .date-container{padding:16px 0 24px 0}md-dialog.contactItemType-dialog .error-list{font-size:13px}md-dialog.contactItemType-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.contactItemType-dialog .error-list .error .message{font-weight:500}md-dialog.contactItemType-dialog .error-list .error .md-button{margin:0}md-dialog.contactItemType-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.contactItemType-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.customDashboard-dialog{max-width:720px;width:720px}md-dialog.customDashboard-dialog md-dialog-content{display:block;position:relative}md-dialog.customDashboard-dialog md-toolbar .title{font-size:17px}md-dialog.customDashboard-dialog md-input-container textarea{min-height:150px}md-dialog.customDashboard-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.customDashboard-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.customDashboard-dialog .date-container{padding:16px 0 24px 0}md-dialog.customDashboard-dialog .error-list{font-size:13px}md-dialog.customDashboard-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.customDashboard-dialog .error-list .error .message{font-weight:500}md-dialog.customDashboard-dialog .error-list .error .md-button{margin:0}md-dialog.customDashboard-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.customDashboard-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}#customDashboards{position:relative}#customDashboards>.header{height:76px;min-height:76px;max-height:76px}#customDashboards>.header .logo .logo-icon{margin:0 16px 0 0}#customDashboards>.header .logo .logo-text{font-size:24px}#customDashboards>.header md-icon{color:#fff}#customDashboards>.header .search-input-wrapper{position:relative}#customDashboards>.header .search-input-wrapper label{padding-right:4px;cursor:pointer}#customDashboards>.header .search-input-wrapper label md-icon{color:rgba(255,255,255,.8)}#customDashboards>.header .search-input-wrapper md-input-container .md-errors-spacer{display:none}#customDashboards>.header .search-input-wrapper md-input-container input{border-bottom:1px solid rgba(255,255,255,.8);color:rgba(255,255,255,.8);width:240px}#customDashboards>.header .search-input-wrapper md-input-container input::placeholder{color:rgba(255,255,255,.8)}#customDashboards>.header .search-input-wrapper md-input-container input:focus{border-bottom:1px solid #fff;color:#fff}#customDashboards>.header.selected-bar{position:absolute;top:0;left:0;right:0;z-index:999;background-image:none;opacity:1!important}#customDashboards>.header.selected-bar .close-button-wrapper{width:244px}#customDashboards>.content{position:absolute;top:76px;bottom:0;right:0;left:0}#customDashboards>.content .main{padding:16px 90px 0 4px;position:absolute;top:0;left:24px;right:0;bottom:0}#customDashboards>.content .main .no-results{box-shadow:0 1px 1px 0 rgba(0,0,0,.14)}#customDashboards #add-customDashboard-button{position:fixed;bottom:8px;right:8px;padding:0}#customDashboards #upload-customDashboard-button{position:fixed;bottom:8px;right:8px;padding:0}md-dialog.dashboarditem-dialog{max-width:720px;width:720px}md-dialog.dashboarditem-dialog md-dialog-content{display:block;position:relative}md-dialog.dashboarditem-dialog md-toolbar .title{font-size:17px}md-dialog.dashboarditem-dialog md-input-container textarea{min-height:150px}md-dialog.dashboarditem-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.dashboarditem-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.dashboarditem-dialog .date-container{padding:16px 0 24px 0}md-dialog.dashboarditem-dialog .error-list{font-size:13px}md-dialog.dashboarditem-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.dashboarditem-dialog .error-list .error .message{font-weight:500}md-dialog.dashboarditem-dialog .error-list .error .md-button{margin:0}md-dialog.dashboarditem-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.dashboarditem-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}#tools-customDashboard .header{height:76px;min-height:76px;max-height:76px}#tools-customDashboard .header .goto-customDashboards-button{margin-right:16px}#tools-customDashboard .header .customDashboard-image{overflow:hidden;width:56px;height:56px;margin-right:16px;border:3px solid rgba(0,0,0,.12)}#tools-customDashboard .header .customDashboard-image img{height:100%;width:auto;max-width:none}#tools-customDashboard .header .subtitle{margin:6px 0 0 0}#tools-customDashboard .customDashboard-detail-form-container{padding:24px;margin-bottom:24px}#tools-customDashboard .customDashboard-detail-form-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}#tools-customDashboard .customDashboard-detail-form-container .handle{cursor:move}#tools-customDashboard .customDashboard-detail-form-container md-input-container md-switch{margin:0!important}#tools-customDashboard .customDashboard-detail-form-container #customDashboard-image-uploader{position:relative}#tools-customDashboard .customDashboard-detail-form-container #customDashboard-image-uploader.dropping .drop-text{display:flex}#tools-customDashboard .customDashboard-detail-form-container #customDashboard-image-uploader .drop-text{display:none;position:absolute;top:0;right:0;bottom:0;left:0;padding:16px;text-align:center;border:2px dashed rgba(0,0,0,.12);background:#fff;font-size:20px;z-index:100}#tools-customDashboard .customDashboard-detail-form-container #customDashboard-image-uploader .upload-button{margin-bottom:16px}#tools-customDashboard .customDashboard-detail-form-container #customDashboard-image-uploader .customDashboard-image{position:relative;width:200px;height:200px;border:1px solid rgba(0,0,0,.12);margin:8px}#tools-customDashboard .customDashboard-detail-form-container #customDashboard-image-uploader .customDashboard-image.uploading .overlay{position:absolute;top:0;right:0;bottom:0;left:0;background:rgba(0,0,0,.87)}#tools-customDashboard .customDashboard-detail-form-container #customDashboard-image-uploader .customDashboard-image .media{max-height:100%}#tools-customDashboard md-table-container thead tr th:not(:first-child):not(.no-padding){padding:0 20px 0 0!important}#tools-customDashboard md-table-container thead th.md-checkbox-column:not(.no-padding){padding:0 24px!important}#tools-customDashboard md-table-container tbody tr td:not(:first-child):not(.no-padding):not(.actions-padding){padding:0 20px 0 0!important}#tools-customDashboard md-table-container.font-size-12 td.md-cell{font-size:12px!important}md-dialog.disposition-dialog{max-width:720px;width:720px}md-dialog.disposition-dialog md-dialog-content{display:block;position:relative}md-dialog.disposition-dialog md-toolbar .title{font-size:17px}md-dialog.disposition-dialog md-input-container textarea{min-height:150px}md-dialog.disposition-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.disposition-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.disposition-dialog .date-container{padding:16px 0 24px 0}md-dialog.disposition-dialog .error-list{font-size:13px}md-dialog.disposition-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.disposition-dialog .error-list .error .message{font-weight:500}md-dialog.disposition-dialog .error-list .error .md-button{margin:0}md-dialog.disposition-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.disposition-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}#dispositions{position:relative}#dispositions>.header{height:76px;min-height:76px;max-height:76px}#dispositions>.header .logo .logo-icon{margin:0 16px 0 0}#dispositions>.header .logo .logo-text{font-size:24px}#dispositions>.header md-icon{color:#fff}#dispositions>.header .search-input-wrapper{position:relative}#dispositions>.header .search-input-wrapper label{padding-right:4px;cursor:pointer}#dispositions>.header .search-input-wrapper label md-icon{color:rgba(255,255,255,.8)}#dispositions>.header .search-input-wrapper md-input-container .md-errors-spacer{display:none}#dispositions>.header .search-input-wrapper md-input-container input{border-bottom:1px solid rgba(255,255,255,.8);color:rgba(255,255,255,.8);width:240px}#dispositions>.header .search-input-wrapper md-input-container input::placeholder{color:rgba(255,255,255,.8)}#dispositions>.header .search-input-wrapper md-input-container input:focus{border-bottom:1px solid #fff;color:#fff}#dispositions>.header.selected-bar{position:absolute;top:0;left:0;right:0;z-index:999;background-image:none;opacity:1!important}#dispositions>.header.selected-bar .close-button-wrapper{width:244px}#dispositions>.content{position:absolute;top:76px;bottom:0;right:0;left:0}#dispositions>.content .main{padding:16px 90px 0 4px;position:absolute;top:0;left:24px;right:0;bottom:0}#dispositions>.content .main .no-results{box-shadow:0 1px 1px 0 rgba(0,0,0,.14)}#dispositions #add-disposition-button{position:fixed;bottom:8px;right:8px;padding:0}#dispositions #upload-disposition-button{position:fixed;bottom:8px;right:8px;padding:0}md-dialog.interval-dialog{max-width:720px;width:720px}md-dialog.interval-dialog md-dialog-content{display:block;position:relative}md-dialog.interval-dialog md-toolbar .title{font-size:17px}md-dialog.interval-dialog md-input-container textarea{min-height:150px}md-dialog.interval-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.interval-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.interval-dialog .date-container{padding:16px 0 24px 0}md-dialog.interval-dialog .error-list{font-size:13px}md-dialog.interval-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.interval-dialog .error-list .error .message{font-weight:500}md-dialog.interval-dialog .error-list .error .md-button{margin:0}md-dialog.interval-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.interval-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.interval-dialog{max-width:720px;width:720px}md-dialog.interval-dialog md-dialog-content{display:block;position:relative}md-dialog.interval-dialog md-toolbar .title{font-size:17px}md-dialog.interval-dialog md-input-container textarea{min-height:150px}md-dialog.interval-dialog .date-container{padding:16px 0 24px 0}md-dialog.interval-dialog .error-list{font-size:13px}md-dialog.interval-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.interval-dialog .error-list .error .message{font-weight:500}md-dialog.interval-dialog .error-list .error .md-button{margin:0}md-dialog.interval-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.interval-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.interval-dialog{max-width:720px;width:720px}md-dialog.interval-dialog md-dialog-content{display:block;position:relative}md-dialog.interval-dialog md-toolbar .title{font-size:17px}md-dialog.interval-dialog md-input-container textarea{min-height:150px}md-dialog.interval-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.interval-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.interval-dialog .date-container{padding:16px 0 24px 0}md-dialog.interval-dialog .error-list{font-size:13px}md-dialog.interval-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.interval-dialog .error-list .error .message{font-weight:500}md-dialog.interval-dialog .error-list .error .md-button{margin:0}md-dialog.interval-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.interval-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}#tools-interval .header{height:76px;min-height:76px;max-height:76px}#tools-interval .header .goto-intervals-button{margin-right:16px}#tools-interval .header .interval-image{overflow:hidden;width:56px;height:56px;margin-right:16px;border:3px solid rgba(0,0,0,.12)}#tools-interval .header .interval-image img{height:100%;width:auto;max-width:none}#tools-interval .header .subtitle{margin:6px 0 0 0}#tools-interval .interval-detail-form-container{padding:24px;margin-bottom:24px}#tools-interval .interval-detail-form-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}#tools-interval .interval-detail-form-container .handle{cursor:move}#tools-interval .interval-detail-form-container md-input-container md-switch{margin:0!important}#tools-interval .interval-detail-form-container #interval-image-uploader{position:relative}#tools-interval .interval-detail-form-container #interval-image-uploader.dropping .drop-text{display:flex}#tools-interval .interval-detail-form-container #interval-image-uploader .drop-text{display:none;position:absolute;top:0;right:0;bottom:0;left:0;padding:16px;text-align:center;border:2px dashed rgba(0,0,0,.12);background:#fff;font-size:20px;z-index:100}#tools-interval .interval-detail-form-container #interval-image-uploader .upload-button{margin-bottom:16px}#tools-interval .interval-detail-form-container #interval-image-uploader .interval-image{position:relative;width:200px;height:200px;border:1px solid rgba(0,0,0,.12);margin:8px}#tools-interval .interval-detail-form-container #interval-image-uploader .interval-image.uploading .overlay{position:absolute;top:0;right:0;bottom:0;left:0;background:rgba(0,0,0,.87)}#tools-interval .interval-detail-form-container #interval-image-uploader .interval-image .media{max-height:100%}#tools-interval md-table-container thead tr th:not(:first-child):not(.no-padding){padding:0 20px 0 0!important}#tools-interval md-table-container thead th.md-checkbox-column:not(.no-padding){padding:0 24px!important}#tools-interval md-table-container tbody tr td:not(:first-child):not(.no-padding):not(.actions-padding){padding:0 20px 0 0!important}#tools-interval md-table-container.font-size-12 td.md-cell{font-size:12px!important}#intervals{position:relative}#intervals>.header{height:76px;min-height:76px;max-height:76px}#intervals>.header .logo .logo-icon{margin:0 16px 0 0}#intervals>.header .logo .logo-text{font-size:24px}#intervals>.header md-icon{color:#fff}#intervals>.header .search-input-wrapper{position:relative}#intervals>.header .search-input-wrapper label{padding-right:4px;cursor:pointer}#intervals>.header .search-input-wrapper label md-icon{color:rgba(255,255,255,.8)}#intervals>.header .search-input-wrapper md-input-container .md-errors-spacer{display:none}#intervals>.header .search-input-wrapper md-input-container input{border-bottom:1px solid rgba(255,255,255,.8);color:rgba(255,255,255,.8);width:240px}#intervals>.header .search-input-wrapper md-input-container input::placeholder{color:rgba(255,255,255,.8)}#intervals>.header .search-input-wrapper md-input-container input:focus{border-bottom:1px solid #fff;color:#fff}#intervals>.header.selected-bar{position:absolute;top:0;left:0;right:0;z-index:999;background-image:none;opacity:1!important}#intervals>.header.selected-bar .close-button-wrapper{width:244px}#intervals>.content{position:absolute;top:76px;bottom:0;right:0;left:0}#intervals>.content .main{padding:16px 90px 0 4px;position:absolute;top:0;left:24px;right:0;bottom:0}#intervals>.content .main .no-results{box-shadow:0 1px 1px 0 rgba(0,0,0,.14)}#intervals #add-interval-button{position:fixed;bottom:8px;right:8px;padding:0}#intervals #upload-interval-button{position:fixed;bottom:8px;right:8px;padding:0}md-dialog.pause-dialog{max-width:720px;width:720px}md-dialog.pause-dialog md-dialog-content{display:block;position:relative}md-dialog.pause-dialog md-toolbar .title{font-size:17px}md-dialog.pause-dialog md-input-container textarea{min-height:150px}md-dialog.pause-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.pause-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.pause-dialog .date-container{padding:16px 0 24px 0}md-dialog.pause-dialog .error-list{font-size:13px}md-dialog.pause-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.pause-dialog .error-list .error .message{font-weight:500}md-dialog.pause-dialog .error-list .error .md-button{margin:0}md-dialog.pause-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.pause-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}#pauses{position:relative}#pauses>.header{height:76px;min-height:76px;max-height:76px}#pauses>.header .logo .logo-icon{margin:0 16px 0 0}#pauses>.header .logo .logo-text{font-size:24px}#pauses>.header md-icon{color:#fff}#pauses>.header .search-input-wrapper{position:relative}#pauses>.header .search-input-wrapper label{padding-right:4px;cursor:pointer}#pauses>.header .search-input-wrapper label md-icon{color:rgba(255,255,255,.8)}#pauses>.header .search-input-wrapper md-input-container .md-errors-spacer{display:none}#pauses>.header .search-input-wrapper md-input-container input{border-bottom:1px solid rgba(255,255,255,.8);color:rgba(255,255,255,.8);width:240px}#pauses>.header .search-input-wrapper md-input-container input::placeholder{color:rgba(255,255,255,.8)}#pauses>.header .search-input-wrapper md-input-container input:focus{border-bottom:1px solid #fff;color:#fff}#pauses>.header.selected-bar{position:absolute;top:0;left:0;right:0;z-index:999;background-image:none;opacity:1!important}#pauses>.header.selected-bar .close-button-wrapper{width:244px}#pauses>.content{position:absolute;top:76px;bottom:0;right:0;left:0}#pauses>.content .main{padding:16px 90px 0 4px;position:absolute;top:0;left:24px;right:0;bottom:0}#pauses>.content .main .no-results{box-shadow:0 1px 1px 0 rgba(0,0,0,.14)}#pauses #add-pause-button{position:fixed;bottom:8px;right:8px;padding:0}#pauses #upload-pause-button{position:fixed;bottom:8px;right:8px;padding:0}md-dialog.schedule-dialog{max-width:720px;width:720px}md-dialog.schedule-dialog md-dialog-content{display:block;position:relative}md-dialog.schedule-dialog md-toolbar .title{font-size:17px}md-dialog.schedule-dialog md-input-container textarea{min-height:150px}md-dialog.schedule-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.schedule-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.schedule-dialog .date-container{padding:16px 0 24px 0}md-dialog.schedule-dialog .error-list{font-size:13px}md-dialog.schedule-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.schedule-dialog .error-list .error .message{font-weight:500}md-dialog.schedule-dialog .error-list .error .md-button{margin:0}md-dialog.schedule-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.schedule-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}#schedules{position:relative}#schedules>.header{height:76px;min-height:76px;max-height:76px}#schedules>.header .logo .logo-icon{margin:0 16px 0 0}#schedules>.header .logo .logo-text{font-size:24px}#schedules>.header md-icon{color:#fff}#schedules>.header .search-input-wrapper{position:relative}#schedules>.header .search-input-wrapper label{padding-right:4px;cursor:pointer}#schedules>.header .search-input-wrapper label md-icon{color:rgba(255,255,255,.8)}#schedules>.header .search-input-wrapper md-input-container .md-errors-spacer{display:none}#schedules>.header .search-input-wrapper md-input-container input{border-bottom:1px solid rgba(255,255,255,.8);color:rgba(255,255,255,.8);width:240px}#schedules>.header .search-input-wrapper md-input-container input::placeholder{color:rgba(255,255,255,.8)}#schedules>.header .search-input-wrapper md-input-container input:focus{border-bottom:1px solid #fff;color:#fff}#schedules>.header.selected-bar{position:absolute;top:0;left:0;right:0;z-index:999;background-image:none;opacity:1!important}#schedules>.header.selected-bar .close-button-wrapper{width:244px}#schedules>.content{position:absolute;top:76px;bottom:0;right:0;left:0}#schedules>.content .main{padding:16px 90px 0 4px;position:absolute;top:0;left:24px;right:0;bottom:0}#schedules>.content .main .no-results{box-shadow:0 1px 1px 0 rgba(0,0,0,.14)}#schedules #add-schedule-button{position:fixed;bottom:8px;right:8px;padding:0}#schedules #upload-schedule-button{position:fixed;bottom:8px;right:8px;padding:0}md-dialog.sound-dialog{max-width:720px;width:720px}md-dialog.sound-dialog md-dialog-content{display:block;position:relative}md-dialog.sound-dialog md-toolbar .title{font-size:17px}md-dialog.sound-dialog md-input-container textarea{min-height:150px}md-dialog.sound-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.sound-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.sound-dialog .date-container{padding:16px 0 24px 0}md-dialog.sound-dialog .error-list{font-size:13px}md-dialog.sound-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.sound-dialog .error-list .error .message{font-weight:500}md-dialog.sound-dialog .error-list .error .md-button{margin:0}md-dialog.sound-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.sound-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}#sounds{position:relative}#sounds>.header{height:76px;min-height:76px;max-height:76px}#sounds>.header .logo .logo-icon{margin:0 16px 0 0}#sounds>.header .logo .logo-text{font-size:24px}#sounds>.header md-icon{color:#fff}#sounds>.header .search-input-wrapper{position:relative}#sounds>.header .search-input-wrapper label{padding-right:4px;cursor:pointer}#sounds>.header .search-input-wrapper label md-icon{color:rgba(255,255,255,.8)}#sounds>.header .search-input-wrapper md-input-container .md-errors-spacer{display:none}#sounds>.header .search-input-wrapper md-input-container input{border-bottom:1px solid rgba(255,255,255,.8);color:rgba(255,255,255,.8);width:240px}#sounds>.header .search-input-wrapper md-input-container input::placeholder{color:rgba(255,255,255,.8)}#sounds>.header .search-input-wrapper md-input-container input:focus{border-bottom:1px solid #fff;color:#fff}#sounds>.header.selected-bar{position:absolute;top:0;left:0;right:0;z-index:999;background-image:none;opacity:1!important}#sounds>.header.selected-bar .close-button-wrapper{width:244px}#sounds>.content{position:absolute;top:76px;bottom:0;right:0;left:0}#sounds>.content .main{padding:16px 90px 0 4px;position:absolute;top:0;left:24px;right:0;bottom:0}#sounds>.content .main .no-results{box-shadow:0 1px 1px 0 rgba(0,0,0,.14)}#sounds #add-sound-button{position:fixed;bottom:8px;right:8px;padding:0}#sounds #upload-sound-button{position:fixed;bottom:8px;right:8px;padding:0}md-dialog.upload-dialog{max-width:720px;width:720px}md-dialog.upload-dialog md-dialog-content{display:block;position:relative}md-dialog.upload-dialog md-toolbar .title{font-size:17px}md-dialog.upload-dialog md-input-container textarea{min-height:150px}md-dialog.upload-dialog md-progress-linear{padding-top:16px!important}md-dialog.upload-dialog .date-container{padding:16px 0 24px 0}md-dialog.upload-dialog .error-list{font-size:13px}md-dialog.upload-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.upload-dialog .error-list .error .message{font-weight:500}md-dialog.upload-dialog .error-list .error .md-button{margin:0}md-dialog.upload-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.upload-dialog .sound-image{overflow:hidden;max-width:148px;margin-right:16px;border:3px solid rgba(0,0,0,.12);padding:10px}md-dialog.upload-dialog .sound-image img{width:auto;max-width:none}md-dialog.upload-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.tag-dialog{max-width:720px;width:720px}md-dialog.tag-dialog md-dialog-content{display:block;position:relative}md-dialog.tag-dialog md-toolbar .title{font-size:17px}md-dialog.tag-dialog md-input-container textarea{min-height:150px}md-dialog.tag-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.tag-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.tag-dialog .date-container{padding:16px 0 24px 0}md-dialog.tag-dialog .error-list{font-size:13px}md-dialog.tag-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.tag-dialog .error-list .error .message{font-weight:500}md-dialog.tag-dialog .error-list .error .md-button{margin:0}md-dialog.tag-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.tag-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}#tags{position:relative}#tags>.header{height:76px;min-height:76px;max-height:76px}#tags>.header .logo .logo-icon{margin:0 16px 0 0}#tags>.header .logo .logo-text{font-size:24px}#tags>.header md-icon{color:#fff}#tags>.header .search-input-wrapper{position:relative}#tags>.header .search-input-wrapper label{padding-right:4px;cursor:pointer}#tags>.header .search-input-wrapper label md-icon{color:rgba(255,255,255,.8)}#tags>.header .search-input-wrapper md-input-container .md-errors-spacer{display:none}#tags>.header .search-input-wrapper md-input-container input{border-bottom:1px solid rgba(255,255,255,.8);color:rgba(255,255,255,.8);width:240px}#tags>.header .search-input-wrapper md-input-container input::placeholder{color:rgba(255,255,255,.8)}#tags>.header .search-input-wrapper md-input-container input:focus{border-bottom:1px solid #fff;color:#fff}#tags>.header.selected-bar{position:absolute;top:0;left:0;right:0;z-index:999;background-image:none;opacity:1!important}#tags>.header.selected-bar .close-button-wrapper{width:244px}#tags>.content{position:absolute;top:76px;bottom:0;right:0;left:0}#tags>.content .main{padding:16px 90px 0 4px;position:absolute;top:0;left:24px;right:0;bottom:0}#tags>.content .main .no-results{box-shadow:0 1px 1px 0 rgba(0,0,0,.14)}#tags #add-tag-button{position:fixed;bottom:8px;right:8px;padding:0}#tags #upload-tag-button{position:fixed;bottom:8px;right:8px;padding:0}md-dialog.template-dialog{max-width:720px;width:720px}md-dialog.template-dialog md-dialog-content{display:block;position:relative}md-dialog.template-dialog md-toolbar .title{font-size:17px}md-dialog.template-dialog md-input-container textarea{min-height:150px}md-dialog.template-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.template-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.template-dialog .date-container{padding:16px 0 24px 0}md-dialog.template-dialog .error-list{font-size:13px}md-dialog.template-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.template-dialog .error-list .error .message{font-weight:500}md-dialog.template-dialog .error-list .error .md-button{margin:0}md-dialog.template-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.template-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}#templates{position:relative}#templates>.header{height:76px;min-height:76px;max-height:76px}#templates>.header .logo .logo-icon{margin:0 16px 0 0}#templates>.header .logo .logo-text{font-size:24px}#templates>.header md-icon{color:#fff}#templates>.header .search-input-wrapper{position:relative}#templates>.header .search-input-wrapper label{padding-right:4px;cursor:pointer}#templates>.header .search-input-wrapper label md-icon{color:rgba(255,255,255,.8)}#templates>.header .search-input-wrapper md-input-container .md-errors-spacer{display:none}#templates>.header .search-input-wrapper md-input-container input{border-bottom:1px solid rgba(255,255,255,.8);color:rgba(255,255,255,.8);width:240px}#templates>.header .search-input-wrapper md-input-container input::placeholder{color:rgba(255,255,255,.8)}#templates>.header .search-input-wrapper md-input-container input:focus{border-bottom:1px solid #fff;color:#fff}#templates>.header.selected-bar{position:absolute;top:0;left:0;right:0;z-index:999;background-image:none;opacity:1!important}#templates>.header.selected-bar .close-button-wrapper{width:244px}#templates>.content{position:absolute;top:76px;bottom:0;right:0;left:0}#templates>.content .main{padding:16px 90px 0 4px;position:absolute;top:0;left:24px;right:0;bottom:0}#templates>.content .main .no-results{box-shadow:0 1px 1px 0 rgba(0,0,0,.14)}#templates #add-template-button{position:fixed;bottom:8px;right:8px;padding:0}#templates #upload-template-button{position:fixed;bottom:8px;right:8px;padding:0}md-dialog.trigger-dialog{max-width:720px;width:720px}md-dialog.trigger-dialog md-dialog-content{display:block;position:relative}md-dialog.trigger-dialog md-toolbar .title{font-size:17px}md-dialog.trigger-dialog md-input-container textarea{min-height:150px}md-dialog.trigger-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.trigger-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.trigger-dialog .date-container{padding:16px 0 24px 0}md-dialog.trigger-dialog .error-list{font-size:13px}md-dialog.trigger-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.trigger-dialog .error-list .error .message{font-weight:500}md-dialog.trigger-dialog .error-list .error .md-button{margin:0}md-dialog.trigger-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.trigger-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.action-dialog{max-width:720px;width:720px}md-dialog.action-dialog md-dialog-content{display:block;position:relative}md-dialog.action-dialog md-toolbar .title{font-size:17px}md-dialog.action-dialog md-input-container textarea{min-height:150px}md-dialog.action-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.action-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.action-dialog .date-container{padding:16px 0 24px 0}md-dialog.action-dialog .error-list{font-size:13px}md-dialog.action-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.action-dialog .error-list .error .message{font-weight:500}md-dialog.action-dialog .error-list .error .md-button{margin:0}md-dialog.action-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.action-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.allCondition-dialog{max-width:720px;width:720px}md-dialog.allCondition-dialog md-dialog-content{display:block;position:relative}md-dialog.allCondition-dialog md-toolbar .title{font-size:17px}md-dialog.allCondition-dialog md-input-container textarea{min-height:150px}md-dialog.allCondition-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.allCondition-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.allCondition-dialog .date-container{padding:16px 0 24px 0}md-dialog.allCondition-dialog .error-list{font-size:13px}md-dialog.allCondition-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.allCondition-dialog .error-list .error .message{font-weight:500}md-dialog.allCondition-dialog .error-list .error .md-button{margin:0}md-dialog.allCondition-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.allCondition-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.anyCondition-dialog{max-width:720px;width:720px}md-dialog.anyCondition-dialog md-dialog-content{display:block;position:relative}md-dialog.anyCondition-dialog md-toolbar .title{font-size:17px}md-dialog.anyCondition-dialog md-input-container textarea{min-height:150px}md-dialog.anyCondition-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.anyCondition-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.anyCondition-dialog .date-container{padding:16px 0 24px 0}md-dialog.anyCondition-dialog .error-list{font-size:13px}md-dialog.anyCondition-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.anyCondition-dialog .error-list .error .message{font-weight:500}md-dialog.anyCondition-dialog .error-list .error .md-button{margin:0}md-dialog.anyCondition-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.anyCondition-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}#tools-trigger .header{height:76px;min-height:76px;max-height:76px}#tools-trigger .header .goto-triggers-button{margin-right:16px}#tools-trigger .header .trigger-image{overflow:hidden;width:56px;height:56px;margin-right:16px;border:3px solid rgba(0,0,0,.12)}#tools-trigger .header .trigger-image img{height:100%;width:auto;max-width:none}#tools-trigger .header .subtitle{margin:6px 0 0 0}#tools-trigger .trigger-detail-form-container{padding:24px;margin-bottom:24px}#tools-trigger .trigger-detail-form-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}#tools-trigger .trigger-detail-form-container .handle{cursor:move}#tools-trigger .trigger-detail-form-container md-input-container md-switch{margin:0!important}#tools-trigger .trigger-detail-form-container #trigger-image-uploader{position:relative}#tools-trigger .trigger-detail-form-container #trigger-image-uploader.dropping .drop-text{display:flex}#tools-trigger .trigger-detail-form-container #trigger-image-uploader .drop-text{display:none;position:absolute;top:0;right:0;bottom:0;left:0;padding:16px;text-align:center;border:2px dashed rgba(0,0,0,.12);background:#fff;font-size:20px;z-index:100}#tools-trigger .trigger-detail-form-container #trigger-image-uploader .upload-button{margin-bottom:16px}#tools-trigger .trigger-detail-form-container #trigger-image-uploader .trigger-image{position:relative;width:200px;height:200px;border:1px solid rgba(0,0,0,.12);margin:8px}#tools-trigger .trigger-detail-form-container #trigger-image-uploader .trigger-image.uploading .overlay{position:absolute;top:0;right:0;bottom:0;left:0;background:rgba(0,0,0,.87)}#tools-trigger .trigger-detail-form-container #trigger-image-uploader .trigger-image .media{max-height:100%}#tools-trigger md-table-container thead tr th:not(:first-child):not(.no-padding){padding:0 20px 0 0!important}#tools-trigger md-table-container thead th.md-checkbox-column:not(.no-padding){padding:0 24px!important}#tools-trigger md-table-container tbody tr td:not(:first-child):not(.no-padding):not(.actions-padding){padding:0 20px 0 0!important}#tools-trigger md-table-container.font-size-12 td.md-cell{font-size:12px!important}#triggers{position:relative}#triggers>.header{height:76px;min-height:76px;max-height:76px}#triggers>.header .logo .logo-icon{margin:0 16px 0 0}#triggers>.header .logo .logo-text{font-size:24px}#triggers>.header md-icon{color:#fff}#triggers>.header .search-input-wrapper{position:relative}#triggers>.header .search-input-wrapper label{padding-right:4px;cursor:pointer}#triggers>.header .search-input-wrapper label md-icon{color:rgba(255,255,255,.8)}#triggers>.header .search-input-wrapper md-input-container .md-errors-spacer{display:none}#triggers>.header .search-input-wrapper md-input-container input{border-bottom:1px solid rgba(255,255,255,.8);color:rgba(255,255,255,.8);width:240px}#triggers>.header .search-input-wrapper md-input-container input::placeholder{color:rgba(255,255,255,.8)}#triggers>.header .search-input-wrapper md-input-container input:focus{border-bottom:1px solid #fff;color:#fff}#triggers>.header.selected-bar{position:absolute;top:0;left:0;right:0;z-index:999;background-image:none;opacity:1!important}#triggers>.header.selected-bar .close-button-wrapper{width:244px}#triggers>.content{position:absolute;top:76px;bottom:0;right:0;left:0}#triggers>.content .main{padding:16px 90px 0 4px;position:absolute;top:0;left:24px;right:0;bottom:0}#triggers>.content .main .no-results{box-shadow:0 1px 1px 0 rgba(0,0,0,.14)}#triggers #add-trigger-button{position:fixed;bottom:8px;right:8px;padding:0}#triggers #upload-trigger-button{position:fixed;bottom:8px;right:8px;padding:0}md-dialog.trunk-dialog{max-width:720px;width:720px}md-dialog.trunk-dialog md-dialog-content{display:block;position:relative}md-dialog.trunk-dialog md-toolbar .title{font-size:17px}md-dialog.trunk-dialog md-input-container textarea{min-height:150px}md-dialog.trunk-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.trunk-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.trunk-dialog .date-container{padding:16px 0 24px 0}md-dialog.trunk-dialog .error-list{font-size:13px}md-dialog.trunk-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.trunk-dialog .error-list .error .message{font-weight:500}md-dialog.trunk-dialog .error-list .error .md-button{margin:0}md-dialog.trunk-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.trunk-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}#tools-trunk .header{height:76px;min-height:76px;max-height:76px}#tools-trunk .header .goto-trunks-button{margin-right:16px}#tools-trunk .header .trunk-image{overflow:hidden;width:56px;height:56px;margin-right:16px;border:3px solid rgba(0,0,0,.12)}#tools-trunk .header .trunk-image img{height:100%;width:auto;max-width:none}#tools-trunk .header .subtitle{margin:6px 0 0 0}#tools-trunk .trunk-detail-form-container{padding:24px;margin-bottom:24px}#tools-trunk .trunk-detail-form-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}#tools-trunk .trunk-detail-form-container .handle{cursor:move}#tools-trunk .trunk-detail-form-container md-input-container md-switch{margin:0!important}#tools-trunk .trunk-detail-form-container #trunk-image-uploader{position:relative}#tools-trunk .trunk-detail-form-container #trunk-image-uploader.dropping .drop-text{display:flex}#tools-trunk .trunk-detail-form-container #trunk-image-uploader .drop-text{display:none;position:absolute;top:0;right:0;bottom:0;left:0;padding:16px;text-align:center;border:2px dashed rgba(0,0,0,.12);background:#fff;font-size:20px;z-index:100}#tools-trunk .trunk-detail-form-container #trunk-image-uploader .upload-button{margin-bottom:16px}#tools-trunk .trunk-detail-form-container #trunk-image-uploader .trunk-image{position:relative;width:200px;height:200px;border:1px solid rgba(0,0,0,.12);margin:8px}#tools-trunk .trunk-detail-form-container #trunk-image-uploader .trunk-image.uploading .overlay{position:absolute;top:0;right:0;bottom:0;left:0;background:rgba(0,0,0,.87)}#tools-trunk .trunk-detail-form-container #trunk-image-uploader .trunk-image .media{max-height:100%}#tools-trunk md-table-container thead tr th:not(:first-child):not(.no-padding){padding:0 20px 0 0!important}#tools-trunk md-table-container thead th.md-checkbox-column:not(.no-padding){padding:0 24px!important}#tools-trunk md-table-container tbody tr td:not(:first-child):not(.no-padding):not(.actions-padding){padding:0 20px 0 0!important}#tools-trunk md-table-container.font-size-12 td.md-cell{font-size:12px!important}#trunks{position:relative}#trunks>.header{height:76px;min-height:76px;max-height:76px}#trunks>.header .logo .logo-icon{margin:0 16px 0 0}#trunks>.header .logo .logo-text{font-size:24px}#trunks>.header md-icon{color:#fff}#trunks>.header .search-input-wrapper{position:relative}#trunks>.header .search-input-wrapper label{padding-right:4px;cursor:pointer}#trunks>.header .search-input-wrapper label md-icon{color:rgba(255,255,255,.8)}#trunks>.header .search-input-wrapper md-input-container .md-errors-spacer{display:none}#trunks>.header .search-input-wrapper md-input-container input{border-bottom:1px solid rgba(255,255,255,.8);color:rgba(255,255,255,.8);width:240px}#trunks>.header .search-input-wrapper md-input-container input::placeholder{color:rgba(255,255,255,.8)}#trunks>.header .search-input-wrapper md-input-container input:focus{border-bottom:1px solid #fff;color:#fff}#trunks>.header.selected-bar{position:absolute;top:0;left:0;right:0;z-index:999;background-image:none;opacity:1!important}#trunks>.header.selected-bar .close-button-wrapper{width:244px}#trunks>.content{position:absolute;top:76px;bottom:0;right:0;left:0}#trunks>.content .main{padding:16px 90px 0 4px;position:absolute;top:0;left:24px;right:0;bottom:0}#trunks>.content .main .no-results{box-shadow:0 1px 1px 0 rgba(0,0,0,.14)}#trunks #add-trunk-button{position:fixed;bottom:8px;right:8px;padding:0}#trunks #upload-trunk-button{position:fixed;bottom:8px;right:8px;padding:0}md-dialog.variable-dialog{max-width:720px;width:720px}md-dialog.variable-dialog md-dialog-content{display:block;position:relative}md-dialog.variable-dialog md-toolbar .title{font-size:17px}md-dialog.variable-dialog md-input-container textarea{min-height:150px}md-dialog.variable-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.variable-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.variable-dialog .date-container{padding:16px 0 24px 0}md-dialog.variable-dialog .error-list{font-size:13px}md-dialog.variable-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.variable-dialog .error-list .error .message{font-weight:500}md-dialog.variable-dialog .error-list .error .md-button{margin:0}md-dialog.variable-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.variable-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}#variables{position:relative}#variables>.header{height:76px;min-height:76px;max-height:76px}#variables>.header .logo .logo-icon{margin:0 16px 0 0}#variables>.header .logo .logo-text{font-size:24px}#variables>.header md-icon{color:#fff}#variables>.header .search-input-wrapper{position:relative}#variables>.header .search-input-wrapper label{padding-right:4px;cursor:pointer}#variables>.header .search-input-wrapper label md-icon{color:rgba(255,255,255,.8)}#variables>.header .search-input-wrapper md-input-container .md-errors-spacer{display:none}#variables>.header .search-input-wrapper md-input-container input{border-bottom:1px solid rgba(255,255,255,.8);color:rgba(255,255,255,.8);width:240px}#variables>.header .search-input-wrapper md-input-container input::placeholder{color:rgba(255,255,255,.8)}#variables>.header .search-input-wrapper md-input-container input:focus{border-bottom:1px solid #fff;color:#fff}#variables>.header.selected-bar{position:absolute;top:0;left:0;right:0;z-index:999;background-image:none;opacity:1!important}#variables>.header.selected-bar .close-button-wrapper{width:244px}#variables>.content{position:absolute;top:76px;bottom:0;right:0;left:0}#variables>.content .main{padding:16px 90px 0 4px;position:absolute;top:0;left:24px;right:0;bottom:0}#variables>.content .main .no-results{box-shadow:0 1px 1px 0 rgba(0,0,0,.14)}#variables #add-variable-button{position:fixed;bottom:8px;right:8px;padding:0}#variables #upload-variable-button{position:fixed;bottom:8px;right:8px;padding:0}md-dialog.screenRecording-dialog{max-width:720px;width:720px}md-dialog.screenRecording-dialog md-dialog-content{display:block;position:relative}md-dialog.screenRecording-dialog md-toolbar .title{font-size:17px}md-dialog.screenRecording-dialog md-input-container textarea{min-height:150px}md-dialog.screenRecording-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.screenRecording-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.screenRecording-dialog .date-container{padding:16px 0 24px 0}md-dialog.screenRecording-dialog .error-list{font-size:13px}md-dialog.screenRecording-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.screenRecording-dialog .error-list .error .message{font-weight:500}md-dialog.screenRecording-dialog .error-list .error .md-button{margin:0}md-dialog.screenRecording-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.screenRecording-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}#screenRecordings{position:relative}#screenRecordings>.header{height:76px;min-height:76px;max-height:76px}#screenRecordings>.header .logo .logo-icon{margin:0 16px 0 0}#screenRecordings>.header .logo .logo-text{font-size:24px}#screenRecordings>.header md-icon{color:#fff}#screenRecordings>.header .search-input-wrapper{position:relative}#screenRecordings>.header .search-input-wrapper label{padding-right:4px;cursor:pointer}#screenRecordings>.header .search-input-wrapper label md-icon{color:rgba(255,255,255,.8)}#screenRecordings>.header .search-input-wrapper md-input-container .md-errors-spacer{display:none}#screenRecordings>.header .search-input-wrapper md-input-container input{border-bottom:1px solid rgba(255,255,255,.8);color:rgba(255,255,255,.8);width:240px}#screenRecordings>.header .search-input-wrapper md-input-container input::placeholder{color:rgba(255,255,255,.8)}#screenRecordings>.header .search-input-wrapper md-input-container input:focus{border-bottom:1px solid #fff;color:#fff}#screenRecordings>.header.selected-bar{position:absolute;top:0;left:0;right:0;z-index:999;background-image:none;opacity:1!important}#screenRecordings>.header.selected-bar .close-button-wrapper{width:244px}#screenRecordings>.content{position:absolute;top:76px;bottom:0;right:0;left:0}#screenRecordings>.content .main{padding:16px 90px 0 4px;position:absolute;top:0;left:24px;right:0;bottom:0}#screenRecordings>.content .main .no-results{box-shadow:0 1px 1px 0 rgba(0,0,0,.14)}#screenRecordings #add-screenRecording-button{position:fixed;bottom:8px;right:8px;padding:0}#screenRecordings #upload-screenRecording-button{position:fixed;bottom:8px;right:8px;padding:0}md-dialog.voice-routing-dialog{max-width:720px;width:720px}md-dialog.voice-routing-dialog md-dialog-content{display:block;position:relative}md-dialog.voice-routing-dialog md-toolbar .title{font-size:17px}md-dialog.voice-routing-dialog md-input-container textarea{min-height:150px}md-dialog.voice-routing-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.voice-routing-dialog .date-container{padding:16px 0 24px 0}md-dialog.voice-routing-dialog .error-list{font-size:13px}md-dialog.voice-routing-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.voice-routing-dialog .error-list .error .message{font-weight:500}md-dialog.voice-routing-dialog .error-list .error .md-button{margin:0}md-dialog.voice-routing-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.voice-routing-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.interval-dialog{max-width:720px;width:720px}md-dialog.interval-dialog md-dialog-content{display:block;position:relative}md-dialog.interval-dialog md-toolbar .title{font-size:17px}md-dialog.interval-dialog md-input-container textarea{min-height:150px}md-dialog.interval-dialog .date-container{padding:16px 0 24px 0}md-dialog.interval-dialog .error-list{font-size:13px}md-dialog.interval-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.interval-dialog .error-list .error .message{font-weight:500}md-dialog.interval-dialog .error-list .error .md-button{margin:0}md-dialog.interval-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.interval-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}#chanSpies{position:relative}#chanSpies>.header{height:76px;min-height:76px;max-height:76px}#chanSpies>.header .logo .logo-icon{margin:0 16px 0 0}#chanSpies>.header .logo .logo-text{font-size:24px}#chanSpies>.header md-icon{color:#fff}#chanSpies>.header .search-input-wrapper{position:relative}#chanSpies>.header .search-input-wrapper label{padding-right:4px;cursor:pointer}#chanSpies>.header .search-input-wrapper label md-icon{color:rgba(255,255,255,.8)}#chanSpies>.header .search-input-wrapper md-input-container .md-errors-spacer{display:none}#chanSpies>.header .search-input-wrapper md-input-container input{border-bottom:1px solid rgba(255,255,255,.8);color:rgba(255,255,255,.8);width:240px}#chanSpies>.header .search-input-wrapper md-input-container input::placeholder{color:rgba(255,255,255,.8)}#chanSpies>.header .search-input-wrapper md-input-container input:focus{border-bottom:1px solid #fff;color:#fff}#chanSpies>.header.selected-bar{position:absolute;top:0;left:0;right:0;z-index:999;background-image:none;opacity:1!important}#chanSpies>.header.selected-bar .close-button-wrapper{width:244px}#chanSpies>.content{position:absolute;top:76px;bottom:0;right:0;left:0}#chanSpies>.content .main{padding:16px 90px 0 4px;position:absolute;top:0;left:24px;right:0;bottom:0}#chanSpies>.content .main .no-results{box-shadow:0 1px 1px 0 rgba(0,0,0,.14)}#chanSpies #add-chanSpy-button{position:fixed;bottom:8px;right:8px;padding:0}#chanSpies #upload-chanSpy-button{position:fixed;bottom:8px;right:8px;padding:0}md-dialog.chanSpy-dialog{max-width:720px;width:720px}md-dialog.chanSpy-dialog md-dialog-content{display:block;position:relative}md-dialog.chanSpy-dialog md-toolbar .title{font-size:17px}md-dialog.chanSpy-dialog md-input-container textarea{min-height:150px}md-dialog.chanSpy-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.chanSpy-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.chanSpy-dialog .date-container{padding:16px 0 24px 0}md-dialog.chanSpy-dialog .error-list{font-size:13px}md-dialog.chanSpy-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.chanSpy-dialog .error-list .error .message{font-weight:500}md-dialog.chanSpy-dialog .error-list .error .md-button{margin:0}md-dialog.chanSpy-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.chanSpy-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}#contexts{position:relative}#contexts>.header{height:76px;min-height:76px;max-height:76px}#contexts>.header .logo .logo-icon{margin:0 16px 0 0}#contexts>.header .logo .logo-text{font-size:24px}#contexts>.header md-icon{color:#fff}#contexts>.header .search-input-wrapper{position:relative}#contexts>.header .search-input-wrapper label{padding-right:4px;cursor:pointer}#contexts>.header .search-input-wrapper label md-icon{color:rgba(255,255,255,.8)}#contexts>.header .search-input-wrapper md-input-container .md-errors-spacer{display:none}#contexts>.header .search-input-wrapper md-input-container input{border-bottom:1px solid rgba(255,255,255,.8);color:rgba(255,255,255,.8);width:240px}#contexts>.header .search-input-wrapper md-input-container input::placeholder{color:rgba(255,255,255,.8)}#contexts>.header .search-input-wrapper md-input-container input:focus{border-bottom:1px solid #fff;color:#fff}#contexts>.header.selected-bar{position:absolute;top:0;left:0;right:0;z-index:999;background-image:none;opacity:1!important}#contexts>.header.selected-bar .close-button-wrapper{width:244px}#contexts>.content{position:absolute;top:76px;bottom:0;right:0;left:0}#contexts>.content .main{padding:16px 90px 0 4px;position:absolute;top:0;left:24px;right:0;bottom:0}#contexts>.content .main .no-results{box-shadow:0 1px 1px 0 rgba(0,0,0,.14)}#contexts #add-context-button{position:fixed;bottom:8px;right:8px;padding:0}#contexts #upload-context-button{position:fixed;bottom:8px;right:8px;padding:0}md-dialog.context-dialog{max-width:720px;width:720px}md-dialog.context-dialog md-dialog-content{display:block;position:relative}md-dialog.context-dialog md-toolbar .title{font-size:17px}md-dialog.context-dialog md-input-container textarea{min-height:150px}md-dialog.context-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.context-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.context-dialog .date-container{padding:16px 0 24px 0}md-dialog.context-dialog .error-list{font-size:13px}md-dialog.context-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.context-dialog .error-list .error .message{font-weight:500}md-dialog.context-dialog .error-list .error .md-button{margin:0}md-dialog.context-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.context-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.inbound-route-dialog{max-width:720px;width:720px}md-dialog.inbound-route-dialog md-dialog-content{display:block;position:relative}md-dialog.inbound-route-dialog md-toolbar .title{font-size:17px}md-dialog.inbound-route-dialog md-input-container textarea{min-height:150px}md-dialog.inbound-route-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.inbound-route-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.inbound-route-dialog .date-container{padding:16px 0 24px 0}md-dialog.inbound-route-dialog .error-list{font-size:13px}md-dialog.inbound-route-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.inbound-route-dialog .error-list .error .message{font-weight:500}md-dialog.inbound-route-dialog .error-list .error .md-button{margin:0}md-dialog.inbound-route-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.inbound-route-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}#voice-inbound-route .header{height:76px;min-height:76px;max-height:76px}#voice-inbound-route .header .goto-inbound-routes-button{margin-right:16px}#voice-inbound-route .header .inbound-route-image{overflow:hidden;width:56px;height:56px;margin-right:16px;border:3px solid rgba(0,0,0,.12)}#voice-inbound-route .header .inbound-route-image img{height:100%;width:auto;max-width:none}#voice-inbound-route .header .subtitle{margin:6px 0 0 0}#voice-inbound-route .inbound-route-detail-form-container{padding:24px;margin-bottom:24px}#voice-inbound-route .inbound-route-detail-form-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}#voice-inbound-route .inbound-route-detail-form-container .handle{cursor:move}#voice-inbound-route .inbound-route-detail-form-container md-input-container md-switch{margin:0!important}#voice-inbound-route md-table-container thead tr th:not(:first-child):not(.no-padding){padding:0 20px 0 0!important}#voice-inbound-route md-table-container thead th.md-checkbox-column:not(.no-padding){padding:0 24px!important}#voice-inbound-route md-table-container tbody tr td:not(:first-child):not(.no-padding):not(.actions-padding){padding:0 20px 0 0!important}#voice-inbound-route md-table-container.font-size-12 td.md-cell{font-size:12px!important}@media screen and (min-width:1921px){#voice-inbound-route .actionAppData{width:800px!important}}@media screen and (max-width:1920px){#voice-inbound-route .actionAppData{width:700px!important}}@media screen and (min-width:1751px) and (max-width:1919px){#voice-inbound-route .actionAppData{width:600px!important}}@media screen and (min-width:1601px) and (max-width:1750px){#voice-inbound-route .actionAppData{width:500px!important}}@media screen and (min-width:1537px) and (max-width:1600px){#voice-inbound-route .actionAppData{width:450px!important}}@media screen and (min-width:1281px) and (max-width:1536px){#voice-inbound-route .actionAppData{width:300px!important}}@media screen and (max-width:1280px){#voice-inbound-route .actionAppData{width:150px!important}}@media screen and (max-width:960px){#voice-inbound-route .actionAppData{width:80px!important}}#inbound-routes{position:relative}#inbound-routes>.header{height:76px;min-height:76px;max-height:76px}#inbound-routes>.header .logo .logo-icon{margin:0 16px 0 0}#inbound-routes>.header .logo .logo-text{font-size:24px}#inbound-routes>.header md-icon{color:#fff}#inbound-routes>.header .search-input-wrapper{position:relative}#inbound-routes>.header .search-input-wrapper label{padding-right:4px;cursor:pointer}#inbound-routes>.header .search-input-wrapper label md-icon{color:rgba(255,255,255,.8)}#inbound-routes>.header .search-input-wrapper md-input-container .md-errors-spacer{display:none}#inbound-routes>.header .search-input-wrapper md-input-container input{border-bottom:1px solid rgba(255,255,255,.8);color:rgba(255,255,255,.8);width:240px}#inbound-routes>.header .search-input-wrapper md-input-container input::placeholder{color:rgba(255,255,255,.8)}#inbound-routes>.header .search-input-wrapper md-input-container input:focus{border-bottom:1px solid #fff;color:#fff}#inbound-routes>.header.selected-bar{position:absolute;top:0;left:0;right:0;z-index:999;background-image:none;opacity:1!important}#inbound-routes>.header.selected-bar .close-button-wrapper{width:244px}#inbound-routes>.content{position:absolute;top:76px;bottom:0;right:0;left:0}#inbound-routes>.content .main{padding:16px 90px 0 4px;position:absolute;top:0;left:24px;right:0;bottom:0}#inbound-routes>.content .main .no-results{box-shadow:0 1px 1px 0 rgba(0,0,0,.14)}#inbound-routes #add-inbound-route-button{position:fixed;bottom:8px;right:8px;padding:0}md-dialog.internal-route-dialog{max-width:720px;width:720px}md-dialog.internal-route-dialog md-dialog-content{display:block;position:relative}md-dialog.internal-route-dialog md-toolbar .title{font-size:17px}md-dialog.internal-route-dialog md-input-container textarea{min-height:150px}md-dialog.internal-route-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.internal-route-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.internal-route-dialog .date-container{padding:16px 0 24px 0}md-dialog.internal-route-dialog .error-list{font-size:13px}md-dialog.internal-route-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.internal-route-dialog .error-list .error .message{font-weight:500}md-dialog.internal-route-dialog .error-list .error .md-button{margin:0}md-dialog.internal-route-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.internal-route-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}#voice-internal-route .header{height:76px;min-height:76px;max-height:76px}#voice-internal-route .header .goto-internal-routes-button{margin-right:16px}#voice-internal-route .header .internal-route-image{overflow:hidden;width:56px;height:56px;margin-right:16px;border:3px solid rgba(0,0,0,.12)}#voice-internal-route .header .internal-route-image img{height:100%;width:auto;max-width:none}#voice-internal-route .header .subtitle{margin:6px 0 0 0}#voice-internal-route .internal-route-detail-form-container{padding:24px;margin-bottom:24px}#voice-internal-route .internal-route-detail-form-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}#voice-internal-route .internal-route-detail-form-container .handle{cursor:move}#voice-internal-route .internal-route-detail-form-container md-input-container md-switch{margin:0!important}#voice-internal-route md-table-container thead tr th:not(:first-child):not(.no-padding){padding:0 20px 0 0!important}#voice-internal-route md-table-container thead th.md-checkbox-column:not(.no-padding){padding:0 24px!important}#voice-internal-route md-table-container tbody tr td:not(:first-child):not(.no-padding):not(.actions-padding){padding:0 20px 0 0!important}#voice-internal-route md-table-container.font-size-12 td.md-cell{font-size:12px!important}@media screen and (min-width:1921px){#voice-internal-route .actionAppData{width:800px!important}}@media screen and (max-width:1920px){#voice-internal-route .actionAppData{width:700px!important}}@media screen and (min-width:1751px) and (max-width:1919px){#voice-internal-route .actionAppData{width:600px!important}}@media screen and (min-width:1601px) and (max-width:1750px){#voice-internal-route .actionAppData{width:500px!important}}@media screen and (min-width:1537px) and (max-width:1600px){#voice-internal-route .actionAppData{width:450px!important}}@media screen and (min-width:1281px) and (max-width:1536px){#voice-internal-route .actionAppData{width:300px!important}}@media screen and (max-width:1280px){#voice-internal-route .actionAppData{width:150px!important}}@media screen and (max-width:960px){#voice-internal-route .actionAppData{width:80px!important}}#internal-routes{position:relative}#internal-routes>.header{height:76px;min-height:76px;max-height:76px}#internal-routes>.header .logo .logo-icon{margin:0 16px 0 0}#internal-routes>.header .logo .logo-text{font-size:24px}#internal-routes>.header md-icon{color:#fff}#internal-routes>.header .search-input-wrapper{position:relative}#internal-routes>.header .search-input-wrapper label{padding-right:4px;cursor:pointer}#internal-routes>.header .search-input-wrapper label md-icon{color:rgba(255,255,255,.8)}#internal-routes>.header .search-input-wrapper md-input-container .md-errors-spacer{display:none}#internal-routes>.header .search-input-wrapper md-input-container input{border-bottom:1px solid rgba(255,255,255,.8);color:rgba(255,255,255,.8);width:240px}#internal-routes>.header .search-input-wrapper md-input-container input::placeholder{color:rgba(255,255,255,.8)}#internal-routes>.header .search-input-wrapper md-input-container input:focus{border-bottom:1px solid #fff;color:#fff}#internal-routes>.header.selected-bar{position:absolute;top:0;left:0;right:0;z-index:999;background-image:none;opacity:1!important}#internal-routes>.header.selected-bar .close-button-wrapper{width:244px}#internal-routes>.content{position:absolute;top:76px;bottom:0;right:0;left:0}#internal-routes>.content .main{padding:16px 90px 0 4px;position:absolute;top:0;left:24px;right:0;bottom:0}#internal-routes>.content .main .no-results{box-shadow:0 1px 1px 0 rgba(0,0,0,.14)}#internal-routes #add-internal-route-button{position:fixed;bottom:8px;right:8px;padding:0}md-dialog.musiconhold-dialog{max-width:720px;width:720px}md-dialog.musiconhold-dialog md-dialog-content{display:block;position:relative}md-dialog.musiconhold-dialog md-toolbar .title{font-size:17px}md-dialog.musiconhold-dialog md-input-container textarea{min-height:150px}md-dialog.musiconhold-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.musiconhold-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.musiconhold-dialog .date-container{padding:16px 0 24px 0}md-dialog.musiconhold-dialog .error-list{font-size:13px}md-dialog.musiconhold-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.musiconhold-dialog .error-list .error .message{font-weight:500}md-dialog.musiconhold-dialog .error-list .error .md-button{margin:0}md-dialog.musiconhold-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.musiconhold-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.mohSound-dialog{max-width:720px;width:720px}md-dialog.mohSound-dialog md-dialog-content{display:block;position:relative}md-dialog.mohSound-dialog md-toolbar .title{font-size:17px}md-dialog.mohSound-dialog md-input-container textarea{min-height:150px}md-dialog.mohSound-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.mohSound-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.mohSound-dialog .date-container{padding:16px 0 24px 0}md-dialog.mohSound-dialog .error-list{font-size:13px}md-dialog.mohSound-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.mohSound-dialog .error-list .error .message{font-weight:500}md-dialog.mohSound-dialog .error-list .error .md-button{margin:0}md-dialog.mohSound-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.mohSound-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}#voice-musiconhold .header{height:76px;min-height:76px;max-height:76px}#voice-musiconhold .header .goto-musiconholds-button{margin-right:16px}#voice-musiconhold .header .musiconhold-image{overflow:hidden;width:56px;height:56px;margin-right:16px;border:3px solid rgba(0,0,0,.12)}#voice-musiconhold .header .musiconhold-image img{height:100%;width:auto;max-width:none}#voice-musiconhold .header .subtitle{margin:6px 0 0 0}#voice-musiconhold .musiconhold-detail-form-container{padding:24px;margin-bottom:24px}#voice-musiconhold .musiconhold-detail-form-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}#voice-musiconhold .musiconhold-detail-form-container .handle{cursor:move}#voice-musiconhold .musiconhold-detail-form-container md-input-container md-switch{margin:0!important}#voice-musiconhold .musiconhold-detail-form-container #musiconhold-image-uploader{position:relative}#voice-musiconhold .musiconhold-detail-form-container #musiconhold-image-uploader.dropping .drop-text{display:flex}#voice-musiconhold .musiconhold-detail-form-container #musiconhold-image-uploader .drop-text{display:none;position:absolute;top:0;right:0;bottom:0;left:0;padding:16px;text-align:center;border:2px dashed rgba(0,0,0,.12);background:#fff;font-size:20px;z-index:100}#voice-musiconhold .musiconhold-detail-form-container #musiconhold-image-uploader .upload-button{margin-bottom:16px}#voice-musiconhold .musiconhold-detail-form-container #musiconhold-image-uploader .musiconhold-image{position:relative;width:200px;height:200px;border:1px solid rgba(0,0,0,.12);margin:8px}#voice-musiconhold .musiconhold-detail-form-container #musiconhold-image-uploader .musiconhold-image.uploading .overlay{position:absolute;top:0;right:0;bottom:0;left:0;background:rgba(0,0,0,.87)}#voice-musiconhold .musiconhold-detail-form-container #musiconhold-image-uploader .musiconhold-image .media{max-height:100%}#voice-musiconhold md-table-container thead tr th:not(:first-child):not(.no-padding){padding:0 20px 0 0!important}#voice-musiconhold md-table-container thead th.md-checkbox-column:not(.no-padding){padding:0 24px!important}#voice-musiconhold md-table-container tbody tr td:not(:first-child):not(.no-padding):not(.actions-padding){padding:0 20px 0 0!important}#voice-musiconhold md-table-container.font-size-12 td.md-cell{font-size:12px!important}#musiconholds{position:relative}#musiconholds>.header{height:76px;min-height:76px;max-height:76px}#musiconholds>.header .logo .logo-icon{margin:0 16px 0 0}#musiconholds>.header .logo .logo-text{font-size:24px}#musiconholds>.header md-icon{color:#fff}#musiconholds>.header .search-input-wrapper{position:relative}#musiconholds>.header .search-input-wrapper label{padding-right:4px;cursor:pointer}#musiconholds>.header .search-input-wrapper label md-icon{color:rgba(255,255,255,.8)}#musiconholds>.header .search-input-wrapper md-input-container .md-errors-spacer{display:none}#musiconholds>.header .search-input-wrapper md-input-container input{border-bottom:1px solid rgba(255,255,255,.8);color:rgba(255,255,255,.8);width:240px}#musiconholds>.header .search-input-wrapper md-input-container input::placeholder{color:rgba(255,255,255,.8)}#musiconholds>.header .search-input-wrapper md-input-container input:focus{border-bottom:1px solid #fff;color:#fff}#musiconholds>.header.selected-bar{position:absolute;top:0;left:0;right:0;z-index:999;background-image:none;opacity:1!important}#musiconholds>.header.selected-bar .close-button-wrapper{width:244px}#musiconholds>.content{position:absolute;top:76px;bottom:0;right:0;left:0}#musiconholds>.content .main{padding:16px 90px 0 4px;position:absolute;top:0;left:24px;right:0;bottom:0}#musiconholds>.content .main .no-results{box-shadow:0 1px 1px 0 rgba(0,0,0,.14)}#musiconholds #add-musiconhold-button{position:fixed;bottom:8px;right:8px;padding:0}#musiconholds #upload-musiconhold-button{position:fixed;bottom:8px;right:8px;padding:0}md-dialog.outbound-route-dialog{max-width:720px;width:720px}md-dialog.outbound-route-dialog md-dialog-content{display:block;position:relative}md-dialog.outbound-route-dialog md-toolbar .title{font-size:17px}md-dialog.outbound-route-dialog md-input-container textarea{min-height:150px}md-dialog.outbound-route-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.outbound-route-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.outbound-route-dialog .date-container{padding:16px 0 24px 0}md-dialog.outbound-route-dialog .error-list{font-size:13px}md-dialog.outbound-route-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.outbound-route-dialog .error-list .error .message{font-weight:500}md-dialog.outbound-route-dialog .error-list .error .md-button{margin:0}md-dialog.outbound-route-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.outbound-route-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}#voice-outbound-route .header{height:76px;min-height:76px;max-height:76px}#voice-outbound-route .header .goto-outbound-routes-button{margin-right:16px}#voice-outbound-route .header .outbound-route-image{overflow:hidden;width:56px;height:56px;margin-right:16px;border:3px solid rgba(0,0,0,.12)}#voice-outbound-route .header .outbound-route-image img{height:100%;width:auto;max-width:none}#voice-outbound-route .header .subtitle{margin:6px 0 0 0}#voice-outbound-route .outbound-route-detail-form-container{padding:24px;margin-bottom:24px}#voice-outbound-route .outbound-route-detail-form-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}#voice-outbound-route .outbound-route-detail-form-container .handle{cursor:move}#voice-outbound-route .outbound-route-detail-form-container md-input-container md-switch{margin:0!important}#voice-outbound-route md-table-container thead tr th:not(:first-child):not(.no-padding){padding:0 20px 0 0!important}#voice-outbound-route md-table-container thead th.md-checkbox-column:not(.no-padding){padding:0 24px!important}#voice-outbound-route md-table-container tbody tr td:not(:first-child):not(.no-padding):not(.actions-padding){padding:0 20px 0 0!important}#voice-outbound-route md-table-container.font-size-12 td.md-cell{font-size:12px!important}@media screen and (min-width:1921px){#voice-outbound-route .actionAppData{width:800px!important}}@media screen and (max-width:1920px){#voice-outbound-route .actionAppData{width:700px!important}}@media screen and (min-width:1751px) and (max-width:1919px){#voice-outbound-route .actionAppData{width:600px!important}}@media screen and (min-width:1601px) and (max-width:1750px){#voice-outbound-route .actionAppData{width:500px!important}}@media screen and (min-width:1537px) and (max-width:1600px){#voice-outbound-route .actionAppData{width:450px!important}}@media screen and (min-width:1281px) and (max-width:1536px){#voice-outbound-route .actionAppData{width:300px!important}}@media screen and (max-width:1280px){#voice-outbound-route .actionAppData{width:150px!important}}@media screen and (max-width:960px){#voice-outbound-route .actionAppData{width:80px!important}}#outbound-routes{position:relative}#outbound-routes>.header{height:76px;min-height:76px;max-height:76px}#outbound-routes>.header .logo .logo-icon{margin:0 16px 0 0}#outbound-routes>.header .logo .logo-text{font-size:24px}#outbound-routes>.header md-icon{color:#fff}#outbound-routes>.header .search-input-wrapper{position:relative}#outbound-routes>.header .search-input-wrapper label{padding-right:4px;cursor:pointer}#outbound-routes>.header .search-input-wrapper label md-icon{color:rgba(255,255,255,.8)}#outbound-routes>.header .search-input-wrapper md-input-container .md-errors-spacer{display:none}#outbound-routes>.header .search-input-wrapper md-input-container input{border-bottom:1px solid rgba(255,255,255,.8);color:rgba(255,255,255,.8);width:240px}#outbound-routes>.header .search-input-wrapper md-input-container input::placeholder{color:rgba(255,255,255,.8)}#outbound-routes>.header .search-input-wrapper md-input-container input:focus{border-bottom:1px solid #fff;color:#fff}#outbound-routes>.header.selected-bar{position:absolute;top:0;left:0;right:0;z-index:999;background-image:none;opacity:1!important}#outbound-routes>.header.selected-bar .close-button-wrapper{width:244px}#outbound-routes>.content{position:absolute;top:76px;bottom:0;right:0;left:0}#outbound-routes>.content .main{padding:16px 90px 0 4px;position:absolute;top:0;left:24px;right:0;bottom:0}#outbound-routes>.content .main .no-results{box-shadow:0 1px 1px 0 rgba(0,0,0,.14)}#outbound-routes #add-outbound-route-button{position:fixed;bottom:8px;right:8px;padding:0}#realtime{height:auto}#realtime>.content .blink{animation:blinker 2s linear infinite}#realtime>.content .avatar-wrapper{position:relative}#realtime>.content .avatar-wrapper .status{position:absolute;bottom:-3px;right:5px}#realtime>.content .search-input-wrapper{position:relative;margin-left:20px}#realtime>.content .search-input-wrapper label{padding:6px;cursor:pointer}#realtime>.content .search-input-wrapper md-input-container{padding-top:20px}#realtime>.content .main .labels{padding:8px 16px}#realtime>.content .main .labels .label{margin:0 0 2px 4px;padding:2px 5px;font-size:11px;white-space:nowrap;border-radius:2px}#realtime>.content .main .status{position:absolute;bottom:-3px;right:5px}#realtime>.content .main .avatar-wrapper{position:relative}#realtime>.content .main .avatar-wrapper .status{position:absolute;bottom:-3px;right:5px}#realtime>.content .custom-column{padding:0 24px!important}#realtime>.content td.text-center span.text-boxed,#realtime>.content td.text-center span.text-boxed-light{display:block}@keyframes blinker{50%{opacity:0}}md-dialog.voicemail-dialog{max-width:720px;width:720px}md-dialog.voicemail-dialog md-dialog-content{display:block;position:relative}md-dialog.voicemail-dialog md-toolbar .title{font-size:17px}md-dialog.voicemail-dialog md-input-container textarea{min-height:150px}md-dialog.voicemail-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.voicemail-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.voicemail-dialog .date-container{padding:16px 0 24px 0}md-dialog.voicemail-dialog .error-list{font-size:13px}md-dialog.voicemail-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.voicemail-dialog .error-list .error .message{font-weight:500}md-dialog.voicemail-dialog .error-list .error .md-button{margin:0}md-dialog.voicemail-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.voicemail-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}#voice-voicemail .header{height:76px;min-height:76px;max-height:76px}#voice-voicemail .header .goto-voicemails-button{margin-right:16px}#voice-voicemail .header .voicemail-image{overflow:hidden;width:56px;height:56px;margin-right:16px;border:3px solid rgba(0,0,0,.12)}#voice-voicemail .header .voicemail-image img{height:100%;width:auto;max-width:none}#voice-voicemail .header .subtitle{margin:6px 0 0 0}#voice-voicemail .voicemail-detail-form-container{padding:24px;margin-bottom:24px}#voice-voicemail .voicemail-detail-form-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}#voice-voicemail .voicemail-detail-form-container .handle{cursor:move}#voice-voicemail .voicemail-detail-form-container md-input-container md-switch{margin:0!important}#voice-voicemail .voicemail-detail-form-container #voicemail-image-uploader{position:relative}#voice-voicemail .voicemail-detail-form-container #voicemail-image-uploader.dropping .drop-text{display:flex}#voice-voicemail .voicemail-detail-form-container #voicemail-image-uploader .drop-text{display:none;position:absolute;top:0;right:0;bottom:0;left:0;padding:16px;text-align:center;border:2px dashed rgba(0,0,0,.12);background:#fff;font-size:20px;z-index:100}#voice-voicemail .voicemail-detail-form-container #voicemail-image-uploader .upload-button{margin-bottom:16px}#voice-voicemail .voicemail-detail-form-container #voicemail-image-uploader .voicemail-image{position:relative;width:200px;height:200px;border:1px solid rgba(0,0,0,.12);margin:8px}#voice-voicemail .voicemail-detail-form-container #voicemail-image-uploader .voicemail-image.uploading .overlay{position:absolute;top:0;right:0;bottom:0;left:0;background:rgba(0,0,0,.87)}#voice-voicemail .voicemail-detail-form-container #voicemail-image-uploader .voicemail-image .media{max-height:100%}#voice-voicemail md-table-container thead tr th:not(:first-child):not(.no-padding){padding:0 20px 0 0!important}#voice-voicemail md-table-container thead th.md-checkbox-column:not(.no-padding){padding:0 24px!important}#voice-voicemail md-table-container tbody tr td:not(:first-child):not(.no-padding):not(.actions-padding){padding:0 20px 0 0!important}#voice-voicemail md-table-container.font-size-12 td.md-cell{font-size:12px!important}#voicemails{position:relative}#voicemails>.header{height:76px;min-height:76px;max-height:76px}#voicemails>.header .logo .logo-icon{margin:0 16px 0 0}#voicemails>.header .logo .logo-text{font-size:24px}#voicemails>.header md-icon{color:#fff}#voicemails>.header .search-input-wrapper{position:relative}#voicemails>.header .search-input-wrapper label{padding-right:4px;cursor:pointer}#voicemails>.header .search-input-wrapper label md-icon{color:rgba(255,255,255,.8)}#voicemails>.header .search-input-wrapper md-input-container .md-errors-spacer{display:none}#voicemails>.header .search-input-wrapper md-input-container input{border-bottom:1px solid rgba(255,255,255,.8);color:rgba(255,255,255,.8);width:240px}#voicemails>.header .search-input-wrapper md-input-container input::placeholder{color:rgba(255,255,255,.8)}#voicemails>.header .search-input-wrapper md-input-container input:focus{border-bottom:1px solid #fff;color:#fff}#voicemails>.header.selected-bar{position:absolute;top:0;left:0;right:0;z-index:999;background-image:none;opacity:1!important}#voicemails>.header.selected-bar .close-button-wrapper{width:244px}#voicemails>.content{position:absolute;top:76px;bottom:0;right:0;left:0}#voicemails>.content .main{padding:16px 90px 0 4px;position:absolute;top:0;left:24px;right:0;bottom:0}#voicemails>.content .main .no-results{box-shadow:0 1px 1px 0 rgba(0,0,0,.14)}#voicemails #add-voicemail-button{position:fixed;bottom:8px;right:8px;padding:0}#voicemails #upload-voicemail-button{position:fixed;bottom:8px;right:8px;padding:0}md-dialog.voicePrefix-dialog{max-width:720px;width:720px}md-dialog.voicePrefix-dialog md-dialog-content{display:block;position:relative}md-dialog.voicePrefix-dialog md-toolbar .title{font-size:17px}md-dialog.voicePrefix-dialog md-input-container textarea{min-height:150px}md-dialog.voicePrefix-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.voicePrefix-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.voicePrefix-dialog .date-container{padding:16px 0 24px 0}md-dialog.voicePrefix-dialog .error-list{font-size:13px}md-dialog.voicePrefix-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.voicePrefix-dialog .error-list .error .message{font-weight:500}md-dialog.voicePrefix-dialog .error-list .error .md-button{margin:0}md-dialog.voicePrefix-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.voicePrefix-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}#voicePrefixes{position:relative}#voicePrefixes>.header{height:76px;min-height:76px;max-height:76px}#voicePrefixes>.header .logo .logo-icon{margin:0 16px 0 0}#voicePrefixes>.header .logo .logo-text{font-size:24px}#voicePrefixes>.header md-icon{color:#fff}#voicePrefixes>.header .search-input-wrapper{position:relative}#voicePrefixes>.header .search-input-wrapper label{padding-right:4px;cursor:pointer}#voicePrefixes>.header .search-input-wrapper label md-icon{color:rgba(255,255,255,.8)}#voicePrefixes>.header .search-input-wrapper md-input-container .md-errors-spacer{display:none}#voicePrefixes>.header .search-input-wrapper md-input-container input{border-bottom:1px solid rgba(255,255,255,.8);color:rgba(255,255,255,.8);width:240px}#voicePrefixes>.header .search-input-wrapper md-input-container input::placeholder{color:rgba(255,255,255,.8)}#voicePrefixes>.header .search-input-wrapper md-input-container input:focus{border-bottom:1px solid #fff;color:#fff}#voicePrefixes>.header.selected-bar{position:absolute;top:0;left:0;right:0;z-index:999;background-image:none;opacity:1!important}#voicePrefixes>.header.selected-bar .close-button-wrapper{width:244px}#voicePrefixes>.content{position:absolute;top:76px;bottom:0;right:0;left:0}#voicePrefixes>.content .main{padding:16px 90px 0 4px;position:absolute;top:0;left:24px;right:0;bottom:0}#voicePrefixes>.content .main .no-results{box-shadow:0 1px 1px 0 rgba(0,0,0,.14)}#voicePrefixes #add-voicePrefix-button{position:fixed;bottom:8px;right:8px;padding:0}#voicePrefixes #upload-voicePrefix-button{position:fixed;bottom:8px;right:8px;padding:0}md-dialog.voiceQueue-dialog{max-width:720px;width:720px}md-dialog.voiceQueue-dialog md-dialog-content{display:block;position:relative}md-dialog.voiceQueue-dialog md-toolbar .title{font-size:17px}md-dialog.voiceQueue-dialog md-input-container textarea{min-height:150px}md-dialog.voiceQueue-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.voiceQueue-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.voiceQueue-dialog .date-container{padding:16px 0 24px 0}md-dialog.voiceQueue-dialog .error-list{font-size:13px}md-dialog.voiceQueue-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.voiceQueue-dialog .error-list .error .message{font-weight:500}md-dialog.voiceQueue-dialog .error-list .error .md-button{margin:0}md-dialog.voiceQueue-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.voiceQueue-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}#voice-voiceQueue .header{height:76px;min-height:76px;max-height:76px}#voice-voiceQueue .header .goto-voiceQueues-button{margin-right:16px}#voice-voiceQueue .header .voiceQueue-image{overflow:hidden;width:56px;height:56px;margin-right:16px;border:3px solid rgba(0,0,0,.12)}#voice-voiceQueue .header .voiceQueue-image img{height:100%;width:auto;max-width:none}#voice-voiceQueue .header .subtitle{margin:6px 0 0 0}#voice-voiceQueue .voiceQueue-detail-form-container{padding:24px;margin-bottom:24px}#voice-voiceQueue .voiceQueue-detail-form-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}#voice-voiceQueue .voiceQueue-detail-form-container .handle{cursor:move}#voice-voiceQueue .voiceQueue-detail-form-container md-input-container md-switch{margin:0!important}#voice-voiceQueue .voiceQueue-detail-form-container #voiceQueue-image-uploader{position:relative}#voice-voiceQueue .voiceQueue-detail-form-container #voiceQueue-image-uploader.dropping .drop-text{display:flex}#voice-voiceQueue .voiceQueue-detail-form-container #voiceQueue-image-uploader .drop-text{display:none;position:absolute;top:0;right:0;bottom:0;left:0;padding:16px;text-align:center;border:2px dashed rgba(0,0,0,.12);background:#fff;font-size:20px;z-index:100}#voice-voiceQueue .voiceQueue-detail-form-container #voiceQueue-image-uploader .upload-button{margin-bottom:16px}#voice-voiceQueue .voiceQueue-detail-form-container #voiceQueue-image-uploader .voiceQueue-image{position:relative;width:200px;height:200px;border:1px solid rgba(0,0,0,.12);margin:8px}#voice-voiceQueue .voiceQueue-detail-form-container #voiceQueue-image-uploader .voiceQueue-image.uploading .overlay{position:absolute;top:0;right:0;bottom:0;left:0;background:rgba(0,0,0,.87)}#voice-voiceQueue .voiceQueue-detail-form-container #voiceQueue-image-uploader .voiceQueue-image .media{max-height:100%}#voice-voiceQueue md-table-container thead tr th:not(:first-child):not(.no-padding){padding:0 20px 0 0!important}#voice-voiceQueue md-table-container thead th.md-checkbox-column:not(.no-padding){padding:0 24px!important}#voice-voiceQueue md-table-container tbody tr td:not(:first-child):not(.no-padding):not(.actions-padding){padding:0 20px 0 0!important}#voice-voiceQueue md-table-container.font-size-12 td.md-cell{font-size:12px!important}#voiceQueues{position:relative}#voiceQueues>.header{height:76px;min-height:76px;max-height:76px}#voiceQueues>.header .logo .logo-icon{margin:0 16px 0 0}#voiceQueues>.header .logo .logo-text{font-size:24px}#voiceQueues>.header md-icon{color:#fff}#voiceQueues>.header .search-input-wrapper{position:relative}#voiceQueues>.header .search-input-wrapper label{padding-right:4px;cursor:pointer}#voiceQueues>.header .search-input-wrapper label md-icon{color:rgba(255,255,255,.8)}#voiceQueues>.header .search-input-wrapper md-input-container .md-errors-spacer{display:none}#voiceQueues>.header .search-input-wrapper md-input-container input{border-bottom:1px solid rgba(255,255,255,.8);color:rgba(255,255,255,.8);width:240px}#voiceQueues>.header .search-input-wrapper md-input-container input::placeholder{color:rgba(255,255,255,.8)}#voiceQueues>.header .search-input-wrapper md-input-container input:focus{border-bottom:1px solid #fff;color:#fff}#voiceQueues>.header.selected-bar{position:absolute;top:0;left:0;right:0;z-index:999;background-image:none;opacity:1!important}#voiceQueues>.header.selected-bar .close-button-wrapper{width:244px}#voiceQueues>.content{position:absolute;top:76px;bottom:0;right:0;left:0}#voiceQueues>.content .main{padding:16px 90px 0 4px;position:absolute;top:0;left:24px;right:0;bottom:0}#voiceQueues>.content .main .no-results{box-shadow:0 1px 1px 0 rgba(0,0,0,.14)}#voiceQueues #add-voiceQueue-button{position:fixed;bottom:8px;right:8px;padding:0}#voiceQueues #upload-voiceQueue-button{position:fixed;bottom:8px;right:8px;padding:0}md-dialog.voiceRecording-dialog{max-width:720px;width:720px}md-dialog.voiceRecording-dialog md-dialog-content{display:block;position:relative}md-dialog.voiceRecording-dialog md-toolbar .title{font-size:17px}md-dialog.voiceRecording-dialog md-input-container textarea{min-height:150px}md-dialog.voiceRecording-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.voiceRecording-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.voiceRecording-dialog .date-container{padding:16px 0 24px 0}md-dialog.voiceRecording-dialog .error-list{font-size:13px}md-dialog.voiceRecording-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.voiceRecording-dialog .error-list .error .message{font-weight:500}md-dialog.voiceRecording-dialog .error-list .error .md-button{margin:0}md-dialog.voiceRecording-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.voiceRecording-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}#voice-voiceRecording .header{height:76px;min-height:76px;max-height:76px}#voice-voiceRecording .header .goto-voiceRecordings-button{margin-right:16px}#voice-voiceRecording .header .voiceRecording-image{overflow:hidden;width:56px;height:56px;margin-right:16px;border:3px solid rgba(0,0,0,.12)}#voice-voiceRecording .header .voiceRecording-image img{height:100%;width:auto;max-width:none}#voice-voiceRecording .header .subtitle{margin:6px 0 0 0}#voice-voiceRecording .voiceRecording-detail-form-container{padding:24px;margin-bottom:24px}#voice-voiceRecording .voiceRecording-detail-form-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}#voice-voiceRecording .voiceRecording-detail-form-container .handle{cursor:move}#voice-voiceRecording .voiceRecording-detail-form-container md-input-container md-switch{margin:0!important}#voice-voiceRecording .voiceRecording-detail-form-container #voiceRecording-image-uploader{position:relative}#voice-voiceRecording .voiceRecording-detail-form-container #voiceRecording-image-uploader.dropping .drop-text{display:flex}#voice-voiceRecording .voiceRecording-detail-form-container #voiceRecording-image-uploader .drop-text{display:none;position:absolute;top:0;right:0;bottom:0;left:0;padding:16px;text-align:center;border:2px dashed rgba(0,0,0,.12);background:#fff;font-size:20px;z-index:100}#voice-voiceRecording .voiceRecording-detail-form-container #voiceRecording-image-uploader .upload-button{margin-bottom:16px}#voice-voiceRecording .voiceRecording-detail-form-container #voiceRecording-image-uploader .voiceRecording-image{position:relative;width:200px;height:200px;border:1px solid rgba(0,0,0,.12);margin:8px}#voice-voiceRecording .voiceRecording-detail-form-container #voiceRecording-image-uploader .voiceRecording-image.uploading .overlay{position:absolute;top:0;right:0;bottom:0;left:0;background:rgba(0,0,0,.87)}#voice-voiceRecording .voiceRecording-detail-form-container #voiceRecording-image-uploader .voiceRecording-image .media{max-height:100%}#voice-voiceRecording md-table-container thead tr th:not(:first-child):not(.no-padding){padding:0 20px 0 0!important}#voice-voiceRecording md-table-container thead th.md-checkbox-column:not(.no-padding){padding:0 24px!important}#voice-voiceRecording md-table-container tbody tr td:not(:first-child):not(.no-padding):not(.actions-padding){padding:0 20px 0 0!important}#voice-voiceRecording md-table-container.font-size-12 td.md-cell{font-size:12px!important}#voice-voiceRecording .sentiment.POSITIVE{color:#4caf50;font-size:25px}#voice-voiceRecording .sentiment.NEGATIVE{color:#f40505;font-size:30px}#voice-voiceRecording .sentiment.NEUTRAL{color:#03a9f4;font-size:30px}#voice-voiceRecording .sentiment.MIXED{color:#9c27b0;font-size:30px}#voiceRecordings{position:relative}#voiceRecordings>.header{height:76px;min-height:76px;max-height:76px}#voiceRecordings>.header .logo .logo-icon{margin:0 16px 0 0}#voiceRecordings>.header .logo .logo-text{font-size:24px}#voiceRecordings>.header md-icon{color:#fff}#voiceRecordings>.header .search-input-wrapper{position:relative}#voiceRecordings>.header .search-input-wrapper label{padding-right:4px;cursor:pointer}#voiceRecordings>.header .search-input-wrapper label md-icon{color:rgba(255,255,255,.8)}#voiceRecordings>.header .search-input-wrapper md-input-container .md-errors-spacer{display:none}#voiceRecordings>.header .search-input-wrapper md-input-container input{border-bottom:1px solid rgba(255,255,255,.8);color:rgba(255,255,255,.8);width:240px}#voiceRecordings>.header .search-input-wrapper md-input-container input::placeholder{color:rgba(255,255,255,.8)}#voiceRecordings>.header .search-input-wrapper md-input-container input:focus{border-bottom:1px solid #fff;color:#fff}#voiceRecordings>.header.selected-bar{position:absolute;top:0;left:0;right:0;z-index:999;background-image:none;opacity:1!important}#voiceRecordings>.header.selected-bar .close-button-wrapper{width:244px}#voiceRecordings>.content{position:absolute;top:76px;bottom:0;right:0;left:0}#voiceRecordings>.content .main{padding:16px 90px 0 4px;position:absolute;top:0;left:24px;right:0;bottom:0}#voiceRecordings>.content .main .no-results{box-shadow:0 1px 1px 0 rgba(0,0,0,.14)}#voiceRecordings #add-voiceRecording-button{position:fixed;bottom:8px;right:8px;padding:0}#voiceRecordings #upload-voiceRecording-button{position:fixed;bottom:8px;right:8px;padding:0}#realtime{height:auto}#realtime>.content .blink{animation:blinker 2s linear infinite}#realtime>.content .avatar-wrapper{position:relative}#realtime>.content .avatar-wrapper .status{position:absolute;bottom:-3px;right:5px}#realtime>.content .search-input-wrapper{position:relative;margin-left:20px}#realtime>.content .search-input-wrapper label{padding:6px;cursor:pointer}#realtime>.content .search-input-wrapper md-input-container{padding-top:20px}#realtime>.content .main .labels{padding:8px 16px}#realtime>.content .main .labels .label{margin:0 0 2px 4px;padding:2px 5px;font-size:11px;white-space:nowrap;border-radius:2px}#realtime>.content .main .status{position:absolute;bottom:-3px;right:5px}#realtime>.content .main .avatar-wrapper{position:relative}#realtime>.content .main .avatar-wrapper .status{position:absolute;bottom:-3px;right:5px}#realtime>.content .custom-column{padding:0 24px!important}@keyframes blinker{50%{opacity:0}}md-dialog.whatsappAccount-dialog{max-width:720px;width:720px}md-dialog.whatsappAccount-dialog md-dialog-content{display:block;position:relative}md-dialog.whatsappAccount-dialog md-toolbar .title{font-size:17px}md-dialog.whatsappAccount-dialog md-input-container textarea{min-height:150px}md-dialog.whatsappAccount-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.whatsappAccount-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.whatsappAccount-dialog .date-container{padding:16px 0 24px 0}md-dialog.whatsappAccount-dialog .error-list{font-size:13px}md-dialog.whatsappAccount-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.whatsappAccount-dialog .error-list .error .message{font-weight:500}md-dialog.whatsappAccount-dialog .error-list .error .md-button{margin:0}md-dialog.whatsappAccount-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.whatsappAccount-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.whatsappAccount-dialog{max-width:720px;width:720px}md-dialog.whatsappAccount-dialog md-dialog-content{display:block;position:relative}md-dialog.whatsappAccount-dialog md-toolbar .title{font-size:17px}md-dialog.whatsappAccount-dialog md-input-container textarea{min-height:150px}md-dialog.whatsappAccount-dialog .date-container{padding:16px 0 24px 0}md-dialog.whatsappAccount-dialog .error-list{font-size:13px}md-dialog.whatsappAccount-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.whatsappAccount-dialog .error-list .error .message{font-weight:500}md-dialog.whatsappAccount-dialog .error-list .error .md-button{margin:0}md-dialog.whatsappAccount-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.whatsappAccount-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.whatsappAccount-dialog{max-width:720px;width:720px}md-dialog.whatsappAccount-dialog md-dialog-content{display:block;position:relative}md-dialog.whatsappAccount-dialog md-toolbar .title{font-size:17px}md-dialog.whatsappAccount-dialog md-input-container textarea{min-height:150px}md-dialog.whatsappAccount-dialog .date-container{padding:16px 0 24px 0}md-dialog.whatsappAccount-dialog .error-list{font-size:13px}md-dialog.whatsappAccount-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.whatsappAccount-dialog .error-list .error .message{font-weight:500}md-dialog.whatsappAccount-dialog .error-list .error .md-button{margin:0}md-dialog.whatsappAccount-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.whatsappAccount-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.whatsappAccount-dialog{max-width:720px;width:720px}md-dialog.whatsappAccount-dialog md-dialog-content{display:block;position:relative}md-dialog.whatsappAccount-dialog md-toolbar .title{font-size:17px}md-dialog.whatsappAccount-dialog md-input-container textarea{min-height:150px}md-dialog.whatsappAccount-dialog .date-container{padding:16px 0 24px 0}md-dialog.whatsappAccount-dialog .error-list{font-size:13px}md-dialog.whatsappAccount-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.whatsappAccount-dialog .error-list .error .message{font-weight:500}md-dialog.whatsappAccount-dialog .error-list .error .md-button{margin:0}md-dialog.whatsappAccount-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.whatsappAccount-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.whatsappAccount-dialog{max-width:720px;width:720px}md-dialog.whatsappAccount-dialog md-dialog-content{display:block;position:relative}md-dialog.whatsappAccount-dialog md-toolbar .title{font-size:17px}md-dialog.whatsappAccount-dialog md-input-container textarea{min-height:150px}md-dialog.whatsappAccount-dialog .date-container{padding:16px 0 24px 0}md-dialog.whatsappAccount-dialog .error-list{font-size:13px}md-dialog.whatsappAccount-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.whatsappAccount-dialog .error-list .error .message{font-weight:500}md-dialog.whatsappAccount-dialog .error-list .error .md-button{margin:0}md-dialog.whatsappAccount-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.whatsappAccount-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.whatsappAccount-dialog{max-width:720px;width:720px}md-dialog.whatsappAccount-dialog md-dialog-content{display:block;position:relative}md-dialog.whatsappAccount-dialog md-toolbar .title{font-size:17px}md-dialog.whatsappAccount-dialog md-input-container textarea{min-height:150px}md-dialog.whatsappAccount-dialog .date-container{padding:16px 0 24px 0}md-dialog.whatsappAccount-dialog .error-list{font-size:13px}md-dialog.whatsappAccount-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.whatsappAccount-dialog .error-list .error .message{font-weight:500}md-dialog.whatsappAccount-dialog .error-list .error .md-button{margin:0}md-dialog.whatsappAccount-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.whatsappAccount-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.whatsappAccount-dialog{max-width:720px;width:720px}md-dialog.whatsappAccount-dialog md-dialog-content{display:block;position:relative}md-dialog.whatsappAccount-dialog md-toolbar .title{font-size:17px}md-dialog.whatsappAccount-dialog md-input-container textarea{min-height:150px}md-dialog.whatsappAccount-dialog .date-container{padding:16px 0 24px 0}md-dialog.whatsappAccount-dialog .error-list{font-size:13px}md-dialog.whatsappAccount-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.whatsappAccount-dialog .error-list .error .message{font-weight:500}md-dialog.whatsappAccount-dialog .error-list .error .md-button{margin:0}md-dialog.whatsappAccount-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.whatsappAccount-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.whatsappAccount-dialog{max-width:720px;width:720px}md-dialog.whatsappAccount-dialog md-dialog-content{display:block;position:relative}md-dialog.whatsappAccount-dialog md-toolbar .title{font-size:17px}md-dialog.whatsappAccount-dialog md-input-container textarea{min-height:150px}md-dialog.whatsappAccount-dialog .date-container{padding:16px 0 24px 0}md-dialog.whatsappAccount-dialog .error-list{font-size:13px}md-dialog.whatsappAccount-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.whatsappAccount-dialog .error-list .error .message{font-weight:500}md-dialog.whatsappAccount-dialog .error-list .error .md-button{margin:0}md-dialog.whatsappAccount-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.whatsappAccount-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.whatsappAccount-dialog{max-width:720px;width:720px}md-dialog.whatsappAccount-dialog md-dialog-content{display:block;position:relative}md-dialog.whatsappAccount-dialog md-toolbar .title{font-size:17px}md-dialog.whatsappAccount-dialog md-input-container textarea{min-height:150px}md-dialog.whatsappAccount-dialog .date-container{padding:16px 0 24px 0}md-dialog.whatsappAccount-dialog .error-list{font-size:13px}md-dialog.whatsappAccount-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.whatsappAccount-dialog .error-list .error .message{font-weight:500}md-dialog.whatsappAccount-dialog .error-list .error .md-button{margin:0}md-dialog.whatsappAccount-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.whatsappAccount-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.whatsappAccount-dialog{max-width:720px;width:720px}md-dialog.whatsappAccount-dialog md-dialog-content{display:block;position:relative}md-dialog.whatsappAccount-dialog md-toolbar .title{font-size:17px}md-dialog.whatsappAccount-dialog md-input-container textarea{min-height:150px}md-dialog.whatsappAccount-dialog .date-container{padding:16px 0 24px 0}md-dialog.whatsappAccount-dialog .error-list{font-size:13px}md-dialog.whatsappAccount-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.whatsappAccount-dialog .error-list .error .message{font-weight:500}md-dialog.whatsappAccount-dialog .error-list .error .md-button{margin:0}md-dialog.whatsappAccount-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.whatsappAccount-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.whatsappAccount-dialog{max-width:720px;width:720px}md-dialog.whatsappAccount-dialog md-dialog-content{display:block;position:relative}md-dialog.whatsappAccount-dialog md-toolbar .title{font-size:17px}md-dialog.whatsappAccount-dialog md-input-container textarea{min-height:150px}md-dialog.whatsappAccount-dialog .date-container{padding:16px 0 24px 0}md-dialog.whatsappAccount-dialog .error-list{font-size:13px}md-dialog.whatsappAccount-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.whatsappAccount-dialog .error-list .error .message{font-weight:500}md-dialog.whatsappAccount-dialog .error-list .error .md-button{margin:0}md-dialog.whatsappAccount-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.whatsappAccount-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.whatsappAccount-dialog{max-width:720px;width:720px}md-dialog.whatsappAccount-dialog md-dialog-content{display:block;position:relative}md-dialog.whatsappAccount-dialog md-toolbar .title{font-size:17px}md-dialog.whatsappAccount-dialog md-input-container textarea{min-height:150px}md-dialog.whatsappAccount-dialog .date-container{padding:16px 0 24px 0}md-dialog.whatsappAccount-dialog .error-list{font-size:13px}md-dialog.whatsappAccount-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.whatsappAccount-dialog .error-list .error .message{font-weight:500}md-dialog.whatsappAccount-dialog .error-list .error .md-button{margin:0}md-dialog.whatsappAccount-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.whatsappAccount-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.whatsappAccount-dialog{max-width:720px;width:720px}md-dialog.whatsappAccount-dialog md-dialog-content{display:block;position:relative}md-dialog.whatsappAccount-dialog md-toolbar .title{font-size:17px}md-dialog.whatsappAccount-dialog md-input-container textarea{min-height:150px}md-dialog.whatsappAccount-dialog .date-container{padding:16px 0 24px 0}md-dialog.whatsappAccount-dialog .error-list{font-size:13px}md-dialog.whatsappAccount-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.whatsappAccount-dialog .error-list .error .message{font-weight:500}md-dialog.whatsappAccount-dialog .error-list .error .md-button{margin:0}md-dialog.whatsappAccount-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.whatsappAccount-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.whatsappAccount-dialog{max-width:720px;width:720px}md-dialog.whatsappAccount-dialog md-dialog-content{display:block;position:relative}md-dialog.whatsappAccount-dialog md-toolbar .title{font-size:17px}md-dialog.whatsappAccount-dialog md-input-container textarea{min-height:150px}md-dialog.whatsappAccount-dialog .date-container{padding:16px 0 24px 0}md-dialog.whatsappAccount-dialog .error-list{font-size:13px}md-dialog.whatsappAccount-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.whatsappAccount-dialog .error-list .error .message{font-weight:500}md-dialog.whatsappAccount-dialog .error-list .error .md-button{margin:0}md-dialog.whatsappAccount-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.whatsappAccount-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}#whatsapp-whatsappAccount .header{height:76px;min-height:76px;max-height:76px}#whatsapp-whatsappAccount .header .goto-whatsappAccounts-button{margin-right:16px}#whatsapp-whatsappAccount .header .whatsappAccount-image{overflow:hidden;width:56px;height:56px;margin-right:16px;border:3px solid rgba(0,0,0,.12)}#whatsapp-whatsappAccount .header .whatsappAccount-image img{height:100%;width:auto;max-width:none}#whatsapp-whatsappAccount .header .subtitle{margin:6px 0 0 0}#whatsapp-whatsappAccount .whatsappAccount-detail-form-container{padding:24px;margin-bottom:24px}#whatsapp-whatsappAccount .whatsappAccount-detail-form-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}#whatsapp-whatsappAccount .whatsappAccount-detail-form-container .handle{cursor:move}#whatsapp-whatsappAccount .whatsappAccount-detail-form-container md-input-container md-switch{margin:0!important}#whatsapp-whatsappAccount .whatsappAccount-detail-form-container #whatsappAccount-image-uploader{position:relative}#whatsapp-whatsappAccount .whatsappAccount-detail-form-container #whatsappAccount-image-uploader.dropping .drop-text{display:flex}#whatsapp-whatsappAccount .whatsappAccount-detail-form-container #whatsappAccount-image-uploader .drop-text{display:none;position:absolute;top:0;right:0;bottom:0;left:0;padding:16px;text-align:center;border:2px dashed rgba(0,0,0,.12);background:#fff;font-size:20px;z-index:100}#whatsapp-whatsappAccount .whatsappAccount-detail-form-container #whatsappAccount-image-uploader .upload-button{margin-bottom:16px}#whatsapp-whatsappAccount .whatsappAccount-detail-form-container #whatsappAccount-image-uploader .whatsappAccount-image{position:relative;width:200px;height:200px;border:1px solid rgba(0,0,0,.12);margin:8px}#whatsapp-whatsappAccount .whatsappAccount-detail-form-container #whatsappAccount-image-uploader .whatsappAccount-image.uploading .overlay{position:absolute;top:0;right:0;bottom:0;left:0;background:rgba(0,0,0,.87)}#whatsapp-whatsappAccount .whatsappAccount-detail-form-container #whatsappAccount-image-uploader .whatsappAccount-image .media{max-height:100%}#whatsapp-whatsappAccount md-table-container thead tr th:not(:first-child):not(.no-padding){padding:0 20px 0 0!important}#whatsapp-whatsappAccount md-table-container thead th.md-checkbox-column:not(.no-padding){padding:0 24px!important}#whatsapp-whatsappAccount md-table-container tbody tr td:not(:first-child):not(.no-padding):not(.actions-padding){padding:0 20px 0 0!important}#whatsapp-whatsappAccount md-table-container.font-size-12 td.md-cell{font-size:12px!important}@media screen and (min-width:1921px){#whatsapp-whatsappAccount .actionAppData{width:800px!important}}@media screen and (max-width:1920px){#whatsapp-whatsappAccount .actionAppData{width:700px!important}}@media screen and (min-width:1751px) and (max-width:1919px){#whatsapp-whatsappAccount .actionAppData{width:600px!important}}@media screen and (min-width:1601px) and (max-width:1750px){#whatsapp-whatsappAccount .actionAppData{width:500px!important}}@media screen and (min-width:1537px) and (max-width:1600px){#whatsapp-whatsappAccount .actionAppData{width:450px!important}}@media screen and (min-width:1281px) and (max-width:1536px){#whatsapp-whatsappAccount .actionAppData{width:300px!important}}@media screen and (max-width:1280px){#whatsapp-whatsappAccount .actionAppData{width:150px!important}}@media screen and (max-width:960px){#whatsapp-whatsappAccount .actionAppData{width:80px!important}}md-dialog.whatsappCannedAnswer-dialog{max-width:720px;width:720px}md-dialog.whatsappCannedAnswer-dialog md-dialog-content{display:block;position:relative}md-dialog.whatsappCannedAnswer-dialog md-toolbar .title{font-size:17px}md-dialog.whatsappCannedAnswer-dialog md-input-container textarea{min-height:150px}md-dialog.whatsappCannedAnswer-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.whatsappCannedAnswer-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.whatsappCannedAnswer-dialog .date-container{padding:16px 0 24px 0}md-dialog.whatsappCannedAnswer-dialog .error-list{font-size:13px}md-dialog.whatsappCannedAnswer-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.whatsappCannedAnswer-dialog .error-list .error .message{font-weight:500}md-dialog.whatsappCannedAnswer-dialog .error-list .error .md-button{margin:0}md-dialog.whatsappCannedAnswer-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.whatsappCannedAnswer-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}#whatsappAccounts{position:relative}#whatsappAccounts>.header{height:76px;min-height:76px;max-height:76px}#whatsappAccounts>.header .logo .logo-icon{margin:0 16px 0 0}#whatsappAccounts>.header .logo .logo-text{font-size:24px}#whatsappAccounts>.header md-icon{color:#fff}#whatsappAccounts>.header .search-input-wrapper{position:relative}#whatsappAccounts>.header .search-input-wrapper label{padding-right:4px;cursor:pointer}#whatsappAccounts>.header .search-input-wrapper label md-icon{color:rgba(255,255,255,.8)}#whatsappAccounts>.header .search-input-wrapper md-input-container .md-errors-spacer{display:none}#whatsappAccounts>.header .search-input-wrapper md-input-container input{border-bottom:1px solid rgba(255,255,255,.8);color:rgba(255,255,255,.8);width:240px}#whatsappAccounts>.header .search-input-wrapper md-input-container input::placeholder{color:rgba(255,255,255,.8)}#whatsappAccounts>.header .search-input-wrapper md-input-container input:focus{border-bottom:1px solid #fff;color:#fff}#whatsappAccounts>.header.selected-bar{position:absolute;top:0;left:0;right:0;z-index:999;background-image:none;opacity:1!important}#whatsappAccounts>.header.selected-bar .close-button-wrapper{width:244px}#whatsappAccounts>.content{position:absolute;top:76px;bottom:0;right:0;left:0}#whatsappAccounts>.content .main{padding:16px 90px 0 4px;position:absolute;top:0;left:24px;right:0;bottom:0}#whatsappAccounts>.content .main .no-results{box-shadow:0 1px 1px 0 rgba(0,0,0,.14)}#whatsappAccounts #add-whatsappAccount-button{position:fixed;bottom:8px;right:8px;padding:0}#whatsappAccounts #upload-whatsappAccount-button{position:fixed;bottom:8px;right:8px;padding:0}md-dialog.whatsappQueue-dialog{max-width:720px;width:720px}md-dialog.whatsappQueue-dialog md-dialog-content{display:block;position:relative}md-dialog.whatsappQueue-dialog md-toolbar .title{font-size:17px}md-dialog.whatsappQueue-dialog md-input-container textarea{min-height:150px}md-dialog.whatsappQueue-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.whatsappQueue-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.whatsappQueue-dialog .date-container{padding:16px 0 24px 0}md-dialog.whatsappQueue-dialog .error-list{font-size:13px}md-dialog.whatsappQueue-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.whatsappQueue-dialog .error-list .error .message{font-weight:500}md-dialog.whatsappQueue-dialog .error-list .error .md-button{margin:0}md-dialog.whatsappQueue-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.whatsappQueue-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}#whatsapp-whatsappQueue .header{height:76px;min-height:76px;max-height:76px}#whatsapp-whatsappQueue .header .goto-whatsappQueues-button{margin-right:16px}#whatsapp-whatsappQueue .header .whatsappQueue-image{overflow:hidden;width:56px;height:56px;margin-right:16px;border:3px solid rgba(0,0,0,.12)}#whatsapp-whatsappQueue .header .whatsappQueue-image img{height:100%;width:auto;max-width:none}#whatsapp-whatsappQueue .header .subtitle{margin:6px 0 0 0}#whatsapp-whatsappQueue .whatsappQueue-detail-form-container{padding:24px;margin-bottom:24px}#whatsapp-whatsappQueue .whatsappQueue-detail-form-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}#whatsapp-whatsappQueue .whatsappQueue-detail-form-container .handle{cursor:move}#whatsapp-whatsappQueue .whatsappQueue-detail-form-container md-input-container md-switch{margin:0!important}#whatsapp-whatsappQueue .whatsappQueue-detail-form-container #whatsappQueue-image-uploader{position:relative}#whatsapp-whatsappQueue .whatsappQueue-detail-form-container #whatsappQueue-image-uploader.dropping .drop-text{display:flex}#whatsapp-whatsappQueue .whatsappQueue-detail-form-container #whatsappQueue-image-uploader .drop-text{display:none;position:absolute;top:0;right:0;bottom:0;left:0;padding:16px;text-align:center;border:2px dashed rgba(0,0,0,.12);background:#fff;font-size:20px;z-index:100}#whatsapp-whatsappQueue .whatsappQueue-detail-form-container #whatsappQueue-image-uploader .upload-button{margin-bottom:16px}#whatsapp-whatsappQueue .whatsappQueue-detail-form-container #whatsappQueue-image-uploader .whatsappQueue-image{position:relative;width:200px;height:200px;border:1px solid rgba(0,0,0,.12);margin:8px}#whatsapp-whatsappQueue .whatsappQueue-detail-form-container #whatsappQueue-image-uploader .whatsappQueue-image.uploading .overlay{position:absolute;top:0;right:0;bottom:0;left:0;background:rgba(0,0,0,.87)}#whatsapp-whatsappQueue .whatsappQueue-detail-form-container #whatsappQueue-image-uploader .whatsappQueue-image .media{max-height:100%}#whatsapp-whatsappQueue md-table-container thead tr th:not(:first-child):not(.no-padding){padding:0 20px 0 0!important}#whatsapp-whatsappQueue md-table-container thead th.md-checkbox-column:not(.no-padding){padding:0 24px!important}#whatsapp-whatsappQueue md-table-container tbody tr td:not(:first-child):not(.no-padding):not(.actions-padding){padding:0 20px 0 0!important}#whatsapp-whatsappQueue md-table-container.font-size-12 td.md-cell{font-size:12px!important}#whatsappQueues{position:relative}#whatsappQueues>.header{height:76px;min-height:76px;max-height:76px}#whatsappQueues>.header .logo .logo-icon{margin:0 16px 0 0}#whatsappQueues>.header .logo .logo-text{font-size:24px}#whatsappQueues>.header md-icon{color:#fff}#whatsappQueues>.header .search-input-wrapper{position:relative}#whatsappQueues>.header .search-input-wrapper label{padding-right:4px;cursor:pointer}#whatsappQueues>.header .search-input-wrapper label md-icon{color:rgba(255,255,255,.8)}#whatsappQueues>.header .search-input-wrapper md-input-container .md-errors-spacer{display:none}#whatsappQueues>.header .search-input-wrapper md-input-container input{border-bottom:1px solid rgba(255,255,255,.8);color:rgba(255,255,255,.8);width:240px}#whatsappQueues>.header .search-input-wrapper md-input-container input::placeholder{color:rgba(255,255,255,.8)}#whatsappQueues>.header .search-input-wrapper md-input-container input:focus{border-bottom:1px solid #fff;color:#fff}#whatsappQueues>.header.selected-bar{position:absolute;top:0;left:0;right:0;z-index:999;background-image:none;opacity:1!important}#whatsappQueues>.header.selected-bar .close-button-wrapper{width:244px}#whatsappQueues>.content{position:absolute;top:76px;bottom:0;right:0;left:0}#whatsappQueues>.content .main{padding:16px 90px 0 4px;position:absolute;top:0;left:24px;right:0;bottom:0}#whatsappQueues>.content .main .no-results{box-shadow:0 1px 1px 0 rgba(0,0,0,.14)}#whatsappQueues #add-whatsappQueue-button{position:fixed;bottom:8px;right:8px;padding:0}#whatsappQueues #upload-whatsappQueue-button{position:fixed;bottom:8px;right:8px;padding:0}#layout-vertical-navigation-fullwidth-toolbar-2 #vertical-navigation{width:240px;min-width:240px;max-width:240px;overflow-x:hidden;transition:all .3s cubic-bezier(.55,0,.55,.2),width .1s linear,min-width .1s linear,max-width .1s linear;box-shadow:0 3px 5px -1px rgba(0,0,0,.2),0 6px 10px 0 rgba(0,0,0,.14),0 1px 18px 0 rgba(0,0,0,.12)}#layout-vertical-navigation-fullwidth-toolbar-2 #vertical-navigation .navigation-header{height:64px;min-height:64px;background-color:rgba(255,255,255,.05);padding:0 16px 0 24px}#layout-vertical-navigation-fullwidth-toolbar-2 #vertical-navigation:not(._md-locked-open){box-shadow:0 5px 5px -3px rgba(0,0,0,.2),0 8px 10px 1px rgba(0,0,0,.14),0 3px 14px 2px rgba(0,0,0,.12)}@media only screen and (min-width:960px){.ms-navigation-folded #content-container{margin-left:64px}.ms-navigation-folded #layout-vertical-navigation-fullwidth-toolbar-2 #vertical-navigation{position:absolute}.ms-navigation-folded:not(.ms-navigation-folded-open) #layout-vertical-navigation-fullwidth-toolbar-2 #vertical-navigation{position:absolute;width:64px;min-width:64px;max-width:64px}.ms-navigation-folded:not(.ms-navigation-folded-open) #layout-vertical-navigation-fullwidth-toolbar-2 #vertical-navigation .navigation-header{padding:0 16px}.ms-navigation-folded:not(.ms-navigation-folded-open) #layout-vertical-navigation-fullwidth-toolbar-2 #vertical-navigation .navigation-header .logo-text{display:none}}#vertical-navigation{width:240px;min-width:240px;max-width:240px;overflow-x:hidden;transition:all .3s cubic-bezier(.55,0,.55,.2),width .1s linear,min-width .1s linear,max-width .1s linear;box-shadow:0 3px 5px -1px rgba(0,0,0,.2),0 6px 10px 0 rgba(0,0,0,.14),0 1px 18px 0 rgba(0,0,0,.12)}#vertical-navigation .navigation-header{height:64px;min-height:64px;background-color:rgba(255,255,255,.05);padding:0 16px 0 24px}#vertical-navigation .navigation-header .logo .logo-image{display:block;width:32px;min-width:32px;height:32px;line-height:32px;text-align:center;font-size:16px;font-weight:500;color:#fff;border-radius:2px}#vertical-navigation .navigation-header .logo .logo-text{color:#fff;margin-left:16px;font-size:16px}#vertical-navigation .navigation-header .fold-toggle{transition:transform .3s ease-in-out .1s;transform:rotate(0);margin:0;padding:8px;width:34px!important;height:34px!important;cursor:pointer}#vertical-navigation:not(._md-locked-open){box-shadow:0 5px 5px -3px rgba(0,0,0,.2),0 8px 10px 1px rgba(0,0,0,.14),0 3px 14px 2px rgba(0,0,0,.12)}@media only screen and (min-width:960px){.ms-navigation-folded #content-container{margin-left:64px}.ms-navigation-folded #vertical-navigation{position:absolute}.ms-navigation-folded #vertical-navigation .navigation-header .fold-toggle{transform:rotate(180deg);opacity:0}.ms-navigation-folded.ms-navigation-folded-open #vertical-navigation .navigation-header .fold-toggle{transition:transform .3s ease-in-out .1s,opacity .3s ease-in-out .2s;opacity:1}.ms-navigation-folded:not(.ms-navigation-folded-open) #vertical-navigation{position:absolute;width:64px;min-width:64px;max-width:64px}.ms-navigation-folded:not(.ms-navigation-folded-open) #vertical-navigation .navigation-header{padding:0 16px}.ms-navigation-folded:not(.ms-navigation-folded-open) #vertical-navigation .navigation-header .logo-text{display:none}}#quick-panel{width:330px;min-width:330px;max-width:330px;z-index:99}#quick-panel md-content{height:100%}#quick-panel md-content md-tabs{position:static;height:100%}#quick-panel md-content md-tabs md-tabs-wrapper{background-color:rgba(0,0,0,.03);border-bottom:1px solid rgba(0,0,0,.06)}#quick-panel md-content md-tabs md-tabs-wrapper .md-tab{max-width:none!important}#quick-panel md-content md-tabs md-tabs-content-wrapper md-tab-content{height:100%;overflow:hidden}#quick-panel md-content md-tabs md-tabs-content-wrapper md-tab-content>div{overflow:hidden;height:100%}.unread-message-count-chat{position:absolute;top:5px;left:10px;width:18px;height:18px;z-index:10;border-radius:50%;text-align:center;line-height:18px;font-size:10px}@media screen and (max-width:600px){#quick-panel{width:80%;min-width:80%;max-width:80%}}#quick-panel .activity-tab .friends .friend{position:relative}#quick-panel .activity-tab .friends .friend .status{position:absolute;top:8px;left:44px;width:18px;height:18px;z-index:10;border-radius:50%;border:3px solid #fff}#quick-panel .activity-tab .friends .friend .status.online{background-color:#00c853}#quick-panel .activity-tab .friends .friend .status.offline{background-color:#d50000}#quick-panel .activity-tab .friends .friend .status.away{background-color:#ff6d00}#quick-panel .activity-tab .friends .friend .unread-message-count{position:absolute;left:16px;bottom:16px;width:18px;height:18px;z-index:10;border-radius:50%;text-align:center;line-height:18px;font-size:11px}#quick-panel .activity-tab .servers .server .status{margin:24px 20px 28px 8px}#quick-panel .activity-tab .servers .server .status.normal{color:#00c853}#quick-panel .activity-tab .servers .server .status.warn{color:#d50000}#quick-panel .activity-tab .servers .server .status.error{color:#ff6d00}#quick-panel .activity-tab .stat md-progress-linear.normal .md-bar{background-color:#00c853}#quick-panel .activity-tab .stat md-progress-linear.normal .md-container{background-color:rgba(0,200,83,.3)}#quick-panel .activity-tab .stat md-progress-linear.warn .md-bar{background-color:#ff6d00}#quick-panel .activity-tab .stat md-progress-linear.warn .md-container{background-color:rgba(255,109,0,.3)}#quick-panel .activity-tab .stat md-progress-linear.alert .md-bar{background-color:#d50000}#quick-panel .activity-tab .stat md-progress-linear.alert .md-container{background-color:rgba(213,0,0,.3)}#quick-panel .chat-tab .chat,#quick-panel .chat-tab .main{position:absolute;width:100%;top:0;bottom:0}#quick-panel .chat-tab .main .contact{position:relative}#quick-panel .chat-tab .main .contact .status{position:absolute;top:8px;left:44px;width:18px;height:18px;border:3px solid #fff;border-radius:50%;z-index:10}#quick-panel .chat-tab .main .contact .status.online{background-color:#00c853}#quick-panel .chat-tab .main .contact .status.offline{background-color:#d50000}#quick-panel .chat-tab .main .contact .status.away{background-color:#ff6d00}#quick-panel .chat-tab .main .contact .unread-message-count{position:absolute;left:16px;bottom:16px;width:18px;height:18px;z-index:10;border-radius:50%;text-align:center;line-height:18px;font-size:11px}#quick-panel .chat-tab .main .recent .contact .status{top:18px}#quick-panel .chat-tab .chat{max-height:100%;overflow:hidden}#quick-panel .chat-tab .chat .message-row .bubble{position:relative;padding:8px;background-color:#eceff1;border:1px solid #dcdfe1}#quick-panel .chat-tab .chat .message-row .bubble:after,#quick-panel .chat-tab .chat .message-row .bubble:before{content:' ';position:absolute;width:0;height:0}#quick-panel .chat-tab .chat .message-row .bubble:after{left:-7px;right:auto;top:0;bottom:auto;border:11px solid;border-color:#eceff1 transparent transparent transparent}#quick-panel .chat-tab .chat .message-row .bubble:before{left:-9px;right:auto;top:-1px;bottom:auto;border:8px solid;border-color:#dcdfe1 transparent transparent transparent}#quick-panel .chat-tab .chat .message-row .bubble .time{font-size:11px;margin-top:8px}#quick-panel .chat-tab .chat .message-row .bubble .message{word-wrap:break-word}#quick-panel .chat-tab .chat .message-row.contact .avatar{margin:0 16px 0 0}#quick-panel .chat-tab .chat .message-row.user{align-items:flex-end}#quick-panel .chat-tab .chat .message-row.user .avatar{order:2;margin:0 0 0 16px}#quick-panel .chat-tab .chat .message-row.user .bubble{background-color:#e8f5e9;border:1px solid #dfebe0;order:1}#quick-panel .chat-tab .chat .message-row.user .bubble:after{right:-7px;left:auto;top:auto;bottom:0;border-color:transparent transparent #e8f5e9 transparent}#quick-panel .chat-tab .chat .message-row.user .bubble:before{right:-9px;left:auto;top:auto;bottom:-1px;border-color:transparent transparent #dfebe0 transparent}#quick-panel .chat-tab .chat .reply{border-top:1px solid rgba(0,0,0,.12)}#quick-panel .chat-tab .chat .reply textarea{margin:8px;resize:none;padding:8px 16px 8px 8px}#timeline{position:relative;height:auto;padding-bottom:30px}#timeline:before{display:block;position:absolute;z-index:10;content:'';width:2px;background:rgba(0,0,0,.08);top:0;left:50%;bottom:0;margin-left:-1px}#timeline .ms-timeline-item{overflow:hidden;position:relative;z-index:20;width:100%;margin:0 auto;max-width:1200px}#timeline .ms-timeline-item .timeline-card{order:1}#timeline .ms-timeline-item .timeline-card .interaction .header .avatar .image{display:block;width:40px;height:40px;border-radius:20px}#timeline .ms-timeline-item .timeline-card .interaction .media .image{width:100%}#timeline .ms-timeline-item .timeline-point{position:absolute;width:40px;height:40px;line-height:40px;text-align:center;border-radius:50%;left:50%;margin:16px 0 0 -28px;order:2}#timeline .ms-timeline-item .timeline-point md-icon{color:#fff}#timeline .ms-timeline-item .timeline-detail{flex:50% 0 0;padding-top:28px;order:3}#timeline .ms-timeline-item .timeline-detail .time{font-size:15px;padding-left:68px}#timeline .ms-timeline-item .timeline-detail .event{color:rgba(0,0,0,.54);padding-left:68px}#timeline .ms-timeline-item:nth-child(odd) .timeline-card{flex-direction:row-reverse}#timeline .ms-timeline-item:nth-child(even) .timeline-card{order:3;padding-right:0}#timeline .ms-timeline-item:nth-child(even) .timeline-card ms-card{padding-left:84px}#timeline .ms-timeline-item:nth-child(even) .timeline-detail{order:1;padding-left:0;text-align:right}#timeline .ms-timeline-item:nth-child(even) .timeline-detail .event,#timeline .ms-timeline-item:nth-child(even) .timeline-detail .time{padding-right:68px}#timeline .ms-timeline-item:first-child{padding-top:15px}#timeline .ms-timeline-item.animate .timeline-card{animation:slide-in-left .4s}#timeline .ms-timeline-item.animate .timeline-point{animation:slide-in-bottom .4s}#timeline .ms-timeline-item.animate .timeline-detail{animation:slide-in-right .4s}#timeline .ms-timeline-item:nth-child(even).animate .timeline-card{animation:slide-in-right .4s}#timeline .ms-timeline-item:nth-child(even).animate .timeline-detail{animation:slide-in-left .4s}#timeline.timeline-left .ms-timeline-item .timeline-card{order:1}#timeline.timeline-left .ms-timeline-item .timeline-card ms-card{padding-right:68px;padding-left:0;margin-left:auto}#timeline.timeline-left .ms-timeline-item .timeline-detail{order:3;text-align:left}#timeline.timeline-left .ms-timeline-item.animate .timeline-card{animation:slide-in-left .4s}#timeline.timeline-left .ms-timeline-item.animate .timeline-detail{animation:slide-in-right .4s}#timeline.timeline-right .ms-timeline-item .timeline-card{order:3}#timeline.timeline-right .ms-timeline-item .timeline-card ms-card{padding-left:68px;padding-right:0;margin-right:auto}#timeline.timeline-right .ms-timeline-item .timeline-detail{order:1;text-align:right}#timeline.timeline-right .ms-timeline-item .timeline-detail .event,#timeline.timeline-right .ms-timeline-item .timeline-detail .time{padding-right:68px;padding-left:0}#timeline.timeline-right .ms-timeline-item.animate .timeline-card{animation:slide-in-right .4s}#timeline.timeline-right .ms-timeline-item.animate .timeline-detail{animation:slide-in-left .4s}md-dialog.group-dialog{max-width:720px;width:720px}md-dialog.group-dialog md-dialog-content{display:block;position:relative}md-dialog.group-dialog md-toolbar .title{font-size:17px}md-dialog.group-dialog md-input-container textarea{min-height:150px}md-dialog.group-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.group-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.group-dialog .date-container{padding:16px 0 24px 0}md-dialog.group-dialog .error-list{font-size:13px}md-dialog.group-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.group-dialog .error-list .error .message{font-weight:500}md-dialog.group-dialog .error-list .error .md-button{margin:0}md-dialog.group-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.group-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}#quick-panel .group-tab .chat,#quick-panel .group-tab .main{position:absolute;width:100%;top:0;bottom:0}#quick-panel .group-tab .main .contact{position:relative}#quick-panel .group-tab .main .contact .status{position:absolute;top:8px;left:44px;width:18px;height:18px;border:3px solid #fff;border-radius:50%;z-index:10}#quick-panel .group-tab .main .contact .status.online{background-color:#00c853}#quick-panel .group-tab .main .contact .status.offline{background-color:#d50000}#quick-panel .group-tab .main .contact .status.away{background-color:#ff6d00}#quick-panel .group-tab .main .contact .unread-message-count{position:absolute;left:16px;bottom:16px;width:18px;height:18px;z-index:10;border-radius:50%;text-align:center;line-height:18px;font-size:11px}#quick-panel .group-tab .main .recent .contact .status{top:18px}#quick-panel .group-tab .chat{max-height:100%;overflow:hidden}#quick-panel .group-tab .chat .message-row{padding:8px}#quick-panel .group-tab .chat .message-row .bubble{position:relative;padding:8px;background-color:#eceff1;border:1px solid #dcdfe1}#quick-panel .group-tab .chat .message-row .bubble:after,#quick-panel .group-tab .chat .message-row .bubble:before{content:' ';position:absolute;width:0;height:0}#quick-panel .group-tab .chat .message-row .bubble:after{left:-7px;right:auto;top:0;bottom:auto;border:11px solid;border-color:#eceff1 transparent transparent transparent}#quick-panel .group-tab .chat .message-row .bubble:before{left:-9px;right:auto;top:-1px;bottom:auto;border:8px solid;border-color:#dcdfe1 transparent transparent transparent}#quick-panel .group-tab .chat .message-row .bubble .time{font-size:11px;margin-top:8px}#quick-panel .group-tab .chat .message-row .bubble .message{word-wrap:break-word}#quick-panel .group-tab .chat .message-row.contact .avatar{margin:0 16px 0 0}#quick-panel .group-tab .chat .message-row.user{align-items:flex-end}#quick-panel .group-tab .chat .message-row.user .avatar{order:2;margin:0 0 0 16px}#quick-panel .group-tab .chat .message-row.user .bubble{background-color:#e8f5e9;border:1px solid #dfebe0;order:1}#quick-panel .group-tab .chat .message-row.user .bubble:after{right:-7px;left:auto;top:auto;bottom:0;border-color:transparent transparent #e8f5e9 transparent}#quick-panel .group-tab .chat .message-row.user .bubble:before{right:-9px;left:auto;top:auto;bottom:-1px;border-color:transparent transparent #dfebe0 transparent}#quick-panel .group-tab .chat .reply{border-top:1px solid rgba(0,0,0,.12)}#quick-panel .group-tab .chat .reply textarea{margin:8px;resize:none;padding:8px 16px 8px 8px}md-dialog.group-dialog{max-width:720px;width:720px}md-dialog.group-dialog md-dialog-content{display:block;position:relative}md-dialog.group-dialog md-toolbar .title{font-size:17px}md-dialog.group-dialog md-input-container textarea{min-height:150px}md-dialog.group-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.group-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.group-dialog .date-container{padding:16px 0 24px 0}md-dialog.group-dialog .error-list{font-size:13px}md-dialog.group-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.group-dialog .error-list .error .message{font-weight:500}md-dialog.group-dialog .error-list .error .md-button{margin:0}md-dialog.group-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.group-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}#reset-password{height:100%;background:url(/assets/images/backgrounds/tech.png) no-repeat;background-size:cover}#reset-password #reset-password-form-wrapper{flex:1 0 auto;padding:32px}#reset-password #reset-password-form-wrapper #reset-password-form{width:384px;max-width:384px;padding:32px;text-align:center;background:#fff}#reset-password #reset-password-form-wrapper #reset-password-form .logo{width:128px;height:128px;line-height:128px;font-size:86px;font-weight:500;margin:32px auto;color:#fff;border-radius:2px}#reset-password #reset-password-form-wrapper #reset-password-form .title{font-size:17px;margin:16px 0 32px 0}#reset-password #reset-password-form-wrapper #reset-password-form .logo_login{max-height:200px}#reset-password #reset-password-form-wrapper #reset-password-form form{width:100%;text-align:left}#reset-password #reset-password-form-wrapper #reset-password-form form .submit-button{width:220px;margin:16px auto;display:block}#reset-password #reset-password-form-wrapper #reset-password-form .login{margin:32px auto 24px auto;width:250px;font-weight:500}#reset-password #reset-password-form-wrapper #reset-password-form .login .text{margin-right:8px}@media screen and (max-width:600px){#reset-password #reset-password-form-wrapper{padding:16px}#reset-password #reset-password-form-wrapper #reset-password-form{padding:24px;width:100%}#reset-password #reset-password-form-wrapper #reset-password-form form .md-button{width:90%}}md-dialog.preview-dialog{max-width:1020px;width:1020px}md-dialog.preview-dialog md-dialog-content{display:block;position:relative;padding:0}md-dialog.preview-dialog md-dialog-content .recall-me-info{position:relative;overflow-y:hidden;overflow-x:auto;background-color:rgba(0,0,0,.03);border-bottom:1px solid rgba(0,0,0,.12);min-height:64px;padding:8px 8px 8px 16px}md-dialog.preview-dialog md-toolbar .title{font-size:17px}md-dialog.preview-dialog md-input-container textarea{min-height:150px}md-dialog.preview-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.preview-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.preview-dialog .date-container{padding:16px 0 24px 0}md-dialog.preview-dialog .error-list{font-size:13px}md-dialog.preview-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.preview-dialog .error-list .error .message{font-weight:500}md-dialog.preview-dialog .error-list .error .md-button{margin:0}md-dialog.preview-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.preview-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}#toolbar{width:100%;height:64px;min-height:64px;max-height:64px;z-index:55!important}#toolbar .blink{animation:blinker 2s linear infinite}#toolbar #navigation-toggle{width:64px;min-width:64px;height:64px;margin:0;border-right:1px solid rgba(0,0,0,.12);border-radius:0}#toolbar .logo-image{display:block;width:32px;min-width:32px;height:32px;line-height:32px;text-align:center;font-size:16px;font-weight:500;color:#fff;border-radius:2px;margin-left:10px;margin-right:8px}#toolbar #user-menu{height:64px;padding:0}#toolbar #user-menu md-menu-item .md-button{font-size:15px}#toolbar #user-menu md-menu-item .md-button md-icon{margin:auto 16px auto 0}#toolbar #user-menu .user-button{margin:0;padding:0 16px;height:64px;text-transform:none}#toolbar #user-menu .user-button .avatar-wrapper{position:relative}#toolbar #user-menu .user-button .avatar-wrapper .status{position:absolute;bottom:-3px;right:5px}#toolbar #user-menu .user-button .username{margin:0 12px 0 8px}#toolbar #language-menu{height:64px}#toolbar #language-menu .language-button{min-width:64px;height:64px;margin:0;padding:0 16px;border-radius:0}#toolbar #language-menu .language-button .iso{text-transform:uppercase}#toolbar #language-menu .language-button .flag{margin-right:8px}#toolbar #quick-panel-toggle{width:64px;height:64px;margin:0;border-radius:0}#toolbar #quick-panel-toggle .unread-message-count{position:absolute;top:8px;left:38px;width:18px;height:18px;z-index:10;border-radius:50%;text-align:center;line-height:18px;font-size:10px}#toolbar .toolbar-separator{height:64px;width:1px;background:rgba(0,0,0,.12)}#language-menu-content md-menu-item .flag{margin-right:16px}#language-message{min-height:88px;max-width:600px}#language-message .md-toast-content{height:90px}.open-contact-count{left:25px}.md-button.preview-button{min-width:46px;min-height:50px}@media screen and (max-width:600px){#toolbar #user-menu .user-button{min-width:64px;padding:0 2px 0 10px}}.badge-count{position:absolute;top:1px;width:18px;height:18px;z-index:10;border-radius:50%;text-align:center;line-height:18px;font-size:10px}.queues-call-count{left:27px}.geEditor{font-family:Helvetica Neue,Helvetica,Arial Unicode MS,Arial;font-size:10pt;overflow:hidden;height:100%}.geMenubarContainer .geItem,.geSidebarContainer .geTitle,.geToolbar .geButton,.geToolbar .geLabel{cursor:pointer!important}.geContentEditable div,.geContentEditable table,.geContentEditable table td{border:1px dashed #d3d3d3}.geBackgroundPage{-webkit-box-shadow:0 0 3px 0 #d9d9d9;-moz-box-shadow:0 0 3px 0 #d9d9d9;box-shadow:0 0 3px 0 #d9d9d9}.geMenubarContainer a,.geSidebarContainer a,.geToolbar a{color:#000!important;text-decoration:none}.geDiagramContainer,.geFooterContainer,.geHsplit,.geMenubarContainer,.geOutlineContainer,.geSidebarContainer,.geToolbarContainer,.geVsplit{overflow:hidden;position:absolute;cursor:default}.geDiagramContainer,.geOutlineContainer{background-color:#fff;outline:0}.geMenubar,.geToolbar{white-space:nowrap;display:block;width:100%}.geMenubarContainer .geItem,.geSidebar,.geSidebar .geItem,.geSidebarContainer .geTitle,.geToolbar .geButton,.geToolbar .geLabel,.mxPopupMenuItem{-webkit-transition:all .1s ease-in-out;-moz-transition:all .1s ease-in-out;-o-transition:all .1s ease-in-out;-ms-transition:all .1s ease-in-out;transition:all .1s ease-in-out}.geHint{background-color:#fff;border:1px solid gray;padding:4px 16px 4px 16px;border-radius:3px;-webkit-box-shadow:1px 1px 2px 0 #ddd;-moz-box-shadow:1px 1px 2px 0 #ddd;box-shadow:1px 1px 2px 0 #ddd;opacity:.8}.geStatusAlert{white-space:nowrap;margin-top:-5px;font-size:12px;padding:4px 6px 4px 6px;background-color:#f2dede;border:1px solid #ebccd1;color:#a94442!important;border-radius:3px}.geStatusAlert:hover{background-color:#f1d8d8;border-color:#d6b2b8}.geStatusMessage{white-space:nowrap;margin-top:-5px;padding:4px 6px 4px 6px;font-size:12px;background-image:-webkit-linear-gradient(top,#dff0d8 0,#c8e5bc 100%);background-image:-o-linear-gradient(top,#dff0d8 0,#c8e5bc 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#dff0d8),to(#c8e5bc));background-image:linear-gradient(to bottom,#dff0d8 0,#c8e5bc 100%);background-repeat:repeat-x;border:1px solid #b2dba1;border-radius:3px;color:#3c763d!important}.geStatusMessage:hover{background:#c8e5bc;border-color:#b2dba1}.geAlert{position:absolute;white-space:nowrap;padding:14px;background-color:#f2dede;border:1px solid #ebccd1;color:#a94442;border-radius:3px;-webkit-box-shadow:2px 2px 3px 0 #ddd;-moz-box-shadow:2px 2px 3px 0 #ddd;box-shadow:2px 2px 3px 0 #ddd}.geBtn{background-color:#f5f5f5;border-radius:2px;border:1px solid #d8d8d8;color:#333;cursor:default;font-size:11px;font-weight:700;height:29px;line-height:27px;margin:0 0 0 8px;min-width:72px;outline:0;padding:0 8px;cursor:pointer}.geBtn:hover{-webkit-box-shadow:0 1px 1px rgba(0,0,0,.1);-moz-box-shadow:0 1px 1px rgba(0,0,0,.1);box-shadow:0 1px 1px rgba(0,0,0,.1);border:1px solid #c6c6c6;background-color:#f8f8f8;background-image:linear-gradient(#f8f8f8 0,#f1f1f1 100%);color:#111}.geBtn:disabled{opacity:.5}.geBtnUp{background-image:url(data:image/gif;base64,R0lGODlhCgAGAJECAGZmZtXV1f///wAAACH/C1hNUCBEYXRhWE1QPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4gPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iQWRvYmUgWE1QIENvcmUgNS4wLWMwNjAgNjEuMTM0Nzc3LCAyMDEwLzAyLzEyLTE3OjMyOjAwICAgICAgICAiPiA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPiA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtbG5zOnhtcE1NPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvbW0vIiB4bWxuczpzdFJlZj0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL3NUeXBlL1Jlc291cmNlUmVmIyIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgQ1M1IE1hY2ludG9zaCIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDo0QzM3ODJERjg4NUQxMUU0OTFEQ0E2MzRGQzcwNUY3NCIgeG1wTU06RG9jdW1lbnRJRD0ieG1wLmRpZDo0QzM3ODJFMDg4NUQxMUU0OTFEQ0E2MzRGQzcwNUY3NCI+IDx4bXBNTTpEZXJpdmVkRnJvbSBzdFJlZjppbnN0YW5jZUlEPSJ4bXAuaWlkOjRDMzc4MkREODg1RDExRTQ5MURDQTYzNEZDNzA1Rjc0IiBzdFJlZjpkb2N1bWVudElEPSJ4bXAuZGlkOjRDMzc4MkRFODg1RDExRTQ5MURDQTYzNEZDNzA1Rjc0Ii8+IDwvcmRmOkRlc2NyaXB0aW9uPiA8L3JkZjpSREY+IDwveDp4bXBtZXRhPiA8P3hwYWNrZXQgZW5kPSJyIj8+Af/+/fz7+vn49/b19PPy8fDv7u3s6+rp6Ofm5eTj4uHg397d3Nva2djX1tXU09LR0M/OzczLysnIx8bFxMPCwcC/vr28u7q5uLe2tbSzsrGwr66trKuqqainpqWko6KhoJ+enZybmpmYl5aVlJOSkZCPjo2Mi4qJiIeGhYSDgoGAf359fHt6eXh3dnV0c3JxcG9ubWxramloZ2ZlZGNiYWBfXl1cW1pZWFdWVVRTUlFQT05NTEtKSUhHRkVEQ0JBQD8+PTw7Ojk4NzY1NDMyMTAvLi0sKyopKCcmJSQjIiEgHx4dHBsaGRgXFhUUExIREA8ODQwLCgkIBwYFBAMCAQAAIfkEAQAAAgAsAAAAAAoABgAAAg6UjwiQBhGYglCKhXFLBQA7);background-position:center center;background-repeat:no-repeat}.geBtnUp:active{background-color:#4d90fe;background-image:linear-gradient(#4d90fe 0,#357ae8 100%)}.geBtnDown{background-image:url(data:image/gif;base64,R0lGODlhCgAGAJECANXV1WZmZv///wAAACH/C1hNUCBEYXRhWE1QPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4gPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iQWRvYmUgWE1QIENvcmUgNS4wLWMwNjAgNjEuMTM0Nzc3LCAyMDEwLzAyLzEyLTE3OjMyOjAwICAgICAgICAiPiA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPiA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtbG5zOnhtcE1NPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvbW0vIiB4bWxuczpzdFJlZj0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL3NUeXBlL1Jlc291cmNlUmVmIyIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgQ1M1IE1hY2ludG9zaCIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDo0QzM3ODJEQjg4NUQxMUU0OTFEQ0E2MzRGQzcwNUY3NCIgeG1wTU06RG9jdW1lbnRJRD0ieG1wLmRpZDo0QzM3ODJEQzg4NUQxMUU0OTFEQ0E2MzRGQzcwNUY3NCI+IDx4bXBNTTpEZXJpdmVkRnJvbSBzdFJlZjppbnN0YW5jZUlEPSJ4bXAuaWlkOjRDMzc4MkQ5ODg1RDExRTQ5MURDQTYzNEZDNzA1Rjc0IiBzdFJlZjpkb2N1bWVudElEPSJ4bXAuZGlkOjRDMzc4MkRBODg1RDExRTQ5MURDQTYzNEZDNzA1Rjc0Ii8+IDwvcmRmOkRlc2NyaXB0aW9uPiA8L3JkZjpSREY+IDwveDp4bXBtZXRhPiA8P3hwYWNrZXQgZW5kPSJyIj8+Af/+/fz7+vn49/b19PPy8fDv7u3s6+rp6Ofm5eTj4uHg397d3Nva2djX1tXU09LR0M/OzczLysnIx8bFxMPCwcC/vr28u7q5uLe2tbSzsrGwr66trKuqqainpqWko6KhoJ+enZybmpmYl5aVlJOSkZCPjo2Mi4qJiIeGhYSDgoGAf359fHt6eXh3dnV0c3JxcG9ubWxramloZ2ZlZGNiYWBfXl1cW1pZWFdWVVRTUlFQT05NTEtKSUhHRkVEQ0JBQD8+PTw7Ojk4NzY1NDMyMTAvLi0sKyopKCcmJSQjIiEgHx4dHBsaGRgXFhUUExIREA8ODQwLCgkIBwYFBAMCAQAAIfkEAQAAAgAsAAAAAAoABgAAAg6UjxLLewEiCAnOZBzeBQA7);background-position:center center;background-repeat:no-repeat}.geBtnDown:active{background-color:#4d90fe;background-image:linear-gradient(#4d90fe 0,#357ae8 100%)}.geColorBtn{background-color:#f5f5f5;background-image:linear-gradient(#f5f5f5 0,#e1e1e1 100%);border-radius:4px;border:1px solid rgba(0,0,0,.5);color:#333;cursor:default;margin:0;outline:0;padding:0;cursor:pointer}.geColorBtn:hover{-webkit-box-shadow:0 1px 1px rgba(0,0,0,.1);-moz-box-shadow:0 1px 1px rgba(0,0,0,.1);box-shadow:0 1px 1px rgba(0,0,0,.1);border:1px solid rgba(0,0,0,.7)}.geColorBtn:active{background-color:#4d90fe;background-image:linear-gradient(#4d90fe 0,#357ae8 100%);border:1px solid #2f5bb7;color:#fff}.geColorBtn:disabled{opacity:.5}.gePrimaryBtn{background-color:#4d90fe;background-image:linear-gradient(#4d90fe 0,#4787ed 100%);border:1px solid #3079ed;color:#fff}.gePrimaryBtn:hover{background-color:#357ae8;background-image:linear-gradient(#4d90fe 0,#357ae8 100%);border:1px solid #2f5bb7;color:#fff}.gePrimaryBtn:disabled{opacity:.5}.geAlertLink{color:#843534;font-weight:700;text-decoration:none}.geMenubarContainer{background-color:#fff}.geMenubar{padding:0 2px 0 2px;vertical-align:middle}.geMenubarContainer .geItem,.geToolbar .geItem{padding:6px 8px 6px 8px;cursor:default}.geMenubarContainer .geItem:hover,.geToolbarContainer .geItem:hover{background:#eee}.mxDisabled:hover{background:inherit!important}.geMenubar a.geStatus{color:#b3b3b3;padding-left:6px;display:inline-block;cursor:default!important}.geMenubar a.geStatus:hover{background:0 0}.geMenubarMenu{border:1px solid #d5d5d5!important}.geToolbarContainer{background:#f5f5f5;border-bottom:1px solid #e0e0e0}.geSidebarContainer .geToolbarContainer{background:0 0;border-bottom:none}.geSidebarContainer button{text-overflow:ellipsis;overflow:hidden}.geToolbar{padding:1px 0 0 6px;border-top:1px solid #e0e0e0;-webkit-box-shadow:inset 0 1px 0 0 #fff;-moz-box-shadow:inset 0 1px 0 0 #fff;box-shadow:inset 0 1px 0 0 #fff}.geToolbarContainer .geSeparator{float:left;width:1px;height:34px;background:#e5e5e5;margin-left:6px;margin-right:6px;margin-top:-2px}.geToolbarContainer .geButton{float:left;width:20px;height:20px;padding:0 2px 4px 2px;margin:2px;border:1px solid transparent;cursor:pointer;opacity:.6}.geToolbarContainer .geButton:hover{border:1px solid gray;border-radius:2px;opacity:1;filter:none!important}.geToolbarContainer .geButton:active{border:1px solid #000}div.mxWindow .geButton{margin:-1px 2px 2px 2px;padding:1px 2px 2px 1px}.geToolbarContainer .geLabel{float:left;margin:2px;cursor:pointer;padding:3px 5px 3px 5px;border:1px solid transparent;opacity:.6}.geToolbarContainer .geLabel:hover{border:1px solid gray;border-radius:2px;opacity:.9}.geToolbarContainer .geLabel:active{border:1px solid #000;opacity:1;filter:none!important}.geToolbarContainer .mxDisabled:hover{border:1px solid transparent!important;opacity:.2!important}.geToolbarMenu{border:3px solid #e0e0e0!important;-webkit-box-shadow:none!important;-moz-box-shadow:none!important;box-shadow:none!important;filter:none!important}.geDiagramBackdrop{background-color:#ebebeb;border-style:solid;border-color:#e5e5e5;border-width:1px 0 0 1px}.geSidebarContainer{background:#fff;overflow:hidden;position:absolute;border-top:1px solid #e5e5e5;overflow:auto}.geSidebar{background:#f5f5f5;border-bottom:1px solid #e5e5e5;padding:5px;padding-bottom:12px;overflow:hidden}.geSidebarContainer .geTitle{display:block;font-size:9pt;border-bottom:1px solid #e5e5e5;font-weight:400;padding:6px 0 6px 14px;margin:0;cursor:default;background:#eee;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;line-height:1.4em}.geSidebarContainer .geTitle:hover{background:#e5e5e5}.geTitle img{opacity:.5}.geTitle img:hover{opacity:1}.geSidebar .geItem{display:inline-block;background-repeat:no-repeat;background-position:50% 50%;border:1px solid transparent;border-radius:2px;cursor:move}.geSidebar .geItem:hover{border:1px solid gray!important}.geItem{vertical-align:top;display:inline-block}.geSidebarTooltip{position:absolute;background:#fff;overflow:hidden;border:1px solid gray;border-radius:8px;-webkit-box-shadow:0 0 2px 2px #d5d5d5;-moz-box-shadow:0 0 2px 2px #d5d5d5;box-shadow:0 0 2px 2px #d5d5d5}.geFooterContainer{background:#e5e5e5;border-top:1px solid silver}.geFooterContainer a{font-size:14px;color:#235695;font-weight:700;text-decoration:none}.geFooterContainer table{border-collapse:collapse;margin:0 auto}.geFooterContainer td{border-left:1px solid silver;border-right:1px solid silver}.geFooterContainer td:hover{background-color:#b3b3b3}.geFooterContainer a{display:block;box-sizing:border-box;width:100%;height:100%;padding:11px 42px 11px 42px;white-space:nowrap}.geHsplit{cursor:col-resize;background-color:#e5e5e5;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAAHBAMAAADdS/HjAAAAGFBMVEUzMzP///9tbW1QUFCKiopBQUF8fHxfX1/IXlmXAAAAHUlEQVQImWMQEGAQFWUQFmYQF2cQEmIQE2MQEQEACy4BF67hpEwAAAAASUVORK5CYII=);background-repeat:no-repeat;background-position:center center}.geVsplit{font-size:1pt;cursor:row-resize;background-color:#e5e5e5;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAcAAAAEBAMAAACw6DhOAAAAGFBMVEUzMzP///9tbW1QUFCKiopBQUF8fHxfX1/IXlmXAAAAFElEQVQImWNgNVdzYBAUFBRggLMAEzYBy29kEPgAAAAASUVORK5CYII=);background-repeat:no-repeat;background-position:center center}.geHsplit:hover,.geVsplit:hover{background-color:#d5d5d5}.geDialog{position:absolute;background:#fff;overflow:hidden;padding:30px;border:1px solid #acacac;-webkit-box-shadow:0 0 2px 2px #d5d5d5;-moz-box-shadow:0 0 2px 2px #d5d5d5;box-shadow:0 0 2px 2px #d5d5d5;z-index:2}.geDialogClose{position:absolute;width:9px;height:9px;opacity:.5;cursor:pointer}.geDialogClose:hover{opacity:1}.geDialogTitle{box-sizing:border-box;white-space:nowrap;background:#e5e5e5;border-bottom:1px solid silver;font-size:15px;font-weight:700;text-align:center;color:#235695}.geDialogFooter{background:#f5f5f5;white-space:nowrap;text-align:right;box-sizing:border-box;border-top:1px solid #e5e5e5;color:#a9a9a9}.geSprite{background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABUAAAk/CAYAAACauMYVAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAACXBIWXMAAAsTAAALEwEAmpwYAAABWWlUWHRYTUw6Y29tLmFkb2JlLnhtcAAAAAAAPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iWE1QIENvcmUgNS40LjAiPgogICA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPgogICAgICA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIgogICAgICAgICAgICB4bWxuczp0aWZmPSJodHRwOi8vbnMuYWRvYmUuY29tL3RpZmYvMS4wLyI+CiAgICAgICAgIDx0aWZmOk9yaWVudGF0aW9uPjE8L3RpZmY6T3JpZW50YXRpb24+CiAgICAgIDwvcmRmOkRlc2NyaXB0aW9uPgogICA8L3JkZjpSREY+CjwveDp4bXBtZXRhPgpMwidZAAAWn0lEQVR4Ae2dW4gdxdbHO0aJYjzxTtR4EhSDSNB84kPEQOL9CB/Ex4igg8iAGCSgiIIQH1SOqJAnn4N4wBdvYBRBcYTIp0+OF0SDYoJRgyAmeA1e5lv/PrM6q6urqqu7a2/3ZP4NPVVdtda/Vv2qZ9Nrd++9i2IE2xJoHn/88XOq/ccff5RtepxSuv7HqxPE0GkNtC+lVH/YjiTSKoi+EaqA9T9OG3OW4xNdu3btHPZY9DGbRqRtYhiozaYhunfvXu95aoVCNjqzhqh2uGWbkLVPFrWRWgFfvSFqnW3dOtt2W7c2Zd2evI3OhAbr34g0wb/VZOGIjuRVagG+nrYuKQ1IgARIgARIgARIgARIoEbAm93BwmYb1mP58uXFoUOHgn6wTUok8K4Ddgj+9NNPxamnnhpNhpNENdL169eXVQj32jB93VUAEaJNxKORBtmEmGIAoNCBfGXS9C1TiLRF6huobNOp24g3b97cQBIU8HX4RJVp2+oH2dgI7aAp56m1Z50ESIAESIAESIAESIAESGCREtBMJXX6SclZqpjaUVRJ5CuPEabI623ii3rvXN/SVeFsgioO4SwRquDElNU7E3ZB+kTX9g5QH036kAAJkAAJkAAJkAAJkMDEEqiupBFh36vpsVxF1yJVnqkRjyVCDaoWaWqE6qzlWCKuRaojp0Y8lgg1qFqkqRGqs5ZjibgWqY6cGvFYItSgWJIACZAACZAACZAACZDAJBHwXknbAENX1bGr6IZoSMQO5KvbQUZyi9M36OC2xvRVMRWDnbb6jmT6FFW8+UoyzcdSlUbCVMVZkgAJkAAJkAAJkAAJTCqB1Pypc/yu8Jo1a6KfhE0eAMI7duyYS/04aJIwBCGsUeL507bPmbYKQwCCFsUgYQjaJ2MHC7uCvim1RVxLzSHY5YPUq1atKvbt21fTQBC9sxN8ltcnCNHGKCnR2g8HP/TQQ+U5/Mgjj1RajUjxiXc4hTYrCJtff/213K19pW4bUfdF7Aree++9tf+0p556qtRrRKribsSuoNr1KhEx9pAzonUjDtmynQRIgARIgARIgARIgASOGQLlNbrN6Hy3LNtm6/ovwC+qtVNom66v3/p7Ux4YuLsrZLNst686tiO5grZPHdCmbzCgzdp4I1VHX6kDou/AgQOFFW7Y25HU0ZauA/ps0mb9O0eq4uvWrWv9OrgaE3XsUmaJNDZgdPp29JiI2xcVdY1Tj72iOLE1SpRJJ7pvRBXRPpwuaLOnjfb5Ste/tPE1Rk9sR9n68/XUgcNDEiABEiABEiABEjgmCTTunMkl4Z65ublVbbM97rjj3v3999+3+uyqLFo7Ifjqq6+ulq1YsqQxJr6huXj77beLe+65Z5/6uGVDFAZysVtcdNFFXlGJrpDfPSp13nrrLczouauvvnpj2TD/x3vNjz5flOooUy8uvPDCDV9//fX/yb3ADc8///we7UMZFEXnn3/+WbzwwgvF559/XiBCbCeccEJx/fXXF4899tiyxx9/fNXpp5++VO4K19bAO/3SW/4goquuuqp4+OGHi08//bQ8vuyyy4rbb7+9ePTRR4svvvjioAyy9a+//jqiPt5y6dKl+z777DNZr6Pb+++/P3fHHXfMSd/cGWecMXf55Zcjc3lfBDZ4RdxGnyjkZ2Zm5q655ppSGOIiOuP66nGUKYx++eWX4pVXXilXfGpqqnjppZcKuZNbyDjrzzvvvJk33njjORXTMioqrIoPPvigPDdxmm3cuLG49tpri5tvvrm47bbbVkj/pp9//vlfL7744nYVRBldKBgsW7asEIbFWWedVZx00kkFBvrtt9/QVZ520r/ihx9+gOjOslH+REWx+hC0G04zWcjimWee2X/OOefsWrFiRfHtt98esjZeUTji39H3D4B29EvfPnkP5eErr7zS6pV1r+h7771XfPXVV0HRjz76qCFkGxqvGHIyPycru9Ia+eoS6az8l9UWyGfHNhIgARIgARIgARIgARLoQKBxfer6fvLJJ899/PHHZb506aWXvnvxxRdvdW3c48aV9O7du/eIUZUW3nXXXStvvPHGZbhUf/rpp1dK/z4VQUp5ySWXHJAHhuMJ75133rlKcqfVJ5988mpJJFYfPnx42ZNPPlk88cQTuPu4DG3og83999+/WjKTKgAdrJFHfffdd8Xs7OxWcd4sD//Ofvnll4UIlzvqDz74YCGPkIvJ7Nbvv/++TCpULFgijZTO1TK1nVI/hJTR3edTyNXnn3/+nIjDvrY1mGqvJAm7pP6iHjvlYee4dhgUffPNN9dLzrQG1sjyZJu56aabZlCZ31ZrxS2DoiI0Jcab4IDMT7bNr7/++gwqSMxuuOGGt1D3bY2F8hnNt22S/Goq0l91BSOtLI5W3paId0mEu+abuk8fGR1OeIlOme4Spip4dChPLRjpdddd1ztF7MLUE5O/aSSioek3/p89MZU2YO5uDVFZnAPyb/kf19B3LIL7pf2Ar49tJEACJEACJEACJEAC/Qh4c1O5sfWhXHz9MyK5Rx51/N9Qf+OqD4abNm36hxQrQk5XXHHFvyQz/PDss8++1GfjFf3xxx+RHm595513tp944ollBq3Octfs3YMHD+6US87/iPAeEd6ofVp6Rec7D956662N+6FHjhz5Hxl055lnnrlUbnduEFR75F5qTTgmWj5d/OyzzxYbNtSCXSaDrsSTx7fccstSYd+46o6KIuKVK1cWuIPeZWsVhZjcyC6++eYbPExcyLQLyZ6jYySJ4pamvFlQ3vPDImKXvCAo3CnlQSaCtzgQKcrQ1kkU2TQ+y3vKKafkiRR5KkSBAnxjWzDSBx54YEpuYJfLftpppxUXXHBBsWbNmkLOzZhe2ecVlYh2Crf9El352iBPG+BxhlIY4ueee24lLJxXvPbaaw9UDVLxrr68f7Lz7rvvxim0Wd548Z6k8q9a6sg7GKdKBaL/Lhvkj1dUOyXQ2fvuu08PG6Xc4C5PM7Hr+ZvkDUk2kAAJkAAJkAAJkAAJkAAJLFYC3vdQXBiS+jRvj4mR3AFO8nf1quPt27d3+qho5RirINpQxK6fN410jTZv3lxOH19Rlm3rEiUGbY1UMucySjzNnW3rGmVrpPqh4G3btnUK0nuehVZ58HnZKTQakwAJkAAJkAAJkAAJkAAJZCBQu+YPXeu3jTOWXKBXpGOJzMXTK1JXZCyR94p0LJG5OHpF6oqMJfJekY4lMhcHj0mABEiABEiABEiABEhgnkDXe1Ktd876kKVomJr9ZmFYYcF6f7uwHUaFswmqOISzRKiCE1NWGV/f9090JsdwFph99bOfp1ZQX/6yna8qqCvdVvKlr40Q+0mABEiABEiABEiABBY8gSqP8s2kLbcK5U4juZL2BTi4rTH9timHRrQoBk3fCtnBBomGZjVI1EZn69EPBsMwNMVQlPAZSaQQDm6xaGJ9I4m0lWksouAU2UECJEACJEACJEACJEACJEACWQnITzuVP5mLDEX3Qff4VCRUWnHYtM4GRvpZaDXGJ7j1B391IHusdt5SPwzs7ZRGDKaitgzZF4gm2Gk65JeuGsKmu55F4wemUjb50a+oWeM9lKi1dAKP/Fhawyz0vkDDkA0kQAIkQAIkQAIkQAIkQAILnkAtkUBe1GdGY0kiapG6UaZGPv5IUyNzZzT+SN0IUiMff6SpkbkzGn+kbgSpkY8lUjc4HpMACZAACZAACZAACZAACaQQaOSmqdf5Vty95h/vQ63u6DYyrYdmlSXS6enpOew6WBZRFdOSokoiXxl8Tjp0uqQMPZKFakRqT3p77qVEqDYjiVTFWZIACZAACZAACZAACZDARBKQa/0P5XeLD0lwbT8Z9E/Ywd6dSONKWn5XV38qO/yLyP9VQQa+Yt6+ptsQrfX2PFjkoo08SjHKyk7JzwtfrceeEovkaY5/2nhKnFb7vNAu+3ZfH9qCkaJTfjB9lxSHZcdT2ftl3yc7tk2YCSq+rXX15eTeKQIzUk75BHxtraI+p7a2hqgszgFx+lMd5Ri/Nr1fSvzrJm0NppJFb5Sp7pGFwI+aHZFfud4KJeFrBfEb8mCMH6FGENxIgARIgARIgARIgARIYHERQNJabnL17E+K1KCltPexWkwXWjc+WWw/XTw4foiBN/YswlYwqzCmqoKp025kfKmOMTuKxuj061s4TPvNj14kQAIkQAIkQAIkQAIkQAIBAqEsL9RuZRZOIsFI7bodra9ahdumRbFjx47qXSCta99R63qtegup3vzfI5w+vva2t4uiCwVnGxXqbYK+ILK0eacfmrY74t8WtRsIj0mABEiABEiABEiABEiABBYBAffWMb6lGd/dnTx1+63Xrpi+eWDLJGE4QBi7dcax+63Y+rXarcJWSOvuF4C7InZ2bl95rEJa4ru4vYZOozuLaMLb9l3cqu1+t3ctN0WEaqjl8uXLi0OHDtXstI8lCZAACZAACZAACZAACZAACTQIuFkfjhtGnoZg1uHLVNS/7Y6ZN49SwW3btpU3CiGCHcfYtF8HaS11yjaLW7t2bTVttEM0FUU5IBzcSKwojHw2NtoGUxXEdF0xOO7du3eJtbFiwbovClfcZ2MFGwu1bt26st8ytQ7arna2L1rXSFRAjXWRdPranlyqcKjstPp2VD29VFiFtF2Prc+g+tiFG6vfJfzZ2dklOAsk6i5utCUBEiABEiABEiABEiCBySGgl+DuNX9bhI2MTx0gpHW3nNws2kaqCVqndEf5WSG33mbT+H4pK+AmuuhDFm1tkuptUUCkzaaRR2l27Ca7GpG2q522t5YaiQqogy4S+rWtU6nCobLT6tuRQ/9R2t5b2A5i62MXbqy+jaatziy6jRD7SYAESIAESIAESOBYJtA9ffHQsDkAUsxoHmX9raNt13opNp9gJIvCOZToarKhAySXbZFaoUGX51bI1ilqaeSpk2kejlZlkTMtX6Xsi0Xolcgya6tXL336emgHaHMO9Zev/FYoR6ShwdhOAiRAAiRAAiRAAscYgZFk0dmupO2FXTZRe+WYbTWtaLZIbXQUtTTy1KvsxK5eHmlRySnK1c+2LJXQSJiOJDetIrWvh9U8elYq0Zznac9Y6EYCJEACJEACJEACC43AIsqid+/eXT41m+2qEYIQU+HBa0/BwQgLMiTDHgSynjZ4UdA924uDvmxp2WOSNRdm0TUcPCABEiABEiABEiCBTgQmK4vWa1m9Uhx870UF9VpWr211gE6s1BjOKqhtg0qNcpCI68woXSL9jnVxsq44F6ffYvi8Jo8lItIdEWc5hSAIMRVGOeScHMldcwTIjQRIgARIgARIgAQWAYHJyqJd4DaLru6duEZdj/VytKtf1N6KZovUjkhRSyNPnUzzcLQqi5wpPxdtTwbWSYAESIAESIAESOBYJTCSLLr6vGlXajYXhS+yaG0bdHkOIU3JVbBrcDX7mMigSGujmAOKGhiZqsHzNLa6vcceIsrV74096DgSpiPJoqtI7UvYkNMJTHgvOnhmsIMESIAESIAESIAESIAESCBEoPYW0tCsRDOc0GBsJwESIAESIAESIAESIAESIAESmFQCyAiHfGYyOC8Ij0RchbOLW2FXfLKy6FikwQWJdVjBLGeDCmYRQ+TugsRmwz4SIAESIAESIAESIAESIAESGD2B7GmPhnxsCE9WFj0yttkXa/IFlSVLEiABEiABEiABEiABEiABEuhEIHu6g9FVFGXWu5LZha2g1m3Ek5NFa3S2tJF2WnU1tmKoDxYc+epniVCnz5IESIAESIAESIAESIAESIAEJoMAUh2boA1OfVxBFbfCtYQ3hQNEQnb6Eebat4vFHEJCvvaRRFp9v5RvRF/byy+/7GsuQu1eY1+ju1h2kXz2bCMBEiABEiABEiABEiABEiCBBUYglh12zvgwdyuo+ahl0lnUCqqQK9xJ1CfoE66JxpzUOVZqxDXRmAP6YoOqIOw6iYaErWAvUVfYFUR/7y2GorcoHUmABEiABEiABEiABEiABEjg7yNg70IOvgNpxZA/2d0n3ppGpiZhNvOriaYKhBZAhWuiPuPUgVQQGq33omEcu8+MPivoCyzaZhfMt0BRZ3aSAAmQAAmQAAmQAAmQAAmQwGQTQKI2klQHwiMRV+Hs4iqoA1gstYQXBl1WVXNS9dPjLho121ikNcPUA52yCqf6Be1U0DIMGqd0ZIssZTDakAAJkAAJkAAJkAAJkAAJkEArgexpD0ZU0awpEMSseJZETUVDwr2zaJsx6yC2DQN22lQETqhjH4xARbMJ2uiyRKiMskaooixJgARIgARIgARIgARIgARIYDIIILvTtMeXS7U+fexOA4L6xDFyUew4HpRGIjJ3IBzb9pF8u5hv0GibjcgahtqtTbAOdtPT0zUEOB7EFKNBAJHpPlgwOAV2kAAJkAAJkAAJkAAJkAAJkMDfQmBQMuaLGIKaS/n6O7epIByzCFtBjaZVGE6xPZQutgprBL6yV6Q+IbfNCg+KMCSMAdy+QcfZBQdFQ2cSIAESIAESIAESIAESIAESyEIAqU5bulN7Tjo2qgrpt2Jt2bKlNO/1bDRutELQl+xqGunenK0Fp1NzS5+gOiYJq7GWfSL9e5hqxFoqGj1mSQIkQAIkQAIkQAIkQAIkQAILmIBmdFmmoGLImwYLWrHBgq7YEMEqNx0iAjzevD9npI01cMUbBkMarPgQHa+vins72UgCJEACJEACJEACJEACJEACIyWgGcnQLLAKcnEJji+LrgDnqGRfJA1q4Qlr5CxJgARIgARIgARIgARIgARIIIlA9rTHCmZJzV3BwaI+wb6i48uiEaHuSSsbM/IhiNkn97nCyY5thla4zZb9JEACJEACJEACJEACJEACJLBACNhUBxkfjgeF7gpqGtlHOCnh9T5YHZlCkmjEv+qyA9e++LuycCrWwenyHlbfe66fIXetQu2uXfDYXaw+ixQUZwcJkAAJkAAJkAAJkAAJkAAJTA4B5KZ9o6nSSCtgBbtme9BpiFpBHaircE3UJ9hHuBKNCapwrLSzqUThEBO2TjFx9NVE0eAT7iLoFXWFuwrCP7j5Ig4as4MESIAESIAESIAESIAESIAEFhYBe2dy8F1JK4Zcyu6p4rU0MjUha8sCK9FUwdAi2oEqURinClsB3yDVvWh0wjh27xl9bYK+Qao2u2CpC1Q5s0ICJEACJEACJEACJEACJEACC4OApj5ZolWx1CwwOqgVGyxoxbQeHT3SWSW8GpXmnnoc8a11qV+tUaODmNZrBkMOVBDiXaNtHdeKtxp3NVDxrn60JwESIAESIAESIAESIAESIIHhBDQjyZZHWcEsolYQ8x0s6goOEQ1m0V1FW7NoCGIbPH2IuAiyiLrC2URdYRxzIwESIAESIAESIAESIAESIIFjgIBNzpBD4bjPtKqnjyGgTxcjz8SO477CZTCh7C7UHptB0heBpQjbLDpJ1DrEImz0gd309HRtYXA8iClGgQCmqvtgwUbobCABEiABEiABEiABEiABEiCBiSCQkuV1ChSCmlN1cgwZqyD6swhbQR10kLBP0BWGTWhX20bpEx4UqY5ghbMIusIYQNuylNkFs0RFERIgARIgARIgARIgARIgARLIRgBpT5/Up3pO2kaiQvqtWFu2bCm7e92Uxc1XCCJ9tIOgrimle8PWtasdxwTVUIUViy3VplHGhFUwJdLRM3VD1+m57TwmgTCB/wdigVA7yGo0NAAAAABJRU5ErkJggg==) no-repeat top left;width:21px;height:21px}.geSprite-actualsize{background-position:0 0}.geSprite-bold{background-position:0 -46px}.geSprite-bottom{background-position:0 -92px}.geSprite-center{background-position:0 -138px}.geSprite-delete{background-position:0 -184px}.geSprite-fillcolor{background-position:0 -230px}.geSprite-fit{background-position:0 -276px}.geSprite-fontcolor{background-position:0 -322px}.geSprite-gradientcolor{background-position:0 -368px}.geSprite-image{background-position:0 -414px}.geSprite-italic{background-position:0 -460px}.geSprite-left{background-position:0 -506px}.geSprite-middle{background-position:0 -552px}.geSprite-print{background-position:0 -598px}.geSprite-redo{background-position:0 -644px}.geSprite-right{background-position:0 -690px}.geSprite-shadow{background-position:0 -736px}.geSprite-strokecolor{background-position:0 -782px}.geSprite-top{background-position:0 -828px}.geSprite-underline{background-position:0 -874px}.geSprite-undo{background-position:0 -920px}.geSprite-zoomin{background-position:0 -966px}.geSprite-zoomout{background-position:0 -1012px}.geSprite-helbow{background-position:0 -1058px}.geSprite-velbow{background-position:0 -1104px}.geSprite-straight{background-position:0 -1150px}.geSprite-entity{background-position:0 -1196px}.geSprite-segment{background-position:0 -1242px}.geSprite-orthogonal{background-position:0 -1288px}.geSprite-noarrow{background-position:0 -1334px}.geSprite-endclassic{background-position:0 -1380px}.geSprite-endopen{background-position:0 -1426px}.geSprite-endblock{background-position:0 -1472px}.geSprite-endoval{background-position:0 -1518px}.geSprite-enddiamond{background-position:0 -1564px}.geSprite-endthindiamond{background-position:0 -1610px}.geSprite-endclassictrans{background-position:0 -1656px}.geSprite-endblocktrans{background-position:0 -1702px}.geSprite-endovaltrans{background-position:0 -1748px}.geSprite-enddiamondtrans{background-position:0 -1794px}.geSprite-endthindiamondtrans{background-position:0 -1840px}.geSprite-startclassic{background-position:0 -1886px}.geSprite-startopen{background-position:0 -1932px}.geSprite-startblock{background-position:0 -1978px}.geSprite-startoval{background-position:0 -2024px}.geSprite-startdiamond{background-position:0 -2070px}.geSprite-startthindiamond{background-position:0 -2116px}.geSprite-startclassictrans{background-position:0 -2162px}.geSprite-startblocktrans{background-position:0 -2208px}.geSprite-startovaltrans{background-position:0 -2254px}.geSprite-startdiamondtrans{background-position:0 -2300px}.geSprite-startthindiamondtrans{background-position:0 -2346px}.geSprite-copy{background-position:0 -410px}.geSprite-cut{background-position:0 -320px}.geSprite-paste{background-position:0 -367px}.geSprite-duplicate{background-position:0 -736px}.geSprite-save{background-position:0 -782px}.geSprite-publish{background-position:0 -92px}.geBaseButton{padding:10px;border-radius:6px;border:1px solid silver;cursor:pointer;background-color:#ececec;background-image:linear-gradient(#ececec 0,#fcfcfc 100%)}.geBaseButton:hover{background:#ececec}.geBigButton{color:#fff;border:none;padding:10px;font-size:14pt;white-space:nowrap;border-radius:6px;text-shadow:#295989 0 1px 0;background-color:#428bca;background-image:linear-gradient(#4687ce 0,#3068a2 100%);-webkit-box-shadow:rgba(255,255,255,.0980392) 0 1px 0 0 inset,rgba(0,0,0,.2) 0 1px 1px 0;-moz-box-shadow:rgba(255,255,255,.0980392) 0 1px 0 0 inset,rgba(0,0,0,.2) 0 1px 1px 0;box-shadow:rgba(255,255,255,.0980392) 0 1px 0 0 inset,rgba(0,0,0,.2) 0 1px 1px 0}.geBigButton:hover{background-color:#2d6ca2;background-image:linear-gradient(#5a94d3 0,#3673b5 100%)}.geBigButton:active{background-color:#3673b5;background-image:none}@media print{div.geNoPrint{display:none!important}}html div.mxRubberband{border-color:#00d;background:#9cf}td.mxPopupMenuIcon div{width:16px;height:16px}html div.mxPopupMenu{-webkit-box-shadow:2px 2px 3px #d5d5d5;-moz-box-shadow:2px 2px 3px #d5d5d5;box-shadow:2px 2px 3px #d5d5d5;background:#fff;position:absolute;border:3px solid #e7e7e7;padding:3px}html table.mxPopupMenu{border-collapse:collapse;margin:0}html td.mxPopupMenuItem{padding:7px 30px 7px 30px;font-family:Helvetica Neue,Helvetica,Arial Unicode MS,Arial;font-size:10pt}html td.mxPopupMenuIcon{background-color:#fff;padding:0}td.mxPopupMenuIcon .geIcon{padding:2px;padding-bottom:4px;margin:2px;border:1px solid transparent;opacity:.5}td.mxPopupMenuIcon .geIcon:hover{border:1px solid gray;border-radius:2px;opacity:1}html tr.mxPopupMenuItemHover{background-color:#eee;color:#000}table.mxPopupMenu hr{color:#ccc;background-color:#ccc;border:none;height:1px}table.mxPopupMenu tr{font-size:4pt}html td.mxWindowTitle{font-family:Helvetica Neue,Helvetica,Arial Unicode MS,Arial;text-align:left;font-size:12px;color:#707070;padding:4px}div.mxTooltip{-webkit-box-shadow:3px 3px 12px silver;-moz-box-shadow:3px 3px 12px silver;box-shadow:3px 3px 12px silver;background:#ffc;border-style:solid;border-width:1px;border-color:#000;font-family:Arial;font-size:8pt;position:absolute;cursor:default;padding:4px;color:#000}body{font-family:Arial Unicode MS,Arial,Helvetica;font-size:10pt} \ No newline at end of file +[data-ng-click],[ng-click],[x-ng-click]{cursor:pointer}.ms-container{width:100%!important}.dark-lime-fg{color:#575b2e!important}.dark-red-fg{color:#9e3333!important}.iron-fg{color:#555865!important}.light-brown-fg{color:#645733!important}.ms-container .ms-list{height:380px!important}.ms-container .ms-selectable li.ms-elem-selectable,.ms-container .ms-selection li.ms-elem-selection{padding:6px 12px!important;height:34px!important}md-input-container:not(.md-input-has-value) input:not(:focus){color:inherit!important}.ms-container .ms-search{height:34px;margin-bottom:5px;border:solid 1px #e5e5e5;background-color:#fff;box-shadow:none;width:100%;padding-left:6px}.ms-container .ms-footer{text-align:center}.no-border{border:none!important}.left .motion-spinner{border-top-color:#00d7cc!important;border-left-color:#00d7cc!important}.right .motion-spinner{border-top-color:#00d7cc!important;border-right-color:#00d7cc!important}.md-option-info-text{font-size:10px}md-pagination-wrapper{width:auto!important}md-autocomplete.no-container-margin md-autocomplete-wrap md-input-container{margin:0!important}md-dialog.report-selection-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}md-dialog.advanced-search-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}.md-dialog-action-center{justify-content:center!important}.flag-24{height:24px}button.auto-width{min-width:auto!important}button.size-8{transform:scale(.8)}md-icon.auto-size{height:auto!important;width:auto!important}md-switch.auto-height{height:auto!important}.hidden{visibility:hidden}.user-profile-section-help{background:#fcf20f0f;border:1px solid rgba(0,0,0,.12);padding:5px}.email-preview-message{display:-webkit-box;margin:0 auto;display:block;height:200px;line-height:1.4;-webkit-line-clamp:10;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis;word-break:break-all}button.advanced-search.md-accent-bg.md-button.md-default-theme:not([disabled]).md-icon-button:hover{background-color:#0091ea}.blink{animation:blink 2s ease-in infinite}.no-click{pointer-events:none}.spinner-overlay{position:absolute;top:0;right:0;bottom:0;left:0;z-index:2;background:rgba(43,43,43,.5)}ms-quick-filter[disabled]{pointer-events:none;opacity:.7}ms-search-bar[disabled]{pointer-events:none;opacity:.7}@keyframes blink{from,to{opacity:1}50%{opacity:0}}textarea.api-key-area{background:0 0;resize:none}.badge{min-width:20px;height:20px;line-height:20px;padding:0 7px;font-size:11px;font-weight:700;border-radius:20px;transition:opacity .2s ease-in-out .1s}md-tooltip.multiline div.md-content{height:auto!important}.auto-margin{margin:auto}md-menu-item md-menu.no-margin button{display:inline-block;border-radius:0;margin:auto 0;font-size:15px;text-transform:none;font-weight:400;height:100%;padding-left:16px;padding-right:16px;width:100%}md-date-range md-menu span.md-select-value{border-bottom-color:rgba(0,0,0,.12)}.keep-on-top{z-index:9999!important}.margin-auto{margin:auto}.xenialab-violet-light-bg{background-color:#9c4fd3!important}.xenialab-violet-light-fg{color:#9c4fd3!important}.no-margin-top{margin-top:0!important}.no-margin-bottom{margin-bottom:0!important}.disabled-button{display:inline-block;position:relative;cursor:default;min-height:36px;min-width:88px;line-height:36px;vertical-align:middle;align-items:center;text-align:center;border-radius:3px;box-sizing:border-box;user-select:none;outline:0;border:0;padding:0 6px;margin:6px 8px;background:rgba(0,0,0,.12);color:rgba(0,0,0,.38);white-space:nowrap;text-transform:uppercase;font-weight:500;font-size:14px;font-style:inherit;font-variant:inherit;font-family:inherit;text-decoration:none;overflow:hidden}.word-break-all{word-break:break-all}.mw-150{max-width:150px!important}@supports (-ms-ime-align:auto){md-tabs{display:inline!important}}@supports (-ms-accelerator:true){md-tabs{display:inline!important}}@supports (-moz-transform:translate(0,0)){md-tabs{display:inline!important}}body[dir=rtl] table.md-table td.md-cell,body[dir=rtl] table.md-table th.md-column{text-align:right!important}body[dir=rtl] table.md-table td.md-cell md-checkbox,body[dir=rtl] table.md-table th.md-column md-checkbox{margin-right:12px!important}body[dir=rtl] .ms-navigation .ms-navigation-node .ms-navigation-item>.ms-navigation-button .icon{margin:0 0 0 16px!important}body[dir=rtl] .ms-navigation .ms-navigation-node .ms-navigation-item>a.ms-navigation-button{padding-right:45px}body[dir=rtl] .md-table-pagination>.buttons{direction:ltr}body[dir=rtl] .md-table-pagination>.buttons>.label{direction:rtl}body[dir=rtl] .header .logo .logo-icon{margin:5px 0 0 15px!important}body[dir=rtl] md-switch .md-container{margin-right:inherit!important}#toasty.toasty-position-top-right{top:64px}.preview_cancel{padding:5px;float:left;background-color:red}.preview_open{padding:5px;float:right;background-color:green}.hover-token{cursor:pointer}body,html{height:100%;position:relative}body{margin:0;padding:0}[tabindex='-1']:focus{outline:0}.inset{padding:10px}a.md-no-style,button.md-no-style{font-weight:400;background-color:inherit;text-align:left;border:none;padding:0;margin:0}button,input,select,textarea{vertical-align:baseline}button,html input[type=button],input[type=reset],input[type=submit]{cursor:pointer;-webkit-appearance:button}button[disabled],html input[type=button][disabled],input[type=reset][disabled],input[type=submit][disabled]{cursor:default}textarea{vertical-align:top;overflow:auto}input[type=search]{-webkit-appearance:textfield;box-sizing:content-box;-webkit-box-sizing:content-box}input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration{-webkit-appearance:none}input:-webkit-autofill{text-shadow:none}.md-visually-hidden{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;text-transform:none;width:1px}.md-shadow{position:absolute;top:0;left:0;bottom:0;right:0;border-radius:inherit;pointer-events:none}.md-shadow-bottom-z-1{box-shadow:0 2px 5px 0 rgba(0,0,0,.26)}.md-shadow-bottom-z-2{box-shadow:0 4px 8px 0 rgba(0,0,0,.4)}.md-shadow-animated.md-shadow{transition:box-shadow .28s cubic-bezier(.4,0,.2,1)}.md-ripple-container{pointer-events:none;position:absolute;overflow:hidden;left:0;top:0;width:100%;height:100%;transition:all .55s cubic-bezier(.25,.8,.25,1)}.md-ripple{position:absolute;transform:translate(-50%,-50%) scale(0);transform-origin:50% 50%;opacity:0;border-radius:50%}.md-ripple.md-ripple-placed{transition:margin .9s cubic-bezier(.25,.8,.25,1),border .9s cubic-bezier(.25,.8,.25,1),width .9s cubic-bezier(.25,.8,.25,1),height .9s cubic-bezier(.25,.8,.25,1),opacity .9s cubic-bezier(.25,.8,.25,1),transform .9s cubic-bezier(.25,.8,.25,1)}.md-ripple.md-ripple-scaled{transform:translate(-50%,-50%) scale(1)}.md-ripple.md-ripple-active,.md-ripple.md-ripple-full,.md-ripple.md-ripple-visible{opacity:.2}.md-ripple.md-ripple-remove{animation:md-remove-ripple .9s cubic-bezier(.25,.8,.25,1)}@keyframes md-remove-ripple{0%{opacity:.15}100%{opacity:0}}.md-padding{padding:8px}.md-margin{margin:8px}.md-scroll-mask{position:absolute;background-color:transparent;top:0;right:0;bottom:0;left:0;z-index:50}.md-scroll-mask>.md-scroll-mask-bar{display:block;position:absolute;background-color:#fafafa;right:0;top:0;bottom:0;z-index:65;box-shadow:inset 0 0 1px rgba(0,0,0,.3)}.md-no-momentum{-webkit-overflow-scrolling:auto}.md-no-flicker{-webkit-filter:blur(0)}@media (min-width:960px){.md-padding{padding:16px}}body[dir=ltr],body[dir=rtl],html[dir=ltr],html[dir=rtl]{unicode-bidi:embed}bdo[dir=rtl]{direction:rtl;unicode-bidi:bidi-override}bdo[dir=ltr]{direction:ltr;unicode-bidi:bidi-override}body,html{-webkit-tap-highlight-color:transparent;-webkit-touch-callout:none;min-height:100%;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.md-display-4{font-size:112px;font-weight:300;letter-spacing:-.010em;line-height:112px}.md-display-3{font-size:56px;font-weight:400;letter-spacing:-.005em;line-height:56px}.md-display-2{font-size:45px;font-weight:400;line-height:64px}.md-display-1{font-size:34px;font-weight:400;line-height:40px}.md-headline{font-size:24px;font-weight:400;line-height:32px}.md-title{font-size:20px;font-weight:500;letter-spacing:.005em}.md-subhead{font-size:16px;font-weight:400;letter-spacing:.010em;line-height:24px}.md-body-1{font-size:14px;font-weight:400;letter-spacing:.010em;line-height:20px}.md-body-2{font-size:14px;font-weight:500;letter-spacing:.010em;line-height:24px}.md-caption{font-size:12px;letter-spacing:.020em}.md-button{letter-spacing:.010em}button,html,input,select,textarea{font-family:Roboto,"Helvetica Neue",sans-serif}button,input,select,textarea{font-size:100%}@keyframes md-autocomplete-list-out{0%{animation-timing-function:linear}50%{opacity:0;height:40px;animation-timing-function:ease-in}100%{height:0;opacity:0}}@keyframes md-autocomplete-list-in{0%{opacity:0;height:0;animation-timing-function:ease-out}50%{opacity:0;height:40px}100%{opacity:1;height:40px}}md-autocomplete{border-radius:2px;display:block;height:40px;position:relative;overflow:visible;min-width:190px}md-autocomplete[disabled] input{cursor:default}md-autocomplete[md-floating-label]{border-radius:0;background:0 0;height:auto}md-autocomplete[md-floating-label] md-input-container{padding-bottom:0}md-autocomplete[md-floating-label] md-autocomplete-wrap{height:auto}md-autocomplete[md-floating-label] button{position:absolute;top:auto;bottom:0;right:0;width:30px;height:30px}md-autocomplete md-autocomplete-wrap{display:flex;flex-direction:row;box-sizing:border-box;position:relative;overflow:visible;height:40px}md-autocomplete md-autocomplete-wrap.md-menu-showing{z-index:51}md-autocomplete md-autocomplete-wrap input,md-autocomplete md-autocomplete-wrap md-input-container{flex:1 1 0%;box-sizing:border-box;min-width:0}md-autocomplete md-autocomplete-wrap md-progress-linear{position:absolute;bottom:-2px;left:0}md-autocomplete md-autocomplete-wrap md-progress-linear.md-inline{bottom:40px;right:2px;left:2px;width:auto}md-autocomplete md-autocomplete-wrap md-progress-linear .md-mode-indeterminate{position:absolute;top:0;left:0;width:100%;height:3px;transition:none}md-autocomplete md-autocomplete-wrap md-progress-linear .md-mode-indeterminate .md-container{transition:none;height:3px}md-autocomplete md-autocomplete-wrap md-progress-linear .md-mode-indeterminate.ng-enter{transition:opacity .15s linear}md-autocomplete md-autocomplete-wrap md-progress-linear .md-mode-indeterminate.ng-enter.ng-enter-active{opacity:1}md-autocomplete md-autocomplete-wrap md-progress-linear .md-mode-indeterminate.ng-leave{transition:opacity .15s linear}md-autocomplete md-autocomplete-wrap md-progress-linear .md-mode-indeterminate.ng-leave.ng-leave-active{opacity:0}md-autocomplete input:not(.md-input){font-size:14px;box-sizing:border-box;border:none;box-shadow:none;outline:0;background:0 0;width:100%;padding:0 15px;line-height:40px;height:40px}md-autocomplete input:not(.md-input)::-ms-clear{display:none}md-autocomplete button{position:relative;line-height:20px;text-align:center;width:30px;height:30px;cursor:pointer;border:none;border-radius:50%;padding:0;font-size:12px;background:0 0;margin:auto 5px}md-autocomplete button:after{content:'';position:absolute;top:-6px;right:-6px;bottom:-6px;left:-6px;border-radius:50%;transform:scale(0);opacity:0;transition:all .4s cubic-bezier(.25,.8,.25,1)}md-autocomplete button:focus{outline:0}md-autocomplete button:focus:after{transform:scale(1);opacity:1}md-autocomplete button md-icon{position:absolute;top:50%;left:50%;transform:translate3d(-50%,-50%,0) scale(.9)}md-autocomplete button md-icon path{stroke-width:0}md-autocomplete button.ng-enter{transform:scale(0);transition:transform .15s ease-out}md-autocomplete button.ng-enter.ng-enter-active{transform:scale(1)}md-autocomplete button.ng-leave{transition:transform .15s ease-out}md-autocomplete button.ng-leave.ng-leave-active{transform:scale(0)}@media screen and (-ms-high-contrast:active){md-autocomplete input{border:1px solid #fff}md-autocomplete li:focus{color:#fff}}.md-virtual-repeat-container.md-autocomplete-suggestions-container{position:absolute;box-shadow:0 2px 5px rgba(0,0,0,.25);height:225.5px;max-height:225.5px;z-index:100}.md-virtual-repeat-container.md-not-found{height:48px}.md-autocomplete-suggestions{margin:0;list-style:none;padding:0}.md-autocomplete-suggestions li{font-size:14px;overflow:hidden;padding:0 15px;line-height:48px;height:48px;transition:background .15s linear;margin:0;white-space:nowrap;text-overflow:ellipsis}.md-autocomplete-suggestions li:focus{outline:0}.md-autocomplete-suggestions li:not(.md-not-found-wrapper){cursor:pointer}@media screen and (-ms-high-contrast:active){.md-autocomplete-suggestions,md-autocomplete{border:1px solid #fff}}md-backdrop{transition:opacity 450ms;position:absolute;top:0;bottom:0;left:0;right:0;z-index:50}md-backdrop.md-menu-backdrop{position:fixed!important;z-index:99}md-backdrop.md-select-backdrop{z-index:81;transition-duration:0}md-backdrop.md-dialog-backdrop{z-index:79}md-backdrop.md-bottom-sheet-backdrop{z-index:69}md-backdrop.md-sidenav-backdrop{z-index:59}md-backdrop.md-click-catcher{position:absolute}md-backdrop.md-opaque{opacity:.48}md-backdrop.md-opaque.ng-enter{opacity:0}md-backdrop.md-opaque.ng-enter.md-opaque.ng-enter-active{opacity:.48}md-backdrop.md-opaque.ng-leave{opacity:.48;transition:opacity .4s}md-backdrop.md-opaque.ng-leave.md-opaque.ng-leave-active{opacity:0}md-bottom-sheet{position:absolute;left:0;right:0;bottom:0;padding:8px 16px 88px 16px;z-index:70;border-top-width:1px;border-top-style:solid;transform:translate3d(0,80px,0);transition:all .4s cubic-bezier(.25,.8,.25,1);transition-property:transform}md-bottom-sheet.md-has-header{padding-top:0}md-bottom-sheet.ng-enter{opacity:0;transform:translate3d(0,100%,0)}md-bottom-sheet.ng-enter-active{opacity:1;display:block;transform:translate3d(0,80px,0)!important}md-bottom-sheet.ng-leave-active{transform:translate3d(0,100%,0)!important;transition:all .3s cubic-bezier(.55,0,.55,.2)}md-bottom-sheet .md-subheader{background-color:transparent;font-family:Roboto,"Helvetica Neue",sans-serif;line-height:56px;padding:0;white-space:nowrap}md-bottom-sheet md-inline-icon{display:inline-block;height:24px;width:24px;fill:#444}md-bottom-sheet md-list-item{display:flex;outline:0}md-bottom-sheet md-list-item:hover{cursor:pointer}md-bottom-sheet.md-list md-list-item{padding:0;align-items:center;height:48px}md-bottom-sheet.md-grid{padding-left:24px;padding-right:24px;padding-top:0}md-bottom-sheet.md-grid md-list{display:flex;flex-direction:row;flex-wrap:wrap;transition:all .5s;align-items:center}md-bottom-sheet.md-grid md-list-item{flex-direction:column;align-items:center;transition:all .5s;height:96px;margin-top:8px;margin-bottom:8px}@media (max-width:960px){md-bottom-sheet.md-grid md-list-item{flex:1 1 33.3333333333%;max-width:33.3333333333%}md-bottom-sheet.md-grid md-list-item:nth-of-type(3n+1){align-items:flex-start}md-bottom-sheet.md-grid md-list-item:nth-of-type(3n){align-items:flex-end}}@media (min-width:960px) and (max-width:1279px){md-bottom-sheet.md-grid md-list-item{flex:1 1 25%;max-width:25%}}@media (min-width:1280px) and (max-width:1919px){md-bottom-sheet.md-grid md-list-item{flex:1 1 16.6666666667%;max-width:16.6666666667%}}@media (min-width:1920px){md-bottom-sheet.md-grid md-list-item{flex:1 1 14.2857142857%;max-width:14.2857142857%}}md-bottom-sheet.md-grid md-list-item::before{display:none}md-bottom-sheet.md-grid md-list-item .md-list-item-content{display:flex;flex-direction:column;align-items:center;width:48px;padding-bottom:16px}md-bottom-sheet.md-grid md-list-item .md-grid-item-content{border:1px solid transparent;display:flex;flex-direction:column;align-items:center;width:80px}md-bottom-sheet.md-grid md-list-item .md-grid-text{font-weight:400;line-height:16px;font-size:13px;margin:0;white-space:nowrap;width:64px;text-align:center;text-transform:none;padding-top:8px}@media screen and (-ms-high-contrast:active){md-bottom-sheet{border:1px solid #fff}}button.md-button::-moz-focus-inner{border:0}.md-button{display:inline-block;position:relative;cursor:pointer;min-height:36px;min-width:88px;line-height:36px;vertical-align:middle;align-items:center;text-align:center;border-radius:3px;box-sizing:border-box;user-select:none;outline:0;border:0;padding:0 6px;margin:6px 8px;background:0 0;color:currentColor;white-space:nowrap;text-transform:uppercase;font-weight:500;font-size:14px;font-style:inherit;font-variant:inherit;font-family:inherit;text-decoration:none;overflow:hidden;transition:box-shadow .4s cubic-bezier(.25,.8,.25,1),background-color .4s cubic-bezier(.25,.8,.25,1)}.md-button:focus{outline:0}.md-button:focus,.md-button:hover{text-decoration:none}.md-button.ng-hide,.md-button.ng-leave{transition:none}.md-button.md-cornered{border-radius:0}.md-button.md-icon{padding:0;background:0 0}.md-button.md-raised:not([disabled]){box-shadow:0 2px 5px 0 rgba(0,0,0,.26)}.md-button.md-icon-button{margin:0 6px;height:40px;min-width:0;line-height:24px;padding:8px;width:40px;border-radius:50%}.md-button.md-icon-button .md-ripple-container{border-radius:50%;background-clip:padding-box;overflow:hidden;-webkit-mask-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAIAAACQd1PeAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAA5JREFUeNpiYGBgAAgwAAAEAAGbA+oJAAAAAElFTkSuQmCC)}.md-button.md-fab{z-index:20;line-height:56px;min-width:0;width:56px;height:56px;vertical-align:middle;box-shadow:0 2px 5px 0 rgba(0,0,0,.26);border-radius:50%;background-clip:padding-box;overflow:hidden;transition:all .3s cubic-bezier(.55,0,.55,.2);transition-property:background-color,box-shadow,transform}.md-button.md-fab.md-fab-bottom-right{top:auto;right:20px;bottom:20px;left:auto;position:absolute}.md-button.md-fab.md-fab-bottom-left{top:auto;right:auto;bottom:20px;left:20px;position:absolute}.md-button.md-fab.md-fab-top-right{top:20px;right:20px;bottom:auto;left:auto;position:absolute}.md-button.md-fab.md-fab-top-left{top:20px;right:auto;bottom:auto;left:20px;position:absolute}.md-button.md-fab .md-ripple-container{border-radius:50%;background-clip:padding-box;overflow:hidden;-webkit-mask-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAIAAACQd1PeAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAA5JREFUeNpiYGBgAAgwAAAEAAGbA+oJAAAAAElFTkSuQmCC)}.md-button.md-fab.md-mini{line-height:40px;width:40px;height:40px}.md-button.md-fab.ng-hide,.md-button.md-fab.ng-leave{transition:none}.md-button:not([disabled]).md-fab.md-focused,.md-button:not([disabled]).md-raised.md-focused{box-shadow:0 2px 5px 0 rgba(0,0,0,.26)}.md-button:not([disabled]).md-fab:active,.md-button:not([disabled]).md-raised:active{box-shadow:0 4px 8px 0 rgba(0,0,0,.4)}.md-button .md-ripple-container{border-radius:3px;background-clip:padding-box;overflow:hidden;-webkit-mask-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAIAAACQd1PeAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAA5JREFUeNpiYGBgAAgwAAAEAAGbA+oJAAAAAElFTkSuQmCC)}.md-button.md-icon-button md-icon,button.md-button.md-fab md-icon{display:block}.md-toast-open-top .md-button.md-fab-top-left,.md-toast-open-top .md-button.md-fab-top-right{transition:all .4s cubic-bezier(.25,.8,.25,1);transform:translate3d(0,42px,0)}.md-toast-open-top .md-button.md-fab-top-left:not([disabled]).md-focused,.md-toast-open-top .md-button.md-fab-top-left:not([disabled]):hover,.md-toast-open-top .md-button.md-fab-top-right:not([disabled]).md-focused,.md-toast-open-top .md-button.md-fab-top-right:not([disabled]):hover{transform:translate3d(0,41px,0)}.md-toast-open-bottom .md-button.md-fab-bottom-left,.md-toast-open-bottom .md-button.md-fab-bottom-right{transition:all .4s cubic-bezier(.25,.8,.25,1);transform:translate3d(0,-42px,0)}.md-toast-open-bottom .md-button.md-fab-bottom-left:not([disabled]).md-focused,.md-toast-open-bottom .md-button.md-fab-bottom-left:not([disabled]):hover,.md-toast-open-bottom .md-button.md-fab-bottom-right:not([disabled]).md-focused,.md-toast-open-bottom .md-button.md-fab-bottom-right:not([disabled]):hover{transform:translate3d(0,-43px,0)}.md-button-group{display:flex;flex:1;width:100%}.md-button-group>.md-button{flex:1;display:block;overflow:hidden;width:0;border-width:1px 0 1px 1px;border-radius:0;text-align:center;text-overflow:ellipsis;white-space:nowrap}.md-button-group>.md-button:first-child{border-radius:2px 0 0 2px}.md-button-group>.md-button:last-child{border-right-width:1px;border-radius:0 2px 2px 0}@media screen and (-ms-high-contrast:active){.md-button.md-fab,.md-button.md-raised{border:1px solid #fff}}md-card{box-sizing:border-box;display:flex;flex-direction:column;margin:8px;box-shadow:0 1px 3px 0 rgba(0,0,0,.2),0 1px 1px 0 rgba(0,0,0,.14),0 2px 1px -1px rgba(0,0,0,.12)}md-card md-card-header{padding:16px;display:flex;flex-direction:row}md-card md-card-header:first-child md-card-avatar{margin-right:12px}[dir=rtl] md-card md-card-header:first-child md-card-avatar{margin-right:auto;margin-left:12px}md-card md-card-header:last-child md-card-avatar{margin-left:12px}[dir=rtl] md-card md-card-header:last-child md-card-avatar{margin-left:auto;margin-right:12px}md-card md-card-header md-card-avatar{width:40px;height:40px}md-card md-card-header md-card-avatar .md-user-avatar,md-card md-card-header md-card-avatar md-icon{border-radius:50%}md-card md-card-header md-card-avatar md-icon{padding:8px}md-card md-card-header md-card-avatar+md-card-header-text{max-height:40px}md-card md-card-header md-card-avatar+md-card-header-text .md-title{font-size:14px}md-card md-card-header md-card-header-text{display:flex;flex:1;flex-direction:column}md-card md-card-header md-card-header-text .md-subhead{font-size:14px}md-card md-card-title-media img,md-card>img,md-card>md-card-header img{box-sizing:border-box;display:flex;flex:0 0 auto;width:100%;height:auto}md-card md-card-title{padding:24px 16px 16px;display:flex;flex:1 1 auto;flex-direction:row}md-card md-card-title+md-card-content{padding-top:0}md-card md-card-title md-card-title-text{flex:1;flex-direction:column;display:flex}md-card md-card-title md-card-title-text .md-subhead{padding-top:0;font-size:14px}md-card md-card-title md-card-title-text:only-child .md-subhead{padding-top:12px}md-card md-card-title md-card-title-media{margin-top:-8px}md-card md-card-title md-card-title-media .md-media-sm{height:80px;width:80px}md-card md-card-title md-card-title-media .md-media-md{height:112px;width:112px}md-card md-card-title md-card-title-media .md-media-lg{height:152px;width:152px}md-card md-card-content{display:block;padding:16px}md-card md-card-content>p:first-child{margin-top:0}md-card md-card-content>p:last-child{margin-bottom:0}md-card md-card-content .md-media-xl{height:240px;width:240px}md-card .md-actions,md-card md-card-actions{margin:8px}md-card .md-actions.layout-column .md-button:not(.md-icon-button),md-card md-card-actions.layout-column .md-button:not(.md-icon-button){margin:2px 0}md-card .md-actions.layout-column .md-button:not(.md-icon-button):first-of-type,md-card md-card-actions.layout-column .md-button:not(.md-icon-button):first-of-type{margin-top:0}md-card .md-actions.layout-column .md-button:not(.md-icon-button):last-of-type,md-card md-card-actions.layout-column .md-button:not(.md-icon-button):last-of-type{margin-bottom:0}md-card .md-actions.layout-column .md-button.md-icon-button,md-card md-card-actions.layout-column .md-button.md-icon-button{margin-top:6px;margin-bottom:6px}md-card .md-actions md-card-icon-actions,md-card md-card-actions md-card-icon-actions{flex:1;justify-content:flex-start;display:flex;flex-direction:row}md-card .md-actions:not(.layout-column) .md-button:not(.md-icon-button),md-card md-card-actions:not(.layout-column) .md-button:not(.md-icon-button){margin:0 4px}md-card .md-actions:not(.layout-column) .md-button:not(.md-icon-button):first-of-type,md-card md-card-actions:not(.layout-column) .md-button:not(.md-icon-button):first-of-type{margin-left:0}[dir=rtl] md-card .md-actions:not(.layout-column) .md-button:not(.md-icon-button):first-of-type,[dir=rtl] md-card md-card-actions:not(.layout-column) .md-button:not(.md-icon-button):first-of-type{margin-left:auto;margin-right:0}md-card .md-actions:not(.layout-column) .md-button:not(.md-icon-button):last-of-type,md-card md-card-actions:not(.layout-column) .md-button:not(.md-icon-button):last-of-type{margin-right:0}[dir=rtl] md-card .md-actions:not(.layout-column) .md-button:not(.md-icon-button):last-of-type,[dir=rtl] md-card md-card-actions:not(.layout-column) .md-button:not(.md-icon-button):last-of-type{margin-right:auto;margin-left:0}md-card .md-actions:not(.layout-column) .md-button.md-icon-button,md-card md-card-actions:not(.layout-column) .md-button.md-icon-button{margin-left:6px;margin-right:6px}md-card .md-actions:not(.layout-column) .md-button.md-icon-button:first-of-type,md-card md-card-actions:not(.layout-column) .md-button.md-icon-button:first-of-type{margin-left:12px}[dir=rtl] md-card .md-actions:not(.layout-column) .md-button.md-icon-button:first-of-type,[dir=rtl] md-card md-card-actions:not(.layout-column) .md-button.md-icon-button:first-of-type{margin-left:auto;margin-right:12px}md-card .md-actions:not(.layout-column) .md-button.md-icon-button:last-of-type,md-card md-card-actions:not(.layout-column) .md-button.md-icon-button:last-of-type{margin-right:12px}[dir=rtl] md-card .md-actions:not(.layout-column) .md-button.md-icon-button:last-of-type,[dir=rtl] md-card md-card-actions:not(.layout-column) .md-button.md-icon-button:last-of-type{margin-right:auto;margin-left:12px}md-card .md-actions:not(.layout-column) .md-button+md-card-icon-actions,md-card md-card-actions:not(.layout-column) .md-button+md-card-icon-actions{flex:1;justify-content:flex-end;display:flex;flex-direction:row}md-card md-card-footer{margin-top:auto;padding:16px}@media screen and (-ms-high-contrast:active){md-card{border:1px solid #fff}}.md-image-no-fill>img{width:auto;height:auto}.md-contact-chips .md-chips md-chip{padding:0 25px 0 0}[dir=rtl] .md-contact-chips .md-chips md-chip{padding:0 0 0 25px}.md-contact-chips .md-chips md-chip .md-contact-avatar{float:left}[dir=rtl] .md-contact-chips .md-chips md-chip .md-contact-avatar{float:right}.md-contact-chips .md-chips md-chip .md-contact-avatar img{height:32px;border-radius:16px}.md-contact-chips .md-chips md-chip .md-contact-name{display:inline-block;height:32px;margin-left:8px}[dir=rtl] .md-contact-chips .md-chips md-chip .md-contact-name{margin-left:auto;margin-right:8px}.md-contact-suggestion{height:56px}.md-contact-suggestion img{height:40px;border-radius:20px;margin-top:8px}.md-contact-suggestion .md-contact-name{margin-left:8px;width:120px}[dir=rtl] .md-contact-suggestion .md-contact-name{margin-left:auto;margin-right:8px}.md-contact-suggestion .md-contact-email,.md-contact-suggestion .md-contact-name{display:inline-block;overflow:hidden;text-overflow:ellipsis}.md-contact-chips-suggestions li{height:100%}.md-chips{display:block;font-family:Roboto,"Helvetica Neue",sans-serif;font-size:16px;padding:0 0 8px 3px;vertical-align:middle}.md-chips:after{content:'';display:table;clear:both}[dir=rtl] .md-chips{padding:0 3px 8px 0}.md-chips.md-readonly .md-chip-input-container{min-height:32px}.md-chips:not(.md-readonly){cursor:text}.md-chips.md-removable md-chip{padding-right:22px}[dir=rtl] .md-chips.md-removable md-chip{padding-right:0;padding-left:22px}.md-chips.md-removable md-chip .md-chip-content{padding-right:4px}[dir=rtl] .md-chips.md-removable md-chip .md-chip-content{padding-right:0;padding-left:4px}.md-chips md-chip{cursor:default;border-radius:16px;display:block;height:32px;line-height:32px;margin:8px 8px 0 0;padding:0 12px 0 12px;float:left;box-sizing:border-box;max-width:100%;position:relative}[dir=rtl] .md-chips md-chip{margin:8px 0 0 8px}[dir=rtl] .md-chips md-chip{float:right}.md-chips md-chip .md-chip-content{display:block;float:left;white-space:nowrap;max-width:100%;overflow:hidden;text-overflow:ellipsis}[dir=rtl] .md-chips md-chip .md-chip-content{float:right}.md-chips md-chip .md-chip-content:focus{outline:0}.md-chips md-chip._md-chip-content-edit-is-enabled{-webkit-user-select:none;-moz-user-select:none;-khtml-user-select:none;-ms-user-select:none}.md-chips md-chip .md-chip-remove-container{position:absolute;right:0;line-height:22px}[dir=rtl] .md-chips md-chip .md-chip-remove-container{right:auto;left:0}.md-chips md-chip .md-chip-remove{text-align:center;width:32px;height:32px;min-width:0;padding:0;background:0 0;border:none;box-shadow:none;margin:0;position:relative}.md-chips md-chip .md-chip-remove md-icon{height:18px;width:18px;position:absolute;top:50%;left:50%;transform:translate3d(-50%,-50%,0)}.md-chips .md-chip-input-container{display:block;line-height:32px;margin:8px 8px 0 0;padding:0;float:left}[dir=rtl] .md-chips .md-chip-input-container{margin:8px 0 0 8px}[dir=rtl] .md-chips .md-chip-input-container{float:right}.md-chips .md-chip-input-container input:not([type]),.md-chips .md-chip-input-container input[type=email],.md-chips .md-chip-input-container input[type=number],.md-chips .md-chip-input-container input[type=tel],.md-chips .md-chip-input-container input[type=text],.md-chips .md-chip-input-container input[type=url]{border:0;height:32px;line-height:32px;padding:0}.md-chips .md-chip-input-container input:not([type]):focus,.md-chips .md-chip-input-container input[type=email]:focus,.md-chips .md-chip-input-container input[type=number]:focus,.md-chips .md-chip-input-container input[type=tel]:focus,.md-chips .md-chip-input-container input[type=text]:focus,.md-chips .md-chip-input-container input[type=url]:focus{outline:0}.md-chips .md-chip-input-container md-autocomplete,.md-chips .md-chip-input-container md-autocomplete-wrap{background:0 0;height:32px}.md-chips .md-chip-input-container md-autocomplete md-autocomplete-wrap{box-shadow:none}.md-chips .md-chip-input-container md-autocomplete input{position:relative}.md-chips .md-chip-input-container input{border:0;height:32px;line-height:32px;padding:0}.md-chips .md-chip-input-container input:focus{outline:0}.md-chips .md-chip-input-container md-autocomplete,.md-chips .md-chip-input-container md-autocomplete-wrap{height:32px}.md-chips .md-chip-input-container md-autocomplete{box-shadow:none}.md-chips .md-chip-input-container md-autocomplete input{position:relative}.md-chips .md-chip-input-container:not(:first-child){margin:8px 8px 0 0}[dir=rtl] .md-chips .md-chip-input-container:not(:first-child){margin:8px 0 0 8px}.md-chips .md-chip-input-container input{background:0 0;border-width:0}.md-chips md-autocomplete button{display:none}@media screen and (-ms-high-contrast:active){.md-chip-input-container,md-chip{border:1px solid #fff}.md-chip-input-container md-autocomplete{border:none}}.md-inline-form md-checkbox{margin:19px 0 18px}md-checkbox{box-sizing:border-box;display:inline-block;margin-bottom:16px;white-space:nowrap;cursor:pointer;outline:0;user-select:none;position:relative;min-width:20px;min-height:20px;margin-left:0;margin-right:16px}[dir=rtl] md-checkbox{margin-left:16px}[dir=rtl] md-checkbox{margin-right:0}md-checkbox:last-of-type{margin-left:0;margin-right:0}md-checkbox.md-focused:not([disabled]) .md-container:before{left:-8px;top:-8px;right:-8px;bottom:-8px}md-checkbox.md-focused:not([disabled]):not(.md-checked) .md-container:before{background-color:rgba(0,0,0,.12)}md-checkbox.md-align-top-left>div.md-container{top:12px}md-checkbox .md-container{position:absolute;top:50%;transform:translateY(-50%);box-sizing:border-box;display:inline-block;width:20px;height:20px;left:0;right:auto}[dir=rtl] md-checkbox .md-container{left:auto}[dir=rtl] md-checkbox .md-container{right:0}md-checkbox .md-container:before{box-sizing:border-box;background-color:transparent;border-radius:50%;content:'';position:absolute;display:block;height:auto;left:0;top:0;right:0;bottom:0;transition:all .5s;width:auto}md-checkbox .md-container:after{box-sizing:border-box;content:'';position:absolute;top:-10px;right:-10px;bottom:-10px;left:-10px}md-checkbox .md-container .md-ripple-container{position:absolute;display:block;width:auto;height:auto;left:-15px;top:-15px;right:-15px;bottom:-15px}md-checkbox .md-icon{box-sizing:border-box;transition:240ms;position:absolute;top:0;left:0;width:20px;height:20px;border-width:2px;border-style:solid;border-radius:2px}md-checkbox.md-checked .md-icon{border-color:transparent}md-checkbox.md-checked .md-icon:after{box-sizing:border-box;transform:rotate(45deg);position:absolute;left:4.6666666667px;top:.2222222222px;display:table;width:6.6666666667px;height:13.3333333333px;border-width:2px;border-style:solid;border-top:0;border-left:0;content:''}md-checkbox[disabled]{cursor:default}md-checkbox.md-indeterminate .md-icon:after{box-sizing:border-box;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);display:table;width:12px;height:2px;border-width:2px;border-style:solid;border-top:0;border-left:0;content:''}md-checkbox .md-label{box-sizing:border-box;position:relative;display:inline-block;vertical-align:middle;white-space:normal;user-select:text;margin-left:30px;margin-right:0}[dir=rtl] md-checkbox .md-label{margin-left:0}[dir=rtl] md-checkbox .md-label{margin-right:30px}md-content{display:block;position:relative;overflow:auto;-webkit-overflow-scrolling:touch}md-content[md-scroll-y]{overflow-y:auto;overflow-x:hidden}md-content[md-scroll-x]{overflow-x:auto;overflow-y:hidden}@media print{md-content{overflow:visible!important}}md-calendar{font-size:13px;user-select:none}.md-calendar-scroll-mask{display:inline-block;overflow:hidden;height:308px}.md-calendar-scroll-mask .md-virtual-repeat-scroller{overflow-y:scroll;-webkit-overflow-scrolling:touch}.md-calendar-scroll-mask .md-virtual-repeat-scroller::-webkit-scrollbar{display:none}.md-calendar-scroll-mask .md-virtual-repeat-offsetter{width:100%}.md-calendar-scroll-container{box-shadow:inset -3px 3px 6px rgba(0,0,0,.2);display:inline-block;height:308px;width:346px}.md-calendar-date{height:44px;width:44px;text-align:center;padding:0;border:none;box-sizing:content-box}.md-calendar-date:first-child{padding-left:16px}[dir=rtl] .md-calendar-date:first-child{padding-left:0;padding-right:16px}.md-calendar-date:last-child{padding-right:16px}[dir=rtl] .md-calendar-date:last-child{padding-right:0;padding-left:16px}.md-calendar-date.md-calendar-date-disabled{cursor:default}.md-calendar-date-selection-indicator{transition:background-color,color .4s cubic-bezier(.25,.8,.25,1);border-radius:50%;display:inline-block;width:40px;height:40px;line-height:40px}.md-calendar-date:not(.md-disabled) .md-calendar-date-selection-indicator{cursor:pointer}.md-calendar-month-label{height:44px;font-size:14px;font-weight:500;padding:0 0 0 24px}[dir=rtl] .md-calendar-month-label{padding:0 24px 0 0}md-calendar-month .md-calendar-month-label:not(.md-calendar-month-label-disabled){cursor:pointer}.md-calendar-month-label md-icon{transform:rotate(180deg)}[dir=rtl] .md-calendar-month-label md-icon{transform:none}.md-calendar-month-label span{vertical-align:middle}.md-calendar-day-header{table-layout:fixed;border-spacing:0;border-collapse:collapse}.md-calendar-day-header th{height:40px;width:44px;text-align:center;padding:0;border:none;box-sizing:content-box;font-weight:400}.md-calendar-day-header th:first-child{padding-left:16px}[dir=rtl] .md-calendar-day-header th:first-child{padding-left:0;padding-right:16px}.md-calendar-day-header th:last-child{padding-right:16px}[dir=rtl] .md-calendar-day-header th:last-child{padding-right:0;padding-left:16px}.md-calendar{table-layout:fixed;border-spacing:0;border-collapse:collapse}.md-calendar tr:last-child td{border-bottom-width:1px;border-bottom-style:solid}.md-calendar:first-child{border-top:1px solid transparent}.md-calendar tbody,.md-calendar td,.md-calendar tr{vertical-align:middle;box-sizing:content-box}md-datepicker{white-space:nowrap;overflow:hidden;padding-right:18px;margin-right:-18px;vertical-align:middle}[dir=rtl] md-datepicker{padding-right:0;padding-left:18px}[dir=rtl] md-datepicker{margin-right:auto;margin-left:-18px}.md-inline-form md-datepicker{margin-top:12px}.md-datepicker-button{display:inline-block;box-sizing:border-box;background:0 0;vertical-align:middle;position:relative}.md-datepicker-button:before{top:0;left:0;bottom:0;right:0;position:absolute;content:'';speak:none}.md-datepicker-input{font-size:14px;box-sizing:border-box;border:none;box-shadow:none;outline:0;background:0 0;min-width:120px;max-width:328px;padding:0 0 5px}.md-datepicker-input::-ms-clear{display:none}._md-datepicker-floating-label>md-datepicker{overflow:visible}._md-datepicker-floating-label>md-datepicker .md-datepicker-input-container{border:none}._md-datepicker-floating-label>md-datepicker .md-datepicker-button{float:left;margin-top:-2.5px}[dir=rtl] ._md-datepicker-floating-label>md-datepicker .md-datepicker-button{float:right}._md-datepicker-floating-label._md-datepicker-has-calendar-icon>label:not(.md-no-float):not(.md-container-ignore){right:18px;left:auto;width:calc(100% - 84px)}[dir=rtl] ._md-datepicker-floating-label._md-datepicker-has-calendar-icon>label:not(.md-no-float):not(.md-container-ignore){right:auto}[dir=rtl] ._md-datepicker-floating-label._md-datepicker-has-calendar-icon>label:not(.md-no-float):not(.md-container-ignore){left:18px}._md-datepicker-floating-label._md-datepicker-has-calendar-icon .md-input-message-animation{margin-left:64px}[dir=rtl] ._md-datepicker-floating-label._md-datepicker-has-calendar-icon .md-input-message-animation{margin-left:auto;margin-right:64px}.md-datepicker-input-container{position:relative;border-bottom-width:1px;border-bottom-style:solid;display:inline-block;width:auto}.md-icon-button+.md-datepicker-input-container{margin-left:12px}[dir=rtl] .md-icon-button+.md-datepicker-input-container{margin-left:auto;margin-right:12px}.md-datepicker-input-container.md-datepicker-focused{border-bottom-width:2px}.md-datepicker-is-showing .md-scroll-mask{z-index:99}.md-datepicker-calendar-pane{position:absolute;top:0;left:-100%;z-index:100;border-width:1px;border-style:solid;background:0 0;transform:scale(0);transform-origin:0 0;transition:transform .2s cubic-bezier(.25,.8,.25,1)}.md-datepicker-calendar-pane.md-pane-open{transform:scale(1)}.md-datepicker-input-mask{height:40px;width:340px;position:relative;overflow:hidden;background:0 0;pointer-events:none;cursor:text}.md-datepicker-calendar{opacity:0;transition:opacity .2s cubic-bezier(.5,0,.25,1)}.md-pane-open .md-datepicker-calendar{opacity:1}.md-datepicker-calendar md-calendar:focus{outline:0}.md-datepicker-expand-triangle{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);width:0;height:0;border-left:5px solid transparent;border-right:5px solid transparent;border-top:5px solid}.md-datepicker-triangle-button{position:absolute;right:0;top:5px;transform:translateY(-25%) translateX(45%)}[dir=rtl] .md-datepicker-triangle-button{right:auto;left:0}[dir=rtl] .md-datepicker-triangle-button{transform:translateY(-25%) translateX(-45%)}.md-datepicker-triangle-button.md-button.md-icon-button{height:36px;width:36px;position:absolute;padding:8px}md-datepicker[disabled] .md-datepicker-input-container{border-bottom-color:transparent}md-datepicker[disabled] .md-datepicker-triangle-button{display:none}.md-datepicker-open{overflow:hidden}.md-datepicker-open .md-datepicker-input-container,.md-datepicker-open input.md-input{border-bottom-color:transparent}.md-datepicker-open .md-datepicker-triangle-button,.md-datepicker-open.md-input-has-placeholder>label,.md-datepicker-open.md-input-has-value>label{display:none}.md-datepicker-pos-adjusted .md-datepicker-input-mask{display:none}.md-datepicker-calendar-pane .md-calendar{transform:translateY(-85px);transition:transform .65s cubic-bezier(.25,.8,.25,1);transition-delay:125ms}.md-datepicker-calendar-pane.md-pane-open .md-calendar{transform:translateY(0)}.md-dialog-is-showing{max-height:100%}.md-dialog-container{display:flex;justify-content:center;align-items:center;position:absolute;top:0;left:0;width:100%;height:100%;z-index:80;overflow:hidden}md-dialog{opacity:0;min-width:240px;max-width:80%;max-height:80%;position:relative;overflow:auto;box-shadow:0 7px 8px -4px rgba(0,0,0,.2),0 13px 19px 2px rgba(0,0,0,.14),0 5px 24px 4px rgba(0,0,0,.12);display:flex;flex-direction:column}md-dialog.md-transition-in{opacity:1;transition:all .4s cubic-bezier(.25,.8,.25,1);transform:translate(0,0) scale(1)}md-dialog.md-transition-out{opacity:0;transition:all .4s cubic-bezier(.25,.8,.25,1);transform:translate(0,100%) scale(.2)}md-dialog>form{display:flex;flex-direction:column;overflow:auto}md-dialog .md-dialog-content{padding:24px}md-dialog md-dialog-content{order:1;flex-direction:column;overflow:auto;-webkit-overflow-scrolling:touch}md-dialog md-dialog-content:not([layout=row])>:first-child:not(.md-subheader){margin-top:0}md-dialog md-dialog-content:focus{outline:0}md-dialog md-dialog-content .md-subheader{margin:0}md-dialog md-dialog-content .md-dialog-content-body{width:100%}md-dialog md-dialog-content .md-prompt-input-container{width:100%;box-sizing:border-box}md-dialog .md-actions,md-dialog md-dialog-actions{display:flex;order:2;box-sizing:border-box;align-items:center;justify-content:flex-end;margin-bottom:0;padding-right:8px;padding-left:16px;min-height:52px;overflow:hidden}[dir=rtl] md-dialog .md-actions,[dir=rtl] md-dialog md-dialog-actions{padding-right:16px}[dir=rtl] md-dialog .md-actions,[dir=rtl] md-dialog md-dialog-actions{padding-left:8px}md-dialog .md-actions .md-button,md-dialog md-dialog-actions .md-button{margin-bottom:8px;margin-left:8px;margin-right:0;margin-top:8px}[dir=rtl] md-dialog .md-actions .md-button,[dir=rtl] md-dialog md-dialog-actions .md-button{margin-left:0}[dir=rtl] md-dialog .md-actions .md-button,[dir=rtl] md-dialog md-dialog-actions .md-button{margin-right:8px}md-dialog.md-content-overflow .md-actions,md-dialog.md-content-overflow md-dialog-actions{border-top-width:1px;border-top-style:solid}@media screen and (-ms-high-contrast:active){md-dialog{border:1px solid #fff}}@media (max-width:959px){md-dialog.md-dialog-fullscreen{min-height:100%;min-width:100%;border-radius:0}}md-divider{display:block;border-top-width:1px;border-top-style:solid;margin:0}md-divider[md-inset]{margin-left:80px}[dir=rtl] md-divider[md-inset]{margin-left:auto;margin-right:80px}.layout-gt-lg-row>md-divider,.layout-gt-md-row>md-divider,.layout-gt-sm-row>md-divider,.layout-gt-xs-row>md-divider,.layout-lg-row>md-divider,.layout-md-row>md-divider,.layout-row>md-divider,.layout-sm-row>md-divider,.layout-xl-row>md-divider,.layout-xs-row>md-divider{border-top-width:0;border-right-width:1px;border-right-style:solid}md-fab-speed-dial{position:relative;display:flex;align-items:center;z-index:20}md-fab-speed-dial.md-fab-bottom-right{top:auto;right:20px;bottom:20px;left:auto;position:absolute}md-fab-speed-dial.md-fab-bottom-left{top:auto;right:auto;bottom:20px;left:20px;position:absolute}md-fab-speed-dial.md-fab-top-right{top:20px;right:20px;bottom:auto;left:auto;position:absolute}md-fab-speed-dial.md-fab-top-left{top:20px;right:auto;bottom:auto;left:20px;position:absolute}md-fab-speed-dial:not(.md-hover-full){pointer-events:none}md-fab-speed-dial:not(.md-hover-full) .md-fab-action-item,md-fab-speed-dial:not(.md-hover-full) md-fab-trigger{pointer-events:auto}md-fab-speed-dial:not(.md-hover-full).md-is-open{pointer-events:auto}md-fab-speed-dial ._md-css-variables{z-index:20}md-fab-speed-dial.md-is-open .md-fab-action-item{align-items:center}md-fab-speed-dial md-fab-actions{display:flex;height:auto}md-fab-speed-dial md-fab-actions .md-fab-action-item{transition:all .3s cubic-bezier(.55,0,.55,.2)}md-fab-speed-dial.md-down{flex-direction:column}md-fab-speed-dial.md-down md-fab-trigger{order:1}md-fab-speed-dial.md-down md-fab-actions{flex-direction:column;order:2}md-fab-speed-dial.md-up{flex-direction:column}md-fab-speed-dial.md-up md-fab-trigger{order:2}md-fab-speed-dial.md-up md-fab-actions{flex-direction:column-reverse;order:1}md-fab-speed-dial.md-left{flex-direction:row}md-fab-speed-dial.md-left md-fab-trigger{order:2}md-fab-speed-dial.md-left md-fab-actions{flex-direction:row-reverse;order:1}md-fab-speed-dial.md-left md-fab-actions .md-fab-action-item{transition:all .3s cubic-bezier(.55,0,.55,.2)}md-fab-speed-dial.md-right{flex-direction:row}md-fab-speed-dial.md-right md-fab-trigger{order:1}md-fab-speed-dial.md-right md-fab-actions{flex-direction:row;order:2}md-fab-speed-dial.md-right md-fab-actions .md-fab-action-item{transition:all .3s cubic-bezier(.55,0,.55,.2)}md-fab-speed-dial.md-fling-remove .md-fab-action-item>*,md-fab-speed-dial.md-scale-remove .md-fab-action-item>*{visibility:hidden}md-fab-speed-dial.md-fling .md-fab-action-item{opacity:1}md-fab-speed-dial.md-fling.md-animations-waiting .md-fab-action-item{opacity:0;transition-duration:0s}md-fab-speed-dial.md-scale .md-fab-action-item{transform:scale(0);transition:all .3s cubic-bezier(.55,0,.55,.2);transition-duration:.1428571429s}md-fab-toolbar{display:block}md-fab-toolbar.md-fab-bottom-right{top:auto;right:20px;bottom:20px;left:auto;position:absolute}md-fab-toolbar.md-fab-bottom-left{top:auto;right:auto;bottom:20px;left:20px;position:absolute}md-fab-toolbar.md-fab-top-right{top:20px;right:20px;bottom:auto;left:auto;position:absolute}md-fab-toolbar.md-fab-top-left{top:20px;right:auto;bottom:auto;left:20px;position:absolute}md-fab-toolbar .md-fab-toolbar-wrapper{display:block;position:relative;overflow:hidden;height:68px}md-fab-toolbar md-fab-trigger{position:absolute;z-index:20}md-fab-toolbar md-fab-trigger button{overflow:visible!important}md-fab-toolbar md-fab-trigger .md-fab-toolbar-background{display:block;position:absolute;z-index:21;opacity:1;transition:all .3s cubic-bezier(.55,0,.55,.2)}md-fab-toolbar md-fab-trigger md-icon{position:relative;z-index:22;opacity:1;transition:all .2s ease-in}md-fab-toolbar.md-left md-fab-trigger{right:0}[dir=rtl] md-fab-toolbar.md-left md-fab-trigger{right:auto;left:0}md-fab-toolbar.md-left .md-toolbar-tools{flex-direction:row-reverse}md-fab-toolbar.md-left .md-toolbar-tools>.md-button:first-child{margin-right:.6rem}[dir=rtl] md-fab-toolbar.md-left .md-toolbar-tools>.md-button:first-child{margin-right:auto;margin-left:.6rem}md-fab-toolbar.md-left .md-toolbar-tools>.md-button:first-child{margin-left:-.8rem}[dir=rtl] md-fab-toolbar.md-left .md-toolbar-tools>.md-button:first-child{margin-left:auto;margin-right:-.8rem}md-fab-toolbar.md-left .md-toolbar-tools>.md-button:last-child{margin-right:8px}[dir=rtl] md-fab-toolbar.md-left .md-toolbar-tools>.md-button:last-child{margin-right:auto;margin-left:8px}md-fab-toolbar.md-right md-fab-trigger{left:0}[dir=rtl] md-fab-toolbar.md-right md-fab-trigger{left:auto;right:0}md-fab-toolbar.md-right .md-toolbar-tools{flex-direction:row}md-fab-toolbar md-toolbar{background-color:transparent!important;pointer-events:none;z-index:23}md-fab-toolbar md-toolbar .md-toolbar-tools{padding:0 20px;margin-top:3px}md-fab-toolbar md-toolbar .md-fab-action-item{opacity:0;transform:scale(0);transition:all .3s cubic-bezier(.55,0,.55,.2);transition-duration:.15s}md-fab-toolbar.md-is-open md-fab-trigger>button{box-shadow:none}md-fab-toolbar.md-is-open md-fab-trigger>button md-icon{opacity:0}md-fab-toolbar.md-is-open .md-fab-action-item{opacity:1;transform:scale(1)}md-grid-list{box-sizing:border-box;display:block;position:relative}md-grid-list md-grid-tile,md-grid-list md-grid-tile-footer,md-grid-list md-grid-tile-header,md-grid-list md-grid-tile>figure{box-sizing:border-box}md-grid-list md-grid-tile{display:block;position:absolute}md-grid-list md-grid-tile figure{display:flex;align-items:center;justify-content:center;height:100%;position:absolute;top:0;right:0;bottom:0;left:0;padding:0;margin:0}md-grid-list md-grid-tile md-grid-tile-footer,md-grid-list md-grid-tile md-grid-tile-header{display:flex;flex-direction:row;align-items:center;height:48px;color:#fff;background:rgba(0,0,0,.18);overflow:hidden;position:absolute;left:0;right:0}md-grid-list md-grid-tile md-grid-tile-footer h3,md-grid-list md-grid-tile md-grid-tile-footer h4,md-grid-list md-grid-tile md-grid-tile-header h3,md-grid-list md-grid-tile md-grid-tile-header h4{font-weight:400;margin:0 0 0 16px}md-grid-list md-grid-tile md-grid-tile-footer h3,md-grid-list md-grid-tile md-grid-tile-header h3{font-size:14px}md-grid-list md-grid-tile md-grid-tile-footer h4,md-grid-list md-grid-tile md-grid-tile-header h4{font-size:12px}md-grid-list md-grid-tile md-grid-tile-header{top:0}md-grid-list md-grid-tile md-grid-tile-footer{bottom:0}@media screen and (-ms-high-contrast:active){md-grid-tile{border:1px solid #fff}md-grid-tile-footer{border-top:1px solid #fff}}md-icon{margin:auto;background-repeat:no-repeat no-repeat;display:inline-block;vertical-align:middle;fill:currentColor;height:24px;width:24px;min-height:24px;min-width:24px}md-icon svg{pointer-events:none;display:block}md-icon[md-font-icon]{line-height:24px;width:auto}md-input-container{display:inline-block;position:relative;padding:2px;margin:18px 0;vertical-align:middle}md-input-container:after{content:'';display:table;clear:both}md-input-container.md-block{display:block}md-input-container .md-errors-spacer{float:right;min-height:24px;min-width:1px}[dir=rtl] md-input-container .md-errors-spacer{float:left}md-input-container>md-icon{position:absolute;top:8px;left:2px;right:auto}[dir=rtl] md-input-container>md-icon{left:auto}[dir=rtl] md-input-container>md-icon{right:2px}md-input-container input[type=color],md-input-container input[type=date],md-input-container input[type=datetime-local],md-input-container input[type=datetime],md-input-container input[type=email],md-input-container input[type=month],md-input-container input[type=number],md-input-container input[type=password],md-input-container input[type=search],md-input-container input[type=tel],md-input-container input[type=text],md-input-container input[type=time],md-input-container input[type=url],md-input-container input[type=week],md-input-container textarea{-moz-appearance:none;-webkit-appearance:none}md-input-container input[type=date],md-input-container input[type=datetime-local],md-input-container input[type=month],md-input-container input[type=time],md-input-container input[type=week]{min-height:26px}md-input-container textarea{resize:none;overflow:hidden}md-input-container textarea.md-input{min-height:26px;-ms-flex-preferred-size:auto}md-input-container textarea[md-no-autogrow]{height:auto;overflow:auto}md-input-container label:not(.md-container-ignore){position:absolute;bottom:100%;left:0;right:auto}[dir=rtl] md-input-container label:not(.md-container-ignore){left:auto}[dir=rtl] md-input-container label:not(.md-container-ignore){right:0}md-input-container label:not(.md-container-ignore).md-required:after{content:' *';font-size:13px;vertical-align:top}md-input-container .md-placeholder,md-input-container label:not(.md-no-float):not(.md-container-ignore){overflow:hidden;text-overflow:ellipsis;white-space:nowrap;width:100%;order:1;pointer-events:none;-webkit-font-smoothing:antialiased;padding-left:3px;padding-right:0;z-index:1;transform:translate3d(0,28px,0) scale(1);transition:transform .4s cubic-bezier(.25,.8,.25,1);max-width:100%;transform-origin:left top}[dir=rtl] md-input-container .md-placeholder,[dir=rtl] md-input-container label:not(.md-no-float):not(.md-container-ignore){padding-left:0}[dir=rtl] md-input-container .md-placeholder,[dir=rtl] md-input-container label:not(.md-no-float):not(.md-container-ignore){padding-right:3px}[dir=rtl] md-input-container .md-placeholder,[dir=rtl] md-input-container label:not(.md-no-float):not(.md-container-ignore){transform-origin:right top}md-input-container .md-placeholder{position:absolute;top:0;opacity:0;transition-property:opacity,transform;transform:translate3d(0,30px,0)}md-input-container.md-input-focused .md-placeholder{opacity:1;transform:translate3d(0,24px,0)}md-input-container.md-input-has-value .md-placeholder{transition:none;opacity:0}md-input-container:not(.md-input-has-value) input:not(:focus),md-input-container:not(.md-input-has-value) input:not(:focus)::-webkit-datetime-edit-ampm-field,md-input-container:not(.md-input-has-value) input:not(:focus)::-webkit-datetime-edit-day-field,md-input-container:not(.md-input-has-value) input:not(:focus)::-webkit-datetime-edit-hour-field,md-input-container:not(.md-input-has-value) input:not(:focus)::-webkit-datetime-edit-millisecond-field,md-input-container:not(.md-input-has-value) input:not(:focus)::-webkit-datetime-edit-minute-field,md-input-container:not(.md-input-has-value) input:not(:focus)::-webkit-datetime-edit-month-field,md-input-container:not(.md-input-has-value) input:not(:focus)::-webkit-datetime-edit-second-field,md-input-container:not(.md-input-has-value) input:not(:focus)::-webkit-datetime-edit-text,md-input-container:not(.md-input-has-value) input:not(:focus)::-webkit-datetime-edit-week-field,md-input-container:not(.md-input-has-value) input:not(:focus)::-webkit-datetime-edit-year-field{color:transparent}md-input-container .md-input{order:2;display:block;margin-top:0;background:0 0;padding-top:2px;padding-bottom:1px;padding-left:2px;padding-right:2px;border-width:0 0 1px 0;line-height:26px;height:30px;-ms-flex-preferred-size:26px;border-radius:0;border-style:solid;width:100%;box-sizing:border-box;float:left}[dir=rtl] md-input-container .md-input{float:right}md-input-container .md-input:focus{outline:0}md-input-container .md-input:invalid{outline:0;box-shadow:none}md-input-container .md-input.md-no-flex{flex:none!important}md-input-container .md-char-counter{text-align:right;padding-right:2px;padding-left:0}[dir=rtl] md-input-container .md-char-counter{text-align:left}[dir=rtl] md-input-container .md-char-counter{padding-right:0}[dir=rtl] md-input-container .md-char-counter{padding-left:2px}md-input-container .md-input-messages-animation{position:relative;order:4;overflow:hidden;clear:left}[dir=rtl] md-input-container .md-input-messages-animation{clear:right}md-input-container .md-input-messages-animation.ng-enter .md-input-message-animation{opacity:0;margin-top:-100px}md-input-container .md-char-counter,md-input-container .md-input-message-animation{font-size:12px;line-height:14px;overflow:hidden;transition:all .3s cubic-bezier(.55,0,.55,.2);opacity:1;margin-top:0;padding-top:5px}md-input-container .md-char-counter:not(.md-char-counter),md-input-container .md-input-message-animation:not(.md-char-counter){padding-right:5px;padding-left:0}[dir=rtl] md-input-container .md-char-counter:not(.md-char-counter),[dir=rtl] md-input-container .md-input-message-animation:not(.md-char-counter){padding-right:0}[dir=rtl] md-input-container .md-char-counter:not(.md-char-counter),[dir=rtl] md-input-container .md-input-message-animation:not(.md-char-counter){padding-left:5px}md-input-container:not(.md-input-invalid) .md-auto-hide .md-input-message-animation{opacity:0;margin-top:-100px}md-input-container .md-input-message-animation:not(.ng-animate){opacity:0;margin-top:-100px}md-input-container .md-input-message-animation.ng-enter{opacity:0;margin-top:-100px}md-input-container.md-input-focused label:not(.md-no-float),md-input-container.md-input-has-placeholder label:not(.md-no-float),md-input-container.md-input-has-value label:not(.md-no-float){transform:translate3d(0,6px,0) scale(.75);transition:transform cubic-bezier(.25,.8,.25,1) .4s,width cubic-bezier(.25,.8,.25,1) .4s}md-input-container.md-input-has-value label{transition:none}md-input-container .md-input.ng-invalid.ng-dirty,md-input-container.md-input-focused .md-input,md-input-container.md-input-resized .md-input{padding-bottom:0;border-width:0 0 2px 0}[disabled] md-input-container .md-input,md-input-container .md-input[disabled]{background-position:bottom -1px left 0;background-size:4px 1px;background-repeat:repeat-x}md-input-container.md-icon-float{transition:margin-top .4s cubic-bezier(.25,.8,.25,1)}md-input-container.md-icon-float>label{pointer-events:none;position:absolute}md-input-container.md-icon-float>md-icon{top:8px;left:2px;right:auto}[dir=rtl] md-input-container.md-icon-float>md-icon{left:auto}[dir=rtl] md-input-container.md-icon-float>md-icon{right:2px}md-input-container.md-icon-left>label .md-placeholder,md-input-container.md-icon-left>label:not(.md-no-float):not(.md-container-ignore),md-input-container.md-icon-right>label .md-placeholder,md-input-container.md-icon-right>label:not(.md-no-float):not(.md-container-ignore){width:calc(100% - 36px - 18px)}md-input-container.md-icon-left{padding-left:36px;padding-right:0}[dir=rtl] md-input-container.md-icon-left{padding-left:0}[dir=rtl] md-input-container.md-icon-left{padding-right:36px}md-input-container.md-icon-left>label{left:36px;right:auto}[dir=rtl] md-input-container.md-icon-left>label{left:auto}[dir=rtl] md-input-container.md-icon-left>label{right:36px}md-input-container.md-icon-right{padding-left:0;padding-right:36px}[dir=rtl] md-input-container.md-icon-right{padding-left:36px}[dir=rtl] md-input-container.md-icon-right{padding-right:0}md-input-container.md-icon-right>md-icon:last-of-type{margin:0;right:2px;left:auto}[dir=rtl] md-input-container.md-icon-right>md-icon:last-of-type{right:auto}[dir=rtl] md-input-container.md-icon-right>md-icon:last-of-type{left:2px}md-input-container.md-icon-left.md-icon-right{padding-left:36px;padding-right:36px}md-input-container.md-icon-left.md-icon-right>label .md-placeholder,md-input-container.md-icon-left.md-icon-right>label:not(.md-no-float):not(.md-container-ignore){width:calc(100% - (36px * 2))}.md-resize-wrapper{position:relative}.md-resize-wrapper:after{content:'';display:table;clear:both}.md-resize-handle{position:absolute;bottom:-5px;left:0;height:10px;background:0 0;width:100%;cursor:ns-resize}@media screen and (-ms-high-contrast:active){md-input-container.md-default-theme>md-icon{fill:#fff}}md-list{display:block;padding:8px 0 8px 0}md-list .md-subheader{font-size:14px;font-weight:500;letter-spacing:.010em;line-height:1.2em}md-list.md-dense md-list-item,md-list.md-dense md-list-item .md-list-item-inner{min-height:48px}md-list.md-dense md-list-item .md-list-item-inner::before,md-list.md-dense md-list-item::before{content:'';min-height:48px;visibility:hidden;display:inline-block}md-list.md-dense md-list-item .md-list-item-inner md-icon:first-child,md-list.md-dense md-list-item md-icon:first-child{width:20px;height:20px}md-list.md-dense md-list-item .md-list-item-inner>md-icon:first-child:not(.md-avatar-icon),md-list.md-dense md-list-item>md-icon:first-child:not(.md-avatar-icon){margin-right:36px}[dir=rtl] md-list.md-dense md-list-item .md-list-item-inner>md-icon:first-child:not(.md-avatar-icon),[dir=rtl] md-list.md-dense md-list-item>md-icon:first-child:not(.md-avatar-icon){margin-right:auto;margin-left:36px}md-list.md-dense md-list-item .md-avatar,md-list.md-dense md-list-item .md-avatar-icon,md-list.md-dense md-list-item .md-list-item-inner .md-avatar,md-list.md-dense md-list-item .md-list-item-inner .md-avatar-icon{margin-right:20px}[dir=rtl] md-list.md-dense md-list-item .md-avatar,[dir=rtl] md-list.md-dense md-list-item .md-avatar-icon,[dir=rtl] md-list.md-dense md-list-item .md-list-item-inner .md-avatar,[dir=rtl] md-list.md-dense md-list-item .md-list-item-inner .md-avatar-icon{margin-right:auto;margin-left:20px}md-list.md-dense md-list-item .md-avatar,md-list.md-dense md-list-item .md-list-item-inner .md-avatar{flex:none;width:36px;height:36px}md-list.md-dense md-list-item.md-2-line .md-list-item-text.md-offset,md-list.md-dense md-list-item.md-2-line>.md-no-style .md-list-item-text.md-offset,md-list.md-dense md-list-item.md-3-line .md-list-item-text.md-offset,md-list.md-dense md-list-item.md-3-line>.md-no-style .md-list-item-text.md-offset{margin-left:56px}[dir=rtl] md-list.md-dense md-list-item.md-2-line .md-list-item-text.md-offset,[dir=rtl] md-list.md-dense md-list-item.md-2-line>.md-no-style .md-list-item-text.md-offset,[dir=rtl] md-list.md-dense md-list-item.md-3-line .md-list-item-text.md-offset,[dir=rtl] md-list.md-dense md-list-item.md-3-line>.md-no-style .md-list-item-text.md-offset{margin-left:auto;margin-right:56px}md-list.md-dense md-list-item.md-2-line .md-list-item-text h3,md-list.md-dense md-list-item.md-2-line .md-list-item-text h4,md-list.md-dense md-list-item.md-2-line .md-list-item-text p,md-list.md-dense md-list-item.md-2-line>.md-no-style .md-list-item-text h3,md-list.md-dense md-list-item.md-2-line>.md-no-style .md-list-item-text h4,md-list.md-dense md-list-item.md-2-line>.md-no-style .md-list-item-text p,md-list.md-dense md-list-item.md-3-line .md-list-item-text h3,md-list.md-dense md-list-item.md-3-line .md-list-item-text h4,md-list.md-dense md-list-item.md-3-line .md-list-item-text p,md-list.md-dense md-list-item.md-3-line>.md-no-style .md-list-item-text h3,md-list.md-dense md-list-item.md-3-line>.md-no-style .md-list-item-text h4,md-list.md-dense md-list-item.md-3-line>.md-no-style .md-list-item-text p{line-height:1.05;font-size:12px}md-list.md-dense md-list-item.md-2-line .md-list-item-text h3,md-list.md-dense md-list-item.md-2-line>.md-no-style .md-list-item-text h3,md-list.md-dense md-list-item.md-3-line .md-list-item-text h3,md-list.md-dense md-list-item.md-3-line>.md-no-style .md-list-item-text h3{font-size:13px}md-list.md-dense md-list-item.md-2-line,md-list.md-dense md-list-item.md-2-line>.md-no-style{min-height:60px}md-list.md-dense md-list-item.md-2-line::before,md-list.md-dense md-list-item.md-2-line>.md-no-style::before{content:'';min-height:60px;visibility:hidden;display:inline-block}md-list.md-dense md-list-item.md-2-line .md-avatar-icon,md-list.md-dense md-list-item.md-2-line>.md-avatar,md-list.md-dense md-list-item.md-2-line>.md-no-style .md-avatar-icon,md-list.md-dense md-list-item.md-2-line>.md-no-style>.md-avatar{margin-top:12px}md-list.md-dense md-list-item.md-3-line,md-list.md-dense md-list-item.md-3-line>.md-no-style{min-height:76px}md-list.md-dense md-list-item.md-3-line::before,md-list.md-dense md-list-item.md-3-line>.md-no-style::before{content:'';min-height:76px;visibility:hidden;display:inline-block}md-list.md-dense md-list-item.md-3-line>.md-avatar,md-list.md-dense md-list-item.md-3-line>.md-no-style>.md-avatar,md-list.md-dense md-list-item.md-3-line>.md-no-style>md-icon:first-child,md-list.md-dense md-list-item.md-3-line>md-icon:first-child{margin-top:16px}md-list-item{position:relative}md-list-item.md-proxy-focus.md-focused .md-no-style{transition:background-color .15s linear}md-list-item._md-button-wrap{position:relative}md-list-item._md-button-wrap>div.md-button:first-child{display:flex;align-items:center;justify-content:flex-start;padding:0 16px;margin:0;font-weight:400;text-align:left;border:medium none}[dir=rtl] md-list-item._md-button-wrap>div.md-button:first-child{text-align:right}md-list-item._md-button-wrap>div.md-button:first-child>.md-button:first-child{position:absolute;top:0;left:0;height:100%;margin:0;padding:0}md-list-item._md-button-wrap>div.md-button:first-child .md-list-item-inner{width:100%;min-height:inherit}md-list-item .md-no-style,md-list-item.md-no-proxy{position:relative;padding:0 16px;flex:1 1 auto}md-list-item .md-no-style.md-button,md-list-item.md-no-proxy.md-button{font-size:inherit;height:inherit;text-align:left;text-transform:none;width:100%;white-space:normal;flex-direction:inherit;align-items:inherit;border-radius:0;margin:0}[dir=rtl] md-list-item .md-no-style.md-button,[dir=rtl] md-list-item.md-no-proxy.md-button{text-align:right}md-list-item .md-no-style.md-button>.md-ripple-container,md-list-item.md-no-proxy.md-button>.md-ripple-container{border-radius:0}md-list-item .md-no-style:focus,md-list-item.md-no-proxy:focus{outline:0}md-list-item.md-clickable:hover{cursor:pointer}md-list-item md-divider{position:absolute;bottom:0;left:0;width:100%}[dir=rtl] md-list-item md-divider{left:auto;right:0}md-list-item md-divider[md-inset]{left:72px;width:calc(100% - 72px);margin:0!important}[dir=rtl] md-list-item md-divider[md-inset]{left:auto;right:72px}md-list-item,md-list-item .md-list-item-inner{display:flex;justify-content:flex-start;align-items:center;min-height:48px;height:auto}md-list-item .md-list-item-inner::before,md-list-item::before{content:'';min-height:48px;visibility:hidden;display:inline-block}md-list-item .md-list-item-inner>div.md-primary>md-icon:not(.md-avatar-icon),md-list-item .md-list-item-inner>div.md-secondary>md-icon:not(.md-avatar-icon),md-list-item .md-list-item-inner>md-icon.md-secondary:not(.md-avatar-icon),md-list-item .md-list-item-inner>md-icon:first-child:not(.md-avatar-icon),md-list-item>div.md-primary>md-icon:not(.md-avatar-icon),md-list-item>div.md-secondary>md-icon:not(.md-avatar-icon),md-list-item>md-icon.md-secondary:not(.md-avatar-icon),md-list-item>md-icon:first-child:not(.md-avatar-icon){width:24px;margin-top:16px;margin-bottom:12px;box-sizing:content-box}md-list-item .md-list-item-inner md-checkbox.md-secondary,md-list-item .md-list-item-inner>div.md-primary>md-checkbox,md-list-item .md-list-item-inner>div.md-secondary>md-checkbox,md-list-item .md-list-item-inner>md-checkbox,md-list-item md-checkbox.md-secondary,md-list-item>div.md-primary>md-checkbox,md-list-item>div.md-secondary>md-checkbox,md-list-item>md-checkbox{align-self:center}md-list-item .md-list-item-inner md-checkbox.md-secondary .md-label,md-list-item .md-list-item-inner>div.md-primary>md-checkbox .md-label,md-list-item .md-list-item-inner>div.md-secondary>md-checkbox .md-label,md-list-item .md-list-item-inner>md-checkbox .md-label,md-list-item md-checkbox.md-secondary .md-label,md-list-item>div.md-primary>md-checkbox .md-label,md-list-item>div.md-secondary>md-checkbox .md-label,md-list-item>md-checkbox .md-label{display:none}md-list-item .md-list-item-inner>md-icon:first-child:not(.md-avatar-icon),md-list-item>md-icon:first-child:not(.md-avatar-icon){margin-right:32px}[dir=rtl] md-list-item .md-list-item-inner>md-icon:first-child:not(.md-avatar-icon),[dir=rtl] md-list-item>md-icon:first-child:not(.md-avatar-icon){margin-right:auto;margin-left:32px}md-list-item .md-avatar,md-list-item .md-avatar-icon,md-list-item .md-list-item-inner .md-avatar,md-list-item .md-list-item-inner .md-avatar-icon{margin-top:8px;margin-bottom:8px;margin-right:16px;border-radius:50%;box-sizing:content-box}[dir=rtl] md-list-item .md-avatar,[dir=rtl] md-list-item .md-avatar-icon,[dir=rtl] md-list-item .md-list-item-inner .md-avatar,[dir=rtl] md-list-item .md-list-item-inner .md-avatar-icon{margin-right:auto;margin-left:16px}md-list-item .md-avatar,md-list-item .md-list-item-inner .md-avatar{flex:none;width:40px;height:40px}md-list-item .md-avatar-icon,md-list-item .md-list-item-inner .md-avatar-icon{padding:8px}md-list-item .md-avatar-icon svg,md-list-item .md-list-item-inner .md-avatar-icon svg{width:24px;height:24px}md-list-item .md-list-item-inner>md-checkbox,md-list-item>md-checkbox{width:24px;margin-left:3px;margin-right:29px;margin-top:16px}[dir=rtl] md-list-item .md-list-item-inner>md-checkbox,[dir=rtl] md-list-item>md-checkbox{margin-left:29px}[dir=rtl] md-list-item .md-list-item-inner>md-checkbox,[dir=rtl] md-list-item>md-checkbox{margin-right:3px}md-list-item .md-list-item-inner .md-secondary-container,md-list-item .md-secondary-container{display:flex;align-items:center;flex-shrink:0;margin:auto;margin-right:0;margin-left:auto}[dir=rtl] md-list-item .md-list-item-inner .md-secondary-container,[dir=rtl] md-list-item .md-secondary-container{margin-right:auto}[dir=rtl] md-list-item .md-list-item-inner .md-secondary-container,[dir=rtl] md-list-item .md-secondary-container{margin-left:0}md-list-item .md-list-item-inner .md-secondary-container .md-button:last-of-type,md-list-item .md-list-item-inner .md-secondary-container .md-icon-button:last-of-type,md-list-item .md-secondary-container .md-button:last-of-type,md-list-item .md-secondary-container .md-icon-button:last-of-type{margin-right:0}[dir=rtl] md-list-item .md-list-item-inner .md-secondary-container .md-button:last-of-type,[dir=rtl] md-list-item .md-list-item-inner .md-secondary-container .md-icon-button:last-of-type,[dir=rtl] md-list-item .md-secondary-container .md-button:last-of-type,[dir=rtl] md-list-item .md-secondary-container .md-icon-button:last-of-type{margin-right:auto;margin-left:0}md-list-item .md-list-item-inner .md-secondary-container md-checkbox,md-list-item .md-secondary-container md-checkbox{margin-top:0;margin-bottom:0}md-list-item .md-list-item-inner .md-secondary-container md-checkbox:last-child,md-list-item .md-secondary-container md-checkbox:last-child{width:24px;margin-right:0}[dir=rtl] md-list-item .md-list-item-inner .md-secondary-container md-checkbox:last-child,[dir=rtl] md-list-item .md-secondary-container md-checkbox:last-child{margin-right:auto;margin-left:0}md-list-item .md-list-item-inner .md-secondary-container md-switch,md-list-item .md-secondary-container md-switch{margin-top:0;margin-bottom:0;margin-right:-6px}[dir=rtl] md-list-item .md-list-item-inner .md-secondary-container md-switch,[dir=rtl] md-list-item .md-secondary-container md-switch{margin-right:auto;margin-left:-6px}md-list-item .md-list-item-inner>.md-list-item-inner>p,md-list-item .md-list-item-inner>p,md-list-item>.md-list-item-inner>p,md-list-item>p{flex:1 1 auto;margin:0}md-list-item.md-2-line,md-list-item.md-2-line>.md-no-style,md-list-item.md-3-line,md-list-item.md-3-line>.md-no-style{align-items:flex-start;justify-content:center}md-list-item.md-2-line.md-long-text,md-list-item.md-2-line>.md-no-style.md-long-text,md-list-item.md-3-line.md-long-text,md-list-item.md-3-line>.md-no-style.md-long-text{margin-top:8px;margin-bottom:8px}md-list-item.md-2-line .md-list-item-text,md-list-item.md-2-line>.md-no-style .md-list-item-text,md-list-item.md-3-line .md-list-item-text,md-list-item.md-3-line>.md-no-style .md-list-item-text{flex:1 1 auto;margin:auto;text-overflow:ellipsis;overflow:hidden}md-list-item.md-2-line .md-list-item-text.md-offset,md-list-item.md-2-line>.md-no-style .md-list-item-text.md-offset,md-list-item.md-3-line .md-list-item-text.md-offset,md-list-item.md-3-line>.md-no-style .md-list-item-text.md-offset{margin-left:56px}[dir=rtl] md-list-item.md-2-line .md-list-item-text.md-offset,[dir=rtl] md-list-item.md-2-line>.md-no-style .md-list-item-text.md-offset,[dir=rtl] md-list-item.md-3-line .md-list-item-text.md-offset,[dir=rtl] md-list-item.md-3-line>.md-no-style .md-list-item-text.md-offset{margin-left:auto;margin-right:56px}md-list-item.md-2-line .md-list-item-text h3,md-list-item.md-2-line>.md-no-style .md-list-item-text h3,md-list-item.md-3-line .md-list-item-text h3,md-list-item.md-3-line>.md-no-style .md-list-item-text h3{font-size:16px;font-weight:400;letter-spacing:.010em;margin:0;line-height:1.2em;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}md-list-item.md-2-line .md-list-item-text h4,md-list-item.md-2-line>.md-no-style .md-list-item-text h4,md-list-item.md-3-line .md-list-item-text h4,md-list-item.md-3-line>.md-no-style .md-list-item-text h4{font-size:14px;letter-spacing:.010em;margin:3px 0 1px 0;font-weight:400;line-height:1.2em;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}md-list-item.md-2-line .md-list-item-text p,md-list-item.md-2-line>.md-no-style .md-list-item-text p,md-list-item.md-3-line .md-list-item-text p,md-list-item.md-3-line>.md-no-style .md-list-item-text p{font-size:14px;font-weight:500;letter-spacing:.010em;margin:0;line-height:1.6em}md-list-item.md-2-line,md-list-item.md-2-line>.md-no-style{height:auto;min-height:72px}md-list-item.md-2-line::before,md-list-item.md-2-line>.md-no-style::before{content:'';min-height:72px;visibility:hidden;display:inline-block}md-list-item.md-2-line .md-avatar-icon,md-list-item.md-2-line>.md-avatar,md-list-item.md-2-line>.md-no-style .md-avatar-icon,md-list-item.md-2-line>.md-no-style>.md-avatar{margin-top:12px}md-list-item.md-2-line>.md-no-style>md-icon:first-child,md-list-item.md-2-line>md-icon:first-child{align-self:flex-start}md-list-item.md-2-line .md-list-item-text,md-list-item.md-2-line>.md-no-style .md-list-item-text{flex:1 1 auto}md-list-item.md-3-line,md-list-item.md-3-line>.md-no-style{height:auto;min-height:88px}md-list-item.md-3-line::before,md-list-item.md-3-line>.md-no-style::before{content:'';min-height:88px;visibility:hidden;display:inline-block}md-list-item.md-3-line>.md-avatar,md-list-item.md-3-line>.md-no-style>.md-avatar,md-list-item.md-3-line>.md-no-style>md-icon:first-child,md-list-item.md-3-line>md-icon:first-child{margin-top:16px}.md-open-menu-container{position:fixed;left:0;top:0;z-index:100;opacity:0;border-radius:2px}.md-open-menu-container md-menu-divider{margin-top:4px;margin-bottom:4px;height:1px;min-height:1px;max-height:1px;width:100%}.md-open-menu-container md-menu-content>*{opacity:0}.md-open-menu-container:not(.md-clickable){pointer-events:none}.md-open-menu-container.md-active{opacity:1;transition:all .4s cubic-bezier(.25,.8,.25,1);transition-duration:.2s}.md-open-menu-container.md-active>md-menu-content>*{opacity:1;transition:all .3s cubic-bezier(.55,0,.55,.2);transition-duration:.2s;transition-delay:.1s}.md-open-menu-container.md-leave{opacity:0;transition:all .3s cubic-bezier(.55,0,.55,.2);transition-duration:250ms}md-menu-content{display:flex;flex-direction:column;padding:8px 0;max-height:304px;overflow-y:auto}md-menu-content.md-dense{max-height:208px}md-menu-content.md-dense md-menu-item{height:32px;min-height:0}md-menu-item{display:flex;flex-direction:row;min-height:48px;height:48px;align-content:center;justify-content:flex-start}md-menu-item>*{width:100%;margin:auto 0;padding-left:16px;padding-right:16px}md-menu-item>a.md-button{padding-top:5px}md-menu-item>.md-button{text-align:left;display:inline-block;border-radius:0;margin:auto 0;font-size:15px;text-transform:none;font-weight:400;height:100%;padding-left:16px;padding-right:16px;width:100%}md-menu-item>.md-button::-moz-focus-inner{padding:0;border:0}[dir=rtl] md-menu-item>.md-button{text-align:right}md-menu-item>.md-button md-icon{margin:auto 16px auto 0}[dir=rtl] md-menu-item>.md-button md-icon{margin:auto 0 auto 16px}md-menu-item>.md-button p{display:inline-block;margin:auto}md-menu-item>.md-button span{margin-top:auto;margin-bottom:auto}md-menu-item>.md-button .md-ripple-container{border-radius:inherit}md-toolbar .md-menu{height:auto;margin:auto;padding:0}@media (max-width:959px){md-menu-content{min-width:112px}md-menu-content[width="3"]{min-width:168px}md-menu-content[width="4"]{min-width:224px}md-menu-content[width="5"]{min-width:280px}md-menu-content[width="6"]{min-width:336px}md-menu-content[width="7"]{min-width:392px}}@media (min-width:960px){md-menu-content{min-width:96px}md-menu-content[width="3"]{min-width:192px}md-menu-content[width="4"]{min-width:256px}md-menu-content[width="5"]{min-width:320px}md-menu-content[width="6"]{min-width:384px}md-menu-content[width="7"]{min-width:448px}}md-toolbar.md-menu-toolbar h2.md-toolbar-tools{line-height:1rem;height:auto;padding:28px;padding-bottom:12px}md-toolbar.md-has-open-menu{position:relative;z-index:100}md-menu-bar{padding:0 20px;display:block;position:relative;z-index:2}md-menu-bar .md-menu{display:inline-block;padding:0;position:relative}md-menu-bar button{font-size:14px;padding:0 10px;margin:0;border:0;background-color:transparent;height:40px}md-menu-bar md-backdrop.md-menu-backdrop{z-index:-2}md-menu-content.md-menu-bar-menu.md-dense{max-height:none;padding:16px 0}md-menu-content.md-menu-bar-menu.md-dense md-menu-item.md-indent{position:relative}md-menu-content.md-menu-bar-menu.md-dense md-menu-item.md-indent>md-icon{position:absolute;padding:0;width:24px;top:6px;left:24px}[dir=rtl] md-menu-content.md-menu-bar-menu.md-dense md-menu-item.md-indent>md-icon{left:auto;right:24px}md-menu-content.md-menu-bar-menu.md-dense md-menu-item.md-indent .md-menu>.md-button,md-menu-content.md-menu-bar-menu.md-dense md-menu-item.md-indent>.md-button{padding:0 32px 0 64px}[dir=rtl] md-menu-content.md-menu-bar-menu.md-dense md-menu-item.md-indent .md-menu>.md-button,[dir=rtl] md-menu-content.md-menu-bar-menu.md-dense md-menu-item.md-indent>.md-button{padding:0 64px 0 32px}md-menu-content.md-menu-bar-menu.md-dense .md-button{min-height:0;height:32px;display:flex}md-menu-content.md-menu-bar-menu.md-dense .md-button span{flex-grow:1}md-menu-content.md-menu-bar-menu.md-dense .md-button span.md-alt-text{flex-grow:0;align-self:flex-end;margin:0 8px}md-menu-content.md-menu-bar-menu.md-dense md-menu-divider{margin:8px 0}md-menu-content.md-menu-bar-menu.md-dense .md-menu>.md-button,md-menu-content.md-menu-bar-menu.md-dense md-menu-item>.md-button{text-align:left}[dir=rtl] md-menu-content.md-menu-bar-menu.md-dense .md-menu>.md-button,[dir=rtl] md-menu-content.md-menu-bar-menu.md-dense md-menu-item>.md-button{text-align:right}md-menu-content.md-menu-bar-menu.md-dense .md-menu{padding:0}md-menu-content.md-menu-bar-menu.md-dense .md-menu>.md-button{position:relative;margin:0;width:100%;text-transform:none;font-weight:400;border-radius:0;padding-left:16px}[dir=rtl] md-menu-content.md-menu-bar-menu.md-dense .md-menu>.md-button{padding-left:0;padding-right:16px}md-menu-content.md-menu-bar-menu.md-dense .md-menu>.md-button:after{display:block;content:'\25BC';position:absolute;top:0;speak:none;transform:rotate(270deg) scaleY(.45) scaleX(.9);right:28px}[dir=rtl] md-menu-content.md-menu-bar-menu.md-dense .md-menu>.md-button:after{transform:rotate(90deg) scaleY(.45) scaleX(.9)}[dir=rtl] md-menu-content.md-menu-bar-menu.md-dense .md-menu>.md-button:after{right:auto;left:28px}.md-nav-bar{border-style:solid;border-width:0 0 1px;height:48px;position:relative}._md-nav-bar-list{outline:0;list-style:none;margin:0;padding:0;box-sizing:border-box;display:flex;flex-direction:row}.md-nav-item:first-of-type{margin-left:8px}.md-button._md-nav-button{line-height:24px;margin:0 4px;padding:12px 16px;transition:background-color .35s cubic-bezier(.35,0,.25,1)}.md-button._md-nav-button:focus{outline:0}.md-button._md-nav-button:hover{background-color:inherit}md-nav-ink-bar{bottom:0;height:2px;left:auto;position:absolute;right:auto;background-color:#000}md-nav-ink-bar._md-left{transition:left 125ms cubic-bezier(.35,0,.25,1),right .25s cubic-bezier(.35,0,.25,1)}md-nav-ink-bar._md-right{transition:left .25s cubic-bezier(.35,0,.25,1),right 125ms cubic-bezier(.35,0,.25,1)}md-nav-extra-content{min-height:48px;padding-right:12px}.md-panel-outer-wrapper{height:100%;left:0;position:absolute;top:0;width:100%}._md-panel-hidden{display:none}._md-panel-fullscreen{border-radius:0;left:0;min-height:100%;min-width:100%;position:fixed;top:0}._md-panel-shown .md-panel{opacity:1;transition:none}.md-panel{opacity:0;position:fixed}.md-panel._md-panel-shown{opacity:1;transition:none}.md-panel._md-panel-animate-enter{opacity:1;transition:all .3s cubic-bezier(0,0,.2,1)}.md-panel._md-panel-animate-leave{opacity:1;transition:all .3s cubic-bezier(.4,0,1,1)}.md-panel._md-panel-animate-fade-out,.md-panel._md-panel-animate-scale-out{opacity:0}.md-panel._md-panel-backdrop{height:100%;position:absolute;width:100%}.md-panel._md-opaque-enter{opacity:.48;transition:opacity .3s cubic-bezier(0,0,.2,1)}.md-panel._md-opaque-leave{transition:opacity .3s cubic-bezier(.4,0,1,1)}@keyframes indeterminate-rotate{0%{transform:rotate(0)}100%{transform:rotate(360deg)}}md-progress-circular{position:relative;display:block}md-progress-circular._md-progress-circular-disabled{visibility:hidden}md-progress-circular.md-mode-indeterminate svg{animation:indeterminate-rotate 2.9s linear infinite}md-progress-circular svg{position:absolute;overflow:visible;top:0;left:0}md-progress-linear{display:block;position:relative;width:100%;height:5px;padding-top:0!important;margin-bottom:0!important}md-progress-linear._md-progress-linear-disabled{visibility:hidden}md-progress-linear .md-container{display:block;position:relative;overflow:hidden;width:100%;height:5px;transform:translate(0,0) scale(1,1)}md-progress-linear .md-container .md-bar{position:absolute;left:0;top:0;bottom:0;width:100%;height:5px}md-progress-linear .md-container .md-dashed:before{content:"";display:none;position:absolute;margin-top:0;height:5px;width:100%;background-color:transparent;background-size:10px 10px!important;background-position:0 -23px}md-progress-linear .md-container .md-bar1,md-progress-linear .md-container .md-bar2{transition:transform .2s linear}md-progress-linear .md-container.md-mode-query .md-bar1{display:none}md-progress-linear .md-container.md-mode-query .md-bar2{transition:all .2s linear;animation:query .8s infinite cubic-bezier(.39,.575,.565,1)}md-progress-linear .md-container.md-mode-determinate .md-bar1{display:none}md-progress-linear .md-container.md-mode-indeterminate .md-bar1{animation:md-progress-linear-indeterminate-scale-1 4s infinite,md-progress-linear-indeterminate-1 4s infinite}md-progress-linear .md-container.md-mode-indeterminate .md-bar2{animation:md-progress-linear-indeterminate-scale-2 4s infinite,md-progress-linear-indeterminate-2 4s infinite}md-progress-linear .md-container.ng-hide ._md-progress-linear-disabled md-progress-linear .md-container{animation:none}md-progress-linear .md-container.ng-hide ._md-progress-linear-disabled md-progress-linear .md-container .md-bar1{animation-name:none}md-progress-linear .md-container.ng-hide ._md-progress-linear-disabled md-progress-linear .md-container .md-bar2{animation-name:none}md-progress-linear .md-container.md-mode-buffer{background-color:transparent!important;transition:all .2s linear}md-progress-linear .md-container.md-mode-buffer .md-dashed:before{display:block;animation:buffer 3s infinite linear}@keyframes query{0%{opacity:1;transform:translateX(35%) scale(.3,1)}100%{opacity:0;transform:translateX(-50%) scale(0,1)}}@keyframes buffer{0%{opacity:1;background-position:0 -23px}50%{opacity:0}100%{opacity:1;background-position:-200px -23px}}@keyframes md-progress-linear-indeterminate-scale-1{0%{transform:scaleX(.1);animation-timing-function:linear}36.6%{transform:scaleX(.1);animation-timing-function:cubic-bezier(.334731432,.124819821,.785843996,1)}69.15%{transform:scaleX(.83);animation-timing-function:cubic-bezier(.225732004,0,.233648906,1.3709798)}100%{transform:scaleX(.1)}}@keyframes md-progress-linear-indeterminate-1{0%{left:-105.166666667%;animation-timing-function:linear}20%{left:-105.166666667%;animation-timing-function:cubic-bezier(.5,0,.701732,.495818703)}69.15%{left:21.5%;animation-timing-function:cubic-bezier(.302435,.38135197,.55,.956352125)}100%{left:95.4444444444%}}@keyframes md-progress-linear-indeterminate-scale-2{0%{transform:scaleX(.1);animation-timing-function:cubic-bezier(.205028172,.057050836,.57660995,.453970841)}19.15%{transform:scaleX(.57);animation-timing-function:cubic-bezier(.152312994,.196431957,.648373778,1.00431535)}44.15%{transform:scaleX(.91);animation-timing-function:cubic-bezier(.25775882,-.003163357,.211761916,1.38178961)}100%{transform:scaleX(.1)}}@keyframes md-progress-linear-indeterminate-2{0%{left:-54.8888888889%;animation-timing-function:cubic-bezier(.15,0,.5150584,.409684966)}25%{left:-17.25%;animation-timing-function:cubic-bezier(.3103299,.284057684,.8,.733718979)}48.35%{left:29.5%;animation-timing-function:cubic-bezier(.4,.627034903,.6,.902025796)}100%{left:117.388888889%}}md-radio-button{box-sizing:border-box;display:block;margin-bottom:16px;white-space:nowrap;cursor:pointer;position:relative}md-radio-button[disabled]{cursor:default}md-radio-button[disabled] .md-container{cursor:default}md-radio-button .md-container{position:absolute;top:50%;transform:translateY(-50%);box-sizing:border-box;display:inline-block;width:20px;height:20px;cursor:pointer;left:0;right:auto}[dir=rtl] md-radio-button .md-container{left:auto}[dir=rtl] md-radio-button .md-container{right:0}md-radio-button .md-container .md-ripple-container{position:absolute;display:block;width:auto;height:auto;left:-15px;top:-15px;right:-15px;bottom:-15px}md-radio-button .md-container:before{box-sizing:border-box;background-color:transparent;border-radius:50%;content:'';position:absolute;display:block;height:auto;left:0;top:0;right:0;bottom:0;transition:all .5s;width:auto}md-radio-button.md-align-top-left>div.md-container{top:12px}md-radio-button .md-off{box-sizing:border-box;position:absolute;top:0;left:0;width:20px;height:20px;border-style:solid;border-width:2px;border-radius:50%;transition:border-color ease .28s}md-radio-button .md-on{box-sizing:border-box;position:absolute;top:0;left:0;width:20px;height:20px;border-radius:50%;transition:transform ease .28s;transform:scale(0)}md-radio-button.md-checked .md-on{transform:scale(.5)}md-radio-button .md-label{box-sizing:border-box;position:relative;display:inline-block;margin-left:30px;margin-right:0;vertical-align:middle;white-space:normal;pointer-events:none;width:auto}[dir=rtl] md-radio-button .md-label{margin-left:0}[dir=rtl] md-radio-button .md-label{margin-right:30px}md-radio-group.layout-column md-radio-button,md-radio-group.layout-gt-lg-column md-radio-button,md-radio-group.layout-gt-md-column md-radio-button,md-radio-group.layout-gt-sm-column md-radio-button,md-radio-group.layout-gt-xs-column md-radio-button,md-radio-group.layout-lg-column md-radio-button,md-radio-group.layout-md-column md-radio-button,md-radio-group.layout-sm-column md-radio-button,md-radio-group.layout-xl-column md-radio-button,md-radio-group.layout-xs-column md-radio-button{margin-bottom:16px}md-radio-group.layout-gt-lg-row md-radio-button,md-radio-group.layout-gt-md-row md-radio-button,md-radio-group.layout-gt-sm-row md-radio-button,md-radio-group.layout-gt-xs-row md-radio-button,md-radio-group.layout-lg-row md-radio-button,md-radio-group.layout-md-row md-radio-button,md-radio-group.layout-row md-radio-button,md-radio-group.layout-sm-row md-radio-button,md-radio-group.layout-xl-row md-radio-button,md-radio-group.layout-xs-row md-radio-button{margin-top:0;margin-bottom:0;margin-left:0;margin-right:16px}[dir=rtl] md-radio-group.layout-gt-lg-row md-radio-button,[dir=rtl] md-radio-group.layout-gt-md-row md-radio-button,[dir=rtl] md-radio-group.layout-gt-sm-row md-radio-button,[dir=rtl] md-radio-group.layout-gt-xs-row md-radio-button,[dir=rtl] md-radio-group.layout-lg-row md-radio-button,[dir=rtl] md-radio-group.layout-md-row md-radio-button,[dir=rtl] md-radio-group.layout-row md-radio-button,[dir=rtl] md-radio-group.layout-sm-row md-radio-button,[dir=rtl] md-radio-group.layout-xl-row md-radio-button,[dir=rtl] md-radio-group.layout-xs-row md-radio-button{margin-left:16px}[dir=rtl] md-radio-group.layout-gt-lg-row md-radio-button,[dir=rtl] md-radio-group.layout-gt-md-row md-radio-button,[dir=rtl] md-radio-group.layout-gt-sm-row md-radio-button,[dir=rtl] md-radio-group.layout-gt-xs-row md-radio-button,[dir=rtl] md-radio-group.layout-lg-row md-radio-button,[dir=rtl] md-radio-group.layout-md-row md-radio-button,[dir=rtl] md-radio-group.layout-row md-radio-button,[dir=rtl] md-radio-group.layout-sm-row md-radio-button,[dir=rtl] md-radio-group.layout-xl-row md-radio-button,[dir=rtl] md-radio-group.layout-xs-row md-radio-button{margin-right:0}md-radio-group.layout-gt-lg-row md-radio-button:last-of-type,md-radio-group.layout-gt-md-row md-radio-button:last-of-type,md-radio-group.layout-gt-sm-row md-radio-button:last-of-type,md-radio-group.layout-gt-xs-row md-radio-button:last-of-type,md-radio-group.layout-lg-row md-radio-button:last-of-type,md-radio-group.layout-md-row md-radio-button:last-of-type,md-radio-group.layout-row md-radio-button:last-of-type,md-radio-group.layout-sm-row md-radio-button:last-of-type,md-radio-group.layout-xl-row md-radio-button:last-of-type,md-radio-group.layout-xs-row md-radio-button:last-of-type{margin-left:0;margin-right:0}md-radio-group:focus{outline:0}md-radio-group.md-focused .md-checked .md-container:before{left:-8px;top:-8px;right:-8px;bottom:-8px}md-radio-group[disabled] md-radio-button{cursor:default}md-radio-group[disabled] md-radio-button .md-container{cursor:default}.md-inline-form md-radio-group{margin:18px 0 19px}.md-inline-form md-radio-group md-radio-button{display:inline-block;height:30px;padding:2px;box-sizing:border-box;margin-top:0;margin-bottom:0}@media screen and (-ms-high-contrast:active){md-radio-button.md-default-theme .md-on{background-color:#fff}}md-input-container:not([md-no-float]) .md-select-placeholder span:first-child{transition:transform .4s cubic-bezier(.25,.8,.25,1);transform-origin:left top}[dir=rtl] md-input-container:not([md-no-float]) .md-select-placeholder span:first-child{transform-origin:right top}md-input-container.md-input-focused:not([md-no-float]) .md-select-placeholder span:first-child{transform:translateY(-22px) translateX(-2px) scale(.75)}.md-select-menu-container{position:fixed;left:0;top:0;z-index:90;opacity:0;display:none;transform:translateY(-1px)}.md-select-menu-container:not(.md-clickable){pointer-events:none}.md-select-menu-container md-progress-circular{display:table;margin:24px auto!important}.md-select-menu-container.md-active{display:block;opacity:1}.md-select-menu-container.md-active md-select-menu{transition:all .4s cubic-bezier(.25,.8,.25,1);transition-duration:150ms}.md-select-menu-container.md-active md-select-menu>*{opacity:1;transition:all .3s cubic-bezier(.55,0,.55,.2);transition-duration:150ms;transition-delay:.1s}.md-select-menu-container.md-leave{opacity:0;transition:all .3s cubic-bezier(.55,0,.55,.2);transition-duration:250ms}md-input-container>md-select{margin:0;order:2}md-input-container:not(.md-input-has-value) md-select.ng-required:not(.md-no-asterisk) .md-select-value span:first-child:after,md-input-container:not(.md-input-has-value) md-select[required]:not(.md-no-asterisk) .md-select-value span:first-child:after{content:' *';font-size:13px;vertical-align:top}md-input-container.md-input-invalid md-select .md-select-value{border-bottom-style:solid;padding-bottom:1px}md-select{display:flex;margin:20px 0 26px 0}md-select.ng-required.ng-invalid:not(.md-no-asterisk) .md-select-value span:first-child:after,md-select[required].ng-invalid:not(.md-no-asterisk) .md-select-value span:first-child:after{content:' *';font-size:13px;vertical-align:top}md-select[disabled] .md-select-value{background-position:0 bottom;background-size:4px 1px;background-repeat:repeat-x;margin-bottom:-1px}md-select:focus{outline:0}md-select[disabled]:hover{cursor:default}md-select:not([disabled]):hover{cursor:pointer}md-select:not([disabled]).ng-invalid.ng-touched .md-select-value{border-bottom-style:solid;padding-bottom:1px}md-select:not([disabled]):focus .md-select-value{border-bottom-width:2px;border-bottom-style:solid;padding-bottom:0}md-select:not([disabled]):focus.ng-invalid.ng-touched .md-select-value{padding-bottom:0}md-input-container.md-input-has-value .md-select-value>span:not(.md-select-icon){transform:translate3d(0,1px,0)}.md-select-value{display:flex;align-items:center;padding:2px 2px 1px;border-bottom-width:1px;border-bottom-style:solid;background-color:transparent;position:relative;box-sizing:content-box;min-width:64px;min-height:26px;flex-grow:1}.md-select-value>span:not(.md-select-icon){max-width:100%;flex:1 1 auto;text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.md-select-value>span:not(.md-select-icon) .md-text{display:inline}.md-select-value .md-select-icon{display:block;align-items:flex-end;text-align:end;width:24px;margin:0 4px;transform:translate3d(0,-2px,0);font-size:1.2rem}.md-select-value .md-select-icon:after{display:block;content:'\25BC';position:relative;top:2px;speak:none;font-size:13px;transform:scaleY(.5) scaleX(1)}.md-select-value.md-select-placeholder{display:flex;order:1;pointer-events:none;-webkit-font-smoothing:antialiased;padding-left:2px;z-index:1}md-select-menu{display:flex;flex-direction:column;box-shadow:0 1px 3px 0 rgba(0,0,0,.2),0 1px 1px 0 rgba(0,0,0,.14),0 2px 1px -1px rgba(0,0,0,.12);max-height:256px;min-height:48px;overflow-y:hidden;transform-origin:left top;transform:scale(1)}md-select-menu.md-reverse{flex-direction:column-reverse}md-select-menu:not(.md-overflow) md-content{padding-top:8px;padding-bottom:8px}[dir=rtl] md-select-menu{transform-origin:right top}md-select-menu md-content{min-width:136px;min-height:48px;max-height:256px;overflow-y:auto}md-select-menu>*{opacity:0}md-option{cursor:pointer;position:relative;display:flex;align-items:center;width:auto;transition:background .15s linear;padding:0 16px 0 16px;height:48px}md-option[disabled]{cursor:default}md-option:focus{outline:0}md-option .md-text{-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;width:auto;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}md-optgroup{display:block}md-optgroup label{display:block;font-size:14px;text-transform:uppercase;padding:16px;font-weight:500}md-optgroup md-option{padding-left:32px;padding-right:32px}@media screen and (-ms-high-contrast:active){.md-select-backdrop{background-color:transparent}md-select-menu{border:1px solid #fff}}md-select-menu[multiple] md-option.md-checkbox-enabled{padding-left:40px;padding-right:16px}[dir=rtl] md-select-menu[multiple] md-option.md-checkbox-enabled{padding-left:16px}[dir=rtl] md-select-menu[multiple] md-option.md-checkbox-enabled{padding-right:40px}md-select-menu[multiple] md-option.md-checkbox-enabled .md-container{position:absolute;top:50%;transform:translateY(-50%);box-sizing:border-box;display:inline-block;width:20px;height:20px;left:0;right:auto}[dir=rtl] md-select-menu[multiple] md-option.md-checkbox-enabled .md-container{left:auto}[dir=rtl] md-select-menu[multiple] md-option.md-checkbox-enabled .md-container{right:0}md-select-menu[multiple] md-option.md-checkbox-enabled .md-container:before{box-sizing:border-box;background-color:transparent;border-radius:50%;content:'';position:absolute;display:block;height:auto;left:0;top:0;right:0;bottom:0;transition:all .5s;width:auto}md-select-menu[multiple] md-option.md-checkbox-enabled .md-container:after{box-sizing:border-box;content:'';position:absolute;top:-10px;right:-10px;bottom:-10px;left:-10px}md-select-menu[multiple] md-option.md-checkbox-enabled .md-container .md-ripple-container{position:absolute;display:block;width:auto;height:auto;left:-15px;top:-15px;right:-15px;bottom:-15px}md-select-menu[multiple] md-option.md-checkbox-enabled .md-icon{box-sizing:border-box;transition:240ms;position:absolute;top:0;left:0;width:20px;height:20px;border-width:2px;border-style:solid;border-radius:2px}md-select-menu[multiple] md-option.md-checkbox-enabled[selected] .md-icon{border-color:transparent}md-select-menu[multiple] md-option.md-checkbox-enabled[selected] .md-icon:after{box-sizing:border-box;transform:rotate(45deg);position:absolute;left:4.6666666667px;top:.2222222222px;display:table;width:6.6666666667px;height:13.3333333333px;border-width:2px;border-style:solid;border-top:0;border-left:0;content:''}md-select-menu[multiple] md-option.md-checkbox-enabled[disabled]{cursor:default}md-select-menu[multiple] md-option.md-checkbox-enabled.md-indeterminate .md-icon:after{box-sizing:border-box;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);display:table;width:12px;height:2px;border-width:2px;border-style:solid;border-top:0;border-left:0;content:''}md-select-menu[multiple] md-option.md-checkbox-enabled .md-container{margin-left:10.6666666667px;margin-right:auto}[dir=rtl] md-select-menu[multiple] md-option.md-checkbox-enabled .md-container{margin-left:auto}[dir=rtl] md-select-menu[multiple] md-option.md-checkbox-enabled .md-container{margin-right:10.6666666667px}md-sidenav{box-sizing:border-box;position:absolute;flex-direction:column;z-index:60;width:320px;max-width:320px;bottom:0;overflow:auto;-webkit-overflow-scrolling:touch}md-sidenav ul{list-style:none}md-sidenav.md-closed{display:none}md-sidenav.md-closed-add,md-sidenav.md-closed-remove{display:flex;transition:.2s ease-in all}md-sidenav.md-closed-add.md-closed-add-active,md-sidenav.md-closed-remove.md-closed-remove-active{transition:all .4s cubic-bezier(.25,.8,.25,1)}md-sidenav.md-locked-open-add,md-sidenav.md-locked-open-remove{position:static;display:flex;transform:translate3d(0,0,0)}md-sidenav.md-locked-open,md-sidenav.md-locked-open-remove.md-closed,md-sidenav.md-locked-open.md-closed,md-sidenav.md-locked-open.md-closed.md-sidenav-left,md-sidenav.md-locked-open.md-closed.md-sidenav-right{position:static;display:flex;transform:translate3d(0,0,0)}md-sidenav.md-locked-open-remove-active{transition:width .3s cubic-bezier(.55,0,.55,.2),min-width .3s cubic-bezier(.55,0,.55,.2);width:0!important;min-width:0!important}md-sidenav.md-closed.md-locked-open-add{width:0!important;min-width:0!important;transform:translate3d(0,0,0)}md-sidenav.md-closed.md-locked-open-add-active{transition:width .3s cubic-bezier(.55,0,.55,.2),min-width .3s cubic-bezier(.55,0,.55,.2);width:320px;min-width:320px;transform:translate3d(0,0,0)}.md-sidenav-backdrop.md-locked-open{display:none}.md-sidenav-left,md-sidenav{left:0;top:0;transform:translate3d(0,0,0)}.md-sidenav-left.md-closed,md-sidenav.md-closed{transform:translate3d(-100%,0,0)}.md-sidenav-right{left:100%;top:0;transform:translate(-100%,0)}.md-sidenav-right.md-closed{transform:translate(0,0)}@media (min-width:600px){md-sidenav{max-width:400px}}@media (max-width:456px){md-sidenav{width:calc(100% - 56px);min-width:calc(100% - 56px);max-width:calc(100% - 56px)}}@media screen and (-ms-high-contrast:active){.md-sidenav-left,md-sidenav{border-right:1px solid #fff}.md-sidenav-right{border-left:1px solid #fff}}@keyframes sliderFocusThumb{0%{transform:scale(.7)}30%{transform:scale(1)}100%{transform:scale(.7)}}@keyframes sliderDiscreteFocusThumb{0%{transform:scale(.7)}50%{transform:scale(.8)}100%{transform:scale(0)}}@keyframes sliderDiscreteFocusRing{0%{transform:scale(.7);opacity:0}50%{transform:scale(1);opacity:1}100%{transform:scale(0)}}md-slider{height:48px;min-width:128px;position:relative;margin-left:4px;margin-right:4px;padding:0;display:block;flex-direction:row}md-slider *,md-slider :after{box-sizing:border-box}md-slider .md-slider-wrapper{outline:0;width:100%;height:100%}md-slider .md-slider-content{position:relative}md-slider .md-track-container{width:100%;position:absolute;top:23px;height:2px}md-slider .md-track{position:absolute;left:0;right:0;height:100%}md-slider .md-track-fill{transition:all .4s cubic-bezier(.25,.8,.25,1);transition-property:width,height}md-slider .md-track-ticks{position:absolute;left:0;right:0;height:100%}md-slider .md-track-ticks canvas{width:100%;height:100%}md-slider .md-thumb-container{position:absolute;left:0;top:50%;transform:translate3d(-50%,-50%,0);transition:all .4s cubic-bezier(.25,.8,.25,1);transition-property:left,right,bottom}[dir=rtl] md-slider .md-thumb-container{left:auto;right:0}md-slider .md-thumb{z-index:1;position:absolute;left:-10px;top:14px;width:20px;height:20px;border-radius:20px;transform:scale(.7);transition:all .4s cubic-bezier(.25,.8,.25,1)}[dir=rtl] md-slider .md-thumb{left:auto;right:-10px}md-slider .md-thumb:after{content:'';position:absolute;width:20px;height:20px;border-radius:20px;border-width:3px;border-style:solid;transition:inherit}md-slider .md-sign{display:flex;align-items:center;justify-content:center;position:absolute;left:-14px;top:-17px;width:28px;height:28px;border-radius:28px;transform:scale(.4) translate3d(0,67.5px,0);transition:all .3s cubic-bezier(.35,0,.25,1)}md-slider .md-sign:after{position:absolute;content:'';left:0;border-radius:16px;top:19px;border-left:14px solid transparent;border-right:14px solid transparent;border-top-width:16px;border-top-style:solid;opacity:0;transform:translate3d(0,-8px,0);transition:all .2s cubic-bezier(.35,0,.25,1)}[dir=rtl] md-slider .md-sign:after{left:auto;right:0}md-slider .md-sign .md-thumb-text{z-index:1;font-size:12px;font-weight:700}md-slider .md-focus-ring{position:absolute;left:-17px;top:7px;width:34px;height:34px;border-radius:34px;transform:scale(.7);opacity:0;transition:all .35s cubic-bezier(.35,0,.25,1)}[dir=rtl] md-slider .md-focus-ring{left:auto;right:-17px}md-slider .md-disabled-thumb{position:absolute;left:-14px;top:10px;width:28px;height:28px;border-radius:28px;transform:scale(.5);border-width:4px;border-style:solid;display:none}[dir=rtl] md-slider .md-disabled-thumb{left:auto;right:-14px}md-slider.md-min .md-sign{opacity:0}md-slider:focus{outline:0}md-slider.md-dragging .md-thumb-container,md-slider.md-dragging .md-track-fill{transition:none}md-slider:not([md-discrete]) .md-sign,md-slider:not([md-discrete]) .md-track-ticks{display:none}md-slider:not([md-discrete]):not([disabled]) .md-slider-wrapper .md-thumb:hover{transform:scale(.8)}md-slider:not([md-discrete]):not([disabled]) .md-slider-wrapper.md-focused .md-focus-ring{transform:scale(1);opacity:1}md-slider:not([md-discrete]):not([disabled]) .md-slider-wrapper.md-focused .md-thumb{animation:sliderFocusThumb .7s cubic-bezier(.35,0,.25,1)}md-slider:not([md-discrete]):not([disabled]).md-active .md-slider-wrapper .md-thumb{transform:scale(1)}md-slider[md-discrete]:not([disabled]) .md-slider-wrapper.md-focused .md-focus-ring{transform:scale(0);animation:sliderDiscreteFocusRing .5s cubic-bezier(.35,0,.25,1)}md-slider[md-discrete]:not([disabled]) .md-slider-wrapper.md-focused .md-thumb{animation:sliderDiscreteFocusThumb .5s cubic-bezier(.35,0,.25,1)}md-slider[md-discrete]:not([disabled]) .md-slider-wrapper.md-focused .md-thumb,md-slider[md-discrete]:not([disabled]).md-active .md-thumb{transform:scale(0)}md-slider[md-discrete]:not([disabled]) .md-slider-wrapper.md-focused .md-sign,md-slider[md-discrete]:not([disabled]) .md-slider-wrapper.md-focused .md-sign:after,md-slider[md-discrete]:not([disabled]).md-active .md-sign,md-slider[md-discrete]:not([disabled]).md-active .md-sign:after{opacity:1;transform:translate3d(0,0,0) scale(1)}md-slider[md-discrete][disabled][readonly] .md-thumb{transform:scale(0)}md-slider[md-discrete][disabled][readonly] .md-sign,md-slider[md-discrete][disabled][readonly] .md-sign:after{opacity:1;transform:translate3d(0,0,0) scale(1)}md-slider[disabled] .md-track-fill{display:none}md-slider[disabled] .md-track-ticks{opacity:0}md-slider[disabled]:not([readonly]) .md-sign{opacity:0}md-slider[disabled] .md-thumb{transform:scale(.5)}md-slider[disabled] .md-disabled-thumb{display:block}md-slider[md-vertical]{flex-direction:column;min-height:128px;min-width:0}md-slider[md-vertical] .md-slider-wrapper{flex:1;padding-top:12px;padding-bottom:12px;width:48px;align-self:center;display:flex;justify-content:center}md-slider[md-vertical] .md-track-container{height:100%;width:2px;top:0;left:calc(50% - (2px / 2))}md-slider[md-vertical] .md-thumb-container{top:auto;margin-bottom:23px;left:calc(50% - 1px);bottom:0}md-slider[md-vertical] .md-thumb-container .md-thumb:after{left:1px}md-slider[md-vertical] .md-thumb-container .md-focus-ring{left:-16px}md-slider[md-vertical] .md-track-fill{bottom:0}md-slider[md-vertical][md-discrete] .md-sign{left:-40px;top:9.5px;transform:scale(.4) translate3d(67.5px,0,0)}md-slider[md-vertical][md-discrete] .md-sign:after{top:9.5px;left:19px;border-top:14px solid transparent;border-right:0;border-bottom:14px solid transparent;border-left-width:16px;border-left-style:solid;opacity:0;transform:translate3d(0,-8px,0);transition:all .2s ease-in-out}md-slider[md-vertical][md-discrete] .md-sign .md-thumb-text{z-index:1;font-size:12px;font-weight:700}md-slider[md-vertical][md-discrete] .md-focused .md-sign:after,md-slider[md-vertical][md-discrete].md-active .md-sign:after,md-slider[md-vertical][md-discrete][disabled][readonly] .md-sign:after{top:0}md-slider[md-vertical][disabled][readonly] .md-thumb{transform:scale(0)}md-slider[md-vertical][disabled][readonly] .md-sign,md-slider[md-vertical][disabled][readonly] .md-sign:after{opacity:1;transform:translate3d(0,0,0) scale(1)}md-slider[md-invert]:not([md-vertical]) .md-track-fill{left:auto;right:0}[dir=rtl] md-slider[md-invert]:not([md-vertical]) .md-track-fill{left:0}[dir=rtl] md-slider[md-invert]:not([md-vertical]) .md-track-fill{right:auto}md-slider[md-invert][md-vertical] .md-track-fill{bottom:auto;top:0}md-slider-container{display:flex;align-items:center;flex-direction:row}md-slider-container>:first-child:not(md-slider),md-slider-container>:last-child:not(md-slider){min-width:25px;max-width:42px;height:25px;transition:all .4s cubic-bezier(.25,.8,.25,1);transition-property:color,max-width}md-slider-container>:first-child:not(md-slider){margin-right:16px}[dir=rtl] md-slider-container>:first-child:not(md-slider){margin-right:auto;margin-left:16px}md-slider-container>:last-child:not(md-slider){margin-left:16px}[dir=rtl] md-slider-container>:last-child:not(md-slider){margin-left:auto;margin-right:16px}md-slider-container[md-vertical]{flex-direction:column}md-slider-container[md-vertical]>:first-child:not(md-slider),md-slider-container[md-vertical]>:last-child:not(md-slider){margin-right:0;margin-left:0;text-align:center}md-slider-container md-input-container input[type=number]{text-align:center;padding-left:15px;height:50px;margin-top:-25px}[dir=rtl] md-slider-container md-input-container input[type=number]{padding-left:0;padding-right:15px}@media screen and (-ms-high-contrast:active){md-slider.md-default-theme .md-track{border-bottom:1px solid #fff}}.md-sticky-clone{z-index:2;top:0;left:0;right:0;position:absolute!important;transform:translate3d(-9999px,-9999px,0)}.md-sticky-clone[sticky-state=active]{transform:translate3d(0,0,0)}.md-sticky-clone[sticky-state=active]:not(.md-sticky-no-effect) .md-subheader-inner{animation:subheaderStickyHoverIn .3s ease-out both}@keyframes subheaderStickyHoverIn{0%{box-shadow:0 0 0 0 transparent}100%{box-shadow:0 2px 4px 0 rgba(0,0,0,.16)}}@keyframes subheaderStickyHoverOut{0%{box-shadow:0 2px 4px 0 rgba(0,0,0,.16)}100%{box-shadow:0 0 0 0 transparent}}.md-subheader-wrapper:not(.md-sticky-no-effect){transition:.2s ease-out margin}.md-subheader-wrapper:not(.md-sticky-no-effect) .md-subheader{margin:0}.md-subheader-wrapper:not(.md-sticky-no-effect).md-sticky-clone{z-index:2}.md-subheader-wrapper:not(.md-sticky-no-effect)[sticky-state=active]{margin-top:-2px}.md-subheader-wrapper:not(.md-sticky-no-effect):not(.md-sticky-clone)[sticky-prev-state=active] .md-subheader-inner:after{animation:subheaderStickyHoverOut .3s ease-out both}.md-subheader{display:block;font-size:14px;font-weight:500;line-height:1em;margin:0;position:relative}.md-subheader .md-subheader-inner{display:block;padding:16px}.md-subheader .md-subheader-content{display:block;z-index:1;position:relative}.md-inline-form md-switch{margin-top:18px;margin-bottom:19px}md-switch{margin:16px 0;white-space:nowrap;cursor:pointer;outline:0;user-select:none;height:30px;line-height:28px;align-items:center;display:flex;margin-left:inherit;margin-right:16px}[dir=rtl] md-switch{margin-left:16px}[dir=rtl] md-switch{margin-right:inherit}md-switch:last-of-type{margin-left:inherit;margin-right:0}[dir=rtl] md-switch:last-of-type{margin-left:0}[dir=rtl] md-switch:last-of-type{margin-right:inherit}md-switch[disabled]{cursor:default}md-switch[disabled] .md-container{cursor:default}md-switch .md-container{cursor:grab;width:36px;height:24px;position:relative;user-select:none;margin-right:8px;float:left}[dir=rtl] md-switch .md-container{margin-right:auto;margin-left:8px}md-switch:not([disabled]) .md-dragging,md-switch:not([disabled]).md-dragging .md-container{cursor:grabbing}md-switch.md-focused:not([disabled]) .md-thumb:before{left:-8px;top:-8px;right:-8px;bottom:-8px}md-switch.md-focused:not([disabled]):not(.md-checked) .md-thumb:before{background-color:rgba(0,0,0,.12)}md-switch .md-label{border-color:transparent;border-width:0;float:left}md-switch .md-bar{left:1px;width:34px;top:5px;height:14px;border-radius:8px;position:absolute}md-switch .md-thumb-container{top:2px;left:0;width:16px;position:absolute;transform:translate3d(0,0,0);z-index:1}md-switch.md-checked .md-thumb-container{transform:translate3d(100%,0,0)}md-switch .md-thumb{position:absolute;margin:0;left:0;top:0;outline:0;height:20px;width:20px;border-radius:50%;box-shadow:0 1px 3px 0 rgba(0,0,0,.2),0 1px 1px 0 rgba(0,0,0,.14),0 2px 1px -1px rgba(0,0,0,.12)}md-switch .md-thumb:before{background-color:transparent;border-radius:50%;content:'';position:absolute;display:block;height:auto;left:0;top:0;right:0;bottom:0;transition:all .5s;width:auto}md-switch .md-thumb .md-ripple-container{position:absolute;display:block;width:auto;height:auto;left:-20px;top:-20px;right:-20px;bottom:-20px}md-switch:not(.md-dragging) .md-bar,md-switch:not(.md-dragging) .md-thumb,md-switch:not(.md-dragging) .md-thumb-container{transition:all 80ms linear;transition-property:transform,background-color}md-switch:not(.md-dragging) .md-bar,md-switch:not(.md-dragging) .md-thumb{transition-delay:50ms}@media screen and (-ms-high-contrast:active){md-switch.md-default-theme .md-bar{background-color:#666}md-switch.md-default-theme.md-checked .md-bar{background-color:#9e9e9e}md-switch.md-default-theme .md-thumb{background-color:#fff}}@keyframes md-tab-content-hide{0%{opacity:1}50%{opacity:1}100%{opacity:0}}md-tab-data{position:absolute;top:0;left:0;right:0;bottom:0;z-index:-1;opacity:0}md-tabs{display:block;margin:0;border-radius:2px;overflow:hidden;position:relative;flex-shrink:0}md-tabs:not(.md-no-tab-content):not(.md-dynamic-height){min-height:248px}md-tabs[md-align-tabs=bottom]{padding-bottom:48px}md-tabs[md-align-tabs=bottom] md-tabs-wrapper{position:absolute;bottom:0;left:0;right:0;height:48px;z-index:2}md-tabs[md-align-tabs=bottom] md-tabs-content-wrapper{top:0;bottom:48px}md-tabs.md-dynamic-height md-tabs-content-wrapper{min-height:0;position:relative;top:auto;left:auto;right:auto;bottom:auto;overflow:visible}md-tabs.md-dynamic-height md-tab-content.md-active{position:relative}md-tabs[md-border-bottom] md-tabs-wrapper{border-width:0 0 1px;border-style:solid}md-tabs[md-border-bottom]:not(.md-dynamic-height) md-tabs-content-wrapper{top:49px}md-tabs-wrapper{display:block;position:relative;transform:translate3d(0,0,0)}md-tabs-wrapper md-next-button,md-tabs-wrapper md-prev-button{height:100%;width:32px;position:absolute;top:50%;transform:translateY(-50%);line-height:1em;z-index:2;cursor:pointer;font-size:16px;background:transparent no-repeat center center;transition:all .5s cubic-bezier(.35,0,.25,1)}md-tabs-wrapper md-next-button:focus,md-tabs-wrapper md-prev-button:focus{outline:0}md-tabs-wrapper md-next-button.md-disabled,md-tabs-wrapper md-prev-button.md-disabled{opacity:.25;cursor:default}md-tabs-wrapper md-next-button.ng-leave,md-tabs-wrapper md-prev-button.ng-leave{transition:none}md-tabs-wrapper md-next-button md-icon,md-tabs-wrapper md-prev-button md-icon{position:absolute;top:50%;left:50%;transform:translate3d(-50%,-50%,0)}md-tabs-wrapper md-prev-button{left:0;background-image:url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPCEtLSBHZW5lcmF0b3I6IEFkb2JlIElsbHVzdHJhdG9yIDE3LjEuMCwgU1ZHIEV4cG9ydCBQbHVnLUluIC4gU1ZHIFZlcnNpb246IDYuMDAgQnVpbGQgMCkgIC0tPiA8IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPiA8c3ZnIHZlcnNpb249IjEuMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgeD0iMHB4IiB5PSIwcHgiIHdpZHRoPSIyNHB4IiBoZWlnaHQ9IjI0cHgiIHZpZXdCb3g9IjAgMCAyNCAyNCIgZW5hYmxlLWJhY2tncm91bmQ9Im5ldyAwIDAgMjQgMjQiIHhtbDpzcGFjZT0icHJlc2VydmUiPiA8ZyBpZD0iSGVhZGVyIj4gPGc+IDxyZWN0IHg9Ii02MTgiIHk9Ii0xMjA4IiBmaWxsPSJub25lIiB3aWR0aD0iMTQwMCIgaGVpZ2h0PSIzNjAwIi8+IDwvZz4gPC9nPiA8ZyBpZD0iTGFiZWwiPiA8L2c+IDxnIGlkPSJJY29uIj4gPGc+IDxwb2x5Z29uIHBvaW50cz0iMTUuNCw3LjQgMTQsNiA4LDEyIDE0LDE4IDE1LjQsMTYuNiAxMC44LDEyIAkJIiBzdHlsZT0iZmlsbDp3aGl0ZTsiLz4gPHJlY3QgZmlsbD0ibm9uZSIgd2lkdGg9IjI0IiBoZWlnaHQ9IjI0Ii8+IDwvZz4gPC9nPiA8ZyBpZD0iR3JpZCIgZGlzcGxheT0ibm9uZSI+IDxnIGRpc3BsYXk9ImlubGluZSI+IDwvZz4gPC9nPiA8L3N2Zz4NCg==)}[dir=rtl] md-tabs-wrapper md-prev-button{left:auto;right:0}md-tabs-wrapper md-next-button{right:0;background-image:url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPCEtLSBHZW5lcmF0b3I6IEFkb2JlIElsbHVzdHJhdG9yIDE3LjEuMCwgU1ZHIEV4cG9ydCBQbHVnLUluIC4gU1ZHIFZlcnNpb246IDYuMDAgQnVpbGQgMCkgIC0tPiA8IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPiA8c3ZnIHZlcnNpb249IjEuMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgeD0iMHB4IiB5PSIwcHgiIHdpZHRoPSIyNHB4IiBoZWlnaHQ9IjI0cHgiIHZpZXdCb3g9IjAgMCAyNCAyNCIgZW5hYmxlLWJhY2tncm91bmQ9Im5ldyAwIDAgMjQgMjQiIHhtbDpzcGFjZT0icHJlc2VydmUiPiA8ZyBpZD0iSGVhZGVyIj4gPGc+IDxyZWN0IHg9Ii02MTgiIHk9Ii0xMzM2IiBmaWxsPSJub25lIiB3aWR0aD0iMTQwMCIgaGVpZ2h0PSIzNjAwIi8+IDwvZz4gPC9nPiA8ZyBpZD0iTGFiZWwiPiA8L2c+IDxnIGlkPSJJY29uIj4gPGc+IDxwb2x5Z29uIHBvaW50cz0iMTAsNiA4LjYsNy40IDEzLjIsMTIgOC42LDE2LjYgMTAsMTggMTYsMTIgCQkiIHN0eWxlPSJmaWxsOndoaXRlOyIvPiA8cmVjdCBmaWxsPSJub25lIiB3aWR0aD0iMjQiIGhlaWdodD0iMjQiLz4gPC9nPiA8L2c+IDxnIGlkPSJHcmlkIiBkaXNwbGF5PSJub25lIj4gPGcgZGlzcGxheT0iaW5saW5lIj4gPC9nPiA8L2c+IDwvc3ZnPg0K)}[dir=rtl] md-tabs-wrapper md-next-button{right:auto;left:0}md-tabs-wrapper md-next-button md-icon{transform:translate3d(-50%,-50%,0) rotate(180deg)}md-tabs-wrapper.md-stretch-tabs md-pagination-wrapper{width:100%;display:flex;flex-direction:row}md-tabs-wrapper.md-stretch-tabs md-pagination-wrapper md-tab-item{flex-grow:1}md-tabs-canvas{position:relative;overflow:hidden;display:block;height:48px}md-tabs-canvas:after{content:'';display:table;clear:both}md-tabs-canvas .md-dummy-wrapper{position:absolute;top:0;left:0}[dir=rtl] md-tabs-canvas .md-dummy-wrapper{left:auto;right:0}md-tabs-canvas.md-paginated{margin:0 32px}md-tabs-canvas.md-center-tabs{display:flex;flex-direction:column;text-align:center}md-tabs-canvas.md-center-tabs .md-tab{float:none;display:inline-block}md-pagination-wrapper{height:48px;display:block;transition:transform .5s cubic-bezier(.35,0,.25,1);position:absolute;width:999999px;left:0;transform:translate3d(0,0,0)}md-pagination-wrapper:after{content:'';display:table;clear:both}[dir=rtl] md-pagination-wrapper{left:auto;right:0}md-pagination-wrapper.md-center-tabs{position:relative;width:auto;margin:0 auto}md-tabs-content-wrapper{display:block;position:absolute;top:48px;left:0;right:0;bottom:0;overflow:hidden}md-tab-content{display:block;position:absolute;top:0;left:0;right:0;bottom:0;transition:transform .5s cubic-bezier(.35,0,.25,1);overflow:auto;transform:translate3d(0,0,0)}md-tab-content.md-no-scroll{bottom:auto;overflow:hidden}md-tab-content.md-no-transition,md-tab-content.ng-leave{transition:none}md-tab-content.md-left:not(.md-active){transform:translateX(-100%);animation:1s md-tab-content-hide;opacity:0}[dir=rtl] md-tab-content.md-left:not(.md-active){transform:translateX(100%)}md-tab-content.md-left:not(.md-active) *{transition:visibility 0s linear;transition-delay:.5s;visibility:hidden}md-tab-content.md-right:not(.md-active){transform:translateX(100%);animation:1s md-tab-content-hide;opacity:0}[dir=rtl] md-tab-content.md-right:not(.md-active){transform:translateX(-100%)}md-tab-content.md-right:not(.md-active) *{transition:visibility 0s linear;transition-delay:.5s;visibility:hidden}md-tab-content>div.ng-leave{animation:1s md-tab-content-hide}md-ink-bar{position:absolute;left:auto;right:auto;bottom:0;height:2px}md-ink-bar.md-left{transition:left 125ms cubic-bezier(.35,0,.25,1),right .25s cubic-bezier(.35,0,.25,1)}md-ink-bar.md-right{transition:left .25s cubic-bezier(.35,0,.25,1),right 125ms cubic-bezier(.35,0,.25,1)}md-tab{position:absolute;z-index:-1;left:-9999px}.md-tab{font-size:14px;text-align:center;line-height:24px;padding:12px 24px;transition:background-color .35s cubic-bezier(.35,0,.25,1);cursor:pointer;white-space:nowrap;position:relative;text-transform:uppercase;float:left;font-weight:500;box-sizing:border-box;overflow:hidden;text-overflow:ellipsis}[dir=rtl] .md-tab{float:right}.md-tab.md-focused{box-shadow:none;outline:0}.md-tab.md-active{cursor:default}.md-tab.md-disabled{pointer-events:none;touch-action:pan-y;user-select:none;-webkit-user-drag:none;opacity:.5;cursor:default}.md-tab.ng-leave{transition:none}md-toolbar+md-tabs{border-top-left-radius:0;border-top-right-radius:0}.md-toast-text{padding:0 6px}md-toast{position:absolute;z-index:105;box-sizing:border-box;cursor:default;overflow:hidden;padding:8px;opacity:1;transition:all .4s cubic-bezier(.25,.8,.25,1)}md-toast .md-toast-content{display:flex;direction:row;align-items:center;max-height:168px;max-width:100%;min-height:48px;padding:0 18px;box-shadow:0 2px 5px 0 rgba(0,0,0,.26);border-radius:2px;font-size:14px;overflow:hidden;transform:translate3d(0,0,0) rotateZ(0);transition:all .4s cubic-bezier(.25,.8,.25,1);justify-content:flex-start}md-toast .md-toast-content::before{content:'';min-height:48px;visibility:hidden;display:inline-block}[dir=rtl] md-toast .md-toast-content{justify-content:flex-end}md-toast .md-toast-content span{flex:1 1 0%;box-sizing:border-box;min-width:0}md-toast.md-capsule{border-radius:24px}md-toast.md-capsule .md-toast-content{border-radius:24px}md-toast.ng-leave-active .md-toast-content{transition:all .3s cubic-bezier(.55,0,.55,.2)}md-toast.md-swipedown .md-toast-content,md-toast.md-swipeleft .md-toast-content,md-toast.md-swiperight .md-toast-content,md-toast.md-swipeup .md-toast-content{transition:all .4s cubic-bezier(.25,.8,.25,1)}md-toast.ng-enter{opacity:0}md-toast.ng-enter .md-toast-content{transform:translate3d(0,100%,0)}md-toast.ng-enter.md-top .md-toast-content{transform:translate3d(0,-100%,0)}md-toast.ng-enter.ng-enter-active{opacity:1}md-toast.ng-enter.ng-enter-active .md-toast-content{transform:translate3d(0,0,0)}md-toast.ng-leave.ng-leave-active .md-toast-content{opacity:0;transform:translate3d(0,100%,0)}md-toast.ng-leave.ng-leave-active.md-swipeup .md-toast-content{transform:translate3d(0,-50%,0)}md-toast.ng-leave.ng-leave-active.md-swipedown .md-toast-content{transform:translate3d(0,50%,0)}md-toast.ng-leave.ng-leave-active.md-top .md-toast-content{transform:translate3d(0,-100%,0)}md-toast .md-action{line-height:19px;margin-left:24px;margin-right:0;cursor:pointer;text-transform:uppercase;float:right}md-toast .md-button{min-width:0;margin-right:0;margin-left:12px}[dir=rtl] md-toast .md-button{margin-right:12px}[dir=rtl] md-toast .md-button{margin-left:0}@media (max-width:959px){md-toast{left:0;right:0;width:100%;max-width:100%;min-width:0;border-radius:0;bottom:0;padding:0}md-toast.ng-leave.ng-leave-active.md-swipeup .md-toast-content{transform:translate3d(0,-50%,0)}md-toast.ng-leave.ng-leave-active.md-swipedown .md-toast-content{transform:translate3d(0,50%,0)}}@media (min-width:960px){md-toast{min-width:304px}md-toast.md-bottom{bottom:0}md-toast.md-left{left:0}md-toast.md-right{right:0}md-toast.md-top{top:0}md-toast._md-start{left:0}[dir=rtl] md-toast._md-start{left:auto;right:0}md-toast._md-end{right:0}[dir=rtl] md-toast._md-end{right:auto;left:0}md-toast.ng-leave.ng-leave-active.md-swipeleft .md-toast-content{transform:translate3d(-50%,0,0)}md-toast.ng-leave.ng-leave-active.md-swiperight .md-toast-content{transform:translate3d(50%,0,0)}}@media (min-width:1920px){md-toast .md-toast-content{max-width:568px}}@media screen and (-ms-high-contrast:active){md-toast{border:1px solid #fff}}.md-toast-animating{overflow:hidden!important}md-toolbar{box-sizing:border-box;display:flex;flex-direction:column;position:relative;z-index:2;font-size:20px;min-height:64px;width:100%}md-toolbar._md-toolbar-transitions{transition-duration:.5s;transition-timing-function:cubic-bezier(.35,0,.25,1);transition-property:background-color,fill,color}md-toolbar.md-whiteframe-z1-add,md-toolbar.md-whiteframe-z1-remove{transition:box-shadow .5s linear}md-toolbar md-toolbar-filler{width:72px}md-toolbar *,md-toolbar :after,md-toolbar :before{box-sizing:border-box}md-toolbar.ng-animate{transition:none}md-toolbar.md-tall{height:128px;min-height:128px;max-height:128px}md-toolbar.md-medium-tall{height:88px;min-height:88px;max-height:88px}md-toolbar.md-medium-tall .md-toolbar-tools{height:48px;min-height:48px;max-height:48px}md-toolbar>.md-indent{margin-left:64px}[dir=rtl] md-toolbar>.md-indent{margin-left:auto;margin-right:64px}md-toolbar~md-content>md-list{padding:0}md-toolbar~md-content>md-list md-list-item:last-child md-divider{display:none}.md-toolbar-tools{font-size:20px;letter-spacing:.005em;box-sizing:border-box;font-weight:400;display:flex;align-items:center;flex-direction:row;width:100%;height:64px;max-height:64px;padding:0 16px;margin:0}.md-toolbar-tools h1,.md-toolbar-tools h2,.md-toolbar-tools h3{font-size:inherit;font-weight:inherit;margin:inherit}.md-toolbar-tools a{color:inherit;text-decoration:none}.md-toolbar-tools .fill-height{display:flex;align-items:center}.md-toolbar-tools .md-button{margin-top:0;margin-bottom:0}.md-toolbar-tools .md-button,.md-toolbar-tools .md-button.md-icon-button md-icon{transition-duration:.5s;transition-timing-function:cubic-bezier(.35,0,.25,1);transition-property:background-color,fill,color}.md-toolbar-tools .md-button.md-icon-button md-icon.ng-animate,.md-toolbar-tools .md-button.ng-animate{transition:none}.md-toolbar-tools>.md-button:first-child{margin-left:-8px}[dir=rtl] .md-toolbar-tools>.md-button:first-child{margin-left:auto;margin-right:-8px}.md-toolbar-tools>.md-button:last-child{margin-right:-8px}[dir=rtl] .md-toolbar-tools>.md-button:last-child{margin-right:auto;margin-left:-8px}.md-toolbar-tools>md-menu:last-child{margin-right:-8px}[dir=rtl] .md-toolbar-tools>md-menu:last-child{margin-right:auto;margin-left:-8px}.md-toolbar-tools>md-menu:last-child>.md-button{margin-right:0}[dir=rtl] .md-toolbar-tools>md-menu:last-child>.md-button{margin-right:auto;margin-left:0}@media screen and (-ms-high-contrast:active){.md-toolbar-tools{border-bottom:1px solid #fff}}@media (min-width:0) and (max-width:959px) and (orientation:portrait){md-toolbar{min-height:56px}.md-toolbar-tools{height:56px;max-height:56px}}@media (min-width:0) and (max-width:959px) and (orientation:landscape){md-toolbar{min-height:48px}.md-toolbar-tools{height:48px;max-height:48px}}md-tooltip{position:absolute;z-index:100;overflow:hidden;pointer-events:none;border-radius:4px;font-weight:500;font-size:14px}@media (min-width:960px){md-tooltip{font-size:10px}}md-tooltip .md-content{position:relative;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;transform-origin:center top;transform:scale(0);opacity:0;height:32px;line-height:32px;padding-left:16px;padding-right:16px}@media (min-width:960px){md-tooltip .md-content{height:22px;line-height:22px;padding-left:8px;padding-right:8px}}md-tooltip .md-content.md-show-add{transition:all .4s cubic-bezier(.25,.8,.25,1);transition-duration:.2s;transform:scale(0);opacity:0}md-tooltip .md-content.md-show,md-tooltip .md-content.md-show-add-active{transform:scale(1);opacity:.9;transform-origin:center top}md-tooltip .md-content.md-show-remove{transition:all .4s cubic-bezier(.25,.8,.25,1);transition-duration:.2s}md-tooltip .md-content.md-show-remove.md-show-remove-active{transform:scale(0);opacity:0}md-tooltip.md-hide{transition:all .3s cubic-bezier(.55,0,.55,.2)}md-tooltip.md-show{transition:all .4s cubic-bezier(.25,.8,.25,1);pointer-events:auto}.md-virtual-repeat-container{box-sizing:border-box;display:block;margin:0;overflow:hidden;padding:0;position:relative}.md-virtual-repeat-container .md-virtual-repeat-scroller{bottom:0;box-sizing:border-box;left:0;margin:0;overflow-x:hidden;padding:0;position:absolute;right:0;top:0;-webkit-overflow-scrolling:touch}.md-virtual-repeat-container .md-virtual-repeat-sizer{box-sizing:border-box;height:1px;display:block;margin:0;padding:0;width:1px}.md-virtual-repeat-container .md-virtual-repeat-offsetter{box-sizing:border-box;left:0;margin:0;padding:0;position:absolute;right:0;top:0}.md-virtual-repeat-container.md-orient-horizontal .md-virtual-repeat-scroller{overflow-x:auto;overflow-y:hidden}.md-virtual-repeat-container.md-orient-horizontal .md-virtual-repeat-offsetter{bottom:16px;right:auto;white-space:nowrap}[dir=rtl] .md-virtual-repeat-container.md-orient-horizontal .md-virtual-repeat-offsetter{right:auto;left:auto}.md-whiteframe-1dp,.md-whiteframe-z1{box-shadow:0 1px 3px 0 rgba(0,0,0,.2),0 1px 1px 0 rgba(0,0,0,.14),0 2px 1px -1px rgba(0,0,0,.12)}.md-whiteframe-2dp{box-shadow:0 1px 5px 0 rgba(0,0,0,.2),0 2px 2px 0 rgba(0,0,0,.14),0 3px 1px -2px rgba(0,0,0,.12)}.md-whiteframe-3dp{box-shadow:0 1px 8px 0 rgba(0,0,0,.2),0 3px 4px 0 rgba(0,0,0,.14),0 3px 3px -2px rgba(0,0,0,.12)}.md-whiteframe-4dp,.md-whiteframe-z2{box-shadow:0 2px 4px -1px rgba(0,0,0,.2),0 4px 5px 0 rgba(0,0,0,.14),0 1px 10px 0 rgba(0,0,0,.12)}.md-whiteframe-5dp{box-shadow:0 3px 5px -1px rgba(0,0,0,.2),0 5px 8px 0 rgba(0,0,0,.14),0 1px 14px 0 rgba(0,0,0,.12)}.md-whiteframe-6dp{box-shadow:0 3px 5px -1px rgba(0,0,0,.2),0 6px 10px 0 rgba(0,0,0,.14),0 1px 18px 0 rgba(0,0,0,.12)}.md-whiteframe-7dp,.md-whiteframe-z3{box-shadow:0 4px 5px -2px rgba(0,0,0,.2),0 7px 10px 1px rgba(0,0,0,.14),0 2px 16px 1px rgba(0,0,0,.12)}.md-whiteframe-8dp{box-shadow:0 5px 5px -3px rgba(0,0,0,.2),0 8px 10px 1px rgba(0,0,0,.14),0 3px 14px 2px rgba(0,0,0,.12)}.md-whiteframe-9dp{box-shadow:0 5px 6px -3px rgba(0,0,0,.2),0 9px 12px 1px rgba(0,0,0,.14),0 3px 16px 2px rgba(0,0,0,.12)}.md-whiteframe-10dp,.md-whiteframe-z4{box-shadow:0 6px 6px -3px rgba(0,0,0,.2),0 10px 14px 1px rgba(0,0,0,.14),0 4px 18px 3px rgba(0,0,0,.12)}.md-whiteframe-11dp{box-shadow:0 6px 7px -4px rgba(0,0,0,.2),0 11px 15px 1px rgba(0,0,0,.14),0 4px 20px 3px rgba(0,0,0,.12)}.md-whiteframe-12dp{box-shadow:0 7px 8px -4px rgba(0,0,0,.2),0 12px 17px 2px rgba(0,0,0,.14),0 5px 22px 4px rgba(0,0,0,.12)}.md-whiteframe-13dp,.md-whiteframe-z5{box-shadow:0 7px 8px -4px rgba(0,0,0,.2),0 13px 19px 2px rgba(0,0,0,.14),0 5px 24px 4px rgba(0,0,0,.12)}.md-whiteframe-14dp{box-shadow:0 7px 9px -4px rgba(0,0,0,.2),0 14px 21px 2px rgba(0,0,0,.14),0 5px 26px 4px rgba(0,0,0,.12)}.md-whiteframe-15dp{box-shadow:0 8px 9px -5px rgba(0,0,0,.2),0 15px 22px 2px rgba(0,0,0,.14),0 6px 28px 5px rgba(0,0,0,.12)}.md-whiteframe-16dp{box-shadow:0 8px 10px -5px rgba(0,0,0,.2),0 16px 24px 2px rgba(0,0,0,.14),0 6px 30px 5px rgba(0,0,0,.12)}.md-whiteframe-17dp{box-shadow:0 8px 11px -5px rgba(0,0,0,.2),0 17px 26px 2px rgba(0,0,0,.14),0 6px 32px 5px rgba(0,0,0,.12)}.md-whiteframe-18dp{box-shadow:0 9px 11px -5px rgba(0,0,0,.2),0 18px 28px 2px rgba(0,0,0,.14),0 7px 34px 6px rgba(0,0,0,.12)}.md-whiteframe-19dp{box-shadow:0 9px 12px -6px rgba(0,0,0,.2),0 19px 29px 2px rgba(0,0,0,.14),0 7px 36px 6px rgba(0,0,0,.12)}.md-whiteframe-20dp{box-shadow:0 10px 13px -6px rgba(0,0,0,.2),0 20px 31px 3px rgba(0,0,0,.14),0 8px 38px 7px rgba(0,0,0,.12)}.md-whiteframe-21dp{box-shadow:0 10px 13px -6px rgba(0,0,0,.2),0 21px 33px 3px rgba(0,0,0,.14),0 8px 40px 7px rgba(0,0,0,.12)}.md-whiteframe-22dp{box-shadow:0 10px 14px -6px rgba(0,0,0,.2),0 22px 35px 3px rgba(0,0,0,.14),0 8px 42px 7px rgba(0,0,0,.12)}.md-whiteframe-23dp{box-shadow:0 11px 14px -7px rgba(0,0,0,.2),0 23px 36px 3px rgba(0,0,0,.14),0 9px 44px 8px rgba(0,0,0,.12)}.md-whiteframe-24dp{box-shadow:0 11px 15px -7px rgba(0,0,0,.2),0 24px 38px 3px rgba(0,0,0,.14),0 9px 46px 8px rgba(0,0,0,.12)}@media screen and (-ms-high-contrast:active){md-whiteframe{border:1px solid #fff}}@media print{[md-whiteframe],md-whiteframe{background-color:#fff}}.ng-cloak,.x-ng-cloak,[data-ng-cloak],[ng-cloak],[ng\:cloak],[x-ng-cloak]{display:none!important}@-moz-document url-prefix(){.layout-fill{margin:0;width:100%;min-height:100%;height:100%}}.flex-order{order:0}.flex-order--20{order:-20}.flex-order--19{order:-19}.flex-order--18{order:-18}.flex-order--17{order:-17}.flex-order--16{order:-16}.flex-order--15{order:-15}.flex-order--14{order:-14}.flex-order--13{order:-13}.flex-order--12{order:-12}.flex-order--11{order:-11}.flex-order--10{order:-10}.flex-order--9{order:-9}.flex-order--8{order:-8}.flex-order--7{order:-7}.flex-order--6{order:-6}.flex-order--5{order:-5}.flex-order--4{order:-4}.flex-order--3{order:-3}.flex-order--2{order:-2}.flex-order--1{order:-1}.flex-order-0{order:0}.flex-order-1{order:1}.flex-order-2{order:2}.flex-order-3{order:3}.flex-order-4{order:4}.flex-order-5{order:5}.flex-order-6{order:6}.flex-order-7{order:7}.flex-order-8{order:8}.flex-order-9{order:9}.flex-order-10{order:10}.flex-order-11{order:11}.flex-order-12{order:12}.flex-order-13{order:13}.flex-order-14{order:14}.flex-order-15{order:15}.flex-order-16{order:16}.flex-order-17{order:17}.flex-order-18{order:18}.flex-order-19{order:19}.flex-order-20{order:20}.flex-offset-0,.offset-0{margin-left:0}[dir=rtl] .flex-offset-0,[dir=rtl] .offset-0{margin-left:auto;margin-right:0}.flex-offset-5,.offset-5{margin-left:5%}[dir=rtl] .flex-offset-5,[dir=rtl] .offset-5{margin-left:auto;margin-right:5%}.flex-offset-10,.offset-10{margin-left:10%}[dir=rtl] .flex-offset-10,[dir=rtl] .offset-10{margin-left:auto;margin-right:10%}.flex-offset-15,.offset-15{margin-left:15%}[dir=rtl] .flex-offset-15,[dir=rtl] .offset-15{margin-left:auto;margin-right:15%}.flex-offset-20,.offset-20{margin-left:20%}[dir=rtl] .flex-offset-20,[dir=rtl] .offset-20{margin-left:auto;margin-right:20%}.flex-offset-25,.offset-25{margin-left:25%}[dir=rtl] .flex-offset-25,[dir=rtl] .offset-25{margin-left:auto;margin-right:25%}.flex-offset-30,.offset-30{margin-left:30%}[dir=rtl] .flex-offset-30,[dir=rtl] .offset-30{margin-left:auto;margin-right:30%}.flex-offset-35,.offset-35{margin-left:35%}[dir=rtl] .flex-offset-35,[dir=rtl] .offset-35{margin-left:auto;margin-right:35%}.flex-offset-40,.offset-40{margin-left:40%}[dir=rtl] .flex-offset-40,[dir=rtl] .offset-40{margin-left:auto;margin-right:40%}.flex-offset-45,.offset-45{margin-left:45%}[dir=rtl] .flex-offset-45,[dir=rtl] .offset-45{margin-left:auto;margin-right:45%}.flex-offset-50,.offset-50{margin-left:50%}[dir=rtl] .flex-offset-50,[dir=rtl] .offset-50{margin-left:auto;margin-right:50%}.flex-offset-55,.offset-55{margin-left:55%}[dir=rtl] .flex-offset-55,[dir=rtl] .offset-55{margin-left:auto;margin-right:55%}.flex-offset-60,.offset-60{margin-left:60%}[dir=rtl] .flex-offset-60,[dir=rtl] .offset-60{margin-left:auto;margin-right:60%}.flex-offset-65,.offset-65{margin-left:65%}[dir=rtl] .flex-offset-65,[dir=rtl] .offset-65{margin-left:auto;margin-right:65%}.flex-offset-70,.offset-70{margin-left:70%}[dir=rtl] .flex-offset-70,[dir=rtl] .offset-70{margin-left:auto;margin-right:70%}.flex-offset-75,.offset-75{margin-left:75%}[dir=rtl] .flex-offset-75,[dir=rtl] .offset-75{margin-left:auto;margin-right:75%}.flex-offset-80,.offset-80{margin-left:80%}[dir=rtl] .flex-offset-80,[dir=rtl] .offset-80{margin-left:auto;margin-right:80%}.flex-offset-85,.offset-85{margin-left:85%}[dir=rtl] .flex-offset-85,[dir=rtl] .offset-85{margin-left:auto;margin-right:85%}.flex-offset-90,.offset-90{margin-left:90%}[dir=rtl] .flex-offset-90,[dir=rtl] .offset-90{margin-left:auto;margin-right:90%}.flex-offset-95,.offset-95{margin-left:95%}[dir=rtl] .flex-offset-95,[dir=rtl] .offset-95{margin-left:auto;margin-right:95%}.flex-offset-33,.offset-33{margin-left:calc(100% / 3)}.flex-offset-66,.offset-66{margin-left:calc(200% / 3)}[dir=rtl] .flex-offset-66,[dir=rtl] .offset-66{margin-left:auto;margin-right:calc(200% / 3)}.layout-align,.layout-align-start-stretch{justify-content:flex-start;align-content:stretch;align-items:stretch}.layout-align-start,.layout-align-start-center,.layout-align-start-end,.layout-align-start-start,.layout-align-start-stretch{justify-content:flex-start}.layout-align-center,.layout-align-center-center,.layout-align-center-end,.layout-align-center-start,.layout-align-center-stretch{justify-content:center}.layout-align-end,.layout-align-end-center,.layout-align-end-end,.layout-align-end-start,.layout-align-end-stretch{justify-content:flex-end}.layout-align-space-around,.layout-align-space-around-center,.layout-align-space-around-end,.layout-align-space-around-start,.layout-align-space-around-stretch{justify-content:space-around}.layout-align-space-between,.layout-align-space-between-center,.layout-align-space-between-end,.layout-align-space-between-start,.layout-align-space-between-stretch{justify-content:space-between}.layout-align-center-start,.layout-align-end-start,.layout-align-space-around-start,.layout-align-space-between-start,.layout-align-start-start{align-items:flex-start;align-content:flex-start}.layout-align-center-center,.layout-align-end-center,.layout-align-space-around-center,.layout-align-space-between-center,.layout-align-start-center{align-items:center;align-content:center;max-width:100%}.layout-align-center-center>*,.layout-align-end-center>*,.layout-align-space-around-center>*,.layout-align-space-between-center>*,.layout-align-start-center>*{max-width:100%;box-sizing:border-box}.layout-align-center-end,.layout-align-end-end,.layout-align-space-around-end,.layout-align-space-between-end,.layout-align-start-end{align-items:flex-end;align-content:flex-end}.layout-align-center-stretch,.layout-align-end-stretch,.layout-align-space-around-stretch,.layout-align-space-between-stretch,.layout-align-start-stretch{align-items:stretch;align-content:stretch}.flex{flex:1;box-sizing:border-box}.flex-grow{flex:1 1 100%;box-sizing:border-box}.flex-initial{flex:0 1 auto;box-sizing:border-box}.flex-auto{flex:1 1 auto;box-sizing:border-box}.flex-none{flex:0 0 auto;box-sizing:border-box}.flex-noshrink{flex:1 0 auto;box-sizing:border-box}.flex-nogrow{flex:0 1 auto;box-sizing:border-box}.flex-0{flex:1 1 0%;max-width:0%;max-height:100%;box-sizing:border-box}.layout-row>.flex-0{flex:1 1 0%;max-width:0%;max-height:100%;box-sizing:border-box;min-width:0}.layout-column>.flex-0{flex:1 1 0%;max-width:100%;max-height:0%;box-sizing:border-box}.layout-row>.flex-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-row>.flex-0{flex:1 1 0%;max-width:0%;max-height:100%;box-sizing:border-box;min-width:0}.layout-column>.flex-0{flex:1 1 0%;max-width:100%;max-height:0%;box-sizing:border-box;min-height:0}.flex-5{flex:1 1 5%;max-width:5%;max-height:100%;box-sizing:border-box}.layout-row>.flex-5{flex:1 1 5%;max-width:5%;max-height:100%;box-sizing:border-box}.layout-column>.flex-5{flex:1 1 5%;max-width:100%;max-height:5%;box-sizing:border-box}.layout-row>.flex-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-row>.flex-5{flex:1 1 5%;max-width:5%;max-height:100%;box-sizing:border-box}.layout-column>.flex-5{flex:1 1 5%;max-width:100%;max-height:5%;box-sizing:border-box}.flex-10{flex:1 1 10%;max-width:10%;max-height:100%;box-sizing:border-box}.layout-row>.flex-10{flex:1 1 10%;max-width:10%;max-height:100%;box-sizing:border-box}.layout-column>.flex-10{flex:1 1 10%;max-width:100%;max-height:10%;box-sizing:border-box}.layout-row>.flex-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-row>.flex-10{flex:1 1 10%;max-width:10%;max-height:100%;box-sizing:border-box}.layout-column>.flex-10{flex:1 1 10%;max-width:100%;max-height:10%;box-sizing:border-box}.flex-15{flex:1 1 15%;max-width:15%;max-height:100%;box-sizing:border-box}.layout-row>.flex-15{flex:1 1 15%;max-width:15%;max-height:100%;box-sizing:border-box}.layout-column>.flex-15{flex:1 1 15%;max-width:100%;max-height:15%;box-sizing:border-box}.layout-row>.flex-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-row>.flex-15{flex:1 1 15%;max-width:15%;max-height:100%;box-sizing:border-box}.layout-column>.flex-15{flex:1 1 15%;max-width:100%;max-height:15%;box-sizing:border-box}.flex-20{flex:1 1 20%;max-width:20%;max-height:100%;box-sizing:border-box}.layout-row>.flex-20{flex:1 1 20%;max-width:20%;max-height:100%;box-sizing:border-box}.layout-column>.flex-20{flex:1 1 20%;max-width:100%;max-height:20%;box-sizing:border-box}.layout-row>.flex-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-row>.flex-20{flex:1 1 20%;max-width:20%;max-height:100%;box-sizing:border-box}.layout-column>.flex-20{flex:1 1 20%;max-width:100%;max-height:20%;box-sizing:border-box}.flex-25{flex:1 1 25%;max-width:25%;max-height:100%;box-sizing:border-box}.layout-row>.flex-25{flex:1 1 25%;max-width:25%;max-height:100%;box-sizing:border-box}.layout-column>.flex-25{flex:1 1 25%;max-width:100%;max-height:25%;box-sizing:border-box}.layout-row>.flex-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-row>.flex-25{flex:1 1 25%;max-width:25%;max-height:100%;box-sizing:border-box}.layout-column>.flex-25{flex:1 1 25%;max-width:100%;max-height:25%;box-sizing:border-box}.flex-30{flex:1 1 30%;max-width:30%;max-height:100%;box-sizing:border-box}.layout-row>.flex-30{flex:1 1 30%;max-width:30%;max-height:100%;box-sizing:border-box}.layout-column>.flex-30{flex:1 1 30%;max-width:100%;max-height:30%;box-sizing:border-box}.layout-row>.flex-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-row>.flex-30{flex:1 1 30%;max-width:30%;max-height:100%;box-sizing:border-box}.layout-column>.flex-30{flex:1 1 30%;max-width:100%;max-height:30%;box-sizing:border-box}.flex-35{flex:1 1 35%;max-width:35%;max-height:100%;box-sizing:border-box}.layout-row>.flex-35{flex:1 1 35%;max-width:35%;max-height:100%;box-sizing:border-box}.layout-column>.flex-35{flex:1 1 35%;max-width:100%;max-height:35%;box-sizing:border-box}.layout-row>.flex-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-row>.flex-35{flex:1 1 35%;max-width:35%;max-height:100%;box-sizing:border-box}.layout-column>.flex-35{flex:1 1 35%;max-width:100%;max-height:35%;box-sizing:border-box}.flex-40{flex:1 1 40%;max-width:40%;max-height:100%;box-sizing:border-box}.layout-row>.flex-40{flex:1 1 40%;max-width:40%;max-height:100%;box-sizing:border-box}.layout-column>.flex-40{flex:1 1 40%;max-width:100%;max-height:40%;box-sizing:border-box}.layout-row>.flex-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-row>.flex-40{flex:1 1 40%;max-width:40%;max-height:100%;box-sizing:border-box}.layout-column>.flex-40{flex:1 1 40%;max-width:100%;max-height:40%;box-sizing:border-box}.flex-45{flex:1 1 45%;max-width:45%;max-height:100%;box-sizing:border-box}.layout-row>.flex-45{flex:1 1 45%;max-width:45%;max-height:100%;box-sizing:border-box}.layout-column>.flex-45{flex:1 1 45%;max-width:100%;max-height:45%;box-sizing:border-box}.layout-row>.flex-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-row>.flex-45{flex:1 1 45%;max-width:45%;max-height:100%;box-sizing:border-box}.layout-column>.flex-45{flex:1 1 45%;max-width:100%;max-height:45%;box-sizing:border-box}.flex-50{flex:1 1 50%;max-width:50%;max-height:100%;box-sizing:border-box}.layout-row>.flex-50{flex:1 1 50%;max-width:50%;max-height:100%;box-sizing:border-box}.layout-column>.flex-50{flex:1 1 50%;max-width:100%;max-height:50%;box-sizing:border-box}.layout-row>.flex-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-row>.flex-50{flex:1 1 50%;max-width:50%;max-height:100%;box-sizing:border-box}.layout-column>.flex-50{flex:1 1 50%;max-width:100%;max-height:50%;box-sizing:border-box}.flex-55{flex:1 1 55%;max-width:55%;max-height:100%;box-sizing:border-box}.layout-row>.flex-55{flex:1 1 55%;max-width:55%;max-height:100%;box-sizing:border-box}.layout-column>.flex-55{flex:1 1 55%;max-width:100%;max-height:55%;box-sizing:border-box}.layout-row>.flex-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-row>.flex-55{flex:1 1 55%;max-width:55%;max-height:100%;box-sizing:border-box}.layout-column>.flex-55{flex:1 1 55%;max-width:100%;max-height:55%;box-sizing:border-box}.flex-60{flex:1 1 60%;max-width:60%;max-height:100%;box-sizing:border-box}.layout-row>.flex-60{flex:1 1 60%;max-width:60%;max-height:100%;box-sizing:border-box}.layout-column>.flex-60{flex:1 1 60%;max-width:100%;max-height:60%;box-sizing:border-box}.layout-row>.flex-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-row>.flex-60{flex:1 1 60%;max-width:60%;max-height:100%;box-sizing:border-box}.layout-column>.flex-60{flex:1 1 60%;max-width:100%;max-height:60%;box-sizing:border-box}.flex-65{flex:1 1 65%;max-width:65%;max-height:100%;box-sizing:border-box}.layout-row>.flex-65{flex:1 1 65%;max-width:65%;max-height:100%;box-sizing:border-box}.layout-column>.flex-65{flex:1 1 65%;max-width:100%;max-height:65%;box-sizing:border-box}.layout-row>.flex-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-row>.flex-65{flex:1 1 65%;max-width:65%;max-height:100%;box-sizing:border-box}.layout-column>.flex-65{flex:1 1 65%;max-width:100%;max-height:65%;box-sizing:border-box}.flex-70{flex:1 1 70%;max-width:70%;max-height:100%;box-sizing:border-box}.layout-row>.flex-70{flex:1 1 70%;max-width:70%;max-height:100%;box-sizing:border-box}.layout-column>.flex-70{flex:1 1 70%;max-width:100%;max-height:70%;box-sizing:border-box}.layout-row>.flex-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-row>.flex-70{flex:1 1 70%;max-width:70%;max-height:100%;box-sizing:border-box}.layout-column>.flex-70{flex:1 1 70%;max-width:100%;max-height:70%;box-sizing:border-box}.flex-75{flex:1 1 75%;max-width:75%;max-height:100%;box-sizing:border-box}.layout-row>.flex-75{flex:1 1 75%;max-width:75%;max-height:100%;box-sizing:border-box}.layout-column>.flex-75{flex:1 1 75%;max-width:100%;max-height:75%;box-sizing:border-box}.layout-row>.flex-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-row>.flex-75{flex:1 1 75%;max-width:75%;max-height:100%;box-sizing:border-box}.layout-column>.flex-75{flex:1 1 75%;max-width:100%;max-height:75%;box-sizing:border-box}.flex-80{flex:1 1 80%;max-width:80%;max-height:100%;box-sizing:border-box}.layout-row>.flex-80{flex:1 1 80%;max-width:80%;max-height:100%;box-sizing:border-box}.layout-column>.flex-80{flex:1 1 80%;max-width:100%;max-height:80%;box-sizing:border-box}.layout-row>.flex-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-row>.flex-80{flex:1 1 80%;max-width:80%;max-height:100%;box-sizing:border-box}.layout-column>.flex-80{flex:1 1 80%;max-width:100%;max-height:80%;box-sizing:border-box}.flex-85{flex:1 1 85%;max-width:85%;max-height:100%;box-sizing:border-box}.layout-row>.flex-85{flex:1 1 85%;max-width:85%;max-height:100%;box-sizing:border-box}.layout-column>.flex-85{flex:1 1 85%;max-width:100%;max-height:85%;box-sizing:border-box}.layout-row>.flex-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-row>.flex-85{flex:1 1 85%;max-width:85%;max-height:100%;box-sizing:border-box}.layout-column>.flex-85{flex:1 1 85%;max-width:100%;max-height:85%;box-sizing:border-box}.flex-90{flex:1 1 90%;max-width:90%;max-height:100%;box-sizing:border-box}.layout-row>.flex-90{flex:1 1 90%;max-width:90%;max-height:100%;box-sizing:border-box}.layout-column>.flex-90{flex:1 1 90%;max-width:100%;max-height:90%;box-sizing:border-box}.layout-row>.flex-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-row>.flex-90{flex:1 1 90%;max-width:90%;max-height:100%;box-sizing:border-box}.layout-column>.flex-90{flex:1 1 90%;max-width:100%;max-height:90%;box-sizing:border-box}.flex-95{flex:1 1 95%;max-width:95%;max-height:100%;box-sizing:border-box}.layout-row>.flex-95{flex:1 1 95%;max-width:95%;max-height:100%;box-sizing:border-box}.layout-column>.flex-95{flex:1 1 95%;max-width:100%;max-height:95%;box-sizing:border-box}.layout-row>.flex-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-row>.flex-95{flex:1 1 95%;max-width:95%;max-height:100%;box-sizing:border-box}.layout-column>.flex-95{flex:1 1 95%;max-width:100%;max-height:95%;box-sizing:border-box}.flex-100{flex:1 1 100%;max-width:100%;max-height:100%;box-sizing:border-box}.layout-row>.flex-100{flex:1 1 100%;max-width:100%;max-height:100%;box-sizing:border-box}.layout-column>.flex-100{flex:1 1 100%;max-width:100%;max-height:100%;box-sizing:border-box}.layout-row>.flex-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-row>.flex-100{flex:1 1 100%;max-width:100%;max-height:100%;box-sizing:border-box}.layout-column>.flex-100{flex:1 1 100%;max-width:100%;max-height:100%;box-sizing:border-box}.layout-row>.flex-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-row>.flex{min-width:0}.layout-column>.flex-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-column>.flex{min-height:0}.layout,.layout-column,.layout-row{box-sizing:border-box;display:-webkit-box;display:-webkit-flex;display:-moz-box;display:-ms-flexbox;display:flex}.layout-column{flex-direction:column}.layout-row{flex-direction:row}.layout-padding-sm>*,.layout-padding>.flex-sm{padding:4px}.layout-padding,.layout-padding-gt-sm,.layout-padding-gt-sm>*,.layout-padding-md,.layout-padding-md>*,.layout-padding>*,.layout-padding>.flex,.layout-padding>.flex-gt-sm,.layout-padding>.flex-md{padding:8px}.layout-padding-gt-lg>*,.layout-padding-gt-md>*,.layout-padding-lg>*,.layout-padding>.flex-gt-lg,.layout-padding>.flex-gt-md,.layout-padding>.flex-lg{padding:16px}.layout-margin-sm>*,.layout-margin>.flex-sm{margin:4px}.layout-margin,.layout-margin-gt-sm,.layout-margin-gt-sm>*,.layout-margin-md,.layout-margin-md>*,.layout-margin>*,.layout-margin>.flex,.layout-margin>.flex-gt-sm,.layout-margin>.flex-md{margin:8px}.layout-margin-gt-lg>*,.layout-margin-gt-md>*,.layout-margin-lg>*,.layout-margin>.flex-gt-lg,.layout-margin>.flex-gt-md,.layout-margin>.flex-lg{margin:16px}.layout-wrap{flex-wrap:wrap}.layout-nowrap{flex-wrap:nowrap}.layout-fill{margin:0;width:100%;min-height:100%;height:100%}@media (max-width:599px){.hide-xs:not(.show-xs):not(.show),.hide:not(.show-xs):not(.show){display:none}.flex-order-xs--20{order:-20}.flex-order-xs--19{order:-19}.flex-order-xs--18{order:-18}.flex-order-xs--17{order:-17}.flex-order-xs--16{order:-16}.flex-order-xs--15{order:-15}.flex-order-xs--14{order:-14}.flex-order-xs--13{order:-13}.flex-order-xs--12{order:-12}.flex-order-xs--11{order:-11}.flex-order-xs--10{order:-10}.flex-order-xs--9{order:-9}.flex-order-xs--8{order:-8}.flex-order-xs--7{order:-7}.flex-order-xs--6{order:-6}.flex-order-xs--5{order:-5}.flex-order-xs--4{order:-4}.flex-order-xs--3{order:-3}.flex-order-xs--2{order:-2}.flex-order-xs--1{order:-1}.flex-order-xs-0{order:0}.flex-order-xs-1{order:1}.flex-order-xs-2{order:2}.flex-order-xs-3{order:3}.flex-order-xs-4{order:4}.flex-order-xs-5{order:5}.flex-order-xs-6{order:6}.flex-order-xs-7{order:7}.flex-order-xs-8{order:8}.flex-order-xs-9{order:9}.flex-order-xs-10{order:10}.flex-order-xs-11{order:11}.flex-order-xs-12{order:12}.flex-order-xs-13{order:13}.flex-order-xs-14{order:14}.flex-order-xs-15{order:15}.flex-order-xs-16{order:16}.flex-order-xs-17{order:17}.flex-order-xs-18{order:18}.flex-order-xs-19{order:19}.flex-order-xs-20{order:20}.flex-offset-xs-0,.offset-xs-0{margin-left:0}[dir=rtl] .flex-offset-xs-0,[dir=rtl] .offset-xs-0{margin-left:auto;margin-right:0}.flex-offset-xs-5,.offset-xs-5{margin-left:5%}[dir=rtl] .flex-offset-xs-5,[dir=rtl] .offset-xs-5{margin-left:auto;margin-right:5%}.flex-offset-xs-10,.offset-xs-10{margin-left:10%}[dir=rtl] .flex-offset-xs-10,[dir=rtl] .offset-xs-10{margin-left:auto;margin-right:10%}.flex-offset-xs-15,.offset-xs-15{margin-left:15%}[dir=rtl] .flex-offset-xs-15,[dir=rtl] .offset-xs-15{margin-left:auto;margin-right:15%}.flex-offset-xs-20,.offset-xs-20{margin-left:20%}[dir=rtl] .flex-offset-xs-20,[dir=rtl] .offset-xs-20{margin-left:auto;margin-right:20%}.flex-offset-xs-25,.offset-xs-25{margin-left:25%}[dir=rtl] .flex-offset-xs-25,[dir=rtl] .offset-xs-25{margin-left:auto;margin-right:25%}.flex-offset-xs-30,.offset-xs-30{margin-left:30%}[dir=rtl] .flex-offset-xs-30,[dir=rtl] .offset-xs-30{margin-left:auto;margin-right:30%}.flex-offset-xs-35,.offset-xs-35{margin-left:35%}[dir=rtl] .flex-offset-xs-35,[dir=rtl] .offset-xs-35{margin-left:auto;margin-right:35%}.flex-offset-xs-40,.offset-xs-40{margin-left:40%}[dir=rtl] .flex-offset-xs-40,[dir=rtl] .offset-xs-40{margin-left:auto;margin-right:40%}.flex-offset-xs-45,.offset-xs-45{margin-left:45%}[dir=rtl] .flex-offset-xs-45,[dir=rtl] .offset-xs-45{margin-left:auto;margin-right:45%}.flex-offset-xs-50,.offset-xs-50{margin-left:50%}[dir=rtl] .flex-offset-xs-50,[dir=rtl] .offset-xs-50{margin-left:auto;margin-right:50%}.flex-offset-xs-55,.offset-xs-55{margin-left:55%}[dir=rtl] .flex-offset-xs-55,[dir=rtl] .offset-xs-55{margin-left:auto;margin-right:55%}.flex-offset-xs-60,.offset-xs-60{margin-left:60%}[dir=rtl] .flex-offset-xs-60,[dir=rtl] .offset-xs-60{margin-left:auto;margin-right:60%}.flex-offset-xs-65,.offset-xs-65{margin-left:65%}[dir=rtl] .flex-offset-xs-65,[dir=rtl] .offset-xs-65{margin-left:auto;margin-right:65%}.flex-offset-xs-70,.offset-xs-70{margin-left:70%}[dir=rtl] .flex-offset-xs-70,[dir=rtl] .offset-xs-70{margin-left:auto;margin-right:70%}.flex-offset-xs-75,.offset-xs-75{margin-left:75%}[dir=rtl] .flex-offset-xs-75,[dir=rtl] .offset-xs-75{margin-left:auto;margin-right:75%}.flex-offset-xs-80,.offset-xs-80{margin-left:80%}[dir=rtl] .flex-offset-xs-80,[dir=rtl] .offset-xs-80{margin-left:auto;margin-right:80%}.flex-offset-xs-85,.offset-xs-85{margin-left:85%}[dir=rtl] .flex-offset-xs-85,[dir=rtl] .offset-xs-85{margin-left:auto;margin-right:85%}.flex-offset-xs-90,.offset-xs-90{margin-left:90%}[dir=rtl] .flex-offset-xs-90,[dir=rtl] .offset-xs-90{margin-left:auto;margin-right:90%}.flex-offset-xs-95,.offset-xs-95{margin-left:95%}[dir=rtl] .flex-offset-xs-95,[dir=rtl] .offset-xs-95{margin-left:auto;margin-right:95%}.flex-offset-xs-33,.offset-xs-33{margin-left:calc(100% / 3)}.flex-offset-xs-66,.offset-xs-66{margin-left:calc(200% / 3)}[dir=rtl] .flex-offset-xs-66,[dir=rtl] .offset-xs-66{margin-left:auto;margin-right:calc(200% / 3)}.layout-align-xs,.layout-align-xs-start-stretch{justify-content:flex-start;align-content:stretch;align-items:stretch}.layout-align-xs-start,.layout-align-xs-start-center,.layout-align-xs-start-end,.layout-align-xs-start-start,.layout-align-xs-start-stretch{justify-content:flex-start}.layout-align-xs-center,.layout-align-xs-center-center,.layout-align-xs-center-end,.layout-align-xs-center-start,.layout-align-xs-center-stretch{justify-content:center}.layout-align-xs-end,.layout-align-xs-end-center,.layout-align-xs-end-end,.layout-align-xs-end-start,.layout-align-xs-end-stretch{justify-content:flex-end}.layout-align-xs-space-around,.layout-align-xs-space-around-center,.layout-align-xs-space-around-end,.layout-align-xs-space-around-start,.layout-align-xs-space-around-stretch{justify-content:space-around}.layout-align-xs-space-between,.layout-align-xs-space-between-center,.layout-align-xs-space-between-end,.layout-align-xs-space-between-start,.layout-align-xs-space-between-stretch{justify-content:space-between}.layout-align-xs-center-start,.layout-align-xs-end-start,.layout-align-xs-space-around-start,.layout-align-xs-space-between-start,.layout-align-xs-start-start{align-items:flex-start;align-content:flex-start}.layout-align-xs-center-center,.layout-align-xs-end-center,.layout-align-xs-space-around-center,.layout-align-xs-space-between-center,.layout-align-xs-start-center{align-items:center;align-content:center;max-width:100%}.layout-align-xs-center-center>*,.layout-align-xs-end-center>*,.layout-align-xs-space-around-center>*,.layout-align-xs-space-between-center>*,.layout-align-xs-start-center>*{max-width:100%;box-sizing:border-box}.layout-align-xs-center-end,.layout-align-xs-end-end,.layout-align-xs-space-around-end,.layout-align-xs-space-between-end,.layout-align-xs-start-end{align-items:flex-end;align-content:flex-end}.layout-align-xs-center-stretch,.layout-align-xs-end-stretch,.layout-align-xs-space-around-stretch,.layout-align-xs-space-between-stretch,.layout-align-xs-start-stretch{align-items:stretch;align-content:stretch}.flex-xs{flex:1;box-sizing:border-box}.flex-xs-grow{flex:1 1 100%;box-sizing:border-box}.flex-xs-initial{flex:0 1 auto;box-sizing:border-box}.flex-xs-auto{flex:1 1 auto;box-sizing:border-box}.flex-xs-none{flex:0 0 auto;box-sizing:border-box}.flex-xs-noshrink{flex:1 0 auto;box-sizing:border-box}.flex-xs-nogrow{flex:0 1 auto;box-sizing:border-box}.flex-xs-0{flex:1 1 0%;max-width:0%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xs-0{flex:1 1 0%;max-width:0%;max-height:100%;box-sizing:border-box;min-width:0}.layout-column>.flex-xs-0{flex:1 1 0%;max-width:100%;max-height:0%;box-sizing:border-box}.layout-row>.flex-xs-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xs-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-xs-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-xs-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-xs-row>.flex-xs-0{flex:1 1 0%;max-width:0%;max-height:100%;box-sizing:border-box;min-width:0}.layout-xs-column>.flex-xs-0{flex:1 1 0%;max-width:100%;max-height:0%;box-sizing:border-box;min-height:0}.flex-xs-5{flex:1 1 5%;max-width:5%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xs-5{flex:1 1 5%;max-width:5%;max-height:100%;box-sizing:border-box}.layout-column>.flex-xs-5{flex:1 1 5%;max-width:100%;max-height:5%;box-sizing:border-box}.layout-row>.flex-xs-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xs-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-xs-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-xs-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-xs-row>.flex-xs-5{flex:1 1 5%;max-width:5%;max-height:100%;box-sizing:border-box}.layout-xs-column>.flex-xs-5{flex:1 1 5%;max-width:100%;max-height:5%;box-sizing:border-box}.flex-xs-10{flex:1 1 10%;max-width:10%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xs-10{flex:1 1 10%;max-width:10%;max-height:100%;box-sizing:border-box}.layout-column>.flex-xs-10{flex:1 1 10%;max-width:100%;max-height:10%;box-sizing:border-box}.layout-row>.flex-xs-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xs-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-xs-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-xs-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-xs-row>.flex-xs-10{flex:1 1 10%;max-width:10%;max-height:100%;box-sizing:border-box}.layout-xs-column>.flex-xs-10{flex:1 1 10%;max-width:100%;max-height:10%;box-sizing:border-box}.flex-xs-15{flex:1 1 15%;max-width:15%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xs-15{flex:1 1 15%;max-width:15%;max-height:100%;box-sizing:border-box}.layout-column>.flex-xs-15{flex:1 1 15%;max-width:100%;max-height:15%;box-sizing:border-box}.layout-row>.flex-xs-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xs-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-xs-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-xs-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-xs-row>.flex-xs-15{flex:1 1 15%;max-width:15%;max-height:100%;box-sizing:border-box}.layout-xs-column>.flex-xs-15{flex:1 1 15%;max-width:100%;max-height:15%;box-sizing:border-box}.flex-xs-20{flex:1 1 20%;max-width:20%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xs-20{flex:1 1 20%;max-width:20%;max-height:100%;box-sizing:border-box}.layout-column>.flex-xs-20{flex:1 1 20%;max-width:100%;max-height:20%;box-sizing:border-box}.layout-row>.flex-xs-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xs-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-xs-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-xs-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-xs-row>.flex-xs-20{flex:1 1 20%;max-width:20%;max-height:100%;box-sizing:border-box}.layout-xs-column>.flex-xs-20{flex:1 1 20%;max-width:100%;max-height:20%;box-sizing:border-box}.flex-xs-25{flex:1 1 25%;max-width:25%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xs-25{flex:1 1 25%;max-width:25%;max-height:100%;box-sizing:border-box}.layout-column>.flex-xs-25{flex:1 1 25%;max-width:100%;max-height:25%;box-sizing:border-box}.layout-row>.flex-xs-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xs-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-xs-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-xs-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-xs-row>.flex-xs-25{flex:1 1 25%;max-width:25%;max-height:100%;box-sizing:border-box}.layout-xs-column>.flex-xs-25{flex:1 1 25%;max-width:100%;max-height:25%;box-sizing:border-box}.flex-xs-30{flex:1 1 30%;max-width:30%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xs-30{flex:1 1 30%;max-width:30%;max-height:100%;box-sizing:border-box}.layout-column>.flex-xs-30{flex:1 1 30%;max-width:100%;max-height:30%;box-sizing:border-box}.layout-row>.flex-xs-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xs-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-xs-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-xs-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-xs-row>.flex-xs-30{flex:1 1 30%;max-width:30%;max-height:100%;box-sizing:border-box}.layout-xs-column>.flex-xs-30{flex:1 1 30%;max-width:100%;max-height:30%;box-sizing:border-box}.flex-xs-35{flex:1 1 35%;max-width:35%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xs-35{flex:1 1 35%;max-width:35%;max-height:100%;box-sizing:border-box}.layout-column>.flex-xs-35{flex:1 1 35%;max-width:100%;max-height:35%;box-sizing:border-box}.layout-row>.flex-xs-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xs-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-xs-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-xs-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-xs-row>.flex-xs-35{flex:1 1 35%;max-width:35%;max-height:100%;box-sizing:border-box}.layout-xs-column>.flex-xs-35{flex:1 1 35%;max-width:100%;max-height:35%;box-sizing:border-box}.flex-xs-40{flex:1 1 40%;max-width:40%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xs-40{flex:1 1 40%;max-width:40%;max-height:100%;box-sizing:border-box}.layout-column>.flex-xs-40{flex:1 1 40%;max-width:100%;max-height:40%;box-sizing:border-box}.layout-row>.flex-xs-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xs-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-xs-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-xs-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-xs-row>.flex-xs-40{flex:1 1 40%;max-width:40%;max-height:100%;box-sizing:border-box}.layout-xs-column>.flex-xs-40{flex:1 1 40%;max-width:100%;max-height:40%;box-sizing:border-box}.flex-xs-45{flex:1 1 45%;max-width:45%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xs-45{flex:1 1 45%;max-width:45%;max-height:100%;box-sizing:border-box}.layout-column>.flex-xs-45{flex:1 1 45%;max-width:100%;max-height:45%;box-sizing:border-box}.layout-row>.flex-xs-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xs-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-xs-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-xs-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-xs-row>.flex-xs-45{flex:1 1 45%;max-width:45%;max-height:100%;box-sizing:border-box}.layout-xs-column>.flex-xs-45{flex:1 1 45%;max-width:100%;max-height:45%;box-sizing:border-box}.flex-xs-50{flex:1 1 50%;max-width:50%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xs-50{flex:1 1 50%;max-width:50%;max-height:100%;box-sizing:border-box}.layout-column>.flex-xs-50{flex:1 1 50%;max-width:100%;max-height:50%;box-sizing:border-box}.layout-row>.flex-xs-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xs-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-xs-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-xs-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-xs-row>.flex-xs-50{flex:1 1 50%;max-width:50%;max-height:100%;box-sizing:border-box}.layout-xs-column>.flex-xs-50{flex:1 1 50%;max-width:100%;max-height:50%;box-sizing:border-box}.flex-xs-55{flex:1 1 55%;max-width:55%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xs-55{flex:1 1 55%;max-width:55%;max-height:100%;box-sizing:border-box}.layout-column>.flex-xs-55{flex:1 1 55%;max-width:100%;max-height:55%;box-sizing:border-box}.layout-row>.flex-xs-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xs-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-xs-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-xs-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-xs-row>.flex-xs-55{flex:1 1 55%;max-width:55%;max-height:100%;box-sizing:border-box}.layout-xs-column>.flex-xs-55{flex:1 1 55%;max-width:100%;max-height:55%;box-sizing:border-box}.flex-xs-60{flex:1 1 60%;max-width:60%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xs-60{flex:1 1 60%;max-width:60%;max-height:100%;box-sizing:border-box}.layout-column>.flex-xs-60{flex:1 1 60%;max-width:100%;max-height:60%;box-sizing:border-box}.layout-row>.flex-xs-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xs-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-xs-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-xs-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-xs-row>.flex-xs-60{flex:1 1 60%;max-width:60%;max-height:100%;box-sizing:border-box}.layout-xs-column>.flex-xs-60{flex:1 1 60%;max-width:100%;max-height:60%;box-sizing:border-box}.flex-xs-65{flex:1 1 65%;max-width:65%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xs-65{flex:1 1 65%;max-width:65%;max-height:100%;box-sizing:border-box}.layout-column>.flex-xs-65{flex:1 1 65%;max-width:100%;max-height:65%;box-sizing:border-box}.layout-row>.flex-xs-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xs-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-xs-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-xs-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-xs-row>.flex-xs-65{flex:1 1 65%;max-width:65%;max-height:100%;box-sizing:border-box}.layout-xs-column>.flex-xs-65{flex:1 1 65%;max-width:100%;max-height:65%;box-sizing:border-box}.flex-xs-70{flex:1 1 70%;max-width:70%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xs-70{flex:1 1 70%;max-width:70%;max-height:100%;box-sizing:border-box}.layout-column>.flex-xs-70{flex:1 1 70%;max-width:100%;max-height:70%;box-sizing:border-box}.layout-row>.flex-xs-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xs-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-xs-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-xs-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-xs-row>.flex-xs-70{flex:1 1 70%;max-width:70%;max-height:100%;box-sizing:border-box}.layout-xs-column>.flex-xs-70{flex:1 1 70%;max-width:100%;max-height:70%;box-sizing:border-box}.flex-xs-75{flex:1 1 75%;max-width:75%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xs-75{flex:1 1 75%;max-width:75%;max-height:100%;box-sizing:border-box}.layout-column>.flex-xs-75{flex:1 1 75%;max-width:100%;max-height:75%;box-sizing:border-box}.layout-row>.flex-xs-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xs-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-xs-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-xs-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-xs-row>.flex-xs-75{flex:1 1 75%;max-width:75%;max-height:100%;box-sizing:border-box}.layout-xs-column>.flex-xs-75{flex:1 1 75%;max-width:100%;max-height:75%;box-sizing:border-box}.flex-xs-80{flex:1 1 80%;max-width:80%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xs-80{flex:1 1 80%;max-width:80%;max-height:100%;box-sizing:border-box}.layout-column>.flex-xs-80{flex:1 1 80%;max-width:100%;max-height:80%;box-sizing:border-box}.layout-row>.flex-xs-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xs-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-xs-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-xs-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-xs-row>.flex-xs-80{flex:1 1 80%;max-width:80%;max-height:100%;box-sizing:border-box}.layout-xs-column>.flex-xs-80{flex:1 1 80%;max-width:100%;max-height:80%;box-sizing:border-box}.flex-xs-85{flex:1 1 85%;max-width:85%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xs-85{flex:1 1 85%;max-width:85%;max-height:100%;box-sizing:border-box}.layout-column>.flex-xs-85{flex:1 1 85%;max-width:100%;max-height:85%;box-sizing:border-box}.layout-row>.flex-xs-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xs-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-xs-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-xs-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-xs-row>.flex-xs-85{flex:1 1 85%;max-width:85%;max-height:100%;box-sizing:border-box}.layout-xs-column>.flex-xs-85{flex:1 1 85%;max-width:100%;max-height:85%;box-sizing:border-box}.flex-xs-90{flex:1 1 90%;max-width:90%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xs-90{flex:1 1 90%;max-width:90%;max-height:100%;box-sizing:border-box}.layout-column>.flex-xs-90{flex:1 1 90%;max-width:100%;max-height:90%;box-sizing:border-box}.layout-row>.flex-xs-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xs-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-xs-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-xs-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-xs-row>.flex-xs-90{flex:1 1 90%;max-width:90%;max-height:100%;box-sizing:border-box}.layout-xs-column>.flex-xs-90{flex:1 1 90%;max-width:100%;max-height:90%;box-sizing:border-box}.flex-xs-95{flex:1 1 95%;max-width:95%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xs-95{flex:1 1 95%;max-width:95%;max-height:100%;box-sizing:border-box}.layout-column>.flex-xs-95{flex:1 1 95%;max-width:100%;max-height:95%;box-sizing:border-box}.layout-row>.flex-xs-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xs-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-xs-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-xs-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-xs-row>.flex-xs-95{flex:1 1 95%;max-width:95%;max-height:100%;box-sizing:border-box}.layout-xs-column>.flex-xs-95{flex:1 1 95%;max-width:100%;max-height:95%;box-sizing:border-box}.flex-xs-100{flex:1 1 100%;max-width:100%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xs-100{flex:1 1 100%;max-width:100%;max-height:100%;box-sizing:border-box}.layout-column>.flex-xs-100{flex:1 1 100%;max-width:100%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xs-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xs-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-xs-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-xs-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-xs-row>.flex-xs-100{flex:1 1 100%;max-width:100%;max-height:100%;box-sizing:border-box}.layout-xs-column>.flex-xs-100{flex:1 1 100%;max-width:100%;max-height:100%;box-sizing:border-box}.layout-xs-row>.flex-xs-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-xs-row>.flex-xs-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-xs-row>.flex{min-width:0}.layout-xs-column>.flex-xs-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-xs-column>.flex-xs-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-xs-column>.flex{min-height:0}.layout-xs,.layout-xs-column,.layout-xs-row{box-sizing:border-box;display:-webkit-box;display:-webkit-flex;display:-moz-box;display:-ms-flexbox;display:flex}.layout-xs-column{flex-direction:column}.layout-xs-row{flex-direction:row}}@media (min-width:600px){.flex-order-gt-xs--20{order:-20}.flex-order-gt-xs--19{order:-19}.flex-order-gt-xs--18{order:-18}.flex-order-gt-xs--17{order:-17}.flex-order-gt-xs--16{order:-16}.flex-order-gt-xs--15{order:-15}.flex-order-gt-xs--14{order:-14}.flex-order-gt-xs--13{order:-13}.flex-order-gt-xs--12{order:-12}.flex-order-gt-xs--11{order:-11}.flex-order-gt-xs--10{order:-10}.flex-order-gt-xs--9{order:-9}.flex-order-gt-xs--8{order:-8}.flex-order-gt-xs--7{order:-7}.flex-order-gt-xs--6{order:-6}.flex-order-gt-xs--5{order:-5}.flex-order-gt-xs--4{order:-4}.flex-order-gt-xs--3{order:-3}.flex-order-gt-xs--2{order:-2}.flex-order-gt-xs--1{order:-1}.flex-order-gt-xs-0{order:0}.flex-order-gt-xs-1{order:1}.flex-order-gt-xs-2{order:2}.flex-order-gt-xs-3{order:3}.flex-order-gt-xs-4{order:4}.flex-order-gt-xs-5{order:5}.flex-order-gt-xs-6{order:6}.flex-order-gt-xs-7{order:7}.flex-order-gt-xs-8{order:8}.flex-order-gt-xs-9{order:9}.flex-order-gt-xs-10{order:10}.flex-order-gt-xs-11{order:11}.flex-order-gt-xs-12{order:12}.flex-order-gt-xs-13{order:13}.flex-order-gt-xs-14{order:14}.flex-order-gt-xs-15{order:15}.flex-order-gt-xs-16{order:16}.flex-order-gt-xs-17{order:17}.flex-order-gt-xs-18{order:18}.flex-order-gt-xs-19{order:19}.flex-order-gt-xs-20{order:20}.flex-offset-gt-xs-0,.offset-gt-xs-0{margin-left:0}[dir=rtl] .flex-offset-gt-xs-0,[dir=rtl] .offset-gt-xs-0{margin-left:auto;margin-right:0}.flex-offset-gt-xs-5,.offset-gt-xs-5{margin-left:5%}[dir=rtl] .flex-offset-gt-xs-5,[dir=rtl] .offset-gt-xs-5{margin-left:auto;margin-right:5%}.flex-offset-gt-xs-10,.offset-gt-xs-10{margin-left:10%}[dir=rtl] .flex-offset-gt-xs-10,[dir=rtl] .offset-gt-xs-10{margin-left:auto;margin-right:10%}.flex-offset-gt-xs-15,.offset-gt-xs-15{margin-left:15%}[dir=rtl] .flex-offset-gt-xs-15,[dir=rtl] .offset-gt-xs-15{margin-left:auto;margin-right:15%}.flex-offset-gt-xs-20,.offset-gt-xs-20{margin-left:20%}[dir=rtl] .flex-offset-gt-xs-20,[dir=rtl] .offset-gt-xs-20{margin-left:auto;margin-right:20%}.flex-offset-gt-xs-25,.offset-gt-xs-25{margin-left:25%}[dir=rtl] .flex-offset-gt-xs-25,[dir=rtl] .offset-gt-xs-25{margin-left:auto;margin-right:25%}.flex-offset-gt-xs-30,.offset-gt-xs-30{margin-left:30%}[dir=rtl] .flex-offset-gt-xs-30,[dir=rtl] .offset-gt-xs-30{margin-left:auto;margin-right:30%}.flex-offset-gt-xs-35,.offset-gt-xs-35{margin-left:35%}[dir=rtl] .flex-offset-gt-xs-35,[dir=rtl] .offset-gt-xs-35{margin-left:auto;margin-right:35%}.flex-offset-gt-xs-40,.offset-gt-xs-40{margin-left:40%}[dir=rtl] .flex-offset-gt-xs-40,[dir=rtl] .offset-gt-xs-40{margin-left:auto;margin-right:40%}.flex-offset-gt-xs-45,.offset-gt-xs-45{margin-left:45%}[dir=rtl] .flex-offset-gt-xs-45,[dir=rtl] .offset-gt-xs-45{margin-left:auto;margin-right:45%}.flex-offset-gt-xs-50,.offset-gt-xs-50{margin-left:50%}[dir=rtl] .flex-offset-gt-xs-50,[dir=rtl] .offset-gt-xs-50{margin-left:auto;margin-right:50%}.flex-offset-gt-xs-55,.offset-gt-xs-55{margin-left:55%}[dir=rtl] .flex-offset-gt-xs-55,[dir=rtl] .offset-gt-xs-55{margin-left:auto;margin-right:55%}.flex-offset-gt-xs-60,.offset-gt-xs-60{margin-left:60%}[dir=rtl] .flex-offset-gt-xs-60,[dir=rtl] .offset-gt-xs-60{margin-left:auto;margin-right:60%}.flex-offset-gt-xs-65,.offset-gt-xs-65{margin-left:65%}[dir=rtl] .flex-offset-gt-xs-65,[dir=rtl] .offset-gt-xs-65{margin-left:auto;margin-right:65%}.flex-offset-gt-xs-70,.offset-gt-xs-70{margin-left:70%}[dir=rtl] .flex-offset-gt-xs-70,[dir=rtl] .offset-gt-xs-70{margin-left:auto;margin-right:70%}.flex-offset-gt-xs-75,.offset-gt-xs-75{margin-left:75%}[dir=rtl] .flex-offset-gt-xs-75,[dir=rtl] .offset-gt-xs-75{margin-left:auto;margin-right:75%}.flex-offset-gt-xs-80,.offset-gt-xs-80{margin-left:80%}[dir=rtl] .flex-offset-gt-xs-80,[dir=rtl] .offset-gt-xs-80{margin-left:auto;margin-right:80%}.flex-offset-gt-xs-85,.offset-gt-xs-85{margin-left:85%}[dir=rtl] .flex-offset-gt-xs-85,[dir=rtl] .offset-gt-xs-85{margin-left:auto;margin-right:85%}.flex-offset-gt-xs-90,.offset-gt-xs-90{margin-left:90%}[dir=rtl] .flex-offset-gt-xs-90,[dir=rtl] .offset-gt-xs-90{margin-left:auto;margin-right:90%}.flex-offset-gt-xs-95,.offset-gt-xs-95{margin-left:95%}[dir=rtl] .flex-offset-gt-xs-95,[dir=rtl] .offset-gt-xs-95{margin-left:auto;margin-right:95%}.flex-offset-gt-xs-33,.offset-gt-xs-33{margin-left:calc(100% / 3)}.flex-offset-gt-xs-66,.offset-gt-xs-66{margin-left:calc(200% / 3)}[dir=rtl] .flex-offset-gt-xs-66,[dir=rtl] .offset-gt-xs-66{margin-left:auto;margin-right:calc(200% / 3)}.layout-align-gt-xs,.layout-align-gt-xs-start-stretch{justify-content:flex-start;align-content:stretch;align-items:stretch}.layout-align-gt-xs-start,.layout-align-gt-xs-start-center,.layout-align-gt-xs-start-end,.layout-align-gt-xs-start-start,.layout-align-gt-xs-start-stretch{justify-content:flex-start}.layout-align-gt-xs-center,.layout-align-gt-xs-center-center,.layout-align-gt-xs-center-end,.layout-align-gt-xs-center-start,.layout-align-gt-xs-center-stretch{justify-content:center}.layout-align-gt-xs-end,.layout-align-gt-xs-end-center,.layout-align-gt-xs-end-end,.layout-align-gt-xs-end-start,.layout-align-gt-xs-end-stretch{justify-content:flex-end}.layout-align-gt-xs-space-around,.layout-align-gt-xs-space-around-center,.layout-align-gt-xs-space-around-end,.layout-align-gt-xs-space-around-start,.layout-align-gt-xs-space-around-stretch{justify-content:space-around}.layout-align-gt-xs-space-between,.layout-align-gt-xs-space-between-center,.layout-align-gt-xs-space-between-end,.layout-align-gt-xs-space-between-start,.layout-align-gt-xs-space-between-stretch{justify-content:space-between}.layout-align-gt-xs-center-start,.layout-align-gt-xs-end-start,.layout-align-gt-xs-space-around-start,.layout-align-gt-xs-space-between-start,.layout-align-gt-xs-start-start{align-items:flex-start;align-content:flex-start}.layout-align-gt-xs-center-center,.layout-align-gt-xs-end-center,.layout-align-gt-xs-space-around-center,.layout-align-gt-xs-space-between-center,.layout-align-gt-xs-start-center{align-items:center;align-content:center;max-width:100%}.layout-align-gt-xs-center-center>*,.layout-align-gt-xs-end-center>*,.layout-align-gt-xs-space-around-center>*,.layout-align-gt-xs-space-between-center>*,.layout-align-gt-xs-start-center>*{max-width:100%;box-sizing:border-box}.layout-align-gt-xs-center-end,.layout-align-gt-xs-end-end,.layout-align-gt-xs-space-around-end,.layout-align-gt-xs-space-between-end,.layout-align-gt-xs-start-end{align-items:flex-end;align-content:flex-end}.layout-align-gt-xs-center-stretch,.layout-align-gt-xs-end-stretch,.layout-align-gt-xs-space-around-stretch,.layout-align-gt-xs-space-between-stretch,.layout-align-gt-xs-start-stretch{align-items:stretch;align-content:stretch}.flex-gt-xs{flex:1;box-sizing:border-box}.flex-gt-xs-grow{flex:1 1 100%;box-sizing:border-box}.flex-gt-xs-initial{flex:0 1 auto;box-sizing:border-box}.flex-gt-xs-auto{flex:1 1 auto;box-sizing:border-box}.flex-gt-xs-none{flex:0 0 auto;box-sizing:border-box}.flex-gt-xs-noshrink{flex:1 0 auto;box-sizing:border-box}.flex-gt-xs-nogrow{flex:0 1 auto;box-sizing:border-box}.flex-gt-xs-0{flex:1 1 0%;max-width:0%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-xs-0{flex:1 1 0%;max-width:0%;max-height:100%;box-sizing:border-box;min-width:0}.layout-column>.flex-gt-xs-0{flex:1 1 0%;max-width:100%;max-height:0%;box-sizing:border-box}.layout-row>.flex-gt-xs-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-xs-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-xs-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-xs-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-xs-row>.flex-gt-xs-0{flex:1 1 0%;max-width:0%;max-height:100%;box-sizing:border-box;min-width:0}.layout-gt-xs-column>.flex-gt-xs-0{flex:1 1 0%;max-width:100%;max-height:0%;box-sizing:border-box;min-height:0}.flex-gt-xs-5{flex:1 1 5%;max-width:5%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-xs-5{flex:1 1 5%;max-width:5%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-xs-5{flex:1 1 5%;max-width:100%;max-height:5%;box-sizing:border-box}.layout-row>.flex-gt-xs-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-xs-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-xs-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-xs-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-xs-row>.flex-gt-xs-5{flex:1 1 5%;max-width:5%;max-height:100%;box-sizing:border-box}.layout-gt-xs-column>.flex-gt-xs-5{flex:1 1 5%;max-width:100%;max-height:5%;box-sizing:border-box}.flex-gt-xs-10{flex:1 1 10%;max-width:10%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-xs-10{flex:1 1 10%;max-width:10%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-xs-10{flex:1 1 10%;max-width:100%;max-height:10%;box-sizing:border-box}.layout-row>.flex-gt-xs-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-xs-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-xs-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-xs-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-xs-row>.flex-gt-xs-10{flex:1 1 10%;max-width:10%;max-height:100%;box-sizing:border-box}.layout-gt-xs-column>.flex-gt-xs-10{flex:1 1 10%;max-width:100%;max-height:10%;box-sizing:border-box}.flex-gt-xs-15{flex:1 1 15%;max-width:15%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-xs-15{flex:1 1 15%;max-width:15%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-xs-15{flex:1 1 15%;max-width:100%;max-height:15%;box-sizing:border-box}.layout-row>.flex-gt-xs-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-xs-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-xs-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-xs-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-xs-row>.flex-gt-xs-15{flex:1 1 15%;max-width:15%;max-height:100%;box-sizing:border-box}.layout-gt-xs-column>.flex-gt-xs-15{flex:1 1 15%;max-width:100%;max-height:15%;box-sizing:border-box}.flex-gt-xs-20{flex:1 1 20%;max-width:20%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-xs-20{flex:1 1 20%;max-width:20%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-xs-20{flex:1 1 20%;max-width:100%;max-height:20%;box-sizing:border-box}.layout-row>.flex-gt-xs-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-xs-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-xs-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-xs-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-xs-row>.flex-gt-xs-20{flex:1 1 20%;max-width:20%;max-height:100%;box-sizing:border-box}.layout-gt-xs-column>.flex-gt-xs-20{flex:1 1 20%;max-width:100%;max-height:20%;box-sizing:border-box}.flex-gt-xs-25{flex:1 1 25%;max-width:25%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-xs-25{flex:1 1 25%;max-width:25%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-xs-25{flex:1 1 25%;max-width:100%;max-height:25%;box-sizing:border-box}.layout-row>.flex-gt-xs-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-xs-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-xs-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-xs-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-xs-row>.flex-gt-xs-25{flex:1 1 25%;max-width:25%;max-height:100%;box-sizing:border-box}.layout-gt-xs-column>.flex-gt-xs-25{flex:1 1 25%;max-width:100%;max-height:25%;box-sizing:border-box}.flex-gt-xs-30{flex:1 1 30%;max-width:30%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-xs-30{flex:1 1 30%;max-width:30%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-xs-30{flex:1 1 30%;max-width:100%;max-height:30%;box-sizing:border-box}.layout-row>.flex-gt-xs-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-xs-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-xs-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-xs-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-xs-row>.flex-gt-xs-30{flex:1 1 30%;max-width:30%;max-height:100%;box-sizing:border-box}.layout-gt-xs-column>.flex-gt-xs-30{flex:1 1 30%;max-width:100%;max-height:30%;box-sizing:border-box}.flex-gt-xs-35{flex:1 1 35%;max-width:35%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-xs-35{flex:1 1 35%;max-width:35%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-xs-35{flex:1 1 35%;max-width:100%;max-height:35%;box-sizing:border-box}.layout-row>.flex-gt-xs-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-xs-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-xs-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-xs-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-xs-row>.flex-gt-xs-35{flex:1 1 35%;max-width:35%;max-height:100%;box-sizing:border-box}.layout-gt-xs-column>.flex-gt-xs-35{flex:1 1 35%;max-width:100%;max-height:35%;box-sizing:border-box}.flex-gt-xs-40{flex:1 1 40%;max-width:40%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-xs-40{flex:1 1 40%;max-width:40%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-xs-40{flex:1 1 40%;max-width:100%;max-height:40%;box-sizing:border-box}.layout-row>.flex-gt-xs-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-xs-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-xs-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-xs-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-xs-row>.flex-gt-xs-40{flex:1 1 40%;max-width:40%;max-height:100%;box-sizing:border-box}.layout-gt-xs-column>.flex-gt-xs-40{flex:1 1 40%;max-width:100%;max-height:40%;box-sizing:border-box}.flex-gt-xs-45{flex:1 1 45%;max-width:45%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-xs-45{flex:1 1 45%;max-width:45%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-xs-45{flex:1 1 45%;max-width:100%;max-height:45%;box-sizing:border-box}.layout-row>.flex-gt-xs-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-xs-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-xs-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-xs-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-xs-row>.flex-gt-xs-45{flex:1 1 45%;max-width:45%;max-height:100%;box-sizing:border-box}.layout-gt-xs-column>.flex-gt-xs-45{flex:1 1 45%;max-width:100%;max-height:45%;box-sizing:border-box}.flex-gt-xs-50{flex:1 1 50%;max-width:50%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-xs-50{flex:1 1 50%;max-width:50%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-xs-50{flex:1 1 50%;max-width:100%;max-height:50%;box-sizing:border-box}.layout-row>.flex-gt-xs-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-xs-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-xs-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-xs-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-xs-row>.flex-gt-xs-50{flex:1 1 50%;max-width:50%;max-height:100%;box-sizing:border-box}.layout-gt-xs-column>.flex-gt-xs-50{flex:1 1 50%;max-width:100%;max-height:50%;box-sizing:border-box}.flex-gt-xs-55{flex:1 1 55%;max-width:55%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-xs-55{flex:1 1 55%;max-width:55%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-xs-55{flex:1 1 55%;max-width:100%;max-height:55%;box-sizing:border-box}.layout-row>.flex-gt-xs-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-xs-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-xs-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-xs-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-xs-row>.flex-gt-xs-55{flex:1 1 55%;max-width:55%;max-height:100%;box-sizing:border-box}.layout-gt-xs-column>.flex-gt-xs-55{flex:1 1 55%;max-width:100%;max-height:55%;box-sizing:border-box}.flex-gt-xs-60{flex:1 1 60%;max-width:60%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-xs-60{flex:1 1 60%;max-width:60%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-xs-60{flex:1 1 60%;max-width:100%;max-height:60%;box-sizing:border-box}.layout-row>.flex-gt-xs-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-xs-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-xs-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-xs-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-xs-row>.flex-gt-xs-60{flex:1 1 60%;max-width:60%;max-height:100%;box-sizing:border-box}.layout-gt-xs-column>.flex-gt-xs-60{flex:1 1 60%;max-width:100%;max-height:60%;box-sizing:border-box}.flex-gt-xs-65{flex:1 1 65%;max-width:65%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-xs-65{flex:1 1 65%;max-width:65%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-xs-65{flex:1 1 65%;max-width:100%;max-height:65%;box-sizing:border-box}.layout-row>.flex-gt-xs-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-xs-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-xs-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-xs-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-xs-row>.flex-gt-xs-65{flex:1 1 65%;max-width:65%;max-height:100%;box-sizing:border-box}.layout-gt-xs-column>.flex-gt-xs-65{flex:1 1 65%;max-width:100%;max-height:65%;box-sizing:border-box}.flex-gt-xs-70{flex:1 1 70%;max-width:70%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-xs-70{flex:1 1 70%;max-width:70%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-xs-70{flex:1 1 70%;max-width:100%;max-height:70%;box-sizing:border-box}.layout-row>.flex-gt-xs-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-xs-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-xs-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-xs-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-xs-row>.flex-gt-xs-70{flex:1 1 70%;max-width:70%;max-height:100%;box-sizing:border-box}.layout-gt-xs-column>.flex-gt-xs-70{flex:1 1 70%;max-width:100%;max-height:70%;box-sizing:border-box}.flex-gt-xs-75{flex:1 1 75%;max-width:75%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-xs-75{flex:1 1 75%;max-width:75%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-xs-75{flex:1 1 75%;max-width:100%;max-height:75%;box-sizing:border-box}.layout-row>.flex-gt-xs-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-xs-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-xs-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-xs-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-xs-row>.flex-gt-xs-75{flex:1 1 75%;max-width:75%;max-height:100%;box-sizing:border-box}.layout-gt-xs-column>.flex-gt-xs-75{flex:1 1 75%;max-width:100%;max-height:75%;box-sizing:border-box}.flex-gt-xs-80{flex:1 1 80%;max-width:80%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-xs-80{flex:1 1 80%;max-width:80%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-xs-80{flex:1 1 80%;max-width:100%;max-height:80%;box-sizing:border-box}.layout-row>.flex-gt-xs-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-xs-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-xs-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-xs-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-xs-row>.flex-gt-xs-80{flex:1 1 80%;max-width:80%;max-height:100%;box-sizing:border-box}.layout-gt-xs-column>.flex-gt-xs-80{flex:1 1 80%;max-width:100%;max-height:80%;box-sizing:border-box}.flex-gt-xs-85{flex:1 1 85%;max-width:85%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-xs-85{flex:1 1 85%;max-width:85%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-xs-85{flex:1 1 85%;max-width:100%;max-height:85%;box-sizing:border-box}.layout-row>.flex-gt-xs-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-xs-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-xs-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-xs-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-xs-row>.flex-gt-xs-85{flex:1 1 85%;max-width:85%;max-height:100%;box-sizing:border-box}.layout-gt-xs-column>.flex-gt-xs-85{flex:1 1 85%;max-width:100%;max-height:85%;box-sizing:border-box}.flex-gt-xs-90{flex:1 1 90%;max-width:90%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-xs-90{flex:1 1 90%;max-width:90%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-xs-90{flex:1 1 90%;max-width:100%;max-height:90%;box-sizing:border-box}.layout-row>.flex-gt-xs-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-xs-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-xs-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-xs-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-xs-row>.flex-gt-xs-90{flex:1 1 90%;max-width:90%;max-height:100%;box-sizing:border-box}.layout-gt-xs-column>.flex-gt-xs-90{flex:1 1 90%;max-width:100%;max-height:90%;box-sizing:border-box}.flex-gt-xs-95{flex:1 1 95%;max-width:95%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-xs-95{flex:1 1 95%;max-width:95%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-xs-95{flex:1 1 95%;max-width:100%;max-height:95%;box-sizing:border-box}.layout-row>.flex-gt-xs-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-xs-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-xs-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-xs-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-xs-row>.flex-gt-xs-95{flex:1 1 95%;max-width:95%;max-height:100%;box-sizing:border-box}.layout-gt-xs-column>.flex-gt-xs-95{flex:1 1 95%;max-width:100%;max-height:95%;box-sizing:border-box}.flex-gt-xs-100{flex:1 1 100%;max-width:100%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-xs-100{flex:1 1 100%;max-width:100%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-xs-100{flex:1 1 100%;max-width:100%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-xs-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-xs-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-xs-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-xs-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-xs-row>.flex-gt-xs-100{flex:1 1 100%;max-width:100%;max-height:100%;box-sizing:border-box}.layout-gt-xs-column>.flex-gt-xs-100{flex:1 1 100%;max-width:100%;max-height:100%;box-sizing:border-box}.layout-gt-xs-row>.flex-gt-xs-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-gt-xs-row>.flex-gt-xs-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-gt-xs-row>.flex{min-width:0}.layout-gt-xs-column>.flex-gt-xs-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-gt-xs-column>.flex-gt-xs-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-xs-column>.flex{min-height:0}.layout-gt-xs,.layout-gt-xs-column,.layout-gt-xs-row{box-sizing:border-box;display:-webkit-box;display:-webkit-flex;display:-moz-box;display:-ms-flexbox;display:flex}.layout-gt-xs-column{flex-direction:column}.layout-gt-xs-row{flex-direction:row}}@media (min-width:600px) and (max-width:959px){.hide-gt-xs:not(.show-gt-xs):not(.show-sm):not(.show),.hide:not(.show-gt-xs):not(.show-sm):not(.show){display:none}.hide-sm:not(.show-gt-xs):not(.show-sm):not(.show){display:none}.flex-order-sm--20{order:-20}.flex-order-sm--19{order:-19}.flex-order-sm--18{order:-18}.flex-order-sm--17{order:-17}.flex-order-sm--16{order:-16}.flex-order-sm--15{order:-15}.flex-order-sm--14{order:-14}.flex-order-sm--13{order:-13}.flex-order-sm--12{order:-12}.flex-order-sm--11{order:-11}.flex-order-sm--10{order:-10}.flex-order-sm--9{order:-9}.flex-order-sm--8{order:-8}.flex-order-sm--7{order:-7}.flex-order-sm--6{order:-6}.flex-order-sm--5{order:-5}.flex-order-sm--4{order:-4}.flex-order-sm--3{order:-3}.flex-order-sm--2{order:-2}.flex-order-sm--1{order:-1}.flex-order-sm-0{order:0}.flex-order-sm-1{order:1}.flex-order-sm-2{order:2}.flex-order-sm-3{order:3}.flex-order-sm-4{order:4}.flex-order-sm-5{order:5}.flex-order-sm-6{order:6}.flex-order-sm-7{order:7}.flex-order-sm-8{order:8}.flex-order-sm-9{order:9}.flex-order-sm-10{order:10}.flex-order-sm-11{order:11}.flex-order-sm-12{order:12}.flex-order-sm-13{order:13}.flex-order-sm-14{order:14}.flex-order-sm-15{order:15}.flex-order-sm-16{order:16}.flex-order-sm-17{order:17}.flex-order-sm-18{order:18}.flex-order-sm-19{order:19}.flex-order-sm-20{order:20}.flex-offset-sm-0,.offset-sm-0{margin-left:0}[dir=rtl] .flex-offset-sm-0,[dir=rtl] .offset-sm-0{margin-left:auto;margin-right:0}.flex-offset-sm-5,.offset-sm-5{margin-left:5%}[dir=rtl] .flex-offset-sm-5,[dir=rtl] .offset-sm-5{margin-left:auto;margin-right:5%}.flex-offset-sm-10,.offset-sm-10{margin-left:10%}[dir=rtl] .flex-offset-sm-10,[dir=rtl] .offset-sm-10{margin-left:auto;margin-right:10%}.flex-offset-sm-15,.offset-sm-15{margin-left:15%}[dir=rtl] .flex-offset-sm-15,[dir=rtl] .offset-sm-15{margin-left:auto;margin-right:15%}.flex-offset-sm-20,.offset-sm-20{margin-left:20%}[dir=rtl] .flex-offset-sm-20,[dir=rtl] .offset-sm-20{margin-left:auto;margin-right:20%}.flex-offset-sm-25,.offset-sm-25{margin-left:25%}[dir=rtl] .flex-offset-sm-25,[dir=rtl] .offset-sm-25{margin-left:auto;margin-right:25%}.flex-offset-sm-30,.offset-sm-30{margin-left:30%}[dir=rtl] .flex-offset-sm-30,[dir=rtl] .offset-sm-30{margin-left:auto;margin-right:30%}.flex-offset-sm-35,.offset-sm-35{margin-left:35%}[dir=rtl] .flex-offset-sm-35,[dir=rtl] .offset-sm-35{margin-left:auto;margin-right:35%}.flex-offset-sm-40,.offset-sm-40{margin-left:40%}[dir=rtl] .flex-offset-sm-40,[dir=rtl] .offset-sm-40{margin-left:auto;margin-right:40%}.flex-offset-sm-45,.offset-sm-45{margin-left:45%}[dir=rtl] .flex-offset-sm-45,[dir=rtl] .offset-sm-45{margin-left:auto;margin-right:45%}.flex-offset-sm-50,.offset-sm-50{margin-left:50%}[dir=rtl] .flex-offset-sm-50,[dir=rtl] .offset-sm-50{margin-left:auto;margin-right:50%}.flex-offset-sm-55,.offset-sm-55{margin-left:55%}[dir=rtl] .flex-offset-sm-55,[dir=rtl] .offset-sm-55{margin-left:auto;margin-right:55%}.flex-offset-sm-60,.offset-sm-60{margin-left:60%}[dir=rtl] .flex-offset-sm-60,[dir=rtl] .offset-sm-60{margin-left:auto;margin-right:60%}.flex-offset-sm-65,.offset-sm-65{margin-left:65%}[dir=rtl] .flex-offset-sm-65,[dir=rtl] .offset-sm-65{margin-left:auto;margin-right:65%}.flex-offset-sm-70,.offset-sm-70{margin-left:70%}[dir=rtl] .flex-offset-sm-70,[dir=rtl] .offset-sm-70{margin-left:auto;margin-right:70%}.flex-offset-sm-75,.offset-sm-75{margin-left:75%}[dir=rtl] .flex-offset-sm-75,[dir=rtl] .offset-sm-75{margin-left:auto;margin-right:75%}.flex-offset-sm-80,.offset-sm-80{margin-left:80%}[dir=rtl] .flex-offset-sm-80,[dir=rtl] .offset-sm-80{margin-left:auto;margin-right:80%}.flex-offset-sm-85,.offset-sm-85{margin-left:85%}[dir=rtl] .flex-offset-sm-85,[dir=rtl] .offset-sm-85{margin-left:auto;margin-right:85%}.flex-offset-sm-90,.offset-sm-90{margin-left:90%}[dir=rtl] .flex-offset-sm-90,[dir=rtl] .offset-sm-90{margin-left:auto;margin-right:90%}.flex-offset-sm-95,.offset-sm-95{margin-left:95%}[dir=rtl] .flex-offset-sm-95,[dir=rtl] .offset-sm-95{margin-left:auto;margin-right:95%}.flex-offset-sm-33,.offset-sm-33{margin-left:calc(100% / 3)}.flex-offset-sm-66,.offset-sm-66{margin-left:calc(200% / 3)}[dir=rtl] .flex-offset-sm-66,[dir=rtl] .offset-sm-66{margin-left:auto;margin-right:calc(200% / 3)}.layout-align-sm,.layout-align-sm-start-stretch{justify-content:flex-start;align-content:stretch;align-items:stretch}.layout-align-sm-start,.layout-align-sm-start-center,.layout-align-sm-start-end,.layout-align-sm-start-start,.layout-align-sm-start-stretch{justify-content:flex-start}.layout-align-sm-center,.layout-align-sm-center-center,.layout-align-sm-center-end,.layout-align-sm-center-start,.layout-align-sm-center-stretch{justify-content:center}.layout-align-sm-end,.layout-align-sm-end-center,.layout-align-sm-end-end,.layout-align-sm-end-start,.layout-align-sm-end-stretch{justify-content:flex-end}.layout-align-sm-space-around,.layout-align-sm-space-around-center,.layout-align-sm-space-around-end,.layout-align-sm-space-around-start,.layout-align-sm-space-around-stretch{justify-content:space-around}.layout-align-sm-space-between,.layout-align-sm-space-between-center,.layout-align-sm-space-between-end,.layout-align-sm-space-between-start,.layout-align-sm-space-between-stretch{justify-content:space-between}.layout-align-sm-center-start,.layout-align-sm-end-start,.layout-align-sm-space-around-start,.layout-align-sm-space-between-start,.layout-align-sm-start-start{align-items:flex-start;align-content:flex-start}.layout-align-sm-center-center,.layout-align-sm-end-center,.layout-align-sm-space-around-center,.layout-align-sm-space-between-center,.layout-align-sm-start-center{align-items:center;align-content:center;max-width:100%}.layout-align-sm-center-center>*,.layout-align-sm-end-center>*,.layout-align-sm-space-around-center>*,.layout-align-sm-space-between-center>*,.layout-align-sm-start-center>*{max-width:100%;box-sizing:border-box}.layout-align-sm-center-end,.layout-align-sm-end-end,.layout-align-sm-space-around-end,.layout-align-sm-space-between-end,.layout-align-sm-start-end{align-items:flex-end;align-content:flex-end}.layout-align-sm-center-stretch,.layout-align-sm-end-stretch,.layout-align-sm-space-around-stretch,.layout-align-sm-space-between-stretch,.layout-align-sm-start-stretch{align-items:stretch;align-content:stretch}.flex-sm{flex:1;box-sizing:border-box}.flex-sm-grow{flex:1 1 100%;box-sizing:border-box}.flex-sm-initial{flex:0 1 auto;box-sizing:border-box}.flex-sm-auto{flex:1 1 auto;box-sizing:border-box}.flex-sm-none{flex:0 0 auto;box-sizing:border-box}.flex-sm-noshrink{flex:1 0 auto;box-sizing:border-box}.flex-sm-nogrow{flex:0 1 auto;box-sizing:border-box}.flex-sm-0{flex:1 1 0%;max-width:0%;max-height:100%;box-sizing:border-box}.layout-row>.flex-sm-0{flex:1 1 0%;max-width:0%;max-height:100%;box-sizing:border-box;min-width:0}.layout-column>.flex-sm-0{flex:1 1 0%;max-width:100%;max-height:0%;box-sizing:border-box}.layout-row>.flex-sm-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-sm-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-sm-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-sm-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-sm-row>.flex-sm-0{flex:1 1 0%;max-width:0%;max-height:100%;box-sizing:border-box;min-width:0}.layout-sm-column>.flex-sm-0{flex:1 1 0%;max-width:100%;max-height:0%;box-sizing:border-box;min-height:0}.flex-sm-5{flex:1 1 5%;max-width:5%;max-height:100%;box-sizing:border-box}.layout-row>.flex-sm-5{flex:1 1 5%;max-width:5%;max-height:100%;box-sizing:border-box}.layout-column>.flex-sm-5{flex:1 1 5%;max-width:100%;max-height:5%;box-sizing:border-box}.layout-row>.flex-sm-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-sm-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-sm-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-sm-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-sm-row>.flex-sm-5{flex:1 1 5%;max-width:5%;max-height:100%;box-sizing:border-box}.layout-sm-column>.flex-sm-5{flex:1 1 5%;max-width:100%;max-height:5%;box-sizing:border-box}.flex-sm-10{flex:1 1 10%;max-width:10%;max-height:100%;box-sizing:border-box}.layout-row>.flex-sm-10{flex:1 1 10%;max-width:10%;max-height:100%;box-sizing:border-box}.layout-column>.flex-sm-10{flex:1 1 10%;max-width:100%;max-height:10%;box-sizing:border-box}.layout-row>.flex-sm-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-sm-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-sm-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-sm-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-sm-row>.flex-sm-10{flex:1 1 10%;max-width:10%;max-height:100%;box-sizing:border-box}.layout-sm-column>.flex-sm-10{flex:1 1 10%;max-width:100%;max-height:10%;box-sizing:border-box}.flex-sm-15{flex:1 1 15%;max-width:15%;max-height:100%;box-sizing:border-box}.layout-row>.flex-sm-15{flex:1 1 15%;max-width:15%;max-height:100%;box-sizing:border-box}.layout-column>.flex-sm-15{flex:1 1 15%;max-width:100%;max-height:15%;box-sizing:border-box}.layout-row>.flex-sm-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-sm-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-sm-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-sm-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-sm-row>.flex-sm-15{flex:1 1 15%;max-width:15%;max-height:100%;box-sizing:border-box}.layout-sm-column>.flex-sm-15{flex:1 1 15%;max-width:100%;max-height:15%;box-sizing:border-box}.flex-sm-20{flex:1 1 20%;max-width:20%;max-height:100%;box-sizing:border-box}.layout-row>.flex-sm-20{flex:1 1 20%;max-width:20%;max-height:100%;box-sizing:border-box}.layout-column>.flex-sm-20{flex:1 1 20%;max-width:100%;max-height:20%;box-sizing:border-box}.layout-row>.flex-sm-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-sm-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-sm-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-sm-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-sm-row>.flex-sm-20{flex:1 1 20%;max-width:20%;max-height:100%;box-sizing:border-box}.layout-sm-column>.flex-sm-20{flex:1 1 20%;max-width:100%;max-height:20%;box-sizing:border-box}.flex-sm-25{flex:1 1 25%;max-width:25%;max-height:100%;box-sizing:border-box}.layout-row>.flex-sm-25{flex:1 1 25%;max-width:25%;max-height:100%;box-sizing:border-box}.layout-column>.flex-sm-25{flex:1 1 25%;max-width:100%;max-height:25%;box-sizing:border-box}.layout-row>.flex-sm-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-sm-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-sm-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-sm-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-sm-row>.flex-sm-25{flex:1 1 25%;max-width:25%;max-height:100%;box-sizing:border-box}.layout-sm-column>.flex-sm-25{flex:1 1 25%;max-width:100%;max-height:25%;box-sizing:border-box}.flex-sm-30{flex:1 1 30%;max-width:30%;max-height:100%;box-sizing:border-box}.layout-row>.flex-sm-30{flex:1 1 30%;max-width:30%;max-height:100%;box-sizing:border-box}.layout-column>.flex-sm-30{flex:1 1 30%;max-width:100%;max-height:30%;box-sizing:border-box}.layout-row>.flex-sm-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-sm-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-sm-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-sm-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-sm-row>.flex-sm-30{flex:1 1 30%;max-width:30%;max-height:100%;box-sizing:border-box}.layout-sm-column>.flex-sm-30{flex:1 1 30%;max-width:100%;max-height:30%;box-sizing:border-box}.flex-sm-35{flex:1 1 35%;max-width:35%;max-height:100%;box-sizing:border-box}.layout-row>.flex-sm-35{flex:1 1 35%;max-width:35%;max-height:100%;box-sizing:border-box}.layout-column>.flex-sm-35{flex:1 1 35%;max-width:100%;max-height:35%;box-sizing:border-box}.layout-row>.flex-sm-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-sm-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-sm-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-sm-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-sm-row>.flex-sm-35{flex:1 1 35%;max-width:35%;max-height:100%;box-sizing:border-box}.layout-sm-column>.flex-sm-35{flex:1 1 35%;max-width:100%;max-height:35%;box-sizing:border-box}.flex-sm-40{flex:1 1 40%;max-width:40%;max-height:100%;box-sizing:border-box}.layout-row>.flex-sm-40{flex:1 1 40%;max-width:40%;max-height:100%;box-sizing:border-box}.layout-column>.flex-sm-40{flex:1 1 40%;max-width:100%;max-height:40%;box-sizing:border-box}.layout-row>.flex-sm-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-sm-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-sm-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-sm-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-sm-row>.flex-sm-40{flex:1 1 40%;max-width:40%;max-height:100%;box-sizing:border-box}.layout-sm-column>.flex-sm-40{flex:1 1 40%;max-width:100%;max-height:40%;box-sizing:border-box}.flex-sm-45{flex:1 1 45%;max-width:45%;max-height:100%;box-sizing:border-box}.layout-row>.flex-sm-45{flex:1 1 45%;max-width:45%;max-height:100%;box-sizing:border-box}.layout-column>.flex-sm-45{flex:1 1 45%;max-width:100%;max-height:45%;box-sizing:border-box}.layout-row>.flex-sm-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-sm-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-sm-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-sm-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-sm-row>.flex-sm-45{flex:1 1 45%;max-width:45%;max-height:100%;box-sizing:border-box}.layout-sm-column>.flex-sm-45{flex:1 1 45%;max-width:100%;max-height:45%;box-sizing:border-box}.flex-sm-50{flex:1 1 50%;max-width:50%;max-height:100%;box-sizing:border-box}.layout-row>.flex-sm-50{flex:1 1 50%;max-width:50%;max-height:100%;box-sizing:border-box}.layout-column>.flex-sm-50{flex:1 1 50%;max-width:100%;max-height:50%;box-sizing:border-box}.layout-row>.flex-sm-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-sm-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-sm-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-sm-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-sm-row>.flex-sm-50{flex:1 1 50%;max-width:50%;max-height:100%;box-sizing:border-box}.layout-sm-column>.flex-sm-50{flex:1 1 50%;max-width:100%;max-height:50%;box-sizing:border-box}.flex-sm-55{flex:1 1 55%;max-width:55%;max-height:100%;box-sizing:border-box}.layout-row>.flex-sm-55{flex:1 1 55%;max-width:55%;max-height:100%;box-sizing:border-box}.layout-column>.flex-sm-55{flex:1 1 55%;max-width:100%;max-height:55%;box-sizing:border-box}.layout-row>.flex-sm-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-sm-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-sm-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-sm-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-sm-row>.flex-sm-55{flex:1 1 55%;max-width:55%;max-height:100%;box-sizing:border-box}.layout-sm-column>.flex-sm-55{flex:1 1 55%;max-width:100%;max-height:55%;box-sizing:border-box}.flex-sm-60{flex:1 1 60%;max-width:60%;max-height:100%;box-sizing:border-box}.layout-row>.flex-sm-60{flex:1 1 60%;max-width:60%;max-height:100%;box-sizing:border-box}.layout-column>.flex-sm-60{flex:1 1 60%;max-width:100%;max-height:60%;box-sizing:border-box}.layout-row>.flex-sm-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-sm-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-sm-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-sm-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-sm-row>.flex-sm-60{flex:1 1 60%;max-width:60%;max-height:100%;box-sizing:border-box}.layout-sm-column>.flex-sm-60{flex:1 1 60%;max-width:100%;max-height:60%;box-sizing:border-box}.flex-sm-65{flex:1 1 65%;max-width:65%;max-height:100%;box-sizing:border-box}.layout-row>.flex-sm-65{flex:1 1 65%;max-width:65%;max-height:100%;box-sizing:border-box}.layout-column>.flex-sm-65{flex:1 1 65%;max-width:100%;max-height:65%;box-sizing:border-box}.layout-row>.flex-sm-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-sm-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-sm-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-sm-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-sm-row>.flex-sm-65{flex:1 1 65%;max-width:65%;max-height:100%;box-sizing:border-box}.layout-sm-column>.flex-sm-65{flex:1 1 65%;max-width:100%;max-height:65%;box-sizing:border-box}.flex-sm-70{flex:1 1 70%;max-width:70%;max-height:100%;box-sizing:border-box}.layout-row>.flex-sm-70{flex:1 1 70%;max-width:70%;max-height:100%;box-sizing:border-box}.layout-column>.flex-sm-70{flex:1 1 70%;max-width:100%;max-height:70%;box-sizing:border-box}.layout-row>.flex-sm-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-sm-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-sm-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-sm-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-sm-row>.flex-sm-70{flex:1 1 70%;max-width:70%;max-height:100%;box-sizing:border-box}.layout-sm-column>.flex-sm-70{flex:1 1 70%;max-width:100%;max-height:70%;box-sizing:border-box}.flex-sm-75{flex:1 1 75%;max-width:75%;max-height:100%;box-sizing:border-box}.layout-row>.flex-sm-75{flex:1 1 75%;max-width:75%;max-height:100%;box-sizing:border-box}.layout-column>.flex-sm-75{flex:1 1 75%;max-width:100%;max-height:75%;box-sizing:border-box}.layout-row>.flex-sm-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-sm-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-sm-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-sm-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-sm-row>.flex-sm-75{flex:1 1 75%;max-width:75%;max-height:100%;box-sizing:border-box}.layout-sm-column>.flex-sm-75{flex:1 1 75%;max-width:100%;max-height:75%;box-sizing:border-box}.flex-sm-80{flex:1 1 80%;max-width:80%;max-height:100%;box-sizing:border-box}.layout-row>.flex-sm-80{flex:1 1 80%;max-width:80%;max-height:100%;box-sizing:border-box}.layout-column>.flex-sm-80{flex:1 1 80%;max-width:100%;max-height:80%;box-sizing:border-box}.layout-row>.flex-sm-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-sm-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-sm-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-sm-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-sm-row>.flex-sm-80{flex:1 1 80%;max-width:80%;max-height:100%;box-sizing:border-box}.layout-sm-column>.flex-sm-80{flex:1 1 80%;max-width:100%;max-height:80%;box-sizing:border-box}.flex-sm-85{flex:1 1 85%;max-width:85%;max-height:100%;box-sizing:border-box}.layout-row>.flex-sm-85{flex:1 1 85%;max-width:85%;max-height:100%;box-sizing:border-box}.layout-column>.flex-sm-85{flex:1 1 85%;max-width:100%;max-height:85%;box-sizing:border-box}.layout-row>.flex-sm-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-sm-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-sm-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-sm-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-sm-row>.flex-sm-85{flex:1 1 85%;max-width:85%;max-height:100%;box-sizing:border-box}.layout-sm-column>.flex-sm-85{flex:1 1 85%;max-width:100%;max-height:85%;box-sizing:border-box}.flex-sm-90{flex:1 1 90%;max-width:90%;max-height:100%;box-sizing:border-box}.layout-row>.flex-sm-90{flex:1 1 90%;max-width:90%;max-height:100%;box-sizing:border-box}.layout-column>.flex-sm-90{flex:1 1 90%;max-width:100%;max-height:90%;box-sizing:border-box}.layout-row>.flex-sm-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-sm-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-sm-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-sm-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-sm-row>.flex-sm-90{flex:1 1 90%;max-width:90%;max-height:100%;box-sizing:border-box}.layout-sm-column>.flex-sm-90{flex:1 1 90%;max-width:100%;max-height:90%;box-sizing:border-box}.flex-sm-95{flex:1 1 95%;max-width:95%;max-height:100%;box-sizing:border-box}.layout-row>.flex-sm-95{flex:1 1 95%;max-width:95%;max-height:100%;box-sizing:border-box}.layout-column>.flex-sm-95{flex:1 1 95%;max-width:100%;max-height:95%;box-sizing:border-box}.layout-row>.flex-sm-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-sm-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-sm-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-sm-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-sm-row>.flex-sm-95{flex:1 1 95%;max-width:95%;max-height:100%;box-sizing:border-box}.layout-sm-column>.flex-sm-95{flex:1 1 95%;max-width:100%;max-height:95%;box-sizing:border-box}.flex-sm-100{flex:1 1 100%;max-width:100%;max-height:100%;box-sizing:border-box}.layout-row>.flex-sm-100{flex:1 1 100%;max-width:100%;max-height:100%;box-sizing:border-box}.layout-column>.flex-sm-100{flex:1 1 100%;max-width:100%;max-height:100%;box-sizing:border-box}.layout-row>.flex-sm-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-sm-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-sm-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-sm-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-sm-row>.flex-sm-100{flex:1 1 100%;max-width:100%;max-height:100%;box-sizing:border-box}.layout-sm-column>.flex-sm-100{flex:1 1 100%;max-width:100%;max-height:100%;box-sizing:border-box}.layout-sm-row>.flex-sm-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-sm-row>.flex-sm-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-sm-row>.flex{min-width:0}.layout-sm-column>.flex-sm-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-sm-column>.flex-sm-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-sm-column>.flex{min-height:0}.layout-sm,.layout-sm-column,.layout-sm-row{box-sizing:border-box;display:-webkit-box;display:-webkit-flex;display:-moz-box;display:-ms-flexbox;display:flex}.layout-sm-column{flex-direction:column}.layout-sm-row{flex-direction:row}}@media (min-width:960px){.flex-order-gt-sm--20{order:-20}.flex-order-gt-sm--19{order:-19}.flex-order-gt-sm--18{order:-18}.flex-order-gt-sm--17{order:-17}.flex-order-gt-sm--16{order:-16}.flex-order-gt-sm--15{order:-15}.flex-order-gt-sm--14{order:-14}.flex-order-gt-sm--13{order:-13}.flex-order-gt-sm--12{order:-12}.flex-order-gt-sm--11{order:-11}.flex-order-gt-sm--10{order:-10}.flex-order-gt-sm--9{order:-9}.flex-order-gt-sm--8{order:-8}.flex-order-gt-sm--7{order:-7}.flex-order-gt-sm--6{order:-6}.flex-order-gt-sm--5{order:-5}.flex-order-gt-sm--4{order:-4}.flex-order-gt-sm--3{order:-3}.flex-order-gt-sm--2{order:-2}.flex-order-gt-sm--1{order:-1}.flex-order-gt-sm-0{order:0}.flex-order-gt-sm-1{order:1}.flex-order-gt-sm-2{order:2}.flex-order-gt-sm-3{order:3}.flex-order-gt-sm-4{order:4}.flex-order-gt-sm-5{order:5}.flex-order-gt-sm-6{order:6}.flex-order-gt-sm-7{order:7}.flex-order-gt-sm-8{order:8}.flex-order-gt-sm-9{order:9}.flex-order-gt-sm-10{order:10}.flex-order-gt-sm-11{order:11}.flex-order-gt-sm-12{order:12}.flex-order-gt-sm-13{order:13}.flex-order-gt-sm-14{order:14}.flex-order-gt-sm-15{order:15}.flex-order-gt-sm-16{order:16}.flex-order-gt-sm-17{order:17}.flex-order-gt-sm-18{order:18}.flex-order-gt-sm-19{order:19}.flex-order-gt-sm-20{order:20}.flex-offset-gt-sm-0,.offset-gt-sm-0{margin-left:0}[dir=rtl] .flex-offset-gt-sm-0,[dir=rtl] .offset-gt-sm-0{margin-left:auto;margin-right:0}.flex-offset-gt-sm-5,.offset-gt-sm-5{margin-left:5%}[dir=rtl] .flex-offset-gt-sm-5,[dir=rtl] .offset-gt-sm-5{margin-left:auto;margin-right:5%}.flex-offset-gt-sm-10,.offset-gt-sm-10{margin-left:10%}[dir=rtl] .flex-offset-gt-sm-10,[dir=rtl] .offset-gt-sm-10{margin-left:auto;margin-right:10%}.flex-offset-gt-sm-15,.offset-gt-sm-15{margin-left:15%}[dir=rtl] .flex-offset-gt-sm-15,[dir=rtl] .offset-gt-sm-15{margin-left:auto;margin-right:15%}.flex-offset-gt-sm-20,.offset-gt-sm-20{margin-left:20%}[dir=rtl] .flex-offset-gt-sm-20,[dir=rtl] .offset-gt-sm-20{margin-left:auto;margin-right:20%}.flex-offset-gt-sm-25,.offset-gt-sm-25{margin-left:25%}[dir=rtl] .flex-offset-gt-sm-25,[dir=rtl] .offset-gt-sm-25{margin-left:auto;margin-right:25%}.flex-offset-gt-sm-30,.offset-gt-sm-30{margin-left:30%}[dir=rtl] .flex-offset-gt-sm-30,[dir=rtl] .offset-gt-sm-30{margin-left:auto;margin-right:30%}.flex-offset-gt-sm-35,.offset-gt-sm-35{margin-left:35%}[dir=rtl] .flex-offset-gt-sm-35,[dir=rtl] .offset-gt-sm-35{margin-left:auto;margin-right:35%}.flex-offset-gt-sm-40,.offset-gt-sm-40{margin-left:40%}[dir=rtl] .flex-offset-gt-sm-40,[dir=rtl] .offset-gt-sm-40{margin-left:auto;margin-right:40%}.flex-offset-gt-sm-45,.offset-gt-sm-45{margin-left:45%}[dir=rtl] .flex-offset-gt-sm-45,[dir=rtl] .offset-gt-sm-45{margin-left:auto;margin-right:45%}.flex-offset-gt-sm-50,.offset-gt-sm-50{margin-left:50%}[dir=rtl] .flex-offset-gt-sm-50,[dir=rtl] .offset-gt-sm-50{margin-left:auto;margin-right:50%}.flex-offset-gt-sm-55,.offset-gt-sm-55{margin-left:55%}[dir=rtl] .flex-offset-gt-sm-55,[dir=rtl] .offset-gt-sm-55{margin-left:auto;margin-right:55%}.flex-offset-gt-sm-60,.offset-gt-sm-60{margin-left:60%}[dir=rtl] .flex-offset-gt-sm-60,[dir=rtl] .offset-gt-sm-60{margin-left:auto;margin-right:60%}.flex-offset-gt-sm-65,.offset-gt-sm-65{margin-left:65%}[dir=rtl] .flex-offset-gt-sm-65,[dir=rtl] .offset-gt-sm-65{margin-left:auto;margin-right:65%}.flex-offset-gt-sm-70,.offset-gt-sm-70{margin-left:70%}[dir=rtl] .flex-offset-gt-sm-70,[dir=rtl] .offset-gt-sm-70{margin-left:auto;margin-right:70%}.flex-offset-gt-sm-75,.offset-gt-sm-75{margin-left:75%}[dir=rtl] .flex-offset-gt-sm-75,[dir=rtl] .offset-gt-sm-75{margin-left:auto;margin-right:75%}.flex-offset-gt-sm-80,.offset-gt-sm-80{margin-left:80%}[dir=rtl] .flex-offset-gt-sm-80,[dir=rtl] .offset-gt-sm-80{margin-left:auto;margin-right:80%}.flex-offset-gt-sm-85,.offset-gt-sm-85{margin-left:85%}[dir=rtl] .flex-offset-gt-sm-85,[dir=rtl] .offset-gt-sm-85{margin-left:auto;margin-right:85%}.flex-offset-gt-sm-90,.offset-gt-sm-90{margin-left:90%}[dir=rtl] .flex-offset-gt-sm-90,[dir=rtl] .offset-gt-sm-90{margin-left:auto;margin-right:90%}.flex-offset-gt-sm-95,.offset-gt-sm-95{margin-left:95%}[dir=rtl] .flex-offset-gt-sm-95,[dir=rtl] .offset-gt-sm-95{margin-left:auto;margin-right:95%}.flex-offset-gt-sm-33,.offset-gt-sm-33{margin-left:calc(100% / 3)}.flex-offset-gt-sm-66,.offset-gt-sm-66{margin-left:calc(200% / 3)}[dir=rtl] .flex-offset-gt-sm-66,[dir=rtl] .offset-gt-sm-66{margin-left:auto;margin-right:calc(200% / 3)}.layout-align-gt-sm,.layout-align-gt-sm-start-stretch{justify-content:flex-start;align-content:stretch;align-items:stretch}.layout-align-gt-sm-start,.layout-align-gt-sm-start-center,.layout-align-gt-sm-start-end,.layout-align-gt-sm-start-start,.layout-align-gt-sm-start-stretch{justify-content:flex-start}.layout-align-gt-sm-center,.layout-align-gt-sm-center-center,.layout-align-gt-sm-center-end,.layout-align-gt-sm-center-start,.layout-align-gt-sm-center-stretch{justify-content:center}.layout-align-gt-sm-end,.layout-align-gt-sm-end-center,.layout-align-gt-sm-end-end,.layout-align-gt-sm-end-start,.layout-align-gt-sm-end-stretch{justify-content:flex-end}.layout-align-gt-sm-space-around,.layout-align-gt-sm-space-around-center,.layout-align-gt-sm-space-around-end,.layout-align-gt-sm-space-around-start,.layout-align-gt-sm-space-around-stretch{justify-content:space-around}.layout-align-gt-sm-space-between,.layout-align-gt-sm-space-between-center,.layout-align-gt-sm-space-between-end,.layout-align-gt-sm-space-between-start,.layout-align-gt-sm-space-between-stretch{justify-content:space-between}.layout-align-gt-sm-center-start,.layout-align-gt-sm-end-start,.layout-align-gt-sm-space-around-start,.layout-align-gt-sm-space-between-start,.layout-align-gt-sm-start-start{align-items:flex-start;align-content:flex-start}.layout-align-gt-sm-center-center,.layout-align-gt-sm-end-center,.layout-align-gt-sm-space-around-center,.layout-align-gt-sm-space-between-center,.layout-align-gt-sm-start-center{align-items:center;align-content:center;max-width:100%}.layout-align-gt-sm-center-center>*,.layout-align-gt-sm-end-center>*,.layout-align-gt-sm-space-around-center>*,.layout-align-gt-sm-space-between-center>*,.layout-align-gt-sm-start-center>*{max-width:100%;box-sizing:border-box}.layout-align-gt-sm-center-end,.layout-align-gt-sm-end-end,.layout-align-gt-sm-space-around-end,.layout-align-gt-sm-space-between-end,.layout-align-gt-sm-start-end{align-items:flex-end;align-content:flex-end}.layout-align-gt-sm-center-stretch,.layout-align-gt-sm-end-stretch,.layout-align-gt-sm-space-around-stretch,.layout-align-gt-sm-space-between-stretch,.layout-align-gt-sm-start-stretch{align-items:stretch;align-content:stretch}.flex-gt-sm{flex:1;box-sizing:border-box}.flex-gt-sm-grow{flex:1 1 100%;box-sizing:border-box}.flex-gt-sm-initial{flex:0 1 auto;box-sizing:border-box}.flex-gt-sm-auto{flex:1 1 auto;box-sizing:border-box}.flex-gt-sm-none{flex:0 0 auto;box-sizing:border-box}.flex-gt-sm-noshrink{flex:1 0 auto;box-sizing:border-box}.flex-gt-sm-nogrow{flex:0 1 auto;box-sizing:border-box}.flex-gt-sm-0{flex:1 1 0%;max-width:0%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-sm-0{flex:1 1 0%;max-width:0%;max-height:100%;box-sizing:border-box;min-width:0}.layout-column>.flex-gt-sm-0{flex:1 1 0%;max-width:100%;max-height:0%;box-sizing:border-box}.layout-row>.flex-gt-sm-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-sm-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-sm-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-sm-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-sm-row>.flex-gt-sm-0{flex:1 1 0%;max-width:0%;max-height:100%;box-sizing:border-box;min-width:0}.layout-gt-sm-column>.flex-gt-sm-0{flex:1 1 0%;max-width:100%;max-height:0%;box-sizing:border-box;min-height:0}.flex-gt-sm-5{flex:1 1 5%;max-width:5%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-sm-5{flex:1 1 5%;max-width:5%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-sm-5{flex:1 1 5%;max-width:100%;max-height:5%;box-sizing:border-box}.layout-row>.flex-gt-sm-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-sm-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-sm-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-sm-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-sm-row>.flex-gt-sm-5{flex:1 1 5%;max-width:5%;max-height:100%;box-sizing:border-box}.layout-gt-sm-column>.flex-gt-sm-5{flex:1 1 5%;max-width:100%;max-height:5%;box-sizing:border-box}.flex-gt-sm-10{flex:1 1 10%;max-width:10%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-sm-10{flex:1 1 10%;max-width:10%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-sm-10{flex:1 1 10%;max-width:100%;max-height:10%;box-sizing:border-box}.layout-row>.flex-gt-sm-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-sm-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-sm-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-sm-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-sm-row>.flex-gt-sm-10{flex:1 1 10%;max-width:10%;max-height:100%;box-sizing:border-box}.layout-gt-sm-column>.flex-gt-sm-10{flex:1 1 10%;max-width:100%;max-height:10%;box-sizing:border-box}.flex-gt-sm-15{flex:1 1 15%;max-width:15%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-sm-15{flex:1 1 15%;max-width:15%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-sm-15{flex:1 1 15%;max-width:100%;max-height:15%;box-sizing:border-box}.layout-row>.flex-gt-sm-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-sm-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-sm-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-sm-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-sm-row>.flex-gt-sm-15{flex:1 1 15%;max-width:15%;max-height:100%;box-sizing:border-box}.layout-gt-sm-column>.flex-gt-sm-15{flex:1 1 15%;max-width:100%;max-height:15%;box-sizing:border-box}.flex-gt-sm-20{flex:1 1 20%;max-width:20%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-sm-20{flex:1 1 20%;max-width:20%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-sm-20{flex:1 1 20%;max-width:100%;max-height:20%;box-sizing:border-box}.layout-row>.flex-gt-sm-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-sm-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-sm-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-sm-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-sm-row>.flex-gt-sm-20{flex:1 1 20%;max-width:20%;max-height:100%;box-sizing:border-box}.layout-gt-sm-column>.flex-gt-sm-20{flex:1 1 20%;max-width:100%;max-height:20%;box-sizing:border-box}.flex-gt-sm-25{flex:1 1 25%;max-width:25%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-sm-25{flex:1 1 25%;max-width:25%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-sm-25{flex:1 1 25%;max-width:100%;max-height:25%;box-sizing:border-box}.layout-row>.flex-gt-sm-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-sm-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-sm-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-sm-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-sm-row>.flex-gt-sm-25{flex:1 1 25%;max-width:25%;max-height:100%;box-sizing:border-box}.layout-gt-sm-column>.flex-gt-sm-25{flex:1 1 25%;max-width:100%;max-height:25%;box-sizing:border-box}.flex-gt-sm-30{flex:1 1 30%;max-width:30%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-sm-30{flex:1 1 30%;max-width:30%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-sm-30{flex:1 1 30%;max-width:100%;max-height:30%;box-sizing:border-box}.layout-row>.flex-gt-sm-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-sm-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-sm-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-sm-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-sm-row>.flex-gt-sm-30{flex:1 1 30%;max-width:30%;max-height:100%;box-sizing:border-box}.layout-gt-sm-column>.flex-gt-sm-30{flex:1 1 30%;max-width:100%;max-height:30%;box-sizing:border-box}.flex-gt-sm-35{flex:1 1 35%;max-width:35%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-sm-35{flex:1 1 35%;max-width:35%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-sm-35{flex:1 1 35%;max-width:100%;max-height:35%;box-sizing:border-box}.layout-row>.flex-gt-sm-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-sm-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-sm-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-sm-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-sm-row>.flex-gt-sm-35{flex:1 1 35%;max-width:35%;max-height:100%;box-sizing:border-box}.layout-gt-sm-column>.flex-gt-sm-35{flex:1 1 35%;max-width:100%;max-height:35%;box-sizing:border-box}.flex-gt-sm-40{flex:1 1 40%;max-width:40%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-sm-40{flex:1 1 40%;max-width:40%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-sm-40{flex:1 1 40%;max-width:100%;max-height:40%;box-sizing:border-box}.layout-row>.flex-gt-sm-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-sm-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-sm-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-sm-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-sm-row>.flex-gt-sm-40{flex:1 1 40%;max-width:40%;max-height:100%;box-sizing:border-box}.layout-gt-sm-column>.flex-gt-sm-40{flex:1 1 40%;max-width:100%;max-height:40%;box-sizing:border-box}.flex-gt-sm-45{flex:1 1 45%;max-width:45%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-sm-45{flex:1 1 45%;max-width:45%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-sm-45{flex:1 1 45%;max-width:100%;max-height:45%;box-sizing:border-box}.layout-row>.flex-gt-sm-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-sm-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-sm-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-sm-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-sm-row>.flex-gt-sm-45{flex:1 1 45%;max-width:45%;max-height:100%;box-sizing:border-box}.layout-gt-sm-column>.flex-gt-sm-45{flex:1 1 45%;max-width:100%;max-height:45%;box-sizing:border-box}.flex-gt-sm-50{flex:1 1 50%;max-width:50%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-sm-50{flex:1 1 50%;max-width:50%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-sm-50{flex:1 1 50%;max-width:100%;max-height:50%;box-sizing:border-box}.layout-row>.flex-gt-sm-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-sm-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-sm-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-sm-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-sm-row>.flex-gt-sm-50{flex:1 1 50%;max-width:50%;max-height:100%;box-sizing:border-box}.layout-gt-sm-column>.flex-gt-sm-50{flex:1 1 50%;max-width:100%;max-height:50%;box-sizing:border-box}.flex-gt-sm-55{flex:1 1 55%;max-width:55%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-sm-55{flex:1 1 55%;max-width:55%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-sm-55{flex:1 1 55%;max-width:100%;max-height:55%;box-sizing:border-box}.layout-row>.flex-gt-sm-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-sm-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-sm-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-sm-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-sm-row>.flex-gt-sm-55{flex:1 1 55%;max-width:55%;max-height:100%;box-sizing:border-box}.layout-gt-sm-column>.flex-gt-sm-55{flex:1 1 55%;max-width:100%;max-height:55%;box-sizing:border-box}.flex-gt-sm-60{flex:1 1 60%;max-width:60%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-sm-60{flex:1 1 60%;max-width:60%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-sm-60{flex:1 1 60%;max-width:100%;max-height:60%;box-sizing:border-box}.layout-row>.flex-gt-sm-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-sm-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-sm-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-sm-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-sm-row>.flex-gt-sm-60{flex:1 1 60%;max-width:60%;max-height:100%;box-sizing:border-box}.layout-gt-sm-column>.flex-gt-sm-60{flex:1 1 60%;max-width:100%;max-height:60%;box-sizing:border-box}.flex-gt-sm-65{flex:1 1 65%;max-width:65%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-sm-65{flex:1 1 65%;max-width:65%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-sm-65{flex:1 1 65%;max-width:100%;max-height:65%;box-sizing:border-box}.layout-row>.flex-gt-sm-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-sm-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-sm-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-sm-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-sm-row>.flex-gt-sm-65{flex:1 1 65%;max-width:65%;max-height:100%;box-sizing:border-box}.layout-gt-sm-column>.flex-gt-sm-65{flex:1 1 65%;max-width:100%;max-height:65%;box-sizing:border-box}.flex-gt-sm-70{flex:1 1 70%;max-width:70%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-sm-70{flex:1 1 70%;max-width:70%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-sm-70{flex:1 1 70%;max-width:100%;max-height:70%;box-sizing:border-box}.layout-row>.flex-gt-sm-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-sm-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-sm-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-sm-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-sm-row>.flex-gt-sm-70{flex:1 1 70%;max-width:70%;max-height:100%;box-sizing:border-box}.layout-gt-sm-column>.flex-gt-sm-70{flex:1 1 70%;max-width:100%;max-height:70%;box-sizing:border-box}.flex-gt-sm-75{flex:1 1 75%;max-width:75%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-sm-75{flex:1 1 75%;max-width:75%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-sm-75{flex:1 1 75%;max-width:100%;max-height:75%;box-sizing:border-box}.layout-row>.flex-gt-sm-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-sm-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-sm-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-sm-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-sm-row>.flex-gt-sm-75{flex:1 1 75%;max-width:75%;max-height:100%;box-sizing:border-box}.layout-gt-sm-column>.flex-gt-sm-75{flex:1 1 75%;max-width:100%;max-height:75%;box-sizing:border-box}.flex-gt-sm-80{flex:1 1 80%;max-width:80%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-sm-80{flex:1 1 80%;max-width:80%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-sm-80{flex:1 1 80%;max-width:100%;max-height:80%;box-sizing:border-box}.layout-row>.flex-gt-sm-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-sm-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-sm-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-sm-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-sm-row>.flex-gt-sm-80{flex:1 1 80%;max-width:80%;max-height:100%;box-sizing:border-box}.layout-gt-sm-column>.flex-gt-sm-80{flex:1 1 80%;max-width:100%;max-height:80%;box-sizing:border-box}.flex-gt-sm-85{flex:1 1 85%;max-width:85%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-sm-85{flex:1 1 85%;max-width:85%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-sm-85{flex:1 1 85%;max-width:100%;max-height:85%;box-sizing:border-box}.layout-row>.flex-gt-sm-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-sm-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-sm-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-sm-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-sm-row>.flex-gt-sm-85{flex:1 1 85%;max-width:85%;max-height:100%;box-sizing:border-box}.layout-gt-sm-column>.flex-gt-sm-85{flex:1 1 85%;max-width:100%;max-height:85%;box-sizing:border-box}.flex-gt-sm-90{flex:1 1 90%;max-width:90%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-sm-90{flex:1 1 90%;max-width:90%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-sm-90{flex:1 1 90%;max-width:100%;max-height:90%;box-sizing:border-box}.layout-row>.flex-gt-sm-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-sm-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-sm-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-sm-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-sm-row>.flex-gt-sm-90{flex:1 1 90%;max-width:90%;max-height:100%;box-sizing:border-box}.layout-gt-sm-column>.flex-gt-sm-90{flex:1 1 90%;max-width:100%;max-height:90%;box-sizing:border-box}.flex-gt-sm-95{flex:1 1 95%;max-width:95%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-sm-95{flex:1 1 95%;max-width:95%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-sm-95{flex:1 1 95%;max-width:100%;max-height:95%;box-sizing:border-box}.layout-row>.flex-gt-sm-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-sm-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-sm-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-sm-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-sm-row>.flex-gt-sm-95{flex:1 1 95%;max-width:95%;max-height:100%;box-sizing:border-box}.layout-gt-sm-column>.flex-gt-sm-95{flex:1 1 95%;max-width:100%;max-height:95%;box-sizing:border-box}.flex-gt-sm-100{flex:1 1 100%;max-width:100%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-sm-100{flex:1 1 100%;max-width:100%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-sm-100{flex:1 1 100%;max-width:100%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-sm-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-sm-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-sm-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-sm-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-sm-row>.flex-gt-sm-100{flex:1 1 100%;max-width:100%;max-height:100%;box-sizing:border-box}.layout-gt-sm-column>.flex-gt-sm-100{flex:1 1 100%;max-width:100%;max-height:100%;box-sizing:border-box}.layout-gt-sm-row>.flex-gt-sm-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-gt-sm-row>.flex-gt-sm-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-gt-sm-row>.flex{min-width:0}.layout-gt-sm-column>.flex-gt-sm-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-gt-sm-column>.flex-gt-sm-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-sm-column>.flex{min-height:0}.layout-gt-sm,.layout-gt-sm-column,.layout-gt-sm-row{box-sizing:border-box;display:-webkit-box;display:-webkit-flex;display:-moz-box;display:-ms-flexbox;display:flex}.layout-gt-sm-column{flex-direction:column}.layout-gt-sm-row{flex-direction:row}}@media (min-width:960px) and (max-width:1279px){.hide-gt-sm:not(.show-gt-xs):not(.show-gt-sm):not(.show-md):not(.show),.hide-gt-xs:not(.show-gt-xs):not(.show-gt-sm):not(.show-md):not(.show),.hide:not(.show-gt-xs):not(.show-gt-sm):not(.show-md):not(.show){display:none}.hide-md:not(.show-md):not(.show-gt-sm):not(.show-gt-xs):not(.show){display:none}.flex-order-md--20{order:-20}.flex-order-md--19{order:-19}.flex-order-md--18{order:-18}.flex-order-md--17{order:-17}.flex-order-md--16{order:-16}.flex-order-md--15{order:-15}.flex-order-md--14{order:-14}.flex-order-md--13{order:-13}.flex-order-md--12{order:-12}.flex-order-md--11{order:-11}.flex-order-md--10{order:-10}.flex-order-md--9{order:-9}.flex-order-md--8{order:-8}.flex-order-md--7{order:-7}.flex-order-md--6{order:-6}.flex-order-md--5{order:-5}.flex-order-md--4{order:-4}.flex-order-md--3{order:-3}.flex-order-md--2{order:-2}.flex-order-md--1{order:-1}.flex-order-md-0{order:0}.flex-order-md-1{order:1}.flex-order-md-2{order:2}.flex-order-md-3{order:3}.flex-order-md-4{order:4}.flex-order-md-5{order:5}.flex-order-md-6{order:6}.flex-order-md-7{order:7}.flex-order-md-8{order:8}.flex-order-md-9{order:9}.flex-order-md-10{order:10}.flex-order-md-11{order:11}.flex-order-md-12{order:12}.flex-order-md-13{order:13}.flex-order-md-14{order:14}.flex-order-md-15{order:15}.flex-order-md-16{order:16}.flex-order-md-17{order:17}.flex-order-md-18{order:18}.flex-order-md-19{order:19}.flex-order-md-20{order:20}.flex-offset-md-0,.offset-md-0{margin-left:0}[dir=rtl] .flex-offset-md-0,[dir=rtl] .offset-md-0{margin-left:auto;margin-right:0}.flex-offset-md-5,.offset-md-5{margin-left:5%}[dir=rtl] .flex-offset-md-5,[dir=rtl] .offset-md-5{margin-left:auto;margin-right:5%}.flex-offset-md-10,.offset-md-10{margin-left:10%}[dir=rtl] .flex-offset-md-10,[dir=rtl] .offset-md-10{margin-left:auto;margin-right:10%}.flex-offset-md-15,.offset-md-15{margin-left:15%}[dir=rtl] .flex-offset-md-15,[dir=rtl] .offset-md-15{margin-left:auto;margin-right:15%}.flex-offset-md-20,.offset-md-20{margin-left:20%}[dir=rtl] .flex-offset-md-20,[dir=rtl] .offset-md-20{margin-left:auto;margin-right:20%}.flex-offset-md-25,.offset-md-25{margin-left:25%}[dir=rtl] .flex-offset-md-25,[dir=rtl] .offset-md-25{margin-left:auto;margin-right:25%}.flex-offset-md-30,.offset-md-30{margin-left:30%}[dir=rtl] .flex-offset-md-30,[dir=rtl] .offset-md-30{margin-left:auto;margin-right:30%}.flex-offset-md-35,.offset-md-35{margin-left:35%}[dir=rtl] .flex-offset-md-35,[dir=rtl] .offset-md-35{margin-left:auto;margin-right:35%}.flex-offset-md-40,.offset-md-40{margin-left:40%}[dir=rtl] .flex-offset-md-40,[dir=rtl] .offset-md-40{margin-left:auto;margin-right:40%}.flex-offset-md-45,.offset-md-45{margin-left:45%}[dir=rtl] .flex-offset-md-45,[dir=rtl] .offset-md-45{margin-left:auto;margin-right:45%}.flex-offset-md-50,.offset-md-50{margin-left:50%}[dir=rtl] .flex-offset-md-50,[dir=rtl] .offset-md-50{margin-left:auto;margin-right:50%}.flex-offset-md-55,.offset-md-55{margin-left:55%}[dir=rtl] .flex-offset-md-55,[dir=rtl] .offset-md-55{margin-left:auto;margin-right:55%}.flex-offset-md-60,.offset-md-60{margin-left:60%}[dir=rtl] .flex-offset-md-60,[dir=rtl] .offset-md-60{margin-left:auto;margin-right:60%}.flex-offset-md-65,.offset-md-65{margin-left:65%}[dir=rtl] .flex-offset-md-65,[dir=rtl] .offset-md-65{margin-left:auto;margin-right:65%}.flex-offset-md-70,.offset-md-70{margin-left:70%}[dir=rtl] .flex-offset-md-70,[dir=rtl] .offset-md-70{margin-left:auto;margin-right:70%}.flex-offset-md-75,.offset-md-75{margin-left:75%}[dir=rtl] .flex-offset-md-75,[dir=rtl] .offset-md-75{margin-left:auto;margin-right:75%}.flex-offset-md-80,.offset-md-80{margin-left:80%}[dir=rtl] .flex-offset-md-80,[dir=rtl] .offset-md-80{margin-left:auto;margin-right:80%}.flex-offset-md-85,.offset-md-85{margin-left:85%}[dir=rtl] .flex-offset-md-85,[dir=rtl] .offset-md-85{margin-left:auto;margin-right:85%}.flex-offset-md-90,.offset-md-90{margin-left:90%}[dir=rtl] .flex-offset-md-90,[dir=rtl] .offset-md-90{margin-left:auto;margin-right:90%}.flex-offset-md-95,.offset-md-95{margin-left:95%}[dir=rtl] .flex-offset-md-95,[dir=rtl] .offset-md-95{margin-left:auto;margin-right:95%}.flex-offset-md-33,.offset-md-33{margin-left:calc(100% / 3)}.flex-offset-md-66,.offset-md-66{margin-left:calc(200% / 3)}[dir=rtl] .flex-offset-md-66,[dir=rtl] .offset-md-66{margin-left:auto;margin-right:calc(200% / 3)}.layout-align-md,.layout-align-md-start-stretch{justify-content:flex-start;align-content:stretch;align-items:stretch}.layout-align-md-start,.layout-align-md-start-center,.layout-align-md-start-end,.layout-align-md-start-start,.layout-align-md-start-stretch{justify-content:flex-start}.layout-align-md-center,.layout-align-md-center-center,.layout-align-md-center-end,.layout-align-md-center-start,.layout-align-md-center-stretch{justify-content:center}.layout-align-md-end,.layout-align-md-end-center,.layout-align-md-end-end,.layout-align-md-end-start,.layout-align-md-end-stretch{justify-content:flex-end}.layout-align-md-space-around,.layout-align-md-space-around-center,.layout-align-md-space-around-end,.layout-align-md-space-around-start,.layout-align-md-space-around-stretch{justify-content:space-around}.layout-align-md-space-between,.layout-align-md-space-between-center,.layout-align-md-space-between-end,.layout-align-md-space-between-start,.layout-align-md-space-between-stretch{justify-content:space-between}.layout-align-md-center-start,.layout-align-md-end-start,.layout-align-md-space-around-start,.layout-align-md-space-between-start,.layout-align-md-start-start{align-items:flex-start;align-content:flex-start}.layout-align-md-center-center,.layout-align-md-end-center,.layout-align-md-space-around-center,.layout-align-md-space-between-center,.layout-align-md-start-center{align-items:center;align-content:center;max-width:100%}.layout-align-md-center-center>*,.layout-align-md-end-center>*,.layout-align-md-space-around-center>*,.layout-align-md-space-between-center>*,.layout-align-md-start-center>*{max-width:100%;box-sizing:border-box}.layout-align-md-center-end,.layout-align-md-end-end,.layout-align-md-space-around-end,.layout-align-md-space-between-end,.layout-align-md-start-end{align-items:flex-end;align-content:flex-end}.layout-align-md-center-stretch,.layout-align-md-end-stretch,.layout-align-md-space-around-stretch,.layout-align-md-space-between-stretch,.layout-align-md-start-stretch{align-items:stretch;align-content:stretch}.flex-md{flex:1;box-sizing:border-box}.flex-md-grow{flex:1 1 100%;box-sizing:border-box}.flex-md-initial{flex:0 1 auto;box-sizing:border-box}.flex-md-auto{flex:1 1 auto;box-sizing:border-box}.flex-md-none{flex:0 0 auto;box-sizing:border-box}.flex-md-noshrink{flex:1 0 auto;box-sizing:border-box}.flex-md-nogrow{flex:0 1 auto;box-sizing:border-box}.flex-md-0{flex:1 1 0%;max-width:0%;max-height:100%;box-sizing:border-box}.layout-row>.flex-md-0{flex:1 1 0%;max-width:0%;max-height:100%;box-sizing:border-box;min-width:0}.layout-column>.flex-md-0{flex:1 1 0%;max-width:100%;max-height:0%;box-sizing:border-box}.layout-row>.flex-md-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-md-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-md-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-md-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-md-row>.flex-md-0{flex:1 1 0%;max-width:0%;max-height:100%;box-sizing:border-box;min-width:0}.layout-md-column>.flex-md-0{flex:1 1 0%;max-width:100%;max-height:0%;box-sizing:border-box;min-height:0}.flex-md-5{flex:1 1 5%;max-width:5%;max-height:100%;box-sizing:border-box}.layout-row>.flex-md-5{flex:1 1 5%;max-width:5%;max-height:100%;box-sizing:border-box}.layout-column>.flex-md-5{flex:1 1 5%;max-width:100%;max-height:5%;box-sizing:border-box}.layout-row>.flex-md-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-md-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-md-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-md-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-md-row>.flex-md-5{flex:1 1 5%;max-width:5%;max-height:100%;box-sizing:border-box}.layout-md-column>.flex-md-5{flex:1 1 5%;max-width:100%;max-height:5%;box-sizing:border-box}.flex-md-10{flex:1 1 10%;max-width:10%;max-height:100%;box-sizing:border-box}.layout-row>.flex-md-10{flex:1 1 10%;max-width:10%;max-height:100%;box-sizing:border-box}.layout-column>.flex-md-10{flex:1 1 10%;max-width:100%;max-height:10%;box-sizing:border-box}.layout-row>.flex-md-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-md-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-md-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-md-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-md-row>.flex-md-10{flex:1 1 10%;max-width:10%;max-height:100%;box-sizing:border-box}.layout-md-column>.flex-md-10{flex:1 1 10%;max-width:100%;max-height:10%;box-sizing:border-box}.flex-md-15{flex:1 1 15%;max-width:15%;max-height:100%;box-sizing:border-box}.layout-row>.flex-md-15{flex:1 1 15%;max-width:15%;max-height:100%;box-sizing:border-box}.layout-column>.flex-md-15{flex:1 1 15%;max-width:100%;max-height:15%;box-sizing:border-box}.layout-row>.flex-md-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-md-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-md-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-md-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-md-row>.flex-md-15{flex:1 1 15%;max-width:15%;max-height:100%;box-sizing:border-box}.layout-md-column>.flex-md-15{flex:1 1 15%;max-width:100%;max-height:15%;box-sizing:border-box}.flex-md-20{flex:1 1 20%;max-width:20%;max-height:100%;box-sizing:border-box}.layout-row>.flex-md-20{flex:1 1 20%;max-width:20%;max-height:100%;box-sizing:border-box}.layout-column>.flex-md-20{flex:1 1 20%;max-width:100%;max-height:20%;box-sizing:border-box}.layout-row>.flex-md-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-md-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-md-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-md-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-md-row>.flex-md-20{flex:1 1 20%;max-width:20%;max-height:100%;box-sizing:border-box}.layout-md-column>.flex-md-20{flex:1 1 20%;max-width:100%;max-height:20%;box-sizing:border-box}.flex-md-25{flex:1 1 25%;max-width:25%;max-height:100%;box-sizing:border-box}.layout-row>.flex-md-25{flex:1 1 25%;max-width:25%;max-height:100%;box-sizing:border-box}.layout-column>.flex-md-25{flex:1 1 25%;max-width:100%;max-height:25%;box-sizing:border-box}.layout-row>.flex-md-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-md-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-md-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-md-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-md-row>.flex-md-25{flex:1 1 25%;max-width:25%;max-height:100%;box-sizing:border-box}.layout-md-column>.flex-md-25{flex:1 1 25%;max-width:100%;max-height:25%;box-sizing:border-box}.flex-md-30{flex:1 1 30%;max-width:30%;max-height:100%;box-sizing:border-box}.layout-row>.flex-md-30{flex:1 1 30%;max-width:30%;max-height:100%;box-sizing:border-box}.layout-column>.flex-md-30{flex:1 1 30%;max-width:100%;max-height:30%;box-sizing:border-box}.layout-row>.flex-md-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-md-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-md-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-md-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-md-row>.flex-md-30{flex:1 1 30%;max-width:30%;max-height:100%;box-sizing:border-box}.layout-md-column>.flex-md-30{flex:1 1 30%;max-width:100%;max-height:30%;box-sizing:border-box}.flex-md-35{flex:1 1 35%;max-width:35%;max-height:100%;box-sizing:border-box}.layout-row>.flex-md-35{flex:1 1 35%;max-width:35%;max-height:100%;box-sizing:border-box}.layout-column>.flex-md-35{flex:1 1 35%;max-width:100%;max-height:35%;box-sizing:border-box}.layout-row>.flex-md-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-md-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-md-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-md-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-md-row>.flex-md-35{flex:1 1 35%;max-width:35%;max-height:100%;box-sizing:border-box}.layout-md-column>.flex-md-35{flex:1 1 35%;max-width:100%;max-height:35%;box-sizing:border-box}.flex-md-40{flex:1 1 40%;max-width:40%;max-height:100%;box-sizing:border-box}.layout-row>.flex-md-40{flex:1 1 40%;max-width:40%;max-height:100%;box-sizing:border-box}.layout-column>.flex-md-40{flex:1 1 40%;max-width:100%;max-height:40%;box-sizing:border-box}.layout-row>.flex-md-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-md-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-md-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-md-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-md-row>.flex-md-40{flex:1 1 40%;max-width:40%;max-height:100%;box-sizing:border-box}.layout-md-column>.flex-md-40{flex:1 1 40%;max-width:100%;max-height:40%;box-sizing:border-box}.flex-md-45{flex:1 1 45%;max-width:45%;max-height:100%;box-sizing:border-box}.layout-row>.flex-md-45{flex:1 1 45%;max-width:45%;max-height:100%;box-sizing:border-box}.layout-column>.flex-md-45{flex:1 1 45%;max-width:100%;max-height:45%;box-sizing:border-box}.layout-row>.flex-md-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-md-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-md-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-md-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-md-row>.flex-md-45{flex:1 1 45%;max-width:45%;max-height:100%;box-sizing:border-box}.layout-md-column>.flex-md-45{flex:1 1 45%;max-width:100%;max-height:45%;box-sizing:border-box}.flex-md-50{flex:1 1 50%;max-width:50%;max-height:100%;box-sizing:border-box}.layout-row>.flex-md-50{flex:1 1 50%;max-width:50%;max-height:100%;box-sizing:border-box}.layout-column>.flex-md-50{flex:1 1 50%;max-width:100%;max-height:50%;box-sizing:border-box}.layout-row>.flex-md-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-md-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-md-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-md-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-md-row>.flex-md-50{flex:1 1 50%;max-width:50%;max-height:100%;box-sizing:border-box}.layout-md-column>.flex-md-50{flex:1 1 50%;max-width:100%;max-height:50%;box-sizing:border-box}.flex-md-55{flex:1 1 55%;max-width:55%;max-height:100%;box-sizing:border-box}.layout-row>.flex-md-55{flex:1 1 55%;max-width:55%;max-height:100%;box-sizing:border-box}.layout-column>.flex-md-55{flex:1 1 55%;max-width:100%;max-height:55%;box-sizing:border-box}.layout-row>.flex-md-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-md-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-md-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-md-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-md-row>.flex-md-55{flex:1 1 55%;max-width:55%;max-height:100%;box-sizing:border-box}.layout-md-column>.flex-md-55{flex:1 1 55%;max-width:100%;max-height:55%;box-sizing:border-box}.flex-md-60{flex:1 1 60%;max-width:60%;max-height:100%;box-sizing:border-box}.layout-row>.flex-md-60{flex:1 1 60%;max-width:60%;max-height:100%;box-sizing:border-box}.layout-column>.flex-md-60{flex:1 1 60%;max-width:100%;max-height:60%;box-sizing:border-box}.layout-row>.flex-md-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-md-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-md-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-md-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-md-row>.flex-md-60{flex:1 1 60%;max-width:60%;max-height:100%;box-sizing:border-box}.layout-md-column>.flex-md-60{flex:1 1 60%;max-width:100%;max-height:60%;box-sizing:border-box}.flex-md-65{flex:1 1 65%;max-width:65%;max-height:100%;box-sizing:border-box}.layout-row>.flex-md-65{flex:1 1 65%;max-width:65%;max-height:100%;box-sizing:border-box}.layout-column>.flex-md-65{flex:1 1 65%;max-width:100%;max-height:65%;box-sizing:border-box}.layout-row>.flex-md-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-md-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-md-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-md-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-md-row>.flex-md-65{flex:1 1 65%;max-width:65%;max-height:100%;box-sizing:border-box}.layout-md-column>.flex-md-65{flex:1 1 65%;max-width:100%;max-height:65%;box-sizing:border-box}.flex-md-70{flex:1 1 70%;max-width:70%;max-height:100%;box-sizing:border-box}.layout-row>.flex-md-70{flex:1 1 70%;max-width:70%;max-height:100%;box-sizing:border-box}.layout-column>.flex-md-70{flex:1 1 70%;max-width:100%;max-height:70%;box-sizing:border-box}.layout-row>.flex-md-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-md-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-md-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-md-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-md-row>.flex-md-70{flex:1 1 70%;max-width:70%;max-height:100%;box-sizing:border-box}.layout-md-column>.flex-md-70{flex:1 1 70%;max-width:100%;max-height:70%;box-sizing:border-box}.flex-md-75{flex:1 1 75%;max-width:75%;max-height:100%;box-sizing:border-box}.layout-row>.flex-md-75{flex:1 1 75%;max-width:75%;max-height:100%;box-sizing:border-box}.layout-column>.flex-md-75{flex:1 1 75%;max-width:100%;max-height:75%;box-sizing:border-box}.layout-row>.flex-md-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-md-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-md-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-md-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-md-row>.flex-md-75{flex:1 1 75%;max-width:75%;max-height:100%;box-sizing:border-box}.layout-md-column>.flex-md-75{flex:1 1 75%;max-width:100%;max-height:75%;box-sizing:border-box}.flex-md-80{flex:1 1 80%;max-width:80%;max-height:100%;box-sizing:border-box}.layout-row>.flex-md-80{flex:1 1 80%;max-width:80%;max-height:100%;box-sizing:border-box}.layout-column>.flex-md-80{flex:1 1 80%;max-width:100%;max-height:80%;box-sizing:border-box}.layout-row>.flex-md-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-md-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-md-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-md-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-md-row>.flex-md-80{flex:1 1 80%;max-width:80%;max-height:100%;box-sizing:border-box}.layout-md-column>.flex-md-80{flex:1 1 80%;max-width:100%;max-height:80%;box-sizing:border-box}.flex-md-85{flex:1 1 85%;max-width:85%;max-height:100%;box-sizing:border-box}.layout-row>.flex-md-85{flex:1 1 85%;max-width:85%;max-height:100%;box-sizing:border-box}.layout-column>.flex-md-85{flex:1 1 85%;max-width:100%;max-height:85%;box-sizing:border-box}.layout-row>.flex-md-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-md-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-md-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-md-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-md-row>.flex-md-85{flex:1 1 85%;max-width:85%;max-height:100%;box-sizing:border-box}.layout-md-column>.flex-md-85{flex:1 1 85%;max-width:100%;max-height:85%;box-sizing:border-box}.flex-md-90{flex:1 1 90%;max-width:90%;max-height:100%;box-sizing:border-box}.layout-row>.flex-md-90{flex:1 1 90%;max-width:90%;max-height:100%;box-sizing:border-box}.layout-column>.flex-md-90{flex:1 1 90%;max-width:100%;max-height:90%;box-sizing:border-box}.layout-row>.flex-md-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-md-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-md-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-md-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-md-row>.flex-md-90{flex:1 1 90%;max-width:90%;max-height:100%;box-sizing:border-box}.layout-md-column>.flex-md-90{flex:1 1 90%;max-width:100%;max-height:90%;box-sizing:border-box}.flex-md-95{flex:1 1 95%;max-width:95%;max-height:100%;box-sizing:border-box}.layout-row>.flex-md-95{flex:1 1 95%;max-width:95%;max-height:100%;box-sizing:border-box}.layout-column>.flex-md-95{flex:1 1 95%;max-width:100%;max-height:95%;box-sizing:border-box}.layout-row>.flex-md-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-md-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-md-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-md-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-md-row>.flex-md-95{flex:1 1 95%;max-width:95%;max-height:100%;box-sizing:border-box}.layout-md-column>.flex-md-95{flex:1 1 95%;max-width:100%;max-height:95%;box-sizing:border-box}.flex-md-100{flex:1 1 100%;max-width:100%;max-height:100%;box-sizing:border-box}.layout-row>.flex-md-100{flex:1 1 100%;max-width:100%;max-height:100%;box-sizing:border-box}.layout-column>.flex-md-100{flex:1 1 100%;max-width:100%;max-height:100%;box-sizing:border-box}.layout-row>.flex-md-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-md-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-md-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-md-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-md-row>.flex-md-100{flex:1 1 100%;max-width:100%;max-height:100%;box-sizing:border-box}.layout-md-column>.flex-md-100{flex:1 1 100%;max-width:100%;max-height:100%;box-sizing:border-box}.layout-md-row>.flex-md-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-md-row>.flex-md-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-md-row>.flex{min-width:0}.layout-md-column>.flex-md-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-md-column>.flex-md-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-md-column>.flex{min-height:0}.layout-md,.layout-md-column,.layout-md-row{box-sizing:border-box;display:-webkit-box;display:-webkit-flex;display:-moz-box;display:-ms-flexbox;display:flex}.layout-md-column{flex-direction:column}.layout-md-row{flex-direction:row}}@media (min-width:1280px){.flex-order-gt-md--20{order:-20}.flex-order-gt-md--19{order:-19}.flex-order-gt-md--18{order:-18}.flex-order-gt-md--17{order:-17}.flex-order-gt-md--16{order:-16}.flex-order-gt-md--15{order:-15}.flex-order-gt-md--14{order:-14}.flex-order-gt-md--13{order:-13}.flex-order-gt-md--12{order:-12}.flex-order-gt-md--11{order:-11}.flex-order-gt-md--10{order:-10}.flex-order-gt-md--9{order:-9}.flex-order-gt-md--8{order:-8}.flex-order-gt-md--7{order:-7}.flex-order-gt-md--6{order:-6}.flex-order-gt-md--5{order:-5}.flex-order-gt-md--4{order:-4}.flex-order-gt-md--3{order:-3}.flex-order-gt-md--2{order:-2}.flex-order-gt-md--1{order:-1}.flex-order-gt-md-0{order:0}.flex-order-gt-md-1{order:1}.flex-order-gt-md-2{order:2}.flex-order-gt-md-3{order:3}.flex-order-gt-md-4{order:4}.flex-order-gt-md-5{order:5}.flex-order-gt-md-6{order:6}.flex-order-gt-md-7{order:7}.flex-order-gt-md-8{order:8}.flex-order-gt-md-9{order:9}.flex-order-gt-md-10{order:10}.flex-order-gt-md-11{order:11}.flex-order-gt-md-12{order:12}.flex-order-gt-md-13{order:13}.flex-order-gt-md-14{order:14}.flex-order-gt-md-15{order:15}.flex-order-gt-md-16{order:16}.flex-order-gt-md-17{order:17}.flex-order-gt-md-18{order:18}.flex-order-gt-md-19{order:19}.flex-order-gt-md-20{order:20}.flex-offset-gt-md-0,.offset-gt-md-0{margin-left:0}[dir=rtl] .flex-offset-gt-md-0,[dir=rtl] .offset-gt-md-0{margin-left:auto;margin-right:0}.flex-offset-gt-md-5,.offset-gt-md-5{margin-left:5%}[dir=rtl] .flex-offset-gt-md-5,[dir=rtl] .offset-gt-md-5{margin-left:auto;margin-right:5%}.flex-offset-gt-md-10,.offset-gt-md-10{margin-left:10%}[dir=rtl] .flex-offset-gt-md-10,[dir=rtl] .offset-gt-md-10{margin-left:auto;margin-right:10%}.flex-offset-gt-md-15,.offset-gt-md-15{margin-left:15%}[dir=rtl] .flex-offset-gt-md-15,[dir=rtl] .offset-gt-md-15{margin-left:auto;margin-right:15%}.flex-offset-gt-md-20,.offset-gt-md-20{margin-left:20%}[dir=rtl] .flex-offset-gt-md-20,[dir=rtl] .offset-gt-md-20{margin-left:auto;margin-right:20%}.flex-offset-gt-md-25,.offset-gt-md-25{margin-left:25%}[dir=rtl] .flex-offset-gt-md-25,[dir=rtl] .offset-gt-md-25{margin-left:auto;margin-right:25%}.flex-offset-gt-md-30,.offset-gt-md-30{margin-left:30%}[dir=rtl] .flex-offset-gt-md-30,[dir=rtl] .offset-gt-md-30{margin-left:auto;margin-right:30%}.flex-offset-gt-md-35,.offset-gt-md-35{margin-left:35%}[dir=rtl] .flex-offset-gt-md-35,[dir=rtl] .offset-gt-md-35{margin-left:auto;margin-right:35%}.flex-offset-gt-md-40,.offset-gt-md-40{margin-left:40%}[dir=rtl] .flex-offset-gt-md-40,[dir=rtl] .offset-gt-md-40{margin-left:auto;margin-right:40%}.flex-offset-gt-md-45,.offset-gt-md-45{margin-left:45%}[dir=rtl] .flex-offset-gt-md-45,[dir=rtl] .offset-gt-md-45{margin-left:auto;margin-right:45%}.flex-offset-gt-md-50,.offset-gt-md-50{margin-left:50%}[dir=rtl] .flex-offset-gt-md-50,[dir=rtl] .offset-gt-md-50{margin-left:auto;margin-right:50%}.flex-offset-gt-md-55,.offset-gt-md-55{margin-left:55%}[dir=rtl] .flex-offset-gt-md-55,[dir=rtl] .offset-gt-md-55{margin-left:auto;margin-right:55%}.flex-offset-gt-md-60,.offset-gt-md-60{margin-left:60%}[dir=rtl] .flex-offset-gt-md-60,[dir=rtl] .offset-gt-md-60{margin-left:auto;margin-right:60%}.flex-offset-gt-md-65,.offset-gt-md-65{margin-left:65%}[dir=rtl] .flex-offset-gt-md-65,[dir=rtl] .offset-gt-md-65{margin-left:auto;margin-right:65%}.flex-offset-gt-md-70,.offset-gt-md-70{margin-left:70%}[dir=rtl] .flex-offset-gt-md-70,[dir=rtl] .offset-gt-md-70{margin-left:auto;margin-right:70%}.flex-offset-gt-md-75,.offset-gt-md-75{margin-left:75%}[dir=rtl] .flex-offset-gt-md-75,[dir=rtl] .offset-gt-md-75{margin-left:auto;margin-right:75%}.flex-offset-gt-md-80,.offset-gt-md-80{margin-left:80%}[dir=rtl] .flex-offset-gt-md-80,[dir=rtl] .offset-gt-md-80{margin-left:auto;margin-right:80%}.flex-offset-gt-md-85,.offset-gt-md-85{margin-left:85%}[dir=rtl] .flex-offset-gt-md-85,[dir=rtl] .offset-gt-md-85{margin-left:auto;margin-right:85%}.flex-offset-gt-md-90,.offset-gt-md-90{margin-left:90%}[dir=rtl] .flex-offset-gt-md-90,[dir=rtl] .offset-gt-md-90{margin-left:auto;margin-right:90%}.flex-offset-gt-md-95,.offset-gt-md-95{margin-left:95%}[dir=rtl] .flex-offset-gt-md-95,[dir=rtl] .offset-gt-md-95{margin-left:auto;margin-right:95%}.flex-offset-gt-md-33,.offset-gt-md-33{margin-left:calc(100% / 3)}.flex-offset-gt-md-66,.offset-gt-md-66{margin-left:calc(200% / 3)}[dir=rtl] .flex-offset-gt-md-66,[dir=rtl] .offset-gt-md-66{margin-left:auto;margin-right:calc(200% / 3)}.layout-align-gt-md,.layout-align-gt-md-start-stretch{justify-content:flex-start;align-content:stretch;align-items:stretch}.layout-align-gt-md-start,.layout-align-gt-md-start-center,.layout-align-gt-md-start-end,.layout-align-gt-md-start-start,.layout-align-gt-md-start-stretch{justify-content:flex-start}.layout-align-gt-md-center,.layout-align-gt-md-center-center,.layout-align-gt-md-center-end,.layout-align-gt-md-center-start,.layout-align-gt-md-center-stretch{justify-content:center}.layout-align-gt-md-end,.layout-align-gt-md-end-center,.layout-align-gt-md-end-end,.layout-align-gt-md-end-start,.layout-align-gt-md-end-stretch{justify-content:flex-end}.layout-align-gt-md-space-around,.layout-align-gt-md-space-around-center,.layout-align-gt-md-space-around-end,.layout-align-gt-md-space-around-start,.layout-align-gt-md-space-around-stretch{justify-content:space-around}.layout-align-gt-md-space-between,.layout-align-gt-md-space-between-center,.layout-align-gt-md-space-between-end,.layout-align-gt-md-space-between-start,.layout-align-gt-md-space-between-stretch{justify-content:space-between}.layout-align-gt-md-center-start,.layout-align-gt-md-end-start,.layout-align-gt-md-space-around-start,.layout-align-gt-md-space-between-start,.layout-align-gt-md-start-start{align-items:flex-start;align-content:flex-start}.layout-align-gt-md-center-center,.layout-align-gt-md-end-center,.layout-align-gt-md-space-around-center,.layout-align-gt-md-space-between-center,.layout-align-gt-md-start-center{align-items:center;align-content:center;max-width:100%}.layout-align-gt-md-center-center>*,.layout-align-gt-md-end-center>*,.layout-align-gt-md-space-around-center>*,.layout-align-gt-md-space-between-center>*,.layout-align-gt-md-start-center>*{max-width:100%;box-sizing:border-box}.layout-align-gt-md-center-end,.layout-align-gt-md-end-end,.layout-align-gt-md-space-around-end,.layout-align-gt-md-space-between-end,.layout-align-gt-md-start-end{align-items:flex-end;align-content:flex-end}.layout-align-gt-md-center-stretch,.layout-align-gt-md-end-stretch,.layout-align-gt-md-space-around-stretch,.layout-align-gt-md-space-between-stretch,.layout-align-gt-md-start-stretch{align-items:stretch;align-content:stretch}.flex-gt-md{flex:1;box-sizing:border-box}.flex-gt-md-grow{flex:1 1 100%;box-sizing:border-box}.flex-gt-md-initial{flex:0 1 auto;box-sizing:border-box}.flex-gt-md-auto{flex:1 1 auto;box-sizing:border-box}.flex-gt-md-none{flex:0 0 auto;box-sizing:border-box}.flex-gt-md-noshrink{flex:1 0 auto;box-sizing:border-box}.flex-gt-md-nogrow{flex:0 1 auto;box-sizing:border-box}.flex-gt-md-0{flex:1 1 0%;max-width:0%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-md-0{flex:1 1 0%;max-width:0%;max-height:100%;box-sizing:border-box;min-width:0}.layout-column>.flex-gt-md-0{flex:1 1 0%;max-width:100%;max-height:0%;box-sizing:border-box}.layout-row>.flex-gt-md-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-md-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-md-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-md-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-md-row>.flex-gt-md-0{flex:1 1 0%;max-width:0%;max-height:100%;box-sizing:border-box;min-width:0}.layout-gt-md-column>.flex-gt-md-0{flex:1 1 0%;max-width:100%;max-height:0%;box-sizing:border-box;min-height:0}.flex-gt-md-5{flex:1 1 5%;max-width:5%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-md-5{flex:1 1 5%;max-width:5%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-md-5{flex:1 1 5%;max-width:100%;max-height:5%;box-sizing:border-box}.layout-row>.flex-gt-md-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-md-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-md-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-md-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-md-row>.flex-gt-md-5{flex:1 1 5%;max-width:5%;max-height:100%;box-sizing:border-box}.layout-gt-md-column>.flex-gt-md-5{flex:1 1 5%;max-width:100%;max-height:5%;box-sizing:border-box}.flex-gt-md-10{flex:1 1 10%;max-width:10%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-md-10{flex:1 1 10%;max-width:10%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-md-10{flex:1 1 10%;max-width:100%;max-height:10%;box-sizing:border-box}.layout-row>.flex-gt-md-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-md-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-md-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-md-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-md-row>.flex-gt-md-10{flex:1 1 10%;max-width:10%;max-height:100%;box-sizing:border-box}.layout-gt-md-column>.flex-gt-md-10{flex:1 1 10%;max-width:100%;max-height:10%;box-sizing:border-box}.flex-gt-md-15{flex:1 1 15%;max-width:15%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-md-15{flex:1 1 15%;max-width:15%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-md-15{flex:1 1 15%;max-width:100%;max-height:15%;box-sizing:border-box}.layout-row>.flex-gt-md-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-md-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-md-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-md-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-md-row>.flex-gt-md-15{flex:1 1 15%;max-width:15%;max-height:100%;box-sizing:border-box}.layout-gt-md-column>.flex-gt-md-15{flex:1 1 15%;max-width:100%;max-height:15%;box-sizing:border-box}.flex-gt-md-20{flex:1 1 20%;max-width:20%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-md-20{flex:1 1 20%;max-width:20%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-md-20{flex:1 1 20%;max-width:100%;max-height:20%;box-sizing:border-box}.layout-row>.flex-gt-md-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-md-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-md-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-md-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-md-row>.flex-gt-md-20{flex:1 1 20%;max-width:20%;max-height:100%;box-sizing:border-box}.layout-gt-md-column>.flex-gt-md-20{flex:1 1 20%;max-width:100%;max-height:20%;box-sizing:border-box}.flex-gt-md-25{flex:1 1 25%;max-width:25%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-md-25{flex:1 1 25%;max-width:25%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-md-25{flex:1 1 25%;max-width:100%;max-height:25%;box-sizing:border-box}.layout-row>.flex-gt-md-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-md-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-md-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-md-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-md-row>.flex-gt-md-25{flex:1 1 25%;max-width:25%;max-height:100%;box-sizing:border-box}.layout-gt-md-column>.flex-gt-md-25{flex:1 1 25%;max-width:100%;max-height:25%;box-sizing:border-box}.flex-gt-md-30{flex:1 1 30%;max-width:30%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-md-30{flex:1 1 30%;max-width:30%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-md-30{flex:1 1 30%;max-width:100%;max-height:30%;box-sizing:border-box}.layout-row>.flex-gt-md-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-md-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-md-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-md-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-md-row>.flex-gt-md-30{flex:1 1 30%;max-width:30%;max-height:100%;box-sizing:border-box}.layout-gt-md-column>.flex-gt-md-30{flex:1 1 30%;max-width:100%;max-height:30%;box-sizing:border-box}.flex-gt-md-35{flex:1 1 35%;max-width:35%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-md-35{flex:1 1 35%;max-width:35%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-md-35{flex:1 1 35%;max-width:100%;max-height:35%;box-sizing:border-box}.layout-row>.flex-gt-md-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-md-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-md-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-md-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-md-row>.flex-gt-md-35{flex:1 1 35%;max-width:35%;max-height:100%;box-sizing:border-box}.layout-gt-md-column>.flex-gt-md-35{flex:1 1 35%;max-width:100%;max-height:35%;box-sizing:border-box}.flex-gt-md-40{flex:1 1 40%;max-width:40%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-md-40{flex:1 1 40%;max-width:40%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-md-40{flex:1 1 40%;max-width:100%;max-height:40%;box-sizing:border-box}.layout-row>.flex-gt-md-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-md-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-md-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-md-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-md-row>.flex-gt-md-40{flex:1 1 40%;max-width:40%;max-height:100%;box-sizing:border-box}.layout-gt-md-column>.flex-gt-md-40{flex:1 1 40%;max-width:100%;max-height:40%;box-sizing:border-box}.flex-gt-md-45{flex:1 1 45%;max-width:45%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-md-45{flex:1 1 45%;max-width:45%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-md-45{flex:1 1 45%;max-width:100%;max-height:45%;box-sizing:border-box}.layout-row>.flex-gt-md-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-md-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-md-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-md-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-md-row>.flex-gt-md-45{flex:1 1 45%;max-width:45%;max-height:100%;box-sizing:border-box}.layout-gt-md-column>.flex-gt-md-45{flex:1 1 45%;max-width:100%;max-height:45%;box-sizing:border-box}.flex-gt-md-50{flex:1 1 50%;max-width:50%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-md-50{flex:1 1 50%;max-width:50%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-md-50{flex:1 1 50%;max-width:100%;max-height:50%;box-sizing:border-box}.layout-row>.flex-gt-md-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-md-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-md-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-md-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-md-row>.flex-gt-md-50{flex:1 1 50%;max-width:50%;max-height:100%;box-sizing:border-box}.layout-gt-md-column>.flex-gt-md-50{flex:1 1 50%;max-width:100%;max-height:50%;box-sizing:border-box}.flex-gt-md-55{flex:1 1 55%;max-width:55%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-md-55{flex:1 1 55%;max-width:55%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-md-55{flex:1 1 55%;max-width:100%;max-height:55%;box-sizing:border-box}.layout-row>.flex-gt-md-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-md-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-md-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-md-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-md-row>.flex-gt-md-55{flex:1 1 55%;max-width:55%;max-height:100%;box-sizing:border-box}.layout-gt-md-column>.flex-gt-md-55{flex:1 1 55%;max-width:100%;max-height:55%;box-sizing:border-box}.flex-gt-md-60{flex:1 1 60%;max-width:60%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-md-60{flex:1 1 60%;max-width:60%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-md-60{flex:1 1 60%;max-width:100%;max-height:60%;box-sizing:border-box}.layout-row>.flex-gt-md-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-md-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-md-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-md-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-md-row>.flex-gt-md-60{flex:1 1 60%;max-width:60%;max-height:100%;box-sizing:border-box}.layout-gt-md-column>.flex-gt-md-60{flex:1 1 60%;max-width:100%;max-height:60%;box-sizing:border-box}.flex-gt-md-65{flex:1 1 65%;max-width:65%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-md-65{flex:1 1 65%;max-width:65%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-md-65{flex:1 1 65%;max-width:100%;max-height:65%;box-sizing:border-box}.layout-row>.flex-gt-md-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-md-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-md-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-md-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-md-row>.flex-gt-md-65{flex:1 1 65%;max-width:65%;max-height:100%;box-sizing:border-box}.layout-gt-md-column>.flex-gt-md-65{flex:1 1 65%;max-width:100%;max-height:65%;box-sizing:border-box}.flex-gt-md-70{flex:1 1 70%;max-width:70%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-md-70{flex:1 1 70%;max-width:70%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-md-70{flex:1 1 70%;max-width:100%;max-height:70%;box-sizing:border-box}.layout-row>.flex-gt-md-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-md-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-md-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-md-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-md-row>.flex-gt-md-70{flex:1 1 70%;max-width:70%;max-height:100%;box-sizing:border-box}.layout-gt-md-column>.flex-gt-md-70{flex:1 1 70%;max-width:100%;max-height:70%;box-sizing:border-box}.flex-gt-md-75{flex:1 1 75%;max-width:75%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-md-75{flex:1 1 75%;max-width:75%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-md-75{flex:1 1 75%;max-width:100%;max-height:75%;box-sizing:border-box}.layout-row>.flex-gt-md-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-md-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-md-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-md-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-md-row>.flex-gt-md-75{flex:1 1 75%;max-width:75%;max-height:100%;box-sizing:border-box}.layout-gt-md-column>.flex-gt-md-75{flex:1 1 75%;max-width:100%;max-height:75%;box-sizing:border-box}.flex-gt-md-80{flex:1 1 80%;max-width:80%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-md-80{flex:1 1 80%;max-width:80%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-md-80{flex:1 1 80%;max-width:100%;max-height:80%;box-sizing:border-box}.layout-row>.flex-gt-md-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-md-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-md-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-md-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-md-row>.flex-gt-md-80{flex:1 1 80%;max-width:80%;max-height:100%;box-sizing:border-box}.layout-gt-md-column>.flex-gt-md-80{flex:1 1 80%;max-width:100%;max-height:80%;box-sizing:border-box}.flex-gt-md-85{flex:1 1 85%;max-width:85%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-md-85{flex:1 1 85%;max-width:85%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-md-85{flex:1 1 85%;max-width:100%;max-height:85%;box-sizing:border-box}.layout-row>.flex-gt-md-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-md-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-md-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-md-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-md-row>.flex-gt-md-85{flex:1 1 85%;max-width:85%;max-height:100%;box-sizing:border-box}.layout-gt-md-column>.flex-gt-md-85{flex:1 1 85%;max-width:100%;max-height:85%;box-sizing:border-box}.flex-gt-md-90{flex:1 1 90%;max-width:90%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-md-90{flex:1 1 90%;max-width:90%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-md-90{flex:1 1 90%;max-width:100%;max-height:90%;box-sizing:border-box}.layout-row>.flex-gt-md-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-md-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-md-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-md-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-md-row>.flex-gt-md-90{flex:1 1 90%;max-width:90%;max-height:100%;box-sizing:border-box}.layout-gt-md-column>.flex-gt-md-90{flex:1 1 90%;max-width:100%;max-height:90%;box-sizing:border-box}.flex-gt-md-95{flex:1 1 95%;max-width:95%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-md-95{flex:1 1 95%;max-width:95%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-md-95{flex:1 1 95%;max-width:100%;max-height:95%;box-sizing:border-box}.layout-row>.flex-gt-md-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-md-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-md-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-md-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-md-row>.flex-gt-md-95{flex:1 1 95%;max-width:95%;max-height:100%;box-sizing:border-box}.layout-gt-md-column>.flex-gt-md-95{flex:1 1 95%;max-width:100%;max-height:95%;box-sizing:border-box}.flex-gt-md-100{flex:1 1 100%;max-width:100%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-md-100{flex:1 1 100%;max-width:100%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-md-100{flex:1 1 100%;max-width:100%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-md-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-md-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-md-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-md-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-md-row>.flex-gt-md-100{flex:1 1 100%;max-width:100%;max-height:100%;box-sizing:border-box}.layout-gt-md-column>.flex-gt-md-100{flex:1 1 100%;max-width:100%;max-height:100%;box-sizing:border-box}.layout-gt-md-row>.flex-gt-md-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-gt-md-row>.flex-gt-md-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-gt-md-row>.flex{min-width:0}.layout-gt-md-column>.flex-gt-md-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-gt-md-column>.flex-gt-md-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-md-column>.flex{min-height:0}.layout-gt-md,.layout-gt-md-column,.layout-gt-md-row{box-sizing:border-box;display:-webkit-box;display:-webkit-flex;display:-moz-box;display:-ms-flexbox;display:flex}.layout-gt-md-column{flex-direction:column}.layout-gt-md-row{flex-direction:row}}@media (min-width:1280px) and (max-width:1919px){.hide-gt-md:not(.show-gt-xs):not(.show-gt-sm):not(.show-gt-md):not(.show-lg):not(.show),.hide-gt-sm:not(.show-gt-xs):not(.show-gt-sm):not(.show-gt-md):not(.show-lg):not(.show),.hide-gt-xs:not(.show-gt-xs):not(.show-gt-sm):not(.show-gt-md):not(.show-lg):not(.show),.hide:not(.show-gt-xs):not(.show-gt-sm):not(.show-gt-md):not(.show-lg):not(.show){display:none}.hide-lg:not(.show-lg):not(.show-gt-md):not(.show-gt-sm):not(.show-gt-xs):not(.show){display:none}.flex-order-lg--20{order:-20}.flex-order-lg--19{order:-19}.flex-order-lg--18{order:-18}.flex-order-lg--17{order:-17}.flex-order-lg--16{order:-16}.flex-order-lg--15{order:-15}.flex-order-lg--14{order:-14}.flex-order-lg--13{order:-13}.flex-order-lg--12{order:-12}.flex-order-lg--11{order:-11}.flex-order-lg--10{order:-10}.flex-order-lg--9{order:-9}.flex-order-lg--8{order:-8}.flex-order-lg--7{order:-7}.flex-order-lg--6{order:-6}.flex-order-lg--5{order:-5}.flex-order-lg--4{order:-4}.flex-order-lg--3{order:-3}.flex-order-lg--2{order:-2}.flex-order-lg--1{order:-1}.flex-order-lg-0{order:0}.flex-order-lg-1{order:1}.flex-order-lg-2{order:2}.flex-order-lg-3{order:3}.flex-order-lg-4{order:4}.flex-order-lg-5{order:5}.flex-order-lg-6{order:6}.flex-order-lg-7{order:7}.flex-order-lg-8{order:8}.flex-order-lg-9{order:9}.flex-order-lg-10{order:10}.flex-order-lg-11{order:11}.flex-order-lg-12{order:12}.flex-order-lg-13{order:13}.flex-order-lg-14{order:14}.flex-order-lg-15{order:15}.flex-order-lg-16{order:16}.flex-order-lg-17{order:17}.flex-order-lg-18{order:18}.flex-order-lg-19{order:19}.flex-order-lg-20{order:20}.flex-offset-lg-0,.offset-lg-0{margin-left:0}[dir=rtl] .flex-offset-lg-0,[dir=rtl] .offset-lg-0{margin-left:auto;margin-right:0}.flex-offset-lg-5,.offset-lg-5{margin-left:5%}[dir=rtl] .flex-offset-lg-5,[dir=rtl] .offset-lg-5{margin-left:auto;margin-right:5%}.flex-offset-lg-10,.offset-lg-10{margin-left:10%}[dir=rtl] .flex-offset-lg-10,[dir=rtl] .offset-lg-10{margin-left:auto;margin-right:10%}.flex-offset-lg-15,.offset-lg-15{margin-left:15%}[dir=rtl] .flex-offset-lg-15,[dir=rtl] .offset-lg-15{margin-left:auto;margin-right:15%}.flex-offset-lg-20,.offset-lg-20{margin-left:20%}[dir=rtl] .flex-offset-lg-20,[dir=rtl] .offset-lg-20{margin-left:auto;margin-right:20%}.flex-offset-lg-25,.offset-lg-25{margin-left:25%}[dir=rtl] .flex-offset-lg-25,[dir=rtl] .offset-lg-25{margin-left:auto;margin-right:25%}.flex-offset-lg-30,.offset-lg-30{margin-left:30%}[dir=rtl] .flex-offset-lg-30,[dir=rtl] .offset-lg-30{margin-left:auto;margin-right:30%}.flex-offset-lg-35,.offset-lg-35{margin-left:35%}[dir=rtl] .flex-offset-lg-35,[dir=rtl] .offset-lg-35{margin-left:auto;margin-right:35%}.flex-offset-lg-40,.offset-lg-40{margin-left:40%}[dir=rtl] .flex-offset-lg-40,[dir=rtl] .offset-lg-40{margin-left:auto;margin-right:40%}.flex-offset-lg-45,.offset-lg-45{margin-left:45%}[dir=rtl] .flex-offset-lg-45,[dir=rtl] .offset-lg-45{margin-left:auto;margin-right:45%}.flex-offset-lg-50,.offset-lg-50{margin-left:50%}[dir=rtl] .flex-offset-lg-50,[dir=rtl] .offset-lg-50{margin-left:auto;margin-right:50%}.flex-offset-lg-55,.offset-lg-55{margin-left:55%}[dir=rtl] .flex-offset-lg-55,[dir=rtl] .offset-lg-55{margin-left:auto;margin-right:55%}.flex-offset-lg-60,.offset-lg-60{margin-left:60%}[dir=rtl] .flex-offset-lg-60,[dir=rtl] .offset-lg-60{margin-left:auto;margin-right:60%}.flex-offset-lg-65,.offset-lg-65{margin-left:65%}[dir=rtl] .flex-offset-lg-65,[dir=rtl] .offset-lg-65{margin-left:auto;margin-right:65%}.flex-offset-lg-70,.offset-lg-70{margin-left:70%}[dir=rtl] .flex-offset-lg-70,[dir=rtl] .offset-lg-70{margin-left:auto;margin-right:70%}.flex-offset-lg-75,.offset-lg-75{margin-left:75%}[dir=rtl] .flex-offset-lg-75,[dir=rtl] .offset-lg-75{margin-left:auto;margin-right:75%}.flex-offset-lg-80,.offset-lg-80{margin-left:80%}[dir=rtl] .flex-offset-lg-80,[dir=rtl] .offset-lg-80{margin-left:auto;margin-right:80%}.flex-offset-lg-85,.offset-lg-85{margin-left:85%}[dir=rtl] .flex-offset-lg-85,[dir=rtl] .offset-lg-85{margin-left:auto;margin-right:85%}.flex-offset-lg-90,.offset-lg-90{margin-left:90%}[dir=rtl] .flex-offset-lg-90,[dir=rtl] .offset-lg-90{margin-left:auto;margin-right:90%}.flex-offset-lg-95,.offset-lg-95{margin-left:95%}[dir=rtl] .flex-offset-lg-95,[dir=rtl] .offset-lg-95{margin-left:auto;margin-right:95%}.flex-offset-lg-33,.offset-lg-33{margin-left:calc(100% / 3)}.flex-offset-lg-66,.offset-lg-66{margin-left:calc(200% / 3)}[dir=rtl] .flex-offset-lg-66,[dir=rtl] .offset-lg-66{margin-left:auto;margin-right:calc(200% / 3)}.layout-align-lg,.layout-align-lg-start-stretch{justify-content:flex-start;align-content:stretch;align-items:stretch}.layout-align-lg-start,.layout-align-lg-start-center,.layout-align-lg-start-end,.layout-align-lg-start-start,.layout-align-lg-start-stretch{justify-content:flex-start}.layout-align-lg-center,.layout-align-lg-center-center,.layout-align-lg-center-end,.layout-align-lg-center-start,.layout-align-lg-center-stretch{justify-content:center}.layout-align-lg-end,.layout-align-lg-end-center,.layout-align-lg-end-end,.layout-align-lg-end-start,.layout-align-lg-end-stretch{justify-content:flex-end}.layout-align-lg-space-around,.layout-align-lg-space-around-center,.layout-align-lg-space-around-end,.layout-align-lg-space-around-start,.layout-align-lg-space-around-stretch{justify-content:space-around}.layout-align-lg-space-between,.layout-align-lg-space-between-center,.layout-align-lg-space-between-end,.layout-align-lg-space-between-start,.layout-align-lg-space-between-stretch{justify-content:space-between}.layout-align-lg-center-start,.layout-align-lg-end-start,.layout-align-lg-space-around-start,.layout-align-lg-space-between-start,.layout-align-lg-start-start{align-items:flex-start;align-content:flex-start}.layout-align-lg-center-center,.layout-align-lg-end-center,.layout-align-lg-space-around-center,.layout-align-lg-space-between-center,.layout-align-lg-start-center{align-items:center;align-content:center;max-width:100%}.layout-align-lg-center-center>*,.layout-align-lg-end-center>*,.layout-align-lg-space-around-center>*,.layout-align-lg-space-between-center>*,.layout-align-lg-start-center>*{max-width:100%;box-sizing:border-box}.layout-align-lg-center-end,.layout-align-lg-end-end,.layout-align-lg-space-around-end,.layout-align-lg-space-between-end,.layout-align-lg-start-end{align-items:flex-end;align-content:flex-end}.layout-align-lg-center-stretch,.layout-align-lg-end-stretch,.layout-align-lg-space-around-stretch,.layout-align-lg-space-between-stretch,.layout-align-lg-start-stretch{align-items:stretch;align-content:stretch}.flex-lg{flex:1;box-sizing:border-box}.flex-lg-grow{flex:1 1 100%;box-sizing:border-box}.flex-lg-initial{flex:0 1 auto;box-sizing:border-box}.flex-lg-auto{flex:1 1 auto;box-sizing:border-box}.flex-lg-none{flex:0 0 auto;box-sizing:border-box}.flex-lg-noshrink{flex:1 0 auto;box-sizing:border-box}.flex-lg-nogrow{flex:0 1 auto;box-sizing:border-box}.flex-lg-0{flex:1 1 0%;max-width:0%;max-height:100%;box-sizing:border-box}.layout-row>.flex-lg-0{flex:1 1 0%;max-width:0%;max-height:100%;box-sizing:border-box;min-width:0}.layout-column>.flex-lg-0{flex:1 1 0%;max-width:100%;max-height:0%;box-sizing:border-box}.layout-row>.flex-lg-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-lg-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-lg-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-lg-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-lg-row>.flex-lg-0{flex:1 1 0%;max-width:0%;max-height:100%;box-sizing:border-box;min-width:0}.layout-lg-column>.flex-lg-0{flex:1 1 0%;max-width:100%;max-height:0%;box-sizing:border-box;min-height:0}.flex-lg-5{flex:1 1 5%;max-width:5%;max-height:100%;box-sizing:border-box}.layout-row>.flex-lg-5{flex:1 1 5%;max-width:5%;max-height:100%;box-sizing:border-box}.layout-column>.flex-lg-5{flex:1 1 5%;max-width:100%;max-height:5%;box-sizing:border-box}.layout-row>.flex-lg-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-lg-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-lg-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-lg-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-lg-row>.flex-lg-5{flex:1 1 5%;max-width:5%;max-height:100%;box-sizing:border-box}.layout-lg-column>.flex-lg-5{flex:1 1 5%;max-width:100%;max-height:5%;box-sizing:border-box}.flex-lg-10{flex:1 1 10%;max-width:10%;max-height:100%;box-sizing:border-box}.layout-row>.flex-lg-10{flex:1 1 10%;max-width:10%;max-height:100%;box-sizing:border-box}.layout-column>.flex-lg-10{flex:1 1 10%;max-width:100%;max-height:10%;box-sizing:border-box}.layout-row>.flex-lg-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-lg-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-lg-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-lg-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-lg-row>.flex-lg-10{flex:1 1 10%;max-width:10%;max-height:100%;box-sizing:border-box}.layout-lg-column>.flex-lg-10{flex:1 1 10%;max-width:100%;max-height:10%;box-sizing:border-box}.flex-lg-15{flex:1 1 15%;max-width:15%;max-height:100%;box-sizing:border-box}.layout-row>.flex-lg-15{flex:1 1 15%;max-width:15%;max-height:100%;box-sizing:border-box}.layout-column>.flex-lg-15{flex:1 1 15%;max-width:100%;max-height:15%;box-sizing:border-box}.layout-row>.flex-lg-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-lg-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-lg-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-lg-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-lg-row>.flex-lg-15{flex:1 1 15%;max-width:15%;max-height:100%;box-sizing:border-box}.layout-lg-column>.flex-lg-15{flex:1 1 15%;max-width:100%;max-height:15%;box-sizing:border-box}.flex-lg-20{flex:1 1 20%;max-width:20%;max-height:100%;box-sizing:border-box}.layout-row>.flex-lg-20{flex:1 1 20%;max-width:20%;max-height:100%;box-sizing:border-box}.layout-column>.flex-lg-20{flex:1 1 20%;max-width:100%;max-height:20%;box-sizing:border-box}.layout-row>.flex-lg-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-lg-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-lg-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-lg-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-lg-row>.flex-lg-20{flex:1 1 20%;max-width:20%;max-height:100%;box-sizing:border-box}.layout-lg-column>.flex-lg-20{flex:1 1 20%;max-width:100%;max-height:20%;box-sizing:border-box}.flex-lg-25{flex:1 1 25%;max-width:25%;max-height:100%;box-sizing:border-box}.layout-row>.flex-lg-25{flex:1 1 25%;max-width:25%;max-height:100%;box-sizing:border-box}.layout-column>.flex-lg-25{flex:1 1 25%;max-width:100%;max-height:25%;box-sizing:border-box}.layout-row>.flex-lg-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-lg-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-lg-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-lg-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-lg-row>.flex-lg-25{flex:1 1 25%;max-width:25%;max-height:100%;box-sizing:border-box}.layout-lg-column>.flex-lg-25{flex:1 1 25%;max-width:100%;max-height:25%;box-sizing:border-box}.flex-lg-30{flex:1 1 30%;max-width:30%;max-height:100%;box-sizing:border-box}.layout-row>.flex-lg-30{flex:1 1 30%;max-width:30%;max-height:100%;box-sizing:border-box}.layout-column>.flex-lg-30{flex:1 1 30%;max-width:100%;max-height:30%;box-sizing:border-box}.layout-row>.flex-lg-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-lg-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-lg-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-lg-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-lg-row>.flex-lg-30{flex:1 1 30%;max-width:30%;max-height:100%;box-sizing:border-box}.layout-lg-column>.flex-lg-30{flex:1 1 30%;max-width:100%;max-height:30%;box-sizing:border-box}.flex-lg-35{flex:1 1 35%;max-width:35%;max-height:100%;box-sizing:border-box}.layout-row>.flex-lg-35{flex:1 1 35%;max-width:35%;max-height:100%;box-sizing:border-box}.layout-column>.flex-lg-35{flex:1 1 35%;max-width:100%;max-height:35%;box-sizing:border-box}.layout-row>.flex-lg-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-lg-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-lg-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-lg-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-lg-row>.flex-lg-35{flex:1 1 35%;max-width:35%;max-height:100%;box-sizing:border-box}.layout-lg-column>.flex-lg-35{flex:1 1 35%;max-width:100%;max-height:35%;box-sizing:border-box}.flex-lg-40{flex:1 1 40%;max-width:40%;max-height:100%;box-sizing:border-box}.layout-row>.flex-lg-40{flex:1 1 40%;max-width:40%;max-height:100%;box-sizing:border-box}.layout-column>.flex-lg-40{flex:1 1 40%;max-width:100%;max-height:40%;box-sizing:border-box}.layout-row>.flex-lg-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-lg-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-lg-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-lg-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-lg-row>.flex-lg-40{flex:1 1 40%;max-width:40%;max-height:100%;box-sizing:border-box}.layout-lg-column>.flex-lg-40{flex:1 1 40%;max-width:100%;max-height:40%;box-sizing:border-box}.flex-lg-45{flex:1 1 45%;max-width:45%;max-height:100%;box-sizing:border-box}.layout-row>.flex-lg-45{flex:1 1 45%;max-width:45%;max-height:100%;box-sizing:border-box}.layout-column>.flex-lg-45{flex:1 1 45%;max-width:100%;max-height:45%;box-sizing:border-box}.layout-row>.flex-lg-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-lg-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-lg-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-lg-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-lg-row>.flex-lg-45{flex:1 1 45%;max-width:45%;max-height:100%;box-sizing:border-box}.layout-lg-column>.flex-lg-45{flex:1 1 45%;max-width:100%;max-height:45%;box-sizing:border-box}.flex-lg-50{flex:1 1 50%;max-width:50%;max-height:100%;box-sizing:border-box}.layout-row>.flex-lg-50{flex:1 1 50%;max-width:50%;max-height:100%;box-sizing:border-box}.layout-column>.flex-lg-50{flex:1 1 50%;max-width:100%;max-height:50%;box-sizing:border-box}.layout-row>.flex-lg-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-lg-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-lg-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-lg-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-lg-row>.flex-lg-50{flex:1 1 50%;max-width:50%;max-height:100%;box-sizing:border-box}.layout-lg-column>.flex-lg-50{flex:1 1 50%;max-width:100%;max-height:50%;box-sizing:border-box}.flex-lg-55{flex:1 1 55%;max-width:55%;max-height:100%;box-sizing:border-box}.layout-row>.flex-lg-55{flex:1 1 55%;max-width:55%;max-height:100%;box-sizing:border-box}.layout-column>.flex-lg-55{flex:1 1 55%;max-width:100%;max-height:55%;box-sizing:border-box}.layout-row>.flex-lg-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-lg-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-lg-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-lg-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-lg-row>.flex-lg-55{flex:1 1 55%;max-width:55%;max-height:100%;box-sizing:border-box}.layout-lg-column>.flex-lg-55{flex:1 1 55%;max-width:100%;max-height:55%;box-sizing:border-box}.flex-lg-60{flex:1 1 60%;max-width:60%;max-height:100%;box-sizing:border-box}.layout-row>.flex-lg-60{flex:1 1 60%;max-width:60%;max-height:100%;box-sizing:border-box}.layout-column>.flex-lg-60{flex:1 1 60%;max-width:100%;max-height:60%;box-sizing:border-box}.layout-row>.flex-lg-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-lg-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-lg-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-lg-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-lg-row>.flex-lg-60{flex:1 1 60%;max-width:60%;max-height:100%;box-sizing:border-box}.layout-lg-column>.flex-lg-60{flex:1 1 60%;max-width:100%;max-height:60%;box-sizing:border-box}.flex-lg-65{flex:1 1 65%;max-width:65%;max-height:100%;box-sizing:border-box}.layout-row>.flex-lg-65{flex:1 1 65%;max-width:65%;max-height:100%;box-sizing:border-box}.layout-column>.flex-lg-65{flex:1 1 65%;max-width:100%;max-height:65%;box-sizing:border-box}.layout-row>.flex-lg-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-lg-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-lg-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-lg-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-lg-row>.flex-lg-65{flex:1 1 65%;max-width:65%;max-height:100%;box-sizing:border-box}.layout-lg-column>.flex-lg-65{flex:1 1 65%;max-width:100%;max-height:65%;box-sizing:border-box}.flex-lg-70{flex:1 1 70%;max-width:70%;max-height:100%;box-sizing:border-box}.layout-row>.flex-lg-70{flex:1 1 70%;max-width:70%;max-height:100%;box-sizing:border-box}.layout-column>.flex-lg-70{flex:1 1 70%;max-width:100%;max-height:70%;box-sizing:border-box}.layout-row>.flex-lg-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-lg-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-lg-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-lg-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-lg-row>.flex-lg-70{flex:1 1 70%;max-width:70%;max-height:100%;box-sizing:border-box}.layout-lg-column>.flex-lg-70{flex:1 1 70%;max-width:100%;max-height:70%;box-sizing:border-box}.flex-lg-75{flex:1 1 75%;max-width:75%;max-height:100%;box-sizing:border-box}.layout-row>.flex-lg-75{flex:1 1 75%;max-width:75%;max-height:100%;box-sizing:border-box}.layout-column>.flex-lg-75{flex:1 1 75%;max-width:100%;max-height:75%;box-sizing:border-box}.layout-row>.flex-lg-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-lg-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-lg-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-lg-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-lg-row>.flex-lg-75{flex:1 1 75%;max-width:75%;max-height:100%;box-sizing:border-box}.layout-lg-column>.flex-lg-75{flex:1 1 75%;max-width:100%;max-height:75%;box-sizing:border-box}.flex-lg-80{flex:1 1 80%;max-width:80%;max-height:100%;box-sizing:border-box}.layout-row>.flex-lg-80{flex:1 1 80%;max-width:80%;max-height:100%;box-sizing:border-box}.layout-column>.flex-lg-80{flex:1 1 80%;max-width:100%;max-height:80%;box-sizing:border-box}.layout-row>.flex-lg-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-lg-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-lg-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-lg-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-lg-row>.flex-lg-80{flex:1 1 80%;max-width:80%;max-height:100%;box-sizing:border-box}.layout-lg-column>.flex-lg-80{flex:1 1 80%;max-width:100%;max-height:80%;box-sizing:border-box}.flex-lg-85{flex:1 1 85%;max-width:85%;max-height:100%;box-sizing:border-box}.layout-row>.flex-lg-85{flex:1 1 85%;max-width:85%;max-height:100%;box-sizing:border-box}.layout-column>.flex-lg-85{flex:1 1 85%;max-width:100%;max-height:85%;box-sizing:border-box}.layout-row>.flex-lg-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-lg-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-lg-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-lg-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-lg-row>.flex-lg-85{flex:1 1 85%;max-width:85%;max-height:100%;box-sizing:border-box}.layout-lg-column>.flex-lg-85{flex:1 1 85%;max-width:100%;max-height:85%;box-sizing:border-box}.flex-lg-90{flex:1 1 90%;max-width:90%;max-height:100%;box-sizing:border-box}.layout-row>.flex-lg-90{flex:1 1 90%;max-width:90%;max-height:100%;box-sizing:border-box}.layout-column>.flex-lg-90{flex:1 1 90%;max-width:100%;max-height:90%;box-sizing:border-box}.layout-row>.flex-lg-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-lg-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-lg-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-lg-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-lg-row>.flex-lg-90{flex:1 1 90%;max-width:90%;max-height:100%;box-sizing:border-box}.layout-lg-column>.flex-lg-90{flex:1 1 90%;max-width:100%;max-height:90%;box-sizing:border-box}.flex-lg-95{flex:1 1 95%;max-width:95%;max-height:100%;box-sizing:border-box}.layout-row>.flex-lg-95{flex:1 1 95%;max-width:95%;max-height:100%;box-sizing:border-box}.layout-column>.flex-lg-95{flex:1 1 95%;max-width:100%;max-height:95%;box-sizing:border-box}.layout-row>.flex-lg-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-lg-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-lg-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-lg-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-lg-row>.flex-lg-95{flex:1 1 95%;max-width:95%;max-height:100%;box-sizing:border-box}.layout-lg-column>.flex-lg-95{flex:1 1 95%;max-width:100%;max-height:95%;box-sizing:border-box}.flex-lg-100{flex:1 1 100%;max-width:100%;max-height:100%;box-sizing:border-box}.layout-row>.flex-lg-100{flex:1 1 100%;max-width:100%;max-height:100%;box-sizing:border-box}.layout-column>.flex-lg-100{flex:1 1 100%;max-width:100%;max-height:100%;box-sizing:border-box}.layout-row>.flex-lg-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-lg-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-lg-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-lg-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-lg-row>.flex-lg-100{flex:1 1 100%;max-width:100%;max-height:100%;box-sizing:border-box}.layout-lg-column>.flex-lg-100{flex:1 1 100%;max-width:100%;max-height:100%;box-sizing:border-box}.layout-lg-row>.flex-lg-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-lg-row>.flex-lg-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-lg-row>.flex{min-width:0}.layout-lg-column>.flex-lg-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-lg-column>.flex-lg-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-lg-column>.flex{min-height:0}.layout-lg,.layout-lg-column,.layout-lg-row{box-sizing:border-box;display:-webkit-box;display:-webkit-flex;display:-moz-box;display:-ms-flexbox;display:flex}.layout-lg-column{flex-direction:column}.layout-lg-row{flex-direction:row}}@media (min-width:1920px){.flex-order-gt-lg--20{order:-20}.flex-order-gt-lg--19{order:-19}.flex-order-gt-lg--18{order:-18}.flex-order-gt-lg--17{order:-17}.flex-order-gt-lg--16{order:-16}.flex-order-gt-lg--15{order:-15}.flex-order-gt-lg--14{order:-14}.flex-order-gt-lg--13{order:-13}.flex-order-gt-lg--12{order:-12}.flex-order-gt-lg--11{order:-11}.flex-order-gt-lg--10{order:-10}.flex-order-gt-lg--9{order:-9}.flex-order-gt-lg--8{order:-8}.flex-order-gt-lg--7{order:-7}.flex-order-gt-lg--6{order:-6}.flex-order-gt-lg--5{order:-5}.flex-order-gt-lg--4{order:-4}.flex-order-gt-lg--3{order:-3}.flex-order-gt-lg--2{order:-2}.flex-order-gt-lg--1{order:-1}.flex-order-gt-lg-0{order:0}.flex-order-gt-lg-1{order:1}.flex-order-gt-lg-2{order:2}.flex-order-gt-lg-3{order:3}.flex-order-gt-lg-4{order:4}.flex-order-gt-lg-5{order:5}.flex-order-gt-lg-6{order:6}.flex-order-gt-lg-7{order:7}.flex-order-gt-lg-8{order:8}.flex-order-gt-lg-9{order:9}.flex-order-gt-lg-10{order:10}.flex-order-gt-lg-11{order:11}.flex-order-gt-lg-12{order:12}.flex-order-gt-lg-13{order:13}.flex-order-gt-lg-14{order:14}.flex-order-gt-lg-15{order:15}.flex-order-gt-lg-16{order:16}.flex-order-gt-lg-17{order:17}.flex-order-gt-lg-18{order:18}.flex-order-gt-lg-19{order:19}.flex-order-gt-lg-20{order:20}.flex-offset-gt-lg-0,.offset-gt-lg-0{margin-left:0}[dir=rtl] .flex-offset-gt-lg-0,[dir=rtl] .offset-gt-lg-0{margin-left:auto;margin-right:0}.flex-offset-gt-lg-5,.offset-gt-lg-5{margin-left:5%}[dir=rtl] .flex-offset-gt-lg-5,[dir=rtl] .offset-gt-lg-5{margin-left:auto;margin-right:5%}.flex-offset-gt-lg-10,.offset-gt-lg-10{margin-left:10%}[dir=rtl] .flex-offset-gt-lg-10,[dir=rtl] .offset-gt-lg-10{margin-left:auto;margin-right:10%}.flex-offset-gt-lg-15,.offset-gt-lg-15{margin-left:15%}[dir=rtl] .flex-offset-gt-lg-15,[dir=rtl] .offset-gt-lg-15{margin-left:auto;margin-right:15%}.flex-offset-gt-lg-20,.offset-gt-lg-20{margin-left:20%}[dir=rtl] .flex-offset-gt-lg-20,[dir=rtl] .offset-gt-lg-20{margin-left:auto;margin-right:20%}.flex-offset-gt-lg-25,.offset-gt-lg-25{margin-left:25%}[dir=rtl] .flex-offset-gt-lg-25,[dir=rtl] .offset-gt-lg-25{margin-left:auto;margin-right:25%}.flex-offset-gt-lg-30,.offset-gt-lg-30{margin-left:30%}[dir=rtl] .flex-offset-gt-lg-30,[dir=rtl] .offset-gt-lg-30{margin-left:auto;margin-right:30%}.flex-offset-gt-lg-35,.offset-gt-lg-35{margin-left:35%}[dir=rtl] .flex-offset-gt-lg-35,[dir=rtl] .offset-gt-lg-35{margin-left:auto;margin-right:35%}.flex-offset-gt-lg-40,.offset-gt-lg-40{margin-left:40%}[dir=rtl] .flex-offset-gt-lg-40,[dir=rtl] .offset-gt-lg-40{margin-left:auto;margin-right:40%}.flex-offset-gt-lg-45,.offset-gt-lg-45{margin-left:45%}[dir=rtl] .flex-offset-gt-lg-45,[dir=rtl] .offset-gt-lg-45{margin-left:auto;margin-right:45%}.flex-offset-gt-lg-50,.offset-gt-lg-50{margin-left:50%}[dir=rtl] .flex-offset-gt-lg-50,[dir=rtl] .offset-gt-lg-50{margin-left:auto;margin-right:50%}.flex-offset-gt-lg-55,.offset-gt-lg-55{margin-left:55%}[dir=rtl] .flex-offset-gt-lg-55,[dir=rtl] .offset-gt-lg-55{margin-left:auto;margin-right:55%}.flex-offset-gt-lg-60,.offset-gt-lg-60{margin-left:60%}[dir=rtl] .flex-offset-gt-lg-60,[dir=rtl] .offset-gt-lg-60{margin-left:auto;margin-right:60%}.flex-offset-gt-lg-65,.offset-gt-lg-65{margin-left:65%}[dir=rtl] .flex-offset-gt-lg-65,[dir=rtl] .offset-gt-lg-65{margin-left:auto;margin-right:65%}.flex-offset-gt-lg-70,.offset-gt-lg-70{margin-left:70%}[dir=rtl] .flex-offset-gt-lg-70,[dir=rtl] .offset-gt-lg-70{margin-left:auto;margin-right:70%}.flex-offset-gt-lg-75,.offset-gt-lg-75{margin-left:75%}[dir=rtl] .flex-offset-gt-lg-75,[dir=rtl] .offset-gt-lg-75{margin-left:auto;margin-right:75%}.flex-offset-gt-lg-80,.offset-gt-lg-80{margin-left:80%}[dir=rtl] .flex-offset-gt-lg-80,[dir=rtl] .offset-gt-lg-80{margin-left:auto;margin-right:80%}.flex-offset-gt-lg-85,.offset-gt-lg-85{margin-left:85%}[dir=rtl] .flex-offset-gt-lg-85,[dir=rtl] .offset-gt-lg-85{margin-left:auto;margin-right:85%}.flex-offset-gt-lg-90,.offset-gt-lg-90{margin-left:90%}[dir=rtl] .flex-offset-gt-lg-90,[dir=rtl] .offset-gt-lg-90{margin-left:auto;margin-right:90%}.flex-offset-gt-lg-95,.offset-gt-lg-95{margin-left:95%}[dir=rtl] .flex-offset-gt-lg-95,[dir=rtl] .offset-gt-lg-95{margin-left:auto;margin-right:95%}.flex-offset-gt-lg-33,.offset-gt-lg-33{margin-left:calc(100% / 3)}.flex-offset-gt-lg-66,.offset-gt-lg-66{margin-left:calc(200% / 3)}[dir=rtl] .flex-offset-gt-lg-66,[dir=rtl] .offset-gt-lg-66{margin-left:auto;margin-right:calc(200% / 3)}.layout-align-gt-lg,.layout-align-gt-lg-start-stretch{justify-content:flex-start;align-content:stretch;align-items:stretch}.layout-align-gt-lg-start,.layout-align-gt-lg-start-center,.layout-align-gt-lg-start-end,.layout-align-gt-lg-start-start,.layout-align-gt-lg-start-stretch{justify-content:flex-start}.layout-align-gt-lg-center,.layout-align-gt-lg-center-center,.layout-align-gt-lg-center-end,.layout-align-gt-lg-center-start,.layout-align-gt-lg-center-stretch{justify-content:center}.layout-align-gt-lg-end,.layout-align-gt-lg-end-center,.layout-align-gt-lg-end-end,.layout-align-gt-lg-end-start,.layout-align-gt-lg-end-stretch{justify-content:flex-end}.layout-align-gt-lg-space-around,.layout-align-gt-lg-space-around-center,.layout-align-gt-lg-space-around-end,.layout-align-gt-lg-space-around-start,.layout-align-gt-lg-space-around-stretch{justify-content:space-around}.layout-align-gt-lg-space-between,.layout-align-gt-lg-space-between-center,.layout-align-gt-lg-space-between-end,.layout-align-gt-lg-space-between-start,.layout-align-gt-lg-space-between-stretch{justify-content:space-between}.layout-align-gt-lg-center-start,.layout-align-gt-lg-end-start,.layout-align-gt-lg-space-around-start,.layout-align-gt-lg-space-between-start,.layout-align-gt-lg-start-start{align-items:flex-start;align-content:flex-start}.layout-align-gt-lg-center-center,.layout-align-gt-lg-end-center,.layout-align-gt-lg-space-around-center,.layout-align-gt-lg-space-between-center,.layout-align-gt-lg-start-center{align-items:center;align-content:center;max-width:100%}.layout-align-gt-lg-center-center>*,.layout-align-gt-lg-end-center>*,.layout-align-gt-lg-space-around-center>*,.layout-align-gt-lg-space-between-center>*,.layout-align-gt-lg-start-center>*{max-width:100%;box-sizing:border-box}.layout-align-gt-lg-center-end,.layout-align-gt-lg-end-end,.layout-align-gt-lg-space-around-end,.layout-align-gt-lg-space-between-end,.layout-align-gt-lg-start-end{align-items:flex-end;align-content:flex-end}.layout-align-gt-lg-center-stretch,.layout-align-gt-lg-end-stretch,.layout-align-gt-lg-space-around-stretch,.layout-align-gt-lg-space-between-stretch,.layout-align-gt-lg-start-stretch{align-items:stretch;align-content:stretch}.flex-gt-lg{flex:1;box-sizing:border-box}.flex-gt-lg-grow{flex:1 1 100%;box-sizing:border-box}.flex-gt-lg-initial{flex:0 1 auto;box-sizing:border-box}.flex-gt-lg-auto{flex:1 1 auto;box-sizing:border-box}.flex-gt-lg-none{flex:0 0 auto;box-sizing:border-box}.flex-gt-lg-noshrink{flex:1 0 auto;box-sizing:border-box}.flex-gt-lg-nogrow{flex:0 1 auto;box-sizing:border-box}.flex-gt-lg-0{flex:1 1 0%;max-width:0%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-lg-0{flex:1 1 0%;max-width:0%;max-height:100%;box-sizing:border-box;min-width:0}.layout-column>.flex-gt-lg-0{flex:1 1 0%;max-width:100%;max-height:0%;box-sizing:border-box}.layout-row>.flex-gt-lg-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-lg-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-lg-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-lg-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-lg-row>.flex-gt-lg-0{flex:1 1 0%;max-width:0%;max-height:100%;box-sizing:border-box;min-width:0}.layout-gt-lg-column>.flex-gt-lg-0{flex:1 1 0%;max-width:100%;max-height:0%;box-sizing:border-box;min-height:0}.flex-gt-lg-5{flex:1 1 5%;max-width:5%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-lg-5{flex:1 1 5%;max-width:5%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-lg-5{flex:1 1 5%;max-width:100%;max-height:5%;box-sizing:border-box}.layout-row>.flex-gt-lg-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-lg-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-lg-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-lg-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-lg-row>.flex-gt-lg-5{flex:1 1 5%;max-width:5%;max-height:100%;box-sizing:border-box}.layout-gt-lg-column>.flex-gt-lg-5{flex:1 1 5%;max-width:100%;max-height:5%;box-sizing:border-box}.flex-gt-lg-10{flex:1 1 10%;max-width:10%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-lg-10{flex:1 1 10%;max-width:10%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-lg-10{flex:1 1 10%;max-width:100%;max-height:10%;box-sizing:border-box}.layout-row>.flex-gt-lg-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-lg-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-lg-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-lg-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-lg-row>.flex-gt-lg-10{flex:1 1 10%;max-width:10%;max-height:100%;box-sizing:border-box}.layout-gt-lg-column>.flex-gt-lg-10{flex:1 1 10%;max-width:100%;max-height:10%;box-sizing:border-box}.flex-gt-lg-15{flex:1 1 15%;max-width:15%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-lg-15{flex:1 1 15%;max-width:15%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-lg-15{flex:1 1 15%;max-width:100%;max-height:15%;box-sizing:border-box}.layout-row>.flex-gt-lg-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-lg-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-lg-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-lg-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-lg-row>.flex-gt-lg-15{flex:1 1 15%;max-width:15%;max-height:100%;box-sizing:border-box}.layout-gt-lg-column>.flex-gt-lg-15{flex:1 1 15%;max-width:100%;max-height:15%;box-sizing:border-box}.flex-gt-lg-20{flex:1 1 20%;max-width:20%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-lg-20{flex:1 1 20%;max-width:20%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-lg-20{flex:1 1 20%;max-width:100%;max-height:20%;box-sizing:border-box}.layout-row>.flex-gt-lg-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-lg-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-lg-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-lg-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-lg-row>.flex-gt-lg-20{flex:1 1 20%;max-width:20%;max-height:100%;box-sizing:border-box}.layout-gt-lg-column>.flex-gt-lg-20{flex:1 1 20%;max-width:100%;max-height:20%;box-sizing:border-box}.flex-gt-lg-25{flex:1 1 25%;max-width:25%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-lg-25{flex:1 1 25%;max-width:25%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-lg-25{flex:1 1 25%;max-width:100%;max-height:25%;box-sizing:border-box}.layout-row>.flex-gt-lg-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-lg-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-lg-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-lg-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-lg-row>.flex-gt-lg-25{flex:1 1 25%;max-width:25%;max-height:100%;box-sizing:border-box}.layout-gt-lg-column>.flex-gt-lg-25{flex:1 1 25%;max-width:100%;max-height:25%;box-sizing:border-box}.flex-gt-lg-30{flex:1 1 30%;max-width:30%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-lg-30{flex:1 1 30%;max-width:30%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-lg-30{flex:1 1 30%;max-width:100%;max-height:30%;box-sizing:border-box}.layout-row>.flex-gt-lg-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-lg-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-lg-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-lg-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-lg-row>.flex-gt-lg-30{flex:1 1 30%;max-width:30%;max-height:100%;box-sizing:border-box}.layout-gt-lg-column>.flex-gt-lg-30{flex:1 1 30%;max-width:100%;max-height:30%;box-sizing:border-box}.flex-gt-lg-35{flex:1 1 35%;max-width:35%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-lg-35{flex:1 1 35%;max-width:35%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-lg-35{flex:1 1 35%;max-width:100%;max-height:35%;box-sizing:border-box}.layout-row>.flex-gt-lg-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-lg-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-lg-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-lg-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-lg-row>.flex-gt-lg-35{flex:1 1 35%;max-width:35%;max-height:100%;box-sizing:border-box}.layout-gt-lg-column>.flex-gt-lg-35{flex:1 1 35%;max-width:100%;max-height:35%;box-sizing:border-box}.flex-gt-lg-40{flex:1 1 40%;max-width:40%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-lg-40{flex:1 1 40%;max-width:40%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-lg-40{flex:1 1 40%;max-width:100%;max-height:40%;box-sizing:border-box}.layout-row>.flex-gt-lg-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-lg-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-lg-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-lg-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-lg-row>.flex-gt-lg-40{flex:1 1 40%;max-width:40%;max-height:100%;box-sizing:border-box}.layout-gt-lg-column>.flex-gt-lg-40{flex:1 1 40%;max-width:100%;max-height:40%;box-sizing:border-box}.flex-gt-lg-45{flex:1 1 45%;max-width:45%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-lg-45{flex:1 1 45%;max-width:45%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-lg-45{flex:1 1 45%;max-width:100%;max-height:45%;box-sizing:border-box}.layout-row>.flex-gt-lg-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-lg-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-lg-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-lg-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-lg-row>.flex-gt-lg-45{flex:1 1 45%;max-width:45%;max-height:100%;box-sizing:border-box}.layout-gt-lg-column>.flex-gt-lg-45{flex:1 1 45%;max-width:100%;max-height:45%;box-sizing:border-box}.flex-gt-lg-50{flex:1 1 50%;max-width:50%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-lg-50{flex:1 1 50%;max-width:50%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-lg-50{flex:1 1 50%;max-width:100%;max-height:50%;box-sizing:border-box}.layout-row>.flex-gt-lg-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-lg-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-lg-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-lg-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-lg-row>.flex-gt-lg-50{flex:1 1 50%;max-width:50%;max-height:100%;box-sizing:border-box}.layout-gt-lg-column>.flex-gt-lg-50{flex:1 1 50%;max-width:100%;max-height:50%;box-sizing:border-box}.flex-gt-lg-55{flex:1 1 55%;max-width:55%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-lg-55{flex:1 1 55%;max-width:55%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-lg-55{flex:1 1 55%;max-width:100%;max-height:55%;box-sizing:border-box}.layout-row>.flex-gt-lg-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-lg-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-lg-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-lg-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-lg-row>.flex-gt-lg-55{flex:1 1 55%;max-width:55%;max-height:100%;box-sizing:border-box}.layout-gt-lg-column>.flex-gt-lg-55{flex:1 1 55%;max-width:100%;max-height:55%;box-sizing:border-box}.flex-gt-lg-60{flex:1 1 60%;max-width:60%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-lg-60{flex:1 1 60%;max-width:60%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-lg-60{flex:1 1 60%;max-width:100%;max-height:60%;box-sizing:border-box}.layout-row>.flex-gt-lg-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-lg-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-lg-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-lg-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-lg-row>.flex-gt-lg-60{flex:1 1 60%;max-width:60%;max-height:100%;box-sizing:border-box}.layout-gt-lg-column>.flex-gt-lg-60{flex:1 1 60%;max-width:100%;max-height:60%;box-sizing:border-box}.flex-gt-lg-65{flex:1 1 65%;max-width:65%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-lg-65{flex:1 1 65%;max-width:65%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-lg-65{flex:1 1 65%;max-width:100%;max-height:65%;box-sizing:border-box}.layout-row>.flex-gt-lg-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-lg-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-lg-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-lg-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-lg-row>.flex-gt-lg-65{flex:1 1 65%;max-width:65%;max-height:100%;box-sizing:border-box}.layout-gt-lg-column>.flex-gt-lg-65{flex:1 1 65%;max-width:100%;max-height:65%;box-sizing:border-box}.flex-gt-lg-70{flex:1 1 70%;max-width:70%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-lg-70{flex:1 1 70%;max-width:70%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-lg-70{flex:1 1 70%;max-width:100%;max-height:70%;box-sizing:border-box}.layout-row>.flex-gt-lg-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-lg-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-lg-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-lg-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-lg-row>.flex-gt-lg-70{flex:1 1 70%;max-width:70%;max-height:100%;box-sizing:border-box}.layout-gt-lg-column>.flex-gt-lg-70{flex:1 1 70%;max-width:100%;max-height:70%;box-sizing:border-box}.flex-gt-lg-75{flex:1 1 75%;max-width:75%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-lg-75{flex:1 1 75%;max-width:75%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-lg-75{flex:1 1 75%;max-width:100%;max-height:75%;box-sizing:border-box}.layout-row>.flex-gt-lg-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-lg-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-lg-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-lg-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-lg-row>.flex-gt-lg-75{flex:1 1 75%;max-width:75%;max-height:100%;box-sizing:border-box}.layout-gt-lg-column>.flex-gt-lg-75{flex:1 1 75%;max-width:100%;max-height:75%;box-sizing:border-box}.flex-gt-lg-80{flex:1 1 80%;max-width:80%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-lg-80{flex:1 1 80%;max-width:80%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-lg-80{flex:1 1 80%;max-width:100%;max-height:80%;box-sizing:border-box}.layout-row>.flex-gt-lg-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-lg-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-lg-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-lg-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-lg-row>.flex-gt-lg-80{flex:1 1 80%;max-width:80%;max-height:100%;box-sizing:border-box}.layout-gt-lg-column>.flex-gt-lg-80{flex:1 1 80%;max-width:100%;max-height:80%;box-sizing:border-box}.flex-gt-lg-85{flex:1 1 85%;max-width:85%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-lg-85{flex:1 1 85%;max-width:85%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-lg-85{flex:1 1 85%;max-width:100%;max-height:85%;box-sizing:border-box}.layout-row>.flex-gt-lg-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-lg-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-lg-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-lg-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-lg-row>.flex-gt-lg-85{flex:1 1 85%;max-width:85%;max-height:100%;box-sizing:border-box}.layout-gt-lg-column>.flex-gt-lg-85{flex:1 1 85%;max-width:100%;max-height:85%;box-sizing:border-box}.flex-gt-lg-90{flex:1 1 90%;max-width:90%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-lg-90{flex:1 1 90%;max-width:90%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-lg-90{flex:1 1 90%;max-width:100%;max-height:90%;box-sizing:border-box}.layout-row>.flex-gt-lg-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-lg-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-lg-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-lg-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-lg-row>.flex-gt-lg-90{flex:1 1 90%;max-width:90%;max-height:100%;box-sizing:border-box}.layout-gt-lg-column>.flex-gt-lg-90{flex:1 1 90%;max-width:100%;max-height:90%;box-sizing:border-box}.flex-gt-lg-95{flex:1 1 95%;max-width:95%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-lg-95{flex:1 1 95%;max-width:95%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-lg-95{flex:1 1 95%;max-width:100%;max-height:95%;box-sizing:border-box}.layout-row>.flex-gt-lg-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-lg-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-lg-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-lg-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-lg-row>.flex-gt-lg-95{flex:1 1 95%;max-width:95%;max-height:100%;box-sizing:border-box}.layout-gt-lg-column>.flex-gt-lg-95{flex:1 1 95%;max-width:100%;max-height:95%;box-sizing:border-box}.flex-gt-lg-100{flex:1 1 100%;max-width:100%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-lg-100{flex:1 1 100%;max-width:100%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-lg-100{flex:1 1 100%;max-width:100%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-lg-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-gt-lg-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-gt-lg-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-gt-lg-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-lg-row>.flex-gt-lg-100{flex:1 1 100%;max-width:100%;max-height:100%;box-sizing:border-box}.layout-gt-lg-column>.flex-gt-lg-100{flex:1 1 100%;max-width:100%;max-height:100%;box-sizing:border-box}.layout-gt-lg-row>.flex-gt-lg-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-gt-lg-row>.flex-gt-lg-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-gt-lg-row>.flex{min-width:0}.layout-gt-lg-column>.flex-gt-lg-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-gt-lg-column>.flex-gt-lg-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-gt-lg-column>.flex{min-height:0}.layout-gt-lg,.layout-gt-lg-column,.layout-gt-lg-row{box-sizing:border-box;display:-webkit-box;display:-webkit-flex;display:-moz-box;display:-ms-flexbox;display:flex}.layout-gt-lg-column{flex-direction:column}.layout-gt-lg-row{flex-direction:row}.flex-order-xl--20{order:-20}.flex-order-xl--19{order:-19}.flex-order-xl--18{order:-18}.flex-order-xl--17{order:-17}.flex-order-xl--16{order:-16}.flex-order-xl--15{order:-15}.flex-order-xl--14{order:-14}.flex-order-xl--13{order:-13}.flex-order-xl--12{order:-12}.flex-order-xl--11{order:-11}.flex-order-xl--10{order:-10}.flex-order-xl--9{order:-9}.flex-order-xl--8{order:-8}.flex-order-xl--7{order:-7}.flex-order-xl--6{order:-6}.flex-order-xl--5{order:-5}.flex-order-xl--4{order:-4}.flex-order-xl--3{order:-3}.flex-order-xl--2{order:-2}.flex-order-xl--1{order:-1}.flex-order-xl-0{order:0}.flex-order-xl-1{order:1}.flex-order-xl-2{order:2}.flex-order-xl-3{order:3}.flex-order-xl-4{order:4}.flex-order-xl-5{order:5}.flex-order-xl-6{order:6}.flex-order-xl-7{order:7}.flex-order-xl-8{order:8}.flex-order-xl-9{order:9}.flex-order-xl-10{order:10}.flex-order-xl-11{order:11}.flex-order-xl-12{order:12}.flex-order-xl-13{order:13}.flex-order-xl-14{order:14}.flex-order-xl-15{order:15}.flex-order-xl-16{order:16}.flex-order-xl-17{order:17}.flex-order-xl-18{order:18}.flex-order-xl-19{order:19}.flex-order-xl-20{order:20}.flex-offset-xl-0,.offset-xl-0{margin-left:0}[dir=rtl] .flex-offset-xl-0,[dir=rtl] .offset-xl-0{margin-left:auto;margin-right:0}.flex-offset-xl-5,.offset-xl-5{margin-left:5%}[dir=rtl] .flex-offset-xl-5,[dir=rtl] .offset-xl-5{margin-left:auto;margin-right:5%}.flex-offset-xl-10,.offset-xl-10{margin-left:10%}[dir=rtl] .flex-offset-xl-10,[dir=rtl] .offset-xl-10{margin-left:auto;margin-right:10%}.flex-offset-xl-15,.offset-xl-15{margin-left:15%}[dir=rtl] .flex-offset-xl-15,[dir=rtl] .offset-xl-15{margin-left:auto;margin-right:15%}.flex-offset-xl-20,.offset-xl-20{margin-left:20%}[dir=rtl] .flex-offset-xl-20,[dir=rtl] .offset-xl-20{margin-left:auto;margin-right:20%}.flex-offset-xl-25,.offset-xl-25{margin-left:25%}[dir=rtl] .flex-offset-xl-25,[dir=rtl] .offset-xl-25{margin-left:auto;margin-right:25%}.flex-offset-xl-30,.offset-xl-30{margin-left:30%}[dir=rtl] .flex-offset-xl-30,[dir=rtl] .offset-xl-30{margin-left:auto;margin-right:30%}.flex-offset-xl-35,.offset-xl-35{margin-left:35%}[dir=rtl] .flex-offset-xl-35,[dir=rtl] .offset-xl-35{margin-left:auto;margin-right:35%}.flex-offset-xl-40,.offset-xl-40{margin-left:40%}[dir=rtl] .flex-offset-xl-40,[dir=rtl] .offset-xl-40{margin-left:auto;margin-right:40%}.flex-offset-xl-45,.offset-xl-45{margin-left:45%}[dir=rtl] .flex-offset-xl-45,[dir=rtl] .offset-xl-45{margin-left:auto;margin-right:45%}.flex-offset-xl-50,.offset-xl-50{margin-left:50%}[dir=rtl] .flex-offset-xl-50,[dir=rtl] .offset-xl-50{margin-left:auto;margin-right:50%}.flex-offset-xl-55,.offset-xl-55{margin-left:55%}[dir=rtl] .flex-offset-xl-55,[dir=rtl] .offset-xl-55{margin-left:auto;margin-right:55%}.flex-offset-xl-60,.offset-xl-60{margin-left:60%}[dir=rtl] .flex-offset-xl-60,[dir=rtl] .offset-xl-60{margin-left:auto;margin-right:60%}.flex-offset-xl-65,.offset-xl-65{margin-left:65%}[dir=rtl] .flex-offset-xl-65,[dir=rtl] .offset-xl-65{margin-left:auto;margin-right:65%}.flex-offset-xl-70,.offset-xl-70{margin-left:70%}[dir=rtl] .flex-offset-xl-70,[dir=rtl] .offset-xl-70{margin-left:auto;margin-right:70%}.flex-offset-xl-75,.offset-xl-75{margin-left:75%}[dir=rtl] .flex-offset-xl-75,[dir=rtl] .offset-xl-75{margin-left:auto;margin-right:75%}.flex-offset-xl-80,.offset-xl-80{margin-left:80%}[dir=rtl] .flex-offset-xl-80,[dir=rtl] .offset-xl-80{margin-left:auto;margin-right:80%}.flex-offset-xl-85,.offset-xl-85{margin-left:85%}[dir=rtl] .flex-offset-xl-85,[dir=rtl] .offset-xl-85{margin-left:auto;margin-right:85%}.flex-offset-xl-90,.offset-xl-90{margin-left:90%}[dir=rtl] .flex-offset-xl-90,[dir=rtl] .offset-xl-90{margin-left:auto;margin-right:90%}.flex-offset-xl-95,.offset-xl-95{margin-left:95%}[dir=rtl] .flex-offset-xl-95,[dir=rtl] .offset-xl-95{margin-left:auto;margin-right:95%}.flex-offset-xl-33,.offset-xl-33{margin-left:calc(100% / 3)}.flex-offset-xl-66,.offset-xl-66{margin-left:calc(200% / 3)}[dir=rtl] .flex-offset-xl-66,[dir=rtl] .offset-xl-66{margin-left:auto;margin-right:calc(200% / 3)}.layout-align-xl,.layout-align-xl-start-stretch{justify-content:flex-start;align-content:stretch;align-items:stretch}.layout-align-xl-start,.layout-align-xl-start-center,.layout-align-xl-start-end,.layout-align-xl-start-start,.layout-align-xl-start-stretch{justify-content:flex-start}.layout-align-xl-center,.layout-align-xl-center-center,.layout-align-xl-center-end,.layout-align-xl-center-start,.layout-align-xl-center-stretch{justify-content:center}.layout-align-xl-end,.layout-align-xl-end-center,.layout-align-xl-end-end,.layout-align-xl-end-start,.layout-align-xl-end-stretch{justify-content:flex-end}.layout-align-xl-space-around,.layout-align-xl-space-around-center,.layout-align-xl-space-around-end,.layout-align-xl-space-around-start,.layout-align-xl-space-around-stretch{justify-content:space-around}.layout-align-xl-space-between,.layout-align-xl-space-between-center,.layout-align-xl-space-between-end,.layout-align-xl-space-between-start,.layout-align-xl-space-between-stretch{justify-content:space-between}.layout-align-xl-center-start,.layout-align-xl-end-start,.layout-align-xl-space-around-start,.layout-align-xl-space-between-start,.layout-align-xl-start-start{align-items:flex-start;align-content:flex-start}.layout-align-xl-center-center,.layout-align-xl-end-center,.layout-align-xl-space-around-center,.layout-align-xl-space-between-center,.layout-align-xl-start-center{align-items:center;align-content:center;max-width:100%}.layout-align-xl-center-center>*,.layout-align-xl-end-center>*,.layout-align-xl-space-around-center>*,.layout-align-xl-space-between-center>*,.layout-align-xl-start-center>*{max-width:100%;box-sizing:border-box}.layout-align-xl-center-end,.layout-align-xl-end-end,.layout-align-xl-space-around-end,.layout-align-xl-space-between-end,.layout-align-xl-start-end{align-items:flex-end;align-content:flex-end}.layout-align-xl-center-stretch,.layout-align-xl-end-stretch,.layout-align-xl-space-around-stretch,.layout-align-xl-space-between-stretch,.layout-align-xl-start-stretch{align-items:stretch;align-content:stretch}.flex-xl{flex:1;box-sizing:border-box}.flex-xl-grow{flex:1 1 100%;box-sizing:border-box}.flex-xl-initial{flex:0 1 auto;box-sizing:border-box}.flex-xl-auto{flex:1 1 auto;box-sizing:border-box}.flex-xl-none{flex:0 0 auto;box-sizing:border-box}.flex-xl-noshrink{flex:1 0 auto;box-sizing:border-box}.flex-xl-nogrow{flex:0 1 auto;box-sizing:border-box}.flex-xl-0{flex:1 1 0%;max-width:0%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xl-0{flex:1 1 0%;max-width:0%;max-height:100%;box-sizing:border-box;min-width:0}.layout-column>.flex-xl-0{flex:1 1 0%;max-width:100%;max-height:0%;box-sizing:border-box}.layout-row>.flex-xl-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xl-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-xl-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-xl-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-xl-row>.flex-xl-0{flex:1 1 0%;max-width:0%;max-height:100%;box-sizing:border-box;min-width:0}.layout-xl-column>.flex-xl-0{flex:1 1 0%;max-width:100%;max-height:0%;box-sizing:border-box;min-height:0}.flex-xl-5{flex:1 1 5%;max-width:5%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xl-5{flex:1 1 5%;max-width:5%;max-height:100%;box-sizing:border-box}.layout-column>.flex-xl-5{flex:1 1 5%;max-width:100%;max-height:5%;box-sizing:border-box}.layout-row>.flex-xl-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xl-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-xl-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-xl-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-xl-row>.flex-xl-5{flex:1 1 5%;max-width:5%;max-height:100%;box-sizing:border-box}.layout-xl-column>.flex-xl-5{flex:1 1 5%;max-width:100%;max-height:5%;box-sizing:border-box}.flex-xl-10{flex:1 1 10%;max-width:10%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xl-10{flex:1 1 10%;max-width:10%;max-height:100%;box-sizing:border-box}.layout-column>.flex-xl-10{flex:1 1 10%;max-width:100%;max-height:10%;box-sizing:border-box}.layout-row>.flex-xl-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xl-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-xl-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-xl-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-xl-row>.flex-xl-10{flex:1 1 10%;max-width:10%;max-height:100%;box-sizing:border-box}.layout-xl-column>.flex-xl-10{flex:1 1 10%;max-width:100%;max-height:10%;box-sizing:border-box}.flex-xl-15{flex:1 1 15%;max-width:15%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xl-15{flex:1 1 15%;max-width:15%;max-height:100%;box-sizing:border-box}.layout-column>.flex-xl-15{flex:1 1 15%;max-width:100%;max-height:15%;box-sizing:border-box}.layout-row>.flex-xl-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xl-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-xl-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-xl-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-xl-row>.flex-xl-15{flex:1 1 15%;max-width:15%;max-height:100%;box-sizing:border-box}.layout-xl-column>.flex-xl-15{flex:1 1 15%;max-width:100%;max-height:15%;box-sizing:border-box}.flex-xl-20{flex:1 1 20%;max-width:20%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xl-20{flex:1 1 20%;max-width:20%;max-height:100%;box-sizing:border-box}.layout-column>.flex-xl-20{flex:1 1 20%;max-width:100%;max-height:20%;box-sizing:border-box}.layout-row>.flex-xl-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xl-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-xl-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-xl-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-xl-row>.flex-xl-20{flex:1 1 20%;max-width:20%;max-height:100%;box-sizing:border-box}.layout-xl-column>.flex-xl-20{flex:1 1 20%;max-width:100%;max-height:20%;box-sizing:border-box}.flex-xl-25{flex:1 1 25%;max-width:25%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xl-25{flex:1 1 25%;max-width:25%;max-height:100%;box-sizing:border-box}.layout-column>.flex-xl-25{flex:1 1 25%;max-width:100%;max-height:25%;box-sizing:border-box}.layout-row>.flex-xl-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xl-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-xl-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-xl-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-xl-row>.flex-xl-25{flex:1 1 25%;max-width:25%;max-height:100%;box-sizing:border-box}.layout-xl-column>.flex-xl-25{flex:1 1 25%;max-width:100%;max-height:25%;box-sizing:border-box}.flex-xl-30{flex:1 1 30%;max-width:30%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xl-30{flex:1 1 30%;max-width:30%;max-height:100%;box-sizing:border-box}.layout-column>.flex-xl-30{flex:1 1 30%;max-width:100%;max-height:30%;box-sizing:border-box}.layout-row>.flex-xl-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xl-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-xl-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-xl-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-xl-row>.flex-xl-30{flex:1 1 30%;max-width:30%;max-height:100%;box-sizing:border-box}.layout-xl-column>.flex-xl-30{flex:1 1 30%;max-width:100%;max-height:30%;box-sizing:border-box}.flex-xl-35{flex:1 1 35%;max-width:35%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xl-35{flex:1 1 35%;max-width:35%;max-height:100%;box-sizing:border-box}.layout-column>.flex-xl-35{flex:1 1 35%;max-width:100%;max-height:35%;box-sizing:border-box}.layout-row>.flex-xl-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xl-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-xl-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-xl-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-xl-row>.flex-xl-35{flex:1 1 35%;max-width:35%;max-height:100%;box-sizing:border-box}.layout-xl-column>.flex-xl-35{flex:1 1 35%;max-width:100%;max-height:35%;box-sizing:border-box}.flex-xl-40{flex:1 1 40%;max-width:40%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xl-40{flex:1 1 40%;max-width:40%;max-height:100%;box-sizing:border-box}.layout-column>.flex-xl-40{flex:1 1 40%;max-width:100%;max-height:40%;box-sizing:border-box}.layout-row>.flex-xl-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xl-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-xl-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-xl-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-xl-row>.flex-xl-40{flex:1 1 40%;max-width:40%;max-height:100%;box-sizing:border-box}.layout-xl-column>.flex-xl-40{flex:1 1 40%;max-width:100%;max-height:40%;box-sizing:border-box}.flex-xl-45{flex:1 1 45%;max-width:45%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xl-45{flex:1 1 45%;max-width:45%;max-height:100%;box-sizing:border-box}.layout-column>.flex-xl-45{flex:1 1 45%;max-width:100%;max-height:45%;box-sizing:border-box}.layout-row>.flex-xl-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xl-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-xl-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-xl-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-xl-row>.flex-xl-45{flex:1 1 45%;max-width:45%;max-height:100%;box-sizing:border-box}.layout-xl-column>.flex-xl-45{flex:1 1 45%;max-width:100%;max-height:45%;box-sizing:border-box}.flex-xl-50{flex:1 1 50%;max-width:50%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xl-50{flex:1 1 50%;max-width:50%;max-height:100%;box-sizing:border-box}.layout-column>.flex-xl-50{flex:1 1 50%;max-width:100%;max-height:50%;box-sizing:border-box}.layout-row>.flex-xl-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xl-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-xl-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-xl-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-xl-row>.flex-xl-50{flex:1 1 50%;max-width:50%;max-height:100%;box-sizing:border-box}.layout-xl-column>.flex-xl-50{flex:1 1 50%;max-width:100%;max-height:50%;box-sizing:border-box}.flex-xl-55{flex:1 1 55%;max-width:55%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xl-55{flex:1 1 55%;max-width:55%;max-height:100%;box-sizing:border-box}.layout-column>.flex-xl-55{flex:1 1 55%;max-width:100%;max-height:55%;box-sizing:border-box}.layout-row>.flex-xl-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xl-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-xl-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-xl-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-xl-row>.flex-xl-55{flex:1 1 55%;max-width:55%;max-height:100%;box-sizing:border-box}.layout-xl-column>.flex-xl-55{flex:1 1 55%;max-width:100%;max-height:55%;box-sizing:border-box}.flex-xl-60{flex:1 1 60%;max-width:60%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xl-60{flex:1 1 60%;max-width:60%;max-height:100%;box-sizing:border-box}.layout-column>.flex-xl-60{flex:1 1 60%;max-width:100%;max-height:60%;box-sizing:border-box}.layout-row>.flex-xl-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xl-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-xl-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-xl-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-xl-row>.flex-xl-60{flex:1 1 60%;max-width:60%;max-height:100%;box-sizing:border-box}.layout-xl-column>.flex-xl-60{flex:1 1 60%;max-width:100%;max-height:60%;box-sizing:border-box}.flex-xl-65{flex:1 1 65%;max-width:65%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xl-65{flex:1 1 65%;max-width:65%;max-height:100%;box-sizing:border-box}.layout-column>.flex-xl-65{flex:1 1 65%;max-width:100%;max-height:65%;box-sizing:border-box}.layout-row>.flex-xl-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xl-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-xl-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-xl-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-xl-row>.flex-xl-65{flex:1 1 65%;max-width:65%;max-height:100%;box-sizing:border-box}.layout-xl-column>.flex-xl-65{flex:1 1 65%;max-width:100%;max-height:65%;box-sizing:border-box}.flex-xl-70{flex:1 1 70%;max-width:70%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xl-70{flex:1 1 70%;max-width:70%;max-height:100%;box-sizing:border-box}.layout-column>.flex-xl-70{flex:1 1 70%;max-width:100%;max-height:70%;box-sizing:border-box}.layout-row>.flex-xl-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xl-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-xl-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-xl-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-xl-row>.flex-xl-70{flex:1 1 70%;max-width:70%;max-height:100%;box-sizing:border-box}.layout-xl-column>.flex-xl-70{flex:1 1 70%;max-width:100%;max-height:70%;box-sizing:border-box}.flex-xl-75{flex:1 1 75%;max-width:75%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xl-75{flex:1 1 75%;max-width:75%;max-height:100%;box-sizing:border-box}.layout-column>.flex-xl-75{flex:1 1 75%;max-width:100%;max-height:75%;box-sizing:border-box}.layout-row>.flex-xl-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xl-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-xl-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-xl-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-xl-row>.flex-xl-75{flex:1 1 75%;max-width:75%;max-height:100%;box-sizing:border-box}.layout-xl-column>.flex-xl-75{flex:1 1 75%;max-width:100%;max-height:75%;box-sizing:border-box}.flex-xl-80{flex:1 1 80%;max-width:80%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xl-80{flex:1 1 80%;max-width:80%;max-height:100%;box-sizing:border-box}.layout-column>.flex-xl-80{flex:1 1 80%;max-width:100%;max-height:80%;box-sizing:border-box}.layout-row>.flex-xl-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xl-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-xl-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-xl-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-xl-row>.flex-xl-80{flex:1 1 80%;max-width:80%;max-height:100%;box-sizing:border-box}.layout-xl-column>.flex-xl-80{flex:1 1 80%;max-width:100%;max-height:80%;box-sizing:border-box}.flex-xl-85{flex:1 1 85%;max-width:85%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xl-85{flex:1 1 85%;max-width:85%;max-height:100%;box-sizing:border-box}.layout-column>.flex-xl-85{flex:1 1 85%;max-width:100%;max-height:85%;box-sizing:border-box}.layout-row>.flex-xl-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xl-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-xl-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-xl-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-xl-row>.flex-xl-85{flex:1 1 85%;max-width:85%;max-height:100%;box-sizing:border-box}.layout-xl-column>.flex-xl-85{flex:1 1 85%;max-width:100%;max-height:85%;box-sizing:border-box}.flex-xl-90{flex:1 1 90%;max-width:90%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xl-90{flex:1 1 90%;max-width:90%;max-height:100%;box-sizing:border-box}.layout-column>.flex-xl-90{flex:1 1 90%;max-width:100%;max-height:90%;box-sizing:border-box}.layout-row>.flex-xl-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xl-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-xl-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-xl-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-xl-row>.flex-xl-90{flex:1 1 90%;max-width:90%;max-height:100%;box-sizing:border-box}.layout-xl-column>.flex-xl-90{flex:1 1 90%;max-width:100%;max-height:90%;box-sizing:border-box}.flex-xl-95{flex:1 1 95%;max-width:95%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xl-95{flex:1 1 95%;max-width:95%;max-height:100%;box-sizing:border-box}.layout-column>.flex-xl-95{flex:1 1 95%;max-width:100%;max-height:95%;box-sizing:border-box}.layout-row>.flex-xl-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xl-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-xl-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-xl-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-xl-row>.flex-xl-95{flex:1 1 95%;max-width:95%;max-height:100%;box-sizing:border-box}.layout-xl-column>.flex-xl-95{flex:1 1 95%;max-width:100%;max-height:95%;box-sizing:border-box}.flex-xl-100{flex:1 1 100%;max-width:100%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xl-100{flex:1 1 100%;max-width:100%;max-height:100%;box-sizing:border-box}.layout-column>.flex-xl-100{flex:1 1 100%;max-width:100%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xl-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-row>.flex-xl-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-column>.flex-xl-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-column>.flex-xl-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-xl-row>.flex-xl-100{flex:1 1 100%;max-width:100%;max-height:100%;box-sizing:border-box}.layout-xl-column>.flex-xl-100{flex:1 1 100%;max-width:100%;max-height:100%;box-sizing:border-box}.layout-xl-row>.flex-xl-33{flex:1 1 33.33%;max-width:33.33%;max-height:100%;box-sizing:border-box}.layout-xl-row>.flex-xl-66{flex:1 1 66.66%;max-width:66.66%;max-height:100%;box-sizing:border-box}.layout-xl-row>.flex{min-width:0}.layout-xl-column>.flex-xl-33{flex:1 1 33.33%;max-width:100%;max-height:33.33%;box-sizing:border-box}.layout-xl-column>.flex-xl-66{flex:1 1 66.66%;max-width:100%;max-height:66.66%;box-sizing:border-box}.layout-xl-column>.flex{min-height:0}.layout-xl,.layout-xl-column,.layout-xl-row{box-sizing:border-box;display:-webkit-box;display:-webkit-flex;display:-moz-box;display:-ms-flexbox;display:flex}.layout-xl-column{flex-direction:column}.layout-xl-row{flex-direction:row}.hide-gt-lg:not(.show-gt-xs):not(.show-gt-sm):not(.show-gt-md):not(.show-gt-lg):not(.show-xl):not(.show),.hide-gt-md:not(.show-gt-xs):not(.show-gt-sm):not(.show-gt-md):not(.show-gt-lg):not(.show-xl):not(.show),.hide-gt-sm:not(.show-gt-xs):not(.show-gt-sm):not(.show-gt-md):not(.show-gt-lg):not(.show-xl):not(.show),.hide-gt-xs:not(.show-gt-xs):not(.show-gt-sm):not(.show-gt-md):not(.show-gt-lg):not(.show-xl):not(.show),.hide:not(.show-gt-xs):not(.show-gt-sm):not(.show-gt-md):not(.show-gt-lg):not(.show-xl):not(.show){display:none}.hide-xl:not(.show-xl):not(.show-gt-lg):not(.show-gt-md):not(.show-gt-sm):not(.show-gt-xs):not(.show){display:none}}@media print{.hide-print:not(.show-print):not(.show){display:none!important}}md-menu[md-nest-level='1']{margin:0}md-menu[md-nest-level='1'] .md-button{display:inline-block;border-radius:0;margin:auto 0;font-size:15px;text-transform:none;font-weight:400;height:100%;padding-left:16px;padding-right:16px;width:100%}*{text-rendering:optimizeLegibility;-o-text-rendering:optimizeLegibility;-ms-text-rendering:optimizeLegibility;-moz-text-rendering:optimizeLegibility;-webkit-text-rendering:optimizeLegibility;-webkit-tap-highlight-color:transparent;box-sizing:border-box}:after,:before{box-sizing:border-box}:focus{outline:0}:not(md-input-container)>button,:not(md-input-container)>input[type=button],:not(md-input-container)>input[type=email],:not(md-input-container)>input[type=image],:not(md-input-container)>input[type=password],:not(md-input-container)>input[type=search],:not(md-input-container)>input[type=submit],:not(md-input-container)>input[type=tel],:not(md-input-container)>input[type=text],:not(md-input-container)>textarea{-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;appearance:none;-moz-appearance:none;-webkit-appearance:none;border:none;padding:0;margin:0}:not(md-input-container)>button,:not(md-input-container)>input[type=button],:not(md-input-container)>input[type=submit]{background:0 0}button{border-radius:0;font-family:inherit;font-size:inherit;padding:0;margin:0;appearance:none;-moz-appearance:none;-webkit-appearance:none}[layout]>*{min-height:auto;min-height:initial}md-card>:not(md-card-content) img,md-card>img{height:inherit;height:initial}.md-datepicker-calendar-pane *{box-sizing:initial}md-autocomplete-wrap>input[type=search]{background:#fff;padding:0 15px!important}md-backdrop.md-opaque{background-color:rgba(33,33,33,.48)!important}md-card md-card-header md-card-avatar md-icon{width:40px;height:40px}md-checkbox.no-label{margin:0}md-chip .md-chip-remove md-icon{margin-left:2px}md-chip .md-chip-remove md-icon svg{width:18px;height:18px;max-width:18px;max-height:18px;margin:4px}md-datepicker .md-datepicker-button{padding:0!important;margin:0!important;vertical-align:middle}md-datepicker .md-datepicker-input-container{margin-left:0}.md-inline-form md-datepicker{margin-top:14px}md-dialog md-dialog-content{padding:32px 24px 24px 24px}md-dialog md-dialog-actions{min-height:64px;padding-top:8px;padding-bottom:8px}md-dialog md-dialog-actions .md-button{margin:0 8px}md-input-container.no-errors-spacer .md-errors-spacer{display:none}md-input-container .input-hint{position:absolute;right:auto;bottom:7px;left:2px;font-size:12px;line-height:14px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-input-container.md-icon-left .input-hint{left:38px}md-list-item .md-list-item-text p{font-size:13px!important}.md-menu,md-menu{padding:0}md-menu-content.md-menu-bar-menu.md-dense{padding:8px 0}md-menu-content.md-menu-bar-menu.md-dense .md-button,md-menu-content.md-menu-bar-menu.md-dense md-menu-item{height:40px;line-height:40px}md-menu-content.md-menu-bar-menu.md-dense .md-button.md-indent>md-icon,md-menu-content.md-menu-bar-menu.md-dense md-menu-item.md-indent>md-icon{top:8px}.md-open-menu-container md-menu-content md-menu-item.selected{opacity:.4}md-menu-content md-menu-item .md-button{text-align:left}md-select.simplified{margin:0 8px}md-select.simplified .md-select-value{border:none!important;box-sizing:border-box;padding:0}md-select.simplified .md-select-value :first-child{transform:none;height:auto}md-select.simplified .md-select-value .md-select-icon{transform:none;font-size:16px}md-select.simplified .md-select-value .md-select-icon:after{top:1px}md-select[multiple] md-select-value>:first-child{display:flex}md-select[multiple] md-select-value>:first-child>:first-child{flex:0}md-select[multiple] md-select-value>:first-child .md-container{padding-right:6px}md-select[multiple] md-select-value>:first-child .md-container:first-of-type{padding-right:0}md-select-menu md-select-header{position:relative;display:flex;align-items:center;width:auto;height:48px;padding-left:10.667px;box-shadow:0 1px 0 0 rgba(0,0,0,.1),0 0 0 0 rgba(0,0,0,.14),0 0 0 0 rgba(0,0,0,.12);cursor:pointer}md-select-menu md-select-header input[type=search]{border:none;outline:0;height:100%;width:100%;padding:0}md-sidenav{-webkit-overflow-scrolling:touch}md-toolbar.colored-toolbar{color:rgba(255,255,255,.87)}md-toolbar.colored-toolbar md-menu-bar md-menu._md-open>button{background:rgba(0,0,0,.12)}md-toolbar.colored-toolbar md-menu._md-open>button{background:rgba(0,0,0,.12)}md-toolbar.colored-toolbar input{color:rgba(255,255,255,.87)!important}md-progress-circular[disabled]{visibility:hidden}body,html{overflow:hidden!important}#main{position:fixed;top:0;left:0;width:100vw;height:100vh}body.boxed{background:#3f4450}body.boxed #main{overflow:hidden!important;width:100%;max-width:1280px;margin:0 auto;box-shadow:0 0 12px rgba(0,0,0,.45)}#layout-content-only{position:relative;height:100%;max-height:100%}#layout-content-only #content{position:absolute;top:0;right:0;bottom:0;left:0}#layout-content-with-toolbar{position:relative;height:100%;max-height:100%}#layout-content-with-toolbar #content{position:absolute;top:64px;right:0;bottom:0;left:0}#layout-vertical-navigation{width:100%;height:100%;max-height:100%}#layout-vertical-navigation #content-container{position:relative;overflow:hidden;width:100%;height:100%}#layout-vertical-navigation #content-container #content{width:100%;height:100%;overflow:auto}#layout-vertical-navigation-fullwidth-toolbar{height:100%;max-height:100%}#layout-vertical-navigation-fullwidth-toolbar #main-container{position:relative}#layout-vertical-navigation-fullwidth-toolbar #main-container #content-container{position:relative;overflow:hidden}#layout-vertical-navigation-fullwidth-toolbar #main-container #content-container #content{position:absolute;top:0;right:0;bottom:0;left:0}#layout-vertical-navigation-fullwidth-toolbar-2{height:100%;max-height:100%}#layout-vertical-navigation-fullwidth-toolbar-2 #main-container{position:relative}#layout-vertical-navigation-fullwidth-toolbar-2 #main-container #content-container{position:relative;overflow:hidden}#layout-vertical-navigation-fullwidth-toolbar-2 #main-container #content-container #content{position:absolute;top:0;right:0;bottom:0;left:0}#layout-horizontal-navigation{height:100%;max-height:100%}#layout-horizontal-navigation #content-container{position:relative;overflow:hidden}#layout-horizontal-navigation #content-container #content{position:absolute;top:0;right:0;bottom:0;left:0}.page-layout{position:relative;overflow:hidden}.page-layout .top-bg{position:absolute;z-index:1;top:0;right:0;left:0;height:200px;background-image:url(/assets/images/backgrounds/header-bg.png);background-size:cover}.page-layout md-backdrop{z-index:50}.page-layout>.header .breadcrumb{margin-bottom:16px;font-weight:500;color:rgba(0,0,0,.54)}.page-layout>.header .breadcrumb md-icon{margin:0}.page-layout>.header .breadcrumb .separator{margin:0 8px}.page-layout>.header .title{font-size:34px}.page-layout.carded{min-height:100%;height:100%}.page-layout.carded.fullwidth.single-scroll{height:auto}.page-layout.carded.fullwidth.single-scroll>.center .content-card .content{overflow:hidden}.page-layout.carded.fullwidth>.center{position:relative;z-index:2;margin-left:32px;margin-right:32px}.page-layout.carded.fullwidth>.center .header{height:136px;min-height:136px;max-height:136px;padding:24px}.page-layout.carded.fullwidth>.center .content-card{background:#fff;box-shadow:0 4px 5px -2px rgba(0,0,0,.2),0 7px 10px 1px rgba(0,0,0,.14),0 2px 16px 1px rgba(0,0,0,.12);overflow:hidden}.page-layout.carded.fullwidth>.center .content-card .toolbar{padding:8px 24px;height:64px;min-height:64px;max-height:64px;border-bottom:1px solid rgba(0,0,0,.12)}.page-layout.carded.fullwidth>.center .content-card .content{padding:24px;background:#fff}.page-layout.carded.left-sidenav.single-scroll{height:auto}.page-layout.carded.left-sidenav.single-scroll>.center .content-card .content{overflow:hidden}.page-layout.carded.left-sidenav>.sidenav{width:240px;min-width:240px;max-width:240px;box-shadow:0 4px 5px -2px rgba(0,0,0,.2),0 7px 10px 1px rgba(0,0,0,.14),0 2px 16px 1px rgba(0,0,0,.12);z-index:51}.page-layout.carded.left-sidenav>.sidenav .header{height:200px;min-height:200px;max-height:200px;padding:24px}.page-layout.carded.left-sidenav>.sidenav .content{background:0 0;padding:24px}.page-layout.carded.left-sidenav>.sidenav.md-locked-open{width:220px;min-width:220px;max-width:220px;z-index:2;background:0 0;box-shadow:none}.page-layout.carded.left-sidenav>.sidenav.md-locked-open+.center{margin-left:0}.page-layout.carded.left-sidenav>.sidenav:not(.md-locked-open) .header{border-bottom:1px solid rgba(0,0,0,.12)}.page-layout.carded.left-sidenav>.sidenav:not(.md-locked-open) .content{overflow:hidden}.page-layout.carded.left-sidenav>.center{position:relative;z-index:2;margin-left:32px;margin-right:32px}.page-layout.carded.left-sidenav>.center .header{height:136px;min-height:136px;max-height:136px;padding:24px}.page-layout.carded.left-sidenav>.center .content-card{background:#fff;box-shadow:0 4px 5px -2px rgba(0,0,0,.2),0 7px 10px 1px rgba(0,0,0,.14),0 2px 16px 1px rgba(0,0,0,.12);overflow:hidden}.page-layout.carded.left-sidenav>.center .content-card .toolbar{padding:8px 24px;height:64px;min-height:64px;max-height:64px;border-bottom:1px solid rgba(0,0,0,.12)}.page-layout.carded.left-sidenav>.center .content-card .toolbar .sidenav-toggle{margin:0 8px 0 0!important;padding:0!important;border-radius:0}.page-layout.carded.left-sidenav>.center .content-card .content{padding:24px;background:#fff}.page-layout.carded.right-sidenav.single-scroll{height:auto}.page-layout.carded.right-sidenav.single-scroll>.center .content-card .content{overflow:hidden}.page-layout.carded.right-sidenav>.sidenav{width:240px;min-width:240px;max-width:240px;box-shadow:0 4px 5px -2px rgba(0,0,0,.2),0 7px 10px 1px rgba(0,0,0,.14),0 2px 16px 1px rgba(0,0,0,.12);z-index:51}.page-layout.carded.right-sidenav>.sidenav .header{height:200px;min-height:200px;max-height:200px;padding:24px 24px 24px 0}.page-layout.carded.right-sidenav>.sidenav .content{background:0 0;padding:24px 24px 24px 0}.page-layout.carded.right-sidenav>.sidenav.md-locked-open{width:196px;min-width:196px;max-width:196px;z-index:2;background:0 0;box-shadow:none}.page-layout.carded.right-sidenav>.sidenav:not(.md-locked-open) .header{padding:24px;border-bottom:1px solid rgba(0,0,0,.12)}.page-layout.carded.right-sidenav>.sidenav:not(.md-locked-open) .content{overflow:hidden;padding:24px}.page-layout.carded.right-sidenav>.center{position:relative;z-index:2;margin-left:32px;margin-right:32px}.page-layout.carded.right-sidenav>.center .header{height:136px;min-height:136px;max-height:136px;padding:24px}.page-layout.carded.right-sidenav>.center .content-card{background:#fff;box-shadow:0 4px 5px -2px rgba(0,0,0,.2),0 7px 10px 1px rgba(0,0,0,.14),0 2px 16px 1px rgba(0,0,0,.12);overflow:hidden}.page-layout.carded.right-sidenav>.center .content-card .toolbar{padding:8px 24px;height:64px;min-height:64px;max-height:64px;border-bottom:1px solid rgba(0,0,0,.12)}.page-layout.carded.right-sidenav>.center .content-card .toolbar .sidenav-toggle{margin:0 0 0 8px!important;padding:0!important;border-radius:0}.page-layout.carded.right-sidenav>.center .content-card .content{padding:24px;background:#fff}.page-layout.simple.fullwidth,.page-layout.simple.inner-sidenav{min-height:100%}.page-layout.simple.fullwidth>.header,.page-layout.simple.inner-sidenav>.header{height:200px;min-height:200px;max-height:200px;padding:24px;background-image:url(/assets/images/backgrounds/header-bg.png);background-size:cover}.page-layout.simple.fullwidth>.content,.page-layout.simple.inner-sidenav>.content{padding:24px}.page-layout.simple.left-sidenav{min-height:100%;height:100%}.page-layout.simple.left-sidenav.single-scroll{height:auto}.page-layout.simple.left-sidenav.single-scroll>.center{overflow:hidden}.page-layout.simple.left-sidenav.inner-sidenav>.content>md-sidenav{margin-right:24px}.page-layout.simple.left-sidenav .sidenav{width:240px;min-width:240px;max-width:240px;padding:24px;z-index:51;box-shadow:0 4px 5px -2px rgba(0,0,0,.2),0 7px 10px 1px rgba(0,0,0,.14),0 2px 16px 1px rgba(0,0,0,.12)}.page-layout.simple.left-sidenav .sidenav.md-locked-open{width:220px;min-width:220px;max-width:220px;z-index:2;box-shadow:none;background:0 0}.page-layout.simple.left-sidenav>.center{position:relative;overflow:auto;z-index:3;box-shadow:0 4px 5px -2px rgba(0,0,0,.2),0 7px 10px 1px rgba(0,0,0,.14),0 2px 16px 1px rgba(0,0,0,.12)}.page-layout.simple.left-sidenav>.center .header{height:200px;min-height:200px;max-height:200px;padding:24px;background-image:url(/assets/images/backgrounds/header-bg.png);background-size:cover}.page-layout.simple.left-sidenav>.center .content{padding:24px;background:#fff}.page-layout.simple.right-sidenav{min-height:100%;height:100%}.page-layout.simple.right-sidenav.single-scroll{height:auto}.page-layout.simple.right-sidenav.single-scroll>.center{overflow:hidden}.page-layout.simple.right-sidenav.inner-sidenav>.content>md-sidenav{margin-left:24px}.page-layout.simple.right-sidenav .sidenav{width:240px;min-width:240px;max-width:240px;padding:24px;z-index:51;box-shadow:0 4px 5px -2px rgba(0,0,0,.2),0 7px 10px 1px rgba(0,0,0,.14),0 2px 16px 1px rgba(0,0,0,.12)}.page-layout.simple.right-sidenav .sidenav.md-locked-open{width:220px;min-width:220px;max-width:220px;z-index:2;box-shadow:none;background:0 0}.page-layout.simple.right-sidenav>.center{position:relative;overflow:auto;z-index:3;box-shadow:0 4px 5px -2px rgba(0,0,0,.2),0 7px 10px 1px rgba(0,0,0,.14),0 2px 16px 1px rgba(0,0,0,.12)}.page-layout.simple.right-sidenav>.center .header{height:200px;min-height:200px;max-height:200px;padding:24px;background-image:url(/assets/images/backgrounds/header-bg.png);background-size:cover}.page-layout.simple.right-sidenav>.center .content{padding:24px;background:#fff}.page-layout.simple.inner-sidenav{height:auto}.page-layout.simple.inner-sidenav>.content>md-sidenav.md-locked-open{padding:0}.page-layout.simple.tabbed{width:100%;height:100%;min-height:100%}.page-layout.simple.tabbed>.header{height:200px;min-height:200px;max-height:200px;padding:24px;background-image:url(/assets/images/backgrounds/header-bg.png);background-size:cover}.page-layout.simple.tabbed>.content{width:100%;height:100%;overflow:hidden}.page-layout.simple.tabbed>.content>md-tabs>md-tabs-wrapper{background:#fff;box-shadow:0 1px 3px 0 rgba(0,0,0,.2),0 1px 1px 0 rgba(0,0,0,.14),0 2px 1px -1px rgba(0,0,0,.12);padding:0 24px}.page-layout.simple.tabbed>.content>md-tabs>md-tabs-wrapper md-tabs-canvas{height:56px}.page-layout.simple.tabbed>.content>md-tabs>md-tabs-wrapper md-tabs-canvas md-pagination-wrapper{height:56px}.page-layout.simple.tabbed>.content>md-tabs>md-tabs-wrapper md-tabs-canvas .md-tab{padding:16px 24px;text-transform:none}.page-layout.simple.tabbed>.content>md-tabs:not(.md-dynamic-height) md-tabs-content-wrapper{top:56px}.page-layout.simple.tabbed>.content>md-tabs>md-tabs-content-wrapper{width:100%;height:calc(100% - 56px)}.page-layout.simple.tabbed>.content>md-tabs>md-tabs-content-wrapper>md-tab-content.md-active{padding:24px;box-sizing:border-box;overflow:auto;width:100%;height:100%;display:block}.page-layout.simple.tabbed>.content>md-nav-bar .md-nav-bar{background:#fff;box-shadow:0 1px 3px 0 rgba(0,0,0,.2),0 1px 1px 0 rgba(0,0,0,.14),0 2px 1px -1px rgba(0,0,0,.12);border:none;height:56px}.page-layout.simple.tabbed>.content>md-nav-bar .md-nav-bar nav{margin:0 12px}.page-layout.simple.tabbed>.content>md-nav-bar .md-nav-bar nav .md-nav-item{height:56px}.page-layout.simple.tabbed>.content>md-nav-bar .md-nav-bar nav .md-nav-item ._md-nav-button{height:56px;line-height:32px}.page-layout.simple.tabbed>.content>md-nav-bar .md-nav-bar nav .md-nav-item ._md-nav-button-text{text-transform:none}.page-layout.blank{min-height:100%;padding:24px}.single-scroll .carded.fullwidth{height:auto}.single-scroll .carded.fullwidth>.center .content-card .content{overflow:hidden}.single-scroll .carded.left-sidenav{height:auto}.single-scroll .carded.left-sidenav>.center .content-card .content{overflow:hidden}.single-scroll .carded.right-sidenav{height:auto}.single-scroll .carded.right-sidenav>.center .content-card .content{overflow:hidden}.single-scroll .simple.left-sidenav{height:auto}.single-scroll .simple.left-sidenav>.center{overflow:hidden}.single-scroll .simple.right-sidenav{height:auto}.single-scroll .simple.right-sidenav>.center{overflow:hidden}@media screen and (max-width:1280px){.page-layout.simple.inner-sidenav.left-sidenav>.content,.page-layout.simple.inner-sidenav.right-sidenav>.content{height:auto!important}.page-layout.simple.inner-sidenav.left-sidenav>.content>md-sidenav,.page-layout.simple.inner-sidenav.right-sidenav>.content>md-sidenav{margin-left:0;margin-right:0}.sidenav-open .page-layout.simple.inner-sidenav{height:100%}}@media screen and (max-width:600px){.page-layout .top-bg{height:160px}.page-layout.carded.fullwidth>.center,.page-layout.carded.left-sidenav>.center,.page-layout.carded.right-sidenav>.center{margin-left:16px;margin-right:16px}.page-layout.carded.fullwidth>.center .header,.page-layout.carded.left-sidenav>.center .header,.page-layout.carded.right-sidenav>.center .header{height:96px;min-height:96px;max-height:96px;padding:16px}.page-layout.carded.fullwidth{height:auto}.page-layout.carded.fullwidth>.center .content-card .content{overflow:hidden}.page-layout.carded.left-sidenav,.page-layout.carded.right-sidenav{height:auto}.page-layout.carded.left-sidenav>.center .content-card .content,.page-layout.carded.right-sidenav>.center .content-card .content{overflow:hidden}.page-layout.simple.fullwidth>.header,.page-layout.simple.inner-sidenav>.header{height:160px;min-height:160px;max-height:160px;padding:16px}.page-layout.simple.left-sidenav>.center .header,.page-layout.simple.right-sidenav>.center .header{height:160px;min-height:160px;max-height:160px;padding:16px}.page-layout.simple.left-sidenav,.page-layout.simple.right-sidenav{height:auto}.page-layout.simple.left-sidenav>.center,.page-layout.simple.right-sidenav>.center{overflow:hidden}}.black-fg,.black-text{color:rgba(0,0,0,.87)!important}.black-fg .icon,.black-fg .secondary-text,.black-fg.icon,.black-fg.secondary-text,.black-text .icon,.black-text .secondary-text,.black-text.icon,.black-text.secondary-text{color:rgba(0,0,0,.54)!important}.black-fg .disabled-text,.black-fg .hint-text,.black-fg.disabled-text,.black-fg.hint-text,.black-text .disabled-text,.black-text .hint-text,.black-text.disabled-text,.black-text.hint-text{color:rgba(0,0,0,.26)!important}.black-fg .divider,.black-fg .faint-text,.black-fg.divider,.black-fg.faint-text,.black-text .divider,.black-text .faint-text,.black-text.divider,.black-text.faint-text{color:rgba(0,0,0,.12)!important}.white-fg,.white-text{color:#fff!important}.white-fg .icon,.white-fg .secondary-text,.white-fg.icon,.white-fg.secondary-text,.white-text .icon,.white-text .secondary-text,.white-text.icon,.white-text.secondary-text{color:rgba(255,255,255,.7)!important}.white-fg .disabled-text,.white-fg .hint-text,.white-fg.disabled-text,.white-fg.hint-text,.white-text .disabled-text,.white-text .hint-text,.white-text.disabled-text,.white-text.hint-text{color:rgba(255,255,255,.3)!important}.white-fg .divider,.white-fg .faint-text,.white-fg.divider,.white-fg.faint-text,.white-text .divider,.white-text .faint-text,.white-text.divider,.white-text.faint-text{color:rgba(255,255,255,.12)!important}.white-fg md-icon,.white-text md-icon{color:#fff}.white-fg md-progress-linear .md-container,.white-text md-progress-linear .md-container{background:rgba(255,255,255,.3)}.white-fg md-progress-linear .md-bar,.white-text md-progress-linear .md-bar{background:rgba(255,255,255,.7)}.red-50-bg{background-color:#ffebee!important}.md-red-50-bg{background-color:#ffebee!important;color:rgba(0,0,0,.87)}.red-50-fg{color:#ffebee!important}.red-50-border{border-color:#ffebee!important}.red-50-border-top{border-top-color:#ffebee!important}.red-50-border-right{border-right-color:#ffebee!important}.red-50-border-bottom{border-bottom-color:#ffebee!important}.red-50-border-left{border-left-color:#ffebee!important}.red-100-bg{background-color:#ffcdd2!important}.md-red-100-bg{background-color:#ffcdd2!important;color:rgba(0,0,0,.87)}.red-100-fg{color:#ffcdd2!important}.red-100-border{border-color:#ffcdd2!important}.red-100-border-top{border-top-color:#ffcdd2!important}.red-100-border-right{border-right-color:#ffcdd2!important}.red-100-border-bottom{border-bottom-color:#ffcdd2!important}.red-100-border-left{border-left-color:#ffcdd2!important}.red-200-bg{background-color:#ef9a9a!important}.md-red-200-bg{background-color:#ef9a9a!important;color:rgba(0,0,0,.87)}.red-200-fg{color:#ef9a9a!important}.red-200-border{border-color:#ef9a9a!important}.red-200-border-top{border-top-color:#ef9a9a!important}.red-200-border-right{border-right-color:#ef9a9a!important}.red-200-border-bottom{border-bottom-color:#ef9a9a!important}.red-200-border-left{border-left-color:#ef9a9a!important}.red-300-bg{background-color:#e57373!important}.md-red-300-bg{background-color:#e57373!important;color:rgba(0,0,0,.87)}.red-300-fg{color:#e57373!important}.red-300-border{border-color:#e57373!important}.red-300-border-top{border-top-color:#e57373!important}.red-300-border-right{border-right-color:#e57373!important}.red-300-border-bottom{border-bottom-color:#e57373!important}.red-300-border-left{border-left-color:#e57373!important}.red-400-bg{background-color:#ef5350!important}.md-red-400-bg{background-color:#ef5350!important;color:#fff}.red-400-fg{color:#ef5350!important}.red-400-border{border-color:#ef5350!important}.red-400-border-top{border-top-color:#ef5350!important}.red-400-border-right{border-right-color:#ef5350!important}.red-400-border-bottom{border-bottom-color:#ef5350!important}.red-400-border-left{border-left-color:#ef5350!important}.red-500-bg{background-color:#f44336!important}.md-red-500-bg{background-color:#f44336!important;color:#fff}.red-500-fg{color:#f44336!important}.red-500-border{border-color:#f44336!important}.red-500-border-top{border-top-color:#f44336!important}.red-500-border-right{border-right-color:#f44336!important}.red-500-border-bottom{border-bottom-color:#f44336!important}.red-500-border-left{border-left-color:#f44336!important}.md-red-bg{background-color:#f44336!important;color:#fff}.red-bg{background-color:#f44336!important}.red-fg{color:#f44336!important}.red-border{border-color:#f44336!important}.red-border-top{border-top-color:#f44336!important}.red-border-right{border-right-color:#f44336!important}.red-border-bottom{border-bottom-color:#f44336!important}.red-border-left{border-left-color:#f44336!important}.red-600-bg{background-color:#e53935!important}.md-red-600-bg{background-color:#e53935!important;color:#fff}.red-600-fg{color:#e53935!important}.red-600-border{border-color:#e53935!important}.red-600-border-top{border-top-color:#e53935!important}.red-600-border-right{border-right-color:#e53935!important}.red-600-border-bottom{border-bottom-color:#e53935!important}.red-600-border-left{border-left-color:#e53935!important}.red-700-bg{background-color:#d32f2f!important}.md-red-700-bg{background-color:#d32f2f!important;color:#fff}.red-700-fg{color:#d32f2f!important}.red-700-border{border-color:#d32f2f!important}.red-700-border-top{border-top-color:#d32f2f!important}.red-700-border-right{border-right-color:#d32f2f!important}.red-700-border-bottom{border-bottom-color:#d32f2f!important}.red-700-border-left{border-left-color:#d32f2f!important}.red-800-bg{background-color:#c62828!important}.md-red-800-bg{background-color:#c62828!important;color:rgba(255,255,255,.87)}.red-800-fg{color:#c62828!important}.red-800-border{border-color:#c62828!important}.red-800-border-top{border-top-color:#c62828!important}.red-800-border-right{border-right-color:#c62828!important}.red-800-border-bottom{border-bottom-color:#c62828!important}.red-800-border-left{border-left-color:#c62828!important}.red-900-bg{background-color:#b71c1c!important}.md-red-900-bg{background-color:#b71c1c!important;color:rgba(255,255,255,.87)}.red-900-fg{color:#b71c1c!important}.red-900-border{border-color:#b71c1c!important}.red-900-border-top{border-top-color:#b71c1c!important}.red-900-border-right{border-right-color:#b71c1c!important}.red-900-border-bottom{border-bottom-color:#b71c1c!important}.red-900-border-left{border-left-color:#b71c1c!important}.red-A100-bg{background-color:#ff8a80!important}.md-red-A100-bg{background-color:#ff8a80!important;color:rgba(0,0,0,.87)}.red-A100-fg{color:#ff8a80!important}.red-A100-border{border-color:#ff8a80!important}.red-A100-border-top{border-top-color:#ff8a80!important}.red-A100-border-right{border-right-color:#ff8a80!important}.red-A100-border-bottom{border-bottom-color:#ff8a80!important}.red-A100-border-left{border-left-color:#ff8a80!important}.red-A200-bg{background-color:#ff5252!important}.md-red-A200-bg{background-color:#ff5252!important;color:#fff}.red-A200-fg{color:#ff5252!important}.red-A200-border{border-color:#ff5252!important}.red-A200-border-top{border-top-color:#ff5252!important}.red-A200-border-right{border-right-color:#ff5252!important}.red-A200-border-bottom{border-bottom-color:#ff5252!important}.red-A200-border-left{border-left-color:#ff5252!important}.red-A400-bg{background-color:#ff1744!important}.md-red-A400-bg{background-color:#ff1744!important;color:#fff}.red-A400-fg{color:#ff1744!important}.red-A400-border{border-color:#ff1744!important}.red-A400-border-top{border-top-color:#ff1744!important}.red-A400-border-right{border-right-color:#ff1744!important}.red-A400-border-bottom{border-bottom-color:#ff1744!important}.red-A400-border-left{border-left-color:#ff1744!important}.red-A700-bg{background-color:#d50000!important}.md-red-A700-bg{background-color:#d50000!important;color:#fff}.red-A700-fg{color:#d50000!important}.red-A700-border{border-color:#d50000!important}.red-A700-border-top{border-top-color:#d50000!important}.red-A700-border-right{border-right-color:#d50000!important}.red-A700-border-bottom{border-bottom-color:#d50000!important}.red-A700-border-left{border-left-color:#d50000!important}.pink-50-bg{background-color:#fce4ec!important}.md-pink-50-bg{background-color:#fce4ec!important;color:rgba(0,0,0,.87)}.pink-50-fg{color:#fce4ec!important}.pink-50-border{border-color:#fce4ec!important}.pink-50-border-top{border-top-color:#fce4ec!important}.pink-50-border-right{border-right-color:#fce4ec!important}.pink-50-border-bottom{border-bottom-color:#fce4ec!important}.pink-50-border-left{border-left-color:#fce4ec!important}.pink-100-bg{background-color:#f8bbd0!important}.md-pink-100-bg{background-color:#f8bbd0!important;color:rgba(0,0,0,.87)}.pink-100-fg{color:#f8bbd0!important}.pink-100-border{border-color:#f8bbd0!important}.pink-100-border-top{border-top-color:#f8bbd0!important}.pink-100-border-right{border-right-color:#f8bbd0!important}.pink-100-border-bottom{border-bottom-color:#f8bbd0!important}.pink-100-border-left{border-left-color:#f8bbd0!important}.pink-200-bg{background-color:#f48fb1!important}.md-pink-200-bg{background-color:#f48fb1!important;color:rgba(0,0,0,.87)}.pink-200-fg{color:#f48fb1!important}.pink-200-border{border-color:#f48fb1!important}.pink-200-border-top{border-top-color:#f48fb1!important}.pink-200-border-right{border-right-color:#f48fb1!important}.pink-200-border-bottom{border-bottom-color:#f48fb1!important}.pink-200-border-left{border-left-color:#f48fb1!important}.pink-300-bg{background-color:#f06292!important}.md-pink-300-bg{background-color:#f06292!important;color:rgba(255,255,255,.87)}.pink-300-fg{color:#f06292!important}.pink-300-border{border-color:#f06292!important}.pink-300-border-top{border-top-color:#f06292!important}.pink-300-border-right{border-right-color:#f06292!important}.pink-300-border-bottom{border-bottom-color:#f06292!important}.pink-300-border-left{border-left-color:#f06292!important}.pink-400-bg{background-color:#ec407a!important}.md-pink-400-bg{background-color:#ec407a!important;color:rgba(255,255,255,.87)}.pink-400-fg{color:#ec407a!important}.pink-400-border{border-color:#ec407a!important}.pink-400-border-top{border-top-color:#ec407a!important}.pink-400-border-right{border-right-color:#ec407a!important}.pink-400-border-bottom{border-bottom-color:#ec407a!important}.pink-400-border-left{border-left-color:#ec407a!important}.pink-500-bg{background-color:#e91e63!important}.md-pink-500-bg{background-color:#e91e63!important;color:#fff}.pink-500-fg{color:#e91e63!important}.pink-500-border{border-color:#e91e63!important}.pink-500-border-top{border-top-color:#e91e63!important}.pink-500-border-right{border-right-color:#e91e63!important}.pink-500-border-bottom{border-bottom-color:#e91e63!important}.pink-500-border-left{border-left-color:#e91e63!important}.md-pink-bg{background-color:#e91e63!important;color:#fff}.pink-bg{background-color:#e91e63!important}.pink-fg{color:#e91e63!important}.pink-border{border-color:#e91e63!important}.pink-border-top{border-top-color:#e91e63!important}.pink-border-right{border-right-color:#e91e63!important}.pink-border-bottom{border-bottom-color:#e91e63!important}.pink-border-left{border-left-color:#e91e63!important}.pink-600-bg{background-color:#d81b60!important}.md-pink-600-bg{background-color:#d81b60!important;color:#fff}.pink-600-fg{color:#d81b60!important}.pink-600-border{border-color:#d81b60!important}.pink-600-border-top{border-top-color:#d81b60!important}.pink-600-border-right{border-right-color:#d81b60!important}.pink-600-border-bottom{border-bottom-color:#d81b60!important}.pink-600-border-left{border-left-color:#d81b60!important}.pink-700-bg{background-color:#c2185b!important}.md-pink-700-bg{background-color:#c2185b!important;color:rgba(255,255,255,.87)}.pink-700-fg{color:#c2185b!important}.pink-700-border{border-color:#c2185b!important}.pink-700-border-top{border-top-color:#c2185b!important}.pink-700-border-right{border-right-color:#c2185b!important}.pink-700-border-bottom{border-bottom-color:#c2185b!important}.pink-700-border-left{border-left-color:#c2185b!important}.pink-800-bg{background-color:#ad1457!important}.md-pink-800-bg{background-color:#ad1457!important;color:rgba(255,255,255,.87)}.pink-800-fg{color:#ad1457!important}.pink-800-border{border-color:#ad1457!important}.pink-800-border-top{border-top-color:#ad1457!important}.pink-800-border-right{border-right-color:#ad1457!important}.pink-800-border-bottom{border-bottom-color:#ad1457!important}.pink-800-border-left{border-left-color:#ad1457!important}.pink-900-bg{background-color:#880e4f!important}.md-pink-900-bg{background-color:#880e4f!important;color:rgba(255,255,255,.87)}.pink-900-fg{color:#880e4f!important}.pink-900-border{border-color:#880e4f!important}.pink-900-border-top{border-top-color:#880e4f!important}.pink-900-border-right{border-right-color:#880e4f!important}.pink-900-border-bottom{border-bottom-color:#880e4f!important}.pink-900-border-left{border-left-color:#880e4f!important}.pink-A100-bg{background-color:#ff80ab!important}.md-pink-A100-bg{background-color:#ff80ab!important;color:rgba(0,0,0,.87)}.pink-A100-fg{color:#ff80ab!important}.pink-A100-border{border-color:#ff80ab!important}.pink-A100-border-top{border-top-color:#ff80ab!important}.pink-A100-border-right{border-right-color:#ff80ab!important}.pink-A100-border-bottom{border-bottom-color:#ff80ab!important}.pink-A100-border-left{border-left-color:#ff80ab!important}.pink-A200-bg{background-color:#ff4081!important}.md-pink-A200-bg{background-color:#ff4081!important;color:#fff}.pink-A200-fg{color:#ff4081!important}.pink-A200-border{border-color:#ff4081!important}.pink-A200-border-top{border-top-color:#ff4081!important}.pink-A200-border-right{border-right-color:#ff4081!important}.pink-A200-border-bottom{border-bottom-color:#ff4081!important}.pink-A200-border-left{border-left-color:#ff4081!important}.pink-A400-bg{background-color:#f50057!important}.md-pink-A400-bg{background-color:#f50057!important;color:#fff}.pink-A400-fg{color:#f50057!important}.pink-A400-border{border-color:#f50057!important}.pink-A400-border-top{border-top-color:#f50057!important}.pink-A400-border-right{border-right-color:#f50057!important}.pink-A400-border-bottom{border-bottom-color:#f50057!important}.pink-A400-border-left{border-left-color:#f50057!important}.pink-A700-bg{background-color:#c51162!important}.md-pink-A700-bg{background-color:#c51162!important;color:#fff}.pink-A700-fg{color:#c51162!important}.pink-A700-border{border-color:#c51162!important}.pink-A700-border-top{border-top-color:#c51162!important}.pink-A700-border-right{border-right-color:#c51162!important}.pink-A700-border-bottom{border-bottom-color:#c51162!important}.pink-A700-border-left{border-left-color:#c51162!important}.purple-50-bg{background-color:#f3e5f5!important}.md-purple-50-bg{background-color:#f3e5f5!important;color:rgba(0,0,0,.87)}.purple-50-fg{color:#f3e5f5!important}.purple-50-border{border-color:#f3e5f5!important}.purple-50-border-top{border-top-color:#f3e5f5!important}.purple-50-border-right{border-right-color:#f3e5f5!important}.purple-50-border-bottom{border-bottom-color:#f3e5f5!important}.purple-50-border-left{border-left-color:#f3e5f5!important}.purple-100-bg{background-color:#e1bee7!important}.md-purple-100-bg{background-color:#e1bee7!important;color:rgba(0,0,0,.87)}.purple-100-fg{color:#e1bee7!important}.purple-100-border{border-color:#e1bee7!important}.purple-100-border-top{border-top-color:#e1bee7!important}.purple-100-border-right{border-right-color:#e1bee7!important}.purple-100-border-bottom{border-bottom-color:#e1bee7!important}.purple-100-border-left{border-left-color:#e1bee7!important}.purple-200-bg{background-color:#ce93d8!important}.md-purple-200-bg{background-color:#ce93d8!important;color:rgba(0,0,0,.87)}.purple-200-fg{color:#ce93d8!important}.purple-200-border{border-color:#ce93d8!important}.purple-200-border-top{border-top-color:#ce93d8!important}.purple-200-border-right{border-right-color:#ce93d8!important}.purple-200-border-bottom{border-bottom-color:#ce93d8!important}.purple-200-border-left{border-left-color:#ce93d8!important}.purple-300-bg{background-color:#ba68c8!important}.md-purple-300-bg{background-color:#ba68c8!important;color:#fff}.purple-300-fg{color:#ba68c8!important}.purple-300-border{border-color:#ba68c8!important}.purple-300-border-top{border-top-color:#ba68c8!important}.purple-300-border-right{border-right-color:#ba68c8!important}.purple-300-border-bottom{border-bottom-color:#ba68c8!important}.purple-300-border-left{border-left-color:#ba68c8!important}.purple-400-bg{background-color:#ab47bc!important}.md-purple-400-bg{background-color:#ab47bc!important;color:#fff}.purple-400-fg{color:#ab47bc!important}.purple-400-border{border-color:#ab47bc!important}.purple-400-border-top{border-top-color:#ab47bc!important}.purple-400-border-right{border-right-color:#ab47bc!important}.purple-400-border-bottom{border-bottom-color:#ab47bc!important}.purple-400-border-left{border-left-color:#ab47bc!important}.purple-500-bg{background-color:#9c27b0!important}.md-purple-500-bg{background-color:#9c27b0!important;color:rgba(255,255,255,.87)}.purple-500-fg{color:#9c27b0!important}.purple-500-border{border-color:#9c27b0!important}.purple-500-border-top{border-top-color:#9c27b0!important}.purple-500-border-right{border-right-color:#9c27b0!important}.purple-500-border-bottom{border-bottom-color:#9c27b0!important}.purple-500-border-left{border-left-color:#9c27b0!important}.md-purple-bg{background-color:#9c27b0!important;color:rgba(255,255,255,.87)}.purple-bg{background-color:#9c27b0!important}.purple-fg{color:#9c27b0!important}.purple-border{border-color:#9c27b0!important}.purple-border-top{border-top-color:#9c27b0!important}.purple-border-right{border-right-color:#9c27b0!important}.purple-border-bottom{border-bottom-color:#9c27b0!important}.purple-border-left{border-left-color:#9c27b0!important}.purple-600-bg{background-color:#8e24aa!important}.md-purple-600-bg{background-color:#8e24aa!important;color:rgba(255,255,255,.87)}.purple-600-fg{color:#8e24aa!important}.purple-600-border{border-color:#8e24aa!important}.purple-600-border-top{border-top-color:#8e24aa!important}.purple-600-border-right{border-right-color:#8e24aa!important}.purple-600-border-bottom{border-bottom-color:#8e24aa!important}.purple-600-border-left{border-left-color:#8e24aa!important}.purple-700-bg{background-color:#7b1fa2!important}.md-purple-700-bg{background-color:#7b1fa2!important;color:rgba(255,255,255,.87)}.purple-700-fg{color:#7b1fa2!important}.purple-700-border{border-color:#7b1fa2!important}.purple-700-border-top{border-top-color:#7b1fa2!important}.purple-700-border-right{border-right-color:#7b1fa2!important}.purple-700-border-bottom{border-bottom-color:#7b1fa2!important}.purple-700-border-left{border-left-color:#7b1fa2!important}.purple-800-bg{background-color:#6a1b9a!important}.md-purple-800-bg{background-color:#6a1b9a!important;color:rgba(255,255,255,.87)}.purple-800-fg{color:#6a1b9a!important}.purple-800-border{border-color:#6a1b9a!important}.purple-800-border-top{border-top-color:#6a1b9a!important}.purple-800-border-right{border-right-color:#6a1b9a!important}.purple-800-border-bottom{border-bottom-color:#6a1b9a!important}.purple-800-border-left{border-left-color:#6a1b9a!important}.purple-900-bg{background-color:#4a148c!important}.md-purple-900-bg{background-color:#4a148c!important;color:rgba(255,255,255,.87)}.purple-900-fg{color:#4a148c!important}.purple-900-border{border-color:#4a148c!important}.purple-900-border-top{border-top-color:#4a148c!important}.purple-900-border-right{border-right-color:#4a148c!important}.purple-900-border-bottom{border-bottom-color:#4a148c!important}.purple-900-border-left{border-left-color:#4a148c!important}.purple-A100-bg{background-color:#ea80fc!important}.md-purple-A100-bg{background-color:#ea80fc!important;color:rgba(0,0,0,.87)}.purple-A100-fg{color:#ea80fc!important}.purple-A100-border{border-color:#ea80fc!important}.purple-A100-border-top{border-top-color:#ea80fc!important}.purple-A100-border-right{border-right-color:#ea80fc!important}.purple-A100-border-bottom{border-bottom-color:#ea80fc!important}.purple-A100-border-left{border-left-color:#ea80fc!important}.purple-A200-bg{background-color:#e040fb!important}.md-purple-A200-bg{background-color:#e040fb!important;color:#fff}.purple-A200-fg{color:#e040fb!important}.purple-A200-border{border-color:#e040fb!important}.purple-A200-border-top{border-top-color:#e040fb!important}.purple-A200-border-right{border-right-color:#e040fb!important}.purple-A200-border-bottom{border-bottom-color:#e040fb!important}.purple-A200-border-left{border-left-color:#e040fb!important}.purple-A400-bg{background-color:#d500f9!important}.md-purple-A400-bg{background-color:#d500f9!important;color:#fff}.purple-A400-fg{color:#d500f9!important}.purple-A400-border{border-color:#d500f9!important}.purple-A400-border-top{border-top-color:#d500f9!important}.purple-A400-border-right{border-right-color:#d500f9!important}.purple-A400-border-bottom{border-bottom-color:#d500f9!important}.purple-A400-border-left{border-left-color:#d500f9!important}.purple-A700-bg{background-color:#a0f!important}.md-purple-A700-bg{background-color:#a0f!important;color:#fff}.purple-A700-fg{color:#a0f!important}.purple-A700-border{border-color:#a0f!important}.purple-A700-border-top{border-top-color:#a0f!important}.purple-A700-border-right{border-right-color:#a0f!important}.purple-A700-border-bottom{border-bottom-color:#a0f!important}.purple-A700-border-left{border-left-color:#a0f!important}.deep-purple-50-bg{background-color:#ede7f6!important}.md-deep-purple-50-bg{background-color:#ede7f6!important;color:rgba(0,0,0,.87)}.deep-purple-50-fg{color:#ede7f6!important}.deep-purple-50-border{border-color:#ede7f6!important}.deep-purple-50-border-top{border-top-color:#ede7f6!important}.deep-purple-50-border-right{border-right-color:#ede7f6!important}.deep-purple-50-border-bottom{border-bottom-color:#ede7f6!important}.deep-purple-50-border-left{border-left-color:#ede7f6!important}.deep-purple-100-bg{background-color:#d1c4e9!important}.md-deep-purple-100-bg{background-color:#d1c4e9!important;color:rgba(0,0,0,.87)}.deep-purple-100-fg{color:#d1c4e9!important}.deep-purple-100-border{border-color:#d1c4e9!important}.deep-purple-100-border-top{border-top-color:#d1c4e9!important}.deep-purple-100-border-right{border-right-color:#d1c4e9!important}.deep-purple-100-border-bottom{border-bottom-color:#d1c4e9!important}.deep-purple-100-border-left{border-left-color:#d1c4e9!important}.deep-purple-200-bg{background-color:#b39ddb!important}.md-deep-purple-200-bg{background-color:#b39ddb!important;color:rgba(0,0,0,.87)}.deep-purple-200-fg{color:#b39ddb!important}.deep-purple-200-border{border-color:#b39ddb!important}.deep-purple-200-border-top{border-top-color:#b39ddb!important}.deep-purple-200-border-right{border-right-color:#b39ddb!important}.deep-purple-200-border-bottom{border-bottom-color:#b39ddb!important}.deep-purple-200-border-left{border-left-color:#b39ddb!important}.deep-purple-300-bg{background-color:#9575cd!important}.md-deep-purple-300-bg{background-color:#9575cd!important;color:#fff}.deep-purple-300-fg{color:#9575cd!important}.deep-purple-300-border{border-color:#9575cd!important}.deep-purple-300-border-top{border-top-color:#9575cd!important}.deep-purple-300-border-right{border-right-color:#9575cd!important}.deep-purple-300-border-bottom{border-bottom-color:#9575cd!important}.deep-purple-300-border-left{border-left-color:#9575cd!important}.deep-purple-400-bg{background-color:#7e57c2!important}.md-deep-purple-400-bg{background-color:#7e57c2!important;color:#fff}.deep-purple-400-fg{color:#7e57c2!important}.deep-purple-400-border{border-color:#7e57c2!important}.deep-purple-400-border-top{border-top-color:#7e57c2!important}.deep-purple-400-border-right{border-right-color:#7e57c2!important}.deep-purple-400-border-bottom{border-bottom-color:#7e57c2!important}.deep-purple-400-border-left{border-left-color:#7e57c2!important}.deep-purple-500-bg{background-color:#673ab7!important}.md-deep-purple-500-bg{background-color:#673ab7!important;color:rgba(255,255,255,.87)}.deep-purple-500-fg{color:#673ab7!important}.deep-purple-500-border{border-color:#673ab7!important}.deep-purple-500-border-top{border-top-color:#673ab7!important}.deep-purple-500-border-right{border-right-color:#673ab7!important}.deep-purple-500-border-bottom{border-bottom-color:#673ab7!important}.deep-purple-500-border-left{border-left-color:#673ab7!important}.md-deep-purple-bg{background-color:#673ab7!important;color:rgba(255,255,255,.87)}.deep-purple-bg{background-color:#673ab7!important}.deep-purple-fg{color:#673ab7!important}.deep-purple-border{border-color:#673ab7!important}.deep-purple-border-top{border-top-color:#673ab7!important}.deep-purple-border-right{border-right-color:#673ab7!important}.deep-purple-border-bottom{border-bottom-color:#673ab7!important}.deep-purple-border-left{border-left-color:#673ab7!important}.deep-purple-600-bg{background-color:#5e35b1!important}.md-deep-purple-600-bg{background-color:#5e35b1!important;color:rgba(255,255,255,.87)}.deep-purple-600-fg{color:#5e35b1!important}.deep-purple-600-border{border-color:#5e35b1!important}.deep-purple-600-border-top{border-top-color:#5e35b1!important}.deep-purple-600-border-right{border-right-color:#5e35b1!important}.deep-purple-600-border-bottom{border-bottom-color:#5e35b1!important}.deep-purple-600-border-left{border-left-color:#5e35b1!important}.deep-purple-700-bg{background-color:#512da8!important}.md-deep-purple-700-bg{background-color:#512da8!important;color:rgba(255,255,255,.87)}.deep-purple-700-fg{color:#512da8!important}.deep-purple-700-border{border-color:#512da8!important}.deep-purple-700-border-top{border-top-color:#512da8!important}.deep-purple-700-border-right{border-right-color:#512da8!important}.deep-purple-700-border-bottom{border-bottom-color:#512da8!important}.deep-purple-700-border-left{border-left-color:#512da8!important}.deep-purple-800-bg{background-color:#4527a0!important}.md-deep-purple-800-bg{background-color:#4527a0!important;color:rgba(255,255,255,.87)}.deep-purple-800-fg{color:#4527a0!important}.deep-purple-800-border{border-color:#4527a0!important}.deep-purple-800-border-top{border-top-color:#4527a0!important}.deep-purple-800-border-right{border-right-color:#4527a0!important}.deep-purple-800-border-bottom{border-bottom-color:#4527a0!important}.deep-purple-800-border-left{border-left-color:#4527a0!important}.deep-purple-900-bg{background-color:#311b92!important}.md-deep-purple-900-bg{background-color:#311b92!important;color:rgba(255,255,255,.87)}.deep-purple-900-fg{color:#311b92!important}.deep-purple-900-border{border-color:#311b92!important}.deep-purple-900-border-top{border-top-color:#311b92!important}.deep-purple-900-border-right{border-right-color:#311b92!important}.deep-purple-900-border-bottom{border-bottom-color:#311b92!important}.deep-purple-900-border-left{border-left-color:#311b92!important}.deep-purple-A100-bg{background-color:#b388ff!important}.md-deep-purple-A100-bg{background-color:#b388ff!important;color:rgba(0,0,0,.87)}.deep-purple-A100-fg{color:#b388ff!important}.deep-purple-A100-border{border-color:#b388ff!important}.deep-purple-A100-border-top{border-top-color:#b388ff!important}.deep-purple-A100-border-right{border-right-color:#b388ff!important}.deep-purple-A100-border-bottom{border-bottom-color:#b388ff!important}.deep-purple-A100-border-left{border-left-color:#b388ff!important}.deep-purple-A200-bg{background-color:#7c4dff!important}.md-deep-purple-A200-bg{background-color:#7c4dff!important;color:#fff}.deep-purple-A200-fg{color:#7c4dff!important}.deep-purple-A200-border{border-color:#7c4dff!important}.deep-purple-A200-border-top{border-top-color:#7c4dff!important}.deep-purple-A200-border-right{border-right-color:#7c4dff!important}.deep-purple-A200-border-bottom{border-bottom-color:#7c4dff!important}.deep-purple-A200-border-left{border-left-color:#7c4dff!important}.deep-purple-A400-bg{background-color:#651fff!important}.md-deep-purple-A400-bg{background-color:#651fff!important;color:rgba(255,255,255,.87)}.deep-purple-A400-fg{color:#651fff!important}.deep-purple-A400-border{border-color:#651fff!important}.deep-purple-A400-border-top{border-top-color:#651fff!important}.deep-purple-A400-border-right{border-right-color:#651fff!important}.deep-purple-A400-border-bottom{border-bottom-color:#651fff!important}.deep-purple-A400-border-left{border-left-color:#651fff!important}.deep-purple-A700-bg{background-color:#6200ea!important}.md-deep-purple-A700-bg{background-color:#6200ea!important;color:rgba(255,255,255,.87)}.deep-purple-A700-fg{color:#6200ea!important}.deep-purple-A700-border{border-color:#6200ea!important}.deep-purple-A700-border-top{border-top-color:#6200ea!important}.deep-purple-A700-border-right{border-right-color:#6200ea!important}.deep-purple-A700-border-bottom{border-bottom-color:#6200ea!important}.deep-purple-A700-border-left{border-left-color:#6200ea!important}.indigo-50-bg{background-color:#e8eaf6!important}.md-indigo-50-bg{background-color:#e8eaf6!important;color:rgba(0,0,0,.87)}.indigo-50-fg{color:#e8eaf6!important}.indigo-50-border{border-color:#e8eaf6!important}.indigo-50-border-top{border-top-color:#e8eaf6!important}.indigo-50-border-right{border-right-color:#e8eaf6!important}.indigo-50-border-bottom{border-bottom-color:#e8eaf6!important}.indigo-50-border-left{border-left-color:#e8eaf6!important}.indigo-100-bg{background-color:#c5cae9!important}.md-indigo-100-bg{background-color:#c5cae9!important;color:rgba(0,0,0,.87)}.indigo-100-fg{color:#c5cae9!important}.indigo-100-border{border-color:#c5cae9!important}.indigo-100-border-top{border-top-color:#c5cae9!important}.indigo-100-border-right{border-right-color:#c5cae9!important}.indigo-100-border-bottom{border-bottom-color:#c5cae9!important}.indigo-100-border-left{border-left-color:#c5cae9!important}.indigo-200-bg{background-color:#9fa8da!important}.md-indigo-200-bg{background-color:#9fa8da!important;color:rgba(0,0,0,.87)}.indigo-200-fg{color:#9fa8da!important}.indigo-200-border{border-color:#9fa8da!important}.indigo-200-border-top{border-top-color:#9fa8da!important}.indigo-200-border-right{border-right-color:#9fa8da!important}.indigo-200-border-bottom{border-bottom-color:#9fa8da!important}.indigo-200-border-left{border-left-color:#9fa8da!important}.indigo-300-bg{background-color:#7986cb!important}.md-indigo-300-bg{background-color:#7986cb!important;color:#fff}.indigo-300-fg{color:#7986cb!important}.indigo-300-border{border-color:#7986cb!important}.indigo-300-border-top{border-top-color:#7986cb!important}.indigo-300-border-right{border-right-color:#7986cb!important}.indigo-300-border-bottom{border-bottom-color:#7986cb!important}.indigo-300-border-left{border-left-color:#7986cb!important}.indigo-400-bg{background-color:#5c6bc0!important}.md-indigo-400-bg{background-color:#5c6bc0!important;color:#fff}.indigo-400-fg{color:#5c6bc0!important}.indigo-400-border{border-color:#5c6bc0!important}.indigo-400-border-top{border-top-color:#5c6bc0!important}.indigo-400-border-right{border-right-color:#5c6bc0!important}.indigo-400-border-bottom{border-bottom-color:#5c6bc0!important}.indigo-400-border-left{border-left-color:#5c6bc0!important}.indigo-500-bg{background-color:#3f51b5!important}.md-indigo-500-bg{background-color:#3f51b5!important;color:rgba(255,255,255,.87)}.indigo-500-fg{color:#3f51b5!important}.indigo-500-border{border-color:#3f51b5!important}.indigo-500-border-top{border-top-color:#3f51b5!important}.indigo-500-border-right{border-right-color:#3f51b5!important}.indigo-500-border-bottom{border-bottom-color:#3f51b5!important}.indigo-500-border-left{border-left-color:#3f51b5!important}.md-indigo-bg{background-color:#3f51b5!important;color:rgba(255,255,255,.87)}.indigo-bg{background-color:#3f51b5!important}.indigo-fg{color:#3f51b5!important}.indigo-border{border-color:#3f51b5!important}.indigo-border-top{border-top-color:#3f51b5!important}.indigo-border-right{border-right-color:#3f51b5!important}.indigo-border-bottom{border-bottom-color:#3f51b5!important}.indigo-border-left{border-left-color:#3f51b5!important}.indigo-600-bg{background-color:#3949ab!important}.md-indigo-600-bg{background-color:#3949ab!important;color:rgba(255,255,255,.87)}.indigo-600-fg{color:#3949ab!important}.indigo-600-border{border-color:#3949ab!important}.indigo-600-border-top{border-top-color:#3949ab!important}.indigo-600-border-right{border-right-color:#3949ab!important}.indigo-600-border-bottom{border-bottom-color:#3949ab!important}.indigo-600-border-left{border-left-color:#3949ab!important}.indigo-700-bg{background-color:#303f9f!important}.md-indigo-700-bg{background-color:#303f9f!important;color:rgba(255,255,255,.87)}.indigo-700-fg{color:#303f9f!important}.indigo-700-border{border-color:#303f9f!important}.indigo-700-border-top{border-top-color:#303f9f!important}.indigo-700-border-right{border-right-color:#303f9f!important}.indigo-700-border-bottom{border-bottom-color:#303f9f!important}.indigo-700-border-left{border-left-color:#303f9f!important}.indigo-800-bg{background-color:#283593!important}.md-indigo-800-bg{background-color:#283593!important;color:rgba(255,255,255,.87)}.indigo-800-fg{color:#283593!important}.indigo-800-border{border-color:#283593!important}.indigo-800-border-top{border-top-color:#283593!important}.indigo-800-border-right{border-right-color:#283593!important}.indigo-800-border-bottom{border-bottom-color:#283593!important}.indigo-800-border-left{border-left-color:#283593!important}.indigo-900-bg{background-color:#1a237e!important}.md-indigo-900-bg{background-color:#1a237e!important;color:rgba(255,255,255,.87)}.indigo-900-fg{color:#1a237e!important}.indigo-900-border{border-color:#1a237e!important}.indigo-900-border-top{border-top-color:#1a237e!important}.indigo-900-border-right{border-right-color:#1a237e!important}.indigo-900-border-bottom{border-bottom-color:#1a237e!important}.indigo-900-border-left{border-left-color:#1a237e!important}.indigo-A100-bg{background-color:#8c9eff!important}.md-indigo-A100-bg{background-color:#8c9eff!important;color:rgba(0,0,0,.87)}.indigo-A100-fg{color:#8c9eff!important}.indigo-A100-border{border-color:#8c9eff!important}.indigo-A100-border-top{border-top-color:#8c9eff!important}.indigo-A100-border-right{border-right-color:#8c9eff!important}.indigo-A100-border-bottom{border-bottom-color:#8c9eff!important}.indigo-A100-border-left{border-left-color:#8c9eff!important}.indigo-A200-bg{background-color:#536dfe!important}.md-indigo-A200-bg{background-color:#536dfe!important;color:#fff}.indigo-A200-fg{color:#536dfe!important}.indigo-A200-border{border-color:#536dfe!important}.indigo-A200-border-top{border-top-color:#536dfe!important}.indigo-A200-border-right{border-right-color:#536dfe!important}.indigo-A200-border-bottom{border-bottom-color:#536dfe!important}.indigo-A200-border-left{border-left-color:#536dfe!important}.indigo-A400-bg{background-color:#3d5afe!important}.md-indigo-A400-bg{background-color:#3d5afe!important;color:#fff}.indigo-A400-fg{color:#3d5afe!important}.indigo-A400-border{border-color:#3d5afe!important}.indigo-A400-border-top{border-top-color:#3d5afe!important}.indigo-A400-border-right{border-right-color:#3d5afe!important}.indigo-A400-border-bottom{border-bottom-color:#3d5afe!important}.indigo-A400-border-left{border-left-color:#3d5afe!important}.indigo-A700-bg{background-color:#304ffe!important}.md-indigo-A700-bg{background-color:#304ffe!important;color:rgba(255,255,255,.87)}.indigo-A700-fg{color:#304ffe!important}.indigo-A700-border{border-color:#304ffe!important}.indigo-A700-border-top{border-top-color:#304ffe!important}.indigo-A700-border-right{border-right-color:#304ffe!important}.indigo-A700-border-bottom{border-bottom-color:#304ffe!important}.indigo-A700-border-left{border-left-color:#304ffe!important}.blue-50-bg{background-color:#e3f2fd!important}.md-blue-50-bg{background-color:#e3f2fd!important;color:rgba(0,0,0,.87)}.blue-50-fg{color:#e3f2fd!important}.blue-50-border{border-color:#e3f2fd!important}.blue-50-border-top{border-top-color:#e3f2fd!important}.blue-50-border-right{border-right-color:#e3f2fd!important}.blue-50-border-bottom{border-bottom-color:#e3f2fd!important}.blue-50-border-left{border-left-color:#e3f2fd!important}.blue-100-bg{background-color:#bbdefb!important}.md-blue-100-bg{background-color:#bbdefb!important;color:rgba(0,0,0,.87)}.blue-100-fg{color:#bbdefb!important}.blue-100-border{border-color:#bbdefb!important}.blue-100-border-top{border-top-color:#bbdefb!important}.blue-100-border-right{border-right-color:#bbdefb!important}.blue-100-border-bottom{border-bottom-color:#bbdefb!important}.blue-100-border-left{border-left-color:#bbdefb!important}.blue-200-bg{background-color:#90caf9!important}.md-blue-200-bg{background-color:#90caf9!important;color:rgba(0,0,0,.87)}.blue-200-fg{color:#90caf9!important}.blue-200-border{border-color:#90caf9!important}.blue-200-border-top{border-top-color:#90caf9!important}.blue-200-border-right{border-right-color:#90caf9!important}.blue-200-border-bottom{border-bottom-color:#90caf9!important}.blue-200-border-left{border-left-color:#90caf9!important}.blue-300-bg{background-color:#64b5f6!important}.md-blue-300-bg{background-color:#64b5f6!important;color:rgba(0,0,0,.87)}.blue-300-fg{color:#64b5f6!important}.blue-300-border{border-color:#64b5f6!important}.blue-300-border-top{border-top-color:#64b5f6!important}.blue-300-border-right{border-right-color:#64b5f6!important}.blue-300-border-bottom{border-bottom-color:#64b5f6!important}.blue-300-border-left{border-left-color:#64b5f6!important}.blue-400-bg{background-color:#42a5f5!important}.md-blue-400-bg{background-color:#42a5f5!important;color:rgba(0,0,0,.87)}.blue-400-fg{color:#42a5f5!important}.blue-400-border{border-color:#42a5f5!important}.blue-400-border-top{border-top-color:#42a5f5!important}.blue-400-border-right{border-right-color:#42a5f5!important}.blue-400-border-bottom{border-bottom-color:#42a5f5!important}.blue-400-border-left{border-left-color:#42a5f5!important}.blue-500-bg{background-color:#2196f3!important}.md-blue-500-bg{background-color:#2196f3!important;color:#fff}.blue-500-fg{color:#2196f3!important}.blue-500-border{border-color:#2196f3!important}.blue-500-border-top{border-top-color:#2196f3!important}.blue-500-border-right{border-right-color:#2196f3!important}.blue-500-border-bottom{border-bottom-color:#2196f3!important}.blue-500-border-left{border-left-color:#2196f3!important}.md-blue-bg{background-color:#2196f3!important;color:#fff}.blue-bg{background-color:#2196f3!important}.blue-fg{color:#2196f3!important}.blue-border{border-color:#2196f3!important}.blue-border-top{border-top-color:#2196f3!important}.blue-border-right{border-right-color:#2196f3!important}.blue-border-bottom{border-bottom-color:#2196f3!important}.blue-border-left{border-left-color:#2196f3!important}.blue-600-bg{background-color:#1e88e5!important}.md-blue-600-bg{background-color:#1e88e5!important;color:#fff}.blue-600-fg{color:#1e88e5!important}.blue-600-border{border-color:#1e88e5!important}.blue-600-border-top{border-top-color:#1e88e5!important}.blue-600-border-right{border-right-color:#1e88e5!important}.blue-600-border-bottom{border-bottom-color:#1e88e5!important}.blue-600-border-left{border-left-color:#1e88e5!important}.blue-700-bg{background-color:#1976d2!important}.md-blue-700-bg{background-color:#1976d2!important;color:#fff}.blue-700-fg{color:#1976d2!important}.blue-700-border{border-color:#1976d2!important}.blue-700-border-top{border-top-color:#1976d2!important}.blue-700-border-right{border-right-color:#1976d2!important}.blue-700-border-bottom{border-bottom-color:#1976d2!important}.blue-700-border-left{border-left-color:#1976d2!important}.blue-800-bg{background-color:#1565c0!important}.md-blue-800-bg{background-color:#1565c0!important;color:rgba(255,255,255,.87)}.blue-800-fg{color:#1565c0!important}.blue-800-border{border-color:#1565c0!important}.blue-800-border-top{border-top-color:#1565c0!important}.blue-800-border-right{border-right-color:#1565c0!important}.blue-800-border-bottom{border-bottom-color:#1565c0!important}.blue-800-border-left{border-left-color:#1565c0!important}.blue-900-bg{background-color:#0d47a1!important}.md-blue-900-bg{background-color:#0d47a1!important;color:rgba(255,255,255,.87)}.blue-900-fg{color:#0d47a1!important}.blue-900-border{border-color:#0d47a1!important}.blue-900-border-top{border-top-color:#0d47a1!important}.blue-900-border-right{border-right-color:#0d47a1!important}.blue-900-border-bottom{border-bottom-color:#0d47a1!important}.blue-900-border-left{border-left-color:#0d47a1!important}.blue-A100-bg{background-color:#82b1ff!important}.md-blue-A100-bg{background-color:#82b1ff!important;color:rgba(0,0,0,.87)}.blue-A100-fg{color:#82b1ff!important}.blue-A100-border{border-color:#82b1ff!important}.blue-A100-border-top{border-top-color:#82b1ff!important}.blue-A100-border-right{border-right-color:#82b1ff!important}.blue-A100-border-bottom{border-bottom-color:#82b1ff!important}.blue-A100-border-left{border-left-color:#82b1ff!important}.blue-A200-bg{background-color:#448aff!important}.md-blue-A200-bg{background-color:#448aff!important;color:#fff}.blue-A200-fg{color:#448aff!important}.blue-A200-border{border-color:#448aff!important}.blue-A200-border-top{border-top-color:#448aff!important}.blue-A200-border-right{border-right-color:#448aff!important}.blue-A200-border-bottom{border-bottom-color:#448aff!important}.blue-A200-border-left{border-left-color:#448aff!important}.blue-A400-bg{background-color:#2979ff!important}.md-blue-A400-bg{background-color:#2979ff!important;color:#fff}.blue-A400-fg{color:#2979ff!important}.blue-A400-border{border-color:#2979ff!important}.blue-A400-border-top{border-top-color:#2979ff!important}.blue-A400-border-right{border-right-color:#2979ff!important}.blue-A400-border-bottom{border-bottom-color:#2979ff!important}.blue-A400-border-left{border-left-color:#2979ff!important}.blue-A700-bg{background-color:#2962ff!important}.md-blue-A700-bg{background-color:#2962ff!important;color:#fff}.blue-A700-fg{color:#2962ff!important}.blue-A700-border{border-color:#2962ff!important}.blue-A700-border-top{border-top-color:#2962ff!important}.blue-A700-border-right{border-right-color:#2962ff!important}.blue-A700-border-bottom{border-bottom-color:#2962ff!important}.blue-A700-border-left{border-left-color:#2962ff!important}.light-blue-50-bg{background-color:#e1f5fe!important}.md-light-blue-50-bg{background-color:#e1f5fe!important;color:rgba(0,0,0,.87)}.light-blue-50-fg{color:#e1f5fe!important}.light-blue-50-border{border-color:#e1f5fe!important}.light-blue-50-border-top{border-top-color:#e1f5fe!important}.light-blue-50-border-right{border-right-color:#e1f5fe!important}.light-blue-50-border-bottom{border-bottom-color:#e1f5fe!important}.light-blue-50-border-left{border-left-color:#e1f5fe!important}.light-blue-100-bg{background-color:#b3e5fc!important}.md-light-blue-100-bg{background-color:#b3e5fc!important;color:rgba(0,0,0,.87)}.light-blue-100-fg{color:#b3e5fc!important}.light-blue-100-border{border-color:#b3e5fc!important}.light-blue-100-border-top{border-top-color:#b3e5fc!important}.light-blue-100-border-right{border-right-color:#b3e5fc!important}.light-blue-100-border-bottom{border-bottom-color:#b3e5fc!important}.light-blue-100-border-left{border-left-color:#b3e5fc!important}.light-blue-200-bg{background-color:#81d4fa!important}.md-light-blue-200-bg{background-color:#81d4fa!important;color:rgba(0,0,0,.87)}.light-blue-200-fg{color:#81d4fa!important}.light-blue-200-border{border-color:#81d4fa!important}.light-blue-200-border-top{border-top-color:#81d4fa!important}.light-blue-200-border-right{border-right-color:#81d4fa!important}.light-blue-200-border-bottom{border-bottom-color:#81d4fa!important}.light-blue-200-border-left{border-left-color:#81d4fa!important}.light-blue-300-bg{background-color:#4fc3f7!important}.md-light-blue-300-bg{background-color:#4fc3f7!important;color:rgba(0,0,0,.87)}.light-blue-300-fg{color:#4fc3f7!important}.light-blue-300-border{border-color:#4fc3f7!important}.light-blue-300-border-top{border-top-color:#4fc3f7!important}.light-blue-300-border-right{border-right-color:#4fc3f7!important}.light-blue-300-border-bottom{border-bottom-color:#4fc3f7!important}.light-blue-300-border-left{border-left-color:#4fc3f7!important}.light-blue-400-bg{background-color:#29b6f6!important}.md-light-blue-400-bg{background-color:#29b6f6!important;color:rgba(0,0,0,.87)}.light-blue-400-fg{color:#29b6f6!important}.light-blue-400-border{border-color:#29b6f6!important}.light-blue-400-border-top{border-top-color:#29b6f6!important}.light-blue-400-border-right{border-right-color:#29b6f6!important}.light-blue-400-border-bottom{border-bottom-color:#29b6f6!important}.light-blue-400-border-left{border-left-color:#29b6f6!important}.light-blue-500-bg{background-color:#03a9f4!important}.md-light-blue-500-bg{background-color:#03a9f4!important;color:rgba(0,0,0,.87)}.light-blue-500-fg{color:#03a9f4!important}.light-blue-500-border{border-color:#03a9f4!important}.light-blue-500-border-top{border-top-color:#03a9f4!important}.light-blue-500-border-right{border-right-color:#03a9f4!important}.light-blue-500-border-bottom{border-bottom-color:#03a9f4!important}.light-blue-500-border-left{border-left-color:#03a9f4!important}.md-light-blue-bg{background-color:#03a9f4!important;color:rgba(0,0,0,.87)}.light-blue-bg{background-color:#03a9f4!important}.light-blue-fg{color:#03a9f4!important}.light-blue-border{border-color:#03a9f4!important}.light-blue-border-top{border-top-color:#03a9f4!important}.light-blue-border-right{border-right-color:#03a9f4!important}.light-blue-border-bottom{border-bottom-color:#03a9f4!important}.light-blue-border-left{border-left-color:#03a9f4!important}.light-blue-600-bg{background-color:#039be5!important}.md-light-blue-600-bg{background-color:#039be5!important;color:#fff}.light-blue-600-fg{color:#039be5!important}.light-blue-600-border{border-color:#039be5!important}.light-blue-600-border-top{border-top-color:#039be5!important}.light-blue-600-border-right{border-right-color:#039be5!important}.light-blue-600-border-bottom{border-bottom-color:#039be5!important}.light-blue-600-border-left{border-left-color:#039be5!important}.light-blue-700-bg{background-color:#0288d1!important}.md-light-blue-700-bg{background-color:#0288d1!important;color:#fff}.light-blue-700-fg{color:#0288d1!important}.light-blue-700-border{border-color:#0288d1!important}.light-blue-700-border-top{border-top-color:#0288d1!important}.light-blue-700-border-right{border-right-color:#0288d1!important}.light-blue-700-border-bottom{border-bottom-color:#0288d1!important}.light-blue-700-border-left{border-left-color:#0288d1!important}.light-blue-800-bg{background-color:#0277bd!important}.md-light-blue-800-bg{background-color:#0277bd!important;color:#fff}.light-blue-800-fg{color:#0277bd!important}.light-blue-800-border{border-color:#0277bd!important}.light-blue-800-border-top{border-top-color:#0277bd!important}.light-blue-800-border-right{border-right-color:#0277bd!important}.light-blue-800-border-bottom{border-bottom-color:#0277bd!important}.light-blue-800-border-left{border-left-color:#0277bd!important}.light-blue-900-bg{background-color:#01579b!important}.md-light-blue-900-bg{background-color:#01579b!important;color:#fff}.light-blue-900-fg{color:#01579b!important}.light-blue-900-border{border-color:#01579b!important}.light-blue-900-border-top{border-top-color:#01579b!important}.light-blue-900-border-right{border-right-color:#01579b!important}.light-blue-900-border-bottom{border-bottom-color:#01579b!important}.light-blue-900-border-left{border-left-color:#01579b!important}.light-blue-A100-bg{background-color:#80d8ff!important}.md-light-blue-A100-bg{background-color:#80d8ff!important;color:rgba(0,0,0,.87)}.light-blue-A100-fg{color:#80d8ff!important}.light-blue-A100-border{border-color:#80d8ff!important}.light-blue-A100-border-top{border-top-color:#80d8ff!important}.light-blue-A100-border-right{border-right-color:#80d8ff!important}.light-blue-A100-border-bottom{border-bottom-color:#80d8ff!important}.light-blue-A100-border-left{border-left-color:#80d8ff!important}.light-blue-A200-bg{background-color:#40c4ff!important}.md-light-blue-A200-bg{background-color:#40c4ff!important;color:rgba(0,0,0,.87)}.light-blue-A200-fg{color:#40c4ff!important}.light-blue-A200-border{border-color:#40c4ff!important}.light-blue-A200-border-top{border-top-color:#40c4ff!important}.light-blue-A200-border-right{border-right-color:#40c4ff!important}.light-blue-A200-border-bottom{border-bottom-color:#40c4ff!important}.light-blue-A200-border-left{border-left-color:#40c4ff!important}.light-blue-A400-bg{background-color:#00b0ff!important}.md-light-blue-A400-bg{background-color:#00b0ff!important;color:rgba(0,0,0,.87)}.light-blue-A400-fg{color:#00b0ff!important}.light-blue-A400-border{border-color:#00b0ff!important}.light-blue-A400-border-top{border-top-color:#00b0ff!important}.light-blue-A400-border-right{border-right-color:#00b0ff!important}.light-blue-A400-border-bottom{border-bottom-color:#00b0ff!important}.light-blue-A400-border-left{border-left-color:#00b0ff!important}.light-blue-A700-bg{background-color:#0091ea!important}.md-light-blue-A700-bg{background-color:#0091ea!important;color:#fff}.light-blue-A700-fg{color:#0091ea!important}.light-blue-A700-border{border-color:#0091ea!important}.light-blue-A700-border-top{border-top-color:#0091ea!important}.light-blue-A700-border-right{border-right-color:#0091ea!important}.light-blue-A700-border-bottom{border-bottom-color:#0091ea!important}.light-blue-A700-border-left{border-left-color:#0091ea!important}.cyan-50-bg{background-color:#e0f7fa!important}.md-cyan-50-bg{background-color:#e0f7fa!important;color:rgba(0,0,0,.87)}.cyan-50-fg{color:#e0f7fa!important}.cyan-50-border{border-color:#e0f7fa!important}.cyan-50-border-top{border-top-color:#e0f7fa!important}.cyan-50-border-right{border-right-color:#e0f7fa!important}.cyan-50-border-bottom{border-bottom-color:#e0f7fa!important}.cyan-50-border-left{border-left-color:#e0f7fa!important}.cyan-100-bg{background-color:#b2ebf2!important}.md-cyan-100-bg{background-color:#b2ebf2!important;color:rgba(0,0,0,.87)}.cyan-100-fg{color:#b2ebf2!important}.cyan-100-border{border-color:#b2ebf2!important}.cyan-100-border-top{border-top-color:#b2ebf2!important}.cyan-100-border-right{border-right-color:#b2ebf2!important}.cyan-100-border-bottom{border-bottom-color:#b2ebf2!important}.cyan-100-border-left{border-left-color:#b2ebf2!important}.cyan-200-bg{background-color:#80deea!important}.md-cyan-200-bg{background-color:#80deea!important;color:rgba(0,0,0,.87)}.cyan-200-fg{color:#80deea!important}.cyan-200-border{border-color:#80deea!important}.cyan-200-border-top{border-top-color:#80deea!important}.cyan-200-border-right{border-right-color:#80deea!important}.cyan-200-border-bottom{border-bottom-color:#80deea!important}.cyan-200-border-left{border-left-color:#80deea!important}.cyan-300-bg{background-color:#4dd0e1!important}.md-cyan-300-bg{background-color:#4dd0e1!important;color:rgba(0,0,0,.87)}.cyan-300-fg{color:#4dd0e1!important}.cyan-300-border{border-color:#4dd0e1!important}.cyan-300-border-top{border-top-color:#4dd0e1!important}.cyan-300-border-right{border-right-color:#4dd0e1!important}.cyan-300-border-bottom{border-bottom-color:#4dd0e1!important}.cyan-300-border-left{border-left-color:#4dd0e1!important}.cyan-400-bg{background-color:#26c6da!important}.md-cyan-400-bg{background-color:#26c6da!important;color:rgba(0,0,0,.87)}.cyan-400-fg{color:#26c6da!important}.cyan-400-border{border-color:#26c6da!important}.cyan-400-border-top{border-top-color:#26c6da!important}.cyan-400-border-right{border-right-color:#26c6da!important}.cyan-400-border-bottom{border-bottom-color:#26c6da!important}.cyan-400-border-left{border-left-color:#26c6da!important}.cyan-500-bg{background-color:#00bcd4!important}.md-cyan-500-bg{background-color:#00bcd4!important;color:rgba(0,0,0,.87)}.cyan-500-fg{color:#00bcd4!important}.cyan-500-border{border-color:#00bcd4!important}.cyan-500-border-top{border-top-color:#00bcd4!important}.cyan-500-border-right{border-right-color:#00bcd4!important}.cyan-500-border-bottom{border-bottom-color:#00bcd4!important}.cyan-500-border-left{border-left-color:#00bcd4!important}.md-cyan-bg{background-color:#00bcd4!important;color:rgba(0,0,0,.87)}.cyan-bg{background-color:#00bcd4!important}.cyan-fg{color:#00bcd4!important}.cyan-border{border-color:#00bcd4!important}.cyan-border-top{border-top-color:#00bcd4!important}.cyan-border-right{border-right-color:#00bcd4!important}.cyan-border-bottom{border-bottom-color:#00bcd4!important}.cyan-border-left{border-left-color:#00bcd4!important}.cyan-600-bg{background-color:#00acc1!important}.md-cyan-600-bg{background-color:#00acc1!important;color:rgba(0,0,0,.87)}.cyan-600-fg{color:#00acc1!important}.cyan-600-border{border-color:#00acc1!important}.cyan-600-border-top{border-top-color:#00acc1!important}.cyan-600-border-right{border-right-color:#00acc1!important}.cyan-600-border-bottom{border-bottom-color:#00acc1!important}.cyan-600-border-left{border-left-color:#00acc1!important}.cyan-700-bg{background-color:#0097a7!important}.md-cyan-700-bg{background-color:#0097a7!important;color:#fff}.cyan-700-fg{color:#0097a7!important}.cyan-700-border{border-color:#0097a7!important}.cyan-700-border-top{border-top-color:#0097a7!important}.cyan-700-border-right{border-right-color:#0097a7!important}.cyan-700-border-bottom{border-bottom-color:#0097a7!important}.cyan-700-border-left{border-left-color:#0097a7!important}.cyan-800-bg{background-color:#00838f!important}.md-cyan-800-bg{background-color:#00838f!important;color:#fff}.cyan-800-fg{color:#00838f!important}.cyan-800-border{border-color:#00838f!important}.cyan-800-border-top{border-top-color:#00838f!important}.cyan-800-border-right{border-right-color:#00838f!important}.cyan-800-border-bottom{border-bottom-color:#00838f!important}.cyan-800-border-left{border-left-color:#00838f!important}.cyan-900-bg{background-color:#006064!important}.md-cyan-900-bg{background-color:#006064!important;color:#fff}.cyan-900-fg{color:#006064!important}.cyan-900-border{border-color:#006064!important}.cyan-900-border-top{border-top-color:#006064!important}.cyan-900-border-right{border-right-color:#006064!important}.cyan-900-border-bottom{border-bottom-color:#006064!important}.cyan-900-border-left{border-left-color:#006064!important}.cyan-A100-bg{background-color:#84ffff!important}.md-cyan-A100-bg{background-color:#84ffff!important;color:rgba(0,0,0,.87)}.cyan-A100-fg{color:#84ffff!important}.cyan-A100-border{border-color:#84ffff!important}.cyan-A100-border-top{border-top-color:#84ffff!important}.cyan-A100-border-right{border-right-color:#84ffff!important}.cyan-A100-border-bottom{border-bottom-color:#84ffff!important}.cyan-A100-border-left{border-left-color:#84ffff!important}.cyan-A200-bg{background-color:#18ffff!important}.md-cyan-A200-bg{background-color:#18ffff!important;color:rgba(0,0,0,.87)}.cyan-A200-fg{color:#18ffff!important}.cyan-A200-border{border-color:#18ffff!important}.cyan-A200-border-top{border-top-color:#18ffff!important}.cyan-A200-border-right{border-right-color:#18ffff!important}.cyan-A200-border-bottom{border-bottom-color:#18ffff!important}.cyan-A200-border-left{border-left-color:#18ffff!important}.cyan-A400-bg{background-color:#00e5ff!important}.md-cyan-A400-bg{background-color:#00e5ff!important;color:rgba(0,0,0,.87)}.cyan-A400-fg{color:#00e5ff!important}.cyan-A400-border{border-color:#00e5ff!important}.cyan-A400-border-top{border-top-color:#00e5ff!important}.cyan-A400-border-right{border-right-color:#00e5ff!important}.cyan-A400-border-bottom{border-bottom-color:#00e5ff!important}.cyan-A400-border-left{border-left-color:#00e5ff!important}.cyan-A700-bg{background-color:#00b8d4!important}.md-cyan-A700-bg{background-color:#00b8d4!important;color:rgba(0,0,0,.87)}.cyan-A700-fg{color:#00b8d4!important}.cyan-A700-border{border-color:#00b8d4!important}.cyan-A700-border-top{border-top-color:#00b8d4!important}.cyan-A700-border-right{border-right-color:#00b8d4!important}.cyan-A700-border-bottom{border-bottom-color:#00b8d4!important}.cyan-A700-border-left{border-left-color:#00b8d4!important}.teal-50-bg{background-color:#e0f2f1!important}.md-teal-50-bg{background-color:#e0f2f1!important;color:rgba(0,0,0,.87)}.teal-50-fg{color:#e0f2f1!important}.teal-50-border{border-color:#e0f2f1!important}.teal-50-border-top{border-top-color:#e0f2f1!important}.teal-50-border-right{border-right-color:#e0f2f1!important}.teal-50-border-bottom{border-bottom-color:#e0f2f1!important}.teal-50-border-left{border-left-color:#e0f2f1!important}.teal-100-bg{background-color:#b2dfdb!important}.md-teal-100-bg{background-color:#b2dfdb!important;color:rgba(0,0,0,.87)}.teal-100-fg{color:#b2dfdb!important}.teal-100-border{border-color:#b2dfdb!important}.teal-100-border-top{border-top-color:#b2dfdb!important}.teal-100-border-right{border-right-color:#b2dfdb!important}.teal-100-border-bottom{border-bottom-color:#b2dfdb!important}.teal-100-border-left{border-left-color:#b2dfdb!important}.teal-200-bg{background-color:#80cbc4!important}.md-teal-200-bg{background-color:#80cbc4!important;color:rgba(0,0,0,.87)}.teal-200-fg{color:#80cbc4!important}.teal-200-border{border-color:#80cbc4!important}.teal-200-border-top{border-top-color:#80cbc4!important}.teal-200-border-right{border-right-color:#80cbc4!important}.teal-200-border-bottom{border-bottom-color:#80cbc4!important}.teal-200-border-left{border-left-color:#80cbc4!important}.teal-300-bg{background-color:#4db6ac!important}.md-teal-300-bg{background-color:#4db6ac!important;color:rgba(0,0,0,.87)}.teal-300-fg{color:#4db6ac!important}.teal-300-border{border-color:#4db6ac!important}.teal-300-border-top{border-top-color:#4db6ac!important}.teal-300-border-right{border-right-color:#4db6ac!important}.teal-300-border-bottom{border-bottom-color:#4db6ac!important}.teal-300-border-left{border-left-color:#4db6ac!important}.teal-400-bg{background-color:#26a69a!important}.md-teal-400-bg{background-color:#26a69a!important;color:rgba(0,0,0,.87)}.teal-400-fg{color:#26a69a!important}.teal-400-border{border-color:#26a69a!important}.teal-400-border-top{border-top-color:#26a69a!important}.teal-400-border-right{border-right-color:#26a69a!important}.teal-400-border-bottom{border-bottom-color:#26a69a!important}.teal-400-border-left{border-left-color:#26a69a!important}.teal-500-bg{background-color:#009688!important}.md-teal-500-bg{background-color:#009688!important;color:#fff}.teal-500-fg{color:#009688!important}.teal-500-border{border-color:#009688!important}.teal-500-border-top{border-top-color:#009688!important}.teal-500-border-right{border-right-color:#009688!important}.teal-500-border-bottom{border-bottom-color:#009688!important}.teal-500-border-left{border-left-color:#009688!important}.md-teal-bg{background-color:#009688!important;color:#fff}.teal-bg{background-color:#009688!important}.teal-fg{color:#009688!important}.teal-border{border-color:#009688!important}.teal-border-top{border-top-color:#009688!important}.teal-border-right{border-right-color:#009688!important}.teal-border-bottom{border-bottom-color:#009688!important}.teal-border-left{border-left-color:#009688!important}.teal-600-bg{background-color:#00897b!important}.md-teal-600-bg{background-color:#00897b!important;color:#fff}.teal-600-fg{color:#00897b!important}.teal-600-border{border-color:#00897b!important}.teal-600-border-top{border-top-color:#00897b!important}.teal-600-border-right{border-right-color:#00897b!important}.teal-600-border-bottom{border-bottom-color:#00897b!important}.teal-600-border-left{border-left-color:#00897b!important}.teal-700-bg{background-color:#00796b!important}.md-teal-700-bg{background-color:#00796b!important;color:#fff}.teal-700-fg{color:#00796b!important}.teal-700-border{border-color:#00796b!important}.teal-700-border-top{border-top-color:#00796b!important}.teal-700-border-right{border-right-color:#00796b!important}.teal-700-border-bottom{border-bottom-color:#00796b!important}.teal-700-border-left{border-left-color:#00796b!important}.teal-800-bg{background-color:#00695c!important}.md-teal-800-bg{background-color:#00695c!important;color:rgba(255,255,255,.87)}.teal-800-fg{color:#00695c!important}.teal-800-border{border-color:#00695c!important}.teal-800-border-top{border-top-color:#00695c!important}.teal-800-border-right{border-right-color:#00695c!important}.teal-800-border-bottom{border-bottom-color:#00695c!important}.teal-800-border-left{border-left-color:#00695c!important}.teal-900-bg{background-color:#004d40!important}.md-teal-900-bg{background-color:#004d40!important;color:rgba(255,255,255,.87)}.teal-900-fg{color:#004d40!important}.teal-900-border{border-color:#004d40!important}.teal-900-border-top{border-top-color:#004d40!important}.teal-900-border-right{border-right-color:#004d40!important}.teal-900-border-bottom{border-bottom-color:#004d40!important}.teal-900-border-left{border-left-color:#004d40!important}.teal-A100-bg{background-color:#a7ffeb!important}.md-teal-A100-bg{background-color:#a7ffeb!important;color:rgba(0,0,0,.87)}.teal-A100-fg{color:#a7ffeb!important}.teal-A100-border{border-color:#a7ffeb!important}.teal-A100-border-top{border-top-color:#a7ffeb!important}.teal-A100-border-right{border-right-color:#a7ffeb!important}.teal-A100-border-bottom{border-bottom-color:#a7ffeb!important}.teal-A100-border-left{border-left-color:#a7ffeb!important}.teal-A200-bg{background-color:#64ffda!important}.md-teal-A200-bg{background-color:#64ffda!important;color:rgba(0,0,0,.87)}.teal-A200-fg{color:#64ffda!important}.teal-A200-border{border-color:#64ffda!important}.teal-A200-border-top{border-top-color:#64ffda!important}.teal-A200-border-right{border-right-color:#64ffda!important}.teal-A200-border-bottom{border-bottom-color:#64ffda!important}.teal-A200-border-left{border-left-color:#64ffda!important}.teal-A400-bg{background-color:#1de9b6!important}.md-teal-A400-bg{background-color:#1de9b6!important;color:rgba(0,0,0,.87)}.teal-A400-fg{color:#1de9b6!important}.teal-A400-border{border-color:#1de9b6!important}.teal-A400-border-top{border-top-color:#1de9b6!important}.teal-A400-border-right{border-right-color:#1de9b6!important}.teal-A400-border-bottom{border-bottom-color:#1de9b6!important}.teal-A400-border-left{border-left-color:#1de9b6!important}.teal-A700-bg{background-color:#00bfa5!important}.md-teal-A700-bg{background-color:#00bfa5!important;color:rgba(0,0,0,.87)}.teal-A700-fg{color:#00bfa5!important}.teal-A700-border{border-color:#00bfa5!important}.teal-A700-border-top{border-top-color:#00bfa5!important}.teal-A700-border-right{border-right-color:#00bfa5!important}.teal-A700-border-bottom{border-bottom-color:#00bfa5!important}.teal-A700-border-left{border-left-color:#00bfa5!important}.green-50-bg{background-color:#e8f5e9!important}.md-green-50-bg{background-color:#e8f5e9!important;color:rgba(0,0,0,.87)}.green-50-fg{color:#e8f5e9!important}.green-50-border{border-color:#e8f5e9!important}.green-50-border-top{border-top-color:#e8f5e9!important}.green-50-border-right{border-right-color:#e8f5e9!important}.green-50-border-bottom{border-bottom-color:#e8f5e9!important}.green-50-border-left{border-left-color:#e8f5e9!important}.green-100-bg{background-color:#c8e6c9!important}.md-green-100-bg{background-color:#c8e6c9!important;color:rgba(0,0,0,.87)}.green-100-fg{color:#c8e6c9!important}.green-100-border{border-color:#c8e6c9!important}.green-100-border-top{border-top-color:#c8e6c9!important}.green-100-border-right{border-right-color:#c8e6c9!important}.green-100-border-bottom{border-bottom-color:#c8e6c9!important}.green-100-border-left{border-left-color:#c8e6c9!important}.green-200-bg{background-color:#a5d6a7!important}.md-green-200-bg{background-color:#a5d6a7!important;color:rgba(0,0,0,.87)}.green-200-fg{color:#a5d6a7!important}.green-200-border{border-color:#a5d6a7!important}.green-200-border-top{border-top-color:#a5d6a7!important}.green-200-border-right{border-right-color:#a5d6a7!important}.green-200-border-bottom{border-bottom-color:#a5d6a7!important}.green-200-border-left{border-left-color:#a5d6a7!important}.green-300-bg{background-color:#81c784!important}.md-green-300-bg{background-color:#81c784!important;color:rgba(0,0,0,.87)}.green-300-fg{color:#81c784!important}.green-300-border{border-color:#81c784!important}.green-300-border-top{border-top-color:#81c784!important}.green-300-border-right{border-right-color:#81c784!important}.green-300-border-bottom{border-bottom-color:#81c784!important}.green-300-border-left{border-left-color:#81c784!important}.green-400-bg{background-color:#66bb6a!important}.md-green-400-bg{background-color:#66bb6a!important;color:rgba(0,0,0,.87)}.green-400-fg{color:#66bb6a!important}.green-400-border{border-color:#66bb6a!important}.green-400-border-top{border-top-color:#66bb6a!important}.green-400-border-right{border-right-color:#66bb6a!important}.green-400-border-bottom{border-bottom-color:#66bb6a!important}.green-400-border-left{border-left-color:#66bb6a!important}.green-500-bg{background-color:#4caf50!important}.md-green-500-bg{background-color:#4caf50!important;color:rgba(0,0,0,.87)}.green-500-fg{color:#4caf50!important}.green-500-border{border-color:#4caf50!important}.green-500-border-top{border-top-color:#4caf50!important}.green-500-border-right{border-right-color:#4caf50!important}.green-500-border-bottom{border-bottom-color:#4caf50!important}.green-500-border-left{border-left-color:#4caf50!important}.md-green-bg{background-color:#4caf50!important;color:rgba(0,0,0,.87)}.green-bg{background-color:#4caf50!important}.green-fg{color:#4caf50!important}.green-border{border-color:#4caf50!important}.green-border-top{border-top-color:#4caf50!important}.green-border-right{border-right-color:#4caf50!important}.green-border-bottom{border-bottom-color:#4caf50!important}.green-border-left{border-left-color:#4caf50!important}.green-600-bg{background-color:#43a047!important}.md-green-600-bg{background-color:#43a047!important;color:#fff}.green-600-fg{color:#43a047!important}.green-600-border{border-color:#43a047!important}.green-600-border-top{border-top-color:#43a047!important}.green-600-border-right{border-right-color:#43a047!important}.green-600-border-bottom{border-bottom-color:#43a047!important}.green-600-border-left{border-left-color:#43a047!important}.green-700-bg{background-color:#388e3c!important}.md-green-700-bg{background-color:#388e3c!important;color:#fff}.green-700-fg{color:#388e3c!important}.green-700-border{border-color:#388e3c!important}.green-700-border-top{border-top-color:#388e3c!important}.green-700-border-right{border-right-color:#388e3c!important}.green-700-border-bottom{border-bottom-color:#388e3c!important}.green-700-border-left{border-left-color:#388e3c!important}.green-800-bg{background-color:#2e7d32!important}.md-green-800-bg{background-color:#2e7d32!important;color:rgba(255,255,255,.87)}.green-800-fg{color:#2e7d32!important}.green-800-border{border-color:#2e7d32!important}.green-800-border-top{border-top-color:#2e7d32!important}.green-800-border-right{border-right-color:#2e7d32!important}.green-800-border-bottom{border-bottom-color:#2e7d32!important}.green-800-border-left{border-left-color:#2e7d32!important}.green-900-bg{background-color:#1b5e20!important}.md-green-900-bg{background-color:#1b5e20!important;color:rgba(255,255,255,.87)}.green-900-fg{color:#1b5e20!important}.green-900-border{border-color:#1b5e20!important}.green-900-border-top{border-top-color:#1b5e20!important}.green-900-border-right{border-right-color:#1b5e20!important}.green-900-border-bottom{border-bottom-color:#1b5e20!important}.green-900-border-left{border-left-color:#1b5e20!important}.green-A100-bg{background-color:#b9f6ca!important}.md-green-A100-bg{background-color:#b9f6ca!important;color:rgba(0,0,0,.87)}.green-A100-fg{color:#b9f6ca!important}.green-A100-border{border-color:#b9f6ca!important}.green-A100-border-top{border-top-color:#b9f6ca!important}.green-A100-border-right{border-right-color:#b9f6ca!important}.green-A100-border-bottom{border-bottom-color:#b9f6ca!important}.green-A100-border-left{border-left-color:#b9f6ca!important}.green-A200-bg{background-color:#69f0ae!important}.md-green-A200-bg{background-color:#69f0ae!important;color:rgba(0,0,0,.87)}.green-A200-fg{color:#69f0ae!important}.green-A200-border{border-color:#69f0ae!important}.green-A200-border-top{border-top-color:#69f0ae!important}.green-A200-border-right{border-right-color:#69f0ae!important}.green-A200-border-bottom{border-bottom-color:#69f0ae!important}.green-A200-border-left{border-left-color:#69f0ae!important}.green-A400-bg{background-color:#00e676!important}.md-green-A400-bg{background-color:#00e676!important;color:rgba(0,0,0,.87)}.green-A400-fg{color:#00e676!important}.green-A400-border{border-color:#00e676!important}.green-A400-border-top{border-top-color:#00e676!important}.green-A400-border-right{border-right-color:#00e676!important}.green-A400-border-bottom{border-bottom-color:#00e676!important}.green-A400-border-left{border-left-color:#00e676!important}.green-A700-bg{background-color:#00c853!important}.md-green-A700-bg{background-color:#00c853!important;color:rgba(0,0,0,.87)}.green-A700-fg{color:#00c853!important}.green-A700-border{border-color:#00c853!important}.green-A700-border-top{border-top-color:#00c853!important}.green-A700-border-right{border-right-color:#00c853!important}.green-A700-border-bottom{border-bottom-color:#00c853!important}.green-A700-border-left{border-left-color:#00c853!important}.light-green-50-bg{background-color:#f1f8e9!important}.md-light-green-50-bg{background-color:#f1f8e9!important;color:rgba(0,0,0,.87)}.light-green-50-fg{color:#f1f8e9!important}.light-green-50-border{border-color:#f1f8e9!important}.light-green-50-border-top{border-top-color:#f1f8e9!important}.light-green-50-border-right{border-right-color:#f1f8e9!important}.light-green-50-border-bottom{border-bottom-color:#f1f8e9!important}.light-green-50-border-left{border-left-color:#f1f8e9!important}.light-green-100-bg{background-color:#dcedc8!important}.md-light-green-100-bg{background-color:#dcedc8!important;color:rgba(0,0,0,.87)}.light-green-100-fg{color:#dcedc8!important}.light-green-100-border{border-color:#dcedc8!important}.light-green-100-border-top{border-top-color:#dcedc8!important}.light-green-100-border-right{border-right-color:#dcedc8!important}.light-green-100-border-bottom{border-bottom-color:#dcedc8!important}.light-green-100-border-left{border-left-color:#dcedc8!important}.light-green-200-bg{background-color:#c5e1a5!important}.md-light-green-200-bg{background-color:#c5e1a5!important;color:rgba(0,0,0,.87)}.light-green-200-fg{color:#c5e1a5!important}.light-green-200-border{border-color:#c5e1a5!important}.light-green-200-border-top{border-top-color:#c5e1a5!important}.light-green-200-border-right{border-right-color:#c5e1a5!important}.light-green-200-border-bottom{border-bottom-color:#c5e1a5!important}.light-green-200-border-left{border-left-color:#c5e1a5!important}.light-green-300-bg{background-color:#aed581!important}.md-light-green-300-bg{background-color:#aed581!important;color:rgba(0,0,0,.87)}.light-green-300-fg{color:#aed581!important}.light-green-300-border{border-color:#aed581!important}.light-green-300-border-top{border-top-color:#aed581!important}.light-green-300-border-right{border-right-color:#aed581!important}.light-green-300-border-bottom{border-bottom-color:#aed581!important}.light-green-300-border-left{border-left-color:#aed581!important}.light-green-400-bg{background-color:#9ccc65!important}.md-light-green-400-bg{background-color:#9ccc65!important;color:rgba(0,0,0,.87)}.light-green-400-fg{color:#9ccc65!important}.light-green-400-border{border-color:#9ccc65!important}.light-green-400-border-top{border-top-color:#9ccc65!important}.light-green-400-border-right{border-right-color:#9ccc65!important}.light-green-400-border-bottom{border-bottom-color:#9ccc65!important}.light-green-400-border-left{border-left-color:#9ccc65!important}.light-green-500-bg{background-color:#8bc34a!important}.md-light-green-500-bg{background-color:#8bc34a!important;color:rgba(0,0,0,.87)}.light-green-500-fg{color:#8bc34a!important}.light-green-500-border{border-color:#8bc34a!important}.light-green-500-border-top{border-top-color:#8bc34a!important}.light-green-500-border-right{border-right-color:#8bc34a!important}.light-green-500-border-bottom{border-bottom-color:#8bc34a!important}.light-green-500-border-left{border-left-color:#8bc34a!important}.md-light-green-bg{background-color:#8bc34a!important;color:rgba(0,0,0,.87)}.light-green-bg{background-color:#8bc34a!important}.light-green-fg{color:#8bc34a!important}.light-green-border{border-color:#8bc34a!important}.light-green-border-top{border-top-color:#8bc34a!important}.light-green-border-right{border-right-color:#8bc34a!important}.light-green-border-bottom{border-bottom-color:#8bc34a!important}.light-green-border-left{border-left-color:#8bc34a!important}.light-green-600-bg{background-color:#7cb342!important}.md-light-green-600-bg{background-color:#7cb342!important;color:rgba(0,0,0,.87)}.light-green-600-fg{color:#7cb342!important}.light-green-600-border{border-color:#7cb342!important}.light-green-600-border-top{border-top-color:#7cb342!important}.light-green-600-border-right{border-right-color:#7cb342!important}.light-green-600-border-bottom{border-bottom-color:#7cb342!important}.light-green-600-border-left{border-left-color:#7cb342!important}.light-green-700-bg{background-color:#689f38!important}.md-light-green-700-bg{background-color:#689f38!important;color:#fff}.light-green-700-fg{color:#689f38!important}.light-green-700-border{border-color:#689f38!important}.light-green-700-border-top{border-top-color:#689f38!important}.light-green-700-border-right{border-right-color:#689f38!important}.light-green-700-border-bottom{border-bottom-color:#689f38!important}.light-green-700-border-left{border-left-color:#689f38!important}.light-green-800-bg{background-color:#558b2f!important}.md-light-green-800-bg{background-color:#558b2f!important;color:#fff}.light-green-800-fg{color:#558b2f!important}.light-green-800-border{border-color:#558b2f!important}.light-green-800-border-top{border-top-color:#558b2f!important}.light-green-800-border-right{border-right-color:#558b2f!important}.light-green-800-border-bottom{border-bottom-color:#558b2f!important}.light-green-800-border-left{border-left-color:#558b2f!important}.light-green-900-bg{background-color:#33691e!important}.md-light-green-900-bg{background-color:#33691e!important;color:#fff}.light-green-900-fg{color:#33691e!important}.light-green-900-border{border-color:#33691e!important}.light-green-900-border-top{border-top-color:#33691e!important}.light-green-900-border-right{border-right-color:#33691e!important}.light-green-900-border-bottom{border-bottom-color:#33691e!important}.light-green-900-border-left{border-left-color:#33691e!important}.light-green-A100-bg{background-color:#ccff90!important}.md-light-green-A100-bg{background-color:#ccff90!important;color:rgba(0,0,0,.87)}.light-green-A100-fg{color:#ccff90!important}.light-green-A100-border{border-color:#ccff90!important}.light-green-A100-border-top{border-top-color:#ccff90!important}.light-green-A100-border-right{border-right-color:#ccff90!important}.light-green-A100-border-bottom{border-bottom-color:#ccff90!important}.light-green-A100-border-left{border-left-color:#ccff90!important}.light-green-A200-bg{background-color:#b2ff59!important}.md-light-green-A200-bg{background-color:#b2ff59!important;color:rgba(0,0,0,.87)}.light-green-A200-fg{color:#b2ff59!important}.light-green-A200-border{border-color:#b2ff59!important}.light-green-A200-border-top{border-top-color:#b2ff59!important}.light-green-A200-border-right{border-right-color:#b2ff59!important}.light-green-A200-border-bottom{border-bottom-color:#b2ff59!important}.light-green-A200-border-left{border-left-color:#b2ff59!important}.light-green-A400-bg{background-color:#76ff03!important}.md-light-green-A400-bg{background-color:#76ff03!important;color:rgba(0,0,0,.87)}.light-green-A400-fg{color:#76ff03!important}.light-green-A400-border{border-color:#76ff03!important}.light-green-A400-border-top{border-top-color:#76ff03!important}.light-green-A400-border-right{border-right-color:#76ff03!important}.light-green-A400-border-bottom{border-bottom-color:#76ff03!important}.light-green-A400-border-left{border-left-color:#76ff03!important}.light-green-A700-bg{background-color:#64dd17!important}.md-light-green-A700-bg{background-color:#64dd17!important;color:rgba(0,0,0,.87)}.light-green-A700-fg{color:#64dd17!important}.light-green-A700-border{border-color:#64dd17!important}.light-green-A700-border-top{border-top-color:#64dd17!important}.light-green-A700-border-right{border-right-color:#64dd17!important}.light-green-A700-border-bottom{border-bottom-color:#64dd17!important}.light-green-A700-border-left{border-left-color:#64dd17!important}.lime-50-bg{background-color:#f9fbe7!important}.md-lime-50-bg{background-color:#f9fbe7!important;color:rgba(0,0,0,.87)}.lime-50-fg{color:#f9fbe7!important}.lime-50-border{border-color:#f9fbe7!important}.lime-50-border-top{border-top-color:#f9fbe7!important}.lime-50-border-right{border-right-color:#f9fbe7!important}.lime-50-border-bottom{border-bottom-color:#f9fbe7!important}.lime-50-border-left{border-left-color:#f9fbe7!important}.lime-100-bg{background-color:#f0f4c3!important}.md-lime-100-bg{background-color:#f0f4c3!important;color:rgba(0,0,0,.87)}.lime-100-fg{color:#f0f4c3!important}.lime-100-border{border-color:#f0f4c3!important}.lime-100-border-top{border-top-color:#f0f4c3!important}.lime-100-border-right{border-right-color:#f0f4c3!important}.lime-100-border-bottom{border-bottom-color:#f0f4c3!important}.lime-100-border-left{border-left-color:#f0f4c3!important}.lime-200-bg{background-color:#e6ee9c!important}.md-lime-200-bg{background-color:#e6ee9c!important;color:rgba(0,0,0,.87)}.lime-200-fg{color:#e6ee9c!important}.lime-200-border{border-color:#e6ee9c!important}.lime-200-border-top{border-top-color:#e6ee9c!important}.lime-200-border-right{border-right-color:#e6ee9c!important}.lime-200-border-bottom{border-bottom-color:#e6ee9c!important}.lime-200-border-left{border-left-color:#e6ee9c!important}.lime-300-bg{background-color:#dce775!important}.md-lime-300-bg{background-color:#dce775!important;color:rgba(0,0,0,.87)}.lime-300-fg{color:#dce775!important}.lime-300-border{border-color:#dce775!important}.lime-300-border-top{border-top-color:#dce775!important}.lime-300-border-right{border-right-color:#dce775!important}.lime-300-border-bottom{border-bottom-color:#dce775!important}.lime-300-border-left{border-left-color:#dce775!important}.lime-400-bg{background-color:#d4e157!important}.md-lime-400-bg{background-color:#d4e157!important;color:rgba(0,0,0,.87)}.lime-400-fg{color:#d4e157!important}.lime-400-border{border-color:#d4e157!important}.lime-400-border-top{border-top-color:#d4e157!important}.lime-400-border-right{border-right-color:#d4e157!important}.lime-400-border-bottom{border-bottom-color:#d4e157!important}.lime-400-border-left{border-left-color:#d4e157!important}.lime-500-bg{background-color:#cddc39!important}.md-lime-500-bg{background-color:#cddc39!important;color:rgba(0,0,0,.87)}.lime-500-fg{color:#cddc39!important}.lime-500-border{border-color:#cddc39!important}.lime-500-border-top{border-top-color:#cddc39!important}.lime-500-border-right{border-right-color:#cddc39!important}.lime-500-border-bottom{border-bottom-color:#cddc39!important}.lime-500-border-left{border-left-color:#cddc39!important}.md-lime-bg{background-color:#cddc39!important;color:rgba(0,0,0,.87)}.lime-bg{background-color:#cddc39!important}.lime-fg{color:#cddc39!important}.lime-border{border-color:#cddc39!important}.lime-border-top{border-top-color:#cddc39!important}.lime-border-right{border-right-color:#cddc39!important}.lime-border-bottom{border-bottom-color:#cddc39!important}.lime-border-left{border-left-color:#cddc39!important}.lime-600-bg{background-color:#c0ca33!important}.md-lime-600-bg{background-color:#c0ca33!important;color:rgba(0,0,0,.87)}.lime-600-fg{color:#c0ca33!important}.lime-600-border{border-color:#c0ca33!important}.lime-600-border-top{border-top-color:#c0ca33!important}.lime-600-border-right{border-right-color:#c0ca33!important}.lime-600-border-bottom{border-bottom-color:#c0ca33!important}.lime-600-border-left{border-left-color:#c0ca33!important}.lime-700-bg{background-color:#afb42b!important}.md-lime-700-bg{background-color:#afb42b!important;color:rgba(0,0,0,.87)}.lime-700-fg{color:#afb42b!important}.lime-700-border{border-color:#afb42b!important}.lime-700-border-top{border-top-color:#afb42b!important}.lime-700-border-right{border-right-color:#afb42b!important}.lime-700-border-bottom{border-bottom-color:#afb42b!important}.lime-700-border-left{border-left-color:#afb42b!important}.lime-800-bg{background-color:#9e9d24!important}.md-lime-800-bg{background-color:#9e9d24!important;color:rgba(0,0,0,.87)}.lime-800-fg{color:#9e9d24!important}.lime-800-border{border-color:#9e9d24!important}.lime-800-border-top{border-top-color:#9e9d24!important}.lime-800-border-right{border-right-color:#9e9d24!important}.lime-800-border-bottom{border-bottom-color:#9e9d24!important}.lime-800-border-left{border-left-color:#9e9d24!important}.lime-900-bg{background-color:#827717!important}.md-lime-900-bg{background-color:#827717!important;color:#fff}.lime-900-fg{color:#827717!important}.lime-900-border{border-color:#827717!important}.lime-900-border-top{border-top-color:#827717!important}.lime-900-border-right{border-right-color:#827717!important}.lime-900-border-bottom{border-bottom-color:#827717!important}.lime-900-border-left{border-left-color:#827717!important}.lime-A100-bg{background-color:#f4ff81!important}.md-lime-A100-bg{background-color:#f4ff81!important;color:rgba(0,0,0,.87)}.lime-A100-fg{color:#f4ff81!important}.lime-A100-border{border-color:#f4ff81!important}.lime-A100-border-top{border-top-color:#f4ff81!important}.lime-A100-border-right{border-right-color:#f4ff81!important}.lime-A100-border-bottom{border-bottom-color:#f4ff81!important}.lime-A100-border-left{border-left-color:#f4ff81!important}.lime-A200-bg{background-color:#eeff41!important}.md-lime-A200-bg{background-color:#eeff41!important;color:rgba(0,0,0,.87)}.lime-A200-fg{color:#eeff41!important}.lime-A200-border{border-color:#eeff41!important}.lime-A200-border-top{border-top-color:#eeff41!important}.lime-A200-border-right{border-right-color:#eeff41!important}.lime-A200-border-bottom{border-bottom-color:#eeff41!important}.lime-A200-border-left{border-left-color:#eeff41!important}.lime-A400-bg{background-color:#c6ff00!important}.md-lime-A400-bg{background-color:#c6ff00!important;color:rgba(0,0,0,.87)}.lime-A400-fg{color:#c6ff00!important}.lime-A400-border{border-color:#c6ff00!important}.lime-A400-border-top{border-top-color:#c6ff00!important}.lime-A400-border-right{border-right-color:#c6ff00!important}.lime-A400-border-bottom{border-bottom-color:#c6ff00!important}.lime-A400-border-left{border-left-color:#c6ff00!important}.lime-A700-bg{background-color:#aeea00!important}.md-lime-A700-bg{background-color:#aeea00!important;color:rgba(0,0,0,.87)}.lime-A700-fg{color:#aeea00!important}.lime-A700-border{border-color:#aeea00!important}.lime-A700-border-top{border-top-color:#aeea00!important}.lime-A700-border-right{border-right-color:#aeea00!important}.lime-A700-border-bottom{border-bottom-color:#aeea00!important}.lime-A700-border-left{border-left-color:#aeea00!important}.yellow-50-bg{background-color:#fffde7!important}.md-yellow-50-bg{background-color:#fffde7!important;color:rgba(0,0,0,.87)}.yellow-50-fg{color:#fffde7!important}.yellow-50-border{border-color:#fffde7!important}.yellow-50-border-top{border-top-color:#fffde7!important}.yellow-50-border-right{border-right-color:#fffde7!important}.yellow-50-border-bottom{border-bottom-color:#fffde7!important}.yellow-50-border-left{border-left-color:#fffde7!important}.yellow-100-bg{background-color:#fff9c4!important}.md-yellow-100-bg{background-color:#fff9c4!important;color:rgba(0,0,0,.87)}.yellow-100-fg{color:#fff9c4!important}.yellow-100-border{border-color:#fff9c4!important}.yellow-100-border-top{border-top-color:#fff9c4!important}.yellow-100-border-right{border-right-color:#fff9c4!important}.yellow-100-border-bottom{border-bottom-color:#fff9c4!important}.yellow-100-border-left{border-left-color:#fff9c4!important}.yellow-200-bg{background-color:#fff59d!important}.md-yellow-200-bg{background-color:#fff59d!important;color:rgba(0,0,0,.87)}.yellow-200-fg{color:#fff59d!important}.yellow-200-border{border-color:#fff59d!important}.yellow-200-border-top{border-top-color:#fff59d!important}.yellow-200-border-right{border-right-color:#fff59d!important}.yellow-200-border-bottom{border-bottom-color:#fff59d!important}.yellow-200-border-left{border-left-color:#fff59d!important}.yellow-300-bg{background-color:#fff176!important}.md-yellow-300-bg{background-color:#fff176!important;color:rgba(0,0,0,.87)}.yellow-300-fg{color:#fff176!important}.yellow-300-border{border-color:#fff176!important}.yellow-300-border-top{border-top-color:#fff176!important}.yellow-300-border-right{border-right-color:#fff176!important}.yellow-300-border-bottom{border-bottom-color:#fff176!important}.yellow-300-border-left{border-left-color:#fff176!important}.yellow-400-bg{background-color:#ffee58!important}.md-yellow-400-bg{background-color:#ffee58!important;color:rgba(0,0,0,.87)}.yellow-400-fg{color:#ffee58!important}.yellow-400-border{border-color:#ffee58!important}.yellow-400-border-top{border-top-color:#ffee58!important}.yellow-400-border-right{border-right-color:#ffee58!important}.yellow-400-border-bottom{border-bottom-color:#ffee58!important}.yellow-400-border-left{border-left-color:#ffee58!important}.yellow-500-bg{background-color:#ffeb3b!important}.md-yellow-500-bg{background-color:#ffeb3b!important;color:rgba(0,0,0,.87)}.yellow-500-fg{color:#ffeb3b!important}.yellow-500-border{border-color:#ffeb3b!important}.yellow-500-border-top{border-top-color:#ffeb3b!important}.yellow-500-border-right{border-right-color:#ffeb3b!important}.yellow-500-border-bottom{border-bottom-color:#ffeb3b!important}.yellow-500-border-left{border-left-color:#ffeb3b!important}.md-yellow-bg{background-color:#ffeb3b!important;color:rgba(0,0,0,.87)}.yellow-bg{background-color:#ffeb3b!important}.yellow-fg{color:#ffeb3b!important}.yellow-border{border-color:#ffeb3b!important}.yellow-border-top{border-top-color:#ffeb3b!important}.yellow-border-right{border-right-color:#ffeb3b!important}.yellow-border-bottom{border-bottom-color:#ffeb3b!important}.yellow-border-left{border-left-color:#ffeb3b!important}.yellow-600-bg{background-color:#fdd835!important}.md-yellow-600-bg{background-color:#fdd835!important;color:rgba(0,0,0,.87)}.yellow-600-fg{color:#fdd835!important}.yellow-600-border{border-color:#fdd835!important}.yellow-600-border-top{border-top-color:#fdd835!important}.yellow-600-border-right{border-right-color:#fdd835!important}.yellow-600-border-bottom{border-bottom-color:#fdd835!important}.yellow-600-border-left{border-left-color:#fdd835!important}.yellow-700-bg{background-color:#fbc02d!important}.md-yellow-700-bg{background-color:#fbc02d!important;color:rgba(0,0,0,.87)}.yellow-700-fg{color:#fbc02d!important}.yellow-700-border{border-color:#fbc02d!important}.yellow-700-border-top{border-top-color:#fbc02d!important}.yellow-700-border-right{border-right-color:#fbc02d!important}.yellow-700-border-bottom{border-bottom-color:#fbc02d!important}.yellow-700-border-left{border-left-color:#fbc02d!important}.yellow-800-bg{background-color:#f9a825!important}.md-yellow-800-bg{background-color:#f9a825!important;color:rgba(0,0,0,.87)}.yellow-800-fg{color:#f9a825!important}.yellow-800-border{border-color:#f9a825!important}.yellow-800-border-top{border-top-color:#f9a825!important}.yellow-800-border-right{border-right-color:#f9a825!important}.yellow-800-border-bottom{border-bottom-color:#f9a825!important}.yellow-800-border-left{border-left-color:#f9a825!important}.yellow-900-bg{background-color:#f57f17!important}.md-yellow-900-bg{background-color:#f57f17!important;color:rgba(0,0,0,.87)}.yellow-900-fg{color:#f57f17!important}.yellow-900-border{border-color:#f57f17!important}.yellow-900-border-top{border-top-color:#f57f17!important}.yellow-900-border-right{border-right-color:#f57f17!important}.yellow-900-border-bottom{border-bottom-color:#f57f17!important}.yellow-900-border-left{border-left-color:#f57f17!important}.yellow-A100-bg{background-color:#ffff8d!important}.md-yellow-A100-bg{background-color:#ffff8d!important;color:rgba(0,0,0,.87)}.yellow-A100-fg{color:#ffff8d!important}.yellow-A100-border{border-color:#ffff8d!important}.yellow-A100-border-top{border-top-color:#ffff8d!important}.yellow-A100-border-right{border-right-color:#ffff8d!important}.yellow-A100-border-bottom{border-bottom-color:#ffff8d!important}.yellow-A100-border-left{border-left-color:#ffff8d!important}.yellow-A200-bg{background-color:#ff0!important}.md-yellow-A200-bg{background-color:#ff0!important;color:rgba(0,0,0,.87)}.yellow-A200-fg{color:#ff0!important}.yellow-A200-border{border-color:#ff0!important}.yellow-A200-border-top{border-top-color:#ff0!important}.yellow-A200-border-right{border-right-color:#ff0!important}.yellow-A200-border-bottom{border-bottom-color:#ff0!important}.yellow-A200-border-left{border-left-color:#ff0!important}.yellow-A400-bg{background-color:#ffea00!important}.md-yellow-A400-bg{background-color:#ffea00!important;color:rgba(0,0,0,.87)}.yellow-A400-fg{color:#ffea00!important}.yellow-A400-border{border-color:#ffea00!important}.yellow-A400-border-top{border-top-color:#ffea00!important}.yellow-A400-border-right{border-right-color:#ffea00!important}.yellow-A400-border-bottom{border-bottom-color:#ffea00!important}.yellow-A400-border-left{border-left-color:#ffea00!important}.yellow-A700-bg{background-color:#ffd600!important}.md-yellow-A700-bg{background-color:#ffd600!important;color:rgba(0,0,0,.87)}.yellow-A700-fg{color:#ffd600!important}.yellow-A700-border{border-color:#ffd600!important}.yellow-A700-border-top{border-top-color:#ffd600!important}.yellow-A700-border-right{border-right-color:#ffd600!important}.yellow-A700-border-bottom{border-bottom-color:#ffd600!important}.yellow-A700-border-left{border-left-color:#ffd600!important}.amber-50-bg{background-color:#fff8e1!important}.md-amber-50-bg{background-color:#fff8e1!important;color:rgba(0,0,0,.87)}.amber-50-fg{color:#fff8e1!important}.amber-50-border{border-color:#fff8e1!important}.amber-50-border-top{border-top-color:#fff8e1!important}.amber-50-border-right{border-right-color:#fff8e1!important}.amber-50-border-bottom{border-bottom-color:#fff8e1!important}.amber-50-border-left{border-left-color:#fff8e1!important}.amber-100-bg{background-color:#ffecb3!important}.md-amber-100-bg{background-color:#ffecb3!important;color:rgba(0,0,0,.87)}.amber-100-fg{color:#ffecb3!important}.amber-100-border{border-color:#ffecb3!important}.amber-100-border-top{border-top-color:#ffecb3!important}.amber-100-border-right{border-right-color:#ffecb3!important}.amber-100-border-bottom{border-bottom-color:#ffecb3!important}.amber-100-border-left{border-left-color:#ffecb3!important}.amber-200-bg{background-color:#ffe082!important}.md-amber-200-bg{background-color:#ffe082!important;color:rgba(0,0,0,.87)}.amber-200-fg{color:#ffe082!important}.amber-200-border{border-color:#ffe082!important}.amber-200-border-top{border-top-color:#ffe082!important}.amber-200-border-right{border-right-color:#ffe082!important}.amber-200-border-bottom{border-bottom-color:#ffe082!important}.amber-200-border-left{border-left-color:#ffe082!important}.amber-300-bg{background-color:#ffd54f!important}.md-amber-300-bg{background-color:#ffd54f!important;color:rgba(0,0,0,.87)}.amber-300-fg{color:#ffd54f!important}.amber-300-border{border-color:#ffd54f!important}.amber-300-border-top{border-top-color:#ffd54f!important}.amber-300-border-right{border-right-color:#ffd54f!important}.amber-300-border-bottom{border-bottom-color:#ffd54f!important}.amber-300-border-left{border-left-color:#ffd54f!important}.amber-400-bg{background-color:#ffca28!important}.md-amber-400-bg{background-color:#ffca28!important;color:rgba(0,0,0,.87)}.amber-400-fg{color:#ffca28!important}.amber-400-border{border-color:#ffca28!important}.amber-400-border-top{border-top-color:#ffca28!important}.amber-400-border-right{border-right-color:#ffca28!important}.amber-400-border-bottom{border-bottom-color:#ffca28!important}.amber-400-border-left{border-left-color:#ffca28!important}.amber-500-bg{background-color:#ffc107!important}.md-amber-500-bg{background-color:#ffc107!important;color:rgba(0,0,0,.87)}.amber-500-fg{color:#ffc107!important}.amber-500-border{border-color:#ffc107!important}.amber-500-border-top{border-top-color:#ffc107!important}.amber-500-border-right{border-right-color:#ffc107!important}.amber-500-border-bottom{border-bottom-color:#ffc107!important}.amber-500-border-left{border-left-color:#ffc107!important}.md-amber-bg{background-color:#ffc107!important;color:rgba(0,0,0,.87)}.amber-bg{background-color:#ffc107!important}.amber-fg{color:#ffc107!important}.amber-border{border-color:#ffc107!important}.amber-border-top{border-top-color:#ffc107!important}.amber-border-right{border-right-color:#ffc107!important}.amber-border-bottom{border-bottom-color:#ffc107!important}.amber-border-left{border-left-color:#ffc107!important}.amber-600-bg{background-color:#ffb300!important}.md-amber-600-bg{background-color:#ffb300!important;color:rgba(0,0,0,.87)}.amber-600-fg{color:#ffb300!important}.amber-600-border{border-color:#ffb300!important}.amber-600-border-top{border-top-color:#ffb300!important}.amber-600-border-right{border-right-color:#ffb300!important}.amber-600-border-bottom{border-bottom-color:#ffb300!important}.amber-600-border-left{border-left-color:#ffb300!important}.amber-700-bg{background-color:#ffa000!important}.md-amber-700-bg{background-color:#ffa000!important;color:rgba(0,0,0,.87)}.amber-700-fg{color:#ffa000!important}.amber-700-border{border-color:#ffa000!important}.amber-700-border-top{border-top-color:#ffa000!important}.amber-700-border-right{border-right-color:#ffa000!important}.amber-700-border-bottom{border-bottom-color:#ffa000!important}.amber-700-border-left{border-left-color:#ffa000!important}.amber-800-bg{background-color:#ff8f00!important}.md-amber-800-bg{background-color:#ff8f00!important;color:rgba(0,0,0,.87)}.amber-800-fg{color:#ff8f00!important}.amber-800-border{border-color:#ff8f00!important}.amber-800-border-top{border-top-color:#ff8f00!important}.amber-800-border-right{border-right-color:#ff8f00!important}.amber-800-border-bottom{border-bottom-color:#ff8f00!important}.amber-800-border-left{border-left-color:#ff8f00!important}.amber-900-bg{background-color:#ff6f00!important}.md-amber-900-bg{background-color:#ff6f00!important;color:rgba(0,0,0,.87)}.amber-900-fg{color:#ff6f00!important}.amber-900-border{border-color:#ff6f00!important}.amber-900-border-top{border-top-color:#ff6f00!important}.amber-900-border-right{border-right-color:#ff6f00!important}.amber-900-border-bottom{border-bottom-color:#ff6f00!important}.amber-900-border-left{border-left-color:#ff6f00!important}.amber-A100-bg{background-color:#ffe57f!important}.md-amber-A100-bg{background-color:#ffe57f!important;color:rgba(0,0,0,.87)}.amber-A100-fg{color:#ffe57f!important}.amber-A100-border{border-color:#ffe57f!important}.amber-A100-border-top{border-top-color:#ffe57f!important}.amber-A100-border-right{border-right-color:#ffe57f!important}.amber-A100-border-bottom{border-bottom-color:#ffe57f!important}.amber-A100-border-left{border-left-color:#ffe57f!important}.amber-A200-bg{background-color:#ffd740!important}.md-amber-A200-bg{background-color:#ffd740!important;color:rgba(0,0,0,.87)}.amber-A200-fg{color:#ffd740!important}.amber-A200-border{border-color:#ffd740!important}.amber-A200-border-top{border-top-color:#ffd740!important}.amber-A200-border-right{border-right-color:#ffd740!important}.amber-A200-border-bottom{border-bottom-color:#ffd740!important}.amber-A200-border-left{border-left-color:#ffd740!important}.amber-A400-bg{background-color:#ffc400!important}.md-amber-A400-bg{background-color:#ffc400!important;color:rgba(0,0,0,.87)}.amber-A400-fg{color:#ffc400!important}.amber-A400-border{border-color:#ffc400!important}.amber-A400-border-top{border-top-color:#ffc400!important}.amber-A400-border-right{border-right-color:#ffc400!important}.amber-A400-border-bottom{border-bottom-color:#ffc400!important}.amber-A400-border-left{border-left-color:#ffc400!important}.amber-A700-bg{background-color:#ffab00!important}.md-amber-A700-bg{background-color:#ffab00!important;color:rgba(0,0,0,.87)}.amber-A700-fg{color:#ffab00!important}.amber-A700-border{border-color:#ffab00!important}.amber-A700-border-top{border-top-color:#ffab00!important}.amber-A700-border-right{border-right-color:#ffab00!important}.amber-A700-border-bottom{border-bottom-color:#ffab00!important}.amber-A700-border-left{border-left-color:#ffab00!important}.orange-50-bg{background-color:#fff3e0!important}.md-orange-50-bg{background-color:#fff3e0!important;color:rgba(0,0,0,.87)}.orange-50-fg{color:#fff3e0!important}.orange-50-border{border-color:#fff3e0!important}.orange-50-border-top{border-top-color:#fff3e0!important}.orange-50-border-right{border-right-color:#fff3e0!important}.orange-50-border-bottom{border-bottom-color:#fff3e0!important}.orange-50-border-left{border-left-color:#fff3e0!important}.orange-100-bg{background-color:#ffe0b2!important}.md-orange-100-bg{background-color:#ffe0b2!important;color:rgba(0,0,0,.87)}.orange-100-fg{color:#ffe0b2!important}.orange-100-border{border-color:#ffe0b2!important}.orange-100-border-top{border-top-color:#ffe0b2!important}.orange-100-border-right{border-right-color:#ffe0b2!important}.orange-100-border-bottom{border-bottom-color:#ffe0b2!important}.orange-100-border-left{border-left-color:#ffe0b2!important}.orange-200-bg{background-color:#ffcc80!important}.md-orange-200-bg{background-color:#ffcc80!important;color:rgba(0,0,0,.87)}.orange-200-fg{color:#ffcc80!important}.orange-200-border{border-color:#ffcc80!important}.orange-200-border-top{border-top-color:#ffcc80!important}.orange-200-border-right{border-right-color:#ffcc80!important}.orange-200-border-bottom{border-bottom-color:#ffcc80!important}.orange-200-border-left{border-left-color:#ffcc80!important}.orange-300-bg{background-color:#ffb74d!important}.md-orange-300-bg{background-color:#ffb74d!important;color:rgba(0,0,0,.87)}.orange-300-fg{color:#ffb74d!important}.orange-300-border{border-color:#ffb74d!important}.orange-300-border-top{border-top-color:#ffb74d!important}.orange-300-border-right{border-right-color:#ffb74d!important}.orange-300-border-bottom{border-bottom-color:#ffb74d!important}.orange-300-border-left{border-left-color:#ffb74d!important}.orange-400-bg{background-color:#ffa726!important}.md-orange-400-bg{background-color:#ffa726!important;color:rgba(0,0,0,.87)}.orange-400-fg{color:#ffa726!important}.orange-400-border{border-color:#ffa726!important}.orange-400-border-top{border-top-color:#ffa726!important}.orange-400-border-right{border-right-color:#ffa726!important}.orange-400-border-bottom{border-bottom-color:#ffa726!important}.orange-400-border-left{border-left-color:#ffa726!important}.orange-500-bg{background-color:#ff9800!important}.md-orange-500-bg{background-color:#ff9800!important;color:rgba(0,0,0,.87)}.orange-500-fg{color:#ff9800!important}.orange-500-border{border-color:#ff9800!important}.orange-500-border-top{border-top-color:#ff9800!important}.orange-500-border-right{border-right-color:#ff9800!important}.orange-500-border-bottom{border-bottom-color:#ff9800!important}.orange-500-border-left{border-left-color:#ff9800!important}.md-orange-bg{background-color:#ff9800!important;color:rgba(0,0,0,.87)}.orange-bg{background-color:#ff9800!important}.orange-fg{color:#ff9800!important}.orange-border{border-color:#ff9800!important}.orange-border-top{border-top-color:#ff9800!important}.orange-border-right{border-right-color:#ff9800!important}.orange-border-bottom{border-bottom-color:#ff9800!important}.orange-border-left{border-left-color:#ff9800!important}.orange-600-bg{background-color:#fb8c00!important}.md-orange-600-bg{background-color:#fb8c00!important;color:rgba(0,0,0,.87)}.orange-600-fg{color:#fb8c00!important}.orange-600-border{border-color:#fb8c00!important}.orange-600-border-top{border-top-color:#fb8c00!important}.orange-600-border-right{border-right-color:#fb8c00!important}.orange-600-border-bottom{border-bottom-color:#fb8c00!important}.orange-600-border-left{border-left-color:#fb8c00!important}.orange-700-bg{background-color:#f57c00!important}.md-orange-700-bg{background-color:#f57c00!important;color:rgba(0,0,0,.87)}.orange-700-fg{color:#f57c00!important}.orange-700-border{border-color:#f57c00!important}.orange-700-border-top{border-top-color:#f57c00!important}.orange-700-border-right{border-right-color:#f57c00!important}.orange-700-border-bottom{border-bottom-color:#f57c00!important}.orange-700-border-left{border-left-color:#f57c00!important}.orange-800-bg{background-color:#ef6c00!important}.md-orange-800-bg{background-color:#ef6c00!important;color:#fff}.orange-800-fg{color:#ef6c00!important}.orange-800-border{border-color:#ef6c00!important}.orange-800-border-top{border-top-color:#ef6c00!important}.orange-800-border-right{border-right-color:#ef6c00!important}.orange-800-border-bottom{border-bottom-color:#ef6c00!important}.orange-800-border-left{border-left-color:#ef6c00!important}.orange-900-bg{background-color:#e65100!important}.md-orange-900-bg{background-color:#e65100!important;color:#fff}.orange-900-fg{color:#e65100!important}.orange-900-border{border-color:#e65100!important}.orange-900-border-top{border-top-color:#e65100!important}.orange-900-border-right{border-right-color:#e65100!important}.orange-900-border-bottom{border-bottom-color:#e65100!important}.orange-900-border-left{border-left-color:#e65100!important}.orange-A100-bg{background-color:#ffd180!important}.md-orange-A100-bg{background-color:#ffd180!important;color:rgba(0,0,0,.87)}.orange-A100-fg{color:#ffd180!important}.orange-A100-border{border-color:#ffd180!important}.orange-A100-border-top{border-top-color:#ffd180!important}.orange-A100-border-right{border-right-color:#ffd180!important}.orange-A100-border-bottom{border-bottom-color:#ffd180!important}.orange-A100-border-left{border-left-color:#ffd180!important}.orange-A200-bg{background-color:#ffab40!important}.md-orange-A200-bg{background-color:#ffab40!important;color:rgba(0,0,0,.87)}.orange-A200-fg{color:#ffab40!important}.orange-A200-border{border-color:#ffab40!important}.orange-A200-border-top{border-top-color:#ffab40!important}.orange-A200-border-right{border-right-color:#ffab40!important}.orange-A200-border-bottom{border-bottom-color:#ffab40!important}.orange-A200-border-left{border-left-color:#ffab40!important}.orange-A400-bg{background-color:#ff9100!important}.md-orange-A400-bg{background-color:#ff9100!important;color:rgba(0,0,0,.87)}.orange-A400-fg{color:#ff9100!important}.orange-A400-border{border-color:#ff9100!important}.orange-A400-border-top{border-top-color:#ff9100!important}.orange-A400-border-right{border-right-color:#ff9100!important}.orange-A400-border-bottom{border-bottom-color:#ff9100!important}.orange-A400-border-left{border-left-color:#ff9100!important}.orange-A700-bg{background-color:#ff6d00!important}.md-orange-A700-bg{background-color:#ff6d00!important;color:rgba(0,0,0,.87)}.orange-A700-fg{color:#ff6d00!important}.orange-A700-border{border-color:#ff6d00!important}.orange-A700-border-top{border-top-color:#ff6d00!important}.orange-A700-border-right{border-right-color:#ff6d00!important}.orange-A700-border-bottom{border-bottom-color:#ff6d00!important}.orange-A700-border-left{border-left-color:#ff6d00!important}.deep-orange-50-bg{background-color:#fbe9e7!important}.md-deep-orange-50-bg{background-color:#fbe9e7!important;color:rgba(0,0,0,.87)}.deep-orange-50-fg{color:#fbe9e7!important}.deep-orange-50-border{border-color:#fbe9e7!important}.deep-orange-50-border-top{border-top-color:#fbe9e7!important}.deep-orange-50-border-right{border-right-color:#fbe9e7!important}.deep-orange-50-border-bottom{border-bottom-color:#fbe9e7!important}.deep-orange-50-border-left{border-left-color:#fbe9e7!important}.deep-orange-100-bg{background-color:#ffccbc!important}.md-deep-orange-100-bg{background-color:#ffccbc!important;color:rgba(0,0,0,.87)}.deep-orange-100-fg{color:#ffccbc!important}.deep-orange-100-border{border-color:#ffccbc!important}.deep-orange-100-border-top{border-top-color:#ffccbc!important}.deep-orange-100-border-right{border-right-color:#ffccbc!important}.deep-orange-100-border-bottom{border-bottom-color:#ffccbc!important}.deep-orange-100-border-left{border-left-color:#ffccbc!important}.deep-orange-200-bg{background-color:#ffab91!important}.md-deep-orange-200-bg{background-color:#ffab91!important;color:rgba(0,0,0,.87)}.deep-orange-200-fg{color:#ffab91!important}.deep-orange-200-border{border-color:#ffab91!important}.deep-orange-200-border-top{border-top-color:#ffab91!important}.deep-orange-200-border-right{border-right-color:#ffab91!important}.deep-orange-200-border-bottom{border-bottom-color:#ffab91!important}.deep-orange-200-border-left{border-left-color:#ffab91!important}.deep-orange-300-bg{background-color:#ff8a65!important}.md-deep-orange-300-bg{background-color:#ff8a65!important;color:rgba(0,0,0,.87)}.deep-orange-300-fg{color:#ff8a65!important}.deep-orange-300-border{border-color:#ff8a65!important}.deep-orange-300-border-top{border-top-color:#ff8a65!important}.deep-orange-300-border-right{border-right-color:#ff8a65!important}.deep-orange-300-border-bottom{border-bottom-color:#ff8a65!important}.deep-orange-300-border-left{border-left-color:#ff8a65!important}.deep-orange-400-bg{background-color:#ff7043!important}.md-deep-orange-400-bg{background-color:#ff7043!important;color:rgba(0,0,0,.87)}.deep-orange-400-fg{color:#ff7043!important}.deep-orange-400-border{border-color:#ff7043!important}.deep-orange-400-border-top{border-top-color:#ff7043!important}.deep-orange-400-border-right{border-right-color:#ff7043!important}.deep-orange-400-border-bottom{border-bottom-color:#ff7043!important}.deep-orange-400-border-left{border-left-color:#ff7043!important}.deep-orange-500-bg{background-color:#ff5722!important}.md-deep-orange-500-bg{background-color:#ff5722!important;color:#fff}.deep-orange-500-fg{color:#ff5722!important}.deep-orange-500-border{border-color:#ff5722!important}.deep-orange-500-border-top{border-top-color:#ff5722!important}.deep-orange-500-border-right{border-right-color:#ff5722!important}.deep-orange-500-border-bottom{border-bottom-color:#ff5722!important}.deep-orange-500-border-left{border-left-color:#ff5722!important}.md-deep-orange-bg{background-color:#ff5722!important;color:#fff}.deep-orange-bg{background-color:#ff5722!important}.deep-orange-fg{color:#ff5722!important}.deep-orange-border{border-color:#ff5722!important}.deep-orange-border-top{border-top-color:#ff5722!important}.deep-orange-border-right{border-right-color:#ff5722!important}.deep-orange-border-bottom{border-bottom-color:#ff5722!important}.deep-orange-border-left{border-left-color:#ff5722!important}.deep-orange-600-bg{background-color:#f4511e!important}.md-deep-orange-600-bg{background-color:#f4511e!important;color:#fff}.deep-orange-600-fg{color:#f4511e!important}.deep-orange-600-border{border-color:#f4511e!important}.deep-orange-600-border-top{border-top-color:#f4511e!important}.deep-orange-600-border-right{border-right-color:#f4511e!important}.deep-orange-600-border-bottom{border-bottom-color:#f4511e!important}.deep-orange-600-border-left{border-left-color:#f4511e!important}.deep-orange-700-bg{background-color:#e64a19!important}.md-deep-orange-700-bg{background-color:#e64a19!important;color:#fff}.deep-orange-700-fg{color:#e64a19!important}.deep-orange-700-border{border-color:#e64a19!important}.deep-orange-700-border-top{border-top-color:#e64a19!important}.deep-orange-700-border-right{border-right-color:#e64a19!important}.deep-orange-700-border-bottom{border-bottom-color:#e64a19!important}.deep-orange-700-border-left{border-left-color:#e64a19!important}.deep-orange-800-bg{background-color:#d84315!important}.md-deep-orange-800-bg{background-color:#d84315!important;color:#fff}.deep-orange-800-fg{color:#d84315!important}.deep-orange-800-border{border-color:#d84315!important}.deep-orange-800-border-top{border-top-color:#d84315!important}.deep-orange-800-border-right{border-right-color:#d84315!important}.deep-orange-800-border-bottom{border-bottom-color:#d84315!important}.deep-orange-800-border-left{border-left-color:#d84315!important}.deep-orange-900-bg{background-color:#bf360c!important}.md-deep-orange-900-bg{background-color:#bf360c!important;color:#fff}.deep-orange-900-fg{color:#bf360c!important}.deep-orange-900-border{border-color:#bf360c!important}.deep-orange-900-border-top{border-top-color:#bf360c!important}.deep-orange-900-border-right{border-right-color:#bf360c!important}.deep-orange-900-border-bottom{border-bottom-color:#bf360c!important}.deep-orange-900-border-left{border-left-color:#bf360c!important}.deep-orange-A100-bg{background-color:#ff9e80!important}.md-deep-orange-A100-bg{background-color:#ff9e80!important;color:rgba(0,0,0,.87)}.deep-orange-A100-fg{color:#ff9e80!important}.deep-orange-A100-border{border-color:#ff9e80!important}.deep-orange-A100-border-top{border-top-color:#ff9e80!important}.deep-orange-A100-border-right{border-right-color:#ff9e80!important}.deep-orange-A100-border-bottom{border-bottom-color:#ff9e80!important}.deep-orange-A100-border-left{border-left-color:#ff9e80!important}.deep-orange-A200-bg{background-color:#ff6e40!important}.md-deep-orange-A200-bg{background-color:#ff6e40!important;color:rgba(0,0,0,.87)}.deep-orange-A200-fg{color:#ff6e40!important}.deep-orange-A200-border{border-color:#ff6e40!important}.deep-orange-A200-border-top{border-top-color:#ff6e40!important}.deep-orange-A200-border-right{border-right-color:#ff6e40!important}.deep-orange-A200-border-bottom{border-bottom-color:#ff6e40!important}.deep-orange-A200-border-left{border-left-color:#ff6e40!important}.deep-orange-A400-bg{background-color:#ff3d00!important}.md-deep-orange-A400-bg{background-color:#ff3d00!important;color:#fff}.deep-orange-A400-fg{color:#ff3d00!important}.deep-orange-A400-border{border-color:#ff3d00!important}.deep-orange-A400-border-top{border-top-color:#ff3d00!important}.deep-orange-A400-border-right{border-right-color:#ff3d00!important}.deep-orange-A400-border-bottom{border-bottom-color:#ff3d00!important}.deep-orange-A400-border-left{border-left-color:#ff3d00!important}.deep-orange-A700-bg{background-color:#dd2c00!important}.md-deep-orange-A700-bg{background-color:#dd2c00!important;color:#fff}.deep-orange-A700-fg{color:#dd2c00!important}.deep-orange-A700-border{border-color:#dd2c00!important}.deep-orange-A700-border-top{border-top-color:#dd2c00!important}.deep-orange-A700-border-right{border-right-color:#dd2c00!important}.deep-orange-A700-border-bottom{border-bottom-color:#dd2c00!important}.deep-orange-A700-border-left{border-left-color:#dd2c00!important}.brown-50-bg{background-color:#efebe9!important}.md-brown-50-bg{background-color:#efebe9!important;color:rgba(0,0,0,.87)}.brown-50-fg{color:#efebe9!important}.brown-50-border{border-color:#efebe9!important}.brown-50-border-top{border-top-color:#efebe9!important}.brown-50-border-right{border-right-color:#efebe9!important}.brown-50-border-bottom{border-bottom-color:#efebe9!important}.brown-50-border-left{border-left-color:#efebe9!important}.brown-100-bg{background-color:#d7ccc8!important}.md-brown-100-bg{background-color:#d7ccc8!important;color:rgba(0,0,0,.87)}.brown-100-fg{color:#d7ccc8!important}.brown-100-border{border-color:#d7ccc8!important}.brown-100-border-top{border-top-color:#d7ccc8!important}.brown-100-border-right{border-right-color:#d7ccc8!important}.brown-100-border-bottom{border-bottom-color:#d7ccc8!important}.brown-100-border-left{border-left-color:#d7ccc8!important}.brown-200-bg{background-color:#bcaaa4!important}.md-brown-200-bg{background-color:#bcaaa4!important;color:rgba(0,0,0,.87)}.brown-200-fg{color:#bcaaa4!important}.brown-200-border{border-color:#bcaaa4!important}.brown-200-border-top{border-top-color:#bcaaa4!important}.brown-200-border-right{border-right-color:#bcaaa4!important}.brown-200-border-bottom{border-bottom-color:#bcaaa4!important}.brown-200-border-left{border-left-color:#bcaaa4!important}.brown-300-bg{background-color:#a1887f!important}.md-brown-300-bg{background-color:#a1887f!important;color:#fff}.brown-300-fg{color:#a1887f!important}.brown-300-border{border-color:#a1887f!important}.brown-300-border-top{border-top-color:#a1887f!important}.brown-300-border-right{border-right-color:#a1887f!important}.brown-300-border-bottom{border-bottom-color:#a1887f!important}.brown-300-border-left{border-left-color:#a1887f!important}.brown-400-bg{background-color:#8d6e63!important}.md-brown-400-bg{background-color:#8d6e63!important;color:#fff}.brown-400-fg{color:#8d6e63!important}.brown-400-border{border-color:#8d6e63!important}.brown-400-border-top{border-top-color:#8d6e63!important}.brown-400-border-right{border-right-color:#8d6e63!important}.brown-400-border-bottom{border-bottom-color:#8d6e63!important}.brown-400-border-left{border-left-color:#8d6e63!important}.brown-500-bg{background-color:#795548!important}.md-brown-500-bg{background-color:#795548!important;color:rgba(255,255,255,.87)}.brown-500-fg{color:#795548!important}.brown-500-border{border-color:#795548!important}.brown-500-border-top{border-top-color:#795548!important}.brown-500-border-right{border-right-color:#795548!important}.brown-500-border-bottom{border-bottom-color:#795548!important}.brown-500-border-left{border-left-color:#795548!important}.md-brown-bg{background-color:#795548!important;color:rgba(255,255,255,.87)}.brown-bg{background-color:#795548!important}.brown-fg{color:#795548!important}.brown-border{border-color:#795548!important}.brown-border-top{border-top-color:#795548!important}.brown-border-right{border-right-color:#795548!important}.brown-border-bottom{border-bottom-color:#795548!important}.brown-border-left{border-left-color:#795548!important}.brown-600-bg{background-color:#6d4c41!important}.md-brown-600-bg{background-color:#6d4c41!important;color:rgba(255,255,255,.87)}.brown-600-fg{color:#6d4c41!important}.brown-600-border{border-color:#6d4c41!important}.brown-600-border-top{border-top-color:#6d4c41!important}.brown-600-border-right{border-right-color:#6d4c41!important}.brown-600-border-bottom{border-bottom-color:#6d4c41!important}.brown-600-border-left{border-left-color:#6d4c41!important}.brown-700-bg{background-color:#5d4037!important}.md-brown-700-bg{background-color:#5d4037!important;color:rgba(255,255,255,.87)}.brown-700-fg{color:#5d4037!important}.brown-700-border{border-color:#5d4037!important}.brown-700-border-top{border-top-color:#5d4037!important}.brown-700-border-right{border-right-color:#5d4037!important}.brown-700-border-bottom{border-bottom-color:#5d4037!important}.brown-700-border-left{border-left-color:#5d4037!important}.brown-800-bg{background-color:#4e342e!important}.md-brown-800-bg{background-color:#4e342e!important;color:rgba(255,255,255,.87)}.brown-800-fg{color:#4e342e!important}.brown-800-border{border-color:#4e342e!important}.brown-800-border-top{border-top-color:#4e342e!important}.brown-800-border-right{border-right-color:#4e342e!important}.brown-800-border-bottom{border-bottom-color:#4e342e!important}.brown-800-border-left{border-left-color:#4e342e!important}.brown-900-bg{background-color:#3e2723!important}.md-brown-900-bg{background-color:#3e2723!important;color:rgba(255,255,255,.87)}.brown-900-fg{color:#3e2723!important}.brown-900-border{border-color:#3e2723!important}.brown-900-border-top{border-top-color:#3e2723!important}.brown-900-border-right{border-right-color:#3e2723!important}.brown-900-border-bottom{border-bottom-color:#3e2723!important}.brown-900-border-left{border-left-color:#3e2723!important}.brown-A100-bg{background-color:#d7ccc8!important}.md-brown-A100-bg{background-color:#d7ccc8!important;color:rgba(255,255,255,.87)}.brown-A100-fg{color:#d7ccc8!important}.brown-A100-border{border-color:#d7ccc8!important}.brown-A100-border-top{border-top-color:#d7ccc8!important}.brown-A100-border-right{border-right-color:#d7ccc8!important}.brown-A100-border-bottom{border-bottom-color:#d7ccc8!important}.brown-A100-border-left{border-left-color:#d7ccc8!important}.brown-A200-bg{background-color:#bcaaa4!important}.md-brown-A200-bg{background-color:#bcaaa4!important;color:rgba(255,255,255,.87)}.brown-A200-fg{color:#bcaaa4!important}.brown-A200-border{border-color:#bcaaa4!important}.brown-A200-border-top{border-top-color:#bcaaa4!important}.brown-A200-border-right{border-right-color:#bcaaa4!important}.brown-A200-border-bottom{border-bottom-color:#bcaaa4!important}.brown-A200-border-left{border-left-color:#bcaaa4!important}.brown-A400-bg{background-color:#8d6e63!important}.md-brown-A400-bg{background-color:#8d6e63!important;color:rgba(255,255,255,.87)}.brown-A400-fg{color:#8d6e63!important}.brown-A400-border{border-color:#8d6e63!important}.brown-A400-border-top{border-top-color:#8d6e63!important}.brown-A400-border-right{border-right-color:#8d6e63!important}.brown-A400-border-bottom{border-bottom-color:#8d6e63!important}.brown-A400-border-left{border-left-color:#8d6e63!important}.brown-A700-bg{background-color:#5d4037!important}.md-brown-A700-bg{background-color:#5d4037!important;color:rgba(255,255,255,.87)}.brown-A700-fg{color:#5d4037!important}.brown-A700-border{border-color:#5d4037!important}.brown-A700-border-top{border-top-color:#5d4037!important}.brown-A700-border-right{border-right-color:#5d4037!important}.brown-A700-border-bottom{border-bottom-color:#5d4037!important}.brown-A700-border-left{border-left-color:#5d4037!important}.grey-50-bg{background-color:#fafafa!important}.md-grey-50-bg{background-color:#fafafa!important;color:rgba(0,0,0,.87)}.grey-50-fg{color:#fafafa!important}.grey-50-border{border-color:#fafafa!important}.grey-50-border-top{border-top-color:#fafafa!important}.grey-50-border-right{border-right-color:#fafafa!important}.grey-50-border-bottom{border-bottom-color:#fafafa!important}.grey-50-border-left{border-left-color:#fafafa!important}.grey-100-bg{background-color:#f5f5f5!important}.md-grey-100-bg{background-color:#f5f5f5!important;color:rgba(0,0,0,.87)}.grey-100-fg{color:#f5f5f5!important}.grey-100-border{border-color:#f5f5f5!important}.grey-100-border-top{border-top-color:#f5f5f5!important}.grey-100-border-right{border-right-color:#f5f5f5!important}.grey-100-border-bottom{border-bottom-color:#f5f5f5!important}.grey-100-border-left{border-left-color:#f5f5f5!important}.grey-200-bg{background-color:#eee!important}.md-grey-200-bg{background-color:#eee!important;color:rgba(0,0,0,.87)}.grey-200-fg{color:#eee!important}.grey-200-border{border-color:#eee!important}.grey-200-border-top{border-top-color:#eee!important}.grey-200-border-right{border-right-color:#eee!important}.grey-200-border-bottom{border-bottom-color:#eee!important}.grey-200-border-left{border-left-color:#eee!important}.grey-300-bg{background-color:#e0e0e0!important}.md-grey-300-bg{background-color:#e0e0e0!important;color:rgba(0,0,0,.87)}.grey-300-fg{color:#e0e0e0!important}.grey-300-border{border-color:#e0e0e0!important}.grey-300-border-top{border-top-color:#e0e0e0!important}.grey-300-border-right{border-right-color:#e0e0e0!important}.grey-300-border-bottom{border-bottom-color:#e0e0e0!important}.grey-300-border-left{border-left-color:#e0e0e0!important}.grey-400-bg{background-color:#bdbdbd!important}.md-grey-400-bg{background-color:#bdbdbd!important;color:rgba(0,0,0,.87)}.grey-400-fg{color:#bdbdbd!important}.grey-400-border{border-color:#bdbdbd!important}.grey-400-border-top{border-top-color:#bdbdbd!important}.grey-400-border-right{border-right-color:#bdbdbd!important}.grey-400-border-bottom{border-bottom-color:#bdbdbd!important}.grey-400-border-left{border-left-color:#bdbdbd!important}.grey-500-bg{background-color:#9e9e9e!important}.md-grey-500-bg{background-color:#9e9e9e!important;color:rgba(0,0,0,.87)}.grey-500-fg{color:#9e9e9e!important}.grey-500-border{border-color:#9e9e9e!important}.grey-500-border-top{border-top-color:#9e9e9e!important}.grey-500-border-right{border-right-color:#9e9e9e!important}.grey-500-border-bottom{border-bottom-color:#9e9e9e!important}.grey-500-border-left{border-left-color:#9e9e9e!important}.md-grey-bg{background-color:#9e9e9e!important;color:rgba(0,0,0,.87)}.grey-bg{background-color:#9e9e9e!important}.grey-fg{color:#9e9e9e!important}.grey-border{border-color:#9e9e9e!important}.grey-border-top{border-top-color:#9e9e9e!important}.grey-border-right{border-right-color:#9e9e9e!important}.grey-border-bottom{border-bottom-color:#9e9e9e!important}.grey-border-left{border-left-color:#9e9e9e!important}.grey-600-bg{background-color:#757575!important}.md-grey-600-bg{background-color:#757575!important;color:rgba(255,255,255,.87)}.grey-600-fg{color:#757575!important}.grey-600-border{border-color:#757575!important}.grey-600-border-top{border-top-color:#757575!important}.grey-600-border-right{border-right-color:#757575!important}.grey-600-border-bottom{border-bottom-color:#757575!important}.grey-600-border-left{border-left-color:#757575!important}.grey-700-bg{background-color:#616161!important}.md-grey-700-bg{background-color:#616161!important;color:rgba(255,255,255,.87)}.grey-700-fg{color:#616161!important}.grey-700-border{border-color:#616161!important}.grey-700-border-top{border-top-color:#616161!important}.grey-700-border-right{border-right-color:#616161!important}.grey-700-border-bottom{border-bottom-color:#616161!important}.grey-700-border-left{border-left-color:#616161!important}.grey-800-bg{background-color:#424242!important}.md-grey-800-bg{background-color:#424242!important;color:rgba(255,255,255,.87)}.grey-800-fg{color:#424242!important}.grey-800-border{border-color:#424242!important}.grey-800-border-top{border-top-color:#424242!important}.grey-800-border-right{border-right-color:#424242!important}.grey-800-border-bottom{border-bottom-color:#424242!important}.grey-800-border-left{border-left-color:#424242!important}.grey-900-bg{background-color:#212121!important}.md-grey-900-bg{background-color:#212121!important;color:rgba(255,255,255,.87)}.grey-900-fg{color:#212121!important}.grey-900-border{border-color:#212121!important}.grey-900-border-top{border-top-color:#212121!important}.grey-900-border-right{border-right-color:#212121!important}.grey-900-border-bottom{border-bottom-color:#212121!important}.grey-900-border-left{border-left-color:#212121!important}.grey-1000-bg{background-color:#000!important}.md-grey-1000-bg{background-color:#000!important}.grey-1000-fg{color:#000!important}.grey-1000-border{border-color:#000!important}.grey-1000-border-top{border-top-color:#000!important}.grey-1000-border-right{border-right-color:#000!important}.grey-1000-border-bottom{border-bottom-color:#000!important}.grey-1000-border-left{border-left-color:#000!important}.grey-A100-bg{background-color:#fff!important}.md-grey-A100-bg{background-color:#fff!important;color:rgba(0,0,0,.87)}.grey-A100-fg{color:#fff!important}.grey-A100-border{border-color:#fff!important}.grey-A100-border-top{border-top-color:#fff!important}.grey-A100-border-right{border-right-color:#fff!important}.grey-A100-border-bottom{border-bottom-color:#fff!important}.grey-A100-border-left{border-left-color:#fff!important}.grey-A200-bg{background-color:#eee!important}.md-grey-A200-bg{background-color:#eee!important;color:rgba(0,0,0,.87)}.grey-A200-fg{color:#eee!important}.grey-A200-border{border-color:#eee!important}.grey-A200-border-top{border-top-color:#eee!important}.grey-A200-border-right{border-right-color:#eee!important}.grey-A200-border-bottom{border-bottom-color:#eee!important}.grey-A200-border-left{border-left-color:#eee!important}.grey-A400-bg{background-color:#bdbdbd!important}.md-grey-A400-bg{background-color:#bdbdbd!important;color:rgba(0,0,0,.87)}.grey-A400-fg{color:#bdbdbd!important}.grey-A400-border{border-color:#bdbdbd!important}.grey-A400-border-top{border-top-color:#bdbdbd!important}.grey-A400-border-right{border-right-color:#bdbdbd!important}.grey-A400-border-bottom{border-bottom-color:#bdbdbd!important}.grey-A400-border-left{border-left-color:#bdbdbd!important}.grey-A700-bg{background-color:#616161!important}.md-grey-A700-bg{background-color:#616161!important;color:rgba(0,0,0,.87)}.grey-A700-fg{color:#616161!important}.grey-A700-border{border-color:#616161!important}.grey-A700-border-top{border-top-color:#616161!important}.grey-A700-border-right{border-right-color:#616161!important}.grey-A700-border-bottom{border-bottom-color:#616161!important}.grey-A700-border-left{border-left-color:#616161!important}.blue-grey-50-bg{background-color:#eceff1!important}.md-blue-grey-50-bg{background-color:#eceff1!important;color:rgba(0,0,0,.87)}.blue-grey-50-fg{color:#eceff1!important}.blue-grey-50-border{border-color:#eceff1!important}.blue-grey-50-border-top{border-top-color:#eceff1!important}.blue-grey-50-border-right{border-right-color:#eceff1!important}.blue-grey-50-border-bottom{border-bottom-color:#eceff1!important}.blue-grey-50-border-left{border-left-color:#eceff1!important}.blue-grey-100-bg{background-color:#cfd8dc!important}.md-blue-grey-100-bg{background-color:#cfd8dc!important;color:rgba(0,0,0,.87)}.blue-grey-100-fg{color:#cfd8dc!important}.blue-grey-100-border{border-color:#cfd8dc!important}.blue-grey-100-border-top{border-top-color:#cfd8dc!important}.blue-grey-100-border-right{border-right-color:#cfd8dc!important}.blue-grey-100-border-bottom{border-bottom-color:#cfd8dc!important}.blue-grey-100-border-left{border-left-color:#cfd8dc!important}.blue-grey-200-bg{background-color:#b0bec5!important}.md-blue-grey-200-bg{background-color:#b0bec5!important;color:rgba(0,0,0,.87)}.blue-grey-200-fg{color:#b0bec5!important}.blue-grey-200-border{border-color:#b0bec5!important}.blue-grey-200-border-top{border-top-color:#b0bec5!important}.blue-grey-200-border-right{border-right-color:#b0bec5!important}.blue-grey-200-border-bottom{border-bottom-color:#b0bec5!important}.blue-grey-200-border-left{border-left-color:#b0bec5!important}.blue-grey-300-bg{background-color:#90a4ae!important}.md-blue-grey-300-bg{background-color:#90a4ae!important;color:rgba(0,0,0,.87)}.blue-grey-300-fg{color:#90a4ae!important}.blue-grey-300-border{border-color:#90a4ae!important}.blue-grey-300-border-top{border-top-color:#90a4ae!important}.blue-grey-300-border-right{border-right-color:#90a4ae!important}.blue-grey-300-border-bottom{border-bottom-color:#90a4ae!important}.blue-grey-300-border-left{border-left-color:#90a4ae!important}.blue-grey-400-bg{background-color:#78909c!important}.md-blue-grey-400-bg{background-color:#78909c!important;color:#fff}.blue-grey-400-fg{color:#78909c!important}.blue-grey-400-border{border-color:#78909c!important}.blue-grey-400-border-top{border-top-color:#78909c!important}.blue-grey-400-border-right{border-right-color:#78909c!important}.blue-grey-400-border-bottom{border-bottom-color:#78909c!important}.blue-grey-400-border-left{border-left-color:#78909c!important}.blue-grey-500-bg{background-color:#607d8b!important}.md-blue-grey-500-bg{background-color:#607d8b!important;color:#fff}.blue-grey-500-fg{color:#607d8b!important}.blue-grey-500-border{border-color:#607d8b!important}.blue-grey-500-border-top{border-top-color:#607d8b!important}.blue-grey-500-border-right{border-right-color:#607d8b!important}.blue-grey-500-border-bottom{border-bottom-color:#607d8b!important}.blue-grey-500-border-left{border-left-color:#607d8b!important}.md-blue-grey-bg{background-color:#607d8b!important;color:#fff}.blue-grey-bg{background-color:#607d8b!important}.blue-grey-fg{color:#607d8b!important}.blue-grey-border{border-color:#607d8b!important}.blue-grey-border-top{border-top-color:#607d8b!important}.blue-grey-border-right{border-right-color:#607d8b!important}.blue-grey-border-bottom{border-bottom-color:#607d8b!important}.blue-grey-border-left{border-left-color:#607d8b!important}.blue-grey-600-bg{background-color:#546e7a!important}.md-blue-grey-600-bg{background-color:#546e7a!important;color:rgba(255,255,255,.87)}.blue-grey-600-fg{color:#546e7a!important}.blue-grey-600-border{border-color:#546e7a!important}.blue-grey-600-border-top{border-top-color:#546e7a!important}.blue-grey-600-border-right{border-right-color:#546e7a!important}.blue-grey-600-border-bottom{border-bottom-color:#546e7a!important}.blue-grey-600-border-left{border-left-color:#546e7a!important}.blue-grey-700-bg{background-color:#455a64!important}.md-blue-grey-700-bg{background-color:#455a64!important;color:rgba(255,255,255,.87)}.blue-grey-700-fg{color:#455a64!important}.blue-grey-700-border{border-color:#455a64!important}.blue-grey-700-border-top{border-top-color:#455a64!important}.blue-grey-700-border-right{border-right-color:#455a64!important}.blue-grey-700-border-bottom{border-bottom-color:#455a64!important}.blue-grey-700-border-left{border-left-color:#455a64!important}.blue-grey-800-bg{background-color:#37474f!important}.md-blue-grey-800-bg{background-color:#37474f!important;color:rgba(255,255,255,.87)}.blue-grey-800-fg{color:#37474f!important}.blue-grey-800-border{border-color:#37474f!important}.blue-grey-800-border-top{border-top-color:#37474f!important}.blue-grey-800-border-right{border-right-color:#37474f!important}.blue-grey-800-border-bottom{border-bottom-color:#37474f!important}.blue-grey-800-border-left{border-left-color:#37474f!important}.blue-grey-900-bg{background-color:#263238!important}.md-blue-grey-900-bg{background-color:#263238!important;color:rgba(255,255,255,.87)}.blue-grey-900-fg{color:#263238!important}.blue-grey-900-border{border-color:#263238!important}.blue-grey-900-border-top{border-top-color:#263238!important}.blue-grey-900-border-right{border-right-color:#263238!important}.blue-grey-900-border-bottom{border-bottom-color:#263238!important}.blue-grey-900-border-left{border-left-color:#263238!important}.blue-grey-A100-bg{background-color:#cfd8dc!important}.md-blue-grey-A100-bg{background-color:#cfd8dc!important;color:rgba(255,255,255,.87)}.blue-grey-A100-fg{color:#cfd8dc!important}.blue-grey-A100-border{border-color:#cfd8dc!important}.blue-grey-A100-border-top{border-top-color:#cfd8dc!important}.blue-grey-A100-border-right{border-right-color:#cfd8dc!important}.blue-grey-A100-border-bottom{border-bottom-color:#cfd8dc!important}.blue-grey-A100-border-left{border-left-color:#cfd8dc!important}.blue-grey-A200-bg{background-color:#b0bec5!important}.md-blue-grey-A200-bg{background-color:#b0bec5!important;color:rgba(255,255,255,.87)}.blue-grey-A200-fg{color:#b0bec5!important}.blue-grey-A200-border{border-color:#b0bec5!important}.blue-grey-A200-border-top{border-top-color:#b0bec5!important}.blue-grey-A200-border-right{border-right-color:#b0bec5!important}.blue-grey-A200-border-bottom{border-bottom-color:#b0bec5!important}.blue-grey-A200-border-left{border-left-color:#b0bec5!important}.blue-grey-A400-bg{background-color:#78909c!important}.md-blue-grey-A400-bg{background-color:#78909c!important;color:rgba(255,255,255,.87)}.blue-grey-A400-fg{color:#78909c!important}.blue-grey-A400-border{border-color:#78909c!important}.blue-grey-A400-border-top{border-top-color:#78909c!important}.blue-grey-A400-border-right{border-right-color:#78909c!important}.blue-grey-A400-border-bottom{border-bottom-color:#78909c!important}.blue-grey-A400-border-left{border-left-color:#78909c!important}.blue-grey-A700-bg{background-color:#455a64!important}.md-blue-grey-A700-bg{background-color:#455a64!important;color:rgba(255,255,255,.87)}.blue-grey-A700-fg{color:#455a64!important}.blue-grey-A700-border{border-color:#455a64!important}.blue-grey-A700-border-top{border-top-color:#455a64!important}.blue-grey-A700-border-right{border-right-color:#455a64!important}.blue-grey-A700-border-bottom{border-bottom-color:#455a64!important}.blue-grey-A700-border-left{border-left-color:#455a64!important}.white-500-bg{background-color:#fff!important}.md-white-500-bg{background-color:#fff!important;color:rgba(0,0,0,.87)}.white-500-fg{color:#fff!important}.white-500-border{border-color:#fff!important}.white-500-border-top{border-top-color:#fff!important}.white-500-border-right{border-right-color:#fff!important}.white-500-border-bottom{border-bottom-color:#fff!important}.white-500-border-left{border-left-color:#fff!important}.md-white-bg{background-color:#fff!important;color:rgba(0,0,0,.87)}.white-bg{background-color:#fff!important}.white-fg{color:#fff!important}.white-border{border-color:#fff!important}.white-border-top{border-top-color:#fff!important}.white-border-right{border-right-color:#fff!important}.white-border-bottom{border-bottom-color:#fff!important}.white-border-left{border-left-color:#fff!important}.black-500-bg{background-color:#000!important}.md-black-500-bg{background-color:#000!important;color:rgba(255,255,255,.87)}.black-500-fg{color:#000!important}.black-500-border{border-color:#000!important}.black-500-border-top{border-top-color:#000!important}.black-500-border-right{border-right-color:#000!important}.black-500-border-bottom{border-bottom-color:#000!important}.black-500-border-left{border-left-color:#000!important}.md-black-bg{background-color:#000!important;color:rgba(255,255,255,.87)}.black-bg{background-color:#000!important}.black-fg{color:#000!important}.black-border{border-color:#000!important}.black-border-top{border-top-color:#000!important}.black-border-right{border-right-color:#000!important}.black-border-bottom{border-bottom-color:#000!important}.black-border-left{border-left-color:#000!important}i,md-icon[md-font-icon]{font-size:24px;width:24px;height:24px;min-width:24px;min-height:24px;line-height:24px}i.s4,md-icon[md-font-icon].s4{font-size:4px!important;width:4px!important;height:4px!important;min-width:4px!important;min-height:4px!important;line-height:4px!important}i.s6,md-icon[md-font-icon].s6{font-size:6px!important;width:6px!important;height:6px!important;min-width:6px!important;min-height:6px!important;line-height:6px!important}i.s8,md-icon[md-font-icon].s8{font-size:8px!important;width:8px!important;height:8px!important;min-width:8px!important;min-height:8px!important;line-height:8px!important}i.s10,md-icon[md-font-icon].s10{font-size:10px!important;width:10px!important;height:10px!important;min-width:10px!important;min-height:10px!important;line-height:10px!important}i.s12,md-icon[md-font-icon].s12{font-size:12px!important;width:12px!important;height:12px!important;min-width:12px!important;min-height:12px!important;line-height:12px!important}i.s14,md-icon[md-font-icon].s14{font-size:14px!important;width:14px!important;height:14px!important;min-width:14px!important;min-height:14px!important;line-height:14px!important}i.s16,md-icon[md-font-icon].s16{font-size:16px!important;width:16px!important;height:16px!important;min-width:16px!important;min-height:16px!important;line-height:16px!important}i.s18,md-icon[md-font-icon].s18{font-size:18px!important;width:18px!important;height:18px!important;min-width:18px!important;min-height:18px!important;line-height:18px!important}i.s20,md-icon[md-font-icon].s20{font-size:20px!important;width:20px!important;height:20px!important;min-width:20px!important;min-height:20px!important;line-height:20px!important}i.s22,md-icon[md-font-icon].s22{font-size:22px!important;width:22px!important;height:22px!important;min-width:22px!important;min-height:22px!important;line-height:22px!important}i.s24,md-icon[md-font-icon].s24{font-size:24px!important;width:24px!important;height:24px!important;min-width:24px!important;min-height:24px!important;line-height:24px!important}i.s26,md-icon[md-font-icon].s26{font-size:26px!important;width:26px!important;height:26px!important;min-width:26px!important;min-height:26px!important;line-height:26px!important}i.s28,md-icon[md-font-icon].s28{font-size:28px!important;width:28px!important;height:28px!important;min-width:28px!important;min-height:28px!important;line-height:28px!important}i.s30,md-icon[md-font-icon].s30{font-size:30px!important;width:30px!important;height:30px!important;min-width:30px!important;min-height:30px!important;line-height:30px!important}i.s32,md-icon[md-font-icon].s32{font-size:32px!important;width:32px!important;height:32px!important;min-width:32px!important;min-height:32px!important;line-height:32px!important}i.s34,md-icon[md-font-icon].s34{font-size:34px!important;width:34px!important;height:34px!important;min-width:34px!important;min-height:34px!important;line-height:34px!important}i.s36,md-icon[md-font-icon].s36{font-size:36px!important;width:36px!important;height:36px!important;min-width:36px!important;min-height:36px!important;line-height:36px!important}i.s38,md-icon[md-font-icon].s38{font-size:38px!important;width:38px!important;height:38px!important;min-width:38px!important;min-height:38px!important;line-height:38px!important}i.s40,md-icon[md-font-icon].s40{font-size:40px!important;width:40px!important;height:40px!important;min-width:40px!important;min-height:40px!important;line-height:40px!important}i.s42,md-icon[md-font-icon].s42{font-size:42px!important;width:42px!important;height:42px!important;min-width:42px!important;min-height:42px!important;line-height:42px!important}i.s44,md-icon[md-font-icon].s44{font-size:44px!important;width:44px!important;height:44px!important;min-width:44px!important;min-height:44px!important;line-height:44px!important}i.s46,md-icon[md-font-icon].s46{font-size:46px!important;width:46px!important;height:46px!important;min-width:46px!important;min-height:46px!important;line-height:46px!important}i.s48,md-icon[md-font-icon].s48{font-size:48px!important;width:48px!important;height:48px!important;min-width:48px!important;min-height:48px!important;line-height:48px!important}i.s50,md-icon[md-font-icon].s50{font-size:50px!important;width:50px!important;height:50px!important;min-width:50px!important;min-height:50px!important;line-height:50px!important}i.s52,md-icon[md-font-icon].s52{font-size:52px!important;width:52px!important;height:52px!important;min-width:52px!important;min-height:52px!important;line-height:52px!important}i.s54,md-icon[md-font-icon].s54{font-size:54px!important;width:54px!important;height:54px!important;min-width:54px!important;min-height:54px!important;line-height:54px!important}i.s56,md-icon[md-font-icon].s56{font-size:56px!important;width:56px!important;height:56px!important;min-width:56px!important;min-height:56px!important;line-height:56px!important}i.s58,md-icon[md-font-icon].s58{font-size:58px!important;width:58px!important;height:58px!important;min-width:58px!important;min-height:58px!important;line-height:58px!important}i.s60,md-icon[md-font-icon].s60{font-size:60px!important;width:60px!important;height:60px!important;min-width:60px!important;min-height:60px!important;line-height:60px!important}i.s62,md-icon[md-font-icon].s62{font-size:62px!important;width:62px!important;height:62px!important;min-width:62px!important;min-height:62px!important;line-height:62px!important}i.s64,md-icon[md-font-icon].s64{font-size:64px!important;width:64px!important;height:64px!important;min-width:64px!important;min-height:64px!important;line-height:64px!important}i.s66,md-icon[md-font-icon].s66{font-size:66px!important;width:66px!important;height:66px!important;min-width:66px!important;min-height:66px!important;line-height:66px!important}i.s68,md-icon[md-font-icon].s68{font-size:68px!important;width:68px!important;height:68px!important;min-width:68px!important;min-height:68px!important;line-height:68px!important}i.s70,md-icon[md-font-icon].s70{font-size:70px!important;width:70px!important;height:70px!important;min-width:70px!important;min-height:70px!important;line-height:70px!important}i.s72,md-icon[md-font-icon].s72{font-size:72px!important;width:72px!important;height:72px!important;min-width:72px!important;min-height:72px!important;line-height:72px!important}i.s74,md-icon[md-font-icon].s74{font-size:74px!important;width:74px!important;height:74px!important;min-width:74px!important;min-height:74px!important;line-height:74px!important}i.s76,md-icon[md-font-icon].s76{font-size:76px!important;width:76px!important;height:76px!important;min-width:76px!important;min-height:76px!important;line-height:76px!important}i.s78,md-icon[md-font-icon].s78{font-size:78px!important;width:78px!important;height:78px!important;min-width:78px!important;min-height:78px!important;line-height:78px!important}i.s80,md-icon[md-font-icon].s80{font-size:80px!important;width:80px!important;height:80px!important;min-width:80px!important;min-height:80px!important;line-height:80px!important}i.s82,md-icon[md-font-icon].s82{font-size:82px!important;width:82px!important;height:82px!important;min-width:82px!important;min-height:82px!important;line-height:82px!important}i.s84,md-icon[md-font-icon].s84{font-size:84px!important;width:84px!important;height:84px!important;min-width:84px!important;min-height:84px!important;line-height:84px!important}i.s86,md-icon[md-font-icon].s86{font-size:86px!important;width:86px!important;height:86px!important;min-width:86px!important;min-height:86px!important;line-height:86px!important}i.s88,md-icon[md-font-icon].s88{font-size:88px!important;width:88px!important;height:88px!important;min-width:88px!important;min-height:88px!important;line-height:88px!important}i.s90,md-icon[md-font-icon].s90{font-size:90px!important;width:90px!important;height:90px!important;min-width:90px!important;min-height:90px!important;line-height:90px!important}i.s92,md-icon[md-font-icon].s92{font-size:92px!important;width:92px!important;height:92px!important;min-width:92px!important;min-height:92px!important;line-height:92px!important}i.s94,md-icon[md-font-icon].s94{font-size:94px!important;width:94px!important;height:94px!important;min-width:94px!important;min-height:94px!important;line-height:94px!important}i.s96,md-icon[md-font-icon].s96{font-size:96px!important;width:96px!important;height:96px!important;min-width:96px!important;min-height:96px!important;line-height:96px!important}i.s98,md-icon[md-font-icon].s98{font-size:98px!important;width:98px!important;height:98px!important;min-width:98px!important;min-height:98px!important;line-height:98px!important}i.s100,md-icon[md-font-icon].s100{font-size:100px!important;width:100px!important;height:100px!important;min-width:100px!important;min-height:100px!important;line-height:100px!important}i.s102,md-icon[md-font-icon].s102{font-size:102px!important;width:102px!important;height:102px!important;min-width:102px!important;min-height:102px!important;line-height:102px!important}i.s104,md-icon[md-font-icon].s104{font-size:104px!important;width:104px!important;height:104px!important;min-width:104px!important;min-height:104px!important;line-height:104px!important}i.s106,md-icon[md-font-icon].s106{font-size:106px!important;width:106px!important;height:106px!important;min-width:106px!important;min-height:106px!important;line-height:106px!important}i.s108,md-icon[md-font-icon].s108{font-size:108px!important;width:108px!important;height:108px!important;min-width:108px!important;min-height:108px!important;line-height:108px!important}i.s110,md-icon[md-font-icon].s110{font-size:110px!important;width:110px!important;height:110px!important;min-width:110px!important;min-height:110px!important;line-height:110px!important}i.s112,md-icon[md-font-icon].s112{font-size:112px!important;width:112px!important;height:112px!important;min-width:112px!important;min-height:112px!important;line-height:112px!important}i.s114,md-icon[md-font-icon].s114{font-size:114px!important;width:114px!important;height:114px!important;min-width:114px!important;min-height:114px!important;line-height:114px!important}i.s116,md-icon[md-font-icon].s116{font-size:116px!important;width:116px!important;height:116px!important;min-width:116px!important;min-height:116px!important;line-height:116px!important}i.s118,md-icon[md-font-icon].s118{font-size:118px!important;width:118px!important;height:118px!important;min-width:118px!important;min-height:118px!important;line-height:118px!important}i.s120,md-icon[md-font-icon].s120{font-size:120px!important;width:120px!important;height:120px!important;min-width:120px!important;min-height:120px!important;line-height:120px!important}i.s122,md-icon[md-font-icon].s122{font-size:122px!important;width:122px!important;height:122px!important;min-width:122px!important;min-height:122px!important;line-height:122px!important}i.s124,md-icon[md-font-icon].s124{font-size:124px!important;width:124px!important;height:124px!important;min-width:124px!important;min-height:124px!important;line-height:124px!important}i.s126,md-icon[md-font-icon].s126{font-size:126px!important;width:126px!important;height:126px!important;min-width:126px!important;min-height:126px!important;line-height:126px!important}i.s128,md-icon[md-font-icon].s128{font-size:128px!important;width:128px!important;height:128px!important;min-width:128px!important;min-height:128px!important;line-height:128px!important}i.s130,md-icon[md-font-icon].s130{font-size:130px!important;width:130px!important;height:130px!important;min-width:130px!important;min-height:130px!important;line-height:130px!important}i.s132,md-icon[md-font-icon].s132{font-size:132px!important;width:132px!important;height:132px!important;min-width:132px!important;min-height:132px!important;line-height:132px!important}i.s134,md-icon[md-font-icon].s134{font-size:134px!important;width:134px!important;height:134px!important;min-width:134px!important;min-height:134px!important;line-height:134px!important}i.s136,md-icon[md-font-icon].s136{font-size:136px!important;width:136px!important;height:136px!important;min-width:136px!important;min-height:136px!important;line-height:136px!important}i.s138,md-icon[md-font-icon].s138{font-size:138px!important;width:138px!important;height:138px!important;min-width:138px!important;min-height:138px!important;line-height:138px!important}i.s140,md-icon[md-font-icon].s140{font-size:140px!important;width:140px!important;height:140px!important;min-width:140px!important;min-height:140px!important;line-height:140px!important}i.s142,md-icon[md-font-icon].s142{font-size:142px!important;width:142px!important;height:142px!important;min-width:142px!important;min-height:142px!important;line-height:142px!important}i.s144,md-icon[md-font-icon].s144{font-size:144px!important;width:144px!important;height:144px!important;min-width:144px!important;min-height:144px!important;line-height:144px!important}i.s146,md-icon[md-font-icon].s146{font-size:146px!important;width:146px!important;height:146px!important;min-width:146px!important;min-height:146px!important;line-height:146px!important}i.s148,md-icon[md-font-icon].s148{font-size:148px!important;width:148px!important;height:148px!important;min-width:148px!important;min-height:148px!important;line-height:148px!important}i.s150,md-icon[md-font-icon].s150{font-size:150px!important;width:150px!important;height:150px!important;min-width:150px!important;min-height:150px!important;line-height:150px!important}i.s152,md-icon[md-font-icon].s152{font-size:152px!important;width:152px!important;height:152px!important;min-width:152px!important;min-height:152px!important;line-height:152px!important}i.s154,md-icon[md-font-icon].s154{font-size:154px!important;width:154px!important;height:154px!important;min-width:154px!important;min-height:154px!important;line-height:154px!important}i.s156,md-icon[md-font-icon].s156{font-size:156px!important;width:156px!important;height:156px!important;min-width:156px!important;min-height:156px!important;line-height:156px!important}i.s158,md-icon[md-font-icon].s158{font-size:158px!important;width:158px!important;height:158px!important;min-width:158px!important;min-height:158px!important;line-height:158px!important}i.s160,md-icon[md-font-icon].s160{font-size:160px!important;width:160px!important;height:160px!important;min-width:160px!important;min-height:160px!important;line-height:160px!important}i.s162,md-icon[md-font-icon].s162{font-size:162px!important;width:162px!important;height:162px!important;min-width:162px!important;min-height:162px!important;line-height:162px!important}i.s164,md-icon[md-font-icon].s164{font-size:164px!important;width:164px!important;height:164px!important;min-width:164px!important;min-height:164px!important;line-height:164px!important}i.s166,md-icon[md-font-icon].s166{font-size:166px!important;width:166px!important;height:166px!important;min-width:166px!important;min-height:166px!important;line-height:166px!important}i.s168,md-icon[md-font-icon].s168{font-size:168px!important;width:168px!important;height:168px!important;min-width:168px!important;min-height:168px!important;line-height:168px!important}i.s170,md-icon[md-font-icon].s170{font-size:170px!important;width:170px!important;height:170px!important;min-width:170px!important;min-height:170px!important;line-height:170px!important}i.s172,md-icon[md-font-icon].s172{font-size:172px!important;width:172px!important;height:172px!important;min-width:172px!important;min-height:172px!important;line-height:172px!important}i.s174,md-icon[md-font-icon].s174{font-size:174px!important;width:174px!important;height:174px!important;min-width:174px!important;min-height:174px!important;line-height:174px!important}i.s176,md-icon[md-font-icon].s176{font-size:176px!important;width:176px!important;height:176px!important;min-width:176px!important;min-height:176px!important;line-height:176px!important}i.s178,md-icon[md-font-icon].s178{font-size:178px!important;width:178px!important;height:178px!important;min-width:178px!important;min-height:178px!important;line-height:178px!important}i.s180,md-icon[md-font-icon].s180{font-size:180px!important;width:180px!important;height:180px!important;min-width:180px!important;min-height:180px!important;line-height:180px!important}i.s182,md-icon[md-font-icon].s182{font-size:182px!important;width:182px!important;height:182px!important;min-width:182px!important;min-height:182px!important;line-height:182px!important}i.s184,md-icon[md-font-icon].s184{font-size:184px!important;width:184px!important;height:184px!important;min-width:184px!important;min-height:184px!important;line-height:184px!important}i.s186,md-icon[md-font-icon].s186{font-size:186px!important;width:186px!important;height:186px!important;min-width:186px!important;min-height:186px!important;line-height:186px!important}i.s188,md-icon[md-font-icon].s188{font-size:188px!important;width:188px!important;height:188px!important;min-width:188px!important;min-height:188px!important;line-height:188px!important}i.s190,md-icon[md-font-icon].s190{font-size:190px!important;width:190px!important;height:190px!important;min-width:190px!important;min-height:190px!important;line-height:190px!important}i.s192,md-icon[md-font-icon].s192{font-size:192px!important;width:192px!important;height:192px!important;min-width:192px!important;min-height:192px!important;line-height:192px!important}i.s194,md-icon[md-font-icon].s194{font-size:194px!important;width:194px!important;height:194px!important;min-width:194px!important;min-height:194px!important;line-height:194px!important}i.s196,md-icon[md-font-icon].s196{font-size:196px!important;width:196px!important;height:196px!important;min-width:196px!important;min-height:196px!important;line-height:196px!important}i.s198,md-icon[md-font-icon].s198{font-size:198px!important;width:198px!important;height:198px!important;min-width:198px!important;min-height:198px!important;line-height:198px!important}i.s200,md-icon[md-font-icon].s200{font-size:200px!important;width:200px!important;height:200px!important;min-width:200px!important;min-height:200px!important;line-height:200px!important}i.s202,md-icon[md-font-icon].s202{font-size:202px!important;width:202px!important;height:202px!important;min-width:202px!important;min-height:202px!important;line-height:202px!important}i.s204,md-icon[md-font-icon].s204{font-size:204px!important;width:204px!important;height:204px!important;min-width:204px!important;min-height:204px!important;line-height:204px!important}i.s206,md-icon[md-font-icon].s206{font-size:206px!important;width:206px!important;height:206px!important;min-width:206px!important;min-height:206px!important;line-height:206px!important}i.s208,md-icon[md-font-icon].s208{font-size:208px!important;width:208px!important;height:208px!important;min-width:208px!important;min-height:208px!important;line-height:208px!important}i.s210,md-icon[md-font-icon].s210{font-size:210px!important;width:210px!important;height:210px!important;min-width:210px!important;min-height:210px!important;line-height:210px!important}i.s212,md-icon[md-font-icon].s212{font-size:212px!important;width:212px!important;height:212px!important;min-width:212px!important;min-height:212px!important;line-height:212px!important}i.s214,md-icon[md-font-icon].s214{font-size:214px!important;width:214px!important;height:214px!important;min-width:214px!important;min-height:214px!important;line-height:214px!important}i.s216,md-icon[md-font-icon].s216{font-size:216px!important;width:216px!important;height:216px!important;min-width:216px!important;min-height:216px!important;line-height:216px!important}i.s218,md-icon[md-font-icon].s218{font-size:218px!important;width:218px!important;height:218px!important;min-width:218px!important;min-height:218px!important;line-height:218px!important}i.s220,md-icon[md-font-icon].s220{font-size:220px!important;width:220px!important;height:220px!important;min-width:220px!important;min-height:220px!important;line-height:220px!important}i.s222,md-icon[md-font-icon].s222{font-size:222px!important;width:222px!important;height:222px!important;min-width:222px!important;min-height:222px!important;line-height:222px!important}i.s224,md-icon[md-font-icon].s224{font-size:224px!important;width:224px!important;height:224px!important;min-width:224px!important;min-height:224px!important;line-height:224px!important}i.s226,md-icon[md-font-icon].s226{font-size:226px!important;width:226px!important;height:226px!important;min-width:226px!important;min-height:226px!important;line-height:226px!important}i.s228,md-icon[md-font-icon].s228{font-size:228px!important;width:228px!important;height:228px!important;min-width:228px!important;min-height:228px!important;line-height:228px!important}i.s230,md-icon[md-font-icon].s230{font-size:230px!important;width:230px!important;height:230px!important;min-width:230px!important;min-height:230px!important;line-height:230px!important}i.s232,md-icon[md-font-icon].s232{font-size:232px!important;width:232px!important;height:232px!important;min-width:232px!important;min-height:232px!important;line-height:232px!important}i.s234,md-icon[md-font-icon].s234{font-size:234px!important;width:234px!important;height:234px!important;min-width:234px!important;min-height:234px!important;line-height:234px!important}i.s236,md-icon[md-font-icon].s236{font-size:236px!important;width:236px!important;height:236px!important;min-width:236px!important;min-height:236px!important;line-height:236px!important}i.s238,md-icon[md-font-icon].s238{font-size:238px!important;width:238px!important;height:238px!important;min-width:238px!important;min-height:238px!important;line-height:238px!important}i.s240,md-icon[md-font-icon].s240{font-size:240px!important;width:240px!important;height:240px!important;min-width:240px!important;min-height:240px!important;line-height:240px!important}i.s242,md-icon[md-font-icon].s242{font-size:242px!important;width:242px!important;height:242px!important;min-width:242px!important;min-height:242px!important;line-height:242px!important}i.s244,md-icon[md-font-icon].s244{font-size:244px!important;width:244px!important;height:244px!important;min-width:244px!important;min-height:244px!important;line-height:244px!important}i.s246,md-icon[md-font-icon].s246{font-size:246px!important;width:246px!important;height:246px!important;min-width:246px!important;min-height:246px!important;line-height:246px!important}i.s248,md-icon[md-font-icon].s248{font-size:248px!important;width:248px!important;height:248px!important;min-width:248px!important;min-height:248px!important;line-height:248px!important}i.s250,md-icon[md-font-icon].s250{font-size:250px!important;width:250px!important;height:250px!important;min-width:250px!important;min-height:250px!important;line-height:250px!important}i.s252,md-icon[md-font-icon].s252{font-size:252px!important;width:252px!important;height:252px!important;min-width:252px!important;min-height:252px!important;line-height:252px!important}i.s254,md-icon[md-font-icon].s254{font-size:254px!important;width:254px!important;height:254px!important;min-width:254px!important;min-height:254px!important;line-height:254px!important}i.s256,md-icon[md-font-icon].s256{font-size:256px!important;width:256px!important;height:256px!important;min-width:256px!important;min-height:256px!important;line-height:256px!important}@font-face{font-family:icomoon;src:url(../assets/icons/fonts/icomoon.eot?5km1tg);src:url(../assets/icons/fonts/icomoon.eot?#iefix5km1tg) format("embedded-opentype"),url(../assets/icons/fonts/icomoon.ttf?5km1tg) format("truetype"),url(../assets/icons/fonts/icomoon.woff?5km1tg) format("woff"),url(../assets/icons/fonts/icomoon.svg?5km1tg#icomoon) format("svg");font-weight:400;font-style:normal}[class*=' icon-'],[class^=icon-]{font-family:icomoon;speak:none;font-style:normal;font-weight:400;font-variant:normal;text-transform:none;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.icon-account-alert:before{content:'\e600'}.icon-account-box-outline:before{content:'\e601'}.icon-account-box:before{content:'\e602'}.icon-account-check:before{content:'\e603'}.icon-account-circle:before{content:'\e604'}.icon-account-key:before{content:'\e605'}.icon-account-location:before{content:'\e606'}.icon-account-minus:before{content:'\e607'}.icon-account-multiple-outline:before{content:'\e608'}.icon-account-multiple-plus:before{content:'\e609'}.icon-account-multiple:before{content:'\e60a'}.icon-account-network:before{content:'\e60b'}.icon-account-outline:before{content:'\e60c'}.icon-account-plus:before{content:'\e60d'}.icon-account-remove:before{content:'\e60e'}.icon-account-search:before{content:'\e60f'}.icon-account-switch:before{content:'\e610'}.icon-account:before{content:'\e611'}.icon-airballoon:before{content:'\e612'}.icon-airplane-off:before{content:'\e613'}.icon-airplane:before{content:'\e614'}.icon-alarm-check:before{content:'\e615'}.icon-alarm-multiple:before{content:'\e616'}.icon-alarm-off:before{content:'\e617'}.icon-alarm-plus:before{content:'\e618'}.icon-alarm:before{content:'\e619'}.icon-album:before{content:'\e61a'}.icon-alert-box:before{content:'\e61b'}.icon-alert-circle:before{content:'\e61c'}.icon-alert-octagon:before{content:'\e61d'}.icon-alert:before{content:'\e61e'}.icon-alpha:before{content:'\e61f'}.icon-alphabetical:before{content:'\e620'}.icon-amazon-clouddrive:before{content:'\e621'}.icon-amazon:before{content:'\e622'}.icon-ambulance:before{content:'\e623'}.icon-android-debug-bridge:before{content:'\e624'}.icon-android-studio:before{content:'\e625'}.icon-android:before{content:'\e626'}.icon-apple-finder:before{content:'\e627'}.icon-apple-ios:before{content:'\e628'}.icon-apple-mobileme:before{content:'\e629'}.icon-apple-safari:before{content:'\e62a'}.icon-apple:before{content:'\e62b'}.icon-appnet:before{content:'\e62c'}.icon-apps:before{content:'\e62d'}.icon-archive:before{content:'\e62e'}.icon-arrange-bring-forward:before{content:'\e62f'}.icon-arrange-bring-to-front:before{content:'\e630'}.icon-arrange-send-backward:before{content:'\e631'}.icon-arrange-send-to-back:before{content:'\e632'}.icon-arrow-all:before{content:'\e633'}.icon-arrow-bottom-left:before{content:'\e634'}.icon-arrow-bottom-right:before{content:'\e635'}.icon-arrow-collapse:before{content:'\e636'}.icon-arrow-down-bold-circle-outline:before{content:'\e637'}.icon-arrow-down-bold-circle:before{content:'\e638'}.icon-arrow-down-bold-hexagon-outline:before{content:'\e639'}.icon-arrow-down-bold:before{content:'\e63a'}.icon-arrow-down:before{content:'\e63b'}.icon-arrow-expand:before{content:'\e63c'}.icon-arrow-left-bold-circle-outline:before{content:'\e63d'}.icon-arrow-left-bold-circle:before{content:'\e63e'}.icon-arrow-left-bold-hexagon-outline:before{content:'\e63f'}.icon-arrow-left-bold:before{content:'\e640'}.icon-arrow-left:before{content:'\e641'}.icon-arrow-right-bold-circle-outline:before{content:'\e642'}.icon-arrow-right-bold-circle:before{content:'\e643'}.icon-arrow-right-bold-hexagon-outline:before{content:'\e644'}.icon-arrow-right-bold:before{content:'\e645'}.icon-arrow-right:before{content:'\e646'}.icon-arrow-top-left:before{content:'\e647'}.icon-arrow-top-right:before{content:'\e648'}.icon-arrow-up-bold-circle-outline:before{content:'\e649'}.icon-arrow-up-bold-circle:before{content:'\e64a'}.icon-arrow-up-bold-hexagon-outline:before{content:'\e64b'}.icon-arrow-up-bold:before{content:'\e64c'}.icon-arrow-up:before{content:'\e64d'}.icon-at:before{content:'\e64e'}.icon-attachment:before{content:'\e64f'}.icon-audiobook:before{content:'\e650'}.icon-auto-fix:before{content:'\e651'}.icon-auto-upload:before{content:'\e652'}.icon-baby:before{content:'\e653'}.icon-backburger:before{content:'\e654'}.icon-backup-restore:before{content:'\e655'}.icon-bank:before{content:'\e656'}.icon-barcode:before{content:'\e657'}.icon-barley:before{content:'\e658'}.icon-barrel:before{content:'\e659'}.icon-basecamp:before{content:'\e65a'}.icon-basket-fill:before{content:'\e65b'}.icon-basket-unfill:before{content:'\e65c'}.icon-basket:before{content:'\e65d'}.icon-battery-10:before{content:'\e65e'}.icon-battery-20:before{content:'\e65f'}.icon-battery-30:before{content:'\e660'}.icon-battery-40:before{content:'\e661'}.icon-battery-50:before{content:'\e662'}.icon-battery-60:before{content:'\e663'}.icon-battery-70:before{content:'\e664'}.icon-battery-80:before{content:'\e665'}.icon-battery-90:before{content:'\e666'}.icon-battery-alert:before{content:'\e667'}.icon-battery-charging-20:before{content:'\e668'}.icon-battery-charging-30:before{content:'\e669'}.icon-battery-charging-40:before{content:'\e66a'}.icon-battery-charging-60:before{content:'\e66b'}.icon-battery-charging-80:before{content:'\e66c'}.icon-battery-charging-90:before{content:'\e66d'}.icon-battery-charging-100:before{content:'\e66e'}.icon-battery-minus:before{content:'\e66f'}.icon-battery-negative:before{content:'\e670'}.icon-battery-outline:before{content:'\e671'}.icon-battery-plus:before{content:'\e672'}.icon-battery-positive:before{content:'\e673'}.icon-battery-standard:before{content:'\e674'}.icon-battery-unknown:before{content:'\e675'}.icon-battery:before{content:'\e676'}.icon-beach:before{content:'\e677'}.icon-beaker-empty-outline:before{content:'\e678'}.icon-beaker-empty:before{content:'\e679'}.icon-beaker-outline:before{content:'\e67a'}.icon-beaker:before{content:'\e67b'}.icon-beats:before{content:'\e67c'}.icon-beer:before{content:'\e67d'}.icon-behance:before{content:'\e67e'}.icon-bell-off:before{content:'\e67f'}.icon-bell-outline:before{content:'\e680'}.icon-bell-ring-outline:before{content:'\e681'}.icon-bell-ring:before{content:'\e682'}.icon-bell-sleep:before{content:'\e683'}.icon-bell:before{content:'\e684'}.icon-beta:before{content:'\e685'}.icon-bike:before{content:'\e686'}.icon-bing:before{content:'\e687'}.icon-binoculars:before{content:'\e688'}.icon-bio:before{content:'\e689'}.icon-bitbucket:before{content:'\e68a'}.icon-black-mesa:before{content:'\e68b'}.icon-blackberry:before{content:'\e68c'}.icon-blinds:before{content:'\e68d'}.icon-block-helper:before{content:'\e68e'}.icon-blogger:before{content:'\e68f'}.icon-bluetooth-audio:before{content:'\e690'}.icon-bluetooth-connect:before{content:'\e691'}.icon-bluetooth-settings:before{content:'\e692'}.icon-bluetooth-transfer:before{content:'\e693'}.icon-bluetooth:before{content:'\e694'}.icon-blur-linear:before{content:'\e695'}.icon-blur-off:before{content:'\e696'}.icon-blur-radial:before{content:'\e697'}.icon-blur:before{content:'\e698'}.icon-bone:before{content:'\e699'}.icon-book-multiple-variant:before{content:'\e69a'}.icon-book-multiple:before{content:'\e69b'}.icon-book-open:before{content:'\e69c'}.icon-book-variant:before{content:'\e69d'}.icon-book:before{content:'\e69e'}.icon-bookmark-check:before{content:'\e69f'}.icon-bookmark-music:before{content:'\e6a0'}.icon-bookmark-outline-plus:before{content:'\e6a1'}.icon-bookmark-outline:before{content:'\e6a2'}.icon-bookmark-plus:before{content:'\e6a3'}.icon-bookmark-remove:before{content:'\e6a4'}.icon-bookmark:before{content:'\e6a5'}.icon-border-all:before{content:'\e6a6'}.icon-border-bottom:before{content:'\e6a7'}.icon-border-color:before{content:'\e6a8'}.icon-border-horizontal:before{content:'\e6a9'}.icon-border-inside:before{content:'\e6aa'}.icon-border-left:before{content:'\e6ab'}.icon-border-none:before{content:'\e6ac'}.icon-border-outside:before{content:'\e6ad'}.icon-border-right:before{content:'\e6ae'}.icon-border-top:before{content:'\e6af'}.icon-border-vertical:before{content:'\e6b0'}.icon-bowling:before{content:'\e6b1'}.icon-box-download:before{content:'\e6b2'}.icon-box-upload:before{content:'\e6b3'}.icon-box:before{content:'\e6b4'}.icon-briefcase-checked:before{content:'\e6b5'}.icon-briefcase-download:before{content:'\e6b6'}.icon-briefcase-upload:before{content:'\e6b7'}.icon-briefcase:before{content:'\e6b8'}.icon-brightness-1:before{content:'\e6b9'}.icon-brightness-2:before{content:'\e6ba'}.icon-brightness-3:before{content:'\e6bb'}.icon-brightness-4:before{content:'\e6bc'}.icon-brightness-5:before{content:'\e6bd'}.icon-brightness-6:before{content:'\e6be'}.icon-brightness-7:before{content:'\e6bf'}.icon-brightness-auto:before{content:'\e6c0'}.icon-brightness:before{content:'\e6c1'}.icon-broom:before{content:'\e6c2'}.icon-brush:before{content:'\e6c3'}.icon-bug:before{content:'\e6c4'}.icon-bulletin-board:before{content:'\e6c5'}.icon-bullhorn:before{content:'\e6c6'}.icon-bus:before{content:'\e6c7'}.icon-cake-variant:before{content:'\e6c8'}.icon-cake:before{content:'\e6c9'}.icon-calculator:before{content:'\e6ca'}.icon-calendar-blank:before{content:'\e6cb'}.icon-calendar-check-multiple:before{content:'\e6cc'}.icon-calendar-check:before{content:'\e6cd'}.icon-calendar-clock:before{content:'\e6ce'}.icon-calendar-multiple:before{content:'\e6cf'}.icon-calendar-plus:before{content:'\e6d0'}.icon-calendar-remove:before{content:'\e6d1'}.icon-calendar-select:before{content:'\e6d2'}.icon-calendar-text:before{content:'\e6d3'}.icon-calendar-today:before{content:'\e6d4'}.icon-calendar:before{content:'\e6d5'}.icon-camcorder-box-off:before{content:'\e6d6'}.icon-camcorder-box:before{content:'\e6d7'}.icon-camcorder-off:before{content:'\e6d8'}.icon-camcorder:before{content:'\e6d9'}.icon-camera-front-variant:before{content:'\e6da'}.icon-camera-front:before{content:'\e6db'}.icon-camera-iris:before{content:'\e6dc'}.icon-camera-party-mode:before{content:'\e6dd'}.icon-camera-rear-variant:before{content:'\e6de'}.icon-camera-rear:before{content:'\e6df'}.icon-camera-switch:before{content:'\e6e0'}.icon-camera-timer:before{content:'\e6e1'}.icon-camera:before{content:'\e6e2'}.icon-cancel:before{content:'\e6e3'}.icon-candycane:before{content:'\e6e4'}.icon-car-wash:before{content:'\e6e5'}.icon-car:before{content:'\e6e6'}.icon-carrot:before{content:'\e6e7'}.icon-cart-outline:before{content:'\e6e8'}.icon-cart:before{content:'\e6e9'}.icon-cash-100:before{content:'\e6ea'}.icon-cash-multiple:before{content:'\e6eb'}.icon-cash-usd:before{content:'\e6ec'}.icon-cash:before{content:'\e6ed'}.icon-cast-connected:before{content:'\e6ee'}.icon-cast:before{content:'\e6ef'}.icon-castle:before{content:'\e6f0'}.icon-cat:before{content:'\e6f1'}.icon-cellphone-android:before{content:'\e6f2'}.icon-cellphone-dock:before{content:'\e6f3'}.icon-cellphone-iphone:before{content:'\e6f4'}.icon-cellphone-link-off:before{content:'\e6f5'}.icon-cellphone-link:before{content:'\e6f6'}.icon-cellphone-settings:before{content:'\e6f7'}.icon-cellphone:before{content:'\e6f8'}.icon-chair-school:before{content:'\e6f9'}.icon-chart-arc:before{content:'\e6fa'}.icon-chart-areaspline:before{content:'\e6fb'}.icon-chart-bar:before{content:'\e6fc'}.icon-chart-histogram:before{content:'\e6fd'}.icon-chart-line:before{content:'\e6fe'}.icon-chart-pie:before{content:'\e6ff'}.icon-check-all:before{content:'\e700'}.icon-check-bookmark:before{content:'\e701'}.icon-check-circle:before{content:'\e702'}.icon-check:before{content:'\e703'}.icon-checkbox-blank-circle-outline:before{content:'\e704'}.icon-checkbox-blank-circle:before{content:'\e705'}.icon-checkbox-blank-outline:before{content:'\e706'}.icon-checkbox-blank:before{content:'\e707'}.icon-checkbox-marked-circle-outline:before{content:'\e708'}.icon-checkbox-marked-circle:before{content:'\e709'}.icon-checkbox-marked-outline:before{content:'\e70a'}.icon-checkbox-marked:before{content:'\e70b'}.icon-checkbox-multiple-blank-outline:before{content:'\e70c'}.icon-checkbox-multiple-blank:before{content:'\e70d'}.icon-checkbox-multiple-marked-outline:before{content:'\e70e'}.icon-checkbox-multiple-marked:before{content:'\e70f'}.icon-checkerboard:before{content:'\e710'}.icon-chevron-double-down:before{content:'\e711'}.icon-chevron-double-left:before{content:'\e712'}.icon-chevron-double-right:before{content:'\e713'}.icon-chevron-double-up:before{content:'\e714'}.icon-chevron-down:before{content:'\e715'}.icon-chevron-left:before{content:'\e716'}.icon-chevron-right:before{content:'\e717'}.icon-chevron-up:before{content:'\e718'}.icon-church:before{content:'\e719'}.icon-cisco-webex:before{content:'\e71a'}.icon-city:before{content:'\e71b'}.icon-clapperboard:before{content:'\e71c'}.icon-clipboard-account:before{content:'\e71d'}.icon-clipboard-alert:before{content:'\e71e'}.icon-clipboard-arrow-down:before{content:'\e71f'}.icon-clipboard-arrow-left:before{content:'\e720'}.icon-clipboard-check:before{content:'\e721'}.icon-clipboard-outline:before{content:'\e722'}.icon-clipboard-text:before{content:'\e723'}.icon-clipboard:before{content:'\e724'}.icon-clippy:before{content:'\e725'}.icon-clock-fast:before{content:'\e726'}.icon-clock:before{content:'\e727'}.icon-close-circle-outline:before{content:'\e728'}.icon-close-circle:before{content:'\e729'}.icon-close-network:before{content:'\e72a'}.icon-close:before{content:'\e72b'}.icon-closed-caption:before{content:'\e72c'}.icon-cloud-check:before{content:'\e72d'}.icon-cloud-circle:before{content:'\e72e'}.icon-cloud-download:before{content:'\e72f'}.icon-cloud-outline-off:before{content:'\e730'}.icon-cloud-outline:before{content:'\e731'}.icon-cloud-upload:before{content:'\e732'}.icon-cloud:before{content:'\e733'}.icon-code-array:before{content:'\e734'}.icon-code-braces:before{content:'\e735'}.icon-code-equal:before{content:'\e736'}.icon-code-greater-than-or-equal:before{content:'\e737'}.icon-code-greater-than:before{content:'\e738'}.icon-code-less-than-or-equal:before{content:'\e739'}.icon-code-less-than:before{content:'\e73a'}.icon-code-not-equal-variant:before{content:'\e73b'}.icon-code-not-equal:before{content:'\e73c'}.icon-code-string:before{content:'\e73d'}.icon-code-tags:before{content:'\e73e'}.icon-codepen:before{content:'\e73f'}.icon-coffee-to-go:before{content:'\e740'}.icon-coffee:before{content:'\e741'}.icon-cog-box:before{content:'\e742'}.icon-cog:before{content:'\e743'}.icon-coin:before{content:'\e744'}.icon-color-helper:before{content:'\e745'}.icon-comment-account-outline:before{content:'\e746'}.icon-comment-account:before{content:'\e747'}.icon-comment-alert-outline:before{content:'\e748'}.icon-comment-alert:before{content:'\e749'}.icon-comment-check-outline:before{content:'\e74a'}.icon-comment-check:before{content:'\e74b'}.icon-comment-multipe-outline:before{content:'\e74c'}.icon-comment-outline:before{content:'\e74d'}.icon-comment-plus-outline:before{content:'\e74e'}.icon-comment-processing-outline:before{content:'\e74f'}.icon-comment-processing:before{content:'\e750'}.icon-comment-remove-outline:before{content:'\e751'}.icon-comment-text-outline:before{content:'\e752'}.icon-comment-text:before{content:'\e753'}.icon-comment:before{content:'\e754'}.icon-compare:before{content:'\e755'}.icon-compass-outline:before{content:'\e756'}.icon-compass:before{content:'\e757'}.icon-console:before{content:'\e758'}.icon-content-copy:before{content:'\e759'}.icon-content-cut:before{content:'\e75a'}.icon-content-duplicate:before{content:'\e75b'}.icon-content-paste:before{content:'\e75c'}.icon-content-save-all:before{content:'\e75d'}.icon-content-save:before{content:'\e75e'}.icon-contrast-box:before{content:'\e75f'}.icon-contrast-circle:before{content:'\e760'}.icon-contrast:before{content:'\e761'}.icon-controller-xbox:before{content:'\e762'}.icon-cow:before{content:'\e763'}.icon-credit-card-multiple:before{content:'\e764'}.icon-credit-card:before{content:'\e765'}.icon-crop-free:before{content:'\e766'}.icon-crop-landscape:before{content:'\e767'}.icon-crop-portrait:before{content:'\e768'}.icon-crop-square:before{content:'\e769'}.icon-crop:before{content:'\e76a'}.icon-crosshairs-gps:before{content:'\e76b'}.icon-crosshairs:before{content:'\e76c'}.icon-crown:before{content:'\e76d'}.icon-cube-outline:before{content:'\e76e'}.icon-cube-unfolded:before{content:'\e76f'}.icon-cube:before{content:'\e770'}.icon-cup-water:before{content:'\e771'}.icon-cup:before{content:'\e772'}.icon-currency-btc:before{content:'\e773'}.icon-currency-eur:before{content:'\e774'}.icon-currency-gbp:before{content:'\e775'}.icon-currency-inr:before{content:'\e776'}.icon-currency-rub:before{content:'\e777'}.icon-currency-try:before{content:'\e778'}.icon-currency-usd:before{content:'\e779'}.icon-cursor-default-outline:before{content:'\e77a'}.icon-cursor-default:before{content:'\e77b'}.icon-cursor-move:before{content:'\e77c'}.icon-cursor-pointer:before{content:'\e77d'}.icon-data:before{content:'\e77e'}.icon-debug-step-into:before{content:'\e77f'}.icon-debug-step-out:before{content:'\e780'}.icon-debug-step-over:before{content:'\e781'}.icon-decimal-decrease:before{content:'\e782'}.icon-decimal-increase:before{content:'\e783'}.icon-delete-variant:before{content:'\e784'}.icon-delete:before{content:'\e785'}.icon-deskphone:before{content:'\e786'}.icon-desktop-mac:before{content:'\e787'}.icon-desktop-tower:before{content:'\e788'}.icon-details:before{content:'\e789'}.icon-deviantart:before{content:'\e78a'}.icon-diamond:before{content:'\e78b'}.icon-dice-1:before{content:'\e78c'}.icon-dice-2:before{content:'\e78d'}.icon-dice-3:before{content:'\e78e'}.icon-dice-4:before{content:'\e78f'}.icon-dice-5:before{content:'\e790'}.icon-dice-6:before{content:'\e791'}.icon-dice:before{content:'\e792'}.icon-directions:before{content:'\e793'}.icon-disk-alert:before{content:'\e794'}.icon-disqus-outline:before{content:'\e795'}.icon-disqus:before{content:'\e796'}.icon-division-box:before{content:'\e797'}.icon-division:before{content:'\e798'}.icon-dns:before{content:'\e799'}.icon-document:before{content:'\e79a'}.icon-domain:before{content:'\e79b'}.icon-dots-horizontal:before{content:'\e79c'}.icon-dots-vertical:before{content:'\e79d'}.icon-download:before{content:'\e79e'}.icon-drag-horizontal:before{content:'\e79f'}.icon-drag-vertical:before{content:'\e7a0'}.icon-drag:before{content:'\e7a1'}.icon-drawing-box:before{content:'\e7a2'}.icon-drawing:before{content:'\e7a3'}.icon-dribbble-box:before{content:'\e7a4'}.icon-dribbble:before{content:'\e7a5'}.icon-drone:before{content:'\e7a6'}.icon-dropbox:before{content:'\e7a7'}.icon-drupal:before{content:'\e7a8'}.icon-duck:before{content:'\e7a9'}.icon-dumbbell:before{content:'\e7aa'}.icon-earth-off:before{content:'\e7ab'}.icon-earth:before{content:'\e7ac'}.icon-ebay:before{content:'\e7ad'}.icon-edge:before{content:'\e7ae'}.icon-eject:before{content:'\e7af'}.icon-elevation-decline:before{content:'\e7b0'}.icon-elevation-rise:before{content:'\e7b1'}.icon-elevator:before{content:'\e7b2'}.icon-email-open:before{content:'\e7b3'}.icon-email-secure:before{content:'\e7b4'}.icon-email:before{content:'\e7b5'}.icon-emoticon-cool:before{content:'\e7b6'}.icon-emoticon-devil:before{content:'\e7b7'}.icon-emoticon-happy:before{content:'\e7b8'}.icon-emoticon-neutral:before{content:'\e7b9'}.icon-emoticon-poop:before{content:'\e7ba'}.icon-emoticon-sad:before{content:'\e7bb'}.icon-emoticon-tongue:before{content:'\e7bc'}.icon-emoticon:before{content:'\e7bd'}.icon-engine-outline:before{content:'\e7be'}.icon-engine:before{content:'\e7bf'}.icon-equal-box:before{content:'\e7c0'}.icon-equal:before{content:'\e7c1'}.icon-eraser:before{content:'\e7c2'}.icon-escalator:before{content:'\e7c3'}.icon-etsy:before{content:'\e7c4'}.icon-evernote:before{content:'\e7c5'}.icon-exclamation:before{content:'\e7c6'}.icon-exit-to-app:before{content:'\e7c7'}.icon-export:before{content:'\e7c8'}.icon-eye-off:before{content:'\e7c9'}.icon-eye:before{content:'\e7ca'}.icon-eyedropper-variant:before{content:'\e7cb'}.icon-eyedropper:before{content:'\e7cc'}.icon-facebook-box:before{content:'\e7cd'}.icon-facebook:before{content:'\e7ce'}.icon-factory:before{content:'\e7cf'}.icon-fan:before{content:'\e7d0'}.icon-fast-forward:before{content:'\e7d1'}.icon-ferry:before{content:'\e7d2'}.icon-file-cloud:before{content:'\e7d3'}.icon-file-delimited:before{content:'\e7d4'}.icon-file-document-box:before{content:'\e7d5'}.icon-file-document:before{content:'\e7d6'}.icon-file-excel-box:before{content:'\e7d7'}.icon-file-excel:before{content:'\e7d8'}.icon-file-find:before{content:'\e7d9'}.icon-file-hidden:before{content:'\e7da'}.icon-file-image-box:before{content:'\e7db'}.icon-file-image:before{content:'\e7dc'}.icon-file-multiple:before{content:'\e7dd'}.icon-file-music:before{content:'\e7de'}.icon-file-outline:before{content:'\e7df'}.icon-file-pdf-box:before{content:'\e7e0'}.icon-file-pdf:before{content:'\e7e1'}.icon-file-powerpoint-box:before{content:'\e7e2'}.icon-file-powerpoint:before{content:'\e7e3'}.icon-file-presentation-box:before{content:'\e7e4'}.icon-file-video:before{content:'\e7e5'}.icon-file-word-box:before{content:'\e7e6'}.icon-file-word:before{content:'\e7e7'}.icon-file-xml:before{content:'\e7e8'}.icon-file:before{content:'\e7e9'}.icon-fill:before{content:'\e7ea'}.icon-film:before{content:'\e7eb'}.icon-filmstrip-off:before{content:'\e7ec'}.icon-filmstrip:before{content:'\e7ed'}.icon-filter-outline:before{content:'\e7ee'}.icon-filter-remove-outline:before{content:'\e7ef'}.icon-filter-remove:before{content:'\e7f0'}.icon-filter-variant:before{content:'\e7f1'}.icon-filter:before{content:'\e7f2'}.icon-fire:before{content:'\e7f3'}.icon-fish:before{content:'\e7f4'}.icon-flag-checkered-variant:before{content:'\e7f5'}.icon-flag-checkered:before{content:'\e7f6'}.icon-flag-outline-variant:before{content:'\e7f7'}.icon-flag-outline:before{content:'\e7f8'}.icon-flag-triangle:before{content:'\e7f9'}.icon-flag-variant:before{content:'\e7fa'}.icon-flag:before{content:'\e7fb'}.icon-flash-auto:before{content:'\e7fc'}.icon-flash-off:before{content:'\e7fd'}.icon-flash:before{content:'\e7fe'}.icon-flashlight-off:before{content:'\e7ff'}.icon-flashlight:before{content:'\e800'}.icon-flattr:before{content:'\e801'}.icon-flickr-after:before{content:'\e802'}.icon-flickr-before:before{content:'\e803'}.icon-flip-to-back:before{content:'\e804'}.icon-flip-to-front:before{content:'\e805'}.icon-floppy:before{content:'\e806'}.icon-flower:before{content:'\e807'}.icon-folder-account:before{content:'\e808'}.icon-folder-download:before{content:'\e809'}.icon-folder-google-drive:before{content:'\e80a'}.icon-folder-image:before{content:'\e80b'}.icon-folder-lock-open:before{content:'\e80c'}.icon-folder-lock:before{content:'\e80d'}.icon-folder-move:before{content:'\e80e'}.icon-folder-multiple-image:before{content:'\e80f'}.icon-folder-multiple-outline:before{content:'\e810'}.icon-folder-multiple:before{content:'\e811'}.icon-folder-outline-lock:before{content:'\e812'}.icon-folder-outline:before{content:'\e813'}.icon-folder-plus:before{content:'\e814'}.icon-folder-remove:before{content:'\e815'}.icon-folder-upload:before{content:'\e816'}.icon-folder:before{content:'\e817'}.icon-food-apple:before{content:'\e818'}.icon-food-variant:before{content:'\e819'}.icon-food:before{content:'\e81a'}.icon-football-helmet:before{content:'\e81b'}.icon-football:before{content:'\e81c'}.icon-format-align-center:before{content:'\e81d'}.icon-format-align-justify:before{content:'\e81e'}.icon-format-align-left:before{content:'\e81f'}.icon-format-align-right:before{content:'\e820'}.icon-format-bold:before{content:'\e821'}.icon-format-clear:before{content:'\e822'}.icon-format-color-fill:before{content:'\e823'}.icon-format-color:before{content:'\e824'}.icon-format-float-center:before{content:'\e825'}.icon-format-float-left:before{content:'\e826'}.icon-format-float-none:before{content:'\e827'}.icon-format-float-right:before{content:'\e828'}.icon-format-header-1:before{content:'\e829'}.icon-format-header-2:before{content:'\e82a'}.icon-format-header-3:before{content:'\e82b'}.icon-format-header-4:before{content:'\e82c'}.icon-format-header-5:before{content:'\e82d'}.icon-format-header-6:before{content:'\e82e'}.icon-format-header-decrease:before{content:'\e82f'}.icon-format-header-down:before{content:'\e830'}.icon-format-header-equal:before{content:'\e831'}.icon-format-header-increase:before{content:'\e832'}.icon-format-header-pound:before{content:'\e833'}.icon-format-header-up:before{content:'\e834'}.icon-format-indent-decrease:before{content:'\e835'}.icon-format-indent-increase:before{content:'\e836'}.icon-format-italic:before{content:'\e837'}.icon-format-line-spacing:before{content:'\e838'}.icon-format-list-bulleted:before{content:'\e839'}.icon-format-list-numbers:before{content:'\e83a'}.icon-format-object-inline:before{content:'\e83b'}.icon-format-object-square:before{content:'\e83c'}.icon-format-object-tight:before{content:'\e83d'}.icon-format-object-top-bottom:before{content:'\e83e'}.icon-format-paint:before{content:'\e83f'}.icon-format-paragraph:before{content:'\e840'}.icon-format-quote:before{content:'\e841'}.icon-format-size:before{content:'\e842'}.icon-format-strikethrough:before{content:'\e843'}.icon-format-subscript:before{content:'\e844'}.icon-format-superscript:before{content:'\e845'}.icon-format-text:before{content:'\e846'}.icon-format-textdirection-l-to-r:before{content:'\e847'}.icon-format-textdirection-r-to-l:before{content:'\e848'}.icon-format-underline:before{content:'\e849'}.icon-forum:before{content:'\e84a'}.icon-forward:before{content:'\e84b'}.icon-foursquare:before{content:'\e84c'}.icon-fridge:before{content:'\e84d'}.icon-fullscreen-exit:before{content:'\e84e'}.icon-fullscreen:before{content:'\e84f'}.icon-function:before{content:'\e850'}.icon-gamepad-variant:before{content:'\e851'}.icon-gamepad:before{content:'\e852'}.icon-gas-station:before{content:'\e853'}.icon-gavel:before{content:'\e854'}.icon-gender-female:before{content:'\e855'}.icon-gender-male-female:before{content:'\e856'}.icon-gender-male:before{content:'\e857'}.icon-gender-transgender:before{content:'\e858'}.icon-gift:before{content:'\e859'}.icon-git:before{content:'\e85a'}.icon-github-box:before{content:'\e85b'}.icon-github:before{content:'\e85c'}.icon-glass-flute:before{content:'\e85d'}.icon-glass-mug:before{content:'\e85e'}.icon-glass-stange:before{content:'\e85f'}.icon-glass-tulip:before{content:'\e860'}.icon-glasses:before{content:'\e861'}.icon-gmail:before{content:'\e862'}.icon-google-chrome:before{content:'\e863'}.icon-google-circles-communities:before{content:'\e864'}.icon-google-circles-extended:before{content:'\e865'}.icon-google-circles-invite:before{content:'\e866'}.icon-google-circles:before{content:'\e867'}.icon-google-controller-off:before{content:'\e868'}.icon-google-controller:before{content:'\e869'}.icon-google-drive:before{content:'\e86a'}.icon-google-earth:before{content:'\e86b'}.icon-google-glass:before{content:'\e86c'}.icon-google-maps:before{content:'\e86d'}.icon-google-pages:before{content:'\e86e'}.icon-google-play:before{content:'\e86f'}.icon-google-plus-box:before{content:'\e870'}.icon-google-plus:before{content:'\e871'}.icon-google:before{content:'\e872'}.icon-grid-off:before{content:'\e873'}.icon-grid:before{content:'\e874'}.icon-group:before{content:'\e875'}.icon-hand-pointing-right:before{content:'\e876'}.icon-hanger:before{content:'\e877'}.icon-hangouts:before{content:'\e878'}.icon-harddisk:before{content:'\e879'}.icon-headphones-box:before{content:'\e87a'}.icon-headphones-dots:before{content:'\e87b'}.icon-headphones:before{content:'\e87c'}.icon-headset-dock:before{content:'\e87d'}.icon-headset-off:before{content:'\e87e'}.icon-headset:before{content:'\e87f'}.icon-heart-box-outline:before{content:'\e880'}.icon-heart-box:before{content:'\e881'}.icon-heart-broken:before{content:'\e882'}.icon-heart-outline:before{content:'\e883'}.icon-heart:before{content:'\e884'}.icon-help-circle:before{content:'\e885'}.icon-help:before{content:'\e886'}.icon-hexagon-outline:before{content:'\e887'}.icon-hexagon:before{content:'\e888'}.icon-history:before{content:'\e889'}.icon-hololens:before{content:'\e88a'}.icon-home-modern:before{content:'\e88b'}.icon-home-variant:before{content:'\e88c'}.icon-home:before{content:'\e88d'}.icon-hops:before{content:'\e88e'}.icon-hospital-building:before{content:'\e88f'}.icon-hospital-marker:before{content:'\e890'}.icon-hospital:before{content:'\e891'}.icon-hotel:before{content:'\e892'}.icon-houzz-box:before{content:'\e893'}.icon-human-child:before{content:'\e894'}.icon-human-male-female:before{content:'\e895'}.icon-human:before{content:'\e896'}.icon-image-album:before{content:'\e897'}.icon-image-area-close:before{content:'\e898'}.icon-image-area:before{content:'\e899'}.icon-image-broken:before{content:'\e89a'}.icon-image-filter-black-white:before{content:'\e89b'}.icon-image-filter-center-focus:before{content:'\e89c'}.icon-image-filter-drama:before{content:'\e89d'}.icon-image-filter-frames:before{content:'\e89e'}.icon-image-filter-hdr:before{content:'\e89f'}.icon-image-filter-none:before{content:'\e8a0'}.icon-image-filter-tilt-shift:before{content:'\e8a1'}.icon-image-filter-vintage:before{content:'\e8a2'}.icon-image-filter:before{content:'\e8a3'}.icon-image:before{content:'\e8a4'}.icon-import:before{content:'\e8a5'}.icon-inbox:before{content:'\e8a6'}.icon-indent:before{content:'\e8a7'}.icon-information-outline:before{content:'\e8a8'}.icon-information:before{content:'\e8a9'}.icon-instagram:before{content:'\e8aa'}.icon-instapaper:before{content:'\e8ab'}.icon-internet-explorer:before{content:'\e8ac'}.icon-invert-colors:before{content:'\e8ad'}.icon-jira:before{content:'\e8ae'}.icon-jsfiddle:before{content:'\e8af'}.icon-keg:before{content:'\e8b0'}.icon-key-change:before{content:'\e8b1'}.icon-key-minus:before{content:'\e8b2'}.icon-key-plus:before{content:'\e8b3'}.icon-key-remove:before{content:'\e8b4'}.icon-key-variant:before{content:'\e8b5'}.icon-key:before{content:'\e8b6'}.icon-keyboard-backspace:before{content:'\e8b7'}.icon-keyboard-caps:before{content:'\e8b8'}.icon-keyboard-close:before{content:'\e8b9'}.icon-keyboard-off:before{content:'\e8ba'}.icon-keyboard-return:before{content:'\e8bb'}.icon-keyboard-tab:before{content:'\e8bc'}.icon-keyboard-variant:before{content:'\e8bd'}.icon-keyboard:before{content:'\e8be'}.icon-label-outline:before{content:'\e8bf'}.icon-label:before{content:'\e8c0'}.icon-language-csharp:before{content:'\e8c1'}.icon-language-css3:before{content:'\e8c2'}.icon-language-html5:before{content:'\e8c3'}.icon-language-javascript:before{content:'\e8c4'}.icon-language-python-text:before{content:'\e8c5'}.icon-language-python:before{content:'\e8c6'}.icon-laptop-chromebook:before{content:'\e8c7'}.icon-laptop-mac:before{content:'\e8c8'}.icon-laptop-windows:before{content:'\e8c9'}.icon-laptop:before{content:'\e8ca'}.icon-lastfm:before{content:'\e8cb'}.icon-launch:before{content:'\e8cc'}.icon-layers-off:before{content:'\e8cd'}.icon-layers:before{content:'\e8ce'}.icon-leaf:before{content:'\e8cf'}.icon-library-books:before{content:'\e8d0'}.icon-library-music:before{content:'\e8d1'}.icon-library-plus:before{content:'\e8d2'}.icon-library:before{content:'\e8d3'}.icon-lightbulb-outline:before{content:'\e8d4'}.icon-lightbulb:before{content:'\e8d5'}.icon-link-off:before{content:'\e8d6'}.icon-link-variant-off:before{content:'\e8d7'}.icon-link-variant:before{content:'\e8d8'}.icon-link:before{content:'\e8d9'}.icon-linkedin-box:before{content:'\e8da'}.icon-linkedin:before{content:'\e8db'}.icon-linode:before{content:'\e8dc'}.icon-linux:before{content:'\e8dd'}.icon-lock-outline:before{content:'\e8de'}.icon-lock-unlocked-outline:before{content:'\e8df'}.icon-lock-unlocked:before{content:'\e8e0'}.icon-lock:before{content:'\e8e1'}.icon-login:before{content:'\e8e2'}.icon-logout:before{content:'\e8e3'}.icon-looks:before{content:'\e8e4'}.icon-loupe:before{content:'\e8e5'}.icon-lumx:before{content:'\e8e6'}.icon-magnet-on:before{content:'\e8e7'}.icon-magnet:before{content:'\e8e8'}.icon-magnify-minus:before{content:'\e8e9'}.icon-magnify-plus:before{content:'\e8ea'}.icon-magnify:before{content:'\e8eb'}.icon-mail-ru:before{content:'\e8ec'}.icon-map-marker-circle:before{content:'\e8ed'}.icon-map-marker-multiple:before{content:'\e8ee'}.icon-map-marker-off:before{content:'\e8ef'}.icon-map-marker-radius:before{content:'\e8f0'}.icon-map-marker:before{content:'\e8f1'}.icon-map:before{content:'\e8f2'}.icon-margin:before{content:'\e8f3'}.icon-markdown:before{content:'\e8f4'}.icon-marker-check:before{content:'\e8f5'}.icon-martini:before{content:'\e8f6'}.icon-material-ui:before{content:'\e8f7'}.icon-maxcdn:before{content:'\e8f8'}.icon-medium:before{content:'\e8f9'}.icon-memory:before{content:'\e8fa'}.icon-menu-down:before{content:'\e8fb'}.icon-menu-left:before{content:'\e8fc'}.icon-menu-right:before{content:'\e8fd'}.icon-menu-up:before{content:'\e8fe'}.icon-menu:before{content:'\e8ff'}.icon-message-alert:before{content:'\e900'}.icon-message-draw:before{content:'\e901'}.icon-message-image:before{content:'\e902'}.icon-message-processing:before{content:'\e903'}.icon-message-reply:before{content:'\e904'}.icon-message-text-outline:before{content:'\e905'}.icon-message-text:before{content:'\e906'}.icon-message-video:before{content:'\e907'}.icon-message:before{content:'\e908'}.icon-microphone-dots:before{content:'\e909'}.icon-microphone-off:before{content:'\e90a'}.icon-microphone-outline:before{content:'\e90b'}.icon-microphone-settings:before{content:'\e90c'}.icon-microphone-variant-off:before{content:'\e90d'}.icon-microphone-variant:before{content:'\e90e'}.icon-microphone:before{content:'\e90f'}.icon-minus-box:before{content:'\e910'}.icon-minus-circle-outline:before{content:'\e911'}.icon-minus-circle:before{content:'\e912'}.icon-minus-network:before{content:'\e913'}.icon-minus:before{content:'\e914'}.icon-monitor-multiple:before{content:'\e915'}.icon-monitor:before{content:'\e916'}.icon-more:before{content:'\e917'}.icon-mouse-off:before{content:'\e918'}.icon-mouse-variant-off:before{content:'\e919'}.icon-mouse-variant:before{content:'\e91a'}.icon-mouse:before{content:'\e91b'}.icon-movie:before{content:'\e91c'}.icon-multiplication-box:before{content:'\e91d'}.icon-multiplication:before{content:'\e91e'}.icon-music-box-outline:before{content:'\e91f'}.icon-music-box:before{content:'\e920'}.icon-music-circle:before{content:'\e921'}.icon-music-note-eighth:before{content:'\e922'}.icon-music-note-half:before{content:'\e923'}.icon-music-note-off:before{content:'\e924'}.icon-music-note-quarter:before{content:'\e925'}.icon-music-note-sixteenth:before{content:'\e926'}.icon-music-note-whole:before{content:'\e927'}.icon-music-note:before{content:'\e928'}.icon-nature-people:before{content:'\e929'}.icon-nature:before{content:'\e92a'}.icon-navigation:before{content:'\e92b'}.icon-needle:before{content:'\e92c'}.icon-nest-protect:before{content:'\e92d'}.icon-nest-thermostat:before{content:'\e92e'}.icon-newspaper:before{content:'\e92f'}.icon-nfc-tap:before{content:'\e930'}.icon-nfc-variant:before{content:'\e931'}.icon-nfc:before{content:'\e932'}.icon-no:before{content:'\e933'}.icon-not-equal:before{content:'\e934'}.icon-note-outline:before{content:'\e935'}.icon-note-text:before{content:'\e936'}.icon-note:before{content:'\e937'}.icon-numeric-0-box-multiple-outline:before{content:'\e938'}.icon-numeric-0-box-outline:before{content:'\e939'}.icon-numeric-0-box:before{content:'\e93a'}.icon-numeric-1-box-multiple-outline:before{content:'\e93b'}.icon-numeric-1-box-outline:before{content:'\e93c'}.icon-numeric-1-box:before{content:'\e93d'}.icon-numeric-2-box-multiple-outline:before{content:'\e93e'}.icon-numeric-2-box-outline:before{content:'\e93f'}.icon-numeric-2-box:before{content:'\e940'}.icon-numeric-3-box-multiple-outline:before{content:'\e941'}.icon-numeric-3-box-outline:before{content:'\e942'}.icon-numeric-3-box:before{content:'\e943'}.icon-numeric-4-box-multiple-outline:before{content:'\e944'}.icon-numeric-4-box-outline:before{content:'\e945'}.icon-numeric-4-box:before{content:'\e946'}.icon-numeric-5-box-multiple-outline:before{content:'\e947'}.icon-numeric-5-box-outline:before{content:'\e948'}.icon-numeric-5-box:before{content:'\e949'}.icon-numeric-6-box-multiple-outline:before{content:'\e94a'}.icon-numeric-6-box-outline:before{content:'\e94b'}.icon-numeric-6-box:before{content:'\e94c'}.icon-numeric-7-box-multiple-outline:before{content:'\e94d'}.icon-numeric-7-box-outline:before{content:'\e94e'}.icon-numeric-7-box:before{content:'\e94f'}.icon-numeric-8-box-multiple-outline:before{content:'\e950'}.icon-numeric-8-box-outline:before{content:'\e951'}.icon-numeric-8-box:before{content:'\e952'}.icon-numeric-9-box-multiple-outline:before{content:'\e953'}.icon-numeric-9-box-outline:before{content:'\e954'}.icon-numeric-9-box:before{content:'\e955'}.icon-numeric-9-plus-box-multiple-outline:before{content:'\e956'}.icon-numeric-9-plus-box-outline:before{content:'\e957'}.icon-numeric-9-plus-box:before{content:'\e958'}.icon-numeric:before{content:'\e959'}.icon-nutriton:before{content:'\e95a'}.icon-odnoklassniki:before{content:'\e95b'}.icon-office:before{content:'\e95c'}.icon-oil:before{content:'\e95d'}.icon-omega:before{content:'\e95e'}.icon-onedrive:before{content:'\e95f'}.icon-open-in-app:before{content:'\e960'}.icon-open-in-new:before{content:'\e961'}.icon-ornament-variant:before{content:'\e962'}.icon-ornament:before{content:'\e963'}.icon-outbox:before{content:'\e964'}.icon-outdent:before{content:'\e965'}.icon-owl:before{content:'\e966'}.icon-package-down:before{content:'\e967'}.icon-package-up:before{content:'\e968'}.icon-package-variant-closed:before{content:'\e969'}.icon-package-variant:before{content:'\e96a'}.icon-package:before{content:'\e96b'}.icon-palette-advanced:before{content:'\e96c'}.icon-palette:before{content:'\e96d'}.icon-panda:before{content:'\e96e'}.icon-pandora:before{content:'\e96f'}.icon-panorama-fisheye:before{content:'\e970'}.icon-panorama-horizontal:before{content:'\e971'}.icon-panorama-vertical:before{content:'\e972'}.icon-panorama-wide-angle:before{content:'\e973'}.icon-panorama:before{content:'\e974'}.icon-paper-cut-vertical:before{content:'\e975'}.icon-paperclip:before{content:'\e976'}.icon-parking:before{content:'\e977'}.icon-pause-circle-outline:before{content:'\e978'}.icon-pause-circle:before{content:'\e979'}.icon-pause-octagon-outline:before{content:'\e97a'}.icon-pause-octagon:before{content:'\e97b'}.icon-pause:before{content:'\e97c'}.icon-paw:before{content:'\e97d'}.icon-pen:before{content:'\e97e'}.icon-pencil-box-outline:before{content:'\e97f'}.icon-pencil-box:before{content:'\e980'}.icon-pencil:before{content:'\e981'}.icon-people:before{content:'\e982'}.icon-percent:before{content:'\e983'}.icon-person-box:before{content:'\e984'}.icon-person-minus:before{content:'\e985'}.icon-person-plus:before{content:'\e986'}.icon-pharmacy:before{content:'\e987'}.icon-phone-bluetooth:before{content:'\e988'}.icon-phone-dots:before{content:'\e989'}.icon-phone-forward:before{content:'\e98a'}.icon-phone-hangup:before{content:'\e98b'}.icon-phone-in-talk:before{content:'\e98c'}.icon-phone-incoming:before{content:'\e98d'}.icon-phone-locked:before{content:'\e98e'}.icon-phone-log:before{content:'\e98f'}.icon-phone-missed:before{content:'\e990'}.icon-phone-outgoing:before{content:'\e991'}.icon-phone-paused:before{content:'\e992'}.icon-phone:before{content:'\e993'}.icon-picture:before{content:'\e994'}.icon-pig:before{content:'\e995'}.icon-pill:before{content:'\e996'}.icon-pin-off:before{content:'\e997'}.icon-pin:before{content:'\e998'}.icon-pine-tree-box:before{content:'\e999'}.icon-pine-tree:before{content:'\e99a'}.icon-pinterest-box:before{content:'\e99b'}.icon-pinterest:before{content:'\e99c'}.icon-pizza:before{content:'\e99d'}.icon-plane:before{content:'\e99e'}.icon-play-box-outline:before{content:'\e99f'}.icon-play-circle-outline:before{content:'\e9a0'}.icon-play-circle:before{content:'\e9a1'}.icon-play:before{content:'\e9a2'}.icon-playlist-minus:before{content:'\e9a3'}.icon-playlist-plus:before{content:'\e9a4'}.icon-playstation:before{content:'\e9a5'}.icon-plus-box:before{content:'\e9a6'}.icon-plus-circle-outline:before{content:'\e9a7'}.icon-plus-circle:before{content:'\e9a8'}.icon-plus-network:before{content:'\e9a9'}.icon-plus-one:before{content:'\e9aa'}.icon-plus:before{content:'\e9ab'}.icon-pocket:before{content:'\e9ac'}.icon-poll-box:before{content:'\e9ad'}.icon-poll:before{content:'\e9ae'}.icon-polymer:before{content:'\e9af'}.icon-popcorn:before{content:'\e9b0'}.icon-pound-box:before{content:'\e9b1'}.icon-pound:before{content:'\e9b2'}.icon-power-settings:before{content:'\e9b3'}.icon-power-socket:before{content:'\e9b4'}.icon-power:before{content:'\e9b5'}.icon-presentation-play:before{content:'\e9b6'}.icon-presentation:before{content:'\e9b7'}.icon-printer-3d:before{content:'\e9b8'}.icon-printer:before{content:'\e9b9'}.icon-pulse:before{content:'\e9ba'}.icon-puzzle:before{content:'\e9bb'}.icon-qrcode:before{content:'\e9bc'}.icon-quadcopter:before{content:'\e9bd'}.icon-quality-high:before{content:'\e9be'}.icon-question-mark-circle:before{content:'\e9bf'}.icon-quick-reply:before{content:'\e9c0'}.icon-quicktime:before{content:'\e9c1'}.icon-rabbit:before{content:'\e9c2'}.icon-radiator:before{content:'\e9c3'}.icon-radio-tower:before{content:'\e9c4'}.icon-radio:before{content:'\e9c5'}.icon-radioactive:before{content:'\e9c6'}.icon-radiobox-blank:before{content:'\e9c7'}.icon-radiobox-marked:before{content:'\e9c8'}.icon-raspberrypi:before{content:'\e9c9'}.icon-rdio:before{content:'\e9ca'}.icon-read:before{content:'\e9cb'}.icon-readability:before{content:'\e9cc'}.icon-receipt:before{content:'\e9cd'}.icon-recycle:before{content:'\e9ce'}.icon-reddit:before{content:'\e9cf'}.icon-redo-variant:before{content:'\e9d0'}.icon-redo:before{content:'\e9d1'}.icon-refresh:before{content:'\e9d2'}.icon-relative-scale:before{content:'\e9d3'}.icon-reload:before{content:'\e9d4'}.icon-remote:before{content:'\e9d5'}.icon-rename-box:before{content:'\e9d6'}.icon-repeat-off:before{content:'\e9d7'}.icon-repeat-once:before{content:'\e9d8'}.icon-repeat:before{content:'\e9d9'}.icon-replay:before{content:'\e9da'}.icon-reply-all:before{content:'\e9db'}.icon-reply:before{content:'\e9dc'}.icon-reproduction:before{content:'\e9dd'}.icon-resize-bottom-right:before{content:'\e9de'}.icon-responsive:before{content:'\e9df'}.icon-restore:before{content:'\e9e0'}.icon-rewind:before{content:'\e9e1'}.icon-ribbon:before{content:'\e9e2'}.icon-road:before{content:'\e9e3'}.icon-rocket:before{content:'\e9e4'}.icon-rotate-3d:before{content:'\e9e5'}.icon-rotate-left-variant:before{content:'\e9e6'}.icon-rotate-left:before{content:'\e9e7'}.icon-rotate-right-variant:before{content:'\e9e8'}.icon-rotate-right:before{content:'\e9e9'}.icon-routes:before{content:'\e9ea'}.icon-rss-box:before{content:'\e9eb'}.icon-ruler:before{content:'\e9ec'}.icon-run:before{content:'\e9ed'}.icon-sale:before{content:'\e9ee'}.icon-satellite-variant:before{content:'\e9ef'}.icon-satellite:before{content:'\e9f0'}.icon-scale-bathroom:before{content:'\e9f1'}.icon-scale:before{content:'\e9f2'}.icon-school:before{content:'\e9f3'}.icon-screen-rotation-lock:before{content:'\e9f4'}.icon-screen-rotation:before{content:'\e9f5'}.icon-script:before{content:'\e9f6'}.icon-security-network:before{content:'\e9f7'}.icon-security:before{content:'\e9f8'}.icon-select-all:before{content:'\e9f9'}.icon-select-inverse:before{content:'\e9fa'}.icon-select-off:before{content:'\e9fb'}.icon-select:before{content:'\e9fc'}.icon-send:before{content:'\e9fd'}.icon-server-minus:before{content:'\e9fe'}.icon-server-network-off:before{content:'\e9ff'}.icon-server-network:before{content:'\ea00'}.icon-server-off:before{content:'\ea01'}.icon-server-plus:before{content:'\ea02'}.icon-server-remove:before{content:'\ea03'}.icon-server-security:before{content:'\ea04'}.icon-server:before{content:'\ea05'}.icon-shape-plus:before{content:'\ea06'}.icon-share-variant:before{content:'\ea07'}.icon-share:before{content:'\ea08'}.icon-shield-outline:before{content:'\ea09'}.icon-shield:before{content:'\ea0a'}.icon-shopping-music:before{content:'\ea0b'}.icon-shopping:before{content:'\ea0c'}.icon-shuffle:before{content:'\ea0d'}.icon-sigma:before{content:'\ea0e'}.icon-sign-caution:before{content:'\ea0f'}.icon-signal:before{content:'\ea10'}.icon-silverware-fork:before{content:'\ea11'}.icon-silverware-spoon:before{content:'\ea12'}.icon-silverware-variant:before{content:'\ea13'}.icon-silverware:before{content:'\ea14'}.icon-sim-alert:before{content:'\ea15'}.icon-sim:before{content:'\ea16'}.icon-sitemap:before{content:'\ea17'}.icon-skip-next:before{content:'\ea18'}.icon-skip-previous:before{content:'\ea19'}.icon-skype-business:before{content:'\ea1a'}.icon-skype:before{content:'\ea1b'}.icon-sleep-off:before{content:'\ea1c'}.icon-sleep:before{content:'\ea1d'}.icon-smoking-off:before{content:'\ea1e'}.icon-smoking:before{content:'\ea1f'}.icon-snapchat:before{content:'\ea20'}.icon-snowman:before{content:'\ea21'}.icon-sofa:before{content:'\ea22'}.icon-sort-alphabetical:before{content:'\ea23'}.icon-sort-ascending:before{content:'\ea24'}.icon-sort-descending:before{content:'\ea25'}.icon-sort-numeric:before{content:'\ea26'}.icon-sort-variant:before{content:'\ea27'}.icon-sort:before{content:'\ea28'}.icon-soundcloud:before{content:'\ea29'}.icon-source-fork:before{content:'\ea2a'}.icon-source-pull:before{content:'\ea2b'}.icon-speaker-off:before{content:'\ea2c'}.icon-speaker:before{content:'\ea2d'}.icon-speedometer:before{content:'\ea2e'}.icon-spellcheck:before{content:'\ea2f'}.icon-spotify:before{content:'\ea30'}.icon-spotlight-beam:before{content:'\ea31'}.icon-spotlight:before{content:'\ea32'}.icon-spreadsheet:before{content:'\ea33'}.icon-square-inc-cash:before{content:'\ea34'}.icon-square-inc:before{content:'\ea35'}.icon-stackoverflow:before{content:'\ea36'}.icon-star-circle:before{content:'\ea37'}.icon-star-half:before{content:'\ea38'}.icon-star-of-david:before{content:'\ea39'}.icon-star-outline:before{content:'\ea3a'}.icon-star:before{content:'\ea3b'}.icon-steam:before{content:'\ea3c'}.icon-stethoscope:before{content:'\ea3d'}.icon-stocking:before{content:'\ea3e'}.icon-stop:before{content:'\ea3f'}.icon-store-24-hour:before{content:'\ea40'}.icon-store:before{content:'\ea41'}.icon-stove:before{content:'\ea42'}.icon-subway:before{content:'\ea43'}.icon-sunglasses:before{content:'\ea44'}.icon-swap-horizontal:before{content:'\ea45'}.icon-swap-vertical:before{content:'\ea46'}.icon-swim:before{content:'\ea47'}.icon-sword:before{content:'\ea48'}.icon-sync-alert:before{content:'\ea49'}.icon-sync-off:before{content:'\ea4a'}.icon-sync:before{content:'\ea4b'}.icon-tab-unselected:before{content:'\ea4c'}.icon-tab:before{content:'\ea4d'}.icon-table-column-plus-after:before{content:'\ea4e'}.icon-table-column-plus-before:before{content:'\ea4f'}.icon-table-column-remove:before{content:'\ea50'}.icon-table-column-width:before{content:'\ea51'}.icon-table-edit:before{content:'\ea52'}.icon-table-large:before{content:'\ea53'}.icon-table-row-height:before{content:'\ea54'}.icon-table-row-plus-after:before{content:'\ea55'}.icon-table-row-plus-before:before{content:'\ea56'}.icon-table-row-remove:before{content:'\ea57'}.icon-table:before{content:'\ea58'}.icon-tablet-android:before{content:'\ea59'}.icon-tablet-ipad:before{content:'\ea5a'}.icon-tablet:before{content:'\ea5b'}.icon-tag-faces:before{content:'\ea5c'}.icon-tag-multiple:before{content:'\ea5d'}.icon-tag-outline:before{content:'\ea5e'}.icon-tag-text-outline:before{content:'\ea5f'}.icon-tag:before{content:'\ea60'}.icon-taxi:before{content:'\ea61'}.icon-teamviewer:before{content:'\ea62'}.icon-telegram:before{content:'\ea63'}.icon-television-guide:before{content:'\ea64'}.icon-television:before{content:'\ea65'}.icon-temperature-celsius:before{content:'\ea66'}.icon-temperature-fahrenheit:before{content:'\ea67'}.icon-temperature-kelvin:before{content:'\ea68'}.icon-tennis:before{content:'\ea69'}.icon-tent:before{content:'\ea6a'}.icon-terrain:before{content:'\ea6b'}.icon-text-to-speech-off:before{content:'\ea6c'}.icon-text-to-speech:before{content:'\ea6d'}.icon-texture:before{content:'\ea6e'}.icon-theater:before{content:'\ea6f'}.icon-theme-light-dark:before{content:'\ea70'}.icon-thermometer-lines:before{content:'\ea71'}.icon-thermometer:before{content:'\ea72'}.icon-thumb-down-outline:before{content:'\ea73'}.icon-thumb-down:before{content:'\ea74'}.icon-thumb-up-outline:before{content:'\ea75'}.icon-thumb-up:before{content:'\ea76'}.icon-thumbs-up-down:before{content:'\ea77'}.icon-ticket-account:before{content:'\ea78'}.icon-ticket:before{content:'\ea79'}.icon-tie:before{content:'\ea7a'}.icon-tile-four:before{content:'\ea7b'}.icon-timelapse:before{content:'\ea7c'}.icon-timer-3:before{content:'\ea7d'}.icon-timer-10:before{content:'\ea7e'}.icon-timer-off:before{content:'\ea7f'}.icon-timer-sand:before{content:'\ea80'}.icon-timer:before{content:'\ea81'}.icon-timetable:before{content:'\ea82'}.icon-toggle-switch-off:before{content:'\ea83'}.icon-toggle-switch-on:before{content:'\ea84'}.icon-tooltip-edit:before{content:'\ea85'}.icon-tooltip-image:before{content:'\ea86'}.icon-tooltip-outline-plus:before{content:'\ea87'}.icon-tooltip-outline:before{content:'\ea88'}.icon-tooltip-text:before{content:'\ea89'}.icon-tooltip:before{content:'\ea8a'}.icon-tor:before{content:'\ea8b'}.icon-traffic-light:before{content:'\ea8c'}.icon-train:before{content:'\ea8d'}.icon-tram:before{content:'\ea8e'}.icon-transcribe-close:before{content:'\ea8f'}.icon-transcribe:before{content:'\ea90'}.icon-transfer:before{content:'\ea91'}.icon-trash:before{content:'\ea92'}.icon-tree:before{content:'\ea93'}.icon-trello:before{content:'\ea94'}.icon-trending-down:before{content:'\ea95'}.icon-trending-neutral:before{content:'\ea96'}.icon-trending-up:before{content:'\ea97'}.icon-truck:before{content:'\ea98'}.icon-tshirt-crew:before{content:'\ea99'}.icon-tshirt-v:before{content:'\ea9a'}.icon-tumblr-reblog:before{content:'\ea9b'}.icon-tumblr:before{content:'\ea9c'}.icon-twitch:before{content:'\ea9d'}.icon-twitter-box:before{content:'\ea9e'}.icon-twitter-circle:before{content:'\ea9f'}.icon-twitter-retweet:before{content:'\eaa0'}.icon-twitter:before{content:'\eaa1'}.icon-ubuntu:before{content:'\eaa2'}.icon-umbrella-outline:before{content:'\eaa3'}.icon-umbrella:before{content:'\eaa4'}.icon-undo-variant:before{content:'\eaa5'}.icon-undo:before{content:'\eaa6'}.icon-unfold-less:before{content:'\eaa7'}.icon-unfold-more:before{content:'\eaa8'}.icon-ungroup:before{content:'\eaa9'}.icon-untappd:before{content:'\eaaa'}.icon-upload:before{content:'\eaab'}.icon-usb:before{content:'\eaac'}.icon-vector-curve:before{content:'\eaad'}.icon-vector-point:before{content:'\eaae'}.icon-vector-square:before{content:'\eaaf'}.icon-verified:before{content:'\eab0'}.icon-vibration:before{content:'\eab1'}.icon-video-off:before{content:'\eab2'}.icon-video-switch:before{content:'\eab3'}.icon-video:before{content:'\eab4'}.icon-view-agenda:before{content:'\eab5'}.icon-view-array:before{content:'\eab6'}.icon-view-carousel:before{content:'\eab7'}.icon-view-column:before{content:'\eab8'}.icon-view-dashboard:before{content:'\eab9'}.icon-view-day:before{content:'\eaba'}.icon-view-headline:before{content:'\eabb'}.icon-view-list:before{content:'\eabc'}.icon-view-module:before{content:'\eabd'}.icon-view-quilt:before{content:'\eabe'}.icon-view-stream:before{content:'\eabf'}.icon-view-week:before{content:'\eac0'}.icon-vimeo:before{content:'\eac1'}.icon-vine:before{content:'\eac2'}.icon-vk-box:before{content:'\eac3'}.icon-vk-circle:before{content:'\eac4'}.icon-vk:before{content:'\eac5'}.icon-voicemail:before{content:'\eac6'}.icon-volume-high:before{content:'\eac7'}.icon-volume-low:before{content:'\eac8'}.icon-volume-medium:before{content:'\eac9'}.icon-volume-off:before{content:'\eaca'}.icon-volume:before{content:'\eacb'}.icon-vpn:before{content:'\eacc'}.icon-walk:before{content:'\eacd'}.icon-wallet-giftcard:before{content:'\eace'}.icon-wallet-membership:before{content:'\eacf'}.icon-wallet-travel:before{content:'\ead0'}.icon-wallet:before{content:'\ead1'}.icon-washing-machine:before{content:'\ead2'}.icon-watch-export:before{content:'\ead3'}.icon-watch-import:before{content:'\ead4'}.icon-watch:before{content:'\ead5'}.icon-water-off:before{content:'\ead6'}.icon-water-pump:before{content:'\ead7'}.icon-water:before{content:'\ead8'}.icon-weather-cloudy:before{content:'\ead9'}.icon-weather-fog:before{content:'\eada'}.icon-weather-hail:before{content:'\eadb'}.icon-weather-lightning:before{content:'\eadc'}.icon-weather-night:before{content:'\eadd'}.icon-weather-partlycloudy:before{content:'\eade'}.icon-weather-pouring:before{content:'\eadf'}.icon-weather-rainy:before{content:'\eae0'}.icon-weather-snowy:before{content:'\eae1'}.icon-weather-sunny:before{content:'\eae2'}.icon-weather-sunset-down:before{content:'\eae3'}.icon-weather-sunset-up:before{content:'\eae4'}.icon-weather-sunset:before{content:'\eae5'}.icon-weather-windy-variant:before{content:'\eae6'}.icon-weather-windy:before{content:'\eae7'}.icon-web:before{content:'\eae8'}.icon-webcam:before{content:'\eae9'}.icon-weight-kilogram:before{content:'\eaea'}.icon-weight:before{content:'\eaeb'}.icon-whatsapp:before{content:'\eaec'}.icon-wheelchair-accessibility:before{content:'\eaed'}.icon-white-balance-auto:before{content:'\eaee'}.icon-white-balance-incandescent:before{content:'\eaef'}.icon-white-balance-irradescent:before{content:'\eaf0'}.icon-white-balance-sunny:before{content:'\eaf1'}.icon-wifi:before{content:'\eaf2'}.icon-wii:before{content:'\eaf3'}.icon-wikipedia:before{content:'\eaf4'}.icon-window-close:before{content:'\eaf5'}.icon-window-closed:before{content:'\eaf6'}.icon-window-maximize:before{content:'\eaf7'}.icon-window-minimize:before{content:'\eaf8'}.icon-window-open:before{content:'\eaf9'}.icon-window-restore:before{content:'\eafa'}.icon-windows:before{content:'\eafb'}.icon-wordpress:before{content:'\eafc'}.icon-worker:before{content:'\eafd'}.icon-wunderlist:before{content:'\eafe'}.icon-xbox-controller-off:before{content:'\eaff'}.icon-xbox-controller:before{content:'\eb00'}.icon-xbox:before{content:'\eb01'}.icon-xda:before{content:'\eb02'}.icon-xml:before{content:'\eb03'}.icon-yeast:before{content:'\eb04'}.icon-yelp:before{content:'\eb05'}.icon-youtube-play:before{content:'\eb06'}.icon-youtube:before{content:'\eb07'}.icon-zip-box:before{content:'\eb08'}.avatar{width:40px;min-width:40px;height:40px;line-height:40px;margin:0 8px 0 0;border-radius:50%;font-size:17px;font-weight:500;text-align:center;color:#fff}.avatar.square{border-radius:0}.avatar.small{width:20px;min-width:20px;height:20px;line-height:20px}.avatar.big{width:72px;min-width:72px;height:72px;line-height:72px}.avatar.huge{width:96px;min-width:96px;height:96px;line-height:96px}.form-wrapper{background:#fff;padding:16px}.form-wrapper .form-title{font-size:21px;padding:8px 0}.navigation-simple .item{position:relative;cursor:pointer;text-align:left;margin:0;padding:0 24px;text-transform:none;line-height:48px;max-height:48px;height:48px}.navigation-simple .item md-icon{margin:0 16px 0 0}.navigation-simple .item .title{font-size:13px;font-weight:500;line-height:1}.navigation-simple .item.selected{background-color:rgba(0,0,0,.06)}.navigation-simple .subheader{font-size:13px;border-top:1px solid rgba(0,0,0,.12);font-weight:500;margin-top:8px}.navigation-simple .subheader.light{border-top:1px solid rgba(255,255,255,.12)}.navigation-simple md-divider{margin:8px 0}.simple-pagination{position:relative;display:inline-flex;flex-direction:row;box-shadow:0 1px 3px 0 rgba(0,0,0,.2),0 1px 1px 0 rgba(0,0,0,.14),0 2px 1px -1px rgba(0,0,0,.12);background-color:#fff;padding:0 8px}.simple-pagination .pagination-item{min-width:48px;min-height:56px;line-height:56px;border-radius:0;margin:0;font-weight:400;color:rgba(0,0,0,.54)}.simple-pagination .pagination-item:hover{color:rgba(0,0,0,.87)}.simple-pagination .pagination-item.active{cursor:default;color:rgba(0,0,0,.87)}.simple-pagination .pagination-item.disabled{cursor:default;color:rgba(0,0,0,.26)}.price-tables .price-table{position:relative;background-color:#fff;width:280px;border-radius:2px;margin:24px 24px 0 0;overflow:hidden}.price-tables .price-table.style-1 .package-type{font-size:17px;padding:16px 24px}.price-tables .price-table.style-1 .package-type .sale{font-size:13px;font-weight:600}.price-tables .price-table.style-1 .price{padding:32px 32px 16px 32px}.price-tables .price-table.style-1 .price .currency{padding-right:4px;font-size:24px;font-weight:500;color:rgba(0,0,0,.54)}.price-tables .price-table.style-1 .price .value{font-size:72px;font-weight:300;line-height:1}.price-tables .price-table.style-1 .price .period{padding:0 0 5px 4px;font-size:17px;color:rgba(0,0,0,.54)}.price-tables .price-table.style-1 md-divider{margin:16px 32px}.price-tables .price-table.style-1 .terms{padding:16px 32px;font-size:15px}.price-tables .price-table.style-1 .cta-button{margin:16px auto 32px auto;width:128px}.price-tables .price-table.style-2 .badge{position:absolute;top:0;left:50%;transform:translateX(-50%);font-size:11px;font-weight:500;padding:6px 8px}.price-tables .price-table.style-2 .package-type{padding:48px 32px 24px 32px;font-size:20px;font-weight:500;text-align:center}.price-tables .price-table.style-2 .price{padding:0 32px 8px 32px}.price-tables .price-table.style-2 .price .currency{padding-right:4px;font-size:24px;font-weight:500;color:rgba(0,0,0,.54)}.price-tables .price-table.style-2 .price .value{font-size:56px;font-weight:300;line-height:1}.price-tables .price-table.style-2 .period{padding:0 32px;font-size:15px;font-weight:500;color:rgba(0,0,0,.54);text-align:center}.price-tables .price-table.style-2 .terms{padding:32px;font-size:15px}.price-tables .price-table.style-2 .terms .term{padding-bottom:8px}.price-tables .price-table.style-2 .terms .term:last-child{padding-bottom:0}.price-tables .price-table.style-2 .cta-button{margin:8px auto 32px auto;width:128px}.price-tables .price-table.style-3 .package-type{padding:32px;text-align:center}.price-tables .price-table.style-3 .package-type .title{font-size:34px}.price-tables .price-table.style-3 .package-type .subtitle{font-size:17px;color:rgba(0,0,0,.54);font-weight:500}.price-tables .price-table.style-3 .price{padding:16px 32px}.price-tables .price-table.style-3 .price .currency{padding-right:4px;font-size:15px;font-weight:500}.price-tables .price-table.style-3 .price .value{font-size:34px;font-weight:300;line-height:1}.price-tables .price-table.style-3 .price .period{padding-left:4px;text-align:center}.price-tables .price-table.style-3 .terms{margin:32px;font-size:15px;color:rgba(0,0,0,.54)}.price-tables .price-table.style-3 .terms .term{padding-bottom:16px}.price-tables .price-table.style-3 .terms .term:last-child{padding-bottom:0}.price-tables .price-table.style-3 .cta-button{margin:8px 32px}.price-tables .price-table.style-3 .note{padding:8px 32px 16px 32px;text-align:center;color:rgba(0,0,0,.54)}.simple-table-container{background:#fff}.simple-table-container .table-title{font-size:20px;padding:24px}table.simple{width:100%;border:none;border-spacing:0;text-align:left}table.simple thead tr th{padding:16px 8px;font-weight:500;color:rgba(0,0,0,.54);border-bottom:1px solid rgba(0,0,0,.12);white-space:nowrap;min-width:120px}table.simple thead tr th:first-child{padding-left:24px}table.simple thead tr th:last-child{padding-right:24px}table.simple tbody tr td{padding:16px 8px;border-bottom:1px solid rgba(0,0,0,.12)}table.simple tbody tr td:first-child{padding-left:24px}table.simple tbody tr td:last-child{padding-right:24px}table.simple tbody tr:last-child td{border-bottom:none}table.simple.clickable tbody tr{cursor:pointer}table.simple.clickable tbody tr:hover{background:rgba(0,0,0,.03)}html{font-size:62.5%;font-family:Roboto,"Helvetica Neue",Arial,sans-serif;line-height:1.4;letter-spacing:-.1px}body{font-size:1.3rem}body,html{-webkit-font-smoothing:auto;-moz-osx-font-smoothing:auto}form{font-size:1.6rem}.h1,.h2,.h3,.h4,.h5,.h6,h1,h2,h3,h4,h5,h6{font-weight:400}.h1,h1{font-size:2.4rem}.h2,h2{font-size:2rem}.h3,h3{font-size:1.6rem}.h4,h4{font-size:1.4rem}.h5,h5{font-size:1.3rem}.h6,h6{font-size:1.2rem}a{text-decoration:none}a:active,a:hover{text-decoration:underline}abbr{cursor:help;border-bottom:1px dotted rgba(0,0,0,.54)}blockquote{border-left:3px solid rgba(0,0,0,.12);font-style:italic;margin:1em 0;padding-left:16px}blockquote footer{font-style:normal}blockquote footer:before{content:'\2014 \00A0'}blockquote.reverse{border-left:none;border-right:3px solid rgba(0,0,0,.12);text-align:right;padding-left:0;padding-right:16px}blockquote.reverse footer:before{content:''}blockquote.reverse footer:after{content:'\2014 \00A0'}code{font-family:Monaco,Menlo,Consolas,"Ubuntu Mono",monospace}code:not(.highlight){background:rgba(0,0,0,.065);color:#106cc8;margin:0 1px;padding:2px 3px;border-radius:2px}dl dt{font-weight:700}dl dd{margin:4px 0 16px 0}mark{background:#f7f49a}pre{line-height:1.6;margin:8px 16px;white-space:pre-wrap}small{font-size:80%}table thead tr th{text-align:left}.text-italic{font-style:italic}.text-semibold{font-weight:600}.text-bold,strong{font-weight:700}.text-strike{text-decoration:line-through}.text-super{vertical-align:super}.text-sub{vertical-align:sub}.text-capitalize{text-transform:capitalize}.text-lowercase{text-transform:lowercase}.text-uppercase{text-transform:uppercase}.text-left{text-align:left}.text-center{text-align:center}.text-right{text-align:right}.font-weight-100{font-weight:100}.font-weight-200{font-weight:200}.font-weight-300{font-weight:300}.font-weight-400{font-weight:400}.font-weight-500{font-weight:500}.font-weight-600{font-weight:600}.font-weight-700{font-weight:700}.font-weight-800{font-weight:800}.font-weight-900{font-weight:900}.font-size-2{font-size:2px}.font-size-4{font-size:4px}.font-size-6{font-size:6px}.font-size-8{font-size:8px}.font-size-10{font-size:10px}.font-size-12{font-size:12px}.font-size-14{font-size:14px}.font-size-16{font-size:16px}.font-size-18{font-size:18px}.font-size-20{font-size:20px}.font-size-22{font-size:22px}.font-size-24{font-size:24px}.font-size-26{font-size:26px}.font-size-28{font-size:28px}.font-size-30{font-size:30px}.font-size-32{font-size:32px}.font-size-34{font-size:34px}.font-size-36{font-size:36px}.font-size-38{font-size:38px}.font-size-40{font-size:40px}.font-size-42{font-size:42px}.font-size-44{font-size:44px}.font-size-46{font-size:46px}.font-size-48{font-size:48px}.font-size-50{font-size:50px}.font-size-52{font-size:52px}.font-size-54{font-size:54px}.font-size-56{font-size:56px}.font-size-58{font-size:58px}.font-size-60{font-size:60px}.font-size-62{font-size:62px}.font-size-64{font-size:64px}.font-size-66{font-size:66px}.font-size-68{font-size:68px}.font-size-70{font-size:70px}.font-size-72{font-size:72px}.font-size-74{font-size:74px}.font-size-76{font-size:76px}.font-size-78{font-size:78px}.font-size-80{font-size:80px}.font-size-82{font-size:82px}.font-size-84{font-size:84px}.font-size-86{font-size:86px}.font-size-88{font-size:88px}.font-size-90{font-size:90px}.font-size-92{font-size:92px}.font-size-94{font-size:94px}.font-size-96{font-size:96px}.font-size-98{font-size:98px}.font-size-100{font-size:100px}.font-size-102{font-size:102px}.font-size-104{font-size:104px}.font-size-106{font-size:106px}.font-size-108{font-size:108px}.font-size-110{font-size:110px}.font-size-112{font-size:112px}.font-size-114{font-size:114px}.font-size-116{font-size:116px}.font-size-118{font-size:118px}.font-size-120{font-size:120px}.line-height-2{line-height:2px}.line-height-4{line-height:4px}.line-height-6{line-height:6px}.line-height-8{line-height:8px}.line-height-10{line-height:10px}.line-height-12{line-height:12px}.line-height-14{line-height:14px}.line-height-16{line-height:16px}.line-height-18{line-height:18px}.line-height-20{line-height:20px}.line-height-22{line-height:22px}.line-height-24{line-height:24px}.line-height-26{line-height:26px}.line-height-28{line-height:28px}.line-height-30{line-height:30px}.line-height-32{line-height:32px}.line-height-34{line-height:34px}.line-height-36{line-height:36px}.line-height-38{line-height:38px}.line-height-40{line-height:40px}.line-height-42{line-height:42px}.line-height-44{line-height:44px}.line-height-46{line-height:46px}.line-height-48{line-height:48px}.line-height-50{line-height:50px}.line-height-52{line-height:52px}.line-height-54{line-height:54px}.line-height-56{line-height:56px}.line-height-58{line-height:58px}.line-height-60{line-height:60px}.line-height-62{line-height:62px}.line-height-64{line-height:64px}.line-height-66{line-height:66px}.line-height-68{line-height:68px}.line-height-70{line-height:70px}.line-height-72{line-height:72px}.line-height-74{line-height:74px}.line-height-76{line-height:76px}.line-height-78{line-height:78px}.line-height-80{line-height:80px}.line-height-82{line-height:82px}.line-height-84{line-height:84px}.line-height-86{line-height:86px}.line-height-88{line-height:88px}.line-height-90{line-height:90px}.line-height-92{line-height:92px}.line-height-94{line-height:94px}.line-height-96{line-height:96px}.line-height-98{line-height:98px}.line-height-100{line-height:100px}.line-height-102{line-height:102px}.line-height-104{line-height:104px}.line-height-106{line-height:106px}.line-height-108{line-height:108px}.line-height-110{line-height:110px}.line-height-112{line-height:112px}.line-height-114{line-height:114px}.line-height-116{line-height:116px}.line-height-118{line-height:118px}.line-height-120{line-height:120px}.text-boxed,.text-boxed-light{border-radius:2px;padding:4px 8px;margin:0 8px;font-size:11px;font-weight:500;color:rgba(0,0,0,.54);background-color:rgba(0,0,0,.12);white-space:nowrap}.text-boxed-light{background-color:rgba(255,255,255,.7)}.text-truncate{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.text-nowrap{white-space:nowrap}html,html *{scrollbar-width:thin;scrollbar-color:rgba(128,128,128,.25) rgba(128,128,128,.25)}::-webkit-scrollbar{width:8px;height:8px;background-color:transparent;box-shadow:none}::-webkit-scrollbar:hover{background-color:transparent}::-webkit-scrollbar-thumb{min-height:8px;min-width:8px;background-color:rgba(128,128,128,.25);box-shadow:none}::-webkit-scrollbar-thumb:hover{background-color:rgba(128,128,128,.125)}::-webkit-scrollbar-thumb:active{background-color:rgba(128,128,128,.15)}.angular-google-map-container{height:400px}.moment-picker .moment-picker-container{width:296px;border:none;border-radius:2px;box-shadow:0 2px 4px -1px rgba(0,0,0,.2),0 4px 5px 0 rgba(0,0,0,.14),0 1px 10px 0 rgba(0,0,0,.12);margin-left:0;padding:8px}.moment-picker .moment-picker-container td,.moment-picker .moment-picker-container th{min-width:0;width:40px;height:40px;padding:8px;text-shadow:none;border-radius:35px}.moment-picker .moment-picker-container td:hover,.moment-picker .moment-picker-container th:hover{background:#f5f5f5;background-image:none}.moment-picker .moment-picker-container td.selected{background:#03a9f4;background-image:none}.moment-picker .moment-picker-container .header-view th{border-radius:0;white-space:nowrap;width:auto}.moment-picker .moment-picker-container .header-view th:first-child,.moment-picker .moment-picker-container .header-view th:last-child{width:20%}.c3{transition:all .3s ease}.c3 svg{font:12px RobotoDraft,Roboto,'Helvetica Neue',sans-serif}.c3 line,.c3 path{fill:none;stroke:#000}.c3 text{font-family:Roboto,"Helvetica Neue",Arial,sans-serif;user-select:none}.c3 .c3-bars path,.c3 .c3-event-rect,.c3 .c3-legend-item-tile,.c3 .c3-xgrid-focus,.c3 .c3-ygrid{shape-rendering:crispEdges}.c3 .c3-chart-line{transition:all .3s ease}.c3 .c3-line{stroke-width:1px}.c3.stroke-3 .c3-line{stroke-width:3px}.c3.stroke-2 .c3-line{stroke-width:2px}.c3 .c3-circle{transition:all .3s ease;stroke:#fff;stroke-width:2}.c3 .c3-circle._expanded_{stroke-width:3;stroke:#fff}.c3 .c3-chart-arc path{stroke:#fff}.c3 .c3-chart-arc text{fill:#fff;font-size:13px}.c3 .c3-grid line{stroke:rgba(0,0,0,.04);stroke-width:1px;stroke-dasharray:0}.c3 .c3-grid text{fill:#aaa}.c3 .c3-axis .tick{stroke-width:0}.c3 .c3-axis text{fill:rgba(0,0,0,.33)}.c3 .c3-axis line,.c3 .c3-axis path{stroke:rgba(0,0,0,.04)}.c3 .c3-xgrid,.c3 .c3-ygrid{stroke-dasharray:0 0}.c3 .c3-text.c3-empty{fill:grey;font-size:2em}.c3 .c3-bar{stroke-width:0}.c3 .c3-bar._expanded_{fill-opacity:.75}.c3 .c3-target.c3-focused{opacity:1}.c3 .c3-target.c3-focused .c3-target.c3-focused path.c3-step,.c3 .c3-target.c3-focused path.c3-line{stroke-width:3px;transition:all .3s ease}.c3 .c3-target.c3-defocused{opacity:.3!important}.c3 .c3-region{fill:#4682b4;fill-opacity:.1}.c3 .c3-brush .extent{fill-opacity:.1}.c3 .c3-legend-item{font-size:12px}.c3 .c3-legend-item-hidden{opacity:.15}.c3 .c3-legend-background{opacity:.75;fill:#fff;stroke:#d3d3d3;stroke-width:1}.c3 .c3-tooltip-container{z-index:10}.c3 .c3-tooltip{border-collapse:collapse;border-spacing:0;background-color:#fff;empty-cells:show;box-shadow:0 2px 4px -1px rgba(0,0,0,.14),0 4px 5px 0 rgba(0,0,0,.098),0 1px 10px 0 rgba(0,0,0,.084);opacity:1;border-radius:2px;overflow:hidden;padding:4px 0}.c3 .c3-tooltip tr{border:none}.c3 .c3-tooltip th{background-color:transparent;font-size:14px;font-weight:400;padding:8px 12px;text-align:left;color:rgba(0,0,0,.54)}.c3 .c3-tooltip td{font-size:13px;padding:4px 12px!important;background-color:#fff;border-left:none;color:rgba(0,0,0,.84)}.c3 .c3-tooltip td>span{display:inline-block;width:10px;height:10px;margin-right:6px}.c3 .c3-tooltip td.value{font-size:14px!important;text-align:right;color:rgba(0,0,0,.84)}.c3 .c3-area{stroke-width:0;opacity:.2}.c3 .c3-chart-arcs-title{dominant-baseline:middle;font-size:1.3em}.c3 .c3-chart-arcs .c3-chart-arcs-background{fill:#e0e0e0;stroke:none}.c3 .c3-chart-arcs .c3-chart-arcs-gauge-unit{fill:#000;font-size:16px}.c3 .c3-chart-arcs .c3-chart-arcs-gauge-max{fill:#777}.c3 .c3-chart-arcs .c3-chart-arcs-gauge-min{fill:#777}.c3 .c3-chart-arc .c3-gauge-value{fill:#000}.ct-label{font-size:13px}.ct-chart-donut .ct-label,.ct-chart-pie .ct-label{font-size:13px}.bar-legend,.chart-legend,.doughnut-legend,.line-legend,.pie-legend,.polararea-legend,.radar-legend{margin-top:15px}table.dataTable{width:100%;margin:0 auto;clear:both;border-spacing:0}table.dataTable thead tr{background:#fff}table.dataTable thead th{text-align:left;vertical-align:middle;border-bottom:1px solid rgba(0,0,0,.12);padding:16px 8px}table.dataTable thead th:first-child{padding-left:24px}table.dataTable thead th:last-child{border-right:none;padding-right:24px}table.dataTable thead th:active{outline:0}table.dataTable thead th.dt-head-left{text-align:left}table.dataTable thead th.dt-head-center{text-align:center}table.dataTable thead th.dt-head-right{text-align:right}table.dataTable thead th.dt-head-justify{text-align:justify}table.dataTable thead th.dt-head-nowrap{white-space:nowrap}table.dataTable thead th .table-header .column-title{display:block;font-weight:600;white-space:nowrap}table.dataTable thead th .table-header .selectize-control{margin-top:15px}table.dataTable thead th .table-header .selectize-control.single .selectize-input{padding:7px 10px}table.dataTable thead th .table-header .selectize-control.single .selectize-input:after{right:10px;border-width:5px 4px 0 4px;border-color:rgba(0,0,0,.12) transparent transparent transparent}table.dataTable thead th .table-header .column-search-input{display:inline-block;margin-top:15px;width:100%;height:33px}table.dataTable thead td{padding:15px;vertical-align:middle}table.dataTable thead td:active{outline:0}table.dataTable thead td.dt-head-left{text-align:left}table.dataTable thead td.dt-head-center{text-align:center}table.dataTable thead td.dt-head-right{text-align:right}table.dataTable thead td.dt-head-justify{text-align:justify}table.dataTable thead td.dt-head-nowrap{white-space:nowrap}table.dataTable thead .sorting,table.dataTable thead .sorting_asc,table.dataTable thead .sorting_desc{background:0 0}table.dataTable thead .sorting .table-header .column-title,table.dataTable thead .sorting_asc .table-header .column-title,table.dataTable thead .sorting_desc .table-header .column-title{cursor:pointer}table.dataTable thead .sorting .table-header .column-title:after,table.dataTable thead .sorting_asc .table-header .column-title:after,table.dataTable thead .sorting_desc .table-header .column-title:after{position:relative;font-family:icomoon;font-weight:400;margin-left:10px;top:2px;font-size:16px;color:rgba(0,0,0,.54)}table.dataTable thead .sorting .table-header .column-title:after{content:'\eaa8'}table.dataTable thead .sorting_asc .table-header .column-title:after{content:'\e718'}table.dataTable thead .sorting_desc .table-header .column-title:after{content:'\e715'}table.dataTable tfoot th{font-weight:600;text-align:left;padding:10px 18px 6px 18px;border-top:1px solid #111}table.dataTable tfoot th.dt-head-left{text-align:left}table.dataTable tfoot th.dt-head-center{text-align:center}table.dataTable tfoot th.dt-head-right{text-align:right}table.dataTable tfoot th.dt-head-justify{text-align:justify}table.dataTable tfoot th.dt-head-nowrap{white-space:nowrap}table.dataTable tfoot td{padding:10px 18px 6px 18px;border-top:1px solid #111}table.dataTable tfoot td.dt-head-left{text-align:left}table.dataTable tfoot td.dt-head-center{text-align:center}table.dataTable tfoot td.dt-head-right{text-align:right}table.dataTable tfoot td.dt-head-justify{text-align:justify}table.dataTable tfoot td.dt-head-nowrap{white-space:nowrap}table.dataTable tbody tr{background-color:#fff}table.dataTable tbody tr.selected{background-color:#b0bed9}table.dataTable tbody tr.details-open td.detail-column i{background:#fff}table.dataTable tbody tr.details-row.odd tr{background:#fff}table.dataTable tbody tr.details-row>td{padding:0}table.dataTable tbody th{padding:14px 15px;vertical-align:middle}table.dataTable tbody th.dt-body-left{text-align:left}table.dataTable tbody th.dt-body-center{text-align:center}table.dataTable tbody th.dt-body-right{text-align:right}table.dataTable tbody th.dt-body-justify{text-align:justify}table.dataTable tbody th.dt-body-nowrap{white-space:nowrap}table.dataTable tbody td{padding:16px 8px;vertical-align:middle}table.dataTable tbody td:first-child{padding-left:24px}table.dataTable tbody td:last-child{padding-right:24px}table.dataTable tbody td.dt-body-left{text-align:left}table.dataTable tbody td.dt-body-center{text-align:center}table.dataTable tbody td.dt-body-right{text-align:right}table.dataTable tbody td.dt-body-justify{text-align:justify}table.dataTable tbody td.dt-body-nowrap{white-space:nowrap}table.dataTable th.dt-left{text-align:left}table.dataTable th.dt-center{text-align:center}table.dataTable th.dt-right{text-align:right}table.dataTable th.dt-justify{text-align:justify}table.dataTable th.dt-nowrap{white-space:nowrap}table.dataTable td.dt-left{text-align:left}table.dataTable td.dt-center{text-align:center}table.dataTable td.dataTables_empty{height:51px;text-align:center}table.dataTable td.dt-right{text-align:right}table.dataTable td.dt-justify{text-align:justify}table.dataTable td.dt-nowrap{white-space:nowrap}table.dataTable.row-border thead{border-bottom:1px solid rgba(0,0,0,.12)}table.dataTable.row-border tbody tr:first-child th{border-top:none}table.dataTable.row-border tbody tr:first-child td{border-top:none}table.dataTable.row-border tbody tr:last-child td{border-bottom:1px solid rgba(0,0,0,.12)}table.dataTable.row-border tbody th{border-top:1px solid rgba(0,0,0,.12)}table.dataTable.row-border tbody td{border-top:1px solid rgba(0,0,0,.12)}table.dataTable.cell-border tbody tr:first-child th{border-top:none}table.dataTable.cell-border tbody tr:first-child td{border-top:none}table.dataTable.cell-border tbody th{border-top:1px solid rgba(0,0,0,.12);border-right:1px solid rgba(0,0,0,.12)}table.dataTable.cell-border tbody th:last-child{border-right:none}table.dataTable.cell-border tbody td{border-top:1px solid rgba(0,0,0,.12);border-right:1px solid rgba(0,0,0,.12)}table.dataTable.cell-border tbody td:last-child{border-right:none}table.dataTable.stripe tbody tr.odd{background-color:#fff}table.dataTable.stripe tbody tr.odd.selected{background-color:#abb9d3}table.dataTable.hover tbody tr:hover{background-color:#f5f5f5}table.dataTable.hover tbody tr:hover.selected{background-color:#a9b7d1}table.dataTable.hover tbody tr.odd:hover{background-color:#f5f5f5}table.dataTable.hover tbody tr.odd:hover.selected{background-color:#a9b7d1}table.dataTable.hover tbody tr.even:hover{background-color:#f5f5f5}table.dataTable.hover tbody tr.even:hover.selected{background-color:#a9b7d1}table.dataTable.order-column tbody tr>.sorting_1{background-color:#f9f9f9}table.dataTable.order-column tbody tr>.sorting_2{background-color:#f9f9f9}table.dataTable.order-column tbody tr>.sorting_3{background-color:#f9f9f9}table.dataTable.order-column tbody tr.selected>.sorting_1{background-color:#acbad4}table.dataTable.order-column tbody tr.selected>.sorting_2{background-color:#acbad4}table.dataTable.order-column tbody tr.selected>.sorting_3{background-color:#acbad4}table.dataTable.order-column.stripe tbody tr.odd>.sorting_1{background-color:#f1f1f1}table.dataTable.order-column.stripe tbody tr.odd>.sorting_2{background-color:#f3f3f3}table.dataTable.order-column.stripe tbody tr.odd>.sorting_3{background-color:#f5f5f5}table.dataTable.order-column.stripe tbody tr.odd.selected>.sorting_1{background-color:#a6b3cd}table.dataTable.order-column.stripe tbody tr.odd.selected>.sorting_2{background-color:#a7b5ce}table.dataTable.order-column.stripe tbody tr.odd.selected>.sorting_3{background-color:#a9b6d0}table.dataTable.order-column.stripe tbody tr.even>.sorting_1{background-color:#f9f9f9}table.dataTable.order-column.stripe tbody tr.even>.sorting_2{background-color:#fbfbfb}table.dataTable.order-column.stripe tbody tr.even>.sorting_3{background-color:#fdfdfd}table.dataTable.order-column.stripe tbody tr.even.selected>.sorting_1{background-color:#acbad4}table.dataTable.order-column.stripe tbody tr.even.selected>.sorting_2{background-color:#adbbd6}table.dataTable.order-column.stripe tbody tr.even.selected>.sorting_3{background-color:#afbdd8}table.dataTable.order-column.hover tbody tr:hover>.sorting_1{background-color:#eaeaea}table.dataTable.order-column.hover tbody tr:hover>.sorting_2{background-color:#ebebeb}table.dataTable.order-column.hover tbody tr:hover>.sorting_3{background-color:#eee}table.dataTable.order-column.hover tbody tr:hover.selected>.sorting_1{background-color:#a1aec7}table.dataTable.order-column.hover tbody tr:hover.selected>.sorting_2{background-color:#a2afc8}table.dataTable.order-column.hover tbody tr:hover.selected>.sorting_3{background-color:#a4b2cb}table.dataTable.order-column.hover tbody tr.odd:hover>.sorting_1{background-color:#eaeaea}table.dataTable.order-column.hover tbody tr.odd:hover>.sorting_2{background-color:#ebebeb}table.dataTable.order-column.hover tbody tr.odd:hover>.sorting_3{background-color:#eee}table.dataTable.order-column.hover tbody tr.odd:hover.selected>.sorting_1{background-color:#a1aec7}table.dataTable.order-column.hover tbody tr.odd:hover.selected>.sorting_2{background-color:#a2afc8}table.dataTable.order-column.hover tbody tr.odd:hover.selected>.sorting_3{background-color:#a4b2cb}table.dataTable.order-column.hover tbody tr.even:hover>.sorting_1{background-color:#eaeaea}table.dataTable.order-column.hover tbody tr.even:hover>.sorting_2{background-color:#ebebeb}table.dataTable.order-column.hover tbody tr.even:hover>.sorting_3{background-color:#eee}table.dataTable.order-column.hover tbody tr.even:hover.selected>.sorting_1{background-color:#a1aec7}table.dataTable.order-column.hover tbody tr.even:hover.selected>.sorting_2{background-color:#a2afc8}table.dataTable.order-column.hover tbody tr.even:hover.selected>.sorting_3{background-color:#a4b2cb}table.dataTable.no-footer{border-bottom:none}table.dataTable.nowrap th{white-space:nowrap}table.dataTable.nowrap td{white-space:nowrap}table.dataTable.compact thead th{padding:5px 9px}table.dataTable.compact thead td{padding:5px 9px}table.dataTable.compact tfoot th{padding:5px 9px 3px 9px}table.dataTable.compact tfoot td{padding:5px 9px 3px 9px}table.dataTable.compact tbody th{padding:4px 5px}table.dataTable.compact tbody td{padding:4px 5px}.dataTables_wrapper{display:flex;flex:1 0 auto;flex-direction:column;min-height:0}.dataTables_wrapper .top{padding:16px 24px}.dataTables_wrapper .bottom{display:flex;min-height:64px;justify-content:space-between;padding:16px 8px;border-top:1px solid rgba(0,0,0,.12)}.dataTables_wrapper .bottom .left{display:flex;flex:0 0 50%;max-width:50%;align-self:center;padding:0 8px}.dataTables_wrapper .bottom .left .length{display:block}.dataTables_wrapper .bottom .right{display:flex;flex:0 0 50%;max-width:50%;align-self:center;justify-content:flex-end;padding:0 8px}.dataTables_wrapper .bottom .right .info{display:block;align-self:center}.dataTables_wrapper .bottom .right .info .dataTables_info{padding:0 8px;font-weight:600}.dataTables_wrapper .bottom .right .pagination{display:block;align-self:center;white-space:nowrap}.dataTables_wrapper .bottom .right .pagination .dataTables_paginate{padding:0;margin:0!important}.dataTables_wrapper .dataTables_filter{float:right}.dataTables_wrapper .dataTables_filter input{margin-left:.5em;border:1px solid rgba(0,0,0,.12);height:24px;padding:4px 8px}.dataTables_wrapper .dataTables_paginate .paginate_button{background:#fff;color:rgba(0,0,0,.87);border:1px solid rgba(0,0,0,.12);padding:9px 12px;border-radius:2px;cursor:pointer;user-select:none;margin:0 2px}.dataTables_wrapper .dataTables_paginate .paginate_button:hover{box-shadow:inset 999em 0 0 0 rgba(0,0,0,.05);color:rgba(0,0,0,.87)!important;border:1px solid rgba(0,0,0,.12)!important;background:0 0}.dataTables_wrapper .dataTables_paginate .paginate_button:active{box-shadow:inset 999em 0 0 0 rgba(0,0,0,.08),inset 0 1px 3px 0 rgba(0,0,0,.1),0 1px 0 0 rgba(255,255,255,.35)}.dataTables_wrapper .dataTables_paginate .paginate_button.current,.dataTables_wrapper .dataTables_paginate .paginate_button.disabled,.dataTables_wrapper .dataTables_paginate .paginate_button.disabled:active,.dataTables_wrapper .dataTables_paginate .paginate_button.disabled:hover{color:rgba(0,0,0,.54)!important;border-color:rgba(0,0,0,.12)!important;background:#fff!important;box-shadow:none!important;cursor:default}.dataTables_wrapper .dataTables_processing{position:absolute;top:50%;left:50%;width:100%;height:40px;margin-left:-50%;margin-top:-25px;padding-top:20px;text-align:center;font-size:1.2em;background-color:#fff;background:-webkit-gradient(linear,left top,right top,color-stop(0,rgba(255,255,255,0)),color-stop(25%,rgba(255,255,255,.9)),color-stop(75%,rgba(255,255,255,.9)),color-stop(100%,rgba(255,255,255,0)));background:-webkit-linear-gradient(left,rgba(255,255,255,0) 0,rgba(255,255,255,.9) 25%,rgba(255,255,255,.9) 75%,rgba(255,255,255,0) 100%);background:-moz-linear-gradient(left,rgba(255,255,255,0) 0,rgba(255,255,255,.9) 25%,rgba(255,255,255,.9) 75%,rgba(255,255,255,0) 100%);background:-ms-linear-gradient(left,rgba(255,255,255,0) 0,rgba(255,255,255,.9) 25%,rgba(255,255,255,.9) 75%,rgba(255,255,255,0) 100%);background:-o-linear-gradient(left,rgba(255,255,255,0) 0,rgba(255,255,255,.9) 25%,rgba(255,255,255,.9) 75%,rgba(255,255,255,0) 100%);background:linear-gradient(to right,rgba(255,255,255,0) 0,rgba(255,255,255,.9) 25%,rgba(255,255,255,.9) 75%,rgba(255,255,255,0) 100%)}.dataTables_wrapper .dataTables_scroll{display:flex;flex:1 1 0;flex-direction:column;clear:both;min-height:0}.dataTables_wrapper .dataTables_scroll table.dataTable{box-shadow:none}.dataTables_wrapper .dataTables_scroll table.dataTable.row-border thead{border:none}.dataTables_wrapper .dataTables_scroll .dataTables_scrollHead{display:flex;min-height:56px;box-shadow:0 0 0 1px rgba(0,0,0,.095),0 1px 1px 0 rgba(0,0,0,.1),0 2px 1px 0 rgba(0,0,0,.05);background:#fff;overflow:visible!important}.dataTables_wrapper .dataTables_scroll .dataTables_scrollHead tr th:last-child .table-header .column-title{position:relative;left:7px}.dataTables_wrapper .dataTables_scroll .dataTables_scrollBody{display:flex;overflow-x:hidden!important;overflow-y:scroll!important;-webkit-overflow-scrolling:touch}.dataTables_wrapper .dataTables_scroll .dataTables_scrollBody th>.dataTables_sizing{height:0;overflow:hidden;margin:0!important;padding:0!important}.dataTables_wrapper .dataTables_scroll .dataTables_scrollBody td>.dataTables_sizing{height:0;overflow:hidden;margin:0!important;padding:0!important}.dataTables_wrapper.no-footer .dataTables_scrollBody{border-bottom:none}.dataTables_wrapper.no-footer .dataTables_scrollBody table,.dataTables_wrapper.no-footer .dataTables_scrollHead table{border-bottom:none}.dataTables_wrapper:after{visibility:hidden;display:block;content:'';clear:both;height:0}table.dataTable .show-details{padding:5px 10px;font-weight:700}table.dataTable .action-buttons{display:flex;justify-content:center}table.dataTable .action-buttons .button{padding:8px}.fullpage-datatable .dataTables_wrapper{height:100%;max-height:100%}.explorer-11 .fullpage-datatable .dataTables_scroll{flex:1}table.dataTable.dtr-inline.collapsed.dtr-inline.collapsed>tbody>tr>td:first-child,table.dataTable.dtr-inline.collapsed.dtr-inline.collapsed>tbody>tr>th:first-child{padding-left:40px}table.dataTable.dtr-inline.collapsed.dtr-inline.collapsed>tbody>tr>td:first-child:before,table.dataTable.dtr-inline.collapsed.dtr-inline.collapsed>tbody>tr>th:first-child:before{content:'+';width:15px;height:15px;line-height:15px;top:50%;margin-top:-7px;left:8px;color:rgba(0,0,0,.54);background:0 0;border:none;box-shadow:0 0 0 2px rgba(0,0,0,.54);font-weight:700}table.dataTable.dtr-inline.collapsed.dtr-inline.collapsed>tbody>tr.parent>td:first-child:before,table.dataTable.dtr-inline.collapsed.dtr-inline.collapsed>tbody>tr.parent>th:first-child:before{background:0 0}table.dataTable.dtr-inline.collapsed>tbody>tr.child ul{display:block}table.dataTable.dtr-inline.collapsed>tbody>tr.child ul li{display:flex;flex-direction:row;align-items:center;justify-content:flex-start;border-bottom:1px solid rgba(0,0,0,.12);padding:8px 0}table.dataTable.dtr-inline.collapsed>tbody>tr.child ul li:first-child{padding-top:0}table.dataTable.dtr-inline.collapsed>tbody>tr.child ul li:last-child{border-bottom:none;padding-bottom:0}table.dataTable.dtr-inline.collapsed>tbody>tr.child ul li .dtr-title{margin-right:8px}[hljs],hljs{display:block;overflow-x:auto;color:#333;background:#f8f8f8;-webkit-text-size-adjust:none}.diff .hljs-header,.hljs-comment{color:#998;font-style:italic}.css .rule .hljs-keyword,.hljs-keyword,.hljs-request,.hljs-status,.hljs-subst,.hljs-winutils,.nginx .hljs-title{color:#333;font-weight:700}.hljs-hexcolor,.hljs-number,.ruby .hljs-constant{color:teal}.hljs-doctag,.hljs-string,.hljs-tag .hljs-value,.tex .hljs-formula{color:#d14}.hljs-id,.hljs-title,.scss .hljs-preprocessor{color:#900;font-weight:700}.hljs-list .hljs-keyword,.hljs-subst{font-weight:400}.hljs-class .hljs-title,.hljs-type,.tex .hljs-command,.vhdl .hljs-literal{color:#458;font-weight:700}.django .hljs-tag .hljs-keyword,.hljs-rule .hljs-property,.hljs-tag,.hljs-tag .hljs-title{color:navy;font-weight:400}.hljs-attribute,.hljs-name,.hljs-variable,.lisp .hljs-body{color:teal}.hljs-regexp{color:#009926}.clojure .hljs-keyword,.hljs-prompt,.hljs-symbol,.lisp .hljs-keyword,.ruby .hljs-symbol .hljs-string,.scheme .hljs-keyword,.tex .hljs-special{color:#990073}.hljs-built_in{color:#0086b3}.hljs-cdata,.hljs-doctype,.hljs-pi,.hljs-pragma,.hljs-preprocessor,.hljs-shebang{color:#999;font-weight:700}.hljs-deletion{background:#fdd}.hljs-addition{background:#dfd}.diff .hljs-change{background:#0086b3}.hljs-chunk{color:#aaa}nvd3{display:block;width:100%;height:100%}nvd3.remove-x-lines .nv-x .tick line{display:none}nvd3.remove-y-lines .nv-y .tick line{display:none}nvd3.remove-line-stroke .nv-groups path.nv-line{stroke-width:0!important}nvd3.remove-opacity .nv-groups .nv-group{fill-opacity:1!important}nvd3.show-line-points .nv-line .nv-scatter .nv-groups .nv-point{fill-opacity:1!important;stroke-opacity:1!important}.nvd3 text{font-family:Roboto,"Helvetica Neue",Arial,sans-serif}.nvd3 line.nv-guideline{stroke:rgba(0,0,0,.54)}.nvd3 .nv-groups .nv-point.hover{stroke-width:3px!important;fill-opacity:1!important;stroke-opacity:1!important}.nvtooltip{background:0 0;color:#fff;padding:0;border:none}.nvtooltip.gravity-n:after{display:block;position:absolute;content:'';width:0;height:0;left:50%;bottom:100%;margin-left:-5px;border:5px solid transparent;border-bottom-color:rgba(0,0,0,.87)}.nvtooltip.gravity-s:after{display:block;position:absolute;content:'';width:0;height:0;top:100%;left:50%;margin-left:-5px;border:5px solid transparent;border-top-color:rgba(0,0,0,.87)}.nvtooltip.gravity-e:after{display:block;position:absolute;content:'';width:0;height:0;top:50%;right:0;margin-top:-6px;margin-right:-11px;border:6px solid transparent;border-left-color:rgba(0,0,0,.87)}.nvtooltip.gravity-w:after{display:block;position:absolute;content:'';width:0;height:0;top:50%;margin-top:-6px;margin-left:-11px;border:6px solid transparent;border-right-color:rgba(0,0,0,.87)}.nvtooltip table{background:rgba(0,0,0,.87);padding:8px 12px;margin:0;border-radius:2px}.nvtooltip table tbody tr td.legend-color-guide div{border:none}.nvtooltip table tbody tr td:last-child{padding-right:0}.ta-root{display:block}.ta-root .ta-scroll-window.form-control{border:1px solid rgba(0,0,0,.12)}.ta-root.focussed>.ta-scroll-window.form-control{outline:0 solid transparent;border:1px solid rgba(0,0,0,.12);box-shadow:none}.ta-root textarea.ta-editor.ta-html{resize:vertical;width:100%!important;border:1px solid rgba(0,0,0,.12);padding:16px}.ta-root .ta-toolbar{border:1px solid rgba(0,0,0,.12);border-bottom:none;background:#f5f5f5}.ta-root .ta-toolbar .ta-group{display:flex;align-items:center;align-content:center;flex-wrap:wrap}.ta-root .ta-toolbar .ta-group #toolbarCC,.ta-root .ta-toolbar .ta-group #toolbarWC{display:inline-block!important;line-height:24px}.ta-root .ta-toolbar .ta-group .md-button{width:40px;min-width:40px;line-height:14px;height:36px;min-height:36px;padding:6px;margin:4px 0}.ta-root .ta-toolbar .ta-group .md-button i{font-size:20px;width:20px;height:20px;line-height:20px}.ng-cloak,.x-ng-cloak,[data-ng-cloak],[ng-cloak],[ng\:cloak],[x-ng-cloak]{display:none!important}.no-padding{padding:0!important}.no-margin{margin:0!important}.no-radius{border-radius:0}.divider-vertical{background:rgba(0,0,0,.12);height:24px;width:1px;margin:0 8px}.hidden{visibility:hidden;opacity:0}[fill-width]{min-width:100%}[fill-height]{min-height:100%}.full-height{height:100%!important}a img{display:block;outline:0}img{max-width:100%;height:auto;vertical-align:top;border:none}.scrollable{display:block;position:relative;overflow-x:auto;overflow-y:auto;-webkit-overflow-scrolling:touch}.scrollable.only-x{overflow-x:auto;overflow-y:hidden}.scrollable.only-y{overflow-x:hidden;overflow-y:auto}.flex-scrollable{position:relative;overflow-x:auto;overflow-y:auto;-webkit-overflow-scrolling:touch}.flex-scrollable.only-x{overflow-x:auto;overflow-y:hidden}.flex-scrollable.only-y{overflow-x:hidden;overflow-y:auto}.background-image-center{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);z-index:-1}.align-vertical:before{display:inline-block;height:100%;content:'';vertical-align:middle}.align-vertical .align-vertical-bottom,.align-vertical .align-vertical-middle,.align-vertical .align-vertical-top{display:inline-block}.align-vertical .align-vertical-top{vertical-align:top}.align-vertical .align-vertical-middle{vertical-align:middle}.align-vertical .align-vertical-bottom{vertical-align:bottom}.p-0,.padding-0{padding:0}.padding-top-0,.pt-0{padding-top:0}.padding-right-0,.pr-0{padding-right:0}.padding-bottom-0,.pb-0{padding-bottom:0}.padding-left-0,.pl-0{padding-left:0}.padding-horizontal-0,.ph-0{padding-left:0;padding-right:0}.padding-vertical-0,.pv-0{padding-top:0;padding-bottom:0}.p-5,.padding-5{padding:5px}.padding-top-5,.pt-5{padding-top:5px}.padding-right-5,.pr-5{padding-right:5px}.padding-bottom-5,.pb-5{padding-bottom:5px}.padding-left-5,.pl-5{padding-left:5px}.padding-horizontal-5,.ph-5{padding-left:5px;padding-right:5px}.padding-vertical-5,.pv-5{padding-top:5px;padding-bottom:5px}.p-10,.padding-10{padding:10px}.padding-top-10,.pt-10{padding-top:10px}.padding-right-10,.pr-10{padding-right:10px}.padding-bottom-10,.pb-10{padding-bottom:10px}.padding-left-10,.pl-10{padding-left:10px}.padding-horizontal-10,.ph-10{padding-left:10px;padding-right:10px}.padding-vertical-10,.pv-10{padding-top:10px;padding-bottom:10px}.p-15,.padding-15{padding:15px}.padding-top-15,.pt-15{padding-top:15px}.padding-right-15,.pr-15{padding-right:15px}.padding-bottom-15,.pb-15{padding-bottom:15px}.padding-left-15,.pl-15{padding-left:15px}.padding-horizontal-15,.ph-15{padding-left:15px;padding-right:15px}.padding-vertical-15,.pv-15{padding-top:15px;padding-bottom:15px}.p-20,.padding-20{padding:20px}.padding-top-20,.pt-20{padding-top:20px}.padding-right-20,.pr-20{padding-right:20px}.padding-bottom-20,.pb-20{padding-bottom:20px}.padding-left-20,.pl-20{padding-left:20px}.padding-horizontal-20,.ph-20{padding-left:20px;padding-right:20px}.padding-vertical-20,.pv-20{padding-top:20px;padding-bottom:20px}.p-25,.padding-25{padding:25px}.padding-top-25,.pt-25{padding-top:25px}.padding-right-25,.pr-25{padding-right:25px}.padding-bottom-25,.pb-25{padding-bottom:25px}.padding-left-25,.pl-25{padding-left:25px}.padding-horizontal-25,.ph-25{padding-left:25px;padding-right:25px}.padding-vertical-25,.pv-25{padding-top:25px;padding-bottom:25px}.p-30,.padding-30{padding:30px}.padding-top-30,.pt-30{padding-top:30px}.padding-right-30,.pr-30{padding-right:30px}.padding-bottom-30,.pb-30{padding-bottom:30px}.padding-left-30,.pl-30{padding-left:30px}.padding-horizontal-30,.ph-30{padding-left:30px;padding-right:30px}.padding-vertical-30,.pv-30{padding-top:30px;padding-bottom:30px}.p-35,.padding-35{padding:35px}.padding-top-35,.pt-35{padding-top:35px}.padding-right-35,.pr-35{padding-right:35px}.padding-bottom-35,.pb-35{padding-bottom:35px}.padding-left-35,.pl-35{padding-left:35px}.padding-horizontal-35,.ph-35{padding-left:35px;padding-right:35px}.padding-vertical-35,.pv-35{padding-top:35px;padding-bottom:35px}.p-40,.padding-40{padding:40px}.padding-top-40,.pt-40{padding-top:40px}.padding-right-40,.pr-40{padding-right:40px}.padding-bottom-40,.pb-40{padding-bottom:40px}.padding-left-40,.pl-40{padding-left:40px}.padding-horizontal-40,.ph-40{padding-left:40px;padding-right:40px}.padding-vertical-40,.pv-40{padding-top:40px;padding-bottom:40px}.p-45,.padding-45{padding:45px}.padding-top-45,.pt-45{padding-top:45px}.padding-right-45,.pr-45{padding-right:45px}.padding-bottom-45,.pb-45{padding-bottom:45px}.padding-left-45,.pl-45{padding-left:45px}.padding-horizontal-45,.ph-45{padding-left:45px;padding-right:45px}.padding-vertical-45,.pv-45{padding-top:45px;padding-bottom:45px}.p-50,.padding-50{padding:50px}.padding-top-50,.pt-50{padding-top:50px}.padding-right-50,.pr-50{padding-right:50px}.padding-bottom-50,.pb-50{padding-bottom:50px}.padding-left-50,.pl-50{padding-left:50px}.padding-horizontal-50,.ph-50{padding-left:50px;padding-right:50px}.padding-vertical-50,.pv-50{padding-top:50px;padding-bottom:50px}.p-55,.padding-55{padding:55px}.padding-top-55,.pt-55{padding-top:55px}.padding-right-55,.pr-55{padding-right:55px}.padding-bottom-55,.pb-55{padding-bottom:55px}.padding-left-55,.pl-55{padding-left:55px}.padding-horizontal-55,.ph-55{padding-left:55px;padding-right:55px}.padding-vertical-55,.pv-55{padding-top:55px;padding-bottom:55px}.p-60,.padding-60{padding:60px}.padding-top-60,.pt-60{padding-top:60px}.padding-right-60,.pr-60{padding-right:60px}.padding-bottom-60,.pb-60{padding-bottom:60px}.padding-left-60,.pl-60{padding-left:60px}.padding-horizontal-60,.ph-60{padding-left:60px;padding-right:60px}.padding-vertical-60,.pv-60{padding-top:60px;padding-bottom:60px}.p-65,.padding-65{padding:65px}.padding-top-65,.pt-65{padding-top:65px}.padding-right-65,.pr-65{padding-right:65px}.padding-bottom-65,.pb-65{padding-bottom:65px}.padding-left-65,.pl-65{padding-left:65px}.padding-horizontal-65,.ph-65{padding-left:65px;padding-right:65px}.padding-vertical-65,.pv-65{padding-top:65px;padding-bottom:65px}.p-70,.padding-70{padding:70px}.padding-top-70,.pt-70{padding-top:70px}.padding-right-70,.pr-70{padding-right:70px}.padding-bottom-70,.pb-70{padding-bottom:70px}.padding-left-70,.pl-70{padding-left:70px}.padding-horizontal-70,.ph-70{padding-left:70px;padding-right:70px}.padding-vertical-70,.pv-70{padding-top:70px;padding-bottom:70px}.p-75,.padding-75{padding:75px}.padding-top-75,.pt-75{padding-top:75px}.padding-right-75,.pr-75{padding-right:75px}.padding-bottom-75,.pb-75{padding-bottom:75px}.padding-left-75,.pl-75{padding-left:75px}.padding-horizontal-75,.ph-75{padding-left:75px;padding-right:75px}.padding-vertical-75,.pv-75{padding-top:75px;padding-bottom:75px}.p-80,.padding-80{padding:80px}.padding-top-80,.pt-80{padding-top:80px}.padding-right-80,.pr-80{padding-right:80px}.padding-bottom-80,.pb-80{padding-bottom:80px}.padding-left-80,.pl-80{padding-left:80px}.padding-horizontal-80,.ph-80{padding-left:80px;padding-right:80px}.padding-vertical-80,.pv-80{padding-top:80px;padding-bottom:80px}.p-85,.padding-85{padding:85px}.padding-top-85,.pt-85{padding-top:85px}.padding-right-85,.pr-85{padding-right:85px}.padding-bottom-85,.pb-85{padding-bottom:85px}.padding-left-85,.pl-85{padding-left:85px}.padding-horizontal-85,.ph-85{padding-left:85px;padding-right:85px}.padding-vertical-85,.pv-85{padding-top:85px;padding-bottom:85px}.p-90,.padding-90{padding:90px}.padding-top-90,.pt-90{padding-top:90px}.padding-right-90,.pr-90{padding-right:90px}.padding-bottom-90,.pb-90{padding-bottom:90px}.padding-left-90,.pl-90{padding-left:90px}.padding-horizontal-90,.ph-90{padding-left:90px;padding-right:90px}.padding-vertical-90,.pv-90{padding-top:90px;padding-bottom:90px}.p-95,.padding-95{padding:95px}.padding-top-95,.pt-95{padding-top:95px}.padding-right-95,.pr-95{padding-right:95px}.padding-bottom-95,.pb-95{padding-bottom:95px}.padding-left-95,.pl-95{padding-left:95px}.padding-horizontal-95,.ph-95{padding-left:95px;padding-right:95px}.padding-vertical-95,.pv-95{padding-top:95px;padding-bottom:95px}.p-100,.padding-100{padding:100px}.padding-top-100,.pt-100{padding-top:100px}.padding-right-100,.pr-100{padding-right:100px}.padding-bottom-100,.pb-100{padding-bottom:100px}.padding-left-100,.pl-100{padding-left:100px}.padding-horizontal-100,.ph-100{padding-left:100px;padding-right:100px}.padding-vertical-100,.pv-100{padding-top:100px;padding-bottom:100px}.p-8,.padding-8{padding:8px}.padding-top-8,.pt-8{padding-top:8px}.padding-right-8,.pr-8{padding-right:8px}.padding-bottom-8,.pb-8{padding-bottom:8px}.padding-left-8,.pl-8{padding-left:8px}.padding-horizontal-8,.ph-8{padding-left:8px;padding-right:8px}.padding-vertical-8,.pv-8{padding-top:8px;padding-bottom:8px}.p-16,.padding-16{padding:16px}.padding-top-16,.pt-16{padding-top:16px}.padding-right-16,.pr-16{padding-right:16px}.padding-bottom-16,.pb-16{padding-bottom:16px}.padding-left-16,.pl-16{padding-left:16px}.padding-horizontal-16,.ph-16{padding-left:16px;padding-right:16px}.padding-vertical-16,.pv-16{padding-top:16px;padding-bottom:16px}.p-24,.padding-24{padding:24px}.padding-top-24,.pt-24{padding-top:24px}.padding-right-24,.pr-24{padding-right:24px}.padding-bottom-24,.pb-24{padding-bottom:24px}.padding-left-24,.pl-24{padding-left:24px}.padding-horizontal-24,.ph-24{padding-left:24px;padding-right:24px}.padding-vertical-24,.pv-24{padding-top:24px;padding-bottom:24px}.p-32,.padding-32{padding:32px}.padding-top-32,.pt-32{padding-top:32px}.padding-right-32,.pr-32{padding-right:32px}.padding-bottom-32,.pb-32{padding-bottom:32px}.padding-left-32,.pl-32{padding-left:32px}.padding-horizontal-32,.ph-32{padding-left:32px;padding-right:32px}.padding-vertical-32,.pv-32{padding-top:32px;padding-bottom:32px}.p-48,.padding-48{padding:48px}.padding-top-48,.pt-48{padding-top:48px}.padding-right-48,.pr-48{padding-right:48px}.padding-bottom-48,.pb-48{padding-bottom:48px}.padding-left-48,.pl-48{padding-left:48px}.padding-horizontal-48,.ph-48{padding-left:48px;padding-right:48px}.padding-vertical-48,.pv-48{padding-top:48px;padding-bottom:48px}.p-56,.padding-56{padding:56px}.padding-top-56,.pt-56{padding-top:56px}.padding-right-56,.pr-56{padding-right:56px}.padding-bottom-56,.pb-56{padding-bottom:56px}.padding-left-56,.pl-56{padding-left:56px}.padding-horizontal-56,.ph-56{padding-left:56px;padding-right:56px}.padding-vertical-56,.pv-56{padding-top:56px;padding-bottom:56px}.p-64,.padding-64{padding:64px}.padding-top-64,.pt-64{padding-top:64px}.padding-right-64,.pr-64{padding-right:64px}.padding-bottom-64,.pb-64{padding-bottom:64px}.padding-left-64,.pl-64{padding-left:64px}.padding-horizontal-64,.ph-64{padding-left:64px;padding-right:64px}.padding-vertical-64,.pv-64{padding-top:64px;padding-bottom:64px}.p-72,.padding-72{padding:72px}.padding-top-72,.pt-72{padding-top:72px}.padding-right-72,.pr-72{padding-right:72px}.padding-bottom-72,.pb-72{padding-bottom:72px}.padding-left-72,.pl-72{padding-left:72px}.padding-horizontal-72,.ph-72{padding-left:72px;padding-right:72px}.padding-vertical-72,.pv-72{padding-top:72px;padding-bottom:72px}.p-88,.padding-88{padding:88px}.padding-top-88,.pt-88{padding-top:88px}.padding-right-88,.pr-88{padding-right:88px}.padding-bottom-88,.pb-88{padding-bottom:88px}.padding-left-88,.pl-88{padding-left:88px}.padding-horizontal-88,.ph-88{padding-left:88px;padding-right:88px}.padding-vertical-88,.pv-88{padding-top:88px;padding-bottom:88px}.p-96,.padding-96{padding:96px}.padding-top-96,.pt-96{padding-top:96px}.padding-right-96,.pr-96{padding-right:96px}.padding-bottom-96,.pb-96{padding-bottom:96px}.padding-left-96,.pl-96{padding-left:96px}.padding-horizontal-96,.ph-96{padding-left:96px;padding-right:96px}.padding-vertical-96,.pv-96{padding-top:96px;padding-bottom:96px}.m-0,.margin-0{margin:0}.margin-top-0,.mt-0{margin-top:0}.margin-right-0,.mr-0{margin-right:0}.margin-bottom-0,.mb-0{margin-bottom:0}.margin-left-0,.ml-0{margin-left:0}.margin-horizontal-0,.mh-0{margin-left:0;margin-right:0}.margin-vertical-0,.mv-0{margin-top:0;margin-bottom:0}.m-5,.margin-5{margin:5px}.margin-top-5,.mt-5{margin-top:5px}.margin-right-5,.mr-5{margin-right:5px}.margin-bottom-5,.mb-5{margin-bottom:5px}.margin-left-5,.ml-5{margin-left:5px}.margin-horizontal-5,.mh-5{margin-left:5px;margin-right:5px}.margin-vertical-5,.mv-5{margin-top:5px;margin-bottom:5px}.m-10,.margin-10{margin:10px}.margin-top-10,.mt-10{margin-top:10px}.margin-right-10,.mr-10{margin-right:10px}.margin-bottom-10,.mb-10{margin-bottom:10px}.margin-left-10,.ml-10{margin-left:10px}.margin-horizontal-10,.mh-10{margin-left:10px;margin-right:10px}.margin-vertical-10,.mv-10{margin-top:10px;margin-bottom:10px}.m-15,.margin-15{margin:15px}.margin-top-15,.mt-15{margin-top:15px}.margin-right-15,.mr-15{margin-right:15px}.margin-bottom-15,.mb-15{margin-bottom:15px}.margin-left-15,.ml-15{margin-left:15px}.margin-horizontal-15,.mh-15{margin-left:15px;margin-right:15px}.margin-vertical-15,.mv-15{margin-top:15px;margin-bottom:15px}.m-20,.margin-20{margin:20px}.margin-top-20,.mt-20{margin-top:20px}.margin-right-20,.mr-20{margin-right:20px}.margin-bottom-20,.mb-20{margin-bottom:20px}.margin-left-20,.ml-20{margin-left:20px}.margin-horizontal-20,.mh-20{margin-left:20px;margin-right:20px}.margin-vertical-20,.mv-20{margin-top:20px;margin-bottom:20px}.m-25,.margin-25{margin:25px}.margin-top-25,.mt-25{margin-top:25px}.margin-right-25,.mr-25{margin-right:25px}.margin-bottom-25,.mb-25{margin-bottom:25px}.margin-left-25,.ml-25{margin-left:25px}.margin-horizontal-25,.mh-25{margin-left:25px;margin-right:25px}.margin-vertical-25,.mv-25{margin-top:25px;margin-bottom:25px}.m-30,.margin-30{margin:30px}.margin-top-30,.mt-30{margin-top:30px}.margin-right-30,.mr-30{margin-right:30px}.margin-bottom-30,.mb-30{margin-bottom:30px}.margin-left-30,.ml-30{margin-left:30px}.margin-horizontal-30,.mh-30{margin-left:30px;margin-right:30px}.margin-vertical-30,.mv-30{margin-top:30px;margin-bottom:30px}.m-35,.margin-35{margin:35px}.margin-top-35,.mt-35{margin-top:35px}.margin-right-35,.mr-35{margin-right:35px}.margin-bottom-35,.mb-35{margin-bottom:35px}.margin-left-35,.ml-35{margin-left:35px}.margin-horizontal-35,.mh-35{margin-left:35px;margin-right:35px}.margin-vertical-35,.mv-35{margin-top:35px;margin-bottom:35px}.m-40,.margin-40{margin:40px}.margin-top-40,.mt-40{margin-top:40px}.margin-right-40,.mr-40{margin-right:40px}.margin-bottom-40,.mb-40{margin-bottom:40px}.margin-left-40,.ml-40{margin-left:40px}.margin-horizontal-40,.mh-40{margin-left:40px;margin-right:40px}.margin-vertical-40,.mv-40{margin-top:40px;margin-bottom:40px}.m-45,.margin-45{margin:45px}.margin-top-45,.mt-45{margin-top:45px}.margin-right-45,.mr-45{margin-right:45px}.margin-bottom-45,.mb-45{margin-bottom:45px}.margin-left-45,.ml-45{margin-left:45px}.margin-horizontal-45,.mh-45{margin-left:45px;margin-right:45px}.margin-vertical-45,.mv-45{margin-top:45px;margin-bottom:45px}.m-50,.margin-50{margin:50px}.margin-top-50,.mt-50{margin-top:50px}.margin-right-50,.mr-50{margin-right:50px}.margin-bottom-50,.mb-50{margin-bottom:50px}.margin-left-50,.ml-50{margin-left:50px}.margin-horizontal-50,.mh-50{margin-left:50px;margin-right:50px}.margin-vertical-50,.mv-50{margin-top:50px;margin-bottom:50px}.m-55,.margin-55{margin:55px}.margin-top-55,.mt-55{margin-top:55px}.margin-right-55,.mr-55{margin-right:55px}.margin-bottom-55,.mb-55{margin-bottom:55px}.margin-left-55,.ml-55{margin-left:55px}.margin-horizontal-55,.mh-55{margin-left:55px;margin-right:55px}.margin-vertical-55,.mv-55{margin-top:55px;margin-bottom:55px}.m-60,.margin-60{margin:60px}.margin-top-60,.mt-60{margin-top:60px}.margin-right-60,.mr-60{margin-right:60px}.margin-bottom-60,.mb-60{margin-bottom:60px}.margin-left-60,.ml-60{margin-left:60px}.margin-horizontal-60,.mh-60{margin-left:60px;margin-right:60px}.margin-vertical-60,.mv-60{margin-top:60px;margin-bottom:60px}.m-65,.margin-65{margin:65px}.margin-top-65,.mt-65{margin-top:65px}.margin-right-65,.mr-65{margin-right:65px}.margin-bottom-65,.mb-65{margin-bottom:65px}.margin-left-65,.ml-65{margin-left:65px}.margin-horizontal-65,.mh-65{margin-left:65px;margin-right:65px}.margin-vertical-65,.mv-65{margin-top:65px;margin-bottom:65px}.m-70,.margin-70{margin:70px}.margin-top-70,.mt-70{margin-top:70px}.margin-right-70,.mr-70{margin-right:70px}.margin-bottom-70,.mb-70{margin-bottom:70px}.margin-left-70,.ml-70{margin-left:70px}.margin-horizontal-70,.mh-70{margin-left:70px;margin-right:70px}.margin-vertical-70,.mv-70{margin-top:70px;margin-bottom:70px}.m-75,.margin-75{margin:75px}.margin-top-75,.mt-75{margin-top:75px}.margin-right-75,.mr-75{margin-right:75px}.margin-bottom-75,.mb-75{margin-bottom:75px}.margin-left-75,.ml-75{margin-left:75px}.margin-horizontal-75,.mh-75{margin-left:75px;margin-right:75px}.margin-vertical-75,.mv-75{margin-top:75px;margin-bottom:75px}.m-80,.margin-80{margin:80px}.margin-top-80,.mt-80{margin-top:80px}.margin-right-80,.mr-80{margin-right:80px}.margin-bottom-80,.mb-80{margin-bottom:80px}.margin-left-80,.ml-80{margin-left:80px}.margin-horizontal-80,.mh-80{margin-left:80px;margin-right:80px}.margin-vertical-80,.mv-80{margin-top:80px;margin-bottom:80px}.m-85,.margin-85{margin:85px}.margin-top-85,.mt-85{margin-top:85px}.margin-right-85,.mr-85{margin-right:85px}.margin-bottom-85,.mb-85{margin-bottom:85px}.margin-left-85,.ml-85{margin-left:85px}.margin-horizontal-85,.mh-85{margin-left:85px;margin-right:85px}.margin-vertical-85,.mv-85{margin-top:85px;margin-bottom:85px}.m-90,.margin-90{margin:90px}.margin-top-90,.mt-90{margin-top:90px}.margin-right-90,.mr-90{margin-right:90px}.margin-bottom-90,.mb-90{margin-bottom:90px}.margin-left-90,.ml-90{margin-left:90px}.margin-horizontal-90,.mh-90{margin-left:90px;margin-right:90px}.margin-vertical-90,.mv-90{margin-top:90px;margin-bottom:90px}.m-95,.margin-95{margin:95px}.margin-top-95,.mt-95{margin-top:95px}.margin-right-95,.mr-95{margin-right:95px}.margin-bottom-95,.mb-95{margin-bottom:95px}.margin-left-95,.ml-95{margin-left:95px}.margin-horizontal-95,.mh-95{margin-left:95px;margin-right:95px}.margin-vertical-95,.mv-95{margin-top:95px;margin-bottom:95px}.m-100,.margin-100{margin:100px}.margin-top-100,.mt-100{margin-top:100px}.margin-right-100,.mr-100{margin-right:100px}.margin-bottom-100,.mb-100{margin-bottom:100px}.margin-left-100,.ml-100{margin-left:100px}.margin-horizontal-100,.mh-100{margin-left:100px;margin-right:100px}.margin-vertical-100,.mv-100{margin-top:100px;margin-bottom:100px}.m-8,.margin-8{margin:8px}.margin-top-8,.mt-8{margin-top:8px}.margin-right-8,.mr-8{margin-right:8px}.margin-bottom-8,.mb-8{margin-bottom:8px}.margin-left-8,.ml-8{margin-left:8px}.margin-horizontal-8,.mh-8{margin-left:8px;margin-right:8px}.margin-vertical-8,.mv-8{margin-top:8px;margin-bottom:8px}.m-16,.margin-16{margin:16px}.margin-top-16,.mt-16{margin-top:16px}.margin-right-16,.mr-16{margin-right:16px}.margin-bottom-16,.mb-16{margin-bottom:16px}.margin-left-16,.ml-16{margin-left:16px}.margin-horizontal-16,.mh-16{margin-left:16px;margin-right:16px}.margin-vertical-16,.mv-16{margin-top:16px;margin-bottom:16px}.m-24,.margin-24{margin:24px}.margin-top-24,.mt-24{margin-top:24px}.margin-right-24,.mr-24{margin-right:24px}.margin-bottom-24,.mb-24{margin-bottom:24px}.margin-left-24,.ml-24{margin-left:24px}.margin-horizontal-24,.mh-24{margin-left:24px;margin-right:24px}.margin-vertical-24,.mv-24{margin-top:24px;margin-bottom:24px}.m-32,.margin-32{margin:32px}.margin-top-32,.mt-32{margin-top:32px}.margin-right-32,.mr-32{margin-right:32px}.margin-bottom-32,.mb-32{margin-bottom:32px}.margin-left-32,.ml-32{margin-left:32px}.margin-horizontal-32,.mh-32{margin-left:32px;margin-right:32px}.margin-vertical-32,.mv-32{margin-top:32px;margin-bottom:32px}.m-48,.margin-48{margin:48px}.margin-top-48,.mt-48{margin-top:48px}.margin-right-48,.mr-48{margin-right:48px}.margin-bottom-48,.mb-48{margin-bottom:48px}.margin-left-48,.ml-48{margin-left:48px}.margin-horizontal-48,.mh-48{margin-left:48px;margin-right:48px}.margin-vertical-48,.mv-48{margin-top:48px;margin-bottom:48px}.m-56,.margin-56{margin:56px}.margin-top-56,.mt-56{margin-top:56px}.margin-right-56,.mr-56{margin-right:56px}.margin-bottom-56,.mb-56{margin-bottom:56px}.margin-left-56,.ml-56{margin-left:56px}.margin-horizontal-56,.mh-56{margin-left:56px;margin-right:56px}.margin-vertical-56,.mv-56{margin-top:56px;margin-bottom:56px}.m-64,.margin-64{margin:64px}.margin-top-64,.mt-64{margin-top:64px}.margin-right-64,.mr-64{margin-right:64px}.margin-bottom-64,.mb-64{margin-bottom:64px}.margin-left-64,.ml-64{margin-left:64px}.margin-horizontal-64,.mh-64{margin-left:64px;margin-right:64px}.margin-vertical-64,.mv-64{margin-top:64px;margin-bottom:64px}.m-72,.margin-72{margin:72px}.margin-top-72,.mt-72{margin-top:72px}.margin-right-72,.mr-72{margin-right:72px}.margin-bottom-72,.mb-72{margin-bottom:72px}.margin-left-72,.ml-72{margin-left:72px}.margin-horizontal-72,.mh-72{margin-left:72px;margin-right:72px}.margin-vertical-72,.mv-72{margin-top:72px;margin-bottom:72px}.m-88,.margin-88{margin:88px}.margin-top-88,.mt-88{margin-top:88px}.margin-right-88,.mr-88{margin-right:88px}.margin-bottom-88,.mb-88{margin-bottom:88px}.margin-left-88,.ml-88{margin-left:88px}.margin-horizontal-88,.mh-88{margin-left:88px;margin-right:88px}.margin-vertical-88,.mv-88{margin-top:88px;margin-bottom:88px}.m-96,.margin-96{margin:96px}.margin-top-96,.mt-96{margin-top:96px}.margin-right-96,.mr-96{margin-right:96px}.margin-bottom-96,.mb-96{margin-bottom:96px}.margin-left-96,.ml-96{margin-left:96px}.margin-horizontal-96,.mh-96{margin-left:96px;margin-right:96px}.margin-vertical-96,.mv-96{margin-top:96px;margin-bottom:96px}.h-0,.height-0{height:0!important;min-height:0!important;max-height:0!important}.w-0,.width-0{width:0!important;min-width:0!important;max-width:0!important}.h-5,.height-5{height:5px!important;min-height:5px!important;max-height:5px!important}.w-5,.width-5{width:5px!important;min-width:5px!important;max-width:5px!important}.h-10,.height-10{height:10px!important;min-height:10px!important;max-height:10px!important}.w-10,.width-10{width:10px!important;min-width:10px!important;max-width:10px!important}.h-15,.height-15{height:15px!important;min-height:15px!important;max-height:15px!important}.w-15,.width-15{width:15px!important;min-width:15px!important;max-width:15px!important}.h-20,.height-20{height:20px!important;min-height:20px!important;max-height:20px!important}.w-20,.width-20{width:20px!important;min-width:20px!important;max-width:20px!important}.h-25,.height-25{height:25px!important;min-height:25px!important;max-height:25px!important}.w-25,.width-25{width:25px!important;min-width:25px!important;max-width:25px!important}.h-30,.height-30{height:30px!important;min-height:30px!important;max-height:30px!important}.w-30,.width-30{width:30px!important;min-width:30px!important;max-width:30px!important}.h-35,.height-35{height:35px!important;min-height:35px!important;max-height:35px!important}.w-35,.width-35{width:35px!important;min-width:35px!important;max-width:35px!important}.h-40,.height-40{height:40px!important;min-height:40px!important;max-height:40px!important}.w-40,.width-40{width:40px!important;min-width:40px!important;max-width:40px!important}.h-45,.height-45{height:45px!important;min-height:45px!important;max-height:45px!important}.w-45,.width-45{width:45px!important;min-width:45px!important;max-width:45px!important}.h-50,.height-50{height:50px!important;min-height:50px!important;max-height:50px!important}.w-50,.width-50{width:50px!important;min-width:50px!important;max-width:50px!important}.h-55,.height-55{height:55px!important;min-height:55px!important;max-height:55px!important}.w-55,.width-55{width:55px!important;min-width:55px!important;max-width:55px!important}.h-60,.height-60{height:60px!important;min-height:60px!important;max-height:60px!important}.w-60,.width-60{width:60px!important;min-width:60px!important;max-width:60px!important}.h-65,.height-65{height:65px!important;min-height:65px!important;max-height:65px!important}.w-65,.width-65{width:65px!important;min-width:65px!important;max-width:65px!important}.h-70,.height-70{height:70px!important;min-height:70px!important;max-height:70px!important}.w-70,.width-70{width:70px!important;min-width:70px!important;max-width:70px!important}.h-75,.height-75{height:75px!important;min-height:75px!important;max-height:75px!important}.w-75,.width-75{width:75px!important;min-width:75px!important;max-width:75px!important}.h-80,.height-80{height:80px!important;min-height:80px!important;max-height:80px!important}.w-80,.width-80{width:80px!important;min-width:80px!important;max-width:80px!important}.h-85,.height-85{height:85px!important;min-height:85px!important;max-height:85px!important}.w-85,.width-85{width:85px!important;min-width:85px!important;max-width:85px!important}.h-90,.height-90{height:90px!important;min-height:90px!important;max-height:90px!important}.w-90,.width-90{width:90px!important;min-width:90px!important;max-width:90px!important}.h-95,.height-95{height:95px!important;min-height:95px!important;max-height:95px!important}.w-95,.width-95{width:95px!important;min-width:95px!important;max-width:95px!important}.h-100,.height-100{height:100px!important;min-height:100px!important;max-height:100px!important}.w-100,.width-100{width:100px!important;min-width:100px!important;max-width:100px!important}.h-105,.height-105{height:105px!important;min-height:105px!important;max-height:105px!important}.w-105,.width-105{width:105px!important;min-width:105px!important;max-width:105px!important}.h-110,.height-110{height:110px!important;min-height:110px!important;max-height:110px!important}.w-110,.width-110{width:110px!important;min-width:110px!important;max-width:110px!important}.h-115,.height-115{height:115px!important;min-height:115px!important;max-height:115px!important}.w-115,.width-115{width:115px!important;min-width:115px!important;max-width:115px!important}.h-120,.height-120{height:120px!important;min-height:120px!important;max-height:120px!important}.w-120,.width-120{width:120px!important;min-width:120px!important;max-width:120px!important}.h-125,.height-125{height:125px!important;min-height:125px!important;max-height:125px!important}.w-125,.width-125{width:125px!important;min-width:125px!important;max-width:125px!important}.h-130,.height-130{height:130px!important;min-height:130px!important;max-height:130px!important}.w-130,.width-130{width:130px!important;min-width:130px!important;max-width:130px!important}.h-135,.height-135{height:135px!important;min-height:135px!important;max-height:135px!important}.w-135,.width-135{width:135px!important;min-width:135px!important;max-width:135px!important}.h-140,.height-140{height:140px!important;min-height:140px!important;max-height:140px!important}.w-140,.width-140{width:140px!important;min-width:140px!important;max-width:140px!important}.h-145,.height-145{height:145px!important;min-height:145px!important;max-height:145px!important}.w-145,.width-145{width:145px!important;min-width:145px!important;max-width:145px!important}.h-150,.height-150{height:150px!important;min-height:150px!important;max-height:150px!important}.w-150,.width-150{width:150px!important;min-width:150px!important;max-width:150px!important}.h-155,.height-155{height:155px!important;min-height:155px!important;max-height:155px!important}.w-155,.width-155{width:155px!important;min-width:155px!important;max-width:155px!important}.h-160,.height-160{height:160px!important;min-height:160px!important;max-height:160px!important}.w-160,.width-160{width:160px!important;min-width:160px!important;max-width:160px!important}.h-165,.height-165{height:165px!important;min-height:165px!important;max-height:165px!important}.w-165,.width-165{width:165px!important;min-width:165px!important;max-width:165px!important}.h-170,.height-170{height:170px!important;min-height:170px!important;max-height:170px!important}.w-170,.width-170{width:170px!important;min-width:170px!important;max-width:170px!important}.h-175,.height-175{height:175px!important;min-height:175px!important;max-height:175px!important}.w-175,.width-175{width:175px!important;min-width:175px!important;max-width:175px!important}.h-180,.height-180{height:180px!important;min-height:180px!important;max-height:180px!important}.w-180,.width-180{width:180px!important;min-width:180px!important;max-width:180px!important}.h-185,.height-185{height:185px!important;min-height:185px!important;max-height:185px!important}.w-185,.width-185{width:185px!important;min-width:185px!important;max-width:185px!important}.h-190,.height-190{height:190px!important;min-height:190px!important;max-height:190px!important}.w-190,.width-190{width:190px!important;min-width:190px!important;max-width:190px!important}.h-195,.height-195{height:195px!important;min-height:195px!important;max-height:195px!important}.w-195,.width-195{width:195px!important;min-width:195px!important;max-width:195px!important}.h-200,.height-200{height:200px!important;min-height:200px!important;max-height:200px!important}.w-200,.width-200{width:200px!important;min-width:200px!important;max-width:200px!important}.h-205,.height-205{height:205px!important;min-height:205px!important;max-height:205px!important}.w-205,.width-205{width:205px!important;min-width:205px!important;max-width:205px!important}.h-210,.height-210{height:210px!important;min-height:210px!important;max-height:210px!important}.w-210,.width-210{width:210px!important;min-width:210px!important;max-width:210px!important}.h-215,.height-215{height:215px!important;min-height:215px!important;max-height:215px!important}.w-215,.width-215{width:215px!important;min-width:215px!important;max-width:215px!important}.h-220,.height-220{height:220px!important;min-height:220px!important;max-height:220px!important}.w-220,.width-220{width:220px!important;min-width:220px!important;max-width:220px!important}.h-225,.height-225{height:225px!important;min-height:225px!important;max-height:225px!important}.w-225,.width-225{width:225px!important;min-width:225px!important;max-width:225px!important}.h-230,.height-230{height:230px!important;min-height:230px!important;max-height:230px!important}.w-230,.width-230{width:230px!important;min-width:230px!important;max-width:230px!important}.h-235,.height-235{height:235px!important;min-height:235px!important;max-height:235px!important}.w-235,.width-235{width:235px!important;min-width:235px!important;max-width:235px!important}.h-240,.height-240{height:240px!important;min-height:240px!important;max-height:240px!important}.w-240,.width-240{width:240px!important;min-width:240px!important;max-width:240px!important}.h-245,.height-245{height:245px!important;min-height:245px!important;max-height:245px!important}.w-245,.width-245{width:245px!important;min-width:245px!important;max-width:245px!important}.h-250,.height-250{height:250px!important;min-height:250px!important;max-height:250px!important}.w-250,.width-250{width:250px!important;min-width:250px!important;max-width:250px!important}.h-255,.height-255{height:255px!important;min-height:255px!important;max-height:255px!important}.w-255,.width-255{width:255px!important;min-width:255px!important;max-width:255px!important}.h-260,.height-260{height:260px!important;min-height:260px!important;max-height:260px!important}.w-260,.width-260{width:260px!important;min-width:260px!important;max-width:260px!important}.h-265,.height-265{height:265px!important;min-height:265px!important;max-height:265px!important}.w-265,.width-265{width:265px!important;min-width:265px!important;max-width:265px!important}.h-270,.height-270{height:270px!important;min-height:270px!important;max-height:270px!important}.w-270,.width-270{width:270px!important;min-width:270px!important;max-width:270px!important}.h-275,.height-275{height:275px!important;min-height:275px!important;max-height:275px!important}.w-275,.width-275{width:275px!important;min-width:275px!important;max-width:275px!important}.h-280,.height-280{height:280px!important;min-height:280px!important;max-height:280px!important}.w-280,.width-280{width:280px!important;min-width:280px!important;max-width:280px!important}.h-285,.height-285{height:285px!important;min-height:285px!important;max-height:285px!important}.w-285,.width-285{width:285px!important;min-width:285px!important;max-width:285px!important}.h-290,.height-290{height:290px!important;min-height:290px!important;max-height:290px!important}.w-290,.width-290{width:290px!important;min-width:290px!important;max-width:290px!important}.h-295,.height-295{height:295px!important;min-height:295px!important;max-height:295px!important}.w-295,.width-295{width:295px!important;min-width:295px!important;max-width:295px!important}.h-300,.height-300{height:300px!important;min-height:300px!important;max-height:300px!important}.w-300,.width-300{width:300px!important;min-width:300px!important;max-width:300px!important}.h-305,.height-305{height:305px!important;min-height:305px!important;max-height:305px!important}.w-305,.width-305{width:305px!important;min-width:305px!important;max-width:305px!important}.h-310,.height-310{height:310px!important;min-height:310px!important;max-height:310px!important}.w-310,.width-310{width:310px!important;min-width:310px!important;max-width:310px!important}.h-315,.height-315{height:315px!important;min-height:315px!important;max-height:315px!important}.w-315,.width-315{width:315px!important;min-width:315px!important;max-width:315px!important}.h-320,.height-320{height:320px!important;min-height:320px!important;max-height:320px!important}.w-320,.width-320{width:320px!important;min-width:320px!important;max-width:320px!important}.h-325,.height-325{height:325px!important;min-height:325px!important;max-height:325px!important}.w-325,.width-325{width:325px!important;min-width:325px!important;max-width:325px!important}.h-330,.height-330{height:330px!important;min-height:330px!important;max-height:330px!important}.w-330,.width-330{width:330px!important;min-width:330px!important;max-width:330px!important}.h-335,.height-335{height:335px!important;min-height:335px!important;max-height:335px!important}.w-335,.width-335{width:335px!important;min-width:335px!important;max-width:335px!important}.h-340,.height-340{height:340px!important;min-height:340px!important;max-height:340px!important}.w-340,.width-340{width:340px!important;min-width:340px!important;max-width:340px!important}.h-345,.height-345{height:345px!important;min-height:345px!important;max-height:345px!important}.w-345,.width-345{width:345px!important;min-width:345px!important;max-width:345px!important}.h-350,.height-350{height:350px!important;min-height:350px!important;max-height:350px!important}.w-350,.width-350{width:350px!important;min-width:350px!important;max-width:350px!important}.h-355,.height-355{height:355px!important;min-height:355px!important;max-height:355px!important}.w-355,.width-355{width:355px!important;min-width:355px!important;max-width:355px!important}.h-360,.height-360{height:360px!important;min-height:360px!important;max-height:360px!important}.w-360,.width-360{width:360px!important;min-width:360px!important;max-width:360px!important}.h-365,.height-365{height:365px!important;min-height:365px!important;max-height:365px!important}.w-365,.width-365{width:365px!important;min-width:365px!important;max-width:365px!important}.h-370,.height-370{height:370px!important;min-height:370px!important;max-height:370px!important}.w-370,.width-370{width:370px!important;min-width:370px!important;max-width:370px!important}.h-375,.height-375{height:375px!important;min-height:375px!important;max-height:375px!important}.w-375,.width-375{width:375px!important;min-width:375px!important;max-width:375px!important}.h-380,.height-380{height:380px!important;min-height:380px!important;max-height:380px!important}.w-380,.width-380{width:380px!important;min-width:380px!important;max-width:380px!important}.h-385,.height-385{height:385px!important;min-height:385px!important;max-height:385px!important}.w-385,.width-385{width:385px!important;min-width:385px!important;max-width:385px!important}.h-390,.height-390{height:390px!important;min-height:390px!important;max-height:390px!important}.w-390,.width-390{width:390px!important;min-width:390px!important;max-width:390px!important}.h-395,.height-395{height:395px!important;min-height:395px!important;max-height:395px!important}.w-395,.width-395{width:395px!important;min-width:395px!important;max-width:395px!important}.h-400,.height-400{height:400px!important;min-height:400px!important;max-height:400px!important}.w-400,.width-400{width:400px!important;min-width:400px!important;max-width:400px!important}.h-405,.height-405{height:405px!important;min-height:405px!important;max-height:405px!important}.w-405,.width-405{width:405px!important;min-width:405px!important;max-width:405px!important}.h-410,.height-410{height:410px!important;min-height:410px!important;max-height:410px!important}.w-410,.width-410{width:410px!important;min-width:410px!important;max-width:410px!important}.h-415,.height-415{height:415px!important;min-height:415px!important;max-height:415px!important}.w-415,.width-415{width:415px!important;min-width:415px!important;max-width:415px!important}.h-420,.height-420{height:420px!important;min-height:420px!important;max-height:420px!important}.w-420,.width-420{width:420px!important;min-width:420px!important;max-width:420px!important}.h-425,.height-425{height:425px!important;min-height:425px!important;max-height:425px!important}.w-425,.width-425{width:425px!important;min-width:425px!important;max-width:425px!important}.h-430,.height-430{height:430px!important;min-height:430px!important;max-height:430px!important}.w-430,.width-430{width:430px!important;min-width:430px!important;max-width:430px!important}.h-435,.height-435{height:435px!important;min-height:435px!important;max-height:435px!important}.w-435,.width-435{width:435px!important;min-width:435px!important;max-width:435px!important}.h-440,.height-440{height:440px!important;min-height:440px!important;max-height:440px!important}.w-440,.width-440{width:440px!important;min-width:440px!important;max-width:440px!important}.h-445,.height-445{height:445px!important;min-height:445px!important;max-height:445px!important}.w-445,.width-445{width:445px!important;min-width:445px!important;max-width:445px!important}.h-450,.height-450{height:450px!important;min-height:450px!important;max-height:450px!important}.w-450,.width-450{width:450px!important;min-width:450px!important;max-width:450px!important}.h-455,.height-455{height:455px!important;min-height:455px!important;max-height:455px!important}.w-455,.width-455{width:455px!important;min-width:455px!important;max-width:455px!important}.h-460,.height-460{height:460px!important;min-height:460px!important;max-height:460px!important}.w-460,.width-460{width:460px!important;min-width:460px!important;max-width:460px!important}.h-465,.height-465{height:465px!important;min-height:465px!important;max-height:465px!important}.w-465,.width-465{width:465px!important;min-width:465px!important;max-width:465px!important}.h-470,.height-470{height:470px!important;min-height:470px!important;max-height:470px!important}.w-470,.width-470{width:470px!important;min-width:470px!important;max-width:470px!important}.h-475,.height-475{height:475px!important;min-height:475px!important;max-height:475px!important}.w-475,.width-475{width:475px!important;min-width:475px!important;max-width:475px!important}.h-480,.height-480{height:480px!important;min-height:480px!important;max-height:480px!important}.w-480,.width-480{width:480px!important;min-width:480px!important;max-width:480px!important}.h-485,.height-485{height:485px!important;min-height:485px!important;max-height:485px!important}.w-485,.width-485{width:485px!important;min-width:485px!important;max-width:485px!important}.h-490,.height-490{height:490px!important;min-height:490px!important;max-height:490px!important}.w-490,.width-490{width:490px!important;min-width:490px!important;max-width:490px!important}.h-495,.height-495{height:495px!important;min-height:495px!important;max-height:495px!important}.w-495,.width-495{width:495px!important;min-width:495px!important;max-width:495px!important}.h-500,.height-500{height:500px!important;min-height:500px!important;max-height:500px!important}.w-500,.width-500{width:500px!important;min-width:500px!important;max-width:500px!important}.h-8,.height-8{height:8px!important;min-height:8px!important;max-height:8px!important}.w-8,.width-8{width:8px!important;min-width:8px!important;max-width:8px!important}.h-16,.height-16{height:16px!important;min-height:16px!important;max-height:16px!important}.w-16,.width-16{width:16px!important;min-width:16px!important;max-width:16px!important}.h-24,.height-24{height:24px!important;min-height:24px!important;max-height:24px!important}.w-24,.width-24{width:24px!important;min-width:24px!important;max-width:24px!important}.h-32,.height-32{height:32px!important;min-height:32px!important;max-height:32px!important}.w-32,.width-32{width:32px!important;min-width:32px!important;max-width:32px!important}.h-48,.height-48{height:48px!important;min-height:48px!important;max-height:48px!important}.w-48,.width-48{width:48px!important;min-width:48px!important;max-width:48px!important}.h-56,.height-56{height:56px!important;min-height:56px!important;max-height:56px!important}.w-56,.width-56{width:56px!important;min-width:56px!important;max-width:56px!important}.h-64,.height-64{height:64px!important;min-height:64px!important;max-height:64px!important}.w-64,.width-64{width:64px!important;min-width:64px!important;max-width:64px!important}.h-72,.height-72{height:72px!important;min-height:72px!important;max-height:72px!important}.w-72,.width-72{width:72px!important;min-width:72px!important;max-width:72px!important}.h-88,.height-88{height:88px!important;min-height:88px!important;max-height:88px!important}.w-88,.width-88{width:88px!important;min-width:88px!important;max-width:88px!important}.h-96,.height-96{height:96px!important;min-height:96px!important;max-height:96px!important}.w-96,.width-96{width:96px!important;min-width:96px!important;max-width:96px!important}.h-104,.height-104{height:104px!important;min-height:104px!important;max-height:104px!important}.w-104,.width-104{width:104px!important;min-width:104px!important;max-width:104px!important}.h-112,.height-112{height:112px!important;min-height:112px!important;max-height:112px!important}.w-112,.width-112{width:112px!important;min-width:112px!important;max-width:112px!important}.h-128,.height-128{height:128px!important;min-height:128px!important;max-height:128px!important}.w-128,.width-128{width:128px!important;min-width:128px!important;max-width:128px!important}.h-136,.height-136{height:136px!important;min-height:136px!important;max-height:136px!important}.w-136,.width-136{width:136px!important;min-width:136px!important;max-width:136px!important}.h-144,.height-144{height:144px!important;min-height:144px!important;max-height:144px!important}.w-144,.width-144{width:144px!important;min-width:144px!important;max-width:144px!important}.h-152,.height-152{height:152px!important;min-height:152px!important;max-height:152px!important}.w-152,.width-152{width:152px!important;min-width:152px!important;max-width:152px!important}.h-168,.height-168{height:168px!important;min-height:168px!important;max-height:168px!important}.w-168,.width-168{width:168px!important;min-width:168px!important;max-width:168px!important}.h-176,.height-176{height:176px!important;min-height:176px!important;max-height:176px!important}.w-176,.width-176{width:176px!important;min-width:176px!important;max-width:176px!important}.h-184,.height-184{height:184px!important;min-height:184px!important;max-height:184px!important}.w-184,.width-184{width:184px!important;min-width:184px!important;max-width:184px!important}.h-192,.height-192{height:192px!important;min-height:192px!important;max-height:192px!important}.w-192,.width-192{width:192px!important;min-width:192px!important;max-width:192px!important}.h-208,.height-208{height:208px!important;min-height:208px!important;max-height:208px!important}.w-208,.width-208{width:208px!important;min-width:208px!important;max-width:208px!important}.h-216,.height-216{height:216px!important;min-height:216px!important;max-height:216px!important}.w-216,.width-216{width:216px!important;min-width:216px!important;max-width:216px!important}.h-224,.height-224{height:224px!important;min-height:224px!important;max-height:224px!important}.w-224,.width-224{width:224px!important;min-width:224px!important;max-width:224px!important}.h-232,.height-232{height:232px!important;min-height:232px!important;max-height:232px!important}.w-232,.width-232{width:232px!important;min-width:232px!important;max-width:232px!important}.h-248,.height-248{height:248px!important;min-height:248px!important;max-height:248px!important}.w-248,.width-248{width:248px!important;min-width:248px!important;max-width:248px!important}.h-256,.height-256{height:256px!important;min-height:256px!important;max-height:256px!important}.w-256,.width-256{width:256px!important;min-width:256px!important;max-width:256px!important}.h-264,.height-264{height:264px!important;min-height:264px!important;max-height:264px!important}.w-264,.width-264{width:264px!important;min-width:264px!important;max-width:264px!important}.h-272,.height-272{height:272px!important;min-height:272px!important;max-height:272px!important}.w-272,.width-272{width:272px!important;min-width:272px!important;max-width:272px!important}.h-288,.height-288{height:288px!important;min-height:288px!important;max-height:288px!important}.w-288,.width-288{width:288px!important;min-width:288px!important;max-width:288px!important}.h-296,.height-296{height:296px!important;min-height:296px!important;max-height:296px!important}.w-296,.width-296{width:296px!important;min-width:296px!important;max-width:296px!important}.h-304,.height-304{height:304px!important;min-height:304px!important;max-height:304px!important}.w-304,.width-304{width:304px!important;min-width:304px!important;max-width:304px!important}.h-312,.height-312{height:312px!important;min-height:312px!important;max-height:312px!important}.w-312,.width-312{width:312px!important;min-width:312px!important;max-width:312px!important}.h-328,.height-328{height:328px!important;min-height:328px!important;max-height:328px!important}.w-328,.width-328{width:328px!important;min-width:328px!important;max-width:328px!important}.h-336,.height-336{height:336px!important;min-height:336px!important;max-height:336px!important}.w-336,.width-336{width:336px!important;min-width:336px!important;max-width:336px!important}.h-344,.height-344{height:344px!important;min-height:344px!important;max-height:344px!important}.w-344,.width-344{width:344px!important;min-width:344px!important;max-width:344px!important}.h-352,.height-352{height:352px!important;min-height:352px!important;max-height:352px!important}.w-352,.width-352{width:352px!important;min-width:352px!important;max-width:352px!important}.h-368,.height-368{height:368px!important;min-height:368px!important;max-height:368px!important}.w-368,.width-368{width:368px!important;min-width:368px!important;max-width:368px!important}.h-376,.height-376{height:376px!important;min-height:376px!important;max-height:376px!important}.w-376,.width-376{width:376px!important;min-width:376px!important;max-width:376px!important}.h-384,.height-384{height:384px!important;min-height:384px!important;max-height:384px!important}.w-384,.width-384{width:384px!important;min-width:384px!important;max-width:384px!important}.h-392,.height-392{height:392px!important;min-height:392px!important;max-height:392px!important}.w-392,.width-392{width:392px!important;min-width:392px!important;max-width:392px!important}.h-408,.height-408{height:408px!important;min-height:408px!important;max-height:408px!important}.w-408,.width-408{width:408px!important;min-width:408px!important;max-width:408px!important}.h-416,.height-416{height:416px!important;min-height:416px!important;max-height:416px!important}.w-416,.width-416{width:416px!important;min-width:416px!important;max-width:416px!important}.h-424,.height-424{height:424px!important;min-height:424px!important;max-height:424px!important}.w-424,.width-424{width:424px!important;min-width:424px!important;max-width:424px!important}.h-432,.height-432{height:432px!important;min-height:432px!important;max-height:432px!important}.w-432,.width-432{width:432px!important;min-width:432px!important;max-width:432px!important}.h-448,.height-448{height:448px!important;min-height:448px!important;max-height:448px!important}.w-448,.width-448{width:448px!important;min-width:448px!important;max-width:448px!important}.h-456,.height-456{height:456px!important;min-height:456px!important;max-height:456px!important}.w-456,.width-456{width:456px!important;min-width:456px!important;max-width:456px!important}.h-464,.height-464{height:464px!important;min-height:464px!important;max-height:464px!important}.w-464,.width-464{width:464px!important;min-width:464px!important;max-width:464px!important}.h-472,.height-472{height:472px!important;min-height:472px!important;max-height:472px!important}.w-472,.width-472{width:472px!important;min-width:472px!important;max-width:472px!important}.h-488,.height-488{height:488px!important;min-height:488px!important;max-height:488px!important}.w-488,.width-488{width:488px!important;min-width:488px!important;max-width:488px!important}.h-496,.height-496{height:496px!important;min-height:496px!important;max-height:496px!important}.w-496,.width-496{width:496px!important;min-width:496px!important;max-width:496px!important}.h-504,.height-504{height:504px!important;min-height:504px!important;max-height:504px!important}.w-504,.width-504{width:504px!important;min-width:504px!important;max-width:504px!important}.h-512,.height-512{height:512px!important;min-height:512px!important;max-height:512px!important}.w-512,.width-512{width:512px!important;min-width:512px!important;max-width:512px!important}.h-528,.height-528{height:528px!important;min-height:528px!important;max-height:528px!important}.w-528,.width-528{width:528px!important;min-width:528px!important;max-width:528px!important}.h-536,.height-536{height:536px!important;min-height:536px!important;max-height:536px!important}.w-536,.width-536{width:536px!important;min-width:536px!important;max-width:536px!important}.h-544,.height-544{height:544px!important;min-height:544px!important;max-height:544px!important}.w-544,.width-544{width:544px!important;min-width:544px!important;max-width:544px!important}.h-552,.height-552{height:552px!important;min-height:552px!important;max-height:552px!important}.w-552,.width-552{width:552px!important;min-width:552px!important;max-width:552px!important}.h-568,.height-568{height:568px!important;min-height:568px!important;max-height:568px!important}.w-568,.width-568{width:568px!important;min-width:568px!important;max-width:568px!important}.h-576,.height-576{height:576px!important;min-height:576px!important;max-height:576px!important}.w-576,.width-576{width:576px!important;min-width:576px!important;max-width:576px!important}.h-584,.height-584{height:584px!important;min-height:584px!important;max-height:584px!important}.w-584,.width-584{width:584px!important;min-width:584px!important;max-width:584px!important}.h-592,.height-592{height:592px!important;min-height:592px!important;max-height:592px!important}.w-592,.width-592{width:592px!important;min-width:592px!important;max-width:592px!important}.h-608,.height-608{height:608px!important;min-height:608px!important;max-height:608px!important}.w-608,.width-608{width:608px!important;min-width:608px!important;max-width:608px!important}.h-616,.height-616{height:616px!important;min-height:616px!important;max-height:616px!important}.w-616,.width-616{width:616px!important;min-width:616px!important;max-width:616px!important}.h-624,.height-624{height:624px!important;min-height:624px!important;max-height:624px!important}.w-624,.width-624{width:624px!important;min-width:624px!important;max-width:624px!important}.h-632,.height-632{height:632px!important;min-height:632px!important;max-height:632px!important}.w-632,.width-632{width:632px!important;min-width:632px!important;max-width:632px!important}.h-648,.height-648{height:648px!important;min-height:648px!important;max-height:648px!important}.w-648,.width-648{width:648px!important;min-width:648px!important;max-width:648px!important}.h-656,.height-656{height:656px!important;min-height:656px!important;max-height:656px!important}.w-656,.width-656{width:656px!important;min-width:656px!important;max-width:656px!important}.h-664,.height-664{height:664px!important;min-height:664px!important;max-height:664px!important}.w-664,.width-664{width:664px!important;min-width:664px!important;max-width:664px!important}.h-672,.height-672{height:672px!important;min-height:672px!important;max-height:672px!important}.w-672,.width-672{width:672px!important;min-width:672px!important;max-width:672px!important}.h-688,.height-688{height:688px!important;min-height:688px!important;max-height:688px!important}.w-688,.width-688{width:688px!important;min-width:688px!important;max-width:688px!important}.h-696,.height-696{height:696px!important;min-height:696px!important;max-height:696px!important}.w-696,.width-696{width:696px!important;min-width:696px!important;max-width:696px!important}.h-704,.height-704{height:704px!important;min-height:704px!important;max-height:704px!important}.w-704,.width-704{width:704px!important;min-width:704px!important;max-width:704px!important}.h-712,.height-712{height:712px!important;min-height:712px!important;max-height:712px!important}.w-712,.width-712{width:712px!important;min-width:712px!important;max-width:712px!important}.h-728,.height-728{height:728px!important;min-height:728px!important;max-height:728px!important}.w-728,.width-728{width:728px!important;min-width:728px!important;max-width:728px!important}.h-736,.height-736{height:736px!important;min-height:736px!important;max-height:736px!important}.w-736,.width-736{width:736px!important;min-width:736px!important;max-width:736px!important}.h-744,.height-744{height:744px!important;min-height:744px!important;max-height:744px!important}.w-744,.width-744{width:744px!important;min-width:744px!important;max-width:744px!important}.h-752,.height-752{height:752px!important;min-height:752px!important;max-height:752px!important}.w-752,.width-752{width:752px!important;min-width:752px!important;max-width:752px!important}.h-768,.height-768{height:768px!important;min-height:768px!important;max-height:768px!important}.w-768,.width-768{width:768px!important;min-width:768px!important;max-width:768px!important}.h-776,.height-776{height:776px!important;min-height:776px!important;max-height:776px!important}.w-776,.width-776{width:776px!important;min-width:776px!important;max-width:776px!important}.h-784,.height-784{height:784px!important;min-height:784px!important;max-height:784px!important}.w-784,.width-784{width:784px!important;min-width:784px!important;max-width:784px!important}.h-792,.height-792{height:792px!important;min-height:792px!important;max-height:792px!important}.w-792,.width-792{width:792px!important;min-width:792px!important;max-width:792px!important}.b,.border{border:1px solid rgba(0,0,0,.12)}.border-top,.bt{border-top:1px solid rgba(0,0,0,.12)}.border-right,.br{border-right:1px solid rgba(0,0,0,.12)}.bb,.border-bottom{border-bottom:1px solid rgba(0,0,0,.12)}.bl,.border-left{border-left:1px solid rgba(0,0,0,.12)}.bh,.border-horizontal{border-left:1px solid rgba(0,0,0,.12);border-right:1px solid rgba(0,0,0,.12)}.border-vertical,.bv{border-top:1px solid rgba(0,0,0,.12);border-bottom:1px solid rgba(0,0,0,.12)}.brad-1{border-radius:1px}.brad-2{border-radius:2px}.brad-3{border-radius:3px}.brad-4{border-radius:4px}.brad-5{border-radius:5px}.brad-6{border-radius:6px}.brad-7{border-radius:7px}.brad-8{border-radius:8px}.brad-9{border-radius:9px}.brad-10{border-radius:10px}.brad-11{border-radius:11px}.brad-12{border-radius:12px}@media all{.page-break{display:none}}@media print{.page-break{display:block;break-after:always;page-break-after:always}#main #vertical-navigation{display:none}#main #toolbar{display:none}#main #quick-panel{display:none}#main #content{position:relative!important;top:0!important;right:0!important;bottom:0!important;left:0!important;background:0 0!important}ms-theme-options{display:none}.ps-scrollbar-x-rail,.ps-scrollbar-y-rail{display:none!important}.printable{overflow:visible!important}.printable .template-layout{display:inline!important}}.advanced-search-container{border-bottom:1px rgba(0,0,0,.12) solid}.advanced-search-conditions{border-bottom:1px rgba(0,0,0,.12) solid;padding:4px 0}.advanced-search-conditions .errors{font-size:12px;color:#dd2c00;margin-top:10px}.advanced-search-conditions .advanced-search-chips md-chips-wrap{box-shadow:none}.advanced-search-conditions .advanced-search-chips md-chip{position:relative}.advanced-search-conditions .advanced-search-chips md-chip .md-chip-content md-chip-template span p.filter-text{display:inline-block;margin:0}.advanced-search-conditions .advanced-search-chips md-chip .md-chip-remove-container{position:absolute;right:4px;top:4px;margin-right:0;height:24px}.advanced-search-conditions .advanced-search-chips md-chip .md-chip-remove-container button.remove-filter{position:relative;height:24px;width:24px;line-height:30px;text-align:center;border-radius:50%;border:none;box-shadow:none;padding:0;margin:0;transition:background .15s linear;display:block}.advanced-search-conditions .advanced-search-chips md-chip .md-chip-remove-container button.remove-filter md-icon{position:absolute;top:50%;left:50%;transform:translate3d(-50%,-50%,0);color:#616161}.advanced-search-conditions .advanced-search-chips md-chip .md-chip-remove-container button.remove-filter md-icon:focus,.advanced-search-conditions .advanced-search-chips md-chip .md-chip-remove-container button.remove-filter md-icon:hover{color:rgba(255,0,0,.8)}.advanced-search-conditions .advanced-search-chips md-chips-wrap.md-removable md-chip md-chip-template{padding-right:5px}.advanced-search-bar{padding:10px 0}.advanced-search-bar md-input-container.no-errors{font-size:12px;transition:0s none;-webkit-transition:0s none;animation:0s none;-webkit-animation:0s none}.advanced-search-bar md-input-container.no-errors input{font-family:Arial Unicode MS,Arial,Helvetica}.advanced-search-bar md-input-container.no-errors .md-errors-spacer{min-height:0}md-option div div.operators-list{display:table}md-option div div.operators-list span{display:table-cell}md-option div div.operators-list span.operator-symbol{display:table-cell;font-size:14px;width:30px}.advanced-search-bar mdp-date-picker button{margin:0!important}.advanced-search-bar mdp-date-picker md-input-container{flex:1;margin:0}.advanced-search-bar mdp-date-picker md-input-container label{font-size:12px}.advanced-search-bar mdp-date-picker md-input-container .md-errors-spacer{min-height:0}.advanced-search-bar div md-date-range{font-size:12px;margin-left:10px}.advanced-search-bar div.autocomplete-input md-icon{margin:8px 8px 8px 0}.advanced-search-bar div.autocomplete-input md-autocomplete{font-size:12px!important}.advanced-search-bar div.autocomplete-input md-autocomplete md-autocomplete-wrap{height:0}.advanced-search-bar div.autocomplete-input md-autocomplete md-autocomplete-wrap md-input-container{margin:0}.advanced-search-bar div.autocomplete-input md-autocomplete md-autocomplete-wrap md-input-container input[type=search]{padding:0!important}.advanced-search-bar div.autocomplete-input md-autocomplete md-autocomplete-wrap md-input-container div.md-errors-spacer{min-height:0}md-toolbar.advanced-search-dialog-header{background-image:url(/assets/images/backgrounds/header-bg.png);background-position:top}.md-autocomplete-suggestions-container li .highlight,.md-autocomplete-suggestions-container.md-default-theme li .highlight{color:#ca1d1d;font-weight:700}.chip-disabled{opacity:.4}.ms-card{display:flex;flex-direction:row;padding:8px}.ms-card .ms-card-content-wrapper{position:relative;overflow:hidden;width:100%;max-width:400px;border-radius:2px;background:#fff;box-shadow:0 3px 1px -2px rgba(0,0,0,.14),0 2px 2px 0 rgba(0,0,0,.098),0 1px 5px 0 rgba(0,0,0,.084)}.ms-card .template-1 .media .image{width:100%;border-radius:2px 2px 0 0}.ms-card .template-10 .media{width:80px;min-width:80px;max-width:80px}.ms-card .template-2 .header .avatar .image{display:block;width:40px;height:40px;border-radius:20px}.ms-card .template-2 .media .image{width:100%}.ms-card .template-4 .info{position:absolute;right:0;bottom:0;left:0;z-index:2;background:rgba(0,0,0,.54)}.ms-card .template-4 .media{z-index:1}.ms-card .template-4 .media .image{width:100%}.ms-card .template-5 .media{width:80px;min-width:80px;max-width:80px}.ms-card .template-5 .info,.ms-card .template-5 .media{-ms-flex:0 1 auto}.ms-card .template-8 .media .image{width:100%;border-radius:2px 2px 0 0}.ms-card .template-9 .header .avatar .image{display:block;width:40px;height:40px;border-radius:20px}.ms-card .template-9 .media .image{width:100%}md-tooltip.client-side-logging-tooltip div.md-content{height:auto;max-width:200px;white-space:normal;text-align:center}md-list-item .md-list-item-text p.ms-dual-multiselect-line-xs{font-size:10px!important;padding-top:5px}md-list-item md-icon.hidden{visibility:hidden}md-icon.add-disabled{cursor:default!important;opacity:.4}md-list-item.read-only-mode{cursor:none!important}.ms-form-wizard{background:#fff;box-shadow:0 1px 3px 0 rgba(0,0,0,.2),0 1px 1px 0 rgba(0,0,0,.14),0 2px 1px -1px rgba(0,0,0,.12)}.ms-form-wizard md-tabs md-tabs-wrapper{box-shadow:0 1px 3px 0 rgba(0,0,0,.2),0 1px 1px 0 rgba(0,0,0,.14),0 2px 1px -1px rgba(0,0,0,.12)}.ms-form-wizard md-tabs md-tabs-wrapper md-tabs-canvas{height:72px}.ms-form-wizard md-tabs md-tabs-wrapper md-tabs-canvas md-pagination-wrapper{height:72px}.ms-form-wizard md-tabs md-tabs-wrapper md-tabs-canvas md-pagination-wrapper md-tab-item{opacity:1!important;padding:24px}.ms-form-wizard md-tabs md-tabs-wrapper md-tabs-canvas md-pagination-wrapper md-tab-item:before{content:'';display:block;position:absolute;top:50%;left:0;right:50%;border-bottom:1px solid rgba(0,0,0,.12);z-index:8}.ms-form-wizard md-tabs md-tabs-wrapper md-tabs-canvas md-pagination-wrapper md-tab-item:after{content:'';display:block;position:absolute;top:50%;left:50%;right:0;border-bottom:1px solid rgba(0,0,0,.12);z-index:8}.ms-form-wizard md-tabs md-tabs-wrapper md-tabs-canvas md-pagination-wrapper md-tab-item:first-of-type:before{display:none}.ms-form-wizard md-tabs md-tabs-wrapper md-tabs-canvas md-pagination-wrapper md-tab-item:last-of-type:after{display:none}.ms-form-wizard md-tabs md-tabs-wrapper md-tabs-canvas md-pagination-wrapper md-tab-item.md-disabled .ms-form-wizard-step-label .ms-form-wizard-step-number{background:rgba(0,0,0,.12)!important}.ms-form-wizard md-tabs md-tabs-wrapper md-tabs-canvas md-pagination-wrapper md-tab-item .md-ripple-container{z-index:11}.ms-form-wizard md-tabs md-tabs-wrapper md-tabs-canvas md-ink-bar{display:none!important}.ms-form-wizard .ms-form-wizard-step-label{display:inline-block;position:relative;background:#fff;z-index:10;padding:0 16px;line-height:24px}.ms-form-wizard .ms-form-wizard-step-label .ms-form-wizard-step-number{display:inline-block;vertical-align:middle;width:24px;height:24px;line-height:24px;font-size:14px;margin-right:12px;border-radius:50%;color:#fff!important}.ms-form-wizard .ms-form-wizard-step-label .ms-form-wizard-step-number i{line-height:24px!important}.ms-form-wizard .ms-form-wizard-step-label .ms-form-wizard-step-text{display:inline-block;vertical-align:middle;position:relative;line-height:24px}.ms-form-wizard .ms-form-wizard-form{padding:24px 16px}.ms-form-wizard .navigation{padding:16px}.ms-form-wizard .navigation .steps{display:flex;align-items:center;justify-content:center;padding:0 16px}.ms-form-wizard .navigation .steps span{width:5px;height:5px;margin:0 4px;border-radius:50%}.ms-form-wizard .navigation .steps span:not(.md-accent-bg){background:rgba(0,0,0,.12)}.ms-form-wizard .navigation .steps span.selected{width:8px;height:8px}ms-info-bar{display:block;position:relative;width:100%;height:44px;background-color:#e91e63;z-index:99998;box-shadow:0 1px 5px 0 rgba(0,0,0,.2),0 2px 2px 0 rgba(0,0,0,.14),0 3px 1px -2px rgba(0,0,0,.12)}ms-info-bar #ms-info-bar-message{padding:8px 16px;line-height:28px;font-size:14px}ms-info-bar #ms-info-bar-message a{overflow:hidden;height:48px;color:#fff}ms-masonry{width:100%;display:block}ms-masonry [ms-masonry-item],ms-masonry ms-masonry-item{transition:transform .3s ease;position:absolute;transform:translate3d(50vw,100vh,0)}ms-material-color-picker md-menu .md-button{font-size:12px}md-menu-content.ms-material-color-picker-menu-content{width:208px;max-width:208px;min-width:208px;padding:0;overflow:hidden}md-menu-content.ms-material-color-picker-menu-content header{height:48px;text-transform:uppercase}md-menu-content.ms-material-color-picker-menu-content header .md-button{display:flex;margin:0}md-menu-content.ms-material-color-picker-menu-content header>span{line-height:13px}md-menu-content.ms-material-color-picker-menu-content .colors{position:relative;width:208px;min-height:258px;height:258px;padding:4px}md-menu-content.ms-material-color-picker-menu-content .colors .color{position:relative;width:46px;height:46px;margin:2px;border-radius:0;cursor:pointer}md-menu-content.ms-material-color-picker-menu-content .colors .color .label{padding:2px;font-size:10px}md-menu-content.ms-material-color-picker-menu-content .colors .color .icon-check{position:absolute;top:2px;right:2px;font-size:16px;opacity:.7}ms-nav{display:block;position:relative;color:rgba(255,255,255,.7);user-select:none;z-index:70}ms-nav ms-nav-item{display:block;position:relative;line-height:48px}ms-nav ms-nav-item.ms-nav-title{line-height:32px;font-size:12px;font-weight:500;margin-top:8px;padding:0 24px;width:100%;color:rgba(255,255,255,.3);text-transform:uppercase;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}ms-nav ms-nav-item .ms-nav-button{display:flex;align-self:flex-start;align-items:center;position:relative;cursor:pointer;padding:0 48px 0 24px;color:rgba(255,255,255,.7);text-decoration:none}ms-nav ms-nav-item .ms-nav-button:not(.active):hover{background:rgba(0,0,0,.1);text-decoration:none}ms-nav ms-nav-item .ms-nav-button .ms-nav-label{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;transition:opacity .2s ease-in-out .1s}ms-nav ms-nav-item .ms-nav-button .arrow{position:absolute;top:16px;right:24px;margin:0;transition:transform .3s ease-in-out,opacity .2s ease-in-out .1s}ms-nav ms-nav-item .ms-nav-button .ms-nav-badge{position:absolute;top:50%;right:24px;min-width:20px;height:20px;line-height:20px;padding:0 7px;font-size:11px;font-weight:700;border-radius:20px;transform:translateY(-50%);transition:opacity .2s ease-in-out .1s}ms-nav ms-nav-item .ms-nav-button.active{color:#fff!important}ms-nav ms-nav-item .ms-nav-button.active .ms-nav-badge{background:#fff!important;color:rgba(0,0,0,.87)!important}ms-nav ms-nav-item .ms-nav-button.active i{color:#fff}ms-nav ms-nav-item i{color:rgba(255,255,255,.7);margin:0 16px 0 0}ms-nav .ms-nav-toggle ms-nav-toggle-items{display:none;overflow:hidden}ms-nav .ms-nav-toggle ms-nav-toggle-items.expand-animation{transition:height .35s cubic-bezier(.25,.46,.45,.94)}ms-nav .ms-nav-toggle ms-nav-toggle-items.collapse-animation{transition:height .35s cubic-bezier(.25,.46,.45,.94)}ms-nav .ms-nav-toggle ms-nav-toggle-items ms-nav-item .ms-nav-button{padding-left:58px}ms-nav .ms-nav-toggle ms-nav-toggle-items ms-nav-item ms-nav-toggle-items ms-nav-item .ms-nav-button{padding-left:68px}ms-nav .ms-nav-toggle ms-nav-toggle-items ms-nav-item ms-nav-toggle-items ms-nav-item ms-nav-toggle-items ms-nav-item .ms-nav-button{padding-left:78px}ms-nav .ms-nav-toggle ms-nav-toggle-items ms-nav-item ms-nav-toggle-items ms-nav-item ms-nav-toggle-items ms-nav-item ms-nav-toggle-items ms-nav-item .ms-nav-button{padding-left:88px}ms-nav .ms-nav-toggle ms-nav-toggle-items ms-nav-item ms-nav-toggle-items ms-nav-item ms-nav-toggle-items ms-nav-item ms-nav-toggle-items ms-nav-item ms-nav-toggle-items ms-nav-item .ms-nav-button{padding-left:98px}ms-nav .ms-nav-toggle.active>.ms-nav-button{color:#fff}ms-nav .ms-nav-toggle.active>.ms-nav-button a,ms-nav .ms-nav-toggle.active>.ms-nav-button md-icon{color:#fff}ms-nav .ms-nav-toggle[collapsed=false]>.ms-nav-button>.arrow{transform:rotate(90deg)}ms-nav>.ms-nav-toggle[collapsed=false]{background-color:rgba(0,0,0,.12)}@media only screen and (min-width:1280px){.ms-nav-folded #ms-nav-fold-close-overlay{position:absolute;top:0;right:0;bottom:0;left:0;background:0 0;z-index:998}.ms-nav-folded #ms-nav-fold-open-overlay{position:absolute;top:0;right:0;bottom:0;left:0;z-index:999}.ms-nav-folded:not(.ms-nav-folded-open) ms-nav ms-nav-item.ms-nav-title{height:32px}.ms-nav-folded:not(.ms-nav-folded-open) ms-nav ms-nav-item.ms-nav-title:before{content:'';display:block;position:relative;top:12px;width:16px;border-top:1px solid rgba(255,255,255,.12)}.ms-nav-folded:not(.ms-nav-folded-open) ms-nav ms-nav-item.ms-nav-title span{display:none}.ms-nav-folded:not(.ms-nav-folded-open) ms-nav ms-nav-item .ms-nav-button{height:48px}.ms-nav-folded:not(.ms-nav-folded-open) ms-nav ms-nav-item .ms-nav-button>.arrow,.ms-nav-folded:not(.ms-nav-folded-open) ms-nav ms-nav-item .ms-nav-button>.ms-nav-badge,.ms-nav-folded:not(.ms-nav-folded-open) ms-nav ms-nav-item .ms-nav-button>.ms-nav-label{opacity:0;visibility:hidden}}.ms-navigation{display:block;position:relative;color:rgba(255,255,255,.7);user-select:none}.ms-navigation li,.ms-navigation ul{padding:0;margin:0}.ms-navigation ul{display:block;overflow:hidden}.ms-navigation ul li{position:relative}.ms-navigation ul li.collapsed ul{display:none}.ms-navigation .animate-height{transition:height .25s cubic-bezier(.25,.46,.45,.94)}.ms-navigation .ms-navigation-node .ms-navigation-item{display:block;position:relative;cursor:pointer;color:rgba(255,255,255,.7)}.ms-navigation .ms-navigation-node .ms-navigation-item:hover{background:rgba(0,0,0,.1)}.ms-navigation .ms-navigation-node .ms-navigation-item>.ms-navigation-button{display:flex;position:relative;width:100%;height:48px;line-height:48px;flex-direction:row;justify-content:flex-start;align-items:center;padding-right:16px;color:rgba(255,255,255,.7);text-decoration:none;white-space:nowrap;overflow:hidden}.ms-navigation .ms-navigation-node .ms-navigation-item>.ms-navigation-button .icon{color:rgba(255,255,255,.7);margin:0 16px 0 0}.ms-navigation .ms-navigation-node .ms-navigation-item>.ms-navigation-button span{white-space:nowrap;overflow:hidden;opacity:1;transition:opacity .25s ease-in-out .1s}.ms-navigation .ms-navigation-node .ms-navigation-item>.ms-navigation-button a{white-space:nowrap;overflow:hidden;opacity:1;transition:opacity .25s ease-in-out .1s}.ms-navigation .ms-navigation-node .ms-navigation-item>.ms-navigation-button .arrow{margin:0;opacity:1;transition:transform .3s ease-in-out,opacity .25s ease-in-out .1s}.ms-navigation .ms-navigation-node .ms-navigation-item>.ms-navigation-button .badge{position:absolute;top:50%;right:16px;min-width:20px;height:20px;line-height:20px;padding:0 7px;font-size:11px;font-weight:700;border-radius:20px;transform:translateY(-50%);transition:opacity .2s ease-in-out .1s}.ms-navigation .ms-navigation-node .ms-navigation-item>.ms-navigation-button.active{color:#fff}.ms-navigation .ms-navigation-node .ms-navigation-item>.ms-navigation-button.active .icon{color:#fff}.ms-navigation .ms-navigation-node .ms-navigation-item>.ms-navigation-button.active .badge{background:#fff!important;color:rgba(0,0,0,.87)!important}.ms-navigation .ms-navigation-node:not(.collapsed)>.ms-navigation-item>.ms-navigation-button .arrow{transform:rotate(90deg)}.ms-navigation .ms-navigation-node.group>.ms-navigation-item{font-size:12px;font-weight:500;margin-top:8px;cursor:auto;background:0 0!important;text-transform:uppercase;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.ms-navigation .ms-navigation-node.group>.ms-navigation-item>.ms-navigation-button{height:32px;line-height:32px;color:rgba(255,255,255,.3)}.ms-navigation .ms-navigation-node:not(.group).has-children:not(.collapsed){background-color:rgba(0,0,0,.12)}.ms-navigation .ms-navigation-node:not(.group).has-children.collapsing{background-color:rgba(0,0,0,.12)}.ms-navigation .ms-navigation-node:not(.group).has-children .has-children:not(.collapsed){background:0 0}.ms-navigation li .ms-navigation-button{padding-left:24px}.ms-navigation li li .ms-navigation-button{padding-left:56px}.ms-navigation li li li .ms-navigation-button{padding-left:72px}.ms-navigation li li li li .ms-navigation-button{padding-left:88px}.ms-navigation li li li li li .ms-navigation-button{padding-left:104px}.ms-navigation li.group .ms-navigation-button{padding-left:24px}.ms-navigation li.group li .ms-navigation-button{padding-left:24px}.ms-navigation li.group li li .ms-navigation-button{padding-left:56px}.ms-navigation li.group li li li .ms-navigation-button{padding-left:72px}.ms-navigation li.group li li li li .ms-navigation-button{padding-left:88px}#horizontal-navigation{height:64px;min-height:64px;max-height:64px;background:#fff;z-index:54}#horizontal-navigation .ms-navigation-horizontal{display:flex;position:relative;user-select:none}#horizontal-navigation .ms-navigation-horizontal li,#horizontal-navigation .ms-navigation-horizontal ul{padding:0;margin:0;list-style:none}#horizontal-navigation .ms-navigation-horizontal .horizontal{display:flex;flex:1}#horizontal-navigation .ms-navigation-horizontal .horizontal li{position:relative;cursor:pointer}#horizontal-navigation .ms-navigation-horizontal .horizontal li:not(.active):hover{background:rgba(0,0,0,.12)}#horizontal-navigation .ms-navigation-horizontal .horizontal>li>.ms-navigation-horizontal-item>.ms-navigation-horizontal-button{display:block;float:left;padding:12px 14px}#horizontal-navigation .ms-navigation-horizontal .horizontal>li>.ms-navigation-horizontal-item>.ms-navigation-horizontal-button .arrow{display:none}#horizontal-navigation .ms-navigation-horizontal .horizontal>li>.ms-navigation-horizontal-item>.ms-navigation-horizontal-button.active{background:0 0;border-bottom:2px solid}#horizontal-navigation .ms-navigation-horizontal .horizontal>li:last-child{margin-right:0}#horizontal-navigation .ms-navigation-horizontal .horizontal>li li .ms-navigation-horizontal-item .ms-navigation-horizontal-button.active{color:#fff!important}#horizontal-navigation .ms-navigation-horizontal .horizontal .has-children ul{display:none;position:absolute;background:#fff;z-index:999;min-width:200px;box-shadow:0 5px 5px -3px rgba(0,0,0,.2),0 8px 10px 1px rgba(0,0,0,.14),0 3px 14px 2px rgba(0,0,0,.12);top:0;left:100%}#horizontal-navigation .ms-navigation-horizontal .horizontal .has-children:hover>ul{display:block}#horizontal-navigation .ms-navigation-horizontal .horizontal>.has-children>ul{top:100%;left:0}#horizontal-navigation .ms-navigation-horizontal .horizontal .ms-navigation-horizontal-item .ms-navigation-horizontal-button{display:flex;align-items:center;width:100%;color:rgba(0,0,0,.87);white-space:nowrap;padding:14px 16px;text-decoration:none}#horizontal-navigation .ms-navigation-horizontal .horizontal .ms-navigation-horizontal-item .ms-navigation-horizontal-button .icon{color:rgba(0,0,0,.54);margin-right:8px}#horizontal-navigation .ms-navigation-horizontal .horizontal .ms-navigation-horizontal-item .ms-navigation-horizontal-button .badge{min-width:20px;height:20px;line-height:20px;padding:0 7px;font-size:11px;font-weight:700;border-radius:20px;transition:opacity .2s ease-in-out .1s}#horizontal-navigation .ms-navigation-horizontal .horizontal .ms-navigation-horizontal-item .ms-navigation-horizontal-button .arrow{margin-left:8px}#horizontal-navigation .ms-navigation-horizontal .horizontal .ms-navigation-horizontal-item .ms-navigation-horizontal-button.active .badge{background:#fff!important;color:rgba(0,0,0,.87)!important}#horizontal-navigation .ms-navigation-horizontal .horizontal .ms-navigation-horizontal-item .ms-navigation-horizontal-button.active .icon{color:#fff}@media only screen and (min-width:960px){body.ms-navigation-folded:not(.ms-navigation-folded-open) .ms-navigation .animate-height{transition:none}body.ms-navigation-folded:not(.ms-navigation-folded-open) .ms-navigation .ms-navigation-node .ms-navigation-item .ms-navigation-button .icon{margin:0}body.ms-navigation-folded:not(.ms-navigation-folded-open) .ms-navigation .ms-navigation-node .ms-navigation-item .ms-navigation-button .arrow,body.ms-navigation-folded:not(.ms-navigation-folded-open) .ms-navigation .ms-navigation-node .ms-navigation-item .ms-navigation-button .badge,body.ms-navigation-folded:not(.ms-navigation-folded-open) .ms-navigation .ms-navigation-node .ms-navigation-item .ms-navigation-button .title{opacity:0;visibility:hidden}body.ms-navigation-folded:not(.ms-navigation-folded-open) .ms-navigation .ms-navigation-node.group>.ms-navigation-item .ms-navigation-button:before{content:'';display:block;position:relative;width:16px;border-top:1px solid rgba(255,255,255,.12)}body.ms-navigation-folded:not(.ms-navigation-folded-open) #ms-navigation-fold-expander{position:absolute;top:0;right:0;bottom:0;left:0;z-index:999}body.ms-navigation-folded #ms-navigation-fold-collapser{position:absolute;top:0;right:0;bottom:0;left:0;z-index:59}}@media only screen and (max-width:960px){body.ms-navigation-horizontal-mobile-menu-active #horizontal-navigation .navigation-toggle{height:64px;margin-right:16px}body.ms-navigation-horizontal-mobile-menu-active #horizontal-navigation .navigation-toggle .md-button{margin:0;width:64px;height:64px}body.ms-navigation-horizontal-mobile-menu-active #horizontal-navigation .ms-navigation-horizontal{display:block!important;background:#fff}#horizontal-navigation{z-index:60}#horizontal-navigation .ms-navigation-horizontal{position:absolute;display:none;top:0;right:0;bottom:0;left:0;padding:0 0 16px 0;z-index:9998;overflow-x:hidden;overflow-y:scroll}#horizontal-navigation .ms-navigation-horizontal .horizontal{flex-direction:column;min-height:100%;width:100%}#horizontal-navigation .ms-navigation-horizontal .horizontal li:not(.active):hover{background:0 0}#horizontal-navigation .ms-navigation-horizontal .horizontal li:not(.active) .ms-navigation-horizontal-item{margin:4px}#horizontal-navigation .ms-navigation-horizontal .horizontal li:not(.active) .ms-navigation-horizontal-item:hover{background:rgba(0,0,0,.12)}#horizontal-navigation .ms-navigation-horizontal .horizontal>li{padding:0 12px}#horizontal-navigation .ms-navigation-horizontal .horizontal>li>.ms-navigation-horizontal-item>.ms-navigation-horizontal-button{display:flex;float:none}#horizontal-navigation .ms-navigation-horizontal .horizontal>li>.ms-navigation-horizontal-item>.ms-navigation-horizontal-button .arrow{display:block}#horizontal-navigation .ms-navigation-horizontal .horizontal .has-children ul{position:relative;top:0;left:0;box-shadow:none}#horizontal-navigation .ms-navigation-horizontal .horizontal .has-children:hover>ul{display:none}#horizontal-navigation .ms-navigation-horizontal .horizontal .has-children .expanded>.ms-navigation-horizontal-button .arrow{transform:rotate(90deg)}#horizontal-navigation .ms-navigation-horizontal .horizontal .has-children .expanded+ul{display:block;margin-left:16px}#horizontal-navigation .ms-navigation-horizontal .horizontal .ms-navigation-horizontal-item{min-height:48px;height:48px}}md-dialog.md-phonebar-dialog{max-width:720px;width:720px}md-dialog.md-phonebar-dialog md-dialog-content{display:block;position:relative;height:500px}md-dialog.md-phonebar-dialog md-toolbar .title{font-size:17px}md-dialog.md-phonebar-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.md-phonebar-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}md-dialog.md-phonebar-dialog md-tabs{position:static}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}.ms-phonebar{height:64px;font-size:13px}.ms-phonebar .phonebar-container{height:64px;padding:0}.ms-phonebar .phonebar-container .quantity-indicator{display:inline-block;vertical-align:middle;width:8px;height:8px;border-radius:4px;margin-right:5px;margin-left:5px}.ms-phonebar .phonebar-container .sessions{overflow-x:auto}.ms-phonebar .phonebar-container .session{border-radius:3px;border:1px solid #dcdcdc;margin-left:3px;cursor:pointer}.ms-phonebar .phonebar-container .session-info{padding-left:3px;padding-right:3px;color:grey}.ms-phonebar .phonebar-container .session-button{border:1px solid grey;margin:3px}.ms-phonebar .phonebar-container .button-bar{border:1px solid grey}.ms-phonebar .phonebar-container .num-pad{position:fixed;border-radius:3px;border:1px solid #9e9e9e;top:80px;left:80px}.ms-phonebar .phonebar-container .num-pad-logo{height:40px;width:42px}.ms-phonebar .phonebar-container p{margin:0;padding:0 0 10px 0;line-height:10px;font-size:10px}.ms-phonebar .phonebar-container .span4{width:50px;float:left;margin:8px}.ms-phonebar .phonebar-container .num{border:1px solid #9e9e9e;-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px;height:50px;background-color:#fff;color:#333;cursor:pointer}.ms-phonebar .phonebar-container .num:hover{background-color:#9e9e9e;color:#fff;transition-property:background-color .2s linear 0s;-moz-transition:background-color .2s linear 0s;-webkit-transition:background-color .2s linear 0s;-o-transition:background-color .2s linear 0s}.ms-phonebar .phonebar-container .txt{font-size:20px;text-align:center;margin-top:3px;font-family:Lato,sans-serif;color:#333}.ms-phonebar .phonebar-container .small{font-size:15px}.ms-phonebar .phonebar-container .angucomplete-dropdown{top:45px;overflow-y:auto;max-height:200px}.ms-phonebar .phonebar-container .highlight{color:red}.ms-phonebar .phonebar-container .input-number{margin-left:5px;padding:8px;border:1px solid #ccc;border-radius:3px;box-sizing:border-box}.ms-phonebar .phonebar-container .phonebar{position:relative}.ms-phonebar .phonebar-container .phonebar>div{height:64px;min-width:44px}.ms-phonebar .phonebar-container .phonebar>div.dragging{cursor:grabbing}.ms-phonebar .phonebar-container .phonebar>div.dragging .md-ripple-container{display:none}.ms-phonebar .phonebar-container .phonebar>div.ghost .shortcut{opacity:.27}.ms-phonebar .phonebar-container.mobile-bar-active{position:absolute;top:0;right:0;bottom:0;left:0;background:#fff;z-index:99;max-width:none!important}.ms-phonebar .phonebar-container.mobile-bar-active .phonebar,.ms-phonebar .phonebar-container.mobile-bar-active .toggle-mobile-menu{display:flex!important}.ms-phonebar .phonebar-container.mobile-bar-active .toggle-mobile-menu{margin-left:14px}.ms-phonebar .phonebar-container.mobile-bar-active>div{border-right:1px solid rgba(0,0,0,.12)}.quick-filter-container md-select .md-select-value.md-select-placeholder{color:inherit}.quick-filter-container md-select[multiple] md-select-value>:first-child{max-width:250px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:block}.ms-responsive-table-wrapper{overflow-x:auto;overflow-y:hidden}.ms-search-bar{height:64px;font-size:13px}.ms-search-bar .ms-search-bar-collapser,.ms-search-bar .ms-search-bar-expander{cursor:pointer;padding:0 20px;margin:0;width:64px!important;height:64px!important;line-height:64px!important}.ms-search-bar .ms-search-bar-loader{width:64px!important;height:64px!important;line-height:64px!important}.ms-search-bar .ms-search-button-expanded{pointer-events:none}.ms-search-bar .ms-search-bar-collapser{display:none}.ms-search-bar input{background-color:transparent;font-size:16px}.ms-search-bar .ms-search-bar-results{position:absolute;top:64px;left:0;right:0;overflow-x:hidden;overflow-y:scroll;background:#fff;max-height:300px;box-shadow:0 1px 8px 0 rgba(0,0,0,.2),0 3px 4px 0 rgba(0,0,0,.14),0 3px 3px -2px rgba(0,0,0,.12)}.ms-search-bar .ms-search-bar-results .no-results{font-size:18px;padding:16px;color:rgba(0,0,0,.54)}.ms-search-bar .ms-search-bar-results .result{position:relative;height:56px;min-height:56px;max-height:56px;padding:16px;cursor:pointer}.ms-search-bar .ms-search-bar-results .result.selected{background:rgba(0,0,0,.07)}.ms-search-bar .ms-search-bar-results .result .icon-container{min-width:32px;margin-right:8px}.ms-search-bar .ms-search-bar-results .result .icon-container .square{width:6px;height:6px}.ms-search-bar .ms-search-bar-results .result .title{font-size:16px}.ms-search-bar .ms-search-bar-results .result .description{padding-top:6px;font-size:14px}.ms-search-bar.expanded{position:absolute;top:0;right:0;bottom:0;left:0;background:#fff;z-index:10}.ms-search-bar.expanded #ms-search-bar-input{display:block}.ms-search-bar.expanded .ms-search-bar-collapser{display:block}.ms-search-bar.down{top:64px;border-bottom:1px rgba(0,0,0,.12) solid}.ms-search-bar[disabled] input{pointer-events:none}body.ms-search-bar-expanded #toolbar{z-index:999!important}@media screen and (max-width:960px){.ms-search-bar-label{padding:0 8px 0 12px}}.ms-shortcuts{height:64px;font-size:13px}.ms-shortcuts .shortcuts-container{height:64px;padding:0 8px;max-width:400px}.ms-shortcuts .shortcuts-container .shortcuts{position:relative;overflow-x:scroll}.ms-shortcuts .shortcuts-container .shortcuts>div{height:64px;min-width:44px}.ms-shortcuts .shortcuts-container .shortcuts>div.dragging{cursor:grabbing}.ms-shortcuts .shortcuts-container .shortcuts>div.dragging .md-ripple-container{display:none}.ms-shortcuts .shortcuts-container .shortcuts>div.ghost .shortcut{opacity:.27}.ms-shortcuts .shortcuts-container .shortcuts>div .shortcut{margin:2px}.ms-shortcuts .shortcuts-container .shortcuts>div .shortcut .first-letter{display:inline-block;vertical-align:middle;font-size:20px;text-transform:uppercase;color:rgba(0,0,0,.54)}.ms-shortcuts .shortcuts-container .shortcut-menu{margin:0}.ms-shortcuts .shortcuts-container.mobile-bar-active{position:absolute;top:0;right:0;bottom:0;left:0;background:#fff;z-index:99;max-width:none!important}.ms-shortcuts .shortcuts-container.mobile-bar-active .shortcut-menu,.ms-shortcuts .shortcuts-container.mobile-bar-active .shortcuts,.ms-shortcuts .shortcuts-container.mobile-bar-active .toggle-mobile-menu{display:flex!important}.ms-shortcuts .shortcuts-container.mobile-bar-active .toggle-mobile-menu{margin-left:14px}.ms-shortcuts .shortcuts-container.mobile-bar-active>div{border-right:1px solid rgba(0,0,0,.12)}#ms-shortcut-add-menu{position:relative;width:240px;min-width:240px;max-width:240px}#ms-shortcut-add-menu .add-shortcut-button{width:48px;height:48px;padding:0 12px;margin:0}#ms-shortcut-add-menu .shortcut-search{height:45px;padding:0 8px}#ms-shortcut-add-menu .shortcut-search .search-icon{width:40px;height:40px;line-height:48px}#ms-shortcut-add-menu .shortcut-search .shortcut-loader{padding:10px}#ms-shortcut-add-menu .shortcut-search input{padding:8px}#ms-shortcut-add-menu .results{position:relative;overflow-y:scroll;max-height:233px;margin-top:8px;padding-top:8px;border-top:1px solid rgba(0,0,0,.12)}#ms-shortcut-add-menu .results .no-results{font-size:18px;padding:16px;color:rgba(0,0,0,.54)}#ms-shortcut-add-menu .results .result{position:relative;min-height:56px;padding:16px;cursor:pointer}#ms-shortcut-add-menu .results .result.selected{background:rgba(0,0,0,.07)}#ms-shortcut-add-menu .results .result .icon-container{min-width:32px;margin-right:8px}#ms-shortcut-add-menu .results .result .icon-container .square{width:6px;height:6px}#ms-shortcut-add-menu .results .result .title{font-size:16px}#ms-shortcut-add-menu .results .result .description{padding-top:6px;font-size:14px}#splash-screen{display:block;position:absolute;top:0;left:0;right:0;bottom:0;background-color:#3c4252;z-index:99999}#splash-screen.ng-leave{opacity:1;transition:all linear .2s}#splash-screen.ng-leave-active{opacity:0}#splash-screen .center{display:block;width:100%;position:absolute;top:50%;transform:translateY(-50%)}#splash-screen .logo{width:96px;height:96px;line-height:96px;margin:0 auto;font-family:Helvetica Neue,Helvetica,Arial,sans-serif;font-size:56px;text-align:center;border-radius:2px;background-color:#039be5;color:#fff;box-shadow:0 2px 14px 0 rgba(0,0,0,.22)}#splash-screen .spinner-wrapper{display:block;position:relative;width:100%;min-height:100px;height:100px}#splash-screen .spinner-wrapper .spinner{position:absolute;overflow:hidden;left:50%;margin-left:-50px;animation:outer-rotate 2.91667s linear infinite}#splash-screen .spinner-wrapper .spinner .inner{width:100px;height:100px;position:relative;animation:sporadic-rotate 5.25s cubic-bezier(.35,0,.25,1) infinite}#splash-screen .spinner-wrapper .spinner .inner .gap{position:absolute;left:49px;right:49px;top:0;bottom:0;border-top:10px solid;box-sizing:border-box}#splash-screen .spinner-wrapper .spinner .inner .left,#splash-screen .spinner-wrapper .spinner .inner .right{position:absolute;top:0;height:100px;width:50px;overflow:hidden}#splash-screen .spinner-wrapper .spinner .inner .left .half-circle,#splash-screen .spinner-wrapper .spinner .inner .right .half-circle{position:absolute;top:0;width:100px;height:100px;box-sizing:border-box;border:10px solid #4285f4;border-bottom-color:transparent;border-radius:50%}#splash-screen .spinner-wrapper .spinner .inner .left{left:0}#splash-screen .spinner-wrapper .spinner .inner .left .half-circle{left:0;border-right-color:transparent;animation:left-wobble 1.3125s cubic-bezier(.35,0,.25,1) infinite;-webkit-animation:left-wobble 1.3125s cubic-bezier(.35,0,.25,1) infinite}#splash-screen .spinner-wrapper .spinner .inner .right{right:0}#splash-screen .spinner-wrapper .spinner .inner .right .half-circle{right:0;border-left-color:transparent;animation:right-wobble 1.3125s cubic-bezier(.35,0,.25,1) infinite;-webkit-animation:right-wobble 1.3125s cubic-bezier(.35,0,.25,1) infinite}@keyframes outer-rotate{0%{transform:rotate(0) scale(.5)}100%{transform:rotate(360deg) scale(.5)}}@keyframes left-wobble{0%,100%{transform:rotate(130deg)}50%{transform:rotate(-5deg)}}@keyframes right-wobble{0%,100%{transform:rotate(-130deg)}50%{transform:rotate(5deg)}}@keyframes sporadic-rotate{12.5%{transform:rotate(135deg)}25%{transform:rotate(270deg)}37.5%{transform:rotate(405deg)}50%{transform:rotate(540deg)}62.5%{transform:rotate(675deg)}75%{transform:rotate(810deg)}87.5%{transform:rotate(945deg)}100%{transform:rotate(1080deg)}}.ms-stepper .ms-stepper-horizontal{background:#fff;box-shadow:0 1px 3px 0 rgba(0,0,0,.2),0 1px 1px 0 rgba(0,0,0,.14),0 2px 1px -1px rgba(0,0,0,.12)}.ms-stepper .ms-stepper-horizontal .ms-stepper-navigation-wrapper .ms-stepper-navigation{height:72px;min-height:72px;max-height:72px;background:#fff;box-shadow:0 1px 3px 0 rgba(0,0,0,.2),0 1px 1px 0 rgba(0,0,0,.14),0 2px 1px -1px rgba(0,0,0,.12)}.ms-stepper .ms-stepper-horizontal .ms-stepper-navigation-wrapper .ms-stepper-navigation .ms-stepper-navigation-item{display:flex;flex-direction:row;align-items:center;position:relative;height:72px;min-height:72px;max-height:72px;line-height:24px;margin:0;padding:24px;border-radius:0;cursor:pointer;font-size:14px;text-transform:none}.ms-stepper .ms-stepper-horizontal .ms-stepper-navigation-wrapper .ms-stepper-navigation .ms-stepper-navigation-item:after,.ms-stepper .ms-stepper-horizontal .ms-stepper-navigation-wrapper .ms-stepper-navigation .ms-stepper-navigation-item:before{content:'';display:block;position:absolute;top:50%;width:24px;border-bottom:1px solid rgba(0,0,0,.12)}.ms-stepper .ms-stepper-horizontal .ms-stepper-navigation-wrapper .ms-stepper-navigation .ms-stepper-navigation-item:before{left:0}.ms-stepper .ms-stepper-horizontal .ms-stepper-navigation-wrapper .ms-stepper-navigation .ms-stepper-navigation-item:after{right:0}.ms-stepper .ms-stepper-horizontal .ms-stepper-navigation-wrapper .ms-stepper-navigation .ms-stepper-navigation-item:first-child:before{display:none}.ms-stepper .ms-stepper-horizontal .ms-stepper-navigation-wrapper .ms-stepper-navigation .ms-stepper-navigation-item:last-child:after{display:none}.ms-stepper .ms-stepper-horizontal .ms-stepper-navigation-wrapper .ms-stepper-navigation .ms-stepper-navigation-item.current .title{font-weight:600;color:rgba(0,0,0,.87)}.ms-stepper .ms-stepper-horizontal .ms-stepper-navigation-wrapper .ms-stepper-navigation .ms-stepper-navigation-item.disabled{cursor:default}.ms-stepper .ms-stepper-horizontal .ms-stepper-navigation-wrapper .ms-stepper-navigation .ms-stepper-navigation-item.disabled .step{background:rgba(0,0,0,.12)}.ms-stepper .ms-stepper-horizontal .ms-stepper-navigation-wrapper .ms-stepper-navigation .ms-stepper-navigation-item.disabled .title{color:rgba(0,0,0,.27)}.ms-stepper .ms-stepper-horizontal .ms-stepper-navigation-wrapper .ms-stepper-navigation .ms-stepper-navigation-item.disabled .subtitle{color:rgba(0,0,0,.27)}.ms-stepper .ms-stepper-horizontal .ms-stepper-navigation-wrapper .ms-stepper-navigation .ms-stepper-navigation-item.optional{padding:16px 24px}.ms-stepper .ms-stepper-horizontal .ms-stepper-navigation-wrapper .ms-stepper-navigation .ms-stepper-navigation-item .step{width:24px;min-width:24px;height:24px;border-radius:50%;margin:0 8px 0 16px;color:#fff}.ms-stepper .ms-stepper-horizontal .ms-stepper-navigation-wrapper .ms-stepper-navigation .ms-stepper-navigation-item .step .icon{color:#fff;font-weight:700;line-height:24px!important}.ms-stepper .ms-stepper-horizontal .ms-stepper-navigation-wrapper .ms-stepper-navigation .ms-stepper-navigation-item .title{padding-right:16px;color:rgba(0,0,0,.54)}.ms-stepper .ms-stepper-horizontal .ms-stepper-navigation-wrapper .ms-stepper-navigation .ms-stepper-navigation-item .subtitle{font-size:12px;padding-right:16px;color:rgba(0,0,0,.54);line-height:1}.ms-stepper .ms-stepper-horizontal .ms-stepper-steps{padding:24px 16px}.ms-stepper .ms-stepper-horizontal .ms-stepper-controls{padding:0 16px 16px 16px}.ms-stepper .ms-stepper-horizontal .ms-stepper-controls .ms-stepper-dots{display:none;align-items:center;justify-content:center;padding:0 16px}.ms-stepper .ms-stepper-horizontal .ms-stepper-controls .ms-stepper-dots span{width:5px;height:5px;margin:0 4px;border-radius:50%}.ms-stepper .ms-stepper-horizontal .ms-stepper-controls .ms-stepper-dots span:not(.md-accent-bg){background:rgba(0,0,0,.12)}.ms-stepper .ms-stepper-horizontal .ms-stepper-controls .ms-stepper-dots span.selected{width:8px;height:8px}@media screen and (max-width:600px){.ms-stepper .ms-stepper-horizontal .ms-stepper-navigation-wrapper .ms-stepper-navigation{display:none}.ms-stepper .ms-stepper-horizontal .ms-stepper-controls .ms-stepper-dots{display:flex}}.ms-stepper .ms-stepper-vertical{position:relative;background:#fff;box-shadow:0 1px 3px 0 rgba(0,0,0,.2),0 1px 1px 0 rgba(0,0,0,.14),0 2px 1px -1px rgba(0,0,0,.12)}.ms-stepper .ms-stepper-vertical .ms-stepper-vertical-line{display:block;position:absolute;width:1px;top:32px;bottom:32px;left:43px;border-left:1px solid rgba(0,0,0,.12)}.ms-stepper .ms-stepper-vertical .ms-stepper-steps{padding:8px 0}.ms-stepper .ms-stepper-vertical .ms-stepper-steps .ms-stepper-step{display:block}.ms-stepper .ms-stepper-vertical .ms-stepper-steps .ms-stepper-step .ms-stepper-navigation-item{display:flex;flex-direction:row;align-items:center;position:relative;width:100%;height:72px;min-height:72px;max-height:72px;line-height:24px;margin:0;padding:0 24px;border-radius:0;cursor:pointer;font-size:14px;text-transform:none}.ms-stepper .ms-stepper-vertical .ms-stepper-steps .ms-stepper-step .ms-stepper-navigation-item:first-child:before{display:none}.ms-stepper .ms-stepper-vertical .ms-stepper-steps .ms-stepper-step .ms-stepper-navigation-item:last-child:after{display:none}.ms-stepper .ms-stepper-vertical .ms-stepper-steps .ms-stepper-step .ms-stepper-navigation-item:hover:not(.disabled) .step{background-color:#ececec;border-color:#ececec}.ms-stepper .ms-stepper-vertical .ms-stepper-steps .ms-stepper-step .ms-stepper-navigation-item.current .title{font-weight:600;color:rgba(0,0,0,.87)}.ms-stepper .ms-stepper-vertical .ms-stepper-steps .ms-stepper-step .ms-stepper-navigation-item.disabled{cursor:default}.ms-stepper .ms-stepper-vertical .ms-stepper-steps .ms-stepper-step .ms-stepper-navigation-item.disabled .title{color:rgba(0,0,0,.27)}.ms-stepper .ms-stepper-vertical .ms-stepper-steps .ms-stepper-step .ms-stepper-navigation-item.disabled .subtitle{color:rgba(0,0,0,.27)}.ms-stepper .ms-stepper-vertical .ms-stepper-steps .ms-stepper-step .ms-stepper-navigation-item.optional{padding:16px 24px}.ms-stepper .ms-stepper-vertical .ms-stepper-steps .ms-stepper-step .ms-stepper-navigation-item .step{width:40px;min-width:40px;height:40px;margin:0 16px 0 0;border-radius:50%;background:#fff;border:8px solid #fff;color:#fff;transition:border-color .4s cubic-bezier(.25,.8,.25,1),background-color .4s cubic-bezier(.25,.8,.25,1)}.ms-stepper .ms-stepper-vertical .ms-stepper-steps .ms-stepper-step .ms-stepper-navigation-item .step .icon{font-weight:700;line-height:28px!important}.ms-stepper .ms-stepper-vertical .ms-stepper-steps .ms-stepper-step .ms-stepper-navigation-item .title{padding-right:16px;color:rgba(0,0,0,.54)}.ms-stepper .ms-stepper-vertical .ms-stepper-steps .ms-stepper-step .ms-stepper-navigation-item .subtitle{font-size:12px;padding-right:16px;color:rgba(0,0,0,.54);line-height:1}.ms-stepper .ms-stepper-vertical .ms-stepper-steps .ms-stepper-step .ms-stepper-step-content{padding:0 24px 16px 64px}.ms-stepper .ms-stepper-vertical .ms-stepper-steps .ms-stepper-step .ms-stepper-controls{padding:0 16px 16px 56px}.ms-tab-scroll .scroll-arrow{height:inherit;padding:0}.ms-tab-scroll .bar-container{overflow:hidden}.ms-tab-scroll .scroll-container{overflow-x:hidden;overflow-y:hidden;transition:transform .2s ease-in-out}.ms-timeline .ms-timeline-loader{position:relative;display:flex;align-items:center;justify-content:center;width:56px;height:56px;margin:0 auto;background:#fff;font-weight:500;opacity:0;z-index:11;border-radius:50%}.ms-timeline .ms-timeline-loader.show{opacity:1}.ms-timeline .ms-timeline-loader .spinner{width:24px;height:24px;border:3px solid rgba(255,255,255,.35);border-top-color:#fff;border-radius:50%}.ms-widget .ms-widget-front{box-shadow:0 1px 3px 0 rgba(0,0,0,.2),0 1px 1px 0 rgba(0,0,0,.14),0 2px 1px -1px rgba(0,0,0,.12)}.ms-widget .ms-widget-back{box-shadow:0 1px 3px 0 rgba(0,0,0,.2),0 1px 1px 0 rgba(0,0,0,.14),0 2px 1px -1px rgba(0,0,0,.12)}.ms-widget.sidenav-widget .ms-widget-back,.ms-widget.sidenav-widget .ms-widget-front{box-shadow:none}.ms-widget .flip-to-front{position:absolute;top:0;right:0}.ms-widget .c3{height:100%}.ms-widget .chart-fill-8{margin:0 -8px -8px -8px}.ms-widget .chart-fill-16{margin:0 -16px -16px -16px}.ms-widget .chart-fill-24{margin:0 -24px -24px -24px}.ms-widget .chart-fill-32{margin:0 -32px -32px -32px}.ms-widget .chart-fill-40{margin:0 -40px -40px -40px}.ms-widget .chart-fill-48{margin:0 -48px -48px -48px}.ms-widget .chart-fill-56{margin:0 -56px -56px -56px}.ms-widget .chart-fill-64{margin:0 -64px -64px -64px}.ms-widget .chart-fill-72{margin:0 -72px -72px -72px}.ms-widget .chart-fill-80{margin:0 -80px -80px -80px}.ms-widget{position:relative;font-size:1.3rem;perspective:3000px;padding:12px}.ms-widget .ms-widget-front{display:flex;flex-direction:column;flex:1 1 auto;position:relative;overflow:hidden;visibility:visible;width:100%;opacity:1;z-index:10;border-radius:2px;transition:transform .5s ease-out 0s,visibility 0s ease-in .2s,opacity 0s ease-in .2s;transform:rotateY(0);backface-visibility:hidden}.ms-widget .ms-widget-back{display:block;position:absolute;overflow:hidden;visibility:hidden;opacity:0;z-index:10;top:12px;right:12px;bottom:12px;left:12px;border-radius:2px;transition:transform .5s ease-out 0s,visibility 0s ease-in .2s,opacity 0s ease-in .2s;transform:rotateY(180deg);backface-visibility:hidden}.ms-widget .md-button{margin:0}.ms-widget .md-button.md-icon-button{margin:0}.ms-widget.flipped .ms-widget-front{visibility:hidden;opacity:0;transform:rotateY(180deg)}.ms-widget.flipped .ms-widget-back{display:block;visibility:visible;opacity:1;transform:rotateY(360deg)}.ms-widget.sidenav-widget{padding:0}.ms-widget.ar-2-1 .widget{padding:0;position:relative}.ms-widget.ar-2-1 .widget:before{display:block;content:'';width:100%;padding-top:50%}.ms-widget.ar-2-1 .widget>.widget{position:absolute;top:8px;left:8px;right:8px;bottom:8px}.ms-widget.ar-1-1 .widget{padding:0;position:relative}.ms-widget.ar-1-1 .widget:before{display:block;content:'';width:100%;padding-top:100%}.ms-widget.ar-1-1 .widget>.widget{position:absolute;top:8px;left:8px;right:8px;bottom:8px}.ms-theme-options .ms-theme-options-button{position:absolute;top:160px;right:0;z-index:50;box-shadow:0 2px 4px -1px rgba(0,0,0,.2),0 4px 5px 0 rgba(0,0,0,.14),0 1px 10px 0 rgba(0,0,0,.12);width:48px;height:48px;line-height:48px;text-align:center;cursor:pointer;border-radius:0;margin:0;pointer-events:auto;opacity:.75}.ms-theme-options .ms-theme-options-button:hover{opacity:1}.ms-theme-options md-sidenav{width:384px;min-width:384px;max-width:384px}.ms-theme-options md-sidenav .ms-theme-options-list{background:#fff;z-index:12;pointer-events:auto}.ms-theme-options md-sidenav .ms-theme-options-list .theme-option{padding:16px}.ms-theme-options md-sidenav .ms-theme-options-list .theme-option.layout-options md-radio-button{width:160px;max-width:160px;margin:8px 8px 16px 8px}.ms-theme-options md-sidenav .ms-theme-options-list .theme-option.layout-options md-radio-button.md-checked ._md-label img,.ms-theme-options md-sidenav .ms-theme-options-list .theme-option.layout-options md-radio-button:hover ._md-label img{opacity:1;box-shadow:0 5px 5px -3px rgba(0,0,0,.2),0 8px 10px 1px rgba(0,0,0,.14),0 3px 14px 2px rgba(0,0,0,.12)}.ms-theme-options md-sidenav .ms-theme-options-list .theme-option.layout-options md-radio-button ._md-container{display:none}.ms-theme-options md-sidenav .ms-theme-options-list .theme-option.layout-options md-radio-button ._md-label{margin-left:0}.ms-theme-options md-sidenav .ms-theme-options-list .theme-option.layout-options md-radio-button ._md-label img{opacity:.8;margin-bottom:8px}.ms-theme-options md-sidenav .ms-theme-options-list .theme-option.color-palettes md-menu-item{max-width:192px}.ms-theme-options md-sidenav .ms-theme-options-list .theme-option.color-palettes .theme-button{border-bottom:16px solid;text-align:left;width:101px;height:88px;box-shadow:none;opacity:.8}.ms-theme-options md-sidenav .ms-theme-options-list .theme-option.color-palettes .theme-button.active,.ms-theme-options md-sidenav .ms-theme-options-list .theme-option.color-palettes .theme-button:hover{opacity:1;box-shadow:0 5px 5px -3px rgba(0,0,0,.2),0 8px 10px 1px rgba(0,0,0,.14),0 3px 14px 2px rgba(0,0,0,.12)}.ms-theme-options md-sidenav .ms-theme-options-list .theme-option md-radio-button{margin:8px}.ms-theme-options md-sidenav .ms-theme-options-list .theme-option .option-title{font-size:14px;font-weight:500;padding:0 8px 12px 8px}#error-404 .content{width:90%;max-width:512px;margin-top:128px}#error-404 .content .error-code{font-size:112px;text-align:center;line-height:1;margin-bottom:16px;font-weight:500}#error-404 .content .message{font-size:24px;text-align:center;color:rgba(0,0,0,.54)}#error-404 .content .search{width:100%;height:56px;line-height:56px;margin:48px auto 16px auto;padding:16px;background:#fff}#error-404 .content .search input{padding:0 0 0 16px}#error-404 .content .back-link{font-size:15px;text-align:center}#error-500 .content{width:90%;max-width:512px;margin-top:128px}#error-500 .content .error-code{font-size:112px;line-height:1;text-align:center;margin-bottom:16px;font-weight:500}#error-500 .content .message{font-size:24px;text-align:center;color:rgba(0,0,0,.54)}#error-500 .content .sub-message{font-size:17px;text-align:center;color:rgba(0,0,0,.54);margin:16px auto 48px auto}#error-500 .content .report-link{text-align:center;font-size:15px}#forgot-password{height:100%;background:url(/assets/images/backgrounds/tech.png) no-repeat;background-size:cover}#forgot-password #forgot-password-form-wrapper{flex:1 0 auto;padding:32px}#forgot-password #forgot-password-form-wrapper #forgot-password-form{width:384px;max-width:384px;padding:32px;text-align:center;background:#fff}#forgot-password #forgot-password-form-wrapper #forgot-password-form .logo{width:128px;height:128px;line-height:128px;font-size:86px;font-weight:500;margin:32px auto;color:#fff;border-radius:2px}#forgot-password #forgot-password-form-wrapper #forgot-password-form .title{font-size:17px;margin:16px 0 32px 0}#forgot-password #forgot-password-form-wrapper #forgot-password-form .logo_login{max-height:200px}#forgot-password #forgot-password-form-wrapper #forgot-password-form form{width:100%;text-align:left}#forgot-password #forgot-password-form-wrapper #forgot-password-form form .submit-button{width:220px;margin:16px auto;display:block}#forgot-password #forgot-password-form-wrapper #forgot-password-form .login{margin:32px auto 24px auto;width:250px;font-weight:500}#forgot-password #forgot-password-form-wrapper #forgot-password-form .login .text{margin-right:8px}@media screen and (max-width:600px){#forgot-password #forgot-password-form-wrapper{padding:16px}#forgot-password #forgot-password-form-wrapper #forgot-password-form{padding:24px;width:100%}#forgot-password #forgot-password-form-wrapper #forgot-password-form form .md-button{width:90%}}#login{height:100%;background:url(/assets/images/backgrounds/tech.png) no-repeat;background-size:cover}#login #login-form-wrapper{flex:1 0 auto;padding:32px}#login #login-form-wrapper #login-form{width:384px;max-width:384px;padding:32px;background:#fff;text-align:center}#login #login-form-wrapper #login-form .logo{width:128px;height:128px;line-height:128px;font-size:86px;font-weight:500;margin:32px auto;color:#fff;border-radius:2px}#login #login-form-wrapper #login-form .title{font-size:17px;margin:16px 0 32px 0}#login #login-form-wrapper #login-form .logo_login{max-height:200px}#login #login-form-wrapper #login-form form{width:100%;text-align:left}#login #login-form-wrapper #login-form form md-checkbox{margin:0}#login #login-form-wrapper #login-form form .remember-forgot-password{font-size:13px;margin-top:8px}#login #login-form-wrapper #login-form form .remember-forgot-password .remember-me{margin-bottom:16px}#login #login-form-wrapper #login-form form .remember-forgot-password .forgot-password{font-size:13px;font-weight:500;margin-bottom:16px}#login #login-form-wrapper #login-form form .submit-button{width:220px;margin:16px auto;display:block}#login #login-form-wrapper #login-form .register{margin:32px auto 24px auto;width:250px;font-weight:500}#login #login-form-wrapper #login-form .register .text{margin-right:8px}#login #login-form-wrapper #login-form .separator{font-size:15px;font-weight:600;margin:24px auto 16px auto;position:relative;overflow:hidden;width:100px;color:rgba(0,0,0,.54)}#login #login-form-wrapper #login-form .separator .text{display:inline-block;vertical-align:baseline;position:relative;padding:0 8px;z-index:9999}#login #login-form-wrapper #login-form .separator .text:after,#login #login-form-wrapper #login-form .separator .text:before{content:'';display:block;width:30px;position:absolute;top:10px;border-top:1px solid rgba(0,0,0,.12)}#login #login-form-wrapper #login-form .separator .text:before{right:100%}#login #login-form-wrapper #login-form .separator .text:after{left:100%}#login #login-form-wrapper #login-form .md-button.facebook,#login #login-form-wrapper #login-form .md-button.google{width:192px;text-transform:none;color:#fff;font-size:13px}#login #login-form-wrapper #login-form .md-button.facebook md-icon,#login #login-form-wrapper #login-form .md-button.google md-icon{color:#fff;margin:0 8px 0 0}#login #login-form-wrapper #login-form .md-button.google{background-color:#d73d32}#login #login-form-wrapper #login-form .md-button.facebook{background-color:#3f5c9a}@media screen and (max-width:600px){#login #login-form-wrapper{padding:16px}#login #login-form-wrapper #login-form{padding:24px;width:100%}#login #login-form-wrapper #login-form form .md-button{width:90%}#login #login-form-wrapper #login-form .md-button.facebook,#login #login-form-wrapper #login-form .md-button.google{width:80%}}md-dialog.extractedReport-dialog{max-width:720px;width:720px}md-dialog.extractedReport-dialog md-dialog-content{display:block;position:relative}md-dialog.extractedReport-dialog md-toolbar .title{font-size:17px}md-dialog.extractedReport-dialog md-input-container textarea{min-height:150px}md-dialog.extractedReport-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.extractedReport-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.extractedReport-dialog .date-container{padding:16px 0 24px 0}md-dialog.extractedReport-dialog .error-list{font-size:13px}md-dialog.extractedReport-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.extractedReport-dialog .error-list .error .message{font-weight:500}md-dialog.extractedReport-dialog .error-list .error .md-button{margin:0}md-dialog.extractedReport-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.extractedReport-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}#extractedReports{position:relative}#extractedReports>.header{height:76px;min-height:76px;max-height:76px}#extractedReports>.header .logo .logo-icon{margin:0 16px 0 0}#extractedReports>.header .logo .logo-text{font-size:24px}#extractedReports>.header md-icon{color:#fff}#extractedReports>.header .search-input-wrapper{position:relative}#extractedReports>.header .search-input-wrapper label{padding-right:4px;cursor:pointer}#extractedReports>.header .search-input-wrapper label md-icon{color:rgba(255,255,255,.8)}#extractedReports>.header .search-input-wrapper md-input-container .md-errors-spacer{display:none}#extractedReports>.header .search-input-wrapper md-input-container input{border-bottom:1px solid rgba(255,255,255,.8);color:rgba(255,255,255,.8);width:240px}#extractedReports>.header .search-input-wrapper md-input-container input::placeholder{color:rgba(255,255,255,.8)}#extractedReports>.header .search-input-wrapper md-input-container input:focus{border-bottom:1px solid #fff;color:#fff}#extractedReports>.header.selected-bar{position:absolute;top:0;left:0;right:0;z-index:999;background-image:none;opacity:1!important}#extractedReports>.header.selected-bar .close-button-wrapper{width:244px}#extractedReports>.content{position:absolute;top:76px;bottom:0;right:0;left:0}#extractedReports>.content .main{padding:16px 90px 0 4px;position:absolute;top:0;left:24px;right:0;bottom:0}#extractedReports>.content .main .no-results{box-shadow:0 1px 1px 0 rgba(0,0,0,.14)}#extractedReports #add-extractedReport-button{position:fixed;bottom:8px;right:8px;padding:0}#extractedReports #upload-extractedReport-button{position:fixed;bottom:8px;right:8px;padding:0}md-dialog.metric-dialog{max-width:720px;width:720px}md-dialog.metric-dialog md-dialog-content{display:block;position:relative}md-dialog.metric-dialog md-toolbar .title{font-size:17px}md-dialog.metric-dialog md-input-container textarea{min-height:150px}md-dialog.metric-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.metric-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.metric-dialog .date-container{padding:16px 0 24px 0}md-dialog.metric-dialog .error-list{font-size:13px}md-dialog.metric-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.metric-dialog .error-list .error .message{font-weight:500}md-dialog.metric-dialog .error-list .error .md-button{margin:0}md-dialog.metric-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.metric-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}#metrics{position:relative}#metrics>.header{height:76px;min-height:76px;max-height:76px}#metrics>.header .logo .logo-icon{margin:0 16px 0 0}#metrics>.header .logo .logo-text{font-size:24px}#metrics>.header md-icon{color:#fff}#metrics>.header .search-input-wrapper{position:relative}#metrics>.header .search-input-wrapper label{padding-right:4px;cursor:pointer}#metrics>.header .search-input-wrapper label md-icon{color:rgba(255,255,255,.8)}#metrics>.header .search-input-wrapper md-input-container .md-errors-spacer{display:none}#metrics>.header .search-input-wrapper md-input-container input{border-bottom:1px solid rgba(255,255,255,.8);color:rgba(255,255,255,.8);width:240px}#metrics>.header .search-input-wrapper md-input-container input::placeholder{color:rgba(255,255,255,.8)}#metrics>.header .search-input-wrapper md-input-container input:focus{border-bottom:1px solid #fff;color:#fff}#metrics>.header.selected-bar{position:absolute;top:0;left:0;right:0;z-index:999;background-image:none;opacity:1!important}#metrics>.header.selected-bar .close-button-wrapper{width:244px}#metrics>.content{position:absolute;top:76px;bottom:0;right:0;left:0}#metrics>.content .main{padding:16px 90px 0 4px;position:absolute;top:0;left:24px;right:0;bottom:0}#metrics>.content .main .no-results{box-shadow:0 1px 1px 0 rgba(0,0,0,.14)}#metrics #add-metric-button{position:fixed;bottom:8px;right:8px;padding:0}#metrics #upload-metric-button{position:fixed;bottom:8px;right:8px;padding:0}md-dialog.report-dialog{max-width:720px;width:720px}md-dialog.report-dialog md-dialog-content{display:block;position:relative}md-dialog.report-dialog md-toolbar .title{font-size:17px}md-dialog.report-dialog md-input-container textarea{min-height:150px}md-dialog.report-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.report-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.report-dialog .date-container{padding:16px 0 24px 0}md-dialog.report-dialog .error-list{font-size:13px}md-dialog.report-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.report-dialog .error-list .error .message{font-weight:500}md-dialog.report-dialog .error-list .error .md-button{margin:0}md-dialog.report-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.report-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.report-dialog{max-width:720px;width:720px}md-dialog.report-dialog md-dialog-content{display:block;position:relative}md-dialog.report-dialog md-toolbar .title{font-size:17px}md-dialog.report-dialog md-input-container textarea{min-height:150px}md-dialog.report-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.report-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.report-dialog .date-container{padding:16px 0 24px 0}md-dialog.report-dialog .error-list{font-size:13px}md-dialog.report-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.report-dialog .error-list .error .message{font-weight:500}md-dialog.report-dialog .error-list .error .md-button{margin:0}md-dialog.report-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.report-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.reportField-dialog{max-width:720px;width:720px}md-dialog.reportField-dialog md-dialog-content{display:block;position:relative}md-dialog.reportField-dialog md-toolbar .title{font-size:17px}md-dialog.reportField-dialog md-input-container textarea{min-height:150px}md-dialog.reportField-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.reportField-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.reportField-dialog .date-container{padding:16px 0 24px 0}md-dialog.reportField-dialog .error-list{font-size:13px}md-dialog.reportField-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.reportField-dialog .error-list .error .message{font-weight:500}md-dialog.reportField-dialog .error-list .error .md-button{margin:0}md-dialog.reportField-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.reportField-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}#analytics-report .header{height:76px;min-height:76px;max-height:76px}#analytics-report .header .goto-reports-button{margin-right:16px}#analytics-report .header .report-image{overflow:hidden;width:56px;height:56px;margin-right:16px;border:3px solid rgba(0,0,0,.12)}#analytics-report .header .report-image img{height:100%;width:auto;max-width:none}#analytics-report .header .subtitle{margin:6px 0 0 0}#analytics-report .report-detail-form-container{padding:24px;margin-bottom:24px}#analytics-report .report-detail-form-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}#analytics-report .report-detail-form-container .handle{cursor:move}#analytics-report .report-detail-form-container md-input-container md-switch{margin:0!important}#analytics-report .report-detail-form-container #report-image-uploader{position:relative}#analytics-report .report-detail-form-container #report-image-uploader.dropping .drop-text{display:flex}#analytics-report .report-detail-form-container #report-image-uploader .drop-text{display:none;position:absolute;top:0;right:0;bottom:0;left:0;padding:16px;text-align:center;border:2px dashed rgba(0,0,0,.12);background:#fff;font-size:20px;z-index:100}#analytics-report .report-detail-form-container #report-image-uploader .upload-button{margin-bottom:16px}#analytics-report .report-detail-form-container #report-image-uploader .report-image{position:relative;width:200px;height:200px;border:1px solid rgba(0,0,0,.12);margin:8px}#analytics-report .report-detail-form-container #report-image-uploader .report-image.uploading .overlay{position:absolute;top:0;right:0;bottom:0;left:0;background:rgba(0,0,0,.87)}#analytics-report .report-detail-form-container #report-image-uploader .report-image .media{max-height:100%}md-dialog.report-dialog{max-width:720px;width:720px}md-dialog.report-dialog md-dialog-content{display:block;position:relative}md-dialog.report-dialog md-toolbar .title{font-size:17px}md-dialog.report-dialog md-input-container textarea{min-height:150px}md-dialog.report-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.report-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.report-dialog .date-container{padding:16px 0 24px 0}md-dialog.report-dialog .error-list{font-size:13px}md-dialog.report-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.report-dialog .error-list .error .message{font-weight:500}md-dialog.report-dialog .error-list .error .md-button{margin:0}md-dialog.report-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.report-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}#reports{position:relative}#reports>.header{height:76px;min-height:76px;max-height:76px}#reports>.header .logo .logo-icon{margin:0 16px 0 0}#reports>.header .logo .logo-text{font-size:24px}#reports>.header md-icon{color:#fff}#reports>.header .search-input-wrapper{position:relative}#reports>.header .search-input-wrapper label{padding-right:4px;cursor:pointer}#reports>.header .search-input-wrapper label md-icon{color:rgba(255,255,255,.8)}#reports>.header .search-input-wrapper md-input-container .md-errors-spacer{display:none}#reports>.header .search-input-wrapper md-input-container input{border-bottom:1px solid rgba(255,255,255,.8);color:rgba(255,255,255,.8);width:240px}#reports>.header .search-input-wrapper md-input-container input::placeholder{color:rgba(255,255,255,.8)}#reports>.header .search-input-wrapper md-input-container input:focus{border-bottom:1px solid #fff;color:#fff}#reports>.header.selected-bar{position:absolute;top:0;left:0;right:0;z-index:999;background-image:none;opacity:1!important}#reports>.header.selected-bar .close-button-wrapper{width:244px}#reports>.content{position:absolute;top:76px;bottom:0;right:0;left:0}#reports>.content .main{padding:16px 90px 0 4px;position:absolute;top:0;left:24px;right:0;bottom:0}#reports>.content .main .no-results{box-shadow:0 1px 1px 0 rgba(0,0,0,.14)}md-dialog.report-dialog{max-width:720px;width:720px}md-dialog.report-dialog md-dialog-content{display:block;position:relative}md-dialog.report-dialog md-toolbar .title{font-size:17px}md-dialog.report-dialog md-input-container textarea{min-height:150px}md-dialog.report-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.report-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.report-dialog .date-container{padding:16px 0 24px 0}md-dialog.report-dialog .error-list{font-size:13px}md-dialog.report-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.report-dialog .error-list .error .message{font-weight:500}md-dialog.report-dialog .error-list .error .md-button{margin:0}md-dialog.report-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.report-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.web-dialog md-dialog-content{display:block;position:relative}md-dialog.web-dialog md-toolbar .title{font-size:17px}md-dialog.web-dialog md-input-container textarea{min-height:150px}md-dialog.web-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.web-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.web-dialog .date-container{padding:16px 0 24px 0}md-dialog.web-dialog .error-list{font-size:13px}md-dialog.web-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.web-dialog .error-list .error .message{font-weight:500}md-dialog.web-dialog .error-list .error .md-button{margin:0}md-dialog.web-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.web-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.odbc-dialog{max-width:720px;width:720px}md-dialog.odbc-dialog md-dialog-content{display:block;position:relative}md-dialog.odbc-dialog md-toolbar .title{font-size:17px}md-dialog.odbc-dialog md-input-container textarea{min-height:150px}md-dialog.odbc-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.odbc-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.odbc-dialog .date-container{padding:16px 0 24px 0}md-dialog.odbc-dialog .error-list{font-size:13px}md-dialog.odbc-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.odbc-dialog .error-list .error .message{font-weight:500}md-dialog.odbc-dialog .error-list .error .md-button{margin:0}md-dialog.odbc-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.odbc-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}#odbcs{position:relative}#odbcs>.header{height:76px;min-height:76px;max-height:76px}#odbcs>.header .logo .logo-icon{margin:0 16px 0 0}#odbcs>.header .logo .logo-text{font-size:24px}#odbcs>.header md-icon{color:#fff}#odbcs>.header .search-input-wrapper{position:relative}#odbcs>.header .search-input-wrapper label{padding-right:4px;cursor:pointer}#odbcs>.header .search-input-wrapper label md-icon{color:rgba(255,255,255,.8)}#odbcs>.header .search-input-wrapper md-input-container .md-errors-spacer{display:none}#odbcs>.header .search-input-wrapper md-input-container input{border-bottom:1px solid rgba(255,255,255,.8);color:rgba(255,255,255,.8);width:240px}#odbcs>.header .search-input-wrapper md-input-container input::placeholder{color:rgba(255,255,255,.8)}#odbcs>.header .search-input-wrapper md-input-container input:focus{border-bottom:1px solid #fff;color:#fff}#odbcs>.header.selected-bar{position:absolute;top:0;left:0;right:0;z-index:999;background-image:none;opacity:1!important}#odbcs>.header.selected-bar .close-button-wrapper{width:244px}#odbcs>.content{position:absolute;top:76px;bottom:0;right:0;left:0}#odbcs>.content .main{padding:16px 90px 0 4px;position:absolute;top:0;left:24px;right:0;bottom:0}#odbcs>.content .main .no-results{box-shadow:0 1px 1px 0 rgba(0,0,0,.14)}#odbcs #add-odbc-button{position:fixed;bottom:8px;right:8px;padding:0}#odbcs #upload-odbc-button{position:fixed;bottom:8px;right:8px;padding:0}md-dialog.project-dialog{max-width:720px;width:720px}md-dialog.project-dialog md-dialog-content{display:block;position:relative}md-dialog.project-dialog md-toolbar .title{font-size:17px}md-dialog.project-dialog md-input-container textarea{min-height:150px}md-dialog.project-dialog .date-container{padding:16px 0 24px 0}md-dialog.project-dialog .error-list{font-size:13px}md-dialog.project-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.project-dialog .error-list .error .message{font-weight:500}md-dialog.project-dialog .error-list .error .md-button{margin:0}md-dialog.project-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.project-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}md-dialog.project-dialog .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}#callysquare-project .header{height:76px;min-height:76px;max-height:76px}#callysquare-project .header .goto-projects-button{margin-right:16px}#callysquare-project .header .project-image{overflow:hidden;width:56px;height:56px;margin-right:16px;border:3px solid rgba(0,0,0,.12)}#callysquare-project .header .project-image img{height:100%;width:auto;max-width:none}#callysquare-project .header .subtitle{margin:6px 0 0 0}#callysquare-project .project-detail-form-container{padding:24px;margin-bottom:24px}#callysquare-project .project-detail-form-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}#callysquare-project .project-detail-form-container #project-image-uploader{position:relative}#callysquare-project .project-detail-form-container #project-image-uploader.dropping .drop-text{display:flex}#callysquare-project .project-detail-form-container #project-image-uploader .drop-text{display:none;position:absolute;top:0;right:0;bottom:0;left:0;padding:16px;text-align:center;border:2px dashed rgba(0,0,0,.12);background:#fff;font-size:20px;z-index:100}#callysquare-project .project-detail-form-container #project-image-uploader .upload-button{margin-bottom:16px}#callysquare-project .project-detail-form-container #project-image-uploader .project-image{position:relative;width:200px;height:200px;border:1px solid rgba(0,0,0,.12);margin:8px}#callysquare-project .project-detail-form-container #project-image-uploader .project-image.uploading .overlay{position:absolute;top:0;right:0;bottom:0;left:0;background:rgba(0,0,0,.87)}#callysquare-project .project-detail-form-container #project-image-uploader .project-image .media{max-height:100%}#callysquare-project>.callysquare-content{position:absolute;top:76px;bottom:0;left:0;right:0}#projects{position:relative}#projects>.header{height:76px;min-height:76px;max-height:76px}#projects>.header .logo .logo-icon{margin:0 16px 0 0}#projects>.header .logo .logo-text{font-size:24px}#projects>.header md-icon{color:#fff}#projects>.header .search-input-wrapper{position:relative}#projects>.header .search-input-wrapper label{padding-right:4px;cursor:pointer}#projects>.header .search-input-wrapper label md-icon{color:rgba(255,255,255,.8)}#projects>.header .search-input-wrapper md-input-container .md-errors-spacer{display:none}#projects>.header .search-input-wrapper md-input-container input{border-bottom:1px solid rgba(255,255,255,.8);color:rgba(255,255,255,.8);width:240px}#projects>.header .search-input-wrapper md-input-container input::placeholder{color:rgba(255,255,255,.8)}#projects>.header .search-input-wrapper md-input-container input:focus{border-bottom:1px solid #fff;color:#fff}#projects>.header.selected-bar{position:absolute;top:0;left:0;right:0;z-index:999;background-image:none;opacity:1!important}#projects>.header.selected-bar .close-button-wrapper{width:244px}#projects>.content{position:absolute;top:76px;bottom:0;right:0;left:0}#projects>.content .main{padding:16px 90px 0 4px;position:absolute;top:0;left:24px;right:0;bottom:0}#projects>.content .main .no-results{box-shadow:0 1px 1px 0 rgba(0,0,0,.14)}#projects #add-project-button{position:fixed;bottom:8px;right:8px;padding:0}md-dialog.squareRecording-dialog{max-width:720px;width:720px}md-dialog.squareRecording-dialog md-dialog-content{display:block;position:relative}md-dialog.squareRecording-dialog md-toolbar .title{font-size:17px}md-dialog.squareRecording-dialog md-input-container textarea{min-height:150px}md-dialog.squareRecording-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.squareRecording-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.squareRecording-dialog .date-container{padding:16px 0 24px 0}md-dialog.squareRecording-dialog .error-list{font-size:13px}md-dialog.squareRecording-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.squareRecording-dialog .error-list .error .message{font-weight:500}md-dialog.squareRecording-dialog .error-list .error .md-button{margin:0}md-dialog.squareRecording-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.squareRecording-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}#squareRecordings{position:relative}#squareRecordings>.header{height:76px;min-height:76px;max-height:76px}#squareRecordings>.header .logo .logo-icon{margin:0 16px 0 0}#squareRecordings>.header .logo .logo-text{font-size:24px}#squareRecordings>.header md-icon{color:#fff}#squareRecordings>.header .search-input-wrapper{position:relative}#squareRecordings>.header .search-input-wrapper label{padding-right:4px;cursor:pointer}#squareRecordings>.header .search-input-wrapper label md-icon{color:rgba(255,255,255,.8)}#squareRecordings>.header .search-input-wrapper md-input-container .md-errors-spacer{display:none}#squareRecordings>.header .search-input-wrapper md-input-container input{border-bottom:1px solid rgba(255,255,255,.8);color:rgba(255,255,255,.8);width:240px}#squareRecordings>.header .search-input-wrapper md-input-container input::placeholder{color:rgba(255,255,255,.8)}#squareRecordings>.header .search-input-wrapper md-input-container input:focus{border-bottom:1px solid #fff;color:#fff}#squareRecordings>.header.selected-bar{position:absolute;top:0;left:0;right:0;z-index:999;background-image:none;opacity:1!important}#squareRecordings>.header.selected-bar .close-button-wrapper{width:244px}#squareRecordings>.content{position:absolute;top:76px;bottom:0;right:0;left:0}#squareRecordings>.content .main{padding:16px 90px 0 4px;position:absolute;top:0;left:24px;right:0;bottom:0}#squareRecordings>.content .main .no-results{box-shadow:0 1px 1px 0 rgba(0,0,0,.14)}#squareRecordings #add-squareRecording-button{position:fixed;bottom:8px;right:8px;padding:0}#squareRecordings #upload-squareRecording-button{position:fixed;bottom:8px;right:8px;padding:0}#chatQueues{position:relative}#chatQueues>.header{height:76px;min-height:76px;max-height:76px}#chatQueues>.header .logo .logo-icon{margin:0 16px 0 0}#chatQueues>.header .logo .logo-text{font-size:24px}#chatQueues>.header md-icon{color:#fff}#chatQueues>.header .search-input-wrapper{position:relative}#chatQueues>.header .search-input-wrapper label{padding-right:4px;cursor:pointer}#chatQueues>.header .search-input-wrapper label md-icon{color:rgba(255,255,255,.8)}#chatQueues>.header .search-input-wrapper md-input-container .md-errors-spacer{display:none}#chatQueues>.header .search-input-wrapper md-input-container input{border-bottom:1px solid rgba(255,255,255,.8);color:rgba(255,255,255,.8);width:240px}#chatQueues>.header .search-input-wrapper md-input-container input::placeholder{color:rgba(255,255,255,.8)}#chatQueues>.header .search-input-wrapper md-input-container input:focus{border-bottom:1px solid #fff;color:#fff}#chatQueues>.header.selected-bar{position:absolute;top:0;left:0;right:0;z-index:999;background-image:none;opacity:1!important}#chatQueues>.header.selected-bar .close-button-wrapper{width:244px}#chatQueues>.content{position:absolute;top:76px;bottom:0;right:0;left:0}#chatQueues>.content .main{padding:16px 90px 0 4px;position:absolute;top:0;left:24px;right:0;bottom:0}#chatQueues>.content .main .no-results{box-shadow:0 1px 1px 0 rgba(0,0,0,.14)}#chatQueues #add-chatQueue-button{position:fixed;bottom:8px;right:8px;padding:0}#chatQueues #upload-chatQueue-button{position:fixed;bottom:8px;right:8px;padding:0}md-dialog.chatQueue-dialog{max-width:720px;width:720px}md-dialog.chatQueue-dialog md-dialog-content{display:block;position:relative}md-dialog.chatQueue-dialog md-toolbar .title{font-size:17px}md-dialog.chatQueue-dialog md-input-container textarea{min-height:150px}md-dialog.chatQueue-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.chatQueue-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.chatQueue-dialog .date-container{padding:16px 0 24px 0}md-dialog.chatQueue-dialog .error-list{font-size:13px}md-dialog.chatQueue-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.chatQueue-dialog .error-list .error .message{font-weight:500}md-dialog.chatQueue-dialog .error-list .error .md-button{margin:0}md-dialog.chatQueue-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.chatQueue-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}#chat-chatQueue .header{height:76px;min-height:76px;max-height:76px}#chat-chatQueue .header .goto-chatQueues-button{margin-right:16px}#chat-chatQueue .header .chatQueue-image{overflow:hidden;width:56px;height:56px;margin-right:16px;border:3px solid rgba(0,0,0,.12)}#chat-chatQueue .header .chatQueue-image img{height:100%;width:auto;max-width:none}#chat-chatQueue .header .subtitle{margin:6px 0 0 0}#chat-chatQueue .chatQueue-detail-form-container{padding:24px;margin-bottom:24px}#chat-chatQueue .chatQueue-detail-form-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}#chat-chatQueue .chatQueue-detail-form-container .handle{cursor:move}#chat-chatQueue .chatQueue-detail-form-container md-input-container md-switch{margin:0!important}#chat-chatQueue .chatQueue-detail-form-container #chatQueue-image-uploader{position:relative}#chat-chatQueue .chatQueue-detail-form-container #chatQueue-image-uploader.dropping .drop-text{display:flex}#chat-chatQueue .chatQueue-detail-form-container #chatQueue-image-uploader .drop-text{display:none;position:absolute;top:0;right:0;bottom:0;left:0;padding:16px;text-align:center;border:2px dashed rgba(0,0,0,.12);background:#fff;font-size:20px;z-index:100}#chat-chatQueue .chatQueue-detail-form-container #chatQueue-image-uploader .upload-button{margin-bottom:16px}#chat-chatQueue .chatQueue-detail-form-container #chatQueue-image-uploader .chatQueue-image{position:relative;width:200px;height:200px;border:1px solid rgba(0,0,0,.12);margin:8px}#chat-chatQueue .chatQueue-detail-form-container #chatQueue-image-uploader .chatQueue-image.uploading .overlay{position:absolute;top:0;right:0;bottom:0;left:0;background:rgba(0,0,0,.87)}#chat-chatQueue .chatQueue-detail-form-container #chatQueue-image-uploader .chatQueue-image .media{max-height:100%}#chat-chatQueue md-table-container thead tr th:not(:first-child):not(.no-padding){padding:0 20px 0 0!important}#chat-chatQueue md-table-container thead th.md-checkbox-column:not(.no-padding){padding:0 24px!important}#chat-chatQueue md-table-container tbody tr td:not(:first-child):not(.no-padding):not(.actions-padding){padding:0 20px 0 0!important}#chat-chatQueue md-table-container.font-size-12 td.md-cell{font-size:12px!important}#chatWebsites{position:relative}#chatWebsites>.header{height:76px;min-height:76px;max-height:76px}#chatWebsites>.header .logo .logo-icon{margin:0 16px 0 0}#chatWebsites>.header .logo .logo-text{font-size:24px}#chatWebsites>.header md-icon{color:#fff}#chatWebsites>.header .search-input-wrapper{position:relative}#chatWebsites>.header .search-input-wrapper label{padding-right:4px;cursor:pointer}#chatWebsites>.header .search-input-wrapper label md-icon{color:rgba(255,255,255,.8)}#chatWebsites>.header .search-input-wrapper md-input-container .md-errors-spacer{display:none}#chatWebsites>.header .search-input-wrapper md-input-container input{border-bottom:1px solid rgba(255,255,255,.8);color:rgba(255,255,255,.8);width:240px}#chatWebsites>.header .search-input-wrapper md-input-container input::placeholder{color:rgba(255,255,255,.8)}#chatWebsites>.header .search-input-wrapper md-input-container input:focus{border-bottom:1px solid #fff;color:#fff}#chatWebsites>.header.selected-bar{position:absolute;top:0;left:0;right:0;z-index:999;background-image:none;opacity:1!important}#chatWebsites>.header.selected-bar .close-button-wrapper{width:244px}#chatWebsites>.content{position:absolute;top:76px;bottom:0;right:0;left:0}#chatWebsites>.content .main{padding:16px 90px 0 4px;position:absolute;top:0;left:24px;right:0;bottom:0}#chatWebsites>.content .main .no-results{box-shadow:0 1px 1px 0 rgba(0,0,0,.14)}#chatWebsites #add-chatWebsite-button{position:fixed;bottom:8px;right:8px;padding:0}#chatWebsites #upload-chatWebsite-button{position:fixed;bottom:8px;right:8px;padding:0}md-dialog.chatWebsite-dialog{max-width:720px;width:720px}md-dialog.chatWebsite-dialog md-dialog-content{display:block;position:relative}md-dialog.chatWebsite-dialog md-toolbar .title{font-size:17px}md-dialog.chatWebsite-dialog md-input-container textarea{min-height:150px}md-dialog.chatWebsite-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.chatWebsite-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.chatWebsite-dialog .date-container{padding:16px 0 24px 0}md-dialog.chatWebsite-dialog .error-list{font-size:13px}md-dialog.chatWebsite-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.chatWebsite-dialog .error-list .error .message{font-weight:500}md-dialog.chatWebsite-dialog .error-list .error .md-button{margin:0}md-dialog.chatWebsite-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.chatWebsite-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.chatWebsite-dialog{max-width:720px;width:720px}md-dialog.chatWebsite-dialog md-dialog-content{display:block;position:relative}md-dialog.chatWebsite-dialog md-toolbar .title{font-size:17px}md-dialog.chatWebsite-dialog md-input-container textarea{min-height:150px}md-dialog.chatWebsite-dialog .date-container{padding:16px 0 24px 0}md-dialog.chatWebsite-dialog .error-list{font-size:13px}md-dialog.chatWebsite-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.chatWebsite-dialog .error-list .error .message{font-weight:500}md-dialog.chatWebsite-dialog .error-list .error .md-button{margin:0}md-dialog.chatWebsite-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.chatWebsite-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.chatWebsite-dialog{max-width:720px;width:720px}md-dialog.chatWebsite-dialog md-dialog-content{display:block;position:relative}md-dialog.chatWebsite-dialog md-toolbar .title{font-size:17px}md-dialog.chatWebsite-dialog md-input-container textarea{min-height:150px}md-dialog.chatWebsite-dialog .date-container{padding:16px 0 24px 0}md-dialog.chatWebsite-dialog .error-list{font-size:13px}md-dialog.chatWebsite-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.chatWebsite-dialog .error-list .error .message{font-weight:500}md-dialog.chatWebsite-dialog .error-list .error .md-button{margin:0}md-dialog.chatWebsite-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.chatWebsite-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.chatWebsite-dialog{max-width:720px;width:720px}md-dialog.chatWebsite-dialog md-dialog-content{display:block;position:relative}md-dialog.chatWebsite-dialog md-toolbar .title{font-size:17px}md-dialog.chatWebsite-dialog md-input-container textarea{min-height:150px}md-dialog.chatWebsite-dialog .date-container{padding:16px 0 24px 0}md-dialog.chatWebsite-dialog .error-list{font-size:13px}md-dialog.chatWebsite-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.chatWebsite-dialog .error-list .error .message{font-weight:500}md-dialog.chatWebsite-dialog .error-list .error .md-button{margin:0}md-dialog.chatWebsite-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.chatWebsite-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.chatWebsite-dialog{max-width:720px;width:720px}md-dialog.chatWebsite-dialog md-dialog-content{display:block;position:relative}md-dialog.chatWebsite-dialog md-toolbar .title{font-size:17px}md-dialog.chatWebsite-dialog md-input-container textarea{min-height:150px}md-dialog.chatWebsite-dialog .date-container{padding:16px 0 24px 0}md-dialog.chatWebsite-dialog .error-list{font-size:13px}md-dialog.chatWebsite-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.chatWebsite-dialog .error-list .error .message{font-weight:500}md-dialog.chatWebsite-dialog .error-list .error .md-button{margin:0}md-dialog.chatWebsite-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.chatWebsite-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.chatWebsite-dialog{max-width:720px;width:720px}md-dialog.chatWebsite-dialog md-dialog-content{display:block;position:relative}md-dialog.chatWebsite-dialog md-toolbar .title{font-size:17px}md-dialog.chatWebsite-dialog md-input-container textarea{min-height:150px}md-dialog.chatWebsite-dialog .date-container{padding:16px 0 24px 0}md-dialog.chatWebsite-dialog .error-list{font-size:13px}md-dialog.chatWebsite-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.chatWebsite-dialog .error-list .error .message{font-weight:500}md-dialog.chatWebsite-dialog .error-list .error .md-button{margin:0}md-dialog.chatWebsite-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.chatWebsite-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.chatWebsite-dialog{max-width:720px;width:720px}md-dialog.chatWebsite-dialog md-dialog-content{display:block;position:relative}md-dialog.chatWebsite-dialog md-toolbar .title{font-size:17px}md-dialog.chatWebsite-dialog md-input-container textarea{min-height:150px}md-dialog.chatWebsite-dialog .date-container{padding:16px 0 24px 0}md-dialog.chatWebsite-dialog .error-list{font-size:13px}md-dialog.chatWebsite-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.chatWebsite-dialog .error-list .error .message{font-weight:500}md-dialog.chatWebsite-dialog .error-list .error .md-button{margin:0}md-dialog.chatWebsite-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.chatWebsite-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.chatWebsite-dialog{max-width:720px;width:720px}md-dialog.chatWebsite-dialog md-dialog-content{display:block;position:relative}md-dialog.chatWebsite-dialog md-toolbar .title{font-size:17px}md-dialog.chatWebsite-dialog md-input-container textarea{min-height:150px}md-dialog.chatWebsite-dialog .date-container{padding:16px 0 24px 0}md-dialog.chatWebsite-dialog .error-list{font-size:13px}md-dialog.chatWebsite-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.chatWebsite-dialog .error-list .error .message{font-weight:500}md-dialog.chatWebsite-dialog .error-list .error .md-button{margin:0}md-dialog.chatWebsite-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.chatWebsite-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.chatWebsite-dialog{max-width:720px;width:720px}md-dialog.chatWebsite-dialog md-dialog-content{display:block;position:relative}md-dialog.chatWebsite-dialog md-toolbar .title{font-size:17px}md-dialog.chatWebsite-dialog md-input-container textarea{min-height:150px}md-dialog.chatWebsite-dialog .date-container{padding:16px 0 24px 0}md-dialog.chatWebsite-dialog .error-list{font-size:13px}md-dialog.chatWebsite-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.chatWebsite-dialog .error-list .error .message{font-weight:500}md-dialog.chatWebsite-dialog .error-list .error .md-button{margin:0}md-dialog.chatWebsite-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.chatWebsite-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.chatWebsite-dialog{max-width:720px;width:720px}md-dialog.chatWebsite-dialog md-dialog-content{display:block;position:relative}md-dialog.chatWebsite-dialog md-toolbar .title{font-size:17px}md-dialog.chatWebsite-dialog md-input-container textarea{min-height:150px}md-dialog.chatWebsite-dialog .date-container{padding:16px 0 24px 0}md-dialog.chatWebsite-dialog .error-list{font-size:13px}md-dialog.chatWebsite-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.chatWebsite-dialog .error-list .error .message{font-weight:500}md-dialog.chatWebsite-dialog .error-list .error .md-button{margin:0}md-dialog.chatWebsite-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.chatWebsite-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.chatWebsite-dialog{max-width:720px;width:720px}md-dialog.chatWebsite-dialog md-dialog-content{display:block;position:relative}md-dialog.chatWebsite-dialog md-toolbar .title{font-size:17px}md-dialog.chatWebsite-dialog md-input-container textarea{min-height:150px}md-dialog.chatWebsite-dialog .date-container{padding:16px 0 24px 0}md-dialog.chatWebsite-dialog .error-list{font-size:13px}md-dialog.chatWebsite-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.chatWebsite-dialog .error-list .error .message{font-weight:500}md-dialog.chatWebsite-dialog .error-list .error .md-button{margin:0}md-dialog.chatWebsite-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.chatWebsite-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.chatWebsite-dialog{max-width:720px;width:720px}md-dialog.chatWebsite-dialog md-dialog-content{display:block;position:relative}md-dialog.chatWebsite-dialog md-toolbar .title{font-size:17px}md-dialog.chatWebsite-dialog md-input-container textarea{min-height:150px}md-dialog.chatWebsite-dialog .date-container{padding:16px 0 24px 0}md-dialog.chatWebsite-dialog .error-list{font-size:13px}md-dialog.chatWebsite-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.chatWebsite-dialog .error-list .error .message{font-weight:500}md-dialog.chatWebsite-dialog .error-list .error .md-button{margin:0}md-dialog.chatWebsite-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.chatWebsite-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.chatWebsite-dialog{max-width:720px;width:720px}md-dialog.chatWebsite-dialog md-dialog-content{display:block;position:relative}md-dialog.chatWebsite-dialog md-toolbar .title{font-size:17px}md-dialog.chatWebsite-dialog md-input-container textarea{min-height:150px}md-dialog.chatWebsite-dialog .date-container{padding:16px 0 24px 0}md-dialog.chatWebsite-dialog .error-list{font-size:13px}md-dialog.chatWebsite-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.chatWebsite-dialog .error-list .error .message{font-weight:500}md-dialog.chatWebsite-dialog .error-list .error .md-button{margin:0}md-dialog.chatWebsite-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.chatWebsite-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.chatWebsite-dialog{max-width:720px;width:720px}md-dialog.chatWebsite-dialog md-dialog-content{display:block;position:relative}md-dialog.chatWebsite-dialog md-toolbar .title{font-size:17px}md-dialog.chatWebsite-dialog md-input-container textarea{min-height:150px}md-dialog.chatWebsite-dialog .date-container{padding:16px 0 24px 0}md-dialog.chatWebsite-dialog .error-list{font-size:13px}md-dialog.chatWebsite-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.chatWebsite-dialog .error-list .error .message{font-weight:500}md-dialog.chatWebsite-dialog .error-list .error .md-button{margin:0}md-dialog.chatWebsite-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.chatWebsite-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.chatWebsite-dialog{max-width:720px;width:720px}md-dialog.chatWebsite-dialog md-dialog-content{display:block;position:relative}md-dialog.chatWebsite-dialog md-toolbar .title{font-size:17px}md-dialog.chatWebsite-dialog md-input-container textarea{min-height:150px}md-dialog.chatWebsite-dialog .date-container{padding:16px 0 24px 0}md-dialog.chatWebsite-dialog .error-list{font-size:13px}md-dialog.chatWebsite-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.chatWebsite-dialog .error-list .error .message{font-weight:500}md-dialog.chatWebsite-dialog .error-list .error .md-button{margin:0}md-dialog.chatWebsite-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.chatWebsite-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.chatCannedAnswer-dialog{max-width:720px;width:720px}md-dialog.chatCannedAnswer-dialog md-dialog-content{display:block;position:relative}md-dialog.chatCannedAnswer-dialog md-toolbar .title{font-size:17px}md-dialog.chatCannedAnswer-dialog md-input-container textarea{min-height:150px}md-dialog.chatCannedAnswer-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.chatCannedAnswer-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.chatCannedAnswer-dialog .date-container{padding:16px 0 24px 0}md-dialog.chatCannedAnswer-dialog .error-list{font-size:13px}md-dialog.chatCannedAnswer-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.chatCannedAnswer-dialog .error-list .error .message{font-weight:500}md-dialog.chatCannedAnswer-dialog .error-list .error .md-button{margin:0}md-dialog.chatCannedAnswer-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.chatCannedAnswer-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.offlineMessage-dialog{max-width:720px;width:720px}md-dialog.offlineMessage-dialog md-dialog-content{display:block;position:relative}md-dialog.offlineMessage-dialog md-toolbar .title{font-size:17px}md-dialog.offlineMessage-dialog md-input-container textarea{min-height:150px}md-dialog.offlineMessage-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.offlineMessage-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.offlineMessage-dialog .date-container{padding:16px 0 24px 0}md-dialog.offlineMessage-dialog .error-list{font-size:13px}md-dialog.offlineMessage-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.offlineMessage-dialog .error-list .error .message{font-weight:500}md-dialog.offlineMessage-dialog .error-list .error .md-button{margin:0}md-dialog.offlineMessage-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.offlineMessage-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.chatProactiveAction-dialog{max-width:720px;width:720px}md-dialog.chatProactiveAction-dialog md-dialog-content{display:block;position:relative}md-dialog.chatProactiveAction-dialog md-toolbar .title{font-size:17px}md-dialog.chatProactiveAction-dialog md-input-container textarea{min-height:150px}md-dialog.chatProactiveAction-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.chatProactiveAction-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.chatProactiveAction-dialog .date-container{padding:16px 0 24px 0}md-dialog.chatProactiveAction-dialog .error-list{font-size:13px}md-dialog.chatProactiveAction-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.chatProactiveAction-dialog .error-list .error .message{font-weight:500}md-dialog.chatProactiveAction-dialog .error-list .error .md-button{margin:0}md-dialog.chatProactiveAction-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.chatProactiveAction-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}#chat-chatWebsite .header{height:76px;min-height:76px;max-height:76px}#chat-chatWebsite .header .goto-chatWebsites-button{margin-right:16px}#chat-chatWebsite .header .chatWebsite-image{overflow:hidden;width:56px;height:56px;margin-right:16px;border:3px solid rgba(0,0,0,.12)}#chat-chatWebsite .header .chatWebsite-image img{height:100%;width:auto;max-width:none}#chat-chatWebsite .header .subtitle{margin:6px 0 0 0}#chat-chatWebsite .chatWebsite-detail-form-container{padding:24px;margin-bottom:24px}#chat-chatWebsite .chatWebsite-detail-form-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}#chat-chatWebsite .chatWebsite-detail-form-container .handle{cursor:move}#chat-chatWebsite .chatWebsite-detail-form-container md-input-container md-switch{margin:0!important}#chat-chatWebsite .chatWebsite-detail-form-container #chatWebsite-image-uploader{position:relative}#chat-chatWebsite .chatWebsite-detail-form-container #chatWebsite-image-uploader.dropping .drop-text{display:flex}#chat-chatWebsite .chatWebsite-detail-form-container #chatWebsite-image-uploader .drop-text{display:none;position:absolute;top:0;right:0;bottom:0;left:0;padding:16px;text-align:center;border:2px dashed rgba(0,0,0,.12);background:#fff;font-size:20px;z-index:100}#chat-chatWebsite .chatWebsite-detail-form-container #chatWebsite-image-uploader .upload-button{margin-bottom:16px}#chat-chatWebsite .chatWebsite-detail-form-container #chatWebsite-image-uploader .chatWebsite-image{position:relative;width:200px;height:200px;border:1px solid rgba(0,0,0,.12);margin:8px}#chat-chatWebsite .chatWebsite-detail-form-container #chatWebsite-image-uploader .chatWebsite-image.uploading .overlay{position:absolute;top:0;right:0;bottom:0;left:0;background:rgba(0,0,0,.87)}#chat-chatWebsite .chatWebsite-detail-form-container #chatWebsite-image-uploader .chatWebsite-image .media{max-height:100%}#chat-chatWebsite md-table-container thead tr th:not(:first-child):not(.no-padding){padding:0 20px 0 0!important}#chat-chatWebsite md-table-container thead th.md-checkbox-column:not(.no-padding){padding:0 24px!important}#chat-chatWebsite md-table-container tbody tr td:not(:first-child):not(.no-padding):not(.actions-padding){padding:0 20px 0 0!important}#chat-chatWebsite md-table-container.font-size-12 td.md-cell{font-size:12px!important}@media screen and (min-width:1921px){#chat-chatWebsite .actionAppData{width:800px!important}}@media screen and (max-width:1920px){#chat-chatWebsite .actionAppData{width:700px!important}}@media screen and (min-width:1751px) and (max-width:1919px){#chat-chatWebsite .actionAppData{width:600px!important}}@media screen and (min-width:1601px) and (max-width:1750px){#chat-chatWebsite .actionAppData{width:500px!important}}@media screen and (min-width:1537px) and (max-width:1600px){#chat-chatWebsite .actionAppData{width:450px!important}}@media screen and (min-width:1281px) and (max-width:1536px){#chat-chatWebsite .actionAppData{width:300px!important}}@media screen and (max-width:1280px){#chat-chatWebsite .actionAppData{width:150px!important}}@media screen and (max-width:960px){#chat-chatWebsite .actionAppData{width:80px!important}}#realtime{height:auto}#realtime>.content .blink{animation:blinker 2s linear infinite}#realtime>.content .avatar-wrapper{position:relative}#realtime>.content .avatar-wrapper .status{position:absolute;bottom:-3px;right:5px}#realtime>.content .search-input-wrapper{position:relative;margin-left:20px}#realtime>.content .search-input-wrapper label{padding:6px;cursor:pointer}#realtime>.content .search-input-wrapper md-input-container{padding-top:20px}#realtime>.content .main .labels{padding:8px 16px}#realtime>.content .main .labels .label{margin:0 0 2px 4px;padding:2px 5px;font-size:11px;white-space:nowrap;border-radius:2px}#realtime>.content .main .status{position:absolute;bottom:-3px;right:5px}#realtime>.content .main .avatar-wrapper{position:relative}#realtime>.content .main .avatar-wrapper .status{position:absolute;bottom:-3px;right:5px}#realtime>.content .custom-column{padding:0 24px!important}@keyframes blinker{50%{opacity:0}}#companies{position:relative}#companies>.header{height:76px;min-height:76px;max-height:76px}#companies>.header .logo .logo-icon{margin:0 16px 0 0}#companies>.header .logo .logo-text{font-size:24px}#companies>.header md-icon{color:#fff}#companies>.header .search-input-wrapper{position:relative}#companies>.header .search-input-wrapper label{padding-right:4px;cursor:pointer}#companies>.header .search-input-wrapper label md-icon{color:rgba(255,255,255,.8)}#companies>.header .search-input-wrapper md-input-container .md-errors-spacer{display:none}#companies>.header .search-input-wrapper md-input-container input{border-bottom:1px solid rgba(255,255,255,.8);color:rgba(255,255,255,.8);width:240px}#companies>.header .search-input-wrapper md-input-container input::placeholder{color:rgba(255,255,255,.8)}#companies>.header .search-input-wrapper md-input-container input:focus{border-bottom:1px solid #fff;color:#fff}#companies>.header.selected-bar{position:absolute;top:0;left:0;right:0;z-index:999;background-image:none;opacity:1!important}#companies>.header.selected-bar .close-button-wrapper{width:244px}#companies>.content{position:absolute;top:76px;bottom:0;right:0;left:0}#companies>.content .main{padding:16px 90px 0 4px;position:absolute;top:0;left:24px;right:0;bottom:0}#companies>.content .main .no-results{box-shadow:0 1px 1px 0 rgba(0,0,0,.14)}#companies #add-company-button{position:fixed;bottom:8px;right:8px;padding:0}#companies #upload-company-button{position:fixed;bottom:8px;right:8px;padding:0}md-dialog.company-dialog{max-width:720px;width:720px}md-dialog.company-dialog md-dialog-content{display:block;position:relative}md-dialog.company-dialog md-toolbar .title{font-size:17px}md-dialog.company-dialog md-input-container textarea{min-height:150px}md-dialog.company-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.company-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.company-dialog .date-container{padding:16px 0 24px 0}md-dialog.company-dialog .error-list{font-size:13px}md-dialog.company-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.company-dialog .error-list .error .message{font-weight:500}md-dialog.company-dialog .error-list .error .md-button{margin:0}md-dialog.company-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.company-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}#contactmanager-company .header{height:76px;min-height:76px;max-height:76px}#contactmanager-company .header .goto-companies-button{margin-right:16px}#contactmanager-company .header .company-image{overflow:hidden;width:56px;height:56px;margin-right:16px;border:3px solid rgba(0,0,0,.12)}#contactmanager-company .header .company-image img{height:100%;width:auto;max-width:none}#contactmanager-company .header .subtitle{margin:6px 0 0 0}#contactmanager-company .company-detail-form-container{padding:24px;margin-bottom:24px}#contactmanager-company .company-detail-form-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}#contactmanager-company .company-detail-form-container .handle{cursor:move}#contactmanager-company .company-detail-form-container md-input-container md-switch{margin:0!important}#contactmanager-company .company-detail-form-container #company-image-uploader{position:relative}#contactmanager-company .company-detail-form-container #company-image-uploader.dropping .drop-text{display:flex}#contactmanager-company .company-detail-form-container #company-image-uploader .drop-text{display:none;position:absolute;top:0;right:0;bottom:0;left:0;padding:16px;text-align:center;border:2px dashed rgba(0,0,0,.12);background:#fff;font-size:20px;z-index:100}#contactmanager-company .company-detail-form-container #company-image-uploader .upload-button{margin-bottom:16px}#contactmanager-company .company-detail-form-container #company-image-uploader .company-image{position:relative;width:200px;height:200px;border:1px solid rgba(0,0,0,.12);margin:8px}#contactmanager-company .company-detail-form-container #company-image-uploader .company-image.uploading .overlay{position:absolute;top:0;right:0;bottom:0;left:0;background:rgba(0,0,0,.87)}#contactmanager-company .company-detail-form-container #company-image-uploader .company-image .media{max-height:100%}#contactmanager-company md-table-container thead tr th:not(:first-child):not(.no-padding){padding:0 20px 0 0!important}#contactmanager-company md-table-container thead th.md-checkbox-column:not(.no-padding){padding:0 24px!important}#contactmanager-company md-table-container tbody tr td:not(:first-child):not(.no-padding):not(.actions-padding){padding:0 20px 0 0!important}#contactmanager-company md-table-container.font-size-12 td.md-cell{font-size:12px!important}#contacts{position:relative}#contacts>.header{height:76px;min-height:76px;max-height:76px}#contacts>.header .logo .logo-icon{margin:0 16px 0 0}#contacts>.header .logo .logo-text{font-size:24px}#contacts>.header md-icon{color:#fff}#contacts>.header .search-input-wrapper{position:relative}#contacts>.header .search-input-wrapper label{padding-right:4px;cursor:pointer}#contacts>.header .search-input-wrapper label md-icon{color:rgba(255,255,255,.8)}#contacts>.header .search-input-wrapper md-input-container .md-errors-spacer{display:none}#contacts>.header .search-input-wrapper md-input-container input{border-bottom:1px solid rgba(255,255,255,.8);color:rgba(255,255,255,.8);width:240px}#contacts>.header .search-input-wrapper md-input-container input::placeholder{color:rgba(255,255,255,.8)}#contacts>.header .search-input-wrapper md-input-container input:focus{border-bottom:1px solid #fff;color:#fff}#contacts>.header.selected-bar{position:absolute;top:0;left:0;right:0;z-index:999;background-image:none;opacity:1!important}#contacts>.header.selected-bar .close-button-wrapper{width:244px}#contacts>.content{position:absolute;top:76px;bottom:0;right:0;left:0}#contacts>.content .main{padding:16px 90px 0 4px;position:absolute;top:0;left:24px;right:0;bottom:0}#contacts>.content .main .no-results{box-shadow:0 1px 1px 0 rgba(0,0,0,.14)}#contacts #add-contact-button{position:fixed;bottom:8px;right:8px;padding:0}md-dialog.cm-contact-dialog{max-width:720px;width:720px}md-dialog.cm-contact-dialog md-dialog-content{display:block;position:relative}md-dialog.cm-contact-dialog md-toolbar .title{font-size:17px}md-dialog.cm-contact-dialog md-input-container textarea{min-height:150px}md-dialog.cm-contact-dialog .date-container{padding:16px 0 24px 0}md-dialog.cm-contact-dialog .error-list{font-size:13px}md-dialog.cm-contact-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.cm-contact-dialog .error-list .error .message{font-weight:500}md-dialog.cm-contact-dialog .error-list .error .md-button{margin:0}md-dialog.cm-contact-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.cm-contact-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.cm-contact-dialog{max-width:720px;width:720px}md-dialog.cm-contact-dialog md-dialog-content{display:block;position:relative}md-dialog.cm-contact-dialog md-toolbar .title{font-size:17px}md-dialog.cm-contact-dialog md-input-container textarea{min-height:150px}md-dialog.cm-contact-dialog .date-container{padding:16px 0 24px 0}md-dialog.cm-contact-dialog .error-list{font-size:13px}md-dialog.cm-contact-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.cm-contact-dialog .error-list .error .message{font-weight:500}md-dialog.cm-contact-dialog .error-list .error .md-button{margin:0}md-dialog.cm-contact-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.cm-contact-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.hopper-dialog{max-width:720px;width:720px}md-dialog.hopper-dialog md-dialog-content{display:block;position:relative}md-dialog.hopper-dialog md-toolbar .title{font-size:17px}md-dialog.hopper-dialog md-input-container textarea{min-height:150px}md-dialog.hopper-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.hopper-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.hopper-dialog .date-container{padding:16px 0 24px 0}md-dialog.hopper-dialog .error-list{font-size:13px}md-dialog.hopper-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.hopper-dialog .error-list .error .message{font-weight:500}md-dialog.hopper-dialog .error-list .error .md-button{margin:0}md-dialog.hopper-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.hopper-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}#cm-contact .pointer{cursor:pointer}#cm-contact .header{height:76px;min-height:76px;max-height:76px}#cm-contact .header .goto-contacts-button{margin-right:16px}#cm-contact .header .contact-image{overflow:hidden;width:56px;height:56px;margin-right:16px;border:3px solid rgba(0,0,0,.12)}#cm-contact .header .contact-image img{height:100%;width:auto;max-width:none}#cm-contact .header .subtitle{margin:6px 0 0 0}#cm-contact .contact-detail-form-container{padding:24px;margin-bottom:24px}#cm-contact .contact-detail-form-container md-input-container:not(.md-input-invalid)>md-icon.email{color:green}#cm-contact .contact-detail-form-container md-input-container:not(.md-input-invalid)>md-icon.firstname{color:#1e90ff}#cm-contact .contact-detail-form-container md-input-container.md-input-invalid>md-icon.email,#cm-contact .contact-detail-form-container md-input-container.md-input-invalid>md-icon.firstname{color:red}#cm-contact .contact-detail-form-container .hint{position:absolute;left:2px;right:auto;bottom:7px;font-size:10px;line-height:14px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.import-dialog{max-width:720px;width:720px}md-dialog.import-dialog md-dialog-content{display:block;position:relative}md-dialog.import-dialog md-toolbar .title{font-size:17px}md-dialog.import-dialog md-input-container textarea{min-height:150px}md-dialog.import-dialog .date-container{padding:16px 0 24px 0}md-dialog.import-dialog .error-list{font-size:13px}md-dialog.import-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.import-dialog .error-list .error .message{font-weight:500}md-dialog.import-dialog .error-list .error .md-button{margin:0}md-dialog.import-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.import-dialog .error-list .info{background-color:rgba(24,160,135,.08);border:1px solid rgba(24,160,135,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.import-dialog .error-list .info .message{font-weight:500}md-dialog.import-dialog .error-list .info .md-button{margin:0}md-dialog.import-dialog .error-list .info:last-child{margin-bottom:30px}md-dialog.import-dialog .contact-image{overflow:hidden;width:56px;height:56px;margin-right:16px;border:3px solid rgba(0,0,0,.12)}md-dialog.import-dialog .contact-image img{height:100%;width:auto;max-width:none}md-dialog.import-dialog .contact-image .media{max-height:100%}md-dialog.import-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.cm-contact-dialog{max-width:720px;width:720px}md-dialog.cm-contact-dialog md-dialog-content{display:block;position:relative}md-dialog.cm-contact-dialog md-toolbar .title{font-size:17px}md-dialog.cm-contact-dialog md-input-container textarea{min-height:150px}md-dialog.cm-contact-dialog .date-container{padding:16px 0 24px 0}md-dialog.cm-contact-dialog .error-list{font-size:13px}md-dialog.cm-contact-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.cm-contact-dialog .error-list .error .message{font-weight:500}md-dialog.cm-contact-dialog .error-list .error .md-button{margin:0}md-dialog.cm-contact-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.cm-contact-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.globalCustomField-dialog{max-width:720px;width:720px}md-dialog.globalCustomField-dialog md-dialog-content{display:block;position:relative}md-dialog.globalCustomField-dialog md-toolbar .title{font-size:17px}md-dialog.globalCustomField-dialog md-input-container textarea{min-height:150px}md-dialog.globalCustomField-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.globalCustomField-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.globalCustomField-dialog .date-container{padding:16px 0 24px 0}md-dialog.globalCustomField-dialog .error-list{font-size:13px}md-dialog.globalCustomField-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.globalCustomField-dialog .error-list .error .message{font-weight:500}md-dialog.globalCustomField-dialog .error-list .error .md-button{margin:0}md-dialog.globalCustomField-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.globalCustomField-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}#globalCustomFields{position:relative}#globalCustomFields>.header{height:76px;min-height:76px;max-height:76px}#globalCustomFields>.header .logo .logo-icon{margin:0 16px 0 0}#globalCustomFields>.header .logo .logo-text{font-size:24px}#globalCustomFields>.header md-icon{color:#fff}#globalCustomFields>.header .search-input-wrapper{position:relative}#globalCustomFields>.header .search-input-wrapper label{padding-right:4px;cursor:pointer}#globalCustomFields>.header .search-input-wrapper label md-icon{color:rgba(255,255,255,.8)}#globalCustomFields>.header .search-input-wrapper md-input-container .md-errors-spacer{display:none}#globalCustomFields>.header .search-input-wrapper md-input-container input{border-bottom:1px solid rgba(255,255,255,.8);color:rgba(255,255,255,.8);width:240px}#globalCustomFields>.header .search-input-wrapper md-input-container input::placeholder{color:rgba(255,255,255,.8)}#globalCustomFields>.header .search-input-wrapper md-input-container input:focus{border-bottom:1px solid #fff;color:#fff}#globalCustomFields>.header.selected-bar{position:absolute;top:0;left:0;right:0;z-index:999;background-image:none;opacity:1!important}#globalCustomFields>.header.selected-bar .close-button-wrapper{width:244px}#globalCustomFields>.content{position:absolute;top:76px;bottom:0;right:0;left:0}#globalCustomFields>.content .main{padding:16px 90px 0 4px;position:absolute;top:0;left:24px;right:0;bottom:0}#globalCustomFields>.content .main .no-results{box-shadow:0 1px 1px 0 rgba(0,0,0,.14)}#globalCustomFields #add-globalCustomField-button{position:fixed;bottom:8px;right:8px;padding:0}#globalCustomFields #upload-globalCustomField-button{position:fixed;bottom:8px;right:8px;padding:0}md-dialog.list-dialog{max-width:720px;width:720px}md-dialog.list-dialog md-dialog-content{display:block;position:relative}md-dialog.list-dialog md-toolbar .title{font-size:17px}md-dialog.list-dialog md-input-container textarea{min-height:150px}md-dialog.list-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.list-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.list-dialog .date-container{padding:16px 0 24px 0}md-dialog.list-dialog .error-list{font-size:13px}md-dialog.list-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.list-dialog .error-list .error .message{font-weight:500}md-dialog.list-dialog .error-list .error .md-button{margin:0}md-dialog.list-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.list-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.customField-dialog{max-width:720px;width:720px}md-dialog.customField-dialog md-dialog-content{display:block;position:relative}md-dialog.customField-dialog md-toolbar .title{font-size:17px}md-dialog.customField-dialog md-input-container textarea{min-height:150px}md-dialog.customField-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.customField-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.customField-dialog .date-container{padding:16px 0 24px 0}md-dialog.customField-dialog .error-list{font-size:13px}md-dialog.customField-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.customField-dialog .error-list .error .message{font-weight:500}md-dialog.customField-dialog .error-list .error .md-button{margin:0}md-dialog.customField-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.customField-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}#contactmanager-list .header{height:76px;min-height:76px;max-height:76px}#contactmanager-list .header .goto-lists-button{margin-right:16px}#contactmanager-list .header .list-image{overflow:hidden;width:56px;height:56px;margin-right:16px;border:3px solid rgba(0,0,0,.12)}#contactmanager-list .header .list-image img{height:100%;width:auto;max-width:none}#contactmanager-list .header .subtitle{margin:6px 0 0 0}#contactmanager-list .list-detail-form-container{padding:24px;margin-bottom:24px}#contactmanager-list .list-detail-form-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}#contactmanager-list .list-detail-form-container .handle{cursor:move}#contactmanager-list .list-detail-form-container md-input-container md-switch{margin:0!important}#contactmanager-list .list-detail-form-container #list-image-uploader{position:relative}#contactmanager-list .list-detail-form-container #list-image-uploader.dropping .drop-text{display:flex}#contactmanager-list .list-detail-form-container #list-image-uploader .drop-text{display:none;position:absolute;top:0;right:0;bottom:0;left:0;padding:16px;text-align:center;border:2px dashed rgba(0,0,0,.12);background:#fff;font-size:20px;z-index:100}#contactmanager-list .list-detail-form-container #list-image-uploader .upload-button{margin-bottom:16px}#contactmanager-list .list-detail-form-container #list-image-uploader .list-image{position:relative;width:200px;height:200px;border:1px solid rgba(0,0,0,.12);margin:8px}#contactmanager-list .list-detail-form-container #list-image-uploader .list-image.uploading .overlay{position:absolute;top:0;right:0;bottom:0;left:0;background:rgba(0,0,0,.87)}#contactmanager-list .list-detail-form-container #list-image-uploader .list-image .media{max-height:100%}#contactmanager-list md-table-container thead tr th:not(:first-child):not(.no-padding){padding:0 20px 0 0!important}#contactmanager-list md-table-container thead th.md-checkbox-column:not(.no-padding){padding:0 24px!important}#contactmanager-list md-table-container tbody tr td:not(:first-child):not(.no-padding):not(.actions-padding){padding:0 20px 0 0!important}#contactmanager-list md-table-container.font-size-12 td.md-cell{font-size:12px!important}#lists{position:relative}#lists>.header{height:76px;min-height:76px;max-height:76px}#lists>.header .logo .logo-icon{margin:0 16px 0 0}#lists>.header .logo .logo-text{font-size:24px}#lists>.header md-icon{color:#fff}#lists>.header .search-input-wrapper{position:relative}#lists>.header .search-input-wrapper label{padding-right:4px;cursor:pointer}#lists>.header .search-input-wrapper label md-icon{color:rgba(255,255,255,.8)}#lists>.header .search-input-wrapper md-input-container .md-errors-spacer{display:none}#lists>.header .search-input-wrapper md-input-container input{border-bottom:1px solid rgba(255,255,255,.8);color:rgba(255,255,255,.8);width:240px}#lists>.header .search-input-wrapper md-input-container input::placeholder{color:rgba(255,255,255,.8)}#lists>.header .search-input-wrapper md-input-container input:focus{border-bottom:1px solid #fff;color:#fff}#lists>.header.selected-bar{position:absolute;top:0;left:0;right:0;z-index:999;background-image:none;opacity:1!important}#lists>.header.selected-bar .close-button-wrapper{width:244px}#lists>.content{position:absolute;top:76px;bottom:0;right:0;left:0}#lists>.content .main{padding:16px 90px 0 4px;position:absolute;top:0;left:24px;right:0;bottom:0}#lists>.content .main .no-results{box-shadow:0 1px 1px 0 rgba(0,0,0,.14)}#lists #add-list-button{position:fixed;bottom:8px;right:8px;padding:0}#lists #upload-list-button{position:fixed;bottom:8px;right:8px;padding:0}#dashboard-custom .filter-header{background-image:url(/assets/images/backgrounds/header-bg.png);color:#fff}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}#agent-general{width:100%;height:100%;overflow:hidden}#agent-general .agent-content{width:100%;height:100%;overflow:auto}#agent-general .agent-content.overflow-hidden{overflow:hidden}#agent-general .agent-content md-tabs{width:100%;height:100%}#agent-general .agent-content md-tabs md-tabs-content-wrapper{width:100%;height:calc(100% - 48px)}#agent-general .agent-content md-tabs md-tabs-content-wrapper md-tab-content.md-active{width:100%;height:100%;overflow:auto}#agent-general .agent-general-home-navbar{flex-grow:1;overflow-y:auto;overflow-x:hidden}#agent-general .agent-general-home-navbar::-webkit-scrollbar{width:0;background:0 0}#agent-general .agent-general-home-navbar::-webkit-scrollbar-thumb{background:0 0;border-radius:0}#agent-general .agent-general-home-sections{width:100%;height:100%;overflow:auto}#agent-general .badge{min-width:20px;height:20px;line-height:20px;padding:0 7px;font-size:11px;font-weight:700;border-radius:20px;transition:opacity .2s ease-in-out .1s}#agent-general .table-header{background-image:url(/assets/images/backgrounds/header-bg.png);color:#fff;overflow-x:auto}#agent-general .table-header::-webkit-scrollbar-thumb{background-color:rgba(0,0,0,.2)}#agent-general .table-header .md-toolbar-tools div md-select .md-select-value.md-select-placeholder{color:#fff}#agent-general .table-header .md-toolbar-tools div md-select[disabled] .md-select-value.md-select-placeholder{color:#fff}#agent-general .table-header .md-toolbar-tools div md-select[disabled] .md-select-value.md-select-placeholder .md-select-icon{display:none}#agent-general .table-header ms-quick-filter .quick-filter-date-clear-button{color:#fff}#agent-general .tooltip-preview{position:relative;display:inline-block;text-decoration:underline}#agent-general .tooltip-preview .tooltip-preview-text{display:none;opacity:0;width:500px;height:216px;position:fixed;white-space:pre-line;z-index:99999999;overflow:hidden;transition:opacity cubic-bezier(.075,.82,.165,1)}#agent-general .tooltip-preview .tooltip-preview-text .tooltip-preview-text-container{width:100%;height:100%;overflow:hidden}#agent-general .tooltip-preview .tooltip-preview-text .tooltip-preview-text-container .email-preview-message{display:block;display:-webkit-box;margin:0 auto;width:100%;height:100%;line-height:1.4;-webkit-line-clamp:10;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis;word-break:break-all}#agent-general .tooltip-preview:hover .tooltip-preview-text{display:block;opacity:1}#agent-general .reload-list md-icon{color:#fff}#agent-general .advanced-search md-icon{color:#fff}#agent-general .create-new md-icon{color:#fff}#agent-general div.draft-manager-bar{background-color:#f5f5f5;position:sticky;height:34px;bottom:0;border-top:1px solid #e0e0e0}#agent-general div.draft-manager-bar ms-tab-scroll{overflow:hidden}#agent-general div.draft-manager-bar ms-tab-scroll div.draft-manager-tab{height:34px;border-right:1px solid #e0e0e0}#agent-general td.width-5,#agent-general th.width-5{width:5px!important;min-width:auto!important;max-width:none!important}#agent-general td.width-10,#agent-general th.width-10{width:10px!important;min-width:auto!important;max-width:none!important}#agent-general td.width-15,#agent-general th.width-15{width:15px!important;min-width:auto!important;max-width:none!important}#agent-general td.no-padding,#agent-general th.no-padding{padding:0!important}#agent-general span.contact-text{width:100px!important}#agent-general span.subject-text{width:300px!important}#agent-general span.no-margin-bottom{margin-bottom:0!important}#agent-general span.no-margin-top{margin-top:0!important}#agent-general md-table-container.interactions-list thead tr th:not(.no-padding):not(.id-header){padding:0 20px 0 0!important}#agent-general md-table-container.interactions-list tbody tr td:not(.no-padding):not(.actions-padding):not(.id){padding:0 20px 0 0!important}#agent-general td.actions-padding{padding:0 8px 0 0!important}#agent-general md-toolbar.md-table-toolbar[disabled]{pointer-events:none}#agent-general md-toolbar.md-table-toolbar[disabled] ms-search-bar{opacity:.7}#agent-general md-toolbar.md-table-toolbar[disabled] ms-quick-filter{opacity:.7}#agent-general md-toolbar.md-table-toolbar[disabled] button.advanced-search,#agent-general md-toolbar.md-table-toolbar[disabled] button.interaction-reload{opacity:.7}#agent-general md-card.call-info-card{min-width:220px}#agent-general md-card.call-info-card md-card-content,#agent-general md-card.call-info-card md-card-header{padding:10px!important}#agent-general md-card.call-info-card button.reload-button{padding:0;height:22px;width:auto}@media screen and (max-width:1280px){#agent-general span.contact-text{width:100px!important}}@media screen and (max-width:1920px){#agent-general span.contact-text{width:150px!important}}#agent-general-dialog{position:fixed;width:100%;height:100%}#agent-general-dialog .agent-content{position:fixed;top:0;bottom:0;left:0;right:0}body .md-select-menu-container{z-index:110}.md-toolbar-tools{font-size:12px}div.toolbar-quick-filter[disabled]{pointer-events:none;opacity:.7}md-dialog.agent-dialog{max-width:720px;width:720px}md-dialog.agent-dialog md-dialog-content{display:block;position:relative}md-dialog.agent-dialog md-toolbar .title{font-size:17px}md-dialog.agent-dialog md-input-container textarea{min-height:150px}md-dialog.agent-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.agent-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.agent-dialog .date-container{padding:16px 0 24px 0}md-dialog.agent-dialog .error-list{font-size:13px}md-dialog.agent-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.agent-dialog .error-list .error .message{font-weight:500}md-dialog.agent-dialog .error-list .error .md-button{margin:0}md-dialog.agent-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.agent-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.agent-dialog{max-width:720px;width:720px}md-dialog.agent-dialog md-dialog-content{display:block;position:relative}md-dialog.agent-dialog md-toolbar .title{font-size:17px}md-dialog.agent-dialog md-input-container textarea{min-height:150px}md-dialog.agent-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.agent-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.agent-dialog .date-container{padding:16px 0 24px 0}md-dialog.agent-dialog .error-list{font-size:13px}md-dialog.agent-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.agent-dialog .error-list .error .message{font-weight:500}md-dialog.agent-dialog .error-list .error .md-button{margin:0}md-dialog.agent-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.agent-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.contact-trigger-dialog{max-width:720px;width:720px}md-dialog.contact-trigger-dialog md-dialog-content{display:block;position:relative;max-height:400px;height:400px}md-dialog.contact-trigger-dialog md-toolbar{background-image:url(/assets/images/backgrounds/header-bg.png);background-position:top}md-dialog.contact-trigger-dialog md-toolbar .title{font-size:17px}md-dialog.contact-trigger-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}md-dialog.contact-trigger-dialog md-dialog-actions button.select-button{position:absolute;right:0;margin-right:16px}md-dialog md-grid-list.one-row-layout{height:150px;max-height:150px}md-dialog md-grid-list.two-rows-layout{height:300px;max-height:300px}md-dialog md-card.contact-info:hover{background-color:#e9eef1ad}@media screen and (max-width:1280px){md-dialog.contact-trigger-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.contact-trigger-dialog{width:90%}}md-dialog.agent-dialog{max-width:720px;width:720px}md-dialog.agent-dialog md-dialog-content{display:block;position:relative}md-dialog.agent-dialog md-toolbar .title{font-size:17px}md-dialog.agent-dialog md-input-container textarea{min-height:150px}md-dialog.agent-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.agent-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.agent-dialog .date-container{padding:16px 0 24px 0}md-dialog.agent-dialog .error-list{font-size:13px}md-dialog.agent-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.agent-dialog .error-list .error .message{font-weight:500}md-dialog.agent-dialog .error-list .error .md-button{margin:0}md-dialog.agent-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.agent-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.details-dialog{max-width:500px;width:500px}md-dialog.details-dialog md-dialog-content{display:block;position:relative}md-dialog.details-dialog md-toolbar .title{font-size:17px}md-dialog.details-dialog md-input-container textarea{min-height:150px}md-dialog.details-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.details-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.details-dialog .date-container{padding:16px 0 24px 0}md-dialog.details-dialog .error-list{font-size:13px}md-dialog.details-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.details-dialog .error-list .error .message{font-weight:500}md-dialog.details-dialog .error-list .error .md-button{margin:0}md-dialog.details-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.details-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}#interaction-app .tags{font-size:12px}#interaction-app .tags .tag{border-radius:2px;padding:3px 8px;background-color:rgba(0,0,0,.08)}#interaction-app .tags .tag .tag-color{width:8px;height:8px;margin-right:8px;border-radius:50%}#interaction-app .content-card{position:relative;height:100%}#interaction-app .content-card .interaction{background:linear-gradient(to bottom,rgba(255,255,255,.8) 0,rgba(255,255,255,.6) 20%,rgba(255,255,255,.8))}#interaction-app .content-card .interaction .avatar-small{width:30px;min-width:30px;height:30px;line-height:30px;margin:0 8px 0 0;border-radius:50%;font-size:17px;font-weight:500;text-align:center;color:#fff}#interaction-app .content-card .interaction .interaction-agents{min-height:40px;background-color:#f3f4f5;color:rgba(0,0,0,.87);border-bottom:1px solid rgba(0,0,0,.08)}#interaction-app .content-card .interaction .interaction-agents .responsive-interactions-button{padding:0}#interaction-app .content-card .interaction .interaction-agents .interaction-contact{cursor:pointer}#interaction-app .content-card .interaction .interaction-agents .interaction-contact .avatar{margin-right:16px}#interaction-app .content-card .interaction .interaction-toolbar{min-height:64px;background-color:#f3f4f5;color:rgba(0,0,0,.87);border-bottom:1px solid rgba(0,0,0,.08)}#interaction-app .content-card .interaction .interaction-toolbar md-icon{color:rgba(0,0,0,.87)}#interaction-app .content-card .interaction .interaction-toolbar .responsive-interactions-button{padding:0}#interaction-app .content-card .interaction .interaction-toolbar .interaction-contact{cursor:pointer}#interaction-app .content-card .interaction .interaction-toolbar .interaction-contact .avatar{margin-right:16px}#interaction-app .content-card .interaction .cannedarea{margin-right:7px;font-size:14px;border:1px solid #ccc;border-radius:3px;align-self:stretch}#interaction-app .content-card .interaction .cannedarea md-autocomplete-wrap{padding:0 1em}#interaction-app .content-card .interaction .emojionearea{margin-right:7px}#interaction-app .content-card .interaction #interaction-content{background:url(/assets/images/patterns/circles-light.png) repeat}#interaction-app .content-card .interaction #interaction-content .message-row .mail-content{padding:24px 0}#interaction-app .content-card .interaction #interaction-content .message-row .mail-content .subject{color:rgba(0,0,0,.54)}#interaction-app .content-card .interaction #interaction-content .message-row .mail-content .subject .subject-text{margin-right:4px;text-transform:lowercase}#interaction-app .content-card .interaction #interaction-content .message-row .mail-content .info{padding-bottom:16px}#interaction-app .content-card .interaction #interaction-content .message-row .mail-content .info .avatar{margin-right:16px}#interaction-app .content-card .interaction #interaction-content .message-row .mail-content .info .name{margin-right:8px;font-weight:500}#interaction-app .content-card .interaction #interaction-content .message-row .mail-content .info .toggle-details{padding-top:16px;cursor:pointer;font-weight:500}#interaction-app .content-card .interaction #interaction-content .message-row .mail-content .info .details{padding-top:8px}#interaction-app .content-card .interaction #interaction-content .message-row .mail-content .info .details .title{font-weight:500;margin-right:6px}#interaction-app .content-card .interaction #interaction-content .message-row .mail-content .info .details .detail{color:rgba(0,0,0,.54)}#interaction-app .content-card .interaction #interaction-content .message-row .bubble{position:relative;padding:6px 7px 8px 9px;background-color:#fff;border:1px solid #dcdfe1;border-radius:6px;word-break:break-word}#interaction-app .content-card .interaction #interaction-content .message-row .bubble:after,#interaction-app .content-card .interaction #interaction-content .message-row .bubble:before{content:' ';position:absolute;width:0;height:0}#interaction-app .content-card .interaction #interaction-content .message-row .bubble:after{left:-7px;right:auto;top:0;bottom:auto;border:11px solid;border-color:#fff transparent transparent transparent}#interaction-app .content-card .interaction #interaction-content .message-row .bubble:before{left:-9px;right:auto;top:-1px;bottom:auto;border:8px solid;border-color:#dcdfe1 transparent transparent transparent}#interaction-app .content-card .interaction #interaction-content .message-row .bubble .time{font-size:11px;margin-top:0;text-align:right}#interaction-app .content-card .interaction #interaction-content .message-row .bubble .message{white-space:pre-wrap}#interaction-app .content-card .interaction #interaction-content .message-row .bubble .message span{word-break:break-all}#interaction-app .content-card .interaction #interaction-content .message-row.in{padding:5px}#interaction-app .content-card .interaction #interaction-content .message-row.in .avatar{margin:0 16px 0 0}#interaction-app .content-card .interaction #interaction-content .message-row.in-right-aligned{padding:5px;align-items:flex-end}#interaction-app .content-card .interaction #interaction-content .message-row.in-right-aligned .avatar{order:2;margin:0 0 0 16px}#interaction-app .content-card .interaction #interaction-content .message-row.in-right-aligned .bubble{margin-left:auto;order:1}#interaction-app .content-card .interaction #interaction-content .message-row.in-right-aligned .bubble:after{right:-9px;left:auto;top:auto;bottom:0;border-color:transparent transparent #e8f5e9 transparent}#interaction-app .content-card .interaction #interaction-content .message-row.in-right-aligned .bubble:before{right:-11px;left:auto;-moz-transform:scaleX(-1);-o-transform:scaleX(-1);-webkit-transform:scaleX(-1);transform:scaleX(-1)}#interaction-app .content-card .interaction #interaction-content .message-row.out{padding:5px;align-items:flex-end}#interaction-app .content-card .interaction #interaction-content .message-row.out .avatar{order:2;margin:0 0 0 16px}#interaction-app .content-card .interaction #interaction-content .message-row.out .bubble{margin-left:auto;background-color:#e8f5e9;border:1px solid #dfebe0;order:1}#interaction-app .content-card .interaction #interaction-content .message-row.out .bubble:after{right:-7px;left:auto;top:auto;bottom:0;border-color:transparent transparent #e8f5e9 transparent}#interaction-app .content-card .interaction #interaction-content .message-row.out .bubble:before{right:-9px;left:auto;top:auto;bottom:-1px;border-color:transparent transparent #dfebe0 transparent}#interaction-app .content-card .interaction #interaction-content .message-row.out-left-aligned{padding:5px}#interaction-app .content-card .interaction #interaction-content .message-row.out-left-aligned .avatar{order:1;margin:0 16px 0 0}#interaction-app .content-card .interaction #interaction-content .message-row.out-left-aligned .bubble{background-color:#e8f5e9;border:1px solid #dfebe0;order:2}#interaction-app .content-card .interaction #interaction-content .message-row.out-left-aligned .bubble:after{right:-7px;left:auto;top:auto;bottom:0;border-color:transparent transparent #e8f5e9 transparent}#interaction-app .content-card .interaction #interaction-content .message-row.out-left-aligned .bubble:before{right:-9px;left:auto;top:auto;bottom:-1px;border-color:transparent transparent #dfebe0 transparent}#interaction-app .content-card .interaction .interaction-footer{min-height:64px;max-height:180px;background-color:#f3f4f5;color:rgba(0,0,0,.87);border-top:1px solid rgba(0,0,0,.08);padding:8px 8px 8px 16px}#interaction-app .content-card .interaction .interaction-footer .reply-form md-input-container{margin:0;padding-right:16px}#interaction-app .content-card .interaction .interaction-footer .reply-form md-input-container textarea{overflow:auto;max-height:80px;transition:height .2s ease}#interaction-app .content-card .interaction .interaction-footer .reply-form md-input-container textarea.grow{height:80px}#interaction-app .content-card .interaction .interaction-footer .reply-form md-input-container .md-errors-spacer{display:none}#interaction-app .content-card .interaction .interaction-footer .reply-form .md-button{margin:0}#interaction-app .content-card .info md-list-item{min-height:40px;height:52px}#interaction-app .content-card .start-point{background:linear-gradient(to bottom,rgba(255,255,255,.8) 0,rgba(255,255,255,.6) 20%,rgba(255,255,255,.8))}#interaction-app .content-card .start-point .big-circle{background:linear-gradient(to bottom,rgba(255,255,255,.8) 0,rgba(255,255,255,.6) 20%,rgba(255,255,255,.8));border-radius:50%;width:300px;height:300px;line-height:300px;text-align:center}#interaction-app .content-card .start-point .app-title{font-weight:500;font-size:32px;margin:12px 0}#interaction-app .content-card .start-point .secondary-text{font-size:16px}#interaction-app .content-card .sidenav md-toolbar{border-bottom:1px solid rgba(0,0,0,.08)}#interaction-app .content-card .sidenav md-toolbar .md-toolbar-tools-bottom .search{height:36px;line-height:36px;padding:8px;background:#fff;font-size:13px}#interaction-app .content-card .sidenav md-toolbar .md-toolbar-tools-bottom .search .icon{margin:0;color:rgba(0,0,0,.54)}#interaction-app .content-card .sidenav md-toolbar .md-toolbar-tools-bottom .search input{padding-left:12px;height:36px;color:rgba(0,0,0,.54)}#interaction-app .content-card .sidenav md-list.contact-list,#interaction-app .content-card .sidenav md-list.interaction-list{position:relative;transition:all .2s ease-out}#interaction-app .content-card .sidenav md-list.contact-list .subheader,#interaction-app .content-card .sidenav md-list.contact-list md-list-item,#interaction-app .content-card .sidenav md-list.interaction-list .subheader,#interaction-app .content-card .sidenav md-list.interaction-list md-list-item{position:absolute;right:0;left:0;width:100%;transition:transform .2s ease-out;background:#fff;will-change:transform}#interaction-app .content-card .sidenav md-list.contact-list .subheader.ng-leave,#interaction-app .content-card .sidenav md-list.contact-list md-list-item.ng-leave,#interaction-app .content-card .sidenav md-list.interaction-list .subheader.ng-leave,#interaction-app .content-card .sidenav md-list.interaction-list md-list-item.ng-leave{transform:translateY(0);display:none}#interaction-app .content-card .sidenav md-list.contact-list .subheader.ng-leave.ng-leave-active,#interaction-app .content-card .sidenav md-list.contact-list md-list-item.ng-leave.ng-leave-active,#interaction-app .content-card .sidenav md-list.interaction-list .subheader.ng-leave.ng-leave-active,#interaction-app .content-card .sidenav md-list.interaction-list md-list-item.ng-leave.ng-leave-active{transform:translateY(-100%)}#interaction-app .content-card .sidenav md-list.contact-list .subheader.ng-hide,#interaction-app .content-card .sidenav md-list.contact-list md-list-item.ng-hide,#interaction-app .content-card .sidenav md-list.interaction-list .subheader.ng-hide,#interaction-app .content-card .sidenav md-list.interaction-list md-list-item.ng-hide{display:none}#interaction-app .content-card .sidenav md-list.contact-list .subheader.ng-hide-add-active,#interaction-app .content-card .sidenav md-list.contact-list .subheader.ng-hide-remove-active,#interaction-app .content-card .sidenav md-list.contact-list md-list-item.ng-hide-add-active,#interaction-app .content-card .sidenav md-list.contact-list md-list-item.ng-hide-remove-active,#interaction-app .content-card .sidenav md-list.interaction-list .subheader.ng-hide-add-active,#interaction-app .content-card .sidenav md-list.interaction-list .subheader.ng-hide-remove-active,#interaction-app .content-card .sidenav md-list.interaction-list md-list-item.ng-hide-add-active,#interaction-app .content-card .sidenav md-list.interaction-list md-list-item.ng-hide-remove-active{display:block;transition-property:all}#interaction-app .content-card .sidenav md-list.contact-list .subheader,#interaction-app .content-card .sidenav md-list.interaction-list .subheader{padding-left:16px;font-size:20px;font-weight:300;height:88px;line-height:88px}#interaction-app .content-card .sidenav .no-results-message{position:absolute;width:100%;height:88px;padding:16px;background:#fff;font-size:15px;font-weight:400}#interaction-app .avatar-wrapper{position:relative}#interaction-app .avatar-wrapper .avatar{margin-top:0;margin-bottom:0}#interaction-app .status{position:absolute;top:28px;left:28px;border-radius:50%}#interaction-app .status.online{color:#4caf50}#interaction-app .status.online:before{content:'\e709'}#interaction-app .status.do-not-disturb{color:#f44336}#interaction-app .status.do-not-disturb:before{content:'\e912'}#interaction-app .status.away{background-color:#ffc107;color:#fff}#interaction-app .status.away:before{content:'\e727'}#interaction-app .status.offline{color:#4caf50;background-color:#fff}#interaction-app .status.offline:before{content:'\e704'}#interaction-app .editable-wrap{position:relative}#interaction-app .editable-wrap .editable-controls{display:flex;flex-direction:row;align-items:center;width:100%}#interaction-app .editable-wrap .editable-controls .editable-input{width:inherit;background-color:#fff;padding:8px;border:1px solid rgba(0,0,0,.12)}#interaction-app .editable-wrap .editable-controls .editable-buttons{display:inherit}#interaction-app .editable-wrap .editable-controls .editable-buttons .md-button{margin:0}#interaction-app .editable-wrap .editable-controls .editable-buttons .md-button:first-of-type{padding-right:0}#interaction-app .editable-wrap .editable-controls .editable-buttons .md-button .icon-cancel{color:rgba(0,0,0,.32)}#interaction-app .editable-click{cursor:pointer;text-decoration:none;color:inherit;border-bottom:none}#interaction-app .emoji-picker-icon{right:5px;cursor:pointer}#interaction-app .input-show-hide{transition:all linear .5s}#interaction-app .input-show-hide.ng-hide{opacity:0}#interaction-app div.interaction-reply-button-container{display:inline;padding-bottom:14px}#timeline{position:relative;height:auto;padding-bottom:30px}#timeline:before{display:block;position:absolute;z-index:10;content:'';width:2px;background:rgba(0,0,0,.08);top:0;left:50%;bottom:0;margin-left:-1px}#timeline .ms-timeline-item{overflow:hidden;position:relative;z-index:20;width:100%;margin:0 auto;max-width:1200px}#timeline .ms-timeline-item .timeline-card{order:1}#timeline .ms-timeline-item .timeline-card .interaction .header .avatar .image{display:block;width:40px;height:40px;border-radius:20px}#timeline .ms-timeline-item .timeline-card .interaction .media .image{width:100%}#timeline .ms-timeline-item .timeline-point{position:absolute;width:40px;height:40px;line-height:40px;text-align:center;border-radius:50%;left:50%;margin:16px 0 0 -28px;order:2}#timeline .ms-timeline-item .timeline-point md-icon{color:#fff}#timeline .ms-timeline-item .timeline-detail{flex:50% 0 0;padding-top:28px;order:3}#timeline .ms-timeline-item .timeline-detail .time{font-size:15px;padding-left:68px}#timeline .ms-timeline-item .timeline-detail .event{color:rgba(0,0,0,.54);padding-left:68px}#timeline .ms-timeline-item:nth-child(odd) .timeline-card{flex-direction:row-reverse}#timeline .ms-timeline-item:nth-child(even) .timeline-card{order:3;padding-right:0}#timeline .ms-timeline-item:nth-child(even) .timeline-card ms-card{padding-left:84px}#timeline .ms-timeline-item:nth-child(even) .timeline-detail{order:1;padding-left:0;text-align:right}#timeline .ms-timeline-item:nth-child(even) .timeline-detail .event,#timeline .ms-timeline-item:nth-child(even) .timeline-detail .time{padding-right:68px}#timeline .ms-timeline-item:first-child{padding-top:15px}#timeline .ms-timeline-item.animate .timeline-card{animation:slide-in-left .4s}#timeline .ms-timeline-item.animate .timeline-point{animation:slide-in-bottom .4s}#timeline .ms-timeline-item.animate .timeline-detail{animation:slide-in-right .4s}#timeline .ms-timeline-item:nth-child(even).animate .timeline-card{animation:slide-in-right .4s}#timeline .ms-timeline-item:nth-child(even).animate .timeline-detail{animation:slide-in-left .4s}#timeline.timeline-left .ms-timeline-item .timeline-card{order:1}#timeline.timeline-left .ms-timeline-item .timeline-card ms-card{padding-right:68px;padding-left:0;margin-left:auto}#timeline.timeline-left .ms-timeline-item .timeline-detail{order:3;text-align:left}#timeline.timeline-left .ms-timeline-item.animate .timeline-card{animation:slide-in-left .4s}#timeline.timeline-left .ms-timeline-item.animate .timeline-detail{animation:slide-in-right .4s}#timeline.timeline-right .ms-timeline-item .timeline-card{order:3}#timeline.timeline-right .ms-timeline-item .timeline-card ms-card{padding-left:68px;padding-right:0;margin-right:auto}#timeline.timeline-right .ms-timeline-item .timeline-detail{order:1;text-align:right}#timeline.timeline-right .ms-timeline-item .timeline-detail .event,#timeline.timeline-right .ms-timeline-item .timeline-detail .time{padding-right:68px;padding-left:0}#timeline.timeline-right .ms-timeline-item.animate .timeline-card{animation:slide-in-right .4s}#timeline.timeline-right .ms-timeline-item.animate .timeline-detail{animation:slide-in-left .4s}@media screen and (max-width:1280px){#timeline .ms-timeline-item,#timeline.timeline-left .ms-timeline-item,#timeline.timeline-right .ms-timeline-item{display:block}#timeline .ms-timeline-item .timeline-point,#timeline.timeline-left .ms-timeline-item .timeline-point,#timeline.timeline-right .ms-timeline-item .timeline-point{position:relative;left:auto;margin:0 auto 16px auto;padding:0}#timeline .ms-timeline-item .timeline-detail,#timeline.timeline-left .ms-timeline-item .timeline-detail,#timeline.timeline-right .ms-timeline-item .timeline-detail{padding:2px;margin-bottom:16px}#timeline .ms-timeline-item .timeline-detail .event,#timeline .ms-timeline-item .timeline-detail .time,#timeline.timeline-left .ms-timeline-item .timeline-detail .event,#timeline.timeline-left .ms-timeline-item .timeline-detail .time,#timeline.timeline-right .ms-timeline-item .timeline-detail .event,#timeline.timeline-right .ms-timeline-item .timeline-detail .time{padding-right:0;padding-left:0;text-align:center}#timeline .ms-timeline-item .timeline-card ms-card,#timeline.timeline-left .ms-timeline-item .timeline-card ms-card,#timeline.timeline-right .ms-timeline-item .timeline-card ms-card{margin:0 auto;padding:0}#timeline .ms-timeline-item:nth-child(even) .timeline-point,#timeline.timeline-left .ms-timeline-item:nth-child(even) .timeline-point,#timeline.timeline-right .ms-timeline-item:nth-child(even) .timeline-point{position:relative;left:auto;margin:0 auto 16px auto;padding:0}#timeline .ms-timeline-item:nth-child(even) .timeline-detail,#timeline.timeline-left .ms-timeline-item:nth-child(even) .timeline-detail,#timeline.timeline-right .ms-timeline-item:nth-child(even) .timeline-detail{padding:2px;margin-bottom:16px}#timeline .ms-timeline-item:nth-child(even) .timeline-detail .event,#timeline .ms-timeline-item:nth-child(even) .timeline-detail .time,#timeline.timeline-left .ms-timeline-item:nth-child(even) .timeline-detail .event,#timeline.timeline-left .ms-timeline-item:nth-child(even) .timeline-detail .time,#timeline.timeline-right .ms-timeline-item:nth-child(even) .timeline-detail .event,#timeline.timeline-right .ms-timeline-item:nth-child(even) .timeline-detail .time{padding-right:0;padding-left:0;text-align:center}#timeline .ms-timeline-item:nth-child(even) .timeline-card ms-card,#timeline.timeline-left .ms-timeline-item:nth-child(even) .timeline-card ms-card,#timeline.timeline-right .ms-timeline-item:nth-child(even) .timeline-card ms-card{margin:0 auto;padding:0}}md-dialog.compose-dialog{max-width:720px;width:720px}md-dialog.compose-dialog.mail-no-secret{max-height:97%;max-width:90%!important;width:100%!important}md-dialog.compose-dialog md-dialog-content{display:block;position:relative}md-dialog.compose-dialog md-toolbar .title{font-size:17px}md-dialog.compose-dialog md-toolbar .vertical-divider{position:absolute;border-right-width:.5px;border-right-style:solid;height:100%}md-dialog.compose-dialog md-chips md-chip{font-size:12px}md-dialog.compose-dialog md-chips .md-chip-input-container{width:100%}md-dialog.compose-dialog .to{position:relative}md-dialog.compose-dialog .to.hidden-cc input{padding-right:32px}md-dialog.compose-dialog .to.hidden-cc.hidden-bcc input{padding-right:56px}md-dialog.compose-dialog .to.hidden-bcc input{padding-right:32px}md-dialog.compose-dialog .to .cc-bcc{position:absolute;bottom:8px;right:0}md-dialog.compose-dialog .to .cc-bcc .show-bcc,md-dialog.compose-dialog .to .cc-bcc .show-cc{cursor:pointer;font-size:12px}md-dialog.compose-dialog .to .cc-bcc .show-bcc{margin-left:8px}md-dialog.compose-dialog .attachment-list{font-size:13px}md-dialog.compose-dialog .attachment-list .attachment{background-color:rgba(0,0,0,.08);border:1px solid rgba(0,0,0,.16);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.compose-dialog .attachment-list .attachment .filename{font-weight:500}md-dialog.compose-dialog .attachment-list .attachment .md-button{margin:0}md-dialog.compose-dialog .attachment-list .attachment:last-child{margin-bottom:0}md-dialog.compose-dialog .error-list{font-size:13px}md-dialog.compose-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.compose-dialog .error-list .error .message{font-weight:500}md-dialog.compose-dialog .error-list .error .md-button{margin:0}md-dialog.compose-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.compose-dialog .emojionearea{max-width:700px;min-height:300px}md-dialog.compose-dialog md-dialog-actions{position:relative;justify-content:space-between;border-top:1px solid rgba(0,0,0,.12);background-color:rgba(0,0,0,.03)}@media screen and (max-width:960px){md-dialog.compose-dialog{width:80%}}@media screen and (max-width:600px){md-dialog.compose-dialog{width:90%}}md-dialog.disposition-dialog{max-width:720px;width:720px}md-dialog.disposition-dialog md-dialog-content{display:block;position:relative}md-dialog.disposition-dialog md-toolbar .title{font-size:17px}md-dialog.disposition-dialog md-input-container textarea{min-height:150px}md-dialog.disposition-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.disposition-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.disposition-dialog .date-container{padding:16px 0 24px 0}md-dialog.disposition-dialog .error-list{font-size:13px}md-dialog.disposition-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.disposition-dialog .error-list .error .message{font-weight:500}md-dialog.disposition-dialog .error-list .error .md-button{margin:0}md-dialog.disposition-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.disposition-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.disposition-dialog{max-width:720px;width:720px}md-dialog.disposition-dialog md-dialog-content{display:block;position:relative}md-dialog.disposition-dialog md-toolbar .title{font-size:17px}md-dialog.disposition-dialog md-input-container textarea{min-height:150px}md-dialog.disposition-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.disposition-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.disposition-dialog .date-container{padding:16px 0 24px 0}md-dialog.disposition-dialog .error-list{font-size:13px}md-dialog.disposition-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.disposition-dialog .error-list .error .message{font-weight:500}md-dialog.disposition-dialog .error-list .error .md-button{margin:0}md-dialog.disposition-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.disposition-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.disposition-dialog{max-width:720px;width:720px}md-dialog.disposition-dialog md-dialog-content{display:block;position:relative}md-dialog.disposition-dialog md-toolbar .title{font-size:17px}md-dialog.disposition-dialog md-input-container textarea{min-height:150px}md-dialog.disposition-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.disposition-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.disposition-dialog .date-container{padding:16px 0 24px 0}md-dialog.disposition-dialog .error-list{font-size:13px}md-dialog.disposition-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.disposition-dialog .error-list .error .message{font-weight:500}md-dialog.disposition-dialog .error-list .error .md-button{margin:0}md-dialog.disposition-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.disposition-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}#dashboard-general>.center>.header{height:160px;min-height:160px;max-height:160px;padding-bottom:0}#dashboard-general>.center>.header .selected-general{background:rgba(0,0,0,.12);color:#fff;padding:8px 16px;height:40px;line-height:24px;font-size:16px}#dashboard-general>.center>.header .general-selector{margin-left:1px;border-radius:0;background:rgba(0,0,0,.12)}#dashboard-general>.center>.header .general-selector md-icon{color:#fff}#dashboard-general>.center>.content{background:0 0;padding:0}#dashboard-general>.center>.content>md-tabs>md-tabs-wrapper{background:#fff;box-shadow:0 1px 3px 0 rgba(0,0,0,.2),0 1px 1px 0 rgba(0,0,0,.14),0 2px 1px -1px rgba(0,0,0,.12);padding:0 24px}#dashboard-general>.center>.content>md-tabs>md-tabs-wrapper md-tabs-canvas{height:56px}#dashboard-general>.center>.content>md-tabs>md-tabs-wrapper md-tabs-canvas md-pagination-wrapper{height:56px}#dashboard-general>.center>.content>md-tabs>md-tabs-wrapper md-tabs-canvas .md-tab{padding:16px 24px;text-transform:none}#dashboard-general>.center>.content>md-tabs:not(.md-dynamic-height) md-tabs-content-wrapper{top:56px}#dashboard-general>.center>.content>md-tabs>md-tabs-content-wrapper md-tab-content{padding:12px}#dashboard-general>.sidenav{width:330px;min-width:330px;max-width:330px;padding:0;z-index:51;box-shadow:0 5px 5px -3px rgba(0,0,0,.2),0 8px 10px 1px rgba(0,0,0,.14),0 3px 14px 2px rgba(0,0,0,.12)}#dashboard-general>.sidenav.md-locked-open{width:250px;min-width:250px;max-width:250px;z-index:2;box-shadow:none;background:#eee}#dashboard-general .dashboard-container{padding:24px;margin-bottom:24px}#dashboard-general .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.faxAccount-dialog{max-width:720px;width:720px}md-dialog.faxAccount-dialog md-dialog-content{display:block;position:relative}md-dialog.faxAccount-dialog md-toolbar .title{font-size:17px}md-dialog.faxAccount-dialog md-input-container textarea{min-height:150px}md-dialog.faxAccount-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.faxAccount-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.faxAccount-dialog .date-container{padding:16px 0 24px 0}md-dialog.faxAccount-dialog .error-list{font-size:13px}md-dialog.faxAccount-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.faxAccount-dialog .error-list .error .message{font-weight:500}md-dialog.faxAccount-dialog .error-list .error .md-button{margin:0}md-dialog.faxAccount-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.faxAccount-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.faxAccount-dialog{max-width:720px;width:720px}md-dialog.faxAccount-dialog md-dialog-content{display:block;position:relative}md-dialog.faxAccount-dialog md-toolbar .title{font-size:17px}md-dialog.faxAccount-dialog md-input-container textarea{min-height:150px}md-dialog.faxAccount-dialog .date-container{padding:16px 0 24px 0}md-dialog.faxAccount-dialog .error-list{font-size:13px}md-dialog.faxAccount-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.faxAccount-dialog .error-list .error .message{font-weight:500}md-dialog.faxAccount-dialog .error-list .error .md-button{margin:0}md-dialog.faxAccount-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.faxAccount-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.faxAccount-dialog{max-width:720px;width:720px}md-dialog.faxAccount-dialog md-dialog-content{display:block;position:relative}md-dialog.faxAccount-dialog md-toolbar .title{font-size:17px}md-dialog.faxAccount-dialog md-input-container textarea{min-height:150px}md-dialog.faxAccount-dialog .date-container{padding:16px 0 24px 0}md-dialog.faxAccount-dialog .error-list{font-size:13px}md-dialog.faxAccount-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.faxAccount-dialog .error-list .error .message{font-weight:500}md-dialog.faxAccount-dialog .error-list .error .md-button{margin:0}md-dialog.faxAccount-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.faxAccount-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.faxAccount-dialog{max-width:720px;width:720px}md-dialog.faxAccount-dialog md-dialog-content{display:block;position:relative}md-dialog.faxAccount-dialog md-toolbar .title{font-size:17px}md-dialog.faxAccount-dialog md-input-container textarea{min-height:150px}md-dialog.faxAccount-dialog .date-container{padding:16px 0 24px 0}md-dialog.faxAccount-dialog .error-list{font-size:13px}md-dialog.faxAccount-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.faxAccount-dialog .error-list .error .message{font-weight:500}md-dialog.faxAccount-dialog .error-list .error .md-button{margin:0}md-dialog.faxAccount-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.faxAccount-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.faxAccount-dialog{max-width:720px;width:720px}md-dialog.faxAccount-dialog md-dialog-content{display:block;position:relative}md-dialog.faxAccount-dialog md-toolbar .title{font-size:17px}md-dialog.faxAccount-dialog md-input-container textarea{min-height:150px}md-dialog.faxAccount-dialog .date-container{padding:16px 0 24px 0}md-dialog.faxAccount-dialog .error-list{font-size:13px}md-dialog.faxAccount-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.faxAccount-dialog .error-list .error .message{font-weight:500}md-dialog.faxAccount-dialog .error-list .error .md-button{margin:0}md-dialog.faxAccount-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.faxAccount-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.faxAccount-dialog{max-width:720px;width:720px}md-dialog.faxAccount-dialog md-dialog-content{display:block;position:relative}md-dialog.faxAccount-dialog md-toolbar .title{font-size:17px}md-dialog.faxAccount-dialog md-input-container textarea{min-height:150px}md-dialog.faxAccount-dialog .date-container{padding:16px 0 24px 0}md-dialog.faxAccount-dialog .error-list{font-size:13px}md-dialog.faxAccount-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.faxAccount-dialog .error-list .error .message{font-weight:500}md-dialog.faxAccount-dialog .error-list .error .md-button{margin:0}md-dialog.faxAccount-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.faxAccount-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.faxAccount-dialog{max-width:720px;width:720px}md-dialog.faxAccount-dialog md-dialog-content{display:block;position:relative}md-dialog.faxAccount-dialog md-toolbar .title{font-size:17px}md-dialog.faxAccount-dialog md-input-container textarea{min-height:150px}md-dialog.faxAccount-dialog .date-container{padding:16px 0 24px 0}md-dialog.faxAccount-dialog .error-list{font-size:13px}md-dialog.faxAccount-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.faxAccount-dialog .error-list .error .message{font-weight:500}md-dialog.faxAccount-dialog .error-list .error .md-button{margin:0}md-dialog.faxAccount-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.faxAccount-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.faxAccount-dialog{max-width:720px;width:720px}md-dialog.faxAccount-dialog md-dialog-content{display:block;position:relative}md-dialog.faxAccount-dialog md-toolbar .title{font-size:17px}md-dialog.faxAccount-dialog md-input-container textarea{min-height:150px}md-dialog.faxAccount-dialog .date-container{padding:16px 0 24px 0}md-dialog.faxAccount-dialog .error-list{font-size:13px}md-dialog.faxAccount-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.faxAccount-dialog .error-list .error .message{font-weight:500}md-dialog.faxAccount-dialog .error-list .error .md-button{margin:0}md-dialog.faxAccount-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.faxAccount-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.faxAccount-dialog{max-width:720px;width:720px}md-dialog.faxAccount-dialog md-dialog-content{display:block;position:relative}md-dialog.faxAccount-dialog md-toolbar .title{font-size:17px}md-dialog.faxAccount-dialog md-input-container textarea{min-height:150px}md-dialog.faxAccount-dialog .date-container{padding:16px 0 24px 0}md-dialog.faxAccount-dialog .error-list{font-size:13px}md-dialog.faxAccount-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.faxAccount-dialog .error-list .error .message{font-weight:500}md-dialog.faxAccount-dialog .error-list .error .md-button{margin:0}md-dialog.faxAccount-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.faxAccount-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.faxAccount-dialog{max-width:720px;width:720px}md-dialog.faxAccount-dialog md-dialog-content{display:block;position:relative}md-dialog.faxAccount-dialog md-toolbar .title{font-size:17px}md-dialog.faxAccount-dialog md-input-container textarea{min-height:150px}md-dialog.faxAccount-dialog .date-container{padding:16px 0 24px 0}md-dialog.faxAccount-dialog .error-list{font-size:13px}md-dialog.faxAccount-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.faxAccount-dialog .error-list .error .message{font-weight:500}md-dialog.faxAccount-dialog .error-list .error .md-button{margin:0}md-dialog.faxAccount-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.faxAccount-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}#fax-faxAccount .header{height:76px;min-height:76px;max-height:76px}#fax-faxAccount .header .goto-faxAccounts-button{margin-right:16px}#fax-faxAccount .header .faxAccount-image{overflow:hidden;width:56px;height:56px;margin-right:16px;border:3px solid rgba(0,0,0,.12)}#fax-faxAccount .header .faxAccount-image img{height:100%;width:auto;max-width:none}#fax-faxAccount .header .subtitle{margin:6px 0 0 0}#fax-faxAccount .faxAccount-detail-form-container{padding:24px;margin-bottom:24px}#fax-faxAccount .faxAccount-detail-form-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}#fax-faxAccount .faxAccount-detail-form-container .handle{cursor:move}#fax-faxAccount .faxAccount-detail-form-container md-input-container md-switch{margin:0!important}#fax-faxAccount .faxAccount-detail-form-container #faxAccount-image-uploader{position:relative}#fax-faxAccount .faxAccount-detail-form-container #faxAccount-image-uploader.dropping .drop-text{display:flex}#fax-faxAccount .faxAccount-detail-form-container #faxAccount-image-uploader .drop-text{display:none;position:absolute;top:0;right:0;bottom:0;left:0;padding:16px;text-align:center;border:2px dashed rgba(0,0,0,.12);background:#fff;font-size:20px;z-index:100}#fax-faxAccount .faxAccount-detail-form-container #faxAccount-image-uploader .upload-button{margin-bottom:16px}#fax-faxAccount .faxAccount-detail-form-container #faxAccount-image-uploader .faxAccount-image{position:relative;width:200px;height:200px;border:1px solid rgba(0,0,0,.12);margin:8px}#fax-faxAccount .faxAccount-detail-form-container #faxAccount-image-uploader .faxAccount-image.uploading .overlay{position:absolute;top:0;right:0;bottom:0;left:0;background:rgba(0,0,0,.87)}#fax-faxAccount .faxAccount-detail-form-container #faxAccount-image-uploader .faxAccount-image .media{max-height:100%}#fax-faxAccount md-table-container thead tr th:not(:first-child):not(.no-padding){padding:0 20px 0 0!important}#fax-faxAccount md-table-container thead th.md-checkbox-column:not(.no-padding){padding:0 24px!important}#fax-faxAccount md-table-container tbody tr td:not(:first-child):not(.no-padding):not(.actions-padding){padding:0 20px 0 0!important}#fax-faxAccount md-table-container.font-size-12 td.md-cell{font-size:12px!important}@media screen and (min-width:1921px){#fax-faxAccount .actionAppData{width:800px!important}}@media screen and (max-width:1920px){#fax-faxAccount .actionAppData{width:700px!important}}@media screen and (min-width:1751px) and (max-width:1919px){#fax-faxAccount .actionAppData{width:600px!important}}@media screen and (min-width:1601px) and (max-width:1750px){#fax-faxAccount .actionAppData{width:500px!important}}@media screen and (min-width:1537px) and (max-width:1600px){#fax-faxAccount .actionAppData{width:450px!important}}@media screen and (min-width:1281px) and (max-width:1536px){#fax-faxAccount .actionAppData{width:300px!important}}@media screen and (max-width:1280px){#fax-faxAccount .actionAppData{width:150px!important}}@media screen and (max-width:960px){#fax-faxAccount .actionAppData{width:80px!important}}#faxAccounts{position:relative}#faxAccounts>.header{height:76px;min-height:76px;max-height:76px}#faxAccounts>.header .logo .logo-icon{margin:0 16px 0 0}#faxAccounts>.header .logo .logo-text{font-size:24px}#faxAccounts>.header md-icon{color:#fff}#faxAccounts>.header .search-input-wrapper{position:relative}#faxAccounts>.header .search-input-wrapper label{padding-right:4px;cursor:pointer}#faxAccounts>.header .search-input-wrapper label md-icon{color:rgba(255,255,255,.8)}#faxAccounts>.header .search-input-wrapper md-input-container .md-errors-spacer{display:none}#faxAccounts>.header .search-input-wrapper md-input-container input{border-bottom:1px solid rgba(255,255,255,.8);color:rgba(255,255,255,.8);width:240px}#faxAccounts>.header .search-input-wrapper md-input-container input::placeholder{color:rgba(255,255,255,.8)}#faxAccounts>.header .search-input-wrapper md-input-container input:focus{border-bottom:1px solid #fff;color:#fff}#faxAccounts>.header.selected-bar{position:absolute;top:0;left:0;right:0;z-index:999;background-image:none;opacity:1!important}#faxAccounts>.header.selected-bar .close-button-wrapper{width:244px}#faxAccounts>.content{position:absolute;top:76px;bottom:0;right:0;left:0}#faxAccounts>.content .main{padding:16px 90px 0 4px;position:absolute;top:0;left:24px;right:0;bottom:0}#faxAccounts>.content .main .no-results{box-shadow:0 1px 1px 0 rgba(0,0,0,.14)}#faxAccounts #add-faxAccount-button{position:fixed;bottom:8px;right:8px;padding:0}#faxAccounts #upload-faxAccount-button{position:fixed;bottom:8px;right:8px;padding:0}md-dialog.faxQueue-dialog{max-width:720px;width:720px}md-dialog.faxQueue-dialog md-dialog-content{display:block;position:relative}md-dialog.faxQueue-dialog md-toolbar .title{font-size:17px}md-dialog.faxQueue-dialog md-input-container textarea{min-height:150px}md-dialog.faxQueue-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.faxQueue-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.faxQueue-dialog .date-container{padding:16px 0 24px 0}md-dialog.faxQueue-dialog .error-list{font-size:13px}md-dialog.faxQueue-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.faxQueue-dialog .error-list .error .message{font-weight:500}md-dialog.faxQueue-dialog .error-list .error .md-button{margin:0}md-dialog.faxQueue-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.faxQueue-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}#fax-faxQueue .header{height:76px;min-height:76px;max-height:76px}#fax-faxQueue .header .goto-faxQueues-button{margin-right:16px}#fax-faxQueue .header .faxQueue-image{overflow:hidden;width:56px;height:56px;margin-right:16px;border:3px solid rgba(0,0,0,.12)}#fax-faxQueue .header .faxQueue-image img{height:100%;width:auto;max-width:none}#fax-faxQueue .header .subtitle{margin:6px 0 0 0}#fax-faxQueue .faxQueue-detail-form-container{padding:24px;margin-bottom:24px}#fax-faxQueue .faxQueue-detail-form-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}#fax-faxQueue .faxQueue-detail-form-container .handle{cursor:move}#fax-faxQueue .faxQueue-detail-form-container md-input-container md-switch{margin:0!important}#fax-faxQueue .faxQueue-detail-form-container #faxQueue-image-uploader{position:relative}#fax-faxQueue .faxQueue-detail-form-container #faxQueue-image-uploader.dropping .drop-text{display:flex}#fax-faxQueue .faxQueue-detail-form-container #faxQueue-image-uploader .drop-text{display:none;position:absolute;top:0;right:0;bottom:0;left:0;padding:16px;text-align:center;border:2px dashed rgba(0,0,0,.12);background:#fff;font-size:20px;z-index:100}#fax-faxQueue .faxQueue-detail-form-container #faxQueue-image-uploader .upload-button{margin-bottom:16px}#fax-faxQueue .faxQueue-detail-form-container #faxQueue-image-uploader .faxQueue-image{position:relative;width:200px;height:200px;border:1px solid rgba(0,0,0,.12);margin:8px}#fax-faxQueue .faxQueue-detail-form-container #faxQueue-image-uploader .faxQueue-image.uploading .overlay{position:absolute;top:0;right:0;bottom:0;left:0;background:rgba(0,0,0,.87)}#fax-faxQueue .faxQueue-detail-form-container #faxQueue-image-uploader .faxQueue-image .media{max-height:100%}#fax-faxQueue md-table-container thead tr th:not(:first-child):not(.no-padding){padding:0 20px 0 0!important}#fax-faxQueue md-table-container thead th.md-checkbox-column:not(.no-padding){padding:0 24px!important}#fax-faxQueue md-table-container tbody tr td:not(:first-child):not(.no-padding):not(.actions-padding){padding:0 20px 0 0!important}#fax-faxQueue md-table-container.font-size-12 td.md-cell{font-size:12px!important}#faxQueues{position:relative}#faxQueues>.header{height:76px;min-height:76px;max-height:76px}#faxQueues>.header .logo .logo-icon{margin:0 16px 0 0}#faxQueues>.header .logo .logo-text{font-size:24px}#faxQueues>.header md-icon{color:#fff}#faxQueues>.header .search-input-wrapper{position:relative}#faxQueues>.header .search-input-wrapper label{padding-right:4px;cursor:pointer}#faxQueues>.header .search-input-wrapper label md-icon{color:rgba(255,255,255,.8)}#faxQueues>.header .search-input-wrapper md-input-container .md-errors-spacer{display:none}#faxQueues>.header .search-input-wrapper md-input-container input{border-bottom:1px solid rgba(255,255,255,.8);color:rgba(255,255,255,.8);width:240px}#faxQueues>.header .search-input-wrapper md-input-container input::placeholder{color:rgba(255,255,255,.8)}#faxQueues>.header .search-input-wrapper md-input-container input:focus{border-bottom:1px solid #fff;color:#fff}#faxQueues>.header.selected-bar{position:absolute;top:0;left:0;right:0;z-index:999;background-image:none;opacity:1!important}#faxQueues>.header.selected-bar .close-button-wrapper{width:244px}#faxQueues>.content{position:absolute;top:76px;bottom:0;right:0;left:0}#faxQueues>.content .main{padding:16px 90px 0 4px;position:absolute;top:0;left:24px;right:0;bottom:0}#faxQueues>.content .main .no-results{box-shadow:0 1px 1px 0 rgba(0,0,0,.14)}#faxQueues #add-faxQueue-button{position:fixed;bottom:8px;right:8px;padding:0}#faxQueues #upload-faxQueue-button{position:fixed;bottom:8px;right:8px;padding:0}#realtime{height:auto}#realtime>.content .blink{animation:blinker 2s linear infinite}#realtime>.content .avatar-wrapper{position:relative}#realtime>.content .avatar-wrapper .status{position:absolute;bottom:-3px;right:5px}#realtime>.content .search-input-wrapper{position:relative;margin-left:20px}#realtime>.content .search-input-wrapper label{padding:6px;cursor:pointer}#realtime>.content .search-input-wrapper md-input-container{padding-top:20px}#realtime>.content .main .labels{padding:8px 16px}#realtime>.content .main .labels .label{margin:0 0 2px 4px;padding:2px 5px;font-size:11px;white-space:nowrap;border-radius:2px}#realtime>.content .main .status{position:absolute;bottom:-3px;right:5px}#realtime>.content .main .avatar-wrapper{position:relative}#realtime>.content .main .avatar-wrapper .status{position:absolute;bottom:-3px;right:5px}#realtime>.content .custom-column{padding:0 24px!important}@keyframes blinker{50%{opacity:0}}#profile .about-tab{max-width:1200px}#profile .about-tab .about{padding:8px}#profile .about-tab .about .general .location md-icon{line-height:13px!important}#profile .about-tab .about .work .job .company{padding:0 16px 0 0;font-weight:500}#profile .about-tab .about .work .job .date{color:rgba(0,0,0,.54)}#profile .about-tab .about-sidebar{padding:8px 8px 8px 32px}#profile .about-tab .about-sidebar .friends .content .friend{padding:4px}#profile .about-tab .about-sidebar .groups .content .group{margin-bottom:16px}#profile .about-tab .about-sidebar .groups .content .group:last-child{margin-bottom:0}#profile .about-tab .about-sidebar .groups .content .group .logo{border:1px solid rgba(0,0,0,.12);margin-right:16px}#profile .about-tab .about-sidebar .groups .content .group .name{font-weight:500;font-size:15px}#profile .about-tab .about-sidebar .groups .content .group .category,#profile .about-tab .about-sidebar .groups .content .group .members{color:rgba(0,0,0,.54)}#profile .about-tab .about-sidebar .groups .content .group .members{margin-top:16px}@media screen and (max-width:960px){#profile .about-tab .about-sidebar{padding:8px}}#maintenance{height:100%;background:url(/assets/images/backgrounds/tech.png) no-repeat;background-size:cover}#maintenance #maintenance-form-wrapper{flex:1 0 auto;padding:32px}#maintenance #maintenance-form-wrapper #maintenance-form{max-width:384px;padding:32px;background:#fff;text-align:center}#maintenance #maintenance-form-wrapper #maintenance-form .logo{width:128px;height:128px;line-height:128px;font-size:86px;font-weight:500;margin:32px auto;color:#fff;border-radius:2px}#maintenance #maintenance-form-wrapper #maintenance-form .title{font-size:17px;margin-top:16px}#maintenance #maintenance-form-wrapper #maintenance-form .subtitle{margin:16px 0;max-width:300px;color:rgba(0,0,0,.54);font-size:15px}@media screen and (max-width:600px){#maintenance #maintenance-form-wrapper{padding:16px}#maintenance #maintenance-form-wrapper #maintenance-form{padding:24px;width:100%}}md-dialog.deskAccount-dialog{max-width:720px;width:720px}md-dialog.deskAccount-dialog md-dialog-content{display:block;position:relative}md-dialog.deskAccount-dialog md-toolbar .title{font-size:17px}md-dialog.deskAccount-dialog md-input-container textarea{min-height:150px}md-dialog.deskAccount-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.deskAccount-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.deskAccount-dialog .date-container{padding:16px 0 24px 0}md-dialog.deskAccount-dialog .error-list{font-size:13px}md-dialog.deskAccount-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.deskAccount-dialog .error-list .error .message{font-weight:500}md-dialog.deskAccount-dialog .error-list .error .md-button{margin:0}md-dialog.deskAccount-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.deskAccount-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}#deskAccounts{position:relative}#deskAccounts>.header{height:76px;min-height:76px;max-height:76px}#deskAccounts>.header .logo .logo-icon{margin:0 16px 0 0}#deskAccounts>.header .logo .logo-text{font-size:24px}#deskAccounts>.header md-icon{color:#fff}#deskAccounts>.header .search-input-wrapper{position:relative}#deskAccounts>.header .search-input-wrapper label{padding-right:4px;cursor:pointer}#deskAccounts>.header .search-input-wrapper label md-icon{color:rgba(255,255,255,.8)}#deskAccounts>.header .search-input-wrapper md-input-container .md-errors-spacer{display:none}#deskAccounts>.header .search-input-wrapper md-input-container input{border-bottom:1px solid rgba(255,255,255,.8);color:rgba(255,255,255,.8);width:240px}#deskAccounts>.header .search-input-wrapper md-input-container input::placeholder{color:rgba(255,255,255,.8)}#deskAccounts>.header .search-input-wrapper md-input-container input:focus{border-bottom:1px solid #fff;color:#fff}#deskAccounts>.header.selected-bar{position:absolute;top:0;left:0;right:0;z-index:999;background-image:none;opacity:1!important}#deskAccounts>.header.selected-bar .close-button-wrapper{width:244px}#deskAccounts>.content{position:absolute;top:76px;bottom:0;right:0;left:0}#deskAccounts>.content .main{padding:16px 90px 0 4px;position:absolute;top:0;left:24px;right:0;bottom:0}#deskAccounts>.content .main .no-results{box-shadow:0 1px 1px 0 rgba(0,0,0,.14)}#deskAccounts #add-deskAccount-button{position:fixed;bottom:8px;right:8px;padding:0}#deskAccounts #upload-deskAccount-button{position:fixed;bottom:8px;right:8px;padding:0}md-dialog.deskConfiguration-dialog{max-width:720px;width:720px}md-dialog.deskConfiguration-dialog md-dialog-content{display:block;position:relative}md-dialog.deskConfiguration-dialog md-toolbar .title{font-size:17px}md-dialog.deskConfiguration-dialog md-input-container textarea{min-height:150px}md-dialog.deskConfiguration-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.deskConfiguration-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.deskConfiguration-dialog .date-container{padding:16px 0 24px 0}md-dialog.deskConfiguration-dialog .error-list{font-size:13px}md-dialog.deskConfiguration-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.deskConfiguration-dialog .error-list .error .message{font-weight:500}md-dialog.deskConfiguration-dialog .error-list .error .md-button{margin:0}md-dialog.deskConfiguration-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.deskConfiguration-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.deskAccount-item-dialog{max-width:720px;width:720px}md-dialog.deskAccount-item-dialog md-dialog-content{display:block;position:relative}md-dialog.deskAccount-item-dialog md-toolbar .title{font-size:17px}md-dialog.deskAccount-item-dialog md-input-container textarea{min-height:150px}md-dialog.deskAccount-item-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.deskAccount-item-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.deskAccount-item-dialog .date-container{padding:16px 0 24px 0}md-dialog.deskAccount-item-dialog .error-list{font-size:13px}md-dialog.deskAccount-item-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.deskAccount-item-dialog .error-list .error .message{font-weight:500}md-dialog.deskAccount-item-dialog .error-list .error .md-button{margin:0}md-dialog.deskAccount-item-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.deskAccount-item-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}#integrations-deskAccount .header{height:76px;min-height:76px;max-height:76px}#integrations-deskAccount .header .goto-deskAccounts-button{margin-right:16px}#integrations-deskAccount .header .deskAccount-image{overflow:hidden;width:56px;height:56px;margin-right:16px;border:3px solid rgba(0,0,0,.12)}#integrations-deskAccount .header .deskAccount-image img{height:100%;width:auto;max-width:none}#integrations-deskAccount .header .subtitle{margin:6px 0 0 0}#integrations-deskAccount .deskAccount-detail-form-container{padding:24px;margin-bottom:24px}#integrations-deskAccount .deskAccount-detail-form-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}#integrations-deskAccount .deskAccount-detail-form-container .handle{cursor:move}#integrations-deskAccount .deskAccount-detail-form-container md-input-container md-switch{margin:0!important}#integrations-deskAccount .deskAccount-detail-form-container #deskAccount-image-uploader{position:relative}#integrations-deskAccount .deskAccount-detail-form-container #deskAccount-image-uploader.dropping .drop-text{display:flex}#integrations-deskAccount .deskAccount-detail-form-container #deskAccount-image-uploader .drop-text{display:none;position:absolute;top:0;right:0;bottom:0;left:0;padding:16px;text-align:center;border:2px dashed rgba(0,0,0,.12);background:#fff;font-size:20px;z-index:100}#integrations-deskAccount .deskAccount-detail-form-container #deskAccount-image-uploader .upload-button{margin-bottom:16px}#integrations-deskAccount .deskAccount-detail-form-container #deskAccount-image-uploader .deskAccount-image{position:relative;width:200px;height:200px;border:1px solid rgba(0,0,0,.12);margin:8px}#integrations-deskAccount .deskAccount-detail-form-container #deskAccount-image-uploader .deskAccount-image.uploading .overlay{position:absolute;top:0;right:0;bottom:0;left:0;background:rgba(0,0,0,.87)}#integrations-deskAccount .deskAccount-detail-form-container #deskAccount-image-uploader .deskAccount-image .media{max-height:100%}#integrations-deskAccount md-table-container thead tr th:not(:first-child):not(.no-padding){padding:0 20px 0 0!important}#integrations-deskAccount md-table-container thead th.md-checkbox-column:not(.no-padding){padding:0 24px!important}#integrations-deskAccount md-table-container tbody tr td:not(:first-child):not(.no-padding):not(.actions-padding){padding:0 20px 0 0!important}#integrations-deskAccount md-table-container.font-size-12 td.md-cell{font-size:12px!important}md-dialog.dynamics365Account-dialog{max-width:720px;width:720px}md-dialog.dynamics365Account-dialog md-dialog-content{display:block;position:relative}md-dialog.dynamics365Account-dialog md-toolbar .title{font-size:17px}md-dialog.dynamics365Account-dialog md-input-container textarea{min-height:150px}md-dialog.dynamics365Account-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.dynamics365Account-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.dynamics365Account-dialog .date-container{padding:16px 0 24px 0}md-dialog.dynamics365Account-dialog .error-list{font-size:13px}md-dialog.dynamics365Account-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.dynamics365Account-dialog .error-list .error .message{font-weight:500}md-dialog.dynamics365Account-dialog .error-list .error .md-button{margin:0}md-dialog.dynamics365Account-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.dynamics365Account-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}#dynamics365Accounts{position:relative}#dynamics365Accounts>.header{height:76px;min-height:76px;max-height:76px}#dynamics365Accounts>.header .logo .logo-icon{margin:0 16px 0 0}#dynamics365Accounts>.header .logo .logo-text{font-size:24px}#dynamics365Accounts>.header md-icon{color:#fff}#dynamics365Accounts>.header .search-input-wrapper{position:relative}#dynamics365Accounts>.header .search-input-wrapper label{padding-right:4px;cursor:pointer}#dynamics365Accounts>.header .search-input-wrapper label md-icon{color:rgba(255,255,255,.8)}#dynamics365Accounts>.header .search-input-wrapper md-input-container .md-errors-spacer{display:none}#dynamics365Accounts>.header .search-input-wrapper md-input-container input{border-bottom:1px solid rgba(255,255,255,.8);color:rgba(255,255,255,.8);width:240px}#dynamics365Accounts>.header .search-input-wrapper md-input-container input::placeholder{color:rgba(255,255,255,.8)}#dynamics365Accounts>.header .search-input-wrapper md-input-container input:focus{border-bottom:1px solid #fff;color:#fff}#dynamics365Accounts>.header.selected-bar{position:absolute;top:0;left:0;right:0;z-index:999;background-image:none;opacity:1!important}#dynamics365Accounts>.header.selected-bar .close-button-wrapper{width:244px}#dynamics365Accounts>.content{position:absolute;top:76px;bottom:0;right:0;left:0}#dynamics365Accounts>.content .main{padding:16px 90px 0 4px;position:absolute;top:0;left:24px;right:0;bottom:0}#dynamics365Accounts>.content .main .no-results{box-shadow:0 1px 1px 0 rgba(0,0,0,.14)}#dynamics365Accounts #add-dynamics365Account-button{position:fixed;bottom:8px;right:8px;padding:0}#dynamics365Accounts #upload-dynamics365Account-button{position:fixed;bottom:8px;right:8px;padding:0}md-dialog.dynamics365Configuration-dialog{max-width:720px;width:720px}md-dialog.dynamics365Configuration-dialog md-dialog-content{display:block;position:relative}md-dialog.dynamics365Configuration-dialog md-toolbar .title{font-size:17px}md-dialog.dynamics365Configuration-dialog md-input-container textarea{min-height:150px}md-dialog.dynamics365Configuration-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.dynamics365Configuration-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.dynamics365Configuration-dialog .date-container{padding:16px 0 24px 0}md-dialog.dynamics365Configuration-dialog .error-list{font-size:13px}md-dialog.dynamics365Configuration-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.dynamics365Configuration-dialog .error-list .error .message{font-weight:500}md-dialog.dynamics365Configuration-dialog .error-list .error .md-button{margin:0}md-dialog.dynamics365Configuration-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.dynamics365Configuration-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.dynamics365Account-item-dialog{max-width:720px;width:720px}md-dialog.dynamics365Account-item-dialog md-dialog-content{display:block;position:relative}md-dialog.dynamics365Account-item-dialog md-toolbar .title{font-size:17px}md-dialog.dynamics365Account-item-dialog md-input-container textarea{min-height:150px}md-dialog.dynamics365Account-item-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.dynamics365Account-item-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.dynamics365Account-item-dialog .date-container{padding:16px 0 24px 0}md-dialog.dynamics365Account-item-dialog .error-list{font-size:13px}md-dialog.dynamics365Account-item-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.dynamics365Account-item-dialog .error-list .error .message{font-weight:500}md-dialog.dynamics365Account-item-dialog .error-list .error .md-button{margin:0}md-dialog.dynamics365Account-item-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.dynamics365Account-item-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}#integrations-dynamics365Account .header{height:76px;min-height:76px;max-height:76px}#integrations-dynamics365Account .header .goto-dynamics365Accounts-button{margin-right:16px}#integrations-dynamics365Account .header .dynamics365Account-image{overflow:hidden;width:56px;height:56px;margin-right:16px;border:3px solid rgba(0,0,0,.12)}#integrations-dynamics365Account .header .dynamics365Account-image img{height:100%;width:auto;max-width:none}#integrations-dynamics365Account .header .subtitle{margin:6px 0 0 0}#integrations-dynamics365Account .dynamics365Account-detail-form-container{padding:24px;margin-bottom:24px}#integrations-dynamics365Account .dynamics365Account-detail-form-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}#integrations-dynamics365Account .dynamics365Account-detail-form-container .handle{cursor:move}#integrations-dynamics365Account .dynamics365Account-detail-form-container md-input-container md-switch{margin:0!important}#integrations-dynamics365Account .dynamics365Account-detail-form-container #dynamics365Account-image-uploader{position:relative}#integrations-dynamics365Account .dynamics365Account-detail-form-container #dynamics365Account-image-uploader.dropping .drop-text{display:flex}#integrations-dynamics365Account .dynamics365Account-detail-form-container #dynamics365Account-image-uploader .drop-text{display:none;position:absolute;top:0;right:0;bottom:0;left:0;padding:16px;text-align:center;border:2px dashed rgba(0,0,0,.12);background:#fff;font-size:20px;z-index:100}#integrations-dynamics365Account .dynamics365Account-detail-form-container #dynamics365Account-image-uploader .upload-button{margin-bottom:16px}#integrations-dynamics365Account .dynamics365Account-detail-form-container #dynamics365Account-image-uploader .dynamics365Account-image{position:relative;width:200px;height:200px;border:1px solid rgba(0,0,0,.12);margin:8px}#integrations-dynamics365Account .dynamics365Account-detail-form-container #dynamics365Account-image-uploader .dynamics365Account-image.uploading .overlay{position:absolute;top:0;right:0;bottom:0;left:0;background:rgba(0,0,0,.87)}#integrations-dynamics365Account .dynamics365Account-detail-form-container #dynamics365Account-image-uploader .dynamics365Account-image .media{max-height:100%}#integrations-dynamics365Account md-table-container thead tr th:not(:first-child):not(.no-padding){padding:0 20px 0 0!important}#integrations-dynamics365Account md-table-container thead th.md-checkbox-column:not(.no-padding){padding:0 24px!important}#integrations-dynamics365Account md-table-container tbody tr td:not(:first-child):not(.no-padding):not(.actions-padding){padding:0 20px 0 0!important}#integrations-dynamics365Account md-table-container.font-size-12 td.md-cell{font-size:12px!important}md-dialog.freshdeskAccount-dialog{max-width:720px;width:720px}md-dialog.freshdeskAccount-dialog md-dialog-content{display:block;position:relative}md-dialog.freshdeskAccount-dialog md-toolbar .title{font-size:17px}md-dialog.freshdeskAccount-dialog md-input-container textarea{min-height:150px}md-dialog.freshdeskAccount-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.freshdeskAccount-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.freshdeskAccount-dialog .date-container{padding:16px 0 24px 0}md-dialog.freshdeskAccount-dialog .error-list{font-size:13px}md-dialog.freshdeskAccount-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.freshdeskAccount-dialog .error-list .error .message{font-weight:500}md-dialog.freshdeskAccount-dialog .error-list .error .md-button{margin:0}md-dialog.freshdeskAccount-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.freshdeskAccount-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.freshdeskConfiguration-dialog{max-width:720px;width:720px}md-dialog.freshdeskConfiguration-dialog md-dialog-content{display:block;position:relative}md-dialog.freshdeskConfiguration-dialog md-toolbar .title{font-size:17px}md-dialog.freshdeskConfiguration-dialog md-input-container textarea{min-height:150px}md-dialog.freshdeskConfiguration-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.freshdeskConfiguration-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.freshdeskConfiguration-dialog .date-container{padding:16px 0 24px 0}md-dialog.freshdeskConfiguration-dialog .error-list{font-size:13px}md-dialog.freshdeskConfiguration-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.freshdeskConfiguration-dialog .error-list .error .message{font-weight:500}md-dialog.freshdeskConfiguration-dialog .error-list .error .md-button{margin:0}md-dialog.freshdeskConfiguration-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.freshdeskConfiguration-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.freshdeskAccount-item-dialog{max-width:720px;width:720px}md-dialog.freshdeskAccount-item-dialog md-dialog-content{display:block;position:relative}md-dialog.freshdeskAccount-item-dialog md-toolbar .title{font-size:17px}md-dialog.freshdeskAccount-item-dialog md-input-container textarea{min-height:150px}md-dialog.freshdeskAccount-item-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.freshdeskAccount-item-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.freshdeskAccount-item-dialog .date-container{padding:16px 0 24px 0}md-dialog.freshdeskAccount-item-dialog .error-list{font-size:13px}md-dialog.freshdeskAccount-item-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.freshdeskAccount-item-dialog .error-list .error .message{font-weight:500}md-dialog.freshdeskAccount-item-dialog .error-list .error .md-button{margin:0}md-dialog.freshdeskAccount-item-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.freshdeskAccount-item-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}#integrations-freshdeskAccount .header{height:76px;min-height:76px;max-height:76px}#integrations-freshdeskAccount .header .goto-freshdeskAccounts-button{margin-right:16px}#integrations-freshdeskAccount .header .freshdeskAccount-image{overflow:hidden;width:56px;height:56px;margin-right:16px;border:3px solid rgba(0,0,0,.12)}#integrations-freshdeskAccount .header .freshdeskAccount-image img{height:100%;width:auto;max-width:none}#integrations-freshdeskAccount .header .subtitle{margin:6px 0 0 0}#integrations-freshdeskAccount .freshdeskAccount-detail-form-container{padding:24px;margin-bottom:24px}#integrations-freshdeskAccount .freshdeskAccount-detail-form-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}#integrations-freshdeskAccount .freshdeskAccount-detail-form-container .handle{cursor:move}#integrations-freshdeskAccount .freshdeskAccount-detail-form-container md-input-container md-switch{margin:0!important}#integrations-freshdeskAccount .freshdeskAccount-detail-form-container #freshdeskAccount-image-uploader{position:relative}#integrations-freshdeskAccount .freshdeskAccount-detail-form-container #freshdeskAccount-image-uploader.dropping .drop-text{display:flex}#integrations-freshdeskAccount .freshdeskAccount-detail-form-container #freshdeskAccount-image-uploader .drop-text{display:none;position:absolute;top:0;right:0;bottom:0;left:0;padding:16px;text-align:center;border:2px dashed rgba(0,0,0,.12);background:#fff;font-size:20px;z-index:100}#integrations-freshdeskAccount .freshdeskAccount-detail-form-container #freshdeskAccount-image-uploader .upload-button{margin-bottom:16px}#integrations-freshdeskAccount .freshdeskAccount-detail-form-container #freshdeskAccount-image-uploader .freshdeskAccount-image{position:relative;width:200px;height:200px;border:1px solid rgba(0,0,0,.12);margin:8px}#integrations-freshdeskAccount .freshdeskAccount-detail-form-container #freshdeskAccount-image-uploader .freshdeskAccount-image.uploading .overlay{position:absolute;top:0;right:0;bottom:0;left:0;background:rgba(0,0,0,.87)}#integrations-freshdeskAccount .freshdeskAccount-detail-form-container #freshdeskAccount-image-uploader .freshdeskAccount-image .media{max-height:100%}#integrations-freshdeskAccount md-table-container thead tr th:not(:first-child):not(.no-padding){padding:0 20px 0 0!important}#integrations-freshdeskAccount md-table-container thead th.md-checkbox-column:not(.no-padding){padding:0 24px!important}#integrations-freshdeskAccount md-table-container tbody tr td:not(:first-child):not(.no-padding):not(.actions-padding){padding:0 20px 0 0!important}#integrations-freshdeskAccount md-table-container.font-size-12 td.md-cell{font-size:12px!important}#freshdeskAccounts{position:relative}#freshdeskAccounts>.header{height:76px;min-height:76px;max-height:76px}#freshdeskAccounts>.header .logo .logo-icon{margin:0 16px 0 0}#freshdeskAccounts>.header .logo .logo-text{font-size:24px}#freshdeskAccounts>.header md-icon{color:#fff}#freshdeskAccounts>.header .search-input-wrapper{position:relative}#freshdeskAccounts>.header .search-input-wrapper label{padding-right:4px;cursor:pointer}#freshdeskAccounts>.header .search-input-wrapper label md-icon{color:rgba(255,255,255,.8)}#freshdeskAccounts>.header .search-input-wrapper md-input-container .md-errors-spacer{display:none}#freshdeskAccounts>.header .search-input-wrapper md-input-container input{border-bottom:1px solid rgba(255,255,255,.8);color:rgba(255,255,255,.8);width:240px}#freshdeskAccounts>.header .search-input-wrapper md-input-container input::placeholder{color:rgba(255,255,255,.8)}#freshdeskAccounts>.header .search-input-wrapper md-input-container input:focus{border-bottom:1px solid #fff;color:#fff}#freshdeskAccounts>.header.selected-bar{position:absolute;top:0;left:0;right:0;z-index:999;background-image:none;opacity:1!important}#freshdeskAccounts>.header.selected-bar .close-button-wrapper{width:244px}#freshdeskAccounts>.content{position:absolute;top:76px;bottom:0;right:0;left:0}#freshdeskAccounts>.content .main{padding:16px 90px 0 4px;position:absolute;top:0;left:24px;right:0;bottom:0}#freshdeskAccounts>.content .main .no-results{box-shadow:0 1px 1px 0 rgba(0,0,0,.14)}#freshdeskAccounts #add-freshdeskAccount-button{position:fixed;bottom:8px;right:8px;padding:0}#freshdeskAccounts #upload-freshdeskAccount-button{position:fixed;bottom:8px;right:8px;padding:0}md-dialog.freshsalesAccount-dialog{max-width:720px;width:720px}md-dialog.freshsalesAccount-dialog md-dialog-content{display:block;position:relative}md-dialog.freshsalesAccount-dialog md-toolbar .title{font-size:17px}md-dialog.freshsalesAccount-dialog md-input-container textarea{min-height:150px}md-dialog.freshsalesAccount-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.freshsalesAccount-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.freshsalesAccount-dialog .date-container{padding:16px 0 24px 0}md-dialog.freshsalesAccount-dialog .error-list{font-size:13px}md-dialog.freshsalesAccount-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.freshsalesAccount-dialog .error-list .error .message{font-weight:500}md-dialog.freshsalesAccount-dialog .error-list .error .md-button{margin:0}md-dialog.freshsalesAccount-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.freshsalesAccount-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.freshsalesConfiguration-dialog{max-width:720px;width:720px}md-dialog.freshsalesConfiguration-dialog md-dialog-content{display:block;position:relative}md-dialog.freshsalesConfiguration-dialog md-toolbar .title{font-size:17px}md-dialog.freshsalesConfiguration-dialog md-input-container textarea{min-height:150px}md-dialog.freshsalesConfiguration-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.freshsalesConfiguration-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.freshsalesConfiguration-dialog .date-container{padding:16px 0 24px 0}md-dialog.freshsalesConfiguration-dialog .error-list{font-size:13px}md-dialog.freshsalesConfiguration-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.freshsalesConfiguration-dialog .error-list .error .message{font-weight:500}md-dialog.freshsalesConfiguration-dialog .error-list .error .md-button{margin:0}md-dialog.freshsalesConfiguration-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.freshsalesConfiguration-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.freshsalesAccount-item-dialog{max-width:720px;width:720px}md-dialog.freshsalesAccount-item-dialog md-dialog-content{display:block;position:relative}md-dialog.freshsalesAccount-item-dialog md-toolbar .title{font-size:17px}md-dialog.freshsalesAccount-item-dialog md-input-container textarea{min-height:150px}md-dialog.freshsalesAccount-item-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.freshsalesAccount-item-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.freshsalesAccount-item-dialog .date-container{padding:16px 0 24px 0}md-dialog.freshsalesAccount-item-dialog .error-list{font-size:13px}md-dialog.freshsalesAccount-item-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.freshsalesAccount-item-dialog .error-list .error .message{font-weight:500}md-dialog.freshsalesAccount-item-dialog .error-list .error .md-button{margin:0}md-dialog.freshsalesAccount-item-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.freshsalesAccount-item-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}#integrations-freshsalesAccount .header{height:76px;min-height:76px;max-height:76px}#integrations-freshsalesAccount .header .goto-freshsalesAccounts-button{margin-right:16px}#integrations-freshsalesAccount .header .freshsalesAccount-image{overflow:hidden;width:56px;height:56px;margin-right:16px;border:3px solid rgba(0,0,0,.12)}#integrations-freshsalesAccount .header .freshsalesAccount-image img{height:100%;width:auto;max-width:none}#integrations-freshsalesAccount .header .subtitle{margin:6px 0 0 0}#integrations-freshsalesAccount .freshsalesAccount-detail-form-container{padding:24px;margin-bottom:24px}#integrations-freshsalesAccount .freshsalesAccount-detail-form-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}#integrations-freshsalesAccount .freshsalesAccount-detail-form-container .handle{cursor:move}#integrations-freshsalesAccount .freshsalesAccount-detail-form-container md-input-container md-switch{margin:0!important}#integrations-freshsalesAccount .freshsalesAccount-detail-form-container #freshsalesAccount-image-uploader{position:relative}#integrations-freshsalesAccount .freshsalesAccount-detail-form-container #freshsalesAccount-image-uploader.dropping .drop-text{display:flex}#integrations-freshsalesAccount .freshsalesAccount-detail-form-container #freshsalesAccount-image-uploader .drop-text{display:none;position:absolute;top:0;right:0;bottom:0;left:0;padding:16px;text-align:center;border:2px dashed rgba(0,0,0,.12);background:#fff;font-size:20px;z-index:100}#integrations-freshsalesAccount .freshsalesAccount-detail-form-container #freshsalesAccount-image-uploader .upload-button{margin-bottom:16px}#integrations-freshsalesAccount .freshsalesAccount-detail-form-container #freshsalesAccount-image-uploader .freshsalesAccount-image{position:relative;width:200px;height:200px;border:1px solid rgba(0,0,0,.12);margin:8px}#integrations-freshsalesAccount .freshsalesAccount-detail-form-container #freshsalesAccount-image-uploader .freshsalesAccount-image.uploading .overlay{position:absolute;top:0;right:0;bottom:0;left:0;background:rgba(0,0,0,.87)}#integrations-freshsalesAccount .freshsalesAccount-detail-form-container #freshsalesAccount-image-uploader .freshsalesAccount-image .media{max-height:100%}#integrations-freshsalesAccount md-table-container thead tr th:not(:first-child):not(.no-padding){padding:0 20px 0 0!important}#integrations-freshsalesAccount md-table-container thead th.md-checkbox-column:not(.no-padding){padding:0 24px!important}#integrations-freshsalesAccount md-table-container tbody tr td:not(:first-child):not(.no-padding):not(.actions-padding){padding:0 20px 0 0!important}#integrations-freshsalesAccount md-table-container.font-size-12 td.md-cell{font-size:12px!important}#freshsalesAccounts{position:relative}#freshsalesAccounts>.header{height:76px;min-height:76px;max-height:76px}#freshsalesAccounts>.header .logo .logo-icon{margin:0 16px 0 0}#freshsalesAccounts>.header .logo .logo-text{font-size:24px}#freshsalesAccounts>.header md-icon{color:#fff}#freshsalesAccounts>.header .search-input-wrapper{position:relative}#freshsalesAccounts>.header .search-input-wrapper label{padding-right:4px;cursor:pointer}#freshsalesAccounts>.header .search-input-wrapper label md-icon{color:rgba(255,255,255,.8)}#freshsalesAccounts>.header .search-input-wrapper md-input-container .md-errors-spacer{display:none}#freshsalesAccounts>.header .search-input-wrapper md-input-container input{border-bottom:1px solid rgba(255,255,255,.8);color:rgba(255,255,255,.8);width:240px}#freshsalesAccounts>.header .search-input-wrapper md-input-container input::placeholder{color:rgba(255,255,255,.8)}#freshsalesAccounts>.header .search-input-wrapper md-input-container input:focus{border-bottom:1px solid #fff;color:#fff}#freshsalesAccounts>.header.selected-bar{position:absolute;top:0;left:0;right:0;z-index:999;background-image:none;opacity:1!important}#freshsalesAccounts>.header.selected-bar .close-button-wrapper{width:244px}#freshsalesAccounts>.content{position:absolute;top:76px;bottom:0;right:0;left:0}#freshsalesAccounts>.content .main{padding:16px 90px 0 4px;position:absolute;top:0;left:24px;right:0;bottom:0}#freshsalesAccounts>.content .main .no-results{box-shadow:0 1px 1px 0 rgba(0,0,0,.14)}#freshsalesAccounts #add-freshsalesAccount-button{position:fixed;bottom:8px;right:8px;padding:0}#freshsalesAccounts #upload-freshsalesAccount-button{position:fixed;bottom:8px;right:8px;padding:0}md-dialog.salesforceAccount-dialog{max-width:720px;width:720px}md-dialog.salesforceAccount-dialog md-dialog-content{display:block;position:relative}md-dialog.salesforceAccount-dialog md-toolbar .title{font-size:17px}md-dialog.salesforceAccount-dialog md-input-container textarea{min-height:150px}md-dialog.salesforceAccount-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.salesforceAccount-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.salesforceAccount-dialog .date-container{padding:16px 0 24px 0}md-dialog.salesforceAccount-dialog .error-list{font-size:13px}md-dialog.salesforceAccount-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.salesforceAccount-dialog .error-list .error .message{font-weight:500}md-dialog.salesforceAccount-dialog .error-list .error .md-button{margin:0}md-dialog.salesforceAccount-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.salesforceAccount-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.salesforceConfiguration-dialog{max-width:720px;width:720px}md-dialog.salesforceConfiguration-dialog md-dialog-content{display:block;position:relative}md-dialog.salesforceConfiguration-dialog md-toolbar .title{font-size:17px}md-dialog.salesforceConfiguration-dialog md-input-container textarea{min-height:150px}md-dialog.salesforceConfiguration-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.salesforceConfiguration-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.salesforceConfiguration-dialog .date-container{padding:16px 0 24px 0}md-dialog.salesforceConfiguration-dialog .error-list{font-size:13px}md-dialog.salesforceConfiguration-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.salesforceConfiguration-dialog .error-list .error .message{font-weight:500}md-dialog.salesforceConfiguration-dialog .error-list .error .md-button{margin:0}md-dialog.salesforceConfiguration-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.salesforceConfiguration-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.salesforceAccount-item-dialog{max-width:720px;width:720px}md-dialog.salesforceAccount-item-dialog md-dialog-content{display:block;position:relative}md-dialog.salesforceAccount-item-dialog md-toolbar .title{font-size:17px}md-dialog.salesforceAccount-item-dialog md-input-container textarea{min-height:150px}md-dialog.salesforceAccount-item-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.salesforceAccount-item-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.salesforceAccount-item-dialog .date-container{padding:16px 0 24px 0}md-dialog.salesforceAccount-item-dialog .error-list{font-size:13px}md-dialog.salesforceAccount-item-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.salesforceAccount-item-dialog .error-list .error .message{font-weight:500}md-dialog.salesforceAccount-item-dialog .error-list .error .md-button{margin:0}md-dialog.salesforceAccount-item-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.salesforceAccount-item-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}#integrations-salesforceAccount .header{height:76px;min-height:76px;max-height:76px}#integrations-salesforceAccount .header .goto-salesforceAccounts-button{margin-right:16px}#integrations-salesforceAccount .header .salesforceAccount-image{overflow:hidden;width:56px;height:56px;margin-right:16px;border:3px solid rgba(0,0,0,.12)}#integrations-salesforceAccount .header .salesforceAccount-image img{height:100%;width:auto;max-width:none}#integrations-salesforceAccount .header .subtitle{margin:6px 0 0 0}#integrations-salesforceAccount .salesforceAccount-detail-form-container{padding:24px;margin-bottom:24px}#integrations-salesforceAccount .salesforceAccount-detail-form-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}#integrations-salesforceAccount .salesforceAccount-detail-form-container .handle{cursor:move}#integrations-salesforceAccount .salesforceAccount-detail-form-container md-input-container md-switch{margin:0!important}#integrations-salesforceAccount .salesforceAccount-detail-form-container #salesforceAccount-image-uploader{position:relative}#integrations-salesforceAccount .salesforceAccount-detail-form-container #salesforceAccount-image-uploader.dropping .drop-text{display:flex}#integrations-salesforceAccount .salesforceAccount-detail-form-container #salesforceAccount-image-uploader .drop-text{display:none;position:absolute;top:0;right:0;bottom:0;left:0;padding:16px;text-align:center;border:2px dashed rgba(0,0,0,.12);background:#fff;font-size:20px;z-index:100}#integrations-salesforceAccount .salesforceAccount-detail-form-container #salesforceAccount-image-uploader .upload-button{margin-bottom:16px}#integrations-salesforceAccount .salesforceAccount-detail-form-container #salesforceAccount-image-uploader .salesforceAccount-image{position:relative;width:200px;height:200px;border:1px solid rgba(0,0,0,.12);margin:8px}#integrations-salesforceAccount .salesforceAccount-detail-form-container #salesforceAccount-image-uploader .salesforceAccount-image.uploading .overlay{position:absolute;top:0;right:0;bottom:0;left:0;background:rgba(0,0,0,.87)}#integrations-salesforceAccount .salesforceAccount-detail-form-container #salesforceAccount-image-uploader .salesforceAccount-image .media{max-height:100%}#integrations-salesforceAccount md-table-container thead tr th:not(:first-child):not(.no-padding){padding:0 20px 0 0!important}#integrations-salesforceAccount md-table-container thead th.md-checkbox-column:not(.no-padding){padding:0 24px!important}#integrations-salesforceAccount md-table-container tbody tr td:not(:first-child):not(.no-padding):not(.actions-padding){padding:0 20px 0 0!important}#integrations-salesforceAccount md-table-container.font-size-12 td.md-cell{font-size:12px!important}#salesforceAccounts{position:relative}#salesforceAccounts>.header{height:76px;min-height:76px;max-height:76px}#salesforceAccounts>.header .logo .logo-icon{margin:0 16px 0 0}#salesforceAccounts>.header .logo .logo-text{font-size:24px}#salesforceAccounts>.header md-icon{color:#fff}#salesforceAccounts>.header .search-input-wrapper{position:relative}#salesforceAccounts>.header .search-input-wrapper label{padding-right:4px;cursor:pointer}#salesforceAccounts>.header .search-input-wrapper label md-icon{color:rgba(255,255,255,.8)}#salesforceAccounts>.header .search-input-wrapper md-input-container .md-errors-spacer{display:none}#salesforceAccounts>.header .search-input-wrapper md-input-container input{border-bottom:1px solid rgba(255,255,255,.8);color:rgba(255,255,255,.8);width:240px}#salesforceAccounts>.header .search-input-wrapper md-input-container input::placeholder{color:rgba(255,255,255,.8)}#salesforceAccounts>.header .search-input-wrapper md-input-container input:focus{border-bottom:1px solid #fff;color:#fff}#salesforceAccounts>.header.selected-bar{position:absolute;top:0;left:0;right:0;z-index:999;background-image:none;opacity:1!important}#salesforceAccounts>.header.selected-bar .close-button-wrapper{width:244px}#salesforceAccounts>.content{position:absolute;top:76px;bottom:0;right:0;left:0}#salesforceAccounts>.content .main{padding:16px 90px 0 4px;position:absolute;top:0;left:24px;right:0;bottom:0}#salesforceAccounts>.content .main .no-results{box-shadow:0 1px 1px 0 rgba(0,0,0,.14)}#salesforceAccounts #add-salesforceAccount-button{position:fixed;bottom:8px;right:8px;padding:0}#salesforceAccounts #upload-salesforceAccount-button{position:fixed;bottom:8px;right:8px;padding:0}md-dialog.servicenowAccount-dialog{max-width:720px;width:720px}md-dialog.servicenowAccount-dialog md-dialog-content{display:block;position:relative}md-dialog.servicenowAccount-dialog md-toolbar .title{font-size:17px}md-dialog.servicenowAccount-dialog md-input-container textarea{min-height:150px}md-dialog.servicenowAccount-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.servicenowAccount-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.servicenowAccount-dialog .date-container{padding:16px 0 24px 0}md-dialog.servicenowAccount-dialog .error-list{font-size:13px}md-dialog.servicenowAccount-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.servicenowAccount-dialog .error-list .error .message{font-weight:500}md-dialog.servicenowAccount-dialog .error-list .error .md-button{margin:0}md-dialog.servicenowAccount-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.servicenowAccount-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.servicenowConfiguration-dialog{max-width:720px;width:720px}md-dialog.servicenowConfiguration-dialog md-dialog-content{display:block;position:relative}md-dialog.servicenowConfiguration-dialog md-toolbar .title{font-size:17px}md-dialog.servicenowConfiguration-dialog md-input-container textarea{min-height:150px}md-dialog.servicenowConfiguration-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.servicenowConfiguration-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.servicenowConfiguration-dialog .date-container{padding:16px 0 24px 0}md-dialog.servicenowConfiguration-dialog .error-list{font-size:13px}md-dialog.servicenowConfiguration-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.servicenowConfiguration-dialog .error-list .error .message{font-weight:500}md-dialog.servicenowConfiguration-dialog .error-list .error .md-button{margin:0}md-dialog.servicenowConfiguration-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.servicenowConfiguration-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.servicenowAccount-item-dialog{max-width:720px;width:720px}md-dialog.servicenowAccount-item-dialog md-dialog-content{display:block;position:relative}md-dialog.servicenowAccount-item-dialog md-toolbar .title{font-size:17px}md-dialog.servicenowAccount-item-dialog md-input-container textarea{min-height:150px}md-dialog.servicenowAccount-item-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.servicenowAccount-item-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.servicenowAccount-item-dialog .date-container{padding:16px 0 24px 0}md-dialog.servicenowAccount-item-dialog .error-list{font-size:13px}md-dialog.servicenowAccount-item-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.servicenowAccount-item-dialog .error-list .error .message{font-weight:500}md-dialog.servicenowAccount-item-dialog .error-list .error .md-button{margin:0}md-dialog.servicenowAccount-item-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.servicenowAccount-item-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}#integrations-servicenowAccount .header{height:76px;min-height:76px;max-height:76px}#integrations-servicenowAccount .header .goto-servicenowAccounts-button{margin-right:16px}#integrations-servicenowAccount .header .servicenowAccount-image{overflow:hidden;width:56px;height:56px;margin-right:16px;border:3px solid rgba(0,0,0,.12)}#integrations-servicenowAccount .header .servicenowAccount-image img{height:100%;width:auto;max-width:none}#integrations-servicenowAccount .header .subtitle{margin:6px 0 0 0}#integrations-servicenowAccount .servicenowAccount-detail-form-container{padding:24px;margin-bottom:24px}#integrations-servicenowAccount .servicenowAccount-detail-form-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}#integrations-servicenowAccount .servicenowAccount-detail-form-container .handle{cursor:move}#integrations-servicenowAccount .servicenowAccount-detail-form-container md-input-container md-switch{margin:0!important}#integrations-servicenowAccount .servicenowAccount-detail-form-container #servicenowAccount-image-uploader{position:relative}#integrations-servicenowAccount .servicenowAccount-detail-form-container #servicenowAccount-image-uploader.dropping .drop-text{display:flex}#integrations-servicenowAccount .servicenowAccount-detail-form-container #servicenowAccount-image-uploader .drop-text{display:none;position:absolute;top:0;right:0;bottom:0;left:0;padding:16px;text-align:center;border:2px dashed rgba(0,0,0,.12);background:#fff;font-size:20px;z-index:100}#integrations-servicenowAccount .servicenowAccount-detail-form-container #servicenowAccount-image-uploader .upload-button{margin-bottom:16px}#integrations-servicenowAccount .servicenowAccount-detail-form-container #servicenowAccount-image-uploader .servicenowAccount-image{position:relative;width:200px;height:200px;border:1px solid rgba(0,0,0,.12);margin:8px}#integrations-servicenowAccount .servicenowAccount-detail-form-container #servicenowAccount-image-uploader .servicenowAccount-image.uploading .overlay{position:absolute;top:0;right:0;bottom:0;left:0;background:rgba(0,0,0,.87)}#integrations-servicenowAccount .servicenowAccount-detail-form-container #servicenowAccount-image-uploader .servicenowAccount-image .media{max-height:100%}#integrations-servicenowAccount md-table-container thead tr th:not(:first-child):not(.no-padding){padding:0 20px 0 0!important}#integrations-servicenowAccount md-table-container thead th.md-checkbox-column:not(.no-padding){padding:0 24px!important}#integrations-servicenowAccount md-table-container tbody tr td:not(:first-child):not(.no-padding):not(.actions-padding){padding:0 20px 0 0!important}#integrations-servicenowAccount md-table-container.font-size-12 td.md-cell{font-size:12px!important}#servicenowAccounts{position:relative}#servicenowAccounts>.header{height:76px;min-height:76px;max-height:76px}#servicenowAccounts>.header .logo .logo-icon{margin:0 16px 0 0}#servicenowAccounts>.header .logo .logo-text{font-size:24px}#servicenowAccounts>.header md-icon{color:#fff}#servicenowAccounts>.header .search-input-wrapper{position:relative}#servicenowAccounts>.header .search-input-wrapper label{padding-right:4px;cursor:pointer}#servicenowAccounts>.header .search-input-wrapper label md-icon{color:rgba(255,255,255,.8)}#servicenowAccounts>.header .search-input-wrapper md-input-container .md-errors-spacer{display:none}#servicenowAccounts>.header .search-input-wrapper md-input-container input{border-bottom:1px solid rgba(255,255,255,.8);color:rgba(255,255,255,.8);width:240px}#servicenowAccounts>.header .search-input-wrapper md-input-container input::placeholder{color:rgba(255,255,255,.8)}#servicenowAccounts>.header .search-input-wrapper md-input-container input:focus{border-bottom:1px solid #fff;color:#fff}#servicenowAccounts>.header.selected-bar{position:absolute;top:0;left:0;right:0;z-index:999;background-image:none;opacity:1!important}#servicenowAccounts>.header.selected-bar .close-button-wrapper{width:244px}#servicenowAccounts>.content{position:absolute;top:76px;bottom:0;right:0;left:0}#servicenowAccounts>.content .main{padding:16px 90px 0 4px;position:absolute;top:0;left:24px;right:0;bottom:0}#servicenowAccounts>.content .main .no-results{box-shadow:0 1px 1px 0 rgba(0,0,0,.14)}#servicenowAccounts #add-servicenowAccount-button{position:fixed;bottom:8px;right:8px;padding:0}#servicenowAccounts #upload-servicenowAccount-button{position:fixed;bottom:8px;right:8px;padding:0}md-dialog.sugarcrmAccount-dialog{max-width:720px;width:720px}md-dialog.sugarcrmAccount-dialog md-dialog-content{display:block;position:relative}md-dialog.sugarcrmAccount-dialog md-toolbar .title{font-size:17px}md-dialog.sugarcrmAccount-dialog md-input-container textarea{min-height:150px}md-dialog.sugarcrmAccount-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.sugarcrmAccount-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.sugarcrmAccount-dialog .date-container{padding:16px 0 24px 0}md-dialog.sugarcrmAccount-dialog .error-list{font-size:13px}md-dialog.sugarcrmAccount-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.sugarcrmAccount-dialog .error-list .error .message{font-weight:500}md-dialog.sugarcrmAccount-dialog .error-list .error .md-button{margin:0}md-dialog.sugarcrmAccount-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.sugarcrmAccount-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.sugarcrmConfiguration-dialog{max-width:720px;width:720px}md-dialog.sugarcrmConfiguration-dialog md-dialog-content{display:block;position:relative}md-dialog.sugarcrmConfiguration-dialog md-toolbar .title{font-size:17px}md-dialog.sugarcrmConfiguration-dialog md-input-container textarea{min-height:150px}md-dialog.sugarcrmConfiguration-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.sugarcrmConfiguration-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.sugarcrmConfiguration-dialog .date-container{padding:16px 0 24px 0}md-dialog.sugarcrmConfiguration-dialog .error-list{font-size:13px}md-dialog.sugarcrmConfiguration-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.sugarcrmConfiguration-dialog .error-list .error .message{font-weight:500}md-dialog.sugarcrmConfiguration-dialog .error-list .error .md-button{margin:0}md-dialog.sugarcrmConfiguration-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.sugarcrmConfiguration-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.sugarcrmAccount-item-dialog{max-width:720px;width:720px}md-dialog.sugarcrmAccount-item-dialog md-dialog-content{display:block;position:relative}md-dialog.sugarcrmAccount-item-dialog md-toolbar .title{font-size:17px}md-dialog.sugarcrmAccount-item-dialog md-input-container textarea{min-height:150px}md-dialog.sugarcrmAccount-item-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.sugarcrmAccount-item-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.sugarcrmAccount-item-dialog .date-container{padding:16px 0 24px 0}md-dialog.sugarcrmAccount-item-dialog .error-list{font-size:13px}md-dialog.sugarcrmAccount-item-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.sugarcrmAccount-item-dialog .error-list .error .message{font-weight:500}md-dialog.sugarcrmAccount-item-dialog .error-list .error .md-button{margin:0}md-dialog.sugarcrmAccount-item-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.sugarcrmAccount-item-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}#integrations-sugarcrmAccount .header{height:76px;min-height:76px;max-height:76px}#integrations-sugarcrmAccount .header .goto-sugarcrmAccounts-button{margin-right:16px}#integrations-sugarcrmAccount .header .sugarcrmAccount-image{overflow:hidden;width:56px;height:56px;margin-right:16px;border:3px solid rgba(0,0,0,.12)}#integrations-sugarcrmAccount .header .sugarcrmAccount-image img{height:100%;width:auto;max-width:none}#integrations-sugarcrmAccount .header .subtitle{margin:6px 0 0 0}#integrations-sugarcrmAccount .sugarcrmAccount-detail-form-container{padding:24px;margin-bottom:24px}#integrations-sugarcrmAccount .sugarcrmAccount-detail-form-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}#integrations-sugarcrmAccount .sugarcrmAccount-detail-form-container .handle{cursor:move}#integrations-sugarcrmAccount .sugarcrmAccount-detail-form-container md-input-container md-switch{margin:0!important}#integrations-sugarcrmAccount .sugarcrmAccount-detail-form-container #sugarcrmAccount-image-uploader{position:relative}#integrations-sugarcrmAccount .sugarcrmAccount-detail-form-container #sugarcrmAccount-image-uploader.dropping .drop-text{display:flex}#integrations-sugarcrmAccount .sugarcrmAccount-detail-form-container #sugarcrmAccount-image-uploader .drop-text{display:none;position:absolute;top:0;right:0;bottom:0;left:0;padding:16px;text-align:center;border:2px dashed rgba(0,0,0,.12);background:#fff;font-size:20px;z-index:100}#integrations-sugarcrmAccount .sugarcrmAccount-detail-form-container #sugarcrmAccount-image-uploader .upload-button{margin-bottom:16px}#integrations-sugarcrmAccount .sugarcrmAccount-detail-form-container #sugarcrmAccount-image-uploader .sugarcrmAccount-image{position:relative;width:200px;height:200px;border:1px solid rgba(0,0,0,.12);margin:8px}#integrations-sugarcrmAccount .sugarcrmAccount-detail-form-container #sugarcrmAccount-image-uploader .sugarcrmAccount-image.uploading .overlay{position:absolute;top:0;right:0;bottom:0;left:0;background:rgba(0,0,0,.87)}#integrations-sugarcrmAccount .sugarcrmAccount-detail-form-container #sugarcrmAccount-image-uploader .sugarcrmAccount-image .media{max-height:100%}#integrations-sugarcrmAccount md-table-container thead tr th:not(:first-child):not(.no-padding){padding:0 20px 0 0!important}#integrations-sugarcrmAccount md-table-container thead th.md-checkbox-column:not(.no-padding){padding:0 24px!important}#integrations-sugarcrmAccount md-table-container tbody tr td:not(:first-child):not(.no-padding):not(.actions-padding){padding:0 20px 0 0!important}#integrations-sugarcrmAccount md-table-container.font-size-12 td.md-cell{font-size:12px!important}#sugarcrmAccounts{position:relative}#sugarcrmAccounts>.header{height:76px;min-height:76px;max-height:76px}#sugarcrmAccounts>.header .logo .logo-icon{margin:0 16px 0 0}#sugarcrmAccounts>.header .logo .logo-text{font-size:24px}#sugarcrmAccounts>.header md-icon{color:#fff}#sugarcrmAccounts>.header .search-input-wrapper{position:relative}#sugarcrmAccounts>.header .search-input-wrapper label{padding-right:4px;cursor:pointer}#sugarcrmAccounts>.header .search-input-wrapper label md-icon{color:rgba(255,255,255,.8)}#sugarcrmAccounts>.header .search-input-wrapper md-input-container .md-errors-spacer{display:none}#sugarcrmAccounts>.header .search-input-wrapper md-input-container input{border-bottom:1px solid rgba(255,255,255,.8);color:rgba(255,255,255,.8);width:240px}#sugarcrmAccounts>.header .search-input-wrapper md-input-container input::placeholder{color:rgba(255,255,255,.8)}#sugarcrmAccounts>.header .search-input-wrapper md-input-container input:focus{border-bottom:1px solid #fff;color:#fff}#sugarcrmAccounts>.header.selected-bar{position:absolute;top:0;left:0;right:0;z-index:999;background-image:none;opacity:1!important}#sugarcrmAccounts>.header.selected-bar .close-button-wrapper{width:244px}#sugarcrmAccounts>.content{position:absolute;top:76px;bottom:0;right:0;left:0}#sugarcrmAccounts>.content .main{padding:16px 90px 0 4px;position:absolute;top:0;left:24px;right:0;bottom:0}#sugarcrmAccounts>.content .main .no-results{box-shadow:0 1px 1px 0 rgba(0,0,0,.14)}#sugarcrmAccounts #add-sugarcrmAccount-button{position:fixed;bottom:8px;right:8px;padding:0}#sugarcrmAccounts #upload-sugarcrmAccount-button{position:fixed;bottom:8px;right:8px;padding:0}md-dialog.vtigerAccount-dialog{max-width:720px;width:720px}md-dialog.vtigerAccount-dialog md-dialog-content{display:block;position:relative}md-dialog.vtigerAccount-dialog md-toolbar .title{font-size:17px}md-dialog.vtigerAccount-dialog md-input-container textarea{min-height:150px}md-dialog.vtigerAccount-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.vtigerAccount-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.vtigerAccount-dialog .date-container{padding:16px 0 24px 0}md-dialog.vtigerAccount-dialog .error-list{font-size:13px}md-dialog.vtigerAccount-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.vtigerAccount-dialog .error-list .error .message{font-weight:500}md-dialog.vtigerAccount-dialog .error-list .error .md-button{margin:0}md-dialog.vtigerAccount-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.vtigerAccount-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.vtigerConfiguration-dialog{max-width:720px;width:720px}md-dialog.vtigerConfiguration-dialog md-dialog-content{display:block;position:relative}md-dialog.vtigerConfiguration-dialog md-toolbar .title{font-size:17px}md-dialog.vtigerConfiguration-dialog md-input-container textarea{min-height:150px}md-dialog.vtigerConfiguration-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.vtigerConfiguration-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.vtigerConfiguration-dialog .date-container{padding:16px 0 24px 0}md-dialog.vtigerConfiguration-dialog .error-list{font-size:13px}md-dialog.vtigerConfiguration-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.vtigerConfiguration-dialog .error-list .error .message{font-weight:500}md-dialog.vtigerConfiguration-dialog .error-list .error .md-button{margin:0}md-dialog.vtigerConfiguration-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.vtigerConfiguration-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.vtigerAccount-item-dialog{max-width:720px;width:720px}md-dialog.vtigerAccount-item-dialog md-dialog-content{display:block;position:relative}md-dialog.vtigerAccount-item-dialog md-toolbar .title{font-size:17px}md-dialog.vtigerAccount-item-dialog md-input-container textarea{min-height:150px}md-dialog.vtigerAccount-item-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.vtigerAccount-item-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.vtigerAccount-item-dialog .date-container{padding:16px 0 24px 0}md-dialog.vtigerAccount-item-dialog .error-list{font-size:13px}md-dialog.vtigerAccount-item-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.vtigerAccount-item-dialog .error-list .error .message{font-weight:500}md-dialog.vtigerAccount-item-dialog .error-list .error .md-button{margin:0}md-dialog.vtigerAccount-item-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.vtigerAccount-item-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}#integrations-vtigerAccount .header{height:76px;min-height:76px;max-height:76px}#integrations-vtigerAccount .header .goto-vtigerAccounts-button{margin-right:16px}#integrations-vtigerAccount .header .vtigerAccount-image{overflow:hidden;width:56px;height:56px;margin-right:16px;border:3px solid rgba(0,0,0,.12)}#integrations-vtigerAccount .header .vtigerAccount-image img{height:100%;width:auto;max-width:none}#integrations-vtigerAccount .header .subtitle{margin:6px 0 0 0}#integrations-vtigerAccount .vtigerAccount-detail-form-container{padding:24px;margin-bottom:24px}#integrations-vtigerAccount .vtigerAccount-detail-form-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}#integrations-vtigerAccount .vtigerAccount-detail-form-container .handle{cursor:move}#integrations-vtigerAccount .vtigerAccount-detail-form-container md-input-container md-switch{margin:0!important}#integrations-vtigerAccount .vtigerAccount-detail-form-container #vtigerAccount-image-uploader{position:relative}#integrations-vtigerAccount .vtigerAccount-detail-form-container #vtigerAccount-image-uploader.dropping .drop-text{display:flex}#integrations-vtigerAccount .vtigerAccount-detail-form-container #vtigerAccount-image-uploader .drop-text{display:none;position:absolute;top:0;right:0;bottom:0;left:0;padding:16px;text-align:center;border:2px dashed rgba(0,0,0,.12);background:#fff;font-size:20px;z-index:100}#integrations-vtigerAccount .vtigerAccount-detail-form-container #vtigerAccount-image-uploader .upload-button{margin-bottom:16px}#integrations-vtigerAccount .vtigerAccount-detail-form-container #vtigerAccount-image-uploader .vtigerAccount-image{position:relative;width:200px;height:200px;border:1px solid rgba(0,0,0,.12);margin:8px}#integrations-vtigerAccount .vtigerAccount-detail-form-container #vtigerAccount-image-uploader .vtigerAccount-image.uploading .overlay{position:absolute;top:0;right:0;bottom:0;left:0;background:rgba(0,0,0,.87)}#integrations-vtigerAccount .vtigerAccount-detail-form-container #vtigerAccount-image-uploader .vtigerAccount-image .media{max-height:100%}#integrations-vtigerAccount md-table-container thead tr th:not(:first-child):not(.no-padding){padding:0 20px 0 0!important}#integrations-vtigerAccount md-table-container thead th.md-checkbox-column:not(.no-padding){padding:0 24px!important}#integrations-vtigerAccount md-table-container tbody tr td:not(:first-child):not(.no-padding):not(.actions-padding){padding:0 20px 0 0!important}#integrations-vtigerAccount md-table-container.font-size-12 td.md-cell{font-size:12px!important}#vtigerAccounts{position:relative}#vtigerAccounts>.header{height:76px;min-height:76px;max-height:76px}#vtigerAccounts>.header .logo .logo-icon{margin:0 16px 0 0}#vtigerAccounts>.header .logo .logo-text{font-size:24px}#vtigerAccounts>.header md-icon{color:#fff}#vtigerAccounts>.header .search-input-wrapper{position:relative}#vtigerAccounts>.header .search-input-wrapper label{padding-right:4px;cursor:pointer}#vtigerAccounts>.header .search-input-wrapper label md-icon{color:rgba(255,255,255,.8)}#vtigerAccounts>.header .search-input-wrapper md-input-container .md-errors-spacer{display:none}#vtigerAccounts>.header .search-input-wrapper md-input-container input{border-bottom:1px solid rgba(255,255,255,.8);color:rgba(255,255,255,.8);width:240px}#vtigerAccounts>.header .search-input-wrapper md-input-container input::placeholder{color:rgba(255,255,255,.8)}#vtigerAccounts>.header .search-input-wrapper md-input-container input:focus{border-bottom:1px solid #fff;color:#fff}#vtigerAccounts>.header.selected-bar{position:absolute;top:0;left:0;right:0;z-index:999;background-image:none;opacity:1!important}#vtigerAccounts>.header.selected-bar .close-button-wrapper{width:244px}#vtigerAccounts>.content{position:absolute;top:76px;bottom:0;right:0;left:0}#vtigerAccounts>.content .main{padding:16px 90px 0 4px;position:absolute;top:0;left:24px;right:0;bottom:0}#vtigerAccounts>.content .main .no-results{box-shadow:0 1px 1px 0 rgba(0,0,0,.14)}#vtigerAccounts #add-vtigerAccount-button{position:fixed;bottom:8px;right:8px;padding:0}#vtigerAccounts #upload-vtigerAccount-button{position:fixed;bottom:8px;right:8px;padding:0}md-dialog.zendeskAccount-dialog{max-width:720px;width:720px}md-dialog.zendeskAccount-dialog md-dialog-content{display:block;position:relative}md-dialog.zendeskAccount-dialog md-toolbar .title{font-size:17px}md-dialog.zendeskAccount-dialog md-input-container textarea{min-height:150px}md-dialog.zendeskAccount-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.zendeskAccount-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.zendeskAccount-dialog .date-container{padding:16px 0 24px 0}md-dialog.zendeskAccount-dialog .error-list{font-size:13px}md-dialog.zendeskAccount-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.zendeskAccount-dialog .error-list .error .message{font-weight:500}md-dialog.zendeskAccount-dialog .error-list .error .md-button{margin:0}md-dialog.zendeskAccount-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.zendeskAccount-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.zendeskAccount-item-dialog{max-width:720px;width:720px}md-dialog.zendeskAccount-item-dialog md-dialog-content{display:block;position:relative}md-dialog.zendeskAccount-item-dialog md-toolbar .title{font-size:17px}md-dialog.zendeskAccount-item-dialog md-input-container textarea{min-height:150px}md-dialog.zendeskAccount-item-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.zendeskAccount-item-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.zendeskAccount-item-dialog .date-container{padding:16px 0 24px 0}md-dialog.zendeskAccount-item-dialog .error-list{font-size:13px}md-dialog.zendeskAccount-item-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.zendeskAccount-item-dialog .error-list .error .message{font-weight:500}md-dialog.zendeskAccount-item-dialog .error-list .error .md-button{margin:0}md-dialog.zendeskAccount-item-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.zendeskAccount-item-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}#integrations-zendeskAccount .header{height:76px;min-height:76px;max-height:76px}#integrations-zendeskAccount .header .goto-zendeskAccounts-button{margin-right:16px}#integrations-zendeskAccount .header .zendeskAccount-image{overflow:hidden;width:56px;height:56px;margin-right:16px;border:3px solid rgba(0,0,0,.12)}#integrations-zendeskAccount .header .zendeskAccount-image img{height:100%;width:auto;max-width:none}#integrations-zendeskAccount .header .subtitle{margin:6px 0 0 0}#integrations-zendeskAccount .zendeskAccount-detail-form-container{padding:24px;margin-bottom:24px}#integrations-zendeskAccount .zendeskAccount-detail-form-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}#integrations-zendeskAccount .zendeskAccount-detail-form-container .handle{cursor:move}#integrations-zendeskAccount .zendeskAccount-detail-form-container md-input-container md-switch{margin:0!important}#integrations-zendeskAccount .zendeskAccount-detail-form-container #zendeskAccount-image-uploader{position:relative}#integrations-zendeskAccount .zendeskAccount-detail-form-container #zendeskAccount-image-uploader.dropping .drop-text{display:flex}#integrations-zendeskAccount .zendeskAccount-detail-form-container #zendeskAccount-image-uploader .drop-text{display:none;position:absolute;top:0;right:0;bottom:0;left:0;padding:16px;text-align:center;border:2px dashed rgba(0,0,0,.12);background:#fff;font-size:20px;z-index:100}#integrations-zendeskAccount .zendeskAccount-detail-form-container #zendeskAccount-image-uploader .upload-button{margin-bottom:16px}#integrations-zendeskAccount .zendeskAccount-detail-form-container #zendeskAccount-image-uploader .zendeskAccount-image{position:relative;width:200px;height:200px;border:1px solid rgba(0,0,0,.12);margin:8px}#integrations-zendeskAccount .zendeskAccount-detail-form-container #zendeskAccount-image-uploader .zendeskAccount-image.uploading .overlay{position:absolute;top:0;right:0;bottom:0;left:0;background:rgba(0,0,0,.87)}#integrations-zendeskAccount .zendeskAccount-detail-form-container #zendeskAccount-image-uploader .zendeskAccount-image .media{max-height:100%}#integrations-zendeskAccount md-table-container thead tr th:not(:first-child):not(.no-padding){padding:0 20px 0 0!important}#integrations-zendeskAccount md-table-container thead th.md-checkbox-column:not(.no-padding){padding:0 24px!important}#integrations-zendeskAccount md-table-container tbody tr td:not(:first-child):not(.no-padding):not(.actions-padding){padding:0 20px 0 0!important}#integrations-zendeskAccount md-table-container.font-size-12 td.md-cell{font-size:12px!important}md-dialog.zendeskConfiguration-dialog{max-width:720px;width:720px}md-dialog.zendeskConfiguration-dialog md-dialog-content{display:block;position:relative}md-dialog.zendeskConfiguration-dialog md-toolbar .title{font-size:17px}md-dialog.zendeskConfiguration-dialog md-input-container textarea{min-height:150px}md-dialog.zendeskConfiguration-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.zendeskConfiguration-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.zendeskConfiguration-dialog .date-container{padding:16px 0 24px 0}md-dialog.zendeskConfiguration-dialog .error-list{font-size:13px}md-dialog.zendeskConfiguration-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.zendeskConfiguration-dialog .error-list .error .message{font-weight:500}md-dialog.zendeskConfiguration-dialog .error-list .error .md-button{margin:0}md-dialog.zendeskConfiguration-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.zendeskConfiguration-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}#zendeskAccounts{position:relative}#zendeskAccounts>.header{height:76px;min-height:76px;max-height:76px}#zendeskAccounts>.header .logo .logo-icon{margin:0 16px 0 0}#zendeskAccounts>.header .logo .logo-text{font-size:24px}#zendeskAccounts>.header md-icon{color:#fff}#zendeskAccounts>.header .search-input-wrapper{position:relative}#zendeskAccounts>.header .search-input-wrapper label{padding-right:4px;cursor:pointer}#zendeskAccounts>.header .search-input-wrapper label md-icon{color:rgba(255,255,255,.8)}#zendeskAccounts>.header .search-input-wrapper md-input-container .md-errors-spacer{display:none}#zendeskAccounts>.header .search-input-wrapper md-input-container input{border-bottom:1px solid rgba(255,255,255,.8);color:rgba(255,255,255,.8);width:240px}#zendeskAccounts>.header .search-input-wrapper md-input-container input::placeholder{color:rgba(255,255,255,.8)}#zendeskAccounts>.header .search-input-wrapper md-input-container input:focus{border-bottom:1px solid #fff;color:#fff}#zendeskAccounts>.header.selected-bar{position:absolute;top:0;left:0;right:0;z-index:999;background-image:none;opacity:1!important}#zendeskAccounts>.header.selected-bar .close-button-wrapper{width:244px}#zendeskAccounts>.content{position:absolute;top:76px;bottom:0;right:0;left:0}#zendeskAccounts>.content .main{padding:16px 90px 0 4px;position:absolute;top:0;left:24px;right:0;bottom:0}#zendeskAccounts>.content .main .no-results{box-shadow:0 1px 1px 0 rgba(0,0,0,.14)}#zendeskAccounts #add-zendeskAccount-button{position:fixed;bottom:8px;right:8px;padding:0}#zendeskAccounts #upload-zendeskAccount-button{position:fixed;bottom:8px;right:8px;padding:0}md-dialog.zohoAccount-dialog{max-width:720px;width:720px}md-dialog.zohoAccount-dialog md-dialog-content{display:block;position:relative}md-dialog.zohoAccount-dialog md-toolbar .title{font-size:17px}md-dialog.zohoAccount-dialog md-input-container textarea{min-height:150px}md-dialog.zohoAccount-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.zohoAccount-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.zohoAccount-dialog .date-container{padding:16px 0 24px 0}md-dialog.zohoAccount-dialog .error-list{font-size:13px}md-dialog.zohoAccount-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.zohoAccount-dialog .error-list .error .message{font-weight:500}md-dialog.zohoAccount-dialog .error-list .error .md-button{margin:0}md-dialog.zohoAccount-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.zohoAccount-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.zohoConfiguration-dialog{max-width:720px;width:720px}md-dialog.zohoConfiguration-dialog md-dialog-content{display:block;position:relative}md-dialog.zohoConfiguration-dialog md-toolbar .title{font-size:17px}md-dialog.zohoConfiguration-dialog md-input-container textarea{min-height:150px}md-dialog.zohoConfiguration-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.zohoConfiguration-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.zohoConfiguration-dialog .date-container{padding:16px 0 24px 0}md-dialog.zohoConfiguration-dialog .error-list{font-size:13px}md-dialog.zohoConfiguration-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.zohoConfiguration-dialog .error-list .error .message{font-weight:500}md-dialog.zohoConfiguration-dialog .error-list .error .md-button{margin:0}md-dialog.zohoConfiguration-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.zohoConfiguration-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.zohoAccount-item-dialog{max-width:720px;width:720px}md-dialog.zohoAccount-item-dialog md-dialog-content{display:block;position:relative}md-dialog.zohoAccount-item-dialog md-toolbar .title{font-size:17px}md-dialog.zohoAccount-item-dialog md-input-container textarea{min-height:150px}md-dialog.zohoAccount-item-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.zohoAccount-item-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.zohoAccount-item-dialog .date-container{padding:16px 0 24px 0}md-dialog.zohoAccount-item-dialog .error-list{font-size:13px}md-dialog.zohoAccount-item-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.zohoAccount-item-dialog .error-list .error .message{font-weight:500}md-dialog.zohoAccount-item-dialog .error-list .error .md-button{margin:0}md-dialog.zohoAccount-item-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.zohoAccount-item-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}#integrations-zohoAccount .header{height:76px;min-height:76px;max-height:76px}#integrations-zohoAccount .header .goto-zohoAccounts-button{margin-right:16px}#integrations-zohoAccount .header .zohoAccount-image{overflow:hidden;width:56px;height:56px;margin-right:16px;border:3px solid rgba(0,0,0,.12)}#integrations-zohoAccount .header .zohoAccount-image img{height:100%;width:auto;max-width:none}#integrations-zohoAccount .header .subtitle{margin:6px 0 0 0}#integrations-zohoAccount .zohoAccount-detail-form-container{padding:24px;margin-bottom:24px}#integrations-zohoAccount .zohoAccount-detail-form-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}#integrations-zohoAccount .zohoAccount-detail-form-container .handle{cursor:move}#integrations-zohoAccount .zohoAccount-detail-form-container md-input-container md-switch{margin:0!important}#integrations-zohoAccount .zohoAccount-detail-form-container #zohoAccount-image-uploader{position:relative}#integrations-zohoAccount .zohoAccount-detail-form-container #zohoAccount-image-uploader.dropping .drop-text{display:flex}#integrations-zohoAccount .zohoAccount-detail-form-container #zohoAccount-image-uploader .drop-text{display:none;position:absolute;top:0;right:0;bottom:0;left:0;padding:16px;text-align:center;border:2px dashed rgba(0,0,0,.12);background:#fff;font-size:20px;z-index:100}#integrations-zohoAccount .zohoAccount-detail-form-container #zohoAccount-image-uploader .upload-button{margin-bottom:16px}#integrations-zohoAccount .zohoAccount-detail-form-container #zohoAccount-image-uploader .zohoAccount-image{position:relative;width:200px;height:200px;border:1px solid rgba(0,0,0,.12);margin:8px}#integrations-zohoAccount .zohoAccount-detail-form-container #zohoAccount-image-uploader .zohoAccount-image.uploading .overlay{position:absolute;top:0;right:0;bottom:0;left:0;background:rgba(0,0,0,.87)}#integrations-zohoAccount .zohoAccount-detail-form-container #zohoAccount-image-uploader .zohoAccount-image .media{max-height:100%}#integrations-zohoAccount md-table-container thead tr th:not(:first-child):not(.no-padding){padding:0 20px 0 0!important}#integrations-zohoAccount md-table-container thead th.md-checkbox-column:not(.no-padding){padding:0 24px!important}#integrations-zohoAccount md-table-container tbody tr td:not(:first-child):not(.no-padding):not(.actions-padding){padding:0 20px 0 0!important}#integrations-zohoAccount md-table-container.font-size-12 td.md-cell{font-size:12px!important}#zohoAccounts{position:relative}#zohoAccounts>.header{height:76px;min-height:76px;max-height:76px}#zohoAccounts>.header .logo .logo-icon{margin:0 16px 0 0}#zohoAccounts>.header .logo .logo-text{font-size:24px}#zohoAccounts>.header md-icon{color:#fff}#zohoAccounts>.header .search-input-wrapper{position:relative}#zohoAccounts>.header .search-input-wrapper label{padding-right:4px;cursor:pointer}#zohoAccounts>.header .search-input-wrapper label md-icon{color:rgba(255,255,255,.8)}#zohoAccounts>.header .search-input-wrapper md-input-container .md-errors-spacer{display:none}#zohoAccounts>.header .search-input-wrapper md-input-container input{border-bottom:1px solid rgba(255,255,255,.8);color:rgba(255,255,255,.8);width:240px}#zohoAccounts>.header .search-input-wrapper md-input-container input::placeholder{color:rgba(255,255,255,.8)}#zohoAccounts>.header .search-input-wrapper md-input-container input:focus{border-bottom:1px solid #fff;color:#fff}#zohoAccounts>.header.selected-bar{position:absolute;top:0;left:0;right:0;z-index:999;background-image:none;opacity:1!important}#zohoAccounts>.header.selected-bar .close-button-wrapper{width:244px}#zohoAccounts>.content{position:absolute;top:76px;bottom:0;right:0;left:0}#zohoAccounts>.content .main{padding:16px 90px 0 4px;position:absolute;top:0;left:24px;right:0;bottom:0}#zohoAccounts>.content .main .no-results{box-shadow:0 1px 1px 0 rgba(0,0,0,.14)}#zohoAccounts #add-zohoAccount-button{position:fixed;bottom:8px;right:8px;padding:0}#zohoAccounts #upload-zohoAccount-button{position:fixed;bottom:8px;right:8px;padding:0}md-dialog.project-dialog{max-width:720px;width:720px}md-dialog.project-dialog md-dialog-content{display:block;position:relative}md-dialog.project-dialog md-toolbar .title{font-size:17px}md-dialog.project-dialog md-input-container textarea{min-height:150px}md-dialog.project-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.project-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.project-dialog .date-container{padding:16px 0 24px 0}md-dialog.project-dialog .error-list{font-size:13px}md-dialog.project-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.project-dialog .error-list .error .message{font-weight:500}md-dialog.project-dialog .error-list .error .md-button{margin:0}md-dialog.project-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.project-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.session-dialog{max-width:720px;width:720px}md-dialog.session-dialog md-dialog-content{display:block;position:relative}md-dialog.session-dialog md-toolbar .title{font-size:17px}md-dialog.session-dialog md-input-container textarea{min-height:150px}md-dialog.session-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.session-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.session-dialog .date-container{padding:16px 0 24px 0}md-dialog.session-dialog .error-list{font-size:13px}md-dialog.session-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.session-dialog .error-list .error .message{font-weight:500}md-dialog.session-dialog .error-list .error .md-button{margin:0}md-dialog.session-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.session-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}#jscripty-project .header{height:76px;min-height:76px;max-height:76px}#jscripty-project .header .goto-projects-button{margin-right:16px}#jscripty-project .header .project-image{overflow:hidden;width:56px;height:56px;margin-right:16px;border:3px solid rgba(0,0,0,.12)}#jscripty-project .header .project-image img{height:100%;width:auto;max-width:none}#jscripty-project .header .subtitle{margin:6px 0 0 0}#jscripty-project .project-detail-form-container{padding:24px;margin-bottom:24px}#jscripty-project .project-detail-form-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}#jscripty-project .project-detail-form-container .handle{cursor:move}#jscripty-project .project-detail-form-container md-input-container md-switch{margin:0!important}#jscripty-project .project-detail-form-container #project-image-uploader{position:relative}#jscripty-project .project-detail-form-container #project-image-uploader.dropping .drop-text{display:flex}#jscripty-project .project-detail-form-container #project-image-uploader .drop-text{display:none;position:absolute;top:0;right:0;bottom:0;left:0;padding:16px;text-align:center;border:2px dashed rgba(0,0,0,.12);background:#fff;font-size:20px;z-index:100}#jscripty-project .project-detail-form-container #project-image-uploader .upload-button{margin-bottom:16px}#jscripty-project .project-detail-form-container #project-image-uploader .project-image{position:relative;width:200px;height:200px;border:1px solid rgba(0,0,0,.12);margin:8px}#jscripty-project .project-detail-form-container #project-image-uploader .project-image.uploading .overlay{position:absolute;top:0;right:0;bottom:0;left:0;background:rgba(0,0,0,.87)}#jscripty-project .project-detail-form-container #project-image-uploader .project-image .media{max-height:100%}#jscripty-project md-table-container thead tr th:not(:first-child):not(.no-padding){padding:0 20px 0 0!important}#jscripty-project md-table-container thead th.md-checkbox-column:not(.no-padding){padding:0 24px!important}#jscripty-project md-table-container tbody tr td:not(:first-child):not(.no-padding):not(.actions-padding){padding:0 20px 0 0!important}#jscripty-project md-table-container.font-size-12 td.md-cell{font-size:12px!important}#projects{position:relative}#projects>.header{height:76px;min-height:76px;max-height:76px}#projects>.header .logo .logo-icon{margin:0 16px 0 0}#projects>.header .logo .logo-text{font-size:24px}#projects>.header md-icon{color:#fff}#projects>.header .search-input-wrapper{position:relative}#projects>.header .search-input-wrapper label{padding-right:4px;cursor:pointer}#projects>.header .search-input-wrapper label md-icon{color:rgba(255,255,255,.8)}#projects>.header .search-input-wrapper md-input-container .md-errors-spacer{display:none}#projects>.header .search-input-wrapper md-input-container input{border-bottom:1px solid rgba(255,255,255,.8);color:rgba(255,255,255,.8);width:240px}#projects>.header .search-input-wrapper md-input-container input::placeholder{color:rgba(255,255,255,.8)}#projects>.header .search-input-wrapper md-input-container input:focus{border-bottom:1px solid #fff;color:#fff}#projects>.header.selected-bar{position:absolute;top:0;left:0;right:0;z-index:999;background-image:none;opacity:1!important}#projects>.header.selected-bar .close-button-wrapper{width:244px}#projects>.content{position:absolute;top:76px;bottom:0;right:0;left:0}#projects>.content .main{padding:16px 90px 0 4px;position:absolute;top:0;left:24px;right:0;bottom:0}#projects>.content .main .no-results{box-shadow:0 1px 1px 0 rgba(0,0,0,.14)}#projects #add-project-button{position:fixed;bottom:8px;right:8px;padding:0}#projects #upload-project-button{position:fixed;bottom:8px;right:8px;padding:0}md-dialog.mailAccount-dialog{max-width:720px;width:720px}md-dialog.mailAccount-dialog md-dialog-content{display:block;position:relative}md-dialog.mailAccount-dialog md-toolbar .title{font-size:17px}md-dialog.mailAccount-dialog md-input-container textarea{min-height:150px}md-dialog.mailAccount-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.mailAccount-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.mailAccount-dialog .date-container{padding:16px 0 24px 0}md-dialog.mailAccount-dialog .error-list{font-size:13px}md-dialog.mailAccount-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.mailAccount-dialog .error-list .error .message{font-weight:500}md-dialog.mailAccount-dialog .error-list .error .md-button{margin:0}md-dialog.mailAccount-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.mailAccount-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.mailAccount-dialog{max-width:720px;width:720px}md-dialog.mailAccount-dialog md-dialog-content{display:block;position:relative}md-dialog.mailAccount-dialog md-toolbar .title{font-size:17px}md-dialog.mailAccount-dialog md-input-container textarea{min-height:150px}md-dialog.mailAccount-dialog .date-container{padding:16px 0 24px 0}md-dialog.mailAccount-dialog .error-list{font-size:13px}md-dialog.mailAccount-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.mailAccount-dialog .error-list .error .message{font-weight:500}md-dialog.mailAccount-dialog .error-list .error .md-button{margin:0}md-dialog.mailAccount-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.mailAccount-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.mailAccount-dialog{max-width:720px;width:720px}md-dialog.mailAccount-dialog md-dialog-content{display:block;position:relative}md-dialog.mailAccount-dialog md-toolbar .title{font-size:17px}md-dialog.mailAccount-dialog md-input-container textarea{min-height:150px}md-dialog.mailAccount-dialog .date-container{padding:16px 0 24px 0}md-dialog.mailAccount-dialog .error-list{font-size:13px}md-dialog.mailAccount-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.mailAccount-dialog .error-list .error .message{font-weight:500}md-dialog.mailAccount-dialog .error-list .error .md-button{margin:0}md-dialog.mailAccount-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.mailAccount-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.mailAccount-dialog{max-width:720px;width:720px}md-dialog.mailAccount-dialog md-dialog-content{display:block;position:relative}md-dialog.mailAccount-dialog md-toolbar .title{font-size:17px}md-dialog.mailAccount-dialog md-input-container textarea{min-height:150px}md-dialog.mailAccount-dialog .date-container{padding:16px 0 24px 0}md-dialog.mailAccount-dialog .error-list{font-size:13px}md-dialog.mailAccount-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.mailAccount-dialog .error-list .error .message{font-weight:500}md-dialog.mailAccount-dialog .error-list .error .md-button{margin:0}md-dialog.mailAccount-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.mailAccount-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.mailAccount-dialog{max-width:720px;width:720px}md-dialog.mailAccount-dialog md-dialog-content{display:block;position:relative}md-dialog.mailAccount-dialog md-toolbar .title{font-size:17px}md-dialog.mailAccount-dialog md-input-container textarea{min-height:150px}md-dialog.mailAccount-dialog .date-container{padding:16px 0 24px 0}md-dialog.mailAccount-dialog .error-list{font-size:13px}md-dialog.mailAccount-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.mailAccount-dialog .error-list .error .message{font-weight:500}md-dialog.mailAccount-dialog .error-list .error .md-button{margin:0}md-dialog.mailAccount-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.mailAccount-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.mailAccount-dialog{max-width:720px;width:720px}md-dialog.mailAccount-dialog md-dialog-content{display:block;position:relative}md-dialog.mailAccount-dialog md-toolbar .title{font-size:17px}md-dialog.mailAccount-dialog md-input-container textarea{min-height:150px}md-dialog.mailAccount-dialog .date-container{padding:16px 0 24px 0}md-dialog.mailAccount-dialog .error-list{font-size:13px}md-dialog.mailAccount-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.mailAccount-dialog .error-list .error .message{font-weight:500}md-dialog.mailAccount-dialog .error-list .error .md-button{margin:0}md-dialog.mailAccount-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.mailAccount-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.mailAccount-dialog{max-width:720px;width:720px}md-dialog.mailAccount-dialog md-dialog-content{display:block;position:relative}md-dialog.mailAccount-dialog md-toolbar .title{font-size:17px}md-dialog.mailAccount-dialog md-input-container textarea{min-height:150px}md-dialog.mailAccount-dialog .date-container{padding:16px 0 24px 0}md-dialog.mailAccount-dialog .error-list{font-size:13px}md-dialog.mailAccount-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.mailAccount-dialog .error-list .error .message{font-weight:500}md-dialog.mailAccount-dialog .error-list .error .md-button{margin:0}md-dialog.mailAccount-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.mailAccount-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.mailAccount-dialog{max-width:720px;width:720px}md-dialog.mailAccount-dialog md-dialog-content{display:block;position:relative}md-dialog.mailAccount-dialog md-toolbar .title{font-size:17px}md-dialog.mailAccount-dialog md-input-container textarea{min-height:150px}md-dialog.mailAccount-dialog .date-container{padding:16px 0 24px 0}md-dialog.mailAccount-dialog .error-list{font-size:13px}md-dialog.mailAccount-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.mailAccount-dialog .error-list .error .message{font-weight:500}md-dialog.mailAccount-dialog .error-list .error .md-button{margin:0}md-dialog.mailAccount-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.mailAccount-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.mailAccount-dialog{max-width:720px;width:720px}md-dialog.mailAccount-dialog md-dialog-content{display:block;position:relative}md-dialog.mailAccount-dialog md-toolbar .title{font-size:17px}md-dialog.mailAccount-dialog md-input-container textarea{min-height:150px}md-dialog.mailAccount-dialog .date-container{padding:16px 0 24px 0}md-dialog.mailAccount-dialog .error-list{font-size:13px}md-dialog.mailAccount-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.mailAccount-dialog .error-list .error .message{font-weight:500}md-dialog.mailAccount-dialog .error-list .error .md-button{margin:0}md-dialog.mailAccount-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.mailAccount-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.mailAccount-dialog{max-width:720px;width:720px}md-dialog.mailAccount-dialog md-dialog-content{display:block;position:relative}md-dialog.mailAccount-dialog md-toolbar .title{font-size:17px}md-dialog.mailAccount-dialog md-input-container textarea{min-height:150px}md-dialog.mailAccount-dialog .date-container{padding:16px 0 24px 0}md-dialog.mailAccount-dialog .error-list{font-size:13px}md-dialog.mailAccount-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.mailAccount-dialog .error-list .error .message{font-weight:500}md-dialog.mailAccount-dialog .error-list .error .md-button{margin:0}md-dialog.mailAccount-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.mailAccount-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.mailAccount-dialog{max-width:720px;width:720px}md-dialog.mailAccount-dialog md-dialog-content{display:block;position:relative}md-dialog.mailAccount-dialog md-toolbar .title{font-size:17px}md-dialog.mailAccount-dialog md-input-container textarea{min-height:150px}md-dialog.mailAccount-dialog .date-container{padding:16px 0 24px 0}md-dialog.mailAccount-dialog .error-list{font-size:13px}md-dialog.mailAccount-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.mailAccount-dialog .error-list .error .message{font-weight:500}md-dialog.mailAccount-dialog .error-list .error .md-button{margin:0}md-dialog.mailAccount-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.mailAccount-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.mailCannedAnswer-dialog{max-width:720px;width:720px}md-dialog.mailCannedAnswer-dialog md-dialog-content{display:block;position:relative}md-dialog.mailCannedAnswer-dialog md-toolbar .title{font-size:17px}md-dialog.mailCannedAnswer-dialog md-input-container textarea{min-height:150px}md-dialog.mailCannedAnswer-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.mailCannedAnswer-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.mailCannedAnswer-dialog .date-container{padding:16px 0 24px 0}md-dialog.mailCannedAnswer-dialog .error-list{font-size:13px}md-dialog.mailCannedAnswer-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.mailCannedAnswer-dialog .error-list .error .message{font-weight:500}md-dialog.mailCannedAnswer-dialog .error-list .error .md-button{margin:0}md-dialog.mailCannedAnswer-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.mailCannedAnswer-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}#mail-mailAccount .header{height:76px;min-height:76px;max-height:76px}#mail-mailAccount .header .goto-mailAccounts-button{margin-right:16px}#mail-mailAccount .header .mailAccount-image{overflow:hidden;width:56px;height:56px;margin-right:16px;border:3px solid rgba(0,0,0,.12)}#mail-mailAccount .header .mailAccount-image img{height:100%;width:auto;max-width:none}#mail-mailAccount .header .subtitle{margin:6px 0 0 0}#mail-mailAccount .mailAccount-detail-form-container{padding:24px;margin-bottom:24px}#mail-mailAccount .mailAccount-detail-form-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}#mail-mailAccount .mailAccount-detail-form-container .handle{cursor:move}#mail-mailAccount .mailAccount-detail-form-container md-input-container md-switch{margin:0!important}#mail-mailAccount .mailAccount-detail-form-container #mailAccount-image-uploader{position:relative}#mail-mailAccount .mailAccount-detail-form-container #mailAccount-image-uploader.dropping .drop-text{display:flex}#mail-mailAccount .mailAccount-detail-form-container #mailAccount-image-uploader .drop-text{display:none;position:absolute;top:0;right:0;bottom:0;left:0;padding:16px;text-align:center;border:2px dashed rgba(0,0,0,.12);background:#fff;font-size:20px;z-index:100}#mail-mailAccount .mailAccount-detail-form-container #mailAccount-image-uploader .upload-button{margin-bottom:16px}#mail-mailAccount .mailAccount-detail-form-container #mailAccount-image-uploader .mailAccount-image{position:relative;width:200px;height:200px;border:1px solid rgba(0,0,0,.12);margin:8px}#mail-mailAccount .mailAccount-detail-form-container #mailAccount-image-uploader .mailAccount-image.uploading .overlay{position:absolute;top:0;right:0;bottom:0;left:0;background:rgba(0,0,0,.87)}#mail-mailAccount .mailAccount-detail-form-container #mailAccount-image-uploader .mailAccount-image .media{max-height:100%}#mail-mailAccount md-table-container thead tr th:not(:first-child):not(.no-padding){padding:0 20px 0 0!important}#mail-mailAccount md-table-container thead th.md-checkbox-column:not(.no-padding){padding:0 24px!important}#mail-mailAccount md-table-container tbody tr td:not(:first-child):not(.no-padding):not(.actions-padding){padding:0 20px 0 0!important}#mail-mailAccount md-table-container.font-size-12 td.md-cell{font-size:12px!important}@media screen and (min-width:1921px){#mail-mailAccount .actionAppData{width:800px!important}}@media screen and (max-width:1920px){#mail-mailAccount .actionAppData{width:700px!important}}@media screen and (min-width:1751px) and (max-width:1919px){#mail-mailAccount .actionAppData{width:600px!important}}@media screen and (min-width:1601px) and (max-width:1750px){#mail-mailAccount .actionAppData{width:500px!important}}@media screen and (min-width:1537px) and (max-width:1600px){#mail-mailAccount .actionAppData{width:450px!important}}@media screen and (min-width:1281px) and (max-width:1536px){#mail-mailAccount .actionAppData{width:300px!important}}@media screen and (max-width:1280px){#mail-mailAccount .actionAppData{width:150px!important}}@media screen and (max-width:960px){#mail-mailAccount .actionAppData{width:80px!important}}#mailAccounts{position:relative}#mailAccounts>.header{height:76px;min-height:76px;max-height:76px}#mailAccounts>.header .logo .logo-icon{margin:0 16px 0 0}#mailAccounts>.header .logo .logo-text{font-size:24px}#mailAccounts>.header md-icon{color:#fff}#mailAccounts>.header .search-input-wrapper{position:relative}#mailAccounts>.header .search-input-wrapper label{padding-right:4px;cursor:pointer}#mailAccounts>.header .search-input-wrapper label md-icon{color:rgba(255,255,255,.8)}#mailAccounts>.header .search-input-wrapper md-input-container .md-errors-spacer{display:none}#mailAccounts>.header .search-input-wrapper md-input-container input{border-bottom:1px solid rgba(255,255,255,.8);color:rgba(255,255,255,.8);width:240px}#mailAccounts>.header .search-input-wrapper md-input-container input::placeholder{color:rgba(255,255,255,.8)}#mailAccounts>.header .search-input-wrapper md-input-container input:focus{border-bottom:1px solid #fff;color:#fff}#mailAccounts>.header.selected-bar{position:absolute;top:0;left:0;right:0;z-index:999;background-image:none;opacity:1!important}#mailAccounts>.header.selected-bar .close-button-wrapper{width:244px}#mailAccounts>.content{position:absolute;top:76px;bottom:0;right:0;left:0}#mailAccounts>.content .main{padding:16px 90px 0 4px;position:absolute;top:0;left:24px;right:0;bottom:0}#mailAccounts>.content .main .no-results{box-shadow:0 1px 1px 0 rgba(0,0,0,.14)}#mailAccounts #add-mailAccount-button{position:fixed;bottom:8px;right:8px;padding:0}#mailAccounts #upload-mailAccount-button{position:fixed;bottom:8px;right:8px;padding:0}md-dialog.mailQueue-dialog{max-width:720px;width:720px}md-dialog.mailQueue-dialog md-dialog-content{display:block;position:relative}md-dialog.mailQueue-dialog md-toolbar .title{font-size:17px}md-dialog.mailQueue-dialog md-input-container textarea{min-height:150px}md-dialog.mailQueue-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.mailQueue-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.mailQueue-dialog .date-container{padding:16px 0 24px 0}md-dialog.mailQueue-dialog .error-list{font-size:13px}md-dialog.mailQueue-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.mailQueue-dialog .error-list .error .message{font-weight:500}md-dialog.mailQueue-dialog .error-list .error .md-button{margin:0}md-dialog.mailQueue-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.mailQueue-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}#mail-mailQueue .header{height:76px;min-height:76px;max-height:76px}#mail-mailQueue .header .goto-mailQueues-button{margin-right:16px}#mail-mailQueue .header .mailQueue-image{overflow:hidden;width:56px;height:56px;margin-right:16px;border:3px solid rgba(0,0,0,.12)}#mail-mailQueue .header .mailQueue-image img{height:100%;width:auto;max-width:none}#mail-mailQueue .header .subtitle{margin:6px 0 0 0}#mail-mailQueue .mailQueue-detail-form-container{padding:24px;margin-bottom:24px}#mail-mailQueue .mailQueue-detail-form-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}#mail-mailQueue .mailQueue-detail-form-container .handle{cursor:move}#mail-mailQueue .mailQueue-detail-form-container md-input-container md-switch{margin:0!important}#mail-mailQueue .mailQueue-detail-form-container #mailQueue-image-uploader{position:relative}#mail-mailQueue .mailQueue-detail-form-container #mailQueue-image-uploader.dropping .drop-text{display:flex}#mail-mailQueue .mailQueue-detail-form-container #mailQueue-image-uploader .drop-text{display:none;position:absolute;top:0;right:0;bottom:0;left:0;padding:16px;text-align:center;border:2px dashed rgba(0,0,0,.12);background:#fff;font-size:20px;z-index:100}#mail-mailQueue .mailQueue-detail-form-container #mailQueue-image-uploader .upload-button{margin-bottom:16px}#mail-mailQueue .mailQueue-detail-form-container #mailQueue-image-uploader .mailQueue-image{position:relative;width:200px;height:200px;border:1px solid rgba(0,0,0,.12);margin:8px}#mail-mailQueue .mailQueue-detail-form-container #mailQueue-image-uploader .mailQueue-image.uploading .overlay{position:absolute;top:0;right:0;bottom:0;left:0;background:rgba(0,0,0,.87)}#mail-mailQueue .mailQueue-detail-form-container #mailQueue-image-uploader .mailQueue-image .media{max-height:100%}#mail-mailQueue md-table-container thead tr th:not(:first-child):not(.no-padding){padding:0 20px 0 0!important}#mail-mailQueue md-table-container thead th.md-checkbox-column:not(.no-padding){padding:0 24px!important}#mail-mailQueue md-table-container tbody tr td:not(:first-child):not(.no-padding):not(.actions-padding){padding:0 20px 0 0!important}#mail-mailQueue md-table-container.font-size-12 td.md-cell{font-size:12px!important}#mailQueues{position:relative}#mailQueues>.header{height:76px;min-height:76px;max-height:76px}#mailQueues>.header .logo .logo-icon{margin:0 16px 0 0}#mailQueues>.header .logo .logo-text{font-size:24px}#mailQueues>.header md-icon{color:#fff}#mailQueues>.header .search-input-wrapper{position:relative}#mailQueues>.header .search-input-wrapper label{padding-right:4px;cursor:pointer}#mailQueues>.header .search-input-wrapper label md-icon{color:rgba(255,255,255,.8)}#mailQueues>.header .search-input-wrapper md-input-container .md-errors-spacer{display:none}#mailQueues>.header .search-input-wrapper md-input-container input{border-bottom:1px solid rgba(255,255,255,.8);color:rgba(255,255,255,.8);width:240px}#mailQueues>.header .search-input-wrapper md-input-container input::placeholder{color:rgba(255,255,255,.8)}#mailQueues>.header .search-input-wrapper md-input-container input:focus{border-bottom:1px solid #fff;color:#fff}#mailQueues>.header.selected-bar{position:absolute;top:0;left:0;right:0;z-index:999;background-image:none;opacity:1!important}#mailQueues>.header.selected-bar .close-button-wrapper{width:244px}#mailQueues>.content{position:absolute;top:76px;bottom:0;right:0;left:0}#mailQueues>.content .main{padding:16px 90px 0 4px;position:absolute;top:0;left:24px;right:0;bottom:0}#mailQueues>.content .main .no-results{box-shadow:0 1px 1px 0 rgba(0,0,0,.14)}#mailQueues #add-mailQueue-button{position:fixed;bottom:8px;right:8px;padding:0}#mailQueues #upload-mailQueue-button{position:fixed;bottom:8px;right:8px;padding:0}md-dialog.mailSubstatus-dialog{max-width:720px;width:720px}md-dialog.mailSubstatus-dialog md-dialog-content{display:block;position:relative}md-dialog.mailSubstatus-dialog md-toolbar .title{font-size:17px}md-dialog.mailSubstatus-dialog md-input-container textarea{min-height:150px}md-dialog.mailSubstatus-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.mailSubstatus-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.mailSubstatus-dialog .date-container{padding:16px 0 24px 0}md-dialog.mailSubstatus-dialog .error-list{font-size:13px}md-dialog.mailSubstatus-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.mailSubstatus-dialog .error-list .error .message{font-weight:500}md-dialog.mailSubstatus-dialog .error-list .error .md-button{margin:0}md-dialog.mailSubstatus-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.mailSubstatus-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}#mailSubtatuses{position:relative}#mailSubtatuses>.header{height:76px;min-height:76px;max-height:76px}#mailSubtatuses>.header .logo .logo-icon{margin:0 16px 0 0}#mailSubtatuses>.header .logo .logo-text{font-size:24px}#mailSubtatuses>.header md-icon{color:#fff}#mailSubtatuses>.header .search-input-wrapper{position:relative}#mailSubtatuses>.header .search-input-wrapper label{padding-right:4px;cursor:pointer}#mailSubtatuses>.header .search-input-wrapper label md-icon{color:rgba(255,255,255,.8)}#mailSubtatuses>.header .search-input-wrapper md-input-container .md-errors-spacer{display:none}#mailSubtatuses>.header .search-input-wrapper md-input-container input{border-bottom:1px solid rgba(255,255,255,.8);color:rgba(255,255,255,.8);width:240px}#mailSubtatuses>.header .search-input-wrapper md-input-container input::placeholder{color:rgba(255,255,255,.8)}#mailSubtatuses>.header .search-input-wrapper md-input-container input:focus{border-bottom:1px solid #fff;color:#fff}#mailSubtatuses>.header.selected-bar{position:absolute;top:0;left:0;right:0;z-index:999;background-image:none;opacity:1!important}#mailSubtatuses>.header.selected-bar .close-button-wrapper{width:244px}#mailSubtatuses>.content{position:absolute;top:76px;bottom:0;right:0;left:0}#mailSubtatuses>.content .main{padding:16px 90px 0 4px;position:absolute;top:0;left:24px;right:0;bottom:0}#mailSubtatuses>.content .main .no-results{box-shadow:0 1px 1px 0 rgba(0,0,0,.14)}#mailSubtatuses #add-mailSubstatus-button{position:fixed;bottom:8px;right:8px;padding:0}#mailSubtatuses #upload-mailSubstatus-button{position:fixed;bottom:8px;right:8px;padding:0}#realtime{height:auto}#realtime>.content .blink{animation:blinker 2s linear infinite}#realtime>.content .avatar-wrapper{position:relative}#realtime>.content .avatar-wrapper .status{position:absolute;bottom:-3px;right:5px}#realtime>.content .search-input-wrapper{position:relative;margin-left:20px}#realtime>.content .search-input-wrapper label{padding:6px;cursor:pointer}#realtime>.content .search-input-wrapper md-input-container{padding-top:20px}#realtime>.content .main .labels{padding:8px 16px}#realtime>.content .main .labels .label{margin:0 0 2px 4px;padding:2px 5px;font-size:11px;white-space:nowrap;border-radius:2px}#realtime>.content .main .status{position:absolute;bottom:-3px;right:5px}#realtime>.content .main .avatar-wrapper{position:relative}#realtime>.content .main .avatar-wrapper .status{position:absolute;bottom:-3px;right:5px}#realtime>.content .custom-column{padding:0 24px!important}@keyframes blinker{50%{opacity:0}}md-dialog.plugin-dialog{max-width:720px;width:720px}md-dialog.plugin-dialog md-dialog-content{display:block;position:relative}md-dialog.plugin-dialog md-toolbar .title{font-size:17px}md-dialog.plugin-dialog md-input-container textarea{min-height:150px}md-dialog.plugin-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.plugin-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.plugin-dialog .date-container{padding:16px 0 24px 0}md-dialog.plugin-dialog .error-list{font-size:13px}md-dialog.plugin-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.plugin-dialog .error-list .error .message{font-weight:500}md-dialog.plugin-dialog .error-list .error .md-button{margin:0}md-dialog.plugin-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.plugin-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}#marketplace-plugin .header{height:76px;min-height:76px;max-height:76px}#marketplace-plugin .header .goto-plugins-button{margin-right:16px}#marketplace-plugin .header .plugin-image{overflow:hidden;width:56px;height:56px;margin-right:16px;border:3px solid rgba(0,0,0,.12)}#marketplace-plugin .header .plugin-image img{height:100%;width:auto;max-width:none}#marketplace-plugin .header .subtitle{margin:6px 0 0 0}#marketplace-plugin .plugin-detail-form-container{padding:24px;margin-bottom:24px}#marketplace-plugin .plugin-detail-form-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}#marketplace-plugin .plugin-detail-form-container .handle{cursor:move}#marketplace-plugin .plugin-detail-form-container md-input-container md-switch{margin:0!important}#marketplace-plugin .plugin-detail-form-container #plugin-image-uploader{position:relative}#marketplace-plugin .plugin-detail-form-container #plugin-image-uploader.dropping .drop-text{display:flex}#marketplace-plugin .plugin-detail-form-container #plugin-image-uploader .drop-text{display:none;position:absolute;top:0;right:0;bottom:0;left:0;padding:16px;text-align:center;border:2px dashed rgba(0,0,0,.12);background:#fff;font-size:20px;z-index:100}#marketplace-plugin .plugin-detail-form-container #plugin-image-uploader .upload-button{margin-bottom:16px}#marketplace-plugin .plugin-detail-form-container #plugin-image-uploader .plugin-image{position:relative;width:200px;height:200px;border:1px solid rgba(0,0,0,.12);margin:8px}#marketplace-plugin .plugin-detail-form-container #plugin-image-uploader .plugin-image.uploading .overlay{position:absolute;top:0;right:0;bottom:0;left:0;background:rgba(0,0,0,.87)}#marketplace-plugin .plugin-detail-form-container #plugin-image-uploader .plugin-image .media{max-height:100%}#marketplace-plugin md-table-container thead tr th:not(:first-child):not(.no-padding){padding:0 20px 0 0!important}#marketplace-plugin md-table-container thead th.md-checkbox-column:not(.no-padding){padding:0 24px!important}#marketplace-plugin md-table-container tbody tr td:not(:first-child):not(.no-padding):not(.actions-padding){padding:0 20px 0 0!important}#marketplace-plugin md-table-container.font-size-12 td.md-cell{font-size:12px!important}#plugins{position:relative}#plugins>.header{height:76px;min-height:76px;max-height:76px}#plugins>.header .logo .logo-icon{margin:0 16px 0 0}#plugins>.header .logo .logo-text{font-size:24px}#plugins>.header md-icon{color:#fff}#plugins>.header .search-input-wrapper{position:relative}#plugins>.header .search-input-wrapper label{padding-right:4px;cursor:pointer}#plugins>.header .search-input-wrapper label md-icon{color:rgba(255,255,255,.8)}#plugins>.header .search-input-wrapper md-input-container .md-errors-spacer{display:none}#plugins>.header .search-input-wrapper md-input-container input{border-bottom:1px solid rgba(255,255,255,.8);color:rgba(255,255,255,.8);width:240px}#plugins>.header .search-input-wrapper md-input-container input::placeholder{color:rgba(255,255,255,.8)}#plugins>.header .search-input-wrapper md-input-container input:focus{border-bottom:1px solid #fff;color:#fff}#plugins>.header.selected-bar{position:absolute;top:0;left:0;right:0;z-index:999;background-image:none;opacity:1!important}#plugins>.header.selected-bar .close-button-wrapper{width:244px}#plugins>.content{position:absolute;top:76px;bottom:0;right:0;left:0}#plugins>.content .main{padding:16px 90px 0 4px;position:absolute;top:0;left:24px;right:0;bottom:0}#plugins>.content .main .no-results{box-shadow:0 1px 1px 0 rgba(0,0,0,.14)}#plugins #add-plugin-button{position:fixed;bottom:8px;right:8px;padding:0}#plugins #upload-plugin-button{position:fixed;bottom:8px;right:8px;padding:0}md-dialog.upload-dialog{max-width:720px;width:720px}md-dialog.upload-dialog md-dialog-content{display:block;position:relative}md-dialog.upload-dialog md-toolbar .title{font-size:17px}md-dialog.upload-dialog md-input-container textarea{min-height:150px}md-dialog.upload-dialog md-progress-linear{padding-top:16px!important}md-dialog.upload-dialog .date-container{padding:16px 0 24px 0}md-dialog.upload-dialog .error-list{font-size:13px}md-dialog.upload-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.upload-dialog .error-list .error .message{font-weight:500}md-dialog.upload-dialog .error-list .error .md-button{margin:0}md-dialog.upload-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.upload-dialog .plugin-image{overflow:hidden;max-width:148px;margin-right:16px;border:3px solid rgba(0,0,0,.12);padding:10px}md-dialog.upload-dialog .plugin-image img{width:auto;max-width:none}md-dialog.upload-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.ivrCampaign-dialog{max-width:720px;width:720px}md-dialog.ivrCampaign-dialog md-dialog-content{display:block;position:relative}md-dialog.ivrCampaign-dialog md-toolbar .title{font-size:17px}md-dialog.ivrCampaign-dialog md-input-container textarea{min-height:150px}md-dialog.ivrCampaign-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.ivrCampaign-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.ivrCampaign-dialog .date-container{padding:16px 0 24px 0}md-dialog.ivrCampaign-dialog .error-list{font-size:13px}md-dialog.ivrCampaign-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.ivrCampaign-dialog .error-list .error .message{font-weight:500}md-dialog.ivrCampaign-dialog .error-list .error .md-button{margin:0}md-dialog.ivrCampaign-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.ivrCampaign-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.hopper-dialog{max-width:720px;width:720px}md-dialog.hopper-dialog md-dialog-content{display:block;position:relative}md-dialog.hopper-dialog md-toolbar .title{font-size:17px}md-dialog.hopper-dialog md-input-container textarea{min-height:150px}md-dialog.hopper-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.hopper-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.hopper-dialog .date-container{padding:16px 0 24px 0}md-dialog.hopper-dialog .error-list{font-size:13px}md-dialog.hopper-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.hopper-dialog .error-list .error .message{font-weight:500}md-dialog.hopper-dialog .error-list .error .md-button{margin:0}md-dialog.hopper-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.hopper-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}#motiondialer-ivrCampaign .header{height:76px;min-height:76px;max-height:76px}#motiondialer-ivrCampaign .header .goto-ivrCampaigns-button{margin-right:16px}#motiondialer-ivrCampaign .header .ivrCampaign-image{overflow:hidden;width:56px;height:56px;margin-right:16px;border:3px solid rgba(0,0,0,.12)}#motiondialer-ivrCampaign .header .ivrCampaign-image img{height:100%;width:auto;max-width:none}#motiondialer-ivrCampaign .header .subtitle{margin:6px 0 0 0}#motiondialer-ivrCampaign .ivrCampaign-detail-form-container{padding:24px;margin-bottom:24px}#motiondialer-ivrCampaign .ivrCampaign-detail-form-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}#motiondialer-ivrCampaign .ivrCampaign-detail-form-container .handle{cursor:move}#motiondialer-ivrCampaign .ivrCampaign-detail-form-container md-input-container md-switch{margin:0!important}#motiondialer-ivrCampaign .ivrCampaign-detail-form-container #ivrCampaign-image-uploader{position:relative}#motiondialer-ivrCampaign .ivrCampaign-detail-form-container #ivrCampaign-image-uploader.dropping .drop-text{display:flex}#motiondialer-ivrCampaign .ivrCampaign-detail-form-container #ivrCampaign-image-uploader .drop-text{display:none;position:absolute;top:0;right:0;bottom:0;left:0;padding:16px;text-align:center;border:2px dashed rgba(0,0,0,.12);background:#fff;font-size:20px;z-index:100}#motiondialer-ivrCampaign .ivrCampaign-detail-form-container #ivrCampaign-image-uploader .upload-button{margin-bottom:16px}#motiondialer-ivrCampaign .ivrCampaign-detail-form-container #ivrCampaign-image-uploader .ivrCampaign-image{position:relative;width:200px;height:200px;border:1px solid rgba(0,0,0,.12);margin:8px}#motiondialer-ivrCampaign .ivrCampaign-detail-form-container #ivrCampaign-image-uploader .ivrCampaign-image.uploading .overlay{position:absolute;top:0;right:0;bottom:0;left:0;background:rgba(0,0,0,.87)}#motiondialer-ivrCampaign .ivrCampaign-detail-form-container #ivrCampaign-image-uploader .ivrCampaign-image .media{max-height:100%}#motiondialer-ivrCampaign md-table-container thead tr th:not(:first-child):not(.no-padding){padding:0 20px 0 0!important}#motiondialer-ivrCampaign md-table-container thead th.md-checkbox-column:not(.no-padding){padding:0 24px!important}#motiondialer-ivrCampaign md-table-container tbody tr td:not(:first-child):not(.no-padding):not(.actions-padding){padding:0 20px 0 0!important}#motiondialer-ivrCampaign md-table-container.font-size-12 td.md-cell{font-size:12px!important}#ivrCampaigns{position:relative}#ivrCampaigns>.header{height:76px;min-height:76px;max-height:76px}#ivrCampaigns>.header .logo .logo-icon{margin:0 16px 0 0}#ivrCampaigns>.header .logo .logo-text{font-size:24px}#ivrCampaigns>.header md-icon{color:#fff}#ivrCampaigns>.header .search-input-wrapper{position:relative}#ivrCampaigns>.header .search-input-wrapper label{padding-right:4px;cursor:pointer}#ivrCampaigns>.header .search-input-wrapper label md-icon{color:rgba(255,255,255,.8)}#ivrCampaigns>.header .search-input-wrapper md-input-container .md-errors-spacer{display:none}#ivrCampaigns>.header .search-input-wrapper md-input-container input{border-bottom:1px solid rgba(255,255,255,.8);color:rgba(255,255,255,.8);width:240px}#ivrCampaigns>.header .search-input-wrapper md-input-container input::placeholder{color:rgba(255,255,255,.8)}#ivrCampaigns>.header .search-input-wrapper md-input-container input:focus{border-bottom:1px solid #fff;color:#fff}#ivrCampaigns>.header.selected-bar{position:absolute;top:0;left:0;right:0;z-index:999;background-image:none;opacity:1!important}#ivrCampaigns>.header.selected-bar .close-button-wrapper{width:244px}#ivrCampaigns>.content{position:absolute;top:76px;bottom:0;right:0;left:0}#ivrCampaigns>.content .main{padding:16px 90px 0 4px;position:absolute;top:0;left:24px;right:0;bottom:0}#ivrCampaigns>.content .main .no-results{box-shadow:0 1px 1px 0 rgba(0,0,0,.14)}#ivrCampaigns #add-ivrCampaign-button{position:fixed;bottom:8px;right:8px;padding:0}#ivrCampaigns #upload-ivrCampaign-button{position:fixed;bottom:8px;right:8px;padding:0}md-dialog.queueCampaign-dialog{max-width:720px;width:720px}md-dialog.queueCampaign-dialog md-dialog-content{display:block;position:relative}md-dialog.queueCampaign-dialog md-toolbar .title{font-size:17px}md-dialog.queueCampaign-dialog md-input-container textarea{min-height:150px}md-dialog.queueCampaign-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.queueCampaign-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.queueCampaign-dialog .date-container{padding:16px 0 24px 0}md-dialog.queueCampaign-dialog .error-list{font-size:13px}md-dialog.queueCampaign-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.queueCampaign-dialog .error-list .error .message{font-weight:500}md-dialog.queueCampaign-dialog .error-list .error .md-button{margin:0}md-dialog.queueCampaign-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.queueCampaign-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.hopper-dialog{max-width:720px;width:720px}md-dialog.hopper-dialog md-dialog-content{display:block;position:relative}md-dialog.hopper-dialog md-toolbar .title{font-size:17px}md-dialog.hopper-dialog md-input-container textarea{min-height:150px}md-dialog.hopper-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.hopper-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.hopper-dialog .date-container{padding:16px 0 24px 0}md-dialog.hopper-dialog .error-list{font-size:13px}md-dialog.hopper-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.hopper-dialog .error-list .error .message{font-weight:500}md-dialog.hopper-dialog .error-list .error .md-button{margin:0}md-dialog.hopper-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.hopper-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}#motiondialer-queueCampaign .header{height:76px;min-height:76px;max-height:76px}#motiondialer-queueCampaign .header .goto-queueCampaigns-button{margin-right:16px}#motiondialer-queueCampaign .header .queueCampaign-image{overflow:hidden;width:56px;height:56px;margin-right:16px;border:3px solid rgba(0,0,0,.12)}#motiondialer-queueCampaign .header .queueCampaign-image img{height:100%;width:auto;max-width:none}#motiondialer-queueCampaign .header .subtitle{margin:6px 0 0 0}#motiondialer-queueCampaign .queueCampaign-detail-form-container{padding:24px;margin-bottom:24px}#motiondialer-queueCampaign .queueCampaign-detail-form-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}#motiondialer-queueCampaign .queueCampaign-detail-form-container .handle{cursor:move}#motiondialer-queueCampaign .queueCampaign-detail-form-container md-input-container md-switch{margin:0!important}#motiondialer-queueCampaign .queueCampaign-detail-form-container #queueCampaign-image-uploader{position:relative}#motiondialer-queueCampaign .queueCampaign-detail-form-container #queueCampaign-image-uploader.dropping .drop-text{display:flex}#motiondialer-queueCampaign .queueCampaign-detail-form-container #queueCampaign-image-uploader .drop-text{display:none;position:absolute;top:0;right:0;bottom:0;left:0;padding:16px;text-align:center;border:2px dashed rgba(0,0,0,.12);background:#fff;font-size:20px;z-index:100}#motiondialer-queueCampaign .queueCampaign-detail-form-container #queueCampaign-image-uploader .upload-button{margin-bottom:16px}#motiondialer-queueCampaign .queueCampaign-detail-form-container #queueCampaign-image-uploader .queueCampaign-image{position:relative;width:200px;height:200px;border:1px solid rgba(0,0,0,.12);margin:8px}#motiondialer-queueCampaign .queueCampaign-detail-form-container #queueCampaign-image-uploader .queueCampaign-image.uploading .overlay{position:absolute;top:0;right:0;bottom:0;left:0;background:rgba(0,0,0,.87)}#motiondialer-queueCampaign .queueCampaign-detail-form-container #queueCampaign-image-uploader .queueCampaign-image .media{max-height:100%}#motiondialer-queueCampaign md-table-container thead tr th:not(:first-child):not(.no-padding){padding:0 20px 0 0!important}#motiondialer-queueCampaign md-table-container thead th.md-checkbox-column:not(.no-padding){padding:0 24px!important}#motiondialer-queueCampaign md-table-container tbody tr td:not(:first-child):not(.no-padding):not(.actions-padding){padding:0 20px 0 0!important}#motiondialer-queueCampaign md-table-container.font-size-12 td.md-cell{font-size:12px!important}#queueCampaigns{position:relative}#queueCampaigns>.header{height:76px;min-height:76px;max-height:76px}#queueCampaigns>.header .logo .logo-icon{margin:0 16px 0 0}#queueCampaigns>.header .logo .logo-text{font-size:24px}#queueCampaigns>.header md-icon{color:#fff}#queueCampaigns>.header .search-input-wrapper{position:relative}#queueCampaigns>.header .search-input-wrapper label{padding-right:4px;cursor:pointer}#queueCampaigns>.header .search-input-wrapper label md-icon{color:rgba(255,255,255,.8)}#queueCampaigns>.header .search-input-wrapper md-input-container .md-errors-spacer{display:none}#queueCampaigns>.header .search-input-wrapper md-input-container input{border-bottom:1px solid rgba(255,255,255,.8);color:rgba(255,255,255,.8);width:240px}#queueCampaigns>.header .search-input-wrapper md-input-container input::placeholder{color:rgba(255,255,255,.8)}#queueCampaigns>.header .search-input-wrapper md-input-container input:focus{border-bottom:1px solid #fff;color:#fff}#queueCampaigns>.header.selected-bar{position:absolute;top:0;left:0;right:0;z-index:999;background-image:none;opacity:1!important}#queueCampaigns>.header.selected-bar .close-button-wrapper{width:244px}#queueCampaigns>.content{position:absolute;top:76px;bottom:0;right:0;left:0}#queueCampaigns>.content .main{padding:16px 90px 0 4px;position:absolute;top:0;left:24px;right:0;bottom:0}#queueCampaigns>.content .main .no-results{box-shadow:0 1px 1px 0 rgba(0,0,0,.14)}#queueCampaigns #add-queueCampaign-button{position:fixed;bottom:8px;right:8px;padding:0}#queueCampaigns #upload-queueCampaign-button{position:fixed;bottom:8px;right:8px;padding:0}#realtime{height:auto}#realtime>.content .blink{animation:blinker 2s linear infinite}#realtime>.content .avatar-wrapper{position:relative}#realtime>.content .avatar-wrapper .status{position:absolute;bottom:-3px;right:5px}#realtime>.content .search-input-wrapper{position:relative;margin-left:20px}#realtime>.content .search-input-wrapper label{padding:6px;cursor:pointer}#realtime>.content .search-input-wrapper md-input-container{padding-top:20px}#realtime>.content .main .labels{padding:8px 16px}#realtime>.content .main .labels .label{margin:0 0 2px 4px;padding:2px 5px;font-size:11px;white-space:nowrap;border-radius:2px}#realtime>.content .main .status{position:absolute;bottom:-3px;right:5px}#realtime>.content .main .avatar-wrapper{position:relative}#realtime>.content .main .avatar-wrapper .status{position:absolute;bottom:-3px;right:5px}#realtime>.content .custom-column{padding:0 24px!important}@keyframes blinker{50%{opacity:0}}md-dialog.openchannelAccount-dialog{max-width:720px;width:720px}md-dialog.openchannelAccount-dialog md-dialog-content{display:block;position:relative}md-dialog.openchannelAccount-dialog md-toolbar .title{font-size:17px}md-dialog.openchannelAccount-dialog md-input-container textarea{min-height:150px}md-dialog.openchannelAccount-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.openchannelAccount-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.openchannelAccount-dialog .date-container{padding:16px 0 24px 0}md-dialog.openchannelAccount-dialog .error-list{font-size:13px}md-dialog.openchannelAccount-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.openchannelAccount-dialog .error-list .error .message{font-weight:500}md-dialog.openchannelAccount-dialog .error-list .error .md-button{margin:0}md-dialog.openchannelAccount-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.openchannelAccount-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.openchannelAccount-dialog{max-width:720px;width:720px}md-dialog.openchannelAccount-dialog md-dialog-content{display:block;position:relative}md-dialog.openchannelAccount-dialog md-toolbar .title{font-size:17px}md-dialog.openchannelAccount-dialog md-input-container textarea{min-height:150px}md-dialog.openchannelAccount-dialog .date-container{padding:16px 0 24px 0}md-dialog.openchannelAccount-dialog .error-list{font-size:13px}md-dialog.openchannelAccount-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.openchannelAccount-dialog .error-list .error .message{font-weight:500}md-dialog.openchannelAccount-dialog .error-list .error .md-button{margin:0}md-dialog.openchannelAccount-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.openchannelAccount-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.openchannelAccount-dialog{max-width:720px;width:720px}md-dialog.openchannelAccount-dialog md-dialog-content{display:block;position:relative}md-dialog.openchannelAccount-dialog md-toolbar .title{font-size:17px}md-dialog.openchannelAccount-dialog md-input-container textarea{min-height:150px}md-dialog.openchannelAccount-dialog .date-container{padding:16px 0 24px 0}md-dialog.openchannelAccount-dialog .error-list{font-size:13px}md-dialog.openchannelAccount-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.openchannelAccount-dialog .error-list .error .message{font-weight:500}md-dialog.openchannelAccount-dialog .error-list .error .md-button{margin:0}md-dialog.openchannelAccount-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.openchannelAccount-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.openchannelAccount-dialog{max-width:720px;width:720px}md-dialog.openchannelAccount-dialog md-dialog-content{display:block;position:relative}md-dialog.openchannelAccount-dialog md-toolbar .title{font-size:17px}md-dialog.openchannelAccount-dialog md-input-container textarea{min-height:150px}md-dialog.openchannelAccount-dialog .date-container{padding:16px 0 24px 0}md-dialog.openchannelAccount-dialog .error-list{font-size:13px}md-dialog.openchannelAccount-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.openchannelAccount-dialog .error-list .error .message{font-weight:500}md-dialog.openchannelAccount-dialog .error-list .error .md-button{margin:0}md-dialog.openchannelAccount-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.openchannelAccount-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.openchannelAccount-dialog{max-width:720px;width:720px}md-dialog.openchannelAccount-dialog md-dialog-content{display:block;position:relative}md-dialog.openchannelAccount-dialog md-toolbar .title{font-size:17px}md-dialog.openchannelAccount-dialog md-input-container textarea{min-height:150px}md-dialog.openchannelAccount-dialog .date-container{padding:16px 0 24px 0}md-dialog.openchannelAccount-dialog .error-list{font-size:13px}md-dialog.openchannelAccount-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.openchannelAccount-dialog .error-list .error .message{font-weight:500}md-dialog.openchannelAccount-dialog .error-list .error .md-button{margin:0}md-dialog.openchannelAccount-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.openchannelAccount-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.openchannelAccount-dialog{max-width:720px;width:720px}md-dialog.openchannelAccount-dialog md-dialog-content{display:block;position:relative}md-dialog.openchannelAccount-dialog md-toolbar .title{font-size:17px}md-dialog.openchannelAccount-dialog md-input-container textarea{min-height:150px}md-dialog.openchannelAccount-dialog .date-container{padding:16px 0 24px 0}md-dialog.openchannelAccount-dialog .error-list{font-size:13px}md-dialog.openchannelAccount-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.openchannelAccount-dialog .error-list .error .message{font-weight:500}md-dialog.openchannelAccount-dialog .error-list .error .md-button{margin:0}md-dialog.openchannelAccount-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.openchannelAccount-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.openchannelAccount-dialog{max-width:720px;width:720px}md-dialog.openchannelAccount-dialog md-dialog-content{display:block;position:relative}md-dialog.openchannelAccount-dialog md-toolbar .title{font-size:17px}md-dialog.openchannelAccount-dialog md-input-container textarea{min-height:150px}md-dialog.openchannelAccount-dialog .date-container{padding:16px 0 24px 0}md-dialog.openchannelAccount-dialog .error-list{font-size:13px}md-dialog.openchannelAccount-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.openchannelAccount-dialog .error-list .error .message{font-weight:500}md-dialog.openchannelAccount-dialog .error-list .error .md-button{margin:0}md-dialog.openchannelAccount-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.openchannelAccount-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.openchannelAccount-dialog{max-width:720px;width:720px}md-dialog.openchannelAccount-dialog md-dialog-content{display:block;position:relative}md-dialog.openchannelAccount-dialog md-toolbar .title{font-size:17px}md-dialog.openchannelAccount-dialog md-input-container textarea{min-height:150px}md-dialog.openchannelAccount-dialog .date-container{padding:16px 0 24px 0}md-dialog.openchannelAccount-dialog .error-list{font-size:13px}md-dialog.openchannelAccount-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.openchannelAccount-dialog .error-list .error .message{font-weight:500}md-dialog.openchannelAccount-dialog .error-list .error .md-button{margin:0}md-dialog.openchannelAccount-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.openchannelAccount-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.openchannelAccount-dialog{max-width:720px;width:720px}md-dialog.openchannelAccount-dialog md-dialog-content{display:block;position:relative}md-dialog.openchannelAccount-dialog md-toolbar .title{font-size:17px}md-dialog.openchannelAccount-dialog md-input-container textarea{min-height:150px}md-dialog.openchannelAccount-dialog .date-container{padding:16px 0 24px 0}md-dialog.openchannelAccount-dialog .error-list{font-size:13px}md-dialog.openchannelAccount-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.openchannelAccount-dialog .error-list .error .message{font-weight:500}md-dialog.openchannelAccount-dialog .error-list .error .md-button{margin:0}md-dialog.openchannelAccount-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.openchannelAccount-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.openchannelAccount-dialog{max-width:720px;width:720px}md-dialog.openchannelAccount-dialog md-dialog-content{display:block;position:relative}md-dialog.openchannelAccount-dialog md-toolbar .title{font-size:17px}md-dialog.openchannelAccount-dialog md-input-container textarea{min-height:150px}md-dialog.openchannelAccount-dialog .date-container{padding:16px 0 24px 0}md-dialog.openchannelAccount-dialog .error-list{font-size:13px}md-dialog.openchannelAccount-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.openchannelAccount-dialog .error-list .error .message{font-weight:500}md-dialog.openchannelAccount-dialog .error-list .error .md-button{margin:0}md-dialog.openchannelAccount-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.openchannelAccount-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.openchannelAccount-dialog{max-width:720px;width:720px}md-dialog.openchannelAccount-dialog md-dialog-content{display:block;position:relative}md-dialog.openchannelAccount-dialog md-toolbar .title{font-size:17px}md-dialog.openchannelAccount-dialog md-input-container textarea{min-height:150px}md-dialog.openchannelAccount-dialog .date-container{padding:16px 0 24px 0}md-dialog.openchannelAccount-dialog .error-list{font-size:13px}md-dialog.openchannelAccount-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.openchannelAccount-dialog .error-list .error .message{font-weight:500}md-dialog.openchannelAccount-dialog .error-list .error .md-button{margin:0}md-dialog.openchannelAccount-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.openchannelAccount-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.openchannelAccount-dialog{max-width:720px;width:720px}md-dialog.openchannelAccount-dialog md-dialog-content{display:block;position:relative}md-dialog.openchannelAccount-dialog md-toolbar .title{font-size:17px}md-dialog.openchannelAccount-dialog md-input-container textarea{min-height:150px}md-dialog.openchannelAccount-dialog .date-container{padding:16px 0 24px 0}md-dialog.openchannelAccount-dialog .error-list{font-size:13px}md-dialog.openchannelAccount-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.openchannelAccount-dialog .error-list .error .message{font-weight:500}md-dialog.openchannelAccount-dialog .error-list .error .md-button{margin:0}md-dialog.openchannelAccount-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.openchannelAccount-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.openchannelAccount-dialog{max-width:720px;width:720px}md-dialog.openchannelAccount-dialog md-dialog-content{display:block;position:relative}md-dialog.openchannelAccount-dialog md-toolbar .title{font-size:17px}md-dialog.openchannelAccount-dialog md-input-container textarea{min-height:150px}md-dialog.openchannelAccount-dialog .date-container{padding:16px 0 24px 0}md-dialog.openchannelAccount-dialog .error-list{font-size:13px}md-dialog.openchannelAccount-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.openchannelAccount-dialog .error-list .error .message{font-weight:500}md-dialog.openchannelAccount-dialog .error-list .error .md-button{margin:0}md-dialog.openchannelAccount-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.openchannelAccount-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.openchannelAccount-dialog{max-width:720px;width:720px}md-dialog.openchannelAccount-dialog md-dialog-content{display:block;position:relative}md-dialog.openchannelAccount-dialog md-toolbar .title{font-size:17px}md-dialog.openchannelAccount-dialog md-input-container textarea{min-height:150px}md-dialog.openchannelAccount-dialog .date-container{padding:16px 0 24px 0}md-dialog.openchannelAccount-dialog .error-list{font-size:13px}md-dialog.openchannelAccount-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.openchannelAccount-dialog .error-list .error .message{font-weight:500}md-dialog.openchannelAccount-dialog .error-list .error .md-button{margin:0}md-dialog.openchannelAccount-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.openchannelAccount-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.openchannelCannedAnswer-dialog{max-width:720px;width:720px}md-dialog.openchannelCannedAnswer-dialog md-dialog-content{display:block;position:relative}md-dialog.openchannelCannedAnswer-dialog md-toolbar .title{font-size:17px}md-dialog.openchannelCannedAnswer-dialog md-input-container textarea{min-height:150px}md-dialog.openchannelCannedAnswer-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.openchannelCannedAnswer-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.openchannelCannedAnswer-dialog .date-container{padding:16px 0 24px 0}md-dialog.openchannelCannedAnswer-dialog .error-list{font-size:13px}md-dialog.openchannelCannedAnswer-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.openchannelCannedAnswer-dialog .error-list .error .message{font-weight:500}md-dialog.openchannelCannedAnswer-dialog .error-list .error .md-button{margin:0}md-dialog.openchannelCannedAnswer-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.openchannelCannedAnswer-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}#openchannel-openchannelAccount .header{height:76px;min-height:76px;max-height:76px}#openchannel-openchannelAccount .header .goto-openchannelAccounts-button{margin-right:16px}#openchannel-openchannelAccount .header .openchannelAccount-image{overflow:hidden;width:56px;height:56px;margin-right:16px;border:3px solid rgba(0,0,0,.12)}#openchannel-openchannelAccount .header .openchannelAccount-image img{height:100%;width:auto;max-width:none}#openchannel-openchannelAccount .header .subtitle{margin:6px 0 0 0}#openchannel-openchannelAccount .openchannelAccount-detail-form-container{padding:24px;margin-bottom:24px}#openchannel-openchannelAccount .openchannelAccount-detail-form-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}#openchannel-openchannelAccount .openchannelAccount-detail-form-container .handle{cursor:move}#openchannel-openchannelAccount .openchannelAccount-detail-form-container md-input-container md-switch{margin:0!important}#openchannel-openchannelAccount .openchannelAccount-detail-form-container #openchannelAccount-image-uploader{position:relative}#openchannel-openchannelAccount .openchannelAccount-detail-form-container #openchannelAccount-image-uploader.dropping .drop-text{display:flex}#openchannel-openchannelAccount .openchannelAccount-detail-form-container #openchannelAccount-image-uploader .drop-text{display:none;position:absolute;top:0;right:0;bottom:0;left:0;padding:16px;text-align:center;border:2px dashed rgba(0,0,0,.12);background:#fff;font-size:20px;z-index:100}#openchannel-openchannelAccount .openchannelAccount-detail-form-container #openchannelAccount-image-uploader .upload-button{margin-bottom:16px}#openchannel-openchannelAccount .openchannelAccount-detail-form-container #openchannelAccount-image-uploader .openchannelAccount-image{position:relative;width:200px;height:200px;border:1px solid rgba(0,0,0,.12);margin:8px}#openchannel-openchannelAccount .openchannelAccount-detail-form-container #openchannelAccount-image-uploader .openchannelAccount-image.uploading .overlay{position:absolute;top:0;right:0;bottom:0;left:0;background:rgba(0,0,0,.87)}#openchannel-openchannelAccount .openchannelAccount-detail-form-container #openchannelAccount-image-uploader .openchannelAccount-image .media{max-height:100%}#openchannel-openchannelAccount md-table-container thead tr th:not(:first-child):not(.no-padding){padding:0 20px 0 0!important}#openchannel-openchannelAccount md-table-container thead th.md-checkbox-column:not(.no-padding){padding:0 24px!important}#openchannel-openchannelAccount md-table-container tbody tr td:not(:first-child):not(.no-padding):not(.actions-padding){padding:0 20px 0 0!important}#openchannel-openchannelAccount md-table-container.font-size-12 td.md-cell{font-size:12px!important}@media screen and (min-width:1921px){#openchannel-openchannelAccount .actionAppData{width:800px!important}}@media screen and (max-width:1920px){#openchannel-openchannelAccount .actionAppData{width:700px!important}}@media screen and (min-width:1751px) and (max-width:1919px){#openchannel-openchannelAccount .actionAppData{width:600px!important}}@media screen and (min-width:1601px) and (max-width:1750px){#openchannel-openchannelAccount .actionAppData{width:500px!important}}@media screen and (min-width:1537px) and (max-width:1600px){#openchannel-openchannelAccount .actionAppData{width:450px!important}}@media screen and (min-width:1281px) and (max-width:1536px){#openchannel-openchannelAccount .actionAppData{width:300px!important}}@media screen and (max-width:1280px){#openchannel-openchannelAccount .actionAppData{width:150px!important}}@media screen and (max-width:960px){#openchannel-openchannelAccount .actionAppData{width:80px!important}}#openchannelAccounts{position:relative}#openchannelAccounts>.header{height:76px;min-height:76px;max-height:76px}#openchannelAccounts>.header .logo .logo-icon{margin:0 16px 0 0}#openchannelAccounts>.header .logo .logo-text{font-size:24px}#openchannelAccounts>.header md-icon{color:#fff}#openchannelAccounts>.header .search-input-wrapper{position:relative}#openchannelAccounts>.header .search-input-wrapper label{padding-right:4px;cursor:pointer}#openchannelAccounts>.header .search-input-wrapper label md-icon{color:rgba(255,255,255,.8)}#openchannelAccounts>.header .search-input-wrapper md-input-container .md-errors-spacer{display:none}#openchannelAccounts>.header .search-input-wrapper md-input-container input{border-bottom:1px solid rgba(255,255,255,.8);color:rgba(255,255,255,.8);width:240px}#openchannelAccounts>.header .search-input-wrapper md-input-container input::placeholder{color:rgba(255,255,255,.8)}#openchannelAccounts>.header .search-input-wrapper md-input-container input:focus{border-bottom:1px solid #fff;color:#fff}#openchannelAccounts>.header.selected-bar{position:absolute;top:0;left:0;right:0;z-index:999;background-image:none;opacity:1!important}#openchannelAccounts>.header.selected-bar .close-button-wrapper{width:244px}#openchannelAccounts>.content{position:absolute;top:76px;bottom:0;right:0;left:0}#openchannelAccounts>.content .main{padding:16px 90px 0 4px;position:absolute;top:0;left:24px;right:0;bottom:0}#openchannelAccounts>.content .main .no-results{box-shadow:0 1px 1px 0 rgba(0,0,0,.14)}#openchannelAccounts #add-openchannelAccount-button{position:fixed;bottom:8px;right:8px;padding:0}#openchannelAccounts #upload-openchannelAccount-button{position:fixed;bottom:8px;right:8px;padding:0}md-dialog.openchannelQueue-dialog{max-width:720px;width:720px}md-dialog.openchannelQueue-dialog md-dialog-content{display:block;position:relative}md-dialog.openchannelQueue-dialog md-toolbar .title{font-size:17px}md-dialog.openchannelQueue-dialog md-input-container textarea{min-height:150px}md-dialog.openchannelQueue-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.openchannelQueue-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.openchannelQueue-dialog .date-container{padding:16px 0 24px 0}md-dialog.openchannelQueue-dialog .error-list{font-size:13px}md-dialog.openchannelQueue-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.openchannelQueue-dialog .error-list .error .message{font-weight:500}md-dialog.openchannelQueue-dialog .error-list .error .md-button{margin:0}md-dialog.openchannelQueue-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.openchannelQueue-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}#openchannel-openchannelQueue .header{height:76px;min-height:76px;max-height:76px}#openchannel-openchannelQueue .header .goto-openchannelQueues-button{margin-right:16px}#openchannel-openchannelQueue .header .openchannelQueue-image{overflow:hidden;width:56px;height:56px;margin-right:16px;border:3px solid rgba(0,0,0,.12)}#openchannel-openchannelQueue .header .openchannelQueue-image img{height:100%;width:auto;max-width:none}#openchannel-openchannelQueue .header .subtitle{margin:6px 0 0 0}#openchannel-openchannelQueue .openchannelQueue-detail-form-container{padding:24px;margin-bottom:24px}#openchannel-openchannelQueue .openchannelQueue-detail-form-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}#openchannel-openchannelQueue .openchannelQueue-detail-form-container .handle{cursor:move}#openchannel-openchannelQueue .openchannelQueue-detail-form-container md-input-container md-switch{margin:0!important}#openchannel-openchannelQueue .openchannelQueue-detail-form-container #openchannelQueue-image-uploader{position:relative}#openchannel-openchannelQueue .openchannelQueue-detail-form-container #openchannelQueue-image-uploader.dropping .drop-text{display:flex}#openchannel-openchannelQueue .openchannelQueue-detail-form-container #openchannelQueue-image-uploader .drop-text{display:none;position:absolute;top:0;right:0;bottom:0;left:0;padding:16px;text-align:center;border:2px dashed rgba(0,0,0,.12);background:#fff;font-size:20px;z-index:100}#openchannel-openchannelQueue .openchannelQueue-detail-form-container #openchannelQueue-image-uploader .upload-button{margin-bottom:16px}#openchannel-openchannelQueue .openchannelQueue-detail-form-container #openchannelQueue-image-uploader .openchannelQueue-image{position:relative;width:200px;height:200px;border:1px solid rgba(0,0,0,.12);margin:8px}#openchannel-openchannelQueue .openchannelQueue-detail-form-container #openchannelQueue-image-uploader .openchannelQueue-image.uploading .overlay{position:absolute;top:0;right:0;bottom:0;left:0;background:rgba(0,0,0,.87)}#openchannel-openchannelQueue .openchannelQueue-detail-form-container #openchannelQueue-image-uploader .openchannelQueue-image .media{max-height:100%}#openchannel-openchannelQueue md-table-container thead tr th:not(:first-child):not(.no-padding){padding:0 20px 0 0!important}#openchannel-openchannelQueue md-table-container thead th.md-checkbox-column:not(.no-padding){padding:0 24px!important}#openchannel-openchannelQueue md-table-container tbody tr td:not(:first-child):not(.no-padding):not(.actions-padding){padding:0 20px 0 0!important}#openchannel-openchannelQueue md-table-container.font-size-12 td.md-cell{font-size:12px!important}#openchannelQueues{position:relative}#openchannelQueues>.header{height:76px;min-height:76px;max-height:76px}#openchannelQueues>.header .logo .logo-icon{margin:0 16px 0 0}#openchannelQueues>.header .logo .logo-text{font-size:24px}#openchannelQueues>.header md-icon{color:#fff}#openchannelQueues>.header .search-input-wrapper{position:relative}#openchannelQueues>.header .search-input-wrapper label{padding-right:4px;cursor:pointer}#openchannelQueues>.header .search-input-wrapper label md-icon{color:rgba(255,255,255,.8)}#openchannelQueues>.header .search-input-wrapper md-input-container .md-errors-spacer{display:none}#openchannelQueues>.header .search-input-wrapper md-input-container input{border-bottom:1px solid rgba(255,255,255,.8);color:rgba(255,255,255,.8);width:240px}#openchannelQueues>.header .search-input-wrapper md-input-container input::placeholder{color:rgba(255,255,255,.8)}#openchannelQueues>.header .search-input-wrapper md-input-container input:focus{border-bottom:1px solid #fff;color:#fff}#openchannelQueues>.header.selected-bar{position:absolute;top:0;left:0;right:0;z-index:999;background-image:none;opacity:1!important}#openchannelQueues>.header.selected-bar .close-button-wrapper{width:244px}#openchannelQueues>.content{position:absolute;top:76px;bottom:0;right:0;left:0}#openchannelQueues>.content .main{padding:16px 90px 0 4px;position:absolute;top:0;left:24px;right:0;bottom:0}#openchannelQueues>.content .main .no-results{box-shadow:0 1px 1px 0 rgba(0,0,0,.14)}#openchannelQueues #add-openchannelQueue-button{position:fixed;bottom:8px;right:8px;padding:0}#openchannelQueues #upload-openchannelQueue-button{position:fixed;bottom:8px;right:8px;padding:0}#realtime{height:auto}#realtime>.content .blink{animation:blinker 2s linear infinite}#realtime>.content .avatar-wrapper{position:relative}#realtime>.content .avatar-wrapper .status{position:absolute;bottom:-3px;right:5px}#realtime>.content .search-input-wrapper{position:relative;margin-left:20px}#realtime>.content .search-input-wrapper label{padding:6px;cursor:pointer}#realtime>.content .search-input-wrapper md-input-container{padding-top:20px}#realtime>.content .main .labels{padding:8px 16px}#realtime>.content .main .labels .label{margin:0 0 2px 4px;padding:2px 5px;font-size:11px;white-space:nowrap;border-radius:2px}#realtime>.content .main .status{position:absolute;bottom:-3px;right:5px}#realtime>.content .main .avatar-wrapper{position:relative}#realtime>.content .main .avatar-wrapper .status{position:absolute;bottom:-3px;right:5px}#realtime>.content .custom-column{padding:0 24px!important}@keyframes blinker{50%{opacity:0}}#plugin .filter-header{background-image:url(/assets/images/backgrounds/header-bg.png);color:#fff}md-dialog.predictive-dialog{max-width:720px;width:720px}md-dialog.predictive-dialog md-dialog-content{display:block;position:relative}md-dialog.predictive-dialog md-toolbar .title{font-size:17px}md-dialog.predictive-dialog md-input-container textarea{min-height:150px}md-dialog.predictive-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.predictive-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.predictive-dialog .date-container{padding:16px 0 24px 0}md-dialog.predictive-dialog .error-list{font-size:13px}md-dialog.predictive-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.predictive-dialog .error-list .error .message{font-weight:500}md-dialog.predictive-dialog .error-list .error .md-button{margin:0}md-dialog.predictive-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.predictive-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}#cloudProviders{position:relative}#cloudProviders>.header{height:76px;min-height:76px;max-height:76px}#cloudProviders>.header .logo .logo-icon{margin:0 16px 0 0}#cloudProviders>.header .logo .logo-text{font-size:24px}#cloudProviders>.header md-icon{color:#fff}#cloudProviders>.header .search-input-wrapper{position:relative}#cloudProviders>.header .search-input-wrapper label{padding-right:4px;cursor:pointer}#cloudProviders>.header .search-input-wrapper label md-icon{color:rgba(255,255,255,.8)}#cloudProviders>.header .search-input-wrapper md-input-container .md-errors-spacer{display:none}#cloudProviders>.header .search-input-wrapper md-input-container input{border-bottom:1px solid rgba(255,255,255,.8);color:rgba(255,255,255,.8);width:240px}#cloudProviders>.header .search-input-wrapper md-input-container input::placeholder{color:rgba(255,255,255,.8)}#cloudProviders>.header .search-input-wrapper md-input-container input:focus{border-bottom:1px solid #fff;color:#fff}#cloudProviders>.header.selected-bar{position:absolute;top:0;left:0;right:0;z-index:999;background-image:none;opacity:1!important}#cloudProviders>.header.selected-bar .close-button-wrapper{width:244px}#cloudProviders>.content{position:absolute;top:76px;bottom:0;right:0;left:0}#cloudProviders>.content .main{padding:16px 90px 0 4px;position:absolute;top:0;left:24px;right:0;bottom:0}#cloudProviders>.content .main .no-results{box-shadow:0 1px 1px 0 rgba(0,0,0,.14)}#cloudProviders #add-cloudProvider-button{position:fixed;bottom:8px;right:8px;padding:0}#cloudProviders #upload-cloudProvider-button{position:fixed;bottom:8px;right:8px;padding:0}md-dialog.cloudProvider-dialog{max-width:720px;width:720px}md-dialog.cloudProvider-dialog md-dialog-content{display:block;position:relative}md-dialog.cloudProvider-dialog md-toolbar .title{font-size:17px}md-dialog.cloudProvider-dialog md-input-container textarea{min-height:150px}md-dialog.cloudProvider-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.cloudProvider-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.cloudProvider-dialog .date-container{padding:16px 0 24px 0}md-dialog.cloudProvider-dialog .error-list{font-size:13px}md-dialog.cloudProvider-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.cloudProvider-dialog .error-list .error .message{font-weight:500}md-dialog.cloudProvider-dialog .error-list .error .md-button{margin:0}md-dialog.cloudProvider-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.cloudProvider-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.customization-dialog{max-width:720px;width:720px}md-dialog.customization-dialog md-dialog-content{display:block;position:relative}md-dialog.customization-dialog md-toolbar .title{font-size:17px}md-dialog.customization-dialog md-input-container textarea{min-height:150px}md-dialog.customization-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.customization-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.customization-dialog .date-container{padding:16px 0 24px 0}md-dialog.customization-dialog .error-list{font-size:13px}md-dialog.customization-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.customization-dialog .error-list .error .message{font-weight:500}md-dialog.customization-dialog .error-list .error .md-button{margin:0}md-dialog.customization-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.customization-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}#customizations{position:relative}#customizations>.header{height:76px;min-height:76px;max-height:76px}#customizations>.header .logo .logo-icon{margin:0 16px 0 0}#customizations>.header .logo .logo-text{font-size:24px}#customizations>.header md-icon{color:#fff}#customizations>.header .search-input-wrapper{position:relative}#customizations>.header .search-input-wrapper label{padding-right:4px;cursor:pointer}#customizations>.header .search-input-wrapper label md-icon{color:rgba(255,255,255,.8)}#customizations>.header .search-input-wrapper md-input-container .md-errors-spacer{display:none}#customizations>.header .search-input-wrapper md-input-container input{border-bottom:1px solid rgba(255,255,255,.8);color:rgba(255,255,255,.8);width:240px}#customizations>.header .search-input-wrapper md-input-container input::placeholder{color:rgba(255,255,255,.8)}#customizations>.header .search-input-wrapper md-input-container input:focus{border-bottom:1px solid #fff;color:#fff}#customizations>.header.selected-bar{position:absolute;top:0;left:0;right:0;z-index:999;background-image:none;opacity:1!important}#customizations>.header.selected-bar .close-button-wrapper{width:244px}#customizations>.content{position:absolute;top:76px;bottom:0;right:0;left:0}#customizations>.content .main{padding:16px 90px 0 4px;position:absolute;top:0;left:24px;right:0;bottom:0}#customizations>.content .main .no-results{box-shadow:0 1px 1px 0 rgba(0,0,0,.14)}#customizations>.content .customization-detail-form-container{padding:24px;margin-bottom:24px}#customizations>.content .customization-detail-form-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}#customizations>.content .customization-detail-form-container .handle{cursor:move}#customizations>.content .customization-detail-form-container md-input-container md-switch{margin:0!important}#customizations>.content .customization-detail-form-container #customization-image-uploader{position:relative}#customizations>.content .customization-detail-form-container #customization-image-uploader.dropping .drop-text{display:flex}#customizations>.content .customization-detail-form-container #customization-image-uploader .drop-text{display:none;position:absolute;top:0;right:0;bottom:0;left:0;padding:16px;text-align:center;border:2px dashed rgba(0,0,0,.12);background:#fff;font-size:20px;z-index:100}#customizations>.content .customization-detail-form-container #customization-image-uploader .upload-button{margin-bottom:16px}#customizations>.content .customization-detail-form-container #customization-image-uploader .customization-image{position:relative;width:200px;height:200px;border:1px solid rgba(0,0,0,.12);margin:8px}#customizations>.content .customization-detail-form-container #customization-image-uploader .customization-image.uploading .overlay{position:absolute;top:0;right:0;bottom:0;left:0;background:rgba(0,0,0,.87)}#customizations>.content .customization-detail-form-container #customization-image-uploader .customization-image .media{max-height:100%}#customizations #add-customization-button{position:fixed;bottom:8px;right:8px;padding:0}md-dialog.general-dialog{max-width:720px;width:720px}md-dialog.general-dialog md-dialog-content{display:block;position:relative}md-dialog.general-dialog md-toolbar .title{font-size:17px}md-dialog.general-dialog md-input-container textarea{min-height:150px}md-dialog.general-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.general-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.general-dialog .date-container{padding:16px 0 24px 0}md-dialog.general-dialog .error-list{font-size:13px}md-dialog.general-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.general-dialog .error-list .error .message{font-weight:500}md-dialog.general-dialog .error-list .error .md-button{margin:0}md-dialog.general-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.general-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}#generals{position:relative}#generals>.header{height:76px;min-height:76px;max-height:76px}#generals>.header .logo .logo-icon{margin:0 16px 0 0}#generals>.header .logo .logo-text{font-size:24px}#generals>.header md-icon{color:#fff}#generals>.header .search-input-wrapper{position:relative}#generals>.header .search-input-wrapper label{padding-right:4px;cursor:pointer}#generals>.header .search-input-wrapper label md-icon{color:rgba(255,255,255,.8)}#generals>.header .search-input-wrapper md-input-container .md-errors-spacer{display:none}#generals>.header .search-input-wrapper md-input-container input{border-bottom:1px solid rgba(255,255,255,.8);color:rgba(255,255,255,.8);width:240px}#generals>.header .search-input-wrapper md-input-container input::placeholder{color:rgba(255,255,255,.8)}#generals>.header .search-input-wrapper md-input-container input:focus{border-bottom:1px solid #fff;color:#fff}#generals>.header.selected-bar{position:absolute;top:0;left:0;right:0;z-index:999;background-image:none;opacity:1!important}#generals>.header.selected-bar .close-button-wrapper{width:244px}#generals>.content{position:absolute;top:76px;bottom:0;right:0;left:0}#generals>.content .main{padding:16px 90px 0 4px;position:absolute;top:0;left:24px;right:0;bottom:0}#generals>.content .main .no-results{box-shadow:0 1px 1px 0 rgba(0,0,0,.14)}#generals>.content .general-detail-form-container{padding:24px;margin-bottom:24px}#generals>.content .general-detail-form-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}#generals>.content .general-detail-form-container .handle{cursor:move}#generals>.content .general-detail-form-container md-input-container md-switch{margin:0!important}#generals>.content .general-detail-form-container #general-image-uploader{position:relative}#generals>.content .general-detail-form-container #general-image-uploader.dropping .drop-text{display:flex}#generals>.content .general-detail-form-container #general-image-uploader .drop-text{display:none;position:absolute;top:0;right:0;bottom:0;left:0;padding:16px;text-align:center;border:2px dashed rgba(0,0,0,.12);background:#fff;font-size:20px;z-index:100}#generals>.content .general-detail-form-container #general-image-uploader .upload-button{margin-bottom:16px}#generals>.content .general-detail-form-container #general-image-uploader .general-image{position:relative;width:200px;height:200px;border:1px solid rgba(0,0,0,.12);margin:8px}#generals>.content .general-detail-form-container #general-image-uploader .general-image.uploading .overlay{position:absolute;top:0;right:0;bottom:0;left:0;background:rgba(0,0,0,.87)}#generals>.content .general-detail-form-container #general-image-uploader .general-image .media{max-height:100%}#generals #add-general-button{position:fixed;bottom:8px;right:8px;padding:0}#license{position:relative}#license .blink{animation:blinker 2s linear infinite}#license>.header{height:76px;min-height:76px;max-height:76px}#license>.header .logo .logo-icon{margin:0 16px 0 0}#license>.header .logo .logo-text{font-size:24px}#license>.header md-icon{color:#fff}#license>.content{position:absolute;top:76px;bottom:0;right:0;left:0}#license>.content .main{padding:16px 90px 0 4px;position:absolute;top:0;left:24px;right:0;bottom:0}#license>.content .main .no-results{box-shadow:0 1px 1px 0 rgba(0,0,0,.14)}#license>.content .badge{position:absolute;top:0;left:50%;-webkit-transform:translateX(-50%);transform:translateX(-50%);font-size:11px;font-weight:500;padding:6px 8px}md-dialog.request-dialog{max-width:720px;width:720px}md-dialog.request-dialog md-dialog-content{display:block;position:relative}md-dialog.request-dialog md-toolbar .title{font-size:17px}md-dialog.request-dialog md-input-container textarea{min-height:150px}md-dialog.request-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.request-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.request-dialog .date-container{padding:16px 0 24px 0}md-dialog.request-dialog .error-list{font-size:13px}md-dialog.request-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.request-dialog .error-list .error .message{font-weight:500}md-dialog.request-dialog .error-list .error .md-button{margin:0}md-dialog.request-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.request-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.update-dialog{max-width:720px;width:720px}md-dialog.update-dialog md-dialog-content{display:block;position:relative}md-dialog.update-dialog md-toolbar .title{font-size:17px}md-dialog.update-dialog md-input-container textarea{min-height:60px}md-dialog.update-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.update-dialog .error-list{font-size:13px}md-dialog.update-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.update-dialog .error-list .error .message{font-weight:500}md-dialog.update-dialog .error-list .error .md-button{margin:0}md-dialog.update-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.update-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.network-dialog{max-width:720px;width:720px}md-dialog.network-dialog md-dialog-content{display:block;position:relative}md-dialog.network-dialog md-toolbar .title{font-size:17px}md-dialog.network-dialog md-input-container textarea{min-height:150px}md-dialog.network-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.network-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.network-dialog .date-container{padding:16px 0 24px 0}md-dialog.network-dialog .error-list{font-size:13px}md-dialog.network-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.network-dialog .error-list .error .message{font-weight:500}md-dialog.network-dialog .error-list .error .md-button{margin:0}md-dialog.network-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.network-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}#networks{position:relative}#networks>.header{height:76px;min-height:76px;max-height:76px}#networks>.header .logo .logo-icon{margin:0 16px 0 0}#networks>.header .logo .logo-text{font-size:24px}#networks>.header md-icon{color:#fff}#networks>.header .search-input-wrapper{position:relative}#networks>.header .search-input-wrapper label{padding-right:4px;cursor:pointer}#networks>.header .search-input-wrapper label md-icon{color:rgba(255,255,255,.8)}#networks>.header .search-input-wrapper md-input-container .md-errors-spacer{display:none}#networks>.header .search-input-wrapper md-input-container input{border-bottom:1px solid rgba(255,255,255,.8);color:rgba(255,255,255,.8);width:240px}#networks>.header .search-input-wrapper md-input-container input::placeholder{color:rgba(255,255,255,.8)}#networks>.header .search-input-wrapper md-input-container input:focus{border-bottom:1px solid #fff;color:#fff}#networks>.header.selected-bar{position:absolute;top:0;left:0;right:0;z-index:999;background-image:none;opacity:1!important}#networks>.header.selected-bar .close-button-wrapper{width:244px}#networks>.content{position:absolute;top:76px;bottom:0;right:0;left:0}#networks>.content .main{padding:16px 90px 0 4px;position:absolute;top:0;left:24px;right:0;bottom:0}#networks>.content .main .no-results{box-shadow:0 1px 1px 0 rgba(0,0,0,.14)}#networks #add-network-button{position:fixed;bottom:8px;right:8px;padding:0}#networks #upload-network-button{position:fixed;bottom:8px;right:8px;padding:0}#smtps{position:relative}#smtps>.header{height:76px;min-height:76px;max-height:76px}#smtps>.header .logo .logo-icon{margin:0 16px 0 0}#smtps>.header .logo .logo-text{font-size:24px}#smtps>.header md-icon{color:#fff}#smtps>.header .search-input-wrapper{position:relative}#smtps>.header .search-input-wrapper label{padding-right:4px;cursor:pointer}#smtps>.header .search-input-wrapper label md-icon{color:rgba(255,255,255,.8)}#smtps>.header .search-input-wrapper md-input-container .md-errors-spacer{display:none}#smtps>.header .search-input-wrapper md-input-container input{border-bottom:1px solid rgba(255,255,255,.8);color:rgba(255,255,255,.8);width:240px}#smtps>.header .search-input-wrapper md-input-container input::placeholder{color:rgba(255,255,255,.8)}#smtps>.header .search-input-wrapper md-input-container input:focus{border-bottom:1px solid #fff;color:#fff}#smtps>.header.selected-bar{position:absolute;top:0;left:0;right:0;z-index:999;background-image:none;opacity:1!important}#smtps>.header.selected-bar .close-button-wrapper{width:244px}#smtps>.content{position:absolute;top:76px;bottom:0;right:0;left:0}#smtps>.content .main{padding:16px 90px 0 4px;position:absolute;top:0;left:24px;right:0;bottom:0}#smtps>.content .main .no-results{box-shadow:0 1px 1px 0 rgba(0,0,0,.14)}#smtps>.content .smtp-detail-form-container{padding:24px;margin-bottom:24px}#smtps>.content .smtp-detail-form-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}#smtps>.content .smtp-detail-form-container .handle{cursor:move}#smtps>.content .smtp-detail-form-container md-input-container md-switch{margin:0!important}#smtps>.content .smtp-detail-form-container #smtp-image-uploader{position:relative}#smtps>.content .smtp-detail-form-container #smtp-image-uploader.dropping .drop-text{display:flex}#smtps>.content .smtp-detail-form-container #smtp-image-uploader .drop-text{display:none;position:absolute;top:0;right:0;bottom:0;left:0;padding:16px;text-align:center;border:2px dashed rgba(0,0,0,.12);background:#fff;font-size:20px;z-index:100}#smtps>.content .smtp-detail-form-container #smtp-image-uploader .upload-button{margin-bottom:16px}#smtps>.content .smtp-detail-form-container #smtp-image-uploader .smtp-image{position:relative;width:200px;height:200px;border:1px solid rgba(0,0,0,.12);margin:8px}#smtps>.content .smtp-detail-form-container #smtp-image-uploader .smtp-image.uploading .overlay{position:absolute;top:0;right:0;bottom:0;left:0;background:rgba(0,0,0,.87)}#smtps>.content .smtp-detail-form-container #smtp-image-uploader .smtp-image .media{max-height:100%}#smtps #add-smtp-button{position:fixed;bottom:8px;right:8px;padding:0}#system>.header{height:76px;min-height:76px;max-height:76px}#system>.header .logo .logo-icon{margin:0 16px 0 0}#system>.header .logo .logo-text{font-size:24px}#system>.header md-icon{color:#fff}#system .system-detail-form-container{padding:24px;margin-bottom:24px}#system .system-detail-form-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}#system .system-detail-form-container .handle{cursor:move}#system .system-detail-form-container md-input-container md-switch{margin:0!important}#system .system-detail-form-container #system-image-uploader{position:relative}#system .system-detail-form-container #system-image-uploader.dropping .drop-text{display:flex}#system .system-detail-form-container #system-image-uploader .drop-text{display:none;position:absolute;top:0;right:0;bottom:0;left:0;padding:16px;text-align:center;border:2px dashed rgba(0,0,0,.12);background:#fff;font-size:20px;z-index:100}#system .system-detail-form-container #system-image-uploader .upload-button{margin-bottom:16px}#system .system-detail-form-container #system-image-uploader .system-image{position:relative;width:200px;height:200px;border:1px solid rgba(0,0,0,.12);margin:8px}#system .system-detail-form-container #system-image-uploader .system-image.uploading .overlay{position:absolute;top:0;right:0;bottom:0;left:0;background:rgba(0,0,0,.87)}#system .system-detail-form-container #system-image-uploader .system-image .media{max-height:100%}#updates{position:relative}#updates>.header{height:76px;min-height:76px;max-height:76px}#updates>.header .logo .logo-icon{margin:0 16px 0 0}#updates>.header .logo .logo-text{font-size:24px}#updates>.header md-icon{color:#fff}#updates>.content{position:absolute;top:76px;bottom:0;right:0;left:0}#updates>.content .main{padding:16px 90px 0 4px;position:absolute;top:0;left:24px;right:0;bottom:0}#updates>.content .main .no-results{box-shadow:0 1px 1px 0 rgba(0,0,0,.14)}#realtime{height:auto}#realtime>.content .blink{animation:blinker 2s linear infinite}#realtime>.content .avatar-wrapper{position:relative}#realtime>.content .avatar-wrapper .status{position:absolute;bottom:-3px;right:5px}#realtime>.content .search-input-wrapper{position:relative;margin-left:20px}#realtime>.content .search-input-wrapper label{padding:6px;cursor:pointer}#realtime>.content .search-input-wrapper md-input-container{padding-top:20px}#realtime>.content .main .labels{padding:8px 16px}#realtime>.content .main .labels .label{margin:0 0 2px 4px;padding:2px 5px;font-size:11px;white-space:nowrap;border-radius:2px}#realtime>.content .main .status{position:absolute;bottom:-3px;right:5px}#realtime>.content .main .avatar-wrapper{position:relative}#realtime>.content .main .avatar-wrapper .status{position:absolute;bottom:-3px;right:5px}#realtime>.content .custom-column{padding:0 24px!important}@keyframes blinker{50%{opacity:0}}md-dialog.smsAccount-dialog{max-width:720px;width:720px}md-dialog.smsAccount-dialog md-dialog-content{display:block;position:relative}md-dialog.smsAccount-dialog md-toolbar .title{font-size:17px}md-dialog.smsAccount-dialog md-input-container textarea{min-height:150px}md-dialog.smsAccount-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.smsAccount-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.smsAccount-dialog .date-container{padding:16px 0 24px 0}md-dialog.smsAccount-dialog .error-list{font-size:13px}md-dialog.smsAccount-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.smsAccount-dialog .error-list .error .message{font-weight:500}md-dialog.smsAccount-dialog .error-list .error .md-button{margin:0}md-dialog.smsAccount-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.smsAccount-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.smsAccount-dialog{max-width:720px;width:720px}md-dialog.smsAccount-dialog md-dialog-content{display:block;position:relative}md-dialog.smsAccount-dialog md-toolbar .title{font-size:17px}md-dialog.smsAccount-dialog md-input-container textarea{min-height:150px}md-dialog.smsAccount-dialog .date-container{padding:16px 0 24px 0}md-dialog.smsAccount-dialog .error-list{font-size:13px}md-dialog.smsAccount-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.smsAccount-dialog .error-list .error .message{font-weight:500}md-dialog.smsAccount-dialog .error-list .error .md-button{margin:0}md-dialog.smsAccount-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.smsAccount-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.smsAccount-dialog{max-width:720px;width:720px}md-dialog.smsAccount-dialog md-dialog-content{display:block;position:relative}md-dialog.smsAccount-dialog md-toolbar .title{font-size:17px}md-dialog.smsAccount-dialog md-input-container textarea{min-height:150px}md-dialog.smsAccount-dialog .date-container{padding:16px 0 24px 0}md-dialog.smsAccount-dialog .error-list{font-size:13px}md-dialog.smsAccount-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.smsAccount-dialog .error-list .error .message{font-weight:500}md-dialog.smsAccount-dialog .error-list .error .md-button{margin:0}md-dialog.smsAccount-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.smsAccount-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.smsAccount-dialog{max-width:720px;width:720px}md-dialog.smsAccount-dialog md-dialog-content{display:block;position:relative}md-dialog.smsAccount-dialog md-toolbar .title{font-size:17px}md-dialog.smsAccount-dialog md-input-container textarea{min-height:150px}md-dialog.smsAccount-dialog .date-container{padding:16px 0 24px 0}md-dialog.smsAccount-dialog .error-list{font-size:13px}md-dialog.smsAccount-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.smsAccount-dialog .error-list .error .message{font-weight:500}md-dialog.smsAccount-dialog .error-list .error .md-button{margin:0}md-dialog.smsAccount-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.smsAccount-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.smsAccount-dialog{max-width:720px;width:720px}md-dialog.smsAccount-dialog md-dialog-content{display:block;position:relative}md-dialog.smsAccount-dialog md-toolbar .title{font-size:17px}md-dialog.smsAccount-dialog md-input-container textarea{min-height:150px}md-dialog.smsAccount-dialog .date-container{padding:16px 0 24px 0}md-dialog.smsAccount-dialog .error-list{font-size:13px}md-dialog.smsAccount-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.smsAccount-dialog .error-list .error .message{font-weight:500}md-dialog.smsAccount-dialog .error-list .error .md-button{margin:0}md-dialog.smsAccount-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.smsAccount-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.smsAccount-dialog{max-width:720px;width:720px}md-dialog.smsAccount-dialog md-dialog-content{display:block;position:relative}md-dialog.smsAccount-dialog md-toolbar .title{font-size:17px}md-dialog.smsAccount-dialog md-input-container textarea{min-height:150px}md-dialog.smsAccount-dialog .date-container{padding:16px 0 24px 0}md-dialog.smsAccount-dialog .error-list{font-size:13px}md-dialog.smsAccount-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.smsAccount-dialog .error-list .error .message{font-weight:500}md-dialog.smsAccount-dialog .error-list .error .md-button{margin:0}md-dialog.smsAccount-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.smsAccount-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.smsAccount-dialog{max-width:720px;width:720px}md-dialog.smsAccount-dialog md-dialog-content{display:block;position:relative}md-dialog.smsAccount-dialog md-toolbar .title{font-size:17px}md-dialog.smsAccount-dialog md-input-container textarea{min-height:150px}md-dialog.smsAccount-dialog .date-container{padding:16px 0 24px 0}md-dialog.smsAccount-dialog .error-list{font-size:13px}md-dialog.smsAccount-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.smsAccount-dialog .error-list .error .message{font-weight:500}md-dialog.smsAccount-dialog .error-list .error .md-button{margin:0}md-dialog.smsAccount-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.smsAccount-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.smsAccount-dialog{max-width:720px;width:720px}md-dialog.smsAccount-dialog md-dialog-content{display:block;position:relative}md-dialog.smsAccount-dialog md-toolbar .title{font-size:17px}md-dialog.smsAccount-dialog md-input-container textarea{min-height:150px}md-dialog.smsAccount-dialog .date-container{padding:16px 0 24px 0}md-dialog.smsAccount-dialog .error-list{font-size:13px}md-dialog.smsAccount-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.smsAccount-dialog .error-list .error .message{font-weight:500}md-dialog.smsAccount-dialog .error-list .error .md-button{margin:0}md-dialog.smsAccount-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.smsAccount-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.smsAccount-dialog{max-width:720px;width:720px}md-dialog.smsAccount-dialog md-dialog-content{display:block;position:relative}md-dialog.smsAccount-dialog md-toolbar .title{font-size:17px}md-dialog.smsAccount-dialog md-input-container textarea{min-height:150px}md-dialog.smsAccount-dialog .date-container{padding:16px 0 24px 0}md-dialog.smsAccount-dialog .error-list{font-size:13px}md-dialog.smsAccount-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.smsAccount-dialog .error-list .error .message{font-weight:500}md-dialog.smsAccount-dialog .error-list .error .md-button{margin:0}md-dialog.smsAccount-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.smsAccount-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.smsAccount-dialog{max-width:720px;width:720px}md-dialog.smsAccount-dialog md-dialog-content{display:block;position:relative}md-dialog.smsAccount-dialog md-toolbar .title{font-size:17px}md-dialog.smsAccount-dialog md-input-container textarea{min-height:150px}md-dialog.smsAccount-dialog .date-container{padding:16px 0 24px 0}md-dialog.smsAccount-dialog .error-list{font-size:13px}md-dialog.smsAccount-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.smsAccount-dialog .error-list .error .message{font-weight:500}md-dialog.smsAccount-dialog .error-list .error .md-button{margin:0}md-dialog.smsAccount-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.smsAccount-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.smsAccount-dialog{max-width:720px;width:720px}md-dialog.smsAccount-dialog md-dialog-content{display:block;position:relative}md-dialog.smsAccount-dialog md-toolbar .title{font-size:17px}md-dialog.smsAccount-dialog md-input-container textarea{min-height:150px}md-dialog.smsAccount-dialog .date-container{padding:16px 0 24px 0}md-dialog.smsAccount-dialog .error-list{font-size:13px}md-dialog.smsAccount-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.smsAccount-dialog .error-list .error .message{font-weight:500}md-dialog.smsAccount-dialog .error-list .error .md-button{margin:0}md-dialog.smsAccount-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.smsAccount-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.smsAccount-dialog{max-width:720px;width:720px}md-dialog.smsAccount-dialog md-dialog-content{display:block;position:relative}md-dialog.smsAccount-dialog md-toolbar .title{font-size:17px}md-dialog.smsAccount-dialog md-input-container textarea{min-height:150px}md-dialog.smsAccount-dialog .date-container{padding:16px 0 24px 0}md-dialog.smsAccount-dialog .error-list{font-size:13px}md-dialog.smsAccount-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.smsAccount-dialog .error-list .error .message{font-weight:500}md-dialog.smsAccount-dialog .error-list .error .md-button{margin:0}md-dialog.smsAccount-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.smsAccount-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.smsAccount-dialog{max-width:720px;width:720px}md-dialog.smsAccount-dialog md-dialog-content{display:block;position:relative}md-dialog.smsAccount-dialog md-toolbar .title{font-size:17px}md-dialog.smsAccount-dialog md-input-container textarea{min-height:150px}md-dialog.smsAccount-dialog .date-container{padding:16px 0 24px 0}md-dialog.smsAccount-dialog .error-list{font-size:13px}md-dialog.smsAccount-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.smsAccount-dialog .error-list .error .message{font-weight:500}md-dialog.smsAccount-dialog .error-list .error .md-button{margin:0}md-dialog.smsAccount-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.smsAccount-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.smsAccount-dialog{max-width:720px;width:720px}md-dialog.smsAccount-dialog md-dialog-content{display:block;position:relative}md-dialog.smsAccount-dialog md-toolbar .title{font-size:17px}md-dialog.smsAccount-dialog md-input-container textarea{min-height:150px}md-dialog.smsAccount-dialog .date-container{padding:16px 0 24px 0}md-dialog.smsAccount-dialog .error-list{font-size:13px}md-dialog.smsAccount-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.smsAccount-dialog .error-list .error .message{font-weight:500}md-dialog.smsAccount-dialog .error-list .error .md-button{margin:0}md-dialog.smsAccount-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.smsAccount-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.smsCannedAnswer-dialog{max-width:720px;width:720px}md-dialog.smsCannedAnswer-dialog md-dialog-content{display:block;position:relative}md-dialog.smsCannedAnswer-dialog md-toolbar .title{font-size:17px}md-dialog.smsCannedAnswer-dialog md-input-container textarea{min-height:150px}md-dialog.smsCannedAnswer-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.smsCannedAnswer-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.smsCannedAnswer-dialog .date-container{padding:16px 0 24px 0}md-dialog.smsCannedAnswer-dialog .error-list{font-size:13px}md-dialog.smsCannedAnswer-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.smsCannedAnswer-dialog .error-list .error .message{font-weight:500}md-dialog.smsCannedAnswer-dialog .error-list .error .md-button{margin:0}md-dialog.smsCannedAnswer-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.smsCannedAnswer-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}#sms-smsAccount .header{height:76px;min-height:76px;max-height:76px}#sms-smsAccount .header .goto-smsAccounts-button{margin-right:16px}#sms-smsAccount .header .smsAccount-image{overflow:hidden;width:56px;height:56px;margin-right:16px;border:3px solid rgba(0,0,0,.12)}#sms-smsAccount .header .smsAccount-image img{height:100%;width:auto;max-width:none}#sms-smsAccount .header .subtitle{margin:6px 0 0 0}#sms-smsAccount .smsAccount-detail-form-container{padding:24px;margin-bottom:24px}#sms-smsAccount .smsAccount-detail-form-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}#sms-smsAccount .smsAccount-detail-form-container .handle{cursor:move}#sms-smsAccount .smsAccount-detail-form-container md-input-container md-switch{margin:0!important}#sms-smsAccount .smsAccount-detail-form-container #smsAccount-image-uploader{position:relative}#sms-smsAccount .smsAccount-detail-form-container #smsAccount-image-uploader.dropping .drop-text{display:flex}#sms-smsAccount .smsAccount-detail-form-container #smsAccount-image-uploader .drop-text{display:none;position:absolute;top:0;right:0;bottom:0;left:0;padding:16px;text-align:center;border:2px dashed rgba(0,0,0,.12);background:#fff;font-size:20px;z-index:100}#sms-smsAccount .smsAccount-detail-form-container #smsAccount-image-uploader .upload-button{margin-bottom:16px}#sms-smsAccount .smsAccount-detail-form-container #smsAccount-image-uploader .smsAccount-image{position:relative;width:200px;height:200px;border:1px solid rgba(0,0,0,.12);margin:8px}#sms-smsAccount .smsAccount-detail-form-container #smsAccount-image-uploader .smsAccount-image.uploading .overlay{position:absolute;top:0;right:0;bottom:0;left:0;background:rgba(0,0,0,.87)}#sms-smsAccount .smsAccount-detail-form-container #smsAccount-image-uploader .smsAccount-image .media{max-height:100%}#sms-smsAccount md-table-container thead tr th:not(:first-child):not(.no-padding){padding:0 20px 0 0!important}#sms-smsAccount md-table-container thead th.md-checkbox-column:not(.no-padding){padding:0 24px!important}#sms-smsAccount md-table-container tbody tr td:not(:first-child):not(.no-padding):not(.actions-padding){padding:0 20px 0 0!important}#sms-smsAccount md-table-container.font-size-12 td.md-cell{font-size:12px!important}@media screen and (min-width:1921px){#sms-smsAccount .actionAppData{width:800px!important}}@media screen and (max-width:1920px){#sms-smsAccount .actionAppData{width:700px!important}}@media screen and (min-width:1751px) and (max-width:1919px){#sms-smsAccount .actionAppData{width:600px!important}}@media screen and (min-width:1601px) and (max-width:1750px){#sms-smsAccount .actionAppData{width:500px!important}}@media screen and (min-width:1537px) and (max-width:1600px){#sms-smsAccount .actionAppData{width:450px!important}}@media screen and (min-width:1281px) and (max-width:1536px){#sms-smsAccount .actionAppData{width:300px!important}}@media screen and (max-width:1280px){#sms-smsAccount .actionAppData{width:150px!important}}@media screen and (max-width:960px){#sms-smsAccount .actionAppData{width:80px!important}}#smsAccounts{position:relative}#smsAccounts>.header{height:76px;min-height:76px;max-height:76px}#smsAccounts>.header .logo .logo-icon{margin:0 16px 0 0}#smsAccounts>.header .logo .logo-text{font-size:24px}#smsAccounts>.header md-icon{color:#fff}#smsAccounts>.header .search-input-wrapper{position:relative}#smsAccounts>.header .search-input-wrapper label{padding-right:4px;cursor:pointer}#smsAccounts>.header .search-input-wrapper label md-icon{color:rgba(255,255,255,.8)}#smsAccounts>.header .search-input-wrapper md-input-container .md-errors-spacer{display:none}#smsAccounts>.header .search-input-wrapper md-input-container input{border-bottom:1px solid rgba(255,255,255,.8);color:rgba(255,255,255,.8);width:240px}#smsAccounts>.header .search-input-wrapper md-input-container input::placeholder{color:rgba(255,255,255,.8)}#smsAccounts>.header .search-input-wrapper md-input-container input:focus{border-bottom:1px solid #fff;color:#fff}#smsAccounts>.header.selected-bar{position:absolute;top:0;left:0;right:0;z-index:999;background-image:none;opacity:1!important}#smsAccounts>.header.selected-bar .close-button-wrapper{width:244px}#smsAccounts>.content{position:absolute;top:76px;bottom:0;right:0;left:0}#smsAccounts>.content .main{padding:16px 90px 0 4px;position:absolute;top:0;left:24px;right:0;bottom:0}#smsAccounts>.content .main .no-results{box-shadow:0 1px 1px 0 rgba(0,0,0,.14)}#smsAccounts #add-smsAccount-button{position:fixed;bottom:8px;right:8px;padding:0}#smsAccounts #upload-smsAccount-button{position:fixed;bottom:8px;right:8px;padding:0}md-dialog.smsQueue-dialog{max-width:720px;width:720px}md-dialog.smsQueue-dialog md-dialog-content{display:block;position:relative}md-dialog.smsQueue-dialog md-toolbar .title{font-size:17px}md-dialog.smsQueue-dialog md-input-container textarea{min-height:150px}md-dialog.smsQueue-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.smsQueue-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.smsQueue-dialog .date-container{padding:16px 0 24px 0}md-dialog.smsQueue-dialog .error-list{font-size:13px}md-dialog.smsQueue-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.smsQueue-dialog .error-list .error .message{font-weight:500}md-dialog.smsQueue-dialog .error-list .error .md-button{margin:0}md-dialog.smsQueue-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.smsQueue-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}#sms-smsQueue .header{height:76px;min-height:76px;max-height:76px}#sms-smsQueue .header .goto-smsQueues-button{margin-right:16px}#sms-smsQueue .header .smsQueue-image{overflow:hidden;width:56px;height:56px;margin-right:16px;border:3px solid rgba(0,0,0,.12)}#sms-smsQueue .header .smsQueue-image img{height:100%;width:auto;max-width:none}#sms-smsQueue .header .subtitle{margin:6px 0 0 0}#sms-smsQueue .smsQueue-detail-form-container{padding:24px;margin-bottom:24px}#sms-smsQueue .smsQueue-detail-form-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}#sms-smsQueue .smsQueue-detail-form-container .handle{cursor:move}#sms-smsQueue .smsQueue-detail-form-container md-input-container md-switch{margin:0!important}#sms-smsQueue .smsQueue-detail-form-container #smsQueue-image-uploader{position:relative}#sms-smsQueue .smsQueue-detail-form-container #smsQueue-image-uploader.dropping .drop-text{display:flex}#sms-smsQueue .smsQueue-detail-form-container #smsQueue-image-uploader .drop-text{display:none;position:absolute;top:0;right:0;bottom:0;left:0;padding:16px;text-align:center;border:2px dashed rgba(0,0,0,.12);background:#fff;font-size:20px;z-index:100}#sms-smsQueue .smsQueue-detail-form-container #smsQueue-image-uploader .upload-button{margin-bottom:16px}#sms-smsQueue .smsQueue-detail-form-container #smsQueue-image-uploader .smsQueue-image{position:relative;width:200px;height:200px;border:1px solid rgba(0,0,0,.12);margin:8px}#sms-smsQueue .smsQueue-detail-form-container #smsQueue-image-uploader .smsQueue-image.uploading .overlay{position:absolute;top:0;right:0;bottom:0;left:0;background:rgba(0,0,0,.87)}#sms-smsQueue .smsQueue-detail-form-container #smsQueue-image-uploader .smsQueue-image .media{max-height:100%}#sms-smsQueue md-table-container thead tr th:not(:first-child):not(.no-padding){padding:0 20px 0 0!important}#sms-smsQueue md-table-container thead th.md-checkbox-column:not(.no-padding){padding:0 24px!important}#sms-smsQueue md-table-container tbody tr td:not(:first-child):not(.no-padding):not(.actions-padding){padding:0 20px 0 0!important}#sms-smsQueue md-table-container.font-size-12 td.md-cell{font-size:12px!important}#smsQueues{position:relative}#smsQueues>.header{height:76px;min-height:76px;max-height:76px}#smsQueues>.header .logo .logo-icon{margin:0 16px 0 0}#smsQueues>.header .logo .logo-text{font-size:24px}#smsQueues>.header md-icon{color:#fff}#smsQueues>.header .search-input-wrapper{position:relative}#smsQueues>.header .search-input-wrapper label{padding-right:4px;cursor:pointer}#smsQueues>.header .search-input-wrapper label md-icon{color:rgba(255,255,255,.8)}#smsQueues>.header .search-input-wrapper md-input-container .md-errors-spacer{display:none}#smsQueues>.header .search-input-wrapper md-input-container input{border-bottom:1px solid rgba(255,255,255,.8);color:rgba(255,255,255,.8);width:240px}#smsQueues>.header .search-input-wrapper md-input-container input::placeholder{color:rgba(255,255,255,.8)}#smsQueues>.header .search-input-wrapper md-input-container input:focus{border-bottom:1px solid #fff;color:#fff}#smsQueues>.header.selected-bar{position:absolute;top:0;left:0;right:0;z-index:999;background-image:none;opacity:1!important}#smsQueues>.header.selected-bar .close-button-wrapper{width:244px}#smsQueues>.content{position:absolute;top:76px;bottom:0;right:0;left:0}#smsQueues>.content .main{padding:16px 90px 0 4px;position:absolute;top:0;left:24px;right:0;bottom:0}#smsQueues>.content .main .no-results{box-shadow:0 1px 1px 0 rgba(0,0,0,.14)}#smsQueues #add-smsQueue-button{position:fixed;bottom:8px;right:8px;padding:0}#smsQueues #upload-smsQueue-button{position:fixed;bottom:8px;right:8px;padding:0}#agents{position:relative}#agents>.header{height:76px;min-height:76px;max-height:76px}#agents>.header .logo .logo-icon{margin:0 16px 0 0}#agents>.header .logo .logo-text{font-size:24px}#agents>.header md-icon{color:#fff}#agents>.header .search-input-wrapper{position:relative}#agents>.header .search-input-wrapper label{padding-right:4px;cursor:pointer}#agents>.header .search-input-wrapper label md-icon{color:rgba(255,255,255,.8)}#agents>.header .search-input-wrapper md-input-container .md-errors-spacer{display:none}#agents>.header .search-input-wrapper md-input-container input{border-bottom:1px solid rgba(255,255,255,.8);color:rgba(255,255,255,.8);width:240px}#agents>.header .search-input-wrapper md-input-container input::placeholder{color:rgba(255,255,255,.8)}#agents>.header .search-input-wrapper md-input-container input:focus{border-bottom:1px solid #fff;color:#fff}#agents>.header.selected-bar{position:absolute;top:0;left:0;right:0;z-index:999;background-image:none;opacity:1!important}#agents>.header.selected-bar .close-button-wrapper{width:244px}#agents>.content{position:absolute;top:76px;bottom:0;right:0;left:0}#agents>.content .main{padding:16px 90px 0 4px;position:absolute;top:0;left:24px;right:0;bottom:0}#agents>.content .main .no-results{box-shadow:0 1px 1px 0 rgba(0,0,0,.14)}#agents #add-agent-button{position:fixed;bottom:8px;right:8px;padding:0}#agents #upload-agent-button{position:fixed;bottom:8px;right:8px;padding:0}md-dialog.agent-dialog{max-width:720px;width:720px}md-dialog.agent-dialog md-dialog-content{display:block;position:relative}md-dialog.agent-dialog md-toolbar .title{font-size:17px}md-dialog.agent-dialog md-input-container textarea{min-height:150px}md-dialog.agent-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.agent-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.agent-dialog .date-container{padding:16px 0 24px 0}md-dialog.agent-dialog .error-list{font-size:13px}md-dialog.agent-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.agent-dialog .error-list .error .message{font-weight:500}md-dialog.agent-dialog .error-list .error .md-button{margin:0}md-dialog.agent-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.agent-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}#staff-agent .header{height:76px;min-height:76px;max-height:76px}#staff-agent .header .goto-agents-button{margin-right:16px}#staff-agent .header .agent-image{overflow:hidden;width:56px;height:56px;margin-right:16px;border:3px solid rgba(0,0,0,.12)}#staff-agent .header .agent-image img{height:100%;width:auto;max-width:none}#staff-agent .header .subtitle{margin:6px 0 0 0}#staff-agent .agent-detail-form-container{padding:24px;margin-bottom:24px}#staff-agent .agent-detail-form-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}#staff-agent .agent-detail-form-container .handle{cursor:move}#staff-agent .agent-detail-form-container md-input-container md-switch{margin:0!important}#staff-agent .agent-detail-form-container #agent-image-uploader{position:relative}#staff-agent .agent-detail-form-container #agent-image-uploader.dropping .drop-text{display:flex}#staff-agent .agent-detail-form-container #agent-image-uploader .drop-text{display:none;position:absolute;top:0;right:0;bottom:0;left:0;padding:16px;text-align:center;border:2px dashed rgba(0,0,0,.12);background:#fff;font-size:20px;z-index:100}#staff-agent .agent-detail-form-container #agent-image-uploader .upload-button{margin-bottom:16px}#staff-agent .agent-detail-form-container #agent-image-uploader .agent-image{position:relative;width:200px;height:200px;border:1px solid rgba(0,0,0,.12);margin:8px}#staff-agent .agent-detail-form-container #agent-image-uploader .agent-image.uploading .overlay{position:absolute;top:0;right:0;bottom:0;left:0;background:rgba(0,0,0,.87)}#staff-agent .agent-detail-form-container #agent-image-uploader .agent-image .media{max-height:100%}#staff-agent md-table-container thead tr th:not(:first-child):not(.no-padding){padding:0 20px 0 0!important}#staff-agent md-table-container thead th.md-checkbox-column:not(.no-padding){padding:0 24px!important}#staff-agent md-table-container tbody tr td:not(:first-child):not(.no-padding):not(.actions-padding){padding:0 20px 0 0!important}#staff-agent md-table-container.font-size-12 td.md-cell{font-size:12px!important}md-dialog.team-dialog{max-width:720px;width:720px}md-dialog.team-dialog md-dialog-content{display:block;position:relative}md-dialog.team-dialog md-toolbar .title{font-size:17px}md-dialog.team-dialog md-input-container textarea{min-height:150px}md-dialog.team-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.team-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.team-dialog .date-container{padding:16px 0 24px 0}md-dialog.team-dialog .error-list{font-size:13px}md-dialog.team-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.team-dialog .error-list .error .message{font-weight:500}md-dialog.team-dialog .error-list .error .md-button{margin:0}md-dialog.team-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.team-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}#teams{position:relative}#teams>.header{height:76px;min-height:76px;max-height:76px}#teams>.header .logo .logo-icon{margin:0 16px 0 0}#teams>.header .logo .logo-text{font-size:24px}#teams>.header md-icon{color:#fff}#teams>.header .search-input-wrapper{position:relative}#teams>.header .search-input-wrapper label{padding-right:4px;cursor:pointer}#teams>.header .search-input-wrapper label md-icon{color:rgba(255,255,255,.8)}#teams>.header .search-input-wrapper md-input-container .md-errors-spacer{display:none}#teams>.header .search-input-wrapper md-input-container input{border-bottom:1px solid rgba(255,255,255,.8);color:rgba(255,255,255,.8);width:240px}#teams>.header .search-input-wrapper md-input-container input::placeholder{color:rgba(255,255,255,.8)}#teams>.header .search-input-wrapper md-input-container input:focus{border-bottom:1px solid #fff;color:#fff}#teams>.header.selected-bar{position:absolute;top:0;left:0;right:0;z-index:999;background-image:none;opacity:1!important}#teams>.header.selected-bar .close-button-wrapper{width:244px}#teams>.content{position:absolute;top:76px;bottom:0;right:0;left:0}#teams>.content .main{padding:16px 90px 0 4px;position:absolute;top:0;left:24px;right:0;bottom:0}#teams>.content .main .no-results{box-shadow:0 1px 1px 0 rgba(0,0,0,.14)}#teams #add-team-button{position:fixed;bottom:8px;right:8px;padding:0}#teams #upload-team-button{position:fixed;bottom:8px;right:8px;padding:0}md-dialog.telephone-dialog{max-width:720px;width:720px}md-dialog.telephone-dialog md-dialog-content{display:block;position:relative}md-dialog.telephone-dialog md-toolbar .title{font-size:17px}md-dialog.telephone-dialog md-input-container textarea{min-height:150px}md-dialog.telephone-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.telephone-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.telephone-dialog .date-container{padding:16px 0 24px 0}md-dialog.telephone-dialog .error-list{font-size:13px}md-dialog.telephone-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.telephone-dialog .error-list .error .message{font-weight:500}md-dialog.telephone-dialog .error-list .error .md-button{margin:0}md-dialog.telephone-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.telephone-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}#staff-telephone .header{height:76px;min-height:76px;max-height:76px}#staff-telephone .header .goto-telephones-button{margin-right:16px}#staff-telephone .header .telephone-image{overflow:hidden;width:56px;height:56px;margin-right:16px;border:3px solid rgba(0,0,0,.12)}#staff-telephone .header .telephone-image img{height:100%;width:auto;max-width:none}#staff-telephone .header .subtitle{margin:6px 0 0 0}#staff-telephone .telephone-detail-form-container{padding:24px;margin-bottom:24px}#staff-telephone .telephone-detail-form-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}#staff-telephone .telephone-detail-form-container .handle{cursor:move}#staff-telephone .telephone-detail-form-container md-input-container md-switch{margin:0!important}#staff-telephone .telephone-detail-form-container #telephone-image-uploader{position:relative}#staff-telephone .telephone-detail-form-container #telephone-image-uploader.dropping .drop-text{display:flex}#staff-telephone .telephone-detail-form-container #telephone-image-uploader .drop-text{display:none;position:absolute;top:0;right:0;bottom:0;left:0;padding:16px;text-align:center;border:2px dashed rgba(0,0,0,.12);background:#fff;font-size:20px;z-index:100}#staff-telephone .telephone-detail-form-container #telephone-image-uploader .upload-button{margin-bottom:16px}#staff-telephone .telephone-detail-form-container #telephone-image-uploader .telephone-image{position:relative;width:200px;height:200px;border:1px solid rgba(0,0,0,.12);margin:8px}#staff-telephone .telephone-detail-form-container #telephone-image-uploader .telephone-image.uploading .overlay{position:absolute;top:0;right:0;bottom:0;left:0;background:rgba(0,0,0,.87)}#staff-telephone .telephone-detail-form-container #telephone-image-uploader .telephone-image .media{max-height:100%}#staff-telephone md-table-container thead tr th:not(:first-child):not(.no-padding){padding:0 20px 0 0!important}#staff-telephone md-table-container thead th.md-checkbox-column:not(.no-padding){padding:0 24px!important}#staff-telephone md-table-container tbody tr td:not(:first-child):not(.no-padding):not(.actions-padding){padding:0 20px 0 0!important}#staff-telephone md-table-container.font-size-12 td.md-cell{font-size:12px!important}#telephones{position:relative}#telephones>.header{height:76px;min-height:76px;max-height:76px}#telephones>.header .logo .logo-icon{margin:0 16px 0 0}#telephones>.header .logo .logo-text{font-size:24px}#telephones>.header md-icon{color:#fff}#telephones>.header .search-input-wrapper{position:relative}#telephones>.header .search-input-wrapper label{padding-right:4px;cursor:pointer}#telephones>.header .search-input-wrapper label md-icon{color:rgba(255,255,255,.8)}#telephones>.header .search-input-wrapper md-input-container .md-errors-spacer{display:none}#telephones>.header .search-input-wrapper md-input-container input{border-bottom:1px solid rgba(255,255,255,.8);color:rgba(255,255,255,.8);width:240px}#telephones>.header .search-input-wrapper md-input-container input::placeholder{color:rgba(255,255,255,.8)}#telephones>.header .search-input-wrapper md-input-container input:focus{border-bottom:1px solid #fff;color:#fff}#telephones>.header.selected-bar{position:absolute;top:0;left:0;right:0;z-index:999;background-image:none;opacity:1!important}#telephones>.header.selected-bar .close-button-wrapper{width:244px}#telephones>.content{position:absolute;top:76px;bottom:0;right:0;left:0}#telephones>.content .main{padding:16px 90px 0 4px;position:absolute;top:0;left:24px;right:0;bottom:0}#telephones>.content .main .no-results{box-shadow:0 1px 1px 0 rgba(0,0,0,.14)}#telephones #add-telephone-button{position:fixed;bottom:8px;right:8px;padding:0}#telephones #upload-telephone-button{position:fixed;bottom:8px;right:8px;padding:0}md-dialog.userProfile-dialog{max-width:720px;width:720px}md-dialog.userProfile-dialog md-dialog-content{display:block;position:relative}md-dialog.userProfile-dialog md-toolbar .title{font-size:17px}md-dialog.userProfile-dialog md-input-container textarea{min-height:150px}md-dialog.userProfile-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.userProfile-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.userProfile-dialog .date-container{padding:16px 0 24px 0}md-dialog.userProfile-dialog .error-list{font-size:13px}md-dialog.userProfile-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.userProfile-dialog .error-list .error .message{font-weight:500}md-dialog.userProfile-dialog .error-list .error .md-button{margin:0}md-dialog.userProfile-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.userProfile-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}#staff-userProfile .header{height:76px;min-height:76px;max-height:76px}#staff-userProfile .header .goto-userProfiles-button{margin-right:16px}#staff-userProfile .header .userProfile-image{overflow:hidden;width:56px;height:56px;margin-right:16px;border:3px solid rgba(0,0,0,.12)}#staff-userProfile .header .userProfile-image img{height:100%;width:auto;max-width:none}#staff-userProfile .header .subtitle{margin:6px 0 0 0}#staff-userProfile .userProfile-detail-form-container{padding:24px;margin-bottom:24px}#staff-userProfile .userProfile-detail-form-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}#staff-userProfile .userProfile-detail-form-container .handle{cursor:move}#staff-userProfile .userProfile-detail-form-container md-input-container md-switch{margin:0!important}#staff-userProfile .userProfile-detail-form-container #userProfile-image-uploader{position:relative}#staff-userProfile .userProfile-detail-form-container #userProfile-image-uploader.dropping .drop-text{display:flex}#staff-userProfile .userProfile-detail-form-container #userProfile-image-uploader .drop-text{display:none;position:absolute;top:0;right:0;bottom:0;left:0;padding:16px;text-align:center;border:2px dashed rgba(0,0,0,.12);background:#fff;font-size:20px;z-index:100}#staff-userProfile .userProfile-detail-form-container #userProfile-image-uploader .upload-button{margin-bottom:16px}#staff-userProfile .userProfile-detail-form-container #userProfile-image-uploader .userProfile-image{position:relative;width:200px;height:200px;border:1px solid rgba(0,0,0,.12);margin:8px}#staff-userProfile .userProfile-detail-form-container #userProfile-image-uploader .userProfile-image.uploading .overlay{position:absolute;top:0;right:0;bottom:0;left:0;background:rgba(0,0,0,.87)}#staff-userProfile .userProfile-detail-form-container #userProfile-image-uploader .userProfile-image .media{max-height:100%}#staff-userProfile md-table-container thead tr th:not(:first-child):not(.no-padding){padding:0 20px 0 0!important}#staff-userProfile md-table-container thead th.md-checkbox-column:not(.no-padding){padding:0 24px!important}#staff-userProfile md-table-container tbody tr td:not(:first-child):not(.no-padding):not(.actions-padding){padding:0 20px 0 0!important}#staff-userProfile md-table-container.font-size-12 td.md-cell{font-size:12px!important}#userProfiles{position:relative}#userProfiles>.header{height:76px;min-height:76px;max-height:76px}#userProfiles>.header .logo .logo-icon{margin:0 16px 0 0}#userProfiles>.header .logo .logo-text{font-size:24px}#userProfiles>.header md-icon{color:#fff}#userProfiles>.header .search-input-wrapper{position:relative}#userProfiles>.header .search-input-wrapper label{padding-right:4px;cursor:pointer}#userProfiles>.header .search-input-wrapper label md-icon{color:rgba(255,255,255,.8)}#userProfiles>.header .search-input-wrapper md-input-container .md-errors-spacer{display:none}#userProfiles>.header .search-input-wrapper md-input-container input{border-bottom:1px solid rgba(255,255,255,.8);color:rgba(255,255,255,.8);width:240px}#userProfiles>.header .search-input-wrapper md-input-container input::placeholder{color:rgba(255,255,255,.8)}#userProfiles>.header .search-input-wrapper md-input-container input:focus{border-bottom:1px solid #fff;color:#fff}#userProfiles>.header.selected-bar{position:absolute;top:0;left:0;right:0;z-index:999;background-image:none;opacity:1!important}#userProfiles>.header.selected-bar .close-button-wrapper{width:244px}#userProfiles>.content{position:absolute;top:76px;bottom:0;right:0;left:0}#userProfiles>.content .main{padding:16px 90px 0 4px;position:absolute;top:0;left:24px;right:0;bottom:0}#userProfiles>.content .main .no-results{box-shadow:0 1px 1px 0 rgba(0,0,0,.14)}#userProfiles #add-userProfile-button{position:fixed;bottom:8px;right:8px;padding:0}#userProfiles #upload-userProfile-button{position:fixed;bottom:8px;right:8px;padding:0}md-dialog.user-dialog{max-width:720px;width:720px}md-dialog.user-dialog md-dialog-content{display:block;position:relative}md-dialog.user-dialog md-toolbar .title{font-size:17px}md-dialog.user-dialog md-input-container textarea{min-height:150px}md-dialog.user-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.user-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.user-dialog .date-container{padding:16px 0 24px 0}md-dialog.user-dialog .error-list{font-size:13px}md-dialog.user-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.user-dialog .error-list .error .message{font-weight:500}md-dialog.user-dialog .error-list .error .md-button{margin:0}md-dialog.user-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.user-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}#staff-user .header{height:76px;min-height:76px;max-height:76px}#staff-user .header .goto-users-button{margin-right:16px}#staff-user .header .user-image{overflow:hidden;width:56px;height:56px;margin-right:16px;border:3px solid rgba(0,0,0,.12)}#staff-user .header .user-image img{height:100%;width:auto;max-width:none}#staff-user .header .subtitle{margin:6px 0 0 0}#staff-user .user-detail-form-container{padding:24px;margin-bottom:24px}#staff-user .user-detail-form-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}#staff-user .user-detail-form-container .handle{cursor:move}#staff-user .user-detail-form-container md-input-container md-switch{margin:0!important}#staff-user .user-detail-form-container #user-image-uploader{position:relative}#staff-user .user-detail-form-container #user-image-uploader.dropping .drop-text{display:flex}#staff-user .user-detail-form-container #user-image-uploader .drop-text{display:none;position:absolute;top:0;right:0;bottom:0;left:0;padding:16px;text-align:center;border:2px dashed rgba(0,0,0,.12);background:#fff;font-size:20px;z-index:100}#staff-user .user-detail-form-container #user-image-uploader .upload-button{margin-bottom:16px}#staff-user .user-detail-form-container #user-image-uploader .user-image{position:relative;width:200px;height:200px;border:1px solid rgba(0,0,0,.12);margin:8px}#staff-user .user-detail-form-container #user-image-uploader .user-image.uploading .overlay{position:absolute;top:0;right:0;bottom:0;left:0;background:rgba(0,0,0,.87)}#staff-user .user-detail-form-container #user-image-uploader .user-image .media{max-height:100%}#staff-user md-table-container thead tr th:not(:first-child):not(.no-padding){padding:0 20px 0 0!important}#staff-user md-table-container thead th.md-checkbox-column:not(.no-padding){padding:0 24px!important}#staff-user md-table-container tbody tr td:not(:first-child):not(.no-padding):not(.actions-padding){padding:0 20px 0 0!important}#staff-user md-table-container.font-size-12 td.md-cell{font-size:12px!important}#users{position:relative}#users>.header{height:76px;min-height:76px;max-height:76px}#users>.header .logo .logo-icon{margin:0 16px 0 0}#users>.header .logo .logo-text{font-size:24px}#users>.header md-icon{color:#fff}#users>.header .search-input-wrapper{position:relative}#users>.header .search-input-wrapper label{padding-right:4px;cursor:pointer}#users>.header .search-input-wrapper label md-icon{color:rgba(255,255,255,.8)}#users>.header .search-input-wrapper md-input-container .md-errors-spacer{display:none}#users>.header .search-input-wrapper md-input-container input{border-bottom:1px solid rgba(255,255,255,.8);color:rgba(255,255,255,.8);width:240px}#users>.header .search-input-wrapper md-input-container input::placeholder{color:rgba(255,255,255,.8)}#users>.header .search-input-wrapper md-input-container input:focus{border-bottom:1px solid #fff;color:#fff}#users>.header.selected-bar{position:absolute;top:0;left:0;right:0;z-index:999;background-image:none;opacity:1!important}#users>.header.selected-bar .close-button-wrapper{width:244px}#users>.content{position:absolute;top:76px;bottom:0;right:0;left:0}#users>.content .main{padding:16px 90px 0 4px;position:absolute;top:0;left:24px;right:0;bottom:0}#users>.content .main .no-results{box-shadow:0 1px 1px 0 rgba(0,0,0,.14)}#users #add-user-button{position:fixed;bottom:8px;right:8px;padding:0}#users #upload-user-button{position:fixed;bottom:8px;right:8px;padding:0}#cannedAnswers{position:relative}#cannedAnswers>.header{height:76px;min-height:76px;max-height:76px}#cannedAnswers>.header .logo .logo-icon{margin:0 16px 0 0}#cannedAnswers>.header .logo .logo-text{font-size:24px}#cannedAnswers>.header md-icon{color:#fff}#cannedAnswers>.header .search-input-wrapper{position:relative}#cannedAnswers>.header .search-input-wrapper label{padding-right:4px;cursor:pointer}#cannedAnswers>.header .search-input-wrapper label md-icon{color:rgba(255,255,255,.8)}#cannedAnswers>.header .search-input-wrapper md-input-container .md-errors-spacer{display:none}#cannedAnswers>.header .search-input-wrapper md-input-container input{border-bottom:1px solid rgba(255,255,255,.8);color:rgba(255,255,255,.8);width:240px}#cannedAnswers>.header .search-input-wrapper md-input-container input::placeholder{color:rgba(255,255,255,.8)}#cannedAnswers>.header .search-input-wrapper md-input-container input:focus{border-bottom:1px solid #fff;color:#fff}#cannedAnswers>.header.selected-bar{position:absolute;top:0;left:0;right:0;z-index:999;background-image:none;opacity:1!important}#cannedAnswers>.header.selected-bar .close-button-wrapper{width:244px}#cannedAnswers>.content{position:absolute;top:76px;bottom:0;right:0;left:0}#cannedAnswers>.content .main{padding:16px 90px 0 4px;position:absolute;top:0;left:24px;right:0;bottom:0}#cannedAnswers>.content .main .no-results{box-shadow:0 1px 1px 0 rgba(0,0,0,.14)}#cannedAnswers #add-cannedAnswer-button{position:fixed;bottom:8px;right:8px;padding:0}#cannedAnswers #upload-cannedAnswer-button{position:fixed;bottom:8px;right:8px;padding:0}md-dialog.cannedAnswer-dialog{max-width:720px;width:720px}md-dialog.cannedAnswer-dialog md-dialog-content{display:block;position:relative}md-dialog.cannedAnswer-dialog md-toolbar .title{font-size:17px}md-dialog.cannedAnswer-dialog md-input-container textarea{min-height:150px}md-dialog.cannedAnswer-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.cannedAnswer-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.cannedAnswer-dialog .date-container{padding:16px 0 24px 0}md-dialog.cannedAnswer-dialog .error-list{font-size:13px}md-dialog.cannedAnswer-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.cannedAnswer-dialog .error-list .error .message{font-weight:500}md-dialog.cannedAnswer-dialog .error-list .error .md-button{margin:0}md-dialog.cannedAnswer-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.cannedAnswer-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}#contact_item_types{position:relative}#contact_item_types>.header{height:76px;min-height:76px;max-height:76px}#contact_item_types>.header .logo .logo-icon{margin:0 16px 0 0}#contact_item_types>.header .logo .logo-text{font-size:24px}#contact_item_types>.header md-icon{color:#fff}#contact_item_types>.header .search-input-wrapper{position:relative}#contact_item_types>.header .search-input-wrapper label{padding-right:4px;cursor:pointer}#contact_item_types>.header .search-input-wrapper label md-icon{color:rgba(255,255,255,.8)}#contact_item_types>.header .search-input-wrapper md-input-container .md-errors-spacer{display:none}#contact_item_types>.header .search-input-wrapper md-input-container input{border-bottom:1px solid rgba(255,255,255,.8);color:rgba(255,255,255,.8);width:240px}#contact_item_types>.header .search-input-wrapper md-input-container input::placeholder{color:rgba(255,255,255,.8)}#contact_item_types>.header .search-input-wrapper md-input-container input:focus{border-bottom:1px solid #fff;color:#fff}#contact_item_types>.header.selected-bar{position:absolute;top:0;left:0;right:0;z-index:999;background-image:none;opacity:1!important}#contact_item_types>.header.selected-bar .close-button-wrapper{width:244px}#contact_item_types>.content{position:absolute;top:76px;bottom:0;right:0;left:0}#contact_item_types>.content .main{padding:16px 90px 0 4px;position:absolute;top:0;left:24px;right:0;bottom:0}#contact_item_types>.content .main .no-results{box-shadow:0 1px 1px 0 rgba(0,0,0,.14)}#contact_item_types #add-contactItemType-button{position:fixed;bottom:8px;right:8px;padding:0}#contact_item_types #upload-contactItemType-button{position:fixed;bottom:8px;right:8px;padding:0}md-dialog.contactItemType-dialog{max-width:720px;width:720px}md-dialog.contactItemType-dialog md-dialog-content{display:block;position:relative}md-dialog.contactItemType-dialog md-toolbar .title{font-size:17px}md-dialog.contactItemType-dialog md-input-container textarea{min-height:150px}md-dialog.contactItemType-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.contactItemType-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.contactItemType-dialog .date-container{padding:16px 0 24px 0}md-dialog.contactItemType-dialog .error-list{font-size:13px}md-dialog.contactItemType-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.contactItemType-dialog .error-list .error .message{font-weight:500}md-dialog.contactItemType-dialog .error-list .error .md-button{margin:0}md-dialog.contactItemType-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.contactItemType-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.customDashboard-dialog{max-width:720px;width:720px}md-dialog.customDashboard-dialog md-dialog-content{display:block;position:relative}md-dialog.customDashboard-dialog md-toolbar .title{font-size:17px}md-dialog.customDashboard-dialog md-input-container textarea{min-height:150px}md-dialog.customDashboard-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.customDashboard-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.customDashboard-dialog .date-container{padding:16px 0 24px 0}md-dialog.customDashboard-dialog .error-list{font-size:13px}md-dialog.customDashboard-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.customDashboard-dialog .error-list .error .message{font-weight:500}md-dialog.customDashboard-dialog .error-list .error .md-button{margin:0}md-dialog.customDashboard-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.customDashboard-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}#customDashboards{position:relative}#customDashboards>.header{height:76px;min-height:76px;max-height:76px}#customDashboards>.header .logo .logo-icon{margin:0 16px 0 0}#customDashboards>.header .logo .logo-text{font-size:24px}#customDashboards>.header md-icon{color:#fff}#customDashboards>.header .search-input-wrapper{position:relative}#customDashboards>.header .search-input-wrapper label{padding-right:4px;cursor:pointer}#customDashboards>.header .search-input-wrapper label md-icon{color:rgba(255,255,255,.8)}#customDashboards>.header .search-input-wrapper md-input-container .md-errors-spacer{display:none}#customDashboards>.header .search-input-wrapper md-input-container input{border-bottom:1px solid rgba(255,255,255,.8);color:rgba(255,255,255,.8);width:240px}#customDashboards>.header .search-input-wrapper md-input-container input::placeholder{color:rgba(255,255,255,.8)}#customDashboards>.header .search-input-wrapper md-input-container input:focus{border-bottom:1px solid #fff;color:#fff}#customDashboards>.header.selected-bar{position:absolute;top:0;left:0;right:0;z-index:999;background-image:none;opacity:1!important}#customDashboards>.header.selected-bar .close-button-wrapper{width:244px}#customDashboards>.content{position:absolute;top:76px;bottom:0;right:0;left:0}#customDashboards>.content .main{padding:16px 90px 0 4px;position:absolute;top:0;left:24px;right:0;bottom:0}#customDashboards>.content .main .no-results{box-shadow:0 1px 1px 0 rgba(0,0,0,.14)}#customDashboards #add-customDashboard-button{position:fixed;bottom:8px;right:8px;padding:0}#customDashboards #upload-customDashboard-button{position:fixed;bottom:8px;right:8px;padding:0}md-dialog.dashboarditem-dialog{max-width:720px;width:720px}md-dialog.dashboarditem-dialog md-dialog-content{display:block;position:relative}md-dialog.dashboarditem-dialog md-toolbar .title{font-size:17px}md-dialog.dashboarditem-dialog md-input-container textarea{min-height:150px}md-dialog.dashboarditem-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.dashboarditem-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.dashboarditem-dialog .date-container{padding:16px 0 24px 0}md-dialog.dashboarditem-dialog .error-list{font-size:13px}md-dialog.dashboarditem-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.dashboarditem-dialog .error-list .error .message{font-weight:500}md-dialog.dashboarditem-dialog .error-list .error .md-button{margin:0}md-dialog.dashboarditem-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.dashboarditem-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}#tools-customDashboard .header{height:76px;min-height:76px;max-height:76px}#tools-customDashboard .header .goto-customDashboards-button{margin-right:16px}#tools-customDashboard .header .customDashboard-image{overflow:hidden;width:56px;height:56px;margin-right:16px;border:3px solid rgba(0,0,0,.12)}#tools-customDashboard .header .customDashboard-image img{height:100%;width:auto;max-width:none}#tools-customDashboard .header .subtitle{margin:6px 0 0 0}#tools-customDashboard .customDashboard-detail-form-container{padding:24px;margin-bottom:24px}#tools-customDashboard .customDashboard-detail-form-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}#tools-customDashboard .customDashboard-detail-form-container .handle{cursor:move}#tools-customDashboard .customDashboard-detail-form-container md-input-container md-switch{margin:0!important}#tools-customDashboard .customDashboard-detail-form-container #customDashboard-image-uploader{position:relative}#tools-customDashboard .customDashboard-detail-form-container #customDashboard-image-uploader.dropping .drop-text{display:flex}#tools-customDashboard .customDashboard-detail-form-container #customDashboard-image-uploader .drop-text{display:none;position:absolute;top:0;right:0;bottom:0;left:0;padding:16px;text-align:center;border:2px dashed rgba(0,0,0,.12);background:#fff;font-size:20px;z-index:100}#tools-customDashboard .customDashboard-detail-form-container #customDashboard-image-uploader .upload-button{margin-bottom:16px}#tools-customDashboard .customDashboard-detail-form-container #customDashboard-image-uploader .customDashboard-image{position:relative;width:200px;height:200px;border:1px solid rgba(0,0,0,.12);margin:8px}#tools-customDashboard .customDashboard-detail-form-container #customDashboard-image-uploader .customDashboard-image.uploading .overlay{position:absolute;top:0;right:0;bottom:0;left:0;background:rgba(0,0,0,.87)}#tools-customDashboard .customDashboard-detail-form-container #customDashboard-image-uploader .customDashboard-image .media{max-height:100%}#tools-customDashboard md-table-container thead tr th:not(:first-child):not(.no-padding){padding:0 20px 0 0!important}#tools-customDashboard md-table-container thead th.md-checkbox-column:not(.no-padding){padding:0 24px!important}#tools-customDashboard md-table-container tbody tr td:not(:first-child):not(.no-padding):not(.actions-padding){padding:0 20px 0 0!important}#tools-customDashboard md-table-container.font-size-12 td.md-cell{font-size:12px!important}md-dialog.disposition-dialog{max-width:720px;width:720px}md-dialog.disposition-dialog md-dialog-content{display:block;position:relative}md-dialog.disposition-dialog md-toolbar .title{font-size:17px}md-dialog.disposition-dialog md-input-container textarea{min-height:150px}md-dialog.disposition-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.disposition-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.disposition-dialog .date-container{padding:16px 0 24px 0}md-dialog.disposition-dialog .error-list{font-size:13px}md-dialog.disposition-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.disposition-dialog .error-list .error .message{font-weight:500}md-dialog.disposition-dialog .error-list .error .md-button{margin:0}md-dialog.disposition-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.disposition-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}#dispositions{position:relative}#dispositions>.header{height:76px;min-height:76px;max-height:76px}#dispositions>.header .logo .logo-icon{margin:0 16px 0 0}#dispositions>.header .logo .logo-text{font-size:24px}#dispositions>.header md-icon{color:#fff}#dispositions>.header .search-input-wrapper{position:relative}#dispositions>.header .search-input-wrapper label{padding-right:4px;cursor:pointer}#dispositions>.header .search-input-wrapper label md-icon{color:rgba(255,255,255,.8)}#dispositions>.header .search-input-wrapper md-input-container .md-errors-spacer{display:none}#dispositions>.header .search-input-wrapper md-input-container input{border-bottom:1px solid rgba(255,255,255,.8);color:rgba(255,255,255,.8);width:240px}#dispositions>.header .search-input-wrapper md-input-container input::placeholder{color:rgba(255,255,255,.8)}#dispositions>.header .search-input-wrapper md-input-container input:focus{border-bottom:1px solid #fff;color:#fff}#dispositions>.header.selected-bar{position:absolute;top:0;left:0;right:0;z-index:999;background-image:none;opacity:1!important}#dispositions>.header.selected-bar .close-button-wrapper{width:244px}#dispositions>.content{position:absolute;top:76px;bottom:0;right:0;left:0}#dispositions>.content .main{padding:16px 90px 0 4px;position:absolute;top:0;left:24px;right:0;bottom:0}#dispositions>.content .main .no-results{box-shadow:0 1px 1px 0 rgba(0,0,0,.14)}#dispositions #add-disposition-button{position:fixed;bottom:8px;right:8px;padding:0}#dispositions #upload-disposition-button{position:fixed;bottom:8px;right:8px;padding:0}md-dialog.interval-dialog{max-width:720px;width:720px}md-dialog.interval-dialog md-dialog-content{display:block;position:relative}md-dialog.interval-dialog md-toolbar .title{font-size:17px}md-dialog.interval-dialog md-input-container textarea{min-height:150px}md-dialog.interval-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.interval-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.interval-dialog .date-container{padding:16px 0 24px 0}md-dialog.interval-dialog .error-list{font-size:13px}md-dialog.interval-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.interval-dialog .error-list .error .message{font-weight:500}md-dialog.interval-dialog .error-list .error .md-button{margin:0}md-dialog.interval-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.interval-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.interval-dialog{max-width:720px;width:720px}md-dialog.interval-dialog md-dialog-content{display:block;position:relative}md-dialog.interval-dialog md-toolbar .title{font-size:17px}md-dialog.interval-dialog md-input-container textarea{min-height:150px}md-dialog.interval-dialog .date-container{padding:16px 0 24px 0}md-dialog.interval-dialog .error-list{font-size:13px}md-dialog.interval-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.interval-dialog .error-list .error .message{font-weight:500}md-dialog.interval-dialog .error-list .error .md-button{margin:0}md-dialog.interval-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.interval-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.interval-dialog{max-width:720px;width:720px}md-dialog.interval-dialog md-dialog-content{display:block;position:relative}md-dialog.interval-dialog md-toolbar .title{font-size:17px}md-dialog.interval-dialog md-input-container textarea{min-height:150px}md-dialog.interval-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.interval-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.interval-dialog .date-container{padding:16px 0 24px 0}md-dialog.interval-dialog .error-list{font-size:13px}md-dialog.interval-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.interval-dialog .error-list .error .message{font-weight:500}md-dialog.interval-dialog .error-list .error .md-button{margin:0}md-dialog.interval-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.interval-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}#tools-interval .header{height:76px;min-height:76px;max-height:76px}#tools-interval .header .goto-intervals-button{margin-right:16px}#tools-interval .header .interval-image{overflow:hidden;width:56px;height:56px;margin-right:16px;border:3px solid rgba(0,0,0,.12)}#tools-interval .header .interval-image img{height:100%;width:auto;max-width:none}#tools-interval .header .subtitle{margin:6px 0 0 0}#tools-interval .interval-detail-form-container{padding:24px;margin-bottom:24px}#tools-interval .interval-detail-form-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}#tools-interval .interval-detail-form-container .handle{cursor:move}#tools-interval .interval-detail-form-container md-input-container md-switch{margin:0!important}#tools-interval .interval-detail-form-container #interval-image-uploader{position:relative}#tools-interval .interval-detail-form-container #interval-image-uploader.dropping .drop-text{display:flex}#tools-interval .interval-detail-form-container #interval-image-uploader .drop-text{display:none;position:absolute;top:0;right:0;bottom:0;left:0;padding:16px;text-align:center;border:2px dashed rgba(0,0,0,.12);background:#fff;font-size:20px;z-index:100}#tools-interval .interval-detail-form-container #interval-image-uploader .upload-button{margin-bottom:16px}#tools-interval .interval-detail-form-container #interval-image-uploader .interval-image{position:relative;width:200px;height:200px;border:1px solid rgba(0,0,0,.12);margin:8px}#tools-interval .interval-detail-form-container #interval-image-uploader .interval-image.uploading .overlay{position:absolute;top:0;right:0;bottom:0;left:0;background:rgba(0,0,0,.87)}#tools-interval .interval-detail-form-container #interval-image-uploader .interval-image .media{max-height:100%}#tools-interval md-table-container thead tr th:not(:first-child):not(.no-padding){padding:0 20px 0 0!important}#tools-interval md-table-container thead th.md-checkbox-column:not(.no-padding){padding:0 24px!important}#tools-interval md-table-container tbody tr td:not(:first-child):not(.no-padding):not(.actions-padding){padding:0 20px 0 0!important}#tools-interval md-table-container.font-size-12 td.md-cell{font-size:12px!important}#intervals{position:relative}#intervals>.header{height:76px;min-height:76px;max-height:76px}#intervals>.header .logo .logo-icon{margin:0 16px 0 0}#intervals>.header .logo .logo-text{font-size:24px}#intervals>.header md-icon{color:#fff}#intervals>.header .search-input-wrapper{position:relative}#intervals>.header .search-input-wrapper label{padding-right:4px;cursor:pointer}#intervals>.header .search-input-wrapper label md-icon{color:rgba(255,255,255,.8)}#intervals>.header .search-input-wrapper md-input-container .md-errors-spacer{display:none}#intervals>.header .search-input-wrapper md-input-container input{border-bottom:1px solid rgba(255,255,255,.8);color:rgba(255,255,255,.8);width:240px}#intervals>.header .search-input-wrapper md-input-container input::placeholder{color:rgba(255,255,255,.8)}#intervals>.header .search-input-wrapper md-input-container input:focus{border-bottom:1px solid #fff;color:#fff}#intervals>.header.selected-bar{position:absolute;top:0;left:0;right:0;z-index:999;background-image:none;opacity:1!important}#intervals>.header.selected-bar .close-button-wrapper{width:244px}#intervals>.content{position:absolute;top:76px;bottom:0;right:0;left:0}#intervals>.content .main{padding:16px 90px 0 4px;position:absolute;top:0;left:24px;right:0;bottom:0}#intervals>.content .main .no-results{box-shadow:0 1px 1px 0 rgba(0,0,0,.14)}#intervals #add-interval-button{position:fixed;bottom:8px;right:8px;padding:0}#intervals #upload-interval-button{position:fixed;bottom:8px;right:8px;padding:0}md-dialog.pause-dialog{max-width:720px;width:720px}md-dialog.pause-dialog md-dialog-content{display:block;position:relative}md-dialog.pause-dialog md-toolbar .title{font-size:17px}md-dialog.pause-dialog md-input-container textarea{min-height:150px}md-dialog.pause-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.pause-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.pause-dialog .date-container{padding:16px 0 24px 0}md-dialog.pause-dialog .error-list{font-size:13px}md-dialog.pause-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.pause-dialog .error-list .error .message{font-weight:500}md-dialog.pause-dialog .error-list .error .md-button{margin:0}md-dialog.pause-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.pause-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}#pauses{position:relative}#pauses>.header{height:76px;min-height:76px;max-height:76px}#pauses>.header .logo .logo-icon{margin:0 16px 0 0}#pauses>.header .logo .logo-text{font-size:24px}#pauses>.header md-icon{color:#fff}#pauses>.header .search-input-wrapper{position:relative}#pauses>.header .search-input-wrapper label{padding-right:4px;cursor:pointer}#pauses>.header .search-input-wrapper label md-icon{color:rgba(255,255,255,.8)}#pauses>.header .search-input-wrapper md-input-container .md-errors-spacer{display:none}#pauses>.header .search-input-wrapper md-input-container input{border-bottom:1px solid rgba(255,255,255,.8);color:rgba(255,255,255,.8);width:240px}#pauses>.header .search-input-wrapper md-input-container input::placeholder{color:rgba(255,255,255,.8)}#pauses>.header .search-input-wrapper md-input-container input:focus{border-bottom:1px solid #fff;color:#fff}#pauses>.header.selected-bar{position:absolute;top:0;left:0;right:0;z-index:999;background-image:none;opacity:1!important}#pauses>.header.selected-bar .close-button-wrapper{width:244px}#pauses>.content{position:absolute;top:76px;bottom:0;right:0;left:0}#pauses>.content .main{padding:16px 90px 0 4px;position:absolute;top:0;left:24px;right:0;bottom:0}#pauses>.content .main .no-results{box-shadow:0 1px 1px 0 rgba(0,0,0,.14)}#pauses #add-pause-button{position:fixed;bottom:8px;right:8px;padding:0}#pauses #upload-pause-button{position:fixed;bottom:8px;right:8px;padding:0}md-dialog.schedule-dialog{max-width:720px;width:720px}md-dialog.schedule-dialog md-dialog-content{display:block;position:relative}md-dialog.schedule-dialog md-toolbar .title{font-size:17px}md-dialog.schedule-dialog md-input-container textarea{min-height:150px}md-dialog.schedule-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.schedule-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.schedule-dialog .date-container{padding:16px 0 24px 0}md-dialog.schedule-dialog .error-list{font-size:13px}md-dialog.schedule-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.schedule-dialog .error-list .error .message{font-weight:500}md-dialog.schedule-dialog .error-list .error .md-button{margin:0}md-dialog.schedule-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.schedule-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}#schedules{position:relative}#schedules>.header{height:76px;min-height:76px;max-height:76px}#schedules>.header .logo .logo-icon{margin:0 16px 0 0}#schedules>.header .logo .logo-text{font-size:24px}#schedules>.header md-icon{color:#fff}#schedules>.header .search-input-wrapper{position:relative}#schedules>.header .search-input-wrapper label{padding-right:4px;cursor:pointer}#schedules>.header .search-input-wrapper label md-icon{color:rgba(255,255,255,.8)}#schedules>.header .search-input-wrapper md-input-container .md-errors-spacer{display:none}#schedules>.header .search-input-wrapper md-input-container input{border-bottom:1px solid rgba(255,255,255,.8);color:rgba(255,255,255,.8);width:240px}#schedules>.header .search-input-wrapper md-input-container input::placeholder{color:rgba(255,255,255,.8)}#schedules>.header .search-input-wrapper md-input-container input:focus{border-bottom:1px solid #fff;color:#fff}#schedules>.header.selected-bar{position:absolute;top:0;left:0;right:0;z-index:999;background-image:none;opacity:1!important}#schedules>.header.selected-bar .close-button-wrapper{width:244px}#schedules>.content{position:absolute;top:76px;bottom:0;right:0;left:0}#schedules>.content .main{padding:16px 90px 0 4px;position:absolute;top:0;left:24px;right:0;bottom:0}#schedules>.content .main .no-results{box-shadow:0 1px 1px 0 rgba(0,0,0,.14)}#schedules #add-schedule-button{position:fixed;bottom:8px;right:8px;padding:0}#schedules #upload-schedule-button{position:fixed;bottom:8px;right:8px;padding:0}md-dialog.sound-dialog{max-width:720px;width:720px}md-dialog.sound-dialog md-dialog-content{display:block;position:relative}md-dialog.sound-dialog md-toolbar .title{font-size:17px}md-dialog.sound-dialog md-input-container textarea{min-height:150px}md-dialog.sound-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.sound-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.sound-dialog .date-container{padding:16px 0 24px 0}md-dialog.sound-dialog .error-list{font-size:13px}md-dialog.sound-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.sound-dialog .error-list .error .message{font-weight:500}md-dialog.sound-dialog .error-list .error .md-button{margin:0}md-dialog.sound-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.sound-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}#sounds{position:relative}#sounds>.header{height:76px;min-height:76px;max-height:76px}#sounds>.header .logo .logo-icon{margin:0 16px 0 0}#sounds>.header .logo .logo-text{font-size:24px}#sounds>.header md-icon{color:#fff}#sounds>.header .search-input-wrapper{position:relative}#sounds>.header .search-input-wrapper label{padding-right:4px;cursor:pointer}#sounds>.header .search-input-wrapper label md-icon{color:rgba(255,255,255,.8)}#sounds>.header .search-input-wrapper md-input-container .md-errors-spacer{display:none}#sounds>.header .search-input-wrapper md-input-container input{border-bottom:1px solid rgba(255,255,255,.8);color:rgba(255,255,255,.8);width:240px}#sounds>.header .search-input-wrapper md-input-container input::placeholder{color:rgba(255,255,255,.8)}#sounds>.header .search-input-wrapper md-input-container input:focus{border-bottom:1px solid #fff;color:#fff}#sounds>.header.selected-bar{position:absolute;top:0;left:0;right:0;z-index:999;background-image:none;opacity:1!important}#sounds>.header.selected-bar .close-button-wrapper{width:244px}#sounds>.content{position:absolute;top:76px;bottom:0;right:0;left:0}#sounds>.content .main{padding:16px 90px 0 4px;position:absolute;top:0;left:24px;right:0;bottom:0}#sounds>.content .main .no-results{box-shadow:0 1px 1px 0 rgba(0,0,0,.14)}#sounds #add-sound-button{position:fixed;bottom:8px;right:8px;padding:0}#sounds #upload-sound-button{position:fixed;bottom:8px;right:8px;padding:0}md-dialog.upload-dialog{max-width:720px;width:720px}md-dialog.upload-dialog md-dialog-content{display:block;position:relative}md-dialog.upload-dialog md-toolbar .title{font-size:17px}md-dialog.upload-dialog md-input-container textarea{min-height:150px}md-dialog.upload-dialog md-progress-linear{padding-top:16px!important}md-dialog.upload-dialog .date-container{padding:16px 0 24px 0}md-dialog.upload-dialog .error-list{font-size:13px}md-dialog.upload-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.upload-dialog .error-list .error .message{font-weight:500}md-dialog.upload-dialog .error-list .error .md-button{margin:0}md-dialog.upload-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.upload-dialog .sound-image{overflow:hidden;max-width:148px;margin-right:16px;border:3px solid rgba(0,0,0,.12);padding:10px}md-dialog.upload-dialog .sound-image img{width:auto;max-width:none}md-dialog.upload-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.tag-dialog{max-width:720px;width:720px}md-dialog.tag-dialog md-dialog-content{display:block;position:relative}md-dialog.tag-dialog md-toolbar .title{font-size:17px}md-dialog.tag-dialog md-input-container textarea{min-height:150px}md-dialog.tag-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.tag-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.tag-dialog .date-container{padding:16px 0 24px 0}md-dialog.tag-dialog .error-list{font-size:13px}md-dialog.tag-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.tag-dialog .error-list .error .message{font-weight:500}md-dialog.tag-dialog .error-list .error .md-button{margin:0}md-dialog.tag-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.tag-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}#tags{position:relative}#tags>.header{height:76px;min-height:76px;max-height:76px}#tags>.header .logo .logo-icon{margin:0 16px 0 0}#tags>.header .logo .logo-text{font-size:24px}#tags>.header md-icon{color:#fff}#tags>.header .search-input-wrapper{position:relative}#tags>.header .search-input-wrapper label{padding-right:4px;cursor:pointer}#tags>.header .search-input-wrapper label md-icon{color:rgba(255,255,255,.8)}#tags>.header .search-input-wrapper md-input-container .md-errors-spacer{display:none}#tags>.header .search-input-wrapper md-input-container input{border-bottom:1px solid rgba(255,255,255,.8);color:rgba(255,255,255,.8);width:240px}#tags>.header .search-input-wrapper md-input-container input::placeholder{color:rgba(255,255,255,.8)}#tags>.header .search-input-wrapper md-input-container input:focus{border-bottom:1px solid #fff;color:#fff}#tags>.header.selected-bar{position:absolute;top:0;left:0;right:0;z-index:999;background-image:none;opacity:1!important}#tags>.header.selected-bar .close-button-wrapper{width:244px}#tags>.content{position:absolute;top:76px;bottom:0;right:0;left:0}#tags>.content .main{padding:16px 90px 0 4px;position:absolute;top:0;left:24px;right:0;bottom:0}#tags>.content .main .no-results{box-shadow:0 1px 1px 0 rgba(0,0,0,.14)}#tags #add-tag-button{position:fixed;bottom:8px;right:8px;padding:0}#tags #upload-tag-button{position:fixed;bottom:8px;right:8px;padding:0}md-dialog.template-dialog{max-width:720px;width:720px}md-dialog.template-dialog md-dialog-content{display:block;position:relative}md-dialog.template-dialog md-toolbar .title{font-size:17px}md-dialog.template-dialog md-input-container textarea{min-height:150px}md-dialog.template-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.template-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.template-dialog .date-container{padding:16px 0 24px 0}md-dialog.template-dialog .error-list{font-size:13px}md-dialog.template-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.template-dialog .error-list .error .message{font-weight:500}md-dialog.template-dialog .error-list .error .md-button{margin:0}md-dialog.template-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.template-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}#templates{position:relative}#templates>.header{height:76px;min-height:76px;max-height:76px}#templates>.header .logo .logo-icon{margin:0 16px 0 0}#templates>.header .logo .logo-text{font-size:24px}#templates>.header md-icon{color:#fff}#templates>.header .search-input-wrapper{position:relative}#templates>.header .search-input-wrapper label{padding-right:4px;cursor:pointer}#templates>.header .search-input-wrapper label md-icon{color:rgba(255,255,255,.8)}#templates>.header .search-input-wrapper md-input-container .md-errors-spacer{display:none}#templates>.header .search-input-wrapper md-input-container input{border-bottom:1px solid rgba(255,255,255,.8);color:rgba(255,255,255,.8);width:240px}#templates>.header .search-input-wrapper md-input-container input::placeholder{color:rgba(255,255,255,.8)}#templates>.header .search-input-wrapper md-input-container input:focus{border-bottom:1px solid #fff;color:#fff}#templates>.header.selected-bar{position:absolute;top:0;left:0;right:0;z-index:999;background-image:none;opacity:1!important}#templates>.header.selected-bar .close-button-wrapper{width:244px}#templates>.content{position:absolute;top:76px;bottom:0;right:0;left:0}#templates>.content .main{padding:16px 90px 0 4px;position:absolute;top:0;left:24px;right:0;bottom:0}#templates>.content .main .no-results{box-shadow:0 1px 1px 0 rgba(0,0,0,.14)}#templates #add-template-button{position:fixed;bottom:8px;right:8px;padding:0}#templates #upload-template-button{position:fixed;bottom:8px;right:8px;padding:0}md-dialog.trigger-dialog{max-width:720px;width:720px}md-dialog.trigger-dialog md-dialog-content{display:block;position:relative}md-dialog.trigger-dialog md-toolbar .title{font-size:17px}md-dialog.trigger-dialog md-input-container textarea{min-height:150px}md-dialog.trigger-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.trigger-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.trigger-dialog .date-container{padding:16px 0 24px 0}md-dialog.trigger-dialog .error-list{font-size:13px}md-dialog.trigger-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.trigger-dialog .error-list .error .message{font-weight:500}md-dialog.trigger-dialog .error-list .error .md-button{margin:0}md-dialog.trigger-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.trigger-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.action-dialog{max-width:720px;width:720px}md-dialog.action-dialog md-dialog-content{display:block;position:relative}md-dialog.action-dialog md-toolbar .title{font-size:17px}md-dialog.action-dialog md-input-container textarea{min-height:150px}md-dialog.action-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.action-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.action-dialog .date-container{padding:16px 0 24px 0}md-dialog.action-dialog .error-list{font-size:13px}md-dialog.action-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.action-dialog .error-list .error .message{font-weight:500}md-dialog.action-dialog .error-list .error .md-button{margin:0}md-dialog.action-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.action-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.allCondition-dialog{max-width:720px;width:720px}md-dialog.allCondition-dialog md-dialog-content{display:block;position:relative}md-dialog.allCondition-dialog md-toolbar .title{font-size:17px}md-dialog.allCondition-dialog md-input-container textarea{min-height:150px}md-dialog.allCondition-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.allCondition-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.allCondition-dialog .date-container{padding:16px 0 24px 0}md-dialog.allCondition-dialog .error-list{font-size:13px}md-dialog.allCondition-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.allCondition-dialog .error-list .error .message{font-weight:500}md-dialog.allCondition-dialog .error-list .error .md-button{margin:0}md-dialog.allCondition-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.allCondition-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.anyCondition-dialog{max-width:720px;width:720px}md-dialog.anyCondition-dialog md-dialog-content{display:block;position:relative}md-dialog.anyCondition-dialog md-toolbar .title{font-size:17px}md-dialog.anyCondition-dialog md-input-container textarea{min-height:150px}md-dialog.anyCondition-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.anyCondition-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.anyCondition-dialog .date-container{padding:16px 0 24px 0}md-dialog.anyCondition-dialog .error-list{font-size:13px}md-dialog.anyCondition-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.anyCondition-dialog .error-list .error .message{font-weight:500}md-dialog.anyCondition-dialog .error-list .error .md-button{margin:0}md-dialog.anyCondition-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.anyCondition-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}#tools-trigger .header{height:76px;min-height:76px;max-height:76px}#tools-trigger .header .goto-triggers-button{margin-right:16px}#tools-trigger .header .trigger-image{overflow:hidden;width:56px;height:56px;margin-right:16px;border:3px solid rgba(0,0,0,.12)}#tools-trigger .header .trigger-image img{height:100%;width:auto;max-width:none}#tools-trigger .header .subtitle{margin:6px 0 0 0}#tools-trigger .trigger-detail-form-container{padding:24px;margin-bottom:24px}#tools-trigger .trigger-detail-form-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}#tools-trigger .trigger-detail-form-container .handle{cursor:move}#tools-trigger .trigger-detail-form-container md-input-container md-switch{margin:0!important}#tools-trigger .trigger-detail-form-container #trigger-image-uploader{position:relative}#tools-trigger .trigger-detail-form-container #trigger-image-uploader.dropping .drop-text{display:flex}#tools-trigger .trigger-detail-form-container #trigger-image-uploader .drop-text{display:none;position:absolute;top:0;right:0;bottom:0;left:0;padding:16px;text-align:center;border:2px dashed rgba(0,0,0,.12);background:#fff;font-size:20px;z-index:100}#tools-trigger .trigger-detail-form-container #trigger-image-uploader .upload-button{margin-bottom:16px}#tools-trigger .trigger-detail-form-container #trigger-image-uploader .trigger-image{position:relative;width:200px;height:200px;border:1px solid rgba(0,0,0,.12);margin:8px}#tools-trigger .trigger-detail-form-container #trigger-image-uploader .trigger-image.uploading .overlay{position:absolute;top:0;right:0;bottom:0;left:0;background:rgba(0,0,0,.87)}#tools-trigger .trigger-detail-form-container #trigger-image-uploader .trigger-image .media{max-height:100%}#tools-trigger md-table-container thead tr th:not(:first-child):not(.no-padding){padding:0 20px 0 0!important}#tools-trigger md-table-container thead th.md-checkbox-column:not(.no-padding){padding:0 24px!important}#tools-trigger md-table-container tbody tr td:not(:first-child):not(.no-padding):not(.actions-padding){padding:0 20px 0 0!important}#tools-trigger md-table-container.font-size-12 td.md-cell{font-size:12px!important}#triggers{position:relative}#triggers>.header{height:76px;min-height:76px;max-height:76px}#triggers>.header .logo .logo-icon{margin:0 16px 0 0}#triggers>.header .logo .logo-text{font-size:24px}#triggers>.header md-icon{color:#fff}#triggers>.header .search-input-wrapper{position:relative}#triggers>.header .search-input-wrapper label{padding-right:4px;cursor:pointer}#triggers>.header .search-input-wrapper label md-icon{color:rgba(255,255,255,.8)}#triggers>.header .search-input-wrapper md-input-container .md-errors-spacer{display:none}#triggers>.header .search-input-wrapper md-input-container input{border-bottom:1px solid rgba(255,255,255,.8);color:rgba(255,255,255,.8);width:240px}#triggers>.header .search-input-wrapper md-input-container input::placeholder{color:rgba(255,255,255,.8)}#triggers>.header .search-input-wrapper md-input-container input:focus{border-bottom:1px solid #fff;color:#fff}#triggers>.header.selected-bar{position:absolute;top:0;left:0;right:0;z-index:999;background-image:none;opacity:1!important}#triggers>.header.selected-bar .close-button-wrapper{width:244px}#triggers>.content{position:absolute;top:76px;bottom:0;right:0;left:0}#triggers>.content .main{padding:16px 90px 0 4px;position:absolute;top:0;left:24px;right:0;bottom:0}#triggers>.content .main .no-results{box-shadow:0 1px 1px 0 rgba(0,0,0,.14)}#triggers #add-trigger-button{position:fixed;bottom:8px;right:8px;padding:0}#triggers #upload-trigger-button{position:fixed;bottom:8px;right:8px;padding:0}md-dialog.trunk-dialog{max-width:720px;width:720px}md-dialog.trunk-dialog md-dialog-content{display:block;position:relative}md-dialog.trunk-dialog md-toolbar .title{font-size:17px}md-dialog.trunk-dialog md-input-container textarea{min-height:150px}md-dialog.trunk-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.trunk-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.trunk-dialog .date-container{padding:16px 0 24px 0}md-dialog.trunk-dialog .error-list{font-size:13px}md-dialog.trunk-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.trunk-dialog .error-list .error .message{font-weight:500}md-dialog.trunk-dialog .error-list .error .md-button{margin:0}md-dialog.trunk-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.trunk-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}#tools-trunk .header{height:76px;min-height:76px;max-height:76px}#tools-trunk .header .goto-trunks-button{margin-right:16px}#tools-trunk .header .trunk-image{overflow:hidden;width:56px;height:56px;margin-right:16px;border:3px solid rgba(0,0,0,.12)}#tools-trunk .header .trunk-image img{height:100%;width:auto;max-width:none}#tools-trunk .header .subtitle{margin:6px 0 0 0}#tools-trunk .trunk-detail-form-container{padding:24px;margin-bottom:24px}#tools-trunk .trunk-detail-form-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}#tools-trunk .trunk-detail-form-container .handle{cursor:move}#tools-trunk .trunk-detail-form-container md-input-container md-switch{margin:0!important}#tools-trunk .trunk-detail-form-container #trunk-image-uploader{position:relative}#tools-trunk .trunk-detail-form-container #trunk-image-uploader.dropping .drop-text{display:flex}#tools-trunk .trunk-detail-form-container #trunk-image-uploader .drop-text{display:none;position:absolute;top:0;right:0;bottom:0;left:0;padding:16px;text-align:center;border:2px dashed rgba(0,0,0,.12);background:#fff;font-size:20px;z-index:100}#tools-trunk .trunk-detail-form-container #trunk-image-uploader .upload-button{margin-bottom:16px}#tools-trunk .trunk-detail-form-container #trunk-image-uploader .trunk-image{position:relative;width:200px;height:200px;border:1px solid rgba(0,0,0,.12);margin:8px}#tools-trunk .trunk-detail-form-container #trunk-image-uploader .trunk-image.uploading .overlay{position:absolute;top:0;right:0;bottom:0;left:0;background:rgba(0,0,0,.87)}#tools-trunk .trunk-detail-form-container #trunk-image-uploader .trunk-image .media{max-height:100%}#tools-trunk md-table-container thead tr th:not(:first-child):not(.no-padding){padding:0 20px 0 0!important}#tools-trunk md-table-container thead th.md-checkbox-column:not(.no-padding){padding:0 24px!important}#tools-trunk md-table-container tbody tr td:not(:first-child):not(.no-padding):not(.actions-padding){padding:0 20px 0 0!important}#tools-trunk md-table-container.font-size-12 td.md-cell{font-size:12px!important}#trunks{position:relative}#trunks>.header{height:76px;min-height:76px;max-height:76px}#trunks>.header .logo .logo-icon{margin:0 16px 0 0}#trunks>.header .logo .logo-text{font-size:24px}#trunks>.header md-icon{color:#fff}#trunks>.header .search-input-wrapper{position:relative}#trunks>.header .search-input-wrapper label{padding-right:4px;cursor:pointer}#trunks>.header .search-input-wrapper label md-icon{color:rgba(255,255,255,.8)}#trunks>.header .search-input-wrapper md-input-container .md-errors-spacer{display:none}#trunks>.header .search-input-wrapper md-input-container input{border-bottom:1px solid rgba(255,255,255,.8);color:rgba(255,255,255,.8);width:240px}#trunks>.header .search-input-wrapper md-input-container input::placeholder{color:rgba(255,255,255,.8)}#trunks>.header .search-input-wrapper md-input-container input:focus{border-bottom:1px solid #fff;color:#fff}#trunks>.header.selected-bar{position:absolute;top:0;left:0;right:0;z-index:999;background-image:none;opacity:1!important}#trunks>.header.selected-bar .close-button-wrapper{width:244px}#trunks>.content{position:absolute;top:76px;bottom:0;right:0;left:0}#trunks>.content .main{padding:16px 90px 0 4px;position:absolute;top:0;left:24px;right:0;bottom:0}#trunks>.content .main .no-results{box-shadow:0 1px 1px 0 rgba(0,0,0,.14)}#trunks #add-trunk-button{position:fixed;bottom:8px;right:8px;padding:0}#trunks #upload-trunk-button{position:fixed;bottom:8px;right:8px;padding:0}md-dialog.variable-dialog{max-width:720px;width:720px}md-dialog.variable-dialog md-dialog-content{display:block;position:relative}md-dialog.variable-dialog md-toolbar .title{font-size:17px}md-dialog.variable-dialog md-input-container textarea{min-height:150px}md-dialog.variable-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.variable-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.variable-dialog .date-container{padding:16px 0 24px 0}md-dialog.variable-dialog .error-list{font-size:13px}md-dialog.variable-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.variable-dialog .error-list .error .message{font-weight:500}md-dialog.variable-dialog .error-list .error .md-button{margin:0}md-dialog.variable-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.variable-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}#variables{position:relative}#variables>.header{height:76px;min-height:76px;max-height:76px}#variables>.header .logo .logo-icon{margin:0 16px 0 0}#variables>.header .logo .logo-text{font-size:24px}#variables>.header md-icon{color:#fff}#variables>.header .search-input-wrapper{position:relative}#variables>.header .search-input-wrapper label{padding-right:4px;cursor:pointer}#variables>.header .search-input-wrapper label md-icon{color:rgba(255,255,255,.8)}#variables>.header .search-input-wrapper md-input-container .md-errors-spacer{display:none}#variables>.header .search-input-wrapper md-input-container input{border-bottom:1px solid rgba(255,255,255,.8);color:rgba(255,255,255,.8);width:240px}#variables>.header .search-input-wrapper md-input-container input::placeholder{color:rgba(255,255,255,.8)}#variables>.header .search-input-wrapper md-input-container input:focus{border-bottom:1px solid #fff;color:#fff}#variables>.header.selected-bar{position:absolute;top:0;left:0;right:0;z-index:999;background-image:none;opacity:1!important}#variables>.header.selected-bar .close-button-wrapper{width:244px}#variables>.content{position:absolute;top:76px;bottom:0;right:0;left:0}#variables>.content .main{padding:16px 90px 0 4px;position:absolute;top:0;left:24px;right:0;bottom:0}#variables>.content .main .no-results{box-shadow:0 1px 1px 0 rgba(0,0,0,.14)}#variables #add-variable-button{position:fixed;bottom:8px;right:8px;padding:0}#variables #upload-variable-button{position:fixed;bottom:8px;right:8px;padding:0}md-dialog.screenRecording-dialog{max-width:720px;width:720px}md-dialog.screenRecording-dialog md-dialog-content{display:block;position:relative}md-dialog.screenRecording-dialog md-toolbar .title{font-size:17px}md-dialog.screenRecording-dialog md-input-container textarea{min-height:150px}md-dialog.screenRecording-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.screenRecording-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.screenRecording-dialog .date-container{padding:16px 0 24px 0}md-dialog.screenRecording-dialog .error-list{font-size:13px}md-dialog.screenRecording-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.screenRecording-dialog .error-list .error .message{font-weight:500}md-dialog.screenRecording-dialog .error-list .error .md-button{margin:0}md-dialog.screenRecording-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.screenRecording-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}#screenRecordings{position:relative}#screenRecordings>.header{height:76px;min-height:76px;max-height:76px}#screenRecordings>.header .logo .logo-icon{margin:0 16px 0 0}#screenRecordings>.header .logo .logo-text{font-size:24px}#screenRecordings>.header md-icon{color:#fff}#screenRecordings>.header .search-input-wrapper{position:relative}#screenRecordings>.header .search-input-wrapper label{padding-right:4px;cursor:pointer}#screenRecordings>.header .search-input-wrapper label md-icon{color:rgba(255,255,255,.8)}#screenRecordings>.header .search-input-wrapper md-input-container .md-errors-spacer{display:none}#screenRecordings>.header .search-input-wrapper md-input-container input{border-bottom:1px solid rgba(255,255,255,.8);color:rgba(255,255,255,.8);width:240px}#screenRecordings>.header .search-input-wrapper md-input-container input::placeholder{color:rgba(255,255,255,.8)}#screenRecordings>.header .search-input-wrapper md-input-container input:focus{border-bottom:1px solid #fff;color:#fff}#screenRecordings>.header.selected-bar{position:absolute;top:0;left:0;right:0;z-index:999;background-image:none;opacity:1!important}#screenRecordings>.header.selected-bar .close-button-wrapper{width:244px}#screenRecordings>.content{position:absolute;top:76px;bottom:0;right:0;left:0}#screenRecordings>.content .main{padding:16px 90px 0 4px;position:absolute;top:0;left:24px;right:0;bottom:0}#screenRecordings>.content .main .no-results{box-shadow:0 1px 1px 0 rgba(0,0,0,.14)}#screenRecordings #add-screenRecording-button{position:fixed;bottom:8px;right:8px;padding:0}#screenRecordings #upload-screenRecording-button{position:fixed;bottom:8px;right:8px;padding:0}md-dialog.voice-routing-dialog{max-width:720px;width:720px}md-dialog.voice-routing-dialog md-dialog-content{display:block;position:relative}md-dialog.voice-routing-dialog md-toolbar .title{font-size:17px}md-dialog.voice-routing-dialog md-input-container textarea{min-height:150px}md-dialog.voice-routing-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.voice-routing-dialog .date-container{padding:16px 0 24px 0}md-dialog.voice-routing-dialog .error-list{font-size:13px}md-dialog.voice-routing-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.voice-routing-dialog .error-list .error .message{font-weight:500}md-dialog.voice-routing-dialog .error-list .error .md-button{margin:0}md-dialog.voice-routing-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.voice-routing-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.interval-dialog{max-width:720px;width:720px}md-dialog.interval-dialog md-dialog-content{display:block;position:relative}md-dialog.interval-dialog md-toolbar .title{font-size:17px}md-dialog.interval-dialog md-input-container textarea{min-height:150px}md-dialog.interval-dialog .date-container{padding:16px 0 24px 0}md-dialog.interval-dialog .error-list{font-size:13px}md-dialog.interval-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.interval-dialog .error-list .error .message{font-weight:500}md-dialog.interval-dialog .error-list .error .md-button{margin:0}md-dialog.interval-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.interval-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}#chanSpies{position:relative}#chanSpies>.header{height:76px;min-height:76px;max-height:76px}#chanSpies>.header .logo .logo-icon{margin:0 16px 0 0}#chanSpies>.header .logo .logo-text{font-size:24px}#chanSpies>.header md-icon{color:#fff}#chanSpies>.header .search-input-wrapper{position:relative}#chanSpies>.header .search-input-wrapper label{padding-right:4px;cursor:pointer}#chanSpies>.header .search-input-wrapper label md-icon{color:rgba(255,255,255,.8)}#chanSpies>.header .search-input-wrapper md-input-container .md-errors-spacer{display:none}#chanSpies>.header .search-input-wrapper md-input-container input{border-bottom:1px solid rgba(255,255,255,.8);color:rgba(255,255,255,.8);width:240px}#chanSpies>.header .search-input-wrapper md-input-container input::placeholder{color:rgba(255,255,255,.8)}#chanSpies>.header .search-input-wrapper md-input-container input:focus{border-bottom:1px solid #fff;color:#fff}#chanSpies>.header.selected-bar{position:absolute;top:0;left:0;right:0;z-index:999;background-image:none;opacity:1!important}#chanSpies>.header.selected-bar .close-button-wrapper{width:244px}#chanSpies>.content{position:absolute;top:76px;bottom:0;right:0;left:0}#chanSpies>.content .main{padding:16px 90px 0 4px;position:absolute;top:0;left:24px;right:0;bottom:0}#chanSpies>.content .main .no-results{box-shadow:0 1px 1px 0 rgba(0,0,0,.14)}#chanSpies #add-chanSpy-button{position:fixed;bottom:8px;right:8px;padding:0}#chanSpies #upload-chanSpy-button{position:fixed;bottom:8px;right:8px;padding:0}md-dialog.chanSpy-dialog{max-width:720px;width:720px}md-dialog.chanSpy-dialog md-dialog-content{display:block;position:relative}md-dialog.chanSpy-dialog md-toolbar .title{font-size:17px}md-dialog.chanSpy-dialog md-input-container textarea{min-height:150px}md-dialog.chanSpy-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.chanSpy-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.chanSpy-dialog .date-container{padding:16px 0 24px 0}md-dialog.chanSpy-dialog .error-list{font-size:13px}md-dialog.chanSpy-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.chanSpy-dialog .error-list .error .message{font-weight:500}md-dialog.chanSpy-dialog .error-list .error .md-button{margin:0}md-dialog.chanSpy-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.chanSpy-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}#contexts{position:relative}#contexts>.header{height:76px;min-height:76px;max-height:76px}#contexts>.header .logo .logo-icon{margin:0 16px 0 0}#contexts>.header .logo .logo-text{font-size:24px}#contexts>.header md-icon{color:#fff}#contexts>.header .search-input-wrapper{position:relative}#contexts>.header .search-input-wrapper label{padding-right:4px;cursor:pointer}#contexts>.header .search-input-wrapper label md-icon{color:rgba(255,255,255,.8)}#contexts>.header .search-input-wrapper md-input-container .md-errors-spacer{display:none}#contexts>.header .search-input-wrapper md-input-container input{border-bottom:1px solid rgba(255,255,255,.8);color:rgba(255,255,255,.8);width:240px}#contexts>.header .search-input-wrapper md-input-container input::placeholder{color:rgba(255,255,255,.8)}#contexts>.header .search-input-wrapper md-input-container input:focus{border-bottom:1px solid #fff;color:#fff}#contexts>.header.selected-bar{position:absolute;top:0;left:0;right:0;z-index:999;background-image:none;opacity:1!important}#contexts>.header.selected-bar .close-button-wrapper{width:244px}#contexts>.content{position:absolute;top:76px;bottom:0;right:0;left:0}#contexts>.content .main{padding:16px 90px 0 4px;position:absolute;top:0;left:24px;right:0;bottom:0}#contexts>.content .main .no-results{box-shadow:0 1px 1px 0 rgba(0,0,0,.14)}#contexts #add-context-button{position:fixed;bottom:8px;right:8px;padding:0}#contexts #upload-context-button{position:fixed;bottom:8px;right:8px;padding:0}md-dialog.context-dialog{max-width:720px;width:720px}md-dialog.context-dialog md-dialog-content{display:block;position:relative}md-dialog.context-dialog md-toolbar .title{font-size:17px}md-dialog.context-dialog md-input-container textarea{min-height:150px}md-dialog.context-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.context-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.context-dialog .date-container{padding:16px 0 24px 0}md-dialog.context-dialog .error-list{font-size:13px}md-dialog.context-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.context-dialog .error-list .error .message{font-weight:500}md-dialog.context-dialog .error-list .error .md-button{margin:0}md-dialog.context-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.context-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.inbound-route-dialog{max-width:720px;width:720px}md-dialog.inbound-route-dialog md-dialog-content{display:block;position:relative}md-dialog.inbound-route-dialog md-toolbar .title{font-size:17px}md-dialog.inbound-route-dialog md-input-container textarea{min-height:150px}md-dialog.inbound-route-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.inbound-route-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.inbound-route-dialog .date-container{padding:16px 0 24px 0}md-dialog.inbound-route-dialog .error-list{font-size:13px}md-dialog.inbound-route-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.inbound-route-dialog .error-list .error .message{font-weight:500}md-dialog.inbound-route-dialog .error-list .error .md-button{margin:0}md-dialog.inbound-route-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.inbound-route-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}#voice-inbound-route .header{height:76px;min-height:76px;max-height:76px}#voice-inbound-route .header .goto-inbound-routes-button{margin-right:16px}#voice-inbound-route .header .inbound-route-image{overflow:hidden;width:56px;height:56px;margin-right:16px;border:3px solid rgba(0,0,0,.12)}#voice-inbound-route .header .inbound-route-image img{height:100%;width:auto;max-width:none}#voice-inbound-route .header .subtitle{margin:6px 0 0 0}#voice-inbound-route .inbound-route-detail-form-container{padding:24px;margin-bottom:24px}#voice-inbound-route .inbound-route-detail-form-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}#voice-inbound-route .inbound-route-detail-form-container .handle{cursor:move}#voice-inbound-route .inbound-route-detail-form-container md-input-container md-switch{margin:0!important}#voice-inbound-route md-table-container thead tr th:not(:first-child):not(.no-padding){padding:0 20px 0 0!important}#voice-inbound-route md-table-container thead th.md-checkbox-column:not(.no-padding){padding:0 24px!important}#voice-inbound-route md-table-container tbody tr td:not(:first-child):not(.no-padding):not(.actions-padding){padding:0 20px 0 0!important}#voice-inbound-route md-table-container.font-size-12 td.md-cell{font-size:12px!important}@media screen and (min-width:1921px){#voice-inbound-route .actionAppData{width:800px!important}}@media screen and (max-width:1920px){#voice-inbound-route .actionAppData{width:700px!important}}@media screen and (min-width:1751px) and (max-width:1919px){#voice-inbound-route .actionAppData{width:600px!important}}@media screen and (min-width:1601px) and (max-width:1750px){#voice-inbound-route .actionAppData{width:500px!important}}@media screen and (min-width:1537px) and (max-width:1600px){#voice-inbound-route .actionAppData{width:450px!important}}@media screen and (min-width:1281px) and (max-width:1536px){#voice-inbound-route .actionAppData{width:300px!important}}@media screen and (max-width:1280px){#voice-inbound-route .actionAppData{width:150px!important}}@media screen and (max-width:960px){#voice-inbound-route .actionAppData{width:80px!important}}#inbound-routes{position:relative}#inbound-routes>.header{height:76px;min-height:76px;max-height:76px}#inbound-routes>.header .logo .logo-icon{margin:0 16px 0 0}#inbound-routes>.header .logo .logo-text{font-size:24px}#inbound-routes>.header md-icon{color:#fff}#inbound-routes>.header .search-input-wrapper{position:relative}#inbound-routes>.header .search-input-wrapper label{padding-right:4px;cursor:pointer}#inbound-routes>.header .search-input-wrapper label md-icon{color:rgba(255,255,255,.8)}#inbound-routes>.header .search-input-wrapper md-input-container .md-errors-spacer{display:none}#inbound-routes>.header .search-input-wrapper md-input-container input{border-bottom:1px solid rgba(255,255,255,.8);color:rgba(255,255,255,.8);width:240px}#inbound-routes>.header .search-input-wrapper md-input-container input::placeholder{color:rgba(255,255,255,.8)}#inbound-routes>.header .search-input-wrapper md-input-container input:focus{border-bottom:1px solid #fff;color:#fff}#inbound-routes>.header.selected-bar{position:absolute;top:0;left:0;right:0;z-index:999;background-image:none;opacity:1!important}#inbound-routes>.header.selected-bar .close-button-wrapper{width:244px}#inbound-routes>.content{position:absolute;top:76px;bottom:0;right:0;left:0}#inbound-routes>.content .main{padding:16px 90px 0 4px;position:absolute;top:0;left:24px;right:0;bottom:0}#inbound-routes>.content .main .no-results{box-shadow:0 1px 1px 0 rgba(0,0,0,.14)}#inbound-routes #add-inbound-route-button{position:fixed;bottom:8px;right:8px;padding:0}md-dialog.internal-route-dialog{max-width:720px;width:720px}md-dialog.internal-route-dialog md-dialog-content{display:block;position:relative}md-dialog.internal-route-dialog md-toolbar .title{font-size:17px}md-dialog.internal-route-dialog md-input-container textarea{min-height:150px}md-dialog.internal-route-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.internal-route-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.internal-route-dialog .date-container{padding:16px 0 24px 0}md-dialog.internal-route-dialog .error-list{font-size:13px}md-dialog.internal-route-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.internal-route-dialog .error-list .error .message{font-weight:500}md-dialog.internal-route-dialog .error-list .error .md-button{margin:0}md-dialog.internal-route-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.internal-route-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}#voice-internal-route .header{height:76px;min-height:76px;max-height:76px}#voice-internal-route .header .goto-internal-routes-button{margin-right:16px}#voice-internal-route .header .internal-route-image{overflow:hidden;width:56px;height:56px;margin-right:16px;border:3px solid rgba(0,0,0,.12)}#voice-internal-route .header .internal-route-image img{height:100%;width:auto;max-width:none}#voice-internal-route .header .subtitle{margin:6px 0 0 0}#voice-internal-route .internal-route-detail-form-container{padding:24px;margin-bottom:24px}#voice-internal-route .internal-route-detail-form-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}#voice-internal-route .internal-route-detail-form-container .handle{cursor:move}#voice-internal-route .internal-route-detail-form-container md-input-container md-switch{margin:0!important}#voice-internal-route md-table-container thead tr th:not(:first-child):not(.no-padding){padding:0 20px 0 0!important}#voice-internal-route md-table-container thead th.md-checkbox-column:not(.no-padding){padding:0 24px!important}#voice-internal-route md-table-container tbody tr td:not(:first-child):not(.no-padding):not(.actions-padding){padding:0 20px 0 0!important}#voice-internal-route md-table-container.font-size-12 td.md-cell{font-size:12px!important}@media screen and (min-width:1921px){#voice-internal-route .actionAppData{width:800px!important}}@media screen and (max-width:1920px){#voice-internal-route .actionAppData{width:700px!important}}@media screen and (min-width:1751px) and (max-width:1919px){#voice-internal-route .actionAppData{width:600px!important}}@media screen and (min-width:1601px) and (max-width:1750px){#voice-internal-route .actionAppData{width:500px!important}}@media screen and (min-width:1537px) and (max-width:1600px){#voice-internal-route .actionAppData{width:450px!important}}@media screen and (min-width:1281px) and (max-width:1536px){#voice-internal-route .actionAppData{width:300px!important}}@media screen and (max-width:1280px){#voice-internal-route .actionAppData{width:150px!important}}@media screen and (max-width:960px){#voice-internal-route .actionAppData{width:80px!important}}#internal-routes{position:relative}#internal-routes>.header{height:76px;min-height:76px;max-height:76px}#internal-routes>.header .logo .logo-icon{margin:0 16px 0 0}#internal-routes>.header .logo .logo-text{font-size:24px}#internal-routes>.header md-icon{color:#fff}#internal-routes>.header .search-input-wrapper{position:relative}#internal-routes>.header .search-input-wrapper label{padding-right:4px;cursor:pointer}#internal-routes>.header .search-input-wrapper label md-icon{color:rgba(255,255,255,.8)}#internal-routes>.header .search-input-wrapper md-input-container .md-errors-spacer{display:none}#internal-routes>.header .search-input-wrapper md-input-container input{border-bottom:1px solid rgba(255,255,255,.8);color:rgba(255,255,255,.8);width:240px}#internal-routes>.header .search-input-wrapper md-input-container input::placeholder{color:rgba(255,255,255,.8)}#internal-routes>.header .search-input-wrapper md-input-container input:focus{border-bottom:1px solid #fff;color:#fff}#internal-routes>.header.selected-bar{position:absolute;top:0;left:0;right:0;z-index:999;background-image:none;opacity:1!important}#internal-routes>.header.selected-bar .close-button-wrapper{width:244px}#internal-routes>.content{position:absolute;top:76px;bottom:0;right:0;left:0}#internal-routes>.content .main{padding:16px 90px 0 4px;position:absolute;top:0;left:24px;right:0;bottom:0}#internal-routes>.content .main .no-results{box-shadow:0 1px 1px 0 rgba(0,0,0,.14)}#internal-routes #add-internal-route-button{position:fixed;bottom:8px;right:8px;padding:0}md-dialog.musiconhold-dialog{max-width:720px;width:720px}md-dialog.musiconhold-dialog md-dialog-content{display:block;position:relative}md-dialog.musiconhold-dialog md-toolbar .title{font-size:17px}md-dialog.musiconhold-dialog md-input-container textarea{min-height:150px}md-dialog.musiconhold-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.musiconhold-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.musiconhold-dialog .date-container{padding:16px 0 24px 0}md-dialog.musiconhold-dialog .error-list{font-size:13px}md-dialog.musiconhold-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.musiconhold-dialog .error-list .error .message{font-weight:500}md-dialog.musiconhold-dialog .error-list .error .md-button{margin:0}md-dialog.musiconhold-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.musiconhold-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.mohSound-dialog{max-width:720px;width:720px}md-dialog.mohSound-dialog md-dialog-content{display:block;position:relative}md-dialog.mohSound-dialog md-toolbar .title{font-size:17px}md-dialog.mohSound-dialog md-input-container textarea{min-height:150px}md-dialog.mohSound-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.mohSound-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.mohSound-dialog .date-container{padding:16px 0 24px 0}md-dialog.mohSound-dialog .error-list{font-size:13px}md-dialog.mohSound-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.mohSound-dialog .error-list .error .message{font-weight:500}md-dialog.mohSound-dialog .error-list .error .md-button{margin:0}md-dialog.mohSound-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.mohSound-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}#voice-musiconhold .header{height:76px;min-height:76px;max-height:76px}#voice-musiconhold .header .goto-musiconholds-button{margin-right:16px}#voice-musiconhold .header .musiconhold-image{overflow:hidden;width:56px;height:56px;margin-right:16px;border:3px solid rgba(0,0,0,.12)}#voice-musiconhold .header .musiconhold-image img{height:100%;width:auto;max-width:none}#voice-musiconhold .header .subtitle{margin:6px 0 0 0}#voice-musiconhold .musiconhold-detail-form-container{padding:24px;margin-bottom:24px}#voice-musiconhold .musiconhold-detail-form-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}#voice-musiconhold .musiconhold-detail-form-container .handle{cursor:move}#voice-musiconhold .musiconhold-detail-form-container md-input-container md-switch{margin:0!important}#voice-musiconhold .musiconhold-detail-form-container #musiconhold-image-uploader{position:relative}#voice-musiconhold .musiconhold-detail-form-container #musiconhold-image-uploader.dropping .drop-text{display:flex}#voice-musiconhold .musiconhold-detail-form-container #musiconhold-image-uploader .drop-text{display:none;position:absolute;top:0;right:0;bottom:0;left:0;padding:16px;text-align:center;border:2px dashed rgba(0,0,0,.12);background:#fff;font-size:20px;z-index:100}#voice-musiconhold .musiconhold-detail-form-container #musiconhold-image-uploader .upload-button{margin-bottom:16px}#voice-musiconhold .musiconhold-detail-form-container #musiconhold-image-uploader .musiconhold-image{position:relative;width:200px;height:200px;border:1px solid rgba(0,0,0,.12);margin:8px}#voice-musiconhold .musiconhold-detail-form-container #musiconhold-image-uploader .musiconhold-image.uploading .overlay{position:absolute;top:0;right:0;bottom:0;left:0;background:rgba(0,0,0,.87)}#voice-musiconhold .musiconhold-detail-form-container #musiconhold-image-uploader .musiconhold-image .media{max-height:100%}#voice-musiconhold md-table-container thead tr th:not(:first-child):not(.no-padding){padding:0 20px 0 0!important}#voice-musiconhold md-table-container thead th.md-checkbox-column:not(.no-padding){padding:0 24px!important}#voice-musiconhold md-table-container tbody tr td:not(:first-child):not(.no-padding):not(.actions-padding){padding:0 20px 0 0!important}#voice-musiconhold md-table-container.font-size-12 td.md-cell{font-size:12px!important}#musiconholds{position:relative}#musiconholds>.header{height:76px;min-height:76px;max-height:76px}#musiconholds>.header .logo .logo-icon{margin:0 16px 0 0}#musiconholds>.header .logo .logo-text{font-size:24px}#musiconholds>.header md-icon{color:#fff}#musiconholds>.header .search-input-wrapper{position:relative}#musiconholds>.header .search-input-wrapper label{padding-right:4px;cursor:pointer}#musiconholds>.header .search-input-wrapper label md-icon{color:rgba(255,255,255,.8)}#musiconholds>.header .search-input-wrapper md-input-container .md-errors-spacer{display:none}#musiconholds>.header .search-input-wrapper md-input-container input{border-bottom:1px solid rgba(255,255,255,.8);color:rgba(255,255,255,.8);width:240px}#musiconholds>.header .search-input-wrapper md-input-container input::placeholder{color:rgba(255,255,255,.8)}#musiconholds>.header .search-input-wrapper md-input-container input:focus{border-bottom:1px solid #fff;color:#fff}#musiconholds>.header.selected-bar{position:absolute;top:0;left:0;right:0;z-index:999;background-image:none;opacity:1!important}#musiconholds>.header.selected-bar .close-button-wrapper{width:244px}#musiconholds>.content{position:absolute;top:76px;bottom:0;right:0;left:0}#musiconholds>.content .main{padding:16px 90px 0 4px;position:absolute;top:0;left:24px;right:0;bottom:0}#musiconholds>.content .main .no-results{box-shadow:0 1px 1px 0 rgba(0,0,0,.14)}#musiconholds #add-musiconhold-button{position:fixed;bottom:8px;right:8px;padding:0}#musiconholds #upload-musiconhold-button{position:fixed;bottom:8px;right:8px;padding:0}md-dialog.outbound-route-dialog{max-width:720px;width:720px}md-dialog.outbound-route-dialog md-dialog-content{display:block;position:relative}md-dialog.outbound-route-dialog md-toolbar .title{font-size:17px}md-dialog.outbound-route-dialog md-input-container textarea{min-height:150px}md-dialog.outbound-route-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.outbound-route-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.outbound-route-dialog .date-container{padding:16px 0 24px 0}md-dialog.outbound-route-dialog .error-list{font-size:13px}md-dialog.outbound-route-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.outbound-route-dialog .error-list .error .message{font-weight:500}md-dialog.outbound-route-dialog .error-list .error .md-button{margin:0}md-dialog.outbound-route-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.outbound-route-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}#voice-outbound-route .header{height:76px;min-height:76px;max-height:76px}#voice-outbound-route .header .goto-outbound-routes-button{margin-right:16px}#voice-outbound-route .header .outbound-route-image{overflow:hidden;width:56px;height:56px;margin-right:16px;border:3px solid rgba(0,0,0,.12)}#voice-outbound-route .header .outbound-route-image img{height:100%;width:auto;max-width:none}#voice-outbound-route .header .subtitle{margin:6px 0 0 0}#voice-outbound-route .outbound-route-detail-form-container{padding:24px;margin-bottom:24px}#voice-outbound-route .outbound-route-detail-form-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}#voice-outbound-route .outbound-route-detail-form-container .handle{cursor:move}#voice-outbound-route .outbound-route-detail-form-container md-input-container md-switch{margin:0!important}#voice-outbound-route md-table-container thead tr th:not(:first-child):not(.no-padding){padding:0 20px 0 0!important}#voice-outbound-route md-table-container thead th.md-checkbox-column:not(.no-padding){padding:0 24px!important}#voice-outbound-route md-table-container tbody tr td:not(:first-child):not(.no-padding):not(.actions-padding){padding:0 20px 0 0!important}#voice-outbound-route md-table-container.font-size-12 td.md-cell{font-size:12px!important}@media screen and (min-width:1921px){#voice-outbound-route .actionAppData{width:800px!important}}@media screen and (max-width:1920px){#voice-outbound-route .actionAppData{width:700px!important}}@media screen and (min-width:1751px) and (max-width:1919px){#voice-outbound-route .actionAppData{width:600px!important}}@media screen and (min-width:1601px) and (max-width:1750px){#voice-outbound-route .actionAppData{width:500px!important}}@media screen and (min-width:1537px) and (max-width:1600px){#voice-outbound-route .actionAppData{width:450px!important}}@media screen and (min-width:1281px) and (max-width:1536px){#voice-outbound-route .actionAppData{width:300px!important}}@media screen and (max-width:1280px){#voice-outbound-route .actionAppData{width:150px!important}}@media screen and (max-width:960px){#voice-outbound-route .actionAppData{width:80px!important}}#outbound-routes{position:relative}#outbound-routes>.header{height:76px;min-height:76px;max-height:76px}#outbound-routes>.header .logo .logo-icon{margin:0 16px 0 0}#outbound-routes>.header .logo .logo-text{font-size:24px}#outbound-routes>.header md-icon{color:#fff}#outbound-routes>.header .search-input-wrapper{position:relative}#outbound-routes>.header .search-input-wrapper label{padding-right:4px;cursor:pointer}#outbound-routes>.header .search-input-wrapper label md-icon{color:rgba(255,255,255,.8)}#outbound-routes>.header .search-input-wrapper md-input-container .md-errors-spacer{display:none}#outbound-routes>.header .search-input-wrapper md-input-container input{border-bottom:1px solid rgba(255,255,255,.8);color:rgba(255,255,255,.8);width:240px}#outbound-routes>.header .search-input-wrapper md-input-container input::placeholder{color:rgba(255,255,255,.8)}#outbound-routes>.header .search-input-wrapper md-input-container input:focus{border-bottom:1px solid #fff;color:#fff}#outbound-routes>.header.selected-bar{position:absolute;top:0;left:0;right:0;z-index:999;background-image:none;opacity:1!important}#outbound-routes>.header.selected-bar .close-button-wrapper{width:244px}#outbound-routes>.content{position:absolute;top:76px;bottom:0;right:0;left:0}#outbound-routes>.content .main{padding:16px 90px 0 4px;position:absolute;top:0;left:24px;right:0;bottom:0}#outbound-routes>.content .main .no-results{box-shadow:0 1px 1px 0 rgba(0,0,0,.14)}#outbound-routes #add-outbound-route-button{position:fixed;bottom:8px;right:8px;padding:0}#realtime{height:auto}#realtime>.content .blink{animation:blinker 2s linear infinite}#realtime>.content .avatar-wrapper{position:relative}#realtime>.content .avatar-wrapper .status{position:absolute;bottom:-3px;right:5px}#realtime>.content .search-input-wrapper{position:relative;margin-left:20px}#realtime>.content .search-input-wrapper label{padding:6px;cursor:pointer}#realtime>.content .search-input-wrapper md-input-container{padding-top:20px}#realtime>.content .main .labels{padding:8px 16px}#realtime>.content .main .labels .label{margin:0 0 2px 4px;padding:2px 5px;font-size:11px;white-space:nowrap;border-radius:2px}#realtime>.content .main .status{position:absolute;bottom:-3px;right:5px}#realtime>.content .main .avatar-wrapper{position:relative}#realtime>.content .main .avatar-wrapper .status{position:absolute;bottom:-3px;right:5px}#realtime>.content .custom-column{padding:0 24px!important}#realtime>.content td.text-center span.text-boxed,#realtime>.content td.text-center span.text-boxed-light{display:block}@keyframes blinker{50%{opacity:0}}md-dialog.voicemail-dialog{max-width:720px;width:720px}md-dialog.voicemail-dialog md-dialog-content{display:block;position:relative}md-dialog.voicemail-dialog md-toolbar .title{font-size:17px}md-dialog.voicemail-dialog md-input-container textarea{min-height:150px}md-dialog.voicemail-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.voicemail-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.voicemail-dialog .date-container{padding:16px 0 24px 0}md-dialog.voicemail-dialog .error-list{font-size:13px}md-dialog.voicemail-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.voicemail-dialog .error-list .error .message{font-weight:500}md-dialog.voicemail-dialog .error-list .error .md-button{margin:0}md-dialog.voicemail-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.voicemail-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}#voice-voicemail .header{height:76px;min-height:76px;max-height:76px}#voice-voicemail .header .goto-voicemails-button{margin-right:16px}#voice-voicemail .header .voicemail-image{overflow:hidden;width:56px;height:56px;margin-right:16px;border:3px solid rgba(0,0,0,.12)}#voice-voicemail .header .voicemail-image img{height:100%;width:auto;max-width:none}#voice-voicemail .header .subtitle{margin:6px 0 0 0}#voice-voicemail .voicemail-detail-form-container{padding:24px;margin-bottom:24px}#voice-voicemail .voicemail-detail-form-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}#voice-voicemail .voicemail-detail-form-container .handle{cursor:move}#voice-voicemail .voicemail-detail-form-container md-input-container md-switch{margin:0!important}#voice-voicemail .voicemail-detail-form-container #voicemail-image-uploader{position:relative}#voice-voicemail .voicemail-detail-form-container #voicemail-image-uploader.dropping .drop-text{display:flex}#voice-voicemail .voicemail-detail-form-container #voicemail-image-uploader .drop-text{display:none;position:absolute;top:0;right:0;bottom:0;left:0;padding:16px;text-align:center;border:2px dashed rgba(0,0,0,.12);background:#fff;font-size:20px;z-index:100}#voice-voicemail .voicemail-detail-form-container #voicemail-image-uploader .upload-button{margin-bottom:16px}#voice-voicemail .voicemail-detail-form-container #voicemail-image-uploader .voicemail-image{position:relative;width:200px;height:200px;border:1px solid rgba(0,0,0,.12);margin:8px}#voice-voicemail .voicemail-detail-form-container #voicemail-image-uploader .voicemail-image.uploading .overlay{position:absolute;top:0;right:0;bottom:0;left:0;background:rgba(0,0,0,.87)}#voice-voicemail .voicemail-detail-form-container #voicemail-image-uploader .voicemail-image .media{max-height:100%}#voice-voicemail md-table-container thead tr th:not(:first-child):not(.no-padding){padding:0 20px 0 0!important}#voice-voicemail md-table-container thead th.md-checkbox-column:not(.no-padding){padding:0 24px!important}#voice-voicemail md-table-container tbody tr td:not(:first-child):not(.no-padding):not(.actions-padding){padding:0 20px 0 0!important}#voice-voicemail md-table-container.font-size-12 td.md-cell{font-size:12px!important}#voicemails{position:relative}#voicemails>.header{height:76px;min-height:76px;max-height:76px}#voicemails>.header .logo .logo-icon{margin:0 16px 0 0}#voicemails>.header .logo .logo-text{font-size:24px}#voicemails>.header md-icon{color:#fff}#voicemails>.header .search-input-wrapper{position:relative}#voicemails>.header .search-input-wrapper label{padding-right:4px;cursor:pointer}#voicemails>.header .search-input-wrapper label md-icon{color:rgba(255,255,255,.8)}#voicemails>.header .search-input-wrapper md-input-container .md-errors-spacer{display:none}#voicemails>.header .search-input-wrapper md-input-container input{border-bottom:1px solid rgba(255,255,255,.8);color:rgba(255,255,255,.8);width:240px}#voicemails>.header .search-input-wrapper md-input-container input::placeholder{color:rgba(255,255,255,.8)}#voicemails>.header .search-input-wrapper md-input-container input:focus{border-bottom:1px solid #fff;color:#fff}#voicemails>.header.selected-bar{position:absolute;top:0;left:0;right:0;z-index:999;background-image:none;opacity:1!important}#voicemails>.header.selected-bar .close-button-wrapper{width:244px}#voicemails>.content{position:absolute;top:76px;bottom:0;right:0;left:0}#voicemails>.content .main{padding:16px 90px 0 4px;position:absolute;top:0;left:24px;right:0;bottom:0}#voicemails>.content .main .no-results{box-shadow:0 1px 1px 0 rgba(0,0,0,.14)}#voicemails #add-voicemail-button{position:fixed;bottom:8px;right:8px;padding:0}#voicemails #upload-voicemail-button{position:fixed;bottom:8px;right:8px;padding:0}md-dialog.voicePrefix-dialog{max-width:720px;width:720px}md-dialog.voicePrefix-dialog md-dialog-content{display:block;position:relative}md-dialog.voicePrefix-dialog md-toolbar .title{font-size:17px}md-dialog.voicePrefix-dialog md-input-container textarea{min-height:150px}md-dialog.voicePrefix-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.voicePrefix-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.voicePrefix-dialog .date-container{padding:16px 0 24px 0}md-dialog.voicePrefix-dialog .error-list{font-size:13px}md-dialog.voicePrefix-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.voicePrefix-dialog .error-list .error .message{font-weight:500}md-dialog.voicePrefix-dialog .error-list .error .md-button{margin:0}md-dialog.voicePrefix-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.voicePrefix-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}#voicePrefixes{position:relative}#voicePrefixes>.header{height:76px;min-height:76px;max-height:76px}#voicePrefixes>.header .logo .logo-icon{margin:0 16px 0 0}#voicePrefixes>.header .logo .logo-text{font-size:24px}#voicePrefixes>.header md-icon{color:#fff}#voicePrefixes>.header .search-input-wrapper{position:relative}#voicePrefixes>.header .search-input-wrapper label{padding-right:4px;cursor:pointer}#voicePrefixes>.header .search-input-wrapper label md-icon{color:rgba(255,255,255,.8)}#voicePrefixes>.header .search-input-wrapper md-input-container .md-errors-spacer{display:none}#voicePrefixes>.header .search-input-wrapper md-input-container input{border-bottom:1px solid rgba(255,255,255,.8);color:rgba(255,255,255,.8);width:240px}#voicePrefixes>.header .search-input-wrapper md-input-container input::placeholder{color:rgba(255,255,255,.8)}#voicePrefixes>.header .search-input-wrapper md-input-container input:focus{border-bottom:1px solid #fff;color:#fff}#voicePrefixes>.header.selected-bar{position:absolute;top:0;left:0;right:0;z-index:999;background-image:none;opacity:1!important}#voicePrefixes>.header.selected-bar .close-button-wrapper{width:244px}#voicePrefixes>.content{position:absolute;top:76px;bottom:0;right:0;left:0}#voicePrefixes>.content .main{padding:16px 90px 0 4px;position:absolute;top:0;left:24px;right:0;bottom:0}#voicePrefixes>.content .main .no-results{box-shadow:0 1px 1px 0 rgba(0,0,0,.14)}#voicePrefixes #add-voicePrefix-button{position:fixed;bottom:8px;right:8px;padding:0}#voicePrefixes #upload-voicePrefix-button{position:fixed;bottom:8px;right:8px;padding:0}md-dialog.voiceQueue-dialog{max-width:720px;width:720px}md-dialog.voiceQueue-dialog md-dialog-content{display:block;position:relative}md-dialog.voiceQueue-dialog md-toolbar .title{font-size:17px}md-dialog.voiceQueue-dialog md-input-container textarea{min-height:150px}md-dialog.voiceQueue-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.voiceQueue-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.voiceQueue-dialog .date-container{padding:16px 0 24px 0}md-dialog.voiceQueue-dialog .error-list{font-size:13px}md-dialog.voiceQueue-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.voiceQueue-dialog .error-list .error .message{font-weight:500}md-dialog.voiceQueue-dialog .error-list .error .md-button{margin:0}md-dialog.voiceQueue-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.voiceQueue-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}#voice-voiceQueue .header{height:76px;min-height:76px;max-height:76px}#voice-voiceQueue .header .goto-voiceQueues-button{margin-right:16px}#voice-voiceQueue .header .voiceQueue-image{overflow:hidden;width:56px;height:56px;margin-right:16px;border:3px solid rgba(0,0,0,.12)}#voice-voiceQueue .header .voiceQueue-image img{height:100%;width:auto;max-width:none}#voice-voiceQueue .header .subtitle{margin:6px 0 0 0}#voice-voiceQueue .voiceQueue-detail-form-container{padding:24px;margin-bottom:24px}#voice-voiceQueue .voiceQueue-detail-form-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}#voice-voiceQueue .voiceQueue-detail-form-container .handle{cursor:move}#voice-voiceQueue .voiceQueue-detail-form-container md-input-container md-switch{margin:0!important}#voice-voiceQueue .voiceQueue-detail-form-container #voiceQueue-image-uploader{position:relative}#voice-voiceQueue .voiceQueue-detail-form-container #voiceQueue-image-uploader.dropping .drop-text{display:flex}#voice-voiceQueue .voiceQueue-detail-form-container #voiceQueue-image-uploader .drop-text{display:none;position:absolute;top:0;right:0;bottom:0;left:0;padding:16px;text-align:center;border:2px dashed rgba(0,0,0,.12);background:#fff;font-size:20px;z-index:100}#voice-voiceQueue .voiceQueue-detail-form-container #voiceQueue-image-uploader .upload-button{margin-bottom:16px}#voice-voiceQueue .voiceQueue-detail-form-container #voiceQueue-image-uploader .voiceQueue-image{position:relative;width:200px;height:200px;border:1px solid rgba(0,0,0,.12);margin:8px}#voice-voiceQueue .voiceQueue-detail-form-container #voiceQueue-image-uploader .voiceQueue-image.uploading .overlay{position:absolute;top:0;right:0;bottom:0;left:0;background:rgba(0,0,0,.87)}#voice-voiceQueue .voiceQueue-detail-form-container #voiceQueue-image-uploader .voiceQueue-image .media{max-height:100%}#voice-voiceQueue md-table-container thead tr th:not(:first-child):not(.no-padding){padding:0 20px 0 0!important}#voice-voiceQueue md-table-container thead th.md-checkbox-column:not(.no-padding){padding:0 24px!important}#voice-voiceQueue md-table-container tbody tr td:not(:first-child):not(.no-padding):not(.actions-padding){padding:0 20px 0 0!important}#voice-voiceQueue md-table-container.font-size-12 td.md-cell{font-size:12px!important}#voiceQueues{position:relative}#voiceQueues>.header{height:76px;min-height:76px;max-height:76px}#voiceQueues>.header .logo .logo-icon{margin:0 16px 0 0}#voiceQueues>.header .logo .logo-text{font-size:24px}#voiceQueues>.header md-icon{color:#fff}#voiceQueues>.header .search-input-wrapper{position:relative}#voiceQueues>.header .search-input-wrapper label{padding-right:4px;cursor:pointer}#voiceQueues>.header .search-input-wrapper label md-icon{color:rgba(255,255,255,.8)}#voiceQueues>.header .search-input-wrapper md-input-container .md-errors-spacer{display:none}#voiceQueues>.header .search-input-wrapper md-input-container input{border-bottom:1px solid rgba(255,255,255,.8);color:rgba(255,255,255,.8);width:240px}#voiceQueues>.header .search-input-wrapper md-input-container input::placeholder{color:rgba(255,255,255,.8)}#voiceQueues>.header .search-input-wrapper md-input-container input:focus{border-bottom:1px solid #fff;color:#fff}#voiceQueues>.header.selected-bar{position:absolute;top:0;left:0;right:0;z-index:999;background-image:none;opacity:1!important}#voiceQueues>.header.selected-bar .close-button-wrapper{width:244px}#voiceQueues>.content{position:absolute;top:76px;bottom:0;right:0;left:0}#voiceQueues>.content .main{padding:16px 90px 0 4px;position:absolute;top:0;left:24px;right:0;bottom:0}#voiceQueues>.content .main .no-results{box-shadow:0 1px 1px 0 rgba(0,0,0,.14)}#voiceQueues #add-voiceQueue-button{position:fixed;bottom:8px;right:8px;padding:0}#voiceQueues #upload-voiceQueue-button{position:fixed;bottom:8px;right:8px;padding:0}md-dialog.voiceRecording-dialog{max-width:720px;width:720px}md-dialog.voiceRecording-dialog md-dialog-content{display:block;position:relative}md-dialog.voiceRecording-dialog md-toolbar .title{font-size:17px}md-dialog.voiceRecording-dialog md-input-container textarea{min-height:150px}md-dialog.voiceRecording-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.voiceRecording-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.voiceRecording-dialog .date-container{padding:16px 0 24px 0}md-dialog.voiceRecording-dialog .error-list{font-size:13px}md-dialog.voiceRecording-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.voiceRecording-dialog .error-list .error .message{font-weight:500}md-dialog.voiceRecording-dialog .error-list .error .md-button{margin:0}md-dialog.voiceRecording-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.voiceRecording-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}#voice-voiceRecording .header{height:76px;min-height:76px;max-height:76px}#voice-voiceRecording .header .goto-voiceRecordings-button{margin-right:16px}#voice-voiceRecording .header .voiceRecording-image{overflow:hidden;width:56px;height:56px;margin-right:16px;border:3px solid rgba(0,0,0,.12)}#voice-voiceRecording .header .voiceRecording-image img{height:100%;width:auto;max-width:none}#voice-voiceRecording .header .subtitle{margin:6px 0 0 0}#voice-voiceRecording .voiceRecording-detail-form-container{padding:24px;margin-bottom:24px}#voice-voiceRecording .voiceRecording-detail-form-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}#voice-voiceRecording .voiceRecording-detail-form-container .handle{cursor:move}#voice-voiceRecording .voiceRecording-detail-form-container md-input-container md-switch{margin:0!important}#voice-voiceRecording .voiceRecording-detail-form-container #voiceRecording-image-uploader{position:relative}#voice-voiceRecording .voiceRecording-detail-form-container #voiceRecording-image-uploader.dropping .drop-text{display:flex}#voice-voiceRecording .voiceRecording-detail-form-container #voiceRecording-image-uploader .drop-text{display:none;position:absolute;top:0;right:0;bottom:0;left:0;padding:16px;text-align:center;border:2px dashed rgba(0,0,0,.12);background:#fff;font-size:20px;z-index:100}#voice-voiceRecording .voiceRecording-detail-form-container #voiceRecording-image-uploader .upload-button{margin-bottom:16px}#voice-voiceRecording .voiceRecording-detail-form-container #voiceRecording-image-uploader .voiceRecording-image{position:relative;width:200px;height:200px;border:1px solid rgba(0,0,0,.12);margin:8px}#voice-voiceRecording .voiceRecording-detail-form-container #voiceRecording-image-uploader .voiceRecording-image.uploading .overlay{position:absolute;top:0;right:0;bottom:0;left:0;background:rgba(0,0,0,.87)}#voice-voiceRecording .voiceRecording-detail-form-container #voiceRecording-image-uploader .voiceRecording-image .media{max-height:100%}#voice-voiceRecording md-table-container thead tr th:not(:first-child):not(.no-padding){padding:0 20px 0 0!important}#voice-voiceRecording md-table-container thead th.md-checkbox-column:not(.no-padding){padding:0 24px!important}#voice-voiceRecording md-table-container tbody tr td:not(:first-child):not(.no-padding):not(.actions-padding){padding:0 20px 0 0!important}#voice-voiceRecording md-table-container.font-size-12 td.md-cell{font-size:12px!important}#voice-voiceRecording .sentiment.POSITIVE{color:#4caf50;font-size:25px}#voice-voiceRecording .sentiment.NEGATIVE{color:#f40505;font-size:30px}#voice-voiceRecording .sentiment.NEUTRAL{color:#03a9f4;font-size:30px}#voice-voiceRecording .sentiment.MIXED{color:#9c27b0;font-size:30px}#voiceRecordings{position:relative}#voiceRecordings>.header{height:76px;min-height:76px;max-height:76px}#voiceRecordings>.header .logo .logo-icon{margin:0 16px 0 0}#voiceRecordings>.header .logo .logo-text{font-size:24px}#voiceRecordings>.header md-icon{color:#fff}#voiceRecordings>.header .search-input-wrapper{position:relative}#voiceRecordings>.header .search-input-wrapper label{padding-right:4px;cursor:pointer}#voiceRecordings>.header .search-input-wrapper label md-icon{color:rgba(255,255,255,.8)}#voiceRecordings>.header .search-input-wrapper md-input-container .md-errors-spacer{display:none}#voiceRecordings>.header .search-input-wrapper md-input-container input{border-bottom:1px solid rgba(255,255,255,.8);color:rgba(255,255,255,.8);width:240px}#voiceRecordings>.header .search-input-wrapper md-input-container input::placeholder{color:rgba(255,255,255,.8)}#voiceRecordings>.header .search-input-wrapper md-input-container input:focus{border-bottom:1px solid #fff;color:#fff}#voiceRecordings>.header.selected-bar{position:absolute;top:0;left:0;right:0;z-index:999;background-image:none;opacity:1!important}#voiceRecordings>.header.selected-bar .close-button-wrapper{width:244px}#voiceRecordings>.content{position:absolute;top:76px;bottom:0;right:0;left:0}#voiceRecordings>.content .main{padding:16px 90px 0 4px;position:absolute;top:0;left:24px;right:0;bottom:0}#voiceRecordings>.content .main .no-results{box-shadow:0 1px 1px 0 rgba(0,0,0,.14)}#voiceRecordings #add-voiceRecording-button{position:fixed;bottom:8px;right:8px;padding:0}#voiceRecordings #upload-voiceRecording-button{position:fixed;bottom:8px;right:8px;padding:0}#realtime{height:auto}#realtime>.content .blink{animation:blinker 2s linear infinite}#realtime>.content .avatar-wrapper{position:relative}#realtime>.content .avatar-wrapper .status{position:absolute;bottom:-3px;right:5px}#realtime>.content .search-input-wrapper{position:relative;margin-left:20px}#realtime>.content .search-input-wrapper label{padding:6px;cursor:pointer}#realtime>.content .search-input-wrapper md-input-container{padding-top:20px}#realtime>.content .main .labels{padding:8px 16px}#realtime>.content .main .labels .label{margin:0 0 2px 4px;padding:2px 5px;font-size:11px;white-space:nowrap;border-radius:2px}#realtime>.content .main .status{position:absolute;bottom:-3px;right:5px}#realtime>.content .main .avatar-wrapper{position:relative}#realtime>.content .main .avatar-wrapper .status{position:absolute;bottom:-3px;right:5px}#realtime>.content .custom-column{padding:0 24px!important}@keyframes blinker{50%{opacity:0}}md-dialog.whatsappAccount-dialog{max-width:720px;width:720px}md-dialog.whatsappAccount-dialog md-dialog-content{display:block;position:relative}md-dialog.whatsappAccount-dialog md-toolbar .title{font-size:17px}md-dialog.whatsappAccount-dialog md-input-container textarea{min-height:150px}md-dialog.whatsappAccount-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.whatsappAccount-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.whatsappAccount-dialog .date-container{padding:16px 0 24px 0}md-dialog.whatsappAccount-dialog .error-list{font-size:13px}md-dialog.whatsappAccount-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.whatsappAccount-dialog .error-list .error .message{font-weight:500}md-dialog.whatsappAccount-dialog .error-list .error .md-button{margin:0}md-dialog.whatsappAccount-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.whatsappAccount-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.whatsappAccount-dialog{max-width:720px;width:720px}md-dialog.whatsappAccount-dialog md-dialog-content{display:block;position:relative}md-dialog.whatsappAccount-dialog md-toolbar .title{font-size:17px}md-dialog.whatsappAccount-dialog md-input-container textarea{min-height:150px}md-dialog.whatsappAccount-dialog .date-container{padding:16px 0 24px 0}md-dialog.whatsappAccount-dialog .error-list{font-size:13px}md-dialog.whatsappAccount-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.whatsappAccount-dialog .error-list .error .message{font-weight:500}md-dialog.whatsappAccount-dialog .error-list .error .md-button{margin:0}md-dialog.whatsappAccount-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.whatsappAccount-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.whatsappAccount-dialog{max-width:720px;width:720px}md-dialog.whatsappAccount-dialog md-dialog-content{display:block;position:relative}md-dialog.whatsappAccount-dialog md-toolbar .title{font-size:17px}md-dialog.whatsappAccount-dialog md-input-container textarea{min-height:150px}md-dialog.whatsappAccount-dialog .date-container{padding:16px 0 24px 0}md-dialog.whatsappAccount-dialog .error-list{font-size:13px}md-dialog.whatsappAccount-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.whatsappAccount-dialog .error-list .error .message{font-weight:500}md-dialog.whatsappAccount-dialog .error-list .error .md-button{margin:0}md-dialog.whatsappAccount-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.whatsappAccount-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.whatsappAccount-dialog{max-width:720px;width:720px}md-dialog.whatsappAccount-dialog md-dialog-content{display:block;position:relative}md-dialog.whatsappAccount-dialog md-toolbar .title{font-size:17px}md-dialog.whatsappAccount-dialog md-input-container textarea{min-height:150px}md-dialog.whatsappAccount-dialog .date-container{padding:16px 0 24px 0}md-dialog.whatsappAccount-dialog .error-list{font-size:13px}md-dialog.whatsappAccount-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.whatsappAccount-dialog .error-list .error .message{font-weight:500}md-dialog.whatsappAccount-dialog .error-list .error .md-button{margin:0}md-dialog.whatsappAccount-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.whatsappAccount-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.whatsappAccount-dialog{max-width:720px;width:720px}md-dialog.whatsappAccount-dialog md-dialog-content{display:block;position:relative}md-dialog.whatsappAccount-dialog md-toolbar .title{font-size:17px}md-dialog.whatsappAccount-dialog md-input-container textarea{min-height:150px}md-dialog.whatsappAccount-dialog .date-container{padding:16px 0 24px 0}md-dialog.whatsappAccount-dialog .error-list{font-size:13px}md-dialog.whatsappAccount-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.whatsappAccount-dialog .error-list .error .message{font-weight:500}md-dialog.whatsappAccount-dialog .error-list .error .md-button{margin:0}md-dialog.whatsappAccount-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.whatsappAccount-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.whatsappAccount-dialog{max-width:720px;width:720px}md-dialog.whatsappAccount-dialog md-dialog-content{display:block;position:relative}md-dialog.whatsappAccount-dialog md-toolbar .title{font-size:17px}md-dialog.whatsappAccount-dialog md-input-container textarea{min-height:150px}md-dialog.whatsappAccount-dialog .date-container{padding:16px 0 24px 0}md-dialog.whatsappAccount-dialog .error-list{font-size:13px}md-dialog.whatsappAccount-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.whatsappAccount-dialog .error-list .error .message{font-weight:500}md-dialog.whatsappAccount-dialog .error-list .error .md-button{margin:0}md-dialog.whatsappAccount-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.whatsappAccount-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.whatsappAccount-dialog{max-width:720px;width:720px}md-dialog.whatsappAccount-dialog md-dialog-content{display:block;position:relative}md-dialog.whatsappAccount-dialog md-toolbar .title{font-size:17px}md-dialog.whatsappAccount-dialog md-input-container textarea{min-height:150px}md-dialog.whatsappAccount-dialog .date-container{padding:16px 0 24px 0}md-dialog.whatsappAccount-dialog .error-list{font-size:13px}md-dialog.whatsappAccount-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.whatsappAccount-dialog .error-list .error .message{font-weight:500}md-dialog.whatsappAccount-dialog .error-list .error .md-button{margin:0}md-dialog.whatsappAccount-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.whatsappAccount-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.whatsappAccount-dialog{max-width:720px;width:720px}md-dialog.whatsappAccount-dialog md-dialog-content{display:block;position:relative}md-dialog.whatsappAccount-dialog md-toolbar .title{font-size:17px}md-dialog.whatsappAccount-dialog md-input-container textarea{min-height:150px}md-dialog.whatsappAccount-dialog .date-container{padding:16px 0 24px 0}md-dialog.whatsappAccount-dialog .error-list{font-size:13px}md-dialog.whatsappAccount-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.whatsappAccount-dialog .error-list .error .message{font-weight:500}md-dialog.whatsappAccount-dialog .error-list .error .md-button{margin:0}md-dialog.whatsappAccount-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.whatsappAccount-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.whatsappAccount-dialog{max-width:720px;width:720px}md-dialog.whatsappAccount-dialog md-dialog-content{display:block;position:relative}md-dialog.whatsappAccount-dialog md-toolbar .title{font-size:17px}md-dialog.whatsappAccount-dialog md-input-container textarea{min-height:150px}md-dialog.whatsappAccount-dialog .date-container{padding:16px 0 24px 0}md-dialog.whatsappAccount-dialog .error-list{font-size:13px}md-dialog.whatsappAccount-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.whatsappAccount-dialog .error-list .error .message{font-weight:500}md-dialog.whatsappAccount-dialog .error-list .error .md-button{margin:0}md-dialog.whatsappAccount-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.whatsappAccount-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.whatsappAccount-dialog{max-width:720px;width:720px}md-dialog.whatsappAccount-dialog md-dialog-content{display:block;position:relative}md-dialog.whatsappAccount-dialog md-toolbar .title{font-size:17px}md-dialog.whatsappAccount-dialog md-input-container textarea{min-height:150px}md-dialog.whatsappAccount-dialog .date-container{padding:16px 0 24px 0}md-dialog.whatsappAccount-dialog .error-list{font-size:13px}md-dialog.whatsappAccount-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.whatsappAccount-dialog .error-list .error .message{font-weight:500}md-dialog.whatsappAccount-dialog .error-list .error .md-button{margin:0}md-dialog.whatsappAccount-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.whatsappAccount-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.whatsappAccount-dialog{max-width:720px;width:720px}md-dialog.whatsappAccount-dialog md-dialog-content{display:block;position:relative}md-dialog.whatsappAccount-dialog md-toolbar .title{font-size:17px}md-dialog.whatsappAccount-dialog md-input-container textarea{min-height:150px}md-dialog.whatsappAccount-dialog .date-container{padding:16px 0 24px 0}md-dialog.whatsappAccount-dialog .error-list{font-size:13px}md-dialog.whatsappAccount-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.whatsappAccount-dialog .error-list .error .message{font-weight:500}md-dialog.whatsappAccount-dialog .error-list .error .md-button{margin:0}md-dialog.whatsappAccount-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.whatsappAccount-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.whatsappAccount-dialog{max-width:720px;width:720px}md-dialog.whatsappAccount-dialog md-dialog-content{display:block;position:relative}md-dialog.whatsappAccount-dialog md-toolbar .title{font-size:17px}md-dialog.whatsappAccount-dialog md-input-container textarea{min-height:150px}md-dialog.whatsappAccount-dialog .date-container{padding:16px 0 24px 0}md-dialog.whatsappAccount-dialog .error-list{font-size:13px}md-dialog.whatsappAccount-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.whatsappAccount-dialog .error-list .error .message{font-weight:500}md-dialog.whatsappAccount-dialog .error-list .error .md-button{margin:0}md-dialog.whatsappAccount-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.whatsappAccount-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.whatsappAccount-dialog{max-width:720px;width:720px}md-dialog.whatsappAccount-dialog md-dialog-content{display:block;position:relative}md-dialog.whatsappAccount-dialog md-toolbar .title{font-size:17px}md-dialog.whatsappAccount-dialog md-input-container textarea{min-height:150px}md-dialog.whatsappAccount-dialog .date-container{padding:16px 0 24px 0}md-dialog.whatsappAccount-dialog .error-list{font-size:13px}md-dialog.whatsappAccount-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.whatsappAccount-dialog .error-list .error .message{font-weight:500}md-dialog.whatsappAccount-dialog .error-list .error .md-button{margin:0}md-dialog.whatsappAccount-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.whatsappAccount-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}md-dialog.whatsappAccount-dialog{max-width:720px;width:720px}md-dialog.whatsappAccount-dialog md-dialog-content{display:block;position:relative}md-dialog.whatsappAccount-dialog md-toolbar .title{font-size:17px}md-dialog.whatsappAccount-dialog md-input-container textarea{min-height:150px}md-dialog.whatsappAccount-dialog .date-container{padding:16px 0 24px 0}md-dialog.whatsappAccount-dialog .error-list{font-size:13px}md-dialog.whatsappAccount-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.whatsappAccount-dialog .error-list .error .message{font-weight:500}md-dialog.whatsappAccount-dialog .error-list .error .md-button{margin:0}md-dialog.whatsappAccount-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.whatsappAccount-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}#whatsapp-whatsappAccount .header{height:76px;min-height:76px;max-height:76px}#whatsapp-whatsappAccount .header .goto-whatsappAccounts-button{margin-right:16px}#whatsapp-whatsappAccount .header .whatsappAccount-image{overflow:hidden;width:56px;height:56px;margin-right:16px;border:3px solid rgba(0,0,0,.12)}#whatsapp-whatsappAccount .header .whatsappAccount-image img{height:100%;width:auto;max-width:none}#whatsapp-whatsappAccount .header .subtitle{margin:6px 0 0 0}#whatsapp-whatsappAccount .whatsappAccount-detail-form-container{padding:24px;margin-bottom:24px}#whatsapp-whatsappAccount .whatsappAccount-detail-form-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}#whatsapp-whatsappAccount .whatsappAccount-detail-form-container .handle{cursor:move}#whatsapp-whatsappAccount .whatsappAccount-detail-form-container md-input-container md-switch{margin:0!important}#whatsapp-whatsappAccount .whatsappAccount-detail-form-container #whatsappAccount-image-uploader{position:relative}#whatsapp-whatsappAccount .whatsappAccount-detail-form-container #whatsappAccount-image-uploader.dropping .drop-text{display:flex}#whatsapp-whatsappAccount .whatsappAccount-detail-form-container #whatsappAccount-image-uploader .drop-text{display:none;position:absolute;top:0;right:0;bottom:0;left:0;padding:16px;text-align:center;border:2px dashed rgba(0,0,0,.12);background:#fff;font-size:20px;z-index:100}#whatsapp-whatsappAccount .whatsappAccount-detail-form-container #whatsappAccount-image-uploader .upload-button{margin-bottom:16px}#whatsapp-whatsappAccount .whatsappAccount-detail-form-container #whatsappAccount-image-uploader .whatsappAccount-image{position:relative;width:200px;height:200px;border:1px solid rgba(0,0,0,.12);margin:8px}#whatsapp-whatsappAccount .whatsappAccount-detail-form-container #whatsappAccount-image-uploader .whatsappAccount-image.uploading .overlay{position:absolute;top:0;right:0;bottom:0;left:0;background:rgba(0,0,0,.87)}#whatsapp-whatsappAccount .whatsappAccount-detail-form-container #whatsappAccount-image-uploader .whatsappAccount-image .media{max-height:100%}#whatsapp-whatsappAccount md-table-container thead tr th:not(:first-child):not(.no-padding){padding:0 20px 0 0!important}#whatsapp-whatsappAccount md-table-container thead th.md-checkbox-column:not(.no-padding){padding:0 24px!important}#whatsapp-whatsappAccount md-table-container tbody tr td:not(:first-child):not(.no-padding):not(.actions-padding){padding:0 20px 0 0!important}#whatsapp-whatsappAccount md-table-container.font-size-12 td.md-cell{font-size:12px!important}@media screen and (min-width:1921px){#whatsapp-whatsappAccount .actionAppData{width:800px!important}}@media screen and (max-width:1920px){#whatsapp-whatsappAccount .actionAppData{width:700px!important}}@media screen and (min-width:1751px) and (max-width:1919px){#whatsapp-whatsappAccount .actionAppData{width:600px!important}}@media screen and (min-width:1601px) and (max-width:1750px){#whatsapp-whatsappAccount .actionAppData{width:500px!important}}@media screen and (min-width:1537px) and (max-width:1600px){#whatsapp-whatsappAccount .actionAppData{width:450px!important}}@media screen and (min-width:1281px) and (max-width:1536px){#whatsapp-whatsappAccount .actionAppData{width:300px!important}}@media screen and (max-width:1280px){#whatsapp-whatsappAccount .actionAppData{width:150px!important}}@media screen and (max-width:960px){#whatsapp-whatsappAccount .actionAppData{width:80px!important}}md-dialog.whatsappCannedAnswer-dialog{max-width:720px;width:720px}md-dialog.whatsappCannedAnswer-dialog md-dialog-content{display:block;position:relative}md-dialog.whatsappCannedAnswer-dialog md-toolbar .title{font-size:17px}md-dialog.whatsappCannedAnswer-dialog md-input-container textarea{min-height:150px}md-dialog.whatsappCannedAnswer-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.whatsappCannedAnswer-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.whatsappCannedAnswer-dialog .date-container{padding:16px 0 24px 0}md-dialog.whatsappCannedAnswer-dialog .error-list{font-size:13px}md-dialog.whatsappCannedAnswer-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.whatsappCannedAnswer-dialog .error-list .error .message{font-weight:500}md-dialog.whatsappCannedAnswer-dialog .error-list .error .md-button{margin:0}md-dialog.whatsappCannedAnswer-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.whatsappCannedAnswer-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}#whatsappAccounts{position:relative}#whatsappAccounts>.header{height:76px;min-height:76px;max-height:76px}#whatsappAccounts>.header .logo .logo-icon{margin:0 16px 0 0}#whatsappAccounts>.header .logo .logo-text{font-size:24px}#whatsappAccounts>.header md-icon{color:#fff}#whatsappAccounts>.header .search-input-wrapper{position:relative}#whatsappAccounts>.header .search-input-wrapper label{padding-right:4px;cursor:pointer}#whatsappAccounts>.header .search-input-wrapper label md-icon{color:rgba(255,255,255,.8)}#whatsappAccounts>.header .search-input-wrapper md-input-container .md-errors-spacer{display:none}#whatsappAccounts>.header .search-input-wrapper md-input-container input{border-bottom:1px solid rgba(255,255,255,.8);color:rgba(255,255,255,.8);width:240px}#whatsappAccounts>.header .search-input-wrapper md-input-container input::placeholder{color:rgba(255,255,255,.8)}#whatsappAccounts>.header .search-input-wrapper md-input-container input:focus{border-bottom:1px solid #fff;color:#fff}#whatsappAccounts>.header.selected-bar{position:absolute;top:0;left:0;right:0;z-index:999;background-image:none;opacity:1!important}#whatsappAccounts>.header.selected-bar .close-button-wrapper{width:244px}#whatsappAccounts>.content{position:absolute;top:76px;bottom:0;right:0;left:0}#whatsappAccounts>.content .main{padding:16px 90px 0 4px;position:absolute;top:0;left:24px;right:0;bottom:0}#whatsappAccounts>.content .main .no-results{box-shadow:0 1px 1px 0 rgba(0,0,0,.14)}#whatsappAccounts #add-whatsappAccount-button{position:fixed;bottom:8px;right:8px;padding:0}#whatsappAccounts #upload-whatsappAccount-button{position:fixed;bottom:8px;right:8px;padding:0}md-dialog.whatsappQueue-dialog{max-width:720px;width:720px}md-dialog.whatsappQueue-dialog md-dialog-content{display:block;position:relative}md-dialog.whatsappQueue-dialog md-toolbar .title{font-size:17px}md-dialog.whatsappQueue-dialog md-input-container textarea{min-height:150px}md-dialog.whatsappQueue-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.whatsappQueue-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.whatsappQueue-dialog .date-container{padding:16px 0 24px 0}md-dialog.whatsappQueue-dialog .error-list{font-size:13px}md-dialog.whatsappQueue-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.whatsappQueue-dialog .error-list .error .message{font-weight:500}md-dialog.whatsappQueue-dialog .error-list .error .md-button{margin:0}md-dialog.whatsappQueue-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.whatsappQueue-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}#whatsapp-whatsappQueue .header{height:76px;min-height:76px;max-height:76px}#whatsapp-whatsappQueue .header .goto-whatsappQueues-button{margin-right:16px}#whatsapp-whatsappQueue .header .whatsappQueue-image{overflow:hidden;width:56px;height:56px;margin-right:16px;border:3px solid rgba(0,0,0,.12)}#whatsapp-whatsappQueue .header .whatsappQueue-image img{height:100%;width:auto;max-width:none}#whatsapp-whatsappQueue .header .subtitle{margin:6px 0 0 0}#whatsapp-whatsappQueue .whatsappQueue-detail-form-container{padding:24px;margin-bottom:24px}#whatsapp-whatsappQueue .whatsappQueue-detail-form-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}#whatsapp-whatsappQueue .whatsappQueue-detail-form-container .handle{cursor:move}#whatsapp-whatsappQueue .whatsappQueue-detail-form-container md-input-container md-switch{margin:0!important}#whatsapp-whatsappQueue .whatsappQueue-detail-form-container #whatsappQueue-image-uploader{position:relative}#whatsapp-whatsappQueue .whatsappQueue-detail-form-container #whatsappQueue-image-uploader.dropping .drop-text{display:flex}#whatsapp-whatsappQueue .whatsappQueue-detail-form-container #whatsappQueue-image-uploader .drop-text{display:none;position:absolute;top:0;right:0;bottom:0;left:0;padding:16px;text-align:center;border:2px dashed rgba(0,0,0,.12);background:#fff;font-size:20px;z-index:100}#whatsapp-whatsappQueue .whatsappQueue-detail-form-container #whatsappQueue-image-uploader .upload-button{margin-bottom:16px}#whatsapp-whatsappQueue .whatsappQueue-detail-form-container #whatsappQueue-image-uploader .whatsappQueue-image{position:relative;width:200px;height:200px;border:1px solid rgba(0,0,0,.12);margin:8px}#whatsapp-whatsappQueue .whatsappQueue-detail-form-container #whatsappQueue-image-uploader .whatsappQueue-image.uploading .overlay{position:absolute;top:0;right:0;bottom:0;left:0;background:rgba(0,0,0,.87)}#whatsapp-whatsappQueue .whatsappQueue-detail-form-container #whatsappQueue-image-uploader .whatsappQueue-image .media{max-height:100%}#whatsapp-whatsappQueue md-table-container thead tr th:not(:first-child):not(.no-padding){padding:0 20px 0 0!important}#whatsapp-whatsappQueue md-table-container thead th.md-checkbox-column:not(.no-padding){padding:0 24px!important}#whatsapp-whatsappQueue md-table-container tbody tr td:not(:first-child):not(.no-padding):not(.actions-padding){padding:0 20px 0 0!important}#whatsapp-whatsappQueue md-table-container.font-size-12 td.md-cell{font-size:12px!important}#whatsappQueues{position:relative}#whatsappQueues>.header{height:76px;min-height:76px;max-height:76px}#whatsappQueues>.header .logo .logo-icon{margin:0 16px 0 0}#whatsappQueues>.header .logo .logo-text{font-size:24px}#whatsappQueues>.header md-icon{color:#fff}#whatsappQueues>.header .search-input-wrapper{position:relative}#whatsappQueues>.header .search-input-wrapper label{padding-right:4px;cursor:pointer}#whatsappQueues>.header .search-input-wrapper label md-icon{color:rgba(255,255,255,.8)}#whatsappQueues>.header .search-input-wrapper md-input-container .md-errors-spacer{display:none}#whatsappQueues>.header .search-input-wrapper md-input-container input{border-bottom:1px solid rgba(255,255,255,.8);color:rgba(255,255,255,.8);width:240px}#whatsappQueues>.header .search-input-wrapper md-input-container input::placeholder{color:rgba(255,255,255,.8)}#whatsappQueues>.header .search-input-wrapper md-input-container input:focus{border-bottom:1px solid #fff;color:#fff}#whatsappQueues>.header.selected-bar{position:absolute;top:0;left:0;right:0;z-index:999;background-image:none;opacity:1!important}#whatsappQueues>.header.selected-bar .close-button-wrapper{width:244px}#whatsappQueues>.content{position:absolute;top:76px;bottom:0;right:0;left:0}#whatsappQueues>.content .main{padding:16px 90px 0 4px;position:absolute;top:0;left:24px;right:0;bottom:0}#whatsappQueues>.content .main .no-results{box-shadow:0 1px 1px 0 rgba(0,0,0,.14)}#whatsappQueues #add-whatsappQueue-button{position:fixed;bottom:8px;right:8px;padding:0}#whatsappQueues #upload-whatsappQueue-button{position:fixed;bottom:8px;right:8px;padding:0}#layout-vertical-navigation-fullwidth-toolbar-2 #vertical-navigation{width:240px;min-width:240px;max-width:240px;overflow-x:hidden;transition:all .3s cubic-bezier(.55,0,.55,.2),width .1s linear,min-width .1s linear,max-width .1s linear;box-shadow:0 3px 5px -1px rgba(0,0,0,.2),0 6px 10px 0 rgba(0,0,0,.14),0 1px 18px 0 rgba(0,0,0,.12)}#layout-vertical-navigation-fullwidth-toolbar-2 #vertical-navigation .navigation-header{height:64px;min-height:64px;background-color:rgba(255,255,255,.05);padding:0 16px 0 24px}#layout-vertical-navigation-fullwidth-toolbar-2 #vertical-navigation:not(._md-locked-open){box-shadow:0 5px 5px -3px rgba(0,0,0,.2),0 8px 10px 1px rgba(0,0,0,.14),0 3px 14px 2px rgba(0,0,0,.12)}@media only screen and (min-width:960px){.ms-navigation-folded #content-container{margin-left:64px}.ms-navigation-folded #layout-vertical-navigation-fullwidth-toolbar-2 #vertical-navigation{position:absolute}.ms-navigation-folded:not(.ms-navigation-folded-open) #layout-vertical-navigation-fullwidth-toolbar-2 #vertical-navigation{position:absolute;width:64px;min-width:64px;max-width:64px}.ms-navigation-folded:not(.ms-navigation-folded-open) #layout-vertical-navigation-fullwidth-toolbar-2 #vertical-navigation .navigation-header{padding:0 16px}.ms-navigation-folded:not(.ms-navigation-folded-open) #layout-vertical-navigation-fullwidth-toolbar-2 #vertical-navigation .navigation-header .logo-text{display:none}}#vertical-navigation{width:240px;min-width:240px;max-width:240px;overflow-x:hidden;transition:all .3s cubic-bezier(.55,0,.55,.2),width .1s linear,min-width .1s linear,max-width .1s linear;box-shadow:0 3px 5px -1px rgba(0,0,0,.2),0 6px 10px 0 rgba(0,0,0,.14),0 1px 18px 0 rgba(0,0,0,.12)}#vertical-navigation .navigation-header{height:64px;min-height:64px;background-color:rgba(255,255,255,.05);padding:0 16px 0 24px}#vertical-navigation .navigation-header .logo .logo-image{display:block;width:32px;min-width:32px;height:32px;line-height:32px;text-align:center;font-size:16px;font-weight:500;color:#fff;border-radius:2px}#vertical-navigation .navigation-header .logo .logo-text{color:#fff;margin-left:16px;font-size:16px}#vertical-navigation .navigation-header .fold-toggle{transition:transform .3s ease-in-out .1s;transform:rotate(0);margin:0;padding:8px;width:34px!important;height:34px!important;cursor:pointer}#vertical-navigation:not(._md-locked-open){box-shadow:0 5px 5px -3px rgba(0,0,0,.2),0 8px 10px 1px rgba(0,0,0,.14),0 3px 14px 2px rgba(0,0,0,.12)}@media only screen and (min-width:960px){.ms-navigation-folded #content-container{margin-left:64px}.ms-navigation-folded #vertical-navigation{position:absolute}.ms-navigation-folded #vertical-navigation .navigation-header .fold-toggle{transform:rotate(180deg);opacity:0}.ms-navigation-folded.ms-navigation-folded-open #vertical-navigation .navigation-header .fold-toggle{transition:transform .3s ease-in-out .1s,opacity .3s ease-in-out .2s;opacity:1}.ms-navigation-folded:not(.ms-navigation-folded-open) #vertical-navigation{position:absolute;width:64px;min-width:64px;max-width:64px}.ms-navigation-folded:not(.ms-navigation-folded-open) #vertical-navigation .navigation-header{padding:0 16px}.ms-navigation-folded:not(.ms-navigation-folded-open) #vertical-navigation .navigation-header .logo-text{display:none}}#quick-panel{width:330px;min-width:330px;max-width:330px;z-index:99}#quick-panel md-content{height:100%}#quick-panel md-content md-tabs{position:static;height:100%}#quick-panel md-content md-tabs md-tabs-wrapper{background-color:rgba(0,0,0,.03);border-bottom:1px solid rgba(0,0,0,.06)}#quick-panel md-content md-tabs md-tabs-wrapper .md-tab{max-width:none!important}#quick-panel md-content md-tabs md-tabs-content-wrapper md-tab-content{height:100%;overflow:hidden}#quick-panel md-content md-tabs md-tabs-content-wrapper md-tab-content>div{overflow:hidden;height:100%}.unread-message-count-chat{position:absolute;top:5px;left:10px;width:18px;height:18px;z-index:10;border-radius:50%;text-align:center;line-height:18px;font-size:10px}@media screen and (max-width:600px){#quick-panel{width:80%;min-width:80%;max-width:80%}}#quick-panel .activity-tab .friends .friend{position:relative}#quick-panel .activity-tab .friends .friend .status{position:absolute;top:8px;left:44px;width:18px;height:18px;z-index:10;border-radius:50%;border:3px solid #fff}#quick-panel .activity-tab .friends .friend .status.online{background-color:#00c853}#quick-panel .activity-tab .friends .friend .status.offline{background-color:#d50000}#quick-panel .activity-tab .friends .friend .status.away{background-color:#ff6d00}#quick-panel .activity-tab .friends .friend .unread-message-count{position:absolute;left:16px;bottom:16px;width:18px;height:18px;z-index:10;border-radius:50%;text-align:center;line-height:18px;font-size:11px}#quick-panel .activity-tab .servers .server .status{margin:24px 20px 28px 8px}#quick-panel .activity-tab .servers .server .status.normal{color:#00c853}#quick-panel .activity-tab .servers .server .status.warn{color:#d50000}#quick-panel .activity-tab .servers .server .status.error{color:#ff6d00}#quick-panel .activity-tab .stat md-progress-linear.normal .md-bar{background-color:#00c853}#quick-panel .activity-tab .stat md-progress-linear.normal .md-container{background-color:rgba(0,200,83,.3)}#quick-panel .activity-tab .stat md-progress-linear.warn .md-bar{background-color:#ff6d00}#quick-panel .activity-tab .stat md-progress-linear.warn .md-container{background-color:rgba(255,109,0,.3)}#quick-panel .activity-tab .stat md-progress-linear.alert .md-bar{background-color:#d50000}#quick-panel .activity-tab .stat md-progress-linear.alert .md-container{background-color:rgba(213,0,0,.3)}#quick-panel .chat-tab .chat,#quick-panel .chat-tab .main{position:absolute;width:100%;top:0;bottom:0}#quick-panel .chat-tab .main .contact{position:relative}#quick-panel .chat-tab .main .contact .status{position:absolute;top:8px;left:44px;width:18px;height:18px;border:3px solid #fff;border-radius:50%;z-index:10}#quick-panel .chat-tab .main .contact .status.online{background-color:#00c853}#quick-panel .chat-tab .main .contact .status.offline{background-color:#d50000}#quick-panel .chat-tab .main .contact .status.away{background-color:#ff6d00}#quick-panel .chat-tab .main .contact .unread-message-count{position:absolute;left:16px;bottom:16px;width:18px;height:18px;z-index:10;border-radius:50%;text-align:center;line-height:18px;font-size:11px}#quick-panel .chat-tab .main .recent .contact .status{top:18px}#quick-panel .chat-tab .chat{max-height:100%;overflow:hidden}#quick-panel .chat-tab .chat .message-row .bubble{position:relative;padding:8px;background-color:#eceff1;border:1px solid #dcdfe1}#quick-panel .chat-tab .chat .message-row .bubble:after,#quick-panel .chat-tab .chat .message-row .bubble:before{content:' ';position:absolute;width:0;height:0}#quick-panel .chat-tab .chat .message-row .bubble:after{left:-7px;right:auto;top:0;bottom:auto;border:11px solid;border-color:#eceff1 transparent transparent transparent}#quick-panel .chat-tab .chat .message-row .bubble:before{left:-9px;right:auto;top:-1px;bottom:auto;border:8px solid;border-color:#dcdfe1 transparent transparent transparent}#quick-panel .chat-tab .chat .message-row .bubble .time{font-size:11px;margin-top:8px}#quick-panel .chat-tab .chat .message-row .bubble .message{word-wrap:break-word}#quick-panel .chat-tab .chat .message-row.contact .avatar{margin:0 16px 0 0}#quick-panel .chat-tab .chat .message-row.user{align-items:flex-end}#quick-panel .chat-tab .chat .message-row.user .avatar{order:2;margin:0 0 0 16px}#quick-panel .chat-tab .chat .message-row.user .bubble{background-color:#e8f5e9;border:1px solid #dfebe0;order:1}#quick-panel .chat-tab .chat .message-row.user .bubble:after{right:-7px;left:auto;top:auto;bottom:0;border-color:transparent transparent #e8f5e9 transparent}#quick-panel .chat-tab .chat .message-row.user .bubble:before{right:-9px;left:auto;top:auto;bottom:-1px;border-color:transparent transparent #dfebe0 transparent}#quick-panel .chat-tab .chat .reply{border-top:1px solid rgba(0,0,0,.12)}#quick-panel .chat-tab .chat .reply textarea{margin:8px;resize:none;padding:8px 16px 8px 8px}#timeline{position:relative;height:auto;padding-bottom:30px}#timeline:before{display:block;position:absolute;z-index:10;content:'';width:2px;background:rgba(0,0,0,.08);top:0;left:50%;bottom:0;margin-left:-1px}#timeline .ms-timeline-item{overflow:hidden;position:relative;z-index:20;width:100%;margin:0 auto;max-width:1200px}#timeline .ms-timeline-item .timeline-card{order:1}#timeline .ms-timeline-item .timeline-card .interaction .header .avatar .image{display:block;width:40px;height:40px;border-radius:20px}#timeline .ms-timeline-item .timeline-card .interaction .media .image{width:100%}#timeline .ms-timeline-item .timeline-point{position:absolute;width:40px;height:40px;line-height:40px;text-align:center;border-radius:50%;left:50%;margin:16px 0 0 -28px;order:2}#timeline .ms-timeline-item .timeline-point md-icon{color:#fff}#timeline .ms-timeline-item .timeline-detail{flex:50% 0 0;padding-top:28px;order:3}#timeline .ms-timeline-item .timeline-detail .time{font-size:15px;padding-left:68px}#timeline .ms-timeline-item .timeline-detail .event{color:rgba(0,0,0,.54);padding-left:68px}#timeline .ms-timeline-item:nth-child(odd) .timeline-card{flex-direction:row-reverse}#timeline .ms-timeline-item:nth-child(even) .timeline-card{order:3;padding-right:0}#timeline .ms-timeline-item:nth-child(even) .timeline-card ms-card{padding-left:84px}#timeline .ms-timeline-item:nth-child(even) .timeline-detail{order:1;padding-left:0;text-align:right}#timeline .ms-timeline-item:nth-child(even) .timeline-detail .event,#timeline .ms-timeline-item:nth-child(even) .timeline-detail .time{padding-right:68px}#timeline .ms-timeline-item:first-child{padding-top:15px}#timeline .ms-timeline-item.animate .timeline-card{animation:slide-in-left .4s}#timeline .ms-timeline-item.animate .timeline-point{animation:slide-in-bottom .4s}#timeline .ms-timeline-item.animate .timeline-detail{animation:slide-in-right .4s}#timeline .ms-timeline-item:nth-child(even).animate .timeline-card{animation:slide-in-right .4s}#timeline .ms-timeline-item:nth-child(even).animate .timeline-detail{animation:slide-in-left .4s}#timeline.timeline-left .ms-timeline-item .timeline-card{order:1}#timeline.timeline-left .ms-timeline-item .timeline-card ms-card{padding-right:68px;padding-left:0;margin-left:auto}#timeline.timeline-left .ms-timeline-item .timeline-detail{order:3;text-align:left}#timeline.timeline-left .ms-timeline-item.animate .timeline-card{animation:slide-in-left .4s}#timeline.timeline-left .ms-timeline-item.animate .timeline-detail{animation:slide-in-right .4s}#timeline.timeline-right .ms-timeline-item .timeline-card{order:3}#timeline.timeline-right .ms-timeline-item .timeline-card ms-card{padding-left:68px;padding-right:0;margin-right:auto}#timeline.timeline-right .ms-timeline-item .timeline-detail{order:1;text-align:right}#timeline.timeline-right .ms-timeline-item .timeline-detail .event,#timeline.timeline-right .ms-timeline-item .timeline-detail .time{padding-right:68px;padding-left:0}#timeline.timeline-right .ms-timeline-item.animate .timeline-card{animation:slide-in-right .4s}#timeline.timeline-right .ms-timeline-item.animate .timeline-detail{animation:slide-in-left .4s}md-dialog.group-dialog{max-width:720px;width:720px}md-dialog.group-dialog md-dialog-content{display:block;position:relative}md-dialog.group-dialog md-toolbar .title{font-size:17px}md-dialog.group-dialog md-input-container textarea{min-height:150px}md-dialog.group-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.group-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.group-dialog .date-container{padding:16px 0 24px 0}md-dialog.group-dialog .error-list{font-size:13px}md-dialog.group-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.group-dialog .error-list .error .message{font-weight:500}md-dialog.group-dialog .error-list .error .md-button{margin:0}md-dialog.group-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.group-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}#quick-panel .group-tab .chat,#quick-panel .group-tab .main{position:absolute;width:100%;top:0;bottom:0}#quick-panel .group-tab .main .contact{position:relative}#quick-panel .group-tab .main .contact .status{position:absolute;top:8px;left:44px;width:18px;height:18px;border:3px solid #fff;border-radius:50%;z-index:10}#quick-panel .group-tab .main .contact .status.online{background-color:#00c853}#quick-panel .group-tab .main .contact .status.offline{background-color:#d50000}#quick-panel .group-tab .main .contact .status.away{background-color:#ff6d00}#quick-panel .group-tab .main .contact .unread-message-count{position:absolute;left:16px;bottom:16px;width:18px;height:18px;z-index:10;border-radius:50%;text-align:center;line-height:18px;font-size:11px}#quick-panel .group-tab .main .recent .contact .status{top:18px}#quick-panel .group-tab .chat{max-height:100%;overflow:hidden}#quick-panel .group-tab .chat .message-row{padding:8px}#quick-panel .group-tab .chat .message-row .bubble{position:relative;padding:8px;background-color:#eceff1;border:1px solid #dcdfe1}#quick-panel .group-tab .chat .message-row .bubble:after,#quick-panel .group-tab .chat .message-row .bubble:before{content:' ';position:absolute;width:0;height:0}#quick-panel .group-tab .chat .message-row .bubble:after{left:-7px;right:auto;top:0;bottom:auto;border:11px solid;border-color:#eceff1 transparent transparent transparent}#quick-panel .group-tab .chat .message-row .bubble:before{left:-9px;right:auto;top:-1px;bottom:auto;border:8px solid;border-color:#dcdfe1 transparent transparent transparent}#quick-panel .group-tab .chat .message-row .bubble .time{font-size:11px;margin-top:8px}#quick-panel .group-tab .chat .message-row .bubble .message{word-wrap:break-word}#quick-panel .group-tab .chat .message-row.contact .avatar{margin:0 16px 0 0}#quick-panel .group-tab .chat .message-row.user{align-items:flex-end}#quick-panel .group-tab .chat .message-row.user .avatar{order:2;margin:0 0 0 16px}#quick-panel .group-tab .chat .message-row.user .bubble{background-color:#e8f5e9;border:1px solid #dfebe0;order:1}#quick-panel .group-tab .chat .message-row.user .bubble:after{right:-7px;left:auto;top:auto;bottom:0;border-color:transparent transparent #e8f5e9 transparent}#quick-panel .group-tab .chat .message-row.user .bubble:before{right:-9px;left:auto;top:auto;bottom:-1px;border-color:transparent transparent #dfebe0 transparent}#quick-panel .group-tab .chat .reply{border-top:1px solid rgba(0,0,0,.12)}#quick-panel .group-tab .chat .reply textarea{margin:8px;resize:none;padding:8px 16px 8px 8px}md-dialog.group-dialog{max-width:720px;width:720px}md-dialog.group-dialog md-dialog-content{display:block;position:relative}md-dialog.group-dialog md-toolbar .title{font-size:17px}md-dialog.group-dialog md-input-container textarea{min-height:150px}md-dialog.group-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.group-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.group-dialog .date-container{padding:16px 0 24px 0}md-dialog.group-dialog .error-list{font-size:13px}md-dialog.group-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.group-dialog .error-list .error .message{font-weight:500}md-dialog.group-dialog .error-list .error .md-button{margin:0}md-dialog.group-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.group-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}#reset-password{height:100%;background:url(/assets/images/backgrounds/tech.png) no-repeat;background-size:cover}#reset-password #reset-password-form-wrapper{flex:1 0 auto;padding:32px}#reset-password #reset-password-form-wrapper #reset-password-form{width:384px;max-width:384px;padding:32px;text-align:center;background:#fff}#reset-password #reset-password-form-wrapper #reset-password-form .logo{width:128px;height:128px;line-height:128px;font-size:86px;font-weight:500;margin:32px auto;color:#fff;border-radius:2px}#reset-password #reset-password-form-wrapper #reset-password-form .title{font-size:17px;margin:16px 0 32px 0}#reset-password #reset-password-form-wrapper #reset-password-form .logo_login{max-height:200px}#reset-password #reset-password-form-wrapper #reset-password-form form{width:100%;text-align:left}#reset-password #reset-password-form-wrapper #reset-password-form form .submit-button{width:220px;margin:16px auto;display:block}#reset-password #reset-password-form-wrapper #reset-password-form .login{margin:32px auto 24px auto;width:250px;font-weight:500}#reset-password #reset-password-form-wrapper #reset-password-form .login .text{margin-right:8px}@media screen and (max-width:600px){#reset-password #reset-password-form-wrapper{padding:16px}#reset-password #reset-password-form-wrapper #reset-password-form{padding:24px;width:100%}#reset-password #reset-password-form-wrapper #reset-password-form form .md-button{width:90%}}md-dialog.preview-dialog{max-width:1020px;width:1020px}md-dialog.preview-dialog md-dialog-content{display:block;position:relative;padding:0}md-dialog.preview-dialog md-dialog-content .recall-me-info{position:relative;overflow-y:hidden;overflow-x:auto;background-color:rgba(0,0,0,.03);border-bottom:1px solid rgba(0,0,0,.12);min-height:64px;padding:8px 8px 8px 16px}md-dialog.preview-dialog md-toolbar .title{font-size:17px}md-dialog.preview-dialog md-input-container textarea{min-height:150px}md-dialog.preview-dialog md-input-container .hint{font-size:10px;line-height:20px;transition:all .3s cubic-bezier(.55,0,.55,.2);color:rgba(0,0,0,.54)}md-dialog.preview-dialog md-input-container md-input-container md-switch{margin:0!important}md-dialog.preview-dialog .date-container{padding:16px 0 24px 0}md-dialog.preview-dialog .error-list{font-size:13px}md-dialog.preview-dialog .error-list .error{background-color:rgba(244,67,54,.08);border:1px solid rgba(244,67,54,.12);padding-left:16px;margin-top:8px;border-radius:2px}md-dialog.preview-dialog .error-list .error .message{font-weight:500}md-dialog.preview-dialog .error-list .error .md-button{margin:0}md-dialog.preview-dialog .error-list .error:last-child{margin-bottom:30px}md-dialog.preview-dialog md-dialog-actions{position:relative;overflow-y:hidden;overflow-x:auto;justify-content:space-between;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.12)}@media screen and (max-width:1280px){md-dialog.task-dialog{width:80%}}@media screen and (max-width:960px){md-dialog.task-dialog{width:90%}}#toolbar{width:100%;height:64px;min-height:64px;max-height:64px;z-index:55!important}#toolbar .blink{animation:blinker 2s linear infinite}#toolbar #navigation-toggle{width:64px;min-width:64px;height:64px;margin:0;border-right:1px solid rgba(0,0,0,.12);border-radius:0}#toolbar .logo-image{display:block;width:32px;min-width:32px;height:32px;line-height:32px;text-align:center;font-size:16px;font-weight:500;color:#fff;border-radius:2px;margin-left:10px;margin-right:8px}#toolbar #user-menu{height:64px;padding:0}#toolbar #user-menu md-menu-item .md-button{font-size:15px}#toolbar #user-menu md-menu-item .md-button md-icon{margin:auto 16px auto 0}#toolbar #user-menu .user-button{margin:0;padding:0 16px;height:64px;text-transform:none}#toolbar #user-menu .user-button .avatar-wrapper{position:relative}#toolbar #user-menu .user-button .avatar-wrapper .status{position:absolute;bottom:-3px;right:5px}#toolbar #user-menu .user-button .username{margin:0 12px 0 8px}#toolbar #language-menu{height:64px}#toolbar #language-menu .language-button{min-width:64px;height:64px;margin:0;padding:0 16px;border-radius:0}#toolbar #language-menu .language-button .iso{text-transform:uppercase}#toolbar #language-menu .language-button .flag{margin-right:8px}#toolbar #quick-panel-toggle{width:64px;height:64px;margin:0;border-radius:0}#toolbar #quick-panel-toggle .unread-message-count{position:absolute;top:8px;left:38px;width:18px;height:18px;z-index:10;border-radius:50%;text-align:center;line-height:18px;font-size:10px}#toolbar .toolbar-separator{height:64px;width:1px;background:rgba(0,0,0,.12)}#language-menu-content md-menu-item .flag{margin-right:16px}#language-message{min-height:88px;max-width:600px}#language-message .md-toast-content{height:90px}.open-contact-count{left:25px}.md-button.preview-button{min-width:46px;min-height:50px}@media screen and (max-width:600px){#toolbar #user-menu .user-button{min-width:64px;padding:0 2px 0 10px}}.badge-count{position:absolute;top:1px;width:18px;height:18px;z-index:10;border-radius:50%;text-align:center;line-height:18px;font-size:10px}.queues-call-count{left:27px}.geEditor{font-family:Helvetica Neue,Helvetica,Arial Unicode MS,Arial;font-size:10pt;overflow:hidden;height:100%}.geMenubarContainer .geItem,.geSidebarContainer .geTitle,.geToolbar .geButton,.geToolbar .geLabel{cursor:pointer!important}.geContentEditable div,.geContentEditable table,.geContentEditable table td{border:1px dashed #d3d3d3}.geBackgroundPage{-webkit-box-shadow:0 0 3px 0 #d9d9d9;-moz-box-shadow:0 0 3px 0 #d9d9d9;box-shadow:0 0 3px 0 #d9d9d9}.geMenubarContainer a,.geSidebarContainer a,.geToolbar a{color:#000!important;text-decoration:none}.geDiagramContainer,.geFooterContainer,.geHsplit,.geMenubarContainer,.geOutlineContainer,.geSidebarContainer,.geToolbarContainer,.geVsplit{overflow:hidden;position:absolute;cursor:default}.geDiagramContainer,.geOutlineContainer{background-color:#fff;outline:0}.geMenubar,.geToolbar{white-space:nowrap;display:block;width:100%}.geMenubarContainer .geItem,.geSidebar,.geSidebar .geItem,.geSidebarContainer .geTitle,.geToolbar .geButton,.geToolbar .geLabel,.mxPopupMenuItem{-webkit-transition:all .1s ease-in-out;-moz-transition:all .1s ease-in-out;-o-transition:all .1s ease-in-out;-ms-transition:all .1s ease-in-out;transition:all .1s ease-in-out}.geHint{background-color:#fff;border:1px solid gray;padding:4px 16px 4px 16px;border-radius:3px;-webkit-box-shadow:1px 1px 2px 0 #ddd;-moz-box-shadow:1px 1px 2px 0 #ddd;box-shadow:1px 1px 2px 0 #ddd;opacity:.8}.geStatusAlert{white-space:nowrap;margin-top:-5px;font-size:12px;padding:4px 6px 4px 6px;background-color:#f2dede;border:1px solid #ebccd1;color:#a94442!important;border-radius:3px}.geStatusAlert:hover{background-color:#f1d8d8;border-color:#d6b2b8}.geStatusMessage{white-space:nowrap;margin-top:-5px;padding:4px 6px 4px 6px;font-size:12px;background-image:-webkit-linear-gradient(top,#dff0d8 0,#c8e5bc 100%);background-image:-o-linear-gradient(top,#dff0d8 0,#c8e5bc 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#dff0d8),to(#c8e5bc));background-image:linear-gradient(to bottom,#dff0d8 0,#c8e5bc 100%);background-repeat:repeat-x;border:1px solid #b2dba1;border-radius:3px;color:#3c763d!important}.geStatusMessage:hover{background:#c8e5bc;border-color:#b2dba1}.geAlert{position:absolute;white-space:nowrap;padding:14px;background-color:#f2dede;border:1px solid #ebccd1;color:#a94442;border-radius:3px;-webkit-box-shadow:2px 2px 3px 0 #ddd;-moz-box-shadow:2px 2px 3px 0 #ddd;box-shadow:2px 2px 3px 0 #ddd}.geBtn{background-color:#f5f5f5;border-radius:2px;border:1px solid #d8d8d8;color:#333;cursor:default;font-size:11px;font-weight:700;height:29px;line-height:27px;margin:0 0 0 8px;min-width:72px;outline:0;padding:0 8px;cursor:pointer}.geBtn:hover{-webkit-box-shadow:0 1px 1px rgba(0,0,0,.1);-moz-box-shadow:0 1px 1px rgba(0,0,0,.1);box-shadow:0 1px 1px rgba(0,0,0,.1);border:1px solid #c6c6c6;background-color:#f8f8f8;background-image:linear-gradient(#f8f8f8 0,#f1f1f1 100%);color:#111}.geBtn:disabled{opacity:.5}.geBtnUp{background-image:url(data:image/gif;base64,R0lGODlhCgAGAJECAGZmZtXV1f///wAAACH/C1hNUCBEYXRhWE1QPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4gPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iQWRvYmUgWE1QIENvcmUgNS4wLWMwNjAgNjEuMTM0Nzc3LCAyMDEwLzAyLzEyLTE3OjMyOjAwICAgICAgICAiPiA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPiA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtbG5zOnhtcE1NPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvbW0vIiB4bWxuczpzdFJlZj0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL3NUeXBlL1Jlc291cmNlUmVmIyIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgQ1M1IE1hY2ludG9zaCIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDo0QzM3ODJERjg4NUQxMUU0OTFEQ0E2MzRGQzcwNUY3NCIgeG1wTU06RG9jdW1lbnRJRD0ieG1wLmRpZDo0QzM3ODJFMDg4NUQxMUU0OTFEQ0E2MzRGQzcwNUY3NCI+IDx4bXBNTTpEZXJpdmVkRnJvbSBzdFJlZjppbnN0YW5jZUlEPSJ4bXAuaWlkOjRDMzc4MkREODg1RDExRTQ5MURDQTYzNEZDNzA1Rjc0IiBzdFJlZjpkb2N1bWVudElEPSJ4bXAuZGlkOjRDMzc4MkRFODg1RDExRTQ5MURDQTYzNEZDNzA1Rjc0Ii8+IDwvcmRmOkRlc2NyaXB0aW9uPiA8L3JkZjpSREY+IDwveDp4bXBtZXRhPiA8P3hwYWNrZXQgZW5kPSJyIj8+Af/+/fz7+vn49/b19PPy8fDv7u3s6+rp6Ofm5eTj4uHg397d3Nva2djX1tXU09LR0M/OzczLysnIx8bFxMPCwcC/vr28u7q5uLe2tbSzsrGwr66trKuqqainpqWko6KhoJ+enZybmpmYl5aVlJOSkZCPjo2Mi4qJiIeGhYSDgoGAf359fHt6eXh3dnV0c3JxcG9ubWxramloZ2ZlZGNiYWBfXl1cW1pZWFdWVVRTUlFQT05NTEtKSUhHRkVEQ0JBQD8+PTw7Ojk4NzY1NDMyMTAvLi0sKyopKCcmJSQjIiEgHx4dHBsaGRgXFhUUExIREA8ODQwLCgkIBwYFBAMCAQAAIfkEAQAAAgAsAAAAAAoABgAAAg6UjwiQBhGYglCKhXFLBQA7);background-position:center center;background-repeat:no-repeat}.geBtnUp:active{background-color:#4d90fe;background-image:linear-gradient(#4d90fe 0,#357ae8 100%)}.geBtnDown{background-image:url(data:image/gif;base64,R0lGODlhCgAGAJECANXV1WZmZv///wAAACH/C1hNUCBEYXRhWE1QPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4gPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iQWRvYmUgWE1QIENvcmUgNS4wLWMwNjAgNjEuMTM0Nzc3LCAyMDEwLzAyLzEyLTE3OjMyOjAwICAgICAgICAiPiA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPiA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtbG5zOnhtcE1NPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvbW0vIiB4bWxuczpzdFJlZj0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL3NUeXBlL1Jlc291cmNlUmVmIyIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgQ1M1IE1hY2ludG9zaCIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDo0QzM3ODJEQjg4NUQxMUU0OTFEQ0E2MzRGQzcwNUY3NCIgeG1wTU06RG9jdW1lbnRJRD0ieG1wLmRpZDo0QzM3ODJEQzg4NUQxMUU0OTFEQ0E2MzRGQzcwNUY3NCI+IDx4bXBNTTpEZXJpdmVkRnJvbSBzdFJlZjppbnN0YW5jZUlEPSJ4bXAuaWlkOjRDMzc4MkQ5ODg1RDExRTQ5MURDQTYzNEZDNzA1Rjc0IiBzdFJlZjpkb2N1bWVudElEPSJ4bXAuZGlkOjRDMzc4MkRBODg1RDExRTQ5MURDQTYzNEZDNzA1Rjc0Ii8+IDwvcmRmOkRlc2NyaXB0aW9uPiA8L3JkZjpSREY+IDwveDp4bXBtZXRhPiA8P3hwYWNrZXQgZW5kPSJyIj8+Af/+/fz7+vn49/b19PPy8fDv7u3s6+rp6Ofm5eTj4uHg397d3Nva2djX1tXU09LR0M/OzczLysnIx8bFxMPCwcC/vr28u7q5uLe2tbSzsrGwr66trKuqqainpqWko6KhoJ+enZybmpmYl5aVlJOSkZCPjo2Mi4qJiIeGhYSDgoGAf359fHt6eXh3dnV0c3JxcG9ubWxramloZ2ZlZGNiYWBfXl1cW1pZWFdWVVRTUlFQT05NTEtKSUhHRkVEQ0JBQD8+PTw7Ojk4NzY1NDMyMTAvLi0sKyopKCcmJSQjIiEgHx4dHBsaGRgXFhUUExIREA8ODQwLCgkIBwYFBAMCAQAAIfkEAQAAAgAsAAAAAAoABgAAAg6UjxLLewEiCAnOZBzeBQA7);background-position:center center;background-repeat:no-repeat}.geBtnDown:active{background-color:#4d90fe;background-image:linear-gradient(#4d90fe 0,#357ae8 100%)}.geColorBtn{background-color:#f5f5f5;background-image:linear-gradient(#f5f5f5 0,#e1e1e1 100%);border-radius:4px;border:1px solid rgba(0,0,0,.5);color:#333;cursor:default;margin:0;outline:0;padding:0;cursor:pointer}.geColorBtn:hover{-webkit-box-shadow:0 1px 1px rgba(0,0,0,.1);-moz-box-shadow:0 1px 1px rgba(0,0,0,.1);box-shadow:0 1px 1px rgba(0,0,0,.1);border:1px solid rgba(0,0,0,.7)}.geColorBtn:active{background-color:#4d90fe;background-image:linear-gradient(#4d90fe 0,#357ae8 100%);border:1px solid #2f5bb7;color:#fff}.geColorBtn:disabled{opacity:.5}.gePrimaryBtn{background-color:#4d90fe;background-image:linear-gradient(#4d90fe 0,#4787ed 100%);border:1px solid #3079ed;color:#fff}.gePrimaryBtn:hover{background-color:#357ae8;background-image:linear-gradient(#4d90fe 0,#357ae8 100%);border:1px solid #2f5bb7;color:#fff}.gePrimaryBtn:disabled{opacity:.5}.geAlertLink{color:#843534;font-weight:700;text-decoration:none}.geMenubarContainer{background-color:#fff}.geMenubar{padding:0 2px 0 2px;vertical-align:middle}.geMenubarContainer .geItem,.geToolbar .geItem{padding:6px 8px 6px 8px;cursor:default}.geMenubarContainer .geItem:hover,.geToolbarContainer .geItem:hover{background:#eee}.mxDisabled:hover{background:inherit!important}.geMenubar a.geStatus{color:#b3b3b3;padding-left:6px;display:inline-block;cursor:default!important}.geMenubar a.geStatus:hover{background:0 0}.geMenubarMenu{border:1px solid #d5d5d5!important}.geToolbarContainer{background:#f5f5f5;border-bottom:1px solid #e0e0e0}.geSidebarContainer .geToolbarContainer{background:0 0;border-bottom:none}.geSidebarContainer button{text-overflow:ellipsis;overflow:hidden}.geToolbar{padding:1px 0 0 6px;border-top:1px solid #e0e0e0;-webkit-box-shadow:inset 0 1px 0 0 #fff;-moz-box-shadow:inset 0 1px 0 0 #fff;box-shadow:inset 0 1px 0 0 #fff}.geToolbarContainer .geSeparator{float:left;width:1px;height:34px;background:#e5e5e5;margin-left:6px;margin-right:6px;margin-top:-2px}.geToolbarContainer .geButton{float:left;width:20px;height:20px;padding:0 2px 4px 2px;margin:2px;border:1px solid transparent;cursor:pointer;opacity:.6}.geToolbarContainer .geButton:hover{border:1px solid gray;border-radius:2px;opacity:1;filter:none!important}.geToolbarContainer .geButton:active{border:1px solid #000}div.mxWindow .geButton{margin:-1px 2px 2px 2px;padding:1px 2px 2px 1px}.geToolbarContainer .geLabel{float:left;margin:2px;cursor:pointer;padding:3px 5px 3px 5px;border:1px solid transparent;opacity:.6}.geToolbarContainer .geLabel:hover{border:1px solid gray;border-radius:2px;opacity:.9}.geToolbarContainer .geLabel:active{border:1px solid #000;opacity:1;filter:none!important}.geToolbarContainer .mxDisabled:hover{border:1px solid transparent!important;opacity:.2!important}.geToolbarMenu{border:3px solid #e0e0e0!important;-webkit-box-shadow:none!important;-moz-box-shadow:none!important;box-shadow:none!important;filter:none!important}.geDiagramBackdrop{background-color:#ebebeb;border-style:solid;border-color:#e5e5e5;border-width:1px 0 0 1px}.geSidebarContainer{background:#fff;overflow:hidden;position:absolute;border-top:1px solid #e5e5e5;overflow:auto}.geSidebar{background:#f5f5f5;border-bottom:1px solid #e5e5e5;padding:5px;padding-bottom:12px;overflow:hidden}.geSidebarContainer .geTitle{display:block;font-size:9pt;border-bottom:1px solid #e5e5e5;font-weight:400;padding:6px 0 6px 14px;margin:0;cursor:default;background:#eee;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;line-height:1.4em}.geSidebarContainer .geTitle:hover{background:#e5e5e5}.geTitle img{opacity:.5}.geTitle img:hover{opacity:1}.geSidebar .geItem{display:inline-block;background-repeat:no-repeat;background-position:50% 50%;border:1px solid transparent;border-radius:2px;cursor:move}.geSidebar .geItem:hover{border:1px solid gray!important}.geItem{vertical-align:top;display:inline-block}.geSidebarTooltip{position:absolute;background:#fff;overflow:hidden;border:1px solid gray;border-radius:8px;-webkit-box-shadow:0 0 2px 2px #d5d5d5;-moz-box-shadow:0 0 2px 2px #d5d5d5;box-shadow:0 0 2px 2px #d5d5d5}.geFooterContainer{background:#e5e5e5;border-top:1px solid silver}.geFooterContainer a{font-size:14px;color:#235695;font-weight:700;text-decoration:none}.geFooterContainer table{border-collapse:collapse;margin:0 auto}.geFooterContainer td{border-left:1px solid silver;border-right:1px solid silver}.geFooterContainer td:hover{background-color:#b3b3b3}.geFooterContainer a{display:block;box-sizing:border-box;width:100%;height:100%;padding:11px 42px 11px 42px;white-space:nowrap}.geHsplit{cursor:col-resize;background-color:#e5e5e5;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAAHBAMAAADdS/HjAAAAGFBMVEUzMzP///9tbW1QUFCKiopBQUF8fHxfX1/IXlmXAAAAHUlEQVQImWMQEGAQFWUQFmYQF2cQEmIQE2MQEQEACy4BF67hpEwAAAAASUVORK5CYII=);background-repeat:no-repeat;background-position:center center}.geVsplit{font-size:1pt;cursor:row-resize;background-color:#e5e5e5;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAcAAAAEBAMAAACw6DhOAAAAGFBMVEUzMzP///9tbW1QUFCKiopBQUF8fHxfX1/IXlmXAAAAFElEQVQImWNgNVdzYBAUFBRggLMAEzYBy29kEPgAAAAASUVORK5CYII=);background-repeat:no-repeat;background-position:center center}.geHsplit:hover,.geVsplit:hover{background-color:#d5d5d5}.geDialog{position:absolute;background:#fff;overflow:hidden;padding:30px;border:1px solid #acacac;-webkit-box-shadow:0 0 2px 2px #d5d5d5;-moz-box-shadow:0 0 2px 2px #d5d5d5;box-shadow:0 0 2px 2px #d5d5d5;z-index:2}.geDialogClose{position:absolute;width:9px;height:9px;opacity:.5;cursor:pointer}.geDialogClose:hover{opacity:1}.geDialogTitle{box-sizing:border-box;white-space:nowrap;background:#e5e5e5;border-bottom:1px solid silver;font-size:15px;font-weight:700;text-align:center;color:#235695}.geDialogFooter{background:#f5f5f5;white-space:nowrap;text-align:right;box-sizing:border-box;border-top:1px solid #e5e5e5;color:#a9a9a9}.geSprite{background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABUAAAk/CAYAAACauMYVAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAACXBIWXMAAAsTAAALEwEAmpwYAAABWWlUWHRYTUw6Y29tLmFkb2JlLnhtcAAAAAAAPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iWE1QIENvcmUgNS40LjAiPgogICA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPgogICAgICA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIgogICAgICAgICAgICB4bWxuczp0aWZmPSJodHRwOi8vbnMuYWRvYmUuY29tL3RpZmYvMS4wLyI+CiAgICAgICAgIDx0aWZmOk9yaWVudGF0aW9uPjE8L3RpZmY6T3JpZW50YXRpb24+CiAgICAgIDwvcmRmOkRlc2NyaXB0aW9uPgogICA8L3JkZjpSREY+CjwveDp4bXBtZXRhPgpMwidZAAAWn0lEQVR4Ae2dW4gdxdbHO0aJYjzxTtR4EhSDSNB84kPEQOL9CB/Ex4igg8iAGCSgiIIQH1SOqJAnn4N4wBdvYBRBcYTIp0+OF0SDYoJRgyAmeA1e5lv/PrM6q6urqqu7a2/3ZP4NPVVdtda/Vv2qZ9Nrd++9i2IE2xJoHn/88XOq/ccff5RtepxSuv7HqxPE0GkNtC+lVH/YjiTSKoi+EaqA9T9OG3OW4xNdu3btHPZY9DGbRqRtYhiozaYhunfvXu95aoVCNjqzhqh2uGWbkLVPFrWRWgFfvSFqnW3dOtt2W7c2Zd2evI3OhAbr34g0wb/VZOGIjuRVagG+nrYuKQ1IgARIgARIgARIgARIoEbAm93BwmYb1mP58uXFoUOHgn6wTUok8K4Ddgj+9NNPxamnnhpNhpNENdL169eXVQj32jB93VUAEaJNxKORBtmEmGIAoNCBfGXS9C1TiLRF6huobNOp24g3b97cQBIU8HX4RJVp2+oH2dgI7aAp56m1Z50ESIAESIAESIAESIAESGCREtBMJXX6SclZqpjaUVRJ5CuPEabI623ii3rvXN/SVeFsgioO4SwRquDElNU7E3ZB+kTX9g5QH036kAAJkAAJkAAJkAAJkMDEEqiupBFh36vpsVxF1yJVnqkRjyVCDaoWaWqE6qzlWCKuRaojp0Y8lgg1qFqkqRGqs5ZjibgWqY6cGvFYItSgWJIACZAACZAACZAACZDAJBHwXknbAENX1bGr6IZoSMQO5KvbQUZyi9M36OC2xvRVMRWDnbb6jmT6FFW8+UoyzcdSlUbCVMVZkgAJkAAJkAAJkAAJTCqB1Pypc/yu8Jo1a6KfhE0eAMI7duyYS/04aJIwBCGsUeL507bPmbYKQwCCFsUgYQjaJ2MHC7uCvim1RVxLzSHY5YPUq1atKvbt21fTQBC9sxN8ltcnCNHGKCnR2g8HP/TQQ+U5/Mgjj1RajUjxiXc4hTYrCJtff/213K19pW4bUfdF7Aree++9tf+0p556qtRrRKribsSuoNr1KhEx9pAzonUjDtmynQRIgARIgARIgARIgASOGQLlNbrN6Hy3LNtm6/ovwC+qtVNom66v3/p7Ux4YuLsrZLNst686tiO5grZPHdCmbzCgzdp4I1VHX6kDou/AgQOFFW7Y25HU0ZauA/ps0mb9O0eq4uvWrWv9OrgaE3XsUmaJNDZgdPp29JiI2xcVdY1Tj72iOLE1SpRJJ7pvRBXRPpwuaLOnjfb5Ste/tPE1Rk9sR9n68/XUgcNDEiABEiABEiABEjgmCTTunMkl4Z65ublVbbM97rjj3v3999+3+uyqLFo7Ifjqq6+ulq1YsqQxJr6huXj77beLe+65Z5/6uGVDFAZysVtcdNFFXlGJrpDfPSp13nrrLczouauvvnpj2TD/x3vNjz5flOooUy8uvPDCDV9//fX/yb3ADc8///we7UMZFEXnn3/+WbzwwgvF559/XiBCbCeccEJx/fXXF4899tiyxx9/fNXpp5++VO4K19bAO/3SW/4goquuuqp4+OGHi08//bQ8vuyyy4rbb7+9ePTRR4svvvjioAyy9a+//jqiPt5y6dKl+z777DNZr6Pb+++/P3fHHXfMSd/cGWecMXf55Zcjc3lfBDZ4RdxGnyjkZ2Zm5q655ppSGOIiOuP66nGUKYx++eWX4pVXXilXfGpqqnjppZcKuZNbyDjrzzvvvJk33njjORXTMioqrIoPPvigPDdxmm3cuLG49tpri5tvvrm47bbbVkj/pp9//vlfL7744nYVRBldKBgsW7asEIbFWWedVZx00kkFBvrtt9/QVZ520r/ihx9+gOjOslH+REWx+hC0G04zWcjimWee2X/OOefsWrFiRfHtt98esjZeUTji39H3D4B29EvfPnkP5eErr7zS6pV1r+h7771XfPXVV0HRjz76qCFkGxqvGHIyPycru9Ia+eoS6az8l9UWyGfHNhIgARIgARIgARIgARLoQKBxfer6fvLJJ899/PHHZb506aWXvnvxxRdvdW3c48aV9O7du/eIUZUW3nXXXStvvPHGZbhUf/rpp1dK/z4VQUp5ySWXHJAHhuMJ75133rlKcqfVJ5988mpJJFYfPnx42ZNPPlk88cQTuPu4DG3og83999+/WjKTKgAdrJFHfffdd8Xs7OxWcd4sD//Ofvnll4UIlzvqDz74YCGPkIvJ7Nbvv/++TCpULFgijZTO1TK1nVI/hJTR3edTyNXnn3/+nIjDvrY1mGqvJAm7pP6iHjvlYee4dhgUffPNN9dLzrQG1sjyZJu56aabZlCZ31ZrxS2DoiI0Jcab4IDMT7bNr7/++gwqSMxuuOGGt1D3bY2F8hnNt22S/Goq0l91BSOtLI5W3paId0mEu+abuk8fGR1OeIlOme4Spip4dChPLRjpdddd1ztF7MLUE5O/aSSioek3/p89MZU2YO5uDVFZnAPyb/kf19B3LIL7pf2Ar49tJEACJEACJEACJEAC/Qh4c1O5sfWhXHz9MyK5Rx51/N9Qf+OqD4abNm36hxQrQk5XXHHFvyQz/PDss8++1GfjFf3xxx+RHm595513tp944ollBq3Octfs3YMHD+6US87/iPAeEd6ofVp6Rec7D956662N+6FHjhz5Hxl055lnnrlUbnduEFR75F5qTTgmWj5d/OyzzxYbNtSCXSaDrsSTx7fccstSYd+46o6KIuKVK1cWuIPeZWsVhZjcyC6++eYbPExcyLQLyZ6jYySJ4pamvFlQ3vPDImKXvCAo3CnlQSaCtzgQKcrQ1kkU2TQ+y3vKKafkiRR5KkSBAnxjWzDSBx54YEpuYJfLftpppxUXXHBBsWbNmkLOzZhe2ecVlYh2Crf9El352iBPG+BxhlIY4ueee24lLJxXvPbaaw9UDVLxrr68f7Lz7rvvxim0Wd548Z6k8q9a6sg7GKdKBaL/Lhvkj1dUOyXQ2fvuu08PG6Xc4C5PM7Hr+ZvkDUk2kAAJkAAJkAAJkAAJkAAJLFYC3vdQXBiS+jRvj4mR3AFO8nf1quPt27d3+qho5RirINpQxK6fN410jTZv3lxOH19Rlm3rEiUGbY1UMucySjzNnW3rGmVrpPqh4G3btnUK0nuehVZ58HnZKTQakwAJkAAJkAAJkAAJkAAJZCBQu+YPXeu3jTOWXKBXpGOJzMXTK1JXZCyR94p0LJG5OHpF6oqMJfJekY4lMhcHj0mABEiABEiABEiABEhgnkDXe1Ktd876kKVomJr9ZmFYYcF6f7uwHUaFswmqOISzRKiCE1NWGV/f9090JsdwFph99bOfp1ZQX/6yna8qqCvdVvKlr40Q+0mABEiABEiABEiABBY8gSqP8s2kLbcK5U4juZL2BTi4rTH9timHRrQoBk3fCtnBBomGZjVI1EZn69EPBsMwNMVQlPAZSaQQDm6xaGJ9I4m0lWksouAU2UECJEACJEACJEACJEACJEACWQnITzuVP5mLDEX3Qff4VCRUWnHYtM4GRvpZaDXGJ7j1B391IHusdt5SPwzs7ZRGDKaitgzZF4gm2Gk65JeuGsKmu55F4wemUjb50a+oWeM9lKi1dAKP/Fhawyz0vkDDkA0kQAIkQAIkQAIkQAIkQAILnkAtkUBe1GdGY0kiapG6UaZGPv5IUyNzZzT+SN0IUiMff6SpkbkzGn+kbgSpkY8lUjc4HpMACZAACZAACZAACZAACaQQaOSmqdf5Vty95h/vQ63u6DYyrYdmlSXS6enpOew6WBZRFdOSokoiXxl8Tjp0uqQMPZKFakRqT3p77qVEqDYjiVTFWZIACZAACZAACZAACZDARBKQa/0P5XeLD0lwbT8Z9E/Ywd6dSONKWn5XV38qO/yLyP9VQQa+Yt6+ptsQrfX2PFjkoo08SjHKyk7JzwtfrceeEovkaY5/2nhKnFb7vNAu+3ZfH9qCkaJTfjB9lxSHZcdT2ftl3yc7tk2YCSq+rXX15eTeKQIzUk75BHxtraI+p7a2hqgszgFx+lMd5Ri/Nr1fSvzrJm0NppJFb5Sp7pGFwI+aHZFfud4KJeFrBfEb8mCMH6FGENxIgARIgARIgARIgARIYHERQNJabnL17E+K1KCltPexWkwXWjc+WWw/XTw4foiBN/YswlYwqzCmqoKp025kfKmOMTuKxuj061s4TPvNj14kQAIkQAIkQAIkQAIkQAIBAqEsL9RuZRZOIsFI7bodra9ahdumRbFjx47qXSCta99R63qtegup3vzfI5w+vva2t4uiCwVnGxXqbYK+ILK0eacfmrY74t8WtRsIj0mABEiABEiABEiABEiABBYBAffWMb6lGd/dnTx1+63Xrpi+eWDLJGE4QBi7dcax+63Y+rXarcJWSOvuF4C7InZ2bl95rEJa4ru4vYZOozuLaMLb9l3cqu1+t3ctN0WEaqjl8uXLi0OHDtXstI8lCZAACZAACZAACZAACZAACTQIuFkfjhtGnoZg1uHLVNS/7Y6ZN49SwW3btpU3CiGCHcfYtF8HaS11yjaLW7t2bTVttEM0FUU5IBzcSKwojHw2NtoGUxXEdF0xOO7du3eJtbFiwbovClfcZ2MFGwu1bt26st8ytQ7arna2L1rXSFRAjXWRdPranlyqcKjstPp2VD29VFiFtF2Prc+g+tiFG6vfJfzZ2dklOAsk6i5utCUBEiABEiABEiABEiCBySGgl+DuNX9bhI2MTx0gpHW3nNws2kaqCVqndEf5WSG33mbT+H4pK+AmuuhDFm1tkuptUUCkzaaRR2l27Ca7GpG2q522t5YaiQqogy4S+rWtU6nCobLT6tuRQ/9R2t5b2A5i62MXbqy+jaatziy6jRD7SYAESIAESIAESOBYJtA9ffHQsDkAUsxoHmX9raNt13opNp9gJIvCOZToarKhAySXbZFaoUGX51bI1ilqaeSpk2kejlZlkTMtX6Xsi0Xolcgya6tXL336emgHaHMO9Zev/FYoR6ShwdhOAiRAAiRAAiRAAscYgZFk0dmupO2FXTZRe+WYbTWtaLZIbXQUtTTy1KvsxK5eHmlRySnK1c+2LJXQSJiOJDetIrWvh9U8elYq0Zznac9Y6EYCJEACJEACJEACC43AIsqid+/eXT41m+2qEYIQU+HBa0/BwQgLMiTDHgSynjZ4UdA924uDvmxp2WOSNRdm0TUcPCABEiABEiABEiCBTgQmK4vWa1m9Uhx870UF9VpWr211gE6s1BjOKqhtg0qNcpCI68woXSL9jnVxsq44F6ffYvi8Jo8lItIdEWc5hSAIMRVGOeScHMldcwTIjQRIgARIgARIgAQWAYHJyqJd4DaLru6duEZdj/VytKtf1N6KZovUjkhRSyNPnUzzcLQqi5wpPxdtTwbWSYAESIAESIAESOBYJTCSLLr6vGlXajYXhS+yaG0bdHkOIU3JVbBrcDX7mMigSGujmAOKGhiZqsHzNLa6vcceIsrV74096DgSpiPJoqtI7UvYkNMJTHgvOnhmsIMESIAESIAESIAESIAESCBEoPYW0tCsRDOc0GBsJwESIAESIAESIAESIAESIAESmFQCyAiHfGYyOC8Ij0RchbOLW2FXfLKy6FikwQWJdVjBLGeDCmYRQ+TugsRmwz4SIAESIAESIAESIAESIAESGD2B7GmPhnxsCE9WFj0yttkXa/IFlSVLEiABEiABEiABEiABEiABEuhEIHu6g9FVFGXWu5LZha2g1m3Ek5NFa3S2tJF2WnU1tmKoDxYc+epniVCnz5IESIAESIAESIAESIAESIAEJoMAUh2boA1OfVxBFbfCtYQ3hQNEQnb6Eebat4vFHEJCvvaRRFp9v5RvRF/byy+/7GsuQu1eY1+ju1h2kXz2bCMBEiABEiABEiABEiABEiCBBUYglh12zvgwdyuo+ahl0lnUCqqQK9xJ1CfoE66JxpzUOVZqxDXRmAP6YoOqIOw6iYaErWAvUVfYFUR/7y2GorcoHUmABEiABEiABEiABEiABEjg7yNg70IOvgNpxZA/2d0n3ppGpiZhNvOriaYKhBZAhWuiPuPUgVQQGq33omEcu8+MPivoCyzaZhfMt0BRZ3aSAAmQAAmQAAmQAAmQAAmQwGQTQKI2klQHwiMRV+Hs4iqoA1gstYQXBl1WVXNS9dPjLho121ikNcPUA52yCqf6Be1U0DIMGqd0ZIssZTDakAAJkAAJkAAJkAAJkAAJkEArgexpD0ZU0awpEMSseJZETUVDwr2zaJsx6yC2DQN22lQETqhjH4xARbMJ2uiyRKiMskaooixJgARIgARIgARIgARIgARIYDIIILvTtMeXS7U+fexOA4L6xDFyUew4HpRGIjJ3IBzb9pF8u5hv0GibjcgahtqtTbAOdtPT0zUEOB7EFKNBAJHpPlgwOAV2kAAJkAAJkAAJkAAJkAAJkMDfQmBQMuaLGIKaS/n6O7epIByzCFtBjaZVGE6xPZQutgprBL6yV6Q+IbfNCg+KMCSMAdy+QcfZBQdFQ2cSIAESIAESIAESIAESIAESyEIAqU5bulN7Tjo2qgrpt2Jt2bKlNO/1bDRutELQl+xqGunenK0Fp1NzS5+gOiYJq7GWfSL9e5hqxFoqGj1mSQIkQAIkQAIkQAIkQAIkQAILmIBmdFmmoGLImwYLWrHBgq7YEMEqNx0iAjzevD9npI01cMUbBkMarPgQHa+vins72UgCJEACJEACJEACJEACJEACIyWgGcnQLLAKcnEJji+LrgDnqGRfJA1q4Qlr5CxJgARIgARIgARIgARIgARIIIlA9rTHCmZJzV3BwaI+wb6i48uiEaHuSSsbM/IhiNkn97nCyY5thla4zZb9JEACJEACJEACJEACJEACJLBACNhUBxkfjgeF7gpqGtlHOCnh9T5YHZlCkmjEv+qyA9e++LuycCrWwenyHlbfe66fIXetQu2uXfDYXaw+ixQUZwcJkAAJkAAJkAAJkAAJkAAJTA4B5KZ9o6nSSCtgBbtme9BpiFpBHaircE3UJ9hHuBKNCapwrLSzqUThEBO2TjFx9NVE0eAT7iLoFXWFuwrCP7j5Ig4as4MESIAESIAESIAESIAESIAEFhYBe2dy8F1JK4Zcyu6p4rU0MjUha8sCK9FUwdAi2oEqURinClsB3yDVvWh0wjh27xl9bYK+Qao2u2CpC1Q5s0ICJEACJEACJEACJEACJEACC4OApj5ZolWx1CwwOqgVGyxoxbQeHT3SWSW8GpXmnnoc8a11qV+tUaODmNZrBkMOVBDiXaNtHdeKtxp3NVDxrn60JwESIAESIAESIAESIAESIIHhBDQjyZZHWcEsolYQ8x0s6goOEQ1m0V1FW7NoCGIbPH2IuAiyiLrC2URdYRxzIwESIAESIAESIAESIAESIIFjgIBNzpBD4bjPtKqnjyGgTxcjz8SO477CZTCh7C7UHptB0heBpQjbLDpJ1DrEImz0gd309HRtYXA8iClGgQCmqvtgwUbobCABEiABEiABEiABEiABEiCBiSCQkuV1ChSCmlN1cgwZqyD6swhbQR10kLBP0BWGTWhX20bpEx4UqY5ghbMIusIYQNuylNkFs0RFERIgARIgARIgARIgARIgARLIRgBpT5/Up3pO2kaiQvqtWFu2bCm7e92Uxc1XCCJ9tIOgrimle8PWtasdxwTVUIUViy3VplHGhFUwJdLRM3VD1+m57TwmgTCB/wdigVA7yGo0NAAAAABJRU5ErkJggg==) no-repeat top left;width:21px;height:21px}.geSprite-actualsize{background-position:0 0}.geSprite-bold{background-position:0 -46px}.geSprite-bottom{background-position:0 -92px}.geSprite-center{background-position:0 -138px}.geSprite-delete{background-position:0 -184px}.geSprite-fillcolor{background-position:0 -230px}.geSprite-fit{background-position:0 -276px}.geSprite-fontcolor{background-position:0 -322px}.geSprite-gradientcolor{background-position:0 -368px}.geSprite-image{background-position:0 -414px}.geSprite-italic{background-position:0 -460px}.geSprite-left{background-position:0 -506px}.geSprite-middle{background-position:0 -552px}.geSprite-print{background-position:0 -598px}.geSprite-redo{background-position:0 -644px}.geSprite-right{background-position:0 -690px}.geSprite-shadow{background-position:0 -736px}.geSprite-strokecolor{background-position:0 -782px}.geSprite-top{background-position:0 -828px}.geSprite-underline{background-position:0 -874px}.geSprite-undo{background-position:0 -920px}.geSprite-zoomin{background-position:0 -966px}.geSprite-zoomout{background-position:0 -1012px}.geSprite-helbow{background-position:0 -1058px}.geSprite-velbow{background-position:0 -1104px}.geSprite-straight{background-position:0 -1150px}.geSprite-entity{background-position:0 -1196px}.geSprite-segment{background-position:0 -1242px}.geSprite-orthogonal{background-position:0 -1288px}.geSprite-noarrow{background-position:0 -1334px}.geSprite-endclassic{background-position:0 -1380px}.geSprite-endopen{background-position:0 -1426px}.geSprite-endblock{background-position:0 -1472px}.geSprite-endoval{background-position:0 -1518px}.geSprite-enddiamond{background-position:0 -1564px}.geSprite-endthindiamond{background-position:0 -1610px}.geSprite-endclassictrans{background-position:0 -1656px}.geSprite-endblocktrans{background-position:0 -1702px}.geSprite-endovaltrans{background-position:0 -1748px}.geSprite-enddiamondtrans{background-position:0 -1794px}.geSprite-endthindiamondtrans{background-position:0 -1840px}.geSprite-startclassic{background-position:0 -1886px}.geSprite-startopen{background-position:0 -1932px}.geSprite-startblock{background-position:0 -1978px}.geSprite-startoval{background-position:0 -2024px}.geSprite-startdiamond{background-position:0 -2070px}.geSprite-startthindiamond{background-position:0 -2116px}.geSprite-startclassictrans{background-position:0 -2162px}.geSprite-startblocktrans{background-position:0 -2208px}.geSprite-startovaltrans{background-position:0 -2254px}.geSprite-startdiamondtrans{background-position:0 -2300px}.geSprite-startthindiamondtrans{background-position:0 -2346px}.geSprite-copy{background-position:0 -410px}.geSprite-cut{background-position:0 -320px}.geSprite-paste{background-position:0 -367px}.geSprite-duplicate{background-position:0 -736px}.geSprite-save{background-position:0 -782px}.geSprite-publish{background-position:0 -92px}.geBaseButton{padding:10px;border-radius:6px;border:1px solid silver;cursor:pointer;background-color:#ececec;background-image:linear-gradient(#ececec 0,#fcfcfc 100%)}.geBaseButton:hover{background:#ececec}.geBigButton{color:#fff;border:none;padding:10px;font-size:14pt;white-space:nowrap;border-radius:6px;text-shadow:#295989 0 1px 0;background-color:#428bca;background-image:linear-gradient(#4687ce 0,#3068a2 100%);-webkit-box-shadow:rgba(255,255,255,.0980392) 0 1px 0 0 inset,rgba(0,0,0,.2) 0 1px 1px 0;-moz-box-shadow:rgba(255,255,255,.0980392) 0 1px 0 0 inset,rgba(0,0,0,.2) 0 1px 1px 0;box-shadow:rgba(255,255,255,.0980392) 0 1px 0 0 inset,rgba(0,0,0,.2) 0 1px 1px 0}.geBigButton:hover{background-color:#2d6ca2;background-image:linear-gradient(#5a94d3 0,#3673b5 100%)}.geBigButton:active{background-color:#3673b5;background-image:none}@media print{div.geNoPrint{display:none!important}}html div.mxRubberband{border-color:#00d;background:#9cf}td.mxPopupMenuIcon div{width:16px;height:16px}html div.mxPopupMenu{-webkit-box-shadow:2px 2px 3px #d5d5d5;-moz-box-shadow:2px 2px 3px #d5d5d5;box-shadow:2px 2px 3px #d5d5d5;background:#fff;position:absolute;border:3px solid #e7e7e7;padding:3px}html table.mxPopupMenu{border-collapse:collapse;margin:0}html td.mxPopupMenuItem{padding:7px 30px 7px 30px;font-family:Helvetica Neue,Helvetica,Arial Unicode MS,Arial;font-size:10pt}html td.mxPopupMenuIcon{background-color:#fff;padding:0}td.mxPopupMenuIcon .geIcon{padding:2px;padding-bottom:4px;margin:2px;border:1px solid transparent;opacity:.5}td.mxPopupMenuIcon .geIcon:hover{border:1px solid gray;border-radius:2px;opacity:1}html tr.mxPopupMenuItemHover{background-color:#eee;color:#000}table.mxPopupMenu hr{color:#ccc;background-color:#ccc;border:none;height:1px}table.mxPopupMenu tr{font-size:4pt}html td.mxWindowTitle{font-family:Helvetica Neue,Helvetica,Arial Unicode MS,Arial;text-align:left;font-size:12px;color:#707070;padding:4px}div.mxTooltip{-webkit-box-shadow:3px 3px 12px silver;-moz-box-shadow:3px 3px 12px silver;box-shadow:3px 3px 12px silver;background:#ffc;border-style:solid;border-width:1px;border-color:#000;font-family:Arial;font-size:8pt;position:absolute;cursor:default;padding:4px;color:#000}body{font-family:Arial Unicode MS,Arial,Helvetica;font-size:10pt} \ No newline at end of file diff --git a/public/tvox/answer.controller.js b/public/tvox/answer.controller.js index 177b62b..a7cc965 100644 --- a/public/tvox/answer.controller.js +++ b/public/tvox/answer.controller.js @@ -470,7 +470,7 @@ angular.module('AnswerApp', ['ngMaterial', 'ngCookies', 'motion', 'ngResource', disposition: $scope.dispo.firstLevelDisposition ? $scope.dispo.firstLevelDisposition.name : null, secondDisposition: $scope.dispo.secondLevelDisposition ? $scope.dispo.secondLevelDisposition.name : undefined, thirdDisposition: $scope.dispo.thirdLevelDisposition ? $scope.dispo.thirdLevelDisposition.name : undefined, - mote: $scope.dispo.note + note: $scope.dispo.note }; $http.put($scope.motionUrl + "/api/chat/interactions/" + $scope.interactionId, obj, { @@ -480,8 +480,8 @@ angular.module('AnswerApp', ['ngMaterial', 'ngCookies', 'motion', 'ngResource', }). then( function ret(response) { - if ($scope.reportMemberId > 0) - closeReportSession(false); + //if ($scope.reportMemberId > 0) + // closeReportSession(false); tvoxCloseInteraction(tvoxCallId); } diff --git a/server/api/action/action.attributes.js b/server/api/action/action.attributes.js index 410ed1d..3432617 100644 --- a/server/api/action/action.attributes.js +++ b/server/api/action/action.attributes.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x0dba=['urlForward[body]','sequelize','exports','VIRTUAL','getDataValue','action','STRING','contactManager','integration','motionbar','browser','bot','script','Allowed\x20values:\x20contactManager,\x20integration,\x20motionbar,\x20jscripty,\x20urlForward,\x20browser,\x20bot,\x20script','contactManager[searchFields],\x20script[script],\x20integration[ConfigurationId],\x20motionbar[NULL,eventVariables(0=No,1=Yes),WinAppArguments],\x20browser[NULL,eventVariables(0=No,1=Yes)]','browser[location(0=NewTab,1=NewWindow,2=MotionTab)],\x20contactManager[autoCreateField]','urlForward[headers],\x20browser[wsindowHeight]','TEXT'];(function(_0x2a53ad,_0x234135){var _0x31b3b6=function(_0x141ec6){while(--_0x141ec6){_0x2a53ad['push'](_0x2a53ad['shift']());}};_0x31b3b6(++_0x234135);}(_0x0dba,0xc7));var _0xa0db=function(_0x4a11e0,_0x6dcbf8){_0x4a11e0=_0x4a11e0-0x0;var _0x4a4c62=_0x0dba[_0x4a11e0];return _0x4a4c62;};'use strict';var Sequelize=require(_0xa0db('0x0'));module[_0xa0db('0x1')]={'name':{'type':Sequelize[_0xa0db('0x2')],'get':function(_0x6eb361){return this[_0xa0db('0x3')](_0xa0db('0x4'));}},'action':{'type':Sequelize[_0xa0db('0x5')],'allowNull':![],'validate':{'isIn':{'args':[[_0xa0db('0x6'),_0xa0db('0x7'),_0xa0db('0x8'),'jscripty','urlForward',_0xa0db('0x9'),_0xa0db('0xa'),_0xa0db('0xb')]],'msg':_0xa0db('0xc')}},'comment':_0xa0db('0xc')},'data1':{'type':Sequelize['STRING'](0x1000),'comment':'jscripty[ProjectId],\x20browser[type(0=Popup,1=CTI\x20URL)],\x20contactManager[ListId],\x20urlForward[type(GET,POST,PUT,DELETE)],\x20script[info],\x20integration[intName(desk,dynamics365,freshdesk,freshsales,salesforce,sugarcrm,vtiger,zendesk,zoho)],\x20motionbar[type(0=Popup,1=CTI\x20URL,2=WinApp)]'},'data2':{'type':Sequelize[_0xa0db('0x5')](0x1000),'comment':'contactManager[autoCreate(0=No,1=Yes)],\x20urlForward[URL],\x20script[type],\x20integration[AccountId],\x20motionbar[TemplateId,URL,WinAppPath],\x20browser[TemplateId,URL]'},'data3':{'type':Sequelize[_0xa0db('0x5')](0x1000),'comment':_0xa0db('0xd')},'data4':{'type':Sequelize[_0xa0db('0x5')](0x1000),'comments':_0xa0db('0xe')},'data5':{'type':Sequelize[_0xa0db('0x5')](0x1000),'comments':'urlForward[timeout],\x20browser[windowWidth],\x20contactManager[ignoreDialerContactId]'},'data6':{'type':Sequelize[_0xa0db('0x5')],'comments':_0xa0db('0xf')},'data7':{'type':Sequelize[_0xa0db('0x10')],'comments':_0xa0db('0x11')}}; \ No newline at end of file +var _0xd765=['urlForward[timeout],\x20browser[windowWidth],\x20contactManager[ignoreDialerContactId]','urlForward[headers],\x20browser[wsindowHeight]','sequelize','exports','VIRTUAL','getDataValue','action','contactManager','motionbar','jscripty','browser','bot','script','Allowed\x20values:\x20contactManager,\x20integration,\x20motionbar,\x20jscripty,\x20urlForward,\x20browser,\x20bot,\x20script','STRING','contactManager[autoCreate(0=No,1=Yes)],\x20urlForward[URL],\x20script[type],\x20integration[AccountId],\x20motionbar[TemplateId,URL,WinAppPath],\x20browser[TemplateId,URL]','contactManager[searchFields],\x20script[script],\x20integration[ConfigurationId],\x20motionbar[NULL,eventVariables(0=No,1=Yes),WinAppArguments],\x20browser[NULL,eventVariables(0=No,1=Yes)]'];(function(_0x1bbc08,_0x444008){var _0x5d825b=function(_0x522920){while(--_0x522920){_0x1bbc08['push'](_0x1bbc08['shift']());}};_0x5d825b(++_0x444008);}(_0xd765,0xdf));var _0x5d76=function(_0x138adb,_0x193fee){_0x138adb=_0x138adb-0x0;var _0x1b27f2=_0xd765[_0x138adb];return _0x1b27f2;};'use strict';var Sequelize=require(_0x5d76('0x0'));module[_0x5d76('0x1')]={'name':{'type':Sequelize[_0x5d76('0x2')],'get':function(_0x3c74e1){return this[_0x5d76('0x3')](_0x5d76('0x4'));}},'action':{'type':Sequelize['STRING'],'allowNull':![],'validate':{'isIn':{'args':[[_0x5d76('0x5'),'integration',_0x5d76('0x6'),_0x5d76('0x7'),'urlForward',_0x5d76('0x8'),_0x5d76('0x9'),_0x5d76('0xa')]],'msg':_0x5d76('0xb')}},'comment':_0x5d76('0xb')},'data1':{'type':Sequelize[_0x5d76('0xc')](0x1000),'comment':'jscripty[ProjectId],\x20browser[type(0=Popup,1=CTI\x20URL)],\x20contactManager[ListId],\x20urlForward[type(GET,POST,PUT,DELETE)],\x20script[info],\x20integration[intName(desk,dynamics365,freshdesk,freshsales,salesforce,sugarcrm,vtiger,zendesk,zoho)],\x20motionbar[type(0=Popup,1=CTI\x20URL,2=WinApp)]'},'data2':{'type':Sequelize['STRING'](0x1000),'comment':_0x5d76('0xd')},'data3':{'type':Sequelize[_0x5d76('0xc')](0x1000),'comment':_0x5d76('0xe')},'data4':{'type':Sequelize[_0x5d76('0xc')](0x1000),'comments':'browser[location(0=NewTab,1=NewWindow,2=MotionTab)],\x20contactManager[autoCreateField]'},'data5':{'type':Sequelize['STRING'](0x1000),'comments':_0x5d76('0xf')},'data6':{'type':Sequelize[_0x5d76('0xc')],'comments':_0x5d76('0x10')},'data7':{'type':Sequelize['TEXT'],'comments':'urlForward[body]'}}; \ No newline at end of file diff --git a/server/api/action/action.controller.js b/server/api/action/action.controller.js index c28f884..a846593 100644 --- a/server/api/action/action.controller.js +++ b/server/api/action/action.controller.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xc9b6=['name','send','body','Action','find','params','catch','eml-format','rimraf','zip-dir','fast-json-patch','util','path','sox','ejs','lodash','crypto','jsforce','to-csv','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../config/license/util','sendStatus','end','status','json','undefined','limit','set','Content-Range','update','then','destroy','error','stack'];(function(_0x59fd43,_0x58414f){var _0x3ed9e9=function(_0x1dd3af){while(--_0x1dd3af){_0x59fd43['push'](_0x59fd43['shift']());}};_0x3ed9e9(++_0x58414f);}(_0xc9b6,0xb7));var _0x6c9b=function(_0x51e4cb,_0x2b8677){_0x51e4cb=_0x51e4cb-0x0;var _0x24d32e=_0xc9b6[_0x51e4cb];return _0x24d32e;};'use strict';var emlformat=require(_0x6c9b('0x0'));var rimraf=require(_0x6c9b('0x1'));var zipdir=require(_0x6c9b('0x2'));var jsonpatch=require(_0x6c9b('0x3'));var rp=require('request-promise');var moment=require('moment');var BPromise=require('bluebird');var Mustache=require('mustache');var util=require(_0x6c9b('0x4'));var path=require(_0x6c9b('0x5'));var sox=require(_0x6c9b('0x6'));var csv=require('to-csv');var ejs=require(_0x6c9b('0x7'));var fs=require('fs');var fs_extra=require('fs-extra');var _=require(_0x6c9b('0x8'));var squel=require('squel');var crypto=require(_0x6c9b('0x9'));var jsforce=require(_0x6c9b('0xa'));var deskjs=require('desk.js');var toCsv=require(_0x6c9b('0xb'));var querystring=require(_0x6c9b('0xc'));var Papa=require(_0x6c9b('0xd'));var Redis=require(_0x6c9b('0xe'));var authService=require(_0x6c9b('0xf'));var qs=require(_0x6c9b('0x10'));var as=require(_0x6c9b('0x11'));var hardwareService=require(_0x6c9b('0x12'));var logger=require(_0x6c9b('0x13'))(_0x6c9b('0x14'));var utils=require(_0x6c9b('0x15'));var config=require(_0x6c9b('0x16'));var licenseUtil=require(_0x6c9b('0x17'));var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0x435073,_0x18792c){_0x18792c=_0x18792c||0xcc;return function(_0x532a3e){if(_0x532a3e){return _0x435073[_0x6c9b('0x18')](_0x18792c);}return _0x435073['status'](_0x18792c)[_0x6c9b('0x19')]();};}function respondWithResult(_0xfced03,_0xa0d301){_0xa0d301=_0xa0d301||0xc8;return function(_0x175d85){if(_0x175d85){return _0xfced03[_0x6c9b('0x1a')](_0xa0d301)[_0x6c9b('0x1b')](_0x175d85);}};}function respondWithFilteredResult(_0x34ae80,_0x1855bc){return function(_0x54b200){if(_0x54b200){var _0x5292ca=typeof _0x1855bc['offset']===_0x6c9b('0x1c')&&typeof _0x1855bc[_0x6c9b('0x1d')]===_0x6c9b('0x1c');var _0x478bde=_0x54b200['count'];var _0x17a6e0=_0x5292ca?0x0:_0x1855bc['offset'];var _0x150dd2=_0x5292ca?_0x54b200['count']:_0x1855bc['offset']+_0x1855bc['limit'];var _0x53412e;if(_0x150dd2>=_0x478bde){_0x150dd2=_0x478bde;_0x53412e=0xc8;}else{_0x53412e=0xce;}_0x34ae80[_0x6c9b('0x1a')](_0x53412e);return _0x34ae80[_0x6c9b('0x1e')](_0x6c9b('0x1f'),_0x17a6e0+'-'+_0x150dd2+'/'+_0x478bde)[_0x6c9b('0x1b')](_0x54b200);}return null;};}function patchUpdates(_0x3e14ba){return function(_0xe66b90){try{jsonpatch['apply'](_0xe66b90,_0x3e14ba,!![]);}catch(_0x571eed){return BPromise['reject'](_0x571eed);}return _0xe66b90['save']();};}function saveUpdates(_0x2cfa0f,_0x2db62f){return function(_0x5dc0af){if(_0x5dc0af){return _0x5dc0af[_0x6c9b('0x20')](_0x2cfa0f)[_0x6c9b('0x21')](function(_0x5ca66b){return _0x5ca66b;});}return null;};}function removeEntity(_0x3db63c,_0x53eaa9){return function(_0x3487ee){if(_0x3487ee){return _0x3487ee[_0x6c9b('0x22')]()[_0x6c9b('0x21')](function(){_0x3db63c[_0x6c9b('0x1a')](0xcc)[_0x6c9b('0x19')]();});}};}function handleEntityNotFound(_0x3a7d30,_0x3f77e8){return function(_0x3eb26d){if(!_0x3eb26d){_0x3a7d30[_0x6c9b('0x18')](0x194);}return _0x3eb26d;};}function handleError(_0x42f4b7,_0x36c7b4){_0x36c7b4=_0x36c7b4||0x1f4;return function(_0x29f09d){logger[_0x6c9b('0x23')](_0x29f09d[_0x6c9b('0x24')]);if(_0x29f09d[_0x6c9b('0x25')]){delete _0x29f09d['name'];}_0x42f4b7[_0x6c9b('0x1a')](_0x36c7b4)[_0x6c9b('0x26')](_0x29f09d);};}exports[_0x6c9b('0x20')]=function(_0x3e4533,_0x407ad9){if(_0x3e4533[_0x6c9b('0x27')]['id']){delete _0x3e4533[_0x6c9b('0x27')]['id'];}return db[_0x6c9b('0x28')][_0x6c9b('0x29')]({'where':{'id':_0x3e4533[_0x6c9b('0x2a')]['id']}})['then'](handleEntityNotFound(_0x407ad9,null))[_0x6c9b('0x21')](saveUpdates(_0x3e4533[_0x6c9b('0x27')],null))['then'](respondWithResult(_0x407ad9,null))[_0x6c9b('0x2b')](handleError(_0x407ad9,null));};exports[_0x6c9b('0x22')]=function(_0x4bff38,_0x8483d3){return db[_0x6c9b('0x28')][_0x6c9b('0x29')]({'where':{'id':_0x4bff38[_0x6c9b('0x2a')]['id']}})[_0x6c9b('0x21')](handleEntityNotFound(_0x8483d3,null))['then'](removeEntity(_0x8483d3,null))['catch'](handleError(_0x8483d3,null));}; \ No newline at end of file +var _0x2430=['then','stack','name','send','body','Action','catch','destroy','params','eml-format','rimraf','zip-dir','request-promise','mustache','path','sox','to-csv','ejs','lodash','crypto','desk.js','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../config/license/hardware','../../config/logger','api','../../config/license/util','sendStatus','status','end','json','offset','undefined','count','limit','Content-Range','reject','save','update'];(function(_0x3cfd5a,_0x2cf2a3){var _0x5720e0=function(_0x4e6827){while(--_0x4e6827){_0x3cfd5a['push'](_0x3cfd5a['shift']());}};_0x5720e0(++_0x2cf2a3);}(_0x2430,0x105));var _0x0243=function(_0x172133,_0x10246b){_0x172133=_0x172133-0x0;var _0x2460e5=_0x2430[_0x172133];return _0x2460e5;};'use strict';var emlformat=require(_0x0243('0x0'));var rimraf=require(_0x0243('0x1'));var zipdir=require(_0x0243('0x2'));var jsonpatch=require('fast-json-patch');var rp=require(_0x0243('0x3'));var moment=require('moment');var BPromise=require('bluebird');var Mustache=require(_0x0243('0x4'));var util=require('util');var path=require(_0x0243('0x5'));var sox=require(_0x0243('0x6'));var csv=require(_0x0243('0x7'));var ejs=require(_0x0243('0x8'));var fs=require('fs');var fs_extra=require('fs-extra');var _=require(_0x0243('0x9'));var squel=require('squel');var crypto=require(_0x0243('0xa'));var jsforce=require('jsforce');var deskjs=require(_0x0243('0xb'));var toCsv=require(_0x0243('0x7'));var querystring=require(_0x0243('0xc'));var Papa=require(_0x0243('0xd'));var Redis=require(_0x0243('0xe'));var authService=require(_0x0243('0xf'));var qs=require(_0x0243('0x10'));var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0x0243('0x11'));var logger=require(_0x0243('0x12'))(_0x0243('0x13'));var utils=require('../../config/utils');var config=require('../../config/environment');var licenseUtil=require(_0x0243('0x14'));var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0x4c2e44,_0x252b17){_0x252b17=_0x252b17||0xcc;return function(_0x3b87a4){if(_0x3b87a4){return _0x4c2e44[_0x0243('0x15')](_0x252b17);}return _0x4c2e44[_0x0243('0x16')](_0x252b17)[_0x0243('0x17')]();};}function respondWithResult(_0x5da01e,_0xa24698){_0xa24698=_0xa24698||0xc8;return function(_0x48d2f6){if(_0x48d2f6){return _0x5da01e['status'](_0xa24698)[_0x0243('0x18')](_0x48d2f6);}};}function respondWithFilteredResult(_0x4b4bd6,_0x5966c3){return function(_0xda55a4){if(_0xda55a4){var _0x2f59e6=typeof _0x5966c3[_0x0243('0x19')]===_0x0243('0x1a')&&typeof _0x5966c3['limit']==='undefined';var _0x2434a7=_0xda55a4[_0x0243('0x1b')];var _0x17dcf4=_0x2f59e6?0x0:_0x5966c3['offset'];var _0x1c9229=_0x2f59e6?_0xda55a4[_0x0243('0x1b')]:_0x5966c3['offset']+_0x5966c3[_0x0243('0x1c')];var _0x4e275a;if(_0x1c9229>=_0x2434a7){_0x1c9229=_0x2434a7;_0x4e275a=0xc8;}else{_0x4e275a=0xce;}_0x4b4bd6[_0x0243('0x16')](_0x4e275a);return _0x4b4bd6['set'](_0x0243('0x1d'),_0x17dcf4+'-'+_0x1c9229+'/'+_0x2434a7)[_0x0243('0x18')](_0xda55a4);}return null;};}function patchUpdates(_0x56d842){return function(_0x417296){try{jsonpatch['apply'](_0x417296,_0x56d842,!![]);}catch(_0x1d8807){return BPromise[_0x0243('0x1e')](_0x1d8807);}return _0x417296[_0x0243('0x1f')]();};}function saveUpdates(_0x57d53c,_0x539c20){return function(_0x33616f){if(_0x33616f){return _0x33616f[_0x0243('0x20')](_0x57d53c)[_0x0243('0x21')](function(_0x266f26){return _0x266f26;});}return null;};}function removeEntity(_0xee0781,_0x431959){return function(_0x1ccbd0){if(_0x1ccbd0){return _0x1ccbd0['destroy']()[_0x0243('0x21')](function(){_0xee0781[_0x0243('0x16')](0xcc)[_0x0243('0x17')]();});}};}function handleEntityNotFound(_0x3e1714,_0x48d071){return function(_0x4296d3){if(!_0x4296d3){_0x3e1714[_0x0243('0x15')](0x194);}return _0x4296d3;};}function handleError(_0xaf1707,_0x568155){_0x568155=_0x568155||0x1f4;return function(_0x27310a){logger['error'](_0x27310a[_0x0243('0x22')]);if(_0x27310a['name']){delete _0x27310a[_0x0243('0x23')];}_0xaf1707[_0x0243('0x16')](_0x568155)[_0x0243('0x24')](_0x27310a);};}exports[_0x0243('0x20')]=function(_0x29dda1,_0x2adf9b){if(_0x29dda1[_0x0243('0x25')]['id']){delete _0x29dda1[_0x0243('0x25')]['id'];}return db[_0x0243('0x26')]['find']({'where':{'id':_0x29dda1['params']['id']}})[_0x0243('0x21')](handleEntityNotFound(_0x2adf9b,null))[_0x0243('0x21')](saveUpdates(_0x29dda1['body'],null))[_0x0243('0x21')](respondWithResult(_0x2adf9b,null))[_0x0243('0x27')](handleError(_0x2adf9b,null));};exports[_0x0243('0x28')]=function(_0xc0b772,_0x34f289){return db[_0x0243('0x26')]['find']({'where':{'id':_0xc0b772[_0x0243('0x29')]['id']}})[_0x0243('0x21')](handleEntityNotFound(_0x34f289,null))[_0x0243('0x21')](removeEntity(_0x34f289,null))[_0x0243('0x27')](handleError(_0x34f289,null));}; \ No newline at end of file diff --git a/server/api/action/action.model.js b/server/api/action/action.model.js index 0016115..73a6f21 100644 --- a/server/api/action/action.model.js +++ b/server/api/action/action.model.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x87d7=['./action.attributes','exports','define','Action','tools_actions','lodash','util','../../config/logger','api','moment','bluebird','path','rimraf','../../config/environment'];(function(_0x49ca18,_0x5e6d05){var _0x145d54=function(_0x30b9be){while(--_0x30b9be){_0x49ca18['push'](_0x49ca18['shift']());}};_0x145d54(++_0x5e6d05);}(_0x87d7,0x1d3));var _0x787d=function(_0x4a5bb4,_0x4b8424){_0x4a5bb4=_0x4a5bb4-0x0;var _0x20cd95=_0x87d7[_0x4a5bb4];return _0x20cd95;};'use strict';var _=require(_0x787d('0x0'));var util=require(_0x787d('0x1'));var logger=require(_0x787d('0x2'))(_0x787d('0x3'));var moment=require(_0x787d('0x4'));var BPromise=require(_0x787d('0x5'));var rp=require('request-promise');var fs=require('fs');var path=require(_0x787d('0x6'));var rimraf=require(_0x787d('0x7'));var config=require(_0x787d('0x8'));var attributes=require(_0x787d('0x9'));module[_0x787d('0xa')]=function(_0x3f9a81,_0x2836e3){return _0x3f9a81[_0x787d('0xb')](_0x787d('0xc'),attributes,{'tableName':_0x787d('0xd'),'paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file +var _0xa2bb=['./action.attributes','exports','define','Action','util','../../config/logger','api','path','rimraf','../../config/environment'];(function(_0x89fd95,_0x33e1e4){var _0x2748c1=function(_0x45263){while(--_0x45263){_0x89fd95['push'](_0x89fd95['shift']());}};_0x2748c1(++_0x33e1e4);}(_0xa2bb,0xfe));var _0xba2b=function(_0x3c868a,_0xc90036){_0x3c868a=_0x3c868a-0x0;var _0x138783=_0xa2bb[_0x3c868a];return _0x138783;};'use strict';var _=require('lodash');var util=require(_0xba2b('0x0'));var logger=require(_0xba2b('0x1'))(_0xba2b('0x2'));var moment=require('moment');var BPromise=require('bluebird');var rp=require('request-promise');var fs=require('fs');var path=require(_0xba2b('0x3'));var rimraf=require(_0xba2b('0x4'));var config=require(_0xba2b('0x5'));var attributes=require(_0xba2b('0x6'));module[_0xba2b('0x7')]=function(_0x58c966,_0x93a369){return _0x58c966[_0xba2b('0x8')](_0xba2b('0x9'),attributes,{'tableName':'tools_actions','paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file diff --git a/server/api/action/action.rpc.js b/server/api/action/action.rpc.js index 63c5e94..8337030 100644 --- a/server/api/action/action.rpc.js +++ b/server/api/action/action.rpc.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x7217=['stringify','error','code','message','result','catch','lodash','moment','bluebird','randomstring','ioredis','../../mysqldb','rpc','../../config/environment','jayson/promise','client','http','request','then','info','Action,\x20%s,\x20%s','debug','Action,\x20%s,\x20%s,\x20%s','request\x20sent'];(function(_0x2aa0e7,_0x4e5145){var _0x1472c0=function(_0x4deaeb){while(--_0x4deaeb){_0x2aa0e7['push'](_0x2aa0e7['shift']());}};_0x1472c0(++_0x4e5145);}(_0x7217,0x19e));var _0x7721=function(_0x1c546c,_0x5c57cb){_0x1c546c=_0x1c546c-0x0;var _0x2cc384=_0x7217[_0x1c546c];return _0x2cc384;};'use strict';var _=require(_0x7721('0x0'));var util=require('util');var moment=require(_0x7721('0x1'));var BPromise=require(_0x7721('0x2'));var rs=require(_0x7721('0x3'));var fs=require('fs');var Redis=require(_0x7721('0x4'));var db=require(_0x7721('0x5'))['db'];var utils=require('../../config/utils');var logger=require('../../config/logger')(_0x7721('0x6'));var config=require(_0x7721('0x7'));var jayson=require(_0x7721('0x8'));var client=jayson[_0x7721('0x9')][_0x7721('0xa')]({'port':0x232a});function respondWithRpcPromise(_0xf7ff37,_0x18ab6b,_0x21f680){return new BPromise(function(_0x225610,_0x2f99ed){return client[_0x7721('0xb')](_0xf7ff37,_0x21f680)[_0x7721('0xc')](function(_0xfa8835){logger[_0x7721('0xd')](_0x7721('0xe'),_0x18ab6b,'request\x20sent');logger[_0x7721('0xf')](_0x7721('0x10'),_0x18ab6b,_0x7721('0x11'),JSON[_0x7721('0x12')](_0xfa8835));if(_0xfa8835[_0x7721('0x13')]){if(_0xfa8835[_0x7721('0x13')][_0x7721('0x14')]===0x1f4){logger[_0x7721('0x13')]('Action,\x20%s,\x20%s',_0x18ab6b,_0xfa8835[_0x7721('0x13')][_0x7721('0x15')]);return _0x2f99ed(_0xfa8835['error'][_0x7721('0x15')]);}logger[_0x7721('0x13')](_0x7721('0xe'),_0x18ab6b,_0xfa8835[_0x7721('0x13')]['message']);return _0x225610(_0xfa8835[_0x7721('0x13')][_0x7721('0x15')]);}else{logger['info']('Action,\x20%s,\x20%s',_0x18ab6b,'request\x20sent');_0x225610(_0xfa8835[_0x7721('0x16')][_0x7721('0x15')]);}})[_0x7721('0x17')](function(_0x32550d){logger['error'](_0x7721('0xe'),_0x18ab6b,_0x32550d);_0x2f99ed(_0x32550d);});});} \ No newline at end of file +var _0xc4aa=['moment','bluebird','randomstring','ioredis','rpc','../../config/environment','jayson/promise','client','http','request','then','Action,\x20%s,\x20%s','request\x20sent','debug','error','code','message','info','catch','lodash','util'];(function(_0x5121b4,_0xb7a2b5){var _0x38c3ad=function(_0x4babc0){while(--_0x4babc0){_0x5121b4['push'](_0x5121b4['shift']());}};_0x38c3ad(++_0xb7a2b5);}(_0xc4aa,0x1b7));var _0xac4a=function(_0x3ab51d,_0x2fa01d){_0x3ab51d=_0x3ab51d-0x0;var _0x29a04e=_0xc4aa[_0x3ab51d];return _0x29a04e;};'use strict';var _=require(_0xac4a('0x0'));var util=require(_0xac4a('0x1'));var moment=require(_0xac4a('0x2'));var BPromise=require(_0xac4a('0x3'));var rs=require(_0xac4a('0x4'));var fs=require('fs');var Redis=require(_0xac4a('0x5'));var db=require('../../mysqldb')['db'];var utils=require('../../config/utils');var logger=require('../../config/logger')(_0xac4a('0x6'));var config=require(_0xac4a('0x7'));var jayson=require(_0xac4a('0x8'));var client=jayson[_0xac4a('0x9')][_0xac4a('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x15cd34,_0x3ef77c,_0x10525b){return new BPromise(function(_0x5c6179,_0x5b8339){return client[_0xac4a('0xb')](_0x15cd34,_0x10525b)[_0xac4a('0xc')](function(_0x26ec84){logger['info'](_0xac4a('0xd'),_0x3ef77c,_0xac4a('0xe'));logger[_0xac4a('0xf')]('Action,\x20%s,\x20%s,\x20%s',_0x3ef77c,_0xac4a('0xe'),JSON['stringify'](_0x26ec84));if(_0x26ec84[_0xac4a('0x10')]){if(_0x26ec84['error'][_0xac4a('0x11')]===0x1f4){logger[_0xac4a('0x10')](_0xac4a('0xd'),_0x3ef77c,_0x26ec84['error'][_0xac4a('0x12')]);return _0x5b8339(_0x26ec84[_0xac4a('0x10')][_0xac4a('0x12')]);}logger[_0xac4a('0x10')](_0xac4a('0xd'),_0x3ef77c,_0x26ec84[_0xac4a('0x10')][_0xac4a('0x12')]);return _0x5c6179(_0x26ec84[_0xac4a('0x10')][_0xac4a('0x12')]);}else{logger[_0xac4a('0x13')](_0xac4a('0xd'),_0x3ef77c,_0xac4a('0xe'));_0x5c6179(_0x26ec84['result'][_0xac4a('0x12')]);}})[_0xac4a('0x14')](function(_0x23eb66){logger[_0xac4a('0x10')](_0xac4a('0xd'),_0x3ef77c,_0x23eb66);_0x5b8339(_0x23eb66);});});} \ No newline at end of file diff --git a/server/api/action/index.js b/server/api/action/index.js index 6690669..adbeef9 100644 --- a/server/api/action/index.js +++ b/server/api/action/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x5082=['express','fs-extra','../../components/interaction/service','../../config/environment','isAuthenticated','delete','/:id','exports','multer','path'];(function(_0x5c89ef,_0x296c7e){var _0x517710=function(_0x4fd0e7){while(--_0x4fd0e7){_0x5c89ef['push'](_0x5c89ef['shift']());}};_0x517710(++_0x296c7e);}(_0x5082,0xd0));var _0x2508=function(_0x26d0f9,_0x146630){_0x26d0f9=_0x26d0f9-0x0;var _0x10b730=_0x5082[_0x26d0f9];return _0x10b730;};'use strict';var multer=require(_0x2508('0x0'));var util=require('util');var path=require(_0x2508('0x1'));var timeout=require('connect-timeout');var express=require(_0x2508('0x2'));var router=express['Router']();var fs_extra=require(_0x2508('0x3'));var auth=require('../../components/auth/service');var interaction=require(_0x2508('0x4'));var config=require(_0x2508('0x5'));var controller=require('./action.controller');router['put']('/:id',auth[_0x2508('0x6')](),controller['update']);router[_0x2508('0x7')](_0x2508('0x8'),auth['isAuthenticated'](),controller['destroy']);module[_0x2508('0x9')]=router; \ No newline at end of file +var _0xbad5=['../../components/interaction/service','../../config/environment','./action.controller','put','/:id','update','destroy','exports','multer','util','path','connect-timeout','express','Router','fs-extra','../../components/auth/service'];(function(_0x4d9242,_0x385b6e){var _0x59301e=function(_0x54d2ef){while(--_0x54d2ef){_0x4d9242['push'](_0x4d9242['shift']());}};_0x59301e(++_0x385b6e);}(_0xbad5,0x148));var _0x5bad=function(_0x23894d,_0x543b7f){_0x23894d=_0x23894d-0x0;var _0xa2f64c=_0xbad5[_0x23894d];return _0xa2f64c;};'use strict';var multer=require(_0x5bad('0x0'));var util=require(_0x5bad('0x1'));var path=require(_0x5bad('0x2'));var timeout=require(_0x5bad('0x3'));var express=require(_0x5bad('0x4'));var router=express[_0x5bad('0x5')]();var fs_extra=require(_0x5bad('0x6'));var auth=require(_0x5bad('0x7'));var interaction=require(_0x5bad('0x8'));var config=require(_0x5bad('0x9'));var controller=require(_0x5bad('0xa'));router[_0x5bad('0xb')](_0x5bad('0xc'),auth['isAuthenticated'](),controller[_0x5bad('0xd')]);router['delete']('/:id',auth['isAuthenticated'](),controller[_0x5bad('0xe')]);module[_0x5bad('0xf')]=router; \ No newline at end of file diff --git a/server/api/analyticCustomReport/analyticCustomReport.attributes.js b/server/api/analyticCustomReport/analyticCustomReport.attributes.js index cf44fa2..3ae2213 100644 --- a/server/api/analyticCustomReport/analyticCustomReport.attributes.js +++ b/server/api/analyticCustomReport/analyticCustomReport.attributes.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xda19=['exports','STRING','TEXT'];(function(_0x160179,_0x3acf28){var _0x32a925=function(_0x45ec4c){while(--_0x45ec4c){_0x160179['push'](_0x160179['shift']());}};_0x32a925(++_0x3acf28);}(_0xda19,0xd5));var _0x9da1=function(_0x3f62d2,_0xaf113a){_0x3f62d2=_0x3f62d2-0x0;var _0x8ec76e=_0xda19[_0x3f62d2];return _0x8ec76e;};'use strict';var Sequelize=require('sequelize');module[_0x9da1('0x0')]={'name':{'type':Sequelize[_0x9da1('0x1')],'allowNull':![]},'description':{'type':Sequelize['STRING']},'parent':{'type':Sequelize[_0x9da1('0x1')]},'table':{'type':Sequelize['STRING']},'conditions':{'type':Sequelize[_0x9da1('0x2')]},'joins':{'type':Sequelize['TEXT']}}; \ No newline at end of file +var _0x3f8a=['TEXT','sequelize','exports','STRING'];(function(_0x8c3687,_0x350a3d){var _0x340a36=function(_0x5cc847){while(--_0x5cc847){_0x8c3687['push'](_0x8c3687['shift']());}};_0x340a36(++_0x350a3d);}(_0x3f8a,0x1d5));var _0xa3f8=function(_0x482041,_0x1c0269){_0x482041=_0x482041-0x0;var _0x1050d9=_0x3f8a[_0x482041];return _0x1050d9;};'use strict';var Sequelize=require(_0xa3f8('0x0'));module[_0xa3f8('0x1')]={'name':{'type':Sequelize[_0xa3f8('0x2')],'allowNull':![]},'description':{'type':Sequelize[_0xa3f8('0x2')]},'parent':{'type':Sequelize['STRING']},'table':{'type':Sequelize[_0xa3f8('0x2')]},'conditions':{'type':Sequelize[_0xa3f8('0x3')]},'joins':{'type':Sequelize[_0xa3f8('0x3')]}}; \ No newline at end of file diff --git a/server/api/analyticCustomReport/analyticCustomReport.controller.js b/server/api/analyticCustomReport/analyticCustomReport.controller.js index 4f75460..43b619e 100644 --- a/server/api/analyticCustomReport/analyticCustomReport.controller.js +++ b/server/api/analyticCustomReport/analyticCustomReport.controller.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xeb43=['toString','fork','../../components/export/','../../files/reports','savename','countTable','COUNT(*)','run','runReport','GROUP_CONCAT(%s)','debug','eml-format','rimraf','zip-dir','request-promise','mustache','util','to-csv','ejs','lodash','crypto','desk.js','querystring','papaparse','ioredis','../../components/parsers/qs','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/license/util','../../mysqldb','dbH','sendStatus','status','json','offset','undefined','limit','count','apply','save','update','then','destroy','get','CustomReports','UserProfileResource','stack','index','AnalyticCustomReport','rawAttributes','fieldName','type','model','map','name','query','keys','intersection','attributes','fields','sort','pick','filters','filter','where','VIRTUAL','merge','options','includeAll','include','findAll','show','params','length','find','catch','create','body','user','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','Reports','userProfileId','error','preview','right_join','cross_join','SUM(%s)','COUNT(%s)','COUNT(DISTINCT\x20%s)','MAX(%s)','AVG(%s)','GROUP_CONCAT(%s\x20ORDER\x20BY\x20%s\x20ASC)','GROUP_CONCAT(%s\x20ORDER\x20BY\x20%s\x20DESC)','SEC_TO_TIME(%s)','DATE(%s)','HOUR(%s)','ROUND(%s)','includes','IS\x20NOT\x20NULL','IS\x20EMPTY','IS\x20NOT\x20EMPTY','rules','operator','group','field','condition','getFields','ValidationErrorItem','Please\x20insert\x20at\x20least\x20one\x20field','AnalyticMetric','keyBy','from','table','MetricId','metric','function','replace','format','order','orderBy','DESC','joins','parentKey','foreignTable','foreignKey','%s.%s\x20=\x20%s.%s','conditions','parse','clone','Limited\x20Query:','sequelize','QueryTypes','SELECT','join','left_join','MIN(%s)','UNIX_TIMESTAMP(%s)','value','Sequelize','select','groupBy','alias','output','fullPath','%s-%s.%s','randomstring','generate','csv','custom','cdr','.calldate\x20BETWEEN\x20?\x20AND\x20?','startDate','endDate','.createdAt\x20BETWEEN\x20?\x20AND\x20?','info','Run\x20Query:'];(function(_0x4b055c,_0x4b870b){var _0x4b62bb=function(_0x4884c2){while(--_0x4884c2){_0x4b055c['push'](_0x4b055c['shift']());}};_0x4b62bb(++_0x4b870b);}(_0xeb43,0x149));var _0x3eb4=function(_0x3a60b8,_0x47caab){_0x3a60b8=_0x3a60b8-0x0;var _0x4eb583=_0xeb43[_0x3a60b8];return _0x4eb583;};'use strict';var emlformat=require(_0x3eb4('0x0'));var rimraf=require(_0x3eb4('0x1'));var zipdir=require(_0x3eb4('0x2'));var jsonpatch=require('fast-json-patch');var rp=require(_0x3eb4('0x3'));var moment=require('moment');var BPromise=require('bluebird');var Mustache=require(_0x3eb4('0x4'));var util=require(_0x3eb4('0x5'));var path=require('path');var sox=require('sox');var csv=require(_0x3eb4('0x6'));var ejs=require(_0x3eb4('0x7'));var fs=require('fs');var fs_extra=require('fs-extra');var _=require(_0x3eb4('0x8'));var squel=require('squel');var crypto=require(_0x3eb4('0x9'));var jsforce=require('jsforce');var deskjs=require(_0x3eb4('0xa'));var toCsv=require(_0x3eb4('0x6'));var querystring=require(_0x3eb4('0xb'));var Papa=require(_0x3eb4('0xc'));var Redis=require(_0x3eb4('0xd'));var authService=require('../../components/auth/service');var qs=require(_0x3eb4('0xe'));var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0x3eb4('0xf'));var logger=require(_0x3eb4('0x10'))(_0x3eb4('0x11'));var utils=require(_0x3eb4('0x12'));var config=require('../../config/environment');var licenseUtil=require(_0x3eb4('0x13'));var db=require(_0x3eb4('0x14'))['db'];var dbH=require(_0x3eb4('0x14'))[_0x3eb4('0x15')];function respondWithStatusCode(_0x1e738e,_0x3e51f2){_0x3e51f2=_0x3e51f2||0xcc;return function(_0x5049e9){if(_0x5049e9){return _0x1e738e[_0x3eb4('0x16')](_0x3e51f2);}return _0x1e738e['status'](_0x3e51f2)['end']();};}function respondWithResult(_0x45342a,_0x54e9c3){_0x54e9c3=_0x54e9c3||0xc8;return function(_0x310445){if(_0x310445){return _0x45342a[_0x3eb4('0x17')](_0x54e9c3)[_0x3eb4('0x18')](_0x310445);}};}function respondWithFilteredResult(_0x123861,_0xc5b9c2){return function(_0x458fc7){if(_0x458fc7){var _0x20ca34=typeof _0xc5b9c2[_0x3eb4('0x19')]===_0x3eb4('0x1a')&&typeof _0xc5b9c2[_0x3eb4('0x1b')]==='undefined';var _0x3fb1c0=_0x458fc7[_0x3eb4('0x1c')];var _0x1fcc85=_0x20ca34?0x0:_0xc5b9c2[_0x3eb4('0x19')];var _0x299ce2=_0x20ca34?_0x458fc7[_0x3eb4('0x1c')]:_0xc5b9c2[_0x3eb4('0x19')]+_0xc5b9c2[_0x3eb4('0x1b')];var _0x50f36a;if(_0x299ce2>=_0x3fb1c0){_0x299ce2=_0x3fb1c0;_0x50f36a=0xc8;}else{_0x50f36a=0xce;}_0x123861[_0x3eb4('0x17')](_0x50f36a);return _0x123861['set']('Content-Range',_0x1fcc85+'-'+_0x299ce2+'/'+_0x3fb1c0)[_0x3eb4('0x18')](_0x458fc7);}return null;};}function patchUpdates(_0x18675f){return function(_0x25ee8d){try{jsonpatch[_0x3eb4('0x1d')](_0x25ee8d,_0x18675f,!![]);}catch(_0x438a7d){return BPromise['reject'](_0x438a7d);}return _0x25ee8d[_0x3eb4('0x1e')]();};}function saveUpdates(_0x5eb01d,_0x15d87d){return function(_0x504467){if(_0x504467){return _0x504467[_0x3eb4('0x1f')](_0x5eb01d)[_0x3eb4('0x20')](function(_0x1e87a6){return _0x1e87a6;});}return null;};}function removeEntity(_0x1c2f04,_0x93a567){return function(_0x54f5e7){if(_0x54f5e7){return _0x54f5e7[_0x3eb4('0x21')]()[_0x3eb4('0x20')](function(){var _0x5b8149=_0x54f5e7[_0x3eb4('0x22')]({'plain':!![]});var _0x28c235=_0x3eb4('0x23');return db[_0x3eb4('0x24')]['destroy']({'where':{'type':_0x28c235,'resourceId':_0x5b8149['id']}})[_0x3eb4('0x20')](function(){return _0x54f5e7;});})[_0x3eb4('0x20')](function(){_0x1c2f04[_0x3eb4('0x17')](0xcc)['end']();});}};}function handleEntityNotFound(_0x50684f,_0x283b99){return function(_0x281a5a){if(!_0x281a5a){_0x50684f[_0x3eb4('0x16')](0x194);}return _0x281a5a;};}function handleError(_0x51ef72,_0x558d6d){_0x558d6d=_0x558d6d||0x1f4;return function(_0x3fd753){logger['error'](_0x3fd753[_0x3eb4('0x25')]);if(_0x3fd753['name']){delete _0x3fd753['name'];}_0x51ef72[_0x3eb4('0x17')](_0x558d6d)['send'](_0x3fd753);};}exports[_0x3eb4('0x26')]=function(_0x2ba4fe,_0xc8bb50){var _0xb55d7e={},_0x43e992={},_0x26317d={'count':0x0,'rows':[]};var _0x4e5433=_['map'](db[_0x3eb4('0x27')][_0x3eb4('0x28')],function(_0x1fa16e){return{'name':_0x1fa16e[_0x3eb4('0x29')],'type':_0x1fa16e[_0x3eb4('0x2a')]['key']};});_0x43e992[_0x3eb4('0x2b')]=_[_0x3eb4('0x2c')](_0x4e5433,_0x3eb4('0x2d'));_0x43e992[_0x3eb4('0x2e')]=_[_0x3eb4('0x2f')](_0x2ba4fe['query']);_0x43e992['filters']=_[_0x3eb4('0x30')](_0x43e992[_0x3eb4('0x2b')],_0x43e992[_0x3eb4('0x2e')]);_0xb55d7e[_0x3eb4('0x31')]=_[_0x3eb4('0x30')](_0x43e992[_0x3eb4('0x2b')],qs[_0x3eb4('0x32')](_0x2ba4fe['query'][_0x3eb4('0x32')]));_0xb55d7e['attributes']=_0xb55d7e[_0x3eb4('0x31')]['length']?_0xb55d7e[_0x3eb4('0x31')]:_0x43e992[_0x3eb4('0x2b')];if(!_0x2ba4fe[_0x3eb4('0x2e')]['hasOwnProperty']('nolimit')){_0xb55d7e[_0x3eb4('0x1b')]=qs[_0x3eb4('0x1b')](_0x2ba4fe[_0x3eb4('0x2e')][_0x3eb4('0x1b')]);_0xb55d7e[_0x3eb4('0x19')]=qs['offset'](_0x2ba4fe[_0x3eb4('0x2e')][_0x3eb4('0x19')]);}_0xb55d7e['order']=qs[_0x3eb4('0x33')](_0x2ba4fe[_0x3eb4('0x2e')][_0x3eb4('0x33')]);_0xb55d7e['where']=qs['filters'](_[_0x3eb4('0x34')](_0x2ba4fe['query'],_0x43e992[_0x3eb4('0x35')]),_0x4e5433);if(_0x2ba4fe[_0x3eb4('0x2e')][_0x3eb4('0x36')]){_0xb55d7e[_0x3eb4('0x37')]=_['merge'](_0xb55d7e[_0x3eb4('0x37')],{'$or':_[_0x3eb4('0x2c')](_0x4e5433,function(_0x2c0a75){if(_0x2c0a75['type']!==_0x3eb4('0x38')){var _0x1745c3={};_0x1745c3[_0x2c0a75[_0x3eb4('0x2d')]]={'$like':'%'+_0x2ba4fe[_0x3eb4('0x2e')][_0x3eb4('0x36')]+'%'};return _0x1745c3;}})});}_0xb55d7e=_[_0x3eb4('0x39')]({},_0xb55d7e,_0x2ba4fe[_0x3eb4('0x3a')]);var _0x1e260c={'where':_0xb55d7e[_0x3eb4('0x37')]};return db[_0x3eb4('0x27')][_0x3eb4('0x1c')](_0x1e260c)['then'](function(_0x581b27){_0x26317d[_0x3eb4('0x1c')]=_0x581b27;if(_0x2ba4fe[_0x3eb4('0x2e')][_0x3eb4('0x3b')]){_0xb55d7e[_0x3eb4('0x3c')]=[{'all':!![]}];}return db[_0x3eb4('0x27')][_0x3eb4('0x3d')](_0xb55d7e);})[_0x3eb4('0x20')](function(_0x1caf01){_0x26317d['rows']=_0x1caf01;return _0x26317d;})[_0x3eb4('0x20')](respondWithFilteredResult(_0xc8bb50,_0xb55d7e))['catch'](handleError(_0xc8bb50,null));};exports[_0x3eb4('0x3e')]=function(_0x140343,_0x34da0d){var _0x2fabc9={'raw':![],'where':{'id':_0x140343[_0x3eb4('0x3f')]['id']}},_0x3b8d9c={};_0x3b8d9c[_0x3eb4('0x2b')]=_[_0x3eb4('0x2f')](db[_0x3eb4('0x27')][_0x3eb4('0x28')]);_0x3b8d9c['query']=_[_0x3eb4('0x2f')](_0x140343[_0x3eb4('0x2e')]);_0x3b8d9c[_0x3eb4('0x35')]=_['intersection'](_0x3b8d9c[_0x3eb4('0x2b')],_0x3b8d9c['query']);_0x2fabc9[_0x3eb4('0x31')]=_['intersection'](_0x3b8d9c[_0x3eb4('0x2b')],qs[_0x3eb4('0x32')](_0x140343[_0x3eb4('0x2e')][_0x3eb4('0x32')]));_0x2fabc9['attributes']=_0x2fabc9['attributes'][_0x3eb4('0x40')]?_0x2fabc9[_0x3eb4('0x31')]:_0x3b8d9c[_0x3eb4('0x2b')];if(_0x140343[_0x3eb4('0x2e')][_0x3eb4('0x3b')]){_0x2fabc9[_0x3eb4('0x3c')]=[{'all':!![]}];}_0x2fabc9=_[_0x3eb4('0x39')]({},_0x2fabc9,_0x140343[_0x3eb4('0x3a')]);return db[_0x3eb4('0x27')][_0x3eb4('0x41')](_0x2fabc9)['then'](handleEntityNotFound(_0x34da0d,null))[_0x3eb4('0x20')](respondWithResult(_0x34da0d,null))[_0x3eb4('0x42')](handleError(_0x34da0d,null));};exports[_0x3eb4('0x43')]=function(_0x51867f,_0x4a8806){return db[_0x3eb4('0x27')]['create'](_0x51867f[_0x3eb4('0x44')],{})[_0x3eb4('0x20')](function(_0x214357){var _0x3abaa3=_0x51867f[_0x3eb4('0x45')][_0x3eb4('0x22')]({'plain':!![]});if(!_0x3abaa3)throw new Error(_0x3eb4('0x46'));if(_0x3abaa3[_0x3eb4('0x47')]===_0x3eb4('0x45')){var _0x20221d=_0x214357[_0x3eb4('0x22')]({'plain':!![]});var _0x32b5ae=_0x3eb4('0x48');return db['UserProfileSection'][_0x3eb4('0x41')]({'where':{'name':_0x32b5ae,'userProfileId':_0x3abaa3[_0x3eb4('0x49')]},'raw':!![]})['then'](function(_0x477ddf){if(_0x477ddf&&_0x477ddf['autoAssociation']===0x0){return db[_0x3eb4('0x24')][_0x3eb4('0x43')]({'name':_0x20221d[_0x3eb4('0x2d')],'resourceId':_0x20221d['id'],'type':_0x3eb4('0x23'),'sectionId':_0x477ddf['id']},{})[_0x3eb4('0x20')](function(){return _0x214357;});}else{return _0x214357;}})[_0x3eb4('0x42')](function(_0x6e3d23){logger[_0x3eb4('0x4a')]('Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s',_0x6e3d23);throw _0x6e3d23;});}return _0x214357;})['then'](respondWithResult(_0x4a8806,0xc9))[_0x3eb4('0x42')](handleError(_0x4a8806,null));};exports[_0x3eb4('0x1f')]=function(_0x5a9eec,_0x1c8f40){if(_0x5a9eec[_0x3eb4('0x44')]['id']){delete _0x5a9eec['body']['id'];}return db[_0x3eb4('0x27')]['find']({'where':{'id':_0x5a9eec[_0x3eb4('0x3f')]['id']}})[_0x3eb4('0x20')](handleEntityNotFound(_0x1c8f40,null))['then'](saveUpdates(_0x5a9eec[_0x3eb4('0x44')],null))['then'](respondWithResult(_0x1c8f40,null))[_0x3eb4('0x42')](handleError(_0x1c8f40,null));};exports[_0x3eb4('0x21')]=function(_0x73a6a7,_0x36f27b){return db['AnalyticCustomReport']['find']({'where':{'id':_0x73a6a7[_0x3eb4('0x3f')]['id']}})[_0x3eb4('0x20')](handleEntityNotFound(_0x36f27b,null))['then'](removeEntity(_0x36f27b,null))[_0x3eb4('0x42')](handleError(_0x36f27b,null));};exports[_0x3eb4('0x4b')]=function(_0x9de587,_0x4ebad5){var _0x386373=0xa;var _0x1c21b9=['join','left_join',_0x3eb4('0x4c'),_0x3eb4('0x4d')];var _0x4342a4={'SUM':_0x3eb4('0x4e'),'COUNT':_0x3eb4('0x4f'),'COUNT DISTINCT':_0x3eb4('0x50'),'MAX':_0x3eb4('0x51'),'MIN':'MIN(%s)','AVG':_0x3eb4('0x52'),'GROUP_CONCAT':'GROUP_CONCAT(%s)','GROUP_CONCAT ASC':_0x3eb4('0x53'),'GROUP_CONCAT DESC':_0x3eb4('0x54')};var _0x149c12={'SEC_TO_TIME':_0x3eb4('0x55'),'DATE':_0x3eb4('0x56'),'HOUR':_0x3eb4('0x57'),'ROUND':_0x3eb4('0x58'),'UNIX_TIMESTAMP':'UNIX_TIMESTAMP(%s)'};var _0x565e18=function(_0x182768){return!_[_0x3eb4('0x59')](['IS\x20NULL',_0x3eb4('0x5a'),_0x3eb4('0x5b'),_0x3eb4('0x5c')],_0x182768);};var _0x3e4959=function(_0x156304){if(!_0x156304||!_0x156304[_0x3eb4('0x5d')][_0x3eb4('0x40')]){return'';}for(var _0x29e9a3='(',_0x3667ca=0x0;_0x3667ca<_0x156304['rules'][_0x3eb4('0x40')];_0x3667ca+=0x1){_0x3667ca>0x0&&(_0x29e9a3+='\x20'+_0x156304[_0x3eb4('0x5e')]+'\x20');_0x29e9a3+=_0x156304[_0x3eb4('0x5d')][_0x3667ca]['group']?_0x3e4959(_0x156304[_0x3eb4('0x5d')][_0x3667ca][_0x3eb4('0x5f')]):_0x156304['rules'][_0x3667ca][_0x3eb4('0x60')]+'\x20'+_0x156304['rules'][_0x3667ca][_0x3eb4('0x61')]+(_0x565e18(_0x156304[_0x3eb4('0x5d')][_0x3667ca]['condition'])?'\x20'+_0x156304[_0x3eb4('0x5d')][_0x3667ca]['value']:'');}return _0x29e9a3+')';};var _0x1f8584={'where':{'id':_0x9de587[_0x3eb4('0x3f')]['id']}},_0x58a2b8,_0x59134a,_0x236d6b,_0x2986bd,_0x477873;_0x1f8584=_[_0x3eb4('0x39')]({},_0x1f8584,_0x9de587[_0x3eb4('0x3a')]);return db[_0x3eb4('0x27')][_0x3eb4('0x41')](_0x1f8584)[_0x3eb4('0x20')](function(_0xc5328d){if(_0xc5328d){_0x58a2b8=_0xc5328d;return _0xc5328d[_0x3eb4('0x62')]();}return null;})[_0x3eb4('0x20')](function(_0x1125cf){if(_0x1125cf){if(!_0x1125cf['length']){throw new db['Sequelize'][(_0x3eb4('0x63'))](_0x3eb4('0x64'),0x193);}_0x59134a=_0x1125cf;return db[_0x3eb4('0x65')]['findAll']({'raw':!![]});}return null;})[_0x3eb4('0x20')](function(_0x229261){if(_0x229261){_0x236d6b=_[_0x3eb4('0x66')](_0x229261,'id');var _0x32b1b8;var _0x2fcfc2=squel['select']();_0x2fcfc2[_0x3eb4('0x67')](_0x58a2b8[_0x3eb4('0x68')]);for(var _0x23979a=0x0;_0x23979a<_0x59134a['length'];_0x23979a+=0x1){_0x32b1b8=_0x59134a[_0x23979a][_0x3eb4('0x69')]?_0x236d6b[_0x59134a[_0x23979a][_0x3eb4('0x69')]][_0x3eb4('0x6a')]:_0x59134a[_0x23979a][_0x3eb4('0x60')];_0x32b1b8=_0x59134a[_0x23979a][_0x3eb4('0x6b')]?_[_0x3eb4('0x6c')](_0x4342a4[_0x59134a[_0x23979a][_0x3eb4('0x6b')]],'%s',_0x32b1b8):_0x32b1b8;_0x32b1b8=_0x59134a[_0x23979a][_0x3eb4('0x6d')]?_['replace'](_0x149c12[_0x59134a[_0x23979a]['format']],'%s',_0x32b1b8):_0x32b1b8;if(_0x59134a[_0x23979a]['groupBy']){_0x2fcfc2[_0x3eb4('0x5f')](_0x32b1b8);}_0x59134a[_0x23979a]['orderBy']&&_0x2fcfc2[_0x3eb4('0x6e')](_0x32b1b8,_0x59134a[_0x23979a][_0x3eb4('0x6f')]===_0x3eb4('0x70')?![]:!![]);_0x2fcfc2[_0x3eb4('0x60')](_0x32b1b8,_0x59134a[_0x23979a]['alias']||_0x32b1b8);}if(_0x58a2b8['joins']){_0x58a2b8['joins']=JSON['parse'](_0x58a2b8[_0x3eb4('0x71')]);for(var _0x308593=0x0;_0x308593<_0x58a2b8[_0x3eb4('0x71')][_0x3eb4('0x40')];_0x308593+=0x1){if(_0x58a2b8[_0x3eb4('0x71')][_0x308593]['type']&&_[_0x3eb4('0x59')](_0x1c21b9,_0x58a2b8['joins'][_0x308593][_0x3eb4('0x2a')])&&_0x58a2b8[_0x3eb4('0x71')][_0x308593][_0x3eb4('0x72')]&&_0x58a2b8[_0x3eb4('0x71')][_0x308593][_0x3eb4('0x73')]&&_0x58a2b8[_0x3eb4('0x71')][_0x308593][_0x3eb4('0x74')]){_0x2fcfc2[_0x58a2b8[_0x3eb4('0x71')][_0x308593]['type']](_0x58a2b8[_0x3eb4('0x71')][_0x308593][_0x3eb4('0x73')],null,util[_0x3eb4('0x6d')](_0x3eb4('0x75'),_0x58a2b8[_0x3eb4('0x68')],_0x58a2b8['joins'][_0x308593][_0x3eb4('0x72')],_0x58a2b8['joins'][_0x308593][_0x3eb4('0x73')],_0x58a2b8[_0x3eb4('0x71')][_0x308593][_0x3eb4('0x74')]));}}}if(_0x58a2b8[_0x3eb4('0x76')]){_0x58a2b8[_0x3eb4('0x76')]=JSON[_0x3eb4('0x77')](_0x58a2b8[_0x3eb4('0x76')]);_0x2fcfc2[_0x3eb4('0x37')](_0x3e4959(_0x58a2b8['conditions'][_0x3eb4('0x5f')]));}_0x477873=_0x2fcfc2[_0x3eb4('0x78')]();_0x2fcfc2[_0x3eb4('0x1b')](_0x386373);_0x2fcfc2[_0x3eb4('0x19')](0x0);logger['debug'](_0x3eb4('0x79'),_0x2fcfc2['toString']());return dbH[_0x3eb4('0x7a')][_0x3eb4('0x2e')](_0x2fcfc2['toString'](),{'type':dbH[_0x3eb4('0x7a')][_0x3eb4('0x7b')][_0x3eb4('0x7c')]});}})[_0x3eb4('0x20')](respondWithResult(_0x4ebad5,null))[_0x3eb4('0x42')](handleError(_0x4ebad5,null));};function runReport(_0x41ae5d,_0x27818a,_0x288a9f){var _0x459c01=_0x27818a[_0x3eb4('0x2d')];var _0x5bb6ed=0xa;var _0x337595=[_0x3eb4('0x7d'),_0x3eb4('0x7e'),_0x3eb4('0x4c'),_0x3eb4('0x4d')];var _0x4e9984={'SUM':_0x3eb4('0x4e'),'COUNT':_0x3eb4('0x4f'),'COUNT DISTINCT':'COUNT(DISTINCT\x20%s)','MAX':'MAX(%s)','MIN':_0x3eb4('0x7f'),'AVG':_0x3eb4('0x52'),'GROUP_CONCAT':'GROUP_CONCAT(%s)','GROUP_CONCAT ASC':_0x3eb4('0x53'),'GROUP_CONCAT DESC':_0x3eb4('0x54')};var _0x24445a={'SEC_TO_TIME':_0x3eb4('0x55'),'DATE':_0x3eb4('0x56'),'HOUR':_0x3eb4('0x57'),'ROUND':_0x3eb4('0x58'),'UNIX_TIMESTAMP':_0x3eb4('0x80')};var _0x54a6fc=function(_0x32dc11){return!_['includes'](['IS\x20NULL','IS\x20NOT\x20NULL',_0x3eb4('0x5b'),_0x3eb4('0x5c')],_0x32dc11);};var _0x3d414c=function(_0x413a7b){if(!_0x413a7b||!_0x413a7b[_0x3eb4('0x5d')][_0x3eb4('0x40')]){return'';}for(var _0x169cc5='(',_0xadec8f=0x0;_0xadec8f<_0x413a7b[_0x3eb4('0x5d')][_0x3eb4('0x40')];_0xadec8f+=0x1){_0xadec8f>0x0&&(_0x169cc5+='\x20'+_0x413a7b[_0x3eb4('0x5e')]+'\x20');_0x169cc5+=_0x413a7b[_0x3eb4('0x5d')][_0xadec8f][_0x3eb4('0x5f')]?_0x3d414c(_0x413a7b[_0x3eb4('0x5d')][_0xadec8f][_0x3eb4('0x5f')]):_0x413a7b['rules'][_0xadec8f][_0x3eb4('0x60')]+'\x20'+_0x413a7b[_0x3eb4('0x5d')][_0xadec8f][_0x3eb4('0x61')]+(_0x54a6fc(_0x413a7b[_0x3eb4('0x5d')][_0xadec8f][_0x3eb4('0x61')])?'\x20'+_0x413a7b[_0x3eb4('0x5d')][_0xadec8f][_0x3eb4('0x81')]:'');}return _0x169cc5+')';};var _0x45e63d={'where':{'id':_0x41ae5d['id']}},_0x969be3,_0x3dbbe1,_0x349821,_0x54c51e,_0x4569d8;_0x45e63d=_[_0x3eb4('0x39')]({},_0x45e63d,_0x288a9f);return db[_0x3eb4('0x27')][_0x3eb4('0x41')](_0x45e63d)[_0x3eb4('0x20')](function(_0x3ca416){if(_0x3ca416){_0x969be3=_0x3ca416;return _0x3ca416[_0x3eb4('0x62')]();}return null;})[_0x3eb4('0x20')](function(_0x59d780){if(_0x59d780){if(!_0x59d780[_0x3eb4('0x40')]){throw new db[(_0x3eb4('0x82'))][(_0x3eb4('0x63'))]('Please\x20insert\x20at\x20least\x20one\x20field',0x193);}_0x3dbbe1=_0x59d780;return db[_0x3eb4('0x65')][_0x3eb4('0x3d')]({'raw':!![]});}return null;})[_0x3eb4('0x20')](function(_0x2c6875){if(_0x2c6875){_0x349821=_[_0x3eb4('0x66')](_0x2c6875,'id');var _0x189cc5;var _0x7a85e4=squel[_0x3eb4('0x83')]();_0x7a85e4[_0x3eb4('0x67')](_0x969be3[_0x3eb4('0x68')]);for(var _0x31b70f=0x0;_0x31b70f<_0x3dbbe1[_0x3eb4('0x40')];_0x31b70f+=0x1){_0x189cc5=_0x3dbbe1[_0x31b70f]['MetricId']?_0x349821[_0x3dbbe1[_0x31b70f]['MetricId']][_0x3eb4('0x6a')]:_0x3dbbe1[_0x31b70f][_0x3eb4('0x60')];_0x189cc5=_0x3dbbe1[_0x31b70f][_0x3eb4('0x6b')]?_['replace'](_0x4e9984[_0x3dbbe1[_0x31b70f][_0x3eb4('0x6b')]],'%s',_0x189cc5):_0x189cc5;_0x189cc5=_0x3dbbe1[_0x31b70f][_0x3eb4('0x6d')]?_[_0x3eb4('0x6c')](_0x24445a[_0x3dbbe1[_0x31b70f][_0x3eb4('0x6d')]],'%s',_0x189cc5):_0x189cc5;if(_0x3dbbe1[_0x31b70f][_0x3eb4('0x84')]){_0x7a85e4[_0x3eb4('0x5f')](_0x189cc5);}_0x3dbbe1[_0x31b70f]['orderBy']&&_0x7a85e4[_0x3eb4('0x6e')](_0x189cc5,_0x3dbbe1[_0x31b70f]['orderBy']===_0x3eb4('0x70')?![]:!![]);_0x7a85e4['field'](_0x189cc5,_0x3dbbe1[_0x31b70f][_0x3eb4('0x85')]||_0x189cc5);}if(_0x969be3[_0x3eb4('0x71')]){_0x969be3['joins']=JSON[_0x3eb4('0x77')](_0x969be3[_0x3eb4('0x71')]);for(var _0x540d17=0x0;_0x540d17<_0x969be3[_0x3eb4('0x71')][_0x3eb4('0x40')];_0x540d17+=0x1){if(_0x969be3[_0x3eb4('0x71')][_0x540d17][_0x3eb4('0x2a')]&&_[_0x3eb4('0x59')](_0x337595,_0x969be3[_0x3eb4('0x71')][_0x540d17]['type'])&&_0x969be3[_0x3eb4('0x71')][_0x540d17][_0x3eb4('0x72')]&&_0x969be3[_0x3eb4('0x71')][_0x540d17][_0x3eb4('0x73')]&&_0x969be3[_0x3eb4('0x71')][_0x540d17][_0x3eb4('0x74')]){_0x7a85e4[_0x969be3[_0x3eb4('0x71')][_0x540d17][_0x3eb4('0x2a')]](_0x969be3['joins'][_0x540d17][_0x3eb4('0x73')],null,util['format']('%s.%s\x20=\x20%s.%s',_0x969be3[_0x3eb4('0x68')],_0x969be3['joins'][_0x540d17][_0x3eb4('0x72')],_0x969be3['joins'][_0x540d17][_0x3eb4('0x73')],_0x969be3[_0x3eb4('0x71')][_0x540d17][_0x3eb4('0x74')]));}}}if(_0x969be3[_0x3eb4('0x76')]){_0x969be3['conditions']=JSON[_0x3eb4('0x77')](_0x969be3[_0x3eb4('0x76')]);_0x7a85e4['where'](_0x3d414c(_0x969be3[_0x3eb4('0x76')][_0x3eb4('0x5f')]));}_0x4569d8=_0x7a85e4[_0x3eb4('0x78')]();_0x7a85e4[_0x3eb4('0x1b')](_0x5bb6ed);_0x7a85e4[_0x3eb4('0x19')](0x0);return;}})[_0x3eb4('0x20')](function(){if(_0x27818a[_0x3eb4('0x86')]==='web'){return null;}var _0x11fb9d=_[_0x3eb4('0x39')](_0x27818a,{'name':_0x27818a[_0x3eb4('0x87')]||_0x27818a[_0x3eb4('0x2d')]||_0x969be3['name'],'basename':_0x459c01,'savename':util[_0x3eb4('0x6d')](_0x3eb4('0x88'),_0x27818a[_0x3eb4('0x2d')]||_0x969be3[_0x3eb4('0x2d')],require(_0x3eb4('0x89'))[_0x3eb4('0x8a')](0x4),_0x27818a['output']||_0x3eb4('0x8b')),'reportId':_0x969be3['id'],'reportType':_0x3eb4('0x8c')});return db['AnalyticExtractedReport'][_0x3eb4('0x43')](_0x11fb9d,{'raw':!![]});})['then'](function(_0x35822e){if(_0x969be3['table']===_0x3eb4('0x8d')){_0x4569d8[_0x3eb4('0x37')](_0x969be3[_0x3eb4('0x68')]+_0x3eb4('0x8e'),_0x27818a[_0x3eb4('0x8f')],_0x27818a[_0x3eb4('0x90')]);}else{_0x4569d8[_0x3eb4('0x37')](_0x969be3[_0x3eb4('0x68')]+_0x3eb4('0x91'),_0x27818a[_0x3eb4('0x8f')],_0x27818a[_0x3eb4('0x90')]);}if(_0x35822e){logger[_0x3eb4('0x92')](_0x3eb4('0x93'),_0x4569d8[_0x3eb4('0x94')]());require('child_process')[_0x3eb4('0x95')](path[_0x3eb4('0x7d')](__dirname,_0x3eb4('0x96'),_0x35822e['output']),[_0x35822e['id'],_0x4569d8[_0x3eb4('0x94')](),path[_0x3eb4('0x7d')](__dirname,_0x3eb4('0x97'),_0x35822e[_0x3eb4('0x98')]),_0x459c01]);return _0x35822e;}else{var _0x339dc7=squel[_0x3eb4('0x83')]();_0x339dc7[_0x3eb4('0x67')]('('+_0x4569d8[_0x3eb4('0x94')]()+')',_0x3eb4('0x99'));_0x339dc7['field'](_0x3eb4('0x9a'),_0x3eb4('0x1c'));_0x4569d8[_0x3eb4('0x1b')](_0x27818a[_0x3eb4('0x1b')]||_0x5bb6ed);_0x4569d8[_0x3eb4('0x19')](_0x27818a[_0x3eb4('0x19')]||0x0);return dbH[_0x3eb4('0x7a')]['query'](_0x339dc7[_0x3eb4('0x94')](),{'type':dbH[_0x3eb4('0x7a')]['QueryTypes'][_0x3eb4('0x7c')]})[_0x3eb4('0x20')](function(_0x4b9e90){if(!_0x4b9e90[_0x3eb4('0x40')]){_0x54c51e=0x0;}else{_0x54c51e=_0x4b9e90[0x0][_0x3eb4('0x1c')]||0x0;}return dbH[_0x3eb4('0x7a')]['query'](_0x4569d8[_0x3eb4('0x94')](),{'type':dbH[_0x3eb4('0x7a')][_0x3eb4('0x7b')][_0x3eb4('0x7c')]});})[_0x3eb4('0x20')](function(_0x4e34f9){return{'rows':_0x4e34f9||[],'count':_0x54c51e};});}});}exports[_0x3eb4('0x9b')]=function(_0x4ca2d8,_0x5bd36f){return runReport(_0x4ca2d8[_0x3eb4('0x3f')],_0x4ca2d8[_0x3eb4('0x2e')],_0x4ca2d8['options'])[_0x3eb4('0x20')](respondWithResult(_0x5bd36f,null))['catch'](handleError(_0x5bd36f,null));};exports[_0x3eb4('0x9c')]=runReport;exports[_0x3eb4('0x2e')]=function(_0x37296f,_0x4fb2e7){var _0x4082ad=0xa;var _0x4ef911=[_0x3eb4('0x7d'),_0x3eb4('0x7e'),_0x3eb4('0x4c'),_0x3eb4('0x4d')];var _0x32173e={'SUM':_0x3eb4('0x4e'),'COUNT':_0x3eb4('0x4f'),'COUNT DISTINCT':_0x3eb4('0x50'),'MAX':_0x3eb4('0x51'),'MIN':_0x3eb4('0x7f'),'AVG':_0x3eb4('0x52'),'GROUP_CONCAT':_0x3eb4('0x9d'),'GROUP_CONCAT ASC':_0x3eb4('0x53'),'GROUP_CONCAT DESC':_0x3eb4('0x54')};var _0xec2540={'SEC_TO_TIME':'SEC_TO_TIME(%s)','DATE':'DATE(%s)','HOUR':'HOUR(%s)','ROUND':_0x3eb4('0x58'),'UNIX_TIMESTAMP':_0x3eb4('0x80')};var _0x48b5b9=function(_0x1d402a){return!_[_0x3eb4('0x59')](['IS\x20NULL',_0x3eb4('0x5a'),_0x3eb4('0x5b'),_0x3eb4('0x5c')],_0x1d402a);};var _0x305c0c=function(_0x4aed02){if(!_0x4aed02||!_0x4aed02[_0x3eb4('0x5d')][_0x3eb4('0x40')]){return'';}for(var _0x47f1a9='(',_0x36b46a=0x0;_0x36b46a<_0x4aed02['rules'][_0x3eb4('0x40')];_0x36b46a+=0x1){_0x36b46a>0x0&&(_0x47f1a9+='\x20'+_0x4aed02[_0x3eb4('0x5e')]+'\x20');_0x47f1a9+=_0x4aed02[_0x3eb4('0x5d')][_0x36b46a][_0x3eb4('0x5f')]?_0x305c0c(_0x4aed02['rules'][_0x36b46a][_0x3eb4('0x5f')]):_0x4aed02['rules'][_0x36b46a][_0x3eb4('0x60')]+'\x20'+_0x4aed02[_0x3eb4('0x5d')][_0x36b46a][_0x3eb4('0x61')]+(_0x48b5b9(_0x4aed02[_0x3eb4('0x5d')][_0x36b46a]['condition'])?'\x20'+_0x4aed02['rules'][_0x36b46a][_0x3eb4('0x81')]:'');}return _0x47f1a9+')';};var _0x1a647d={'where':{'id':_0x37296f[_0x3eb4('0x3f')]['id']}},_0x234d31,_0x356440,_0x5e5294,_0x4c1735,_0xb5e664;_0x1a647d=_[_0x3eb4('0x39')]({},_0x1a647d,_0x37296f[_0x3eb4('0x3a')]);return db[_0x3eb4('0x27')][_0x3eb4('0x41')](_0x1a647d)[_0x3eb4('0x20')](function(_0x10f994){if(_0x10f994){_0x234d31=_0x10f994;return _0x10f994[_0x3eb4('0x62')]();}return null;})['then'](function(_0x3ccb9f){if(_0x3ccb9f){if(!_0x3ccb9f[_0x3eb4('0x40')]){throw new db['Sequelize'][(_0x3eb4('0x63'))](_0x3eb4('0x64'),0x193);}_0x356440=_0x3ccb9f;return db[_0x3eb4('0x65')][_0x3eb4('0x3d')]({'raw':!![]});}return null;})[_0x3eb4('0x20')](function(_0x2b58c0){if(_0x2b58c0){_0x5e5294=_['keyBy'](_0x2b58c0,'id');var _0x44f585;var _0x3f10f8=squel['select']();_0x3f10f8['from'](_0x234d31[_0x3eb4('0x68')]);for(var _0x26c719=0x0;_0x26c719<_0x356440[_0x3eb4('0x40')];_0x26c719+=0x1){_0x44f585=_0x356440[_0x26c719]['MetricId']?_0x5e5294[_0x356440[_0x26c719][_0x3eb4('0x69')]][_0x3eb4('0x6a')]:_0x356440[_0x26c719][_0x3eb4('0x60')];_0x44f585=_0x356440[_0x26c719][_0x3eb4('0x6b')]?_[_0x3eb4('0x6c')](_0x32173e[_0x356440[_0x26c719][_0x3eb4('0x6b')]],'%s',_0x44f585):_0x44f585;_0x44f585=_0x356440[_0x26c719][_0x3eb4('0x6d')]?_['replace'](_0xec2540[_0x356440[_0x26c719][_0x3eb4('0x6d')]],'%s',_0x44f585):_0x44f585;if(_0x356440[_0x26c719][_0x3eb4('0x84')]){_0x3f10f8['group'](_0x44f585);}_0x356440[_0x26c719][_0x3eb4('0x6f')]&&_0x3f10f8[_0x3eb4('0x6e')](_0x44f585,_0x356440[_0x26c719][_0x3eb4('0x6f')]===_0x3eb4('0x70')?![]:!![]);_0x3f10f8[_0x3eb4('0x60')](_0x44f585,_0x356440[_0x26c719][_0x3eb4('0x85')]||_0x44f585);}if(_0x234d31[_0x3eb4('0x71')]){_0x234d31[_0x3eb4('0x71')]=JSON[_0x3eb4('0x77')](_0x234d31[_0x3eb4('0x71')]);for(var _0x57bc5c=0x0;_0x57bc5c<_0x234d31[_0x3eb4('0x71')][_0x3eb4('0x40')];_0x57bc5c+=0x1){if(_0x234d31[_0x3eb4('0x71')][_0x57bc5c][_0x3eb4('0x2a')]&&_['includes'](_0x4ef911,_0x234d31['joins'][_0x57bc5c][_0x3eb4('0x2a')])&&_0x234d31[_0x3eb4('0x71')][_0x57bc5c][_0x3eb4('0x72')]&&_0x234d31[_0x3eb4('0x71')][_0x57bc5c][_0x3eb4('0x73')]&&_0x234d31['joins'][_0x57bc5c][_0x3eb4('0x74')]){_0x3f10f8[_0x234d31[_0x3eb4('0x71')][_0x57bc5c][_0x3eb4('0x2a')]](_0x234d31['joins'][_0x57bc5c][_0x3eb4('0x73')],null,util[_0x3eb4('0x6d')](_0x3eb4('0x75'),_0x234d31[_0x3eb4('0x68')],_0x234d31[_0x3eb4('0x71')][_0x57bc5c][_0x3eb4('0x72')],_0x234d31[_0x3eb4('0x71')][_0x57bc5c][_0x3eb4('0x73')],_0x234d31['joins'][_0x57bc5c][_0x3eb4('0x74')]));}}}if(_0x234d31['conditions']){_0x234d31[_0x3eb4('0x76')]=JSON[_0x3eb4('0x77')](_0x234d31['conditions']);_0x3f10f8[_0x3eb4('0x37')](_0x305c0c(_0x234d31['conditions'][_0x3eb4('0x5f')]));}_0xb5e664=_0x3f10f8[_0x3eb4('0x78')]();_0x3f10f8[_0x3eb4('0x1b')](_0x4082ad);_0x3f10f8[_0x3eb4('0x19')](0x0);logger[_0x3eb4('0x9e')](_0x3eb4('0x79'),_0x3f10f8['toString']());return dbH[_0x3eb4('0x7a')][_0x3eb4('0x2e')](_0x3f10f8[_0x3eb4('0x94')](),{'type':dbH[_0x3eb4('0x7a')][_0x3eb4('0x7b')]['SELECT']});}})[_0x3eb4('0x20')](function(){return{'sql':_0xb5e664[_0x3eb4('0x94')]()};})[_0x3eb4('0x20')](respondWithResult(_0x4fb2e7,null))['catch'](handleError(_0x4fb2e7,null));}; \ No newline at end of file +var _0xe479=['field','condition','value','options','getFields','Sequelize','ValidationErrorItem','Please\x20insert\x20at\x20least\x20one\x20field','AnalyticMetric','keyBy','select','from','table','MetricId','metric','function','replace','format','groupBy','orderBy','joins','parse','foreignTable','foreignKey','%s.%s\x20=\x20%s.%s','conditions','clone','debug','Limited\x20Query:','toString','sequelize','right_join','cross_join','SUM(%s)','AVG(%s)','DESC','parentKey','output','fullPath','%s-%s.%s','randomstring','generate','csv','AnalyticExtractedReport','cdr','.calldate\x20BETWEEN\x20?\x20AND\x20?','startDate','.createdAt\x20BETWEEN\x20?\x20AND\x20?','endDate','info','Run\x20Query:','fork','../../components/export/','../../files/reports','countTable','QueryTypes','SELECT','run','runReport','IS\x20NOT\x20EMPTY','alias','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','mustache','sox','to-csv','ejs','fs-extra','squel','jsforce','desk.js','querystring','papaparse','ioredis','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/license/util','../../mysqldb','dbH','sendStatus','status','end','offset','undefined','limit','count','Content-Range','json','apply','reject','save','then','UserProfileResource','destroy','error','stack','name','AnalyticCustomReport','rawAttributes','type','key','model','map','query','keys','intersection','fields','attributes','nolimit','order','sort','where','filters','pick','filter','merge','VIRTUAL','includeAll','include','findAll','rows','catch','show','params','find','create','body','user','get','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','Reports','userProfileId','autoAssociation','CustomReports','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','update','preview','join','left_join','COUNT(%s)','COUNT(DISTINCT\x20%s)','MAX(%s)','MIN(%s)','GROUP_CONCAT(%s)','GROUP_CONCAT(%s\x20ORDER\x20BY\x20%s\x20ASC)','GROUP_CONCAT(%s\x20ORDER\x20BY\x20%s\x20DESC)','SEC_TO_TIME(%s)','DATE(%s)','HOUR(%s)','ROUND(%s)','UNIX_TIMESTAMP(%s)','includes','IS\x20NULL','IS\x20NOT\x20NULL','IS\x20EMPTY','rules','length','operator','group'];(function(_0x2c85c0,_0x1dac4f){var _0xf4d4c9=function(_0xcd61ab){while(--_0xcd61ab){_0x2c85c0['push'](_0x2c85c0['shift']());}};_0xf4d4c9(++_0x1dac4f);}(_0xe479,0x18b));var _0x9e47=function(_0x5cffce,_0x494872){_0x5cffce=_0x5cffce-0x0;var _0x36f913=_0xe479[_0x5cffce];return _0x36f913;};'use strict';var emlformat=require(_0x9e47('0x0'));var rimraf=require(_0x9e47('0x1'));var zipdir=require(_0x9e47('0x2'));var jsonpatch=require(_0x9e47('0x3'));var rp=require(_0x9e47('0x4'));var moment=require(_0x9e47('0x5'));var BPromise=require('bluebird');var Mustache=require(_0x9e47('0x6'));var util=require('util');var path=require('path');var sox=require(_0x9e47('0x7'));var csv=require(_0x9e47('0x8'));var ejs=require(_0x9e47('0x9'));var fs=require('fs');var fs_extra=require(_0x9e47('0xa'));var _=require('lodash');var squel=require(_0x9e47('0xb'));var crypto=require('crypto');var jsforce=require(_0x9e47('0xc'));var deskjs=require(_0x9e47('0xd'));var toCsv=require(_0x9e47('0x8'));var querystring=require(_0x9e47('0xe'));var Papa=require(_0x9e47('0xf'));var Redis=require(_0x9e47('0x10'));var authService=require('../../components/auth/service');var qs=require('../../components/parsers/qs');var as=require(_0x9e47('0x11'));var hardwareService=require(_0x9e47('0x12'));var logger=require(_0x9e47('0x13'))(_0x9e47('0x14'));var utils=require(_0x9e47('0x15'));var config=require('../../config/environment');var licenseUtil=require(_0x9e47('0x16'));var db=require(_0x9e47('0x17'))['db'];var dbH=require(_0x9e47('0x17'))[_0x9e47('0x18')];function respondWithStatusCode(_0x2fcdbb,_0x170625){_0x170625=_0x170625||0xcc;return function(_0x535574){if(_0x535574){return _0x2fcdbb[_0x9e47('0x19')](_0x170625);}return _0x2fcdbb[_0x9e47('0x1a')](_0x170625)[_0x9e47('0x1b')]();};}function respondWithResult(_0x11d094,_0x47c79){_0x47c79=_0x47c79||0xc8;return function(_0xded344){if(_0xded344){return _0x11d094[_0x9e47('0x1a')](_0x47c79)['json'](_0xded344);}};}function respondWithFilteredResult(_0x2a88bd,_0x3101d8){return function(_0x28e1a3){if(_0x28e1a3){var _0x53845e=typeof _0x3101d8[_0x9e47('0x1c')]===_0x9e47('0x1d')&&typeof _0x3101d8[_0x9e47('0x1e')]===_0x9e47('0x1d');var _0x3e4361=_0x28e1a3['count'];var _0x13aa24=_0x53845e?0x0:_0x3101d8[_0x9e47('0x1c')];var _0x3bfd03=_0x53845e?_0x28e1a3[_0x9e47('0x1f')]:_0x3101d8[_0x9e47('0x1c')]+_0x3101d8[_0x9e47('0x1e')];var _0x19f490;if(_0x3bfd03>=_0x3e4361){_0x3bfd03=_0x3e4361;_0x19f490=0xc8;}else{_0x19f490=0xce;}_0x2a88bd[_0x9e47('0x1a')](_0x19f490);return _0x2a88bd['set'](_0x9e47('0x20'),_0x13aa24+'-'+_0x3bfd03+'/'+_0x3e4361)[_0x9e47('0x21')](_0x28e1a3);}return null;};}function patchUpdates(_0x4771b8){return function(_0x1aa628){try{jsonpatch[_0x9e47('0x22')](_0x1aa628,_0x4771b8,!![]);}catch(_0x3548ae){return BPromise[_0x9e47('0x23')](_0x3548ae);}return _0x1aa628[_0x9e47('0x24')]();};}function saveUpdates(_0x49e197,_0x3457fe){return function(_0x57f395){if(_0x57f395){return _0x57f395['update'](_0x49e197)[_0x9e47('0x25')](function(_0x181a73){return _0x181a73;});}return null;};}function removeEntity(_0x19f4d7,_0x4229a7){return function(_0x50f7e1){if(_0x50f7e1){return _0x50f7e1['destroy']()[_0x9e47('0x25')](function(){var _0x5aa07b=_0x50f7e1['get']({'plain':!![]});var _0x53d3cc='CustomReports';return db[_0x9e47('0x26')][_0x9e47('0x27')]({'where':{'type':_0x53d3cc,'resourceId':_0x5aa07b['id']}})[_0x9e47('0x25')](function(){return _0x50f7e1;});})[_0x9e47('0x25')](function(){_0x19f4d7[_0x9e47('0x1a')](0xcc)[_0x9e47('0x1b')]();});}};}function handleEntityNotFound(_0x3ca735,_0x3ae7ca){return function(_0x3a76e2){if(!_0x3a76e2){_0x3ca735[_0x9e47('0x19')](0x194);}return _0x3a76e2;};}function handleError(_0x23245b,_0x4ad7f9){_0x4ad7f9=_0x4ad7f9||0x1f4;return function(_0x51480b){logger[_0x9e47('0x28')](_0x51480b[_0x9e47('0x29')]);if(_0x51480b['name']){delete _0x51480b[_0x9e47('0x2a')];}_0x23245b[_0x9e47('0x1a')](_0x4ad7f9)['send'](_0x51480b);};}exports['index']=function(_0x2cf06a,_0x2f867e){var _0x32e569={},_0xf211d={},_0x42ed6e={'count':0x0,'rows':[]};var _0x5e6142=_['map'](db[_0x9e47('0x2b')][_0x9e47('0x2c')],function(_0x26c0cd){return{'name':_0x26c0cd['fieldName'],'type':_0x26c0cd[_0x9e47('0x2d')][_0x9e47('0x2e')]};});_0xf211d[_0x9e47('0x2f')]=_[_0x9e47('0x30')](_0x5e6142,_0x9e47('0x2a'));_0xf211d[_0x9e47('0x31')]=_[_0x9e47('0x32')](_0x2cf06a[_0x9e47('0x31')]);_0xf211d['filters']=_[_0x9e47('0x33')](_0xf211d['model'],_0xf211d[_0x9e47('0x31')]);_0x32e569['attributes']=_[_0x9e47('0x33')](_0xf211d['model'],qs[_0x9e47('0x34')](_0x2cf06a[_0x9e47('0x31')][_0x9e47('0x34')]));_0x32e569['attributes']=_0x32e569['attributes']['length']?_0x32e569[_0x9e47('0x35')]:_0xf211d[_0x9e47('0x2f')];if(!_0x2cf06a[_0x9e47('0x31')]['hasOwnProperty'](_0x9e47('0x36'))){_0x32e569[_0x9e47('0x1e')]=qs[_0x9e47('0x1e')](_0x2cf06a[_0x9e47('0x31')][_0x9e47('0x1e')]);_0x32e569[_0x9e47('0x1c')]=qs[_0x9e47('0x1c')](_0x2cf06a[_0x9e47('0x31')][_0x9e47('0x1c')]);}_0x32e569[_0x9e47('0x37')]=qs['sort'](_0x2cf06a[_0x9e47('0x31')][_0x9e47('0x38')]);_0x32e569[_0x9e47('0x39')]=qs[_0x9e47('0x3a')](_[_0x9e47('0x3b')](_0x2cf06a[_0x9e47('0x31')],_0xf211d[_0x9e47('0x3a')]),_0x5e6142);if(_0x2cf06a[_0x9e47('0x31')][_0x9e47('0x3c')]){_0x32e569[_0x9e47('0x39')]=_[_0x9e47('0x3d')](_0x32e569[_0x9e47('0x39')],{'$or':_[_0x9e47('0x30')](_0x5e6142,function(_0x4dcd7d){if(_0x4dcd7d[_0x9e47('0x2d')]!==_0x9e47('0x3e')){var _0x1f329a={};_0x1f329a[_0x4dcd7d['name']]={'$like':'%'+_0x2cf06a[_0x9e47('0x31')][_0x9e47('0x3c')]+'%'};return _0x1f329a;}})});}_0x32e569=_[_0x9e47('0x3d')]({},_0x32e569,_0x2cf06a['options']);var _0x3f00dc={'where':_0x32e569[_0x9e47('0x39')]};return db[_0x9e47('0x2b')][_0x9e47('0x1f')](_0x3f00dc)[_0x9e47('0x25')](function(_0x45ff1e){_0x42ed6e[_0x9e47('0x1f')]=_0x45ff1e;if(_0x2cf06a[_0x9e47('0x31')][_0x9e47('0x3f')]){_0x32e569[_0x9e47('0x40')]=[{'all':!![]}];}return db[_0x9e47('0x2b')][_0x9e47('0x41')](_0x32e569);})[_0x9e47('0x25')](function(_0x732516){_0x42ed6e[_0x9e47('0x42')]=_0x732516;return _0x42ed6e;})[_0x9e47('0x25')](respondWithFilteredResult(_0x2f867e,_0x32e569))[_0x9e47('0x43')](handleError(_0x2f867e,null));};exports[_0x9e47('0x44')]=function(_0x4c1291,_0x176922){var _0x241585={'raw':![],'where':{'id':_0x4c1291[_0x9e47('0x45')]['id']}},_0x58e964={};_0x58e964[_0x9e47('0x2f')]=_['keys'](db['AnalyticCustomReport']['rawAttributes']);_0x58e964['query']=_[_0x9e47('0x32')](_0x4c1291['query']);_0x58e964[_0x9e47('0x3a')]=_[_0x9e47('0x33')](_0x58e964[_0x9e47('0x2f')],_0x58e964[_0x9e47('0x31')]);_0x241585['attributes']=_[_0x9e47('0x33')](_0x58e964['model'],qs[_0x9e47('0x34')](_0x4c1291[_0x9e47('0x31')]['fields']));_0x241585[_0x9e47('0x35')]=_0x241585[_0x9e47('0x35')]['length']?_0x241585[_0x9e47('0x35')]:_0x58e964[_0x9e47('0x2f')];if(_0x4c1291[_0x9e47('0x31')][_0x9e47('0x3f')]){_0x241585[_0x9e47('0x40')]=[{'all':!![]}];}_0x241585=_['merge']({},_0x241585,_0x4c1291['options']);return db[_0x9e47('0x2b')][_0x9e47('0x46')](_0x241585)['then'](handleEntityNotFound(_0x176922,null))[_0x9e47('0x25')](respondWithResult(_0x176922,null))[_0x9e47('0x43')](handleError(_0x176922,null));};exports['create']=function(_0x6301c5,_0x1eb2ea){return db[_0x9e47('0x2b')][_0x9e47('0x47')](_0x6301c5[_0x9e47('0x48')],{})[_0x9e47('0x25')](function(_0x45cbb5){var _0x186031=_0x6301c5[_0x9e47('0x49')][_0x9e47('0x4a')]({'plain':!![]});if(!_0x186031)throw new Error(_0x9e47('0x4b'));if(_0x186031[_0x9e47('0x4c')]==='user'){var _0x550884=_0x45cbb5[_0x9e47('0x4a')]({'plain':!![]});var _0x2ab8be=_0x9e47('0x4d');return db['UserProfileSection']['find']({'where':{'name':_0x2ab8be,'userProfileId':_0x186031[_0x9e47('0x4e')]},'raw':!![]})[_0x9e47('0x25')](function(_0x164f56){if(_0x164f56&&_0x164f56[_0x9e47('0x4f')]===0x0){return db['UserProfileResource'][_0x9e47('0x47')]({'name':_0x550884['name'],'resourceId':_0x550884['id'],'type':_0x9e47('0x50'),'sectionId':_0x164f56['id']},{})[_0x9e47('0x25')](function(){return _0x45cbb5;});}else{return _0x45cbb5;}})[_0x9e47('0x43')](function(_0x1c4d4a){logger[_0x9e47('0x28')](_0x9e47('0x51'),_0x1c4d4a);throw _0x1c4d4a;});}return _0x45cbb5;})[_0x9e47('0x25')](respondWithResult(_0x1eb2ea,0xc9))[_0x9e47('0x43')](handleError(_0x1eb2ea,null));};exports[_0x9e47('0x52')]=function(_0x422023,_0x2e4dcc){if(_0x422023[_0x9e47('0x48')]['id']){delete _0x422023[_0x9e47('0x48')]['id'];}return db['AnalyticCustomReport']['find']({'where':{'id':_0x422023[_0x9e47('0x45')]['id']}})[_0x9e47('0x25')](handleEntityNotFound(_0x2e4dcc,null))[_0x9e47('0x25')](saveUpdates(_0x422023['body'],null))['then'](respondWithResult(_0x2e4dcc,null))[_0x9e47('0x43')](handleError(_0x2e4dcc,null));};exports[_0x9e47('0x27')]=function(_0x10850e,_0x3bba52){return db[_0x9e47('0x2b')]['find']({'where':{'id':_0x10850e[_0x9e47('0x45')]['id']}})[_0x9e47('0x25')](handleEntityNotFound(_0x3bba52,null))[_0x9e47('0x25')](removeEntity(_0x3bba52,null))[_0x9e47('0x43')](handleError(_0x3bba52,null));};exports[_0x9e47('0x53')]=function(_0x141f82,_0xa97782){var _0x5a230e=0xa;var _0xeab263=[_0x9e47('0x54'),_0x9e47('0x55'),'right_join','cross_join'];var _0x59d0b5={'SUM':'SUM(%s)','COUNT':_0x9e47('0x56'),'COUNT DISTINCT':_0x9e47('0x57'),'MAX':_0x9e47('0x58'),'MIN':_0x9e47('0x59'),'AVG':'AVG(%s)','GROUP_CONCAT':_0x9e47('0x5a'),'GROUP_CONCAT ASC':_0x9e47('0x5b'),'GROUP_CONCAT DESC':_0x9e47('0x5c')};var _0x9e75bb={'SEC_TO_TIME':_0x9e47('0x5d'),'DATE':_0x9e47('0x5e'),'HOUR':_0x9e47('0x5f'),'ROUND':_0x9e47('0x60'),'UNIX_TIMESTAMP':_0x9e47('0x61')};var _0x1ca96f=function(_0x597d95){return!_[_0x9e47('0x62')]([_0x9e47('0x63'),_0x9e47('0x64'),_0x9e47('0x65'),'IS\x20NOT\x20EMPTY'],_0x597d95);};var _0x1a87a9=function(_0x2bcd5a){if(!_0x2bcd5a||!_0x2bcd5a[_0x9e47('0x66')]['length']){return'';}for(var _0x233990='(',_0x1b12ee=0x0;_0x1b12ee<_0x2bcd5a['rules'][_0x9e47('0x67')];_0x1b12ee+=0x1){_0x1b12ee>0x0&&(_0x233990+='\x20'+_0x2bcd5a[_0x9e47('0x68')]+'\x20');_0x233990+=_0x2bcd5a[_0x9e47('0x66')][_0x1b12ee]['group']?_0x1a87a9(_0x2bcd5a[_0x9e47('0x66')][_0x1b12ee][_0x9e47('0x69')]):_0x2bcd5a[_0x9e47('0x66')][_0x1b12ee][_0x9e47('0x6a')]+'\x20'+_0x2bcd5a[_0x9e47('0x66')][_0x1b12ee][_0x9e47('0x6b')]+(_0x1ca96f(_0x2bcd5a['rules'][_0x1b12ee]['condition'])?'\x20'+_0x2bcd5a[_0x9e47('0x66')][_0x1b12ee][_0x9e47('0x6c')]:'');}return _0x233990+')';};var _0x32e932={'where':{'id':_0x141f82[_0x9e47('0x45')]['id']}},_0x2b57c0,_0x32845b,_0x168a14,_0xe94a82,_0x4a7450;_0x32e932=_[_0x9e47('0x3d')]({},_0x32e932,_0x141f82[_0x9e47('0x6d')]);return db['AnalyticCustomReport'][_0x9e47('0x46')](_0x32e932)[_0x9e47('0x25')](function(_0xff7317){if(_0xff7317){_0x2b57c0=_0xff7317;return _0xff7317[_0x9e47('0x6e')]();}return null;})[_0x9e47('0x25')](function(_0x42b15f){if(_0x42b15f){if(!_0x42b15f[_0x9e47('0x67')]){throw new db[(_0x9e47('0x6f'))][(_0x9e47('0x70'))](_0x9e47('0x71'),0x193);}_0x32845b=_0x42b15f;return db[_0x9e47('0x72')][_0x9e47('0x41')]({'raw':!![]});}return null;})[_0x9e47('0x25')](function(_0x3e30cf){if(_0x3e30cf){_0x168a14=_[_0x9e47('0x73')](_0x3e30cf,'id');var _0x100f78;var _0x35be59=squel[_0x9e47('0x74')]();_0x35be59[_0x9e47('0x75')](_0x2b57c0[_0x9e47('0x76')]);for(var _0x52b978=0x0;_0x52b978<_0x32845b['length'];_0x52b978+=0x1){_0x100f78=_0x32845b[_0x52b978][_0x9e47('0x77')]?_0x168a14[_0x32845b[_0x52b978][_0x9e47('0x77')]][_0x9e47('0x78')]:_0x32845b[_0x52b978][_0x9e47('0x6a')];_0x100f78=_0x32845b[_0x52b978][_0x9e47('0x79')]?_[_0x9e47('0x7a')](_0x59d0b5[_0x32845b[_0x52b978][_0x9e47('0x79')]],'%s',_0x100f78):_0x100f78;_0x100f78=_0x32845b[_0x52b978][_0x9e47('0x7b')]?_[_0x9e47('0x7a')](_0x9e75bb[_0x32845b[_0x52b978][_0x9e47('0x7b')]],'%s',_0x100f78):_0x100f78;if(_0x32845b[_0x52b978][_0x9e47('0x7c')]){_0x35be59['group'](_0x100f78);}_0x32845b[_0x52b978][_0x9e47('0x7d')]&&_0x35be59[_0x9e47('0x37')](_0x100f78,_0x32845b[_0x52b978][_0x9e47('0x7d')]==='DESC'?![]:!![]);_0x35be59[_0x9e47('0x6a')](_0x100f78,_0x32845b[_0x52b978]['alias']||_0x100f78);}if(_0x2b57c0[_0x9e47('0x7e')]){_0x2b57c0[_0x9e47('0x7e')]=JSON[_0x9e47('0x7f')](_0x2b57c0['joins']);for(var _0xce016c=0x0;_0xce016c<_0x2b57c0[_0x9e47('0x7e')]['length'];_0xce016c+=0x1){if(_0x2b57c0[_0x9e47('0x7e')][_0xce016c][_0x9e47('0x2d')]&&_['includes'](_0xeab263,_0x2b57c0[_0x9e47('0x7e')][_0xce016c]['type'])&&_0x2b57c0[_0x9e47('0x7e')][_0xce016c]['parentKey']&&_0x2b57c0[_0x9e47('0x7e')][_0xce016c][_0x9e47('0x80')]&&_0x2b57c0[_0x9e47('0x7e')][_0xce016c][_0x9e47('0x81')]){_0x35be59[_0x2b57c0[_0x9e47('0x7e')][_0xce016c]['type']](_0x2b57c0[_0x9e47('0x7e')][_0xce016c][_0x9e47('0x80')],null,util[_0x9e47('0x7b')](_0x9e47('0x82'),_0x2b57c0[_0x9e47('0x76')],_0x2b57c0[_0x9e47('0x7e')][_0xce016c]['parentKey'],_0x2b57c0[_0x9e47('0x7e')][_0xce016c][_0x9e47('0x80')],_0x2b57c0[_0x9e47('0x7e')][_0xce016c][_0x9e47('0x81')]));}}}if(_0x2b57c0[_0x9e47('0x83')]){_0x2b57c0['conditions']=JSON[_0x9e47('0x7f')](_0x2b57c0[_0x9e47('0x83')]);_0x35be59[_0x9e47('0x39')](_0x1a87a9(_0x2b57c0[_0x9e47('0x83')][_0x9e47('0x69')]));}_0x4a7450=_0x35be59[_0x9e47('0x84')]();_0x35be59['limit'](_0x5a230e);_0x35be59[_0x9e47('0x1c')](0x0);logger[_0x9e47('0x85')](_0x9e47('0x86'),_0x35be59[_0x9e47('0x87')]());return dbH[_0x9e47('0x88')]['query'](_0x35be59[_0x9e47('0x87')](),{'type':dbH['sequelize']['QueryTypes']['SELECT']});}})[_0x9e47('0x25')](respondWithResult(_0xa97782,null))[_0x9e47('0x43')](handleError(_0xa97782,null));};function runReport(_0x2fe78d,_0x2a0d74,_0x2912b2){var _0x436a82=_0x2a0d74[_0x9e47('0x2a')];var _0x26eb98=0xa;var _0x53dc83=[_0x9e47('0x54'),'left_join',_0x9e47('0x89'),_0x9e47('0x8a')];var _0x297ac6={'SUM':_0x9e47('0x8b'),'COUNT':_0x9e47('0x56'),'COUNT DISTINCT':_0x9e47('0x57'),'MAX':_0x9e47('0x58'),'MIN':_0x9e47('0x59'),'AVG':_0x9e47('0x8c'),'GROUP_CONCAT':_0x9e47('0x5a'),'GROUP_CONCAT ASC':_0x9e47('0x5b'),'GROUP_CONCAT DESC':_0x9e47('0x5c')};var _0x47c9b9={'SEC_TO_TIME':_0x9e47('0x5d'),'DATE':_0x9e47('0x5e'),'HOUR':_0x9e47('0x5f'),'ROUND':_0x9e47('0x60'),'UNIX_TIMESTAMP':_0x9e47('0x61')};var _0x427178=function(_0x4690d6){return!_[_0x9e47('0x62')]([_0x9e47('0x63'),_0x9e47('0x64'),'IS\x20EMPTY','IS\x20NOT\x20EMPTY'],_0x4690d6);};var _0x31ad30=function(_0x4a9d87){if(!_0x4a9d87||!_0x4a9d87[_0x9e47('0x66')][_0x9e47('0x67')]){return'';}for(var _0x5b6576='(',_0x5de751=0x0;_0x5de751<_0x4a9d87['rules']['length'];_0x5de751+=0x1){_0x5de751>0x0&&(_0x5b6576+='\x20'+_0x4a9d87['operator']+'\x20');_0x5b6576+=_0x4a9d87[_0x9e47('0x66')][_0x5de751][_0x9e47('0x69')]?_0x31ad30(_0x4a9d87['rules'][_0x5de751][_0x9e47('0x69')]):_0x4a9d87[_0x9e47('0x66')][_0x5de751]['field']+'\x20'+_0x4a9d87['rules'][_0x5de751][_0x9e47('0x6b')]+(_0x427178(_0x4a9d87[_0x9e47('0x66')][_0x5de751]['condition'])?'\x20'+_0x4a9d87['rules'][_0x5de751][_0x9e47('0x6c')]:'');}return _0x5b6576+')';};var _0x60116f={'where':{'id':_0x2fe78d['id']}},_0x5ed396,_0x411316,_0x533e4a,_0x59fa48,_0x1bbe43;_0x60116f=_[_0x9e47('0x3d')]({},_0x60116f,_0x2912b2);return db[_0x9e47('0x2b')][_0x9e47('0x46')](_0x60116f)[_0x9e47('0x25')](function(_0x59a080){if(_0x59a080){_0x5ed396=_0x59a080;return _0x59a080[_0x9e47('0x6e')]();}return null;})[_0x9e47('0x25')](function(_0x1579f1){if(_0x1579f1){if(!_0x1579f1[_0x9e47('0x67')]){throw new db[(_0x9e47('0x6f'))][(_0x9e47('0x70'))]('Please\x20insert\x20at\x20least\x20one\x20field',0x193);}_0x411316=_0x1579f1;return db[_0x9e47('0x72')][_0x9e47('0x41')]({'raw':!![]});}return null;})[_0x9e47('0x25')](function(_0x670bb5){if(_0x670bb5){_0x533e4a=_[_0x9e47('0x73')](_0x670bb5,'id');var _0x4ab242;var _0x44a73e=squel['select']();_0x44a73e['from'](_0x5ed396[_0x9e47('0x76')]);for(var _0x234a7d=0x0;_0x234a7d<_0x411316[_0x9e47('0x67')];_0x234a7d+=0x1){_0x4ab242=_0x411316[_0x234a7d][_0x9e47('0x77')]?_0x533e4a[_0x411316[_0x234a7d][_0x9e47('0x77')]]['metric']:_0x411316[_0x234a7d][_0x9e47('0x6a')];_0x4ab242=_0x411316[_0x234a7d]['function']?_[_0x9e47('0x7a')](_0x297ac6[_0x411316[_0x234a7d][_0x9e47('0x79')]],'%s',_0x4ab242):_0x4ab242;_0x4ab242=_0x411316[_0x234a7d][_0x9e47('0x7b')]?_[_0x9e47('0x7a')](_0x47c9b9[_0x411316[_0x234a7d][_0x9e47('0x7b')]],'%s',_0x4ab242):_0x4ab242;if(_0x411316[_0x234a7d][_0x9e47('0x7c')]){_0x44a73e[_0x9e47('0x69')](_0x4ab242);}_0x411316[_0x234a7d]['orderBy']&&_0x44a73e[_0x9e47('0x37')](_0x4ab242,_0x411316[_0x234a7d][_0x9e47('0x7d')]===_0x9e47('0x8d')?![]:!![]);_0x44a73e[_0x9e47('0x6a')](_0x4ab242,_0x411316[_0x234a7d]['alias']||_0x4ab242);}if(_0x5ed396[_0x9e47('0x7e')]){_0x5ed396['joins']=JSON[_0x9e47('0x7f')](_0x5ed396[_0x9e47('0x7e')]);for(var _0x696005=0x0;_0x696005<_0x5ed396['joins'][_0x9e47('0x67')];_0x696005+=0x1){if(_0x5ed396[_0x9e47('0x7e')][_0x696005][_0x9e47('0x2d')]&&_['includes'](_0x53dc83,_0x5ed396[_0x9e47('0x7e')][_0x696005]['type'])&&_0x5ed396[_0x9e47('0x7e')][_0x696005][_0x9e47('0x8e')]&&_0x5ed396[_0x9e47('0x7e')][_0x696005][_0x9e47('0x80')]&&_0x5ed396[_0x9e47('0x7e')][_0x696005][_0x9e47('0x81')]){_0x44a73e[_0x5ed396['joins'][_0x696005][_0x9e47('0x2d')]](_0x5ed396[_0x9e47('0x7e')][_0x696005][_0x9e47('0x80')],null,util[_0x9e47('0x7b')](_0x9e47('0x82'),_0x5ed396[_0x9e47('0x76')],_0x5ed396[_0x9e47('0x7e')][_0x696005][_0x9e47('0x8e')],_0x5ed396[_0x9e47('0x7e')][_0x696005][_0x9e47('0x80')],_0x5ed396['joins'][_0x696005][_0x9e47('0x81')]));}}}if(_0x5ed396[_0x9e47('0x83')]){_0x5ed396['conditions']=JSON[_0x9e47('0x7f')](_0x5ed396['conditions']);_0x44a73e['where'](_0x31ad30(_0x5ed396[_0x9e47('0x83')]['group']));}_0x1bbe43=_0x44a73e[_0x9e47('0x84')]();_0x44a73e[_0x9e47('0x1e')](_0x26eb98);_0x44a73e[_0x9e47('0x1c')](0x0);return;}})[_0x9e47('0x25')](function(){if(_0x2a0d74[_0x9e47('0x8f')]==='web'){return null;}var _0x4f7fc0=_[_0x9e47('0x3d')](_0x2a0d74,{'name':_0x2a0d74[_0x9e47('0x90')]||_0x2a0d74[_0x9e47('0x2a')]||_0x5ed396['name'],'basename':_0x436a82,'savename':util[_0x9e47('0x7b')](_0x9e47('0x91'),_0x2a0d74[_0x9e47('0x2a')]||_0x5ed396[_0x9e47('0x2a')],require(_0x9e47('0x92'))[_0x9e47('0x93')](0x4),_0x2a0d74['output']||_0x9e47('0x94')),'reportId':_0x5ed396['id'],'reportType':'custom'});return db[_0x9e47('0x95')][_0x9e47('0x47')](_0x4f7fc0,{'raw':!![]});})[_0x9e47('0x25')](function(_0x55b36e){if(_0x5ed396[_0x9e47('0x76')]===_0x9e47('0x96')){_0x1bbe43[_0x9e47('0x39')](_0x5ed396[_0x9e47('0x76')]+_0x9e47('0x97'),_0x2a0d74[_0x9e47('0x98')],_0x2a0d74['endDate']);}else{_0x1bbe43['where'](_0x5ed396[_0x9e47('0x76')]+_0x9e47('0x99'),_0x2a0d74[_0x9e47('0x98')],_0x2a0d74[_0x9e47('0x9a')]);}if(_0x55b36e){logger[_0x9e47('0x9b')](_0x9e47('0x9c'),_0x1bbe43['toString']());require('child_process')[_0x9e47('0x9d')](path[_0x9e47('0x54')](__dirname,_0x9e47('0x9e'),_0x55b36e[_0x9e47('0x8f')]),[_0x55b36e['id'],_0x1bbe43[_0x9e47('0x87')](),path[_0x9e47('0x54')](__dirname,_0x9e47('0x9f'),_0x55b36e['savename']),_0x436a82]);return _0x55b36e;}else{var _0x36d82b=squel['select']();_0x36d82b[_0x9e47('0x75')]('('+_0x1bbe43[_0x9e47('0x87')]()+')',_0x9e47('0xa0'));_0x36d82b[_0x9e47('0x6a')]('COUNT(*)',_0x9e47('0x1f'));_0x1bbe43[_0x9e47('0x1e')](_0x2a0d74[_0x9e47('0x1e')]||_0x26eb98);_0x1bbe43[_0x9e47('0x1c')](_0x2a0d74[_0x9e47('0x1c')]||0x0);return dbH[_0x9e47('0x88')][_0x9e47('0x31')](_0x36d82b[_0x9e47('0x87')](),{'type':dbH[_0x9e47('0x88')][_0x9e47('0xa1')][_0x9e47('0xa2')]})[_0x9e47('0x25')](function(_0x1434d8){if(!_0x1434d8['length']){_0x59fa48=0x0;}else{_0x59fa48=_0x1434d8[0x0][_0x9e47('0x1f')]||0x0;}return dbH[_0x9e47('0x88')]['query'](_0x1bbe43[_0x9e47('0x87')](),{'type':dbH[_0x9e47('0x88')]['QueryTypes'][_0x9e47('0xa2')]});})[_0x9e47('0x25')](function(_0x62a6a5){return{'rows':_0x62a6a5||[],'count':_0x59fa48};});}});}exports[_0x9e47('0xa3')]=function(_0x499c8c,_0x414042){return runReport(_0x499c8c[_0x9e47('0x45')],_0x499c8c[_0x9e47('0x31')],_0x499c8c['options'])[_0x9e47('0x25')](respondWithResult(_0x414042,null))[_0x9e47('0x43')](handleError(_0x414042,null));};exports[_0x9e47('0xa4')]=runReport;exports[_0x9e47('0x31')]=function(_0x59e9e1,_0x4267da){var _0x139afd=0xa;var _0x488d2a=[_0x9e47('0x54'),_0x9e47('0x55'),_0x9e47('0x89'),_0x9e47('0x8a')];var _0x39fb34={'SUM':_0x9e47('0x8b'),'COUNT':_0x9e47('0x56'),'COUNT DISTINCT':_0x9e47('0x57'),'MAX':_0x9e47('0x58'),'MIN':_0x9e47('0x59'),'AVG':_0x9e47('0x8c'),'GROUP_CONCAT':'GROUP_CONCAT(%s)','GROUP_CONCAT ASC':'GROUP_CONCAT(%s\x20ORDER\x20BY\x20%s\x20ASC)','GROUP_CONCAT DESC':_0x9e47('0x5c')};var _0x5689bc={'SEC_TO_TIME':_0x9e47('0x5d'),'DATE':_0x9e47('0x5e'),'HOUR':_0x9e47('0x5f'),'ROUND':_0x9e47('0x60'),'UNIX_TIMESTAMP':_0x9e47('0x61')};var _0x327bc7=function(_0x3c5bfd){return!_[_0x9e47('0x62')]([_0x9e47('0x63'),_0x9e47('0x64'),_0x9e47('0x65'),_0x9e47('0xa5')],_0x3c5bfd);};var _0x33ec24=function(_0x25e93b){if(!_0x25e93b||!_0x25e93b[_0x9e47('0x66')][_0x9e47('0x67')]){return'';}for(var _0x2a7998='(',_0x595255=0x0;_0x595255<_0x25e93b[_0x9e47('0x66')][_0x9e47('0x67')];_0x595255+=0x1){_0x595255>0x0&&(_0x2a7998+='\x20'+_0x25e93b['operator']+'\x20');_0x2a7998+=_0x25e93b['rules'][_0x595255]['group']?_0x33ec24(_0x25e93b[_0x9e47('0x66')][_0x595255][_0x9e47('0x69')]):_0x25e93b['rules'][_0x595255]['field']+'\x20'+_0x25e93b[_0x9e47('0x66')][_0x595255][_0x9e47('0x6b')]+(_0x327bc7(_0x25e93b[_0x9e47('0x66')][_0x595255][_0x9e47('0x6b')])?'\x20'+_0x25e93b[_0x9e47('0x66')][_0x595255]['value']:'');}return _0x2a7998+')';};var _0x57f266={'where':{'id':_0x59e9e1['params']['id']}},_0x25ddd2,_0xc8dd63,_0x389161,_0x57755c,_0x22c973;_0x57f266=_[_0x9e47('0x3d')]({},_0x57f266,_0x59e9e1[_0x9e47('0x6d')]);return db[_0x9e47('0x2b')][_0x9e47('0x46')](_0x57f266)[_0x9e47('0x25')](function(_0x51ee24){if(_0x51ee24){_0x25ddd2=_0x51ee24;return _0x51ee24['getFields']();}return null;})['then'](function(_0x472d96){if(_0x472d96){if(!_0x472d96['length']){throw new db[(_0x9e47('0x6f'))]['ValidationErrorItem']('Please\x20insert\x20at\x20least\x20one\x20field',0x193);}_0xc8dd63=_0x472d96;return db[_0x9e47('0x72')][_0x9e47('0x41')]({'raw':!![]});}return null;})[_0x9e47('0x25')](function(_0x4db986){if(_0x4db986){_0x389161=_[_0x9e47('0x73')](_0x4db986,'id');var _0xad5768;var _0x550f1d=squel[_0x9e47('0x74')]();_0x550f1d[_0x9e47('0x75')](_0x25ddd2['table']);for(var _0x241ffe=0x0;_0x241ffe<_0xc8dd63[_0x9e47('0x67')];_0x241ffe+=0x1){_0xad5768=_0xc8dd63[_0x241ffe][_0x9e47('0x77')]?_0x389161[_0xc8dd63[_0x241ffe]['MetricId']][_0x9e47('0x78')]:_0xc8dd63[_0x241ffe][_0x9e47('0x6a')];_0xad5768=_0xc8dd63[_0x241ffe]['function']?_[_0x9e47('0x7a')](_0x39fb34[_0xc8dd63[_0x241ffe][_0x9e47('0x79')]],'%s',_0xad5768):_0xad5768;_0xad5768=_0xc8dd63[_0x241ffe]['format']?_[_0x9e47('0x7a')](_0x5689bc[_0xc8dd63[_0x241ffe][_0x9e47('0x7b')]],'%s',_0xad5768):_0xad5768;if(_0xc8dd63[_0x241ffe][_0x9e47('0x7c')]){_0x550f1d['group'](_0xad5768);}_0xc8dd63[_0x241ffe][_0x9e47('0x7d')]&&_0x550f1d['order'](_0xad5768,_0xc8dd63[_0x241ffe][_0x9e47('0x7d')]==='DESC'?![]:!![]);_0x550f1d['field'](_0xad5768,_0xc8dd63[_0x241ffe][_0x9e47('0xa6')]||_0xad5768);}if(_0x25ddd2[_0x9e47('0x7e')]){_0x25ddd2[_0x9e47('0x7e')]=JSON['parse'](_0x25ddd2['joins']);for(var _0x2022d2=0x0;_0x2022d2<_0x25ddd2[_0x9e47('0x7e')]['length'];_0x2022d2+=0x1){if(_0x25ddd2[_0x9e47('0x7e')][_0x2022d2][_0x9e47('0x2d')]&&_[_0x9e47('0x62')](_0x488d2a,_0x25ddd2[_0x9e47('0x7e')][_0x2022d2][_0x9e47('0x2d')])&&_0x25ddd2['joins'][_0x2022d2][_0x9e47('0x8e')]&&_0x25ddd2[_0x9e47('0x7e')][_0x2022d2][_0x9e47('0x80')]&&_0x25ddd2['joins'][_0x2022d2][_0x9e47('0x81')]){_0x550f1d[_0x25ddd2[_0x9e47('0x7e')][_0x2022d2]['type']](_0x25ddd2[_0x9e47('0x7e')][_0x2022d2][_0x9e47('0x80')],null,util[_0x9e47('0x7b')](_0x9e47('0x82'),_0x25ddd2[_0x9e47('0x76')],_0x25ddd2[_0x9e47('0x7e')][_0x2022d2][_0x9e47('0x8e')],_0x25ddd2[_0x9e47('0x7e')][_0x2022d2][_0x9e47('0x80')],_0x25ddd2[_0x9e47('0x7e')][_0x2022d2]['foreignKey']));}}}if(_0x25ddd2[_0x9e47('0x83')]){_0x25ddd2['conditions']=JSON[_0x9e47('0x7f')](_0x25ddd2[_0x9e47('0x83')]);_0x550f1d[_0x9e47('0x39')](_0x33ec24(_0x25ddd2[_0x9e47('0x83')]['group']));}_0x22c973=_0x550f1d[_0x9e47('0x84')]();_0x550f1d[_0x9e47('0x1e')](_0x139afd);_0x550f1d['offset'](0x0);logger[_0x9e47('0x85')](_0x9e47('0x86'),_0x550f1d[_0x9e47('0x87')]());return dbH['sequelize'][_0x9e47('0x31')](_0x550f1d[_0x9e47('0x87')](),{'type':dbH[_0x9e47('0x88')]['QueryTypes'][_0x9e47('0xa2')]});}})[_0x9e47('0x25')](function(){return{'sql':_0x22c973['toString']()};})[_0x9e47('0x25')](respondWithResult(_0x4267da,null))[_0x9e47('0x43')](handleError(_0x4267da,null));}; \ No newline at end of file diff --git a/server/api/analyticCustomReport/analyticCustomReport.model.js b/server/api/analyticCustomReport/analyticCustomReport.model.js index 376fbd3..21e10d2 100644 --- a/server/api/analyticCustomReport/analyticCustomReport.model.js +++ b/server/api/analyticCustomReport/analyticCustomReport.model.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xd392=['lodash','util','../../config/logger','bluebird','path','rimraf','../../config/environment','./analyticCustomReport.attributes','define','AnalyticCustomReport','analytics_custom_reports'];(function(_0x332aa4,_0x5c6d94){var _0x48ddff=function(_0x43eb76){while(--_0x43eb76){_0x332aa4['push'](_0x332aa4['shift']());}};_0x48ddff(++_0x5c6d94);}(_0xd392,0xe7));var _0x2d39=function(_0x52b0a4,_0x4114c2){_0x52b0a4=_0x52b0a4-0x0;var _0x93e5a8=_0xd392[_0x52b0a4];return _0x93e5a8;};'use strict';var _=require(_0x2d39('0x0'));var util=require(_0x2d39('0x1'));var logger=require(_0x2d39('0x2'))('api');var moment=require('moment');var BPromise=require(_0x2d39('0x3'));var rp=require('request-promise');var fs=require('fs');var path=require(_0x2d39('0x4'));var rimraf=require(_0x2d39('0x5'));var config=require(_0x2d39('0x6'));var attributes=require(_0x2d39('0x7'));module['exports']=function(_0x2024d1,_0x9edfc8){return _0x2024d1[_0x2d39('0x8')](_0x2d39('0x9'),attributes,{'tableName':_0x2d39('0xa'),'paranoid':!![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file +var _0xcbb4=['define','AnalyticCustomReport','analytics_custom_reports','lodash','../../config/logger','api','moment','bluebird','request-promise','path','rimraf','../../config/environment','exports'];(function(_0x6131cd,_0x4c26a1){var _0x47e916=function(_0x1f2bce){while(--_0x1f2bce){_0x6131cd['push'](_0x6131cd['shift']());}};_0x47e916(++_0x4c26a1);}(_0xcbb4,0x17c));var _0x4cbb=function(_0x33aded,_0x173eb7){_0x33aded=_0x33aded-0x0;var _0x3e1558=_0xcbb4[_0x33aded];return _0x3e1558;};'use strict';var _=require(_0x4cbb('0x0'));var util=require('util');var logger=require(_0x4cbb('0x1'))(_0x4cbb('0x2'));var moment=require(_0x4cbb('0x3'));var BPromise=require(_0x4cbb('0x4'));var rp=require(_0x4cbb('0x5'));var fs=require('fs');var path=require(_0x4cbb('0x6'));var rimraf=require(_0x4cbb('0x7'));var config=require(_0x4cbb('0x8'));var attributes=require('./analyticCustomReport.attributes');module[_0x4cbb('0x9')]=function(_0x56d048,_0x358850){return _0x56d048[_0x4cbb('0xa')](_0x4cbb('0xb'),attributes,{'tableName':_0x4cbb('0xc'),'paranoid':!![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file diff --git a/server/api/analyticCustomReport/analyticCustomReport.rpc.js b/server/api/analyticCustomReport/analyticCustomReport.rpc.js index 841ff3b..89eae03 100644 --- a/server/api/analyticCustomReport/analyticCustomReport.rpc.js +++ b/server/api/analyticCustomReport/analyticCustomReport.rpc.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xea0a=['randomstring','ioredis','../../config/utils','../../config/logger','rpc','jayson/promise','client','http','request','then','request\x20sent','debug','AnalyticCustomReport,\x20%s,\x20%s,\x20%s','stringify','error','AnalyticCustomReport,\x20%s,\x20%s','message','info','result','catch','moment'];(function(_0x203ddd,_0x476a99){var _0xf2de84=function(_0x590f42){while(--_0x590f42){_0x203ddd['push'](_0x203ddd['shift']());}};_0xf2de84(++_0x476a99);}(_0xea0a,0x164));var _0xaea0=function(_0x2f55d7,_0x42d1b9){_0x2f55d7=_0x2f55d7-0x0;var _0xbde18f=_0xea0a[_0x2f55d7];return _0xbde18f;};'use strict';var _=require('lodash');var util=require('util');var moment=require(_0xaea0('0x0'));var BPromise=require('bluebird');var rs=require(_0xaea0('0x1'));var fs=require('fs');var Redis=require(_0xaea0('0x2'));var db=require('../../mysqldb')['db'];var utils=require(_0xaea0('0x3'));var logger=require(_0xaea0('0x4'))(_0xaea0('0x5'));var config=require('../../config/environment');var jayson=require(_0xaea0('0x6'));var client=jayson[_0xaea0('0x7')][_0xaea0('0x8')]({'port':0x232a});function respondWithRpcPromise(_0x2c517a,_0x481558,_0x58f6ff){return new BPromise(function(_0x47c938,_0x5ed487){return client[_0xaea0('0x9')](_0x2c517a,_0x58f6ff)[_0xaea0('0xa')](function(_0x4447cd){logger['info']('AnalyticCustomReport,\x20%s,\x20%s',_0x481558,_0xaea0('0xb'));logger[_0xaea0('0xc')](_0xaea0('0xd'),_0x481558,_0xaea0('0xb'),JSON[_0xaea0('0xe')](_0x4447cd));if(_0x4447cd[_0xaea0('0xf')]){if(_0x4447cd[_0xaea0('0xf')]['code']===0x1f4){logger[_0xaea0('0xf')](_0xaea0('0x10'),_0x481558,_0x4447cd[_0xaea0('0xf')][_0xaea0('0x11')]);return _0x5ed487(_0x4447cd['error']['message']);}logger['error'](_0xaea0('0x10'),_0x481558,_0x4447cd[_0xaea0('0xf')][_0xaea0('0x11')]);return _0x47c938(_0x4447cd[_0xaea0('0xf')][_0xaea0('0x11')]);}else{logger[_0xaea0('0x12')](_0xaea0('0x10'),_0x481558,_0xaea0('0xb'));_0x47c938(_0x4447cd[_0xaea0('0x13')][_0xaea0('0x11')]);}})[_0xaea0('0x14')](function(_0x3b117b){logger['error'](_0xaea0('0x10'),_0x481558,_0x3b117b);_0x5ed487(_0x3b117b);});});} \ No newline at end of file +var _0xc8ec=['AnalyticCustomReport,\x20%s,\x20%s','request\x20sent','debug','AnalyticCustomReport,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','catch','lodash','util','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','rpc','../../config/environment','jayson/promise','http','then'];(function(_0x6e35e0,_0x104832){var _0x13ca24=function(_0x302814){while(--_0x302814){_0x6e35e0['push'](_0x6e35e0['shift']());}};_0x13ca24(++_0x104832);}(_0xc8ec,0x16a));var _0xcc8e=function(_0x19c1d2,_0x29f30b){_0x19c1d2=_0x19c1d2-0x0;var _0x1a61bc=_0xc8ec[_0x19c1d2];return _0x1a61bc;};'use strict';var _=require(_0xcc8e('0x0'));var util=require(_0xcc8e('0x1'));var moment=require('moment');var BPromise=require(_0xcc8e('0x2'));var rs=require(_0xcc8e('0x3'));var fs=require('fs');var Redis=require(_0xcc8e('0x4'));var db=require(_0xcc8e('0x5'))['db'];var utils=require(_0xcc8e('0x6'));var logger=require('../../config/logger')(_0xcc8e('0x7'));var config=require(_0xcc8e('0x8'));var jayson=require(_0xcc8e('0x9'));var client=jayson['client'][_0xcc8e('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x181859,_0x45b4d8,_0x201fdf){return new BPromise(function(_0x48eb7c,_0x56da17){return client['request'](_0x181859,_0x201fdf)[_0xcc8e('0xb')](function(_0x3b2fd7){logger['info'](_0xcc8e('0xc'),_0x45b4d8,_0xcc8e('0xd'));logger[_0xcc8e('0xe')](_0xcc8e('0xf'),_0x45b4d8,_0xcc8e('0xd'),JSON[_0xcc8e('0x10')](_0x3b2fd7));if(_0x3b2fd7['error']){if(_0x3b2fd7[_0xcc8e('0x11')][_0xcc8e('0x12')]===0x1f4){logger[_0xcc8e('0x11')]('AnalyticCustomReport,\x20%s,\x20%s',_0x45b4d8,_0x3b2fd7['error'][_0xcc8e('0x13')]);return _0x56da17(_0x3b2fd7[_0xcc8e('0x11')][_0xcc8e('0x13')]);}logger['error']('AnalyticCustomReport,\x20%s,\x20%s',_0x45b4d8,_0x3b2fd7[_0xcc8e('0x11')][_0xcc8e('0x13')]);return _0x48eb7c(_0x3b2fd7['error']['message']);}else{logger['info'](_0xcc8e('0xc'),_0x45b4d8,_0xcc8e('0xd'));_0x48eb7c(_0x3b2fd7[_0xcc8e('0x14')]['message']);}})[_0xcc8e('0x15')](function(_0x20f22a){logger[_0xcc8e('0x11')](_0xcc8e('0xc'),_0x45b4d8,_0x20f22a);_0x56da17(_0x20f22a);});});} \ No newline at end of file diff --git a/server/api/analyticCustomReport/index.js b/server/api/analyticCustomReport/index.js index 30d3d32..2ba12df 100644 --- a/server/api/analyticCustomReport/index.js +++ b/server/api/analyticCustomReport/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xe10c=['exports','multer','path','connect-timeout','express','Router','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','./analyticCustomReport.controller','get','isAuthenticated','index','/:id','show','/:id/preview','preview','/:id/run','run','/:id/query','query','post','put','update','delete','destroy'];(function(_0x351af1,_0x2770f7){var _0x2aaafd=function(_0x149d25){while(--_0x149d25){_0x351af1['push'](_0x351af1['shift']());}};_0x2aaafd(++_0x2770f7);}(_0xe10c,0x145));var _0xce10=function(_0x4c75be,_0x1dd90e){_0x4c75be=_0x4c75be-0x0;var _0x170fb2=_0xe10c[_0x4c75be];return _0x170fb2;};'use strict';var multer=require(_0xce10('0x0'));var util=require('util');var path=require(_0xce10('0x1'));var timeout=require(_0xce10('0x2'));var express=require(_0xce10('0x3'));var router=express[_0xce10('0x4')]();var fs_extra=require(_0xce10('0x5'));var auth=require(_0xce10('0x6'));var interaction=require(_0xce10('0x7'));var config=require(_0xce10('0x8'));var controller=require(_0xce10('0x9'));router[_0xce10('0xa')]('/',auth[_0xce10('0xb')](),controller[_0xce10('0xc')]);router[_0xce10('0xa')](_0xce10('0xd'),auth[_0xce10('0xb')](),controller[_0xce10('0xe')]);router[_0xce10('0xa')](_0xce10('0xf'),auth[_0xce10('0xb')](),controller[_0xce10('0x10')]);router['get'](_0xce10('0x11'),auth[_0xce10('0xb')](),controller[_0xce10('0x12')]);router[_0xce10('0xa')](_0xce10('0x13'),auth['isAuthenticated'](),controller[_0xce10('0x14')]);router[_0xce10('0x15')]('/',auth[_0xce10('0xb')](),controller['create']);router[_0xce10('0x16')](_0xce10('0xd'),auth['isAuthenticated'](),controller[_0xce10('0x17')]);router[_0xce10('0x18')](_0xce10('0xd'),auth[_0xce10('0xb')](),controller[_0xce10('0x19')]);module[_0xce10('0x1a')]=router; \ No newline at end of file +var _0x26b1=['preview','run','/:id/query','query','create','put','/:id','update','delete','destroy','multer','connect-timeout','express','Router','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','./analyticCustomReport.controller','get','isAuthenticated','show'];(function(_0x126558,_0x143c9a){var _0x1f6d14=function(_0x2b0eea){while(--_0x2b0eea){_0x126558['push'](_0x126558['shift']());}};_0x1f6d14(++_0x143c9a);}(_0x26b1,0xd0));var _0x126b=function(_0x5abd64,_0x274f04){_0x5abd64=_0x5abd64-0x0;var _0x199d62=_0x26b1[_0x5abd64];return _0x199d62;};'use strict';var multer=require(_0x126b('0x0'));var util=require('util');var path=require('path');var timeout=require(_0x126b('0x1'));var express=require(_0x126b('0x2'));var router=express[_0x126b('0x3')]();var fs_extra=require(_0x126b('0x4'));var auth=require(_0x126b('0x5'));var interaction=require(_0x126b('0x6'));var config=require(_0x126b('0x7'));var controller=require(_0x126b('0x8'));router[_0x126b('0x9')]('/',auth[_0x126b('0xa')](),controller['index']);router[_0x126b('0x9')]('/:id',auth['isAuthenticated'](),controller[_0x126b('0xb')]);router[_0x126b('0x9')]('/:id/preview',auth[_0x126b('0xa')](),controller[_0x126b('0xc')]);router[_0x126b('0x9')]('/:id/run',auth[_0x126b('0xa')](),controller[_0x126b('0xd')]);router['get'](_0x126b('0xe'),auth['isAuthenticated'](),controller[_0x126b('0xf')]);router['post']('/',auth[_0x126b('0xa')](),controller[_0x126b('0x10')]);router[_0x126b('0x11')](_0x126b('0x12'),auth[_0x126b('0xa')](),controller[_0x126b('0x13')]);router[_0x126b('0x14')](_0x126b('0x12'),auth[_0x126b('0xa')](),controller[_0x126b('0x15')]);module['exports']=router; \ No newline at end of file diff --git a/server/api/analyticDefaultReport/analyticDefaultReport.attributes.js b/server/api/analyticDefaultReport/analyticDefaultReport.attributes.js index 2341588..67eda56 100644 --- a/server/api/analyticDefaultReport/analyticDefaultReport.attributes.js +++ b/server/api/analyticDefaultReport/analyticDefaultReport.attributes.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xf494=['STRING','TEXT','sequelize','exports'];(function(_0x1e45ec,_0x2e11eb){var _0x42f22d=function(_0x35bd42){while(--_0x35bd42){_0x1e45ec['push'](_0x1e45ec['shift']());}};_0x42f22d(++_0x2e11eb);}(_0xf494,0x1c6));var _0x4f49=function(_0x386a98,_0x2d72c1){_0x386a98=_0x386a98-0x0;var _0x443371=_0xf494[_0x386a98];return _0x443371;};'use strict';var Sequelize=require(_0x4f49('0x0'));module[_0x4f49('0x1')]={'name':{'type':Sequelize[_0x4f49('0x2')],'allowNull':![]},'description':{'type':Sequelize['STRING']},'parent':{'type':Sequelize[_0x4f49('0x2')]},'table':{'type':Sequelize[_0x4f49('0x2')]},'conditions':{'type':Sequelize[_0x4f49('0x3')]},'joins':{'type':Sequelize[_0x4f49('0x3')]}}; \ No newline at end of file +var _0x2bd8=['TEXT','sequelize','STRING'];(function(_0xcc639b,_0x2806fa){var _0x426ed8=function(_0x5cbc54){while(--_0x5cbc54){_0xcc639b['push'](_0xcc639b['shift']());}};_0x426ed8(++_0x2806fa);}(_0x2bd8,0x130));var _0x82bd=function(_0x412500,_0x320050){_0x412500=_0x412500-0x0;var _0x22561e=_0x2bd8[_0x412500];return _0x22561e;};'use strict';var Sequelize=require(_0x82bd('0x0'));module['exports']={'name':{'type':Sequelize[_0x82bd('0x1')],'allowNull':![]},'description':{'type':Sequelize[_0x82bd('0x1')]},'parent':{'type':Sequelize[_0x82bd('0x1')]},'table':{'type':Sequelize[_0x82bd('0x1')]},'conditions':{'type':Sequelize[_0x82bd('0x2')]},'joins':{'type':Sequelize[_0x82bd('0x2')]}}; \ No newline at end of file diff --git a/server/api/analyticDefaultReport/analyticDefaultReport.controller.js b/server/api/analyticDefaultReport/analyticDefaultReport.controller.js index 0e2ec0a..06c3b7d 100644 --- a/server/api/analyticDefaultReport/analyticDefaultReport.controller.js +++ b/server/api/analyticDefaultReport/analyticDefaultReport.controller.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x7a54=['options','AnalyticDefaultReport','includeAll','include','show','keys','attributes','create','body','user','role','get','Reports','UserProfileSection','userProfileId','UserProfileResource','catch','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','update','find','params','right_join','cross_join','SUM(%s)','COUNT(%s)','MIN(%s)','AVG(%s)','GROUP_CONCAT(%s)','GROUP_CONCAT(%s\x20ORDER\x20BY\x20%s\x20ASC)','SEC_TO_TIME(%s)','DATE(%s)','ROUND(%s)','includes','IS\x20NULL','IS\x20NOT\x20NULL','IS\x20NOT\x20EMPTY','rules','group','condition','value','Sequelize','ValidationErrorItem','Please\x20insert\x20at\x20least\x20one\x20field','AnalyticMetric','findAll','keyBy','select','from','MetricId','metric','field','function','replace','format','orderBy','DESC','joins','parse','type','parentKey','foreignTable','foreignKey','%s.%s\x20=\x20%s.%s','table','conditions','debug','toString','sequelize','QueryTypes','SELECT','join','left_join','COUNT(DISTINCT\x20%s)','MAX(%s)','HOUR(%s)','UNIX_TIMESTAMP(%s)','IS\x20EMPTY','operator','groupBy','alias','output','web','fullPath','%s-%s.%s','generate','default','AnalyticExtractedReport','cdr','startDate','.createdAt\x20BETWEEN\x20?\x20AND\x20?','endDate','info','Run\x20Query:','child_process','../../components/export/','../../files/reports','savename','countTable','COUNT(*)','GROUP_CONCAT(%s\x20ORDER\x20BY\x20%s\x20DESC)','getFields','clone','Limited\x20Query:','eml-format','rimraf','zip-dir','request-promise','moment','mustache','util','path','sox','to-csv','fs-extra','squel','crypto','desk.js','ioredis','../../components/auth/service','../../components/parsers/advancedSearch','api','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','dbH','sendStatus','status','end','json','limit','count','offset','Content-Range','apply','save','then','destroy','DefaultReports','error','stack','name','index','map','fieldName','model','query','filters','intersection','fields','length','hasOwnProperty','nolimit','order','sort','where','filter','VIRTUAL','merge'];(function(_0x1081a3,_0x2ac784){var _0x5696a2=function(_0x23d2f6){while(--_0x23d2f6){_0x1081a3['push'](_0x1081a3['shift']());}};_0x5696a2(++_0x2ac784);}(_0x7a54,0x106));var _0x47a5=function(_0x17f0ba,_0x47c61a){_0x17f0ba=_0x17f0ba-0x0;var _0x205731=_0x7a54[_0x17f0ba];return _0x205731;};'use strict';var emlformat=require(_0x47a5('0x0'));var rimraf=require(_0x47a5('0x1'));var zipdir=require(_0x47a5('0x2'));var jsonpatch=require('fast-json-patch');var rp=require(_0x47a5('0x3'));var moment=require(_0x47a5('0x4'));var BPromise=require('bluebird');var Mustache=require(_0x47a5('0x5'));var util=require(_0x47a5('0x6'));var path=require(_0x47a5('0x7'));var sox=require(_0x47a5('0x8'));var csv=require(_0x47a5('0x9'));var ejs=require('ejs');var fs=require('fs');var fs_extra=require(_0x47a5('0xa'));var _=require('lodash');var squel=require(_0x47a5('0xb'));var crypto=require(_0x47a5('0xc'));var jsforce=require('jsforce');var deskjs=require(_0x47a5('0xd'));var toCsv=require('to-csv');var querystring=require('querystring');var Papa=require('papaparse');var Redis=require(_0x47a5('0xe'));var authService=require(_0x47a5('0xf'));var qs=require('../../components/parsers/qs');var as=require(_0x47a5('0x10'));var hardwareService=require('../../config/license/hardware');var logger=require('../../config/logger')(_0x47a5('0x11'));var utils=require(_0x47a5('0x12'));var config=require(_0x47a5('0x13'));var licenseUtil=require(_0x47a5('0x14'));var db=require(_0x47a5('0x15'))['db'];var dbH=require(_0x47a5('0x15'))[_0x47a5('0x16')];function respondWithStatusCode(_0x5beb89,_0x44bd3e){_0x44bd3e=_0x44bd3e||0xcc;return function(_0x221b54){if(_0x221b54){return _0x5beb89[_0x47a5('0x17')](_0x44bd3e);}return _0x5beb89[_0x47a5('0x18')](_0x44bd3e)[_0x47a5('0x19')]();};}function respondWithResult(_0x620ee9,_0x3c6c46){_0x3c6c46=_0x3c6c46||0xc8;return function(_0x190faa){if(_0x190faa){return _0x620ee9['status'](_0x3c6c46)[_0x47a5('0x1a')](_0x190faa);}};}function respondWithFilteredResult(_0x11faf5,_0x3b001e){return function(_0x2a2cbb){if(_0x2a2cbb){var _0x1ef44c=typeof _0x3b001e['offset']==='undefined'&&typeof _0x3b001e[_0x47a5('0x1b')]==='undefined';var _0x5247fd=_0x2a2cbb[_0x47a5('0x1c')];var _0xaf70a6=_0x1ef44c?0x0:_0x3b001e[_0x47a5('0x1d')];var _0x1ef371=_0x1ef44c?_0x2a2cbb[_0x47a5('0x1c')]:_0x3b001e[_0x47a5('0x1d')]+_0x3b001e[_0x47a5('0x1b')];var _0xe3c618;if(_0x1ef371>=_0x5247fd){_0x1ef371=_0x5247fd;_0xe3c618=0xc8;}else{_0xe3c618=0xce;}_0x11faf5[_0x47a5('0x18')](_0xe3c618);return _0x11faf5['set'](_0x47a5('0x1e'),_0xaf70a6+'-'+_0x1ef371+'/'+_0x5247fd)[_0x47a5('0x1a')](_0x2a2cbb);}return null;};}function patchUpdates(_0x47cf3c){return function(_0x2b0360){try{jsonpatch[_0x47a5('0x1f')](_0x2b0360,_0x47cf3c,!![]);}catch(_0x36874d){return BPromise['reject'](_0x36874d);}return _0x2b0360[_0x47a5('0x20')]();};}function saveUpdates(_0x2f142b,_0x23db32){return function(_0x7a9f9e){if(_0x7a9f9e){return _0x7a9f9e['update'](_0x2f142b)[_0x47a5('0x21')](function(_0x385687){return _0x385687;});}return null;};}function removeEntity(_0x513981,_0x28747d){return function(_0xc4cd63){if(_0xc4cd63){return _0xc4cd63[_0x47a5('0x22')]()[_0x47a5('0x21')](function(){var _0x3abd6a=_0xc4cd63['get']({'plain':!![]});var _0x53078a=_0x47a5('0x23');return db['UserProfileResource'][_0x47a5('0x22')]({'where':{'type':_0x53078a,'resourceId':_0x3abd6a['id']}})['then'](function(){return _0xc4cd63;});})[_0x47a5('0x21')](function(){_0x513981[_0x47a5('0x18')](0xcc)[_0x47a5('0x19')]();});}};}function handleEntityNotFound(_0x1dac65,_0x21f296){return function(_0x3ba0b7){if(!_0x3ba0b7){_0x1dac65[_0x47a5('0x17')](0x194);}return _0x3ba0b7;};}function handleError(_0x136b14,_0x16631f){_0x16631f=_0x16631f||0x1f4;return function(_0x361bfa){logger[_0x47a5('0x24')](_0x361bfa[_0x47a5('0x25')]);if(_0x361bfa[_0x47a5('0x26')]){delete _0x361bfa['name'];}_0x136b14[_0x47a5('0x18')](_0x16631f)['send'](_0x361bfa);};}exports[_0x47a5('0x27')]=function(_0x9ac908,_0x16901f){var _0x4d6b57={},_0x256650={},_0x625952={'count':0x0,'rows':[]};var _0x39b50b=_[_0x47a5('0x28')](db['AnalyticDefaultReport']['rawAttributes'],function(_0x6f9a12){return{'name':_0x6f9a12[_0x47a5('0x29')],'type':_0x6f9a12['type']['key']};});_0x256650[_0x47a5('0x2a')]=_[_0x47a5('0x28')](_0x39b50b,'name');_0x256650[_0x47a5('0x2b')]=_['keys'](_0x9ac908[_0x47a5('0x2b')]);_0x256650[_0x47a5('0x2c')]=_['intersection'](_0x256650['model'],_0x256650[_0x47a5('0x2b')]);_0x4d6b57['attributes']=_[_0x47a5('0x2d')](_0x256650[_0x47a5('0x2a')],qs[_0x47a5('0x2e')](_0x9ac908['query'][_0x47a5('0x2e')]));_0x4d6b57['attributes']=_0x4d6b57['attributes'][_0x47a5('0x2f')]?_0x4d6b57['attributes']:_0x256650[_0x47a5('0x2a')];if(!_0x9ac908['query'][_0x47a5('0x30')](_0x47a5('0x31'))){_0x4d6b57[_0x47a5('0x1b')]=qs[_0x47a5('0x1b')](_0x9ac908[_0x47a5('0x2b')][_0x47a5('0x1b')]);_0x4d6b57[_0x47a5('0x1d')]=qs[_0x47a5('0x1d')](_0x9ac908[_0x47a5('0x2b')]['offset']);}_0x4d6b57[_0x47a5('0x32')]=qs[_0x47a5('0x33')](_0x9ac908['query'][_0x47a5('0x33')]);_0x4d6b57[_0x47a5('0x34')]=qs[_0x47a5('0x2c')](_['pick'](_0x9ac908[_0x47a5('0x2b')],_0x256650[_0x47a5('0x2c')]),_0x39b50b);if(_0x9ac908['query'][_0x47a5('0x35')]){_0x4d6b57[_0x47a5('0x34')]=_['merge'](_0x4d6b57['where'],{'$or':_['map'](_0x39b50b,function(_0x12d9f2){if(_0x12d9f2['type']!==_0x47a5('0x36')){var _0x1f9631={};_0x1f9631[_0x12d9f2[_0x47a5('0x26')]]={'$like':'%'+_0x9ac908[_0x47a5('0x2b')][_0x47a5('0x35')]+'%'};return _0x1f9631;}})});}_0x4d6b57=_[_0x47a5('0x37')]({},_0x4d6b57,_0x9ac908[_0x47a5('0x38')]);var _0x1f3d01={'where':_0x4d6b57[_0x47a5('0x34')]};return db[_0x47a5('0x39')][_0x47a5('0x1c')](_0x1f3d01)[_0x47a5('0x21')](function(_0x23d6d8){_0x625952['count']=_0x23d6d8;if(_0x9ac908[_0x47a5('0x2b')][_0x47a5('0x3a')]){_0x4d6b57[_0x47a5('0x3b')]=[{'all':!![]}];}return db[_0x47a5('0x39')]['findAll'](_0x4d6b57);})[_0x47a5('0x21')](function(_0x528ef3){_0x625952['rows']=_0x528ef3;return _0x625952;})['then'](respondWithFilteredResult(_0x16901f,_0x4d6b57))['catch'](handleError(_0x16901f,null));};exports[_0x47a5('0x3c')]=function(_0x5ec4e5,_0x2bb502){var _0x3a740b={'raw':!![],'where':{'id':_0x5ec4e5['params']['id']}},_0x448610={};_0x448610[_0x47a5('0x2a')]=_[_0x47a5('0x3d')](db['AnalyticDefaultReport']['rawAttributes']);_0x448610[_0x47a5('0x2b')]=_['keys'](_0x5ec4e5[_0x47a5('0x2b')]);_0x448610[_0x47a5('0x2c')]=_[_0x47a5('0x2d')](_0x448610[_0x47a5('0x2a')],_0x448610[_0x47a5('0x2b')]);_0x3a740b[_0x47a5('0x3e')]=_[_0x47a5('0x2d')](_0x448610[_0x47a5('0x2a')],qs[_0x47a5('0x2e')](_0x5ec4e5[_0x47a5('0x2b')][_0x47a5('0x2e')]));_0x3a740b[_0x47a5('0x3e')]=_0x3a740b[_0x47a5('0x3e')][_0x47a5('0x2f')]?_0x3a740b[_0x47a5('0x3e')]:_0x448610[_0x47a5('0x2a')];if(_0x5ec4e5['query'][_0x47a5('0x3a')]){_0x3a740b[_0x47a5('0x3b')]=[{'all':!![]}];}_0x3a740b=_['merge']({},_0x3a740b,_0x5ec4e5['options']);return db[_0x47a5('0x39')]['find'](_0x3a740b)[_0x47a5('0x21')](handleEntityNotFound(_0x2bb502,null))[_0x47a5('0x21')](respondWithResult(_0x2bb502,null))['catch'](handleError(_0x2bb502,null));};exports['create']=function(_0x3d85cc,_0x52d409){return db[_0x47a5('0x39')][_0x47a5('0x3f')](_0x3d85cc[_0x47a5('0x40')],{})[_0x47a5('0x21')](function(_0x44fe8a){var _0x26acd2=_0x3d85cc[_0x47a5('0x41')]['get']({'plain':!![]});if(!_0x26acd2)throw new Error('Unable\x20to\x20retrieve\x20the\x20current\x20user');if(_0x26acd2[_0x47a5('0x42')]===_0x47a5('0x41')){var _0x1163e3=_0x44fe8a[_0x47a5('0x43')]({'plain':!![]});var _0x2c7020=_0x47a5('0x44');return db[_0x47a5('0x45')]['find']({'where':{'name':_0x2c7020,'userProfileId':_0x26acd2[_0x47a5('0x46')]},'raw':!![]})[_0x47a5('0x21')](function(_0x5f6a){if(_0x5f6a&&_0x5f6a['autoAssociation']===0x0){return db[_0x47a5('0x47')]['create']({'name':_0x1163e3[_0x47a5('0x26')],'resourceId':_0x1163e3['id'],'type':_0x47a5('0x23'),'sectionId':_0x5f6a['id']},{})[_0x47a5('0x21')](function(){return _0x44fe8a;});}else{return _0x44fe8a;}})[_0x47a5('0x48')](function(_0x588551){logger[_0x47a5('0x24')](_0x47a5('0x49'),_0x588551);throw _0x588551;});}return _0x44fe8a;})[_0x47a5('0x21')](respondWithResult(_0x52d409,0xc9))[_0x47a5('0x48')](handleError(_0x52d409,null));};exports[_0x47a5('0x4a')]=function(_0x6a53b3,_0x24e9f4){if(_0x6a53b3['body']['id']){delete _0x6a53b3[_0x47a5('0x40')]['id'];}return db[_0x47a5('0x39')][_0x47a5('0x4b')]({'where':{'id':_0x6a53b3[_0x47a5('0x4c')]['id']}})[_0x47a5('0x21')](handleEntityNotFound(_0x24e9f4,null))[_0x47a5('0x21')](saveUpdates(_0x6a53b3['body'],null))[_0x47a5('0x21')](respondWithResult(_0x24e9f4,null))[_0x47a5('0x48')](handleError(_0x24e9f4,null));};exports[_0x47a5('0x22')]=function(_0x53871e,_0x4c5ed){return db[_0x47a5('0x39')][_0x47a5('0x4b')]({'where':{'id':_0x53871e['params']['id']}})['then'](handleEntityNotFound(_0x4c5ed,null))[_0x47a5('0x21')](removeEntity(_0x4c5ed,null))[_0x47a5('0x48')](handleError(_0x4c5ed,null));};exports['preview']=function(_0x4cf792,_0x6d6b2b){var _0x4d6a82=0xa;var _0x16bb8a=['join','left_join',_0x47a5('0x4d'),_0x47a5('0x4e')];var _0x53eedf={'SUM':_0x47a5('0x4f'),'COUNT':_0x47a5('0x50'),'COUNT DISTINCT':'COUNT(DISTINCT\x20%s)','MAX':'MAX(%s)','MIN':_0x47a5('0x51'),'AVG':_0x47a5('0x52'),'GROUP_CONCAT':_0x47a5('0x53'),'GROUP_CONCAT ASC':_0x47a5('0x54'),'GROUP_CONCAT DESC':'GROUP_CONCAT(%s\x20ORDER\x20BY\x20%s\x20DESC)'};var _0x199621={'SEC_TO_TIME':_0x47a5('0x55'),'DATE':_0x47a5('0x56'),'HOUR':'HOUR(%s)','ROUND':_0x47a5('0x57'),'UNIX_TIMESTAMP':'UNIX_TIMESTAMP(%s)'};var _0x485e3c=function(_0x470da6){return!_[_0x47a5('0x58')]([_0x47a5('0x59'),_0x47a5('0x5a'),'IS\x20EMPTY',_0x47a5('0x5b')],_0x470da6);};var _0x5d1550=function(_0x5cbe97){if(!_0x5cbe97||!_0x5cbe97['rules']['length']){return'';}for(var _0x212d92='(',_0x6cd4ea=0x0;_0x6cd4ea<_0x5cbe97[_0x47a5('0x5c')]['length'];_0x6cd4ea+=0x1){_0x6cd4ea>0x0&&(_0x212d92+='\x20'+_0x5cbe97['operator']+'\x20');_0x212d92+=_0x5cbe97[_0x47a5('0x5c')][_0x6cd4ea][_0x47a5('0x5d')]?_0x5d1550(_0x5cbe97[_0x47a5('0x5c')][_0x6cd4ea][_0x47a5('0x5d')]):_0x5cbe97[_0x47a5('0x5c')][_0x6cd4ea]['field']+'\x20'+_0x5cbe97[_0x47a5('0x5c')][_0x6cd4ea]['condition']+(_0x485e3c(_0x5cbe97[_0x47a5('0x5c')][_0x6cd4ea][_0x47a5('0x5e')])?'\x20'+_0x5cbe97['rules'][_0x6cd4ea][_0x47a5('0x5f')]:'');}return _0x212d92+')';};var _0x345104={'where':{'id':_0x4cf792[_0x47a5('0x4c')]['id']}},_0x132854,_0x3e8274,_0x2d6494,_0x215634,_0x35cca8;_0x345104=_['merge']({},_0x345104,_0x4cf792[_0x47a5('0x38')]);return db[_0x47a5('0x39')][_0x47a5('0x4b')](_0x345104)[_0x47a5('0x21')](function(_0x396cb0){if(_0x396cb0){_0x132854=_0x396cb0;return _0x396cb0['getFields']();}return null;})[_0x47a5('0x21')](function(_0xdfcecc){if(_0xdfcecc){if(!_0xdfcecc[_0x47a5('0x2f')]){throw new db[(_0x47a5('0x60'))][(_0x47a5('0x61'))](_0x47a5('0x62'),0x193);}_0x3e8274=_0xdfcecc;return db[_0x47a5('0x63')][_0x47a5('0x64')]({'raw':!![]});}return null;})[_0x47a5('0x21')](function(_0x44cb90){if(_0x44cb90){_0x2d6494=_[_0x47a5('0x65')](_0x44cb90,'id');var _0x44fda9;var _0x3c0006=squel[_0x47a5('0x66')]();_0x3c0006[_0x47a5('0x67')](_0x132854['table']);for(var _0x42dd7d=0x0;_0x42dd7d<_0x3e8274[_0x47a5('0x2f')];_0x42dd7d+=0x1){_0x44fda9=_0x3e8274[_0x42dd7d][_0x47a5('0x68')]?_0x2d6494[_0x3e8274[_0x42dd7d]['MetricId']][_0x47a5('0x69')]:_0x3e8274[_0x42dd7d][_0x47a5('0x6a')];_0x44fda9=_0x3e8274[_0x42dd7d][_0x47a5('0x6b')]?_[_0x47a5('0x6c')](_0x53eedf[_0x3e8274[_0x42dd7d]['function']],'%s',_0x44fda9):_0x44fda9;_0x44fda9=_0x3e8274[_0x42dd7d][_0x47a5('0x6d')]?_['replace'](_0x199621[_0x3e8274[_0x42dd7d][_0x47a5('0x6d')]],'%s',_0x44fda9):_0x44fda9;if(_0x3e8274[_0x42dd7d]['groupBy']){_0x3c0006[_0x47a5('0x5d')](_0x44fda9);}_0x3e8274[_0x42dd7d]['orderBy']&&_0x3c0006[_0x47a5('0x32')](_0x44fda9,_0x3e8274[_0x42dd7d][_0x47a5('0x6e')]===_0x47a5('0x6f')?![]:!![]);_0x3c0006['field'](_0x44fda9,_0x3e8274[_0x42dd7d]['alias']||_0x44fda9);}if(_0x132854['joins']){_0x132854[_0x47a5('0x70')]=JSON[_0x47a5('0x71')](_0x132854[_0x47a5('0x70')]);for(var _0x117510=0x0;_0x117510<_0x132854['joins'][_0x47a5('0x2f')];_0x117510+=0x1){if(_0x132854[_0x47a5('0x70')][_0x117510][_0x47a5('0x72')]&&_[_0x47a5('0x58')](_0x16bb8a,_0x132854[_0x47a5('0x70')][_0x117510][_0x47a5('0x72')])&&_0x132854[_0x47a5('0x70')][_0x117510][_0x47a5('0x73')]&&_0x132854[_0x47a5('0x70')][_0x117510][_0x47a5('0x74')]&&_0x132854[_0x47a5('0x70')][_0x117510][_0x47a5('0x75')]){_0x3c0006[_0x132854['joins'][_0x117510][_0x47a5('0x72')]](_0x132854['joins'][_0x117510][_0x47a5('0x74')],null,util[_0x47a5('0x6d')](_0x47a5('0x76'),_0x132854[_0x47a5('0x77')],_0x132854[_0x47a5('0x70')][_0x117510][_0x47a5('0x73')],_0x132854[_0x47a5('0x70')][_0x117510][_0x47a5('0x74')],_0x132854[_0x47a5('0x70')][_0x117510][_0x47a5('0x75')]));}}}if(_0x132854[_0x47a5('0x78')]){_0x132854[_0x47a5('0x78')]=JSON[_0x47a5('0x71')](_0x132854[_0x47a5('0x78')]);_0x3c0006[_0x47a5('0x34')](_0x5d1550(_0x132854['conditions']['group']));}_0x35cca8=_0x3c0006['clone']();_0x3c0006['limit'](_0x4d6a82);_0x3c0006[_0x47a5('0x1d')](0x0);logger[_0x47a5('0x79')]('Limited\x20Query:',_0x3c0006[_0x47a5('0x7a')]());return dbH[_0x47a5('0x7b')][_0x47a5('0x2b')](_0x3c0006[_0x47a5('0x7a')](),{'type':dbH[_0x47a5('0x7b')][_0x47a5('0x7c')][_0x47a5('0x7d')]});}})[_0x47a5('0x21')](respondWithResult(_0x6d6b2b,null))[_0x47a5('0x48')](handleError(_0x6d6b2b,null));};function runReport(_0x1ffe3c,_0x24a6c1,_0x5e5f16){var _0x18fa31=_0x24a6c1[_0x47a5('0x26')];var _0x420671=0xa;var _0x4f35ff=[_0x47a5('0x7e'),_0x47a5('0x7f'),_0x47a5('0x4d'),'cross_join'];var _0x19dc8c={'SUM':'SUM(%s)','COUNT':'COUNT(%s)','COUNT DISTINCT':_0x47a5('0x80'),'MAX':_0x47a5('0x81'),'MIN':_0x47a5('0x51'),'AVG':_0x47a5('0x52'),'GROUP_CONCAT':_0x47a5('0x53'),'GROUP_CONCAT ASC':_0x47a5('0x54'),'GROUP_CONCAT DESC':'GROUP_CONCAT(%s\x20ORDER\x20BY\x20%s\x20DESC)'};var _0x592322={'SEC_TO_TIME':_0x47a5('0x55'),'DATE':'DATE(%s)','HOUR':_0x47a5('0x82'),'ROUND':_0x47a5('0x57'),'UNIX_TIMESTAMP':_0x47a5('0x83')};var _0xb16bdd=function(_0x53ea2b){return!_[_0x47a5('0x58')](['IS\x20NULL','IS\x20NOT\x20NULL',_0x47a5('0x84'),_0x47a5('0x5b')],_0x53ea2b);};var _0x5b91f7=function(_0x1926bd){if(!_0x1926bd||!_0x1926bd[_0x47a5('0x5c')][_0x47a5('0x2f')]){return'';}for(var _0x4c25ec='(',_0x280372=0x0;_0x280372<_0x1926bd['rules'][_0x47a5('0x2f')];_0x280372+=0x1){_0x280372>0x0&&(_0x4c25ec+='\x20'+_0x1926bd[_0x47a5('0x85')]+'\x20');_0x4c25ec+=_0x1926bd[_0x47a5('0x5c')][_0x280372]['group']?_0x5b91f7(_0x1926bd[_0x47a5('0x5c')][_0x280372][_0x47a5('0x5d')]):_0x1926bd[_0x47a5('0x5c')][_0x280372]['field']+'\x20'+_0x1926bd[_0x47a5('0x5c')][_0x280372]['condition']+(_0xb16bdd(_0x1926bd[_0x47a5('0x5c')][_0x280372]['condition'])?'\x20'+_0x1926bd[_0x47a5('0x5c')][_0x280372][_0x47a5('0x5f')]:'');}return _0x4c25ec+')';};var _0x20a742={'where':{'id':_0x1ffe3c['id']}},_0x211fbf,_0x51738b,_0x42fcce,_0x2ae130,_0x23c393;_0x20a742=_[_0x47a5('0x37')]({},_0x20a742,_0x5e5f16);return db[_0x47a5('0x39')]['find'](_0x20a742)['then'](function(_0x569550){if(_0x569550){_0x211fbf=_0x569550;return _0x569550['getFields']();}return null;})[_0x47a5('0x21')](function(_0xa8809a){if(_0xa8809a){if(!_0xa8809a[_0x47a5('0x2f')]){throw new db['Sequelize'][(_0x47a5('0x61'))](_0x47a5('0x62'),0x193);}_0x51738b=_0xa8809a;return db['AnalyticMetric'][_0x47a5('0x64')]({'raw':!![]});}return null;})[_0x47a5('0x21')](function(_0x19acfa){if(_0x19acfa){_0x42fcce=_[_0x47a5('0x65')](_0x19acfa,'id');var _0x58dacd;var _0x4b5353=squel[_0x47a5('0x66')]();_0x4b5353[_0x47a5('0x67')](_0x211fbf['table']);for(var _0x27d422=0x0;_0x27d422<_0x51738b[_0x47a5('0x2f')];_0x27d422+=0x1){_0x58dacd=_0x51738b[_0x27d422]['MetricId']?_0x42fcce[_0x51738b[_0x27d422][_0x47a5('0x68')]][_0x47a5('0x69')]:_0x51738b[_0x27d422][_0x47a5('0x6a')];_0x58dacd=_0x51738b[_0x27d422]['function']?_[_0x47a5('0x6c')](_0x19dc8c[_0x51738b[_0x27d422]['function']],'%s',_0x58dacd):_0x58dacd;_0x58dacd=_0x51738b[_0x27d422][_0x47a5('0x6d')]?_['replace'](_0x592322[_0x51738b[_0x27d422][_0x47a5('0x6d')]],'%s',_0x58dacd):_0x58dacd;if(_0x51738b[_0x27d422][_0x47a5('0x86')]){_0x4b5353['group'](_0x58dacd);}_0x51738b[_0x27d422][_0x47a5('0x6e')]&&_0x4b5353['order'](_0x58dacd,_0x51738b[_0x27d422][_0x47a5('0x6e')]===_0x47a5('0x6f')?![]:!![]);_0x4b5353[_0x47a5('0x6a')](_0x58dacd,_0x51738b[_0x27d422][_0x47a5('0x87')]||_0x58dacd);}if(_0x211fbf['joins']){_0x211fbf[_0x47a5('0x70')]=JSON['parse'](_0x211fbf['joins']);for(var _0x2bb2df=0x0;_0x2bb2df<_0x211fbf[_0x47a5('0x70')][_0x47a5('0x2f')];_0x2bb2df+=0x1){if(_0x211fbf[_0x47a5('0x70')][_0x2bb2df][_0x47a5('0x72')]&&_['includes'](_0x4f35ff,_0x211fbf[_0x47a5('0x70')][_0x2bb2df][_0x47a5('0x72')])&&_0x211fbf[_0x47a5('0x70')][_0x2bb2df][_0x47a5('0x73')]&&_0x211fbf['joins'][_0x2bb2df][_0x47a5('0x74')]&&_0x211fbf['joins'][_0x2bb2df][_0x47a5('0x75')]){_0x4b5353[_0x211fbf[_0x47a5('0x70')][_0x2bb2df][_0x47a5('0x72')]](_0x211fbf[_0x47a5('0x70')][_0x2bb2df][_0x47a5('0x74')],null,util[_0x47a5('0x6d')](_0x47a5('0x76'),_0x211fbf[_0x47a5('0x77')],_0x211fbf[_0x47a5('0x70')][_0x2bb2df]['parentKey'],_0x211fbf[_0x47a5('0x70')][_0x2bb2df][_0x47a5('0x74')],_0x211fbf['joins'][_0x2bb2df][_0x47a5('0x75')]));}}}if(_0x211fbf[_0x47a5('0x78')]){_0x211fbf[_0x47a5('0x78')]=JSON['parse'](_0x211fbf['conditions']);_0x4b5353[_0x47a5('0x34')](_0x5b91f7(_0x211fbf[_0x47a5('0x78')]['group']));}_0x23c393=_0x4b5353['clone']();_0x4b5353[_0x47a5('0x1b')](_0x420671);_0x4b5353[_0x47a5('0x1d')](0x0);return;}})['then'](function(){if(_0x24a6c1[_0x47a5('0x88')]===_0x47a5('0x89')){return null;}var _0x4c9e6a=_[_0x47a5('0x37')](_0x24a6c1,{'name':_0x24a6c1[_0x47a5('0x8a')]||_0x24a6c1[_0x47a5('0x26')]||_0x211fbf[_0x47a5('0x26')],'basename':_0x18fa31,'savename':util[_0x47a5('0x6d')](_0x47a5('0x8b'),_0x24a6c1['name']||_0x211fbf['name'],require('randomstring')[_0x47a5('0x8c')](0x4),_0x24a6c1[_0x47a5('0x88')]||'csv'),'reportId':_0x211fbf['id'],'reportType':_0x47a5('0x8d')});return db[_0x47a5('0x8e')][_0x47a5('0x3f')](_0x4c9e6a,{'raw':!![]});})[_0x47a5('0x21')](function(_0xcdbfd7){if(_0x211fbf['table']===_0x47a5('0x8f')){_0x23c393['where'](_0x211fbf['table']+'.calldate\x20BETWEEN\x20?\x20AND\x20?',_0x24a6c1[_0x47a5('0x90')],_0x24a6c1['endDate']);}else{_0x23c393[_0x47a5('0x34')](_0x211fbf[_0x47a5('0x77')]+_0x47a5('0x91'),_0x24a6c1['startDate'],_0x24a6c1[_0x47a5('0x92')]);}if(_0xcdbfd7){logger[_0x47a5('0x93')](_0x47a5('0x94'),_0x23c393[_0x47a5('0x7a')]());require(_0x47a5('0x95'))['fork'](path[_0x47a5('0x7e')](__dirname,_0x47a5('0x96'),_0xcdbfd7['output']),[_0xcdbfd7['id'],_0x23c393[_0x47a5('0x7a')](),path[_0x47a5('0x7e')](__dirname,_0x47a5('0x97'),_0xcdbfd7[_0x47a5('0x98')]),_0x18fa31]);return _0xcdbfd7;}else{var _0x3c117a=squel[_0x47a5('0x66')]();_0x3c117a['from']('('+_0x23c393[_0x47a5('0x7a')]()+')',_0x47a5('0x99'));_0x3c117a['field'](_0x47a5('0x9a'),_0x47a5('0x1c'));_0x23c393[_0x47a5('0x1b')](_0x24a6c1[_0x47a5('0x1b')]||_0x420671);_0x23c393['offset'](_0x24a6c1['offset']||0x0);return dbH['sequelize']['query'](_0x3c117a[_0x47a5('0x7a')](),{'type':dbH[_0x47a5('0x7b')][_0x47a5('0x7c')][_0x47a5('0x7d')]})[_0x47a5('0x21')](function(_0x6bc37b){if(!_0x6bc37b[_0x47a5('0x2f')]){_0x2ae130=0x0;}else{_0x2ae130=_0x6bc37b[0x0][_0x47a5('0x1c')]||0x0;}return dbH['sequelize'][_0x47a5('0x2b')](_0x23c393[_0x47a5('0x7a')](),{'type':dbH[_0x47a5('0x7b')][_0x47a5('0x7c')]['SELECT']});})['then'](function(_0x3770ae){return{'rows':_0x3770ae||[],'count':_0x2ae130};});}});}exports['run']=function(_0x4cb8e4,_0x1b6a5c){return runReport(_0x4cb8e4[_0x47a5('0x4c')],_0x4cb8e4['query'],_0x4cb8e4[_0x47a5('0x38')])[_0x47a5('0x21')](respondWithResult(_0x1b6a5c,null))[_0x47a5('0x48')](handleError(_0x1b6a5c,null));};exports['runReport']=runReport;exports[_0x47a5('0x2b')]=function(_0xee23c7,_0x48a491){var _0x1172fd=0xa;var _0x280b7b=[_0x47a5('0x7e'),_0x47a5('0x7f'),_0x47a5('0x4d'),_0x47a5('0x4e')];var _0x482c87={'SUM':_0x47a5('0x4f'),'COUNT':'COUNT(%s)','COUNT DISTINCT':_0x47a5('0x80'),'MAX':_0x47a5('0x81'),'MIN':_0x47a5('0x51'),'AVG':_0x47a5('0x52'),'GROUP_CONCAT':'GROUP_CONCAT(%s)','GROUP_CONCAT ASC':_0x47a5('0x54'),'GROUP_CONCAT DESC':_0x47a5('0x9b')};var _0x151540={'SEC_TO_TIME':_0x47a5('0x55'),'DATE':_0x47a5('0x56'),'HOUR':_0x47a5('0x82'),'ROUND':_0x47a5('0x57'),'UNIX_TIMESTAMP':_0x47a5('0x83')};var _0x1b3e82=function(_0xa2045c){return!_[_0x47a5('0x58')]([_0x47a5('0x59'),'IS\x20NOT\x20NULL',_0x47a5('0x84'),_0x47a5('0x5b')],_0xa2045c);};var _0x591bde=function(_0x55d955){if(!_0x55d955||!_0x55d955[_0x47a5('0x5c')][_0x47a5('0x2f')]){return'';}for(var _0x2ccf21='(',_0x2ff467=0x0;_0x2ff467<_0x55d955['rules'][_0x47a5('0x2f')];_0x2ff467+=0x1){_0x2ff467>0x0&&(_0x2ccf21+='\x20'+_0x55d955[_0x47a5('0x85')]+'\x20');_0x2ccf21+=_0x55d955[_0x47a5('0x5c')][_0x2ff467][_0x47a5('0x5d')]?_0x591bde(_0x55d955[_0x47a5('0x5c')][_0x2ff467][_0x47a5('0x5d')]):_0x55d955[_0x47a5('0x5c')][_0x2ff467]['field']+'\x20'+_0x55d955['rules'][_0x2ff467][_0x47a5('0x5e')]+(_0x1b3e82(_0x55d955['rules'][_0x2ff467][_0x47a5('0x5e')])?'\x20'+_0x55d955['rules'][_0x2ff467][_0x47a5('0x5f')]:'');}return _0x2ccf21+')';};var _0x8b4354={'where':{'id':_0xee23c7[_0x47a5('0x4c')]['id']}},_0x134c1a,_0x2bc7ae,_0x49cb8c,_0x220557,_0x11f07b;_0x8b4354=_['merge']({},_0x8b4354,_0xee23c7['options']);return db[_0x47a5('0x39')][_0x47a5('0x4b')](_0x8b4354)[_0x47a5('0x21')](function(_0xfccf9c){if(_0xfccf9c){_0x134c1a=_0xfccf9c;return _0xfccf9c[_0x47a5('0x9c')]();}return null;})[_0x47a5('0x21')](function(_0x1c0323){if(_0x1c0323){if(!_0x1c0323[_0x47a5('0x2f')]){throw new db['Sequelize'][(_0x47a5('0x61'))]('Please\x20insert\x20at\x20least\x20one\x20field',0x193);}_0x2bc7ae=_0x1c0323;return db[_0x47a5('0x63')][_0x47a5('0x64')]({'raw':!![]});}return null;})['then'](function(_0x48d4cf){if(_0x48d4cf){_0x49cb8c=_[_0x47a5('0x65')](_0x48d4cf,'id');var _0x41d2da;var _0x530387=squel[_0x47a5('0x66')]();_0x530387[_0x47a5('0x67')](_0x134c1a[_0x47a5('0x77')]);for(var _0x44567e=0x0;_0x44567e<_0x2bc7ae['length'];_0x44567e+=0x1){_0x41d2da=_0x2bc7ae[_0x44567e][_0x47a5('0x68')]?_0x49cb8c[_0x2bc7ae[_0x44567e]['MetricId']]['metric']:_0x2bc7ae[_0x44567e]['field'];_0x41d2da=_0x2bc7ae[_0x44567e][_0x47a5('0x6b')]?_['replace'](_0x482c87[_0x2bc7ae[_0x44567e][_0x47a5('0x6b')]],'%s',_0x41d2da):_0x41d2da;_0x41d2da=_0x2bc7ae[_0x44567e][_0x47a5('0x6d')]?_[_0x47a5('0x6c')](_0x151540[_0x2bc7ae[_0x44567e][_0x47a5('0x6d')]],'%s',_0x41d2da):_0x41d2da;if(_0x2bc7ae[_0x44567e][_0x47a5('0x86')]){_0x530387[_0x47a5('0x5d')](_0x41d2da);}_0x2bc7ae[_0x44567e][_0x47a5('0x6e')]&&_0x530387[_0x47a5('0x32')](_0x41d2da,_0x2bc7ae[_0x44567e][_0x47a5('0x6e')]===_0x47a5('0x6f')?![]:!![]);_0x530387[_0x47a5('0x6a')](_0x41d2da,_0x2bc7ae[_0x44567e][_0x47a5('0x87')]||_0x41d2da);}if(_0x134c1a[_0x47a5('0x70')]){_0x134c1a[_0x47a5('0x70')]=JSON[_0x47a5('0x71')](_0x134c1a['joins']);for(var _0xdd95c8=0x0;_0xdd95c8<_0x134c1a[_0x47a5('0x70')][_0x47a5('0x2f')];_0xdd95c8+=0x1){if(_0x134c1a[_0x47a5('0x70')][_0xdd95c8]['type']&&_[_0x47a5('0x58')](_0x280b7b,_0x134c1a['joins'][_0xdd95c8][_0x47a5('0x72')])&&_0x134c1a['joins'][_0xdd95c8][_0x47a5('0x73')]&&_0x134c1a[_0x47a5('0x70')][_0xdd95c8][_0x47a5('0x74')]&&_0x134c1a['joins'][_0xdd95c8][_0x47a5('0x75')]){_0x530387[_0x134c1a[_0x47a5('0x70')][_0xdd95c8][_0x47a5('0x72')]](_0x134c1a['joins'][_0xdd95c8]['foreignTable'],null,util[_0x47a5('0x6d')](_0x47a5('0x76'),_0x134c1a[_0x47a5('0x77')],_0x134c1a[_0x47a5('0x70')][_0xdd95c8][_0x47a5('0x73')],_0x134c1a['joins'][_0xdd95c8][_0x47a5('0x74')],_0x134c1a['joins'][_0xdd95c8][_0x47a5('0x75')]));}}}if(_0x134c1a[_0x47a5('0x78')]){_0x134c1a[_0x47a5('0x78')]=JSON[_0x47a5('0x71')](_0x134c1a['conditions']);_0x530387['where'](_0x591bde(_0x134c1a[_0x47a5('0x78')][_0x47a5('0x5d')]));}_0x11f07b=_0x530387[_0x47a5('0x9d')]();_0x530387[_0x47a5('0x1b')](_0x1172fd);_0x530387[_0x47a5('0x1d')](0x0);logger[_0x47a5('0x79')](_0x47a5('0x9e'),_0x530387[_0x47a5('0x7a')]());return dbH[_0x47a5('0x7b')]['query'](_0x530387['toString'](),{'type':dbH[_0x47a5('0x7b')]['QueryTypes'][_0x47a5('0x7d')]});}})[_0x47a5('0x21')](function(){return{'sql':_0x11f07b[_0x47a5('0x7a')]()};})['then'](respondWithResult(_0x48a491,null))[_0x47a5('0x48')](handleError(_0x48a491,null));}; \ No newline at end of file +var _0x5fc3=['QueryTypes','right_join','HOUR(%s)','eml-format','rimraf','fast-json-patch','request-promise','moment','bluebird','mustache','path','sox','to-csv','lodash','crypto','jsforce','desk.js','querystring','papaparse','ioredis','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/logger','api','../../config/environment','../../config/license/util','dbH','sendStatus','status','end','json','offset','limit','undefined','count','set','Content-Range','apply','reject','save','update','then','get','DefaultReports','destroy','error','stack','name','index','map','AnalyticDefaultReport','rawAttributes','fieldName','type','key','keys','query','filters','intersection','model','fields','attributes','length','hasOwnProperty','sort','where','pick','merge','VIRTUAL','filter','options','includeAll','include','findAll','rows','params','catch','create','body','user','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','Reports','UserProfileSection','find','userProfileId','autoAssociation','UserProfileResource','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','join','left_join','cross_join','SUM(%s)','COUNT(%s)','COUNT(DISTINCT\x20%s)','MAX(%s)','MIN(%s)','AVG(%s)','GROUP_CONCAT(%s\x20ORDER\x20BY\x20%s\x20ASC)','GROUP_CONCAT(%s\x20ORDER\x20BY\x20%s\x20DESC)','DATE(%s)','includes','IS\x20NULL','IS\x20NOT\x20NULL','rules','operator','group','field','condition','value','Sequelize','Please\x20insert\x20at\x20least\x20one\x20field','AnalyticMetric','keyBy','select','from','table','MetricId','metric','function','replace','groupBy','orderBy','order','DESC','alias','joins','parse','parentKey','foreignTable','foreignKey','format','%s.%s\x20=\x20%s.%s','conditions','clone','debug','Limited\x20Query:','sequelize','toString','SELECT','GROUP_CONCAT(%s)','SEC_TO_TIME(%s)','ROUND(%s)','UNIX_TIMESTAMP(%s)','IS\x20EMPTY','getFields','ValidationErrorItem','fullPath','%s-%s.%s','generate','output','csv','AnalyticExtractedReport','cdr','.calldate\x20BETWEEN\x20?\x20AND\x20?','startDate','endDate','.createdAt\x20BETWEEN\x20?\x20AND\x20?','info','child_process','fork','../../components/export/','../../files/reports','countTable','COUNT(*)'];(function(_0x4d3e20,_0x22ca17){var _0x4902d8=function(_0x52dccd){while(--_0x52dccd){_0x4d3e20['push'](_0x4d3e20['shift']());}};_0x4902d8(++_0x22ca17);}(_0x5fc3,0xa8));var _0x35fc=function(_0x3861f7,_0x995b22){_0x3861f7=_0x3861f7-0x0;var _0x50879f=_0x5fc3[_0x3861f7];return _0x50879f;};'use strict';var emlformat=require(_0x35fc('0x0'));var rimraf=require(_0x35fc('0x1'));var zipdir=require('zip-dir');var jsonpatch=require(_0x35fc('0x2'));var rp=require(_0x35fc('0x3'));var moment=require(_0x35fc('0x4'));var BPromise=require(_0x35fc('0x5'));var Mustache=require(_0x35fc('0x6'));var util=require('util');var path=require(_0x35fc('0x7'));var sox=require(_0x35fc('0x8'));var csv=require(_0x35fc('0x9'));var ejs=require('ejs');var fs=require('fs');var fs_extra=require('fs-extra');var _=require(_0x35fc('0xa'));var squel=require('squel');var crypto=require(_0x35fc('0xb'));var jsforce=require(_0x35fc('0xc'));var deskjs=require(_0x35fc('0xd'));var toCsv=require(_0x35fc('0x9'));var querystring=require(_0x35fc('0xe'));var Papa=require(_0x35fc('0xf'));var Redis=require(_0x35fc('0x10'));var authService=require('../../components/auth/service');var qs=require(_0x35fc('0x11'));var as=require(_0x35fc('0x12'));var hardwareService=require('../../config/license/hardware');var logger=require(_0x35fc('0x13'))(_0x35fc('0x14'));var utils=require('../../config/utils');var config=require(_0x35fc('0x15'));var licenseUtil=require(_0x35fc('0x16'));var db=require('../../mysqldb')['db'];var dbH=require('../../mysqldb')[_0x35fc('0x17')];function respondWithStatusCode(_0x5d462a,_0x397738){_0x397738=_0x397738||0xcc;return function(_0x22055e){if(_0x22055e){return _0x5d462a[_0x35fc('0x18')](_0x397738);}return _0x5d462a[_0x35fc('0x19')](_0x397738)[_0x35fc('0x1a')]();};}function respondWithResult(_0x5cfe94,_0x59507a){_0x59507a=_0x59507a||0xc8;return function(_0x5eac0f){if(_0x5eac0f){return _0x5cfe94['status'](_0x59507a)[_0x35fc('0x1b')](_0x5eac0f);}};}function respondWithFilteredResult(_0x229d56,_0x53b898){return function(_0x154958){if(_0x154958){var _0x227a49=typeof _0x53b898[_0x35fc('0x1c')]==='undefined'&&typeof _0x53b898[_0x35fc('0x1d')]===_0x35fc('0x1e');var _0x553677=_0x154958[_0x35fc('0x1f')];var _0x363e47=_0x227a49?0x0:_0x53b898[_0x35fc('0x1c')];var _0x5f56c6=_0x227a49?_0x154958[_0x35fc('0x1f')]:_0x53b898[_0x35fc('0x1c')]+_0x53b898[_0x35fc('0x1d')];var _0x488234;if(_0x5f56c6>=_0x553677){_0x5f56c6=_0x553677;_0x488234=0xc8;}else{_0x488234=0xce;}_0x229d56[_0x35fc('0x19')](_0x488234);return _0x229d56[_0x35fc('0x20')](_0x35fc('0x21'),_0x363e47+'-'+_0x5f56c6+'/'+_0x553677)[_0x35fc('0x1b')](_0x154958);}return null;};}function patchUpdates(_0x20ffde){return function(_0x21f1a9){try{jsonpatch[_0x35fc('0x22')](_0x21f1a9,_0x20ffde,!![]);}catch(_0x3b05b0){return BPromise[_0x35fc('0x23')](_0x3b05b0);}return _0x21f1a9[_0x35fc('0x24')]();};}function saveUpdates(_0x5bd2b8,_0x323aee){return function(_0xd5399f){if(_0xd5399f){return _0xd5399f[_0x35fc('0x25')](_0x5bd2b8)[_0x35fc('0x26')](function(_0x3b4743){return _0x3b4743;});}return null;};}function removeEntity(_0x55e9e7,_0x33f5e8){return function(_0x4c587a){if(_0x4c587a){return _0x4c587a['destroy']()[_0x35fc('0x26')](function(){var _0x5a93df=_0x4c587a[_0x35fc('0x27')]({'plain':!![]});var _0x51cfec=_0x35fc('0x28');return db['UserProfileResource'][_0x35fc('0x29')]({'where':{'type':_0x51cfec,'resourceId':_0x5a93df['id']}})[_0x35fc('0x26')](function(){return _0x4c587a;});})['then'](function(){_0x55e9e7['status'](0xcc)[_0x35fc('0x1a')]();});}};}function handleEntityNotFound(_0x58edb6,_0x274208){return function(_0x1a5d92){if(!_0x1a5d92){_0x58edb6['sendStatus'](0x194);}return _0x1a5d92;};}function handleError(_0x26b7cb,_0x645eac){_0x645eac=_0x645eac||0x1f4;return function(_0x383837){logger[_0x35fc('0x2a')](_0x383837[_0x35fc('0x2b')]);if(_0x383837[_0x35fc('0x2c')]){delete _0x383837[_0x35fc('0x2c')];}_0x26b7cb[_0x35fc('0x19')](_0x645eac)['send'](_0x383837);};}exports[_0x35fc('0x2d')]=function(_0x220931,_0x22af18){var _0x52acc5={},_0xe79f52={},_0x16f067={'count':0x0,'rows':[]};var _0x3822a8=_[_0x35fc('0x2e')](db[_0x35fc('0x2f')][_0x35fc('0x30')],function(_0x222ddb){return{'name':_0x222ddb[_0x35fc('0x31')],'type':_0x222ddb[_0x35fc('0x32')][_0x35fc('0x33')]};});_0xe79f52['model']=_['map'](_0x3822a8,_0x35fc('0x2c'));_0xe79f52['query']=_[_0x35fc('0x34')](_0x220931[_0x35fc('0x35')]);_0xe79f52[_0x35fc('0x36')]=_[_0x35fc('0x37')](_0xe79f52[_0x35fc('0x38')],_0xe79f52[_0x35fc('0x35')]);_0x52acc5['attributes']=_[_0x35fc('0x37')](_0xe79f52[_0x35fc('0x38')],qs[_0x35fc('0x39')](_0x220931[_0x35fc('0x35')][_0x35fc('0x39')]));_0x52acc5[_0x35fc('0x3a')]=_0x52acc5['attributes'][_0x35fc('0x3b')]?_0x52acc5[_0x35fc('0x3a')]:_0xe79f52[_0x35fc('0x38')];if(!_0x220931['query'][_0x35fc('0x3c')]('nolimit')){_0x52acc5[_0x35fc('0x1d')]=qs[_0x35fc('0x1d')](_0x220931[_0x35fc('0x35')][_0x35fc('0x1d')]);_0x52acc5['offset']=qs['offset'](_0x220931['query'][_0x35fc('0x1c')]);}_0x52acc5['order']=qs[_0x35fc('0x3d')](_0x220931['query'][_0x35fc('0x3d')]);_0x52acc5[_0x35fc('0x3e')]=qs[_0x35fc('0x36')](_[_0x35fc('0x3f')](_0x220931[_0x35fc('0x35')],_0xe79f52[_0x35fc('0x36')]),_0x3822a8);if(_0x220931[_0x35fc('0x35')]['filter']){_0x52acc5[_0x35fc('0x3e')]=_[_0x35fc('0x40')](_0x52acc5['where'],{'$or':_[_0x35fc('0x2e')](_0x3822a8,function(_0x1ccc41){if(_0x1ccc41[_0x35fc('0x32')]!==_0x35fc('0x41')){var _0x813866={};_0x813866[_0x1ccc41[_0x35fc('0x2c')]]={'$like':'%'+_0x220931['query'][_0x35fc('0x42')]+'%'};return _0x813866;}})});}_0x52acc5=_[_0x35fc('0x40')]({},_0x52acc5,_0x220931[_0x35fc('0x43')]);var _0x52543b={'where':_0x52acc5[_0x35fc('0x3e')]};return db[_0x35fc('0x2f')]['count'](_0x52543b)[_0x35fc('0x26')](function(_0x280af1){_0x16f067[_0x35fc('0x1f')]=_0x280af1;if(_0x220931[_0x35fc('0x35')][_0x35fc('0x44')]){_0x52acc5[_0x35fc('0x45')]=[{'all':!![]}];}return db[_0x35fc('0x2f')][_0x35fc('0x46')](_0x52acc5);})['then'](function(_0x596e83){_0x16f067[_0x35fc('0x47')]=_0x596e83;return _0x16f067;})[_0x35fc('0x26')](respondWithFilteredResult(_0x22af18,_0x52acc5))['catch'](handleError(_0x22af18,null));};exports['show']=function(_0x4ff202,_0x79677d){var _0x10f98b={'raw':!![],'where':{'id':_0x4ff202[_0x35fc('0x48')]['id']}},_0x4e56ed={};_0x4e56ed[_0x35fc('0x38')]=_[_0x35fc('0x34')](db[_0x35fc('0x2f')]['rawAttributes']);_0x4e56ed['query']=_['keys'](_0x4ff202['query']);_0x4e56ed['filters']=_[_0x35fc('0x37')](_0x4e56ed[_0x35fc('0x38')],_0x4e56ed['query']);_0x10f98b[_0x35fc('0x3a')]=_['intersection'](_0x4e56ed[_0x35fc('0x38')],qs[_0x35fc('0x39')](_0x4ff202[_0x35fc('0x35')][_0x35fc('0x39')]));_0x10f98b[_0x35fc('0x3a')]=_0x10f98b['attributes'][_0x35fc('0x3b')]?_0x10f98b[_0x35fc('0x3a')]:_0x4e56ed['model'];if(_0x4ff202[_0x35fc('0x35')][_0x35fc('0x44')]){_0x10f98b[_0x35fc('0x45')]=[{'all':!![]}];}_0x10f98b=_[_0x35fc('0x40')]({},_0x10f98b,_0x4ff202['options']);return db[_0x35fc('0x2f')]['find'](_0x10f98b)['then'](handleEntityNotFound(_0x79677d,null))[_0x35fc('0x26')](respondWithResult(_0x79677d,null))[_0x35fc('0x49')](handleError(_0x79677d,null));};exports[_0x35fc('0x4a')]=function(_0xca8aef,_0xf2ca20){return db[_0x35fc('0x2f')][_0x35fc('0x4a')](_0xca8aef[_0x35fc('0x4b')],{})['then'](function(_0x3e2961){var _0x91d7c0=_0xca8aef[_0x35fc('0x4c')][_0x35fc('0x27')]({'plain':!![]});if(!_0x91d7c0)throw new Error(_0x35fc('0x4d'));if(_0x91d7c0[_0x35fc('0x4e')]===_0x35fc('0x4c')){var _0x347a4a=_0x3e2961[_0x35fc('0x27')]({'plain':!![]});var _0xe6eb6a=_0x35fc('0x4f');return db[_0x35fc('0x50')][_0x35fc('0x51')]({'where':{'name':_0xe6eb6a,'userProfileId':_0x91d7c0[_0x35fc('0x52')]},'raw':!![]})['then'](function(_0x553ed6){if(_0x553ed6&&_0x553ed6[_0x35fc('0x53')]===0x0){return db[_0x35fc('0x54')][_0x35fc('0x4a')]({'name':_0x347a4a[_0x35fc('0x2c')],'resourceId':_0x347a4a['id'],'type':_0x35fc('0x28'),'sectionId':_0x553ed6['id']},{})[_0x35fc('0x26')](function(){return _0x3e2961;});}else{return _0x3e2961;}})['catch'](function(_0x4f024c){logger[_0x35fc('0x2a')](_0x35fc('0x55'),_0x4f024c);throw _0x4f024c;});}return _0x3e2961;})[_0x35fc('0x26')](respondWithResult(_0xf2ca20,0xc9))[_0x35fc('0x49')](handleError(_0xf2ca20,null));};exports['update']=function(_0x467980,_0x13281f){if(_0x467980['body']['id']){delete _0x467980[_0x35fc('0x4b')]['id'];}return db[_0x35fc('0x2f')]['find']({'where':{'id':_0x467980[_0x35fc('0x48')]['id']}})[_0x35fc('0x26')](handleEntityNotFound(_0x13281f,null))[_0x35fc('0x26')](saveUpdates(_0x467980[_0x35fc('0x4b')],null))['then'](respondWithResult(_0x13281f,null))['catch'](handleError(_0x13281f,null));};exports['destroy']=function(_0x240338,_0x2ea8d6){return db['AnalyticDefaultReport'][_0x35fc('0x51')]({'where':{'id':_0x240338[_0x35fc('0x48')]['id']}})[_0x35fc('0x26')](handleEntityNotFound(_0x2ea8d6,null))[_0x35fc('0x26')](removeEntity(_0x2ea8d6,null))[_0x35fc('0x49')](handleError(_0x2ea8d6,null));};exports['preview']=function(_0x2d9d45,_0x757aa6){var _0x39d470=0xa;var _0x509e77=[_0x35fc('0x56'),_0x35fc('0x57'),'right_join',_0x35fc('0x58')];var _0x164c7b={'SUM':_0x35fc('0x59'),'COUNT':_0x35fc('0x5a'),'COUNT DISTINCT':_0x35fc('0x5b'),'MAX':_0x35fc('0x5c'),'MIN':_0x35fc('0x5d'),'AVG':_0x35fc('0x5e'),'GROUP_CONCAT':'GROUP_CONCAT(%s)','GROUP_CONCAT ASC':_0x35fc('0x5f'),'GROUP_CONCAT DESC':_0x35fc('0x60')};var _0x303927={'SEC_TO_TIME':'SEC_TO_TIME(%s)','DATE':_0x35fc('0x61'),'HOUR':'HOUR(%s)','ROUND':'ROUND(%s)','UNIX_TIMESTAMP':'UNIX_TIMESTAMP(%s)'};var _0x23b54f=function(_0xb1c68a){return!_[_0x35fc('0x62')]([_0x35fc('0x63'),_0x35fc('0x64'),'IS\x20EMPTY','IS\x20NOT\x20EMPTY'],_0xb1c68a);};var _0x5353ea=function(_0x4faef4){if(!_0x4faef4||!_0x4faef4['rules'][_0x35fc('0x3b')]){return'';}for(var _0x44250b='(',_0xd470e8=0x0;_0xd470e8<_0x4faef4[_0x35fc('0x65')]['length'];_0xd470e8+=0x1){_0xd470e8>0x0&&(_0x44250b+='\x20'+_0x4faef4[_0x35fc('0x66')]+'\x20');_0x44250b+=_0x4faef4[_0x35fc('0x65')][_0xd470e8][_0x35fc('0x67')]?_0x5353ea(_0x4faef4[_0x35fc('0x65')][_0xd470e8][_0x35fc('0x67')]):_0x4faef4[_0x35fc('0x65')][_0xd470e8][_0x35fc('0x68')]+'\x20'+_0x4faef4[_0x35fc('0x65')][_0xd470e8][_0x35fc('0x69')]+(_0x23b54f(_0x4faef4['rules'][_0xd470e8][_0x35fc('0x69')])?'\x20'+_0x4faef4['rules'][_0xd470e8][_0x35fc('0x6a')]:'');}return _0x44250b+')';};var _0x9029e3={'where':{'id':_0x2d9d45['params']['id']}},_0x2ac8e1,_0x2bc76c,_0x4bdde7,_0x465c14,_0x4af592;_0x9029e3=_['merge']({},_0x9029e3,_0x2d9d45[_0x35fc('0x43')]);return db['AnalyticDefaultReport'][_0x35fc('0x51')](_0x9029e3)['then'](function(_0x11717){if(_0x11717){_0x2ac8e1=_0x11717;return _0x11717['getFields']();}return null;})[_0x35fc('0x26')](function(_0x455b84){if(_0x455b84){if(!_0x455b84[_0x35fc('0x3b')]){throw new db[(_0x35fc('0x6b'))]['ValidationErrorItem'](_0x35fc('0x6c'),0x193);}_0x2bc76c=_0x455b84;return db[_0x35fc('0x6d')][_0x35fc('0x46')]({'raw':!![]});}return null;})['then'](function(_0x3aa7fa){if(_0x3aa7fa){_0x4bdde7=_[_0x35fc('0x6e')](_0x3aa7fa,'id');var _0x37764b;var _0x3c1b56=squel[_0x35fc('0x6f')]();_0x3c1b56[_0x35fc('0x70')](_0x2ac8e1[_0x35fc('0x71')]);for(var _0x4464d5=0x0;_0x4464d5<_0x2bc76c['length'];_0x4464d5+=0x1){_0x37764b=_0x2bc76c[_0x4464d5][_0x35fc('0x72')]?_0x4bdde7[_0x2bc76c[_0x4464d5][_0x35fc('0x72')]][_0x35fc('0x73')]:_0x2bc76c[_0x4464d5]['field'];_0x37764b=_0x2bc76c[_0x4464d5][_0x35fc('0x74')]?_[_0x35fc('0x75')](_0x164c7b[_0x2bc76c[_0x4464d5]['function']],'%s',_0x37764b):_0x37764b;_0x37764b=_0x2bc76c[_0x4464d5]['format']?_[_0x35fc('0x75')](_0x303927[_0x2bc76c[_0x4464d5]['format']],'%s',_0x37764b):_0x37764b;if(_0x2bc76c[_0x4464d5][_0x35fc('0x76')]){_0x3c1b56[_0x35fc('0x67')](_0x37764b);}_0x2bc76c[_0x4464d5][_0x35fc('0x77')]&&_0x3c1b56[_0x35fc('0x78')](_0x37764b,_0x2bc76c[_0x4464d5][_0x35fc('0x77')]===_0x35fc('0x79')?![]:!![]);_0x3c1b56[_0x35fc('0x68')](_0x37764b,_0x2bc76c[_0x4464d5][_0x35fc('0x7a')]||_0x37764b);}if(_0x2ac8e1[_0x35fc('0x7b')]){_0x2ac8e1[_0x35fc('0x7b')]=JSON[_0x35fc('0x7c')](_0x2ac8e1[_0x35fc('0x7b')]);for(var _0x29f2b9=0x0;_0x29f2b9<_0x2ac8e1[_0x35fc('0x7b')][_0x35fc('0x3b')];_0x29f2b9+=0x1){if(_0x2ac8e1[_0x35fc('0x7b')][_0x29f2b9][_0x35fc('0x32')]&&_[_0x35fc('0x62')](_0x509e77,_0x2ac8e1[_0x35fc('0x7b')][_0x29f2b9][_0x35fc('0x32')])&&_0x2ac8e1['joins'][_0x29f2b9][_0x35fc('0x7d')]&&_0x2ac8e1['joins'][_0x29f2b9][_0x35fc('0x7e')]&&_0x2ac8e1[_0x35fc('0x7b')][_0x29f2b9][_0x35fc('0x7f')]){_0x3c1b56[_0x2ac8e1[_0x35fc('0x7b')][_0x29f2b9][_0x35fc('0x32')]](_0x2ac8e1[_0x35fc('0x7b')][_0x29f2b9][_0x35fc('0x7e')],null,util[_0x35fc('0x80')](_0x35fc('0x81'),_0x2ac8e1[_0x35fc('0x71')],_0x2ac8e1[_0x35fc('0x7b')][_0x29f2b9]['parentKey'],_0x2ac8e1[_0x35fc('0x7b')][_0x29f2b9][_0x35fc('0x7e')],_0x2ac8e1[_0x35fc('0x7b')][_0x29f2b9][_0x35fc('0x7f')]));}}}if(_0x2ac8e1[_0x35fc('0x82')]){_0x2ac8e1[_0x35fc('0x82')]=JSON['parse'](_0x2ac8e1[_0x35fc('0x82')]);_0x3c1b56[_0x35fc('0x3e')](_0x5353ea(_0x2ac8e1[_0x35fc('0x82')][_0x35fc('0x67')]));}_0x4af592=_0x3c1b56[_0x35fc('0x83')]();_0x3c1b56[_0x35fc('0x1d')](_0x39d470);_0x3c1b56[_0x35fc('0x1c')](0x0);logger[_0x35fc('0x84')](_0x35fc('0x85'),_0x3c1b56['toString']());return dbH[_0x35fc('0x86')]['query'](_0x3c1b56[_0x35fc('0x87')](),{'type':dbH[_0x35fc('0x86')]['QueryTypes'][_0x35fc('0x88')]});}})[_0x35fc('0x26')](respondWithResult(_0x757aa6,null))[_0x35fc('0x49')](handleError(_0x757aa6,null));};function runReport(_0x4274d6,_0x4026cc,_0x1a765f){var _0x42f87e=_0x4026cc[_0x35fc('0x2c')];var _0x25ee61=0xa;var _0x5806bf=['join','left_join','right_join',_0x35fc('0x58')];var _0x23cf84={'SUM':_0x35fc('0x59'),'COUNT':_0x35fc('0x5a'),'COUNT DISTINCT':_0x35fc('0x5b'),'MAX':'MAX(%s)','MIN':_0x35fc('0x5d'),'AVG':_0x35fc('0x5e'),'GROUP_CONCAT':_0x35fc('0x89'),'GROUP_CONCAT ASC':_0x35fc('0x5f'),'GROUP_CONCAT DESC':'GROUP_CONCAT(%s\x20ORDER\x20BY\x20%s\x20DESC)'};var _0x15e936={'SEC_TO_TIME':_0x35fc('0x8a'),'DATE':_0x35fc('0x61'),'HOUR':'HOUR(%s)','ROUND':_0x35fc('0x8b'),'UNIX_TIMESTAMP':_0x35fc('0x8c')};var _0x319033=function(_0x9fe765){return!_[_0x35fc('0x62')]([_0x35fc('0x63'),_0x35fc('0x64'),_0x35fc('0x8d'),'IS\x20NOT\x20EMPTY'],_0x9fe765);};var _0x2faff7=function(_0xa2c5f8){if(!_0xa2c5f8||!_0xa2c5f8[_0x35fc('0x65')][_0x35fc('0x3b')]){return'';}for(var _0x221c5b='(',_0x1fcd36=0x0;_0x1fcd36<_0xa2c5f8['rules'][_0x35fc('0x3b')];_0x1fcd36+=0x1){_0x1fcd36>0x0&&(_0x221c5b+='\x20'+_0xa2c5f8['operator']+'\x20');_0x221c5b+=_0xa2c5f8['rules'][_0x1fcd36][_0x35fc('0x67')]?_0x2faff7(_0xa2c5f8['rules'][_0x1fcd36][_0x35fc('0x67')]):_0xa2c5f8[_0x35fc('0x65')][_0x1fcd36][_0x35fc('0x68')]+'\x20'+_0xa2c5f8['rules'][_0x1fcd36][_0x35fc('0x69')]+(_0x319033(_0xa2c5f8[_0x35fc('0x65')][_0x1fcd36][_0x35fc('0x69')])?'\x20'+_0xa2c5f8[_0x35fc('0x65')][_0x1fcd36][_0x35fc('0x6a')]:'');}return _0x221c5b+')';};var _0x5abdf9={'where':{'id':_0x4274d6['id']}},_0x5512f6,_0x487cb5,_0x23b261,_0x4c742c,_0x2fae26;_0x5abdf9=_[_0x35fc('0x40')]({},_0x5abdf9,_0x1a765f);return db[_0x35fc('0x2f')][_0x35fc('0x51')](_0x5abdf9)['then'](function(_0x28e80d){if(_0x28e80d){_0x5512f6=_0x28e80d;return _0x28e80d[_0x35fc('0x8e')]();}return null;})[_0x35fc('0x26')](function(_0x47c507){if(_0x47c507){if(!_0x47c507[_0x35fc('0x3b')]){throw new db[(_0x35fc('0x6b'))][(_0x35fc('0x8f'))]('Please\x20insert\x20at\x20least\x20one\x20field',0x193);}_0x487cb5=_0x47c507;return db['AnalyticMetric']['findAll']({'raw':!![]});}return null;})[_0x35fc('0x26')](function(_0x2edb1b){if(_0x2edb1b){_0x23b261=_[_0x35fc('0x6e')](_0x2edb1b,'id');var _0x3858a9;var _0x4859be=squel[_0x35fc('0x6f')]();_0x4859be[_0x35fc('0x70')](_0x5512f6['table']);for(var _0x5849a0=0x0;_0x5849a0<_0x487cb5[_0x35fc('0x3b')];_0x5849a0+=0x1){_0x3858a9=_0x487cb5[_0x5849a0][_0x35fc('0x72')]?_0x23b261[_0x487cb5[_0x5849a0][_0x35fc('0x72')]]['metric']:_0x487cb5[_0x5849a0]['field'];_0x3858a9=_0x487cb5[_0x5849a0][_0x35fc('0x74')]?_[_0x35fc('0x75')](_0x23cf84[_0x487cb5[_0x5849a0]['function']],'%s',_0x3858a9):_0x3858a9;_0x3858a9=_0x487cb5[_0x5849a0][_0x35fc('0x80')]?_[_0x35fc('0x75')](_0x15e936[_0x487cb5[_0x5849a0][_0x35fc('0x80')]],'%s',_0x3858a9):_0x3858a9;if(_0x487cb5[_0x5849a0]['groupBy']){_0x4859be[_0x35fc('0x67')](_0x3858a9);}_0x487cb5[_0x5849a0][_0x35fc('0x77')]&&_0x4859be[_0x35fc('0x78')](_0x3858a9,_0x487cb5[_0x5849a0][_0x35fc('0x77')]==='DESC'?![]:!![]);_0x4859be[_0x35fc('0x68')](_0x3858a9,_0x487cb5[_0x5849a0][_0x35fc('0x7a')]||_0x3858a9);}if(_0x5512f6[_0x35fc('0x7b')]){_0x5512f6['joins']=JSON[_0x35fc('0x7c')](_0x5512f6[_0x35fc('0x7b')]);for(var _0x425f72=0x0;_0x425f72<_0x5512f6['joins'][_0x35fc('0x3b')];_0x425f72+=0x1){if(_0x5512f6[_0x35fc('0x7b')][_0x425f72]['type']&&_[_0x35fc('0x62')](_0x5806bf,_0x5512f6[_0x35fc('0x7b')][_0x425f72][_0x35fc('0x32')])&&_0x5512f6[_0x35fc('0x7b')][_0x425f72][_0x35fc('0x7d')]&&_0x5512f6[_0x35fc('0x7b')][_0x425f72][_0x35fc('0x7e')]&&_0x5512f6[_0x35fc('0x7b')][_0x425f72][_0x35fc('0x7f')]){_0x4859be[_0x5512f6['joins'][_0x425f72][_0x35fc('0x32')]](_0x5512f6[_0x35fc('0x7b')][_0x425f72][_0x35fc('0x7e')],null,util[_0x35fc('0x80')]('%s.%s\x20=\x20%s.%s',_0x5512f6[_0x35fc('0x71')],_0x5512f6[_0x35fc('0x7b')][_0x425f72][_0x35fc('0x7d')],_0x5512f6[_0x35fc('0x7b')][_0x425f72][_0x35fc('0x7e')],_0x5512f6[_0x35fc('0x7b')][_0x425f72][_0x35fc('0x7f')]));}}}if(_0x5512f6[_0x35fc('0x82')]){_0x5512f6['conditions']=JSON['parse'](_0x5512f6[_0x35fc('0x82')]);_0x4859be[_0x35fc('0x3e')](_0x2faff7(_0x5512f6[_0x35fc('0x82')]['group']));}_0x2fae26=_0x4859be[_0x35fc('0x83')]();_0x4859be[_0x35fc('0x1d')](_0x25ee61);_0x4859be[_0x35fc('0x1c')](0x0);return;}})[_0x35fc('0x26')](function(){if(_0x4026cc['output']==='web'){return null;}var _0x379650=_['merge'](_0x4026cc,{'name':_0x4026cc[_0x35fc('0x90')]||_0x4026cc[_0x35fc('0x2c')]||_0x5512f6['name'],'basename':_0x42f87e,'savename':util['format'](_0x35fc('0x91'),_0x4026cc[_0x35fc('0x2c')]||_0x5512f6[_0x35fc('0x2c')],require('randomstring')[_0x35fc('0x92')](0x4),_0x4026cc[_0x35fc('0x93')]||_0x35fc('0x94')),'reportId':_0x5512f6['id'],'reportType':'default'});return db[_0x35fc('0x95')][_0x35fc('0x4a')](_0x379650,{'raw':!![]});})[_0x35fc('0x26')](function(_0x328e90){if(_0x5512f6['table']===_0x35fc('0x96')){_0x2fae26[_0x35fc('0x3e')](_0x5512f6[_0x35fc('0x71')]+_0x35fc('0x97'),_0x4026cc[_0x35fc('0x98')],_0x4026cc[_0x35fc('0x99')]);}else{_0x2fae26['where'](_0x5512f6[_0x35fc('0x71')]+_0x35fc('0x9a'),_0x4026cc['startDate'],_0x4026cc[_0x35fc('0x99')]);}if(_0x328e90){logger[_0x35fc('0x9b')]('Run\x20Query:',_0x2fae26[_0x35fc('0x87')]());require(_0x35fc('0x9c'))[_0x35fc('0x9d')](path[_0x35fc('0x56')](__dirname,_0x35fc('0x9e'),_0x328e90['output']),[_0x328e90['id'],_0x2fae26[_0x35fc('0x87')](),path[_0x35fc('0x56')](__dirname,_0x35fc('0x9f'),_0x328e90['savename']),_0x42f87e]);return _0x328e90;}else{var _0x1224cd=squel['select']();_0x1224cd['from']('('+_0x2fae26[_0x35fc('0x87')]()+')',_0x35fc('0xa0'));_0x1224cd[_0x35fc('0x68')](_0x35fc('0xa1'),_0x35fc('0x1f'));_0x2fae26['limit'](_0x4026cc[_0x35fc('0x1d')]||_0x25ee61);_0x2fae26[_0x35fc('0x1c')](_0x4026cc[_0x35fc('0x1c')]||0x0);return dbH['sequelize'][_0x35fc('0x35')](_0x1224cd[_0x35fc('0x87')](),{'type':dbH[_0x35fc('0x86')][_0x35fc('0xa2')][_0x35fc('0x88')]})['then'](function(_0x1a2d73){if(!_0x1a2d73[_0x35fc('0x3b')]){_0x4c742c=0x0;}else{_0x4c742c=_0x1a2d73[0x0]['count']||0x0;}return dbH['sequelize'][_0x35fc('0x35')](_0x2fae26[_0x35fc('0x87')](),{'type':dbH[_0x35fc('0x86')][_0x35fc('0xa2')][_0x35fc('0x88')]});})[_0x35fc('0x26')](function(_0x8c80ca){return{'rows':_0x8c80ca||[],'count':_0x4c742c};});}});}exports['run']=function(_0x5dc286,_0x146ce1){return runReport(_0x5dc286[_0x35fc('0x48')],_0x5dc286[_0x35fc('0x35')],_0x5dc286[_0x35fc('0x43')])[_0x35fc('0x26')](respondWithResult(_0x146ce1,null))['catch'](handleError(_0x146ce1,null));};exports['runReport']=runReport;exports[_0x35fc('0x35')]=function(_0x2451f2,_0x3fff79){var _0x1c6ce9=0xa;var _0x4b2079=['join',_0x35fc('0x57'),_0x35fc('0xa3'),_0x35fc('0x58')];var _0xd46d64={'SUM':'SUM(%s)','COUNT':'COUNT(%s)','COUNT DISTINCT':_0x35fc('0x5b'),'MAX':_0x35fc('0x5c'),'MIN':'MIN(%s)','AVG':_0x35fc('0x5e'),'GROUP_CONCAT':_0x35fc('0x89'),'GROUP_CONCAT ASC':_0x35fc('0x5f'),'GROUP_CONCAT DESC':_0x35fc('0x60')};var _0x274337={'SEC_TO_TIME':_0x35fc('0x8a'),'DATE':_0x35fc('0x61'),'HOUR':_0x35fc('0xa4'),'ROUND':_0x35fc('0x8b'),'UNIX_TIMESTAMP':_0x35fc('0x8c')};var _0x19ae76=function(_0x366a3b){return!_[_0x35fc('0x62')]([_0x35fc('0x63'),_0x35fc('0x64'),_0x35fc('0x8d'),'IS\x20NOT\x20EMPTY'],_0x366a3b);};var _0x345026=function(_0x553f7d){if(!_0x553f7d||!_0x553f7d[_0x35fc('0x65')]['length']){return'';}for(var _0x5aa072='(',_0x3c96ef=0x0;_0x3c96ef<_0x553f7d[_0x35fc('0x65')][_0x35fc('0x3b')];_0x3c96ef+=0x1){_0x3c96ef>0x0&&(_0x5aa072+='\x20'+_0x553f7d['operator']+'\x20');_0x5aa072+=_0x553f7d[_0x35fc('0x65')][_0x3c96ef][_0x35fc('0x67')]?_0x345026(_0x553f7d[_0x35fc('0x65')][_0x3c96ef][_0x35fc('0x67')]):_0x553f7d[_0x35fc('0x65')][_0x3c96ef][_0x35fc('0x68')]+'\x20'+_0x553f7d['rules'][_0x3c96ef]['condition']+(_0x19ae76(_0x553f7d[_0x35fc('0x65')][_0x3c96ef]['condition'])?'\x20'+_0x553f7d['rules'][_0x3c96ef][_0x35fc('0x6a')]:'');}return _0x5aa072+')';};var _0x48b826={'where':{'id':_0x2451f2[_0x35fc('0x48')]['id']}},_0x556f9a,_0x5ae83f,_0x450769,_0x5d461c,_0x355154;_0x48b826=_[_0x35fc('0x40')]({},_0x48b826,_0x2451f2[_0x35fc('0x43')]);return db[_0x35fc('0x2f')][_0x35fc('0x51')](_0x48b826)['then'](function(_0x522ff2){if(_0x522ff2){_0x556f9a=_0x522ff2;return _0x522ff2[_0x35fc('0x8e')]();}return null;})['then'](function(_0x233c94){if(_0x233c94){if(!_0x233c94[_0x35fc('0x3b')]){throw new db['Sequelize']['ValidationErrorItem']('Please\x20insert\x20at\x20least\x20one\x20field',0x193);}_0x5ae83f=_0x233c94;return db[_0x35fc('0x6d')][_0x35fc('0x46')]({'raw':!![]});}return null;})[_0x35fc('0x26')](function(_0x135e18){if(_0x135e18){_0x450769=_[_0x35fc('0x6e')](_0x135e18,'id');var _0x28525f;var _0x9116b1=squel[_0x35fc('0x6f')]();_0x9116b1['from'](_0x556f9a['table']);for(var _0x5cefdb=0x0;_0x5cefdb<_0x5ae83f['length'];_0x5cefdb+=0x1){_0x28525f=_0x5ae83f[_0x5cefdb][_0x35fc('0x72')]?_0x450769[_0x5ae83f[_0x5cefdb]['MetricId']][_0x35fc('0x73')]:_0x5ae83f[_0x5cefdb]['field'];_0x28525f=_0x5ae83f[_0x5cefdb][_0x35fc('0x74')]?_[_0x35fc('0x75')](_0xd46d64[_0x5ae83f[_0x5cefdb]['function']],'%s',_0x28525f):_0x28525f;_0x28525f=_0x5ae83f[_0x5cefdb]['format']?_[_0x35fc('0x75')](_0x274337[_0x5ae83f[_0x5cefdb][_0x35fc('0x80')]],'%s',_0x28525f):_0x28525f;if(_0x5ae83f[_0x5cefdb][_0x35fc('0x76')]){_0x9116b1[_0x35fc('0x67')](_0x28525f);}_0x5ae83f[_0x5cefdb][_0x35fc('0x77')]&&_0x9116b1['order'](_0x28525f,_0x5ae83f[_0x5cefdb]['orderBy']===_0x35fc('0x79')?![]:!![]);_0x9116b1['field'](_0x28525f,_0x5ae83f[_0x5cefdb][_0x35fc('0x7a')]||_0x28525f);}if(_0x556f9a['joins']){_0x556f9a[_0x35fc('0x7b')]=JSON[_0x35fc('0x7c')](_0x556f9a[_0x35fc('0x7b')]);for(var _0x10e30e=0x0;_0x10e30e<_0x556f9a['joins'][_0x35fc('0x3b')];_0x10e30e+=0x1){if(_0x556f9a['joins'][_0x10e30e][_0x35fc('0x32')]&&_['includes'](_0x4b2079,_0x556f9a['joins'][_0x10e30e][_0x35fc('0x32')])&&_0x556f9a['joins'][_0x10e30e][_0x35fc('0x7d')]&&_0x556f9a[_0x35fc('0x7b')][_0x10e30e][_0x35fc('0x7e')]&&_0x556f9a[_0x35fc('0x7b')][_0x10e30e][_0x35fc('0x7f')]){_0x9116b1[_0x556f9a[_0x35fc('0x7b')][_0x10e30e][_0x35fc('0x32')]](_0x556f9a[_0x35fc('0x7b')][_0x10e30e][_0x35fc('0x7e')],null,util['format'](_0x35fc('0x81'),_0x556f9a[_0x35fc('0x71')],_0x556f9a[_0x35fc('0x7b')][_0x10e30e][_0x35fc('0x7d')],_0x556f9a[_0x35fc('0x7b')][_0x10e30e][_0x35fc('0x7e')],_0x556f9a[_0x35fc('0x7b')][_0x10e30e][_0x35fc('0x7f')]));}}}if(_0x556f9a['conditions']){_0x556f9a['conditions']=JSON['parse'](_0x556f9a['conditions']);_0x9116b1['where'](_0x345026(_0x556f9a[_0x35fc('0x82')][_0x35fc('0x67')]));}_0x355154=_0x9116b1[_0x35fc('0x83')]();_0x9116b1[_0x35fc('0x1d')](_0x1c6ce9);_0x9116b1[_0x35fc('0x1c')](0x0);logger['debug'](_0x35fc('0x85'),_0x9116b1[_0x35fc('0x87')]());return dbH[_0x35fc('0x86')][_0x35fc('0x35')](_0x9116b1[_0x35fc('0x87')](),{'type':dbH['sequelize'][_0x35fc('0xa2')][_0x35fc('0x88')]});}})[_0x35fc('0x26')](function(){return{'sql':_0x355154['toString']()};})[_0x35fc('0x26')](respondWithResult(_0x3fff79,null))[_0x35fc('0x49')](handleError(_0x3fff79,null));}; \ No newline at end of file diff --git a/server/api/analyticDefaultReport/analyticDefaultReport.model.js b/server/api/analyticDefaultReport/analyticDefaultReport.model.js index dc77d22..6074fad 100644 --- a/server/api/analyticDefaultReport/analyticDefaultReport.model.js +++ b/server/api/analyticDefaultReport/analyticDefaultReport.model.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x7fad=['./analyticDefaultReport.attributes','exports','define','AnalyticDefaultReport','analytics_default_reports','lodash','util','api','moment','bluebird','request-promise','path'];(function(_0x1eca77,_0x3055f2){var _0x280625=function(_0x3537d4){while(--_0x3537d4){_0x1eca77['push'](_0x1eca77['shift']());}};_0x280625(++_0x3055f2);}(_0x7fad,0xb9));var _0xd7fa=function(_0x26b622,_0x237e9e){_0x26b622=_0x26b622-0x0;var _0x58a028=_0x7fad[_0x26b622];return _0x58a028;};'use strict';var _=require(_0xd7fa('0x0'));var util=require(_0xd7fa('0x1'));var logger=require('../../config/logger')(_0xd7fa('0x2'));var moment=require(_0xd7fa('0x3'));var BPromise=require(_0xd7fa('0x4'));var rp=require(_0xd7fa('0x5'));var fs=require('fs');var path=require(_0xd7fa('0x6'));var rimraf=require('rimraf');var config=require('../../config/environment');var attributes=require(_0xd7fa('0x7'));module[_0xd7fa('0x8')]=function(_0x33b29b,_0xa339e6){return _0x33b29b[_0xd7fa('0x9')](_0xd7fa('0xa'),attributes,{'tableName':_0xd7fa('0xb'),'paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file +var _0x71a9=['bluebird','request-promise','path','../../config/environment','./analyticDefaultReport.attributes','exports','define','lodash','util','moment'];(function(_0x4715d2,_0x3371b2){var _0x141811=function(_0x520bc6){while(--_0x520bc6){_0x4715d2['push'](_0x4715d2['shift']());}};_0x141811(++_0x3371b2);}(_0x71a9,0xd9));var _0x971a=function(_0x252fec,_0x21dfd6){_0x252fec=_0x252fec-0x0;var _0x1b3256=_0x71a9[_0x252fec];return _0x1b3256;};'use strict';var _=require(_0x971a('0x0'));var util=require(_0x971a('0x1'));var logger=require('../../config/logger')('api');var moment=require(_0x971a('0x2'));var BPromise=require(_0x971a('0x3'));var rp=require(_0x971a('0x4'));var fs=require('fs');var path=require(_0x971a('0x5'));var rimraf=require('rimraf');var config=require(_0x971a('0x6'));var attributes=require(_0x971a('0x7'));module[_0x971a('0x8')]=function(_0x3c1e25,_0x1c41d3){return _0x3c1e25[_0x971a('0x9')]('AnalyticDefaultReport',attributes,{'tableName':'analytics_default_reports','paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file diff --git a/server/api/analyticDefaultReport/analyticDefaultReport.rpc.js b/server/api/analyticDefaultReport/analyticDefaultReport.rpc.js index 63dcff2..69e8e0e 100644 --- a/server/api/analyticDefaultReport/analyticDefaultReport.rpc.js +++ b/server/api/analyticDefaultReport/analyticDefaultReport.rpc.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xe35b=['client','http','request','then','info','request\x20sent','stringify','code','error','AnalyticDefaultReport,\x20%s,\x20%s','message','catch','lodash','moment','bluebird','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise'];(function(_0x46c200,_0xbea871){var _0x39caeb=function(_0x2d3a70){while(--_0x2d3a70){_0x46c200['push'](_0x46c200['shift']());}};_0x39caeb(++_0xbea871);}(_0xe35b,0x1b0));var _0xbe35=function(_0x5416db,_0x55683a){_0x5416db=_0x5416db-0x0;var _0x243e35=_0xe35b[_0x5416db];return _0x243e35;};'use strict';var _=require(_0xbe35('0x0'));var util=require('util');var moment=require(_0xbe35('0x1'));var BPromise=require(_0xbe35('0x2'));var rs=require('randomstring');var fs=require('fs');var Redis=require('ioredis');var db=require('../../mysqldb')['db'];var utils=require(_0xbe35('0x3'));var logger=require(_0xbe35('0x4'))(_0xbe35('0x5'));var config=require(_0xbe35('0x6'));var jayson=require(_0xbe35('0x7'));var client=jayson[_0xbe35('0x8')][_0xbe35('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x585ea6,_0x4647c8,_0x8b04c9){return new BPromise(function(_0x142732,_0x464227){return client[_0xbe35('0xa')](_0x585ea6,_0x8b04c9)[_0xbe35('0xb')](function(_0x2cde9d){logger[_0xbe35('0xc')]('AnalyticDefaultReport,\x20%s,\x20%s',_0x4647c8,_0xbe35('0xd'));logger['debug']('AnalyticDefaultReport,\x20%s,\x20%s,\x20%s',_0x4647c8,'request\x20sent',JSON[_0xbe35('0xe')](_0x2cde9d));if(_0x2cde9d['error']){if(_0x2cde9d['error'][_0xbe35('0xf')]===0x1f4){logger[_0xbe35('0x10')](_0xbe35('0x11'),_0x4647c8,_0x2cde9d[_0xbe35('0x10')]['message']);return _0x464227(_0x2cde9d[_0xbe35('0x10')][_0xbe35('0x12')]);}logger[_0xbe35('0x10')]('AnalyticDefaultReport,\x20%s,\x20%s',_0x4647c8,_0x2cde9d['error'][_0xbe35('0x12')]);return _0x142732(_0x2cde9d[_0xbe35('0x10')][_0xbe35('0x12')]);}else{logger['info'](_0xbe35('0x11'),_0x4647c8,_0xbe35('0xd'));_0x142732(_0x2cde9d['result'][_0xbe35('0x12')]);}})[_0xbe35('0x13')](function(_0x47f029){logger['error'](_0xbe35('0x11'),_0x4647c8,_0x47f029);_0x464227(_0x47f029);});});} \ No newline at end of file +var _0x9e2f=['stringify','error','code','message','result','util','moment','bluebird','randomstring','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','client','http','request','then','info','AnalyticDefaultReport,\x20%s,\x20%s','request\x20sent','debug','AnalyticDefaultReport,\x20%s,\x20%s,\x20%s'];(function(_0x2eb5bc,_0x4634c6){var _0x51c7b1=function(_0x1af430){while(--_0x1af430){_0x2eb5bc['push'](_0x2eb5bc['shift']());}};_0x51c7b1(++_0x4634c6);}(_0x9e2f,0x18c));var _0xf9e2=function(_0x5617be,_0x4c3632){_0x5617be=_0x5617be-0x0;var _0xedfec8=_0x9e2f[_0x5617be];return _0xedfec8;};'use strict';var _=require('lodash');var util=require(_0xf9e2('0x0'));var moment=require(_0xf9e2('0x1'));var BPromise=require(_0xf9e2('0x2'));var rs=require(_0xf9e2('0x3'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0xf9e2('0x4'))['db'];var utils=require(_0xf9e2('0x5'));var logger=require(_0xf9e2('0x6'))(_0xf9e2('0x7'));var config=require(_0xf9e2('0x8'));var jayson=require('jayson/promise');var client=jayson[_0xf9e2('0x9')][_0xf9e2('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x4a888b,_0x3622b9,_0x5b7d24){return new BPromise(function(_0x1afead,_0x3f2fd0){return client[_0xf9e2('0xb')](_0x4a888b,_0x5b7d24)[_0xf9e2('0xc')](function(_0x17f165){logger[_0xf9e2('0xd')](_0xf9e2('0xe'),_0x3622b9,_0xf9e2('0xf'));logger[_0xf9e2('0x10')](_0xf9e2('0x11'),_0x3622b9,_0xf9e2('0xf'),JSON[_0xf9e2('0x12')](_0x17f165));if(_0x17f165[_0xf9e2('0x13')]){if(_0x17f165['error'][_0xf9e2('0x14')]===0x1f4){logger[_0xf9e2('0x13')]('AnalyticDefaultReport,\x20%s,\x20%s',_0x3622b9,_0x17f165['error'][_0xf9e2('0x15')]);return _0x3f2fd0(_0x17f165[_0xf9e2('0x13')]['message']);}logger[_0xf9e2('0x13')](_0xf9e2('0xe'),_0x3622b9,_0x17f165[_0xf9e2('0x13')][_0xf9e2('0x15')]);return _0x1afead(_0x17f165[_0xf9e2('0x13')][_0xf9e2('0x15')]);}else{logger[_0xf9e2('0xd')](_0xf9e2('0xe'),_0x3622b9,'request\x20sent');_0x1afead(_0x17f165[_0xf9e2('0x16')][_0xf9e2('0x15')]);}})['catch'](function(_0x92b4e3){logger['error']('AnalyticDefaultReport,\x20%s,\x20%s',_0x3622b9,_0x92b4e3);_0x3f2fd0(_0x92b4e3);});});} \ No newline at end of file diff --git a/server/api/analyticDefaultReport/index.js b/server/api/analyticDefaultReport/index.js index 3257c34..83d28b0 100644 --- a/server/api/analyticDefaultReport/index.js +++ b/server/api/analyticDefaultReport/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xa99d=['connect-timeout','Router','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','./analyticDefaultReport.controller','get','isAuthenticated','show','/:id/preview','preview','/:id/run','run','query','post','create','put','/:id','update','delete','destroy','exports','multer','util','path'];(function(_0x3cef11,_0x2497e2){var _0x63ef5d=function(_0x562bc4){while(--_0x562bc4){_0x3cef11['push'](_0x3cef11['shift']());}};_0x63ef5d(++_0x2497e2);}(_0xa99d,0xb3));var _0xda99=function(_0x47e309,_0x1e771a){_0x47e309=_0x47e309-0x0;var _0x2e1900=_0xa99d[_0x47e309];return _0x2e1900;};'use strict';var multer=require(_0xda99('0x0'));var util=require(_0xda99('0x1'));var path=require(_0xda99('0x2'));var timeout=require(_0xda99('0x3'));var express=require('express');var router=express[_0xda99('0x4')]();var fs_extra=require(_0xda99('0x5'));var auth=require(_0xda99('0x6'));var interaction=require(_0xda99('0x7'));var config=require(_0xda99('0x8'));var controller=require(_0xda99('0x9'));router[_0xda99('0xa')]('/',auth[_0xda99('0xb')](),controller['index']);router[_0xda99('0xa')]('/:id',auth[_0xda99('0xb')](),controller[_0xda99('0xc')]);router[_0xda99('0xa')](_0xda99('0xd'),auth[_0xda99('0xb')](),controller[_0xda99('0xe')]);router['get'](_0xda99('0xf'),auth[_0xda99('0xb')](),controller[_0xda99('0x10')]);router['get']('/:id/query',auth[_0xda99('0xb')](),controller[_0xda99('0x11')]);router[_0xda99('0x12')]('/',auth[_0xda99('0xb')](),controller[_0xda99('0x13')]);router[_0xda99('0x14')](_0xda99('0x15'),auth['isAuthenticated'](),controller[_0xda99('0x16')]);router[_0xda99('0x17')](_0xda99('0x15'),auth[_0xda99('0xb')](),controller[_0xda99('0x18')]);module[_0xda99('0x19')]=router; \ No newline at end of file +var _0xa93a=['../../config/environment','./analyticDefaultReport.controller','get','isAuthenticated','index','/:id','preview','run','/:id/query','query','create','update','delete','destroy','path','Router','../../components/auth/service'];(function(_0x15b380,_0x1a3c5f){var _0x232c5c=function(_0x12f8e0){while(--_0x12f8e0){_0x15b380['push'](_0x15b380['shift']());}};_0x232c5c(++_0x1a3c5f);}(_0xa93a,0xb8));var _0xaa93=function(_0x25b579,_0x1849bf){_0x25b579=_0x25b579-0x0;var _0x406cbf=_0xa93a[_0x25b579];return _0x406cbf;};'use strict';var multer=require('multer');var util=require('util');var path=require(_0xaa93('0x0'));var timeout=require('connect-timeout');var express=require('express');var router=express[_0xaa93('0x1')]();var fs_extra=require('fs-extra');var auth=require(_0xaa93('0x2'));var interaction=require('../../components/interaction/service');var config=require(_0xaa93('0x3'));var controller=require(_0xaa93('0x4'));router[_0xaa93('0x5')]('/',auth[_0xaa93('0x6')](),controller[_0xaa93('0x7')]);router['get'](_0xaa93('0x8'),auth[_0xaa93('0x6')](),controller['show']);router[_0xaa93('0x5')]('/:id/preview',auth[_0xaa93('0x6')](),controller[_0xaa93('0x9')]);router['get']('/:id/run',auth['isAuthenticated'](),controller[_0xaa93('0xa')]);router['get'](_0xaa93('0xb'),auth[_0xaa93('0x6')](),controller[_0xaa93('0xc')]);router['post']('/',auth['isAuthenticated'](),controller[_0xaa93('0xd')]);router['put'](_0xaa93('0x8'),auth['isAuthenticated'](),controller[_0xaa93('0xe')]);router[_0xaa93('0xf')](_0xaa93('0x8'),auth[_0xaa93('0x6')](),controller[_0xaa93('0x10')]);module['exports']=router; \ No newline at end of file diff --git a/server/api/analyticExtractedReport/analyticExtractedReport.attributes.js b/server/api/analyticExtractedReport/analyticExtractedReport.attributes.js index 4fe71bb..70695d3 100644 --- a/server/api/analyticExtractedReport/analyticExtractedReport.attributes.js +++ b/server/api/analyticExtractedReport/analyticExtractedReport.attributes.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x6e7c=['csv','DATE','Loading','manual','scheduled','INTEGER','sequelize','moment','STRING','ENUM','pdf','xlsx'];(function(_0x227e05,_0xf7e46c){var _0x38c544=function(_0x602ce7){while(--_0x602ce7){_0x227e05['push'](_0x227e05['shift']());}};_0x38c544(++_0xf7e46c);}(_0x6e7c,0x186));var _0xc6e7=function(_0x18c06b,_0x462753){_0x18c06b=_0x18c06b-0x0;var _0x3ebf31=_0x6e7c[_0x18c06b];return _0x3ebf31;};'use strict';var Sequelize=require(_0xc6e7('0x0'));var moment=require(_0xc6e7('0x1'));module['exports']={'name':{'type':Sequelize[_0xc6e7('0x2')],'allowNull':![]},'basename':{'type':Sequelize[_0xc6e7('0x2')],'allowNull':![]},'output':{'type':Sequelize[_0xc6e7('0x3')]('csv',_0xc6e7('0x4'),_0xc6e7('0x5')),'allowNull':![],'defaultValue':_0xc6e7('0x6')},'savename':{'type':Sequelize[_0xc6e7('0x2')],'allowNull':![]},'startDate':{'type':Sequelize[_0xc6e7('0x7')]},'endDate':{'type':Sequelize[_0xc6e7('0x7')]},'status':{'type':Sequelize['STRING'],'defaultValue':_0xc6e7('0x8')},'type':{'type':Sequelize[_0xc6e7('0x3')](_0xc6e7('0x9'),_0xc6e7('0xa')),'allowNull':![],'defaultValue':'manual'},'reportId':{'type':Sequelize[_0xc6e7('0xb')](0xb)['UNSIGNED']},'reportType':{'type':Sequelize[_0xc6e7('0x2')]}}; \ No newline at end of file +var _0x35cd=['DATE','Loading','manual','scheduled','INTEGER','UNSIGNED','sequelize','moment','STRING','ENUM','csv','pdf','xlsx'];(function(_0x2c3dee,_0x7cb043){var _0x12bf0c=function(_0x11d6eb){while(--_0x11d6eb){_0x2c3dee['push'](_0x2c3dee['shift']());}};_0x12bf0c(++_0x7cb043);}(_0x35cd,0xe3));var _0xd35c=function(_0x49da24,_0x124150){_0x49da24=_0x49da24-0x0;var _0x440e19=_0x35cd[_0x49da24];return _0x440e19;};'use strict';var Sequelize=require(_0xd35c('0x0'));var moment=require(_0xd35c('0x1'));module['exports']={'name':{'type':Sequelize['STRING'],'allowNull':![]},'basename':{'type':Sequelize[_0xd35c('0x2')],'allowNull':![]},'output':{'type':Sequelize[_0xd35c('0x3')](_0xd35c('0x4'),_0xd35c('0x5'),_0xd35c('0x6')),'allowNull':![],'defaultValue':_0xd35c('0x4')},'savename':{'type':Sequelize[_0xd35c('0x2')],'allowNull':![]},'startDate':{'type':Sequelize[_0xd35c('0x7')]},'endDate':{'type':Sequelize[_0xd35c('0x7')]},'status':{'type':Sequelize[_0xd35c('0x2')],'defaultValue':_0xd35c('0x8')},'type':{'type':Sequelize[_0xd35c('0x3')](_0xd35c('0x9'),_0xd35c('0xa')),'allowNull':![],'defaultValue':'manual'},'reportId':{'type':Sequelize[_0xd35c('0xb')](0xb)[_0xd35c('0xc')]},'reportType':{'type':Sequelize[_0xd35c('0x2')]}}; \ No newline at end of file diff --git a/server/api/analyticExtractedReport/analyticExtractedReport.controller.js b/server/api/analyticExtractedReport/analyticExtractedReport.controller.js index a8bc6c4..4736efd 100644 --- a/server/api/analyticExtractedReport/analyticExtractedReport.controller.js +++ b/server/api/analyticExtractedReport/analyticExtractedReport.controller.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x77c9=['../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../mysqldb','status','json','limit','undefined','count','offset','Content-Range','apply','save','update','then','ExtractedReports','UserProfileResource','destroy','end','sendStatus','stack','name','send','index','map','AnalyticExtractedReport','rawAttributes','fieldName','type','key','model','query','filters','attributes','intersection','fields','length','sort','where','pick','VIRTUAL','filter','merge','includeAll','include','findAll','rows','catch','params','keys','find','create','user','get','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','UserProfileSection','userProfileId','autoAssociation','error','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','body','download','basename','existsSync','join','root','server/files/reports','savename','Sequelize','ValidationError','exists','format','%s.%s','output','toLowerCase','eml-format','zip-dir','fast-json-patch','moment','bluebird','mustache','util','path','sox','to-csv','ejs','lodash','squel','crypto','querystring','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch'];(function(_0x13ad61,_0x102458){var _0xc37ecf=function(_0x3b0479){while(--_0x3b0479){_0x13ad61['push'](_0x13ad61['shift']());}};_0xc37ecf(++_0x102458);}(_0x77c9,0x10e));var _0x977c=function(_0x1bec0d,_0x338db4){_0x1bec0d=_0x1bec0d-0x0;var _0x49e3e3=_0x77c9[_0x1bec0d];return _0x49e3e3;};'use strict';var emlformat=require(_0x977c('0x0'));var rimraf=require('rimraf');var zipdir=require(_0x977c('0x1'));var jsonpatch=require(_0x977c('0x2'));var rp=require('request-promise');var moment=require(_0x977c('0x3'));var BPromise=require(_0x977c('0x4'));var Mustache=require(_0x977c('0x5'));var util=require(_0x977c('0x6'));var path=require(_0x977c('0x7'));var sox=require(_0x977c('0x8'));var csv=require(_0x977c('0x9'));var ejs=require(_0x977c('0xa'));var fs=require('fs');var fs_extra=require('fs-extra');var _=require(_0x977c('0xb'));var squel=require(_0x977c('0xc'));var crypto=require(_0x977c('0xd'));var jsforce=require('jsforce');var deskjs=require('desk.js');var toCsv=require(_0x977c('0x9'));var querystring=require(_0x977c('0xe'));var Papa=require('papaparse');var Redis=require('ioredis');var authService=require(_0x977c('0xf'));var qs=require(_0x977c('0x10'));var as=require(_0x977c('0x11'));var hardwareService=require(_0x977c('0x12'));var logger=require(_0x977c('0x13'))(_0x977c('0x14'));var utils=require(_0x977c('0x15'));var config=require(_0x977c('0x16'));var licenseUtil=require('../../config/license/util');var db=require(_0x977c('0x17'))['db'];function respondWithStatusCode(_0x753299,_0x3bd0cf){_0x3bd0cf=_0x3bd0cf||0xcc;return function(_0x2925dd){if(_0x2925dd){return _0x753299['sendStatus'](_0x3bd0cf);}return _0x753299[_0x977c('0x18')](_0x3bd0cf)['end']();};}function respondWithResult(_0x979e4e,_0x3a16d1){_0x3a16d1=_0x3a16d1||0xc8;return function(_0x21e2a1){if(_0x21e2a1){return _0x979e4e[_0x977c('0x18')](_0x3a16d1)[_0x977c('0x19')](_0x21e2a1);}};}function respondWithFilteredResult(_0xa12b5a,_0x3f5753){return function(_0x672b0f){if(_0x672b0f){var _0xb064a7=typeof _0x3f5753['offset']==='undefined'&&typeof _0x3f5753[_0x977c('0x1a')]===_0x977c('0x1b');var _0x3bc000=_0x672b0f[_0x977c('0x1c')];var _0x4417b0=_0xb064a7?0x0:_0x3f5753[_0x977c('0x1d')];var _0x3833ee=_0xb064a7?_0x672b0f['count']:_0x3f5753['offset']+_0x3f5753[_0x977c('0x1a')];var _0x13d0e8;if(_0x3833ee>=_0x3bc000){_0x3833ee=_0x3bc000;_0x13d0e8=0xc8;}else{_0x13d0e8=0xce;}_0xa12b5a[_0x977c('0x18')](_0x13d0e8);return _0xa12b5a['set'](_0x977c('0x1e'),_0x4417b0+'-'+_0x3833ee+'/'+_0x3bc000)[_0x977c('0x19')](_0x672b0f);}return null;};}function patchUpdates(_0x6e5fe3){return function(_0xe7e0fb){try{jsonpatch[_0x977c('0x1f')](_0xe7e0fb,_0x6e5fe3,!![]);}catch(_0x3083b8){return BPromise['reject'](_0x3083b8);}return _0xe7e0fb[_0x977c('0x20')]();};}function saveUpdates(_0x466b81,_0x2a8f){return function(_0x4d646d){if(_0x4d646d){return _0x4d646d[_0x977c('0x21')](_0x466b81)[_0x977c('0x22')](function(_0x147dd1){return _0x147dd1;});}return null;};}function removeEntity(_0x18b032,_0x23d8b1){return function(_0x285369){if(_0x285369){return _0x285369['destroy']()[_0x977c('0x22')](function(){var _0x5edf70=_0x285369['get']({'plain':!![]});var _0x1be372=_0x977c('0x23');return db[_0x977c('0x24')][_0x977c('0x25')]({'where':{'type':_0x1be372,'resourceId':_0x5edf70['id']}})[_0x977c('0x22')](function(){return _0x285369;});})[_0x977c('0x22')](function(){_0x18b032[_0x977c('0x18')](0xcc)[_0x977c('0x26')]();});}};}function handleEntityNotFound(_0x3e1773,_0x31034e){return function(_0x129c93){if(!_0x129c93){_0x3e1773[_0x977c('0x27')](0x194);}return _0x129c93;};}function handleError(_0xfaa027,_0x262a12){_0x262a12=_0x262a12||0x1f4;return function(_0x259804){logger['error'](_0x259804[_0x977c('0x28')]);if(_0x259804[_0x977c('0x29')]){delete _0x259804['name'];}_0xfaa027[_0x977c('0x18')](_0x262a12)[_0x977c('0x2a')](_0x259804);};}exports[_0x977c('0x2b')]=function(_0x3a3e8d,_0x47da86){var _0x42e112={},_0x10aa1c={},_0xd9c6ec={'count':0x0,'rows':[]};var _0x1088e6=_[_0x977c('0x2c')](db[_0x977c('0x2d')][_0x977c('0x2e')],function(_0x5b0d92){return{'name':_0x5b0d92[_0x977c('0x2f')],'type':_0x5b0d92[_0x977c('0x30')][_0x977c('0x31')]};});_0x10aa1c[_0x977c('0x32')]=_[_0x977c('0x2c')](_0x1088e6,_0x977c('0x29'));_0x10aa1c[_0x977c('0x33')]=_['keys'](_0x3a3e8d[_0x977c('0x33')]);_0x10aa1c[_0x977c('0x34')]=_['intersection'](_0x10aa1c[_0x977c('0x32')],_0x10aa1c[_0x977c('0x33')]);_0x42e112[_0x977c('0x35')]=_[_0x977c('0x36')](_0x10aa1c[_0x977c('0x32')],qs[_0x977c('0x37')](_0x3a3e8d[_0x977c('0x33')][_0x977c('0x37')]));_0x42e112[_0x977c('0x35')]=_0x42e112[_0x977c('0x35')][_0x977c('0x38')]?_0x42e112['attributes']:_0x10aa1c['model'];if(!_0x3a3e8d[_0x977c('0x33')]['hasOwnProperty']('nolimit')){_0x42e112[_0x977c('0x1a')]=qs[_0x977c('0x1a')](_0x3a3e8d[_0x977c('0x33')]['limit']);_0x42e112[_0x977c('0x1d')]=qs[_0x977c('0x1d')](_0x3a3e8d['query']['offset']);}_0x42e112['order']=qs[_0x977c('0x39')](_0x3a3e8d[_0x977c('0x33')][_0x977c('0x39')]);_0x42e112[_0x977c('0x3a')]=qs[_0x977c('0x34')](_[_0x977c('0x3b')](_0x3a3e8d[_0x977c('0x33')],_0x10aa1c[_0x977c('0x34')]),_0x1088e6);if(_0x3a3e8d[_0x977c('0x33')]['filter']){_0x42e112['where']=_['merge'](_0x42e112[_0x977c('0x3a')],{'$or':_[_0x977c('0x2c')](_0x1088e6,function(_0x4ea509){if(_0x4ea509[_0x977c('0x30')]!==_0x977c('0x3c')){var _0x3cff4a={};_0x3cff4a[_0x4ea509[_0x977c('0x29')]]={'$like':'%'+_0x3a3e8d['query'][_0x977c('0x3d')]+'%'};return _0x3cff4a;}})});}_0x42e112=_[_0x977c('0x3e')]({},_0x42e112,_0x3a3e8d['options']);var _0x1b6c5f={'where':_0x42e112['where']};return db['AnalyticExtractedReport'][_0x977c('0x1c')](_0x1b6c5f)['then'](function(_0xc205be){_0xd9c6ec[_0x977c('0x1c')]=_0xc205be;if(_0x3a3e8d[_0x977c('0x33')][_0x977c('0x3f')]){_0x42e112[_0x977c('0x40')]=[{'all':!![]}];}return db['AnalyticExtractedReport'][_0x977c('0x41')](_0x42e112);})[_0x977c('0x22')](function(_0x3d5c65){_0xd9c6ec[_0x977c('0x42')]=_0x3d5c65;return _0xd9c6ec;})['then'](respondWithFilteredResult(_0x47da86,_0x42e112))[_0x977c('0x43')](handleError(_0x47da86,null));};exports['show']=function(_0x4f2e62,_0x53ebf2){var _0x132a1f={'raw':!![],'where':{'id':_0x4f2e62[_0x977c('0x44')]['id']}},_0x1ebc68={};_0x1ebc68[_0x977c('0x32')]=_[_0x977c('0x45')](db[_0x977c('0x2d')][_0x977c('0x2e')]);_0x1ebc68[_0x977c('0x33')]=_[_0x977c('0x45')](_0x4f2e62[_0x977c('0x33')]);_0x1ebc68[_0x977c('0x34')]=_[_0x977c('0x36')](_0x1ebc68[_0x977c('0x32')],_0x1ebc68[_0x977c('0x33')]);_0x132a1f[_0x977c('0x35')]=_[_0x977c('0x36')](_0x1ebc68[_0x977c('0x32')],qs[_0x977c('0x37')](_0x4f2e62[_0x977c('0x33')][_0x977c('0x37')]));_0x132a1f[_0x977c('0x35')]=_0x132a1f['attributes'][_0x977c('0x38')]?_0x132a1f[_0x977c('0x35')]:_0x1ebc68[_0x977c('0x32')];if(_0x4f2e62[_0x977c('0x33')][_0x977c('0x3f')]){_0x132a1f['include']=[{'all':!![]}];}_0x132a1f=_[_0x977c('0x3e')]({},_0x132a1f,_0x4f2e62['options']);return db[_0x977c('0x2d')][_0x977c('0x46')](_0x132a1f)[_0x977c('0x22')](handleEntityNotFound(_0x53ebf2,null))[_0x977c('0x22')](respondWithResult(_0x53ebf2,null))[_0x977c('0x43')](handleError(_0x53ebf2,null));};exports[_0x977c('0x47')]=function(_0x5a4b80,_0x4f2276){return db[_0x977c('0x2d')][_0x977c('0x47')](_0x5a4b80['body'],{})['then'](function(_0xe8df87){var _0x17a57b=_0x5a4b80[_0x977c('0x48')][_0x977c('0x49')]({'plain':!![]});if(!_0x17a57b)throw new Error(_0x977c('0x4a'));if(_0x17a57b[_0x977c('0x4b')]===_0x977c('0x48')){var _0x24ebe9=_0xe8df87[_0x977c('0x49')]({'plain':!![]});var _0x4fe042=_0x977c('0x23');return db[_0x977c('0x4c')][_0x977c('0x46')]({'where':{'name':_0x4fe042,'userProfileId':_0x17a57b[_0x977c('0x4d')]},'raw':!![]})['then'](function(_0x20eb87){if(_0x20eb87&&_0x20eb87[_0x977c('0x4e')]===0x0){return db['UserProfileResource']['create']({'name':_0x24ebe9[_0x977c('0x29')],'resourceId':_0x24ebe9['id'],'type':_0x20eb87[_0x977c('0x29')],'sectionId':_0x20eb87['id']},{})[_0x977c('0x22')](function(){return _0xe8df87;});}else{return _0xe8df87;}})['catch'](function(_0x324848){logger[_0x977c('0x4f')](_0x977c('0x50'),_0x324848);throw _0x324848;});}return _0xe8df87;})[_0x977c('0x22')](respondWithResult(_0x4f2276,0xc9))[_0x977c('0x43')](handleError(_0x4f2276,null));};exports['update']=function(_0x5a961d,_0x267624){if(_0x5a961d[_0x977c('0x51')]['id']){delete _0x5a961d[_0x977c('0x51')]['id'];}return db[_0x977c('0x2d')][_0x977c('0x46')]({'where':{'id':_0x5a961d[_0x977c('0x44')]['id']}})[_0x977c('0x22')](handleEntityNotFound(_0x267624,null))[_0x977c('0x22')](saveUpdates(_0x5a961d[_0x977c('0x51')],null))[_0x977c('0x22')](respondWithResult(_0x267624,null))['catch'](handleError(_0x267624,null));};exports['destroy']=function(_0x12c32f,_0x30923a){return db[_0x977c('0x2d')][_0x977c('0x46')]({'where':{'id':_0x12c32f[_0x977c('0x44')]['id']}})[_0x977c('0x22')](handleEntityNotFound(_0x30923a,null))[_0x977c('0x22')](removeEntity(_0x30923a,null))[_0x977c('0x43')](handleError(_0x30923a,null));};exports[_0x977c('0x52')]=function(_0x2084ed,_0x3fada2,_0x4fe5c4){return db[_0x977c('0x2d')]['find']({'where':{'id':_0x2084ed[_0x977c('0x44')]['id']},'attributes':[_0x977c('0x29'),_0x977c('0x53'),'savename','output'],'raw':!![]})[_0x977c('0x22')](handleEntityNotFound(_0x3fada2,null))['then'](function(_0x2977d9){if(_0x2977d9){if(!fs[_0x977c('0x54')](path[_0x977c('0x55')](config[_0x977c('0x56')],_0x977c('0x57'),_0x2977d9[_0x977c('0x58')]))){throw new db[(_0x977c('0x59'))][(_0x977c('0x5a'))]('Report\x20not\x20found\x20or\x20empty');}if(_0x2084ed[_0x977c('0x33')][_0x977c('0x5b')]){return _0x3fada2[_0x977c('0x27')](0xc8);}return _0x3fada2[_0x977c('0x52')](path['join'](config['root'],_0x977c('0x57'),_0x2977d9[_0x977c('0x58')]),util[_0x977c('0x5c')](_0x977c('0x5d'),_0x2977d9['basename']||_0x2977d9[_0x977c('0x29')],_0x2977d9[_0x977c('0x5e')][_0x977c('0x5f')]()));}})[_0x977c('0x43')](handleError(_0x3fada2,null));}; \ No newline at end of file +var _0xf2e5=['../../config/license/hardware','api','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','sendStatus','status','end','json','offset','undefined','limit','count','set','Content-Range','apply','reject','update','then','destroy','get','name','send','index','map','AnalyticExtractedReport','type','key','model','keys','query','intersection','attributes','fields','length','hasOwnProperty','nolimit','order','sort','filters','pick','filter','merge','where','VIRTUAL','options','includeAll','include','findAll','rows','catch','show','rawAttributes','create','body','user','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','ExtractedReports','userProfileId','UserProfileResource','error','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','find','params','download','basename','savename','join','server/files/reports','Sequelize','ValidationError','Report\x20not\x20found\x20or\x20empty','exists','root','format','%s.%s','output','eml-format','rimraf','request-promise','mustache','util','path','sox','to-csv','ejs','fs-extra','lodash','crypto','jsforce','desk.js','querystring','papaparse','ioredis','../../components/parsers/qs','../../components/parsers/advancedSearch'];(function(_0x230a0f,_0xca813e){var _0x10370c=function(_0x100505){while(--_0x100505){_0x230a0f['push'](_0x230a0f['shift']());}};_0x10370c(++_0xca813e);}(_0xf2e5,0x175));var _0x5f2e=function(_0x49d40d,_0x30e0ea){_0x49d40d=_0x49d40d-0x0;var _0x5ec463=_0xf2e5[_0x49d40d];return _0x5ec463;};'use strict';var emlformat=require(_0x5f2e('0x0'));var rimraf=require(_0x5f2e('0x1'));var zipdir=require('zip-dir');var jsonpatch=require('fast-json-patch');var rp=require(_0x5f2e('0x2'));var moment=require('moment');var BPromise=require('bluebird');var Mustache=require(_0x5f2e('0x3'));var util=require(_0x5f2e('0x4'));var path=require(_0x5f2e('0x5'));var sox=require(_0x5f2e('0x6'));var csv=require(_0x5f2e('0x7'));var ejs=require(_0x5f2e('0x8'));var fs=require('fs');var fs_extra=require(_0x5f2e('0x9'));var _=require(_0x5f2e('0xa'));var squel=require('squel');var crypto=require(_0x5f2e('0xb'));var jsforce=require(_0x5f2e('0xc'));var deskjs=require(_0x5f2e('0xd'));var toCsv=require('to-csv');var querystring=require(_0x5f2e('0xe'));var Papa=require(_0x5f2e('0xf'));var Redis=require(_0x5f2e('0x10'));var authService=require('../../components/auth/service');var qs=require(_0x5f2e('0x11'));var as=require(_0x5f2e('0x12'));var hardwareService=require(_0x5f2e('0x13'));var logger=require('../../config/logger')(_0x5f2e('0x14'));var utils=require(_0x5f2e('0x15'));var config=require(_0x5f2e('0x16'));var licenseUtil=require(_0x5f2e('0x17'));var db=require(_0x5f2e('0x18'))['db'];function respondWithStatusCode(_0x5b5cbf,_0xb16f81){_0xb16f81=_0xb16f81||0xcc;return function(_0x756f7b){if(_0x756f7b){return _0x5b5cbf[_0x5f2e('0x19')](_0xb16f81);}return _0x5b5cbf[_0x5f2e('0x1a')](_0xb16f81)[_0x5f2e('0x1b')]();};}function respondWithResult(_0x279f73,_0x17673b){_0x17673b=_0x17673b||0xc8;return function(_0x3c90ca){if(_0x3c90ca){return _0x279f73[_0x5f2e('0x1a')](_0x17673b)[_0x5f2e('0x1c')](_0x3c90ca);}};}function respondWithFilteredResult(_0x1df115,_0x1d571a){return function(_0x28ffe1){if(_0x28ffe1){var _0x1a336d=typeof _0x1d571a[_0x5f2e('0x1d')]===_0x5f2e('0x1e')&&typeof _0x1d571a[_0x5f2e('0x1f')]===_0x5f2e('0x1e');var _0x585672=_0x28ffe1[_0x5f2e('0x20')];var _0x7a70ac=_0x1a336d?0x0:_0x1d571a[_0x5f2e('0x1d')];var _0x3c4ff9=_0x1a336d?_0x28ffe1[_0x5f2e('0x20')]:_0x1d571a[_0x5f2e('0x1d')]+_0x1d571a['limit'];var _0x561f08;if(_0x3c4ff9>=_0x585672){_0x3c4ff9=_0x585672;_0x561f08=0xc8;}else{_0x561f08=0xce;}_0x1df115[_0x5f2e('0x1a')](_0x561f08);return _0x1df115[_0x5f2e('0x21')](_0x5f2e('0x22'),_0x7a70ac+'-'+_0x3c4ff9+'/'+_0x585672)['json'](_0x28ffe1);}return null;};}function patchUpdates(_0xb168f6){return function(_0x4fa8a9){try{jsonpatch[_0x5f2e('0x23')](_0x4fa8a9,_0xb168f6,!![]);}catch(_0xa2b403){return BPromise[_0x5f2e('0x24')](_0xa2b403);}return _0x4fa8a9['save']();};}function saveUpdates(_0x50a353,_0x1742b7){return function(_0x5567d3){if(_0x5567d3){return _0x5567d3[_0x5f2e('0x25')](_0x50a353)[_0x5f2e('0x26')](function(_0x23534c){return _0x23534c;});}return null;};}function removeEntity(_0x3a3e4a,_0x47ac32){return function(_0x268393){if(_0x268393){return _0x268393[_0x5f2e('0x27')]()[_0x5f2e('0x26')](function(){var _0x1a8e2b=_0x268393[_0x5f2e('0x28')]({'plain':!![]});var _0x52556a='ExtractedReports';return db['UserProfileResource'][_0x5f2e('0x27')]({'where':{'type':_0x52556a,'resourceId':_0x1a8e2b['id']}})[_0x5f2e('0x26')](function(){return _0x268393;});})[_0x5f2e('0x26')](function(){_0x3a3e4a['status'](0xcc)[_0x5f2e('0x1b')]();});}};}function handleEntityNotFound(_0x50f955,_0x44bba7){return function(_0x1765ce){if(!_0x1765ce){_0x50f955[_0x5f2e('0x19')](0x194);}return _0x1765ce;};}function handleError(_0x3e70ea,_0x43c6e9){_0x43c6e9=_0x43c6e9||0x1f4;return function(_0x1a9159){logger['error'](_0x1a9159['stack']);if(_0x1a9159[_0x5f2e('0x29')]){delete _0x1a9159['name'];}_0x3e70ea['status'](_0x43c6e9)[_0x5f2e('0x2a')](_0x1a9159);};}exports[_0x5f2e('0x2b')]=function(_0x79272a,_0x2a670a){var _0x5780a0={},_0x6b2fef={},_0x442956={'count':0x0,'rows':[]};var _0x39e167=_[_0x5f2e('0x2c')](db[_0x5f2e('0x2d')]['rawAttributes'],function(_0xffb034){return{'name':_0xffb034['fieldName'],'type':_0xffb034[_0x5f2e('0x2e')][_0x5f2e('0x2f')]};});_0x6b2fef[_0x5f2e('0x30')]=_[_0x5f2e('0x2c')](_0x39e167,_0x5f2e('0x29'));_0x6b2fef['query']=_[_0x5f2e('0x31')](_0x79272a[_0x5f2e('0x32')]);_0x6b2fef['filters']=_[_0x5f2e('0x33')](_0x6b2fef[_0x5f2e('0x30')],_0x6b2fef[_0x5f2e('0x32')]);_0x5780a0[_0x5f2e('0x34')]=_['intersection'](_0x6b2fef['model'],qs[_0x5f2e('0x35')](_0x79272a[_0x5f2e('0x32')][_0x5f2e('0x35')]));_0x5780a0[_0x5f2e('0x34')]=_0x5780a0[_0x5f2e('0x34')][_0x5f2e('0x36')]?_0x5780a0[_0x5f2e('0x34')]:_0x6b2fef[_0x5f2e('0x30')];if(!_0x79272a['query'][_0x5f2e('0x37')](_0x5f2e('0x38'))){_0x5780a0[_0x5f2e('0x1f')]=qs[_0x5f2e('0x1f')](_0x79272a[_0x5f2e('0x32')][_0x5f2e('0x1f')]);_0x5780a0[_0x5f2e('0x1d')]=qs[_0x5f2e('0x1d')](_0x79272a[_0x5f2e('0x32')][_0x5f2e('0x1d')]);}_0x5780a0[_0x5f2e('0x39')]=qs[_0x5f2e('0x3a')](_0x79272a[_0x5f2e('0x32')][_0x5f2e('0x3a')]);_0x5780a0['where']=qs[_0x5f2e('0x3b')](_[_0x5f2e('0x3c')](_0x79272a[_0x5f2e('0x32')],_0x6b2fef['filters']),_0x39e167);if(_0x79272a['query'][_0x5f2e('0x3d')]){_0x5780a0['where']=_[_0x5f2e('0x3e')](_0x5780a0[_0x5f2e('0x3f')],{'$or':_[_0x5f2e('0x2c')](_0x39e167,function(_0x487f77){if(_0x487f77['type']!==_0x5f2e('0x40')){var _0x115dd6={};_0x115dd6[_0x487f77[_0x5f2e('0x29')]]={'$like':'%'+_0x79272a[_0x5f2e('0x32')][_0x5f2e('0x3d')]+'%'};return _0x115dd6;}})});}_0x5780a0=_['merge']({},_0x5780a0,_0x79272a[_0x5f2e('0x41')]);var _0x31626b={'where':_0x5780a0['where']};return db[_0x5f2e('0x2d')][_0x5f2e('0x20')](_0x31626b)[_0x5f2e('0x26')](function(_0x21b4d6){_0x442956[_0x5f2e('0x20')]=_0x21b4d6;if(_0x79272a[_0x5f2e('0x32')][_0x5f2e('0x42')]){_0x5780a0[_0x5f2e('0x43')]=[{'all':!![]}];}return db[_0x5f2e('0x2d')][_0x5f2e('0x44')](_0x5780a0);})['then'](function(_0x53ca59){_0x442956[_0x5f2e('0x45')]=_0x53ca59;return _0x442956;})[_0x5f2e('0x26')](respondWithFilteredResult(_0x2a670a,_0x5780a0))[_0x5f2e('0x46')](handleError(_0x2a670a,null));};exports[_0x5f2e('0x47')]=function(_0x1dfa57,_0x3ebfa9){var _0x581325={'raw':!![],'where':{'id':_0x1dfa57['params']['id']}},_0x36da98={};_0x36da98[_0x5f2e('0x30')]=_[_0x5f2e('0x31')](db['AnalyticExtractedReport'][_0x5f2e('0x48')]);_0x36da98[_0x5f2e('0x32')]=_[_0x5f2e('0x31')](_0x1dfa57[_0x5f2e('0x32')]);_0x36da98[_0x5f2e('0x3b')]=_[_0x5f2e('0x33')](_0x36da98[_0x5f2e('0x30')],_0x36da98['query']);_0x581325[_0x5f2e('0x34')]=_[_0x5f2e('0x33')](_0x36da98['model'],qs[_0x5f2e('0x35')](_0x1dfa57[_0x5f2e('0x32')][_0x5f2e('0x35')]));_0x581325[_0x5f2e('0x34')]=_0x581325[_0x5f2e('0x34')][_0x5f2e('0x36')]?_0x581325[_0x5f2e('0x34')]:_0x36da98[_0x5f2e('0x30')];if(_0x1dfa57[_0x5f2e('0x32')][_0x5f2e('0x42')]){_0x581325[_0x5f2e('0x43')]=[{'all':!![]}];}_0x581325=_['merge']({},_0x581325,_0x1dfa57[_0x5f2e('0x41')]);return db[_0x5f2e('0x2d')]['find'](_0x581325)[_0x5f2e('0x26')](handleEntityNotFound(_0x3ebfa9,null))[_0x5f2e('0x26')](respondWithResult(_0x3ebfa9,null))[_0x5f2e('0x46')](handleError(_0x3ebfa9,null));};exports[_0x5f2e('0x49')]=function(_0x10fc7e,_0x1e8dda){return db[_0x5f2e('0x2d')][_0x5f2e('0x49')](_0x10fc7e[_0x5f2e('0x4a')],{})[_0x5f2e('0x26')](function(_0x196386){var _0x402278=_0x10fc7e[_0x5f2e('0x4b')][_0x5f2e('0x28')]({'plain':!![]});if(!_0x402278)throw new Error(_0x5f2e('0x4c'));if(_0x402278[_0x5f2e('0x4d')]===_0x5f2e('0x4b')){var _0x3700a2=_0x196386[_0x5f2e('0x28')]({'plain':!![]});var _0x3ec2cc=_0x5f2e('0x4e');return db['UserProfileSection']['find']({'where':{'name':_0x3ec2cc,'userProfileId':_0x402278[_0x5f2e('0x4f')]},'raw':!![]})['then'](function(_0x13be2e){if(_0x13be2e&&_0x13be2e['autoAssociation']===0x0){return db[_0x5f2e('0x50')][_0x5f2e('0x49')]({'name':_0x3700a2[_0x5f2e('0x29')],'resourceId':_0x3700a2['id'],'type':_0x13be2e[_0x5f2e('0x29')],'sectionId':_0x13be2e['id']},{})[_0x5f2e('0x26')](function(){return _0x196386;});}else{return _0x196386;}})[_0x5f2e('0x46')](function(_0x4aefa8){logger[_0x5f2e('0x51')](_0x5f2e('0x52'),_0x4aefa8);throw _0x4aefa8;});}return _0x196386;})[_0x5f2e('0x26')](respondWithResult(_0x1e8dda,0xc9))[_0x5f2e('0x46')](handleError(_0x1e8dda,null));};exports['update']=function(_0x45e7e0,_0x17c3ad){if(_0x45e7e0[_0x5f2e('0x4a')]['id']){delete _0x45e7e0[_0x5f2e('0x4a')]['id'];}return db[_0x5f2e('0x2d')][_0x5f2e('0x53')]({'where':{'id':_0x45e7e0['params']['id']}})['then'](handleEntityNotFound(_0x17c3ad,null))[_0x5f2e('0x26')](saveUpdates(_0x45e7e0[_0x5f2e('0x4a')],null))[_0x5f2e('0x26')](respondWithResult(_0x17c3ad,null))['catch'](handleError(_0x17c3ad,null));};exports[_0x5f2e('0x27')]=function(_0x99d85e,_0x5cb929){return db[_0x5f2e('0x2d')][_0x5f2e('0x53')]({'where':{'id':_0x99d85e[_0x5f2e('0x54')]['id']}})[_0x5f2e('0x26')](handleEntityNotFound(_0x5cb929,null))['then'](removeEntity(_0x5cb929,null))[_0x5f2e('0x46')](handleError(_0x5cb929,null));};exports[_0x5f2e('0x55')]=function(_0x458ca6,_0x3f1451,_0x507be8){return db[_0x5f2e('0x2d')][_0x5f2e('0x53')]({'where':{'id':_0x458ca6['params']['id']},'attributes':[_0x5f2e('0x29'),_0x5f2e('0x56'),_0x5f2e('0x57'),'output'],'raw':!![]})[_0x5f2e('0x26')](handleEntityNotFound(_0x3f1451,null))[_0x5f2e('0x26')](function(_0x5a7d15){if(_0x5a7d15){if(!fs['existsSync'](path[_0x5f2e('0x58')](config['root'],_0x5f2e('0x59'),_0x5a7d15[_0x5f2e('0x57')]))){throw new db[(_0x5f2e('0x5a'))][(_0x5f2e('0x5b'))](_0x5f2e('0x5c'));}if(_0x458ca6['query'][_0x5f2e('0x5d')]){return _0x3f1451[_0x5f2e('0x19')](0xc8);}return _0x3f1451[_0x5f2e('0x55')](path[_0x5f2e('0x58')](config[_0x5f2e('0x5e')],_0x5f2e('0x59'),_0x5a7d15[_0x5f2e('0x57')]),util[_0x5f2e('0x5f')](_0x5f2e('0x60'),_0x5a7d15[_0x5f2e('0x56')]||_0x5a7d15['name'],_0x5a7d15[_0x5f2e('0x61')]['toLowerCase']()));}})['catch'](handleError(_0x3f1451,null));}; \ No newline at end of file diff --git a/server/api/analyticExtractedReport/analyticExtractedReport.model.js b/server/api/analyticExtractedReport/analyticExtractedReport.model.js index 4854842..aa727de 100644 --- a/server/api/analyticExtractedReport/analyticExtractedReport.model.js +++ b/server/api/analyticExtractedReport/analyticExtractedReport.model.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x323e=['moment','bluebird','request-promise','path','rimraf','../../config/environment','./analyticExtractedReport.attributes','AnalyticExtractedReport','lodash','util','../../config/logger'];(function(_0xc7c65f,_0x595ff3){var _0x24894f=function(_0x402776){while(--_0x402776){_0xc7c65f['push'](_0xc7c65f['shift']());}};_0x24894f(++_0x595ff3);}(_0x323e,0x1cb));var _0xe323=function(_0x1c5d44,_0x507569){_0x1c5d44=_0x1c5d44-0x0;var _0x1cc894=_0x323e[_0x1c5d44];return _0x1cc894;};'use strict';var _=require(_0xe323('0x0'));var util=require(_0xe323('0x1'));var logger=require(_0xe323('0x2'))('api');var moment=require(_0xe323('0x3'));var BPromise=require(_0xe323('0x4'));var rp=require(_0xe323('0x5'));var fs=require('fs');var path=require(_0xe323('0x6'));var rimraf=require(_0xe323('0x7'));var config=require(_0xe323('0x8'));var attributes=require(_0xe323('0x9'));module['exports']=function(_0x1cc463,_0x369e7d){return _0x1cc463['define'](_0xe323('0xa'),attributes,{'tableName':'analytics_extracted_reports','paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file +var _0x49ee=['define','AnalyticExtractedReport','analytics_extracted_reports','lodash','util','../../config/logger','api','moment','bluebird','request-promise','path','rimraf','../../config/environment','./analyticExtractedReport.attributes','exports'];(function(_0x1c127a,_0x2c2dc5){var _0x392b19=function(_0x5d5ec8){while(--_0x5d5ec8){_0x1c127a['push'](_0x1c127a['shift']());}};_0x392b19(++_0x2c2dc5);}(_0x49ee,0x1e3));var _0xe49e=function(_0x165346,_0x3c0412){_0x165346=_0x165346-0x0;var _0x1fdf12=_0x49ee[_0x165346];return _0x1fdf12;};'use strict';var _=require(_0xe49e('0x0'));var util=require(_0xe49e('0x1'));var logger=require(_0xe49e('0x2'))(_0xe49e('0x3'));var moment=require(_0xe49e('0x4'));var BPromise=require(_0xe49e('0x5'));var rp=require(_0xe49e('0x6'));var fs=require('fs');var path=require(_0xe49e('0x7'));var rimraf=require(_0xe49e('0x8'));var config=require(_0xe49e('0x9'));var attributes=require(_0xe49e('0xa'));module[_0xe49e('0xb')]=function(_0x263658,_0x3866e9){return _0x263658[_0xe49e('0xc')](_0xe49e('0xd'),attributes,{'tableName':_0xe49e('0xe'),'paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file diff --git a/server/api/analyticExtractedReport/analyticExtractedReport.rpc.js b/server/api/analyticExtractedReport/analyticExtractedReport.rpc.js index da3de99..ef23010 100644 --- a/server/api/analyticExtractedReport/analyticExtractedReport.rpc.js +++ b/server/api/analyticExtractedReport/analyticExtractedReport.rpc.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xb082=['util','moment','bluebird','randomstring','ioredis','../../config/utils','../../config/logger','rpc','jayson/promise','request','AnalyticExtractedReport,\x20%s,\x20%s','request\x20sent','debug','AnalyticExtractedReport,\x20%s,\x20%s,\x20%s','error','code','message','info','result','catch','lodash'];(function(_0x13c084,_0x4e2e99){var _0xe30a7e=function(_0x2beb5e){while(--_0x2beb5e){_0x13c084['push'](_0x13c084['shift']());}};_0xe30a7e(++_0x4e2e99);}(_0xb082,0x110));var _0x2b08=function(_0x1d376b,_0x1bb119){_0x1d376b=_0x1d376b-0x0;var _0x3d9431=_0xb082[_0x1d376b];return _0x3d9431;};'use strict';var _=require(_0x2b08('0x0'));var util=require(_0x2b08('0x1'));var moment=require(_0x2b08('0x2'));var BPromise=require(_0x2b08('0x3'));var rs=require(_0x2b08('0x4'));var fs=require('fs');var Redis=require(_0x2b08('0x5'));var db=require('../../mysqldb')['db'];var utils=require(_0x2b08('0x6'));var logger=require(_0x2b08('0x7'))(_0x2b08('0x8'));var config=require('../../config/environment');var jayson=require(_0x2b08('0x9'));var client=jayson['client']['http']({'port':0x232a});function respondWithRpcPromise(_0x4914d4,_0xc5c12f,_0x2b6bde){return new BPromise(function(_0x1e936b,_0x4fb6ac){return client[_0x2b08('0xa')](_0x4914d4,_0x2b6bde)['then'](function(_0x20b475){logger['info'](_0x2b08('0xb'),_0xc5c12f,_0x2b08('0xc'));logger[_0x2b08('0xd')](_0x2b08('0xe'),_0xc5c12f,_0x2b08('0xc'),JSON['stringify'](_0x20b475));if(_0x20b475[_0x2b08('0xf')]){if(_0x20b475[_0x2b08('0xf')][_0x2b08('0x10')]===0x1f4){logger[_0x2b08('0xf')](_0x2b08('0xb'),_0xc5c12f,_0x20b475[_0x2b08('0xf')][_0x2b08('0x11')]);return _0x4fb6ac(_0x20b475['error']['message']);}logger['error'](_0x2b08('0xb'),_0xc5c12f,_0x20b475['error'][_0x2b08('0x11')]);return _0x1e936b(_0x20b475[_0x2b08('0xf')][_0x2b08('0x11')]);}else{logger[_0x2b08('0x12')](_0x2b08('0xb'),_0xc5c12f,_0x2b08('0xc'));_0x1e936b(_0x20b475[_0x2b08('0x13')][_0x2b08('0x11')]);}})[_0x2b08('0x14')](function(_0x2f5f63){logger['error'](_0x2b08('0xb'),_0xc5c12f,_0x2f5f63);_0x4fb6ac(_0x2f5f63);});});} \ No newline at end of file +var _0x38e9=['message','result','catch','lodash','util','bluebird','randomstring','ioredis','../../mysqldb','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','request','then','info','AnalyticExtractedReport,\x20%s,\x20%s','debug','AnalyticExtractedReport,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','code'];(function(_0x20a584,_0xe384a5){var _0x4b41a8=function(_0x2127c6){while(--_0x2127c6){_0x20a584['push'](_0x20a584['shift']());}};_0x4b41a8(++_0xe384a5);}(_0x38e9,0x1c5));var _0x938e=function(_0x2acd64,_0x4e8ce8){_0x2acd64=_0x2acd64-0x0;var _0x3d3fce=_0x38e9[_0x2acd64];return _0x3d3fce;};'use strict';var _=require(_0x938e('0x0'));var util=require(_0x938e('0x1'));var moment=require('moment');var BPromise=require(_0x938e('0x2'));var rs=require(_0x938e('0x3'));var fs=require('fs');var Redis=require(_0x938e('0x4'));var db=require(_0x938e('0x5'))['db'];var utils=require('../../config/utils');var logger=require(_0x938e('0x6'))(_0x938e('0x7'));var config=require(_0x938e('0x8'));var jayson=require(_0x938e('0x9'));var client=jayson[_0x938e('0xa')][_0x938e('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x58aa0d,_0x456d41,_0x3fc1d9){return new BPromise(function(_0x39d56a,_0x2a1a6f){return client[_0x938e('0xc')](_0x58aa0d,_0x3fc1d9)[_0x938e('0xd')](function(_0x10df46){logger[_0x938e('0xe')](_0x938e('0xf'),_0x456d41,'request\x20sent');logger[_0x938e('0x10')](_0x938e('0x11'),_0x456d41,_0x938e('0x12'),JSON[_0x938e('0x13')](_0x10df46));if(_0x10df46[_0x938e('0x14')]){if(_0x10df46[_0x938e('0x14')][_0x938e('0x15')]===0x1f4){logger[_0x938e('0x14')](_0x938e('0xf'),_0x456d41,_0x10df46[_0x938e('0x14')][_0x938e('0x16')]);return _0x2a1a6f(_0x10df46['error']['message']);}logger[_0x938e('0x14')](_0x938e('0xf'),_0x456d41,_0x10df46[_0x938e('0x14')]['message']);return _0x39d56a(_0x10df46[_0x938e('0x14')][_0x938e('0x16')]);}else{logger['info']('AnalyticExtractedReport,\x20%s,\x20%s',_0x456d41,_0x938e('0x12'));_0x39d56a(_0x10df46[_0x938e('0x17')][_0x938e('0x16')]);}})[_0x938e('0x18')](function(_0xccf09c){logger[_0x938e('0x14')](_0x938e('0xf'),_0x456d41,_0xccf09c);_0x2a1a6f(_0xccf09c);});});} \ No newline at end of file diff --git a/server/api/analyticExtractedReport/index.js b/server/api/analyticExtractedReport/index.js index c11a0ba..68b180c 100644 --- a/server/api/analyticExtractedReport/index.js +++ b/server/api/analyticExtractedReport/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xa939=['show','/:id/download','download','create','update','/:id','destroy','multer','util','path','connect-timeout','express','Router','fs-extra','../../components/auth/service','../../config/environment','./analyticExtractedReport.controller','get','isAuthenticated','index'];(function(_0x4f7756,_0x4df793){var _0x43a060=function(_0x4c423a){while(--_0x4c423a){_0x4f7756['push'](_0x4f7756['shift']());}};_0x43a060(++_0x4df793);}(_0xa939,0x133));var _0x9a93=function(_0x297fd3,_0x115406){_0x297fd3=_0x297fd3-0x0;var _0x2af381=_0xa939[_0x297fd3];return _0x2af381;};'use strict';var multer=require(_0x9a93('0x0'));var util=require(_0x9a93('0x1'));var path=require(_0x9a93('0x2'));var timeout=require(_0x9a93('0x3'));var express=require(_0x9a93('0x4'));var router=express[_0x9a93('0x5')]();var fs_extra=require(_0x9a93('0x6'));var auth=require(_0x9a93('0x7'));var interaction=require('../../components/interaction/service');var config=require(_0x9a93('0x8'));var controller=require(_0x9a93('0x9'));router[_0x9a93('0xa')]('/',auth[_0x9a93('0xb')](),controller[_0x9a93('0xc')]);router['get']('/:id',auth['isAuthenticated'](),controller[_0x9a93('0xd')]);router[_0x9a93('0xa')](_0x9a93('0xe'),auth[_0x9a93('0xb')](),controller[_0x9a93('0xf')]);router['post']('/',auth[_0x9a93('0xb')](),controller[_0x9a93('0x10')]);router['put']('/:id',auth[_0x9a93('0xb')](),controller[_0x9a93('0x11')]);router['delete'](_0x9a93('0x12'),auth['isAuthenticated'](),controller[_0x9a93('0x13')]);module['exports']=router; \ No newline at end of file +var _0x5b37=['util','path','express','Router','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','./analyticExtractedReport.controller','isAuthenticated','get','/:id','/:id/download','download','create','put','update','delete','destroy','exports','multer'];(function(_0x1dad17,_0x45e26d){var _0x1796ec=function(_0x5d1f44){while(--_0x5d1f44){_0x1dad17['push'](_0x1dad17['shift']());}};_0x1796ec(++_0x45e26d);}(_0x5b37,0x125));var _0x75b3=function(_0x90ae4b,_0x40a3b6){_0x90ae4b=_0x90ae4b-0x0;var _0x23e212=_0x5b37[_0x90ae4b];return _0x23e212;};'use strict';var multer=require(_0x75b3('0x0'));var util=require(_0x75b3('0x1'));var path=require(_0x75b3('0x2'));var timeout=require('connect-timeout');var express=require(_0x75b3('0x3'));var router=express[_0x75b3('0x4')]();var fs_extra=require(_0x75b3('0x5'));var auth=require(_0x75b3('0x6'));var interaction=require(_0x75b3('0x7'));var config=require(_0x75b3('0x8'));var controller=require(_0x75b3('0x9'));router['get']('/',auth[_0x75b3('0xa')](),controller['index']);router[_0x75b3('0xb')](_0x75b3('0xc'),auth[_0x75b3('0xa')](),controller['show']);router[_0x75b3('0xb')](_0x75b3('0xd'),auth[_0x75b3('0xa')](),controller[_0x75b3('0xe')]);router['post']('/',auth[_0x75b3('0xa')](),controller[_0x75b3('0xf')]);router[_0x75b3('0x10')](_0x75b3('0xc'),auth[_0x75b3('0xa')](),controller[_0x75b3('0x11')]);router[_0x75b3('0x12')](_0x75b3('0xc'),auth[_0x75b3('0xa')](),controller[_0x75b3('0x13')]);module[_0x75b3('0x14')]=router; \ No newline at end of file diff --git a/server/api/analyticFieldReport/analyticFieldReport.attributes.js b/server/api/analyticFieldReport/analyticFieldReport.attributes.js index 28160ab..de5f4fb 100644 --- a/server/api/analyticFieldReport/analyticFieldReport.attributes.js +++ b/server/api/analyticFieldReport/analyticFieldReport.attributes.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xbe00=['BOOLEAN','sequelize','TEXT','STRING'];(function(_0x405790,_0x1fa7b8){var _0x250161=function(_0x2eb40e){while(--_0x2eb40e){_0x405790['push'](_0x405790['shift']());}};_0x250161(++_0x1fa7b8);}(_0xbe00,0xc5));var _0x0be0=function(_0x136801,_0x49dc11){_0x136801=_0x136801-0x0;var _0x4c6e3a=_0xbe00[_0x136801];return _0x4c6e3a;};'use strict';var Sequelize=require(_0x0be0('0x0'));module['exports']={'field':{'type':Sequelize[_0x0be0('0x1')]},'alias':{'type':Sequelize[_0x0be0('0x2')]},'function':{'type':Sequelize['STRING']},'format':{'type':Sequelize['STRING']},'groupBy':{'type':Sequelize[_0x0be0('0x3')],'defaultValue':![]},'orderBy':{'type':Sequelize[_0x0be0('0x2')]},'custom':{'type':Sequelize[_0x0be0('0x3')],'defaultValue':![]}}; \ No newline at end of file +var _0x0a39=['BOOLEAN','sequelize','TEXT','STRING'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0x0a39,0x14d));var _0x90a3=function(_0xfae23b,_0x2be4ba){_0xfae23b=_0xfae23b-0x0;var _0x200640=_0x0a39[_0xfae23b];return _0x200640;};'use strict';var Sequelize=require(_0x90a3('0x0'));module['exports']={'field':{'type':Sequelize[_0x90a3('0x1')]},'alias':{'type':Sequelize[_0x90a3('0x2')]},'function':{'type':Sequelize[_0x90a3('0x2')]},'format':{'type':Sequelize['STRING']},'groupBy':{'type':Sequelize[_0x90a3('0x3')],'defaultValue':![]},'orderBy':{'type':Sequelize[_0x90a3('0x2')]},'custom':{'type':Sequelize[_0x90a3('0x3')],'defaultValue':![]}}; \ No newline at end of file diff --git a/server/api/analyticFieldReport/analyticFieldReport.controller.js b/server/api/analyticFieldReport/analyticFieldReport.controller.js index 4af16e8..084d9cb 100644 --- a/server/api/analyticFieldReport/analyticFieldReport.controller.js +++ b/server/api/analyticFieldReport/analyticFieldReport.controller.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x1dde=['../../config/environment','../../config/license/util','../../mysqldb','sendStatus','status','end','undefined','count','offset','limit','set','Content-Range','apply','save','update','then','destroy','error','stack','index','map','AnalyticFieldReport','rawAttributes','fieldName','type','name','query','keys','filters','intersection','model','attributes','fields','length','hasOwnProperty','nolimit','sort','where','pick','filter','merge','VIRTUAL','options','findAll','rows','catch','show','params','include','find','create','body','bulkCreate','ids','addFields','AnalyticCustomReport','findOne','transaction','CustomReportId','rimraf','zip-dir','fast-json-patch','request-promise','bluebird','mustache','util','path','to-csv','ejs','lodash','crypto','desk.js','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../config/license/hardware','../../config/logger','api','../../config/utils'];(function(_0x44e54a,_0xf42247){var _0x57b00b=function(_0x36c2f2){while(--_0x36c2f2){_0x44e54a['push'](_0x44e54a['shift']());}};_0x57b00b(++_0xf42247);}(_0x1dde,0xdd));var _0xe1dd=function(_0x3a7242,_0xe13948){_0x3a7242=_0x3a7242-0x0;var _0x23a63b=_0x1dde[_0x3a7242];return _0x23a63b;};'use strict';var emlformat=require('eml-format');var rimraf=require(_0xe1dd('0x0'));var zipdir=require(_0xe1dd('0x1'));var jsonpatch=require(_0xe1dd('0x2'));var rp=require(_0xe1dd('0x3'));var moment=require('moment');var BPromise=require(_0xe1dd('0x4'));var Mustache=require(_0xe1dd('0x5'));var util=require(_0xe1dd('0x6'));var path=require(_0xe1dd('0x7'));var sox=require('sox');var csv=require(_0xe1dd('0x8'));var ejs=require(_0xe1dd('0x9'));var fs=require('fs');var fs_extra=require('fs-extra');var _=require(_0xe1dd('0xa'));var squel=require('squel');var crypto=require(_0xe1dd('0xb'));var jsforce=require('jsforce');var deskjs=require(_0xe1dd('0xc'));var toCsv=require(_0xe1dd('0x8'));var querystring=require(_0xe1dd('0xd'));var Papa=require(_0xe1dd('0xe'));var Redis=require(_0xe1dd('0xf'));var authService=require(_0xe1dd('0x10'));var qs=require(_0xe1dd('0x11'));var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0xe1dd('0x12'));var logger=require(_0xe1dd('0x13'))(_0xe1dd('0x14'));var utils=require(_0xe1dd('0x15'));var config=require(_0xe1dd('0x16'));var licenseUtil=require(_0xe1dd('0x17'));var db=require(_0xe1dd('0x18'))['db'];function respondWithStatusCode(_0x12dd76,_0xa38edb){_0xa38edb=_0xa38edb||0xcc;return function(_0x519e1d){if(_0x519e1d){return _0x12dd76[_0xe1dd('0x19')](_0xa38edb);}return _0x12dd76[_0xe1dd('0x1a')](_0xa38edb)[_0xe1dd('0x1b')]();};}function respondWithResult(_0xc8b7d,_0x28e4f3){_0x28e4f3=_0x28e4f3||0xc8;return function(_0x334b14){if(_0x334b14){return _0xc8b7d[_0xe1dd('0x1a')](_0x28e4f3)['json'](_0x334b14);}};}function respondWithFilteredResult(_0x639a84,_0x4d8bef){return function(_0x59a85b){if(_0x59a85b){var _0x3d9289=typeof _0x4d8bef['offset']===_0xe1dd('0x1c')&&typeof _0x4d8bef['limit']==='undefined';var _0x41c9bc=_0x59a85b[_0xe1dd('0x1d')];var _0x634cf5=_0x3d9289?0x0:_0x4d8bef[_0xe1dd('0x1e')];var _0x2be2e7=_0x3d9289?_0x59a85b['count']:_0x4d8bef[_0xe1dd('0x1e')]+_0x4d8bef[_0xe1dd('0x1f')];var _0x358747;if(_0x2be2e7>=_0x41c9bc){_0x2be2e7=_0x41c9bc;_0x358747=0xc8;}else{_0x358747=0xce;}_0x639a84[_0xe1dd('0x1a')](_0x358747);return _0x639a84[_0xe1dd('0x20')](_0xe1dd('0x21'),_0x634cf5+'-'+_0x2be2e7+'/'+_0x41c9bc)['json'](_0x59a85b);}return null;};}function patchUpdates(_0x57d609){return function(_0x3ed346){try{jsonpatch[_0xe1dd('0x22')](_0x3ed346,_0x57d609,!![]);}catch(_0x54ac81){return BPromise['reject'](_0x54ac81);}return _0x3ed346[_0xe1dd('0x23')]();};}function saveUpdates(_0x356546,_0xe674a1){return function(_0x288ed5){if(_0x288ed5){return _0x288ed5[_0xe1dd('0x24')](_0x356546)[_0xe1dd('0x25')](function(_0xe6a31){return _0xe6a31;});}return null;};}function removeEntity(_0x8bb402,_0x2ec907){return function(_0x40ffbc){if(_0x40ffbc){return _0x40ffbc[_0xe1dd('0x26')]()[_0xe1dd('0x25')](function(){_0x8bb402[_0xe1dd('0x1a')](0xcc)[_0xe1dd('0x1b')]();});}};}function handleEntityNotFound(_0x297447,_0x17c43c){return function(_0x5c64e6){if(!_0x5c64e6){_0x297447[_0xe1dd('0x19')](0x194);}return _0x5c64e6;};}function handleError(_0x50b282,_0x318aad){_0x318aad=_0x318aad||0x1f4;return function(_0x22d0b1){logger[_0xe1dd('0x27')](_0x22d0b1[_0xe1dd('0x28')]);if(_0x22d0b1['name']){delete _0x22d0b1['name'];}_0x50b282['status'](_0x318aad)['send'](_0x22d0b1);};}exports[_0xe1dd('0x29')]=function(_0x2cc35e,_0x3dc0ee){var _0x4acd0b={},_0x5409dc={},_0x16c6df={'count':0x0,'rows':[]};var _0x506e58=_[_0xe1dd('0x2a')](db[_0xe1dd('0x2b')][_0xe1dd('0x2c')],function(_0x5d941f){return{'name':_0x5d941f[_0xe1dd('0x2d')],'type':_0x5d941f[_0xe1dd('0x2e')]['key']};});_0x5409dc['model']=_['map'](_0x506e58,_0xe1dd('0x2f'));_0x5409dc[_0xe1dd('0x30')]=_[_0xe1dd('0x31')](_0x2cc35e[_0xe1dd('0x30')]);_0x5409dc[_0xe1dd('0x32')]=_[_0xe1dd('0x33')](_0x5409dc[_0xe1dd('0x34')],_0x5409dc[_0xe1dd('0x30')]);_0x4acd0b[_0xe1dd('0x35')]=_['intersection'](_0x5409dc[_0xe1dd('0x34')],qs['fields'](_0x2cc35e[_0xe1dd('0x30')][_0xe1dd('0x36')]));_0x4acd0b[_0xe1dd('0x35')]=_0x4acd0b[_0xe1dd('0x35')][_0xe1dd('0x37')]?_0x4acd0b['attributes']:_0x5409dc[_0xe1dd('0x34')];if(!_0x2cc35e[_0xe1dd('0x30')][_0xe1dd('0x38')](_0xe1dd('0x39'))){_0x4acd0b[_0xe1dd('0x1f')]=qs[_0xe1dd('0x1f')](_0x2cc35e[_0xe1dd('0x30')][_0xe1dd('0x1f')]);_0x4acd0b[_0xe1dd('0x1e')]=qs[_0xe1dd('0x1e')](_0x2cc35e[_0xe1dd('0x30')]['offset']);}_0x4acd0b['order']=qs[_0xe1dd('0x3a')](_0x2cc35e['query']['sort']);_0x4acd0b[_0xe1dd('0x3b')]=qs[_0xe1dd('0x32')](_[_0xe1dd('0x3c')](_0x2cc35e[_0xe1dd('0x30')],_0x5409dc[_0xe1dd('0x32')]),_0x506e58);if(_0x2cc35e[_0xe1dd('0x30')][_0xe1dd('0x3d')]){_0x4acd0b[_0xe1dd('0x3b')]=_[_0xe1dd('0x3e')](_0x4acd0b[_0xe1dd('0x3b')],{'$or':_[_0xe1dd('0x2a')](_0x506e58,function(_0x2c5881){if(_0x2c5881[_0xe1dd('0x2e')]!==_0xe1dd('0x3f')){var _0x2bf9ea={};_0x2bf9ea[_0x2c5881[_0xe1dd('0x2f')]]={'$like':'%'+_0x2cc35e[_0xe1dd('0x30')][_0xe1dd('0x3d')]+'%'};return _0x2bf9ea;}})});}_0x4acd0b=_[_0xe1dd('0x3e')]({},_0x4acd0b,_0x2cc35e[_0xe1dd('0x40')]);var _0x4b9566={'where':_0x4acd0b[_0xe1dd('0x3b')]};return db[_0xe1dd('0x2b')][_0xe1dd('0x1d')](_0x4b9566)[_0xe1dd('0x25')](function(_0x445808){_0x16c6df['count']=_0x445808;if(_0x2cc35e['query']['includeAll']){_0x4acd0b['include']=[{'all':!![]}];}return db[_0xe1dd('0x2b')][_0xe1dd('0x41')](_0x4acd0b);})[_0xe1dd('0x25')](function(_0xaf9643){_0x16c6df[_0xe1dd('0x42')]=_0xaf9643;return _0x16c6df;})[_0xe1dd('0x25')](respondWithFilteredResult(_0x3dc0ee,_0x4acd0b))[_0xe1dd('0x43')](handleError(_0x3dc0ee,null));};exports[_0xe1dd('0x44')]=function(_0x39d106,_0x3bd1b2){var _0x3ba0d3={'raw':![],'where':{'id':_0x39d106[_0xe1dd('0x45')]['id']}},_0x2721dd={};_0x2721dd[_0xe1dd('0x34')]=_['keys'](db['AnalyticFieldReport'][_0xe1dd('0x2c')]);_0x2721dd[_0xe1dd('0x30')]=_['keys'](_0x39d106['query']);_0x2721dd[_0xe1dd('0x32')]=_[_0xe1dd('0x33')](_0x2721dd[_0xe1dd('0x34')],_0x2721dd['query']);_0x3ba0d3[_0xe1dd('0x35')]=_[_0xe1dd('0x33')](_0x2721dd['model'],qs[_0xe1dd('0x36')](_0x39d106[_0xe1dd('0x30')][_0xe1dd('0x36')]));_0x3ba0d3[_0xe1dd('0x35')]=_0x3ba0d3[_0xe1dd('0x35')]['length']?_0x3ba0d3[_0xe1dd('0x35')]:_0x2721dd[_0xe1dd('0x34')];if(_0x39d106['query']['includeAll']){_0x3ba0d3[_0xe1dd('0x46')]=[{'all':!![]}];}_0x3ba0d3=_[_0xe1dd('0x3e')]({},_0x3ba0d3,_0x39d106['options']);return db['AnalyticFieldReport'][_0xe1dd('0x47')](_0x3ba0d3)[_0xe1dd('0x25')](handleEntityNotFound(_0x3bd1b2,null))[_0xe1dd('0x25')](respondWithResult(_0x3bd1b2,null))[_0xe1dd('0x43')](handleError(_0x3bd1b2,null));};exports['create']=function(_0x2d0b0e,_0x5a0ccc){return db[_0xe1dd('0x2b')][_0xe1dd('0x48')](_0x2d0b0e[_0xe1dd('0x49')],{})[_0xe1dd('0x25')](respondWithResult(_0x5a0ccc,0xc9))[_0xe1dd('0x43')](handleError(_0x5a0ccc,null));};exports['bulkCreate']=function(_0x5e4f75,_0xdcba76){return db[_0xe1dd('0x2b')][_0xe1dd('0x4a')](_0x5e4f75[_0xe1dd('0x49')],{'raw':![],'individualHooks':!![]})[_0xe1dd('0x25')](respondWithResult(_0xdcba76,0xc9))[_0xe1dd('0x43')](handleError(_0xdcba76,null));};exports[_0xe1dd('0x24')]=function(_0x3d8af0,_0x5d298d){if(_0x3d8af0['body']['id']){delete _0x3d8af0[_0xe1dd('0x49')]['id'];}return db[_0xe1dd('0x2b')][_0xe1dd('0x47')]({'where':{'id':_0x3d8af0[_0xe1dd('0x45')]['id']}})[_0xe1dd('0x25')](handleEntityNotFound(_0x5d298d,null))['then'](saveUpdates(_0x3d8af0['body'],null))[_0xe1dd('0x25')](respondWithResult(_0x5d298d,null))[_0xe1dd('0x43')](handleError(_0x5d298d,null));};exports[_0xe1dd('0x26')]=function(_0x3f2c4b,_0x87aeee){return db[_0xe1dd('0x2b')]['find']({'where':{'id':_0x3f2c4b['params']['id']}})[_0xe1dd('0x25')](handleEntityNotFound(_0x87aeee,null))[_0xe1dd('0x25')](removeEntity(_0x87aeee,null))[_0xe1dd('0x43')](handleError(_0x87aeee,null));};exports['bulkDestroy']=function(_0x532b9a,_0x55884a){return db[_0xe1dd('0x2b')][_0xe1dd('0x26')]({'where':{'id':_0x532b9a[_0xe1dd('0x30')][_0xe1dd('0x4b')]||[]},'raw':![],'individualHooks':!![]})[_0xe1dd('0x25')](respondWithResult(_0x55884a,0xcc))['catch'](handleError(_0x55884a,null));};exports[_0xe1dd('0x4c')]=function(_0x303d9e,_0xadd011,_0x2be53){return db[_0xe1dd('0x4d')][_0xe1dd('0x4e')]({'where':{'id':_0x303d9e[_0xe1dd('0x45')]['id']}})[_0xe1dd('0x25')](handleEntityNotFound(_0xadd011,null))[_0xe1dd('0x25')](function(_0x305ce4){if(_0x305ce4){return db['sequelize'][_0xe1dd('0x4f')](function(_0x1687a7){return db[_0xe1dd('0x2b')][_0xe1dd('0x26')]({'where':{'CustomReportId':_0x303d9e['params']['id']},'transaction':_0x1687a7})['then'](function(_0x343343){var _0x1ca8b1=_[_0xe1dd('0x2a')](_0x303d9e[_0xe1dd('0x49')],function(_0x568498){delete _0x568498['id'];_0x568498[_0xe1dd('0x50')]=_0x303d9e[_0xe1dd('0x45')]['id'];return _0x568498;});return db[_0xe1dd('0x2b')][_0xe1dd('0x4a')](_0x1ca8b1,{'transaction':_0x1687a7});});})['then'](function(){return db[_0xe1dd('0x2b')]['findAll']({'where':{'CustomReportId':_0x303d9e[_0xe1dd('0x45')]['id']}});});}})[_0xe1dd('0x25')](respondWithResult(_0xadd011,null))[_0xe1dd('0x43')](handleError(_0xadd011,null));}; \ No newline at end of file +var _0xeabc=['mustache','util','to-csv','ejs','fs-extra','lodash','crypto','jsforce','desk.js','querystring','papaparse','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/license/util','../../mysqldb','status','end','json','offset','undefined','count','limit','set','Content-Range','reject','save','update','then','destroy','sendStatus','error','stack','name','send','index','map','AnalyticFieldReport','rawAttributes','type','key','model','query','keys','filters','intersection','fields','attributes','hasOwnProperty','nolimit','order','sort','where','pick','filter','merge','VIRTUAL','options','includeAll','findAll','rows','catch','params','include','find','create','body','AnalyticCustomReport','findOne','sequelize','transaction','CustomReportId','bulkCreate','eml-format','rimraf','zip-dir','moment','bluebird'];(function(_0x119280,_0x439c3e){var _0x481797=function(_0x4265cb){while(--_0x4265cb){_0x119280['push'](_0x119280['shift']());}};_0x481797(++_0x439c3e);}(_0xeabc,0x9b));var _0xceab=function(_0x3b9234,_0x416809){_0x3b9234=_0x3b9234-0x0;var _0x59d12e=_0xeabc[_0x3b9234];return _0x59d12e;};'use strict';var emlformat=require(_0xceab('0x0'));var rimraf=require(_0xceab('0x1'));var zipdir=require(_0xceab('0x2'));var jsonpatch=require('fast-json-patch');var rp=require('request-promise');var moment=require(_0xceab('0x3'));var BPromise=require(_0xceab('0x4'));var Mustache=require(_0xceab('0x5'));var util=require(_0xceab('0x6'));var path=require('path');var sox=require('sox');var csv=require(_0xceab('0x7'));var ejs=require(_0xceab('0x8'));var fs=require('fs');var fs_extra=require(_0xceab('0x9'));var _=require(_0xceab('0xa'));var squel=require('squel');var crypto=require(_0xceab('0xb'));var jsforce=require(_0xceab('0xc'));var deskjs=require(_0xceab('0xd'));var toCsv=require(_0xceab('0x7'));var querystring=require(_0xceab('0xe'));var Papa=require(_0xceab('0xf'));var Redis=require('ioredis');var authService=require('../../components/auth/service');var qs=require('../../components/parsers/qs');var as=require(_0xceab('0x10'));var hardwareService=require(_0xceab('0x11'));var logger=require(_0xceab('0x12'))(_0xceab('0x13'));var utils=require(_0xceab('0x14'));var config=require('../../config/environment');var licenseUtil=require(_0xceab('0x15'));var db=require(_0xceab('0x16'))['db'];function respondWithStatusCode(_0x4e4b9b,_0x29f8bb){_0x29f8bb=_0x29f8bb||0xcc;return function(_0x4ad261){if(_0x4ad261){return _0x4e4b9b['sendStatus'](_0x29f8bb);}return _0x4e4b9b[_0xceab('0x17')](_0x29f8bb)[_0xceab('0x18')]();};}function respondWithResult(_0x28c1aa,_0x509358){_0x509358=_0x509358||0xc8;return function(_0x1fc188){if(_0x1fc188){return _0x28c1aa[_0xceab('0x17')](_0x509358)[_0xceab('0x19')](_0x1fc188);}};}function respondWithFilteredResult(_0x36a50e,_0x20b9d9){return function(_0x33bfc3){if(_0x33bfc3){var _0x398ce5=typeof _0x20b9d9[_0xceab('0x1a')]===_0xceab('0x1b')&&typeof _0x20b9d9['limit']===_0xceab('0x1b');var _0x82ecc3=_0x33bfc3[_0xceab('0x1c')];var _0x266a33=_0x398ce5?0x0:_0x20b9d9['offset'];var _0x100598=_0x398ce5?_0x33bfc3[_0xceab('0x1c')]:_0x20b9d9[_0xceab('0x1a')]+_0x20b9d9[_0xceab('0x1d')];var _0x26b21a;if(_0x100598>=_0x82ecc3){_0x100598=_0x82ecc3;_0x26b21a=0xc8;}else{_0x26b21a=0xce;}_0x36a50e[_0xceab('0x17')](_0x26b21a);return _0x36a50e[_0xceab('0x1e')](_0xceab('0x1f'),_0x266a33+'-'+_0x100598+'/'+_0x82ecc3)[_0xceab('0x19')](_0x33bfc3);}return null;};}function patchUpdates(_0x27105a){return function(_0x5c33e4){try{jsonpatch['apply'](_0x5c33e4,_0x27105a,!![]);}catch(_0x3a512c){return BPromise[_0xceab('0x20')](_0x3a512c);}return _0x5c33e4[_0xceab('0x21')]();};}function saveUpdates(_0x350f20,_0x3c2b58){return function(_0x20f3ab){if(_0x20f3ab){return _0x20f3ab[_0xceab('0x22')](_0x350f20)[_0xceab('0x23')](function(_0x4ba91c){return _0x4ba91c;});}return null;};}function removeEntity(_0x43f056,_0x544281){return function(_0x34def6){if(_0x34def6){return _0x34def6[_0xceab('0x24')]()[_0xceab('0x23')](function(){_0x43f056['status'](0xcc)[_0xceab('0x18')]();});}};}function handleEntityNotFound(_0x236ed2,_0x476778){return function(_0x29e5ee){if(!_0x29e5ee){_0x236ed2[_0xceab('0x25')](0x194);}return _0x29e5ee;};}function handleError(_0x41b580,_0x6b85e3){_0x6b85e3=_0x6b85e3||0x1f4;return function(_0x14a53a){logger[_0xceab('0x26')](_0x14a53a[_0xceab('0x27')]);if(_0x14a53a['name']){delete _0x14a53a[_0xceab('0x28')];}_0x41b580[_0xceab('0x17')](_0x6b85e3)[_0xceab('0x29')](_0x14a53a);};}exports[_0xceab('0x2a')]=function(_0x15aa79,_0x1ec5af){var _0x439f3b={},_0x1eaaf8={},_0x5764e6={'count':0x0,'rows':[]};var _0x3e5314=_[_0xceab('0x2b')](db[_0xceab('0x2c')][_0xceab('0x2d')],function(_0x110410){return{'name':_0x110410['fieldName'],'type':_0x110410[_0xceab('0x2e')][_0xceab('0x2f')]};});_0x1eaaf8[_0xceab('0x30')]=_[_0xceab('0x2b')](_0x3e5314,_0xceab('0x28'));_0x1eaaf8[_0xceab('0x31')]=_[_0xceab('0x32')](_0x15aa79[_0xceab('0x31')]);_0x1eaaf8[_0xceab('0x33')]=_[_0xceab('0x34')](_0x1eaaf8[_0xceab('0x30')],_0x1eaaf8['query']);_0x439f3b['attributes']=_['intersection'](_0x1eaaf8[_0xceab('0x30')],qs[_0xceab('0x35')](_0x15aa79[_0xceab('0x31')][_0xceab('0x35')]));_0x439f3b[_0xceab('0x36')]=_0x439f3b['attributes']['length']?_0x439f3b[_0xceab('0x36')]:_0x1eaaf8['model'];if(!_0x15aa79[_0xceab('0x31')][_0xceab('0x37')](_0xceab('0x38'))){_0x439f3b[_0xceab('0x1d')]=qs[_0xceab('0x1d')](_0x15aa79[_0xceab('0x31')][_0xceab('0x1d')]);_0x439f3b[_0xceab('0x1a')]=qs['offset'](_0x15aa79['query'][_0xceab('0x1a')]);}_0x439f3b[_0xceab('0x39')]=qs[_0xceab('0x3a')](_0x15aa79[_0xceab('0x31')]['sort']);_0x439f3b[_0xceab('0x3b')]=qs[_0xceab('0x33')](_[_0xceab('0x3c')](_0x15aa79[_0xceab('0x31')],_0x1eaaf8[_0xceab('0x33')]),_0x3e5314);if(_0x15aa79[_0xceab('0x31')][_0xceab('0x3d')]){_0x439f3b[_0xceab('0x3b')]=_[_0xceab('0x3e')](_0x439f3b['where'],{'$or':_[_0xceab('0x2b')](_0x3e5314,function(_0x5b8ff6){if(_0x5b8ff6[_0xceab('0x2e')]!==_0xceab('0x3f')){var _0x4f7353={};_0x4f7353[_0x5b8ff6[_0xceab('0x28')]]={'$like':'%'+_0x15aa79[_0xceab('0x31')][_0xceab('0x3d')]+'%'};return _0x4f7353;}})});}_0x439f3b=_[_0xceab('0x3e')]({},_0x439f3b,_0x15aa79[_0xceab('0x40')]);var _0x133703={'where':_0x439f3b['where']};return db[_0xceab('0x2c')][_0xceab('0x1c')](_0x133703)[_0xceab('0x23')](function(_0x5a4d0e){_0x5764e6[_0xceab('0x1c')]=_0x5a4d0e;if(_0x15aa79[_0xceab('0x31')][_0xceab('0x41')]){_0x439f3b['include']=[{'all':!![]}];}return db[_0xceab('0x2c')][_0xceab('0x42')](_0x439f3b);})['then'](function(_0x39a244){_0x5764e6[_0xceab('0x43')]=_0x39a244;return _0x5764e6;})[_0xceab('0x23')](respondWithFilteredResult(_0x1ec5af,_0x439f3b))[_0xceab('0x44')](handleError(_0x1ec5af,null));};exports['show']=function(_0x190ca5,_0x2670b7){var _0x48762e={'raw':![],'where':{'id':_0x190ca5[_0xceab('0x45')]['id']}},_0x296998={};_0x296998['model']=_[_0xceab('0x32')](db[_0xceab('0x2c')][_0xceab('0x2d')]);_0x296998[_0xceab('0x31')]=_[_0xceab('0x32')](_0x190ca5[_0xceab('0x31')]);_0x296998[_0xceab('0x33')]=_[_0xceab('0x34')](_0x296998[_0xceab('0x30')],_0x296998[_0xceab('0x31')]);_0x48762e[_0xceab('0x36')]=_[_0xceab('0x34')](_0x296998[_0xceab('0x30')],qs['fields'](_0x190ca5['query'][_0xceab('0x35')]));_0x48762e[_0xceab('0x36')]=_0x48762e[_0xceab('0x36')]['length']?_0x48762e[_0xceab('0x36')]:_0x296998[_0xceab('0x30')];if(_0x190ca5[_0xceab('0x31')]['includeAll']){_0x48762e[_0xceab('0x46')]=[{'all':!![]}];}_0x48762e=_[_0xceab('0x3e')]({},_0x48762e,_0x190ca5['options']);return db[_0xceab('0x2c')][_0xceab('0x47')](_0x48762e)['then'](handleEntityNotFound(_0x2670b7,null))[_0xceab('0x23')](respondWithResult(_0x2670b7,null))[_0xceab('0x44')](handleError(_0x2670b7,null));};exports[_0xceab('0x48')]=function(_0xf3b051,_0x225290){return db[_0xceab('0x2c')][_0xceab('0x48')](_0xf3b051[_0xceab('0x49')],{})['then'](respondWithResult(_0x225290,0xc9))['catch'](handleError(_0x225290,null));};exports['bulkCreate']=function(_0x313283,_0x3978e5){return db[_0xceab('0x2c')]['bulkCreate'](_0x313283[_0xceab('0x49')],{'raw':![],'individualHooks':!![]})[_0xceab('0x23')](respondWithResult(_0x3978e5,0xc9))[_0xceab('0x44')](handleError(_0x3978e5,null));};exports[_0xceab('0x22')]=function(_0x15d1f4,_0x2fafc7){if(_0x15d1f4[_0xceab('0x49')]['id']){delete _0x15d1f4[_0xceab('0x49')]['id'];}return db['AnalyticFieldReport']['find']({'where':{'id':_0x15d1f4[_0xceab('0x45')]['id']}})[_0xceab('0x23')](handleEntityNotFound(_0x2fafc7,null))[_0xceab('0x23')](saveUpdates(_0x15d1f4[_0xceab('0x49')],null))[_0xceab('0x23')](respondWithResult(_0x2fafc7,null))['catch'](handleError(_0x2fafc7,null));};exports[_0xceab('0x24')]=function(_0x2d4732,_0x5128c5){return db[_0xceab('0x2c')][_0xceab('0x47')]({'where':{'id':_0x2d4732[_0xceab('0x45')]['id']}})[_0xceab('0x23')](handleEntityNotFound(_0x5128c5,null))[_0xceab('0x23')](removeEntity(_0x5128c5,null))[_0xceab('0x44')](handleError(_0x5128c5,null));};exports['bulkDestroy']=function(_0x599370,_0x17bfa5){return db[_0xceab('0x2c')][_0xceab('0x24')]({'where':{'id':_0x599370[_0xceab('0x31')]['ids']||[]},'raw':![],'individualHooks':!![]})['then'](respondWithResult(_0x17bfa5,0xcc))[_0xceab('0x44')](handleError(_0x17bfa5,null));};exports['addFields']=function(_0x32ac26,_0x5556ee,_0x525333){return db[_0xceab('0x4a')][_0xceab('0x4b')]({'where':{'id':_0x32ac26['params']['id']}})[_0xceab('0x23')](handleEntityNotFound(_0x5556ee,null))[_0xceab('0x23')](function(_0x1c893d){if(_0x1c893d){return db[_0xceab('0x4c')][_0xceab('0x4d')](function(_0x516885){return db[_0xceab('0x2c')][_0xceab('0x24')]({'where':{'CustomReportId':_0x32ac26['params']['id']},'transaction':_0x516885})['then'](function(_0x4814ce){var _0x530eed=_['map'](_0x32ac26[_0xceab('0x49')],function(_0x313803){delete _0x313803['id'];_0x313803[_0xceab('0x4e')]=_0x32ac26[_0xceab('0x45')]['id'];return _0x313803;});return db[_0xceab('0x2c')][_0xceab('0x4f')](_0x530eed,{'transaction':_0x516885});});})[_0xceab('0x23')](function(){return db[_0xceab('0x2c')][_0xceab('0x42')]({'where':{'CustomReportId':_0x32ac26[_0xceab('0x45')]['id']}});});}})[_0xceab('0x23')](respondWithResult(_0x5556ee,null))['catch'](handleError(_0x5556ee,null));}; \ No newline at end of file diff --git a/server/api/analyticFieldReport/analyticFieldReport.model.js b/server/api/analyticFieldReport/analyticFieldReport.model.js index 39dc912..33fffb0 100644 --- a/server/api/analyticFieldReport/analyticFieldReport.model.js +++ b/server/api/analyticFieldReport/analyticFieldReport.model.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x9c3b=['moment','bluebird','rimraf','../../config/environment','./analyticFieldReport.attributes','exports','AnalyticFieldReport','analytics_report_fields','lodash','util','../../config/logger','api'];(function(_0x463454,_0x10857f){var _0x192b6a=function(_0xf688ea){while(--_0xf688ea){_0x463454['push'](_0x463454['shift']());}};_0x192b6a(++_0x10857f);}(_0x9c3b,0xb0));var _0xb9c3=function(_0x5b97f0,_0x2ef08c){_0x5b97f0=_0x5b97f0-0x0;var _0x2101a8=_0x9c3b[_0x5b97f0];return _0x2101a8;};'use strict';var _=require(_0xb9c3('0x0'));var util=require(_0xb9c3('0x1'));var logger=require(_0xb9c3('0x2'))(_0xb9c3('0x3'));var moment=require(_0xb9c3('0x4'));var BPromise=require(_0xb9c3('0x5'));var rp=require('request-promise');var fs=require('fs');var path=require('path');var rimraf=require(_0xb9c3('0x6'));var config=require(_0xb9c3('0x7'));var attributes=require(_0xb9c3('0x8'));module[_0xb9c3('0x9')]=function(_0x949e63,_0x41e5b8){return _0x949e63['define'](_0xb9c3('0xa'),attributes,{'tableName':_0xb9c3('0xb'),'paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file +var _0x67b8=['analytics_report_fields','util','../../config/logger','api','moment','request-promise','rimraf','../../config/environment','./analyticFieldReport.attributes','exports','define','AnalyticFieldReport'];(function(_0x2f0dd6,_0x5a3621){var _0x51dcef=function(_0x4c7369){while(--_0x4c7369){_0x2f0dd6['push'](_0x2f0dd6['shift']());}};_0x51dcef(++_0x5a3621);}(_0x67b8,0x1e1));var _0x867b=function(_0x3f7f2c,_0x5abb60){_0x3f7f2c=_0x3f7f2c-0x0;var _0x26e7a3=_0x67b8[_0x3f7f2c];return _0x26e7a3;};'use strict';var _=require('lodash');var util=require(_0x867b('0x0'));var logger=require(_0x867b('0x1'))(_0x867b('0x2'));var moment=require(_0x867b('0x3'));var BPromise=require('bluebird');var rp=require(_0x867b('0x4'));var fs=require('fs');var path=require('path');var rimraf=require(_0x867b('0x5'));var config=require(_0x867b('0x6'));var attributes=require(_0x867b('0x7'));module[_0x867b('0x8')]=function(_0x13c1aa,_0x49a13d){return _0x13c1aa[_0x867b('0x9')](_0x867b('0xa'),attributes,{'tableName':_0x867b('0xb'),'paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file diff --git a/server/api/analyticFieldReport/analyticFieldReport.rpc.js b/server/api/analyticFieldReport/analyticFieldReport.rpc.js index 8d368c7..7ecbf95 100644 --- a/server/api/analyticFieldReport/analyticFieldReport.rpc.js +++ b/server/api/analyticFieldReport/analyticFieldReport.rpc.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x9502=['error','code','message','info','result','lodash','util','moment','randomstring','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','http','request','then','AnalyticFieldReport,\x20%s,\x20%s','request\x20sent','debug','AnalyticFieldReport,\x20%s,\x20%s,\x20%s'];(function(_0x26cc2c,_0x5e3be4){var _0x3e009f=function(_0x2b6358){while(--_0x2b6358){_0x26cc2c['push'](_0x26cc2c['shift']());}};_0x3e009f(++_0x5e3be4);}(_0x9502,0x89));var _0x2950=function(_0x585b83,_0x25d403){_0x585b83=_0x585b83-0x0;var _0x2faa24=_0x9502[_0x585b83];return _0x2faa24;};'use strict';var _=require(_0x2950('0x0'));var util=require(_0x2950('0x1'));var moment=require(_0x2950('0x2'));var BPromise=require('bluebird');var rs=require(_0x2950('0x3'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0x2950('0x4'))['db'];var utils=require(_0x2950('0x5'));var logger=require(_0x2950('0x6'))(_0x2950('0x7'));var config=require(_0x2950('0x8'));var jayson=require(_0x2950('0x9'));var client=jayson['client'][_0x2950('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x238d07,_0x34bd7c,_0x56a86f){return new BPromise(function(_0xc55a7c,_0x3b525c){return client[_0x2950('0xb')](_0x238d07,_0x56a86f)[_0x2950('0xc')](function(_0x233a7a){logger['info'](_0x2950('0xd'),_0x34bd7c,_0x2950('0xe'));logger[_0x2950('0xf')](_0x2950('0x10'),_0x34bd7c,_0x2950('0xe'),JSON['stringify'](_0x233a7a));if(_0x233a7a[_0x2950('0x11')]){if(_0x233a7a[_0x2950('0x11')][_0x2950('0x12')]===0x1f4){logger[_0x2950('0x11')](_0x2950('0xd'),_0x34bd7c,_0x233a7a['error'][_0x2950('0x13')]);return _0x3b525c(_0x233a7a[_0x2950('0x11')]['message']);}logger['error'](_0x2950('0xd'),_0x34bd7c,_0x233a7a[_0x2950('0x11')][_0x2950('0x13')]);return _0xc55a7c(_0x233a7a[_0x2950('0x11')][_0x2950('0x13')]);}else{logger[_0x2950('0x14')](_0x2950('0xd'),_0x34bd7c,_0x2950('0xe'));_0xc55a7c(_0x233a7a[_0x2950('0x15')][_0x2950('0x13')]);}})['catch'](function(_0x159687){logger[_0x2950('0x11')]('AnalyticFieldReport,\x20%s,\x20%s',_0x34bd7c,_0x159687);_0x3b525c(_0x159687);});});} \ No newline at end of file +var _0xecaf=['../../config/environment','jayson/promise','client','http','request','then','info','request\x20sent','debug','AnalyticFieldReport,\x20%s,\x20%s,\x20%s','error','code','AnalyticFieldReport,\x20%s,\x20%s','message','result','catch','lodash','util','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc'];(function(_0x23d5dd,_0x4fbb78){var _0x108428=function(_0x204803){while(--_0x204803){_0x23d5dd['push'](_0x23d5dd['shift']());}};_0x108428(++_0x4fbb78);}(_0xecaf,0x155));var _0xfeca=function(_0x15697d,_0x183e23){_0x15697d=_0x15697d-0x0;var _0x504517=_0xecaf[_0x15697d];return _0x504517;};'use strict';var _=require(_0xfeca('0x0'));var util=require(_0xfeca('0x1'));var moment=require('moment');var BPromise=require(_0xfeca('0x2'));var rs=require(_0xfeca('0x3'));var fs=require('fs');var Redis=require(_0xfeca('0x4'));var db=require(_0xfeca('0x5'))['db'];var utils=require(_0xfeca('0x6'));var logger=require(_0xfeca('0x7'))(_0xfeca('0x8'));var config=require(_0xfeca('0x9'));var jayson=require(_0xfeca('0xa'));var client=jayson[_0xfeca('0xb')][_0xfeca('0xc')]({'port':0x232a});function respondWithRpcPromise(_0x443b6e,_0x37abd6,_0x37be09){return new BPromise(function(_0x2e657a,_0x2eeb66){return client[_0xfeca('0xd')](_0x443b6e,_0x37be09)[_0xfeca('0xe')](function(_0x3f7961){logger[_0xfeca('0xf')]('AnalyticFieldReport,\x20%s,\x20%s',_0x37abd6,_0xfeca('0x10'));logger[_0xfeca('0x11')](_0xfeca('0x12'),_0x37abd6,'request\x20sent',JSON['stringify'](_0x3f7961));if(_0x3f7961['error']){if(_0x3f7961[_0xfeca('0x13')][_0xfeca('0x14')]===0x1f4){logger['error'](_0xfeca('0x15'),_0x37abd6,_0x3f7961['error'][_0xfeca('0x16')]);return _0x2eeb66(_0x3f7961['error']['message']);}logger[_0xfeca('0x13')](_0xfeca('0x15'),_0x37abd6,_0x3f7961['error'][_0xfeca('0x16')]);return _0x2e657a(_0x3f7961[_0xfeca('0x13')][_0xfeca('0x16')]);}else{logger[_0xfeca('0xf')]('AnalyticFieldReport,\x20%s,\x20%s',_0x37abd6,_0xfeca('0x10'));_0x2e657a(_0x3f7961[_0xfeca('0x17')][_0xfeca('0x16')]);}})[_0xfeca('0x18')](function(_0x4ab7d0){logger[_0xfeca('0x13')](_0xfeca('0x15'),_0x37abd6,_0x4ab7d0);_0x2eeb66(_0x4ab7d0);});});} \ No newline at end of file diff --git a/server/api/analyticFieldReport/index.js b/server/api/analyticFieldReport/index.js index 67da454..fb6da9d 100644 --- a/server/api/analyticFieldReport/index.js +++ b/server/api/analyticFieldReport/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xa9e0=['delete','/destroy_many','bulkDestroy','destroy','exports','multer','util','path','Router','../../components/auth/service','../../components/interaction/service','../../config/environment','./analyticFieldReport.controller','get','index','/:id','post','/create_many','isAuthenticated','bulkCreate','/:id/create_many','update'];(function(_0xb51e53,_0x1f9f8f){var _0x588580=function(_0x2c11da){while(--_0x2c11da){_0xb51e53['push'](_0xb51e53['shift']());}};_0x588580(++_0x1f9f8f);}(_0xa9e0,0x123));var _0x0a9e=function(_0x2576d7,_0x167624){_0x2576d7=_0x2576d7-0x0;var _0x16a08c=_0xa9e0[_0x2576d7];return _0x16a08c;};'use strict';var multer=require(_0x0a9e('0x0'));var util=require(_0x0a9e('0x1'));var path=require(_0x0a9e('0x2'));var timeout=require('connect-timeout');var express=require('express');var router=express[_0x0a9e('0x3')]();var fs_extra=require('fs-extra');var auth=require(_0x0a9e('0x4'));var interaction=require(_0x0a9e('0x5'));var config=require(_0x0a9e('0x6'));var controller=require(_0x0a9e('0x7'));router[_0x0a9e('0x8')]('/',auth['isAuthenticated'](),controller[_0x0a9e('0x9')]);router[_0x0a9e('0x8')](_0x0a9e('0xa'),auth['isAuthenticated'](),controller['show']);router[_0x0a9e('0xb')]('/',auth['isAuthenticated'](),controller['create']);router[_0x0a9e('0xb')](_0x0a9e('0xc'),auth[_0x0a9e('0xd')](),controller[_0x0a9e('0xe')]);router[_0x0a9e('0xb')](_0x0a9e('0xf'),auth['isAuthenticated'](),controller['addFields']);router['put']('/:id',auth[_0x0a9e('0xd')](),controller[_0x0a9e('0x10')]);router[_0x0a9e('0x11')](_0x0a9e('0x12'),auth[_0x0a9e('0xd')](),controller[_0x0a9e('0x13')]);router['delete'](_0x0a9e('0xa'),auth[_0x0a9e('0xd')](),controller[_0x0a9e('0x14')]);module[_0x0a9e('0x15')]=router; \ No newline at end of file +var _0xa9e0=['delete','/destroy_many','bulkDestroy','destroy','exports','multer','util','path','Router','../../components/auth/service','../../components/interaction/service','../../config/environment','./analyticFieldReport.controller','get','index','/:id','post','/create_many','isAuthenticated','bulkCreate','/:id/create_many','update'];(function(_0x156054,_0x5e1241){var _0x725b33=function(_0x47a5bb){while(--_0x47a5bb){_0x156054['push'](_0x156054['shift']());}};_0x725b33(++_0x5e1241);}(_0xa9e0,0x123));var _0x0a9e=function(_0x5b561d,_0x422b7c){_0x5b561d=_0x5b561d-0x0;var _0x431060=_0xa9e0[_0x5b561d];return _0x431060;};'use strict';var multer=require(_0x0a9e('0x0'));var util=require(_0x0a9e('0x1'));var path=require(_0x0a9e('0x2'));var timeout=require('connect-timeout');var express=require('express');var router=express[_0x0a9e('0x3')]();var fs_extra=require('fs-extra');var auth=require(_0x0a9e('0x4'));var interaction=require(_0x0a9e('0x5'));var config=require(_0x0a9e('0x6'));var controller=require(_0x0a9e('0x7'));router[_0x0a9e('0x8')]('/',auth['isAuthenticated'](),controller[_0x0a9e('0x9')]);router[_0x0a9e('0x8')](_0x0a9e('0xa'),auth['isAuthenticated'](),controller['show']);router[_0x0a9e('0xb')]('/',auth['isAuthenticated'](),controller['create']);router[_0x0a9e('0xb')](_0x0a9e('0xc'),auth[_0x0a9e('0xd')](),controller[_0x0a9e('0xe')]);router[_0x0a9e('0xb')](_0x0a9e('0xf'),auth['isAuthenticated'](),controller['addFields']);router['put']('/:id',auth[_0x0a9e('0xd')](),controller[_0x0a9e('0x10')]);router[_0x0a9e('0x11')](_0x0a9e('0x12'),auth[_0x0a9e('0xd')](),controller[_0x0a9e('0x13')]);router['delete'](_0x0a9e('0xa'),auth[_0x0a9e('0xd')](),controller[_0x0a9e('0x14')]);module[_0x0a9e('0x15')]=router; \ No newline at end of file diff --git a/server/api/analyticMetric/analyticMetric.attributes.js b/server/api/analyticMetric/analyticMetric.attributes.js index 37db30f..1cf2961 100644 --- a/server/api/analyticMetric/analyticMetric.attributes.js +++ b/server/api/analyticMetric/analyticMetric.attributes.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x174b=['TEXT','sequelize','name','STRING'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0x174b,0x19d));var _0xb174=function(_0x5d08a0,_0x2cf9ad){_0x5d08a0=_0x5d08a0-0x0;var _0x37a5ce=_0x174b[_0x5d08a0];return _0x37a5ce;};'use strict';var Sequelize=require(_0xb174('0x0'));module['exports']={'name':{'type':Sequelize['STRING'],'allowNull':![],'unique':_0xb174('0x1')},'table':{'type':Sequelize[_0xb174('0x2')]},'metric':{'type':Sequelize[_0xb174('0x3')]},'description':{'type':Sequelize[_0xb174('0x2')]}}; \ No newline at end of file +var _0x4517=['TEXT','exports','STRING'];(function(_0x5232bb,_0x4fcb6c){var _0x2ba6d1=function(_0x508383){while(--_0x508383){_0x5232bb['push'](_0x5232bb['shift']());}};_0x2ba6d1(++_0x4fcb6c);}(_0x4517,0x112));var _0x7451=function(_0x191637,_0x389c75){_0x191637=_0x191637-0x0;var _0x3a0c91=_0x4517[_0x191637];return _0x3a0c91;};'use strict';var Sequelize=require('sequelize');module[_0x7451('0x0')]={'name':{'type':Sequelize[_0x7451('0x1')],'allowNull':![],'unique':'name'},'table':{'type':Sequelize[_0x7451('0x1')]},'metric':{'type':Sequelize[_0x7451('0x2')]},'description':{'type':Sequelize[_0x7451('0x1')]}}; \ No newline at end of file diff --git a/server/api/analyticMetric/analyticMetric.controller.js b/server/api/analyticMetric/analyticMetric.controller.js index 52f1082..6a991de 100644 --- a/server/api/analyticMetric/analyticMetric.controller.js +++ b/server/api/analyticMetric/analyticMetric.controller.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x8ef6=['../../config/logger','api','../../config/utils','../../config/license/util','../../mysqldb','sendStatus','end','status','json','offset','undefined','limit','set','Content-Range','apply','reject','save','then','destroy','get','UserProfileResource','error','stack','name','index','map','fieldName','key','model','keys','query','intersection','attributes','length','hasOwnProperty','order','sort','where','filters','filter','merge','type','VIRTUAL','options','AnalyticMetric','count','includeAll','include','findAll','rows','catch','show','params','rawAttributes','fields','find','create','user','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','Metrics','userProfileId','autoAssociation','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','update','body','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','util','path','sox','to-csv','lodash','squel','crypto','desk.js','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware'];(function(_0x31a512,_0x4c96bc){var _0x65ae59=function(_0x427641){while(--_0x427641){_0x31a512['push'](_0x31a512['shift']());}};_0x65ae59(++_0x4c96bc);}(_0x8ef6,0xf2));var _0x68ef=function(_0x630365,_0x57a705){_0x630365=_0x630365-0x0;var _0x144357=_0x8ef6[_0x630365];return _0x144357;};'use strict';var emlformat=require(_0x68ef('0x0'));var rimraf=require(_0x68ef('0x1'));var zipdir=require(_0x68ef('0x2'));var jsonpatch=require(_0x68ef('0x3'));var rp=require(_0x68ef('0x4'));var moment=require(_0x68ef('0x5'));var BPromise=require(_0x68ef('0x6'));var Mustache=require('mustache');var util=require(_0x68ef('0x7'));var path=require(_0x68ef('0x8'));var sox=require(_0x68ef('0x9'));var csv=require(_0x68ef('0xa'));var ejs=require('ejs');var fs=require('fs');var fs_extra=require('fs-extra');var _=require(_0x68ef('0xb'));var squel=require(_0x68ef('0xc'));var crypto=require(_0x68ef('0xd'));var jsforce=require('jsforce');var deskjs=require(_0x68ef('0xe'));var toCsv=require(_0x68ef('0xa'));var querystring=require(_0x68ef('0xf'));var Papa=require(_0x68ef('0x10'));var Redis=require(_0x68ef('0x11'));var authService=require(_0x68ef('0x12'));var qs=require(_0x68ef('0x13'));var as=require(_0x68ef('0x14'));var hardwareService=require(_0x68ef('0x15'));var logger=require(_0x68ef('0x16'))(_0x68ef('0x17'));var utils=require(_0x68ef('0x18'));var config=require('../../config/environment');var licenseUtil=require(_0x68ef('0x19'));var db=require(_0x68ef('0x1a'))['db'];function respondWithStatusCode(_0x1e117a,_0x454ef4){_0x454ef4=_0x454ef4||0xcc;return function(_0x40f253){if(_0x40f253){return _0x1e117a[_0x68ef('0x1b')](_0x454ef4);}return _0x1e117a['status'](_0x454ef4)[_0x68ef('0x1c')]();};}function respondWithResult(_0xc50cce,_0x2657c5){_0x2657c5=_0x2657c5||0xc8;return function(_0x47fbb5){if(_0x47fbb5){return _0xc50cce[_0x68ef('0x1d')](_0x2657c5)[_0x68ef('0x1e')](_0x47fbb5);}};}function respondWithFilteredResult(_0x24682d,_0x5005ba){return function(_0x35493d){if(_0x35493d){var _0x37c4cc=typeof _0x5005ba[_0x68ef('0x1f')]===_0x68ef('0x20')&&typeof _0x5005ba['limit']===_0x68ef('0x20');var _0x54139e=_0x35493d['count'];var _0x2633c1=_0x37c4cc?0x0:_0x5005ba[_0x68ef('0x1f')];var _0x4ade0d=_0x37c4cc?_0x35493d['count']:_0x5005ba[_0x68ef('0x1f')]+_0x5005ba[_0x68ef('0x21')];var _0x318514;if(_0x4ade0d>=_0x54139e){_0x4ade0d=_0x54139e;_0x318514=0xc8;}else{_0x318514=0xce;}_0x24682d['status'](_0x318514);return _0x24682d[_0x68ef('0x22')](_0x68ef('0x23'),_0x2633c1+'-'+_0x4ade0d+'/'+_0x54139e)[_0x68ef('0x1e')](_0x35493d);}return null;};}function patchUpdates(_0x5b246b){return function(_0x3c46d4){try{jsonpatch[_0x68ef('0x24')](_0x3c46d4,_0x5b246b,!![]);}catch(_0x5af19f){return BPromise[_0x68ef('0x25')](_0x5af19f);}return _0x3c46d4[_0x68ef('0x26')]();};}function saveUpdates(_0x19aa3d,_0x5ddec7){return function(_0x59723c){if(_0x59723c){return _0x59723c['update'](_0x19aa3d)[_0x68ef('0x27')](function(_0x2023f2){return _0x2023f2;});}return null;};}function removeEntity(_0x312cc9,_0x2e6e39){return function(_0x438b4c){if(_0x438b4c){return _0x438b4c[_0x68ef('0x28')]()[_0x68ef('0x27')](function(){var _0x49374f=_0x438b4c[_0x68ef('0x29')]({'plain':!![]});var _0x13280b='Metrics';return db[_0x68ef('0x2a')]['destroy']({'where':{'type':_0x13280b,'resourceId':_0x49374f['id']}})['then'](function(){return _0x438b4c;});})['then'](function(){_0x312cc9[_0x68ef('0x1d')](0xcc)[_0x68ef('0x1c')]();});}};}function handleEntityNotFound(_0x123041,_0x29518e){return function(_0x52e67e){if(!_0x52e67e){_0x123041['sendStatus'](0x194);}return _0x52e67e;};}function handleError(_0x1cbe4f,_0x28907a){_0x28907a=_0x28907a||0x1f4;return function(_0x7bf96){logger[_0x68ef('0x2b')](_0x7bf96[_0x68ef('0x2c')]);if(_0x7bf96[_0x68ef('0x2d')]){delete _0x7bf96[_0x68ef('0x2d')];}_0x1cbe4f[_0x68ef('0x1d')](_0x28907a)['send'](_0x7bf96);};}exports[_0x68ef('0x2e')]=function(_0x4314bd,_0x132d9e){var _0x4c25aa={},_0x370a8f={},_0x523120={'count':0x0,'rows':[]};var _0x133788=_[_0x68ef('0x2f')](db['AnalyticMetric']['rawAttributes'],function(_0x159395){return{'name':_0x159395[_0x68ef('0x30')],'type':_0x159395['type'][_0x68ef('0x31')]};});_0x370a8f[_0x68ef('0x32')]=_[_0x68ef('0x2f')](_0x133788,_0x68ef('0x2d'));_0x370a8f['query']=_[_0x68ef('0x33')](_0x4314bd[_0x68ef('0x34')]);_0x370a8f['filters']=_[_0x68ef('0x35')](_0x370a8f['model'],_0x370a8f[_0x68ef('0x34')]);_0x4c25aa[_0x68ef('0x36')]=_['intersection'](_0x370a8f[_0x68ef('0x32')],qs['fields'](_0x4314bd[_0x68ef('0x34')]['fields']));_0x4c25aa[_0x68ef('0x36')]=_0x4c25aa[_0x68ef('0x36')][_0x68ef('0x37')]?_0x4c25aa['attributes']:_0x370a8f[_0x68ef('0x32')];if(!_0x4314bd['query'][_0x68ef('0x38')]('nolimit')){_0x4c25aa[_0x68ef('0x21')]=qs[_0x68ef('0x21')](_0x4314bd[_0x68ef('0x34')][_0x68ef('0x21')]);_0x4c25aa[_0x68ef('0x1f')]=qs[_0x68ef('0x1f')](_0x4314bd['query'][_0x68ef('0x1f')]);}_0x4c25aa[_0x68ef('0x39')]=qs[_0x68ef('0x3a')](_0x4314bd['query'][_0x68ef('0x3a')]);_0x4c25aa[_0x68ef('0x3b')]=qs[_0x68ef('0x3c')](_['pick'](_0x4314bd['query'],_0x370a8f[_0x68ef('0x3c')]),_0x133788);if(_0x4314bd[_0x68ef('0x34')][_0x68ef('0x3d')]){_0x4c25aa[_0x68ef('0x3b')]=_[_0x68ef('0x3e')](_0x4c25aa[_0x68ef('0x3b')],{'$or':_[_0x68ef('0x2f')](_0x133788,function(_0x5b1246){if(_0x5b1246[_0x68ef('0x3f')]!==_0x68ef('0x40')){var _0x2f6ee0={};_0x2f6ee0[_0x5b1246[_0x68ef('0x2d')]]={'$like':'%'+_0x4314bd['query'][_0x68ef('0x3d')]+'%'};return _0x2f6ee0;}})});}_0x4c25aa=_[_0x68ef('0x3e')]({},_0x4c25aa,_0x4314bd[_0x68ef('0x41')]);var _0x410c10={'where':_0x4c25aa[_0x68ef('0x3b')]};return db[_0x68ef('0x42')]['count'](_0x410c10)[_0x68ef('0x27')](function(_0x3f7699){_0x523120[_0x68ef('0x43')]=_0x3f7699;if(_0x4314bd[_0x68ef('0x34')][_0x68ef('0x44')]){_0x4c25aa[_0x68ef('0x45')]=[{'all':!![]}];}return db[_0x68ef('0x42')][_0x68ef('0x46')](_0x4c25aa);})[_0x68ef('0x27')](function(_0x531096){_0x523120[_0x68ef('0x47')]=_0x531096;return _0x523120;})[_0x68ef('0x27')](respondWithFilteredResult(_0x132d9e,_0x4c25aa))[_0x68ef('0x48')](handleError(_0x132d9e,null));};exports[_0x68ef('0x49')]=function(_0xdeacf2,_0x183377){var _0xcac58f={'raw':!![],'where':{'id':_0xdeacf2[_0x68ef('0x4a')]['id']}},_0x576767={};_0x576767['model']=_[_0x68ef('0x33')](db[_0x68ef('0x42')][_0x68ef('0x4b')]);_0x576767[_0x68ef('0x34')]=_['keys'](_0xdeacf2[_0x68ef('0x34')]);_0x576767['filters']=_[_0x68ef('0x35')](_0x576767['model'],_0x576767[_0x68ef('0x34')]);_0xcac58f[_0x68ef('0x36')]=_[_0x68ef('0x35')](_0x576767['model'],qs['fields'](_0xdeacf2[_0x68ef('0x34')][_0x68ef('0x4c')]));_0xcac58f['attributes']=_0xcac58f['attributes']['length']?_0xcac58f[_0x68ef('0x36')]:_0x576767[_0x68ef('0x32')];if(_0xdeacf2[_0x68ef('0x34')][_0x68ef('0x44')]){_0xcac58f[_0x68ef('0x45')]=[{'all':!![]}];}_0xcac58f=_['merge']({},_0xcac58f,_0xdeacf2['options']);return db[_0x68ef('0x42')][_0x68ef('0x4d')](_0xcac58f)[_0x68ef('0x27')](handleEntityNotFound(_0x183377,null))[_0x68ef('0x27')](respondWithResult(_0x183377,null))['catch'](handleError(_0x183377,null));};exports[_0x68ef('0x4e')]=function(_0x474e5a,_0x1c9b6f){return db[_0x68ef('0x42')]['create'](_0x474e5a['body'],{})[_0x68ef('0x27')](function(_0x3c3074){var _0x566e7c=_0x474e5a[_0x68ef('0x4f')][_0x68ef('0x29')]({'plain':!![]});if(!_0x566e7c)throw new Error(_0x68ef('0x50'));if(_0x566e7c[_0x68ef('0x51')]===_0x68ef('0x4f')){var _0x4f0f77=_0x3c3074[_0x68ef('0x29')]({'plain':!![]});var _0x3984ca=_0x68ef('0x52');return db['UserProfileSection'][_0x68ef('0x4d')]({'where':{'name':_0x3984ca,'userProfileId':_0x566e7c[_0x68ef('0x53')]},'raw':!![]})[_0x68ef('0x27')](function(_0x50ef1f){if(_0x50ef1f&&_0x50ef1f[_0x68ef('0x54')]===0x0){return db['UserProfileResource']['create']({'name':_0x4f0f77[_0x68ef('0x2d')],'resourceId':_0x4f0f77['id'],'type':_0x50ef1f['name'],'sectionId':_0x50ef1f['id']},{})[_0x68ef('0x27')](function(){return _0x3c3074;});}else{return _0x3c3074;}})[_0x68ef('0x48')](function(_0x53ebd){logger[_0x68ef('0x2b')](_0x68ef('0x55'),_0x53ebd);throw _0x53ebd;});}return _0x3c3074;})[_0x68ef('0x27')](respondWithResult(_0x1c9b6f,0xc9))[_0x68ef('0x48')](handleError(_0x1c9b6f,null));};exports[_0x68ef('0x56')]=function(_0x2b35f4,_0x247915){if(_0x2b35f4['body']['id']){delete _0x2b35f4['body']['id'];}return db[_0x68ef('0x42')][_0x68ef('0x4d')]({'where':{'id':_0x2b35f4[_0x68ef('0x4a')]['id']}})[_0x68ef('0x27')](handleEntityNotFound(_0x247915,null))[_0x68ef('0x27')](saveUpdates(_0x2b35f4[_0x68ef('0x57')],null))[_0x68ef('0x27')](respondWithResult(_0x247915,null))[_0x68ef('0x48')](handleError(_0x247915,null));};exports[_0x68ef('0x28')]=function(_0x4c2e9c,_0x5685bb){return db[_0x68ef('0x42')]['find']({'where':{'id':_0x4c2e9c[_0x68ef('0x4a')]['id']}})['then'](handleEntityNotFound(_0x5685bb,null))[_0x68ef('0x27')](removeEntity(_0x5685bb,null))[_0x68ef('0x48')](handleError(_0x5685bb,null));}; \ No newline at end of file +var _0x8d0e=['then','get','Metrics','UserProfileResource','end','sendStatus','error','stack','name','send','AnalyticMetric','fieldName','type','key','model','query','keys','intersection','attributes','length','hasOwnProperty','nolimit','order','sort','where','filters','pick','filter','merge','VIRTUAL','options','includeAll','include','findAll','rows','show','params','rawAttributes','fields','find','catch','create','user','Unable\x20to\x20retrieve\x20the\x20current\x20user','UserProfileSection','body','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','util','sox','fs-extra','lodash','squel','crypto','jsforce','desk.js','to-csv','querystring','ioredis','../../components/auth/service','../../components/parsers/qs','../../config/logger','api','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','status','json','undefined','limit','offset','count','set','apply','reject','save','update','destroy'];(function(_0x340bf1,_0x28154e){var _0x5d6835=function(_0x2b688e){while(--_0x2b688e){_0x340bf1['push'](_0x340bf1['shift']());}};_0x5d6835(++_0x28154e);}(_0x8d0e,0x1d7));var _0xe8d0=function(_0x554d86,_0x2baf79){_0x554d86=_0x554d86-0x0;var _0x2ef387=_0x8d0e[_0x554d86];return _0x2ef387;};'use strict';var emlformat=require(_0xe8d0('0x0'));var rimraf=require(_0xe8d0('0x1'));var zipdir=require(_0xe8d0('0x2'));var jsonpatch=require(_0xe8d0('0x3'));var rp=require(_0xe8d0('0x4'));var moment=require(_0xe8d0('0x5'));var BPromise=require(_0xe8d0('0x6'));var Mustache=require(_0xe8d0('0x7'));var util=require(_0xe8d0('0x8'));var path=require('path');var sox=require(_0xe8d0('0x9'));var csv=require('to-csv');var ejs=require('ejs');var fs=require('fs');var fs_extra=require(_0xe8d0('0xa'));var _=require(_0xe8d0('0xb'));var squel=require(_0xe8d0('0xc'));var crypto=require(_0xe8d0('0xd'));var jsforce=require(_0xe8d0('0xe'));var deskjs=require(_0xe8d0('0xf'));var toCsv=require(_0xe8d0('0x10'));var querystring=require(_0xe8d0('0x11'));var Papa=require('papaparse');var Redis=require(_0xe8d0('0x12'));var authService=require(_0xe8d0('0x13'));var qs=require(_0xe8d0('0x14'));var as=require('../../components/parsers/advancedSearch');var hardwareService=require('../../config/license/hardware');var logger=require(_0xe8d0('0x15'))(_0xe8d0('0x16'));var utils=require(_0xe8d0('0x17'));var config=require(_0xe8d0('0x18'));var licenseUtil=require(_0xe8d0('0x19'));var db=require(_0xe8d0('0x1a'))['db'];function respondWithStatusCode(_0x5934b2,_0x38fac0){_0x38fac0=_0x38fac0||0xcc;return function(_0x15b9e5){if(_0x15b9e5){return _0x5934b2['sendStatus'](_0x38fac0);}return _0x5934b2[_0xe8d0('0x1b')](_0x38fac0)['end']();};}function respondWithResult(_0x59b4b7,_0x90a1ea){_0x90a1ea=_0x90a1ea||0xc8;return function(_0x2aa906){if(_0x2aa906){return _0x59b4b7[_0xe8d0('0x1b')](_0x90a1ea)[_0xe8d0('0x1c')](_0x2aa906);}};}function respondWithFilteredResult(_0x15d3a1,_0x7151c6){return function(_0x52818a){if(_0x52818a){var _0x6ccffa=typeof _0x7151c6['offset']===_0xe8d0('0x1d')&&typeof _0x7151c6[_0xe8d0('0x1e')]===_0xe8d0('0x1d');var _0x4d1db4=_0x52818a['count'];var _0x47c67a=_0x6ccffa?0x0:_0x7151c6[_0xe8d0('0x1f')];var _0x384854=_0x6ccffa?_0x52818a[_0xe8d0('0x20')]:_0x7151c6[_0xe8d0('0x1f')]+_0x7151c6[_0xe8d0('0x1e')];var _0x588133;if(_0x384854>=_0x4d1db4){_0x384854=_0x4d1db4;_0x588133=0xc8;}else{_0x588133=0xce;}_0x15d3a1[_0xe8d0('0x1b')](_0x588133);return _0x15d3a1[_0xe8d0('0x21')]('Content-Range',_0x47c67a+'-'+_0x384854+'/'+_0x4d1db4)['json'](_0x52818a);}return null;};}function patchUpdates(_0x554402){return function(_0x384a60){try{jsonpatch[_0xe8d0('0x22')](_0x384a60,_0x554402,!![]);}catch(_0x25363b){return BPromise[_0xe8d0('0x23')](_0x25363b);}return _0x384a60[_0xe8d0('0x24')]();};}function saveUpdates(_0x23a945,_0x1bd25c){return function(_0x28a6b5){if(_0x28a6b5){return _0x28a6b5[_0xe8d0('0x25')](_0x23a945)['then'](function(_0xed8f2e){return _0xed8f2e;});}return null;};}function removeEntity(_0x9f747,_0x572c25){return function(_0x106614){if(_0x106614){return _0x106614[_0xe8d0('0x26')]()[_0xe8d0('0x27')](function(){var _0xd86c76=_0x106614[_0xe8d0('0x28')]({'plain':!![]});var _0x149dfd=_0xe8d0('0x29');return db[_0xe8d0('0x2a')][_0xe8d0('0x26')]({'where':{'type':_0x149dfd,'resourceId':_0xd86c76['id']}})[_0xe8d0('0x27')](function(){return _0x106614;});})[_0xe8d0('0x27')](function(){_0x9f747['status'](0xcc)[_0xe8d0('0x2b')]();});}};}function handleEntityNotFound(_0x26dd52,_0x10dec2){return function(_0x486f49){if(!_0x486f49){_0x26dd52[_0xe8d0('0x2c')](0x194);}return _0x486f49;};}function handleError(_0x343b08,_0x526240){_0x526240=_0x526240||0x1f4;return function(_0x1519e2){logger[_0xe8d0('0x2d')](_0x1519e2[_0xe8d0('0x2e')]);if(_0x1519e2[_0xe8d0('0x2f')]){delete _0x1519e2[_0xe8d0('0x2f')];}_0x343b08['status'](_0x526240)[_0xe8d0('0x30')](_0x1519e2);};}exports['index']=function(_0x5d3276,_0x50ad3c){var _0x547a2b={},_0x13cd4c={},_0x36ccec={'count':0x0,'rows':[]};var _0x5151fa=_['map'](db[_0xe8d0('0x31')]['rawAttributes'],function(_0x3b5d31){return{'name':_0x3b5d31[_0xe8d0('0x32')],'type':_0x3b5d31[_0xe8d0('0x33')][_0xe8d0('0x34')]};});_0x13cd4c[_0xe8d0('0x35')]=_['map'](_0x5151fa,_0xe8d0('0x2f'));_0x13cd4c[_0xe8d0('0x36')]=_[_0xe8d0('0x37')](_0x5d3276[_0xe8d0('0x36')]);_0x13cd4c['filters']=_[_0xe8d0('0x38')](_0x13cd4c[_0xe8d0('0x35')],_0x13cd4c['query']);_0x547a2b[_0xe8d0('0x39')]=_['intersection'](_0x13cd4c[_0xe8d0('0x35')],qs['fields'](_0x5d3276[_0xe8d0('0x36')]['fields']));_0x547a2b[_0xe8d0('0x39')]=_0x547a2b[_0xe8d0('0x39')][_0xe8d0('0x3a')]?_0x547a2b[_0xe8d0('0x39')]:_0x13cd4c['model'];if(!_0x5d3276[_0xe8d0('0x36')][_0xe8d0('0x3b')](_0xe8d0('0x3c'))){_0x547a2b['limit']=qs[_0xe8d0('0x1e')](_0x5d3276[_0xe8d0('0x36')][_0xe8d0('0x1e')]);_0x547a2b[_0xe8d0('0x1f')]=qs[_0xe8d0('0x1f')](_0x5d3276['query'][_0xe8d0('0x1f')]);}_0x547a2b[_0xe8d0('0x3d')]=qs[_0xe8d0('0x3e')](_0x5d3276[_0xe8d0('0x36')][_0xe8d0('0x3e')]);_0x547a2b[_0xe8d0('0x3f')]=qs[_0xe8d0('0x40')](_[_0xe8d0('0x41')](_0x5d3276['query'],_0x13cd4c['filters']),_0x5151fa);if(_0x5d3276[_0xe8d0('0x36')][_0xe8d0('0x42')]){_0x547a2b[_0xe8d0('0x3f')]=_[_0xe8d0('0x43')](_0x547a2b[_0xe8d0('0x3f')],{'$or':_['map'](_0x5151fa,function(_0x2e4362){if(_0x2e4362['type']!==_0xe8d0('0x44')){var _0x458294={};_0x458294[_0x2e4362[_0xe8d0('0x2f')]]={'$like':'%'+_0x5d3276['query'][_0xe8d0('0x42')]+'%'};return _0x458294;}})});}_0x547a2b=_[_0xe8d0('0x43')]({},_0x547a2b,_0x5d3276[_0xe8d0('0x45')]);var _0x230a90={'where':_0x547a2b[_0xe8d0('0x3f')]};return db['AnalyticMetric']['count'](_0x230a90)['then'](function(_0x4cf0da){_0x36ccec[_0xe8d0('0x20')]=_0x4cf0da;if(_0x5d3276['query'][_0xe8d0('0x46')]){_0x547a2b[_0xe8d0('0x47')]=[{'all':!![]}];}return db[_0xe8d0('0x31')][_0xe8d0('0x48')](_0x547a2b);})[_0xe8d0('0x27')](function(_0x1156da){_0x36ccec[_0xe8d0('0x49')]=_0x1156da;return _0x36ccec;})[_0xe8d0('0x27')](respondWithFilteredResult(_0x50ad3c,_0x547a2b))['catch'](handleError(_0x50ad3c,null));};exports[_0xe8d0('0x4a')]=function(_0x1da8b2,_0x4a3740){var _0x4bcdff={'raw':!![],'where':{'id':_0x1da8b2[_0xe8d0('0x4b')]['id']}},_0x3825a1={};_0x3825a1[_0xe8d0('0x35')]=_['keys'](db[_0xe8d0('0x31')][_0xe8d0('0x4c')]);_0x3825a1['query']=_[_0xe8d0('0x37')](_0x1da8b2[_0xe8d0('0x36')]);_0x3825a1['filters']=_[_0xe8d0('0x38')](_0x3825a1[_0xe8d0('0x35')],_0x3825a1[_0xe8d0('0x36')]);_0x4bcdff[_0xe8d0('0x39')]=_[_0xe8d0('0x38')](_0x3825a1[_0xe8d0('0x35')],qs[_0xe8d0('0x4d')](_0x1da8b2[_0xe8d0('0x36')]['fields']));_0x4bcdff[_0xe8d0('0x39')]=_0x4bcdff[_0xe8d0('0x39')][_0xe8d0('0x3a')]?_0x4bcdff[_0xe8d0('0x39')]:_0x3825a1[_0xe8d0('0x35')];if(_0x1da8b2[_0xe8d0('0x36')][_0xe8d0('0x46')]){_0x4bcdff[_0xe8d0('0x47')]=[{'all':!![]}];}_0x4bcdff=_[_0xe8d0('0x43')]({},_0x4bcdff,_0x1da8b2[_0xe8d0('0x45')]);return db[_0xe8d0('0x31')][_0xe8d0('0x4e')](_0x4bcdff)['then'](handleEntityNotFound(_0x4a3740,null))[_0xe8d0('0x27')](respondWithResult(_0x4a3740,null))[_0xe8d0('0x4f')](handleError(_0x4a3740,null));};exports[_0xe8d0('0x50')]=function(_0xad7d94,_0x34047c){return db[_0xe8d0('0x31')][_0xe8d0('0x50')](_0xad7d94['body'],{})[_0xe8d0('0x27')](function(_0x424764){var _0x151cf4=_0xad7d94[_0xe8d0('0x51')]['get']({'plain':!![]});if(!_0x151cf4)throw new Error(_0xe8d0('0x52'));if(_0x151cf4['role']===_0xe8d0('0x51')){var _0x382ae9=_0x424764[_0xe8d0('0x28')]({'plain':!![]});var _0x158d24=_0xe8d0('0x29');return db[_0xe8d0('0x53')][_0xe8d0('0x4e')]({'where':{'name':_0x158d24,'userProfileId':_0x151cf4['userProfileId']},'raw':!![]})[_0xe8d0('0x27')](function(_0x55f93d){if(_0x55f93d&&_0x55f93d['autoAssociation']===0x0){return db[_0xe8d0('0x2a')]['create']({'name':_0x382ae9[_0xe8d0('0x2f')],'resourceId':_0x382ae9['id'],'type':_0x55f93d['name'],'sectionId':_0x55f93d['id']},{})[_0xe8d0('0x27')](function(){return _0x424764;});}else{return _0x424764;}})[_0xe8d0('0x4f')](function(_0x13713c){logger[_0xe8d0('0x2d')]('Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s',_0x13713c);throw _0x13713c;});}return _0x424764;})[_0xe8d0('0x27')](respondWithResult(_0x34047c,0xc9))[_0xe8d0('0x4f')](handleError(_0x34047c,null));};exports[_0xe8d0('0x25')]=function(_0x2e3f1d,_0x18cc14){if(_0x2e3f1d['body']['id']){delete _0x2e3f1d[_0xe8d0('0x54')]['id'];}return db[_0xe8d0('0x31')][_0xe8d0('0x4e')]({'where':{'id':_0x2e3f1d['params']['id']}})[_0xe8d0('0x27')](handleEntityNotFound(_0x18cc14,null))['then'](saveUpdates(_0x2e3f1d['body'],null))[_0xe8d0('0x27')](respondWithResult(_0x18cc14,null))[_0xe8d0('0x4f')](handleError(_0x18cc14,null));};exports['destroy']=function(_0xcb6ce2,_0x3a8074){return db['AnalyticMetric'][_0xe8d0('0x4e')]({'where':{'id':_0xcb6ce2[_0xe8d0('0x4b')]['id']}})[_0xe8d0('0x27')](handleEntityNotFound(_0x3a8074,null))[_0xe8d0('0x27')](removeEntity(_0x3a8074,null))['catch'](handleError(_0x3a8074,null));}; \ No newline at end of file diff --git a/server/api/analyticMetric/analyticMetric.model.js b/server/api/analyticMetric/analyticMetric.model.js index 644c32e..d60acde 100644 --- a/server/api/analyticMetric/analyticMetric.model.js +++ b/server/api/analyticMetric/analyticMetric.model.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xc21c=['api','moment','bluebird','request-promise','rimraf','../../config/environment','./analyticMetric.attributes','exports','define','analytics_metrics','lodash','util'];(function(_0x83dbd1,_0x433fb1){var _0x2b088d=function(_0x471e2d){while(--_0x471e2d){_0x83dbd1['push'](_0x83dbd1['shift']());}};_0x2b088d(++_0x433fb1);}(_0xc21c,0x166));var _0xcc21=function(_0x4f024a,_0x200278){_0x4f024a=_0x4f024a-0x0;var _0x3ff814=_0xc21c[_0x4f024a];return _0x3ff814;};'use strict';var _=require(_0xcc21('0x0'));var util=require(_0xcc21('0x1'));var logger=require('../../config/logger')(_0xcc21('0x2'));var moment=require(_0xcc21('0x3'));var BPromise=require(_0xcc21('0x4'));var rp=require(_0xcc21('0x5'));var fs=require('fs');var path=require('path');var rimraf=require(_0xcc21('0x6'));var config=require(_0xcc21('0x7'));var attributes=require(_0xcc21('0x8'));module[_0xcc21('0x9')]=function(_0x1ff108,_0x2409e5){return _0x1ff108[_0xcc21('0xa')]('AnalyticMetric',attributes,{'tableName':_0xcc21('0xb'),'paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file +var _0x1298=['request-promise','path','rimraf','../../config/environment','exports','AnalyticMetric','analytics_metrics','util','api','moment','bluebird'];(function(_0x485352,_0x269f0b){var _0x331cac=function(_0x211897){while(--_0x211897){_0x485352['push'](_0x485352['shift']());}};_0x331cac(++_0x269f0b);}(_0x1298,0x19e));var _0x8129=function(_0xeabc6c,_0x4e0bfa){_0xeabc6c=_0xeabc6c-0x0;var _0x55cc1a=_0x1298[_0xeabc6c];return _0x55cc1a;};'use strict';var _=require('lodash');var util=require(_0x8129('0x0'));var logger=require('../../config/logger')(_0x8129('0x1'));var moment=require(_0x8129('0x2'));var BPromise=require(_0x8129('0x3'));var rp=require(_0x8129('0x4'));var fs=require('fs');var path=require(_0x8129('0x5'));var rimraf=require(_0x8129('0x6'));var config=require(_0x8129('0x7'));var attributes=require('./analyticMetric.attributes');module[_0x8129('0x8')]=function(_0x193d60,_0x579301){return _0x193d60['define'](_0x8129('0x9'),attributes,{'tableName':_0x8129('0xa'),'paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file diff --git a/server/api/analyticMetric/analyticMetric.rpc.js b/server/api/analyticMetric/analyticMetric.rpc.js index 2bf1434..86b3455 100644 --- a/server/api/analyticMetric/analyticMetric.rpc.js +++ b/server/api/analyticMetric/analyticMetric.rpc.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x665a=['../../config/environment','http','request','then','AnalyticMetric,\x20%s,\x20%s','request\x20sent','debug','AnalyticMetric,\x20%s,\x20%s,\x20%s','stringify','error','message','info','lodash','util','bluebird','../../mysqldb','../../config/utils','rpc'];(function(_0x5bba02,_0x17182a){var _0x4b9c7a=function(_0x35f046){while(--_0x35f046){_0x5bba02['push'](_0x5bba02['shift']());}};_0x4b9c7a(++_0x17182a);}(_0x665a,0x108));var _0xa665=function(_0x5bd018,_0x466a03){_0x5bd018=_0x5bd018-0x0;var _0x182190=_0x665a[_0x5bd018];return _0x182190;};'use strict';var _=require(_0xa665('0x0'));var util=require(_0xa665('0x1'));var moment=require('moment');var BPromise=require(_0xa665('0x2'));var rs=require('randomstring');var fs=require('fs');var Redis=require('ioredis');var db=require(_0xa665('0x3'))['db'];var utils=require(_0xa665('0x4'));var logger=require('../../config/logger')(_0xa665('0x5'));var config=require(_0xa665('0x6'));var jayson=require('jayson/promise');var client=jayson['client'][_0xa665('0x7')]({'port':0x232a});function respondWithRpcPromise(_0x41b0d1,_0x2a2213,_0x150f2b){return new BPromise(function(_0x5625cc,_0x47d045){return client[_0xa665('0x8')](_0x41b0d1,_0x150f2b)[_0xa665('0x9')](function(_0xea9cd0){logger['info'](_0xa665('0xa'),_0x2a2213,_0xa665('0xb'));logger[_0xa665('0xc')](_0xa665('0xd'),_0x2a2213,'request\x20sent',JSON[_0xa665('0xe')](_0xea9cd0));if(_0xea9cd0[_0xa665('0xf')]){if(_0xea9cd0[_0xa665('0xf')]['code']===0x1f4){logger[_0xa665('0xf')](_0xa665('0xa'),_0x2a2213,_0xea9cd0[_0xa665('0xf')][_0xa665('0x10')]);return _0x47d045(_0xea9cd0[_0xa665('0xf')][_0xa665('0x10')]);}logger['error'](_0xa665('0xa'),_0x2a2213,_0xea9cd0[_0xa665('0xf')][_0xa665('0x10')]);return _0x5625cc(_0xea9cd0['error'][_0xa665('0x10')]);}else{logger[_0xa665('0x11')](_0xa665('0xa'),_0x2a2213,_0xa665('0xb'));_0x5625cc(_0xea9cd0['result'][_0xa665('0x10')]);}})['catch'](function(_0x54a812){logger[_0xa665('0xf')](_0xa665('0xa'),_0x2a2213,_0x54a812);_0x47d045(_0x54a812);});});} \ No newline at end of file +var _0xfc74=['../../mysqldb','../../config/utils','../../config/environment','jayson/promise','http','then','info','request\x20sent','debug','stringify','code','error','AnalyticMetric,\x20%s,\x20%s','message','lodash','util','moment','bluebird','randomstring','ioredis'];(function(_0x3e5086,_0x48f4a2){var _0xfeb102=function(_0x5a945f){while(--_0x5a945f){_0x3e5086['push'](_0x3e5086['shift']());}};_0xfeb102(++_0x48f4a2);}(_0xfc74,0xc2));var _0x4fc7=function(_0x147c53,_0x4afcb7){_0x147c53=_0x147c53-0x0;var _0x386c94=_0xfc74[_0x147c53];return _0x386c94;};'use strict';var _=require(_0x4fc7('0x0'));var util=require(_0x4fc7('0x1'));var moment=require(_0x4fc7('0x2'));var BPromise=require(_0x4fc7('0x3'));var rs=require(_0x4fc7('0x4'));var fs=require('fs');var Redis=require(_0x4fc7('0x5'));var db=require(_0x4fc7('0x6'))['db'];var utils=require(_0x4fc7('0x7'));var logger=require('../../config/logger')('rpc');var config=require(_0x4fc7('0x8'));var jayson=require(_0x4fc7('0x9'));var client=jayson['client'][_0x4fc7('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x3edad4,_0x4ca0c8,_0x5bc29b){return new BPromise(function(_0x4e2b8c,_0xeccd39){return client['request'](_0x3edad4,_0x5bc29b)[_0x4fc7('0xb')](function(_0x8a80b0){logger[_0x4fc7('0xc')]('AnalyticMetric,\x20%s,\x20%s',_0x4ca0c8,_0x4fc7('0xd'));logger[_0x4fc7('0xe')]('AnalyticMetric,\x20%s,\x20%s,\x20%s',_0x4ca0c8,_0x4fc7('0xd'),JSON[_0x4fc7('0xf')](_0x8a80b0));if(_0x8a80b0['error']){if(_0x8a80b0['error'][_0x4fc7('0x10')]===0x1f4){logger[_0x4fc7('0x11')](_0x4fc7('0x12'),_0x4ca0c8,_0x8a80b0[_0x4fc7('0x11')][_0x4fc7('0x13')]);return _0xeccd39(_0x8a80b0[_0x4fc7('0x11')][_0x4fc7('0x13')]);}logger[_0x4fc7('0x11')]('AnalyticMetric,\x20%s,\x20%s',_0x4ca0c8,_0x8a80b0[_0x4fc7('0x11')][_0x4fc7('0x13')]);return _0x4e2b8c(_0x8a80b0[_0x4fc7('0x11')][_0x4fc7('0x13')]);}else{logger[_0x4fc7('0xc')](_0x4fc7('0x12'),_0x4ca0c8,_0x4fc7('0xd'));_0x4e2b8c(_0x8a80b0['result'][_0x4fc7('0x13')]);}})['catch'](function(_0x557f49){logger[_0x4fc7('0x11')](_0x4fc7('0x12'),_0x4ca0c8,_0x557f49);_0xeccd39(_0x557f49);});});} \ No newline at end of file diff --git a/server/api/analyticMetric/index.js b/server/api/analyticMetric/index.js index d6348ea..c15edb7 100644 --- a/server/api/analyticMetric/index.js +++ b/server/api/analyticMetric/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x280b=['get','/:id','show','post','isAuthenticated','create','put','exports','multer','util','connect-timeout','express','Router','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','./analyticMetric.controller'];(function(_0x4deff,_0x42c328){var _0x440123=function(_0x2d7dde){while(--_0x2d7dde){_0x4deff['push'](_0x4deff['shift']());}};_0x440123(++_0x42c328);}(_0x280b,0xce));var _0xb280=function(_0x2f5ac5,_0x1ee939){_0x2f5ac5=_0x2f5ac5-0x0;var _0x37c9a8=_0x280b[_0x2f5ac5];return _0x37c9a8;};'use strict';var multer=require(_0xb280('0x0'));var util=require(_0xb280('0x1'));var path=require('path');var timeout=require(_0xb280('0x2'));var express=require(_0xb280('0x3'));var router=express[_0xb280('0x4')]();var fs_extra=require(_0xb280('0x5'));var auth=require(_0xb280('0x6'));var interaction=require(_0xb280('0x7'));var config=require(_0xb280('0x8'));var controller=require(_0xb280('0x9'));router[_0xb280('0xa')]('/',auth['isAuthenticated'](),controller['index']);router[_0xb280('0xa')](_0xb280('0xb'),auth['isAuthenticated'](),controller[_0xb280('0xc')]);router[_0xb280('0xd')]('/',auth[_0xb280('0xe')](),controller[_0xb280('0xf')]);router[_0xb280('0x10')](_0xb280('0xb'),auth[_0xb280('0xe')](),controller['update']);router['delete'](_0xb280('0xb'),auth[_0xb280('0xe')](),controller['destroy']);module[_0xb280('0x11')]=router; \ No newline at end of file +var _0x3d6d=['./analyticMetric.controller','index','get','/:id','isAuthenticated','show','create','put','delete','destroy','exports','multer','util','path','connect-timeout','express','Router','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment'];(function(_0x159fb6,_0x149fda){var _0x36ae73=function(_0x21c4eb){while(--_0x21c4eb){_0x159fb6['push'](_0x159fb6['shift']());}};_0x36ae73(++_0x149fda);}(_0x3d6d,0xb3));var _0xd3d6=function(_0x5e9a69,_0x40c0ec){_0x5e9a69=_0x5e9a69-0x0;var _0x5979c8=_0x3d6d[_0x5e9a69];return _0x5979c8;};'use strict';var multer=require(_0xd3d6('0x0'));var util=require(_0xd3d6('0x1'));var path=require(_0xd3d6('0x2'));var timeout=require(_0xd3d6('0x3'));var express=require(_0xd3d6('0x4'));var router=express[_0xd3d6('0x5')]();var fs_extra=require(_0xd3d6('0x6'));var auth=require(_0xd3d6('0x7'));var interaction=require(_0xd3d6('0x8'));var config=require(_0xd3d6('0x9'));var controller=require(_0xd3d6('0xa'));router['get']('/',auth['isAuthenticated'](),controller[_0xd3d6('0xb')]);router[_0xd3d6('0xc')](_0xd3d6('0xd'),auth[_0xd3d6('0xe')](),controller[_0xd3d6('0xf')]);router['post']('/',auth[_0xd3d6('0xe')](),controller[_0xd3d6('0x10')]);router[_0xd3d6('0x11')](_0xd3d6('0xd'),auth['isAuthenticated'](),controller['update']);router[_0xd3d6('0x12')](_0xd3d6('0xd'),auth[_0xd3d6('0xe')](),controller[_0xd3d6('0x13')]);module[_0xd3d6('0x14')]=router; \ No newline at end of file diff --git a/server/api/analyticTreeReport/analyticTreeReport.attributes.js b/server/api/analyticTreeReport/analyticTreeReport.attributes.js index f264e59..960667e 100644 --- a/server/api/analyticTreeReport/analyticTreeReport.attributes.js +++ b/server/api/analyticTreeReport/analyticTreeReport.attributes.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x6c5a=['TEXT','sequelize'];(function(_0x5d61b4,_0x4f7b91){var _0x183fc5=function(_0x5ecf92){while(--_0x5ecf92){_0x5d61b4['push'](_0x5d61b4['shift']());}};_0x183fc5(++_0x4f7b91);}(_0x6c5a,0x14d));var _0xa6c5=function(_0x4f766d,_0x59982e){_0x4f766d=_0x4f766d-0x0;var _0x5b4b21=_0x6c5a[_0x4f766d];return _0x5b4b21;};'use strict';var Sequelize=require(_0xa6c5('0x0'));module['exports']={'tree':{'type':Sequelize[_0xa6c5('0x1')],'allowNull':![]}}; \ No newline at end of file +var _0x19ec=['exports','TEXT','sequelize'];(function(_0xfb845c,_0x1945ff){var _0x3ca188=function(_0x28fbc6){while(--_0x28fbc6){_0xfb845c['push'](_0xfb845c['shift']());}};_0x3ca188(++_0x1945ff);}(_0x19ec,0x1d6));var _0xc19e=function(_0x167cc1,_0x56ef5a){_0x167cc1=_0x167cc1-0x0;var _0x10bc4b=_0x19ec[_0x167cc1];return _0x10bc4b;};'use strict';var Sequelize=require(_0xc19e('0x0'));module[_0xc19e('0x1')]={'tree':{'type':Sequelize[_0xc19e('0x2')],'allowNull':![]}}; \ No newline at end of file diff --git a/server/api/analyticTreeReport/analyticTreeReport.controller.js b/server/api/analyticTreeReport/analyticTreeReport.controller.js index 78d4437..c1955c6 100644 --- a/server/api/analyticTreeReport/analyticTreeReport.controller.js +++ b/server/api/analyticTreeReport/analyticTreeReport.controller.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x5465=['body','catch','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','util','path','sox','to-csv','ejs','fs-extra','squel','crypto','desk.js','querystring','papaparse','../../components/auth/service','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../mysqldb','sendStatus','end','status','offset','limit','undefined','set','Content-Range','apply','reject','save','update','then','destroy','error','stack','name','send','index','map','rawAttributes','type','key','model','query','keys','filters','intersection','attributes','length','hasOwnProperty','nolimit','order','sort','where','pick','filter','merge','VIRTUAL','AnalyticTreeReport','count','includeAll','findAll','rows','show','params','fields','include','options','find','create'];(function(_0x3e2c00,_0x49741f){var _0x51bd06=function(_0x3a507e){while(--_0x3a507e){_0x3e2c00['push'](_0x3e2c00['shift']());}};_0x51bd06(++_0x49741f);}(_0x5465,0x192));var _0x5546=function(_0x3932a1,_0x32b58a){_0x3932a1=_0x3932a1-0x0;var _0x3494c9=_0x5465[_0x3932a1];return _0x3494c9;};'use strict';var emlformat=require(_0x5546('0x0'));var rimraf=require(_0x5546('0x1'));var zipdir=require(_0x5546('0x2'));var jsonpatch=require(_0x5546('0x3'));var rp=require(_0x5546('0x4'));var moment=require(_0x5546('0x5'));var BPromise=require(_0x5546('0x6'));var Mustache=require(_0x5546('0x7'));var util=require(_0x5546('0x8'));var path=require(_0x5546('0x9'));var sox=require(_0x5546('0xa'));var csv=require(_0x5546('0xb'));var ejs=require(_0x5546('0xc'));var fs=require('fs');var fs_extra=require(_0x5546('0xd'));var _=require('lodash');var squel=require(_0x5546('0xe'));var crypto=require(_0x5546('0xf'));var jsforce=require('jsforce');var deskjs=require(_0x5546('0x10'));var toCsv=require(_0x5546('0xb'));var querystring=require(_0x5546('0x11'));var Papa=require(_0x5546('0x12'));var Redis=require('ioredis');var authService=require(_0x5546('0x13'));var qs=require('../../components/parsers/qs');var as=require(_0x5546('0x14'));var hardwareService=require(_0x5546('0x15'));var logger=require(_0x5546('0x16'))(_0x5546('0x17'));var utils=require(_0x5546('0x18'));var config=require(_0x5546('0x19'));var licenseUtil=require('../../config/license/util');var db=require(_0x5546('0x1a'))['db'];function respondWithStatusCode(_0x3c4bb7,_0x4a4d13){_0x4a4d13=_0x4a4d13||0xcc;return function(_0x4fd882){if(_0x4fd882){return _0x3c4bb7[_0x5546('0x1b')](_0x4a4d13);}return _0x3c4bb7['status'](_0x4a4d13)[_0x5546('0x1c')]();};}function respondWithResult(_0x58088a,_0x5b4ae5){_0x5b4ae5=_0x5b4ae5||0xc8;return function(_0x36fdad){if(_0x36fdad){return _0x58088a[_0x5546('0x1d')](_0x5b4ae5)['json'](_0x36fdad);}};}function respondWithFilteredResult(_0x12c39c,_0x5aa1b1){return function(_0x49c214){if(_0x49c214){var _0x49447e=typeof _0x5aa1b1[_0x5546('0x1e')]==='undefined'&&typeof _0x5aa1b1[_0x5546('0x1f')]===_0x5546('0x20');var _0x11e2c5=_0x49c214['count'];var _0x4c7d78=_0x49447e?0x0:_0x5aa1b1[_0x5546('0x1e')];var _0x4be0d6=_0x49447e?_0x49c214['count']:_0x5aa1b1[_0x5546('0x1e')]+_0x5aa1b1[_0x5546('0x1f')];var _0x445615;if(_0x4be0d6>=_0x11e2c5){_0x4be0d6=_0x11e2c5;_0x445615=0xc8;}else{_0x445615=0xce;}_0x12c39c[_0x5546('0x1d')](_0x445615);return _0x12c39c[_0x5546('0x21')](_0x5546('0x22'),_0x4c7d78+'-'+_0x4be0d6+'/'+_0x11e2c5)['json'](_0x49c214);}return null;};}function patchUpdates(_0x5ae459){return function(_0x5fee96){try{jsonpatch[_0x5546('0x23')](_0x5fee96,_0x5ae459,!![]);}catch(_0x4a12ce){return BPromise[_0x5546('0x24')](_0x4a12ce);}return _0x5fee96[_0x5546('0x25')]();};}function saveUpdates(_0x15c622,_0x32561f){return function(_0x2a7d0f){if(_0x2a7d0f){return _0x2a7d0f[_0x5546('0x26')](_0x15c622)[_0x5546('0x27')](function(_0xf9eadd){return _0xf9eadd;});}return null;};}function removeEntity(_0x2ed289,_0x449062){return function(_0x714343){if(_0x714343){return _0x714343[_0x5546('0x28')]()[_0x5546('0x27')](function(){_0x2ed289['status'](0xcc)['end']();});}};}function handleEntityNotFound(_0x8d8198,_0x2ad7ed){return function(_0x45b660){if(!_0x45b660){_0x8d8198[_0x5546('0x1b')](0x194);}return _0x45b660;};}function handleError(_0x32e474,_0x566299){_0x566299=_0x566299||0x1f4;return function(_0x47055f){logger[_0x5546('0x29')](_0x47055f[_0x5546('0x2a')]);if(_0x47055f['name']){delete _0x47055f[_0x5546('0x2b')];}_0x32e474[_0x5546('0x1d')](_0x566299)[_0x5546('0x2c')](_0x47055f);};}exports[_0x5546('0x2d')]=function(_0x400f81,_0x318139){var _0x5b0c2f={},_0x574d57={},_0x3a3153={'count':0x0,'rows':[]};var _0x338c88=_[_0x5546('0x2e')](db['AnalyticTreeReport'][_0x5546('0x2f')],function(_0x626f78){return{'name':_0x626f78['fieldName'],'type':_0x626f78[_0x5546('0x30')][_0x5546('0x31')]};});_0x574d57[_0x5546('0x32')]=_[_0x5546('0x2e')](_0x338c88,_0x5546('0x2b'));_0x574d57[_0x5546('0x33')]=_[_0x5546('0x34')](_0x400f81[_0x5546('0x33')]);_0x574d57[_0x5546('0x35')]=_[_0x5546('0x36')](_0x574d57[_0x5546('0x32')],_0x574d57[_0x5546('0x33')]);_0x5b0c2f[_0x5546('0x37')]=_[_0x5546('0x36')](_0x574d57[_0x5546('0x32')],qs['fields'](_0x400f81[_0x5546('0x33')]['fields']));_0x5b0c2f[_0x5546('0x37')]=_0x5b0c2f[_0x5546('0x37')][_0x5546('0x38')]?_0x5b0c2f[_0x5546('0x37')]:_0x574d57['model'];if(!_0x400f81[_0x5546('0x33')][_0x5546('0x39')](_0x5546('0x3a'))){_0x5b0c2f['limit']=qs['limit'](_0x400f81[_0x5546('0x33')]['limit']);_0x5b0c2f['offset']=qs['offset'](_0x400f81[_0x5546('0x33')][_0x5546('0x1e')]);}_0x5b0c2f[_0x5546('0x3b')]=qs[_0x5546('0x3c')](_0x400f81['query'][_0x5546('0x3c')]);_0x5b0c2f[_0x5546('0x3d')]=qs[_0x5546('0x35')](_[_0x5546('0x3e')](_0x400f81[_0x5546('0x33')],_0x574d57['filters']),_0x338c88);if(_0x400f81[_0x5546('0x33')][_0x5546('0x3f')]){_0x5b0c2f['where']=_[_0x5546('0x40')](_0x5b0c2f[_0x5546('0x3d')],{'$or':_[_0x5546('0x2e')](_0x338c88,function(_0x184b2d){if(_0x184b2d[_0x5546('0x30')]!==_0x5546('0x41')){var _0x3afefb={};_0x3afefb[_0x184b2d[_0x5546('0x2b')]]={'$like':'%'+_0x400f81[_0x5546('0x33')][_0x5546('0x3f')]+'%'};return _0x3afefb;}})});}_0x5b0c2f=_[_0x5546('0x40')]({},_0x5b0c2f,_0x400f81['options']);var _0x260de5={'where':_0x5b0c2f[_0x5546('0x3d')]};return db[_0x5546('0x42')][_0x5546('0x43')](_0x260de5)['then'](function(_0x50d116){_0x3a3153[_0x5546('0x43')]=_0x50d116;if(_0x400f81[_0x5546('0x33')][_0x5546('0x44')]){_0x5b0c2f['include']=[{'all':!![]}];}return db[_0x5546('0x42')][_0x5546('0x45')](_0x5b0c2f);})[_0x5546('0x27')](function(_0x5ef138){_0x3a3153[_0x5546('0x46')]=_0x5ef138;return _0x3a3153;})[_0x5546('0x27')](respondWithFilteredResult(_0x318139,_0x5b0c2f))['catch'](handleError(_0x318139,null));};exports[_0x5546('0x47')]=function(_0x22daf6,_0x4a0d95){var _0x1b0cbf={'raw':!![],'where':{'id':_0x22daf6[_0x5546('0x48')]['id']}},_0x3f1961={};_0x3f1961[_0x5546('0x32')]=_[_0x5546('0x34')](db['AnalyticTreeReport'][_0x5546('0x2f')]);_0x3f1961[_0x5546('0x33')]=_['keys'](_0x22daf6[_0x5546('0x33')]);_0x3f1961[_0x5546('0x35')]=_[_0x5546('0x36')](_0x3f1961['model'],_0x3f1961['query']);_0x1b0cbf['attributes']=_[_0x5546('0x36')](_0x3f1961[_0x5546('0x32')],qs[_0x5546('0x49')](_0x22daf6['query'][_0x5546('0x49')]));_0x1b0cbf['attributes']=_0x1b0cbf[_0x5546('0x37')][_0x5546('0x38')]?_0x1b0cbf['attributes']:_0x3f1961['model'];if(_0x22daf6[_0x5546('0x33')][_0x5546('0x44')]){_0x1b0cbf[_0x5546('0x4a')]=[{'all':!![]}];}_0x1b0cbf=_['merge']({},_0x1b0cbf,_0x22daf6[_0x5546('0x4b')]);return db[_0x5546('0x42')][_0x5546('0x4c')](_0x1b0cbf)[_0x5546('0x27')](handleEntityNotFound(_0x4a0d95,null))[_0x5546('0x27')](respondWithResult(_0x4a0d95,null))['catch'](handleError(_0x4a0d95,null));};exports[_0x5546('0x4d')]=function(_0x5e6166,_0x14564d){return db[_0x5546('0x42')][_0x5546('0x4d')](_0x5e6166[_0x5546('0x4e')],{})[_0x5546('0x27')](respondWithResult(_0x14564d,0xc9))[_0x5546('0x4f')](handleError(_0x14564d,null));};exports['update']=function(_0x311c91,_0x204e10){if(_0x311c91[_0x5546('0x4e')]['id']){delete _0x311c91['body']['id'];}return db[_0x5546('0x42')][_0x5546('0x4c')]({'where':{'id':_0x311c91['params']['id']}})[_0x5546('0x27')](handleEntityNotFound(_0x204e10,null))[_0x5546('0x27')](saveUpdates(_0x311c91[_0x5546('0x4e')],null))[_0x5546('0x27')](respondWithResult(_0x204e10,null))[_0x5546('0x4f')](handleError(_0x204e10,null));};exports[_0x5546('0x28')]=function(_0x3dc272,_0x260391){return db['AnalyticTreeReport'][_0x5546('0x4c')]({'where':{'id':_0x3dc272[_0x5546('0x48')]['id']}})[_0x5546('0x27')](handleEntityNotFound(_0x260391,null))['then'](removeEntity(_0x260391,null))[_0x5546('0x4f')](handleError(_0x260391,null));}; \ No newline at end of file +var _0xe9eb=['querystring','papaparse','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/environment','../../config/license/util','sendStatus','status','end','json','undefined','limit','count','offset','set','Content-Range','save','update','then','destroy','error','stack','name','send','map','AnalyticTreeReport','rawAttributes','fieldName','type','key','model','query','filters','intersection','fields','attributes','length','hasOwnProperty','nolimit','order','sort','where','filter','merge','VIRTUAL','options','includeAll','include','findAll','catch','show','keys','find','create','body','params','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','sox','to-csv','fs-extra','lodash','squel','crypto','jsforce','desk.js'];(function(_0x4eafff,_0x3e19d6){var _0x4885b7=function(_0x3af376){while(--_0x3af376){_0x4eafff['push'](_0x4eafff['shift']());}};_0x4885b7(++_0x3e19d6);}(_0xe9eb,0xcd));var _0xbe9e=function(_0x207b19,_0xdd060b){_0x207b19=_0x207b19-0x0;var _0x29f05b=_0xe9eb[_0x207b19];return _0x29f05b;};'use strict';var emlformat=require(_0xbe9e('0x0'));var rimraf=require(_0xbe9e('0x1'));var zipdir=require(_0xbe9e('0x2'));var jsonpatch=require(_0xbe9e('0x3'));var rp=require(_0xbe9e('0x4'));var moment=require(_0xbe9e('0x5'));var BPromise=require('bluebird');var Mustache=require('mustache');var util=require('util');var path=require('path');var sox=require(_0xbe9e('0x6'));var csv=require(_0xbe9e('0x7'));var ejs=require('ejs');var fs=require('fs');var fs_extra=require(_0xbe9e('0x8'));var _=require(_0xbe9e('0x9'));var squel=require(_0xbe9e('0xa'));var crypto=require(_0xbe9e('0xb'));var jsforce=require(_0xbe9e('0xc'));var deskjs=require(_0xbe9e('0xd'));var toCsv=require(_0xbe9e('0x7'));var querystring=require(_0xbe9e('0xe'));var Papa=require(_0xbe9e('0xf'));var Redis=require('ioredis');var authService=require('../../components/auth/service');var qs=require(_0xbe9e('0x10'));var as=require(_0xbe9e('0x11'));var hardwareService=require(_0xbe9e('0x12'));var logger=require(_0xbe9e('0x13'))(_0xbe9e('0x14'));var utils=require('../../config/utils');var config=require(_0xbe9e('0x15'));var licenseUtil=require(_0xbe9e('0x16'));var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0x42cd4b,_0x121525){_0x121525=_0x121525||0xcc;return function(_0x74a377){if(_0x74a377){return _0x42cd4b[_0xbe9e('0x17')](_0x121525);}return _0x42cd4b[_0xbe9e('0x18')](_0x121525)[_0xbe9e('0x19')]();};}function respondWithResult(_0x1f6249,_0x59d4cb){_0x59d4cb=_0x59d4cb||0xc8;return function(_0xa344fe){if(_0xa344fe){return _0x1f6249[_0xbe9e('0x18')](_0x59d4cb)[_0xbe9e('0x1a')](_0xa344fe);}};}function respondWithFilteredResult(_0xdb31b6,_0x45ee2f){return function(_0x31a20f){if(_0x31a20f){var _0xc3ad25=typeof _0x45ee2f['offset']===_0xbe9e('0x1b')&&typeof _0x45ee2f[_0xbe9e('0x1c')]===_0xbe9e('0x1b');var _0x1f7c1e=_0x31a20f[_0xbe9e('0x1d')];var _0x2c34ec=_0xc3ad25?0x0:_0x45ee2f[_0xbe9e('0x1e')];var _0x835869=_0xc3ad25?_0x31a20f[_0xbe9e('0x1d')]:_0x45ee2f[_0xbe9e('0x1e')]+_0x45ee2f[_0xbe9e('0x1c')];var _0x48598c;if(_0x835869>=_0x1f7c1e){_0x835869=_0x1f7c1e;_0x48598c=0xc8;}else{_0x48598c=0xce;}_0xdb31b6[_0xbe9e('0x18')](_0x48598c);return _0xdb31b6[_0xbe9e('0x1f')](_0xbe9e('0x20'),_0x2c34ec+'-'+_0x835869+'/'+_0x1f7c1e)['json'](_0x31a20f);}return null;};}function patchUpdates(_0x54aa57){return function(_0x190c14){try{jsonpatch['apply'](_0x190c14,_0x54aa57,!![]);}catch(_0x5600a3){return BPromise['reject'](_0x5600a3);}return _0x190c14[_0xbe9e('0x21')]();};}function saveUpdates(_0x110a66,_0x55056e){return function(_0x9f9082){if(_0x9f9082){return _0x9f9082[_0xbe9e('0x22')](_0x110a66)[_0xbe9e('0x23')](function(_0x36dd1c){return _0x36dd1c;});}return null;};}function removeEntity(_0x163e9c,_0x8033dd){return function(_0x2b4065){if(_0x2b4065){return _0x2b4065[_0xbe9e('0x24')]()['then'](function(){_0x163e9c[_0xbe9e('0x18')](0xcc)[_0xbe9e('0x19')]();});}};}function handleEntityNotFound(_0x1f6c15,_0x234929){return function(_0x44305b){if(!_0x44305b){_0x1f6c15[_0xbe9e('0x17')](0x194);}return _0x44305b;};}function handleError(_0x27bdac,_0x28486b){_0x28486b=_0x28486b||0x1f4;return function(_0x270cbf){logger[_0xbe9e('0x25')](_0x270cbf[_0xbe9e('0x26')]);if(_0x270cbf[_0xbe9e('0x27')]){delete _0x270cbf[_0xbe9e('0x27')];}_0x27bdac[_0xbe9e('0x18')](_0x28486b)[_0xbe9e('0x28')](_0x270cbf);};}exports['index']=function(_0x14ef94,_0x16f37b){var _0x5dee26={},_0x5662f9={},_0x2fc61c={'count':0x0,'rows':[]};var _0x4db6d6=_[_0xbe9e('0x29')](db[_0xbe9e('0x2a')][_0xbe9e('0x2b')],function(_0x23e656){return{'name':_0x23e656[_0xbe9e('0x2c')],'type':_0x23e656[_0xbe9e('0x2d')][_0xbe9e('0x2e')]};});_0x5662f9[_0xbe9e('0x2f')]=_[_0xbe9e('0x29')](_0x4db6d6,'name');_0x5662f9[_0xbe9e('0x30')]=_['keys'](_0x14ef94[_0xbe9e('0x30')]);_0x5662f9[_0xbe9e('0x31')]=_[_0xbe9e('0x32')](_0x5662f9[_0xbe9e('0x2f')],_0x5662f9[_0xbe9e('0x30')]);_0x5dee26['attributes']=_['intersection'](_0x5662f9[_0xbe9e('0x2f')],qs['fields'](_0x14ef94[_0xbe9e('0x30')][_0xbe9e('0x33')]));_0x5dee26[_0xbe9e('0x34')]=_0x5dee26[_0xbe9e('0x34')][_0xbe9e('0x35')]?_0x5dee26[_0xbe9e('0x34')]:_0x5662f9[_0xbe9e('0x2f')];if(!_0x14ef94[_0xbe9e('0x30')][_0xbe9e('0x36')](_0xbe9e('0x37'))){_0x5dee26[_0xbe9e('0x1c')]=qs[_0xbe9e('0x1c')](_0x14ef94[_0xbe9e('0x30')][_0xbe9e('0x1c')]);_0x5dee26[_0xbe9e('0x1e')]=qs[_0xbe9e('0x1e')](_0x14ef94[_0xbe9e('0x30')][_0xbe9e('0x1e')]);}_0x5dee26[_0xbe9e('0x38')]=qs['sort'](_0x14ef94[_0xbe9e('0x30')][_0xbe9e('0x39')]);_0x5dee26[_0xbe9e('0x3a')]=qs[_0xbe9e('0x31')](_['pick'](_0x14ef94[_0xbe9e('0x30')],_0x5662f9['filters']),_0x4db6d6);if(_0x14ef94[_0xbe9e('0x30')][_0xbe9e('0x3b')]){_0x5dee26[_0xbe9e('0x3a')]=_[_0xbe9e('0x3c')](_0x5dee26['where'],{'$or':_[_0xbe9e('0x29')](_0x4db6d6,function(_0x495bd7){if(_0x495bd7[_0xbe9e('0x2d')]!==_0xbe9e('0x3d')){var _0x32fbd1={};_0x32fbd1[_0x495bd7[_0xbe9e('0x27')]]={'$like':'%'+_0x14ef94[_0xbe9e('0x30')]['filter']+'%'};return _0x32fbd1;}})});}_0x5dee26=_['merge']({},_0x5dee26,_0x14ef94[_0xbe9e('0x3e')]);var _0x5a733f={'where':_0x5dee26['where']};return db[_0xbe9e('0x2a')][_0xbe9e('0x1d')](_0x5a733f)['then'](function(_0x54aa8b){_0x2fc61c[_0xbe9e('0x1d')]=_0x54aa8b;if(_0x14ef94[_0xbe9e('0x30')][_0xbe9e('0x3f')]){_0x5dee26[_0xbe9e('0x40')]=[{'all':!![]}];}return db[_0xbe9e('0x2a')][_0xbe9e('0x41')](_0x5dee26);})['then'](function(_0x59de73){_0x2fc61c['rows']=_0x59de73;return _0x2fc61c;})[_0xbe9e('0x23')](respondWithFilteredResult(_0x16f37b,_0x5dee26))[_0xbe9e('0x42')](handleError(_0x16f37b,null));};exports[_0xbe9e('0x43')]=function(_0x52ea7b,_0x5e02a8){var _0xc361d={'raw':!![],'where':{'id':_0x52ea7b['params']['id']}},_0x125c74={};_0x125c74[_0xbe9e('0x2f')]=_[_0xbe9e('0x44')](db[_0xbe9e('0x2a')]['rawAttributes']);_0x125c74['query']=_[_0xbe9e('0x44')](_0x52ea7b[_0xbe9e('0x30')]);_0x125c74[_0xbe9e('0x31')]=_[_0xbe9e('0x32')](_0x125c74[_0xbe9e('0x2f')],_0x125c74[_0xbe9e('0x30')]);_0xc361d[_0xbe9e('0x34')]=_[_0xbe9e('0x32')](_0x125c74[_0xbe9e('0x2f')],qs['fields'](_0x52ea7b[_0xbe9e('0x30')][_0xbe9e('0x33')]));_0xc361d['attributes']=_0xc361d[_0xbe9e('0x34')][_0xbe9e('0x35')]?_0xc361d[_0xbe9e('0x34')]:_0x125c74[_0xbe9e('0x2f')];if(_0x52ea7b[_0xbe9e('0x30')][_0xbe9e('0x3f')]){_0xc361d[_0xbe9e('0x40')]=[{'all':!![]}];}_0xc361d=_[_0xbe9e('0x3c')]({},_0xc361d,_0x52ea7b['options']);return db[_0xbe9e('0x2a')][_0xbe9e('0x45')](_0xc361d)['then'](handleEntityNotFound(_0x5e02a8,null))[_0xbe9e('0x23')](respondWithResult(_0x5e02a8,null))['catch'](handleError(_0x5e02a8,null));};exports[_0xbe9e('0x46')]=function(_0x571cb4,_0x2ab472){return db[_0xbe9e('0x2a')]['create'](_0x571cb4['body'],{})['then'](respondWithResult(_0x2ab472,0xc9))[_0xbe9e('0x42')](handleError(_0x2ab472,null));};exports[_0xbe9e('0x22')]=function(_0xff1862,_0x5ce9ed){if(_0xff1862[_0xbe9e('0x47')]['id']){delete _0xff1862[_0xbe9e('0x47')]['id'];}return db[_0xbe9e('0x2a')][_0xbe9e('0x45')]({'where':{'id':_0xff1862[_0xbe9e('0x48')]['id']}})[_0xbe9e('0x23')](handleEntityNotFound(_0x5ce9ed,null))[_0xbe9e('0x23')](saveUpdates(_0xff1862[_0xbe9e('0x47')],null))[_0xbe9e('0x23')](respondWithResult(_0x5ce9ed,null))[_0xbe9e('0x42')](handleError(_0x5ce9ed,null));};exports['destroy']=function(_0x1f2e80,_0x586a5a){return db['AnalyticTreeReport'][_0xbe9e('0x45')]({'where':{'id':_0x1f2e80[_0xbe9e('0x48')]['id']}})['then'](handleEntityNotFound(_0x586a5a,null))['then'](removeEntity(_0x586a5a,null))[_0xbe9e('0x42')](handleError(_0x586a5a,null));}; \ No newline at end of file diff --git a/server/api/analyticTreeReport/analyticTreeReport.model.js b/server/api/analyticTreeReport/analyticTreeReport.model.js index c96c6c2..c70cb6f 100644 --- a/server/api/analyticTreeReport/analyticTreeReport.model.js +++ b/server/api/analyticTreeReport/analyticTreeReport.model.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x908b=['analytics_report_trees','util','../../config/logger','api','moment','bluebird','request-promise','path','rimraf','./analyticTreeReport.attributes','exports','define','AnalyticTreeReport'];(function(_0x1f28e6,_0x1caa9d){var _0x482235=function(_0x18d7d9){while(--_0x18d7d9){_0x1f28e6['push'](_0x1f28e6['shift']());}};_0x482235(++_0x1caa9d);}(_0x908b,0xde));var _0xb908=function(_0x270f12,_0x5f3df3){_0x270f12=_0x270f12-0x0;var _0x4d39df=_0x908b[_0x270f12];return _0x4d39df;};'use strict';var _=require('lodash');var util=require(_0xb908('0x0'));var logger=require(_0xb908('0x1'))(_0xb908('0x2'));var moment=require(_0xb908('0x3'));var BPromise=require(_0xb908('0x4'));var rp=require(_0xb908('0x5'));var fs=require('fs');var path=require(_0xb908('0x6'));var rimraf=require(_0xb908('0x7'));var config=require('../../config/environment');var attributes=require(_0xb908('0x8'));module[_0xb908('0x9')]=function(_0x24ec67,_0xfd210a){return _0x24ec67[_0xb908('0xa')](_0xb908('0xb'),attributes,{'tableName':_0xb908('0xc'),'paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file +var _0xa56f=['analytics_report_trees','util','api','moment','bluebird','rimraf','../../config/environment','./analyticTreeReport.attributes','exports','define','AnalyticTreeReport'];(function(_0x3bcf4f,_0x507a7b){var _0x26d549=function(_0x12c34f){while(--_0x12c34f){_0x3bcf4f['push'](_0x3bcf4f['shift']());}};_0x26d549(++_0x507a7b);}(_0xa56f,0x1da));var _0xfa56=function(_0x5dd12d,_0x2689a7){_0x5dd12d=_0x5dd12d-0x0;var _0x1b3136=_0xa56f[_0x5dd12d];return _0x1b3136;};'use strict';var _=require('lodash');var util=require(_0xfa56('0x0'));var logger=require('../../config/logger')(_0xfa56('0x1'));var moment=require(_0xfa56('0x2'));var BPromise=require(_0xfa56('0x3'));var rp=require('request-promise');var fs=require('fs');var path=require('path');var rimraf=require(_0xfa56('0x4'));var config=require(_0xfa56('0x5'));var attributes=require(_0xfa56('0x6'));module[_0xfa56('0x7')]=function(_0x46b2e9,_0x993441){return _0x46b2e9[_0xfa56('0x8')](_0xfa56('0x9'),attributes,{'tableName':_0xfa56('0xa'),'paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file diff --git a/server/api/analyticTreeReport/analyticTreeReport.rpc.js b/server/api/analyticTreeReport/analyticTreeReport.rpc.js index a9c9dce..ad3a627 100644 --- a/server/api/analyticTreeReport/analyticTreeReport.rpc.js +++ b/server/api/analyticTreeReport/analyticTreeReport.rpc.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x2ef3=['bluebird','randomstring','ioredis','../../config/utils','../../config/logger','../../config/environment','jayson/promise','request','then','info','AnalyticTreeReport,\x20%s,\x20%s','AnalyticTreeReport,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','code','message','catch','lodash','util','moment'];(function(_0x337ea1,_0x1e73df){var _0x49dbc3=function(_0x22c2a2){while(--_0x22c2a2){_0x337ea1['push'](_0x337ea1['shift']());}};_0x49dbc3(++_0x1e73df);}(_0x2ef3,0xba));var _0x32ef=function(_0x3133f7,_0x2ad081){_0x3133f7=_0x3133f7-0x0;var _0x11d65b=_0x2ef3[_0x3133f7];return _0x11d65b;};'use strict';var _=require(_0x32ef('0x0'));var util=require(_0x32ef('0x1'));var moment=require(_0x32ef('0x2'));var BPromise=require(_0x32ef('0x3'));var rs=require(_0x32ef('0x4'));var fs=require('fs');var Redis=require(_0x32ef('0x5'));var db=require('../../mysqldb')['db'];var utils=require(_0x32ef('0x6'));var logger=require(_0x32ef('0x7'))('rpc');var config=require(_0x32ef('0x8'));var jayson=require(_0x32ef('0x9'));var client=jayson['client']['http']({'port':0x232a});function respondWithRpcPromise(_0x2c0089,_0x4bfcf8,_0x367c39){return new BPromise(function(_0x2fb8eb,_0x234863){return client[_0x32ef('0xa')](_0x2c0089,_0x367c39)[_0x32ef('0xb')](function(_0x2bbb50){logger[_0x32ef('0xc')](_0x32ef('0xd'),_0x4bfcf8,'request\x20sent');logger['debug'](_0x32ef('0xe'),_0x4bfcf8,_0x32ef('0xf'),JSON[_0x32ef('0x10')](_0x2bbb50));if(_0x2bbb50[_0x32ef('0x11')]){if(_0x2bbb50['error'][_0x32ef('0x12')]===0x1f4){logger['error'](_0x32ef('0xd'),_0x4bfcf8,_0x2bbb50['error'][_0x32ef('0x13')]);return _0x234863(_0x2bbb50[_0x32ef('0x11')]['message']);}logger['error'](_0x32ef('0xd'),_0x4bfcf8,_0x2bbb50['error'][_0x32ef('0x13')]);return _0x2fb8eb(_0x2bbb50[_0x32ef('0x11')][_0x32ef('0x13')]);}else{logger[_0x32ef('0xc')]('AnalyticTreeReport,\x20%s,\x20%s',_0x4bfcf8,'request\x20sent');_0x2fb8eb(_0x2bbb50['result'][_0x32ef('0x13')]);}})[_0x32ef('0x14')](function(_0xb5aed2){logger['error']('AnalyticTreeReport,\x20%s,\x20%s',_0x4bfcf8,_0xb5aed2);_0x234863(_0xb5aed2);});});} \ No newline at end of file +var _0xdb28=['moment','bluebird','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','jayson/promise','client','request','then','AnalyticTreeReport,\x20%s,\x20%s','request\x20sent','debug','stringify','error','code','message','info','catch','lodash','util'];(function(_0x3604d5,_0x5908e2){var _0x2d6d43=function(_0x25b7b7){while(--_0x25b7b7){_0x3604d5['push'](_0x3604d5['shift']());}};_0x2d6d43(++_0x5908e2);}(_0xdb28,0x106));var _0x8db2=function(_0xffd502,_0xa66a60){_0xffd502=_0xffd502-0x0;var _0xe699b7=_0xdb28[_0xffd502];return _0xe699b7;};'use strict';var _=require(_0x8db2('0x0'));var util=require(_0x8db2('0x1'));var moment=require(_0x8db2('0x2'));var BPromise=require(_0x8db2('0x3'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x8db2('0x4'));var db=require(_0x8db2('0x5'))['db'];var utils=require(_0x8db2('0x6'));var logger=require(_0x8db2('0x7'))(_0x8db2('0x8'));var config=require('../../config/environment');var jayson=require(_0x8db2('0x9'));var client=jayson[_0x8db2('0xa')]['http']({'port':0x232a});function respondWithRpcPromise(_0x494b40,_0x477f50,_0x46932f){return new BPromise(function(_0x131537,_0x29f698){return client[_0x8db2('0xb')](_0x494b40,_0x46932f)[_0x8db2('0xc')](function(_0x126c78){logger['info'](_0x8db2('0xd'),_0x477f50,_0x8db2('0xe'));logger[_0x8db2('0xf')]('AnalyticTreeReport,\x20%s,\x20%s,\x20%s',_0x477f50,_0x8db2('0xe'),JSON[_0x8db2('0x10')](_0x126c78));if(_0x126c78['error']){if(_0x126c78[_0x8db2('0x11')][_0x8db2('0x12')]===0x1f4){logger[_0x8db2('0x11')](_0x8db2('0xd'),_0x477f50,_0x126c78[_0x8db2('0x11')]['message']);return _0x29f698(_0x126c78['error'][_0x8db2('0x13')]);}logger[_0x8db2('0x11')](_0x8db2('0xd'),_0x477f50,_0x126c78[_0x8db2('0x11')][_0x8db2('0x13')]);return _0x131537(_0x126c78[_0x8db2('0x11')][_0x8db2('0x13')]);}else{logger[_0x8db2('0x14')](_0x8db2('0xd'),_0x477f50,_0x8db2('0xe'));_0x131537(_0x126c78['result'][_0x8db2('0x13')]);}})[_0x8db2('0x15')](function(_0x48101e){logger[_0x8db2('0x11')](_0x8db2('0xd'),_0x477f50,_0x48101e);_0x29f698(_0x48101e);});});} \ No newline at end of file diff --git a/server/api/analyticTreeReport/index.js b/server/api/analyticTreeReport/index.js index d33c510..c911476 100644 --- a/server/api/analyticTreeReport/index.js +++ b/server/api/analyticTreeReport/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x38b3=['../../components/auth/service','../../config/environment','./analyticTreeReport.controller','get','isAuthenticated','index','/:id','show','post','create','put','delete','exports','multer','util','path','connect-timeout','express','Router','fs-extra'];(function(_0x2756d0,_0xede0f7){var _0x3d8ccd=function(_0x4d2c4b){while(--_0x4d2c4b){_0x2756d0['push'](_0x2756d0['shift']());}};_0x3d8ccd(++_0xede0f7);}(_0x38b3,0x1b1));var _0x338b=function(_0x31197c,_0x211628){_0x31197c=_0x31197c-0x0;var _0x53a49f=_0x38b3[_0x31197c];return _0x53a49f;};'use strict';var multer=require(_0x338b('0x0'));var util=require(_0x338b('0x1'));var path=require(_0x338b('0x2'));var timeout=require(_0x338b('0x3'));var express=require(_0x338b('0x4'));var router=express[_0x338b('0x5')]();var fs_extra=require(_0x338b('0x6'));var auth=require(_0x338b('0x7'));var interaction=require('../../components/interaction/service');var config=require(_0x338b('0x8'));var controller=require(_0x338b('0x9'));router[_0x338b('0xa')]('/',auth[_0x338b('0xb')](),controller[_0x338b('0xc')]);router[_0x338b('0xa')](_0x338b('0xd'),auth[_0x338b('0xb')](),controller[_0x338b('0xe')]);router[_0x338b('0xf')]('/',auth[_0x338b('0xb')](),controller[_0x338b('0x10')]);router[_0x338b('0x11')](_0x338b('0xd'),auth[_0x338b('0xb')](),controller['update']);router[_0x338b('0x12')](_0x338b('0xd'),auth[_0x338b('0xb')](),controller['destroy']);module[_0x338b('0x13')]=router; \ No newline at end of file +var _0xa957=['delete','/:id','destroy','exports','multer','path','connect-timeout','Router','../../components/interaction/service','get','isAuthenticated','index','show','post','create'];(function(_0x3eae20,_0x3078d9){var _0x58921b=function(_0x28c5cf){while(--_0x28c5cf){_0x3eae20['push'](_0x3eae20['shift']());}};_0x58921b(++_0x3078d9);}(_0xa957,0x199));var _0x7a95=function(_0x413e3c,_0x3fa409){_0x413e3c=_0x413e3c-0x0;var _0xd57f0c=_0xa957[_0x413e3c];return _0xd57f0c;};'use strict';var multer=require(_0x7a95('0x0'));var util=require('util');var path=require(_0x7a95('0x1'));var timeout=require(_0x7a95('0x2'));var express=require('express');var router=express[_0x7a95('0x3')]();var fs_extra=require('fs-extra');var auth=require('../../components/auth/service');var interaction=require(_0x7a95('0x4'));var config=require('../../config/environment');var controller=require('./analyticTreeReport.controller');router[_0x7a95('0x5')]('/',auth[_0x7a95('0x6')](),controller[_0x7a95('0x7')]);router[_0x7a95('0x5')]('/:id',auth[_0x7a95('0x6')](),controller[_0x7a95('0x8')]);router[_0x7a95('0x9')]('/',auth[_0x7a95('0x6')](),controller[_0x7a95('0xa')]);router['put']('/:id',auth[_0x7a95('0x6')](),controller['update']);router[_0x7a95('0xb')](_0x7a95('0xc'),auth['isAuthenticated'](),controller[_0x7a95('0xd')]);module[_0x7a95('0xe')]=router; \ No newline at end of file diff --git a/server/api/attachment/attachment.attributes.js b/server/api/attachment/attachment.attributes.js index d306b73..16b3209 100644 --- a/server/api/attachment/attachment.attributes.js +++ b/server/api/attachment/attachment.attributes.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x35d0=['sequelize','exports','STRING'];(function(_0x234ce7,_0x3e909c){var _0x57c561=function(_0x8ac1bb){while(--_0x8ac1bb){_0x234ce7['push'](_0x234ce7['shift']());}};_0x57c561(++_0x3e909c);}(_0x35d0,0xf9));var _0x035d=function(_0x3337b6,_0x42c7f9){_0x3337b6=_0x3337b6-0x0;var _0x568270=_0x35d0[_0x3337b6];return _0x568270;};'use strict';var Sequelize=require(_0x035d('0x0'));module[_0x035d('0x1')]={'name':{'type':Sequelize['STRING']},'basename':{'type':Sequelize[_0x035d('0x2')]},'type':{'type':Sequelize[_0x035d('0x2')]}}; \ No newline at end of file +var _0x0eaa=['sequelize','exports','STRING'];(function(_0x5b78e8,_0x55096b){var _0xf2c321=function(_0x4e0cff){while(--_0x4e0cff){_0x5b78e8['push'](_0x5b78e8['shift']());}};_0xf2c321(++_0x55096b);}(_0x0eaa,0x1c5));var _0xa0ea=function(_0x506762,_0x5c2639){_0x506762=_0x506762-0x0;var _0x559d09=_0x0eaa[_0x506762];return _0x559d09;};'use strict';var Sequelize=require(_0xa0ea('0x0'));module[_0xa0ea('0x1')]={'name':{'type':Sequelize['STRING']},'basename':{'type':Sequelize['STRING']},'type':{'type':Sequelize[_0xa0ea('0x2')]}}; \ No newline at end of file diff --git a/server/api/attachment/attachment.controller.js b/server/api/attachment/attachment.controller.js index f9f42e9..63460bd 100644 --- a/server/api/attachment/attachment.controller.js +++ b/server/api/attachment/attachment.controller.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xf5fb=['join','root','server/files/attachments/','offline-chat/','basename','eml-format','zip-dir','fast-json-patch','request-promise','moment','bluebird','path','sox','to-csv','fs-extra','lodash','squel','crypto','jsforce','desk.js','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','api','../../config/utils','../../mysqldb','sendStatus','status','end','offset','limit','undefined','count','set','Content-Range','json','apply','reject','save','update','then','destroy','error','stack','name','index','map','Attachment','rawAttributes','fieldName','type','model','query','keys','filters','intersection','attributes','fields','length','hasOwnProperty','order','sort','where','pick','filter','merge','VIRTUAL','includeAll','include','findAll','rows','catch','params','options','find','clone','omit','createdAt','updatedAt','body','create','file','filename','mimetype','download','ChatOfflineMessageId'];(function(_0x22431e,_0x5af0a3){var _0xd978e9=function(_0x2bbdd7){while(--_0x2bbdd7){_0x22431e['push'](_0x22431e['shift']());}};_0xd978e9(++_0x5af0a3);}(_0xf5fb,0x16d));var _0xbf5f=function(_0x1c48fe,_0x4a05ac){_0x1c48fe=_0x1c48fe-0x0;var _0x36bcf0=_0xf5fb[_0x1c48fe];return _0x36bcf0;};'use strict';var emlformat=require(_0xbf5f('0x0'));var rimraf=require('rimraf');var zipdir=require(_0xbf5f('0x1'));var jsonpatch=require(_0xbf5f('0x2'));var rp=require(_0xbf5f('0x3'));var moment=require(_0xbf5f('0x4'));var BPromise=require(_0xbf5f('0x5'));var Mustache=require('mustache');var util=require('util');var path=require(_0xbf5f('0x6'));var sox=require(_0xbf5f('0x7'));var csv=require(_0xbf5f('0x8'));var ejs=require('ejs');var fs=require('fs');var fs_extra=require(_0xbf5f('0x9'));var _=require(_0xbf5f('0xa'));var squel=require(_0xbf5f('0xb'));var crypto=require(_0xbf5f('0xc'));var jsforce=require(_0xbf5f('0xd'));var deskjs=require(_0xbf5f('0xe'));var toCsv=require(_0xbf5f('0x8'));var querystring=require(_0xbf5f('0xf'));var Papa=require(_0xbf5f('0x10'));var Redis=require(_0xbf5f('0x11'));var authService=require(_0xbf5f('0x12'));var qs=require(_0xbf5f('0x13'));var as=require(_0xbf5f('0x14'));var hardwareService=require(_0xbf5f('0x15'));var logger=require('../../config/logger')(_0xbf5f('0x16'));var utils=require(_0xbf5f('0x17'));var config=require('../../config/environment');var licenseUtil=require('../../config/license/util');var db=require(_0xbf5f('0x18'))['db'];function respondWithStatusCode(_0xa923d,_0x59bcee){_0x59bcee=_0x59bcee||0xcc;return function(_0x12b31c){if(_0x12b31c){return _0xa923d[_0xbf5f('0x19')](_0x59bcee);}return _0xa923d[_0xbf5f('0x1a')](_0x59bcee)[_0xbf5f('0x1b')]();};}function respondWithResult(_0x128e86,_0x4984dc){_0x4984dc=_0x4984dc||0xc8;return function(_0x246936){if(_0x246936){return _0x128e86['status'](_0x4984dc)['json'](_0x246936);}};}function respondWithFilteredResult(_0x355779,_0x1372d8){return function(_0x569da6){if(_0x569da6){var _0x4c00e6=typeof _0x1372d8[_0xbf5f('0x1c')]==='undefined'&&typeof _0x1372d8[_0xbf5f('0x1d')]===_0xbf5f('0x1e');var _0x3080d4=_0x569da6[_0xbf5f('0x1f')];var _0x4158c9=_0x4c00e6?0x0:_0x1372d8[_0xbf5f('0x1c')];var _0x2fc860=_0x4c00e6?_0x569da6[_0xbf5f('0x1f')]:_0x1372d8[_0xbf5f('0x1c')]+_0x1372d8[_0xbf5f('0x1d')];var _0x4e98e0;if(_0x2fc860>=_0x3080d4){_0x2fc860=_0x3080d4;_0x4e98e0=0xc8;}else{_0x4e98e0=0xce;}_0x355779[_0xbf5f('0x1a')](_0x4e98e0);return _0x355779[_0xbf5f('0x20')](_0xbf5f('0x21'),_0x4158c9+'-'+_0x2fc860+'/'+_0x3080d4)[_0xbf5f('0x22')](_0x569da6);}return null;};}function patchUpdates(_0x225024){return function(_0x590ca3){try{jsonpatch[_0xbf5f('0x23')](_0x590ca3,_0x225024,!![]);}catch(_0x3e4f5f){return BPromise[_0xbf5f('0x24')](_0x3e4f5f);}return _0x590ca3[_0xbf5f('0x25')]();};}function saveUpdates(_0x2c49b5,_0x466189){return function(_0x443889){if(_0x443889){return _0x443889[_0xbf5f('0x26')](_0x2c49b5)[_0xbf5f('0x27')](function(_0x5851cf){return _0x5851cf;});}return null;};}function removeEntity(_0x57afa8,_0x463ddc){return function(_0x1dbece){if(_0x1dbece){return _0x1dbece[_0xbf5f('0x28')]()[_0xbf5f('0x27')](function(){_0x57afa8[_0xbf5f('0x1a')](0xcc)['end']();});}};}function handleEntityNotFound(_0x1a749f,_0x154434){return function(_0x34cba9){if(!_0x34cba9){_0x1a749f[_0xbf5f('0x19')](0x194);}return _0x34cba9;};}function handleError(_0xa8d42,_0x57b9da){_0x57b9da=_0x57b9da||0x1f4;return function(_0x48fe35){logger[_0xbf5f('0x29')](_0x48fe35[_0xbf5f('0x2a')]);if(_0x48fe35[_0xbf5f('0x2b')]){delete _0x48fe35[_0xbf5f('0x2b')];}_0xa8d42['status'](_0x57b9da)['send'](_0x48fe35);};}exports[_0xbf5f('0x2c')]=function(_0x2660ca,_0x27fbce){var _0x3194ae={},_0x34f673={},_0x2a23e2={'count':0x0,'rows':[]};var _0x29c542=_[_0xbf5f('0x2d')](db[_0xbf5f('0x2e')][_0xbf5f('0x2f')],function(_0xe32965){return{'name':_0xe32965[_0xbf5f('0x30')],'type':_0xe32965[_0xbf5f('0x31')]['key']};});_0x34f673[_0xbf5f('0x32')]=_['map'](_0x29c542,_0xbf5f('0x2b'));_0x34f673[_0xbf5f('0x33')]=_[_0xbf5f('0x34')](_0x2660ca['query']);_0x34f673[_0xbf5f('0x35')]=_[_0xbf5f('0x36')](_0x34f673[_0xbf5f('0x32')],_0x34f673[_0xbf5f('0x33')]);_0x3194ae[_0xbf5f('0x37')]=_[_0xbf5f('0x36')](_0x34f673['model'],qs[_0xbf5f('0x38')](_0x2660ca['query'][_0xbf5f('0x38')]));_0x3194ae['attributes']=_0x3194ae[_0xbf5f('0x37')][_0xbf5f('0x39')]?_0x3194ae[_0xbf5f('0x37')]:_0x34f673[_0xbf5f('0x32')];if(!_0x2660ca['query'][_0xbf5f('0x3a')]('nolimit')){_0x3194ae[_0xbf5f('0x1d')]=qs[_0xbf5f('0x1d')](_0x2660ca[_0xbf5f('0x33')][_0xbf5f('0x1d')]);_0x3194ae[_0xbf5f('0x1c')]=qs[_0xbf5f('0x1c')](_0x2660ca[_0xbf5f('0x33')]['offset']);}_0x3194ae[_0xbf5f('0x3b')]=qs[_0xbf5f('0x3c')](_0x2660ca[_0xbf5f('0x33')][_0xbf5f('0x3c')]);_0x3194ae[_0xbf5f('0x3d')]=qs['filters'](_[_0xbf5f('0x3e')](_0x2660ca[_0xbf5f('0x33')],_0x34f673[_0xbf5f('0x35')]),_0x29c542);if(_0x2660ca[_0xbf5f('0x33')][_0xbf5f('0x3f')]){_0x3194ae['where']=_[_0xbf5f('0x40')](_0x3194ae[_0xbf5f('0x3d')],{'$or':_[_0xbf5f('0x2d')](_0x29c542,function(_0x2d31ef){if(_0x2d31ef[_0xbf5f('0x31')]!==_0xbf5f('0x41')){var _0x9c65d1={};_0x9c65d1[_0x2d31ef[_0xbf5f('0x2b')]]={'$like':'%'+_0x2660ca['query'][_0xbf5f('0x3f')]+'%'};return _0x9c65d1;}})});}_0x3194ae=_[_0xbf5f('0x40')]({},_0x3194ae,_0x2660ca['options']);var _0x26b7bd={'where':_0x3194ae[_0xbf5f('0x3d')]};return db[_0xbf5f('0x2e')][_0xbf5f('0x1f')](_0x26b7bd)[_0xbf5f('0x27')](function(_0x786a20){_0x2a23e2[_0xbf5f('0x1f')]=_0x786a20;if(_0x2660ca[_0xbf5f('0x33')][_0xbf5f('0x42')]){_0x3194ae[_0xbf5f('0x43')]=[{'all':!![]}];}return db['Attachment'][_0xbf5f('0x44')](_0x3194ae);})[_0xbf5f('0x27')](function(_0x16eb56){_0x2a23e2[_0xbf5f('0x45')]=_0x16eb56;return _0x2a23e2;})[_0xbf5f('0x27')](respondWithFilteredResult(_0x27fbce,_0x3194ae))[_0xbf5f('0x46')](handleError(_0x27fbce,null));};exports['show']=function(_0x5823c6,_0x304625){var _0x402240={'raw':!![],'where':{'id':_0x5823c6[_0xbf5f('0x47')]['id']}},_0x478f88={};_0x478f88[_0xbf5f('0x32')]=_[_0xbf5f('0x34')](db[_0xbf5f('0x2e')]['rawAttributes']);_0x478f88['query']=_[_0xbf5f('0x34')](_0x5823c6[_0xbf5f('0x33')]);_0x478f88['filters']=_[_0xbf5f('0x36')](_0x478f88[_0xbf5f('0x32')],_0x478f88[_0xbf5f('0x33')]);_0x402240[_0xbf5f('0x37')]=_['intersection'](_0x478f88['model'],qs[_0xbf5f('0x38')](_0x5823c6[_0xbf5f('0x33')][_0xbf5f('0x38')]));_0x402240[_0xbf5f('0x37')]=_0x402240[_0xbf5f('0x37')][_0xbf5f('0x39')]?_0x402240[_0xbf5f('0x37')]:_0x478f88['model'];if(_0x5823c6[_0xbf5f('0x33')][_0xbf5f('0x42')]){_0x402240[_0xbf5f('0x43')]=[{'all':!![]}];}_0x402240=_[_0xbf5f('0x40')]({},_0x402240,_0x5823c6[_0xbf5f('0x48')]);return db[_0xbf5f('0x2e')][_0xbf5f('0x49')](_0x402240)[_0xbf5f('0x27')](handleEntityNotFound(_0x304625,null))[_0xbf5f('0x27')](respondWithResult(_0x304625,null))[_0xbf5f('0x46')](handleError(_0x304625,null));};exports[_0xbf5f('0x4a')]=function(_0xa28259,_0x178534){var _0x449da0={'where':{'id':_0xa28259['params']['id']}},_0x5e8fbd={};_0x5e8fbd[_0xbf5f('0x32')]=_[_0xbf5f('0x34')](db['Attachment'][_0xbf5f('0x2f')]);_0x449da0[_0xbf5f('0x37')]=_[_0xbf5f('0x36')](_0x5e8fbd[_0xbf5f('0x32')],qs[_0xbf5f('0x38')](_0xa28259[_0xbf5f('0x33')][_0xbf5f('0x38')]));_0x449da0[_0xbf5f('0x37')]=_0x449da0[_0xbf5f('0x37')][_0xbf5f('0x39')]?_0x449da0[_0xbf5f('0x37')]:_0x5e8fbd[_0xbf5f('0x32')];if(_0xa28259[_0xbf5f('0x33')]['includeAll']){_0x449da0['include']=[{'all':!![]}];}_0x449da0=_[_0xbf5f('0x40')]({},_0x449da0,_0xa28259[_0xbf5f('0x48')]);return db[_0xbf5f('0x2e')][_0xbf5f('0x49')](_0x449da0)[_0xbf5f('0x27')](handleEntityNotFound(_0x178534,null))[_0xbf5f('0x27')](function(_0x4bad4a){if(_0x4bad4a){var _0x3c1785=_0x4bad4a['get']({'plain':!![]});_0x3c1785=qs[_0xbf5f('0x4b')](_0x3c1785,['id',_0xbf5f('0x4c'),_0xbf5f('0x4d')]);_0xa28259['body']=_[_0xbf5f('0x4b')](_0xa28259[_0xbf5f('0x4e')],['id',_0xbf5f('0x4c'),'updatedAt']);return db[_0xbf5f('0x2e')][_0xbf5f('0x4f')](_[_0xbf5f('0x40')](_0x3c1785,_0xa28259[_0xbf5f('0x4e')]),{'include':_0xa28259[_0xbf5f('0x33')][_0xbf5f('0x42')]?[{'all':!![]}]:undefined});}})[_0xbf5f('0x27')](respondWithResult(_0x178534,0xc9))['catch'](handleError(_0x178534,null));};exports[_0xbf5f('0x26')]=function(_0x102379,_0x176bfa){if(_0x102379[_0xbf5f('0x4e')]['id']){delete _0x102379[_0xbf5f('0x4e')]['id'];}return db[_0xbf5f('0x2e')][_0xbf5f('0x49')]({'where':{'id':_0x102379[_0xbf5f('0x47')]['id']}})[_0xbf5f('0x27')](handleEntityNotFound(_0x176bfa,null))[_0xbf5f('0x27')](saveUpdates(_0x102379[_0xbf5f('0x4e')],null))[_0xbf5f('0x27')](respondWithResult(_0x176bfa,null))[_0xbf5f('0x46')](handleError(_0x176bfa,null));};exports['destroy']=function(_0x4d20ee,_0x88d922){return db[_0xbf5f('0x2e')]['find']({'where':{'id':_0x4d20ee['params']['id']}})['then'](handleEntityNotFound(_0x88d922,null))['then'](removeEntity(_0x88d922,null))[_0xbf5f('0x46')](handleError(_0x88d922,null));};exports[_0xbf5f('0x4f')]=function(_0x407c2e,_0x3513ef,_0xbe6b45){_0x407c2e[_0xbf5f('0x4e')][_0xbf5f('0x2b')]=_0x407c2e[_0xbf5f('0x50')]['originalname'];_0x407c2e['body']['basename']=_0x407c2e[_0xbf5f('0x50')][_0xbf5f('0x51')];_0x407c2e[_0xbf5f('0x4e')]['type']=_0x407c2e[_0xbf5f('0x50')][_0xbf5f('0x52')];return db[_0xbf5f('0x2e')][_0xbf5f('0x4f')](_0x407c2e[_0xbf5f('0x4e')])[_0xbf5f('0x27')](respondWithResult(_0x3513ef,0xc9))[_0xbf5f('0x46')](handleError(_0x3513ef,null));};exports[_0xbf5f('0x53')]=function(_0x2b6e72,_0x31110a,_0x1886d9){return db[_0xbf5f('0x2e')]['findOne']({'where':{'id':_0x2b6e72[_0xbf5f('0x47')]['id']},'raw':!![]})['then'](handleEntityNotFound(_0x31110a,null))[_0xbf5f('0x27')](function(_0x7b13dd){if(_0x7b13dd){var _0x293744=_0x7b13dd[_0xbf5f('0x54')]!==null;var _0x1bf449=path[_0xbf5f('0x55')](config[_0xbf5f('0x56')],_0xbf5f('0x57'));if(_0x293744){_0x1bf449=path['join'](_0x1bf449,_0xbf5f('0x58'));}var _0x2bd2c9=path[_0xbf5f('0x55')](_0x1bf449,_0x7b13dd[_0xbf5f('0x59')]);return _0x31110a[_0xbf5f('0x53')](_0x2bd2c9);}})[_0xbf5f('0x46')](handleError(_0x31110a,null));}; \ No newline at end of file +var _0xb7de=['order','where','filter','merge','VIRTUAL','options','includeAll','include','findAll','rows','catch','show','params','keys','find','clone','updatedAt','body','createdAt','create','destroy','file','originalname','basename','filename','mimetype','download','findOne','ChatOfflineMessageId','join','root','server/files/attachments/','rimraf','request-promise','moment','bluebird','mustache','path','to-csv','ejs','squel','crypto','desk.js','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/logger','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','status','end','offset','undefined','limit','count','set','Content-Range','json','apply','reject','save','update','then','sendStatus','error','stack','name','send','index','map','Attachment','rawAttributes','fieldName','type','model','query','filters','intersection','attributes','fields','length','nolimit'];(function(_0xae7c2f,_0xf31e04){var _0x5d7001=function(_0x4eeadb){while(--_0x4eeadb){_0xae7c2f['push'](_0xae7c2f['shift']());}};_0x5d7001(++_0xf31e04);}(_0xb7de,0x1d3));var _0xeb7d=function(_0xb0f7c3,_0x4eae95){_0xb0f7c3=_0xb0f7c3-0x0;var _0x28ea68=_0xb7de[_0xb0f7c3];return _0x28ea68;};'use strict';var emlformat=require('eml-format');var rimraf=require(_0xeb7d('0x0'));var zipdir=require('zip-dir');var jsonpatch=require('fast-json-patch');var rp=require(_0xeb7d('0x1'));var moment=require(_0xeb7d('0x2'));var BPromise=require(_0xeb7d('0x3'));var Mustache=require(_0xeb7d('0x4'));var util=require('util');var path=require(_0xeb7d('0x5'));var sox=require('sox');var csv=require(_0xeb7d('0x6'));var ejs=require(_0xeb7d('0x7'));var fs=require('fs');var fs_extra=require('fs-extra');var _=require('lodash');var squel=require(_0xeb7d('0x8'));var crypto=require(_0xeb7d('0x9'));var jsforce=require('jsforce');var deskjs=require(_0xeb7d('0xa'));var toCsv=require(_0xeb7d('0x6'));var querystring=require(_0xeb7d('0xb'));var Papa=require(_0xeb7d('0xc'));var Redis=require(_0xeb7d('0xd'));var authService=require(_0xeb7d('0xe'));var qs=require(_0xeb7d('0xf'));var as=require(_0xeb7d('0x10'));var hardwareService=require('../../config/license/hardware');var logger=require(_0xeb7d('0x11'))('api');var utils=require(_0xeb7d('0x12'));var config=require(_0xeb7d('0x13'));var licenseUtil=require(_0xeb7d('0x14'));var db=require(_0xeb7d('0x15'))['db'];function respondWithStatusCode(_0x39cb6c,_0x3de671){_0x3de671=_0x3de671||0xcc;return function(_0x3642f3){if(_0x3642f3){return _0x39cb6c['sendStatus'](_0x3de671);}return _0x39cb6c[_0xeb7d('0x16')](_0x3de671)[_0xeb7d('0x17')]();};}function respondWithResult(_0x2adc66,_0x59dffd){_0x59dffd=_0x59dffd||0xc8;return function(_0x11a5a8){if(_0x11a5a8){return _0x2adc66[_0xeb7d('0x16')](_0x59dffd)['json'](_0x11a5a8);}};}function respondWithFilteredResult(_0x462d3e,_0x482e8f){return function(_0x209961){if(_0x209961){var _0x328218=typeof _0x482e8f[_0xeb7d('0x18')]===_0xeb7d('0x19')&&typeof _0x482e8f[_0xeb7d('0x1a')]===_0xeb7d('0x19');var _0x2ae46e=_0x209961[_0xeb7d('0x1b')];var _0x50ba79=_0x328218?0x0:_0x482e8f[_0xeb7d('0x18')];var _0x569257=_0x328218?_0x209961['count']:_0x482e8f[_0xeb7d('0x18')]+_0x482e8f[_0xeb7d('0x1a')];var _0x14e28e;if(_0x569257>=_0x2ae46e){_0x569257=_0x2ae46e;_0x14e28e=0xc8;}else{_0x14e28e=0xce;}_0x462d3e[_0xeb7d('0x16')](_0x14e28e);return _0x462d3e[_0xeb7d('0x1c')](_0xeb7d('0x1d'),_0x50ba79+'-'+_0x569257+'/'+_0x2ae46e)[_0xeb7d('0x1e')](_0x209961);}return null;};}function patchUpdates(_0x5d8122){return function(_0x464a15){try{jsonpatch[_0xeb7d('0x1f')](_0x464a15,_0x5d8122,!![]);}catch(_0x11a4ac){return BPromise[_0xeb7d('0x20')](_0x11a4ac);}return _0x464a15[_0xeb7d('0x21')]();};}function saveUpdates(_0x58fe5c,_0x4f336a){return function(_0x42a039){if(_0x42a039){return _0x42a039[_0xeb7d('0x22')](_0x58fe5c)[_0xeb7d('0x23')](function(_0x42ad58){return _0x42ad58;});}return null;};}function removeEntity(_0x285787,_0xf88a58){return function(_0x23486f){if(_0x23486f){return _0x23486f['destroy']()[_0xeb7d('0x23')](function(){_0x285787[_0xeb7d('0x16')](0xcc)['end']();});}};}function handleEntityNotFound(_0x5dd527,_0x4f8502){return function(_0x25382e){if(!_0x25382e){_0x5dd527[_0xeb7d('0x24')](0x194);}return _0x25382e;};}function handleError(_0x5d7045,_0x272da4){_0x272da4=_0x272da4||0x1f4;return function(_0x1f89a4){logger[_0xeb7d('0x25')](_0x1f89a4[_0xeb7d('0x26')]);if(_0x1f89a4['name']){delete _0x1f89a4[_0xeb7d('0x27')];}_0x5d7045[_0xeb7d('0x16')](_0x272da4)[_0xeb7d('0x28')](_0x1f89a4);};}exports[_0xeb7d('0x29')]=function(_0x4bd2f2,_0x2a5d68){var _0x5e9f43={},_0x5655ad={},_0x252088={'count':0x0,'rows':[]};var _0x10cc15=_[_0xeb7d('0x2a')](db[_0xeb7d('0x2b')][_0xeb7d('0x2c')],function(_0x13bf46){return{'name':_0x13bf46[_0xeb7d('0x2d')],'type':_0x13bf46[_0xeb7d('0x2e')]['key']};});_0x5655ad[_0xeb7d('0x2f')]=_[_0xeb7d('0x2a')](_0x10cc15,_0xeb7d('0x27'));_0x5655ad[_0xeb7d('0x30')]=_['keys'](_0x4bd2f2[_0xeb7d('0x30')]);_0x5655ad[_0xeb7d('0x31')]=_[_0xeb7d('0x32')](_0x5655ad[_0xeb7d('0x2f')],_0x5655ad['query']);_0x5e9f43[_0xeb7d('0x33')]=_[_0xeb7d('0x32')](_0x5655ad['model'],qs['fields'](_0x4bd2f2[_0xeb7d('0x30')][_0xeb7d('0x34')]));_0x5e9f43[_0xeb7d('0x33')]=_0x5e9f43[_0xeb7d('0x33')][_0xeb7d('0x35')]?_0x5e9f43[_0xeb7d('0x33')]:_0x5655ad[_0xeb7d('0x2f')];if(!_0x4bd2f2[_0xeb7d('0x30')]['hasOwnProperty'](_0xeb7d('0x36'))){_0x5e9f43[_0xeb7d('0x1a')]=qs[_0xeb7d('0x1a')](_0x4bd2f2['query']['limit']);_0x5e9f43['offset']=qs[_0xeb7d('0x18')](_0x4bd2f2[_0xeb7d('0x30')][_0xeb7d('0x18')]);}_0x5e9f43[_0xeb7d('0x37')]=qs['sort'](_0x4bd2f2[_0xeb7d('0x30')]['sort']);_0x5e9f43[_0xeb7d('0x38')]=qs['filters'](_['pick'](_0x4bd2f2[_0xeb7d('0x30')],_0x5655ad['filters']),_0x10cc15);if(_0x4bd2f2[_0xeb7d('0x30')][_0xeb7d('0x39')]){_0x5e9f43[_0xeb7d('0x38')]=_[_0xeb7d('0x3a')](_0x5e9f43[_0xeb7d('0x38')],{'$or':_[_0xeb7d('0x2a')](_0x10cc15,function(_0x431fe4){if(_0x431fe4[_0xeb7d('0x2e')]!==_0xeb7d('0x3b')){var _0x3cb0b6={};_0x3cb0b6[_0x431fe4[_0xeb7d('0x27')]]={'$like':'%'+_0x4bd2f2['query'][_0xeb7d('0x39')]+'%'};return _0x3cb0b6;}})});}_0x5e9f43=_[_0xeb7d('0x3a')]({},_0x5e9f43,_0x4bd2f2[_0xeb7d('0x3c')]);var _0x52c77a={'where':_0x5e9f43[_0xeb7d('0x38')]};return db[_0xeb7d('0x2b')][_0xeb7d('0x1b')](_0x52c77a)['then'](function(_0x314fd9){_0x252088[_0xeb7d('0x1b')]=_0x314fd9;if(_0x4bd2f2[_0xeb7d('0x30')][_0xeb7d('0x3d')]){_0x5e9f43[_0xeb7d('0x3e')]=[{'all':!![]}];}return db[_0xeb7d('0x2b')][_0xeb7d('0x3f')](_0x5e9f43);})[_0xeb7d('0x23')](function(_0x53dd29){_0x252088[_0xeb7d('0x40')]=_0x53dd29;return _0x252088;})['then'](respondWithFilteredResult(_0x2a5d68,_0x5e9f43))[_0xeb7d('0x41')](handleError(_0x2a5d68,null));};exports[_0xeb7d('0x42')]=function(_0x197b89,_0x52ca4a){var _0x1cab04={'raw':!![],'where':{'id':_0x197b89[_0xeb7d('0x43')]['id']}},_0x53f2ba={};_0x53f2ba[_0xeb7d('0x2f')]=_[_0xeb7d('0x44')](db[_0xeb7d('0x2b')][_0xeb7d('0x2c')]);_0x53f2ba[_0xeb7d('0x30')]=_['keys'](_0x197b89['query']);_0x53f2ba[_0xeb7d('0x31')]=_['intersection'](_0x53f2ba[_0xeb7d('0x2f')],_0x53f2ba[_0xeb7d('0x30')]);_0x1cab04[_0xeb7d('0x33')]=_[_0xeb7d('0x32')](_0x53f2ba[_0xeb7d('0x2f')],qs[_0xeb7d('0x34')](_0x197b89[_0xeb7d('0x30')][_0xeb7d('0x34')]));_0x1cab04[_0xeb7d('0x33')]=_0x1cab04[_0xeb7d('0x33')][_0xeb7d('0x35')]?_0x1cab04[_0xeb7d('0x33')]:_0x53f2ba[_0xeb7d('0x2f')];if(_0x197b89[_0xeb7d('0x30')][_0xeb7d('0x3d')]){_0x1cab04[_0xeb7d('0x3e')]=[{'all':!![]}];}_0x1cab04=_[_0xeb7d('0x3a')]({},_0x1cab04,_0x197b89[_0xeb7d('0x3c')]);return db[_0xeb7d('0x2b')][_0xeb7d('0x45')](_0x1cab04)[_0xeb7d('0x23')](handleEntityNotFound(_0x52ca4a,null))['then'](respondWithResult(_0x52ca4a,null))[_0xeb7d('0x41')](handleError(_0x52ca4a,null));};exports[_0xeb7d('0x46')]=function(_0x1b2df3,_0x5f232e){var _0x37f710={'where':{'id':_0x1b2df3[_0xeb7d('0x43')]['id']}},_0x4c9f1a={};_0x4c9f1a[_0xeb7d('0x2f')]=_[_0xeb7d('0x44')](db[_0xeb7d('0x2b')][_0xeb7d('0x2c')]);_0x37f710[_0xeb7d('0x33')]=_['intersection'](_0x4c9f1a[_0xeb7d('0x2f')],qs[_0xeb7d('0x34')](_0x1b2df3[_0xeb7d('0x30')]['fields']));_0x37f710[_0xeb7d('0x33')]=_0x37f710[_0xeb7d('0x33')][_0xeb7d('0x35')]?_0x37f710[_0xeb7d('0x33')]:_0x4c9f1a[_0xeb7d('0x2f')];if(_0x1b2df3['query'][_0xeb7d('0x3d')]){_0x37f710[_0xeb7d('0x3e')]=[{'all':!![]}];}_0x37f710=_[_0xeb7d('0x3a')]({},_0x37f710,_0x1b2df3[_0xeb7d('0x3c')]);return db['Attachment'][_0xeb7d('0x45')](_0x37f710)['then'](handleEntityNotFound(_0x5f232e,null))[_0xeb7d('0x23')](function(_0x1edcad){if(_0x1edcad){var _0x3d8d8c=_0x1edcad['get']({'plain':!![]});_0x3d8d8c=qs['omit'](_0x3d8d8c,['id','createdAt',_0xeb7d('0x47')]);_0x1b2df3[_0xeb7d('0x48')]=_['omit'](_0x1b2df3['body'],['id',_0xeb7d('0x49'),_0xeb7d('0x47')]);return db[_0xeb7d('0x2b')][_0xeb7d('0x4a')](_[_0xeb7d('0x3a')](_0x3d8d8c,_0x1b2df3[_0xeb7d('0x48')]),{'include':_0x1b2df3[_0xeb7d('0x30')][_0xeb7d('0x3d')]?[{'all':!![]}]:undefined});}})[_0xeb7d('0x23')](respondWithResult(_0x5f232e,0xc9))[_0xeb7d('0x41')](handleError(_0x5f232e,null));};exports[_0xeb7d('0x22')]=function(_0x65c02a,_0x35b9b0){if(_0x65c02a[_0xeb7d('0x48')]['id']){delete _0x65c02a['body']['id'];}return db[_0xeb7d('0x2b')][_0xeb7d('0x45')]({'where':{'id':_0x65c02a[_0xeb7d('0x43')]['id']}})[_0xeb7d('0x23')](handleEntityNotFound(_0x35b9b0,null))[_0xeb7d('0x23')](saveUpdates(_0x65c02a['body'],null))['then'](respondWithResult(_0x35b9b0,null))[_0xeb7d('0x41')](handleError(_0x35b9b0,null));};exports[_0xeb7d('0x4b')]=function(_0x1a540a,_0x418ee6){return db['Attachment'][_0xeb7d('0x45')]({'where':{'id':_0x1a540a[_0xeb7d('0x43')]['id']}})[_0xeb7d('0x23')](handleEntityNotFound(_0x418ee6,null))[_0xeb7d('0x23')](removeEntity(_0x418ee6,null))['catch'](handleError(_0x418ee6,null));};exports[_0xeb7d('0x4a')]=function(_0xaf2dbe,_0x348875,_0x3d6ad3){_0xaf2dbe[_0xeb7d('0x48')][_0xeb7d('0x27')]=_0xaf2dbe[_0xeb7d('0x4c')][_0xeb7d('0x4d')];_0xaf2dbe[_0xeb7d('0x48')][_0xeb7d('0x4e')]=_0xaf2dbe[_0xeb7d('0x4c')][_0xeb7d('0x4f')];_0xaf2dbe[_0xeb7d('0x48')][_0xeb7d('0x2e')]=_0xaf2dbe[_0xeb7d('0x4c')][_0xeb7d('0x50')];return db[_0xeb7d('0x2b')][_0xeb7d('0x4a')](_0xaf2dbe['body'])[_0xeb7d('0x23')](respondWithResult(_0x348875,0xc9))[_0xeb7d('0x41')](handleError(_0x348875,null));};exports[_0xeb7d('0x51')]=function(_0x31fc74,_0x3ee9ad,_0x374a1b){return db['Attachment'][_0xeb7d('0x52')]({'where':{'id':_0x31fc74[_0xeb7d('0x43')]['id']},'raw':!![]})[_0xeb7d('0x23')](handleEntityNotFound(_0x3ee9ad,null))[_0xeb7d('0x23')](function(_0x20233f){if(_0x20233f){var _0x5f037a=_0x20233f[_0xeb7d('0x53')]!==null;var _0x4bec02=path[_0xeb7d('0x54')](config[_0xeb7d('0x55')],_0xeb7d('0x56'));if(_0x5f037a){_0x4bec02=path[_0xeb7d('0x54')](_0x4bec02,'offline-chat/');}var _0x93158=path[_0xeb7d('0x54')](_0x4bec02,_0x20233f['basename']);return _0x3ee9ad['download'](_0x93158);}})[_0xeb7d('0x41')](handleError(_0x3ee9ad,null));}; \ No newline at end of file diff --git a/server/api/attachment/attachment.model.js b/server/api/attachment/attachment.model.js index 9800773..7f5559e 100644 --- a/server/api/attachment/attachment.model.js +++ b/server/api/attachment/attachment.model.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xe92a=['define','Attachment','attachments','lodash','util','../../config/logger','moment','bluebird','request-promise','../../config/environment'];(function(_0x4e0d6f,_0x47399c){var _0x16acce=function(_0x528bd9){while(--_0x528bd9){_0x4e0d6f['push'](_0x4e0d6f['shift']());}};_0x16acce(++_0x47399c);}(_0xe92a,0x7b));var _0xae92=function(_0x3f0968,_0x1788a1){_0x3f0968=_0x3f0968-0x0;var _0x57b859=_0xe92a[_0x3f0968];return _0x57b859;};'use strict';var _=require(_0xae92('0x0'));var util=require(_0xae92('0x1'));var logger=require(_0xae92('0x2'))('api');var moment=require(_0xae92('0x3'));var BPromise=require(_0xae92('0x4'));var rp=require(_0xae92('0x5'));var fs=require('fs');var path=require('path');var rimraf=require('rimraf');var config=require(_0xae92('0x6'));var attributes=require('./attachment.attributes');module['exports']=function(_0x251960,_0xf6d53b){return _0x251960[_0xae92('0x7')](_0xae92('0x8'),attributes,{'tableName':_0xae92('0x9'),'paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file +var _0xd96b=['bluebird','request-promise','rimraf','../../config/environment','./attachment.attributes','exports','define','Attachment','attachments','lodash','../../config/logger','api','moment'];(function(_0x3abd15,_0x2b58f6){var _0x10daaf=function(_0x206552){while(--_0x206552){_0x3abd15['push'](_0x3abd15['shift']());}};_0x10daaf(++_0x2b58f6);}(_0xd96b,0x15b));var _0xbd96=function(_0x310fb2,_0xdee53d){_0x310fb2=_0x310fb2-0x0;var _0x3a29ea=_0xd96b[_0x310fb2];return _0x3a29ea;};'use strict';var _=require(_0xbd96('0x0'));var util=require('util');var logger=require(_0xbd96('0x1'))(_0xbd96('0x2'));var moment=require(_0xbd96('0x3'));var BPromise=require(_0xbd96('0x4'));var rp=require(_0xbd96('0x5'));var fs=require('fs');var path=require('path');var rimraf=require(_0xbd96('0x6'));var config=require(_0xbd96('0x7'));var attributes=require(_0xbd96('0x8'));module[_0xbd96('0x9')]=function(_0x4a5d7f,_0x360f95){return _0x4a5d7f[_0xbd96('0xa')](_0xbd96('0xb'),attributes,{'tableName':_0xbd96('0xc'),'paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file diff --git a/server/api/attachment/attachment.rpc.js b/server/api/attachment/attachment.rpc.js index d0538bd..5ae3c07 100644 --- a/server/api/attachment/attachment.rpc.js +++ b/server/api/attachment/attachment.rpc.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x9bde=['stringify','util','bluebird','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','http','request','then','info','debug','Attachment,\x20%s,\x20%s,\x20%s','request\x20sent','error','code','message','Attachment,\x20%s,\x20%s','result','catch','CreateAttachment','Attachment','body','options','raw'];(function(_0x260f28,_0x4e9b30){var _0x3aefcc=function(_0x223b18){while(--_0x223b18){_0x260f28['push'](_0x260f28['shift']());}};_0x3aefcc(++_0x4e9b30);}(_0x9bde,0xe1));var _0xe9bd=function(_0x449048,_0x2dc69b){_0x449048=_0x449048-0x0;var _0x45b444=_0x9bde[_0x449048];return _0x45b444;};'use strict';var _=require('lodash');var util=require(_0xe9bd('0x0'));var moment=require('moment');var BPromise=require(_0xe9bd('0x1'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0xe9bd('0x2'));var db=require(_0xe9bd('0x3'))['db'];var utils=require(_0xe9bd('0x4'));var logger=require(_0xe9bd('0x5'))(_0xe9bd('0x6'));var config=require(_0xe9bd('0x7'));var jayson=require(_0xe9bd('0x8'));var client=jayson['client'][_0xe9bd('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x5f18fe,_0x22a438,_0xa66ae2){return new BPromise(function(_0x2d5c75,_0x3ef9e3){return client[_0xe9bd('0xa')](_0x5f18fe,_0xa66ae2)[_0xe9bd('0xb')](function(_0x439abc){logger[_0xe9bd('0xc')]('Attachment,\x20%s,\x20%s',_0x22a438,'request\x20sent');logger[_0xe9bd('0xd')](_0xe9bd('0xe'),_0x22a438,_0xe9bd('0xf'),JSON['stringify'](_0x439abc));if(_0x439abc[_0xe9bd('0x10')]){if(_0x439abc[_0xe9bd('0x10')][_0xe9bd('0x11')]===0x1f4){logger[_0xe9bd('0x10')]('Attachment,\x20%s,\x20%s',_0x22a438,_0x439abc[_0xe9bd('0x10')]['message']);return _0x3ef9e3(_0x439abc[_0xe9bd('0x10')][_0xe9bd('0x12')]);}logger[_0xe9bd('0x10')]('Attachment,\x20%s,\x20%s',_0x22a438,_0x439abc['error'][_0xe9bd('0x12')]);return _0x2d5c75(_0x439abc[_0xe9bd('0x10')][_0xe9bd('0x12')]);}else{logger[_0xe9bd('0xc')](_0xe9bd('0x13'),_0x22a438,_0xe9bd('0xf'));_0x2d5c75(_0x439abc[_0xe9bd('0x14')]['message']);}})[_0xe9bd('0x15')](function(_0x464a1b){logger[_0xe9bd('0x10')]('Attachment,\x20%s,\x20%s',_0x22a438,_0x464a1b);_0x3ef9e3(_0x464a1b);});});}exports[_0xe9bd('0x16')]=function(_0x3bae08){var _0x34ba2b=this;return new Promise(function(_0x330733,_0x5cf674){return db[_0xe9bd('0x17')]['create'](_0x3bae08[_0xe9bd('0x18')],{'raw':_0x3bae08['options']?_0x3bae08[_0xe9bd('0x19')][_0xe9bd('0x1a')]===undefined?!![]:![]:!![]})[_0xe9bd('0xb')](function(_0x3dda13){logger[_0xe9bd('0xc')](_0xe9bd('0x16'),_0x3bae08);logger[_0xe9bd('0xd')]('CreateAttachment',_0x3bae08,JSON[_0xe9bd('0x1b')](_0x3dda13));_0x330733(_0x3dda13);})[_0xe9bd('0x15')](function(_0x4ecaf5){logger[_0xe9bd('0x10')]('CreateAttachment',_0x4ecaf5[_0xe9bd('0x12')],_0x3bae08);_0x5cf674(_0x34ba2b[_0xe9bd('0x10')](0x1f4,_0x4ecaf5[_0xe9bd('0x12')]));});});}; \ No newline at end of file +var _0x3eec=['../../config/logger','rpc','../../config/environment','client','http','request','then','request\x20sent','debug','Attachment,\x20%s,\x20%s,\x20%s','error','code','message','Attachment,\x20%s,\x20%s','info','result','catch','CreateAttachment','Attachment','create','body','options','raw','stringify','lodash','util','moment','bluebird','ioredis','../../mysqldb','../../config/utils'];(function(_0x9df060,_0x253d33){var _0x338dfe=function(_0x17d9a5){while(--_0x17d9a5){_0x9df060['push'](_0x9df060['shift']());}};_0x338dfe(++_0x253d33);}(_0x3eec,0x1e9));var _0xc3ee=function(_0x327fd8,_0x36151a){_0x327fd8=_0x327fd8-0x0;var _0x33f2c5=_0x3eec[_0x327fd8];return _0x33f2c5;};'use strict';var _=require(_0xc3ee('0x0'));var util=require(_0xc3ee('0x1'));var moment=require(_0xc3ee('0x2'));var BPromise=require(_0xc3ee('0x3'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0xc3ee('0x4'));var db=require(_0xc3ee('0x5'))['db'];var utils=require(_0xc3ee('0x6'));var logger=require(_0xc3ee('0x7'))(_0xc3ee('0x8'));var config=require(_0xc3ee('0x9'));var jayson=require('jayson/promise');var client=jayson[_0xc3ee('0xa')][_0xc3ee('0xb')]({'port':0x232a});function respondWithRpcPromise(_0xea4318,_0x2cc750,_0x356374){return new BPromise(function(_0x3d74c0,_0xd88f6){return client[_0xc3ee('0xc')](_0xea4318,_0x356374)[_0xc3ee('0xd')](function(_0x23e9c0){logger['info']('Attachment,\x20%s,\x20%s',_0x2cc750,_0xc3ee('0xe'));logger[_0xc3ee('0xf')](_0xc3ee('0x10'),_0x2cc750,_0xc3ee('0xe'),JSON['stringify'](_0x23e9c0));if(_0x23e9c0[_0xc3ee('0x11')]){if(_0x23e9c0['error'][_0xc3ee('0x12')]===0x1f4){logger[_0xc3ee('0x11')]('Attachment,\x20%s,\x20%s',_0x2cc750,_0x23e9c0['error'][_0xc3ee('0x13')]);return _0xd88f6(_0x23e9c0['error'][_0xc3ee('0x13')]);}logger['error'](_0xc3ee('0x14'),_0x2cc750,_0x23e9c0['error'][_0xc3ee('0x13')]);return _0x3d74c0(_0x23e9c0[_0xc3ee('0x11')][_0xc3ee('0x13')]);}else{logger[_0xc3ee('0x15')](_0xc3ee('0x14'),_0x2cc750,_0xc3ee('0xe'));_0x3d74c0(_0x23e9c0[_0xc3ee('0x16')]['message']);}})[_0xc3ee('0x17')](function(_0x4eea89){logger[_0xc3ee('0x11')](_0xc3ee('0x14'),_0x2cc750,_0x4eea89);_0xd88f6(_0x4eea89);});});}exports[_0xc3ee('0x18')]=function(_0x219db0){var _0x304889=this;return new Promise(function(_0x3acb0c,_0xd4b414){return db[_0xc3ee('0x19')][_0xc3ee('0x1a')](_0x219db0[_0xc3ee('0x1b')],{'raw':_0x219db0[_0xc3ee('0x1c')]?_0x219db0[_0xc3ee('0x1c')][_0xc3ee('0x1d')]===undefined?!![]:![]:!![]})[_0xc3ee('0xd')](function(_0x3e7224){logger[_0xc3ee('0x15')](_0xc3ee('0x18'),_0x219db0);logger[_0xc3ee('0xf')](_0xc3ee('0x18'),_0x219db0,JSON[_0xc3ee('0x1e')](_0x3e7224));_0x3acb0c(_0x3e7224);})[_0xc3ee('0x17')](function(_0x493fea){logger['error'](_0xc3ee('0x18'),_0x493fea[_0xc3ee('0x13')],_0x219db0);_0xd4b414(_0x304889[_0xc3ee('0x11')](0x1f4,_0x493fea[_0xc3ee('0x13')]));});});}; \ No newline at end of file diff --git a/server/api/attachment/index.js b/server/api/attachment/index.js index 6fab594..86d825c 100644 --- a/server/api/attachment/index.js +++ b/server/api/attachment/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x2032=['./attachment.controller','get','isAuthenticated','index','/:id','show','download','/:id/clone','clone','root','server/files/attachments/','now','post','single','file','create','put','update','delete','destroy','exports','util','path','connect-timeout','Router','fs-extra','../../components/interaction/service','../../config/environment'];(function(_0x1e4137,_0x82b6f9){var _0x76bcb0=function(_0x4f4c05){while(--_0x4f4c05){_0x1e4137['push'](_0x1e4137['shift']());}};_0x76bcb0(++_0x82b6f9);}(_0x2032,0xd9));var _0x2203=function(_0x81a9e4,_0x4f56e9){_0x81a9e4=_0x81a9e4-0x0;var _0x1bbe7b=_0x2032[_0x81a9e4];return _0x1bbe7b;};'use strict';var multer=require('multer');var util=require(_0x2203('0x0'));var path=require(_0x2203('0x1'));var timeout=require(_0x2203('0x2'));var express=require('express');var router=express[_0x2203('0x3')]();var fs_extra=require(_0x2203('0x4'));var auth=require('../../components/auth/service');var interaction=require(_0x2203('0x5'));var config=require(_0x2203('0x6'));var controller=require(_0x2203('0x7'));router[_0x2203('0x8')]('/',auth[_0x2203('0x9')](),controller[_0x2203('0xa')]);router[_0x2203('0x8')](_0x2203('0xb'),auth[_0x2203('0x9')](),controller[_0x2203('0xc')]);router[_0x2203('0x8')]('/:id/download',auth['isAuthenticated'](),controller[_0x2203('0xd')]);router['post'](_0x2203('0xe'),auth[_0x2203('0x9')](),controller[_0x2203('0xf')]);var upload=multer({'storage':multer['diskStorage']({'destination':function(_0x849049,_0x4a6832,_0x3f690a){_0x3f690a(null,path['join'](config[_0x2203('0x10')],_0x2203('0x11')));},'filename':function(_0x4b9376,_0x583bc7,_0x585c76){_0x585c76(null,util['format']('%s-%s',Date[_0x2203('0x12')](),_0x583bc7['originalname']['replace'](/[+@&\/\\#,+()$~%'":*?<>{}\s\\|]/g,'-')));}})});router[_0x2203('0x13')]('/',upload[_0x2203('0x14')](_0x2203('0x15')),controller[_0x2203('0x16')]);router[_0x2203('0x17')](_0x2203('0xb'),auth[_0x2203('0x9')](),controller[_0x2203('0x18')]);router[_0x2203('0x19')](_0x2203('0xb'),auth['isAuthenticated'](),controller[_0x2203('0x1a')]);module[_0x2203('0x1b')]=router; \ No newline at end of file +var _0x5f66=['fs-extra','../../components/auth/service','../../config/environment','get','isAuthenticated','/:id','show','/:id/download','/:id/clone','clone','diskStorage','root','format','%s-%s','now','originalname','replace','post','single','file','create','delete','destroy','exports','util','connect-timeout','express','Router'];(function(_0xb301d4,_0x27ed18){var _0x3b5bde=function(_0x1fbc5f){while(--_0x1fbc5f){_0xb301d4['push'](_0xb301d4['shift']());}};_0x3b5bde(++_0x27ed18);}(_0x5f66,0x1a0));var _0x65f6=function(_0xa464c9,_0x7c86d8){_0xa464c9=_0xa464c9-0x0;var _0x3d73c4=_0x5f66[_0xa464c9];return _0x3d73c4;};'use strict';var multer=require('multer');var util=require(_0x65f6('0x0'));var path=require('path');var timeout=require(_0x65f6('0x1'));var express=require(_0x65f6('0x2'));var router=express[_0x65f6('0x3')]();var fs_extra=require(_0x65f6('0x4'));var auth=require(_0x65f6('0x5'));var interaction=require('../../components/interaction/service');var config=require(_0x65f6('0x6'));var controller=require('./attachment.controller');router[_0x65f6('0x7')]('/',auth[_0x65f6('0x8')](),controller['index']);router['get'](_0x65f6('0x9'),auth[_0x65f6('0x8')](),controller[_0x65f6('0xa')]);router[_0x65f6('0x7')](_0x65f6('0xb'),auth[_0x65f6('0x8')](),controller['download']);router['post'](_0x65f6('0xc'),auth[_0x65f6('0x8')](),controller[_0x65f6('0xd')]);var upload=multer({'storage':multer[_0x65f6('0xe')]({'destination':function(_0x50d26d,_0x41a7fd,_0x571436){_0x571436(null,path['join'](config[_0x65f6('0xf')],'server/files/attachments/'));},'filename':function(_0x419819,_0x4862a5,_0x2f964a){_0x2f964a(null,util[_0x65f6('0x10')](_0x65f6('0x11'),Date[_0x65f6('0x12')](),_0x4862a5[_0x65f6('0x13')][_0x65f6('0x14')](/[+@&\/\\#,+()$~%'":*?<>{}\s\\|]/g,'-')));}})});router[_0x65f6('0x15')]('/',upload[_0x65f6('0x16')](_0x65f6('0x17')),controller[_0x65f6('0x18')]);router['put'](_0x65f6('0x9'),auth['isAuthenticated'](),controller['update']);router[_0x65f6('0x19')](_0x65f6('0x9'),auth[_0x65f6('0x8')](),controller[_0x65f6('0x1a')]);module[_0x65f6('0x1b')]=router; \ No newline at end of file diff --git a/server/api/authActiveDirectory/authActiveDirectory.controller.js b/server/api/authActiveDirectory/authActiveDirectory.controller.js index 24509f8..1fe6c88 100644 --- a/server/api/authActiveDirectory/authActiveDirectory.controller.js +++ b/server/api/authActiveDirectory/authActiveDirectory.controller.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x1445=['json','use','ad-login','password','User','passport','passport-local','Strategy','moment','activedirectory2','bluebird','util','../../mysqldb','../../config/utils','../../config/logger','activedirectory','undefined','url','error','Error\x20authenticate\x20%s:\x20%s','inspect','Incorrect\x20username\x20and/or\x20password.\x20Please\x20retry\x20again\x20or\x20contact\x20the\x20administrator.','Error\x20authenticate\x20%s:\x20Active\x20Directory\x20not\x20configured','Setting','findOne','adSsoEnabled','then','Error\x20authenticate\x20%s:\x20Active\x20Directory\x20not\x20enabled','name','role','disabled','blocked','blockedAt','online','admin','user','domain','add','blockDuration','minutes','clearBlockUser','getLicense','status','send','message','login','authenticate','Something\x20went\x20wrong,\x20please\x20try\x20again.'];(function(_0x1a76c1,_0x85d3c0){var _0x3d62f6=function(_0x1faa5a){while(--_0x1faa5a){_0x1a76c1['push'](_0x1a76c1['shift']());}};_0x3d62f6(++_0x85d3c0);}(_0x1445,0xf5));var _0x5144=function(_0x147914,_0x3a9e3c){_0x147914=_0x147914-0x0;var _0x5146c3=_0x1445[_0x147914];return _0x5146c3;};'use strict';var passport=require(_0x5144('0x0'));var LocalStrategy=require(_0x5144('0x1'))[_0x5144('0x2')];var moment=require(_0x5144('0x3'));var ActiveDirectory=require(_0x5144('0x4'));var BPromise=require(_0x5144('0x5'));var util=require(_0x5144('0x6'));var db=require(_0x5144('0x7'))['db'];var authService=require('../../components/auth/service');var utils=require(_0x5144('0x8'));var config=require('../../config/environment');var logger=require(_0x5144('0x9'))('api');function isActiveDirectoryConfigured(_0x18d4a1){var _0x516c09=![];if(typeof _0x18d4a1[_0x5144('0xa')]!==_0x5144('0xb')){_0x516c09=_0x18d4a1[_0x5144('0xa')]['baseDN']&&_0x18d4a1[_0x5144('0xa')][_0x5144('0xc')]&&_0x18d4a1[_0x5144('0xa')]['domain'];}return _0x516c09;}function adAuthenticate(_0x5197f9,_0x5bc17d,_0x2d5e20){return new BPromise(function(_0xe6a106,_0x49bd24){try{var _0x4b37c9=new ActiveDirectory(_0x5197f9);_0x4b37c9['authenticate'](_0x5bc17d,_0x2d5e20,function(_0x41fa7c,_0x41c0f6){if(_0x41fa7c){logger[_0x5144('0xd')](_0x5144('0xe'),_0x5bc17d,util[_0x5144('0xf')](_0x41fa7c,{'showHidden':![],'depth':null}));_0x49bd24('Incorrect\x20username\x20and/or\x20password.\x20Please\x20retry\x20again\x20or\x20contact\x20the\x20administrator.');}else if(!_0x41c0f6){logger[_0x5144('0xd')]('Error\x20authenticate\x20%s:\x20Wrong\x20credentials',_0x5bc17d);_0x49bd24(_0x5144('0x10'));}else{_0xe6a106(_0x41c0f6);}});}catch(_0x51e5df){_0x49bd24(_0x51e5df);}});}function ActiveDirectoryAuthenticate(_0x47a19b,_0x15f59f,_0x3dcfeb,_0x411c28){var _0x182e7a,_0x4c4b18;if(!isActiveDirectoryConfigured(config)){logger[_0x5144('0xd')](_0x5144('0x11'),_0x15f59f);return _0x411c28(null,![],{'message':'Incorrect\x20username\x20and/or\x20password.\x20Please\x20retry\x20again\x20or\x20contact\x20the\x20administrator.'});}return db[_0x5144('0x12')][_0x5144('0x13')]({'where':{'id':0x1},'attributes':[_0x5144('0x14'),'blockDuration'],'raw':!![]})[_0x5144('0x15')](function(_0x2b089e){_0x182e7a=_0x2b089e;if(!_0x182e7a[_0x5144('0x14')]){logger[_0x5144('0xd')](_0x5144('0x16'),_0x15f59f);throw new Error(_0x5144('0x10'));}return _0x47a19b['findOne']({'attributes':['id',_0x5144('0x17'),'password','salt',_0x5144('0x18'),_0x5144('0x19'),_0x5144('0x1a'),_0x5144('0x1b'),_0x5144('0x1c')],'where':{'name':_0x15f59f,'role':{'$or':[_0x5144('0x1d'),_0x5144('0x1e'),'agent']},'adSsoEnabled':!![]}});})['then'](function(_0xa3d4d4){if(!_0xa3d4d4||_0xa3d4d4&&_0xa3d4d4[_0x5144('0x17')]!==_0x15f59f){throw new Error(_0x5144('0x10'));}_0x4c4b18=_0xa3d4d4;var _0xc6664d=_0x4c4b18[_0x5144('0x17')]+'@'+config['activedirectory'][_0x5144('0x1f')];return adAuthenticate(config[_0x5144('0xa')],_0xc6664d,_0x3dcfeb);})['then'](function(_0x24eb7e){if(_0x4c4b18[_0x5144('0x19')]){throw new Error(_0x5144('0x10'));}if(_0x182e7a['blockDuration']>0x0){if(_0x4c4b18[_0x5144('0x1a')]){if(moment(_0x4c4b18['blockedAt'])[_0x5144('0x20')](_0x182e7a[_0x5144('0x21')],_0x5144('0x22'))>moment()){throw new Error(_0x5144('0x10'));}return utils[_0x5144('0x23')](_0x4c4b18,0x0,![],null)[_0x5144('0x15')](function(){return utils[_0x5144('0x24')](_0x4c4b18);})[_0x5144('0x15')](function(){return _0x411c28(null,_0x4c4b18);});}else{return utils[_0x5144('0x24')](_0x4c4b18)['then'](function(){return _0x411c28(null,_0x4c4b18);});}}else{return utils[_0x5144('0x24')](_0x4c4b18)[_0x5144('0x15')](function(){return _0x411c28(null,_0x4c4b18);});}})['catch'](function(_0x20d423){return _0x411c28(null,![],_0x20d423);});}function handleError(_0x3eea64,_0x5708d9,_0x452a4d){return _0x3eea64[_0x5144('0x25')](_0x5708d9||0x1f4)[_0x5144('0x26')]({'message':_0x452a4d?_0x452a4d[_0x5144('0x27')]||_0x452a4d:''});}exports[_0x5144('0x28')]=function(_0x327806,_0x5eecec,_0x65cc9a){passport[_0x5144('0x29')]('ad-login',function(_0x2ff5e0,_0x3a735d,_0x4cac26){var _0x1bd8f6=_0x2ff5e0||_0x4cac26;if(_0x1bd8f6){return handleError(_0x5eecec,0x191,_0x1bd8f6);}if(!_0x3a735d){return handleError(_0x5eecec,0x194,{'message':_0x5144('0x2a')});}else{var _0x70f3c5={'payload':{'id':_0x3a735d['id'],'role':_0x3a735d[_0x5144('0x18')]},'options':{'expiresIn':0x15180}};return authService['signToken'](_0x70f3c5)[_0x5144('0x15')](function(_0x4964cc){_0x5eecec[_0x5144('0x2b')]({'id':_0x3a735d['id'],'token':_0x4964cc,'statusCall':'','isAlreadyLogged':_0x3a735d[_0x5144('0x1c')]});});}})(_0x327806,_0x5eecec,_0x65cc9a);};passport[_0x5144('0x2c')](_0x5144('0x2d'),new LocalStrategy({'usernameField':_0x5144('0x17'),'passwordField':_0x5144('0x2e')},function(_0x346709,_0x2151c0,_0x35b3c7){return ActiveDirectoryAuthenticate(db[_0x5144('0x2f')],_0x346709,_0x2151c0,_0x35b3c7);})); \ No newline at end of file +var _0xf311=['online','admin','user','agent','blockedAt','add','blockDuration','getLicense','status','send','message','login','ad-login','Something\x20went\x20wrong,\x20please\x20try\x20again.','role','signToken','User','passport','passport-local','Strategy','moment','activedirectory2','bluebird','util','../../mysqldb','../../components/auth/service','../../config/utils','../../config/environment','../../config/logger','activedirectory','undefined','baseDN','url','domain','authenticate','error','inspect','Incorrect\x20username\x20and/or\x20password.\x20Please\x20retry\x20again\x20or\x20contact\x20the\x20administrator.','Error\x20authenticate\x20%s:\x20Wrong\x20credentials','Error\x20authenticate\x20%s:\x20Active\x20Directory\x20not\x20configured','findOne','adSsoEnabled','then','Error\x20authenticate\x20%s:\x20Active\x20Directory\x20not\x20enabled','name','password','salt','disabled','blocked'];(function(_0x5af85d,_0x27ff1c){var _0x3b43c6=function(_0x369070){while(--_0x369070){_0x5af85d['push'](_0x5af85d['shift']());}};_0x3b43c6(++_0x27ff1c);}(_0xf311,0x106));var _0x1f31=function(_0x122ef9,_0x451d2a){_0x122ef9=_0x122ef9-0x0;var _0x42fba0=_0xf311[_0x122ef9];return _0x42fba0;};'use strict';var passport=require(_0x1f31('0x0'));var LocalStrategy=require(_0x1f31('0x1'))[_0x1f31('0x2')];var moment=require(_0x1f31('0x3'));var ActiveDirectory=require(_0x1f31('0x4'));var BPromise=require(_0x1f31('0x5'));var util=require(_0x1f31('0x6'));var db=require(_0x1f31('0x7'))['db'];var authService=require(_0x1f31('0x8'));var utils=require(_0x1f31('0x9'));var config=require(_0x1f31('0xa'));var logger=require(_0x1f31('0xb'))('api');function isActiveDirectoryConfigured(_0x20f14e){var _0x354b8d=![];if(typeof _0x20f14e[_0x1f31('0xc')]!==_0x1f31('0xd')){_0x354b8d=_0x20f14e[_0x1f31('0xc')][_0x1f31('0xe')]&&_0x20f14e['activedirectory'][_0x1f31('0xf')]&&_0x20f14e[_0x1f31('0xc')][_0x1f31('0x10')];}return _0x354b8d;}function adAuthenticate(_0x3f9337,_0x45bc48,_0x1e9fb5){return new BPromise(function(_0x53b2c2,_0x2dddb8){try{var _0xc96c89=new ActiveDirectory(_0x3f9337);_0xc96c89[_0x1f31('0x11')](_0x45bc48,_0x1e9fb5,function(_0x5c577f,_0x55c48b){if(_0x5c577f){logger[_0x1f31('0x12')]('Error\x20authenticate\x20%s:\x20%s',_0x45bc48,util[_0x1f31('0x13')](_0x5c577f,{'showHidden':![],'depth':null}));_0x2dddb8(_0x1f31('0x14'));}else if(!_0x55c48b){logger[_0x1f31('0x12')](_0x1f31('0x15'),_0x45bc48);_0x2dddb8(_0x1f31('0x14'));}else{_0x53b2c2(_0x55c48b);}});}catch(_0x361776){_0x2dddb8(_0x361776);}});}function ActiveDirectoryAuthenticate(_0x466fc5,_0x155894,_0x15c09e,_0x4081f8){var _0x2baa1b,_0x4edf15;if(!isActiveDirectoryConfigured(config)){logger[_0x1f31('0x12')](_0x1f31('0x16'),_0x155894);return _0x4081f8(null,![],{'message':'Incorrect\x20username\x20and/or\x20password.\x20Please\x20retry\x20again\x20or\x20contact\x20the\x20administrator.'});}return db['Setting'][_0x1f31('0x17')]({'where':{'id':0x1},'attributes':[_0x1f31('0x18'),'blockDuration'],'raw':!![]})[_0x1f31('0x19')](function(_0x4f6324){_0x2baa1b=_0x4f6324;if(!_0x2baa1b['adSsoEnabled']){logger[_0x1f31('0x12')](_0x1f31('0x1a'),_0x155894);throw new Error(_0x1f31('0x14'));}return _0x466fc5['findOne']({'attributes':['id',_0x1f31('0x1b'),_0x1f31('0x1c'),_0x1f31('0x1d'),'role',_0x1f31('0x1e'),_0x1f31('0x1f'),'blockedAt',_0x1f31('0x20')],'where':{'name':_0x155894,'role':{'$or':[_0x1f31('0x21'),_0x1f31('0x22'),_0x1f31('0x23')]},'adSsoEnabled':!![]}});})[_0x1f31('0x19')](function(_0x179ad5){if(!_0x179ad5||_0x179ad5&&_0x179ad5[_0x1f31('0x1b')]!==_0x155894){throw new Error(_0x1f31('0x14'));}_0x4edf15=_0x179ad5;var _0x3261d7=_0x4edf15[_0x1f31('0x1b')]+'@'+config[_0x1f31('0xc')][_0x1f31('0x10')];return adAuthenticate(config[_0x1f31('0xc')],_0x3261d7,_0x15c09e);})['then'](function(_0xa26095){if(_0x4edf15[_0x1f31('0x1e')]){throw new Error(_0x1f31('0x14'));}if(_0x2baa1b['blockDuration']>0x0){if(_0x4edf15[_0x1f31('0x1f')]){if(moment(_0x4edf15[_0x1f31('0x24')])[_0x1f31('0x25')](_0x2baa1b[_0x1f31('0x26')],'minutes')>moment()){throw new Error('Incorrect\x20username\x20and/or\x20password.\x20Please\x20retry\x20again\x20or\x20contact\x20the\x20administrator.');}return utils['clearBlockUser'](_0x4edf15,0x0,![],null)[_0x1f31('0x19')](function(){return utils['getLicense'](_0x4edf15);})['then'](function(){return _0x4081f8(null,_0x4edf15);});}else{return utils[_0x1f31('0x27')](_0x4edf15)['then'](function(){return _0x4081f8(null,_0x4edf15);});}}else{return utils[_0x1f31('0x27')](_0x4edf15)[_0x1f31('0x19')](function(){return _0x4081f8(null,_0x4edf15);});}})['catch'](function(_0xf11c21){return _0x4081f8(null,![],_0xf11c21);});}function handleError(_0x2590f1,_0x14c053,_0x189833){return _0x2590f1[_0x1f31('0x28')](_0x14c053||0x1f4)[_0x1f31('0x29')]({'message':_0x189833?_0x189833[_0x1f31('0x2a')]||_0x189833:''});}exports[_0x1f31('0x2b')]=function(_0x46cd31,_0x13af7c,_0x9147a8){passport['authenticate'](_0x1f31('0x2c'),function(_0x4d48ec,_0x3ff553,_0x5e981c){var _0x57c0e2=_0x4d48ec||_0x5e981c;if(_0x57c0e2){return handleError(_0x13af7c,0x191,_0x57c0e2);}if(!_0x3ff553){return handleError(_0x13af7c,0x194,{'message':_0x1f31('0x2d')});}else{var _0x332745={'payload':{'id':_0x3ff553['id'],'role':_0x3ff553[_0x1f31('0x2e')]},'options':{'expiresIn':0x15180}};return authService[_0x1f31('0x2f')](_0x332745)[_0x1f31('0x19')](function(_0x43b828){_0x13af7c['json']({'id':_0x3ff553['id'],'token':_0x43b828,'statusCall':'','isAlreadyLogged':_0x3ff553[_0x1f31('0x20')]});});}})(_0x46cd31,_0x13af7c,_0x9147a8);};passport['use'](_0x1f31('0x2c'),new LocalStrategy({'usernameField':_0x1f31('0x1b'),'passwordField':'password'},function(_0x36c046,_0x245a82,_0x14afe2){return ActiveDirectoryAuthenticate(db[_0x1f31('0x30')],_0x36c046,_0x245a82,_0x14afe2);})); \ No newline at end of file diff --git a/server/api/authActiveDirectory/index.js b/server/api/authActiveDirectory/index.js index 83ab5bd..5a320f8 100644 --- a/server/api/authActiveDirectory/index.js +++ b/server/api/authActiveDirectory/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x0ad5=['login','exports','express','Router','./authActiveDirectory.controller','post'];(function(_0x2ffc51,_0x415941){var _0x4ad5e0=function(_0x5ea808){while(--_0x5ea808){_0x2ffc51['push'](_0x2ffc51['shift']());}};_0x4ad5e0(++_0x415941);}(_0x0ad5,0xf8));var _0x50ad=function(_0x21a9d9,_0x4d5ac8){_0x21a9d9=_0x21a9d9-0x0;var _0x46adce=_0x0ad5[_0x21a9d9];return _0x46adce;};'use strict';var express=require(_0x50ad('0x0'));var router=express[_0x50ad('0x1')]();var controller=require(_0x50ad('0x2'));router[_0x50ad('0x3')]('/',controller[_0x50ad('0x4')]);module[_0x50ad('0x5')]=router; \ No newline at end of file +var _0x7b56=['express','./authActiveDirectory.controller','post','exports'];(function(_0x126a48,_0x4bb3ca){var _0x360670=function(_0x1b5ff8){while(--_0x1b5ff8){_0x126a48['push'](_0x126a48['shift']());}};_0x360670(++_0x4bb3ca);}(_0x7b56,0x68));var _0x67b5=function(_0x15bdb4,_0x57a292){_0x15bdb4=_0x15bdb4-0x0;var _0x1a8a8f=_0x7b56[_0x15bdb4];return _0x1a8a8f;};'use strict';var express=require(_0x67b5('0x0'));var router=express['Router']();var controller=require(_0x67b5('0x1'));router[_0x67b5('0x2')]('/',controller['login']);module[_0x67b5('0x3')]=router; \ No newline at end of file diff --git a/server/api/authGoogle/authGoogle.controller.js b/server/api/authGoogle/authGoogle.controller.js index 78dfb80..decd0d4 100644 --- a/server/api/authGoogle/authGoogle.controller.js +++ b/server/api/authGoogle/authGoogle.controller.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x9957=['../../config/environment','../../config/utils','login','google','/login','profile','email','callback','authenticate','use','clientID','clientSecret','secret','callbackURL','Setting','findOne','allowedLoginAttempts','User','find','map','emails','value','admin','user','then','disabled','Incorrect\x20username\x20and/or\x20password.\x20Please\x20retry\x20again\x20or\x20contact\x20the\x20administrator.','blockDuration','blocked','blockedAt','add','getLicense','catch','lodash','passport','passport-google-oauth20','Strategy','../../mysqldb'];(function(_0x3b067c,_0x20d20d){var _0x485875=function(_0x254ddf){while(--_0x254ddf){_0x3b067c['push'](_0x3b067c['shift']());}};_0x485875(++_0x20d20d);}(_0x9957,0x93));var _0x7995=function(_0x6131cd,_0x4c26a1){_0x6131cd=_0x6131cd-0x0;var _0x47e916=_0x9957[_0x6131cd];return _0x47e916;};'use strict';var _=require(_0x7995('0x0'));var passport=require(_0x7995('0x1'));var GoogleStrategy=require(_0x7995('0x2'))[_0x7995('0x3')];var moment=require('moment');var db=require(_0x7995('0x4'))['db'];var config=require(_0x7995('0x5'));var utils=require(_0x7995('0x6'));exports[_0x7995('0x7')]=passport['authenticate'](_0x7995('0x8'),{'failureRedirect':_0x7995('0x9'),'scope':[_0x7995('0xa'),_0x7995('0xb')],'session':![]});exports[_0x7995('0xc')]=passport[_0x7995('0xd')]('google',{'failureRedirect':_0x7995('0x9'),'session':![]});passport[_0x7995('0xe')](new GoogleStrategy({'clientID':config['google']?config[_0x7995('0x8')][_0x7995('0xf')]:'id','clientSecret':config[_0x7995('0x8')]?config[_0x7995('0x8')][_0x7995('0x10')]:_0x7995('0x11'),'callbackURL':config[_0x7995('0x8')]?config['google'][_0x7995('0x12')]:''},function(_0x41c652,_0x581f22,_0xb0c872,_0x2cb37a){var _0x19a27e,_0x385f00;return db[_0x7995('0x13')][_0x7995('0x14')]({'where':{'id':0x1},'attributes':[_0x7995('0x15'),'blockDuration'],'raw':!![]})['then'](function(_0x2b4e94){_0x19a27e=_0x2b4e94;return db[_0x7995('0x16')][_0x7995('0x17')]({'where':{'email':_[_0x7995('0x18')](_0xb0c872[_0x7995('0x19')],_0x7995('0x1a')),'role':{'$or':[_0x7995('0x1b'),_0x7995('0x1c'),'agent']}}});})[_0x7995('0x1d')](function(_0x565d97){_0x385f00=_0x565d97;if(_0x385f00){if(_0x385f00[_0x7995('0x1e')]){return _0x2cb37a(_0x7995('0x1f'));}else if(_0x19a27e[_0x7995('0x20')]>0x0){if(_0x385f00[_0x7995('0x21')]){if(moment(_0x385f00[_0x7995('0x22')])[_0x7995('0x23')](_0x19a27e['blockDuration'],'minutes')>moment()){return _0x2cb37a(_0x7995('0x1f'));}else{return utils['clearBlockUser'](_0x385f00,0x0,![],null)['then'](function(){return utils[_0x7995('0x24')](_0x385f00);})[_0x7995('0x1d')](function(){return _0x2cb37a(null,_0x385f00);});}}else{return utils['getLicense'](_0x385f00)[_0x7995('0x1d')](function(){return _0x2cb37a(null,_0x385f00);});}}else{return utils['getLicense'](_0x385f00)['then'](function(){return _0x2cb37a(null,_0x385f00);});}}return _0x2cb37a(_0x7995('0x1f'));})[_0x7995('0x25')](function(_0x350fd9){_0x2cb37a(_0x350fd9);});})); \ No newline at end of file +var _0x9957=['../../config/environment','../../config/utils','login','google','/login','profile','email','callback','authenticate','use','clientID','clientSecret','secret','callbackURL','Setting','findOne','allowedLoginAttempts','User','find','map','emails','value','admin','user','then','disabled','Incorrect\x20username\x20and/or\x20password.\x20Please\x20retry\x20again\x20or\x20contact\x20the\x20administrator.','blockDuration','blocked','blockedAt','add','getLicense','catch','lodash','passport','passport-google-oauth20','Strategy','../../mysqldb'];(function(_0x1ef23f,_0x398d9b){var _0x1eecba=function(_0x3f2a1f){while(--_0x3f2a1f){_0x1ef23f['push'](_0x1ef23f['shift']());}};_0x1eecba(++_0x398d9b);}(_0x9957,0x93));var _0x7995=function(_0x618414,_0x1a7a60){_0x618414=_0x618414-0x0;var _0x21c19a=_0x9957[_0x618414];return _0x21c19a;};'use strict';var _=require(_0x7995('0x0'));var passport=require(_0x7995('0x1'));var GoogleStrategy=require(_0x7995('0x2'))[_0x7995('0x3')];var moment=require('moment');var db=require(_0x7995('0x4'))['db'];var config=require(_0x7995('0x5'));var utils=require(_0x7995('0x6'));exports[_0x7995('0x7')]=passport['authenticate'](_0x7995('0x8'),{'failureRedirect':_0x7995('0x9'),'scope':[_0x7995('0xa'),_0x7995('0xb')],'session':![]});exports[_0x7995('0xc')]=passport[_0x7995('0xd')]('google',{'failureRedirect':_0x7995('0x9'),'session':![]});passport[_0x7995('0xe')](new GoogleStrategy({'clientID':config['google']?config[_0x7995('0x8')][_0x7995('0xf')]:'id','clientSecret':config[_0x7995('0x8')]?config[_0x7995('0x8')][_0x7995('0x10')]:_0x7995('0x11'),'callbackURL':config[_0x7995('0x8')]?config['google'][_0x7995('0x12')]:''},function(_0x41c652,_0x581f22,_0xb0c872,_0x2cb37a){var _0x19a27e,_0x385f00;return db[_0x7995('0x13')][_0x7995('0x14')]({'where':{'id':0x1},'attributes':[_0x7995('0x15'),'blockDuration'],'raw':!![]})['then'](function(_0x2b4e94){_0x19a27e=_0x2b4e94;return db[_0x7995('0x16')][_0x7995('0x17')]({'where':{'email':_[_0x7995('0x18')](_0xb0c872[_0x7995('0x19')],_0x7995('0x1a')),'role':{'$or':[_0x7995('0x1b'),_0x7995('0x1c'),'agent']}}});})[_0x7995('0x1d')](function(_0x565d97){_0x385f00=_0x565d97;if(_0x385f00){if(_0x385f00[_0x7995('0x1e')]){return _0x2cb37a(_0x7995('0x1f'));}else if(_0x19a27e[_0x7995('0x20')]>0x0){if(_0x385f00[_0x7995('0x21')]){if(moment(_0x385f00[_0x7995('0x22')])[_0x7995('0x23')](_0x19a27e['blockDuration'],'minutes')>moment()){return _0x2cb37a(_0x7995('0x1f'));}else{return utils['clearBlockUser'](_0x385f00,0x0,![],null)['then'](function(){return utils[_0x7995('0x24')](_0x385f00);})[_0x7995('0x1d')](function(){return _0x2cb37a(null,_0x385f00);});}}else{return utils['getLicense'](_0x385f00)[_0x7995('0x1d')](function(){return _0x2cb37a(null,_0x385f00);});}}else{return utils['getLicense'](_0x385f00)['then'](function(){return _0x2cb37a(null,_0x385f00);});}}return _0x2cb37a(_0x7995('0x1f'));})[_0x7995('0x25')](function(_0x350fd9){_0x2cb37a(_0x350fd9);});})); \ No newline at end of file diff --git a/server/api/authGoogle/index.js b/server/api/authGoogle/index.js index 407d1bc..0a289c9 100644 --- a/server/api/authGoogle/index.js +++ b/server/api/authGoogle/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x4812=['../../components/auth/service','get','callback','login','setTokenCookie','exports','express','passport','./authGoogle.controller','../user/user.controller.js'];(function(_0x1fb19c,_0x5076f0){var _0xdcafe1=function(_0x3e222c){while(--_0x3e222c){_0x1fb19c['push'](_0x1fb19c['shift']());}};_0xdcafe1(++_0x5076f0);}(_0x4812,0x10a));var _0x2481=function(_0x2cbfc3,_0x530cc6){_0x2cbfc3=_0x2cbfc3-0x0;var _0x2c5b4a=_0x4812[_0x2cbfc3];return _0x2c5b4a;};'use strict';var express=require(_0x2481('0x0'));var passport=require(_0x2481('0x1'));var router=express['Router']();var controller=require(_0x2481('0x2'));var userController=require(_0x2481('0x3'));var authService=require(_0x2481('0x4'));router[_0x2481('0x5')]('/',controller['login']);router[_0x2481('0x5')]('/callback',controller[_0x2481('0x6')],authService['isMiddleware'],userController[_0x2481('0x7')],authService[_0x2481('0x8')]);module[_0x2481('0x9')]=router; \ No newline at end of file +var _0x738e=['exports','passport','Router','../user/user.controller.js','get','login','/callback','callback','setTokenCookie'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0x738e,0xbe));var _0xe738=function(_0x438e18,_0x52e2c5){_0x438e18=_0x438e18-0x0;var _0x50c6ea=_0x738e[_0x438e18];return _0x50c6ea;};'use strict';var express=require('express');var passport=require(_0xe738('0x0'));var router=express[_0xe738('0x1')]();var controller=require('./authGoogle.controller');var userController=require(_0xe738('0x2'));var authService=require('../../components/auth/service');router[_0xe738('0x3')]('/',controller[_0xe738('0x4')]);router[_0xe738('0x3')](_0xe738('0x5'),controller[_0xe738('0x6')],authService['isMiddleware'],userController[_0xe738('0x4')],authService[_0xe738('0x7')]);module[_0xe738('0x8')]=router; \ No newline at end of file diff --git a/server/api/authLocal/authLocal.controller.js b/server/api/authLocal/authLocal.controller.js index a2c43c2..ce08fe5 100644 --- a/server/api/authLocal/authLocal.controller.js +++ b/server/api/authLocal/authLocal.controller.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xe742=['../../mysqldb','../../components/auth/service','../../config/utils','http','Setting','findOne','allowedLoginAttempts','blockDuration','then','password','salt','role','disabled','blocked','loginAttempts','admin','user','agent','name','authenticate','Incorrect\x20username\x20and/or\x20password.\x20Please\x20retry\x20again\x20or\x20contact\x20the\x20administrator.','minutes','clearBlockUser','blockedAt','add','getLicense','catch','MailAccount','find','email','MailServerOut','CloudProvider','getSmtpOptions','merge','\x22%s\x22\x20<%s>','Smtp','SendMail','error','format','SendMail\x20error:\x20%s.\x20Please\x20contact\x20your\x20Administrator!','message','stringify','send','login','Something\x20went\x20wrong,\x20please\x20try\x20again.','signToken','json','online','forgot','Email\x20parameter\x20is\x20missing','body','trim','toLowerCase','User','This\x20email\x20is\x20not\x20registered.','The\x20user\x20is\x20blocked.\x20Please\x20contact\x20the\x20administrator.','resetPasswordToken','resetPasswordExpires','now','save','xCally\x20Motion\x20Password\x20Reset','You\x20are\x20receiving\x20this\x20because\x20you\x20(or\x20someone\x20else)\x20have\x20requested\x20the\x20reset\x20of\x20the\x20password\x20for\x20your\x20account.\x0a\x0a','Please\x20click\x20on\x20the\x20following\x20link,\x20or\x20paste\x20this\x20into\x20your\x20browser\x20to\x20complete\x20the\x20process:\x0a\x0a','headers','host','If\x20you\x20did\x20not\x20request\x20this,\x20please\x20ignore\x20this\x20email\x20and\x20your\x20password\x20will\x20remain\x20unchanged.\x0a','status','Reset\x20Email\x20sent!','reset','params','token','Password\x20reset\x20token\x20is\x20invalid\x20or\x20has\x20expired.','securePassword','enforcePasswordHistory','passwordHistoryLimit','validatePasswordPattern','previousPasswords','Password\x20reset!','use','local-login','util','passport-local','lodash','moment'];(function(_0xea466c,_0x5c0d65){var _0x348fe3=function(_0x2a5b29){while(--_0x2a5b29){_0xea466c['push'](_0xea466c['shift']());}};_0x348fe3(++_0x5c0d65);}(_0xe742,0xa4));var _0x2e74=function(_0x4e8e09,_0x15cd9b){_0x4e8e09=_0x4e8e09-0x0;var _0x114f7c=_0xe742[_0x4e8e09];return _0x114f7c;};'use strict';var util=require(_0x2e74('0x0'));var passport=require('passport');var LocalStrategy=require(_0x2e74('0x1'))['Strategy'];var jayson=require('jayson/promise');var _=require(_0x2e74('0x2'));var rs=require('randomstring');var moment=require(_0x2e74('0x3'));var db=require(_0x2e74('0x4'))['db'];var authService=require(_0x2e74('0x5'));var utils=require(_0x2e74('0x6'));var client=jayson['client'][_0x2e74('0x7')]({'port':0x232b});function localAuthenticate(_0x1590a7,_0x5642a6,_0x408c50,_0x10713f){var _0x29b8ec,_0x495b29;return db[_0x2e74('0x8')][_0x2e74('0x9')]({'where':{'id':0x1},'attributes':[_0x2e74('0xa'),_0x2e74('0xb')],'raw':!![]})[_0x2e74('0xc')](function(_0x1ed249){_0x29b8ec=_0x1ed249;return _0x1590a7[_0x2e74('0x9')]({'attributes':['id','name',_0x2e74('0xd'),_0x2e74('0xe'),_0x2e74('0xf'),_0x2e74('0x10'),_0x2e74('0x11'),'blockedAt',_0x2e74('0x12')],'where':{'name':_0x5642a6,'role':{'$or':[_0x2e74('0x13'),_0x2e74('0x14'),_0x2e74('0x15')]}}});})[_0x2e74('0xc')](function(_0x11cc3a){if(!_0x11cc3a||_0x11cc3a&&_0x11cc3a[_0x2e74('0x16')]!==_0x5642a6){throw new Error('Incorrect\x20username\x20and/or\x20password.\x20Please\x20retry\x20again\x20or\x20contact\x20the\x20administrator.');}else{_0x495b29=_0x11cc3a;return _0x495b29;}})[_0x2e74('0xc')](function(){_0x495b29[_0x2e74('0x17')](_0x408c50,function(_0x7f3c45,_0x53605a){var _0x3370f7=_0x495b29[_0x2e74('0x12')]+0x1;if(_0x7f3c45){return _0x10713f(_0x7f3c45);}else if(!_0x53605a){if(_0x495b29['disabled']){return _0x10713f(null,![],{'message':_0x2e74('0x18')});}else if(_0x29b8ec['allowedLoginAttempts']>0x0){if(_0x495b29['blocked']){if(_0x29b8ec[_0x2e74('0xb')]>0x0){if(moment(_0x495b29['blockedAt'])['add'](_0x29b8ec['blockDuration'],_0x2e74('0x19'))>moment()){return _0x10713f(null,![],{'message':_0x2e74('0x18')});}else{return utils[_0x2e74('0x1a')](_0x495b29,_0x3370f7,![],null)[_0x2e74('0xc')](function(){return _0x10713f(null,![],{'message':_0x2e74('0x18')});});}}else{return _0x10713f(null,![],{'message':_0x2e74('0x18')});}}else{if(_0x3370f7>=_0x29b8ec[_0x2e74('0xa')]){return utils['clearBlockUser'](_0x495b29,0x0,!![],moment())['then'](function(){return _0x10713f(null,![],{'message':_0x2e74('0x18')});});}else{return utils[_0x2e74('0x1a')](_0x495b29,_0x3370f7,![],null)['then'](function(){return _0x10713f(null,![],{'message':_0x2e74('0x18')});});}}}else{return _0x10713f(null,![],{'message':'Incorrect\x20username\x20and/or\x20password.\x20Please\x20retry\x20again\x20or\x20contact\x20the\x20administrator.'});}}else{if(_0x495b29[_0x2e74('0x10')]){return _0x10713f(null,![],{'message':_0x2e74('0x18')});}else if(_0x29b8ec[_0x2e74('0xa')]>0x0){if(_0x495b29[_0x2e74('0x11')]){if(_0x29b8ec['blockDuration']>0x0){if(moment(_0x495b29[_0x2e74('0x1b')])[_0x2e74('0x1c')](_0x29b8ec[_0x2e74('0xb')],_0x2e74('0x19'))>moment()){return _0x10713f(null,![],{'message':_0x2e74('0x18')});}else{return utils[_0x2e74('0x1a')](_0x495b29,0x0,![],null)['then'](function(){return utils[_0x2e74('0x1d')](_0x495b29);})[_0x2e74('0xc')](function(){return _0x10713f(null,_0x495b29);});}}else{return _0x10713f(null,![],{'message':_0x2e74('0x18')});}}else{return utils[_0x2e74('0x1a')](_0x495b29,0x0,![],null)[_0x2e74('0xc')](function(){return utils['getLicense'](_0x495b29);})[_0x2e74('0xc')](function(){return _0x10713f(null,_0x495b29);})['catch'](function(_0x3a54f3){return _0x10713f(null,![],_0x3a54f3);});}}else{if(_0x495b29[_0x2e74('0x11')]){return _0x10713f(null,![],{'message':'Incorrect\x20username\x20and/or\x20password.\x20Please\x20retry\x20again\x20or\x20contact\x20the\x20administrator.'});}else{return utils[_0x2e74('0x1d')](_0x495b29)['then'](function(){return _0x10713f(null,_0x495b29);});}}}});})[_0x2e74('0x1e')](function(_0x57ec30){return _0x10713f(null,![],_0x57ec30);});}function sendServiceMail(_0x35a651){return db[_0x2e74('0x1f')][_0x2e74('0x20')]({'where':{'service':!![]},'attributes':['id','name',_0x2e74('0x21')],'include':[{'model':db[_0x2e74('0x22')],'as':'Smtp','include':[{'model':db['CloudProvider'],'as':_0x2e74('0x23')}]}]})[_0x2e74('0xc')](function(_0x32aa36){if(!_0x32aa36){throw new Error('Unable\x20to\x20find\x20a\x20configured\x20SMTP\x20service!');}var _0x4e5786=_0x32aa36[_0x2e74('0x24')]();var _0x448ea2={'account':_0x4e5786,'message':_[_0x2e74('0x25')]({'from':util['format'](_0x2e74('0x26'),_0x32aa36['name'],_0x32aa36[_0x2e74('0x21')]||_0x32aa36[_0x2e74('0x27')]['user'])},_0x35a651)};return client['request'](_0x2e74('0x28'),_0x448ea2);})[_0x2e74('0xc')](function(_0x55cecf){if(_0x55cecf[_0x2e74('0x29')]){throw new Error(util[_0x2e74('0x2a')](_0x2e74('0x2b'),_0x55cecf[_0x2e74('0x29')][_0x2e74('0x2c')]||JSON[_0x2e74('0x2d')](_0x55cecf[_0x2e74('0x29')])));}return!![];});}function handleError(_0x32727d,_0x1bffb5,_0x98f608){return _0x32727d['status'](_0x1bffb5||0x1f4)[_0x2e74('0x2e')]({'message':_0x98f608?_0x98f608[_0x2e74('0x2c')]||_0x98f608:''});}exports[_0x2e74('0x2f')]=function(_0x594f8b,_0x5c4d96,_0x416eda){passport['authenticate']('local-login',function(_0x3f6e32,_0x2028d4,_0x4ca6fa){var _0x2db466=_0x3f6e32||_0x4ca6fa;if(_0x2db466){return handleError(_0x5c4d96,0x191,_0x2db466);}if(!_0x2028d4){return handleError(_0x5c4d96,0x194,{'message':_0x2e74('0x30')});}else{var _0xf57413={'payload':{'id':_0x2028d4['id'],'role':_0x2028d4[_0x2e74('0xf')]},'options':{'expiresIn':0x15180}};return authService[_0x2e74('0x31')](_0xf57413)[_0x2e74('0xc')](function(_0x3f8644){_0x5c4d96[_0x2e74('0x32')]({'id':_0x2028d4['id'],'token':_0x3f8644,'statusCall':'','isAlreadyLogged':_0x2028d4[_0x2e74('0x33')]});});}})(_0x594f8b,_0x5c4d96,_0x416eda);};exports[_0x2e74('0x34')]=function(_0x4f8948,_0x3ee77f){if(!_0x4f8948['body'][_0x2e74('0x21')]){return handleError(_0x3ee77f,0x1f4,{'message':_0x2e74('0x35')});}var _0x5ada40=rs['generate']();_0x4f8948[_0x2e74('0x36')][_0x2e74('0x21')]=_0x4f8948[_0x2e74('0x36')][_0x2e74('0x21')][_0x2e74('0x37')]()[_0x2e74('0x38')]();var _0x23c3ca;return db[_0x2e74('0x8')][_0x2e74('0x9')]({'where':{'id':0x1},'attributes':[_0x2e74('0xa'),'blockDuration'],'raw':!![]})[_0x2e74('0xc')](function(_0x117e4b){_0x23c3ca=_0x117e4b;return db[_0x2e74('0x39')][_0x2e74('0x20')]({'where':{'email':_0x4f8948['body'][_0x2e74('0x21')]}});})[_0x2e74('0xc')](function(_0x182e40){if(!_0x182e40){throw new Error(_0x2e74('0x3a'));}if(_0x182e40[_0x2e74('0x10')]){throw new Error('The\x20user\x20is\x20disabled.\x20Please\x20contact\x20the\x20administrator.');}if(_0x182e40[_0x2e74('0x11')]){if(moment(_0x182e40[_0x2e74('0x1b')])[_0x2e74('0x1c')](_0x23c3ca[_0x2e74('0xb')],'minutes')>moment()){throw new Error(_0x2e74('0x3b'));}else{_0x182e40[_0x2e74('0x11')]=![];_0x182e40[_0x2e74('0x1b')]=null;}}_0x182e40[_0x2e74('0x3c')]=_0x5ada40;_0x182e40[_0x2e74('0x3d')]=Date[_0x2e74('0x3e')]()+0x36ee80;return _0x182e40[_0x2e74('0x3f')]();})[_0x2e74('0xc')](function(){return sendServiceMail({'to':_0x4f8948[_0x2e74('0x36')]['email'],'subject':_0x2e74('0x40'),'text':_0x2e74('0x41')+_0x2e74('0x42')+'https://'+_0x4f8948[_0x2e74('0x43')][_0x2e74('0x44')]+'/reset/'+_0x5ada40+'\x0a\x0a'+_0x2e74('0x45')});})[_0x2e74('0xc')](function(){_0x3ee77f[_0x2e74('0x46')](0xc8)[_0x2e74('0x2e')]({'message':_0x2e74('0x47')});})[_0x2e74('0x1e')](function(_0x215baa){return handleError(_0x3ee77f,0x1f4,_0x215baa);});};exports[_0x2e74('0x48')]=function(_0x1dc93f,_0x25e203){return db['User'][_0x2e74('0x20')]({'where':{'resetPasswordToken':_0x1dc93f[_0x2e74('0x49')][_0x2e74('0x4a')],'resetPasswordExpires':{'$gt':Date[_0x2e74('0x3e')]()}}})['then'](function(_0x2fcff9){if(!_0x2fcff9){throw new Error(_0x2e74('0x4b'));}return db[_0x2e74('0x8')][_0x2e74('0x9')]({'attributes':['id',_0x2e74('0x4c'),_0x2e74('0x4d'),_0x2e74('0x4e')]})[_0x2e74('0xc')](function(_0x2388a5){if(_0x2388a5[_0x2e74('0x4c')])authService[_0x2e74('0x4f')](_0x1dc93f[_0x2e74('0x36')][_0x2e74('0xd')]);if(!_0x2388a5[_0x2e74('0x4d')]||!_0x2fcff9[_0x2e74('0x50')])return _0x2fcff9;authService['validatePasswordHistory'](_0x1dc93f[_0x2e74('0x36')]['password'],_0x2fcff9[_0x2e74('0x50')],_0x2388a5[_0x2e74('0x4e')]);return _0x2fcff9;})['then'](function(){_0x2fcff9['password']=_0x1dc93f[_0x2e74('0x36')]['password'];_0x2fcff9[_0x2e74('0x3c')]=null;_0x2fcff9['resetPasswordExpires']=null;return _0x2fcff9[_0x2e74('0x3f')]();});})[_0x2e74('0xc')](function(){_0x25e203['status'](0xc8)['send']({'message':_0x2e74('0x51')});})[_0x2e74('0x1e')](function(_0x13ad3e){return handleError(_0x25e203,0x1f4,_0x13ad3e);});};passport[_0x2e74('0x52')](_0x2e74('0x53'),new LocalStrategy({'usernameField':_0x2e74('0x16'),'passwordField':_0x2e74('0xd')},function(_0x77473,_0x21c2de,_0x275a32){return localAuthenticate(db[_0x2e74('0x39')],_0x77473,_0x21c2de,_0x275a32);})); \ No newline at end of file +var _0x33a4=['Password\x20reset\x20token\x20is\x20invalid\x20or\x20has\x20expired.','Setting','securePassword','enforcePasswordHistory','passwordHistoryLimit','password','previousPasswords','validatePasswordHistory','Password\x20reset!','util','passport','passport-local','Strategy','jayson/promise','randomstring','../../mysqldb','../../components/auth/service','../../config/utils','client','http','findOne','allowedLoginAttempts','blockDuration','name','salt','role','blocked','blockedAt','loginAttempts','admin','user','agent','Incorrect\x20username\x20and/or\x20password.\x20Please\x20retry\x20again\x20or\x20contact\x20the\x20administrator.','then','add','clearBlockUser','disabled','getLicense','catch','MailAccount','find','email','MailServerOut','Smtp','CloudProvider','Unable\x20to\x20find\x20a\x20configured\x20SMTP\x20service!','getSmtpOptions','merge','format','request','SendMail\x20error:\x20%s.\x20Please\x20contact\x20your\x20Administrator!','error','stringify','status','send','message','authenticate','local-login','Something\x20went\x20wrong,\x20please\x20try\x20again.','signToken','online','forgot','Email\x20parameter\x20is\x20missing','generate','body','toLowerCase','User','This\x20email\x20is\x20not\x20registered.','The\x20user\x20is\x20disabled.\x20Please\x20contact\x20the\x20administrator.','minutes','The\x20user\x20is\x20blocked.\x20Please\x20contact\x20the\x20administrator.','resetPasswordToken','resetPasswordExpires','now','xCally\x20Motion\x20Password\x20Reset','Please\x20click\x20on\x20the\x20following\x20link,\x20or\x20paste\x20this\x20into\x20your\x20browser\x20to\x20complete\x20the\x20process:\x0a\x0a','https://','headers','host','If\x20you\x20did\x20not\x20request\x20this,\x20please\x20ignore\x20this\x20email\x20and\x20your\x20password\x20will\x20remain\x20unchanged.\x0a','Reset\x20Email\x20sent!','reset','params','token'];(function(_0x171a0d,_0x33b6ef){var _0x12a08b=function(_0x559fdb){while(--_0x559fdb){_0x171a0d['push'](_0x171a0d['shift']());}};_0x12a08b(++_0x33b6ef);}(_0x33a4,0xb1));var _0x433a=function(_0x21becc,_0x5c0209){_0x21becc=_0x21becc-0x0;var _0x247e13=_0x33a4[_0x21becc];return _0x247e13;};'use strict';var util=require(_0x433a('0x0'));var passport=require(_0x433a('0x1'));var LocalStrategy=require(_0x433a('0x2'))[_0x433a('0x3')];var jayson=require(_0x433a('0x4'));var _=require('lodash');var rs=require(_0x433a('0x5'));var moment=require('moment');var db=require(_0x433a('0x6'))['db'];var authService=require(_0x433a('0x7'));var utils=require(_0x433a('0x8'));var client=jayson[_0x433a('0x9')][_0x433a('0xa')]({'port':0x232b});function localAuthenticate(_0x57daa3,_0x37b76e,_0x1a4ab5,_0x2ee089){var _0x468dd0,_0x1c83b8;return db['Setting'][_0x433a('0xb')]({'where':{'id':0x1},'attributes':[_0x433a('0xc'),_0x433a('0xd')],'raw':!![]})['then'](function(_0x4ba94a){_0x468dd0=_0x4ba94a;return _0x57daa3[_0x433a('0xb')]({'attributes':['id',_0x433a('0xe'),'password',_0x433a('0xf'),_0x433a('0x10'),'disabled',_0x433a('0x11'),_0x433a('0x12'),_0x433a('0x13')],'where':{'name':_0x37b76e,'role':{'$or':[_0x433a('0x14'),_0x433a('0x15'),_0x433a('0x16')]}}});})['then'](function(_0x42c5ea){if(!_0x42c5ea||_0x42c5ea&&_0x42c5ea['name']!==_0x37b76e){throw new Error(_0x433a('0x17'));}else{_0x1c83b8=_0x42c5ea;return _0x1c83b8;}})[_0x433a('0x18')](function(){_0x1c83b8['authenticate'](_0x1a4ab5,function(_0x131a69,_0x1515f9){var _0x1d3da8=_0x1c83b8[_0x433a('0x13')]+0x1;if(_0x131a69){return _0x2ee089(_0x131a69);}else if(!_0x1515f9){if(_0x1c83b8['disabled']){return _0x2ee089(null,![],{'message':'Incorrect\x20username\x20and/or\x20password.\x20Please\x20retry\x20again\x20or\x20contact\x20the\x20administrator.'});}else if(_0x468dd0['allowedLoginAttempts']>0x0){if(_0x1c83b8[_0x433a('0x11')]){if(_0x468dd0[_0x433a('0xd')]>0x0){if(moment(_0x1c83b8[_0x433a('0x12')])[_0x433a('0x19')](_0x468dd0[_0x433a('0xd')],'minutes')>moment()){return _0x2ee089(null,![],{'message':_0x433a('0x17')});}else{return utils['clearBlockUser'](_0x1c83b8,_0x1d3da8,![],null)['then'](function(){return _0x2ee089(null,![],{'message':_0x433a('0x17')});});}}else{return _0x2ee089(null,![],{'message':_0x433a('0x17')});}}else{if(_0x1d3da8>=_0x468dd0['allowedLoginAttempts']){return utils[_0x433a('0x1a')](_0x1c83b8,0x0,!![],moment())[_0x433a('0x18')](function(){return _0x2ee089(null,![],{'message':_0x433a('0x17')});});}else{return utils['clearBlockUser'](_0x1c83b8,_0x1d3da8,![],null)[_0x433a('0x18')](function(){return _0x2ee089(null,![],{'message':_0x433a('0x17')});});}}}else{return _0x2ee089(null,![],{'message':_0x433a('0x17')});}}else{if(_0x1c83b8[_0x433a('0x1b')]){return _0x2ee089(null,![],{'message':_0x433a('0x17')});}else if(_0x468dd0[_0x433a('0xc')]>0x0){if(_0x1c83b8[_0x433a('0x11')]){if(_0x468dd0['blockDuration']>0x0){if(moment(_0x1c83b8[_0x433a('0x12')])[_0x433a('0x19')](_0x468dd0[_0x433a('0xd')],'minutes')>moment()){return _0x2ee089(null,![],{'message':_0x433a('0x17')});}else{return utils['clearBlockUser'](_0x1c83b8,0x0,![],null)[_0x433a('0x18')](function(){return utils['getLicense'](_0x1c83b8);})[_0x433a('0x18')](function(){return _0x2ee089(null,_0x1c83b8);});}}else{return _0x2ee089(null,![],{'message':_0x433a('0x17')});}}else{return utils[_0x433a('0x1a')](_0x1c83b8,0x0,![],null)[_0x433a('0x18')](function(){return utils[_0x433a('0x1c')](_0x1c83b8);})[_0x433a('0x18')](function(){return _0x2ee089(null,_0x1c83b8);})[_0x433a('0x1d')](function(_0x2c6bf4){return _0x2ee089(null,![],_0x2c6bf4);});}}else{if(_0x1c83b8[_0x433a('0x11')]){return _0x2ee089(null,![],{'message':_0x433a('0x17')});}else{return utils[_0x433a('0x1c')](_0x1c83b8)['then'](function(){return _0x2ee089(null,_0x1c83b8);});}}}});})[_0x433a('0x1d')](function(_0xdfb14){return _0x2ee089(null,![],_0xdfb14);});}function sendServiceMail(_0x181374){return db[_0x433a('0x1e')][_0x433a('0x1f')]({'where':{'service':!![]},'attributes':['id',_0x433a('0xe'),_0x433a('0x20')],'include':[{'model':db[_0x433a('0x21')],'as':_0x433a('0x22'),'include':[{'model':db[_0x433a('0x23')],'as':'CloudProvider'}]}]})[_0x433a('0x18')](function(_0x5e5fae){if(!_0x5e5fae){throw new Error(_0x433a('0x24'));}var _0x116139=_0x5e5fae[_0x433a('0x25')]();var _0x25f07e={'account':_0x116139,'message':_[_0x433a('0x26')]({'from':util[_0x433a('0x27')]('\x22%s\x22\x20<%s>',_0x5e5fae[_0x433a('0xe')],_0x5e5fae[_0x433a('0x20')]||_0x5e5fae['Smtp'][_0x433a('0x15')])},_0x181374)};return client[_0x433a('0x28')]('SendMail',_0x25f07e);})['then'](function(_0x4a7c60){if(_0x4a7c60['error']){throw new Error(util[_0x433a('0x27')](_0x433a('0x29'),_0x4a7c60[_0x433a('0x2a')]['message']||JSON[_0x433a('0x2b')](_0x4a7c60[_0x433a('0x2a')])));}return!![];});}function handleError(_0x171914,_0x401af9,_0x140d73){return _0x171914[_0x433a('0x2c')](_0x401af9||0x1f4)[_0x433a('0x2d')]({'message':_0x140d73?_0x140d73[_0x433a('0x2e')]||_0x140d73:''});}exports['login']=function(_0x399ab1,_0x424513,_0x2aba21){passport[_0x433a('0x2f')](_0x433a('0x30'),function(_0x948604,_0x2bbe89,_0x3a47bb){var _0x553038=_0x948604||_0x3a47bb;if(_0x553038){return handleError(_0x424513,0x191,_0x553038);}if(!_0x2bbe89){return handleError(_0x424513,0x194,{'message':_0x433a('0x31')});}else{var _0xc6105f={'payload':{'id':_0x2bbe89['id'],'role':_0x2bbe89[_0x433a('0x10')]},'options':{'expiresIn':0x15180}};return authService[_0x433a('0x32')](_0xc6105f)['then'](function(_0x571d91){_0x424513['json']({'id':_0x2bbe89['id'],'token':_0x571d91,'statusCall':'','isAlreadyLogged':_0x2bbe89[_0x433a('0x33')]});});}})(_0x399ab1,_0x424513,_0x2aba21);};exports[_0x433a('0x34')]=function(_0x1b6889,_0x3cf508){if(!_0x1b6889['body'][_0x433a('0x20')]){return handleError(_0x3cf508,0x1f4,{'message':_0x433a('0x35')});}var _0x1a2832=rs[_0x433a('0x36')]();_0x1b6889['body'][_0x433a('0x20')]=_0x1b6889[_0x433a('0x37')]['email']['trim']()[_0x433a('0x38')]();var _0x3369e1;return db['Setting'][_0x433a('0xb')]({'where':{'id':0x1},'attributes':[_0x433a('0xc'),_0x433a('0xd')],'raw':!![]})['then'](function(_0x566177){_0x3369e1=_0x566177;return db[_0x433a('0x39')][_0x433a('0x1f')]({'where':{'email':_0x1b6889[_0x433a('0x37')]['email']}});})['then'](function(_0x23460e){if(!_0x23460e){throw new Error(_0x433a('0x3a'));}if(_0x23460e[_0x433a('0x1b')]){throw new Error(_0x433a('0x3b'));}if(_0x23460e[_0x433a('0x11')]){if(moment(_0x23460e[_0x433a('0x12')])[_0x433a('0x19')](_0x3369e1[_0x433a('0xd')],_0x433a('0x3c'))>moment()){throw new Error(_0x433a('0x3d'));}else{_0x23460e[_0x433a('0x11')]=![];_0x23460e[_0x433a('0x12')]=null;}}_0x23460e[_0x433a('0x3e')]=_0x1a2832;_0x23460e[_0x433a('0x3f')]=Date[_0x433a('0x40')]()+0x36ee80;return _0x23460e['save']();})[_0x433a('0x18')](function(){return sendServiceMail({'to':_0x1b6889[_0x433a('0x37')][_0x433a('0x20')],'subject':_0x433a('0x41'),'text':'You\x20are\x20receiving\x20this\x20because\x20you\x20(or\x20someone\x20else)\x20have\x20requested\x20the\x20reset\x20of\x20the\x20password\x20for\x20your\x20account.\x0a\x0a'+_0x433a('0x42')+_0x433a('0x43')+_0x1b6889[_0x433a('0x44')][_0x433a('0x45')]+'/reset/'+_0x1a2832+'\x0a\x0a'+_0x433a('0x46')});})[_0x433a('0x18')](function(){_0x3cf508[_0x433a('0x2c')](0xc8)['send']({'message':_0x433a('0x47')});})[_0x433a('0x1d')](function(_0x137ea3){return handleError(_0x3cf508,0x1f4,_0x137ea3);});};exports[_0x433a('0x48')]=function(_0xb255bd,_0x4d5d95){return db[_0x433a('0x39')][_0x433a('0x1f')]({'where':{'resetPasswordToken':_0xb255bd[_0x433a('0x49')][_0x433a('0x4a')],'resetPasswordExpires':{'$gt':Date[_0x433a('0x40')]()}}})[_0x433a('0x18')](function(_0x4055e0){if(!_0x4055e0){throw new Error(_0x433a('0x4b'));}return db[_0x433a('0x4c')][_0x433a('0xb')]({'attributes':['id',_0x433a('0x4d'),_0x433a('0x4e'),_0x433a('0x4f')]})[_0x433a('0x18')](function(_0xed41a5){if(_0xed41a5[_0x433a('0x4d')])authService['validatePasswordPattern'](_0xb255bd[_0x433a('0x37')][_0x433a('0x50')]);if(!_0xed41a5[_0x433a('0x4e')]||!_0x4055e0[_0x433a('0x51')])return _0x4055e0;authService[_0x433a('0x52')](_0xb255bd[_0x433a('0x37')][_0x433a('0x50')],_0x4055e0['previousPasswords'],_0xed41a5[_0x433a('0x4f')]);return _0x4055e0;})[_0x433a('0x18')](function(){_0x4055e0[_0x433a('0x50')]=_0xb255bd['body'][_0x433a('0x50')];_0x4055e0[_0x433a('0x3e')]=null;_0x4055e0[_0x433a('0x3f')]=null;return _0x4055e0['save']();});})['then'](function(){_0x4d5d95[_0x433a('0x2c')](0xc8)[_0x433a('0x2d')]({'message':_0x433a('0x53')});})[_0x433a('0x1d')](function(_0x3d4b95){return handleError(_0x4d5d95,0x1f4,_0x3d4b95);});};passport['use'](_0x433a('0x30'),new LocalStrategy({'usernameField':_0x433a('0xe'),'passwordField':_0x433a('0x50')},function(_0x531912,_0x30d731,_0x5ae382){return localAuthenticate(db[_0x433a('0x39')],_0x531912,_0x30d731,_0x5ae382);})); \ No newline at end of file diff --git a/server/api/authLocal/index.js b/server/api/authLocal/index.js index f1cfc62..46308d8 100644 --- a/server/api/authLocal/index.js +++ b/server/api/authLocal/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x3c14=['reset','exports','Router','login','post','/forgot','forgot','/reset/:token'];(function(_0x484e36,_0x4482d8){var _0xafc85d=function(_0xaba9c8){while(--_0xaba9c8){_0x484e36['push'](_0x484e36['shift']());}};_0xafc85d(++_0x4482d8);}(_0x3c14,0x7a));var _0x43c1=function(_0x2f3ecd,_0x57976b){_0x2f3ecd=_0x2f3ecd-0x0;var _0xffdc44=_0x3c14[_0x2f3ecd];return _0xffdc44;};'use strict';var express=require('express');var router=express[_0x43c1('0x0')]();var controller=require('./authLocal.controller');router['post']('/',controller[_0x43c1('0x1')]);router[_0x43c1('0x2')](_0x43c1('0x3'),controller[_0x43c1('0x4')]);router[_0x43c1('0x2')](_0x43c1('0x5'),controller[_0x43c1('0x6')]);module[_0x43c1('0x7')]=router; \ No newline at end of file +var _0xa004=['/reset/:token','reset','express','./authLocal.controller','login','post','/forgot'];(function(_0x2483d2,_0x220057){var _0x22131b=function(_0x5760ab){while(--_0x5760ab){_0x2483d2['push'](_0x2483d2['shift']());}};_0x22131b(++_0x220057);}(_0xa004,0x105));var _0x4a00=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0xa004[_0x3dd15e];return _0x231fd0;};'use strict';var express=require(_0x4a00('0x0'));var router=express['Router']();var controller=require(_0x4a00('0x1'));router['post']('/',controller[_0x4a00('0x2')]);router[_0x4a00('0x3')](_0x4a00('0x4'),controller['forgot']);router[_0x4a00('0x3')](_0x4a00('0x5'),controller[_0x4a00('0x6')]);module['exports']=router; \ No newline at end of file diff --git a/server/api/automation/automation.attributes.js b/server/api/automation/automation.attributes.js index 8faf752..69c33c6 100644 --- a/server/api/automation/automation.attributes.js +++ b/server/api/automation/automation.attributes.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xc5d2=['BOOLEAN','INTEGER','exports','STRING'];(function(_0x263f76,_0x2ee49f){var _0x4112de=function(_0x590ef1){while(--_0x590ef1){_0x263f76['push'](_0x263f76['shift']());}};_0x4112de(++_0x2ee49f);}(_0xc5d2,0x6a));var _0x2c5d=function(_0x55abd9,_0x1148af){_0x55abd9=_0x55abd9-0x0;var _0x3e5669=_0xc5d2[_0x55abd9];return _0x3e5669;};'use strict';var Sequelize=require('sequelize');module[_0x2c5d('0x0')]={'name':{'type':Sequelize[_0x2c5d('0x1')],'allowNull':![]},'channel':{'type':Sequelize[_0x2c5d('0x1')]},'description':{'type':Sequelize[_0x2c5d('0x1')]},'status':{'type':Sequelize[_0x2c5d('0x2')],'defaultValue':![]},'timeout':{'type':Sequelize[_0x2c5d('0x3')],'defaultValue':0xa}}; \ No newline at end of file +var _0x2b61=['STRING','BOOLEAN','INTEGER'];(function(_0x1326f6,_0x5ae320){var _0xa495b7=function(_0x36d908){while(--_0x36d908){_0x1326f6['push'](_0x1326f6['shift']());}};_0xa495b7(++_0x5ae320);}(_0x2b61,0xb4));var _0x12b6=function(_0x118da4,_0x2e192e){_0x118da4=_0x118da4-0x0;var _0x40dfbb=_0x2b61[_0x118da4];return _0x40dfbb;};'use strict';var Sequelize=require('sequelize');module['exports']={'name':{'type':Sequelize['STRING'],'allowNull':![]},'channel':{'type':Sequelize[_0x12b6('0x0')]},'description':{'type':Sequelize[_0x12b6('0x0')]},'status':{'type':Sequelize[_0x12b6('0x1')],'defaultValue':![]},'timeout':{'type':Sequelize[_0x12b6('0x2')],'defaultValue':0xa}}; \ No newline at end of file diff --git a/server/api/automation/automation.controller.js b/server/api/automation/automation.controller.js index 3bb2771..8cb9c17 100644 --- a/server/api/automation/automation.controller.js +++ b/server/api/automation/automation.controller.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xa5f4=['addConditions','Condition','ids','getConditions','order','addActions','omit','findOne','Action','eml-format','rimraf','zip-dir','fast-json-patch','bluebird','mustache','sox','to-csv','ejs','fs-extra','lodash','squel','crypto','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../config/license/util','status','end','json','undefined','count','offset','limit','set','Content-Range','apply','reject','save','then','destroy','sendStatus','error','stack','name','index','map','Automation','rawAttributes','fieldName','type','key','model','query','keys','intersection','attributes','fields','length','hasOwnProperty','nolimit','sort','where','filters','pick','filter','VIRTUAL','merge','options','includeAll','findAll','catch','show','params','include','find','create','update','body'];(function(_0x5e1591,_0x597776){var _0x33d511=function(_0x416120){while(--_0x416120){_0x5e1591['push'](_0x5e1591['shift']());}};_0x33d511(++_0x597776);}(_0xa5f4,0x161));var _0x4a5f=function(_0x588836,_0x1e5885){_0x588836=_0x588836-0x0;var _0x3069a3=_0xa5f4[_0x588836];return _0x3069a3;};'use strict';var emlformat=require(_0x4a5f('0x0'));var rimraf=require(_0x4a5f('0x1'));var zipdir=require(_0x4a5f('0x2'));var jsonpatch=require(_0x4a5f('0x3'));var rp=require('request-promise');var moment=require('moment');var BPromise=require(_0x4a5f('0x4'));var Mustache=require(_0x4a5f('0x5'));var util=require('util');var path=require('path');var sox=require(_0x4a5f('0x6'));var csv=require(_0x4a5f('0x7'));var ejs=require(_0x4a5f('0x8'));var fs=require('fs');var fs_extra=require(_0x4a5f('0x9'));var _=require(_0x4a5f('0xa'));var squel=require(_0x4a5f('0xb'));var crypto=require(_0x4a5f('0xc'));var jsforce=require('jsforce');var deskjs=require('desk.js');var toCsv=require('to-csv');var querystring=require(_0x4a5f('0xd'));var Papa=require(_0x4a5f('0xe'));var Redis=require(_0x4a5f('0xf'));var authService=require(_0x4a5f('0x10'));var qs=require(_0x4a5f('0x11'));var as=require(_0x4a5f('0x12'));var hardwareService=require(_0x4a5f('0x13'));var logger=require(_0x4a5f('0x14'))(_0x4a5f('0x15'));var utils=require(_0x4a5f('0x16'));var config=require(_0x4a5f('0x17'));var licenseUtil=require(_0x4a5f('0x18'));var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0x1d5be5,_0x4e0f92){_0x4e0f92=_0x4e0f92||0xcc;return function(_0x4364d7){if(_0x4364d7){return _0x1d5be5['sendStatus'](_0x4e0f92);}return _0x1d5be5[_0x4a5f('0x19')](_0x4e0f92)[_0x4a5f('0x1a')]();};}function respondWithResult(_0x21cf46,_0x526ace){_0x526ace=_0x526ace||0xc8;return function(_0x11145a){if(_0x11145a){return _0x21cf46[_0x4a5f('0x19')](_0x526ace)[_0x4a5f('0x1b')](_0x11145a);}};}function respondWithFilteredResult(_0x12f3fe,_0x39b38a){return function(_0x125fe0){if(_0x125fe0){var _0x53c54b=typeof _0x39b38a['offset']===_0x4a5f('0x1c')&&typeof _0x39b38a['limit']===_0x4a5f('0x1c');var _0x26e89f=_0x125fe0[_0x4a5f('0x1d')];var _0x4ebf01=_0x53c54b?0x0:_0x39b38a['offset'];var _0x2334b5=_0x53c54b?_0x125fe0[_0x4a5f('0x1d')]:_0x39b38a[_0x4a5f('0x1e')]+_0x39b38a[_0x4a5f('0x1f')];var _0x146ebd;if(_0x2334b5>=_0x26e89f){_0x2334b5=_0x26e89f;_0x146ebd=0xc8;}else{_0x146ebd=0xce;}_0x12f3fe[_0x4a5f('0x19')](_0x146ebd);return _0x12f3fe[_0x4a5f('0x20')](_0x4a5f('0x21'),_0x4ebf01+'-'+_0x2334b5+'/'+_0x26e89f)['json'](_0x125fe0);}return null;};}function patchUpdates(_0x57369b){return function(_0x13eb7d){try{jsonpatch[_0x4a5f('0x22')](_0x13eb7d,_0x57369b,!![]);}catch(_0x360ac1){return BPromise[_0x4a5f('0x23')](_0x360ac1);}return _0x13eb7d[_0x4a5f('0x24')]();};}function saveUpdates(_0x3a9a79,_0xbefdec){return function(_0x1d469c){if(_0x1d469c){return _0x1d469c['update'](_0x3a9a79)[_0x4a5f('0x25')](function(_0x30e8b2){return _0x30e8b2;});}return null;};}function removeEntity(_0x2c9b49,_0x505d02){return function(_0x225ffc){if(_0x225ffc){return _0x225ffc[_0x4a5f('0x26')]()[_0x4a5f('0x25')](function(){_0x2c9b49[_0x4a5f('0x19')](0xcc)['end']();});}};}function handleEntityNotFound(_0x56a2f4,_0x5dfa3f){return function(_0x3e6609){if(!_0x3e6609){_0x56a2f4[_0x4a5f('0x27')](0x194);}return _0x3e6609;};}function handleError(_0x38f00c,_0x2cdc2e){_0x2cdc2e=_0x2cdc2e||0x1f4;return function(_0x3af9fc){logger[_0x4a5f('0x28')](_0x3af9fc[_0x4a5f('0x29')]);if(_0x3af9fc[_0x4a5f('0x2a')]){delete _0x3af9fc[_0x4a5f('0x2a')];}_0x38f00c[_0x4a5f('0x19')](_0x2cdc2e)['send'](_0x3af9fc);};}exports[_0x4a5f('0x2b')]=function(_0x926932,_0x53e619){var _0x3ab149={},_0x18ef28={},_0x2c29d8={'count':0x0,'rows':[]};var _0x1f7390=_[_0x4a5f('0x2c')](db[_0x4a5f('0x2d')][_0x4a5f('0x2e')],function(_0x1464ab){return{'name':_0x1464ab[_0x4a5f('0x2f')],'type':_0x1464ab[_0x4a5f('0x30')][_0x4a5f('0x31')]};});_0x18ef28[_0x4a5f('0x32')]=_[_0x4a5f('0x2c')](_0x1f7390,_0x4a5f('0x2a'));_0x18ef28[_0x4a5f('0x33')]=_[_0x4a5f('0x34')](_0x926932[_0x4a5f('0x33')]);_0x18ef28['filters']=_[_0x4a5f('0x35')](_0x18ef28[_0x4a5f('0x32')],_0x18ef28[_0x4a5f('0x33')]);_0x3ab149[_0x4a5f('0x36')]=_[_0x4a5f('0x35')](_0x18ef28[_0x4a5f('0x32')],qs[_0x4a5f('0x37')](_0x926932[_0x4a5f('0x33')][_0x4a5f('0x37')]));_0x3ab149[_0x4a5f('0x36')]=_0x3ab149[_0x4a5f('0x36')][_0x4a5f('0x38')]?_0x3ab149[_0x4a5f('0x36')]:_0x18ef28['model'];if(!_0x926932[_0x4a5f('0x33')][_0x4a5f('0x39')](_0x4a5f('0x3a'))){_0x3ab149['limit']=qs['limit'](_0x926932[_0x4a5f('0x33')][_0x4a5f('0x1f')]);_0x3ab149[_0x4a5f('0x1e')]=qs['offset'](_0x926932['query'][_0x4a5f('0x1e')]);}_0x3ab149['order']=qs[_0x4a5f('0x3b')](_0x926932[_0x4a5f('0x33')]['sort']);_0x3ab149[_0x4a5f('0x3c')]=qs[_0x4a5f('0x3d')](_[_0x4a5f('0x3e')](_0x926932['query'],_0x18ef28[_0x4a5f('0x3d')]),_0x1f7390);if(_0x926932[_0x4a5f('0x33')][_0x4a5f('0x3f')]){_0x3ab149[_0x4a5f('0x3c')]=_['merge'](_0x3ab149['where'],{'$or':_[_0x4a5f('0x2c')](_0x1f7390,function(_0x4c3811){if(_0x4c3811['type']!==_0x4a5f('0x40')){var _0x209f0f={};_0x209f0f[_0x4c3811[_0x4a5f('0x2a')]]={'$like':'%'+_0x926932[_0x4a5f('0x33')][_0x4a5f('0x3f')]+'%'};return _0x209f0f;}})});}_0x3ab149=_[_0x4a5f('0x41')]({},_0x3ab149,_0x926932[_0x4a5f('0x42')]);var _0x3a6f49={'where':_0x3ab149[_0x4a5f('0x3c')]};return db[_0x4a5f('0x2d')][_0x4a5f('0x1d')](_0x3a6f49)[_0x4a5f('0x25')](function(_0xa03f69){_0x2c29d8[_0x4a5f('0x1d')]=_0xa03f69;if(_0x926932[_0x4a5f('0x33')][_0x4a5f('0x43')]){_0x3ab149['include']=[{'all':!![]}];}return db[_0x4a5f('0x2d')][_0x4a5f('0x44')](_0x3ab149);})[_0x4a5f('0x25')](function(_0x2be672){_0x2c29d8['rows']=_0x2be672;return _0x2c29d8;})[_0x4a5f('0x25')](respondWithFilteredResult(_0x53e619,_0x3ab149))[_0x4a5f('0x45')](handleError(_0x53e619,null));};exports[_0x4a5f('0x46')]=function(_0x207ee4,_0x4fb19b){var _0x33bd3e={'raw':![],'where':{'id':_0x207ee4[_0x4a5f('0x47')]['id']}},_0x57993a={};_0x57993a[_0x4a5f('0x32')]=_[_0x4a5f('0x34')](db[_0x4a5f('0x2d')]['rawAttributes']);_0x57993a[_0x4a5f('0x33')]=_[_0x4a5f('0x34')](_0x207ee4[_0x4a5f('0x33')]);_0x57993a[_0x4a5f('0x3d')]=_[_0x4a5f('0x35')](_0x57993a['model'],_0x57993a[_0x4a5f('0x33')]);_0x33bd3e[_0x4a5f('0x36')]=_[_0x4a5f('0x35')](_0x57993a[_0x4a5f('0x32')],qs[_0x4a5f('0x37')](_0x207ee4[_0x4a5f('0x33')][_0x4a5f('0x37')]));_0x33bd3e[_0x4a5f('0x36')]=_0x33bd3e[_0x4a5f('0x36')][_0x4a5f('0x38')]?_0x33bd3e[_0x4a5f('0x36')]:_0x57993a[_0x4a5f('0x32')];if(_0x207ee4['query'][_0x4a5f('0x43')]){_0x33bd3e[_0x4a5f('0x48')]=[{'all':!![]}];}_0x33bd3e=_[_0x4a5f('0x41')]({},_0x33bd3e,_0x207ee4[_0x4a5f('0x42')]);return db['Automation'][_0x4a5f('0x49')](_0x33bd3e)[_0x4a5f('0x25')](handleEntityNotFound(_0x4fb19b,null))[_0x4a5f('0x25')](respondWithResult(_0x4fb19b,null))[_0x4a5f('0x45')](handleError(_0x4fb19b,null));};exports['create']=function(_0x17060b,_0x54800b){return db[_0x4a5f('0x2d')][_0x4a5f('0x4a')](_0x17060b['body'],{})['then'](respondWithResult(_0x54800b,0xc9))[_0x4a5f('0x45')](handleError(_0x54800b,null));};exports[_0x4a5f('0x4b')]=function(_0x3b022a,_0xce50d5){if(_0x3b022a['body']['id']){delete _0x3b022a[_0x4a5f('0x4c')]['id'];}return db[_0x4a5f('0x2d')][_0x4a5f('0x49')]({'where':{'id':_0x3b022a[_0x4a5f('0x47')]['id']}})[_0x4a5f('0x25')](handleEntityNotFound(_0xce50d5,null))[_0x4a5f('0x25')](saveUpdates(_0x3b022a[_0x4a5f('0x4c')],null))['then'](respondWithResult(_0xce50d5,null))[_0x4a5f('0x45')](handleError(_0xce50d5,null));};exports[_0x4a5f('0x26')]=function(_0x12bc5c,_0x4e29b8){return db['Automation']['find']({'where':{'id':_0x12bc5c[_0x4a5f('0x47')]['id']}})['then'](handleEntityNotFound(_0x4e29b8,null))[_0x4a5f('0x25')](removeEntity(_0x4e29b8,null))[_0x4a5f('0x45')](handleError(_0x4e29b8,null));};exports[_0x4a5f('0x4d')]=function(_0x2e9147,_0x2815bb,_0x480c81){return db[_0x4a5f('0x4e')][_0x4a5f('0x49')]({'where':{'id':_0x2e9147[_0x4a5f('0x47')]['id']}})[_0x4a5f('0x25')](handleEntityNotFound(_0x2815bb,null))[_0x4a5f('0x25')](function(_0x4f7604){if(_0x4f7604){return _0x4f7604[_0x4a5f('0x4d')](_0x2e9147[_0x4a5f('0x4c')][_0x4a5f('0x4f')],_['omit'](_0x2e9147[_0x4a5f('0x4c')],[_0x4a5f('0x4f'),'id'])||{});}})[_0x4a5f('0x25')](respondWithResult(_0x2815bb,null))[_0x4a5f('0x45')](handleError(_0x2815bb,null));};exports[_0x4a5f('0x50')]=function(_0xed0951,_0x50ab0d,_0x35f585){var _0x4fb55d={};var _0x5b9124={};var _0x35093e;var _0x50eca4;return db[_0x4a5f('0x2d')]['findOne']({'where':{'id':_0xed0951[_0x4a5f('0x47')]['id']}})[_0x4a5f('0x25')](handleEntityNotFound(_0x50ab0d,null))[_0x4a5f('0x25')](function(_0x52896e){if(_0x52896e){_0x35093e=_0x52896e;_0x5b9124[_0x4a5f('0x32')]=_[_0x4a5f('0x34')](db['Condition'][_0x4a5f('0x2e')]);_0x5b9124[_0x4a5f('0x33')]=_['keys'](_0xed0951[_0x4a5f('0x33')]);_0x5b9124[_0x4a5f('0x3d')]=_[_0x4a5f('0x35')](_0x5b9124[_0x4a5f('0x32')],_0x5b9124['query']);_0x4fb55d['attributes']=_['intersection'](_0x5b9124['model'],qs[_0x4a5f('0x37')](_0xed0951[_0x4a5f('0x33')]['fields']));_0x4fb55d[_0x4a5f('0x36')]=_0x4fb55d['attributes'][_0x4a5f('0x38')]?_0x4fb55d[_0x4a5f('0x36')]:_0x5b9124[_0x4a5f('0x32')];_0x4fb55d[_0x4a5f('0x51')]=qs['sort'](_0xed0951[_0x4a5f('0x33')][_0x4a5f('0x3b')]);_0x4fb55d['where']=qs[_0x4a5f('0x3d')](_[_0x4a5f('0x3e')](_0xed0951[_0x4a5f('0x33')],_0x5b9124[_0x4a5f('0x3d')]));if(_0xed0951['query']['filter']){_0x4fb55d['where']=_[_0x4a5f('0x41')](_0x4fb55d['where'],{'$or':_[_0x4a5f('0x2c')](_0x4fb55d['attributes'],function(_0x4824ae){var _0x4899a1={};_0x4899a1[_0x4824ae]={'$like':'%'+_0xed0951[_0x4a5f('0x33')][_0x4a5f('0x3f')]+'%'};return _0x4899a1;})});}_0x4fb55d=_['merge']({},_0x4fb55d,_0xed0951[_0x4a5f('0x42')]);return _0x35093e[_0x4a5f('0x50')](_0x4fb55d);}})[_0x4a5f('0x25')](function(_0x19a68a){if(_0x19a68a){_0x50eca4=_0x19a68a[_0x4a5f('0x38')];if(!_0xed0951[_0x4a5f('0x33')]['hasOwnProperty']('nolimit')){_0x4fb55d['limit']=qs[_0x4a5f('0x1f')](_0xed0951[_0x4a5f('0x33')][_0x4a5f('0x1f')]);_0x4fb55d[_0x4a5f('0x1e')]=qs[_0x4a5f('0x1e')](_0xed0951['query'][_0x4a5f('0x1e')]);}return _0x35093e['getConditions'](_0x4fb55d);}})[_0x4a5f('0x25')](function(_0x167ff4){if(_0x167ff4){return _0x167ff4?{'count':_0x50eca4,'rows':_0x167ff4}:null;}})[_0x4a5f('0x25')](respondWithResult(_0x50ab0d,null))[_0x4a5f('0x45')](handleError(_0x50ab0d,null));};exports[_0x4a5f('0x52')]=function(_0x5ab9d3,_0x2aa252,_0x1c4bb2){return db['Action'][_0x4a5f('0x49')]({'where':{'id':_0x5ab9d3['params']['id']}})[_0x4a5f('0x25')](handleEntityNotFound(_0x2aa252,null))[_0x4a5f('0x25')](function(_0x49cc9a){if(_0x49cc9a){return _0x49cc9a['addActions'](_0x5ab9d3[_0x4a5f('0x4c')][_0x4a5f('0x4f')],_[_0x4a5f('0x53')](_0x5ab9d3['body'],[_0x4a5f('0x4f'),'id'])||{});}})['then'](respondWithResult(_0x2aa252,null))['catch'](handleError(_0x2aa252,null));};exports['getActions']=function(_0x4a7c9d,_0x26188a,_0x3785b7){var _0x1de9cf={};var _0x1db358={};var _0x21c8bd;var _0xc1ac7a;return db['Automation'][_0x4a5f('0x54')]({'where':{'id':_0x4a7c9d[_0x4a5f('0x47')]['id']}})[_0x4a5f('0x25')](handleEntityNotFound(_0x26188a,null))[_0x4a5f('0x25')](function(_0x4d11a4){if(_0x4d11a4){_0x21c8bd=_0x4d11a4;_0x1db358[_0x4a5f('0x32')]=_[_0x4a5f('0x34')](db[_0x4a5f('0x55')][_0x4a5f('0x2e')]);_0x1db358[_0x4a5f('0x33')]=_['keys'](_0x4a7c9d['query']);_0x1db358[_0x4a5f('0x3d')]=_[_0x4a5f('0x35')](_0x1db358['model'],_0x1db358[_0x4a5f('0x33')]);_0x1de9cf[_0x4a5f('0x36')]=_[_0x4a5f('0x35')](_0x1db358[_0x4a5f('0x32')],qs['fields'](_0x4a7c9d[_0x4a5f('0x33')]['fields']));_0x1de9cf[_0x4a5f('0x36')]=_0x1de9cf[_0x4a5f('0x36')][_0x4a5f('0x38')]?_0x1de9cf[_0x4a5f('0x36')]:_0x1db358[_0x4a5f('0x32')];_0x1de9cf[_0x4a5f('0x51')]=qs['sort'](_0x4a7c9d[_0x4a5f('0x33')]['sort']);_0x1de9cf['where']=qs[_0x4a5f('0x3d')](_[_0x4a5f('0x3e')](_0x4a7c9d['query'],_0x1db358[_0x4a5f('0x3d')]));if(_0x4a7c9d['query'][_0x4a5f('0x3f')]){_0x1de9cf[_0x4a5f('0x3c')]=_[_0x4a5f('0x41')](_0x1de9cf[_0x4a5f('0x3c')],{'$or':_[_0x4a5f('0x2c')](_0x1de9cf[_0x4a5f('0x36')],function(_0x1a1910){var _0x30178f={};_0x30178f[_0x1a1910]={'$like':'%'+_0x4a7c9d['query']['filter']+'%'};return _0x30178f;})});}_0x1de9cf=_[_0x4a5f('0x41')]({},_0x1de9cf,_0x4a7c9d['options']);return _0x21c8bd['getActions'](_0x1de9cf);}})[_0x4a5f('0x25')](function(_0x379575){if(_0x379575){_0xc1ac7a=_0x379575[_0x4a5f('0x38')];if(!_0x4a7c9d[_0x4a5f('0x33')][_0x4a5f('0x39')](_0x4a5f('0x3a'))){_0x1de9cf[_0x4a5f('0x1f')]=qs[_0x4a5f('0x1f')](_0x4a7c9d[_0x4a5f('0x33')][_0x4a5f('0x1f')]);_0x1de9cf['offset']=qs['offset'](_0x4a7c9d[_0x4a5f('0x33')]['offset']);}return _0x21c8bd['getActions'](_0x1de9cf);}})[_0x4a5f('0x25')](function(_0x251b39){if(_0x251b39){return _0x251b39?{'count':_0xc1ac7a,'rows':_0x251b39}:null;}})[_0x4a5f('0x25')](respondWithResult(_0x26188a,null))['catch'](handleError(_0x26188a,null));}; \ No newline at end of file +var _0x9b25=['mustache','util','path','ejs','fs-extra','lodash','jsforce','desk.js','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/license/util','../../mysqldb','sendStatus','status','end','json','offset','undefined','limit','count','set','Content-Range','reject','save','update','then','destroy','error','stack','name','send','index','map','Automation','rawAttributes','fieldName','type','model','keys','intersection','attributes','fields','query','nolimit','order','sort','filters','pick','where','merge','VIRTUAL','filter','options','includeAll','include','rows','params','length','find','catch','create','body','addConditions','ids','getConditions','findOne','addActions','Action','omit','getActions','hasOwnProperty','eml-format','rimraf','zip-dir','moment','bluebird'];(function(_0x3a99f4,_0x2a81c1){var _0xea0b42=function(_0x41f533){while(--_0x41f533){_0x3a99f4['push'](_0x3a99f4['shift']());}};_0xea0b42(++_0x2a81c1);}(_0x9b25,0x19a));var _0x59b2=function(_0x27e54a,_0xc66b8d){_0x27e54a=_0x27e54a-0x0;var _0x40f5fe=_0x9b25[_0x27e54a];return _0x40f5fe;};'use strict';var emlformat=require(_0x59b2('0x0'));var rimraf=require(_0x59b2('0x1'));var zipdir=require(_0x59b2('0x2'));var jsonpatch=require('fast-json-patch');var rp=require('request-promise');var moment=require(_0x59b2('0x3'));var BPromise=require(_0x59b2('0x4'));var Mustache=require(_0x59b2('0x5'));var util=require(_0x59b2('0x6'));var path=require(_0x59b2('0x7'));var sox=require('sox');var csv=require('to-csv');var ejs=require(_0x59b2('0x8'));var fs=require('fs');var fs_extra=require(_0x59b2('0x9'));var _=require(_0x59b2('0xa'));var squel=require('squel');var crypto=require('crypto');var jsforce=require(_0x59b2('0xb'));var deskjs=require(_0x59b2('0xc'));var toCsv=require('to-csv');var querystring=require(_0x59b2('0xd'));var Papa=require(_0x59b2('0xe'));var Redis=require(_0x59b2('0xf'));var authService=require(_0x59b2('0x10'));var qs=require('../../components/parsers/qs');var as=require(_0x59b2('0x11'));var hardwareService=require(_0x59b2('0x12'));var logger=require(_0x59b2('0x13'))(_0x59b2('0x14'));var utils=require(_0x59b2('0x15'));var config=require('../../config/environment');var licenseUtil=require(_0x59b2('0x16'));var db=require(_0x59b2('0x17'))['db'];function respondWithStatusCode(_0x4c9910,_0xae5f1e){_0xae5f1e=_0xae5f1e||0xcc;return function(_0x2d6870){if(_0x2d6870){return _0x4c9910[_0x59b2('0x18')](_0xae5f1e);}return _0x4c9910[_0x59b2('0x19')](_0xae5f1e)[_0x59b2('0x1a')]();};}function respondWithResult(_0x23da91,_0x598633){_0x598633=_0x598633||0xc8;return function(_0x18e825){if(_0x18e825){return _0x23da91['status'](_0x598633)[_0x59b2('0x1b')](_0x18e825);}};}function respondWithFilteredResult(_0x5c9422,_0x26fcaf){return function(_0x28b4fd){if(_0x28b4fd){var _0x5afdd0=typeof _0x26fcaf[_0x59b2('0x1c')]===_0x59b2('0x1d')&&typeof _0x26fcaf[_0x59b2('0x1e')]==='undefined';var _0x3ce536=_0x28b4fd[_0x59b2('0x1f')];var _0x4a80b7=_0x5afdd0?0x0:_0x26fcaf['offset'];var _0x35a4fe=_0x5afdd0?_0x28b4fd[_0x59b2('0x1f')]:_0x26fcaf[_0x59b2('0x1c')]+_0x26fcaf[_0x59b2('0x1e')];var _0x54580c;if(_0x35a4fe>=_0x3ce536){_0x35a4fe=_0x3ce536;_0x54580c=0xc8;}else{_0x54580c=0xce;}_0x5c9422[_0x59b2('0x19')](_0x54580c);return _0x5c9422[_0x59b2('0x20')](_0x59b2('0x21'),_0x4a80b7+'-'+_0x35a4fe+'/'+_0x3ce536)[_0x59b2('0x1b')](_0x28b4fd);}return null;};}function patchUpdates(_0x15e302){return function(_0x1d13b1){try{jsonpatch['apply'](_0x1d13b1,_0x15e302,!![]);}catch(_0x4b1bc8){return BPromise[_0x59b2('0x22')](_0x4b1bc8);}return _0x1d13b1[_0x59b2('0x23')]();};}function saveUpdates(_0x481ad8,_0x5a9b64){return function(_0x50c24d){if(_0x50c24d){return _0x50c24d[_0x59b2('0x24')](_0x481ad8)[_0x59b2('0x25')](function(_0x42b529){return _0x42b529;});}return null;};}function removeEntity(_0x1740fc,_0x45b2b8){return function(_0x31e244){if(_0x31e244){return _0x31e244[_0x59b2('0x26')]()[_0x59b2('0x25')](function(){_0x1740fc[_0x59b2('0x19')](0xcc)[_0x59b2('0x1a')]();});}};}function handleEntityNotFound(_0x64f53f,_0x235282){return function(_0x5404e4){if(!_0x5404e4){_0x64f53f[_0x59b2('0x18')](0x194);}return _0x5404e4;};}function handleError(_0x291c9a,_0x2b77cc){_0x2b77cc=_0x2b77cc||0x1f4;return function(_0x27b285){logger[_0x59b2('0x27')](_0x27b285[_0x59b2('0x28')]);if(_0x27b285[_0x59b2('0x29')]){delete _0x27b285['name'];}_0x291c9a['status'](_0x2b77cc)[_0x59b2('0x2a')](_0x27b285);};}exports[_0x59b2('0x2b')]=function(_0x2020ce,_0x4fcdc5){var _0x2bd70e={},_0x1e43ee={},_0xad2edf={'count':0x0,'rows':[]};var _0x1fa034=_[_0x59b2('0x2c')](db[_0x59b2('0x2d')][_0x59b2('0x2e')],function(_0xe6c7ac){return{'name':_0xe6c7ac[_0x59b2('0x2f')],'type':_0xe6c7ac[_0x59b2('0x30')]['key']};});_0x1e43ee[_0x59b2('0x31')]=_[_0x59b2('0x2c')](_0x1fa034,_0x59b2('0x29'));_0x1e43ee['query']=_[_0x59b2('0x32')](_0x2020ce['query']);_0x1e43ee['filters']=_[_0x59b2('0x33')](_0x1e43ee[_0x59b2('0x31')],_0x1e43ee['query']);_0x2bd70e[_0x59b2('0x34')]=_[_0x59b2('0x33')](_0x1e43ee[_0x59b2('0x31')],qs[_0x59b2('0x35')](_0x2020ce[_0x59b2('0x36')][_0x59b2('0x35')]));_0x2bd70e[_0x59b2('0x34')]=_0x2bd70e[_0x59b2('0x34')]['length']?_0x2bd70e[_0x59b2('0x34')]:_0x1e43ee[_0x59b2('0x31')];if(!_0x2020ce[_0x59b2('0x36')]['hasOwnProperty'](_0x59b2('0x37'))){_0x2bd70e[_0x59b2('0x1e')]=qs['limit'](_0x2020ce[_0x59b2('0x36')]['limit']);_0x2bd70e[_0x59b2('0x1c')]=qs['offset'](_0x2020ce['query']['offset']);}_0x2bd70e[_0x59b2('0x38')]=qs[_0x59b2('0x39')](_0x2020ce[_0x59b2('0x36')][_0x59b2('0x39')]);_0x2bd70e['where']=qs[_0x59b2('0x3a')](_[_0x59b2('0x3b')](_0x2020ce[_0x59b2('0x36')],_0x1e43ee[_0x59b2('0x3a')]),_0x1fa034);if(_0x2020ce[_0x59b2('0x36')]['filter']){_0x2bd70e[_0x59b2('0x3c')]=_[_0x59b2('0x3d')](_0x2bd70e[_0x59b2('0x3c')],{'$or':_[_0x59b2('0x2c')](_0x1fa034,function(_0x1c49b1){if(_0x1c49b1[_0x59b2('0x30')]!==_0x59b2('0x3e')){var _0x4e7fd5={};_0x4e7fd5[_0x1c49b1['name']]={'$like':'%'+_0x2020ce['query'][_0x59b2('0x3f')]+'%'};return _0x4e7fd5;}})});}_0x2bd70e=_[_0x59b2('0x3d')]({},_0x2bd70e,_0x2020ce[_0x59b2('0x40')]);var _0xe7f59={'where':_0x2bd70e['where']};return db[_0x59b2('0x2d')]['count'](_0xe7f59)[_0x59b2('0x25')](function(_0xc97313){_0xad2edf['count']=_0xc97313;if(_0x2020ce['query'][_0x59b2('0x41')]){_0x2bd70e[_0x59b2('0x42')]=[{'all':!![]}];}return db[_0x59b2('0x2d')]['findAll'](_0x2bd70e);})[_0x59b2('0x25')](function(_0x4cfdbe){_0xad2edf[_0x59b2('0x43')]=_0x4cfdbe;return _0xad2edf;})[_0x59b2('0x25')](respondWithFilteredResult(_0x4fcdc5,_0x2bd70e))['catch'](handleError(_0x4fcdc5,null));};exports['show']=function(_0x5acc37,_0x3d1d66){var _0x52ca09={'raw':![],'where':{'id':_0x5acc37[_0x59b2('0x44')]['id']}},_0x128a88={};_0x128a88[_0x59b2('0x31')]=_[_0x59b2('0x32')](db[_0x59b2('0x2d')][_0x59b2('0x2e')]);_0x128a88['query']=_['keys'](_0x5acc37['query']);_0x128a88[_0x59b2('0x3a')]=_[_0x59b2('0x33')](_0x128a88[_0x59b2('0x31')],_0x128a88[_0x59b2('0x36')]);_0x52ca09[_0x59b2('0x34')]=_[_0x59b2('0x33')](_0x128a88[_0x59b2('0x31')],qs[_0x59b2('0x35')](_0x5acc37[_0x59b2('0x36')][_0x59b2('0x35')]));_0x52ca09[_0x59b2('0x34')]=_0x52ca09['attributes'][_0x59b2('0x45')]?_0x52ca09['attributes']:_0x128a88[_0x59b2('0x31')];if(_0x5acc37[_0x59b2('0x36')][_0x59b2('0x41')]){_0x52ca09[_0x59b2('0x42')]=[{'all':!![]}];}_0x52ca09=_[_0x59b2('0x3d')]({},_0x52ca09,_0x5acc37[_0x59b2('0x40')]);return db[_0x59b2('0x2d')][_0x59b2('0x46')](_0x52ca09)[_0x59b2('0x25')](handleEntityNotFound(_0x3d1d66,null))[_0x59b2('0x25')](respondWithResult(_0x3d1d66,null))[_0x59b2('0x47')](handleError(_0x3d1d66,null));};exports['create']=function(_0x618086,_0x4a1d7f){return db[_0x59b2('0x2d')][_0x59b2('0x48')](_0x618086[_0x59b2('0x49')],{})[_0x59b2('0x25')](respondWithResult(_0x4a1d7f,0xc9))[_0x59b2('0x47')](handleError(_0x4a1d7f,null));};exports['update']=function(_0x2ca091,_0x3a2f55){if(_0x2ca091[_0x59b2('0x49')]['id']){delete _0x2ca091[_0x59b2('0x49')]['id'];}return db[_0x59b2('0x2d')][_0x59b2('0x46')]({'where':{'id':_0x2ca091['params']['id']}})[_0x59b2('0x25')](handleEntityNotFound(_0x3a2f55,null))[_0x59b2('0x25')](saveUpdates(_0x2ca091[_0x59b2('0x49')],null))['then'](respondWithResult(_0x3a2f55,null))[_0x59b2('0x47')](handleError(_0x3a2f55,null));};exports[_0x59b2('0x26')]=function(_0x4ba870,_0x3e47bd){return db[_0x59b2('0x2d')][_0x59b2('0x46')]({'where':{'id':_0x4ba870[_0x59b2('0x44')]['id']}})[_0x59b2('0x25')](handleEntityNotFound(_0x3e47bd,null))['then'](removeEntity(_0x3e47bd,null))[_0x59b2('0x47')](handleError(_0x3e47bd,null));};exports[_0x59b2('0x4a')]=function(_0x210a99,_0x32829c,_0x531e2f){return db['Condition']['find']({'where':{'id':_0x210a99['params']['id']}})['then'](handleEntityNotFound(_0x32829c,null))[_0x59b2('0x25')](function(_0x5066b4){if(_0x5066b4){return _0x5066b4[_0x59b2('0x4a')](_0x210a99[_0x59b2('0x49')]['ids'],_['omit'](_0x210a99['body'],[_0x59b2('0x4b'),'id'])||{});}})[_0x59b2('0x25')](respondWithResult(_0x32829c,null))[_0x59b2('0x47')](handleError(_0x32829c,null));};exports[_0x59b2('0x4c')]=function(_0x37534f,_0x151833,_0xfc1513){var _0x25f443={};var _0x248471={};var _0x42c52b;var _0x5037c4;return db[_0x59b2('0x2d')][_0x59b2('0x4d')]({'where':{'id':_0x37534f[_0x59b2('0x44')]['id']}})[_0x59b2('0x25')](handleEntityNotFound(_0x151833,null))[_0x59b2('0x25')](function(_0x4a5b69){if(_0x4a5b69){_0x42c52b=_0x4a5b69;_0x248471[_0x59b2('0x31')]=_['keys'](db['Condition'][_0x59b2('0x2e')]);_0x248471[_0x59b2('0x36')]=_[_0x59b2('0x32')](_0x37534f['query']);_0x248471[_0x59b2('0x3a')]=_['intersection'](_0x248471[_0x59b2('0x31')],_0x248471[_0x59b2('0x36')]);_0x25f443['attributes']=_[_0x59b2('0x33')](_0x248471[_0x59b2('0x31')],qs[_0x59b2('0x35')](_0x37534f['query'][_0x59b2('0x35')]));_0x25f443[_0x59b2('0x34')]=_0x25f443[_0x59b2('0x34')][_0x59b2('0x45')]?_0x25f443[_0x59b2('0x34')]:_0x248471[_0x59b2('0x31')];_0x25f443[_0x59b2('0x38')]=qs['sort'](_0x37534f[_0x59b2('0x36')]['sort']);_0x25f443[_0x59b2('0x3c')]=qs[_0x59b2('0x3a')](_[_0x59b2('0x3b')](_0x37534f['query'],_0x248471['filters']));if(_0x37534f[_0x59b2('0x36')][_0x59b2('0x3f')]){_0x25f443[_0x59b2('0x3c')]=_[_0x59b2('0x3d')](_0x25f443[_0x59b2('0x3c')],{'$or':_[_0x59b2('0x2c')](_0x25f443[_0x59b2('0x34')],function(_0x9d3a6b){var _0x59c7ea={};_0x59c7ea[_0x9d3a6b]={'$like':'%'+_0x37534f[_0x59b2('0x36')][_0x59b2('0x3f')]+'%'};return _0x59c7ea;})});}_0x25f443=_[_0x59b2('0x3d')]({},_0x25f443,_0x37534f[_0x59b2('0x40')]);return _0x42c52b['getConditions'](_0x25f443);}})[_0x59b2('0x25')](function(_0x11ba40){if(_0x11ba40){_0x5037c4=_0x11ba40[_0x59b2('0x45')];if(!_0x37534f[_0x59b2('0x36')]['hasOwnProperty'](_0x59b2('0x37'))){_0x25f443[_0x59b2('0x1e')]=qs[_0x59b2('0x1e')](_0x37534f['query'][_0x59b2('0x1e')]);_0x25f443[_0x59b2('0x1c')]=qs[_0x59b2('0x1c')](_0x37534f[_0x59b2('0x36')][_0x59b2('0x1c')]);}return _0x42c52b[_0x59b2('0x4c')](_0x25f443);}})[_0x59b2('0x25')](function(_0x357aca){if(_0x357aca){return _0x357aca?{'count':_0x5037c4,'rows':_0x357aca}:null;}})[_0x59b2('0x25')](respondWithResult(_0x151833,null))['catch'](handleError(_0x151833,null));};exports[_0x59b2('0x4e')]=function(_0x220f99,_0x12a79b,_0x2d68a6){return db[_0x59b2('0x4f')]['find']({'where':{'id':_0x220f99[_0x59b2('0x44')]['id']}})[_0x59b2('0x25')](handleEntityNotFound(_0x12a79b,null))[_0x59b2('0x25')](function(_0x5c9cf3){if(_0x5c9cf3){return _0x5c9cf3['addActions'](_0x220f99[_0x59b2('0x49')]['ids'],_[_0x59b2('0x50')](_0x220f99[_0x59b2('0x49')],[_0x59b2('0x4b'),'id'])||{});}})['then'](respondWithResult(_0x12a79b,null))[_0x59b2('0x47')](handleError(_0x12a79b,null));};exports['getActions']=function(_0x570e53,_0x311e87,_0x1fbbaa){var _0x14f0e4={};var _0x2406c9={};var _0x373443;var _0x1b8e90;return db[_0x59b2('0x2d')][_0x59b2('0x4d')]({'where':{'id':_0x570e53['params']['id']}})[_0x59b2('0x25')](handleEntityNotFound(_0x311e87,null))['then'](function(_0x4dc1ce){if(_0x4dc1ce){_0x373443=_0x4dc1ce;_0x2406c9[_0x59b2('0x31')]=_[_0x59b2('0x32')](db['Action'][_0x59b2('0x2e')]);_0x2406c9[_0x59b2('0x36')]=_[_0x59b2('0x32')](_0x570e53[_0x59b2('0x36')]);_0x2406c9['filters']=_[_0x59b2('0x33')](_0x2406c9['model'],_0x2406c9[_0x59b2('0x36')]);_0x14f0e4['attributes']=_['intersection'](_0x2406c9['model'],qs['fields'](_0x570e53[_0x59b2('0x36')][_0x59b2('0x35')]));_0x14f0e4[_0x59b2('0x34')]=_0x14f0e4[_0x59b2('0x34')][_0x59b2('0x45')]?_0x14f0e4['attributes']:_0x2406c9[_0x59b2('0x31')];_0x14f0e4[_0x59b2('0x38')]=qs['sort'](_0x570e53[_0x59b2('0x36')][_0x59b2('0x39')]);_0x14f0e4[_0x59b2('0x3c')]=qs['filters'](_[_0x59b2('0x3b')](_0x570e53[_0x59b2('0x36')],_0x2406c9[_0x59b2('0x3a')]));if(_0x570e53['query'][_0x59b2('0x3f')]){_0x14f0e4[_0x59b2('0x3c')]=_['merge'](_0x14f0e4[_0x59b2('0x3c')],{'$or':_['map'](_0x14f0e4[_0x59b2('0x34')],function(_0x920f02){var _0xaaeb74={};_0xaaeb74[_0x920f02]={'$like':'%'+_0x570e53['query'][_0x59b2('0x3f')]+'%'};return _0xaaeb74;})});}_0x14f0e4=_['merge']({},_0x14f0e4,_0x570e53['options']);return _0x373443[_0x59b2('0x51')](_0x14f0e4);}})['then'](function(_0x2f1998){if(_0x2f1998){_0x1b8e90=_0x2f1998['length'];if(!_0x570e53[_0x59b2('0x36')][_0x59b2('0x52')](_0x59b2('0x37'))){_0x14f0e4[_0x59b2('0x1e')]=qs[_0x59b2('0x1e')](_0x570e53[_0x59b2('0x36')][_0x59b2('0x1e')]);_0x14f0e4[_0x59b2('0x1c')]=qs['offset'](_0x570e53[_0x59b2('0x36')][_0x59b2('0x1c')]);}return _0x373443['getActions'](_0x14f0e4);}})[_0x59b2('0x25')](function(_0x2d469b){if(_0x2d469b){return _0x2d469b?{'count':_0x1b8e90,'rows':_0x2d469b}:null;}})[_0x59b2('0x25')](respondWithResult(_0x311e87,null))[_0x59b2('0x47')](handleError(_0x311e87,null));}; \ No newline at end of file diff --git a/server/api/automation/automation.model.js b/server/api/automation/automation.model.js index 251ce78..de99e92 100644 --- a/server/api/automation/automation.model.js +++ b/server/api/automation/automation.model.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xf39a=['tools_automations','util','../../config/logger','api','moment','bluebird','request-promise','path','rimraf','../../config/environment','exports','define','Automation'];(function(_0xa11489,_0x305309){var _0x19623b=function(_0x4cafb9){while(--_0x4cafb9){_0xa11489['push'](_0xa11489['shift']());}};_0x19623b(++_0x305309);}(_0xf39a,0x1ef));var _0xaf39=function(_0x1d8986,_0x4d24e8){_0x1d8986=_0x1d8986-0x0;var _0x2de22d=_0xf39a[_0x1d8986];return _0x2de22d;};'use strict';var _=require('lodash');var util=require(_0xaf39('0x0'));var logger=require(_0xaf39('0x1'))(_0xaf39('0x2'));var moment=require(_0xaf39('0x3'));var BPromise=require(_0xaf39('0x4'));var rp=require(_0xaf39('0x5'));var fs=require('fs');var path=require(_0xaf39('0x6'));var rimraf=require(_0xaf39('0x7'));var config=require(_0xaf39('0x8'));var attributes=require('./automation.attributes');module[_0xaf39('0x9')]=function(_0x2edaa8,_0x2924ad){return _0x2edaa8[_0xaf39('0xa')](_0xaf39('0xb'),attributes,{'tableName':_0xaf39('0xc'),'paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file +var _0xc92b=['define','Automation','tools_automations','lodash','util','../../config/logger','api','moment','bluebird','request-promise','path','../../config/environment','./automation.attributes','exports'];(function(_0x125853,_0xb6377){var _0x2e6bf5=function(_0x429788){while(--_0x429788){_0x125853['push'](_0x125853['shift']());}};_0x2e6bf5(++_0xb6377);}(_0xc92b,0x11b));var _0xbc92=function(_0x5d7791,_0x4bb33a){_0x5d7791=_0x5d7791-0x0;var _0x39cdc3=_0xc92b[_0x5d7791];return _0x39cdc3;};'use strict';var _=require(_0xbc92('0x0'));var util=require(_0xbc92('0x1'));var logger=require(_0xbc92('0x2'))(_0xbc92('0x3'));var moment=require(_0xbc92('0x4'));var BPromise=require(_0xbc92('0x5'));var rp=require(_0xbc92('0x6'));var fs=require('fs');var path=require(_0xbc92('0x7'));var rimraf=require('rimraf');var config=require(_0xbc92('0x8'));var attributes=require(_0xbc92('0x9'));module[_0xbc92('0xa')]=function(_0x5810ec,_0x26190b){return _0x5810ec[_0xbc92('0xb')](_0xbc92('0xc'),attributes,{'tableName':_0xbc92('0xd'),'paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file diff --git a/server/api/automation/automation.rpc.js b/server/api/automation/automation.rpc.js index d634b7b..eede6fd 100644 --- a/server/api/automation/automation.rpc.js +++ b/server/api/automation/automation.rpc.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xdb28=['moment','bluebird','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','jayson/promise','client','request','then','Automation,\x20%s,\x20%s','request\x20sent','debug','stringify','error','code','message','info','catch','lodash','util'];(function(_0x22ea02,_0xd11704){var _0x19c82a=function(_0x3d0f73){while(--_0x3d0f73){_0x22ea02['push'](_0x22ea02['shift']());}};_0x19c82a(++_0xd11704);}(_0xdb28,0x106));var _0x8db2=function(_0x42fa81,_0x4fbe1a){_0x42fa81=_0x42fa81-0x0;var _0x1cb284=_0xdb28[_0x42fa81];return _0x1cb284;};'use strict';var _=require(_0x8db2('0x0'));var util=require(_0x8db2('0x1'));var moment=require(_0x8db2('0x2'));var BPromise=require(_0x8db2('0x3'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x8db2('0x4'));var db=require(_0x8db2('0x5'))['db'];var utils=require(_0x8db2('0x6'));var logger=require(_0x8db2('0x7'))(_0x8db2('0x8'));var config=require('../../config/environment');var jayson=require(_0x8db2('0x9'));var client=jayson[_0x8db2('0xa')]['http']({'port':0x232a});function respondWithRpcPromise(_0x494b40,_0x477f50,_0x46932f){return new BPromise(function(_0x131537,_0x29f698){return client[_0x8db2('0xb')](_0x494b40,_0x46932f)[_0x8db2('0xc')](function(_0x126c78){logger['info'](_0x8db2('0xd'),_0x477f50,_0x8db2('0xe'));logger[_0x8db2('0xf')]('Automation,\x20%s,\x20%s,\x20%s',_0x477f50,_0x8db2('0xe'),JSON[_0x8db2('0x10')](_0x126c78));if(_0x126c78['error']){if(_0x126c78[_0x8db2('0x11')][_0x8db2('0x12')]===0x1f4){logger[_0x8db2('0x11')](_0x8db2('0xd'),_0x477f50,_0x126c78[_0x8db2('0x11')]['message']);return _0x29f698(_0x126c78['error'][_0x8db2('0x13')]);}logger[_0x8db2('0x11')](_0x8db2('0xd'),_0x477f50,_0x126c78[_0x8db2('0x11')][_0x8db2('0x13')]);return _0x131537(_0x126c78[_0x8db2('0x11')][_0x8db2('0x13')]);}else{logger[_0x8db2('0x14')](_0x8db2('0xd'),_0x477f50,_0x8db2('0xe'));_0x131537(_0x126c78['result'][_0x8db2('0x13')]);}})[_0x8db2('0x15')](function(_0x48101e){logger[_0x8db2('0x11')](_0x8db2('0xd'),_0x477f50,_0x48101e);_0x29f698(_0x48101e);});});} \ No newline at end of file +var _0x3de3=['lodash','moment','bluebird','ioredis','../../mysqldb','../../config/utils','../../config/logger','../../config/environment','jayson/promise','http','request','then','Automation,\x20%s,\x20%s','request\x20sent','debug','Automation,\x20%s,\x20%s,\x20%s','stringify','error','code','message','info','catch'];(function(_0x44799d,_0x26c23a){var _0x4f4a20=function(_0x298a71){while(--_0x298a71){_0x44799d['push'](_0x44799d['shift']());}};_0x4f4a20(++_0x26c23a);}(_0x3de3,0x1ce));var _0x33de=function(_0x49a914,_0x34d540){_0x49a914=_0x49a914-0x0;var _0xc86ee8=_0x3de3[_0x49a914];return _0xc86ee8;};'use strict';var _=require(_0x33de('0x0'));var util=require('util');var moment=require(_0x33de('0x1'));var BPromise=require(_0x33de('0x2'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x33de('0x3'));var db=require(_0x33de('0x4'))['db'];var utils=require(_0x33de('0x5'));var logger=require(_0x33de('0x6'))('rpc');var config=require(_0x33de('0x7'));var jayson=require(_0x33de('0x8'));var client=jayson['client'][_0x33de('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x587be8,_0x13afea,_0x35ee93){return new BPromise(function(_0x7ceca6,_0x486ab6){return client[_0x33de('0xa')](_0x587be8,_0x35ee93)[_0x33de('0xb')](function(_0x2e0419){logger['info'](_0x33de('0xc'),_0x13afea,_0x33de('0xd'));logger[_0x33de('0xe')](_0x33de('0xf'),_0x13afea,_0x33de('0xd'),JSON[_0x33de('0x10')](_0x2e0419));if(_0x2e0419[_0x33de('0x11')]){if(_0x2e0419[_0x33de('0x11')][_0x33de('0x12')]===0x1f4){logger[_0x33de('0x11')](_0x33de('0xc'),_0x13afea,_0x2e0419['error'][_0x33de('0x13')]);return _0x486ab6(_0x2e0419[_0x33de('0x11')]['message']);}logger['error'](_0x33de('0xc'),_0x13afea,_0x2e0419[_0x33de('0x11')][_0x33de('0x13')]);return _0x7ceca6(_0x2e0419[_0x33de('0x11')]['message']);}else{logger[_0x33de('0x14')](_0x33de('0xc'),_0x13afea,'request\x20sent');_0x7ceca6(_0x2e0419['result'][_0x33de('0x13')]);}})[_0x33de('0x15')](function(_0x13e832){logger['error'](_0x33de('0xc'),_0x13afea,_0x13e832);_0x486ab6(_0x13e832);});});} \ No newline at end of file diff --git a/server/api/automation/index.js b/server/api/automation/index.js index a262d37..c82c2d8 100644 --- a/server/api/automation/index.js +++ b/server/api/automation/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x82a7=['./automation.controller','get','isAuthenticated','index','/:id','/:id/actions','getActions','post','create','/:id/conditions','addConditions','addActions','put','update','delete','util','path','connect-timeout','express','Router','fs-extra','../../components/interaction/service','../../config/environment'];(function(_0x45e98e,_0x169b60){var _0x374dba=function(_0x597612){while(--_0x597612){_0x45e98e['push'](_0x45e98e['shift']());}};_0x374dba(++_0x169b60);}(_0x82a7,0x1c4));var _0x782a=function(_0x54d496,_0x378c9a){_0x54d496=_0x54d496-0x0;var _0x4b8ea8=_0x82a7[_0x54d496];return _0x4b8ea8;};'use strict';var multer=require('multer');var util=require(_0x782a('0x0'));var path=require(_0x782a('0x1'));var timeout=require(_0x782a('0x2'));var express=require(_0x782a('0x3'));var router=express[_0x782a('0x4')]();var fs_extra=require(_0x782a('0x5'));var auth=require('../../components/auth/service');var interaction=require(_0x782a('0x6'));var config=require(_0x782a('0x7'));var controller=require(_0x782a('0x8'));router[_0x782a('0x9')]('/',auth[_0x782a('0xa')](),controller[_0x782a('0xb')]);router[_0x782a('0x9')](_0x782a('0xc'),auth[_0x782a('0xa')](),controller['show']);router[_0x782a('0x9')]('/:id/conditions',auth[_0x782a('0xa')](),controller['getConditions']);router['get'](_0x782a('0xd'),auth['isAuthenticated'](),controller[_0x782a('0xe')]);router[_0x782a('0xf')]('/',auth['isAuthenticated'](),controller[_0x782a('0x10')]);router['post'](_0x782a('0x11'),auth[_0x782a('0xa')](),controller[_0x782a('0x12')]);router[_0x782a('0xf')](_0x782a('0xd'),auth[_0x782a('0xa')](),controller[_0x782a('0x13')]);router[_0x782a('0x14')](_0x782a('0xc'),auth[_0x782a('0xa')](),controller[_0x782a('0x15')]);router[_0x782a('0x16')](_0x782a('0xc'),auth[_0x782a('0xa')](),controller['destroy']);module['exports']=router; \ No newline at end of file +var _0x5096=['update','delete','destroy','exports','multer','util','path','connect-timeout','express','fs-extra','../../components/interaction/service','../../config/environment','./automation.controller','get','isAuthenticated','index','/:id','/:id/conditions','getConditions','getActions','create','post','addConditions','/:id/actions','addActions','put'];(function(_0x5f0f23,_0x13f8d6){var _0x98369f=function(_0x5c2689){while(--_0x5c2689){_0x5f0f23['push'](_0x5f0f23['shift']());}};_0x98369f(++_0x13f8d6);}(_0x5096,0x6c));var _0x6509=function(_0x4e15f4,_0x5a72f2){_0x4e15f4=_0x4e15f4-0x0;var _0x5a9643=_0x5096[_0x4e15f4];return _0x5a9643;};'use strict';var multer=require(_0x6509('0x0'));var util=require(_0x6509('0x1'));var path=require(_0x6509('0x2'));var timeout=require(_0x6509('0x3'));var express=require(_0x6509('0x4'));var router=express['Router']();var fs_extra=require(_0x6509('0x5'));var auth=require('../../components/auth/service');var interaction=require(_0x6509('0x6'));var config=require(_0x6509('0x7'));var controller=require(_0x6509('0x8'));router[_0x6509('0x9')]('/',auth[_0x6509('0xa')](),controller[_0x6509('0xb')]);router['get'](_0x6509('0xc'),auth[_0x6509('0xa')](),controller['show']);router[_0x6509('0x9')](_0x6509('0xd'),auth[_0x6509('0xa')](),controller[_0x6509('0xe')]);router[_0x6509('0x9')]('/:id/actions',auth[_0x6509('0xa')](),controller[_0x6509('0xf')]);router['post']('/',auth['isAuthenticated'](),controller[_0x6509('0x10')]);router[_0x6509('0x11')](_0x6509('0xd'),auth[_0x6509('0xa')](),controller[_0x6509('0x12')]);router[_0x6509('0x11')](_0x6509('0x13'),auth[_0x6509('0xa')](),controller[_0x6509('0x14')]);router[_0x6509('0x15')]('/:id',auth[_0x6509('0xa')](),controller[_0x6509('0x16')]);router[_0x6509('0x17')]('/:id',auth[_0x6509('0xa')](),controller[_0x6509('0x18')]);module[_0x6509('0x19')]=router; \ No newline at end of file diff --git a/server/api/campaign/campaign.attributes.js b/server/api/campaign/campaign.attributes.js index 126de3a..77729e4 100644 --- a/server/api/campaign/campaign.attributes.js +++ b/server/api/campaign/campaign.attributes.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x261b=['#AMD\x20After\x20Greeting\x20Silence','#AMD\x20Total\x20Analysis\x20Time','#AMD\x20Between\x20Words\x20Silence','#AMD\x20Maximum\x20Number\x20Of\x20Words','#AMD\x20Silence\x20Threshold\x20(min:0,\x20max:32767)','#AMD\x20Maximum\x20Word\x20Length','ASC','DESC','Random\x20Last\x20Digit\x20(min:1,\x20max:15)','Cut\x20Digit\x20(min:1,\x20max:15)','#NoSuchNumber\x20Retry\x20(min:1,\x20max:999)','NoSuchNumber\x20Retry\x20Frequency\x20Minutes\x20(min:1,\x20max:99999)','#Drop\x20Retry\x20(min:1,\x20max:999)','Drop\x20Retry\x20Frequency\x20Minutes\x20(min:1,\x20max:99999)','#Abandoned\x20Retry\x20(min:1,\x20max:999)','Abandoned\x20Retry\x20Frequency\x20Minutes\x20(min:1,\x20max:99999)','#AgentReject\x20Retry\x20(min:1,\x20max:999)','AgentReject\x20Retry\x20Frequency\x20Minutes\x20(min:1,\x20max:99999)','sequelize','exports','STRING','name','ivr','BOOLEAN','Active/Disactive\x20Campaign','INTEGER','UNSIGNED','Max\x20200\x20calls.','Originate\x20Timeout\x20Seconds\x20(min:1,\x20max:999)','#Congestion\x20Retry\x20(min:1,\x20max:999)','Congestion\x20Retry\x20Frequency\x20Minutes\x20(min:1,\x20max:99999)','#Busy\x20Retry\x20(min:1,\x20max:999)','Busy\x20Retry\x20Frequency\x20Minutes\x20(min:1,\x20max:99999)','#NoAnswer\x20Retry\x20(min:1,\x20max:999)','NoAnswer\x20Retry\x20Frequency\x20Minutes\x20(min:1,\x20max:99999)','07:00-22:00,*,*,*','ENUM','always','never','onlyIfOpen','Active/Disactive\x20AMD','#AMD\x20Initial\x20Silence','#AMD\x20Greeting'];(function(_0x2964f3,_0x2e8789){var _0x4503e0=function(_0xb76f0d){while(--_0xb76f0d){_0x2964f3['push'](_0x2964f3['shift']());}};_0x4503e0(++_0x2e8789);}(_0x261b,0x93));var _0xb261=function(_0x61a882,_0x3bbad2){_0x61a882=_0x61a882-0x0;var _0x52e5cd=_0x261b[_0x61a882];return _0x52e5cd;};'use strict';var Sequelize=require(_0xb261('0x0'));module[_0xb261('0x1')]={'name':{'type':Sequelize[_0xb261('0x2')],'unique':_0xb261('0x3'),'allowNull':![],'validate':{'is':/[A-Za-z0-9._\\+*!-]+/,'notEmpty':!![]}},'type':{'type':Sequelize['ENUM']('ivr'),'allowNull':![],'defaultValue':_0xb261('0x4')},'description':{'type':Sequelize[_0xb261('0x2')]},'active':{'type':Sequelize[_0xb261('0x5')],'defaultValue':0x0,'comment':_0xb261('0x6')},'limitCalls':{'type':Sequelize[_0xb261('0x7')](0x4)[_0xb261('0x8')],'defaultValue':0x1e,'validate':{'min':0x1,'max':0xc8},'comment':_0xb261('0x9')},'dialOriginateCallerIdName':{'type':Sequelize[_0xb261('0x2')]},'dialOriginateCallerIdNumber':{'type':Sequelize['STRING']},'dialOriginateTimeout':{'type':Sequelize[_0xb261('0x7')](0x3)[_0xb261('0x8')],'defaultValue':0x1e,'validate':{'min':0x1,'max':0x3e7},'comment':_0xb261('0xa')},'dialCongestionMaxRetry':{'type':Sequelize[_0xb261('0x7')](0x3)[_0xb261('0x8')],'defaultValue':0x3,'validate':{'min':0x1,'max':0x3e7},'comment':_0xb261('0xb')},'dialCongestionRetryFrequency':{'type':Sequelize[_0xb261('0x7')](0x5)[_0xb261('0x8')],'validate':{'min':0x1,'max':0x1869f},'defaultValue':0x96,'comment':_0xb261('0xc')},'dialBusyMaxRetry':{'type':Sequelize[_0xb261('0x7')](0x3)[_0xb261('0x8')],'defaultValue':0x3,'validate':{'min':0x1,'max':0x3e7},'comment':_0xb261('0xd')},'dialBusyRetryFrequency':{'type':Sequelize[_0xb261('0x7')](0x5)[_0xb261('0x8')],'validate':{'min':0x1,'max':0x1869f},'defaultValue':0x96,'comment':_0xb261('0xe')},'dialNoAnswerMaxRetry':{'type':Sequelize[_0xb261('0x7')](0x3)[_0xb261('0x8')],'defaultValue':0x3,'comment':_0xb261('0xf')},'dialNoAnswerRetryFrequency':{'type':Sequelize['INTEGER'](0x5)[_0xb261('0x8')],'validate':{'min':0x1,'max':0x1869f},'defaultValue':0x96,'comment':_0xb261('0x10')},'dialGlobalMaxRetry':{'type':Sequelize[_0xb261('0x7')](0x3)['UNSIGNED'],'validate':{'min':0x1,'max':0x3e7},'defaultValue':0x4,'comment':'#Global\x20Max\x20Retry\x20(min:1,\x20max:999)'},'dialTimezone':{'type':Sequelize[_0xb261('0x2')],'defaultValue':null},'dialGlobalInterval':{'type':Sequelize['STRING'],'defaultValue':_0xb261('0x11')},'dialCheckDuplicateType':{'type':Sequelize[_0xb261('0x12')](_0xb261('0x13'),_0xb261('0x14'),_0xb261('0x15')),'defaultValue':_0xb261('0x13')},'dialAMDActive':{'type':Sequelize[_0xb261('0x5')],'defaultValue':0x0,'comment':_0xb261('0x16')},'dialAMDInitialSilence':{'type':Sequelize[_0xb261('0x7')](0x9)[_0xb261('0x8')],'defaultValue':0x9c4,'validate':{'min':0x0},'comment':_0xb261('0x17')},'dialAMDGreeting':{'type':Sequelize[_0xb261('0x7')](0x9)[_0xb261('0x8')],'defaultValue':0x5dc,'validate':{'min':0x0},'comment':_0xb261('0x18')},'dialAMDAfterGreetingSilence':{'type':Sequelize[_0xb261('0x7')](0x9)[_0xb261('0x8')],'defaultValue':0x320,'validate':{'min':0x0},'comment':_0xb261('0x19')},'dialAMDTotalAnalysisTime':{'type':Sequelize['INTEGER'](0x9)['UNSIGNED'],'defaultValue':0x1388,'validate':{'min':0x0},'comment':_0xb261('0x1a')},'dialAMDMinWordLength':{'type':Sequelize[_0xb261('0x7')](0x9)[_0xb261('0x8')],'defaultValue':0x64,'validate':{'min':0x0},'comment':'#AMD\x20Min\x20Word\x20Length'},'dialAMDBetweenWordsSilence':{'type':Sequelize['INTEGER'](0x9)[_0xb261('0x8')],'defaultValue':0x32,'validate':{'min':0x0},'comment':_0xb261('0x1b')},'dialAMDMaximumNumberOfWords':{'type':Sequelize[_0xb261('0x7')](0x9)[_0xb261('0x8')],'defaultValue':0x3,'validate':{'min':0x0},'comment':_0xb261('0x1c')},'dialAMDSilenceThreshold':{'type':Sequelize[_0xb261('0x7')](0x5)[_0xb261('0x8')],'validate':{'min':0x0,'max':0x7fff},'defaultValue':0x100,'comment':_0xb261('0x1d')},'dialAMDMaximumWordLength':{'type':Sequelize[_0xb261('0x7')](0x9)[_0xb261('0x8')],'defaultValue':0x1388,'validate':{'min':0x0},'comment':_0xb261('0x1e')},'dialOrderByScheduledAt':{'type':Sequelize['ENUM']('DESC',_0xb261('0x1f')),'defaultValue':_0xb261('0x20')},'dialPrefix':{'type':Sequelize['STRING'],'defaultValue':null},'dialRandomLastDigitCallerIdNumber':{'type':Sequelize[_0xb261('0x7')](0x3)[_0xb261('0x8')],'validate':{'min':0x0,'max':0xf},'defaultValue':0x0,'comment':_0xb261('0x21')},'dialCutDigit':{'type':Sequelize[_0xb261('0x7')](0x3)[_0xb261('0x8')],'validate':{'min':0x0,'max':0xf},'defaultValue':0x0,'comment':_0xb261('0x22')},'dialNoSuchNumberMaxRetry':{'type':Sequelize['INTEGER'](0x3)[_0xb261('0x8')],'defaultValue':0x3,'validate':{'min':0x1,'max':0x3e7},'comment':_0xb261('0x23')},'dialNoSuchNumberRetryFrequency':{'type':Sequelize[_0xb261('0x7')](0x5)['UNSIGNED'],'validate':{'min':0x1,'max':0x1869f},'defaultValue':0x96,'comment':_0xb261('0x24')},'dialDropMaxRetry':{'type':Sequelize['INTEGER'](0x3)[_0xb261('0x8')],'defaultValue':0x3,'validate':{'min':0x1,'max':0x3e7},'comment':_0xb261('0x25')},'dialDropRetryFrequency':{'type':Sequelize[_0xb261('0x7')](0x5)[_0xb261('0x8')],'validate':{'min':0x1,'max':0x1869f},'defaultValue':0x96,'comment':_0xb261('0x26')},'dialAbandonedMaxRetry':{'type':Sequelize[_0xb261('0x7')](0x3)['UNSIGNED'],'defaultValue':0x3,'validate':{'min':0x1,'max':0x3e7},'comment':_0xb261('0x27')},'dialAbandonedRetryFrequency':{'type':Sequelize[_0xb261('0x7')](0x5)['UNSIGNED'],'validate':{'min':0x1,'max':0x1869f},'defaultValue':0x96,'comment':_0xb261('0x28')},'dialMachineMaxRetry':{'type':Sequelize['INTEGER'](0x3)[_0xb261('0x8')],'defaultValue':0x3,'validate':{'min':0x1,'max':0x3e7},'comment':'#Machine\x20Retry\x20(min:1,\x20max:999)'},'dialMachineRetryFrequency':{'type':Sequelize[_0xb261('0x7')](0x5)['UNSIGNED'],'validate':{'min':0x1,'max':0x1869f},'defaultValue':0x96,'comment':'Machine\x20Retry\x20Frequency\x20Minutes\x20(min:1,\x20max:99999)'},'dialAgentRejectMaxRetry':{'type':Sequelize[_0xb261('0x7')](0x3)[_0xb261('0x8')],'defaultValue':0x3,'validate':{'min':0x1,'max':0x3e7},'comment':_0xb261('0x29')},'dialAgentRejectRetryFrequency':{'type':Sequelize[_0xb261('0x7')](0x5)[_0xb261('0x8')],'validate':{'min':0x1,'max':0x1869f},'defaultValue':0x96,'comment':_0xb261('0x2a')}}; \ No newline at end of file +var _0x7e43=['#AMD\x20Greeting','#AMD\x20After\x20Greeting\x20Silence','#AMD\x20Total\x20Analysis\x20Time','#AMD\x20Silence\x20Threshold\x20(min:0,\x20max:32767)','#AMD\x20Maximum\x20Word\x20Length','DESC','ASC','STRING','#NoSuchNumber\x20Retry\x20(min:1,\x20max:999)','#Drop\x20Retry\x20(min:1,\x20max:999)','#Abandoned\x20Retry\x20(min:1,\x20max:999)','Abandoned\x20Retry\x20Frequency\x20Minutes\x20(min:1,\x20max:99999)','#Machine\x20Retry\x20(min:1,\x20max:999)','Machine\x20Retry\x20Frequency\x20Minutes\x20(min:1,\x20max:99999)','sequelize','name','ENUM','ivr','Active/Disactive\x20Campaign','INTEGER','UNSIGNED','Max\x20200\x20calls.','Originate\x20Timeout\x20Seconds\x20(min:1,\x20max:999)','#Congestion\x20Retry\x20(min:1,\x20max:999)','#Busy\x20Retry\x20(min:1,\x20max:999)','Busy\x20Retry\x20Frequency\x20Minutes\x20(min:1,\x20max:99999)','#NoAnswer\x20Retry\x20(min:1,\x20max:999)','NoAnswer\x20Retry\x20Frequency\x20Minutes\x20(min:1,\x20max:99999)','#Global\x20Max\x20Retry\x20(min:1,\x20max:999)','always','never','BOOLEAN','Active/Disactive\x20AMD','#AMD\x20Initial\x20Silence'];(function(_0x51302c,_0x376113){var _0x20f6c1=function(_0x530cb3){while(--_0x530cb3){_0x51302c['push'](_0x51302c['shift']());}};_0x20f6c1(++_0x376113);}(_0x7e43,0xda));var _0x37e4=function(_0x59995f,_0x10e51c){_0x59995f=_0x59995f-0x0;var _0x30feb7=_0x7e43[_0x59995f];return _0x30feb7;};'use strict';var Sequelize=require(_0x37e4('0x0'));module['exports']={'name':{'type':Sequelize['STRING'],'unique':_0x37e4('0x1'),'allowNull':![],'validate':{'is':/[A-Za-z0-9._\\+*!-]+/,'notEmpty':!![]}},'type':{'type':Sequelize[_0x37e4('0x2')]('ivr'),'allowNull':![],'defaultValue':_0x37e4('0x3')},'description':{'type':Sequelize['STRING']},'active':{'type':Sequelize['BOOLEAN'],'defaultValue':0x0,'comment':_0x37e4('0x4')},'limitCalls':{'type':Sequelize[_0x37e4('0x5')](0x4)[_0x37e4('0x6')],'defaultValue':0x1e,'validate':{'min':0x1,'max':0xc8},'comment':_0x37e4('0x7')},'dialOriginateCallerIdName':{'type':Sequelize['STRING']},'dialOriginateCallerIdNumber':{'type':Sequelize['STRING']},'dialOriginateTimeout':{'type':Sequelize[_0x37e4('0x5')](0x3)[_0x37e4('0x6')],'defaultValue':0x1e,'validate':{'min':0x1,'max':0x3e7},'comment':_0x37e4('0x8')},'dialCongestionMaxRetry':{'type':Sequelize['INTEGER'](0x3)[_0x37e4('0x6')],'defaultValue':0x3,'validate':{'min':0x1,'max':0x3e7},'comment':_0x37e4('0x9')},'dialCongestionRetryFrequency':{'type':Sequelize[_0x37e4('0x5')](0x5)[_0x37e4('0x6')],'validate':{'min':0x1,'max':0x1869f},'defaultValue':0x96,'comment':'Congestion\x20Retry\x20Frequency\x20Minutes\x20(min:1,\x20max:99999)'},'dialBusyMaxRetry':{'type':Sequelize[_0x37e4('0x5')](0x3)[_0x37e4('0x6')],'defaultValue':0x3,'validate':{'min':0x1,'max':0x3e7},'comment':_0x37e4('0xa')},'dialBusyRetryFrequency':{'type':Sequelize['INTEGER'](0x5)['UNSIGNED'],'validate':{'min':0x1,'max':0x1869f},'defaultValue':0x96,'comment':_0x37e4('0xb')},'dialNoAnswerMaxRetry':{'type':Sequelize[_0x37e4('0x5')](0x3)[_0x37e4('0x6')],'defaultValue':0x3,'comment':_0x37e4('0xc')},'dialNoAnswerRetryFrequency':{'type':Sequelize[_0x37e4('0x5')](0x5)['UNSIGNED'],'validate':{'min':0x1,'max':0x1869f},'defaultValue':0x96,'comment':_0x37e4('0xd')},'dialGlobalMaxRetry':{'type':Sequelize['INTEGER'](0x3)[_0x37e4('0x6')],'validate':{'min':0x1,'max':0x3e7},'defaultValue':0x4,'comment':_0x37e4('0xe')},'dialTimezone':{'type':Sequelize['STRING'],'defaultValue':null},'dialGlobalInterval':{'type':Sequelize['STRING'],'defaultValue':'07:00-22:00,*,*,*'},'dialCheckDuplicateType':{'type':Sequelize[_0x37e4('0x2')](_0x37e4('0xf'),_0x37e4('0x10'),'onlyIfOpen'),'defaultValue':_0x37e4('0xf')},'dialAMDActive':{'type':Sequelize[_0x37e4('0x11')],'defaultValue':0x0,'comment':_0x37e4('0x12')},'dialAMDInitialSilence':{'type':Sequelize[_0x37e4('0x5')](0x9)['UNSIGNED'],'defaultValue':0x9c4,'validate':{'min':0x0},'comment':_0x37e4('0x13')},'dialAMDGreeting':{'type':Sequelize[_0x37e4('0x5')](0x9)[_0x37e4('0x6')],'defaultValue':0x5dc,'validate':{'min':0x0},'comment':_0x37e4('0x14')},'dialAMDAfterGreetingSilence':{'type':Sequelize[_0x37e4('0x5')](0x9)[_0x37e4('0x6')],'defaultValue':0x320,'validate':{'min':0x0},'comment':_0x37e4('0x15')},'dialAMDTotalAnalysisTime':{'type':Sequelize[_0x37e4('0x5')](0x9)[_0x37e4('0x6')],'defaultValue':0x1388,'validate':{'min':0x0},'comment':_0x37e4('0x16')},'dialAMDMinWordLength':{'type':Sequelize[_0x37e4('0x5')](0x9)['UNSIGNED'],'defaultValue':0x64,'validate':{'min':0x0},'comment':'#AMD\x20Min\x20Word\x20Length'},'dialAMDBetweenWordsSilence':{'type':Sequelize[_0x37e4('0x5')](0x9)['UNSIGNED'],'defaultValue':0x32,'validate':{'min':0x0},'comment':'#AMD\x20Between\x20Words\x20Silence'},'dialAMDMaximumNumberOfWords':{'type':Sequelize['INTEGER'](0x9)['UNSIGNED'],'defaultValue':0x3,'validate':{'min':0x0},'comment':'#AMD\x20Maximum\x20Number\x20Of\x20Words'},'dialAMDSilenceThreshold':{'type':Sequelize[_0x37e4('0x5')](0x5)[_0x37e4('0x6')],'validate':{'min':0x0,'max':0x7fff},'defaultValue':0x100,'comment':_0x37e4('0x17')},'dialAMDMaximumWordLength':{'type':Sequelize[_0x37e4('0x5')](0x9)[_0x37e4('0x6')],'defaultValue':0x1388,'validate':{'min':0x0},'comment':_0x37e4('0x18')},'dialOrderByScheduledAt':{'type':Sequelize[_0x37e4('0x2')](_0x37e4('0x19'),_0x37e4('0x1a')),'defaultValue':_0x37e4('0x19')},'dialPrefix':{'type':Sequelize[_0x37e4('0x1b')],'defaultValue':null},'dialRandomLastDigitCallerIdNumber':{'type':Sequelize[_0x37e4('0x5')](0x3)[_0x37e4('0x6')],'validate':{'min':0x0,'max':0xf},'defaultValue':0x0,'comment':'Random\x20Last\x20Digit\x20(min:1,\x20max:15)'},'dialCutDigit':{'type':Sequelize[_0x37e4('0x5')](0x3)[_0x37e4('0x6')],'validate':{'min':0x0,'max':0xf},'defaultValue':0x0,'comment':'Cut\x20Digit\x20(min:1,\x20max:15)'},'dialNoSuchNumberMaxRetry':{'type':Sequelize[_0x37e4('0x5')](0x3)[_0x37e4('0x6')],'defaultValue':0x3,'validate':{'min':0x1,'max':0x3e7},'comment':_0x37e4('0x1c')},'dialNoSuchNumberRetryFrequency':{'type':Sequelize[_0x37e4('0x5')](0x5)[_0x37e4('0x6')],'validate':{'min':0x1,'max':0x1869f},'defaultValue':0x96,'comment':'NoSuchNumber\x20Retry\x20Frequency\x20Minutes\x20(min:1,\x20max:99999)'},'dialDropMaxRetry':{'type':Sequelize[_0x37e4('0x5')](0x3)[_0x37e4('0x6')],'defaultValue':0x3,'validate':{'min':0x1,'max':0x3e7},'comment':_0x37e4('0x1d')},'dialDropRetryFrequency':{'type':Sequelize[_0x37e4('0x5')](0x5)['UNSIGNED'],'validate':{'min':0x1,'max':0x1869f},'defaultValue':0x96,'comment':'Drop\x20Retry\x20Frequency\x20Minutes\x20(min:1,\x20max:99999)'},'dialAbandonedMaxRetry':{'type':Sequelize[_0x37e4('0x5')](0x3)[_0x37e4('0x6')],'defaultValue':0x3,'validate':{'min':0x1,'max':0x3e7},'comment':_0x37e4('0x1e')},'dialAbandonedRetryFrequency':{'type':Sequelize[_0x37e4('0x5')](0x5)[_0x37e4('0x6')],'validate':{'min':0x1,'max':0x1869f},'defaultValue':0x96,'comment':_0x37e4('0x1f')},'dialMachineMaxRetry':{'type':Sequelize[_0x37e4('0x5')](0x3)[_0x37e4('0x6')],'defaultValue':0x3,'validate':{'min':0x1,'max':0x3e7},'comment':_0x37e4('0x20')},'dialMachineRetryFrequency':{'type':Sequelize[_0x37e4('0x5')](0x5)[_0x37e4('0x6')],'validate':{'min':0x1,'max':0x1869f},'defaultValue':0x96,'comment':_0x37e4('0x21')},'dialAgentRejectMaxRetry':{'type':Sequelize[_0x37e4('0x5')](0x3)[_0x37e4('0x6')],'defaultValue':0x3,'validate':{'min':0x1,'max':0x3e7},'comment':'#AgentReject\x20Retry\x20(min:1,\x20max:999)'},'dialAgentRejectRetryFrequency':{'type':Sequelize['INTEGER'](0x5)[_0x37e4('0x6')],'validate':{'min':0x1,'max':0x1869f},'defaultValue':0x96,'comment':'AgentReject\x20Retry\x20Frequency\x20Minutes\x20(min:1,\x20max:99999)'}}; \ No newline at end of file diff --git a/server/api/campaign/campaign.controller.js b/server/api/campaign/campaign.controller.js index 2298761..19e4e38 100644 --- a/server/api/campaign/campaign.controller.js +++ b/server/api/campaign/campaign.controller.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x6c9f=['user','role','IvrCampaigns','userProfileId','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','updatedAt','merge','Unable\x20to\x20retrieve\x20the\x20current\x20user','UserProfileSection','autoAssociation','destroy','getHoppers','CmHopper','sort','getHopperHistories','findOne','CmHopperHistory','hasOwnProperty','getHopperFinals','CmHopperFinal','CampaignId','getHopperBlacks','CmHopperBlack','getLists','format','addLists','ids','omit','spread','dialCheckDuplicateType','into','cm_hopper','fromQuery','ContactId','ListId','createdAt','field','phone','NOW()','scheduledAt','CmListId','toString','from','cm_contacts','deletedAt\x20IS\x20NULL','phone\x20NOT\x20IN\x20(?)','cm_hopper_final','CampaignId\x20=\x20?','select','COALESCE(phone,\x27\x27)','onlyIfOpen','insert','ListId\x20=\x20?','phone\x20IS\x20NOT\x20NULL','cm_hopper_additional_phones','cmHopperId','h.id','ci.OrderBY','h.ContactId\x20=\x20ci.CmContactId','h.ListId\x20=\x20?','h.CampaignId=?','h.createdAt\x20=\x20?','push','sequelize','all','removeLists','getBlackLists','addBlackLists','YYYY-MM-DD\x20HH:mm:ss','removeBlackLists','eml-format','zip-dir','request-promise','moment','bluebird','mustache','util','path','to-csv','ejs','fs-extra','lodash','squel','crypto','jsforce','desk.js','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/license/util','../../mysqldb','status','end','offset','undefined','limit','count','set','Content-Range','json','save','update','then','get','UserProfileResource','sendStatus','error','stack','name','index','map','rawAttributes','fieldName','type','key','model','query','keys','filters','intersection','attributes','fields','length','nolimit','order','where','pick','filter','VIRTUAL','options','Campaign','includeAll','include','findAll','rows','catch','params','find','create','body'];(function(_0x4e5b59,_0x34ea5a){var _0x12714b=function(_0x5e549a){while(--_0x5e549a){_0x4e5b59['push'](_0x4e5b59['shift']());}};_0x12714b(++_0x34ea5a);}(_0x6c9f,0x16a));var _0xf6c9=function(_0x57569c,_0x524091){_0x57569c=_0x57569c-0x0;var _0x3f765b=_0x6c9f[_0x57569c];return _0x3f765b;};'use strict';var emlformat=require(_0xf6c9('0x0'));var rimraf=require('rimraf');var zipdir=require(_0xf6c9('0x1'));var jsonpatch=require('fast-json-patch');var rp=require(_0xf6c9('0x2'));var moment=require(_0xf6c9('0x3'));var BPromise=require(_0xf6c9('0x4'));var Mustache=require(_0xf6c9('0x5'));var util=require(_0xf6c9('0x6'));var path=require(_0xf6c9('0x7'));var sox=require('sox');var csv=require(_0xf6c9('0x8'));var ejs=require(_0xf6c9('0x9'));var fs=require('fs');var fs_extra=require(_0xf6c9('0xa'));var _=require(_0xf6c9('0xb'));var squel=require(_0xf6c9('0xc'));var crypto=require(_0xf6c9('0xd'));var jsforce=require(_0xf6c9('0xe'));var deskjs=require(_0xf6c9('0xf'));var toCsv=require(_0xf6c9('0x8'));var querystring=require('querystring');var Papa=require(_0xf6c9('0x10'));var Redis=require(_0xf6c9('0x11'));var authService=require(_0xf6c9('0x12'));var qs=require(_0xf6c9('0x13'));var as=require(_0xf6c9('0x14'));var hardwareService=require(_0xf6c9('0x15'));var logger=require(_0xf6c9('0x16'))(_0xf6c9('0x17'));var utils=require(_0xf6c9('0x18'));var config=require('../../config/environment');var licenseUtil=require(_0xf6c9('0x19'));var db=require(_0xf6c9('0x1a'))['db'];function respondWithStatusCode(_0x1c5b31,_0x2f99db){_0x2f99db=_0x2f99db||0xcc;return function(_0x564e64){if(_0x564e64){return _0x1c5b31['sendStatus'](_0x2f99db);}return _0x1c5b31[_0xf6c9('0x1b')](_0x2f99db)[_0xf6c9('0x1c')]();};}function respondWithResult(_0x1f3ebb,_0x38a2f4){_0x38a2f4=_0x38a2f4||0xc8;return function(_0x281018){if(_0x281018){return _0x1f3ebb[_0xf6c9('0x1b')](_0x38a2f4)['json'](_0x281018);}};}function respondWithFilteredResult(_0x53c990,_0x16e14b){return function(_0x3954ca){if(_0x3954ca){var _0x5cb57e=typeof _0x16e14b[_0xf6c9('0x1d')]===_0xf6c9('0x1e')&&typeof _0x16e14b[_0xf6c9('0x1f')]===_0xf6c9('0x1e');var _0x218ac6=_0x3954ca[_0xf6c9('0x20')];var _0x56baee=_0x5cb57e?0x0:_0x16e14b[_0xf6c9('0x1d')];var _0x6749b3=_0x5cb57e?_0x3954ca[_0xf6c9('0x20')]:_0x16e14b[_0xf6c9('0x1d')]+_0x16e14b[_0xf6c9('0x1f')];var _0x4330ed;if(_0x6749b3>=_0x218ac6){_0x6749b3=_0x218ac6;_0x4330ed=0xc8;}else{_0x4330ed=0xce;}_0x53c990[_0xf6c9('0x1b')](_0x4330ed);return _0x53c990[_0xf6c9('0x21')](_0xf6c9('0x22'),_0x56baee+'-'+_0x6749b3+'/'+_0x218ac6)[_0xf6c9('0x23')](_0x3954ca);}return null;};}function patchUpdates(_0xdaf3c5){return function(_0x27a65c){try{jsonpatch['apply'](_0x27a65c,_0xdaf3c5,!![]);}catch(_0x4ba539){return BPromise['reject'](_0x4ba539);}return _0x27a65c[_0xf6c9('0x24')]();};}function saveUpdates(_0x4b2340,_0x2ef5a6){return function(_0x569226){if(_0x569226){return _0x569226[_0xf6c9('0x25')](_0x4b2340)['then'](function(_0xacc99){return _0xacc99;});}return null;};}function removeEntity(_0x1ea7f8,_0x11bb78){return function(_0x4663f3){if(_0x4663f3){return _0x4663f3['destroy']()[_0xf6c9('0x26')](function(){var _0x32870e=_0x4663f3[_0xf6c9('0x27')]({'plain':!![]});var _0x1a1a90='IvrCampaigns';return db[_0xf6c9('0x28')]['destroy']({'where':{'type':_0x1a1a90,'resourceId':_0x32870e['id']}})['then'](function(){return _0x4663f3;});})[_0xf6c9('0x26')](function(){_0x1ea7f8[_0xf6c9('0x1b')](0xcc)[_0xf6c9('0x1c')]();});}};}function handleEntityNotFound(_0x530fef,_0x554c7b){return function(_0x2c5f51){if(!_0x2c5f51){_0x530fef[_0xf6c9('0x29')](0x194);}return _0x2c5f51;};}function handleError(_0x16d29e,_0x8acdb1){_0x8acdb1=_0x8acdb1||0x1f4;return function(_0x2a4b56){logger[_0xf6c9('0x2a')](_0x2a4b56[_0xf6c9('0x2b')]);if(_0x2a4b56['name']){delete _0x2a4b56[_0xf6c9('0x2c')];}_0x16d29e['status'](_0x8acdb1)['send'](_0x2a4b56);};}exports[_0xf6c9('0x2d')]=function(_0x25fd5e,_0x2985a8){var _0x476aa5={},_0x59df42={},_0x383c11={'count':0x0,'rows':[]};var _0x246ac4=_[_0xf6c9('0x2e')](db['Campaign'][_0xf6c9('0x2f')],function(_0x417475){return{'name':_0x417475[_0xf6c9('0x30')],'type':_0x417475[_0xf6c9('0x31')][_0xf6c9('0x32')]};});_0x59df42[_0xf6c9('0x33')]=_[_0xf6c9('0x2e')](_0x246ac4,_0xf6c9('0x2c'));_0x59df42[_0xf6c9('0x34')]=_[_0xf6c9('0x35')](_0x25fd5e[_0xf6c9('0x34')]);_0x59df42[_0xf6c9('0x36')]=_[_0xf6c9('0x37')](_0x59df42['model'],_0x59df42[_0xf6c9('0x34')]);_0x476aa5[_0xf6c9('0x38')]=_[_0xf6c9('0x37')](_0x59df42[_0xf6c9('0x33')],qs[_0xf6c9('0x39')](_0x25fd5e[_0xf6c9('0x34')][_0xf6c9('0x39')]));_0x476aa5[_0xf6c9('0x38')]=_0x476aa5['attributes'][_0xf6c9('0x3a')]?_0x476aa5['attributes']:_0x59df42['model'];if(!_0x25fd5e[_0xf6c9('0x34')]['hasOwnProperty'](_0xf6c9('0x3b'))){_0x476aa5['limit']=qs[_0xf6c9('0x1f')](_0x25fd5e[_0xf6c9('0x34')][_0xf6c9('0x1f')]);_0x476aa5['offset']=qs[_0xf6c9('0x1d')](_0x25fd5e[_0xf6c9('0x34')][_0xf6c9('0x1d')]);}_0x476aa5[_0xf6c9('0x3c')]=qs['sort'](_0x25fd5e[_0xf6c9('0x34')]['sort']);_0x476aa5[_0xf6c9('0x3d')]=qs['filters'](_[_0xf6c9('0x3e')](_0x25fd5e[_0xf6c9('0x34')],_0x59df42[_0xf6c9('0x36')]),_0x246ac4);if(_0x25fd5e[_0xf6c9('0x34')][_0xf6c9('0x3f')]){_0x476aa5[_0xf6c9('0x3d')]=_['merge'](_0x476aa5[_0xf6c9('0x3d')],{'$or':_[_0xf6c9('0x2e')](_0x246ac4,function(_0x5ea1ee){if(_0x5ea1ee['type']!==_0xf6c9('0x40')){var _0x4f9767={};_0x4f9767[_0x5ea1ee[_0xf6c9('0x2c')]]={'$like':'%'+_0x25fd5e[_0xf6c9('0x34')][_0xf6c9('0x3f')]+'%'};return _0x4f9767;}})});}_0x476aa5=_['merge']({},_0x476aa5,_0x25fd5e[_0xf6c9('0x41')]);var _0x370e42={'where':_0x476aa5['where']};return db[_0xf6c9('0x42')]['count'](_0x370e42)[_0xf6c9('0x26')](function(_0x42b21c){_0x383c11[_0xf6c9('0x20')]=_0x42b21c;if(_0x25fd5e[_0xf6c9('0x34')][_0xf6c9('0x43')]){_0x476aa5[_0xf6c9('0x44')]=[{'all':!![]}];}return db[_0xf6c9('0x42')][_0xf6c9('0x45')](_0x476aa5);})[_0xf6c9('0x26')](function(_0x49e951){_0x383c11[_0xf6c9('0x46')]=_0x49e951;return _0x383c11;})['then'](respondWithFilteredResult(_0x2985a8,_0x476aa5))[_0xf6c9('0x47')](handleError(_0x2985a8,null));};exports['show']=function(_0x3062de,_0x4d7f2f){var _0x370d96={'raw':![],'where':{'id':_0x3062de[_0xf6c9('0x48')]['id']}},_0x5803a6={};_0x5803a6['model']=_[_0xf6c9('0x35')](db['Campaign'][_0xf6c9('0x2f')]);_0x5803a6[_0xf6c9('0x34')]=_[_0xf6c9('0x35')](_0x3062de[_0xf6c9('0x34')]);_0x5803a6[_0xf6c9('0x36')]=_[_0xf6c9('0x37')](_0x5803a6[_0xf6c9('0x33')],_0x5803a6[_0xf6c9('0x34')]);_0x370d96['attributes']=_[_0xf6c9('0x37')](_0x5803a6[_0xf6c9('0x33')],qs[_0xf6c9('0x39')](_0x3062de[_0xf6c9('0x34')][_0xf6c9('0x39')]));_0x370d96[_0xf6c9('0x38')]=_0x370d96['attributes'][_0xf6c9('0x3a')]?_0x370d96[_0xf6c9('0x38')]:_0x5803a6[_0xf6c9('0x33')];if(_0x3062de[_0xf6c9('0x34')][_0xf6c9('0x43')]){_0x370d96[_0xf6c9('0x44')]=[{'all':!![]}];}_0x370d96=_['merge']({},_0x370d96,_0x3062de['options']);return db[_0xf6c9('0x42')][_0xf6c9('0x49')](_0x370d96)[_0xf6c9('0x26')](handleEntityNotFound(_0x4d7f2f,null))[_0xf6c9('0x26')](respondWithResult(_0x4d7f2f,null))[_0xf6c9('0x47')](handleError(_0x4d7f2f,null));};exports['create']=function(_0x5a62c4,_0x92bac2){return db[_0xf6c9('0x42')][_0xf6c9('0x4a')](_0x5a62c4[_0xf6c9('0x4b')],{})[_0xf6c9('0x26')](function(_0x156545){var _0x1169a9=_0x5a62c4[_0xf6c9('0x4c')][_0xf6c9('0x27')]({'plain':!![]});if(!_0x1169a9)throw new Error('Unable\x20to\x20retrieve\x20the\x20current\x20user');if(_0x1169a9[_0xf6c9('0x4d')]==='user'){var _0x38b410=_0x156545[_0xf6c9('0x27')]({'plain':!![]});var _0x38f562=_0xf6c9('0x4e');return db['UserProfileSection'][_0xf6c9('0x49')]({'where':{'name':_0x38f562,'userProfileId':_0x1169a9[_0xf6c9('0x4f')]},'raw':!![]})['then'](function(_0x6ba309){if(_0x6ba309&&_0x6ba309['autoAssociation']===0x0){return db[_0xf6c9('0x28')][_0xf6c9('0x4a')]({'name':_0x38b410[_0xf6c9('0x2c')],'resourceId':_0x38b410['id'],'type':_0x6ba309['name'],'sectionId':_0x6ba309['id']},{})[_0xf6c9('0x26')](function(){return _0x156545;});}else{return _0x156545;}})[_0xf6c9('0x47')](function(_0x490beb){logger[_0xf6c9('0x2a')](_0xf6c9('0x50'),_0x490beb);throw _0x490beb;});}return _0x156545;})[_0xf6c9('0x26')](respondWithResult(_0x92bac2,0xc9))[_0xf6c9('0x47')](handleError(_0x92bac2,null));};exports['clone']=function(_0x3c430c,_0x60512f){var _0x254893={'where':{'id':_0x3c430c['params']['id']}},_0x1f7c9a={};_0x1f7c9a[_0xf6c9('0x33')]=_[_0xf6c9('0x35')](db[_0xf6c9('0x42')][_0xf6c9('0x2f')]);_0x254893[_0xf6c9('0x38')]=_['intersection'](_0x1f7c9a[_0xf6c9('0x33')],qs[_0xf6c9('0x39')](_0x3c430c[_0xf6c9('0x34')]['fields']));_0x254893[_0xf6c9('0x38')]=_0x254893[_0xf6c9('0x38')][_0xf6c9('0x3a')]?_0x254893[_0xf6c9('0x38')]:_0x1f7c9a[_0xf6c9('0x33')];if(_0x3c430c[_0xf6c9('0x34')]['includeAll']){_0x254893[_0xf6c9('0x44')]=[{'all':!![]}];}_0x254893=_['merge']({},_0x254893,_0x3c430c[_0xf6c9('0x41')]);return db[_0xf6c9('0x42')][_0xf6c9('0x49')](_0x254893)[_0xf6c9('0x26')](handleEntityNotFound(_0x60512f,null))[_0xf6c9('0x26')](function(_0x1debd4){if(_0x1debd4){var _0x327901=_0x1debd4[_0xf6c9('0x27')]({'plain':!![]});_0x327901=qs['omit'](_0x327901,['id','createdAt','updatedAt']);_0x3c430c['body']=_['omit'](_0x3c430c['body'],['id','createdAt',_0xf6c9('0x51')]);return db[_0xf6c9('0x42')]['create'](_[_0xf6c9('0x52')](_0x327901,_0x3c430c[_0xf6c9('0x4b')]),{'include':_0x3c430c[_0xf6c9('0x34')][_0xf6c9('0x43')]?[{'all':!![]}]:undefined})[_0xf6c9('0x26')](function(_0x3ec51f){var _0x596288=_0x3c430c[_0xf6c9('0x4c')]['get']({'plain':!![]});if(!_0x596288)throw new Error(_0xf6c9('0x53'));if(_0x596288[_0xf6c9('0x4d')]===_0xf6c9('0x4c')){var _0x2a93e4=_0x3ec51f['get']({'plain':!![]});var _0x2cd127=_0xf6c9('0x4e');return db[_0xf6c9('0x54')][_0xf6c9('0x49')]({'where':{'name':_0x2cd127,'userProfileId':_0x596288[_0xf6c9('0x4f')]},'raw':!![]})[_0xf6c9('0x26')](function(_0x34ba7b){if(_0x34ba7b&&_0x34ba7b[_0xf6c9('0x55')]===0x0){return db[_0xf6c9('0x28')][_0xf6c9('0x4a')]({'name':_0x2a93e4[_0xf6c9('0x2c')],'resourceId':_0x2a93e4['id'],'type':_0x34ba7b[_0xf6c9('0x2c')],'sectionId':_0x34ba7b['id']},{})['then'](function(){return _0x3ec51f;});}else{return _0x3ec51f;}})[_0xf6c9('0x47')](function(_0x8d6e2d){logger[_0xf6c9('0x2a')](_0xf6c9('0x50'),_0x8d6e2d);throw _0x8d6e2d;});}return _0x3ec51f;});}})[_0xf6c9('0x26')](respondWithResult(_0x60512f,0xc9))[_0xf6c9('0x47')](handleError(_0x60512f,null));};exports[_0xf6c9('0x25')]=function(_0x4f6aa5,_0x57b991){if(_0x4f6aa5[_0xf6c9('0x4b')]['id']){delete _0x4f6aa5[_0xf6c9('0x4b')]['id'];}return db['Campaign'][_0xf6c9('0x49')]({'where':{'id':_0x4f6aa5[_0xf6c9('0x48')]['id']}})[_0xf6c9('0x26')](handleEntityNotFound(_0x57b991,null))[_0xf6c9('0x26')](saveUpdates(_0x4f6aa5['body'],null))[_0xf6c9('0x26')](respondWithResult(_0x57b991,null))[_0xf6c9('0x47')](handleError(_0x57b991,null));};exports[_0xf6c9('0x56')]=function(_0x1153e4,_0x28edc4){return db[_0xf6c9('0x42')][_0xf6c9('0x49')]({'where':{'id':_0x1153e4[_0xf6c9('0x48')]['id']}})[_0xf6c9('0x26')](handleEntityNotFound(_0x28edc4,null))[_0xf6c9('0x26')](removeEntity(_0x28edc4,null))[_0xf6c9('0x47')](handleError(_0x28edc4,null));};exports[_0xf6c9('0x57')]=function(_0x5b0e95,_0x4345ec,_0xed5323){var _0x291413={'raw':!![],'where':{}};var _0x1b1242={};var _0x5c2e7d={'count':0x0,'rows':[]};return db[_0xf6c9('0x42')]['findOne']({'where':{'id':_0x5b0e95[_0xf6c9('0x48')]['id']}})[_0xf6c9('0x26')](handleEntityNotFound(_0x4345ec,null))['then'](function(_0x570a69){if(_0x570a69){_0x1b1242[_0xf6c9('0x33')]=_['keys'](db[_0xf6c9('0x58')][_0xf6c9('0x2f')]);_0x1b1242[_0xf6c9('0x34')]=_[_0xf6c9('0x35')](_0x5b0e95[_0xf6c9('0x34')]);_0x1b1242['filters']=_[_0xf6c9('0x37')](_0x1b1242[_0xf6c9('0x33')],_0x1b1242[_0xf6c9('0x34')]);_0x291413[_0xf6c9('0x38')]=_[_0xf6c9('0x37')](_0x1b1242['model'],qs['fields'](_0x5b0e95['query'][_0xf6c9('0x39')]));_0x291413[_0xf6c9('0x38')]=_0x291413[_0xf6c9('0x38')][_0xf6c9('0x3a')]?_0x291413[_0xf6c9('0x38')]:_0x1b1242['model'];if(!_0x5b0e95[_0xf6c9('0x34')]['hasOwnProperty'](_0xf6c9('0x3b'))){_0x291413[_0xf6c9('0x1f')]=qs[_0xf6c9('0x1f')](_0x5b0e95[_0xf6c9('0x34')][_0xf6c9('0x1f')]);_0x291413[_0xf6c9('0x1d')]=qs[_0xf6c9('0x1d')](_0x5b0e95[_0xf6c9('0x34')][_0xf6c9('0x1d')]);}_0x291413[_0xf6c9('0x3c')]=qs[_0xf6c9('0x59')](_0x5b0e95[_0xf6c9('0x34')]['sort']);_0x291413[_0xf6c9('0x3d')]=qs[_0xf6c9('0x36')](_[_0xf6c9('0x3e')](_0x5b0e95['query'],_0x1b1242[_0xf6c9('0x36')]));_0x291413[_0xf6c9('0x3d')]['CampaignId']=_0x570a69['id'];if(_0x5b0e95[_0xf6c9('0x34')][_0xf6c9('0x3f')]){_0x291413[_0xf6c9('0x3d')]=_[_0xf6c9('0x52')](_0x291413[_0xf6c9('0x3d')],{'$or':_['map'](_0x291413[_0xf6c9('0x38')],function(_0x559ba5){var _0x21fa01={};_0x21fa01[_0x559ba5]={'$like':'%'+_0x5b0e95[_0xf6c9('0x34')][_0xf6c9('0x3f')]+'%'};return _0x21fa01;})});}_0x291413=_[_0xf6c9('0x52')]({},_0x291413,_0x5b0e95['options']);return db[_0xf6c9('0x58')][_0xf6c9('0x20')]({'where':_0x291413[_0xf6c9('0x3d')]})[_0xf6c9('0x26')](function(_0x10b711){_0x5c2e7d[_0xf6c9('0x20')]=_0x10b711;if(_0x5b0e95['query']['includeAll']){_0x291413[_0xf6c9('0x44')]=[{'all':!![]}];}return db['CmHopper'][_0xf6c9('0x45')](_0x291413);})[_0xf6c9('0x26')](function(_0x5b145d){_0x5c2e7d[_0xf6c9('0x46')]=_0x5b145d;return _0x5c2e7d;});}})[_0xf6c9('0x26')](respondWithFilteredResult(_0x4345ec,_0x291413))['catch'](handleError(_0x4345ec,null));};exports[_0xf6c9('0x5a')]=function(_0x37a8fc,_0x188d5e,_0xa28fc3){var _0x2a3e0d={'raw':!![],'where':{}};var _0x3e7f61={};var _0x544a2b={'count':0x0,'rows':[]};return db['Campaign'][_0xf6c9('0x5b')]({'where':{'id':_0x37a8fc[_0xf6c9('0x48')]['id']}})[_0xf6c9('0x26')](handleEntityNotFound(_0x188d5e,null))[_0xf6c9('0x26')](function(_0x12ef4d){if(_0x12ef4d){_0x3e7f61[_0xf6c9('0x33')]=_[_0xf6c9('0x35')](db[_0xf6c9('0x5c')][_0xf6c9('0x2f')]);_0x3e7f61[_0xf6c9('0x34')]=_[_0xf6c9('0x35')](_0x37a8fc[_0xf6c9('0x34')]);_0x3e7f61['filters']=_[_0xf6c9('0x37')](_0x3e7f61[_0xf6c9('0x33')],_0x3e7f61['query']);_0x2a3e0d[_0xf6c9('0x38')]=_['intersection'](_0x3e7f61[_0xf6c9('0x33')],qs[_0xf6c9('0x39')](_0x37a8fc['query']['fields']));_0x2a3e0d['attributes']=_0x2a3e0d[_0xf6c9('0x38')][_0xf6c9('0x3a')]?_0x2a3e0d['attributes']:_0x3e7f61[_0xf6c9('0x33')];if(!_0x37a8fc[_0xf6c9('0x34')][_0xf6c9('0x5d')](_0xf6c9('0x3b'))){_0x2a3e0d['limit']=qs[_0xf6c9('0x1f')](_0x37a8fc[_0xf6c9('0x34')]['limit']);_0x2a3e0d[_0xf6c9('0x1d')]=qs['offset'](_0x37a8fc['query'][_0xf6c9('0x1d')]);}_0x2a3e0d[_0xf6c9('0x3c')]=qs[_0xf6c9('0x59')](_0x37a8fc[_0xf6c9('0x34')][_0xf6c9('0x59')]);_0x2a3e0d[_0xf6c9('0x3d')]=qs['filters'](_[_0xf6c9('0x3e')](_0x37a8fc[_0xf6c9('0x34')],_0x3e7f61['filters']));_0x2a3e0d[_0xf6c9('0x3d')]['CampaignId']=_0x12ef4d['id'];if(_0x37a8fc[_0xf6c9('0x34')][_0xf6c9('0x3f')]){_0x2a3e0d[_0xf6c9('0x3d')]=_[_0xf6c9('0x52')](_0x2a3e0d[_0xf6c9('0x3d')],{'$or':_['map'](_0x2a3e0d[_0xf6c9('0x38')],function(_0x13551f){var _0x57cc46={};_0x57cc46[_0x13551f]={'$like':'%'+_0x37a8fc[_0xf6c9('0x34')]['filter']+'%'};return _0x57cc46;})});}_0x2a3e0d=_[_0xf6c9('0x52')]({},_0x2a3e0d,_0x37a8fc[_0xf6c9('0x41')]);return db[_0xf6c9('0x5c')][_0xf6c9('0x20')]({'where':_0x2a3e0d[_0xf6c9('0x3d')]})['then'](function(_0x41fffa){_0x544a2b[_0xf6c9('0x20')]=_0x41fffa;if(_0x37a8fc[_0xf6c9('0x34')][_0xf6c9('0x43')]){_0x2a3e0d[_0xf6c9('0x44')]=[{'all':!![]}];}return db[_0xf6c9('0x5c')][_0xf6c9('0x45')](_0x2a3e0d);})[_0xf6c9('0x26')](function(_0x2cd225){_0x544a2b[_0xf6c9('0x46')]=_0x2cd225;return _0x544a2b;});}})[_0xf6c9('0x26')](respondWithFilteredResult(_0x188d5e,_0x2a3e0d))['catch'](handleError(_0x188d5e,null));};exports[_0xf6c9('0x5e')]=function(_0x3df862,_0x3f89e9,_0x112979){var _0x5c75ae={'raw':!![],'where':{}};var _0x42903f={};var _0x2495eb={'count':0x0,'rows':[]};return db[_0xf6c9('0x42')]['findOne']({'where':{'id':_0x3df862[_0xf6c9('0x48')]['id']}})[_0xf6c9('0x26')](handleEntityNotFound(_0x3f89e9,null))[_0xf6c9('0x26')](function(_0x3e519f){if(_0x3e519f){_0x42903f[_0xf6c9('0x33')]=_[_0xf6c9('0x35')](db[_0xf6c9('0x5f')]['rawAttributes']);_0x42903f[_0xf6c9('0x34')]=_[_0xf6c9('0x35')](_0x3df862['query']);_0x42903f[_0xf6c9('0x36')]=_['intersection'](_0x42903f['model'],_0x42903f['query']);_0x5c75ae[_0xf6c9('0x38')]=_[_0xf6c9('0x37')](_0x42903f[_0xf6c9('0x33')],qs[_0xf6c9('0x39')](_0x3df862[_0xf6c9('0x34')][_0xf6c9('0x39')]));_0x5c75ae['attributes']=_0x5c75ae[_0xf6c9('0x38')][_0xf6c9('0x3a')]?_0x5c75ae[_0xf6c9('0x38')]:_0x42903f[_0xf6c9('0x33')];if(!_0x3df862[_0xf6c9('0x34')]['hasOwnProperty']('nolimit')){_0x5c75ae['limit']=qs[_0xf6c9('0x1f')](_0x3df862[_0xf6c9('0x34')][_0xf6c9('0x1f')]);_0x5c75ae[_0xf6c9('0x1d')]=qs[_0xf6c9('0x1d')](_0x3df862[_0xf6c9('0x34')][_0xf6c9('0x1d')]);}_0x5c75ae['order']=qs[_0xf6c9('0x59')](_0x3df862[_0xf6c9('0x34')][_0xf6c9('0x59')]);_0x5c75ae[_0xf6c9('0x3d')]=qs[_0xf6c9('0x36')](_[_0xf6c9('0x3e')](_0x3df862['query'],_0x42903f[_0xf6c9('0x36')]));_0x5c75ae[_0xf6c9('0x3d')][_0xf6c9('0x60')]=_0x3e519f['id'];if(_0x3df862[_0xf6c9('0x34')][_0xf6c9('0x3f')]){_0x5c75ae[_0xf6c9('0x3d')]=_['merge'](_0x5c75ae[_0xf6c9('0x3d')],{'$or':_[_0xf6c9('0x2e')](_0x5c75ae[_0xf6c9('0x38')],function(_0xc1727f){var _0x283e82={};_0x283e82[_0xc1727f]={'$like':'%'+_0x3df862[_0xf6c9('0x34')]['filter']+'%'};return _0x283e82;})});}_0x5c75ae=_[_0xf6c9('0x52')]({},_0x5c75ae,_0x3df862[_0xf6c9('0x41')]);return db[_0xf6c9('0x5f')][_0xf6c9('0x20')]({'where':_0x5c75ae['where']})[_0xf6c9('0x26')](function(_0x5cb7f7){_0x2495eb[_0xf6c9('0x20')]=_0x5cb7f7;if(_0x3df862[_0xf6c9('0x34')][_0xf6c9('0x43')]){_0x5c75ae['include']=[{'all':!![]}];}return db['CmHopperFinal'][_0xf6c9('0x45')](_0x5c75ae);})[_0xf6c9('0x26')](function(_0x5dbcaf){_0x2495eb[_0xf6c9('0x46')]=_0x5dbcaf;return _0x2495eb;});}})['then'](respondWithFilteredResult(_0x3f89e9,_0x5c75ae))[_0xf6c9('0x47')](handleError(_0x3f89e9,null));};exports[_0xf6c9('0x61')]=function(_0xe14067,_0x7febe2,_0x515a93){var _0x44b682={'raw':!![],'where':{}};var _0x315096={};var _0x525da4={'count':0x0,'rows':[]};return db[_0xf6c9('0x42')][_0xf6c9('0x5b')]({'where':{'id':_0xe14067[_0xf6c9('0x48')]['id']}})[_0xf6c9('0x26')](handleEntityNotFound(_0x7febe2,null))[_0xf6c9('0x26')](function(_0x1cb098){if(_0x1cb098){_0x315096['model']=_[_0xf6c9('0x35')](db['CmHopperBlack']['rawAttributes']);_0x315096[_0xf6c9('0x34')]=_[_0xf6c9('0x35')](_0xe14067[_0xf6c9('0x34')]);_0x315096[_0xf6c9('0x36')]=_[_0xf6c9('0x37')](_0x315096[_0xf6c9('0x33')],_0x315096[_0xf6c9('0x34')]);_0x44b682['attributes']=_['intersection'](_0x315096[_0xf6c9('0x33')],qs[_0xf6c9('0x39')](_0xe14067[_0xf6c9('0x34')]['fields']));_0x44b682[_0xf6c9('0x38')]=_0x44b682[_0xf6c9('0x38')][_0xf6c9('0x3a')]?_0x44b682[_0xf6c9('0x38')]:_0x315096[_0xf6c9('0x33')];if(!_0xe14067['query']['hasOwnProperty'](_0xf6c9('0x3b'))){_0x44b682[_0xf6c9('0x1f')]=qs['limit'](_0xe14067[_0xf6c9('0x34')][_0xf6c9('0x1f')]);_0x44b682[_0xf6c9('0x1d')]=qs[_0xf6c9('0x1d')](_0xe14067[_0xf6c9('0x34')][_0xf6c9('0x1d')]);}_0x44b682['order']=qs['sort'](_0xe14067['query']['sort']);_0x44b682['where']=qs[_0xf6c9('0x36')](_[_0xf6c9('0x3e')](_0xe14067[_0xf6c9('0x34')],_0x315096[_0xf6c9('0x36')]));_0x44b682[_0xf6c9('0x3d')]['CampaignId']=_0x1cb098['id'];if(_0xe14067[_0xf6c9('0x34')][_0xf6c9('0x3f')]){_0x44b682[_0xf6c9('0x3d')]=_[_0xf6c9('0x52')](_0x44b682[_0xf6c9('0x3d')],{'$or':_[_0xf6c9('0x2e')](_0x44b682[_0xf6c9('0x38')],function(_0x16d7b2){var _0x1799f8={};_0x1799f8[_0x16d7b2]={'$like':'%'+_0xe14067[_0xf6c9('0x34')][_0xf6c9('0x3f')]+'%'};return _0x1799f8;})});}_0x44b682=_[_0xf6c9('0x52')]({},_0x44b682,_0xe14067[_0xf6c9('0x41')]);return db[_0xf6c9('0x62')][_0xf6c9('0x20')]({'where':_0x44b682[_0xf6c9('0x3d')]})['then'](function(_0x37a78){_0x525da4[_0xf6c9('0x20')]=_0x37a78;if(_0xe14067[_0xf6c9('0x34')]['includeAll']){_0x44b682['include']=[{'all':!![]}];}return db[_0xf6c9('0x62')][_0xf6c9('0x45')](_0x44b682);})[_0xf6c9('0x26')](function(_0x289f76){_0x525da4[_0xf6c9('0x46')]=_0x289f76;return _0x525da4;});}})['then'](respondWithFilteredResult(_0x7febe2,_0x44b682))[_0xf6c9('0x47')](handleError(_0x7febe2,null));};exports[_0xf6c9('0x63')]=function(_0x58b43b,_0x144a6e,_0x591974){var _0x469a54={};var _0x29b6c2={};var _0x139f96;var _0xadcbb2;return db[_0xf6c9('0x42')][_0xf6c9('0x5b')]({'where':{'id':_0x58b43b[_0xf6c9('0x48')]['id']}})[_0xf6c9('0x26')](handleEntityNotFound(_0x144a6e,null))['then'](function(_0x279900){if(_0x279900){_0x139f96=_0x279900;_0x29b6c2[_0xf6c9('0x33')]=_[_0xf6c9('0x35')](db['CmList'][_0xf6c9('0x2f')]);_0x29b6c2[_0xf6c9('0x34')]=_[_0xf6c9('0x35')](_0x58b43b['query']);_0x29b6c2[_0xf6c9('0x36')]=_[_0xf6c9('0x37')](_0x29b6c2['model'],_0x29b6c2[_0xf6c9('0x34')]);_0x469a54[_0xf6c9('0x38')]=_[_0xf6c9('0x37')](_0x29b6c2[_0xf6c9('0x33')],qs[_0xf6c9('0x39')](_0x58b43b['query'][_0xf6c9('0x39')]));_0x469a54[_0xf6c9('0x38')]=_0x469a54[_0xf6c9('0x38')][_0xf6c9('0x3a')]?_0x469a54[_0xf6c9('0x38')]:_0x29b6c2[_0xf6c9('0x33')];_0x469a54['order']=qs[_0xf6c9('0x59')](_0x58b43b[_0xf6c9('0x34')][_0xf6c9('0x59')]);_0x469a54[_0xf6c9('0x3d')]=qs[_0xf6c9('0x36')](_[_0xf6c9('0x3e')](_0x58b43b['query'],_0x29b6c2[_0xf6c9('0x36')]));if(_0x58b43b['query'][_0xf6c9('0x3f')]){_0x469a54[_0xf6c9('0x3d')]=_['merge'](_0x469a54[_0xf6c9('0x3d')],{'$or':_[_0xf6c9('0x2e')](_0x469a54['attributes'],function(_0x22cf5b){var _0x25c372={};_0x25c372[_0x22cf5b]={'$like':'%'+_0x58b43b[_0xf6c9('0x34')][_0xf6c9('0x3f')]+'%'};return _0x25c372;})});}_0x469a54=_[_0xf6c9('0x52')]({},_0x469a54,_0x58b43b[_0xf6c9('0x41')]);return _0x139f96[_0xf6c9('0x63')](_0x469a54);}})[_0xf6c9('0x26')](function(_0xcc1f20){if(_0xcc1f20){_0xadcbb2=_0xcc1f20[_0xf6c9('0x3a')];if(!_0x58b43b[_0xf6c9('0x34')][_0xf6c9('0x5d')](_0xf6c9('0x3b'))){_0x469a54[_0xf6c9('0x1f')]=qs[_0xf6c9('0x1f')](_0x58b43b[_0xf6c9('0x34')]['limit']);_0x469a54[_0xf6c9('0x1d')]=qs['offset'](_0x58b43b[_0xf6c9('0x34')][_0xf6c9('0x1d')]);}return _0x139f96[_0xf6c9('0x63')](_0x469a54);}})[_0xf6c9('0x26')](function(_0x589394){if(_0x589394){return _0x589394?{'count':_0xadcbb2,'rows':_0x589394}:null;}})[_0xf6c9('0x26')](respondWithResult(_0x144a6e,null))['catch'](handleError(_0x144a6e,null));};exports['addLists']=function(_0x3facdd,_0x1f8bee,_0xbd3fcd){var _0x2c2f9f,_0x10942a;var _0x2dca07=[];var _0xca7a8a=moment()[_0xf6c9('0x64')]('YYYY-MM-DD\x20HH:mm:ss');return db[_0xf6c9('0x42')][_0xf6c9('0x49')]({'where':{'id':_0x3facdd[_0xf6c9('0x48')]['id']}})[_0xf6c9('0x26')](handleEntityNotFound(_0x1f8bee,null))['then'](function(_0x50b6c2){if(_0x50b6c2){_0x10942a=_0x50b6c2;return _0x50b6c2[_0xf6c9('0x65')](_0x3facdd['body'][_0xf6c9('0x66')],_[_0xf6c9('0x67')](_0x3facdd[_0xf6c9('0x4b')],['ids','id'])||{});}return null;})[_0xf6c9('0x68')](function(_0x4051e3){var _0x3be88e;var _0x831786;_0x2c2f9f=_0x4051e3||[];var _0x275200=[];if(_0x4051e3){for(var _0x3acb50=0x0;_0x3acb50<_0x4051e3['length'];_0x3acb50+=0x1){var _0x2b6bec=_0x4051e3[_0x3acb50][_0xf6c9('0x27')]({'plain':!![]});_0x10942a[_0xf6c9('0x69')]=_0x3facdd['body']['dialCheckDuplicateType']?_0x3facdd[_0xf6c9('0x4b')]['dialCheckDuplicateType']:_0x10942a[_0xf6c9('0x69')];switch(_0x10942a[_0xf6c9('0x69')]){case'always':_0x3be88e=squel['insert']()[_0xf6c9('0x6a')](_0xf6c9('0x6b'))[_0xf6c9('0x6c')](['phone','scheduledAt',_0xf6c9('0x6d'),_0xf6c9('0x6e'),_0xf6c9('0x60'),_0xf6c9('0x6f'),_0xf6c9('0x51')],squel['select']()[_0xf6c9('0x70')]('phone',_0xf6c9('0x71'))[_0xf6c9('0x70')](_0xf6c9('0x72'),_0xf6c9('0x73'))[_0xf6c9('0x70')]('id',_0xf6c9('0x6d'))[_0xf6c9('0x70')](_0x2b6bec[_0xf6c9('0x74')][_0xf6c9('0x75')](),'ListId')[_0xf6c9('0x70')](_0x3facdd[_0xf6c9('0x48')]['id'][_0xf6c9('0x75')](),_0xf6c9('0x60'))[_0xf6c9('0x70')]('\x27'+_0xca7a8a+'\x27','createdAt')[_0xf6c9('0x70')]('\x27'+_0xca7a8a+'\x27',_0xf6c9('0x51'))[_0xf6c9('0x76')](_0xf6c9('0x77'))[_0xf6c9('0x3d')](_0xf6c9('0x78'))[_0xf6c9('0x3d')]('ListId\x20=\x20?',_0x2b6bec[_0xf6c9('0x74')]['toString']())[_0xf6c9('0x3d')]('phone\x20IS\x20NOT\x20NULL')[_0xf6c9('0x3d')](_0xf6c9('0x79'),squel['select']()['field']('COALESCE(calleridnum,\x27\x27)')['from'](_0xf6c9('0x7a'))[_0xf6c9('0x3d')](_0xf6c9('0x7b'),_0x3facdd[_0xf6c9('0x48')]['id']['toString']()))[_0xf6c9('0x3d')](_0xf6c9('0x79'),squel[_0xf6c9('0x7c')]()[_0xf6c9('0x70')](_0xf6c9('0x7d'))[_0xf6c9('0x76')](_0xf6c9('0x6b'))[_0xf6c9('0x3d')](_0xf6c9('0x7b'),_0x3facdd['params']['id']['toString']())))[_0xf6c9('0x75')]();break;case _0xf6c9('0x7e'):_0x3be88e=squel[_0xf6c9('0x7f')]()[_0xf6c9('0x6a')](_0xf6c9('0x6b'))['fromQuery']([_0xf6c9('0x71'),_0xf6c9('0x73'),_0xf6c9('0x6d'),_0xf6c9('0x6e'),_0xf6c9('0x60'),_0xf6c9('0x6f'),'updatedAt'],squel[_0xf6c9('0x7c')]()[_0xf6c9('0x70')]('phone',_0xf6c9('0x71'))[_0xf6c9('0x70')](_0xf6c9('0x72'),_0xf6c9('0x73'))['field']('id',_0xf6c9('0x6d'))[_0xf6c9('0x70')](_0x2b6bec['CmListId'][_0xf6c9('0x75')](),_0xf6c9('0x6e'))['field'](_0x3facdd[_0xf6c9('0x48')]['id'][_0xf6c9('0x75')](),'CampaignId')['field']('\x27'+_0xca7a8a+'\x27','createdAt')[_0xf6c9('0x70')]('\x27'+_0xca7a8a+'\x27',_0xf6c9('0x51'))['from'](_0xf6c9('0x77'))['where'](_0xf6c9('0x78'))['where'](_0xf6c9('0x80'),_0x2b6bec['CmListId'][_0xf6c9('0x75')]())[_0xf6c9('0x3d')](_0xf6c9('0x81'))['where']('phone\x20NOT\x20IN\x20(?)',squel[_0xf6c9('0x7c')]()[_0xf6c9('0x70')]('COALESCE(phone,\x27\x27)')[_0xf6c9('0x76')](_0xf6c9('0x6b'))[_0xf6c9('0x3d')](_0xf6c9('0x7b'),_0x3facdd[_0xf6c9('0x48')]['id'][_0xf6c9('0x75')]())))[_0xf6c9('0x75')]();break;default:_0x3be88e=squel[_0xf6c9('0x7f')]()['into'](_0xf6c9('0x6b'))['fromQuery']([_0xf6c9('0x71'),_0xf6c9('0x73'),_0xf6c9('0x6d'),_0xf6c9('0x6e'),'CampaignId','createdAt','updatedAt'],squel['select']()[_0xf6c9('0x70')](_0xf6c9('0x71'),_0xf6c9('0x71'))[_0xf6c9('0x70')](_0xf6c9('0x72'),'scheduledAt')['field']('id',_0xf6c9('0x6d'))[_0xf6c9('0x70')](_0x2b6bec[_0xf6c9('0x74')][_0xf6c9('0x75')](),_0xf6c9('0x6e'))[_0xf6c9('0x70')](_0x3facdd[_0xf6c9('0x48')]['id']['toString'](),_0xf6c9('0x60'))['field']('\x27'+_0xca7a8a+'\x27',_0xf6c9('0x6f'))['field']('\x27'+_0xca7a8a+'\x27',_0xf6c9('0x51'))['from']('cm_contacts')[_0xf6c9('0x3d')](_0xf6c9('0x78'))[_0xf6c9('0x3d')]('ListId\x20=\x20?',_0x2b6bec[_0xf6c9('0x74')][_0xf6c9('0x75')]())[_0xf6c9('0x3d')](_0xf6c9('0x81')))[_0xf6c9('0x75')]();}_0x831786=squel['insert']()[_0xf6c9('0x6a')](_0xf6c9('0x82'))[_0xf6c9('0x6c')]([_0xf6c9('0x83'),_0xf6c9('0x73'),_0xf6c9('0x71'),'OrderBy','createdAt',_0xf6c9('0x51')],squel[_0xf6c9('0x7c')]()[_0xf6c9('0x70')](_0xf6c9('0x84'),'id')[_0xf6c9('0x70')](_0xf6c9('0x72'),'scheduledAt')[_0xf6c9('0x70')]('ci.item','phone')[_0xf6c9('0x70')](_0xf6c9('0x85'),'OrderBy')[_0xf6c9('0x70')]('\x27'+_0xca7a8a+'\x27',_0xf6c9('0x6f'))[_0xf6c9('0x70')]('\x27'+_0xca7a8a+'\x27',_0xf6c9('0x51'))[_0xf6c9('0x76')]('cm_contact_has_items','ci')['join'](_0xf6c9('0x6b'),'h',_0xf6c9('0x86'))[_0xf6c9('0x3d')](_0xf6c9('0x87'),_0x2b6bec['CmListId'][_0xf6c9('0x75')]())[_0xf6c9('0x3d')](_0xf6c9('0x88'),_0x3facdd['params']['id'][_0xf6c9('0x75')]())[_0xf6c9('0x3d')](_0xf6c9('0x89'),_0xca7a8a))[_0xf6c9('0x75')]();_0x275200[_0xf6c9('0x8a')](db[_0xf6c9('0x8b')][_0xf6c9('0x34')](_0x3be88e));_0x2dca07[_0xf6c9('0x8a')](db[_0xf6c9('0x8b')][_0xf6c9('0x34')](_0x831786));}return BPromise[_0xf6c9('0x8c')](_0x275200);}})[_0xf6c9('0x26')](function(){return BPromise[_0xf6c9('0x8c')](_0x2dca07);})[_0xf6c9('0x26')](function(){return _0x2c2f9f;})['then'](respondWithResult(_0x1f8bee,null))[_0xf6c9('0x47')](handleError(_0x1f8bee,null));};exports[_0xf6c9('0x8d')]=function(_0x15a10e,_0x36fdcd,_0xa2ed8c){return db['Campaign'][_0xf6c9('0x49')]({'where':{'id':_0x15a10e[_0xf6c9('0x48')]['id']}})[_0xf6c9('0x26')](handleEntityNotFound(_0x36fdcd,null))[_0xf6c9('0x26')](function(_0x29c103){if(_0x29c103){return _0x29c103['removeLists'](_0x15a10e[_0xf6c9('0x34')][_0xf6c9('0x66')]);}})['then'](function(_0x53ef9b){if(_0x53ef9b){return db[_0xf6c9('0x58')][_0xf6c9('0x56')]({'where':{'ListId':_0x15a10e[_0xf6c9('0x34')]['ids'],'CampaignId':_0x15a10e[_0xf6c9('0x48')]['id']}})[_0xf6c9('0x26')](function(){return _0x53ef9b;});}})[_0xf6c9('0x26')](respondWithStatusCode(_0x36fdcd,null))[_0xf6c9('0x47')](handleError(_0x36fdcd,null));};exports[_0xf6c9('0x8e')]=function(_0x1ca234,_0x226b93,_0x2c3b50){var _0x55bfb0={};var _0x59201a={};var _0x2ed80f;var _0x395716;return db[_0xf6c9('0x42')][_0xf6c9('0x5b')]({'where':{'id':_0x1ca234[_0xf6c9('0x48')]['id']}})[_0xf6c9('0x26')](handleEntityNotFound(_0x226b93,null))[_0xf6c9('0x26')](function(_0x26ca54){if(_0x26ca54){_0x2ed80f=_0x26ca54;_0x59201a[_0xf6c9('0x33')]=_[_0xf6c9('0x35')](db['CmList'][_0xf6c9('0x2f')]);_0x59201a[_0xf6c9('0x34')]=_[_0xf6c9('0x35')](_0x1ca234[_0xf6c9('0x34')]);_0x59201a[_0xf6c9('0x36')]=_[_0xf6c9('0x37')](_0x59201a[_0xf6c9('0x33')],_0x59201a[_0xf6c9('0x34')]);_0x55bfb0['attributes']=_[_0xf6c9('0x37')](_0x59201a[_0xf6c9('0x33')],qs[_0xf6c9('0x39')](_0x1ca234[_0xf6c9('0x34')][_0xf6c9('0x39')]));_0x55bfb0['attributes']=_0x55bfb0[_0xf6c9('0x38')][_0xf6c9('0x3a')]?_0x55bfb0[_0xf6c9('0x38')]:_0x59201a[_0xf6c9('0x33')];_0x55bfb0[_0xf6c9('0x3c')]=qs[_0xf6c9('0x59')](_0x1ca234[_0xf6c9('0x34')][_0xf6c9('0x59')]);_0x55bfb0['where']=qs[_0xf6c9('0x36')](_['pick'](_0x1ca234['query'],_0x59201a[_0xf6c9('0x36')]));if(_0x1ca234['query'][_0xf6c9('0x3f')]){_0x55bfb0[_0xf6c9('0x3d')]=_[_0xf6c9('0x52')](_0x55bfb0[_0xf6c9('0x3d')],{'$or':_[_0xf6c9('0x2e')](_0x55bfb0[_0xf6c9('0x38')],function(_0x4a99b1){var _0x57b78d={};_0x57b78d[_0x4a99b1]={'$like':'%'+_0x1ca234[_0xf6c9('0x34')][_0xf6c9('0x3f')]+'%'};return _0x57b78d;})});}_0x55bfb0=_[_0xf6c9('0x52')]({},_0x55bfb0,_0x1ca234[_0xf6c9('0x41')]);return _0x2ed80f[_0xf6c9('0x8e')](_0x55bfb0);}})[_0xf6c9('0x26')](function(_0x15b28c){if(_0x15b28c){_0x395716=_0x15b28c['length'];if(!_0x1ca234[_0xf6c9('0x34')][_0xf6c9('0x5d')]('nolimit')){_0x55bfb0[_0xf6c9('0x1f')]=qs[_0xf6c9('0x1f')](_0x1ca234[_0xf6c9('0x34')][_0xf6c9('0x1f')]);_0x55bfb0[_0xf6c9('0x1d')]=qs['offset'](_0x1ca234['query'][_0xf6c9('0x1d')]);}return _0x2ed80f['getBlackLists'](_0x55bfb0);}})[_0xf6c9('0x26')](function(_0x2a95af){if(_0x2a95af){return _0x2a95af?{'count':_0x395716,'rows':_0x2a95af}:null;}})['then'](respondWithResult(_0x226b93,null))['catch'](handleError(_0x226b93,null));};exports[_0xf6c9('0x8f')]=function(_0x28440c,_0xb53b3d,_0x3fa640){var _0xf5caa0,_0x3c7a96;var _0x227c59=[];var _0x5edf19=moment()[_0xf6c9('0x64')](_0xf6c9('0x90'));return db[_0xf6c9('0x42')][_0xf6c9('0x49')]({'where':{'id':_0x28440c[_0xf6c9('0x48')]['id']}})[_0xf6c9('0x26')](handleEntityNotFound(_0xb53b3d,null))[_0xf6c9('0x26')](function(_0x101544){if(_0x101544){_0x3c7a96=_0x101544;return _0x101544[_0xf6c9('0x8f')](_0x28440c[_0xf6c9('0x4b')]['ids'],_[_0xf6c9('0x67')](_0x28440c[_0xf6c9('0x4b')],['ids','id'])||{});}return null;})[_0xf6c9('0x68')](function(_0x20d739){var _0x1affac;var _0x50bb1a;_0xf5caa0=_0x20d739||[];var _0x4674a7=[];if(_0x20d739){for(var _0x76c443=0x0;_0x76c443<_0x20d739[_0xf6c9('0x3a')];_0x76c443+=0x1){var _0x3f06bc=_0x20d739[_0x76c443]['get']({'plain':!![]});_0x1affac=squel[_0xf6c9('0x7f')]()[_0xf6c9('0x6a')]('cm_hopper_black')['fromQuery']([_0xf6c9('0x71'),_0xf6c9('0x6d'),_0xf6c9('0x6e'),_0xf6c9('0x60'),_0xf6c9('0x6f'),'updatedAt'],squel[_0xf6c9('0x7c')]()[_0xf6c9('0x70')](_0xf6c9('0x71'),_0xf6c9('0x71'))[_0xf6c9('0x70')]('id',_0xf6c9('0x6d'))[_0xf6c9('0x70')](_0x3f06bc['CmListId'][_0xf6c9('0x75')](),_0xf6c9('0x6e'))[_0xf6c9('0x70')](_0x28440c[_0xf6c9('0x48')]['id'][_0xf6c9('0x75')](),_0xf6c9('0x60'))[_0xf6c9('0x70')](_0xf6c9('0x72'),_0xf6c9('0x6f'))[_0xf6c9('0x70')](_0xf6c9('0x72'),_0xf6c9('0x51'))[_0xf6c9('0x76')](_0xf6c9('0x77'))['where'](_0xf6c9('0x78'))['where'](_0xf6c9('0x80'),_0x3f06bc[_0xf6c9('0x74')][_0xf6c9('0x75')]())[_0xf6c9('0x3d')](_0xf6c9('0x81')))['toString']();_0x4674a7[_0xf6c9('0x8a')](db[_0xf6c9('0x8b')][_0xf6c9('0x34')](_0x1affac));}return BPromise['all'](_0x4674a7);}})[_0xf6c9('0x26')](function(){return _0xf5caa0;})[_0xf6c9('0x26')](respondWithResult(_0xb53b3d,null))[_0xf6c9('0x47')](handleError(_0xb53b3d,null));};exports['removeBlackLists']=function(_0x449cfc,_0x2ebffa,_0x3c3cfc){return db[_0xf6c9('0x42')][_0xf6c9('0x49')]({'where':{'id':_0x449cfc[_0xf6c9('0x48')]['id']}})[_0xf6c9('0x26')](handleEntityNotFound(_0x2ebffa,null))[_0xf6c9('0x26')](function(_0x262da2){if(_0x262da2){return _0x262da2[_0xf6c9('0x91')](_0x449cfc[_0xf6c9('0x34')][_0xf6c9('0x66')]);}})[_0xf6c9('0x26')](function(_0x355903){if(_0x355903){return db[_0xf6c9('0x62')][_0xf6c9('0x56')]({'where':{'ListId':_0x449cfc[_0xf6c9('0x34')][_0xf6c9('0x66')],'CampaignId':_0x449cfc[_0xf6c9('0x48')]['id']}})[_0xf6c9('0x26')](function(){return _0x355903;});}})[_0xf6c9('0x26')](respondWithStatusCode(_0x2ebffa,null))['catch'](handleError(_0x2ebffa,null));}; \ No newline at end of file +var _0xd909=['bluebird','mustache','util','path','sox','to-csv','ejs','lodash','squel','crypto','jsforce','desk.js','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../config/license/hardware','../../config/logger','../../config/utils','../../mysqldb','sendStatus','status','json','offset','undefined','limit','count','set','Content-Range','apply','reject','save','update','then','get','UserProfileResource','end','stack','name','send','index','map','Campaign','fieldName','type','key','model','keys','query','filters','intersection','attributes','fields','length','sort','where','pick','filter','VIRTUAL','options','include','rows','catch','show','params','rawAttributes','includeAll','merge','find','create','body','role','user','IvrCampaigns','UserProfileSection','userProfileId','autoAssociation','error','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','clone','omit','createdAt','updatedAt','destroy','findOne','hasOwnProperty','nolimit','order','CampaignId','CmHopper','findAll','getHopperHistories','CmHopperHistory','getHopperFinals','CmHopperFinal','CmHopperBlack','getLists','addLists','format','YYYY-MM-DD\x20HH:mm:ss','ids','spread','dialCheckDuplicateType','always','cm_hopper','fromQuery','phone','scheduledAt','ContactId','ListId','select','field','NOW()','CmListId','toString','from','cm_contacts','deletedAt\x20IS\x20NULL','ListId\x20=\x20?','phone\x20NOT\x20IN\x20(?)','COALESCE(calleridnum,\x27\x27)','cm_hopper_final','CampaignId\x20=\x20?','COALESCE(phone,\x27\x27)','onlyIfOpen','phone\x20IS\x20NOT\x20NULL','insert','into','cm_hopper_additional_phones','cmHopperId','OrderBy','h.id','ci.item','ci.OrderBY','join','h.ContactId\x20=\x20ci.CmContactId','h.ListId\x20=\x20?','h.CampaignId=?','push','sequelize','all','removeLists','getBlackLists','addBlackLists','cm_hopper_black','removeBlackLists','rimraf','zip-dir','fast-json-patch','request-promise'];(function(_0x42f663,_0x4c6f36){var _0x443091=function(_0xed1b0a){while(--_0xed1b0a){_0x42f663['push'](_0x42f663['shift']());}};_0x443091(++_0x4c6f36);}(_0xd909,0x1c1));var _0x9d90=function(_0x59860e,_0x18b7e1){_0x59860e=_0x59860e-0x0;var _0x181e64=_0xd909[_0x59860e];return _0x181e64;};'use strict';var emlformat=require('eml-format');var rimraf=require(_0x9d90('0x0'));var zipdir=require(_0x9d90('0x1'));var jsonpatch=require(_0x9d90('0x2'));var rp=require(_0x9d90('0x3'));var moment=require('moment');var BPromise=require(_0x9d90('0x4'));var Mustache=require(_0x9d90('0x5'));var util=require(_0x9d90('0x6'));var path=require(_0x9d90('0x7'));var sox=require(_0x9d90('0x8'));var csv=require(_0x9d90('0x9'));var ejs=require(_0x9d90('0xa'));var fs=require('fs');var fs_extra=require('fs-extra');var _=require(_0x9d90('0xb'));var squel=require(_0x9d90('0xc'));var crypto=require(_0x9d90('0xd'));var jsforce=require(_0x9d90('0xe'));var deskjs=require(_0x9d90('0xf'));var toCsv=require(_0x9d90('0x9'));var querystring=require(_0x9d90('0x10'));var Papa=require(_0x9d90('0x11'));var Redis=require(_0x9d90('0x12'));var authService=require(_0x9d90('0x13'));var qs=require(_0x9d90('0x14'));var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0x9d90('0x15'));var logger=require(_0x9d90('0x16'))('api');var utils=require(_0x9d90('0x17'));var config=require('../../config/environment');var licenseUtil=require('../../config/license/util');var db=require(_0x9d90('0x18'))['db'];function respondWithStatusCode(_0xb13b46,_0x2a2349){_0x2a2349=_0x2a2349||0xcc;return function(_0x4ba977){if(_0x4ba977){return _0xb13b46[_0x9d90('0x19')](_0x2a2349);}return _0xb13b46['status'](_0x2a2349)['end']();};}function respondWithResult(_0x3b3bf4,_0x19d331){_0x19d331=_0x19d331||0xc8;return function(_0x14119b){if(_0x14119b){return _0x3b3bf4[_0x9d90('0x1a')](_0x19d331)[_0x9d90('0x1b')](_0x14119b);}};}function respondWithFilteredResult(_0x4fd791,_0x783172){return function(_0x1fc38c){if(_0x1fc38c){var _0x201752=typeof _0x783172[_0x9d90('0x1c')]===_0x9d90('0x1d')&&typeof _0x783172[_0x9d90('0x1e')]===_0x9d90('0x1d');var _0x3e9ba9=_0x1fc38c[_0x9d90('0x1f')];var _0x6d042f=_0x201752?0x0:_0x783172[_0x9d90('0x1c')];var _0x64a9d=_0x201752?_0x1fc38c[_0x9d90('0x1f')]:_0x783172[_0x9d90('0x1c')]+_0x783172[_0x9d90('0x1e')];var _0x4738b7;if(_0x64a9d>=_0x3e9ba9){_0x64a9d=_0x3e9ba9;_0x4738b7=0xc8;}else{_0x4738b7=0xce;}_0x4fd791[_0x9d90('0x1a')](_0x4738b7);return _0x4fd791[_0x9d90('0x20')](_0x9d90('0x21'),_0x6d042f+'-'+_0x64a9d+'/'+_0x3e9ba9)[_0x9d90('0x1b')](_0x1fc38c);}return null;};}function patchUpdates(_0x5e5916){return function(_0x3d4be2){try{jsonpatch[_0x9d90('0x22')](_0x3d4be2,_0x5e5916,!![]);}catch(_0x20f227){return BPromise[_0x9d90('0x23')](_0x20f227);}return _0x3d4be2[_0x9d90('0x24')]();};}function saveUpdates(_0x271b35,_0x3c9f49){return function(_0x12c455){if(_0x12c455){return _0x12c455[_0x9d90('0x25')](_0x271b35)['then'](function(_0x3fd778){return _0x3fd778;});}return null;};}function removeEntity(_0x4882a9,_0x5e8c24){return function(_0xea86c){if(_0xea86c){return _0xea86c['destroy']()[_0x9d90('0x26')](function(){var _0x245327=_0xea86c[_0x9d90('0x27')]({'plain':!![]});var _0x4b6e17='IvrCampaigns';return db[_0x9d90('0x28')]['destroy']({'where':{'type':_0x4b6e17,'resourceId':_0x245327['id']}})[_0x9d90('0x26')](function(){return _0xea86c;});})['then'](function(){_0x4882a9[_0x9d90('0x1a')](0xcc)[_0x9d90('0x29')]();});}};}function handleEntityNotFound(_0x44fde1,_0xf03195){return function(_0x302237){if(!_0x302237){_0x44fde1['sendStatus'](0x194);}return _0x302237;};}function handleError(_0x571e3c,_0x2142ca){_0x2142ca=_0x2142ca||0x1f4;return function(_0x4f8c63){logger['error'](_0x4f8c63[_0x9d90('0x2a')]);if(_0x4f8c63['name']){delete _0x4f8c63[_0x9d90('0x2b')];}_0x571e3c[_0x9d90('0x1a')](_0x2142ca)[_0x9d90('0x2c')](_0x4f8c63);};}exports[_0x9d90('0x2d')]=function(_0x3b76df,_0x58d5eb){var _0x5b4f16={},_0x24445a={},_0x4bc4fc={'count':0x0,'rows':[]};var _0x1c1f9a=_[_0x9d90('0x2e')](db[_0x9d90('0x2f')]['rawAttributes'],function(_0x3a1bdf){return{'name':_0x3a1bdf[_0x9d90('0x30')],'type':_0x3a1bdf[_0x9d90('0x31')][_0x9d90('0x32')]};});_0x24445a[_0x9d90('0x33')]=_['map'](_0x1c1f9a,_0x9d90('0x2b'));_0x24445a['query']=_[_0x9d90('0x34')](_0x3b76df[_0x9d90('0x35')]);_0x24445a[_0x9d90('0x36')]=_[_0x9d90('0x37')](_0x24445a[_0x9d90('0x33')],_0x24445a[_0x9d90('0x35')]);_0x5b4f16[_0x9d90('0x38')]=_[_0x9d90('0x37')](_0x24445a[_0x9d90('0x33')],qs[_0x9d90('0x39')](_0x3b76df[_0x9d90('0x35')][_0x9d90('0x39')]));_0x5b4f16[_0x9d90('0x38')]=_0x5b4f16[_0x9d90('0x38')][_0x9d90('0x3a')]?_0x5b4f16[_0x9d90('0x38')]:_0x24445a[_0x9d90('0x33')];if(!_0x3b76df[_0x9d90('0x35')]['hasOwnProperty']('nolimit')){_0x5b4f16[_0x9d90('0x1e')]=qs['limit'](_0x3b76df[_0x9d90('0x35')][_0x9d90('0x1e')]);_0x5b4f16['offset']=qs[_0x9d90('0x1c')](_0x3b76df[_0x9d90('0x35')][_0x9d90('0x1c')]);}_0x5b4f16['order']=qs[_0x9d90('0x3b')](_0x3b76df[_0x9d90('0x35')][_0x9d90('0x3b')]);_0x5b4f16[_0x9d90('0x3c')]=qs['filters'](_[_0x9d90('0x3d')](_0x3b76df[_0x9d90('0x35')],_0x24445a[_0x9d90('0x36')]),_0x1c1f9a);if(_0x3b76df['query'][_0x9d90('0x3e')]){_0x5b4f16[_0x9d90('0x3c')]=_['merge'](_0x5b4f16['where'],{'$or':_['map'](_0x1c1f9a,function(_0xb5754b){if(_0xb5754b[_0x9d90('0x31')]!==_0x9d90('0x3f')){var _0x95d49a={};_0x95d49a[_0xb5754b[_0x9d90('0x2b')]]={'$like':'%'+_0x3b76df['query'][_0x9d90('0x3e')]+'%'};return _0x95d49a;}})});}_0x5b4f16=_['merge']({},_0x5b4f16,_0x3b76df[_0x9d90('0x40')]);var _0x55a106={'where':_0x5b4f16[_0x9d90('0x3c')]};return db[_0x9d90('0x2f')][_0x9d90('0x1f')](_0x55a106)[_0x9d90('0x26')](function(_0x28e815){_0x4bc4fc[_0x9d90('0x1f')]=_0x28e815;if(_0x3b76df['query']['includeAll']){_0x5b4f16[_0x9d90('0x41')]=[{'all':!![]}];}return db['Campaign']['findAll'](_0x5b4f16);})[_0x9d90('0x26')](function(_0x57a25b){_0x4bc4fc[_0x9d90('0x42')]=_0x57a25b;return _0x4bc4fc;})[_0x9d90('0x26')](respondWithFilteredResult(_0x58d5eb,_0x5b4f16))[_0x9d90('0x43')](handleError(_0x58d5eb,null));};exports[_0x9d90('0x44')]=function(_0x44a3fd,_0xf87a0a){var _0x235ee5={'raw':![],'where':{'id':_0x44a3fd[_0x9d90('0x45')]['id']}},_0x4414de={};_0x4414de['model']=_['keys'](db[_0x9d90('0x2f')][_0x9d90('0x46')]);_0x4414de[_0x9d90('0x35')]=_['keys'](_0x44a3fd[_0x9d90('0x35')]);_0x4414de[_0x9d90('0x36')]=_[_0x9d90('0x37')](_0x4414de[_0x9d90('0x33')],_0x4414de[_0x9d90('0x35')]);_0x235ee5[_0x9d90('0x38')]=_[_0x9d90('0x37')](_0x4414de['model'],qs[_0x9d90('0x39')](_0x44a3fd['query'][_0x9d90('0x39')]));_0x235ee5[_0x9d90('0x38')]=_0x235ee5['attributes'][_0x9d90('0x3a')]?_0x235ee5[_0x9d90('0x38')]:_0x4414de[_0x9d90('0x33')];if(_0x44a3fd[_0x9d90('0x35')][_0x9d90('0x47')]){_0x235ee5[_0x9d90('0x41')]=[{'all':!![]}];}_0x235ee5=_[_0x9d90('0x48')]({},_0x235ee5,_0x44a3fd[_0x9d90('0x40')]);return db[_0x9d90('0x2f')][_0x9d90('0x49')](_0x235ee5)['then'](handleEntityNotFound(_0xf87a0a,null))[_0x9d90('0x26')](respondWithResult(_0xf87a0a,null))['catch'](handleError(_0xf87a0a,null));};exports['create']=function(_0x580b10,_0x3413a8){return db['Campaign'][_0x9d90('0x4a')](_0x580b10[_0x9d90('0x4b')],{})['then'](function(_0xac4fe){var _0x148308=_0x580b10['user'][_0x9d90('0x27')]({'plain':!![]});if(!_0x148308)throw new Error('Unable\x20to\x20retrieve\x20the\x20current\x20user');if(_0x148308[_0x9d90('0x4c')]===_0x9d90('0x4d')){var _0x31ab4c=_0xac4fe[_0x9d90('0x27')]({'plain':!![]});var _0x155f55=_0x9d90('0x4e');return db[_0x9d90('0x4f')]['find']({'where':{'name':_0x155f55,'userProfileId':_0x148308[_0x9d90('0x50')]},'raw':!![]})['then'](function(_0x18f832){if(_0x18f832&&_0x18f832[_0x9d90('0x51')]===0x0){return db['UserProfileResource'][_0x9d90('0x4a')]({'name':_0x31ab4c[_0x9d90('0x2b')],'resourceId':_0x31ab4c['id'],'type':_0x18f832[_0x9d90('0x2b')],'sectionId':_0x18f832['id']},{})[_0x9d90('0x26')](function(){return _0xac4fe;});}else{return _0xac4fe;}})['catch'](function(_0x38589d){logger[_0x9d90('0x52')](_0x9d90('0x53'),_0x38589d);throw _0x38589d;});}return _0xac4fe;})['then'](respondWithResult(_0x3413a8,0xc9))[_0x9d90('0x43')](handleError(_0x3413a8,null));};exports[_0x9d90('0x54')]=function(_0x26c092,_0x3dd6b1){var _0x33ed01={'where':{'id':_0x26c092[_0x9d90('0x45')]['id']}},_0x457868={};_0x457868[_0x9d90('0x33')]=_[_0x9d90('0x34')](db[_0x9d90('0x2f')][_0x9d90('0x46')]);_0x33ed01[_0x9d90('0x38')]=_[_0x9d90('0x37')](_0x457868['model'],qs[_0x9d90('0x39')](_0x26c092[_0x9d90('0x35')][_0x9d90('0x39')]));_0x33ed01[_0x9d90('0x38')]=_0x33ed01[_0x9d90('0x38')][_0x9d90('0x3a')]?_0x33ed01[_0x9d90('0x38')]:_0x457868['model'];if(_0x26c092[_0x9d90('0x35')]['includeAll']){_0x33ed01[_0x9d90('0x41')]=[{'all':!![]}];}_0x33ed01=_[_0x9d90('0x48')]({},_0x33ed01,_0x26c092[_0x9d90('0x40')]);return db[_0x9d90('0x2f')]['find'](_0x33ed01)[_0x9d90('0x26')](handleEntityNotFound(_0x3dd6b1,null))['then'](function(_0x23b0be){if(_0x23b0be){var _0x428a93=_0x23b0be[_0x9d90('0x27')]({'plain':!![]});_0x428a93=qs[_0x9d90('0x55')](_0x428a93,['id',_0x9d90('0x56'),_0x9d90('0x57')]);_0x26c092[_0x9d90('0x4b')]=_[_0x9d90('0x55')](_0x26c092['body'],['id',_0x9d90('0x56'),'updatedAt']);return db[_0x9d90('0x2f')][_0x9d90('0x4a')](_[_0x9d90('0x48')](_0x428a93,_0x26c092[_0x9d90('0x4b')]),{'include':_0x26c092[_0x9d90('0x35')]['includeAll']?[{'all':!![]}]:undefined})[_0x9d90('0x26')](function(_0xad45c0){var _0x47820b=_0x26c092['user'][_0x9d90('0x27')]({'plain':!![]});if(!_0x47820b)throw new Error('Unable\x20to\x20retrieve\x20the\x20current\x20user');if(_0x47820b['role']===_0x9d90('0x4d')){var _0x2fa29b=_0xad45c0['get']({'plain':!![]});var _0x17c206=_0x9d90('0x4e');return db[_0x9d90('0x4f')][_0x9d90('0x49')]({'where':{'name':_0x17c206,'userProfileId':_0x47820b[_0x9d90('0x50')]},'raw':!![]})[_0x9d90('0x26')](function(_0x53a293){if(_0x53a293&&_0x53a293['autoAssociation']===0x0){return db[_0x9d90('0x28')][_0x9d90('0x4a')]({'name':_0x2fa29b['name'],'resourceId':_0x2fa29b['id'],'type':_0x53a293[_0x9d90('0x2b')],'sectionId':_0x53a293['id']},{})[_0x9d90('0x26')](function(){return _0xad45c0;});}else{return _0xad45c0;}})[_0x9d90('0x43')](function(_0x308007){logger[_0x9d90('0x52')](_0x9d90('0x53'),_0x308007);throw _0x308007;});}return _0xad45c0;});}})[_0x9d90('0x26')](respondWithResult(_0x3dd6b1,0xc9))[_0x9d90('0x43')](handleError(_0x3dd6b1,null));};exports['update']=function(_0x3aad51,_0x36c3a6){if(_0x3aad51[_0x9d90('0x4b')]['id']){delete _0x3aad51['body']['id'];}return db[_0x9d90('0x2f')][_0x9d90('0x49')]({'where':{'id':_0x3aad51[_0x9d90('0x45')]['id']}})[_0x9d90('0x26')](handleEntityNotFound(_0x36c3a6,null))[_0x9d90('0x26')](saveUpdates(_0x3aad51[_0x9d90('0x4b')],null))[_0x9d90('0x26')](respondWithResult(_0x36c3a6,null))[_0x9d90('0x43')](handleError(_0x36c3a6,null));};exports[_0x9d90('0x58')]=function(_0xf6d3be,_0x5bb08a){return db[_0x9d90('0x2f')]['find']({'where':{'id':_0xf6d3be[_0x9d90('0x45')]['id']}})[_0x9d90('0x26')](handleEntityNotFound(_0x5bb08a,null))[_0x9d90('0x26')](removeEntity(_0x5bb08a,null))[_0x9d90('0x43')](handleError(_0x5bb08a,null));};exports['getHoppers']=function(_0x5717a9,_0x3a6de5,_0x1cda47){var _0x5c970e={'raw':!![],'where':{}};var _0x105ef9={};var _0x5ef328={'count':0x0,'rows':[]};return db[_0x9d90('0x2f')][_0x9d90('0x59')]({'where':{'id':_0x5717a9[_0x9d90('0x45')]['id']}})['then'](handleEntityNotFound(_0x3a6de5,null))[_0x9d90('0x26')](function(_0x3e1c60){if(_0x3e1c60){_0x105ef9[_0x9d90('0x33')]=_[_0x9d90('0x34')](db['CmHopper'][_0x9d90('0x46')]);_0x105ef9['query']=_[_0x9d90('0x34')](_0x5717a9['query']);_0x105ef9['filters']=_['intersection'](_0x105ef9[_0x9d90('0x33')],_0x105ef9[_0x9d90('0x35')]);_0x5c970e[_0x9d90('0x38')]=_['intersection'](_0x105ef9[_0x9d90('0x33')],qs[_0x9d90('0x39')](_0x5717a9[_0x9d90('0x35')][_0x9d90('0x39')]));_0x5c970e[_0x9d90('0x38')]=_0x5c970e['attributes'][_0x9d90('0x3a')]?_0x5c970e[_0x9d90('0x38')]:_0x105ef9[_0x9d90('0x33')];if(!_0x5717a9['query'][_0x9d90('0x5a')](_0x9d90('0x5b'))){_0x5c970e[_0x9d90('0x1e')]=qs[_0x9d90('0x1e')](_0x5717a9[_0x9d90('0x35')][_0x9d90('0x1e')]);_0x5c970e['offset']=qs[_0x9d90('0x1c')](_0x5717a9[_0x9d90('0x35')][_0x9d90('0x1c')]);}_0x5c970e[_0x9d90('0x5c')]=qs[_0x9d90('0x3b')](_0x5717a9['query'][_0x9d90('0x3b')]);_0x5c970e[_0x9d90('0x3c')]=qs[_0x9d90('0x36')](_[_0x9d90('0x3d')](_0x5717a9[_0x9d90('0x35')],_0x105ef9[_0x9d90('0x36')]));_0x5c970e[_0x9d90('0x3c')][_0x9d90('0x5d')]=_0x3e1c60['id'];if(_0x5717a9[_0x9d90('0x35')]['filter']){_0x5c970e[_0x9d90('0x3c')]=_[_0x9d90('0x48')](_0x5c970e['where'],{'$or':_['map'](_0x5c970e[_0x9d90('0x38')],function(_0x11ac50){var _0x4a4cb5={};_0x4a4cb5[_0x11ac50]={'$like':'%'+_0x5717a9[_0x9d90('0x35')][_0x9d90('0x3e')]+'%'};return _0x4a4cb5;})});}_0x5c970e=_[_0x9d90('0x48')]({},_0x5c970e,_0x5717a9[_0x9d90('0x40')]);return db[_0x9d90('0x5e')][_0x9d90('0x1f')]({'where':_0x5c970e['where']})[_0x9d90('0x26')](function(_0x877a52){_0x5ef328[_0x9d90('0x1f')]=_0x877a52;if(_0x5717a9['query'][_0x9d90('0x47')]){_0x5c970e[_0x9d90('0x41')]=[{'all':!![]}];}return db[_0x9d90('0x5e')][_0x9d90('0x5f')](_0x5c970e);})[_0x9d90('0x26')](function(_0x2374ed){_0x5ef328[_0x9d90('0x42')]=_0x2374ed;return _0x5ef328;});}})['then'](respondWithFilteredResult(_0x3a6de5,_0x5c970e))['catch'](handleError(_0x3a6de5,null));};exports[_0x9d90('0x60')]=function(_0x4dc48a,_0x58b7bf,_0x315eea){var _0x417370={'raw':!![],'where':{}};var _0x2713c4={};var _0x539dbe={'count':0x0,'rows':[]};return db[_0x9d90('0x2f')][_0x9d90('0x59')]({'where':{'id':_0x4dc48a[_0x9d90('0x45')]['id']}})[_0x9d90('0x26')](handleEntityNotFound(_0x58b7bf,null))[_0x9d90('0x26')](function(_0xf8236d){if(_0xf8236d){_0x2713c4[_0x9d90('0x33')]=_['keys'](db[_0x9d90('0x61')][_0x9d90('0x46')]);_0x2713c4['query']=_[_0x9d90('0x34')](_0x4dc48a[_0x9d90('0x35')]);_0x2713c4['filters']=_[_0x9d90('0x37')](_0x2713c4[_0x9d90('0x33')],_0x2713c4['query']);_0x417370[_0x9d90('0x38')]=_['intersection'](_0x2713c4['model'],qs[_0x9d90('0x39')](_0x4dc48a['query'][_0x9d90('0x39')]));_0x417370[_0x9d90('0x38')]=_0x417370[_0x9d90('0x38')][_0x9d90('0x3a')]?_0x417370[_0x9d90('0x38')]:_0x2713c4[_0x9d90('0x33')];if(!_0x4dc48a[_0x9d90('0x35')][_0x9d90('0x5a')]('nolimit')){_0x417370['limit']=qs[_0x9d90('0x1e')](_0x4dc48a[_0x9d90('0x35')][_0x9d90('0x1e')]);_0x417370[_0x9d90('0x1c')]=qs[_0x9d90('0x1c')](_0x4dc48a[_0x9d90('0x35')][_0x9d90('0x1c')]);}_0x417370[_0x9d90('0x5c')]=qs[_0x9d90('0x3b')](_0x4dc48a[_0x9d90('0x35')][_0x9d90('0x3b')]);_0x417370[_0x9d90('0x3c')]=qs[_0x9d90('0x36')](_[_0x9d90('0x3d')](_0x4dc48a[_0x9d90('0x35')],_0x2713c4['filters']));_0x417370['where'][_0x9d90('0x5d')]=_0xf8236d['id'];if(_0x4dc48a[_0x9d90('0x35')][_0x9d90('0x3e')]){_0x417370[_0x9d90('0x3c')]=_[_0x9d90('0x48')](_0x417370['where'],{'$or':_[_0x9d90('0x2e')](_0x417370[_0x9d90('0x38')],function(_0x38b128){var _0x5df62f={};_0x5df62f[_0x38b128]={'$like':'%'+_0x4dc48a[_0x9d90('0x35')][_0x9d90('0x3e')]+'%'};return _0x5df62f;})});}_0x417370=_[_0x9d90('0x48')]({},_0x417370,_0x4dc48a[_0x9d90('0x40')]);return db[_0x9d90('0x61')][_0x9d90('0x1f')]({'where':_0x417370[_0x9d90('0x3c')]})[_0x9d90('0x26')](function(_0x456f9d){_0x539dbe['count']=_0x456f9d;if(_0x4dc48a[_0x9d90('0x35')][_0x9d90('0x47')]){_0x417370[_0x9d90('0x41')]=[{'all':!![]}];}return db[_0x9d90('0x61')]['findAll'](_0x417370);})[_0x9d90('0x26')](function(_0x46a0af){_0x539dbe[_0x9d90('0x42')]=_0x46a0af;return _0x539dbe;});}})['then'](respondWithFilteredResult(_0x58b7bf,_0x417370))['catch'](handleError(_0x58b7bf,null));};exports[_0x9d90('0x62')]=function(_0x1a8f45,_0x54da2e,_0x2710d1){var _0x5f092d={'raw':!![],'where':{}};var _0x4ce566={};var _0x2e9007={'count':0x0,'rows':[]};return db[_0x9d90('0x2f')][_0x9d90('0x59')]({'where':{'id':_0x1a8f45[_0x9d90('0x45')]['id']}})[_0x9d90('0x26')](handleEntityNotFound(_0x54da2e,null))[_0x9d90('0x26')](function(_0x2114a9){if(_0x2114a9){_0x4ce566[_0x9d90('0x33')]=_['keys'](db['CmHopperFinal'][_0x9d90('0x46')]);_0x4ce566[_0x9d90('0x35')]=_[_0x9d90('0x34')](_0x1a8f45['query']);_0x4ce566[_0x9d90('0x36')]=_['intersection'](_0x4ce566['model'],_0x4ce566['query']);_0x5f092d[_0x9d90('0x38')]=_[_0x9d90('0x37')](_0x4ce566[_0x9d90('0x33')],qs['fields'](_0x1a8f45[_0x9d90('0x35')]['fields']));_0x5f092d[_0x9d90('0x38')]=_0x5f092d[_0x9d90('0x38')]['length']?_0x5f092d['attributes']:_0x4ce566['model'];if(!_0x1a8f45['query']['hasOwnProperty']('nolimit')){_0x5f092d[_0x9d90('0x1e')]=qs[_0x9d90('0x1e')](_0x1a8f45[_0x9d90('0x35')][_0x9d90('0x1e')]);_0x5f092d[_0x9d90('0x1c')]=qs['offset'](_0x1a8f45[_0x9d90('0x35')][_0x9d90('0x1c')]);}_0x5f092d[_0x9d90('0x5c')]=qs[_0x9d90('0x3b')](_0x1a8f45[_0x9d90('0x35')]['sort']);_0x5f092d[_0x9d90('0x3c')]=qs[_0x9d90('0x36')](_[_0x9d90('0x3d')](_0x1a8f45['query'],_0x4ce566[_0x9d90('0x36')]));_0x5f092d[_0x9d90('0x3c')][_0x9d90('0x5d')]=_0x2114a9['id'];if(_0x1a8f45[_0x9d90('0x35')][_0x9d90('0x3e')]){_0x5f092d[_0x9d90('0x3c')]=_['merge'](_0x5f092d[_0x9d90('0x3c')],{'$or':_[_0x9d90('0x2e')](_0x5f092d[_0x9d90('0x38')],function(_0x2715d6){var _0x5f27f9={};_0x5f27f9[_0x2715d6]={'$like':'%'+_0x1a8f45[_0x9d90('0x35')][_0x9d90('0x3e')]+'%'};return _0x5f27f9;})});}_0x5f092d=_[_0x9d90('0x48')]({},_0x5f092d,_0x1a8f45[_0x9d90('0x40')]);return db[_0x9d90('0x63')]['count']({'where':_0x5f092d[_0x9d90('0x3c')]})[_0x9d90('0x26')](function(_0x18880d){_0x2e9007[_0x9d90('0x1f')]=_0x18880d;if(_0x1a8f45[_0x9d90('0x35')][_0x9d90('0x47')]){_0x5f092d[_0x9d90('0x41')]=[{'all':!![]}];}return db[_0x9d90('0x63')][_0x9d90('0x5f')](_0x5f092d);})['then'](function(_0x6a28e3){_0x2e9007[_0x9d90('0x42')]=_0x6a28e3;return _0x2e9007;});}})[_0x9d90('0x26')](respondWithFilteredResult(_0x54da2e,_0x5f092d))['catch'](handleError(_0x54da2e,null));};exports['getHopperBlacks']=function(_0xc72aa1,_0x36d278,_0xea5b94){var _0x43c0bc={'raw':!![],'where':{}};var _0x244120={};var _0x6c2092={'count':0x0,'rows':[]};return db[_0x9d90('0x2f')][_0x9d90('0x59')]({'where':{'id':_0xc72aa1[_0x9d90('0x45')]['id']}})[_0x9d90('0x26')](handleEntityNotFound(_0x36d278,null))[_0x9d90('0x26')](function(_0x1f788b){if(_0x1f788b){_0x244120[_0x9d90('0x33')]=_[_0x9d90('0x34')](db[_0x9d90('0x64')][_0x9d90('0x46')]);_0x244120[_0x9d90('0x35')]=_[_0x9d90('0x34')](_0xc72aa1[_0x9d90('0x35')]);_0x244120['filters']=_[_0x9d90('0x37')](_0x244120['model'],_0x244120[_0x9d90('0x35')]);_0x43c0bc[_0x9d90('0x38')]=_[_0x9d90('0x37')](_0x244120[_0x9d90('0x33')],qs['fields'](_0xc72aa1[_0x9d90('0x35')][_0x9d90('0x39')]));_0x43c0bc[_0x9d90('0x38')]=_0x43c0bc['attributes'][_0x9d90('0x3a')]?_0x43c0bc[_0x9d90('0x38')]:_0x244120[_0x9d90('0x33')];if(!_0xc72aa1[_0x9d90('0x35')][_0x9d90('0x5a')](_0x9d90('0x5b'))){_0x43c0bc['limit']=qs['limit'](_0xc72aa1[_0x9d90('0x35')][_0x9d90('0x1e')]);_0x43c0bc[_0x9d90('0x1c')]=qs[_0x9d90('0x1c')](_0xc72aa1['query'][_0x9d90('0x1c')]);}_0x43c0bc[_0x9d90('0x5c')]=qs[_0x9d90('0x3b')](_0xc72aa1['query'][_0x9d90('0x3b')]);_0x43c0bc[_0x9d90('0x3c')]=qs[_0x9d90('0x36')](_['pick'](_0xc72aa1[_0x9d90('0x35')],_0x244120[_0x9d90('0x36')]));_0x43c0bc[_0x9d90('0x3c')][_0x9d90('0x5d')]=_0x1f788b['id'];if(_0xc72aa1['query'][_0x9d90('0x3e')]){_0x43c0bc[_0x9d90('0x3c')]=_[_0x9d90('0x48')](_0x43c0bc['where'],{'$or':_[_0x9d90('0x2e')](_0x43c0bc[_0x9d90('0x38')],function(_0x2ee9aa){var _0x1a4cbc={};_0x1a4cbc[_0x2ee9aa]={'$like':'%'+_0xc72aa1['query'][_0x9d90('0x3e')]+'%'};return _0x1a4cbc;})});}_0x43c0bc=_[_0x9d90('0x48')]({},_0x43c0bc,_0xc72aa1[_0x9d90('0x40')]);return db[_0x9d90('0x64')]['count']({'where':_0x43c0bc['where']})[_0x9d90('0x26')](function(_0x4bce9b){_0x6c2092['count']=_0x4bce9b;if(_0xc72aa1[_0x9d90('0x35')][_0x9d90('0x47')]){_0x43c0bc['include']=[{'all':!![]}];}return db[_0x9d90('0x64')][_0x9d90('0x5f')](_0x43c0bc);})[_0x9d90('0x26')](function(_0x3d0aad){_0x6c2092['rows']=_0x3d0aad;return _0x6c2092;});}})[_0x9d90('0x26')](respondWithFilteredResult(_0x36d278,_0x43c0bc))[_0x9d90('0x43')](handleError(_0x36d278,null));};exports[_0x9d90('0x65')]=function(_0x5e7e47,_0x3d8cd1,_0x30bf1b){var _0x5c9109={};var _0x4c57e0={};var _0x32f81c;var _0x37bf78;return db['Campaign'][_0x9d90('0x59')]({'where':{'id':_0x5e7e47[_0x9d90('0x45')]['id']}})[_0x9d90('0x26')](handleEntityNotFound(_0x3d8cd1,null))['then'](function(_0x57b8fb){if(_0x57b8fb){_0x32f81c=_0x57b8fb;_0x4c57e0['model']=_[_0x9d90('0x34')](db['CmList'][_0x9d90('0x46')]);_0x4c57e0[_0x9d90('0x35')]=_[_0x9d90('0x34')](_0x5e7e47['query']);_0x4c57e0[_0x9d90('0x36')]=_['intersection'](_0x4c57e0['model'],_0x4c57e0[_0x9d90('0x35')]);_0x5c9109[_0x9d90('0x38')]=_[_0x9d90('0x37')](_0x4c57e0[_0x9d90('0x33')],qs[_0x9d90('0x39')](_0x5e7e47['query'][_0x9d90('0x39')]));_0x5c9109['attributes']=_0x5c9109['attributes'][_0x9d90('0x3a')]?_0x5c9109['attributes']:_0x4c57e0[_0x9d90('0x33')];_0x5c9109[_0x9d90('0x5c')]=qs[_0x9d90('0x3b')](_0x5e7e47[_0x9d90('0x35')][_0x9d90('0x3b')]);_0x5c9109[_0x9d90('0x3c')]=qs[_0x9d90('0x36')](_['pick'](_0x5e7e47['query'],_0x4c57e0[_0x9d90('0x36')]));if(_0x5e7e47[_0x9d90('0x35')][_0x9d90('0x3e')]){_0x5c9109[_0x9d90('0x3c')]=_[_0x9d90('0x48')](_0x5c9109[_0x9d90('0x3c')],{'$or':_[_0x9d90('0x2e')](_0x5c9109['attributes'],function(_0x14bdef){var _0x128813={};_0x128813[_0x14bdef]={'$like':'%'+_0x5e7e47[_0x9d90('0x35')][_0x9d90('0x3e')]+'%'};return _0x128813;})});}_0x5c9109=_[_0x9d90('0x48')]({},_0x5c9109,_0x5e7e47['options']);return _0x32f81c['getLists'](_0x5c9109);}})[_0x9d90('0x26')](function(_0x5d1e36){if(_0x5d1e36){_0x37bf78=_0x5d1e36[_0x9d90('0x3a')];if(!_0x5e7e47[_0x9d90('0x35')][_0x9d90('0x5a')](_0x9d90('0x5b'))){_0x5c9109[_0x9d90('0x1e')]=qs[_0x9d90('0x1e')](_0x5e7e47[_0x9d90('0x35')][_0x9d90('0x1e')]);_0x5c9109[_0x9d90('0x1c')]=qs[_0x9d90('0x1c')](_0x5e7e47['query'][_0x9d90('0x1c')]);}return _0x32f81c['getLists'](_0x5c9109);}})[_0x9d90('0x26')](function(_0xa322db){if(_0xa322db){return _0xa322db?{'count':_0x37bf78,'rows':_0xa322db}:null;}})[_0x9d90('0x26')](respondWithResult(_0x3d8cd1,null))[_0x9d90('0x43')](handleError(_0x3d8cd1,null));};exports[_0x9d90('0x66')]=function(_0x3e8236,_0xb5d86f,_0x2e2470){var _0xe18f8c,_0x2cf40d;var _0x1a82f1=[];var _0x2d08b7=moment()[_0x9d90('0x67')](_0x9d90('0x68'));return db[_0x9d90('0x2f')]['find']({'where':{'id':_0x3e8236[_0x9d90('0x45')]['id']}})['then'](handleEntityNotFound(_0xb5d86f,null))[_0x9d90('0x26')](function(_0x1884ff){if(_0x1884ff){_0x2cf40d=_0x1884ff;return _0x1884ff[_0x9d90('0x66')](_0x3e8236[_0x9d90('0x4b')][_0x9d90('0x69')],_[_0x9d90('0x55')](_0x3e8236['body'],[_0x9d90('0x69'),'id'])||{});}return null;})[_0x9d90('0x6a')](function(_0x69c69c){var _0x226aa0;var _0x1cc2c7;_0xe18f8c=_0x69c69c||[];var _0x23fbb3=[];if(_0x69c69c){for(var _0x125090=0x0;_0x125090<_0x69c69c[_0x9d90('0x3a')];_0x125090+=0x1){var _0x4a5648=_0x69c69c[_0x125090]['get']({'plain':!![]});_0x2cf40d[_0x9d90('0x6b')]=_0x3e8236[_0x9d90('0x4b')][_0x9d90('0x6b')]?_0x3e8236[_0x9d90('0x4b')][_0x9d90('0x6b')]:_0x2cf40d[_0x9d90('0x6b')];switch(_0x2cf40d['dialCheckDuplicateType']){case _0x9d90('0x6c'):_0x226aa0=squel['insert']()['into'](_0x9d90('0x6d'))[_0x9d90('0x6e')]([_0x9d90('0x6f'),_0x9d90('0x70'),_0x9d90('0x71'),_0x9d90('0x72'),_0x9d90('0x5d'),'createdAt',_0x9d90('0x57')],squel[_0x9d90('0x73')]()[_0x9d90('0x74')](_0x9d90('0x6f'),'phone')['field'](_0x9d90('0x75'),_0x9d90('0x70'))[_0x9d90('0x74')]('id',_0x9d90('0x71'))['field'](_0x4a5648[_0x9d90('0x76')][_0x9d90('0x77')](),_0x9d90('0x72'))[_0x9d90('0x74')](_0x3e8236['params']['id'][_0x9d90('0x77')](),_0x9d90('0x5d'))[_0x9d90('0x74')]('\x27'+_0x2d08b7+'\x27',_0x9d90('0x56'))[_0x9d90('0x74')]('\x27'+_0x2d08b7+'\x27',_0x9d90('0x57'))[_0x9d90('0x78')](_0x9d90('0x79'))[_0x9d90('0x3c')](_0x9d90('0x7a'))[_0x9d90('0x3c')](_0x9d90('0x7b'),_0x4a5648[_0x9d90('0x76')][_0x9d90('0x77')]())[_0x9d90('0x3c')]('phone\x20IS\x20NOT\x20NULL')[_0x9d90('0x3c')](_0x9d90('0x7c'),squel[_0x9d90('0x73')]()[_0x9d90('0x74')](_0x9d90('0x7d'))[_0x9d90('0x78')](_0x9d90('0x7e'))[_0x9d90('0x3c')](_0x9d90('0x7f'),_0x3e8236[_0x9d90('0x45')]['id'][_0x9d90('0x77')]()))[_0x9d90('0x3c')](_0x9d90('0x7c'),squel[_0x9d90('0x73')]()[_0x9d90('0x74')](_0x9d90('0x80'))['from']('cm_hopper')[_0x9d90('0x3c')]('CampaignId\x20=\x20?',_0x3e8236[_0x9d90('0x45')]['id'][_0x9d90('0x77')]())))[_0x9d90('0x77')]();break;case _0x9d90('0x81'):_0x226aa0=squel['insert']()['into'](_0x9d90('0x6d'))[_0x9d90('0x6e')](['phone','scheduledAt',_0x9d90('0x71'),_0x9d90('0x72'),_0x9d90('0x5d'),_0x9d90('0x56'),'updatedAt'],squel[_0x9d90('0x73')]()[_0x9d90('0x74')]('phone',_0x9d90('0x6f'))[_0x9d90('0x74')](_0x9d90('0x75'),'scheduledAt')[_0x9d90('0x74')]('id',_0x9d90('0x71'))[_0x9d90('0x74')](_0x4a5648['CmListId'][_0x9d90('0x77')](),_0x9d90('0x72'))[_0x9d90('0x74')](_0x3e8236[_0x9d90('0x45')]['id'][_0x9d90('0x77')](),'CampaignId')[_0x9d90('0x74')]('\x27'+_0x2d08b7+'\x27',_0x9d90('0x56'))['field']('\x27'+_0x2d08b7+'\x27',_0x9d90('0x57'))[_0x9d90('0x78')](_0x9d90('0x79'))[_0x9d90('0x3c')](_0x9d90('0x7a'))[_0x9d90('0x3c')](_0x9d90('0x7b'),_0x4a5648['CmListId']['toString']())[_0x9d90('0x3c')](_0x9d90('0x82'))[_0x9d90('0x3c')](_0x9d90('0x7c'),squel[_0x9d90('0x73')]()[_0x9d90('0x74')]('COALESCE(phone,\x27\x27)')[_0x9d90('0x78')]('cm_hopper')['where']('CampaignId\x20=\x20?',_0x3e8236[_0x9d90('0x45')]['id'][_0x9d90('0x77')]())))[_0x9d90('0x77')]();break;default:_0x226aa0=squel[_0x9d90('0x83')]()[_0x9d90('0x84')](_0x9d90('0x6d'))['fromQuery'](['phone','scheduledAt',_0x9d90('0x71'),_0x9d90('0x72'),_0x9d90('0x5d'),_0x9d90('0x56'),_0x9d90('0x57')],squel[_0x9d90('0x73')]()[_0x9d90('0x74')](_0x9d90('0x6f'),_0x9d90('0x6f'))[_0x9d90('0x74')](_0x9d90('0x75'),_0x9d90('0x70'))['field']('id',_0x9d90('0x71'))[_0x9d90('0x74')](_0x4a5648[_0x9d90('0x76')][_0x9d90('0x77')](),_0x9d90('0x72'))[_0x9d90('0x74')](_0x3e8236['params']['id'][_0x9d90('0x77')](),_0x9d90('0x5d'))[_0x9d90('0x74')]('\x27'+_0x2d08b7+'\x27',_0x9d90('0x56'))[_0x9d90('0x74')]('\x27'+_0x2d08b7+'\x27',_0x9d90('0x57'))['from']('cm_contacts')['where'](_0x9d90('0x7a'))['where'](_0x9d90('0x7b'),_0x4a5648[_0x9d90('0x76')][_0x9d90('0x77')]())[_0x9d90('0x3c')](_0x9d90('0x82')))['toString']();}_0x1cc2c7=squel[_0x9d90('0x83')]()[_0x9d90('0x84')](_0x9d90('0x85'))[_0x9d90('0x6e')]([_0x9d90('0x86'),_0x9d90('0x70'),_0x9d90('0x6f'),_0x9d90('0x87'),_0x9d90('0x56'),_0x9d90('0x57')],squel[_0x9d90('0x73')]()['field'](_0x9d90('0x88'),'id')[_0x9d90('0x74')](_0x9d90('0x75'),_0x9d90('0x70'))[_0x9d90('0x74')](_0x9d90('0x89'),_0x9d90('0x6f'))[_0x9d90('0x74')](_0x9d90('0x8a'),_0x9d90('0x87'))['field']('\x27'+_0x2d08b7+'\x27',_0x9d90('0x56'))[_0x9d90('0x74')]('\x27'+_0x2d08b7+'\x27',_0x9d90('0x57'))[_0x9d90('0x78')]('cm_contact_has_items','ci')[_0x9d90('0x8b')](_0x9d90('0x6d'),'h',_0x9d90('0x8c'))[_0x9d90('0x3c')](_0x9d90('0x8d'),_0x4a5648['CmListId'][_0x9d90('0x77')]())[_0x9d90('0x3c')](_0x9d90('0x8e'),_0x3e8236['params']['id'][_0x9d90('0x77')]())[_0x9d90('0x3c')]('h.createdAt\x20=\x20?',_0x2d08b7))[_0x9d90('0x77')]();_0x23fbb3[_0x9d90('0x8f')](db[_0x9d90('0x90')][_0x9d90('0x35')](_0x226aa0));_0x1a82f1[_0x9d90('0x8f')](db[_0x9d90('0x90')][_0x9d90('0x35')](_0x1cc2c7));}return BPromise[_0x9d90('0x91')](_0x23fbb3);}})[_0x9d90('0x26')](function(){return BPromise[_0x9d90('0x91')](_0x1a82f1);})[_0x9d90('0x26')](function(){return _0xe18f8c;})['then'](respondWithResult(_0xb5d86f,null))[_0x9d90('0x43')](handleError(_0xb5d86f,null));};exports[_0x9d90('0x92')]=function(_0x2e4f4f,_0x3fd2b7,_0x59e701){return db['Campaign']['find']({'where':{'id':_0x2e4f4f[_0x9d90('0x45')]['id']}})[_0x9d90('0x26')](handleEntityNotFound(_0x3fd2b7,null))[_0x9d90('0x26')](function(_0x520747){if(_0x520747){return _0x520747[_0x9d90('0x92')](_0x2e4f4f['query'][_0x9d90('0x69')]);}})[_0x9d90('0x26')](function(_0x2adc50){if(_0x2adc50){return db['CmHopper'][_0x9d90('0x58')]({'where':{'ListId':_0x2e4f4f[_0x9d90('0x35')][_0x9d90('0x69')],'CampaignId':_0x2e4f4f[_0x9d90('0x45')]['id']}})[_0x9d90('0x26')](function(){return _0x2adc50;});}})[_0x9d90('0x26')](respondWithStatusCode(_0x3fd2b7,null))['catch'](handleError(_0x3fd2b7,null));};exports[_0x9d90('0x93')]=function(_0x3a1aef,_0x43310a,_0x5a4888){var _0x3d025d={};var _0x5e4674={};var _0x318841;var _0x505237;return db[_0x9d90('0x2f')][_0x9d90('0x59')]({'where':{'id':_0x3a1aef[_0x9d90('0x45')]['id']}})[_0x9d90('0x26')](handleEntityNotFound(_0x43310a,null))[_0x9d90('0x26')](function(_0xb820f0){if(_0xb820f0){_0x318841=_0xb820f0;_0x5e4674[_0x9d90('0x33')]=_[_0x9d90('0x34')](db['CmList'][_0x9d90('0x46')]);_0x5e4674[_0x9d90('0x35')]=_[_0x9d90('0x34')](_0x3a1aef[_0x9d90('0x35')]);_0x5e4674[_0x9d90('0x36')]=_['intersection'](_0x5e4674[_0x9d90('0x33')],_0x5e4674[_0x9d90('0x35')]);_0x3d025d['attributes']=_[_0x9d90('0x37')](_0x5e4674[_0x9d90('0x33')],qs[_0x9d90('0x39')](_0x3a1aef[_0x9d90('0x35')][_0x9d90('0x39')]));_0x3d025d[_0x9d90('0x38')]=_0x3d025d['attributes']['length']?_0x3d025d[_0x9d90('0x38')]:_0x5e4674['model'];_0x3d025d[_0x9d90('0x5c')]=qs[_0x9d90('0x3b')](_0x3a1aef[_0x9d90('0x35')][_0x9d90('0x3b')]);_0x3d025d[_0x9d90('0x3c')]=qs[_0x9d90('0x36')](_[_0x9d90('0x3d')](_0x3a1aef[_0x9d90('0x35')],_0x5e4674['filters']));if(_0x3a1aef[_0x9d90('0x35')]['filter']){_0x3d025d[_0x9d90('0x3c')]=_[_0x9d90('0x48')](_0x3d025d['where'],{'$or':_[_0x9d90('0x2e')](_0x3d025d[_0x9d90('0x38')],function(_0x2853a2){var _0x4cea39={};_0x4cea39[_0x2853a2]={'$like':'%'+_0x3a1aef[_0x9d90('0x35')][_0x9d90('0x3e')]+'%'};return _0x4cea39;})});}_0x3d025d=_[_0x9d90('0x48')]({},_0x3d025d,_0x3a1aef['options']);return _0x318841[_0x9d90('0x93')](_0x3d025d);}})[_0x9d90('0x26')](function(_0x11a1bc){if(_0x11a1bc){_0x505237=_0x11a1bc[_0x9d90('0x3a')];if(!_0x3a1aef[_0x9d90('0x35')][_0x9d90('0x5a')](_0x9d90('0x5b'))){_0x3d025d[_0x9d90('0x1e')]=qs[_0x9d90('0x1e')](_0x3a1aef['query'][_0x9d90('0x1e')]);_0x3d025d[_0x9d90('0x1c')]=qs[_0x9d90('0x1c')](_0x3a1aef[_0x9d90('0x35')]['offset']);}return _0x318841['getBlackLists'](_0x3d025d);}})[_0x9d90('0x26')](function(_0x241c2c){if(_0x241c2c){return _0x241c2c?{'count':_0x505237,'rows':_0x241c2c}:null;}})[_0x9d90('0x26')](respondWithResult(_0x43310a,null))[_0x9d90('0x43')](handleError(_0x43310a,null));};exports[_0x9d90('0x94')]=function(_0x4914ee,_0x167ced,_0x1f3e95){var _0x46b04b,_0x38a77f;var _0x1810cc=[];var _0x218150=moment()[_0x9d90('0x67')](_0x9d90('0x68'));return db['Campaign'][_0x9d90('0x49')]({'where':{'id':_0x4914ee['params']['id']}})['then'](handleEntityNotFound(_0x167ced,null))['then'](function(_0x4d2ea4){if(_0x4d2ea4){_0x38a77f=_0x4d2ea4;return _0x4d2ea4[_0x9d90('0x94')](_0x4914ee[_0x9d90('0x4b')][_0x9d90('0x69')],_[_0x9d90('0x55')](_0x4914ee['body'],[_0x9d90('0x69'),'id'])||{});}return null;})[_0x9d90('0x6a')](function(_0xa4d83c){var _0x24abfc;var _0x4a2863;_0x46b04b=_0xa4d83c||[];var _0xf88e4e=[];if(_0xa4d83c){for(var _0xcdc741=0x0;_0xcdc741<_0xa4d83c[_0x9d90('0x3a')];_0xcdc741+=0x1){var _0x2e8f32=_0xa4d83c[_0xcdc741][_0x9d90('0x27')]({'plain':!![]});_0x24abfc=squel[_0x9d90('0x83')]()[_0x9d90('0x84')](_0x9d90('0x95'))[_0x9d90('0x6e')]([_0x9d90('0x6f'),_0x9d90('0x71'),_0x9d90('0x72'),_0x9d90('0x5d'),_0x9d90('0x56'),_0x9d90('0x57')],squel[_0x9d90('0x73')]()[_0x9d90('0x74')](_0x9d90('0x6f'),_0x9d90('0x6f'))[_0x9d90('0x74')]('id','ContactId')['field'](_0x2e8f32[_0x9d90('0x76')][_0x9d90('0x77')](),_0x9d90('0x72'))[_0x9d90('0x74')](_0x4914ee[_0x9d90('0x45')]['id'][_0x9d90('0x77')](),_0x9d90('0x5d'))[_0x9d90('0x74')](_0x9d90('0x75'),'createdAt')[_0x9d90('0x74')]('NOW()','updatedAt')[_0x9d90('0x78')](_0x9d90('0x79'))[_0x9d90('0x3c')]('deletedAt\x20IS\x20NULL')[_0x9d90('0x3c')](_0x9d90('0x7b'),_0x2e8f32[_0x9d90('0x76')][_0x9d90('0x77')]())['where'](_0x9d90('0x82')))['toString']();_0xf88e4e[_0x9d90('0x8f')](db[_0x9d90('0x90')][_0x9d90('0x35')](_0x24abfc));}return BPromise[_0x9d90('0x91')](_0xf88e4e);}})[_0x9d90('0x26')](function(){return _0x46b04b;})[_0x9d90('0x26')](respondWithResult(_0x167ced,null))['catch'](handleError(_0x167ced,null));};exports['removeBlackLists']=function(_0x51ab48,_0x5343d0,_0x16414b){return db[_0x9d90('0x2f')][_0x9d90('0x49')]({'where':{'id':_0x51ab48[_0x9d90('0x45')]['id']}})[_0x9d90('0x26')](handleEntityNotFound(_0x5343d0,null))[_0x9d90('0x26')](function(_0x5564c0){if(_0x5564c0){return _0x5564c0[_0x9d90('0x96')](_0x51ab48[_0x9d90('0x35')][_0x9d90('0x69')]);}})[_0x9d90('0x26')](function(_0x504dbb){if(_0x504dbb){return db[_0x9d90('0x64')]['destroy']({'where':{'ListId':_0x51ab48[_0x9d90('0x35')][_0x9d90('0x69')],'CampaignId':_0x51ab48[_0x9d90('0x45')]['id']}})[_0x9d90('0x26')](function(){return _0x504dbb;});}})[_0x9d90('0x26')](respondWithStatusCode(_0x5343d0,null))[_0x9d90('0x43')](handleError(_0x5343d0,null));}; \ No newline at end of file diff --git a/server/api/campaign/campaign.model.js b/server/api/campaign/campaign.model.js index 9d03090..0245ec9 100644 --- a/server/api/campaign/campaign.model.js +++ b/server/api/campaign/campaign.model.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x9957=['exports','define','Campaign','lodash','util','../../config/logger','api','bluebird','request-promise','path','rimraf','./campaign.attributes'];(function(_0x368fb9,_0x1a9895){var _0x4892fb=function(_0x28d735){while(--_0x28d735){_0x368fb9['push'](_0x368fb9['shift']());}};_0x4892fb(++_0x1a9895);}(_0x9957,0x93));var _0x7995=function(_0x3947c9,_0x4d6c97){_0x3947c9=_0x3947c9-0x0;var _0x2e7871=_0x9957[_0x3947c9];return _0x2e7871;};'use strict';var _=require(_0x7995('0x0'));var util=require(_0x7995('0x1'));var logger=require(_0x7995('0x2'))(_0x7995('0x3'));var moment=require('moment');var BPromise=require(_0x7995('0x4'));var rp=require(_0x7995('0x5'));var fs=require('fs');var path=require(_0x7995('0x6'));var rimraf=require(_0x7995('0x7'));var config=require('../../config/environment');var attributes=require(_0x7995('0x8'));module[_0x7995('0x9')]=function(_0x137b6b,_0x219534){return _0x137b6b[_0x7995('0xa')](_0x7995('0xb'),attributes,{'tableName':'campaigns','paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file +var _0x7a54=['../../config/logger','moment','bluebird','path','rimraf','../../config/environment','./campaign.attributes','exports','Campaign','campaigns','lodash','util'];(function(_0x556d11,_0xa8cb9){var _0x144975=function(_0x1c2f08){while(--_0x1c2f08){_0x556d11['push'](_0x556d11['shift']());}};_0x144975(++_0xa8cb9);}(_0x7a54,0x106));var _0x47a5=function(_0x50c1a8,_0x3e601d){_0x50c1a8=_0x50c1a8-0x0;var _0x257fa0=_0x7a54[_0x50c1a8];return _0x257fa0;};'use strict';var _=require(_0x47a5('0x0'));var util=require(_0x47a5('0x1'));var logger=require(_0x47a5('0x2'))('api');var moment=require(_0x47a5('0x3'));var BPromise=require(_0x47a5('0x4'));var rp=require('request-promise');var fs=require('fs');var path=require(_0x47a5('0x5'));var rimraf=require(_0x47a5('0x6'));var config=require(_0x47a5('0x7'));var attributes=require(_0x47a5('0x8'));module[_0x47a5('0x9')]=function(_0x545a97,_0x3d5629){return _0x545a97['define'](_0x47a5('0xa'),attributes,{'tableName':_0x47a5('0xb'),'paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file diff --git a/server/api/campaign/campaign.rpc.js b/server/api/campaign/campaign.rpc.js index 3c45b80..fcf288d 100644 --- a/server/api/campaign/campaign.rpc.js +++ b/server/api/campaign/campaign.rpc.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x54f3=['attributes','stringify','util','moment','bluebird','randomstring','ioredis','../../config/logger','rpc','../../config/environment','http','then','info','Campaign,\x20%s,\x20%s','Campaign,\x20%s,\x20%s,\x20%s','request\x20sent','error','message','catch','GetCampaign','Campaign','findAll','options','include','map','model'];(function(_0x3107ee,_0x2d2249){var _0x98de80=function(_0x56321d){while(--_0x56321d){_0x3107ee['push'](_0x3107ee['shift']());}};_0x98de80(++_0x2d2249);}(_0x54f3,0x120));var _0x354f=function(_0x46e363,_0x45d7e2){_0x46e363=_0x46e363-0x0;var _0x3fb059=_0x54f3[_0x46e363];return _0x3fb059;};'use strict';var _=require('lodash');var util=require(_0x354f('0x0'));var moment=require(_0x354f('0x1'));var BPromise=require(_0x354f('0x2'));var rs=require(_0x354f('0x3'));var fs=require('fs');var Redis=require(_0x354f('0x4'));var db=require('../../mysqldb')['db'];var utils=require('../../config/utils');var logger=require(_0x354f('0x5'))(_0x354f('0x6'));var config=require(_0x354f('0x7'));var jayson=require('jayson/promise');var client=jayson['client'][_0x354f('0x8')]({'port':0x232a});function respondWithRpcPromise(_0x51cd16,_0x1da503,_0x4311ad){return new BPromise(function(_0x2f111a,_0x173e1d){return client['request'](_0x51cd16,_0x4311ad)[_0x354f('0x9')](function(_0x5d1e5d){logger[_0x354f('0xa')](_0x354f('0xb'),_0x1da503,'request\x20sent');logger['debug'](_0x354f('0xc'),_0x1da503,_0x354f('0xd'),JSON['stringify'](_0x5d1e5d));if(_0x5d1e5d[_0x354f('0xe')]){if(_0x5d1e5d[_0x354f('0xe')]['code']===0x1f4){logger[_0x354f('0xe')](_0x354f('0xb'),_0x1da503,_0x5d1e5d[_0x354f('0xe')][_0x354f('0xf')]);return _0x173e1d(_0x5d1e5d[_0x354f('0xe')][_0x354f('0xf')]);}logger[_0x354f('0xe')]('Campaign,\x20%s,\x20%s',_0x1da503,_0x5d1e5d[_0x354f('0xe')][_0x354f('0xf')]);return _0x2f111a(_0x5d1e5d[_0x354f('0xe')]['message']);}else{logger[_0x354f('0xa')](_0x354f('0xb'),_0x1da503,_0x354f('0xd'));_0x2f111a(_0x5d1e5d['result']['message']);}})[_0x354f('0x10')](function(_0x1d7627){logger[_0x354f('0xe')](_0x354f('0xb'),_0x1da503,_0x1d7627);_0x173e1d(_0x1d7627);});});}exports[_0x354f('0x11')]=function(_0x36402d){var _0x1210a6=this;return new Promise(function(_0x598777,_0x370736){return db[_0x354f('0x12')][_0x354f('0x13')]({'raw':_0x36402d['options']?_0x36402d[_0x354f('0x14')]['raw']===undefined?!![]:![]:!![],'where':_0x36402d[_0x354f('0x14')]?_0x36402d[_0x354f('0x14')]['where']||null:null,'attributes':_0x36402d[_0x354f('0x14')]?_0x36402d[_0x354f('0x14')]['attributes']||null:null,'limit':_0x36402d['options']?_0x36402d[_0x354f('0x14')]['limit']||null:null,'include':_0x36402d['options']?_0x36402d[_0x354f('0x14')][_0x354f('0x15')]?_[_0x354f('0x16')](_0x36402d[_0x354f('0x14')][_0x354f('0x15')],function(_0x158117){return{'model':db[_0x158117[_0x354f('0x17')]],'as':_0x158117['as'],'attributes':_0x158117['attributes'],'include':_0x158117[_0x354f('0x15')]?_['map'](_0x158117['include'],function(_0x22594b){return{'model':db[_0x22594b['model']],'as':_0x22594b['as'],'attributes':_0x22594b['attributes'],'include':_0x22594b[_0x354f('0x15')]?_['map'](_0x22594b[_0x354f('0x15')],function(_0x393622){return{'model':db[_0x393622['model']],'as':_0x393622['as'],'attributes':_0x393622[_0x354f('0x18')]};}):[]};}):[]};}):[]:[]})[_0x354f('0x9')](function(_0x1467e7){logger['info'](_0x354f('0x11'),_0x36402d);logger['debug'](_0x354f('0x11'),_0x36402d,JSON[_0x354f('0x19')](_0x1467e7));_0x598777(_0x1467e7);})[_0x354f('0x10')](function(_0x2816cf){logger['error'](_0x354f('0x11'),_0x2816cf[_0x354f('0xf')],_0x36402d);_0x370736(_0x1210a6[_0x354f('0xe')](0x1f4,_0x2816cf[_0x354f('0xf')]));});});}; \ No newline at end of file +var _0x9ef8=['util','bluebird','randomstring','ioredis','../../config/utils','../../config/logger','client','http','request','then','info','Campaign,\x20%s,\x20%s','request\x20sent','Campaign,\x20%s,\x20%s,\x20%s','stringify','error','message','result','catch','GetCampaign','Campaign','findAll','options','raw','where','attributes','limit','include','model','map','debug','lodash'];(function(_0xdefbc3,_0x1ea49a){var _0x367798=function(_0x594678){while(--_0x594678){_0xdefbc3['push'](_0xdefbc3['shift']());}};_0x367798(++_0x1ea49a);}(_0x9ef8,0x17f));var _0x89ef=function(_0xc7348b,_0x145880){_0xc7348b=_0xc7348b-0x0;var _0x307cec=_0x9ef8[_0xc7348b];return _0x307cec;};'use strict';var _=require(_0x89ef('0x0'));var util=require(_0x89ef('0x1'));var moment=require('moment');var BPromise=require(_0x89ef('0x2'));var rs=require(_0x89ef('0x3'));var fs=require('fs');var Redis=require(_0x89ef('0x4'));var db=require('../../mysqldb')['db'];var utils=require(_0x89ef('0x5'));var logger=require(_0x89ef('0x6'))('rpc');var config=require('../../config/environment');var jayson=require('jayson/promise');var client=jayson[_0x89ef('0x7')][_0x89ef('0x8')]({'port':0x232a});function respondWithRpcPromise(_0x24439e,_0x90b5bf,_0x46c0da){return new BPromise(function(_0x373288,_0x16e8c3){return client[_0x89ef('0x9')](_0x24439e,_0x46c0da)[_0x89ef('0xa')](function(_0x5683b6){logger[_0x89ef('0xb')](_0x89ef('0xc'),_0x90b5bf,_0x89ef('0xd'));logger['debug'](_0x89ef('0xe'),_0x90b5bf,_0x89ef('0xd'),JSON[_0x89ef('0xf')](_0x5683b6));if(_0x5683b6[_0x89ef('0x10')]){if(_0x5683b6[_0x89ef('0x10')]['code']===0x1f4){logger[_0x89ef('0x10')]('Campaign,\x20%s,\x20%s',_0x90b5bf,_0x5683b6[_0x89ef('0x10')][_0x89ef('0x11')]);return _0x16e8c3(_0x5683b6['error'][_0x89ef('0x11')]);}logger[_0x89ef('0x10')](_0x89ef('0xc'),_0x90b5bf,_0x5683b6[_0x89ef('0x10')][_0x89ef('0x11')]);return _0x373288(_0x5683b6['error'][_0x89ef('0x11')]);}else{logger['info']('Campaign,\x20%s,\x20%s',_0x90b5bf,_0x89ef('0xd'));_0x373288(_0x5683b6[_0x89ef('0x12')]['message']);}})[_0x89ef('0x13')](function(_0x490877){logger[_0x89ef('0x10')]('Campaign,\x20%s,\x20%s',_0x90b5bf,_0x490877);_0x16e8c3(_0x490877);});});}exports[_0x89ef('0x14')]=function(_0x2c5f51){var _0x2aa140=this;return new Promise(function(_0x1189d7,_0x5e3aed){return db[_0x89ef('0x15')][_0x89ef('0x16')]({'raw':_0x2c5f51[_0x89ef('0x17')]?_0x2c5f51[_0x89ef('0x17')][_0x89ef('0x18')]===undefined?!![]:![]:!![],'where':_0x2c5f51[_0x89ef('0x17')]?_0x2c5f51[_0x89ef('0x17')][_0x89ef('0x19')]||null:null,'attributes':_0x2c5f51[_0x89ef('0x17')]?_0x2c5f51[_0x89ef('0x17')][_0x89ef('0x1a')]||null:null,'limit':_0x2c5f51[_0x89ef('0x17')]?_0x2c5f51[_0x89ef('0x17')][_0x89ef('0x1b')]||null:null,'include':_0x2c5f51[_0x89ef('0x17')]?_0x2c5f51[_0x89ef('0x17')][_0x89ef('0x1c')]?_['map'](_0x2c5f51['options']['include'],function(_0x5c9242){return{'model':db[_0x5c9242[_0x89ef('0x1d')]],'as':_0x5c9242['as'],'attributes':_0x5c9242[_0x89ef('0x1a')],'include':_0x5c9242['include']?_['map'](_0x5c9242[_0x89ef('0x1c')],function(_0x10bb22){return{'model':db[_0x10bb22['model']],'as':_0x10bb22['as'],'attributes':_0x10bb22['attributes'],'include':_0x10bb22[_0x89ef('0x1c')]?_[_0x89ef('0x1e')](_0x10bb22[_0x89ef('0x1c')],function(_0x3efb34){return{'model':db[_0x3efb34[_0x89ef('0x1d')]],'as':_0x3efb34['as'],'attributes':_0x3efb34[_0x89ef('0x1a')]};}):[]};}):[]};}):[]:[]})[_0x89ef('0xa')](function(_0x5e8108){logger[_0x89ef('0xb')](_0x89ef('0x14'),_0x2c5f51);logger[_0x89ef('0x1f')](_0x89ef('0x14'),_0x2c5f51,JSON['stringify'](_0x5e8108));_0x1189d7(_0x5e8108);})['catch'](function(_0x51245a){logger[_0x89ef('0x10')](_0x89ef('0x14'),_0x51245a['message'],_0x2c5f51);_0x5e3aed(_0x2aa140[_0x89ef('0x10')](0x1f4,_0x51245a[_0x89ef('0x11')]));});});}; \ No newline at end of file diff --git a/server/api/campaign/index.js b/server/api/campaign/index.js index f92f663..e87baf2 100644 --- a/server/api/campaign/index.js +++ b/server/api/campaign/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xc541=['../../components/auth/service','../../components/interaction/service','../../config/environment','./campaign.controller','get','index','/:id','isAuthenticated','/:id/hoppers','getHoppers','/:id/hopper_histories','/:id/hopper_finals','getHopperFinals','/:id/hopper_black','/:id/lists','getLists','/:id/blacklists','getBlackLists','post','create','/:id/clone','clone','addLists','put','update','delete','destroy','removeLists','removeBlackLists','exports','multer','path','connect-timeout','express','Router','fs-extra'];(function(_0x284f73,_0x599ed1){var _0x18dcfe=function(_0x131277){while(--_0x131277){_0x284f73['push'](_0x284f73['shift']());}};_0x18dcfe(++_0x599ed1);}(_0xc541,0xae));var _0x1c54=function(_0x25e754,_0x200eba){_0x25e754=_0x25e754-0x0;var _0x1d991e=_0xc541[_0x25e754];return _0x1d991e;};'use strict';var multer=require(_0x1c54('0x0'));var util=require('util');var path=require(_0x1c54('0x1'));var timeout=require(_0x1c54('0x2'));var express=require(_0x1c54('0x3'));var router=express[_0x1c54('0x4')]();var fs_extra=require(_0x1c54('0x5'));var auth=require(_0x1c54('0x6'));var interaction=require(_0x1c54('0x7'));var config=require(_0x1c54('0x8'));var controller=require(_0x1c54('0x9'));router[_0x1c54('0xa')]('/',auth['isAuthenticated'](),controller[_0x1c54('0xb')]);router['get'](_0x1c54('0xc'),auth[_0x1c54('0xd')](),controller['show']);router['get'](_0x1c54('0xe'),auth[_0x1c54('0xd')](),controller[_0x1c54('0xf')]);router[_0x1c54('0xa')](_0x1c54('0x10'),auth[_0x1c54('0xd')](),controller['getHopperHistories']);router['get'](_0x1c54('0x11'),auth[_0x1c54('0xd')](),controller[_0x1c54('0x12')]);router['get'](_0x1c54('0x13'),auth[_0x1c54('0xd')](),controller['getHopperBlacks']);router[_0x1c54('0xa')](_0x1c54('0x14'),auth[_0x1c54('0xd')](),controller[_0x1c54('0x15')]);router[_0x1c54('0xa')](_0x1c54('0x16'),auth[_0x1c54('0xd')](),controller[_0x1c54('0x17')]);router[_0x1c54('0x18')]('/',auth[_0x1c54('0xd')](),controller[_0x1c54('0x19')]);router['post'](_0x1c54('0x1a'),auth[_0x1c54('0xd')](),controller[_0x1c54('0x1b')]);router[_0x1c54('0x18')](_0x1c54('0x14'),auth[_0x1c54('0xd')](),controller[_0x1c54('0x1c')]);router[_0x1c54('0x18')](_0x1c54('0x16'),auth['isAuthenticated'](),controller['addBlackLists']);router[_0x1c54('0x1d')](_0x1c54('0xc'),auth[_0x1c54('0xd')](),controller[_0x1c54('0x1e')]);router[_0x1c54('0x1f')](_0x1c54('0xc'),auth[_0x1c54('0xd')](),controller[_0x1c54('0x20')]);router[_0x1c54('0x1f')](_0x1c54('0x14'),auth[_0x1c54('0xd')](),controller[_0x1c54('0x21')]);router[_0x1c54('0x1f')](_0x1c54('0x16'),auth['isAuthenticated'](),controller[_0x1c54('0x22')]);module[_0x1c54('0x23')]=router; \ No newline at end of file +var _0x4676=['isAuthenticated','getHoppers','getHopperHistories','/:id/hopper_finals','getHopperFinals','/:id/hopper_black','getHopperBlacks','/:id/lists','getLists','/:id/blacklists','post','create','clone','addBlackLists','update','delete','destroy','removeBlackLists','exports','multer','path','connect-timeout','express','Router','../../components/auth/service','../../components/interaction/service','../../config/environment','./campaign.controller','get','/:id','/:id/hoppers'];(function(_0x4eb770,_0x4d318e){var _0x353fac=function(_0x4b6c77){while(--_0x4b6c77){_0x4eb770['push'](_0x4eb770['shift']());}};_0x353fac(++_0x4d318e);}(_0x4676,0x1e4));var _0x6467=function(_0x575b1e,_0x50c2b1){_0x575b1e=_0x575b1e-0x0;var _0x55e4f2=_0x4676[_0x575b1e];return _0x55e4f2;};'use strict';var multer=require(_0x6467('0x0'));var util=require('util');var path=require(_0x6467('0x1'));var timeout=require(_0x6467('0x2'));var express=require(_0x6467('0x3'));var router=express[_0x6467('0x4')]();var fs_extra=require('fs-extra');var auth=require(_0x6467('0x5'));var interaction=require(_0x6467('0x6'));var config=require(_0x6467('0x7'));var controller=require(_0x6467('0x8'));router[_0x6467('0x9')]('/',auth['isAuthenticated'](),controller['index']);router[_0x6467('0x9')](_0x6467('0xa'),auth['isAuthenticated'](),controller['show']);router[_0x6467('0x9')](_0x6467('0xb'),auth[_0x6467('0xc')](),controller[_0x6467('0xd')]);router[_0x6467('0x9')]('/:id/hopper_histories',auth[_0x6467('0xc')](),controller[_0x6467('0xe')]);router[_0x6467('0x9')](_0x6467('0xf'),auth[_0x6467('0xc')](),controller[_0x6467('0x10')]);router[_0x6467('0x9')](_0x6467('0x11'),auth[_0x6467('0xc')](),controller[_0x6467('0x12')]);router[_0x6467('0x9')](_0x6467('0x13'),auth[_0x6467('0xc')](),controller[_0x6467('0x14')]);router[_0x6467('0x9')](_0x6467('0x15'),auth[_0x6467('0xc')](),controller['getBlackLists']);router[_0x6467('0x16')]('/',auth[_0x6467('0xc')](),controller[_0x6467('0x17')]);router[_0x6467('0x16')]('/:id/clone',auth[_0x6467('0xc')](),controller[_0x6467('0x18')]);router[_0x6467('0x16')](_0x6467('0x13'),auth['isAuthenticated'](),controller['addLists']);router[_0x6467('0x16')]('/:id/blacklists',auth['isAuthenticated'](),controller[_0x6467('0x19')]);router['put']('/:id',auth[_0x6467('0xc')](),controller[_0x6467('0x1a')]);router[_0x6467('0x1b')](_0x6467('0xa'),auth['isAuthenticated'](),controller[_0x6467('0x1c')]);router[_0x6467('0x1b')]('/:id/lists',auth[_0x6467('0xc')](),controller['removeLists']);router[_0x6467('0x1b')](_0x6467('0x15'),auth[_0x6467('0xc')](),controller[_0x6467('0x1d')]);module[_0x6467('0x1e')]=router; \ No newline at end of file diff --git a/server/api/cannedAnswer/cannedAnswer.attributes.js b/server/api/cannedAnswer/cannedAnswer.attributes.js index 83262df..0e93d03 100644 --- a/server/api/cannedAnswer/cannedAnswer.attributes.js +++ b/server/api/cannedAnswer/cannedAnswer.attributes.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x1780=['sequelize','exports','TEXT','STRING','VIRTUAL','getDataValue'];(function(_0x4144ca,_0x3f22e3){var _0x2de8ee=function(_0x160005){while(--_0x160005){_0x4144ca['push'](_0x4144ca['shift']());}};_0x2de8ee(++_0x3f22e3);}(_0x1780,0x1d4));var _0x0178=function(_0x38aac1,_0x31c2a3){_0x38aac1=_0x38aac1-0x0;var _0x543193=_0x1780[_0x38aac1];return _0x543193;};'use strict';var Sequelize=require(_0x0178('0x0'));module[_0x0178('0x1')]={'key':{'type':Sequelize['STRING'],'allowNull':![]},'value':{'type':Sequelize[_0x0178('0x2')],'allowNull':![]},'description':{'type':Sequelize[_0x0178('0x3')]},'name':{'type':Sequelize[_0x0178('0x4')],'get':function(){return this[_0x0178('0x5')]('key');}}}; \ No newline at end of file +var _0xb092=['exports','TEXT','STRING','VIRTUAL','getDataValue','key','sequelize'];(function(_0x39c684,_0x1e0093){var _0x3da800=function(_0x2ac946){while(--_0x2ac946){_0x39c684['push'](_0x39c684['shift']());}};_0x3da800(++_0x1e0093);}(_0xb092,0x11e));var _0x2b09=function(_0x11520a,_0x29c546){_0x11520a=_0x11520a-0x0;var _0x430b0b=_0xb092[_0x11520a];return _0x430b0b;};'use strict';var Sequelize=require(_0x2b09('0x0'));module[_0x2b09('0x1')]={'key':{'type':Sequelize['STRING'],'allowNull':![]},'value':{'type':Sequelize[_0x2b09('0x2')],'allowNull':![]},'description':{'type':Sequelize[_0x2b09('0x3')]},'name':{'type':Sequelize[_0x2b09('0x4')],'get':function(){return this[_0x2b09('0x5')](_0x2b09('0x6'));}}}; \ No newline at end of file diff --git a/server/api/cannedAnswer/cannedAnswer.controller.js b/server/api/cannedAnswer/cannedAnswer.controller.js index 47e0bc9..a921cc7 100644 --- a/server/api/cannedAnswer/cannedAnswer.controller.js +++ b/server/api/cannedAnswer/cannedAnswer.controller.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xf85c=['type','model','keys','filters','intersection','query','fields','attributes','nolimit','order','sort','where','pick','filter','merge','options','include','findAll','rows','catch','show','params','rawAttributes','length','includeAll','find','update','body','create','key','MailAccountId','SmsAccountId','OpenchannelAccountId','ChatWebsiteId','ValidationError','user','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','CannedAnswers','userProfileId','autoAssociation','UserProfileResource','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','mustache','path','to-csv','ejs','fs-extra','lodash','crypto','jsforce','desk.js','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../config/license/hardware','../../config/logger','../../config/utils','../../config/environment','sendStatus','status','end','json','undefined','offset','count','limit','apply','reject','save','destroy','then','get','error','stack','name','send','index','map','CannedAnswer','fieldName'];(function(_0x1f76dc,_0xe0643f){var _0x4e323a=function(_0x35befd){while(--_0x35befd){_0x1f76dc['push'](_0x1f76dc['shift']());}};_0x4e323a(++_0xe0643f);}(_0xf85c,0x132));var _0xcf85=function(_0x42cae2,_0x284ef8){_0x42cae2=_0x42cae2-0x0;var _0x5f256f=_0xf85c[_0x42cae2];return _0x5f256f;};'use strict';var emlformat=require(_0xcf85('0x0'));var rimraf=require(_0xcf85('0x1'));var zipdir=require(_0xcf85('0x2'));var jsonpatch=require(_0xcf85('0x3'));var rp=require(_0xcf85('0x4'));var moment=require(_0xcf85('0x5'));var BPromise=require('bluebird');var Mustache=require(_0xcf85('0x6'));var util=require('util');var path=require(_0xcf85('0x7'));var sox=require('sox');var csv=require(_0xcf85('0x8'));var ejs=require(_0xcf85('0x9'));var fs=require('fs');var fs_extra=require(_0xcf85('0xa'));var _=require(_0xcf85('0xb'));var squel=require('squel');var crypto=require(_0xcf85('0xc'));var jsforce=require(_0xcf85('0xd'));var deskjs=require(_0xcf85('0xe'));var toCsv=require(_0xcf85('0x8'));var querystring=require(_0xcf85('0xf'));var Papa=require(_0xcf85('0x10'));var Redis=require(_0xcf85('0x11'));var authService=require(_0xcf85('0x12'));var qs=require(_0xcf85('0x13'));var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0xcf85('0x14'));var logger=require(_0xcf85('0x15'))('api');var utils=require(_0xcf85('0x16'));var config=require(_0xcf85('0x17'));var licenseUtil=require('../../config/license/util');var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0xfd0c8a,_0x3c72e6){_0x3c72e6=_0x3c72e6||0xcc;return function(_0x39560e){if(_0x39560e){return _0xfd0c8a[_0xcf85('0x18')](_0x3c72e6);}return _0xfd0c8a[_0xcf85('0x19')](_0x3c72e6)[_0xcf85('0x1a')]();};}function respondWithResult(_0x1d8c3c,_0x1d6dc6){_0x1d6dc6=_0x1d6dc6||0xc8;return function(_0x52b43a){if(_0x52b43a){return _0x1d8c3c[_0xcf85('0x19')](_0x1d6dc6)[_0xcf85('0x1b')](_0x52b43a);}};}function respondWithFilteredResult(_0x2c1a35,_0x30cb64){return function(_0x1a450a){if(_0x1a450a){var _0x4990ac=typeof _0x30cb64['offset']===_0xcf85('0x1c')&&typeof _0x30cb64['limit']===_0xcf85('0x1c');var _0x25df57=_0x1a450a['count'];var _0x35fdec=_0x4990ac?0x0:_0x30cb64[_0xcf85('0x1d')];var _0x432c27=_0x4990ac?_0x1a450a[_0xcf85('0x1e')]:_0x30cb64[_0xcf85('0x1d')]+_0x30cb64[_0xcf85('0x1f')];var _0x5b6af1;if(_0x432c27>=_0x25df57){_0x432c27=_0x25df57;_0x5b6af1=0xc8;}else{_0x5b6af1=0xce;}_0x2c1a35[_0xcf85('0x19')](_0x5b6af1);return _0x2c1a35['set']('Content-Range',_0x35fdec+'-'+_0x432c27+'/'+_0x25df57)[_0xcf85('0x1b')](_0x1a450a);}return null;};}function patchUpdates(_0x2a45a2){return function(_0x3c8be3){try{jsonpatch[_0xcf85('0x20')](_0x3c8be3,_0x2a45a2,!![]);}catch(_0x370a02){return BPromise[_0xcf85('0x21')](_0x370a02);}return _0x3c8be3[_0xcf85('0x22')]();};}function saveUpdates(_0x184336,_0x55dad4){return function(_0x3bc93c){if(_0x3bc93c){return _0x3bc93c['update'](_0x184336)['then'](function(_0x210203){return _0x210203;});}return null;};}function removeEntity(_0xaf7470,_0x9952e1){return function(_0x12e76c){if(_0x12e76c){return _0x12e76c[_0xcf85('0x23')]()[_0xcf85('0x24')](function(){var _0x5400ef=_0x12e76c[_0xcf85('0x25')]({'plain':!![]});var _0x1f5536='CannedAnswers';return db['UserProfileResource'][_0xcf85('0x23')]({'where':{'type':_0x1f5536,'resourceId':_0x5400ef['id']}})[_0xcf85('0x24')](function(){return _0x12e76c;});})[_0xcf85('0x24')](function(){_0xaf7470[_0xcf85('0x19')](0xcc)[_0xcf85('0x1a')]();});}};}function handleEntityNotFound(_0x55a09e,_0x10d0b4){return function(_0x2c9b88){if(!_0x2c9b88){_0x55a09e[_0xcf85('0x18')](0x194);}return _0x2c9b88;};}function handleError(_0x1dcfe6,_0x1ea345){_0x1ea345=_0x1ea345||0x1f4;return function(_0x34b134){logger[_0xcf85('0x26')](_0x34b134[_0xcf85('0x27')]);if(_0x34b134[_0xcf85('0x28')]){delete _0x34b134[_0xcf85('0x28')];}_0x1dcfe6[_0xcf85('0x19')](_0x1ea345)[_0xcf85('0x29')](_0x34b134);};}exports[_0xcf85('0x2a')]=function(_0x4cde10,_0xc4163f){var _0x215a4d={},_0x206c99={},_0x52b3b7={'count':0x0,'rows':[]};var _0x4635dd=_[_0xcf85('0x2b')](db[_0xcf85('0x2c')]['rawAttributes'],function(_0x5b0d66){return{'name':_0x5b0d66[_0xcf85('0x2d')],'type':_0x5b0d66[_0xcf85('0x2e')]['key']};});_0x206c99[_0xcf85('0x2f')]=_[_0xcf85('0x2b')](_0x4635dd,'name');_0x206c99['query']=_[_0xcf85('0x30')](_0x4cde10['query']);_0x206c99[_0xcf85('0x31')]=_[_0xcf85('0x32')](_0x206c99['model'],_0x206c99[_0xcf85('0x33')]);_0x215a4d['attributes']=_[_0xcf85('0x32')](_0x206c99[_0xcf85('0x2f')],qs[_0xcf85('0x34')](_0x4cde10[_0xcf85('0x33')][_0xcf85('0x34')]));_0x215a4d[_0xcf85('0x35')]=_0x215a4d[_0xcf85('0x35')]['length']?_0x215a4d[_0xcf85('0x35')]:_0x206c99[_0xcf85('0x2f')];if(!_0x4cde10[_0xcf85('0x33')]['hasOwnProperty'](_0xcf85('0x36'))){_0x215a4d[_0xcf85('0x1f')]=qs[_0xcf85('0x1f')](_0x4cde10[_0xcf85('0x33')][_0xcf85('0x1f')]);_0x215a4d['offset']=qs[_0xcf85('0x1d')](_0x4cde10[_0xcf85('0x33')][_0xcf85('0x1d')]);}_0x215a4d[_0xcf85('0x37')]=qs[_0xcf85('0x38')](_0x4cde10[_0xcf85('0x33')][_0xcf85('0x38')]);_0x215a4d[_0xcf85('0x39')]=qs[_0xcf85('0x31')](_[_0xcf85('0x3a')](_0x4cde10['query'],_0x206c99[_0xcf85('0x31')]),_0x4635dd);if(_0x4cde10[_0xcf85('0x33')][_0xcf85('0x3b')]){_0x215a4d[_0xcf85('0x39')]=_['merge'](_0x215a4d[_0xcf85('0x39')],{'$or':[{'key':{'$like':'%'+_0x4cde10[_0xcf85('0x33')][_0xcf85('0x3b')]+'%'}},{'value':{'$like':'%'+_0x4cde10[_0xcf85('0x33')][_0xcf85('0x3b')]+'%'}}]});}_0x215a4d=_[_0xcf85('0x3c')]({},_0x215a4d,_0x4cde10[_0xcf85('0x3d')]);var _0x46d329={'where':_0x215a4d['where']};return db[_0xcf85('0x2c')]['count'](_0x46d329)[_0xcf85('0x24')](function(_0x1db892){_0x52b3b7[_0xcf85('0x1e')]=_0x1db892;if(_0x4cde10[_0xcf85('0x33')]['includeAll']){_0x215a4d[_0xcf85('0x3e')]=[{'all':!![]}];}return db[_0xcf85('0x2c')][_0xcf85('0x3f')](_0x215a4d);})[_0xcf85('0x24')](function(_0x43f013){_0x52b3b7[_0xcf85('0x40')]=_0x43f013;return _0x52b3b7;})[_0xcf85('0x24')](respondWithFilteredResult(_0xc4163f,_0x215a4d))[_0xcf85('0x41')](handleError(_0xc4163f,null));};exports[_0xcf85('0x42')]=function(_0x3a8755,_0x5eff4d){var _0x472000={'raw':!![],'where':{'id':_0x3a8755[_0xcf85('0x43')]['id']}},_0x206b00={};_0x206b00[_0xcf85('0x2f')]=_[_0xcf85('0x30')](db[_0xcf85('0x2c')][_0xcf85('0x44')]);_0x206b00[_0xcf85('0x33')]=_[_0xcf85('0x30')](_0x3a8755[_0xcf85('0x33')]);_0x206b00['filters']=_[_0xcf85('0x32')](_0x206b00[_0xcf85('0x2f')],_0x206b00[_0xcf85('0x33')]);_0x472000[_0xcf85('0x35')]=_['intersection'](_0x206b00[_0xcf85('0x2f')],qs[_0xcf85('0x34')](_0x3a8755[_0xcf85('0x33')]['fields']));_0x472000[_0xcf85('0x35')]=_0x472000[_0xcf85('0x35')][_0xcf85('0x45')]?_0x472000[_0xcf85('0x35')]:_0x206b00[_0xcf85('0x2f')];if(_0x3a8755[_0xcf85('0x33')][_0xcf85('0x46')]){_0x472000[_0xcf85('0x3e')]=[{'all':!![]}];}_0x472000=_[_0xcf85('0x3c')]({},_0x472000,_0x3a8755['options']);return db['CannedAnswer'][_0xcf85('0x47')](_0x472000)[_0xcf85('0x24')](handleEntityNotFound(_0x5eff4d,null))['then'](respondWithResult(_0x5eff4d,null))[_0xcf85('0x41')](handleError(_0x5eff4d,null));};exports[_0xcf85('0x48')]=function(_0x1209cf,_0x4797d3){if(_0x1209cf[_0xcf85('0x49')]['id']){delete _0x1209cf[_0xcf85('0x49')]['id'];}return db[_0xcf85('0x2c')][_0xcf85('0x47')]({'where':{'id':_0x1209cf[_0xcf85('0x43')]['id']}})[_0xcf85('0x24')](handleEntityNotFound(_0x4797d3,null))[_0xcf85('0x24')](saveUpdates(_0x1209cf[_0xcf85('0x49')],null))[_0xcf85('0x24')](respondWithResult(_0x4797d3,null))[_0xcf85('0x41')](handleError(_0x4797d3,null));};exports['destroy']=function(_0x4a7b64,_0x29175f){return db['CannedAnswer'][_0xcf85('0x47')]({'where':{'id':_0x4a7b64['params']['id']}})[_0xcf85('0x24')](handleEntityNotFound(_0x29175f,null))[_0xcf85('0x24')](removeEntity(_0x29175f,null))[_0xcf85('0x41')](handleError(_0x29175f,null));};exports[_0xcf85('0x4a')]=function(_0x43daf9,_0x4b9e1){var _0x53f00f={'key':_0x43daf9[_0xcf85('0x49')][_0xcf85('0x4b')]};if(_0x43daf9[_0xcf85('0x49')][_0xcf85('0x4c')]){_0x53f00f[_0xcf85('0x4c')]=_0x43daf9['body'][_0xcf85('0x4c')];}else if(_0x43daf9['body'][_0xcf85('0x4d')]){_0x53f00f[_0xcf85('0x4d')]=_0x43daf9[_0xcf85('0x49')][_0xcf85('0x4d')];}else if(_0x43daf9[_0xcf85('0x49')][_0xcf85('0x4e')]){_0x53f00f[_0xcf85('0x4e')]=_0x43daf9[_0xcf85('0x49')][_0xcf85('0x4e')];}else if(_0x43daf9[_0xcf85('0x49')][_0xcf85('0x4f')]){_0x53f00f[_0xcf85('0x4f')]=_0x43daf9[_0xcf85('0x49')]['ChatWebsiteId'];}return db['CannedAnswer']['find']({'where':_0x53f00f})['then'](function(_0x594038){if(_0x594038){throw new db['Sequelize'][(_0xcf85('0x50'))]('The\x20inserted\x20key\x20already\x20exists.');}return db[_0xcf85('0x2c')]['create'](_0x43daf9['body']);})[_0xcf85('0x24')](function(_0x3a0c74){var _0x46d1be=_0x43daf9[_0xcf85('0x51')][_0xcf85('0x25')]({'plain':!![]});if(!_0x46d1be)throw new Error(_0xcf85('0x52'));if(_0x46d1be[_0xcf85('0x53')]===_0xcf85('0x51')){var _0x4a1685=_0x3a0c74[_0xcf85('0x25')]({'plain':!![]});return db['UserProfileSection']['find']({'where':{'name':_0xcf85('0x54'),'userProfileId':_0x46d1be[_0xcf85('0x55')]},'raw':!![]})[_0xcf85('0x24')](function(_0x412e59){if(_0x412e59&&_0x412e59[_0xcf85('0x56')]===0x0){return db[_0xcf85('0x57')][_0xcf85('0x4a')]({'name':_0x4a1685[_0xcf85('0x28')],'resourceId':_0x4a1685['id'],'type':_0x412e59[_0xcf85('0x28')],'sectionId':_0x412e59['id']},{})[_0xcf85('0x24')](function(){return _0x3a0c74;});}else{return _0x3a0c74;}})[_0xcf85('0x41')](function(_0x18a931){logger[_0xcf85('0x26')]('Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s',_0x18a931);throw _0x18a931;});}return _0x3a0c74;})[_0xcf85('0x24')](respondWithResult(_0x4b9e1,0xc9))[_0xcf85('0x41')](handleError(_0x4b9e1,null));}; \ No newline at end of file +var _0x3700=['fields','hasOwnProperty','nolimit','order','sort','where','pick','filter','options','include','catch','show','length','includeAll','find','body','params','create','MailAccountId','SmsAccountId','OpenchannelAccountId','ChatWebsiteId','ValidationError','The\x20inserted\x20key\x20already\x20exists.','user','Unable\x20to\x20retrieve\x20the\x20current\x20user','CannedAnswers','userProfileId','error','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','sox','ejs','fs-extra','lodash','squel','crypto','jsforce','desk.js','to-csv','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/logger','api','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','sendStatus','status','end','undefined','limit','offset','count','set','Content-Range','json','reject','save','update','then','destroy','get','UserProfileResource','stack','name','send','index','CannedAnswer','rawAttributes','fieldName','type','key','model','map','query','keys','filters','intersection','attributes'];(function(_0x21be47,_0x1edbe3){var _0x5088e=function(_0x4570b0){while(--_0x4570b0){_0x21be47['push'](_0x21be47['shift']());}};_0x5088e(++_0x1edbe3);}(_0x3700,0x185));var _0x0370=function(_0x12b83d,_0x4bcec7){_0x12b83d=_0x12b83d-0x0;var _0x1fd39d=_0x3700[_0x12b83d];return _0x1fd39d;};'use strict';var emlformat=require(_0x0370('0x0'));var rimraf=require(_0x0370('0x1'));var zipdir=require(_0x0370('0x2'));var jsonpatch=require(_0x0370('0x3'));var rp=require(_0x0370('0x4'));var moment=require(_0x0370('0x5'));var BPromise=require(_0x0370('0x6'));var Mustache=require(_0x0370('0x7'));var util=require('util');var path=require('path');var sox=require(_0x0370('0x8'));var csv=require('to-csv');var ejs=require(_0x0370('0x9'));var fs=require('fs');var fs_extra=require(_0x0370('0xa'));var _=require(_0x0370('0xb'));var squel=require(_0x0370('0xc'));var crypto=require(_0x0370('0xd'));var jsforce=require(_0x0370('0xe'));var deskjs=require(_0x0370('0xf'));var toCsv=require(_0x0370('0x10'));var querystring=require('querystring');var Papa=require(_0x0370('0x11'));var Redis=require(_0x0370('0x12'));var authService=require(_0x0370('0x13'));var qs=require(_0x0370('0x14'));var as=require(_0x0370('0x15'));var hardwareService=require('../../config/license/hardware');var logger=require(_0x0370('0x16'))(_0x0370('0x17'));var utils=require(_0x0370('0x18'));var config=require(_0x0370('0x19'));var licenseUtil=require(_0x0370('0x1a'));var db=require(_0x0370('0x1b'))['db'];function respondWithStatusCode(_0x472803,_0x1711b9){_0x1711b9=_0x1711b9||0xcc;return function(_0x580e50){if(_0x580e50){return _0x472803[_0x0370('0x1c')](_0x1711b9);}return _0x472803[_0x0370('0x1d')](_0x1711b9)[_0x0370('0x1e')]();};}function respondWithResult(_0x4106d6,_0x3adbd9){_0x3adbd9=_0x3adbd9||0xc8;return function(_0x3ab6ca){if(_0x3ab6ca){return _0x4106d6[_0x0370('0x1d')](_0x3adbd9)['json'](_0x3ab6ca);}};}function respondWithFilteredResult(_0x492134,_0x37fea6){return function(_0x2f6a0b){if(_0x2f6a0b){var _0x2fc73d=typeof _0x37fea6['offset']===_0x0370('0x1f')&&typeof _0x37fea6[_0x0370('0x20')]===_0x0370('0x1f');var _0x2b8539=_0x2f6a0b['count'];var _0x132534=_0x2fc73d?0x0:_0x37fea6[_0x0370('0x21')];var _0x5816f9=_0x2fc73d?_0x2f6a0b[_0x0370('0x22')]:_0x37fea6[_0x0370('0x21')]+_0x37fea6[_0x0370('0x20')];var _0x4d31d6;if(_0x5816f9>=_0x2b8539){_0x5816f9=_0x2b8539;_0x4d31d6=0xc8;}else{_0x4d31d6=0xce;}_0x492134['status'](_0x4d31d6);return _0x492134[_0x0370('0x23')](_0x0370('0x24'),_0x132534+'-'+_0x5816f9+'/'+_0x2b8539)[_0x0370('0x25')](_0x2f6a0b);}return null;};}function patchUpdates(_0x355f1b){return function(_0x4e5b29){try{jsonpatch['apply'](_0x4e5b29,_0x355f1b,!![]);}catch(_0x1dfc25){return BPromise[_0x0370('0x26')](_0x1dfc25);}return _0x4e5b29[_0x0370('0x27')]();};}function saveUpdates(_0x50f711,_0x3c79b0){return function(_0x1266c1){if(_0x1266c1){return _0x1266c1[_0x0370('0x28')](_0x50f711)[_0x0370('0x29')](function(_0x4b4f2f){return _0x4b4f2f;});}return null;};}function removeEntity(_0x12033f,_0x23e971){return function(_0x2c9cd4){if(_0x2c9cd4){return _0x2c9cd4[_0x0370('0x2a')]()[_0x0370('0x29')](function(){var _0x2f8c17=_0x2c9cd4[_0x0370('0x2b')]({'plain':!![]});var _0x1cfdb4='CannedAnswers';return db[_0x0370('0x2c')][_0x0370('0x2a')]({'where':{'type':_0x1cfdb4,'resourceId':_0x2f8c17['id']}})[_0x0370('0x29')](function(){return _0x2c9cd4;});})[_0x0370('0x29')](function(){_0x12033f[_0x0370('0x1d')](0xcc)['end']();});}};}function handleEntityNotFound(_0x1954e9,_0x22cfd3){return function(_0x2f9bde){if(!_0x2f9bde){_0x1954e9[_0x0370('0x1c')](0x194);}return _0x2f9bde;};}function handleError(_0x23499a,_0x29281e){_0x29281e=_0x29281e||0x1f4;return function(_0x4b4446){logger['error'](_0x4b4446[_0x0370('0x2d')]);if(_0x4b4446[_0x0370('0x2e')]){delete _0x4b4446[_0x0370('0x2e')];}_0x23499a['status'](_0x29281e)[_0x0370('0x2f')](_0x4b4446);};}exports[_0x0370('0x30')]=function(_0x1e7f50,_0x12e46c){var _0x2a6b72={},_0x11276e={},_0x1bab1b={'count':0x0,'rows':[]};var _0x41083a=_['map'](db[_0x0370('0x31')][_0x0370('0x32')],function(_0x44ace5){return{'name':_0x44ace5[_0x0370('0x33')],'type':_0x44ace5[_0x0370('0x34')][_0x0370('0x35')]};});_0x11276e[_0x0370('0x36')]=_[_0x0370('0x37')](_0x41083a,_0x0370('0x2e'));_0x11276e[_0x0370('0x38')]=_[_0x0370('0x39')](_0x1e7f50[_0x0370('0x38')]);_0x11276e[_0x0370('0x3a')]=_[_0x0370('0x3b')](_0x11276e[_0x0370('0x36')],_0x11276e[_0x0370('0x38')]);_0x2a6b72[_0x0370('0x3c')]=_[_0x0370('0x3b')](_0x11276e[_0x0370('0x36')],qs[_0x0370('0x3d')](_0x1e7f50[_0x0370('0x38')][_0x0370('0x3d')]));_0x2a6b72[_0x0370('0x3c')]=_0x2a6b72[_0x0370('0x3c')]['length']?_0x2a6b72['attributes']:_0x11276e[_0x0370('0x36')];if(!_0x1e7f50[_0x0370('0x38')][_0x0370('0x3e')](_0x0370('0x3f'))){_0x2a6b72[_0x0370('0x20')]=qs[_0x0370('0x20')](_0x1e7f50[_0x0370('0x38')]['limit']);_0x2a6b72[_0x0370('0x21')]=qs[_0x0370('0x21')](_0x1e7f50['query'][_0x0370('0x21')]);}_0x2a6b72[_0x0370('0x40')]=qs[_0x0370('0x41')](_0x1e7f50[_0x0370('0x38')][_0x0370('0x41')]);_0x2a6b72[_0x0370('0x42')]=qs[_0x0370('0x3a')](_[_0x0370('0x43')](_0x1e7f50[_0x0370('0x38')],_0x11276e[_0x0370('0x3a')]),_0x41083a);if(_0x1e7f50[_0x0370('0x38')][_0x0370('0x44')]){_0x2a6b72[_0x0370('0x42')]=_['merge'](_0x2a6b72[_0x0370('0x42')],{'$or':[{'key':{'$like':'%'+_0x1e7f50[_0x0370('0x38')][_0x0370('0x44')]+'%'}},{'value':{'$like':'%'+_0x1e7f50[_0x0370('0x38')][_0x0370('0x44')]+'%'}}]});}_0x2a6b72=_['merge']({},_0x2a6b72,_0x1e7f50[_0x0370('0x45')]);var _0x101c96={'where':_0x2a6b72['where']};return db[_0x0370('0x31')][_0x0370('0x22')](_0x101c96)[_0x0370('0x29')](function(_0x252a69){_0x1bab1b[_0x0370('0x22')]=_0x252a69;if(_0x1e7f50[_0x0370('0x38')]['includeAll']){_0x2a6b72[_0x0370('0x46')]=[{'all':!![]}];}return db[_0x0370('0x31')]['findAll'](_0x2a6b72);})[_0x0370('0x29')](function(_0x1f0efd){_0x1bab1b['rows']=_0x1f0efd;return _0x1bab1b;})[_0x0370('0x29')](respondWithFilteredResult(_0x12e46c,_0x2a6b72))[_0x0370('0x47')](handleError(_0x12e46c,null));};exports[_0x0370('0x48')]=function(_0xd7158f,_0x40e636){var _0xbb724a={'raw':!![],'where':{'id':_0xd7158f['params']['id']}},_0x2c9780={};_0x2c9780['model']=_[_0x0370('0x39')](db[_0x0370('0x31')][_0x0370('0x32')]);_0x2c9780['query']=_[_0x0370('0x39')](_0xd7158f['query']);_0x2c9780[_0x0370('0x3a')]=_[_0x0370('0x3b')](_0x2c9780[_0x0370('0x36')],_0x2c9780[_0x0370('0x38')]);_0xbb724a['attributes']=_[_0x0370('0x3b')](_0x2c9780[_0x0370('0x36')],qs[_0x0370('0x3d')](_0xd7158f['query'][_0x0370('0x3d')]));_0xbb724a[_0x0370('0x3c')]=_0xbb724a[_0x0370('0x3c')][_0x0370('0x49')]?_0xbb724a[_0x0370('0x3c')]:_0x2c9780['model'];if(_0xd7158f[_0x0370('0x38')][_0x0370('0x4a')]){_0xbb724a[_0x0370('0x46')]=[{'all':!![]}];}_0xbb724a=_['merge']({},_0xbb724a,_0xd7158f[_0x0370('0x45')]);return db[_0x0370('0x31')][_0x0370('0x4b')](_0xbb724a)['then'](handleEntityNotFound(_0x40e636,null))[_0x0370('0x29')](respondWithResult(_0x40e636,null))[_0x0370('0x47')](handleError(_0x40e636,null));};exports[_0x0370('0x28')]=function(_0x54e5e0,_0x2e060d){if(_0x54e5e0['body']['id']){delete _0x54e5e0[_0x0370('0x4c')]['id'];}return db[_0x0370('0x31')][_0x0370('0x4b')]({'where':{'id':_0x54e5e0[_0x0370('0x4d')]['id']}})[_0x0370('0x29')](handleEntityNotFound(_0x2e060d,null))[_0x0370('0x29')](saveUpdates(_0x54e5e0['body'],null))[_0x0370('0x29')](respondWithResult(_0x2e060d,null))['catch'](handleError(_0x2e060d,null));};exports['destroy']=function(_0x16aeea,_0xdfb1f8){return db[_0x0370('0x31')]['find']({'where':{'id':_0x16aeea[_0x0370('0x4d')]['id']}})[_0x0370('0x29')](handleEntityNotFound(_0xdfb1f8,null))[_0x0370('0x29')](removeEntity(_0xdfb1f8,null))[_0x0370('0x47')](handleError(_0xdfb1f8,null));};exports[_0x0370('0x4e')]=function(_0x13f963,_0x4e0c9f){var _0x4c96dd={'key':_0x13f963[_0x0370('0x4c')][_0x0370('0x35')]};if(_0x13f963[_0x0370('0x4c')]['MailAccountId']){_0x4c96dd['MailAccountId']=_0x13f963[_0x0370('0x4c')][_0x0370('0x4f')];}else if(_0x13f963[_0x0370('0x4c')][_0x0370('0x50')]){_0x4c96dd[_0x0370('0x50')]=_0x13f963[_0x0370('0x4c')][_0x0370('0x50')];}else if(_0x13f963[_0x0370('0x4c')][_0x0370('0x51')]){_0x4c96dd['OpenchannelAccountId']=_0x13f963[_0x0370('0x4c')][_0x0370('0x51')];}else if(_0x13f963['body'][_0x0370('0x52')]){_0x4c96dd[_0x0370('0x52')]=_0x13f963[_0x0370('0x4c')]['ChatWebsiteId'];}return db[_0x0370('0x31')]['find']({'where':_0x4c96dd})[_0x0370('0x29')](function(_0x5a3ac8){if(_0x5a3ac8){throw new db['Sequelize'][(_0x0370('0x53'))](_0x0370('0x54'));}return db[_0x0370('0x31')][_0x0370('0x4e')](_0x13f963[_0x0370('0x4c')]);})['then'](function(_0x4b66be){var _0x4db758=_0x13f963[_0x0370('0x55')]['get']({'plain':!![]});if(!_0x4db758)throw new Error(_0x0370('0x56'));if(_0x4db758['role']===_0x0370('0x55')){var _0x3198f4=_0x4b66be[_0x0370('0x2b')]({'plain':!![]});return db['UserProfileSection'][_0x0370('0x4b')]({'where':{'name':_0x0370('0x57'),'userProfileId':_0x4db758[_0x0370('0x58')]},'raw':!![]})[_0x0370('0x29')](function(_0xf4c679){if(_0xf4c679&&_0xf4c679['autoAssociation']===0x0){return db[_0x0370('0x2c')][_0x0370('0x4e')]({'name':_0x3198f4['name'],'resourceId':_0x3198f4['id'],'type':_0xf4c679['name'],'sectionId':_0xf4c679['id']},{})[_0x0370('0x29')](function(){return _0x4b66be;});}else{return _0x4b66be;}})[_0x0370('0x47')](function(_0x59af13){logger[_0x0370('0x59')]('Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s',_0x59af13);throw _0x59af13;});}return _0x4b66be;})[_0x0370('0x29')](respondWithResult(_0x4e0c9f,0xc9))[_0x0370('0x47')](handleError(_0x4e0c9f,null));}; \ No newline at end of file diff --git a/server/api/cannedAnswer/cannedAnswer.model.js b/server/api/cannedAnswer/cannedAnswer.model.js index 51a12d1..a7ed00d 100644 --- a/server/api/cannedAnswer/cannedAnswer.model.js +++ b/server/api/cannedAnswer/cannedAnswer.model.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x1a20=['request-promise','path','exports','define','CannedAnswer','tools_canned_answers','utf8mb4','util','../../config/logger','api','moment','bluebird'];(function(_0xb68772,_0x5253ac){var _0x4189bb=function(_0x1b0cf3){while(--_0x1b0cf3){_0xb68772['push'](_0xb68772['shift']());}};_0x4189bb(++_0x5253ac);}(_0x1a20,0x14b));var _0x01a2=function(_0x14add3,_0x13ce8d){_0x14add3=_0x14add3-0x0;var _0x4a174f=_0x1a20[_0x14add3];return _0x4a174f;};'use strict';var _=require('lodash');var util=require(_0x01a2('0x0'));var logger=require(_0x01a2('0x1'))(_0x01a2('0x2'));var moment=require(_0x01a2('0x3'));var BPromise=require(_0x01a2('0x4'));var rp=require(_0x01a2('0x5'));var fs=require('fs');var path=require(_0x01a2('0x6'));var rimraf=require('rimraf');var config=require('../../config/environment');var attributes=require('./cannedAnswer.attributes');module[_0x01a2('0x7')]=function(_0x154e98,_0x277d34){return _0x154e98[_0x01a2('0x8')](_0x01a2('0x9'),attributes,{'tableName':_0x01a2('0xa'),'paranoid':![],'indexes':[],'timestamps':!![],'charset':_0x01a2('0xb'),'collate':'utf8mb4_unicode_ci'});}; \ No newline at end of file +var _0x54aa=['./cannedAnswer.attributes','define','tools_canned_answers','utf8mb4','utf8mb4_unicode_ci','lodash','util','../../config/logger','api','bluebird','request-promise','path','../../config/environment'];(function(_0x2a75cd,_0x247962){var _0x2319bc=function(_0x47d0c5){while(--_0x47d0c5){_0x2a75cd['push'](_0x2a75cd['shift']());}};_0x2319bc(++_0x247962);}(_0x54aa,0x116));var _0xa54a=function(_0x2e9bfb,_0x14cfdb){_0x2e9bfb=_0x2e9bfb-0x0;var _0x15bfe5=_0x54aa[_0x2e9bfb];return _0x15bfe5;};'use strict';var _=require(_0xa54a('0x0'));var util=require(_0xa54a('0x1'));var logger=require(_0xa54a('0x2'))(_0xa54a('0x3'));var moment=require('moment');var BPromise=require(_0xa54a('0x4'));var rp=require(_0xa54a('0x5'));var fs=require('fs');var path=require(_0xa54a('0x6'));var rimraf=require('rimraf');var config=require(_0xa54a('0x7'));var attributes=require(_0xa54a('0x8'));module['exports']=function(_0x4b938c,_0x2d8700){return _0x4b938c[_0xa54a('0x9')]('CannedAnswer',attributes,{'tableName':_0xa54a('0xa'),'paranoid':![],'indexes':[],'timestamps':!![],'charset':_0xa54a('0xb'),'collate':_0xa54a('0xc')});}; \ No newline at end of file diff --git a/server/api/cannedAnswer/cannedAnswer.rpc.js b/server/api/cannedAnswer/cannedAnswer.rpc.js index 3a97df8..4470304 100644 --- a/server/api/cannedAnswer/cannedAnswer.rpc.js +++ b/server/api/cannedAnswer/cannedAnswer.rpc.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xa9e0=['http','info','CannedAnswer,\x20%s,\x20%s','request\x20sent','debug','CannedAnswer,\x20%s,\x20%s,\x20%s','code','error','message','result','catch','lodash','util','moment','ioredis','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise'];(function(_0x4efc6c,_0x3dbf75){var _0x25ea25=function(_0x50b43c){while(--_0x50b43c){_0x4efc6c['push'](_0x4efc6c['shift']());}};_0x25ea25(++_0x3dbf75);}(_0xa9e0,0x123));var _0x0a9e=function(_0x311c35,_0x534915){_0x311c35=_0x311c35-0x0;var _0x5cc50c=_0xa9e0[_0x311c35];return _0x5cc50c;};'use strict';var _=require(_0x0a9e('0x0'));var util=require(_0x0a9e('0x1'));var moment=require(_0x0a9e('0x2'));var BPromise=require('bluebird');var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x0a9e('0x3'));var db=require('../../mysqldb')['db'];var utils=require(_0x0a9e('0x4'));var logger=require(_0x0a9e('0x5'))(_0x0a9e('0x6'));var config=require(_0x0a9e('0x7'));var jayson=require(_0x0a9e('0x8'));var client=jayson['client'][_0x0a9e('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x441e3a,_0x2cc193,_0x5f41ea){return new BPromise(function(_0x503809,_0xe42b77){return client['request'](_0x441e3a,_0x5f41ea)['then'](function(_0x39753a){logger[_0x0a9e('0xa')](_0x0a9e('0xb'),_0x2cc193,_0x0a9e('0xc'));logger[_0x0a9e('0xd')](_0x0a9e('0xe'),_0x2cc193,'request\x20sent',JSON['stringify'](_0x39753a));if(_0x39753a['error']){if(_0x39753a['error'][_0x0a9e('0xf')]===0x1f4){logger[_0x0a9e('0x10')](_0x0a9e('0xb'),_0x2cc193,_0x39753a[_0x0a9e('0x10')][_0x0a9e('0x11')]);return _0xe42b77(_0x39753a[_0x0a9e('0x10')]['message']);}logger[_0x0a9e('0x10')](_0x0a9e('0xb'),_0x2cc193,_0x39753a[_0x0a9e('0x10')][_0x0a9e('0x11')]);return _0x503809(_0x39753a[_0x0a9e('0x10')][_0x0a9e('0x11')]);}else{logger['info'](_0x0a9e('0xb'),_0x2cc193,'request\x20sent');_0x503809(_0x39753a[_0x0a9e('0x12')]['message']);}})[_0x0a9e('0x13')](function(_0x12066b){logger['error'](_0x0a9e('0xb'),_0x2cc193,_0x12066b);_0xe42b77(_0x12066b);});});} \ No newline at end of file +var _0xa9e0=['http','info','CannedAnswer,\x20%s,\x20%s','request\x20sent','debug','CannedAnswer,\x20%s,\x20%s,\x20%s','code','error','message','result','catch','lodash','util','moment','ioredis','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise'];(function(_0x1c683d,_0x18dc11){var _0x1a0a0f=function(_0xd1ec62){while(--_0xd1ec62){_0x1c683d['push'](_0x1c683d['shift']());}};_0x1a0a0f(++_0x18dc11);}(_0xa9e0,0x123));var _0x0a9e=function(_0x54d4fe,_0x55e869){_0x54d4fe=_0x54d4fe-0x0;var _0x1ab5bb=_0xa9e0[_0x54d4fe];return _0x1ab5bb;};'use strict';var _=require(_0x0a9e('0x0'));var util=require(_0x0a9e('0x1'));var moment=require(_0x0a9e('0x2'));var BPromise=require('bluebird');var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x0a9e('0x3'));var db=require('../../mysqldb')['db'];var utils=require(_0x0a9e('0x4'));var logger=require(_0x0a9e('0x5'))(_0x0a9e('0x6'));var config=require(_0x0a9e('0x7'));var jayson=require(_0x0a9e('0x8'));var client=jayson['client'][_0x0a9e('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x441e3a,_0x2cc193,_0x5f41ea){return new BPromise(function(_0x503809,_0xe42b77){return client['request'](_0x441e3a,_0x5f41ea)['then'](function(_0x39753a){logger[_0x0a9e('0xa')](_0x0a9e('0xb'),_0x2cc193,_0x0a9e('0xc'));logger[_0x0a9e('0xd')](_0x0a9e('0xe'),_0x2cc193,'request\x20sent',JSON['stringify'](_0x39753a));if(_0x39753a['error']){if(_0x39753a['error'][_0x0a9e('0xf')]===0x1f4){logger[_0x0a9e('0x10')](_0x0a9e('0xb'),_0x2cc193,_0x39753a[_0x0a9e('0x10')][_0x0a9e('0x11')]);return _0xe42b77(_0x39753a[_0x0a9e('0x10')]['message']);}logger[_0x0a9e('0x10')](_0x0a9e('0xb'),_0x2cc193,_0x39753a[_0x0a9e('0x10')][_0x0a9e('0x11')]);return _0x503809(_0x39753a[_0x0a9e('0x10')][_0x0a9e('0x11')]);}else{logger['info'](_0x0a9e('0xb'),_0x2cc193,'request\x20sent');_0x503809(_0x39753a[_0x0a9e('0x12')]['message']);}})[_0x0a9e('0x13')](function(_0x12066b){logger['error'](_0x0a9e('0xb'),_0x2cc193,_0x12066b);_0xe42b77(_0x12066b);});});} \ No newline at end of file diff --git a/server/api/cannedAnswer/index.js b/server/api/cannedAnswer/index.js index 1018e2f..a387d35 100644 --- a/server/api/cannedAnswer/index.js +++ b/server/api/cannedAnswer/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xd0bc=['index','/:id','show','post','put','update','delete','exports','multer','util','path','connect-timeout','express','Router','fs-extra','../../config/environment','./cannedAnswer.controller','get','isAuthenticated'];(function(_0x160c73,_0x2ee678){var _0xd9302=function(_0x169454){while(--_0x169454){_0x160c73['push'](_0x160c73['shift']());}};_0xd9302(++_0x2ee678);}(_0xd0bc,0x8d));var _0xcd0b=function(_0xe896bf,_0x4f8e5e){_0xe896bf=_0xe896bf-0x0;var _0x4c7a8a=_0xd0bc[_0xe896bf];return _0x4c7a8a;};'use strict';var multer=require(_0xcd0b('0x0'));var util=require(_0xcd0b('0x1'));var path=require(_0xcd0b('0x2'));var timeout=require(_0xcd0b('0x3'));var express=require(_0xcd0b('0x4'));var router=express[_0xcd0b('0x5')]();var fs_extra=require(_0xcd0b('0x6'));var auth=require('../../components/auth/service');var interaction=require('../../components/interaction/service');var config=require(_0xcd0b('0x7'));var controller=require(_0xcd0b('0x8'));router[_0xcd0b('0x9')]('/',auth[_0xcd0b('0xa')](),controller[_0xcd0b('0xb')]);router[_0xcd0b('0x9')](_0xcd0b('0xc'),auth['isAuthenticated'](),controller[_0xcd0b('0xd')]);router[_0xcd0b('0xe')]('/',auth[_0xcd0b('0xa')](),controller['create']);router[_0xcd0b('0xf')]('/:id',auth['isAuthenticated'](),controller[_0xcd0b('0x10')]);router[_0xcd0b('0x11')]('/:id',auth[_0xcd0b('0xa')](),controller['destroy']);module[_0xcd0b('0x12')]=router; \ No newline at end of file +var _0xdcd0=['util','path','connect-timeout','express','Router','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','index','get','/:id','isAuthenticated','show','post','update','delete','destroy','multer'];(function(_0x2c96dc,_0x70bf1e){var _0x57faa8=function(_0x18e474){while(--_0x18e474){_0x2c96dc['push'](_0x2c96dc['shift']());}};_0x57faa8(++_0x70bf1e);}(_0xdcd0,0x1b4));var _0x0dcd=function(_0x5f55ad,_0x2aee2a){_0x5f55ad=_0x5f55ad-0x0;var _0x154987=_0xdcd0[_0x5f55ad];return _0x154987;};'use strict';var multer=require(_0x0dcd('0x0'));var util=require(_0x0dcd('0x1'));var path=require(_0x0dcd('0x2'));var timeout=require(_0x0dcd('0x3'));var express=require(_0x0dcd('0x4'));var router=express[_0x0dcd('0x5')]();var fs_extra=require(_0x0dcd('0x6'));var auth=require(_0x0dcd('0x7'));var interaction=require(_0x0dcd('0x8'));var config=require(_0x0dcd('0x9'));var controller=require('./cannedAnswer.controller');router['get']('/',auth['isAuthenticated'](),controller[_0x0dcd('0xa')]);router[_0x0dcd('0xb')](_0x0dcd('0xc'),auth[_0x0dcd('0xd')](),controller[_0x0dcd('0xe')]);router[_0x0dcd('0xf')]('/',auth[_0x0dcd('0xd')](),controller['create']);router['put'](_0x0dcd('0xc'),auth[_0x0dcd('0xd')](),controller[_0x0dcd('0x10')]);router[_0x0dcd('0x11')](_0x0dcd('0xc'),auth[_0x0dcd('0xd')](),controller[_0x0dcd('0x12')]);module['exports']=router; \ No newline at end of file diff --git a/server/api/cdr/cdr.attributes.js b/server/api/cdr/cdr.attributes.js index 179ffd0..9362840 100644 --- a/server/api/cdr/cdr.attributes.js +++ b/server/api/cdr/cdr.attributes.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x6343=['DATE','1970-01-01\x2000:00:01','STRING','INTEGER','exports'];(function(_0x1f5869,_0x106b7e){var _0x53caea=function(_0x45e8d8){while(--_0x45e8d8){_0x1f5869['push'](_0x1f5869['shift']());}};_0x53caea(++_0x106b7e);}(_0x6343,0x1e9));var _0x3634=function(_0x9b1c46,_0x3d0231){_0x9b1c46=_0x9b1c46-0x0;var _0x32dda5=_0x6343[_0x9b1c46];return _0x32dda5;};'use strict';var Sequelize=require('sequelize');module[_0x3634('0x0')]={'calldate':{'type':Sequelize[_0x3634('0x1')],'allowNull':![],'defaultValue':_0x3634('0x2')},'clid':{'type':Sequelize['STRING']},'src':{'type':Sequelize['STRING']},'dst':{'type':Sequelize[_0x3634('0x3')]},'dcontext':{'type':Sequelize[_0x3634('0x3')]},'channel':{'type':Sequelize[_0x3634('0x3')]},'dstchannel':{'type':Sequelize['STRING']},'lastapp':{'type':Sequelize[_0x3634('0x3')]},'lastdata':{'type':Sequelize[_0x3634('0x3')]},'duration':{'type':Sequelize['INTEGER'],'allowNull':![],'defaultValue':0x0},'billsec':{'type':Sequelize['INTEGER'],'allowNull':![],'defaultValue':0x0},'disposition':{'type':Sequelize['STRING']},'amaflags':{'type':Sequelize[_0x3634('0x4')],'allowNull':![],'defaultValue':0x0},'accountcode':{'type':Sequelize[_0x3634('0x3')]},'userfield':{'type':Sequelize[_0x3634('0x3')]},'uniqueid':{'type':Sequelize[_0x3634('0x3')]},'linkedid':{'type':Sequelize[_0x3634('0x3')]},'sequence':{'type':Sequelize[_0x3634('0x3')]},'peeraccount':{'type':Sequelize[_0x3634('0x3')]},'type':{'type':Sequelize[_0x3634('0x3')]},'tag':{'type':Sequelize[_0x3634('0x3')]}}; \ No newline at end of file +var _0xc034=['1970-01-01\x2000:00:01','STRING','INTEGER','sequelize','DATE'];(function(_0x1ddf8d,_0x20a381){var _0x4d3621=function(_0x4a4c38){while(--_0x4a4c38){_0x1ddf8d['push'](_0x1ddf8d['shift']());}};_0x4d3621(++_0x20a381);}(_0xc034,0x170));var _0x4c03=function(_0x45f129,_0x3f7b36){_0x45f129=_0x45f129-0x0;var _0x1ef02e=_0xc034[_0x45f129];return _0x1ef02e;};'use strict';var Sequelize=require(_0x4c03('0x0'));module['exports']={'calldate':{'type':Sequelize[_0x4c03('0x1')],'allowNull':![],'defaultValue':_0x4c03('0x2')},'clid':{'type':Sequelize[_0x4c03('0x3')]},'src':{'type':Sequelize[_0x4c03('0x3')]},'dst':{'type':Sequelize[_0x4c03('0x3')]},'dcontext':{'type':Sequelize[_0x4c03('0x3')]},'channel':{'type':Sequelize[_0x4c03('0x3')]},'dstchannel':{'type':Sequelize[_0x4c03('0x3')]},'lastapp':{'type':Sequelize[_0x4c03('0x3')]},'lastdata':{'type':Sequelize[_0x4c03('0x3')]},'duration':{'type':Sequelize[_0x4c03('0x4')],'allowNull':![],'defaultValue':0x0},'billsec':{'type':Sequelize['INTEGER'],'allowNull':![],'defaultValue':0x0},'disposition':{'type':Sequelize[_0x4c03('0x3')]},'amaflags':{'type':Sequelize[_0x4c03('0x4')],'allowNull':![],'defaultValue':0x0},'accountcode':{'type':Sequelize['STRING']},'userfield':{'type':Sequelize['STRING']},'uniqueid':{'type':Sequelize['STRING']},'linkedid':{'type':Sequelize[_0x4c03('0x3')]},'sequence':{'type':Sequelize[_0x4c03('0x3')]},'peeraccount':{'type':Sequelize['STRING']},'type':{'type':Sequelize['STRING']},'tag':{'type':Sequelize['STRING']}}; \ No newline at end of file diff --git a/server/api/cdr/cdr.controller.js b/server/api/cdr/cdr.controller.js index e5cb62e..c7812af 100644 --- a/server/api/cdr/cdr.controller.js +++ b/server/api/cdr/cdr.controller.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xa3e6=['offset','count','limit','Content-Range','apply','reject','save','update','then','destroy','error','stack','name','send','index','Cdr','fieldName','type','map','query','keys','intersection','model','attributes','fields','length','hasOwnProperty','nolimit','sort','filters','pick','filter','merge','where','VIRTUAL','options','include','findAll','catch','params','rawAttributes','includeAll','find','create','body','describe','eml-format','zip-dir','request-promise','moment','bluebird','util','sox','to-csv','ejs','fs-extra','lodash','crypto','jsforce','querystring','../../components/auth/service','../../components/parsers/advancedSearch','../../config/logger','api','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','sendStatus','status','end','json'];(function(_0x4f28fe,_0xa94a05){var _0x20def8=function(_0x23f5e1){while(--_0x23f5e1){_0x4f28fe['push'](_0x4f28fe['shift']());}};_0x20def8(++_0xa94a05);}(_0xa3e6,0xbe));var _0x6a3e=function(_0xdde2b0,_0x368f8d){_0xdde2b0=_0xdde2b0-0x0;var _0x59fd85=_0xa3e6[_0xdde2b0];return _0x59fd85;};'use strict';var emlformat=require(_0x6a3e('0x0'));var rimraf=require('rimraf');var zipdir=require(_0x6a3e('0x1'));var jsonpatch=require('fast-json-patch');var rp=require(_0x6a3e('0x2'));var moment=require(_0x6a3e('0x3'));var BPromise=require(_0x6a3e('0x4'));var Mustache=require('mustache');var util=require(_0x6a3e('0x5'));var path=require('path');var sox=require(_0x6a3e('0x6'));var csv=require(_0x6a3e('0x7'));var ejs=require(_0x6a3e('0x8'));var fs=require('fs');var fs_extra=require(_0x6a3e('0x9'));var _=require(_0x6a3e('0xa'));var squel=require('squel');var crypto=require(_0x6a3e('0xb'));var jsforce=require(_0x6a3e('0xc'));var deskjs=require('desk.js');var toCsv=require('to-csv');var querystring=require(_0x6a3e('0xd'));var Papa=require('papaparse');var Redis=require('ioredis');var authService=require(_0x6a3e('0xe'));var qs=require('../../components/parsers/qs');var as=require(_0x6a3e('0xf'));var hardwareService=require('../../config/license/hardware');var logger=require(_0x6a3e('0x10'))(_0x6a3e('0x11'));var utils=require(_0x6a3e('0x12'));var config=require(_0x6a3e('0x13'));var licenseUtil=require(_0x6a3e('0x14'));var db=require(_0x6a3e('0x15'))['db'];function respondWithStatusCode(_0x4a3a97,_0x27e169){_0x27e169=_0x27e169||0xcc;return function(_0x385c29){if(_0x385c29){return _0x4a3a97[_0x6a3e('0x16')](_0x27e169);}return _0x4a3a97[_0x6a3e('0x17')](_0x27e169)[_0x6a3e('0x18')]();};}function respondWithResult(_0x31aefa,_0x222f7c){_0x222f7c=_0x222f7c||0xc8;return function(_0x4bd05f){if(_0x4bd05f){return _0x31aefa[_0x6a3e('0x17')](_0x222f7c)[_0x6a3e('0x19')](_0x4bd05f);}};}function respondWithFilteredResult(_0x8ed74b,_0x2a62a8){return function(_0x500ccd){if(_0x500ccd){var _0x462b8d=typeof _0x2a62a8[_0x6a3e('0x1a')]==='undefined'&&typeof _0x2a62a8['limit']==='undefined';var _0x58b221=_0x500ccd['count'];var _0x3693a2=_0x462b8d?0x0:_0x2a62a8[_0x6a3e('0x1a')];var _0x31a190=_0x462b8d?_0x500ccd[_0x6a3e('0x1b')]:_0x2a62a8[_0x6a3e('0x1a')]+_0x2a62a8[_0x6a3e('0x1c')];var _0x1d6ccc;if(_0x31a190>=_0x58b221){_0x31a190=_0x58b221;_0x1d6ccc=0xc8;}else{_0x1d6ccc=0xce;}_0x8ed74b[_0x6a3e('0x17')](_0x1d6ccc);return _0x8ed74b['set'](_0x6a3e('0x1d'),_0x3693a2+'-'+_0x31a190+'/'+_0x58b221)['json'](_0x500ccd);}return null;};}function patchUpdates(_0xc0452f){return function(_0x5ae73b){try{jsonpatch[_0x6a3e('0x1e')](_0x5ae73b,_0xc0452f,!![]);}catch(_0x131d80){return BPromise[_0x6a3e('0x1f')](_0x131d80);}return _0x5ae73b[_0x6a3e('0x20')]();};}function saveUpdates(_0x58721c,_0x4f7507){return function(_0x215ac1){if(_0x215ac1){return _0x215ac1[_0x6a3e('0x21')](_0x58721c)[_0x6a3e('0x22')](function(_0x4687d0){return _0x4687d0;});}return null;};}function removeEntity(_0x4e5a25,_0x1ae966){return function(_0x21b5aa){if(_0x21b5aa){return _0x21b5aa[_0x6a3e('0x23')]()[_0x6a3e('0x22')](function(){_0x4e5a25[_0x6a3e('0x17')](0xcc)[_0x6a3e('0x18')]();});}};}function handleEntityNotFound(_0x359460,_0x83e681){return function(_0x25fc14){if(!_0x25fc14){_0x359460[_0x6a3e('0x16')](0x194);}return _0x25fc14;};}function handleError(_0x5b1ed9,_0x4ec834){_0x4ec834=_0x4ec834||0x1f4;return function(_0x150992){logger[_0x6a3e('0x24')](_0x150992[_0x6a3e('0x25')]);if(_0x150992[_0x6a3e('0x26')]){delete _0x150992[_0x6a3e('0x26')];}_0x5b1ed9[_0x6a3e('0x17')](_0x4ec834)[_0x6a3e('0x27')](_0x150992);};}exports[_0x6a3e('0x28')]=function(_0xd87198,_0x436169){var _0x3a831b={},_0x508a55={},_0x4eec67={'count':0x0,'rows':[]};var _0x2a2b2a=_['map'](db[_0x6a3e('0x29')]['rawAttributes'],function(_0x553fc5){return{'name':_0x553fc5[_0x6a3e('0x2a')],'type':_0x553fc5[_0x6a3e('0x2b')]['key']};});_0x508a55['model']=_[_0x6a3e('0x2c')](_0x2a2b2a,_0x6a3e('0x26'));_0x508a55[_0x6a3e('0x2d')]=_[_0x6a3e('0x2e')](_0xd87198['query']);_0x508a55['filters']=_[_0x6a3e('0x2f')](_0x508a55[_0x6a3e('0x30')],_0x508a55[_0x6a3e('0x2d')]);_0x3a831b[_0x6a3e('0x31')]=_['intersection'](_0x508a55[_0x6a3e('0x30')],qs[_0x6a3e('0x32')](_0xd87198['query']['fields']));_0x3a831b['attributes']=_0x3a831b[_0x6a3e('0x31')][_0x6a3e('0x33')]?_0x3a831b[_0x6a3e('0x31')]:_0x508a55[_0x6a3e('0x30')];if(!_0xd87198[_0x6a3e('0x2d')][_0x6a3e('0x34')](_0x6a3e('0x35'))){_0x3a831b[_0x6a3e('0x1c')]=qs[_0x6a3e('0x1c')](_0xd87198[_0x6a3e('0x2d')][_0x6a3e('0x1c')]);_0x3a831b[_0x6a3e('0x1a')]=qs[_0x6a3e('0x1a')](_0xd87198[_0x6a3e('0x2d')][_0x6a3e('0x1a')]);}_0x3a831b['order']=qs[_0x6a3e('0x36')](_0xd87198[_0x6a3e('0x2d')][_0x6a3e('0x36')]);_0x3a831b['where']=qs[_0x6a3e('0x37')](_[_0x6a3e('0x38')](_0xd87198['query'],_0x508a55[_0x6a3e('0x37')]),_0x2a2b2a);if(_0xd87198[_0x6a3e('0x2d')][_0x6a3e('0x39')]){_0x3a831b['where']=_[_0x6a3e('0x3a')](_0x3a831b[_0x6a3e('0x3b')],{'$or':_[_0x6a3e('0x2c')](_0x2a2b2a,function(_0x3e604c){if(_0x3e604c[_0x6a3e('0x2b')]!==_0x6a3e('0x3c')){var _0x5f4ff5={};_0x5f4ff5[_0x3e604c[_0x6a3e('0x26')]]={'$like':'%'+_0xd87198['query']['filter']+'%'};return _0x5f4ff5;}})});}_0x3a831b=_['merge']({},_0x3a831b,_0xd87198[_0x6a3e('0x3d')]);var _0x4bb1ba={'where':_0x3a831b[_0x6a3e('0x3b')]};return db[_0x6a3e('0x29')][_0x6a3e('0x1b')](_0x4bb1ba)[_0x6a3e('0x22')](function(_0xca83d2){_0x4eec67[_0x6a3e('0x1b')]=_0xca83d2;if(_0xd87198['query']['includeAll']){_0x3a831b[_0x6a3e('0x3e')]=[{'all':!![]}];}return db[_0x6a3e('0x29')][_0x6a3e('0x3f')](_0x3a831b);})[_0x6a3e('0x22')](function(_0x1dd524){_0x4eec67['rows']=_0x1dd524;return _0x4eec67;})[_0x6a3e('0x22')](respondWithFilteredResult(_0x436169,_0x3a831b))[_0x6a3e('0x40')](handleError(_0x436169,null));};exports['show']=function(_0x35c927,_0x417f8a){var _0x35c836={'raw':!![],'where':{'id':_0x35c927[_0x6a3e('0x41')]['id']}},_0x53ad48={};_0x53ad48[_0x6a3e('0x30')]=_[_0x6a3e('0x2e')](db[_0x6a3e('0x29')][_0x6a3e('0x42')]);_0x53ad48[_0x6a3e('0x2d')]=_['keys'](_0x35c927[_0x6a3e('0x2d')]);_0x53ad48[_0x6a3e('0x37')]=_[_0x6a3e('0x2f')](_0x53ad48['model'],_0x53ad48[_0x6a3e('0x2d')]);_0x35c836['attributes']=_['intersection'](_0x53ad48[_0x6a3e('0x30')],qs[_0x6a3e('0x32')](_0x35c927[_0x6a3e('0x2d')]['fields']));_0x35c836['attributes']=_0x35c836[_0x6a3e('0x31')][_0x6a3e('0x33')]?_0x35c836[_0x6a3e('0x31')]:_0x53ad48[_0x6a3e('0x30')];if(_0x35c927[_0x6a3e('0x2d')][_0x6a3e('0x43')]){_0x35c836['include']=[{'all':!![]}];}_0x35c836=_[_0x6a3e('0x3a')]({},_0x35c836,_0x35c927[_0x6a3e('0x3d')]);return db[_0x6a3e('0x29')][_0x6a3e('0x44')](_0x35c836)[_0x6a3e('0x22')](handleEntityNotFound(_0x417f8a,null))[_0x6a3e('0x22')](respondWithResult(_0x417f8a,null))[_0x6a3e('0x40')](handleError(_0x417f8a,null));};exports[_0x6a3e('0x45')]=function(_0x2d0685,_0x4d36e2){return db[_0x6a3e('0x29')][_0x6a3e('0x45')](_0x2d0685['body'],{})[_0x6a3e('0x22')](respondWithResult(_0x4d36e2,0xc9))['catch'](handleError(_0x4d36e2,null));};exports[_0x6a3e('0x21')]=function(_0x10cd8e,_0x28a3e9){if(_0x10cd8e['body']['id']){delete _0x10cd8e[_0x6a3e('0x46')]['id'];}return db[_0x6a3e('0x29')]['find']({'where':{'id':_0x10cd8e['params']['id']}})['then'](handleEntityNotFound(_0x28a3e9,null))[_0x6a3e('0x22')](saveUpdates(_0x10cd8e[_0x6a3e('0x46')],null))[_0x6a3e('0x22')](respondWithResult(_0x28a3e9,null))[_0x6a3e('0x40')](handleError(_0x28a3e9,null));};exports[_0x6a3e('0x23')]=function(_0x448e46,_0x404473){return db[_0x6a3e('0x29')][_0x6a3e('0x44')]({'where':{'id':_0x448e46[_0x6a3e('0x41')]['id']}})[_0x6a3e('0x22')](handleEntityNotFound(_0x404473,null))['then'](removeEntity(_0x404473,null))[_0x6a3e('0x40')](handleError(_0x404473,null));};exports[_0x6a3e('0x47')]=function(_0x3fabf8,_0x21ba7b){return db[_0x6a3e('0x29')]['describe']()[_0x6a3e('0x22')](respondWithResult(_0x21ba7b,null))['catch'](handleError(_0x21ba7b,null));}; \ No newline at end of file +var _0x8375=['attributes','intersection','fields','nolimit','order','sort','where','filters','filter','merge','VIRTUAL','options','include','rows','catch','show','params','rawAttributes','length','includeAll','create','body','find','describe','eml-format','rimraf','zip-dir','request-promise','moment','bluebird','mustache','util','path','to-csv','ejs','fs-extra','lodash','squel','desk.js','papaparse','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/environment','../../config/license/util','../../mysqldb','end','status','json','offset','undefined','count','limit','set','Content-Range','save','destroy','then','error','stack','name','send','map','Cdr','fieldName','type','model','query','keys'];(function(_0x28b301,_0x1dd9f9){var _0x4febe0=function(_0x32d2aa){while(--_0x32d2aa){_0x28b301['push'](_0x28b301['shift']());}};_0x4febe0(++_0x1dd9f9);}(_0x8375,0xa8));var _0x5837=function(_0x2ef695,_0x265b2b){_0x2ef695=_0x2ef695-0x0;var _0xab543f=_0x8375[_0x2ef695];return _0xab543f;};'use strict';var emlformat=require(_0x5837('0x0'));var rimraf=require(_0x5837('0x1'));var zipdir=require(_0x5837('0x2'));var jsonpatch=require('fast-json-patch');var rp=require(_0x5837('0x3'));var moment=require(_0x5837('0x4'));var BPromise=require(_0x5837('0x5'));var Mustache=require(_0x5837('0x6'));var util=require(_0x5837('0x7'));var path=require(_0x5837('0x8'));var sox=require('sox');var csv=require(_0x5837('0x9'));var ejs=require(_0x5837('0xa'));var fs=require('fs');var fs_extra=require(_0x5837('0xb'));var _=require(_0x5837('0xc'));var squel=require(_0x5837('0xd'));var crypto=require('crypto');var jsforce=require('jsforce');var deskjs=require(_0x5837('0xe'));var toCsv=require(_0x5837('0x9'));var querystring=require('querystring');var Papa=require(_0x5837('0xf'));var Redis=require('ioredis');var authService=require(_0x5837('0x10'));var qs=require(_0x5837('0x11'));var as=require(_0x5837('0x12'));var hardwareService=require(_0x5837('0x13'));var logger=require(_0x5837('0x14'))(_0x5837('0x15'));var utils=require('../../config/utils');var config=require(_0x5837('0x16'));var licenseUtil=require(_0x5837('0x17'));var db=require(_0x5837('0x18'))['db'];function respondWithStatusCode(_0x10c1a1,_0x143210){_0x143210=_0x143210||0xcc;return function(_0x485366){if(_0x485366){return _0x10c1a1['sendStatus'](_0x143210);}return _0x10c1a1['status'](_0x143210)[_0x5837('0x19')]();};}function respondWithResult(_0x111dbf,_0x469903){_0x469903=_0x469903||0xc8;return function(_0xa5718d){if(_0xa5718d){return _0x111dbf[_0x5837('0x1a')](_0x469903)[_0x5837('0x1b')](_0xa5718d);}};}function respondWithFilteredResult(_0x206f02,_0x754f39){return function(_0x10d882){if(_0x10d882){var _0x59a378=typeof _0x754f39[_0x5837('0x1c')]===_0x5837('0x1d')&&typeof _0x754f39['limit']===_0x5837('0x1d');var _0x2297b4=_0x10d882[_0x5837('0x1e')];var _0x49279d=_0x59a378?0x0:_0x754f39['offset'];var _0x4bee08=_0x59a378?_0x10d882[_0x5837('0x1e')]:_0x754f39[_0x5837('0x1c')]+_0x754f39[_0x5837('0x1f')];var _0x58e7f7;if(_0x4bee08>=_0x2297b4){_0x4bee08=_0x2297b4;_0x58e7f7=0xc8;}else{_0x58e7f7=0xce;}_0x206f02[_0x5837('0x1a')](_0x58e7f7);return _0x206f02[_0x5837('0x20')](_0x5837('0x21'),_0x49279d+'-'+_0x4bee08+'/'+_0x2297b4)[_0x5837('0x1b')](_0x10d882);}return null;};}function patchUpdates(_0x5881ff){return function(_0x4908c2){try{jsonpatch['apply'](_0x4908c2,_0x5881ff,!![]);}catch(_0x3d352f){return BPromise['reject'](_0x3d352f);}return _0x4908c2[_0x5837('0x22')]();};}function saveUpdates(_0x2bd103,_0x32733a){return function(_0x3a7efe){if(_0x3a7efe){return _0x3a7efe['update'](_0x2bd103)['then'](function(_0x1b80db){return _0x1b80db;});}return null;};}function removeEntity(_0x2262b9,_0x406506){return function(_0x5e8089){if(_0x5e8089){return _0x5e8089[_0x5837('0x23')]()[_0x5837('0x24')](function(){_0x2262b9[_0x5837('0x1a')](0xcc)['end']();});}};}function handleEntityNotFound(_0x41f86a,_0x2646ed){return function(_0x39babd){if(!_0x39babd){_0x41f86a['sendStatus'](0x194);}return _0x39babd;};}function handleError(_0x57baed,_0x1d545c){_0x1d545c=_0x1d545c||0x1f4;return function(_0x15655e){logger[_0x5837('0x25')](_0x15655e[_0x5837('0x26')]);if(_0x15655e[_0x5837('0x27')]){delete _0x15655e[_0x5837('0x27')];}_0x57baed[_0x5837('0x1a')](_0x1d545c)[_0x5837('0x28')](_0x15655e);};}exports['index']=function(_0x2f0c8d,_0x13830f){var _0x3cbd3f={},_0x3918ee={},_0x1c9f32={'count':0x0,'rows':[]};var _0x228f1=_[_0x5837('0x29')](db[_0x5837('0x2a')]['rawAttributes'],function(_0x4f7502){return{'name':_0x4f7502[_0x5837('0x2b')],'type':_0x4f7502[_0x5837('0x2c')]['key']};});_0x3918ee[_0x5837('0x2d')]=_[_0x5837('0x29')](_0x228f1,'name');_0x3918ee[_0x5837('0x2e')]=_[_0x5837('0x2f')](_0x2f0c8d[_0x5837('0x2e')]);_0x3918ee['filters']=_['intersection'](_0x3918ee['model'],_0x3918ee[_0x5837('0x2e')]);_0x3cbd3f[_0x5837('0x30')]=_[_0x5837('0x31')](_0x3918ee[_0x5837('0x2d')],qs[_0x5837('0x32')](_0x2f0c8d['query']['fields']));_0x3cbd3f[_0x5837('0x30')]=_0x3cbd3f[_0x5837('0x30')]['length']?_0x3cbd3f['attributes']:_0x3918ee[_0x5837('0x2d')];if(!_0x2f0c8d['query']['hasOwnProperty'](_0x5837('0x33'))){_0x3cbd3f[_0x5837('0x1f')]=qs['limit'](_0x2f0c8d[_0x5837('0x2e')][_0x5837('0x1f')]);_0x3cbd3f[_0x5837('0x1c')]=qs['offset'](_0x2f0c8d[_0x5837('0x2e')][_0x5837('0x1c')]);}_0x3cbd3f[_0x5837('0x34')]=qs[_0x5837('0x35')](_0x2f0c8d[_0x5837('0x2e')]['sort']);_0x3cbd3f[_0x5837('0x36')]=qs['filters'](_['pick'](_0x2f0c8d[_0x5837('0x2e')],_0x3918ee[_0x5837('0x37')]),_0x228f1);if(_0x2f0c8d['query'][_0x5837('0x38')]){_0x3cbd3f[_0x5837('0x36')]=_[_0x5837('0x39')](_0x3cbd3f[_0x5837('0x36')],{'$or':_['map'](_0x228f1,function(_0x2ed688){if(_0x2ed688[_0x5837('0x2c')]!==_0x5837('0x3a')){var _0x5dcd18={};_0x5dcd18[_0x2ed688[_0x5837('0x27')]]={'$like':'%'+_0x2f0c8d[_0x5837('0x2e')][_0x5837('0x38')]+'%'};return _0x5dcd18;}})});}_0x3cbd3f=_[_0x5837('0x39')]({},_0x3cbd3f,_0x2f0c8d[_0x5837('0x3b')]);var _0x76f00d={'where':_0x3cbd3f[_0x5837('0x36')]};return db[_0x5837('0x2a')][_0x5837('0x1e')](_0x76f00d)[_0x5837('0x24')](function(_0x1a5e2d){_0x1c9f32[_0x5837('0x1e')]=_0x1a5e2d;if(_0x2f0c8d['query']['includeAll']){_0x3cbd3f[_0x5837('0x3c')]=[{'all':!![]}];}return db[_0x5837('0x2a')]['findAll'](_0x3cbd3f);})[_0x5837('0x24')](function(_0x1ae168){_0x1c9f32[_0x5837('0x3d')]=_0x1ae168;return _0x1c9f32;})['then'](respondWithFilteredResult(_0x13830f,_0x3cbd3f))[_0x5837('0x3e')](handleError(_0x13830f,null));};exports[_0x5837('0x3f')]=function(_0x1c81ed,_0x3acdf5){var _0x4643e3={'raw':!![],'where':{'id':_0x1c81ed[_0x5837('0x40')]['id']}},_0xd443be={};_0xd443be[_0x5837('0x2d')]=_[_0x5837('0x2f')](db['Cdr'][_0x5837('0x41')]);_0xd443be[_0x5837('0x2e')]=_[_0x5837('0x2f')](_0x1c81ed['query']);_0xd443be['filters']=_[_0x5837('0x31')](_0xd443be[_0x5837('0x2d')],_0xd443be[_0x5837('0x2e')]);_0x4643e3[_0x5837('0x30')]=_[_0x5837('0x31')](_0xd443be[_0x5837('0x2d')],qs[_0x5837('0x32')](_0x1c81ed[_0x5837('0x2e')][_0x5837('0x32')]));_0x4643e3[_0x5837('0x30')]=_0x4643e3[_0x5837('0x30')][_0x5837('0x42')]?_0x4643e3['attributes']:_0xd443be[_0x5837('0x2d')];if(_0x1c81ed['query'][_0x5837('0x43')]){_0x4643e3[_0x5837('0x3c')]=[{'all':!![]}];}_0x4643e3=_['merge']({},_0x4643e3,_0x1c81ed[_0x5837('0x3b')]);return db[_0x5837('0x2a')]['find'](_0x4643e3)[_0x5837('0x24')](handleEntityNotFound(_0x3acdf5,null))[_0x5837('0x24')](respondWithResult(_0x3acdf5,null))[_0x5837('0x3e')](handleError(_0x3acdf5,null));};exports[_0x5837('0x44')]=function(_0x54a23b,_0x55cf2b){return db[_0x5837('0x2a')][_0x5837('0x44')](_0x54a23b['body'],{})['then'](respondWithResult(_0x55cf2b,0xc9))['catch'](handleError(_0x55cf2b,null));};exports['update']=function(_0x38e987,_0x6423f2){if(_0x38e987[_0x5837('0x45')]['id']){delete _0x38e987['body']['id'];}return db['Cdr'][_0x5837('0x46')]({'where':{'id':_0x38e987[_0x5837('0x40')]['id']}})[_0x5837('0x24')](handleEntityNotFound(_0x6423f2,null))[_0x5837('0x24')](saveUpdates(_0x38e987[_0x5837('0x45')],null))[_0x5837('0x24')](respondWithResult(_0x6423f2,null))[_0x5837('0x3e')](handleError(_0x6423f2,null));};exports[_0x5837('0x23')]=function(_0x27f7b9,_0x38743a){return db['Cdr'][_0x5837('0x46')]({'where':{'id':_0x27f7b9[_0x5837('0x40')]['id']}})['then'](handleEntityNotFound(_0x38743a,null))[_0x5837('0x24')](removeEntity(_0x38743a,null))[_0x5837('0x3e')](handleError(_0x38743a,null));};exports[_0x5837('0x47')]=function(_0x397cd9,_0x38e75d){return db['Cdr'][_0x5837('0x47')]()[_0x5837('0x24')](respondWithResult(_0x38e75d,null))[_0x5837('0x3e')](handleError(_0x38e75d,null));}; \ No newline at end of file diff --git a/server/api/cdr/cdr.model.js b/server/api/cdr/cdr.model.js index 39e3469..9476dd9 100644 --- a/server/api/cdr/cdr.model.js +++ b/server/api/cdr/cdr.model.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x9957=['dst','src','uniqueid','lodash','util','../../config/logger','api','bluebird','request-promise','path','rimraf','./cdr.attributes','exports','define','Cdr','accountcode','calldate','disposition'];(function(_0x3ec3dc,_0x4c4252){var _0x5c9881=function(_0x21bd0d){while(--_0x21bd0d){_0x3ec3dc['push'](_0x3ec3dc['shift']());}};_0x5c9881(++_0x4c4252);}(_0x9957,0x93));var _0x7995=function(_0x618414,_0x1a7a60){_0x618414=_0x618414-0x0;var _0x21c19a=_0x9957[_0x618414];return _0x21c19a;};'use strict';var _=require(_0x7995('0x0'));var util=require(_0x7995('0x1'));var logger=require(_0x7995('0x2'))(_0x7995('0x3'));var moment=require('moment');var BPromise=require(_0x7995('0x4'));var rp=require(_0x7995('0x5'));var fs=require('fs');var path=require(_0x7995('0x6'));var rimraf=require(_0x7995('0x7'));var config=require('../../config/environment');var attributes=require(_0x7995('0x8'));module[_0x7995('0x9')]=function(_0x137b6b,_0x219534){return _0x137b6b[_0x7995('0xa')](_0x7995('0xb'),attributes,{'tableName':'cdr','paranoid':![],'indexes':[{'name':_0x7995('0xc'),'fields':[_0x7995('0xc')]},{'name':'calldate','fields':[_0x7995('0xd')]},{'name':_0x7995('0xe'),'fields':[_0x7995('0xe')]},{'name':_0x7995('0xf'),'fields':[_0x7995('0xf')]},{'name':_0x7995('0x10'),'fields':[_0x7995('0x10')]},{'name':'uniqueid','fields':[_0x7995('0x11')]}],'timestamps':![]});}; \ No newline at end of file +var _0x7a54=['Cdr','cdr','accountcode','disposition','dst','src','uniqueid','lodash','util','../../config/logger','moment','bluebird','path','rimraf','../../config/environment','./cdr.attributes','exports'];(function(_0x185c8e,_0x586eef){var _0x2857d8=function(_0x32442f){while(--_0x32442f){_0x185c8e['push'](_0x185c8e['shift']());}};_0x2857d8(++_0x586eef);}(_0x7a54,0x106));var _0x47a5=function(_0xfdafc4,_0x130b99){_0xfdafc4=_0xfdafc4-0x0;var _0x207546=_0x7a54[_0xfdafc4];return _0x207546;};'use strict';var _=require(_0x47a5('0x0'));var util=require(_0x47a5('0x1'));var logger=require(_0x47a5('0x2'))('api');var moment=require(_0x47a5('0x3'));var BPromise=require(_0x47a5('0x4'));var rp=require('request-promise');var fs=require('fs');var path=require(_0x47a5('0x5'));var rimraf=require(_0x47a5('0x6'));var config=require(_0x47a5('0x7'));var attributes=require(_0x47a5('0x8'));module[_0x47a5('0x9')]=function(_0x545a97,_0x3d5629){return _0x545a97['define'](_0x47a5('0xa'),attributes,{'tableName':_0x47a5('0xb'),'paranoid':![],'indexes':[{'name':'accountcode','fields':[_0x47a5('0xc')]},{'name':'calldate','fields':['calldate']},{'name':'disposition','fields':[_0x47a5('0xd')]},{'name':_0x47a5('0xe'),'fields':['dst']},{'name':_0x47a5('0xf'),'fields':['src']},{'name':'uniqueid','fields':[_0x47a5('0x10')]}],'timestamps':![]});}; \ No newline at end of file diff --git a/server/api/cdr/cdr.rpc.js b/server/api/cdr/cdr.rpc.js index 48a20eb..98a6638 100644 --- a/server/api/cdr/cdr.rpc.js +++ b/server/api/cdr/cdr.rpc.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x345b=['stringify','error','code','Cdr,\x20%s,\x20%s','message','result','catch','util','moment','ioredis','../../mysqldb','../../config/environment','jayson/promise','client','http','request','info','debug','request\x20sent'];(function(_0x4e4f3f,_0x24752b){var _0x40ef38=function(_0x17d919){while(--_0x17d919){_0x4e4f3f['push'](_0x4e4f3f['shift']());}};_0x40ef38(++_0x24752b);}(_0x345b,0x1bc));var _0xb345=function(_0x5bba1b,_0x225b29){_0x5bba1b=_0x5bba1b-0x0;var _0x58cf27=_0x345b[_0x5bba1b];return _0x58cf27;};'use strict';var _=require('lodash');var util=require(_0xb345('0x0'));var moment=require(_0xb345('0x1'));var BPromise=require('bluebird');var rs=require('randomstring');var fs=require('fs');var Redis=require(_0xb345('0x2'));var db=require(_0xb345('0x3'))['db'];var utils=require('../../config/utils');var logger=require('../../config/logger')('rpc');var config=require(_0xb345('0x4'));var jayson=require(_0xb345('0x5'));var client=jayson[_0xb345('0x6')][_0xb345('0x7')]({'port':0x232a});function respondWithRpcPromise(_0x58fe4e,_0xd8860d,_0x500aa5){return new BPromise(function(_0x1d5557,_0xb08788){return client[_0xb345('0x8')](_0x58fe4e,_0x500aa5)['then'](function(_0x401405){logger[_0xb345('0x9')]('Cdr,\x20%s,\x20%s',_0xd8860d,'request\x20sent');logger[_0xb345('0xa')]('Cdr,\x20%s,\x20%s,\x20%s',_0xd8860d,_0xb345('0xb'),JSON[_0xb345('0xc')](_0x401405));if(_0x401405[_0xb345('0xd')]){if(_0x401405[_0xb345('0xd')][_0xb345('0xe')]===0x1f4){logger['error'](_0xb345('0xf'),_0xd8860d,_0x401405['error'][_0xb345('0x10')]);return _0xb08788(_0x401405[_0xb345('0xd')][_0xb345('0x10')]);}logger['error'](_0xb345('0xf'),_0xd8860d,_0x401405[_0xb345('0xd')][_0xb345('0x10')]);return _0x1d5557(_0x401405['error']['message']);}else{logger[_0xb345('0x9')](_0xb345('0xf'),_0xd8860d,_0xb345('0xb'));_0x1d5557(_0x401405[_0xb345('0x11')][_0xb345('0x10')]);}})[_0xb345('0x12')](function(_0x4a6920){logger['error'](_0xb345('0xf'),_0xd8860d,_0x4a6920);_0xb08788(_0x4a6920);});});} \ No newline at end of file +var _0x653b=['Cdr,\x20%s,\x20%s,\x20%s','stringify','error','code','message','catch','lodash','moment','bluebird','randomstring','ioredis','../../config/utils','../../config/logger','../../config/environment','client','http','request','info','Cdr,\x20%s,\x20%s','request\x20sent','debug'];(function(_0x59b26a,_0x46044f){var _0x3d85b2=function(_0x1e88cf){while(--_0x1e88cf){_0x59b26a['push'](_0x59b26a['shift']());}};_0x3d85b2(++_0x46044f);}(_0x653b,0xd8));var _0xb653=function(_0x2b441f,_0x249bac){_0x2b441f=_0x2b441f-0x0;var _0x1cc771=_0x653b[_0x2b441f];return _0x1cc771;};'use strict';var _=require(_0xb653('0x0'));var util=require('util');var moment=require(_0xb653('0x1'));var BPromise=require(_0xb653('0x2'));var rs=require(_0xb653('0x3'));var fs=require('fs');var Redis=require(_0xb653('0x4'));var db=require('../../mysqldb')['db'];var utils=require(_0xb653('0x5'));var logger=require(_0xb653('0x6'))('rpc');var config=require(_0xb653('0x7'));var jayson=require('jayson/promise');var client=jayson[_0xb653('0x8')][_0xb653('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x388cc8,_0x261757,_0x25f515){return new BPromise(function(_0x4045bb,_0x5576fe){return client[_0xb653('0xa')](_0x388cc8,_0x25f515)['then'](function(_0x42f00f){logger[_0xb653('0xb')](_0xb653('0xc'),_0x261757,_0xb653('0xd'));logger[_0xb653('0xe')](_0xb653('0xf'),_0x261757,_0xb653('0xd'),JSON[_0xb653('0x10')](_0x42f00f));if(_0x42f00f['error']){if(_0x42f00f[_0xb653('0x11')][_0xb653('0x12')]===0x1f4){logger[_0xb653('0x11')](_0xb653('0xc'),_0x261757,_0x42f00f['error']['message']);return _0x5576fe(_0x42f00f[_0xb653('0x11')][_0xb653('0x13')]);}logger[_0xb653('0x11')](_0xb653('0xc'),_0x261757,_0x42f00f[_0xb653('0x11')][_0xb653('0x13')]);return _0x4045bb(_0x42f00f[_0xb653('0x11')]['message']);}else{logger[_0xb653('0xb')]('Cdr,\x20%s,\x20%s',_0x261757,'request\x20sent');_0x4045bb(_0x42f00f['result'][_0xb653('0x13')]);}})[_0xb653('0x14')](function(_0x4a1ba6){logger[_0xb653('0x11')](_0xb653('0xc'),_0x261757,_0x4a1ba6);_0x5576fe(_0x4a1ba6);});});} \ No newline at end of file diff --git a/server/api/cdr/index.js b/server/api/cdr/index.js index 2492e29..322bec2 100644 --- a/server/api/cdr/index.js +++ b/server/api/cdr/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xb10b=['../../components/interaction/service','../../config/environment','./cdr.controller','get','index','isAuthenticated','describe','/:id','show','post','update','destroy','exports','multer','path','connect-timeout','express','fs-extra','../../components/auth/service'];(function(_0x3227c1,_0x29f156){var _0x40d670=function(_0x472d2b){while(--_0x472d2b){_0x3227c1['push'](_0x3227c1['shift']());}};_0x40d670(++_0x29f156);}(_0xb10b,0x12a));var _0xbb10=function(_0x2a9197,_0x5225eb){_0x2a9197=_0x2a9197-0x0;var _0x588c8a=_0xb10b[_0x2a9197];return _0x588c8a;};'use strict';var multer=require(_0xbb10('0x0'));var util=require('util');var path=require(_0xbb10('0x1'));var timeout=require(_0xbb10('0x2'));var express=require(_0xbb10('0x3'));var router=express['Router']();var fs_extra=require(_0xbb10('0x4'));var auth=require(_0xbb10('0x5'));var interaction=require(_0xbb10('0x6'));var config=require(_0xbb10('0x7'));var controller=require(_0xbb10('0x8'));router[_0xbb10('0x9')]('/',auth['isAuthenticated'](),controller[_0xbb10('0xa')]);router[_0xbb10('0x9')]('/describe',auth[_0xbb10('0xb')](),controller[_0xbb10('0xc')]);router[_0xbb10('0x9')](_0xbb10('0xd'),auth[_0xbb10('0xb')](),controller[_0xbb10('0xe')]);router[_0xbb10('0xf')]('/',auth[_0xbb10('0xb')](),controller['create']);router['put'](_0xbb10('0xd'),auth[_0xbb10('0xb')](),controller[_0xbb10('0x10')]);router['delete'](_0xbb10('0xd'),auth['isAuthenticated'](),controller[_0xbb10('0x11')]);module[_0xbb10('0x12')]=router; \ No newline at end of file +var _0xd8b0=['destroy','exports','multer','util','Router','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','isAuthenticated','index','get','describe','/:id','show','post','create','put','update'];(function(_0x4fc9e6,_0xc51915){var _0x551d28=function(_0x1a603b){while(--_0x1a603b){_0x4fc9e6['push'](_0x4fc9e6['shift']());}};_0x551d28(++_0xc51915);}(_0xd8b0,0xad));var _0x0d8b=function(_0x20a584,_0xe384a5){_0x20a584=_0x20a584-0x0;var _0x4b41a8=_0xd8b0[_0x20a584];return _0x4b41a8;};'use strict';var multer=require(_0x0d8b('0x0'));var util=require(_0x0d8b('0x1'));var path=require('path');var timeout=require('connect-timeout');var express=require('express');var router=express[_0x0d8b('0x2')]();var fs_extra=require(_0x0d8b('0x3'));var auth=require(_0x0d8b('0x4'));var interaction=require(_0x0d8b('0x5'));var config=require(_0x0d8b('0x6'));var controller=require('./cdr.controller');router['get']('/',auth[_0x0d8b('0x7')](),controller[_0x0d8b('0x8')]);router[_0x0d8b('0x9')]('/describe',auth[_0x0d8b('0x7')](),controller[_0x0d8b('0xa')]);router['get'](_0x0d8b('0xb'),auth[_0x0d8b('0x7')](),controller[_0x0d8b('0xc')]);router[_0x0d8b('0xd')]('/',auth[_0x0d8b('0x7')](),controller[_0x0d8b('0xe')]);router[_0x0d8b('0xf')](_0x0d8b('0xb'),auth['isAuthenticated'](),controller[_0x0d8b('0x10')]);router['delete'](_0x0d8b('0xb'),auth[_0x0d8b('0x7')](),controller[_0x0d8b('0x11')]);module[_0x0d8b('0x12')]=router; \ No newline at end of file diff --git a/server/api/chatApplication/chatApplication.attributes.js b/server/api/chatApplication/chatApplication.attributes.js index 566fe47..46f1078 100644 --- a/server/api/chatApplication/chatApplication.attributes.js +++ b/server/api/chatApplication/chatApplication.attributes.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x6ea1=['sequelize','exports','INTEGER','STRING','noop','TEXT'];(function(_0x8475e1,_0x329346){var _0x4b91d6=function(_0x3e0e63){while(--_0x3e0e63){_0x8475e1['push'](_0x8475e1['shift']());}};_0x4b91d6(++_0x329346);}(_0x6ea1,0x1c2));var _0x16ea=function(_0x96dc41,_0x488aef){_0x96dc41=_0x96dc41-0x0;var _0x4e9e33=_0x6ea1[_0x96dc41];return _0x4e9e33;};'use strict';var Sequelize=require(_0x16ea('0x0'));module[_0x16ea('0x1')]={'priority':{'type':Sequelize[_0x16ea('0x2')],'allowNull':![]},'app':{'type':Sequelize[_0x16ea('0x3')],'allowNull':![],'defaultValue':_0x16ea('0x4')},'appdata':{'type':Sequelize[_0x16ea('0x5')]()},'description':{'type':Sequelize[_0x16ea('0x3')]},'interval':{'type':Sequelize['STRING'],'defaultValue':'*,*,*,*'}}; \ No newline at end of file +var _0x00e1=['noop','TEXT','STRING','*,*,*,*','sequelize','exports'];(function(_0x513aa5,_0x1fba79){var _0x1a1a7c=function(_0x240e3f){while(--_0x240e3f){_0x513aa5['push'](_0x513aa5['shift']());}};_0x1a1a7c(++_0x1fba79);}(_0x00e1,0x160));var _0x100e=function(_0x39b11e,_0x5f515d){_0x39b11e=_0x39b11e-0x0;var _0x565d50=_0x00e1[_0x39b11e];return _0x565d50;};'use strict';var Sequelize=require(_0x100e('0x0'));module[_0x100e('0x1')]={'priority':{'type':Sequelize['INTEGER'],'allowNull':![]},'app':{'type':Sequelize['STRING'],'allowNull':![],'defaultValue':_0x100e('0x2')},'appdata':{'type':Sequelize[_0x100e('0x3')]()},'description':{'type':Sequelize[_0x100e('0x4')]},'interval':{'type':Sequelize[_0x100e('0x4')],'defaultValue':_0x100e('0x5')}}; \ No newline at end of file diff --git a/server/api/chatApplication/chatApplication.controller.js b/server/api/chatApplication/chatApplication.controller.js index 21a80f5..9a2e991 100644 --- a/server/api/chatApplication/chatApplication.controller.js +++ b/server/api/chatApplication/chatApplication.controller.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x544a=['crypto','jsforce','desk.js','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/license/util','sendStatus','status','offset','undefined','count','limit','set','Content-Range','json','apply','reject','then','end','error','stack','name','send','show','params','model','keys','ChatApplication','rawAttributes','query','attributes','intersection','fields','includeAll','include','merge','find','catch','update','body','destroy','eml-format','rimraf','zip-dir','moment','bluebird','mustache','util','ejs','fs-extra','lodash'];(function(_0x1738ee,_0x32e204){var _0x4b1b60=function(_0x4b5a48){while(--_0x4b5a48){_0x1738ee['push'](_0x1738ee['shift']());}};_0x4b1b60(++_0x32e204);}(_0x544a,0x118));var _0xa544=function(_0x3cf73b,_0x104790){_0x3cf73b=_0x3cf73b-0x0;var _0x1481dd=_0x544a[_0x3cf73b];return _0x1481dd;};'use strict';var emlformat=require(_0xa544('0x0'));var rimraf=require(_0xa544('0x1'));var zipdir=require(_0xa544('0x2'));var jsonpatch=require('fast-json-patch');var rp=require('request-promise');var moment=require(_0xa544('0x3'));var BPromise=require(_0xa544('0x4'));var Mustache=require(_0xa544('0x5'));var util=require(_0xa544('0x6'));var path=require('path');var sox=require('sox');var csv=require('to-csv');var ejs=require(_0xa544('0x7'));var fs=require('fs');var fs_extra=require(_0xa544('0x8'));var _=require(_0xa544('0x9'));var squel=require('squel');var crypto=require(_0xa544('0xa'));var jsforce=require(_0xa544('0xb'));var deskjs=require(_0xa544('0xc'));var toCsv=require('to-csv');var querystring=require(_0xa544('0xd'));var Papa=require(_0xa544('0xe'));var Redis=require(_0xa544('0xf'));var authService=require(_0xa544('0x10'));var qs=require('../../components/parsers/qs');var as=require(_0xa544('0x11'));var hardwareService=require(_0xa544('0x12'));var logger=require(_0xa544('0x13'))(_0xa544('0x14'));var utils=require(_0xa544('0x15'));var config=require('../../config/environment');var licenseUtil=require(_0xa544('0x16'));var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0x5c5388,_0x49bdea){_0x49bdea=_0x49bdea||0xcc;return function(_0x3de77b){if(_0x3de77b){return _0x5c5388[_0xa544('0x17')](_0x49bdea);}return _0x5c5388['status'](_0x49bdea)['end']();};}function respondWithResult(_0x53ed57,_0x3736e3){_0x3736e3=_0x3736e3||0xc8;return function(_0xe13644){if(_0xe13644){return _0x53ed57[_0xa544('0x18')](_0x3736e3)['json'](_0xe13644);}};}function respondWithFilteredResult(_0xd59245,_0xb9ecf7){return function(_0x8f8bfa){if(_0x8f8bfa){var _0x25c611=typeof _0xb9ecf7[_0xa544('0x19')]===_0xa544('0x1a')&&typeof _0xb9ecf7['limit']===_0xa544('0x1a');var _0x37c0c0=_0x8f8bfa['count'];var _0x5ddb99=_0x25c611?0x0:_0xb9ecf7[_0xa544('0x19')];var _0x3b423b=_0x25c611?_0x8f8bfa[_0xa544('0x1b')]:_0xb9ecf7[_0xa544('0x19')]+_0xb9ecf7[_0xa544('0x1c')];var _0x1a2dfb;if(_0x3b423b>=_0x37c0c0){_0x3b423b=_0x37c0c0;_0x1a2dfb=0xc8;}else{_0x1a2dfb=0xce;}_0xd59245[_0xa544('0x18')](_0x1a2dfb);return _0xd59245[_0xa544('0x1d')](_0xa544('0x1e'),_0x5ddb99+'-'+_0x3b423b+'/'+_0x37c0c0)[_0xa544('0x1f')](_0x8f8bfa);}return null;};}function patchUpdates(_0x19912e){return function(_0x317d10){try{jsonpatch[_0xa544('0x20')](_0x317d10,_0x19912e,!![]);}catch(_0xb6c18){return BPromise[_0xa544('0x21')](_0xb6c18);}return _0x317d10['save']();};}function saveUpdates(_0x4d9a8f,_0x463698){return function(_0x2fea4b){if(_0x2fea4b){return _0x2fea4b['update'](_0x4d9a8f)[_0xa544('0x22')](function(_0x272540){return _0x272540;});}return null;};}function removeEntity(_0xbda5ab,_0x12d6cf){return function(_0x3ad30a){if(_0x3ad30a){return _0x3ad30a['destroy']()['then'](function(){_0xbda5ab[_0xa544('0x18')](0xcc)[_0xa544('0x23')]();});}};}function handleEntityNotFound(_0x220cf9,_0xd55a63){return function(_0x20eee9){if(!_0x20eee9){_0x220cf9[_0xa544('0x17')](0x194);}return _0x20eee9;};}function handleError(_0x5b06f5,_0x3d23f2){_0x3d23f2=_0x3d23f2||0x1f4;return function(_0x3ec847){logger[_0xa544('0x24')](_0x3ec847[_0xa544('0x25')]);if(_0x3ec847[_0xa544('0x26')]){delete _0x3ec847[_0xa544('0x26')];}_0x5b06f5[_0xa544('0x18')](_0x3d23f2)[_0xa544('0x27')](_0x3ec847);};}exports[_0xa544('0x28')]=function(_0x17d6bb,_0x4ce5d5){var _0x53c071={'raw':!![],'where':{'id':_0x17d6bb[_0xa544('0x29')]['id']}},_0x1360e2={};_0x1360e2[_0xa544('0x2a')]=_[_0xa544('0x2b')](db[_0xa544('0x2c')][_0xa544('0x2d')]);_0x1360e2['query']=_[_0xa544('0x2b')](_0x17d6bb[_0xa544('0x2e')]);_0x1360e2['filters']=_['intersection'](_0x1360e2['model'],_0x1360e2[_0xa544('0x2e')]);_0x53c071[_0xa544('0x2f')]=_[_0xa544('0x30')](_0x1360e2[_0xa544('0x2a')],qs[_0xa544('0x31')](_0x17d6bb['query'][_0xa544('0x31')]));_0x53c071[_0xa544('0x2f')]=_0x53c071[_0xa544('0x2f')]['length']?_0x53c071[_0xa544('0x2f')]:_0x1360e2[_0xa544('0x2a')];if(_0x17d6bb[_0xa544('0x2e')][_0xa544('0x32')]){_0x53c071[_0xa544('0x33')]=[{'all':!![]}];}_0x53c071=_[_0xa544('0x34')]({},_0x53c071,_0x17d6bb['options']);return db[_0xa544('0x2c')][_0xa544('0x35')](_0x53c071)['then'](handleEntityNotFound(_0x4ce5d5,null))['then'](respondWithResult(_0x4ce5d5,null))[_0xa544('0x36')](handleError(_0x4ce5d5,null));};exports[_0xa544('0x37')]=function(_0x235e5a,_0x11d7d2){if(_0x235e5a[_0xa544('0x38')]['id']){delete _0x235e5a[_0xa544('0x38')]['id'];}return db[_0xa544('0x2c')][_0xa544('0x35')]({'where':{'id':_0x235e5a['params']['id']}})['then'](handleEntityNotFound(_0x11d7d2,null))[_0xa544('0x22')](saveUpdates(_0x235e5a[_0xa544('0x38')],null))[_0xa544('0x22')](respondWithResult(_0x11d7d2,null))[_0xa544('0x36')](handleError(_0x11d7d2,null));};exports[_0xa544('0x39')]=function(_0x30ea82,_0x21f6eb){return db[_0xa544('0x2c')][_0xa544('0x35')]({'where':{'id':_0x30ea82[_0xa544('0x29')]['id']}})['then'](handleEntityNotFound(_0x21f6eb,null))[_0xa544('0x22')](removeEntity(_0x21f6eb,null))['catch'](handleError(_0x21f6eb,null));}; \ No newline at end of file +var _0x67da=['end','sendStatus','error','name','send','show','params','model','keys','ChatApplication','rawAttributes','query','filters','intersection','attributes','fields','length','include','merge','options','find','catch','update','body','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','util','path','sox','fs-extra','squel','crypto','jsforce','desk.js','to-csv','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/license/util','../../mysqldb','status','json','undefined','count','offset','limit','set','Content-Range','reject','save','then','destroy'];(function(_0x20a584,_0xe384a5){var _0x4b41a8=function(_0x2127c6){while(--_0x2127c6){_0x20a584['push'](_0x20a584['shift']());}};_0x4b41a8(++_0xe384a5);}(_0x67da,0x192));var _0xa67d=function(_0x3b1e38,_0x3c1b55){_0x3b1e38=_0x3b1e38-0x0;var _0x4523ce=_0x67da[_0x3b1e38];return _0x4523ce;};'use strict';var emlformat=require('eml-format');var rimraf=require(_0xa67d('0x0'));var zipdir=require(_0xa67d('0x1'));var jsonpatch=require(_0xa67d('0x2'));var rp=require(_0xa67d('0x3'));var moment=require(_0xa67d('0x4'));var BPromise=require(_0xa67d('0x5'));var Mustache=require(_0xa67d('0x6'));var util=require(_0xa67d('0x7'));var path=require(_0xa67d('0x8'));var sox=require(_0xa67d('0x9'));var csv=require('to-csv');var ejs=require('ejs');var fs=require('fs');var fs_extra=require(_0xa67d('0xa'));var _=require('lodash');var squel=require(_0xa67d('0xb'));var crypto=require(_0xa67d('0xc'));var jsforce=require(_0xa67d('0xd'));var deskjs=require(_0xa67d('0xe'));var toCsv=require(_0xa67d('0xf'));var querystring=require(_0xa67d('0x10'));var Papa=require(_0xa67d('0x11'));var Redis=require(_0xa67d('0x12'));var authService=require(_0xa67d('0x13'));var qs=require(_0xa67d('0x14'));var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0xa67d('0x15'));var logger=require(_0xa67d('0x16'))(_0xa67d('0x17'));var utils=require(_0xa67d('0x18'));var config=require('../../config/environment');var licenseUtil=require(_0xa67d('0x19'));var db=require(_0xa67d('0x1a'))['db'];function respondWithStatusCode(_0x560485,_0x4e86f6){_0x4e86f6=_0x4e86f6||0xcc;return function(_0x304ee2){if(_0x304ee2){return _0x560485['sendStatus'](_0x4e86f6);}return _0x560485[_0xa67d('0x1b')](_0x4e86f6)['end']();};}function respondWithResult(_0x5d757b,_0x22dcc7){_0x22dcc7=_0x22dcc7||0xc8;return function(_0x3b99e3){if(_0x3b99e3){return _0x5d757b['status'](_0x22dcc7)[_0xa67d('0x1c')](_0x3b99e3);}};}function respondWithFilteredResult(_0x267a67,_0x1cfe81){return function(_0x288e5f){if(_0x288e5f){var _0x5a47de=typeof _0x1cfe81['offset']==='undefined'&&typeof _0x1cfe81['limit']===_0xa67d('0x1d');var _0x553811=_0x288e5f[_0xa67d('0x1e')];var _0xf8422c=_0x5a47de?0x0:_0x1cfe81[_0xa67d('0x1f')];var _0x1b58c3=_0x5a47de?_0x288e5f[_0xa67d('0x1e')]:_0x1cfe81[_0xa67d('0x1f')]+_0x1cfe81[_0xa67d('0x20')];var _0x5538a5;if(_0x1b58c3>=_0x553811){_0x1b58c3=_0x553811;_0x5538a5=0xc8;}else{_0x5538a5=0xce;}_0x267a67[_0xa67d('0x1b')](_0x5538a5);return _0x267a67[_0xa67d('0x21')](_0xa67d('0x22'),_0xf8422c+'-'+_0x1b58c3+'/'+_0x553811)[_0xa67d('0x1c')](_0x288e5f);}return null;};}function patchUpdates(_0x28f38b){return function(_0x1c3498){try{jsonpatch['apply'](_0x1c3498,_0x28f38b,!![]);}catch(_0x3f1898){return BPromise[_0xa67d('0x23')](_0x3f1898);}return _0x1c3498[_0xa67d('0x24')]();};}function saveUpdates(_0xed6c3e,_0x48f240){return function(_0x276ef7){if(_0x276ef7){return _0x276ef7['update'](_0xed6c3e)[_0xa67d('0x25')](function(_0x415141){return _0x415141;});}return null;};}function removeEntity(_0x46bbc8,_0x9c2935){return function(_0x559009){if(_0x559009){return _0x559009[_0xa67d('0x26')]()[_0xa67d('0x25')](function(){_0x46bbc8['status'](0xcc)[_0xa67d('0x27')]();});}};}function handleEntityNotFound(_0x3dd0b9,_0x2b890c){return function(_0xe0c7b2){if(!_0xe0c7b2){_0x3dd0b9[_0xa67d('0x28')](0x194);}return _0xe0c7b2;};}function handleError(_0x1d6e68,_0x5ef92a){_0x5ef92a=_0x5ef92a||0x1f4;return function(_0x435e56){logger[_0xa67d('0x29')](_0x435e56['stack']);if(_0x435e56[_0xa67d('0x2a')]){delete _0x435e56[_0xa67d('0x2a')];}_0x1d6e68[_0xa67d('0x1b')](_0x5ef92a)[_0xa67d('0x2b')](_0x435e56);};}exports[_0xa67d('0x2c')]=function(_0x8793cf,_0x42c858){var _0xf4fc64={'raw':!![],'where':{'id':_0x8793cf[_0xa67d('0x2d')]['id']}},_0x204f83={};_0x204f83[_0xa67d('0x2e')]=_[_0xa67d('0x2f')](db[_0xa67d('0x30')][_0xa67d('0x31')]);_0x204f83['query']=_[_0xa67d('0x2f')](_0x8793cf[_0xa67d('0x32')]);_0x204f83[_0xa67d('0x33')]=_[_0xa67d('0x34')](_0x204f83[_0xa67d('0x2e')],_0x204f83['query']);_0xf4fc64[_0xa67d('0x35')]=_[_0xa67d('0x34')](_0x204f83[_0xa67d('0x2e')],qs[_0xa67d('0x36')](_0x8793cf[_0xa67d('0x32')][_0xa67d('0x36')]));_0xf4fc64[_0xa67d('0x35')]=_0xf4fc64[_0xa67d('0x35')][_0xa67d('0x37')]?_0xf4fc64[_0xa67d('0x35')]:_0x204f83['model'];if(_0x8793cf[_0xa67d('0x32')]['includeAll']){_0xf4fc64[_0xa67d('0x38')]=[{'all':!![]}];}_0xf4fc64=_[_0xa67d('0x39')]({},_0xf4fc64,_0x8793cf[_0xa67d('0x3a')]);return db['ChatApplication'][_0xa67d('0x3b')](_0xf4fc64)[_0xa67d('0x25')](handleEntityNotFound(_0x42c858,null))[_0xa67d('0x25')](respondWithResult(_0x42c858,null))[_0xa67d('0x3c')](handleError(_0x42c858,null));};exports[_0xa67d('0x3d')]=function(_0x199e8f,_0x4ded76){if(_0x199e8f[_0xa67d('0x3e')]['id']){delete _0x199e8f[_0xa67d('0x3e')]['id'];}return db['ChatApplication']['find']({'where':{'id':_0x199e8f['params']['id']}})[_0xa67d('0x25')](handleEntityNotFound(_0x4ded76,null))['then'](saveUpdates(_0x199e8f[_0xa67d('0x3e')],null))[_0xa67d('0x25')](respondWithResult(_0x4ded76,null))[_0xa67d('0x3c')](handleError(_0x4ded76,null));};exports[_0xa67d('0x26')]=function(_0x35a0a0,_0x44310e){return db[_0xa67d('0x30')][_0xa67d('0x3b')]({'where':{'id':_0x35a0a0[_0xa67d('0x2d')]['id']}})[_0xa67d('0x25')](handleEntityNotFound(_0x44310e,null))[_0xa67d('0x25')](removeEntity(_0x44310e,null))[_0xa67d('0x3c')](handleError(_0x44310e,null));}; \ No newline at end of file diff --git a/server/api/chatApplication/chatApplication.model.js b/server/api/chatApplication/chatApplication.model.js index 6da318f..9ec46c6 100644 --- a/server/api/chatApplication/chatApplication.model.js +++ b/server/api/chatApplication/chatApplication.model.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x37b6=['moment','bluebird','request-promise','path','rimraf','../../config/environment','exports','ChatApplication','chat_applications','utf8mb4','utf8mb4_unicode_ci','lodash','util','../../config/logger','api'];(function(_0x2641f9,_0x26715f){var _0x585741=function(_0x2d1462){while(--_0x2d1462){_0x2641f9['push'](_0x2641f9['shift']());}};_0x585741(++_0x26715f);}(_0x37b6,0x119));var _0x637b=function(_0x4726a3,_0x1df205){_0x4726a3=_0x4726a3-0x0;var _0x38dd54=_0x37b6[_0x4726a3];return _0x38dd54;};'use strict';var _=require(_0x637b('0x0'));var util=require(_0x637b('0x1'));var logger=require(_0x637b('0x2'))(_0x637b('0x3'));var moment=require(_0x637b('0x4'));var BPromise=require(_0x637b('0x5'));var rp=require(_0x637b('0x6'));var fs=require('fs');var path=require(_0x637b('0x7'));var rimraf=require(_0x637b('0x8'));var config=require(_0x637b('0x9'));var attributes=require('./chatApplication.attributes');module[_0x637b('0xa')]=function(_0x36eedb,_0x2ed114){return _0x36eedb['define'](_0x637b('0xb'),attributes,{'tableName':_0x637b('0xc'),'paranoid':![],'indexes':[],'timestamps':!![],'charset':_0x637b('0xd'),'collate':_0x637b('0xe')});}; \ No newline at end of file +var _0x35f9=['util','../../config/logger','api','bluebird','rimraf','../../config/environment','define','ChatApplication','chat_applications','utf8mb4','utf8mb4_unicode_ci','lodash'];(function(_0x23e7c1,_0x35110c){var _0x1add43=function(_0x238918){while(--_0x238918){_0x23e7c1['push'](_0x23e7c1['shift']());}};_0x1add43(++_0x35110c);}(_0x35f9,0x1df));var _0x935f=function(_0x46be82,_0x3b5590){_0x46be82=_0x46be82-0x0;var _0x56dcd7=_0x35f9[_0x46be82];return _0x56dcd7;};'use strict';var _=require(_0x935f('0x0'));var util=require(_0x935f('0x1'));var logger=require(_0x935f('0x2'))(_0x935f('0x3'));var moment=require('moment');var BPromise=require(_0x935f('0x4'));var rp=require('request-promise');var fs=require('fs');var path=require('path');var rimraf=require(_0x935f('0x5'));var config=require(_0x935f('0x6'));var attributes=require('./chatApplication.attributes');module['exports']=function(_0x287043,_0x4403e1){return _0x287043[_0x935f('0x7')](_0x935f('0x8'),attributes,{'tableName':_0x935f('0x9'),'paranoid':![],'indexes':[],'timestamps':!![],'charset':_0x935f('0xa'),'collate':_0x935f('0xb')});}; \ No newline at end of file diff --git a/server/api/chatApplication/chatApplication.rpc.js b/server/api/chatApplication/chatApplication.rpc.js index 35106c9..1108f31 100644 --- a/server/api/chatApplication/chatApplication.rpc.js +++ b/server/api/chatApplication/chatApplication.rpc.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xe56d=['info','ChatApplication,\x20%s,\x20%s','request\x20sent','ChatApplication,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','catch','lodash','util','bluebird','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','request','then'];(function(_0x516175,_0x1d603a){var _0x1ec6e5=function(_0x5cdf19){while(--_0x5cdf19){_0x516175['push'](_0x516175['shift']());}};_0x1ec6e5(++_0x1d603a);}(_0xe56d,0xca));var _0xde56=function(_0x3240ff,_0x3b9c3d){_0x3240ff=_0x3240ff-0x0;var _0x514858=_0xe56d[_0x3240ff];return _0x514858;};'use strict';var _=require(_0xde56('0x0'));var util=require(_0xde56('0x1'));var moment=require('moment');var BPromise=require(_0xde56('0x2'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0xde56('0x3'));var db=require(_0xde56('0x4'))['db'];var utils=require(_0xde56('0x5'));var logger=require(_0xde56('0x6'))(_0xde56('0x7'));var config=require(_0xde56('0x8'));var jayson=require(_0xde56('0x9'));var client=jayson[_0xde56('0xa')][_0xde56('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x3ad746,_0x398c09,_0x149259){return new BPromise(function(_0x50bab3,_0x421aa2){return client[_0xde56('0xc')](_0x3ad746,_0x149259)[_0xde56('0xd')](function(_0xb8e8d){logger[_0xde56('0xe')](_0xde56('0xf'),_0x398c09,_0xde56('0x10'));logger['debug'](_0xde56('0x11'),_0x398c09,'request\x20sent',JSON[_0xde56('0x12')](_0xb8e8d));if(_0xb8e8d['error']){if(_0xb8e8d[_0xde56('0x13')][_0xde56('0x14')]===0x1f4){logger['error'](_0xde56('0xf'),_0x398c09,_0xb8e8d[_0xde56('0x13')][_0xde56('0x15')]);return _0x421aa2(_0xb8e8d[_0xde56('0x13')][_0xde56('0x15')]);}logger[_0xde56('0x13')](_0xde56('0xf'),_0x398c09,_0xb8e8d[_0xde56('0x13')][_0xde56('0x15')]);return _0x50bab3(_0xb8e8d[_0xde56('0x13')][_0xde56('0x15')]);}else{logger[_0xde56('0xe')](_0xde56('0xf'),_0x398c09,'request\x20sent');_0x50bab3(_0xb8e8d[_0xde56('0x16')][_0xde56('0x15')]);}})[_0xde56('0x17')](function(_0x2d5239){logger[_0xde56('0x13')](_0xde56('0xf'),_0x398c09,_0x2d5239);_0x421aa2(_0x2d5239);});});} \ No newline at end of file +var _0x8e59=['catch','lodash','util','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','http','request','then','info','ChatApplication,\x20%s,\x20%s','request\x20sent','debug','ChatApplication,\x20%s,\x20%s,\x20%s','stringify','error','message','result'];(function(_0x173228,_0x425401){var _0x13e0ef=function(_0x5f013a){while(--_0x5f013a){_0x173228['push'](_0x173228['shift']());}};_0x13e0ef(++_0x425401);}(_0x8e59,0x85));var _0x98e5=function(_0x45ca01,_0x2ca800){_0x45ca01=_0x45ca01-0x0;var _0x2215a6=_0x8e59[_0x45ca01];return _0x2215a6;};'use strict';var _=require(_0x98e5('0x0'));var util=require(_0x98e5('0x1'));var moment=require('moment');var BPromise=require(_0x98e5('0x2'));var rs=require(_0x98e5('0x3'));var fs=require('fs');var Redis=require(_0x98e5('0x4'));var db=require(_0x98e5('0x5'))['db'];var utils=require(_0x98e5('0x6'));var logger=require(_0x98e5('0x7'))(_0x98e5('0x8'));var config=require('../../config/environment');var jayson=require('jayson/promise');var client=jayson['client'][_0x98e5('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x2e4cb2,_0x54350c,_0x345631){return new BPromise(function(_0x4ac289,_0x2e42fd){return client[_0x98e5('0xa')](_0x2e4cb2,_0x345631)[_0x98e5('0xb')](function(_0x33926d){logger[_0x98e5('0xc')](_0x98e5('0xd'),_0x54350c,_0x98e5('0xe'));logger[_0x98e5('0xf')](_0x98e5('0x10'),_0x54350c,_0x98e5('0xe'),JSON[_0x98e5('0x11')](_0x33926d));if(_0x33926d[_0x98e5('0x12')]){if(_0x33926d['error']['code']===0x1f4){logger[_0x98e5('0x12')]('ChatApplication,\x20%s,\x20%s',_0x54350c,_0x33926d[_0x98e5('0x12')][_0x98e5('0x13')]);return _0x2e42fd(_0x33926d[_0x98e5('0x12')][_0x98e5('0x13')]);}logger[_0x98e5('0x12')](_0x98e5('0xd'),_0x54350c,_0x33926d[_0x98e5('0x12')][_0x98e5('0x13')]);return _0x4ac289(_0x33926d['error']['message']);}else{logger['info'](_0x98e5('0xd'),_0x54350c,'request\x20sent');_0x4ac289(_0x33926d[_0x98e5('0x14')][_0x98e5('0x13')]);}})[_0x98e5('0x15')](function(_0x3d3ad7){logger[_0x98e5('0x12')](_0x98e5('0xd'),_0x54350c,_0x3d3ad7);_0x2e42fd(_0x3d3ad7);});});} \ No newline at end of file diff --git a/server/api/chatApplication/index.js b/server/api/chatApplication/index.js index 8c38a5d..2f3e6f9 100644 --- a/server/api/chatApplication/index.js +++ b/server/api/chatApplication/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xc3d3=['path','Router','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','./chatApplication.controller','/:id','isAuthenticated','show','put','delete','destroy','exports','multer','util'];(function(_0xd381ae,_0x191ad8){var _0x172bd3=function(_0xc26a72){while(--_0xc26a72){_0xd381ae['push'](_0xd381ae['shift']());}};_0x172bd3(++_0x191ad8);}(_0xc3d3,0x7e));var _0x3c3d=function(_0x54332e,_0x38933a){_0x54332e=_0x54332e-0x0;var _0x105960=_0xc3d3[_0x54332e];return _0x105960;};'use strict';var multer=require(_0x3c3d('0x0'));var util=require(_0x3c3d('0x1'));var path=require(_0x3c3d('0x2'));var timeout=require('connect-timeout');var express=require('express');var router=express[_0x3c3d('0x3')]();var fs_extra=require(_0x3c3d('0x4'));var auth=require(_0x3c3d('0x5'));var interaction=require(_0x3c3d('0x6'));var config=require(_0x3c3d('0x7'));var controller=require(_0x3c3d('0x8'));router['get'](_0x3c3d('0x9'),auth[_0x3c3d('0xa')](),controller[_0x3c3d('0xb')]);router[_0x3c3d('0xc')](_0x3c3d('0x9'),auth[_0x3c3d('0xa')](),controller['update']);router[_0x3c3d('0xd')](_0x3c3d('0x9'),auth[_0x3c3d('0xa')](),controller[_0x3c3d('0xe')]);module[_0x3c3d('0xf')]=router; \ No newline at end of file +var _0xbebf=['./chatApplication.controller','get','/:id','isAuthenticated','show','put','update','delete','destroy','exports','multer','util','path','connect-timeout','express','Router','../../components/auth/service','../../components/interaction/service','../../config/environment'];(function(_0x17e1c0,_0x276eec){var _0x3ea9df=function(_0x212c66){while(--_0x212c66){_0x17e1c0['push'](_0x17e1c0['shift']());}};_0x3ea9df(++_0x276eec);}(_0xbebf,0x186));var _0xfbeb=function(_0x251a3e,_0x25fa71){_0x251a3e=_0x251a3e-0x0;var _0x46f2b2=_0xbebf[_0x251a3e];return _0x46f2b2;};'use strict';var multer=require(_0xfbeb('0x0'));var util=require(_0xfbeb('0x1'));var path=require(_0xfbeb('0x2'));var timeout=require(_0xfbeb('0x3'));var express=require(_0xfbeb('0x4'));var router=express[_0xfbeb('0x5')]();var fs_extra=require('fs-extra');var auth=require(_0xfbeb('0x6'));var interaction=require(_0xfbeb('0x7'));var config=require(_0xfbeb('0x8'));var controller=require(_0xfbeb('0x9'));router[_0xfbeb('0xa')](_0xfbeb('0xb'),auth[_0xfbeb('0xc')](),controller[_0xfbeb('0xd')]);router[_0xfbeb('0xe')](_0xfbeb('0xb'),auth['isAuthenticated'](),controller[_0xfbeb('0xf')]);router[_0xfbeb('0x10')]('/:id',auth['isAuthenticated'](),controller[_0xfbeb('0x11')]);module[_0xfbeb('0x12')]=router; \ No newline at end of file diff --git a/server/api/chatGroup/chatGroup.attributes.js b/server/api/chatGroup/chatGroup.attributes.js index d4be7ba..91b11dd 100644 --- a/server/api/chatGroup/chatGroup.attributes.js +++ b/server/api/chatGroup/chatGroup.attributes.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xaf6a=['STRING','sequelize','exports'];(function(_0x51b545,_0x46cfa9){var _0x55fabd=function(_0x1a1fd7){while(--_0x1a1fd7){_0x51b545['push'](_0x51b545['shift']());}};_0x55fabd(++_0x46cfa9);}(_0xaf6a,0x1e4));var _0xaaf6=function(_0x3f7861,_0x13619b){_0x3f7861=_0x3f7861-0x0;var _0x36fdae=_0xaf6a[_0x3f7861];return _0x36fdae;};'use strict';var Sequelize=require(_0xaaf6('0x0'));module[_0xaaf6('0x1')]={'name':{'type':Sequelize[_0xaaf6('0x2')],'allowNull':![]},'description':{'type':Sequelize[_0xaaf6('0x2')]},'write':{'type':Sequelize['BOOLEAN'],'defaultValue':!![]}}; \ No newline at end of file +var _0x98f0=['BOOLEAN','exports'];(function(_0x1133cd,_0x2e7a9d){var _0x419c90=function(_0x15eaa0){while(--_0x15eaa0){_0x1133cd['push'](_0x1133cd['shift']());}};_0x419c90(++_0x2e7a9d);}(_0x98f0,0xdd));var _0x098f=function(_0x320b2d,_0x37f9d8){_0x320b2d=_0x320b2d-0x0;var _0x14d918=_0x98f0[_0x320b2d];return _0x14d918;};'use strict';var Sequelize=require('sequelize');module[_0x098f('0x0')]={'name':{'type':Sequelize['STRING'],'allowNull':![]},'description':{'type':Sequelize['STRING']},'write':{'type':Sequelize[_0x098f('0x1')],'defaultValue':!![]}}; \ No newline at end of file diff --git a/server/api/chatGroup/chatGroup.controller.js b/server/api/chatGroup/chatGroup.controller.js index 1df9d97..d69c9ad 100644 --- a/server/api/chatGroup/chatGroup.controller.js +++ b/server/api/chatGroup/chatGroup.controller.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x34b9=['count','offset','Content-Range','apply','save','destroy','then','end','error','name','send','index','map','ChatGroup','rawAttributes','type','key','query','filters','intersection','model','attributes','fields','length','hasOwnProperty','order','sort','where','pick','merge','VIRTUAL','filter','options','include','findAll','rows','catch','show','params','includeAll','find','body','update','describe','getUnread','ChatInternalMessage','user','toInteger','addMembers','omit','ids','getMembers','findOne','User','keys','nolimit','addMessage','ChatGroupId','create','getMessages','$gte','split','format','YYYY-MM-DD\x20HH:mm:ss','eml-format','fast-json-patch','request-promise','moment','mustache','util','path','sox','to-csv','fs-extra','lodash','crypto','desk.js','querystring','ioredis','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/environment','../../config/license/util','../../mysqldb','redis','localhost','register','sendStatus','status','json','undefined','limit'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0x34b9,0x15d));var _0x934b=function(_0x16477e,_0x4a36d4){_0x16477e=_0x16477e-0x0;var _0x4bcd49=_0x34b9[_0x16477e];return _0x4bcd49;};'use strict';var emlformat=require(_0x934b('0x0'));var rimraf=require('rimraf');var zipdir=require('zip-dir');var jsonpatch=require(_0x934b('0x1'));var rp=require(_0x934b('0x2'));var moment=require(_0x934b('0x3'));var BPromise=require('bluebird');var Mustache=require(_0x934b('0x4'));var util=require(_0x934b('0x5'));var path=require(_0x934b('0x6'));var sox=require(_0x934b('0x7'));var csv=require(_0x934b('0x8'));var ejs=require('ejs');var fs=require('fs');var fs_extra=require(_0x934b('0x9'));var _=require(_0x934b('0xa'));var squel=require('squel');var crypto=require(_0x934b('0xb'));var jsforce=require('jsforce');var deskjs=require(_0x934b('0xc'));var toCsv=require(_0x934b('0x8'));var querystring=require(_0x934b('0xd'));var Papa=require('papaparse');var Redis=require(_0x934b('0xe'));var authService=require('../../components/auth/service');var qs=require(_0x934b('0xf'));var as=require(_0x934b('0x10'));var hardwareService=require(_0x934b('0x11'));var logger=require(_0x934b('0x12'))(_0x934b('0x13'));var utils=require('../../config/utils');var config=require(_0x934b('0x14'));var licenseUtil=require(_0x934b('0x15'));var db=require(_0x934b('0x16'))['db'];config[_0x934b('0x17')]=_['defaults'](config[_0x934b('0x17')],{'host':_0x934b('0x18'),'port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config['redis']));require('./chatGroup.socket')[_0x934b('0x19')](socket);function respondWithStatusCode(_0x39e879,_0x3d80cc){_0x3d80cc=_0x3d80cc||0xcc;return function(_0x39e278){if(_0x39e278){return _0x39e879[_0x934b('0x1a')](_0x3d80cc);}return _0x39e879['status'](_0x3d80cc)['end']();};}function respondWithResult(_0x133523,_0x3d3147){_0x3d3147=_0x3d3147||0xc8;return function(_0x254990){if(_0x254990){return _0x133523[_0x934b('0x1b')](_0x3d3147)[_0x934b('0x1c')](_0x254990);}};}function respondWithFilteredResult(_0x4c5918,_0x132310){return function(_0x3d16bb){if(_0x3d16bb){var _0x4cbdea=typeof _0x132310['offset']===_0x934b('0x1d')&&typeof _0x132310[_0x934b('0x1e')]==='undefined';var _0x426d71=_0x3d16bb[_0x934b('0x1f')];var _0x2204fd=_0x4cbdea?0x0:_0x132310[_0x934b('0x20')];var _0x3ec53d=_0x4cbdea?_0x3d16bb['count']:_0x132310[_0x934b('0x20')]+_0x132310[_0x934b('0x1e')];var _0x2634e9;if(_0x3ec53d>=_0x426d71){_0x3ec53d=_0x426d71;_0x2634e9=0xc8;}else{_0x2634e9=0xce;}_0x4c5918[_0x934b('0x1b')](_0x2634e9);return _0x4c5918['set'](_0x934b('0x21'),_0x2204fd+'-'+_0x3ec53d+'/'+_0x426d71)[_0x934b('0x1c')](_0x3d16bb);}return null;};}function patchUpdates(_0x2d1bec){return function(_0x3373e8){try{jsonpatch[_0x934b('0x22')](_0x3373e8,_0x2d1bec,!![]);}catch(_0x51b0c1){return BPromise['reject'](_0x51b0c1);}return _0x3373e8[_0x934b('0x23')]();};}function saveUpdates(_0x1c9486,_0x4bb7d9){return function(_0x1741fd){if(_0x1741fd){return _0x1741fd['update'](_0x1c9486)['then'](function(_0x5e78a3){return _0x5e78a3;});}return null;};}function removeEntity(_0x4a0dbf,_0x48b30a){return function(_0x34e99c){if(_0x34e99c){return _0x34e99c[_0x934b('0x24')]()[_0x934b('0x25')](function(){_0x4a0dbf[_0x934b('0x1b')](0xcc)[_0x934b('0x26')]();});}};}function handleEntityNotFound(_0x4595ed,_0x48fb64){return function(_0x1c01fc){if(!_0x1c01fc){_0x4595ed[_0x934b('0x1a')](0x194);}return _0x1c01fc;};}function handleError(_0x2e9846,_0x1de618){_0x1de618=_0x1de618||0x1f4;return function(_0x20a051){logger[_0x934b('0x27')](_0x20a051['stack']);if(_0x20a051[_0x934b('0x28')]){delete _0x20a051['name'];}_0x2e9846[_0x934b('0x1b')](_0x1de618)[_0x934b('0x29')](_0x20a051);};}exports[_0x934b('0x2a')]=function(_0x108d1d,_0x460fc9){var _0x51e6df={},_0x26ffe2={},_0x45fd79={'count':0x0,'rows':[]};var _0x19c90d=_[_0x934b('0x2b')](db[_0x934b('0x2c')][_0x934b('0x2d')],function(_0x1e9cfa){return{'name':_0x1e9cfa['fieldName'],'type':_0x1e9cfa[_0x934b('0x2e')][_0x934b('0x2f')]};});_0x26ffe2['model']=_['map'](_0x19c90d,_0x934b('0x28'));_0x26ffe2['query']=_['keys'](_0x108d1d[_0x934b('0x30')]);_0x26ffe2[_0x934b('0x31')]=_[_0x934b('0x32')](_0x26ffe2[_0x934b('0x33')],_0x26ffe2[_0x934b('0x30')]);_0x51e6df[_0x934b('0x34')]=_['intersection'](_0x26ffe2[_0x934b('0x33')],qs[_0x934b('0x35')](_0x108d1d['query']['fields']));_0x51e6df['attributes']=_0x51e6df['attributes'][_0x934b('0x36')]?_0x51e6df[_0x934b('0x34')]:_0x26ffe2[_0x934b('0x33')];if(!_0x108d1d['query'][_0x934b('0x37')]('nolimit')){_0x51e6df['limit']=qs[_0x934b('0x1e')](_0x108d1d['query'][_0x934b('0x1e')]);_0x51e6df['offset']=qs['offset'](_0x108d1d[_0x934b('0x30')]['offset']);}_0x51e6df[_0x934b('0x38')]=qs[_0x934b('0x39')](_0x108d1d[_0x934b('0x30')][_0x934b('0x39')]);_0x51e6df[_0x934b('0x3a')]=qs['filters'](_[_0x934b('0x3b')](_0x108d1d[_0x934b('0x30')],_0x26ffe2[_0x934b('0x31')]),_0x19c90d);if(_0x108d1d[_0x934b('0x30')]['filter']){_0x51e6df[_0x934b('0x3a')]=_[_0x934b('0x3c')](_0x51e6df['where'],{'$or':_[_0x934b('0x2b')](_0x19c90d,function(_0x3f56b){if(_0x3f56b['type']!==_0x934b('0x3d')){var _0x4ac7aa={};_0x4ac7aa[_0x3f56b[_0x934b('0x28')]]={'$like':'%'+_0x108d1d[_0x934b('0x30')][_0x934b('0x3e')]+'%'};return _0x4ac7aa;}})});}_0x51e6df=_['merge']({},_0x51e6df,_0x108d1d[_0x934b('0x3f')]);var _0x581218={'where':_0x51e6df[_0x934b('0x3a')]};return db[_0x934b('0x2c')][_0x934b('0x1f')](_0x581218)[_0x934b('0x25')](function(_0xd9d131){_0x45fd79[_0x934b('0x1f')]=_0xd9d131;if(_0x108d1d[_0x934b('0x30')]['includeAll']){_0x51e6df[_0x934b('0x40')]=[{'all':!![]}];}return db[_0x934b('0x2c')][_0x934b('0x41')](_0x51e6df);})[_0x934b('0x25')](function(_0x56b171){_0x45fd79[_0x934b('0x42')]=_0x56b171;return _0x45fd79;})[_0x934b('0x25')](respondWithFilteredResult(_0x460fc9,_0x51e6df))[_0x934b('0x43')](handleError(_0x460fc9,null));};exports[_0x934b('0x44')]=function(_0xf5df0e,_0x10bd6f){var _0x3328bb={'raw':!![],'where':{'id':_0xf5df0e[_0x934b('0x45')]['id']}},_0x1bbfd3={};_0x1bbfd3['model']=_['keys'](db[_0x934b('0x2c')][_0x934b('0x2d')]);_0x1bbfd3['query']=_['keys'](_0xf5df0e[_0x934b('0x30')]);_0x1bbfd3['filters']=_[_0x934b('0x32')](_0x1bbfd3['model'],_0x1bbfd3[_0x934b('0x30')]);_0x3328bb['attributes']=_[_0x934b('0x32')](_0x1bbfd3['model'],qs[_0x934b('0x35')](_0xf5df0e[_0x934b('0x30')]['fields']));_0x3328bb[_0x934b('0x34')]=_0x3328bb[_0x934b('0x34')]['length']?_0x3328bb['attributes']:_0x1bbfd3['model'];if(_0xf5df0e['query'][_0x934b('0x46')]){_0x3328bb[_0x934b('0x40')]=[{'all':!![]}];}_0x3328bb=_[_0x934b('0x3c')]({},_0x3328bb,_0xf5df0e[_0x934b('0x3f')]);return db[_0x934b('0x2c')][_0x934b('0x47')](_0x3328bb)[_0x934b('0x25')](handleEntityNotFound(_0x10bd6f,null))[_0x934b('0x25')](respondWithResult(_0x10bd6f,null))[_0x934b('0x43')](handleError(_0x10bd6f,null));};exports['create']=function(_0x163a9e,_0x34bcc7){return db['ChatGroup']['create'](_0x163a9e[_0x934b('0x48')],{})[_0x934b('0x25')](respondWithResult(_0x34bcc7,0xc9))[_0x934b('0x43')](handleError(_0x34bcc7,null));};exports[_0x934b('0x49')]=function(_0x2d0864,_0x3f10c4){if(_0x2d0864['body']['id']){delete _0x2d0864[_0x934b('0x48')]['id'];}return db['ChatGroup'][_0x934b('0x47')]({'where':{'id':_0x2d0864['params']['id']}})[_0x934b('0x25')](handleEntityNotFound(_0x3f10c4,null))[_0x934b('0x25')](saveUpdates(_0x2d0864[_0x934b('0x48')],null))[_0x934b('0x25')](respondWithResult(_0x3f10c4,null))[_0x934b('0x43')](handleError(_0x3f10c4,null));};exports['destroy']=function(_0x17a03f,_0x179a94){return db[_0x934b('0x2c')][_0x934b('0x47')]({'where':{'id':_0x17a03f[_0x934b('0x45')]['id']}})[_0x934b('0x25')](handleEntityNotFound(_0x179a94,null))[_0x934b('0x25')](removeEntity(_0x179a94,null))[_0x934b('0x43')](handleError(_0x179a94,null));};exports[_0x934b('0x4a')]=function(_0x5b78d8,_0x36457d){return db[_0x934b('0x2c')][_0x934b('0x4a')]()[_0x934b('0x25')](respondWithResult(_0x36457d,null))[_0x934b('0x43')](handleError(_0x36457d,null));};exports[_0x934b('0x4b')]=function(_0x34a8ac,_0x453518,_0x448725){return db[_0x934b('0x4c')]['count']({'where':{'ChatGroupId':_0x34a8ac[_0x934b('0x45')]['id'],'ToId':_0x34a8ac[_0x934b('0x4d')]['id'],'read':![]}})[_0x934b('0x25')](function(_0x1d0c74){return{'id':_[_0x934b('0x4e')](_0x34a8ac[_0x934b('0x45')]['id']),'count':_0x1d0c74};})[_0x934b('0x25')](respondWithResult(_0x453518,null))[_0x934b('0x43')](handleError(_0x453518,null));};exports['addMembers']=function(_0x556b08,_0xe948e1,_0x1c8a2c){return db[_0x934b('0x2c')][_0x934b('0x47')]({'where':{'id':_0x556b08[_0x934b('0x45')]['id']}})['then'](handleEntityNotFound(_0xe948e1,null))['then'](function(_0x5a0090){if(_0x5a0090){return _0x5a0090[_0x934b('0x4f')](_0x556b08[_0x934b('0x48')]['ids'],_[_0x934b('0x50')](_0x556b08[_0x934b('0x48')],[_0x934b('0x51'),'id'])||{});}})[_0x934b('0x25')](respondWithResult(_0xe948e1,null))[_0x934b('0x43')](handleError(_0xe948e1,null));};exports[_0x934b('0x52')]=function(_0x401787,_0x48a700,_0xac64be){var _0x4d246e={};var _0xd39a69={};var _0x179c45;var _0x1d5e06;return db['ChatGroup'][_0x934b('0x53')]({'where':{'id':_0x401787[_0x934b('0x45')]['id']}})['then'](handleEntityNotFound(_0x48a700,null))[_0x934b('0x25')](function(_0xf9bb78){if(_0xf9bb78){_0x179c45=_0xf9bb78;_0xd39a69[_0x934b('0x33')]=_['keys'](db[_0x934b('0x54')][_0x934b('0x2d')]);_0xd39a69['query']=_[_0x934b('0x55')](_0x401787[_0x934b('0x30')]);_0xd39a69[_0x934b('0x31')]=_['intersection'](_0xd39a69[_0x934b('0x33')],_0xd39a69[_0x934b('0x30')]);_0x4d246e[_0x934b('0x34')]=_[_0x934b('0x32')](_0xd39a69[_0x934b('0x33')],qs[_0x934b('0x35')](_0x401787[_0x934b('0x30')][_0x934b('0x35')]));_0x4d246e[_0x934b('0x34')]=_0x4d246e[_0x934b('0x34')][_0x934b('0x36')]?_0x4d246e['attributes']:_0xd39a69[_0x934b('0x33')];_0x4d246e['order']=qs[_0x934b('0x39')](_0x401787[_0x934b('0x30')]['sort']);_0x4d246e[_0x934b('0x3a')]=qs[_0x934b('0x31')](_['pick'](_0x401787['query'],_0xd39a69[_0x934b('0x31')]));if(_0x401787[_0x934b('0x30')][_0x934b('0x3e')]){_0x4d246e[_0x934b('0x3a')]=_[_0x934b('0x3c')](_0x4d246e[_0x934b('0x3a')],{'$or':_[_0x934b('0x2b')](_0x4d246e[_0x934b('0x34')],function(_0x2284fc){var _0x388d8e={};_0x388d8e[_0x2284fc]={'$like':'%'+_0x401787[_0x934b('0x30')][_0x934b('0x3e')]+'%'};return _0x388d8e;})});}_0x4d246e=_[_0x934b('0x3c')]({},_0x4d246e,_0x401787['options']);return _0x179c45[_0x934b('0x52')](_0x4d246e);}})[_0x934b('0x25')](function(_0x385170){if(_0x385170){_0x1d5e06=_0x385170['length'];if(!_0x401787['query'][_0x934b('0x37')](_0x934b('0x56'))){_0x4d246e[_0x934b('0x1e')]=qs[_0x934b('0x1e')](_0x401787[_0x934b('0x30')][_0x934b('0x1e')]);_0x4d246e[_0x934b('0x20')]=qs[_0x934b('0x20')](_0x401787['query'][_0x934b('0x20')]);}return _0x179c45[_0x934b('0x52')](_0x4d246e);}})[_0x934b('0x25')](function(_0x473f76){if(_0x473f76){return _0x473f76?{'count':_0x1d5e06,'rows':_0x473f76}:null;}})[_0x934b('0x25')](respondWithResult(_0x48a700,null))[_0x934b('0x43')](handleError(_0x48a700,null));};exports['removeMembers']=function(_0x273098,_0x3f5184,_0x34b002){return db[_0x934b('0x2c')][_0x934b('0x47')]({'where':{'id':_0x273098[_0x934b('0x45')]['id']}})[_0x934b('0x25')](handleEntityNotFound(_0x3f5184,null))[_0x934b('0x25')](function(_0x99ebe2){if(_0x99ebe2){return _0x99ebe2['removeMembers'](_0x273098[_0x934b('0x30')][_0x934b('0x51')]);}})[_0x934b('0x25')](respondWithStatusCode(_0x3f5184,null))[_0x934b('0x43')](handleError(_0x3f5184,null));};exports[_0x934b('0x57')]=function(_0x36e413,_0x44a637,_0x2cff33){if(_0x36e413[_0x934b('0x48')]['id']){delete _0x36e413[_0x934b('0x48')]['id'];}return db[_0x934b('0x2c')][_0x934b('0x47')]({'where':{'id':_0x36e413[_0x934b('0x45')]['id']}})[_0x934b('0x25')](handleEntityNotFound(_0x44a637,null))['then'](function(_0x1e2f90){if(_0x1e2f90){_0x36e413[_0x934b('0x48')][_0x934b('0x58')]=_0x1e2f90['id'];return db[_0x934b('0x4c')][_0x934b('0x59')](_0x36e413[_0x934b('0x48')]);}})['then'](respondWithResult(_0x44a637,null))[_0x934b('0x43')](handleError(_0x44a637,null));};exports[_0x934b('0x5a')]=function(_0x1f0329,_0x5266ff,_0xb6d7d2){var _0x13ffc4={};var _0x2d1aec={};var _0x3f314a;var _0x2fdb75;return db['ChatGroup'][_0x934b('0x53')]({'where':{'id':_0x1f0329[_0x934b('0x45')]['id']}})['then'](handleEntityNotFound(_0x5266ff,null))['then'](function(_0x5c8482){if(_0x5c8482){_0x3f314a=_0x5c8482;_0x2d1aec[_0x934b('0x33')]=_[_0x934b('0x55')](db[_0x934b('0x4c')][_0x934b('0x2d')]);_0x2d1aec['query']=_[_0x934b('0x55')](_0x1f0329['query']);_0x2d1aec[_0x934b('0x31')]=_[_0x934b('0x32')](_0x2d1aec[_0x934b('0x33')],_0x2d1aec['query']);_0x13ffc4[_0x934b('0x34')]=_['intersection'](_0x2d1aec[_0x934b('0x33')],qs[_0x934b('0x35')](_0x1f0329[_0x934b('0x30')]['fields']));_0x13ffc4[_0x934b('0x34')]=_0x13ffc4[_0x934b('0x34')][_0x934b('0x36')]?_0x13ffc4['attributes']:_0x2d1aec[_0x934b('0x33')];_0x13ffc4[_0x934b('0x38')]=qs[_0x934b('0x39')](_0x1f0329['query'][_0x934b('0x39')]);_0x13ffc4[_0x934b('0x3a')]=qs[_0x934b('0x31')](_[_0x934b('0x3b')](_0x1f0329[_0x934b('0x30')],_0x2d1aec['filters']));if(_0x1f0329[_0x934b('0x30')][_0x934b('0x3e')]){_0x13ffc4[_0x934b('0x3a')]=_[_0x934b('0x3c')](_0x13ffc4[_0x934b('0x3a')],{'$or':_['map'](_0x13ffc4['attributes'],function(_0x58e208){var _0x2eba7b={};_0x2eba7b[_0x58e208]={'$like':'%'+_0x1f0329[_0x934b('0x30')]['filter']+'%'};return _0x2eba7b;})});}if(_0x1f0329[_0x934b('0x30')][_0x934b('0x5b')]){var _0x31aa55=_0x1f0329[_0x934b('0x30')]['$gte'][_0x934b('0x5c')](',');var _0xa17300={};_0xa17300[_0x31aa55[0x0]]={'$gte':moment(_0x31aa55[0x1])[_0x934b('0x5d')](_0x934b('0x5e'))};_0x13ffc4[_0x934b('0x3a')]=_[_0x934b('0x3c')](_0x13ffc4[_0x934b('0x3a')],_0xa17300);}_0x13ffc4=_['merge']({},_0x13ffc4,_0x1f0329[_0x934b('0x3f')]);return _0x3f314a['getMessages'](_0x13ffc4);}})[_0x934b('0x25')](function(_0x593223){if(_0x593223){_0x2fdb75=_0x593223[_0x934b('0x36')];if(!_0x1f0329[_0x934b('0x30')]['hasOwnProperty']('nolimit')){_0x13ffc4['limit']=qs['limit'](_0x1f0329[_0x934b('0x30')][_0x934b('0x1e')]);_0x13ffc4[_0x934b('0x20')]=qs[_0x934b('0x20')](_0x1f0329[_0x934b('0x30')][_0x934b('0x20')]);}return _0x3f314a['getMessages'](_0x13ffc4);}})[_0x934b('0x25')](function(_0x16dae0){if(_0x16dae0){return _0x16dae0?{'count':_0x2fdb75,'rows':_0x16dae0}:null;}})[_0x934b('0x25')](respondWithResult(_0x5266ff,null))['catch'](handleError(_0x5266ff,null));}; \ No newline at end of file +var _0x5440=['register','sendStatus','status','end','json','offset','limit','set','Content-Range','apply','reject','save','update','destroy','then','error','stack','name','send','index','rawAttributes','type','key','map','query','keys','intersection','model','attributes','fields','hasOwnProperty','nolimit','sort','where','filters','filter','merge','VIRTUAL','includeAll','ChatGroup','findAll','rows','params','length','include','find','create','body','catch','describe','getUnread','count','user','toInteger','addMembers','omit','ids','getMembers','findOne','User','order','pick','options','addMessage','ChatGroupId','ChatInternalMessage','$gte','YYYY-MM-DD\x20HH:mm:ss','getMessages','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','util','sox','to-csv','ejs','fs-extra','lodash','crypto','desk.js','papaparse','ioredis','../../components/auth/service','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','defaults','redis','localhost','socket.io-emitter','./chatGroup.socket'];(function(_0x2408c5,_0x3af6d8){var _0x5a78d4=function(_0x331614){while(--_0x331614){_0x2408c5['push'](_0x2408c5['shift']());}};_0x5a78d4(++_0x3af6d8);}(_0x5440,0x10f));var _0x0544=function(_0x37a4ff,_0x9f11f3){_0x37a4ff=_0x37a4ff-0x0;var _0x35bf83=_0x5440[_0x37a4ff];return _0x35bf83;};'use strict';var emlformat=require(_0x0544('0x0'));var rimraf=require(_0x0544('0x1'));var zipdir=require(_0x0544('0x2'));var jsonpatch=require(_0x0544('0x3'));var rp=require(_0x0544('0x4'));var moment=require(_0x0544('0x5'));var BPromise=require(_0x0544('0x6'));var Mustache=require(_0x0544('0x7'));var util=require(_0x0544('0x8'));var path=require('path');var sox=require(_0x0544('0x9'));var csv=require(_0x0544('0xa'));var ejs=require(_0x0544('0xb'));var fs=require('fs');var fs_extra=require(_0x0544('0xc'));var _=require(_0x0544('0xd'));var squel=require('squel');var crypto=require(_0x0544('0xe'));var jsforce=require('jsforce');var deskjs=require(_0x0544('0xf'));var toCsv=require(_0x0544('0xa'));var querystring=require('querystring');var Papa=require(_0x0544('0x10'));var Redis=require(_0x0544('0x11'));var authService=require(_0x0544('0x12'));var qs=require('../../components/parsers/qs');var as=require(_0x0544('0x13'));var hardwareService=require(_0x0544('0x14'));var logger=require(_0x0544('0x15'))(_0x0544('0x16'));var utils=require(_0x0544('0x17'));var config=require(_0x0544('0x18'));var licenseUtil=require(_0x0544('0x19'));var db=require(_0x0544('0x1a'))['db'];config['redis']=_[_0x0544('0x1b')](config[_0x0544('0x1c')],{'host':_0x0544('0x1d'),'port':0x18eb});var socket=require(_0x0544('0x1e'))(new Redis(config['redis']));require(_0x0544('0x1f'))[_0x0544('0x20')](socket);function respondWithStatusCode(_0x4d11fc,_0x477637){_0x477637=_0x477637||0xcc;return function(_0x319fc7){if(_0x319fc7){return _0x4d11fc[_0x0544('0x21')](_0x477637);}return _0x4d11fc[_0x0544('0x22')](_0x477637)[_0x0544('0x23')]();};}function respondWithResult(_0x3d0d4b,_0x2c28c8){_0x2c28c8=_0x2c28c8||0xc8;return function(_0x29713f){if(_0x29713f){return _0x3d0d4b['status'](_0x2c28c8)[_0x0544('0x24')](_0x29713f);}};}function respondWithFilteredResult(_0x56f22a,_0x4df5a0){return function(_0x1fc231){if(_0x1fc231){var _0x5d55c0=typeof _0x4df5a0[_0x0544('0x25')]==='undefined'&&typeof _0x4df5a0[_0x0544('0x26')]==='undefined';var _0x156264=_0x1fc231['count'];var _0x21985e=_0x5d55c0?0x0:_0x4df5a0[_0x0544('0x25')];var _0x350948=_0x5d55c0?_0x1fc231['count']:_0x4df5a0[_0x0544('0x25')]+_0x4df5a0[_0x0544('0x26')];var _0x12041a;if(_0x350948>=_0x156264){_0x350948=_0x156264;_0x12041a=0xc8;}else{_0x12041a=0xce;}_0x56f22a[_0x0544('0x22')](_0x12041a);return _0x56f22a[_0x0544('0x27')](_0x0544('0x28'),_0x21985e+'-'+_0x350948+'/'+_0x156264)['json'](_0x1fc231);}return null;};}function patchUpdates(_0x354b5e){return function(_0x15f7f5){try{jsonpatch[_0x0544('0x29')](_0x15f7f5,_0x354b5e,!![]);}catch(_0x6131b1){return BPromise[_0x0544('0x2a')](_0x6131b1);}return _0x15f7f5[_0x0544('0x2b')]();};}function saveUpdates(_0x4c7dd3,_0x7b612f){return function(_0xc7a84b){if(_0xc7a84b){return _0xc7a84b[_0x0544('0x2c')](_0x4c7dd3)['then'](function(_0x5640dc){return _0x5640dc;});}return null;};}function removeEntity(_0x4fa63d,_0x5371f8){return function(_0x353929){if(_0x353929){return _0x353929[_0x0544('0x2d')]()[_0x0544('0x2e')](function(){_0x4fa63d['status'](0xcc)['end']();});}};}function handleEntityNotFound(_0x1cb5be,_0x5ab76a){return function(_0xa72a42){if(!_0xa72a42){_0x1cb5be['sendStatus'](0x194);}return _0xa72a42;};}function handleError(_0x148ef4,_0x2e86d2){_0x2e86d2=_0x2e86d2||0x1f4;return function(_0x351611){logger[_0x0544('0x2f')](_0x351611[_0x0544('0x30')]);if(_0x351611[_0x0544('0x31')]){delete _0x351611[_0x0544('0x31')];}_0x148ef4['status'](_0x2e86d2)[_0x0544('0x32')](_0x351611);};}exports[_0x0544('0x33')]=function(_0x572fba,_0x54cea5){var _0x175168={},_0x457ddb={},_0xa9f0a9={'count':0x0,'rows':[]};var _0x235d7a=_['map'](db['ChatGroup'][_0x0544('0x34')],function(_0x57c1ec){return{'name':_0x57c1ec['fieldName'],'type':_0x57c1ec[_0x0544('0x35')][_0x0544('0x36')]};});_0x457ddb['model']=_[_0x0544('0x37')](_0x235d7a,'name');_0x457ddb[_0x0544('0x38')]=_[_0x0544('0x39')](_0x572fba[_0x0544('0x38')]);_0x457ddb['filters']=_[_0x0544('0x3a')](_0x457ddb[_0x0544('0x3b')],_0x457ddb[_0x0544('0x38')]);_0x175168[_0x0544('0x3c')]=_[_0x0544('0x3a')](_0x457ddb[_0x0544('0x3b')],qs['fields'](_0x572fba[_0x0544('0x38')][_0x0544('0x3d')]));_0x175168['attributes']=_0x175168[_0x0544('0x3c')]['length']?_0x175168[_0x0544('0x3c')]:_0x457ddb[_0x0544('0x3b')];if(!_0x572fba[_0x0544('0x38')][_0x0544('0x3e')](_0x0544('0x3f'))){_0x175168['limit']=qs[_0x0544('0x26')](_0x572fba[_0x0544('0x38')][_0x0544('0x26')]);_0x175168[_0x0544('0x25')]=qs[_0x0544('0x25')](_0x572fba[_0x0544('0x38')][_0x0544('0x25')]);}_0x175168['order']=qs[_0x0544('0x40')](_0x572fba[_0x0544('0x38')]['sort']);_0x175168[_0x0544('0x41')]=qs[_0x0544('0x42')](_['pick'](_0x572fba[_0x0544('0x38')],_0x457ddb['filters']),_0x235d7a);if(_0x572fba[_0x0544('0x38')][_0x0544('0x43')]){_0x175168[_0x0544('0x41')]=_[_0x0544('0x44')](_0x175168[_0x0544('0x41')],{'$or':_[_0x0544('0x37')](_0x235d7a,function(_0x59cf16){if(_0x59cf16[_0x0544('0x35')]!==_0x0544('0x45')){var _0x35aafd={};_0x35aafd[_0x59cf16[_0x0544('0x31')]]={'$like':'%'+_0x572fba[_0x0544('0x38')]['filter']+'%'};return _0x35aafd;}})});}_0x175168=_[_0x0544('0x44')]({},_0x175168,_0x572fba['options']);var _0x339863={'where':_0x175168[_0x0544('0x41')]};return db['ChatGroup']['count'](_0x339863)[_0x0544('0x2e')](function(_0x27bca2){_0xa9f0a9['count']=_0x27bca2;if(_0x572fba[_0x0544('0x38')][_0x0544('0x46')]){_0x175168['include']=[{'all':!![]}];}return db[_0x0544('0x47')][_0x0544('0x48')](_0x175168);})['then'](function(_0x4a2578){_0xa9f0a9[_0x0544('0x49')]=_0x4a2578;return _0xa9f0a9;})[_0x0544('0x2e')](respondWithFilteredResult(_0x54cea5,_0x175168))['catch'](handleError(_0x54cea5,null));};exports['show']=function(_0x35b326,_0x20a66b){var _0x48070d={'raw':!![],'where':{'id':_0x35b326[_0x0544('0x4a')]['id']}},_0x57a350={};_0x57a350[_0x0544('0x3b')]=_[_0x0544('0x39')](db[_0x0544('0x47')]['rawAttributes']);_0x57a350['query']=_[_0x0544('0x39')](_0x35b326[_0x0544('0x38')]);_0x57a350[_0x0544('0x42')]=_[_0x0544('0x3a')](_0x57a350[_0x0544('0x3b')],_0x57a350[_0x0544('0x38')]);_0x48070d[_0x0544('0x3c')]=_['intersection'](_0x57a350[_0x0544('0x3b')],qs[_0x0544('0x3d')](_0x35b326['query']['fields']));_0x48070d[_0x0544('0x3c')]=_0x48070d[_0x0544('0x3c')][_0x0544('0x4b')]?_0x48070d[_0x0544('0x3c')]:_0x57a350['model'];if(_0x35b326[_0x0544('0x38')][_0x0544('0x46')]){_0x48070d[_0x0544('0x4c')]=[{'all':!![]}];}_0x48070d=_[_0x0544('0x44')]({},_0x48070d,_0x35b326['options']);return db[_0x0544('0x47')][_0x0544('0x4d')](_0x48070d)[_0x0544('0x2e')](handleEntityNotFound(_0x20a66b,null))[_0x0544('0x2e')](respondWithResult(_0x20a66b,null))['catch'](handleError(_0x20a66b,null));};exports[_0x0544('0x4e')]=function(_0x15abfe,_0x3d6d5b){return db[_0x0544('0x47')][_0x0544('0x4e')](_0x15abfe[_0x0544('0x4f')],{})[_0x0544('0x2e')](respondWithResult(_0x3d6d5b,0xc9))[_0x0544('0x50')](handleError(_0x3d6d5b,null));};exports[_0x0544('0x2c')]=function(_0x166a04,_0x147e09){if(_0x166a04[_0x0544('0x4f')]['id']){delete _0x166a04[_0x0544('0x4f')]['id'];}return db[_0x0544('0x47')]['find']({'where':{'id':_0x166a04[_0x0544('0x4a')]['id']}})[_0x0544('0x2e')](handleEntityNotFound(_0x147e09,null))[_0x0544('0x2e')](saveUpdates(_0x166a04[_0x0544('0x4f')],null))[_0x0544('0x2e')](respondWithResult(_0x147e09,null))[_0x0544('0x50')](handleError(_0x147e09,null));};exports[_0x0544('0x2d')]=function(_0x4b58e8,_0x46786e){return db['ChatGroup'][_0x0544('0x4d')]({'where':{'id':_0x4b58e8['params']['id']}})[_0x0544('0x2e')](handleEntityNotFound(_0x46786e,null))[_0x0544('0x2e')](removeEntity(_0x46786e,null))[_0x0544('0x50')](handleError(_0x46786e,null));};exports['describe']=function(_0x1cf309,_0x4cf1c1){return db[_0x0544('0x47')][_0x0544('0x51')]()[_0x0544('0x2e')](respondWithResult(_0x4cf1c1,null))[_0x0544('0x50')](handleError(_0x4cf1c1,null));};exports[_0x0544('0x52')]=function(_0x2a7c79,_0x76295a,_0x36af13){return db['ChatInternalMessage'][_0x0544('0x53')]({'where':{'ChatGroupId':_0x2a7c79['params']['id'],'ToId':_0x2a7c79[_0x0544('0x54')]['id'],'read':![]}})[_0x0544('0x2e')](function(_0x43c6ed){return{'id':_[_0x0544('0x55')](_0x2a7c79[_0x0544('0x4a')]['id']),'count':_0x43c6ed};})['then'](respondWithResult(_0x76295a,null))[_0x0544('0x50')](handleError(_0x76295a,null));};exports[_0x0544('0x56')]=function(_0x3fec3c,_0x55ce49,_0x4605b9){return db['ChatGroup']['find']({'where':{'id':_0x3fec3c['params']['id']}})[_0x0544('0x2e')](handleEntityNotFound(_0x55ce49,null))[_0x0544('0x2e')](function(_0x25df62){if(_0x25df62){return _0x25df62[_0x0544('0x56')](_0x3fec3c[_0x0544('0x4f')]['ids'],_[_0x0544('0x57')](_0x3fec3c[_0x0544('0x4f')],[_0x0544('0x58'),'id'])||{});}})[_0x0544('0x2e')](respondWithResult(_0x55ce49,null))['catch'](handleError(_0x55ce49,null));};exports[_0x0544('0x59')]=function(_0x298a49,_0x55a9ee,_0x20e23b){var _0x5af0b2={};var _0x61fec9={};var _0x551b7f;var _0x476b4a;return db[_0x0544('0x47')][_0x0544('0x5a')]({'where':{'id':_0x298a49[_0x0544('0x4a')]['id']}})[_0x0544('0x2e')](handleEntityNotFound(_0x55a9ee,null))[_0x0544('0x2e')](function(_0x2591ef){if(_0x2591ef){_0x551b7f=_0x2591ef;_0x61fec9[_0x0544('0x3b')]=_['keys'](db[_0x0544('0x5b')][_0x0544('0x34')]);_0x61fec9[_0x0544('0x38')]=_[_0x0544('0x39')](_0x298a49[_0x0544('0x38')]);_0x61fec9[_0x0544('0x42')]=_['intersection'](_0x61fec9[_0x0544('0x3b')],_0x61fec9[_0x0544('0x38')]);_0x5af0b2[_0x0544('0x3c')]=_['intersection'](_0x61fec9[_0x0544('0x3b')],qs[_0x0544('0x3d')](_0x298a49[_0x0544('0x38')][_0x0544('0x3d')]));_0x5af0b2[_0x0544('0x3c')]=_0x5af0b2[_0x0544('0x3c')][_0x0544('0x4b')]?_0x5af0b2['attributes']:_0x61fec9['model'];_0x5af0b2[_0x0544('0x5c')]=qs['sort'](_0x298a49['query'][_0x0544('0x40')]);_0x5af0b2[_0x0544('0x41')]=qs[_0x0544('0x42')](_[_0x0544('0x5d')](_0x298a49[_0x0544('0x38')],_0x61fec9[_0x0544('0x42')]));if(_0x298a49[_0x0544('0x38')]['filter']){_0x5af0b2[_0x0544('0x41')]=_[_0x0544('0x44')](_0x5af0b2['where'],{'$or':_[_0x0544('0x37')](_0x5af0b2[_0x0544('0x3c')],function(_0x5402fb){var _0x592b4b={};_0x592b4b[_0x5402fb]={'$like':'%'+_0x298a49[_0x0544('0x38')][_0x0544('0x43')]+'%'};return _0x592b4b;})});}_0x5af0b2=_['merge']({},_0x5af0b2,_0x298a49[_0x0544('0x5e')]);return _0x551b7f[_0x0544('0x59')](_0x5af0b2);}})[_0x0544('0x2e')](function(_0x564554){if(_0x564554){_0x476b4a=_0x564554[_0x0544('0x4b')];if(!_0x298a49['query'][_0x0544('0x3e')](_0x0544('0x3f'))){_0x5af0b2[_0x0544('0x26')]=qs[_0x0544('0x26')](_0x298a49['query']['limit']);_0x5af0b2[_0x0544('0x25')]=qs[_0x0544('0x25')](_0x298a49[_0x0544('0x38')][_0x0544('0x25')]);}return _0x551b7f[_0x0544('0x59')](_0x5af0b2);}})[_0x0544('0x2e')](function(_0x121a32){if(_0x121a32){return _0x121a32?{'count':_0x476b4a,'rows':_0x121a32}:null;}})[_0x0544('0x2e')](respondWithResult(_0x55a9ee,null))[_0x0544('0x50')](handleError(_0x55a9ee,null));};exports['removeMembers']=function(_0x133598,_0x5c3022,_0x2a6b88){return db[_0x0544('0x47')][_0x0544('0x4d')]({'where':{'id':_0x133598[_0x0544('0x4a')]['id']}})['then'](handleEntityNotFound(_0x5c3022,null))[_0x0544('0x2e')](function(_0x25a26b){if(_0x25a26b){return _0x25a26b['removeMembers'](_0x133598[_0x0544('0x38')][_0x0544('0x58')]);}})[_0x0544('0x2e')](respondWithStatusCode(_0x5c3022,null))[_0x0544('0x50')](handleError(_0x5c3022,null));};exports[_0x0544('0x5f')]=function(_0x2b3303,_0x4c1261,_0x51a425){if(_0x2b3303['body']['id']){delete _0x2b3303['body']['id'];}return db[_0x0544('0x47')][_0x0544('0x4d')]({'where':{'id':_0x2b3303[_0x0544('0x4a')]['id']}})['then'](handleEntityNotFound(_0x4c1261,null))[_0x0544('0x2e')](function(_0x2950ae){if(_0x2950ae){_0x2b3303[_0x0544('0x4f')][_0x0544('0x60')]=_0x2950ae['id'];return db[_0x0544('0x61')]['create'](_0x2b3303[_0x0544('0x4f')]);}})[_0x0544('0x2e')](respondWithResult(_0x4c1261,null))[_0x0544('0x50')](handleError(_0x4c1261,null));};exports['getMessages']=function(_0x423c24,_0x3056fc,_0x14074b){var _0x1c3682={};var _0x4aaf87={};var _0x10e8eb;var _0x3bbfc3;return db[_0x0544('0x47')][_0x0544('0x5a')]({'where':{'id':_0x423c24[_0x0544('0x4a')]['id']}})[_0x0544('0x2e')](handleEntityNotFound(_0x3056fc,null))['then'](function(_0x927734){if(_0x927734){_0x10e8eb=_0x927734;_0x4aaf87['model']=_['keys'](db['ChatInternalMessage'][_0x0544('0x34')]);_0x4aaf87[_0x0544('0x38')]=_[_0x0544('0x39')](_0x423c24['query']);_0x4aaf87[_0x0544('0x42')]=_[_0x0544('0x3a')](_0x4aaf87['model'],_0x4aaf87[_0x0544('0x38')]);_0x1c3682[_0x0544('0x3c')]=_[_0x0544('0x3a')](_0x4aaf87[_0x0544('0x3b')],qs['fields'](_0x423c24[_0x0544('0x38')]['fields']));_0x1c3682[_0x0544('0x3c')]=_0x1c3682[_0x0544('0x3c')][_0x0544('0x4b')]?_0x1c3682[_0x0544('0x3c')]:_0x4aaf87[_0x0544('0x3b')];_0x1c3682['order']=qs[_0x0544('0x40')](_0x423c24[_0x0544('0x38')][_0x0544('0x40')]);_0x1c3682['where']=qs['filters'](_[_0x0544('0x5d')](_0x423c24[_0x0544('0x38')],_0x4aaf87[_0x0544('0x42')]));if(_0x423c24[_0x0544('0x38')][_0x0544('0x43')]){_0x1c3682[_0x0544('0x41')]=_[_0x0544('0x44')](_0x1c3682['where'],{'$or':_[_0x0544('0x37')](_0x1c3682[_0x0544('0x3c')],function(_0x226881){var _0x14afb3={};_0x14afb3[_0x226881]={'$like':'%'+_0x423c24['query'][_0x0544('0x43')]+'%'};return _0x14afb3;})});}if(_0x423c24[_0x0544('0x38')][_0x0544('0x62')]){var _0x450d26=_0x423c24[_0x0544('0x38')][_0x0544('0x62')]['split'](',');var _0x1d1f30={};_0x1d1f30[_0x450d26[0x0]]={'$gte':moment(_0x450d26[0x1])['format'](_0x0544('0x63'))};_0x1c3682['where']=_[_0x0544('0x44')](_0x1c3682[_0x0544('0x41')],_0x1d1f30);}_0x1c3682=_[_0x0544('0x44')]({},_0x1c3682,_0x423c24[_0x0544('0x5e')]);return _0x10e8eb[_0x0544('0x64')](_0x1c3682);}})[_0x0544('0x2e')](function(_0x274ed4){if(_0x274ed4){_0x3bbfc3=_0x274ed4[_0x0544('0x4b')];if(!_0x423c24['query']['hasOwnProperty'](_0x0544('0x3f'))){_0x1c3682[_0x0544('0x26')]=qs['limit'](_0x423c24[_0x0544('0x38')][_0x0544('0x26')]);_0x1c3682['offset']=qs['offset'](_0x423c24['query']['offset']);}return _0x10e8eb[_0x0544('0x64')](_0x1c3682);}})[_0x0544('0x2e')](function(_0xd03b63){if(_0xd03b63){return _0xd03b63?{'count':_0x3bbfc3,'rows':_0xd03b63}:null;}})[_0x0544('0x2e')](respondWithResult(_0x3056fc,null))[_0x0544('0x50')](handleError(_0x3056fc,null));}; \ No newline at end of file diff --git a/server/api/chatGroup/chatGroup.events.js b/server/api/chatGroup/chatGroup.events.js index 8724507..f2080a8 100644 --- a/server/api/chatGroup/chatGroup.events.js +++ b/server/api/chatGroup/chatGroup.events.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xe742=['emit','hasOwnProperty','hook','exports','ChatGroup','setMaxListeners','update'];(function(_0x1931aa,_0x4566d3){var _0x3abf94=function(_0x4dc811){while(--_0x4dc811){_0x1931aa['push'](_0x1931aa['shift']());}};_0x3abf94(++_0x4566d3);}(_0xe742,0x14d));var _0x2e74=function(_0x32fe4e,_0x33a067){_0x32fe4e=_0x32fe4e-0x0;var _0x3bf6d8=_0xe742[_0x32fe4e];return _0x3bf6d8;};'use strict';var EventEmitter=require('events');var ChatGroup=require('../../mysqldb')['db'][_0x2e74('0x0')];var ChatGroupEvents=new EventEmitter();ChatGroupEvents[_0x2e74('0x1')](0x0);var events={'afterCreate':'save','afterUpdate':_0x2e74('0x2'),'afterDestroy':'remove'};function emitEvent(_0xe80e75){return function(_0x5419f2,_0x51a8bf,_0x351255){ChatGroupEvents[_0x2e74('0x3')](_0xe80e75+':'+_0x5419f2['id'],_0x5419f2);ChatGroupEvents[_0x2e74('0x3')](_0xe80e75,_0x5419f2);_0x351255(null);};}for(var e in events){if(events[_0x2e74('0x4')](e)){var event=events[e];ChatGroup[_0x2e74('0x5')](e,emitEvent(event));}}module[_0x2e74('0x6')]=ChatGroupEvents; \ No newline at end of file +var _0xc18f=['hasOwnProperty','hook','exports','events','../../mysqldb','ChatGroup','setMaxListeners','save','update','remove','emit'];(function(_0x54948b,_0x3a8048){var _0x5d8803=function(_0x2195aa){while(--_0x2195aa){_0x54948b['push'](_0x54948b['shift']());}};_0x5d8803(++_0x3a8048);}(_0xc18f,0x1dc));var _0xfc18=function(_0x12a4ba,_0x1cd254){_0x12a4ba=_0x12a4ba-0x0;var _0x2c0806=_0xc18f[_0x12a4ba];return _0x2c0806;};'use strict';var EventEmitter=require(_0xfc18('0x0'));var ChatGroup=require(_0xfc18('0x1'))['db'][_0xfc18('0x2')];var ChatGroupEvents=new EventEmitter();ChatGroupEvents[_0xfc18('0x3')](0x0);var events={'afterCreate':_0xfc18('0x4'),'afterUpdate':_0xfc18('0x5'),'afterDestroy':_0xfc18('0x6')};function emitEvent(_0x3fa9f){return function(_0x49bcd3,_0x346625,_0x5e761f){ChatGroupEvents[_0xfc18('0x7')](_0x3fa9f+':'+_0x49bcd3['id'],_0x49bcd3);ChatGroupEvents[_0xfc18('0x7')](_0x3fa9f,_0x49bcd3);_0x5e761f(null);};}for(var e in events){if(events[_0xfc18('0x8')](e)){var event=events[e];ChatGroup[_0xfc18('0x9')](e,emitEvent(event));}}module[_0xfc18('0xa')]=ChatGroupEvents; \ No newline at end of file diff --git a/server/api/chatGroup/chatGroup.model.js b/server/api/chatGroup/chatGroup.model.js index 819c0b7..02ae621 100644 --- a/server/api/chatGroup/chatGroup.model.js +++ b/server/api/chatGroup/chatGroup.model.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xf24f=['ChatGroup','chat_groups','lodash','../../config/logger','api','moment','bluebird','request-promise','path','rimraf','../../config/environment','./chatGroup.attributes','define'];(function(_0x4ccbf1,_0x50da48){var _0x49af25=function(_0x244364){while(--_0x244364){_0x4ccbf1['push'](_0x4ccbf1['shift']());}};_0x49af25(++_0x50da48);}(_0xf24f,0x188));var _0xff24=function(_0x8cb2f9,_0x2b8706){_0x8cb2f9=_0x8cb2f9-0x0;var _0x164887=_0xf24f[_0x8cb2f9];return _0x164887;};'use strict';var _=require(_0xff24('0x0'));var util=require('util');var logger=require(_0xff24('0x1'))(_0xff24('0x2'));var moment=require(_0xff24('0x3'));var BPromise=require(_0xff24('0x4'));var rp=require(_0xff24('0x5'));var fs=require('fs');var path=require(_0xff24('0x6'));var rimraf=require(_0xff24('0x7'));var config=require(_0xff24('0x8'));var attributes=require(_0xff24('0x9'));module['exports']=function(_0x4eecee,_0x2a639b){return _0x4eecee[_0xff24('0xa')](_0xff24('0xb'),attributes,{'tableName':_0xff24('0xc'),'paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file +var _0xd81d=['request-promise','rimraf','../../config/environment','./chatGroup.attributes','exports','define','ChatGroup','chat_groups','lodash','util','../../config/logger','api','bluebird'];(function(_0x2ae1bc,_0x3b5e39){var _0x583808=function(_0x1d0b31){while(--_0x1d0b31){_0x2ae1bc['push'](_0x2ae1bc['shift']());}};_0x583808(++_0x3b5e39);}(_0xd81d,0x7d));var _0xdd81=function(_0x1c34e1,_0x4ebefc){_0x1c34e1=_0x1c34e1-0x0;var _0x183422=_0xd81d[_0x1c34e1];return _0x183422;};'use strict';var _=require(_0xdd81('0x0'));var util=require(_0xdd81('0x1'));var logger=require(_0xdd81('0x2'))(_0xdd81('0x3'));var moment=require('moment');var BPromise=require(_0xdd81('0x4'));var rp=require(_0xdd81('0x5'));var fs=require('fs');var path=require('path');var rimraf=require(_0xdd81('0x6'));var config=require(_0xdd81('0x7'));var attributes=require(_0xdd81('0x8'));module[_0xdd81('0x9')]=function(_0x1fb537,_0x37a878){return _0x1fb537[_0xdd81('0xa')](_0xdd81('0xb'),attributes,{'tableName':_0xdd81('0xc'),'paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file diff --git a/server/api/chatGroup/chatGroup.rpc.js b/server/api/chatGroup/chatGroup.rpc.js index 1fd8574..8a04bf2 100644 --- a/server/api/chatGroup/chatGroup.rpc.js +++ b/server/api/chatGroup/chatGroup.rpc.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x3468=['message','result','catch','lodash','bluebird','../../mysqldb','../../config/utils','../../config/logger','client','redis','defaults','localhost','socket.io-emitter','./chatGroup.socket','register','then','info','ChatGroup,\x20%s,\x20%s','request\x20sent','debug','stringify','error','code'];(function(_0x55a887,_0xdd74e5){var _0x286196=function(_0x46269b){while(--_0x46269b){_0x55a887['push'](_0x55a887['shift']());}};_0x286196(++_0xdd74e5);}(_0x3468,0x8d));var _0x8346=function(_0x591641,_0x2e0aad){_0x591641=_0x591641-0x0;var _0x6b6304=_0x3468[_0x591641];return _0x6b6304;};'use strict';var _=require(_0x8346('0x0'));var util=require('util');var moment=require('moment');var BPromise=require(_0x8346('0x1'));var rs=require('randomstring');var fs=require('fs');var Redis=require('ioredis');var db=require(_0x8346('0x2'))['db'];var utils=require(_0x8346('0x3'));var logger=require(_0x8346('0x4'))('rpc');var config=require('../../config/environment');var jayson=require('jayson/promise');var client=jayson[_0x8346('0x5')]['http']({'port':0x232a});config[_0x8346('0x6')]=_[_0x8346('0x7')](config[_0x8346('0x6')],{'host':_0x8346('0x8'),'port':0x18eb});var socket=require(_0x8346('0x9'))(new Redis(config[_0x8346('0x6')]));require(_0x8346('0xa'))[_0x8346('0xb')](socket);function respondWithRpcPromise(_0xa9c056,_0x2bc2a4,_0x35b247){return new BPromise(function(_0x3caac8,_0x461116){return client['request'](_0xa9c056,_0x35b247)[_0x8346('0xc')](function(_0x265c06){logger[_0x8346('0xd')](_0x8346('0xe'),_0x2bc2a4,_0x8346('0xf'));logger[_0x8346('0x10')]('ChatGroup,\x20%s,\x20%s,\x20%s',_0x2bc2a4,_0x8346('0xf'),JSON[_0x8346('0x11')](_0x265c06));if(_0x265c06[_0x8346('0x12')]){if(_0x265c06[_0x8346('0x12')][_0x8346('0x13')]===0x1f4){logger[_0x8346('0x12')](_0x8346('0xe'),_0x2bc2a4,_0x265c06['error'][_0x8346('0x14')]);return _0x461116(_0x265c06['error'][_0x8346('0x14')]);}logger['error'](_0x8346('0xe'),_0x2bc2a4,_0x265c06['error'][_0x8346('0x14')]);return _0x3caac8(_0x265c06['error']['message']);}else{logger[_0x8346('0xd')](_0x8346('0xe'),_0x2bc2a4,'request\x20sent');_0x3caac8(_0x265c06[_0x8346('0x15')][_0x8346('0x14')]);}})[_0x8346('0x16')](function(_0x4dc342){logger[_0x8346('0x12')](_0x8346('0xe'),_0x2bc2a4,_0x4dc342);_0x461116(_0x4dc342);});});} \ No newline at end of file +var _0x31e7=['ChatGroup,\x20%s,\x20%s','request\x20sent','debug','ChatGroup,\x20%s,\x20%s,\x20%s','error','message','result','catch','util','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','client','defaults','redis','localhost','socket.io-emitter','./chatGroup.socket','register','request','then','info'];(function(_0x582787,_0xa70c94){var _0x1b6cf8=function(_0x2f2bdd){while(--_0x2f2bdd){_0x582787['push'](_0x582787['shift']());}};_0x1b6cf8(++_0xa70c94);}(_0x31e7,0x74));var _0x731e=function(_0x2a8ea2,_0x9a68e){_0x2a8ea2=_0x2a8ea2-0x0;var _0xf2090b=_0x31e7[_0x2a8ea2];return _0xf2090b;};'use strict';var _=require('lodash');var util=require(_0x731e('0x0'));var moment=require('moment');var BPromise=require(_0x731e('0x1'));var rs=require(_0x731e('0x2'));var fs=require('fs');var Redis=require(_0x731e('0x3'));var db=require(_0x731e('0x4'))['db'];var utils=require(_0x731e('0x5'));var logger=require(_0x731e('0x6'))(_0x731e('0x7'));var config=require(_0x731e('0x8'));var jayson=require('jayson/promise');var client=jayson[_0x731e('0x9')]['http']({'port':0x232a});config['redis']=_[_0x731e('0xa')](config[_0x731e('0xb')],{'host':_0x731e('0xc'),'port':0x18eb});var socket=require(_0x731e('0xd'))(new Redis(config[_0x731e('0xb')]));require(_0x731e('0xe'))[_0x731e('0xf')](socket);function respondWithRpcPromise(_0x5ed856,_0x56896a,_0x4e5784){return new BPromise(function(_0x3b4e6f,_0x1966c9){return client[_0x731e('0x10')](_0x5ed856,_0x4e5784)[_0x731e('0x11')](function(_0x2db10e){logger[_0x731e('0x12')](_0x731e('0x13'),_0x56896a,_0x731e('0x14'));logger[_0x731e('0x15')](_0x731e('0x16'),_0x56896a,_0x731e('0x14'),JSON['stringify'](_0x2db10e));if(_0x2db10e[_0x731e('0x17')]){if(_0x2db10e[_0x731e('0x17')]['code']===0x1f4){logger['error']('ChatGroup,\x20%s,\x20%s',_0x56896a,_0x2db10e[_0x731e('0x17')][_0x731e('0x18')]);return _0x1966c9(_0x2db10e[_0x731e('0x17')][_0x731e('0x18')]);}logger[_0x731e('0x17')](_0x731e('0x13'),_0x56896a,_0x2db10e[_0x731e('0x17')][_0x731e('0x18')]);return _0x3b4e6f(_0x2db10e['error'][_0x731e('0x18')]);}else{logger[_0x731e('0x12')](_0x731e('0x13'),_0x56896a,'request\x20sent');_0x3b4e6f(_0x2db10e[_0x731e('0x19')]['message']);}})[_0x731e('0x1a')](function(_0x1a3ab9){logger['error'](_0x731e('0x13'),_0x56896a,_0x1a3ab9);_0x1966c9(_0x1a3ab9);});});} \ No newline at end of file diff --git a/server/api/chatGroup/chatGroup.socket.js b/server/api/chatGroup/chatGroup.socket.js index 25ba2fa..d1f7b42 100644 --- a/server/api/chatGroup/chatGroup.socket.js +++ b/server/api/chatGroup/chatGroup.socket.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x4696=['removeListener','register','length','chatGroup:','./chatGroup.events','save','remove','update','emit'];(function(_0x4408e0,_0x288e71){var _0x2488a4=function(_0x2f84fc){while(--_0x2f84fc){_0x4408e0['push'](_0x4408e0['shift']());}};_0x2488a4(++_0x288e71);}(_0x4696,0x109));var _0x6469=function(_0x405fa5,_0x4584b8){_0x405fa5=_0x405fa5-0x0;var _0x59f6da=_0x4696[_0x405fa5];return _0x59f6da;};'use strict';var ChatGroupEvents=require(_0x6469('0x0'));var events=[_0x6469('0x1'),_0x6469('0x2'),_0x6469('0x3')];function createListener(_0x568ccc,_0x655e45){return function(_0x2011ca){_0x655e45[_0x6469('0x4')](_0x568ccc,_0x2011ca);};}function removeListener(_0x27d98d,_0x15493b){return function(){ChatGroupEvents[_0x6469('0x5')](_0x27d98d,_0x15493b);};}exports[_0x6469('0x6')]=function(_0x149e48){for(var _0x58d9e3=0x0,_0x457655=events[_0x6469('0x7')];_0x58d9e3<_0x457655;_0x58d9e3++){var _0x2761b4=events[_0x58d9e3];var _0x1a3862=createListener(_0x6469('0x8')+_0x2761b4,_0x149e48);ChatGroupEvents['on'](_0x2761b4,_0x1a3862);}}; \ No newline at end of file +var _0xf916=['remove','update','emit','removeListener','register','./chatGroup.events','save'];(function(_0x4a5363,_0x2e9674){var _0x47d623=function(_0x29b510){while(--_0x29b510){_0x4a5363['push'](_0x4a5363['shift']());}};_0x47d623(++_0x2e9674);}(_0xf916,0x1c5));var _0x6f91=function(_0x574353,_0x286415){_0x574353=_0x574353-0x0;var _0x1422bc=_0xf916[_0x574353];return _0x1422bc;};'use strict';var ChatGroupEvents=require(_0x6f91('0x0'));var events=[_0x6f91('0x1'),_0x6f91('0x2'),_0x6f91('0x3')];function createListener(_0x252e17,_0x41a68a){return function(_0x3a90eb){_0x41a68a[_0x6f91('0x4')](_0x252e17,_0x3a90eb);};}function removeListener(_0x1dcee7,_0x116231){return function(){ChatGroupEvents[_0x6f91('0x5')](_0x1dcee7,_0x116231);};}exports[_0x6f91('0x6')]=function(_0xed0276){for(var _0x20cf79=0x0,_0x4d9c32=events['length'];_0x20cf79<_0x4d9c32;_0x20cf79++){var _0x5ed5b0=events[_0x20cf79];var _0x50301a=createListener('chatGroup:'+_0x5ed5b0,_0xed0276);ChatGroupEvents['on'](_0x5ed5b0,_0x50301a);}}; \ No newline at end of file diff --git a/server/api/chatGroup/index.js b/server/api/chatGroup/index.js index b163c5f..eb12335 100644 --- a/server/api/chatGroup/index.js +++ b/server/api/chatGroup/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x5101=['update','delete','destroy','removeMembers','exports','multer','path','connect-timeout','Router','fs-extra','../../components/auth/service','../../config/environment','./chatGroup.controller','get','isAuthenticated','index','/describe','describe','/:id','/:id/unread','getUnread','/:id/members','getMembers','/:id/messages','getMessages','post','create','addMessage','put'];(function(_0x531308,_0xbb5d51){var _0x3791fb=function(_0x2168fa){while(--_0x2168fa){_0x531308['push'](_0x531308['shift']());}};_0x3791fb(++_0xbb5d51);}(_0x5101,0xb3));var _0x1510=function(_0x425abb,_0x88f615){_0x425abb=_0x425abb-0x0;var _0x4df729=_0x5101[_0x425abb];return _0x4df729;};'use strict';var multer=require(_0x1510('0x0'));var util=require('util');var path=require(_0x1510('0x1'));var timeout=require(_0x1510('0x2'));var express=require('express');var router=express[_0x1510('0x3')]();var fs_extra=require(_0x1510('0x4'));var auth=require(_0x1510('0x5'));var interaction=require('../../components/interaction/service');var config=require(_0x1510('0x6'));var controller=require(_0x1510('0x7'));router[_0x1510('0x8')]('/',auth[_0x1510('0x9')](),controller[_0x1510('0xa')]);router[_0x1510('0x8')](_0x1510('0xb'),auth[_0x1510('0x9')](),controller[_0x1510('0xc')]);router[_0x1510('0x8')](_0x1510('0xd'),auth[_0x1510('0x9')](),controller['show']);router[_0x1510('0x8')](_0x1510('0xe'),auth[_0x1510('0x9')](),controller[_0x1510('0xf')]);router['get'](_0x1510('0x10'),auth[_0x1510('0x9')](),controller[_0x1510('0x11')]);router[_0x1510('0x8')](_0x1510('0x12'),auth[_0x1510('0x9')](),controller[_0x1510('0x13')]);router[_0x1510('0x14')]('/',auth[_0x1510('0x9')](),controller[_0x1510('0x15')]);router[_0x1510('0x14')]('/:id/members',auth['isAuthenticated'](),controller['addMembers']);router[_0x1510('0x14')](_0x1510('0x12'),auth[_0x1510('0x9')](),controller[_0x1510('0x16')]);router[_0x1510('0x17')](_0x1510('0xd'),auth[_0x1510('0x9')](),controller[_0x1510('0x18')]);router[_0x1510('0x19')](_0x1510('0xd'),auth['isAuthenticated'](),controller[_0x1510('0x1a')]);router[_0x1510('0x19')](_0x1510('0x10'),auth[_0x1510('0x9')](),controller[_0x1510('0x1b')]);module[_0x1510('0x1c')]=router; \ No newline at end of file +var _0x9ffa=['show','/:id/members','getMembers','/:id/messages','getMessages','post','create','addMembers','put','update','delete','destroy','removeMembers','multer','util','path','connect-timeout','express','fs-extra','../../components/auth/service','../../components/interaction/service','./chatGroup.controller','get','isAuthenticated','index','/describe','describe','/:id'];(function(_0x95b3f3,_0x382b44){var _0x2d30c7=function(_0x131328){while(--_0x131328){_0x95b3f3['push'](_0x95b3f3['shift']());}};_0x2d30c7(++_0x382b44);}(_0x9ffa,0x109));var _0xa9ff=function(_0x553fdb,_0x57c3f7){_0x553fdb=_0x553fdb-0x0;var _0x265e65=_0x9ffa[_0x553fdb];return _0x265e65;};'use strict';var multer=require(_0xa9ff('0x0'));var util=require(_0xa9ff('0x1'));var path=require(_0xa9ff('0x2'));var timeout=require(_0xa9ff('0x3'));var express=require(_0xa9ff('0x4'));var router=express['Router']();var fs_extra=require(_0xa9ff('0x5'));var auth=require(_0xa9ff('0x6'));var interaction=require(_0xa9ff('0x7'));var config=require('../../config/environment');var controller=require(_0xa9ff('0x8'));router[_0xa9ff('0x9')]('/',auth[_0xa9ff('0xa')](),controller[_0xa9ff('0xb')]);router[_0xa9ff('0x9')](_0xa9ff('0xc'),auth['isAuthenticated'](),controller[_0xa9ff('0xd')]);router['get'](_0xa9ff('0xe'),auth[_0xa9ff('0xa')](),controller[_0xa9ff('0xf')]);router[_0xa9ff('0x9')]('/:id/unread',auth[_0xa9ff('0xa')](),controller['getUnread']);router['get'](_0xa9ff('0x10'),auth[_0xa9ff('0xa')](),controller[_0xa9ff('0x11')]);router[_0xa9ff('0x9')](_0xa9ff('0x12'),auth[_0xa9ff('0xa')](),controller[_0xa9ff('0x13')]);router[_0xa9ff('0x14')]('/',auth[_0xa9ff('0xa')](),controller[_0xa9ff('0x15')]);router['post'](_0xa9ff('0x10'),auth[_0xa9ff('0xa')](),controller[_0xa9ff('0x16')]);router[_0xa9ff('0x14')](_0xa9ff('0x12'),auth[_0xa9ff('0xa')](),controller['addMessage']);router[_0xa9ff('0x17')](_0xa9ff('0xe'),auth[_0xa9ff('0xa')](),controller[_0xa9ff('0x18')]);router[_0xa9ff('0x19')](_0xa9ff('0xe'),auth[_0xa9ff('0xa')](),controller[_0xa9ff('0x1a')]);router[_0xa9ff('0x19')](_0xa9ff('0x10'),auth[_0xa9ff('0xa')](),controller[_0xa9ff('0x1b')]);module['exports']=router; \ No newline at end of file diff --git a/server/api/chatInteraction/chatInteraction.attributes.js b/server/api/chatInteraction/chatInteraction.attributes.js index 21612e4..3f7a965 100644 --- a/server/api/chatInteraction/chatInteraction.attributes.js +++ b/server/api/chatInteraction/chatInteraction.attributes.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x38c9=['long','out','sequelize','exports','BOOLEAN','ENUM','star','thumb','TEXT','STRING','DATE'];(function(_0x3767b7,_0x566f18){var _0x1f31fb=function(_0x567582){while(--_0x567582){_0x3767b7['push'](_0x3767b7['shift']());}};_0x1f31fb(++_0x566f18);}(_0x38c9,0x199));var _0x938c=function(_0x51fe5f,_0x1d8632){_0x51fe5f=_0x51fe5f-0x0;var _0x4abce9=_0x38c9[_0x51fe5f];return _0x4abce9;};'use strict';var Sequelize=require(_0x938c('0x0'));module[_0x938c('0x1')]={'closed':{'type':Sequelize[_0x938c('0x2')],'defaultValue':![]},'ratingValue':{'type':Sequelize['INTEGER']},'ratingType':{'type':Sequelize[_0x938c('0x3')](_0x938c('0x4'),_0x938c('0x5')),'defaultValue':_0x938c('0x4')},'ratingMessage':{'type':Sequelize['TEXT']},'pathTranscript':{'type':Sequelize[_0x938c('0x6')]},'mailTranscript':{'type':Sequelize[_0x938c('0x7')],'validate':{'isEmail':!![]}},'closedAt':{'type':Sequelize[_0x938c('0x8')]},'disposition':{'type':Sequelize[_0x938c('0x7')]},'secondDisposition':{'type':Sequelize['STRING']},'thirdDisposition':{'type':Sequelize[_0x938c('0x7')]},'note':{'type':Sequelize[_0x938c('0x7')]},'browserName':{'type':Sequelize[_0x938c('0x7')]},'browserVersion':{'type':Sequelize[_0x938c('0x7')]},'osName':{'type':Sequelize['STRING']},'osVersion':{'type':Sequelize['STRING']},'deviceModel':{'type':Sequelize[_0x938c('0x7')]},'deviceVendor':{'type':Sequelize[_0x938c('0x7')]},'deviceType':{'type':Sequelize[_0x938c('0x7')]},'referer':{'type':Sequelize[_0x938c('0x6')]},'customerIp':{'type':Sequelize[_0x938c('0x7')]},'formData':{'type':Sequelize[_0x938c('0x6')](_0x938c('0x9'))},'read1stAt':{'type':Sequelize[_0x938c('0x8')]},'lastMsgAt':{'type':Sequelize[_0x938c('0x8')]},'lastMsgDirection':{'type':Sequelize[_0x938c('0x3')]('in',_0x938c('0xa')),'defaultValue':'in','allowNull':![]},'closeReason':{'type':Sequelize[_0x938c('0x7')]},'customerPort':{'type':Sequelize[_0x938c('0x7')]},'vidaooSessionId':{'type':Sequelize[_0x938c('0x6')]},'autoreplyExecuted':{'type':Sequelize[_0x938c('0x2')],'defaultValue':![]}}; \ No newline at end of file +var _0x065e=['sequelize','ENUM','star','thumb','TEXT','STRING','long','DATE','BOOLEAN'];(function(_0x7fcd0a,_0x2f5413){var _0x428e0d=function(_0x1eca9e){while(--_0x1eca9e){_0x7fcd0a['push'](_0x7fcd0a['shift']());}};_0x428e0d(++_0x2f5413);}(_0x065e,0x1a7));var _0xe065=function(_0x59bfeb,_0x3c7c50){_0x59bfeb=_0x59bfeb-0x0;var _0x550d4f=_0x065e[_0x59bfeb];return _0x550d4f;};'use strict';var Sequelize=require(_0xe065('0x0'));module['exports']={'closed':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'ratingValue':{'type':Sequelize['INTEGER']},'ratingType':{'type':Sequelize[_0xe065('0x1')](_0xe065('0x2'),_0xe065('0x3')),'defaultValue':'star'},'ratingMessage':{'type':Sequelize['TEXT']},'pathTranscript':{'type':Sequelize[_0xe065('0x4')]},'mailTranscript':{'type':Sequelize[_0xe065('0x5')],'validate':{'isEmail':!![]}},'closedAt':{'type':Sequelize['DATE']},'disposition':{'type':Sequelize[_0xe065('0x5')]},'secondDisposition':{'type':Sequelize[_0xe065('0x5')]},'thirdDisposition':{'type':Sequelize[_0xe065('0x5')]},'note':{'type':Sequelize['STRING']},'browserName':{'type':Sequelize[_0xe065('0x5')]},'browserVersion':{'type':Sequelize['STRING']},'osName':{'type':Sequelize[_0xe065('0x5')]},'osVersion':{'type':Sequelize[_0xe065('0x5')]},'deviceModel':{'type':Sequelize[_0xe065('0x5')]},'deviceVendor':{'type':Sequelize[_0xe065('0x5')]},'deviceType':{'type':Sequelize[_0xe065('0x5')]},'referer':{'type':Sequelize['TEXT']},'customerIp':{'type':Sequelize[_0xe065('0x5')]},'formData':{'type':Sequelize[_0xe065('0x4')](_0xe065('0x6'))},'read1stAt':{'type':Sequelize[_0xe065('0x7')]},'lastMsgAt':{'type':Sequelize[_0xe065('0x7')]},'lastMsgDirection':{'type':Sequelize[_0xe065('0x1')]('in','out'),'defaultValue':'in','allowNull':![]},'closeReason':{'type':Sequelize['STRING']},'customerPort':{'type':Sequelize[_0xe065('0x5')]},'vidaooSessionId':{'type':Sequelize[_0xe065('0x4')]},'autoreplyExecuted':{'type':Sequelize[_0xe065('0x8')],'defaultValue':![]}}; \ No newline at end of file diff --git a/server/api/chatInteraction/chatInteraction.controller.js b/server/api/chatInteraction/chatInteraction.controller.js index 598cd7e..0d9e97d 100644 --- a/server/api/chatInteraction/chatInteraction.controller.js +++ b/server/api/chatInteraction/chatInteraction.controller.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x7a5a=['UserId','Interaction\x20already\x20assigned','closed','disposition','attachmentUpload','file','originalname','basename','filename','mimetype','Attachment','attachmentDownload','json','Unauthorized','attachId','join','root','offline-chat/','close','mailTranscript','server/files/chat/upload/','format','transcript-%s.txt','now','Messages','User','ChatWebsiteId','ContactId','agentAlias','customer','%s%d','Visitor','agentIdentifier','website_alias','System','agent_alias','alias','agent_fullname','[%s]\x20%s:\x20%s\x0a','MM/DD/YYYY\x20HH:mm:ss','appendFileSync','MailAccount','MailServerOut','Smtp','CloudProvider','getSmtpOptions','SendMail','sendMail','\x22%s\x22\x20<%s>','Mail\x20Transcript','Hi\x20%s,\x20attached\x20you\x20can\x20find\x20your\x20transcript\x20file.\x20\x0a\x0aRegards.\x20\x0a\x0a','addMessage','ids','getMessages','filters','hasOwnProperty','nolimit','offset','sort','where','pick','filter','$gte','rows','length','ChatInteractionId','secret','includeAgent','push','omit','Tag','emit','removeTags','download','toString','server','files','tmp','attachments','firstName','lastName','direction','Owner','mkdirSync','Chat','N.A.','createdAt','YYYY-MM-DD\x20HH:mm:ss','closedAt','browserName','referer','customerPort','existsSync','createReadStream','pipe','createWriteStream','value','renderFile','views','downloadInteraction.ejs','transcript-','.pdf','createPdfFromHTML','err','unlinkSync','rimraf','request-promise','moment','bluebird','util','path','ejs','lodash','ioredis','../../components/interaction/service','../../components/parsers/qs','../../config/logger','../../config/environment','../../mysqldb','defaults','redis','localhost','./chatInteraction.socket','register','jayson/promise','client','http','request','then','ChatInteraction,\x20%s,\x20%s','debug','error','message','info','request\x20sent','result','catch','sendStatus','status','undefined','count','limit','set','Content-Range','destroy','end','stack','name','render','merge','body','contact','interaction','account','map','ChatInteraction','rawAttributes','fieldName','type','getOptions','findAll','chat','query','user','show','model','keys','intersection','fields','attributes','includeAll','include','options','find','create','update','params','describe','createVidaooSession','findOne','ChatWebsite','vidaooApiKey','vidaooEscalation','vidaooTopic','vidaooMetadata','fullname','email','POST','isNull','vidaooNote','follow','parse','metadata','Sequelize','ValidationError','Error\x20in\x20Vidaoo\x20configuration','join_url','out','ChatMessage','Unable\x20to\x20create\x20Vidaoo\x20session','updateAttributes','customUpdate','CmContact','Contact','abandon','abandonInteraction,\x20%s,\x20%s,\x20%s','entity\x20not\x20found'];(function(_0x59693c,_0x172b3e){var _0x13e50f=function(_0x38d20e){while(--_0x38d20e){_0x59693c['push'](_0x59693c['shift']());}};_0x13e50f(++_0x172b3e);}(_0x7a5a,0x138));var _0xa7a5=function(_0x32aacf,_0x15c863){_0x32aacf=_0x32aacf-0x0;var _0xfd70b3=_0x7a5a[_0x32aacf];return _0xfd70b3;};'use strict';var rimraf=require(_0xa7a5('0x0'));var zipdir=require('zip-dir');var rp=require(_0xa7a5('0x1'));var moment=require(_0xa7a5('0x2'));var BPromise=require(_0xa7a5('0x3'));var Mustache=require('mustache');var util=require(_0xa7a5('0x4'));var path=require(_0xa7a5('0x5'));var ejs=require(_0xa7a5('0x6'));var fs=require('fs');var _=require(_0xa7a5('0x7'));var Redis=require(_0xa7a5('0x8'));var interaction=require(_0xa7a5('0x9'));var qs=require(_0xa7a5('0xa'));var pdf=require('../../components/export/pdf');var logger=require(_0xa7a5('0xb'))('api');var config=require(_0xa7a5('0xc'));var db=require(_0xa7a5('0xd'))['db'];config['redis']=_[_0xa7a5('0xe')](config[_0xa7a5('0xf')],{'host':_0xa7a5('0x10'),'port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config[_0xa7a5('0xf')]));require(_0xa7a5('0x11'))[_0xa7a5('0x12')](socket);var jayson=require(_0xa7a5('0x13'));var client=jayson[_0xa7a5('0x14')]['http']({'port':0x232b});var client9004=jayson[_0xa7a5('0x14')][_0xa7a5('0x15')]({'port':0x232c});function respondWithRpcPromise(_0x157484,_0x438827,_0x225710,_0x5a426d){return new BPromise(function(_0xd69bfc,_0x7265){var _0x1a2f35=_0x5a426d||client;return _0x1a2f35[_0xa7a5('0x16')](_0x157484,_0x225710)[_0xa7a5('0x17')](function(_0x4dcba4){logger['info'](_0xa7a5('0x18'),_0x438827,'request\x20sent');logger[_0xa7a5('0x19')]('ChatInteraction,\x20%s,\x20%s,\x20%s',_0x438827,'request\x20sent',JSON['stringify'](_0x4dcba4));if(_0x4dcba4[_0xa7a5('0x1a')]){if(_0x4dcba4['error']['code']===0x1f4){logger[_0xa7a5('0x1a')](_0xa7a5('0x18'),_0x438827,_0x4dcba4[_0xa7a5('0x1a')][_0xa7a5('0x1b')]);return _0x7265(_0x4dcba4[_0xa7a5('0x1a')]['message']);}logger['error']('ChatInteraction,\x20%s,\x20%s',_0x438827,_0x4dcba4[_0xa7a5('0x1a')][_0xa7a5('0x1b')]);return _0xd69bfc(_0x4dcba4[_0xa7a5('0x1a')]['message']);}else{logger[_0xa7a5('0x1c')](_0xa7a5('0x18'),_0x438827,_0xa7a5('0x1d'));_0xd69bfc(_0x4dcba4[_0xa7a5('0x1e')]['message']);}})[_0xa7a5('0x1f')](function(_0x4e4b52){logger[_0xa7a5('0x1a')](_0xa7a5('0x18'),_0x438827,_0x4e4b52);_0x7265(_0x4e4b52);});});}function respondWithStatusCode(_0x3d6bdd,_0x101f59){_0x101f59=_0x101f59||0xcc;return function(_0x4c2d50){if(_0x4c2d50){return _0x3d6bdd[_0xa7a5('0x20')](_0x101f59);}return _0x3d6bdd[_0xa7a5('0x21')](_0x101f59)['end']();};}function respondWithResult(_0x43bd4d,_0x20bad9){_0x20bad9=_0x20bad9||0xc8;return function(_0xadc96c){if(_0xadc96c){return _0x43bd4d[_0xa7a5('0x21')](_0x20bad9)['json'](_0xadc96c);}};}function respondWithFilteredResult(_0x2dcd3a,_0xbd0fc7){return function(_0x3c2ef5){if(_0x3c2ef5){var _0x48ae8a=typeof _0xbd0fc7['offset']==='undefined'&&typeof _0xbd0fc7['limit']===_0xa7a5('0x22');var _0x3bc951=_0x3c2ef5[_0xa7a5('0x23')];var _0x1adde8=_0x48ae8a?0x0:_0xbd0fc7['offset'];var _0x3323a0=_0x48ae8a?_0x3c2ef5[_0xa7a5('0x23')]:_0xbd0fc7['offset']+_0xbd0fc7[_0xa7a5('0x24')];var _0x5558d4;if(_0x3323a0>=_0x3bc951){_0x3323a0=_0x3bc951;_0x5558d4=0xc8;}else{_0x5558d4=0xce;}_0x2dcd3a[_0xa7a5('0x21')](_0x5558d4);return _0x2dcd3a[_0xa7a5('0x25')](_0xa7a5('0x26'),_0x1adde8+'-'+_0x3323a0+'/'+_0x3bc951)['json'](_0x3c2ef5);}return null;};}function saveUpdates(_0x18a0b5){return function(_0x154593){if(_0x154593){return _0x154593['update'](_0x18a0b5)[_0xa7a5('0x17')](function(_0x2b6d3a){return _0x2b6d3a;});}return null;};}function removeEntity(_0x482be7){return function(_0xf13cee){if(_0xf13cee){return _0xf13cee[_0xa7a5('0x27')]()[_0xa7a5('0x17')](function(){_0x482be7[_0xa7a5('0x21')](0xcc)[_0xa7a5('0x28')]();});}};}function handleEntityNotFound(_0x3b5cd0){return function(_0xb06bd4){if(!_0xb06bd4){_0x3b5cd0[_0xa7a5('0x20')](0x194);}return _0xb06bd4;};}function handleError(_0x205fac,_0x58286c){_0x58286c=_0x58286c||0x1f4;return function(_0x850fb7){logger[_0xa7a5('0x1a')](_0x850fb7[_0xa7a5('0x29')]);if(_0x850fb7[_0xa7a5('0x2a')]){delete _0x850fb7['name'];}_0x205fac[_0xa7a5('0x21')](_0x58286c)['send'](_0x850fb7);};}function getMustacheRender(_0xd1b47e,_0x2b3878){return Mustache[_0xa7a5('0x2b')](_0xd1b47e,_[_0xa7a5('0x2c')](_0x2b3878[_0xa7a5('0x2d')],{'contact':_0x2b3878[_0xa7a5('0x2e')],'message':_0x2b3878[_0xa7a5('0x1b')],'agent':_0x2b3878['agent'],'interaction':_0x2b3878[_0xa7a5('0x2f')],'account':_0x2b3878[_0xa7a5('0x30')]}))||'';}exports['index']=function(_0x24f2a8,_0x4e3da3){var _0x568748={};var _0x4934de=_[_0xa7a5('0x31')](db[_0xa7a5('0x32')][_0xa7a5('0x33')],function(_0x5c2c38){return{'name':_0x5c2c38[_0xa7a5('0x34')],'type':_0x5c2c38[_0xa7a5('0x35')]['key']};});_0x568748=qs[_0xa7a5('0x36')](_0x4934de,_0x24f2a8);return interaction[_0xa7a5('0x37')](_0xa7a5('0x38'),_0x24f2a8[_0xa7a5('0x39')],_0x24f2a8[_0xa7a5('0x3a')],_0x568748,_0x4934de)[_0xa7a5('0x17')](respondWithFilteredResult(_0x4e3da3,_0x568748))[_0xa7a5('0x1f')](handleError(_0x4e3da3,null));};exports[_0xa7a5('0x3b')]=function(_0x3a4ffe,_0x50b3d8){var _0xfee337={'raw':![],'where':{'id':_0x3a4ffe['params']['id']}},_0x531ddc={};_0x531ddc[_0xa7a5('0x3c')]=_[_0xa7a5('0x3d')](db[_0xa7a5('0x32')]['rawAttributes']);_0x531ddc[_0xa7a5('0x39')]=_['keys'](_0x3a4ffe[_0xa7a5('0x39')]);_0x531ddc['filters']=_['intersection'](_0x531ddc['model'],_0x531ddc[_0xa7a5('0x39')]);_0xfee337['attributes']=_[_0xa7a5('0x3e')](_0x531ddc[_0xa7a5('0x3c')],qs[_0xa7a5('0x3f')](_0x3a4ffe['query'][_0xa7a5('0x3f')]));_0xfee337[_0xa7a5('0x40')]=_0xfee337[_0xa7a5('0x40')]['length']?_0xfee337[_0xa7a5('0x40')]:_0x531ddc[_0xa7a5('0x3c')];if(_0x3a4ffe[_0xa7a5('0x39')][_0xa7a5('0x41')]){_0xfee337[_0xa7a5('0x42')]=[{'all':!![]}];}_0xfee337=_[_0xa7a5('0x2c')]({},_0xfee337,_0x3a4ffe[_0xa7a5('0x43')]);return db[_0xa7a5('0x32')][_0xa7a5('0x44')](_0xfee337)[_0xa7a5('0x17')](handleEntityNotFound(_0x50b3d8,null))['then'](respondWithResult(_0x50b3d8,null))[_0xa7a5('0x1f')](handleError(_0x50b3d8,null));};exports['create']=function(_0x29642e,_0x345cd5){return db[_0xa7a5('0x32')][_0xa7a5('0x45')](_0x29642e[_0xa7a5('0x2d')],{})[_0xa7a5('0x17')](respondWithResult(_0x345cd5,0xc9))[_0xa7a5('0x1f')](handleError(_0x345cd5,null));};exports[_0xa7a5('0x46')]=function(_0x544b5e,_0x4780a3){if(_0x544b5e[_0xa7a5('0x2d')]['id']){delete _0x544b5e['body']['id'];}return db[_0xa7a5('0x32')][_0xa7a5('0x44')]({'where':{'id':_0x544b5e[_0xa7a5('0x47')]['id']}})[_0xa7a5('0x17')](handleEntityNotFound(_0x4780a3,null))[_0xa7a5('0x17')](saveUpdates(_0x544b5e['body'],null))[_0xa7a5('0x17')](respondWithResult(_0x4780a3,null))['catch'](handleError(_0x4780a3,null));};exports[_0xa7a5('0x27')]=function(_0x4170c8,_0x6f711e){return db['ChatInteraction']['find']({'where':{'id':_0x4170c8[_0xa7a5('0x47')]['id']}})[_0xa7a5('0x17')](handleEntityNotFound(_0x6f711e,null))[_0xa7a5('0x17')](removeEntity(_0x6f711e,null))['catch'](handleError(_0x6f711e,null));};exports['describe']=function(_0x210856,_0x2e1921){return db['ChatInteraction'][_0xa7a5('0x48')]()['then'](respondWithResult(_0x2e1921,null))[_0xa7a5('0x1f')](handleError(_0x2e1921,null));};exports[_0xa7a5('0x49')]=function(_0x17a998,_0x5080a7){var _0x560367=_0x17a998['params']['id'];var _0x35345d;var _0x364314;var _0x502a31;return db[_0xa7a5('0x32')][_0xa7a5('0x4a')]({'where':{'id':_0x560367}})[_0xa7a5('0x17')](function(_0x3fca43){_0x35345d=_0x3fca43;return db[_0xa7a5('0x4b')][_0xa7a5('0x4a')]({'where':{'id':_0x3fca43['ChatWebsiteId']},'attributes':['id',_0xa7a5('0x4c'),_0xa7a5('0x4d'),_0xa7a5('0x4e'),'vidaooNote',_0xa7a5('0x4f')],'raw':!![]});})[_0xa7a5('0x17')](function(_0x3f0ce7){if(_0x3f0ce7&&_0x3f0ce7[_0xa7a5('0x4c')]&&_0x3f0ce7['vidaooEscalation']){_0x364314=_0x3f0ce7;var _0x29bbfb={'interaction':{'id':_0x560367},'agent':{'id':_0x17a998[_0xa7a5('0x3a')]['id'],'name':_0x17a998[_0xa7a5('0x3a')][_0xa7a5('0x2a')],'fullname':_0x17a998[_0xa7a5('0x3a')][_0xa7a5('0x50')],'email':_0x17a998[_0xa7a5('0x3a')][_0xa7a5('0x51')]},'contact':_0x17a998[_0xa7a5('0x2d')][_0xa7a5('0x2e')],'account':_0x17a998['body']['account']};var _0x1a3baa={'rejectUnauthorized':![],'method':_0xa7a5('0x52'),'url':'https://api-vidaoo.xcally.com/api/v1/meetings','headers':{'X-APIKEY':_0x3f0ce7[_0xa7a5('0x4c')]},'body':{'duration':null,'scheduledAt':null,'participants':[_0x17a998[_0xa7a5('0x3a')][_0xa7a5('0x51')]],'buttons':null,'topic':_0x364314['vidaooTopic'],'note':_[_0xa7a5('0x53')](_0x364314[_0xa7a5('0x54')])?null:getMustacheRender(_0x364314[_0xa7a5('0x54')],_0x29bbfb),'metadata':null},'redirect':_0xa7a5('0x55'),'json':!![]};try{if(!_['isNull'](_0x364314['vidaooMetadata'])){var _0x446dd3=getMustacheRender(_0x364314[_0xa7a5('0x4f')],_0x29bbfb);var _0xa2f38a=JSON[_0xa7a5('0x56')](_0x446dd3);_0x1a3baa[_0xa7a5('0x2d')][_0xa7a5('0x57')]=_0xa2f38a;}}catch(_0x2a581e){throw new db[(_0xa7a5('0x58'))][(_0xa7a5('0x59'))]('Error\x20in\x20conversion\x20vidaooMetadata');}return rp(_0x1a3baa);}else{throw new db[(_0xa7a5('0x58'))]['ValidationError'](_0xa7a5('0x5a'));}})[_0xa7a5('0x17')](function(_0x345284){_0x502a31=_0x345284;if(_0x502a31['id']){var _0x3013a6={'body':_0x502a31[_0xa7a5('0x5b')],'ChatWebsiteId':_0x364314['id'],'ChatInteractionId':_0x35345d['id'],'direction':_0xa7a5('0x5c'),'UserId':_0x17a998[_0xa7a5('0x3a')]['id']};return db[_0xa7a5('0x5d')][_0xa7a5('0x45')](_0x3013a6,{});}else{throw new db[(_0xa7a5('0x58'))][(_0xa7a5('0x59'))](_0xa7a5('0x5e'));}})['then'](function(){return _0x35345d[_0xa7a5('0x5f')]({'vidaooSessionId':_0x502a31['id']});})[_0xa7a5('0x17')](respondWithResult(_0x5080a7,null))[_0xa7a5('0x1f')](handleError(_0x5080a7,null));};exports[_0xa7a5('0x60')]=function(_0x4ba38c,_0x277cfb){if(_0x4ba38c[_0xa7a5('0x2d')]['id']){delete _0x4ba38c[_0xa7a5('0x2d')]['id'];}return db[_0xa7a5('0x32')]['find']({'where':{'id':_0x4ba38c['params']['id']},'include':[{'model':db[_0xa7a5('0x61')],'as':_0xa7a5('0x62')}]})[_0xa7a5('0x17')](handleEntityNotFound(_0x277cfb,null))[_0xa7a5('0x17')](saveUpdates(_0x4ba38c['body'],null))['then'](respondWithResult(_0x277cfb,null))[_0xa7a5('0x1f')](handleError(_0x277cfb,null));};exports[_0xa7a5('0x63')]=function(_0x44a99a,_0x11c762){if(_0x44a99a[_0xa7a5('0x2d')]['id']){delete _0x44a99a['body']['id'];}return db[_0xa7a5('0x32')][_0xa7a5('0x44')]({'where':{'id':_0x44a99a[_0xa7a5('0x47')]['id']}})[_0xa7a5('0x17')](function(_0x4acae3){if(!_0x4acae3){logger[_0xa7a5('0x1a')](_0xa7a5('0x64'),_0xa7a5('0x63'),0x194,_0xa7a5('0x65'));_0x11c762[_0xa7a5('0x20')](0x194);}else{if(_0x4acae3[_0xa7a5('0x66')]){throw new db[(_0xa7a5('0x58'))][(_0xa7a5('0x59'))](_0xa7a5('0x67'));}}return _0x4acae3;})[_0xa7a5('0x17')](function(_0x33b6a0){if(_0x33b6a0){return _0x33b6a0[_0xa7a5('0x46')]({'closed':_0x44a99a['body'][_0xa7a5('0x68')],'disposition':_0x44a99a[_0xa7a5('0x2d')][_0xa7a5('0x69')]})[_0xa7a5('0x17')](function(_0x4cc60f){return _0x4cc60f;});}})[_0xa7a5('0x17')](function(){return respondWithRpcPromise('AbandonInteraction',_0xa7a5('0x63'),_0x44a99a['body'],client9004);})[_0xa7a5('0x17')](respondWithResult(_0x11c762,null))[_0xa7a5('0x1f')](handleError(_0x11c762,null));};exports[_0xa7a5('0x6a')]=function(_0x5070c4,_0x39feb2){_0x5070c4[_0xa7a5('0x2d')]['name']=_0x5070c4[_0xa7a5('0x6b')][_0xa7a5('0x6c')];_0x5070c4[_0xa7a5('0x2d')][_0xa7a5('0x6d')]=_0x5070c4['file'][_0xa7a5('0x6e')];_0x5070c4[_0xa7a5('0x2d')][_0xa7a5('0x35')]=_0x5070c4[_0xa7a5('0x6b')][_0xa7a5('0x6f')];return db[_0xa7a5('0x70')]['create'](_0x5070c4[_0xa7a5('0x2d')])[_0xa7a5('0x17')](respondWithResult(_0x39feb2,0xc9))['catch'](handleError(_0x39feb2,null));};exports[_0xa7a5('0x71')]=function(_0xb84465,_0x420995){return db[_0xa7a5('0x32')][_0xa7a5('0x4a')]({'where':{'id':_0xb84465['params']['id']},'raw':!![]})[_0xa7a5('0x17')](handleEntityNotFound(_0x420995,null))[_0xa7a5('0x17')](function(_0x38be92){if(_0x38be92){if(_0x38be92[_0xa7a5('0x68')]){return _0x420995[_0xa7a5('0x21')](0x193)[_0xa7a5('0x72')]({'status':0x193,'message':_0xa7a5('0x73')});}return db[_0xa7a5('0x70')][_0xa7a5('0x4a')]({'where':{'id':_0xb84465['query'][_0xa7a5('0x74')]},'raw':!![]})[_0xa7a5('0x17')](handleEntityNotFound(_0x420995,null));}})[_0xa7a5('0x17')](function(_0x32f711){if(_0x32f711){var _0x9709be=_0x32f711['ChatOfflineMessageId']!==null;var _0x34d682=path[_0xa7a5('0x75')](config[_0xa7a5('0x76')],'server/files/attachments/');if(_0x9709be){_0x34d682=path[_0xa7a5('0x75')](_0x34d682,_0xa7a5('0x77'));}var _0x2a3c29=path[_0xa7a5('0x75')](_0x34d682,_0x32f711[_0xa7a5('0x6d')]);return _0x420995['download'](_0x2a3c29);}})['catch'](handleError(_0x420995,null));};exports[_0xa7a5('0x78')]=function(_0x3cf384,_0x1e425d){var _0x295780=null;var _0x526499=null;var _0x9e3132=null;if(_0x3cf384[_0xa7a5('0x2d')]['id']){delete _0x3cf384[_0xa7a5('0x2d')]['id'];}if(_0x3cf384[_0xa7a5('0x2d')][_0xa7a5('0x79')]){_0x9e3132=path[_0xa7a5('0x75')](config[_0xa7a5('0x76')],_0xa7a5('0x7a'),util[_0xa7a5('0x7b')](_0xa7a5('0x7c'),Date[_0xa7a5('0x7d')]()));_0x3cf384[_0xa7a5('0x2d')]['pathTranscript']=_0x9e3132;}return db['ChatInteraction']['find']({'where':{'id':_0x3cf384[_0xa7a5('0x47')]['id']},'include':[{'model':db[_0xa7a5('0x5d')],'as':_0xa7a5('0x7e'),'include':[{'model':db[_0xa7a5('0x7f')],'as':_0xa7a5('0x7f')}]}]})[_0xa7a5('0x17')](handleEntityNotFound(_0x1e425d,null))[_0xa7a5('0x17')](saveUpdates(_0x3cf384[_0xa7a5('0x2d')],null))['then'](function(_0x872d01){if(_0x872d01){_0x295780=_0x872d01;return db[_0xa7a5('0x4b')][_0xa7a5('0x44')]({'where':{'id':_0x295780[_0xa7a5('0x80')]}});}})[_0xa7a5('0x17')](function(_0x529b55){if(_0x529b55){_0x526499=_0x529b55;return db['CmContact'][_0xa7a5('0x44')]({'where':{'id':_0x295780[_0xa7a5('0x81')]}});}})[_0xa7a5('0x17')](function(_0x20833e){if(_0x20833e){if(_0x9e3132){var _0x235e4e=null;for(var _0x331e2d=0x1;_0x331e2d<_0x295780[_0xa7a5('0x7e')]['length'];++_0x331e2d){_0x235e4e=_0x295780[_0xa7a5('0x7e')][_0x331e2d];var _0x3c5b6f=_0x235e4e[_0xa7a5('0x66')]?util[_0xa7a5('0x7b')]('%s%d',_0x526499[_0xa7a5('0x82')],_0x235e4e['UserId']):'System';var _0x5dce89=_0x3cf384['body'][_0xa7a5('0x83')]||util[_0xa7a5('0x7b')](_0xa7a5('0x84'),_0xa7a5('0x85'),_0x235e4e[_0xa7a5('0x81')]);switch(_0x526499[_0xa7a5('0x86')]){case _0xa7a5('0x87'):_0x3c5b6f=_0x235e4e[_0xa7a5('0x66')]?util[_0xa7a5('0x7b')](_0xa7a5('0x84'),_0x526499[_0xa7a5('0x82')],_0x235e4e[_0xa7a5('0x66')]):_0xa7a5('0x88');break;case _0xa7a5('0x89'):_0x3c5b6f=_0x235e4e[_0xa7a5('0x66')]?_0x235e4e[_0xa7a5('0x7f')][_0xa7a5('0x8a')]||_0x235e4e[_0xa7a5('0x7f')]['fullname']:_0xa7a5('0x88');break;case _0xa7a5('0x8b'):_0x3c5b6f=_0x235e4e[_0xa7a5('0x66')]?_0x235e4e[_0xa7a5('0x7f')][_0xa7a5('0x50')]:'System';break;default:_0x3c5b6f=_0x235e4e[_0xa7a5('0x66')]?util[_0xa7a5('0x7b')](_0xa7a5('0x84'),_0x526499[_0xa7a5('0x82')],_0x235e4e[_0xa7a5('0x66')]):_0xa7a5('0x88');}var _0x5dea92=util['format'](_0xa7a5('0x8c'),moment(_0x235e4e['createdAt'])[_0xa7a5('0x7b')](_0xa7a5('0x8d')),_0x235e4e['direction']==='in'?_0x5dce89:_0x3c5b6f,_0x235e4e['body']);if(!_0x235e4e['secret']){fs[_0xa7a5('0x8e')](_0x9e3132,_0x5dea92);}}return db[_0xa7a5('0x8f')][_0xa7a5('0x4a')]({'where':{'service':!![]},'include':[{'model':db[_0xa7a5('0x90')],'as':_0xa7a5('0x91'),'raw':!![],'include':[{'model':db[_0xa7a5('0x92')],'as':'CloudProvider','raw':!![]}]}]});}}})[_0xa7a5('0x17')](function(_0x36a42f){if(!_0x36a42f||!_0x36a42f[_0xa7a5('0x91')]||!_0x3cf384['body'])return _0x295780;var _0x5cddce=_0x36a42f[_0xa7a5('0x93')]();return respondWithRpcPromise(_0xa7a5('0x94'),_0xa7a5('0x95'),{'account':_0x5cddce,'message':{'from':util['format'](_0xa7a5('0x96'),_0x36a42f[_0xa7a5('0x2a')],_0x36a42f[_0xa7a5('0x51')]||_0x36a42f[_0xa7a5('0x91')][_0xa7a5('0x3a')]),'to':_0x3cf384[_0xa7a5('0x2d')][_0xa7a5('0x79')],'subject':_0xa7a5('0x97'),'text':util[_0xa7a5('0x7b')](_0xa7a5('0x98'),_0x3cf384[_0xa7a5('0x2d')][_0xa7a5('0x79')]),'attachments':[{'path':_0x9e3132}]}})[_0xa7a5('0x17')](function(){return _0x295780;})[_0xa7a5('0x1f')](function(_0x278092){logger['error'](_0x278092);});})[_0xa7a5('0x17')](respondWithStatusCode(_0x1e425d,0xc8))[_0xa7a5('0x1f')](handleError(_0x1e425d,null));};exports[_0xa7a5('0x99')]=function(_0x47f6ba,_0xcaea15){return db['ChatMessage']['find']({'where':{'id':_0x47f6ba[_0xa7a5('0x47')]['id']}})[_0xa7a5('0x17')](handleEntityNotFound(_0xcaea15,null))[_0xa7a5('0x17')](function(_0x188013){if(_0x188013){return _0x188013['addMessage'](_0x47f6ba[_0xa7a5('0x2d')][_0xa7a5('0x9a')],_['omit'](_0x47f6ba['body'],[_0xa7a5('0x9a'),'id'])||{});}})[_0xa7a5('0x17')](respondWithResult(_0xcaea15,null))[_0xa7a5('0x1f')](handleError(_0xcaea15,null));};exports[_0xa7a5('0x9b')]=function(_0x34420d,_0x383da3){var _0x59a382={'raw':![],'where':{}};var _0x3cf700={};var _0x293978={'count':0x0,'rows':[]};return db['ChatInteraction'][_0xa7a5('0x4a')]({'where':{'id':_0x34420d[_0xa7a5('0x47')]['id']}})[_0xa7a5('0x17')](handleEntityNotFound(_0x383da3,null))[_0xa7a5('0x17')](function(_0x2f9aea){if(_0x2f9aea){_0x3cf700['model']=_[_0xa7a5('0x3d')](db[_0xa7a5('0x5d')][_0xa7a5('0x33')]);_0x3cf700['query']=_[_0xa7a5('0x3d')](_0x34420d[_0xa7a5('0x39')]);_0x3cf700[_0xa7a5('0x9c')]=_['intersection'](_0x3cf700[_0xa7a5('0x3c')],_0x3cf700[_0xa7a5('0x39')]);_0x59a382['attributes']=_[_0xa7a5('0x3e')](_0x3cf700['model'],qs['fields'](_0x34420d[_0xa7a5('0x39')][_0xa7a5('0x3f')]));_0x59a382[_0xa7a5('0x40')]=_0x59a382[_0xa7a5('0x40')]['length']?_0x59a382[_0xa7a5('0x40')]:_0x3cf700['model'];if(!_0x34420d['query'][_0xa7a5('0x9d')](_0xa7a5('0x9e'))){_0x59a382['limit']=qs['limit'](_0x34420d[_0xa7a5('0x39')]['limit']);_0x59a382['offset']=qs['offset'](_0x34420d[_0xa7a5('0x39')][_0xa7a5('0x9f')]);}_0x59a382['order']=qs[_0xa7a5('0xa0')](_0x34420d[_0xa7a5('0x39')][_0xa7a5('0xa0')]);_0x59a382[_0xa7a5('0xa1')]=qs['filters'](_[_0xa7a5('0xa2')](_0x34420d[_0xa7a5('0x39')],_0x3cf700['filters']));_0x59a382[_0xa7a5('0xa1')]['ChatInteractionId']=_0x2f9aea['id'];if(_0x34420d[_0xa7a5('0x39')][_0xa7a5('0xa3')]){_0x59a382[_0xa7a5('0xa1')]=_[_0xa7a5('0x2c')](_0x59a382[_0xa7a5('0xa1')],{'$or':_[_0xa7a5('0x31')](_0x59a382[_0xa7a5('0x40')],function(_0x1df046){var _0x3bff99={};_0x3bff99[_0x1df046]={'$like':'%'+_0x34420d[_0xa7a5('0x39')][_0xa7a5('0xa3')]+'%'};return _0x3bff99;})});}if(_0x34420d[_0xa7a5('0x39')][_0xa7a5('0xa4')]){var _0xde7f8e=_0x34420d[_0xa7a5('0x39')][_0xa7a5('0xa4')]['split'](',');var _0x2864b2={};_0x2864b2[_0xde7f8e[0x0]]={'$gte':moment(_0xde7f8e[0x1])[_0xa7a5('0x7b')]('YYYY-MM-DD\x20HH:mm:ss')};_0x59a382[_0xa7a5('0xa1')]=_[_0xa7a5('0x2c')](_0x59a382[_0xa7a5('0xa1')],_0x2864b2);}_0x59a382=_[_0xa7a5('0x2c')]({},_0x59a382,_0x34420d['options']);return db['ChatMessage']['count']({'where':_0x59a382[_0xa7a5('0xa1')]})[_0xa7a5('0x17')](function(_0x5315a9){_0x293978['count']=_0x5315a9;if(_0x34420d[_0xa7a5('0x39')][_0xa7a5('0x41')]){_0x59a382['include']=[{'all':!![]}];}return db['ChatMessage']['findAll'](_0x59a382);})[_0xa7a5('0x17')](function(_0x3e593e){_0x293978[_0xa7a5('0xa5')]=_0x3e593e;return _0x293978;});}})['then'](respondWithFilteredResult(_0x383da3,_0x59a382))['catch'](handleError(_0x383da3,null));};exports['getMyMessages']=function(_0x42f2d8,_0x3f019f){var _0x4e34b0={'where':{}},_0x5ed6fe={},_0x4d6568={'count':0x0,'rows':[]};return db[_0xa7a5('0x32')][_0xa7a5('0x4a')]({'where':{'id':_0x42f2d8['params']['id']}})['then'](handleEntityNotFound(_0x3f019f,null))['then'](function(_0x20b3f7){if(_0x20b3f7){_0x5ed6fe[_0xa7a5('0x3c')]=_[_0xa7a5('0x3d')](db[_0xa7a5('0x5d')][_0xa7a5('0x33')]);_0x5ed6fe[_0xa7a5('0x39')]=_[_0xa7a5('0x3d')](_0x42f2d8['query']);_0x5ed6fe['filters']=_[_0xa7a5('0x3e')](_0x5ed6fe[_0xa7a5('0x3c')],_0x5ed6fe[_0xa7a5('0x39')]);_0x4e34b0[_0xa7a5('0x40')]=_[_0xa7a5('0x3e')](_0x5ed6fe[_0xa7a5('0x3c')],qs[_0xa7a5('0x3f')](_0x42f2d8[_0xa7a5('0x39')][_0xa7a5('0x3f')]));_0x4e34b0[_0xa7a5('0x40')]=_0x4e34b0[_0xa7a5('0x40')][_0xa7a5('0xa6')]?_0x4e34b0[_0xa7a5('0x40')]:_0x5ed6fe[_0xa7a5('0x3c')];if(!_0x42f2d8[_0xa7a5('0x39')]['hasOwnProperty']('nolimit')){_0x4e34b0[_0xa7a5('0x24')]=qs['limit'](_0x42f2d8[_0xa7a5('0x39')][_0xa7a5('0x24')]);_0x4e34b0['offset']=qs['offset'](_0x42f2d8['query'][_0xa7a5('0x9f')]);}_0x4e34b0['order']=qs['sort'](_0x42f2d8[_0xa7a5('0x39')][_0xa7a5('0xa0')]);_0x4e34b0[_0xa7a5('0xa1')]=qs['filters'](_[_0xa7a5('0xa2')](_0x42f2d8[_0xa7a5('0x39')],_0x5ed6fe[_0xa7a5('0x9c')]));_0x4e34b0[_0xa7a5('0xa1')][_0xa7a5('0xa7')]=_0x20b3f7['id'];if(_0x42f2d8['query'][_0xa7a5('0xa3')]){_0x4e34b0[_0xa7a5('0xa1')]=_['merge'](_0x4e34b0[_0xa7a5('0xa1')],{'$or':_[_0xa7a5('0x31')](_0x4e34b0[_0xa7a5('0x40')],function(_0x933fc1){var _0x31aed8={};_0x31aed8[_0x933fc1]={'$like':'%'+_0x42f2d8['query'][_0xa7a5('0xa3')]+'%'};return _0x31aed8;})});}_0x4e34b0[_0xa7a5('0xa1')][_0xa7a5('0xa8')]=![];if(_0x42f2d8[_0xa7a5('0x39')]['id']){_0x4e34b0[_0xa7a5('0xa1')]['id']={'$gt':_0x42f2d8[_0xa7a5('0x39')]['id']};}_0x4e34b0=_[_0xa7a5('0x2c')]({},_0x4e34b0,_0x42f2d8[_0xa7a5('0x43')]);return db['ChatMessage']['count']({'where':_0x4e34b0[_0xa7a5('0xa1')]})[_0xa7a5('0x17')](function(_0x3f63d1){_0x4d6568[_0xa7a5('0x23')]=_0x3f63d1;_0x4e34b0[_0xa7a5('0x42')]=[];if(_0x42f2d8[_0xa7a5('0x39')][_0xa7a5('0xa9')]){_0x4e34b0['include'][_0xa7a5('0xaa')]({'model':db[_0xa7a5('0x7f')],'as':_0xa7a5('0x7f'),'attributes':['id',_0xa7a5('0x50'),_0xa7a5('0x8a')]});}if(_0x42f2d8[_0xa7a5('0x39')]['includeAll']){_0x4e34b0[_0xa7a5('0x42')]=[{'all':!![]}];}return db[_0xa7a5('0x5d')]['findAll'](_0x4e34b0);})['then'](function(_0x401e1e){_0x4d6568[_0xa7a5('0xa5')]=_0x401e1e;return _0x4d6568;});}})['then'](respondWithFilteredResult(_0x3f019f,_0x4e34b0))['catch'](handleError(_0x3f019f,null));};exports['addTags']=function(_0x2aa817,_0x2e38bb){return db['ChatInteraction'][_0xa7a5('0x44')]({'where':{'id':_0x2aa817['params']['id']}})[_0xa7a5('0x17')](handleEntityNotFound(_0x2e38bb,null))[_0xa7a5('0x17')](function(_0x3dac15){if(_0x3dac15){return _0x3dac15['setTags'](_0x2aa817[_0xa7a5('0x2d')]['ids'],_[_0xa7a5('0xab')](_0x2aa817['body'],['ids','id'])||{})['spread'](function(){return db[_0xa7a5('0xac')][_0xa7a5('0x37')]({'attributes':['id',_0xa7a5('0x2a'),'color'],'where':{'id':_0x2aa817[_0xa7a5('0x2d')][_0xa7a5('0x9a')]}});})[_0xa7a5('0x17')](function(_0x4d542b){socket[_0xa7a5('0xad')]('chatInteractionTags:save',{'id':Number(_0x2aa817[_0xa7a5('0x47')]['id']),'tags':_0x4d542b||[]});return{'id':Number(_0x2aa817[_0xa7a5('0x47')]['id']),'tags':_0x4d542b||[]};});}})['then'](respondWithResult(_0x2e38bb,null))[_0xa7a5('0x1f')](handleError(_0x2e38bb,null));};exports[_0xa7a5('0xae')]=function(_0x10839c,_0x9d85e0){return db['ChatInteraction']['find']({'where':{'id':_0x10839c['params']['id']}})['then'](handleEntityNotFound(_0x9d85e0,null))[_0xa7a5('0x17')](function(_0x46deaf){if(_0x46deaf){return _0x46deaf[_0xa7a5('0xae')](_0x10839c[_0xa7a5('0x39')][_0xa7a5('0x9a')]);}})[_0xa7a5('0x17')](respondWithStatusCode(_0x9d85e0,null))[_0xa7a5('0x1f')](handleError(_0x9d85e0,null));};exports[_0xa7a5('0xaf')]=function(_0x201951,_0x3bead4){var _0x3aea89=moment()['unix']()[_0xa7a5('0xb0')]();var _0xe0fc1a=path['join'](config['root'],_0xa7a5('0xb1'),_0xa7a5('0xb2'),_0xa7a5('0xb3'));var _0x1f5a92=path['join'](config[_0xa7a5('0x76')],_0xa7a5('0xb1'),_0xa7a5('0xb2'),_0xa7a5('0xb4'));var _0x423774=path[_0xa7a5('0x75')](_0xe0fc1a,_0x3aea89);var _0x547435=util[_0xa7a5('0x7b')]('transcript-%d-%s.zip',_0x201951['params']['id'],_0x3aea89);var _0x12778f=path[_0xa7a5('0x75')](_0xe0fc1a,_0x547435);var _0x2e0e49=[];_0x2e0e49['push']({'model':db[_0xa7a5('0x7f')],'as':'User','attributes':['id',_0xa7a5('0x50')],'raw':!![]});_0x2e0e49[_0xa7a5('0xaa')]({'model':db[_0xa7a5('0x61')],'as':_0xa7a5('0x62'),'attributes':['id',_0xa7a5('0xb5'),_0xa7a5('0xb6')],'raw':!![]});if(_0x201951['query'][_0xa7a5('0xb4')]){_0x2e0e49[_0xa7a5('0xaa')]({'model':db['Attachment'],'as':_0xa7a5('0x70'),'raw':!![]});}var _0x316601=[{'model':db['ChatMessage'],'as':_0xa7a5('0x7e'),'attributes':['id',_0xa7a5('0x2d'),'createdAt',_0xa7a5('0xb7'),'secret','read'],'include':_0x2e0e49}];_0x316601[_0xa7a5('0xaa')]({'model':db[_0xa7a5('0x4b')],'as':'Account','attributes':['id',_0xa7a5('0x2a')]});_0x316601[_0xa7a5('0xaa')]({'model':db[_0xa7a5('0x7f')],'as':_0xa7a5('0xb8'),'attributes':['id',_0xa7a5('0x50')]});return db[_0xa7a5('0x32')][_0xa7a5('0x44')]({'where':{'id':_0x201951[_0xa7a5('0x47')]['id']},'include':_0x316601})[_0xa7a5('0x17')](handleEntityNotFound(_0x3bead4,null))[_0xa7a5('0x17')](function(_0x3733b7){if(_0x3733b7){var _0x1682fa=_0x3733b7['get']({'plain':!![]});fs[_0xa7a5('0xb9')](_0x423774);var _0x510214={'channel':_0xa7a5('0xba'),'account':_0x1682fa['Account']['name'],'agent':_0x1682fa['Owner']?_0x1682fa[_0xa7a5('0xb8')]['fullname']:_0xa7a5('0xbb'),'createdAt':moment(_0x1682fa[_0xa7a5('0xbc')])[_0xa7a5('0x7b')](_0xa7a5('0xbd'))['toString'](),'closedAt':_0x1682fa[_0xa7a5('0x68')]?moment(_0x1682fa[_0xa7a5('0xbe')])['format'](_0xa7a5('0xbd'))[_0xa7a5('0xb0')]():'','disposition':_0x1682fa[_0xa7a5('0x69')],'chatInfo':{'browser':_0x1682fa[_0xa7a5('0xbf')],'os':_0x1682fa['osName'],'referer':_0x1682fa[_0xa7a5('0xc0')],'customerIp':_0x1682fa['customerIp'],'customerPort':_0x1682fa[_0xa7a5('0xc1')]?_0x1682fa[_0xa7a5('0xc1')]:_0xa7a5('0xbb')},'messages':_(_0x1682fa[_0xa7a5('0x7e')])['tail']()['filter']({'secret':![]})[_0xa7a5('0x31')](function(_0x3aec5b){if(_0x3aec5b['Attachment']){var _0x24033e=path[_0xa7a5('0x75')](_0x1f5a92,_0x3aec5b[_0xa7a5('0x70')][_0xa7a5('0x6d')]);if(fs[_0xa7a5('0xc2')](_0x24033e)){fs[_0xa7a5('0xc3')](_0x24033e)[_0xa7a5('0xc4')](fs[_0xa7a5('0xc5')](path[_0xa7a5('0x75')](_0x423774,_0x3aec5b[_0xa7a5('0x70')][_0xa7a5('0x6d')])));}}return{'date':moment(_0x3aec5b['createdAt'])[_0xa7a5('0x7b')]('YYYY-MM-DD\x20HH:mm:ss')['toString'](),'sender':_0x3aec5b[_0xa7a5('0xb7')]===_0xa7a5('0x5c')?_0x3aec5b[_0xa7a5('0x7f')]?_0x3aec5b[_0xa7a5('0x7f')]['fullname']:_0xa7a5('0x88'):_0x3aec5b[_0xa7a5('0x62')]['firstName']+(_0x3aec5b[_0xa7a5('0x62')]['lastName']?'\x20'+_0x3aec5b[_0xa7a5('0x62')][_0xa7a5('0xb6')]:''),'body':_0x3aec5b[_0xa7a5('0x70')]?_0x3aec5b[_0xa7a5('0x70')][_0xa7a5('0x6d')]:_0x3aec5b[_0xa7a5('0x2d')],'direction':_0x3aec5b[_0xa7a5('0xb7')]==='out'?'A':'C','secret':_0x3aec5b[_0xa7a5('0xa8')],'read':_0x3aec5b['read'],'attachment':_0x3aec5b['Attachment']};})[_0xa7a5('0xc6')]()};return ejs[_0xa7a5('0xc7')](path[_0xa7a5('0x75')](config[_0xa7a5('0x76')],'server',_0xa7a5('0xc8'),_0xa7a5('0xc9')),{'interaction':_0x510214})[_0xa7a5('0x17')](function(_0x160c1d){var _0xb1f5ee=path[_0xa7a5('0x75')](_0x423774,_0xa7a5('0xca')+_0x1682fa['id']+'-'+_0x3aea89+_0xa7a5('0xcb'));var _0x54f2c2={'path':_0xb1f5ee,'channel':_0xa7a5('0xba'),'interactionId':_0x1682fa['id']};return pdf[_0xa7a5('0xcc')](_0x160c1d,_0x54f2c2);})[_0xa7a5('0x17')](function(){return new Promise(function(_0x130a9d,_0x8e37db){zipdir(_0x423774,{'saveTo':_0x12778f},function(_0xe028d2,_0x567e82){if(_0xe028d2)return _0x8e37db(_0xe028d2);return _0x130a9d(_0x567e82);});})['then'](function(){return new BPromise(function(_0x624bd6,_0x2b80d3){rimraf(_0x423774,function(_0x928c5){if(_0x928c5)_0x2b80d3(_0x928c5);return _0x624bd6();});});})[_0xa7a5('0x17')](function(){return _0x3bead4[_0xa7a5('0xaf')](_0x12778f,_0x547435,function(_0x31bc69){if(_0x31bc69){logger[_0xa7a5('0x1a')](_0xa7a5('0xcd'),_0x31bc69);}else{fs[_0xa7a5('0xce')](_0x12778f);}});});});}else{return _0x3bead4[_0xa7a5('0x20')](0xc8);}})[_0xa7a5('0x1f')](handleError(_0x3bead4,null));}; \ No newline at end of file +var _0xab49=['localhost','./chatInteraction.socket','register','jayson/promise','client','http','request','then','info','ChatInteraction,\x20%s,\x20%s','ChatInteraction,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','message','result','catch','sendStatus','status','end','offset','undefined','limit','count','json','destroy','name','render','merge','body','contact','agent','interaction','account','map','ChatInteraction','rawAttributes','fieldName','type','getOptions','findAll','chat','query','user','show','params','model','keys','fields','attributes','length','includeAll','include','options','find','create','update','describe','createVidaooSession','findOne','ChatWebsite','vidaooEscalation','vidaooTopic','vidaooNote','vidaooMetadata','vidaooApiKey','fullname','email','POST','https://api-vidaoo.xcally.com/api/v1/meetings','isNull','follow','parse','metadata','Sequelize','ValidationError','Error\x20in\x20conversion\x20vidaooMetadata','join_url','out','ChatMessage','Unable\x20to\x20create\x20Vidaoo\x20session','updateAttributes','customUpdate','CmContact','entity\x20not\x20found','UserId','Interaction\x20already\x20assigned','closed','AbandonInteraction','abandon','attachmentUpload','file','originalname','basename','mimetype','Attachment','ChatOfflineMessageId','join','root','offline-chat/','mailTranscript','server/files/chat/upload/','pathTranscript','Messages','User','ChatWebsiteId','ContactId','format','%s%d','agentAlias','customer','Visitor','agentIdentifier','website_alias','System','agent_fullname','[%s]\x20%s:\x20%s\x0a','createdAt','MM/DD/YYYY\x20HH:mm:ss','secret','MailServerOut','CloudProvider','Smtp','getSmtpOptions','SendMail','sendMail','\x22%s\x22\x20<%s>','Mail\x20Transcript','Hi\x20%s,\x20attached\x20you\x20can\x20find\x20your\x20transcript\x20file.\x20\x0a\x0aRegards.\x20\x0a\x0a','addMessage','ids','omit','getMessages','filters','intersection','hasOwnProperty','nolimit','order','sort','where','pick','filter','$gte','split','YYYY-MM-DD\x20HH:mm:ss','rows','getMyMessages','ChatInteractionId','includeAgent','push','alias','addTags','setTags','spread','Tag','color','emit','chatInteractionTags:save','removeTags','toString','server','files','tmp','attachments','transcript-%d-%s.zip','Contact','lastName','direction','Owner','get','mkdirSync','Chat','N.A.','closedAt','browserName','osName','referer','customerIp','customerPort','tail','existsSync','createReadStream','pipe','createWriteStream','read','value','renderFile','downloadInteraction.ejs','transcript-','.pdf','createPdfFromHTML','download','unlinkSync','rimraf','zip-dir','request-promise','util','ejs','lodash','ioredis','../../config/logger','../../config/environment','redis','defaults'];(function(_0x3c7e07,_0x569001){var _0x482454=function(_0x377487){while(--_0x377487){_0x3c7e07['push'](_0x3c7e07['shift']());}};_0x482454(++_0x569001);}(_0xab49,0x18d));var _0x9ab4=function(_0x286726,_0x20a337){_0x286726=_0x286726-0x0;var _0xcd4fe9=_0xab49[_0x286726];return _0xcd4fe9;};'use strict';var rimraf=require(_0x9ab4('0x0'));var zipdir=require(_0x9ab4('0x1'));var rp=require(_0x9ab4('0x2'));var moment=require('moment');var BPromise=require('bluebird');var Mustache=require('mustache');var util=require(_0x9ab4('0x3'));var path=require('path');var ejs=require(_0x9ab4('0x4'));var fs=require('fs');var _=require(_0x9ab4('0x5'));var Redis=require(_0x9ab4('0x6'));var interaction=require('../../components/interaction/service');var qs=require('../../components/parsers/qs');var pdf=require('../../components/export/pdf');var logger=require(_0x9ab4('0x7'))('api');var config=require(_0x9ab4('0x8'));var db=require('../../mysqldb')['db'];config[_0x9ab4('0x9')]=_[_0x9ab4('0xa')](config[_0x9ab4('0x9')],{'host':_0x9ab4('0xb'),'port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config[_0x9ab4('0x9')]));require(_0x9ab4('0xc'))[_0x9ab4('0xd')](socket);var jayson=require(_0x9ab4('0xe'));var client=jayson[_0x9ab4('0xf')][_0x9ab4('0x10')]({'port':0x232b});var client9004=jayson[_0x9ab4('0xf')][_0x9ab4('0x10')]({'port':0x232c});function respondWithRpcPromise(_0x269db7,_0x3174ae,_0x3c243a,_0x16debc){return new BPromise(function(_0x2b6e33,_0x51995b){var _0x31b6c6=_0x16debc||client;return _0x31b6c6[_0x9ab4('0x11')](_0x269db7,_0x3c243a)[_0x9ab4('0x12')](function(_0x2013ee){logger[_0x9ab4('0x13')](_0x9ab4('0x14'),_0x3174ae,'request\x20sent');logger['debug'](_0x9ab4('0x15'),_0x3174ae,_0x9ab4('0x16'),JSON[_0x9ab4('0x17')](_0x2013ee));if(_0x2013ee[_0x9ab4('0x18')]){if(_0x2013ee['error']['code']===0x1f4){logger['error'](_0x9ab4('0x14'),_0x3174ae,_0x2013ee[_0x9ab4('0x18')]['message']);return _0x51995b(_0x2013ee[_0x9ab4('0x18')]['message']);}logger[_0x9ab4('0x18')](_0x9ab4('0x14'),_0x3174ae,_0x2013ee[_0x9ab4('0x18')][_0x9ab4('0x19')]);return _0x2b6e33(_0x2013ee['error']['message']);}else{logger['info'](_0x9ab4('0x14'),_0x3174ae,_0x9ab4('0x16'));_0x2b6e33(_0x2013ee[_0x9ab4('0x1a')]['message']);}})[_0x9ab4('0x1b')](function(_0x493f19){logger['error']('ChatInteraction,\x20%s,\x20%s',_0x3174ae,_0x493f19);_0x51995b(_0x493f19);});});}function respondWithStatusCode(_0x642f2c,_0x23451b){_0x23451b=_0x23451b||0xcc;return function(_0x260fc3){if(_0x260fc3){return _0x642f2c[_0x9ab4('0x1c')](_0x23451b);}return _0x642f2c[_0x9ab4('0x1d')](_0x23451b)[_0x9ab4('0x1e')]();};}function respondWithResult(_0x4abbaa,_0x5e98d0){_0x5e98d0=_0x5e98d0||0xc8;return function(_0x16cba3){if(_0x16cba3){return _0x4abbaa[_0x9ab4('0x1d')](_0x5e98d0)['json'](_0x16cba3);}};}function respondWithFilteredResult(_0x192726,_0x240611){return function(_0x4c2f37){if(_0x4c2f37){var _0x5c6383=typeof _0x240611[_0x9ab4('0x1f')]===_0x9ab4('0x20')&&typeof _0x240611[_0x9ab4('0x21')]==='undefined';var _0x1cf76d=_0x4c2f37[_0x9ab4('0x22')];var _0x702194=_0x5c6383?0x0:_0x240611[_0x9ab4('0x1f')];var _0x2acd9a=_0x5c6383?_0x4c2f37[_0x9ab4('0x22')]:_0x240611[_0x9ab4('0x1f')]+_0x240611[_0x9ab4('0x21')];var _0x37ecc8;if(_0x2acd9a>=_0x1cf76d){_0x2acd9a=_0x1cf76d;_0x37ecc8=0xc8;}else{_0x37ecc8=0xce;}_0x192726[_0x9ab4('0x1d')](_0x37ecc8);return _0x192726['set']('Content-Range',_0x702194+'-'+_0x2acd9a+'/'+_0x1cf76d)[_0x9ab4('0x23')](_0x4c2f37);}return null;};}function saveUpdates(_0x5421a1){return function(_0x2f19f8){if(_0x2f19f8){return _0x2f19f8['update'](_0x5421a1)[_0x9ab4('0x12')](function(_0x3a7032){return _0x3a7032;});}return null;};}function removeEntity(_0x1b25e9){return function(_0x57729a){if(_0x57729a){return _0x57729a[_0x9ab4('0x24')]()[_0x9ab4('0x12')](function(){_0x1b25e9[_0x9ab4('0x1d')](0xcc)['end']();});}};}function handleEntityNotFound(_0x321da3){return function(_0x39f0e5){if(!_0x39f0e5){_0x321da3[_0x9ab4('0x1c')](0x194);}return _0x39f0e5;};}function handleError(_0x184c57,_0x48707e){_0x48707e=_0x48707e||0x1f4;return function(_0x26efd5){logger[_0x9ab4('0x18')](_0x26efd5['stack']);if(_0x26efd5[_0x9ab4('0x25')]){delete _0x26efd5[_0x9ab4('0x25')];}_0x184c57[_0x9ab4('0x1d')](_0x48707e)['send'](_0x26efd5);};}function getMustacheRender(_0x41b942,_0x1c510a){return Mustache[_0x9ab4('0x26')](_0x41b942,_[_0x9ab4('0x27')](_0x1c510a[_0x9ab4('0x28')],{'contact':_0x1c510a[_0x9ab4('0x29')],'message':_0x1c510a[_0x9ab4('0x19')],'agent':_0x1c510a[_0x9ab4('0x2a')],'interaction':_0x1c510a[_0x9ab4('0x2b')],'account':_0x1c510a[_0x9ab4('0x2c')]}))||'';}exports['index']=function(_0x18b426,_0x33015f){var _0x36cb2b={};var _0x1732bf=_[_0x9ab4('0x2d')](db[_0x9ab4('0x2e')][_0x9ab4('0x2f')],function(_0x4bbacb){return{'name':_0x4bbacb[_0x9ab4('0x30')],'type':_0x4bbacb[_0x9ab4('0x31')]['key']};});_0x36cb2b=qs[_0x9ab4('0x32')](_0x1732bf,_0x18b426);return interaction[_0x9ab4('0x33')](_0x9ab4('0x34'),_0x18b426[_0x9ab4('0x35')],_0x18b426[_0x9ab4('0x36')],_0x36cb2b,_0x1732bf)['then'](respondWithFilteredResult(_0x33015f,_0x36cb2b))[_0x9ab4('0x1b')](handleError(_0x33015f,null));};exports[_0x9ab4('0x37')]=function(_0x5d7dd0,_0x1ea574){var _0x3ac596={'raw':![],'where':{'id':_0x5d7dd0[_0x9ab4('0x38')]['id']}},_0x5e97b2={};_0x5e97b2[_0x9ab4('0x39')]=_[_0x9ab4('0x3a')](db[_0x9ab4('0x2e')][_0x9ab4('0x2f')]);_0x5e97b2[_0x9ab4('0x35')]=_['keys'](_0x5d7dd0['query']);_0x5e97b2['filters']=_['intersection'](_0x5e97b2[_0x9ab4('0x39')],_0x5e97b2[_0x9ab4('0x35')]);_0x3ac596['attributes']=_['intersection'](_0x5e97b2[_0x9ab4('0x39')],qs[_0x9ab4('0x3b')](_0x5d7dd0[_0x9ab4('0x35')][_0x9ab4('0x3b')]));_0x3ac596[_0x9ab4('0x3c')]=_0x3ac596[_0x9ab4('0x3c')][_0x9ab4('0x3d')]?_0x3ac596[_0x9ab4('0x3c')]:_0x5e97b2[_0x9ab4('0x39')];if(_0x5d7dd0[_0x9ab4('0x35')][_0x9ab4('0x3e')]){_0x3ac596[_0x9ab4('0x3f')]=[{'all':!![]}];}_0x3ac596=_[_0x9ab4('0x27')]({},_0x3ac596,_0x5d7dd0[_0x9ab4('0x40')]);return db[_0x9ab4('0x2e')][_0x9ab4('0x41')](_0x3ac596)[_0x9ab4('0x12')](handleEntityNotFound(_0x1ea574,null))['then'](respondWithResult(_0x1ea574,null))[_0x9ab4('0x1b')](handleError(_0x1ea574,null));};exports[_0x9ab4('0x42')]=function(_0x18b921,_0x1129df){return db[_0x9ab4('0x2e')][_0x9ab4('0x42')](_0x18b921[_0x9ab4('0x28')],{})[_0x9ab4('0x12')](respondWithResult(_0x1129df,0xc9))['catch'](handleError(_0x1129df,null));};exports[_0x9ab4('0x43')]=function(_0x31b675,_0x24b58b){if(_0x31b675[_0x9ab4('0x28')]['id']){delete _0x31b675[_0x9ab4('0x28')]['id'];}return db[_0x9ab4('0x2e')][_0x9ab4('0x41')]({'where':{'id':_0x31b675[_0x9ab4('0x38')]['id']}})[_0x9ab4('0x12')](handleEntityNotFound(_0x24b58b,null))[_0x9ab4('0x12')](saveUpdates(_0x31b675[_0x9ab4('0x28')],null))['then'](respondWithResult(_0x24b58b,null))[_0x9ab4('0x1b')](handleError(_0x24b58b,null));};exports[_0x9ab4('0x24')]=function(_0x4ede93,_0x155a8d){return db[_0x9ab4('0x2e')][_0x9ab4('0x41')]({'where':{'id':_0x4ede93['params']['id']}})[_0x9ab4('0x12')](handleEntityNotFound(_0x155a8d,null))[_0x9ab4('0x12')](removeEntity(_0x155a8d,null))[_0x9ab4('0x1b')](handleError(_0x155a8d,null));};exports[_0x9ab4('0x44')]=function(_0x20ca90,_0x3cab14){return db[_0x9ab4('0x2e')][_0x9ab4('0x44')]()[_0x9ab4('0x12')](respondWithResult(_0x3cab14,null))[_0x9ab4('0x1b')](handleError(_0x3cab14,null));};exports[_0x9ab4('0x45')]=function(_0x20b57b,_0x2af2eb){var _0xa8ebd1=_0x20b57b[_0x9ab4('0x38')]['id'];var _0x34c380;var _0xd0d69;var _0x1f15fb;return db[_0x9ab4('0x2e')][_0x9ab4('0x46')]({'where':{'id':_0xa8ebd1}})['then'](function(_0xebe391){_0x34c380=_0xebe391;return db[_0x9ab4('0x47')]['findOne']({'where':{'id':_0xebe391['ChatWebsiteId']},'attributes':['id','vidaooApiKey',_0x9ab4('0x48'),_0x9ab4('0x49'),_0x9ab4('0x4a'),_0x9ab4('0x4b')],'raw':!![]});})['then'](function(_0x33553b){if(_0x33553b&&_0x33553b[_0x9ab4('0x4c')]&&_0x33553b[_0x9ab4('0x48')]){_0xd0d69=_0x33553b;var _0x510203={'interaction':{'id':_0xa8ebd1},'agent':{'id':_0x20b57b[_0x9ab4('0x36')]['id'],'name':_0x20b57b[_0x9ab4('0x36')]['name'],'fullname':_0x20b57b[_0x9ab4('0x36')][_0x9ab4('0x4d')],'email':_0x20b57b[_0x9ab4('0x36')][_0x9ab4('0x4e')]},'contact':_0x20b57b['body']['contact'],'account':_0x20b57b[_0x9ab4('0x28')][_0x9ab4('0x2c')]};var _0x554328={'rejectUnauthorized':![],'method':_0x9ab4('0x4f'),'url':_0x9ab4('0x50'),'headers':{'X-APIKEY':_0x33553b[_0x9ab4('0x4c')]},'body':{'duration':null,'scheduledAt':null,'participants':[_0x20b57b[_0x9ab4('0x36')]['email']],'buttons':null,'topic':_0xd0d69[_0x9ab4('0x49')],'note':_[_0x9ab4('0x51')](_0xd0d69[_0x9ab4('0x4a')])?null:getMustacheRender(_0xd0d69['vidaooNote'],_0x510203),'metadata':null},'redirect':_0x9ab4('0x52'),'json':!![]};try{if(!_[_0x9ab4('0x51')](_0xd0d69[_0x9ab4('0x4b')])){var _0x5aa698=getMustacheRender(_0xd0d69[_0x9ab4('0x4b')],_0x510203);var _0x1ed375=JSON[_0x9ab4('0x53')](_0x5aa698);_0x554328['body'][_0x9ab4('0x54')]=_0x1ed375;}}catch(_0x367081){throw new db[(_0x9ab4('0x55'))][(_0x9ab4('0x56'))](_0x9ab4('0x57'));}return rp(_0x554328);}else{throw new db['Sequelize'][(_0x9ab4('0x56'))]('Error\x20in\x20Vidaoo\x20configuration');}})[_0x9ab4('0x12')](function(_0x51d3ed){_0x1f15fb=_0x51d3ed;if(_0x1f15fb['id']){var _0x5e29e8={'body':_0x1f15fb[_0x9ab4('0x58')],'ChatWebsiteId':_0xd0d69['id'],'ChatInteractionId':_0x34c380['id'],'direction':_0x9ab4('0x59'),'UserId':_0x20b57b[_0x9ab4('0x36')]['id']};return db[_0x9ab4('0x5a')][_0x9ab4('0x42')](_0x5e29e8,{});}else{throw new db[(_0x9ab4('0x55'))]['ValidationError'](_0x9ab4('0x5b'));}})[_0x9ab4('0x12')](function(){return _0x34c380[_0x9ab4('0x5c')]({'vidaooSessionId':_0x1f15fb['id']});})[_0x9ab4('0x12')](respondWithResult(_0x2af2eb,null))[_0x9ab4('0x1b')](handleError(_0x2af2eb,null));};exports[_0x9ab4('0x5d')]=function(_0x2419a0,_0xd85e16){if(_0x2419a0[_0x9ab4('0x28')]['id']){delete _0x2419a0['body']['id'];}return db[_0x9ab4('0x2e')]['find']({'where':{'id':_0x2419a0[_0x9ab4('0x38')]['id']},'include':[{'model':db[_0x9ab4('0x5e')],'as':'Contact'}]})['then'](handleEntityNotFound(_0xd85e16,null))[_0x9ab4('0x12')](saveUpdates(_0x2419a0[_0x9ab4('0x28')],null))['then'](respondWithResult(_0xd85e16,null))[_0x9ab4('0x1b')](handleError(_0xd85e16,null));};exports['abandon']=function(_0x412b7f,_0x429af6){if(_0x412b7f[_0x9ab4('0x28')]['id']){delete _0x412b7f[_0x9ab4('0x28')]['id'];}return db[_0x9ab4('0x2e')][_0x9ab4('0x41')]({'where':{'id':_0x412b7f[_0x9ab4('0x38')]['id']}})['then'](function(_0x3af829){if(!_0x3af829){logger[_0x9ab4('0x18')]('abandonInteraction,\x20%s,\x20%s,\x20%s','abandon',0x194,_0x9ab4('0x5f'));_0x429af6['sendStatus'](0x194);}else{if(_0x3af829[_0x9ab4('0x60')]){throw new db['Sequelize'][(_0x9ab4('0x56'))](_0x9ab4('0x61'));}}return _0x3af829;})['then'](function(_0x502aba){if(_0x502aba){return _0x502aba[_0x9ab4('0x43')]({'closed':_0x412b7f['body'][_0x9ab4('0x62')],'disposition':_0x412b7f[_0x9ab4('0x28')]['disposition']})[_0x9ab4('0x12')](function(_0x3f2db3){return _0x3f2db3;});}})['then'](function(){return respondWithRpcPromise(_0x9ab4('0x63'),_0x9ab4('0x64'),_0x412b7f[_0x9ab4('0x28')],client9004);})[_0x9ab4('0x12')](respondWithResult(_0x429af6,null))[_0x9ab4('0x1b')](handleError(_0x429af6,null));};exports[_0x9ab4('0x65')]=function(_0x33de55,_0x39cb40){_0x33de55[_0x9ab4('0x28')][_0x9ab4('0x25')]=_0x33de55[_0x9ab4('0x66')][_0x9ab4('0x67')];_0x33de55[_0x9ab4('0x28')][_0x9ab4('0x68')]=_0x33de55['file']['filename'];_0x33de55[_0x9ab4('0x28')][_0x9ab4('0x31')]=_0x33de55[_0x9ab4('0x66')][_0x9ab4('0x69')];return db[_0x9ab4('0x6a')][_0x9ab4('0x42')](_0x33de55[_0x9ab4('0x28')])['then'](respondWithResult(_0x39cb40,0xc9))[_0x9ab4('0x1b')](handleError(_0x39cb40,null));};exports['attachmentDownload']=function(_0x3a012b,_0x22293d){return db[_0x9ab4('0x2e')][_0x9ab4('0x46')]({'where':{'id':_0x3a012b[_0x9ab4('0x38')]['id']},'raw':!![]})[_0x9ab4('0x12')](handleEntityNotFound(_0x22293d,null))['then'](function(_0x504e4f){if(_0x504e4f){if(_0x504e4f[_0x9ab4('0x62')]){return _0x22293d[_0x9ab4('0x1d')](0x193)[_0x9ab4('0x23')]({'status':0x193,'message':'Unauthorized'});}return db[_0x9ab4('0x6a')][_0x9ab4('0x46')]({'where':{'id':_0x3a012b[_0x9ab4('0x35')]['attachId']},'raw':!![]})[_0x9ab4('0x12')](handleEntityNotFound(_0x22293d,null));}})[_0x9ab4('0x12')](function(_0x3a18f9){if(_0x3a18f9){var _0x406b5f=_0x3a18f9[_0x9ab4('0x6b')]!==null;var _0x5b91c1=path[_0x9ab4('0x6c')](config[_0x9ab4('0x6d')],'server/files/attachments/');if(_0x406b5f){_0x5b91c1=path[_0x9ab4('0x6c')](_0x5b91c1,_0x9ab4('0x6e'));}var _0x169e4a=path[_0x9ab4('0x6c')](_0x5b91c1,_0x3a18f9[_0x9ab4('0x68')]);return _0x22293d['download'](_0x169e4a);}})[_0x9ab4('0x1b')](handleError(_0x22293d,null));};exports['close']=function(_0x5c01e7,_0x1b2f70){var _0x386ba8=null;var _0x479943=null;var _0x3d03ab=null;if(_0x5c01e7[_0x9ab4('0x28')]['id']){delete _0x5c01e7[_0x9ab4('0x28')]['id'];}if(_0x5c01e7[_0x9ab4('0x28')][_0x9ab4('0x6f')]){_0x3d03ab=path[_0x9ab4('0x6c')](config[_0x9ab4('0x6d')],_0x9ab4('0x70'),util['format']('transcript-%s.txt',Date['now']()));_0x5c01e7[_0x9ab4('0x28')][_0x9ab4('0x71')]=_0x3d03ab;}return db[_0x9ab4('0x2e')]['find']({'where':{'id':_0x5c01e7['params']['id']},'include':[{'model':db[_0x9ab4('0x5a')],'as':_0x9ab4('0x72'),'include':[{'model':db['User'],'as':_0x9ab4('0x73')}]}]})[_0x9ab4('0x12')](handleEntityNotFound(_0x1b2f70,null))[_0x9ab4('0x12')](saveUpdates(_0x5c01e7['body'],null))[_0x9ab4('0x12')](function(_0x3ada2d){if(_0x3ada2d){_0x386ba8=_0x3ada2d;return db['ChatWebsite'][_0x9ab4('0x41')]({'where':{'id':_0x386ba8[_0x9ab4('0x74')]}});}})[_0x9ab4('0x12')](function(_0xb0d5e6){if(_0xb0d5e6){_0x479943=_0xb0d5e6;return db[_0x9ab4('0x5e')][_0x9ab4('0x41')]({'where':{'id':_0x386ba8[_0x9ab4('0x75')]}});}})[_0x9ab4('0x12')](function(_0x1fadb9){if(_0x1fadb9){if(_0x3d03ab){var _0x5bd5b9=null;for(var _0x270c95=0x1;_0x270c95<_0x386ba8[_0x9ab4('0x72')]['length'];++_0x270c95){_0x5bd5b9=_0x386ba8[_0x9ab4('0x72')][_0x270c95];var _0x836ffe=_0x5bd5b9['UserId']?util[_0x9ab4('0x76')](_0x9ab4('0x77'),_0x479943[_0x9ab4('0x78')],_0x5bd5b9[_0x9ab4('0x60')]):'System';var _0x3170f3=_0x5c01e7[_0x9ab4('0x28')][_0x9ab4('0x79')]||util[_0x9ab4('0x76')]('%s%d',_0x9ab4('0x7a'),_0x5bd5b9['ContactId']);switch(_0x479943[_0x9ab4('0x7b')]){case _0x9ab4('0x7c'):_0x836ffe=_0x5bd5b9[_0x9ab4('0x60')]?util[_0x9ab4('0x76')](_0x9ab4('0x77'),_0x479943[_0x9ab4('0x78')],_0x5bd5b9[_0x9ab4('0x60')]):_0x9ab4('0x7d');break;case'agent_alias':_0x836ffe=_0x5bd5b9[_0x9ab4('0x60')]?_0x5bd5b9['User']['alias']||_0x5bd5b9[_0x9ab4('0x73')]['fullname']:_0x9ab4('0x7d');break;case _0x9ab4('0x7e'):_0x836ffe=_0x5bd5b9['UserId']?_0x5bd5b9[_0x9ab4('0x73')][_0x9ab4('0x4d')]:_0x9ab4('0x7d');break;default:_0x836ffe=_0x5bd5b9['UserId']?util[_0x9ab4('0x76')](_0x9ab4('0x77'),_0x479943[_0x9ab4('0x78')],_0x5bd5b9[_0x9ab4('0x60')]):_0x9ab4('0x7d');}var _0x52be47=util[_0x9ab4('0x76')](_0x9ab4('0x7f'),moment(_0x5bd5b9[_0x9ab4('0x80')])['format'](_0x9ab4('0x81')),_0x5bd5b9['direction']==='in'?_0x3170f3:_0x836ffe,_0x5bd5b9[_0x9ab4('0x28')]);if(!_0x5bd5b9[_0x9ab4('0x82')]){fs['appendFileSync'](_0x3d03ab,_0x52be47);}}return db['MailAccount'][_0x9ab4('0x46')]({'where':{'service':!![]},'include':[{'model':db[_0x9ab4('0x83')],'as':'Smtp','raw':!![],'include':[{'model':db[_0x9ab4('0x84')],'as':_0x9ab4('0x84'),'raw':!![]}]}]});}}})[_0x9ab4('0x12')](function(_0x19c155){if(!_0x19c155||!_0x19c155[_0x9ab4('0x85')]||!_0x5c01e7[_0x9ab4('0x28')])return _0x386ba8;var _0x20f534=_0x19c155[_0x9ab4('0x86')]();return respondWithRpcPromise(_0x9ab4('0x87'),_0x9ab4('0x88'),{'account':_0x20f534,'message':{'from':util[_0x9ab4('0x76')](_0x9ab4('0x89'),_0x19c155['name'],_0x19c155[_0x9ab4('0x4e')]||_0x19c155[_0x9ab4('0x85')][_0x9ab4('0x36')]),'to':_0x5c01e7['body'][_0x9ab4('0x6f')],'subject':_0x9ab4('0x8a'),'text':util[_0x9ab4('0x76')](_0x9ab4('0x8b'),_0x5c01e7[_0x9ab4('0x28')]['mailTranscript']),'attachments':[{'path':_0x3d03ab}]}})[_0x9ab4('0x12')](function(){return _0x386ba8;})[_0x9ab4('0x1b')](function(_0x3ce36a){logger[_0x9ab4('0x18')](_0x3ce36a);});})[_0x9ab4('0x12')](respondWithStatusCode(_0x1b2f70,0xc8))[_0x9ab4('0x1b')](handleError(_0x1b2f70,null));};exports[_0x9ab4('0x8c')]=function(_0x1617e9,_0x2444e7){return db[_0x9ab4('0x5a')][_0x9ab4('0x41')]({'where':{'id':_0x1617e9[_0x9ab4('0x38')]['id']}})[_0x9ab4('0x12')](handleEntityNotFound(_0x2444e7,null))['then'](function(_0x386eb8){if(_0x386eb8){return _0x386eb8[_0x9ab4('0x8c')](_0x1617e9[_0x9ab4('0x28')][_0x9ab4('0x8d')],_[_0x9ab4('0x8e')](_0x1617e9[_0x9ab4('0x28')],[_0x9ab4('0x8d'),'id'])||{});}})[_0x9ab4('0x12')](respondWithResult(_0x2444e7,null))[_0x9ab4('0x1b')](handleError(_0x2444e7,null));};exports[_0x9ab4('0x8f')]=function(_0x4ec4ae,_0x5a5053){var _0x56bee4={'raw':![],'where':{}};var _0x29648e={};var _0x30b922={'count':0x0,'rows':[]};return db[_0x9ab4('0x2e')]['findOne']({'where':{'id':_0x4ec4ae[_0x9ab4('0x38')]['id']}})[_0x9ab4('0x12')](handleEntityNotFound(_0x5a5053,null))[_0x9ab4('0x12')](function(_0x3b5597){if(_0x3b5597){_0x29648e['model']=_['keys'](db[_0x9ab4('0x5a')]['rawAttributes']);_0x29648e['query']=_[_0x9ab4('0x3a')](_0x4ec4ae[_0x9ab4('0x35')]);_0x29648e[_0x9ab4('0x90')]=_['intersection'](_0x29648e[_0x9ab4('0x39')],_0x29648e[_0x9ab4('0x35')]);_0x56bee4['attributes']=_[_0x9ab4('0x91')](_0x29648e[_0x9ab4('0x39')],qs['fields'](_0x4ec4ae[_0x9ab4('0x35')][_0x9ab4('0x3b')]));_0x56bee4['attributes']=_0x56bee4[_0x9ab4('0x3c')][_0x9ab4('0x3d')]?_0x56bee4[_0x9ab4('0x3c')]:_0x29648e[_0x9ab4('0x39')];if(!_0x4ec4ae['query'][_0x9ab4('0x92')](_0x9ab4('0x93'))){_0x56bee4[_0x9ab4('0x21')]=qs[_0x9ab4('0x21')](_0x4ec4ae[_0x9ab4('0x35')][_0x9ab4('0x21')]);_0x56bee4[_0x9ab4('0x1f')]=qs[_0x9ab4('0x1f')](_0x4ec4ae[_0x9ab4('0x35')][_0x9ab4('0x1f')]);}_0x56bee4[_0x9ab4('0x94')]=qs['sort'](_0x4ec4ae['query'][_0x9ab4('0x95')]);_0x56bee4[_0x9ab4('0x96')]=qs[_0x9ab4('0x90')](_[_0x9ab4('0x97')](_0x4ec4ae['query'],_0x29648e[_0x9ab4('0x90')]));_0x56bee4[_0x9ab4('0x96')]['ChatInteractionId']=_0x3b5597['id'];if(_0x4ec4ae[_0x9ab4('0x35')][_0x9ab4('0x98')]){_0x56bee4[_0x9ab4('0x96')]=_[_0x9ab4('0x27')](_0x56bee4['where'],{'$or':_['map'](_0x56bee4[_0x9ab4('0x3c')],function(_0x10a7ad){var _0x2b2de4={};_0x2b2de4[_0x10a7ad]={'$like':'%'+_0x4ec4ae['query'][_0x9ab4('0x98')]+'%'};return _0x2b2de4;})});}if(_0x4ec4ae[_0x9ab4('0x35')]['$gte']){var _0x4b0929=_0x4ec4ae[_0x9ab4('0x35')][_0x9ab4('0x99')][_0x9ab4('0x9a')](',');var _0x21860e={};_0x21860e[_0x4b0929[0x0]]={'$gte':moment(_0x4b0929[0x1])[_0x9ab4('0x76')](_0x9ab4('0x9b'))};_0x56bee4[_0x9ab4('0x96')]=_[_0x9ab4('0x27')](_0x56bee4[_0x9ab4('0x96')],_0x21860e);}_0x56bee4=_[_0x9ab4('0x27')]({},_0x56bee4,_0x4ec4ae[_0x9ab4('0x40')]);return db[_0x9ab4('0x5a')][_0x9ab4('0x22')]({'where':_0x56bee4[_0x9ab4('0x96')]})['then'](function(_0x45bcbc){_0x30b922['count']=_0x45bcbc;if(_0x4ec4ae[_0x9ab4('0x35')][_0x9ab4('0x3e')]){_0x56bee4[_0x9ab4('0x3f')]=[{'all':!![]}];}return db[_0x9ab4('0x5a')][_0x9ab4('0x33')](_0x56bee4);})[_0x9ab4('0x12')](function(_0x4867d2){_0x30b922[_0x9ab4('0x9c')]=_0x4867d2;return _0x30b922;});}})['then'](respondWithFilteredResult(_0x5a5053,_0x56bee4))[_0x9ab4('0x1b')](handleError(_0x5a5053,null));};exports[_0x9ab4('0x9d')]=function(_0x162bb2,_0x565427){var _0x413e3a={'where':{}},_0x502230={},_0x24b5cf={'count':0x0,'rows':[]};return db[_0x9ab4('0x2e')][_0x9ab4('0x46')]({'where':{'id':_0x162bb2[_0x9ab4('0x38')]['id']}})['then'](handleEntityNotFound(_0x565427,null))[_0x9ab4('0x12')](function(_0xe8fe3b){if(_0xe8fe3b){_0x502230[_0x9ab4('0x39')]=_[_0x9ab4('0x3a')](db[_0x9ab4('0x5a')][_0x9ab4('0x2f')]);_0x502230['query']=_[_0x9ab4('0x3a')](_0x162bb2[_0x9ab4('0x35')]);_0x502230[_0x9ab4('0x90')]=_['intersection'](_0x502230[_0x9ab4('0x39')],_0x502230['query']);_0x413e3a['attributes']=_[_0x9ab4('0x91')](_0x502230[_0x9ab4('0x39')],qs[_0x9ab4('0x3b')](_0x162bb2[_0x9ab4('0x35')][_0x9ab4('0x3b')]));_0x413e3a[_0x9ab4('0x3c')]=_0x413e3a[_0x9ab4('0x3c')][_0x9ab4('0x3d')]?_0x413e3a['attributes']:_0x502230[_0x9ab4('0x39')];if(!_0x162bb2[_0x9ab4('0x35')]['hasOwnProperty'](_0x9ab4('0x93'))){_0x413e3a[_0x9ab4('0x21')]=qs[_0x9ab4('0x21')](_0x162bb2[_0x9ab4('0x35')]['limit']);_0x413e3a[_0x9ab4('0x1f')]=qs[_0x9ab4('0x1f')](_0x162bb2[_0x9ab4('0x35')][_0x9ab4('0x1f')]);}_0x413e3a[_0x9ab4('0x94')]=qs[_0x9ab4('0x95')](_0x162bb2['query'][_0x9ab4('0x95')]);_0x413e3a[_0x9ab4('0x96')]=qs['filters'](_[_0x9ab4('0x97')](_0x162bb2[_0x9ab4('0x35')],_0x502230['filters']));_0x413e3a['where'][_0x9ab4('0x9e')]=_0xe8fe3b['id'];if(_0x162bb2['query'][_0x9ab4('0x98')]){_0x413e3a[_0x9ab4('0x96')]=_[_0x9ab4('0x27')](_0x413e3a['where'],{'$or':_[_0x9ab4('0x2d')](_0x413e3a[_0x9ab4('0x3c')],function(_0x4f66cd){var _0x528090={};_0x528090[_0x4f66cd]={'$like':'%'+_0x162bb2[_0x9ab4('0x35')]['filter']+'%'};return _0x528090;})});}_0x413e3a[_0x9ab4('0x96')][_0x9ab4('0x82')]=![];if(_0x162bb2[_0x9ab4('0x35')]['id']){_0x413e3a[_0x9ab4('0x96')]['id']={'$gt':_0x162bb2['query']['id']};}_0x413e3a=_[_0x9ab4('0x27')]({},_0x413e3a,_0x162bb2[_0x9ab4('0x40')]);return db['ChatMessage'][_0x9ab4('0x22')]({'where':_0x413e3a[_0x9ab4('0x96')]})[_0x9ab4('0x12')](function(_0xb024b5){_0x24b5cf[_0x9ab4('0x22')]=_0xb024b5;_0x413e3a['include']=[];if(_0x162bb2['query'][_0x9ab4('0x9f')]){_0x413e3a[_0x9ab4('0x3f')][_0x9ab4('0xa0')]({'model':db['User'],'as':'User','attributes':['id',_0x9ab4('0x4d'),_0x9ab4('0xa1')]});}if(_0x162bb2[_0x9ab4('0x35')][_0x9ab4('0x3e')]){_0x413e3a[_0x9ab4('0x3f')]=[{'all':!![]}];}return db['ChatMessage'][_0x9ab4('0x33')](_0x413e3a);})[_0x9ab4('0x12')](function(_0x5782c6){_0x24b5cf['rows']=_0x5782c6;return _0x24b5cf;});}})[_0x9ab4('0x12')](respondWithFilteredResult(_0x565427,_0x413e3a))[_0x9ab4('0x1b')](handleError(_0x565427,null));};exports[_0x9ab4('0xa2')]=function(_0x421931,_0x2097f1){return db['ChatInteraction'][_0x9ab4('0x41')]({'where':{'id':_0x421931[_0x9ab4('0x38')]['id']}})[_0x9ab4('0x12')](handleEntityNotFound(_0x2097f1,null))[_0x9ab4('0x12')](function(_0xf53c50){if(_0xf53c50){return _0xf53c50[_0x9ab4('0xa3')](_0x421931['body'][_0x9ab4('0x8d')],_[_0x9ab4('0x8e')](_0x421931[_0x9ab4('0x28')],['ids','id'])||{})[_0x9ab4('0xa4')](function(){return db[_0x9ab4('0xa5')][_0x9ab4('0x33')]({'attributes':['id',_0x9ab4('0x25'),_0x9ab4('0xa6')],'where':{'id':_0x421931[_0x9ab4('0x28')][_0x9ab4('0x8d')]}});})[_0x9ab4('0x12')](function(_0x376e9b){socket[_0x9ab4('0xa7')](_0x9ab4('0xa8'),{'id':Number(_0x421931[_0x9ab4('0x38')]['id']),'tags':_0x376e9b||[]});return{'id':Number(_0x421931['params']['id']),'tags':_0x376e9b||[]};});}})['then'](respondWithResult(_0x2097f1,null))[_0x9ab4('0x1b')](handleError(_0x2097f1,null));};exports[_0x9ab4('0xa9')]=function(_0x4718b5,_0x29e891){return db[_0x9ab4('0x2e')]['find']({'where':{'id':_0x4718b5['params']['id']}})[_0x9ab4('0x12')](handleEntityNotFound(_0x29e891,null))[_0x9ab4('0x12')](function(_0x3eb753){if(_0x3eb753){return _0x3eb753[_0x9ab4('0xa9')](_0x4718b5[_0x9ab4('0x35')]['ids']);}})[_0x9ab4('0x12')](respondWithStatusCode(_0x29e891,null))[_0x9ab4('0x1b')](handleError(_0x29e891,null));};exports['download']=function(_0x23939d,_0x33ab56){var _0x396fd9=moment()['unix']()[_0x9ab4('0xaa')]();var _0x87bd5e=path['join'](config[_0x9ab4('0x6d')],_0x9ab4('0xab'),_0x9ab4('0xac'),_0x9ab4('0xad'));var _0xbb92fb=path[_0x9ab4('0x6c')](config[_0x9ab4('0x6d')],_0x9ab4('0xab'),'files',_0x9ab4('0xae'));var _0x1b44c4=path[_0x9ab4('0x6c')](_0x87bd5e,_0x396fd9);var _0x15c5c1=util[_0x9ab4('0x76')](_0x9ab4('0xaf'),_0x23939d[_0x9ab4('0x38')]['id'],_0x396fd9);var _0x304c1c=path[_0x9ab4('0x6c')](_0x87bd5e,_0x15c5c1);var _0xf59d98=[];_0xf59d98['push']({'model':db['User'],'as':'User','attributes':['id',_0x9ab4('0x4d')],'raw':!![]});_0xf59d98[_0x9ab4('0xa0')]({'model':db[_0x9ab4('0x5e')],'as':_0x9ab4('0xb0'),'attributes':['id','firstName',_0x9ab4('0xb1')],'raw':!![]});if(_0x23939d['query'][_0x9ab4('0xae')]){_0xf59d98['push']({'model':db[_0x9ab4('0x6a')],'as':_0x9ab4('0x6a'),'raw':!![]});}var _0x2a9a3e=[{'model':db[_0x9ab4('0x5a')],'as':_0x9ab4('0x72'),'attributes':['id',_0x9ab4('0x28'),_0x9ab4('0x80'),_0x9ab4('0xb2'),_0x9ab4('0x82'),'read'],'include':_0xf59d98}];_0x2a9a3e[_0x9ab4('0xa0')]({'model':db[_0x9ab4('0x47')],'as':'Account','attributes':['id',_0x9ab4('0x25')]});_0x2a9a3e[_0x9ab4('0xa0')]({'model':db[_0x9ab4('0x73')],'as':_0x9ab4('0xb3'),'attributes':['id','fullname']});return db[_0x9ab4('0x2e')][_0x9ab4('0x41')]({'where':{'id':_0x23939d['params']['id']},'include':_0x2a9a3e})[_0x9ab4('0x12')](handleEntityNotFound(_0x33ab56,null))['then'](function(_0x1980e3){if(_0x1980e3){var _0x16d107=_0x1980e3[_0x9ab4('0xb4')]({'plain':!![]});fs[_0x9ab4('0xb5')](_0x1b44c4);var _0x299c3f={'channel':_0x9ab4('0xb6'),'account':_0x16d107['Account'][_0x9ab4('0x25')],'agent':_0x16d107[_0x9ab4('0xb3')]?_0x16d107[_0x9ab4('0xb3')][_0x9ab4('0x4d')]:_0x9ab4('0xb7'),'createdAt':moment(_0x16d107[_0x9ab4('0x80')])['format'](_0x9ab4('0x9b'))[_0x9ab4('0xaa')](),'closedAt':_0x16d107[_0x9ab4('0x62')]?moment(_0x16d107[_0x9ab4('0xb8')])['format'](_0x9ab4('0x9b'))[_0x9ab4('0xaa')]():'','disposition':_0x16d107['disposition'],'chatInfo':{'browser':_0x16d107[_0x9ab4('0xb9')],'os':_0x16d107[_0x9ab4('0xba')],'referer':_0x16d107[_0x9ab4('0xbb')],'customerIp':_0x16d107[_0x9ab4('0xbc')],'customerPort':_0x16d107['customerPort']?_0x16d107[_0x9ab4('0xbd')]:'N.A.'},'messages':_(_0x16d107[_0x9ab4('0x72')])[_0x9ab4('0xbe')]()['filter']({'secret':![]})[_0x9ab4('0x2d')](function(_0x3a32f1){if(_0x3a32f1['Attachment']){var _0x1aafd2=path[_0x9ab4('0x6c')](_0xbb92fb,_0x3a32f1[_0x9ab4('0x6a')]['basename']);if(fs[_0x9ab4('0xbf')](_0x1aafd2)){fs[_0x9ab4('0xc0')](_0x1aafd2)[_0x9ab4('0xc1')](fs[_0x9ab4('0xc2')](path[_0x9ab4('0x6c')](_0x1b44c4,_0x3a32f1[_0x9ab4('0x6a')][_0x9ab4('0x68')])));}}return{'date':moment(_0x3a32f1[_0x9ab4('0x80')])[_0x9ab4('0x76')]('YYYY-MM-DD\x20HH:mm:ss')['toString'](),'sender':_0x3a32f1['direction']===_0x9ab4('0x59')?_0x3a32f1['User']?_0x3a32f1[_0x9ab4('0x73')][_0x9ab4('0x4d')]:_0x9ab4('0x7d'):_0x3a32f1['Contact']['firstName']+(_0x3a32f1[_0x9ab4('0xb0')]['lastName']?'\x20'+_0x3a32f1[_0x9ab4('0xb0')]['lastName']:''),'body':_0x3a32f1['Attachment']?_0x3a32f1[_0x9ab4('0x6a')]['basename']:_0x3a32f1[_0x9ab4('0x28')],'direction':_0x3a32f1['direction']==='out'?'A':'C','secret':_0x3a32f1[_0x9ab4('0x82')],'read':_0x3a32f1[_0x9ab4('0xc3')],'attachment':_0x3a32f1[_0x9ab4('0x6a')]};})[_0x9ab4('0xc4')]()};return ejs[_0x9ab4('0xc5')](path[_0x9ab4('0x6c')](config[_0x9ab4('0x6d')],'server','views',_0x9ab4('0xc6')),{'interaction':_0x299c3f})[_0x9ab4('0x12')](function(_0x65805c){var _0x50de59=path[_0x9ab4('0x6c')](_0x1b44c4,_0x9ab4('0xc7')+_0x16d107['id']+'-'+_0x396fd9+_0x9ab4('0xc8'));var _0x4c894f={'path':_0x50de59,'channel':'Chat','interactionId':_0x16d107['id']};return pdf[_0x9ab4('0xc9')](_0x65805c,_0x4c894f);})[_0x9ab4('0x12')](function(){return new Promise(function(_0x34ff82,_0x8a7881){zipdir(_0x1b44c4,{'saveTo':_0x304c1c},function(_0x42b064,_0x5c2bdc){if(_0x42b064)return _0x8a7881(_0x42b064);return _0x34ff82(_0x5c2bdc);});})[_0x9ab4('0x12')](function(){return new BPromise(function(_0x278691,_0x58a828){rimraf(_0x1b44c4,function(_0x4efa06){if(_0x4efa06)_0x58a828(_0x4efa06);return _0x278691();});});})[_0x9ab4('0x12')](function(){return _0x33ab56[_0x9ab4('0xca')](_0x304c1c,_0x15c5c1,function(_0x17e98e){if(_0x17e98e){logger['error']('err',_0x17e98e);}else{fs[_0x9ab4('0xcb')](_0x304c1c);}});});});}else{return _0x33ab56[_0x9ab4('0x1c')](0xc8);}})[_0x9ab4('0x1b')](handleError(_0x33ab56,null));}; \ No newline at end of file diff --git a/server/api/chatInteraction/chatInteraction.events.js b/server/api/chatInteraction/chatInteraction.events.js index e40a3a5..f0fca05 100644 --- a/server/api/chatInteraction/chatInteraction.events.js +++ b/server/api/chatInteraction/chatInteraction.events.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xf469=['remove','getUsers','setDataValue','map','findAll','then','unreadMessages','length','emit','catch','hasOwnProperty','exports','events','../../mysqldb','save','update'];(function(_0x2872ab,_0xfec43c){var _0x5066e6=function(_0x217a98){while(--_0x217a98){_0x2872ab['push'](_0x2872ab['shift']());}};_0x5066e6(++_0xfec43c);}(_0xf469,0x15c));var _0x9f46=function(_0x3649b0,_0x404115){_0x3649b0=_0x3649b0-0x0;var _0x5975be=_0xf469[_0x3649b0];return _0x5975be;};'use strict';var EventEmitter=require(_0x9f46('0x0'));var ChatInteraction=require(_0x9f46('0x1'))['db']['ChatInteraction'];var ChatMessage=require(_0x9f46('0x1'))['db']['ChatMessage'];var ChatInteractionEvents=new EventEmitter();ChatInteractionEvents['setMaxListeners'](0x0);var events={'afterCreate':_0x9f46('0x2'),'afterUpdate':_0x9f46('0x3'),'afterDestroy':_0x9f46('0x4')};function emitEvent(_0x4b1615){return function(_0x39bad1,_0x1df07a,_0x1d3852){_0x39bad1[_0x9f46('0x5')]({'attributes':['id'],'raw':!![]})['then'](function(_0x11c40f){_0x39bad1[_0x9f46('0x6')]('Users',_0x11c40f[_0x9f46('0x7')](function(_0x50a3ad){return{'id':_0x50a3ad['id']};}));return ChatMessage[_0x9f46('0x8')]({'where':{'ChatInteractionId':_0x39bad1['id'],'direction':'in','read':![]},'raw':!![]});})[_0x9f46('0x9')](function(_0x135dc2){_0x39bad1['setDataValue'](_0x9f46('0xa'),_0x135dc2[_0x9f46('0xb')]);ChatInteractionEvents['emit'](_0x4b1615+':'+_0x39bad1['id'],_0x39bad1);ChatInteractionEvents[_0x9f46('0xc')](_0x4b1615,_0x39bad1);_0x1d3852(null);})[_0x9f46('0xd')](_0x1d3852(null));};}for(var e in events){if(events[_0x9f46('0xe')](e)){var event=events[e];ChatInteraction['hook'](e,emitEvent(event));}}module[_0x9f46('0xf')]=ChatInteractionEvents; \ No newline at end of file +var _0x150b=['update','getUsers','then','setDataValue','Users','map','findAll','unreadMessages','length','emit','catch','hasOwnProperty','hook','exports','events','../../mysqldb','ChatInteraction','ChatMessage','save'];(function(_0x540c79,_0x4ca285){var _0x2a422a=function(_0xec4f9){while(--_0xec4f9){_0x540c79['push'](_0x540c79['shift']());}};_0x2a422a(++_0x4ca285);}(_0x150b,0x118));var _0xb150=function(_0x43026b,_0x928d8c){_0x43026b=_0x43026b-0x0;var _0x4a96cd=_0x150b[_0x43026b];return _0x4a96cd;};'use strict';var EventEmitter=require(_0xb150('0x0'));var ChatInteraction=require(_0xb150('0x1'))['db'][_0xb150('0x2')];var ChatMessage=require(_0xb150('0x1'))['db'][_0xb150('0x3')];var ChatInteractionEvents=new EventEmitter();ChatInteractionEvents['setMaxListeners'](0x0);var events={'afterCreate':_0xb150('0x4'),'afterUpdate':_0xb150('0x5'),'afterDestroy':'remove'};function emitEvent(_0x249d11){return function(_0x3288bb,_0x279cd6,_0x392253){_0x3288bb[_0xb150('0x6')]({'attributes':['id'],'raw':!![]})[_0xb150('0x7')](function(_0x4bcac5){_0x3288bb[_0xb150('0x8')](_0xb150('0x9'),_0x4bcac5[_0xb150('0xa')](function(_0x3212e6){return{'id':_0x3212e6['id']};}));return ChatMessage[_0xb150('0xb')]({'where':{'ChatInteractionId':_0x3288bb['id'],'direction':'in','read':![]},'raw':!![]});})[_0xb150('0x7')](function(_0x589787){_0x3288bb[_0xb150('0x8')](_0xb150('0xc'),_0x589787[_0xb150('0xd')]);ChatInteractionEvents['emit'](_0x249d11+':'+_0x3288bb['id'],_0x3288bb);ChatInteractionEvents[_0xb150('0xe')](_0x249d11,_0x3288bb);_0x392253(null);})[_0xb150('0xf')](_0x392253(null));};}for(var e in events){if(events[_0xb150('0x10')](e)){var event=events[e];ChatInteraction[_0xb150('0x11')](e,emitEvent(event));}}module[_0xb150('0x12')]=ChatInteractionEvents; \ No newline at end of file diff --git a/server/api/chatInteraction/chatInteraction.model.js b/server/api/chatInteraction/chatInteraction.model.js index 78cef65..24c499b 100644 --- a/server/api/chatInteraction/chatInteraction.model.js +++ b/server/api/chatInteraction/chatInteraction.model.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xec2f=['path','rimraf','../../config/environment','./chatInteraction.attributes','exports','define','ChatInteraction','chat_interactions','closed','YYYY-MM-DD\x20HH:mm:ss','utf8mb4','lodash','util','../../config/logger','api','moment','request-promise'];(function(_0x2eb5bc,_0x4634c6){var _0x51c7b1=function(_0x1af430){while(--_0x1af430){_0x2eb5bc['push'](_0x2eb5bc['shift']());}};_0x51c7b1(++_0x4634c6);}(_0xec2f,0x1a3));var _0xfec2=function(_0x41eeef,_0x17b727){_0x41eeef=_0x41eeef-0x0;var _0x28bbbb=_0xec2f[_0x41eeef];return _0x28bbbb;};'use strict';var _=require(_0xfec2('0x0'));var util=require(_0xfec2('0x1'));var logger=require(_0xfec2('0x2'))(_0xfec2('0x3'));var moment=require(_0xfec2('0x4'));var BPromise=require('bluebird');var rp=require(_0xfec2('0x5'));var fs=require('fs');var path=require(_0xfec2('0x6'));var rimraf=require(_0xfec2('0x7'));var config=require(_0xfec2('0x8'));var attributes=require(_0xfec2('0x9'));module[_0xfec2('0xa')]=function(_0x57e55e,_0xbe50){return _0x57e55e[_0xfec2('0xb')](_0xfec2('0xc'),attributes,{'tableName':_0xfec2('0xd'),'paranoid':![],'indexes':[],'timestamps':!![],'hooks':{'beforeUpdate':function(_0x45f914,_0x10cb34,_0xba6e41){if(_0x45f914['changed'](_0xfec2('0xe'))){_0x45f914['closedAt']=moment()['format'](_0xfec2('0xf'));}_0xba6e41(null,_0x45f914);}},'charset':_0xfec2('0x10'),'collate':'utf8mb4_unicode_ci'});}; \ No newline at end of file +var _0xdafa=['utf8mb4','util','../../config/logger','moment','bluebird','path','rimraf','../../config/environment','./chatInteraction.attributes','exports','define','ChatInteraction','chat_interactions','closed','closedAt','format','YYYY-MM-DD\x20HH:mm:ss'];(function(_0x3b1e3f,_0xf8826b){var _0x3b1cd3=function(_0x26ad44){while(--_0x26ad44){_0x3b1e3f['push'](_0x3b1e3f['shift']());}};_0x3b1cd3(++_0xf8826b);}(_0xdafa,0x1ee));var _0xadaf=function(_0x138700,_0x4036f4){_0x138700=_0x138700-0x0;var _0x5ab351=_0xdafa[_0x138700];return _0x5ab351;};'use strict';var _=require('lodash');var util=require(_0xadaf('0x0'));var logger=require(_0xadaf('0x1'))('api');var moment=require(_0xadaf('0x2'));var BPromise=require(_0xadaf('0x3'));var rp=require('request-promise');var fs=require('fs');var path=require(_0xadaf('0x4'));var rimraf=require(_0xadaf('0x5'));var config=require(_0xadaf('0x6'));var attributes=require(_0xadaf('0x7'));module[_0xadaf('0x8')]=function(_0x33c051,_0x2862c6){return _0x33c051[_0xadaf('0x9')](_0xadaf('0xa'),attributes,{'tableName':_0xadaf('0xb'),'paranoid':![],'indexes':[],'timestamps':!![],'hooks':{'beforeUpdate':function(_0x4c633f,_0x5a1198,_0x2205b7){if(_0x4c633f['changed'](_0xadaf('0xc'))){_0x4c633f[_0xadaf('0xd')]=moment()[_0xadaf('0xe')](_0xadaf('0xf'));}_0x2205b7(null,_0x4c633f);}},'charset':_0xadaf('0x10'),'collate':'utf8mb4_unicode_ci'});}; \ No newline at end of file diff --git a/server/api/chatInteraction/chatInteraction.rpc.js b/server/api/chatInteraction/chatInteraction.rpc.js index bb7f78a..a9d5d32 100644 --- a/server/api/chatInteraction/chatInteraction.rpc.js +++ b/server/api/chatInteraction/chatInteraction.rpc.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xd540=['../../mysqldb','../../config/logger','rpc','../../config/environment','client','http','redis','defaults','localhost','socket.io-emitter','./chatInteraction.socket','register','request','then','info','ChatInteraction,\x20%s,\x20%s','request\x20sent','debug','ChatInteraction,\x20%s,\x20%s,\x20%s','stringify','error','code','message','catch','UpdateChatInteraction','ChatInteraction','update','options','raw','where','AddTagsToChatInteraction','find','addTags','body','ids','omit','spread','AddTags','lodash','util','moment','bluebird','randomstring','ioredis'];(function(_0x1ac595,_0x5d2081){var _0x455fff=function(_0x3043ee){while(--_0x3043ee){_0x1ac595['push'](_0x1ac595['shift']());}};_0x455fff(++_0x5d2081);}(_0xd540,0x12e));var _0x0d54=function(_0x41cbb1,_0x3416f2){_0x41cbb1=_0x41cbb1-0x0;var _0x5e00f8=_0xd540[_0x41cbb1];return _0x5e00f8;};'use strict';var _=require(_0x0d54('0x0'));var util=require(_0x0d54('0x1'));var moment=require(_0x0d54('0x2'));var BPromise=require(_0x0d54('0x3'));var rs=require(_0x0d54('0x4'));var fs=require('fs');var Redis=require(_0x0d54('0x5'));var db=require(_0x0d54('0x6'))['db'];var utils=require('../../config/utils');var logger=require(_0x0d54('0x7'))(_0x0d54('0x8'));var config=require(_0x0d54('0x9'));var jayson=require('jayson/promise');var client=jayson[_0x0d54('0xa')][_0x0d54('0xb')]({'port':0x232a});config[_0x0d54('0xc')]=_[_0x0d54('0xd')](config['redis'],{'host':_0x0d54('0xe'),'port':0x18eb});var socket=require(_0x0d54('0xf'))(new Redis(config[_0x0d54('0xc')]));require(_0x0d54('0x10'))[_0x0d54('0x11')](socket);function respondWithRpcPromise(_0x44c8c5,_0x495442,_0x4a92a4){return new BPromise(function(_0x4917dc,_0x444133){return client[_0x0d54('0x12')](_0x44c8c5,_0x4a92a4)[_0x0d54('0x13')](function(_0x2859ab){logger[_0x0d54('0x14')](_0x0d54('0x15'),_0x495442,_0x0d54('0x16'));logger[_0x0d54('0x17')](_0x0d54('0x18'),_0x495442,'request\x20sent',JSON[_0x0d54('0x19')](_0x2859ab));if(_0x2859ab['error']){if(_0x2859ab[_0x0d54('0x1a')][_0x0d54('0x1b')]===0x1f4){logger[_0x0d54('0x1a')](_0x0d54('0x15'),_0x495442,_0x2859ab[_0x0d54('0x1a')][_0x0d54('0x1c')]);return _0x444133(_0x2859ab[_0x0d54('0x1a')][_0x0d54('0x1c')]);}logger[_0x0d54('0x1a')](_0x0d54('0x15'),_0x495442,_0x2859ab[_0x0d54('0x1a')][_0x0d54('0x1c')]);return _0x4917dc(_0x2859ab[_0x0d54('0x1a')][_0x0d54('0x1c')]);}else{logger['info']('ChatInteraction,\x20%s,\x20%s',_0x495442,'request\x20sent');_0x4917dc(_0x2859ab['result']['message']);}})[_0x0d54('0x1d')](function(_0x1099f8){logger[_0x0d54('0x1a')](_0x0d54('0x15'),_0x495442,_0x1099f8);_0x444133(_0x1099f8);});});}exports[_0x0d54('0x1e')]=function(_0x587e47){var _0x5e1575=this;return new Promise(function(_0x435bc6,_0x4604a3){return db[_0x0d54('0x1f')][_0x0d54('0x20')](_0x587e47['body'],{'raw':_0x587e47[_0x0d54('0x21')]?_0x587e47['options'][_0x0d54('0x22')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x587e47[_0x0d54('0x21')]?_0x587e47[_0x0d54('0x21')][_0x0d54('0x23')]||null:null,'attributes':_0x587e47['options']?_0x587e47[_0x0d54('0x21')]['attributes']||null:null,'limit':_0x587e47['options']?_0x587e47['options']['limit']||null:null})[_0x0d54('0x13')](function(_0x93e182){logger[_0x0d54('0x14')](_0x0d54('0x1e'),_0x587e47);logger[_0x0d54('0x17')](_0x0d54('0x1e'),_0x587e47,JSON[_0x0d54('0x19')](_0x93e182));_0x435bc6(_0x93e182);})[_0x0d54('0x1d')](function(_0x1021c0){logger[_0x0d54('0x1a')](_0x0d54('0x1e'),_0x1021c0['message'],_0x587e47);_0x4604a3(_0x5e1575['error'](0x1f4,_0x1021c0['message']));});});};exports[_0x0d54('0x24')]=function(_0x3108a3){return new Promise(function(_0x187dea,_0x249d78){return db['ChatInteraction'][_0x0d54('0x25')]({'where':_0x3108a3[_0x0d54('0x21')]?_0x3108a3[_0x0d54('0x21')][_0x0d54('0x23')]||null:null})[_0x0d54('0x13')](function(_0x21a964){if(_0x21a964){return _0x21a964[_0x0d54('0x26')](_0x3108a3[_0x0d54('0x27')][_0x0d54('0x28')],_[_0x0d54('0x29')](_0x3108a3['body'],[_0x0d54('0x28'),'id'])||{});}})[_0x0d54('0x2a')](function(_0x58eb95){logger[_0x0d54('0x14')](_0x0d54('0x2b'),_0x3108a3);logger[_0x0d54('0x17')](_0x0d54('0x2b'),_0x3108a3,JSON[_0x0d54('0x19')](_0x58eb95));_0x187dea(_0x58eb95);})['catch'](function(_0x6d5ee5){logger[_0x0d54('0x1a')](_0x0d54('0x2b'),_0x6d5ee5[_0x0d54('0x1c')],_0x3108a3);_0x249d78(_this[_0x0d54('0x1a')](0x1f4,_0x6d5ee5[_0x0d54('0x1c')]));});});}; \ No newline at end of file +var _0x7d79=['body','options','raw','where','attributes','limit','stringify','AddTagsToChatInteraction','find','addTags','ids','omit','AddTags','lodash','util','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','redis','defaults','localhost','socket.io-emitter','register','request','then','ChatInteraction,\x20%s,\x20%s','request\x20sent','debug','ChatInteraction,\x20%s,\x20%s,\x20%s','error','code','message','info','result','catch','UpdateChatInteraction','ChatInteraction','update'];(function(_0x40e228,_0x51a09e){var _0xbb250f=function(_0x520728){while(--_0x520728){_0x40e228['push'](_0x40e228['shift']());}};_0xbb250f(++_0x51a09e);}(_0x7d79,0x1a2));var _0x97d7=function(_0x321bb2,_0x202794){_0x321bb2=_0x321bb2-0x0;var _0x9c12ed=_0x7d79[_0x321bb2];return _0x9c12ed;};'use strict';var _=require(_0x97d7('0x0'));var util=require(_0x97d7('0x1'));var moment=require('moment');var BPromise=require(_0x97d7('0x2'));var rs=require(_0x97d7('0x3'));var fs=require('fs');var Redis=require(_0x97d7('0x4'));var db=require(_0x97d7('0x5'))['db'];var utils=require(_0x97d7('0x6'));var logger=require(_0x97d7('0x7'))(_0x97d7('0x8'));var config=require(_0x97d7('0x9'));var jayson=require(_0x97d7('0xa'));var client=jayson[_0x97d7('0xb')]['http']({'port':0x232a});config[_0x97d7('0xc')]=_[_0x97d7('0xd')](config[_0x97d7('0xc')],{'host':_0x97d7('0xe'),'port':0x18eb});var socket=require(_0x97d7('0xf'))(new Redis(config['redis']));require('./chatInteraction.socket')[_0x97d7('0x10')](socket);function respondWithRpcPromise(_0x557b0f,_0x26251a,_0x968aa9){return new BPromise(function(_0x3b0b3b,_0x348e01){return client[_0x97d7('0x11')](_0x557b0f,_0x968aa9)[_0x97d7('0x12')](function(_0x1e75af){logger['info'](_0x97d7('0x13'),_0x26251a,_0x97d7('0x14'));logger[_0x97d7('0x15')](_0x97d7('0x16'),_0x26251a,'request\x20sent',JSON['stringify'](_0x1e75af));if(_0x1e75af[_0x97d7('0x17')]){if(_0x1e75af[_0x97d7('0x17')][_0x97d7('0x18')]===0x1f4){logger[_0x97d7('0x17')](_0x97d7('0x13'),_0x26251a,_0x1e75af['error'][_0x97d7('0x19')]);return _0x348e01(_0x1e75af[_0x97d7('0x17')][_0x97d7('0x19')]);}logger['error'](_0x97d7('0x13'),_0x26251a,_0x1e75af[_0x97d7('0x17')][_0x97d7('0x19')]);return _0x3b0b3b(_0x1e75af[_0x97d7('0x17')][_0x97d7('0x19')]);}else{logger[_0x97d7('0x1a')](_0x97d7('0x13'),_0x26251a,'request\x20sent');_0x3b0b3b(_0x1e75af[_0x97d7('0x1b')][_0x97d7('0x19')]);}})[_0x97d7('0x1c')](function(_0x358884){logger['error'](_0x97d7('0x13'),_0x26251a,_0x358884);_0x348e01(_0x358884);});});}exports[_0x97d7('0x1d')]=function(_0x3fb8ad){var _0x2c38a5=this;return new Promise(function(_0x2d7610,_0x42b852){return db[_0x97d7('0x1e')][_0x97d7('0x1f')](_0x3fb8ad[_0x97d7('0x20')],{'raw':_0x3fb8ad['options']?_0x3fb8ad[_0x97d7('0x21')][_0x97d7('0x22')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x3fb8ad[_0x97d7('0x21')]?_0x3fb8ad['options'][_0x97d7('0x23')]||null:null,'attributes':_0x3fb8ad['options']?_0x3fb8ad['options'][_0x97d7('0x24')]||null:null,'limit':_0x3fb8ad[_0x97d7('0x21')]?_0x3fb8ad[_0x97d7('0x21')][_0x97d7('0x25')]||null:null})['then'](function(_0xcaa25){logger['info'](_0x97d7('0x1d'),_0x3fb8ad);logger[_0x97d7('0x15')](_0x97d7('0x1d'),_0x3fb8ad,JSON[_0x97d7('0x26')](_0xcaa25));_0x2d7610(_0xcaa25);})[_0x97d7('0x1c')](function(_0x193f47){logger[_0x97d7('0x17')]('UpdateChatInteraction',_0x193f47[_0x97d7('0x19')],_0x3fb8ad);_0x42b852(_0x2c38a5[_0x97d7('0x17')](0x1f4,_0x193f47['message']));});});};exports[_0x97d7('0x27')]=function(_0xc826d8){return new Promise(function(_0x54ac03,_0x173617){return db['ChatInteraction'][_0x97d7('0x28')]({'where':_0xc826d8[_0x97d7('0x21')]?_0xc826d8[_0x97d7('0x21')][_0x97d7('0x23')]||null:null})[_0x97d7('0x12')](function(_0x5cbb45){if(_0x5cbb45){return _0x5cbb45[_0x97d7('0x29')](_0xc826d8['body'][_0x97d7('0x2a')],_[_0x97d7('0x2b')](_0xc826d8[_0x97d7('0x20')],['ids','id'])||{});}})['spread'](function(_0x2c845b){logger[_0x97d7('0x1a')](_0x97d7('0x2c'),_0xc826d8);logger[_0x97d7('0x15')](_0x97d7('0x2c'),_0xc826d8,JSON[_0x97d7('0x26')](_0x2c845b));_0x54ac03(_0x2c845b);})[_0x97d7('0x1c')](function(_0x23ccfa){logger['error'](_0x97d7('0x2c'),_0x23ccfa[_0x97d7('0x19')],_0xc826d8);_0x173617(_this[_0x97d7('0x17')](0x1f4,_0x23ccfa['message']));});});}; \ No newline at end of file diff --git a/server/api/chatInteraction/chatInteraction.socket.js b/server/api/chatInteraction/chatInteraction.socket.js index 00d7e47..ebc0c46 100644 --- a/server/api/chatInteraction/chatInteraction.socket.js +++ b/server/api/chatInteraction/chatInteraction.socket.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xa50d=['removeListener','register','length','./chatInteraction.events','save','remove','update','emit'];(function(_0x358a6f,_0x2355c6){var _0x46640c=function(_0x552a58){while(--_0x552a58){_0x358a6f['push'](_0x358a6f['shift']());}};_0x46640c(++_0x2355c6);}(_0xa50d,0x7b));var _0xda50=function(_0x2bea05,_0x3a6d09){_0x2bea05=_0x2bea05-0x0;var _0x18408b=_0xa50d[_0x2bea05];return _0x18408b;};'use strict';var ChatInteractionEvents=require(_0xda50('0x0'));var events=[_0xda50('0x1'),_0xda50('0x2'),_0xda50('0x3')];function createListener(_0xd140a7,_0x2983a8){return function(_0x168ae4){_0x2983a8[_0xda50('0x4')](_0xd140a7,_0x168ae4);};}function removeListener(_0x14e08c,_0x4c3764){return function(){ChatInteractionEvents[_0xda50('0x5')](_0x14e08c,_0x4c3764);};}exports[_0xda50('0x6')]=function(_0x17c60d){for(var _0x477de8=0x0,_0x4755fb=events[_0xda50('0x7')];_0x477de8<_0x4755fb;_0x477de8++){var _0x30eb7d=events[_0x477de8];var _0x26d73c=createListener('chatInteraction:'+_0x30eb7d,_0x17c60d);ChatInteractionEvents['on'](_0x30eb7d,_0x26d73c);}}; \ No newline at end of file +var _0x1373=['./chatInteraction.events','save','remove','update','removeListener','length'];(function(_0x518ea6,_0x5d7886){var _0x1bd832=function(_0x2d12c1){while(--_0x2d12c1){_0x518ea6['push'](_0x518ea6['shift']());}};_0x1bd832(++_0x5d7886);}(_0x1373,0xa2));var _0x3137=function(_0x48aa07,_0x131990){_0x48aa07=_0x48aa07-0x0;var _0x57879a=_0x1373[_0x48aa07];return _0x57879a;};'use strict';var ChatInteractionEvents=require(_0x3137('0x0'));var events=[_0x3137('0x1'),_0x3137('0x2'),_0x3137('0x3')];function createListener(_0x22e434,_0x2cf7ec){return function(_0xdca7a0){_0x2cf7ec['emit'](_0x22e434,_0xdca7a0);};}function removeListener(_0x358729,_0x2b0e25){return function(){ChatInteractionEvents[_0x3137('0x4')](_0x358729,_0x2b0e25);};}exports['register']=function(_0x1c4663){for(var _0x2833aa=0x0,_0x8f5387=events[_0x3137('0x5')];_0x2833aa<_0x8f5387;_0x2833aa++){var _0x3a2e22=events[_0x2833aa];var _0x53d09d=createListener('chatInteraction:'+_0x3a2e22,_0x1c4663);ChatInteractionEvents['on'](_0x3a2e22,_0x53d09d);}}; \ No newline at end of file diff --git a/server/api/chatInteraction/index.js b/server/api/chatInteraction/index.js index f790b49..0e1573b 100644 --- a/server/api/chatInteraction/index.js +++ b/server/api/chatInteraction/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x2d49=['/:id/attachment_upload','single','file','addMessage','tracked','chat','chatinteraction:addtags','addTags','put','chatinteraction:update','update','/:id/custom_update','/:id/abandon','abandon','/:id/close','close','delete','chatinteraction:destroy','destroy','/:id/tags','removeTags','exports','multer','connect-timeout','express','Router','fs-extra','../../components/auth/service','../../components/interaction/service','get','isAuthenticated','/describe','describe','/:id','isChatInteractionAuthorized','show','/:id/attachment_download','/:id/messages','/:id/my_messages','getMyMessages','/:id/download','download','post','/:id/vidaoo','createVidaooSession','diskStorage','root','server/files/attachments/','format','%s-%s','now','originalname','replace'];(function(_0x4b0a01,_0x52d11f){var _0x5a0ac6=function(_0x5cb8d7){while(--_0x5cb8d7){_0x4b0a01['push'](_0x4b0a01['shift']());}};_0x5a0ac6(++_0x52d11f);}(_0x2d49,0x1be));var _0x92d4=function(_0x553e15,_0x268b7b){_0x553e15=_0x553e15-0x0;var _0x50cdb9=_0x2d49[_0x553e15];return _0x50cdb9;};'use strict';var multer=require(_0x92d4('0x0'));var util=require('util');var path=require('path');var timeout=require(_0x92d4('0x1'));var express=require(_0x92d4('0x2'));var router=express[_0x92d4('0x3')]();var fs_extra=require(_0x92d4('0x4'));var auth=require(_0x92d4('0x5'));var interaction=require(_0x92d4('0x6'));var config=require('../../config/environment');var controller=require('./chatInteraction.controller');router[_0x92d4('0x7')]('/',auth[_0x92d4('0x8')](),controller['index']);router[_0x92d4('0x7')](_0x92d4('0x9'),auth['isAuthenticated'](),controller[_0x92d4('0xa')]);router['get'](_0x92d4('0xb'),auth[_0x92d4('0xc')](),controller[_0x92d4('0xd')]);router[_0x92d4('0x7')](_0x92d4('0xe'),auth[_0x92d4('0xc')](),controller['attachmentDownload']);router[_0x92d4('0x7')](_0x92d4('0xf'),auth[_0x92d4('0x8')](),controller['getMessages']);router[_0x92d4('0x7')](_0x92d4('0x10'),auth['isChatInteractionAuthorized'](),controller[_0x92d4('0x11')]);router[_0x92d4('0x7')](_0x92d4('0x12'),auth[_0x92d4('0x8')](),controller[_0x92d4('0x13')]);router[_0x92d4('0x14')]('/',auth['isAuthenticated'](),controller['create']);router['post'](_0x92d4('0x15'),auth['isAuthenticated'](),controller[_0x92d4('0x16')]);var upload=multer({'storage':multer[_0x92d4('0x17')]({'destination':function(_0x4d166a,_0x12dc98,_0x575d6e){_0x575d6e(null,path['join'](config[_0x92d4('0x18')],_0x92d4('0x19')));},'filename':function(_0x57f399,_0x4035b7,_0x3e33f0){_0x3e33f0(null,util[_0x92d4('0x1a')](_0x92d4('0x1b'),Date[_0x92d4('0x1c')](),_0x4035b7[_0x92d4('0x1d')][_0x92d4('0x1e')](/[+@&\/\\#,+()$~%'":*?<>{}\s\\|]/g,'-')));}})});router[_0x92d4('0x14')](_0x92d4('0x1f'),upload[_0x92d4('0x20')](_0x92d4('0x21')),controller['attachmentUpload']);router[_0x92d4('0x14')](_0x92d4('0xf'),auth[_0x92d4('0xc')](),controller[_0x92d4('0x22')]);router[_0x92d4('0x14')]('/:id/tags',auth[_0x92d4('0x8')](),interaction[_0x92d4('0x23')](_0x92d4('0x24'),_0x92d4('0x25')),controller[_0x92d4('0x26')]);router[_0x92d4('0x27')](_0x92d4('0xb'),auth[_0x92d4('0x8')](),interaction[_0x92d4('0x23')](_0x92d4('0x24'),_0x92d4('0x28')),controller[_0x92d4('0x29')]);router[_0x92d4('0x27')](_0x92d4('0x2a'),controller['customUpdate']);router[_0x92d4('0x27')](_0x92d4('0x2b'),auth[_0x92d4('0xc')](),controller[_0x92d4('0x2c')]);router['put'](_0x92d4('0x2d'),controller[_0x92d4('0x2e')]);router[_0x92d4('0x2f')](_0x92d4('0xb'),auth[_0x92d4('0x8')](),interaction['tracked']('chat',_0x92d4('0x30')),controller[_0x92d4('0x31')]);router['delete'](_0x92d4('0x32'),auth['isAuthenticated'](),controller[_0x92d4('0x33')]);module[_0x92d4('0x34')]=router; \ No newline at end of file +var _0x429d=['../../components/auth/service','../../components/interaction/service','../../config/environment','./chatInteraction.controller','get','isAuthenticated','index','/describe','describe','/:id','isChatInteractionAuthorized','/:id/attachment_download','attachmentDownload','/:id/messages','getMessages','/:id/my_messages','getMyMessages','/:id/download','download','create','post','createVidaooSession','root','server/files/attachments/','format','%s-%s','now','originalname','/:id/attachment_upload','single','file','attachmentUpload','addMessage','tracked','chat','chatinteraction:addtags','addTags','update','/:id/custom_update','customUpdate','put','/:id/abandon','abandon','/:id/close','close','chatinteraction:destroy','destroy','delete','util','path','connect-timeout','express','Router','fs-extra'];(function(_0x5cc07e,_0x336510){var _0x14fb8e=function(_0x5414ab){while(--_0x5414ab){_0x5cc07e['push'](_0x5cc07e['shift']());}};_0x14fb8e(++_0x336510);}(_0x429d,0x108));var _0xd429=function(_0x21a9d9,_0x4d5ac8){_0x21a9d9=_0x21a9d9-0x0;var _0x46adce=_0x429d[_0x21a9d9];return _0x46adce;};'use strict';var multer=require('multer');var util=require(_0xd429('0x0'));var path=require(_0xd429('0x1'));var timeout=require(_0xd429('0x2'));var express=require(_0xd429('0x3'));var router=express[_0xd429('0x4')]();var fs_extra=require(_0xd429('0x5'));var auth=require(_0xd429('0x6'));var interaction=require(_0xd429('0x7'));var config=require(_0xd429('0x8'));var controller=require(_0xd429('0x9'));router[_0xd429('0xa')]('/',auth[_0xd429('0xb')](),controller[_0xd429('0xc')]);router[_0xd429('0xa')](_0xd429('0xd'),auth[_0xd429('0xb')](),controller[_0xd429('0xe')]);router['get'](_0xd429('0xf'),auth[_0xd429('0x10')](),controller['show']);router[_0xd429('0xa')](_0xd429('0x11'),auth[_0xd429('0x10')](),controller[_0xd429('0x12')]);router['get'](_0xd429('0x13'),auth['isAuthenticated'](),controller[_0xd429('0x14')]);router[_0xd429('0xa')](_0xd429('0x15'),auth[_0xd429('0x10')](),controller[_0xd429('0x16')]);router[_0xd429('0xa')](_0xd429('0x17'),auth[_0xd429('0xb')](),controller[_0xd429('0x18')]);router['post']('/',auth[_0xd429('0xb')](),controller[_0xd429('0x19')]);router[_0xd429('0x1a')]('/:id/vidaoo',auth['isAuthenticated'](),controller[_0xd429('0x1b')]);var upload=multer({'storage':multer['diskStorage']({'destination':function(_0x5e5ca9,_0xf9fb10,_0x233f32){_0x233f32(null,path['join'](config[_0xd429('0x1c')],_0xd429('0x1d')));},'filename':function(_0x5d2c08,_0x1d1866,_0x13b5f1){_0x13b5f1(null,util[_0xd429('0x1e')](_0xd429('0x1f'),Date[_0xd429('0x20')](),_0x1d1866[_0xd429('0x21')]['replace'](/[+@&\/\\#,+()$~%'":*?<>{}\s\\|]/g,'-')));}})});router[_0xd429('0x1a')](_0xd429('0x22'),upload[_0xd429('0x23')](_0xd429('0x24')),controller[_0xd429('0x25')]);router[_0xd429('0x1a')](_0xd429('0x13'),auth[_0xd429('0x10')](),controller[_0xd429('0x26')]);router[_0xd429('0x1a')]('/:id/tags',auth[_0xd429('0xb')](),interaction[_0xd429('0x27')](_0xd429('0x28'),_0xd429('0x29')),controller[_0xd429('0x2a')]);router['put'](_0xd429('0xf'),auth[_0xd429('0xb')](),interaction[_0xd429('0x27')](_0xd429('0x28'),'chatinteraction:update'),controller[_0xd429('0x2b')]);router['put'](_0xd429('0x2c'),controller[_0xd429('0x2d')]);router[_0xd429('0x2e')](_0xd429('0x2f'),auth[_0xd429('0x10')](),controller[_0xd429('0x30')]);router['put'](_0xd429('0x31'),controller[_0xd429('0x32')]);router['delete'](_0xd429('0xf'),auth['isAuthenticated'](),interaction[_0xd429('0x27')]('chat',_0xd429('0x33')),controller[_0xd429('0x34')]);router[_0xd429('0x35')]('/:id/tags',auth['isAuthenticated'](),controller['removeTags']);module['exports']=router; \ No newline at end of file diff --git a/server/api/chatInternalMessage/chatInternalMessage.attributes.js b/server/api/chatInternalMessage/chatInternalMessage.attributes.js index 9950598..7105f75 100644 --- a/server/api/chatInternalMessage/chatInternalMessage.attributes.js +++ b/server/api/chatInternalMessage/chatInternalMessage.attributes.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x40ca=['medium','BOOLEAN','INTEGER','sequelize','exports'];(function(_0xbf09ab,_0x251a19){var _0x2a9aef=function(_0x22d793){while(--_0x22d793){_0xbf09ab['push'](_0xbf09ab['shift']());}};_0x2a9aef(++_0x251a19);}(_0x40ca,0xdf));var _0xa40c=function(_0x1facfa,_0x1acf7d){_0x1facfa=_0x1facfa-0x0;var _0x9ec701=_0x40ca[_0x1facfa];return _0x9ec701;};'use strict';var Sequelize=require(_0xa40c('0x0'));module[_0xa40c('0x1')]={'body':{'type':Sequelize['TEXT'](_0xa40c('0x2')),'allowNull':![]},'read':{'type':Sequelize[_0xa40c('0x3')],'defaultValue':![]},'ChatInternalMessageId':{'type':Sequelize[_0xa40c('0x4')]}}; \ No newline at end of file +var _0x25ed=['medium','INTEGER','sequelize','exports','TEXT'];(function(_0x1bb4bb,_0x59d00a){var _0x162e95=function(_0x23a302){while(--_0x23a302){_0x1bb4bb['push'](_0x1bb4bb['shift']());}};_0x162e95(++_0x59d00a);}(_0x25ed,0xf2));var _0xd25e=function(_0x207061,_0xe38cda){_0x207061=_0x207061-0x0;var _0x4a2833=_0x25ed[_0x207061];return _0x4a2833;};'use strict';var Sequelize=require(_0xd25e('0x0'));module[_0xd25e('0x1')]={'body':{'type':Sequelize[_0xd25e('0x2')](_0xd25e('0x3')),'allowNull':![]},'read':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'ChatInternalMessageId':{'type':Sequelize[_0xd25e('0x4')]}}; \ No newline at end of file diff --git a/server/api/chatInternalMessage/chatInternalMessage.controller.js b/server/api/chatInternalMessage/chatInternalMessage.controller.js index ce6f688..4aacfc5 100644 --- a/server/api/chatInternalMessage/chatInternalMessage.controller.js +++ b/server/api/chatInternalMessage/chatInternalMessage.controller.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x981a=['sort','where','merge','type','VIRTUAL','filter','options','include','rows','params','includeAll','find','catch','create','body','describe','get','messages','lastMessageAt','createdAt','lastMessage','format','YYYY-MM-DD\x20HH:mm:ss','getUsers','agent','user','fullname','role','internal','lastLoginAt','allowmessenger','showWebBar','VoiceQueue','Unable\x20to\x20retrieve\x20the\x20current\x20user','Agents','userProfileId','autoAssociation','findAll','isEmpty','resourceId','push','FromId','ToId','all','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','to-csv','ejs','squel','desk.js','querystring','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/license/util','../../mysqldb','defaults','redis','localhost','socket.io-emitter','./chatInternalMessage.socket','register','status','end','json','offset','undefined','count','Content-Range','update','then','destroy','error','name','map','ChatInternalMessage','rawAttributes','fieldName','key','model','query','keys','filters','intersection','attributes','fields','length','hasOwnProperty','nolimit','limit','order'];(function(_0x273c39,_0x1052e6){var _0x46d6b5=function(_0x44f1fb){while(--_0x44f1fb){_0x273c39['push'](_0x273c39['shift']());}};_0x46d6b5(++_0x1052e6);}(_0x981a,0xf6));var _0xa981=function(_0x48e124,_0x363e4a){_0x48e124=_0x48e124-0x0;var _0x318b91=_0x981a[_0x48e124];return _0x318b91;};'use strict';var emlformat=require(_0xa981('0x0'));var rimraf=require(_0xa981('0x1'));var zipdir=require(_0xa981('0x2'));var jsonpatch=require(_0xa981('0x3'));var rp=require(_0xa981('0x4'));var moment=require(_0xa981('0x5'));var BPromise=require(_0xa981('0x6'));var Mustache=require(_0xa981('0x7'));var util=require('util');var path=require('path');var sox=require('sox');var csv=require(_0xa981('0x8'));var ejs=require(_0xa981('0x9'));var fs=require('fs');var fs_extra=require('fs-extra');var _=require('lodash');var squel=require(_0xa981('0xa'));var crypto=require('crypto');var jsforce=require('jsforce');var deskjs=require(_0xa981('0xb'));var toCsv=require(_0xa981('0x8'));var querystring=require(_0xa981('0xc'));var Papa=require('papaparse');var Redis=require(_0xa981('0xd'));var authService=require(_0xa981('0xe'));var qs=require(_0xa981('0xf'));var as=require(_0xa981('0x10'));var hardwareService=require(_0xa981('0x11'));var logger=require(_0xa981('0x12'))(_0xa981('0x13'));var utils=require('../../config/utils');var config=require('../../config/environment');var licenseUtil=require(_0xa981('0x14'));var db=require(_0xa981('0x15'))['db'];config['redis']=_[_0xa981('0x16')](config[_0xa981('0x17')],{'host':_0xa981('0x18'),'port':0x18eb});var socket=require(_0xa981('0x19'))(new Redis(config[_0xa981('0x17')]));require(_0xa981('0x1a'))[_0xa981('0x1b')](socket);function respondWithStatusCode(_0x48199c,_0x4b1416){_0x4b1416=_0x4b1416||0xcc;return function(_0x10c818){if(_0x10c818){return _0x48199c['sendStatus'](_0x4b1416);}return _0x48199c[_0xa981('0x1c')](_0x4b1416)[_0xa981('0x1d')]();};}function respondWithResult(_0x1f5ee7,_0x4d5fc4){_0x4d5fc4=_0x4d5fc4||0xc8;return function(_0x9eb869){if(_0x9eb869){return _0x1f5ee7[_0xa981('0x1c')](_0x4d5fc4)[_0xa981('0x1e')](_0x9eb869);}};}function respondWithFilteredResult(_0x537115,_0x4412c7){return function(_0x1d7c1d){if(_0x1d7c1d){var _0x3f1699=typeof _0x4412c7[_0xa981('0x1f')]===_0xa981('0x20')&&typeof _0x4412c7['limit']===_0xa981('0x20');var _0x16896b=_0x1d7c1d['count'];var _0x5c53fa=_0x3f1699?0x0:_0x4412c7['offset'];var _0x2544c6=_0x3f1699?_0x1d7c1d[_0xa981('0x21')]:_0x4412c7['offset']+_0x4412c7['limit'];var _0x3b5bf4;if(_0x2544c6>=_0x16896b){_0x2544c6=_0x16896b;_0x3b5bf4=0xc8;}else{_0x3b5bf4=0xce;}_0x537115[_0xa981('0x1c')](_0x3b5bf4);return _0x537115['set'](_0xa981('0x22'),_0x5c53fa+'-'+_0x2544c6+'/'+_0x16896b)[_0xa981('0x1e')](_0x1d7c1d);}return null;};}function patchUpdates(_0x4bf966){return function(_0x199d99){try{jsonpatch['apply'](_0x199d99,_0x4bf966,!![]);}catch(_0x408143){return BPromise['reject'](_0x408143);}return _0x199d99['save']();};}function saveUpdates(_0x34051d,_0x32e512){return function(_0x10fb16){if(_0x10fb16){return _0x10fb16[_0xa981('0x23')](_0x34051d)[_0xa981('0x24')](function(_0x30362e){return _0x30362e;});}return null;};}function removeEntity(_0x4552eb,_0xc7c4e){return function(_0x2e6279){if(_0x2e6279){return _0x2e6279[_0xa981('0x25')]()[_0xa981('0x24')](function(){_0x4552eb['status'](0xcc)[_0xa981('0x1d')]();});}};}function handleEntityNotFound(_0x4443d1,_0x5993ad){return function(_0x218103){if(!_0x218103){_0x4443d1['sendStatus'](0x194);}return _0x218103;};}function handleError(_0x35ec2d,_0xeddecc){_0xeddecc=_0xeddecc||0x1f4;return function(_0x189d15){logger[_0xa981('0x26')](_0x189d15['stack']);if(_0x189d15[_0xa981('0x27')]){delete _0x189d15[_0xa981('0x27')];}_0x35ec2d['status'](_0xeddecc)['send'](_0x189d15);};}exports['index']=function(_0x2efd99,_0x235c7e){var _0x19fc8b={},_0x484759={},_0x1b22d2={'count':0x0,'rows':[]};var _0x136ab9=_[_0xa981('0x28')](db[_0xa981('0x29')][_0xa981('0x2a')],function(_0x5c9370){return{'name':_0x5c9370[_0xa981('0x2b')],'type':_0x5c9370['type'][_0xa981('0x2c')]};});_0x484759[_0xa981('0x2d')]=_[_0xa981('0x28')](_0x136ab9,_0xa981('0x27'));_0x484759[_0xa981('0x2e')]=_[_0xa981('0x2f')](_0x2efd99[_0xa981('0x2e')]);_0x484759[_0xa981('0x30')]=_[_0xa981('0x31')](_0x484759[_0xa981('0x2d')],_0x484759[_0xa981('0x2e')]);_0x19fc8b[_0xa981('0x32')]=_[_0xa981('0x31')](_0x484759[_0xa981('0x2d')],qs['fields'](_0x2efd99[_0xa981('0x2e')][_0xa981('0x33')]));_0x19fc8b[_0xa981('0x32')]=_0x19fc8b[_0xa981('0x32')][_0xa981('0x34')]?_0x19fc8b['attributes']:_0x484759[_0xa981('0x2d')];if(!_0x2efd99[_0xa981('0x2e')][_0xa981('0x35')](_0xa981('0x36'))){_0x19fc8b[_0xa981('0x37')]=qs[_0xa981('0x37')](_0x2efd99[_0xa981('0x2e')][_0xa981('0x37')]);_0x19fc8b[_0xa981('0x1f')]=qs[_0xa981('0x1f')](_0x2efd99['query']['offset']);}_0x19fc8b[_0xa981('0x38')]=qs[_0xa981('0x39')](_0x2efd99['query'][_0xa981('0x39')]);_0x19fc8b[_0xa981('0x3a')]=qs[_0xa981('0x30')](_['pick'](_0x2efd99['query'],_0x484759[_0xa981('0x30')]),_0x136ab9);if(_0x2efd99[_0xa981('0x2e')]['filter']){_0x19fc8b[_0xa981('0x3a')]=_[_0xa981('0x3b')](_0x19fc8b[_0xa981('0x3a')],{'$or':_[_0xa981('0x28')](_0x136ab9,function(_0x3f96da){if(_0x3f96da[_0xa981('0x3c')]!==_0xa981('0x3d')){var _0x5e16b4={};_0x5e16b4[_0x3f96da[_0xa981('0x27')]]={'$like':'%'+_0x2efd99[_0xa981('0x2e')][_0xa981('0x3e')]+'%'};return _0x5e16b4;}})});}_0x19fc8b=_[_0xa981('0x3b')]({},_0x19fc8b,_0x2efd99[_0xa981('0x3f')]);var _0x2f7961={'where':_0x19fc8b[_0xa981('0x3a')]};return db[_0xa981('0x29')][_0xa981('0x21')](_0x2f7961)[_0xa981('0x24')](function(_0x3f29b3){_0x1b22d2[_0xa981('0x21')]=_0x3f29b3;if(_0x2efd99[_0xa981('0x2e')]['includeAll']){_0x19fc8b[_0xa981('0x40')]=[{'all':!![]}];}return db[_0xa981('0x29')]['findAll'](_0x19fc8b);})[_0xa981('0x24')](function(_0x25a893){_0x1b22d2[_0xa981('0x41')]=_0x25a893;return _0x1b22d2;})[_0xa981('0x24')](respondWithFilteredResult(_0x235c7e,_0x19fc8b))['catch'](handleError(_0x235c7e,null));};exports['show']=function(_0x424a49,_0x1f1b1b){var _0x134d80={'raw':!![],'where':{'id':_0x424a49[_0xa981('0x42')]['id']}},_0xd18429={};_0xd18429['model']=_[_0xa981('0x2f')](db['ChatInternalMessage'][_0xa981('0x2a')]);_0xd18429[_0xa981('0x2e')]=_[_0xa981('0x2f')](_0x424a49[_0xa981('0x2e')]);_0xd18429[_0xa981('0x30')]=_['intersection'](_0xd18429[_0xa981('0x2d')],_0xd18429[_0xa981('0x2e')]);_0x134d80['attributes']=_[_0xa981('0x31')](_0xd18429[_0xa981('0x2d')],qs['fields'](_0x424a49['query'][_0xa981('0x33')]));_0x134d80[_0xa981('0x32')]=_0x134d80[_0xa981('0x32')][_0xa981('0x34')]?_0x134d80[_0xa981('0x32')]:_0xd18429[_0xa981('0x2d')];if(_0x424a49['query'][_0xa981('0x43')]){_0x134d80[_0xa981('0x40')]=[{'all':!![]}];}_0x134d80=_[_0xa981('0x3b')]({},_0x134d80,_0x424a49[_0xa981('0x3f')]);return db[_0xa981('0x29')][_0xa981('0x44')](_0x134d80)['then'](handleEntityNotFound(_0x1f1b1b,null))[_0xa981('0x24')](respondWithResult(_0x1f1b1b,null))[_0xa981('0x45')](handleError(_0x1f1b1b,null));};exports[_0xa981('0x46')]=function(_0x4617a0,_0x4dbded){return db[_0xa981('0x29')][_0xa981('0x46')](_0x4617a0[_0xa981('0x47')],{})[_0xa981('0x24')](respondWithResult(_0x4dbded,0xc9))[_0xa981('0x45')](handleError(_0x4dbded,null));};exports[_0xa981('0x23')]=function(_0x17a1ca,_0x29843e){if(_0x17a1ca['body']['id']){delete _0x17a1ca[_0xa981('0x47')]['id'];}return db[_0xa981('0x29')][_0xa981('0x44')]({'where':{'id':_0x17a1ca['params']['id']}})[_0xa981('0x24')](handleEntityNotFound(_0x29843e,null))['then'](saveUpdates(_0x17a1ca[_0xa981('0x47')],null))[_0xa981('0x24')](respondWithResult(_0x29843e,null))[_0xa981('0x45')](handleError(_0x29843e,null));};exports[_0xa981('0x25')]=function(_0x4668ca,_0xa21a06){return db['ChatInternalMessage'][_0xa981('0x44')]({'where':{'id':_0x4668ca[_0xa981('0x42')]['id']}})[_0xa981('0x24')](handleEntityNotFound(_0xa21a06,null))[_0xa981('0x24')](removeEntity(_0xa21a06,null))[_0xa981('0x45')](handleError(_0xa21a06,null));};exports[_0xa981('0x48')]=function(_0x21211d,_0x211dbd){return db['ChatInternalMessage'][_0xa981('0x48')]()[_0xa981('0x24')](respondWithResult(_0x211dbd,null))['catch'](handleError(_0x211dbd,null));};function wrapUser(_0x356fac){return function(_0x1393dd){var _0x14e8bd=_0x356fac[_0xa981('0x49')]({'plain':!![]});_0x14e8bd[_0xa981('0x4a')]=[];if(_0x1393dd){_0x14e8bd[_0xa981('0x4b')]=_0x1393dd[_0xa981('0x4c')];_0x14e8bd[_0xa981('0x4d')]=_0x1393dd;}else{_0x14e8bd['lastMessageAt']=moment(0x0)[_0xa981('0x4e')](_0xa981('0x4f'));_0x14e8bd[_0xa981('0x4d')]={};}return _0x14e8bd;};}exports[_0xa981('0x50')]=function(_0x48d840,_0x4c47f4,_0x16555b){var _0x4ac82c=[];return db['User']['findAll']({'where':{'role':[_0xa981('0x51'),'admin',_0xa981('0x52')]},'attributes':['id',_0xa981('0x53'),_0xa981('0x27'),_0xa981('0x54'),'userpic',_0xa981('0x55'),'online',_0xa981('0x56'),_0xa981('0x57'),_0xa981('0x58')],'order':qs['sort']('-online'),'include':[{'model':db[_0xa981('0x59')],'as':'VoiceQueues','attributes':['id',_0xa981('0x27'),_0xa981('0x3c')],'through':{'attributes':[]}}]})[_0xa981('0x24')](function(_0x34b6fa){if(_0x34b6fa){var _0x4fccb7=_0x48d840['user'][_0xa981('0x49')]({'plain':!![]});if(!_0x4fccb7)throw new Error(_0xa981('0x5a'));if(_0x4fccb7['role']==='user'){return db['UserProfileSection'][_0xa981('0x44')]({'where':{'name':_0xa981('0x5b'),'userProfileId':_0x4fccb7[_0xa981('0x5c')]},'raw':!![]})[_0xa981('0x24')](function(_0x5567d8){if(_0x5567d8){if(_0x5567d8[_0xa981('0x5d')]===0x0){return db['UserProfileResource'][_0xa981('0x5e')]({'where':{'sectionId':_0x5567d8['id']},'raw':!![]})[_0xa981('0x24')](function(_0x340c7f){var _0x343cdb=[];if(_[_0xa981('0x5f')](_0x340c7f)){_0x343cdb=_['filter'](_0x34b6fa,function(_0x2b7cc8){if(_0x2b7cc8['role']!=='agent'){return _0x2b7cc8;}});return _0x343cdb;}else{for(var _0x1cfd29=0x0;_0x1cfd29<_0x34b6fa['length'];_0x1cfd29++){var _0x36c116=_0x34b6fa[_0x1cfd29];if(_0x36c116[_0xa981('0x54')]===_0xa981('0x51')){var _0x2d3f12=_['find'](_0x340c7f,function(_0x497ace){return _0x497ace[_0xa981('0x60')]===_0x36c116['id'];});if(_0x2d3f12)_0x343cdb[_0xa981('0x61')](_0x36c116);}else{_0x343cdb[_0xa981('0x61')](_0x36c116);}}return _0x343cdb;}});}else{return _0x34b6fa;}}else{var _0x196c85=_[_0xa981('0x3e')](_0x34b6fa,function(_0x5cfeb4){if(_0x5cfeb4[_0xa981('0x54')]!==_0xa981('0x51')){return _0x5cfeb4;}});return _0x196c85;}});}else{return _0x34b6fa;}}})[_0xa981('0x24')](function(_0x5b01e2){var _0x4369c1=[];if(_0x5b01e2){_0x4ac82c=_0x5b01e2;for(var _0x35459d=0x0;_0x35459d<_0x5b01e2['length'];_0x35459d+=0x1){_0x4ac82c[_0x35459d][_0xa981('0x4a')]=[];_0x4369c1['push'](db[_0xa981('0x29')][_0xa981('0x44')]({'where':{'FromId':[_0x48d840[_0xa981('0x52')]['id'],_0x5b01e2[_0x35459d]['id']],'ToId':[_0x48d840[_0xa981('0x52')]['id'],_0x5b01e2[_0x35459d]['id']],'ChatGroupId':null},'attributes':['id',_0xa981('0x4c'),_0xa981('0x62'),_0xa981('0x63'),'read','body'],'order':qs[_0xa981('0x39')]('-createdAt'),'limit':0x1,'offset':0x0,'raw':!![]})['then'](wrapUser(_0x5b01e2[_0x35459d])));}return BPromise[_0xa981('0x64')](_0x4369c1);}return[];})[_0xa981('0x24')](function(_0x4efcf0){return{'rows':_0x4efcf0,'count':_0x4efcf0[_0xa981('0x34')]};})['then'](respondWithResult(_0x4c47f4,null))[_0xa981('0x45')](handleError(_0x4c47f4,null));}; \ No newline at end of file +var _0xf95d=['agent','admin','user','fullname','role','userpic','internal','online','showWebBar','sort','-online','VoiceQueue','VoiceQueues','Unable\x20to\x20retrieve\x20the\x20current\x20user','UserProfileSection','autoAssociation','isEmpty','resourceId','push','FromId','ToId','read','-createdAt','all','eml-format','rimraf','bluebird','mustache','util','path','sox','to-csv','ejs','fs-extra','lodash','crypto','jsforce','desk.js','ioredis','../../components/auth/service','../../components/parsers/qs','../../config/license/hardware','../../config/logger','api','../../config/environment','../../mysqldb','redis','defaults','localhost','socket.io-emitter','register','sendStatus','status','end','json','undefined','limit','count','Content-Range','reject','save','then','error','name','send','index','map','ChatInternalMessage','rawAttributes','type','key','model','query','keys','intersection','attributes','fields','hasOwnProperty','nolimit','offset','order','where','filters','filter','merge','VIRTUAL','includeAll','include','findAll','rows','catch','show','params','length','find','create','body','update','destroy','describe','get','messages','lastMessageAt','createdAt','lastMessage','format','User'];(function(_0x49897a,_0x4b97a9){var _0x366826=function(_0x5b11db){while(--_0x5b11db){_0x49897a['push'](_0x49897a['shift']());}};_0x366826(++_0x4b97a9);}(_0xf95d,0x83));var _0xdf95=function(_0x5f309e,_0x66e31){_0x5f309e=_0x5f309e-0x0;var _0x487b5e=_0xf95d[_0x5f309e];return _0x487b5e;};'use strict';var emlformat=require(_0xdf95('0x0'));var rimraf=require(_0xdf95('0x1'));var zipdir=require('zip-dir');var jsonpatch=require('fast-json-patch');var rp=require('request-promise');var moment=require('moment');var BPromise=require(_0xdf95('0x2'));var Mustache=require(_0xdf95('0x3'));var util=require(_0xdf95('0x4'));var path=require(_0xdf95('0x5'));var sox=require(_0xdf95('0x6'));var csv=require(_0xdf95('0x7'));var ejs=require(_0xdf95('0x8'));var fs=require('fs');var fs_extra=require(_0xdf95('0x9'));var _=require(_0xdf95('0xa'));var squel=require('squel');var crypto=require(_0xdf95('0xb'));var jsforce=require(_0xdf95('0xc'));var deskjs=require(_0xdf95('0xd'));var toCsv=require(_0xdf95('0x7'));var querystring=require('querystring');var Papa=require('papaparse');var Redis=require(_0xdf95('0xe'));var authService=require(_0xdf95('0xf'));var qs=require(_0xdf95('0x10'));var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0xdf95('0x11'));var logger=require(_0xdf95('0x12'))(_0xdf95('0x13'));var utils=require('../../config/utils');var config=require(_0xdf95('0x14'));var licenseUtil=require('../../config/license/util');var db=require(_0xdf95('0x15'))['db'];config[_0xdf95('0x16')]=_[_0xdf95('0x17')](config[_0xdf95('0x16')],{'host':_0xdf95('0x18'),'port':0x18eb});var socket=require(_0xdf95('0x19'))(new Redis(config[_0xdf95('0x16')]));require('./chatInternalMessage.socket')[_0xdf95('0x1a')](socket);function respondWithStatusCode(_0x2e98d8,_0x36f928){_0x36f928=_0x36f928||0xcc;return function(_0x55e39e){if(_0x55e39e){return _0x2e98d8[_0xdf95('0x1b')](_0x36f928);}return _0x2e98d8[_0xdf95('0x1c')](_0x36f928)[_0xdf95('0x1d')]();};}function respondWithResult(_0x5ac227,_0x28f561){_0x28f561=_0x28f561||0xc8;return function(_0x2a8d38){if(_0x2a8d38){return _0x5ac227[_0xdf95('0x1c')](_0x28f561)[_0xdf95('0x1e')](_0x2a8d38);}};}function respondWithFilteredResult(_0x329533,_0x2450aa){return function(_0x537df8){if(_0x537df8){var _0xc24b8e=typeof _0x2450aa['offset']===_0xdf95('0x1f')&&typeof _0x2450aa[_0xdf95('0x20')]===_0xdf95('0x1f');var _0x1444f3=_0x537df8[_0xdf95('0x21')];var _0x3d9293=_0xc24b8e?0x0:_0x2450aa['offset'];var _0x1ffe86=_0xc24b8e?_0x537df8[_0xdf95('0x21')]:_0x2450aa['offset']+_0x2450aa[_0xdf95('0x20')];var _0x2fbb4d;if(_0x1ffe86>=_0x1444f3){_0x1ffe86=_0x1444f3;_0x2fbb4d=0xc8;}else{_0x2fbb4d=0xce;}_0x329533[_0xdf95('0x1c')](_0x2fbb4d);return _0x329533['set'](_0xdf95('0x22'),_0x3d9293+'-'+_0x1ffe86+'/'+_0x1444f3)[_0xdf95('0x1e')](_0x537df8);}return null;};}function patchUpdates(_0x3a82f2){return function(_0x3deb33){try{jsonpatch['apply'](_0x3deb33,_0x3a82f2,!![]);}catch(_0x294e78){return BPromise[_0xdf95('0x23')](_0x294e78);}return _0x3deb33[_0xdf95('0x24')]();};}function saveUpdates(_0x5c6045,_0xee9541){return function(_0x447bfe){if(_0x447bfe){return _0x447bfe['update'](_0x5c6045)[_0xdf95('0x25')](function(_0x4a8ed2){return _0x4a8ed2;});}return null;};}function removeEntity(_0x22bcc8,_0x5b4dcc){return function(_0x5db3ca){if(_0x5db3ca){return _0x5db3ca['destroy']()[_0xdf95('0x25')](function(){_0x22bcc8[_0xdf95('0x1c')](0xcc)['end']();});}};}function handleEntityNotFound(_0x265de9,_0x40deda){return function(_0x18cbc8){if(!_0x18cbc8){_0x265de9[_0xdf95('0x1b')](0x194);}return _0x18cbc8;};}function handleError(_0x1ece8,_0x433a66){_0x433a66=_0x433a66||0x1f4;return function(_0x43d6f6){logger[_0xdf95('0x26')](_0x43d6f6['stack']);if(_0x43d6f6['name']){delete _0x43d6f6[_0xdf95('0x27')];}_0x1ece8[_0xdf95('0x1c')](_0x433a66)[_0xdf95('0x28')](_0x43d6f6);};}exports[_0xdf95('0x29')]=function(_0x839138,_0x56899e){var _0xe92de9={},_0x43be6d={},_0x198aa9={'count':0x0,'rows':[]};var _0x29b831=_[_0xdf95('0x2a')](db[_0xdf95('0x2b')][_0xdf95('0x2c')],function(_0x5318c9){return{'name':_0x5318c9['fieldName'],'type':_0x5318c9[_0xdf95('0x2d')][_0xdf95('0x2e')]};});_0x43be6d[_0xdf95('0x2f')]=_[_0xdf95('0x2a')](_0x29b831,'name');_0x43be6d[_0xdf95('0x30')]=_[_0xdf95('0x31')](_0x839138['query']);_0x43be6d['filters']=_[_0xdf95('0x32')](_0x43be6d[_0xdf95('0x2f')],_0x43be6d[_0xdf95('0x30')]);_0xe92de9[_0xdf95('0x33')]=_['intersection'](_0x43be6d[_0xdf95('0x2f')],qs[_0xdf95('0x34')](_0x839138[_0xdf95('0x30')][_0xdf95('0x34')]));_0xe92de9[_0xdf95('0x33')]=_0xe92de9[_0xdf95('0x33')]['length']?_0xe92de9[_0xdf95('0x33')]:_0x43be6d[_0xdf95('0x2f')];if(!_0x839138[_0xdf95('0x30')][_0xdf95('0x35')](_0xdf95('0x36'))){_0xe92de9[_0xdf95('0x20')]=qs[_0xdf95('0x20')](_0x839138[_0xdf95('0x30')]['limit']);_0xe92de9[_0xdf95('0x37')]=qs[_0xdf95('0x37')](_0x839138['query'][_0xdf95('0x37')]);}_0xe92de9[_0xdf95('0x38')]=qs['sort'](_0x839138[_0xdf95('0x30')]['sort']);_0xe92de9[_0xdf95('0x39')]=qs['filters'](_['pick'](_0x839138[_0xdf95('0x30')],_0x43be6d[_0xdf95('0x3a')]),_0x29b831);if(_0x839138[_0xdf95('0x30')][_0xdf95('0x3b')]){_0xe92de9['where']=_[_0xdf95('0x3c')](_0xe92de9[_0xdf95('0x39')],{'$or':_['map'](_0x29b831,function(_0x5aa31c){if(_0x5aa31c[_0xdf95('0x2d')]!==_0xdf95('0x3d')){var _0x42254e={};_0x42254e[_0x5aa31c[_0xdf95('0x27')]]={'$like':'%'+_0x839138[_0xdf95('0x30')][_0xdf95('0x3b')]+'%'};return _0x42254e;}})});}_0xe92de9=_[_0xdf95('0x3c')]({},_0xe92de9,_0x839138['options']);var _0x17f9bc={'where':_0xe92de9['where']};return db[_0xdf95('0x2b')][_0xdf95('0x21')](_0x17f9bc)[_0xdf95('0x25')](function(_0x28e32f){_0x198aa9[_0xdf95('0x21')]=_0x28e32f;if(_0x839138[_0xdf95('0x30')][_0xdf95('0x3e')]){_0xe92de9[_0xdf95('0x3f')]=[{'all':!![]}];}return db[_0xdf95('0x2b')][_0xdf95('0x40')](_0xe92de9);})[_0xdf95('0x25')](function(_0x346c57){_0x198aa9[_0xdf95('0x41')]=_0x346c57;return _0x198aa9;})[_0xdf95('0x25')](respondWithFilteredResult(_0x56899e,_0xe92de9))[_0xdf95('0x42')](handleError(_0x56899e,null));};exports[_0xdf95('0x43')]=function(_0x5f8849,_0x307166){var _0x851418={'raw':!![],'where':{'id':_0x5f8849[_0xdf95('0x44')]['id']}},_0x3252f3={};_0x3252f3['model']=_[_0xdf95('0x31')](db['ChatInternalMessage'][_0xdf95('0x2c')]);_0x3252f3[_0xdf95('0x30')]=_[_0xdf95('0x31')](_0x5f8849[_0xdf95('0x30')]);_0x3252f3[_0xdf95('0x3a')]=_[_0xdf95('0x32')](_0x3252f3[_0xdf95('0x2f')],_0x3252f3['query']);_0x851418[_0xdf95('0x33')]=_[_0xdf95('0x32')](_0x3252f3[_0xdf95('0x2f')],qs[_0xdf95('0x34')](_0x5f8849[_0xdf95('0x30')][_0xdf95('0x34')]));_0x851418[_0xdf95('0x33')]=_0x851418[_0xdf95('0x33')][_0xdf95('0x45')]?_0x851418[_0xdf95('0x33')]:_0x3252f3[_0xdf95('0x2f')];if(_0x5f8849[_0xdf95('0x30')][_0xdf95('0x3e')]){_0x851418[_0xdf95('0x3f')]=[{'all':!![]}];}_0x851418=_[_0xdf95('0x3c')]({},_0x851418,_0x5f8849['options']);return db[_0xdf95('0x2b')][_0xdf95('0x46')](_0x851418)['then'](handleEntityNotFound(_0x307166,null))[_0xdf95('0x25')](respondWithResult(_0x307166,null))[_0xdf95('0x42')](handleError(_0x307166,null));};exports[_0xdf95('0x47')]=function(_0x537c1f,_0x15d57e){return db[_0xdf95('0x2b')][_0xdf95('0x47')](_0x537c1f[_0xdf95('0x48')],{})[_0xdf95('0x25')](respondWithResult(_0x15d57e,0xc9))['catch'](handleError(_0x15d57e,null));};exports[_0xdf95('0x49')]=function(_0x51ec3d,_0x406181){if(_0x51ec3d[_0xdf95('0x48')]['id']){delete _0x51ec3d[_0xdf95('0x48')]['id'];}return db['ChatInternalMessage']['find']({'where':{'id':_0x51ec3d[_0xdf95('0x44')]['id']}})[_0xdf95('0x25')](handleEntityNotFound(_0x406181,null))['then'](saveUpdates(_0x51ec3d['body'],null))[_0xdf95('0x25')](respondWithResult(_0x406181,null))[_0xdf95('0x42')](handleError(_0x406181,null));};exports[_0xdf95('0x4a')]=function(_0x5a02f4,_0x4be564){return db[_0xdf95('0x2b')][_0xdf95('0x46')]({'where':{'id':_0x5a02f4[_0xdf95('0x44')]['id']}})[_0xdf95('0x25')](handleEntityNotFound(_0x4be564,null))[_0xdf95('0x25')](removeEntity(_0x4be564,null))[_0xdf95('0x42')](handleError(_0x4be564,null));};exports[_0xdf95('0x4b')]=function(_0x7cedf4,_0x529438){return db[_0xdf95('0x2b')]['describe']()[_0xdf95('0x25')](respondWithResult(_0x529438,null))['catch'](handleError(_0x529438,null));};function wrapUser(_0x4a6130){return function(_0x694b37){var _0x2343df=_0x4a6130[_0xdf95('0x4c')]({'plain':!![]});_0x2343df[_0xdf95('0x4d')]=[];if(_0x694b37){_0x2343df[_0xdf95('0x4e')]=_0x694b37[_0xdf95('0x4f')];_0x2343df[_0xdf95('0x50')]=_0x694b37;}else{_0x2343df['lastMessageAt']=moment(0x0)[_0xdf95('0x51')]('YYYY-MM-DD\x20HH:mm:ss');_0x2343df[_0xdf95('0x50')]={};}return _0x2343df;};}exports['getUsers']=function(_0xd4644c,_0x5d284b,_0x202edc){var _0x4fbed6=[];return db[_0xdf95('0x52')][_0xdf95('0x40')]({'where':{'role':[_0xdf95('0x53'),_0xdf95('0x54'),_0xdf95('0x55')]},'attributes':['id',_0xdf95('0x56'),_0xdf95('0x27'),_0xdf95('0x57'),_0xdf95('0x58'),_0xdf95('0x59'),_0xdf95('0x5a'),'lastLoginAt','allowmessenger',_0xdf95('0x5b')],'order':qs[_0xdf95('0x5c')](_0xdf95('0x5d')),'include':[{'model':db[_0xdf95('0x5e')],'as':_0xdf95('0x5f'),'attributes':['id',_0xdf95('0x27'),_0xdf95('0x2d')],'through':{'attributes':[]}}]})[_0xdf95('0x25')](function(_0xafb799){if(_0xafb799){var _0x536f27=_0xd4644c[_0xdf95('0x55')]['get']({'plain':!![]});if(!_0x536f27)throw new Error(_0xdf95('0x60'));if(_0x536f27[_0xdf95('0x57')]===_0xdf95('0x55')){return db[_0xdf95('0x61')]['find']({'where':{'name':'Agents','userProfileId':_0x536f27['userProfileId']},'raw':!![]})[_0xdf95('0x25')](function(_0x22d7fd){if(_0x22d7fd){if(_0x22d7fd[_0xdf95('0x62')]===0x0){return db['UserProfileResource']['findAll']({'where':{'sectionId':_0x22d7fd['id']},'raw':!![]})['then'](function(_0x2f8984){var _0x186d6c=[];if(_[_0xdf95('0x63')](_0x2f8984)){_0x186d6c=_['filter'](_0xafb799,function(_0x1808a2){if(_0x1808a2[_0xdf95('0x57')]!=='agent'){return _0x1808a2;}});return _0x186d6c;}else{for(var _0x321fc5=0x0;_0x321fc5<_0xafb799[_0xdf95('0x45')];_0x321fc5++){var _0x461b59=_0xafb799[_0x321fc5];if(_0x461b59['role']==='agent'){var _0x4a489d=_[_0xdf95('0x46')](_0x2f8984,function(_0x17e854){return _0x17e854[_0xdf95('0x64')]===_0x461b59['id'];});if(_0x4a489d)_0x186d6c[_0xdf95('0x65')](_0x461b59);}else{_0x186d6c[_0xdf95('0x65')](_0x461b59);}}return _0x186d6c;}});}else{return _0xafb799;}}else{var _0x4ad655=_[_0xdf95('0x3b')](_0xafb799,function(_0x4852b6){if(_0x4852b6[_0xdf95('0x57')]!==_0xdf95('0x53')){return _0x4852b6;}});return _0x4ad655;}});}else{return _0xafb799;}}})['then'](function(_0x31bc30){var _0x444833=[];if(_0x31bc30){_0x4fbed6=_0x31bc30;for(var _0x2e0172=0x0;_0x2e0172<_0x31bc30[_0xdf95('0x45')];_0x2e0172+=0x1){_0x4fbed6[_0x2e0172]['messages']=[];_0x444833[_0xdf95('0x65')](db[_0xdf95('0x2b')][_0xdf95('0x46')]({'where':{'FromId':[_0xd4644c[_0xdf95('0x55')]['id'],_0x31bc30[_0x2e0172]['id']],'ToId':[_0xd4644c['user']['id'],_0x31bc30[_0x2e0172]['id']],'ChatGroupId':null},'attributes':['id','createdAt',_0xdf95('0x66'),_0xdf95('0x67'),_0xdf95('0x68'),_0xdf95('0x48')],'order':qs['sort'](_0xdf95('0x69')),'limit':0x1,'offset':0x0,'raw':!![]})[_0xdf95('0x25')](wrapUser(_0x31bc30[_0x2e0172])));}return BPromise[_0xdf95('0x6a')](_0x444833);}return[];})[_0xdf95('0x25')](function(_0x424d14){return{'rows':_0x424d14,'count':_0x424d14[_0xdf95('0x45')]};})['then'](respondWithResult(_0x5d284b,null))['catch'](handleError(_0x5d284b,null));}; \ No newline at end of file diff --git a/server/api/chatInternalMessage/chatInternalMessage.events.js b/server/api/chatInternalMessage/chatInternalMessage.events.js index 0c3e77a..ff6f50e 100644 --- a/server/api/chatInternalMessage/chatInternalMessage.events.js +++ b/server/api/chatInternalMessage/chatInternalMessage.events.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xafcd=['emit','hasOwnProperty','hook','events','../../mysqldb','ChatInternalMessage','setMaxListeners','save','update','remove'];(function(_0x138e3f,_0x57c7e9){var _0x10ec4a=function(_0x1c3ed5){while(--_0x1c3ed5){_0x138e3f['push'](_0x138e3f['shift']());}};_0x10ec4a(++_0x57c7e9);}(_0xafcd,0x157));var _0xdafc=function(_0x59fc7c,_0x1146f2){_0x59fc7c=_0x59fc7c-0x0;var _0x2653ff=_0xafcd[_0x59fc7c];return _0x2653ff;};'use strict';var EventEmitter=require(_0xdafc('0x0'));var ChatInternalMessage=require(_0xdafc('0x1'))['db'][_0xdafc('0x2')];var ChatInternalMessageEvents=new EventEmitter();ChatInternalMessageEvents[_0xdafc('0x3')](0x0);var events={'afterCreate':_0xdafc('0x4'),'afterUpdate':_0xdafc('0x5'),'afterDestroy':_0xdafc('0x6')};function emitEvent(_0x537496){return function(_0x145095,_0x54a63b,_0x26f3ae){ChatInternalMessageEvents['emit'](_0x537496+':'+_0x145095['id'],_0x145095);ChatInternalMessageEvents[_0xdafc('0x7')](_0x537496,_0x145095);_0x26f3ae(null);};}for(var e in events){if(events[_0xdafc('0x8')](e)){var event=events[e];ChatInternalMessage[_0xdafc('0x9')](e,emitEvent(event));}}module['exports']=ChatInternalMessageEvents; \ No newline at end of file +var _0x53d5=['setMaxListeners','save','update','remove','emit','exports','events'];(function(_0x2dafaf,_0x42711c){var _0x5e9b37=function(_0x4c6ae7){while(--_0x4c6ae7){_0x2dafaf['push'](_0x2dafaf['shift']());}};_0x5e9b37(++_0x42711c);}(_0x53d5,0x68));var _0x553d=function(_0x16ffe2,_0x2f73ed){_0x16ffe2=_0x16ffe2-0x0;var _0x4193e5=_0x53d5[_0x16ffe2];return _0x4193e5;};'use strict';var EventEmitter=require(_0x553d('0x0'));var ChatInternalMessage=require('../../mysqldb')['db']['ChatInternalMessage'];var ChatInternalMessageEvents=new EventEmitter();ChatInternalMessageEvents[_0x553d('0x1')](0x0);var events={'afterCreate':_0x553d('0x2'),'afterUpdate':_0x553d('0x3'),'afterDestroy':_0x553d('0x4')};function emitEvent(_0x124dc2){return function(_0x1da3ad,_0x38c3b5,_0x3b21a2){ChatInternalMessageEvents[_0x553d('0x5')](_0x124dc2+':'+_0x1da3ad['id'],_0x1da3ad);ChatInternalMessageEvents[_0x553d('0x5')](_0x124dc2,_0x1da3ad);_0x3b21a2(null);};}for(var e in events){if(events['hasOwnProperty'](e)){var event=events[e];ChatInternalMessage['hook'](e,emitEvent(event));}}module[_0x553d('0x6')]=ChatInternalMessageEvents; \ No newline at end of file diff --git a/server/api/chatInternalMessage/chatInternalMessage.model.js b/server/api/chatInternalMessage/chatInternalMessage.model.js index 3c1211e..89e5874 100644 --- a/server/api/chatInternalMessage/chatInternalMessage.model.js +++ b/server/api/chatInternalMessage/chatInternalMessage.model.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x12dc=['exports','define','ChatInternalMessage','utf8mb4','utf8mb4_unicode_ci','util','bluebird','path','rimraf','../../config/environment'];(function(_0x525f32,_0x42e307){var _0xcd07e4=function(_0x4b110c){while(--_0x4b110c){_0x525f32['push'](_0x525f32['shift']());}};_0xcd07e4(++_0x42e307);}(_0x12dc,0x16d));var _0xc12d=function(_0x34ea50,_0x577861){_0x34ea50=_0x34ea50-0x0;var _0x3cebf2=_0x12dc[_0x34ea50];return _0x3cebf2;};'use strict';var _=require('lodash');var util=require(_0xc12d('0x0'));var logger=require('../../config/logger')('api');var moment=require('moment');var BPromise=require(_0xc12d('0x1'));var rp=require('request-promise');var fs=require('fs');var path=require(_0xc12d('0x2'));var rimraf=require(_0xc12d('0x3'));var config=require(_0xc12d('0x4'));var attributes=require('./chatInternalMessage.attributes');module[_0xc12d('0x5')]=function(_0x2fb317,_0x53fb63){return _0x2fb317[_0xc12d('0x6')](_0xc12d('0x7'),attributes,{'tableName':'chat_internal_messages','paranoid':![],'indexes':[],'timestamps':!![],'charset':_0xc12d('0x8'),'collate':_0xc12d('0x9')});}; \ No newline at end of file +var _0xa72b=['utf8mb4','utf8mb4_unicode_ci','lodash','util','../../config/logger','api','moment','bluebird','request-promise','../../config/environment','./chatInternalMessage.attributes','exports','define','ChatInternalMessage','chat_internal_messages'];(function(_0x569756,_0x29a598){var _0x24f0f6=function(_0x458a1f){while(--_0x458a1f){_0x569756['push'](_0x569756['shift']());}};_0x24f0f6(++_0x29a598);}(_0xa72b,0x1d3));var _0xba72=function(_0x30c1dd,_0x23a13c){_0x30c1dd=_0x30c1dd-0x0;var _0x57dfaf=_0xa72b[_0x30c1dd];return _0x57dfaf;};'use strict';var _=require(_0xba72('0x0'));var util=require(_0xba72('0x1'));var logger=require(_0xba72('0x2'))(_0xba72('0x3'));var moment=require(_0xba72('0x4'));var BPromise=require(_0xba72('0x5'));var rp=require(_0xba72('0x6'));var fs=require('fs');var path=require('path');var rimraf=require('rimraf');var config=require(_0xba72('0x7'));var attributes=require(_0xba72('0x8'));module[_0xba72('0x9')]=function(_0xfd8f78,_0x3e3835){return _0xfd8f78[_0xba72('0xa')](_0xba72('0xb'),attributes,{'tableName':_0xba72('0xc'),'paranoid':![],'indexes':[],'timestamps':!![],'charset':_0xba72('0xd'),'collate':_0xba72('0xe')});}; \ No newline at end of file diff --git a/server/api/chatInternalMessage/chatInternalMessage.rpc.js b/server/api/chatInternalMessage/chatInternalMessage.rpc.js index 8de7fb4..d18d7e1 100644 --- a/server/api/chatInternalMessage/chatInternalMessage.rpc.js +++ b/server/api/chatInternalMessage/chatInternalMessage.rpc.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x2fb5=['code','ChatInternalMessage,\x20%s,\x20%s','message','result','catch','lodash','bluebird','randomstring','ioredis','../../config/utils','../../config/logger','rpc','../../config/environment','client','redis','defaults','localhost','socket.io-emitter','register','then','info','request\x20sent','debug','ChatInternalMessage,\x20%s,\x20%s,\x20%s','error'];(function(_0x2d5bf9,_0xc408de){var _0x19b9d2=function(_0x35b71d){while(--_0x35b71d){_0x2d5bf9['push'](_0x2d5bf9['shift']());}};_0x19b9d2(++_0xc408de);}(_0x2fb5,0xff));var _0x52fb=function(_0x2c27ed,_0x5c50f0){_0x2c27ed=_0x2c27ed-0x0;var _0x597bd1=_0x2fb5[_0x2c27ed];return _0x597bd1;};'use strict';var _=require(_0x52fb('0x0'));var util=require('util');var moment=require('moment');var BPromise=require(_0x52fb('0x1'));var rs=require(_0x52fb('0x2'));var fs=require('fs');var Redis=require(_0x52fb('0x3'));var db=require('../../mysqldb')['db'];var utils=require(_0x52fb('0x4'));var logger=require(_0x52fb('0x5'))(_0x52fb('0x6'));var config=require(_0x52fb('0x7'));var jayson=require('jayson/promise');var client=jayson[_0x52fb('0x8')]['http']({'port':0x232a});config[_0x52fb('0x9')]=_[_0x52fb('0xa')](config[_0x52fb('0x9')],{'host':_0x52fb('0xb'),'port':0x18eb});var socket=require(_0x52fb('0xc'))(new Redis(config[_0x52fb('0x9')]));require('./chatInternalMessage.socket')[_0x52fb('0xd')](socket);function respondWithRpcPromise(_0x564f94,_0x3a8849,_0x138b87){return new BPromise(function(_0x435584,_0x48b701){return client['request'](_0x564f94,_0x138b87)[_0x52fb('0xe')](function(_0x5cb608){logger[_0x52fb('0xf')]('ChatInternalMessage,\x20%s,\x20%s',_0x3a8849,_0x52fb('0x10'));logger[_0x52fb('0x11')](_0x52fb('0x12'),_0x3a8849,_0x52fb('0x10'),JSON['stringify'](_0x5cb608));if(_0x5cb608[_0x52fb('0x13')]){if(_0x5cb608[_0x52fb('0x13')][_0x52fb('0x14')]===0x1f4){logger[_0x52fb('0x13')]('ChatInternalMessage,\x20%s,\x20%s',_0x3a8849,_0x5cb608[_0x52fb('0x13')]['message']);return _0x48b701(_0x5cb608['error']['message']);}logger[_0x52fb('0x13')](_0x52fb('0x15'),_0x3a8849,_0x5cb608[_0x52fb('0x13')][_0x52fb('0x16')]);return _0x435584(_0x5cb608['error'][_0x52fb('0x16')]);}else{logger['info'](_0x52fb('0x15'),_0x3a8849,_0x52fb('0x10'));_0x435584(_0x5cb608[_0x52fb('0x17')]['message']);}})[_0x52fb('0x18')](function(_0x36b43f){logger[_0x52fb('0x13')]('ChatInternalMessage,\x20%s,\x20%s',_0x3a8849,_0x36b43f);_0x48b701(_0x36b43f);});});} \ No newline at end of file +var _0xd331=['ChatInternalMessage,\x20%s,\x20%s','request\x20sent','debug','ChatInternalMessage,\x20%s,\x20%s,\x20%s','error','message','result','lodash','bluebird','randomstring','../../mysqldb','../../config/utils','../../config/logger','rpc','jayson/promise','client','defaults','redis','localhost','./chatInternalMessage.socket','register','request','then'];(function(_0x56a404,_0x56e54e){var _0x2740f3=function(_0x513c2e){while(--_0x513c2e){_0x56a404['push'](_0x56a404['shift']());}};_0x2740f3(++_0x56e54e);}(_0xd331,0xed));var _0x1d33=function(_0x4fbf58,_0x388959){_0x4fbf58=_0x4fbf58-0x0;var _0x2339c5=_0xd331[_0x4fbf58];return _0x2339c5;};'use strict';var _=require(_0x1d33('0x0'));var util=require('util');var moment=require('moment');var BPromise=require(_0x1d33('0x1'));var rs=require(_0x1d33('0x2'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0x1d33('0x3'))['db'];var utils=require(_0x1d33('0x4'));var logger=require(_0x1d33('0x5'))(_0x1d33('0x6'));var config=require('../../config/environment');var jayson=require(_0x1d33('0x7'));var client=jayson[_0x1d33('0x8')]['http']({'port':0x232a});config['redis']=_[_0x1d33('0x9')](config[_0x1d33('0xa')],{'host':_0x1d33('0xb'),'port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config[_0x1d33('0xa')]));require(_0x1d33('0xc'))[_0x1d33('0xd')](socket);function respondWithRpcPromise(_0x2b5662,_0x547c0b,_0x65091e){return new BPromise(function(_0x328b93,_0x4ee8e7){return client[_0x1d33('0xe')](_0x2b5662,_0x65091e)[_0x1d33('0xf')](function(_0x40974f){logger['info'](_0x1d33('0x10'),_0x547c0b,_0x1d33('0x11'));logger[_0x1d33('0x12')](_0x1d33('0x13'),_0x547c0b,_0x1d33('0x11'),JSON['stringify'](_0x40974f));if(_0x40974f[_0x1d33('0x14')]){if(_0x40974f['error']['code']===0x1f4){logger[_0x1d33('0x14')](_0x1d33('0x10'),_0x547c0b,_0x40974f[_0x1d33('0x14')][_0x1d33('0x15')]);return _0x4ee8e7(_0x40974f[_0x1d33('0x14')][_0x1d33('0x15')]);}logger[_0x1d33('0x14')](_0x1d33('0x10'),_0x547c0b,_0x40974f[_0x1d33('0x14')][_0x1d33('0x15')]);return _0x328b93(_0x40974f[_0x1d33('0x14')][_0x1d33('0x15')]);}else{logger['info'](_0x1d33('0x10'),_0x547c0b,_0x1d33('0x11'));_0x328b93(_0x40974f[_0x1d33('0x16')][_0x1d33('0x15')]);}})['catch'](function(_0x2c910f){logger['error'](_0x1d33('0x10'),_0x547c0b,_0x2c910f);_0x4ee8e7(_0x2c910f);});});} \ No newline at end of file diff --git a/server/api/chatInternalMessage/chatInternalMessage.socket.js b/server/api/chatInternalMessage/chatInternalMessage.socket.js index 44393c4..b0dbd66 100644 --- a/server/api/chatInternalMessage/chatInternalMessage.socket.js +++ b/server/api/chatInternalMessage/chatInternalMessage.socket.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x231f=['save','remove','update','register','length','./chatInternalMessage.events'];(function(_0x1af330,_0x29035d){var _0x3e65d9=function(_0x1feb87){while(--_0x1feb87){_0x1af330['push'](_0x1af330['shift']());}};_0x3e65d9(++_0x29035d);}(_0x231f,0xcb));var _0xf231=function(_0x4a11e5,_0x448f5a){_0x4a11e5=_0x4a11e5-0x0;var _0x3c2d69=_0x231f[_0x4a11e5];return _0x3c2d69;};'use strict';var ChatInternalMessageEvents=require(_0xf231('0x0'));var events=[_0xf231('0x1'),_0xf231('0x2'),_0xf231('0x3')];function createListener(_0x436e9e,_0x550e04){return function(_0x35e7d6){_0x550e04['emit'](_0x436e9e,_0x35e7d6);};}function removeListener(_0x184b86,_0x1226c7){return function(){ChatInternalMessageEvents['removeListener'](_0x184b86,_0x1226c7);};}exports[_0xf231('0x4')]=function(_0x12e4ff){for(var _0x42495f=0x0,_0xf1468c=events[_0xf231('0x5')];_0x42495f<_0xf1468c;_0x42495f++){var _0x4a5b95=events[_0x42495f];var _0x4859d0=createListener('chatInternalMessage:'+_0x4a5b95,_0x12e4ff);ChatInternalMessageEvents['on'](_0x4a5b95,_0x4859d0);}}; \ No newline at end of file +var _0x83c4=['removeListener','chatInternalMessage:','./chatInternalMessage.events','save','remove','update'];(function(_0x1353bc,_0x432b07){var _0x3097a6=function(_0x1ab3c2){while(--_0x1ab3c2){_0x1353bc['push'](_0x1353bc['shift']());}};_0x3097a6(++_0x432b07);}(_0x83c4,0x13a));var _0x483c=function(_0x53f92a,_0x3b7682){_0x53f92a=_0x53f92a-0x0;var _0x1f0769=_0x83c4[_0x53f92a];return _0x1f0769;};'use strict';var ChatInternalMessageEvents=require(_0x483c('0x0'));var events=[_0x483c('0x1'),_0x483c('0x2'),_0x483c('0x3')];function createListener(_0xde7741,_0x551e84){return function(_0x2d59a7){_0x551e84['emit'](_0xde7741,_0x2d59a7);};}function removeListener(_0x1f68f3,_0x41c76d){return function(){ChatInternalMessageEvents[_0x483c('0x4')](_0x1f68f3,_0x41c76d);};}exports['register']=function(_0x4bb775){for(var _0x148ace=0x0,_0x663b77=events['length'];_0x148ace<_0x663b77;_0x148ace++){var _0x3c216d=events[_0x148ace];var _0x370523=createListener(_0x483c('0x5')+_0x3c216d,_0x4bb775);ChatInternalMessageEvents['on'](_0x3c216d,_0x370523);}}; \ No newline at end of file diff --git a/server/api/chatInternalMessage/index.js b/server/api/chatInternalMessage/index.js index ad694b0..b2fcdd8 100644 --- a/server/api/chatInternalMessage/index.js +++ b/server/api/chatInternalMessage/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x7b5b=['multer','util','connect-timeout','express','Router','../../components/interaction/service','../../config/environment','./chatInternalMessage.controller','isAuthenticated','index','get','describe','/users','getUsers','/:id','show','post','delete','destroy','exports'];(function(_0x514e6d,_0x4c5da4){var _0x28564b=function(_0x57137d){while(--_0x57137d){_0x514e6d['push'](_0x514e6d['shift']());}};_0x28564b(++_0x4c5da4);}(_0x7b5b,0xc8));var _0xb7b5=function(_0x353762,_0xd30e42){_0x353762=_0x353762-0x0;var _0x356aa6=_0x7b5b[_0x353762];return _0x356aa6;};'use strict';var multer=require(_0xb7b5('0x0'));var util=require(_0xb7b5('0x1'));var path=require('path');var timeout=require(_0xb7b5('0x2'));var express=require(_0xb7b5('0x3'));var router=express[_0xb7b5('0x4')]();var fs_extra=require('fs-extra');var auth=require('../../components/auth/service');var interaction=require(_0xb7b5('0x5'));var config=require(_0xb7b5('0x6'));var controller=require(_0xb7b5('0x7'));router['get']('/',auth[_0xb7b5('0x8')](),controller[_0xb7b5('0x9')]);router[_0xb7b5('0xa')]('/describe',auth[_0xb7b5('0x8')](),controller[_0xb7b5('0xb')]);router[_0xb7b5('0xa')](_0xb7b5('0xc'),auth['isAuthenticated'](),controller[_0xb7b5('0xd')]);router[_0xb7b5('0xa')](_0xb7b5('0xe'),auth[_0xb7b5('0x8')](),controller[_0xb7b5('0xf')]);router[_0xb7b5('0x10')]('/',auth[_0xb7b5('0x8')](),controller['create']);router['put'](_0xb7b5('0xe'),controller['update']);router[_0xb7b5('0x11')](_0xb7b5('0xe'),auth[_0xb7b5('0x8')](),controller[_0xb7b5('0x12')]);module[_0xb7b5('0x13')]=router; \ No newline at end of file +var _0x249a=['exports','multer','path','connect-timeout','express','Router','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','get','index','/users','isAuthenticated','/:id','post','create','put','update','delete'];(function(_0x41d948,_0x5cf7cf){var _0x454e58=function(_0x5e5464){while(--_0x5e5464){_0x41d948['push'](_0x41d948['shift']());}};_0x454e58(++_0x5cf7cf);}(_0x249a,0x105));var _0xa249=function(_0x3ea913,_0x255df2){_0x3ea913=_0x3ea913-0x0;var _0x2b4f28=_0x249a[_0x3ea913];return _0x2b4f28;};'use strict';var multer=require(_0xa249('0x0'));var util=require('util');var path=require(_0xa249('0x1'));var timeout=require(_0xa249('0x2'));var express=require(_0xa249('0x3'));var router=express[_0xa249('0x4')]();var fs_extra=require(_0xa249('0x5'));var auth=require(_0xa249('0x6'));var interaction=require(_0xa249('0x7'));var config=require(_0xa249('0x8'));var controller=require('./chatInternalMessage.controller');router[_0xa249('0x9')]('/',auth['isAuthenticated'](),controller[_0xa249('0xa')]);router[_0xa249('0x9')]('/describe',auth['isAuthenticated'](),controller['describe']);router[_0xa249('0x9')](_0xa249('0xb'),auth[_0xa249('0xc')](),controller['getUsers']);router['get'](_0xa249('0xd'),auth[_0xa249('0xc')](),controller['show']);router[_0xa249('0xe')]('/',auth[_0xa249('0xc')](),controller[_0xa249('0xf')]);router[_0xa249('0x10')](_0xa249('0xd'),controller[_0xa249('0x11')]);router[_0xa249('0x12')]('/:id',auth[_0xa249('0xc')](),controller['destroy']);module[_0xa249('0x13')]=router; \ No newline at end of file diff --git a/server/api/chatMessage/chatMessage.attributes.js b/server/api/chatMessage/chatMessage.attributes.js index ac0675f..f7b1fb8 100644 --- a/server/api/chatMessage/chatMessage.attributes.js +++ b/server/api/chatMessage/chatMessage.attributes.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x80cd=['BOOLEAN','ENUM','out','STRING','exports','TEXT','medium'];(function(_0x178e48,_0x3c9509){var _0x440d7e=function(_0xc2f8a0){while(--_0xc2f8a0){_0x178e48['push'](_0x178e48['shift']());}};_0x440d7e(++_0x3c9509);}(_0x80cd,0x146));var _0xd80c=function(_0x36dfbd,_0x5bfe2d){_0x36dfbd=_0x36dfbd-0x0;var _0x4ecad9=_0x80cd[_0x36dfbd];return _0x4ecad9;};'use strict';var Sequelize=require('sequelize');module[_0xd80c('0x0')]={'body':{'type':Sequelize[_0xd80c('0x1')](_0xd80c('0x2')),'allowNull':![]},'read':{'type':Sequelize[_0xd80c('0x3')],'defaultValue':![]},'secret':{'type':Sequelize[_0xd80c('0x3')],'defaultValue':![]},'direction':{'type':Sequelize[_0xd80c('0x4')]('in',_0xd80c('0x5')),'defaultValue':_0xd80c('0x5'),'allowNull':![]},'readAt':{'type':Sequelize['DATE']},'providerName':{'type':Sequelize[_0xd80c('0x6')]},'providerResponse':{'type':Sequelize[_0xd80c('0x1')]}}; \ No newline at end of file +var _0x5eb1=['ENUM','out','DATE','STRING','exports','TEXT','medium','BOOLEAN'];(function(_0x576e2b,_0x328953){var _0x46461a=function(_0xce4d9e){while(--_0xce4d9e){_0x576e2b['push'](_0x576e2b['shift']());}};_0x46461a(++_0x328953);}(_0x5eb1,0x7c));var _0x15eb=function(_0x91384,_0x545eef){_0x91384=_0x91384-0x0;var _0x44daa0=_0x5eb1[_0x91384];return _0x44daa0;};'use strict';var Sequelize=require('sequelize');module[_0x15eb('0x0')]={'body':{'type':Sequelize[_0x15eb('0x1')](_0x15eb('0x2')),'allowNull':![]},'read':{'type':Sequelize[_0x15eb('0x3')],'defaultValue':![]},'secret':{'type':Sequelize[_0x15eb('0x3')],'defaultValue':![]},'direction':{'type':Sequelize[_0x15eb('0x4')]('in','out'),'defaultValue':_0x15eb('0x5'),'allowNull':![]},'readAt':{'type':Sequelize[_0x15eb('0x6')]},'providerName':{'type':Sequelize[_0x15eb('0x7')]},'providerResponse':{'type':Sequelize[_0x15eb('0x1')]}}; \ No newline at end of file diff --git a/server/api/chatMessage/chatMessage.controller.js b/server/api/chatMessage/chatMessage.controller.js index a55d2c1..1218ede 100644 --- a/server/api/chatMessage/chatMessage.controller.js +++ b/server/api/chatMessage/chatMessage.controller.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xf6ac=['intersection','attributes','fields','length','limit','order','sort','where','pick','filters','filter','merge','VIRTUAL','options','ChatMessage','findAll','rows','show','params','keys','rawAttributes','includeAll','include','find','create','body','destroy','describe','chat','read','readAt','format','UserId','user','agent','ChatInteraction','isNil','interaction','[CHATMESSAGE:ACCEPT]\x20id=%s\x20name=%s\x20role=%s\x20interaction=%s\x20body=%s','role','stringify','null','AcceptMessage','acceptMessage','SELECT\x20*\x20FROM\x20cm_contacts\x20WHERE\x20id\x20=\x20','ContactId','sequelize','Sequelize','QueryTypes','SELECT','User','fullname','email','manual','interface','channel','motionChannel','event','accept','EventManager','acceptmessage','parse','formData','chat-interactions','reject','get','ChatInteractionId','RejectMessage','contact','SIP/%s','rejectmessage','eml-format','zip-dir','request-promise','bluebird','mustache','util','path','sox','to-csv','ejs','fs-extra','lodash','crypto','jsforce','desk.js','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/license/util','../../mysqldb','redis','defaults','socket.io-emitter','./chatMessage.socket','register','jayson/promise','client','http','request','info','ChatMessage,\x20%s,\x20%s','debug','ChatMessage,\x20%s,\x20%s,\x20%s','error','code','message','request\x20sent','result','catch','status','end','json','offset','undefined','count','set','Content-Range','apply','save','update','then','name','send','index','type','model','map','query'];(function(_0x1e7201,_0x27e1b5){var _0x3e0233=function(_0x5d6827){while(--_0x5d6827){_0x1e7201['push'](_0x1e7201['shift']());}};_0x3e0233(++_0x27e1b5);}(_0xf6ac,0x1d9));var _0xcf6a=function(_0x382d8e,_0x2a5761){_0x382d8e=_0x382d8e-0x0;var _0x23993d=_0xf6ac[_0x382d8e];return _0x23993d;};'use strict';var emlformat=require(_0xcf6a('0x0'));var rimraf=require('rimraf');var zipdir=require(_0xcf6a('0x1'));var jsonpatch=require('fast-json-patch');var rp=require(_0xcf6a('0x2'));var moment=require('moment');var BPromise=require(_0xcf6a('0x3'));var Mustache=require(_0xcf6a('0x4'));var util=require(_0xcf6a('0x5'));var path=require(_0xcf6a('0x6'));var sox=require(_0xcf6a('0x7'));var csv=require(_0xcf6a('0x8'));var ejs=require(_0xcf6a('0x9'));var fs=require('fs');var fs_extra=require(_0xcf6a('0xa'));var _=require(_0xcf6a('0xb'));var squel=require('squel');var crypto=require(_0xcf6a('0xc'));var jsforce=require(_0xcf6a('0xd'));var deskjs=require(_0xcf6a('0xe'));var toCsv=require('to-csv');var querystring=require(_0xcf6a('0xf'));var Papa=require(_0xcf6a('0x10'));var Redis=require(_0xcf6a('0x11'));var authService=require(_0xcf6a('0x12'));var qs=require('../../components/parsers/qs');var as=require(_0xcf6a('0x13'));var hardwareService=require(_0xcf6a('0x14'));var logger=require(_0xcf6a('0x15'))(_0xcf6a('0x16'));var utils=require('../../config/utils');var config=require('../../config/environment');var licenseUtil=require(_0xcf6a('0x17'));var db=require(_0xcf6a('0x18'))['db'];config[_0xcf6a('0x19')]=_[_0xcf6a('0x1a')](config['redis'],{'host':'localhost','port':0x18eb});var socket=require(_0xcf6a('0x1b'))(new Redis(config[_0xcf6a('0x19')]));require(_0xcf6a('0x1c'))[_0xcf6a('0x1d')](socket);var jayson=require(_0xcf6a('0x1e'));var client=jayson[_0xcf6a('0x1f')][_0xcf6a('0x20')]({'port':0x232c});var client9002=jayson[_0xcf6a('0x1f')][_0xcf6a('0x20')]({'port':0x232a});function respondWithRpcPromise(_0x3ea080,_0x1e4351,_0xcb16a5,_0x8ed4dd){return new BPromise(function(_0x1178df,_0x330c9a){var _0x254c32=_0x8ed4dd||client;return _0x254c32[_0xcf6a('0x21')](_0x3ea080,_0xcb16a5)['then'](function(_0xe782e6){logger[_0xcf6a('0x22')](_0xcf6a('0x23'),_0x1e4351,'request\x20sent');logger[_0xcf6a('0x24')](_0xcf6a('0x25'),_0x1e4351,'request\x20sent',JSON['stringify'](_0xe782e6));if(_0xe782e6['error']){if(_0xe782e6[_0xcf6a('0x26')][_0xcf6a('0x27')]===0x1f4){logger[_0xcf6a('0x26')](_0xcf6a('0x23'),_0x1e4351,_0xe782e6[_0xcf6a('0x26')][_0xcf6a('0x28')]);return _0x330c9a(_0xe782e6[_0xcf6a('0x26')][_0xcf6a('0x28')]);}logger[_0xcf6a('0x26')](_0xcf6a('0x23'),_0x1e4351,_0xe782e6[_0xcf6a('0x26')][_0xcf6a('0x28')]);return _0x1178df(_0xe782e6['error']['message']);}else{logger[_0xcf6a('0x22')]('ChatMessage,\x20%s,\x20%s',_0x1e4351,_0xcf6a('0x29'));_0x1178df(_0xe782e6[_0xcf6a('0x2a')]['message']);}})[_0xcf6a('0x2b')](function(_0x35062d){logger['error'](_0xcf6a('0x23'),_0x1e4351,_0x35062d);_0x330c9a(_0x35062d);});});}function respondWithStatusCode(_0x22cf64,_0x5dc37e){_0x5dc37e=_0x5dc37e||0xcc;return function(_0x485c84){if(_0x485c84){return _0x22cf64['sendStatus'](_0x5dc37e);}return _0x22cf64[_0xcf6a('0x2c')](_0x5dc37e)[_0xcf6a('0x2d')]();};}function respondWithResult(_0x367f2a,_0x315125){_0x315125=_0x315125||0xc8;return function(_0x58ba73){if(_0x58ba73){return _0x367f2a[_0xcf6a('0x2c')](_0x315125)[_0xcf6a('0x2e')](_0x58ba73);}};}function respondWithFilteredResult(_0x3a83b2,_0x34cb2d){return function(_0x1c9633){if(_0x1c9633){var _0x482e49=typeof _0x34cb2d[_0xcf6a('0x2f')]===_0xcf6a('0x30')&&typeof _0x34cb2d['limit']==='undefined';var _0x40210f=_0x1c9633[_0xcf6a('0x31')];var _0x76fb78=_0x482e49?0x0:_0x34cb2d['offset'];var _0x8bf0b7=_0x482e49?_0x1c9633[_0xcf6a('0x31')]:_0x34cb2d['offset']+_0x34cb2d['limit'];var _0x51b583;if(_0x8bf0b7>=_0x40210f){_0x8bf0b7=_0x40210f;_0x51b583=0xc8;}else{_0x51b583=0xce;}_0x3a83b2[_0xcf6a('0x2c')](_0x51b583);return _0x3a83b2[_0xcf6a('0x32')](_0xcf6a('0x33'),_0x76fb78+'-'+_0x8bf0b7+'/'+_0x40210f)[_0xcf6a('0x2e')](_0x1c9633);}return null;};}function patchUpdates(_0x2c7b49){return function(_0x271fb9){try{jsonpatch[_0xcf6a('0x34')](_0x271fb9,_0x2c7b49,!![]);}catch(_0x287422){return BPromise['reject'](_0x287422);}return _0x271fb9[_0xcf6a('0x35')]();};}function saveUpdates(_0x4b8d35,_0x5afc3f){return function(_0x25ff7a){if(_0x25ff7a){return _0x25ff7a[_0xcf6a('0x36')](_0x4b8d35)[_0xcf6a('0x37')](function(_0x2024e1){return _0x2024e1;});}return null;};}function removeEntity(_0x4327c2,_0x2987ac){return function(_0x35b58a){if(_0x35b58a){return _0x35b58a['destroy']()[_0xcf6a('0x37')](function(){_0x4327c2['status'](0xcc)[_0xcf6a('0x2d')]();});}};}function handleEntityNotFound(_0x5a7038,_0x2cf7c0){return function(_0x4c408b){if(!_0x4c408b){_0x5a7038['sendStatus'](0x194);}return _0x4c408b;};}function handleError(_0x456bf1,_0x365647){_0x365647=_0x365647||0x1f4;return function(_0x54da6c){logger[_0xcf6a('0x26')](_0x54da6c['stack']);if(_0x54da6c[_0xcf6a('0x38')]){delete _0x54da6c['name'];}_0x456bf1[_0xcf6a('0x2c')](_0x365647)[_0xcf6a('0x39')](_0x54da6c);};}exports[_0xcf6a('0x3a')]=function(_0x3af059,_0x104187){var _0x1dc7ea={},_0x237ec5={},_0x5e7807={'count':0x0,'rows':[]};var _0x545218=_['map'](db['ChatMessage']['rawAttributes'],function(_0x31d9b3){return{'name':_0x31d9b3['fieldName'],'type':_0x31d9b3[_0xcf6a('0x3b')]['key']};});_0x237ec5[_0xcf6a('0x3c')]=_[_0xcf6a('0x3d')](_0x545218,_0xcf6a('0x38'));_0x237ec5[_0xcf6a('0x3e')]=_['keys'](_0x3af059[_0xcf6a('0x3e')]);_0x237ec5['filters']=_[_0xcf6a('0x3f')](_0x237ec5[_0xcf6a('0x3c')],_0x237ec5[_0xcf6a('0x3e')]);_0x1dc7ea[_0xcf6a('0x40')]=_[_0xcf6a('0x3f')](_0x237ec5['model'],qs[_0xcf6a('0x41')](_0x3af059[_0xcf6a('0x3e')][_0xcf6a('0x41')]));_0x1dc7ea['attributes']=_0x1dc7ea[_0xcf6a('0x40')][_0xcf6a('0x42')]?_0x1dc7ea[_0xcf6a('0x40')]:_0x237ec5[_0xcf6a('0x3c')];if(!_0x3af059[_0xcf6a('0x3e')]['hasOwnProperty']('nolimit')){_0x1dc7ea['limit']=qs[_0xcf6a('0x43')](_0x3af059[_0xcf6a('0x3e')][_0xcf6a('0x43')]);_0x1dc7ea['offset']=qs['offset'](_0x3af059[_0xcf6a('0x3e')]['offset']);}_0x1dc7ea[_0xcf6a('0x44')]=qs[_0xcf6a('0x45')](_0x3af059[_0xcf6a('0x3e')]['sort']);_0x1dc7ea[_0xcf6a('0x46')]=qs['filters'](_[_0xcf6a('0x47')](_0x3af059[_0xcf6a('0x3e')],_0x237ec5[_0xcf6a('0x48')]),_0x545218);if(_0x3af059['query'][_0xcf6a('0x49')]){_0x1dc7ea[_0xcf6a('0x46')]=_[_0xcf6a('0x4a')](_0x1dc7ea[_0xcf6a('0x46')],{'$or':_[_0xcf6a('0x3d')](_0x545218,function(_0x4bcf61){if(_0x4bcf61[_0xcf6a('0x3b')]!==_0xcf6a('0x4b')){var _0x14f92b={};_0x14f92b[_0x4bcf61[_0xcf6a('0x38')]]={'$like':'%'+_0x3af059[_0xcf6a('0x3e')][_0xcf6a('0x49')]+'%'};return _0x14f92b;}})});}_0x1dc7ea=_[_0xcf6a('0x4a')]({},_0x1dc7ea,_0x3af059[_0xcf6a('0x4c')]);var _0x2cafc9={'where':_0x1dc7ea[_0xcf6a('0x46')]};return db['ChatMessage'][_0xcf6a('0x31')](_0x2cafc9)[_0xcf6a('0x37')](function(_0x1f44d6){_0x5e7807[_0xcf6a('0x31')]=_0x1f44d6;if(_0x3af059[_0xcf6a('0x3e')]['includeAll']){_0x1dc7ea['include']=[{'all':!![]}];}return db[_0xcf6a('0x4d')][_0xcf6a('0x4e')](_0x1dc7ea);})[_0xcf6a('0x37')](function(_0x54ad4a){_0x5e7807[_0xcf6a('0x4f')]=_0x54ad4a;return _0x5e7807;})['then'](respondWithFilteredResult(_0x104187,_0x1dc7ea))['catch'](handleError(_0x104187,null));};exports[_0xcf6a('0x50')]=function(_0x4ce7c6,_0x8b3a9b){var _0x3bd4d4={'raw':!![],'where':{'id':_0x4ce7c6[_0xcf6a('0x51')]['id']}},_0x29981a={};_0x29981a[_0xcf6a('0x3c')]=_[_0xcf6a('0x52')](db[_0xcf6a('0x4d')][_0xcf6a('0x53')]);_0x29981a['query']=_[_0xcf6a('0x52')](_0x4ce7c6[_0xcf6a('0x3e')]);_0x29981a[_0xcf6a('0x48')]=_[_0xcf6a('0x3f')](_0x29981a[_0xcf6a('0x3c')],_0x29981a[_0xcf6a('0x3e')]);_0x3bd4d4['attributes']=_[_0xcf6a('0x3f')](_0x29981a[_0xcf6a('0x3c')],qs['fields'](_0x4ce7c6[_0xcf6a('0x3e')][_0xcf6a('0x41')]));_0x3bd4d4[_0xcf6a('0x40')]=_0x3bd4d4[_0xcf6a('0x40')][_0xcf6a('0x42')]?_0x3bd4d4[_0xcf6a('0x40')]:_0x29981a[_0xcf6a('0x3c')];if(_0x4ce7c6[_0xcf6a('0x3e')][_0xcf6a('0x54')]){_0x3bd4d4[_0xcf6a('0x55')]=[{'all':!![]}];}_0x3bd4d4=_[_0xcf6a('0x4a')]({},_0x3bd4d4,_0x4ce7c6[_0xcf6a('0x4c')]);return db['ChatMessage'][_0xcf6a('0x56')](_0x3bd4d4)[_0xcf6a('0x37')](handleEntityNotFound(_0x8b3a9b,null))[_0xcf6a('0x37')](respondWithResult(_0x8b3a9b,null))[_0xcf6a('0x2b')](handleError(_0x8b3a9b,null));};exports['create']=function(_0x3b68a0,_0x123d3f){return db[_0xcf6a('0x4d')][_0xcf6a('0x57')](_0x3b68a0[_0xcf6a('0x58')],{})[_0xcf6a('0x37')](respondWithResult(_0x123d3f,0xc9))[_0xcf6a('0x2b')](handleError(_0x123d3f,null));};exports['update']=function(_0x24c9c9,_0x36e0ee){if(_0x24c9c9[_0xcf6a('0x58')]['id']){delete _0x24c9c9[_0xcf6a('0x58')]['id'];}return db['ChatMessage'][_0xcf6a('0x56')]({'where':{'id':_0x24c9c9[_0xcf6a('0x51')]['id']}})['then'](handleEntityNotFound(_0x36e0ee,null))[_0xcf6a('0x37')](saveUpdates(_0x24c9c9['body'],null))[_0xcf6a('0x37')](respondWithResult(_0x36e0ee,null))['catch'](handleError(_0x36e0ee,null));};exports[_0xcf6a('0x59')]=function(_0x4a31d4,_0x4577d7){return db[_0xcf6a('0x4d')]['find']({'where':{'id':_0x4a31d4[_0xcf6a('0x51')]['id']}})[_0xcf6a('0x37')](handleEntityNotFound(_0x4577d7,null))['then'](removeEntity(_0x4577d7,null))[_0xcf6a('0x2b')](handleError(_0x4577d7,null));};exports['describe']=function(_0x3088da,_0x64e7e7){return db['ChatMessage'][_0xcf6a('0x5a')]()[_0xcf6a('0x37')](respondWithResult(_0x64e7e7,null))[_0xcf6a('0x2b')](handleError(_0x64e7e7,null));};var interaction_log=require('../../config/logger')('chat-interactions');exports['accept']=function(_0x26f527,_0x2a0407,_0xb90d03){var _0xec349c={'agent':{},'channel':_0xcf6a('0x5b')};if(_0x26f527[_0xcf6a('0x58')]['id']){delete _0x26f527['body']['id'];}_0x26f527[_0xcf6a('0x58')][_0xcf6a('0x5c')]=!![];_0x26f527[_0xcf6a('0x58')][_0xcf6a('0x5d')]=moment()[_0xcf6a('0x5e')]('YYYY-MM-DD\x20HH:mm:ss');_0x26f527[_0xcf6a('0x58')][_0xcf6a('0x5f')]=_0x26f527['body']['UserId']||_0x26f527[_0xcf6a('0x60')]['id'];_0xec349c[_0xcf6a('0x61')]['id']=_0x26f527[_0xcf6a('0x58')][_0xcf6a('0x5f')];return db[_0xcf6a('0x4d')][_0xcf6a('0x56')]({'where':{'id':_0x26f527[_0xcf6a('0x51')]['id'],'UserId':null}})[_0xcf6a('0x37')](handleEntityNotFound(_0x2a0407,null))['then'](saveUpdates(_0x26f527['body'],null))[_0xcf6a('0x37')](function(_0x1227e4){if(_0x1227e4){_0xec349c[_0xcf6a('0x28')]=_0x1227e4['get']({'plain':!![]});return db[_0xcf6a('0x62')]['find']({'where':{'id':_0x1227e4['ChatInteractionId']}});}return null;})['then'](handleEntityNotFound(_0x2a0407,null))[_0xcf6a('0x37')](function(_0x13078a){if(_0x13078a){return _0x13078a[_0xcf6a('0x36')]({'UserId':_0x26f527[_0xcf6a('0x58')][_0xcf6a('0x5f')],'read1stAt':_[_0xcf6a('0x63')](_0x13078a['read1stAt'])?moment()[_0xcf6a('0x5e')]('YYYY-MM-DD\x20HH:mm:ss'):undefined});}return null;})[_0xcf6a('0x37')](function(_0x24f289){if(_0x24f289){_0xec349c[_0xcf6a('0x64')]=_0x24f289['get']({'plain':!![]});interaction_log[_0xcf6a('0x22')](_0xcf6a('0x65'),_0x26f527[_0xcf6a('0x60')]['id'],_0x26f527[_0xcf6a('0x60')][_0xcf6a('0x38')],_0x26f527[_0xcf6a('0x60')][_0xcf6a('0x66')],_0xec349c[_0xcf6a('0x64')]['id'],_0x26f527[_0xcf6a('0x58')]?JSON[_0xcf6a('0x67')](_0x26f527['body']):_0xcf6a('0x68'));return respondWithRpcPromise(_0xcf6a('0x69'),_0xcf6a('0x6a'),_0xec349c);}return null;})[_0xcf6a('0x37')](function(_0x42a2a8){var _0x354f7f=_0xcf6a('0x6b')+_0x42a2a8[_0xcf6a('0x28')][_0xcf6a('0x6c')];return db[_0xcf6a('0x6d')][_0xcf6a('0x3e')](_0x354f7f,{'type':db[_0xcf6a('0x6e')][_0xcf6a('0x6f')][_0xcf6a('0x70')],'raw':!![]})[_0xcf6a('0x37')](function(_0x543035){return _0x543035;});})['then'](function(_0xff3045){if(_0xff3045){_0xec349c[_0xcf6a('0x28')]['contact']=_0xff3045[0x0];if(!_0x26f527[_0xcf6a('0x58')][_0xcf6a('0x5f')])return;return db[_0xcf6a('0x71')][_0xcf6a('0x56')]({'where':{'id':_0x26f527['body'][_0xcf6a('0x5f')],'role':_0xcf6a('0x61')},'attributes':['id',_0xcf6a('0x38'),_0xcf6a('0x72'),_0xcf6a('0x73'),'internal'],'raw':!![]});}return null;})['then'](function(_0x33db2d){if(!_0x33db2d)return null;_0xec349c['message']['agent']=_0x33db2d;return _0xec349c;})[_0xcf6a('0x37')](function(_0x58a56a){if(_0x58a56a){if(_0x26f527[_0xcf6a('0x58')][_0xcf6a('0x74')]){_0xec349c[_0xcf6a('0x28')][_0xcf6a('0x75')]=util[_0xcf6a('0x5e')]('SIP/%s',_0x26f527[_0xcf6a('0x60')][_0xcf6a('0x38')]);_0xec349c[_0xcf6a('0x28')]['channel']=_0xec349c[_0xcf6a('0x76')];_0xec349c['message'][_0xcf6a('0x77')]=_0xec349c['channel'];_0xec349c[_0xcf6a('0x28')][_0xcf6a('0x78')]=_0xcf6a('0x79');return respondWithRpcPromise(_0xcf6a('0x7a'),_0xcf6a('0x7a'),{'event':_0xcf6a('0x7b'),'message':_['merge'](_0xec349c['message'],JSON[_0xcf6a('0x7c')](_0xec349c['interaction'][_0xcf6a('0x7d')]))},client9002)[_0xcf6a('0x37')](function(){return _0xec349c;});}return _0xec349c;}return null;})[_0xcf6a('0x37')](respondWithResult(_0x2a0407,null))['catch'](handleError(_0x2a0407,null));};var interaction_log=require(_0xcf6a('0x15'))(_0xcf6a('0x7e'));exports[_0xcf6a('0x7f')]=function(_0x594c35,_0x70e939,_0x31ce46){var _0x4d5b66={'agent':{},'channel':_0xcf6a('0x5b')};if(_0x594c35['body']['id']){delete _0x594c35[_0xcf6a('0x58')]['id'];}_0x594c35['body'][_0xcf6a('0x5f')]=_0x594c35[_0xcf6a('0x58')][_0xcf6a('0x5f')]||_0x594c35['user']['id'];_0x4d5b66[_0xcf6a('0x61')]['id']=_0x594c35[_0xcf6a('0x58')]['UserId'];return db[_0xcf6a('0x4d')][_0xcf6a('0x56')]({'where':{'id':_0x594c35[_0xcf6a('0x51')]['id'],'UserId':null}})[_0xcf6a('0x37')](handleEntityNotFound(_0x70e939,null))['then'](function(_0x477fbf){if(_0x477fbf){_0x4d5b66[_0xcf6a('0x28')]=_0x477fbf[_0xcf6a('0x80')]({'plain':!![]});return db['ChatInteraction'][_0xcf6a('0x56')]({'where':{'id':_0x477fbf[_0xcf6a('0x81')]}});}return null;})[_0xcf6a('0x37')](handleEntityNotFound(_0x70e939,null))[_0xcf6a('0x37')](function(_0x2bad6d){if(_0x2bad6d){_0x4d5b66[_0xcf6a('0x64')]=_0x2bad6d[_0xcf6a('0x80')]({'plain':!![]});interaction_log[_0xcf6a('0x22')]('[CHATMESSAGE:REJECT]\x20id=%s\x20name=%s\x20role=%s\x20interaction=%s\x20body=%s',_0x594c35[_0xcf6a('0x60')]['id'],_0x594c35[_0xcf6a('0x60')][_0xcf6a('0x38')],_0x594c35[_0xcf6a('0x60')][_0xcf6a('0x66')],_0x4d5b66[_0xcf6a('0x64')]['id'],_0x594c35['body']?JSON[_0xcf6a('0x67')](_0x594c35[_0xcf6a('0x58')]):_0xcf6a('0x68'));return respondWithRpcPromise(_0xcf6a('0x82'),'rejectMessage',_0x4d5b66);}return null;})['then'](function(_0x16a60d){var _0x526d52='SELECT\x20*\x20FROM\x20cm_contacts\x20WHERE\x20id\x20=\x20'+_0x16a60d[_0xcf6a('0x28')]['ContactId'];return db['sequelize']['query'](_0x526d52,{'type':db['Sequelize'][_0xcf6a('0x6f')]['SELECT'],'raw':!![]})[_0xcf6a('0x37')](function(_0x26e8bc){return _0x26e8bc;});})[_0xcf6a('0x37')](function(_0x848cb){if(_0x848cb){_0x4d5b66['message'][_0xcf6a('0x83')]=_0x848cb[0x0];if(!_0x594c35['body']['UserId'])return;return db[_0xcf6a('0x71')]['find']({'where':{'id':_0x594c35['body'][_0xcf6a('0x5f')],'role':_0xcf6a('0x61')},'attributes':['id',_0xcf6a('0x38'),_0xcf6a('0x72'),_0xcf6a('0x73'),'internal'],'raw':!![]});}return null;})[_0xcf6a('0x37')](function(_0x11f441){if(!_0x11f441)return null;_0x4d5b66[_0xcf6a('0x28')]['agent']=_0x11f441;return _0x4d5b66;})[_0xcf6a('0x37')](function(_0x324393){if(_0x324393){_0x324393['message']['interface']=util['format'](_0xcf6a('0x84'),_0x594c35[_0xcf6a('0x60')][_0xcf6a('0x38')]);_0x324393[_0xcf6a('0x28')][_0xcf6a('0x76')]=_0x4d5b66[_0xcf6a('0x76')];_0x324393['message'][_0xcf6a('0x77')]=_0x4d5b66[_0xcf6a('0x76')];_0x324393[_0xcf6a('0x28')]['event']='reject';respondWithRpcPromise(_0xcf6a('0x7a'),'EventManager',{'event':_0xcf6a('0x85'),'message':_[_0xcf6a('0x4a')](_0x4d5b66[_0xcf6a('0x28')],JSON[_0xcf6a('0x7c')](_0x4d5b66[_0xcf6a('0x64')][_0xcf6a('0x7d')]))},client9002);return _0x4d5b66;}return null;})[_0xcf6a('0x37')](respondWithResult(_0x70e939,null))[_0xcf6a('0x2b')](handleError(_0x70e939,null));}; \ No newline at end of file +var _0xddbc=['show','params','keys','intersection','length','merge','create','body','find','describe','accept','chat','read','format','YYYY-MM-DD\x20HH:mm:ss','UserId','agent','isNil','read1stAt','[CHATMESSAGE:ACCEPT]\x20id=%s\x20name=%s\x20role=%s\x20interaction=%s\x20body=%s','user','role','null','AcceptMessage','acceptMessage','ContactId','sequelize','Sequelize','SELECT','contact','email','internal','SIP/%s','channel','motionChannel','EventManager','acceptmessage','interaction','formData','chat-interactions','ChatInteraction','ChatInteractionId','get','[CHATMESSAGE:REJECT]\x20id=%s\x20name=%s\x20role=%s\x20interaction=%s\x20body=%s','RejectMessage','rejectMessage','QueryTypes','User','fullname','interface','event','parse','eml-format','rimraf','fast-json-patch','request-promise','bluebird','util','sox','to-csv','ejs','lodash','squel','jsforce','desk.js','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','defaults','localhost','./chatMessage.socket','register','jayson/promise','client','request','then','info','ChatMessage,\x20%s,\x20%s','request\x20sent','stringify','error','code','message','catch','sendStatus','status','json','offset','undefined','Content-Range','apply','reject','save','update','destroy','name','index','map','ChatMessage','rawAttributes','fieldName','type','model','query','filters','attributes','fields','nolimit','limit','order','sort','where','pick','filter','options','count','includeAll','include','findAll','rows'];(function(_0x32bb57,_0x210fd4){var _0x588ce6=function(_0x464526){while(--_0x464526){_0x32bb57['push'](_0x32bb57['shift']());}};_0x588ce6(++_0x210fd4);}(_0xddbc,0x1b4));var _0xcddb=function(_0x46373b,_0x4a0e5d){_0x46373b=_0x46373b-0x0;var _0x123824=_0xddbc[_0x46373b];return _0x123824;};'use strict';var emlformat=require(_0xcddb('0x0'));var rimraf=require(_0xcddb('0x1'));var zipdir=require('zip-dir');var jsonpatch=require(_0xcddb('0x2'));var rp=require(_0xcddb('0x3'));var moment=require('moment');var BPromise=require(_0xcddb('0x4'));var Mustache=require('mustache');var util=require(_0xcddb('0x5'));var path=require('path');var sox=require(_0xcddb('0x6'));var csv=require(_0xcddb('0x7'));var ejs=require(_0xcddb('0x8'));var fs=require('fs');var fs_extra=require('fs-extra');var _=require(_0xcddb('0x9'));var squel=require(_0xcddb('0xa'));var crypto=require('crypto');var jsforce=require(_0xcddb('0xb'));var deskjs=require(_0xcddb('0xc'));var toCsv=require(_0xcddb('0x7'));var querystring=require('querystring');var Papa=require('papaparse');var Redis=require(_0xcddb('0xd'));var authService=require(_0xcddb('0xe'));var qs=require(_0xcddb('0xf'));var as=require(_0xcddb('0x10'));var hardwareService=require(_0xcddb('0x11'));var logger=require(_0xcddb('0x12'))(_0xcddb('0x13'));var utils=require(_0xcddb('0x14'));var config=require(_0xcddb('0x15'));var licenseUtil=require(_0xcddb('0x16'));var db=require(_0xcddb('0x17'))['db'];config['redis']=_[_0xcddb('0x18')](config['redis'],{'host':_0xcddb('0x19'),'port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config['redis']));require(_0xcddb('0x1a'))[_0xcddb('0x1b')](socket);var jayson=require(_0xcddb('0x1c'));var client=jayson[_0xcddb('0x1d')]['http']({'port':0x232c});var client9002=jayson[_0xcddb('0x1d')]['http']({'port':0x232a});function respondWithRpcPromise(_0x99410d,_0x5d82c3,_0xb1816f,_0x2736b0){return new BPromise(function(_0x7232e8,_0x5bd998){var _0x3285cc=_0x2736b0||client;return _0x3285cc[_0xcddb('0x1e')](_0x99410d,_0xb1816f)[_0xcddb('0x1f')](function(_0x2f4a9d){logger[_0xcddb('0x20')](_0xcddb('0x21'),_0x5d82c3,_0xcddb('0x22'));logger['debug']('ChatMessage,\x20%s,\x20%s,\x20%s',_0x5d82c3,'request\x20sent',JSON[_0xcddb('0x23')](_0x2f4a9d));if(_0x2f4a9d[_0xcddb('0x24')]){if(_0x2f4a9d['error'][_0xcddb('0x25')]===0x1f4){logger[_0xcddb('0x24')](_0xcddb('0x21'),_0x5d82c3,_0x2f4a9d[_0xcddb('0x24')][_0xcddb('0x26')]);return _0x5bd998(_0x2f4a9d[_0xcddb('0x24')][_0xcddb('0x26')]);}logger[_0xcddb('0x24')](_0xcddb('0x21'),_0x5d82c3,_0x2f4a9d[_0xcddb('0x24')][_0xcddb('0x26')]);return _0x7232e8(_0x2f4a9d[_0xcddb('0x24')][_0xcddb('0x26')]);}else{logger[_0xcddb('0x20')](_0xcddb('0x21'),_0x5d82c3,_0xcddb('0x22'));_0x7232e8(_0x2f4a9d['result'][_0xcddb('0x26')]);}})[_0xcddb('0x27')](function(_0x52e286){logger[_0xcddb('0x24')](_0xcddb('0x21'),_0x5d82c3,_0x52e286);_0x5bd998(_0x52e286);});});}function respondWithStatusCode(_0x5620b3,_0xf0ffce){_0xf0ffce=_0xf0ffce||0xcc;return function(_0x677a67){if(_0x677a67){return _0x5620b3[_0xcddb('0x28')](_0xf0ffce);}return _0x5620b3['status'](_0xf0ffce)['end']();};}function respondWithResult(_0x4ca972,_0x17b23f){_0x17b23f=_0x17b23f||0xc8;return function(_0x41643e){if(_0x41643e){return _0x4ca972[_0xcddb('0x29')](_0x17b23f)[_0xcddb('0x2a')](_0x41643e);}};}function respondWithFilteredResult(_0x19a805,_0x54324b){return function(_0x35a015){if(_0x35a015){var _0x119359=typeof _0x54324b[_0xcddb('0x2b')]===_0xcddb('0x2c')&&typeof _0x54324b['limit']===_0xcddb('0x2c');var _0x51fe51=_0x35a015['count'];var _0x5442cf=_0x119359?0x0:_0x54324b[_0xcddb('0x2b')];var _0x23f794=_0x119359?_0x35a015['count']:_0x54324b['offset']+_0x54324b['limit'];var _0x43bde6;if(_0x23f794>=_0x51fe51){_0x23f794=_0x51fe51;_0x43bde6=0xc8;}else{_0x43bde6=0xce;}_0x19a805['status'](_0x43bde6);return _0x19a805['set'](_0xcddb('0x2d'),_0x5442cf+'-'+_0x23f794+'/'+_0x51fe51)['json'](_0x35a015);}return null;};}function patchUpdates(_0x30dfde){return function(_0x4fa2c2){try{jsonpatch[_0xcddb('0x2e')](_0x4fa2c2,_0x30dfde,!![]);}catch(_0x20f452){return BPromise[_0xcddb('0x2f')](_0x20f452);}return _0x4fa2c2[_0xcddb('0x30')]();};}function saveUpdates(_0x4145fa,_0x2d44ba){return function(_0x1ee073){if(_0x1ee073){return _0x1ee073[_0xcddb('0x31')](_0x4145fa)['then'](function(_0x11a659){return _0x11a659;});}return null;};}function removeEntity(_0xf331f1,_0x1c3d16){return function(_0xf58874){if(_0xf58874){return _0xf58874[_0xcddb('0x32')]()['then'](function(){_0xf331f1[_0xcddb('0x29')](0xcc)['end']();});}};}function handleEntityNotFound(_0x466c3d,_0x299550){return function(_0x2702e4){if(!_0x2702e4){_0x466c3d['sendStatus'](0x194);}return _0x2702e4;};}function handleError(_0x19a1bf,_0x514a81){_0x514a81=_0x514a81||0x1f4;return function(_0x4f49b5){logger['error'](_0x4f49b5['stack']);if(_0x4f49b5[_0xcddb('0x33')]){delete _0x4f49b5[_0xcddb('0x33')];}_0x19a1bf[_0xcddb('0x29')](_0x514a81)['send'](_0x4f49b5);};}exports[_0xcddb('0x34')]=function(_0x557d92,_0x236950){var _0x115088={},_0x5468d3={},_0x563129={'count':0x0,'rows':[]};var _0x2e6305=_[_0xcddb('0x35')](db[_0xcddb('0x36')][_0xcddb('0x37')],function(_0x17c3ff){return{'name':_0x17c3ff[_0xcddb('0x38')],'type':_0x17c3ff[_0xcddb('0x39')]['key']};});_0x5468d3[_0xcddb('0x3a')]=_[_0xcddb('0x35')](_0x2e6305,'name');_0x5468d3[_0xcddb('0x3b')]=_['keys'](_0x557d92[_0xcddb('0x3b')]);_0x5468d3[_0xcddb('0x3c')]=_['intersection'](_0x5468d3[_0xcddb('0x3a')],_0x5468d3[_0xcddb('0x3b')]);_0x115088[_0xcddb('0x3d')]=_['intersection'](_0x5468d3[_0xcddb('0x3a')],qs['fields'](_0x557d92[_0xcddb('0x3b')][_0xcddb('0x3e')]));_0x115088[_0xcddb('0x3d')]=_0x115088['attributes']['length']?_0x115088[_0xcddb('0x3d')]:_0x5468d3['model'];if(!_0x557d92[_0xcddb('0x3b')]['hasOwnProperty'](_0xcddb('0x3f'))){_0x115088['limit']=qs['limit'](_0x557d92['query'][_0xcddb('0x40')]);_0x115088[_0xcddb('0x2b')]=qs['offset'](_0x557d92[_0xcddb('0x3b')][_0xcddb('0x2b')]);}_0x115088[_0xcddb('0x41')]=qs[_0xcddb('0x42')](_0x557d92[_0xcddb('0x3b')][_0xcddb('0x42')]);_0x115088[_0xcddb('0x43')]=qs[_0xcddb('0x3c')](_[_0xcddb('0x44')](_0x557d92['query'],_0x5468d3['filters']),_0x2e6305);if(_0x557d92[_0xcddb('0x3b')][_0xcddb('0x45')]){_0x115088[_0xcddb('0x43')]=_['merge'](_0x115088[_0xcddb('0x43')],{'$or':_[_0xcddb('0x35')](_0x2e6305,function(_0x482494){if(_0x482494['type']!=='VIRTUAL'){var _0x53d53={};_0x53d53[_0x482494['name']]={'$like':'%'+_0x557d92[_0xcddb('0x3b')][_0xcddb('0x45')]+'%'};return _0x53d53;}})});}_0x115088=_['merge']({},_0x115088,_0x557d92[_0xcddb('0x46')]);var _0x4b3685={'where':_0x115088[_0xcddb('0x43')]};return db[_0xcddb('0x36')]['count'](_0x4b3685)[_0xcddb('0x1f')](function(_0x2866ba){_0x563129[_0xcddb('0x47')]=_0x2866ba;if(_0x557d92[_0xcddb('0x3b')][_0xcddb('0x48')]){_0x115088[_0xcddb('0x49')]=[{'all':!![]}];}return db[_0xcddb('0x36')][_0xcddb('0x4a')](_0x115088);})[_0xcddb('0x1f')](function(_0x1cbbcb){_0x563129[_0xcddb('0x4b')]=_0x1cbbcb;return _0x563129;})['then'](respondWithFilteredResult(_0x236950,_0x115088))[_0xcddb('0x27')](handleError(_0x236950,null));};exports[_0xcddb('0x4c')]=function(_0x589b10,_0xf8815b){var _0x33801c={'raw':!![],'where':{'id':_0x589b10[_0xcddb('0x4d')]['id']}},_0x1b1448={};_0x1b1448['model']=_[_0xcddb('0x4e')](db[_0xcddb('0x36')]['rawAttributes']);_0x1b1448[_0xcddb('0x3b')]=_['keys'](_0x589b10[_0xcddb('0x3b')]);_0x1b1448[_0xcddb('0x3c')]=_[_0xcddb('0x4f')](_0x1b1448[_0xcddb('0x3a')],_0x1b1448[_0xcddb('0x3b')]);_0x33801c['attributes']=_[_0xcddb('0x4f')](_0x1b1448[_0xcddb('0x3a')],qs[_0xcddb('0x3e')](_0x589b10[_0xcddb('0x3b')][_0xcddb('0x3e')]));_0x33801c[_0xcddb('0x3d')]=_0x33801c[_0xcddb('0x3d')][_0xcddb('0x50')]?_0x33801c[_0xcddb('0x3d')]:_0x1b1448[_0xcddb('0x3a')];if(_0x589b10['query'][_0xcddb('0x48')]){_0x33801c[_0xcddb('0x49')]=[{'all':!![]}];}_0x33801c=_[_0xcddb('0x51')]({},_0x33801c,_0x589b10[_0xcddb('0x46')]);return db['ChatMessage']['find'](_0x33801c)[_0xcddb('0x1f')](handleEntityNotFound(_0xf8815b,null))[_0xcddb('0x1f')](respondWithResult(_0xf8815b,null))[_0xcddb('0x27')](handleError(_0xf8815b,null));};exports[_0xcddb('0x52')]=function(_0x4b69a9,_0x1c6634){return db[_0xcddb('0x36')][_0xcddb('0x52')](_0x4b69a9[_0xcddb('0x53')],{})[_0xcddb('0x1f')](respondWithResult(_0x1c6634,0xc9))['catch'](handleError(_0x1c6634,null));};exports[_0xcddb('0x31')]=function(_0x11b5f2,_0x31d3ec){if(_0x11b5f2['body']['id']){delete _0x11b5f2['body']['id'];}return db[_0xcddb('0x36')][_0xcddb('0x54')]({'where':{'id':_0x11b5f2[_0xcddb('0x4d')]['id']}})[_0xcddb('0x1f')](handleEntityNotFound(_0x31d3ec,null))[_0xcddb('0x1f')](saveUpdates(_0x11b5f2['body'],null))[_0xcddb('0x1f')](respondWithResult(_0x31d3ec,null))[_0xcddb('0x27')](handleError(_0x31d3ec,null));};exports[_0xcddb('0x32')]=function(_0x5de250,_0x27a826){return db[_0xcddb('0x36')][_0xcddb('0x54')]({'where':{'id':_0x5de250[_0xcddb('0x4d')]['id']}})['then'](handleEntityNotFound(_0x27a826,null))['then'](removeEntity(_0x27a826,null))[_0xcddb('0x27')](handleError(_0x27a826,null));};exports[_0xcddb('0x55')]=function(_0x79a6ed,_0x2eb250){return db['ChatMessage'][_0xcddb('0x55')]()[_0xcddb('0x1f')](respondWithResult(_0x2eb250,null))[_0xcddb('0x27')](handleError(_0x2eb250,null));};var interaction_log=require(_0xcddb('0x12'))('chat-interactions');exports[_0xcddb('0x56')]=function(_0x33fada,_0x5628c0,_0x35b994){var _0x3c673b={'agent':{},'channel':_0xcddb('0x57')};if(_0x33fada[_0xcddb('0x53')]['id']){delete _0x33fada[_0xcddb('0x53')]['id'];}_0x33fada[_0xcddb('0x53')][_0xcddb('0x58')]=!![];_0x33fada[_0xcddb('0x53')]['readAt']=moment()[_0xcddb('0x59')](_0xcddb('0x5a'));_0x33fada['body'][_0xcddb('0x5b')]=_0x33fada[_0xcddb('0x53')]['UserId']||_0x33fada['user']['id'];_0x3c673b[_0xcddb('0x5c')]['id']=_0x33fada[_0xcddb('0x53')][_0xcddb('0x5b')];return db['ChatMessage'][_0xcddb('0x54')]({'where':{'id':_0x33fada[_0xcddb('0x4d')]['id'],'UserId':null}})[_0xcddb('0x1f')](handleEntityNotFound(_0x5628c0,null))[_0xcddb('0x1f')](saveUpdates(_0x33fada[_0xcddb('0x53')],null))[_0xcddb('0x1f')](function(_0xdbfd5f){if(_0xdbfd5f){_0x3c673b['message']=_0xdbfd5f['get']({'plain':!![]});return db['ChatInteraction'][_0xcddb('0x54')]({'where':{'id':_0xdbfd5f['ChatInteractionId']}});}return null;})[_0xcddb('0x1f')](handleEntityNotFound(_0x5628c0,null))[_0xcddb('0x1f')](function(_0x32f6eb){if(_0x32f6eb){return _0x32f6eb[_0xcddb('0x31')]({'UserId':_0x33fada[_0xcddb('0x53')][_0xcddb('0x5b')],'read1stAt':_[_0xcddb('0x5d')](_0x32f6eb[_0xcddb('0x5e')])?moment()[_0xcddb('0x59')]('YYYY-MM-DD\x20HH:mm:ss'):undefined});}return null;})[_0xcddb('0x1f')](function(_0x18982f){if(_0x18982f){_0x3c673b['interaction']=_0x18982f['get']({'plain':!![]});interaction_log['info'](_0xcddb('0x5f'),_0x33fada[_0xcddb('0x60')]['id'],_0x33fada['user'][_0xcddb('0x33')],_0x33fada[_0xcddb('0x60')][_0xcddb('0x61')],_0x3c673b['interaction']['id'],_0x33fada[_0xcddb('0x53')]?JSON[_0xcddb('0x23')](_0x33fada[_0xcddb('0x53')]):_0xcddb('0x62'));return respondWithRpcPromise(_0xcddb('0x63'),_0xcddb('0x64'),_0x3c673b);}return null;})[_0xcddb('0x1f')](function(_0x3622db){var _0x1cb196='SELECT\x20*\x20FROM\x20cm_contacts\x20WHERE\x20id\x20=\x20'+_0x3622db[_0xcddb('0x26')][_0xcddb('0x65')];return db[_0xcddb('0x66')][_0xcddb('0x3b')](_0x1cb196,{'type':db[_0xcddb('0x67')]['QueryTypes'][_0xcddb('0x68')],'raw':!![]})['then'](function(_0xba07e9){return _0xba07e9;});})[_0xcddb('0x1f')](function(_0x1901c9){if(_0x1901c9){_0x3c673b[_0xcddb('0x26')][_0xcddb('0x69')]=_0x1901c9[0x0];if(!_0x33fada[_0xcddb('0x53')][_0xcddb('0x5b')])return;return db['User']['find']({'where':{'id':_0x33fada[_0xcddb('0x53')][_0xcddb('0x5b')],'role':_0xcddb('0x5c')},'attributes':['id',_0xcddb('0x33'),'fullname',_0xcddb('0x6a'),_0xcddb('0x6b')],'raw':!![]});}return null;})[_0xcddb('0x1f')](function(_0x1505b9){if(!_0x1505b9)return null;_0x3c673b[_0xcddb('0x26')]['agent']=_0x1505b9;return _0x3c673b;})[_0xcddb('0x1f')](function(_0x1c4494){if(_0x1c4494){if(_0x33fada['body']['manual']){_0x3c673b[_0xcddb('0x26')]['interface']=util['format'](_0xcddb('0x6c'),_0x33fada[_0xcddb('0x60')][_0xcddb('0x33')]);_0x3c673b[_0xcddb('0x26')][_0xcddb('0x6d')]=_0x3c673b['channel'];_0x3c673b['message'][_0xcddb('0x6e')]=_0x3c673b['channel'];_0x3c673b['message']['event']=_0xcddb('0x56');return respondWithRpcPromise('EventManager',_0xcddb('0x6f'),{'event':_0xcddb('0x70'),'message':_[_0xcddb('0x51')](_0x3c673b[_0xcddb('0x26')],JSON['parse'](_0x3c673b[_0xcddb('0x71')][_0xcddb('0x72')]))},client9002)['then'](function(){return _0x3c673b;});}return _0x3c673b;}return null;})[_0xcddb('0x1f')](respondWithResult(_0x5628c0,null))[_0xcddb('0x27')](handleError(_0x5628c0,null));};var interaction_log=require(_0xcddb('0x12'))(_0xcddb('0x73'));exports[_0xcddb('0x2f')]=function(_0x6ee5d0,_0x5af710,_0x2c360f){var _0x12daa2={'agent':{},'channel':_0xcddb('0x57')};if(_0x6ee5d0['body']['id']){delete _0x6ee5d0['body']['id'];}_0x6ee5d0[_0xcddb('0x53')][_0xcddb('0x5b')]=_0x6ee5d0['body'][_0xcddb('0x5b')]||_0x6ee5d0[_0xcddb('0x60')]['id'];_0x12daa2['agent']['id']=_0x6ee5d0[_0xcddb('0x53')]['UserId'];return db[_0xcddb('0x36')][_0xcddb('0x54')]({'where':{'id':_0x6ee5d0[_0xcddb('0x4d')]['id'],'UserId':null}})[_0xcddb('0x1f')](handleEntityNotFound(_0x5af710,null))[_0xcddb('0x1f')](function(_0x3e6913){if(_0x3e6913){_0x12daa2[_0xcddb('0x26')]=_0x3e6913['get']({'plain':!![]});return db[_0xcddb('0x74')][_0xcddb('0x54')]({'where':{'id':_0x3e6913[_0xcddb('0x75')]}});}return null;})[_0xcddb('0x1f')](handleEntityNotFound(_0x5af710,null))[_0xcddb('0x1f')](function(_0x12237f){if(_0x12237f){_0x12daa2['interaction']=_0x12237f[_0xcddb('0x76')]({'plain':!![]});interaction_log[_0xcddb('0x20')](_0xcddb('0x77'),_0x6ee5d0['user']['id'],_0x6ee5d0[_0xcddb('0x60')][_0xcddb('0x33')],_0x6ee5d0[_0xcddb('0x60')]['role'],_0x12daa2['interaction']['id'],_0x6ee5d0['body']?JSON[_0xcddb('0x23')](_0x6ee5d0[_0xcddb('0x53')]):_0xcddb('0x62'));return respondWithRpcPromise(_0xcddb('0x78'),_0xcddb('0x79'),_0x12daa2);}return null;})[_0xcddb('0x1f')](function(_0x13e922){var _0x223ced='SELECT\x20*\x20FROM\x20cm_contacts\x20WHERE\x20id\x20=\x20'+_0x13e922[_0xcddb('0x26')][_0xcddb('0x65')];return db[_0xcddb('0x66')][_0xcddb('0x3b')](_0x223ced,{'type':db['Sequelize'][_0xcddb('0x7a')]['SELECT'],'raw':!![]})[_0xcddb('0x1f')](function(_0x894c3c){return _0x894c3c;});})[_0xcddb('0x1f')](function(_0x31e968){if(_0x31e968){_0x12daa2[_0xcddb('0x26')][_0xcddb('0x69')]=_0x31e968[0x0];if(!_0x6ee5d0[_0xcddb('0x53')][_0xcddb('0x5b')])return;return db[_0xcddb('0x7b')][_0xcddb('0x54')]({'where':{'id':_0x6ee5d0[_0xcddb('0x53')][_0xcddb('0x5b')],'role':'agent'},'attributes':['id',_0xcddb('0x33'),_0xcddb('0x7c'),_0xcddb('0x6a'),_0xcddb('0x6b')],'raw':!![]});}return null;})[_0xcddb('0x1f')](function(_0x8ed316){if(!_0x8ed316)return null;_0x12daa2[_0xcddb('0x26')][_0xcddb('0x5c')]=_0x8ed316;return _0x12daa2;})[_0xcddb('0x1f')](function(_0x593ce3){if(_0x593ce3){_0x593ce3[_0xcddb('0x26')][_0xcddb('0x7d')]=util['format']('SIP/%s',_0x6ee5d0[_0xcddb('0x60')]['name']);_0x593ce3[_0xcddb('0x26')][_0xcddb('0x6d')]=_0x12daa2['channel'];_0x593ce3[_0xcddb('0x26')]['motionChannel']=_0x12daa2['channel'];_0x593ce3[_0xcddb('0x26')][_0xcddb('0x7e')]=_0xcddb('0x2f');respondWithRpcPromise(_0xcddb('0x6f'),_0xcddb('0x6f'),{'event':'rejectmessage','message':_[_0xcddb('0x51')](_0x12daa2[_0xcddb('0x26')],JSON[_0xcddb('0x7f')](_0x12daa2['interaction'][_0xcddb('0x72')]))},client9002);return _0x12daa2;}return null;})['then'](respondWithResult(_0x5af710,null))[_0xcddb('0x27')](handleError(_0x5af710,null));}; \ No newline at end of file diff --git a/server/api/chatMessage/chatMessage.events.js b/server/api/chatMessage/chatMessage.events.js index 5a2f8af..b57ecfd 100644 --- a/server/api/chatMessage/chatMessage.events.js +++ b/server/api/chatMessage/chatMessage.events.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xf5de=['setMaxListeners','save','update','emit','hasOwnProperty','hook','../../mysqldb','ChatMessage'];(function(_0x109520,_0x51d3e9){var _0xf077a3=function(_0x11a4d3){while(--_0x11a4d3){_0x109520['push'](_0x109520['shift']());}};_0xf077a3(++_0x51d3e9);}(_0xf5de,0x106));var _0xef5d=function(_0x28e8a6,_0x3e0dda){_0x28e8a6=_0x28e8a6-0x0;var _0x3bb12e=_0xf5de[_0x28e8a6];return _0x3bb12e;};'use strict';var EventEmitter=require('events');var ChatMessage=require(_0xef5d('0x0'))['db'][_0xef5d('0x1')];var ChatMessageEvents=new EventEmitter();ChatMessageEvents[_0xef5d('0x2')](0x0);var events={'afterCreate':_0xef5d('0x3'),'afterUpdate':_0xef5d('0x4'),'afterDestroy':'remove'};function emitEvent(_0x50320e){return function(_0x219fad,_0x5be88d,_0x3c90a7){ChatMessageEvents['emit'](_0x50320e+':'+_0x219fad['id'],_0x219fad);ChatMessageEvents[_0xef5d('0x5')](_0x50320e,_0x219fad);_0x3c90a7(null);};}for(var e in events){if(events[_0xef5d('0x6')](e)){var event=events[e];ChatMessage[_0xef5d('0x7')](e,emitEvent(event));}}module['exports']=ChatMessageEvents; \ No newline at end of file +var _0x20ef=['update','remove','emit','hasOwnProperty','exports','events','ChatMessage','setMaxListeners'];(function(_0xb3fcef,_0x2d3fcc){var _0x1bcf86=function(_0x2f0e6b){while(--_0x2f0e6b){_0xb3fcef['push'](_0xb3fcef['shift']());}};_0x1bcf86(++_0x2d3fcc);}(_0x20ef,0x11d));var _0xf20e=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0x20ef[_0x3dd15e];return _0x231fd0;};'use strict';var EventEmitter=require(_0xf20e('0x0'));var ChatMessage=require('../../mysqldb')['db'][_0xf20e('0x1')];var ChatMessageEvents=new EventEmitter();ChatMessageEvents[_0xf20e('0x2')](0x0);var events={'afterCreate':'save','afterUpdate':_0xf20e('0x3'),'afterDestroy':_0xf20e('0x4')};function emitEvent(_0x1b98e1){return function(_0xb6fd1b,_0x442944,_0x232798){ChatMessageEvents[_0xf20e('0x5')](_0x1b98e1+':'+_0xb6fd1b['id'],_0xb6fd1b);ChatMessageEvents[_0xf20e('0x5')](_0x1b98e1,_0xb6fd1b);_0x232798(null);};}for(var e in events){if(events[_0xf20e('0x6')](e)){var event=events[e];ChatMessage['hook'](e,emitEvent(event));}}module[_0xf20e('0x7')]=ChatMessageEvents; \ No newline at end of file diff --git a/server/api/chatMessage/chatMessage.model.js b/server/api/chatMessage/chatMessage.model.js index 7fed240..d5d8a91 100644 --- a/server/api/chatMessage/chatMessage.model.js +++ b/server/api/chatMessage/chatMessage.model.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x96ea=['get','direction','toLowerCase','out','secret','isNil','ChatInteraction','findOne','ChatInteractionId','then','update','createdAt','catch','error','utf8mb4','lodash','util','../../config/logger','api','moment','bluebird','request-promise','rimraf','./chatMessage.attributes','exports','ChatMessage','chat_messages','fti_chat_messages','body','FULLTEXT'];(function(_0x40f24c,_0x5a9b64){var _0x844db3=function(_0x3d4819){while(--_0x3d4819){_0x40f24c['push'](_0x40f24c['shift']());}};_0x844db3(++_0x5a9b64);}(_0x96ea,0xc3));var _0xa96e=function(_0x3034ce,_0x1421b6){_0x3034ce=_0x3034ce-0x0;var _0x4bc0e3=_0x96ea[_0x3034ce];return _0x4bc0e3;};'use strict';var _=require(_0xa96e('0x0'));var util=require(_0xa96e('0x1'));var logger=require(_0xa96e('0x2'))(_0xa96e('0x3'));var moment=require(_0xa96e('0x4'));var BPromise=require(_0xa96e('0x5'));var rp=require(_0xa96e('0x6'));var fs=require('fs');var path=require('path');var rimraf=require(_0xa96e('0x7'));var config=require('../../config/environment');var attributes=require(_0xa96e('0x8'));module[_0xa96e('0x9')]=function(_0x1b5da8,_0x2d3ed6){return _0x1b5da8['define'](_0xa96e('0xa'),attributes,{'tableName':_0xa96e('0xb'),'paranoid':![],'indexes':[{'name':_0xa96e('0xc'),'fields':[_0xa96e('0xd')],'type':_0xa96e('0xe')}],'timestamps':!![],'hooks':{'afterCreate':function(_0x2cdcca,_0x1081e2,_0x2b71ce){var _0x26d1b2=_0x1b5da8['models'];var _0x2db021=_0x2cdcca[_0xa96e('0xf')]({'plain':!![]});if(_0x2db021[_0xa96e('0x10')]['toLowerCase']()==='in'||_0x2db021[_0xa96e('0x10')][_0xa96e('0x11')]()===_0xa96e('0x12')&&!_0x2db021[_0xa96e('0x13')]&&!_[_0xa96e('0x14')](_0x2db021['UserId'])){_0x26d1b2[_0xa96e('0x15')][_0xa96e('0x16')]({'where':{'id':_0x2db021[_0xa96e('0x17')]}})[_0xa96e('0x18')](function(_0x6ba9e5){if(_0x6ba9e5){_0x6ba9e5[_0xa96e('0x19')]({'lastMsgAt':_0x2db021[_0xa96e('0x1a')],'lastMsgDirection':_0x2db021[_0xa96e('0x10')]['toLowerCase']()});}})[_0xa96e('0x1b')](function(_0x24c949){console[_0xa96e('0x1c')](_0x24c949);});}_0x2b71ce();}},'charset':_0xa96e('0x1d'),'collate':'utf8mb4_unicode_ci'});}; \ No newline at end of file +var _0x9ff7=['isNil','UserId','ChatInteraction','findOne','ChatInteractionId','then','update','createdAt','catch','utf8mb4','utf8mb4_unicode_ci','lodash','util','../../config/logger','moment','bluebird','request-promise','path','rimraf','./chatMessage.attributes','exports','define','ChatMessage','fti_chat_messages','body','models','get','toLowerCase','direction','out','secret'];(function(_0x787d44,_0x36fea9){var _0x1c1430=function(_0x18bcd6){while(--_0x18bcd6){_0x787d44['push'](_0x787d44['shift']());}};_0x1c1430(++_0x36fea9);}(_0x9ff7,0x160));var _0x79ff=function(_0x1ab467,_0x38d2a6){_0x1ab467=_0x1ab467-0x0;var _0x3d40d7=_0x9ff7[_0x1ab467];return _0x3d40d7;};'use strict';var _=require(_0x79ff('0x0'));var util=require(_0x79ff('0x1'));var logger=require(_0x79ff('0x2'))('api');var moment=require(_0x79ff('0x3'));var BPromise=require(_0x79ff('0x4'));var rp=require(_0x79ff('0x5'));var fs=require('fs');var path=require(_0x79ff('0x6'));var rimraf=require(_0x79ff('0x7'));var config=require('../../config/environment');var attributes=require(_0x79ff('0x8'));module[_0x79ff('0x9')]=function(_0x2975cc,_0x59fafa){return _0x2975cc[_0x79ff('0xa')](_0x79ff('0xb'),attributes,{'tableName':'chat_messages','paranoid':![],'indexes':[{'name':_0x79ff('0xc'),'fields':[_0x79ff('0xd')],'type':'FULLTEXT'}],'timestamps':!![],'hooks':{'afterCreate':function(_0x40859b,_0x2025ce,_0x3c4475){var _0x348597=_0x2975cc[_0x79ff('0xe')];var _0x556435=_0x40859b[_0x79ff('0xf')]({'plain':!![]});if(_0x556435['direction'][_0x79ff('0x10')]()==='in'||_0x556435[_0x79ff('0x11')]['toLowerCase']()===_0x79ff('0x12')&&!_0x556435[_0x79ff('0x13')]&&!_[_0x79ff('0x14')](_0x556435[_0x79ff('0x15')])){_0x348597[_0x79ff('0x16')][_0x79ff('0x17')]({'where':{'id':_0x556435[_0x79ff('0x18')]}})[_0x79ff('0x19')](function(_0x326b97){if(_0x326b97){_0x326b97[_0x79ff('0x1a')]({'lastMsgAt':_0x556435[_0x79ff('0x1b')],'lastMsgDirection':_0x556435['direction'][_0x79ff('0x10')]()});}})[_0x79ff('0x1c')](function(_0x1742f4){console['error'](_0x1742f4);});}_0x3c4475();}},'charset':_0x79ff('0x1d'),'collate':_0x79ff('0x1e')});}; \ No newline at end of file diff --git a/server/api/chatMessage/chatMessage.rpc.js b/server/api/chatMessage/chatMessage.rpc.js index f43bd32..e23cc1f 100644 --- a/server/api/chatMessage/chatMessage.rpc.js +++ b/server/api/chatMessage/chatMessage.rpc.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x513e=['ChatMessage','create','body','options','raw','lodash','util','moment','randomstring','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','http','redis','defaults','./chatMessage.socket','request','then','info','ChatMessage,\x20%s,\x20%s','request\x20sent','debug','stringify','error','message','result','catch','CreateChatMessage'];(function(_0x963e95,_0x21b18d){var _0xbde59e=function(_0x32d3b8){while(--_0x32d3b8){_0x963e95['push'](_0x963e95['shift']());}};_0xbde59e(++_0x21b18d);}(_0x513e,0xf5));var _0xe513=function(_0x2892da,_0x191a40){_0x2892da=_0x2892da-0x0;var _0x28cff2=_0x513e[_0x2892da];return _0x28cff2;};'use strict';var _=require(_0xe513('0x0'));var util=require(_0xe513('0x1'));var moment=require(_0xe513('0x2'));var BPromise=require('bluebird');var rs=require(_0xe513('0x3'));var fs=require('fs');var Redis=require('ioredis');var db=require('../../mysqldb')['db'];var utils=require(_0xe513('0x4'));var logger=require(_0xe513('0x5'))(_0xe513('0x6'));var config=require(_0xe513('0x7'));var jayson=require(_0xe513('0x8'));var client=jayson['client'][_0xe513('0x9')]({'port':0x232a});config[_0xe513('0xa')]=_[_0xe513('0xb')](config[_0xe513('0xa')],{'host':'localhost','port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config[_0xe513('0xa')]));require(_0xe513('0xc'))['register'](socket);function respondWithRpcPromise(_0x3f5676,_0x452bd5,_0x410b54){return new BPromise(function(_0x21db12,_0xacf73c){return client[_0xe513('0xd')](_0x3f5676,_0x410b54)[_0xe513('0xe')](function(_0x5b0412){logger[_0xe513('0xf')](_0xe513('0x10'),_0x452bd5,_0xe513('0x11'));logger[_0xe513('0x12')]('ChatMessage,\x20%s,\x20%s,\x20%s',_0x452bd5,_0xe513('0x11'),JSON[_0xe513('0x13')](_0x5b0412));if(_0x5b0412[_0xe513('0x14')]){if(_0x5b0412[_0xe513('0x14')]['code']===0x1f4){logger[_0xe513('0x14')](_0xe513('0x10'),_0x452bd5,_0x5b0412[_0xe513('0x14')]['message']);return _0xacf73c(_0x5b0412[_0xe513('0x14')][_0xe513('0x15')]);}logger[_0xe513('0x14')](_0xe513('0x10'),_0x452bd5,_0x5b0412[_0xe513('0x14')][_0xe513('0x15')]);return _0x21db12(_0x5b0412[_0xe513('0x14')][_0xe513('0x15')]);}else{logger[_0xe513('0xf')](_0xe513('0x10'),_0x452bd5,_0xe513('0x11'));_0x21db12(_0x5b0412[_0xe513('0x16')][_0xe513('0x15')]);}})[_0xe513('0x17')](function(_0x3440dd){logger[_0xe513('0x14')]('ChatMessage,\x20%s,\x20%s',_0x452bd5,_0x3440dd);_0xacf73c(_0x3440dd);});});}exports[_0xe513('0x18')]=function(_0x390054){var _0x234c16=this;return new Promise(function(_0x1c5f52,_0x19aafe){return db[_0xe513('0x19')][_0xe513('0x1a')](_0x390054[_0xe513('0x1b')],{'raw':_0x390054[_0xe513('0x1c')]?_0x390054[_0xe513('0x1c')][_0xe513('0x1d')]===undefined?!![]:![]:!![]})[_0xe513('0xe')](function(_0x38e1ed){logger['info'](_0xe513('0x18'),_0x390054);logger[_0xe513('0x12')](_0xe513('0x18'),_0x390054,JSON[_0xe513('0x13')](_0x38e1ed));_0x1c5f52(_0x38e1ed);})['catch'](function(_0x287d8c){logger[_0xe513('0x14')](_0xe513('0x18'),_0x287d8c['message'],_0x390054);_0x19aafe(_0x234c16[_0xe513('0x14')](0x1f4,_0x287d8c['message']));});});}; \ No newline at end of file +var _0x0639=['jayson/promise','client','http','redis','defaults','localhost','./chatMessage.socket','info','ChatMessage,\x20%s,\x20%s','request\x20sent','debug','stringify','error','code','message','result','catch','CreateChatMessage','ChatMessage','create','body','options','raw','then','util','moment','randomstring','ioredis','../../config/logger'];(function(_0x1e5c30,_0x3c3df1){var _0x135477=function(_0x2d0ee5){while(--_0x2d0ee5){_0x1e5c30['push'](_0x1e5c30['shift']());}};_0x135477(++_0x3c3df1);}(_0x0639,0x1ae));var _0x9063=function(_0x5f3f88,_0x562baf){_0x5f3f88=_0x5f3f88-0x0;var _0xd08119=_0x0639[_0x5f3f88];return _0xd08119;};'use strict';var _=require('lodash');var util=require(_0x9063('0x0'));var moment=require(_0x9063('0x1'));var BPromise=require('bluebird');var rs=require(_0x9063('0x2'));var fs=require('fs');var Redis=require(_0x9063('0x3'));var db=require('../../mysqldb')['db'];var utils=require('../../config/utils');var logger=require(_0x9063('0x4'))('rpc');var config=require('../../config/environment');var jayson=require(_0x9063('0x5'));var client=jayson[_0x9063('0x6')][_0x9063('0x7')]({'port':0x232a});config[_0x9063('0x8')]=_[_0x9063('0x9')](config['redis'],{'host':_0x9063('0xa'),'port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config[_0x9063('0x8')]));require(_0x9063('0xb'))['register'](socket);function respondWithRpcPromise(_0x1f2bbf,_0x560af7,_0x5b56f6){return new BPromise(function(_0x50a435,_0x26dac0){return client['request'](_0x1f2bbf,_0x5b56f6)['then'](function(_0x547106){logger[_0x9063('0xc')](_0x9063('0xd'),_0x560af7,_0x9063('0xe'));logger[_0x9063('0xf')]('ChatMessage,\x20%s,\x20%s,\x20%s',_0x560af7,_0x9063('0xe'),JSON[_0x9063('0x10')](_0x547106));if(_0x547106[_0x9063('0x11')]){if(_0x547106[_0x9063('0x11')][_0x9063('0x12')]===0x1f4){logger['error'](_0x9063('0xd'),_0x560af7,_0x547106['error'][_0x9063('0x13')]);return _0x26dac0(_0x547106['error'][_0x9063('0x13')]);}logger['error'](_0x9063('0xd'),_0x560af7,_0x547106[_0x9063('0x11')][_0x9063('0x13')]);return _0x50a435(_0x547106[_0x9063('0x11')][_0x9063('0x13')]);}else{logger['info'](_0x9063('0xd'),_0x560af7,_0x9063('0xe'));_0x50a435(_0x547106[_0x9063('0x14')]['message']);}})[_0x9063('0x15')](function(_0x21e34f){logger[_0x9063('0x11')]('ChatMessage,\x20%s,\x20%s',_0x560af7,_0x21e34f);_0x26dac0(_0x21e34f);});});}exports[_0x9063('0x16')]=function(_0x29d369){var _0x178bc5=this;return new Promise(function(_0x1f9805,_0x13bc45){return db[_0x9063('0x17')][_0x9063('0x18')](_0x29d369[_0x9063('0x19')],{'raw':_0x29d369[_0x9063('0x1a')]?_0x29d369[_0x9063('0x1a')][_0x9063('0x1b')]===undefined?!![]:![]:!![]})[_0x9063('0x1c')](function(_0x5d610e){logger[_0x9063('0xc')]('CreateChatMessage',_0x29d369);logger[_0x9063('0xf')](_0x9063('0x16'),_0x29d369,JSON[_0x9063('0x10')](_0x5d610e));_0x1f9805(_0x5d610e);})[_0x9063('0x15')](function(_0x25e5a0){logger[_0x9063('0x11')](_0x9063('0x16'),_0x25e5a0[_0x9063('0x13')],_0x29d369);_0x13bc45(_0x178bc5[_0x9063('0x11')](0x1f4,_0x25e5a0[_0x9063('0x13')]));});});}; \ No newline at end of file diff --git a/server/api/chatMessage/chatMessage.socket.js b/server/api/chatMessage/chatMessage.socket.js index 649d223..501a016 100644 --- a/server/api/chatMessage/chatMessage.socket.js +++ b/server/api/chatMessage/chatMessage.socket.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x2b83=['remove','removeListener','length','save'];(function(_0x4eb7fd,_0x1ed44a){var _0x5b41eb=function(_0x52716b){while(--_0x52716b){_0x4eb7fd['push'](_0x4eb7fd['shift']());}};_0x5b41eb(++_0x1ed44a);}(_0x2b83,0x1d3));var _0x32b8=function(_0x152b7c,_0x478abf){_0x152b7c=_0x152b7c-0x0;var _0x437f4d=_0x2b83[_0x152b7c];return _0x437f4d;};'use strict';var ChatMessageEvents=require('./chatMessage.events');var events=[_0x32b8('0x0'),_0x32b8('0x1'),'update'];function createListener(_0x3fcbdc,_0x287f16){return function(_0x304105){_0x287f16['emit'](_0x3fcbdc,_0x304105);};}function removeListener(_0x51d3b4,_0xdd712a){return function(){ChatMessageEvents[_0x32b8('0x2')](_0x51d3b4,_0xdd712a);};}exports['register']=function(_0x6bbc3d){for(var _0x55abd0=0x0,_0x18150c=events[_0x32b8('0x3')];_0x55abd0<_0x18150c;_0x55abd0++){var _0x36bde3=events[_0x55abd0];var _0x10a967=createListener('chatMessage:'+_0x36bde3,_0x6bbc3d);ChatMessageEvents['on'](_0x36bde3,_0x10a967);}}; \ No newline at end of file +var _0xcea5=['save','remove','update','emit','register','chatMessage:','./chatMessage.events'];(function(_0x567463,_0x37ad5a){var _0x35f0bf=function(_0x3ea3bb){while(--_0x3ea3bb){_0x567463['push'](_0x567463['shift']());}};_0x35f0bf(++_0x37ad5a);}(_0xcea5,0xed));var _0x5cea=function(_0x2c81f4,_0x208f8c){_0x2c81f4=_0x2c81f4-0x0;var _0x28d018=_0xcea5[_0x2c81f4];return _0x28d018;};'use strict';var ChatMessageEvents=require(_0x5cea('0x0'));var events=[_0x5cea('0x1'),_0x5cea('0x2'),_0x5cea('0x3')];function createListener(_0x2c6970,_0x52a9b8){return function(_0x20a2d9){_0x52a9b8[_0x5cea('0x4')](_0x2c6970,_0x20a2d9);};}function removeListener(_0x382c21,_0x319dba){return function(){ChatMessageEvents['removeListener'](_0x382c21,_0x319dba);};}exports[_0x5cea('0x5')]=function(_0x31e6f3){for(var _0x599bc5=0x0,_0x49db13=events['length'];_0x599bc5<_0x49db13;_0x599bc5++){var _0x502d95=events[_0x599bc5];var _0x3b6fbc=createListener(_0x5cea('0x6')+_0x502d95,_0x31e6f3);ChatMessageEvents['on'](_0x502d95,_0x3b6fbc);}}; \ No newline at end of file diff --git a/server/api/chatMessage/index.js b/server/api/chatMessage/index.js index 1ed1e4b..596b596 100644 --- a/server/api/chatMessage/index.js +++ b/server/api/chatMessage/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x3b5e=['path','Router','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','./chatMessage.controller','get','index','/describe','isAuthenticated','describe','/:id','post','tracked','chat','chatmessage:create','put','update','/:id/accept','accept','/:id/reject','reject','delete','destroy','util'];(function(_0x2efddd,_0x219a6c){var _0x258c67=function(_0x1abb2d){while(--_0x1abb2d){_0x2efddd['push'](_0x2efddd['shift']());}};_0x258c67(++_0x219a6c);}(_0x3b5e,0x1b9));var _0xe3b5=function(_0x2e7c96,_0x27804d){_0x2e7c96=_0x2e7c96-0x0;var _0x36008e=_0x3b5e[_0x2e7c96];return _0x36008e;};'use strict';var multer=require('multer');var util=require(_0xe3b5('0x0'));var path=require(_0xe3b5('0x1'));var timeout=require('connect-timeout');var express=require('express');var router=express[_0xe3b5('0x2')]();var fs_extra=require(_0xe3b5('0x3'));var auth=require(_0xe3b5('0x4'));var interaction=require(_0xe3b5('0x5'));var config=require(_0xe3b5('0x6'));var controller=require(_0xe3b5('0x7'));router[_0xe3b5('0x8')]('/',auth['isAuthenticated'](),controller[_0xe3b5('0x9')]);router['get'](_0xe3b5('0xa'),auth[_0xe3b5('0xb')](),controller[_0xe3b5('0xc')]);router[_0xe3b5('0x8')](_0xe3b5('0xd'),auth[_0xe3b5('0xb')](),controller['show']);router[_0xe3b5('0xe')]('/',auth[_0xe3b5('0xb')](),interaction[_0xe3b5('0xf')](_0xe3b5('0x10'),_0xe3b5('0x11')),controller['create']);router[_0xe3b5('0x12')]('/:id',controller[_0xe3b5('0x13')]);router[_0xe3b5('0x12')](_0xe3b5('0x14'),auth[_0xe3b5('0xb')](),controller[_0xe3b5('0x15')]);router['put'](_0xe3b5('0x16'),auth[_0xe3b5('0xb')](),controller[_0xe3b5('0x17')]);router[_0xe3b5('0x18')](_0xe3b5('0xd'),auth[_0xe3b5('0xb')](),controller[_0xe3b5('0x19')]);module['exports']=router; \ No newline at end of file +var _0xdc52=['delete','destroy','exports','multer','util','path','connect-timeout','express','Router','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','./chatMessage.controller','get','index','/describe','describe','isAuthenticated','show','post','tracked','chat','chatmessage:create','create','put','/:id','update','/:id/accept','accept','/:id/reject','reject'];(function(_0x4a9fb1,_0x273043){var _0x348672=function(_0x142b69){while(--_0x142b69){_0x4a9fb1['push'](_0x4a9fb1['shift']());}};_0x348672(++_0x273043);}(_0xdc52,0xc3));var _0x2dc5=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0xdc52[_0x3dd15e];return _0x231fd0;};'use strict';var multer=require(_0x2dc5('0x0'));var util=require(_0x2dc5('0x1'));var path=require(_0x2dc5('0x2'));var timeout=require(_0x2dc5('0x3'));var express=require(_0x2dc5('0x4'));var router=express[_0x2dc5('0x5')]();var fs_extra=require(_0x2dc5('0x6'));var auth=require(_0x2dc5('0x7'));var interaction=require(_0x2dc5('0x8'));var config=require(_0x2dc5('0x9'));var controller=require(_0x2dc5('0xa'));router[_0x2dc5('0xb')]('/',auth['isAuthenticated'](),controller[_0x2dc5('0xc')]);router[_0x2dc5('0xb')](_0x2dc5('0xd'),auth['isAuthenticated'](),controller[_0x2dc5('0xe')]);router[_0x2dc5('0xb')]('/:id',auth[_0x2dc5('0xf')](),controller[_0x2dc5('0x10')]);router[_0x2dc5('0x11')]('/',auth[_0x2dc5('0xf')](),interaction[_0x2dc5('0x12')](_0x2dc5('0x13'),_0x2dc5('0x14')),controller[_0x2dc5('0x15')]);router[_0x2dc5('0x16')](_0x2dc5('0x17'),controller[_0x2dc5('0x18')]);router[_0x2dc5('0x16')](_0x2dc5('0x19'),auth[_0x2dc5('0xf')](),controller[_0x2dc5('0x1a')]);router[_0x2dc5('0x16')](_0x2dc5('0x1b'),auth['isAuthenticated'](),controller[_0x2dc5('0x1c')]);router[_0x2dc5('0x1d')](_0x2dc5('0x17'),auth[_0x2dc5('0xf')](),controller[_0x2dc5('0x1e')]);module[_0x2dc5('0x1f')]=router; \ No newline at end of file diff --git a/server/api/chatOfflineMessage/chatOfflineMessage.attributes.js b/server/api/chatOfflineMessage/chatOfflineMessage.attributes.js index b9ffd4e..1f6489d 100644 --- a/server/api/chatOfflineMessage/chatOfflineMessage.attributes.js +++ b/server/api/chatOfflineMessage/chatOfflineMessage.attributes.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x5f2f=['exports','TEXT','medium','sequelize'];(function(_0x143e5c,_0x33a766){var _0x42358a=function(_0x596fc5){while(--_0x596fc5){_0x143e5c['push'](_0x143e5c['shift']());}};_0x42358a(++_0x33a766);}(_0x5f2f,0x73));var _0xf5f2=function(_0x2a9b3a,_0x218541){_0x2a9b3a=_0x2a9b3a-0x0;var _0x5b3c80=_0x5f2f[_0x2a9b3a];return _0x5b3c80;};'use strict';var Sequelize=require(_0xf5f2('0x0'));module[_0xf5f2('0x1')]={'body':{'type':Sequelize[_0xf5f2('0x2')](_0xf5f2('0x3')),'allowNull':![]},'plainBody':{'type':Sequelize[_0xf5f2('0x2')](_0xf5f2('0x3')),'allowNull':![]}}; \ No newline at end of file +var _0x5f2f=['exports','TEXT','medium','sequelize'];(function(_0x2f2b73,_0x4be42e){var _0x46903f=function(_0x5454d2){while(--_0x5454d2){_0x2f2b73['push'](_0x2f2b73['shift']());}};_0x46903f(++_0x4be42e);}(_0x5f2f,0x73));var _0xf5f2=function(_0x4e90a0,_0x5c381e){_0x4e90a0=_0x4e90a0-0x0;var _0x3e1d60=_0x5f2f[_0x4e90a0];return _0x3e1d60;};'use strict';var Sequelize=require(_0xf5f2('0x0'));module[_0xf5f2('0x1')]={'body':{'type':Sequelize[_0xf5f2('0x2')](_0xf5f2('0x3')),'allowNull':![]},'plainBody':{'type':Sequelize[_0xf5f2('0x2')](_0xf5f2('0x3')),'allowNull':![]}}; \ No newline at end of file diff --git a/server/api/chatOfflineMessage/chatOfflineMessage.controller.js b/server/api/chatOfflineMessage/chatOfflineMessage.controller.js index 53e29b5..4022e3b 100644 --- a/server/api/chatOfflineMessage/chatOfflineMessage.controller.js +++ b/server/api/chatOfflineMessage/chatOfflineMessage.controller.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x7a54=['filter','VIRTUAL','includeAll','include','findAll','rows','show','params','length','merge','options','find','catch','body','Attachment','join','server','attachments','offline-chat','basename','remove','describe','eml-format','rimraf','zip-dir','request-promise','moment','mustache','util','path','sox','to-csv','fs-extra','squel','crypto','desk.js','ioredis','../../components/auth/service','../../components/parsers/advancedSearch','api','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','sendStatus','status','end','json','offset','undefined','count','limit','set','Content-Range','reject','save','update','then','destroy','error','stack','name','send','index','ChatOfflineMessage','fieldName','type','model','map','query','filters','intersection','attributes','fields','hasOwnProperty','nolimit','order','sort','where','pick'];(function(_0x13ea00,_0x12f610){var _0x1f7347=function(_0x34ae63){while(--_0x34ae63){_0x13ea00['push'](_0x13ea00['shift']());}};_0x1f7347(++_0x12f610);}(_0x7a54,0x106));var _0x47a5=function(_0x474bad,_0x2e8d6e){_0x474bad=_0x474bad-0x0;var _0x4ab11f=_0x7a54[_0x474bad];return _0x4ab11f;};'use strict';var emlformat=require(_0x47a5('0x0'));var rimraf=require(_0x47a5('0x1'));var zipdir=require(_0x47a5('0x2'));var jsonpatch=require('fast-json-patch');var rp=require(_0x47a5('0x3'));var moment=require(_0x47a5('0x4'));var BPromise=require('bluebird');var Mustache=require(_0x47a5('0x5'));var util=require(_0x47a5('0x6'));var path=require(_0x47a5('0x7'));var sox=require(_0x47a5('0x8'));var csv=require(_0x47a5('0x9'));var ejs=require('ejs');var fs=require('fs');var fs_extra=require(_0x47a5('0xa'));var _=require('lodash');var squel=require(_0x47a5('0xb'));var crypto=require(_0x47a5('0xc'));var jsforce=require('jsforce');var deskjs=require(_0x47a5('0xd'));var toCsv=require('to-csv');var querystring=require('querystring');var Papa=require('papaparse');var Redis=require(_0x47a5('0xe'));var authService=require(_0x47a5('0xf'));var qs=require('../../components/parsers/qs');var as=require(_0x47a5('0x10'));var hardwareService=require('../../config/license/hardware');var logger=require('../../config/logger')(_0x47a5('0x11'));var utils=require(_0x47a5('0x12'));var config=require(_0x47a5('0x13'));var licenseUtil=require(_0x47a5('0x14'));var db=require(_0x47a5('0x15'))['db'];function respondWithStatusCode(_0xd308b8,_0x1eae59){_0x1eae59=_0x1eae59||0xcc;return function(_0x5beb89){if(_0x5beb89){return _0xd308b8[_0x47a5('0x16')](_0x1eae59);}return _0xd308b8[_0x47a5('0x17')](_0x1eae59)[_0x47a5('0x18')]();};}function respondWithResult(_0x711793,_0x139f25){_0x139f25=_0x139f25||0xc8;return function(_0x620ee9){if(_0x620ee9){return _0x711793[_0x47a5('0x17')](_0x139f25)[_0x47a5('0x19')](_0x620ee9);}};}function respondWithFilteredResult(_0x4e99a8,_0x362359){return function(_0x11faf5){if(_0x11faf5){var _0x3b001e=typeof _0x362359[_0x47a5('0x1a')]===_0x47a5('0x1b')&&typeof _0x362359['limit']==='undefined';var _0x138bc0=_0x11faf5['count'];var _0x5247fd=_0x3b001e?0x0:_0x362359[_0x47a5('0x1a')];var _0xaf70a6=_0x3b001e?_0x11faf5[_0x47a5('0x1c')]:_0x362359[_0x47a5('0x1a')]+_0x362359[_0x47a5('0x1d')];var _0x12b98e;if(_0xaf70a6>=_0x138bc0){_0xaf70a6=_0x138bc0;_0x12b98e=0xc8;}else{_0x12b98e=0xce;}_0x4e99a8[_0x47a5('0x17')](_0x12b98e);return _0x4e99a8[_0x47a5('0x1e')](_0x47a5('0x1f'),_0x5247fd+'-'+_0xaf70a6+'/'+_0x138bc0)['json'](_0x11faf5);}return null;};}function patchUpdates(_0x1570bc){return function(_0xf160ba){try{jsonpatch['apply'](_0xf160ba,_0x1570bc,!![]);}catch(_0x2b0360){return BPromise[_0x47a5('0x20')](_0x2b0360);}return _0xf160ba[_0x47a5('0x21')]();};}function saveUpdates(_0x4c5910,_0xb8ae6c){return function(_0x2f142b){if(_0x2f142b){return _0x2f142b[_0x47a5('0x22')](_0x4c5910)[_0x47a5('0x23')](function(_0x5ef1b1){return _0x5ef1b1;});}return null;};}function removeEntity(_0xe2dea9,_0x385687){return function(_0x513981){if(_0x513981){return _0x513981[_0x47a5('0x24')]()[_0x47a5('0x23')](function(){_0xe2dea9[_0x47a5('0x17')](0xcc)[_0x47a5('0x18')]();});}};}function handleEntityNotFound(_0x3abd6a,_0x50bf17){return function(_0x53078a){if(!_0x53078a){_0x3abd6a[_0x47a5('0x16')](0x194);}return _0x53078a;};}function handleError(_0x5686db,_0x1ea9c8){_0x1ea9c8=_0x1ea9c8||0x1f4;return function(_0x5b6c4e){logger[_0x47a5('0x25')](_0x5b6c4e[_0x47a5('0x26')]);if(_0x5b6c4e[_0x47a5('0x27')]){delete _0x5b6c4e[_0x47a5('0x27')];}_0x5686db[_0x47a5('0x17')](_0x1ea9c8)[_0x47a5('0x28')](_0x5b6c4e);};}exports[_0x47a5('0x29')]=function(_0x136b14,_0x16631f){var _0x361bfa={},_0x1127f8={},_0x11a4fa={'count':0x0,'rows':[]};var _0x3ad507=_['map'](db[_0x47a5('0x2a')]['rawAttributes'],function(_0x2ef875){return{'name':_0x2ef875[_0x47a5('0x2b')],'type':_0x2ef875[_0x47a5('0x2c')]['key']};});_0x1127f8[_0x47a5('0x2d')]=_[_0x47a5('0x2e')](_0x3ad507,_0x47a5('0x27'));_0x1127f8[_0x47a5('0x2f')]=_['keys'](_0x136b14['query']);_0x1127f8[_0x47a5('0x30')]=_[_0x47a5('0x31')](_0x1127f8['model'],_0x1127f8['query']);_0x361bfa[_0x47a5('0x32')]=_[_0x47a5('0x31')](_0x1127f8['model'],qs[_0x47a5('0x33')](_0x136b14['query'][_0x47a5('0x33')]));_0x361bfa[_0x47a5('0x32')]=_0x361bfa['attributes']['length']?_0x361bfa[_0x47a5('0x32')]:_0x1127f8['model'];if(!_0x136b14[_0x47a5('0x2f')][_0x47a5('0x34')](_0x47a5('0x35'))){_0x361bfa['limit']=qs[_0x47a5('0x1d')](_0x136b14['query']['limit']);_0x361bfa[_0x47a5('0x1a')]=qs['offset'](_0x136b14[_0x47a5('0x2f')]['offset']);}_0x361bfa[_0x47a5('0x36')]=qs[_0x47a5('0x37')](_0x136b14[_0x47a5('0x2f')][_0x47a5('0x37')]);_0x361bfa[_0x47a5('0x38')]=qs[_0x47a5('0x30')](_[_0x47a5('0x39')](_0x136b14[_0x47a5('0x2f')],_0x1127f8[_0x47a5('0x30')]),_0x3ad507);if(_0x136b14['query'][_0x47a5('0x3a')]){_0x361bfa[_0x47a5('0x38')]=_['merge'](_0x361bfa[_0x47a5('0x38')],{'$or':_[_0x47a5('0x2e')](_0x3ad507,function(_0x1d4348){if(_0x1d4348['type']!==_0x47a5('0x3b')){var _0x10f660={};_0x10f660[_0x1d4348['name']]={'$like':'%'+_0x136b14[_0x47a5('0x2f')][_0x47a5('0x3a')]+'%'};return _0x10f660;}})});}_0x361bfa=_['merge']({},_0x361bfa,_0x136b14['options']);var _0x5ebd8c={'where':_0x361bfa[_0x47a5('0x38')]};return db['ChatOfflineMessage'][_0x47a5('0x1c')](_0x5ebd8c)[_0x47a5('0x23')](function(_0x301a85){_0x11a4fa[_0x47a5('0x1c')]=_0x301a85;if(_0x136b14[_0x47a5('0x2f')][_0x47a5('0x3c')]){_0x361bfa[_0x47a5('0x3d')]=[{'all':!![]}];}return db[_0x47a5('0x2a')][_0x47a5('0x3e')](_0x361bfa);})[_0x47a5('0x23')](function(_0x280500){_0x11a4fa[_0x47a5('0x3f')]=_0x280500;return _0x11a4fa;})[_0x47a5('0x23')](respondWithFilteredResult(_0x16631f,_0x361bfa))['catch'](handleError(_0x16631f,null));};exports[_0x47a5('0x40')]=function(_0x1c36fa,_0x331474){var _0x23bd8d={'raw':!![],'where':{'id':_0x1c36fa[_0x47a5('0x41')]['id']}},_0x586f4f={};_0x586f4f['model']=_['keys'](db['ChatOfflineMessage']['rawAttributes']);_0x586f4f[_0x47a5('0x2f')]=_['keys'](_0x1c36fa[_0x47a5('0x2f')]);_0x586f4f[_0x47a5('0x30')]=_[_0x47a5('0x31')](_0x586f4f['model'],_0x586f4f[_0x47a5('0x2f')]);_0x23bd8d[_0x47a5('0x32')]=_['intersection'](_0x586f4f['model'],qs[_0x47a5('0x33')](_0x1c36fa['query'][_0x47a5('0x33')]));_0x23bd8d[_0x47a5('0x32')]=_0x23bd8d[_0x47a5('0x32')][_0x47a5('0x42')]?_0x23bd8d[_0x47a5('0x32')]:_0x586f4f[_0x47a5('0x2d')];if(_0x1c36fa[_0x47a5('0x2f')][_0x47a5('0x3c')]){_0x23bd8d[_0x47a5('0x3d')]=[{'all':!![]}];}_0x23bd8d=_[_0x47a5('0x43')]({},_0x23bd8d,_0x1c36fa[_0x47a5('0x44')]);return db[_0x47a5('0x2a')][_0x47a5('0x45')](_0x23bd8d)[_0x47a5('0x23')](handleEntityNotFound(_0x331474,null))[_0x47a5('0x23')](respondWithResult(_0x331474,null))[_0x47a5('0x46')](handleError(_0x331474,null));};exports['create']=function(_0x2d38de,_0x23bb04){return db['ChatOfflineMessage']['create'](_0x2d38de[_0x47a5('0x47')],{})['then'](respondWithResult(_0x23bb04,0xc9))[_0x47a5('0x46')](handleError(_0x23bb04,null));};exports[_0x47a5('0x22')]=function(_0x54c35f,_0x4f62d3){if(_0x54c35f[_0x47a5('0x47')]['id']){delete _0x54c35f['body']['id'];}return db[_0x47a5('0x2a')][_0x47a5('0x45')]({'where':{'id':_0x54c35f[_0x47a5('0x41')]['id']}})[_0x47a5('0x23')](handleEntityNotFound(_0x4f62d3,null))[_0x47a5('0x23')](saveUpdates(_0x54c35f[_0x47a5('0x47')],null))[_0x47a5('0x23')](respondWithResult(_0x4f62d3,null))['catch'](handleError(_0x4f62d3,null));};exports['destroy']=function(_0x2dd1db,_0x411230){return db[_0x47a5('0x48')][_0x47a5('0x3e')]({'where':{'ChatOfflineMessageId':_0x2dd1db[_0x47a5('0x41')]['id']},'raw':!![]})[_0x47a5('0x23')](function(_0x249de5){_0x249de5['forEach'](function(_0x45cca5){var _0x1c9a62=path[_0x47a5('0x49')](config['root'],_0x47a5('0x4a'),'files',_0x47a5('0x4b'),_0x47a5('0x4c'),_0x45cca5[_0x47a5('0x4d')]);var _0xf03bd5=fs['existsSync'](_0x1c9a62);if(_0xf03bd5)fs_extra[_0x47a5('0x4e')](_0x1c9a62);});})[_0x47a5('0x23')](function(){return db[_0x47a5('0x2a')][_0x47a5('0x45')]({'where':{'id':_0x2dd1db[_0x47a5('0x41')]['id']},'individualHooks':!![]});})[_0x47a5('0x23')](handleEntityNotFound(_0x411230,null))[_0x47a5('0x23')](removeEntity(_0x411230,null))['catch'](handleError(_0x411230,null));};exports[_0x47a5('0x4f')]=function(_0x43721b,_0x187d7e){return db[_0x47a5('0x2a')][_0x47a5('0x4f')]()[_0x47a5('0x23')](respondWithResult(_0x187d7e,null))['catch'](handleError(_0x187d7e,null));}; \ No newline at end of file +var _0x7a54=['filter','VIRTUAL','includeAll','include','findAll','rows','show','params','length','merge','options','find','catch','body','Attachment','join','server','attachments','offline-chat','basename','remove','describe','eml-format','rimraf','zip-dir','request-promise','moment','mustache','util','path','sox','to-csv','fs-extra','squel','crypto','desk.js','ioredis','../../components/auth/service','../../components/parsers/advancedSearch','api','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','sendStatus','status','end','json','offset','undefined','count','limit','set','Content-Range','reject','save','update','then','destroy','error','stack','name','send','index','ChatOfflineMessage','fieldName','type','model','map','query','filters','intersection','attributes','fields','hasOwnProperty','nolimit','order','sort','where','pick'];(function(_0xa6cc5c,_0x239c99){var _0x44803d=function(_0x515b6e){while(--_0x515b6e){_0xa6cc5c['push'](_0xa6cc5c['shift']());}};_0x44803d(++_0x239c99);}(_0x7a54,0x106));var _0x47a5=function(_0x5d5e8c,_0x202c81){_0x5d5e8c=_0x5d5e8c-0x0;var _0x37dda1=_0x7a54[_0x5d5e8c];return _0x37dda1;};'use strict';var emlformat=require(_0x47a5('0x0'));var rimraf=require(_0x47a5('0x1'));var zipdir=require(_0x47a5('0x2'));var jsonpatch=require('fast-json-patch');var rp=require(_0x47a5('0x3'));var moment=require(_0x47a5('0x4'));var BPromise=require('bluebird');var Mustache=require(_0x47a5('0x5'));var util=require(_0x47a5('0x6'));var path=require(_0x47a5('0x7'));var sox=require(_0x47a5('0x8'));var csv=require(_0x47a5('0x9'));var ejs=require('ejs');var fs=require('fs');var fs_extra=require(_0x47a5('0xa'));var _=require('lodash');var squel=require(_0x47a5('0xb'));var crypto=require(_0x47a5('0xc'));var jsforce=require('jsforce');var deskjs=require(_0x47a5('0xd'));var toCsv=require('to-csv');var querystring=require('querystring');var Papa=require('papaparse');var Redis=require(_0x47a5('0xe'));var authService=require(_0x47a5('0xf'));var qs=require('../../components/parsers/qs');var as=require(_0x47a5('0x10'));var hardwareService=require('../../config/license/hardware');var logger=require('../../config/logger')(_0x47a5('0x11'));var utils=require(_0x47a5('0x12'));var config=require(_0x47a5('0x13'));var licenseUtil=require(_0x47a5('0x14'));var db=require(_0x47a5('0x15'))['db'];function respondWithStatusCode(_0xd308b8,_0x1eae59){_0x1eae59=_0x1eae59||0xcc;return function(_0x5beb89){if(_0x5beb89){return _0xd308b8[_0x47a5('0x16')](_0x1eae59);}return _0xd308b8[_0x47a5('0x17')](_0x1eae59)[_0x47a5('0x18')]();};}function respondWithResult(_0x711793,_0x139f25){_0x139f25=_0x139f25||0xc8;return function(_0x620ee9){if(_0x620ee9){return _0x711793[_0x47a5('0x17')](_0x139f25)[_0x47a5('0x19')](_0x620ee9);}};}function respondWithFilteredResult(_0x4e99a8,_0x362359){return function(_0x11faf5){if(_0x11faf5){var _0x3b001e=typeof _0x362359[_0x47a5('0x1a')]===_0x47a5('0x1b')&&typeof _0x362359['limit']==='undefined';var _0x138bc0=_0x11faf5['count'];var _0x5247fd=_0x3b001e?0x0:_0x362359[_0x47a5('0x1a')];var _0xaf70a6=_0x3b001e?_0x11faf5[_0x47a5('0x1c')]:_0x362359[_0x47a5('0x1a')]+_0x362359[_0x47a5('0x1d')];var _0x12b98e;if(_0xaf70a6>=_0x138bc0){_0xaf70a6=_0x138bc0;_0x12b98e=0xc8;}else{_0x12b98e=0xce;}_0x4e99a8[_0x47a5('0x17')](_0x12b98e);return _0x4e99a8[_0x47a5('0x1e')](_0x47a5('0x1f'),_0x5247fd+'-'+_0xaf70a6+'/'+_0x138bc0)['json'](_0x11faf5);}return null;};}function patchUpdates(_0x1570bc){return function(_0xf160ba){try{jsonpatch['apply'](_0xf160ba,_0x1570bc,!![]);}catch(_0x2b0360){return BPromise[_0x47a5('0x20')](_0x2b0360);}return _0xf160ba[_0x47a5('0x21')]();};}function saveUpdates(_0x4c5910,_0xb8ae6c){return function(_0x2f142b){if(_0x2f142b){return _0x2f142b[_0x47a5('0x22')](_0x4c5910)[_0x47a5('0x23')](function(_0x5ef1b1){return _0x5ef1b1;});}return null;};}function removeEntity(_0xe2dea9,_0x385687){return function(_0x513981){if(_0x513981){return _0x513981[_0x47a5('0x24')]()[_0x47a5('0x23')](function(){_0xe2dea9[_0x47a5('0x17')](0xcc)[_0x47a5('0x18')]();});}};}function handleEntityNotFound(_0x3abd6a,_0x50bf17){return function(_0x53078a){if(!_0x53078a){_0x3abd6a[_0x47a5('0x16')](0x194);}return _0x53078a;};}function handleError(_0x5686db,_0x1ea9c8){_0x1ea9c8=_0x1ea9c8||0x1f4;return function(_0x5b6c4e){logger[_0x47a5('0x25')](_0x5b6c4e[_0x47a5('0x26')]);if(_0x5b6c4e[_0x47a5('0x27')]){delete _0x5b6c4e[_0x47a5('0x27')];}_0x5686db[_0x47a5('0x17')](_0x1ea9c8)[_0x47a5('0x28')](_0x5b6c4e);};}exports[_0x47a5('0x29')]=function(_0x136b14,_0x16631f){var _0x361bfa={},_0x1127f8={},_0x11a4fa={'count':0x0,'rows':[]};var _0x3ad507=_['map'](db[_0x47a5('0x2a')]['rawAttributes'],function(_0x2ef875){return{'name':_0x2ef875[_0x47a5('0x2b')],'type':_0x2ef875[_0x47a5('0x2c')]['key']};});_0x1127f8[_0x47a5('0x2d')]=_[_0x47a5('0x2e')](_0x3ad507,_0x47a5('0x27'));_0x1127f8[_0x47a5('0x2f')]=_['keys'](_0x136b14['query']);_0x1127f8[_0x47a5('0x30')]=_[_0x47a5('0x31')](_0x1127f8['model'],_0x1127f8['query']);_0x361bfa[_0x47a5('0x32')]=_[_0x47a5('0x31')](_0x1127f8['model'],qs[_0x47a5('0x33')](_0x136b14['query'][_0x47a5('0x33')]));_0x361bfa[_0x47a5('0x32')]=_0x361bfa['attributes']['length']?_0x361bfa[_0x47a5('0x32')]:_0x1127f8['model'];if(!_0x136b14[_0x47a5('0x2f')][_0x47a5('0x34')](_0x47a5('0x35'))){_0x361bfa['limit']=qs[_0x47a5('0x1d')](_0x136b14['query']['limit']);_0x361bfa[_0x47a5('0x1a')]=qs['offset'](_0x136b14[_0x47a5('0x2f')]['offset']);}_0x361bfa[_0x47a5('0x36')]=qs[_0x47a5('0x37')](_0x136b14[_0x47a5('0x2f')][_0x47a5('0x37')]);_0x361bfa[_0x47a5('0x38')]=qs[_0x47a5('0x30')](_[_0x47a5('0x39')](_0x136b14[_0x47a5('0x2f')],_0x1127f8[_0x47a5('0x30')]),_0x3ad507);if(_0x136b14['query'][_0x47a5('0x3a')]){_0x361bfa[_0x47a5('0x38')]=_['merge'](_0x361bfa[_0x47a5('0x38')],{'$or':_[_0x47a5('0x2e')](_0x3ad507,function(_0x1d4348){if(_0x1d4348['type']!==_0x47a5('0x3b')){var _0x10f660={};_0x10f660[_0x1d4348['name']]={'$like':'%'+_0x136b14[_0x47a5('0x2f')][_0x47a5('0x3a')]+'%'};return _0x10f660;}})});}_0x361bfa=_['merge']({},_0x361bfa,_0x136b14['options']);var _0x5ebd8c={'where':_0x361bfa[_0x47a5('0x38')]};return db['ChatOfflineMessage'][_0x47a5('0x1c')](_0x5ebd8c)[_0x47a5('0x23')](function(_0x301a85){_0x11a4fa[_0x47a5('0x1c')]=_0x301a85;if(_0x136b14[_0x47a5('0x2f')][_0x47a5('0x3c')]){_0x361bfa[_0x47a5('0x3d')]=[{'all':!![]}];}return db[_0x47a5('0x2a')][_0x47a5('0x3e')](_0x361bfa);})[_0x47a5('0x23')](function(_0x280500){_0x11a4fa[_0x47a5('0x3f')]=_0x280500;return _0x11a4fa;})[_0x47a5('0x23')](respondWithFilteredResult(_0x16631f,_0x361bfa))['catch'](handleError(_0x16631f,null));};exports[_0x47a5('0x40')]=function(_0x1c36fa,_0x331474){var _0x23bd8d={'raw':!![],'where':{'id':_0x1c36fa[_0x47a5('0x41')]['id']}},_0x586f4f={};_0x586f4f['model']=_['keys'](db['ChatOfflineMessage']['rawAttributes']);_0x586f4f[_0x47a5('0x2f')]=_['keys'](_0x1c36fa[_0x47a5('0x2f')]);_0x586f4f[_0x47a5('0x30')]=_[_0x47a5('0x31')](_0x586f4f['model'],_0x586f4f[_0x47a5('0x2f')]);_0x23bd8d[_0x47a5('0x32')]=_['intersection'](_0x586f4f['model'],qs[_0x47a5('0x33')](_0x1c36fa['query'][_0x47a5('0x33')]));_0x23bd8d[_0x47a5('0x32')]=_0x23bd8d[_0x47a5('0x32')][_0x47a5('0x42')]?_0x23bd8d[_0x47a5('0x32')]:_0x586f4f[_0x47a5('0x2d')];if(_0x1c36fa[_0x47a5('0x2f')][_0x47a5('0x3c')]){_0x23bd8d[_0x47a5('0x3d')]=[{'all':!![]}];}_0x23bd8d=_[_0x47a5('0x43')]({},_0x23bd8d,_0x1c36fa[_0x47a5('0x44')]);return db[_0x47a5('0x2a')][_0x47a5('0x45')](_0x23bd8d)[_0x47a5('0x23')](handleEntityNotFound(_0x331474,null))[_0x47a5('0x23')](respondWithResult(_0x331474,null))[_0x47a5('0x46')](handleError(_0x331474,null));};exports['create']=function(_0x2d38de,_0x23bb04){return db['ChatOfflineMessage']['create'](_0x2d38de[_0x47a5('0x47')],{})['then'](respondWithResult(_0x23bb04,0xc9))[_0x47a5('0x46')](handleError(_0x23bb04,null));};exports[_0x47a5('0x22')]=function(_0x54c35f,_0x4f62d3){if(_0x54c35f[_0x47a5('0x47')]['id']){delete _0x54c35f['body']['id'];}return db[_0x47a5('0x2a')][_0x47a5('0x45')]({'where':{'id':_0x54c35f[_0x47a5('0x41')]['id']}})[_0x47a5('0x23')](handleEntityNotFound(_0x4f62d3,null))[_0x47a5('0x23')](saveUpdates(_0x54c35f[_0x47a5('0x47')],null))[_0x47a5('0x23')](respondWithResult(_0x4f62d3,null))['catch'](handleError(_0x4f62d3,null));};exports['destroy']=function(_0x2dd1db,_0x411230){return db[_0x47a5('0x48')][_0x47a5('0x3e')]({'where':{'ChatOfflineMessageId':_0x2dd1db[_0x47a5('0x41')]['id']},'raw':!![]})[_0x47a5('0x23')](function(_0x249de5){_0x249de5['forEach'](function(_0x45cca5){var _0x1c9a62=path[_0x47a5('0x49')](config['root'],_0x47a5('0x4a'),'files',_0x47a5('0x4b'),_0x47a5('0x4c'),_0x45cca5[_0x47a5('0x4d')]);var _0xf03bd5=fs['existsSync'](_0x1c9a62);if(_0xf03bd5)fs_extra[_0x47a5('0x4e')](_0x1c9a62);});})[_0x47a5('0x23')](function(){return db[_0x47a5('0x2a')][_0x47a5('0x45')]({'where':{'id':_0x2dd1db[_0x47a5('0x41')]['id']},'individualHooks':!![]});})[_0x47a5('0x23')](handleEntityNotFound(_0x411230,null))[_0x47a5('0x23')](removeEntity(_0x411230,null))['catch'](handleError(_0x411230,null));};exports[_0x47a5('0x4f')]=function(_0x43721b,_0x187d7e){return db[_0x47a5('0x2a')][_0x47a5('0x4f')]()[_0x47a5('0x23')](respondWithResult(_0x187d7e,null))['catch'](handleError(_0x187d7e,null));}; \ No newline at end of file diff --git a/server/api/chatOfflineMessage/chatOfflineMessage.events.js b/server/api/chatOfflineMessage/chatOfflineMessage.events.js index 7cb4a63..603adbe 100644 --- a/server/api/chatOfflineMessage/chatOfflineMessage.events.js +++ b/server/api/chatOfflineMessage/chatOfflineMessage.events.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x8604=['save','update','remove','emit','hasOwnProperty','hook','events','../../mysqldb','ChatOfflineMessage','setMaxListeners'];(function(_0x5d0eba,_0x105026){var _0x4b7921=function(_0x2aad79){while(--_0x2aad79){_0x5d0eba['push'](_0x5d0eba['shift']());}};_0x4b7921(++_0x105026);}(_0x8604,0x100));var _0x4860=function(_0x319a65,_0x5860aa){_0x319a65=_0x319a65-0x0;var _0xd4a450=_0x8604[_0x319a65];return _0xd4a450;};'use strict';var EventEmitter=require(_0x4860('0x0'));var ChatOfflineMessage=require(_0x4860('0x1'))['db'][_0x4860('0x2')];var ChatOfflineMessageEvents=new EventEmitter();ChatOfflineMessageEvents[_0x4860('0x3')](0x0);var events={'afterCreate':_0x4860('0x4'),'afterUpdate':_0x4860('0x5'),'afterDestroy':_0x4860('0x6')};function emitEvent(_0x53474a){return function(_0x13b1ad,_0x6c95b0,_0xb90d93){ChatOfflineMessageEvents[_0x4860('0x7')](_0x53474a+':'+_0x13b1ad['id'],_0x13b1ad);ChatOfflineMessageEvents['emit'](_0x53474a,_0x13b1ad);_0xb90d93(null);};}for(var e in events){if(events[_0x4860('0x8')](e)){var event=events[e];ChatOfflineMessage[_0x4860('0x9')](e,emitEvent(event));}}module['exports']=ChatOfflineMessageEvents; \ No newline at end of file +var _0x45a4=['remove','hasOwnProperty','exports','events','../../mysqldb','setMaxListeners','save','update'];(function(_0x2ac2de,_0x109a1e){var _0xf453a1=function(_0x44a302){while(--_0x44a302){_0x2ac2de['push'](_0x2ac2de['shift']());}};_0xf453a1(++_0x109a1e);}(_0x45a4,0xf3));var _0x445a=function(_0x17e006,_0x2886a6){_0x17e006=_0x17e006-0x0;var _0x527f32=_0x45a4[_0x17e006];return _0x527f32;};'use strict';var EventEmitter=require(_0x445a('0x0'));var ChatOfflineMessage=require(_0x445a('0x1'))['db']['ChatOfflineMessage'];var ChatOfflineMessageEvents=new EventEmitter();ChatOfflineMessageEvents[_0x445a('0x2')](0x0);var events={'afterCreate':_0x445a('0x3'),'afterUpdate':_0x445a('0x4'),'afterDestroy':_0x445a('0x5')};function emitEvent(_0x8956e2){return function(_0x4c8b6c,_0x29892d,_0x5dcce2){ChatOfflineMessageEvents['emit'](_0x8956e2+':'+_0x4c8b6c['id'],_0x4c8b6c);ChatOfflineMessageEvents['emit'](_0x8956e2,_0x4c8b6c);_0x5dcce2(null);};}for(var e in events){if(events[_0x445a('0x6')](e)){var event=events[e];ChatOfflineMessage['hook'](e,emitEvent(event));}}module[_0x445a('0x7')]=ChatOfflineMessageEvents; \ No newline at end of file diff --git a/server/api/chatOfflineMessage/chatOfflineMessage.model.js b/server/api/chatOfflineMessage/chatOfflineMessage.model.js index b60ae7a..5b82450 100644 --- a/server/api/chatOfflineMessage/chatOfflineMessage.model.js +++ b/server/api/chatOfflineMessage/chatOfflineMessage.model.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x4aa1=['exports','define','ChatOfflineMessage','chat_offline_messages','utf8mb4','./chatOfflineMessage.attributes'];(function(_0x1b0424,_0x3c71f7){var _0x15a4cb=function(_0x8c943b){while(--_0x8c943b){_0x1b0424['push'](_0x1b0424['shift']());}};_0x15a4cb(++_0x3c71f7);}(_0x4aa1,0x13d));var _0x14aa=function(_0x39368c,_0x3edeb8){_0x39368c=_0x39368c-0x0;var _0x49a872=_0x4aa1[_0x39368c];return _0x49a872;};'use strict';var attributes=require(_0x14aa('0x0'));module[_0x14aa('0x1')]=function(_0x816304){return _0x816304[_0x14aa('0x2')](_0x14aa('0x3'),attributes,{'tableName':_0x14aa('0x4'),'paranoid':![],'indexes':[],'timestamps':!![],'charset':_0x14aa('0x5'),'collate':'utf8mb4_unicode_ci'});}; \ No newline at end of file +var _0x2ed1=['chat_offline_messages','utf8mb4','utf8mb4_unicode_ci','./chatOfflineMessage.attributes','exports','ChatOfflineMessage'];(function(_0x12d514,_0x17f823){var _0xa58573=function(_0x485748){while(--_0x485748){_0x12d514['push'](_0x12d514['shift']());}};_0xa58573(++_0x17f823);}(_0x2ed1,0xf3));var _0x12ed=function(_0x2abb5c,_0xf59bd){_0x2abb5c=_0x2abb5c-0x0;var _0x17ec75=_0x2ed1[_0x2abb5c];return _0x17ec75;};'use strict';var attributes=require(_0x12ed('0x0'));module[_0x12ed('0x1')]=function(_0x57176a){return _0x57176a['define'](_0x12ed('0x2'),attributes,{'tableName':_0x12ed('0x3'),'paranoid':![],'indexes':[],'timestamps':!![],'charset':_0x12ed('0x4'),'collate':_0x12ed('0x5')});}; \ No newline at end of file diff --git a/server/api/chatOfflineMessage/chatOfflineMessage.rpc.js b/server/api/chatOfflineMessage/chatOfflineMessage.rpc.js index 162e230..69db1f4 100644 --- a/server/api/chatOfflineMessage/chatOfflineMessage.rpc.js +++ b/server/api/chatOfflineMessage/chatOfflineMessage.rpc.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x6838=['../../config/utils','../../config/logger','rpc','../../config/environment','client','http','request','then','info','ChatOfflineMessage,\x20%s,\x20%s','request\x20sent','debug','ChatOfflineMessage,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','catch','util','randomstring'];(function(_0xa5610f,_0xf54458){var _0x29dcec=function(_0x36aef5){while(--_0x36aef5){_0xa5610f['push'](_0xa5610f['shift']());}};_0x29dcec(++_0xf54458);}(_0x6838,0x67));var _0x8683=function(_0xfd1fcd,_0x3182b7){_0xfd1fcd=_0xfd1fcd-0x0;var _0x1e0646=_0x6838[_0xfd1fcd];return _0x1e0646;};'use strict';var _=require('lodash');var util=require(_0x8683('0x0'));var moment=require('moment');var BPromise=require('bluebird');var rs=require(_0x8683('0x1'));var fs=require('fs');var Redis=require('ioredis');var db=require('../../mysqldb')['db'];var utils=require(_0x8683('0x2'));var logger=require(_0x8683('0x3'))(_0x8683('0x4'));var config=require(_0x8683('0x5'));var jayson=require('jayson/promise');var client=jayson[_0x8683('0x6')][_0x8683('0x7')]({'port':0x232a});function respondWithRpcPromise(_0x32680b,_0x592de9,_0x1ec478){return new BPromise(function(_0x135151,_0x19f4cd){return client[_0x8683('0x8')](_0x32680b,_0x1ec478)[_0x8683('0x9')](function(_0x13f7c6){logger[_0x8683('0xa')](_0x8683('0xb'),_0x592de9,_0x8683('0xc'));logger[_0x8683('0xd')](_0x8683('0xe'),_0x592de9,'request\x20sent',JSON[_0x8683('0xf')](_0x13f7c6));if(_0x13f7c6['error']){if(_0x13f7c6[_0x8683('0x10')][_0x8683('0x11')]===0x1f4){logger['error'](_0x8683('0xb'),_0x592de9,_0x13f7c6[_0x8683('0x10')][_0x8683('0x12')]);return _0x19f4cd(_0x13f7c6[_0x8683('0x10')][_0x8683('0x12')]);}logger[_0x8683('0x10')]('ChatOfflineMessage,\x20%s,\x20%s',_0x592de9,_0x13f7c6[_0x8683('0x10')][_0x8683('0x12')]);return _0x135151(_0x13f7c6['error']['message']);}else{logger[_0x8683('0xa')](_0x8683('0xb'),_0x592de9,_0x8683('0xc'));_0x135151(_0x13f7c6[_0x8683('0x13')]['message']);}})[_0x8683('0x14')](function(_0x24f81e){logger[_0x8683('0x10')]('ChatOfflineMessage,\x20%s,\x20%s',_0x592de9,_0x24f81e);_0x19f4cd(_0x24f81e);});});} \ No newline at end of file +var _0xa994=['jayson/promise','http','request','then','info','ChatOfflineMessage,\x20%s,\x20%s','request\x20sent','debug','stringify','error','message','result','lodash','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/logger','rpc'];(function(_0xbba12d,_0x17b51c){var _0x8d5a98=function(_0x58270e){while(--_0x58270e){_0xbba12d['push'](_0xbba12d['shift']());}};_0x8d5a98(++_0x17b51c);}(_0xa994,0x108));var _0x4a99=function(_0x69af90,_0x46c99d){_0x69af90=_0x69af90-0x0;var _0x3cc1d4=_0xa994[_0x69af90];return _0x3cc1d4;};'use strict';var _=require(_0x4a99('0x0'));var util=require(_0x4a99('0x1'));var moment=require(_0x4a99('0x2'));var BPromise=require(_0x4a99('0x3'));var rs=require(_0x4a99('0x4'));var fs=require('fs');var Redis=require(_0x4a99('0x5'));var db=require(_0x4a99('0x6'))['db'];var utils=require('../../config/utils');var logger=require(_0x4a99('0x7'))(_0x4a99('0x8'));var config=require('../../config/environment');var jayson=require(_0x4a99('0x9'));var client=jayson['client'][_0x4a99('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x280804,_0x2fda1d,_0x699bfc){return new BPromise(function(_0x17195c,_0x3ff23c){return client[_0x4a99('0xb')](_0x280804,_0x699bfc)[_0x4a99('0xc')](function(_0x20c347){logger[_0x4a99('0xd')](_0x4a99('0xe'),_0x2fda1d,_0x4a99('0xf'));logger[_0x4a99('0x10')]('ChatOfflineMessage,\x20%s,\x20%s,\x20%s',_0x2fda1d,_0x4a99('0xf'),JSON[_0x4a99('0x11')](_0x20c347));if(_0x20c347[_0x4a99('0x12')]){if(_0x20c347[_0x4a99('0x12')]['code']===0x1f4){logger['error'](_0x4a99('0xe'),_0x2fda1d,_0x20c347[_0x4a99('0x12')][_0x4a99('0x13')]);return _0x3ff23c(_0x20c347[_0x4a99('0x12')][_0x4a99('0x13')]);}logger[_0x4a99('0x12')](_0x4a99('0xe'),_0x2fda1d,_0x20c347['error']['message']);return _0x17195c(_0x20c347[_0x4a99('0x12')][_0x4a99('0x13')]);}else{logger[_0x4a99('0xd')]('ChatOfflineMessage,\x20%s,\x20%s',_0x2fda1d,'request\x20sent');_0x17195c(_0x20c347[_0x4a99('0x14')][_0x4a99('0x13')]);}})['catch'](function(_0x4d9088){logger[_0x4a99('0x12')](_0x4a99('0xe'),_0x2fda1d,_0x4d9088);_0x3ff23c(_0x4d9088);});});} \ No newline at end of file diff --git a/server/api/chatOfflineMessage/index.js b/server/api/chatOfflineMessage/index.js index 859dc09..3a40dfa 100644 --- a/server/api/chatOfflineMessage/index.js +++ b/server/api/chatOfflineMessage/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x04a9=['show','put','update','delete','exports','multer','util','path','connect-timeout','express','../../components/auth/service','../../components/interaction/service','../../config/environment','./chatOfflineMessage.controller','get','index','/describe','isAuthenticated','describe','/:id'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0x04a9,0xe1));var _0x904a=function(_0x54f838,_0xf940f2){_0x54f838=_0x54f838-0x0;var _0xd1a984=_0x04a9[_0x54f838];return _0xd1a984;};'use strict';var multer=require(_0x904a('0x0'));var util=require(_0x904a('0x1'));var path=require(_0x904a('0x2'));var timeout=require(_0x904a('0x3'));var express=require(_0x904a('0x4'));var router=express['Router']();var fs_extra=require('fs-extra');var auth=require(_0x904a('0x5'));var interaction=require(_0x904a('0x6'));var config=require(_0x904a('0x7'));var controller=require(_0x904a('0x8'));router[_0x904a('0x9')]('/',auth['isAuthenticated'](),controller[_0x904a('0xa')]);router[_0x904a('0x9')](_0x904a('0xb'),auth[_0x904a('0xc')](),controller[_0x904a('0xd')]);router['get'](_0x904a('0xe'),auth[_0x904a('0xc')](),controller[_0x904a('0xf')]);router['post']('/',auth[_0x904a('0xc')](),controller['create']);router[_0x904a('0x10')](_0x904a('0xe'),auth[_0x904a('0xc')](),controller[_0x904a('0x11')]);router[_0x904a('0x12')]('/:id',auth[_0x904a('0xc')](),controller['destroy']);module[_0x904a('0x13')]=router; \ No newline at end of file +var _0x9288=['express','Router','fs-extra','../../components/interaction/service','get','isAuthenticated','index','describe','/:id','show','post','create','update','destroy','exports','util','connect-timeout'];(function(_0x32f38b,_0x1b4fc7){var _0x15ec9b=function(_0x1331da){while(--_0x1331da){_0x32f38b['push'](_0x32f38b['shift']());}};_0x15ec9b(++_0x1b4fc7);}(_0x9288,0x1c9));var _0x8928=function(_0x10529b,_0x187296){_0x10529b=_0x10529b-0x0;var _0x3548ef=_0x9288[_0x10529b];return _0x3548ef;};'use strict';var multer=require('multer');var util=require(_0x8928('0x0'));var path=require('path');var timeout=require(_0x8928('0x1'));var express=require(_0x8928('0x2'));var router=express[_0x8928('0x3')]();var fs_extra=require(_0x8928('0x4'));var auth=require('../../components/auth/service');var interaction=require(_0x8928('0x5'));var config=require('../../config/environment');var controller=require('./chatOfflineMessage.controller');router[_0x8928('0x6')]('/',auth[_0x8928('0x7')](),controller[_0x8928('0x8')]);router['get']('/describe',auth[_0x8928('0x7')](),controller[_0x8928('0x9')]);router[_0x8928('0x6')](_0x8928('0xa'),auth['isAuthenticated'](),controller[_0x8928('0xb')]);router[_0x8928('0xc')]('/',auth['isAuthenticated'](),controller[_0x8928('0xd')]);router['put'](_0x8928('0xa'),auth['isAuthenticated'](),controller[_0x8928('0xe')]);router['delete'](_0x8928('0xa'),auth[_0x8928('0x7')](),controller[_0x8928('0xf')]);module[_0x8928('0x10')]=router; \ No newline at end of file diff --git a/server/api/chatProactiveAction/chatProactiveAction.attributes.js b/server/api/chatProactiveAction/chatProactiveAction.attributes.js index e6aed0f..14988a9 100644 --- a/server/api/chatProactiveAction/chatProactiveAction.attributes.js +++ b/server/api/chatProactiveAction/chatProactiveAction.attributes.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x41e9=['STRING','ENUM','mouseOver','timeout','INTEGER','sequelize','exports'];(function(_0x586f44,_0x27e909){var _0x25a4d5=function(_0x232464){while(--_0x232464){_0x586f44['push'](_0x586f44['shift']());}};_0x25a4d5(++_0x27e909);}(_0x41e9,0x91));var _0x941e=function(_0x122ef9,_0x451d2a){_0x122ef9=_0x122ef9-0x0;var _0x42fba0=_0x41e9[_0x122ef9];return _0x42fba0;};'use strict';var Sequelize=require(_0x941e('0x0'));module[_0x941e('0x1')]={'name':{'type':Sequelize[_0x941e('0x2')],'allowNull':![]},'type':{'type':Sequelize[_0x941e('0x3')](_0x941e('0x4'),_0x941e('0x5')),'defaultValue':_0x941e('0x4')},'selector':{'type':Sequelize[_0x941e('0x2')]},'timeout':{'type':Sequelize[_0x941e('0x6')]}}; \ No newline at end of file +var _0x88a1=['ENUM','mouseOver','timeout','STRING','INTEGER','exports'];(function(_0x293881,_0x485041){var _0x2c7e9f=function(_0x5359bc){while(--_0x5359bc){_0x293881['push'](_0x293881['shift']());}};_0x2c7e9f(++_0x485041);}(_0x88a1,0x149));var _0x188a=function(_0x45c262,_0x2e3ce5){_0x45c262=_0x45c262-0x0;var _0x4f2ba6=_0x88a1[_0x45c262];return _0x4f2ba6;};'use strict';var Sequelize=require('sequelize');module[_0x188a('0x0')]={'name':{'type':Sequelize['STRING'],'allowNull':![]},'type':{'type':Sequelize[_0x188a('0x1')](_0x188a('0x2'),_0x188a('0x3')),'defaultValue':_0x188a('0x2')},'selector':{'type':Sequelize[_0x188a('0x4')]},'timeout':{'type':Sequelize[_0x188a('0x5')]}}; \ No newline at end of file diff --git a/server/api/chatProactiveAction/chatProactiveAction.controller.js b/server/api/chatProactiveAction/chatProactiveAction.controller.js index 477aae0..5f23056 100644 --- a/server/api/chatProactiveAction/chatProactiveAction.controller.js +++ b/server/api/chatProactiveAction/chatProactiveAction.controller.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x3981=['send','show','ChatProactiveAction','rawAttributes','query','filters','attributes','model','fields','length','include','merge','options','find','catch','create','body','params','destroy','eml-format','zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','util','path','sox','to-csv','ejs','lodash','squel','crypto','desk.js','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','sendStatus','status','end','json','undefined','limit','count','offset','set','apply','reject','update','then','stack'];(function(_0x297fd3,_0x115406){var _0x2af381=function(_0x1dd31b){while(--_0x1dd31b){_0x297fd3['push'](_0x297fd3['shift']());}};_0x2af381(++_0x115406);}(_0x3981,0x144));var _0x1398=function(_0x258ac0,_0x28c157){_0x258ac0=_0x258ac0-0x0;var _0x377de0=_0x3981[_0x258ac0];return _0x377de0;};'use strict';var emlformat=require(_0x1398('0x0'));var rimraf=require('rimraf');var zipdir=require(_0x1398('0x1'));var jsonpatch=require(_0x1398('0x2'));var rp=require(_0x1398('0x3'));var moment=require(_0x1398('0x4'));var BPromise=require(_0x1398('0x5'));var Mustache=require(_0x1398('0x6'));var util=require(_0x1398('0x7'));var path=require(_0x1398('0x8'));var sox=require(_0x1398('0x9'));var csv=require(_0x1398('0xa'));var ejs=require(_0x1398('0xb'));var fs=require('fs');var fs_extra=require('fs-extra');var _=require(_0x1398('0xc'));var squel=require(_0x1398('0xd'));var crypto=require(_0x1398('0xe'));var jsforce=require('jsforce');var deskjs=require(_0x1398('0xf'));var toCsv=require(_0x1398('0xa'));var querystring=require(_0x1398('0x10'));var Papa=require(_0x1398('0x11'));var Redis=require(_0x1398('0x12'));var authService=require(_0x1398('0x13'));var qs=require('../../components/parsers/qs');var as=require(_0x1398('0x14'));var hardwareService=require(_0x1398('0x15'));var logger=require(_0x1398('0x16'))(_0x1398('0x17'));var utils=require(_0x1398('0x18'));var config=require(_0x1398('0x19'));var licenseUtil=require(_0x1398('0x1a'));var db=require(_0x1398('0x1b'))['db'];function respondWithStatusCode(_0x4460a6,_0x31b5bf){_0x31b5bf=_0x31b5bf||0xcc;return function(_0x5f37ac){if(_0x5f37ac){return _0x4460a6[_0x1398('0x1c')](_0x31b5bf);}return _0x4460a6[_0x1398('0x1d')](_0x31b5bf)[_0x1398('0x1e')]();};}function respondWithResult(_0xa9ef49,_0x49424a){_0x49424a=_0x49424a||0xc8;return function(_0x4d8a1a){if(_0x4d8a1a){return _0xa9ef49['status'](_0x49424a)[_0x1398('0x1f')](_0x4d8a1a);}};}function respondWithFilteredResult(_0x5cd5aa,_0x51ad37){return function(_0x514216){if(_0x514216){var _0x2afbd6=typeof _0x51ad37['offset']===_0x1398('0x20')&&typeof _0x51ad37[_0x1398('0x21')]===_0x1398('0x20');var _0x382319=_0x514216[_0x1398('0x22')];var _0x579fd2=_0x2afbd6?0x0:_0x51ad37[_0x1398('0x23')];var _0x5531bc=_0x2afbd6?_0x514216['count']:_0x51ad37[_0x1398('0x23')]+_0x51ad37['limit'];var _0x57fce1;if(_0x5531bc>=_0x382319){_0x5531bc=_0x382319;_0x57fce1=0xc8;}else{_0x57fce1=0xce;}_0x5cd5aa[_0x1398('0x1d')](_0x57fce1);return _0x5cd5aa[_0x1398('0x24')]('Content-Range',_0x579fd2+'-'+_0x5531bc+'/'+_0x382319)[_0x1398('0x1f')](_0x514216);}return null;};}function patchUpdates(_0x146357){return function(_0x268fc5){try{jsonpatch[_0x1398('0x25')](_0x268fc5,_0x146357,!![]);}catch(_0xcd19c1){return BPromise[_0x1398('0x26')](_0xcd19c1);}return _0x268fc5['save']();};}function saveUpdates(_0x5c1d68,_0x58e886){return function(_0x5dcedc){if(_0x5dcedc){return _0x5dcedc[_0x1398('0x27')](_0x5c1d68)[_0x1398('0x28')](function(_0x5029d4){return _0x5029d4;});}return null;};}function removeEntity(_0x3e4cfa,_0x929d8a){return function(_0x45b78a){if(_0x45b78a){return _0x45b78a['destroy']()[_0x1398('0x28')](function(){_0x3e4cfa[_0x1398('0x1d')](0xcc)['end']();});}};}function handleEntityNotFound(_0xb54964,_0x340d90){return function(_0x41c42c){if(!_0x41c42c){_0xb54964[_0x1398('0x1c')](0x194);}return _0x41c42c;};}function handleError(_0x50d3cf,_0x5edfdd){_0x5edfdd=_0x5edfdd||0x1f4;return function(_0x2b73e7){logger['error'](_0x2b73e7[_0x1398('0x29')]);if(_0x2b73e7['name']){delete _0x2b73e7['name'];}_0x50d3cf['status'](_0x5edfdd)[_0x1398('0x2a')](_0x2b73e7);};}exports[_0x1398('0x2b')]=function(_0x76bd5,_0x2c8d2b){var _0x24965c={'raw':!![],'where':{'id':_0x76bd5['params']['id']}},_0x2fd175={};_0x2fd175['model']=_['keys'](db[_0x1398('0x2c')][_0x1398('0x2d')]);_0x2fd175[_0x1398('0x2e')]=_['keys'](_0x76bd5[_0x1398('0x2e')]);_0x2fd175[_0x1398('0x2f')]=_['intersection'](_0x2fd175['model'],_0x2fd175['query']);_0x24965c[_0x1398('0x30')]=_['intersection'](_0x2fd175[_0x1398('0x31')],qs[_0x1398('0x32')](_0x76bd5[_0x1398('0x2e')][_0x1398('0x32')]));_0x24965c[_0x1398('0x30')]=_0x24965c['attributes'][_0x1398('0x33')]?_0x24965c[_0x1398('0x30')]:_0x2fd175['model'];if(_0x76bd5[_0x1398('0x2e')]['includeAll']){_0x24965c[_0x1398('0x34')]=[{'all':!![]}];}_0x24965c=_[_0x1398('0x35')]({},_0x24965c,_0x76bd5[_0x1398('0x36')]);return db[_0x1398('0x2c')][_0x1398('0x37')](_0x24965c)['then'](handleEntityNotFound(_0x2c8d2b,null))['then'](respondWithResult(_0x2c8d2b,null))[_0x1398('0x38')](handleError(_0x2c8d2b,null));};exports[_0x1398('0x39')]=function(_0x511276,_0x4b9cfa){return db['ChatProactiveAction'][_0x1398('0x39')](_0x511276['body'],{})[_0x1398('0x28')](respondWithResult(_0x4b9cfa,0xc9))['catch'](handleError(_0x4b9cfa,null));};exports[_0x1398('0x27')]=function(_0x5b4a65,_0xab4136){if(_0x5b4a65[_0x1398('0x3a')]['id']){delete _0x5b4a65[_0x1398('0x3a')]['id'];}return db[_0x1398('0x2c')][_0x1398('0x37')]({'where':{'id':_0x5b4a65[_0x1398('0x3b')]['id']}})[_0x1398('0x28')](handleEntityNotFound(_0xab4136,null))[_0x1398('0x28')](saveUpdates(_0x5b4a65[_0x1398('0x3a')],null))[_0x1398('0x28')](respondWithResult(_0xab4136,null))[_0x1398('0x38')](handleError(_0xab4136,null));};exports[_0x1398('0x3c')]=function(_0x59caea,_0x20ec32){return db[_0x1398('0x2c')][_0x1398('0x37')]({'where':{'id':_0x59caea['params']['id']}})[_0x1398('0x28')](handleEntityNotFound(_0x20ec32,null))['then'](removeEntity(_0x20ec32,null))[_0x1398('0x38')](handleError(_0x20ec32,null));}; \ No newline at end of file +var _0x0ec6=['query','filters','attributes','intersection','fields','length','includeAll','merge','options','ChatProactiveAction','find','then','catch','create','body','update','destroy','eml-format','fast-json-patch','request-promise','moment','bluebird','mustache','util','path','to-csv','ejs','fs-extra','lodash','crypto','desk.js','querystring','papaparse','ioredis','../../components/auth/service','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','sendStatus','status','json','undefined','limit','count','offset','set','Content-Range','apply','reject','save','error','stack','name','send','show','params','model','rawAttributes'];(function(_0x281413,_0x12e45f){var _0x4784dd=function(_0x470ca2){while(--_0x470ca2){_0x281413['push'](_0x281413['shift']());}};_0x4784dd(++_0x12e45f);}(_0x0ec6,0x1f1));var _0x60ec=function(_0xb0773e,_0x191d43){_0xb0773e=_0xb0773e-0x0;var _0x2a7f49=_0x0ec6[_0xb0773e];return _0x2a7f49;};'use strict';var emlformat=require(_0x60ec('0x0'));var rimraf=require('rimraf');var zipdir=require('zip-dir');var jsonpatch=require(_0x60ec('0x1'));var rp=require(_0x60ec('0x2'));var moment=require(_0x60ec('0x3'));var BPromise=require(_0x60ec('0x4'));var Mustache=require(_0x60ec('0x5'));var util=require(_0x60ec('0x6'));var path=require(_0x60ec('0x7'));var sox=require('sox');var csv=require(_0x60ec('0x8'));var ejs=require(_0x60ec('0x9'));var fs=require('fs');var fs_extra=require(_0x60ec('0xa'));var _=require(_0x60ec('0xb'));var squel=require('squel');var crypto=require(_0x60ec('0xc'));var jsforce=require('jsforce');var deskjs=require(_0x60ec('0xd'));var toCsv=require(_0x60ec('0x8'));var querystring=require(_0x60ec('0xe'));var Papa=require(_0x60ec('0xf'));var Redis=require(_0x60ec('0x10'));var authService=require(_0x60ec('0x11'));var qs=require('../../components/parsers/qs');var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0x60ec('0x12'));var logger=require(_0x60ec('0x13'))(_0x60ec('0x14'));var utils=require(_0x60ec('0x15'));var config=require(_0x60ec('0x16'));var licenseUtil=require('../../config/license/util');var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0x28cabb,_0x41621a){_0x41621a=_0x41621a||0xcc;return function(_0x103a72){if(_0x103a72){return _0x28cabb[_0x60ec('0x17')](_0x41621a);}return _0x28cabb[_0x60ec('0x18')](_0x41621a)['end']();};}function respondWithResult(_0x21af57,_0x456fb5){_0x456fb5=_0x456fb5||0xc8;return function(_0x22fdb1){if(_0x22fdb1){return _0x21af57[_0x60ec('0x18')](_0x456fb5)[_0x60ec('0x19')](_0x22fdb1);}};}function respondWithFilteredResult(_0x23298f,_0x1f7c76){return function(_0x19dd55){if(_0x19dd55){var _0x448553=typeof _0x1f7c76['offset']===_0x60ec('0x1a')&&typeof _0x1f7c76[_0x60ec('0x1b')]===_0x60ec('0x1a');var _0x155bdc=_0x19dd55[_0x60ec('0x1c')];var _0x222c38=_0x448553?0x0:_0x1f7c76[_0x60ec('0x1d')];var _0x13052c=_0x448553?_0x19dd55[_0x60ec('0x1c')]:_0x1f7c76[_0x60ec('0x1d')]+_0x1f7c76[_0x60ec('0x1b')];var _0x1bdc45;if(_0x13052c>=_0x155bdc){_0x13052c=_0x155bdc;_0x1bdc45=0xc8;}else{_0x1bdc45=0xce;}_0x23298f['status'](_0x1bdc45);return _0x23298f[_0x60ec('0x1e')](_0x60ec('0x1f'),_0x222c38+'-'+_0x13052c+'/'+_0x155bdc)[_0x60ec('0x19')](_0x19dd55);}return null;};}function patchUpdates(_0x278ae3){return function(_0x5cace8){try{jsonpatch[_0x60ec('0x20')](_0x5cace8,_0x278ae3,!![]);}catch(_0x3e152c){return BPromise[_0x60ec('0x21')](_0x3e152c);}return _0x5cace8[_0x60ec('0x22')]();};}function saveUpdates(_0x3ab7ef,_0x354f08){return function(_0x492dfa){if(_0x492dfa){return _0x492dfa['update'](_0x3ab7ef)['then'](function(_0x1476c6){return _0x1476c6;});}return null;};}function removeEntity(_0x1080c0,_0x1f0ce7){return function(_0x1fd96e){if(_0x1fd96e){return _0x1fd96e['destroy']()['then'](function(){_0x1080c0['status'](0xcc)['end']();});}};}function handleEntityNotFound(_0x317b9a,_0x474374){return function(_0x42d1c2){if(!_0x42d1c2){_0x317b9a[_0x60ec('0x17')](0x194);}return _0x42d1c2;};}function handleError(_0xd4ac40,_0x3d31b7){_0x3d31b7=_0x3d31b7||0x1f4;return function(_0x155c82){logger[_0x60ec('0x23')](_0x155c82[_0x60ec('0x24')]);if(_0x155c82['name']){delete _0x155c82[_0x60ec('0x25')];}_0xd4ac40[_0x60ec('0x18')](_0x3d31b7)[_0x60ec('0x26')](_0x155c82);};}exports[_0x60ec('0x27')]=function(_0xf3817d,_0x3423fb){var _0x1b912c={'raw':!![],'where':{'id':_0xf3817d[_0x60ec('0x28')]['id']}},_0x4440c7={};_0x4440c7[_0x60ec('0x29')]=_['keys'](db['ChatProactiveAction'][_0x60ec('0x2a')]);_0x4440c7[_0x60ec('0x2b')]=_['keys'](_0xf3817d['query']);_0x4440c7[_0x60ec('0x2c')]=_['intersection'](_0x4440c7[_0x60ec('0x29')],_0x4440c7[_0x60ec('0x2b')]);_0x1b912c[_0x60ec('0x2d')]=_[_0x60ec('0x2e')](_0x4440c7[_0x60ec('0x29')],qs['fields'](_0xf3817d[_0x60ec('0x2b')][_0x60ec('0x2f')]));_0x1b912c[_0x60ec('0x2d')]=_0x1b912c[_0x60ec('0x2d')][_0x60ec('0x30')]?_0x1b912c[_0x60ec('0x2d')]:_0x4440c7['model'];if(_0xf3817d[_0x60ec('0x2b')][_0x60ec('0x31')]){_0x1b912c['include']=[{'all':!![]}];}_0x1b912c=_[_0x60ec('0x32')]({},_0x1b912c,_0xf3817d[_0x60ec('0x33')]);return db[_0x60ec('0x34')][_0x60ec('0x35')](_0x1b912c)['then'](handleEntityNotFound(_0x3423fb,null))[_0x60ec('0x36')](respondWithResult(_0x3423fb,null))[_0x60ec('0x37')](handleError(_0x3423fb,null));};exports[_0x60ec('0x38')]=function(_0x3c0903,_0x3dc544){return db[_0x60ec('0x34')][_0x60ec('0x38')](_0x3c0903[_0x60ec('0x39')],{})[_0x60ec('0x36')](respondWithResult(_0x3dc544,0xc9))[_0x60ec('0x37')](handleError(_0x3dc544,null));};exports[_0x60ec('0x3a')]=function(_0x36f3bf,_0x38e5c4){if(_0x36f3bf[_0x60ec('0x39')]['id']){delete _0x36f3bf[_0x60ec('0x39')]['id'];}return db[_0x60ec('0x34')][_0x60ec('0x35')]({'where':{'id':_0x36f3bf['params']['id']}})[_0x60ec('0x36')](handleEntityNotFound(_0x38e5c4,null))[_0x60ec('0x36')](saveUpdates(_0x36f3bf['body'],null))[_0x60ec('0x36')](respondWithResult(_0x38e5c4,null))['catch'](handleError(_0x38e5c4,null));};exports[_0x60ec('0x3b')]=function(_0x2a44cc,_0x1b11fd){return db[_0x60ec('0x34')][_0x60ec('0x35')]({'where':{'id':_0x2a44cc[_0x60ec('0x28')]['id']}})[_0x60ec('0x36')](handleEntityNotFound(_0x1b11fd,null))['then'](removeEntity(_0x1b11fd,null))['catch'](handleError(_0x1b11fd,null));}; \ No newline at end of file diff --git a/server/api/chatProactiveAction/chatProactiveAction.model.js b/server/api/chatProactiveAction/chatProactiveAction.model.js index 4e0b55f..7aaf46f 100644 --- a/server/api/chatProactiveAction/chatProactiveAction.model.js +++ b/server/api/chatProactiveAction/chatProactiveAction.model.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xda8f=['moment','bluebird','path','rimraf','./chatProactiveAction.attributes','exports','define','ChatProactiveAction','chat_proactive_actions','lodash','api'];(function(_0x3ce31a,_0x15fd12){var _0x3bab8f=function(_0x4c2a5c){while(--_0x4c2a5c){_0x3ce31a['push'](_0x3ce31a['shift']());}};_0x3bab8f(++_0x15fd12);}(_0xda8f,0x1ab));var _0xfda8=function(_0x5ac6ba,_0x5486d8){_0x5ac6ba=_0x5ac6ba-0x0;var _0x1bdc4d=_0xda8f[_0x5ac6ba];return _0x1bdc4d;};'use strict';var _=require(_0xfda8('0x0'));var util=require('util');var logger=require('../../config/logger')(_0xfda8('0x1'));var moment=require(_0xfda8('0x2'));var BPromise=require(_0xfda8('0x3'));var rp=require('request-promise');var fs=require('fs');var path=require(_0xfda8('0x4'));var rimraf=require(_0xfda8('0x5'));var config=require('../../config/environment');var attributes=require(_0xfda8('0x6'));module[_0xfda8('0x7')]=function(_0x3fa7ee,_0x4bd9d9){return _0x3fa7ee[_0xfda8('0x8')](_0xfda8('0x9'),attributes,{'tableName':_0xfda8('0xa'),'paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file +var _0xb142=['../../config/logger','api','moment','request-promise','path','rimraf','../../config/environment','exports','define','ChatProactiveAction','chat_proactive_actions','lodash','util'];(function(_0x321bb2,_0x202794){var _0x9c12ed=function(_0x263dd3){while(--_0x263dd3){_0x321bb2['push'](_0x321bb2['shift']());}};_0x9c12ed(++_0x202794);}(_0xb142,0x191));var _0x2b14=function(_0x21da87,_0xa9aac7){_0x21da87=_0x21da87-0x0;var _0x4e65d6=_0xb142[_0x21da87];return _0x4e65d6;};'use strict';var _=require(_0x2b14('0x0'));var util=require(_0x2b14('0x1'));var logger=require(_0x2b14('0x2'))(_0x2b14('0x3'));var moment=require(_0x2b14('0x4'));var BPromise=require('bluebird');var rp=require(_0x2b14('0x5'));var fs=require('fs');var path=require(_0x2b14('0x6'));var rimraf=require(_0x2b14('0x7'));var config=require(_0x2b14('0x8'));var attributes=require('./chatProactiveAction.attributes');module[_0x2b14('0x9')]=function(_0x128884,_0x29f68a){return _0x128884[_0x2b14('0xa')](_0x2b14('0xb'),attributes,{'tableName':_0x2b14('0xc'),'paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file diff --git a/server/api/chatProactiveAction/chatProactiveAction.rpc.js b/server/api/chatProactiveAction/chatProactiveAction.rpc.js index 121b8c6..ad92bff 100644 --- a/server/api/chatProactiveAction/chatProactiveAction.rpc.js +++ b/server/api/chatProactiveAction/chatProactiveAction.rpc.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x6e7d=['info','ChatProactiveAction,\x20%s,\x20%s','request\x20sent','ChatProactiveAction,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','lodash','util','moment','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','request','then'];(function(_0x321bb2,_0x202794){var _0x9c12ed=function(_0x263dd3){while(--_0x263dd3){_0x321bb2['push'](_0x321bb2['shift']());}};_0x9c12ed(++_0x202794);}(_0x6e7d,0xcf));var _0xd6e7=function(_0xb43ccc,_0x7c817f){_0xb43ccc=_0xb43ccc-0x0;var _0x5183ab=_0x6e7d[_0xb43ccc];return _0x5183ab;};'use strict';var _=require(_0xd6e7('0x0'));var util=require(_0xd6e7('0x1'));var moment=require(_0xd6e7('0x2'));var BPromise=require('bluebird');var rs=require('randomstring');var fs=require('fs');var Redis=require(_0xd6e7('0x3'));var db=require(_0xd6e7('0x4'))['db'];var utils=require(_0xd6e7('0x5'));var logger=require(_0xd6e7('0x6'))(_0xd6e7('0x7'));var config=require(_0xd6e7('0x8'));var jayson=require(_0xd6e7('0x9'));var client=jayson[_0xd6e7('0xa')]['http']({'port':0x232a});function respondWithRpcPromise(_0x12c132,_0x27ab09,_0x2e82b3){return new BPromise(function(_0x3e2bc5,_0x3ce74b){return client[_0xd6e7('0xb')](_0x12c132,_0x2e82b3)[_0xd6e7('0xc')](function(_0x2c7952){logger[_0xd6e7('0xd')](_0xd6e7('0xe'),_0x27ab09,_0xd6e7('0xf'));logger['debug'](_0xd6e7('0x10'),_0x27ab09,_0xd6e7('0xf'),JSON[_0xd6e7('0x11')](_0x2c7952));if(_0x2c7952[_0xd6e7('0x12')]){if(_0x2c7952[_0xd6e7('0x12')][_0xd6e7('0x13')]===0x1f4){logger[_0xd6e7('0x12')](_0xd6e7('0xe'),_0x27ab09,_0x2c7952[_0xd6e7('0x12')]['message']);return _0x3ce74b(_0x2c7952[_0xd6e7('0x12')]['message']);}logger[_0xd6e7('0x12')](_0xd6e7('0xe'),_0x27ab09,_0x2c7952['error']['message']);return _0x3e2bc5(_0x2c7952[_0xd6e7('0x12')][_0xd6e7('0x14')]);}else{logger[_0xd6e7('0xd')]('ChatProactiveAction,\x20%s,\x20%s',_0x27ab09,_0xd6e7('0xf'));_0x3e2bc5(_0x2c7952[_0xd6e7('0x15')][_0xd6e7('0x14')]);}})['catch'](function(_0x3c9be8){logger[_0xd6e7('0x12')]('ChatProactiveAction,\x20%s,\x20%s',_0x27ab09,_0x3c9be8);_0x3ce74b(_0x3c9be8);});});} \ No newline at end of file +var _0x4af4=['message','lodash','util','moment','bluebird','randomstring','ioredis','../../mysqldb','rpc','../../config/environment','jayson/promise','client','http','request','then','info','debug','ChatProactiveAction,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','code','ChatProactiveAction,\x20%s,\x20%s'];(function(_0x139c54,_0x37be95){var _0x27bba0=function(_0x167f08){while(--_0x167f08){_0x139c54['push'](_0x139c54['shift']());}};_0x27bba0(++_0x37be95);}(_0x4af4,0xb9));var _0x44af=function(_0x15996c,_0x284970){_0x15996c=_0x15996c-0x0;var _0x1b235a=_0x4af4[_0x15996c];return _0x1b235a;};'use strict';var _=require(_0x44af('0x0'));var util=require(_0x44af('0x1'));var moment=require(_0x44af('0x2'));var BPromise=require(_0x44af('0x3'));var rs=require(_0x44af('0x4'));var fs=require('fs');var Redis=require(_0x44af('0x5'));var db=require(_0x44af('0x6'))['db'];var utils=require('../../config/utils');var logger=require('../../config/logger')(_0x44af('0x7'));var config=require(_0x44af('0x8'));var jayson=require(_0x44af('0x9'));var client=jayson[_0x44af('0xa')][_0x44af('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x25f658,_0x7d23d8,_0x20b74e){return new BPromise(function(_0x8f7152,_0x517a94){return client[_0x44af('0xc')](_0x25f658,_0x20b74e)[_0x44af('0xd')](function(_0x2bd2a8){logger[_0x44af('0xe')]('ChatProactiveAction,\x20%s,\x20%s',_0x7d23d8,'request\x20sent');logger[_0x44af('0xf')](_0x44af('0x10'),_0x7d23d8,_0x44af('0x11'),JSON[_0x44af('0x12')](_0x2bd2a8));if(_0x2bd2a8[_0x44af('0x13')]){if(_0x2bd2a8['error'][_0x44af('0x14')]===0x1f4){logger[_0x44af('0x13')](_0x44af('0x15'),_0x7d23d8,_0x2bd2a8[_0x44af('0x13')][_0x44af('0x16')]);return _0x517a94(_0x2bd2a8[_0x44af('0x13')][_0x44af('0x16')]);}logger['error'](_0x44af('0x15'),_0x7d23d8,_0x2bd2a8[_0x44af('0x13')][_0x44af('0x16')]);return _0x8f7152(_0x2bd2a8['error'][_0x44af('0x16')]);}else{logger[_0x44af('0xe')](_0x44af('0x15'),_0x7d23d8,'request\x20sent');_0x8f7152(_0x2bd2a8['result']['message']);}})['catch'](function(_0x2d08b1){logger[_0x44af('0x13')](_0x44af('0x15'),_0x7d23d8,_0x2d08b1);_0x517a94(_0x2d08b1);});});} \ No newline at end of file diff --git a/server/api/chatProactiveAction/index.js b/server/api/chatProactiveAction/index.js index 308530d..660a76d 100644 --- a/server/api/chatProactiveAction/index.js +++ b/server/api/chatProactiveAction/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x46ed=['multer','util','connect-timeout','express','Router','../../components/auth/service','../../components/interaction/service','./chatProactiveAction.controller','get','/:id','isAuthenticated','show','post','create','put','delete','destroy','exports'];(function(_0x245ac5,_0x4215f1){var _0x437858=function(_0x3f121b){while(--_0x3f121b){_0x245ac5['push'](_0x245ac5['shift']());}};_0x437858(++_0x4215f1);}(_0x46ed,0x168));var _0xd46e=function(_0x49b207,_0x408ade){_0x49b207=_0x49b207-0x0;var _0x2dc8fa=_0x46ed[_0x49b207];return _0x2dc8fa;};'use strict';var multer=require(_0xd46e('0x0'));var util=require(_0xd46e('0x1'));var path=require('path');var timeout=require(_0xd46e('0x2'));var express=require(_0xd46e('0x3'));var router=express[_0xd46e('0x4')]();var fs_extra=require('fs-extra');var auth=require(_0xd46e('0x5'));var interaction=require(_0xd46e('0x6'));var config=require('../../config/environment');var controller=require(_0xd46e('0x7'));router[_0xd46e('0x8')](_0xd46e('0x9'),auth[_0xd46e('0xa')](),controller[_0xd46e('0xb')]);router[_0xd46e('0xc')]('/',auth[_0xd46e('0xa')](),controller[_0xd46e('0xd')]);router[_0xd46e('0xe')](_0xd46e('0x9'),auth[_0xd46e('0xa')](),controller['update']);router[_0xd46e('0xf')](_0xd46e('0x9'),auth['isAuthenticated'](),controller[_0xd46e('0x10')]);module[_0xd46e('0x11')]=router; \ No newline at end of file +var _0xc4aa=['show','post','update','destroy','multer','util','path','connect-timeout','express','Router','../../config/environment','./chatProactiveAction.controller','get','/:id','isAuthenticated'];(function(_0x4f749a,_0x2fd382){var _0x5a737e=function(_0x1af93b){while(--_0x1af93b){_0x4f749a['push'](_0x4f749a['shift']());}};_0x5a737e(++_0x2fd382);}(_0xc4aa,0x1b7));var _0xac4a=function(_0x465a0c,_0x19d4d5){_0x465a0c=_0x465a0c-0x0;var _0x1e202e=_0xc4aa[_0x465a0c];return _0x1e202e;};'use strict';var multer=require(_0xac4a('0x0'));var util=require(_0xac4a('0x1'));var path=require(_0xac4a('0x2'));var timeout=require(_0xac4a('0x3'));var express=require(_0xac4a('0x4'));var router=express[_0xac4a('0x5')]();var fs_extra=require('fs-extra');var auth=require('../../components/auth/service');var interaction=require('../../components/interaction/service');var config=require(_0xac4a('0x6'));var controller=require(_0xac4a('0x7'));router[_0xac4a('0x8')](_0xac4a('0x9'),auth[_0xac4a('0xa')](),controller[_0xac4a('0xb')]);router[_0xac4a('0xc')]('/',auth[_0xac4a('0xa')](),controller['create']);router['put'](_0xac4a('0x9'),auth[_0xac4a('0xa')](),controller[_0xac4a('0xd')]);router['delete'](_0xac4a('0x9'),auth[_0xac4a('0xa')](),controller[_0xac4a('0xe')]);module['exports']=router; \ No newline at end of file diff --git a/server/api/chatQueue/chatQueue.attributes.js b/server/api/chatQueue/chatQueue.attributes.js index 60c44b1..bd60898 100644 --- a/server/api/chatQueue/chatQueue.attributes.js +++ b/server/api/chatQueue/chatQueue.attributes.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xba81=['sequelize','exports','STRING','name','ENUM','rrmemory','beepall','roundrobin'];(function(_0xc4001c,_0x1bf8f0){var _0x49f7bc=function(_0x1059b8){while(--_0x1059b8){_0xc4001c['push'](_0xc4001c['shift']());}};_0x49f7bc(++_0x1bf8f0);}(_0xba81,0x80));var _0x1ba8=function(_0x51786e,_0x5ee24e){_0x51786e=_0x51786e-0x0;var _0x25b5e2=_0xba81[_0x51786e];return _0x25b5e2;};'use strict';var Sequelize=require(_0x1ba8('0x0'));module[_0x1ba8('0x1')]={'name':{'type':Sequelize[_0x1ba8('0x2')],'unique':_0x1ba8('0x3'),'allowNull':![],'validate':{'notEmpty':!![],'is':/^[A-Za-z0-9\.\_]+$/i}},'description':{'type':Sequelize[_0x1ba8('0x2')]},'timeout':{'type':Sequelize['INTEGER'],'validate':{'min':0x1,'max':0x20c49b}},'strategy':{'type':Sequelize[_0x1ba8('0x4')](_0x1ba8('0x5'),_0x1ba8('0x6'),_0x1ba8('0x7'))}}; \ No newline at end of file +var _0x9a37=['beepall','roundrobin','exports','STRING','INTEGER','ENUM'];(function(_0x34d1c7,_0x3684ef){var _0x34ad44=function(_0x30886e){while(--_0x30886e){_0x34d1c7['push'](_0x34d1c7['shift']());}};_0x34ad44(++_0x3684ef);}(_0x9a37,0xec));var _0x79a3=function(_0x4f4c11,_0xdb6add){_0x4f4c11=_0x4f4c11-0x0;var _0x4dfd33=_0x9a37[_0x4f4c11];return _0x4dfd33;};'use strict';var Sequelize=require('sequelize');module[_0x79a3('0x0')]={'name':{'type':Sequelize[_0x79a3('0x1')],'unique':'name','allowNull':![],'validate':{'notEmpty':!![],'is':/^[A-Za-z0-9\.\_]+$/i}},'description':{'type':Sequelize[_0x79a3('0x1')]},'timeout':{'type':Sequelize[_0x79a3('0x2')],'validate':{'min':0x1,'max':0x20c49b}},'strategy':{'type':Sequelize[_0x79a3('0x3')]('rrmemory',_0x79a3('0x4'),_0x79a3('0x5'))}}; \ No newline at end of file diff --git a/server/api/chatQueue/chatQueue.controller.js b/server/api/chatQueue/chatQueue.controller.js index 9b7e229..e18901e 100644 --- a/server/api/chatQueue/chatQueue.controller.js +++ b/server/api/chatQueue/chatQueue.controller.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x71a2=['sort','where','filters','pick','merge','filter','options','includeAll','include','rows','show','params','find','create','body','user','Unable\x20to\x20retrieve\x20the\x20current\x20user','UserProfileSection','userProfileId','autoAssociation','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','describe','findOne','ChatQueueId','UserChatQueue','findAll','User','findAndCountAll','UserId','agent','updatedAt','createdAt','format','SIP','chatPause','getTeams','addTeams','ids','Team','Agents','online','interface','flatMap','each','findOrCreate','emit','removeTeams','select','tq.TeamId','from','join','user_has_teams','ChatQueueId\x20=\x20?','clone','ut.UserId\x20=\x20?','sequelize','QueryTypes','SELECT','every','TeamId','all','union','transaction','isEmpty','forEach','userChatQueue:remove','addAgents','spread','userChatQueue:save','removeAgents','getAgents','eml-format','rimraf','zip-dir','moment','mustache','util','path','sox','fs-extra','lodash','crypto','jsforce','to-csv','querystring','papaparse','ioredis','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/environment','../../config/license/util','../../mysqldb','redis','defaults','localhost','./chatQueue.socket','register','jayson/promise','client','http','request','then','info','ChatQueue,\x20%s,\x20%s','request\x20sent','debug','ChatQueue,\x20%s,\x20%s,\x20%s','stringify','error','code','message','catch','sendStatus','status','end','json','offset','undefined','limit','count','set','Content-Range','apply','update','destroy','get','ChatQueues','UserProfileResource','stack','name','send','index','map','ChatQueue','rawAttributes','fieldName','type','model','keys','query','attributes','intersection','fields','length','hasOwnProperty','nolimit','order'];(function(_0x1d4b70,_0x2dc35e){var _0xdee9c1=function(_0x30ef79){while(--_0x30ef79){_0x1d4b70['push'](_0x1d4b70['shift']());}};_0xdee9c1(++_0x2dc35e);}(_0x71a2,0x171));var _0x271a=function(_0x23603,_0x281eee){_0x23603=_0x23603-0x0;var _0x2357a1=_0x71a2[_0x23603];return _0x2357a1;};'use strict';var emlformat=require(_0x271a('0x0'));var rimraf=require(_0x271a('0x1'));var zipdir=require(_0x271a('0x2'));var jsonpatch=require('fast-json-patch');var rp=require('request-promise');var moment=require(_0x271a('0x3'));var BPromise=require('bluebird');var Mustache=require(_0x271a('0x4'));var util=require(_0x271a('0x5'));var path=require(_0x271a('0x6'));var sox=require(_0x271a('0x7'));var csv=require('to-csv');var ejs=require('ejs');var fs=require('fs');var fs_extra=require(_0x271a('0x8'));var _=require(_0x271a('0x9'));var squel=require('squel');var crypto=require(_0x271a('0xa'));var jsforce=require(_0x271a('0xb'));var deskjs=require('desk.js');var toCsv=require(_0x271a('0xc'));var querystring=require(_0x271a('0xd'));var Papa=require(_0x271a('0xe'));var Redis=require(_0x271a('0xf'));var authService=require('../../components/auth/service');var qs=require('../../components/parsers/qs');var as=require(_0x271a('0x10'));var hardwareService=require(_0x271a('0x11'));var logger=require(_0x271a('0x12'))(_0x271a('0x13'));var utils=require('../../config/utils');var config=require(_0x271a('0x14'));var licenseUtil=require(_0x271a('0x15'));var db=require(_0x271a('0x16'))['db'];config[_0x271a('0x17')]=_[_0x271a('0x18')](config[_0x271a('0x17')],{'host':_0x271a('0x19'),'port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config[_0x271a('0x17')]));require(_0x271a('0x1a'))[_0x271a('0x1b')](socket);var jayson=require(_0x271a('0x1c'));var client=jayson[_0x271a('0x1d')][_0x271a('0x1e')]({'port':0x232a});function respondWithRpcPromise(_0x595e2d,_0x84f7e6,_0x5f05e6,_0x1c8f5b){return new BPromise(function(_0x17c026,_0x19a434){var _0x23733f=_0x1c8f5b||client;return _0x23733f[_0x271a('0x1f')](_0x595e2d,_0x5f05e6)[_0x271a('0x20')](function(_0x15b7f0){logger[_0x271a('0x21')](_0x271a('0x22'),_0x84f7e6,_0x271a('0x23'));logger[_0x271a('0x24')](_0x271a('0x25'),_0x84f7e6,_0x271a('0x23'),JSON[_0x271a('0x26')](_0x15b7f0));if(_0x15b7f0[_0x271a('0x27')]){if(_0x15b7f0[_0x271a('0x27')][_0x271a('0x28')]===0x1f4){logger[_0x271a('0x27')](_0x271a('0x22'),_0x84f7e6,_0x15b7f0[_0x271a('0x27')][_0x271a('0x29')]);return _0x19a434(_0x15b7f0[_0x271a('0x27')][_0x271a('0x29')]);}logger['error']('ChatQueue,\x20%s,\x20%s',_0x84f7e6,_0x15b7f0[_0x271a('0x27')][_0x271a('0x29')]);return _0x17c026(_0x15b7f0['error'][_0x271a('0x29')]);}else{logger['info'](_0x271a('0x22'),_0x84f7e6,_0x271a('0x23'));_0x17c026(_0x15b7f0['result'][_0x271a('0x29')]);}})[_0x271a('0x2a')](function(_0x41b886){logger[_0x271a('0x27')]('ChatQueue,\x20%s,\x20%s',_0x84f7e6,_0x41b886);_0x19a434(_0x41b886);});});}function respondWithStatusCode(_0x447dbf,_0x53d8b9){_0x53d8b9=_0x53d8b9||0xcc;return function(_0x21b752){if(_0x21b752){return _0x447dbf[_0x271a('0x2b')](_0x53d8b9);}return _0x447dbf[_0x271a('0x2c')](_0x53d8b9)[_0x271a('0x2d')]();};}function respondWithResult(_0x1510a4,_0x5cd72a){_0x5cd72a=_0x5cd72a||0xc8;return function(_0x54548b){if(_0x54548b){return _0x1510a4[_0x271a('0x2c')](_0x5cd72a)[_0x271a('0x2e')](_0x54548b);}};}function respondWithFilteredResult(_0x1149f4,_0xa53ea0){return function(_0x59f381){if(_0x59f381){var _0x416d06=typeof _0xa53ea0[_0x271a('0x2f')]===_0x271a('0x30')&&typeof _0xa53ea0[_0x271a('0x31')]===_0x271a('0x30');var _0x4d7ef9=_0x59f381[_0x271a('0x32')];var _0x3bbbb5=_0x416d06?0x0:_0xa53ea0['offset'];var _0x36fb64=_0x416d06?_0x59f381[_0x271a('0x32')]:_0xa53ea0[_0x271a('0x2f')]+_0xa53ea0['limit'];var _0x2ac9a4;if(_0x36fb64>=_0x4d7ef9){_0x36fb64=_0x4d7ef9;_0x2ac9a4=0xc8;}else{_0x2ac9a4=0xce;}_0x1149f4[_0x271a('0x2c')](_0x2ac9a4);return _0x1149f4[_0x271a('0x33')](_0x271a('0x34'),_0x3bbbb5+'-'+_0x36fb64+'/'+_0x4d7ef9)[_0x271a('0x2e')](_0x59f381);}return null;};}function patchUpdates(_0x22879a){return function(_0x403324){try{jsonpatch[_0x271a('0x35')](_0x403324,_0x22879a,!![]);}catch(_0x4e4087){return BPromise['reject'](_0x4e4087);}return _0x403324['save']();};}function saveUpdates(_0x13496c,_0x5e22d7){return function(_0xbbc23a){if(_0xbbc23a){return _0xbbc23a[_0x271a('0x36')](_0x13496c)[_0x271a('0x20')](function(_0x3073eb){return _0x3073eb;});}return null;};}function removeEntity(_0x3254f1,_0x23c9a5){return function(_0x4aa64d){if(_0x4aa64d){return _0x4aa64d[_0x271a('0x37')]()[_0x271a('0x20')](function(){var _0x974e1c=_0x4aa64d[_0x271a('0x38')]({'plain':!![]});var _0x8f3d49=_0x271a('0x39');return db[_0x271a('0x3a')][_0x271a('0x37')]({'where':{'type':_0x8f3d49,'resourceId':_0x974e1c['id']}})[_0x271a('0x20')](function(){return _0x4aa64d;});})[_0x271a('0x20')](function(){_0x3254f1[_0x271a('0x2c')](0xcc)[_0x271a('0x2d')]();});}};}function handleEntityNotFound(_0x423087,_0x1538b3){return function(_0x5e2076){if(!_0x5e2076){_0x423087['sendStatus'](0x194);}return _0x5e2076;};}function handleError(_0x2d059e,_0x3c9e79){_0x3c9e79=_0x3c9e79||0x1f4;return function(_0x4f4bd2){logger['error'](_0x4f4bd2[_0x271a('0x3b')]);if(_0x4f4bd2[_0x271a('0x3c')]){delete _0x4f4bd2[_0x271a('0x3c')];}_0x2d059e[_0x271a('0x2c')](_0x3c9e79)[_0x271a('0x3d')](_0x4f4bd2);};}exports[_0x271a('0x3e')]=function(_0x28d455,_0x5e7cf2){var _0x34493e={},_0x54e5b8={},_0x14fd8a={'count':0x0,'rows':[]};var _0x1c9a1f=_[_0x271a('0x3f')](db[_0x271a('0x40')][_0x271a('0x41')],function(_0x577d08){return{'name':_0x577d08[_0x271a('0x42')],'type':_0x577d08[_0x271a('0x43')]['key']};});_0x54e5b8[_0x271a('0x44')]=_['map'](_0x1c9a1f,_0x271a('0x3c'));_0x54e5b8['query']=_[_0x271a('0x45')](_0x28d455[_0x271a('0x46')]);_0x54e5b8['filters']=_['intersection'](_0x54e5b8[_0x271a('0x44')],_0x54e5b8[_0x271a('0x46')]);_0x34493e[_0x271a('0x47')]=_[_0x271a('0x48')](_0x54e5b8[_0x271a('0x44')],qs['fields'](_0x28d455['query'][_0x271a('0x49')]));_0x34493e['attributes']=_0x34493e['attributes'][_0x271a('0x4a')]?_0x34493e[_0x271a('0x47')]:_0x54e5b8[_0x271a('0x44')];if(!_0x28d455[_0x271a('0x46')][_0x271a('0x4b')](_0x271a('0x4c'))){_0x34493e[_0x271a('0x31')]=qs['limit'](_0x28d455[_0x271a('0x46')]['limit']);_0x34493e[_0x271a('0x2f')]=qs[_0x271a('0x2f')](_0x28d455[_0x271a('0x46')][_0x271a('0x2f')]);}_0x34493e[_0x271a('0x4d')]=qs[_0x271a('0x4e')](_0x28d455[_0x271a('0x46')][_0x271a('0x4e')]);_0x34493e[_0x271a('0x4f')]=qs[_0x271a('0x50')](_[_0x271a('0x51')](_0x28d455['query'],_0x54e5b8[_0x271a('0x50')]),_0x1c9a1f);if(_0x28d455['query']['filter']){_0x34493e[_0x271a('0x4f')]=_[_0x271a('0x52')](_0x34493e[_0x271a('0x4f')],{'$or':_[_0x271a('0x3f')](_0x1c9a1f,function(_0x38a8e){if(_0x38a8e[_0x271a('0x43')]!=='VIRTUAL'){var _0x3f339f={};_0x3f339f[_0x38a8e['name']]={'$like':'%'+_0x28d455[_0x271a('0x46')][_0x271a('0x53')]+'%'};return _0x3f339f;}})});}_0x34493e=_['merge']({},_0x34493e,_0x28d455[_0x271a('0x54')]);var _0x4c8976={'where':_0x34493e[_0x271a('0x4f')]};return db['ChatQueue'][_0x271a('0x32')](_0x4c8976)[_0x271a('0x20')](function(_0x4164b5){_0x14fd8a['count']=_0x4164b5;if(_0x28d455[_0x271a('0x46')][_0x271a('0x55')]){_0x34493e[_0x271a('0x56')]=[{'all':!![]}];}return db[_0x271a('0x40')]['findAll'](_0x34493e);})[_0x271a('0x20')](function(_0x301ee3){_0x14fd8a[_0x271a('0x57')]=_0x301ee3;return _0x14fd8a;})['then'](respondWithFilteredResult(_0x5e7cf2,_0x34493e))[_0x271a('0x2a')](handleError(_0x5e7cf2,null));};exports[_0x271a('0x58')]=function(_0x5efcc3,_0x38c035){var _0x45af28={'raw':!![],'where':{'id':_0x5efcc3[_0x271a('0x59')]['id']}},_0x22283e={};_0x22283e['model']=_[_0x271a('0x45')](db['ChatQueue'][_0x271a('0x41')]);_0x22283e[_0x271a('0x46')]=_[_0x271a('0x45')](_0x5efcc3[_0x271a('0x46')]);_0x22283e[_0x271a('0x50')]=_['intersection'](_0x22283e[_0x271a('0x44')],_0x22283e[_0x271a('0x46')]);_0x45af28[_0x271a('0x47')]=_[_0x271a('0x48')](_0x22283e['model'],qs['fields'](_0x5efcc3[_0x271a('0x46')][_0x271a('0x49')]));_0x45af28[_0x271a('0x47')]=_0x45af28['attributes']['length']?_0x45af28['attributes']:_0x22283e['model'];if(_0x5efcc3['query'][_0x271a('0x55')]){_0x45af28[_0x271a('0x56')]=[{'all':!![]}];}_0x45af28=_[_0x271a('0x52')]({},_0x45af28,_0x5efcc3['options']);return db[_0x271a('0x40')][_0x271a('0x5a')](_0x45af28)[_0x271a('0x20')](handleEntityNotFound(_0x38c035,null))[_0x271a('0x20')](respondWithResult(_0x38c035,null))[_0x271a('0x2a')](handleError(_0x38c035,null));};exports[_0x271a('0x5b')]=function(_0x5b7f91,_0x28bfa3){return db[_0x271a('0x40')][_0x271a('0x5b')](_0x5b7f91[_0x271a('0x5c')],{})[_0x271a('0x20')](function(_0x14d8d1){var _0x282cb2=_0x5b7f91[_0x271a('0x5d')][_0x271a('0x38')]({'plain':!![]});if(!_0x282cb2)throw new Error(_0x271a('0x5e'));if(_0x282cb2['role']===_0x271a('0x5d')){var _0x557a08=_0x14d8d1['get']({'plain':!![]});var _0x347122=_0x271a('0x39');return db[_0x271a('0x5f')][_0x271a('0x5a')]({'where':{'name':_0x347122,'userProfileId':_0x282cb2[_0x271a('0x60')]},'raw':!![]})[_0x271a('0x20')](function(_0x452349){if(_0x452349&&_0x452349[_0x271a('0x61')]===0x0){return db['UserProfileResource'][_0x271a('0x5b')]({'name':_0x557a08['name'],'resourceId':_0x557a08['id'],'type':_0x452349[_0x271a('0x3c')],'sectionId':_0x452349['id']},{})[_0x271a('0x20')](function(){return _0x14d8d1;});}else{return _0x14d8d1;}})['catch'](function(_0x174c06){logger['error'](_0x271a('0x62'),_0x174c06);throw _0x174c06;});}return _0x14d8d1;})[_0x271a('0x20')](respondWithResult(_0x28bfa3,0xc9))['catch'](handleError(_0x28bfa3,null));};exports['update']=function(_0x245444,_0x2f2b20){if(_0x245444['body']['id']){delete _0x245444['body']['id'];}return db[_0x271a('0x40')]['find']({'where':{'id':_0x245444[_0x271a('0x59')]['id']}})[_0x271a('0x20')](handleEntityNotFound(_0x2f2b20,null))[_0x271a('0x20')](saveUpdates(_0x245444[_0x271a('0x5c')],null))[_0x271a('0x20')](respondWithResult(_0x2f2b20,null))['catch'](handleError(_0x2f2b20,null));};exports[_0x271a('0x37')]=function(_0xbb1aae,_0x4603a0){return db['ChatQueue'][_0x271a('0x5a')]({'where':{'id':_0xbb1aae[_0x271a('0x59')]['id']}})[_0x271a('0x20')](handleEntityNotFound(_0x4603a0,null))['then'](removeEntity(_0x4603a0,null))[_0x271a('0x2a')](handleError(_0x4603a0,null));};exports[_0x271a('0x63')]=function(_0x1c16c6,_0x2b837d){return db[_0x271a('0x40')][_0x271a('0x63')]()[_0x271a('0x20')](respondWithResult(_0x2b837d,null))[_0x271a('0x2a')](handleError(_0x2b837d,null));};exports['getMembers']=function(_0x986b25,_0x4b84be,_0xda58d6){var _0x3cafc0={'raw':!![],'where':{}},_0x4ab723={},_0x1a3655;return db[_0x271a('0x40')][_0x271a('0x64')]({'where':{'id':_0x986b25[_0x271a('0x59')]['id']}})[_0x271a('0x20')](handleEntityNotFound(_0x4b84be,null))['then'](function(_0x106cd6){if(_0x106cd6){_0x1a3655=_0x106cd6['get']({'plain':!![]});_0x4ab723[_0x271a('0x44')]=_[_0x271a('0x45')](db['UserChatQueue'][_0x271a('0x41')]);_0x4ab723['query']=_[_0x271a('0x45')](_0x986b25['query']);_0x4ab723[_0x271a('0x50')]=_[_0x271a('0x48')](_0x4ab723[_0x271a('0x44')],_0x4ab723[_0x271a('0x46')]);_0x3cafc0['attributes']=_['intersection'](_0x4ab723[_0x271a('0x44')],qs[_0x271a('0x49')](_0x986b25['query'][_0x271a('0x49')]));_0x3cafc0[_0x271a('0x47')]=_0x3cafc0[_0x271a('0x47')]['length']?_0x3cafc0['attributes']:_0x4ab723[_0x271a('0x44')];if(!_0x986b25[_0x271a('0x46')][_0x271a('0x4b')](_0x271a('0x4c'))){_0x3cafc0[_0x271a('0x31')]=qs[_0x271a('0x31')](_0x986b25[_0x271a('0x46')][_0x271a('0x31')]);_0x3cafc0[_0x271a('0x2f')]=qs[_0x271a('0x2f')](_0x986b25['query'][_0x271a('0x2f')]);}_0x3cafc0[_0x271a('0x4d')]=qs[_0x271a('0x4e')](_0x986b25['query'][_0x271a('0x4e')]);_0x3cafc0[_0x271a('0x4f')]=qs['filters'](_[_0x271a('0x51')](_0x986b25[_0x271a('0x46')],_0x4ab723[_0x271a('0x50')]));_0x3cafc0[_0x271a('0x4f')][_0x271a('0x65')]=_0x106cd6['id'];if(_0x986b25[_0x271a('0x46')][_0x271a('0x53')]){_0x3cafc0[_0x271a('0x4f')]=_[_0x271a('0x52')](_0x3cafc0[_0x271a('0x4f')],{'$or':_[_0x271a('0x3f')](_0x3cafc0['attributes'],function(_0x5b6477){var _0x426c2f={};_0x426c2f[_0x5b6477]={'$like':'%'+_0x986b25['query'][_0x271a('0x53')]+'%'};return _0x426c2f;})});}_0x3cafc0=_[_0x271a('0x52')]({},_0x3cafc0,_0x986b25[_0x271a('0x54')]);return db[_0x271a('0x66')][_0x271a('0x67')](_0x3cafc0);}})['then'](function(_0x2717ff){if(_0x2717ff){return db[_0x271a('0x68')][_0x271a('0x69')]({'where':{'id':_['map'](_0x2717ff,_0x271a('0x6a')),'role':_0x271a('0x6b')},'attributes':['id',_0x271a('0x3c'),'chatPause',_0x271a('0x6c'),_0x271a('0x6d')]});}})[_0x271a('0x20')](function(_0x34511a){if(_0x34511a){return{'count':_0x34511a[_0x271a('0x32')],'rows':_['map'](_0x34511a[_0x271a('0x57')],function(_0x134669){return{'membername':_0x134669['name'],'UserId':_0x134669['id'],'queue_name':_0x1a3655['name'],'ChatQueueId':_0x1a3655['id'],'interface':util[_0x271a('0x6e')]('%s/%s',_0x271a('0x6f'),_0x134669['name']),'penalty':0x0,'paused':_0x134669[_0x271a('0x70')],'createdAt':_0x134669['createdAt'],'updatedAt':_0x134669[_0x271a('0x6c')]};})};}else{return{'count':0x0,'rows':[]};}})[_0x271a('0x20')](respondWithFilteredResult(_0x4b84be,_0x3cafc0))[_0x271a('0x2a')](handleError(_0x4b84be,null));};exports[_0x271a('0x71')]=function(_0x320aff,_0x127834,_0x24752f){var _0x353ae9={};var _0x5542f7={};var _0x32b040;var _0x597c7e;return db[_0x271a('0x40')][_0x271a('0x64')]({'where':{'id':_0x320aff['params']['id']}})[_0x271a('0x20')](handleEntityNotFound(_0x127834,null))[_0x271a('0x20')](function(_0x3573e7){if(_0x3573e7){_0x32b040=_0x3573e7;_0x5542f7[_0x271a('0x44')]=_['keys'](db['Team'][_0x271a('0x41')]);_0x5542f7['query']=_[_0x271a('0x45')](_0x320aff[_0x271a('0x46')]);_0x5542f7[_0x271a('0x50')]=_[_0x271a('0x48')](_0x5542f7[_0x271a('0x44')],_0x5542f7[_0x271a('0x46')]);_0x353ae9['attributes']=_[_0x271a('0x48')](_0x5542f7[_0x271a('0x44')],qs[_0x271a('0x49')](_0x320aff[_0x271a('0x46')]['fields']));_0x353ae9['attributes']=_0x353ae9['attributes'][_0x271a('0x4a')]?_0x353ae9['attributes']:_0x5542f7['model'];_0x353ae9['order']=qs['sort'](_0x320aff[_0x271a('0x46')][_0x271a('0x4e')]);_0x353ae9['where']=qs[_0x271a('0x50')](_[_0x271a('0x51')](_0x320aff[_0x271a('0x46')],_0x5542f7[_0x271a('0x50')]));if(_0x320aff[_0x271a('0x46')][_0x271a('0x53')]){_0x353ae9[_0x271a('0x4f')]=_['merge'](_0x353ae9[_0x271a('0x4f')],{'$or':_[_0x271a('0x3f')](_0x353ae9[_0x271a('0x47')],function(_0x2973a6){var _0x10824f={};_0x10824f[_0x2973a6]={'$like':'%'+_0x320aff[_0x271a('0x46')][_0x271a('0x53')]+'%'};return _0x10824f;})});}_0x353ae9=_['merge']({},_0x353ae9,_0x320aff[_0x271a('0x54')]);return _0x32b040['getTeams'](_0x353ae9);}})[_0x271a('0x20')](function(_0x11d973){if(_0x11d973){_0x597c7e=_0x11d973[_0x271a('0x4a')];if(!_0x320aff[_0x271a('0x46')][_0x271a('0x4b')](_0x271a('0x4c'))){_0x353ae9[_0x271a('0x31')]=qs[_0x271a('0x31')](_0x320aff[_0x271a('0x46')]['limit']);_0x353ae9[_0x271a('0x2f')]=qs['offset'](_0x320aff[_0x271a('0x46')][_0x271a('0x2f')]);}return _0x32b040[_0x271a('0x71')](_0x353ae9);}})[_0x271a('0x20')](function(_0x124824){if(_0x124824){return _0x124824?{'count':_0x597c7e,'rows':_0x124824}:null;}})[_0x271a('0x20')](respondWithResult(_0x127834,null))['catch'](handleError(_0x127834,null));};exports[_0x271a('0x72')]=function(_0x21b8a4,_0x230899,_0x48229f){var _0x1eda75=_0x21b8a4[_0x271a('0x5c')][_0x271a('0x73')];return db[_0x271a('0x74')][_0x271a('0x67')]({'where':{'id':_0x1eda75},'attributes':['id'],'include':[{'model':db['User'],'as':_0x271a('0x75'),'attributes':['id',_0x271a('0x3c'),_0x271a('0x76'),'voicePause',_0x271a('0x77')],'raw':!![]}]})[_0x271a('0x20')](function(_0x554a5d){if(_0x554a5d){var _0x520178=_[_0x271a('0x78')](_0x554a5d,function(_0x151986){var _0xbc622=_0x151986['get']({'plain':!![]});return _0xbc622['Agents'];});return db[_0x271a('0x40')][_0x271a('0x5a')]({'where':{'id':_0x21b8a4[_0x271a('0x59')]['id']}})[_0x271a('0x20')](function(_0x5e62d0){return db['sequelize']['transaction'](function(_0x2e04e7){return _0x5e62d0[_0x271a('0x72')](_0x1eda75,{'transaction':_0x2e04e7})[_0x271a('0x20')](function(){return BPromise[_0x271a('0x79')](_0x520178,function(_0x2db2cc){return db[_0x271a('0x66')][_0x271a('0x7a')]({'where':{'UserId':_0x2db2cc['id'],'ChatQueueId':_0x21b8a4[_0x271a('0x59')]['id']},'transaction':_0x2e04e7});});})[_0x271a('0x20')](function(){_0x520178['forEach'](function(_0x5b9fe4){socket[_0x271a('0x7b')]('userChatQueue:save',{'UserId':_0x5b9fe4['id'],'ChatQueueId':_0x5e62d0['id']});});});});});}})['then'](respondWithStatusCode(_0x230899,null))[_0x271a('0x2a')](handleError(_0x230899,null));};exports[_0x271a('0x7c')]=function(_0x1f797a,_0x4226c5,_0x3b81e9){return db[_0x271a('0x74')]['findAll']({'where':{'id':_0x1f797a[_0x271a('0x46')][_0x271a('0x73')]},'attributes':['id'],'include':[{'model':db[_0x271a('0x68')],'as':_0x271a('0x75'),'attributes':['id'],'raw':!![]}]})[_0x271a('0x20')](handleEntityNotFound(_0x4226c5,null))[_0x271a('0x20')](function(_0x414700){var _0x64c23e=_[_0x271a('0x3f')](_0x414700,'id');var _0x31520c=[];var _0x1feee8=[];var _0x2f3944=squel[_0x271a('0x7d')]();_0x2f3944['field'](_0x271a('0x7e'))[_0x271a('0x7f')]('team_has_chat_queues','tq')[_0x271a('0x80')](_0x271a('0x81'),'ut','ut.TeamId\x20=\x20tq.TeamId')[_0x271a('0x4f')](_0x271a('0x82'),_0x1f797a[_0x271a('0x59')]['id']);for(var _0x22faac=0x0;_0x22faac<_0x414700[_0x271a('0x4a')];_0x22faac+=0x1){let _0x55f851=_0x414700[_0x22faac];for(var _0xf5e487=0x0;_0xf5e487<_0x55f851[_0x271a('0x75')][_0x271a('0x4a')];_0xf5e487+=0x1){let _0x40d628=_0x55f851[_0x271a('0x75')][_0xf5e487];var _0xd5a413=_0x2f3944[_0x271a('0x83')]();_0xd5a413[_0x271a('0x4f')](_0x271a('0x84'),_0x40d628['id']);_0x1feee8['push'](db['sequelize'][_0x271a('0x46')](_0xd5a413['toString'](),{'type':db[_0x271a('0x85')][_0x271a('0x86')][_0x271a('0x87')]})['then'](function(_0x3541b3){if(_0x3541b3[_0x271a('0x4a')]===0x1){return _0x40d628['id'];}else{var _0x57e091=_[_0x271a('0x88')](_['map'](_0x3541b3,_0x271a('0x89')),function(_0x30d989){return _['includes'](_0x64c23e,_0x30d989);});if(_0x57e091){return _0x40d628['id'];}}}));}}return BPromise[_0x271a('0x8a')](_0x1feee8)[_0x271a('0x20')](function(_0x432905){_0x31520c=_(_0x31520c)[_0x271a('0x8b')](_0x432905)['compact']()['value']();return db[_0x271a('0x40')]['find']({'where':{'id':_0x1f797a[_0x271a('0x59')]['id']}})[_0x271a('0x20')](function(_0x2a8e05){return db[_0x271a('0x85')][_0x271a('0x8c')](function(_0x4b3cb0){return _0x2a8e05[_0x271a('0x7c')](_0x1f797a[_0x271a('0x46')][_0x271a('0x73')],{'transaction':_0x4b3cb0})[_0x271a('0x20')](function(){if(!_[_0x271a('0x8d')](_0x31520c)){return _0x2a8e05['removeAgents'](_0x31520c,{'transaction':_0x4b3cb0});}})[_0x271a('0x20')](function(){_0x31520c[_0x271a('0x8e')](function(_0x2a6716){socket[_0x271a('0x7b')](_0x271a('0x8f'),{'UserId':_0x2a6716,'ChatQueueId':_0x2a8e05['id']});});});});});});})['then'](respondWithStatusCode(_0x4226c5,null))[_0x271a('0x2a')](handleError(_0x4226c5,null));};exports[_0x271a('0x90')]=function(_0x28bb1b,_0x4f5621,_0x51cb47){return db[_0x271a('0x40')]['find']({'where':{'id':_0x28bb1b[_0x271a('0x59')]['id']}})[_0x271a('0x20')](handleEntityNotFound(_0x4f5621,null))[_0x271a('0x20')](function(_0x459cb9){if(_0x459cb9){return _0x459cb9[_0x271a('0x90')](_0x28bb1b[_0x271a('0x5c')][_0x271a('0x73')],_['omit'](_0x28bb1b[_0x271a('0x5c')],[_0x271a('0x73'),'id'])||{})[_0x271a('0x91')](function(_0x3accbd){for(var _0x10a68d=0x0;_0x10a68d<_0x28bb1b[_0x271a('0x5c')]['ids'][_0x271a('0x4a')];_0x10a68d+=0x1){socket['emit'](_0x271a('0x92'),{'UserId':Number(_0x28bb1b[_0x271a('0x5c')][_0x271a('0x73')][_0x10a68d]),'ChatQueueId':Number(_0x28bb1b[_0x271a('0x59')]['id'])});}return _0x3accbd;});}})[_0x271a('0x20')](respondWithResult(_0x4f5621,null))[_0x271a('0x2a')](handleError(_0x4f5621,null));};exports[_0x271a('0x93')]=function(_0x178639,_0x18e001,_0x1112fb){return db[_0x271a('0x40')][_0x271a('0x5a')]({'where':{'id':_0x178639[_0x271a('0x59')]['id']}})['then'](handleEntityNotFound(_0x18e001,null))[_0x271a('0x20')](function(_0x51d7a2){if(_0x51d7a2){return _0x51d7a2[_0x271a('0x93')](_0x178639['query'][_0x271a('0x73')])[_0x271a('0x20')](function(){if(_['isArray'](_0x178639['query'][_0x271a('0x73')])){for(var _0x4d727f=0x0;_0x4d727f<_0x178639['query'][_0x271a('0x73')][_0x271a('0x4a')];_0x4d727f+=0x1){socket[_0x271a('0x7b')](_0x271a('0x8f'),{'UserId':Number(_0x178639[_0x271a('0x46')]['ids'][_0x4d727f]),'ChatQueueId':Number(_0x178639['params']['id'])});}}else{socket[_0x271a('0x7b')]('userChatQueue:remove',{'UserId':Number(_0x178639['query'][_0x271a('0x73')]),'ChatQueueId':Number(_0x178639[_0x271a('0x59')]['id'])});}});}})[_0x271a('0x20')](respondWithStatusCode(_0x18e001,null))['catch'](handleError(_0x18e001,null));};exports[_0x271a('0x94')]=function(_0x1b76ec,_0x193cdf,_0x37007e){var _0x417372={};var _0x9db430={};var _0x10533b;var _0x4cfb55;return db[_0x271a('0x40')][_0x271a('0x64')]({'where':{'id':_0x1b76ec[_0x271a('0x59')]['id']}})[_0x271a('0x20')](handleEntityNotFound(_0x193cdf,null))['then'](function(_0x4d6122){if(_0x4d6122){_0x10533b=_0x4d6122;_0x9db430[_0x271a('0x44')]=_[_0x271a('0x45')](db[_0x271a('0x68')][_0x271a('0x41')]);_0x9db430[_0x271a('0x46')]=_[_0x271a('0x45')](_0x1b76ec[_0x271a('0x46')]);_0x9db430['filters']=_[_0x271a('0x48')](_0x9db430[_0x271a('0x44')],_0x9db430['query']);_0x417372[_0x271a('0x47')]=_[_0x271a('0x48')](_0x9db430[_0x271a('0x44')],qs[_0x271a('0x49')](_0x1b76ec[_0x271a('0x46')][_0x271a('0x49')]));_0x417372[_0x271a('0x47')]=_0x417372['attributes']['length']?_0x417372[_0x271a('0x47')]:_0x9db430[_0x271a('0x44')];_0x417372[_0x271a('0x4d')]=qs[_0x271a('0x4e')](_0x1b76ec['query'][_0x271a('0x4e')]);_0x417372['where']=qs[_0x271a('0x50')](_[_0x271a('0x51')](_0x1b76ec[_0x271a('0x46')],_0x9db430[_0x271a('0x50')]));if(_0x1b76ec[_0x271a('0x46')][_0x271a('0x53')]){_0x417372[_0x271a('0x4f')]=_[_0x271a('0x52')](_0x417372[_0x271a('0x4f')],{'$or':_[_0x271a('0x3f')](_0x417372['attributes'],function(_0x59eef7){var _0x1b0451={};_0x1b0451[_0x59eef7]={'$like':'%'+_0x1b76ec['query']['filter']+'%'};return _0x1b0451;})});}_0x417372=_[_0x271a('0x52')]({},_0x417372,_0x1b76ec[_0x271a('0x54')]);return _0x10533b[_0x271a('0x94')](_0x417372);}})[_0x271a('0x20')](function(_0x410168){if(_0x410168){_0x4cfb55=_0x410168[_0x271a('0x4a')];if(!_0x1b76ec['query'][_0x271a('0x4b')](_0x271a('0x4c'))){_0x417372['limit']=qs[_0x271a('0x31')](_0x1b76ec[_0x271a('0x46')]['limit']);_0x417372['offset']=qs['offset'](_0x1b76ec[_0x271a('0x46')][_0x271a('0x2f')]);}return _0x10533b['getAgents'](_0x417372);}})[_0x271a('0x20')](function(_0x5c332f){if(_0x5c332f){return _0x5c332f?{'count':_0x4cfb55,'rows':_0x5c332f}:null;}})[_0x271a('0x20')](respondWithResult(_0x193cdf,null))[_0x271a('0x2a')](handleError(_0x193cdf,null));}; \ No newline at end of file +var _0xfec4=['QueryTypes','every','TeamId','includes','union','compact','value','transaction','isEmpty','removeAgents','userChatQueue:remove','addAgents','omit','spread','isArray','getAgents','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','util','path','sox','to-csv','ejs','fs-extra','lodash','squel','crypto','jsforce','desk.js','querystring','papaparse','ioredis','../../components/parsers/qs','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','redis','defaults','localhost','socket.io-emitter','./chatQueue.socket','register','jayson/promise','client','http','request','then','info','ChatQueue,\x20%s,\x20%s','request\x20sent','debug','ChatQueue,\x20%s,\x20%s,\x20%s','stringify','error','code','message','catch','sendStatus','status','end','json','offset','limit','undefined','count','Content-Range','apply','reject','save','get','ChatQueues','destroy','stack','name','send','index','rawAttributes','type','key','map','query','model','attributes','fields','length','nolimit','order','sort','where','filters','pick','filter','merge','VIRTUAL','ChatQueue','includeAll','include','findAll','rows','params','keys','intersection','find','create','user','Unable\x20to\x20retrieve\x20the\x20current\x20user','UserProfileSection','userProfileId','UserProfileResource','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','update','body','describe','getMembers','findOne','UserChatQueue','hasOwnProperty','UserId','chatPause','updatedAt','createdAt','%s/%s','SIP','Team','options','getTeams','addTeams','User','Agents','online','interface','flatMap','sequelize','each','findOrCreate','forEach','emit','userChatQueue:save','removeTeams','ids','field','tq.TeamId','team_has_chat_queues','join','user_has_teams','ut.TeamId\x20=\x20tq.TeamId','ChatQueueId\x20=\x20?','clone','ut.UserId\x20=\x20?','toString'];(function(_0x255c64,_0x26b3dc){var _0x4816df=function(_0x595571){while(--_0x595571){_0x255c64['push'](_0x255c64['shift']());}};_0x4816df(++_0x26b3dc);}(_0xfec4,0xaf));var _0x4fec=function(_0x16629d,_0x492375){_0x16629d=_0x16629d-0x0;var _0x56ccee=_0xfec4[_0x16629d];return _0x56ccee;};'use strict';var emlformat=require(_0x4fec('0x0'));var rimraf=require(_0x4fec('0x1'));var zipdir=require(_0x4fec('0x2'));var jsonpatch=require(_0x4fec('0x3'));var rp=require(_0x4fec('0x4'));var moment=require(_0x4fec('0x5'));var BPromise=require(_0x4fec('0x6'));var Mustache=require('mustache');var util=require(_0x4fec('0x7'));var path=require(_0x4fec('0x8'));var sox=require(_0x4fec('0x9'));var csv=require(_0x4fec('0xa'));var ejs=require(_0x4fec('0xb'));var fs=require('fs');var fs_extra=require(_0x4fec('0xc'));var _=require(_0x4fec('0xd'));var squel=require(_0x4fec('0xe'));var crypto=require(_0x4fec('0xf'));var jsforce=require(_0x4fec('0x10'));var deskjs=require(_0x4fec('0x11'));var toCsv=require(_0x4fec('0xa'));var querystring=require(_0x4fec('0x12'));var Papa=require(_0x4fec('0x13'));var Redis=require(_0x4fec('0x14'));var authService=require('../../components/auth/service');var qs=require(_0x4fec('0x15'));var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0x4fec('0x16'));var logger=require(_0x4fec('0x17'))(_0x4fec('0x18'));var utils=require(_0x4fec('0x19'));var config=require(_0x4fec('0x1a'));var licenseUtil=require(_0x4fec('0x1b'));var db=require(_0x4fec('0x1c'))['db'];config[_0x4fec('0x1d')]=_[_0x4fec('0x1e')](config[_0x4fec('0x1d')],{'host':_0x4fec('0x1f'),'port':0x18eb});var socket=require(_0x4fec('0x20'))(new Redis(config['redis']));require(_0x4fec('0x21'))[_0x4fec('0x22')](socket);var jayson=require(_0x4fec('0x23'));var client=jayson[_0x4fec('0x24')][_0x4fec('0x25')]({'port':0x232a});function respondWithRpcPromise(_0x17c26d,_0x2cde1c,_0x2b11e4,_0x5443fb){return new BPromise(function(_0x320949,_0x2278e3){var _0x5c0918=_0x5443fb||client;return _0x5c0918[_0x4fec('0x26')](_0x17c26d,_0x2b11e4)[_0x4fec('0x27')](function(_0x478e82){logger[_0x4fec('0x28')](_0x4fec('0x29'),_0x2cde1c,_0x4fec('0x2a'));logger[_0x4fec('0x2b')](_0x4fec('0x2c'),_0x2cde1c,'request\x20sent',JSON[_0x4fec('0x2d')](_0x478e82));if(_0x478e82[_0x4fec('0x2e')]){if(_0x478e82['error'][_0x4fec('0x2f')]===0x1f4){logger[_0x4fec('0x2e')](_0x4fec('0x29'),_0x2cde1c,_0x478e82[_0x4fec('0x2e')][_0x4fec('0x30')]);return _0x2278e3(_0x478e82[_0x4fec('0x2e')][_0x4fec('0x30')]);}logger[_0x4fec('0x2e')]('ChatQueue,\x20%s,\x20%s',_0x2cde1c,_0x478e82[_0x4fec('0x2e')][_0x4fec('0x30')]);return _0x320949(_0x478e82[_0x4fec('0x2e')][_0x4fec('0x30')]);}else{logger[_0x4fec('0x28')](_0x4fec('0x29'),_0x2cde1c,_0x4fec('0x2a'));_0x320949(_0x478e82['result'][_0x4fec('0x30')]);}})[_0x4fec('0x31')](function(_0x17f5aa){logger[_0x4fec('0x2e')]('ChatQueue,\x20%s,\x20%s',_0x2cde1c,_0x17f5aa);_0x2278e3(_0x17f5aa);});});}function respondWithStatusCode(_0x344af1,_0x2b5812){_0x2b5812=_0x2b5812||0xcc;return function(_0x2c0701){if(_0x2c0701){return _0x344af1[_0x4fec('0x32')](_0x2b5812);}return _0x344af1[_0x4fec('0x33')](_0x2b5812)[_0x4fec('0x34')]();};}function respondWithResult(_0x362972,_0x51f1bf){_0x51f1bf=_0x51f1bf||0xc8;return function(_0x1ada44){if(_0x1ada44){return _0x362972[_0x4fec('0x33')](_0x51f1bf)[_0x4fec('0x35')](_0x1ada44);}};}function respondWithFilteredResult(_0x58aa1e,_0x468e7a){return function(_0x4da6b7){if(_0x4da6b7){var _0x10f00e=typeof _0x468e7a[_0x4fec('0x36')]==='undefined'&&typeof _0x468e7a[_0x4fec('0x37')]===_0x4fec('0x38');var _0x2e9488=_0x4da6b7[_0x4fec('0x39')];var _0x5e8630=_0x10f00e?0x0:_0x468e7a[_0x4fec('0x36')];var _0x59ac84=_0x10f00e?_0x4da6b7[_0x4fec('0x39')]:_0x468e7a[_0x4fec('0x36')]+_0x468e7a['limit'];var _0x5e071c;if(_0x59ac84>=_0x2e9488){_0x59ac84=_0x2e9488;_0x5e071c=0xc8;}else{_0x5e071c=0xce;}_0x58aa1e['status'](_0x5e071c);return _0x58aa1e['set'](_0x4fec('0x3a'),_0x5e8630+'-'+_0x59ac84+'/'+_0x2e9488)['json'](_0x4da6b7);}return null;};}function patchUpdates(_0x2b0a9a){return function(_0x1e5fb7){try{jsonpatch[_0x4fec('0x3b')](_0x1e5fb7,_0x2b0a9a,!![]);}catch(_0x1df778){return BPromise[_0x4fec('0x3c')](_0x1df778);}return _0x1e5fb7[_0x4fec('0x3d')]();};}function saveUpdates(_0x1e9d6d,_0x21c5db){return function(_0x9379cc){if(_0x9379cc){return _0x9379cc['update'](_0x1e9d6d)[_0x4fec('0x27')](function(_0x59ac21){return _0x59ac21;});}return null;};}function removeEntity(_0x5f4a9a,_0x1c0f52){return function(_0x417dc0){if(_0x417dc0){return _0x417dc0['destroy']()[_0x4fec('0x27')](function(){var _0x331980=_0x417dc0[_0x4fec('0x3e')]({'plain':!![]});var _0x21607b=_0x4fec('0x3f');return db['UserProfileResource'][_0x4fec('0x40')]({'where':{'type':_0x21607b,'resourceId':_0x331980['id']}})[_0x4fec('0x27')](function(){return _0x417dc0;});})['then'](function(){_0x5f4a9a[_0x4fec('0x33')](0xcc)[_0x4fec('0x34')]();});}};}function handleEntityNotFound(_0x21d56f,_0x53e9c2){return function(_0x2ee80a){if(!_0x2ee80a){_0x21d56f[_0x4fec('0x32')](0x194);}return _0x2ee80a;};}function handleError(_0x49e7de,_0x3a9888){_0x3a9888=_0x3a9888||0x1f4;return function(_0x5635bf){logger[_0x4fec('0x2e')](_0x5635bf[_0x4fec('0x41')]);if(_0x5635bf[_0x4fec('0x42')]){delete _0x5635bf[_0x4fec('0x42')];}_0x49e7de[_0x4fec('0x33')](_0x3a9888)[_0x4fec('0x43')](_0x5635bf);};}exports[_0x4fec('0x44')]=function(_0x136bf2,_0x6d1224){var _0x11477c={},_0x1b76b0={},_0x54460c={'count':0x0,'rows':[]};var _0xc4cef=_['map'](db['ChatQueue'][_0x4fec('0x45')],function(_0x40e09b){return{'name':_0x40e09b['fieldName'],'type':_0x40e09b[_0x4fec('0x46')][_0x4fec('0x47')]};});_0x1b76b0['model']=_[_0x4fec('0x48')](_0xc4cef,_0x4fec('0x42'));_0x1b76b0[_0x4fec('0x49')]=_['keys'](_0x136bf2['query']);_0x1b76b0['filters']=_['intersection'](_0x1b76b0[_0x4fec('0x4a')],_0x1b76b0[_0x4fec('0x49')]);_0x11477c[_0x4fec('0x4b')]=_['intersection'](_0x1b76b0[_0x4fec('0x4a')],qs[_0x4fec('0x4c')](_0x136bf2[_0x4fec('0x49')][_0x4fec('0x4c')]));_0x11477c[_0x4fec('0x4b')]=_0x11477c[_0x4fec('0x4b')][_0x4fec('0x4d')]?_0x11477c[_0x4fec('0x4b')]:_0x1b76b0[_0x4fec('0x4a')];if(!_0x136bf2[_0x4fec('0x49')]['hasOwnProperty'](_0x4fec('0x4e'))){_0x11477c['limit']=qs[_0x4fec('0x37')](_0x136bf2[_0x4fec('0x49')][_0x4fec('0x37')]);_0x11477c[_0x4fec('0x36')]=qs[_0x4fec('0x36')](_0x136bf2[_0x4fec('0x49')][_0x4fec('0x36')]);}_0x11477c[_0x4fec('0x4f')]=qs['sort'](_0x136bf2['query'][_0x4fec('0x50')]);_0x11477c[_0x4fec('0x51')]=qs[_0x4fec('0x52')](_[_0x4fec('0x53')](_0x136bf2['query'],_0x1b76b0[_0x4fec('0x52')]),_0xc4cef);if(_0x136bf2[_0x4fec('0x49')][_0x4fec('0x54')]){_0x11477c['where']=_[_0x4fec('0x55')](_0x11477c[_0x4fec('0x51')],{'$or':_[_0x4fec('0x48')](_0xc4cef,function(_0xd9de93){if(_0xd9de93[_0x4fec('0x46')]!==_0x4fec('0x56')){var _0x3b2e64={};_0x3b2e64[_0xd9de93[_0x4fec('0x42')]]={'$like':'%'+_0x136bf2[_0x4fec('0x49')][_0x4fec('0x54')]+'%'};return _0x3b2e64;}})});}_0x11477c=_[_0x4fec('0x55')]({},_0x11477c,_0x136bf2['options']);var _0x180fe4={'where':_0x11477c[_0x4fec('0x51')]};return db[_0x4fec('0x57')][_0x4fec('0x39')](_0x180fe4)[_0x4fec('0x27')](function(_0x12a6d6){_0x54460c[_0x4fec('0x39')]=_0x12a6d6;if(_0x136bf2[_0x4fec('0x49')][_0x4fec('0x58')]){_0x11477c[_0x4fec('0x59')]=[{'all':!![]}];}return db[_0x4fec('0x57')][_0x4fec('0x5a')](_0x11477c);})[_0x4fec('0x27')](function(_0x5687cb){_0x54460c[_0x4fec('0x5b')]=_0x5687cb;return _0x54460c;})['then'](respondWithFilteredResult(_0x6d1224,_0x11477c))[_0x4fec('0x31')](handleError(_0x6d1224,null));};exports['show']=function(_0x5a6226,_0x1fe719){var _0x14e926={'raw':!![],'where':{'id':_0x5a6226[_0x4fec('0x5c')]['id']}},_0x1f4cd5={};_0x1f4cd5[_0x4fec('0x4a')]=_[_0x4fec('0x5d')](db[_0x4fec('0x57')][_0x4fec('0x45')]);_0x1f4cd5['query']=_[_0x4fec('0x5d')](_0x5a6226[_0x4fec('0x49')]);_0x1f4cd5[_0x4fec('0x52')]=_[_0x4fec('0x5e')](_0x1f4cd5[_0x4fec('0x4a')],_0x1f4cd5[_0x4fec('0x49')]);_0x14e926['attributes']=_['intersection'](_0x1f4cd5['model'],qs[_0x4fec('0x4c')](_0x5a6226['query'][_0x4fec('0x4c')]));_0x14e926[_0x4fec('0x4b')]=_0x14e926[_0x4fec('0x4b')][_0x4fec('0x4d')]?_0x14e926[_0x4fec('0x4b')]:_0x1f4cd5[_0x4fec('0x4a')];if(_0x5a6226[_0x4fec('0x49')][_0x4fec('0x58')]){_0x14e926[_0x4fec('0x59')]=[{'all':!![]}];}_0x14e926=_['merge']({},_0x14e926,_0x5a6226['options']);return db[_0x4fec('0x57')][_0x4fec('0x5f')](_0x14e926)['then'](handleEntityNotFound(_0x1fe719,null))[_0x4fec('0x27')](respondWithResult(_0x1fe719,null))[_0x4fec('0x31')](handleError(_0x1fe719,null));};exports[_0x4fec('0x60')]=function(_0x261faa,_0x4c465a){return db[_0x4fec('0x57')][_0x4fec('0x60')](_0x261faa['body'],{})[_0x4fec('0x27')](function(_0x24b78f){var _0x5a4b22=_0x261faa[_0x4fec('0x61')][_0x4fec('0x3e')]({'plain':!![]});if(!_0x5a4b22)throw new Error(_0x4fec('0x62'));if(_0x5a4b22['role']==='user'){var _0x227cac=_0x24b78f[_0x4fec('0x3e')]({'plain':!![]});var _0xb9996f='ChatQueues';return db[_0x4fec('0x63')]['find']({'where':{'name':_0xb9996f,'userProfileId':_0x5a4b22[_0x4fec('0x64')]},'raw':!![]})[_0x4fec('0x27')](function(_0x1c757e){if(_0x1c757e&&_0x1c757e['autoAssociation']===0x0){return db[_0x4fec('0x65')]['create']({'name':_0x227cac[_0x4fec('0x42')],'resourceId':_0x227cac['id'],'type':_0x1c757e[_0x4fec('0x42')],'sectionId':_0x1c757e['id']},{})[_0x4fec('0x27')](function(){return _0x24b78f;});}else{return _0x24b78f;}})['catch'](function(_0x2dc53b){logger['error'](_0x4fec('0x66'),_0x2dc53b);throw _0x2dc53b;});}return _0x24b78f;})[_0x4fec('0x27')](respondWithResult(_0x4c465a,0xc9))[_0x4fec('0x31')](handleError(_0x4c465a,null));};exports[_0x4fec('0x67')]=function(_0x1efa51,_0x2e2aae){if(_0x1efa51['body']['id']){delete _0x1efa51[_0x4fec('0x68')]['id'];}return db['ChatQueue']['find']({'where':{'id':_0x1efa51[_0x4fec('0x5c')]['id']}})[_0x4fec('0x27')](handleEntityNotFound(_0x2e2aae,null))['then'](saveUpdates(_0x1efa51[_0x4fec('0x68')],null))[_0x4fec('0x27')](respondWithResult(_0x2e2aae,null))[_0x4fec('0x31')](handleError(_0x2e2aae,null));};exports[_0x4fec('0x40')]=function(_0x3337a3,_0x4f1af4){return db['ChatQueue'][_0x4fec('0x5f')]({'where':{'id':_0x3337a3['params']['id']}})['then'](handleEntityNotFound(_0x4f1af4,null))['then'](removeEntity(_0x4f1af4,null))['catch'](handleError(_0x4f1af4,null));};exports[_0x4fec('0x69')]=function(_0x366626,_0x259670){return db[_0x4fec('0x57')][_0x4fec('0x69')]()[_0x4fec('0x27')](respondWithResult(_0x259670,null))['catch'](handleError(_0x259670,null));};exports[_0x4fec('0x6a')]=function(_0x50b233,_0x37005d,_0x5e6531){var _0x44d41d={'raw':!![],'where':{}},_0x59f1ad={},_0x187af6;return db[_0x4fec('0x57')][_0x4fec('0x6b')]({'where':{'id':_0x50b233[_0x4fec('0x5c')]['id']}})[_0x4fec('0x27')](handleEntityNotFound(_0x37005d,null))[_0x4fec('0x27')](function(_0x5b2efa){if(_0x5b2efa){_0x187af6=_0x5b2efa[_0x4fec('0x3e')]({'plain':!![]});_0x59f1ad[_0x4fec('0x4a')]=_['keys'](db[_0x4fec('0x6c')][_0x4fec('0x45')]);_0x59f1ad[_0x4fec('0x49')]=_['keys'](_0x50b233[_0x4fec('0x49')]);_0x59f1ad[_0x4fec('0x52')]=_[_0x4fec('0x5e')](_0x59f1ad['model'],_0x59f1ad['query']);_0x44d41d[_0x4fec('0x4b')]=_['intersection'](_0x59f1ad[_0x4fec('0x4a')],qs[_0x4fec('0x4c')](_0x50b233[_0x4fec('0x49')][_0x4fec('0x4c')]));_0x44d41d[_0x4fec('0x4b')]=_0x44d41d[_0x4fec('0x4b')]['length']?_0x44d41d[_0x4fec('0x4b')]:_0x59f1ad[_0x4fec('0x4a')];if(!_0x50b233['query'][_0x4fec('0x6d')](_0x4fec('0x4e'))){_0x44d41d[_0x4fec('0x37')]=qs['limit'](_0x50b233[_0x4fec('0x49')][_0x4fec('0x37')]);_0x44d41d['offset']=qs['offset'](_0x50b233['query'][_0x4fec('0x36')]);}_0x44d41d[_0x4fec('0x4f')]=qs[_0x4fec('0x50')](_0x50b233[_0x4fec('0x49')][_0x4fec('0x50')]);_0x44d41d[_0x4fec('0x51')]=qs[_0x4fec('0x52')](_[_0x4fec('0x53')](_0x50b233[_0x4fec('0x49')],_0x59f1ad[_0x4fec('0x52')]));_0x44d41d[_0x4fec('0x51')]['ChatQueueId']=_0x5b2efa['id'];if(_0x50b233['query']['filter']){_0x44d41d['where']=_[_0x4fec('0x55')](_0x44d41d['where'],{'$or':_[_0x4fec('0x48')](_0x44d41d['attributes'],function(_0x4fc60e){var _0x55f2a5={};_0x55f2a5[_0x4fc60e]={'$like':'%'+_0x50b233['query'][_0x4fec('0x54')]+'%'};return _0x55f2a5;})});}_0x44d41d=_[_0x4fec('0x55')]({},_0x44d41d,_0x50b233['options']);return db[_0x4fec('0x6c')][_0x4fec('0x5a')](_0x44d41d);}})[_0x4fec('0x27')](function(_0x29b334){if(_0x29b334){return db['User']['findAndCountAll']({'where':{'id':_[_0x4fec('0x48')](_0x29b334,_0x4fec('0x6e')),'role':'agent'},'attributes':['id',_0x4fec('0x42'),_0x4fec('0x6f'),_0x4fec('0x70'),_0x4fec('0x71')]});}})['then'](function(_0xca151d){if(_0xca151d){return{'count':_0xca151d['count'],'rows':_[_0x4fec('0x48')](_0xca151d[_0x4fec('0x5b')],function(_0x135d0e){return{'membername':_0x135d0e['name'],'UserId':_0x135d0e['id'],'queue_name':_0x187af6[_0x4fec('0x42')],'ChatQueueId':_0x187af6['id'],'interface':util['format'](_0x4fec('0x72'),_0x4fec('0x73'),_0x135d0e['name']),'penalty':0x0,'paused':_0x135d0e['chatPause'],'createdAt':_0x135d0e[_0x4fec('0x71')],'updatedAt':_0x135d0e['updatedAt']};})};}else{return{'count':0x0,'rows':[]};}})[_0x4fec('0x27')](respondWithFilteredResult(_0x37005d,_0x44d41d))[_0x4fec('0x31')](handleError(_0x37005d,null));};exports['getTeams']=function(_0x58c3ae,_0x55234c,_0x5765ee){var _0x69cf08={};var _0x34af22={};var _0x4f2476;var _0x582d9d;return db['ChatQueue'][_0x4fec('0x6b')]({'where':{'id':_0x58c3ae[_0x4fec('0x5c')]['id']}})[_0x4fec('0x27')](handleEntityNotFound(_0x55234c,null))[_0x4fec('0x27')](function(_0x44c072){if(_0x44c072){_0x4f2476=_0x44c072;_0x34af22['model']=_[_0x4fec('0x5d')](db[_0x4fec('0x74')][_0x4fec('0x45')]);_0x34af22[_0x4fec('0x49')]=_[_0x4fec('0x5d')](_0x58c3ae[_0x4fec('0x49')]);_0x34af22[_0x4fec('0x52')]=_['intersection'](_0x34af22[_0x4fec('0x4a')],_0x34af22[_0x4fec('0x49')]);_0x69cf08[_0x4fec('0x4b')]=_[_0x4fec('0x5e')](_0x34af22['model'],qs[_0x4fec('0x4c')](_0x58c3ae[_0x4fec('0x49')][_0x4fec('0x4c')]));_0x69cf08['attributes']=_0x69cf08[_0x4fec('0x4b')][_0x4fec('0x4d')]?_0x69cf08[_0x4fec('0x4b')]:_0x34af22[_0x4fec('0x4a')];_0x69cf08[_0x4fec('0x4f')]=qs['sort'](_0x58c3ae['query'][_0x4fec('0x50')]);_0x69cf08['where']=qs[_0x4fec('0x52')](_[_0x4fec('0x53')](_0x58c3ae[_0x4fec('0x49')],_0x34af22[_0x4fec('0x52')]));if(_0x58c3ae[_0x4fec('0x49')][_0x4fec('0x54')]){_0x69cf08[_0x4fec('0x51')]=_[_0x4fec('0x55')](_0x69cf08[_0x4fec('0x51')],{'$or':_[_0x4fec('0x48')](_0x69cf08['attributes'],function(_0x3913a1){var _0x2d5d33={};_0x2d5d33[_0x3913a1]={'$like':'%'+_0x58c3ae[_0x4fec('0x49')][_0x4fec('0x54')]+'%'};return _0x2d5d33;})});}_0x69cf08=_['merge']({},_0x69cf08,_0x58c3ae[_0x4fec('0x75')]);return _0x4f2476[_0x4fec('0x76')](_0x69cf08);}})[_0x4fec('0x27')](function(_0x4b29c8){if(_0x4b29c8){_0x582d9d=_0x4b29c8['length'];if(!_0x58c3ae[_0x4fec('0x49')]['hasOwnProperty'](_0x4fec('0x4e'))){_0x69cf08[_0x4fec('0x37')]=qs[_0x4fec('0x37')](_0x58c3ae[_0x4fec('0x49')]['limit']);_0x69cf08['offset']=qs['offset'](_0x58c3ae['query'][_0x4fec('0x36')]);}return _0x4f2476['getTeams'](_0x69cf08);}})[_0x4fec('0x27')](function(_0x3e88fe){if(_0x3e88fe){return _0x3e88fe?{'count':_0x582d9d,'rows':_0x3e88fe}:null;}})['then'](respondWithResult(_0x55234c,null))[_0x4fec('0x31')](handleError(_0x55234c,null));};exports[_0x4fec('0x77')]=function(_0x6ed113,_0x3fb5b0,_0x5c2d8a){var _0x543a83=_0x6ed113[_0x4fec('0x68')]['ids'];return db[_0x4fec('0x74')][_0x4fec('0x5a')]({'where':{'id':_0x543a83},'attributes':['id'],'include':[{'model':db[_0x4fec('0x78')],'as':_0x4fec('0x79'),'attributes':['id',_0x4fec('0x42'),_0x4fec('0x7a'),'voicePause',_0x4fec('0x7b')],'raw':!![]}]})[_0x4fec('0x27')](function(_0x273794){if(_0x273794){var _0x24b17b=_[_0x4fec('0x7c')](_0x273794,function(_0x292ce3){var _0x373158=_0x292ce3[_0x4fec('0x3e')]({'plain':!![]});return _0x373158['Agents'];});return db[_0x4fec('0x57')][_0x4fec('0x5f')]({'where':{'id':_0x6ed113['params']['id']}})[_0x4fec('0x27')](function(_0xeb87d2){return db[_0x4fec('0x7d')]['transaction'](function(_0x37c79d){return _0xeb87d2['addTeams'](_0x543a83,{'transaction':_0x37c79d})[_0x4fec('0x27')](function(){return BPromise[_0x4fec('0x7e')](_0x24b17b,function(_0x5c6a32){return db[_0x4fec('0x6c')][_0x4fec('0x7f')]({'where':{'UserId':_0x5c6a32['id'],'ChatQueueId':_0x6ed113[_0x4fec('0x5c')]['id']},'transaction':_0x37c79d});});})[_0x4fec('0x27')](function(){_0x24b17b[_0x4fec('0x80')](function(_0x6295e4){socket[_0x4fec('0x81')](_0x4fec('0x82'),{'UserId':_0x6295e4['id'],'ChatQueueId':_0xeb87d2['id']});});});});});}})['then'](respondWithStatusCode(_0x3fb5b0,null))['catch'](handleError(_0x3fb5b0,null));};exports[_0x4fec('0x83')]=function(_0x1f7511,_0x5c1186,_0x386b10){return db['Team'][_0x4fec('0x5a')]({'where':{'id':_0x1f7511[_0x4fec('0x49')][_0x4fec('0x84')]},'attributes':['id'],'include':[{'model':db['User'],'as':_0x4fec('0x79'),'attributes':['id'],'raw':!![]}]})['then'](handleEntityNotFound(_0x5c1186,null))[_0x4fec('0x27')](function(_0x17e4e3){var _0x469dc6=_[_0x4fec('0x48')](_0x17e4e3,'id');var _0x1e6ba3=[];var _0x4a5540=[];var _0x219875=squel['select']();_0x219875[_0x4fec('0x85')](_0x4fec('0x86'))['from'](_0x4fec('0x87'),'tq')[_0x4fec('0x88')](_0x4fec('0x89'),'ut',_0x4fec('0x8a'))[_0x4fec('0x51')](_0x4fec('0x8b'),_0x1f7511['params']['id']);for(var _0x494581=0x0;_0x494581<_0x17e4e3[_0x4fec('0x4d')];_0x494581+=0x1){let _0x35b0b7=_0x17e4e3[_0x494581];for(var _0x21ab70=0x0;_0x21ab70<_0x35b0b7[_0x4fec('0x79')][_0x4fec('0x4d')];_0x21ab70+=0x1){let _0x50d5a9=_0x35b0b7[_0x4fec('0x79')][_0x21ab70];var _0x1ddaef=_0x219875[_0x4fec('0x8c')]();_0x1ddaef[_0x4fec('0x51')](_0x4fec('0x8d'),_0x50d5a9['id']);_0x4a5540['push'](db[_0x4fec('0x7d')][_0x4fec('0x49')](_0x1ddaef[_0x4fec('0x8e')](),{'type':db[_0x4fec('0x7d')][_0x4fec('0x8f')]['SELECT']})['then'](function(_0xf1bc30){if(_0xf1bc30[_0x4fec('0x4d')]===0x1){return _0x50d5a9['id'];}else{var _0x305cf9=_[_0x4fec('0x90')](_[_0x4fec('0x48')](_0xf1bc30,_0x4fec('0x91')),function(_0x291f50){return _[_0x4fec('0x92')](_0x469dc6,_0x291f50);});if(_0x305cf9){return _0x50d5a9['id'];}}}));}}return BPromise['all'](_0x4a5540)[_0x4fec('0x27')](function(_0x107f98){_0x1e6ba3=_(_0x1e6ba3)[_0x4fec('0x93')](_0x107f98)[_0x4fec('0x94')]()[_0x4fec('0x95')]();return db['ChatQueue'][_0x4fec('0x5f')]({'where':{'id':_0x1f7511[_0x4fec('0x5c')]['id']}})[_0x4fec('0x27')](function(_0x55daad){return db['sequelize'][_0x4fec('0x96')](function(_0x4ab96d){return _0x55daad[_0x4fec('0x83')](_0x1f7511['query'][_0x4fec('0x84')],{'transaction':_0x4ab96d})['then'](function(){if(!_[_0x4fec('0x97')](_0x1e6ba3)){return _0x55daad[_0x4fec('0x98')](_0x1e6ba3,{'transaction':_0x4ab96d});}})[_0x4fec('0x27')](function(){_0x1e6ba3['forEach'](function(_0x63fde7){socket['emit'](_0x4fec('0x99'),{'UserId':_0x63fde7,'ChatQueueId':_0x55daad['id']});});});});});});})['then'](respondWithStatusCode(_0x5c1186,null))[_0x4fec('0x31')](handleError(_0x5c1186,null));};exports[_0x4fec('0x9a')]=function(_0x18f7c7,_0x20659a,_0x350dab){return db['ChatQueue'][_0x4fec('0x5f')]({'where':{'id':_0x18f7c7['params']['id']}})[_0x4fec('0x27')](handleEntityNotFound(_0x20659a,null))[_0x4fec('0x27')](function(_0xf8ace6){if(_0xf8ace6){return _0xf8ace6[_0x4fec('0x9a')](_0x18f7c7[_0x4fec('0x68')][_0x4fec('0x84')],_[_0x4fec('0x9b')](_0x18f7c7[_0x4fec('0x68')],[_0x4fec('0x84'),'id'])||{})[_0x4fec('0x9c')](function(_0x229a38){for(var _0x201b3d=0x0;_0x201b3d<_0x18f7c7[_0x4fec('0x68')][_0x4fec('0x84')][_0x4fec('0x4d')];_0x201b3d+=0x1){socket[_0x4fec('0x81')]('userChatQueue:save',{'UserId':Number(_0x18f7c7[_0x4fec('0x68')][_0x4fec('0x84')][_0x201b3d]),'ChatQueueId':Number(_0x18f7c7['params']['id'])});}return _0x229a38;});}})[_0x4fec('0x27')](respondWithResult(_0x20659a,null))['catch'](handleError(_0x20659a,null));};exports['removeAgents']=function(_0x17d018,_0x43bfb0,_0x5c102a){return db[_0x4fec('0x57')]['find']({'where':{'id':_0x17d018[_0x4fec('0x5c')]['id']}})[_0x4fec('0x27')](handleEntityNotFound(_0x43bfb0,null))[_0x4fec('0x27')](function(_0x508faa){if(_0x508faa){return _0x508faa[_0x4fec('0x98')](_0x17d018[_0x4fec('0x49')]['ids'])[_0x4fec('0x27')](function(){if(_[_0x4fec('0x9d')](_0x17d018[_0x4fec('0x49')][_0x4fec('0x84')])){for(var _0x42a6f2=0x0;_0x42a6f2<_0x17d018[_0x4fec('0x49')][_0x4fec('0x84')]['length'];_0x42a6f2+=0x1){socket[_0x4fec('0x81')](_0x4fec('0x99'),{'UserId':Number(_0x17d018[_0x4fec('0x49')][_0x4fec('0x84')][_0x42a6f2]),'ChatQueueId':Number(_0x17d018[_0x4fec('0x5c')]['id'])});}}else{socket[_0x4fec('0x81')](_0x4fec('0x99'),{'UserId':Number(_0x17d018[_0x4fec('0x49')][_0x4fec('0x84')]),'ChatQueueId':Number(_0x17d018[_0x4fec('0x5c')]['id'])});}});}})[_0x4fec('0x27')](respondWithStatusCode(_0x43bfb0,null))[_0x4fec('0x31')](handleError(_0x43bfb0,null));};exports[_0x4fec('0x9e')]=function(_0xe2c943,_0xe1259a,_0x4200aa){var _0x2951c4={};var _0x14e4c8={};var _0x573ef6;var _0x38f901;return db[_0x4fec('0x57')]['findOne']({'where':{'id':_0xe2c943[_0x4fec('0x5c')]['id']}})[_0x4fec('0x27')](handleEntityNotFound(_0xe1259a,null))[_0x4fec('0x27')](function(_0x12c988){if(_0x12c988){_0x573ef6=_0x12c988;_0x14e4c8[_0x4fec('0x4a')]=_[_0x4fec('0x5d')](db[_0x4fec('0x78')]['rawAttributes']);_0x14e4c8[_0x4fec('0x49')]=_[_0x4fec('0x5d')](_0xe2c943[_0x4fec('0x49')]);_0x14e4c8[_0x4fec('0x52')]=_[_0x4fec('0x5e')](_0x14e4c8[_0x4fec('0x4a')],_0x14e4c8[_0x4fec('0x49')]);_0x2951c4[_0x4fec('0x4b')]=_[_0x4fec('0x5e')](_0x14e4c8[_0x4fec('0x4a')],qs[_0x4fec('0x4c')](_0xe2c943[_0x4fec('0x49')][_0x4fec('0x4c')]));_0x2951c4[_0x4fec('0x4b')]=_0x2951c4[_0x4fec('0x4b')][_0x4fec('0x4d')]?_0x2951c4[_0x4fec('0x4b')]:_0x14e4c8[_0x4fec('0x4a')];_0x2951c4[_0x4fec('0x4f')]=qs[_0x4fec('0x50')](_0xe2c943[_0x4fec('0x49')][_0x4fec('0x50')]);_0x2951c4[_0x4fec('0x51')]=qs[_0x4fec('0x52')](_[_0x4fec('0x53')](_0xe2c943[_0x4fec('0x49')],_0x14e4c8[_0x4fec('0x52')]));if(_0xe2c943[_0x4fec('0x49')][_0x4fec('0x54')]){_0x2951c4['where']=_[_0x4fec('0x55')](_0x2951c4[_0x4fec('0x51')],{'$or':_[_0x4fec('0x48')](_0x2951c4['attributes'],function(_0x5b4045){var _0x5e7dca={};_0x5e7dca[_0x5b4045]={'$like':'%'+_0xe2c943['query'][_0x4fec('0x54')]+'%'};return _0x5e7dca;})});}_0x2951c4=_[_0x4fec('0x55')]({},_0x2951c4,_0xe2c943['options']);return _0x573ef6[_0x4fec('0x9e')](_0x2951c4);}})[_0x4fec('0x27')](function(_0xc8f6eb){if(_0xc8f6eb){_0x38f901=_0xc8f6eb[_0x4fec('0x4d')];if(!_0xe2c943[_0x4fec('0x49')][_0x4fec('0x6d')](_0x4fec('0x4e'))){_0x2951c4['limit']=qs[_0x4fec('0x37')](_0xe2c943[_0x4fec('0x49')][_0x4fec('0x37')]);_0x2951c4[_0x4fec('0x36')]=qs[_0x4fec('0x36')](_0xe2c943['query'][_0x4fec('0x36')]);}return _0x573ef6['getAgents'](_0x2951c4);}})[_0x4fec('0x27')](function(_0x163db9){if(_0x163db9){return _0x163db9?{'count':_0x38f901,'rows':_0x163db9}:null;}})[_0x4fec('0x27')](respondWithResult(_0xe1259a,null))[_0x4fec('0x31')](handleError(_0xe1259a,null));}; \ No newline at end of file diff --git a/server/api/chatQueue/chatQueue.events.js b/server/api/chatQueue/chatQueue.events.js index d266256..55ff578 100644 --- a/server/api/chatQueue/chatQueue.events.js +++ b/server/api/chatQueue/chatQueue.events.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x1c1d=['exports','events','ChatQueue','save','update','emit','hasOwnProperty'];(function(_0x1efda8,_0x509064){var _0x1a7f0b=function(_0xc65935){while(--_0xc65935){_0x1efda8['push'](_0x1efda8['shift']());}};_0x1a7f0b(++_0x509064);}(_0x1c1d,0x143));var _0xd1c1=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0x1c1d[_0x3dd15e];return _0x231fd0;};'use strict';var EventEmitter=require(_0xd1c1('0x0'));var ChatQueue=require('../../mysqldb')['db'][_0xd1c1('0x1')];var ChatQueueEvents=new EventEmitter();ChatQueueEvents['setMaxListeners'](0x0);var events={'afterCreate':_0xd1c1('0x2'),'afterUpdate':_0xd1c1('0x3'),'afterDestroy':'remove'};function emitEvent(_0x1c378b){return function(_0x48b2ac,_0x511bb5,_0x229ce3){ChatQueueEvents[_0xd1c1('0x4')](_0x1c378b+':'+_0x48b2ac['id'],_0x48b2ac);ChatQueueEvents['emit'](_0x1c378b,_0x48b2ac);_0x229ce3(null);};}for(var e in events){if(events[_0xd1c1('0x5')](e)){var event=events[e];ChatQueue['hook'](e,emitEvent(event));}}module[_0xd1c1('0x6')]=ChatQueueEvents; \ No newline at end of file +var _0x06de=['update','remove','emit','hook','exports','events','../../mysqldb','ChatQueue','setMaxListeners'];(function(_0x246c61,_0x4d2c57){var _0x46ae58=function(_0x161e7d){while(--_0x161e7d){_0x246c61['push'](_0x246c61['shift']());}};_0x46ae58(++_0x4d2c57);}(_0x06de,0x1a3));var _0xe06d=function(_0x5a5276,_0x262d69){_0x5a5276=_0x5a5276-0x0;var _0x3e8ee2=_0x06de[_0x5a5276];return _0x3e8ee2;};'use strict';var EventEmitter=require(_0xe06d('0x0'));var ChatQueue=require(_0xe06d('0x1'))['db'][_0xe06d('0x2')];var ChatQueueEvents=new EventEmitter();ChatQueueEvents[_0xe06d('0x3')](0x0);var events={'afterCreate':'save','afterUpdate':_0xe06d('0x4'),'afterDestroy':_0xe06d('0x5')};function emitEvent(_0x44edae){return function(_0x290f1d,_0x480f4f,_0x178eb2){ChatQueueEvents[_0xe06d('0x6')](_0x44edae+':'+_0x290f1d['id'],_0x290f1d);ChatQueueEvents[_0xe06d('0x6')](_0x44edae,_0x290f1d);_0x178eb2(null);};}for(var e in events){if(events['hasOwnProperty'](e)){var event=events[e];ChatQueue[_0xe06d('0x7')](e,emitEvent(event));}}module[_0xe06d('0x8')]=ChatQueueEvents; \ No newline at end of file diff --git a/server/api/chatQueue/chatQueue.model.js b/server/api/chatQueue/chatQueue.model.js index 1c96139..80c153d 100644 --- a/server/api/chatQueue/chatQueue.model.js +++ b/server/api/chatQueue/chatQueue.model.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x2d38=['util','../../config/logger','api','moment','bluebird','request-promise','path','rimraf','exports','define','ChatQueue','lodash'];(function(_0x3d6785,_0x959ce5){var _0x6be7eb=function(_0x537ade){while(--_0x537ade){_0x3d6785['push'](_0x3d6785['shift']());}};_0x6be7eb(++_0x959ce5);}(_0x2d38,0x137));var _0x82d3=function(_0x38728a,_0x3079d9){_0x38728a=_0x38728a-0x0;var _0x23118a=_0x2d38[_0x38728a];return _0x23118a;};'use strict';var _=require(_0x82d3('0x0'));var util=require(_0x82d3('0x1'));var logger=require(_0x82d3('0x2'))(_0x82d3('0x3'));var moment=require(_0x82d3('0x4'));var BPromise=require(_0x82d3('0x5'));var rp=require(_0x82d3('0x6'));var fs=require('fs');var path=require(_0x82d3('0x7'));var rimraf=require(_0x82d3('0x8'));var config=require('../../config/environment');var attributes=require('./chatQueue.attributes');module[_0x82d3('0x9')]=function(_0x60f0b8,_0xb36998){return _0x60f0b8[_0x82d3('0xa')](_0x82d3('0xb'),attributes,{'tableName':'chat_queues','paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file +var _0x9d08=['../../config/logger','api','moment','bluebird','rimraf','../../config/environment','./chatQueue.attributes','ChatQueue','chat_queues','util'];(function(_0x2b41b4,_0x18d3b1){var _0x1af3f1=function(_0x2f41e3){while(--_0x2f41e3){_0x2b41b4['push'](_0x2b41b4['shift']());}};_0x1af3f1(++_0x18d3b1);}(_0x9d08,0xf9));var _0x89d0=function(_0x1ec79c,_0x13377c){_0x1ec79c=_0x1ec79c-0x0;var _0x3ffaa8=_0x9d08[_0x1ec79c];return _0x3ffaa8;};'use strict';var _=require('lodash');var util=require(_0x89d0('0x0'));var logger=require(_0x89d0('0x1'))(_0x89d0('0x2'));var moment=require(_0x89d0('0x3'));var BPromise=require(_0x89d0('0x4'));var rp=require('request-promise');var fs=require('fs');var path=require('path');var rimraf=require(_0x89d0('0x5'));var config=require(_0x89d0('0x6'));var attributes=require(_0x89d0('0x7'));module['exports']=function(_0x432592,_0x2f666f){return _0x432592['define'](_0x89d0('0x8'),attributes,{'tableName':_0x89d0('0x9'),'paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file diff --git a/server/api/chatQueue/chatQueue.rpc.js b/server/api/chatQueue/chatQueue.rpc.js index a1ed49b..3f3b95f 100644 --- a/server/api/chatQueue/chatQueue.rpc.js +++ b/server/api/chatQueue/chatQueue.rpc.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x7f31=['catch','GetChatQueue','options','raw','where','include','map','attributes','model','debug','ShowChatQueue','ChatQueue','find','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','redis','localhost','./chatQueue.socket','register','then','ChatQueue,\x20%s,\x20%s','stringify','error','code','message','info','request\x20sent','result'];(function(_0xfb8f31,_0x2d3880){var _0x28b6e0=function(_0x4a3f1e){while(--_0x4a3f1e){_0xfb8f31['push'](_0xfb8f31['shift']());}};_0x28b6e0(++_0x2d3880);}(_0x7f31,0x13d));var _0x17f3=function(_0x4e676e,_0x2a7c6d){_0x4e676e=_0x4e676e-0x0;var _0x336a3c=_0x7f31[_0x4e676e];return _0x336a3c;};'use strict';var _=require('lodash');var util=require(_0x17f3('0x0'));var moment=require(_0x17f3('0x1'));var BPromise=require(_0x17f3('0x2'));var rs=require(_0x17f3('0x3'));var fs=require('fs');var Redis=require(_0x17f3('0x4'));var db=require(_0x17f3('0x5'))['db'];var utils=require('../../config/utils');var logger=require(_0x17f3('0x6'))(_0x17f3('0x7'));var config=require(_0x17f3('0x8'));var jayson=require(_0x17f3('0x9'));var client=jayson[_0x17f3('0xa')][_0x17f3('0xb')]({'port':0x232a});config[_0x17f3('0xc')]=_['defaults'](config[_0x17f3('0xc')],{'host':_0x17f3('0xd'),'port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config[_0x17f3('0xc')]));require(_0x17f3('0xe'))[_0x17f3('0xf')](socket);function respondWithRpcPromise(_0x4f68f6,_0x23d9f6,_0x5a2965){return new BPromise(function(_0x10b006,_0x5a71a8){return client['request'](_0x4f68f6,_0x5a2965)[_0x17f3('0x10')](function(_0x556332){logger['info'](_0x17f3('0x11'),_0x23d9f6,'request\x20sent');logger['debug']('ChatQueue,\x20%s,\x20%s,\x20%s',_0x23d9f6,'request\x20sent',JSON[_0x17f3('0x12')](_0x556332));if(_0x556332[_0x17f3('0x13')]){if(_0x556332['error'][_0x17f3('0x14')]===0x1f4){logger['error'](_0x17f3('0x11'),_0x23d9f6,_0x556332[_0x17f3('0x13')][_0x17f3('0x15')]);return _0x5a71a8(_0x556332[_0x17f3('0x13')][_0x17f3('0x15')]);}logger[_0x17f3('0x13')](_0x17f3('0x11'),_0x23d9f6,_0x556332[_0x17f3('0x13')][_0x17f3('0x15')]);return _0x10b006(_0x556332[_0x17f3('0x13')]['message']);}else{logger[_0x17f3('0x16')]('ChatQueue,\x20%s,\x20%s',_0x23d9f6,_0x17f3('0x17'));_0x10b006(_0x556332[_0x17f3('0x18')][_0x17f3('0x15')]);}})[_0x17f3('0x19')](function(_0x446016){logger['error'](_0x17f3('0x11'),_0x23d9f6,_0x446016);_0x5a71a8(_0x446016);});});}exports[_0x17f3('0x1a')]=function(_0x4f0ab7){var _0x4d8ee7=this;return new Promise(function(_0x48dc5d,_0x477e36){return db['ChatQueue']['findAll']({'raw':_0x4f0ab7['options']?_0x4f0ab7[_0x17f3('0x1b')][_0x17f3('0x1c')]===undefined?!![]:![]:!![],'where':_0x4f0ab7['options']?_0x4f0ab7[_0x17f3('0x1b')][_0x17f3('0x1d')]||null:null,'attributes':_0x4f0ab7[_0x17f3('0x1b')]?_0x4f0ab7[_0x17f3('0x1b')]['attributes']||null:null,'limit':_0x4f0ab7[_0x17f3('0x1b')]?_0x4f0ab7[_0x17f3('0x1b')]['limit']||null:null,'include':_0x4f0ab7[_0x17f3('0x1b')]?_0x4f0ab7['options'][_0x17f3('0x1e')]?_[_0x17f3('0x1f')](_0x4f0ab7[_0x17f3('0x1b')][_0x17f3('0x1e')],function(_0xb3eb16){return{'model':db[_0xb3eb16['model']],'as':_0xb3eb16['as'],'attributes':_0xb3eb16[_0x17f3('0x20')],'include':_0xb3eb16[_0x17f3('0x1e')]?_[_0x17f3('0x1f')](_0xb3eb16[_0x17f3('0x1e')],function(_0xdb1233){return{'model':db[_0xdb1233['model']],'as':_0xdb1233['as'],'attributes':_0xdb1233[_0x17f3('0x20')],'include':_0xdb1233[_0x17f3('0x1e')]?_[_0x17f3('0x1f')](_0xdb1233[_0x17f3('0x1e')],function(_0x381ff8){return{'model':db[_0x381ff8[_0x17f3('0x21')]],'as':_0x381ff8['as'],'attributes':_0x381ff8[_0x17f3('0x20')]};}):[]};}):[]};}):[]:[]})[_0x17f3('0x10')](function(_0x13f663){logger[_0x17f3('0x16')](_0x17f3('0x1a'),_0x4f0ab7);logger[_0x17f3('0x22')](_0x17f3('0x1a'),_0x4f0ab7,JSON['stringify'](_0x13f663));_0x48dc5d(_0x13f663);})[_0x17f3('0x19')](function(_0x159a3c){logger['error'](_0x17f3('0x1a'),_0x159a3c[_0x17f3('0x15')],_0x4f0ab7);_0x477e36(_0x4d8ee7[_0x17f3('0x13')](0x1f4,_0x159a3c['message']));});});};exports[_0x17f3('0x23')]=function(_0x5f08d2){var _0x1367f9=this;return new Promise(function(_0x3fa238,_0x24243b){return db[_0x17f3('0x24')][_0x17f3('0x25')]({'raw':_0x5f08d2['options']?_0x5f08d2['options']['raw']===undefined?!![]:![]:!![],'where':_0x5f08d2[_0x17f3('0x1b')]?_0x5f08d2[_0x17f3('0x1b')]['where']||null:null,'attributes':_0x5f08d2[_0x17f3('0x1b')]?_0x5f08d2['options'][_0x17f3('0x20')]||null:null,'include':_0x5f08d2['options']?_0x5f08d2[_0x17f3('0x1b')][_0x17f3('0x1e')]?_[_0x17f3('0x1f')](_0x5f08d2[_0x17f3('0x1b')][_0x17f3('0x1e')],function(_0x10ce41){return{'model':db[_0x10ce41['model']],'as':_0x10ce41['as'],'attributes':_0x10ce41[_0x17f3('0x20')],'include':_0x10ce41['include']?_['map'](_0x10ce41[_0x17f3('0x1e')],function(_0x1ef6bf){return{'model':db[_0x1ef6bf[_0x17f3('0x21')]],'as':_0x1ef6bf['as'],'attributes':_0x1ef6bf['attributes'],'include':_0x1ef6bf[_0x17f3('0x1e')]?_[_0x17f3('0x1f')](_0x1ef6bf[_0x17f3('0x1e')],function(_0x4bbdaa){return{'model':db[_0x4bbdaa[_0x17f3('0x21')]],'as':_0x4bbdaa['as'],'attributes':_0x4bbdaa['attributes']};}):[]};}):[]};}):[]:[]})[_0x17f3('0x10')](function(_0x50cf00){logger[_0x17f3('0x16')](_0x17f3('0x23'),_0x5f08d2);logger[_0x17f3('0x22')](_0x17f3('0x23'),_0x5f08d2,JSON[_0x17f3('0x12')](_0x50cf00));_0x3fa238(_0x50cf00);})[_0x17f3('0x19')](function(_0x14c4bb){logger[_0x17f3('0x13')](_0x17f3('0x23'),_0x14c4bb['message'],_0x5f08d2);_0x24243b(_0x1367f9[_0x17f3('0x13')](0x1f4,_0x14c4bb[_0x17f3('0x15')]));});});}; \ No newline at end of file +var _0x3de3=['ChatQueue,\x20%s,\x20%s','request\x20sent','debug','stringify','code','error','message','result','GetChatQueue','ChatQueue','findAll','raw','options','limit','include','map','model','attributes','catch','ShowChatQueue','find','where','lodash','moment','bluebird','ioredis','../../mysqldb','../../config/utils','../../config/logger','../../config/environment','jayson/promise','http','defaults','redis','localhost','./chatQueue.socket','register','request','then','info'];(function(_0x230bb8,_0xa1718){var _0x16cb9a=function(_0x2848fe){while(--_0x2848fe){_0x230bb8['push'](_0x230bb8['shift']());}};_0x16cb9a(++_0xa1718);}(_0x3de3,0x1ce));var _0x33de=function(_0x454985,_0x7a6431){_0x454985=_0x454985-0x0;var _0x5964bf=_0x3de3[_0x454985];return _0x5964bf;};'use strict';var _=require(_0x33de('0x0'));var util=require('util');var moment=require(_0x33de('0x1'));var BPromise=require(_0x33de('0x2'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x33de('0x3'));var db=require(_0x33de('0x4'))['db'];var utils=require(_0x33de('0x5'));var logger=require(_0x33de('0x6'))('rpc');var config=require(_0x33de('0x7'));var jayson=require(_0x33de('0x8'));var client=jayson['client'][_0x33de('0x9')]({'port':0x232a});config['redis']=_[_0x33de('0xa')](config[_0x33de('0xb')],{'host':_0x33de('0xc'),'port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config[_0x33de('0xb')]));require(_0x33de('0xd'))[_0x33de('0xe')](socket);function respondWithRpcPromise(_0x5e1be7,_0x2cbf35,_0x348720){return new BPromise(function(_0x8b655d,_0x241211){return client[_0x33de('0xf')](_0x5e1be7,_0x348720)[_0x33de('0x10')](function(_0x8dfa3b){logger[_0x33de('0x11')](_0x33de('0x12'),_0x2cbf35,_0x33de('0x13'));logger[_0x33de('0x14')]('ChatQueue,\x20%s,\x20%s,\x20%s',_0x2cbf35,_0x33de('0x13'),JSON[_0x33de('0x15')](_0x8dfa3b));if(_0x8dfa3b['error']){if(_0x8dfa3b['error'][_0x33de('0x16')]===0x1f4){logger[_0x33de('0x17')](_0x33de('0x12'),_0x2cbf35,_0x8dfa3b[_0x33de('0x17')]['message']);return _0x241211(_0x8dfa3b[_0x33de('0x17')][_0x33de('0x18')]);}logger['error']('ChatQueue,\x20%s,\x20%s',_0x2cbf35,_0x8dfa3b[_0x33de('0x17')][_0x33de('0x18')]);return _0x8b655d(_0x8dfa3b[_0x33de('0x17')]['message']);}else{logger[_0x33de('0x11')](_0x33de('0x12'),_0x2cbf35,'request\x20sent');_0x8b655d(_0x8dfa3b[_0x33de('0x19')][_0x33de('0x18')]);}})['catch'](function(_0x5bb74e){logger[_0x33de('0x17')]('ChatQueue,\x20%s,\x20%s',_0x2cbf35,_0x5bb74e);_0x241211(_0x5bb74e);});});}exports[_0x33de('0x1a')]=function(_0x2f0529){var _0x3810b5=this;return new Promise(function(_0x315c9b,_0xc4f1a4){return db[_0x33de('0x1b')][_0x33de('0x1c')]({'raw':_0x2f0529['options']?_0x2f0529['options'][_0x33de('0x1d')]===undefined?!![]:![]:!![],'where':_0x2f0529['options']?_0x2f0529[_0x33de('0x1e')]['where']||null:null,'attributes':_0x2f0529[_0x33de('0x1e')]?_0x2f0529[_0x33de('0x1e')]['attributes']||null:null,'limit':_0x2f0529[_0x33de('0x1e')]?_0x2f0529['options'][_0x33de('0x1f')]||null:null,'include':_0x2f0529['options']?_0x2f0529[_0x33de('0x1e')][_0x33de('0x20')]?_[_0x33de('0x21')](_0x2f0529['options'][_0x33de('0x20')],function(_0x2d206b){return{'model':db[_0x2d206b[_0x33de('0x22')]],'as':_0x2d206b['as'],'attributes':_0x2d206b['attributes'],'include':_0x2d206b[_0x33de('0x20')]?_['map'](_0x2d206b['include'],function(_0x1c8de9){return{'model':db[_0x1c8de9[_0x33de('0x22')]],'as':_0x1c8de9['as'],'attributes':_0x1c8de9[_0x33de('0x23')],'include':_0x1c8de9[_0x33de('0x20')]?_[_0x33de('0x21')](_0x1c8de9[_0x33de('0x20')],function(_0x3f22fb){return{'model':db[_0x3f22fb[_0x33de('0x22')]],'as':_0x3f22fb['as'],'attributes':_0x3f22fb['attributes']};}):[]};}):[]};}):[]:[]})['then'](function(_0x2755e6){logger[_0x33de('0x11')](_0x33de('0x1a'),_0x2f0529);logger[_0x33de('0x14')](_0x33de('0x1a'),_0x2f0529,JSON[_0x33de('0x15')](_0x2755e6));_0x315c9b(_0x2755e6);})[_0x33de('0x24')](function(_0x4e1898){logger[_0x33de('0x17')](_0x33de('0x1a'),_0x4e1898[_0x33de('0x18')],_0x2f0529);_0xc4f1a4(_0x3810b5[_0x33de('0x17')](0x1f4,_0x4e1898['message']));});});};exports[_0x33de('0x25')]=function(_0xf5d78a){var _0x5a9c43=this;return new Promise(function(_0x5d2da4,_0x57fcf3){return db[_0x33de('0x1b')][_0x33de('0x26')]({'raw':_0xf5d78a['options']?_0xf5d78a[_0x33de('0x1e')]['raw']===undefined?!![]:![]:!![],'where':_0xf5d78a['options']?_0xf5d78a[_0x33de('0x1e')][_0x33de('0x27')]||null:null,'attributes':_0xf5d78a[_0x33de('0x1e')]?_0xf5d78a[_0x33de('0x1e')][_0x33de('0x23')]||null:null,'include':_0xf5d78a[_0x33de('0x1e')]?_0xf5d78a[_0x33de('0x1e')][_0x33de('0x20')]?_['map'](_0xf5d78a[_0x33de('0x1e')]['include'],function(_0x12defc){return{'model':db[_0x12defc['model']],'as':_0x12defc['as'],'attributes':_0x12defc['attributes'],'include':_0x12defc[_0x33de('0x20')]?_[_0x33de('0x21')](_0x12defc[_0x33de('0x20')],function(_0x213c84){return{'model':db[_0x213c84[_0x33de('0x22')]],'as':_0x213c84['as'],'attributes':_0x213c84[_0x33de('0x23')],'include':_0x213c84['include']?_[_0x33de('0x21')](_0x213c84[_0x33de('0x20')],function(_0x1380ff){return{'model':db[_0x1380ff[_0x33de('0x22')]],'as':_0x1380ff['as'],'attributes':_0x1380ff[_0x33de('0x23')]};}):[]};}):[]};}):[]:[]})[_0x33de('0x10')](function(_0x59c618){logger['info'](_0x33de('0x25'),_0xf5d78a);logger[_0x33de('0x14')](_0x33de('0x25'),_0xf5d78a,JSON[_0x33de('0x15')](_0x59c618));_0x5d2da4(_0x59c618);})[_0x33de('0x24')](function(_0x35064e){logger[_0x33de('0x17')]('ShowChatQueue',_0x35064e[_0x33de('0x18')],_0xf5d78a);_0x57fcf3(_0x5a9c43[_0x33de('0x17')](0x1f4,_0x35064e[_0x33de('0x18')]));});});}; \ No newline at end of file diff --git a/server/api/chatQueue/chatQueue.socket.js b/server/api/chatQueue/chatQueue.socket.js index adb0dbf..387da3e 100644 --- a/server/api/chatQueue/chatQueue.socket.js +++ b/server/api/chatQueue/chatQueue.socket.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x3667=['remove','update','emit','removeListener','register','length','chatQueue:','./chatQueue.events','save'];(function(_0x481458,_0x51f40d){var _0x5e536d=function(_0x317762){while(--_0x317762){_0x481458['push'](_0x481458['shift']());}};_0x5e536d(++_0x51f40d);}(_0x3667,0xcd));var _0x7366=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0x3667[_0x3dd15e];return _0x231fd0;};'use strict';var ChatQueueEvents=require(_0x7366('0x0'));var events=[_0x7366('0x1'),_0x7366('0x2'),_0x7366('0x3')];function createListener(_0x3c601d,_0x5d1072){return function(_0x27a90d){_0x5d1072[_0x7366('0x4')](_0x3c601d,_0x27a90d);};}function removeListener(_0x4b32a7,_0x27726b){return function(){ChatQueueEvents[_0x7366('0x5')](_0x4b32a7,_0x27726b);};}exports[_0x7366('0x6')]=function(_0x1c0cf4){for(var _0x101e3d=0x0,_0x589397=events[_0x7366('0x7')];_0x101e3d<_0x589397;_0x101e3d++){var _0xa1a3c5=events[_0x101e3d];var _0x2dd32b=createListener(_0x7366('0x8')+_0xa1a3c5,_0x1c0cf4);ChatQueueEvents['on'](_0xa1a3c5,_0x2dd32b);}}; \ No newline at end of file +var _0xcea2=['chatQueue:','./chatQueue.events','remove','removeListener','length'];(function(_0x2313e8,_0x332e97){var _0x482a35=function(_0xe736a0){while(--_0xe736a0){_0x2313e8['push'](_0x2313e8['shift']());}};_0x482a35(++_0x332e97);}(_0xcea2,0x15a));var _0x2cea=function(_0x5f3f88,_0x562baf){_0x5f3f88=_0x5f3f88-0x0;var _0xd08119=_0xcea2[_0x5f3f88];return _0xd08119;};'use strict';var ChatQueueEvents=require(_0x2cea('0x0'));var events=['save',_0x2cea('0x1'),'update'];function createListener(_0x3e22c2,_0x7f1f5a){return function(_0x60a793){_0x7f1f5a['emit'](_0x3e22c2,_0x60a793);};}function removeListener(_0x3ff73f,_0x46060b){return function(){ChatQueueEvents[_0x2cea('0x2')](_0x3ff73f,_0x46060b);};}exports['register']=function(_0x34f0f2){for(var _0x485c26=0x0,_0x2d69ff=events[_0x2cea('0x3')];_0x485c26<_0x2d69ff;_0x485c26++){var _0x805a1b=events[_0x485c26];var _0x160cca=createListener(_0x2cea('0x4')+_0x805a1b,_0x34f0f2);ChatQueueEvents['on'](_0x805a1b,_0x160cca);}}; \ No newline at end of file diff --git a/server/api/chatQueue/index.js b/server/api/chatQueue/index.js index a67d582..f56bf75 100644 --- a/server/api/chatQueue/index.js +++ b/server/api/chatQueue/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x008c=['../../config/environment','./chatQueue.controller','get','isAuthenticated','index','show','/:id/teams','getTeams','/:id/users','getAgents','post','addTeams','addAgents','update','delete','/:id','removeTeams','multer','util','path','connect-timeout','express','fs-extra','../../components/auth/service','../../components/interaction/service'];(function(_0x25d38c,_0x4fbb5b){var _0x11856b=function(_0x38f3d1){while(--_0x38f3d1){_0x25d38c['push'](_0x25d38c['shift']());}};_0x11856b(++_0x4fbb5b);}(_0x008c,0x188));var _0xc008=function(_0x3b0b34,_0xe6a14f){_0x3b0b34=_0x3b0b34-0x0;var _0x5f5496=_0x008c[_0x3b0b34];return _0x5f5496;};'use strict';var multer=require(_0xc008('0x0'));var util=require(_0xc008('0x1'));var path=require(_0xc008('0x2'));var timeout=require(_0xc008('0x3'));var express=require(_0xc008('0x4'));var router=express['Router']();var fs_extra=require(_0xc008('0x5'));var auth=require(_0xc008('0x6'));var interaction=require(_0xc008('0x7'));var config=require(_0xc008('0x8'));var controller=require(_0xc008('0x9'));router[_0xc008('0xa')]('/',auth[_0xc008('0xb')](),controller[_0xc008('0xc')]);router[_0xc008('0xa')]('/describe',auth[_0xc008('0xb')](),controller['describe']);router[_0xc008('0xa')]('/:id',auth['isAuthenticated'](),controller[_0xc008('0xd')]);router[_0xc008('0xa')]('/:id/members',auth['isAuthenticated'](),controller['getMembers']);router[_0xc008('0xa')](_0xc008('0xe'),auth['isAuthenticated'](),controller[_0xc008('0xf')]);router[_0xc008('0xa')](_0xc008('0x10'),auth[_0xc008('0xb')](),controller[_0xc008('0x11')]);router[_0xc008('0x12')]('/',auth[_0xc008('0xb')](),controller['create']);router['post'](_0xc008('0xe'),auth['isAuthenticated'](),controller[_0xc008('0x13')]);router[_0xc008('0x12')](_0xc008('0x10'),auth[_0xc008('0xb')](),controller[_0xc008('0x14')]);router['put']('/:id',auth['isAuthenticated'](),controller[_0xc008('0x15')]);router[_0xc008('0x16')](_0xc008('0x17'),auth[_0xc008('0xb')](),controller['destroy']);router['delete']('/:id/teams',auth['isAuthenticated'](),controller[_0xc008('0x18')]);router[_0xc008('0x16')]('/:id/users',auth[_0xc008('0xb')](),controller['removeAgents']);module['exports']=router; \ No newline at end of file +var _0x9957=['connect-timeout','Router','fs-extra','../../components/auth/service','../../components/interaction/service','./chatQueue.controller','get','isAuthenticated','index','/describe','describe','show','/:id/members','getMembers','getTeams','/:id/users','getAgents','post','create','addTeams','addAgents','put','/:id','delete','destroy','/:id/teams','removeTeams','multer','util','path'];(function(_0x4fcc5b,_0x2fe9ef){var _0x48cb49=function(_0x47fc29){while(--_0x47fc29){_0x4fcc5b['push'](_0x4fcc5b['shift']());}};_0x48cb49(++_0x2fe9ef);}(_0x9957,0x93));var _0x7995=function(_0x618414,_0x1a7a60){_0x618414=_0x618414-0x0;var _0x21c19a=_0x9957[_0x618414];return _0x21c19a;};'use strict';var multer=require(_0x7995('0x0'));var util=require(_0x7995('0x1'));var path=require(_0x7995('0x2'));var timeout=require(_0x7995('0x3'));var express=require('express');var router=express[_0x7995('0x4')]();var fs_extra=require(_0x7995('0x5'));var auth=require(_0x7995('0x6'));var interaction=require(_0x7995('0x7'));var config=require('../../config/environment');var controller=require(_0x7995('0x8'));router[_0x7995('0x9')]('/',auth[_0x7995('0xa')](),controller[_0x7995('0xb')]);router[_0x7995('0x9')](_0x7995('0xc'),auth['isAuthenticated'](),controller[_0x7995('0xd')]);router[_0x7995('0x9')]('/:id',auth[_0x7995('0xa')](),controller[_0x7995('0xe')]);router[_0x7995('0x9')](_0x7995('0xf'),auth[_0x7995('0xa')](),controller[_0x7995('0x10')]);router[_0x7995('0x9')]('/:id/teams',auth[_0x7995('0xa')](),controller[_0x7995('0x11')]);router['get'](_0x7995('0x12'),auth[_0x7995('0xa')](),controller[_0x7995('0x13')]);router[_0x7995('0x14')]('/',auth[_0x7995('0xa')](),controller[_0x7995('0x15')]);router[_0x7995('0x14')]('/:id/teams',auth['isAuthenticated'](),controller[_0x7995('0x16')]);router[_0x7995('0x14')](_0x7995('0x12'),auth[_0x7995('0xa')](),controller[_0x7995('0x17')]);router[_0x7995('0x18')](_0x7995('0x19'),auth[_0x7995('0xa')](),controller['update']);router[_0x7995('0x1a')]('/:id',auth[_0x7995('0xa')](),controller[_0x7995('0x1b')]);router[_0x7995('0x1a')](_0x7995('0x1c'),auth[_0x7995('0xa')](),controller[_0x7995('0x1d')]);router['delete']('/:id/users',auth[_0x7995('0xa')](),controller['removeAgents']);module['exports']=router; \ No newline at end of file diff --git a/server/api/chatQueueReport/chatQueueReport.attributes.js b/server/api/chatQueueReport/chatQueueReport.attributes.js index 0da5826..bcfce8b 100644 --- a/server/api/chatQueueReport/chatQueueReport.attributes.js +++ b/server/api/chatQueueReport/chatQueueReport.attributes.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x5092=['STRING','DATE','moment','sequelize','exports'];(function(_0x1019f0,_0x27293a){var _0x3697ba=function(_0x333808){while(--_0x333808){_0x1019f0['push'](_0x1019f0['shift']());}};_0x3697ba(++_0x27293a);}(_0x5092,0x147));var _0x2509=function(_0x18920f,_0x54af73){_0x18920f=_0x18920f-0x0;var _0xa13885=_0x5092[_0x18920f];return _0xa13885;};'use strict';var moment=require(_0x2509('0x0'));var Sequelize=require(_0x2509('0x1'));module[_0x2509('0x2')]={'uniqueid':{'type':Sequelize[_0x2509('0x3')],'allowNull':![]},'from':{'type':Sequelize['STRING']},'joinAt':{'type':Sequelize[_0x2509('0x4')]},'leaveAt':{'type':Sequelize[_0x2509('0x4')]},'acceptAt':{'type':Sequelize['DATE']},'exitAt':{'type':Sequelize[_0x2509('0x4')]},'reason':{'type':Sequelize['STRING']}}; \ No newline at end of file +var _0x1efb=['sequelize','exports','STRING','DATE','moment'];(function(_0x261522,_0x1adc1f){var _0x98a25a=function(_0x1b0f9c){while(--_0x1b0f9c){_0x261522['push'](_0x261522['shift']());}};_0x98a25a(++_0x1adc1f);}(_0x1efb,0x149));var _0xb1ef=function(_0x465a0c,_0x19d4d5){_0x465a0c=_0x465a0c-0x0;var _0x1e202e=_0x1efb[_0x465a0c];return _0x1e202e;};'use strict';var moment=require(_0xb1ef('0x0'));var Sequelize=require(_0xb1ef('0x1'));module[_0xb1ef('0x2')]={'uniqueid':{'type':Sequelize[_0xb1ef('0x3')],'allowNull':![]},'from':{'type':Sequelize[_0xb1ef('0x3')]},'joinAt':{'type':Sequelize[_0xb1ef('0x4')]},'leaveAt':{'type':Sequelize[_0xb1ef('0x4')]},'acceptAt':{'type':Sequelize[_0xb1ef('0x4')]},'exitAt':{'type':Sequelize[_0xb1ef('0x4')]},'reason':{'type':Sequelize[_0xb1ef('0x3')]}}; \ No newline at end of file diff --git a/server/api/chatQueueReport/chatQueueReport.controller.js b/server/api/chatQueueReport/chatQueueReport.controller.js index e24a35d..ad87a90 100644 --- a/server/api/chatQueueReport/chatQueueReport.controller.js +++ b/server/api/chatQueueReport/chatQueueReport.controller.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xb931=['api','../../config/utils','../../mysqldb','sendStatus','end','status','json','offset','limit','undefined','count','Content-Range','apply','reject','save','update','then','destroy','error','stack','send','index','map','ChatQueueReport','type','key','model','query','filters','intersection','attributes','fields','length','hasOwnProperty','nolimit','order','sort','where','filter','merge','options','includeAll','include','findAll','catch','show','rawAttributes','keys','find','create','body','params','describe','zip-dir','moment','bluebird','mustache','util','path','sox','to-csv','ejs','fs-extra','lodash','squel','crypto','jsforce','desk.js','ioredis','../../components/auth/service','../../components/parsers/qs','../../config/license/hardware'];(function(_0x14add3,_0x13ce8d){var _0x4a174f=function(_0x2b3ed7){while(--_0x2b3ed7){_0x14add3['push'](_0x14add3['shift']());}};_0x4a174f(++_0x13ce8d);}(_0xb931,0x155));var _0x1b93=function(_0x2198c6,_0x11ab43){_0x2198c6=_0x2198c6-0x0;var _0xe3c8a7=_0xb931[_0x2198c6];return _0xe3c8a7;};'use strict';var emlformat=require('eml-format');var rimraf=require('rimraf');var zipdir=require(_0x1b93('0x0'));var jsonpatch=require('fast-json-patch');var rp=require('request-promise');var moment=require(_0x1b93('0x1'));var BPromise=require(_0x1b93('0x2'));var Mustache=require(_0x1b93('0x3'));var util=require(_0x1b93('0x4'));var path=require(_0x1b93('0x5'));var sox=require(_0x1b93('0x6'));var csv=require(_0x1b93('0x7'));var ejs=require(_0x1b93('0x8'));var fs=require('fs');var fs_extra=require(_0x1b93('0x9'));var _=require(_0x1b93('0xa'));var squel=require(_0x1b93('0xb'));var crypto=require(_0x1b93('0xc'));var jsforce=require(_0x1b93('0xd'));var deskjs=require(_0x1b93('0xe'));var toCsv=require(_0x1b93('0x7'));var querystring=require('querystring');var Papa=require('papaparse');var Redis=require(_0x1b93('0xf'));var authService=require(_0x1b93('0x10'));var qs=require(_0x1b93('0x11'));var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0x1b93('0x12'));var logger=require('../../config/logger')(_0x1b93('0x13'));var utils=require(_0x1b93('0x14'));var config=require('../../config/environment');var licenseUtil=require('../../config/license/util');var db=require(_0x1b93('0x15'))['db'];function respondWithStatusCode(_0x2606eb,_0x3c4881){_0x3c4881=_0x3c4881||0xcc;return function(_0x50f99f){if(_0x50f99f){return _0x2606eb[_0x1b93('0x16')](_0x3c4881);}return _0x2606eb['status'](_0x3c4881)[_0x1b93('0x17')]();};}function respondWithResult(_0x12ca65,_0x3ab584){_0x3ab584=_0x3ab584||0xc8;return function(_0x1ea97a){if(_0x1ea97a){return _0x12ca65[_0x1b93('0x18')](_0x3ab584)[_0x1b93('0x19')](_0x1ea97a);}};}function respondWithFilteredResult(_0x4a0bb6,_0x140515){return function(_0x267527){if(_0x267527){var _0x240b8f=typeof _0x140515[_0x1b93('0x1a')]==='undefined'&&typeof _0x140515[_0x1b93('0x1b')]===_0x1b93('0x1c');var _0x4f7199=_0x267527[_0x1b93('0x1d')];var _0x339c5b=_0x240b8f?0x0:_0x140515['offset'];var _0x5ccbf4=_0x240b8f?_0x267527[_0x1b93('0x1d')]:_0x140515[_0x1b93('0x1a')]+_0x140515[_0x1b93('0x1b')];var _0x4156d9;if(_0x5ccbf4>=_0x4f7199){_0x5ccbf4=_0x4f7199;_0x4156d9=0xc8;}else{_0x4156d9=0xce;}_0x4a0bb6[_0x1b93('0x18')](_0x4156d9);return _0x4a0bb6['set'](_0x1b93('0x1e'),_0x339c5b+'-'+_0x5ccbf4+'/'+_0x4f7199)[_0x1b93('0x19')](_0x267527);}return null;};}function patchUpdates(_0x5cba05){return function(_0x546288){try{jsonpatch[_0x1b93('0x1f')](_0x546288,_0x5cba05,!![]);}catch(_0x116775){return BPromise[_0x1b93('0x20')](_0x116775);}return _0x546288[_0x1b93('0x21')]();};}function saveUpdates(_0x2619e6,_0x333390){return function(_0x577a22){if(_0x577a22){return _0x577a22[_0x1b93('0x22')](_0x2619e6)[_0x1b93('0x23')](function(_0x208217){return _0x208217;});}return null;};}function removeEntity(_0x5a61dc,_0x1cfcd1){return function(_0x41f219){if(_0x41f219){return _0x41f219[_0x1b93('0x24')]()[_0x1b93('0x23')](function(){_0x5a61dc[_0x1b93('0x18')](0xcc)[_0x1b93('0x17')]();});}};}function handleEntityNotFound(_0x13cddc,_0x309ac5){return function(_0x14626a){if(!_0x14626a){_0x13cddc[_0x1b93('0x16')](0x194);}return _0x14626a;};}function handleError(_0x8010e6,_0x189869){_0x189869=_0x189869||0x1f4;return function(_0xa15258){logger[_0x1b93('0x25')](_0xa15258[_0x1b93('0x26')]);if(_0xa15258['name']){delete _0xa15258['name'];}_0x8010e6[_0x1b93('0x18')](_0x189869)[_0x1b93('0x27')](_0xa15258);};}exports[_0x1b93('0x28')]=function(_0x2501ee,_0x20b035){var _0xc47d69={},_0x59983e={},_0x5af450={'count':0x0,'rows':[]};var _0x2e7f79=_[_0x1b93('0x29')](db[_0x1b93('0x2a')]['rawAttributes'],function(_0x3dc539){return{'name':_0x3dc539['fieldName'],'type':_0x3dc539[_0x1b93('0x2b')][_0x1b93('0x2c')]};});_0x59983e[_0x1b93('0x2d')]=_['map'](_0x2e7f79,'name');_0x59983e[_0x1b93('0x2e')]=_['keys'](_0x2501ee[_0x1b93('0x2e')]);_0x59983e[_0x1b93('0x2f')]=_[_0x1b93('0x30')](_0x59983e['model'],_0x59983e[_0x1b93('0x2e')]);_0xc47d69[_0x1b93('0x31')]=_[_0x1b93('0x30')](_0x59983e[_0x1b93('0x2d')],qs[_0x1b93('0x32')](_0x2501ee[_0x1b93('0x2e')][_0x1b93('0x32')]));_0xc47d69[_0x1b93('0x31')]=_0xc47d69[_0x1b93('0x31')][_0x1b93('0x33')]?_0xc47d69[_0x1b93('0x31')]:_0x59983e['model'];if(!_0x2501ee['query'][_0x1b93('0x34')](_0x1b93('0x35'))){_0xc47d69[_0x1b93('0x1b')]=qs[_0x1b93('0x1b')](_0x2501ee[_0x1b93('0x2e')][_0x1b93('0x1b')]);_0xc47d69[_0x1b93('0x1a')]=qs['offset'](_0x2501ee['query']['offset']);}_0xc47d69[_0x1b93('0x36')]=qs[_0x1b93('0x37')](_0x2501ee['query']['sort']);_0xc47d69[_0x1b93('0x38')]=qs[_0x1b93('0x2f')](_['pick'](_0x2501ee[_0x1b93('0x2e')],_0x59983e['filters']),_0x2e7f79);if(_0x2501ee[_0x1b93('0x2e')][_0x1b93('0x39')]){_0xc47d69[_0x1b93('0x38')]=_[_0x1b93('0x3a')](_0xc47d69[_0x1b93('0x38')],{'$or':_[_0x1b93('0x29')](_0x2e7f79,function(_0x538e18){if(_0x538e18[_0x1b93('0x2b')]!=='VIRTUAL'){var _0x3755cc={};_0x3755cc[_0x538e18['name']]={'$like':'%'+_0x2501ee[_0x1b93('0x2e')][_0x1b93('0x39')]+'%'};return _0x3755cc;}})});}_0xc47d69=_[_0x1b93('0x3a')]({},_0xc47d69,_0x2501ee[_0x1b93('0x3b')]);var _0x46c9bf={'where':_0xc47d69[_0x1b93('0x38')]};return db[_0x1b93('0x2a')][_0x1b93('0x1d')](_0x46c9bf)[_0x1b93('0x23')](function(_0x42913e){_0x5af450[_0x1b93('0x1d')]=_0x42913e;if(_0x2501ee[_0x1b93('0x2e')][_0x1b93('0x3c')]){_0xc47d69[_0x1b93('0x3d')]=[{'all':!![]}];}return db['ChatQueueReport'][_0x1b93('0x3e')](_0xc47d69);})[_0x1b93('0x23')](function(_0x318d13){_0x5af450['rows']=_0x318d13;return _0x5af450;})[_0x1b93('0x23')](respondWithFilteredResult(_0x20b035,_0xc47d69))[_0x1b93('0x3f')](handleError(_0x20b035,null));};exports[_0x1b93('0x40')]=function(_0x37d2c2,_0xd1017){var _0x4ec427={'raw':!![],'where':{'id':_0x37d2c2['params']['id']}},_0x5ad3e3={};_0x5ad3e3[_0x1b93('0x2d')]=_['keys'](db['ChatQueueReport'][_0x1b93('0x41')]);_0x5ad3e3[_0x1b93('0x2e')]=_[_0x1b93('0x42')](_0x37d2c2[_0x1b93('0x2e')]);_0x5ad3e3[_0x1b93('0x2f')]=_[_0x1b93('0x30')](_0x5ad3e3[_0x1b93('0x2d')],_0x5ad3e3['query']);_0x4ec427['attributes']=_[_0x1b93('0x30')](_0x5ad3e3[_0x1b93('0x2d')],qs['fields'](_0x37d2c2[_0x1b93('0x2e')][_0x1b93('0x32')]));_0x4ec427['attributes']=_0x4ec427[_0x1b93('0x31')]['length']?_0x4ec427[_0x1b93('0x31')]:_0x5ad3e3[_0x1b93('0x2d')];if(_0x37d2c2['query'][_0x1b93('0x3c')]){_0x4ec427[_0x1b93('0x3d')]=[{'all':!![]}];}_0x4ec427=_[_0x1b93('0x3a')]({},_0x4ec427,_0x37d2c2[_0x1b93('0x3b')]);return db['ChatQueueReport'][_0x1b93('0x43')](_0x4ec427)[_0x1b93('0x23')](handleEntityNotFound(_0xd1017,null))[_0x1b93('0x23')](respondWithResult(_0xd1017,null))[_0x1b93('0x3f')](handleError(_0xd1017,null));};exports['create']=function(_0x154c7a,_0x1ef0b1){return db['ChatQueueReport'][_0x1b93('0x44')](_0x154c7a['body'],{})[_0x1b93('0x23')](respondWithResult(_0x1ef0b1,0xc9))[_0x1b93('0x3f')](handleError(_0x1ef0b1,null));};exports[_0x1b93('0x22')]=function(_0x1df9d4,_0x4a6918){if(_0x1df9d4[_0x1b93('0x45')]['id']){delete _0x1df9d4[_0x1b93('0x45')]['id'];}return db[_0x1b93('0x2a')][_0x1b93('0x43')]({'where':{'id':_0x1df9d4[_0x1b93('0x46')]['id']}})['then'](handleEntityNotFound(_0x4a6918,null))[_0x1b93('0x23')](saveUpdates(_0x1df9d4['body'],null))['then'](respondWithResult(_0x4a6918,null))[_0x1b93('0x3f')](handleError(_0x4a6918,null));};exports[_0x1b93('0x24')]=function(_0x32f6cd,_0x1e7fcf){return db[_0x1b93('0x2a')]['find']({'where':{'id':_0x32f6cd[_0x1b93('0x46')]['id']}})[_0x1b93('0x23')](handleEntityNotFound(_0x1e7fcf,null))[_0x1b93('0x23')](removeEntity(_0x1e7fcf,null))[_0x1b93('0x3f')](handleError(_0x1e7fcf,null));};exports[_0x1b93('0x47')]=function(_0x4feaeb,_0x20a6f9){return db['ChatQueueReport'][_0x1b93('0x47')]()['then'](respondWithResult(_0x20a6f9,null))['catch'](handleError(_0x20a6f9,null));}; \ No newline at end of file +var _0x27eb=['squel','crypto','jsforce','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/utils','../../config/license/util','../../mysqldb','sendStatus','end','status','json','offset','undefined','limit','count','Content-Range','apply','reject','update','destroy','then','error','name','send','index','map','ChatQueueReport','rawAttributes','fieldName','type','key','model','query','filters','attributes','intersection','fields','nolimit','order','sort','pick','filter','where','merge','VIRTUAL','options','includeAll','include','findAll','catch','show','params','keys','create','body','find','describe','eml-format','rimraf','request-promise','moment','bluebird','util','path','sox','to-csv','fs-extra','lodash'];(function(_0x55e08b,_0x421620){var _0xd1a7ff=function(_0x58c7ff){while(--_0x58c7ff){_0x55e08b['push'](_0x55e08b['shift']());}};_0xd1a7ff(++_0x421620);}(_0x27eb,0xd0));var _0xb27e=function(_0x4a0311,_0x4bb96f){_0x4a0311=_0x4a0311-0x0;var _0x4d34d1=_0x27eb[_0x4a0311];return _0x4d34d1;};'use strict';var emlformat=require(_0xb27e('0x0'));var rimraf=require(_0xb27e('0x1'));var zipdir=require('zip-dir');var jsonpatch=require('fast-json-patch');var rp=require(_0xb27e('0x2'));var moment=require(_0xb27e('0x3'));var BPromise=require(_0xb27e('0x4'));var Mustache=require('mustache');var util=require(_0xb27e('0x5'));var path=require(_0xb27e('0x6'));var sox=require(_0xb27e('0x7'));var csv=require(_0xb27e('0x8'));var ejs=require('ejs');var fs=require('fs');var fs_extra=require(_0xb27e('0x9'));var _=require(_0xb27e('0xa'));var squel=require(_0xb27e('0xb'));var crypto=require(_0xb27e('0xc'));var jsforce=require(_0xb27e('0xd'));var deskjs=require('desk.js');var toCsv=require(_0xb27e('0x8'));var querystring=require(_0xb27e('0xe'));var Papa=require(_0xb27e('0xf'));var Redis=require(_0xb27e('0x10'));var authService=require(_0xb27e('0x11'));var qs=require('../../components/parsers/qs');var as=require(_0xb27e('0x12'));var hardwareService=require(_0xb27e('0x13'));var logger=require('../../config/logger')('api');var utils=require(_0xb27e('0x14'));var config=require('../../config/environment');var licenseUtil=require(_0xb27e('0x15'));var db=require(_0xb27e('0x16'))['db'];function respondWithStatusCode(_0x4d0b5d,_0x58b37f){_0x58b37f=_0x58b37f||0xcc;return function(_0x48c914){if(_0x48c914){return _0x4d0b5d[_0xb27e('0x17')](_0x58b37f);}return _0x4d0b5d['status'](_0x58b37f)[_0xb27e('0x18')]();};}function respondWithResult(_0x54657b,_0x1b55e2){_0x1b55e2=_0x1b55e2||0xc8;return function(_0x5aa86f){if(_0x5aa86f){return _0x54657b[_0xb27e('0x19')](_0x1b55e2)[_0xb27e('0x1a')](_0x5aa86f);}};}function respondWithFilteredResult(_0x28cc6d,_0x522bbf){return function(_0x26ec32){if(_0x26ec32){var _0x1d14bb=typeof _0x522bbf[_0xb27e('0x1b')]===_0xb27e('0x1c')&&typeof _0x522bbf[_0xb27e('0x1d')]===_0xb27e('0x1c');var _0x25ce70=_0x26ec32[_0xb27e('0x1e')];var _0x317f4e=_0x1d14bb?0x0:_0x522bbf['offset'];var _0x8be243=_0x1d14bb?_0x26ec32[_0xb27e('0x1e')]:_0x522bbf[_0xb27e('0x1b')]+_0x522bbf['limit'];var _0x352856;if(_0x8be243>=_0x25ce70){_0x8be243=_0x25ce70;_0x352856=0xc8;}else{_0x352856=0xce;}_0x28cc6d['status'](_0x352856);return _0x28cc6d['set'](_0xb27e('0x1f'),_0x317f4e+'-'+_0x8be243+'/'+_0x25ce70)[_0xb27e('0x1a')](_0x26ec32);}return null;};}function patchUpdates(_0x4ec66c){return function(_0x2a78c0){try{jsonpatch[_0xb27e('0x20')](_0x2a78c0,_0x4ec66c,!![]);}catch(_0x16c950){return BPromise[_0xb27e('0x21')](_0x16c950);}return _0x2a78c0['save']();};}function saveUpdates(_0x3c9e21,_0x5a3cdf){return function(_0x19c0f2){if(_0x19c0f2){return _0x19c0f2[_0xb27e('0x22')](_0x3c9e21)['then'](function(_0x58fc84){return _0x58fc84;});}return null;};}function removeEntity(_0x2146c0,_0xfbc258){return function(_0x3703ab){if(_0x3703ab){return _0x3703ab[_0xb27e('0x23')]()[_0xb27e('0x24')](function(){_0x2146c0['status'](0xcc)[_0xb27e('0x18')]();});}};}function handleEntityNotFound(_0x4cba0b,_0x3972bc){return function(_0x1ac460){if(!_0x1ac460){_0x4cba0b[_0xb27e('0x17')](0x194);}return _0x1ac460;};}function handleError(_0x3fbc78,_0x3254fb){_0x3254fb=_0x3254fb||0x1f4;return function(_0x4dab95){logger[_0xb27e('0x25')](_0x4dab95['stack']);if(_0x4dab95[_0xb27e('0x26')]){delete _0x4dab95[_0xb27e('0x26')];}_0x3fbc78[_0xb27e('0x19')](_0x3254fb)[_0xb27e('0x27')](_0x4dab95);};}exports[_0xb27e('0x28')]=function(_0x35169a,_0xd27061){var _0x125c0b={},_0x42c5de={},_0x4ef0e6={'count':0x0,'rows':[]};var _0x377d79=_[_0xb27e('0x29')](db[_0xb27e('0x2a')][_0xb27e('0x2b')],function(_0x58a1a9){return{'name':_0x58a1a9[_0xb27e('0x2c')],'type':_0x58a1a9[_0xb27e('0x2d')][_0xb27e('0x2e')]};});_0x42c5de[_0xb27e('0x2f')]=_[_0xb27e('0x29')](_0x377d79,_0xb27e('0x26'));_0x42c5de[_0xb27e('0x30')]=_['keys'](_0x35169a['query']);_0x42c5de[_0xb27e('0x31')]=_['intersection'](_0x42c5de[_0xb27e('0x2f')],_0x42c5de['query']);_0x125c0b[_0xb27e('0x32')]=_[_0xb27e('0x33')](_0x42c5de[_0xb27e('0x2f')],qs[_0xb27e('0x34')](_0x35169a[_0xb27e('0x30')][_0xb27e('0x34')]));_0x125c0b['attributes']=_0x125c0b[_0xb27e('0x32')]['length']?_0x125c0b[_0xb27e('0x32')]:_0x42c5de['model'];if(!_0x35169a[_0xb27e('0x30')]['hasOwnProperty'](_0xb27e('0x35'))){_0x125c0b[_0xb27e('0x1d')]=qs['limit'](_0x35169a['query'][_0xb27e('0x1d')]);_0x125c0b['offset']=qs['offset'](_0x35169a['query'][_0xb27e('0x1b')]);}_0x125c0b[_0xb27e('0x36')]=qs['sort'](_0x35169a[_0xb27e('0x30')][_0xb27e('0x37')]);_0x125c0b['where']=qs['filters'](_[_0xb27e('0x38')](_0x35169a['query'],_0x42c5de[_0xb27e('0x31')]),_0x377d79);if(_0x35169a['query'][_0xb27e('0x39')]){_0x125c0b[_0xb27e('0x3a')]=_[_0xb27e('0x3b')](_0x125c0b[_0xb27e('0x3a')],{'$or':_[_0xb27e('0x29')](_0x377d79,function(_0x1239d4){if(_0x1239d4[_0xb27e('0x2d')]!==_0xb27e('0x3c')){var _0x533343={};_0x533343[_0x1239d4[_0xb27e('0x26')]]={'$like':'%'+_0x35169a[_0xb27e('0x30')][_0xb27e('0x39')]+'%'};return _0x533343;}})});}_0x125c0b=_[_0xb27e('0x3b')]({},_0x125c0b,_0x35169a[_0xb27e('0x3d')]);var _0x564699={'where':_0x125c0b['where']};return db[_0xb27e('0x2a')][_0xb27e('0x1e')](_0x564699)[_0xb27e('0x24')](function(_0x5c7742){_0x4ef0e6[_0xb27e('0x1e')]=_0x5c7742;if(_0x35169a[_0xb27e('0x30')][_0xb27e('0x3e')]){_0x125c0b[_0xb27e('0x3f')]=[{'all':!![]}];}return db[_0xb27e('0x2a')][_0xb27e('0x40')](_0x125c0b);})[_0xb27e('0x24')](function(_0x4d90bf){_0x4ef0e6['rows']=_0x4d90bf;return _0x4ef0e6;})[_0xb27e('0x24')](respondWithFilteredResult(_0xd27061,_0x125c0b))[_0xb27e('0x41')](handleError(_0xd27061,null));};exports[_0xb27e('0x42')]=function(_0x3272ba,_0x11fafd){var _0x42f5e3={'raw':!![],'where':{'id':_0x3272ba[_0xb27e('0x43')]['id']}},_0x2959f5={};_0x2959f5['model']=_[_0xb27e('0x44')](db[_0xb27e('0x2a')][_0xb27e('0x2b')]);_0x2959f5[_0xb27e('0x30')]=_['keys'](_0x3272ba[_0xb27e('0x30')]);_0x2959f5['filters']=_['intersection'](_0x2959f5[_0xb27e('0x2f')],_0x2959f5[_0xb27e('0x30')]);_0x42f5e3['attributes']=_[_0xb27e('0x33')](_0x2959f5[_0xb27e('0x2f')],qs[_0xb27e('0x34')](_0x3272ba[_0xb27e('0x30')][_0xb27e('0x34')]));_0x42f5e3[_0xb27e('0x32')]=_0x42f5e3[_0xb27e('0x32')]['length']?_0x42f5e3[_0xb27e('0x32')]:_0x2959f5['model'];if(_0x3272ba[_0xb27e('0x30')][_0xb27e('0x3e')]){_0x42f5e3[_0xb27e('0x3f')]=[{'all':!![]}];}_0x42f5e3=_[_0xb27e('0x3b')]({},_0x42f5e3,_0x3272ba[_0xb27e('0x3d')]);return db[_0xb27e('0x2a')]['find'](_0x42f5e3)['then'](handleEntityNotFound(_0x11fafd,null))[_0xb27e('0x24')](respondWithResult(_0x11fafd,null))[_0xb27e('0x41')](handleError(_0x11fafd,null));};exports[_0xb27e('0x45')]=function(_0x15b5cb,_0x238bb9){return db['ChatQueueReport'][_0xb27e('0x45')](_0x15b5cb[_0xb27e('0x46')],{})[_0xb27e('0x24')](respondWithResult(_0x238bb9,0xc9))[_0xb27e('0x41')](handleError(_0x238bb9,null));};exports[_0xb27e('0x22')]=function(_0x16a71b,_0x320b9c){if(_0x16a71b[_0xb27e('0x46')]['id']){delete _0x16a71b[_0xb27e('0x46')]['id'];}return db[_0xb27e('0x2a')][_0xb27e('0x47')]({'where':{'id':_0x16a71b['params']['id']}})[_0xb27e('0x24')](handleEntityNotFound(_0x320b9c,null))['then'](saveUpdates(_0x16a71b[_0xb27e('0x46')],null))[_0xb27e('0x24')](respondWithResult(_0x320b9c,null))[_0xb27e('0x41')](handleError(_0x320b9c,null));};exports[_0xb27e('0x23')]=function(_0x91095,_0x1af27d){return db[_0xb27e('0x2a')][_0xb27e('0x47')]({'where':{'id':_0x91095['params']['id']}})['then'](handleEntityNotFound(_0x1af27d,null))[_0xb27e('0x24')](removeEntity(_0x1af27d,null))[_0xb27e('0x41')](handleError(_0x1af27d,null));};exports[_0xb27e('0x48')]=function(_0x583293,_0x1c4846){return db['ChatQueueReport'][_0xb27e('0x48')]()[_0xb27e('0x24')](respondWithResult(_0x1c4846,null))[_0xb27e('0x41')](handleError(_0x1c4846,null));}; \ No newline at end of file diff --git a/server/api/chatQueueReport/chatQueueReport.model.js b/server/api/chatQueueReport/chatQueueReport.model.js index 74e7e4a..3baf713 100644 --- a/server/api/chatQueueReport/chatQueueReport.model.js +++ b/server/api/chatQueueReport/chatQueueReport.model.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x757a=['report_chat_queue','uniqueid','util','../../config/logger','request-promise','path','rimraf','../../config/environment','./chatQueueReport.attributes','exports','define'];(function(_0xdafb10,_0x51beb0){var _0x51e9ce=function(_0xcc5048){while(--_0xcc5048){_0xdafb10['push'](_0xdafb10['shift']());}};_0x51e9ce(++_0x51beb0);}(_0x757a,0xde));var _0xa757=function(_0x211d94,_0x4a0781){_0x211d94=_0x211d94-0x0;var _0x1c413a=_0x757a[_0x211d94];return _0x1c413a;};'use strict';var _=require('lodash');var util=require(_0xa757('0x0'));var logger=require(_0xa757('0x1'))('api');var moment=require('moment');var BPromise=require('bluebird');var rp=require(_0xa757('0x2'));var fs=require('fs');var path=require(_0xa757('0x3'));var rimraf=require(_0xa757('0x4'));var config=require(_0xa757('0x5'));var attributes=require(_0xa757('0x6'));module[_0xa757('0x7')]=function(_0x5edca8,_0xae0e7c){return _0x5edca8[_0xa757('0x8')]('ChatQueueReport',attributes,{'tableName':_0xa757('0x9'),'paranoid':![],'indexes':[{'name':_0xa757('0xa'),'fields':[_0xa757('0xa')]}],'timestamps':!![]});}; \ No newline at end of file +var _0x757a=['report_chat_queue','uniqueid','util','../../config/logger','request-promise','path','rimraf','../../config/environment','./chatQueueReport.attributes','exports','define'];(function(_0x2c0668,_0x56f1ec){var _0x3e83d4=function(_0x5522b0){while(--_0x5522b0){_0x2c0668['push'](_0x2c0668['shift']());}};_0x3e83d4(++_0x56f1ec);}(_0x757a,0xde));var _0xa757=function(_0x1fb627,_0x50d72b){_0x1fb627=_0x1fb627-0x0;var _0x27f296=_0x757a[_0x1fb627];return _0x27f296;};'use strict';var _=require('lodash');var util=require(_0xa757('0x0'));var logger=require(_0xa757('0x1'))('api');var moment=require('moment');var BPromise=require('bluebird');var rp=require(_0xa757('0x2'));var fs=require('fs');var path=require(_0xa757('0x3'));var rimraf=require(_0xa757('0x4'));var config=require(_0xa757('0x5'));var attributes=require(_0xa757('0x6'));module[_0xa757('0x7')]=function(_0x5edca8,_0xae0e7c){return _0x5edca8[_0xa757('0x8')]('ChatQueueReport',attributes,{'tableName':_0xa757('0x9'),'paranoid':![],'indexes':[{'name':_0xa757('0xa'),'fields':[_0xa757('0xa')]}],'timestamps':!![]});}; \ No newline at end of file diff --git a/server/api/chatQueueReport/chatQueueReport.rpc.js b/server/api/chatQueueReport/chatQueueReport.rpc.js index 893b44e..d086655 100644 --- a/server/api/chatQueueReport/chatQueueReport.rpc.js +++ b/server/api/chatQueueReport/chatQueueReport.rpc.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x2a4b=['info','request\x20sent','ChatQueueReport,\x20%s,\x20%s,\x20%s','stringify','error','code','message','ChatQueueReport,\x20%s,\x20%s','catch','CreateChatQueueReport','create','body','options','raw','then','debug','UpdateChatQueueReport','ChatQueueReport','update','where','limit','lodash','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','request'];(function(_0x38537f,_0x252124){var _0x141e23=function(_0x2809b5){while(--_0x2809b5){_0x38537f['push'](_0x38537f['shift']());}};_0x141e23(++_0x252124);}(_0x2a4b,0x115));var _0xb2a4=function(_0x11c3f0,_0x341fa1){_0x11c3f0=_0x11c3f0-0x0;var _0x5bed93=_0x2a4b[_0x11c3f0];return _0x5bed93;};'use strict';var _=require(_0xb2a4('0x0'));var util=require('util');var moment=require('moment');var BPromise=require(_0xb2a4('0x1'));var rs=require(_0xb2a4('0x2'));var fs=require('fs');var Redis=require(_0xb2a4('0x3'));var db=require(_0xb2a4('0x4'))['db'];var utils=require(_0xb2a4('0x5'));var logger=require(_0xb2a4('0x6'))(_0xb2a4('0x7'));var config=require(_0xb2a4('0x8'));var jayson=require(_0xb2a4('0x9'));var client=jayson['client']['http']({'port':0x232a});function respondWithRpcPromise(_0x3e5d1d,_0x1accb3,_0x1e093a){return new BPromise(function(_0x46ae3e,_0x5d6783){return client[_0xb2a4('0xa')](_0x3e5d1d,_0x1e093a)['then'](function(_0x42fcf4){logger[_0xb2a4('0xb')]('ChatQueueReport,\x20%s,\x20%s',_0x1accb3,_0xb2a4('0xc'));logger['debug'](_0xb2a4('0xd'),_0x1accb3,_0xb2a4('0xc'),JSON[_0xb2a4('0xe')](_0x42fcf4));if(_0x42fcf4[_0xb2a4('0xf')]){if(_0x42fcf4[_0xb2a4('0xf')][_0xb2a4('0x10')]===0x1f4){logger[_0xb2a4('0xf')]('ChatQueueReport,\x20%s,\x20%s',_0x1accb3,_0x42fcf4[_0xb2a4('0xf')]['message']);return _0x5d6783(_0x42fcf4['error'][_0xb2a4('0x11')]);}logger['error'](_0xb2a4('0x12'),_0x1accb3,_0x42fcf4[_0xb2a4('0xf')]['message']);return _0x46ae3e(_0x42fcf4[_0xb2a4('0xf')][_0xb2a4('0x11')]);}else{logger[_0xb2a4('0xb')](_0xb2a4('0x12'),_0x1accb3,_0xb2a4('0xc'));_0x46ae3e(_0x42fcf4['result']['message']);}})[_0xb2a4('0x13')](function(_0x4a6d91){logger['error'](_0xb2a4('0x12'),_0x1accb3,_0x4a6d91);_0x5d6783(_0x4a6d91);});});}exports[_0xb2a4('0x14')]=function(_0x3f647f){var _0x8e730f=this;return new Promise(function(_0x34d2f7,_0x15a499){return db['ChatQueueReport'][_0xb2a4('0x15')](_0x3f647f[_0xb2a4('0x16')],{'raw':_0x3f647f['options']?_0x3f647f[_0xb2a4('0x17')][_0xb2a4('0x18')]===undefined?!![]:![]:!![]})[_0xb2a4('0x19')](function(_0x1798df){logger['info'](_0xb2a4('0x14'),_0x3f647f);logger[_0xb2a4('0x1a')]('CreateChatQueueReport',_0x3f647f,JSON['stringify'](_0x1798df));_0x34d2f7(_0x1798df);})['catch'](function(_0xeb5206){logger[_0xb2a4('0xf')]('CreateChatQueueReport',_0xeb5206[_0xb2a4('0x11')],_0x3f647f);_0x15a499(_0x8e730f['error'](0x1f4,_0xeb5206[_0xb2a4('0x11')]));});});};exports[_0xb2a4('0x1b')]=function(_0x515b73){var _0xbf4e38=this;return new Promise(function(_0x811b74,_0x3eada2){return db[_0xb2a4('0x1c')][_0xb2a4('0x1d')](_0x515b73[_0xb2a4('0x16')],{'raw':_0x515b73['options']?_0x515b73[_0xb2a4('0x17')]['raw']===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x515b73[_0xb2a4('0x17')]?_0x515b73[_0xb2a4('0x17')][_0xb2a4('0x1e')]||null:null,'attributes':_0x515b73['options']?_0x515b73['options']['attributes']||null:null,'limit':_0x515b73[_0xb2a4('0x17')]?_0x515b73[_0xb2a4('0x17')][_0xb2a4('0x1f')]||null:null})[_0xb2a4('0x19')](function(_0x5b4716){logger['info'](_0xb2a4('0x1b'),_0x515b73);logger[_0xb2a4('0x1a')](_0xb2a4('0x1b'),_0x515b73,JSON[_0xb2a4('0xe')](_0x5b4716));_0x811b74(_0x5b4716);})['catch'](function(_0x594cc0){logger[_0xb2a4('0xf')](_0xb2a4('0x1b'),_0x594cc0[_0xb2a4('0x11')],_0x515b73);_0x3eada2(_0xbf4e38['error'](0x1f4,_0x594cc0[_0xb2a4('0x11')]));});});}; \ No newline at end of file +var _0x79d1=['result','ChatQueueReport','create','body','options','then','CreateChatQueueReport','UpdateChatQueueReport','update','where','attributes','limit','catch','moment','bluebird','randomstring','ioredis','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','http','request','info','ChatQueueReport,\x20%s,\x20%s','debug','ChatQueueReport,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','code','message'];(function(_0x51001a,_0x34fd24){var _0x23a3db=function(_0x563198){while(--_0x563198){_0x51001a['push'](_0x51001a['shift']());}};_0x23a3db(++_0x34fd24);}(_0x79d1,0x136));var _0x179d=function(_0x4b055c,_0x4b870b){_0x4b055c=_0x4b055c-0x0;var _0x4b62bb=_0x79d1[_0x4b055c];return _0x4b62bb;};'use strict';var _=require('lodash');var util=require('util');var moment=require(_0x179d('0x0'));var BPromise=require(_0x179d('0x1'));var rs=require(_0x179d('0x2'));var fs=require('fs');var Redis=require(_0x179d('0x3'));var db=require('../../mysqldb')['db'];var utils=require(_0x179d('0x4'));var logger=require(_0x179d('0x5'))(_0x179d('0x6'));var config=require(_0x179d('0x7'));var jayson=require(_0x179d('0x8'));var client=jayson['client'][_0x179d('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x33982f,_0x3853c6,_0x1f0351){return new BPromise(function(_0x3b022e,_0x1f8b27){return client[_0x179d('0xa')](_0x33982f,_0x1f0351)['then'](function(_0x3bb590){logger[_0x179d('0xb')](_0x179d('0xc'),_0x3853c6,'request\x20sent');logger[_0x179d('0xd')](_0x179d('0xe'),_0x3853c6,_0x179d('0xf'),JSON[_0x179d('0x10')](_0x3bb590));if(_0x3bb590[_0x179d('0x11')]){if(_0x3bb590[_0x179d('0x11')][_0x179d('0x12')]===0x1f4){logger['error'](_0x179d('0xc'),_0x3853c6,_0x3bb590[_0x179d('0x11')][_0x179d('0x13')]);return _0x1f8b27(_0x3bb590[_0x179d('0x11')][_0x179d('0x13')]);}logger[_0x179d('0x11')](_0x179d('0xc'),_0x3853c6,_0x3bb590['error'][_0x179d('0x13')]);return _0x3b022e(_0x3bb590['error']['message']);}else{logger[_0x179d('0xb')]('ChatQueueReport,\x20%s,\x20%s',_0x3853c6,_0x179d('0xf'));_0x3b022e(_0x3bb590[_0x179d('0x14')][_0x179d('0x13')]);}})['catch'](function(_0x1ecbaa){logger['error']('ChatQueueReport,\x20%s,\x20%s',_0x3853c6,_0x1ecbaa);_0x1f8b27(_0x1ecbaa);});});}exports['CreateChatQueueReport']=function(_0x1fefe4){var _0x10da39=this;return new Promise(function(_0x2e17b8,_0x5cd586){return db[_0x179d('0x15')][_0x179d('0x16')](_0x1fefe4[_0x179d('0x17')],{'raw':_0x1fefe4[_0x179d('0x18')]?_0x1fefe4[_0x179d('0x18')]['raw']===undefined?!![]:![]:!![]})[_0x179d('0x19')](function(_0x22b096){logger[_0x179d('0xb')]('CreateChatQueueReport',_0x1fefe4);logger[_0x179d('0xd')]('CreateChatQueueReport',_0x1fefe4,JSON['stringify'](_0x22b096));_0x2e17b8(_0x22b096);})['catch'](function(_0x13a6d8){logger[_0x179d('0x11')](_0x179d('0x1a'),_0x13a6d8[_0x179d('0x13')],_0x1fefe4);_0x5cd586(_0x10da39[_0x179d('0x11')](0x1f4,_0x13a6d8['message']));});});};exports[_0x179d('0x1b')]=function(_0x117473){var _0xd5c8f6=this;return new Promise(function(_0xfd5f85,_0x407ca0){return db[_0x179d('0x15')][_0x179d('0x1c')](_0x117473[_0x179d('0x17')],{'raw':_0x117473[_0x179d('0x18')]?_0x117473['options']['raw']===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x117473['options']?_0x117473[_0x179d('0x18')][_0x179d('0x1d')]||null:null,'attributes':_0x117473[_0x179d('0x18')]?_0x117473[_0x179d('0x18')][_0x179d('0x1e')]||null:null,'limit':_0x117473[_0x179d('0x18')]?_0x117473['options'][_0x179d('0x1f')]||null:null})['then'](function(_0x32b8ac){logger['info'](_0x179d('0x1b'),_0x117473);logger[_0x179d('0xd')](_0x179d('0x1b'),_0x117473,JSON[_0x179d('0x10')](_0x32b8ac));_0xfd5f85(_0x32b8ac);})[_0x179d('0x20')](function(_0x1d444b){logger[_0x179d('0x11')](_0x179d('0x1b'),_0x1d444b[_0x179d('0x13')],_0x117473);_0x407ca0(_0xd5c8f6[_0x179d('0x11')](0x1f4,_0x1d444b['message']));});});}; \ No newline at end of file diff --git a/server/api/chatQueueReport/index.js b/server/api/chatQueueReport/index.js index 9fde09a..569f746 100644 --- a/server/api/chatQueueReport/index.js +++ b/server/api/chatQueueReport/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xd467=['index','/describe','describe','/:id','show','create','delete','destroy','connect-timeout','Router','fs-extra','../../components/interaction/service','./chatQueueReport.controller','get','isAuthenticated'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0xd467,0x1e8));var _0x7d46=function(_0xc7bf8a,_0x595d63){_0xc7bf8a=_0xc7bf8a-0x0;var _0xd5804a=_0xd467[_0xc7bf8a];return _0xd5804a;};'use strict';var multer=require('multer');var util=require('util');var path=require('path');var timeout=require(_0x7d46('0x0'));var express=require('express');var router=express[_0x7d46('0x1')]();var fs_extra=require(_0x7d46('0x2'));var auth=require('../../components/auth/service');var interaction=require(_0x7d46('0x3'));var config=require('../../config/environment');var controller=require(_0x7d46('0x4'));router[_0x7d46('0x5')]('/',auth[_0x7d46('0x6')](),controller[_0x7d46('0x7')]);router[_0x7d46('0x5')](_0x7d46('0x8'),auth[_0x7d46('0x6')](),controller[_0x7d46('0x9')]);router['get'](_0x7d46('0xa'),auth[_0x7d46('0x6')](),controller[_0x7d46('0xb')]);router['post']('/',auth[_0x7d46('0x6')](),controller[_0x7d46('0xc')]);router['put'](_0x7d46('0xa'),auth['isAuthenticated'](),controller['update']);router[_0x7d46('0xd')](_0x7d46('0xa'),auth['isAuthenticated'](),controller[_0x7d46('0xe')]);module['exports']=router; \ No newline at end of file +var _0xa0e0=['get','isAuthenticated','index','/describe','/:id','show','put','update','path','Router','../../components/auth/service','../../config/environment','./chatQueueReport.controller'];(function(_0x167cc1,_0x56ef5a){var _0x10bc4b=function(_0xd6a255){while(--_0xd6a255){_0x167cc1['push'](_0x167cc1['shift']());}};_0x10bc4b(++_0x56ef5a);}(_0xa0e0,0xb1));var _0x0a0e=function(_0x1c8ee2,_0x566902){_0x1c8ee2=_0x1c8ee2-0x0;var _0x356fa7=_0xa0e0[_0x1c8ee2];return _0x356fa7;};'use strict';var multer=require('multer');var util=require('util');var path=require(_0x0a0e('0x0'));var timeout=require('connect-timeout');var express=require('express');var router=express[_0x0a0e('0x1')]();var fs_extra=require('fs-extra');var auth=require(_0x0a0e('0x2'));var interaction=require('../../components/interaction/service');var config=require(_0x0a0e('0x3'));var controller=require(_0x0a0e('0x4'));router[_0x0a0e('0x5')]('/',auth[_0x0a0e('0x6')](),controller[_0x0a0e('0x7')]);router[_0x0a0e('0x5')](_0x0a0e('0x8'),auth[_0x0a0e('0x6')](),controller['describe']);router[_0x0a0e('0x5')](_0x0a0e('0x9'),auth['isAuthenticated'](),controller[_0x0a0e('0xa')]);router['post']('/',auth[_0x0a0e('0x6')](),controller['create']);router[_0x0a0e('0xb')]('/:id',auth[_0x0a0e('0x6')](),controller[_0x0a0e('0xc')]);router['delete'](_0x0a0e('0x9'),auth[_0x0a0e('0x6')](),controller['destroy']);module['exports']=router; \ No newline at end of file diff --git a/server/api/chatTransferReport/chatTransferReport.attributes.js b/server/api/chatTransferReport/chatTransferReport.attributes.js index 225800a..67237f4 100644 --- a/server/api/chatTransferReport/chatTransferReport.attributes.js +++ b/server/api/chatTransferReport/chatTransferReport.attributes.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xaa88=['account','agent','queue','DATE','NOW','moment','sequelize','exports','STRING'];(function(_0x4d7b93,_0x11dae3){var _0x29317f=function(_0x1ea1c9){while(--_0x1ea1c9){_0x4d7b93['push'](_0x4d7b93['shift']());}};_0x29317f(++_0x11dae3);}(_0xaa88,0x137));var _0x8aa8=function(_0x4828b1,_0x5c8cf3){_0x4828b1=_0x4828b1-0x0;var _0x1fec1b=_0xaa88[_0x4828b1];return _0x1fec1b;};'use strict';var moment=require(_0x8aa8('0x0'));var Sequelize=require(_0x8aa8('0x1'));module[_0x8aa8('0x2')]={'uniqueid':{'type':Sequelize[_0x8aa8('0x3')],'allowNull':![]},'type':{'type':Sequelize['ENUM'](_0x8aa8('0x4'),_0x8aa8('0x5'),_0x8aa8('0x6')),'allowNull':![],'defaultValue':_0x8aa8('0x6')},'transferredAt':{'type':Sequelize[_0x8aa8('0x7')],'allowNull':![],'defaultValue':Sequelize[_0x8aa8('0x8')]}}; \ No newline at end of file +var _0xa9e0=['account','queue','DATE','NOW','moment','sequelize','exports'];(function(_0x4c9316,_0x5c7f6f){var _0x146aad=function(_0x4fa179){while(--_0x4fa179){_0x4c9316['push'](_0x4c9316['shift']());}};_0x146aad(++_0x5c7f6f);}(_0xa9e0,0x123));var _0x0a9e=function(_0x110c3d,_0x12ee06){_0x110c3d=_0x110c3d-0x0;var _0x226d67=_0xa9e0[_0x110c3d];return _0x226d67;};'use strict';var moment=require(_0x0a9e('0x0'));var Sequelize=require(_0x0a9e('0x1'));module[_0x0a9e('0x2')]={'uniqueid':{'type':Sequelize['STRING'],'allowNull':![]},'type':{'type':Sequelize['ENUM'](_0x0a9e('0x3'),'agent',_0x0a9e('0x4')),'allowNull':![],'defaultValue':_0x0a9e('0x4')},'transferredAt':{'type':Sequelize[_0x0a9e('0x5')],'allowNull':![],'defaultValue':Sequelize[_0x0a9e('0x6')]}}; \ No newline at end of file diff --git a/server/api/chatTransferReport/chatTransferReport.controller.js b/server/api/chatTransferReport/chatTransferReport.controller.js index 28763a6..26e9b20 100644 --- a/server/api/chatTransferReport/chatTransferReport.controller.js +++ b/server/api/chatTransferReport/chatTransferReport.controller.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x51cb=['lodash','jsforce','desk.js','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/logger','api','../../config/utils','../../config/environment','../../config/license/util','status','end','json','offset','undefined','limit','count','set','apply','reject','save','then','destroy','sendStatus','error','name','send','ChatTransferReport','rawAttributes','fieldName','type','key','model','map','query','filters','intersection','attributes','fields','length','hasOwnProperty','nolimit','order','sort','where','filter','VIRTUAL','options','findAll','rows','catch','show','keys','find','create','update','body','params','describe','eml-format','rimraf','request-promise','bluebird','mustache','path','sox','to-csv','ejs','fs-extra'];(function(_0x1fbe59,_0x45dd45){var _0x315b32=function(_0x403fe){while(--_0x403fe){_0x1fbe59['push'](_0x1fbe59['shift']());}};_0x315b32(++_0x45dd45);}(_0x51cb,0x159));var _0xb51c=function(_0x48c772,_0x1336d1){_0x48c772=_0x48c772-0x0;var _0x39a64b=_0x51cb[_0x48c772];return _0x39a64b;};'use strict';var emlformat=require(_0xb51c('0x0'));var rimraf=require(_0xb51c('0x1'));var zipdir=require('zip-dir');var jsonpatch=require('fast-json-patch');var rp=require(_0xb51c('0x2'));var moment=require('moment');var BPromise=require(_0xb51c('0x3'));var Mustache=require(_0xb51c('0x4'));var util=require('util');var path=require(_0xb51c('0x5'));var sox=require(_0xb51c('0x6'));var csv=require(_0xb51c('0x7'));var ejs=require(_0xb51c('0x8'));var fs=require('fs');var fs_extra=require(_0xb51c('0x9'));var _=require(_0xb51c('0xa'));var squel=require('squel');var crypto=require('crypto');var jsforce=require(_0xb51c('0xb'));var deskjs=require(_0xb51c('0xc'));var toCsv=require(_0xb51c('0x7'));var querystring=require('querystring');var Papa=require('papaparse');var Redis=require(_0xb51c('0xd'));var authService=require(_0xb51c('0xe'));var qs=require(_0xb51c('0xf'));var as=require(_0xb51c('0x10'));var hardwareService=require('../../config/license/hardware');var logger=require(_0xb51c('0x11'))(_0xb51c('0x12'));var utils=require(_0xb51c('0x13'));var config=require(_0xb51c('0x14'));var licenseUtil=require(_0xb51c('0x15'));var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0x48981b,_0x6dca6){_0x6dca6=_0x6dca6||0xcc;return function(_0x539149){if(_0x539149){return _0x48981b['sendStatus'](_0x6dca6);}return _0x48981b[_0xb51c('0x16')](_0x6dca6)[_0xb51c('0x17')]();};}function respondWithResult(_0xc64980,_0x58ad91){_0x58ad91=_0x58ad91||0xc8;return function(_0x5db8f5){if(_0x5db8f5){return _0xc64980[_0xb51c('0x16')](_0x58ad91)[_0xb51c('0x18')](_0x5db8f5);}};}function respondWithFilteredResult(_0x5df22b,_0x573237){return function(_0x542fd0){if(_0x542fd0){var _0x2a2c99=typeof _0x573237[_0xb51c('0x19')]===_0xb51c('0x1a')&&typeof _0x573237[_0xb51c('0x1b')]===_0xb51c('0x1a');var _0x872d54=_0x542fd0[_0xb51c('0x1c')];var _0x410f9b=_0x2a2c99?0x0:_0x573237[_0xb51c('0x19')];var _0x151750=_0x2a2c99?_0x542fd0[_0xb51c('0x1c')]:_0x573237[_0xb51c('0x19')]+_0x573237[_0xb51c('0x1b')];var _0x2d4402;if(_0x151750>=_0x872d54){_0x151750=_0x872d54;_0x2d4402=0xc8;}else{_0x2d4402=0xce;}_0x5df22b['status'](_0x2d4402);return _0x5df22b[_0xb51c('0x1d')]('Content-Range',_0x410f9b+'-'+_0x151750+'/'+_0x872d54)[_0xb51c('0x18')](_0x542fd0);}return null;};}function patchUpdates(_0x152802){return function(_0x38af69){try{jsonpatch[_0xb51c('0x1e')](_0x38af69,_0x152802,!![]);}catch(_0x2c809c){return BPromise[_0xb51c('0x1f')](_0x2c809c);}return _0x38af69[_0xb51c('0x20')]();};}function saveUpdates(_0x5b7f77,_0x556117){return function(_0x331cc0){if(_0x331cc0){return _0x331cc0['update'](_0x5b7f77)[_0xb51c('0x21')](function(_0x5dea5c){return _0x5dea5c;});}return null;};}function removeEntity(_0x2299fc,_0x59376a){return function(_0xf0c5ee){if(_0xf0c5ee){return _0xf0c5ee[_0xb51c('0x22')]()[_0xb51c('0x21')](function(){_0x2299fc[_0xb51c('0x16')](0xcc)['end']();});}};}function handleEntityNotFound(_0x2b221e,_0x579751){return function(_0x1027e2){if(!_0x1027e2){_0x2b221e[_0xb51c('0x23')](0x194);}return _0x1027e2;};}function handleError(_0xc9a681,_0x462472){_0x462472=_0x462472||0x1f4;return function(_0x384103){logger[_0xb51c('0x24')](_0x384103['stack']);if(_0x384103[_0xb51c('0x25')]){delete _0x384103[_0xb51c('0x25')];}_0xc9a681['status'](_0x462472)[_0xb51c('0x26')](_0x384103);};}exports['index']=function(_0x39fd50,_0x3570d6){var _0x4eb1ed={},_0x578946={},_0x3e2677={'count':0x0,'rows':[]};var _0x278207=_['map'](db[_0xb51c('0x27')][_0xb51c('0x28')],function(_0x2908b5){return{'name':_0x2908b5[_0xb51c('0x29')],'type':_0x2908b5[_0xb51c('0x2a')][_0xb51c('0x2b')]};});_0x578946[_0xb51c('0x2c')]=_[_0xb51c('0x2d')](_0x278207,_0xb51c('0x25'));_0x578946[_0xb51c('0x2e')]=_['keys'](_0x39fd50[_0xb51c('0x2e')]);_0x578946[_0xb51c('0x2f')]=_[_0xb51c('0x30')](_0x578946[_0xb51c('0x2c')],_0x578946[_0xb51c('0x2e')]);_0x4eb1ed[_0xb51c('0x31')]=_[_0xb51c('0x30')](_0x578946[_0xb51c('0x2c')],qs[_0xb51c('0x32')](_0x39fd50[_0xb51c('0x2e')][_0xb51c('0x32')]));_0x4eb1ed['attributes']=_0x4eb1ed[_0xb51c('0x31')][_0xb51c('0x33')]?_0x4eb1ed[_0xb51c('0x31')]:_0x578946[_0xb51c('0x2c')];if(!_0x39fd50[_0xb51c('0x2e')][_0xb51c('0x34')](_0xb51c('0x35'))){_0x4eb1ed[_0xb51c('0x1b')]=qs['limit'](_0x39fd50['query'][_0xb51c('0x1b')]);_0x4eb1ed[_0xb51c('0x19')]=qs[_0xb51c('0x19')](_0x39fd50[_0xb51c('0x2e')][_0xb51c('0x19')]);}_0x4eb1ed[_0xb51c('0x36')]=qs[_0xb51c('0x37')](_0x39fd50[_0xb51c('0x2e')][_0xb51c('0x37')]);_0x4eb1ed[_0xb51c('0x38')]=qs[_0xb51c('0x2f')](_['pick'](_0x39fd50[_0xb51c('0x2e')],_0x578946[_0xb51c('0x2f')]),_0x278207);if(_0x39fd50[_0xb51c('0x2e')][_0xb51c('0x39')]){_0x4eb1ed[_0xb51c('0x38')]=_['merge'](_0x4eb1ed[_0xb51c('0x38')],{'$or':_['map'](_0x278207,function(_0x46b4af){if(_0x46b4af[_0xb51c('0x2a')]!==_0xb51c('0x3a')){var _0x3a1449={};_0x3a1449[_0x46b4af[_0xb51c('0x25')]]={'$like':'%'+_0x39fd50[_0xb51c('0x2e')]['filter']+'%'};return _0x3a1449;}})});}_0x4eb1ed=_['merge']({},_0x4eb1ed,_0x39fd50[_0xb51c('0x3b')]);var _0x42c8cf={'where':_0x4eb1ed['where']};return db[_0xb51c('0x27')][_0xb51c('0x1c')](_0x42c8cf)[_0xb51c('0x21')](function(_0x5cb0ea){_0x3e2677[_0xb51c('0x1c')]=_0x5cb0ea;if(_0x39fd50[_0xb51c('0x2e')]['includeAll']){_0x4eb1ed['include']=[{'all':!![]}];}return db['ChatTransferReport'][_0xb51c('0x3c')](_0x4eb1ed);})[_0xb51c('0x21')](function(_0x2b7547){_0x3e2677[_0xb51c('0x3d')]=_0x2b7547;return _0x3e2677;})[_0xb51c('0x21')](respondWithFilteredResult(_0x3570d6,_0x4eb1ed))[_0xb51c('0x3e')](handleError(_0x3570d6,null));};exports[_0xb51c('0x3f')]=function(_0xaafda8,_0x2dd3ba){var _0x1001a4={'raw':!![],'where':{'id':_0xaafda8['params']['id']}},_0x1f9681={};_0x1f9681[_0xb51c('0x2c')]=_['keys'](db[_0xb51c('0x27')][_0xb51c('0x28')]);_0x1f9681[_0xb51c('0x2e')]=_[_0xb51c('0x40')](_0xaafda8[_0xb51c('0x2e')]);_0x1f9681['filters']=_['intersection'](_0x1f9681['model'],_0x1f9681[_0xb51c('0x2e')]);_0x1001a4[_0xb51c('0x31')]=_[_0xb51c('0x30')](_0x1f9681[_0xb51c('0x2c')],qs['fields'](_0xaafda8[_0xb51c('0x2e')][_0xb51c('0x32')]));_0x1001a4[_0xb51c('0x31')]=_0x1001a4['attributes'][_0xb51c('0x33')]?_0x1001a4[_0xb51c('0x31')]:_0x1f9681[_0xb51c('0x2c')];if(_0xaafda8[_0xb51c('0x2e')]['includeAll']){_0x1001a4['include']=[{'all':!![]}];}_0x1001a4=_['merge']({},_0x1001a4,_0xaafda8['options']);return db['ChatTransferReport'][_0xb51c('0x41')](_0x1001a4)[_0xb51c('0x21')](handleEntityNotFound(_0x2dd3ba,null))['then'](respondWithResult(_0x2dd3ba,null))[_0xb51c('0x3e')](handleError(_0x2dd3ba,null));};exports[_0xb51c('0x42')]=function(_0xb676a6,_0x33d318){return db[_0xb51c('0x27')]['create'](_0xb676a6['body'],{})['then'](respondWithResult(_0x33d318,0xc9))['catch'](handleError(_0x33d318,null));};exports[_0xb51c('0x43')]=function(_0x481719,_0x28cf09){if(_0x481719[_0xb51c('0x44')]['id']){delete _0x481719[_0xb51c('0x44')]['id'];}return db['ChatTransferReport'][_0xb51c('0x41')]({'where':{'id':_0x481719[_0xb51c('0x45')]['id']}})[_0xb51c('0x21')](handleEntityNotFound(_0x28cf09,null))['then'](saveUpdates(_0x481719['body'],null))[_0xb51c('0x21')](respondWithResult(_0x28cf09,null))[_0xb51c('0x3e')](handleError(_0x28cf09,null));};exports[_0xb51c('0x22')]=function(_0x185c80,_0x38f690){return db[_0xb51c('0x27')][_0xb51c('0x41')]({'where':{'id':_0x185c80['params']['id']}})['then'](handleEntityNotFound(_0x38f690,null))[_0xb51c('0x21')](removeEntity(_0x38f690,null))[_0xb51c('0x3e')](handleError(_0x38f690,null));};exports['describe']=function(_0x5894bb,_0x5482ae){return db[_0xb51c('0x27')][_0xb51c('0x46')]()[_0xb51c('0x21')](respondWithResult(_0x5482ae,null))[_0xb51c('0x3e')](handleError(_0x5482ae,null));}; \ No newline at end of file +var _0x7ac6=['create','body','describe','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','mustache','util','path','sox','to-csv','fs-extra','crypto','jsforce','desk.js','papaparse','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/util','../../mysqldb','status','end','json','offset','undefined','limit','count','set','Content-Range','apply','reject','save','update','then','destroy','sendStatus','error','stack','name','index','ChatTransferReport','rawAttributes','fieldName','model','query','keys','intersection','fields','attributes','length','hasOwnProperty','nolimit','order','sort','where','filters','pick','filter','merge','map','type','VIRTUAL','options','includeAll','include','rows','catch','show','params','find'];(function(_0x24259d,_0x64a194){var _0x5a701=function(_0x204516){while(--_0x204516){_0x24259d['push'](_0x24259d['shift']());}};_0x5a701(++_0x64a194);}(_0x7ac6,0x12b));var _0x67ac=function(_0x286c46,_0xb5c3d4){_0x286c46=_0x286c46-0x0;var _0x23aea8=_0x7ac6[_0x286c46];return _0x23aea8;};'use strict';var emlformat=require(_0x67ac('0x0'));var rimraf=require(_0x67ac('0x1'));var zipdir=require(_0x67ac('0x2'));var jsonpatch=require(_0x67ac('0x3'));var rp=require(_0x67ac('0x4'));var moment=require(_0x67ac('0x5'));var BPromise=require('bluebird');var Mustache=require(_0x67ac('0x6'));var util=require(_0x67ac('0x7'));var path=require(_0x67ac('0x8'));var sox=require(_0x67ac('0x9'));var csv=require(_0x67ac('0xa'));var ejs=require('ejs');var fs=require('fs');var fs_extra=require(_0x67ac('0xb'));var _=require('lodash');var squel=require('squel');var crypto=require(_0x67ac('0xc'));var jsforce=require(_0x67ac('0xd'));var deskjs=require(_0x67ac('0xe'));var toCsv=require('to-csv');var querystring=require('querystring');var Papa=require(_0x67ac('0xf'));var Redis=require('ioredis');var authService=require(_0x67ac('0x10'));var qs=require(_0x67ac('0x11'));var as=require(_0x67ac('0x12'));var hardwareService=require('../../config/license/hardware');var logger=require('../../config/logger')('api');var utils=require('../../config/utils');var config=require('../../config/environment');var licenseUtil=require(_0x67ac('0x13'));var db=require(_0x67ac('0x14'))['db'];function respondWithStatusCode(_0x1da9c5,_0xc0da50){_0xc0da50=_0xc0da50||0xcc;return function(_0x55a73a){if(_0x55a73a){return _0x1da9c5['sendStatus'](_0xc0da50);}return _0x1da9c5[_0x67ac('0x15')](_0xc0da50)[_0x67ac('0x16')]();};}function respondWithResult(_0x3e9fd8,_0x50ffb1){_0x50ffb1=_0x50ffb1||0xc8;return function(_0x1c1fef){if(_0x1c1fef){return _0x3e9fd8[_0x67ac('0x15')](_0x50ffb1)[_0x67ac('0x17')](_0x1c1fef);}};}function respondWithFilteredResult(_0x1bbb02,_0x498285){return function(_0x57cb86){if(_0x57cb86){var _0x18d56e=typeof _0x498285[_0x67ac('0x18')]===_0x67ac('0x19')&&typeof _0x498285[_0x67ac('0x1a')]===_0x67ac('0x19');var _0x4de926=_0x57cb86[_0x67ac('0x1b')];var _0x39606e=_0x18d56e?0x0:_0x498285[_0x67ac('0x18')];var _0x13bc2a=_0x18d56e?_0x57cb86[_0x67ac('0x1b')]:_0x498285[_0x67ac('0x18')]+_0x498285[_0x67ac('0x1a')];var _0x48dcb5;if(_0x13bc2a>=_0x4de926){_0x13bc2a=_0x4de926;_0x48dcb5=0xc8;}else{_0x48dcb5=0xce;}_0x1bbb02[_0x67ac('0x15')](_0x48dcb5);return _0x1bbb02[_0x67ac('0x1c')](_0x67ac('0x1d'),_0x39606e+'-'+_0x13bc2a+'/'+_0x4de926)[_0x67ac('0x17')](_0x57cb86);}return null;};}function patchUpdates(_0x8211f8){return function(_0xa87505){try{jsonpatch[_0x67ac('0x1e')](_0xa87505,_0x8211f8,!![]);}catch(_0x4864e6){return BPromise[_0x67ac('0x1f')](_0x4864e6);}return _0xa87505[_0x67ac('0x20')]();};}function saveUpdates(_0x178e20,_0x418072){return function(_0x53d511){if(_0x53d511){return _0x53d511[_0x67ac('0x21')](_0x178e20)[_0x67ac('0x22')](function(_0x4fbf28){return _0x4fbf28;});}return null;};}function removeEntity(_0x16be6c,_0x4fa2d7){return function(_0x37d65c){if(_0x37d65c){return _0x37d65c[_0x67ac('0x23')]()['then'](function(){_0x16be6c[_0x67ac('0x15')](0xcc)[_0x67ac('0x16')]();});}};}function handleEntityNotFound(_0x2d38ac,_0x4108d1){return function(_0x5165fa){if(!_0x5165fa){_0x2d38ac[_0x67ac('0x24')](0x194);}return _0x5165fa;};}function handleError(_0x1fd1fb,_0x2d8580){_0x2d8580=_0x2d8580||0x1f4;return function(_0x36123f){logger[_0x67ac('0x25')](_0x36123f[_0x67ac('0x26')]);if(_0x36123f[_0x67ac('0x27')]){delete _0x36123f[_0x67ac('0x27')];}_0x1fd1fb[_0x67ac('0x15')](_0x2d8580)['send'](_0x36123f);};}exports[_0x67ac('0x28')]=function(_0x24498e,_0x4082a5){var _0x422c89={},_0x5cba4f={},_0x318feb={'count':0x0,'rows':[]};var _0x201ab3=_['map'](db[_0x67ac('0x29')][_0x67ac('0x2a')],function(_0x5335c7){return{'name':_0x5335c7[_0x67ac('0x2b')],'type':_0x5335c7['type']['key']};});_0x5cba4f[_0x67ac('0x2c')]=_['map'](_0x201ab3,_0x67ac('0x27'));_0x5cba4f[_0x67ac('0x2d')]=_[_0x67ac('0x2e')](_0x24498e[_0x67ac('0x2d')]);_0x5cba4f['filters']=_[_0x67ac('0x2f')](_0x5cba4f['model'],_0x5cba4f[_0x67ac('0x2d')]);_0x422c89['attributes']=_[_0x67ac('0x2f')](_0x5cba4f[_0x67ac('0x2c')],qs[_0x67ac('0x30')](_0x24498e[_0x67ac('0x2d')][_0x67ac('0x30')]));_0x422c89['attributes']=_0x422c89[_0x67ac('0x31')][_0x67ac('0x32')]?_0x422c89[_0x67ac('0x31')]:_0x5cba4f[_0x67ac('0x2c')];if(!_0x24498e['query'][_0x67ac('0x33')](_0x67ac('0x34'))){_0x422c89[_0x67ac('0x1a')]=qs['limit'](_0x24498e[_0x67ac('0x2d')]['limit']);_0x422c89['offset']=qs[_0x67ac('0x18')](_0x24498e[_0x67ac('0x2d')]['offset']);}_0x422c89[_0x67ac('0x35')]=qs['sort'](_0x24498e[_0x67ac('0x2d')][_0x67ac('0x36')]);_0x422c89[_0x67ac('0x37')]=qs[_0x67ac('0x38')](_[_0x67ac('0x39')](_0x24498e[_0x67ac('0x2d')],_0x5cba4f[_0x67ac('0x38')]),_0x201ab3);if(_0x24498e[_0x67ac('0x2d')][_0x67ac('0x3a')]){_0x422c89['where']=_[_0x67ac('0x3b')](_0x422c89[_0x67ac('0x37')],{'$or':_[_0x67ac('0x3c')](_0x201ab3,function(_0x175ef3){if(_0x175ef3[_0x67ac('0x3d')]!==_0x67ac('0x3e')){var _0xdcb0fe={};_0xdcb0fe[_0x175ef3[_0x67ac('0x27')]]={'$like':'%'+_0x24498e['query'][_0x67ac('0x3a')]+'%'};return _0xdcb0fe;}})});}_0x422c89=_[_0x67ac('0x3b')]({},_0x422c89,_0x24498e[_0x67ac('0x3f')]);var _0x74369={'where':_0x422c89[_0x67ac('0x37')]};return db['ChatTransferReport']['count'](_0x74369)[_0x67ac('0x22')](function(_0xde1b59){_0x318feb[_0x67ac('0x1b')]=_0xde1b59;if(_0x24498e[_0x67ac('0x2d')][_0x67ac('0x40')]){_0x422c89[_0x67ac('0x41')]=[{'all':!![]}];}return db[_0x67ac('0x29')]['findAll'](_0x422c89);})['then'](function(_0x44fde4){_0x318feb[_0x67ac('0x42')]=_0x44fde4;return _0x318feb;})[_0x67ac('0x22')](respondWithFilteredResult(_0x4082a5,_0x422c89))[_0x67ac('0x43')](handleError(_0x4082a5,null));};exports[_0x67ac('0x44')]=function(_0x3ddf3b,_0x573822){var _0x42c542={'raw':!![],'where':{'id':_0x3ddf3b[_0x67ac('0x45')]['id']}},_0x9fc472={};_0x9fc472[_0x67ac('0x2c')]=_[_0x67ac('0x2e')](db['ChatTransferReport']['rawAttributes']);_0x9fc472['query']=_[_0x67ac('0x2e')](_0x3ddf3b['query']);_0x9fc472[_0x67ac('0x38')]=_[_0x67ac('0x2f')](_0x9fc472[_0x67ac('0x2c')],_0x9fc472[_0x67ac('0x2d')]);_0x42c542[_0x67ac('0x31')]=_[_0x67ac('0x2f')](_0x9fc472['model'],qs[_0x67ac('0x30')](_0x3ddf3b[_0x67ac('0x2d')][_0x67ac('0x30')]));_0x42c542[_0x67ac('0x31')]=_0x42c542[_0x67ac('0x31')][_0x67ac('0x32')]?_0x42c542[_0x67ac('0x31')]:_0x9fc472['model'];if(_0x3ddf3b[_0x67ac('0x2d')][_0x67ac('0x40')]){_0x42c542[_0x67ac('0x41')]=[{'all':!![]}];}_0x42c542=_[_0x67ac('0x3b')]({},_0x42c542,_0x3ddf3b['options']);return db[_0x67ac('0x29')][_0x67ac('0x46')](_0x42c542)[_0x67ac('0x22')](handleEntityNotFound(_0x573822,null))[_0x67ac('0x22')](respondWithResult(_0x573822,null))[_0x67ac('0x43')](handleError(_0x573822,null));};exports[_0x67ac('0x47')]=function(_0x1c0ccd,_0x2d1e0a){return db['ChatTransferReport'][_0x67ac('0x47')](_0x1c0ccd['body'],{})['then'](respondWithResult(_0x2d1e0a,0xc9))['catch'](handleError(_0x2d1e0a,null));};exports[_0x67ac('0x21')]=function(_0x14ce60,_0x2661cb){if(_0x14ce60[_0x67ac('0x48')]['id']){delete _0x14ce60[_0x67ac('0x48')]['id'];}return db[_0x67ac('0x29')][_0x67ac('0x46')]({'where':{'id':_0x14ce60[_0x67ac('0x45')]['id']}})[_0x67ac('0x22')](handleEntityNotFound(_0x2661cb,null))[_0x67ac('0x22')](saveUpdates(_0x14ce60[_0x67ac('0x48')],null))[_0x67ac('0x22')](respondWithResult(_0x2661cb,null))[_0x67ac('0x43')](handleError(_0x2661cb,null));};exports[_0x67ac('0x23')]=function(_0x23ce62,_0x3b1bf5){return db[_0x67ac('0x29')][_0x67ac('0x46')]({'where':{'id':_0x23ce62[_0x67ac('0x45')]['id']}})[_0x67ac('0x22')](handleEntityNotFound(_0x3b1bf5,null))[_0x67ac('0x22')](removeEntity(_0x3b1bf5,null))[_0x67ac('0x43')](handleError(_0x3b1bf5,null));};exports[_0x67ac('0x49')]=function(_0x3832dd,_0x192d65){return db[_0x67ac('0x29')][_0x67ac('0x49')]()[_0x67ac('0x22')](respondWithResult(_0x192d65,null))['catch'](handleError(_0x192d65,null));}; \ No newline at end of file diff --git a/server/api/chatTransferReport/chatTransferReport.model.js b/server/api/chatTransferReport/chatTransferReport.model.js index 6ea4e1b..8f588fa 100644 --- a/server/api/chatTransferReport/chatTransferReport.model.js +++ b/server/api/chatTransferReport/chatTransferReport.model.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x75e0=['moment','bluebird','request-promise','path','rimraf','../../config/environment','./chatTransferReport.attributes','exports','define','report_chat_transfer','uniqueid','lodash','util','api'];(function(_0x4f54bd,_0x28c355){var _0x5ae32c=function(_0x288b9d){while(--_0x288b9d){_0x4f54bd['push'](_0x4f54bd['shift']());}};_0x5ae32c(++_0x28c355);}(_0x75e0,0x169));var _0x075e=function(_0x25a0dd,_0x14f59b){_0x25a0dd=_0x25a0dd-0x0;var _0x57d517=_0x75e0[_0x25a0dd];return _0x57d517;};'use strict';var _=require(_0x075e('0x0'));var util=require(_0x075e('0x1'));var logger=require('../../config/logger')(_0x075e('0x2'));var moment=require(_0x075e('0x3'));var BPromise=require(_0x075e('0x4'));var rp=require(_0x075e('0x5'));var fs=require('fs');var path=require(_0x075e('0x6'));var rimraf=require(_0x075e('0x7'));var config=require(_0x075e('0x8'));var attributes=require(_0x075e('0x9'));module[_0x075e('0xa')]=function(_0x463010,_0x388230){return _0x463010[_0x075e('0xb')]('ChatTransferReport',attributes,{'tableName':_0x075e('0xc'),'paranoid':![],'indexes':[{'name':_0x075e('0xd'),'fields':[_0x075e('0xd')]}],'timestamps':!![]});}; \ No newline at end of file +var _0xb3ab=['define','report_chat_transfer','uniqueid','util','../../config/logger','api','moment','bluebird','request-promise','../../config/environment'];(function(_0x5815af,_0x361f0b){var _0x3f14cb=function(_0x422c47){while(--_0x422c47){_0x5815af['push'](_0x5815af['shift']());}};_0x3f14cb(++_0x361f0b);}(_0xb3ab,0x157));var _0xbb3a=function(_0x7ad6cb,_0xffee6c){_0x7ad6cb=_0x7ad6cb-0x0;var _0x22a0ba=_0xb3ab[_0x7ad6cb];return _0x22a0ba;};'use strict';var _=require('lodash');var util=require(_0xbb3a('0x0'));var logger=require(_0xbb3a('0x1'))(_0xbb3a('0x2'));var moment=require(_0xbb3a('0x3'));var BPromise=require(_0xbb3a('0x4'));var rp=require(_0xbb3a('0x5'));var fs=require('fs');var path=require('path');var rimraf=require('rimraf');var config=require(_0xbb3a('0x6'));var attributes=require('./chatTransferReport.attributes');module['exports']=function(_0x1ca776,_0x26c95a){return _0x1ca776[_0xbb3a('0x7')]('ChatTransferReport',attributes,{'tableName':_0xbb3a('0x8'),'paranoid':![],'indexes':[{'name':_0xbb3a('0x9'),'fields':[_0xbb3a('0x9')]}],'timestamps':!![]});}; \ No newline at end of file diff --git a/server/api/chatTransferReport/chatTransferReport.rpc.js b/server/api/chatTransferReport/chatTransferReport.rpc.js index 7d78fb7..beae90d 100644 --- a/server/api/chatTransferReport/chatTransferReport.rpc.js +++ b/server/api/chatTransferReport/chatTransferReport.rpc.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x43e1=['ChatTransferReport,\x20%s,\x20%s,\x20%s','error','code','message','lodash','util','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','info','ChatTransferReport,\x20%s,\x20%s','request\x20sent','debug'];(function(_0x3a3951,_0x107c48){var _0x5d4b67=function(_0x37abc7){while(--_0x37abc7){_0x3a3951['push'](_0x3a3951['shift']());}};_0x5d4b67(++_0x107c48);}(_0x43e1,0x169));var _0x143e=function(_0x53cf8e,_0x3d290f){_0x53cf8e=_0x53cf8e-0x0;var _0x459197=_0x43e1[_0x53cf8e];return _0x459197;};'use strict';var _=require(_0x143e('0x0'));var util=require(_0x143e('0x1'));var moment=require('moment');var BPromise=require(_0x143e('0x2'));var rs=require(_0x143e('0x3'));var fs=require('fs');var Redis=require(_0x143e('0x4'));var db=require(_0x143e('0x5'))['db'];var utils=require(_0x143e('0x6'));var logger=require(_0x143e('0x7'))(_0x143e('0x8'));var config=require(_0x143e('0x9'));var jayson=require(_0x143e('0xa'));var client=jayson[_0x143e('0xb')][_0x143e('0xc')]({'port':0x232a});function respondWithRpcPromise(_0xf01ecb,_0x1621d9,_0x1ad59b){return new BPromise(function(_0x43f689,_0xa9bb28){return client['request'](_0xf01ecb,_0x1ad59b)['then'](function(_0x97181){logger[_0x143e('0xd')](_0x143e('0xe'),_0x1621d9,_0x143e('0xf'));logger[_0x143e('0x10')](_0x143e('0x11'),_0x1621d9,_0x143e('0xf'),JSON['stringify'](_0x97181));if(_0x97181[_0x143e('0x12')]){if(_0x97181[_0x143e('0x12')][_0x143e('0x13')]===0x1f4){logger['error']('ChatTransferReport,\x20%s,\x20%s',_0x1621d9,_0x97181[_0x143e('0x12')][_0x143e('0x14')]);return _0xa9bb28(_0x97181[_0x143e('0x12')][_0x143e('0x14')]);}logger[_0x143e('0x12')](_0x143e('0xe'),_0x1621d9,_0x97181[_0x143e('0x12')][_0x143e('0x14')]);return _0x43f689(_0x97181[_0x143e('0x12')][_0x143e('0x14')]);}else{logger[_0x143e('0xd')]('ChatTransferReport,\x20%s,\x20%s',_0x1621d9,_0x143e('0xf'));_0x43f689(_0x97181['result']['message']);}})['catch'](function(_0x35500e){logger[_0x143e('0x12')](_0x143e('0xe'),_0x1621d9,_0x35500e);_0xa9bb28(_0x35500e);});});} \ No newline at end of file +var _0xa1f6=['../../config/logger','rpc','../../config/environment','client','http','then','request\x20sent','ChatTransferReport,\x20%s,\x20%s,\x20%s','error','code','ChatTransferReport,\x20%s,\x20%s','message','result','catch','util','moment','bluebird','ioredis','../../mysqldb','../../config/utils'];(function(_0x5a317d,_0x2d8ec5){var _0x175cc0=function(_0x5d462f){while(--_0x5d462f){_0x5a317d['push'](_0x5a317d['shift']());}};_0x175cc0(++_0x2d8ec5);}(_0xa1f6,0x1ee));var _0x6a1f=function(_0x3ab928,_0x2b990b){_0x3ab928=_0x3ab928-0x0;var _0xf47692=_0xa1f6[_0x3ab928];return _0xf47692;};'use strict';var _=require('lodash');var util=require(_0x6a1f('0x0'));var moment=require(_0x6a1f('0x1'));var BPromise=require(_0x6a1f('0x2'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x6a1f('0x3'));var db=require(_0x6a1f('0x4'))['db'];var utils=require(_0x6a1f('0x5'));var logger=require(_0x6a1f('0x6'))(_0x6a1f('0x7'));var config=require(_0x6a1f('0x8'));var jayson=require('jayson/promise');var client=jayson[_0x6a1f('0x9')][_0x6a1f('0xa')]({'port':0x232a});function respondWithRpcPromise(_0xfeabbf,_0x4ad9be,_0x58f995){return new BPromise(function(_0x3ec1f9,_0xb88f1a){return client['request'](_0xfeabbf,_0x58f995)[_0x6a1f('0xb')](function(_0x43990c){logger['info']('ChatTransferReport,\x20%s,\x20%s',_0x4ad9be,_0x6a1f('0xc'));logger['debug'](_0x6a1f('0xd'),_0x4ad9be,_0x6a1f('0xc'),JSON['stringify'](_0x43990c));if(_0x43990c[_0x6a1f('0xe')]){if(_0x43990c[_0x6a1f('0xe')][_0x6a1f('0xf')]===0x1f4){logger[_0x6a1f('0xe')](_0x6a1f('0x10'),_0x4ad9be,_0x43990c[_0x6a1f('0xe')][_0x6a1f('0x11')]);return _0xb88f1a(_0x43990c[_0x6a1f('0xe')]['message']);}logger['error'](_0x6a1f('0x10'),_0x4ad9be,_0x43990c[_0x6a1f('0xe')][_0x6a1f('0x11')]);return _0x3ec1f9(_0x43990c['error'][_0x6a1f('0x11')]);}else{logger['info']('ChatTransferReport,\x20%s,\x20%s',_0x4ad9be,'request\x20sent');_0x3ec1f9(_0x43990c[_0x6a1f('0x12')][_0x6a1f('0x11')]);}})[_0x6a1f('0x13')](function(_0x21740b){logger['error'](_0x6a1f('0x10'),_0x4ad9be,_0x21740b);_0xb88f1a(_0x21740b);});});} \ No newline at end of file diff --git a/server/api/chatTransferReport/index.js b/server/api/chatTransferReport/index.js index 3f1e28e..55b1978 100644 --- a/server/api/chatTransferReport/index.js +++ b/server/api/chatTransferReport/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xa401=['create','/:id','delete','exports','multer','util','path','connect-timeout','express','Router','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','./chatTransferReport.controller','get','isAuthenticated','/describe','describe'];(function(_0x4fba1b,_0x1d859c){var _0x525db7=function(_0x2f6cb0){while(--_0x2f6cb0){_0x4fba1b['push'](_0x4fba1b['shift']());}};_0x525db7(++_0x1d859c);}(_0xa401,0xfb));var _0x1a40=function(_0x4515ef,_0x1bf2fb){_0x4515ef=_0x4515ef-0x0;var _0x76d1f8=_0xa401[_0x4515ef];return _0x76d1f8;};'use strict';var multer=require(_0x1a40('0x0'));var util=require(_0x1a40('0x1'));var path=require(_0x1a40('0x2'));var timeout=require(_0x1a40('0x3'));var express=require(_0x1a40('0x4'));var router=express[_0x1a40('0x5')]();var fs_extra=require(_0x1a40('0x6'));var auth=require(_0x1a40('0x7'));var interaction=require(_0x1a40('0x8'));var config=require(_0x1a40('0x9'));var controller=require(_0x1a40('0xa'));router[_0x1a40('0xb')]('/',auth[_0x1a40('0xc')](),controller['index']);router[_0x1a40('0xb')](_0x1a40('0xd'),auth[_0x1a40('0xc')](),controller[_0x1a40('0xe')]);router[_0x1a40('0xb')]('/:id',auth[_0x1a40('0xc')](),controller['show']);router['post']('/',auth[_0x1a40('0xc')](),controller[_0x1a40('0xf')]);router['put'](_0x1a40('0x10'),auth[_0x1a40('0xc')](),controller['update']);router[_0x1a40('0x11')](_0x1a40('0x10'),auth[_0x1a40('0xc')](),controller['destroy']);module[_0x1a40('0x12')]=router; \ No newline at end of file +var _0x2a80=['/:id','show','post','create','delete','destroy','exports','multer','util','path','connect-timeout','express','../../components/interaction/service','../../config/environment','./chatTransferReport.controller','isAuthenticated','index','get','/describe','describe'];(function(_0x27abb9,_0x14fa53){var _0xffe6fe=function(_0x27afc0){while(--_0x27afc0){_0x27abb9['push'](_0x27abb9['shift']());}};_0xffe6fe(++_0x14fa53);}(_0x2a80,0x1bf));var _0x02a8=function(_0x448aac,_0xdfd05){_0x448aac=_0x448aac-0x0;var _0x2fbe8f=_0x2a80[_0x448aac];return _0x2fbe8f;};'use strict';var multer=require(_0x02a8('0x0'));var util=require(_0x02a8('0x1'));var path=require(_0x02a8('0x2'));var timeout=require(_0x02a8('0x3'));var express=require(_0x02a8('0x4'));var router=express['Router']();var fs_extra=require('fs-extra');var auth=require('../../components/auth/service');var interaction=require(_0x02a8('0x5'));var config=require(_0x02a8('0x6'));var controller=require(_0x02a8('0x7'));router['get']('/',auth[_0x02a8('0x8')](),controller[_0x02a8('0x9')]);router[_0x02a8('0xa')](_0x02a8('0xb'),auth[_0x02a8('0x8')](),controller[_0x02a8('0xc')]);router['get'](_0x02a8('0xd'),auth['isAuthenticated'](),controller[_0x02a8('0xe')]);router[_0x02a8('0xf')]('/',auth[_0x02a8('0x8')](),controller[_0x02a8('0x10')]);router['put'](_0x02a8('0xd'),auth[_0x02a8('0x8')](),controller['update']);router[_0x02a8('0x11')](_0x02a8('0xd'),auth[_0x02a8('0x8')](),controller[_0x02a8('0x12')]);module[_0x02a8('0x13')]=router; \ No newline at end of file diff --git a/server/api/chatWebsite/chatWebsite.attributes.js b/server/api/chatWebsite/chatWebsite.attributes.js index 6155688..e27e1d8 100644 --- a/server/api/chatWebsite/chatWebsite.attributes.js +++ b/server/api/chatWebsite/chatWebsite.attributes.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x6f7a=['Please\x20hold\x20and\x20we\x20will\x20answer\x20your\x20request\x20as\x20soon\x20as\x20possible.','You\x20received\x20a\x20new\x20offline\x20message\x20from\x20websiteName.\x20Here\x20you\x20can\x20find\x20the\x20details\x20of\x20the\x20request:','Your\x20request\x20has\x20not\x20been\x20processed.','Skip','website_alias','bottom_right','alternate','#fafafa','System','Status\x20to\x20put\x20when\x20mandatory\x20disposition\x20is\x20enabled','Enabled/disables\x20mandatory\x20dispo\x20on\x20a\x20queue','mandatoryDisposition','Generated\x20by\x20XCALLY\x20Motion','Meeting\x20generated\x20for\x20interaction\x20#{{interaction.id}}\x20by\x20{{agent.name}}','sequelize','randomstring','exports','STRING','address','email','Agent','#011F6A','#ffffff','BOOLEAN','ENUM','squared','We\x20are\x20here!','Chat','Send','Contact\x20us','INTEGER','Powered\x20by\x20xCALLY','TEXT','Do\x20you\x20want\x20to\x20close\x20the\x20interaction?','Form\x20properly\x20submitted','Form\x20submission\x20error','Note','Thanks\x20you\x20for\x20your\x20time!','Feedback','star','thumb','stringify','input','onlineForm','setDataValue','Comments','Leave\x20your\x20comments','getDataValue','offlineForm','parse','generate','All\x20of\x20our\x20agents\x20are\x20busy\x20at\x20this\x20time.\x20Your\x20chat\x20is\x20very\x20important\x20to\x20us.'];(function(_0x1928c9,_0x13a6d1){var _0x51b5fb=function(_0x24cf70){while(--_0x24cf70){_0x1928c9['push'](_0x1928c9['shift']());}};_0x51b5fb(++_0x13a6d1);}(_0x6f7a,0x1ae));var _0xa6f7=function(_0x28b777,_0xff694d){_0x28b777=_0x28b777-0x0;var _0x233210=_0x6f7a[_0x28b777];return _0x233210;};'use strict';var Sequelize=require(_0xa6f7('0x0'));var rs=require(_0xa6f7('0x1'));module[_0xa6f7('0x2')]={'name':{'type':Sequelize[_0xa6f7('0x3')],'allowNull':![]},'address':{'type':Sequelize['STRING'],'allowNull':![],'unique':_0xa6f7('0x4')},'description':{'type':Sequelize[_0xa6f7('0x3')]},'mapKey':{'type':Sequelize[_0xa6f7('0x3')],'defaultValue':_0xa6f7('0x5')},'mapKeyOffline':{'type':Sequelize[_0xa6f7('0x3')],'defaultValue':_0xa6f7('0x5')},'key':{'type':Sequelize[_0xa6f7('0x3')],'allowNull':![]},'agentAlias':{'type':Sequelize[_0xa6f7('0x3')],'defaultValue':_0xa6f7('0x6')},'customerAlias':{'type':Sequelize[_0xa6f7('0x3')],'defaultValue':'Me'},'color':{'type':Sequelize[_0xa6f7('0x3')],'allowNull':![],'defaultValue':'#011F6A','validate':{'notEmpty':!![]}},'color_button':{'type':Sequelize['STRING'],'allowNull':![],'defaultValue':_0xa6f7('0x7'),'validate':{'notEmpty':!![]}},'textColor':{'type':Sequelize[_0xa6f7('0x3')],'allowNull':![],'defaultValue':_0xa6f7('0x8'),'validate':{'notEmpty':!![]}},'textButtonColor':{'type':Sequelize[_0xa6f7('0x3')],'allowNull':![],'defaultValue':_0xa6f7('0x8'),'validate':{'notEmpty':!![]}},'fontSize':{'type':Sequelize['INTEGER'],'defaultValue':0xf},'remote':{'type':Sequelize['STRING']},'animation':{'type':Sequelize[_0xa6f7('0x9')],'defaultValue':!![]},'header_shape':{'type':Sequelize[_0xa6f7('0xa')]('rounded',_0xa6f7('0xb')),'defaultValue':'rounded'},'header_online':{'type':Sequelize[_0xa6f7('0x3')],'defaultValue':_0xa6f7('0xc')},'start_chat_button':{'type':Sequelize[_0xa6f7('0x3')],'defaultValue':_0xa6f7('0xd')},'offline_chat_button':{'type':Sequelize['STRING'],'defaultValue':_0xa6f7('0xe')},'header_offline':{'type':Sequelize['STRING'],'defaultValue':_0xa6f7('0xf')},'download_transcript':{'type':Sequelize[_0xa6f7('0x9')],'defaultValue':!![]},'timeout':{'type':Sequelize[_0xa6f7('0x10')],'defaultValue':0x0},'whiteLabel':{'type':Sequelize['STRING'],'defaultValue':_0xa6f7('0x11')},'defaultWhiteLabel':{'type':Sequelize['BOOLEAN'],'defaultValue':!![]},'sitepic':{'type':Sequelize[_0xa6f7('0x12')]},'closingQuestion':{'type':Sequelize['STRING'],'defaultValue':_0xa6f7('0x13')},'formSubmitSuccessMessage':{'type':Sequelize[_0xa6f7('0x3')],'defaultValue':_0xa6f7('0x14')},'formSubmitFailureMessage':{'type':Sequelize['STRING'],'defaultValue':_0xa6f7('0x15')},'noteTitle':{'type':Sequelize[_0xa6f7('0x3')],'defaultValue':_0xa6f7('0x16')},'placeholderMessage':{'type':Sequelize[_0xa6f7('0x3')],'defaultValue':'Type\x20a\x20message'},'closingMessage':{'type':Sequelize['STRING'],'defaultValue':_0xa6f7('0x17')},'closingMessageButton':{'type':Sequelize['STRING'],'defaultValue':_0xa6f7('0xe')},'skipMessageButton':{'type':Sequelize[_0xa6f7('0x3')],'defaultValue':'Skip'},'conditionAgreement':{'type':Sequelize[_0xa6f7('0x9')],'defaultValue':![]},'enableRating':{'type':Sequelize[_0xa6f7('0x9')],'defaultValue':![]},'enableFeedback':{'type':Sequelize[_0xa6f7('0x9')],'defaultValue':![]},'enableSendButton':{'type':Sequelize[_0xa6f7('0x9')],'defaultValue':![]},'feedbackTitle':{'type':Sequelize[_0xa6f7('0x3')],'defaultValue':_0xa6f7('0x18')},'ratingType':{'type':Sequelize['ENUM'](_0xa6f7('0x19'),_0xa6f7('0x1a')),'defaultValue':'star'},'ratingStarsNumber':{'type':Sequelize['INTEGER'],'defaultValue':0x5},'onlineForm':{'type':Sequelize['TEXT'],'defaultValue':function(){return JSON[_0xa6f7('0x1b')]({'items':[{'type':_0xa6f7('0x1c'),'variable':null,'config':{'placeholder':'name','type':'text','required':!![]},'props':{'title':'name','helpText':''}},{'type':_0xa6f7('0x1c'),'props':{'title':_0xa6f7('0x5'),'helpText':''},'config':{'required':!![],'placeholder':_0xa6f7('0x5'),'type':'email'},'variable':null}],'fromKey':0x1});},'get':function(){return this['getDataValue'](_0xa6f7('0x1d'))?JSON['parse'](this['getDataValue'](_0xa6f7('0x1d'))):{};},'set':function(_0x5efdce){return this[_0xa6f7('0x1e')](_0xa6f7('0x1d'),JSON[_0xa6f7('0x1b')](_0x5efdce));}},'offlineForm':{'type':Sequelize[_0xa6f7('0x12')],'defaultValue':function(){return JSON[_0xa6f7('0x1b')]({'items':[{'type':'input','props':{'title':'email','helpText':''},'config':{'required':!![],'placeholder':_0xa6f7('0x5'),'type':_0xa6f7('0x5')},'variable':null},{'type':'textarea','config':{'placeholder':_0xa6f7('0x1f')},'props':{'title':_0xa6f7('0x1f'),'helpText':_0xa6f7('0x20')}}],'fromKey':0x0});},'get':function(){return this[_0xa6f7('0x21')](_0xa6f7('0x22'))?JSON[_0xa6f7('0x23')](this[_0xa6f7('0x21')](_0xa6f7('0x22'))):{};},'set':function(_0x57282e){return this[_0xa6f7('0x1e')](_0xa6f7('0x22'),JSON[_0xa6f7('0x1b')](_0x57282e));}},'token':{'type':Sequelize['STRING'],'defaultValue':function(){return rs[_0xa6f7('0x24')]();}},'autoclose':{'type':Sequelize[_0xa6f7('0x9')],'defaultValue':!![]},'enableCustomerWriting':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'forwardTranscript':{'type':Sequelize[_0xa6f7('0x9')],'defaultValue':![]},'forwardTranscriptMessage':{'type':Sequelize[_0xa6f7('0x3')]},'forwardOffline':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'forwardOfflineAddress':{'type':Sequelize['STRING']},'waitingTitle':{'type':Sequelize[_0xa6f7('0x3')],'defaultValue':_0xa6f7('0x25')},'waitingMessage':{'type':Sequelize[_0xa6f7('0x3')],'defaultValue':_0xa6f7('0x26')},'offlineMessageSubject':{'type':Sequelize[_0xa6f7('0x3')],'defaultValue':'New\x20offline\x20message\x20from\x20websiteName'},'offlineMessageBody':{'type':Sequelize['STRING'],'defaultValue':_0xa6f7('0x27')},'enableUnmanagedNote':{'type':Sequelize['BOOLEAN'],'defaultValue':!![]},'unmanagedMessage':{'type':Sequelize[_0xa6f7('0x3')],'defaultValue':_0xa6f7('0x28')},'skipUnmanaged':{'type':Sequelize[_0xa6f7('0x3')],'defaultValue':_0xa6f7('0x29')},'sendUnmanaged':{'type':Sequelize[_0xa6f7('0x3')],'defaultValue':_0xa6f7('0xe')},'enableCustomerAttachment':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'enableCustomerCheckmarks':{'type':Sequelize[_0xa6f7('0x9')],'defaultValue':![]},'agentAvatar':{'type':Sequelize[_0xa6f7('0x12')]},'showAgentAvatar':{'type':Sequelize[_0xa6f7('0x9')],'defaultValue':![]},'timezone':{'type':Sequelize['STRING']},'notificationTemplate':{'type':Sequelize[_0xa6f7('0x12')],'defaultValue':function(){return'Account:\x20{{account.name}}
{{#queue}}Queue:\x20{{queue.name}}
{{/queue}}From\x20:\x20{{from}}';}},'notificationSound':{'type':Sequelize[_0xa6f7('0x9')],'defaultValue':!![]},'notificationShake':{'type':Sequelize[_0xa6f7('0x9')],'defaultValue':![]},'hideWhenOffline':{'type':Sequelize[_0xa6f7('0x9')],'defaultValue':![]},'agentIdentifier':{'type':Sequelize['STRING'],'defaultValue':_0xa6f7('0x2a')},'waitForTheAssignedAgent':{'type':Sequelize[_0xa6f7('0x10')],'validate':{'min':0x1,'max':0x20c49b},'defaultValue':0xa},'alignment':{'type':Sequelize[_0xa6f7('0x3')],'defaultValue':_0xa6f7('0x2b')},'verticalAlignment':{'type':Sequelize[_0xa6f7('0x10')],'defaultValue':0x1e},'labelText':{'type':Sequelize[_0xa6f7('0x3')],'defaultValue':'CHAT'},'messagesAlignment':{'type':Sequelize[_0xa6f7('0x3')],'defaultValue':_0xa6f7('0x2c')},'defaultTitle':{'type':Sequelize[_0xa6f7('0x3')]},'customerAvatar':{'type':Sequelize[_0xa6f7('0x12')]},'showCustomerAvatar':{'type':Sequelize[_0xa6f7('0x9')],'defaultValue':![]},'messageFontSize':{'type':Sequelize[_0xa6f7('0x10')],'defaultValue':0xc},'backgroundColor':{'type':Sequelize[_0xa6f7('0x3')],'allowNull':![],'defaultValue':_0xa6f7('0x2d'),'validate':{'notEmpty':!![]}},'queueTransfer':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'queueTransferTimeout':{'type':Sequelize[_0xa6f7('0x10')],'validate':{'min':0x1,'max':0x20c49b},'defaultValue':0x12c},'agentTransfer':{'type':Sequelize[_0xa6f7('0x9')],'defaultValue':![]},'agentTransferTimeout':{'type':Sequelize[_0xa6f7('0x10')],'validate':{'min':0x1,'max':0x20c49b},'defaultValue':0x12c},'systemAlias':{'type':Sequelize['STRING'],'defaultValue':_0xa6f7('0x2e')},'systemAvatar':{'type':Sequelize[_0xa6f7('0x12')]},'mandatoryDispositionPauseId':{'type':Sequelize['INTEGER'],'comment':_0xa6f7('0x2f')},'mandatoryDisposition':{'type':Sequelize[_0xa6f7('0x9')],'defaultValue':![],'comment':_0xa6f7('0x30'),'set':function(_0x14d532){if(!_0x14d532)this[_0xa6f7('0x1e')]('mandatoryDispositionPauseId',null);this[_0xa6f7('0x1e')](_0xa6f7('0x31'),_0x14d532);}},'vidaooEscalation':{'type':Sequelize[_0xa6f7('0x9')],'defaultValue':![]},'vidaooApiKey':{'type':Sequelize[_0xa6f7('0x3')]},'vidaooTopic':{'type':Sequelize[_0xa6f7('0x3')],'allowNull':![],'defaultValue':_0xa6f7('0x32')},'vidaooNote':{'type':Sequelize[_0xa6f7('0x3')],'defaultValue':function(){return _0xa6f7('0x33');}},'vidaooMetadata':{'type':Sequelize['TEXT'],'defaultValue':null},'openNewInteraction':{'type':Sequelize['BOOLEAN'],'defaultValue':![],'allowNull':!![]},'subjectOffline':{'type':Sequelize[_0xa6f7('0x12')]}}; \ No newline at end of file +var _0xf4eb=['squared','We\x20are\x20here!','Chat','Contact\x20us','Powered\x20by\x20xCALLY','Do\x20you\x20want\x20to\x20close\x20the\x20interaction?','Form\x20submission\x20error','Note','Type\x20a\x20message','Skip','Feedback','ENUM','star','thumb','TEXT','stringify','input','text','name','getDataValue','onlineForm','textarea','Comments','Leave\x20your\x20comments','parse','offlineForm','setDataValue','generate','All\x20of\x20our\x20agents\x20are\x20busy\x20at\x20this\x20time.\x20Your\x20chat\x20is\x20very\x20important\x20to\x20us.','Your\x20request\x20has\x20not\x20been\x20processed.','Send','Account:\x20{{account.name}}
{{#queue}}Queue:\x20{{queue.name}}
{{/queue}}From\x20:\x20{{from}}','bottom_right','CHAT','alternate','#fafafa','System','Enabled/disables\x20mandatory\x20dispo\x20on\x20a\x20queue','mandatoryDisposition','Generated\x20by\x20XCALLY\x20Motion','sequelize','address','email','STRING','Agent','#011F6A','#ffffff','INTEGER','BOOLEAN'];(function(_0x3cc2fb,_0x3875df){var _0x1ceb2d=function(_0xb618c9){while(--_0xb618c9){_0x3cc2fb['push'](_0x3cc2fb['shift']());}};_0x1ceb2d(++_0x3875df);}(_0xf4eb,0xec));var _0xbf4e=function(_0x217b36,_0x35690e){_0x217b36=_0x217b36-0x0;var _0x319281=_0xf4eb[_0x217b36];return _0x319281;};'use strict';var Sequelize=require(_0xbf4e('0x0'));var rs=require('randomstring');module['exports']={'name':{'type':Sequelize['STRING'],'allowNull':![]},'address':{'type':Sequelize['STRING'],'allowNull':![],'unique':_0xbf4e('0x1')},'description':{'type':Sequelize['STRING']},'mapKey':{'type':Sequelize['STRING'],'defaultValue':_0xbf4e('0x2')},'mapKeyOffline':{'type':Sequelize[_0xbf4e('0x3')],'defaultValue':_0xbf4e('0x2')},'key':{'type':Sequelize[_0xbf4e('0x3')],'allowNull':![]},'agentAlias':{'type':Sequelize[_0xbf4e('0x3')],'defaultValue':_0xbf4e('0x4')},'customerAlias':{'type':Sequelize[_0xbf4e('0x3')],'defaultValue':'Me'},'color':{'type':Sequelize['STRING'],'allowNull':![],'defaultValue':_0xbf4e('0x5'),'validate':{'notEmpty':!![]}},'color_button':{'type':Sequelize['STRING'],'allowNull':![],'defaultValue':'#011F6A','validate':{'notEmpty':!![]}},'textColor':{'type':Sequelize[_0xbf4e('0x3')],'allowNull':![],'defaultValue':_0xbf4e('0x6'),'validate':{'notEmpty':!![]}},'textButtonColor':{'type':Sequelize[_0xbf4e('0x3')],'allowNull':![],'defaultValue':_0xbf4e('0x6'),'validate':{'notEmpty':!![]}},'fontSize':{'type':Sequelize[_0xbf4e('0x7')],'defaultValue':0xf},'remote':{'type':Sequelize[_0xbf4e('0x3')]},'animation':{'type':Sequelize[_0xbf4e('0x8')],'defaultValue':!![]},'header_shape':{'type':Sequelize['ENUM']('rounded',_0xbf4e('0x9')),'defaultValue':'rounded'},'header_online':{'type':Sequelize[_0xbf4e('0x3')],'defaultValue':_0xbf4e('0xa')},'start_chat_button':{'type':Sequelize['STRING'],'defaultValue':_0xbf4e('0xb')},'offline_chat_button':{'type':Sequelize['STRING'],'defaultValue':'Send'},'header_offline':{'type':Sequelize[_0xbf4e('0x3')],'defaultValue':_0xbf4e('0xc')},'download_transcript':{'type':Sequelize[_0xbf4e('0x8')],'defaultValue':!![]},'timeout':{'type':Sequelize[_0xbf4e('0x7')],'defaultValue':0x0},'whiteLabel':{'type':Sequelize[_0xbf4e('0x3')],'defaultValue':_0xbf4e('0xd')},'defaultWhiteLabel':{'type':Sequelize['BOOLEAN'],'defaultValue':!![]},'sitepic':{'type':Sequelize['TEXT']},'closingQuestion':{'type':Sequelize[_0xbf4e('0x3')],'defaultValue':_0xbf4e('0xe')},'formSubmitSuccessMessage':{'type':Sequelize[_0xbf4e('0x3')],'defaultValue':'Form\x20properly\x20submitted'},'formSubmitFailureMessage':{'type':Sequelize[_0xbf4e('0x3')],'defaultValue':_0xbf4e('0xf')},'noteTitle':{'type':Sequelize[_0xbf4e('0x3')],'defaultValue':_0xbf4e('0x10')},'placeholderMessage':{'type':Sequelize['STRING'],'defaultValue':_0xbf4e('0x11')},'closingMessage':{'type':Sequelize['STRING'],'defaultValue':'Thanks\x20you\x20for\x20your\x20time!'},'closingMessageButton':{'type':Sequelize['STRING'],'defaultValue':'Send'},'skipMessageButton':{'type':Sequelize[_0xbf4e('0x3')],'defaultValue':_0xbf4e('0x12')},'conditionAgreement':{'type':Sequelize[_0xbf4e('0x8')],'defaultValue':![]},'enableRating':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'enableFeedback':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'enableSendButton':{'type':Sequelize[_0xbf4e('0x8')],'defaultValue':![]},'feedbackTitle':{'type':Sequelize[_0xbf4e('0x3')],'defaultValue':_0xbf4e('0x13')},'ratingType':{'type':Sequelize[_0xbf4e('0x14')](_0xbf4e('0x15'),_0xbf4e('0x16')),'defaultValue':_0xbf4e('0x15')},'ratingStarsNumber':{'type':Sequelize[_0xbf4e('0x7')],'defaultValue':0x5},'onlineForm':{'type':Sequelize[_0xbf4e('0x17')],'defaultValue':function(){return JSON[_0xbf4e('0x18')]({'items':[{'type':_0xbf4e('0x19'),'variable':null,'config':{'placeholder':'name','type':_0xbf4e('0x1a'),'required':!![]},'props':{'title':_0xbf4e('0x1b'),'helpText':''}},{'type':'input','props':{'title':_0xbf4e('0x2'),'helpText':''},'config':{'required':!![],'placeholder':_0xbf4e('0x2'),'type':_0xbf4e('0x2')},'variable':null}],'fromKey':0x1});},'get':function(){return this[_0xbf4e('0x1c')](_0xbf4e('0x1d'))?JSON['parse'](this[_0xbf4e('0x1c')](_0xbf4e('0x1d'))):{};},'set':function(_0x3d6863){return this['setDataValue'](_0xbf4e('0x1d'),JSON['stringify'](_0x3d6863));}},'offlineForm':{'type':Sequelize['TEXT'],'defaultValue':function(){return JSON[_0xbf4e('0x18')]({'items':[{'type':'input','props':{'title':_0xbf4e('0x2'),'helpText':''},'config':{'required':!![],'placeholder':_0xbf4e('0x2'),'type':_0xbf4e('0x2')},'variable':null},{'type':_0xbf4e('0x1e'),'config':{'placeholder':'Comments'},'props':{'title':_0xbf4e('0x1f'),'helpText':_0xbf4e('0x20')}}],'fromKey':0x0});},'get':function(){return this[_0xbf4e('0x1c')]('offlineForm')?JSON[_0xbf4e('0x21')](this['getDataValue'](_0xbf4e('0x22'))):{};},'set':function(_0x1421e1){return this[_0xbf4e('0x23')]('offlineForm',JSON[_0xbf4e('0x18')](_0x1421e1));}},'token':{'type':Sequelize[_0xbf4e('0x3')],'defaultValue':function(){return rs[_0xbf4e('0x24')]();}},'autoclose':{'type':Sequelize[_0xbf4e('0x8')],'defaultValue':!![]},'enableCustomerWriting':{'type':Sequelize[_0xbf4e('0x8')],'defaultValue':![]},'forwardTranscript':{'type':Sequelize[_0xbf4e('0x8')],'defaultValue':![]},'forwardTranscriptMessage':{'type':Sequelize['STRING']},'forwardOffline':{'type':Sequelize[_0xbf4e('0x8')],'defaultValue':![]},'forwardOfflineAddress':{'type':Sequelize[_0xbf4e('0x3')]},'waitingTitle':{'type':Sequelize['STRING'],'defaultValue':_0xbf4e('0x25')},'waitingMessage':{'type':Sequelize[_0xbf4e('0x3')],'defaultValue':'Please\x20hold\x20and\x20we\x20will\x20answer\x20your\x20request\x20as\x20soon\x20as\x20possible.'},'offlineMessageSubject':{'type':Sequelize[_0xbf4e('0x3')],'defaultValue':'New\x20offline\x20message\x20from\x20websiteName'},'offlineMessageBody':{'type':Sequelize[_0xbf4e('0x3')],'defaultValue':'You\x20received\x20a\x20new\x20offline\x20message\x20from\x20websiteName.\x20Here\x20you\x20can\x20find\x20the\x20details\x20of\x20the\x20request:'},'enableUnmanagedNote':{'type':Sequelize[_0xbf4e('0x8')],'defaultValue':!![]},'unmanagedMessage':{'type':Sequelize[_0xbf4e('0x3')],'defaultValue':_0xbf4e('0x26')},'skipUnmanaged':{'type':Sequelize['STRING'],'defaultValue':_0xbf4e('0x12')},'sendUnmanaged':{'type':Sequelize[_0xbf4e('0x3')],'defaultValue':_0xbf4e('0x27')},'enableCustomerAttachment':{'type':Sequelize[_0xbf4e('0x8')],'defaultValue':![]},'enableCustomerCheckmarks':{'type':Sequelize[_0xbf4e('0x8')],'defaultValue':![]},'agentAvatar':{'type':Sequelize[_0xbf4e('0x17')]},'showAgentAvatar':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'timezone':{'type':Sequelize[_0xbf4e('0x3')]},'notificationTemplate':{'type':Sequelize[_0xbf4e('0x17')],'defaultValue':function(){return _0xbf4e('0x28');}},'notificationSound':{'type':Sequelize[_0xbf4e('0x8')],'defaultValue':!![]},'notificationShake':{'type':Sequelize[_0xbf4e('0x8')],'defaultValue':![]},'hideWhenOffline':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'agentIdentifier':{'type':Sequelize['STRING'],'defaultValue':'website_alias'},'waitForTheAssignedAgent':{'type':Sequelize['INTEGER'],'validate':{'min':0x1,'max':0x20c49b},'defaultValue':0xa},'alignment':{'type':Sequelize[_0xbf4e('0x3')],'defaultValue':_0xbf4e('0x29')},'verticalAlignment':{'type':Sequelize[_0xbf4e('0x7')],'defaultValue':0x1e},'labelText':{'type':Sequelize[_0xbf4e('0x3')],'defaultValue':_0xbf4e('0x2a')},'messagesAlignment':{'type':Sequelize[_0xbf4e('0x3')],'defaultValue':_0xbf4e('0x2b')},'defaultTitle':{'type':Sequelize[_0xbf4e('0x3')]},'customerAvatar':{'type':Sequelize[_0xbf4e('0x17')]},'showCustomerAvatar':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'messageFontSize':{'type':Sequelize['INTEGER'],'defaultValue':0xc},'backgroundColor':{'type':Sequelize[_0xbf4e('0x3')],'allowNull':![],'defaultValue':_0xbf4e('0x2c'),'validate':{'notEmpty':!![]}},'queueTransfer':{'type':Sequelize[_0xbf4e('0x8')],'defaultValue':![]},'queueTransferTimeout':{'type':Sequelize['INTEGER'],'validate':{'min':0x1,'max':0x20c49b},'defaultValue':0x12c},'agentTransfer':{'type':Sequelize[_0xbf4e('0x8')],'defaultValue':![]},'agentTransferTimeout':{'type':Sequelize['INTEGER'],'validate':{'min':0x1,'max':0x20c49b},'defaultValue':0x12c},'systemAlias':{'type':Sequelize[_0xbf4e('0x3')],'defaultValue':_0xbf4e('0x2d')},'systemAvatar':{'type':Sequelize[_0xbf4e('0x17')]},'mandatoryDispositionPauseId':{'type':Sequelize[_0xbf4e('0x7')],'comment':'Status\x20to\x20put\x20when\x20mandatory\x20disposition\x20is\x20enabled'},'mandatoryDisposition':{'type':Sequelize[_0xbf4e('0x8')],'defaultValue':![],'comment':_0xbf4e('0x2e'),'set':function(_0x3aa308){if(!_0x3aa308)this[_0xbf4e('0x23')]('mandatoryDispositionPauseId',null);this[_0xbf4e('0x23')](_0xbf4e('0x2f'),_0x3aa308);}},'vidaooEscalation':{'type':Sequelize[_0xbf4e('0x8')],'defaultValue':![]},'vidaooApiKey':{'type':Sequelize[_0xbf4e('0x3')]},'vidaooTopic':{'type':Sequelize[_0xbf4e('0x3')],'allowNull':![],'defaultValue':_0xbf4e('0x30')},'vidaooNote':{'type':Sequelize[_0xbf4e('0x3')],'defaultValue':function(){return'Meeting\x20generated\x20for\x20interaction\x20#{{interaction.id}}\x20by\x20{{agent.name}}';}},'vidaooMetadata':{'type':Sequelize[_0xbf4e('0x17')],'defaultValue':null},'openNewInteraction':{'type':Sequelize[_0xbf4e('0x8')],'defaultValue':![],'allowNull':!![]},'subjectOffline':{'type':Sequelize['TEXT']}}; \ No newline at end of file diff --git a/server/api/chatWebsite/chatWebsite.controller.js b/server/api/chatWebsite/chatWebsite.controller.js index d0db930..99fa6be 100644 --- a/server/api/chatWebsite/chatWebsite.controller.js +++ b/server/api/chatWebsite/chatWebsite.controller.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x5fb8=['server','files','attachments','offline-chat','basename','openNewInteraction','sequelize','transaction','bulkCreate','Smtp','forwardOfflineAddress','getSmtpOptions','SendMail','sendMail','\x22%s\x22\x20<%s>','offlineMessageSubject','mimetype','subjectOffline','toPairsIn','mapValues','email','Chat','MailAccountId','NotifyMailAccount','notifyMail','remove','Could\x20not\x20remove\x20attachment\x20file','addInteraction','omit','getInteractions','Owner','fullname','internal','Tag','color','tag','Command','timezone','iftime\x20%s,%s','interval','indexOf','true','OFFLINE','No\x20timezone','Interval','Intervals','../../config/license/util','virtual','increment','chatLicenseExceeded','all','some','server/files/chat/iframe.ejs','URL','remote','stringify','x-real-ip','connection','remoteAddress','replace','alignment','verticalAlignment','labelText','textColor','textButtonColor','color_button','hideWhenOffline','IntervalId','addApplications','Transaction','ISOLATION_LEVELS','READ_COMMITTED','findAndCountAll','finally','getApplications','chatProactiveAction','addProactiveActions','ChatProactiveAction','getProactiveActions','getFields','online','false','offlineForm','onlineForm','items','fromKey','Contact','addAgents','userChatWebsite:save','removeAgents','isArray','emit','userChatWebsite:remove','getAgents','mustache','path','querystring','ioredis','../../components/parsers/qs','../../config/logger','api','../../config/environment','url','../../mysqldb','redis','defaults','localhost','socket.io-emitter','./chatWebsite.socket','register','html-to-text','jayson/promise','client','http','request','then','ChatWebsite,\x20%s,\x20%s','debug','ChatWebsite,\x20%s,\x20%s,\x20%s','error','code','message','info','request\x20sent','end','status','json','offset','undefined','limit','count','set','Content-Range','destroy','get','ChatWebsites','sendStatus','stack','name','send','index','Pause','mandatoryDispositionPause','map','ChatWebsite','rawAttributes','key','model','query','keys','filters','intersection','fields','attributes','hasOwnProperty','nolimit','order','sort','where','filter','VIRTUAL','merge','options','includeAll','include','rows','length','find','catch','create','body','user','role','UserProfileSection','autoAssociation','UserProfileResource','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','update','params','describe','addDisposition','ChatWebsiteId','getDispositions','findOne','Disposition','pick','findAll','removeDispositions','ids','addAnswer','CannedAnswer','getAnswers','removeAnswers','addLogo','sitepic','file','filename','addAvatar','agentAvatar','customerAvatar','addSystemAvatar','systemAvatar','getLogo','join','root','server/files/images/logos/default_logo.svg','getLicense','custom','isNil','existsSync','server/files/images/logos/','download','server/files/images/avatars/','getCustomerAvatar','server/files/images/avatars/customer_avatar.png','showCustomerAvatar','getSystemAvatar','notify','user-agent-parser','headers','user-agent','getResult','CmContact','ValidationError','no\x20available\x20attributes','updatedAt','difference','createdAt','ListId','from','Sequelize','body\x20is\x20mandatory\x20and\x20not\x20empty','mapKey','mapKey\x20is\x20mandatory,\x20please\x20use\x20one\x20of\x20these:\x20','includes','mapKey\x20invalid,\x20please\x20use\x20one\x20of\x20these:\x20','CmList','List','DESC','ChatApplication','Applications','account','applications','list','orderBy','priority','asc','Contacts','contact','customerIp','first','x-forwarded-for','split','lastName','x-real-port','referer','browser','version','unknown','format','%s\x20%s','device','vendor','%s\x20%s\x20%s','type','threadId','ChatInteraction','externalUrl','ContactId','interaction','spread','firstName','messageId','created','autoclose','push','close','unmanaged','*,*,*,*','ChatMessage','AttachmentId','UserId','User','unshift','agent','waitForTheAssignedAgent','forcedOwnership','Start','startRouting','EventManager','offline','mapKeyOffline','mapKeyOffline\x20is\x20mandatory,\x20please\x20use\x20one\x20of\x20these:\x20','MailAccount','findOrCreate','readFileSync','render','toPairs','offlineMessageBody','ChatOfflineMessage','fromString','originalname'];(function(_0x1452b9,_0x1b7aab){var _0x515fe0=function(_0x297c36){while(--_0x297c36){_0x1452b9['push'](_0x1452b9['shift']());}};_0x515fe0(++_0x1b7aab);}(_0x5fb8,0x18c));var _0x85fb=function(_0x424cb8,_0x3d7b21){_0x424cb8=_0x424cb8-0x0;var _0x3fa6d5=_0x5fb8[_0x424cb8];return _0x3fa6d5;};'use strict';var BPromise=require('bluebird');var Mustache=require(_0x85fb('0x0'));var util=require('util');var path=require(_0x85fb('0x1'));var ejs=require('ejs');var fs=require('fs');var fs_extra=require('fs-extra');var _=require('lodash');var querystring=require(_0x85fb('0x2'));var Redis=require(_0x85fb('0x3'));var qs=require(_0x85fb('0x4'));var logger=require(_0x85fb('0x5'))(_0x85fb('0x6'));var config=require(_0x85fb('0x7'));var url=require(_0x85fb('0x8'));var db=require(_0x85fb('0x9'))['db'];config[_0x85fb('0xa')]=_[_0x85fb('0xb')](config[_0x85fb('0xa')],{'host':_0x85fb('0xc'),'port':0x18eb});var socket=require(_0x85fb('0xd'))(new Redis(config['redis']));require(_0x85fb('0xe'))[_0x85fb('0xf')](socket);var htmlToText=require(_0x85fb('0x10'));var jayson=require(_0x85fb('0x11'));var client=jayson[_0x85fb('0x12')][_0x85fb('0x13')]({'port':0x232c});var client9002=jayson['client'][_0x85fb('0x13')]({'port':0x232a});var client9003=jayson[_0x85fb('0x12')]['http']({'port':0x232b});var client9001=jayson['client']['http']({'port':0x2329});function respondWithRpcPromise(_0x146498,_0x3b831c,_0x17e398,_0x252d95){return new BPromise(function(_0x5d29ef,_0x34a974){var _0x47cb6d=_0x252d95||client;return _0x47cb6d[_0x85fb('0x14')](_0x146498,_0x17e398)[_0x85fb('0x15')](function(_0x5b6a1c){logger['info'](_0x85fb('0x16'),_0x3b831c,'request\x20sent');logger[_0x85fb('0x17')](_0x85fb('0x18'),_0x3b831c,'request\x20sent',JSON['stringify'](_0x5b6a1c));if(_0x5b6a1c[_0x85fb('0x19')]){if(_0x5b6a1c['error'][_0x85fb('0x1a')]===0x1f4){logger[_0x85fb('0x19')]('ChatWebsite,\x20%s,\x20%s',_0x3b831c,_0x5b6a1c[_0x85fb('0x19')][_0x85fb('0x1b')]);return _0x34a974(_0x5b6a1c[_0x85fb('0x19')]['message']);}logger[_0x85fb('0x19')]('ChatWebsite,\x20%s,\x20%s',_0x3b831c,_0x5b6a1c[_0x85fb('0x19')][_0x85fb('0x1b')]);return _0x5d29ef(_0x5b6a1c[_0x85fb('0x19')][_0x85fb('0x1b')]);}else{logger[_0x85fb('0x1c')]('ChatWebsite,\x20%s,\x20%s',_0x3b831c,_0x85fb('0x1d'));_0x5d29ef(_0x5b6a1c['result']['message']);}})['catch'](function(_0x3adba9){logger[_0x85fb('0x19')](_0x85fb('0x16'),_0x3b831c,_0x3adba9);_0x34a974(_0x3adba9);});});}function respondWithStatusCode(_0x45af34,_0x46f052){_0x46f052=_0x46f052||0xcc;return function(_0x1a8778){if(_0x1a8778){return _0x45af34['sendStatus'](_0x46f052);}return _0x45af34['status'](_0x46f052)[_0x85fb('0x1e')]();};}function respondWithResult(_0x514b00,_0x21a2d6){_0x21a2d6=_0x21a2d6||0xc8;return function(_0x35a6e6){if(_0x35a6e6){return _0x514b00[_0x85fb('0x1f')](_0x21a2d6)[_0x85fb('0x20')](_0x35a6e6);}};}function respondWithFilteredResult(_0xa1ff1a,_0x38a45b){return function(_0x4a2e61){if(_0x4a2e61){var _0x2d4443=typeof _0x38a45b[_0x85fb('0x21')]===_0x85fb('0x22')&&typeof _0x38a45b[_0x85fb('0x23')]===_0x85fb('0x22');var _0x5758ce=_0x4a2e61[_0x85fb('0x24')];var _0x485a0f=_0x2d4443?0x0:_0x38a45b[_0x85fb('0x21')];var _0x3b8c5b=_0x2d4443?_0x4a2e61[_0x85fb('0x24')]:_0x38a45b[_0x85fb('0x21')]+_0x38a45b[_0x85fb('0x23')];var _0x2da048;if(_0x3b8c5b>=_0x5758ce){_0x3b8c5b=_0x5758ce;_0x2da048=0xc8;}else{_0x2da048=0xce;}_0xa1ff1a[_0x85fb('0x1f')](_0x2da048);return _0xa1ff1a[_0x85fb('0x25')](_0x85fb('0x26'),_0x485a0f+'-'+_0x3b8c5b+'/'+_0x5758ce)[_0x85fb('0x20')](_0x4a2e61);}return null;};}function saveUpdates(_0x36be6e){return function(_0xaa17c7){if(_0xaa17c7){return _0xaa17c7['update'](_0x36be6e)[_0x85fb('0x15')](function(_0x331b19){return _0x331b19;});}return null;};}function removeEntity(_0x10739c){return function(_0x39a4e2){if(_0x39a4e2){return _0x39a4e2[_0x85fb('0x27')]()[_0x85fb('0x15')](function(){var _0x2d6393=_0x39a4e2[_0x85fb('0x28')]({'plain':!![]});var _0x5e9e84=_0x85fb('0x29');return db['UserProfileResource'][_0x85fb('0x27')]({'where':{'type':_0x5e9e84,'resourceId':_0x2d6393['id']}})[_0x85fb('0x15')](function(){return _0x39a4e2;});})[_0x85fb('0x15')](function(){_0x10739c[_0x85fb('0x1f')](0xcc)['end']();});}};}function handleEntityNotFound(_0x21af1b){return function(_0xc3e68a){if(!_0xc3e68a){_0x21af1b[_0x85fb('0x2a')](0x194);}return _0xc3e68a;};}function handleError(_0x342844,_0x5e669a){_0x5e669a=_0x5e669a||0x1f4;return function(_0x327f2f){logger[_0x85fb('0x19')](_0x327f2f[_0x85fb('0x2b')]);if(_0x327f2f['name']){delete _0x327f2f[_0x85fb('0x2c')];}_0x342844[_0x85fb('0x1f')](_0x5e669a)[_0x85fb('0x2d')](_0x327f2f);};}exports[_0x85fb('0x2e')]=function(_0x584d19,_0x1f4695){var _0x497c00={'include':[{'model':db[_0x85fb('0x2f')],'as':_0x85fb('0x30')}]},_0x12adca={},_0x29027c={'count':0x0,'rows':[]};var _0x4a2199=_[_0x85fb('0x31')](db[_0x85fb('0x32')][_0x85fb('0x33')],function(_0x10fa06){return{'name':_0x10fa06['fieldName'],'type':_0x10fa06['type'][_0x85fb('0x34')]};});_0x12adca[_0x85fb('0x35')]=_['map'](_0x4a2199,'name');_0x12adca[_0x85fb('0x36')]=_[_0x85fb('0x37')](_0x584d19[_0x85fb('0x36')]);_0x12adca[_0x85fb('0x38')]=_['intersection'](_0x12adca[_0x85fb('0x35')],_0x12adca[_0x85fb('0x36')]);_0x497c00['attributes']=_[_0x85fb('0x39')](_0x12adca['model'],qs[_0x85fb('0x3a')](_0x584d19[_0x85fb('0x36')][_0x85fb('0x3a')]));_0x497c00['attributes']=_0x497c00[_0x85fb('0x3b')]['length']?_0x497c00['attributes']:_0x12adca[_0x85fb('0x35')];if(!_0x584d19[_0x85fb('0x36')][_0x85fb('0x3c')](_0x85fb('0x3d'))){_0x497c00[_0x85fb('0x23')]=qs[_0x85fb('0x23')](_0x584d19[_0x85fb('0x36')][_0x85fb('0x23')]);_0x497c00[_0x85fb('0x21')]=qs[_0x85fb('0x21')](_0x584d19[_0x85fb('0x36')][_0x85fb('0x21')]);}_0x497c00[_0x85fb('0x3e')]=qs[_0x85fb('0x3f')](_0x584d19['query'][_0x85fb('0x3f')]);_0x497c00[_0x85fb('0x40')]=qs[_0x85fb('0x38')](_['pick'](_0x584d19[_0x85fb('0x36')],_0x12adca[_0x85fb('0x38')]),_0x4a2199);if(_0x584d19['query'][_0x85fb('0x41')]){_0x497c00[_0x85fb('0x40')]=_['merge'](_0x497c00[_0x85fb('0x40')],{'$or':_['map'](_0x4a2199,function(_0x157d66){if(_0x157d66['type']!==_0x85fb('0x42')){var _0x11c178={};_0x11c178[_0x157d66['name']]={'$like':'%'+_0x584d19['query']['filter']+'%'};return _0x11c178;}})});}_0x497c00=_[_0x85fb('0x43')]({},_0x497c00,_0x584d19[_0x85fb('0x44')]);var _0x27a6d4={'where':_0x497c00[_0x85fb('0x40')]};return db[_0x85fb('0x32')]['count'](_0x27a6d4)[_0x85fb('0x15')](function(_0x3ef40c){_0x29027c[_0x85fb('0x24')]=_0x3ef40c;if(_0x584d19[_0x85fb('0x36')][_0x85fb('0x45')]){_0x497c00[_0x85fb('0x46')]=[{'all':!![]}];}return db[_0x85fb('0x32')]['findAll'](_0x497c00);})[_0x85fb('0x15')](function(_0x2c75e2){_0x29027c[_0x85fb('0x47')]=_0x2c75e2;return _0x29027c;})[_0x85fb('0x15')](respondWithFilteredResult(_0x1f4695,_0x497c00))['catch'](handleError(_0x1f4695,null));};exports['show']=function(_0x42daae,_0x5aa89a){var _0x4b0dad={'raw':![],'where':{'id':_0x42daae['params']['id']},'include':[{'model':db[_0x85fb('0x2f')],'as':'mandatoryDispositionPause'}]},_0x419136={};_0x419136['model']=_['keys'](db['ChatWebsite'][_0x85fb('0x33')]);_0x419136['query']=_[_0x85fb('0x37')](_0x42daae['query']);_0x419136['filters']=_[_0x85fb('0x39')](_0x419136[_0x85fb('0x35')],_0x419136[_0x85fb('0x36')]);_0x4b0dad[_0x85fb('0x3b')]=_[_0x85fb('0x39')](_0x419136[_0x85fb('0x35')],qs[_0x85fb('0x3a')](_0x42daae[_0x85fb('0x36')][_0x85fb('0x3a')]));_0x4b0dad[_0x85fb('0x3b')]=_0x4b0dad[_0x85fb('0x3b')][_0x85fb('0x48')]?_0x4b0dad[_0x85fb('0x3b')]:_0x419136[_0x85fb('0x35')];if(_0x42daae[_0x85fb('0x36')][_0x85fb('0x45')]){_0x4b0dad[_0x85fb('0x46')]=[{'all':!![]}];}_0x4b0dad=_[_0x85fb('0x43')]({},_0x4b0dad,_0x42daae['options']);return db['ChatWebsite'][_0x85fb('0x49')](_0x4b0dad)[_0x85fb('0x15')](handleEntityNotFound(_0x5aa89a,null))[_0x85fb('0x15')](respondWithResult(_0x5aa89a,null))[_0x85fb('0x4a')](handleError(_0x5aa89a,null));};exports[_0x85fb('0x4b')]=function(_0x27c973,_0x3ce464){return db[_0x85fb('0x32')][_0x85fb('0x4b')](_0x27c973[_0x85fb('0x4c')],{})[_0x85fb('0x15')](function(_0xd1eec1){var _0x7f7424=_0x27c973[_0x85fb('0x4d')]['get']({'plain':!![]});if(!_0x7f7424)throw new Error('Unable\x20to\x20retrieve\x20the\x20current\x20user');if(_0x7f7424[_0x85fb('0x4e')]===_0x85fb('0x4d')){var _0x3773a1=_0xd1eec1[_0x85fb('0x28')]({'plain':!![]});var _0x1d4f47=_0x85fb('0x29');return db[_0x85fb('0x4f')][_0x85fb('0x49')]({'where':{'name':_0x1d4f47,'userProfileId':_0x7f7424['userProfileId']},'raw':!![]})[_0x85fb('0x15')](function(_0x595acf){if(_0x595acf&&_0x595acf[_0x85fb('0x50')]===0x0){return db[_0x85fb('0x51')][_0x85fb('0x4b')]({'name':_0x3773a1['name'],'resourceId':_0x3773a1['id'],'type':_0x595acf[_0x85fb('0x2c')],'sectionId':_0x595acf['id']},{})[_0x85fb('0x15')](function(){return _0xd1eec1;});}else{return _0xd1eec1;}})['catch'](function(_0x5ec997){logger['error'](_0x85fb('0x52'),_0x5ec997);throw _0x5ec997;});}return _0xd1eec1;})[_0x85fb('0x15')](respondWithResult(_0x3ce464,0xc9))[_0x85fb('0x4a')](handleError(_0x3ce464,null));};exports[_0x85fb('0x53')]=function(_0x3bb541,_0x5c399d){if(_0x3bb541[_0x85fb('0x4c')]['id']){delete _0x3bb541[_0x85fb('0x4c')]['id'];}return db[_0x85fb('0x32')][_0x85fb('0x49')]({'where':{'id':_0x3bb541[_0x85fb('0x54')]['id']},'include':[{'model':db[_0x85fb('0x2f')],'as':'mandatoryDispositionPause'}]})['then'](handleEntityNotFound(_0x5c399d,null))['then'](saveUpdates(_0x3bb541[_0x85fb('0x4c')],null))['then'](respondWithResult(_0x5c399d,null))[_0x85fb('0x4a')](handleError(_0x5c399d,null));};exports[_0x85fb('0x27')]=function(_0x11cc8c,_0x374cf0){return db[_0x85fb('0x32')][_0x85fb('0x49')]({'where':{'id':_0x11cc8c['params']['id']}})[_0x85fb('0x15')](handleEntityNotFound(_0x374cf0,null))[_0x85fb('0x15')](removeEntity(_0x374cf0,null))[_0x85fb('0x4a')](handleError(_0x374cf0,null));};exports[_0x85fb('0x55')]=function(_0x22b38c,_0x5d752e){return db[_0x85fb('0x32')][_0x85fb('0x55')]()[_0x85fb('0x15')](respondWithResult(_0x5d752e,null))[_0x85fb('0x4a')](handleError(_0x5d752e,null));};exports[_0x85fb('0x56')]=function(_0x2bd032,_0x1acdc4){if(_0x2bd032[_0x85fb('0x4c')]['id']){delete _0x2bd032[_0x85fb('0x4c')]['id'];}return db['ChatWebsite'][_0x85fb('0x49')]({'where':{'id':_0x2bd032[_0x85fb('0x54')]['id']}})[_0x85fb('0x15')](handleEntityNotFound(_0x1acdc4,null))[_0x85fb('0x15')](function(_0x235dce){if(_0x235dce){_0x2bd032['body'][_0x85fb('0x57')]=_0x235dce['id'];return db['Disposition']['create'](_0x2bd032[_0x85fb('0x4c')]);}})[_0x85fb('0x15')](respondWithResult(_0x1acdc4,null))['catch'](handleError(_0x1acdc4,null));};exports[_0x85fb('0x58')]=function(_0x3983de,_0x3410a5){var _0x343acd={'raw':![],'where':{}};var _0xc5e7e={};var _0x37f5a1={'count':0x0,'rows':[]};return db[_0x85fb('0x32')][_0x85fb('0x59')]({'where':{'id':_0x3983de[_0x85fb('0x54')]['id']}})['then'](handleEntityNotFound(_0x3410a5,null))[_0x85fb('0x15')](function(_0x14ce31){if(_0x14ce31){_0xc5e7e[_0x85fb('0x35')]=_[_0x85fb('0x37')](db[_0x85fb('0x5a')][_0x85fb('0x33')]);_0xc5e7e[_0x85fb('0x36')]=_[_0x85fb('0x37')](_0x3983de[_0x85fb('0x36')]);_0xc5e7e['filters']=_[_0x85fb('0x39')](_0xc5e7e[_0x85fb('0x35')],_0xc5e7e[_0x85fb('0x36')]);_0x343acd[_0x85fb('0x3b')]=_[_0x85fb('0x39')](_0xc5e7e[_0x85fb('0x35')],qs[_0x85fb('0x3a')](_0x3983de['query'][_0x85fb('0x3a')]));_0x343acd['attributes']=_0x343acd[_0x85fb('0x3b')][_0x85fb('0x48')]?_0x343acd[_0x85fb('0x3b')]:_0xc5e7e[_0x85fb('0x35')];if(!_0x3983de[_0x85fb('0x36')][_0x85fb('0x3c')](_0x85fb('0x3d'))){_0x343acd[_0x85fb('0x23')]=qs[_0x85fb('0x23')](_0x3983de[_0x85fb('0x36')][_0x85fb('0x23')]);_0x343acd[_0x85fb('0x21')]=qs[_0x85fb('0x21')](_0x3983de[_0x85fb('0x36')][_0x85fb('0x21')]);}_0x343acd[_0x85fb('0x3e')]=qs[_0x85fb('0x3f')](_0x3983de[_0x85fb('0x36')][_0x85fb('0x3f')]);_0x343acd['where']=qs[_0x85fb('0x38')](_[_0x85fb('0x5b')](_0x3983de[_0x85fb('0x36')],_0xc5e7e[_0x85fb('0x38')]));_0x343acd[_0x85fb('0x40')][_0x85fb('0x57')]=_0x14ce31['id'];if(_0x3983de[_0x85fb('0x36')][_0x85fb('0x41')]){_0x343acd[_0x85fb('0x40')]=_[_0x85fb('0x43')](_0x343acd[_0x85fb('0x40')],{'$or':_['map'](_0x343acd[_0x85fb('0x3b')],function(_0x481dca){var _0x2ce140={};_0x2ce140[_0x481dca]={'$like':'%'+_0x3983de[_0x85fb('0x36')]['filter']+'%'};return _0x2ce140;})});}_0x343acd=_[_0x85fb('0x43')]({},_0x343acd,_0x3983de[_0x85fb('0x44')]);return db['Disposition']['count']({'where':_0x343acd[_0x85fb('0x40')]})[_0x85fb('0x15')](function(_0x24a454){_0x37f5a1[_0x85fb('0x24')]=_0x24a454;if(_0x3983de[_0x85fb('0x36')][_0x85fb('0x45')]){_0x343acd[_0x85fb('0x46')]=[{'all':!![]}];}return db[_0x85fb('0x5a')][_0x85fb('0x5c')](_0x343acd);})[_0x85fb('0x15')](function(_0x127376){_0x37f5a1[_0x85fb('0x47')]=_0x127376;return _0x37f5a1;});}})[_0x85fb('0x15')](respondWithFilteredResult(_0x3410a5,_0x343acd))[_0x85fb('0x4a')](handleError(_0x3410a5,null));};exports[_0x85fb('0x5d')]=function(_0x4e3a49,_0x325482){return db['ChatWebsite'][_0x85fb('0x49')]({'where':{'id':_0x4e3a49[_0x85fb('0x54')]['id']}})[_0x85fb('0x15')](handleEntityNotFound(_0x325482,null))[_0x85fb('0x15')](function(_0x306964){if(_0x306964){return _0x306964['removeDispositions'](_0x4e3a49['query'][_0x85fb('0x5e')]);}})[_0x85fb('0x15')](respondWithStatusCode(_0x325482,null))[_0x85fb('0x4a')](handleError(_0x325482,null));};exports[_0x85fb('0x5f')]=function(_0xbf9f7c,_0x3868f0){if(_0xbf9f7c[_0x85fb('0x4c')]['id']){delete _0xbf9f7c[_0x85fb('0x4c')]['id'];}return db[_0x85fb('0x32')][_0x85fb('0x49')]({'where':{'id':_0xbf9f7c[_0x85fb('0x54')]['id']}})[_0x85fb('0x15')](handleEntityNotFound(_0x3868f0,null))['then'](function(_0x47c9c9){if(_0x47c9c9){_0xbf9f7c[_0x85fb('0x4c')][_0x85fb('0x57')]=_0x47c9c9['id'];return db[_0x85fb('0x60')][_0x85fb('0x4b')](_0xbf9f7c['body']);}})['then'](respondWithResult(_0x3868f0,null))[_0x85fb('0x4a')](handleError(_0x3868f0,null));};exports[_0x85fb('0x61')]=function(_0x273cae,_0x5e4189){var _0x370547={'raw':![],'where':{}};var _0x454607={};var _0x36dbbb={'count':0x0,'rows':[]};return db[_0x85fb('0x32')][_0x85fb('0x59')]({'where':{'id':_0x273cae[_0x85fb('0x54')]['id']}})[_0x85fb('0x15')](handleEntityNotFound(_0x5e4189,null))[_0x85fb('0x15')](function(_0x175635){if(_0x175635){_0x454607[_0x85fb('0x35')]=_['keys'](db[_0x85fb('0x60')][_0x85fb('0x33')]);_0x454607['query']=_['keys'](_0x273cae['query']);_0x454607[_0x85fb('0x38')]=_[_0x85fb('0x39')](_0x454607[_0x85fb('0x35')],_0x454607[_0x85fb('0x36')]);_0x370547['attributes']=_[_0x85fb('0x39')](_0x454607[_0x85fb('0x35')],qs['fields'](_0x273cae[_0x85fb('0x36')]['fields']));_0x370547[_0x85fb('0x3b')]=_0x370547[_0x85fb('0x3b')]['length']?_0x370547['attributes']:_0x454607['model'];if(!_0x273cae[_0x85fb('0x36')][_0x85fb('0x3c')](_0x85fb('0x3d'))){_0x370547[_0x85fb('0x23')]=qs[_0x85fb('0x23')](_0x273cae['query'][_0x85fb('0x23')]);_0x370547[_0x85fb('0x21')]=qs[_0x85fb('0x21')](_0x273cae[_0x85fb('0x36')][_0x85fb('0x21')]);}_0x370547[_0x85fb('0x3e')]=qs['sort'](_0x273cae[_0x85fb('0x36')][_0x85fb('0x3f')]);_0x370547[_0x85fb('0x40')]=qs['filters'](_[_0x85fb('0x5b')](_0x273cae['query'],_0x454607[_0x85fb('0x38')]));_0x370547[_0x85fb('0x40')][_0x85fb('0x57')]=_0x175635['id'];if(_0x273cae[_0x85fb('0x36')][_0x85fb('0x41')]){_0x370547['where']=_['merge'](_0x370547[_0x85fb('0x40')],{'$or':_[_0x85fb('0x31')](_0x370547[_0x85fb('0x3b')],function(_0x11b48d){var _0x55cc32={};_0x55cc32[_0x11b48d]={'$like':'%'+_0x273cae['query'][_0x85fb('0x41')]+'%'};return _0x55cc32;})});}_0x370547=_['merge']({},_0x370547,_0x273cae[_0x85fb('0x44')]);return db['CannedAnswer'][_0x85fb('0x24')]({'where':_0x370547['where']})[_0x85fb('0x15')](function(_0x3bef7f){_0x36dbbb[_0x85fb('0x24')]=_0x3bef7f;if(_0x273cae[_0x85fb('0x36')][_0x85fb('0x45')]){_0x370547[_0x85fb('0x46')]=[{'all':!![]}];}return db[_0x85fb('0x60')]['findAll'](_0x370547);})[_0x85fb('0x15')](function(_0x2c590e){_0x36dbbb[_0x85fb('0x47')]=_0x2c590e;return _0x36dbbb;});}})[_0x85fb('0x15')](respondWithFilteredResult(_0x5e4189,_0x370547))[_0x85fb('0x4a')](handleError(_0x5e4189,null));};exports[_0x85fb('0x62')]=function(_0x395439,_0x24d408){return db[_0x85fb('0x32')][_0x85fb('0x49')]({'where':{'id':_0x395439[_0x85fb('0x54')]['id']}})[_0x85fb('0x15')](handleEntityNotFound(_0x24d408,null))[_0x85fb('0x15')](function(_0x389eb0){if(_0x389eb0){return _0x389eb0[_0x85fb('0x62')](_0x395439[_0x85fb('0x36')][_0x85fb('0x5e')]);}})[_0x85fb('0x15')](respondWithStatusCode(_0x24d408,null))[_0x85fb('0x4a')](handleError(_0x24d408,null));};exports[_0x85fb('0x63')]=function(_0x3cb135,_0x52e0da){_0x3cb135[_0x85fb('0x4c')][_0x85fb('0x64')]=_0x3cb135[_0x85fb('0x65')][_0x85fb('0x66')];return db[_0x85fb('0x32')]['find']({'where':{'id':_0x3cb135['params']['id']}})[_0x85fb('0x15')](handleEntityNotFound(_0x52e0da,null))[_0x85fb('0x15')](saveUpdates(_0x3cb135['body'],null))[_0x85fb('0x15')](respondWithResult(_0x52e0da,null))[_0x85fb('0x4a')](handleError(_0x52e0da,null));};exports[_0x85fb('0x67')]=function(_0x3b73df,_0x34bd22){_0x3b73df['body'][_0x85fb('0x68')]=_0x3b73df[_0x85fb('0x65')][_0x85fb('0x66')];return db[_0x85fb('0x32')][_0x85fb('0x49')]({'where':{'id':_0x3b73df[_0x85fb('0x54')]['id']}})[_0x85fb('0x15')](handleEntityNotFound(_0x34bd22,null))[_0x85fb('0x15')](saveUpdates(_0x3b73df['body'],null))[_0x85fb('0x15')](respondWithResult(_0x34bd22,null))[_0x85fb('0x4a')](handleError(_0x34bd22,null));};exports['addCustomerAvatar']=function(_0x4825cc,_0x3354de){_0x4825cc[_0x85fb('0x4c')][_0x85fb('0x69')]=_0x4825cc[_0x85fb('0x65')][_0x85fb('0x66')];return db[_0x85fb('0x32')][_0x85fb('0x49')]({'where':{'id':_0x4825cc['params']['id']}})[_0x85fb('0x15')](handleEntityNotFound(_0x3354de,null))[_0x85fb('0x15')](saveUpdates(_0x4825cc[_0x85fb('0x4c')],null))['then'](respondWithResult(_0x3354de,null))[_0x85fb('0x4a')](handleError(_0x3354de,null));};exports[_0x85fb('0x6a')]=function(_0x2174f4,_0x57eb56){_0x2174f4[_0x85fb('0x4c')][_0x85fb('0x6b')]=_0x2174f4['file'][_0x85fb('0x66')];return db[_0x85fb('0x32')][_0x85fb('0x49')]({'where':{'id':_0x2174f4[_0x85fb('0x54')]['id']}})[_0x85fb('0x15')](handleEntityNotFound(_0x57eb56,null))['then'](saveUpdates(_0x2174f4[_0x85fb('0x4c')],null))[_0x85fb('0x15')](respondWithResult(_0x57eb56,null))[_0x85fb('0x4a')](handleError(_0x57eb56,null));};exports[_0x85fb('0x6c')]=function(_0x5be72b,_0x19e491){var _0x282d04=path[_0x85fb('0x6d')](config[_0x85fb('0x6e')],_0x85fb('0x6f'));var _0x29f343={'where':{'id':_0x5be72b[_0x85fb('0x54')]['id']},'attributes':['id',_0x85fb('0x64')],'raw':!![]};var _0x4edd9b=![];return require('../../config/license/util')[_0x85fb('0x70')]()[_0x85fb('0x15')](function(_0x1d204a){if(_0x1d204a){_0x4edd9b=_0x1d204a[_0x85fb('0x71')];}})['then'](function(){return db[_0x85fb('0x32')][_0x85fb('0x49')](_0x29f343);})[_0x85fb('0x15')](handleEntityNotFound(_0x19e491,null))[_0x85fb('0x15')](function(_0x2e832c){if(_0x2e832c){if(!_[_0x85fb('0x72')](_0x2e832c[_0x85fb('0x64')])){if(fs[_0x85fb('0x73')](path['join'](config['root'],_0x85fb('0x74'),_0x2e832c['sitepic']))&&_0x4edd9b){_0x282d04=path[_0x85fb('0x6d')](config['root'],_0x85fb('0x74'),_0x2e832c['sitepic']);}}return _0x19e491[_0x85fb('0x75')](_0x282d04);}})[_0x85fb('0x4a')](handleError(_0x19e491,null));};exports['getAvatar']=function(_0x389b0e,_0x26fa23){var _0x1125a2=path[_0x85fb('0x6d')](config[_0x85fb('0x6e')],'server/files/images/avatars/default_avatar.png');var _0x40084e={'where':{'id':_0x389b0e[_0x85fb('0x54')]['id']},'attributes':['id',_0x85fb('0x68')],'raw':!![]};return db['ChatWebsite']['find'](_0x40084e)['then'](handleEntityNotFound(_0x26fa23,null))[_0x85fb('0x15')](function(_0x30d376){if(_0x30d376){if(!_[_0x85fb('0x72')](_0x30d376[_0x85fb('0x68')])){if(fs['existsSync'](path[_0x85fb('0x6d')](config['root'],_0x85fb('0x76'),_0x30d376[_0x85fb('0x68')]))){_0x1125a2=path[_0x85fb('0x6d')](config[_0x85fb('0x6e')],_0x85fb('0x76'),_0x30d376[_0x85fb('0x68')]);}}return _0x26fa23[_0x85fb('0x75')](_0x1125a2);}})[_0x85fb('0x4a')](handleError(_0x26fa23,null));};exports[_0x85fb('0x77')]=function(_0x40b776,_0xbf1fdd){var _0x16588b=path[_0x85fb('0x6d')](config[_0x85fb('0x6e')],_0x85fb('0x78'));var _0x3a5ba0={'where':{'id':_0x40b776['params']['id']},'attributes':['id',_0x85fb('0x69'),'showCustomerAvatar'],'raw':!![]};return db[_0x85fb('0x32')][_0x85fb('0x49')](_0x3a5ba0)[_0x85fb('0x15')](handleEntityNotFound(_0xbf1fdd,null))[_0x85fb('0x15')](function(_0x51dcf3){if(_0x51dcf3){if(!_[_0x85fb('0x72')](_0x51dcf3[_0x85fb('0x69')])){if(fs[_0x85fb('0x73')](path['join'](config[_0x85fb('0x6e')],_0x85fb('0x76'),_0x51dcf3['customerAvatar']))&&_0x51dcf3[_0x85fb('0x79')]){_0x16588b=path['join'](config['root'],_0x85fb('0x76'),_0x51dcf3[_0x85fb('0x69')]);}}return _0xbf1fdd['download'](_0x16588b);}})[_0x85fb('0x4a')](handleError(_0xbf1fdd,null));};exports[_0x85fb('0x7a')]=function(_0x5b435a,_0x2aaf7d){var _0x47180f=path[_0x85fb('0x6d')](config[_0x85fb('0x6e')],'server/files/images/avatars/system_avatar.png');var _0x25ae8f={'where':{'id':_0x5b435a[_0x85fb('0x54')]['id']},'attributes':['id',_0x85fb('0x6b')],'raw':!![]};return db[_0x85fb('0x32')]['find'](_0x25ae8f)[_0x85fb('0x15')](handleEntityNotFound(_0x2aaf7d,null))[_0x85fb('0x15')](function(_0x3daebd){if(_0x3daebd){if(!_[_0x85fb('0x72')](_0x3daebd[_0x85fb('0x6b')])){if(fs[_0x85fb('0x73')](path[_0x85fb('0x6d')](config[_0x85fb('0x6e')],_0x85fb('0x76'),_0x3daebd['systemAvatar']))){_0x47180f=path[_0x85fb('0x6d')](config[_0x85fb('0x6e')],_0x85fb('0x76'),_0x3daebd[_0x85fb('0x6b')]);}}return _0x2aaf7d[_0x85fb('0x75')](_0x47180f);}})[_0x85fb('0x4a')](handleError(_0x2aaf7d,null));};exports[_0x85fb('0x7b')]=function(_0x45f968,_0x36059b){var _0x13f308=require(_0x85fb('0x7c'));var _0x2df1e2=new _0x13f308();var _0x510e6f=_0x2df1e2['setUA'](_0x45f968[_0x85fb('0x7d')][_0x85fb('0x7e')])[_0x85fb('0x7f')]();var _0x57518f={'body':_0x45f968[_0x85fb('0x4c')],'channel':'chat'};var _0x2299a8=[];var _0x2f5baf=[];var _0x13b5c1={};var _0x4f120e=![];return db[_0x85fb('0x80')]['describe']()['then'](function(_0x88c552){if(!_0x88c552){throw new db['Sequelize'][(_0x85fb('0x81'))](_0x85fb('0x82'));}_0x2299a8=_['difference'](_[_0x85fb('0x37')](_0x88c552),['createdAt',_0x85fb('0x83')]);_0x2f5baf=_[_0x85fb('0x84')](_[_0x85fb('0x37')](_0x88c552),[_0x85fb('0x85'),_0x85fb('0x83'),'CompanyId',_0x85fb('0x86')]);if(_0x45f968[_0x85fb('0x4c')]['id']){delete _0x45f968['body']['id'];}if(_[_0x85fb('0x72')](_0x45f968[_0x85fb('0x4c')][_0x85fb('0x87')])){throw new db['Sequelize']['ValidationError']('from\x20is\x20mandatory');}if(_['isNil'](_0x45f968[_0x85fb('0x4c')][_0x85fb('0x4c')])||_0x45f968[_0x85fb('0x4c')][_0x85fb('0x4c')]===''){throw new db[(_0x85fb('0x88'))][(_0x85fb('0x81'))](_0x85fb('0x89'));}if(_[_0x85fb('0x72')](_0x45f968[_0x85fb('0x4c')][_0x85fb('0x8a')])){throw new db[(_0x85fb('0x88'))][(_0x85fb('0x81'))](_0x85fb('0x8b')+_0x2f5baf);}if(!_[_0x85fb('0x8c')](_0x2f5baf,_0x45f968['body'][_0x85fb('0x8a')])){throw new db[(_0x85fb('0x88'))][(_0x85fb('0x81'))](_0x85fb('0x8d')+_0x2f5baf);}_0x13b5c1[_0x45f968[_0x85fb('0x4c')][_0x85fb('0x8a')]]=_0x45f968['body']['from'];})[_0x85fb('0x15')](function(){return db[_0x85fb('0x32')][_0x85fb('0x49')]({'where':{'id':_0x45f968[_0x85fb('0x54')]['id']},'include':[{'model':db[_0x85fb('0x8e')],'as':_0x85fb('0x8f'),'include':[{'model':db['CmContact'],'as':'Contacts','where':_0x13b5c1,'limit':0x1,'order':[[_0x85fb('0x83'),_0x85fb('0x90')]]}]},{'model':db[_0x85fb('0x91')],'as':_0x85fb('0x92')}]});})['then'](handleEntityNotFound(_0x36059b,null))[_0x85fb('0x15')](function(_0x20d2de){if(_0x20d2de&&_0x20d2de[_0x85fb('0x8f')]){_0x57518f[_0x85fb('0x93')]=_0x20d2de;_0x57518f[_0x85fb('0x94')]=_0x20d2de['Applications'];_0x57518f[_0x85fb('0x95')]=_0x20d2de[_0x85fb('0x8f')];_0x57518f[_0x85fb('0x94')]=_[_0x85fb('0x96')](_0x57518f['applications'],[_0x85fb('0x97')],[_0x85fb('0x98')]);if(_0x57518f['account'][_0x85fb('0x92')]){delete _0x57518f[_0x85fb('0x93')][_0x85fb('0x92')];}if(_0x57518f[_0x85fb('0x93')][_0x85fb('0x8f')]&&_0x57518f['account'][_0x85fb('0x8f')][_0x85fb('0x99')]['length']){return _0x57518f['account'][_0x85fb('0x8f')][_0x85fb('0x99')][0x0];}var _0x3e8b41=_[_0x85fb('0xb')](_0x45f968['body'],{'firstName':_0x45f968[_0x85fb('0x4c')][_0x85fb('0x87')],'ListId':_0x20d2de[_0x85fb('0x86')]});_0x3e8b41[_0x45f968[_0x85fb('0x4c')][_0x85fb('0x8a')]]=_0x45f968[_0x85fb('0x4c')][_0x85fb('0x87')];return db[_0x85fb('0x80')]['create'](_0x3e8b41,{'fields':_0x2299a8,'raw':!![]});}})['then'](handleEntityNotFound(_0x36059b,null))[_0x85fb('0x15')](function(_0x362cec){_0x57518f[_0x85fb('0x9a')]=_0x362cec;var _0x416134=_0x45f968[_0x85fb('0x4c')][_0x85fb('0x9b')];if(_0x45f968[_0x85fb('0x7d')]['cf-connecting-ip']){_0x416134=_0x45f968[_0x85fb('0x7d')]['cf-connecting-ip'];}else if(_0x45f968[_0x85fb('0x7d')]['x-forwarded-for']){_0x416134=_[_0x85fb('0x9c')](_0x45f968[_0x85fb('0x7d')][_0x85fb('0x9d')][_0x85fb('0x9e')](','));}if(_0x362cec){var _0x829958={'ContactId':_0x362cec['id'],'ChatWebsiteId':_0x45f968[_0x85fb('0x54')]['id'],'from':(_0x362cec['firstName']||'')+'\x20'+(_0x362cec[_0x85fb('0x9f')]||''),'customerIp':_0x416134,'customerPort':_0x45f968['headers'][_0x85fb('0xa0')]?_0x45f968[_0x85fb('0x7d')][_0x85fb('0xa0')]:null,'referer':_0x45f968[_0x85fb('0x4c')][_0x85fb('0xa1')],'browserName':_0x510e6f[_0x85fb('0xa2')][_0x85fb('0x2c')]&&_0x510e6f[_0x85fb('0xa2')][_0x85fb('0xa3')]?util['format']('%s\x20%s',_0x510e6f[_0x85fb('0xa2')][_0x85fb('0x2c')],_0x510e6f[_0x85fb('0xa2')][_0x85fb('0xa3')]):_0x85fb('0xa4'),'browserVersion':_0x510e6f[_0x85fb('0xa2')]['version']||_0x85fb('0xa4'),'osName':util[_0x85fb('0xa5')](_0x85fb('0xa6'),_0x510e6f['os'][_0x85fb('0x2c')],_0x510e6f['os'][_0x85fb('0xa3')]),'osVersion':_0x510e6f['os'][_0x85fb('0xa3')],'deviceModel':_0x510e6f[_0x85fb('0xa7')][_0x85fb('0x35')]&&_0x510e6f['device'][_0x85fb('0xa8')]?util[_0x85fb('0xa5')](_0x85fb('0xa9'),_0x510e6f[_0x85fb('0xa7')][_0x85fb('0x35')],_0x510e6f[_0x85fb('0xa7')][_0x85fb('0xa8')],_0x510e6f[_0x85fb('0xa7')][_0x85fb('0xaa')]):null,'deviceVendor':_0x510e6f['device']['vendor'],'deviceType':_0x510e6f[_0x85fb('0xa7')]['type'],'formData':JSON['stringify'](_0x45f968[_0x85fb('0x4c')])};var _0xbc5805={'ChatWebsiteId':_0x45f968[_0x85fb('0x54')]['id'],'closed':![]};if(_0x45f968[_0x85fb('0x4c')][_0x85fb('0xab')]){_0xbc5805[_0x85fb('0xab')]=_0x45f968[_0x85fb('0x4c')]['threadId'];return db[_0x85fb('0xac')][_0x85fb('0x49')]({'where':_0xbc5805})[_0x85fb('0x15')](function(_0x13023e){if(_0x13023e){return[_0x13023e,![]];}_0x829958[_0x85fb('0xab')]=_0x45f968[_0x85fb('0x4c')][_0x85fb('0xab')];_0x829958[_0x85fb('0xad')]=_0x45f968['body']['externalUrl'];return db['ChatInteraction'][_0x85fb('0x4b')](_0x829958)[_0x85fb('0x15')](function(_0x3fc405){return[_0x3fc405,!![]];});});}_0xbc5805[_0x85fb('0xae')]=_0x362cec['id'];if(_0x45f968['body'][_0x85fb('0xaf')]&&_0x45f968[_0x85fb('0x4c')][_0x85fb('0xaf')]['id']){_0xbc5805['id']=_0x45f968[_0x85fb('0x4c')][_0x85fb('0xaf')]['id'];return db[_0x85fb('0xac')][_0x85fb('0x49')]({'where':_0xbc5805})[_0x85fb('0x15')](function(_0x3d4581){if(_0x3d4581){return[_0x3d4581,![]];}return db[_0x85fb('0xac')]['create'](_0x829958)[_0x85fb('0x15')](function(_0x2979d9){return[_0x2979d9,!![]];});});}return db['ChatInteraction'][_0x85fb('0x4b')](_0x829958)[_0x85fb('0x15')](function(_0x5450ae){return[_0x5450ae,!![]];});}})[_0x85fb('0xb0')](function(_0xc38ffa,_0x43a9e1){if(_0xc38ffa){_0x4f120e=_0x43a9e1;if(!_0x43a9e1){var _0x2ff1fe={'from':(_0x57518f[_0x85fb('0x9a')][_0x85fb('0xb1')]||'')+'\x20'+(_0x57518f[_0x85fb('0x9a')][_0x85fb('0x9f')]||'')};if(_0x45f968['body'][_0x85fb('0xab')]&&_0x45f968['body'][_0x85fb('0xb2')]&&_0x45f968[_0x85fb('0x4c')][_0x85fb('0xab')]!=_0x45f968[_0x85fb('0x4c')][_0x85fb('0xb2')]){_0x2ff1fe['threadId']=_0x45f968[_0x85fb('0x4c')][_0x85fb('0xb2')];}return _0xc38ffa[_0x85fb('0x53')](_0x2ff1fe);}else{return _0xc38ffa;}}})[_0x85fb('0x15')](function(_0x5e4da0){_0x57518f[_0x85fb('0xaf')]=_0x5e4da0[_0x85fb('0x28')]({'plain':!![]});_0x57518f['interaction'][_0x85fb('0xb3')]=_0x4f120e;if(_0x57518f['interaction'][_0x85fb('0xb3')]){if(_0x57518f[_0x85fb('0x93')][_0x85fb('0xb4')]){_0x57518f['applications'][_0x85fb('0xb5')]({'id':0x0,'priority':_0x57518f[_0x85fb('0x94')][_0x85fb('0x48')]+0x1,'app':_0x85fb('0xb6'),'appdata':_0x85fb('0xb7'),'interval':_0x85fb('0xb8')});}}return db[_0x85fb('0xb9')][_0x85fb('0x4b')]({'body':_0x45f968[_0x85fb('0x4c')][_0x85fb('0x4c')],'ChatWebsiteId':_0x45f968[_0x85fb('0x54')]['id'],'ChatInteractionId':_0x5e4da0['id'],'direction':'in','ContactId':_0x57518f[_0x85fb('0x9a')]['id'],'AttachmentId':_0x45f968[_0x85fb('0x4c')][_0x85fb('0xba')]});})['then'](function(_0x497547){_0x57518f[_0x85fb('0x1b')]=_0x497547;if(_0x57518f[_0x85fb('0xaf')][_0x85fb('0xbb')]){return db[_0x85fb('0xbc')][_0x85fb('0x49')]({'attributes':['id',_0x85fb('0x2c')],'where':{'id':_0x57518f[_0x85fb('0xaf')][_0x85fb('0xbb')]}})[_0x85fb('0x15')](function(_0x4f2183){if(_0x4f2183){_0x57518f['applications'][_0x85fb('0xbd')]({'id':0x0,'priority':0x0,'app':_0x85fb('0xbe'),'appdata':_0x4f2183['name']+','+(_0x57518f[_0x85fb('0x93')][_0x85fb('0xbf')]||0xa),'interval':_0x85fb('0xb8')});_0x57518f[_0x85fb('0xc0')]=!![];}return respondWithRpcPromise(_0x85fb('0xc1'),_0x85fb('0xc2'),_0x57518f);});}return respondWithRpcPromise(_0x85fb('0xc1'),_0x85fb('0xc2'),_0x57518f);})[_0x85fb('0x15')](function(_0x1ceb37){respondWithRpcPromise('EventManager',_0x85fb('0xc3'),{'event':'notify','message':_0x1ceb37},client9002);return _0x1ceb37;})[_0x85fb('0x15')](respondWithResult(_0x36059b,null))[_0x85fb('0x4a')](handleError(_0x36059b,null));};exports[_0x85fb('0xc4')]=function(_0x52224d,_0x318bbb){var _0x51ed92,_0xb6cbe5,_0x6b00f9;var _0x334f7c=[];var _0x3bcc10={};var _0x23d8be=_0x52224d['files']||[];var _0x47c73e=[];var _0x196090;return db[_0x85fb('0x80')]['describe']()[_0x85fb('0x15')](function(_0x25908b){if(!_0x25908b){throw new db[(_0x85fb('0x88'))][(_0x85fb('0x81'))](_0x85fb('0x82'));}_0x334f7c=_[_0x85fb('0x84')](_[_0x85fb('0x37')](_0x25908b),[_0x85fb('0x85'),'updatedAt','CompanyId','ListId']);if(_0x52224d[_0x85fb('0x4c')]['id']){delete _0x52224d[_0x85fb('0x4c')]['id'];}if(_[_0x85fb('0x72')](_0x52224d[_0x85fb('0x4c')][_0x85fb('0x87')])){throw _0x318bbb['status'](0x1f4)['send'](new db[(_0x85fb('0x88'))]['ValidationError']('from\x20is\x20mandatory'));}if(_[_0x85fb('0x72')](_0x52224d[_0x85fb('0x4c')][_0x85fb('0x4c')])||_0x52224d[_0x85fb('0x4c')]['body']===''){throw _0x318bbb[_0x85fb('0x1f')](0x1f4)[_0x85fb('0x2d')](new db['Sequelize'][(_0x85fb('0x81'))]('body\x20is\x20mandatory\x20and\x20not\x20empty'));}if(_[_0x85fb('0x72')](_0x52224d[_0x85fb('0x4c')][_0x85fb('0xc5')])){throw _0x318bbb[_0x85fb('0x1f')](0x1f4)[_0x85fb('0x2d')](new db[(_0x85fb('0x88'))][(_0x85fb('0x81'))](_0x85fb('0xc6')+_0x334f7c));}if(!_[_0x85fb('0x8c')](_0x334f7c,_0x52224d[_0x85fb('0x4c')][_0x85fb('0xc5')])){throw _0x318bbb[_0x85fb('0x1f')](0x1f4)[_0x85fb('0x2d')](new db[(_0x85fb('0x88'))][(_0x85fb('0x81'))]('mapKeyOffline\x20invalid,\x20please\x20use\x20one\x20of\x20these:\x20'+_0x334f7c));}_0x3bcc10[_0x52224d['body'][_0x85fb('0xc5')]]=_0x52224d[_0x85fb('0x4c')][_0x85fb('0x87')];})[_0x85fb('0x15')](function(){return db['ChatWebsite'][_0x85fb('0x49')]({'where':{'id':_0x52224d[_0x85fb('0x54')]['id']},'include':[{'model':db[_0x85fb('0x8e')],'as':'List'},{'model':db[_0x85fb('0xc7')],'as':_0x85fb('0xc7')}]});})[_0x85fb('0x15')](handleEntityNotFound(_0x318bbb,null))[_0x85fb('0x15')](function(_0x33f389){if(_0x33f389&&_0x33f389[_0x85fb('0x8f')]){_0xb6cbe5=_0x33f389;var _0x2fdcaf=_[_0x85fb('0xb')](_0x52224d[_0x85fb('0x4c')],{'firstName':_0x52224d[_0x85fb('0x4c')][_0x85fb('0x87')],'phone':_0x52224d[_0x85fb('0x4c')][_0x85fb('0x87')],'ListId':_0x33f389['ListId']});_0x2fdcaf[_0x52224d[_0x85fb('0x4c')][_0x85fb('0xc5')]]=_0x52224d[_0x85fb('0x4c')][_0x85fb('0x87')];return db['CmContact'][_0x85fb('0xc8')]({'where':_0x3bcc10,'defaults':_0x2fdcaf});}})['spread'](function(_0x87a54){if(_0x87a54){_0x6b00f9=_0x87a54;var _0x2e0193=fs[_0x85fb('0xc9')](path[_0x85fb('0x6d')](config[_0x85fb('0x6e')],'server/files/templates/chatOfflineMessage.ejs'),'utf8');var _0x31f803=ejs[_0x85fb('0xca')](_0x2e0193,{'body':_[_0x85fb('0xcb')](_0x52224d[_0x85fb('0x4c')][_0x85fb('0x4c')]),'bodyTitle':_0xb6cbe5[_0x85fb('0xcc')]});return db[_0x85fb('0xcd')][_0x85fb('0x4b')]({'body':_0x31f803,'plainBody':htmlToText[_0x85fb('0xce')](_0x31f803),'ContactId':_0x87a54['id'],'ChatWebsiteId':_0xb6cbe5['id']});}})[_0x85fb('0x15')](function(_0x2251cf){_0x196090=_0x2251cf;if(_0x23d8be[_0x85fb('0x48')]){var _0xf69257=_0x23d8be[_0x85fb('0x31')](function(_0x41b868){return{'name':_0x41b868[_0x85fb('0xcf')],'basename':_0x41b868['filename'],'type':_0x41b868['mimetype'],'ChatOfflineMessageId':_0x2251cf['id']};});_0x47c73e=_0xf69257[_0x85fb('0x31')](_0x167d36=>{var _0x3fac36={'filename':_0x167d36[_0x85fb('0x2c')],'path':path[_0x85fb('0x6d')](config['root'],_0x85fb('0xd0'),_0x85fb('0xd1'),_0x85fb('0xd2'),_0x85fb('0xd3'),_0x167d36[_0x85fb('0xd4')])};return _0x3fac36;});if(!_0xb6cbe5[_0x85fb('0xd5')]){return db[_0x85fb('0xd6')][_0x85fb('0xd7')](function(_0x355843){return db['Attachment'][_0x85fb('0xd8')](_0xf69257,{'transaction':_0x355843});});}}})[_0x85fb('0x15')](function(){if(_0x196090){_0x51ed92=_0x196090;return db[_0x85fb('0xc7')]['findOne']({'where':{'service':!![]},'include':[{'model':db['MailServerOut'],'as':_0x85fb('0xd9'),'raw':!![],'include':[{'model':db['CloudProvider'],'as':'CloudProvider','raw':!![]}]}]});}})[_0x85fb('0x15')](function(_0x34ca8b){if(_0x34ca8b&&_0x34ca8b['Smtp']&&_0xb6cbe5['forwardOffline']&&_0xb6cbe5[_0x85fb('0xda')]){var _0x59545a=_0x34ca8b[_0x85fb('0xdb')]();return respondWithRpcPromise(_0x85fb('0xdc'),_0x85fb('0xdd'),{'account':_0x59545a,'message':{'from':util['format'](_0x85fb('0xde'),_0x34ca8b[_0x85fb('0x2c')],_0x34ca8b['email']||_0x34ca8b['Smtp'][_0x85fb('0x4d')]),'to':_0xb6cbe5[_0x85fb('0xda')],'subject':_0xb6cbe5[_0x85fb('0xdf')],'html':_0x51ed92['body'],'attachments':_0x47c73e}},client9003)[_0x85fb('0x15')](function(){return _0x51ed92;})[_0x85fb('0x4a')](function(_0x5b5eec){logger[_0x85fb('0x19')](_0x5b5eec);});}})[_0x85fb('0x15')](function(){if(_0xb6cbe5&&_0xb6cbe5[_0x85fb('0xd5')]&&_0xb6cbe5['MailAccountId']){var _0x3d65d3=[];if(_0x23d8be['length']){_0x3d65d3=_0x23d8be[_0x85fb('0x31')](function(_0x1f4161){return{'name':_0x1f4161['originalname'],'basename':_0x1f4161['filename'],'type':_0x1f4161[_0x85fb('0xe0')],'ChatOfflineMessageId':_0x196090['id']};});}var _0x451128;if(!_[_0x85fb('0x72')](_0xb6cbe5[_0x85fb('0xe1')])){var _0x3e3379=_[_0x85fb('0x31')](_0x52224d['body'],function(_0x3478eb){return _0x3478eb;});var _0x11ab3b=_[_0x85fb('0xe2')](_0x3e3379)[0x0];var _0x5eeea5=_[_0x85fb('0xe3')](_0x11ab3b,function(_0xafeba){return _0xafeba;});_0x451128=_0x5eeea5[0x1][_0xb6cbe5[_0x85fb('0xe1')]];}var _0x256ab5={'from':_0x6b00f9[_0x85fb('0xe4')],'firstName':_0x6b00f9[_0x85fb('0xb1')],'lastName':_0x6b00f9['lastName'],'mapKey':_0x85fb('0xe4'),'message':{'from':_0x6b00f9[_0x85fb('0xe4')],'to':_0xb6cbe5[_0x85fb('0xc7')]['email'],'cc':'','subject':_[_0x85fb('0x72')](_0x451128)?_0xb6cbe5[_0x85fb('0xdf')]:_0x451128,'messageId':'','sentAt':new Date(),'attach':_0x3d65d3[_0x85fb('0x48')],'attachments':_0x3d65d3,'originChannel':_0x85fb('0xe5'),'ChatWebsiteId':_0xb6cbe5['id'],'ChatOfflineMessageId':_0x51ed92['id'],'originTo':_0xb6cbe5[_0x85fb('0xc7')][_0x85fb('0xe4')]},'body':_0x51ed92[_0x85fb('0x4c')]};var _0x15b25b={'account':{'id':_0xb6cbe5[_0x85fb('0xe6')]},'body':_0x256ab5,'log':_0x85fb('0xe7')};return respondWithRpcPromise(_0x85fb('0xe7'),_0x85fb('0xe8'),_0x15b25b,client9001)[_0x85fb('0x15')](function(){return _0x51ed92;})[_0x85fb('0x4a')](function(_0x49e340){logger[_0x85fb('0x19')](_0x49e340);});}return;})[_0x85fb('0x15')](function(){if(_0x51ed92){return _0x51ed92;}})[_0x85fb('0x15')](respondWithResult(_0x318bbb,null))['catch'](function(_0x596d3e){logger[_0x85fb('0x19')](_0x85fb('0x4a'),_0x596d3e);for(var _0x5dc8b8 of _0x23d8be){var _0x57374a=path[_0x85fb('0x6d')](config[_0x85fb('0x6e')],_0x85fb('0xd0'),_0x85fb('0xd1'),_0x85fb('0xd2'),_0x85fb('0xd3'),_0x5dc8b8[_0x85fb('0x66')]);fs_extra[_0x85fb('0xe9')](_0x57374a)[_0x85fb('0x4a')](function(_0x14d9bc){logger[_0x85fb('0x19')](_0x85fb('0xea'),_0x57374a,_0x14d9bc);});}});};exports[_0x85fb('0xeb')]=function(_0x5d2877,_0x4e4178){return db[_0x85fb('0xac')][_0x85fb('0x49')]({'where':{'id':_0x5d2877['params']['id']}})[_0x85fb('0x15')](handleEntityNotFound(_0x4e4178,null))[_0x85fb('0x15')](function(_0x23a15e){if(_0x23a15e){return _0x23a15e[_0x85fb('0xeb')](_0x5d2877['body'][_0x85fb('0x5e')],_[_0x85fb('0xec')](_0x5d2877[_0x85fb('0x4c')],[_0x85fb('0x5e'),'id'])||{});}})[_0x85fb('0x15')](respondWithResult(_0x4e4178,null))[_0x85fb('0x4a')](handleError(_0x4e4178,null));};exports[_0x85fb('0xed')]=function(_0x10867f,_0x2498f2){var _0x270005={'raw':![],'where':{}};var _0xdb63b={};var _0x125b5c={'count':0x0,'rows':[]};return db[_0x85fb('0x32')][_0x85fb('0x59')]({'where':{'id':_0x10867f['params']['id']}})[_0x85fb('0x15')](handleEntityNotFound(_0x2498f2,null))[_0x85fb('0x15')](function(_0xa08aa6){if(_0xa08aa6){_0xdb63b[_0x85fb('0x35')]=_[_0x85fb('0x37')](db['ChatInteraction']['rawAttributes']);_0xdb63b[_0x85fb('0x36')]=_[_0x85fb('0x37')](_0x10867f[_0x85fb('0x36')]);_0xdb63b[_0x85fb('0x38')]=_[_0x85fb('0x39')](_0xdb63b[_0x85fb('0x35')],_0xdb63b[_0x85fb('0x36')]);_0x270005['attributes']=_['intersection'](_0xdb63b['model'],qs['fields'](_0x10867f['query'][_0x85fb('0x3a')]));_0x270005[_0x85fb('0x3b')]=_0x270005[_0x85fb('0x3b')]['length']?_0x270005[_0x85fb('0x3b')]:_0xdb63b[_0x85fb('0x35')];if(!_0x10867f['query'][_0x85fb('0x3c')](_0x85fb('0x3d'))){_0x270005[_0x85fb('0x23')]=qs[_0x85fb('0x23')](_0x10867f[_0x85fb('0x36')][_0x85fb('0x23')]);_0x270005[_0x85fb('0x21')]=qs[_0x85fb('0x21')](_0x10867f[_0x85fb('0x36')][_0x85fb('0x21')]);}_0x270005[_0x85fb('0x3e')]=qs['sort'](_0x10867f[_0x85fb('0x36')][_0x85fb('0x3f')]);_0x270005[_0x85fb('0x40')]=qs[_0x85fb('0x38')](_[_0x85fb('0x5b')](_0x10867f['query'],_0xdb63b[_0x85fb('0x38')]));_0x270005['where']['ChatWebsiteId']=_0xa08aa6['id'];if(_0x10867f['query'][_0x85fb('0x41')]){_0x270005[_0x85fb('0x40')]=_[_0x85fb('0x43')](_0x270005['where'],{'$or':_['map'](_0x270005['attributes'],function(_0x484794){var _0x4ac621={};_0x4ac621[_0x484794]={'$like':'%'+_0x10867f[_0x85fb('0x36')][_0x85fb('0x41')]+'%'};return _0x4ac621;})});}_0x270005=_['merge']({},_0x270005,_0x10867f[_0x85fb('0x44')]);return db[_0x85fb('0xac')][_0x85fb('0x24')]({'where':_0x270005['where']})[_0x85fb('0x15')](function(_0x4a71c2){_0x125b5c[_0x85fb('0x24')]=_0x4a71c2;if(_0x10867f['query'][_0x85fb('0x45')]){_0x270005[_0x85fb('0x46')]=[{'model':db[_0x85fb('0x80')],'as':'Contact','required':![]},{'model':db['User'],'as':_0x85fb('0xee'),'attributes':[_0x85fb('0x2c'),_0x85fb('0xef'),_0x85fb('0xf0')],'required':![]},{'model':db[_0x85fb('0xf1')],'as':'Tags','attributes':['id',_0x85fb('0x2c'),_0x85fb('0xf2')],'where':_0x10867f['query'][_0x85fb('0xf3')]?{'id':_0x10867f['query'][_0x85fb('0xf3')]}:undefined,'required':_0x10867f[_0x85fb('0x36')][_0x85fb('0xf3')]?!![]:![]}];}return db['ChatInteraction'][_0x85fb('0x5c')](_0x270005);})[_0x85fb('0x15')](function(_0x416426){_0x125b5c['rows']=_0x416426;return _0x125b5c;});}})['then'](respondWithFilteredResult(_0x2498f2,_0x270005))[_0x85fb('0x4a')](handleError(_0x2498f2,null));};function iftimePromise(_0x507c12,_0x17b80d){return respondWithRpcPromise(_0x85fb('0xf4'),'getSnippet',{'command':_0x17b80d[_0x85fb('0xf5')]?util[_0x85fb('0xa5')](_0x85fb('0xf6'),_0x507c12[_0x85fb('0xf7')],_0x17b80d['timezone']):util['format']('iftime\x20%s',_0x507c12[_0x85fb('0xf7')])},client9002)[_0x85fb('0x15')](function(_0x1593f9){var _0x279c76=_0x1593f9&&_0x1593f9[_0x85fb('0xf8')](_0x85fb('0xf9'))>=0x0?!![]:![];logger[_0x85fb('0x1c')]('[%s][INTERVAL][%s]\x20%s\x20%s\x20(%s)',_0x17b80d['id'],_0x507c12['id'],_0x507c12[_0x85fb('0xf7')],_0x279c76?'ONLINE':_0x85fb('0xfa'),_0x17b80d[_0x85fb('0xf5')]?_0x17b80d['timezone']:_0x85fb('0xfb'));return _0x279c76;})['catch'](function(_0x256144){logger[_0x85fb('0x19')]('[%s][INTERVAL][%s]\x20%s\x20%s\x20(%s)',_0x17b80d['id'],_0x507c12['id'],_0x507c12[_0x85fb('0xf7')],util['inspect'](_0x256144,{'showHidden':![],'depth':null}),_0x17b80d[_0x85fb('0xf5')]?_0x17b80d[_0x85fb('0xf5')]:_0x85fb('0xfb'));return![];});}exports['getSnippet']=function(_0x3d2864,_0x4719df){var _0x567f91=0x0;var _0x5354bd=0x0;var _0x505e4f=![];var _0x4db16e;var _0x5e5070;return db[_0x85fb('0x32')][_0x85fb('0x49')]({'where':{'id':_0x3d2864[_0x85fb('0x54')]['id']},'include':[{'model':db[_0x85fb('0xfc')],'as':_0x85fb('0xfc'),'include':[{'model':db[_0x85fb('0xfc')],'as':_0x85fb('0xfd'),'attributes':['id','interval'],'raw':!![]}]}]})[_0x85fb('0x15')](handleEntityNotFound(_0x4719df,null))['then'](function(_0x23208e){if(_0x23208e){_0x4db16e=_0x23208e;return _0x23208e['getProactiveActions']({'raw':!![]});}})[_0x85fb('0x15')](function(_0x1fd0a5){if(_0x4db16e){if(_0x1fd0a5){_0x5e5070=_0x1fd0a5;}}return require(_0x85fb('0xfe'))[_0x85fb('0x70')]();})[_0x85fb('0x15')](function(_0x2a30e8){if(_0x2a30e8){_0x5354bd=_0x2a30e8[_0x85fb('0xff')];_0x505e4f=_0x2a30e8[_0x85fb('0x71')];}})[_0x85fb('0x15')](function(){return db['ChatInteraction'][_0x85fb('0x24')]({'where':{'closed':![]}});})[_0x85fb('0x15')](function(_0x26293f){_0x567f91=_0x26293f;if(_0x5354bd&&_0x26293f>_0x5354bd){return db['License'][_0x85fb('0x59')]({'where':{'id':0x1}})[_0x85fb('0x15')](function(_0x10a174){if(_0x10a174){_0x10a174[_0x85fb('0x100')](_0x85fb('0x101'));}});}})[_0x85fb('0x15')](function(){if(_0x4db16e[_0x85fb('0xfc')]&&_0x4db16e[_0x85fb('0xfc')][_0x85fb('0xfd')]){var _0x42e9b1=[];for(var _0x1d7500=0x0;_0x1d7500<_0x4db16e[_0x85fb('0xfc')][_0x85fb('0xfd')]['length'];_0x1d7500++){var _0x1d73d5=_0x4db16e[_0x85fb('0xfc')][_0x85fb('0xfd')][_0x1d7500][_0x85fb('0x28')]({'plain':!![]});_0x42e9b1[_0x85fb('0xb5')](iftimePromise(_0x1d73d5,_0x4db16e));}return BPromise[_0x85fb('0x102')](_0x42e9b1)[_0x85fb('0x15')](function(_0x5da330){return _[_0x85fb('0x103')](_0x5da330);});}else{return!![];}})[_0x85fb('0x15')](function(_0x31d922){var _0x3b87a0=fs['readFileSync'](path[_0x85fb('0x6d')](config[_0x85fb('0x6e')],_0x85fb('0x104')),'utf8');var _0x274e26=new url[(_0x85fb('0x105'))](_0x4db16e['address'])['origin'];var _0x19f421='3.2.0';var _0x70af6e=![];var _0x30318e={'chatVersion':_0x19f421,'chatWebsiteAddressOrigin':_0x274e26,'remote':_0x4db16e[_0x85fb('0x106')],'query':querystring[_0x85fb('0x107')](_[_0x85fb('0x43')](_0x4db16e[_0x85fb('0x28')]({'plain':!![]}),{'customerIp':_0x3d2864['headers']['x-forwarded-for']||_0x3d2864[_0x85fb('0x7d')][_0x85fb('0x108')]||_0x3d2864[_0x85fb('0x109')][_0x85fb('0x10a')]||_0x3d2864['ip'],'referer':_0x3d2864[_0x85fb('0x7d')][_0x85fb('0xa1')],'openedInteractions':_0x567f91,'maxInteractions':_0x5354bd,'virtual':_0x505e4f[_0x85fb('0xff')],'online':_0x31d922,'custom':_0x505e4f}))[_0x85fb('0x10b')](/'/g,'\x5c\x27')};_0x4719df[_0x85fb('0x2d')](ejs['render'](Mustache[_0x85fb('0xca')](_0x3b87a0,_0x30318e),{'proactiveActions':_0x5e5070,'alignment':_0x4db16e[_0x85fb('0x10c')],'verticalAlignment':_0x4db16e[_0x85fb('0x10d')],'div_color':_0x4db16e[_0x85fb('0xf2')],'labelText':_0x4db16e[_0x85fb('0x10e')],'text_color':_0x4db16e[_0x85fb('0x10f')],'text_button_color':_0x4db16e[_0x85fb('0x110')],'button_color':_0x4db16e[_0x85fb('0x111')],'background_color':_0x4db16e['backgroundColor'],'hideWhenOffline':_0x4db16e[_0x85fb('0x112')],'intervalId':_0x4db16e[_0x85fb('0x113')],'isDevelopment':_0x70af6e,'chatVersion':_0x19f421}));})[_0x85fb('0x4a')](handleError(_0x4719df,null));};exports[_0x85fb('0x114')]=function(_0x42e215,_0x1e96e7){var _0x357388=_0x42e215[_0x85fb('0x54')]['id'];var _0x22f091=_0x42e215[_0x85fb('0x4c')];var _0x1df593=0xc8;var _0x52448e=null;return db['sequelize'][_0x85fb('0xd7')]({'isolationLevel':db[_0x85fb('0xd6')][_0x85fb('0x115')][_0x85fb('0x116')][_0x85fb('0x117')]},function(_0x37f8cb){return db[_0x85fb('0x32')][_0x85fb('0x59')]({'where':{'id':_0x357388},'transaction':_0x37f8cb})['then'](function(_0x505109){if(_0x505109){return db[_0x85fb('0x91')][_0x85fb('0x27')]({'where':{'ChatWebsiteId':_0x357388},'transaction':_0x37f8cb})[_0x85fb('0x15')](function(){var _0x49ca77=_[_0x85fb('0x31')](_0x22f091,function(_0xafaa41){_0xafaa41[_0x85fb('0x57')]=_0x357388;return _0xafaa41;});return db[_0x85fb('0x91')][_0x85fb('0xd8')](_0x49ca77,{'transaction':_0x37f8cb});});}else{_0x1df593=0x194;_0x52448e=[];}});})['then'](function(){if(_0x1df593!==0x194){return db[_0x85fb('0x91')][_0x85fb('0x118')]({'where':{'ChatWebsiteId':_0x357388},'order':_0x85fb('0x97')})[_0x85fb('0x15')](function(_0x2abc83){_0x52448e=_0x2abc83;});}})[_0x85fb('0x4a')](function(_0xb73208){_0x1df593=0x1f4;logger[_0x85fb('0x19')](_0xb73208[_0x85fb('0x2b')]);if(_0xb73208[_0x85fb('0x2c')]){delete _0xb73208[_0x85fb('0x2c')];}_0x52448e=_0xb73208;})[_0x85fb('0x119')](function(){if(_0x52448e===null){_0x1e96e7[_0x85fb('0x2a')](_0x1df593);}else{if(_0x1df593===0x1f4){_0x1e96e7['status'](_0x1df593)[_0x85fb('0x2d')](_0x52448e);}else{_0x1e96e7['status'](_0x1df593)[_0x85fb('0x20')](_0x52448e);}}});};exports[_0x85fb('0x11a')]=function(_0x3b0891,_0x37236a){var _0x5d89b6={};var _0x5f30f6={};var _0xf153fa;var _0x4c7c13;return db['ChatWebsite'][_0x85fb('0x59')]({'where':{'id':_0x3b0891['params']['id']}})[_0x85fb('0x15')](handleEntityNotFound(_0x37236a,null))['then'](function(_0x329e7a){if(_0x329e7a){_0xf153fa=_0x329e7a;_0x5f30f6[_0x85fb('0x35')]=_[_0x85fb('0x37')](db[_0x85fb('0x91')][_0x85fb('0x33')]);_0x5f30f6[_0x85fb('0x36')]=_['keys'](_0x3b0891[_0x85fb('0x36')]);_0x5f30f6['filters']=_['intersection'](_0x5f30f6[_0x85fb('0x35')],_0x5f30f6[_0x85fb('0x36')]);_0x5d89b6[_0x85fb('0x3b')]=_[_0x85fb('0x39')](_0x5f30f6['model'],qs[_0x85fb('0x3a')](_0x3b0891[_0x85fb('0x36')]['fields']));_0x5d89b6[_0x85fb('0x3b')]=_0x5d89b6['attributes'][_0x85fb('0x48')]?_0x5d89b6['attributes']:_0x5f30f6[_0x85fb('0x35')];_0x5d89b6['order']=qs[_0x85fb('0x3f')](_0x3b0891[_0x85fb('0x36')][_0x85fb('0x3f')]);_0x5d89b6[_0x85fb('0x40')]=qs[_0x85fb('0x38')](_[_0x85fb('0x5b')](_0x3b0891[_0x85fb('0x36')],_0x5f30f6['filters']));if(_0x3b0891[_0x85fb('0x36')][_0x85fb('0x41')]){_0x5d89b6['where']=_[_0x85fb('0x43')](_0x5d89b6['where'],{'$or':_[_0x85fb('0x31')](_0x5d89b6[_0x85fb('0x3b')],function(_0x3e9ecb){var _0x532c86={};_0x532c86[_0x3e9ecb]={'$like':'%'+_0x3b0891[_0x85fb('0x36')]['filter']+'%'};return _0x532c86;})});}_0x5d89b6=_[_0x85fb('0x43')]({},_0x5d89b6,_0x3b0891['options']);return _0xf153fa[_0x85fb('0x11a')](_0x5d89b6);}})[_0x85fb('0x15')](function(_0x18bff1){if(_0x18bff1){_0x4c7c13=_0x18bff1[_0x85fb('0x48')];if(!_0x3b0891[_0x85fb('0x36')][_0x85fb('0x3c')](_0x85fb('0x3d'))){_0x5d89b6[_0x85fb('0x23')]=qs['limit'](_0x3b0891[_0x85fb('0x36')]['limit']);_0x5d89b6['offset']=qs[_0x85fb('0x21')](_0x3b0891[_0x85fb('0x36')][_0x85fb('0x21')]);}return _0xf153fa[_0x85fb('0x11a')](_0x5d89b6);}})['then'](function(_0x20a47c){if(_0x20a47c){return _0x20a47c?{'count':_0x4c7c13,'rows':_0x20a47c}:null;}})[_0x85fb('0x15')](respondWithResult(_0x37236a,null))[_0x85fb('0x4a')](handleError(_0x37236a,null));};exports['addProactiveActions']=function(_0x3ae4f0,_0x1234b4){return db[_0x85fb('0x11b')][_0x85fb('0x49')]({'where':{'id':_0x3ae4f0[_0x85fb('0x54')]['id']}})[_0x85fb('0x15')](handleEntityNotFound(_0x1234b4,null))[_0x85fb('0x15')](function(_0x431154){if(_0x431154){return _0x431154[_0x85fb('0x11c')](_0x3ae4f0['body'][_0x85fb('0x5e')],_[_0x85fb('0xec')](_0x3ae4f0[_0x85fb('0x4c')],['ids','id'])||{});}})['then'](respondWithResult(_0x1234b4,null))[_0x85fb('0x4a')](handleError(_0x1234b4,null));};exports['getProactiveActions']=function(_0x566cc3,_0x40a048){var _0x269bc2={};var _0x27479a={};var _0x35634c;var _0x4db80a;return db[_0x85fb('0x32')]['findOne']({'where':{'id':_0x566cc3[_0x85fb('0x54')]['id']}})[_0x85fb('0x15')](handleEntityNotFound(_0x40a048,null))['then'](function(_0x19a307){if(_0x19a307){_0x35634c=_0x19a307;_0x27479a[_0x85fb('0x35')]=_[_0x85fb('0x37')](db[_0x85fb('0x11d')][_0x85fb('0x33')]);_0x27479a[_0x85fb('0x36')]=_[_0x85fb('0x37')](_0x566cc3['query']);_0x27479a['filters']=_[_0x85fb('0x39')](_0x27479a['model'],_0x27479a['query']);_0x269bc2['attributes']=_[_0x85fb('0x39')](_0x27479a['model'],qs[_0x85fb('0x3a')](_0x566cc3[_0x85fb('0x36')]['fields']));_0x269bc2['attributes']=_0x269bc2[_0x85fb('0x3b')][_0x85fb('0x48')]?_0x269bc2[_0x85fb('0x3b')]:_0x27479a[_0x85fb('0x35')];_0x269bc2[_0x85fb('0x3e')]=qs[_0x85fb('0x3f')](_0x566cc3['query']['sort']);_0x269bc2[_0x85fb('0x40')]=qs[_0x85fb('0x38')](_[_0x85fb('0x5b')](_0x566cc3[_0x85fb('0x36')],_0x27479a['filters']));if(_0x566cc3[_0x85fb('0x36')]['filter']){_0x269bc2[_0x85fb('0x40')]=_[_0x85fb('0x43')](_0x269bc2[_0x85fb('0x40')],{'$or':_[_0x85fb('0x31')](_0x269bc2[_0x85fb('0x3b')],function(_0x79a6ef){var _0x50e4fb={};_0x50e4fb[_0x79a6ef]={'$like':'%'+_0x566cc3[_0x85fb('0x36')][_0x85fb('0x41')]+'%'};return _0x50e4fb;})});}_0x269bc2=_[_0x85fb('0x43')]({},_0x269bc2,_0x566cc3['options']);return _0x35634c['getProactiveActions'](_0x269bc2);}})[_0x85fb('0x15')](function(_0x25d7a6){if(_0x25d7a6){_0x4db80a=_0x25d7a6[_0x85fb('0x48')];if(!_0x566cc3['query']['hasOwnProperty'](_0x85fb('0x3d'))){_0x269bc2[_0x85fb('0x23')]=qs[_0x85fb('0x23')](_0x566cc3[_0x85fb('0x36')][_0x85fb('0x23')]);_0x269bc2[_0x85fb('0x21')]=qs['offset'](_0x566cc3['query'][_0x85fb('0x21')]);}return _0x35634c[_0x85fb('0x11e')](_0x269bc2);}})['then'](function(_0x2366d7){if(_0x2366d7){return _0x2366d7?{'count':_0x4db80a,'rows':_0x2366d7}:null;}})[_0x85fb('0x15')](respondWithResult(_0x40a048,null))['catch'](handleError(_0x40a048,null));};exports[_0x85fb('0x11f')]=function(_0xb8072e,_0x13371d){var _0x9cca56=_0xb8072e[_0x85fb('0x36')][_0x85fb('0x120')]===_0x85fb('0x121')?_0x85fb('0x122'):_0x85fb('0x123');return db['ChatWebsite']['find']({'attributes':['id',_0x9cca56],'where':{'id':_0xb8072e[_0x85fb('0x54')]['id']}})['then'](handleEntityNotFound(_0x13371d,null))['then'](function(_0x49315b){if(_0x49315b){var _0x3d8e4d=_0x49315b[_0x9cca56];var _0x5ead4a=_0x3d8e4d&&_0x3d8e4d[_0x85fb('0x124')]?_0x3d8e4d[_0x85fb('0x124')]:[];_0x13371d[_0x85fb('0x2d')]({'fromKey':_[_0x85fb('0x72')](_0x3d8e4d[_0x85fb('0x125')])?undefined:_0x3d8e4d[_0x85fb('0x125')],'count':_0x5ead4a[_0x85fb('0x48')],'rows':_0x5ead4a});}})[_0x85fb('0x4a')](handleError(_0x13371d,null));};exports['getOfflineMessages']=function(_0x5e5ee2,_0x1a1acd){var _0xae7c63={'raw':![],'where':{}};var _0x509a75={};var _0x50bb45={'count':0x0,'rows':[]};return db[_0x85fb('0x32')][_0x85fb('0x59')]({'where':{'id':_0x5e5ee2[_0x85fb('0x54')]['id']}})[_0x85fb('0x15')](handleEntityNotFound(_0x1a1acd,null))[_0x85fb('0x15')](function(_0x5389d6){if(_0x5389d6){_0x509a75[_0x85fb('0x35')]=_[_0x85fb('0x37')](db[_0x85fb('0xcd')][_0x85fb('0x33')]);_0x509a75[_0x85fb('0x36')]=_[_0x85fb('0x37')](_0x5e5ee2[_0x85fb('0x36')]);_0x509a75['filters']=_[_0x85fb('0x39')](_0x509a75[_0x85fb('0x35')],_0x509a75[_0x85fb('0x36')]);_0xae7c63['attributes']=_[_0x85fb('0x39')](_0x509a75['model'],qs[_0x85fb('0x3a')](_0x5e5ee2[_0x85fb('0x36')][_0x85fb('0x3a')]));_0xae7c63[_0x85fb('0x3b')]=_0xae7c63[_0x85fb('0x3b')][_0x85fb('0x48')]?_0xae7c63[_0x85fb('0x3b')]:_0x509a75[_0x85fb('0x35')];if(!_0x5e5ee2[_0x85fb('0x36')][_0x85fb('0x3c')]('nolimit')){_0xae7c63[_0x85fb('0x23')]=qs[_0x85fb('0x23')](_0x5e5ee2[_0x85fb('0x36')][_0x85fb('0x23')]);_0xae7c63[_0x85fb('0x21')]=qs[_0x85fb('0x21')](_0x5e5ee2['query'][_0x85fb('0x21')]);}_0xae7c63[_0x85fb('0x3e')]=qs['sort'](_0x5e5ee2['query']['sort']);_0xae7c63['where']=qs[_0x85fb('0x38')](_['pick'](_0x5e5ee2[_0x85fb('0x36')],_0x509a75['filters']));_0xae7c63[_0x85fb('0x40')][_0x85fb('0x57')]=_0x5389d6['id'];if(_0x5e5ee2[_0x85fb('0x36')]['filter']){_0xae7c63[_0x85fb('0x40')]=_[_0x85fb('0x43')](_0xae7c63[_0x85fb('0x40')],{'$or':_['map'](_0xae7c63[_0x85fb('0x3b')],function(_0x2d4e66){var _0x3d44a9={};_0x3d44a9[_0x2d4e66]={'$like':'%'+_0x5e5ee2[_0x85fb('0x36')][_0x85fb('0x41')]+'%'};return _0x3d44a9;})});}_0xae7c63=_[_0x85fb('0x43')]({},_0xae7c63,_0x5e5ee2[_0x85fb('0x44')]);return db['ChatOfflineMessage'][_0x85fb('0x24')]({'where':_0xae7c63[_0x85fb('0x40')]})[_0x85fb('0x15')](function(_0x4d8edb){_0x50bb45[_0x85fb('0x24')]=_0x4d8edb;if(_0x5e5ee2[_0x85fb('0x36')]['includeAll']){_0xae7c63[_0x85fb('0x46')]=[{'all':!![]}];}else{_0xae7c63[_0x85fb('0x46')]=[{'model':db['CmContact'],'as':_0x85fb('0x126'),'required':![]},{'model':db['Attachment'],'as':'Attachments','required':![]}];}return db['ChatOfflineMessage']['findAll'](_0xae7c63);})[_0x85fb('0x15')](function(_0x14dad7){_0x50bb45[_0x85fb('0x47')]=_0x14dad7;return _0x50bb45;});}})[_0x85fb('0x15')](respondWithFilteredResult(_0x1a1acd,_0xae7c63))[_0x85fb('0x4a')](handleError(_0x1a1acd,null));};exports['addAgents']=function(_0xc73627,_0x2121c8){return db[_0x85fb('0x32')][_0x85fb('0x49')]({'where':{'id':_0xc73627[_0x85fb('0x54')]['id']}})['then'](handleEntityNotFound(_0x2121c8,null))['then'](function(_0x1d8d29){if(_0x1d8d29){return _0x1d8d29[_0x85fb('0x127')](_0xc73627[_0x85fb('0x4c')][_0x85fb('0x5e')],_['omit'](_0xc73627[_0x85fb('0x4c')],[_0x85fb('0x5e'),'id'])||{})[_0x85fb('0xb0')](function(_0x4be81a){for(var _0xdeb9f6=0x0;_0xdeb9f6<_0xc73627[_0x85fb('0x4c')][_0x85fb('0x5e')]['length'];_0xdeb9f6+=0x1){socket['emit'](_0x85fb('0x128'),{'UserId':Number(_0xc73627['body'][_0x85fb('0x5e')][_0xdeb9f6]),'ChatWebsiteId':Number(_0xc73627['params']['id'])});}return _0x4be81a;});}})[_0x85fb('0x15')](respondWithResult(_0x2121c8,null))['catch'](handleError(_0x2121c8,null));};exports[_0x85fb('0x129')]=function(_0x17e755,_0x5d8b76){return db['ChatWebsite'][_0x85fb('0x49')]({'where':{'id':_0x17e755['params']['id']}})[_0x85fb('0x15')](handleEntityNotFound(_0x5d8b76,null))[_0x85fb('0x15')](function(_0x556499){if(_0x556499){return _0x556499[_0x85fb('0x129')](_0x17e755[_0x85fb('0x36')]['ids'])[_0x85fb('0x15')](function(){if(_[_0x85fb('0x12a')](_0x17e755['query']['ids'])){for(var _0x356821=0x0;_0x356821<_0x17e755[_0x85fb('0x36')]['ids']['length'];_0x356821+=0x1){socket[_0x85fb('0x12b')](_0x85fb('0x12c'),{'UserId':Number(_0x17e755[_0x85fb('0x36')][_0x85fb('0x5e')][_0x356821]),'ChatWebsiteId':Number(_0x17e755[_0x85fb('0x54')]['id'])});}}else{socket[_0x85fb('0x12b')](_0x85fb('0x12c'),{'UserId':Number(_0x17e755['query'][_0x85fb('0x5e')]),'ChatWebsiteId':Number(_0x17e755[_0x85fb('0x54')]['id'])});}});}})[_0x85fb('0x15')](respondWithStatusCode(_0x5d8b76,null))['catch'](handleError(_0x5d8b76,null));};exports['getAgents']=function(_0x7e273b,_0x120367){var _0x362829={};var _0x37a658={};var _0x240aac;var _0x267e80;return db[_0x85fb('0x32')]['findOne']({'where':{'id':_0x7e273b['params']['id']}})[_0x85fb('0x15')](handleEntityNotFound(_0x120367,null))[_0x85fb('0x15')](function(_0x5a596d){if(_0x5a596d){_0x240aac=_0x5a596d;_0x37a658[_0x85fb('0x35')]=_[_0x85fb('0x37')](db[_0x85fb('0xbc')][_0x85fb('0x33')]);_0x37a658[_0x85fb('0x36')]=_[_0x85fb('0x37')](_0x7e273b[_0x85fb('0x36')]);_0x37a658[_0x85fb('0x38')]=_[_0x85fb('0x39')](_0x37a658[_0x85fb('0x35')],_0x37a658[_0x85fb('0x36')]);_0x362829[_0x85fb('0x3b')]=_[_0x85fb('0x39')](_0x37a658[_0x85fb('0x35')],qs[_0x85fb('0x3a')](_0x7e273b[_0x85fb('0x36')][_0x85fb('0x3a')]));_0x362829[_0x85fb('0x3b')]=_0x362829['attributes']['length']?_0x362829[_0x85fb('0x3b')]:_0x37a658[_0x85fb('0x35')];_0x362829[_0x85fb('0x3e')]=qs[_0x85fb('0x3f')](_0x7e273b[_0x85fb('0x36')][_0x85fb('0x3f')]);_0x362829[_0x85fb('0x40')]=qs[_0x85fb('0x38')](_[_0x85fb('0x5b')](_0x7e273b['query'],_0x37a658['filters']));if(_0x7e273b['query'][_0x85fb('0x41')]){_0x362829[_0x85fb('0x40')]=_[_0x85fb('0x43')](_0x362829[_0x85fb('0x40')],{'$or':_[_0x85fb('0x31')](_0x362829[_0x85fb('0x3b')],function(_0x3037c8){var _0x16c01d={};_0x16c01d[_0x3037c8]={'$like':'%'+_0x7e273b[_0x85fb('0x36')][_0x85fb('0x41')]+'%'};return _0x16c01d;})});}_0x362829=_[_0x85fb('0x43')]({},_0x362829,_0x7e273b['options']);return _0x240aac[_0x85fb('0x12d')](_0x362829);}})[_0x85fb('0x15')](function(_0x4bc6e2){if(_0x4bc6e2){_0x267e80=_0x4bc6e2[_0x85fb('0x48')];if(!_0x7e273b['query'][_0x85fb('0x3c')](_0x85fb('0x3d'))){_0x362829[_0x85fb('0x23')]=qs['limit'](_0x7e273b[_0x85fb('0x36')][_0x85fb('0x23')]);_0x362829['offset']=qs['offset'](_0x7e273b[_0x85fb('0x36')][_0x85fb('0x21')]);}return _0x240aac['getAgents'](_0x362829);}})[_0x85fb('0x15')](function(_0x281352){if(_0x281352){return _0x281352?{'count':_0x267e80,'rows':_0x281352}:null;}})['then'](respondWithResult(_0x120367,null))[_0x85fb('0x4a')](handleError(_0x120367,null));}; \ No newline at end of file +var _0xdfa3=['unshift','waitForTheAssignedAgent','forcedOwnership','Start','startRouting','EventManager','notify','offline','files','send','mapKeyOffline','mapKeyOffline\x20is\x20mandatory,\x20please\x20use\x20one\x20of\x20these:\x20','mapKeyOffline\x20invalid,\x20please\x20use\x20one\x20of\x20these:\x20','MailAccount','findOrCreate','server/files/templates/chatOfflineMessage.ejs','utf8','render','toPairs','offlineMessageBody','ChatOfflineMessage','originalname','mimetype','attachments','offline-chat','basename','openNewInteraction','sequelize','Attachment','bulkCreate','MailServerOut','Smtp','CloudProvider','forwardOffline','forwardOfflineAddress','getSmtpOptions','SendMail','sendMail','\x22%s\x22\x20<%s>','email','MailAccountId','subjectOffline','toPairsIn','mapValues','offlineMessageSubject','Chat','NotifyMailAccount','notifyMail','server','Could\x20not\x20remove\x20attachment\x20file','omit','getInteractions','Contact','Owner','fullname','internal','Tag','Tags','color','tag','Command','getSnippet','timezone','interval','indexOf','true','[%s][INTERVAL][%s]\x20%s\x20%s\x20(%s)','ONLINE','OFFLINE','inspect','Interval','Intervals','getProactiveActions','../../config/license/util','virtual','License','increment','chatLicenseExceeded','some','readFileSync','server/files/chat/iframe.ejs','URL','address','origin','3.1.0','remote','x-real-ip','connection','remoteAddress','replace','alignment','verticalAlignment','textColor','color_button','backgroundColor','hideWhenOffline','IntervalId','addApplications','transaction','Transaction','ISOLATION_LEVELS','READ_COMMITTED','ChatApplication','findAndCountAll','priority','finally','getApplications','chatProactiveAction','addProactiveActions','ChatProactiveAction','getFields','online','false','offlineForm','onlineForm','items','fromKey','Attachments','addAgents','emit','removeAgents','isArray','userChatWebsite:remove','getAgents','bluebird','mustache','path','ejs','fs-extra','querystring','ioredis','../../components/parsers/qs','../../config/environment','../../mysqldb','redis','localhost','html-to-text','jayson/promise','client','http','request\x20sent','debug','stringify','error','code','ChatWebsite,\x20%s,\x20%s','message','info','result','catch','status','json','offset','undefined','limit','count','set','Content-Range','update','destroy','then','get','ChatWebsites','UserProfileResource','end','sendStatus','stack','name','index','mandatoryDispositionPause','ChatWebsite','rawAttributes','fieldName','type','model','query','intersection','fields','attributes','length','hasOwnProperty','nolimit','order','sort','where','filters','pick','merge','map','VIRTUAL','options','include','rows','show','params','Pause','keys','includeAll','find','create','body','user','role','userProfileId','autoAssociation','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','describe','addDisposition','ChatWebsiteId','getDispositions','findOne','Disposition','filter','findAll','removeDispositions','ids','getAnswers','CannedAnswer','removeAnswers','addLogo','sitepic','file','filename','addAvatar','agentAvatar','addSystemAvatar','systemAvatar','getLogo','join','getLicense','custom','isNil','existsSync','root','server/files/images/logos/','download','getAvatar','server/files/images/avatars/default_avatar.png','server/files/images/avatars/customer_avatar.png','customerAvatar','showCustomerAvatar','server/files/images/avatars/','getSystemAvatar','server/files/images/avatars/system_avatar.png','user-agent-parser','setUA','headers','getResult','chat','ValidationError','no\x20available\x20attributes','difference','createdAt','updatedAt','CompanyId','Sequelize','from\x20is\x20mandatory','body\x20is\x20mandatory\x20and\x20not\x20empty','mapKey','mapKey\x20is\x20mandatory,\x20please\x20use\x20one\x20of\x20these:\x20','includes','mapKey\x20invalid,\x20please\x20use\x20one\x20of\x20these:\x20','CmList','List','CmContact','Contacts','DESC','account','applications','Applications','list','orderBy','asc','defaults','from','ListId','contact','customerIp','cf-connecting-ip','x-forwarded-for','first','split','firstName','lastName','x-real-port','referer','browser','version','format','%s\x20%s','unknown','device','%s\x20%s\x20%s','vendor','threadId','externalUrl','ChatInteraction','ContactId','interaction','spread','messageId','created','close','unmanaged','*,*,*,*','AttachmentId','User','UserId'];(function(_0x4bc243,_0x4a2e05){var _0x2723f9=function(_0x3af366){while(--_0x3af366){_0x4bc243['push'](_0x4bc243['shift']());}};_0x2723f9(++_0x4a2e05);}(_0xdfa3,0x7c));var _0x3dfa=function(_0x35c1c8,_0x14f618){_0x35c1c8=_0x35c1c8-0x0;var _0x3b0377=_0xdfa3[_0x35c1c8];return _0x3b0377;};'use strict';var BPromise=require(_0x3dfa('0x0'));var Mustache=require(_0x3dfa('0x1'));var util=require('util');var path=require(_0x3dfa('0x2'));var ejs=require(_0x3dfa('0x3'));var fs=require('fs');var fs_extra=require(_0x3dfa('0x4'));var _=require('lodash');var querystring=require(_0x3dfa('0x5'));var Redis=require(_0x3dfa('0x6'));var qs=require(_0x3dfa('0x7'));var logger=require('../../config/logger')('api');var config=require(_0x3dfa('0x8'));var url=require('url');var db=require(_0x3dfa('0x9'))['db'];config[_0x3dfa('0xa')]=_['defaults'](config[_0x3dfa('0xa')],{'host':_0x3dfa('0xb'),'port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config[_0x3dfa('0xa')]));require('./chatWebsite.socket')['register'](socket);var htmlToText=require(_0x3dfa('0xc'));var jayson=require(_0x3dfa('0xd'));var client=jayson[_0x3dfa('0xe')]['http']({'port':0x232c});var client9002=jayson[_0x3dfa('0xe')][_0x3dfa('0xf')]({'port':0x232a});var client9003=jayson[_0x3dfa('0xe')][_0x3dfa('0xf')]({'port':0x232b});var client9001=jayson[_0x3dfa('0xe')][_0x3dfa('0xf')]({'port':0x2329});function respondWithRpcPromise(_0x16fdd2,_0x1b05d5,_0x5cd41e,_0x8970e9){return new BPromise(function(_0x3a7cdb,_0x3ee286){var _0x1f5f8c=_0x8970e9||client;return _0x1f5f8c['request'](_0x16fdd2,_0x5cd41e)['then'](function(_0x1d0358){logger['info']('ChatWebsite,\x20%s,\x20%s',_0x1b05d5,_0x3dfa('0x10'));logger[_0x3dfa('0x11')]('ChatWebsite,\x20%s,\x20%s,\x20%s',_0x1b05d5,_0x3dfa('0x10'),JSON[_0x3dfa('0x12')](_0x1d0358));if(_0x1d0358['error']){if(_0x1d0358[_0x3dfa('0x13')][_0x3dfa('0x14')]===0x1f4){logger[_0x3dfa('0x13')](_0x3dfa('0x15'),_0x1b05d5,_0x1d0358[_0x3dfa('0x13')][_0x3dfa('0x16')]);return _0x3ee286(_0x1d0358['error'][_0x3dfa('0x16')]);}logger[_0x3dfa('0x13')](_0x3dfa('0x15'),_0x1b05d5,_0x1d0358[_0x3dfa('0x13')]['message']);return _0x3a7cdb(_0x1d0358[_0x3dfa('0x13')][_0x3dfa('0x16')]);}else{logger[_0x3dfa('0x17')]('ChatWebsite,\x20%s,\x20%s',_0x1b05d5,_0x3dfa('0x10'));_0x3a7cdb(_0x1d0358[_0x3dfa('0x18')][_0x3dfa('0x16')]);}})[_0x3dfa('0x19')](function(_0x45af18){logger[_0x3dfa('0x13')]('ChatWebsite,\x20%s,\x20%s',_0x1b05d5,_0x45af18);_0x3ee286(_0x45af18);});});}function respondWithStatusCode(_0x1663b1,_0x321a35){_0x321a35=_0x321a35||0xcc;return function(_0x899f3){if(_0x899f3){return _0x1663b1['sendStatus'](_0x321a35);}return _0x1663b1[_0x3dfa('0x1a')](_0x321a35)['end']();};}function respondWithResult(_0x4084cb,_0x482ea2){_0x482ea2=_0x482ea2||0xc8;return function(_0x99b4fc){if(_0x99b4fc){return _0x4084cb[_0x3dfa('0x1a')](_0x482ea2)[_0x3dfa('0x1b')](_0x99b4fc);}};}function respondWithFilteredResult(_0x1df43c,_0x3b53cc){return function(_0x485acb){if(_0x485acb){var _0x584abb=typeof _0x3b53cc[_0x3dfa('0x1c')]===_0x3dfa('0x1d')&&typeof _0x3b53cc[_0x3dfa('0x1e')]===_0x3dfa('0x1d');var _0x5cbc4f=_0x485acb[_0x3dfa('0x1f')];var _0x3ed1e6=_0x584abb?0x0:_0x3b53cc[_0x3dfa('0x1c')];var _0x53cb58=_0x584abb?_0x485acb[_0x3dfa('0x1f')]:_0x3b53cc[_0x3dfa('0x1c')]+_0x3b53cc[_0x3dfa('0x1e')];var _0x407124;if(_0x53cb58>=_0x5cbc4f){_0x53cb58=_0x5cbc4f;_0x407124=0xc8;}else{_0x407124=0xce;}_0x1df43c[_0x3dfa('0x1a')](_0x407124);return _0x1df43c[_0x3dfa('0x20')](_0x3dfa('0x21'),_0x3ed1e6+'-'+_0x53cb58+'/'+_0x5cbc4f)[_0x3dfa('0x1b')](_0x485acb);}return null;};}function saveUpdates(_0x3b7065){return function(_0x4a3202){if(_0x4a3202){return _0x4a3202[_0x3dfa('0x22')](_0x3b7065)['then'](function(_0x1d59d1){return _0x1d59d1;});}return null;};}function removeEntity(_0x5cb99b){return function(_0x488f9d){if(_0x488f9d){return _0x488f9d[_0x3dfa('0x23')]()[_0x3dfa('0x24')](function(){var _0x18d5df=_0x488f9d[_0x3dfa('0x25')]({'plain':!![]});var _0x4fcf81=_0x3dfa('0x26');return db[_0x3dfa('0x27')][_0x3dfa('0x23')]({'where':{'type':_0x4fcf81,'resourceId':_0x18d5df['id']}})[_0x3dfa('0x24')](function(){return _0x488f9d;});})[_0x3dfa('0x24')](function(){_0x5cb99b[_0x3dfa('0x1a')](0xcc)[_0x3dfa('0x28')]();});}};}function handleEntityNotFound(_0x2fa93b){return function(_0x368b1d){if(!_0x368b1d){_0x2fa93b[_0x3dfa('0x29')](0x194);}return _0x368b1d;};}function handleError(_0x1cd94,_0x31530d){_0x31530d=_0x31530d||0x1f4;return function(_0x489d62){logger['error'](_0x489d62[_0x3dfa('0x2a')]);if(_0x489d62[_0x3dfa('0x2b')]){delete _0x489d62['name'];}_0x1cd94['status'](_0x31530d)['send'](_0x489d62);};}exports[_0x3dfa('0x2c')]=function(_0xbbae0d,_0x2ef008){var _0xc0d997={'include':[{'model':db['Pause'],'as':_0x3dfa('0x2d')}]},_0x1b04f4={},_0x2bcbfe={'count':0x0,'rows':[]};var _0x400b34=_['map'](db[_0x3dfa('0x2e')][_0x3dfa('0x2f')],function(_0x484f60){return{'name':_0x484f60[_0x3dfa('0x30')],'type':_0x484f60[_0x3dfa('0x31')]['key']};});_0x1b04f4[_0x3dfa('0x32')]=_['map'](_0x400b34,_0x3dfa('0x2b'));_0x1b04f4[_0x3dfa('0x33')]=_['keys'](_0xbbae0d[_0x3dfa('0x33')]);_0x1b04f4['filters']=_[_0x3dfa('0x34')](_0x1b04f4[_0x3dfa('0x32')],_0x1b04f4[_0x3dfa('0x33')]);_0xc0d997['attributes']=_[_0x3dfa('0x34')](_0x1b04f4['model'],qs[_0x3dfa('0x35')](_0xbbae0d[_0x3dfa('0x33')]['fields']));_0xc0d997[_0x3dfa('0x36')]=_0xc0d997[_0x3dfa('0x36')][_0x3dfa('0x37')]?_0xc0d997['attributes']:_0x1b04f4[_0x3dfa('0x32')];if(!_0xbbae0d[_0x3dfa('0x33')][_0x3dfa('0x38')](_0x3dfa('0x39'))){_0xc0d997['limit']=qs[_0x3dfa('0x1e')](_0xbbae0d[_0x3dfa('0x33')][_0x3dfa('0x1e')]);_0xc0d997[_0x3dfa('0x1c')]=qs[_0x3dfa('0x1c')](_0xbbae0d[_0x3dfa('0x33')][_0x3dfa('0x1c')]);}_0xc0d997[_0x3dfa('0x3a')]=qs[_0x3dfa('0x3b')](_0xbbae0d[_0x3dfa('0x33')][_0x3dfa('0x3b')]);_0xc0d997[_0x3dfa('0x3c')]=qs[_0x3dfa('0x3d')](_[_0x3dfa('0x3e')](_0xbbae0d[_0x3dfa('0x33')],_0x1b04f4[_0x3dfa('0x3d')]),_0x400b34);if(_0xbbae0d[_0x3dfa('0x33')]['filter']){_0xc0d997[_0x3dfa('0x3c')]=_[_0x3dfa('0x3f')](_0xc0d997['where'],{'$or':_[_0x3dfa('0x40')](_0x400b34,function(_0x221c73){if(_0x221c73[_0x3dfa('0x31')]!==_0x3dfa('0x41')){var _0x36864f={};_0x36864f[_0x221c73[_0x3dfa('0x2b')]]={'$like':'%'+_0xbbae0d['query']['filter']+'%'};return _0x36864f;}})});}_0xc0d997=_[_0x3dfa('0x3f')]({},_0xc0d997,_0xbbae0d[_0x3dfa('0x42')]);var _0x570317={'where':_0xc0d997['where']};return db[_0x3dfa('0x2e')][_0x3dfa('0x1f')](_0x570317)[_0x3dfa('0x24')](function(_0xa12303){_0x2bcbfe[_0x3dfa('0x1f')]=_0xa12303;if(_0xbbae0d['query']['includeAll']){_0xc0d997[_0x3dfa('0x43')]=[{'all':!![]}];}return db['ChatWebsite']['findAll'](_0xc0d997);})[_0x3dfa('0x24')](function(_0x53fc70){_0x2bcbfe[_0x3dfa('0x44')]=_0x53fc70;return _0x2bcbfe;})['then'](respondWithFilteredResult(_0x2ef008,_0xc0d997))['catch'](handleError(_0x2ef008,null));};exports[_0x3dfa('0x45')]=function(_0x4ca71c,_0x2228b7){var _0x2e9ed2={'raw':![],'where':{'id':_0x4ca71c[_0x3dfa('0x46')]['id']},'include':[{'model':db[_0x3dfa('0x47')],'as':_0x3dfa('0x2d')}]},_0x42f228={};_0x42f228[_0x3dfa('0x32')]=_[_0x3dfa('0x48')](db[_0x3dfa('0x2e')][_0x3dfa('0x2f')]);_0x42f228[_0x3dfa('0x33')]=_['keys'](_0x4ca71c[_0x3dfa('0x33')]);_0x42f228[_0x3dfa('0x3d')]=_['intersection'](_0x42f228[_0x3dfa('0x32')],_0x42f228['query']);_0x2e9ed2[_0x3dfa('0x36')]=_[_0x3dfa('0x34')](_0x42f228[_0x3dfa('0x32')],qs['fields'](_0x4ca71c[_0x3dfa('0x33')][_0x3dfa('0x35')]));_0x2e9ed2[_0x3dfa('0x36')]=_0x2e9ed2[_0x3dfa('0x36')]['length']?_0x2e9ed2['attributes']:_0x42f228['model'];if(_0x4ca71c['query'][_0x3dfa('0x49')]){_0x2e9ed2[_0x3dfa('0x43')]=[{'all':!![]}];}_0x2e9ed2=_[_0x3dfa('0x3f')]({},_0x2e9ed2,_0x4ca71c[_0x3dfa('0x42')]);return db[_0x3dfa('0x2e')][_0x3dfa('0x4a')](_0x2e9ed2)[_0x3dfa('0x24')](handleEntityNotFound(_0x2228b7,null))['then'](respondWithResult(_0x2228b7,null))[_0x3dfa('0x19')](handleError(_0x2228b7,null));};exports[_0x3dfa('0x4b')]=function(_0x5df4c1,_0x23b98d){return db[_0x3dfa('0x2e')][_0x3dfa('0x4b')](_0x5df4c1[_0x3dfa('0x4c')],{})[_0x3dfa('0x24')](function(_0x5ddbd1){var _0x2a883d=_0x5df4c1[_0x3dfa('0x4d')]['get']({'plain':!![]});if(!_0x2a883d)throw new Error('Unable\x20to\x20retrieve\x20the\x20current\x20user');if(_0x2a883d[_0x3dfa('0x4e')]===_0x3dfa('0x4d')){var _0x37766f=_0x5ddbd1[_0x3dfa('0x25')]({'plain':!![]});var _0xc5d885='ChatWebsites';return db['UserProfileSection'][_0x3dfa('0x4a')]({'where':{'name':_0xc5d885,'userProfileId':_0x2a883d[_0x3dfa('0x4f')]},'raw':!![]})[_0x3dfa('0x24')](function(_0x4b9eea){if(_0x4b9eea&&_0x4b9eea[_0x3dfa('0x50')]===0x0){return db[_0x3dfa('0x27')]['create']({'name':_0x37766f['name'],'resourceId':_0x37766f['id'],'type':_0x4b9eea[_0x3dfa('0x2b')],'sectionId':_0x4b9eea['id']},{})['then'](function(){return _0x5ddbd1;});}else{return _0x5ddbd1;}})[_0x3dfa('0x19')](function(_0xdefd7e){logger[_0x3dfa('0x13')](_0x3dfa('0x51'),_0xdefd7e);throw _0xdefd7e;});}return _0x5ddbd1;})['then'](respondWithResult(_0x23b98d,0xc9))[_0x3dfa('0x19')](handleError(_0x23b98d,null));};exports['update']=function(_0x4502a8,_0x125616){if(_0x4502a8[_0x3dfa('0x4c')]['id']){delete _0x4502a8['body']['id'];}return db['ChatWebsite'][_0x3dfa('0x4a')]({'where':{'id':_0x4502a8[_0x3dfa('0x46')]['id']},'include':[{'model':db[_0x3dfa('0x47')],'as':_0x3dfa('0x2d')}]})['then'](handleEntityNotFound(_0x125616,null))[_0x3dfa('0x24')](saveUpdates(_0x4502a8['body'],null))[_0x3dfa('0x24')](respondWithResult(_0x125616,null))['catch'](handleError(_0x125616,null));};exports[_0x3dfa('0x23')]=function(_0x4591ea,_0x2fe2ce){return db[_0x3dfa('0x2e')][_0x3dfa('0x4a')]({'where':{'id':_0x4591ea[_0x3dfa('0x46')]['id']}})[_0x3dfa('0x24')](handleEntityNotFound(_0x2fe2ce,null))[_0x3dfa('0x24')](removeEntity(_0x2fe2ce,null))[_0x3dfa('0x19')](handleError(_0x2fe2ce,null));};exports[_0x3dfa('0x52')]=function(_0x489bfd,_0xbba7ae){return db[_0x3dfa('0x2e')]['describe']()['then'](respondWithResult(_0xbba7ae,null))[_0x3dfa('0x19')](handleError(_0xbba7ae,null));};exports[_0x3dfa('0x53')]=function(_0x5ef107,_0x5c8d51){if(_0x5ef107['body']['id']){delete _0x5ef107[_0x3dfa('0x4c')]['id'];}return db['ChatWebsite'][_0x3dfa('0x4a')]({'where':{'id':_0x5ef107['params']['id']}})[_0x3dfa('0x24')](handleEntityNotFound(_0x5c8d51,null))['then'](function(_0x38c42a){if(_0x38c42a){_0x5ef107[_0x3dfa('0x4c')][_0x3dfa('0x54')]=_0x38c42a['id'];return db['Disposition'][_0x3dfa('0x4b')](_0x5ef107[_0x3dfa('0x4c')]);}})['then'](respondWithResult(_0x5c8d51,null))[_0x3dfa('0x19')](handleError(_0x5c8d51,null));};exports[_0x3dfa('0x55')]=function(_0x39c9ae,_0x46f3cc){var _0x563a09={'raw':![],'where':{}};var _0x5eb170={};var _0x4efe68={'count':0x0,'rows':[]};return db['ChatWebsite'][_0x3dfa('0x56')]({'where':{'id':_0x39c9ae[_0x3dfa('0x46')]['id']}})[_0x3dfa('0x24')](handleEntityNotFound(_0x46f3cc,null))[_0x3dfa('0x24')](function(_0x573a39){if(_0x573a39){_0x5eb170[_0x3dfa('0x32')]=_[_0x3dfa('0x48')](db[_0x3dfa('0x57')][_0x3dfa('0x2f')]);_0x5eb170[_0x3dfa('0x33')]=_[_0x3dfa('0x48')](_0x39c9ae[_0x3dfa('0x33')]);_0x5eb170['filters']=_[_0x3dfa('0x34')](_0x5eb170[_0x3dfa('0x32')],_0x5eb170[_0x3dfa('0x33')]);_0x563a09[_0x3dfa('0x36')]=_[_0x3dfa('0x34')](_0x5eb170[_0x3dfa('0x32')],qs[_0x3dfa('0x35')](_0x39c9ae[_0x3dfa('0x33')][_0x3dfa('0x35')]));_0x563a09['attributes']=_0x563a09['attributes'][_0x3dfa('0x37')]?_0x563a09[_0x3dfa('0x36')]:_0x5eb170['model'];if(!_0x39c9ae[_0x3dfa('0x33')]['hasOwnProperty'](_0x3dfa('0x39'))){_0x563a09[_0x3dfa('0x1e')]=qs[_0x3dfa('0x1e')](_0x39c9ae[_0x3dfa('0x33')][_0x3dfa('0x1e')]);_0x563a09[_0x3dfa('0x1c')]=qs[_0x3dfa('0x1c')](_0x39c9ae[_0x3dfa('0x33')][_0x3dfa('0x1c')]);}_0x563a09[_0x3dfa('0x3a')]=qs[_0x3dfa('0x3b')](_0x39c9ae['query']['sort']);_0x563a09[_0x3dfa('0x3c')]=qs[_0x3dfa('0x3d')](_[_0x3dfa('0x3e')](_0x39c9ae[_0x3dfa('0x33')],_0x5eb170['filters']));_0x563a09[_0x3dfa('0x3c')][_0x3dfa('0x54')]=_0x573a39['id'];if(_0x39c9ae['query'][_0x3dfa('0x58')]){_0x563a09['where']=_[_0x3dfa('0x3f')](_0x563a09[_0x3dfa('0x3c')],{'$or':_[_0x3dfa('0x40')](_0x563a09[_0x3dfa('0x36')],function(_0x539e9){var _0x3744fc={};_0x3744fc[_0x539e9]={'$like':'%'+_0x39c9ae[_0x3dfa('0x33')][_0x3dfa('0x58')]+'%'};return _0x3744fc;})});}_0x563a09=_[_0x3dfa('0x3f')]({},_0x563a09,_0x39c9ae['options']);return db[_0x3dfa('0x57')][_0x3dfa('0x1f')]({'where':_0x563a09[_0x3dfa('0x3c')]})['then'](function(_0x1807b2){_0x4efe68[_0x3dfa('0x1f')]=_0x1807b2;if(_0x39c9ae[_0x3dfa('0x33')][_0x3dfa('0x49')]){_0x563a09['include']=[{'all':!![]}];}return db['Disposition'][_0x3dfa('0x59')](_0x563a09);})[_0x3dfa('0x24')](function(_0x3b2d2e){_0x4efe68['rows']=_0x3b2d2e;return _0x4efe68;});}})[_0x3dfa('0x24')](respondWithFilteredResult(_0x46f3cc,_0x563a09))[_0x3dfa('0x19')](handleError(_0x46f3cc,null));};exports[_0x3dfa('0x5a')]=function(_0x4cb3ee,_0x599c54){return db[_0x3dfa('0x2e')]['find']({'where':{'id':_0x4cb3ee['params']['id']}})[_0x3dfa('0x24')](handleEntityNotFound(_0x599c54,null))[_0x3dfa('0x24')](function(_0x3284d4){if(_0x3284d4){return _0x3284d4[_0x3dfa('0x5a')](_0x4cb3ee[_0x3dfa('0x33')][_0x3dfa('0x5b')]);}})[_0x3dfa('0x24')](respondWithStatusCode(_0x599c54,null))[_0x3dfa('0x19')](handleError(_0x599c54,null));};exports['addAnswer']=function(_0x1aa932,_0x39e839){if(_0x1aa932[_0x3dfa('0x4c')]['id']){delete _0x1aa932['body']['id'];}return db[_0x3dfa('0x2e')]['find']({'where':{'id':_0x1aa932['params']['id']}})[_0x3dfa('0x24')](handleEntityNotFound(_0x39e839,null))[_0x3dfa('0x24')](function(_0x44ffe2){if(_0x44ffe2){_0x1aa932[_0x3dfa('0x4c')][_0x3dfa('0x54')]=_0x44ffe2['id'];return db['CannedAnswer']['create'](_0x1aa932[_0x3dfa('0x4c')]);}})[_0x3dfa('0x24')](respondWithResult(_0x39e839,null))['catch'](handleError(_0x39e839,null));};exports[_0x3dfa('0x5c')]=function(_0x37bc30,_0x2f19ed){var _0x2ebd35={'raw':![],'where':{}};var _0x3a02ae={};var _0x5e072b={'count':0x0,'rows':[]};return db['ChatWebsite'][_0x3dfa('0x56')]({'where':{'id':_0x37bc30[_0x3dfa('0x46')]['id']}})[_0x3dfa('0x24')](handleEntityNotFound(_0x2f19ed,null))[_0x3dfa('0x24')](function(_0x2424e5){if(_0x2424e5){_0x3a02ae[_0x3dfa('0x32')]=_[_0x3dfa('0x48')](db[_0x3dfa('0x5d')][_0x3dfa('0x2f')]);_0x3a02ae[_0x3dfa('0x33')]=_[_0x3dfa('0x48')](_0x37bc30[_0x3dfa('0x33')]);_0x3a02ae[_0x3dfa('0x3d')]=_[_0x3dfa('0x34')](_0x3a02ae[_0x3dfa('0x32')],_0x3a02ae[_0x3dfa('0x33')]);_0x2ebd35[_0x3dfa('0x36')]=_[_0x3dfa('0x34')](_0x3a02ae[_0x3dfa('0x32')],qs[_0x3dfa('0x35')](_0x37bc30[_0x3dfa('0x33')]['fields']));_0x2ebd35['attributes']=_0x2ebd35['attributes'][_0x3dfa('0x37')]?_0x2ebd35[_0x3dfa('0x36')]:_0x3a02ae[_0x3dfa('0x32')];if(!_0x37bc30[_0x3dfa('0x33')]['hasOwnProperty'](_0x3dfa('0x39'))){_0x2ebd35[_0x3dfa('0x1e')]=qs[_0x3dfa('0x1e')](_0x37bc30[_0x3dfa('0x33')][_0x3dfa('0x1e')]);_0x2ebd35['offset']=qs[_0x3dfa('0x1c')](_0x37bc30[_0x3dfa('0x33')]['offset']);}_0x2ebd35[_0x3dfa('0x3a')]=qs[_0x3dfa('0x3b')](_0x37bc30['query'][_0x3dfa('0x3b')]);_0x2ebd35[_0x3dfa('0x3c')]=qs[_0x3dfa('0x3d')](_[_0x3dfa('0x3e')](_0x37bc30[_0x3dfa('0x33')],_0x3a02ae[_0x3dfa('0x3d')]));_0x2ebd35['where']['ChatWebsiteId']=_0x2424e5['id'];if(_0x37bc30[_0x3dfa('0x33')][_0x3dfa('0x58')]){_0x2ebd35[_0x3dfa('0x3c')]=_[_0x3dfa('0x3f')](_0x2ebd35['where'],{'$or':_[_0x3dfa('0x40')](_0x2ebd35['attributes'],function(_0x411222){var _0x5e3abf={};_0x5e3abf[_0x411222]={'$like':'%'+_0x37bc30[_0x3dfa('0x33')][_0x3dfa('0x58')]+'%'};return _0x5e3abf;})});}_0x2ebd35=_[_0x3dfa('0x3f')]({},_0x2ebd35,_0x37bc30[_0x3dfa('0x42')]);return db[_0x3dfa('0x5d')][_0x3dfa('0x1f')]({'where':_0x2ebd35['where']})['then'](function(_0x31ef0b){_0x5e072b[_0x3dfa('0x1f')]=_0x31ef0b;if(_0x37bc30[_0x3dfa('0x33')][_0x3dfa('0x49')]){_0x2ebd35[_0x3dfa('0x43')]=[{'all':!![]}];}return db[_0x3dfa('0x5d')][_0x3dfa('0x59')](_0x2ebd35);})[_0x3dfa('0x24')](function(_0xcfc779){_0x5e072b[_0x3dfa('0x44')]=_0xcfc779;return _0x5e072b;});}})['then'](respondWithFilteredResult(_0x2f19ed,_0x2ebd35))[_0x3dfa('0x19')](handleError(_0x2f19ed,null));};exports[_0x3dfa('0x5e')]=function(_0x193013,_0x18fa76){return db[_0x3dfa('0x2e')]['find']({'where':{'id':_0x193013['params']['id']}})[_0x3dfa('0x24')](handleEntityNotFound(_0x18fa76,null))['then'](function(_0x40930d){if(_0x40930d){return _0x40930d['removeAnswers'](_0x193013['query']['ids']);}})[_0x3dfa('0x24')](respondWithStatusCode(_0x18fa76,null))[_0x3dfa('0x19')](handleError(_0x18fa76,null));};exports[_0x3dfa('0x5f')]=function(_0x5ee142,_0x1de974){_0x5ee142[_0x3dfa('0x4c')][_0x3dfa('0x60')]=_0x5ee142[_0x3dfa('0x61')][_0x3dfa('0x62')];return db[_0x3dfa('0x2e')]['find']({'where':{'id':_0x5ee142['params']['id']}})[_0x3dfa('0x24')](handleEntityNotFound(_0x1de974,null))[_0x3dfa('0x24')](saveUpdates(_0x5ee142[_0x3dfa('0x4c')],null))['then'](respondWithResult(_0x1de974,null))[_0x3dfa('0x19')](handleError(_0x1de974,null));};exports[_0x3dfa('0x63')]=function(_0x174218,_0x1d2bc2){_0x174218['body'][_0x3dfa('0x64')]=_0x174218[_0x3dfa('0x61')][_0x3dfa('0x62')];return db[_0x3dfa('0x2e')][_0x3dfa('0x4a')]({'where':{'id':_0x174218[_0x3dfa('0x46')]['id']}})[_0x3dfa('0x24')](handleEntityNotFound(_0x1d2bc2,null))['then'](saveUpdates(_0x174218['body'],null))[_0x3dfa('0x24')](respondWithResult(_0x1d2bc2,null))['catch'](handleError(_0x1d2bc2,null));};exports['addCustomerAvatar']=function(_0x3d50f1,_0x1d0285){_0x3d50f1[_0x3dfa('0x4c')]['customerAvatar']=_0x3d50f1[_0x3dfa('0x61')][_0x3dfa('0x62')];return db[_0x3dfa('0x2e')][_0x3dfa('0x4a')]({'where':{'id':_0x3d50f1[_0x3dfa('0x46')]['id']}})[_0x3dfa('0x24')](handleEntityNotFound(_0x1d0285,null))[_0x3dfa('0x24')](saveUpdates(_0x3d50f1[_0x3dfa('0x4c')],null))[_0x3dfa('0x24')](respondWithResult(_0x1d0285,null))[_0x3dfa('0x19')](handleError(_0x1d0285,null));};exports[_0x3dfa('0x65')]=function(_0x2044cf,_0x14f9dd){_0x2044cf['body'][_0x3dfa('0x66')]=_0x2044cf[_0x3dfa('0x61')][_0x3dfa('0x62')];return db[_0x3dfa('0x2e')]['find']({'where':{'id':_0x2044cf[_0x3dfa('0x46')]['id']}})['then'](handleEntityNotFound(_0x14f9dd,null))[_0x3dfa('0x24')](saveUpdates(_0x2044cf[_0x3dfa('0x4c')],null))[_0x3dfa('0x24')](respondWithResult(_0x14f9dd,null))[_0x3dfa('0x19')](handleError(_0x14f9dd,null));};exports[_0x3dfa('0x67')]=function(_0x40bbce,_0x51ed5c){var _0x29add9=path[_0x3dfa('0x68')](config['root'],'server/files/images/logos/default_logo.svg');var _0x23a2e6={'where':{'id':_0x40bbce['params']['id']},'attributes':['id',_0x3dfa('0x60')],'raw':!![]};var _0x21be63=![];return require('../../config/license/util')[_0x3dfa('0x69')]()['then'](function(_0x37ff30){if(_0x37ff30){_0x21be63=_0x37ff30[_0x3dfa('0x6a')];}})[_0x3dfa('0x24')](function(){return db[_0x3dfa('0x2e')][_0x3dfa('0x4a')](_0x23a2e6);})[_0x3dfa('0x24')](handleEntityNotFound(_0x51ed5c,null))[_0x3dfa('0x24')](function(_0x18c8d2){if(_0x18c8d2){if(!_[_0x3dfa('0x6b')](_0x18c8d2[_0x3dfa('0x60')])){if(fs[_0x3dfa('0x6c')](path[_0x3dfa('0x68')](config['root'],'server/files/images/logos/',_0x18c8d2['sitepic']))&&_0x21be63){_0x29add9=path[_0x3dfa('0x68')](config[_0x3dfa('0x6d')],_0x3dfa('0x6e'),_0x18c8d2['sitepic']);}}return _0x51ed5c[_0x3dfa('0x6f')](_0x29add9);}})[_0x3dfa('0x19')](handleError(_0x51ed5c,null));};exports[_0x3dfa('0x70')]=function(_0xa53146,_0x488b66){var _0x26eef6=path['join'](config[_0x3dfa('0x6d')],_0x3dfa('0x71'));var _0x3c5414={'where':{'id':_0xa53146[_0x3dfa('0x46')]['id']},'attributes':['id',_0x3dfa('0x64')],'raw':!![]};return db['ChatWebsite']['find'](_0x3c5414)['then'](handleEntityNotFound(_0x488b66,null))[_0x3dfa('0x24')](function(_0x279935){if(_0x279935){if(!_[_0x3dfa('0x6b')](_0x279935[_0x3dfa('0x64')])){if(fs[_0x3dfa('0x6c')](path[_0x3dfa('0x68')](config[_0x3dfa('0x6d')],'server/files/images/avatars/',_0x279935[_0x3dfa('0x64')]))){_0x26eef6=path[_0x3dfa('0x68')](config[_0x3dfa('0x6d')],'server/files/images/avatars/',_0x279935['agentAvatar']);}}return _0x488b66[_0x3dfa('0x6f')](_0x26eef6);}})['catch'](handleError(_0x488b66,null));};exports['getCustomerAvatar']=function(_0x48f04d,_0x1df8c4){var _0x1032ac=path[_0x3dfa('0x68')](config[_0x3dfa('0x6d')],_0x3dfa('0x72'));var _0x2f6fa1={'where':{'id':_0x48f04d['params']['id']},'attributes':['id',_0x3dfa('0x73'),_0x3dfa('0x74')],'raw':!![]};return db['ChatWebsite']['find'](_0x2f6fa1)[_0x3dfa('0x24')](handleEntityNotFound(_0x1df8c4,null))[_0x3dfa('0x24')](function(_0xeeeec8){if(_0xeeeec8){if(!_['isNil'](_0xeeeec8['customerAvatar'])){if(fs[_0x3dfa('0x6c')](path[_0x3dfa('0x68')](config['root'],'server/files/images/avatars/',_0xeeeec8[_0x3dfa('0x73')]))&&_0xeeeec8[_0x3dfa('0x74')]){_0x1032ac=path[_0x3dfa('0x68')](config[_0x3dfa('0x6d')],_0x3dfa('0x75'),_0xeeeec8[_0x3dfa('0x73')]);}}return _0x1df8c4[_0x3dfa('0x6f')](_0x1032ac);}})['catch'](handleError(_0x1df8c4,null));};exports[_0x3dfa('0x76')]=function(_0x4b95a1,_0x95c4b5){var _0x42117d=path[_0x3dfa('0x68')](config[_0x3dfa('0x6d')],_0x3dfa('0x77'));var _0x784519={'where':{'id':_0x4b95a1[_0x3dfa('0x46')]['id']},'attributes':['id',_0x3dfa('0x66')],'raw':!![]};return db['ChatWebsite'][_0x3dfa('0x4a')](_0x784519)[_0x3dfa('0x24')](handleEntityNotFound(_0x95c4b5,null))['then'](function(_0x328cb8){if(_0x328cb8){if(!_['isNil'](_0x328cb8[_0x3dfa('0x66')])){if(fs['existsSync'](path[_0x3dfa('0x68')](config[_0x3dfa('0x6d')],_0x3dfa('0x75'),_0x328cb8[_0x3dfa('0x66')]))){_0x42117d=path['join'](config['root'],_0x3dfa('0x75'),_0x328cb8['systemAvatar']);}}return _0x95c4b5['download'](_0x42117d);}})['catch'](handleError(_0x95c4b5,null));};exports['notify']=function(_0x4558bc,_0xc060e9){var _0x308488=require(_0x3dfa('0x78'));var _0x470ff4=new _0x308488();var _0x4054a8=_0x470ff4[_0x3dfa('0x79')](_0x4558bc[_0x3dfa('0x7a')]['user-agent'])[_0x3dfa('0x7b')]();var _0x2858f5={'body':_0x4558bc[_0x3dfa('0x4c')],'channel':_0x3dfa('0x7c')};var _0x2d5901=[];var _0x394bbd=[];var _0x7174bf={};var _0x4ef261=![];return db['CmContact'][_0x3dfa('0x52')]()[_0x3dfa('0x24')](function(_0x52c371){if(!_0x52c371){throw new db['Sequelize'][(_0x3dfa('0x7d'))](_0x3dfa('0x7e'));}_0x2d5901=_[_0x3dfa('0x7f')](_[_0x3dfa('0x48')](_0x52c371),[_0x3dfa('0x80'),_0x3dfa('0x81')]);_0x394bbd=_[_0x3dfa('0x7f')](_[_0x3dfa('0x48')](_0x52c371),[_0x3dfa('0x80'),_0x3dfa('0x81'),_0x3dfa('0x82'),'ListId']);if(_0x4558bc[_0x3dfa('0x4c')]['id']){delete _0x4558bc[_0x3dfa('0x4c')]['id'];}if(_[_0x3dfa('0x6b')](_0x4558bc[_0x3dfa('0x4c')]['from'])){throw new db[(_0x3dfa('0x83'))]['ValidationError'](_0x3dfa('0x84'));}if(_[_0x3dfa('0x6b')](_0x4558bc['body'][_0x3dfa('0x4c')])||_0x4558bc[_0x3dfa('0x4c')][_0x3dfa('0x4c')]===''){throw new db[(_0x3dfa('0x83'))]['ValidationError'](_0x3dfa('0x85'));}if(_[_0x3dfa('0x6b')](_0x4558bc[_0x3dfa('0x4c')][_0x3dfa('0x86')])){throw new db[(_0x3dfa('0x83'))][(_0x3dfa('0x7d'))](_0x3dfa('0x87')+_0x394bbd);}if(!_[_0x3dfa('0x88')](_0x394bbd,_0x4558bc[_0x3dfa('0x4c')][_0x3dfa('0x86')])){throw new db['Sequelize']['ValidationError'](_0x3dfa('0x89')+_0x394bbd);}_0x7174bf[_0x4558bc['body'][_0x3dfa('0x86')]]=_0x4558bc[_0x3dfa('0x4c')]['from'];})[_0x3dfa('0x24')](function(){return db[_0x3dfa('0x2e')][_0x3dfa('0x4a')]({'where':{'id':_0x4558bc['params']['id']},'include':[{'model':db[_0x3dfa('0x8a')],'as':_0x3dfa('0x8b'),'include':[{'model':db[_0x3dfa('0x8c')],'as':_0x3dfa('0x8d'),'where':_0x7174bf,'limit':0x1,'order':[[_0x3dfa('0x81'),_0x3dfa('0x8e')]]}]},{'model':db['ChatApplication'],'as':'Applications'}]});})[_0x3dfa('0x24')](handleEntityNotFound(_0xc060e9,null))['then'](function(_0x2134b0){if(_0x2134b0&&_0x2134b0[_0x3dfa('0x8b')]){_0x2858f5[_0x3dfa('0x8f')]=_0x2134b0;_0x2858f5[_0x3dfa('0x90')]=_0x2134b0[_0x3dfa('0x91')];_0x2858f5[_0x3dfa('0x92')]=_0x2134b0[_0x3dfa('0x8b')];_0x2858f5[_0x3dfa('0x90')]=_[_0x3dfa('0x93')](_0x2858f5[_0x3dfa('0x90')],['priority'],[_0x3dfa('0x94')]);if(_0x2858f5[_0x3dfa('0x8f')]['Applications']){delete _0x2858f5[_0x3dfa('0x8f')][_0x3dfa('0x91')];}if(_0x2858f5[_0x3dfa('0x8f')]['List']&&_0x2858f5['account']['List'][_0x3dfa('0x8d')][_0x3dfa('0x37')]){return _0x2858f5[_0x3dfa('0x8f')][_0x3dfa('0x8b')][_0x3dfa('0x8d')][0x0];}var _0x584f8a=_[_0x3dfa('0x95')](_0x4558bc[_0x3dfa('0x4c')],{'firstName':_0x4558bc['body'][_0x3dfa('0x96')],'ListId':_0x2134b0[_0x3dfa('0x97')]});_0x584f8a[_0x4558bc[_0x3dfa('0x4c')][_0x3dfa('0x86')]]=_0x4558bc[_0x3dfa('0x4c')][_0x3dfa('0x96')];return db[_0x3dfa('0x8c')]['create'](_0x584f8a,{'fields':_0x2d5901,'raw':!![]});}})[_0x3dfa('0x24')](handleEntityNotFound(_0xc060e9,null))['then'](function(_0x456676){_0x2858f5[_0x3dfa('0x98')]=_0x456676;var _0x1ad406=_0x4558bc['body'][_0x3dfa('0x99')];if(_0x4558bc[_0x3dfa('0x7a')][_0x3dfa('0x9a')]){_0x1ad406=_0x4558bc[_0x3dfa('0x7a')]['cf-connecting-ip'];}else if(_0x4558bc[_0x3dfa('0x7a')][_0x3dfa('0x9b')]){_0x1ad406=_[_0x3dfa('0x9c')](_0x4558bc[_0x3dfa('0x7a')][_0x3dfa('0x9b')][_0x3dfa('0x9d')](','));}if(_0x456676){var _0x5e0352={'ContactId':_0x456676['id'],'ChatWebsiteId':_0x4558bc['params']['id'],'from':(_0x456676[_0x3dfa('0x9e')]||'')+'\x20'+(_0x456676[_0x3dfa('0x9f')]||''),'customerIp':_0x1ad406,'customerPort':_0x4558bc['headers']['x-real-port']?_0x4558bc['headers'][_0x3dfa('0xa0')]:null,'referer':_0x4558bc['body'][_0x3dfa('0xa1')],'browserName':_0x4054a8[_0x3dfa('0xa2')][_0x3dfa('0x2b')]&&_0x4054a8[_0x3dfa('0xa2')][_0x3dfa('0xa3')]?util[_0x3dfa('0xa4')](_0x3dfa('0xa5'),_0x4054a8[_0x3dfa('0xa2')][_0x3dfa('0x2b')],_0x4054a8['browser'][_0x3dfa('0xa3')]):_0x3dfa('0xa6'),'browserVersion':_0x4054a8[_0x3dfa('0xa2')][_0x3dfa('0xa3')]||_0x3dfa('0xa6'),'osName':util[_0x3dfa('0xa4')]('%s\x20%s',_0x4054a8['os']['name'],_0x4054a8['os']['version']),'osVersion':_0x4054a8['os']['version'],'deviceModel':_0x4054a8[_0x3dfa('0xa7')]['model']&&_0x4054a8[_0x3dfa('0xa7')]['vendor']?util[_0x3dfa('0xa4')](_0x3dfa('0xa8'),_0x4054a8['device'][_0x3dfa('0x32')],_0x4054a8['device'][_0x3dfa('0xa9')],_0x4054a8['device']['type']):null,'deviceVendor':_0x4054a8[_0x3dfa('0xa7')][_0x3dfa('0xa9')],'deviceType':_0x4054a8[_0x3dfa('0xa7')][_0x3dfa('0x31')],'formData':JSON[_0x3dfa('0x12')](_0x4558bc[_0x3dfa('0x4c')])};var _0x301000={'ChatWebsiteId':_0x4558bc[_0x3dfa('0x46')]['id'],'closed':![]};if(_0x4558bc['body'][_0x3dfa('0xaa')]){_0x301000['threadId']=_0x4558bc[_0x3dfa('0x4c')][_0x3dfa('0xaa')];return db['ChatInteraction'][_0x3dfa('0x4a')]({'where':_0x301000})[_0x3dfa('0x24')](function(_0x5da19f){if(_0x5da19f){return[_0x5da19f,![]];}_0x5e0352[_0x3dfa('0xaa')]=_0x4558bc[_0x3dfa('0x4c')]['threadId'];_0x5e0352[_0x3dfa('0xab')]=_0x4558bc[_0x3dfa('0x4c')][_0x3dfa('0xab')];return db[_0x3dfa('0xac')]['create'](_0x5e0352)[_0x3dfa('0x24')](function(_0x5dcb2e){return[_0x5dcb2e,!![]];});});}_0x301000[_0x3dfa('0xad')]=_0x456676['id'];if(_0x4558bc['body']['interaction']&&_0x4558bc[_0x3dfa('0x4c')]['interaction']['id']){_0x301000['id']=_0x4558bc['body'][_0x3dfa('0xae')]['id'];return db['ChatInteraction'][_0x3dfa('0x4a')]({'where':_0x301000})['then'](function(_0x2c55fb){if(_0x2c55fb){return[_0x2c55fb,![]];}return db['ChatInteraction'][_0x3dfa('0x4b')](_0x5e0352)[_0x3dfa('0x24')](function(_0x521ba9){return[_0x521ba9,!![]];});});}return db['ChatInteraction'][_0x3dfa('0x4b')](_0x5e0352)['then'](function(_0x444264){return[_0x444264,!![]];});}})[_0x3dfa('0xaf')](function(_0x12734d,_0x298812){if(_0x12734d){_0x4ef261=_0x298812;if(!_0x298812){var _0x2a139d={'from':(_0x2858f5[_0x3dfa('0x98')][_0x3dfa('0x9e')]||'')+'\x20'+(_0x2858f5[_0x3dfa('0x98')][_0x3dfa('0x9f')]||'')};if(_0x4558bc[_0x3dfa('0x4c')][_0x3dfa('0xaa')]&&_0x4558bc[_0x3dfa('0x4c')][_0x3dfa('0xb0')]&&_0x4558bc[_0x3dfa('0x4c')][_0x3dfa('0xaa')]!=_0x4558bc[_0x3dfa('0x4c')]['messageId']){_0x2a139d[_0x3dfa('0xaa')]=_0x4558bc[_0x3dfa('0x4c')][_0x3dfa('0xb0')];}return _0x12734d[_0x3dfa('0x22')](_0x2a139d);}else{return _0x12734d;}}})[_0x3dfa('0x24')](function(_0x7d15ad){_0x2858f5[_0x3dfa('0xae')]=_0x7d15ad[_0x3dfa('0x25')]({'plain':!![]});_0x2858f5[_0x3dfa('0xae')][_0x3dfa('0xb1')]=_0x4ef261;if(_0x2858f5[_0x3dfa('0xae')][_0x3dfa('0xb1')]){if(_0x2858f5[_0x3dfa('0x8f')]['autoclose']){_0x2858f5[_0x3dfa('0x90')]['push']({'id':0x0,'priority':_0x2858f5[_0x3dfa('0x90')]['length']+0x1,'app':_0x3dfa('0xb2'),'appdata':_0x3dfa('0xb3'),'interval':_0x3dfa('0xb4')});}}return db['ChatMessage']['create']({'body':_0x4558bc[_0x3dfa('0x4c')][_0x3dfa('0x4c')],'ChatWebsiteId':_0x4558bc['params']['id'],'ChatInteractionId':_0x7d15ad['id'],'direction':'in','ContactId':_0x2858f5['contact']['id'],'AttachmentId':_0x4558bc[_0x3dfa('0x4c')][_0x3dfa('0xb5')]});})[_0x3dfa('0x24')](function(_0x5e8d50){_0x2858f5[_0x3dfa('0x16')]=_0x5e8d50;if(_0x2858f5[_0x3dfa('0xae')]['UserId']){return db[_0x3dfa('0xb6')][_0x3dfa('0x4a')]({'attributes':['id',_0x3dfa('0x2b')],'where':{'id':_0x2858f5[_0x3dfa('0xae')][_0x3dfa('0xb7')]}})['then'](function(_0x3aaa96){if(_0x3aaa96){_0x2858f5['applications'][_0x3dfa('0xb8')]({'id':0x0,'priority':0x0,'app':'agent','appdata':_0x3aaa96['name']+','+(_0x2858f5[_0x3dfa('0x8f')][_0x3dfa('0xb9')]||0xa),'interval':_0x3dfa('0xb4')});_0x2858f5[_0x3dfa('0xba')]=!![];}return respondWithRpcPromise(_0x3dfa('0xbb'),_0x3dfa('0xbc'),_0x2858f5);});}return respondWithRpcPromise(_0x3dfa('0xbb'),'startRouting',_0x2858f5);})[_0x3dfa('0x24')](function(_0x19ef2b){respondWithRpcPromise(_0x3dfa('0xbd'),_0x3dfa('0xbd'),{'event':_0x3dfa('0xbe'),'message':_0x19ef2b},client9002);return _0x19ef2b;})[_0x3dfa('0x24')](respondWithResult(_0xc060e9,null))['catch'](handleError(_0xc060e9,null));};exports[_0x3dfa('0xbf')]=function(_0x417f4c,_0x255c4a){var _0x1406af,_0x4c0828,_0x2413ea;var _0x1144be=[];var _0x4cac17={};var _0x39d132=_0x417f4c[_0x3dfa('0xc0')]||[];var _0x23cba8=[];var _0x35ee38;return db[_0x3dfa('0x8c')][_0x3dfa('0x52')]()[_0x3dfa('0x24')](function(_0x33858d){if(!_0x33858d){throw new db[(_0x3dfa('0x83'))]['ValidationError']('no\x20available\x20attributes');}_0x1144be=_[_0x3dfa('0x7f')](_[_0x3dfa('0x48')](_0x33858d),[_0x3dfa('0x80'),_0x3dfa('0x81'),_0x3dfa('0x82'),'ListId']);if(_0x417f4c[_0x3dfa('0x4c')]['id']){delete _0x417f4c[_0x3dfa('0x4c')]['id'];}if(_['isNil'](_0x417f4c['body'][_0x3dfa('0x96')])){throw _0x255c4a[_0x3dfa('0x1a')](0x1f4)['send'](new db[(_0x3dfa('0x83'))][(_0x3dfa('0x7d'))]('from\x20is\x20mandatory'));}if(_[_0x3dfa('0x6b')](_0x417f4c[_0x3dfa('0x4c')][_0x3dfa('0x4c')])||_0x417f4c[_0x3dfa('0x4c')][_0x3dfa('0x4c')]===''){throw _0x255c4a[_0x3dfa('0x1a')](0x1f4)[_0x3dfa('0xc1')](new db[(_0x3dfa('0x83'))][(_0x3dfa('0x7d'))](_0x3dfa('0x85')));}if(_['isNil'](_0x417f4c[_0x3dfa('0x4c')][_0x3dfa('0xc2')])){throw _0x255c4a[_0x3dfa('0x1a')](0x1f4)['send'](new db[(_0x3dfa('0x83'))][(_0x3dfa('0x7d'))](_0x3dfa('0xc3')+_0x1144be));}if(!_[_0x3dfa('0x88')](_0x1144be,_0x417f4c[_0x3dfa('0x4c')]['mapKeyOffline'])){throw _0x255c4a[_0x3dfa('0x1a')](0x1f4)[_0x3dfa('0xc1')](new db[(_0x3dfa('0x83'))][(_0x3dfa('0x7d'))](_0x3dfa('0xc4')+_0x1144be));}_0x4cac17[_0x417f4c[_0x3dfa('0x4c')][_0x3dfa('0xc2')]]=_0x417f4c[_0x3dfa('0x4c')][_0x3dfa('0x96')];})[_0x3dfa('0x24')](function(){return db[_0x3dfa('0x2e')][_0x3dfa('0x4a')]({'where':{'id':_0x417f4c[_0x3dfa('0x46')]['id']},'include':[{'model':db['CmList'],'as':_0x3dfa('0x8b')},{'model':db[_0x3dfa('0xc5')],'as':_0x3dfa('0xc5')}]});})[_0x3dfa('0x24')](handleEntityNotFound(_0x255c4a,null))['then'](function(_0x5c12af){if(_0x5c12af&&_0x5c12af[_0x3dfa('0x8b')]){_0x4c0828=_0x5c12af;var _0x36e7d0=_[_0x3dfa('0x95')](_0x417f4c['body'],{'firstName':_0x417f4c[_0x3dfa('0x4c')][_0x3dfa('0x96')],'phone':_0x417f4c['body'][_0x3dfa('0x96')],'ListId':_0x5c12af[_0x3dfa('0x97')]});_0x36e7d0[_0x417f4c[_0x3dfa('0x4c')][_0x3dfa('0xc2')]]=_0x417f4c['body'][_0x3dfa('0x96')];return db['CmContact'][_0x3dfa('0xc6')]({'where':_0x4cac17,'defaults':_0x36e7d0});}})[_0x3dfa('0xaf')](function(_0x9ba6a4){if(_0x9ba6a4){_0x2413ea=_0x9ba6a4;var _0x5ebb1a=fs['readFileSync'](path[_0x3dfa('0x68')](config[_0x3dfa('0x6d')],_0x3dfa('0xc7')),_0x3dfa('0xc8'));var _0x2917dc=ejs[_0x3dfa('0xc9')](_0x5ebb1a,{'body':_[_0x3dfa('0xca')](_0x417f4c[_0x3dfa('0x4c')]['body']),'bodyTitle':_0x4c0828[_0x3dfa('0xcb')]});return db[_0x3dfa('0xcc')][_0x3dfa('0x4b')]({'body':_0x2917dc,'plainBody':htmlToText['fromString'](_0x2917dc),'ContactId':_0x9ba6a4['id'],'ChatWebsiteId':_0x4c0828['id']});}})[_0x3dfa('0x24')](function(_0x5dd2ca){_0x35ee38=_0x5dd2ca;if(_0x39d132[_0x3dfa('0x37')]){var _0x5e2577=_0x39d132['map'](function(_0xedb54f){return{'name':_0xedb54f[_0x3dfa('0xcd')],'basename':_0xedb54f[_0x3dfa('0x62')],'type':_0xedb54f[_0x3dfa('0xce')],'ChatOfflineMessageId':_0x5dd2ca['id']};});_0x23cba8=_0x5e2577['map'](_0x9902ed=>{var _0x323a17={'filename':_0x9902ed[_0x3dfa('0x2b')],'path':path[_0x3dfa('0x68')](config[_0x3dfa('0x6d')],'server',_0x3dfa('0xc0'),_0x3dfa('0xcf'),_0x3dfa('0xd0'),_0x9902ed[_0x3dfa('0xd1')])};return _0x323a17;});if(!_0x4c0828[_0x3dfa('0xd2')]){return db[_0x3dfa('0xd3')]['transaction'](function(_0x1a6408){return db[_0x3dfa('0xd4')][_0x3dfa('0xd5')](_0x5e2577,{'transaction':_0x1a6408});});}}})[_0x3dfa('0x24')](function(){if(_0x35ee38){_0x1406af=_0x35ee38;return db['MailAccount'][_0x3dfa('0x56')]({'where':{'service':!![]},'include':[{'model':db[_0x3dfa('0xd6')],'as':_0x3dfa('0xd7'),'raw':!![],'include':[{'model':db[_0x3dfa('0xd8')],'as':'CloudProvider','raw':!![]}]}]});}})[_0x3dfa('0x24')](function(_0x12c6ba){if(_0x12c6ba&&_0x12c6ba[_0x3dfa('0xd7')]&&_0x4c0828[_0x3dfa('0xd9')]&&_0x4c0828[_0x3dfa('0xda')]){var _0x2fb270=_0x12c6ba[_0x3dfa('0xdb')]();return respondWithRpcPromise(_0x3dfa('0xdc'),_0x3dfa('0xdd'),{'account':_0x2fb270,'message':{'from':util['format'](_0x3dfa('0xde'),_0x12c6ba[_0x3dfa('0x2b')],_0x12c6ba[_0x3dfa('0xdf')]||_0x12c6ba[_0x3dfa('0xd7')][_0x3dfa('0x4d')]),'to':_0x4c0828[_0x3dfa('0xda')],'subject':_0x4c0828['offlineMessageSubject'],'html':_0x1406af[_0x3dfa('0x4c')],'attachments':_0x23cba8}},client9003)[_0x3dfa('0x24')](function(){return _0x1406af;})['catch'](function(_0x208405){logger[_0x3dfa('0x13')](_0x208405);});}})[_0x3dfa('0x24')](function(){if(_0x4c0828&&_0x4c0828[_0x3dfa('0xd2')]&&_0x4c0828[_0x3dfa('0xe0')]){var _0x16193e=[];if(_0x39d132[_0x3dfa('0x37')]){_0x16193e=_0x39d132[_0x3dfa('0x40')](function(_0x5054fe){return{'name':_0x5054fe[_0x3dfa('0xcd')],'basename':_0x5054fe[_0x3dfa('0x62')],'type':_0x5054fe[_0x3dfa('0xce')],'ChatOfflineMessageId':_0x35ee38['id']};});}var _0x16f9ea;if(!_[_0x3dfa('0x6b')](_0x4c0828[_0x3dfa('0xe1')])){var _0x20adc0=_[_0x3dfa('0x40')](_0x417f4c['body'],function(_0x5a9a2f){return _0x5a9a2f;});var _0x498b8b=_[_0x3dfa('0xe2')](_0x20adc0)[0x0];var _0x30db7a=_[_0x3dfa('0xe3')](_0x498b8b,function(_0x299f5a){return _0x299f5a;});_0x16f9ea=_0x30db7a[0x1][_0x4c0828[_0x3dfa('0xe1')]];}var _0x400025={'from':_0x2413ea[_0x3dfa('0xdf')],'firstName':_0x2413ea['firstName'],'lastName':_0x2413ea[_0x3dfa('0x9f')],'mapKey':_0x3dfa('0xdf'),'message':{'from':_0x2413ea[_0x3dfa('0xdf')],'to':_0x4c0828[_0x3dfa('0xc5')]['email'],'cc':'','subject':_[_0x3dfa('0x6b')](_0x16f9ea)?_0x4c0828[_0x3dfa('0xe4')]:_0x16f9ea,'messageId':'','sentAt':new Date(),'attach':_0x16193e[_0x3dfa('0x37')],'attachments':_0x16193e,'originChannel':_0x3dfa('0xe5'),'ChatWebsiteId':_0x4c0828['id'],'ChatOfflineMessageId':_0x1406af['id'],'originTo':_0x4c0828['MailAccount'][_0x3dfa('0xdf')]},'body':_0x1406af[_0x3dfa('0x4c')]};var _0x18ded6={'account':{'id':_0x4c0828[_0x3dfa('0xe0')]},'body':_0x400025,'log':'NotifyMailAccount'};return respondWithRpcPromise(_0x3dfa('0xe6'),_0x3dfa('0xe7'),_0x18ded6,client9001)[_0x3dfa('0x24')](function(){return _0x1406af;})['catch'](function(_0x3ec458){logger[_0x3dfa('0x13')](_0x3ec458);});}return;})['then'](function(){if(_0x1406af){return _0x1406af;}})[_0x3dfa('0x24')](respondWithResult(_0x255c4a,null))[_0x3dfa('0x19')](function(_0x437ceb){logger['error']('catch',_0x437ceb);for(var _0x1d37bb of _0x39d132){var _0x366a18=path[_0x3dfa('0x68')](config['root'],_0x3dfa('0xe8'),_0x3dfa('0xc0'),'attachments',_0x3dfa('0xd0'),_0x1d37bb[_0x3dfa('0x62')]);fs_extra['remove'](_0x366a18)[_0x3dfa('0x19')](function(_0xfc896d){logger[_0x3dfa('0x13')](_0x3dfa('0xe9'),_0x366a18,_0xfc896d);});}});};exports['addInteraction']=function(_0x5d2d52,_0x385e75){return db[_0x3dfa('0xac')][_0x3dfa('0x4a')]({'where':{'id':_0x5d2d52[_0x3dfa('0x46')]['id']}})[_0x3dfa('0x24')](handleEntityNotFound(_0x385e75,null))[_0x3dfa('0x24')](function(_0x5170d8){if(_0x5170d8){return _0x5170d8['addInteraction'](_0x5d2d52[_0x3dfa('0x4c')][_0x3dfa('0x5b')],_[_0x3dfa('0xea')](_0x5d2d52[_0x3dfa('0x4c')],[_0x3dfa('0x5b'),'id'])||{});}})['then'](respondWithResult(_0x385e75,null))['catch'](handleError(_0x385e75,null));};exports[_0x3dfa('0xeb')]=function(_0x4b4c9a,_0x848c97){var _0x3e9aab={'raw':![],'where':{}};var _0x56dc4a={};var _0x1d45d6={'count':0x0,'rows':[]};return db[_0x3dfa('0x2e')][_0x3dfa('0x56')]({'where':{'id':_0x4b4c9a[_0x3dfa('0x46')]['id']}})[_0x3dfa('0x24')](handleEntityNotFound(_0x848c97,null))['then'](function(_0x54cb20){if(_0x54cb20){_0x56dc4a[_0x3dfa('0x32')]=_['keys'](db[_0x3dfa('0xac')][_0x3dfa('0x2f')]);_0x56dc4a[_0x3dfa('0x33')]=_[_0x3dfa('0x48')](_0x4b4c9a[_0x3dfa('0x33')]);_0x56dc4a[_0x3dfa('0x3d')]=_[_0x3dfa('0x34')](_0x56dc4a[_0x3dfa('0x32')],_0x56dc4a['query']);_0x3e9aab[_0x3dfa('0x36')]=_[_0x3dfa('0x34')](_0x56dc4a[_0x3dfa('0x32')],qs[_0x3dfa('0x35')](_0x4b4c9a[_0x3dfa('0x33')][_0x3dfa('0x35')]));_0x3e9aab[_0x3dfa('0x36')]=_0x3e9aab[_0x3dfa('0x36')][_0x3dfa('0x37')]?_0x3e9aab[_0x3dfa('0x36')]:_0x56dc4a[_0x3dfa('0x32')];if(!_0x4b4c9a[_0x3dfa('0x33')][_0x3dfa('0x38')]('nolimit')){_0x3e9aab[_0x3dfa('0x1e')]=qs[_0x3dfa('0x1e')](_0x4b4c9a[_0x3dfa('0x33')]['limit']);_0x3e9aab[_0x3dfa('0x1c')]=qs[_0x3dfa('0x1c')](_0x4b4c9a['query'][_0x3dfa('0x1c')]);}_0x3e9aab[_0x3dfa('0x3a')]=qs[_0x3dfa('0x3b')](_0x4b4c9a[_0x3dfa('0x33')][_0x3dfa('0x3b')]);_0x3e9aab[_0x3dfa('0x3c')]=qs['filters'](_[_0x3dfa('0x3e')](_0x4b4c9a[_0x3dfa('0x33')],_0x56dc4a[_0x3dfa('0x3d')]));_0x3e9aab[_0x3dfa('0x3c')][_0x3dfa('0x54')]=_0x54cb20['id'];if(_0x4b4c9a[_0x3dfa('0x33')][_0x3dfa('0x58')]){_0x3e9aab['where']=_[_0x3dfa('0x3f')](_0x3e9aab[_0x3dfa('0x3c')],{'$or':_[_0x3dfa('0x40')](_0x3e9aab[_0x3dfa('0x36')],function(_0x57d6b5){var _0x1f907a={};_0x1f907a[_0x57d6b5]={'$like':'%'+_0x4b4c9a[_0x3dfa('0x33')]['filter']+'%'};return _0x1f907a;})});}_0x3e9aab=_[_0x3dfa('0x3f')]({},_0x3e9aab,_0x4b4c9a[_0x3dfa('0x42')]);return db[_0x3dfa('0xac')][_0x3dfa('0x1f')]({'where':_0x3e9aab[_0x3dfa('0x3c')]})[_0x3dfa('0x24')](function(_0x39f661){_0x1d45d6[_0x3dfa('0x1f')]=_0x39f661;if(_0x4b4c9a[_0x3dfa('0x33')]['includeAll']){_0x3e9aab[_0x3dfa('0x43')]=[{'model':db[_0x3dfa('0x8c')],'as':_0x3dfa('0xec'),'required':![]},{'model':db[_0x3dfa('0xb6')],'as':_0x3dfa('0xed'),'attributes':[_0x3dfa('0x2b'),_0x3dfa('0xee'),_0x3dfa('0xef')],'required':![]},{'model':db[_0x3dfa('0xf0')],'as':_0x3dfa('0xf1'),'attributes':['id','name',_0x3dfa('0xf2')],'where':_0x4b4c9a['query'][_0x3dfa('0xf3')]?{'id':_0x4b4c9a[_0x3dfa('0x33')][_0x3dfa('0xf3')]}:undefined,'required':_0x4b4c9a[_0x3dfa('0x33')][_0x3dfa('0xf3')]?!![]:![]}];}return db[_0x3dfa('0xac')]['findAll'](_0x3e9aab);})[_0x3dfa('0x24')](function(_0x178cb6){_0x1d45d6[_0x3dfa('0x44')]=_0x178cb6;return _0x1d45d6;});}})[_0x3dfa('0x24')](respondWithFilteredResult(_0x848c97,_0x3e9aab))[_0x3dfa('0x19')](handleError(_0x848c97,null));};function iftimePromise(_0x55a1a1,_0x544a51){return respondWithRpcPromise(_0x3dfa('0xf4'),_0x3dfa('0xf5'),{'command':_0x544a51[_0x3dfa('0xf6')]?util[_0x3dfa('0xa4')]('iftime\x20%s,%s',_0x55a1a1[_0x3dfa('0xf7')],_0x544a51[_0x3dfa('0xf6')]):util[_0x3dfa('0xa4')]('iftime\x20%s',_0x55a1a1['interval'])},client9002)[_0x3dfa('0x24')](function(_0x332512){var _0x29d848=_0x332512&&_0x332512[_0x3dfa('0xf8')](_0x3dfa('0xf9'))>=0x0?!![]:![];logger[_0x3dfa('0x17')](_0x3dfa('0xfa'),_0x544a51['id'],_0x55a1a1['id'],_0x55a1a1[_0x3dfa('0xf7')],_0x29d848?_0x3dfa('0xfb'):_0x3dfa('0xfc'),_0x544a51['timezone']?_0x544a51[_0x3dfa('0xf6')]:'No\x20timezone');return _0x29d848;})['catch'](function(_0x59b3b7){logger[_0x3dfa('0x13')](_0x3dfa('0xfa'),_0x544a51['id'],_0x55a1a1['id'],_0x55a1a1[_0x3dfa('0xf7')],util[_0x3dfa('0xfd')](_0x59b3b7,{'showHidden':![],'depth':null}),_0x544a51[_0x3dfa('0xf6')]?_0x544a51[_0x3dfa('0xf6')]:'No\x20timezone');return![];});}exports[_0x3dfa('0xf5')]=function(_0x517e30,_0x2c3d9e){var _0x2f4b4e=0x0;var _0x19a891=0x0;var _0xbacf3d=![];var _0x597a0e;var _0x3138b5;return db[_0x3dfa('0x2e')]['find']({'where':{'id':_0x517e30[_0x3dfa('0x46')]['id']},'include':[{'model':db['Interval'],'as':'Interval','include':[{'model':db[_0x3dfa('0xfe')],'as':_0x3dfa('0xff'),'attributes':['id',_0x3dfa('0xf7')],'raw':!![]}]}]})[_0x3dfa('0x24')](handleEntityNotFound(_0x2c3d9e,null))[_0x3dfa('0x24')](function(_0x2f90e0){if(_0x2f90e0){_0x597a0e=_0x2f90e0;return _0x2f90e0[_0x3dfa('0x100')]({'raw':!![]});}})[_0x3dfa('0x24')](function(_0x3eaf60){if(_0x597a0e){if(_0x3eaf60){_0x3138b5=_0x3eaf60;}}return require(_0x3dfa('0x101'))[_0x3dfa('0x69')]();})[_0x3dfa('0x24')](function(_0x1df7e8){if(_0x1df7e8){_0x19a891=_0x1df7e8[_0x3dfa('0x102')];_0xbacf3d=_0x1df7e8[_0x3dfa('0x6a')];}})[_0x3dfa('0x24')](function(){return db[_0x3dfa('0xac')]['count']({'where':{'closed':![]}});})[_0x3dfa('0x24')](function(_0x28e82d){_0x2f4b4e=_0x28e82d;if(_0x19a891&&_0x28e82d>_0x19a891){return db[_0x3dfa('0x103')][_0x3dfa('0x56')]({'where':{'id':0x1}})[_0x3dfa('0x24')](function(_0x31a687){if(_0x31a687){_0x31a687[_0x3dfa('0x104')](_0x3dfa('0x105'));}});}})[_0x3dfa('0x24')](function(){if(_0x597a0e[_0x3dfa('0xfe')]&&_0x597a0e['Interval'][_0x3dfa('0xff')]){var _0x2dbd76=[];for(var _0x4f0c56=0x0;_0x4f0c56<_0x597a0e['Interval'][_0x3dfa('0xff')]['length'];_0x4f0c56++){var _0x104477=_0x597a0e[_0x3dfa('0xfe')]['Intervals'][_0x4f0c56][_0x3dfa('0x25')]({'plain':!![]});_0x2dbd76['push'](iftimePromise(_0x104477,_0x597a0e));}return BPromise['all'](_0x2dbd76)[_0x3dfa('0x24')](function(_0x481803){return _[_0x3dfa('0x106')](_0x481803);});}else{return!![];}})[_0x3dfa('0x24')](function(_0x5bf2c9){var _0x507b95=fs[_0x3dfa('0x107')](path[_0x3dfa('0x68')](config[_0x3dfa('0x6d')],_0x3dfa('0x108')),_0x3dfa('0xc8'));var _0x2aa58e=new url[(_0x3dfa('0x109'))](_0x597a0e[_0x3dfa('0x10a')])[_0x3dfa('0x10b')];var _0x233eb4=_0x3dfa('0x10c');var _0x52e6d8=![];var _0x485af5={'chatVersion':_0x233eb4,'chatWebsiteAddressOrigin':_0x2aa58e,'remote':_0x597a0e[_0x3dfa('0x10d')],'query':querystring['stringify'](_[_0x3dfa('0x3f')](_0x597a0e[_0x3dfa('0x25')]({'plain':!![]}),{'customerIp':_0x517e30[_0x3dfa('0x7a')]['x-forwarded-for']||_0x517e30[_0x3dfa('0x7a')][_0x3dfa('0x10e')]||_0x517e30[_0x3dfa('0x10f')][_0x3dfa('0x110')]||_0x517e30['ip'],'referer':_0x517e30['headers']['referer'],'openedInteractions':_0x2f4b4e,'maxInteractions':_0x19a891,'virtual':_0xbacf3d['virtual'],'online':_0x5bf2c9,'custom':_0xbacf3d}))[_0x3dfa('0x111')](/'/g,'\x5c\x27')};_0x2c3d9e[_0x3dfa('0xc1')](ejs[_0x3dfa('0xc9')](Mustache['render'](_0x507b95,_0x485af5),{'proactiveActions':_0x3138b5,'alignment':_0x597a0e[_0x3dfa('0x112')],'verticalAlignment':_0x597a0e[_0x3dfa('0x113')],'div_color':_0x597a0e[_0x3dfa('0xf2')],'labelText':_0x597a0e['labelText'],'text_color':_0x597a0e[_0x3dfa('0x114')],'text_button_color':_0x597a0e['textButtonColor'],'button_color':_0x597a0e[_0x3dfa('0x115')],'background_color':_0x597a0e[_0x3dfa('0x116')],'hideWhenOffline':_0x597a0e[_0x3dfa('0x117')],'intervalId':_0x597a0e[_0x3dfa('0x118')],'isDevelopment':_0x52e6d8,'chatVersion':_0x233eb4}));})[_0x3dfa('0x19')](handleError(_0x2c3d9e,null));};exports[_0x3dfa('0x119')]=function(_0x397aa4,_0xc78c2e){var _0x257085=_0x397aa4[_0x3dfa('0x46')]['id'];var _0x2b7d77=_0x397aa4[_0x3dfa('0x4c')];var _0x7e7549=0xc8;var _0xb417c3=null;return db[_0x3dfa('0xd3')][_0x3dfa('0x11a')]({'isolationLevel':db['sequelize'][_0x3dfa('0x11b')][_0x3dfa('0x11c')][_0x3dfa('0x11d')]},function(_0x32b5ec){return db['ChatWebsite'][_0x3dfa('0x56')]({'where':{'id':_0x257085},'transaction':_0x32b5ec})[_0x3dfa('0x24')](function(_0xba3f20){if(_0xba3f20){return db[_0x3dfa('0x11e')]['destroy']({'where':{'ChatWebsiteId':_0x257085},'transaction':_0x32b5ec})[_0x3dfa('0x24')](function(){var _0x2216a7=_[_0x3dfa('0x40')](_0x2b7d77,function(_0x3d256f){_0x3d256f['ChatWebsiteId']=_0x257085;return _0x3d256f;});return db[_0x3dfa('0x11e')]['bulkCreate'](_0x2216a7,{'transaction':_0x32b5ec});});}else{_0x7e7549=0x194;_0xb417c3=[];}});})[_0x3dfa('0x24')](function(){if(_0x7e7549!==0x194){return db['ChatApplication'][_0x3dfa('0x11f')]({'where':{'ChatWebsiteId':_0x257085},'order':_0x3dfa('0x120')})[_0x3dfa('0x24')](function(_0x45a8c6){_0xb417c3=_0x45a8c6;});}})[_0x3dfa('0x19')](function(_0x6a70b1){_0x7e7549=0x1f4;logger[_0x3dfa('0x13')](_0x6a70b1[_0x3dfa('0x2a')]);if(_0x6a70b1['name']){delete _0x6a70b1[_0x3dfa('0x2b')];}_0xb417c3=_0x6a70b1;})[_0x3dfa('0x121')](function(){if(_0xb417c3===null){_0xc78c2e[_0x3dfa('0x29')](_0x7e7549);}else{if(_0x7e7549===0x1f4){_0xc78c2e[_0x3dfa('0x1a')](_0x7e7549)[_0x3dfa('0xc1')](_0xb417c3);}else{_0xc78c2e[_0x3dfa('0x1a')](_0x7e7549)[_0x3dfa('0x1b')](_0xb417c3);}}});};exports[_0x3dfa('0x122')]=function(_0x390fa7,_0x52a9c9){var _0x1e189c={};var _0x32af24={};var _0x247825;var _0x6b18c9;return db[_0x3dfa('0x2e')][_0x3dfa('0x56')]({'where':{'id':_0x390fa7[_0x3dfa('0x46')]['id']}})[_0x3dfa('0x24')](handleEntityNotFound(_0x52a9c9,null))[_0x3dfa('0x24')](function(_0x25cfe2){if(_0x25cfe2){_0x247825=_0x25cfe2;_0x32af24[_0x3dfa('0x32')]=_[_0x3dfa('0x48')](db[_0x3dfa('0x11e')][_0x3dfa('0x2f')]);_0x32af24[_0x3dfa('0x33')]=_[_0x3dfa('0x48')](_0x390fa7[_0x3dfa('0x33')]);_0x32af24[_0x3dfa('0x3d')]=_[_0x3dfa('0x34')](_0x32af24['model'],_0x32af24[_0x3dfa('0x33')]);_0x1e189c[_0x3dfa('0x36')]=_['intersection'](_0x32af24[_0x3dfa('0x32')],qs[_0x3dfa('0x35')](_0x390fa7[_0x3dfa('0x33')][_0x3dfa('0x35')]));_0x1e189c[_0x3dfa('0x36')]=_0x1e189c['attributes'][_0x3dfa('0x37')]?_0x1e189c[_0x3dfa('0x36')]:_0x32af24[_0x3dfa('0x32')];_0x1e189c[_0x3dfa('0x3a')]=qs[_0x3dfa('0x3b')](_0x390fa7[_0x3dfa('0x33')][_0x3dfa('0x3b')]);_0x1e189c[_0x3dfa('0x3c')]=qs['filters'](_[_0x3dfa('0x3e')](_0x390fa7[_0x3dfa('0x33')],_0x32af24[_0x3dfa('0x3d')]));if(_0x390fa7['query'][_0x3dfa('0x58')]){_0x1e189c[_0x3dfa('0x3c')]=_[_0x3dfa('0x3f')](_0x1e189c[_0x3dfa('0x3c')],{'$or':_[_0x3dfa('0x40')](_0x1e189c['attributes'],function(_0x4c12e2){var _0x2e2cb1={};_0x2e2cb1[_0x4c12e2]={'$like':'%'+_0x390fa7[_0x3dfa('0x33')][_0x3dfa('0x58')]+'%'};return _0x2e2cb1;})});}_0x1e189c=_['merge']({},_0x1e189c,_0x390fa7[_0x3dfa('0x42')]);return _0x247825['getApplications'](_0x1e189c);}})[_0x3dfa('0x24')](function(_0x28b2af){if(_0x28b2af){_0x6b18c9=_0x28b2af[_0x3dfa('0x37')];if(!_0x390fa7['query']['hasOwnProperty'](_0x3dfa('0x39'))){_0x1e189c[_0x3dfa('0x1e')]=qs['limit'](_0x390fa7[_0x3dfa('0x33')][_0x3dfa('0x1e')]);_0x1e189c[_0x3dfa('0x1c')]=qs[_0x3dfa('0x1c')](_0x390fa7[_0x3dfa('0x33')][_0x3dfa('0x1c')]);}return _0x247825[_0x3dfa('0x122')](_0x1e189c);}})['then'](function(_0x5e12ea){if(_0x5e12ea){return _0x5e12ea?{'count':_0x6b18c9,'rows':_0x5e12ea}:null;}})[_0x3dfa('0x24')](respondWithResult(_0x52a9c9,null))[_0x3dfa('0x19')](handleError(_0x52a9c9,null));};exports['addProactiveActions']=function(_0x57f793,_0xde630f){return db[_0x3dfa('0x123')][_0x3dfa('0x4a')]({'where':{'id':_0x57f793[_0x3dfa('0x46')]['id']}})[_0x3dfa('0x24')](handleEntityNotFound(_0xde630f,null))['then'](function(_0x3aadf9){if(_0x3aadf9){return _0x3aadf9[_0x3dfa('0x124')](_0x57f793['body']['ids'],_[_0x3dfa('0xea')](_0x57f793[_0x3dfa('0x4c')],[_0x3dfa('0x5b'),'id'])||{});}})[_0x3dfa('0x24')](respondWithResult(_0xde630f,null))[_0x3dfa('0x19')](handleError(_0xde630f,null));};exports[_0x3dfa('0x100')]=function(_0x307ca6,_0x3cb833){var _0x32d6e0={};var _0x189813={};var _0x215fe6;var _0x50181c;return db['ChatWebsite'][_0x3dfa('0x56')]({'where':{'id':_0x307ca6[_0x3dfa('0x46')]['id']}})[_0x3dfa('0x24')](handleEntityNotFound(_0x3cb833,null))[_0x3dfa('0x24')](function(_0x34dc4a){if(_0x34dc4a){_0x215fe6=_0x34dc4a;_0x189813[_0x3dfa('0x32')]=_['keys'](db[_0x3dfa('0x125')][_0x3dfa('0x2f')]);_0x189813[_0x3dfa('0x33')]=_[_0x3dfa('0x48')](_0x307ca6[_0x3dfa('0x33')]);_0x189813[_0x3dfa('0x3d')]=_[_0x3dfa('0x34')](_0x189813[_0x3dfa('0x32')],_0x189813[_0x3dfa('0x33')]);_0x32d6e0[_0x3dfa('0x36')]=_[_0x3dfa('0x34')](_0x189813[_0x3dfa('0x32')],qs[_0x3dfa('0x35')](_0x307ca6[_0x3dfa('0x33')][_0x3dfa('0x35')]));_0x32d6e0[_0x3dfa('0x36')]=_0x32d6e0['attributes'][_0x3dfa('0x37')]?_0x32d6e0[_0x3dfa('0x36')]:_0x189813[_0x3dfa('0x32')];_0x32d6e0[_0x3dfa('0x3a')]=qs['sort'](_0x307ca6[_0x3dfa('0x33')][_0x3dfa('0x3b')]);_0x32d6e0[_0x3dfa('0x3c')]=qs[_0x3dfa('0x3d')](_['pick'](_0x307ca6[_0x3dfa('0x33')],_0x189813[_0x3dfa('0x3d')]));if(_0x307ca6[_0x3dfa('0x33')][_0x3dfa('0x58')]){_0x32d6e0[_0x3dfa('0x3c')]=_['merge'](_0x32d6e0['where'],{'$or':_['map'](_0x32d6e0[_0x3dfa('0x36')],function(_0x257f17){var _0x26789b={};_0x26789b[_0x257f17]={'$like':'%'+_0x307ca6[_0x3dfa('0x33')][_0x3dfa('0x58')]+'%'};return _0x26789b;})});}_0x32d6e0=_[_0x3dfa('0x3f')]({},_0x32d6e0,_0x307ca6['options']);return _0x215fe6['getProactiveActions'](_0x32d6e0);}})[_0x3dfa('0x24')](function(_0xbd31cf){if(_0xbd31cf){_0x50181c=_0xbd31cf[_0x3dfa('0x37')];if(!_0x307ca6['query']['hasOwnProperty'](_0x3dfa('0x39'))){_0x32d6e0[_0x3dfa('0x1e')]=qs[_0x3dfa('0x1e')](_0x307ca6[_0x3dfa('0x33')][_0x3dfa('0x1e')]);_0x32d6e0[_0x3dfa('0x1c')]=qs[_0x3dfa('0x1c')](_0x307ca6[_0x3dfa('0x33')]['offset']);}return _0x215fe6['getProactiveActions'](_0x32d6e0);}})['then'](function(_0x1e28ab){if(_0x1e28ab){return _0x1e28ab?{'count':_0x50181c,'rows':_0x1e28ab}:null;}})[_0x3dfa('0x24')](respondWithResult(_0x3cb833,null))[_0x3dfa('0x19')](handleError(_0x3cb833,null));};exports[_0x3dfa('0x126')]=function(_0x172305,_0x356a44){var _0x5acabf=_0x172305['query'][_0x3dfa('0x127')]===_0x3dfa('0x128')?_0x3dfa('0x129'):_0x3dfa('0x12a');return db['ChatWebsite'][_0x3dfa('0x4a')]({'attributes':['id',_0x5acabf],'where':{'id':_0x172305['params']['id']}})[_0x3dfa('0x24')](handleEntityNotFound(_0x356a44,null))[_0x3dfa('0x24')](function(_0x475639){if(_0x475639){var _0x542f75=_0x475639[_0x5acabf];var _0x577c27=_0x542f75&&_0x542f75['items']?_0x542f75[_0x3dfa('0x12b')]:[];_0x356a44[_0x3dfa('0xc1')]({'fromKey':_[_0x3dfa('0x6b')](_0x542f75[_0x3dfa('0x12c')])?undefined:_0x542f75[_0x3dfa('0x12c')],'count':_0x577c27[_0x3dfa('0x37')],'rows':_0x577c27});}})['catch'](handleError(_0x356a44,null));};exports['getOfflineMessages']=function(_0x11daac,_0x36724a){var _0x5ea62f={'raw':![],'where':{}};var _0xeeb78e={};var _0x5b3975={'count':0x0,'rows':[]};return db[_0x3dfa('0x2e')]['findOne']({'where':{'id':_0x11daac[_0x3dfa('0x46')]['id']}})['then'](handleEntityNotFound(_0x36724a,null))['then'](function(_0x4eafcf){if(_0x4eafcf){_0xeeb78e[_0x3dfa('0x32')]=_['keys'](db[_0x3dfa('0xcc')][_0x3dfa('0x2f')]);_0xeeb78e[_0x3dfa('0x33')]=_['keys'](_0x11daac[_0x3dfa('0x33')]);_0xeeb78e[_0x3dfa('0x3d')]=_[_0x3dfa('0x34')](_0xeeb78e['model'],_0xeeb78e[_0x3dfa('0x33')]);_0x5ea62f[_0x3dfa('0x36')]=_[_0x3dfa('0x34')](_0xeeb78e[_0x3dfa('0x32')],qs['fields'](_0x11daac['query']['fields']));_0x5ea62f['attributes']=_0x5ea62f['attributes'][_0x3dfa('0x37')]?_0x5ea62f['attributes']:_0xeeb78e['model'];if(!_0x11daac[_0x3dfa('0x33')][_0x3dfa('0x38')](_0x3dfa('0x39'))){_0x5ea62f['limit']=qs[_0x3dfa('0x1e')](_0x11daac[_0x3dfa('0x33')][_0x3dfa('0x1e')]);_0x5ea62f[_0x3dfa('0x1c')]=qs[_0x3dfa('0x1c')](_0x11daac[_0x3dfa('0x33')][_0x3dfa('0x1c')]);}_0x5ea62f[_0x3dfa('0x3a')]=qs[_0x3dfa('0x3b')](_0x11daac[_0x3dfa('0x33')]['sort']);_0x5ea62f[_0x3dfa('0x3c')]=qs[_0x3dfa('0x3d')](_[_0x3dfa('0x3e')](_0x11daac[_0x3dfa('0x33')],_0xeeb78e[_0x3dfa('0x3d')]));_0x5ea62f[_0x3dfa('0x3c')]['ChatWebsiteId']=_0x4eafcf['id'];if(_0x11daac['query']['filter']){_0x5ea62f[_0x3dfa('0x3c')]=_[_0x3dfa('0x3f')](_0x5ea62f['where'],{'$or':_['map'](_0x5ea62f[_0x3dfa('0x36')],function(_0x2bb6c2){var _0x10eb9d={};_0x10eb9d[_0x2bb6c2]={'$like':'%'+_0x11daac[_0x3dfa('0x33')][_0x3dfa('0x58')]+'%'};return _0x10eb9d;})});}_0x5ea62f=_['merge']({},_0x5ea62f,_0x11daac[_0x3dfa('0x42')]);return db[_0x3dfa('0xcc')]['count']({'where':_0x5ea62f[_0x3dfa('0x3c')]})[_0x3dfa('0x24')](function(_0x56a05e){_0x5b3975[_0x3dfa('0x1f')]=_0x56a05e;if(_0x11daac[_0x3dfa('0x33')][_0x3dfa('0x49')]){_0x5ea62f['include']=[{'all':!![]}];}else{_0x5ea62f[_0x3dfa('0x43')]=[{'model':db[_0x3dfa('0x8c')],'as':_0x3dfa('0xec'),'required':![]},{'model':db['Attachment'],'as':_0x3dfa('0x12d'),'required':![]}];}return db[_0x3dfa('0xcc')]['findAll'](_0x5ea62f);})[_0x3dfa('0x24')](function(_0x393e80){_0x5b3975['rows']=_0x393e80;return _0x5b3975;});}})[_0x3dfa('0x24')](respondWithFilteredResult(_0x36724a,_0x5ea62f))[_0x3dfa('0x19')](handleError(_0x36724a,null));};exports[_0x3dfa('0x12e')]=function(_0xaa56b9,_0x585afc){return db['ChatWebsite'][_0x3dfa('0x4a')]({'where':{'id':_0xaa56b9[_0x3dfa('0x46')]['id']}})[_0x3dfa('0x24')](handleEntityNotFound(_0x585afc,null))['then'](function(_0x30fd3f){if(_0x30fd3f){return _0x30fd3f[_0x3dfa('0x12e')](_0xaa56b9['body'][_0x3dfa('0x5b')],_[_0x3dfa('0xea')](_0xaa56b9[_0x3dfa('0x4c')],['ids','id'])||{})[_0x3dfa('0xaf')](function(_0x462a23){for(var _0x32bfd2=0x0;_0x32bfd2<_0xaa56b9[_0x3dfa('0x4c')][_0x3dfa('0x5b')]['length'];_0x32bfd2+=0x1){socket[_0x3dfa('0x12f')]('userChatWebsite:save',{'UserId':Number(_0xaa56b9[_0x3dfa('0x4c')][_0x3dfa('0x5b')][_0x32bfd2]),'ChatWebsiteId':Number(_0xaa56b9['params']['id'])});}return _0x462a23;});}})[_0x3dfa('0x24')](respondWithResult(_0x585afc,null))['catch'](handleError(_0x585afc,null));};exports[_0x3dfa('0x130')]=function(_0x2c4ff6,_0x21a2b4){return db[_0x3dfa('0x2e')][_0x3dfa('0x4a')]({'where':{'id':_0x2c4ff6[_0x3dfa('0x46')]['id']}})[_0x3dfa('0x24')](handleEntityNotFound(_0x21a2b4,null))['then'](function(_0x21efeb){if(_0x21efeb){return _0x21efeb[_0x3dfa('0x130')](_0x2c4ff6[_0x3dfa('0x33')][_0x3dfa('0x5b')])[_0x3dfa('0x24')](function(){if(_[_0x3dfa('0x131')](_0x2c4ff6[_0x3dfa('0x33')][_0x3dfa('0x5b')])){for(var _0x44efc4=0x0;_0x44efc4<_0x2c4ff6[_0x3dfa('0x33')][_0x3dfa('0x5b')]['length'];_0x44efc4+=0x1){socket[_0x3dfa('0x12f')](_0x3dfa('0x132'),{'UserId':Number(_0x2c4ff6[_0x3dfa('0x33')][_0x3dfa('0x5b')][_0x44efc4]),'ChatWebsiteId':Number(_0x2c4ff6[_0x3dfa('0x46')]['id'])});}}else{socket['emit'](_0x3dfa('0x132'),{'UserId':Number(_0x2c4ff6[_0x3dfa('0x33')]['ids']),'ChatWebsiteId':Number(_0x2c4ff6[_0x3dfa('0x46')]['id'])});}});}})[_0x3dfa('0x24')](respondWithStatusCode(_0x21a2b4,null))[_0x3dfa('0x19')](handleError(_0x21a2b4,null));};exports[_0x3dfa('0x133')]=function(_0x1cd93a,_0x58a309){var _0x2830f7={};var _0x595f24={};var _0x4c1f70;var _0x16f8a8;return db[_0x3dfa('0x2e')][_0x3dfa('0x56')]({'where':{'id':_0x1cd93a['params']['id']}})[_0x3dfa('0x24')](handleEntityNotFound(_0x58a309,null))[_0x3dfa('0x24')](function(_0x170a49){if(_0x170a49){_0x4c1f70=_0x170a49;_0x595f24[_0x3dfa('0x32')]=_[_0x3dfa('0x48')](db['User'][_0x3dfa('0x2f')]);_0x595f24['query']=_[_0x3dfa('0x48')](_0x1cd93a['query']);_0x595f24[_0x3dfa('0x3d')]=_[_0x3dfa('0x34')](_0x595f24[_0x3dfa('0x32')],_0x595f24['query']);_0x2830f7[_0x3dfa('0x36')]=_[_0x3dfa('0x34')](_0x595f24[_0x3dfa('0x32')],qs['fields'](_0x1cd93a['query'][_0x3dfa('0x35')]));_0x2830f7['attributes']=_0x2830f7[_0x3dfa('0x36')][_0x3dfa('0x37')]?_0x2830f7[_0x3dfa('0x36')]:_0x595f24['model'];_0x2830f7[_0x3dfa('0x3a')]=qs[_0x3dfa('0x3b')](_0x1cd93a['query'][_0x3dfa('0x3b')]);_0x2830f7[_0x3dfa('0x3c')]=qs[_0x3dfa('0x3d')](_[_0x3dfa('0x3e')](_0x1cd93a[_0x3dfa('0x33')],_0x595f24[_0x3dfa('0x3d')]));if(_0x1cd93a[_0x3dfa('0x33')]['filter']){_0x2830f7[_0x3dfa('0x3c')]=_['merge'](_0x2830f7['where'],{'$or':_[_0x3dfa('0x40')](_0x2830f7[_0x3dfa('0x36')],function(_0x41de4f){var _0x17349d={};_0x17349d[_0x41de4f]={'$like':'%'+_0x1cd93a['query'][_0x3dfa('0x58')]+'%'};return _0x17349d;})});}_0x2830f7=_[_0x3dfa('0x3f')]({},_0x2830f7,_0x1cd93a[_0x3dfa('0x42')]);return _0x4c1f70[_0x3dfa('0x133')](_0x2830f7);}})[_0x3dfa('0x24')](function(_0x44a7be){if(_0x44a7be){_0x16f8a8=_0x44a7be[_0x3dfa('0x37')];if(!_0x1cd93a[_0x3dfa('0x33')][_0x3dfa('0x38')](_0x3dfa('0x39'))){_0x2830f7[_0x3dfa('0x1e')]=qs[_0x3dfa('0x1e')](_0x1cd93a[_0x3dfa('0x33')]['limit']);_0x2830f7[_0x3dfa('0x1c')]=qs[_0x3dfa('0x1c')](_0x1cd93a['query'][_0x3dfa('0x1c')]);}return _0x4c1f70[_0x3dfa('0x133')](_0x2830f7);}})[_0x3dfa('0x24')](function(_0x18619a){if(_0x18619a){return _0x18619a?{'count':_0x16f8a8,'rows':_0x18619a}:null;}})[_0x3dfa('0x24')](respondWithResult(_0x58a309,null))[_0x3dfa('0x19')](handleError(_0x58a309,null));}; \ No newline at end of file diff --git a/server/api/chatWebsite/chatWebsite.events.js b/server/api/chatWebsite/chatWebsite.events.js index bc69c2b..363aa02 100644 --- a/server/api/chatWebsite/chatWebsite.events.js +++ b/server/api/chatWebsite/chatWebsite.events.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x158f=['exports','../../mysqldb','ChatWebsite','setMaxListeners','save','update','remove','emit','hasOwnProperty','hook'];(function(_0x19e35c,_0x29cd1e){var _0x3e1fe8=function(_0x17258b){while(--_0x17258b){_0x19e35c['push'](_0x19e35c['shift']());}};_0x3e1fe8(++_0x29cd1e);}(_0x158f,0x137));var _0xf158=function(_0x196320,_0x3f9ac2){_0x196320=_0x196320-0x0;var _0xa975ad=_0x158f[_0x196320];return _0xa975ad;};'use strict';var EventEmitter=require('events');var ChatWebsite=require(_0xf158('0x0'))['db'][_0xf158('0x1')];var ChatWebsiteEvents=new EventEmitter();ChatWebsiteEvents[_0xf158('0x2')](0x0);var events={'afterCreate':_0xf158('0x3'),'afterUpdate':_0xf158('0x4'),'afterDestroy':_0xf158('0x5')};function emitEvent(_0x1e7add){return function(_0x5ea49a,_0x29a06,_0x5c9b9b){ChatWebsiteEvents[_0xf158('0x6')](_0x1e7add+':'+_0x5ea49a['id'],_0x5ea49a);ChatWebsiteEvents[_0xf158('0x6')](_0x1e7add,_0x5ea49a);_0x5c9b9b(null);};}for(var e in events){if(events[_0xf158('0x7')](e)){var event=events[e];ChatWebsite[_0xf158('0x8')](e,emitEvent(event));}}module[_0xf158('0x9')]=ChatWebsiteEvents; \ No newline at end of file +var _0x5645=['events','../../mysqldb','ChatWebsite','setMaxListeners','save','remove','emit','hasOwnProperty','hook'];(function(_0x26bd8e,_0x2a9fdf){var _0x3a659d=function(_0x1b82cd){while(--_0x1b82cd){_0x26bd8e['push'](_0x26bd8e['shift']());}};_0x3a659d(++_0x2a9fdf);}(_0x5645,0x19e));var _0x5564=function(_0x41833e,_0x1c2c4d){_0x41833e=_0x41833e-0x0;var _0x4d8c98=_0x5645[_0x41833e];return _0x4d8c98;};'use strict';var EventEmitter=require(_0x5564('0x0'));var ChatWebsite=require(_0x5564('0x1'))['db'][_0x5564('0x2')];var ChatWebsiteEvents=new EventEmitter();ChatWebsiteEvents[_0x5564('0x3')](0x0);var events={'afterCreate':_0x5564('0x4'),'afterUpdate':'update','afterDestroy':_0x5564('0x5')};function emitEvent(_0x64ae4d){return function(_0x1240cd,_0x821a1a,_0x24d3a0){ChatWebsiteEvents[_0x5564('0x6')](_0x64ae4d+':'+_0x1240cd['id'],_0x1240cd);ChatWebsiteEvents[_0x5564('0x6')](_0x64ae4d,_0x1240cd);_0x24d3a0(null);};}for(var e in events){if(events[_0x5564('0x7')](e)){var event=events[e];ChatWebsite[_0x5564('0x8')](e,emitEvent(event));}}module['exports']=ChatWebsiteEvents; \ No newline at end of file diff --git a/server/api/chatWebsite/chatWebsite.model.js b/server/api/chatWebsite/chatWebsite.model.js index 733ecc2..36d2374 100644 --- a/server/api/chatWebsite/chatWebsite.model.js +++ b/server/api/chatWebsite/chatWebsite.model.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x3cd5=['./chatWebsite.attributes','exports','define','chat_websites','../../config/logger','api','moment','bluebird','rimraf','../../config/environment'];(function(_0x3bf83f,_0x181cac){var _0x22c4a9=function(_0xb3ff0d){while(--_0xb3ff0d){_0x3bf83f['push'](_0x3bf83f['shift']());}};_0x22c4a9(++_0x181cac);}(_0x3cd5,0x130));var _0x53cd=function(_0x4a4922,_0x82cb8f){_0x4a4922=_0x4a4922-0x0;var _0x55a8c6=_0x3cd5[_0x4a4922];return _0x55a8c6;};'use strict';var _=require('lodash');var util=require('util');var logger=require(_0x53cd('0x0'))(_0x53cd('0x1'));var moment=require(_0x53cd('0x2'));var BPromise=require(_0x53cd('0x3'));var rp=require('request-promise');var fs=require('fs');var path=require('path');var rimraf=require(_0x53cd('0x4'));var config=require(_0x53cd('0x5'));var attributes=require(_0x53cd('0x6'));module[_0x53cd('0x7')]=function(_0x4867f7,_0x41e3bc){return _0x4867f7[_0x53cd('0x8')]('ChatWebsite',attributes,{'tableName':_0x53cd('0x9'),'paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file +var _0x9a77=['chat_websites','lodash','util','../../config/logger','api','bluebird','request-promise','rimraf','./chatWebsite.attributes','exports','define','ChatWebsite'];(function(_0x472772,_0x288297){var _0x14bbc9=function(_0xec6a61){while(--_0xec6a61){_0x472772['push'](_0x472772['shift']());}};_0x14bbc9(++_0x288297);}(_0x9a77,0x169));var _0x79a7=function(_0x219932,_0x1574d2){_0x219932=_0x219932-0x0;var _0x558c1b=_0x9a77[_0x219932];return _0x558c1b;};'use strict';var _=require(_0x79a7('0x0'));var util=require(_0x79a7('0x1'));var logger=require(_0x79a7('0x2'))(_0x79a7('0x3'));var moment=require('moment');var BPromise=require(_0x79a7('0x4'));var rp=require(_0x79a7('0x5'));var fs=require('fs');var path=require('path');var rimraf=require(_0x79a7('0x6'));var config=require('../../config/environment');var attributes=require(_0x79a7('0x7'));module[_0x79a7('0x8')]=function(_0x1f1f9b,_0x458acf){return _0x1f1f9b[_0x79a7('0x9')](_0x79a7('0xa'),attributes,{'tableName':_0x79a7('0xb'),'paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file diff --git a/server/api/chatWebsite/chatWebsite.rpc.js b/server/api/chatWebsite/chatWebsite.rpc.js index 0892f78..291accd 100644 --- a/server/api/chatWebsite/chatWebsite.rpc.js +++ b/server/api/chatWebsite/chatWebsite.rpc.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x2f00=['../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','http','redis','localhost','socket.io-emitter','register','info','request\x20sent','debug','ChatWebsite,\x20%s,\x20%s,\x20%s','stringify','error','ChatWebsite,\x20%s,\x20%s','message','util','bluebird','randomstring','ioredis'];(function(_0x3d61c6,_0x4571e6){var _0x47e0df=function(_0x25adfd){while(--_0x25adfd){_0x3d61c6['push'](_0x3d61c6['shift']());}};_0x47e0df(++_0x4571e6);}(_0x2f00,0xf9));var _0x02f0=function(_0x5457b6,_0x169776){_0x5457b6=_0x5457b6-0x0;var _0x5be4f8=_0x2f00[_0x5457b6];return _0x5be4f8;};'use strict';var _=require('lodash');var util=require(_0x02f0('0x0'));var moment=require('moment');var BPromise=require(_0x02f0('0x1'));var rs=require(_0x02f0('0x2'));var fs=require('fs');var Redis=require(_0x02f0('0x3'));var db=require(_0x02f0('0x4'))['db'];var utils=require(_0x02f0('0x5'));var logger=require(_0x02f0('0x6'))(_0x02f0('0x7'));var config=require(_0x02f0('0x8'));var jayson=require(_0x02f0('0x9'));var client=jayson['client'][_0x02f0('0xa')]({'port':0x232a});config[_0x02f0('0xb')]=_['defaults'](config['redis'],{'host':_0x02f0('0xc'),'port':0x18eb});var socket=require(_0x02f0('0xd'))(new Redis(config[_0x02f0('0xb')]));require('./chatWebsite.socket')[_0x02f0('0xe')](socket);function respondWithRpcPromise(_0x3468d6,_0x5ac9d8,_0x4dc792){return new BPromise(function(_0x5e83ad,_0x401907){return client['request'](_0x3468d6,_0x4dc792)['then'](function(_0x5baf91){logger[_0x02f0('0xf')]('ChatWebsite,\x20%s,\x20%s',_0x5ac9d8,_0x02f0('0x10'));logger[_0x02f0('0x11')](_0x02f0('0x12'),_0x5ac9d8,'request\x20sent',JSON[_0x02f0('0x13')](_0x5baf91));if(_0x5baf91[_0x02f0('0x14')]){if(_0x5baf91[_0x02f0('0x14')]['code']===0x1f4){logger[_0x02f0('0x14')](_0x02f0('0x15'),_0x5ac9d8,_0x5baf91[_0x02f0('0x14')]['message']);return _0x401907(_0x5baf91[_0x02f0('0x14')][_0x02f0('0x16')]);}logger[_0x02f0('0x14')](_0x02f0('0x15'),_0x5ac9d8,_0x5baf91['error'][_0x02f0('0x16')]);return _0x5e83ad(_0x5baf91['error'][_0x02f0('0x16')]);}else{logger[_0x02f0('0xf')](_0x02f0('0x15'),_0x5ac9d8,_0x02f0('0x10'));_0x5e83ad(_0x5baf91['result']['message']);}})['catch'](function(_0x46b09e){logger[_0x02f0('0x14')](_0x02f0('0x15'),_0x5ac9d8,_0x46b09e);_0x401907(_0x46b09e);});});} \ No newline at end of file +var _0xa9ac=['../../config/environment','jayson/promise','client','http','redis','defaults','localhost','socket.io-emitter','./chatWebsite.socket','register','request','then','info','ChatWebsite,\x20%s,\x20%s','request\x20sent','debug','ChatWebsite,\x20%s,\x20%s,\x20%s','code','error','message','catch','lodash','bluebird','randomstring','../../mysqldb','../../config/logger','rpc'];(function(_0x6acc50,_0x42d623){var _0x286b94=function(_0x43a3dc){while(--_0x43a3dc){_0x6acc50['push'](_0x6acc50['shift']());}};_0x286b94(++_0x42d623);}(_0xa9ac,0x108));var _0xca9a=function(_0x3f0831,_0x50f8d2){_0x3f0831=_0x3f0831-0x0;var _0x11bd61=_0xa9ac[_0x3f0831];return _0x11bd61;};'use strict';var _=require(_0xca9a('0x0'));var util=require('util');var moment=require('moment');var BPromise=require(_0xca9a('0x1'));var rs=require(_0xca9a('0x2'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0xca9a('0x3'))['db'];var utils=require('../../config/utils');var logger=require(_0xca9a('0x4'))(_0xca9a('0x5'));var config=require(_0xca9a('0x6'));var jayson=require(_0xca9a('0x7'));var client=jayson[_0xca9a('0x8')][_0xca9a('0x9')]({'port':0x232a});config[_0xca9a('0xa')]=_[_0xca9a('0xb')](config['redis'],{'host':_0xca9a('0xc'),'port':0x18eb});var socket=require(_0xca9a('0xd'))(new Redis(config[_0xca9a('0xa')]));require(_0xca9a('0xe'))[_0xca9a('0xf')](socket);function respondWithRpcPromise(_0xe3888b,_0x2db3ee,_0x1155e6){return new BPromise(function(_0x5a1b39,_0xd77acd){return client[_0xca9a('0x10')](_0xe3888b,_0x1155e6)[_0xca9a('0x11')](function(_0x28994f){logger[_0xca9a('0x12')](_0xca9a('0x13'),_0x2db3ee,_0xca9a('0x14'));logger[_0xca9a('0x15')](_0xca9a('0x16'),_0x2db3ee,_0xca9a('0x14'),JSON['stringify'](_0x28994f));if(_0x28994f['error']){if(_0x28994f['error'][_0xca9a('0x17')]===0x1f4){logger[_0xca9a('0x18')](_0xca9a('0x13'),_0x2db3ee,_0x28994f[_0xca9a('0x18')][_0xca9a('0x19')]);return _0xd77acd(_0x28994f[_0xca9a('0x18')][_0xca9a('0x19')]);}logger[_0xca9a('0x18')](_0xca9a('0x13'),_0x2db3ee,_0x28994f[_0xca9a('0x18')][_0xca9a('0x19')]);return _0x5a1b39(_0x28994f[_0xca9a('0x18')][_0xca9a('0x19')]);}else{logger['info'](_0xca9a('0x13'),_0x2db3ee,_0xca9a('0x14'));_0x5a1b39(_0x28994f['result']['message']);}})[_0xca9a('0x1a')](function(_0x2355b7){logger[_0xca9a('0x18')](_0xca9a('0x13'),_0x2db3ee,_0x2355b7);_0xd77acd(_0x2355b7);});});} \ No newline at end of file diff --git a/server/api/chatWebsite/chatWebsite.socket.js b/server/api/chatWebsite/chatWebsite.socket.js index 8e1c013..24e3888 100644 --- a/server/api/chatWebsite/chatWebsite.socket.js +++ b/server/api/chatWebsite/chatWebsite.socket.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x7e1d=['update','emit','removeListener','register','length','chatWebsite:','./chatWebsite.events','save'];(function(_0x3bf83f,_0x181cac){var _0x22c4a9=function(_0xb3ff0d){while(--_0xb3ff0d){_0x3bf83f['push'](_0x3bf83f['shift']());}};_0x22c4a9(++_0x181cac);}(_0x7e1d,0x1ae));var _0xd7e1=function(_0xafc6f,_0x38b009){_0xafc6f=_0xafc6f-0x0;var _0x3d6e2a=_0x7e1d[_0xafc6f];return _0x3d6e2a;};'use strict';var ChatWebsiteEvents=require(_0xd7e1('0x0'));var events=[_0xd7e1('0x1'),'remove',_0xd7e1('0x2')];function createListener(_0x4f2157,_0x389f90){return function(_0x5a05bb){_0x389f90[_0xd7e1('0x3')](_0x4f2157,_0x5a05bb);};}function removeListener(_0x335f46,_0x53578a){return function(){ChatWebsiteEvents[_0xd7e1('0x4')](_0x335f46,_0x53578a);};}exports[_0xd7e1('0x5')]=function(_0x256607){for(var _0x18d9ab=0x0,_0x27e598=events[_0xd7e1('0x6')];_0x18d9ab<_0x27e598;_0x18d9ab++){var _0x504ab8=events[_0x18d9ab];var _0x20331f=createListener(_0xd7e1('0x7')+_0x504ab8,_0x256607);ChatWebsiteEvents['on'](_0x504ab8,_0x20331f);}}; \ No newline at end of file +var _0x10b2=['register','length','save','remove','update','emit','removeListener'];(function(_0x2fc012,_0x503e5b){var _0x2891f9=function(_0x295f5e){while(--_0x295f5e){_0x2fc012['push'](_0x2fc012['shift']());}};_0x2891f9(++_0x503e5b);}(_0x10b2,0xdb));var _0x210b=function(_0x4fbb0c,_0x3bce16){_0x4fbb0c=_0x4fbb0c-0x0;var _0x4a616f=_0x10b2[_0x4fbb0c];return _0x4a616f;};'use strict';var ChatWebsiteEvents=require('./chatWebsite.events');var events=[_0x210b('0x0'),_0x210b('0x1'),_0x210b('0x2')];function createListener(_0x2c200b,_0x613830){return function(_0x275a4f){_0x613830[_0x210b('0x3')](_0x2c200b,_0x275a4f);};}function removeListener(_0x90968c,_0xf9939f){return function(){ChatWebsiteEvents[_0x210b('0x4')](_0x90968c,_0xf9939f);};}exports[_0x210b('0x5')]=function(_0x3e8fae){for(var _0xd7c2b0=0x0,_0x19cd5d=events[_0x210b('0x6')];_0xd7c2b0<_0x19cd5d;_0xd7c2b0++){var _0x2c1bb2=events[_0xd7c2b0];var _0x195ea2=createListener('chatWebsite:'+_0x2c1bb2,_0x3e8fae);ChatWebsiteEvents['on'](_0x2c1bb2,_0x195ea2);}}; \ No newline at end of file diff --git a/server/api/chatWebsite/index.js b/server/api/chatWebsite/index.js index 3f93d69..4736596 100644 --- a/server/api/chatWebsite/index.js +++ b/server/api/chatWebsite/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x708a=['/:id/logo','getLogo','/:id/avatar','getAvatar','/:id/customer_avatar','getCustomerAvatar','getSystemAvatar','/:id/interactions','getInteractions','/:id/snippet','/:id/applications','getApplications','getProactiveActions','/:id/fields','getAgents','post','addDisposition','addAnswer','diskStorage','join','root','server/files/images/logos/','%s-%s','file','addLogo','server/files/images/avatars/','now','originalname','single','addAvatar','format','addCustomerAvatar','notify','server/files','offline-chat','replace','/:id/offline','any','offline','addInteraction','addApplications','/:id/proactive_actions','addProactiveActions','/:id/users','addAgents','update','destroy','/:id/dispositions','removeDispositions','delete','removeAnswers','removeAgents','exports','util','path','connect-timeout','Router','fs-extra','../../components/auth/service','../../config/environment','get','isAuthenticated','index','show','/:id/canned_answers'];(function(_0x1ee0a1,_0x51058e){var _0x1d2d5b=function(_0x35cfb5){while(--_0x35cfb5){_0x1ee0a1['push'](_0x1ee0a1['shift']());}};_0x1d2d5b(++_0x51058e);}(_0x708a,0x76));var _0xa708=function(_0x3af811,_0x501c0d){_0x3af811=_0x3af811-0x0;var _0x415028=_0x708a[_0x3af811];return _0x415028;};'use strict';var multer=require('multer');var util=require(_0xa708('0x0'));var path=require(_0xa708('0x1'));var timeout=require(_0xa708('0x2'));var express=require('express');var router=express[_0xa708('0x3')]();var fs_extra=require(_0xa708('0x4'));var auth=require(_0xa708('0x5'));var interaction=require('../../components/interaction/service');var config=require(_0xa708('0x6'));var controller=require('./chatWebsite.controller');router[_0xa708('0x7')]('/',auth[_0xa708('0x8')](),controller[_0xa708('0x9')]);router[_0xa708('0x7')]('/describe',auth[_0xa708('0x8')](),controller['describe']);router['get']('/:id',auth[_0xa708('0x8')](),controller[_0xa708('0xa')]);router[_0xa708('0x7')]('/:id/dispositions',auth[_0xa708('0x8')](),controller['getDispositions']);router[_0xa708('0x7')](_0xa708('0xb'),auth[_0xa708('0x8')](),controller['getAnswers']);router[_0xa708('0x7')](_0xa708('0xc'),controller[_0xa708('0xd')]);router[_0xa708('0x7')](_0xa708('0xe'),controller[_0xa708('0xf')]);router[_0xa708('0x7')](_0xa708('0x10'),controller[_0xa708('0x11')]);router['get']('/:id/system_avatar',controller[_0xa708('0x12')]);router[_0xa708('0x7')](_0xa708('0x13'),auth[_0xa708('0x8')](),controller[_0xa708('0x14')]);router[_0xa708('0x7')](_0xa708('0x15'),controller['getSnippet']);router[_0xa708('0x7')](_0xa708('0x16'),auth['isAuthenticated'](),controller[_0xa708('0x17')]);router['get']('/:id/proactive_actions',auth[_0xa708('0x8')](),controller[_0xa708('0x18')]);router[_0xa708('0x7')](_0xa708('0x19'),controller['getFields']);router[_0xa708('0x7')]('/:id/offline_messages',auth[_0xa708('0x8')](),controller['getOfflineMessages']);router[_0xa708('0x7')]('/:id/users',auth[_0xa708('0x8')](),controller[_0xa708('0x1a')]);router[_0xa708('0x1b')]('/',auth[_0xa708('0x8')](),controller['create']);router[_0xa708('0x1b')]('/:id/dispositions',auth['isAuthenticated'](),controller[_0xa708('0x1c')]);router[_0xa708('0x1b')]('/:id/canned_answers',auth[_0xa708('0x8')](),controller[_0xa708('0x1d')]);var upload=multer({'storage':multer[_0xa708('0x1e')]({'destination':function(_0x1a422a,_0x52661b,_0x278a63){_0x278a63(null,path[_0xa708('0x1f')](config[_0xa708('0x20')],_0xa708('0x21')));},'filename':function(_0x21588e,_0x32b365,_0xc4a517){_0xc4a517(null,util['format'](_0xa708('0x22'),Date['now'](),_0x32b365['originalname']));}})});router['post']('/:id/logo',upload['single'](_0xa708('0x23')),controller[_0xa708('0x24')]);var upload=multer({'storage':multer['diskStorage']({'destination':function(_0x2f6797,_0xce9c68,_0x288f8f){_0x288f8f(null,path[_0xa708('0x1f')](config[_0xa708('0x20')],_0xa708('0x25')));},'filename':function(_0x35e340,_0x5a3c88,_0x53adf3){_0x53adf3(null,util['format'](_0xa708('0x22'),Date[_0xa708('0x26')](),_0x5a3c88[_0xa708('0x27')]));}})});router[_0xa708('0x1b')](_0xa708('0xe'),upload[_0xa708('0x28')](_0xa708('0x23')),controller[_0xa708('0x29')]);var upload=multer({'storage':multer[_0xa708('0x1e')]({'destination':function(_0x4558d2,_0x6a6c68,_0xae14fb){_0xae14fb(null,path[_0xa708('0x1f')](config['root'],_0xa708('0x25')));},'filename':function(_0x532393,_0x4cc400,_0x46e3fe){_0x46e3fe(null,util[_0xa708('0x2a')](_0xa708('0x22'),Date['now'](),_0x4cc400[_0xa708('0x27')]));}})});router[_0xa708('0x1b')](_0xa708('0x10'),upload[_0xa708('0x28')](_0xa708('0x23')),controller[_0xa708('0x2b')]);var upload=multer({'storage':multer[_0xa708('0x1e')]({'destination':function(_0x28b276,_0x2c986a,_0x4543a6){_0x4543a6(null,path[_0xa708('0x1f')](config[_0xa708('0x20')],'server/files/images/avatars/'));},'filename':function(_0x56fcd1,_0x54d1bb,_0x32014a){_0x32014a(null,util['format'](_0xa708('0x22'),Date[_0xa708('0x26')](),_0x54d1bb['originalname']));}})});router['post']('/:id/system_avatar',upload[_0xa708('0x28')](_0xa708('0x23')),controller['addSystemAvatar']);router[_0xa708('0x1b')]('/:id/notify',controller[_0xa708('0x2c')]);const offlineUploadMulter=multer({'storage':multer[_0xa708('0x1e')]({'destination':function(_0x847884,_0x1be32f,_0x26adae){const _0x3d30ab=path['join'](config[_0xa708('0x20')],_0xa708('0x2d'),'attachments',_0xa708('0x2e'));fs_extra['ensureDir'](_0x3d30ab,function(){_0x26adae(null,_0x3d30ab);});},'filename':function(_0x3dd707,_0xb6f440,_0x1a752d){const _0x419d37=_0xb6f440['originalname'][_0xa708('0x2f')](/[+@&\/\\#,+()$~%'":*?<>{}\s\\|]/g,'-');const _0x39c399=path['extname'](_0x419d37);const _0x14ee04=Date[_0xa708('0x26')]()+'-'+_0x419d37['replace'](_0x39c399,'')+_0x39c399;_0x1a752d(null,_0x14ee04);}})});router['post'](_0xa708('0x30'),offlineUploadMulter[_0xa708('0x31')](),controller[_0xa708('0x32')]);router[_0xa708('0x1b')](_0xa708('0x13'),auth[_0xa708('0x8')](),controller[_0xa708('0x33')]);router[_0xa708('0x1b')]('/:id/applications',auth[_0xa708('0x8')](),controller[_0xa708('0x34')]);router[_0xa708('0x1b')](_0xa708('0x35'),auth[_0xa708('0x8')](),controller[_0xa708('0x36')]);router[_0xa708('0x1b')](_0xa708('0x37'),auth['isAuthenticated'](),controller[_0xa708('0x38')]);router['put']('/:id',auth[_0xa708('0x8')](),controller[_0xa708('0x39')]);router['delete']('/:id',auth['isAuthenticated'](),controller[_0xa708('0x3a')]);router['delete'](_0xa708('0x3b'),auth[_0xa708('0x8')](),controller[_0xa708('0x3c')]);router[_0xa708('0x3d')](_0xa708('0xb'),auth['isAuthenticated'](),controller[_0xa708('0x3e')]);router[_0xa708('0x3d')]('/:id/users',auth[_0xa708('0x8')](),controller[_0xa708('0x3f')]);module[_0xa708('0x40')]=router; \ No newline at end of file +var _0x2114=['addInteraction','addProactiveActions','put','update','delete','removeDispositions','removeAnswers','removeAgents','exports','multer','path','connect-timeout','express','Router','fs-extra','../../components/interaction/service','./chatWebsite.controller','get','isAuthenticated','index','/describe','describe','/:id','show','/:id/dispositions','getAnswers','/:id/logo','getLogo','/:id/avatar','/:id/customer_avatar','getCustomerAvatar','/:id/system_avatar','getSystemAvatar','getInteractions','/:id/applications','getApplications','/:id/proactive_actions','getProactiveActions','/:id/offline_messages','getOfflineMessages','/:id/users','getAgents','create','post','addDisposition','/:id/canned_answers','addAnswer','diskStorage','join','root','server/files/images/logos/','single','file','addLogo','server/files/images/avatars/','%s-%s','now','originalname','addAvatar','format','addCustomerAvatar','addSystemAvatar','/:id/notify','notify','server/files','attachments','offline-chat','extname','/:id/offline','any','offline','/:id/interactions'];(function(_0x1034ee,_0x12998c){var _0x2922af=function(_0x13715a){while(--_0x13715a){_0x1034ee['push'](_0x1034ee['shift']());}};_0x2922af(++_0x12998c);}(_0x2114,0x171));var _0x4211=function(_0x4565bf,_0x5ad9d6){_0x4565bf=_0x4565bf-0x0;var _0x5610ba=_0x2114[_0x4565bf];return _0x5610ba;};'use strict';var multer=require(_0x4211('0x0'));var util=require('util');var path=require(_0x4211('0x1'));var timeout=require(_0x4211('0x2'));var express=require(_0x4211('0x3'));var router=express[_0x4211('0x4')]();var fs_extra=require(_0x4211('0x5'));var auth=require('../../components/auth/service');var interaction=require(_0x4211('0x6'));var config=require('../../config/environment');var controller=require(_0x4211('0x7'));router[_0x4211('0x8')]('/',auth[_0x4211('0x9')](),controller[_0x4211('0xa')]);router[_0x4211('0x8')](_0x4211('0xb'),auth['isAuthenticated'](),controller[_0x4211('0xc')]);router[_0x4211('0x8')](_0x4211('0xd'),auth['isAuthenticated'](),controller[_0x4211('0xe')]);router[_0x4211('0x8')](_0x4211('0xf'),auth['isAuthenticated'](),controller['getDispositions']);router['get']('/:id/canned_answers',auth[_0x4211('0x9')](),controller[_0x4211('0x10')]);router[_0x4211('0x8')](_0x4211('0x11'),controller[_0x4211('0x12')]);router[_0x4211('0x8')](_0x4211('0x13'),controller['getAvatar']);router[_0x4211('0x8')](_0x4211('0x14'),controller[_0x4211('0x15')]);router['get'](_0x4211('0x16'),controller[_0x4211('0x17')]);router[_0x4211('0x8')]('/:id/interactions',auth['isAuthenticated'](),controller[_0x4211('0x18')]);router[_0x4211('0x8')]('/:id/snippet',controller['getSnippet']);router['get'](_0x4211('0x19'),auth['isAuthenticated'](),controller[_0x4211('0x1a')]);router['get'](_0x4211('0x1b'),auth[_0x4211('0x9')](),controller[_0x4211('0x1c')]);router['get']('/:id/fields',controller['getFields']);router['get'](_0x4211('0x1d'),auth['isAuthenticated'](),controller[_0x4211('0x1e')]);router[_0x4211('0x8')](_0x4211('0x1f'),auth[_0x4211('0x9')](),controller[_0x4211('0x20')]);router['post']('/',auth['isAuthenticated'](),controller[_0x4211('0x21')]);router[_0x4211('0x22')]('/:id/dispositions',auth['isAuthenticated'](),controller[_0x4211('0x23')]);router[_0x4211('0x22')](_0x4211('0x24'),auth[_0x4211('0x9')](),controller[_0x4211('0x25')]);var upload=multer({'storage':multer[_0x4211('0x26')]({'destination':function(_0x4d78a3,_0x5db6dd,_0x5b5160){_0x5b5160(null,path[_0x4211('0x27')](config[_0x4211('0x28')],_0x4211('0x29')));},'filename':function(_0x152b4a,_0x26e604,_0x4e9261){_0x4e9261(null,util['format']('%s-%s',Date['now'](),_0x26e604['originalname']));}})});router[_0x4211('0x22')](_0x4211('0x11'),upload[_0x4211('0x2a')](_0x4211('0x2b')),controller[_0x4211('0x2c')]);var upload=multer({'storage':multer[_0x4211('0x26')]({'destination':function(_0x350d06,_0x3ba664,_0xc04370){_0xc04370(null,path[_0x4211('0x27')](config[_0x4211('0x28')],_0x4211('0x2d')));},'filename':function(_0xe4070d,_0x3b381b,_0x4221f0){_0x4221f0(null,util['format'](_0x4211('0x2e'),Date[_0x4211('0x2f')](),_0x3b381b[_0x4211('0x30')]));}})});router['post'](_0x4211('0x13'),upload['single']('file'),controller[_0x4211('0x31')]);var upload=multer({'storage':multer[_0x4211('0x26')]({'destination':function(_0x1c835e,_0x50ae64,_0x5e1899){_0x5e1899(null,path['join'](config[_0x4211('0x28')],_0x4211('0x2d')));},'filename':function(_0x434242,_0x5a5e18,_0x214539){_0x214539(null,util[_0x4211('0x32')](_0x4211('0x2e'),Date[_0x4211('0x2f')](),_0x5a5e18['originalname']));}})});router[_0x4211('0x22')](_0x4211('0x14'),upload[_0x4211('0x2a')](_0x4211('0x2b')),controller[_0x4211('0x33')]);var upload=multer({'storage':multer[_0x4211('0x26')]({'destination':function(_0x114ad4,_0x51ed07,_0x4f8b22){_0x4f8b22(null,path[_0x4211('0x27')](config['root'],_0x4211('0x2d')));},'filename':function(_0x212077,_0x2f029a,_0x2d4cd0){_0x2d4cd0(null,util['format'](_0x4211('0x2e'),Date[_0x4211('0x2f')](),_0x2f029a[_0x4211('0x30')]));}})});router[_0x4211('0x22')](_0x4211('0x16'),upload[_0x4211('0x2a')]('file'),controller[_0x4211('0x34')]);router[_0x4211('0x22')](_0x4211('0x35'),controller[_0x4211('0x36')]);const offlineUploadMulter=multer({'storage':multer[_0x4211('0x26')]({'destination':function(_0x2e367f,_0x4c8b7b,_0x112d3e){const _0xf6d637=path[_0x4211('0x27')](config[_0x4211('0x28')],_0x4211('0x37'),_0x4211('0x38'),_0x4211('0x39'));fs_extra['ensureDir'](_0xf6d637,function(){_0x112d3e(null,_0xf6d637);});},'filename':function(_0x205185,_0x3ece42,_0x3cda43){const _0x42a5ee=_0x3ece42[_0x4211('0x30')]['replace'](/[+@&\/\\#,+()$~%'":*?<>{}\s\\|]/g,'-');const _0x8b09cf=path[_0x4211('0x3a')](_0x42a5ee);const _0x1b244e=Date['now']()+'-'+_0x42a5ee['replace'](_0x8b09cf,'')+_0x8b09cf;_0x3cda43(null,_0x1b244e);}})});router[_0x4211('0x22')](_0x4211('0x3b'),offlineUploadMulter[_0x4211('0x3c')](),controller[_0x4211('0x3d')]);router[_0x4211('0x22')](_0x4211('0x3e'),auth[_0x4211('0x9')](),controller[_0x4211('0x3f')]);router['post'](_0x4211('0x19'),auth[_0x4211('0x9')](),controller['addApplications']);router[_0x4211('0x22')](_0x4211('0x1b'),auth[_0x4211('0x9')](),controller[_0x4211('0x40')]);router[_0x4211('0x22')]('/:id/users',auth[_0x4211('0x9')](),controller['addAgents']);router[_0x4211('0x41')](_0x4211('0xd'),auth[_0x4211('0x9')](),controller[_0x4211('0x42')]);router[_0x4211('0x43')]('/:id',auth['isAuthenticated'](),controller['destroy']);router['delete'](_0x4211('0xf'),auth[_0x4211('0x9')](),controller[_0x4211('0x44')]);router[_0x4211('0x43')](_0x4211('0x24'),auth[_0x4211('0x9')](),controller[_0x4211('0x45')]);router[_0x4211('0x43')](_0x4211('0x1f'),auth[_0x4211('0x9')](),controller[_0x4211('0x46')]);module[_0x4211('0x47')]=router; \ No newline at end of file diff --git a/server/api/client-side-logs.js b/server/api/client-side-logs.js index a969587..30c6cef 100644 --- a/server/api/client-side-logs.js +++ b/server/api/client-side-logs.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x98b7=['Client-Side\x20logger\x20not\x20found!','expressEndpoint','/client-logs','isAuthenticated','exports','beaver-logger/server','express','../components/auth/service','../config/environment','Router','env','production','client-side-logger'];(function(_0x5c278f,_0x91ee73){var _0x49b983=function(_0x3e9287){while(--_0x3e9287){_0x5c278f['push'](_0x5c278f['shift']());}};_0x49b983(++_0x91ee73);}(_0x98b7,0x1d9));var _0x798b=function(_0x20a584,_0xe384a5){_0x20a584=_0x20a584-0x0;var _0x4b41a8=_0x98b7[_0x20a584];return _0x4b41a8;};var beaverLogger=require(_0x798b('0x0'));var express=require(_0x798b('0x1'));var auth=require(_0x798b('0x2'));var config=require(_0x798b('0x3'));var router=express[_0x798b('0x4')]();var isProduction=config[_0x798b('0x5')]===_0x798b('0x6')||![];function clientSideLogs(_0x47d30b,_0x22fe2d,_0x244ff9){var _0x41d34a=_0x47d30b['app']['get'](_0x798b('0x7'));if(!_0x41d34a){throw new Error(_0x798b('0x8'));}return beaverLogger[_0x798b('0x9')]({'uri':_0x798b('0xa'),'logger':_0x41d34a,'enableCors':!isProduction})(_0x47d30b,_0x22fe2d,_0x244ff9);}router['use'](auth[_0x798b('0xb')](),clientSideLogs);module[_0x798b('0xc')]=router; \ No newline at end of file +var _0x163c=['isAuthenticated','exports','beaver-logger/server','express','../components/auth/service','../config/environment','Router','env','app','get','Client-Side\x20logger\x20not\x20found!','expressEndpoint','/client-logs','use'];(function(_0x733cc0,_0x3cae70){var _0x6ec0cd=function(_0x36cb1a){while(--_0x36cb1a){_0x733cc0['push'](_0x733cc0['shift']());}};_0x6ec0cd(++_0x3cae70);}(_0x163c,0x128));var _0xc163=function(_0x4b2d84,_0x399e3c){_0x4b2d84=_0x4b2d84-0x0;var _0x23d1bc=_0x163c[_0x4b2d84];return _0x23d1bc;};var beaverLogger=require(_0xc163('0x0'));var express=require(_0xc163('0x1'));var auth=require(_0xc163('0x2'));var config=require(_0xc163('0x3'));var router=express[_0xc163('0x4')]();var isProduction=config[_0xc163('0x5')]==='production'||![];function clientSideLogs(_0xdda025,_0x74d4f9,_0x170395){var _0x134f9e=_0xdda025[_0xc163('0x6')][_0xc163('0x7')]('client-side-logger');if(!_0x134f9e){throw new Error(_0xc163('0x8'));}return beaverLogger[_0xc163('0x9')]({'uri':_0xc163('0xa'),'logger':_0x134f9e,'enableCors':!isProduction})(_0xdda025,_0x74d4f9,_0x170395);}router[_0xc163('0xb')](auth[_0xc163('0xc')](),clientSideLogs);module[_0xc163('0xd')]=router; \ No newline at end of file diff --git a/server/api/cloudProvider/cloudProvider.attributes.js b/server/api/cloudProvider/cloudProvider.attributes.js index 2617583..ba94526 100644 --- a/server/api/cloudProvider/cloudProvider.attributes.js +++ b/server/api/cloudProvider/cloudProvider.attributes.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x2f4e=['MicrosoftAzure\x20=>\x20tenant','TEXT','MicrosoftAzure\x20=>\x20access_token','MicrosoftAzure\x20=>\x20refresh_token','MicrosoftAzure\x20=>\x20Dynamics365\x20=>\x20remote_uri','STRING','AmazonAWS','Google','MicrosoftAzure','Dynamics365'];(function(_0x68c979,_0x431cff){var _0x4f0001=function(_0xa7595d){while(--_0xa7595d){_0x68c979['push'](_0x68c979['shift']());}};_0x4f0001(++_0x431cff);}(_0x2f4e,0xc3));var _0xe2f4=function(_0x49bfb7,_0x5ca8a8){_0x49bfb7=_0x49bfb7-0x0;var _0x2708e6=_0x2f4e[_0x49bfb7];return _0x2708e6;};'use strict';var Sequelize=require('sequelize');module['exports']={'name':{'type':Sequelize[_0xe2f4('0x0')],'allowNull':![],'validate':{'notEmpty':!![]}},'service':{'type':Sequelize['ENUM'](_0xe2f4('0x1'),_0xe2f4('0x2'),_0xe2f4('0x3')),'allowNull':![],'validate':{'notEmpty':!![]}},'type':{'type':Sequelize['ENUM']('Outlook365',_0xe2f4('0x4'))},'data1':{'type':Sequelize['STRING'],'comment':'MicrosoftAzure\x20=>\x20client_id'},'data2':{'type':Sequelize[_0xe2f4('0x0')],'comment':_0xe2f4('0x5')},'data3':{'type':Sequelize[_0xe2f4('0x0')],'comment':'MicrosoftAzure\x20=>\x20client_secret'},'data4':{'type':Sequelize['STRING'],'comment':'MicrosoftAzure\x20=>\x20redirect_uri'},'data5':{'type':Sequelize[_0xe2f4('0x6')],'comment':_0xe2f4('0x7')},'data6':{'type':Sequelize[_0xe2f4('0x6')],'comment':_0xe2f4('0x8')},'data7':{'type':Sequelize[_0xe2f4('0x6')],'comment':_0xe2f4('0x9')}}; \ No newline at end of file +var _0xbfd9=['MicrosoftAzure\x20=>\x20Dynamics365\x20=>\x20remote_uri','sequelize','exports','STRING','ENUM','AmazonAWS','Google','MicrosoftAzure','Outlook365','MicrosoftAzure\x20=>\x20client_id','MicrosoftAzure\x20=>\x20client_secret','MicrosoftAzure\x20=>\x20redirect_uri','TEXT','MicrosoftAzure\x20=>\x20access_token','MicrosoftAzure\x20=>\x20refresh_token'];(function(_0x1c44aa,_0xb777a4){var _0xca8651=function(_0x20ff4a){while(--_0x20ff4a){_0x1c44aa['push'](_0x1c44aa['shift']());}};_0xca8651(++_0xb777a4);}(_0xbfd9,0xf1));var _0x9bfd=function(_0x2fd2cb,_0x437c0){_0x2fd2cb=_0x2fd2cb-0x0;var _0x3fc2b9=_0xbfd9[_0x2fd2cb];return _0x3fc2b9;};'use strict';var Sequelize=require(_0x9bfd('0x0'));module[_0x9bfd('0x1')]={'name':{'type':Sequelize[_0x9bfd('0x2')],'allowNull':![],'validate':{'notEmpty':!![]}},'service':{'type':Sequelize[_0x9bfd('0x3')](_0x9bfd('0x4'),_0x9bfd('0x5'),_0x9bfd('0x6')),'allowNull':![],'validate':{'notEmpty':!![]}},'type':{'type':Sequelize[_0x9bfd('0x3')](_0x9bfd('0x7'),'Dynamics365')},'data1':{'type':Sequelize[_0x9bfd('0x2')],'comment':_0x9bfd('0x8')},'data2':{'type':Sequelize['STRING'],'comment':'MicrosoftAzure\x20=>\x20tenant'},'data3':{'type':Sequelize[_0x9bfd('0x2')],'comment':_0x9bfd('0x9')},'data4':{'type':Sequelize[_0x9bfd('0x2')],'comment':_0x9bfd('0xa')},'data5':{'type':Sequelize[_0x9bfd('0xb')],'comment':_0x9bfd('0xc')},'data6':{'type':Sequelize[_0x9bfd('0xb')],'comment':_0x9bfd('0xd')},'data7':{'type':Sequelize['TEXT'],'comment':_0x9bfd('0xe')}}; \ No newline at end of file diff --git a/server/api/cloudProvider/cloudProvider.controller.js b/server/api/cloudProvider/cloudProvider.controller.js index fb8b110..9a29dc0 100644 --- a/server/api/cloudProvider/cloudProvider.controller.js +++ b/server/api/cloudProvider/cloudProvider.controller.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x74fa=['data3','catch','show','params','keys','find','service','MicrosoftAzure','create','body','Name\x20parameter\x20not\x20specified','rawAttributes','includes','Invalid\x20service\x20parameter.\x20Allowed\x20values:\x20','join','encryptString','findOne','generateMicrosoftAuthorizationUrl','user','get','state','parse','base64','toString','id_token','Unable\x20to\x20validate\x20id_token','del','getOauth2MicrosoftAccessToken','code','data5','data6','refresh_token','startRefreshInterval','emit','microsoftAuthorization:success','Invalid\x20authentication\x20state\x20parameter','message','stringify','lodash','ioredis','../../components/parsers/qs','../../components/encryptor','../../config/logger','../../mysqldb','./cloudProvider.oauth','redis','localhost','socket.io-emitter','sendStatus','end','json','offset','undefined','limit','status','set','Content-Range','update','destroy','then','error','name','send','slice','map','CloudProvider','fieldName','type','model','query','filters','intersection','attributes','fields','length','hasOwnProperty','nolimit','order','sort','where','pick','filter','merge','VIRTUAL','options','count','includeAll','include','findAll','rows','decryptString'];(function(_0x2e2720,_0x1ae995){var _0x3f9d2d=function(_0x5067a2){while(--_0x5067a2){_0x2e2720['push'](_0x2e2720['shift']());}};_0x3f9d2d(++_0x1ae995);}(_0x74fa,0x137));var _0xa74f=function(_0x2eeff4,_0x1ebc20){_0x2eeff4=_0x2eeff4-0x0;var _0xd9e662=_0x74fa[_0x2eeff4];return _0xd9e662;};'use strict';var _=require(_0xa74f('0x0'));var Redis=require(_0xa74f('0x1'));var qs=require(_0xa74f('0x2'));var encryptor=require(_0xa74f('0x3'));var config=require('../../config/environment');var logger=require(_0xa74f('0x4'))('api');var db=require(_0xa74f('0x5'))['db'];var oauth=require(_0xa74f('0x6'));config[_0xa74f('0x7')]=_['defaults'](config[_0xa74f('0x7')],{'host':_0xa74f('0x8'),'port':0x18eb});var socket=require(_0xa74f('0x9'))(new Redis(config[_0xa74f('0x7')]));var redis=new Redis(config['redis']);function respondWithStatusCode(_0x586d9e,_0x332c7e){_0x332c7e=_0x332c7e||0xcc;return function(_0x384346){if(_0x384346){return _0x586d9e[_0xa74f('0xa')](_0x332c7e);}return _0x586d9e['status'](_0x332c7e)[_0xa74f('0xb')]();};}function respondWithResult(_0x1dd3d1,_0x462e74){_0x462e74=_0x462e74||0xc8;return function(_0x214ef9){if(_0x214ef9){return _0x1dd3d1['status'](_0x462e74)[_0xa74f('0xc')](_0x214ef9);}};}function respondWithFilteredResult(_0x14bf4b,_0xa6f5d){return function(_0x2b2f34){if(_0x2b2f34){var _0x856960=typeof _0xa6f5d[_0xa74f('0xd')]===_0xa74f('0xe')&&typeof _0xa6f5d[_0xa74f('0xf')]===_0xa74f('0xe');var _0x321943=_0x2b2f34['count'];var _0x5b23f2=_0x856960?0x0:_0xa6f5d['offset'];var _0x463c47=_0x856960?_0x2b2f34['count']:_0xa6f5d[_0xa74f('0xd')]+_0xa6f5d[_0xa74f('0xf')];var _0x3a411b;if(_0x463c47>=_0x321943){_0x463c47=_0x321943;_0x3a411b=0xc8;}else{_0x3a411b=0xce;}_0x14bf4b[_0xa74f('0x10')](_0x3a411b);return _0x14bf4b[_0xa74f('0x11')](_0xa74f('0x12'),_0x5b23f2+'-'+_0x463c47+'/'+_0x321943)['json'](_0x2b2f34);}return null;};}function saveUpdates(_0x15d53b){return function(_0x19c5c4){if(_0x19c5c4){return _0x19c5c4[_0xa74f('0x13')](_0x15d53b)['then'](function(_0x4bb923){return _0x4bb923;});}return null;};}function removeEntity(_0x2b8c3c){return function(_0x5825be){if(_0x5825be){return _0x5825be[_0xa74f('0x14')]()[_0xa74f('0x15')](function(){_0x2b8c3c[_0xa74f('0x10')](0xcc)[_0xa74f('0xb')]();});}};}function handleEntityNotFound(_0x16649b){return function(_0x45d1b1){if(!_0x45d1b1){_0x16649b['sendStatus'](0x194);}return _0x45d1b1;};}function handleError(_0x2ebdd0,_0x212d57){_0x212d57=_0x212d57||0x1f4;return function(_0x58228f){logger[_0xa74f('0x16')](_0x58228f['stack']);if(_0x58228f[_0xa74f('0x17')]){delete _0x58228f[_0xa74f('0x17')];}_0x2ebdd0['status'](_0x212d57)[_0xa74f('0x18')](_0x58228f);};}function maskClientSecret(_0x473f22){return _['padEnd'](_0x473f22[_0xa74f('0x19')](0x0,0x3),0x14,'*');}exports['index']=function(_0x2ff125,_0x101fd3){var _0x14b6b1={},_0x6eb8ae={},_0x18bf86={'count':0x0,'rows':[]};var _0x5da7eb=_[_0xa74f('0x1a')](db[_0xa74f('0x1b')]['rawAttributes'],function(_0x3d51f9){return{'name':_0x3d51f9[_0xa74f('0x1c')],'type':_0x3d51f9[_0xa74f('0x1d')]['key']};});_0x6eb8ae[_0xa74f('0x1e')]=_[_0xa74f('0x1a')](_0x5da7eb,_0xa74f('0x17'));_0x6eb8ae[_0xa74f('0x1f')]=_['keys'](_0x2ff125[_0xa74f('0x1f')]);_0x6eb8ae[_0xa74f('0x20')]=_[_0xa74f('0x21')](_0x6eb8ae[_0xa74f('0x1e')],_0x6eb8ae['query']);_0x14b6b1[_0xa74f('0x22')]=_['intersection'](_0x6eb8ae[_0xa74f('0x1e')],qs['fields'](_0x2ff125[_0xa74f('0x1f')][_0xa74f('0x23')]));_0x14b6b1[_0xa74f('0x22')]=_0x14b6b1['attributes'][_0xa74f('0x24')]?_0x14b6b1[_0xa74f('0x22')]:_0x6eb8ae[_0xa74f('0x1e')];if(!_0x2ff125['query'][_0xa74f('0x25')](_0xa74f('0x26'))){_0x14b6b1['limit']=qs[_0xa74f('0xf')](_0x2ff125[_0xa74f('0x1f')][_0xa74f('0xf')]);_0x14b6b1[_0xa74f('0xd')]=qs[_0xa74f('0xd')](_0x2ff125[_0xa74f('0x1f')][_0xa74f('0xd')]);}_0x14b6b1[_0xa74f('0x27')]=qs['sort'](_0x2ff125['query'][_0xa74f('0x28')]);_0x14b6b1[_0xa74f('0x29')]=qs[_0xa74f('0x20')](_[_0xa74f('0x2a')](_0x2ff125['query'],_0x6eb8ae[_0xa74f('0x20')]),_0x5da7eb);if(_0x2ff125[_0xa74f('0x1f')][_0xa74f('0x2b')]){_0x14b6b1['where']=_[_0xa74f('0x2c')](_0x14b6b1[_0xa74f('0x29')],{'$or':_[_0xa74f('0x1a')](_0x5da7eb,function(_0x2024fc){if(_0x2024fc[_0xa74f('0x1d')]!==_0xa74f('0x2d')){var _0x3b99ab={};_0x3b99ab[_0x2024fc[_0xa74f('0x17')]]={'$like':'%'+_0x2ff125[_0xa74f('0x1f')][_0xa74f('0x2b')]+'%'};return _0x3b99ab;}})});}_0x14b6b1=_[_0xa74f('0x2c')]({},_0x14b6b1,_0x2ff125[_0xa74f('0x2e')]);var _0x547acb={'where':_0x14b6b1[_0xa74f('0x29')]};return db[_0xa74f('0x1b')]['count'](_0x547acb)[_0xa74f('0x15')](function(_0x280876){_0x18bf86[_0xa74f('0x2f')]=_0x280876;if(_0x2ff125['query'][_0xa74f('0x30')]){_0x14b6b1[_0xa74f('0x31')]=[{'all':!![]}];}return db[_0xa74f('0x1b')][_0xa74f('0x32')](_0x14b6b1);})['then'](function(_0x315e11){_0x18bf86[_0xa74f('0x33')]=_[_0xa74f('0x1a')](_0x315e11,function(_0x44d4f3){if(_0x44d4f3['service']==='MicrosoftAzure'){var _0x49e751=encryptor[_0xa74f('0x34')](_0x44d4f3['data3']);_0x44d4f3[_0xa74f('0x35')]=maskClientSecret(_0x49e751);}return _0x44d4f3;});return _0x18bf86;})['then'](respondWithFilteredResult(_0x101fd3,_0x14b6b1))[_0xa74f('0x36')](handleError(_0x101fd3,null));};exports[_0xa74f('0x37')]=function(_0xdb33e5,_0x3ce3e2){var _0x8b7eb3={'raw':!![],'where':{'id':_0xdb33e5[_0xa74f('0x38')]['id']}},_0x3ea72e={};_0x3ea72e['model']=_[_0xa74f('0x39')](db[_0xa74f('0x1b')]['rawAttributes']);_0x3ea72e[_0xa74f('0x1f')]=_[_0xa74f('0x39')](_0xdb33e5['query']);_0x3ea72e[_0xa74f('0x20')]=_[_0xa74f('0x21')](_0x3ea72e['model'],_0x3ea72e['query']);_0x8b7eb3[_0xa74f('0x22')]=_['intersection'](_0x3ea72e[_0xa74f('0x1e')],qs[_0xa74f('0x23')](_0xdb33e5[_0xa74f('0x1f')]['fields']));_0x8b7eb3[_0xa74f('0x22')]=_0x8b7eb3[_0xa74f('0x22')][_0xa74f('0x24')]?_0x8b7eb3[_0xa74f('0x22')]:_0x3ea72e[_0xa74f('0x1e')];if(_0xdb33e5[_0xa74f('0x1f')][_0xa74f('0x30')]){_0x8b7eb3['include']=[{'all':!![]}];}_0x8b7eb3=_[_0xa74f('0x2c')]({},_0x8b7eb3,_0xdb33e5[_0xa74f('0x2e')]);return db[_0xa74f('0x1b')][_0xa74f('0x3a')](_0x8b7eb3)[_0xa74f('0x15')](handleEntityNotFound(_0x3ce3e2,null))[_0xa74f('0x15')](function(_0x5bb230){if(_0x5bb230[_0xa74f('0x3b')]===_0xa74f('0x3c')){var _0x588acb=encryptor['decryptString'](_0x5bb230[_0xa74f('0x35')]);_0x5bb230[_0xa74f('0x35')]=maskClientSecret(_0x588acb);}return _0x5bb230;})[_0xa74f('0x15')](respondWithResult(_0x3ce3e2,null))[_0xa74f('0x36')](handleError(_0x3ce3e2,null));};exports[_0xa74f('0x3d')]=function(_0x56384e,_0x590375){if(!_0x56384e[_0xa74f('0x3e')][_0xa74f('0x17')])throw new Error(_0xa74f('0x3f'));if(!_0x56384e[_0xa74f('0x3e')]['service'])throw new Error('Service\x20parameter\x20not\x20specified');var _0x8eeffb=db[_0xa74f('0x1b')][_0xa74f('0x40')][_0xa74f('0x3b')]['values'];if(!_0x8eeffb[_0xa74f('0x41')](_0x56384e[_0xa74f('0x3e')][_0xa74f('0x3b')]))throw new Error(_0xa74f('0x42')+_0x8eeffb[_0xa74f('0x43')](',\x20'));if(_0x56384e[_0xa74f('0x3e')][_0xa74f('0x3b')]==='MicrosoftAzure'&&_0x56384e[_0xa74f('0x3e')]['data3']){_0x56384e[_0xa74f('0x3e')][_0xa74f('0x35')]=encryptor[_0xa74f('0x44')](_0x56384e[_0xa74f('0x3e')][_0xa74f('0x35')]);}return db['CloudProvider']['create'](_0x56384e[_0xa74f('0x3e')],{})[_0xa74f('0x15')](respondWithResult(_0x590375,0xc9))[_0xa74f('0x36')](handleError(_0x590375,null));};exports['update']=function(_0x33ee1a,_0x38f6fb){if(_0x33ee1a['body']['id']){delete _0x33ee1a['body']['id'];}return db[_0xa74f('0x1b')]['find']({'where':{'id':_0x33ee1a[_0xa74f('0x38')]['id']}})['then'](handleEntityNotFound(_0x38f6fb,null))[_0xa74f('0x15')](function(_0x3c2ae8){if(_0x3c2ae8[_0xa74f('0x3b')]==='MicrosoftAzure'&&_0x33ee1a['body'][_0xa74f('0x35')]){_0x33ee1a[_0xa74f('0x3e')][_0xa74f('0x35')]=encryptor['encryptString'](_0x33ee1a[_0xa74f('0x3e')][_0xa74f('0x35')]);}return _0x3c2ae8;})[_0xa74f('0x15')](saveUpdates(_0x33ee1a[_0xa74f('0x3e')],null))[_0xa74f('0x15')](respondWithResult(_0x38f6fb,null))[_0xa74f('0x36')](handleError(_0x38f6fb,null));};exports[_0xa74f('0x14')]=function(_0x323b57,_0xe7bb7e){return db[_0xa74f('0x1b')][_0xa74f('0x3a')]({'where':{'id':_0x323b57[_0xa74f('0x38')]['id']}})[_0xa74f('0x15')](handleEntityNotFound(_0xe7bb7e,null))[_0xa74f('0x15')](removeEntity(_0xe7bb7e,null))[_0xa74f('0x36')](handleError(_0xe7bb7e,null));};exports['oauth2MicrosoftAuthorize']=function(_0x38e38e,_0x1b27bb){return db[_0xa74f('0x1b')][_0xa74f('0x45')]({'where':{'id':_0x38e38e[_0xa74f('0x38')]['id']},'raw':!![]})[_0xa74f('0x15')](function(_0x52a7a0){if(!_0x52a7a0)return _0x1b27bb[_0xa74f('0xa')](0x194);return{'url':oauth[_0xa74f('0x46')](_0x52a7a0,_0x38e38e[_0xa74f('0x47')]['id'])};})[_0xa74f('0x15')](respondWithResult(_0x1b27bb,null))[_0xa74f('0x36')](handleError(_0x1b27bb,null));};exports['oauth2MicrosoftCallback']=function(_0x19efe2,_0x30201d){var _0x1225f2=_0x19efe2[_0xa74f('0x3e')];var _0x2516b3;var _0x2fe16b;if(_0x1225f2[_0xa74f('0x16')])throw _0x1225f2;redis[_0xa74f('0x48')](_0x1225f2[_0xa74f('0x49')])[_0xa74f('0x15')](function(_0x3565db){if(!_0x3565db)throw new Error('Invalid\x20state\x20parameter');_0x2516b3=JSON[_0xa74f('0x4a')](_0x3565db);var _0x19a2c4=Buffer['from'](_0x1225f2['state'],_0xa74f('0x4b'))[_0xa74f('0x4c')]('ascii');_0x2fe16b=JSON[_0xa74f('0x4a')](_0x19a2c4);if(!oauth['isValidIdToken'](_0x1225f2[_0xa74f('0x4d')],_0x2516b3['oauth2Claims']))throw new Error(_0xa74f('0x4e'));redis[_0xa74f('0x4f')](_0x1225f2[_0xa74f('0x49')]);return oauth[_0xa74f('0x50')](_0x1225f2[_0xa74f('0x51')],_0x2516b3);})[_0xa74f('0x15')](function(_0x2e1376){_0x2516b3[_0xa74f('0x52')]=_0x2e1376['access_token'];_0x2516b3[_0xa74f('0x53')]=_0x2e1376[_0xa74f('0x54')];return db['CloudProvider'][_0xa74f('0x13')]({'data5':_0x2516b3[_0xa74f('0x52')],'data6':_0x2516b3[_0xa74f('0x53')]},{'where':{'id':_0x2516b3['id']}});})[_0xa74f('0x15')](function(){oauth[_0xa74f('0x55')](_0x2516b3);socket[_0xa74f('0x56')](_0xa74f('0x57'),{'id':_0x2fe16b['id']});return;})[_0xa74f('0x15')](respondWithStatusCode(_0x30201d,null))[_0xa74f('0x36')](function(_0x33e45e){if(_0x2fe16b){socket[_0xa74f('0x56')]('microsoftAuthorization:error',{'id':_0x2fe16b['id']});}if(!_0x2516b3){logger[_0xa74f('0x16')](_0xa74f('0x58'),_0x33e45e);return _0x30201d['status'](0x1f4)[_0xa74f('0x18')](_0x33e45e[_0xa74f('0x59')]);}logger[_0xa74f('0x16')]('Authentication\x20failed\x20for\x20cloud\x20provider\x20#%s,\x20err:%s',_0x2516b3['id'],JSON[_0xa74f('0x5a')](_0x33e45e));});}; \ No newline at end of file +var _0x5526=['map','query','keys','intersection','attributes','fields','hasOwnProperty','nolimit','order','sort','where','filters','pick','VIRTUAL','filter','merge','options','includeAll','rows','service','MicrosoftAzure','decryptString','data3','catch','show','params','length','include','body','includes','Invalid\x20service\x20parameter.\x20Allowed\x20values:\x20','join','find','oauth2MicrosoftAuthorize','findOne','user','oauth2MicrosoftCallback','get','state','parse','from','toString','ascii','isValidIdToken','oauth2Claims','Unable\x20to\x20validate\x20id_token','del','getOauth2MicrosoftAccessToken','code','data5','refresh_token','data6','startRefreshInterval','microsoftAuthorization:success','emit','microsoftAuthorization:error','Invalid\x20authentication\x20state\x20parameter','send','message','Authentication\x20failed\x20for\x20cloud\x20provider\x20#%s,\x20err:%s','lodash','../../components/parsers/qs','../../components/encryptor','../../config/environment','../../config/logger','api','../../mysqldb','./cloudProvider.oauth','defaults','redis','localhost','sendStatus','status','end','json','offset','undefined','limit','count','set','Content-Range','update','then','destroy','error','stack','name','slice','index','CloudProvider','rawAttributes','fieldName','type','key','model'];(function(_0x5e913f,_0x265fc0){var _0x472cc4=function(_0x49df8d){while(--_0x49df8d){_0x5e913f['push'](_0x5e913f['shift']());}};_0x472cc4(++_0x265fc0);}(_0x5526,0xfa));var _0x6552=function(_0xd07e81,_0x1ccacd){_0xd07e81=_0xd07e81-0x0;var _0x379364=_0x5526[_0xd07e81];return _0x379364;};'use strict';var _=require(_0x6552('0x0'));var Redis=require('ioredis');var qs=require(_0x6552('0x1'));var encryptor=require(_0x6552('0x2'));var config=require(_0x6552('0x3'));var logger=require(_0x6552('0x4'))(_0x6552('0x5'));var db=require(_0x6552('0x6'))['db'];var oauth=require(_0x6552('0x7'));config['redis']=_[_0x6552('0x8')](config[_0x6552('0x9')],{'host':_0x6552('0xa'),'port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config['redis']));var redis=new Redis(config[_0x6552('0x9')]);function respondWithStatusCode(_0x32a51b,_0x192f4c){_0x192f4c=_0x192f4c||0xcc;return function(_0x16b42f){if(_0x16b42f){return _0x32a51b[_0x6552('0xb')](_0x192f4c);}return _0x32a51b[_0x6552('0xc')](_0x192f4c)[_0x6552('0xd')]();};}function respondWithResult(_0x50eac2,_0x4dac8d){_0x4dac8d=_0x4dac8d||0xc8;return function(_0x5506a9){if(_0x5506a9){return _0x50eac2[_0x6552('0xc')](_0x4dac8d)[_0x6552('0xe')](_0x5506a9);}};}function respondWithFilteredResult(_0x49830d,_0x3dc0ab){return function(_0x230c87){if(_0x230c87){var _0x3b39fd=typeof _0x3dc0ab[_0x6552('0xf')]===_0x6552('0x10')&&typeof _0x3dc0ab[_0x6552('0x11')]===_0x6552('0x10');var _0x41bbc9=_0x230c87[_0x6552('0x12')];var _0x461b81=_0x3b39fd?0x0:_0x3dc0ab[_0x6552('0xf')];var _0x30089f=_0x3b39fd?_0x230c87[_0x6552('0x12')]:_0x3dc0ab['offset']+_0x3dc0ab[_0x6552('0x11')];var _0x4a6ef8;if(_0x30089f>=_0x41bbc9){_0x30089f=_0x41bbc9;_0x4a6ef8=0xc8;}else{_0x4a6ef8=0xce;}_0x49830d[_0x6552('0xc')](_0x4a6ef8);return _0x49830d[_0x6552('0x13')](_0x6552('0x14'),_0x461b81+'-'+_0x30089f+'/'+_0x41bbc9)[_0x6552('0xe')](_0x230c87);}return null;};}function saveUpdates(_0x5c5543){return function(_0x47cb7e){if(_0x47cb7e){return _0x47cb7e[_0x6552('0x15')](_0x5c5543)[_0x6552('0x16')](function(_0x17cbea){return _0x17cbea;});}return null;};}function removeEntity(_0x35e357){return function(_0x9c7a3b){if(_0x9c7a3b){return _0x9c7a3b[_0x6552('0x17')]()[_0x6552('0x16')](function(){_0x35e357[_0x6552('0xc')](0xcc)['end']();});}};}function handleEntityNotFound(_0x51d2c8){return function(_0x26b3b2){if(!_0x26b3b2){_0x51d2c8[_0x6552('0xb')](0x194);}return _0x26b3b2;};}function handleError(_0x5577dc,_0x171ba3){_0x171ba3=_0x171ba3||0x1f4;return function(_0x10c80d){logger[_0x6552('0x18')](_0x10c80d[_0x6552('0x19')]);if(_0x10c80d['name']){delete _0x10c80d[_0x6552('0x1a')];}_0x5577dc[_0x6552('0xc')](_0x171ba3)['send'](_0x10c80d);};}function maskClientSecret(_0x387430){return _['padEnd'](_0x387430[_0x6552('0x1b')](0x0,0x3),0x14,'*');}exports[_0x6552('0x1c')]=function(_0x3804e5,_0x42c55){var _0x1c9761={},_0x1444ce={},_0x390155={'count':0x0,'rows':[]};var _0x481e61=_['map'](db[_0x6552('0x1d')][_0x6552('0x1e')],function(_0x54526b){return{'name':_0x54526b[_0x6552('0x1f')],'type':_0x54526b[_0x6552('0x20')][_0x6552('0x21')]};});_0x1444ce[_0x6552('0x22')]=_[_0x6552('0x23')](_0x481e61,_0x6552('0x1a'));_0x1444ce[_0x6552('0x24')]=_[_0x6552('0x25')](_0x3804e5[_0x6552('0x24')]);_0x1444ce['filters']=_[_0x6552('0x26')](_0x1444ce['model'],_0x1444ce['query']);_0x1c9761[_0x6552('0x27')]=_[_0x6552('0x26')](_0x1444ce['model'],qs[_0x6552('0x28')](_0x3804e5[_0x6552('0x24')][_0x6552('0x28')]));_0x1c9761[_0x6552('0x27')]=_0x1c9761[_0x6552('0x27')]['length']?_0x1c9761[_0x6552('0x27')]:_0x1444ce[_0x6552('0x22')];if(!_0x3804e5['query'][_0x6552('0x29')](_0x6552('0x2a'))){_0x1c9761['limit']=qs['limit'](_0x3804e5[_0x6552('0x24')][_0x6552('0x11')]);_0x1c9761[_0x6552('0xf')]=qs[_0x6552('0xf')](_0x3804e5[_0x6552('0x24')][_0x6552('0xf')]);}_0x1c9761[_0x6552('0x2b')]=qs['sort'](_0x3804e5[_0x6552('0x24')][_0x6552('0x2c')]);_0x1c9761[_0x6552('0x2d')]=qs[_0x6552('0x2e')](_[_0x6552('0x2f')](_0x3804e5['query'],_0x1444ce[_0x6552('0x2e')]),_0x481e61);if(_0x3804e5[_0x6552('0x24')]['filter']){_0x1c9761[_0x6552('0x2d')]=_['merge'](_0x1c9761[_0x6552('0x2d')],{'$or':_[_0x6552('0x23')](_0x481e61,function(_0x44d2cf){if(_0x44d2cf[_0x6552('0x20')]!==_0x6552('0x30')){var _0x3c50c1={};_0x3c50c1[_0x44d2cf[_0x6552('0x1a')]]={'$like':'%'+_0x3804e5[_0x6552('0x24')][_0x6552('0x31')]+'%'};return _0x3c50c1;}})});}_0x1c9761=_[_0x6552('0x32')]({},_0x1c9761,_0x3804e5[_0x6552('0x33')]);var _0x5386ba={'where':_0x1c9761[_0x6552('0x2d')]};return db[_0x6552('0x1d')][_0x6552('0x12')](_0x5386ba)['then'](function(_0x4564d8){_0x390155[_0x6552('0x12')]=_0x4564d8;if(_0x3804e5[_0x6552('0x24')][_0x6552('0x34')]){_0x1c9761['include']=[{'all':!![]}];}return db[_0x6552('0x1d')]['findAll'](_0x1c9761);})['then'](function(_0x431bde){_0x390155[_0x6552('0x35')]=_[_0x6552('0x23')](_0x431bde,function(_0x5c3fc6){if(_0x5c3fc6[_0x6552('0x36')]===_0x6552('0x37')){var _0x2bcea6=encryptor[_0x6552('0x38')](_0x5c3fc6[_0x6552('0x39')]);_0x5c3fc6['data3']=maskClientSecret(_0x2bcea6);}return _0x5c3fc6;});return _0x390155;})['then'](respondWithFilteredResult(_0x42c55,_0x1c9761))[_0x6552('0x3a')](handleError(_0x42c55,null));};exports[_0x6552('0x3b')]=function(_0x925a13,_0x49d477){var _0x4a773f={'raw':!![],'where':{'id':_0x925a13[_0x6552('0x3c')]['id']}},_0x305b37={};_0x305b37[_0x6552('0x22')]=_[_0x6552('0x25')](db[_0x6552('0x1d')][_0x6552('0x1e')]);_0x305b37[_0x6552('0x24')]=_[_0x6552('0x25')](_0x925a13[_0x6552('0x24')]);_0x305b37['filters']=_[_0x6552('0x26')](_0x305b37[_0x6552('0x22')],_0x305b37[_0x6552('0x24')]);_0x4a773f[_0x6552('0x27')]=_[_0x6552('0x26')](_0x305b37['model'],qs[_0x6552('0x28')](_0x925a13['query']['fields']));_0x4a773f[_0x6552('0x27')]=_0x4a773f[_0x6552('0x27')][_0x6552('0x3d')]?_0x4a773f[_0x6552('0x27')]:_0x305b37[_0x6552('0x22')];if(_0x925a13[_0x6552('0x24')][_0x6552('0x34')]){_0x4a773f[_0x6552('0x3e')]=[{'all':!![]}];}_0x4a773f=_[_0x6552('0x32')]({},_0x4a773f,_0x925a13[_0x6552('0x33')]);return db['CloudProvider']['find'](_0x4a773f)['then'](handleEntityNotFound(_0x49d477,null))[_0x6552('0x16')](function(_0x1aeb7a){if(_0x1aeb7a[_0x6552('0x36')]===_0x6552('0x37')){var _0x4dd995=encryptor[_0x6552('0x38')](_0x1aeb7a[_0x6552('0x39')]);_0x1aeb7a['data3']=maskClientSecret(_0x4dd995);}return _0x1aeb7a;})[_0x6552('0x16')](respondWithResult(_0x49d477,null))[_0x6552('0x3a')](handleError(_0x49d477,null));};exports['create']=function(_0x4014a9,_0x2d3aae){if(!_0x4014a9[_0x6552('0x3f')][_0x6552('0x1a')])throw new Error('Name\x20parameter\x20not\x20specified');if(!_0x4014a9[_0x6552('0x3f')][_0x6552('0x36')])throw new Error('Service\x20parameter\x20not\x20specified');var _0x1480d3=db[_0x6552('0x1d')][_0x6552('0x1e')][_0x6552('0x36')]['values'];if(!_0x1480d3[_0x6552('0x40')](_0x4014a9[_0x6552('0x3f')][_0x6552('0x36')]))throw new Error(_0x6552('0x41')+_0x1480d3[_0x6552('0x42')](',\x20'));if(_0x4014a9['body'][_0x6552('0x36')]==='MicrosoftAzure'&&_0x4014a9[_0x6552('0x3f')][_0x6552('0x39')]){_0x4014a9['body'][_0x6552('0x39')]=encryptor['encryptString'](_0x4014a9[_0x6552('0x3f')]['data3']);}return db[_0x6552('0x1d')]['create'](_0x4014a9[_0x6552('0x3f')],{})[_0x6552('0x16')](respondWithResult(_0x2d3aae,0xc9))[_0x6552('0x3a')](handleError(_0x2d3aae,null));};exports['update']=function(_0x445660,_0x3a1482){if(_0x445660[_0x6552('0x3f')]['id']){delete _0x445660[_0x6552('0x3f')]['id'];}return db[_0x6552('0x1d')][_0x6552('0x43')]({'where':{'id':_0x445660[_0x6552('0x3c')]['id']}})[_0x6552('0x16')](handleEntityNotFound(_0x3a1482,null))[_0x6552('0x16')](function(_0x563553){if(_0x563553[_0x6552('0x36')]===_0x6552('0x37')&&_0x445660['body'][_0x6552('0x39')]){_0x445660['body'][_0x6552('0x39')]=encryptor['encryptString'](_0x445660['body'][_0x6552('0x39')]);}return _0x563553;})['then'](saveUpdates(_0x445660[_0x6552('0x3f')],null))[_0x6552('0x16')](respondWithResult(_0x3a1482,null))[_0x6552('0x3a')](handleError(_0x3a1482,null));};exports[_0x6552('0x17')]=function(_0x191774,_0x5c6c64){return db[_0x6552('0x1d')][_0x6552('0x43')]({'where':{'id':_0x191774[_0x6552('0x3c')]['id']}})[_0x6552('0x16')](handleEntityNotFound(_0x5c6c64,null))[_0x6552('0x16')](removeEntity(_0x5c6c64,null))[_0x6552('0x3a')](handleError(_0x5c6c64,null));};exports[_0x6552('0x44')]=function(_0x85bc55,_0x30f5f0){return db[_0x6552('0x1d')][_0x6552('0x45')]({'where':{'id':_0x85bc55['params']['id']},'raw':!![]})[_0x6552('0x16')](function(_0x3dedfa){if(!_0x3dedfa)return _0x30f5f0['sendStatus'](0x194);return{'url':oauth['generateMicrosoftAuthorizationUrl'](_0x3dedfa,_0x85bc55[_0x6552('0x46')]['id'])};})[_0x6552('0x16')](respondWithResult(_0x30f5f0,null))[_0x6552('0x3a')](handleError(_0x30f5f0,null));};exports[_0x6552('0x47')]=function(_0x210df3,_0x2f2931){var _0x371ad4=_0x210df3['body'];var _0x34642a;var _0x526a71;if(_0x371ad4[_0x6552('0x18')])throw _0x371ad4;redis[_0x6552('0x48')](_0x371ad4[_0x6552('0x49')])['then'](function(_0x79ca6c){if(!_0x79ca6c)throw new Error('Invalid\x20state\x20parameter');_0x34642a=JSON[_0x6552('0x4a')](_0x79ca6c);var _0x2a15ed=Buffer[_0x6552('0x4b')](_0x371ad4[_0x6552('0x49')],'base64')[_0x6552('0x4c')](_0x6552('0x4d'));_0x526a71=JSON['parse'](_0x2a15ed);if(!oauth[_0x6552('0x4e')](_0x371ad4['id_token'],_0x34642a[_0x6552('0x4f')]))throw new Error(_0x6552('0x50'));redis[_0x6552('0x51')](_0x371ad4['state']);return oauth[_0x6552('0x52')](_0x371ad4[_0x6552('0x53')],_0x34642a);})['then'](function(_0xbf01fc){_0x34642a[_0x6552('0x54')]=_0xbf01fc['access_token'];_0x34642a['data6']=_0xbf01fc[_0x6552('0x55')];return db[_0x6552('0x1d')][_0x6552('0x15')]({'data5':_0x34642a[_0x6552('0x54')],'data6':_0x34642a[_0x6552('0x56')]},{'where':{'id':_0x34642a['id']}});})['then'](function(){oauth[_0x6552('0x57')](_0x34642a);socket['emit'](_0x6552('0x58'),{'id':_0x526a71['id']});return;})[_0x6552('0x16')](respondWithStatusCode(_0x2f2931,null))[_0x6552('0x3a')](function(_0x199046){if(_0x526a71){socket[_0x6552('0x59')](_0x6552('0x5a'),{'id':_0x526a71['id']});}if(!_0x34642a){logger[_0x6552('0x18')](_0x6552('0x5b'),_0x199046);return _0x2f2931[_0x6552('0xc')](0x1f4)[_0x6552('0x5c')](_0x199046[_0x6552('0x5d')]);}logger['error'](_0x6552('0x5e'),_0x34642a['id'],JSON['stringify'](_0x199046));});}; \ No newline at end of file diff --git a/server/api/cloudProvider/cloudProvider.model.js b/server/api/cloudProvider/cloudProvider.model.js index 92e325c..6a9bf07 100644 --- a/server/api/cloudProvider/cloudProvider.model.js +++ b/server/api/cloudProvider/cloudProvider.model.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x67ed=['../../config/logger','moment','path','rimraf','../../config/environment','./cloudProvider.attributes','exports','define','CloudProvider','cloud_providers','lodash'];(function(_0x3f6bcf,_0x531e79){var _0x1c5350=function(_0x282fc5){while(--_0x282fc5){_0x3f6bcf['push'](_0x3f6bcf['shift']());}};_0x1c5350(++_0x531e79);}(_0x67ed,0xaf));var _0xd67e=function(_0x2a89e2,_0x4bcc5a){_0x2a89e2=_0x2a89e2-0x0;var _0x264584=_0x67ed[_0x2a89e2];return _0x264584;};'use strict';var _=require(_0xd67e('0x0'));var util=require('util');var logger=require(_0xd67e('0x1'))('api');var moment=require(_0xd67e('0x2'));var BPromise=require('bluebird');var rp=require('request-promise');var fs=require('fs');var path=require(_0xd67e('0x3'));var rimraf=require(_0xd67e('0x4'));var config=require(_0xd67e('0x5'));var attributes=require(_0xd67e('0x6'));module[_0xd67e('0x7')]=function(_0x368740,_0x192c03){return _0x368740[_0xd67e('0x8')](_0xd67e('0x9'),attributes,{'tableName':_0xd67e('0xa'),'paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file +var _0xa96b=['cloud_providers','util','api','moment','bluebird','request-promise','path','../../config/environment','./cloudProvider.attributes','exports','define','CloudProvider'];(function(_0x174e35,_0x4251b6){var _0x34be85=function(_0xce717f){while(--_0xce717f){_0x174e35['push'](_0x174e35['shift']());}};_0x34be85(++_0x4251b6);}(_0xa96b,0xe5));var _0xba96=function(_0x4105b7,_0x325fc8){_0x4105b7=_0x4105b7-0x0;var _0xed9bf3=_0xa96b[_0x4105b7];return _0xed9bf3;};'use strict';var _=require('lodash');var util=require(_0xba96('0x0'));var logger=require('../../config/logger')(_0xba96('0x1'));var moment=require(_0xba96('0x2'));var BPromise=require(_0xba96('0x3'));var rp=require(_0xba96('0x4'));var fs=require('fs');var path=require(_0xba96('0x5'));var rimraf=require('rimraf');var config=require(_0xba96('0x6'));var attributes=require(_0xba96('0x7'));module[_0xba96('0x8')]=function(_0x5681cb,_0x21b862){return _0x5681cb[_0xba96('0x9')](_0xba96('0xa'),attributes,{'tableName':_0xba96('0xb'),'paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file diff --git a/server/api/cloudProvider/cloudProvider.oauth.js b/server/api/cloudProvider/cloudProvider.oauth.js index bff5f6b..4b8487d 100644 --- a/server/api/cloudProvider/cloudProvider.oauth.js +++ b/server/api/cloudProvider/cloudProvider.oauth.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xcfae=['update','catch','error','Failed\x20to\x20refresh\x20access\x20token\x20for\x20cloud\x20provider\x20#%s,\x20-\x20err:%s','decryptString','data3','intervals','bind','findAll','exports','lodash','crypto','moment','ioredis','util','../../components/encryptor','../../config/environment','../../config/logger','../../config/schedule/cloud-provider','defaults','redis','localhost','https://login.microsoftonline.com/{TENANT_ID}/oauth2/v2.0','profile','https://outlook.office365.com/IMAP.AccessAsUser.All','openid','offline_access','map','type','Dynamics365','data7','/.default','join','replace','{TENANT_ID}','data2','code','id_token','from','stringify','toString','randomBytes','hex','client_id','data1','response_type','data4','response_mode','scope','state','nonce','prompt','login','key','value','decode','payload','iss','aud','isAfter','unix','resolve','findOne','then','refresh_token','POST','access_token','data6','CloudProvider'];(function(_0x2f9f9c,_0x59c596){var _0x18d14e=function(_0xbe219f){while(--_0xbe219f){_0x2f9f9c['push'](_0x2f9f9c['shift']());}};_0x18d14e(++_0x59c596);}(_0xcfae,0x1a8));var _0xecfa=function(_0x3c4f1f,_0x20d3ec){_0x3c4f1f=_0x3c4f1f-0x0;var _0x19cb69=_0xcfae[_0x3c4f1f];return _0x19cb69;};'use strict';var _=require(_0xecfa('0x0'));var crypto=require(_0xecfa('0x1'));var jwt=require('jsonwebtoken');var moment=require(_0xecfa('0x2'));var Redis=require(_0xecfa('0x3'));var rp=require('request-promise');var util=require(_0xecfa('0x4'));var encryptor=require(_0xecfa('0x5'));var config=require(_0xecfa('0x6'));var logger=require(_0xecfa('0x7'))('api');var schedule=require(_0xecfa('0x8'));var db=require('../../mysqldb')['db'];config['redis']=_[_0xecfa('0x9')](config[_0xecfa('0xa')],{'host':_0xecfa('0xb'),'port':0x18eb});var redis=new Redis(config[_0xecfa('0xa')]);var MICROSOFT_AUTH_URL=_0xecfa('0xc');var AZURE_AUTH_SCOPES={'Outlook365':['openid',_0xecfa('0xd'),'email','offline_access',_0xecfa('0xe'),'https://outlook.office.com/POP.AccessAsUser.All','https://outlook.office.com/SMTP.Send'],'Dynamics365':[_0xecfa('0xf'),_0xecfa('0x10')]};var MICROSOFT_AUTH_ENDPOINT='/authorize';var MICROSOFT_TOKEN_ENDPOINT='/token';var OAUTH_REFRESH_INTERVAL=0xfa;function getAuthorizationScopes(_0x266072){var _0x58a73c=_[_0xecfa('0x11')](AZURE_AUTH_SCOPES[_0x266072[_0xecfa('0x12')]]);if(_0x266072[_0xecfa('0x12')]===_0xecfa('0x13'))_0x58a73c['push'](_0x266072[_0xecfa('0x14')]+_0xecfa('0x15'));return _0x58a73c[_0xecfa('0x16')]('\x20');}function getAccessTokenScope(_0x476140){if(_0x476140['type']==='Outlook365')return _0xecfa('0xe');if(_0x476140[_0xecfa('0x12')]===_0xecfa('0x13'))return _0x476140[_0xecfa('0x14')]+_0xecfa('0x15');}function generateMicrosoftAuthorizationUrl(_0x53eceb,_0x2dab75){var _0x2af9ce=MICROSOFT_AUTH_URL[_0xecfa('0x17')](_0xecfa('0x18'),_0x53eceb[_0xecfa('0x19')]);var _0x1e86a8=[_0xecfa('0x1a'),_0xecfa('0x1b')];var _0x1334ae=Buffer[_0xecfa('0x1c')](JSON[_0xecfa('0x1d')]({'id':_0x2dab75}))[_0xecfa('0x1e')]('base64');var _0x19aa73=crypto[_0xecfa('0x1f')](0x10)['toString'](_0xecfa('0x20'));var _0x32e111=getAuthorizationScopes(_0x53eceb);var _0x1feb26=[{'key':_0xecfa('0x21'),'value':_0x53eceb[_0xecfa('0x22')]},{'key':_0xecfa('0x23'),'value':encodeURIComponent(_0x1e86a8[_0xecfa('0x16')]('\x20'))},{'key':'redirect_uri','value':_0x53eceb[_0xecfa('0x24')]},{'key':_0xecfa('0x25'),'value':'form_post'},{'key':_0xecfa('0x26'),'value':encodeURIComponent(_0x32e111)},{'key':_0xecfa('0x27'),'value':_0x1334ae},{'key':_0xecfa('0x28'),'value':_0x19aa73},{'key':_0xecfa('0x29'),'value':_0xecfa('0x2a')}];var _0x1d1fd2=_0x2af9ce+MICROSOFT_AUTH_ENDPOINT+'?'+_[_0xecfa('0x11')](_0x1feb26,function(_0x59c15a){return _0x59c15a[_0xecfa('0x2b')]+'='+_0x59c15a[_0xecfa('0x2c')];})[_0xecfa('0x16')]('&');_0x53eceb['oauth2Claims']={'issuer':_0x2af9ce[_0xecfa('0x17')]('oauth2/',''),'audience':_0x53eceb['data1'],'state':_0x1334ae,'nonce':_0x19aa73};redis['set'](_0x1334ae,JSON[_0xecfa('0x1d')](_0x53eceb));return _0x1d1fd2;}function isValidIdToken(_0x26c998,_0x1c21aa){try{var _0x3dace5=jwt[_0xecfa('0x2d')](_0x26c998,{'complete':!![]});var _0x4731f2=_0x3dace5[_0xecfa('0x2e')];if(_0x4731f2[_0xecfa('0x2f')]!==_0x1c21aa['issuer'])return![];if(_0x4731f2[_0xecfa('0x30')]!==_0x1c21aa['audience'])return![];if(_0x4731f2['nonce']!==_0x1c21aa[_0xecfa('0x28')])return![];if(moment()[_0xecfa('0x31')](moment[_0xecfa('0x32')](_0x4731f2['exp'])))return![];return!![];}catch(_0x7304b9){throw _0x7304b9;}}function refreshOauth2MicrosoftAccessToken(_0x4f4e41){return Promise[_0xecfa('0x33')]()['then'](function(){if(_0x4f4e41['data3'])return _0x4f4e41;return db['CloudProvider'][_0xecfa('0x34')]({'where':{'id':_0x4f4e41['id']},'raw':!![]});})[_0xecfa('0x35')](function(_0x51caad){var _0x223512={'grant_type':_0xecfa('0x36'),'refresh_token':_0x51caad['data6'],'scope':getAccessTokenScope(_0x51caad),'redirect_uri':_0x51caad[_0xecfa('0x24')],'client_id':_0x51caad['data1'],'client_secret':encryptor['decryptString'](_0x51caad['data3'])};var _0x2b17a5={'method':_0xecfa('0x37'),'uri':MICROSOFT_AUTH_URL[_0xecfa('0x17')](_0xecfa('0x18'),_0x51caad['data2'])+MICROSOFT_TOKEN_ENDPOINT,'form':_0x223512,'json':!![]};return rp(_0x2b17a5);})[_0xecfa('0x35')](function(_0x88f901){_0x4f4e41['data5']=_0x88f901[_0xecfa('0x38')];_0x4f4e41[_0xecfa('0x39')]=_0x88f901[_0xecfa('0x36')];return db[_0xecfa('0x3a')][_0xecfa('0x3b')]({'data5':_0x4f4e41['data5'],'data6':_0x4f4e41[_0xecfa('0x39')]},{'where':{'id':_0x4f4e41['id']}});})[_0xecfa('0x35')](function(){return _0x4f4e41;})[_0xecfa('0x3c')](function(_0x40a361){logger[_0xecfa('0x3d')](_0xecfa('0x3e'),_0x4f4e41['id'],_0x40a361);});}function getOauth2MicrosoftAccessToken(_0x591232,_0x3893aa){var _0x38ef25={'grant_type':'authorization_code','code':_0x591232,'scope':getAccessTokenScope(_0x3893aa),'redirect_uri':_0x3893aa[_0xecfa('0x24')],'client_id':_0x3893aa[_0xecfa('0x22')],'client_secret':encryptor[_0xecfa('0x3f')](_0x3893aa[_0xecfa('0x40')])};var _0x4df45e={'method':_0xecfa('0x37'),'uri':MICROSOFT_AUTH_URL[_0xecfa('0x17')](_0xecfa('0x18'),_0x3893aa[_0xecfa('0x19')])+MICROSOFT_TOKEN_ENDPOINT,'form':_0x38ef25,'json':!![]};return rp(_0x4df45e);}function startRefreshInterval(_0x32d535){var _0x53f13a=schedule[_0xecfa('0x41')];if(_0x53f13a[_0x32d535['id']])clearInterval(_0x53f13a[_0x32d535['id']]);_0x53f13a[_0x32d535['id']]=setInterval(refreshOauth2MicrosoftAccessToken[_0xecfa('0x42')](this,{'id':_0x32d535['id']}),OAUTH_REFRESH_INTERVAL*0x3e8);schedule[_0xecfa('0x41')]=_0x53f13a;}function startAllRefreshIntervals(){return db[_0xecfa('0x3a')][_0xecfa('0x43')]({'where':{'data6':{'$ne':null}},'raw':!![]})[_0xecfa('0x35')](function(_0x339cb0){var _0x231409=_0x339cb0['map'](function(_0x3d37f5){return refreshOauth2MicrosoftAccessToken(_0x3d37f5)['then'](function(_0x3fc999){startRefreshInterval(_0x3fc999);});});return Promise['all'](_0x231409);})['catch'](function(_0x3656eb){var _0x35e441=_0x3656eb?util['inspect'](_0x3656eb,{'showHidden':![],'depth':null}):'';logger[_0xecfa('0x3d')]('[CLOUD_PROVIDER]\x20Error\x20while\x20refreshing\x20the\x20tokens\x20after\x20service\x20restart\x20error:%s',_0x35e441);});}module[_0xecfa('0x44')]={'generateMicrosoftAuthorizationUrl':generateMicrosoftAuthorizationUrl,'getOauth2MicrosoftAccessToken':getOauth2MicrosoftAccessToken,'isValidIdToken':isValidIdToken,'startAllRefreshIntervals':startAllRefreshIntervals,'refreshOauth2MicrosoftAccessToken':refreshOauth2MicrosoftAccessToken,'startRefreshInterval':startRefreshInterval}; \ No newline at end of file +var _0x5706=['../../mysqldb','redis','localhost','profile','email','offline_access','https://outlook.office365.com/IMAP.AccessAsUser.All','https://outlook.office.com/POP.AccessAsUser.All','openid','/authorize','/token','type','Dynamics365','push','data7','{TENANT_ID}','code','id_token','from','stringify','base64','toString','client_id','response_type','join','redirect_uri','form_post','state','prompt','login','value','oauth2/','data1','set','decode','payload','issuer','nonce','isAfter','unix','exp','then','data3','CloudProvider','findOne','refresh_token','data6','data4','decryptString','replace','data2','data5','access_token','update','catch','Failed\x20to\x20refresh\x20access\x20token\x20for\x20cloud\x20provider\x20#%s,\x20-\x20err:%s','intervals','findAll','map','all','error','[CLOUD_PROVIDER]\x20Error\x20while\x20refreshing\x20the\x20tokens\x20after\x20service\x20restart\x20error:%s','exports','lodash','moment','ioredis','request-promise','util','../../components/encryptor','../../config/environment','../../config/logger','api','../../config/schedule/cloud-provider'];(function(_0x16c38e,_0x28725f){var _0x4da421=function(_0x297272){while(--_0x297272){_0x16c38e['push'](_0x16c38e['shift']());}};_0x4da421(++_0x28725f);}(_0x5706,0xd1));var _0x6570=function(_0x1835a0,_0x2ce354){_0x1835a0=_0x1835a0-0x0;var _0x243665=_0x5706[_0x1835a0];return _0x243665;};'use strict';var _=require(_0x6570('0x0'));var crypto=require('crypto');var jwt=require('jsonwebtoken');var moment=require(_0x6570('0x1'));var Redis=require(_0x6570('0x2'));var rp=require(_0x6570('0x3'));var util=require(_0x6570('0x4'));var encryptor=require(_0x6570('0x5'));var config=require(_0x6570('0x6'));var logger=require(_0x6570('0x7'))(_0x6570('0x8'));var schedule=require(_0x6570('0x9'));var db=require(_0x6570('0xa'))['db'];config[_0x6570('0xb')]=_['defaults'](config[_0x6570('0xb')],{'host':_0x6570('0xc'),'port':0x18eb});var redis=new Redis(config[_0x6570('0xb')]);var MICROSOFT_AUTH_URL='https://login.microsoftonline.com/{TENANT_ID}/oauth2/v2.0';var AZURE_AUTH_SCOPES={'Outlook365':['openid',_0x6570('0xd'),_0x6570('0xe'),_0x6570('0xf'),_0x6570('0x10'),_0x6570('0x11'),'https://outlook.office.com/SMTP.Send'],'Dynamics365':[_0x6570('0x12'),'offline_access']};var MICROSOFT_AUTH_ENDPOINT=_0x6570('0x13');var MICROSOFT_TOKEN_ENDPOINT=_0x6570('0x14');var OAUTH_REFRESH_INTERVAL=0xfa;function getAuthorizationScopes(_0x3bf195){var _0x18dd13=_['map'](AZURE_AUTH_SCOPES[_0x3bf195[_0x6570('0x15')]]);if(_0x3bf195[_0x6570('0x15')]===_0x6570('0x16'))_0x18dd13[_0x6570('0x17')](_0x3bf195[_0x6570('0x18')]+'/.default');return _0x18dd13['join']('\x20');}function getAccessTokenScope(_0x2a0a7f){if(_0x2a0a7f[_0x6570('0x15')]==='Outlook365')return _0x6570('0x10');if(_0x2a0a7f[_0x6570('0x15')]===_0x6570('0x16'))return _0x2a0a7f[_0x6570('0x18')]+'/.default';}function generateMicrosoftAuthorizationUrl(_0x63d776,_0x5607cb){var _0x22b2fa=MICROSOFT_AUTH_URL['replace'](_0x6570('0x19'),_0x63d776['data2']);var _0x4aabad=[_0x6570('0x1a'),_0x6570('0x1b')];var _0xbf81d9=Buffer[_0x6570('0x1c')](JSON[_0x6570('0x1d')]({'id':_0x5607cb}))['toString'](_0x6570('0x1e'));var _0x12dc92=crypto['randomBytes'](0x10)[_0x6570('0x1f')]('hex');var _0x4e9c1a=getAuthorizationScopes(_0x63d776);var _0x4f7c7c=[{'key':_0x6570('0x20'),'value':_0x63d776['data1']},{'key':_0x6570('0x21'),'value':encodeURIComponent(_0x4aabad[_0x6570('0x22')]('\x20'))},{'key':_0x6570('0x23'),'value':_0x63d776['data4']},{'key':'response_mode','value':_0x6570('0x24')},{'key':'scope','value':encodeURIComponent(_0x4e9c1a)},{'key':_0x6570('0x25'),'value':_0xbf81d9},{'key':'nonce','value':_0x12dc92},{'key':_0x6570('0x26'),'value':_0x6570('0x27')}];var _0x4aba8c=_0x22b2fa+MICROSOFT_AUTH_ENDPOINT+'?'+_['map'](_0x4f7c7c,function(_0x579a78){return _0x579a78['key']+'='+_0x579a78[_0x6570('0x28')];})[_0x6570('0x22')]('&');_0x63d776['oauth2Claims']={'issuer':_0x22b2fa['replace'](_0x6570('0x29'),''),'audience':_0x63d776[_0x6570('0x2a')],'state':_0xbf81d9,'nonce':_0x12dc92};redis[_0x6570('0x2b')](_0xbf81d9,JSON[_0x6570('0x1d')](_0x63d776));return _0x4aba8c;}function isValidIdToken(_0x31108e,_0x447248){try{var _0x27f977=jwt[_0x6570('0x2c')](_0x31108e,{'complete':!![]});var _0x56ab49=_0x27f977[_0x6570('0x2d')];if(_0x56ab49['iss']!==_0x447248[_0x6570('0x2e')])return![];if(_0x56ab49['aud']!==_0x447248['audience'])return![];if(_0x56ab49[_0x6570('0x2f')]!==_0x447248[_0x6570('0x2f')])return![];if(moment()[_0x6570('0x30')](moment[_0x6570('0x31')](_0x56ab49[_0x6570('0x32')])))return![];return!![];}catch(_0x11f4e7){throw _0x11f4e7;}}function refreshOauth2MicrosoftAccessToken(_0x109cc2){return Promise['resolve']()[_0x6570('0x33')](function(){if(_0x109cc2[_0x6570('0x34')])return _0x109cc2;return db[_0x6570('0x35')][_0x6570('0x36')]({'where':{'id':_0x109cc2['id']},'raw':!![]});})[_0x6570('0x33')](function(_0x441d81){var _0x1f0a3f={'grant_type':_0x6570('0x37'),'refresh_token':_0x441d81[_0x6570('0x38')],'scope':getAccessTokenScope(_0x441d81),'redirect_uri':_0x441d81[_0x6570('0x39')],'client_id':_0x441d81['data1'],'client_secret':encryptor[_0x6570('0x3a')](_0x441d81[_0x6570('0x34')])};var _0xb83765={'method':'POST','uri':MICROSOFT_AUTH_URL[_0x6570('0x3b')]('{TENANT_ID}',_0x441d81[_0x6570('0x3c')])+MICROSOFT_TOKEN_ENDPOINT,'form':_0x1f0a3f,'json':!![]};return rp(_0xb83765);})[_0x6570('0x33')](function(_0x23bfcc){_0x109cc2[_0x6570('0x3d')]=_0x23bfcc[_0x6570('0x3e')];_0x109cc2[_0x6570('0x38')]=_0x23bfcc[_0x6570('0x37')];return db[_0x6570('0x35')][_0x6570('0x3f')]({'data5':_0x109cc2[_0x6570('0x3d')],'data6':_0x109cc2[_0x6570('0x38')]},{'where':{'id':_0x109cc2['id']}});})[_0x6570('0x33')](function(){return _0x109cc2;})[_0x6570('0x40')](function(_0x40b987){logger['error'](_0x6570('0x41'),_0x109cc2['id'],_0x40b987);});}function getOauth2MicrosoftAccessToken(_0x2ec884,_0x33588e){var _0x4d3ecb={'grant_type':'authorization_code','code':_0x2ec884,'scope':getAccessTokenScope(_0x33588e),'redirect_uri':_0x33588e[_0x6570('0x39')],'client_id':_0x33588e[_0x6570('0x2a')],'client_secret':encryptor[_0x6570('0x3a')](_0x33588e[_0x6570('0x34')])};var _0x50ca6a={'method':'POST','uri':MICROSOFT_AUTH_URL[_0x6570('0x3b')](_0x6570('0x19'),_0x33588e[_0x6570('0x3c')])+MICROSOFT_TOKEN_ENDPOINT,'form':_0x4d3ecb,'json':!![]};return rp(_0x50ca6a);}function startRefreshInterval(_0x199a9e){var _0x18f85f=schedule[_0x6570('0x42')];if(_0x18f85f[_0x199a9e['id']])clearInterval(_0x18f85f[_0x199a9e['id']]);_0x18f85f[_0x199a9e['id']]=setInterval(refreshOauth2MicrosoftAccessToken['bind'](this,{'id':_0x199a9e['id']}),OAUTH_REFRESH_INTERVAL*0x3e8);schedule[_0x6570('0x42')]=_0x18f85f;}function startAllRefreshIntervals(){return db[_0x6570('0x35')][_0x6570('0x43')]({'where':{'data6':{'$ne':null}},'raw':!![]})['then'](function(_0x42ad1f){var _0x4d2e1f=_0x42ad1f[_0x6570('0x44')](function(_0x25e766){return refreshOauth2MicrosoftAccessToken(_0x25e766)[_0x6570('0x33')](function(_0x1d0290){startRefreshInterval(_0x1d0290);});});return Promise[_0x6570('0x45')](_0x4d2e1f);})[_0x6570('0x40')](function(_0x23151e){var _0x43bfe8=_0x23151e?util['inspect'](_0x23151e,{'showHidden':![],'depth':null}):'';logger[_0x6570('0x46')](_0x6570('0x47'),_0x43bfe8);});}module[_0x6570('0x48')]={'generateMicrosoftAuthorizationUrl':generateMicrosoftAuthorizationUrl,'getOauth2MicrosoftAccessToken':getOauth2MicrosoftAccessToken,'isValidIdToken':isValidIdToken,'startAllRefreshIntervals':startAllRefreshIntervals,'refreshOauth2MicrosoftAccessToken':refreshOauth2MicrosoftAccessToken,'startRefreshInterval':startRefreshInterval}; \ No newline at end of file diff --git a/server/api/cloudProvider/cloudProvider.rpc.js b/server/api/cloudProvider/cloudProvider.rpc.js index 72f6471..5a89a05 100644 --- a/server/api/cloudProvider/cloudProvider.rpc.js +++ b/server/api/cloudProvider/cloudProvider.rpc.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xa9e1=['ioredis','../../config/utils','rpc','jayson/promise','client','http','request','then','info','CloudProvider,\x20%s,\x20%s,\x20%s','stringify','code','CloudProvider,\x20%s,\x20%s','message','error','request\x20sent','result','lodash','util','bluebird','randomstring'];(function(_0x474c66,_0xbce925){var _0xcbd9bf=function(_0x44019d){while(--_0x44019d){_0x474c66['push'](_0x474c66['shift']());}};_0xcbd9bf(++_0xbce925);}(_0xa9e1,0x7a));var _0x1a9e=function(_0x2118ad,_0xe8e3fd){_0x2118ad=_0x2118ad-0x0;var _0x4b5715=_0xa9e1[_0x2118ad];return _0x4b5715;};'use strict';var _=require(_0x1a9e('0x0'));var util=require(_0x1a9e('0x1'));var moment=require('moment');var BPromise=require(_0x1a9e('0x2'));var rs=require(_0x1a9e('0x3'));var fs=require('fs');var Redis=require(_0x1a9e('0x4'));var db=require('../../mysqldb')['db'];var utils=require(_0x1a9e('0x5'));var logger=require('../../config/logger')(_0x1a9e('0x6'));var config=require('../../config/environment');var jayson=require(_0x1a9e('0x7'));var client=jayson[_0x1a9e('0x8')][_0x1a9e('0x9')]({'port':0x232a});function respondWithRpcPromise(_0xc9409c,_0x2b8600,_0x91b2c3){return new BPromise(function(_0x9bf04c,_0x32c466){return client[_0x1a9e('0xa')](_0xc9409c,_0x91b2c3)[_0x1a9e('0xb')](function(_0x4f9f78){logger[_0x1a9e('0xc')]('CloudProvider,\x20%s,\x20%s',_0x2b8600,'request\x20sent');logger['debug'](_0x1a9e('0xd'),_0x2b8600,'request\x20sent',JSON[_0x1a9e('0xe')](_0x4f9f78));if(_0x4f9f78['error']){if(_0x4f9f78['error'][_0x1a9e('0xf')]===0x1f4){logger['error'](_0x1a9e('0x10'),_0x2b8600,_0x4f9f78['error'][_0x1a9e('0x11')]);return _0x32c466(_0x4f9f78[_0x1a9e('0x12')][_0x1a9e('0x11')]);}logger[_0x1a9e('0x12')](_0x1a9e('0x10'),_0x2b8600,_0x4f9f78[_0x1a9e('0x12')][_0x1a9e('0x11')]);return _0x9bf04c(_0x4f9f78[_0x1a9e('0x12')]['message']);}else{logger[_0x1a9e('0xc')](_0x1a9e('0x10'),_0x2b8600,_0x1a9e('0x13'));_0x9bf04c(_0x4f9f78[_0x1a9e('0x14')][_0x1a9e('0x11')]);}})['catch'](function(_0x303979){logger[_0x1a9e('0x12')](_0x1a9e('0x10'),_0x2b8600,_0x303979);_0x32c466(_0x303979);});});} \ No newline at end of file +var _0x11f3=['util','moment','randomstring','../../mysqldb','../../config/utils','../../config/logger','jayson/promise','http','request','then','info','request\x20sent','debug','CloudProvider,\x20%s,\x20%s,\x20%s','stringify','error','code','CloudProvider,\x20%s,\x20%s','message','result','catch','lodash'];(function(_0x465028,_0x4570ac){var _0xb783d4=function(_0x5458c5){while(--_0x5458c5){_0x465028['push'](_0x465028['shift']());}};_0xb783d4(++_0x4570ac);}(_0x11f3,0x149));var _0x311f=function(_0x1f8cbc,_0x404fad){_0x1f8cbc=_0x1f8cbc-0x0;var _0x26e5d6=_0x11f3[_0x1f8cbc];return _0x26e5d6;};'use strict';var _=require(_0x311f('0x0'));var util=require(_0x311f('0x1'));var moment=require(_0x311f('0x2'));var BPromise=require('bluebird');var rs=require(_0x311f('0x3'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0x311f('0x4'))['db'];var utils=require(_0x311f('0x5'));var logger=require(_0x311f('0x6'))('rpc');var config=require('../../config/environment');var jayson=require(_0x311f('0x7'));var client=jayson['client'][_0x311f('0x8')]({'port':0x232a});function respondWithRpcPromise(_0xcbec7b,_0x11c88d,_0x3381a7){return new BPromise(function(_0x565d4d,_0x24a3fc){return client[_0x311f('0x9')](_0xcbec7b,_0x3381a7)[_0x311f('0xa')](function(_0x21b762){logger[_0x311f('0xb')]('CloudProvider,\x20%s,\x20%s',_0x11c88d,_0x311f('0xc'));logger[_0x311f('0xd')](_0x311f('0xe'),_0x11c88d,_0x311f('0xc'),JSON[_0x311f('0xf')](_0x21b762));if(_0x21b762[_0x311f('0x10')]){if(_0x21b762[_0x311f('0x10')][_0x311f('0x11')]===0x1f4){logger[_0x311f('0x10')](_0x311f('0x12'),_0x11c88d,_0x21b762[_0x311f('0x10')][_0x311f('0x13')]);return _0x24a3fc(_0x21b762[_0x311f('0x10')][_0x311f('0x13')]);}logger[_0x311f('0x10')](_0x311f('0x12'),_0x11c88d,_0x21b762[_0x311f('0x10')][_0x311f('0x13')]);return _0x565d4d(_0x21b762[_0x311f('0x10')]['message']);}else{logger['info']('CloudProvider,\x20%s,\x20%s',_0x11c88d,_0x311f('0xc'));_0x565d4d(_0x21b762[_0x311f('0x14')][_0x311f('0x13')]);}})[_0x311f('0x15')](function(_0xb8227e){logger[_0x311f('0x10')](_0x311f('0x12'),_0x11c88d,_0xb8227e);_0x24a3fc(_0xb8227e);});});} \ No newline at end of file diff --git a/server/api/cloudProvider/index.js b/server/api/cloudProvider/index.js index 8d0dd49..c7d168e 100644 --- a/server/api/cloudProvider/index.js +++ b/server/api/cloudProvider/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x7a54=['isAuthenticated','/:id','show','post','create','delete','/:id/oauth2/microsoft/authorize/','oauth2MicrosoftAuthorize','oauth2MicrosoftCallback','exports','express','Router','../../components/auth/service','get'];(function(_0x16d10f,_0x2ba2d5){var _0x50c823=function(_0x44e43f){while(--_0x44e43f){_0x16d10f['push'](_0x16d10f['shift']());}};_0x50c823(++_0x2ba2d5);}(_0x7a54,0x106));var _0x47a5=function(_0x5ecd57,_0x475a25){_0x5ecd57=_0x5ecd57-0x0;var _0x452242=_0x7a54[_0x5ecd57];return _0x452242;};'use strict';var express=require(_0x47a5('0x0'));var router=express[_0x47a5('0x1')]();var auth=require(_0x47a5('0x2'));var controller=require('./cloudProvider.controller');router[_0x47a5('0x3')]('/',auth[_0x47a5('0x4')](),controller['index']);router[_0x47a5('0x3')](_0x47a5('0x5'),auth[_0x47a5('0x4')](),controller[_0x47a5('0x6')]);router[_0x47a5('0x7')]('/',auth['isAuthenticated'](),controller[_0x47a5('0x8')]);router['put'](_0x47a5('0x5'),auth[_0x47a5('0x4')](),controller['update']);router[_0x47a5('0x9')]('/:id',auth['isAuthenticated'](),controller['destroy']);router[_0x47a5('0x3')](_0x47a5('0xa'),auth['isAuthenticated'](),controller[_0x47a5('0xb')]);router['post']('/oauth2/microsoft/callback',controller[_0x47a5('0xc')]);module[_0x47a5('0xd')]=router; \ No newline at end of file +var _0x7a54=['isAuthenticated','/:id','show','post','create','delete','/:id/oauth2/microsoft/authorize/','oauth2MicrosoftAuthorize','oauth2MicrosoftCallback','exports','express','Router','../../components/auth/service','get'];(function(_0xefd519,_0xc62635){var _0x4bb882=function(_0x37e0a1){while(--_0x37e0a1){_0xefd519['push'](_0xefd519['shift']());}};_0x4bb882(++_0xc62635);}(_0x7a54,0x106));var _0x47a5=function(_0x6ba9c6,_0x3ae523){_0x6ba9c6=_0x6ba9c6-0x0;var _0x4744ea=_0x7a54[_0x6ba9c6];return _0x4744ea;};'use strict';var express=require(_0x47a5('0x0'));var router=express[_0x47a5('0x1')]();var auth=require(_0x47a5('0x2'));var controller=require('./cloudProvider.controller');router[_0x47a5('0x3')]('/',auth[_0x47a5('0x4')](),controller['index']);router[_0x47a5('0x3')](_0x47a5('0x5'),auth[_0x47a5('0x4')](),controller[_0x47a5('0x6')]);router[_0x47a5('0x7')]('/',auth['isAuthenticated'](),controller[_0x47a5('0x8')]);router['put'](_0x47a5('0x5'),auth[_0x47a5('0x4')](),controller['update']);router[_0x47a5('0x9')]('/:id',auth['isAuthenticated'](),controller['destroy']);router[_0x47a5('0x3')](_0x47a5('0xa'),auth['isAuthenticated'](),controller[_0x47a5('0xb')]);router['post']('/oauth2/microsoft/callback',controller[_0x47a5('0xc')]);module[_0x47a5('0xd')]=router; \ No newline at end of file diff --git a/server/api/cmCompany/cmCompany.attributes.js b/server/api/cmCompany/cmCompany.attributes.js index f804279..2c28c07 100644 --- a/server/api/cmCompany/cmCompany.attributes.js +++ b/server/api/cmCompany/cmCompany.attributes.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x6ca9=['sequelize','STRING'];(function(_0x5774be,_0x2259d3){var _0x4914b4=function(_0x1eebc3){while(--_0x1eebc3){_0x5774be['push'](_0x5774be['shift']());}};_0x4914b4(++_0x2259d3);}(_0x6ca9,0xd2));var _0x96ca=function(_0x1051b4,_0x269424){_0x1051b4=_0x1051b4-0x0;var _0x2f1522=_0x6ca9[_0x1051b4];return _0x2f1522;};'use strict';var Sequelize=require(_0x96ca('0x0'));module['exports']={'name':{'type':Sequelize['STRING'],'unique':'name','allowNull':![],'validate':{'notEmpty':!![]}},'vat':{'type':Sequelize['STRING']},'companyId':{'type':Sequelize[_0x96ca('0x1')]},'website':{'type':Sequelize[_0x96ca('0x1')]},'phone':{'type':Sequelize[_0x96ca('0x1')]},'fax':{'type':Sequelize['STRING']},'type':{'type':Sequelize[_0x96ca('0x1')]},'street':{'type':Sequelize['STRING']},'postalCode':{'type':Sequelize[_0x96ca('0x1')]},'city':{'type':Sequelize[_0x96ca('0x1')]},'country':{'type':Sequelize[_0x96ca('0x1')]},'email':{'type':Sequelize[_0x96ca('0x1')],'validate':{'isEmail':!![]}},'emailDomain':{'type':Sequelize['STRING']},'sStreet':{'type':Sequelize[_0x96ca('0x1')]},'sPostalCode':{'type':Sequelize[_0x96ca('0x1')]},'sCity':{'type':Sequelize[_0x96ca('0x1')]},'sCountry':{'type':Sequelize['STRING']},'description':{'type':Sequelize[_0x96ca('0x1')]}}; \ No newline at end of file +var _0x59d8=['STRING','sequelize'];(function(_0x540511,_0x201e3b){var _0x5c1ac6=function(_0xdacf37){while(--_0xdacf37){_0x540511['push'](_0x540511['shift']());}};_0x5c1ac6(++_0x201e3b);}(_0x59d8,0x119));var _0x859d=function(_0x4b03c9,_0x17ce03){_0x4b03c9=_0x4b03c9-0x0;var _0x161ba2=_0x59d8[_0x4b03c9];return _0x161ba2;};'use strict';var Sequelize=require(_0x859d('0x0'));module['exports']={'name':{'type':Sequelize[_0x859d('0x1')],'unique':'name','allowNull':![],'validate':{'notEmpty':!![]}},'vat':{'type':Sequelize['STRING']},'companyId':{'type':Sequelize[_0x859d('0x1')]},'website':{'type':Sequelize[_0x859d('0x1')]},'phone':{'type':Sequelize[_0x859d('0x1')]},'fax':{'type':Sequelize['STRING']},'type':{'type':Sequelize[_0x859d('0x1')]},'street':{'type':Sequelize[_0x859d('0x1')]},'postalCode':{'type':Sequelize[_0x859d('0x1')]},'city':{'type':Sequelize[_0x859d('0x1')]},'country':{'type':Sequelize['STRING']},'email':{'type':Sequelize[_0x859d('0x1')],'validate':{'isEmail':!![]}},'emailDomain':{'type':Sequelize[_0x859d('0x1')]},'sStreet':{'type':Sequelize[_0x859d('0x1')]},'sPostalCode':{'type':Sequelize[_0x859d('0x1')]},'sCity':{'type':Sequelize[_0x859d('0x1')]},'sCountry':{'type':Sequelize[_0x859d('0x1')]},'description':{'type':Sequelize[_0x859d('0x1')]}}; \ No newline at end of file diff --git a/server/api/cmCompany/cmCompany.controller.js b/server/api/cmCompany/cmCompany.controller.js index ffe724b..e2400b0 100644 --- a/server/api/cmCompany/cmCompany.controller.js +++ b/server/api/cmCompany/cmCompany.controller.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xf480=['mustache','util','path','sox','to-csv','ejs','squel','crypto','desk.js','../../components/auth/service','../../components/parsers/qs','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../mysqldb','sendStatus','end','status','json','offset','undefined','count','limit','set','apply','reject','save','update','get','Companies','UserProfileResource','destroy','then','error','stack','name','send','index','CmCompany','model','keys','query','filters','intersection','attributes','fields','length','hasOwnProperty','nolimit','where','pick','filter','merge','map','options','includeAll','include','findAll','rows','show','rawAttributes','catch','create','body','role','user','find','userProfileId','autoAssociation','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','params','describe','addContacts','CmContact','omit','ids','getContacts','findOne','sort','eml-format','rimraf','request-promise','moment','bluebird'];(function(_0x1c1e3f,_0x3df248){var _0x212ad5=function(_0x1b53c6){while(--_0x1b53c6){_0x1c1e3f['push'](_0x1c1e3f['shift']());}};_0x212ad5(++_0x3df248);}(_0xf480,0xa7));var _0x0f48=function(_0x5ce464,_0x2b4fdb){_0x5ce464=_0x5ce464-0x0;var _0x6729f=_0xf480[_0x5ce464];return _0x6729f;};'use strict';var emlformat=require(_0x0f48('0x0'));var rimraf=require(_0x0f48('0x1'));var zipdir=require('zip-dir');var jsonpatch=require('fast-json-patch');var rp=require(_0x0f48('0x2'));var moment=require(_0x0f48('0x3'));var BPromise=require(_0x0f48('0x4'));var Mustache=require(_0x0f48('0x5'));var util=require(_0x0f48('0x6'));var path=require(_0x0f48('0x7'));var sox=require(_0x0f48('0x8'));var csv=require(_0x0f48('0x9'));var ejs=require(_0x0f48('0xa'));var fs=require('fs');var fs_extra=require('fs-extra');var _=require('lodash');var squel=require(_0x0f48('0xb'));var crypto=require(_0x0f48('0xc'));var jsforce=require('jsforce');var deskjs=require(_0x0f48('0xd'));var toCsv=require(_0x0f48('0x9'));var querystring=require('querystring');var Papa=require('papaparse');var Redis=require('ioredis');var authService=require(_0x0f48('0xe'));var qs=require(_0x0f48('0xf'));var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0x0f48('0x10'));var logger=require(_0x0f48('0x11'))(_0x0f48('0x12'));var utils=require(_0x0f48('0x13'));var config=require(_0x0f48('0x14'));var licenseUtil=require('../../config/license/util');var db=require(_0x0f48('0x15'))['db'];function respondWithStatusCode(_0x48239a,_0x9df44c){_0x9df44c=_0x9df44c||0xcc;return function(_0x955829){if(_0x955829){return _0x48239a[_0x0f48('0x16')](_0x9df44c);}return _0x48239a['status'](_0x9df44c)[_0x0f48('0x17')]();};}function respondWithResult(_0x1bd5eb,_0x4bc17b){_0x4bc17b=_0x4bc17b||0xc8;return function(_0x59ac78){if(_0x59ac78){return _0x1bd5eb[_0x0f48('0x18')](_0x4bc17b)[_0x0f48('0x19')](_0x59ac78);}};}function respondWithFilteredResult(_0x119471,_0x322085){return function(_0x43617f){if(_0x43617f){var _0x500f01=typeof _0x322085[_0x0f48('0x1a')]===_0x0f48('0x1b')&&typeof _0x322085['limit']===_0x0f48('0x1b');var _0x2d5d7f=_0x43617f[_0x0f48('0x1c')];var _0x1ca539=_0x500f01?0x0:_0x322085[_0x0f48('0x1a')];var _0x3b6d3b=_0x500f01?_0x43617f['count']:_0x322085[_0x0f48('0x1a')]+_0x322085[_0x0f48('0x1d')];var _0x483047;if(_0x3b6d3b>=_0x2d5d7f){_0x3b6d3b=_0x2d5d7f;_0x483047=0xc8;}else{_0x483047=0xce;}_0x119471[_0x0f48('0x18')](_0x483047);return _0x119471[_0x0f48('0x1e')]('Content-Range',_0x1ca539+'-'+_0x3b6d3b+'/'+_0x2d5d7f)[_0x0f48('0x19')](_0x43617f);}return null;};}function patchUpdates(_0x3f685b){return function(_0x2db0e6){try{jsonpatch[_0x0f48('0x1f')](_0x2db0e6,_0x3f685b,!![]);}catch(_0x551a2b){return BPromise[_0x0f48('0x20')](_0x551a2b);}return _0x2db0e6[_0x0f48('0x21')]();};}function saveUpdates(_0xd87be5,_0x7cb196){return function(_0x50c8e7){if(_0x50c8e7){return _0x50c8e7[_0x0f48('0x22')](_0xd87be5)['then'](function(_0x10460a){return _0x10460a;});}return null;};}function removeEntity(_0x26239c,_0x368aa6){return function(_0x134f9b){if(_0x134f9b){return _0x134f9b['destroy']()['then'](function(){var _0x3f2a17=_0x134f9b[_0x0f48('0x23')]({'plain':!![]});var _0xcb39c6=_0x0f48('0x24');return db[_0x0f48('0x25')][_0x0f48('0x26')]({'where':{'type':_0xcb39c6,'resourceId':_0x3f2a17['id']}})[_0x0f48('0x27')](function(){return _0x134f9b;});})[_0x0f48('0x27')](function(){_0x26239c[_0x0f48('0x18')](0xcc)[_0x0f48('0x17')]();});}};}function handleEntityNotFound(_0x5bfa66,_0x3a3e5d){return function(_0x3d1a53){if(!_0x3d1a53){_0x5bfa66[_0x0f48('0x16')](0x194);}return _0x3d1a53;};}function handleError(_0x1a222c,_0x3c27c7){_0x3c27c7=_0x3c27c7||0x1f4;return function(_0x3baea7){logger[_0x0f48('0x28')](_0x3baea7[_0x0f48('0x29')]);if(_0x3baea7[_0x0f48('0x2a')]){delete _0x3baea7[_0x0f48('0x2a')];}_0x1a222c[_0x0f48('0x18')](_0x3c27c7)[_0x0f48('0x2b')](_0x3baea7);};}exports[_0x0f48('0x2c')]=function(_0x4f9e89,_0x417831){var _0xf7fb51={},_0x120a5a={},_0x4a6b42={'count':0x0,'rows':[]};return db[_0x0f48('0x2d')]['describe']()[_0x0f48('0x27')](function(_0x5cb395){_0x120a5a[_0x0f48('0x2e')]=_[_0x0f48('0x2f')](_0x5cb395);_0x120a5a[_0x0f48('0x30')]=_[_0x0f48('0x2f')](_0x4f9e89[_0x0f48('0x30')]);_0x120a5a[_0x0f48('0x31')]=_[_0x0f48('0x32')](_0x120a5a[_0x0f48('0x2e')],_0x120a5a[_0x0f48('0x30')]);_0xf7fb51[_0x0f48('0x33')]=_[_0x0f48('0x32')](_0x120a5a['model'],qs[_0x0f48('0x34')](_0x4f9e89[_0x0f48('0x30')]['fields']));_0xf7fb51[_0x0f48('0x33')]=_0xf7fb51[_0x0f48('0x33')][_0x0f48('0x35')]?_0xf7fb51[_0x0f48('0x33')]:_0x120a5a['model'];if(!_0x4f9e89['query'][_0x0f48('0x36')](_0x0f48('0x37'))){_0xf7fb51[_0x0f48('0x1d')]=qs[_0x0f48('0x1d')](_0x4f9e89[_0x0f48('0x30')][_0x0f48('0x1d')]);_0xf7fb51['offset']=qs['offset'](_0x4f9e89[_0x0f48('0x30')][_0x0f48('0x1a')]);}_0xf7fb51['order']=qs['sort'](_0x4f9e89[_0x0f48('0x30')]['sort']);_0xf7fb51[_0x0f48('0x38')]=qs[_0x0f48('0x31')](_[_0x0f48('0x39')](_0x4f9e89[_0x0f48('0x30')],_0x120a5a[_0x0f48('0x31')]),_0x5cb395);if(_0x4f9e89[_0x0f48('0x30')][_0x0f48('0x3a')]){_0xf7fb51[_0x0f48('0x38')]=_[_0x0f48('0x3b')](_0xf7fb51[_0x0f48('0x38')],{'$or':_[_0x0f48('0x3c')](_0xf7fb51[_0x0f48('0x33')],function(_0x1d0596){var _0x327e46={};_0x327e46[_0x1d0596]={'$like':'%'+_0x4f9e89[_0x0f48('0x30')]['filter']+'%'};return _0x327e46;})});}_0xf7fb51=_[_0x0f48('0x3b')]({},_0xf7fb51,_0x4f9e89[_0x0f48('0x3d')]);var _0x448190={'where':_0xf7fb51['where']};return db['CmCompany'][_0x0f48('0x1c')](_0x448190)[_0x0f48('0x27')](function(_0x2c6905){_0x4a6b42[_0x0f48('0x1c')]=_0x2c6905;if(_0x4f9e89[_0x0f48('0x30')][_0x0f48('0x3e')]){_0xf7fb51[_0x0f48('0x3f')]=[{'all':!![]}];}return db[_0x0f48('0x2d')][_0x0f48('0x40')](_0xf7fb51);})['then'](function(_0x346344){_0x4a6b42[_0x0f48('0x41')]=_0x346344;return _0x4a6b42;})[_0x0f48('0x27')](respondWithFilteredResult(_0x417831,_0xf7fb51))['catch'](handleError(_0x417831,null));})['catch'](handleError(_0x417831,null));};exports[_0x0f48('0x42')]=function(_0x55dd8b,_0xf8e30d){var _0x2ea202={'raw':![],'where':{'id':_0x55dd8b['params']['id']}},_0x1989c0={};_0x1989c0[_0x0f48('0x2e')]=_['keys'](db[_0x0f48('0x2d')][_0x0f48('0x43')]);_0x1989c0[_0x0f48('0x30')]=_[_0x0f48('0x2f')](_0x55dd8b[_0x0f48('0x30')]);_0x1989c0['filters']=_[_0x0f48('0x32')](_0x1989c0['model'],_0x1989c0[_0x0f48('0x30')]);_0x2ea202[_0x0f48('0x33')]=_[_0x0f48('0x32')](_0x1989c0[_0x0f48('0x2e')],qs[_0x0f48('0x34')](_0x55dd8b[_0x0f48('0x30')][_0x0f48('0x34')]));_0x2ea202['attributes']=_0x2ea202[_0x0f48('0x33')][_0x0f48('0x35')]?_0x2ea202[_0x0f48('0x33')]:_0x1989c0['model'];if(_0x55dd8b['query'][_0x0f48('0x3e')]){_0x2ea202[_0x0f48('0x3f')]=[{'all':!![]}];}_0x2ea202=_['merge']({},_0x2ea202,_0x55dd8b[_0x0f48('0x3d')]);return db[_0x0f48('0x2d')]['find'](_0x2ea202)[_0x0f48('0x27')](handleEntityNotFound(_0xf8e30d,null))[_0x0f48('0x27')](respondWithResult(_0xf8e30d,null))[_0x0f48('0x44')](handleError(_0xf8e30d,null));};exports[_0x0f48('0x45')]=function(_0x19e71a,_0x536191){return db[_0x0f48('0x2d')][_0x0f48('0x45')](_0x19e71a[_0x0f48('0x46')],{})[_0x0f48('0x27')](function(_0x523644){var _0x54c61d=_0x19e71a['user'][_0x0f48('0x23')]({'plain':!![]});if(!_0x54c61d)throw new Error('Unable\x20to\x20retrieve\x20the\x20current\x20user');if(_0x54c61d[_0x0f48('0x47')]===_0x0f48('0x48')){var _0x2ea3c4=_0x523644[_0x0f48('0x23')]({'plain':!![]});var _0x18a9d4=_0x0f48('0x24');return db['UserProfileSection'][_0x0f48('0x49')]({'where':{'name':_0x18a9d4,'userProfileId':_0x54c61d[_0x0f48('0x4a')]},'raw':!![]})[_0x0f48('0x27')](function(_0x284a58){if(_0x284a58&&_0x284a58[_0x0f48('0x4b')]===0x0){return db[_0x0f48('0x25')]['create']({'name':_0x2ea3c4[_0x0f48('0x2a')],'resourceId':_0x2ea3c4['id'],'type':_0x284a58['name'],'sectionId':_0x284a58['id']},{})[_0x0f48('0x27')](function(){return _0x523644;});}else{return _0x523644;}})[_0x0f48('0x44')](function(_0x39d3a5){logger['error'](_0x0f48('0x4c'),_0x39d3a5);throw _0x39d3a5;});}return _0x523644;})[_0x0f48('0x27')](respondWithResult(_0x536191,0xc9))['catch'](handleError(_0x536191,null));};exports[_0x0f48('0x22')]=function(_0x3bb581,_0x17741b){if(_0x3bb581[_0x0f48('0x46')]['id']){delete _0x3bb581['body']['id'];}return db['CmCompany'][_0x0f48('0x49')]({'where':{'id':_0x3bb581[_0x0f48('0x4d')]['id']}})[_0x0f48('0x27')](handleEntityNotFound(_0x17741b,null))[_0x0f48('0x27')](saveUpdates(_0x3bb581[_0x0f48('0x46')],null))['then'](respondWithResult(_0x17741b,null))[_0x0f48('0x44')](handleError(_0x17741b,null));};exports[_0x0f48('0x26')]=function(_0x345dfb,_0x397595){return db[_0x0f48('0x2d')]['find']({'where':{'id':_0x345dfb[_0x0f48('0x4d')]['id']}})[_0x0f48('0x27')](handleEntityNotFound(_0x397595,null))[_0x0f48('0x27')](removeEntity(_0x397595,null))[_0x0f48('0x44')](handleError(_0x397595,null));};exports[_0x0f48('0x4e')]=function(_0x1d5deb,_0x1ff100){return db[_0x0f48('0x2d')][_0x0f48('0x4e')]()[_0x0f48('0x27')](respondWithResult(_0x1ff100,null))[_0x0f48('0x44')](handleError(_0x1ff100,null));};exports[_0x0f48('0x4f')]=function(_0x37c6b8,_0xc007dc,_0x1fd794){return db[_0x0f48('0x50')][_0x0f48('0x49')]({'where':{'id':_0x37c6b8[_0x0f48('0x4d')]['id']}})[_0x0f48('0x27')](handleEntityNotFound(_0xc007dc,null))[_0x0f48('0x27')](function(_0x4a8d34){if(_0x4a8d34){return _0x4a8d34['addContacts'](_0x37c6b8['body']['ids'],_[_0x0f48('0x51')](_0x37c6b8[_0x0f48('0x46')],[_0x0f48('0x52'),'id'])||{});}})[_0x0f48('0x27')](respondWithResult(_0xc007dc,null))['catch'](handleError(_0xc007dc,null));};exports[_0x0f48('0x53')]=function(_0x854ee4,_0x537917,_0x3e1ed2){var _0x189cd6={};var _0x26c4f7={};var _0x5a20e3;var _0x30330d;return db[_0x0f48('0x2d')][_0x0f48('0x54')]({'where':{'id':_0x854ee4[_0x0f48('0x4d')]['id']}})['then'](handleEntityNotFound(_0x537917,null))['then'](function(_0x2002b5){if(_0x2002b5){_0x5a20e3=_0x2002b5;_0x26c4f7[_0x0f48('0x2e')]=_['keys'](db[_0x0f48('0x50')]['rawAttributes']);_0x26c4f7[_0x0f48('0x30')]=_[_0x0f48('0x2f')](_0x854ee4['query']);_0x26c4f7[_0x0f48('0x31')]=_['intersection'](_0x26c4f7[_0x0f48('0x2e')],_0x26c4f7['query']);_0x189cd6[_0x0f48('0x33')]=_[_0x0f48('0x32')](_0x26c4f7[_0x0f48('0x2e')],qs[_0x0f48('0x34')](_0x854ee4['query'][_0x0f48('0x34')]));_0x189cd6[_0x0f48('0x33')]=_0x189cd6['attributes'][_0x0f48('0x35')]?_0x189cd6[_0x0f48('0x33')]:_0x26c4f7['model'];_0x189cd6['order']=qs[_0x0f48('0x55')](_0x854ee4['query']['sort']);_0x189cd6[_0x0f48('0x38')]=qs[_0x0f48('0x31')](_['pick'](_0x854ee4[_0x0f48('0x30')],_0x26c4f7[_0x0f48('0x31')]));if(_0x854ee4[_0x0f48('0x30')][_0x0f48('0x3a')]){_0x189cd6['where']=_[_0x0f48('0x3b')](_0x189cd6[_0x0f48('0x38')],{'$or':_[_0x0f48('0x3c')](_0x189cd6['attributes'],function(_0x3a42b2){var _0x131e4f={};_0x131e4f[_0x3a42b2]={'$like':'%'+_0x854ee4['query'][_0x0f48('0x3a')]+'%'};return _0x131e4f;})});}_0x189cd6=_[_0x0f48('0x3b')]({},_0x189cd6,_0x854ee4[_0x0f48('0x3d')]);return _0x5a20e3['getContacts'](_0x189cd6);}})[_0x0f48('0x27')](function(_0x188229){if(_0x188229){_0x30330d=_0x188229[_0x0f48('0x35')];if(!_0x854ee4[_0x0f48('0x30')]['hasOwnProperty'](_0x0f48('0x37'))){_0x189cd6['limit']=qs[_0x0f48('0x1d')](_0x854ee4[_0x0f48('0x30')][_0x0f48('0x1d')]);_0x189cd6['offset']=qs[_0x0f48('0x1a')](_0x854ee4[_0x0f48('0x30')][_0x0f48('0x1a')]);}return _0x5a20e3['getContacts'](_0x189cd6);}})[_0x0f48('0x27')](function(_0x284b21){if(_0x284b21){return _0x284b21?{'count':_0x30330d,'rows':_0x284b21}:null;}})['then'](respondWithResult(_0x537917,null))[_0x0f48('0x44')](handleError(_0x537917,null));}; \ No newline at end of file +var _0xd793=['name','send','index','CmCompany','model','keys','query','filters','intersection','attributes','fields','length','nolimit','order','sort','where','merge','map','filter','options','include','findAll','catch','show','params','rawAttributes','includeAll','create','user','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','UserProfileSection','find','autoAssociation','error','body','describe','addContacts','CmContact','ids','omit','getContacts','findOne','pick','hasOwnProperty','eml-format','zip-dir','fast-json-patch','request-promise','bluebird','mustache','util','path','sox','to-csv','ejs','fs-extra','lodash','squel','crypto','jsforce','desk.js','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','sendStatus','status','end','json','undefined','limit','count','offset','set','Content-Range','save','update','then','destroy','get','Companies','UserProfileResource','stack'];(function(_0x4040c5,_0x139734){var _0xab356c=function(_0x459323){while(--_0x459323){_0x4040c5['push'](_0x4040c5['shift']());}};_0xab356c(++_0x139734);}(_0xd793,0x195));var _0x3d79=function(_0x6d394a,_0x58d6e7){_0x6d394a=_0x6d394a-0x0;var _0x445f53=_0xd793[_0x6d394a];return _0x445f53;};'use strict';var emlformat=require(_0x3d79('0x0'));var rimraf=require('rimraf');var zipdir=require(_0x3d79('0x1'));var jsonpatch=require(_0x3d79('0x2'));var rp=require(_0x3d79('0x3'));var moment=require('moment');var BPromise=require(_0x3d79('0x4'));var Mustache=require(_0x3d79('0x5'));var util=require(_0x3d79('0x6'));var path=require(_0x3d79('0x7'));var sox=require(_0x3d79('0x8'));var csv=require(_0x3d79('0x9'));var ejs=require(_0x3d79('0xa'));var fs=require('fs');var fs_extra=require(_0x3d79('0xb'));var _=require(_0x3d79('0xc'));var squel=require(_0x3d79('0xd'));var crypto=require(_0x3d79('0xe'));var jsforce=require(_0x3d79('0xf'));var deskjs=require(_0x3d79('0x10'));var toCsv=require(_0x3d79('0x9'));var querystring=require(_0x3d79('0x11'));var Papa=require(_0x3d79('0x12'));var Redis=require(_0x3d79('0x13'));var authService=require(_0x3d79('0x14'));var qs=require('../../components/parsers/qs');var as=require(_0x3d79('0x15'));var hardwareService=require(_0x3d79('0x16'));var logger=require(_0x3d79('0x17'))(_0x3d79('0x18'));var utils=require(_0x3d79('0x19'));var config=require(_0x3d79('0x1a'));var licenseUtil=require('../../config/license/util');var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0x340a64,_0x50d601){_0x50d601=_0x50d601||0xcc;return function(_0x5435c9){if(_0x5435c9){return _0x340a64[_0x3d79('0x1b')](_0x50d601);}return _0x340a64[_0x3d79('0x1c')](_0x50d601)[_0x3d79('0x1d')]();};}function respondWithResult(_0x1328dc,_0x31e3c6){_0x31e3c6=_0x31e3c6||0xc8;return function(_0x3a5e36){if(_0x3a5e36){return _0x1328dc[_0x3d79('0x1c')](_0x31e3c6)[_0x3d79('0x1e')](_0x3a5e36);}};}function respondWithFilteredResult(_0x31d97c,_0xebf0f2){return function(_0x1a11c6){if(_0x1a11c6){var _0x41dc77=typeof _0xebf0f2['offset']===_0x3d79('0x1f')&&typeof _0xebf0f2[_0x3d79('0x20')]===_0x3d79('0x1f');var _0x1c4577=_0x1a11c6[_0x3d79('0x21')];var _0x4ff019=_0x41dc77?0x0:_0xebf0f2['offset'];var _0x4f812a=_0x41dc77?_0x1a11c6[_0x3d79('0x21')]:_0xebf0f2[_0x3d79('0x22')]+_0xebf0f2[_0x3d79('0x20')];var _0x4acda8;if(_0x4f812a>=_0x1c4577){_0x4f812a=_0x1c4577;_0x4acda8=0xc8;}else{_0x4acda8=0xce;}_0x31d97c[_0x3d79('0x1c')](_0x4acda8);return _0x31d97c[_0x3d79('0x23')](_0x3d79('0x24'),_0x4ff019+'-'+_0x4f812a+'/'+_0x1c4577)['json'](_0x1a11c6);}return null;};}function patchUpdates(_0x5604d7){return function(_0x4410c3){try{jsonpatch['apply'](_0x4410c3,_0x5604d7,!![]);}catch(_0x1a17c0){return BPromise['reject'](_0x1a17c0);}return _0x4410c3[_0x3d79('0x25')]();};}function saveUpdates(_0x5347b2,_0x27b419){return function(_0x1b7370){if(_0x1b7370){return _0x1b7370[_0x3d79('0x26')](_0x5347b2)[_0x3d79('0x27')](function(_0x481db7){return _0x481db7;});}return null;};}function removeEntity(_0xb7d56b,_0xd7a5c1){return function(_0x46b88b){if(_0x46b88b){return _0x46b88b[_0x3d79('0x28')]()[_0x3d79('0x27')](function(){var _0x4a9b47=_0x46b88b[_0x3d79('0x29')]({'plain':!![]});var _0x92fc1=_0x3d79('0x2a');return db[_0x3d79('0x2b')]['destroy']({'where':{'type':_0x92fc1,'resourceId':_0x4a9b47['id']}})[_0x3d79('0x27')](function(){return _0x46b88b;});})[_0x3d79('0x27')](function(){_0xb7d56b[_0x3d79('0x1c')](0xcc)[_0x3d79('0x1d')]();});}};}function handleEntityNotFound(_0x5e5624,_0x11fa32){return function(_0x48c0ec){if(!_0x48c0ec){_0x5e5624[_0x3d79('0x1b')](0x194);}return _0x48c0ec;};}function handleError(_0xfb05ef,_0x3b204d){_0x3b204d=_0x3b204d||0x1f4;return function(_0xec71e4){logger['error'](_0xec71e4[_0x3d79('0x2c')]);if(_0xec71e4[_0x3d79('0x2d')]){delete _0xec71e4[_0x3d79('0x2d')];}_0xfb05ef[_0x3d79('0x1c')](_0x3b204d)[_0x3d79('0x2e')](_0xec71e4);};}exports[_0x3d79('0x2f')]=function(_0x2f644f,_0x387383){var _0x121c3a={},_0x5c5872={},_0xec3259={'count':0x0,'rows':[]};return db[_0x3d79('0x30')]['describe']()[_0x3d79('0x27')](function(_0xef2027){_0x5c5872[_0x3d79('0x31')]=_[_0x3d79('0x32')](_0xef2027);_0x5c5872['query']=_[_0x3d79('0x32')](_0x2f644f[_0x3d79('0x33')]);_0x5c5872[_0x3d79('0x34')]=_[_0x3d79('0x35')](_0x5c5872[_0x3d79('0x31')],_0x5c5872['query']);_0x121c3a[_0x3d79('0x36')]=_[_0x3d79('0x35')](_0x5c5872['model'],qs[_0x3d79('0x37')](_0x2f644f['query']['fields']));_0x121c3a[_0x3d79('0x36')]=_0x121c3a[_0x3d79('0x36')][_0x3d79('0x38')]?_0x121c3a[_0x3d79('0x36')]:_0x5c5872[_0x3d79('0x31')];if(!_0x2f644f[_0x3d79('0x33')]['hasOwnProperty'](_0x3d79('0x39'))){_0x121c3a[_0x3d79('0x20')]=qs[_0x3d79('0x20')](_0x2f644f['query']['limit']);_0x121c3a['offset']=qs[_0x3d79('0x22')](_0x2f644f[_0x3d79('0x33')][_0x3d79('0x22')]);}_0x121c3a[_0x3d79('0x3a')]=qs[_0x3d79('0x3b')](_0x2f644f[_0x3d79('0x33')][_0x3d79('0x3b')]);_0x121c3a[_0x3d79('0x3c')]=qs[_0x3d79('0x34')](_['pick'](_0x2f644f['query'],_0x5c5872[_0x3d79('0x34')]),_0xef2027);if(_0x2f644f['query']['filter']){_0x121c3a[_0x3d79('0x3c')]=_[_0x3d79('0x3d')](_0x121c3a[_0x3d79('0x3c')],{'$or':_[_0x3d79('0x3e')](_0x121c3a['attributes'],function(_0x501bac){var _0x4a4b2d={};_0x4a4b2d[_0x501bac]={'$like':'%'+_0x2f644f[_0x3d79('0x33')][_0x3d79('0x3f')]+'%'};return _0x4a4b2d;})});}_0x121c3a=_[_0x3d79('0x3d')]({},_0x121c3a,_0x2f644f[_0x3d79('0x40')]);var _0x5562d6={'where':_0x121c3a[_0x3d79('0x3c')]};return db[_0x3d79('0x30')][_0x3d79('0x21')](_0x5562d6)[_0x3d79('0x27')](function(_0xee46fe){_0xec3259[_0x3d79('0x21')]=_0xee46fe;if(_0x2f644f[_0x3d79('0x33')]['includeAll']){_0x121c3a[_0x3d79('0x41')]=[{'all':!![]}];}return db[_0x3d79('0x30')][_0x3d79('0x42')](_0x121c3a);})[_0x3d79('0x27')](function(_0xc59f8f){_0xec3259['rows']=_0xc59f8f;return _0xec3259;})[_0x3d79('0x27')](respondWithFilteredResult(_0x387383,_0x121c3a))[_0x3d79('0x43')](handleError(_0x387383,null));})[_0x3d79('0x43')](handleError(_0x387383,null));};exports[_0x3d79('0x44')]=function(_0x39e086,_0x4f14c4){var _0x58bc5a={'raw':![],'where':{'id':_0x39e086[_0x3d79('0x45')]['id']}},_0x409cef={};_0x409cef[_0x3d79('0x31')]=_[_0x3d79('0x32')](db[_0x3d79('0x30')][_0x3d79('0x46')]);_0x409cef[_0x3d79('0x33')]=_['keys'](_0x39e086[_0x3d79('0x33')]);_0x409cef[_0x3d79('0x34')]=_[_0x3d79('0x35')](_0x409cef[_0x3d79('0x31')],_0x409cef[_0x3d79('0x33')]);_0x58bc5a['attributes']=_[_0x3d79('0x35')](_0x409cef[_0x3d79('0x31')],qs['fields'](_0x39e086[_0x3d79('0x33')]['fields']));_0x58bc5a[_0x3d79('0x36')]=_0x58bc5a['attributes'][_0x3d79('0x38')]?_0x58bc5a[_0x3d79('0x36')]:_0x409cef[_0x3d79('0x31')];if(_0x39e086[_0x3d79('0x33')][_0x3d79('0x47')]){_0x58bc5a[_0x3d79('0x41')]=[{'all':!![]}];}_0x58bc5a=_['merge']({},_0x58bc5a,_0x39e086[_0x3d79('0x40')]);return db['CmCompany']['find'](_0x58bc5a)[_0x3d79('0x27')](handleEntityNotFound(_0x4f14c4,null))[_0x3d79('0x27')](respondWithResult(_0x4f14c4,null))[_0x3d79('0x43')](handleError(_0x4f14c4,null));};exports[_0x3d79('0x48')]=function(_0x437ae8,_0x151c62){return db[_0x3d79('0x30')]['create'](_0x437ae8['body'],{})[_0x3d79('0x27')](function(_0x2da12e){var _0x539c32=_0x437ae8[_0x3d79('0x49')][_0x3d79('0x29')]({'plain':!![]});if(!_0x539c32)throw new Error(_0x3d79('0x4a'));if(_0x539c32[_0x3d79('0x4b')]===_0x3d79('0x49')){var _0xe140a8=_0x2da12e[_0x3d79('0x29')]({'plain':!![]});var _0x46dac3=_0x3d79('0x2a');return db[_0x3d79('0x4c')][_0x3d79('0x4d')]({'where':{'name':_0x46dac3,'userProfileId':_0x539c32['userProfileId']},'raw':!![]})[_0x3d79('0x27')](function(_0x86b66a){if(_0x86b66a&&_0x86b66a[_0x3d79('0x4e')]===0x0){return db[_0x3d79('0x2b')][_0x3d79('0x48')]({'name':_0xe140a8[_0x3d79('0x2d')],'resourceId':_0xe140a8['id'],'type':_0x86b66a[_0x3d79('0x2d')],'sectionId':_0x86b66a['id']},{})[_0x3d79('0x27')](function(){return _0x2da12e;});}else{return _0x2da12e;}})[_0x3d79('0x43')](function(_0x4372f1){logger[_0x3d79('0x4f')]('Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s',_0x4372f1);throw _0x4372f1;});}return _0x2da12e;})[_0x3d79('0x27')](respondWithResult(_0x151c62,0xc9))['catch'](handleError(_0x151c62,null));};exports['update']=function(_0x38f425,_0x1f5dfe){if(_0x38f425['body']['id']){delete _0x38f425['body']['id'];}return db[_0x3d79('0x30')][_0x3d79('0x4d')]({'where':{'id':_0x38f425[_0x3d79('0x45')]['id']}})[_0x3d79('0x27')](handleEntityNotFound(_0x1f5dfe,null))[_0x3d79('0x27')](saveUpdates(_0x38f425[_0x3d79('0x50')],null))[_0x3d79('0x27')](respondWithResult(_0x1f5dfe,null))[_0x3d79('0x43')](handleError(_0x1f5dfe,null));};exports['destroy']=function(_0x3b5e51,_0x121703){return db[_0x3d79('0x30')][_0x3d79('0x4d')]({'where':{'id':_0x3b5e51[_0x3d79('0x45')]['id']}})[_0x3d79('0x27')](handleEntityNotFound(_0x121703,null))[_0x3d79('0x27')](removeEntity(_0x121703,null))[_0x3d79('0x43')](handleError(_0x121703,null));};exports[_0x3d79('0x51')]=function(_0x27878b,_0x7053ac){return db[_0x3d79('0x30')]['describe']()[_0x3d79('0x27')](respondWithResult(_0x7053ac,null))[_0x3d79('0x43')](handleError(_0x7053ac,null));};exports[_0x3d79('0x52')]=function(_0x2256ca,_0x1bb071,_0x319735){return db[_0x3d79('0x53')][_0x3d79('0x4d')]({'where':{'id':_0x2256ca['params']['id']}})[_0x3d79('0x27')](handleEntityNotFound(_0x1bb071,null))[_0x3d79('0x27')](function(_0xe76367){if(_0xe76367){return _0xe76367[_0x3d79('0x52')](_0x2256ca[_0x3d79('0x50')][_0x3d79('0x54')],_[_0x3d79('0x55')](_0x2256ca[_0x3d79('0x50')],['ids','id'])||{});}})[_0x3d79('0x27')](respondWithResult(_0x1bb071,null))[_0x3d79('0x43')](handleError(_0x1bb071,null));};exports[_0x3d79('0x56')]=function(_0x239cae,_0x10484b,_0xe2d3ec){var _0x4b9f99={};var _0x99ac71={};var _0x2040dd;var _0x3dadf8;return db[_0x3d79('0x30')][_0x3d79('0x57')]({'where':{'id':_0x239cae[_0x3d79('0x45')]['id']}})[_0x3d79('0x27')](handleEntityNotFound(_0x10484b,null))['then'](function(_0x3fb170){if(_0x3fb170){_0x2040dd=_0x3fb170;_0x99ac71[_0x3d79('0x31')]=_[_0x3d79('0x32')](db['CmContact'][_0x3d79('0x46')]);_0x99ac71[_0x3d79('0x33')]=_['keys'](_0x239cae[_0x3d79('0x33')]);_0x99ac71[_0x3d79('0x34')]=_['intersection'](_0x99ac71[_0x3d79('0x31')],_0x99ac71[_0x3d79('0x33')]);_0x4b9f99[_0x3d79('0x36')]=_[_0x3d79('0x35')](_0x99ac71['model'],qs[_0x3d79('0x37')](_0x239cae[_0x3d79('0x33')]['fields']));_0x4b9f99[_0x3d79('0x36')]=_0x4b9f99[_0x3d79('0x36')][_0x3d79('0x38')]?_0x4b9f99[_0x3d79('0x36')]:_0x99ac71[_0x3d79('0x31')];_0x4b9f99[_0x3d79('0x3a')]=qs[_0x3d79('0x3b')](_0x239cae[_0x3d79('0x33')][_0x3d79('0x3b')]);_0x4b9f99[_0x3d79('0x3c')]=qs[_0x3d79('0x34')](_[_0x3d79('0x58')](_0x239cae[_0x3d79('0x33')],_0x99ac71[_0x3d79('0x34')]));if(_0x239cae[_0x3d79('0x33')][_0x3d79('0x3f')]){_0x4b9f99[_0x3d79('0x3c')]=_[_0x3d79('0x3d')](_0x4b9f99[_0x3d79('0x3c')],{'$or':_['map'](_0x4b9f99[_0x3d79('0x36')],function(_0x1f5329){var _0x32bcaa={};_0x32bcaa[_0x1f5329]={'$like':'%'+_0x239cae[_0x3d79('0x33')][_0x3d79('0x3f')]+'%'};return _0x32bcaa;})});}_0x4b9f99=_[_0x3d79('0x3d')]({},_0x4b9f99,_0x239cae[_0x3d79('0x40')]);return _0x2040dd[_0x3d79('0x56')](_0x4b9f99);}})['then'](function(_0x486608){if(_0x486608){_0x3dadf8=_0x486608['length'];if(!_0x239cae[_0x3d79('0x33')][_0x3d79('0x59')](_0x3d79('0x39'))){_0x4b9f99[_0x3d79('0x20')]=qs[_0x3d79('0x20')](_0x239cae[_0x3d79('0x33')][_0x3d79('0x20')]);_0x4b9f99['offset']=qs[_0x3d79('0x22')](_0x239cae[_0x3d79('0x33')]['offset']);}return _0x2040dd[_0x3d79('0x56')](_0x4b9f99);}})[_0x3d79('0x27')](function(_0x1e9ae4){if(_0x1e9ae4){return _0x1e9ae4?{'count':_0x3dadf8,'rows':_0x1e9ae4}:null;}})['then'](respondWithResult(_0x10484b,null))['catch'](handleError(_0x10484b,null));}; \ No newline at end of file diff --git a/server/api/cmCompany/cmCompany.model.js b/server/api/cmCompany/cmCompany.model.js index 2faa075..bde1e06 100644 --- a/server/api/cmCompany/cmCompany.model.js +++ b/server/api/cmCompany/cmCompany.model.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x65fb=['../../config/environment','./cmCompany.attributes','exports','define','CmCompany','cm_companies','lodash','api','moment','bluebird','rimraf'];(function(_0x29f778,_0x43f700){var _0xcab4b3=function(_0x1ba259){while(--_0x1ba259){_0x29f778['push'](_0x29f778['shift']());}};_0xcab4b3(++_0x43f700);}(_0x65fb,0x10e));var _0xb65f=function(_0x2389bc,_0x167cd2){_0x2389bc=_0x2389bc-0x0;var _0x170548=_0x65fb[_0x2389bc];return _0x170548;};'use strict';var _=require(_0xb65f('0x0'));var util=require('util');var logger=require('../../config/logger')(_0xb65f('0x1'));var moment=require(_0xb65f('0x2'));var BPromise=require(_0xb65f('0x3'));var rp=require('request-promise');var fs=require('fs');var path=require('path');var rimraf=require(_0xb65f('0x4'));var config=require(_0xb65f('0x5'));var attributes=require(_0xb65f('0x6'));module[_0xb65f('0x7')]=function(_0x374c96,_0x13e29a){return _0x374c96[_0xb65f('0x8')](_0xb65f('0x9'),attributes,{'tableName':_0xb65f('0xa'),'paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file +var _0x7327=['./cmCompany.attributes','exports','CmCompany','cm_companies','lodash','util','../../config/logger','rimraf'];(function(_0x6fa3d0,_0x408ce3){var _0xabfdf3=function(_0x5af796){while(--_0x5af796){_0x6fa3d0['push'](_0x6fa3d0['shift']());}};_0xabfdf3(++_0x408ce3);}(_0x7327,0x17c));var _0x7732=function(_0x2626fe,_0x52df45){_0x2626fe=_0x2626fe-0x0;var _0x15baa2=_0x7327[_0x2626fe];return _0x15baa2;};'use strict';var _=require(_0x7732('0x0'));var util=require(_0x7732('0x1'));var logger=require(_0x7732('0x2'))('api');var moment=require('moment');var BPromise=require('bluebird');var rp=require('request-promise');var fs=require('fs');var path=require('path');var rimraf=require(_0x7732('0x3'));var config=require('../../config/environment');var attributes=require(_0x7732('0x4'));module[_0x7732('0x5')]=function(_0x2398ff,_0x4c6c21){return _0x2398ff['define'](_0x7732('0x6'),attributes,{'tableName':_0x7732('0x7'),'paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file diff --git a/server/api/cmCompany/cmCompany.rpc.js b/server/api/cmCompany/cmCompany.rpc.js index ca8507d..8e3afe1 100644 --- a/server/api/cmCompany/cmCompany.rpc.js +++ b/server/api/cmCompany/cmCompany.rpc.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x2cc6=['randomstring','../../mysqldb','../../config/logger','rpc','jayson/promise','client','http','request','then','info','CmCompany,\x20%s,\x20%s','request\x20sent','debug','CmCompany,\x20%s,\x20%s,\x20%s','stringify','error','code','message','catch','lodash','moment'];(function(_0x86babd,_0x25b0e4){var _0x97ba25=function(_0x532d08){while(--_0x532d08){_0x86babd['push'](_0x86babd['shift']());}};_0x97ba25(++_0x25b0e4);}(_0x2cc6,0x139));var _0x62cc=function(_0x1622a0,_0x2b55a9){_0x1622a0=_0x1622a0-0x0;var _0x2a2308=_0x2cc6[_0x1622a0];return _0x2a2308;};'use strict';var _=require(_0x62cc('0x0'));var util=require('util');var moment=require(_0x62cc('0x1'));var BPromise=require('bluebird');var rs=require(_0x62cc('0x2'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0x62cc('0x3'))['db'];var utils=require('../../config/utils');var logger=require(_0x62cc('0x4'))(_0x62cc('0x5'));var config=require('../../config/environment');var jayson=require(_0x62cc('0x6'));var client=jayson[_0x62cc('0x7')][_0x62cc('0x8')]({'port':0x232a});function respondWithRpcPromise(_0x3db87f,_0x36a81d,_0x271180){return new BPromise(function(_0x49356a,_0x16a5ee){return client[_0x62cc('0x9')](_0x3db87f,_0x271180)[_0x62cc('0xa')](function(_0x5ef1b6){logger[_0x62cc('0xb')](_0x62cc('0xc'),_0x36a81d,_0x62cc('0xd'));logger[_0x62cc('0xe')](_0x62cc('0xf'),_0x36a81d,'request\x20sent',JSON[_0x62cc('0x10')](_0x5ef1b6));if(_0x5ef1b6[_0x62cc('0x11')]){if(_0x5ef1b6['error'][_0x62cc('0x12')]===0x1f4){logger[_0x62cc('0x11')]('CmCompany,\x20%s,\x20%s',_0x36a81d,_0x5ef1b6['error'][_0x62cc('0x13')]);return _0x16a5ee(_0x5ef1b6[_0x62cc('0x11')][_0x62cc('0x13')]);}logger['error'](_0x62cc('0xc'),_0x36a81d,_0x5ef1b6['error']['message']);return _0x49356a(_0x5ef1b6['error'][_0x62cc('0x13')]);}else{logger[_0x62cc('0xb')](_0x62cc('0xc'),_0x36a81d,_0x62cc('0xd'));_0x49356a(_0x5ef1b6['result'][_0x62cc('0x13')]);}})[_0x62cc('0x14')](function(_0x33905a){logger['error']('CmCompany,\x20%s,\x20%s',_0x36a81d,_0x33905a);_0x16a5ee(_0x33905a);});});} \ No newline at end of file +var _0xd873=['rpc','request','then','info','CmCompany,\x20%s,\x20%s','request\x20sent','debug','CmCompany,\x20%s,\x20%s,\x20%s','stringify','error','code','message','catch','lodash','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger'];(function(_0x53ccf2,_0x13cb67){var _0x5a2964=function(_0x3b0514){while(--_0x3b0514){_0x53ccf2['push'](_0x53ccf2['shift']());}};_0x5a2964(++_0x13cb67);}(_0xd873,0x1f1));var _0x3d87=function(_0x2f5baf,_0x1bd700){_0x2f5baf=_0x2f5baf-0x0;var _0x55f24b=_0xd873[_0x2f5baf];return _0x55f24b;};'use strict';var _=require(_0x3d87('0x0'));var util=require(_0x3d87('0x1'));var moment=require(_0x3d87('0x2'));var BPromise=require(_0x3d87('0x3'));var rs=require(_0x3d87('0x4'));var fs=require('fs');var Redis=require(_0x3d87('0x5'));var db=require(_0x3d87('0x6'))['db'];var utils=require(_0x3d87('0x7'));var logger=require(_0x3d87('0x8'))(_0x3d87('0x9'));var config=require('../../config/environment');var jayson=require('jayson/promise');var client=jayson['client']['http']({'port':0x232a});function respondWithRpcPromise(_0x2f9924,_0xe20fcd,_0x5317da){return new BPromise(function(_0x40e7a7,_0x387168){return client[_0x3d87('0xa')](_0x2f9924,_0x5317da)[_0x3d87('0xb')](function(_0x3bee5d){logger[_0x3d87('0xc')](_0x3d87('0xd'),_0xe20fcd,_0x3d87('0xe'));logger[_0x3d87('0xf')](_0x3d87('0x10'),_0xe20fcd,_0x3d87('0xe'),JSON[_0x3d87('0x11')](_0x3bee5d));if(_0x3bee5d['error']){if(_0x3bee5d[_0x3d87('0x12')][_0x3d87('0x13')]===0x1f4){logger['error']('CmCompany,\x20%s,\x20%s',_0xe20fcd,_0x3bee5d[_0x3d87('0x12')][_0x3d87('0x14')]);return _0x387168(_0x3bee5d[_0x3d87('0x12')][_0x3d87('0x14')]);}logger[_0x3d87('0x12')](_0x3d87('0xd'),_0xe20fcd,_0x3bee5d[_0x3d87('0x12')]['message']);return _0x40e7a7(_0x3bee5d[_0x3d87('0x12')][_0x3d87('0x14')]);}else{logger[_0x3d87('0xc')](_0x3d87('0xd'),_0xe20fcd,_0x3d87('0xe'));_0x40e7a7(_0x3bee5d['result'][_0x3d87('0x14')]);}})[_0x3d87('0x15')](function(_0x422431){logger[_0x3d87('0x12')](_0x3d87('0xd'),_0xe20fcd,_0x422431);_0x387168(_0x422431);});});} \ No newline at end of file diff --git a/server/api/cmCompany/index.js b/server/api/cmCompany/index.js index aa24a59..c91aa48 100644 --- a/server/api/cmCompany/index.js +++ b/server/api/cmCompany/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xe945=['express','fs-extra','../../components/interaction/service','../../config/environment','./cmCompany.controller','get','isAuthenticated','index','/describe','describe','/:id','show','/:id/contacts','getContacts','post','create','addContacts','update','delete','destroy','util','path'];(function(_0x20c47c,_0x443272){var _0x1cfcd7=function(_0x144ced){while(--_0x144ced){_0x20c47c['push'](_0x20c47c['shift']());}};_0x1cfcd7(++_0x443272);}(_0xe945,0xf0));var _0x5e94=function(_0x49bcfe,_0x4e7f1e){_0x49bcfe=_0x49bcfe-0x0;var _0x2ea60f=_0xe945[_0x49bcfe];return _0x2ea60f;};'use strict';var multer=require('multer');var util=require(_0x5e94('0x0'));var path=require(_0x5e94('0x1'));var timeout=require('connect-timeout');var express=require(_0x5e94('0x2'));var router=express['Router']();var fs_extra=require(_0x5e94('0x3'));var auth=require('../../components/auth/service');var interaction=require(_0x5e94('0x4'));var config=require(_0x5e94('0x5'));var controller=require(_0x5e94('0x6'));router[_0x5e94('0x7')]('/',auth[_0x5e94('0x8')](),controller[_0x5e94('0x9')]);router[_0x5e94('0x7')](_0x5e94('0xa'),auth[_0x5e94('0x8')](),controller[_0x5e94('0xb')]);router[_0x5e94('0x7')](_0x5e94('0xc'),auth[_0x5e94('0x8')](),controller[_0x5e94('0xd')]);router[_0x5e94('0x7')](_0x5e94('0xe'),auth[_0x5e94('0x8')](),controller[_0x5e94('0xf')]);router[_0x5e94('0x10')]('/',auth[_0x5e94('0x8')](),controller[_0x5e94('0x11')]);router[_0x5e94('0x10')](_0x5e94('0xe'),auth[_0x5e94('0x8')](),controller[_0x5e94('0x12')]);router['put'](_0x5e94('0xc'),auth[_0x5e94('0x8')](),controller[_0x5e94('0x13')]);router[_0x5e94('0x14')]('/:id',auth[_0x5e94('0x8')](),controller[_0x5e94('0x15')]);module['exports']=router; \ No newline at end of file +var _0x15d7=['create','post','addContacts','put','delete','destroy','exports','multer','util','path','connect-timeout','Router','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','./cmCompany.controller','get','isAuthenticated','index','/describe','describe','/:id','show','/:id/contacts','getContacts'];(function(_0x42e4d7,_0x4bd202){var _0x346cd8=function(_0x36c0f6){while(--_0x36c0f6){_0x42e4d7['push'](_0x42e4d7['shift']());}};_0x346cd8(++_0x4bd202);}(_0x15d7,0x1db));var _0x715d=function(_0x12986b,_0x2e4653){_0x12986b=_0x12986b-0x0;var _0x578ce6=_0x15d7[_0x12986b];return _0x578ce6;};'use strict';var multer=require(_0x715d('0x0'));var util=require(_0x715d('0x1'));var path=require(_0x715d('0x2'));var timeout=require(_0x715d('0x3'));var express=require('express');var router=express[_0x715d('0x4')]();var fs_extra=require(_0x715d('0x5'));var auth=require(_0x715d('0x6'));var interaction=require(_0x715d('0x7'));var config=require(_0x715d('0x8'));var controller=require(_0x715d('0x9'));router[_0x715d('0xa')]('/',auth[_0x715d('0xb')](),controller[_0x715d('0xc')]);router[_0x715d('0xa')](_0x715d('0xd'),auth[_0x715d('0xb')](),controller[_0x715d('0xe')]);router[_0x715d('0xa')](_0x715d('0xf'),auth[_0x715d('0xb')](),controller[_0x715d('0x10')]);router[_0x715d('0xa')](_0x715d('0x11'),auth[_0x715d('0xb')](),controller[_0x715d('0x12')]);router['post']('/',auth[_0x715d('0xb')](),controller[_0x715d('0x13')]);router[_0x715d('0x14')](_0x715d('0x11'),auth['isAuthenticated'](),controller[_0x715d('0x15')]);router[_0x715d('0x16')](_0x715d('0xf'),auth['isAuthenticated'](),controller['update']);router[_0x715d('0x17')](_0x715d('0xf'),auth[_0x715d('0xb')](),controller[_0x715d('0x18')]);module[_0x715d('0x19')]=router; \ No newline at end of file diff --git a/server/api/cmContact/cmContact.attributes.js b/server/api/cmContact/cmContact.attributes.js index 6e41924..7a9802c 100644 --- a/server/api/cmContact/cmContact.attributes.js +++ b/server/api/cmContact/cmContact.attributes.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x6649=['STRING','TEXT','INTEGER','UNSIGNED','NOW','lodash','sequelize','exports'];(function(_0x2923a0,_0x23afd1){var _0x4bc4cf=function(_0x29b9ec){while(--_0x29b9ec){_0x2923a0['push'](_0x2923a0['shift']());}};_0x4bc4cf(++_0x23afd1);}(_0x6649,0xc5));var _0x9664=function(_0x1e200e,_0x214d53){_0x1e200e=_0x1e200e-0x0;var _0x44166e=_0x6649[_0x1e200e];return _0x44166e;};'use strict';var _=require(_0x9664('0x0'));var Sequelize=require(_0x9664('0x1'));module[_0x9664('0x2')]={'firstName':{'type':Sequelize[_0x9664('0x3')],'allowNull':![]},'lastName':{'type':Sequelize[_0x9664('0x3')]},'street':{'type':Sequelize[_0x9664('0x3')]},'postalCode':{'type':Sequelize[_0x9664('0x3')]},'city':{'type':Sequelize[_0x9664('0x3')]},'country':{'type':Sequelize[_0x9664('0x3')]},'dateOfBirth':{'type':Sequelize[_0x9664('0x3')]},'description':{'type':Sequelize[_0x9664('0x4')]},'phone':{'type':Sequelize[_0x9664('0x3')]},'mobile':{'type':Sequelize[_0x9664('0x3')]},'fax':{'type':Sequelize[_0x9664('0x3')]},'email':{'type':Sequelize[_0x9664('0x3')]},'url':{'type':Sequelize['STRING']},'facebook':{'type':Sequelize[_0x9664('0x3')]},'fb_data':{'type':Sequelize[_0x9664('0x3')]},'twitter':{'type':Sequelize[_0x9664('0x3')]},'skype':{'type':Sequelize['STRING']},'teams':{'type':Sequelize['STRING']},'viber':{'type':Sequelize['STRING']},'line':{'type':Sequelize[_0x9664('0x3')]},'wechat':{'type':Sequelize[_0x9664('0x3')]},'telegram':{'type':Sequelize['STRING']},'UserId':{'type':Sequelize[_0x9664('0x5')]},'AdditionalPhones':{'type':Sequelize[_0x9664('0x3')]},'priority':{'type':Sequelize['INTEGER'](0x2)[_0x9664('0x6')],'defaultValue':0x2,'validate':{'min':0x0,'max':0x4}},'scheduledat':{'type':Sequelize['DATE'],'defaultValue':Sequelize[_0x9664('0x7')]},'dialTimezone':{'type':Sequelize[_0x9664('0x3')]},'utcOffset':{'type':Sequelize[_0x9664('0x5')]}}; \ No newline at end of file +var _0x24b2=['INTEGER','UNSIGNED','DATE','NOW','lodash','sequelize','STRING','TEXT'];(function(_0x29f43c,_0x3e5b71){var _0x4ea841=function(_0x5de256){while(--_0x5de256){_0x29f43c['push'](_0x29f43c['shift']());}};_0x4ea841(++_0x3e5b71);}(_0x24b2,0x11c));var _0x224b=function(_0x59c389,_0x19e789){_0x59c389=_0x59c389-0x0;var _0x2d35c6=_0x24b2[_0x59c389];return _0x2d35c6;};'use strict';var _=require(_0x224b('0x0'));var Sequelize=require(_0x224b('0x1'));module['exports']={'firstName':{'type':Sequelize['STRING'],'allowNull':![]},'lastName':{'type':Sequelize['STRING']},'street':{'type':Sequelize[_0x224b('0x2')]},'postalCode':{'type':Sequelize['STRING']},'city':{'type':Sequelize[_0x224b('0x2')]},'country':{'type':Sequelize['STRING']},'dateOfBirth':{'type':Sequelize[_0x224b('0x2')]},'description':{'type':Sequelize[_0x224b('0x3')]},'phone':{'type':Sequelize[_0x224b('0x2')]},'mobile':{'type':Sequelize[_0x224b('0x2')]},'fax':{'type':Sequelize[_0x224b('0x2')]},'email':{'type':Sequelize[_0x224b('0x2')]},'url':{'type':Sequelize[_0x224b('0x2')]},'facebook':{'type':Sequelize[_0x224b('0x2')]},'fb_data':{'type':Sequelize[_0x224b('0x2')]},'twitter':{'type':Sequelize[_0x224b('0x2')]},'skype':{'type':Sequelize[_0x224b('0x2')]},'teams':{'type':Sequelize['STRING']},'viber':{'type':Sequelize[_0x224b('0x2')]},'line':{'type':Sequelize['STRING']},'wechat':{'type':Sequelize[_0x224b('0x2')]},'telegram':{'type':Sequelize[_0x224b('0x2')]},'UserId':{'type':Sequelize[_0x224b('0x4')]},'AdditionalPhones':{'type':Sequelize[_0x224b('0x2')]},'priority':{'type':Sequelize[_0x224b('0x4')](0x2)[_0x224b('0x5')],'defaultValue':0x2,'validate':{'min':0x0,'max':0x4}},'scheduledat':{'type':Sequelize[_0x224b('0x6')],'defaultValue':Sequelize[_0x224b('0x7')]},'dialTimezone':{'type':Sequelize[_0x224b('0x2')]},'utcOffset':{'type':Sequelize['INTEGER']}}; \ No newline at end of file diff --git a/server/api/cmContact/cmContact.controller.js b/server/api/cmContact/cmContact.controller.js index db57e54..03ccac3 100644 --- a/server/api/cmContact/cmContact.controller.js +++ b/server/api/cmContact/cmContact.controller.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x3644=['WhatsappInteraction','WhatsappQueueReport','create','isNil','dialTimezone','timezones','utcOffset','additionalPhones','bulkCreate','duplicates','where','$or','ListId','findOrCreate','push','contact','all','Tag','name','color','ContactItemType','ItemType','sequelize','CmCustomField','omit','format','cf_%d','pickBy','isEmpty','cm_contacts','setFields','id\x20=\x20?','toParam','text','getTags','model','filters','intersection','fields','attributes','order','sort','pick','filter','map','options','nolimit','setTags','ids','OrderBy','items','item_types','ItemTypeId','description','contact\x20phone\x20exists','PHONE','item','`ItemType`.OrderBy','ItemType.OrderBy','CmHopperAdditionalPhone','getAdditionalPhones','literal','duplicateAdditionalPhones','fromContactId','CmContactId','toContactId','rescheduleAdditionalPhones','hopperId','getHoppers','findOne','ContactId','getHopperHistories','rawAttributes','includeAll','include','rows','getHopperFinals','getJscriptySessions','uploadCsv','binding_keys','No\x20association\x20keys\x20specified!','binding_values','No\x20association\x20values\x20specified!','socket_timestamp','split','Incorrect\x20binding\x20parameters\x20passed!','zipObject','phone','No\x20phone\x20column\x20specified','firstName','root','server/files/tmp','file','filename','0777','child_process','fork','pid','upload','createReadStream','parse','meta','import','agent','No\x20ListId\x20specified','binding','No\x20firstName\x20column\x20specified','Unable\x20to\x20synchronize\x20socket,\x20no\x20timestamp\x20passed','stringify','start\x20child\x20process\x20correctly!','error\x20child\x20process','importUpdates','User','../../components/import/cm/csvUpdates','exit','getJourney','mail','chat','sms','openchannel','fax','whatsapp','voice','-createdAt','resolve','includes','range','isValid','Invalid\x20date\x20for\x20range\x20from\x20filter','Invalid\x20date\x20for\x20range\x20to\x20filter','uniqueid','source','destination','callerid','starttime','note','userDisposition','userThirdDisposition','fullname','DESC','createdAt','findAndCountAll','channel','startCase','Website','Account','closed','closedAt','disposition','secondDisposition','UserId','key','Owner','Tags','browserName','customerIp','customerPort','deviceModel','osName','ratingMessage','ratingType','subject','externalUrl','Interaction','flatten','sortBy','reverse','value','slice','moment','bluebird','util','path','lodash','papaparse','ioredis','../../components/contacts','../../components/parsers/qs','../../config/logger','api','../../config/environment','../../config/environment/shared','../../mysqldb','redis','socket.io-emitter','./cmContact.socket','register','status','json','offset','limit','count','set','Content-Range','update','then','destroy','end','send','index','describe','getOptions','findAll','query','user','CmContact','find','params','catch','length','startsWith','columnName','displayName','cf_','alias','custom','type','values','keys','hasOwnProperty','merge','body','get','isArray','tags','join','info','[CmContact][merge]\x20to\x20%s\x20from\x20%s','CmHopper','from','[CmContact][merge][destroy][CmHopper],\x20%s','CmHopperBlack','ChatInteraction','ChatOfflineMessage','MailInteraction','MailMessage','SmsInteraction','SmsMessage','FaxInteraction','FaxMessage','OpenchannelInteraction','CmContactHasItem','CmHopperFinal','CmHopperHistory','ReportAgentPreview','VoiceCallReport','ChatQueueReport','FaxQueueReport','MailQueueReport','OpenchannelQueueReport','SmsQueueReport','JscriptySessionReport'];(function(_0x25537d,_0x2399b5){var _0x2b6caa=function(_0x37c1e6){while(--_0x37c1e6){_0x25537d['push'](_0x25537d['shift']());}};_0x2b6caa(++_0x2399b5);}(_0x3644,0x1a5));var _0x4364=function(_0x3bf2c3,_0x3833be){_0x3bf2c3=_0x3bf2c3-0x0;var _0x9b9565=_0x3644[_0x3bf2c3];return _0x9b9565;};'use strict';var moment=require(_0x4364('0x0'));var BPromise=require(_0x4364('0x1'));var util=require(_0x4364('0x2'));var path=require(_0x4364('0x3'));var fs=require('fs');var _=require(_0x4364('0x4'));var squel=require('squel');var Papa=require(_0x4364('0x5'));var Redis=require(_0x4364('0x6'));var contacts=require(_0x4364('0x7'));var qs=require(_0x4364('0x8'));var logger=require(_0x4364('0x9'))(_0x4364('0xa'));var config=require(_0x4364('0xb'));var shared=require(_0x4364('0xc'));var db=require(_0x4364('0xd'))['db'];config[_0x4364('0xe')]=_['defaults'](config[_0x4364('0xe')],{'host':'localhost','port':0x18eb});var socket=require(_0x4364('0xf'))(new Redis(config[_0x4364('0xe')]));require(_0x4364('0x10'))[_0x4364('0x11')](socket);function respondWithResult(_0x39e53d,_0x295bd9){_0x295bd9=_0x295bd9||0xc8;return function(_0x2035e5){if(_0x2035e5){return _0x39e53d[_0x4364('0x12')](_0x295bd9)[_0x4364('0x13')](_0x2035e5);}};}function respondWithFilteredResult(_0x22e9f1,_0x3f8f7c){return function(_0x24a623){if(_0x24a623){var _0x4584a1=typeof _0x3f8f7c[_0x4364('0x14')]==='undefined'&&typeof _0x3f8f7c[_0x4364('0x15')]==='undefined';var _0x2e1d55=_0x24a623['count'];var _0x11d57a=_0x4584a1?0x0:_0x3f8f7c[_0x4364('0x14')];var _0x4b6f87=_0x4584a1?_0x24a623[_0x4364('0x16')]:_0x3f8f7c[_0x4364('0x14')]+_0x3f8f7c[_0x4364('0x15')];var _0x1bab21;if(_0x4b6f87>=_0x2e1d55){_0x4b6f87=_0x2e1d55;_0x1bab21=0xc8;}else{_0x1bab21=0xce;}_0x22e9f1[_0x4364('0x12')](_0x1bab21);return _0x22e9f1[_0x4364('0x17')](_0x4364('0x18'),_0x11d57a+'-'+_0x4b6f87+'/'+_0x2e1d55)[_0x4364('0x13')](_0x24a623);}return null;};}function saveUpdates(_0x129b16){return function(_0x4bab61){if(_0x4bab61){return _0x4bab61[_0x4364('0x19')](_0x129b16)[_0x4364('0x1a')](function(_0x5125a2){return _0x5125a2;});}return null;};}function removeEntity(_0x289528){return function(_0x4b9b21){if(_0x4b9b21){return _0x4b9b21[_0x4364('0x1b')]()[_0x4364('0x1a')](function(){_0x289528['status'](0xcc)[_0x4364('0x1c')]();});}};}function handleEntityNotFound(_0x417f29){return function(_0x30ee04){if(!_0x30ee04){_0x417f29['sendStatus'](0x194);}return _0x30ee04;};}function handleError(_0x1f63dd,_0x59bf5b){_0x59bf5b=_0x59bf5b||0x1f4;return function(_0x1daf9c){logger['error'](_0x1daf9c['stack']);if(_0x1daf9c['name']){delete _0x1daf9c['name'];}_0x1f63dd['status'](_0x59bf5b)[_0x4364('0x1d')](_0x1daf9c);};}exports[_0x4364('0x1e')]=function(_0x2212e1,_0x5105bb){var _0x18b059={};return contacts[_0x4364('0x1f')]()[_0x4364('0x1a')](function(_0x6b63fa){_0x18b059=qs[_0x4364('0x20')](_0x6b63fa,_0x2212e1);return contacts[_0x4364('0x21')](_0x2212e1[_0x4364('0x22')],_0x2212e1[_0x4364('0x23')],_0x18b059,_0x6b63fa);})['then'](respondWithFilteredResult(_0x5105bb,_0x18b059))['catch'](handleError(_0x5105bb,null));};exports['destroy']=function(_0xc499a6,_0x2bead5){return db[_0x4364('0x24')][_0x4364('0x25')]({'where':{'id':_0xc499a6[_0x4364('0x26')]['id']}})[_0x4364('0x1a')](handleEntityNotFound(_0x2bead5,null))[_0x4364('0x1a')](removeEntity(_0x2bead5,null))[_0x4364('0x27')](handleError(_0x2bead5,null));};exports['describe']=function(_0x580cf2,_0x5c0334){return db[_0x4364('0x24')]['describe']()['then'](function(_0x2bce52){delete _0x2bce52['tags'];for(var _0xa9b9fb=0x0;_0xa9b9fb0x0){return new Promise(function(_0x26df75){var _0x4c9a72=[];for(var _0x349375=0x0;_0x349375<_0x50c679[_0x4364('0x28')];_0x349375++){_0x4c9a72[_0x4364('0x61')](insertAdditionalPhones(_0x50c679[_0x349375][_0x4364('0x62')],_0x50c679[_0x349375][_0x4364('0x5a')]));}Promise[_0x4364('0x63')](_0x4c9a72)['then'](function(){_0x26df75(0x1);});})[_0x4364('0x1a')](function(){return{'success':_0xdfbe8c,'failure':_0x1b5c5b,'duplicates':_0x2da5c8};});}else{return{'success':_0xdfbe8c,'failure':_0x1b5c5b,'duplicates':_0x2da5c8};}}})[_0x4364('0x1a')](respondWithResult(_0x65bd81,0xc9))[_0x4364('0x27')](handleError(_0x65bd81,null));};exports['show']=function(_0x105eb8,_0x9f8df6){var _0x20a71c;return db[_0x4364('0x24')][_0x4364('0x1f')]()['then'](function(_0x59ab9c){return db[_0x4364('0x24')][_0x4364('0x25')]({'where':{'id':_0x105eb8[_0x4364('0x26')]['id']},'include':[{'model':db[_0x4364('0x64')],'as':'Tags','attributes':['id',_0x4364('0x65'),_0x4364('0x66')],'required':_0x105eb8[_0x4364('0x22')]['tag']?!![]:![]},{'model':db['CmContactHasItem'],'as':'Phones','where':{'CmContactId':_0x105eb8[_0x4364('0x26')]['id']},'required':![],'include':[{'model':db[_0x4364('0x67')],'as':_0x4364('0x68')}]}],'order':[db[_0x4364('0x69')]['literal']('Phones.OrderBy')],'attributes':_[_0x4364('0x31')](_0x59ab9c)});})[_0x4364('0x1a')](function(_0x41773a){if(!_[_0x4364('0x56')](_0x41773a)){_0x20a71c=_0x41773a[_0x4364('0x35')]({'plain':!![]});var _0x166698={'where':{'$and':[{'ListId':{'$ne':null}}]}};if(_0x41773a&&_0x41773a['ListId']){if(_0x41773a[_0x4364('0x5f')]){_0x166698['where']['$and'][_0x4364('0x61')]({'ListId':{'$ne':_0x41773a['ListId']}});}}return db[_0x4364('0x6a')]['findAll'](_0x166698);}})[_0x4364('0x1a')](function(_0x292b2e){if(!_[_0x4364('0x56')](_0x292b2e)){return _[_0x4364('0x6b')](_0x20a71c,_['map'](_0x292b2e,function(_0x78ac8e){return util[_0x4364('0x6c')](_0x4364('0x6d'),_0x78ac8e['id']);}));}})[_0x4364('0x1a')](handleEntityNotFound(_0x9f8df6,null))[_0x4364('0x1a')](respondWithResult(_0x9f8df6,null))[_0x4364('0x27')](handleError(_0x9f8df6,null));};exports[_0x4364('0x19')]=function(_0x45abea,_0x5e12be){var _0xf6aa7f;if(_0x45abea[_0x4364('0x34')]['id']){delete _0x45abea['body']['id'];}if(!_['isNil'](_0x45abea[_0x4364('0x34')][_0x4364('0x57')])){var _0x15e617=_0x45abea[_0x4364('0x34')]['dialTimezone'];if(!_[_0x4364('0x56')](shared[_0x4364('0x58')][_0x15e617]))_0x45abea['body'][_0x4364('0x59')]=shared['timezones'][_0x15e617][_0x4364('0x59')];}return db[_0x4364('0x24')][_0x4364('0x25')]({'where':{'id':_0x45abea[_0x4364('0x26')]['id']}})[_0x4364('0x1a')](handleEntityNotFound(_0x5e12be,null))[_0x4364('0x1a')](saveUpdates(_0x45abea['body'],null))['then'](function(_0x575fa1){_0xf6aa7f=_0x575fa1;var _0x1b390e={'where':{'$and':[{'ListId':{'$ne':null}}]}};if(_0x575fa1&&_0x575fa1[_0x4364('0x5f')]){if(_0x575fa1['ListId']){_0x1b390e[_0x4364('0x5d')]['$and']['push']({'ListId':{'$ne':_0x575fa1['ListId']}});}}return db[_0x4364('0x6a')][_0x4364('0x21')](_0x1b390e);})[_0x4364('0x1a')](function(_0x208c4d){if(_0x208c4d){return _[_0x4364('0x6b')](_[_0x4364('0x6e')](_0x45abea['body'],function(_0x4446f1,_0x2f817c){return _['startsWith'](_0x2f817c,'cf_');}),_['map'](_0x208c4d,function(_0x50cb0b){return util[_0x4364('0x6c')](_0x4364('0x6d'),_0x50cb0b['id']);}));}})[_0x4364('0x1a')](function(_0x468ff2){if(_0x468ff2&&!_[_0x4364('0x6f')](_0x468ff2)){var _0x27907f=squel[_0x4364('0x19')]()['table'](_0x4364('0x70'))[_0x4364('0x71')](_0x468ff2)[_0x4364('0x5d')](_0x4364('0x72'),_0x45abea['params']['id'])[_0x4364('0x73')]();return db[_0x4364('0x69')][_0x4364('0x22')](_0x27907f[_0x4364('0x74')],{'replacements':_0x27907f['values']});}})[_0x4364('0x1a')](function(){if(_0x45abea[_0x4364('0x34')]['phone']&&_0xf6aa7f){return db[_0x4364('0x3b')][_0x4364('0x19')]({'phone':_0x45abea[_0x4364('0x34')]['phone'],'OrderBy':0x0},{'where':{'ContactId':_0xf6aa7f['id']}});}})[_0x4364('0x1a')](function(){return _0xf6aa7f;})['then'](respondWithResult(_0x5e12be,null))[_0x4364('0x27')](handleError(_0x5e12be,null));};exports[_0x4364('0x75')]=function(_0x597e6d,_0x3a8e50){var _0x4cdb1b={};var _0xa4a50d={};var _0x40f9b4;var _0x12e96d;return db[_0x4364('0x24')]['findOne']({'where':{'id':_0x597e6d[_0x4364('0x26')]['id']}})['then'](handleEntityNotFound(_0x3a8e50,null))['then'](function(_0x483d58){if(_0x483d58){_0x40f9b4=_0x483d58;_0xa4a50d[_0x4364('0x76')]=_['keys'](db['Tag']['rawAttributes']);_0xa4a50d[_0x4364('0x22')]=_[_0x4364('0x31')](_0x597e6d[_0x4364('0x22')]);_0xa4a50d[_0x4364('0x77')]=_['intersection'](_0xa4a50d[_0x4364('0x76')],_0xa4a50d[_0x4364('0x22')]);_0x4cdb1b['attributes']=_[_0x4364('0x78')](_0xa4a50d[_0x4364('0x76')],qs[_0x4364('0x79')](_0x597e6d[_0x4364('0x22')][_0x4364('0x79')]));_0x4cdb1b[_0x4364('0x7a')]=_0x4cdb1b[_0x4364('0x7a')][_0x4364('0x28')]?_0x4cdb1b[_0x4364('0x7a')]:_0xa4a50d[_0x4364('0x76')];_0x4cdb1b[_0x4364('0x7b')]=qs[_0x4364('0x7c')](_0x597e6d[_0x4364('0x22')][_0x4364('0x7c')]);_0x4cdb1b[_0x4364('0x5d')]=qs['filters'](_[_0x4364('0x7d')](_0x597e6d[_0x4364('0x22')],_0xa4a50d[_0x4364('0x77')]));if(_0x597e6d[_0x4364('0x22')][_0x4364('0x7e')]){_0x4cdb1b[_0x4364('0x5d')]=_[_0x4364('0x33')](_0x4cdb1b[_0x4364('0x5d')],{'$or':_[_0x4364('0x7f')](_0x4cdb1b[_0x4364('0x7a')],function(_0x4ec8db){var _0x5aad5e={};_0x5aad5e[_0x4ec8db]={'$like':'%'+_0x597e6d[_0x4364('0x22')][_0x4364('0x7e')]+'%'};return _0x5aad5e;})});}_0x4cdb1b=_['merge']({},_0x4cdb1b,_0x597e6d[_0x4364('0x80')]);return _0x40f9b4[_0x4364('0x75')](_0x4cdb1b);}})[_0x4364('0x1a')](function(_0x3a529a){if(_0x3a529a){_0x12e96d=_0x3a529a[_0x4364('0x28')];if(!_0x597e6d[_0x4364('0x22')]['hasOwnProperty'](_0x4364('0x81'))){_0x4cdb1b[_0x4364('0x15')]=qs[_0x4364('0x15')](_0x597e6d[_0x4364('0x22')][_0x4364('0x15')]);_0x4cdb1b[_0x4364('0x14')]=qs[_0x4364('0x14')](_0x597e6d[_0x4364('0x22')][_0x4364('0x14')]);}return _0x40f9b4['getTags'](_0x4cdb1b);}})[_0x4364('0x1a')](function(_0x493ffb){if(_0x493ffb){return _0x493ffb?{'count':_0x12e96d,'rows':_0x493ffb}:null;}})[_0x4364('0x1a')](respondWithResult(_0x3a8e50,null))['catch'](handleError(_0x3a8e50,null));};exports[_0x4364('0x82')]=function(_0x2353f6,_0x29a656){if(_0x2353f6['body']['id']){delete _0x2353f6[_0x4364('0x34')]['id'];}return db[_0x4364('0x24')]['findOne']({'where':{'id':_0x2353f6[_0x4364('0x26')]['id']}})[_0x4364('0x1a')](handleEntityNotFound(_0x29a656,null))[_0x4364('0x1a')](function(_0x5a763b){if(_0x5a763b){return _0x5a763b[_0x4364('0x82')](_0x2353f6[_0x4364('0x34')][_0x4364('0x83')]||[]);}return null;})[_0x4364('0x1a')](respondWithResult(_0x29a656,null))[_0x4364('0x27')](handleError(_0x29a656,null));};exports['setAdditionalPhones']=function(_0x446f57,_0x14694e){var _0x203ab3=[];_0x203ab3[_0x4364('0x61')](addAdditionalPhones(_0x446f57['body']));Promise[_0x4364('0x63')](_0x203ab3)['then'](function(){_0x203ab3=[];_0x203ab3[_0x4364('0x61')](deleteCmHopperPhones(_0x446f57[_0x4364('0x34')]['id']));_0x203ab3[_0x4364('0x61')](addCmHopperPhones(_0x446f57['body']['id']));Promise['all'](_0x203ab3)[_0x4364('0x1a')](function(){return[0x1];})[_0x4364('0x1a')](respondWithResult(_0x14694e,null));});};function addAdditionalPhones(_0x3a8f4e){var _0x4c0caa;return new Promise(function(_0x1c9cab){return db[_0x4364('0x48')]['destroy']({'where':{'CmContactId':_0x3a8f4e['id']}})[_0x4364('0x1a')](function(){db[_0x4364('0x67')][_0x4364('0x21')]({'raw':!![],'attributes':['id',_0x4364('0x84')]})['then'](function(_0x97587b){var _0x26fd3e=[];for(var _0x4d9fdf=0x0;_0x4d9fdf<_0x3a8f4e[_0x4364('0x85')]['length'];_0x4d9fdf++){var _0x1ca384=_0x3a8f4e[_0x4364('0x86')]?_[_0x4364('0x56')](_0x3a8f4e[_0x4364('0x86')][_0x4d9fdf])?'':_0x3a8f4e['item_types'][_0x4d9fdf]:_0x3a8f4e['items'][_0x4d9fdf][_0x4364('0x87')]?_0x3a8f4e[_0x4364('0x85')][_0x4d9fdf][_0x4364('0x87')]:'';var _0x155cdf=_[_0x4364('0x56')](_0x3a8f4e[_0x4364('0x85')][_0x4d9fdf]['description'])?'':_0x3a8f4e['items'][_0x4d9fdf][_0x4364('0x88')];var _0x4d2a90=_0x1ca384+':'+_0x3a8f4e[_0x4364('0x85')][_0x4d9fdf]['phone']+'§'+_0x155cdf;if(_[_0x4364('0x56')](_0x4c0caa))_0x4c0caa=_0x4d2a90;else _0x4c0caa+=';'+_0x4d2a90;var _0x54d743=null;var _0x4826c3=null;if(_0x3a8f4e[_0x4364('0x86')]){if(!_[_0x4364('0x56')](_0x3a8f4e[_0x4364('0x86')][_0x4d9fdf])){_0x4826c3=_[_0x4364('0x25')](_0x97587b,function(_0x54768d){return _0x54768d['id']===_0x3a8f4e[_0x4364('0x86')][_0x4d9fdf];});if(!_[_0x4364('0x56')](_0x4826c3)){_0x54d743=_0x4826c3[_0x4364('0x84')];}}}else{if(!_[_0x4364('0x56')](_0x3a8f4e[_0x4364('0x85')][_0x4d9fdf])){_0x4826c3=_[_0x4364('0x25')](_0x97587b,function(_0x3ec5b2){return _0x3ec5b2['id']===_0x3a8f4e['items'][_0x4d9fdf][_0x4364('0x87')];});if(!_[_0x4364('0x56')](_0x4826c3)){_0x54d743=_0x4d9fdf;}}}if(_[_0x4364('0x56')](_0x54d743)){_0x54d743=0x64;}_0x26fd3e[_0x4364('0x61')](addAdditionalPhone(_0x3a8f4e['id'],_0x3a8f4e[_0x4364('0x85')][_0x4d9fdf]['phone'],_0x3a8f4e[_0x4364('0x86')]?_[_0x4364('0x56')](_0x3a8f4e[_0x4364('0x86')][_0x4d9fdf])?null:_0x3a8f4e[_0x4364('0x86')][_0x4d9fdf]:_0x3a8f4e[_0x4364('0x85')][_0x4d9fdf][_0x4364('0x87')]?_0x3a8f4e[_0x4364('0x85')][_0x4d9fdf][_0x4364('0x87')]:null,_0x54d743,_0x155cdf));}Promise[_0x4364('0x63')](_0x26fd3e)['then'](function(){db[_0x4364('0x24')][_0x4364('0x19')]({'AdditionalPhones':_0x4c0caa},{'where':{'id':_0x3a8f4e['id']}})[_0x4364('0x1a')](function(){_0x1c9cab(0x1);});});});});});}function addAdditionalPhone(_0x4ef610,_0x17fc30,_0x23aaf1,_0x33f257,_0x139260){return db['CmContactHasItem'][_0x4364('0x25')]({'where':{'CmContactId':_0x4ef610,'item':_0x17fc30}})[_0x4364('0x1a')](function(_0x46cc33){if(_0x46cc33)logger['info'](_0x4364('0x89'),_0x46cc33);else{db['CmContactHasItem']['create']({'CmContactId':_0x4ef610,'item':_0x17fc30,'ItemTypeId':_0x23aaf1,'OrderBy':_0x33f257,'ItemClass':_0x4364('0x8a'),'description':_0x139260});}});}function deleteCmHopperPhones(_0x362ce1){return new Promise(function(_0x4c3a00){return db['CmHopper'][_0x4364('0x21')]({'raw':!![],'attributes':['id'],'where':{'ContactId':_0x362ce1}})['then'](function(_0x2cd8d7){db['CmHopperAdditionalPhone'][_0x4364('0x1b')]({'where':{'CmHopperId':{'$in':_[_0x4364('0x7f')](_0x2cd8d7,'id')}}});})[_0x4364('0x1a')](function(){_0x4c3a00(0x1);});});}function addCmHopperPhones(_0x43ae8d){return new Promise(function(_0xe2c42f){return db[_0x4364('0x3b')][_0x4364('0x21')]({'raw':!![],'attributes':['id'],'where':{'ContactId':_0x43ae8d}})[_0x4364('0x1a')](function(_0x21f6d1){var _0x4325ec=[];_[_0x4364('0x7f')](_0x21f6d1,function(_0x33c0fb){_0x4325ec[_0x4364('0x61')](createCmHopperPhone(_0x43ae8d,_0x33c0fb['id']));});Promise[_0x4364('0x63')](_0x4325ec)[_0x4364('0x1a')](function(){_0xe2c42f(0x1);});});});}function createCmHopperPhone(_0x48c0df,_0x4e1743){return new Promise(function(_0x1bd294){db[_0x4364('0x48')]['findAll']({'raw':!![],'attributes':[_0x4364('0x8b'),_0x4364('0x84')],'where':{'CmContactId':_0x48c0df,'ItemClass':_0x4364('0x8a')},'include':[{'model':db[_0x4364('0x67')],'attributes':[_0x4364('0x84')],'as':'ItemType'}],'order':[_0x4364('0x84'),db['sequelize']['literal'](_0x4364('0x8c'))]})[_0x4364('0x1a')](function(_0x33d0e9){var _0x14311b=0x1;var _0x50f08e=_[_0x4364('0x7f')](_0x33d0e9,function(_0x468aa5){_0x468aa5['CmHopperId']=_0x4e1743;_0x468aa5['phone']=_0x468aa5['item'];_0x468aa5['OrderBy']=_0x14311b;delete _0x468aa5[_0x4364('0x8d')];_0x14311b=_0x14311b+0x1;return _0x468aa5;});return db[_0x4364('0x8e')][_0x4364('0x5b')](_0x50f08e,{});})[_0x4364('0x1a')](function(){_0x1bd294(0x1);});});}function insertAdditionalPhones(_0x264c72,_0x4574c0){return new Promise(function(_0xec342a){var _0x5a86c0=[];for(var _0x430790=0x0;_0x430790<_0x4574c0[_0x4364('0x28')];_0x430790++){var _0x21933d=_0x4574c0[_0x430790];_0x5a86c0[_0x4364('0x61')](parseContactItemType(_0x21933d));}Promise[_0x4364('0x63')](_0x5a86c0)['then'](function(){var _0x224ee7={'id':_0x264c72['id'],'items':_0x4574c0};return addAdditionalPhones(_0x224ee7)['then'](function(){return addCmHopperPhones(_0x264c72['id']);});})[_0x4364('0x1a')](function(){_0xec342a(_0x264c72);});});}function parseContactItemType(_0x455a27){return new Promise(function(_0x2cb917){if(_0x455a27['hasOwnProperty']('ItemTypeId')){_0x2cb917(_0x455a27);}else{return db['ContactItemType'][_0x4364('0x25')]({'where':{'name':_0x455a27['ItemType']}})[_0x4364('0x1a')](function(_0x58f3c4){if(_[_0x4364('0x56')](_0x58f3c4))_0x455a27[_0x4364('0x87')]=null;else _0x455a27[_0x4364('0x87')]=_0x58f3c4['id'];_0x2cb917(_0x455a27);});}});}exports[_0x4364('0x8f')]=function(_0x4b6bdb,_0x387857){return db[_0x4364('0x48')][_0x4364('0x21')]({'raw':!![],'where':{'CmContactId':_0x4b6bdb[_0x4364('0x26')]['id'],'ItemClass':_0x4364('0x8a')},'include':[{'model':db[_0x4364('0x67')],'as':_0x4364('0x68')}],'order':[['OrderBy'],[db['sequelize'][_0x4364('0x90')]('`ItemType`.OrderBy')]]})[_0x4364('0x1a')](function(_0x384701){return _0x384701;})[_0x4364('0x1a')](respondWithResult(_0x387857,null))[_0x4364('0x27')](handleError(_0x387857,null));};exports[_0x4364('0x91')]=function(_0x177651,_0x45fe71){return db[_0x4364('0x48')][_0x4364('0x21')]({'raw':!![],'where':{'CmContactId':_0x177651[_0x4364('0x34')][_0x4364('0x92')]}})['then'](function(_0x226ba3){var _0xc43d04=_[_0x4364('0x7f')](_0x226ba3,function(_0x13f6a5){_0x13f6a5[_0x4364('0x93')]=_0x177651[_0x4364('0x34')][_0x4364('0x94')];return _0x13f6a5;});return db[_0x4364('0x48')]['bulkCreate'](_0xc43d04,{});})[_0x4364('0x1a')](function(){return addCmHopperPhones(_0x177651[_0x4364('0x34')][_0x4364('0x94')]);})[_0x4364('0x1a')](function(){return['ok'];})['then'](respondWithResult(_0x45fe71,null))['catch'](handleError(_0x45fe71,null));};exports[_0x4364('0x95')]=function(_0x249dc5,_0x35a729){var _0x2e2e34=[];_0x2e2e34[_0x4364('0x61')](createCmHopperPhone(_0x249dc5[_0x4364('0x34')]['id'],_0x249dc5[_0x4364('0x34')][_0x4364('0x96')]));Promise[_0x4364('0x63')](_0x2e2e34)[_0x4364('0x1a')](function(){return[0x1];})[_0x4364('0x1a')](respondWithResult(_0x35a729,null));};exports[_0x4364('0x97')]=function(_0x20a6b9,_0x410df1){var _0xdc39b4={'raw':![],'where':{}};var _0x5015f7={};var _0x4e936b={'count':0x0,'rows':[]};return db['CmContact'][_0x4364('0x98')]({'where':{'id':_0x20a6b9['params']['id']}})[_0x4364('0x1a')](handleEntityNotFound(_0x410df1,null))[_0x4364('0x1a')](function(_0x225a4c){if(_0x225a4c){_0x5015f7[_0x4364('0x76')]=_[_0x4364('0x31')](db[_0x4364('0x3b')]['rawAttributes']);_0x5015f7[_0x4364('0x22')]=_[_0x4364('0x31')](_0x20a6b9['query']);_0x5015f7[_0x4364('0x77')]=_[_0x4364('0x78')](_0x5015f7[_0x4364('0x76')],_0x5015f7['query']);_0xdc39b4[_0x4364('0x7a')]=_[_0x4364('0x78')](_0x5015f7[_0x4364('0x76')],qs[_0x4364('0x79')](_0x20a6b9['query'][_0x4364('0x79')]));_0xdc39b4[_0x4364('0x7a')]=_0xdc39b4[_0x4364('0x7a')][_0x4364('0x28')]?_0xdc39b4[_0x4364('0x7a')]:_0x5015f7[_0x4364('0x76')];if(!_0x20a6b9['query'][_0x4364('0x32')](_0x4364('0x81'))){_0xdc39b4[_0x4364('0x15')]=qs[_0x4364('0x15')](_0x20a6b9[_0x4364('0x22')][_0x4364('0x15')]);_0xdc39b4[_0x4364('0x14')]=qs['offset'](_0x20a6b9[_0x4364('0x22')][_0x4364('0x14')]);}_0xdc39b4[_0x4364('0x7b')]=qs['sort'](_0x20a6b9[_0x4364('0x22')]['sort']);_0xdc39b4[_0x4364('0x5d')]=qs[_0x4364('0x77')](_[_0x4364('0x7d')](_0x20a6b9[_0x4364('0x22')],_0x5015f7[_0x4364('0x77')]));_0xdc39b4[_0x4364('0x5d')][_0x4364('0x99')]=_0x225a4c['id'];if(_0x20a6b9[_0x4364('0x22')][_0x4364('0x7e')]){_0xdc39b4[_0x4364('0x5d')]=_[_0x4364('0x33')](_0xdc39b4[_0x4364('0x5d')],{'$or':_[_0x4364('0x7f')](_0xdc39b4[_0x4364('0x7a')],function(_0x104291){var _0x5b5d0a={};_0x5b5d0a[_0x104291]={'$like':'%'+_0x20a6b9[_0x4364('0x22')][_0x4364('0x7e')]+'%'};return _0x5b5d0a;})});}_0xdc39b4=_['merge']({},_0xdc39b4,_0x20a6b9[_0x4364('0x80')]);return db[_0x4364('0x3b')][_0x4364('0x16')]({'where':_0xdc39b4[_0x4364('0x5d')]})[_0x4364('0x1a')](function(_0x18bfbd){_0x4e936b[_0x4364('0x16')]=_0x18bfbd;if(_0x20a6b9[_0x4364('0x22')]['includeAll']){_0xdc39b4['include']=[{'all':!![]}];}return db[_0x4364('0x3b')][_0x4364('0x21')](_0xdc39b4);})[_0x4364('0x1a')](function(_0x497825){_0x4e936b['rows']=_0x497825;return _0x4e936b;});}})[_0x4364('0x1a')](respondWithFilteredResult(_0x410df1,_0xdc39b4))[_0x4364('0x27')](handleError(_0x410df1,null));};exports[_0x4364('0x9a')]=function(_0x103db9,_0x277af6){var _0x456711={'raw':!![],'where':{}};var _0x18f2f4={};var _0x5d3f14={'count':0x0,'rows':[]};return db['CmContact']['findOne']({'where':{'id':_0x103db9[_0x4364('0x26')]['id']}})['then'](handleEntityNotFound(_0x277af6,null))[_0x4364('0x1a')](function(_0x1ba801){if(_0x1ba801){_0x18f2f4['model']=_[_0x4364('0x31')](db[_0x4364('0x4a')][_0x4364('0x9b')]);_0x18f2f4[_0x4364('0x22')]=_[_0x4364('0x31')](_0x103db9[_0x4364('0x22')]);_0x18f2f4['filters']=_[_0x4364('0x78')](_0x18f2f4['model'],_0x18f2f4[_0x4364('0x22')]);_0x456711[_0x4364('0x7a')]=_[_0x4364('0x78')](_0x18f2f4[_0x4364('0x76')],qs[_0x4364('0x79')](_0x103db9[_0x4364('0x22')][_0x4364('0x79')]));_0x456711[_0x4364('0x7a')]=_0x456711[_0x4364('0x7a')][_0x4364('0x28')]?_0x456711[_0x4364('0x7a')]:_0x18f2f4[_0x4364('0x76')];if(!_0x103db9[_0x4364('0x22')]['hasOwnProperty'](_0x4364('0x81'))){_0x456711[_0x4364('0x15')]=qs[_0x4364('0x15')](_0x103db9[_0x4364('0x22')][_0x4364('0x15')]);_0x456711['offset']=qs['offset'](_0x103db9[_0x4364('0x22')]['offset']);}_0x456711[_0x4364('0x7b')]=qs[_0x4364('0x7c')](_0x103db9[_0x4364('0x22')][_0x4364('0x7c')]);_0x456711[_0x4364('0x5d')]=qs['filters'](_['pick'](_0x103db9[_0x4364('0x22')],_0x18f2f4[_0x4364('0x77')]));_0x456711['where']['ContactId']=_0x1ba801['id'];if(_0x103db9['query'][_0x4364('0x7e')]){_0x456711[_0x4364('0x5d')]=_[_0x4364('0x33')](_0x456711[_0x4364('0x5d')],{'$or':_[_0x4364('0x7f')](_0x456711[_0x4364('0x7a')],function(_0x18ccd7){var _0x56524a={};_0x56524a[_0x18ccd7]={'$like':'%'+_0x103db9[_0x4364('0x22')][_0x4364('0x7e')]+'%'};return _0x56524a;})});}_0x456711=_[_0x4364('0x33')]({},_0x456711,_0x103db9[_0x4364('0x80')]);return db[_0x4364('0x4a')][_0x4364('0x16')]({'where':_0x456711[_0x4364('0x5d')]})['then'](function(_0x280851){_0x5d3f14[_0x4364('0x16')]=_0x280851;if(_0x103db9['query'][_0x4364('0x9c')]){_0x456711[_0x4364('0x9d')]=[{'all':!![]}];}return db[_0x4364('0x4a')][_0x4364('0x21')](_0x456711);})[_0x4364('0x1a')](function(_0x362be2){_0x5d3f14[_0x4364('0x9e')]=_0x362be2;return _0x5d3f14;});}})[_0x4364('0x1a')](respondWithFilteredResult(_0x277af6,_0x456711))[_0x4364('0x27')](handleError(_0x277af6,null));};exports[_0x4364('0x9f')]=function(_0x518b90,_0x468340){var _0x356f34={'raw':!![],'where':{}};var _0x1cdf95={};var _0x24cc8a={'count':0x0,'rows':[]};return db['CmContact'][_0x4364('0x98')]({'where':{'id':_0x518b90['params']['id']}})[_0x4364('0x1a')](handleEntityNotFound(_0x468340,null))[_0x4364('0x1a')](function(_0x485c56){if(_0x485c56){_0x1cdf95[_0x4364('0x76')]=_[_0x4364('0x31')](db[_0x4364('0x49')][_0x4364('0x9b')]);_0x1cdf95[_0x4364('0x22')]=_[_0x4364('0x31')](_0x518b90[_0x4364('0x22')]);_0x1cdf95[_0x4364('0x77')]=_[_0x4364('0x78')](_0x1cdf95[_0x4364('0x76')],_0x1cdf95['query']);_0x356f34[_0x4364('0x7a')]=_[_0x4364('0x78')](_0x1cdf95[_0x4364('0x76')],qs[_0x4364('0x79')](_0x518b90['query'][_0x4364('0x79')]));_0x356f34['attributes']=_0x356f34[_0x4364('0x7a')][_0x4364('0x28')]?_0x356f34['attributes']:_0x1cdf95['model'];if(!_0x518b90[_0x4364('0x22')][_0x4364('0x32')](_0x4364('0x81'))){_0x356f34[_0x4364('0x15')]=qs[_0x4364('0x15')](_0x518b90['query'][_0x4364('0x15')]);_0x356f34[_0x4364('0x14')]=qs[_0x4364('0x14')](_0x518b90['query'][_0x4364('0x14')]);}_0x356f34[_0x4364('0x7b')]=qs[_0x4364('0x7c')](_0x518b90[_0x4364('0x22')][_0x4364('0x7c')]);_0x356f34[_0x4364('0x5d')]=qs[_0x4364('0x77')](_['pick'](_0x518b90[_0x4364('0x22')],_0x1cdf95[_0x4364('0x77')]));_0x356f34[_0x4364('0x5d')][_0x4364('0x99')]=_0x485c56['id'];if(_0x518b90[_0x4364('0x22')][_0x4364('0x7e')]){_0x356f34[_0x4364('0x5d')]=_[_0x4364('0x33')](_0x356f34[_0x4364('0x5d')],{'$or':_[_0x4364('0x7f')](_0x356f34[_0x4364('0x7a')],function(_0x52bbb1){var _0x443535={};_0x443535[_0x52bbb1]={'$like':'%'+_0x518b90[_0x4364('0x22')][_0x4364('0x7e')]+'%'};return _0x443535;})});}_0x356f34=_[_0x4364('0x33')]({},_0x356f34,_0x518b90['options']);return db[_0x4364('0x49')][_0x4364('0x16')]({'where':_0x356f34[_0x4364('0x5d')]})[_0x4364('0x1a')](function(_0x192b26){_0x24cc8a[_0x4364('0x16')]=_0x192b26;if(_0x518b90['query']['includeAll']){_0x356f34[_0x4364('0x9d')]=[{'all':!![]}];}return db[_0x4364('0x49')][_0x4364('0x21')](_0x356f34);})['then'](function(_0x5c3c99){_0x24cc8a[_0x4364('0x9e')]=_0x5c3c99;return _0x24cc8a;});}})[_0x4364('0x1a')](respondWithFilteredResult(_0x468340,_0x356f34))[_0x4364('0x27')](handleError(_0x468340,null));};exports[_0x4364('0xa0')]=function(_0x1a1557,_0x223b66){var _0x3aba20={'raw':!![],'where':{}};var _0xc4656a={};var _0x534eef={'count':0x0,'rows':[]};return db[_0x4364('0x24')]['findOne']({'where':{'id':_0x1a1557[_0x4364('0x26')]['id']}})[_0x4364('0x1a')](handleEntityNotFound(_0x223b66,null))['then'](function(_0x270a7f){if(_0x270a7f){_0xc4656a[_0x4364('0x76')]=_['keys'](db[_0x4364('0x52')][_0x4364('0x9b')]);_0xc4656a[_0x4364('0x22')]=_['keys'](_0x1a1557[_0x4364('0x22')]);_0xc4656a[_0x4364('0x77')]=_['intersection'](_0xc4656a['model'],_0xc4656a['query']);_0x3aba20[_0x4364('0x7a')]=_[_0x4364('0x78')](_0xc4656a[_0x4364('0x76')],qs[_0x4364('0x79')](_0x1a1557['query'][_0x4364('0x79')]));_0x3aba20['attributes']=_0x3aba20[_0x4364('0x7a')]['length']?_0x3aba20[_0x4364('0x7a')]:_0xc4656a[_0x4364('0x76')];if(!_0x1a1557[_0x4364('0x22')][_0x4364('0x32')]('nolimit')){_0x3aba20['limit']=qs[_0x4364('0x15')](_0x1a1557[_0x4364('0x22')][_0x4364('0x15')]);_0x3aba20[_0x4364('0x14')]=qs[_0x4364('0x14')](_0x1a1557['query'][_0x4364('0x14')]);}_0x3aba20[_0x4364('0x7b')]=qs[_0x4364('0x7c')](_0x1a1557[_0x4364('0x22')][_0x4364('0x7c')]);_0x3aba20['where']=qs[_0x4364('0x77')](_['pick'](_0x1a1557['query'],_0xc4656a['filters']));_0x3aba20['where'][_0x4364('0x99')]=_0x270a7f['id'];if(_0x1a1557[_0x4364('0x22')][_0x4364('0x7e')]){_0x3aba20[_0x4364('0x5d')]=_[_0x4364('0x33')](_0x3aba20[_0x4364('0x5d')],{'$or':_[_0x4364('0x7f')](_0x3aba20['attributes'],function(_0x23b332){var _0x5d161d={};_0x5d161d[_0x23b332]={'$like':'%'+_0x1a1557[_0x4364('0x22')][_0x4364('0x7e')]+'%'};return _0x5d161d;})});}_0x3aba20=_['merge']({},_0x3aba20,_0x1a1557[_0x4364('0x80')]);return db[_0x4364('0x52')][_0x4364('0x16')]({'where':_0x3aba20[_0x4364('0x5d')]})[_0x4364('0x1a')](function(_0x2c5948){_0x534eef[_0x4364('0x16')]=_0x2c5948;if(_0x1a1557['query'][_0x4364('0x9c')]){_0x3aba20[_0x4364('0x9d')]=[{'all':!![]}];}return db[_0x4364('0x52')]['findAll'](_0x3aba20);})[_0x4364('0x1a')](function(_0x3b3a03){_0x534eef[_0x4364('0x9e')]=_0x3b3a03;return _0x534eef;});}})[_0x4364('0x1a')](respondWithFilteredResult(_0x223b66,_0x3aba20))['catch'](handleError(_0x223b66,null));};exports[_0x4364('0xa1')]=function(_0x3674e,_0x326ef3){try{if(!_0x3674e[_0x4364('0x34')][_0x4364('0x5f')]){throw new Error('No\x20ListId\x20specified');}if(!_0x3674e[_0x4364('0x34')][_0x4364('0xa2')]){throw new Error(_0x4364('0xa3'));}if(!_0x3674e[_0x4364('0x34')][_0x4364('0xa4')]){throw new Error(_0x4364('0xa5'));}if(!_0x3674e['body'][_0x4364('0xa6')]){throw new Error('Unable\x20to\x20synchronize\x20socket,\x20no\x20timestamp\x20passed');}var _0x155a03=_0x3674e['body'][_0x4364('0xa2')][_0x4364('0xa7')](',');var _0xdc3ca2=_0x3674e[_0x4364('0x34')][_0x4364('0xa4')][_0x4364('0xa7')](',');if(!_0x155a03['length']||!_0xdc3ca2[_0x4364('0x28')]||_0x155a03[_0x4364('0x28')]!==_0xdc3ca2[_0x4364('0x28')]){throw new Error(_0x4364('0xa8'));}_0x3674e[_0x4364('0x34')][_0x4364('0x79')]=_[_0x4364('0xa9')](_0x155a03,_0xdc3ca2);if(!_0x3674e[_0x4364('0x34')][_0x4364('0x79')][_0x4364('0xaa')]){throw new Error(_0x4364('0xab'));}if(!_0x3674e[_0x4364('0x34')][_0x4364('0x79')][_0x4364('0xac')]){throw new Error('No\x20firstName\x20column\x20specified');}var _0x28083d=path[_0x4364('0x38')](config[_0x4364('0xad')],_0x4364('0xae'),_0x3674e[_0x4364('0xaf')][_0x4364('0xb0')]);fs['chmodSync'](_0x28083d,parseInt(_0x4364('0xb1'),0x8));var _0x243ffb=require(_0x4364('0xb2'))[_0x4364('0xb3')](path['join'](__dirname,'../../components/import/cm/csv'),[_0x28083d,_0x3674e[_0x4364('0x34')][_0x4364('0xa2')],_0x3674e[_0x4364('0x34')][_0x4364('0xa4')],_0x3674e[_0x4364('0x34')][_0x4364('0x5f')],_0x3674e['body']['CompanyId'],_0x3674e[_0x4364('0x34')][_0x4364('0x5c')],_0x3674e[_0x4364('0x34')]['socket_timestamp']]);return _0x326ef3[_0x4364('0x12')](0xc8)[_0x4364('0x13')]({'message':'File\x20uploaded\x20correctly!','pid':_0x243ffb[_0x4364('0xb4')]});}catch(_0x15988a){return _0x326ef3[_0x4364('0x12')](0x1f4)[_0x4364('0x1d')](_0x15988a);}};exports[_0x4364('0xb5')]=function(_0x4e3983,_0x282fb3){var _0x3ebd59=fs[_0x4364('0xb6')](_0x4e3983[_0x4364('0xaf')][_0x4364('0x3')]);Papa[_0x4364('0xb7')](_0x3ebd59,{'header':!![],'skipEmptyLines':!![],'preview':0x1,'complete':function(_0x39abd){return _0x282fb3['status'](0xc8)[_0x4364('0x13')]({'file':_0x4e3983[_0x4364('0xaf')],'fields':_0x39abd[_0x4364('0xb8')][_0x4364('0x79')]});}});};exports[_0x4364('0xb9')]=function(_0x3c826c,_0x38e5ff){return db['User'][_0x4364('0x21')]({'raw':!![],'attributes':['id'],'where':{'role':_0x4364('0xba')}})['then'](function(_0x2e2828){var _0xfaf1b7=![];if(!_0x3c826c['body'][_0x4364('0x5f')]){throw new Error(_0x4364('0xbb'));}if(!_0x3c826c['body'][_0x4364('0xbc')]['phone']){throw new Error(_0x4364('0xab'));}if(!_0x3c826c[_0x4364('0x34')][_0x4364('0xbc')][_0x4364('0xac')]){throw new Error(_0x4364('0xbd'));}if(!_0x3c826c[_0x4364('0x34')][_0x4364('0xa6')]){throw new Error(_0x4364('0xbe'));}var _0x19f987=require('child_process')[_0x4364('0xb3')](path[_0x4364('0x38')](__dirname,'../../components/import/cm/csv2'),[_0x3c826c['params']['id'],JSON[_0x4364('0xbf')](_0x3c826c[_0x4364('0x34')]),JSON['stringify'](_0x2e2828)]);_0x19f987['on']('message',function(){_0xfaf1b7=!![];return _0x38e5ff[_0x4364('0x12')](0xc8)[_0x4364('0x13')]({'message':_0x4364('0xc0'),'pid':_0x19f987[_0x4364('0xb4')]});});_0x19f987['on']('exit',function(_0x57fa9b){if(_0x57fa9b&&!_0xfaf1b7){return _0x38e5ff[_0x4364('0x12')](0x1f4)[_0x4364('0x13')]({'message':_0x4364('0xc1'),'pid':_0x19f987['pid']});}});})['catch'](handleError(_0x38e5ff,null));};exports[_0x4364('0xc2')]=function(_0xe256f9,_0x370216){return db[_0x4364('0xc3')]['findAll']({'raw':!![],'attributes':['id'],'where':{'role':_0x4364('0xba')}})[_0x4364('0x1a')](function(_0x5b3509){var _0x3fbe8f=![];if(!_0xe256f9[_0x4364('0x34')][_0x4364('0x5f')]){throw new Error(_0x4364('0xbb'));}if(!_0xe256f9['body'][_0x4364('0xbc')][_0x4364('0xaa')]){throw new Error(_0x4364('0xab'));}if(!_0xe256f9[_0x4364('0x34')][_0x4364('0xbc')][_0x4364('0xac')]){throw new Error('No\x20firstName\x20column\x20specified');}if(!_0xe256f9[_0x4364('0x34')]['socket_timestamp']){throw new Error(_0x4364('0xbe'));}var _0x4df0ce=require(_0x4364('0xb2'))[_0x4364('0xb3')](path[_0x4364('0x38')](__dirname,_0x4364('0xc4')),[_0xe256f9[_0x4364('0x26')]['id'],JSON[_0x4364('0xbf')](_0xe256f9[_0x4364('0x34')]),JSON[_0x4364('0xbf')](_0x5b3509)]);_0x4df0ce['on']('message',function(){_0x3fbe8f=!![];return _0x370216[_0x4364('0x12')](0xc8)[_0x4364('0x13')]({'message':'start\x20child\x20process\x20correctly!','pid':_0x4df0ce[_0x4364('0xb4')]});});_0x4df0ce['on'](_0x4364('0xc5'),function(_0x110df6){if(_0x110df6&&!_0x3fbe8f){return _0x370216[_0x4364('0x12')](0x1f4)[_0x4364('0x13')]({'message':_0x4364('0xc1'),'pid':_0x4df0ce['pid']});}});})[_0x4364('0x27')](handleError(_0x370216,null));};exports[_0x4364('0xc6')]=function(_0x1b97ed,_0x399ba8){var _0x4db684=[_0x4364('0xc7'),_0x4364('0xc8'),_0x4364('0xc9'),_0x4364('0xca'),_0x4364('0xcb'),_0x4364('0xcc'),_0x4364('0xcd')];var _0x288f83={'offset':0x0,'order':qs[_0x4364('0x7c')](_0x4364('0xce'))},_0x361863={'count':0x0,'rows':[]};Promise[_0x4364('0xcf')]()[_0x4364('0x1a')](function(){if(_0x1b97ed[_0x4364('0x22')]['channel']){if(!_[_0x4364('0xd0')](_0x4db684,_0x1b97ed[_0x4364('0x22')]['channel']['toLowerCase']())){throw new Error('Invalid\x20channel');}_0x4db684=[_0x1b97ed[_0x4364('0x22')]['channel']['toLowerCase']()];}if(_0x1b97ed['query'][_0x4364('0xd1')]){try{var _0x10a335=JSON[_0x4364('0xb7')](_0x1b97ed['query'][_0x4364('0xd1')]);if(!moment(_0x10a335['from'])[_0x4364('0xd2')]()){throw new Error(_0x4364('0xd3'));}if(!moment(_0x10a335['to'])[_0x4364('0xd2')]()){throw new Error(_0x4364('0xd4'));}}catch(_0x5d61ea){throw new Error('Invalid\x20createdAt\x20filter');}}if(!_0x1b97ed[_0x4364('0x22')]['hasOwnProperty']('nolimit')){_0x288f83[_0x4364('0x15')]=qs[_0x4364('0x15')](_0x1b97ed[_0x4364('0x22')][_0x4364('0x15')]||0xa);_0x288f83[_0x4364('0x14')]=qs[_0x4364('0x14')](_0x1b97ed[_0x4364('0x22')][_0x4364('0x14')]);}var _0x2d7219=_0x4db684[_0x4364('0x7f')](function(_0x5a5b0c){if(_0x5a5b0c===_0x4364('0xcd')){var _0x24396c={'attributes':['id',_0x4364('0xd5'),_0x4364('0x2f'),_0x4364('0xd6'),_0x4364('0xd7'),_0x4364('0xd8'),_0x4364('0xd9'),'endtime','duration',_0x4364('0xda'),'createdAt',_0x4364('0xdb'),'userSecondDisposition',_0x4364('0xdc'),'UserId'],'where':{'ContactId':_0x1b97ed[_0x4364('0x26')]['id']},'include':[{'model':db[_0x4364('0xc3')],'as':_0x4364('0xc3'),'attributes':['id',_0x4364('0x65'),_0x4364('0xdd'),_0x4364('0x2d')]}],'order':[['createdAt',_0x4364('0xde')]]};if(_0x1b97ed[_0x4364('0x22')]['range']){_0x24396c['where'][_0x4364('0xdf')]={'$gte':_0x10a335[_0x4364('0x3c')],'$lte':_0x10a335['to']};}return db[_0x4364('0x4c')][_0x4364('0xe0')](_0x24396c)[_0x4364('0x1a')](function(_0x43d0fe){_0x361863[_0x4364('0x16')]+=_0x43d0fe[_0x4364('0x16')];return _[_0x4364('0x7f')](_0x43d0fe['rows'],function(_0x5b46e2){var _0x549cdb=_0x5b46e2[_0x4364('0x35')]({'plain':!![]});_0x549cdb[_0x4364('0xe1')]=_0x5a5b0c;if(_0x549cdb[_0x4364('0xc3')]){_0x549cdb['User']={'id':_0x549cdb[_0x4364('0xc3')]['id'],'name':_0x549cdb[_0x4364('0xc3')][_0x4364('0x65')],'fullname':_0x549cdb['User']['fullname'],'alias':_0x549cdb[_0x4364('0xc3')][_0x4364('0x2d')]};}return _0x549cdb;});});}else{var _0x2db886=_[_0x4364('0xe2')](_0x5a5b0c)+(_0x5a5b0c===_0x4364('0xc8')?_0x4364('0xe3'):_0x4364('0xe4'));var _0x5b3d8={'attributes':['id',_0x4364('0xe5'),_0x4364('0xe6'),_0x4364('0xdf'),_0x4364('0xda'),_0x4364('0xe7'),_0x4364('0xe8'),'thirdDisposition',_0x4364('0xe9'),_0x2db886+'Id'],'where':{'ContactId':_0x1b97ed[_0x4364('0x26')]['id']},'include':[{'model':db[_0x2db886],'as':_0x4364('0xe4'),'attributes':['id',_0x4364('0x65'),_0x4364('0xea')]},{'model':db[_0x4364('0xc3')],'as':_0x4364('0xeb'),'attributes':['id',_0x4364('0x65'),_0x4364('0xdd')]},{'model':db[_0x4364('0x64')],'as':_0x4364('0xec'),'attributes':['id',_0x4364('0x65'),'color'],'through':{'attributes':[]}}],'order':[[_0x4364('0xdf'),_0x4364('0xde')]]};if(_0x1b97ed[_0x4364('0x22')]['range']){_0x5b3d8[_0x4364('0x5d')][_0x4364('0xdf')]={'$gte':_0x10a335[_0x4364('0x3c')],'$lte':_0x10a335['to']};}switch(_0x5a5b0c){case _0x4364('0xc8'):_0x5b3d8['attributes'][_0x4364('0x61')](_0x4364('0xed'),_0x4364('0xee'),_0x4364('0xef'),_0x4364('0xf0'),_0x4364('0xf1'),_0x4364('0xf2'),_0x4364('0xf3'),'ratingValue','referer');break;case _0x4364('0xc7'):_0x5b3d8[_0x4364('0x7a')][_0x4364('0x61')](_0x4364('0xf4'),'substatus');break;case _0x4364('0xca'):_0x5b3d8[_0x4364('0x7a')][_0x4364('0x61')](_0x4364('0xf5'),'threadId');break;}return db[_[_0x4364('0xe2')](_0x5a5b0c)+_0x4364('0xf6')][_0x4364('0xe0')](_0x5b3d8)['then'](function(_0xac3e13){_0x361863[_0x4364('0x16')]+=_0xac3e13[_0x4364('0x16')];return _[_0x4364('0x7f')](_0xac3e13[_0x4364('0x9e')],function(_0x77de3b){var _0x11b49a=_0x77de3b['get']({'plain':!![]});_0x11b49a[_0x4364('0xe1')]=_0x5a5b0c;if(_0x11b49a[_0x4364('0xeb')]){_0x11b49a[_0x4364('0xeb')]={'id':_0x11b49a[_0x4364('0xeb')]['id'],'name':_0x11b49a[_0x4364('0xeb')][_0x4364('0x65')],'fullname':_0x11b49a[_0x4364('0xeb')]['fullname']};}return _0x11b49a;});});}});return Promise[_0x4364('0x63')](_0x2d7219);})[_0x4364('0x1a')](function(_0x191048){return _(_0x191048)[_0x4364('0xf7')]()[_0x4364('0xf8')](_0x4364('0xdf'))[_0x4364('0xf9')]()[_0x4364('0xfa')]();})[_0x4364('0x1a')](function(_0x162849){_0x361863[_0x4364('0x9e')]=_0x288f83['limit']?_0x162849[_0x4364('0xfb')](_0x288f83[_0x4364('0x14')],_0x288f83[_0x4364('0x14')]+_0x288f83[_0x4364('0x15')]):_0x162849;return _0x361863;})['then'](respondWithFilteredResult(_0x399ba8,_0x288f83))[_0x4364('0x27')](handleError(_0x399ba8,null));}; \ No newline at end of file +var _0xf803=['additionalPhones','bulkCreate','each','duplicates','where','$or','push','ListId','findOrCreate','all','show','find','Tag','Tags','tag','ItemType','sequelize','literal','Phones.OrderBy','$and','map','format','cf_%d','omit','pickBy','table','cm_contacts','setFields','id\x20=\x20?','toParam','text','phone','findOne','model','rawAttributes','filters','intersection','attributes','fields','order','pick','options','nolimit','getTags','setTags','ids','setAdditionalPhones','ContactItemType','items','item_types','ItemTypeId','description','contact\x20phone\x20exists','PHONE','CmHopperAdditionalPhone','item','OrderBy','ItemType.OrderBy','`ItemType`.OrderBy','duplicateAdditionalPhones','fromContactId','toContactId','rescheduleAdditionalPhones','hopperId','sort','ContactId','filter','include','CmHopperHistory','includeAll','rows','getHopperFinals','getJscriptySessions','JscriptySessionReport','uploadCsv','binding_keys','No\x20association\x20keys\x20specified!','binding_values','No\x20association\x20values\x20specified!','socket_timestamp','split','Incorrect\x20binding\x20parameters\x20passed!','No\x20phone\x20column\x20specified','firstName','No\x20firstName\x20column\x20specified','root','server/files/tmp','file','filename','chmodSync','0777','child_process','fork','../../components/import/cm/csv','CompanyId','File\x20uploaded\x20correctly!','upload','parse','meta','import','agent','No\x20ListId\x20specified','binding','stringify','start\x20child\x20process\x20correctly!','error\x20child\x20process','pid','importUpdates','User','Unable\x20to\x20synchronize\x20socket,\x20no\x20timestamp\x20passed','../../components/import/cm/csvUpdates','exit','mail','chat','openchannel','fax','whatsapp','voice','-createdAt','resolve','includes','channel','Invalid\x20channel','toLowerCase','range','isValid','Invalid\x20date\x20for\x20range\x20from\x20filter','Invalid\x20createdAt\x20filter','destination','note','createdAt','userDisposition','userSecondDisposition','userThirdDisposition','UserId','fullname','Account','closedAt','disposition','secondDisposition','thirdDisposition','Owner','color','DESC','browserName','customerIp','deviceModel','osName','ratingMessage','ratingType','ratingValue','substatus','externalUrl','Interaction','sortBy','reverse','value','slice','moment','bluebird','path','lodash','papaparse','ioredis','../../components/contacts','../../components/parsers/qs','../../config/logger','api','../../config/environment','../../config/environment/shared','../../mysqldb','redis','defaults','localhost','socket.io-emitter','./cmContact.socket','json','offset','undefined','limit','count','status','set','Content-Range','then','destroy','sendStatus','error','stack','name','send','index','describe','query','catch','CmContact','params','tags','keys','startsWith','columnName','displayName','CmCustomField','length','cf_','alias','custom','type','values','forEach','hasOwnProperty','merge','body','findAll','get','mergeWith','isArray','join','info','[CmContact][merge]\x20to\x20%s\x20from\x20%s','from','CmHopper','[CmContact][merge][destroy][CmHopper],\x20%s','CmHopperBlack','[CmContact][merge][destroy][CmHopperBlack],\x20%s','create','update','ChatOfflineMessage','MailInteraction','MailMessage','SmsInteraction','FaxInteraction','FaxMessage','OpenchannelInteraction','OpenchannelMessage','CmContactHasItem','CmHopperFinal','VoiceCallReport','ChatQueueReport','MailQueueReport','OpenchannelQueueReport','SmsQueueReport','WhatsappInteraction','WhatsappMessage','isNil','dialTimezone','timezones','utcOffset'];(function(_0x41dec0,_0x415215){var _0x4083ac=function(_0x45ecd6){while(--_0x45ecd6){_0x41dec0['push'](_0x41dec0['shift']());}};_0x4083ac(++_0x415215);}(_0xf803,0x196));var _0x3f80=function(_0x560cdd,_0x2667d7){_0x560cdd=_0x560cdd-0x0;var _0x10f689=_0xf803[_0x560cdd];return _0x10f689;};'use strict';var moment=require(_0x3f80('0x0'));var BPromise=require(_0x3f80('0x1'));var util=require('util');var path=require(_0x3f80('0x2'));var fs=require('fs');var _=require(_0x3f80('0x3'));var squel=require('squel');var Papa=require(_0x3f80('0x4'));var Redis=require(_0x3f80('0x5'));var contacts=require(_0x3f80('0x6'));var qs=require(_0x3f80('0x7'));var logger=require(_0x3f80('0x8'))(_0x3f80('0x9'));var config=require(_0x3f80('0xa'));var shared=require(_0x3f80('0xb'));var db=require(_0x3f80('0xc'))['db'];config[_0x3f80('0xd')]=_[_0x3f80('0xe')](config[_0x3f80('0xd')],{'host':_0x3f80('0xf'),'port':0x18eb});var socket=require(_0x3f80('0x10'))(new Redis(config[_0x3f80('0xd')]));require(_0x3f80('0x11'))['register'](socket);function respondWithResult(_0x39a901,_0x51c226){_0x51c226=_0x51c226||0xc8;return function(_0xbf9484){if(_0xbf9484){return _0x39a901['status'](_0x51c226)[_0x3f80('0x12')](_0xbf9484);}};}function respondWithFilteredResult(_0x251d07,_0x44bfa4){return function(_0x2d8a67){if(_0x2d8a67){var _0x2e05a9=typeof _0x44bfa4[_0x3f80('0x13')]===_0x3f80('0x14')&&typeof _0x44bfa4[_0x3f80('0x15')]===_0x3f80('0x14');var _0x473e28=_0x2d8a67[_0x3f80('0x16')];var _0x41608a=_0x2e05a9?0x0:_0x44bfa4[_0x3f80('0x13')];var _0x463cdc=_0x2e05a9?_0x2d8a67[_0x3f80('0x16')]:_0x44bfa4['offset']+_0x44bfa4['limit'];var _0x356483;if(_0x463cdc>=_0x473e28){_0x463cdc=_0x473e28;_0x356483=0xc8;}else{_0x356483=0xce;}_0x251d07[_0x3f80('0x17')](_0x356483);return _0x251d07[_0x3f80('0x18')](_0x3f80('0x19'),_0x41608a+'-'+_0x463cdc+'/'+_0x473e28)[_0x3f80('0x12')](_0x2d8a67);}return null;};}function saveUpdates(_0x44746c){return function(_0x5e3386){if(_0x5e3386){return _0x5e3386['update'](_0x44746c)[_0x3f80('0x1a')](function(_0x30f4de){return _0x30f4de;});}return null;};}function removeEntity(_0x31fb4f){return function(_0x12fa02){if(_0x12fa02){return _0x12fa02[_0x3f80('0x1b')]()[_0x3f80('0x1a')](function(){_0x31fb4f[_0x3f80('0x17')](0xcc)['end']();});}};}function handleEntityNotFound(_0x591d2e){return function(_0x40816e){if(!_0x40816e){_0x591d2e[_0x3f80('0x1c')](0x194);}return _0x40816e;};}function handleError(_0x724b1b,_0x3ed0b3){_0x3ed0b3=_0x3ed0b3||0x1f4;return function(_0x34faa0){logger[_0x3f80('0x1d')](_0x34faa0[_0x3f80('0x1e')]);if(_0x34faa0['name']){delete _0x34faa0[_0x3f80('0x1f')];}_0x724b1b[_0x3f80('0x17')](_0x3ed0b3)[_0x3f80('0x20')](_0x34faa0);};}exports[_0x3f80('0x21')]=function(_0x2d8a63,_0x16bbf6){var _0x2bb979={};return contacts[_0x3f80('0x22')]()[_0x3f80('0x1a')](function(_0x3b5403){_0x2bb979=qs['getOptions'](_0x3b5403,_0x2d8a63);return contacts['findAll'](_0x2d8a63[_0x3f80('0x23')],_0x2d8a63['user'],_0x2bb979,_0x3b5403);})[_0x3f80('0x1a')](respondWithFilteredResult(_0x16bbf6,_0x2bb979))[_0x3f80('0x24')](handleError(_0x16bbf6,null));};exports['destroy']=function(_0x1a865c,_0x2d4226){return db[_0x3f80('0x25')]['find']({'where':{'id':_0x1a865c[_0x3f80('0x26')]['id']}})[_0x3f80('0x1a')](handleEntityNotFound(_0x2d4226,null))[_0x3f80('0x1a')](removeEntity(_0x2d4226,null))['catch'](handleError(_0x2d4226,null));};exports[_0x3f80('0x22')]=function(_0x43975f,_0x40b525){return db[_0x3f80('0x25')][_0x3f80('0x22')]()['then'](function(_0x182445){delete _0x182445[_0x3f80('0x27')];for(var _0x4ad59f=0x0;_0x4ad59f0x0){return new Promise(function(_0x529211){var _0x532c08=[];for(var _0x56d8bb=0x0;_0x56d8bb<_0x460f77[_0x3f80('0x2d')];_0x56d8bb++){_0x532c08[_0x3f80('0x60')](insertAdditionalPhones(_0x460f77[_0x56d8bb]['contact'],_0x460f77[_0x56d8bb][_0x3f80('0x5a')]));}Promise[_0x3f80('0x63')](_0x532c08)[_0x3f80('0x1a')](function(){_0x529211(0x1);});})['then'](function(){return{'success':_0x3423f8,'failure':_0x5ef2e4,'duplicates':_0x22d4f1};});}else{return{'success':_0x3423f8,'failure':_0x5ef2e4,'duplicates':_0x22d4f1};}}})['then'](respondWithResult(_0x41cc4a,0xc9))[_0x3f80('0x24')](handleError(_0x41cc4a,null));};exports[_0x3f80('0x64')]=function(_0x1aeff9,_0x41ef19){var _0x1d192e;return db['CmContact'][_0x3f80('0x22')]()[_0x3f80('0x1a')](function(_0x5e6fa7){return db[_0x3f80('0x25')][_0x3f80('0x65')]({'where':{'id':_0x1aeff9[_0x3f80('0x26')]['id']},'include':[{'model':db[_0x3f80('0x66')],'as':_0x3f80('0x67'),'attributes':['id',_0x3f80('0x1f'),'color'],'required':_0x1aeff9[_0x3f80('0x23')][_0x3f80('0x68')]?!![]:![]},{'model':db[_0x3f80('0x4d')],'as':'Phones','where':{'CmContactId':_0x1aeff9[_0x3f80('0x26')]['id']},'required':![],'include':[{'model':db['ContactItemType'],'as':_0x3f80('0x69')}]}],'order':[db[_0x3f80('0x6a')][_0x3f80('0x6b')](_0x3f80('0x6c'))],'attributes':_['keys'](_0x5e6fa7)});})['then'](function(_0xf9ca41){if(!_['isNil'](_0xf9ca41)){_0x1d192e=_0xf9ca41[_0x3f80('0x38')]({'plain':!![]});var _0x163c8d={'where':{'$and':[{'ListId':{'$ne':null}}]}};if(_0xf9ca41&&_0xf9ca41[_0x3f80('0x61')]){if(_0xf9ca41[_0x3f80('0x61')]){_0x163c8d['where'][_0x3f80('0x6d')][_0x3f80('0x60')]({'ListId':{'$ne':_0xf9ca41['ListId']}});}}return db['CmCustomField'][_0x3f80('0x37')](_0x163c8d);}})[_0x3f80('0x1a')](function(_0x2f3e6d){if(!_['isNil'](_0x2f3e6d)){return _['omit'](_0x1d192e,_[_0x3f80('0x6e')](_0x2f3e6d,function(_0x6a40a6){return util[_0x3f80('0x6f')](_0x3f80('0x70'),_0x6a40a6['id']);}));}})[_0x3f80('0x1a')](handleEntityNotFound(_0x41ef19,null))[_0x3f80('0x1a')](respondWithResult(_0x41ef19,null))[_0x3f80('0x24')](handleError(_0x41ef19,null));};exports[_0x3f80('0x44')]=function(_0x2a891e,_0xba0a1){var _0x587a75;if(_0x2a891e['body']['id']){delete _0x2a891e[_0x3f80('0x36')]['id'];}if(!_[_0x3f80('0x56')](_0x2a891e[_0x3f80('0x36')][_0x3f80('0x57')])){var _0x617de8=_0x2a891e[_0x3f80('0x36')][_0x3f80('0x57')];if(!_[_0x3f80('0x56')](shared[_0x3f80('0x58')][_0x617de8]))_0x2a891e[_0x3f80('0x36')][_0x3f80('0x59')]=shared[_0x3f80('0x58')][_0x617de8][_0x3f80('0x59')];}return db[_0x3f80('0x25')][_0x3f80('0x65')]({'where':{'id':_0x2a891e[_0x3f80('0x26')]['id']}})[_0x3f80('0x1a')](handleEntityNotFound(_0xba0a1,null))[_0x3f80('0x1a')](saveUpdates(_0x2a891e[_0x3f80('0x36')],null))[_0x3f80('0x1a')](function(_0x343a48){_0x587a75=_0x343a48;var _0x4f795e={'where':{'$and':[{'ListId':{'$ne':null}}]}};if(_0x343a48&&_0x343a48['ListId']){if(_0x343a48[_0x3f80('0x61')]){_0x4f795e['where'][_0x3f80('0x6d')][_0x3f80('0x60')]({'ListId':{'$ne':_0x343a48['ListId']}});}}return db[_0x3f80('0x2c')]['findAll'](_0x4f795e);})['then'](function(_0x12e20b){if(_0x12e20b){return _[_0x3f80('0x71')](_[_0x3f80('0x72')](_0x2a891e['body'],function(_0x1d60e3,_0x5d45d5){return _[_0x3f80('0x29')](_0x5d45d5,'cf_');}),_['map'](_0x12e20b,function(_0x1d3a7c){return util[_0x3f80('0x6f')]('cf_%d',_0x1d3a7c['id']);}));}})['then'](function(_0x350244){if(_0x350244&&!_['isEmpty'](_0x350244)){var _0x1cc768=squel['update']()[_0x3f80('0x73')](_0x3f80('0x74'))[_0x3f80('0x75')](_0x350244)[_0x3f80('0x5e')](_0x3f80('0x76'),_0x2a891e['params']['id'])[_0x3f80('0x77')]();return db[_0x3f80('0x6a')]['query'](_0x1cc768[_0x3f80('0x78')],{'replacements':_0x1cc768[_0x3f80('0x32')]});}})['then'](function(){if(_0x2a891e['body'][_0x3f80('0x79')]&&_0x587a75){return db['CmHopper'][_0x3f80('0x44')]({'phone':_0x2a891e[_0x3f80('0x36')][_0x3f80('0x79')],'OrderBy':0x0},{'where':{'ContactId':_0x587a75['id']}});}})[_0x3f80('0x1a')](function(){return _0x587a75;})['then'](respondWithResult(_0xba0a1,null))[_0x3f80('0x24')](handleError(_0xba0a1,null));};exports['getTags']=function(_0x2125bd,_0x91a8b){var _0x1f94ad={};var _0x51dff7={};var _0x57da99;var _0x36cb65;return db[_0x3f80('0x25')][_0x3f80('0x7a')]({'where':{'id':_0x2125bd[_0x3f80('0x26')]['id']}})[_0x3f80('0x1a')](handleEntityNotFound(_0x91a8b,null))[_0x3f80('0x1a')](function(_0xb0603b){if(_0xb0603b){_0x57da99=_0xb0603b;_0x51dff7[_0x3f80('0x7b')]=_[_0x3f80('0x28')](db[_0x3f80('0x66')][_0x3f80('0x7c')]);_0x51dff7[_0x3f80('0x23')]=_['keys'](_0x2125bd[_0x3f80('0x23')]);_0x51dff7[_0x3f80('0x7d')]=_[_0x3f80('0x7e')](_0x51dff7[_0x3f80('0x7b')],_0x51dff7[_0x3f80('0x23')]);_0x1f94ad[_0x3f80('0x7f')]=_[_0x3f80('0x7e')](_0x51dff7[_0x3f80('0x7b')],qs[_0x3f80('0x80')](_0x2125bd[_0x3f80('0x23')][_0x3f80('0x80')]));_0x1f94ad[_0x3f80('0x7f')]=_0x1f94ad[_0x3f80('0x7f')][_0x3f80('0x2d')]?_0x1f94ad[_0x3f80('0x7f')]:_0x51dff7[_0x3f80('0x7b')];_0x1f94ad[_0x3f80('0x81')]=qs['sort'](_0x2125bd['query']['sort']);_0x1f94ad[_0x3f80('0x5e')]=qs[_0x3f80('0x7d')](_[_0x3f80('0x82')](_0x2125bd[_0x3f80('0x23')],_0x51dff7['filters']));if(_0x2125bd[_0x3f80('0x23')]['filter']){_0x1f94ad['where']=_[_0x3f80('0x35')](_0x1f94ad[_0x3f80('0x5e')],{'$or':_[_0x3f80('0x6e')](_0x1f94ad[_0x3f80('0x7f')],function(_0x26c326){var _0x2d74b2={};_0x2d74b2[_0x26c326]={'$like':'%'+_0x2125bd[_0x3f80('0x23')]['filter']+'%'};return _0x2d74b2;})});}_0x1f94ad=_[_0x3f80('0x35')]({},_0x1f94ad,_0x2125bd[_0x3f80('0x83')]);return _0x57da99['getTags'](_0x1f94ad);}})[_0x3f80('0x1a')](function(_0x67f9f9){if(_0x67f9f9){_0x36cb65=_0x67f9f9[_0x3f80('0x2d')];if(!_0x2125bd[_0x3f80('0x23')][_0x3f80('0x34')](_0x3f80('0x84'))){_0x1f94ad[_0x3f80('0x15')]=qs['limit'](_0x2125bd[_0x3f80('0x23')]['limit']);_0x1f94ad['offset']=qs[_0x3f80('0x13')](_0x2125bd[_0x3f80('0x23')][_0x3f80('0x13')]);}return _0x57da99[_0x3f80('0x85')](_0x1f94ad);}})[_0x3f80('0x1a')](function(_0x5d7e0e){if(_0x5d7e0e){return _0x5d7e0e?{'count':_0x36cb65,'rows':_0x5d7e0e}:null;}})[_0x3f80('0x1a')](respondWithResult(_0x91a8b,null))[_0x3f80('0x24')](handleError(_0x91a8b,null));};exports[_0x3f80('0x86')]=function(_0x323441,_0x5b20e6){if(_0x323441[_0x3f80('0x36')]['id']){delete _0x323441[_0x3f80('0x36')]['id'];}return db[_0x3f80('0x25')][_0x3f80('0x7a')]({'where':{'id':_0x323441[_0x3f80('0x26')]['id']}})[_0x3f80('0x1a')](handleEntityNotFound(_0x5b20e6,null))[_0x3f80('0x1a')](function(_0xe69c1a){if(_0xe69c1a){return _0xe69c1a['setTags'](_0x323441[_0x3f80('0x36')][_0x3f80('0x87')]||[]);}return null;})[_0x3f80('0x1a')](respondWithResult(_0x5b20e6,null))['catch'](handleError(_0x5b20e6,null));};exports[_0x3f80('0x88')]=function(_0x205170,_0x11c6c7){var _0x26f761=[];_0x26f761[_0x3f80('0x60')](addAdditionalPhones(_0x205170['body']));Promise['all'](_0x26f761)['then'](function(){_0x26f761=[];_0x26f761[_0x3f80('0x60')](deleteCmHopperPhones(_0x205170[_0x3f80('0x36')]['id']));_0x26f761[_0x3f80('0x60')](addCmHopperPhones(_0x205170['body']['id']));Promise[_0x3f80('0x63')](_0x26f761)[_0x3f80('0x1a')](function(){return[0x1];})[_0x3f80('0x1a')](respondWithResult(_0x11c6c7,null));});};function addAdditionalPhones(_0x11a5cf){var _0x3bfcab;return new Promise(function(_0x5b7003){return db['CmContactHasItem'][_0x3f80('0x1b')]({'where':{'CmContactId':_0x11a5cf['id']}})[_0x3f80('0x1a')](function(){db[_0x3f80('0x89')]['findAll']({'raw':!![],'attributes':['id','OrderBy']})[_0x3f80('0x1a')](function(_0x3cca3f){var _0x5acab8=[];for(var _0x3b9c73=0x0;_0x3b9c73<_0x11a5cf[_0x3f80('0x8a')][_0x3f80('0x2d')];_0x3b9c73++){var _0x3435be=_0x11a5cf[_0x3f80('0x8b')]?_[_0x3f80('0x56')](_0x11a5cf[_0x3f80('0x8b')][_0x3b9c73])?'':_0x11a5cf[_0x3f80('0x8b')][_0x3b9c73]:_0x11a5cf[_0x3f80('0x8a')][_0x3b9c73][_0x3f80('0x8c')]?_0x11a5cf[_0x3f80('0x8a')][_0x3b9c73][_0x3f80('0x8c')]:'';var _0x512156=_[_0x3f80('0x56')](_0x11a5cf['items'][_0x3b9c73][_0x3f80('0x8d')])?'':_0x11a5cf[_0x3f80('0x8a')][_0x3b9c73][_0x3f80('0x8d')];var _0x1bfa76=_0x3435be+':'+_0x11a5cf[_0x3f80('0x8a')][_0x3b9c73][_0x3f80('0x79')]+'§'+_0x512156;if(_[_0x3f80('0x56')](_0x3bfcab))_0x3bfcab=_0x1bfa76;else _0x3bfcab+=';'+_0x1bfa76;var _0xd8afc1=null;var _0x5c28df=null;if(_0x11a5cf[_0x3f80('0x8b')]){if(!_[_0x3f80('0x56')](_0x11a5cf[_0x3f80('0x8b')][_0x3b9c73])){_0x5c28df=_['find'](_0x3cca3f,function(_0x5e39c7){return _0x5e39c7['id']===_0x11a5cf[_0x3f80('0x8b')][_0x3b9c73];});if(!_['isNil'](_0x5c28df)){_0xd8afc1=_0x5c28df['OrderBy'];}}}else{if(!_[_0x3f80('0x56')](_0x11a5cf['items'][_0x3b9c73])){_0x5c28df=_[_0x3f80('0x65')](_0x3cca3f,function(_0x3b84f4){return _0x3b84f4['id']===_0x11a5cf['items'][_0x3b9c73][_0x3f80('0x8c')];});if(!_['isNil'](_0x5c28df)){_0xd8afc1=_0x3b9c73;}}}if(_[_0x3f80('0x56')](_0xd8afc1)){_0xd8afc1=0x64;}_0x5acab8[_0x3f80('0x60')](addAdditionalPhone(_0x11a5cf['id'],_0x11a5cf[_0x3f80('0x8a')][_0x3b9c73][_0x3f80('0x79')],_0x11a5cf[_0x3f80('0x8b')]?_[_0x3f80('0x56')](_0x11a5cf[_0x3f80('0x8b')][_0x3b9c73])?null:_0x11a5cf['item_types'][_0x3b9c73]:_0x11a5cf[_0x3f80('0x8a')][_0x3b9c73][_0x3f80('0x8c')]?_0x11a5cf[_0x3f80('0x8a')][_0x3b9c73]['ItemTypeId']:null,_0xd8afc1,_0x512156));}Promise[_0x3f80('0x63')](_0x5acab8)['then'](function(){db['CmContact'][_0x3f80('0x44')]({'AdditionalPhones':_0x3bfcab},{'where':{'id':_0x11a5cf['id']}})[_0x3f80('0x1a')](function(){_0x5b7003(0x1);});});});});});}function addAdditionalPhone(_0x2ebf24,_0x46eea1,_0x541dea,_0x597001,_0x59d47b){return db[_0x3f80('0x4d')]['find']({'where':{'CmContactId':_0x2ebf24,'item':_0x46eea1}})[_0x3f80('0x1a')](function(_0xdb3163){if(_0xdb3163)logger['info'](_0x3f80('0x8e'),_0xdb3163);else{db[_0x3f80('0x4d')]['create']({'CmContactId':_0x2ebf24,'item':_0x46eea1,'ItemTypeId':_0x541dea,'OrderBy':_0x597001,'ItemClass':_0x3f80('0x8f'),'description':_0x59d47b});}});}function deleteCmHopperPhones(_0x378ec3){return new Promise(function(_0x4cf936){return db[_0x3f80('0x3f')][_0x3f80('0x37')]({'raw':!![],'attributes':['id'],'where':{'ContactId':_0x378ec3}})[_0x3f80('0x1a')](function(_0x101cfc){db[_0x3f80('0x90')]['destroy']({'where':{'CmHopperId':{'$in':_[_0x3f80('0x6e')](_0x101cfc,'id')}}});})[_0x3f80('0x1a')](function(){_0x4cf936(0x1);});});}function addCmHopperPhones(_0x52041d){return new Promise(function(_0x360d62){return db[_0x3f80('0x3f')][_0x3f80('0x37')]({'raw':!![],'attributes':['id'],'where':{'ContactId':_0x52041d}})[_0x3f80('0x1a')](function(_0x1ac7c7){var _0x51c2f6=[];_[_0x3f80('0x6e')](_0x1ac7c7,function(_0x5d7cc4){_0x51c2f6[_0x3f80('0x60')](createCmHopperPhone(_0x52041d,_0x5d7cc4['id']));});Promise[_0x3f80('0x63')](_0x51c2f6)[_0x3f80('0x1a')](function(){_0x360d62(0x1);});});});}function createCmHopperPhone(_0x738ea9,_0x4e5da1){return new Promise(function(_0x3be32a){db[_0x3f80('0x4d')][_0x3f80('0x37')]({'raw':!![],'attributes':[_0x3f80('0x91'),_0x3f80('0x92')],'where':{'CmContactId':_0x738ea9,'ItemClass':_0x3f80('0x8f')},'include':[{'model':db[_0x3f80('0x89')],'attributes':['OrderBy'],'as':'ItemType'}],'order':[_0x3f80('0x92'),db[_0x3f80('0x6a')]['literal']('`ItemType`.OrderBy')]})[_0x3f80('0x1a')](function(_0x10b10e){var _0x19cde5=0x1;var _0x122685=_['map'](_0x10b10e,function(_0x34dc8e){_0x34dc8e['CmHopperId']=_0x4e5da1;_0x34dc8e['phone']=_0x34dc8e[_0x3f80('0x91')];_0x34dc8e[_0x3f80('0x92')]=_0x19cde5;delete _0x34dc8e[_0x3f80('0x93')];_0x19cde5=_0x19cde5+0x1;return _0x34dc8e;});return db[_0x3f80('0x90')][_0x3f80('0x5b')](_0x122685,{});})[_0x3f80('0x1a')](function(){_0x3be32a(0x1);});});}function insertAdditionalPhones(_0x56c694,_0x1cd71e){return new Promise(function(_0x26f8f5){var _0x4570be=[];for(var _0x1f9470=0x0;_0x1f9470<_0x1cd71e['length'];_0x1f9470++){var _0x1427d4=_0x1cd71e[_0x1f9470];_0x4570be['push'](parseContactItemType(_0x1427d4));}Promise['all'](_0x4570be)[_0x3f80('0x1a')](function(){var _0xa68a2d={'id':_0x56c694['id'],'items':_0x1cd71e};return addAdditionalPhones(_0xa68a2d)[_0x3f80('0x1a')](function(){return addCmHopperPhones(_0x56c694['id']);});})[_0x3f80('0x1a')](function(){_0x26f8f5(_0x56c694);});});}function parseContactItemType(_0x284abb){return new Promise(function(_0x2e01bc){if(_0x284abb[_0x3f80('0x34')](_0x3f80('0x8c'))){_0x2e01bc(_0x284abb);}else{return db[_0x3f80('0x89')]['find']({'where':{'name':_0x284abb[_0x3f80('0x69')]}})[_0x3f80('0x1a')](function(_0x3e12cb){if(_['isNil'](_0x3e12cb))_0x284abb['ItemTypeId']=null;else _0x284abb[_0x3f80('0x8c')]=_0x3e12cb['id'];_0x2e01bc(_0x284abb);});}});}exports['getAdditionalPhones']=function(_0x49ffd8,_0x379614){return db[_0x3f80('0x4d')][_0x3f80('0x37')]({'raw':!![],'where':{'CmContactId':_0x49ffd8[_0x3f80('0x26')]['id'],'ItemClass':_0x3f80('0x8f')},'include':[{'model':db[_0x3f80('0x89')],'as':_0x3f80('0x69')}],'order':[[_0x3f80('0x92')],[db['sequelize'][_0x3f80('0x6b')](_0x3f80('0x94'))]]})[_0x3f80('0x1a')](function(_0x545e89){return _0x545e89;})['then'](respondWithResult(_0x379614,null))[_0x3f80('0x24')](handleError(_0x379614,null));};exports[_0x3f80('0x95')]=function(_0x4ff0f4,_0x579ebf){return db['CmContactHasItem'][_0x3f80('0x37')]({'raw':!![],'where':{'CmContactId':_0x4ff0f4[_0x3f80('0x36')][_0x3f80('0x96')]}})[_0x3f80('0x1a')](function(_0x154092){var _0x20afc5=_[_0x3f80('0x6e')](_0x154092,function(_0x5090a5){_0x5090a5['CmContactId']=_0x4ff0f4[_0x3f80('0x36')][_0x3f80('0x97')];return _0x5090a5;});return db[_0x3f80('0x4d')][_0x3f80('0x5b')](_0x20afc5,{});})[_0x3f80('0x1a')](function(){return addCmHopperPhones(_0x4ff0f4[_0x3f80('0x36')][_0x3f80('0x97')]);})[_0x3f80('0x1a')](function(){return['ok'];})[_0x3f80('0x1a')](respondWithResult(_0x579ebf,null))[_0x3f80('0x24')](handleError(_0x579ebf,null));};exports[_0x3f80('0x98')]=function(_0x341ff6,_0x28b278){var _0x2fca64=[];_0x2fca64['push'](createCmHopperPhone(_0x341ff6[_0x3f80('0x36')]['id'],_0x341ff6['body'][_0x3f80('0x99')]));Promise[_0x3f80('0x63')](_0x2fca64)['then'](function(){return[0x1];})[_0x3f80('0x1a')](respondWithResult(_0x28b278,null));};exports['getHoppers']=function(_0x548f7e,_0x103cb3){var _0xa3ad10={'raw':![],'where':{}};var _0x1e3227={};var _0x25dee9={'count':0x0,'rows':[]};return db['CmContact'][_0x3f80('0x7a')]({'where':{'id':_0x548f7e[_0x3f80('0x26')]['id']}})[_0x3f80('0x1a')](handleEntityNotFound(_0x103cb3,null))[_0x3f80('0x1a')](function(_0x575e96){if(_0x575e96){_0x1e3227['model']=_['keys'](db[_0x3f80('0x3f')][_0x3f80('0x7c')]);_0x1e3227[_0x3f80('0x23')]=_['keys'](_0x548f7e[_0x3f80('0x23')]);_0x1e3227[_0x3f80('0x7d')]=_[_0x3f80('0x7e')](_0x1e3227['model'],_0x1e3227[_0x3f80('0x23')]);_0xa3ad10['attributes']=_[_0x3f80('0x7e')](_0x1e3227['model'],qs[_0x3f80('0x80')](_0x548f7e[_0x3f80('0x23')][_0x3f80('0x80')]));_0xa3ad10[_0x3f80('0x7f')]=_0xa3ad10[_0x3f80('0x7f')][_0x3f80('0x2d')]?_0xa3ad10[_0x3f80('0x7f')]:_0x1e3227['model'];if(!_0x548f7e['query'][_0x3f80('0x34')](_0x3f80('0x84'))){_0xa3ad10['limit']=qs['limit'](_0x548f7e[_0x3f80('0x23')][_0x3f80('0x15')]);_0xa3ad10['offset']=qs['offset'](_0x548f7e[_0x3f80('0x23')][_0x3f80('0x13')]);}_0xa3ad10[_0x3f80('0x81')]=qs[_0x3f80('0x9a')](_0x548f7e[_0x3f80('0x23')][_0x3f80('0x9a')]);_0xa3ad10[_0x3f80('0x5e')]=qs[_0x3f80('0x7d')](_[_0x3f80('0x82')](_0x548f7e[_0x3f80('0x23')],_0x1e3227[_0x3f80('0x7d')]));_0xa3ad10[_0x3f80('0x5e')][_0x3f80('0x9b')]=_0x575e96['id'];if(_0x548f7e['query']['filter']){_0xa3ad10['where']=_[_0x3f80('0x35')](_0xa3ad10[_0x3f80('0x5e')],{'$or':_['map'](_0xa3ad10[_0x3f80('0x7f')],function(_0x296742){var _0x127f28={};_0x127f28[_0x296742]={'$like':'%'+_0x548f7e['query'][_0x3f80('0x9c')]+'%'};return _0x127f28;})});}_0xa3ad10=_[_0x3f80('0x35')]({},_0xa3ad10,_0x548f7e[_0x3f80('0x83')]);return db[_0x3f80('0x3f')][_0x3f80('0x16')]({'where':_0xa3ad10[_0x3f80('0x5e')]})[_0x3f80('0x1a')](function(_0x8f6efd){_0x25dee9['count']=_0x8f6efd;if(_0x548f7e[_0x3f80('0x23')]['includeAll']){_0xa3ad10[_0x3f80('0x9d')]=[{'all':!![]}];}return db[_0x3f80('0x3f')][_0x3f80('0x37')](_0xa3ad10);})[_0x3f80('0x1a')](function(_0x2f377f){_0x25dee9['rows']=_0x2f377f;return _0x25dee9;});}})[_0x3f80('0x1a')](respondWithFilteredResult(_0x103cb3,_0xa3ad10))[_0x3f80('0x24')](handleError(_0x103cb3,null));};exports['getHopperHistories']=function(_0x4ef640,_0x4212bc){var _0x1850d9={'raw':!![],'where':{}};var _0xe76b4c={};var _0xd815e2={'count':0x0,'rows':[]};return db['CmContact'][_0x3f80('0x7a')]({'where':{'id':_0x4ef640[_0x3f80('0x26')]['id']}})['then'](handleEntityNotFound(_0x4212bc,null))[_0x3f80('0x1a')](function(_0x47e852){if(_0x47e852){_0xe76b4c[_0x3f80('0x7b')]=_[_0x3f80('0x28')](db[_0x3f80('0x9e')][_0x3f80('0x7c')]);_0xe76b4c[_0x3f80('0x23')]=_[_0x3f80('0x28')](_0x4ef640[_0x3f80('0x23')]);_0xe76b4c['filters']=_[_0x3f80('0x7e')](_0xe76b4c[_0x3f80('0x7b')],_0xe76b4c[_0x3f80('0x23')]);_0x1850d9[_0x3f80('0x7f')]=_['intersection'](_0xe76b4c[_0x3f80('0x7b')],qs[_0x3f80('0x80')](_0x4ef640[_0x3f80('0x23')][_0x3f80('0x80')]));_0x1850d9[_0x3f80('0x7f')]=_0x1850d9[_0x3f80('0x7f')]['length']?_0x1850d9[_0x3f80('0x7f')]:_0xe76b4c[_0x3f80('0x7b')];if(!_0x4ef640[_0x3f80('0x23')][_0x3f80('0x34')](_0x3f80('0x84'))){_0x1850d9['limit']=qs[_0x3f80('0x15')](_0x4ef640[_0x3f80('0x23')][_0x3f80('0x15')]);_0x1850d9[_0x3f80('0x13')]=qs[_0x3f80('0x13')](_0x4ef640[_0x3f80('0x23')][_0x3f80('0x13')]);}_0x1850d9[_0x3f80('0x81')]=qs[_0x3f80('0x9a')](_0x4ef640[_0x3f80('0x23')]['sort']);_0x1850d9[_0x3f80('0x5e')]=qs['filters'](_[_0x3f80('0x82')](_0x4ef640[_0x3f80('0x23')],_0xe76b4c[_0x3f80('0x7d')]));_0x1850d9[_0x3f80('0x5e')]['ContactId']=_0x47e852['id'];if(_0x4ef640[_0x3f80('0x23')]['filter']){_0x1850d9[_0x3f80('0x5e')]=_[_0x3f80('0x35')](_0x1850d9[_0x3f80('0x5e')],{'$or':_[_0x3f80('0x6e')](_0x1850d9['attributes'],function(_0x2a672c){var _0x20925d={};_0x20925d[_0x2a672c]={'$like':'%'+_0x4ef640[_0x3f80('0x23')]['filter']+'%'};return _0x20925d;})});}_0x1850d9=_[_0x3f80('0x35')]({},_0x1850d9,_0x4ef640[_0x3f80('0x83')]);return db[_0x3f80('0x9e')][_0x3f80('0x16')]({'where':_0x1850d9[_0x3f80('0x5e')]})[_0x3f80('0x1a')](function(_0x1f03b7){_0xd815e2[_0x3f80('0x16')]=_0x1f03b7;if(_0x4ef640[_0x3f80('0x23')][_0x3f80('0x9f')]){_0x1850d9[_0x3f80('0x9d')]=[{'all':!![]}];}return db[_0x3f80('0x9e')]['findAll'](_0x1850d9);})[_0x3f80('0x1a')](function(_0xbc9f92){_0xd815e2[_0x3f80('0xa0')]=_0xbc9f92;return _0xd815e2;});}})[_0x3f80('0x1a')](respondWithFilteredResult(_0x4212bc,_0x1850d9))['catch'](handleError(_0x4212bc,null));};exports[_0x3f80('0xa1')]=function(_0x33f631,_0x43f932){var _0x1fb428={'raw':!![],'where':{}};var _0x3ede83={};var _0x1bc80={'count':0x0,'rows':[]};return db['CmContact']['findOne']({'where':{'id':_0x33f631[_0x3f80('0x26')]['id']}})['then'](handleEntityNotFound(_0x43f932,null))[_0x3f80('0x1a')](function(_0x21f4dd){if(_0x21f4dd){_0x3ede83[_0x3f80('0x7b')]=_[_0x3f80('0x28')](db[_0x3f80('0x4e')]['rawAttributes']);_0x3ede83[_0x3f80('0x23')]=_['keys'](_0x33f631['query']);_0x3ede83['filters']=_[_0x3f80('0x7e')](_0x3ede83[_0x3f80('0x7b')],_0x3ede83[_0x3f80('0x23')]);_0x1fb428[_0x3f80('0x7f')]=_['intersection'](_0x3ede83[_0x3f80('0x7b')],qs['fields'](_0x33f631[_0x3f80('0x23')][_0x3f80('0x80')]));_0x1fb428[_0x3f80('0x7f')]=_0x1fb428[_0x3f80('0x7f')][_0x3f80('0x2d')]?_0x1fb428[_0x3f80('0x7f')]:_0x3ede83[_0x3f80('0x7b')];if(!_0x33f631[_0x3f80('0x23')][_0x3f80('0x34')](_0x3f80('0x84'))){_0x1fb428[_0x3f80('0x15')]=qs[_0x3f80('0x15')](_0x33f631[_0x3f80('0x23')]['limit']);_0x1fb428[_0x3f80('0x13')]=qs['offset'](_0x33f631[_0x3f80('0x23')][_0x3f80('0x13')]);}_0x1fb428[_0x3f80('0x81')]=qs['sort'](_0x33f631[_0x3f80('0x23')][_0x3f80('0x9a')]);_0x1fb428[_0x3f80('0x5e')]=qs[_0x3f80('0x7d')](_[_0x3f80('0x82')](_0x33f631[_0x3f80('0x23')],_0x3ede83[_0x3f80('0x7d')]));_0x1fb428[_0x3f80('0x5e')][_0x3f80('0x9b')]=_0x21f4dd['id'];if(_0x33f631[_0x3f80('0x23')]['filter']){_0x1fb428[_0x3f80('0x5e')]=_['merge'](_0x1fb428[_0x3f80('0x5e')],{'$or':_[_0x3f80('0x6e')](_0x1fb428['attributes'],function(_0x30654f){var _0xdf2a0={};_0xdf2a0[_0x30654f]={'$like':'%'+_0x33f631[_0x3f80('0x23')][_0x3f80('0x9c')]+'%'};return _0xdf2a0;})});}_0x1fb428=_[_0x3f80('0x35')]({},_0x1fb428,_0x33f631[_0x3f80('0x83')]);return db[_0x3f80('0x4e')]['count']({'where':_0x1fb428[_0x3f80('0x5e')]})[_0x3f80('0x1a')](function(_0x592d8c){_0x1bc80['count']=_0x592d8c;if(_0x33f631[_0x3f80('0x23')][_0x3f80('0x9f')]){_0x1fb428[_0x3f80('0x9d')]=[{'all':!![]}];}return db[_0x3f80('0x4e')]['findAll'](_0x1fb428);})[_0x3f80('0x1a')](function(_0x4bb636){_0x1bc80[_0x3f80('0xa0')]=_0x4bb636;return _0x1bc80;});}})[_0x3f80('0x1a')](respondWithFilteredResult(_0x43f932,_0x1fb428))[_0x3f80('0x24')](handleError(_0x43f932,null));};exports[_0x3f80('0xa2')]=function(_0x3f302c,_0x37e9f3){var _0x1e26d6={'raw':!![],'where':{}};var _0x47f655={};var _0x5c224d={'count':0x0,'rows':[]};return db[_0x3f80('0x25')]['findOne']({'where':{'id':_0x3f302c[_0x3f80('0x26')]['id']}})[_0x3f80('0x1a')](handleEntityNotFound(_0x37e9f3,null))[_0x3f80('0x1a')](function(_0x5d1105){if(_0x5d1105){_0x47f655[_0x3f80('0x7b')]=_['keys'](db['JscriptySessionReport'][_0x3f80('0x7c')]);_0x47f655[_0x3f80('0x23')]=_[_0x3f80('0x28')](_0x3f302c[_0x3f80('0x23')]);_0x47f655[_0x3f80('0x7d')]=_['intersection'](_0x47f655[_0x3f80('0x7b')],_0x47f655['query']);_0x1e26d6[_0x3f80('0x7f')]=_['intersection'](_0x47f655['model'],qs[_0x3f80('0x80')](_0x3f302c['query'][_0x3f80('0x80')]));_0x1e26d6[_0x3f80('0x7f')]=_0x1e26d6['attributes'][_0x3f80('0x2d')]?_0x1e26d6[_0x3f80('0x7f')]:_0x47f655[_0x3f80('0x7b')];if(!_0x3f302c['query']['hasOwnProperty']('nolimit')){_0x1e26d6[_0x3f80('0x15')]=qs[_0x3f80('0x15')](_0x3f302c['query'][_0x3f80('0x15')]);_0x1e26d6['offset']=qs[_0x3f80('0x13')](_0x3f302c[_0x3f80('0x23')][_0x3f80('0x13')]);}_0x1e26d6['order']=qs['sort'](_0x3f302c['query'][_0x3f80('0x9a')]);_0x1e26d6['where']=qs['filters'](_[_0x3f80('0x82')](_0x3f302c[_0x3f80('0x23')],_0x47f655[_0x3f80('0x7d')]));_0x1e26d6[_0x3f80('0x5e')][_0x3f80('0x9b')]=_0x5d1105['id'];if(_0x3f302c[_0x3f80('0x23')][_0x3f80('0x9c')]){_0x1e26d6[_0x3f80('0x5e')]=_[_0x3f80('0x35')](_0x1e26d6[_0x3f80('0x5e')],{'$or':_[_0x3f80('0x6e')](_0x1e26d6[_0x3f80('0x7f')],function(_0x37d886){var _0x4c2821={};_0x4c2821[_0x37d886]={'$like':'%'+_0x3f302c['query']['filter']+'%'};return _0x4c2821;})});}_0x1e26d6=_['merge']({},_0x1e26d6,_0x3f302c[_0x3f80('0x83')]);return db['JscriptySessionReport']['count']({'where':_0x1e26d6[_0x3f80('0x5e')]})[_0x3f80('0x1a')](function(_0x20fccf){_0x5c224d['count']=_0x20fccf;if(_0x3f302c[_0x3f80('0x23')]['includeAll']){_0x1e26d6['include']=[{'all':!![]}];}return db[_0x3f80('0xa3')][_0x3f80('0x37')](_0x1e26d6);})[_0x3f80('0x1a')](function(_0x332344){_0x5c224d[_0x3f80('0xa0')]=_0x332344;return _0x5c224d;});}})[_0x3f80('0x1a')](respondWithFilteredResult(_0x37e9f3,_0x1e26d6))[_0x3f80('0x24')](handleError(_0x37e9f3,null));};exports[_0x3f80('0xa4')]=function(_0x4ce365,_0x9afe5c){try{if(!_0x4ce365['body']['ListId']){throw new Error('No\x20ListId\x20specified');}if(!_0x4ce365[_0x3f80('0x36')][_0x3f80('0xa5')]){throw new Error(_0x3f80('0xa6'));}if(!_0x4ce365[_0x3f80('0x36')][_0x3f80('0xa7')]){throw new Error(_0x3f80('0xa8'));}if(!_0x4ce365['body'][_0x3f80('0xa9')]){throw new Error('Unable\x20to\x20synchronize\x20socket,\x20no\x20timestamp\x20passed');}var _0x187d6a=_0x4ce365[_0x3f80('0x36')][_0x3f80('0xa5')][_0x3f80('0xaa')](',');var _0x51515c=_0x4ce365[_0x3f80('0x36')][_0x3f80('0xa7')]['split'](',');if(!_0x187d6a[_0x3f80('0x2d')]||!_0x51515c[_0x3f80('0x2d')]||_0x187d6a[_0x3f80('0x2d')]!==_0x51515c['length']){throw new Error(_0x3f80('0xab'));}_0x4ce365['body'][_0x3f80('0x80')]=_['zipObject'](_0x187d6a,_0x51515c);if(!_0x4ce365[_0x3f80('0x36')][_0x3f80('0x80')]['phone']){throw new Error(_0x3f80('0xac'));}if(!_0x4ce365[_0x3f80('0x36')][_0x3f80('0x80')][_0x3f80('0xad')]){throw new Error(_0x3f80('0xae'));}var _0x508f56=path[_0x3f80('0x3b')](config[_0x3f80('0xaf')],_0x3f80('0xb0'),_0x4ce365[_0x3f80('0xb1')][_0x3f80('0xb2')]);fs[_0x3f80('0xb3')](_0x508f56,parseInt(_0x3f80('0xb4'),0x8));var _0x5c5983=require(_0x3f80('0xb5'))[_0x3f80('0xb6')](path[_0x3f80('0x3b')](__dirname,_0x3f80('0xb7')),[_0x508f56,_0x4ce365['body'][_0x3f80('0xa5')],_0x4ce365[_0x3f80('0x36')]['binding_values'],_0x4ce365[_0x3f80('0x36')][_0x3f80('0x61')],_0x4ce365[_0x3f80('0x36')][_0x3f80('0xb8')],_0x4ce365[_0x3f80('0x36')][_0x3f80('0x5d')],_0x4ce365[_0x3f80('0x36')][_0x3f80('0xa9')]]);return _0x9afe5c[_0x3f80('0x17')](0xc8)[_0x3f80('0x12')]({'message':_0x3f80('0xb9'),'pid':_0x5c5983['pid']});}catch(_0xad5638){return _0x9afe5c[_0x3f80('0x17')](0x1f4)[_0x3f80('0x20')](_0xad5638);}};exports[_0x3f80('0xba')]=function(_0x41f8a3,_0x16fa2e){var _0x30c056=fs['createReadStream'](_0x41f8a3[_0x3f80('0xb1')][_0x3f80('0x2')]);Papa[_0x3f80('0xbb')](_0x30c056,{'header':!![],'skipEmptyLines':!![],'preview':0x1,'complete':function(_0x173f18){return _0x16fa2e[_0x3f80('0x17')](0xc8)[_0x3f80('0x12')]({'file':_0x41f8a3[_0x3f80('0xb1')],'fields':_0x173f18[_0x3f80('0xbc')][_0x3f80('0x80')]});}});};exports[_0x3f80('0xbd')]=function(_0x10ef98,_0x58489a){return db['User'][_0x3f80('0x37')]({'raw':!![],'attributes':['id'],'where':{'role':_0x3f80('0xbe')}})[_0x3f80('0x1a')](function(_0x50a5d0){var _0x43a03c=![];if(!_0x10ef98[_0x3f80('0x36')][_0x3f80('0x61')]){throw new Error(_0x3f80('0xbf'));}if(!_0x10ef98['body'][_0x3f80('0xc0')]['phone']){throw new Error(_0x3f80('0xac'));}if(!_0x10ef98['body']['binding'][_0x3f80('0xad')]){throw new Error(_0x3f80('0xae'));}if(!_0x10ef98['body'][_0x3f80('0xa9')]){throw new Error('Unable\x20to\x20synchronize\x20socket,\x20no\x20timestamp\x20passed');}var _0x50245d=require(_0x3f80('0xb5'))[_0x3f80('0xb6')](path[_0x3f80('0x3b')](__dirname,'../../components/import/cm/csv2'),[_0x10ef98['params']['id'],JSON[_0x3f80('0xc1')](_0x10ef98[_0x3f80('0x36')]),JSON[_0x3f80('0xc1')](_0x50a5d0)]);_0x50245d['on']('message',function(){_0x43a03c=!![];return _0x58489a[_0x3f80('0x17')](0xc8)['json']({'message':_0x3f80('0xc2'),'pid':_0x50245d['pid']});});_0x50245d['on']('exit',function(_0x1d922e){if(_0x1d922e&&!_0x43a03c){return _0x58489a[_0x3f80('0x17')](0x1f4)[_0x3f80('0x12')]({'message':_0x3f80('0xc3'),'pid':_0x50245d[_0x3f80('0xc4')]});}});})[_0x3f80('0x24')](handleError(_0x58489a,null));};exports[_0x3f80('0xc5')]=function(_0x4c5a49,_0x219e40){return db[_0x3f80('0xc6')][_0x3f80('0x37')]({'raw':!![],'attributes':['id'],'where':{'role':_0x3f80('0xbe')}})[_0x3f80('0x1a')](function(_0x435c0a){var _0x55b9aa=![];if(!_0x4c5a49[_0x3f80('0x36')][_0x3f80('0x61')]){throw new Error(_0x3f80('0xbf'));}if(!_0x4c5a49[_0x3f80('0x36')][_0x3f80('0xc0')][_0x3f80('0x79')]){throw new Error('No\x20phone\x20column\x20specified');}if(!_0x4c5a49[_0x3f80('0x36')][_0x3f80('0xc0')][_0x3f80('0xad')]){throw new Error('No\x20firstName\x20column\x20specified');}if(!_0x4c5a49[_0x3f80('0x36')][_0x3f80('0xa9')]){throw new Error(_0x3f80('0xc7'));}var _0x62c4a0=require(_0x3f80('0xb5'))[_0x3f80('0xb6')](path[_0x3f80('0x3b')](__dirname,_0x3f80('0xc8')),[_0x4c5a49[_0x3f80('0x26')]['id'],JSON[_0x3f80('0xc1')](_0x4c5a49[_0x3f80('0x36')]),JSON[_0x3f80('0xc1')](_0x435c0a)]);_0x62c4a0['on']('message',function(){_0x55b9aa=!![];return _0x219e40[_0x3f80('0x17')](0xc8)[_0x3f80('0x12')]({'message':_0x3f80('0xc2'),'pid':_0x62c4a0[_0x3f80('0xc4')]});});_0x62c4a0['on'](_0x3f80('0xc9'),function(_0x5063ca){if(_0x5063ca&&!_0x55b9aa){return _0x219e40[_0x3f80('0x17')](0x1f4)[_0x3f80('0x12')]({'message':_0x3f80('0xc3'),'pid':_0x62c4a0[_0x3f80('0xc4')]});}});})['catch'](handleError(_0x219e40,null));};exports['getJourney']=function(_0x37b80e,_0x36c9be){var _0x53a2b5=[_0x3f80('0xca'),_0x3f80('0xcb'),'sms',_0x3f80('0xcc'),_0x3f80('0xcd'),_0x3f80('0xce'),_0x3f80('0xcf')];var _0x1feb32={'offset':0x0,'order':qs[_0x3f80('0x9a')](_0x3f80('0xd0'))},_0x40d0de={'count':0x0,'rows':[]};Promise[_0x3f80('0xd1')]()[_0x3f80('0x1a')](function(){if(_0x37b80e[_0x3f80('0x23')]['channel']){if(!_[_0x3f80('0xd2')](_0x53a2b5,_0x37b80e[_0x3f80('0x23')][_0x3f80('0xd3')]['toLowerCase']())){throw new Error(_0x3f80('0xd4'));}_0x53a2b5=[_0x37b80e[_0x3f80('0x23')][_0x3f80('0xd3')][_0x3f80('0xd5')]()];}if(_0x37b80e[_0x3f80('0x23')][_0x3f80('0xd6')]){try{var _0x3709ad=JSON[_0x3f80('0xbb')](_0x37b80e[_0x3f80('0x23')][_0x3f80('0xd6')]);if(!moment(_0x3709ad[_0x3f80('0x3e')])[_0x3f80('0xd7')]()){throw new Error(_0x3f80('0xd8'));}if(!moment(_0x3709ad['to'])[_0x3f80('0xd7')]()){throw new Error('Invalid\x20date\x20for\x20range\x20to\x20filter');}}catch(_0x1316ba){throw new Error(_0x3f80('0xd9'));}}if(!_0x37b80e['query']['hasOwnProperty'](_0x3f80('0x84'))){_0x1feb32[_0x3f80('0x15')]=qs[_0x3f80('0x15')](_0x37b80e[_0x3f80('0x23')][_0x3f80('0x15')]||0xa);_0x1feb32[_0x3f80('0x13')]=qs['offset'](_0x37b80e[_0x3f80('0x23')][_0x3f80('0x13')]);}var _0x5a9447=_0x53a2b5[_0x3f80('0x6e')](function(_0x13a8f8){if(_0x13a8f8===_0x3f80('0xcf')){var _0x39a055={'attributes':['id','uniqueid',_0x3f80('0x31'),'source',_0x3f80('0xda'),'callerid','starttime','endtime','duration',_0x3f80('0xdb'),_0x3f80('0xdc'),_0x3f80('0xdd'),_0x3f80('0xde'),_0x3f80('0xdf'),_0x3f80('0xe0')],'where':{'ContactId':_0x37b80e[_0x3f80('0x26')]['id']},'include':[{'model':db[_0x3f80('0xc6')],'as':'User','attributes':['id',_0x3f80('0x1f'),'fullname',_0x3f80('0x2f')]}],'order':[['createdAt','DESC']]};if(_0x37b80e[_0x3f80('0x23')][_0x3f80('0xd6')]){_0x39a055[_0x3f80('0x5e')]['createdAt']={'$gte':_0x3709ad['from'],'$lte':_0x3709ad['to']};}return db[_0x3f80('0x4f')]['findAndCountAll'](_0x39a055)[_0x3f80('0x1a')](function(_0x16dc4a){_0x40d0de[_0x3f80('0x16')]+=_0x16dc4a['count'];return _['map'](_0x16dc4a[_0x3f80('0xa0')],function(_0x1d8884){var _0x26ae84=_0x1d8884['get']({'plain':!![]});_0x26ae84[_0x3f80('0xd3')]=_0x13a8f8;if(_0x26ae84['User']){_0x26ae84[_0x3f80('0xc6')]={'id':_0x26ae84['User']['id'],'name':_0x26ae84[_0x3f80('0xc6')][_0x3f80('0x1f')],'fullname':_0x26ae84['User'][_0x3f80('0xe1')],'alias':_0x26ae84[_0x3f80('0xc6')]['alias']};}return _0x26ae84;});});}else{var _0x5d1461=_['startCase'](_0x13a8f8)+(_0x13a8f8===_0x3f80('0xcb')?'Website':_0x3f80('0xe2'));var _0x52f4ab={'attributes':['id','closed',_0x3f80('0xe3'),_0x3f80('0xdc'),_0x3f80('0xdb'),_0x3f80('0xe4'),_0x3f80('0xe5'),_0x3f80('0xe6'),_0x3f80('0xe0'),_0x5d1461+'Id'],'where':{'ContactId':_0x37b80e[_0x3f80('0x26')]['id']},'include':[{'model':db[_0x5d1461],'as':_0x3f80('0xe2'),'attributes':['id',_0x3f80('0x1f'),'key']},{'model':db['User'],'as':_0x3f80('0xe7'),'attributes':['id','name',_0x3f80('0xe1')]},{'model':db[_0x3f80('0x66')],'as':_0x3f80('0x67'),'attributes':['id',_0x3f80('0x1f'),_0x3f80('0xe8')],'through':{'attributes':[]}}],'order':[[_0x3f80('0xdc'),_0x3f80('0xe9')]]};if(_0x37b80e['query'][_0x3f80('0xd6')]){_0x52f4ab['where'][_0x3f80('0xdc')]={'$gte':_0x3709ad['from'],'$lte':_0x3709ad['to']};}switch(_0x13a8f8){case'chat':_0x52f4ab[_0x3f80('0x7f')]['push'](_0x3f80('0xea'),_0x3f80('0xeb'),'customerPort',_0x3f80('0xec'),_0x3f80('0xed'),_0x3f80('0xee'),_0x3f80('0xef'),_0x3f80('0xf0'),'referer');break;case'mail':_0x52f4ab[_0x3f80('0x7f')][_0x3f80('0x60')]('subject',_0x3f80('0xf1'));break;case _0x3f80('0xcc'):_0x52f4ab[_0x3f80('0x7f')]['push'](_0x3f80('0xf2'),'threadId');break;}return db[_['startCase'](_0x13a8f8)+_0x3f80('0xf3')]['findAndCountAll'](_0x52f4ab)[_0x3f80('0x1a')](function(_0x957a12){_0x40d0de[_0x3f80('0x16')]+=_0x957a12[_0x3f80('0x16')];return _[_0x3f80('0x6e')](_0x957a12['rows'],function(_0x532e4e){var _0x275752=_0x532e4e[_0x3f80('0x38')]({'plain':!![]});_0x275752[_0x3f80('0xd3')]=_0x13a8f8;if(_0x275752[_0x3f80('0xe7')]){_0x275752[_0x3f80('0xe7')]={'id':_0x275752[_0x3f80('0xe7')]['id'],'name':_0x275752[_0x3f80('0xe7')][_0x3f80('0x1f')],'fullname':_0x275752[_0x3f80('0xe7')]['fullname']};}return _0x275752;});});}});return Promise[_0x3f80('0x63')](_0x5a9447);})[_0x3f80('0x1a')](function(_0x5e2a50){return _(_0x5e2a50)['flatten']()[_0x3f80('0xf4')]('createdAt')[_0x3f80('0xf5')]()[_0x3f80('0xf6')]();})[_0x3f80('0x1a')](function(_0x49082f){_0x40d0de['rows']=_0x1feb32['limit']?_0x49082f[_0x3f80('0xf7')](_0x1feb32['offset'],_0x1feb32[_0x3f80('0x13')]+_0x1feb32[_0x3f80('0x15')]):_0x49082f;return _0x40d0de;})['then'](respondWithFilteredResult(_0x36c9be,_0x1feb32))[_0x3f80('0x24')](handleError(_0x36c9be,null));}; \ No newline at end of file diff --git a/server/api/cmContact/cmContact.events.js b/server/api/cmContact/cmContact.events.js index bc9dbbe..6680df0 100644 --- a/server/api/cmContact/cmContact.events.js +++ b/server/api/cmContact/cmContact.events.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x2084=['emit','hasOwnProperty','hook','exports','events','../../mysqldb','CmContact','update','remove'];(function(_0x310b26,_0x21eee0){var _0x2e3f46=function(_0xfcc3f7){while(--_0xfcc3f7){_0x310b26['push'](_0x310b26['shift']());}};_0x2e3f46(++_0x21eee0);}(_0x2084,0x148));var _0x4208=function(_0x2d2823,_0x2c1e2f){_0x2d2823=_0x2d2823-0x0;var _0x339a27=_0x2084[_0x2d2823];return _0x339a27;};'use strict';var EventEmitter=require(_0x4208('0x0'));var CmContact=require(_0x4208('0x1'))['db'][_0x4208('0x2')];var CmContactEvents=new EventEmitter();CmContactEvents['setMaxListeners'](0x0);var events={'afterCreate':'save','afterUpdate':_0x4208('0x3'),'afterDestroy':_0x4208('0x4')};function emitEvent(_0x1ae45d){return function(_0x2c8895,_0x1e10e0,_0x2de794){CmContactEvents[_0x4208('0x5')](_0x1ae45d+':'+_0x2c8895['id'],_0x2c8895);CmContactEvents[_0x4208('0x5')](_0x1ae45d,_0x2c8895);_0x2de794(null);};}for(var e in events){if(events[_0x4208('0x6')](e)){var event=events[e];CmContact[_0x4208('0x7')](e,emitEvent(event));}}module[_0x4208('0x8')]=CmContactEvents; \ No newline at end of file +var _0x28ef=['CmContact','setMaxListeners','save','update','hasOwnProperty','hook','exports','../../mysqldb'];(function(_0x310504,_0x26ad95){var _0x5b36d0=function(_0x253f28){while(--_0x253f28){_0x310504['push'](_0x310504['shift']());}};_0x5b36d0(++_0x26ad95);}(_0x28ef,0xb7));var _0xf28e=function(_0x3a623e,_0x351947){_0x3a623e=_0x3a623e-0x0;var _0x46a64b=_0x28ef[_0x3a623e];return _0x46a64b;};'use strict';var EventEmitter=require('events');var CmContact=require(_0xf28e('0x0'))['db'][_0xf28e('0x1')];var CmContactEvents=new EventEmitter();CmContactEvents[_0xf28e('0x2')](0x0);var events={'afterCreate':_0xf28e('0x3'),'afterUpdate':_0xf28e('0x4'),'afterDestroy':'remove'};function emitEvent(_0x1221d9){return function(_0x17626e,_0x1fb007,_0x2f9f30){CmContactEvents['emit'](_0x1221d9+':'+_0x17626e['id'],_0x17626e);CmContactEvents['emit'](_0x1221d9,_0x17626e);_0x2f9f30(null);};}for(var e in events){if(events[_0xf28e('0x5')](e)){var event=events[e];CmContact[_0xf28e('0x6')](e,emitEvent(event));}}module[_0xf28e('0x7')]=CmContactEvents; \ No newline at end of file diff --git a/server/api/cmContact/cmContact.model.js b/server/api/cmContact/cmContact.model.js index 8a0de8b..439dc41 100644 --- a/server/api/cmContact/cmContact.model.js +++ b/server/api/cmContact/cmContact.model.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x392c=['error','cmContact','afterCreate','scheduledat','format','YYYY-MM-DD\x20HH:mm:ss','isNil','VoiceQueue','findOne','then','dialTimezone','utcOffset','ret','CmHopper','cmContact,\x20afterCreate\x20','\x20contact\x20not\x20insert\x20in\x20hopper,\x20check\x20duplicate\x20onlyIfOpen,\x20exist\x20in\x20hopper\x20VoiceQueue\x20','create','ListId','priority','callbackUniqueid','catch','\x20contact\x20not\x20insert\x20in\x20hopper,\x20check\x20duplicate\x20always,\x20exist\x20in\x20hopper\x20VoiceQueue\x20','CmHopperFinal','cmContact,\x20afterCreate,\x20','\x20contact\x20not\x20insert\x20in\x20hopper,\x20check\x20duplicate\x20always,\x20exist\x20in\x20hopperFinal\x20VoiceQueue\x20','inspect','timezones','add','minutes','\x20contact\x20not\x20insert\x20in\x20hopper,\x20check\x20duplicate\x20always,\x20exist\x20in\x20hopper\x20Campaign\x20','\x20contact\x20not\x20insert\x20in\x20hopper,\x20check\x20duplicate\x20always,\x20exist\x20in\x20hopperFinal\x20Campaign\x20','findAll','outbound','CmList','Lists','length','always','onlyIfOpen','BlackLists','CmHopperBlack','cmContact,\x20%s,\x20%s','message','Campaign','List\x20not\x20found','isEmpty','destroy','VoiceQueueId','CampaignId','push','all','[CmContact][afterDestroy][Succesfull]','lodash','util','../../config/logger','moment','bluebird','request-promise','path','rimraf','../../config/environment','../../config/environment/shared','./cmContact.attributes','exports','CmContact','cm_contacts','phone','firstName','lastName','mobile','email','FULLTEXT','utf8mb4_unicode_ci','models','get'];(function(_0x5d6456,_0x58ecc7){var _0x4d66c1=function(_0x4335e3){while(--_0x4335e3){_0x5d6456['push'](_0x5d6456['shift']());}};_0x4d66c1(++_0x58ecc7);}(_0x392c,0xc7));var _0xc392=function(_0x14add3,_0x13ce8d){_0x14add3=_0x14add3-0x0;var _0x4a174f=_0x392c[_0x14add3];return _0x4a174f;};'use strict';var _=require(_0xc392('0x0'));var util=require(_0xc392('0x1'));var logger=require(_0xc392('0x2'))('api');var moment=require(_0xc392('0x3'));var BPromise=require(_0xc392('0x4'));var rp=require(_0xc392('0x5'));var fs=require('fs');var path=require(_0xc392('0x6'));var rimraf=require(_0xc392('0x7'));var config=require(_0xc392('0x8'));var shared=require(_0xc392('0x9'));var attributes=require(_0xc392('0xa'));module[_0xc392('0xb')]=function(_0x234743,_0x2e132a){return _0x234743['define'](_0xc392('0xc'),attributes,{'tableName':_0xc392('0xd'),'paranoid':!![],'indexes':[{'name':_0xc392('0xe'),'fields':[_0xc392('0xe')]},{'name':'fti_cm_contacts','fields':[_0xc392('0xf'),_0xc392('0x10'),_0xc392('0xe'),_0xc392('0x11'),'fax',_0xc392('0x12')],'type':_0xc392('0x13')}],'timestamps':!![],'charset':'utf8mb4','collate':_0xc392('0x14'),'hooks':{'afterCreate':function(_0x29f044,_0x139fb2,_0x3eb9af){var _0x335954=_0x234743[_0xc392('0x15')];var _0xda6638=_0x29f044[_0xc392('0x16')]({'plain':!![]});function _0x1db3dc(){return function(_0x568b79){logger[_0xc392('0x17')](_0xc392('0x18'),_0xc392('0x19'),util['inspect'](_0x568b79,{'showHidden':![],'depth':null}));};}function _0xa68b20(_0x3aa814,_0xb67bcb){var _0x205f99=_0xb67bcb[_0xc392('0x1a')]?_0xb67bcb[_0xc392('0x1a')]:moment()[_0xc392('0x1b')](_0xc392('0x1c'));return new BPromise(function(_0x391794,_0xac7f8b){if(_[_0xc392('0x1d')](_0xb67bcb['dialTimezone'])){_0x391794({'ret':_0x205f99});}else{_0x335954[_0xc392('0x1e')][_0xc392('0x1f')]({'where':{'id':_0x3aa814['id']}})[_0xc392('0x20')](function(_0x2fb138){if(!_[_0xc392('0x1d')](_0x2fb138)){var _0xda0bb3=_0x2fb138[_0xc392('0x21')];if(!_['isNil'](_0xda0bb3)){var _0x22303c=shared['timezones'];var _0x16e0ef=_0x22303c[_0xda0bb3];var _0x1559f0=_0x22303c[_0xb67bcb[_0xc392('0x21')]];if(!_[_0xc392('0x1d')](_0x16e0ef)&&!_['isNil'](_0x1559f0)){var _0xe2ace2=_0x16e0ef[_0xc392('0x22')]-_0x1559f0[_0xc392('0x22')];_0x205f99=_0xb67bcb[_0xc392('0x1a')]?_0xb67bcb[_0xc392('0x1a')]:moment();var _0xd6a6a7=moment(_0x205f99)['add'](_0xe2ace2,'minutes');_0x391794({'ret':_0xd6a6a7['format'](_0xc392('0x1c'))});}else _0x391794({'ret':_0x205f99});}else _0x391794({'ret':_0x205f99});}else{_0x391794({'ret':_0x205f99});}});}});return 0xa;}var _0x455614=function(_0xc715a6){return new BPromise(function(_0x53323b,_0x6dfd07){_0xa68b20(_0xc715a6,_0xda6638)[_0xc392('0x20')](function(_0x29999b){_0xda6638[_0xc392('0x1a')]=_0x29999b[_0xc392('0x23')];_0x335954[_0xc392('0x24')][_0xc392('0x1f')]({'where':{'phone':_0xda6638['phone'],'VoiceQueueId':_0xc715a6['id']}})['then'](function(_0x18a420){if(!_[_0xc392('0x1d')](_0x18a420)){throw new Error(_0xc392('0x25')+_0xda6638[_0xc392('0xe')]+_0xc392('0x26')+_0xc715a6['id']);}return _0x335954[_0xc392('0x24')][_0xc392('0x27')]({'phone':_0xda6638[_0xc392('0xe')],'ContactId':_0xda6638['id'],'ListId':_0xda6638[_0xc392('0x28')],'priority':_0xda6638['priority']?_0xda6638[_0xc392('0x29')]:0x2,'scheduledat':_0xda6638[_0xc392('0x1a')]?_0xda6638[_0xc392('0x1a')]:moment()['format'](_0xc392('0x1c')),'callback':_0xda6638['callbackUniqueid']?!![]:![],'callbackuniqueid':_0xda6638[_0xc392('0x2a')]?_0xda6638[_0xc392('0x2a')]:undefined,'callbackat':_0xda6638['callbackUniqueid']?moment()[_0xc392('0x1b')](_0xc392('0x1c')):undefined,'VoiceQueueId':_0xc715a6['id']});})[_0xc392('0x2b')](function(_0xd345e5){_0x6dfd07(_0xd345e5);});});});};var _0xcc5760=function(_0x51607e){return new BPromise(function(_0x192e15,_0x5d4f2d){_0xa68b20(_0x51607e,_0xda6638)[_0xc392('0x20')](function(_0x245e60){_0xda6638['scheduledat']=_0x245e60[_0xc392('0x23')];_0x335954[_0xc392('0x24')][_0xc392('0x1f')]({'where':{'phone':_0xda6638[_0xc392('0xe')],'VoiceQueueId':_0x51607e['id']}})['then'](function(_0x5f112a){if(!_[_0xc392('0x1d')](_0x5f112a)){throw new Error(_0xc392('0x25')+_0xda6638['phone']+_0xc392('0x2c')+_0x51607e['id']);}return _0x335954[_0xc392('0x2d')][_0xc392('0x1f')]({'where':{'calleridnum':_0xda6638['phone'],'VoiceQueueId':_0x51607e['id']}});})[_0xc392('0x20')](function(_0x5ce304){if(!_[_0xc392('0x1d')](_0x5ce304)){throw new Error(_0xc392('0x2e')+_0xda6638[_0xc392('0xe')]+_0xc392('0x2f')+_0x51607e['id']);}return _0x335954[_0xc392('0x24')][_0xc392('0x27')]({'phone':_0xda6638['phone'],'ContactId':_0xda6638['id'],'ListId':_0xda6638[_0xc392('0x28')],'priority':_0xda6638['priority']?_0xda6638['priority']:0x2,'scheduledat':_0xda6638[_0xc392('0x1a')]?_0xda6638[_0xc392('0x1a')]:moment()[_0xc392('0x1b')](_0xc392('0x1c')),'callback':_0xda6638['callbackUniqueid']?!![]:![],'callbackuniqueid':_0xda6638['callbackUniqueid']?_0xda6638['callbackUniqueid']:undefined,'callbackat':_0xda6638[_0xc392('0x2a')]?moment()[_0xc392('0x1b')]('YYYY-MM-DD\x20HH:mm:ss'):undefined,'VoiceQueueId':_0x51607e['id']});})[_0xc392('0x2b')](function(_0x5616e6){_0x5d4f2d(_0x5616e6);});});});};function _0xa55dae(){return function(_0x8c0278){logger[_0xc392('0x17')](_0xc392('0x18'),_0xc392('0x19'),util[_0xc392('0x30')](_0x8c0278,{'showHidden':![],'depth':null}));};}function _0x1aab7e(_0x1224fa,_0x36e55a){var _0x56ed56=_0x36e55a[_0xc392('0x1a')]?_0x36e55a[_0xc392('0x1a')]:moment()[_0xc392('0x1b')](_0xc392('0x1c'));return new BPromise(function(_0x2bb48e,_0x2a8d76){if(_['isNil'](_0x36e55a[_0xc392('0x21')])){_0x2bb48e({'ret':_0x56ed56});}else{_0x335954['Campaign'][_0xc392('0x1f')]({'where':{'id':_0x1224fa['id']}})[_0xc392('0x20')](function(_0x3e2110){if(!_[_0xc392('0x1d')](_0x3e2110)){var _0x4a0252=_0x3e2110[_0xc392('0x21')];if(!_['isNil'](_0x4a0252)){var _0x543379=shared[_0xc392('0x31')];var _0x5c70f5=_0x543379[_0x4a0252];var _0xb7baf2=_0x543379[_0x36e55a['dialTimezone']];if(!_[_0xc392('0x1d')](_0x5c70f5)&&!_[_0xc392('0x1d')](_0xb7baf2)){var _0x2a85eb=_0x5c70f5['utcOffset']-_0xb7baf2[_0xc392('0x22')];_0x56ed56=_0x36e55a['scheduledat']?_0x36e55a[_0xc392('0x1a')]:moment();var _0x37ce62=moment(_0x56ed56)[_0xc392('0x32')](_0x2a85eb,_0xc392('0x33'));_0x2bb48e({'ret':_0x37ce62[_0xc392('0x1b')]('YYYY-MM-DD\x20HH:mm:ss')});}else _0x2bb48e({'ret':_0x56ed56});}else _0x2bb48e({'ret':_0x56ed56});}else{_0x2bb48e({'ret':_0x56ed56});}});}});return 0xa;}var _0x1f24fe=function(_0x3598b2){return new BPromise(function(_0x14bdff,_0xb99903){_0x1aab7e(_0x3598b2,_0xda6638)[_0xc392('0x20')](function(_0x2580e4){_0xda6638[_0xc392('0x1a')]=_0x2580e4[_0xc392('0x23')];_0x335954[_0xc392('0x24')][_0xc392('0x1f')]({'where':{'phone':_0xda6638[_0xc392('0xe')],'CampaignId':_0x3598b2['id']}})[_0xc392('0x20')](function(_0x4bd122){if(!_[_0xc392('0x1d')](_0x4bd122)){throw new Error('cmContact,\x20afterCreate\x20'+_0xda6638['phone']+'\x20contact\x20not\x20insert\x20in\x20hopper,\x20check\x20duplicate\x20onlyIfOpen,\x20exist\x20in\x20hopper\x20Campaign\x20'+_0x3598b2['id']);}return _0x335954['CmHopper']['create']({'phone':_0xda6638['phone'],'ContactId':_0xda6638['id'],'ListId':_0xda6638['ListId'],'priority':_0xda6638[_0xc392('0x29')]?_0xda6638['priority']:0x2,'scheduledat':_0xda6638['scheduledat']?_0xda6638[_0xc392('0x1a')]:moment()[_0xc392('0x1b')]('YYYY-MM-DD\x20HH:mm:ss'),'callback':_0xda6638[_0xc392('0x2a')]?!![]:![],'callbackuniqueid':_0xda6638[_0xc392('0x2a')]?_0xda6638[_0xc392('0x2a')]:undefined,'callbackat':_0xda6638[_0xc392('0x2a')]?moment()[_0xc392('0x1b')](_0xc392('0x1c')):undefined,'CampaignId':_0x3598b2['id']});})[_0xc392('0x2b')](function(_0x42428d){_0xb99903(_0x42428d);});});});};var _0x506e09=function(_0x1df64c){return new BPromise(function(_0x1a4873,_0x4e37a6){_0x1aab7e(_0x1df64c,_0xda6638)[_0xc392('0x20')](function(_0x1781eb){_0xda6638[_0xc392('0x1a')]=_0x1781eb[_0xc392('0x23')];_0x335954[_0xc392('0x24')][_0xc392('0x1f')]({'where':{'phone':_0xda6638[_0xc392('0xe')],'CampaignId':_0x1df64c['id']}})['then'](function(_0x4216ee){if(!_[_0xc392('0x1d')](_0x4216ee)){throw new Error(_0xc392('0x25')+_0xda6638[_0xc392('0xe')]+_0xc392('0x34')+_0x1df64c['id']);}return _0x335954[_0xc392('0x2d')]['findOne']({'where':{'calleridnum':_0xda6638['phone'],'CampaignId':_0x1df64c['id']}});})['then'](function(_0x29cfb0){if(!_[_0xc392('0x1d')](_0x29cfb0)){throw new Error(_0xc392('0x2e')+_0xda6638[_0xc392('0xe')]+_0xc392('0x35')+_0x1df64c['id']);}return _0x335954['CmHopper'][_0xc392('0x27')]({'phone':_0xda6638[_0xc392('0xe')],'ContactId':_0xda6638['id'],'ListId':_0xda6638[_0xc392('0x28')],'priority':_0xda6638[_0xc392('0x29')]?_0xda6638[_0xc392('0x29')]:0x2,'scheduledat':_0xda6638[_0xc392('0x1a')]?_0xda6638[_0xc392('0x1a')]:moment()[_0xc392('0x1b')](_0xc392('0x1c')),'callback':_0xda6638['callbackUniqueid']?!![]:![],'callbackuniqueid':_0xda6638[_0xc392('0x2a')]?_0xda6638[_0xc392('0x2a')]:undefined,'callbackat':_0xda6638[_0xc392('0x2a')]?moment()[_0xc392('0x1b')]('YYYY-MM-DD\x20HH:mm:ss'):undefined,'CampaignId':_0x1df64c['id']});})[_0xc392('0x2b')](function(_0xa7721a){_0x4e37a6(_0xa7721a);});});});};if(_0xda6638[_0xc392('0x28')]){_0x335954[_0xc392('0x1e')][_0xc392('0x36')]({'where':{'type':_0xc392('0x37')},'attributes':['id','dialCheckDuplicateType',_0xc392('0x21')],'include':[{'model':_0x335954[_0xc392('0x38')],'as':_0xc392('0x39'),'where':{'id':_0xda6638[_0xc392('0x28')]}}]})[_0xc392('0x20')](function(_0x105466){if(_0x105466){var _0x2662a0=[];for(var _0x673dd3=0x0,_0x13d8f6;_0x673dd3<_0x105466[_0xc392('0x3a')];_0x673dd3+=0x1){_0x13d8f6=_0x105466[_0x673dd3]['get']({'plain':!![]});switch(_0x13d8f6['dialCheckDuplicateType']){case _0xc392('0x3b'):_0xcc5760(_0x13d8f6)['catch'](_0x1db3dc());break;case _0xc392('0x3c'):_0x455614(_0x13d8f6)[_0xc392('0x2b')](_0x1db3dc());break;default:_0x1aab7e(_0x13d8f6,_0xda6638)[_0xc392('0x20')](function(_0x3fc2e4){_0xda6638['scheduledat']=_0x3fc2e4[_0xc392('0x23')];_0x335954[_0xc392('0x24')][_0xc392('0x27')]({'phone':_0xda6638[_0xc392('0xe')],'ContactId':_0xda6638['id'],'ListId':_0xda6638['ListId'],'scheduledat':_0xda6638[_0xc392('0x1a')]?_0xda6638[_0xc392('0x1a')]:moment()[_0xc392('0x1b')]('YYYY-MM-DD\x20HH:mm:ss'),'priority':_0xda6638[_0xc392('0x29')]?_0xda6638[_0xc392('0x29')]:0x2,'callback':_0xda6638[_0xc392('0x2a')]?!![]:![],'callbackuniqueid':_0xda6638[_0xc392('0x2a')]?_0xda6638[_0xc392('0x2a')]:undefined,'callbackat':_0xda6638[_0xc392('0x2a')]?moment()[_0xc392('0x1b')](_0xc392('0x1c')):undefined,'VoiceQueueId':_0x13d8f6['id']})[_0xc392('0x2b')](_0x1db3dc());});}}}})['then'](function(){return _0x335954[_0xc392('0x1e')][_0xc392('0x36')]({'where':{'type':_0xc392('0x37')},'attributes':['id'],'include':[{'model':_0x335954[_0xc392('0x38')],'as':_0xc392('0x3d'),'where':{'id':_0xda6638['ListId']}}]})[_0xc392('0x20')](function(_0x2212ce){if(_0x2212ce){var _0x38ffee=[];for(var _0x35f911=0x0,_0x5653b0;_0x35f911<_0x2212ce[_0xc392('0x3a')];_0x35f911+=0x1){_0x5653b0=_0x2212ce[_0x35f911][_0xc392('0x16')]({'plain':!![]});_0x335954[_0xc392('0x3e')][_0xc392('0x27')]({'phone':_0xda6638[_0xc392('0xe')],'ContactId':_0xda6638['id'],'ListId':_0xda6638[_0xc392('0x28')],'VoiceQueueId':_0x5653b0['id']})[_0xc392('0x2b')](function(_0x13b543){logger[_0xc392('0x17')](_0xc392('0x3f'),_0xc392('0x19'),_0x13b543[_0xc392('0x40')]);});}}});})[_0xc392('0x20')](function(){return _0x335954[_0xc392('0x41')]['findAll']({'attributes':['id','dialCheckDuplicateType',_0xc392('0x21')],'include':[{'model':_0x335954[_0xc392('0x38')],'as':_0xc392('0x39'),'where':{'id':_0xda6638[_0xc392('0x28')]}}]})[_0xc392('0x20')](function(_0x22cb6a){if(_0x22cb6a){var _0x26220f=[];for(var _0x20c584=0x0,_0x496545;_0x20c584<_0x22cb6a[_0xc392('0x3a')];_0x20c584+=0x1){_0x496545=_0x22cb6a[_0x20c584][_0xc392('0x16')]({'plain':!![]});switch(_0x496545['dialCheckDuplicateType']){case'always':_0x506e09(_0x496545)[_0xc392('0x2b')](_0xa55dae());break;case'onlyIfOpen':_0x1f24fe(_0x496545)[_0xc392('0x2b')](_0xa55dae());break;default:_0x335954[_0xc392('0x24')][_0xc392('0x27')]({'phone':_0xda6638[_0xc392('0xe')],'ContactId':_0xda6638['id'],'ListId':_0xda6638[_0xc392('0x28')],'scheduledat':_0xda6638['scheduledat']?_0xda6638[_0xc392('0x1a')]:moment()['format'](_0xc392('0x1c')),'priority':_0xda6638['priority']?_0xda6638[_0xc392('0x29')]:0x2,'callback':_0xda6638[_0xc392('0x2a')]?!![]:![],'callbackuniqueid':_0xda6638[_0xc392('0x2a')]?_0xda6638[_0xc392('0x2a')]:undefined,'callbackat':_0xda6638[_0xc392('0x2a')]?moment()[_0xc392('0x1b')](_0xc392('0x1c')):undefined,'CampaignId':_0x496545['id']})[_0xc392('0x2b')](_0xa55dae());}}}});})[_0xc392('0x20')](function(){return _0x335954[_0xc392('0x41')][_0xc392('0x36')]({'attributes':['id'],'include':[{'model':_0x335954[_0xc392('0x38')],'as':'BlackLists','where':{'id':_0xda6638[_0xc392('0x28')]}}]})[_0xc392('0x20')](function(_0x308a87){if(_0x308a87){var _0x16984c=[];for(var _0x11fdc3=0x0,_0x312664;_0x11fdc3<_0x308a87[_0xc392('0x3a')];_0x11fdc3+=0x1){_0x312664=_0x308a87[_0x11fdc3][_0xc392('0x16')]({'plain':!![]});_0x335954['CmHopperBlack'][_0xc392('0x27')]({'phone':_0xda6638[_0xc392('0xe')],'ContactId':_0xda6638['id'],'ListId':_0xda6638[_0xc392('0x28')],'CampaignId':_0x312664['id']})[_0xc392('0x2b')](function(_0x4d7469){logger[_0xc392('0x17')](_0xc392('0x3f'),_0xc392('0x19'),_0x4d7469['message']);});}}});})[_0xc392('0x20')](function(){_0x3eb9af();})[_0xc392('0x2b')](function(_0x326a07){logger['error'](_0xc392('0x3f'),_0xc392('0x19'),_0x326a07[_0xc392('0x40')]);_0x3eb9af(_0x326a07);});}else{_0x3eb9af(new Error(_0xc392('0x42')));}},'afterDestroy':function(_0x587e4b,_0x3231e2,_0x3f176d){var _0x2b0311=_0x234743[_0xc392('0x15')];var _0x4d6379=_0x587e4b[_0xc392('0x16')]({'plain':!![]});return _0x2b0311['CmHopper']['findAll']({'raw':!![],'where':{'ListId':_0x4d6379[_0xc392('0x28')],'ContactId':_0x4d6379['id']}})[_0xc392('0x20')](function(_0x4f0783){if(!_[_0xc392('0x43')](_0x4f0783)){var _0x1a71cf=[];for(var _0x5115aa=0x0;_0x5115aa<_0x4f0783[_0xc392('0x3a')];_0x5115aa+=0x1){var _0x1f07bf=_0x2b0311[_0xc392('0x24')][_0xc392('0x44')]({'where':{'ListId':_0x4f0783[_0x5115aa][_0xc392('0x28')],'ContactId':_0x4f0783[_0x5115aa]['ContactId'],'VoiceQueueId':_0x4f0783[_0x5115aa][_0xc392('0x45')],'CampaignId':_0x4f0783[_0x5115aa][_0xc392('0x46')]}});_0x1a71cf[_0xc392('0x47')](_0x1f07bf);}return BPromise[_0xc392('0x48')](_0x1a71cf);}})[_0xc392('0x20')](function(_0x271257){logger['info'](_0xc392('0x49'),util[_0xc392('0x30')](_0x271257,{'showHidden':![],'depth':null}));_0x3f176d();})[_0xc392('0x2b')](function(_0x2d1e09){logger['error']('[CmContact][afterDestroy][Error]',util[_0xc392('0x30')](_0x2d1e09,{'showHidden':![],'depth':null}));_0x3f176d(_0x2d1e09);});}}});}; \ No newline at end of file +var _0xc0a6=['length','isEmpty','ContactId','push','all','info','[CmContact][afterDestroy][Succesfull]','[CmContact][afterDestroy][Error]','lodash','util','../../config/logger','api','moment','request-promise','path','rimraf','../../config/environment','../../config/environment/shared','./cmContact.attributes','define','CmContact','phone','fti_cm_contacts','firstName','lastName','mobile','fax','utf8mb4','utf8mb4_unicode_ci','models','error','cmContact','inspect','scheduledat','format','YYYY-MM-DD\x20HH:mm:ss','isNil','dialTimezone','VoiceQueue','findOne','then','timezones','utcOffset','minutes','ret','CmHopper','cmContact,\x20afterCreate\x20','\x20contact\x20not\x20insert\x20in\x20hopper,\x20check\x20duplicate\x20onlyIfOpen,\x20exist\x20in\x20hopper\x20VoiceQueue\x20','create','ListId','priority','callbackUniqueid','catch','\x20contact\x20not\x20insert\x20in\x20hopper,\x20check\x20duplicate\x20always,\x20exist\x20in\x20hopper\x20VoiceQueue\x20','CmHopperFinal','cmContact,\x20afterCreate,\x20','\x20contact\x20not\x20insert\x20in\x20hopper,\x20check\x20duplicate\x20always,\x20exist\x20in\x20hopperFinal\x20VoiceQueue\x20','afterCreate','Campaign','add','\x20contact\x20not\x20insert\x20in\x20hopper,\x20check\x20duplicate\x20onlyIfOpen,\x20exist\x20in\x20hopper\x20Campaign\x20','\x20contact\x20not\x20insert\x20in\x20hopper,\x20check\x20duplicate\x20always,\x20exist\x20in\x20hopper\x20Campaign\x20','\x20contact\x20not\x20insert\x20in\x20hopper,\x20check\x20duplicate\x20always,\x20exist\x20in\x20hopperFinal\x20Campaign\x20','findAll','dialCheckDuplicateType','get','onlyIfOpen','outbound','CmHopperBlack','cmContact,\x20%s,\x20%s','message','CmList','Lists','always','BlackLists'];(function(_0x19b351,_0x547358){var _0x104803=function(_0x412161){while(--_0x412161){_0x19b351['push'](_0x19b351['shift']());}};_0x104803(++_0x547358);}(_0xc0a6,0xe9));var _0x6c0a=function(_0x209fcd,_0x1ecccc){_0x209fcd=_0x209fcd-0x0;var _0x501d5e=_0xc0a6[_0x209fcd];return _0x501d5e;};'use strict';var _=require(_0x6c0a('0x0'));var util=require(_0x6c0a('0x1'));var logger=require(_0x6c0a('0x2'))(_0x6c0a('0x3'));var moment=require(_0x6c0a('0x4'));var BPromise=require('bluebird');var rp=require(_0x6c0a('0x5'));var fs=require('fs');var path=require(_0x6c0a('0x6'));var rimraf=require(_0x6c0a('0x7'));var config=require(_0x6c0a('0x8'));var shared=require(_0x6c0a('0x9'));var attributes=require(_0x6c0a('0xa'));module['exports']=function(_0x48d823,_0x108e71){return _0x48d823[_0x6c0a('0xb')](_0x6c0a('0xc'),attributes,{'tableName':'cm_contacts','paranoid':!![],'indexes':[{'name':_0x6c0a('0xd'),'fields':[_0x6c0a('0xd')]},{'name':_0x6c0a('0xe'),'fields':[_0x6c0a('0xf'),_0x6c0a('0x10'),_0x6c0a('0xd'),_0x6c0a('0x11'),_0x6c0a('0x12'),'email'],'type':'FULLTEXT'}],'timestamps':!![],'charset':_0x6c0a('0x13'),'collate':_0x6c0a('0x14'),'hooks':{'afterCreate':function(_0x12cb59,_0x1736ed,_0x540413){var _0x559a5c=_0x48d823[_0x6c0a('0x15')];var _0x2b240a=_0x12cb59['get']({'plain':!![]});function _0x2dd149(){return function(_0x376d72){logger[_0x6c0a('0x16')](_0x6c0a('0x17'),'afterCreate',util[_0x6c0a('0x18')](_0x376d72,{'showHidden':![],'depth':null}));};}function _0x1c174e(_0x25c476,_0x16addf){var _0xf87a51=_0x16addf[_0x6c0a('0x19')]?_0x16addf[_0x6c0a('0x19')]:moment()[_0x6c0a('0x1a')](_0x6c0a('0x1b'));return new BPromise(function(_0x1f3554,_0x31bf71){if(_[_0x6c0a('0x1c')](_0x16addf[_0x6c0a('0x1d')])){_0x1f3554({'ret':_0xf87a51});}else{_0x559a5c[_0x6c0a('0x1e')][_0x6c0a('0x1f')]({'where':{'id':_0x25c476['id']}})[_0x6c0a('0x20')](function(_0x29a120){if(!_[_0x6c0a('0x1c')](_0x29a120)){var _0x13f893=_0x29a120[_0x6c0a('0x1d')];if(!_[_0x6c0a('0x1c')](_0x13f893)){var _0x377ce1=shared[_0x6c0a('0x21')];var _0x39eb25=_0x377ce1[_0x13f893];var _0x357987=_0x377ce1[_0x16addf[_0x6c0a('0x1d')]];if(!_[_0x6c0a('0x1c')](_0x39eb25)&&!_[_0x6c0a('0x1c')](_0x357987)){var _0x5e2fc0=_0x39eb25['utcOffset']-_0x357987[_0x6c0a('0x22')];_0xf87a51=_0x16addf[_0x6c0a('0x19')]?_0x16addf[_0x6c0a('0x19')]:moment();var _0x529f58=moment(_0xf87a51)['add'](_0x5e2fc0,_0x6c0a('0x23'));_0x1f3554({'ret':_0x529f58['format']('YYYY-MM-DD\x20HH:mm:ss')});}else _0x1f3554({'ret':_0xf87a51});}else _0x1f3554({'ret':_0xf87a51});}else{_0x1f3554({'ret':_0xf87a51});}});}});return 0xa;}var _0x77b714=function(_0x3f02b1){return new BPromise(function(_0x328176,_0x25c2ef){_0x1c174e(_0x3f02b1,_0x2b240a)[_0x6c0a('0x20')](function(_0x5c34c3){_0x2b240a[_0x6c0a('0x19')]=_0x5c34c3[_0x6c0a('0x24')];_0x559a5c[_0x6c0a('0x25')][_0x6c0a('0x1f')]({'where':{'phone':_0x2b240a[_0x6c0a('0xd')],'VoiceQueueId':_0x3f02b1['id']}})[_0x6c0a('0x20')](function(_0x345673){if(!_[_0x6c0a('0x1c')](_0x345673)){throw new Error(_0x6c0a('0x26')+_0x2b240a[_0x6c0a('0xd')]+_0x6c0a('0x27')+_0x3f02b1['id']);}return _0x559a5c['CmHopper'][_0x6c0a('0x28')]({'phone':_0x2b240a[_0x6c0a('0xd')],'ContactId':_0x2b240a['id'],'ListId':_0x2b240a[_0x6c0a('0x29')],'priority':_0x2b240a[_0x6c0a('0x2a')]?_0x2b240a[_0x6c0a('0x2a')]:0x2,'scheduledat':_0x2b240a['scheduledat']?_0x2b240a[_0x6c0a('0x19')]:moment()[_0x6c0a('0x1a')](_0x6c0a('0x1b')),'callback':_0x2b240a[_0x6c0a('0x2b')]?!![]:![],'callbackuniqueid':_0x2b240a[_0x6c0a('0x2b')]?_0x2b240a[_0x6c0a('0x2b')]:undefined,'callbackat':_0x2b240a[_0x6c0a('0x2b')]?moment()['format']('YYYY-MM-DD\x20HH:mm:ss'):undefined,'VoiceQueueId':_0x3f02b1['id']});})[_0x6c0a('0x2c')](function(_0x1d4b93){_0x25c2ef(_0x1d4b93);});});});};var _0x491589=function(_0x241a88){return new BPromise(function(_0x4822c3,_0x72ddb6){_0x1c174e(_0x241a88,_0x2b240a)[_0x6c0a('0x20')](function(_0x4963cf){_0x2b240a['scheduledat']=_0x4963cf[_0x6c0a('0x24')];_0x559a5c[_0x6c0a('0x25')][_0x6c0a('0x1f')]({'where':{'phone':_0x2b240a[_0x6c0a('0xd')],'VoiceQueueId':_0x241a88['id']}})['then'](function(_0x2597ba){if(!_['isNil'](_0x2597ba)){throw new Error('cmContact,\x20afterCreate\x20'+_0x2b240a[_0x6c0a('0xd')]+_0x6c0a('0x2d')+_0x241a88['id']);}return _0x559a5c[_0x6c0a('0x2e')]['findOne']({'where':{'calleridnum':_0x2b240a[_0x6c0a('0xd')],'VoiceQueueId':_0x241a88['id']}});})[_0x6c0a('0x20')](function(_0x12f37b){if(!_[_0x6c0a('0x1c')](_0x12f37b)){throw new Error(_0x6c0a('0x2f')+_0x2b240a['phone']+_0x6c0a('0x30')+_0x241a88['id']);}return _0x559a5c['CmHopper'][_0x6c0a('0x28')]({'phone':_0x2b240a[_0x6c0a('0xd')],'ContactId':_0x2b240a['id'],'ListId':_0x2b240a['ListId'],'priority':_0x2b240a['priority']?_0x2b240a['priority']:0x2,'scheduledat':_0x2b240a['scheduledat']?_0x2b240a[_0x6c0a('0x19')]:moment()[_0x6c0a('0x1a')](_0x6c0a('0x1b')),'callback':_0x2b240a[_0x6c0a('0x2b')]?!![]:![],'callbackuniqueid':_0x2b240a[_0x6c0a('0x2b')]?_0x2b240a[_0x6c0a('0x2b')]:undefined,'callbackat':_0x2b240a[_0x6c0a('0x2b')]?moment()[_0x6c0a('0x1a')](_0x6c0a('0x1b')):undefined,'VoiceQueueId':_0x241a88['id']});})[_0x6c0a('0x2c')](function(_0x446271){_0x72ddb6(_0x446271);});});});};function _0x4b083e(){return function(_0x25efc0){logger[_0x6c0a('0x16')](_0x6c0a('0x17'),_0x6c0a('0x31'),util[_0x6c0a('0x18')](_0x25efc0,{'showHidden':![],'depth':null}));};}function _0x24441d(_0x2cd010,_0x553f0f){var _0x639f65=_0x553f0f[_0x6c0a('0x19')]?_0x553f0f[_0x6c0a('0x19')]:moment()['format'](_0x6c0a('0x1b'));return new BPromise(function(_0x4dfde9,_0x4278ea){if(_['isNil'](_0x553f0f[_0x6c0a('0x1d')])){_0x4dfde9({'ret':_0x639f65});}else{_0x559a5c[_0x6c0a('0x32')][_0x6c0a('0x1f')]({'where':{'id':_0x2cd010['id']}})[_0x6c0a('0x20')](function(_0x35321d){if(!_['isNil'](_0x35321d)){var _0xab65b2=_0x35321d[_0x6c0a('0x1d')];if(!_[_0x6c0a('0x1c')](_0xab65b2)){var _0x334217=shared[_0x6c0a('0x21')];var _0x3677a5=_0x334217[_0xab65b2];var _0x3d820a=_0x334217[_0x553f0f[_0x6c0a('0x1d')]];if(!_[_0x6c0a('0x1c')](_0x3677a5)&&!_['isNil'](_0x3d820a)){var _0x4e2a3c=_0x3677a5[_0x6c0a('0x22')]-_0x3d820a[_0x6c0a('0x22')];_0x639f65=_0x553f0f['scheduledat']?_0x553f0f[_0x6c0a('0x19')]:moment();var _0x5b3380=moment(_0x639f65)[_0x6c0a('0x33')](_0x4e2a3c,_0x6c0a('0x23'));_0x4dfde9({'ret':_0x5b3380[_0x6c0a('0x1a')](_0x6c0a('0x1b'))});}else _0x4dfde9({'ret':_0x639f65});}else _0x4dfde9({'ret':_0x639f65});}else{_0x4dfde9({'ret':_0x639f65});}});}});return 0xa;}var _0x2602da=function(_0x4a6dd8){return new BPromise(function(_0x4d0d74,_0xaabfff){_0x24441d(_0x4a6dd8,_0x2b240a)['then'](function(_0x215f4a){_0x2b240a['scheduledat']=_0x215f4a['ret'];_0x559a5c[_0x6c0a('0x25')][_0x6c0a('0x1f')]({'where':{'phone':_0x2b240a[_0x6c0a('0xd')],'CampaignId':_0x4a6dd8['id']}})[_0x6c0a('0x20')](function(_0x4cdfab){if(!_['isNil'](_0x4cdfab)){throw new Error(_0x6c0a('0x26')+_0x2b240a[_0x6c0a('0xd')]+_0x6c0a('0x34')+_0x4a6dd8['id']);}return _0x559a5c[_0x6c0a('0x25')]['create']({'phone':_0x2b240a[_0x6c0a('0xd')],'ContactId':_0x2b240a['id'],'ListId':_0x2b240a['ListId'],'priority':_0x2b240a[_0x6c0a('0x2a')]?_0x2b240a[_0x6c0a('0x2a')]:0x2,'scheduledat':_0x2b240a['scheduledat']?_0x2b240a[_0x6c0a('0x19')]:moment()[_0x6c0a('0x1a')](_0x6c0a('0x1b')),'callback':_0x2b240a[_0x6c0a('0x2b')]?!![]:![],'callbackuniqueid':_0x2b240a[_0x6c0a('0x2b')]?_0x2b240a['callbackUniqueid']:undefined,'callbackat':_0x2b240a[_0x6c0a('0x2b')]?moment()['format'](_0x6c0a('0x1b')):undefined,'CampaignId':_0x4a6dd8['id']});})[_0x6c0a('0x2c')](function(_0x8a163b){_0xaabfff(_0x8a163b);});});});};var _0x3025e5=function(_0x258653){return new BPromise(function(_0xcad7a6,_0x4595ea){_0x24441d(_0x258653,_0x2b240a)[_0x6c0a('0x20')](function(_0x5d0574){_0x2b240a[_0x6c0a('0x19')]=_0x5d0574[_0x6c0a('0x24')];_0x559a5c[_0x6c0a('0x25')][_0x6c0a('0x1f')]({'where':{'phone':_0x2b240a[_0x6c0a('0xd')],'CampaignId':_0x258653['id']}})['then'](function(_0x4c8b82){if(!_[_0x6c0a('0x1c')](_0x4c8b82)){throw new Error(_0x6c0a('0x26')+_0x2b240a[_0x6c0a('0xd')]+_0x6c0a('0x35')+_0x258653['id']);}return _0x559a5c[_0x6c0a('0x2e')]['findOne']({'where':{'calleridnum':_0x2b240a['phone'],'CampaignId':_0x258653['id']}});})[_0x6c0a('0x20')](function(_0x3b1b0f){if(!_[_0x6c0a('0x1c')](_0x3b1b0f)){throw new Error('cmContact,\x20afterCreate,\x20'+_0x2b240a['phone']+_0x6c0a('0x36')+_0x258653['id']);}return _0x559a5c[_0x6c0a('0x25')][_0x6c0a('0x28')]({'phone':_0x2b240a['phone'],'ContactId':_0x2b240a['id'],'ListId':_0x2b240a[_0x6c0a('0x29')],'priority':_0x2b240a['priority']?_0x2b240a[_0x6c0a('0x2a')]:0x2,'scheduledat':_0x2b240a[_0x6c0a('0x19')]?_0x2b240a[_0x6c0a('0x19')]:moment()[_0x6c0a('0x1a')](_0x6c0a('0x1b')),'callback':_0x2b240a['callbackUniqueid']?!![]:![],'callbackuniqueid':_0x2b240a[_0x6c0a('0x2b')]?_0x2b240a['callbackUniqueid']:undefined,'callbackat':_0x2b240a[_0x6c0a('0x2b')]?moment()[_0x6c0a('0x1a')](_0x6c0a('0x1b')):undefined,'CampaignId':_0x258653['id']});})[_0x6c0a('0x2c')](function(_0x3f2cd5){_0x4595ea(_0x3f2cd5);});});});};if(_0x2b240a[_0x6c0a('0x29')]){_0x559a5c[_0x6c0a('0x1e')][_0x6c0a('0x37')]({'where':{'type':'outbound'},'attributes':['id',_0x6c0a('0x38'),_0x6c0a('0x1d')],'include':[{'model':_0x559a5c['CmList'],'as':'Lists','where':{'id':_0x2b240a['ListId']}}]})[_0x6c0a('0x20')](function(_0x5515fc){if(_0x5515fc){var _0x22ad29=[];for(var _0x24090c=0x0,_0x35faea;_0x24090c<_0x5515fc['length'];_0x24090c+=0x1){_0x35faea=_0x5515fc[_0x24090c][_0x6c0a('0x39')]({'plain':!![]});switch(_0x35faea[_0x6c0a('0x38')]){case'always':_0x491589(_0x35faea)[_0x6c0a('0x2c')](_0x2dd149());break;case _0x6c0a('0x3a'):_0x77b714(_0x35faea)[_0x6c0a('0x2c')](_0x2dd149());break;default:_0x24441d(_0x35faea,_0x2b240a)['then'](function(_0x25851c){_0x2b240a[_0x6c0a('0x19')]=_0x25851c[_0x6c0a('0x24')];_0x559a5c[_0x6c0a('0x25')][_0x6c0a('0x28')]({'phone':_0x2b240a[_0x6c0a('0xd')],'ContactId':_0x2b240a['id'],'ListId':_0x2b240a[_0x6c0a('0x29')],'scheduledat':_0x2b240a[_0x6c0a('0x19')]?_0x2b240a[_0x6c0a('0x19')]:moment()['format'](_0x6c0a('0x1b')),'priority':_0x2b240a[_0x6c0a('0x2a')]?_0x2b240a[_0x6c0a('0x2a')]:0x2,'callback':_0x2b240a[_0x6c0a('0x2b')]?!![]:![],'callbackuniqueid':_0x2b240a[_0x6c0a('0x2b')]?_0x2b240a[_0x6c0a('0x2b')]:undefined,'callbackat':_0x2b240a[_0x6c0a('0x2b')]?moment()['format'](_0x6c0a('0x1b')):undefined,'VoiceQueueId':_0x35faea['id']})[_0x6c0a('0x2c')](_0x2dd149());});}}}})[_0x6c0a('0x20')](function(){return _0x559a5c['VoiceQueue']['findAll']({'where':{'type':_0x6c0a('0x3b')},'attributes':['id'],'include':[{'model':_0x559a5c['CmList'],'as':'BlackLists','where':{'id':_0x2b240a['ListId']}}]})[_0x6c0a('0x20')](function(_0x1e9178){if(_0x1e9178){var _0x570c0b=[];for(var _0x5a29ab=0x0,_0x2f0cd5;_0x5a29ab<_0x1e9178['length'];_0x5a29ab+=0x1){_0x2f0cd5=_0x1e9178[_0x5a29ab][_0x6c0a('0x39')]({'plain':!![]});_0x559a5c[_0x6c0a('0x3c')][_0x6c0a('0x28')]({'phone':_0x2b240a[_0x6c0a('0xd')],'ContactId':_0x2b240a['id'],'ListId':_0x2b240a['ListId'],'VoiceQueueId':_0x2f0cd5['id']})['catch'](function(_0x1238dc){logger[_0x6c0a('0x16')](_0x6c0a('0x3d'),_0x6c0a('0x31'),_0x1238dc[_0x6c0a('0x3e')]);});}}});})[_0x6c0a('0x20')](function(){return _0x559a5c[_0x6c0a('0x32')][_0x6c0a('0x37')]({'attributes':['id',_0x6c0a('0x38'),'dialTimezone'],'include':[{'model':_0x559a5c[_0x6c0a('0x3f')],'as':_0x6c0a('0x40'),'where':{'id':_0x2b240a[_0x6c0a('0x29')]}}]})[_0x6c0a('0x20')](function(_0x42557a){if(_0x42557a){var _0x6db3a2=[];for(var _0x2d4ba8=0x0,_0x3709e8;_0x2d4ba8<_0x42557a['length'];_0x2d4ba8+=0x1){_0x3709e8=_0x42557a[_0x2d4ba8]['get']({'plain':!![]});switch(_0x3709e8[_0x6c0a('0x38')]){case _0x6c0a('0x41'):_0x3025e5(_0x3709e8)[_0x6c0a('0x2c')](_0x4b083e());break;case _0x6c0a('0x3a'):_0x2602da(_0x3709e8)['catch'](_0x4b083e());break;default:_0x559a5c[_0x6c0a('0x25')][_0x6c0a('0x28')]({'phone':_0x2b240a[_0x6c0a('0xd')],'ContactId':_0x2b240a['id'],'ListId':_0x2b240a[_0x6c0a('0x29')],'scheduledat':_0x2b240a[_0x6c0a('0x19')]?_0x2b240a[_0x6c0a('0x19')]:moment()[_0x6c0a('0x1a')](_0x6c0a('0x1b')),'priority':_0x2b240a[_0x6c0a('0x2a')]?_0x2b240a[_0x6c0a('0x2a')]:0x2,'callback':_0x2b240a[_0x6c0a('0x2b')]?!![]:![],'callbackuniqueid':_0x2b240a[_0x6c0a('0x2b')]?_0x2b240a[_0x6c0a('0x2b')]:undefined,'callbackat':_0x2b240a[_0x6c0a('0x2b')]?moment()[_0x6c0a('0x1a')](_0x6c0a('0x1b')):undefined,'CampaignId':_0x3709e8['id']})[_0x6c0a('0x2c')](_0x4b083e());}}}});})[_0x6c0a('0x20')](function(){return _0x559a5c[_0x6c0a('0x32')]['findAll']({'attributes':['id'],'include':[{'model':_0x559a5c['CmList'],'as':_0x6c0a('0x42'),'where':{'id':_0x2b240a[_0x6c0a('0x29')]}}]})[_0x6c0a('0x20')](function(_0x4f5ac4){if(_0x4f5ac4){var _0x5ccf72=[];for(var _0x10abed=0x0,_0x2ff7ef;_0x10abed<_0x4f5ac4[_0x6c0a('0x43')];_0x10abed+=0x1){_0x2ff7ef=_0x4f5ac4[_0x10abed]['get']({'plain':!![]});_0x559a5c[_0x6c0a('0x3c')][_0x6c0a('0x28')]({'phone':_0x2b240a['phone'],'ContactId':_0x2b240a['id'],'ListId':_0x2b240a[_0x6c0a('0x29')],'CampaignId':_0x2ff7ef['id']})[_0x6c0a('0x2c')](function(_0x28a0e1){logger['error'](_0x6c0a('0x3d'),_0x6c0a('0x31'),_0x28a0e1[_0x6c0a('0x3e')]);});}}});})[_0x6c0a('0x20')](function(){_0x540413();})[_0x6c0a('0x2c')](function(_0x4978b1){logger[_0x6c0a('0x16')](_0x6c0a('0x3d'),_0x6c0a('0x31'),_0x4978b1[_0x6c0a('0x3e')]);_0x540413(_0x4978b1);});}else{_0x540413(new Error('List\x20not\x20found'));}},'afterDestroy':function(_0x328350,_0x24f1df,_0x3400aa){var _0x2aab55=_0x48d823[_0x6c0a('0x15')];var _0x596f08=_0x328350[_0x6c0a('0x39')]({'plain':!![]});return _0x2aab55['CmHopper'][_0x6c0a('0x37')]({'raw':!![],'where':{'ListId':_0x596f08[_0x6c0a('0x29')],'ContactId':_0x596f08['id']}})[_0x6c0a('0x20')](function(_0x5e5e89){if(!_[_0x6c0a('0x44')](_0x5e5e89)){var _0x22cacb=[];for(var _0x3617c1=0x0;_0x3617c1<_0x5e5e89[_0x6c0a('0x43')];_0x3617c1+=0x1){var _0xcbddc4=_0x2aab55[_0x6c0a('0x25')]['destroy']({'where':{'ListId':_0x5e5e89[_0x3617c1][_0x6c0a('0x29')],'ContactId':_0x5e5e89[_0x3617c1][_0x6c0a('0x45')],'VoiceQueueId':_0x5e5e89[_0x3617c1]['VoiceQueueId'],'CampaignId':_0x5e5e89[_0x3617c1]['CampaignId']}});_0x22cacb[_0x6c0a('0x46')](_0xcbddc4);}return BPromise[_0x6c0a('0x47')](_0x22cacb);}})[_0x6c0a('0x20')](function(_0x152aa0){logger[_0x6c0a('0x48')](_0x6c0a('0x49'),util[_0x6c0a('0x18')](_0x152aa0,{'showHidden':![],'depth':null}));_0x3400aa();})[_0x6c0a('0x2c')](function(_0x2da3b4){logger['error'](_0x6c0a('0x4a'),util[_0x6c0a('0x18')](_0x2da3b4,{'showHidden':![],'depth':null}));_0x3400aa(_0x2da3b4);});}}});}; \ No newline at end of file diff --git a/server/api/cmContact/cmContact.rpc.js b/server/api/cmContact/cmContact.rpc.js index df8bb19..a9d39fe 100644 --- a/server/api/cmContact/cmContact.rpc.js +++ b/server/api/cmContact/cmContact.rpc.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xa9e0=['phone','ListId','Contact','CmContactId','create','body','keys','length','startsWith','update','table','cm_contacts','id\x20=\x20?','sequelize','query','CreateCmContact','lodash','util','moment','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','client','http','redis','localhost','./cmContact.socket','register','info','CmContact,\x20%s,\x20%s','request\x20sent','debug','CmContact,\x20%s,\x20%s,\x20%s','error','code','message','result','catch','GetCmContact','CmContact','findAll','options','where','limit','include','map','model','attributes','then','stringify','CmContactHasItem','find'];(function(_0x321bb2,_0x202794){var _0x9c12ed=function(_0x263dd3){while(--_0x263dd3){_0x321bb2['push'](_0x321bb2['shift']());}};_0x9c12ed(++_0x202794);}(_0xa9e0,0x123));var _0x0a9e=function(_0x3635ce,_0x33a6f9){_0x3635ce=_0x3635ce-0x0;var _0x97ecd0=_0xa9e0[_0x3635ce];return _0x97ecd0;};'use strict';var _=require(_0x0a9e('0x0'));var util=require(_0x0a9e('0x1'));var moment=require(_0x0a9e('0x2'));var BPromise=require('bluebird');var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x0a9e('0x3'));var squel=require('squel');var db=require(_0x0a9e('0x4'))['db'];var utils=require(_0x0a9e('0x5'));var logger=require(_0x0a9e('0x6'))(_0x0a9e('0x7'));var config=require(_0x0a9e('0x8'));var jayson=require('jayson/promise');var client=jayson[_0x0a9e('0x9')][_0x0a9e('0xa')]({'port':0x232a});config[_0x0a9e('0xb')]=_['defaults'](config['redis'],{'host':_0x0a9e('0xc'),'port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config['redis']));require(_0x0a9e('0xd'))[_0x0a9e('0xe')](socket);function respondWithRpcPromise(_0x307b3e,_0x3ab53f,_0xfeb75b){return new BPromise(function(_0xbd1168,_0x4a4c56){return client['request'](_0x307b3e,_0xfeb75b)['then'](function(_0x4cfe67){logger[_0x0a9e('0xf')](_0x0a9e('0x10'),_0x3ab53f,_0x0a9e('0x11'));logger[_0x0a9e('0x12')](_0x0a9e('0x13'),_0x3ab53f,_0x0a9e('0x11'),JSON['stringify'](_0x4cfe67));if(_0x4cfe67[_0x0a9e('0x14')]){if(_0x4cfe67[_0x0a9e('0x14')][_0x0a9e('0x15')]===0x1f4){logger[_0x0a9e('0x14')](_0x0a9e('0x10'),_0x3ab53f,_0x4cfe67[_0x0a9e('0x14')]['message']);return _0x4a4c56(_0x4cfe67[_0x0a9e('0x14')]['message']);}logger[_0x0a9e('0x14')]('CmContact,\x20%s,\x20%s',_0x3ab53f,_0x4cfe67[_0x0a9e('0x14')][_0x0a9e('0x16')]);return _0xbd1168(_0x4cfe67['error'][_0x0a9e('0x16')]);}else{logger['info'](_0x0a9e('0x10'),_0x3ab53f,_0x0a9e('0x11'));_0xbd1168(_0x4cfe67[_0x0a9e('0x17')][_0x0a9e('0x16')]);}})[_0x0a9e('0x18')](function(_0x2eb11f){logger[_0x0a9e('0x14')](_0x0a9e('0x10'),_0x3ab53f,_0x2eb11f);_0x4a4c56(_0x2eb11f);});});}exports[_0x0a9e('0x19')]=function(_0x112016){var _0x1c696a=this;return new Promise(function(_0x105080,_0x4bb1e3){return db[_0x0a9e('0x1a')][_0x0a9e('0x1b')]({'raw':_0x112016['options']?_0x112016[_0x0a9e('0x1c')]['raw']===undefined?!![]:![]:!![],'where':_0x112016['options']?_0x112016[_0x0a9e('0x1c')][_0x0a9e('0x1d')]||null:null,'attributes':_0x112016[_0x0a9e('0x1c')]?_0x112016[_0x0a9e('0x1c')]['attributes']||null:null,'limit':_0x112016[_0x0a9e('0x1c')]?_0x112016[_0x0a9e('0x1c')][_0x0a9e('0x1e')]||null:null,'include':_0x112016[_0x0a9e('0x1c')]?_0x112016[_0x0a9e('0x1c')][_0x0a9e('0x1f')]?_[_0x0a9e('0x20')](_0x112016['options']['include'],function(_0x197ec0){return{'model':db[_0x197ec0[_0x0a9e('0x21')]],'as':_0x197ec0['as'],'attributes':_0x197ec0[_0x0a9e('0x22')],'include':_0x197ec0[_0x0a9e('0x1f')]?_['map'](_0x197ec0[_0x0a9e('0x1f')],function(_0x479bc4){return{'model':db[_0x479bc4[_0x0a9e('0x21')]],'as':_0x479bc4['as'],'attributes':_0x479bc4['attributes'],'include':_0x479bc4[_0x0a9e('0x1f')]?_[_0x0a9e('0x20')](_0x479bc4[_0x0a9e('0x1f')],function(_0x14433c){return{'model':db[_0x14433c[_0x0a9e('0x21')]],'as':_0x14433c['as'],'attributes':_0x14433c[_0x0a9e('0x22')]};}):[]};}):[]};}):[]:[]})[_0x0a9e('0x23')](function(_0x14de77){logger['info'](_0x0a9e('0x19'),_0x112016);logger[_0x0a9e('0x12')](_0x0a9e('0x19'),_0x112016,JSON[_0x0a9e('0x24')](_0x14de77));if(_0x14de77['length']==0x0){return db[_0x0a9e('0x25')][_0x0a9e('0x26')]({'raw':!![],'where':{'item':_0x112016[_0x0a9e('0x1c')][_0x0a9e('0x27')]},'include':[{'model':db[_0x0a9e('0x1a')],'where':{'ListId':_0x112016[_0x0a9e('0x1c')][_0x0a9e('0x1d')][_0x0a9e('0x28')],'deletedAt':{'$eq':null}},'as':_0x0a9e('0x29')}]})['then'](function(_0x426950){if(_['isNil'](_0x426950)){_0x105080(_0x14de77);}else{var _0x2407f9=_0x426950[_0x0a9e('0x2a')];return db[_0x0a9e('0x1a')][_0x0a9e('0x1b')]({'raw':!![],'where':{'id':_0x2407f9},'attributes':_0x112016[_0x0a9e('0x1c')]?_0x112016['options'][_0x0a9e('0x22')]||null:null})[_0x0a9e('0x23')](function(_0x40cb85){_0x105080(_0x40cb85);});}});}else{_0x105080(_0x14de77);}})[_0x0a9e('0x18')](function(_0x2b45ea){logger[_0x0a9e('0x14')](_0x0a9e('0x19'),_0x2b45ea[_0x0a9e('0x16')],_0x112016);_0x4bb1e3(_0x1c696a['error'](0x1f4,_0x2b45ea[_0x0a9e('0x16')]));});});};exports['CreateCmContact']=function(_0x2cc7a0){var _0x14b13f=this;return new Promise(function(_0x2b7e7f,_0x3f3d41){return db['CmContact'][_0x0a9e('0x2b')](_0x2cc7a0[_0x0a9e('0x2c')],{'raw':_0x2cc7a0[_0x0a9e('0x1c')]?_0x2cc7a0[_0x0a9e('0x1c')]['raw']===undefined?!![]:![]:!![]})['then'](function(_0x1e8694){var _0x5640eb;for(var _0x24936a=0x0;_0x24936a{}\s\\|]/g,'-');_0x59181e(null,util[_0x0a9e('0x26')]('%s-%s%s',path[_0x0a9e('0x27')](_0x5ea472['originalname'],path[_0x0a9e('0x28')](_0x5ea472['originalname'])),Date[_0x0a9e('0x29')](),path[_0x0a9e('0x28')](_0x5ea472[_0x0a9e('0x24')])));}})});router[_0x0a9e('0x18')](_0x0a9e('0x2a'),upload[_0x0a9e('0x2b')](_0x0a9e('0x2c')),controller[_0x0a9e('0x2d')]);var upload=multer({'storage':multer['diskStorage']({'destination':function(_0x3652a7,_0x468813,_0x2b1f27){_0x2b1f27(null,path[_0x0a9e('0x21')](config['root'],_0x0a9e('0x23')));},'filename':function(_0x40e7a3,_0x1843b2,_0x824a4f){_0x1843b2[_0x0a9e('0x24')]=_0x1843b2[_0x0a9e('0x24')][_0x0a9e('0x25')](/[+@&\/\\#,+()$~%'":*?<>{}\s\\|]/g,'-');_0x824a4f(null,util[_0x0a9e('0x26')](_0x0a9e('0x2e'),path['basename'](_0x1843b2[_0x0a9e('0x24')],path['extname'](_0x1843b2[_0x0a9e('0x24')])),Date[_0x0a9e('0x29')](),path[_0x0a9e('0x28')](_0x1843b2[_0x0a9e('0x24')])));}})});router[_0x0a9e('0x18')]('/upload',upload[_0x0a9e('0x2b')](_0x0a9e('0x2c')),controller[_0x0a9e('0x2f')]);router[_0x0a9e('0x18')](_0x0a9e('0x30'),auth[_0x0a9e('0xd')](),controller[_0x0a9e('0x31')]);router[_0x0a9e('0x18')]('/uploadUpdates/:id',auth[_0x0a9e('0xd')](),controller['importUpdates']);router[_0x0a9e('0x32')](_0x0a9e('0x33'),auth[_0x0a9e('0xd')](),controller[_0x0a9e('0x34')]);router['delete'](_0x0a9e('0x33'),auth[_0x0a9e('0xd')](),controller[_0x0a9e('0x35')]);module[_0x0a9e('0x36')]=router; \ No newline at end of file +var _0xa9e0=['basename','extname','now','/csv','single','file','uploadCsv','%s-%s%s','upload','/upload/:id','import','put','/:id','update','destroy','exports','multer','util','path','Router','../../components/auth/service','../../components/interaction/service','../../config/environment','./cmContact.controller','get','index','/describe','show','/:id/tags','isAuthenticated','getTags','/:id/hoppers','getHoppers','/:id/hopper_histories','/:id/hopper_finals','getHopperFinals','/:id/jscripty_sessions','getJscriptySessions','/:id/journey','getJourney','post','create','/create_many','bulkCreate','setTags','setAdditionalPhones','/:id/duplicateAdditionalPhones','/:id/rescheduleAdditionalPhones','rescheduleAdditionalPhones','join','root','server/files/tmp','originalname','replace','format'];(function(_0x2d02a9,_0x48277d){var _0x3c093d=function(_0x1cf8cf){while(--_0x1cf8cf){_0x2d02a9['push'](_0x2d02a9['shift']());}};_0x3c093d(++_0x48277d);}(_0xa9e0,0x123));var _0x0a9e=function(_0x21aec3,_0x5c97e9){_0x21aec3=_0x21aec3-0x0;var _0x288bbc=_0xa9e0[_0x21aec3];return _0x288bbc;};'use strict';var multer=require(_0x0a9e('0x0'));var util=require(_0x0a9e('0x1'));var path=require(_0x0a9e('0x2'));var timeout=require('connect-timeout');var express=require('express');var router=express[_0x0a9e('0x3')]();var fs_extra=require('fs-extra');var auth=require(_0x0a9e('0x4'));var interaction=require(_0x0a9e('0x5'));var config=require(_0x0a9e('0x6'));var controller=require(_0x0a9e('0x7'));router[_0x0a9e('0x8')]('/',auth['isAuthenticated'](),controller[_0x0a9e('0x9')]);router[_0x0a9e('0x8')](_0x0a9e('0xa'),auth['isAuthenticated'](),controller['describe']);router[_0x0a9e('0x8')]('/:id',auth['isAuthenticated'](),controller[_0x0a9e('0xb')]);router[_0x0a9e('0x8')](_0x0a9e('0xc'),auth[_0x0a9e('0xd')](),controller[_0x0a9e('0xe')]);router[_0x0a9e('0x8')]('/:id/phones',auth['isAuthenticated'](),controller['getAdditionalPhones']);router['get'](_0x0a9e('0xf'),auth[_0x0a9e('0xd')](),controller[_0x0a9e('0x10')]);router[_0x0a9e('0x8')](_0x0a9e('0x11'),auth[_0x0a9e('0xd')](),controller['getHopperHistories']);router[_0x0a9e('0x8')](_0x0a9e('0x12'),auth[_0x0a9e('0xd')](),controller[_0x0a9e('0x13')]);router[_0x0a9e('0x8')](_0x0a9e('0x14'),auth['isAuthenticated'](),controller[_0x0a9e('0x15')]);router['get'](_0x0a9e('0x16'),auth['isAuthenticated'](),controller[_0x0a9e('0x17')]);router[_0x0a9e('0x18')]('/merge',auth[_0x0a9e('0xd')](),controller['merge']);router[_0x0a9e('0x18')]('/',auth[_0x0a9e('0xd')](),controller[_0x0a9e('0x19')]);router[_0x0a9e('0x18')](_0x0a9e('0x1a'),auth[_0x0a9e('0xd')](),controller[_0x0a9e('0x1b')]);router[_0x0a9e('0x18')](_0x0a9e('0xc'),auth[_0x0a9e('0xd')](),controller[_0x0a9e('0x1c')]);router[_0x0a9e('0x18')]('/:id/phones',auth[_0x0a9e('0xd')](),controller[_0x0a9e('0x1d')]);router['post'](_0x0a9e('0x1e'),auth['isAuthenticated'](),controller['duplicateAdditionalPhones']);router[_0x0a9e('0x18')](_0x0a9e('0x1f'),auth[_0x0a9e('0xd')](),controller[_0x0a9e('0x20')]);var upload=multer({'storage':multer['diskStorage']({'destination':function(_0xfb6e48,_0x2fb0e4,_0x3b45bc){_0x3b45bc(null,path[_0x0a9e('0x21')](config[_0x0a9e('0x22')],_0x0a9e('0x23')));},'filename':function(_0x16b1ca,_0x5ea472,_0x59181e){_0x5ea472[_0x0a9e('0x24')]=_0x5ea472[_0x0a9e('0x24')][_0x0a9e('0x25')](/[+@&\/\\#,+()$~%'":*?<>{}\s\\|]/g,'-');_0x59181e(null,util[_0x0a9e('0x26')]('%s-%s%s',path[_0x0a9e('0x27')](_0x5ea472['originalname'],path[_0x0a9e('0x28')](_0x5ea472['originalname'])),Date[_0x0a9e('0x29')](),path[_0x0a9e('0x28')](_0x5ea472[_0x0a9e('0x24')])));}})});router[_0x0a9e('0x18')](_0x0a9e('0x2a'),upload[_0x0a9e('0x2b')](_0x0a9e('0x2c')),controller[_0x0a9e('0x2d')]);var upload=multer({'storage':multer['diskStorage']({'destination':function(_0x3652a7,_0x468813,_0x2b1f27){_0x2b1f27(null,path[_0x0a9e('0x21')](config['root'],_0x0a9e('0x23')));},'filename':function(_0x40e7a3,_0x1843b2,_0x824a4f){_0x1843b2[_0x0a9e('0x24')]=_0x1843b2[_0x0a9e('0x24')][_0x0a9e('0x25')](/[+@&\/\\#,+()$~%'":*?<>{}\s\\|]/g,'-');_0x824a4f(null,util[_0x0a9e('0x26')](_0x0a9e('0x2e'),path['basename'](_0x1843b2[_0x0a9e('0x24')],path['extname'](_0x1843b2[_0x0a9e('0x24')])),Date[_0x0a9e('0x29')](),path[_0x0a9e('0x28')](_0x1843b2[_0x0a9e('0x24')])));}})});router[_0x0a9e('0x18')]('/upload',upload[_0x0a9e('0x2b')](_0x0a9e('0x2c')),controller[_0x0a9e('0x2f')]);router[_0x0a9e('0x18')](_0x0a9e('0x30'),auth[_0x0a9e('0xd')](),controller[_0x0a9e('0x31')]);router[_0x0a9e('0x18')]('/uploadUpdates/:id',auth[_0x0a9e('0xd')](),controller['importUpdates']);router[_0x0a9e('0x32')](_0x0a9e('0x33'),auth[_0x0a9e('0xd')](),controller[_0x0a9e('0x34')]);router['delete'](_0x0a9e('0x33'),auth[_0x0a9e('0xd')](),controller[_0x0a9e('0x35')]);module[_0x0a9e('0x36')]=router; \ No newline at end of file diff --git a/server/api/cmContactHasItem/cmContactHasItem.attributes.js b/server/api/cmContactHasItem/cmContactHasItem.attributes.js index 12c3634..e28e34e 100644 --- a/server/api/cmContactHasItem/cmContactHasItem.attributes.js +++ b/server/api/cmContactHasItem/cmContactHasItem.attributes.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x3c6d=['exports','INTEGER','STRING','PHONE','sequelize'];(function(_0x5756f8,_0x22b6d5){var _0x3bb749=function(_0x332204){while(--_0x332204){_0x5756f8['push'](_0x5756f8['shift']());}};_0x3bb749(++_0x22b6d5);}(_0x3c6d,0x199));var _0xd3c6=function(_0x224a83,_0x56581f){_0x224a83=_0x224a83-0x0;var _0x3b6fa6=_0x3c6d[_0x224a83];return _0x3b6fa6;};'use strict';var Sequelize=require(_0xd3c6('0x0'));module[_0xd3c6('0x1')]={'CmContactId':{'type':Sequelize[_0xd3c6('0x2')],'primaryKey':!![]},'item':{'type':Sequelize[_0xd3c6('0x3')],'defaultValue':'','primaryKey':!![]},'ItemTypeId':{'type':Sequelize['INTEGER'],'defaultValue':null},'ItemClass':{'type':Sequelize[_0xd3c6('0x3')],'defaultValue':_0xd3c6('0x4')},'OrderBy':{'type':Sequelize[_0xd3c6('0x2')],'defaultValue':null},'description':{'type':Sequelize[_0xd3c6('0x3')],'defaultValue':null}}; \ No newline at end of file +var _0x2821=['sequelize','exports','INTEGER','STRING','PHONE'];(function(_0x824a1a,_0x36abcf){var _0x4d9568=function(_0x457f63){while(--_0x457f63){_0x824a1a['push'](_0x824a1a['shift']());}};_0x4d9568(++_0x36abcf);}(_0x2821,0x87));var _0x1282=function(_0x58bafd,_0x47ccda){_0x58bafd=_0x58bafd-0x0;var _0x495169=_0x2821[_0x58bafd];return _0x495169;};'use strict';var Sequelize=require(_0x1282('0x0'));module[_0x1282('0x1')]={'CmContactId':{'type':Sequelize[_0x1282('0x2')],'primaryKey':!![]},'item':{'type':Sequelize[_0x1282('0x3')],'defaultValue':'','primaryKey':!![]},'ItemTypeId':{'type':Sequelize[_0x1282('0x2')],'defaultValue':null},'ItemClass':{'type':Sequelize[_0x1282('0x3')],'defaultValue':_0x1282('0x4')},'OrderBy':{'type':Sequelize[_0x1282('0x2')],'defaultValue':null},'description':{'type':Sequelize[_0x1282('0x3')],'defaultValue':null}}; \ No newline at end of file diff --git a/server/api/cmContactHasItem/cmContactHasItem.controller.js b/server/api/cmContactHasItem/cmContactHasItem.controller.js index 6c0d018..adb1fdc 100644 --- a/server/api/cmContactHasItem/cmContactHasItem.controller.js +++ b/server/api/cmContactHasItem/cmContactHasItem.controller.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xedda=['ejs','fs-extra','lodash','jsforce','desk.js','querystring','papaparse','../../components/parsers/qs','../../components/parsers/advancedSearch','api','../../config/utils','../../config/license/util','../../mysqldb','sendStatus','status','json','offset','undefined','limit','count','set','apply','reject','save','update','destroy','then','CmContactHasItems','UserProfileResource','end','error','stack','name','index','map','CmContactHasItem','rawAttributes','fieldName','key','model','query','intersection','attributes','fields','length','hasOwnProperty','order','sort','where','filters','filter','merge','type','VIRTUAL','includeAll','include','findAll','rows','params','keys','options','find','catch','create','body','user','get','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','UserProfileSection','userProfileId','autoAssociation','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','eml-format','rimraf','zip-dir','fast-json-patch','bluebird','util','path','sox','to-csv'];(function(_0x25c858,_0x565eb6){var _0x13131b=function(_0x22f51b){while(--_0x22f51b){_0x25c858['push'](_0x25c858['shift']());}};_0x13131b(++_0x565eb6);}(_0xedda,0x1e3));var _0xaedd=function(_0x2bfecd,_0xbb4f30){_0x2bfecd=_0x2bfecd-0x0;var _0x4df2fc=_0xedda[_0x2bfecd];return _0x4df2fc;};'use strict';var emlformat=require(_0xaedd('0x0'));var rimraf=require(_0xaedd('0x1'));var zipdir=require(_0xaedd('0x2'));var jsonpatch=require(_0xaedd('0x3'));var rp=require('request-promise');var moment=require('moment');var BPromise=require(_0xaedd('0x4'));var Mustache=require('mustache');var util=require(_0xaedd('0x5'));var path=require(_0xaedd('0x6'));var sox=require(_0xaedd('0x7'));var csv=require(_0xaedd('0x8'));var ejs=require(_0xaedd('0x9'));var fs=require('fs');var fs_extra=require(_0xaedd('0xa'));var _=require(_0xaedd('0xb'));var squel=require('squel');var crypto=require('crypto');var jsforce=require(_0xaedd('0xc'));var deskjs=require(_0xaedd('0xd'));var toCsv=require(_0xaedd('0x8'));var querystring=require(_0xaedd('0xe'));var Papa=require(_0xaedd('0xf'));var Redis=require('ioredis');var authService=require('../../components/auth/service');var qs=require(_0xaedd('0x10'));var as=require(_0xaedd('0x11'));var hardwareService=require('../../config/license/hardware');var logger=require('../../config/logger')(_0xaedd('0x12'));var utils=require(_0xaedd('0x13'));var config=require('../../config/environment');var licenseUtil=require(_0xaedd('0x14'));var db=require(_0xaedd('0x15'))['db'];function respondWithStatusCode(_0x2e1a26,_0x5c880b){_0x5c880b=_0x5c880b||0xcc;return function(_0x484181){if(_0x484181){return _0x2e1a26[_0xaedd('0x16')](_0x5c880b);}return _0x2e1a26[_0xaedd('0x17')](_0x5c880b)['end']();};}function respondWithResult(_0x4ac539,_0x207e0a){_0x207e0a=_0x207e0a||0xc8;return function(_0x46dad0){if(_0x46dad0){return _0x4ac539['status'](_0x207e0a)[_0xaedd('0x18')](_0x46dad0);}};}function respondWithFilteredResult(_0x46cfb1,_0x5bfc7b){return function(_0x44358b){if(_0x44358b){var _0x2f8b36=typeof _0x5bfc7b[_0xaedd('0x19')]===_0xaedd('0x1a')&&typeof _0x5bfc7b[_0xaedd('0x1b')]===_0xaedd('0x1a');var _0x223a5b=_0x44358b[_0xaedd('0x1c')];var _0x548020=_0x2f8b36?0x0:_0x5bfc7b['offset'];var _0x5638ba=_0x2f8b36?_0x44358b[_0xaedd('0x1c')]:_0x5bfc7b[_0xaedd('0x19')]+_0x5bfc7b[_0xaedd('0x1b')];var _0x7746b5;if(_0x5638ba>=_0x223a5b){_0x5638ba=_0x223a5b;_0x7746b5=0xc8;}else{_0x7746b5=0xce;}_0x46cfb1['status'](_0x7746b5);return _0x46cfb1[_0xaedd('0x1d')]('Content-Range',_0x548020+'-'+_0x5638ba+'/'+_0x223a5b)[_0xaedd('0x18')](_0x44358b);}return null;};}function patchUpdates(_0x39a772){return function(_0x3b6ad2){try{jsonpatch[_0xaedd('0x1e')](_0x3b6ad2,_0x39a772,!![]);}catch(_0x5c84b4){return BPromise[_0xaedd('0x1f')](_0x5c84b4);}return _0x3b6ad2[_0xaedd('0x20')]();};}function saveUpdates(_0x23ff51,_0x327f8c){return function(_0x140c70){if(_0x140c70){return _0x140c70[_0xaedd('0x21')](_0x23ff51)['then'](function(_0x3db927){return _0x3db927;});}return null;};}function removeEntity(_0xc7d5bb,_0x1f3e75){return function(_0x12b5b8){if(_0x12b5b8){return _0x12b5b8[_0xaedd('0x22')]()[_0xaedd('0x23')](function(){var _0x32243b=_0x12b5b8['get']({'plain':!![]});var _0x66ba58=_0xaedd('0x24');return db[_0xaedd('0x25')]['destroy']({'where':{'type':_0x66ba58,'resourceId':_0x32243b['id']}})['then'](function(){return _0x12b5b8;});})[_0xaedd('0x23')](function(){_0xc7d5bb[_0xaedd('0x17')](0xcc)[_0xaedd('0x26')]();});}};}function handleEntityNotFound(_0x3114b8,_0x246944){return function(_0x319f19){if(!_0x319f19){_0x3114b8[_0xaedd('0x16')](0x194);}return _0x319f19;};}function handleError(_0x5545e0,_0x2f27da){_0x2f27da=_0x2f27da||0x1f4;return function(_0x42ab9d){logger[_0xaedd('0x27')](_0x42ab9d[_0xaedd('0x28')]);if(_0x42ab9d[_0xaedd('0x29')]){delete _0x42ab9d[_0xaedd('0x29')];}_0x5545e0['status'](_0x2f27da)['send'](_0x42ab9d);};}exports[_0xaedd('0x2a')]=function(_0x595128,_0x79103b){var _0xe2d23d={},_0x39ac1b={},_0xd063b6={'count':0x0,'rows':[]};var _0x516b16=_[_0xaedd('0x2b')](db[_0xaedd('0x2c')][_0xaedd('0x2d')],function(_0x37213c){return{'name':_0x37213c[_0xaedd('0x2e')],'type':_0x37213c['type'][_0xaedd('0x2f')]};});_0x39ac1b[_0xaedd('0x30')]=_[_0xaedd('0x2b')](_0x516b16,_0xaedd('0x29'));_0x39ac1b[_0xaedd('0x31')]=_['keys'](_0x595128[_0xaedd('0x31')]);_0x39ac1b['filters']=_[_0xaedd('0x32')](_0x39ac1b[_0xaedd('0x30')],_0x39ac1b[_0xaedd('0x31')]);_0xe2d23d[_0xaedd('0x33')]=_[_0xaedd('0x32')](_0x39ac1b[_0xaedd('0x30')],qs[_0xaedd('0x34')](_0x595128[_0xaedd('0x31')][_0xaedd('0x34')]));_0xe2d23d[_0xaedd('0x33')]=_0xe2d23d[_0xaedd('0x33')][_0xaedd('0x35')]?_0xe2d23d[_0xaedd('0x33')]:_0x39ac1b['model'];if(!_0x595128[_0xaedd('0x31')][_0xaedd('0x36')]('nolimit')){_0xe2d23d['limit']=qs[_0xaedd('0x1b')](_0x595128[_0xaedd('0x31')][_0xaedd('0x1b')]);_0xe2d23d[_0xaedd('0x19')]=qs['offset'](_0x595128[_0xaedd('0x31')][_0xaedd('0x19')]);}_0xe2d23d[_0xaedd('0x37')]=qs[_0xaedd('0x38')](_0x595128['query'][_0xaedd('0x38')]);_0xe2d23d[_0xaedd('0x39')]=qs[_0xaedd('0x3a')](_['pick'](_0x595128[_0xaedd('0x31')],_0x39ac1b[_0xaedd('0x3a')]),_0x516b16);if(_0x595128[_0xaedd('0x31')][_0xaedd('0x3b')]){_0xe2d23d[_0xaedd('0x39')]=_[_0xaedd('0x3c')](_0xe2d23d[_0xaedd('0x39')],{'$or':_[_0xaedd('0x2b')](_0x516b16,function(_0x36d945){if(_0x36d945[_0xaedd('0x3d')]!==_0xaedd('0x3e')){var _0x4d0431={};_0x4d0431[_0x36d945[_0xaedd('0x29')]]={'$like':'%'+_0x595128[_0xaedd('0x31')]['filter']+'%'};return _0x4d0431;}})});}_0xe2d23d=_[_0xaedd('0x3c')]({},_0xe2d23d,_0x595128['options']);var _0x43c9ec={'where':_0xe2d23d[_0xaedd('0x39')]};return db[_0xaedd('0x2c')][_0xaedd('0x1c')](_0x43c9ec)[_0xaedd('0x23')](function(_0xf71075){_0xd063b6['count']=_0xf71075;if(_0x595128['query'][_0xaedd('0x3f')]){_0xe2d23d[_0xaedd('0x40')]=[{'all':!![]}];}return db[_0xaedd('0x2c')][_0xaedd('0x41')](_0xe2d23d);})[_0xaedd('0x23')](function(_0x300a99){_0xd063b6[_0xaedd('0x42')]=_0x300a99;return _0xd063b6;})[_0xaedd('0x23')](respondWithFilteredResult(_0x79103b,_0xe2d23d))['catch'](handleError(_0x79103b,null));};exports['show']=function(_0x23e43b,_0x4376b0){var _0x27eacf={'raw':!![],'where':{'id':_0x23e43b[_0xaedd('0x43')]['id']}},_0x5b55d8={};_0x5b55d8['model']=_[_0xaedd('0x44')](db[_0xaedd('0x2c')][_0xaedd('0x2d')]);_0x5b55d8['query']=_[_0xaedd('0x44')](_0x23e43b[_0xaedd('0x31')]);_0x5b55d8[_0xaedd('0x3a')]=_[_0xaedd('0x32')](_0x5b55d8[_0xaedd('0x30')],_0x5b55d8['query']);_0x27eacf['attributes']=_[_0xaedd('0x32')](_0x5b55d8[_0xaedd('0x30')],qs[_0xaedd('0x34')](_0x23e43b[_0xaedd('0x31')][_0xaedd('0x34')]));_0x27eacf['attributes']=_0x27eacf[_0xaedd('0x33')][_0xaedd('0x35')]?_0x27eacf[_0xaedd('0x33')]:_0x5b55d8[_0xaedd('0x30')];if(_0x23e43b['query'][_0xaedd('0x3f')]){_0x27eacf['include']=[{'all':!![]}];}_0x27eacf=_[_0xaedd('0x3c')]({},_0x27eacf,_0x23e43b[_0xaedd('0x45')]);return db['CmContactHasItem'][_0xaedd('0x46')](_0x27eacf)[_0xaedd('0x23')](handleEntityNotFound(_0x4376b0,null))[_0xaedd('0x23')](respondWithResult(_0x4376b0,null))[_0xaedd('0x47')](handleError(_0x4376b0,null));};exports[_0xaedd('0x48')]=function(_0x4e4307,_0x52133f){return db[_0xaedd('0x2c')]['create'](_0x4e4307[_0xaedd('0x49')],{})[_0xaedd('0x23')](function(_0x2ed664){var _0x125a81=_0x4e4307[_0xaedd('0x4a')][_0xaedd('0x4b')]({'plain':!![]});if(!_0x125a81)throw new Error(_0xaedd('0x4c'));if(_0x125a81[_0xaedd('0x4d')]===_0xaedd('0x4a')){var _0x336f99=_0x2ed664[_0xaedd('0x4b')]({'plain':!![]});var _0x3af934=_0xaedd('0x24');return db[_0xaedd('0x4e')][_0xaedd('0x46')]({'where':{'name':_0x3af934,'userProfileId':_0x125a81[_0xaedd('0x4f')]},'raw':!![]})[_0xaedd('0x23')](function(_0x816209){if(_0x816209&&_0x816209[_0xaedd('0x50')]===0x0){return db['UserProfileResource']['create']({'name':_0x336f99[_0xaedd('0x29')],'resourceId':_0x336f99['id'],'type':_0x816209['name'],'sectionId':_0x816209['id']},{})[_0xaedd('0x23')](function(){return _0x2ed664;});}else{return _0x2ed664;}})[_0xaedd('0x47')](function(_0x22b60d){logger['error'](_0xaedd('0x51'),_0x22b60d);throw _0x22b60d;});}return _0x2ed664;})['then'](respondWithResult(_0x52133f,0xc9))[_0xaedd('0x47')](handleError(_0x52133f,null));};exports[_0xaedd('0x21')]=function(_0xcf5c9e,_0x4b052c){if(_0xcf5c9e[_0xaedd('0x49')]['id']){delete _0xcf5c9e[_0xaedd('0x49')]['id'];}return db[_0xaedd('0x2c')][_0xaedd('0x46')]({'where':{'id':_0xcf5c9e[_0xaedd('0x43')]['id']}})[_0xaedd('0x23')](handleEntityNotFound(_0x4b052c,null))[_0xaedd('0x23')](saveUpdates(_0xcf5c9e[_0xaedd('0x49')],null))['then'](respondWithResult(_0x4b052c,null))['catch'](handleError(_0x4b052c,null));};exports['destroy']=function(_0x304e60,_0x387c5d){return db[_0xaedd('0x2c')][_0xaedd('0x46')]({'where':{'id':_0x304e60['params']['id']}})['then'](handleEntityNotFound(_0x387c5d,null))['then'](removeEntity(_0x387c5d,null))[_0xaedd('0x47')](handleError(_0x387c5d,null));}; \ No newline at end of file +var _0x7ba9=['map','CmContactHasItem','rawAttributes','fieldName','key','model','query','keys','filters','attributes','intersection','fields','length','nolimit','order','sort','where','pick','filter','merge','options','includeAll','findAll','rows','catch','show','include','find','create','body','user','role','UserProfileSection','autoAssociation','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','params','eml-format','zip-dir','fast-json-patch','moment','bluebird','sox','ejs','squel','crypto','to-csv','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/advancedSearch','../../config/logger','api','../../config/environment','../../config/license/util','../../mysqldb','sendStatus','status','end','json','undefined','limit','count','offset','Content-Range','reject','update','then','destroy','get','CmContactHasItems','UserProfileResource','error','name','send'];(function(_0x289c3c,_0x353888){var _0x2f7678=function(_0x8104c1){while(--_0x8104c1){_0x289c3c['push'](_0x289c3c['shift']());}};_0x2f7678(++_0x353888);}(_0x7ba9,0x105));var _0x97ba=function(_0x3dd0b9,_0x1d6c92){_0x3dd0b9=_0x3dd0b9-0x0;var _0x4c0351=_0x7ba9[_0x3dd0b9];return _0x4c0351;};'use strict';var emlformat=require(_0x97ba('0x0'));var rimraf=require('rimraf');var zipdir=require(_0x97ba('0x1'));var jsonpatch=require(_0x97ba('0x2'));var rp=require('request-promise');var moment=require(_0x97ba('0x3'));var BPromise=require(_0x97ba('0x4'));var Mustache=require('mustache');var util=require('util');var path=require('path');var sox=require(_0x97ba('0x5'));var csv=require('to-csv');var ejs=require(_0x97ba('0x6'));var fs=require('fs');var fs_extra=require('fs-extra');var _=require('lodash');var squel=require(_0x97ba('0x7'));var crypto=require(_0x97ba('0x8'));var jsforce=require('jsforce');var deskjs=require('desk.js');var toCsv=require(_0x97ba('0x9'));var querystring=require(_0x97ba('0xa'));var Papa=require(_0x97ba('0xb'));var Redis=require(_0x97ba('0xc'));var authService=require(_0x97ba('0xd'));var qs=require('../../components/parsers/qs');var as=require(_0x97ba('0xe'));var hardwareService=require('../../config/license/hardware');var logger=require(_0x97ba('0xf'))(_0x97ba('0x10'));var utils=require('../../config/utils');var config=require(_0x97ba('0x11'));var licenseUtil=require(_0x97ba('0x12'));var db=require(_0x97ba('0x13'))['db'];function respondWithStatusCode(_0xdb23e7,_0x5ddf9a){_0x5ddf9a=_0x5ddf9a||0xcc;return function(_0x2783e1){if(_0x2783e1){return _0xdb23e7[_0x97ba('0x14')](_0x5ddf9a);}return _0xdb23e7[_0x97ba('0x15')](_0x5ddf9a)[_0x97ba('0x16')]();};}function respondWithResult(_0x2ee553,_0x3385dd){_0x3385dd=_0x3385dd||0xc8;return function(_0x11ed52){if(_0x11ed52){return _0x2ee553[_0x97ba('0x15')](_0x3385dd)[_0x97ba('0x17')](_0x11ed52);}};}function respondWithFilteredResult(_0x1534b6,_0x1238b2){return function(_0x10b4ac){if(_0x10b4ac){var _0x3b611b=typeof _0x1238b2['offset']===_0x97ba('0x18')&&typeof _0x1238b2[_0x97ba('0x19')]==='undefined';var _0x176e16=_0x10b4ac[_0x97ba('0x1a')];var _0xe52b0=_0x3b611b?0x0:_0x1238b2[_0x97ba('0x1b')];var _0x2b563b=_0x3b611b?_0x10b4ac[_0x97ba('0x1a')]:_0x1238b2[_0x97ba('0x1b')]+_0x1238b2['limit'];var _0x1fdb7b;if(_0x2b563b>=_0x176e16){_0x2b563b=_0x176e16;_0x1fdb7b=0xc8;}else{_0x1fdb7b=0xce;}_0x1534b6[_0x97ba('0x15')](_0x1fdb7b);return _0x1534b6['set'](_0x97ba('0x1c'),_0xe52b0+'-'+_0x2b563b+'/'+_0x176e16)[_0x97ba('0x17')](_0x10b4ac);}return null;};}function patchUpdates(_0x2f6a1c){return function(_0x1e4232){try{jsonpatch['apply'](_0x1e4232,_0x2f6a1c,!![]);}catch(_0x8f214){return BPromise[_0x97ba('0x1d')](_0x8f214);}return _0x1e4232['save']();};}function saveUpdates(_0xfa0eaa,_0x2a2fc4){return function(_0x5b1da2){if(_0x5b1da2){return _0x5b1da2[_0x97ba('0x1e')](_0xfa0eaa)[_0x97ba('0x1f')](function(_0xf9059c){return _0xf9059c;});}return null;};}function removeEntity(_0x2f524c,_0x16d7ce){return function(_0x11b681){if(_0x11b681){return _0x11b681[_0x97ba('0x20')]()['then'](function(){var _0x47c651=_0x11b681[_0x97ba('0x21')]({'plain':!![]});var _0x12474c=_0x97ba('0x22');return db[_0x97ba('0x23')][_0x97ba('0x20')]({'where':{'type':_0x12474c,'resourceId':_0x47c651['id']}})[_0x97ba('0x1f')](function(){return _0x11b681;});})[_0x97ba('0x1f')](function(){_0x2f524c[_0x97ba('0x15')](0xcc)['end']();});}};}function handleEntityNotFound(_0x424143,_0x1bac83){return function(_0x22932c){if(!_0x22932c){_0x424143[_0x97ba('0x14')](0x194);}return _0x22932c;};}function handleError(_0x233c6e,_0x366dca){_0x366dca=_0x366dca||0x1f4;return function(_0x5b5d56){logger[_0x97ba('0x24')](_0x5b5d56['stack']);if(_0x5b5d56[_0x97ba('0x25')]){delete _0x5b5d56[_0x97ba('0x25')];}_0x233c6e['status'](_0x366dca)[_0x97ba('0x26')](_0x5b5d56);};}exports['index']=function(_0x38476f,_0x1bca72){var _0xa7837a={},_0x12fd9d={},_0x772e2f={'count':0x0,'rows':[]};var _0x4087a1=_[_0x97ba('0x27')](db[_0x97ba('0x28')][_0x97ba('0x29')],function(_0x3055c9){return{'name':_0x3055c9[_0x97ba('0x2a')],'type':_0x3055c9['type'][_0x97ba('0x2b')]};});_0x12fd9d[_0x97ba('0x2c')]=_[_0x97ba('0x27')](_0x4087a1,'name');_0x12fd9d[_0x97ba('0x2d')]=_[_0x97ba('0x2e')](_0x38476f['query']);_0x12fd9d[_0x97ba('0x2f')]=_['intersection'](_0x12fd9d['model'],_0x12fd9d[_0x97ba('0x2d')]);_0xa7837a[_0x97ba('0x30')]=_[_0x97ba('0x31')](_0x12fd9d[_0x97ba('0x2c')],qs[_0x97ba('0x32')](_0x38476f[_0x97ba('0x2d')]['fields']));_0xa7837a[_0x97ba('0x30')]=_0xa7837a['attributes'][_0x97ba('0x33')]?_0xa7837a['attributes']:_0x12fd9d[_0x97ba('0x2c')];if(!_0x38476f['query']['hasOwnProperty'](_0x97ba('0x34'))){_0xa7837a['limit']=qs[_0x97ba('0x19')](_0x38476f['query'][_0x97ba('0x19')]);_0xa7837a['offset']=qs['offset'](_0x38476f['query']['offset']);}_0xa7837a[_0x97ba('0x35')]=qs[_0x97ba('0x36')](_0x38476f[_0x97ba('0x2d')][_0x97ba('0x36')]);_0xa7837a[_0x97ba('0x37')]=qs['filters'](_[_0x97ba('0x38')](_0x38476f[_0x97ba('0x2d')],_0x12fd9d['filters']),_0x4087a1);if(_0x38476f[_0x97ba('0x2d')][_0x97ba('0x39')]){_0xa7837a['where']=_[_0x97ba('0x3a')](_0xa7837a['where'],{'$or':_['map'](_0x4087a1,function(_0x47c38b){if(_0x47c38b['type']!=='VIRTUAL'){var _0x4ee5de={};_0x4ee5de[_0x47c38b['name']]={'$like':'%'+_0x38476f[_0x97ba('0x2d')][_0x97ba('0x39')]+'%'};return _0x4ee5de;}})});}_0xa7837a=_[_0x97ba('0x3a')]({},_0xa7837a,_0x38476f[_0x97ba('0x3b')]);var _0x3e99fe={'where':_0xa7837a['where']};return db[_0x97ba('0x28')]['count'](_0x3e99fe)['then'](function(_0x2518c9){_0x772e2f[_0x97ba('0x1a')]=_0x2518c9;if(_0x38476f[_0x97ba('0x2d')][_0x97ba('0x3c')]){_0xa7837a['include']=[{'all':!![]}];}return db[_0x97ba('0x28')][_0x97ba('0x3d')](_0xa7837a);})[_0x97ba('0x1f')](function(_0x456d59){_0x772e2f[_0x97ba('0x3e')]=_0x456d59;return _0x772e2f;})[_0x97ba('0x1f')](respondWithFilteredResult(_0x1bca72,_0xa7837a))[_0x97ba('0x3f')](handleError(_0x1bca72,null));};exports[_0x97ba('0x40')]=function(_0x4419dd,_0x4e9dab){var _0x2d009d={'raw':!![],'where':{'id':_0x4419dd['params']['id']}},_0x3442cb={};_0x3442cb[_0x97ba('0x2c')]=_[_0x97ba('0x2e')](db[_0x97ba('0x28')][_0x97ba('0x29')]);_0x3442cb[_0x97ba('0x2d')]=_['keys'](_0x4419dd['query']);_0x3442cb[_0x97ba('0x2f')]=_['intersection'](_0x3442cb[_0x97ba('0x2c')],_0x3442cb['query']);_0x2d009d[_0x97ba('0x30')]=_[_0x97ba('0x31')](_0x3442cb['model'],qs['fields'](_0x4419dd[_0x97ba('0x2d')]['fields']));_0x2d009d[_0x97ba('0x30')]=_0x2d009d['attributes'][_0x97ba('0x33')]?_0x2d009d[_0x97ba('0x30')]:_0x3442cb[_0x97ba('0x2c')];if(_0x4419dd['query'][_0x97ba('0x3c')]){_0x2d009d[_0x97ba('0x41')]=[{'all':!![]}];}_0x2d009d=_[_0x97ba('0x3a')]({},_0x2d009d,_0x4419dd[_0x97ba('0x3b')]);return db[_0x97ba('0x28')][_0x97ba('0x42')](_0x2d009d)[_0x97ba('0x1f')](handleEntityNotFound(_0x4e9dab,null))['then'](respondWithResult(_0x4e9dab,null))[_0x97ba('0x3f')](handleError(_0x4e9dab,null));};exports[_0x97ba('0x43')]=function(_0xa2f9f,_0xe7a2ef){return db['CmContactHasItem'][_0x97ba('0x43')](_0xa2f9f[_0x97ba('0x44')],{})[_0x97ba('0x1f')](function(_0x243ae4){var _0x2f1f96=_0xa2f9f[_0x97ba('0x45')][_0x97ba('0x21')]({'plain':!![]});if(!_0x2f1f96)throw new Error('Unable\x20to\x20retrieve\x20the\x20current\x20user');if(_0x2f1f96[_0x97ba('0x46')]===_0x97ba('0x45')){var _0x4513a6=_0x243ae4[_0x97ba('0x21')]({'plain':!![]});var _0x154d3e=_0x97ba('0x22');return db[_0x97ba('0x47')][_0x97ba('0x42')]({'where':{'name':_0x154d3e,'userProfileId':_0x2f1f96['userProfileId']},'raw':!![]})['then'](function(_0x523a4f){if(_0x523a4f&&_0x523a4f[_0x97ba('0x48')]===0x0){return db[_0x97ba('0x23')][_0x97ba('0x43')]({'name':_0x4513a6['name'],'resourceId':_0x4513a6['id'],'type':_0x523a4f[_0x97ba('0x25')],'sectionId':_0x523a4f['id']},{})[_0x97ba('0x1f')](function(){return _0x243ae4;});}else{return _0x243ae4;}})[_0x97ba('0x3f')](function(_0x2d05c4){logger[_0x97ba('0x24')](_0x97ba('0x49'),_0x2d05c4);throw _0x2d05c4;});}return _0x243ae4;})[_0x97ba('0x1f')](respondWithResult(_0xe7a2ef,0xc9))['catch'](handleError(_0xe7a2ef,null));};exports['update']=function(_0x3854c6,_0x12c059){if(_0x3854c6[_0x97ba('0x44')]['id']){delete _0x3854c6[_0x97ba('0x44')]['id'];}return db[_0x97ba('0x28')][_0x97ba('0x42')]({'where':{'id':_0x3854c6[_0x97ba('0x4a')]['id']}})['then'](handleEntityNotFound(_0x12c059,null))[_0x97ba('0x1f')](saveUpdates(_0x3854c6['body'],null))[_0x97ba('0x1f')](respondWithResult(_0x12c059,null))['catch'](handleError(_0x12c059,null));};exports[_0x97ba('0x20')]=function(_0x51b5ac,_0x5a37c3){return db[_0x97ba('0x28')][_0x97ba('0x42')]({'where':{'id':_0x51b5ac['params']['id']}})[_0x97ba('0x1f')](handleEntityNotFound(_0x5a37c3,null))['then'](removeEntity(_0x5a37c3,null))[_0x97ba('0x3f')](handleError(_0x5a37c3,null));}; \ No newline at end of file diff --git a/server/api/cmContactHasItem/cmContactHasItem.model.js b/server/api/cmContactHasItem/cmContactHasItem.model.js index 1eaf0a1..c7ec08d 100644 --- a/server/api/cmContactHasItem/cmContactHasItem.model.js +++ b/server/api/cmContactHasItem/cmContactHasItem.model.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x1378=['define','CmContactHasItem','cm_contact_has_items','util','../../config/logger','moment','bluebird','request-promise','path','../../config/environment','./cmContactHasItem.attributes','exports'];(function(_0x33032e,_0x31411a){var _0x13316b=function(_0x2fb049){while(--_0x2fb049){_0x33032e['push'](_0x33032e['shift']());}};_0x13316b(++_0x31411a);}(_0x1378,0x1b3));var _0x8137=function(_0xb57e34,_0x346cf3){_0xb57e34=_0xb57e34-0x0;var _0xecd0d6=_0x1378[_0xb57e34];return _0xecd0d6;};'use strict';var _=require('lodash');var util=require(_0x8137('0x0'));var logger=require(_0x8137('0x1'))('api');var moment=require(_0x8137('0x2'));var BPromise=require(_0x8137('0x3'));var rp=require(_0x8137('0x4'));var fs=require('fs');var path=require(_0x8137('0x5'));var rimraf=require('rimraf');var config=require(_0x8137('0x6'));var attributes=require(_0x8137('0x7'));module[_0x8137('0x8')]=function(_0x3dc721,_0x45a1c6){return _0x3dc721[_0x8137('0x9')](_0x8137('0xa'),attributes,{'tableName':_0x8137('0xb'),'paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file +var _0xc7fa=['define','CmContactHasItem','lodash','util','../../config/logger','bluebird','request-promise','path','rimraf','../../config/environment','./cmContactHasItem.attributes','exports'];(function(_0x5b2997,_0x142134){var _0x32dc83=function(_0x4697c2){while(--_0x4697c2){_0x5b2997['push'](_0x5b2997['shift']());}};_0x32dc83(++_0x142134);}(_0xc7fa,0x7a));var _0xac7f=function(_0x2dc269,_0x2c629d){_0x2dc269=_0x2dc269-0x0;var _0x2e0b7a=_0xc7fa[_0x2dc269];return _0x2e0b7a;};'use strict';var _=require(_0xac7f('0x0'));var util=require(_0xac7f('0x1'));var logger=require(_0xac7f('0x2'))('api');var moment=require('moment');var BPromise=require(_0xac7f('0x3'));var rp=require(_0xac7f('0x4'));var fs=require('fs');var path=require(_0xac7f('0x5'));var rimraf=require(_0xac7f('0x6'));var config=require(_0xac7f('0x7'));var attributes=require(_0xac7f('0x8'));module[_0xac7f('0x9')]=function(_0x4b8229,_0xf84692){return _0x4b8229[_0xac7f('0xa')](_0xac7f('0xb'),attributes,{'tableName':'cm_contact_has_items','paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file diff --git a/server/api/cmContactHasItem/cmContactHasItem.rpc.js b/server/api/cmContactHasItem/cmContactHasItem.rpc.js index 821c53d..3a8553c 100644 --- a/server/api/cmContactHasItem/cmContactHasItem.rpc.js +++ b/server/api/cmContactHasItem/cmContactHasItem.rpc.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xc727=['request\x20sent','debug','CmContactHasItem,\x20%s,\x20%s,\x20%s','stringify','error','code','message','catch','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','jayson/promise','client','http','request','info','CmContactHasItem,\x20%s,\x20%s'];(function(_0x2c91e9,_0x2fb965){var _0x13f0ff=function(_0xb39edf){while(--_0xb39edf){_0x2c91e9['push'](_0x2c91e9['shift']());}};_0x13f0ff(++_0x2fb965);}(_0xc727,0x67));var _0x7c72=function(_0x22e1ce,_0x15b06e){_0x22e1ce=_0x22e1ce-0x0;var _0x52dd48=_0xc727[_0x22e1ce];return _0x52dd48;};'use strict';var _=require('lodash');var util=require('util');var moment=require('moment');var BPromise=require('bluebird');var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x7c72('0x0'));var db=require(_0x7c72('0x1'))['db'];var utils=require(_0x7c72('0x2'));var logger=require(_0x7c72('0x3'))(_0x7c72('0x4'));var config=require('../../config/environment');var jayson=require(_0x7c72('0x5'));var client=jayson[_0x7c72('0x6')][_0x7c72('0x7')]({'port':0x232a});function respondWithRpcPromise(_0x15a0a3,_0x2c80c9,_0x25637d){return new BPromise(function(_0x2b5a36,_0x37ec6a){return client[_0x7c72('0x8')](_0x15a0a3,_0x25637d)['then'](function(_0x42cbe4){logger[_0x7c72('0x9')](_0x7c72('0xa'),_0x2c80c9,_0x7c72('0xb'));logger[_0x7c72('0xc')](_0x7c72('0xd'),_0x2c80c9,'request\x20sent',JSON[_0x7c72('0xe')](_0x42cbe4));if(_0x42cbe4['error']){if(_0x42cbe4[_0x7c72('0xf')][_0x7c72('0x10')]===0x1f4){logger[_0x7c72('0xf')](_0x7c72('0xa'),_0x2c80c9,_0x42cbe4[_0x7c72('0xf')]['message']);return _0x37ec6a(_0x42cbe4[_0x7c72('0xf')][_0x7c72('0x11')]);}logger['error'](_0x7c72('0xa'),_0x2c80c9,_0x42cbe4[_0x7c72('0xf')][_0x7c72('0x11')]);return _0x2b5a36(_0x42cbe4['error'][_0x7c72('0x11')]);}else{logger[_0x7c72('0x9')]('CmContactHasItem,\x20%s,\x20%s',_0x2c80c9,_0x7c72('0xb'));_0x2b5a36(_0x42cbe4['result'][_0x7c72('0x11')]);}})[_0x7c72('0x12')](function(_0x49247d){logger[_0x7c72('0xf')]('CmContactHasItem,\x20%s,\x20%s',_0x2c80c9,_0x49247d);_0x37ec6a(_0x49247d);});});} \ No newline at end of file +var _0xf43a=['moment','bluebird','randomstring','ioredis','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','http','then','info','request\x20sent','debug','CmContactHasItem,\x20%s,\x20%s,\x20%s','stringify','error','CmContactHasItem,\x20%s,\x20%s','message','result','catch','util'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0xf43a,0x99));var _0xaf43=function(_0x14a0a8,_0x27d4d8){_0x14a0a8=_0x14a0a8-0x0;var _0x12ba2e=_0xf43a[_0x14a0a8];return _0x12ba2e;};'use strict';var _=require('lodash');var util=require(_0xaf43('0x0'));var moment=require(_0xaf43('0x1'));var BPromise=require(_0xaf43('0x2'));var rs=require(_0xaf43('0x3'));var fs=require('fs');var Redis=require(_0xaf43('0x4'));var db=require('../../mysqldb')['db'];var utils=require(_0xaf43('0x5'));var logger=require(_0xaf43('0x6'))(_0xaf43('0x7'));var config=require(_0xaf43('0x8'));var jayson=require(_0xaf43('0x9'));var client=jayson['client'][_0xaf43('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x190543,_0x11ba2c,_0x1ac0c6){return new BPromise(function(_0x2d430d,_0x281d2d){return client['request'](_0x190543,_0x1ac0c6)[_0xaf43('0xb')](function(_0x534746){logger[_0xaf43('0xc')]('CmContactHasItem,\x20%s,\x20%s',_0x11ba2c,_0xaf43('0xd'));logger[_0xaf43('0xe')](_0xaf43('0xf'),_0x11ba2c,_0xaf43('0xd'),JSON[_0xaf43('0x10')](_0x534746));if(_0x534746[_0xaf43('0x11')]){if(_0x534746[_0xaf43('0x11')]['code']===0x1f4){logger[_0xaf43('0x11')](_0xaf43('0x12'),_0x11ba2c,_0x534746[_0xaf43('0x11')][_0xaf43('0x13')]);return _0x281d2d(_0x534746[_0xaf43('0x11')]['message']);}logger[_0xaf43('0x11')](_0xaf43('0x12'),_0x11ba2c,_0x534746[_0xaf43('0x11')][_0xaf43('0x13')]);return _0x2d430d(_0x534746['error'][_0xaf43('0x13')]);}else{logger[_0xaf43('0xc')]('CmContactHasItem,\x20%s,\x20%s',_0x11ba2c,_0xaf43('0xd'));_0x2d430d(_0x534746[_0xaf43('0x14')][_0xaf43('0x13')]);}})[_0xaf43('0x15')](function(_0x422ab9){logger[_0xaf43('0x11')](_0xaf43('0x12'),_0x11ba2c,_0x422ab9);_0x281d2d(_0x422ab9);});});} \ No newline at end of file diff --git a/server/api/cmContactHasItem/index.js b/server/api/cmContactHasItem/index.js index f7c8f95..d9b29a1 100644 --- a/server/api/cmContactHasItem/index.js +++ b/server/api/cmContactHasItem/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x8f09=['delete','destroy','exports','multer','path','Router','../../components/auth/service','../../components/interaction/service','../../config/environment','./cmContactHasItem.controller','isAuthenticated','index','get','/:id','post','create','put'];(function(_0x2ef7a3,_0x3f6d4c){var _0x20c338=function(_0x3b8843){while(--_0x3b8843){_0x2ef7a3['push'](_0x2ef7a3['shift']());}};_0x20c338(++_0x3f6d4c);}(_0x8f09,0x157));var _0x98f0=function(_0x2b510f,_0x376848){_0x2b510f=_0x2b510f-0x0;var _0x586582=_0x8f09[_0x2b510f];return _0x586582;};'use strict';var multer=require(_0x98f0('0x0'));var util=require('util');var path=require(_0x98f0('0x1'));var timeout=require('connect-timeout');var express=require('express');var router=express[_0x98f0('0x2')]();var fs_extra=require('fs-extra');var auth=require(_0x98f0('0x3'));var interaction=require(_0x98f0('0x4'));var config=require(_0x98f0('0x5'));var controller=require(_0x98f0('0x6'));router['get']('/',auth[_0x98f0('0x7')](),controller[_0x98f0('0x8')]);router[_0x98f0('0x9')](_0x98f0('0xa'),auth[_0x98f0('0x7')](),controller['show']);router[_0x98f0('0xb')]('/',auth['isAuthenticated'](),controller[_0x98f0('0xc')]);router[_0x98f0('0xd')]('/:id',auth[_0x98f0('0x7')](),controller['update']);router[_0x98f0('0xe')](_0x98f0('0xa'),auth['isAuthenticated'](),controller[_0x98f0('0xf')]);module[_0x98f0('0x10')]=router; \ No newline at end of file +var _0x02f9=['get','isAuthenticated','index','/:id','show','post','create','update','delete','destroy','exports','multer','connect-timeout','express','Router','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','./cmContactHasItem.controller'];(function(_0x4da55a,_0x4a0462){var _0x143f59=function(_0xfbdb9a){while(--_0xfbdb9a){_0x4da55a['push'](_0x4da55a['shift']());}};_0x143f59(++_0x4a0462);}(_0x02f9,0x123));var _0x902f=function(_0x3f22e8,_0x37732a){_0x3f22e8=_0x3f22e8-0x0;var _0x368a7e=_0x02f9[_0x3f22e8];return _0x368a7e;};'use strict';var multer=require(_0x902f('0x0'));var util=require('util');var path=require('path');var timeout=require(_0x902f('0x1'));var express=require(_0x902f('0x2'));var router=express[_0x902f('0x3')]();var fs_extra=require(_0x902f('0x4'));var auth=require(_0x902f('0x5'));var interaction=require(_0x902f('0x6'));var config=require(_0x902f('0x7'));var controller=require(_0x902f('0x8'));router[_0x902f('0x9')]('/',auth[_0x902f('0xa')](),controller[_0x902f('0xb')]);router[_0x902f('0x9')](_0x902f('0xc'),auth[_0x902f('0xa')](),controller[_0x902f('0xd')]);router[_0x902f('0xe')]('/',auth[_0x902f('0xa')](),controller[_0x902f('0xf')]);router['put'](_0x902f('0xc'),auth['isAuthenticated'](),controller[_0x902f('0x10')]);router[_0x902f('0x11')]('/:id',auth[_0x902f('0xa')](),controller[_0x902f('0x12')]);module[_0x902f('0x13')]=router; \ No newline at end of file diff --git a/server/api/cmCustomField/cmCustomField.attributes.js b/server/api/cmCustomField/cmCustomField.attributes.js index 7fe4d91..4df73c8 100644 --- a/server/api/cmCustomField/cmCustomField.attributes.js +++ b/server/api/cmCustomField/cmCustomField.attributes.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x711f=['select','parse','values','isArray','ENUM','voice','sequelize','lodash','exports','VIRTUAL','alias','setDataValue','getDataValue','name','STRING','TEXT','long','type'];(function(_0x3f0c06,_0x3d0ecf){var _0x507d9f=function(_0xd3a037){while(--_0xd3a037){_0x3f0c06['push'](_0x3f0c06['shift']());}};_0x507d9f(++_0x3d0ecf);}(_0x711f,0x16e));var _0xf711=function(_0x460150,_0x232949){_0x460150=_0x460150-0x0;var _0x340677=_0x711f[_0x460150];return _0x340677;};'use strict';var Sequelize=require(_0xf711('0x0'));var _=require(_0xf711('0x1'));module[_0xf711('0x2')]={'name':{'type':Sequelize[_0xf711('0x3')],'get':function(_0x4c0f55){return this['getDataValue'](_0xf711('0x4'));}},'alias':{'type':Sequelize['STRING'],'allowNull':![],'set':function(_0x113329){this[_0xf711('0x5')]('alias',_0x113329?_0x113329:this[_0xf711('0x6')](_0xf711('0x7')));}},'type':{'type':Sequelize[_0xf711('0x8')],'allowNull':![]},'values':{'type':Sequelize[_0xf711('0x9')](_0xf711('0xa')),'get':function(){if(this[_0xf711('0x6')](_0xf711('0xb'))===_0xf711('0xc')){return JSON[_0xf711('0xd')](this[_0xf711('0x6')](_0xf711('0xe')));}else{return this[_0xf711('0x6')](_0xf711('0xe'));}},'set':function(_0x1092da){if(Array[_0xf711('0xf')](_0x1092da)){this[_0xf711('0x5')]('values',JSON['stringify'](_0x1092da));}else{this[_0xf711('0x5')]('values',_0x1092da);}}},'required':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'clickToAction':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'actionType':{'type':Sequelize[_0xf711('0x10')](_0xf711('0x11'))}}; \ No newline at end of file +var _0x6671=['lodash','exports','VIRTUAL','alias','STRING','setDataValue','getDataValue','name','TEXT','long','type','select','values','isArray','stringify','BOOLEAN','ENUM','voice','sequelize'];(function(_0x266d98,_0x45a32e){var _0x3f0f9a=function(_0x290bbb){while(--_0x290bbb){_0x266d98['push'](_0x266d98['shift']());}};_0x3f0f9a(++_0x45a32e);}(_0x6671,0x84));var _0x1667=function(_0x431bf0,_0x223e9d){_0x431bf0=_0x431bf0-0x0;var _0x2818a7=_0x6671[_0x431bf0];return _0x2818a7;};'use strict';var Sequelize=require(_0x1667('0x0'));var _=require(_0x1667('0x1'));module[_0x1667('0x2')]={'name':{'type':Sequelize[_0x1667('0x3')],'get':function(_0x1ee6fd){return this['getDataValue'](_0x1667('0x4'));}},'alias':{'type':Sequelize[_0x1667('0x5')],'allowNull':![],'set':function(_0xa3b1bc){this[_0x1667('0x6')](_0x1667('0x4'),_0xa3b1bc?_0xa3b1bc:this[_0x1667('0x7')](_0x1667('0x8')));}},'type':{'type':Sequelize['STRING'],'allowNull':![]},'values':{'type':Sequelize[_0x1667('0x9')](_0x1667('0xa')),'get':function(){if(this[_0x1667('0x7')](_0x1667('0xb'))===_0x1667('0xc')){return JSON['parse'](this[_0x1667('0x7')](_0x1667('0xd')));}else{return this[_0x1667('0x7')]('values');}},'set':function(_0x3f5476){if(Array[_0x1667('0xe')](_0x3f5476)){this[_0x1667('0x6')](_0x1667('0xd'),JSON[_0x1667('0xf')](_0x3f5476));}else{this[_0x1667('0x6')](_0x1667('0xd'),_0x3f5476);}}},'required':{'type':Sequelize[_0x1667('0x10')],'defaultValue':![]},'clickToAction':{'type':Sequelize[_0x1667('0x10')],'defaultValue':![]},'actionType':{'type':Sequelize[_0x1667('0x11')](_0x1667('0x12'))}}; \ No newline at end of file diff --git a/server/api/cmCustomField/cmCustomField.controller.js b/server/api/cmCustomField/cmCustomField.controller.js index d60320e..43e65d9 100644 --- a/server/api/cmCustomField/cmCustomField.controller.js +++ b/server/api/cmCustomField/cmCustomField.controller.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x7b0d=['text','TEXT','INTEGER','defaultValue','sequelize','queryInterface','addColumn','cm_contacts','cf_%d','rimraf','zip-dir','request-promise','moment','bluebird','mustache','util','sox','to-csv','fs-extra','lodash','squel','crypto','querystring','ioredis','../../components/auth/service','../../config/license/hardware','api','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','sendStatus','status','json','offset','limit','count','set','apply','reject','save','error','stack','name','send','index','map','CmCustomField','rawAttributes','type','key','model','differenceBy','query','filters','intersection','attributes','fields','length','hasOwnProperty','nolimit','order','sort','where','pick','filter','merge','options','then','includeAll','include','rows','show','params','keys','update','body','find','catch','destroy','create','transaction','Sequelize'];(function(_0x545acc,_0x48a6cd){var _0x393fc3=function(_0xbfae13){while(--_0xbfae13){_0x545acc['push'](_0x545acc['shift']());}};_0x393fc3(++_0x48a6cd);}(_0x7b0d,0x155));var _0xd7b0=function(_0x3b380d,_0x4bf247){_0x3b380d=_0x3b380d-0x0;var _0x54502b=_0x7b0d[_0x3b380d];return _0x54502b;};'use strict';var emlformat=require('eml-format');var rimraf=require(_0xd7b0('0x0'));var zipdir=require(_0xd7b0('0x1'));var jsonpatch=require('fast-json-patch');var rp=require(_0xd7b0('0x2'));var moment=require(_0xd7b0('0x3'));var BPromise=require(_0xd7b0('0x4'));var Mustache=require(_0xd7b0('0x5'));var util=require(_0xd7b0('0x6'));var path=require('path');var sox=require(_0xd7b0('0x7'));var csv=require(_0xd7b0('0x8'));var ejs=require('ejs');var fs=require('fs');var fs_extra=require(_0xd7b0('0x9'));var _=require(_0xd7b0('0xa'));var squel=require(_0xd7b0('0xb'));var crypto=require(_0xd7b0('0xc'));var jsforce=require('jsforce');var deskjs=require('desk.js');var toCsv=require('to-csv');var querystring=require(_0xd7b0('0xd'));var Papa=require('papaparse');var Redis=require(_0xd7b0('0xe'));var authService=require(_0xd7b0('0xf'));var qs=require('../../components/parsers/qs');var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0xd7b0('0x10'));var logger=require('../../config/logger')(_0xd7b0('0x11'));var utils=require(_0xd7b0('0x12'));var config=require(_0xd7b0('0x13'));var licenseUtil=require(_0xd7b0('0x14'));var db=require(_0xd7b0('0x15'))['db'];function respondWithStatusCode(_0xf2f4cc,_0x16183f){_0x16183f=_0x16183f||0xcc;return function(_0x397ab0){if(_0x397ab0){return _0xf2f4cc[_0xd7b0('0x16')](_0x16183f);}return _0xf2f4cc['status'](_0x16183f)['end']();};}function respondWithResult(_0x4c704c,_0x57896c){_0x57896c=_0x57896c||0xc8;return function(_0x3d176c){if(_0x3d176c){return _0x4c704c[_0xd7b0('0x17')](_0x57896c)[_0xd7b0('0x18')](_0x3d176c);}};}function respondWithFilteredResult(_0x3036a4,_0x483670){return function(_0x51b9d1){if(_0x51b9d1){var _0x3709b1=typeof _0x483670[_0xd7b0('0x19')]==='undefined'&&typeof _0x483670[_0xd7b0('0x1a')]==='undefined';var _0x31305c=_0x51b9d1['count'];var _0x575a4d=_0x3709b1?0x0:_0x483670['offset'];var _0x33e405=_0x3709b1?_0x51b9d1[_0xd7b0('0x1b')]:_0x483670[_0xd7b0('0x19')]+_0x483670[_0xd7b0('0x1a')];var _0x4d6e97;if(_0x33e405>=_0x31305c){_0x33e405=_0x31305c;_0x4d6e97=0xc8;}else{_0x4d6e97=0xce;}_0x3036a4[_0xd7b0('0x17')](_0x4d6e97);return _0x3036a4[_0xd7b0('0x1c')]('Content-Range',_0x575a4d+'-'+_0x33e405+'/'+_0x31305c)['json'](_0x51b9d1);}return null;};}function patchUpdates(_0x422812){return function(_0x121c19){try{jsonpatch[_0xd7b0('0x1d')](_0x121c19,_0x422812,!![]);}catch(_0x4f2ebb){return BPromise[_0xd7b0('0x1e')](_0x4f2ebb);}return _0x121c19[_0xd7b0('0x1f')]();};}function saveUpdates(_0x2bac87,_0x46b1c6){return function(_0x2090d8){if(_0x2090d8){return _0x2090d8['update'](_0x2bac87)['then'](function(_0x412d5e){return _0x412d5e;});}return null;};}function removeEntity(_0x32151d,_0x533df7){return function(_0x2ebfa4){if(_0x2ebfa4){return _0x2ebfa4['destroy']()['then'](function(){_0x32151d[_0xd7b0('0x17')](0xcc)['end']();});}};}function handleEntityNotFound(_0x455dbe,_0x3226dc){return function(_0x20e7c2){if(!_0x20e7c2){_0x455dbe['sendStatus'](0x194);}return _0x20e7c2;};}function handleError(_0x549dcd,_0x1be772){_0x1be772=_0x1be772||0x1f4;return function(_0x5890e3){logger[_0xd7b0('0x20')](_0x5890e3[_0xd7b0('0x21')]);if(_0x5890e3['name']){delete _0x5890e3[_0xd7b0('0x22')];}_0x549dcd['status'](_0x1be772)[_0xd7b0('0x23')](_0x5890e3);};}exports[_0xd7b0('0x24')]=function(_0x2138ff,_0x4eeb4f){var _0x3cb8b8={},_0x2ae949={},_0x5be6e8={'count':0x0,'rows':[]};var _0x28a583=_[_0xd7b0('0x25')](db[_0xd7b0('0x26')][_0xd7b0('0x27')],function(_0x41782a){return{'name':_0x41782a['fieldName'],'type':_0x41782a[_0xd7b0('0x28')][_0xd7b0('0x29')]};});_0x2ae949[_0xd7b0('0x2a')]=_[_0xd7b0('0x2b')](_['map'](_0x28a583,_0xd7b0('0x22')),[_0xd7b0('0x22')]);_0x2ae949['query']=_['keys'](_0x2138ff[_0xd7b0('0x2c')]);_0x2ae949[_0xd7b0('0x2d')]=_[_0xd7b0('0x2e')](_0x2ae949[_0xd7b0('0x2a')],_0x2ae949[_0xd7b0('0x2c')]);_0x3cb8b8[_0xd7b0('0x2f')]=_[_0xd7b0('0x2e')](_0x2ae949[_0xd7b0('0x2a')],qs['fields'](_0x2138ff[_0xd7b0('0x2c')][_0xd7b0('0x30')]));_0x3cb8b8['attributes']=_0x3cb8b8['attributes'][_0xd7b0('0x31')]?_0x3cb8b8[_0xd7b0('0x2f')]:_0x2ae949[_0xd7b0('0x2a')];if(!_0x2138ff[_0xd7b0('0x2c')][_0xd7b0('0x32')](_0xd7b0('0x33'))){_0x3cb8b8[_0xd7b0('0x1a')]=qs[_0xd7b0('0x1a')](_0x2138ff[_0xd7b0('0x2c')]['limit']);_0x3cb8b8['offset']=qs[_0xd7b0('0x19')](_0x2138ff[_0xd7b0('0x2c')][_0xd7b0('0x19')]);}_0x3cb8b8[_0xd7b0('0x34')]=qs[_0xd7b0('0x35')](_0x2138ff['query'][_0xd7b0('0x35')]);_0x3cb8b8[_0xd7b0('0x36')]=qs[_0xd7b0('0x2d')](_[_0xd7b0('0x37')](_0x2138ff['query'],_0x2ae949['filters']),_0x28a583);if(_0x2138ff[_0xd7b0('0x2c')][_0xd7b0('0x38')]){_0x3cb8b8[_0xd7b0('0x36')]=_[_0xd7b0('0x39')](_0x3cb8b8[_0xd7b0('0x36')],{'$or':_[_0xd7b0('0x25')](_0x28a583,function(_0x4ce1f1){if(_0x4ce1f1[_0xd7b0('0x28')]!=='VIRTUAL'){var _0x10f154={};_0x10f154[_0x4ce1f1[_0xd7b0('0x22')]]={'$like':'%'+_0x2138ff[_0xd7b0('0x2c')][_0xd7b0('0x38')]+'%'};return _0x10f154;}})});}_0x3cb8b8=_[_0xd7b0('0x39')]({},_0x3cb8b8,_0x2138ff[_0xd7b0('0x3a')]);var _0x1301a9={'where':_0x3cb8b8[_0xd7b0('0x36')]};return db['CmCustomField'][_0xd7b0('0x1b')](_0x1301a9)[_0xd7b0('0x3b')](function(_0x3bfb7b){_0x5be6e8[_0xd7b0('0x1b')]=_0x3bfb7b;if(_0x2138ff[_0xd7b0('0x2c')][_0xd7b0('0x3c')]){_0x3cb8b8[_0xd7b0('0x3d')]=[{'all':!![]}];}return db[_0xd7b0('0x26')]['findAll'](_0x3cb8b8);})[_0xd7b0('0x3b')](function(_0x2cdce2){_0x5be6e8[_0xd7b0('0x3e')]=_0x2cdce2;return _0x5be6e8;})[_0xd7b0('0x3b')](respondWithFilteredResult(_0x4eeb4f,_0x3cb8b8))['catch'](handleError(_0x4eeb4f,null));};exports[_0xd7b0('0x3f')]=function(_0x117708,_0x2d47e6){var _0x4d2dd3={'raw':!![],'where':{'id':_0x117708[_0xd7b0('0x40')]['id']}},_0x276c59={};_0x276c59[_0xd7b0('0x2a')]=_[_0xd7b0('0x41')](db[_0xd7b0('0x26')][_0xd7b0('0x27')]);_0x276c59['query']=_['keys'](_0x117708[_0xd7b0('0x2c')]);_0x276c59[_0xd7b0('0x2d')]=_[_0xd7b0('0x2e')](_0x276c59[_0xd7b0('0x2a')],_0x276c59[_0xd7b0('0x2c')]);_0x4d2dd3[_0xd7b0('0x2f')]=_[_0xd7b0('0x2e')](_0x276c59[_0xd7b0('0x2a')],qs['fields'](_0x117708[_0xd7b0('0x2c')][_0xd7b0('0x30')]));_0x4d2dd3[_0xd7b0('0x2f')]=_0x4d2dd3[_0xd7b0('0x2f')]['length']?_0x4d2dd3[_0xd7b0('0x2f')]:_0x276c59[_0xd7b0('0x2a')];if(_0x117708[_0xd7b0('0x2c')]['includeAll']){_0x4d2dd3[_0xd7b0('0x3d')]=[{'all':!![]}];}_0x4d2dd3=_[_0xd7b0('0x39')]({},_0x4d2dd3,_0x117708[_0xd7b0('0x3a')]);return db[_0xd7b0('0x26')]['find'](_0x4d2dd3)[_0xd7b0('0x3b')](handleEntityNotFound(_0x2d47e6,null))[_0xd7b0('0x3b')](respondWithResult(_0x2d47e6,null))['catch'](handleError(_0x2d47e6,null));};exports[_0xd7b0('0x42')]=function(_0x58d23e,_0x452367){if(_0x58d23e[_0xd7b0('0x43')]['id']){delete _0x58d23e['body']['id'];}return db[_0xd7b0('0x26')][_0xd7b0('0x44')]({'where':{'id':_0x58d23e[_0xd7b0('0x40')]['id']}})['then'](handleEntityNotFound(_0x452367,null))[_0xd7b0('0x3b')](saveUpdates(_0x58d23e['body'],null))['then'](respondWithResult(_0x452367,null))[_0xd7b0('0x45')](handleError(_0x452367,null));};exports[_0xd7b0('0x46')]=function(_0x4d450b,_0x20337f){return db[_0xd7b0('0x26')]['find']({'where':{'id':_0x4d450b[_0xd7b0('0x40')]['id']}})[_0xd7b0('0x3b')](handleEntityNotFound(_0x20337f,null))[_0xd7b0('0x3b')](removeEntity(_0x20337f,null))[_0xd7b0('0x45')](handleError(_0x20337f,null));};exports[_0xd7b0('0x47')]=function(_0x25dd92,_0x11f1f8){var _0x321dc8;return db['sequelize'][_0xd7b0('0x48')](function(_0x1117de){return db[_0xd7b0('0x26')][_0xd7b0('0x47')](_0x25dd92['body'],{'transaction':_0x1117de})[_0xd7b0('0x3b')](function(_0x4ef9fb){_0x321dc8=_0x4ef9fb;var _0x24b66c={'type':db[_0xd7b0('0x49')]['TEXT'],'transaction':_0x1117de};switch(_0x25dd92[_0xd7b0('0x43')][_0xd7b0('0x28')]){case _0xd7b0('0x4a'):_0x24b66c[_0xd7b0('0x28')]=db[_0xd7b0('0x49')][_0xd7b0('0x4b')];break;case'number':_0x24b66c['type']=db['Sequelize'][_0xd7b0('0x4c')];break;case'switch':_0x24b66c[_0xd7b0('0x28')]=db[_0xd7b0('0x49')]['BOOLEAN'];_0x24b66c[_0xd7b0('0x4d')]=![];break;default:}return db[_0xd7b0('0x4e')][_0xd7b0('0x4f')][_0xd7b0('0x50')](_0xd7b0('0x51'),util['format'](_0xd7b0('0x52'),_0x321dc8['id']),_0x24b66c);})[_0xd7b0('0x3b')](function(){return _0x321dc8;});})[_0xd7b0('0x3b')](respondWithResult(_0x11f1f8,0xc9))[_0xd7b0('0x45')](handleError(_0x11f1f8,null));}; \ No newline at end of file +var _0xc11a=['order','sort','where','filters','pick','filter','merge','options','includeAll','include','findAll','rows','catch','show','params','find','update','transaction','create','body','Sequelize','number','INTEGER','BOOLEAN','defaultValue','queryInterface','addColumn','cm_contacts','format','cf_%d','eml-format','rimraf','zip-dir','request-promise','mustache','util','path','sox','to-csv','fs-extra','lodash','squel','crypto','jsforce','desk.js','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../mysqldb','status','json','undefined','count','offset','set','Content-Range','apply','reject','save','then','destroy','end','sendStatus','error','name','send','index','map','CmCustomField','rawAttributes','fieldName','type','key','differenceBy','query','keys','intersection','model','fields','attributes','length','hasOwnProperty','nolimit','limit'];(function(_0x2c7516,_0x2ca7f1){var _0x1d76a2=function(_0x5ce25f){while(--_0x5ce25f){_0x2c7516['push'](_0x2c7516['shift']());}};_0x1d76a2(++_0x2ca7f1);}(_0xc11a,0x7a));var _0xac11=function(_0x7d62cb,_0x7622c){_0x7d62cb=_0x7d62cb-0x0;var _0x3a6266=_0xc11a[_0x7d62cb];return _0x3a6266;};'use strict';var emlformat=require(_0xac11('0x0'));var rimraf=require(_0xac11('0x1'));var zipdir=require(_0xac11('0x2'));var jsonpatch=require('fast-json-patch');var rp=require(_0xac11('0x3'));var moment=require('moment');var BPromise=require('bluebird');var Mustache=require(_0xac11('0x4'));var util=require(_0xac11('0x5'));var path=require(_0xac11('0x6'));var sox=require(_0xac11('0x7'));var csv=require(_0xac11('0x8'));var ejs=require('ejs');var fs=require('fs');var fs_extra=require(_0xac11('0x9'));var _=require(_0xac11('0xa'));var squel=require(_0xac11('0xb'));var crypto=require(_0xac11('0xc'));var jsforce=require(_0xac11('0xd'));var deskjs=require(_0xac11('0xe'));var toCsv=require('to-csv');var querystring=require(_0xac11('0xf'));var Papa=require(_0xac11('0x10'));var Redis=require(_0xac11('0x11'));var authService=require(_0xac11('0x12'));var qs=require(_0xac11('0x13'));var as=require(_0xac11('0x14'));var hardwareService=require(_0xac11('0x15'));var logger=require(_0xac11('0x16'))(_0xac11('0x17'));var utils=require(_0xac11('0x18'));var config=require(_0xac11('0x19'));var licenseUtil=require('../../config/license/util');var db=require(_0xac11('0x1a'))['db'];function respondWithStatusCode(_0x128ac9,_0x5e33f9){_0x5e33f9=_0x5e33f9||0xcc;return function(_0xbf2cb4){if(_0xbf2cb4){return _0x128ac9['sendStatus'](_0x5e33f9);}return _0x128ac9[_0xac11('0x1b')](_0x5e33f9)['end']();};}function respondWithResult(_0x61e33c,_0x20b40d){_0x20b40d=_0x20b40d||0xc8;return function(_0x22988d){if(_0x22988d){return _0x61e33c[_0xac11('0x1b')](_0x20b40d)[_0xac11('0x1c')](_0x22988d);}};}function respondWithFilteredResult(_0x34855e,_0x22c90f){return function(_0x10dbf1){if(_0x10dbf1){var _0x4c2f53=typeof _0x22c90f['offset']===_0xac11('0x1d')&&typeof _0x22c90f['limit']===_0xac11('0x1d');var _0x5c17c3=_0x10dbf1[_0xac11('0x1e')];var _0x8d6287=_0x4c2f53?0x0:_0x22c90f[_0xac11('0x1f')];var _0x48bf6b=_0x4c2f53?_0x10dbf1[_0xac11('0x1e')]:_0x22c90f['offset']+_0x22c90f['limit'];var _0x2f91e5;if(_0x48bf6b>=_0x5c17c3){_0x48bf6b=_0x5c17c3;_0x2f91e5=0xc8;}else{_0x2f91e5=0xce;}_0x34855e[_0xac11('0x1b')](_0x2f91e5);return _0x34855e[_0xac11('0x20')](_0xac11('0x21'),_0x8d6287+'-'+_0x48bf6b+'/'+_0x5c17c3)[_0xac11('0x1c')](_0x10dbf1);}return null;};}function patchUpdates(_0xf1e41b){return function(_0x599b88){try{jsonpatch[_0xac11('0x22')](_0x599b88,_0xf1e41b,!![]);}catch(_0x81bdf8){return BPromise[_0xac11('0x23')](_0x81bdf8);}return _0x599b88[_0xac11('0x24')]();};}function saveUpdates(_0x23ae39,_0x503413){return function(_0x11eb7e){if(_0x11eb7e){return _0x11eb7e['update'](_0x23ae39)[_0xac11('0x25')](function(_0xccb6e8){return _0xccb6e8;});}return null;};}function removeEntity(_0x1e1358,_0x17837c){return function(_0x2902df){if(_0x2902df){return _0x2902df[_0xac11('0x26')]()['then'](function(){_0x1e1358[_0xac11('0x1b')](0xcc)[_0xac11('0x27')]();});}};}function handleEntityNotFound(_0xc5c5db,_0x28ce24){return function(_0x18fb4a){if(!_0x18fb4a){_0xc5c5db[_0xac11('0x28')](0x194);}return _0x18fb4a;};}function handleError(_0x1bfb97,_0x5667e4){_0x5667e4=_0x5667e4||0x1f4;return function(_0x53db32){logger[_0xac11('0x29')](_0x53db32['stack']);if(_0x53db32[_0xac11('0x2a')]){delete _0x53db32[_0xac11('0x2a')];}_0x1bfb97['status'](_0x5667e4)[_0xac11('0x2b')](_0x53db32);};}exports[_0xac11('0x2c')]=function(_0x79c058,_0x228948){var _0x322d54={},_0x5d7735={},_0x3c5410={'count':0x0,'rows':[]};var _0xf1225d=_[_0xac11('0x2d')](db[_0xac11('0x2e')][_0xac11('0x2f')],function(_0x8714bd){return{'name':_0x8714bd[_0xac11('0x30')],'type':_0x8714bd[_0xac11('0x31')][_0xac11('0x32')]};});_0x5d7735['model']=_[_0xac11('0x33')](_['map'](_0xf1225d,'name'),[_0xac11('0x2a')]);_0x5d7735[_0xac11('0x34')]=_[_0xac11('0x35')](_0x79c058[_0xac11('0x34')]);_0x5d7735['filters']=_[_0xac11('0x36')](_0x5d7735[_0xac11('0x37')],_0x5d7735['query']);_0x322d54['attributes']=_[_0xac11('0x36')](_0x5d7735[_0xac11('0x37')],qs[_0xac11('0x38')](_0x79c058[_0xac11('0x34')]['fields']));_0x322d54[_0xac11('0x39')]=_0x322d54[_0xac11('0x39')][_0xac11('0x3a')]?_0x322d54[_0xac11('0x39')]:_0x5d7735[_0xac11('0x37')];if(!_0x79c058[_0xac11('0x34')][_0xac11('0x3b')](_0xac11('0x3c'))){_0x322d54[_0xac11('0x3d')]=qs['limit'](_0x79c058[_0xac11('0x34')][_0xac11('0x3d')]);_0x322d54[_0xac11('0x1f')]=qs[_0xac11('0x1f')](_0x79c058[_0xac11('0x34')]['offset']);}_0x322d54[_0xac11('0x3e')]=qs[_0xac11('0x3f')](_0x79c058['query'][_0xac11('0x3f')]);_0x322d54[_0xac11('0x40')]=qs[_0xac11('0x41')](_[_0xac11('0x42')](_0x79c058['query'],_0x5d7735['filters']),_0xf1225d);if(_0x79c058['query'][_0xac11('0x43')]){_0x322d54[_0xac11('0x40')]=_['merge'](_0x322d54[_0xac11('0x40')],{'$or':_[_0xac11('0x2d')](_0xf1225d,function(_0x576770){if(_0x576770[_0xac11('0x31')]!=='VIRTUAL'){var _0x1d69e2={};_0x1d69e2[_0x576770[_0xac11('0x2a')]]={'$like':'%'+_0x79c058['query']['filter']+'%'};return _0x1d69e2;}})});}_0x322d54=_[_0xac11('0x44')]({},_0x322d54,_0x79c058[_0xac11('0x45')]);var _0x37b3ec={'where':_0x322d54[_0xac11('0x40')]};return db[_0xac11('0x2e')]['count'](_0x37b3ec)[_0xac11('0x25')](function(_0x26ba5a){_0x3c5410[_0xac11('0x1e')]=_0x26ba5a;if(_0x79c058[_0xac11('0x34')][_0xac11('0x46')]){_0x322d54[_0xac11('0x47')]=[{'all':!![]}];}return db['CmCustomField'][_0xac11('0x48')](_0x322d54);})[_0xac11('0x25')](function(_0x34bf59){_0x3c5410[_0xac11('0x49')]=_0x34bf59;return _0x3c5410;})[_0xac11('0x25')](respondWithFilteredResult(_0x228948,_0x322d54))[_0xac11('0x4a')](handleError(_0x228948,null));};exports[_0xac11('0x4b')]=function(_0xf81f14,_0x5bab0d){var _0x412668={'raw':!![],'where':{'id':_0xf81f14[_0xac11('0x4c')]['id']}},_0x124e01={};_0x124e01[_0xac11('0x37')]=_['keys'](db[_0xac11('0x2e')][_0xac11('0x2f')]);_0x124e01[_0xac11('0x34')]=_[_0xac11('0x35')](_0xf81f14['query']);_0x124e01['filters']=_[_0xac11('0x36')](_0x124e01['model'],_0x124e01[_0xac11('0x34')]);_0x412668['attributes']=_[_0xac11('0x36')](_0x124e01['model'],qs[_0xac11('0x38')](_0xf81f14[_0xac11('0x34')]['fields']));_0x412668[_0xac11('0x39')]=_0x412668['attributes'][_0xac11('0x3a')]?_0x412668[_0xac11('0x39')]:_0x124e01['model'];if(_0xf81f14[_0xac11('0x34')][_0xac11('0x46')]){_0x412668[_0xac11('0x47')]=[{'all':!![]}];}_0x412668=_['merge']({},_0x412668,_0xf81f14['options']);return db[_0xac11('0x2e')][_0xac11('0x4d')](_0x412668)[_0xac11('0x25')](handleEntityNotFound(_0x5bab0d,null))[_0xac11('0x25')](respondWithResult(_0x5bab0d,null))[_0xac11('0x4a')](handleError(_0x5bab0d,null));};exports[_0xac11('0x4e')]=function(_0x42b34e,_0x2019b0){if(_0x42b34e['body']['id']){delete _0x42b34e['body']['id'];}return db[_0xac11('0x2e')][_0xac11('0x4d')]({'where':{'id':_0x42b34e[_0xac11('0x4c')]['id']}})[_0xac11('0x25')](handleEntityNotFound(_0x2019b0,null))[_0xac11('0x25')](saveUpdates(_0x42b34e['body'],null))[_0xac11('0x25')](respondWithResult(_0x2019b0,null))['catch'](handleError(_0x2019b0,null));};exports[_0xac11('0x26')]=function(_0xf50456,_0xdea77b){return db['CmCustomField']['find']({'where':{'id':_0xf50456[_0xac11('0x4c')]['id']}})[_0xac11('0x25')](handleEntityNotFound(_0xdea77b,null))[_0xac11('0x25')](removeEntity(_0xdea77b,null))[_0xac11('0x4a')](handleError(_0xdea77b,null));};exports['create']=function(_0x1a27c9,_0x508be3){var _0x240851;return db['sequelize'][_0xac11('0x4f')](function(_0x19f6da){return db['CmCustomField'][_0xac11('0x50')](_0x1a27c9[_0xac11('0x51')],{'transaction':_0x19f6da})[_0xac11('0x25')](function(_0x275712){_0x240851=_0x275712;var _0x579344={'type':db[_0xac11('0x52')]['TEXT'],'transaction':_0x19f6da};switch(_0x1a27c9[_0xac11('0x51')][_0xac11('0x31')]){case'text':_0x579344['type']=db[_0xac11('0x52')]['TEXT'];break;case _0xac11('0x53'):_0x579344[_0xac11('0x31')]=db['Sequelize'][_0xac11('0x54')];break;case'switch':_0x579344[_0xac11('0x31')]=db[_0xac11('0x52')][_0xac11('0x55')];_0x579344[_0xac11('0x56')]=![];break;default:}return db['sequelize'][_0xac11('0x57')][_0xac11('0x58')](_0xac11('0x59'),util[_0xac11('0x5a')](_0xac11('0x5b'),_0x240851['id']),_0x579344);})[_0xac11('0x25')](function(){return _0x240851;});})[_0xac11('0x25')](respondWithResult(_0x508be3,0xc9))[_0xac11('0x4a')](handleError(_0x508be3,null));}; \ No newline at end of file diff --git a/server/api/cmCustomField/cmCustomField.model.js b/server/api/cmCustomField/cmCustomField.model.js index 36554f0..b19444f 100644 --- a/server/api/cmCustomField/cmCustomField.model.js +++ b/server/api/cmCustomField/cmCustomField.model.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xc469=['lodash','util','../../config/logger','api','rimraf','./cmCustomField.attributes','define','CmCustomField','cm_custom_fields'];(function(_0x49affe,_0x5213f0){var _0x2ebd02=function(_0x14842d){while(--_0x14842d){_0x49affe['push'](_0x49affe['shift']());}};_0x2ebd02(++_0x5213f0);}(_0xc469,0x1cb));var _0x9c46=function(_0x454018,_0x46e33a){_0x454018=_0x454018-0x0;var _0x24697d=_0xc469[_0x454018];return _0x24697d;};'use strict';var _=require(_0x9c46('0x0'));var util=require(_0x9c46('0x1'));var logger=require(_0x9c46('0x2'))(_0x9c46('0x3'));var moment=require('moment');var BPromise=require('bluebird');var rp=require('request-promise');var fs=require('fs');var path=require('path');var rimraf=require(_0x9c46('0x4'));var config=require('../../config/environment');var attributes=require(_0x9c46('0x5'));module['exports']=function(_0x15a682,_0x1903d1){return _0x15a682[_0x9c46('0x6')](_0x9c46('0x7'),attributes,{'tableName':_0x9c46('0x8'),'paranoid':!![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file +var _0xc05f=['lodash','util','api','moment','bluebird','path','rimraf','../../config/environment','./cmCustomField.attributes','exports','CmCustomField','cm_custom_fields'];(function(_0x126558,_0x143c9a){var _0x1f6d14=function(_0x2b0eea){while(--_0x2b0eea){_0x126558['push'](_0x126558['shift']());}};_0x1f6d14(++_0x143c9a);}(_0xc05f,0x180));var _0xfc05=function(_0x3043fb,_0x28c1b2){_0x3043fb=_0x3043fb-0x0;var _0x23d434=_0xc05f[_0x3043fb];return _0x23d434;};'use strict';var _=require(_0xfc05('0x0'));var util=require(_0xfc05('0x1'));var logger=require('../../config/logger')(_0xfc05('0x2'));var moment=require(_0xfc05('0x3'));var BPromise=require(_0xfc05('0x4'));var rp=require('request-promise');var fs=require('fs');var path=require(_0xfc05('0x5'));var rimraf=require(_0xfc05('0x6'));var config=require(_0xfc05('0x7'));var attributes=require(_0xfc05('0x8'));module[_0xfc05('0x9')]=function(_0x2e4683,_0x5166af){return _0x2e4683['define'](_0xfc05('0xa'),attributes,{'tableName':_0xfc05('0xb'),'paranoid':!![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file diff --git a/server/api/cmCustomField/cmCustomField.rpc.js b/server/api/cmCustomField/cmCustomField.rpc.js index 01bdf16..7b7b7aa 100644 --- a/server/api/cmCustomField/cmCustomField.rpc.js +++ b/server/api/cmCustomField/cmCustomField.rpc.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xe050=['request','then','CmCustomField,\x20%s,\x20%s','debug','CmCustomField,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','code','message','info','result','catch','lodash','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','client','http'];(function(_0x1c9af1,_0x1e89f4){var _0x31ac1a=function(_0x51ec0e){while(--_0x51ec0e){_0x1c9af1['push'](_0x1c9af1['shift']());}};_0x31ac1a(++_0x1e89f4);}(_0xe050,0xc3));var _0x0e05=function(_0x27101d,_0x2d8ae7){_0x27101d=_0x27101d-0x0;var _0x3744f3=_0xe050[_0x27101d];return _0x3744f3;};'use strict';var _=require(_0x0e05('0x0'));var util=require(_0x0e05('0x1'));var moment=require(_0x0e05('0x2'));var BPromise=require(_0x0e05('0x3'));var rs=require(_0x0e05('0x4'));var fs=require('fs');var Redis=require(_0x0e05('0x5'));var db=require(_0x0e05('0x6'))['db'];var utils=require(_0x0e05('0x7'));var logger=require(_0x0e05('0x8'))(_0x0e05('0x9'));var config=require(_0x0e05('0xa'));var jayson=require('jayson/promise');var client=jayson[_0x0e05('0xb')][_0x0e05('0xc')]({'port':0x232a});function respondWithRpcPromise(_0x391a8e,_0x45f615,_0x26fd4c){return new BPromise(function(_0x43a07b,_0x5f2b0d){return client[_0x0e05('0xd')](_0x391a8e,_0x26fd4c)[_0x0e05('0xe')](function(_0x295646){logger['info'](_0x0e05('0xf'),_0x45f615,'request\x20sent');logger[_0x0e05('0x10')](_0x0e05('0x11'),_0x45f615,_0x0e05('0x12'),JSON[_0x0e05('0x13')](_0x295646));if(_0x295646[_0x0e05('0x14')]){if(_0x295646[_0x0e05('0x14')][_0x0e05('0x15')]===0x1f4){logger[_0x0e05('0x14')](_0x0e05('0xf'),_0x45f615,_0x295646[_0x0e05('0x14')][_0x0e05('0x16')]);return _0x5f2b0d(_0x295646[_0x0e05('0x14')][_0x0e05('0x16')]);}logger[_0x0e05('0x14')](_0x0e05('0xf'),_0x45f615,_0x295646[_0x0e05('0x14')]['message']);return _0x43a07b(_0x295646[_0x0e05('0x14')][_0x0e05('0x16')]);}else{logger[_0x0e05('0x17')](_0x0e05('0xf'),_0x45f615,_0x0e05('0x12'));_0x43a07b(_0x295646[_0x0e05('0x18')][_0x0e05('0x16')]);}})[_0x0e05('0x19')](function(_0x2c50e8){logger[_0x0e05('0x14')](_0x0e05('0xf'),_0x45f615,_0x2c50e8);_0x5f2b0d(_0x2c50e8);});});} \ No newline at end of file +var _0xdb12=['info','request\x20sent','CmCustomField,\x20%s,\x20%s,\x20%s','stringify','error','code','CmCustomField,\x20%s,\x20%s','message','result','catch','util','bluebird','ioredis','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','request'];(function(_0x3f2dcc,_0x57e4de){var _0x3a0dc2=function(_0x4e367f){while(--_0x4e367f){_0x3f2dcc['push'](_0x3f2dcc['shift']());}};_0x3a0dc2(++_0x57e4de);}(_0xdb12,0xd2));var _0x2db1=function(_0x18afca,_0x4219d9){_0x18afca=_0x18afca-0x0;var _0x11603f=_0xdb12[_0x18afca];return _0x11603f;};'use strict';var _=require('lodash');var util=require(_0x2db1('0x0'));var moment=require('moment');var BPromise=require(_0x2db1('0x1'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x2db1('0x2'));var db=require('../../mysqldb')['db'];var utils=require('../../config/utils');var logger=require(_0x2db1('0x3'))(_0x2db1('0x4'));var config=require(_0x2db1('0x5'));var jayson=require(_0x2db1('0x6'));var client=jayson[_0x2db1('0x7')][_0x2db1('0x8')]({'port':0x232a});function respondWithRpcPromise(_0x41ea65,_0x35e640,_0xc6ca32){return new BPromise(function(_0x4c2b8c,_0x1dbf1c){return client[_0x2db1('0x9')](_0x41ea65,_0xc6ca32)['then'](function(_0x173716){logger[_0x2db1('0xa')]('CmCustomField,\x20%s,\x20%s',_0x35e640,_0x2db1('0xb'));logger['debug'](_0x2db1('0xc'),_0x35e640,_0x2db1('0xb'),JSON[_0x2db1('0xd')](_0x173716));if(_0x173716['error']){if(_0x173716[_0x2db1('0xe')][_0x2db1('0xf')]===0x1f4){logger[_0x2db1('0xe')](_0x2db1('0x10'),_0x35e640,_0x173716[_0x2db1('0xe')][_0x2db1('0x11')]);return _0x1dbf1c(_0x173716[_0x2db1('0xe')]['message']);}logger[_0x2db1('0xe')]('CmCustomField,\x20%s,\x20%s',_0x35e640,_0x173716[_0x2db1('0xe')][_0x2db1('0x11')]);return _0x4c2b8c(_0x173716[_0x2db1('0xe')][_0x2db1('0x11')]);}else{logger[_0x2db1('0xa')](_0x2db1('0x10'),_0x35e640,_0x2db1('0xb'));_0x4c2b8c(_0x173716[_0x2db1('0x12')][_0x2db1('0x11')]);}})[_0x2db1('0x13')](function(_0x37df4d){logger['error'](_0x2db1('0x10'),_0x35e640,_0x37df4d);_0x1dbf1c(_0x37df4d);});});} \ No newline at end of file diff --git a/server/api/cmCustomField/index.js b/server/api/cmCustomField/index.js index 58640c3..066b10d 100644 --- a/server/api/cmCustomField/index.js +++ b/server/api/cmCustomField/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x1e14=['delete','multer','util','path','connect-timeout','../../components/auth/service','../../config/environment','./cmCustomField.controller','get','isAuthenticated','index','/:id','show','post','create','put','update'];(function(_0x5b3950,_0x4e5556){var _0x41e436=function(_0x139e30){while(--_0x139e30){_0x5b3950['push'](_0x5b3950['shift']());}};_0x41e436(++_0x4e5556);}(_0x1e14,0xef));var _0x41e1=function(_0x5887e3,_0x4e4c77){_0x5887e3=_0x5887e3-0x0;var _0x226967=_0x1e14[_0x5887e3];return _0x226967;};'use strict';var multer=require(_0x41e1('0x0'));var util=require(_0x41e1('0x1'));var path=require(_0x41e1('0x2'));var timeout=require(_0x41e1('0x3'));var express=require('express');var router=express['Router']();var fs_extra=require('fs-extra');var auth=require(_0x41e1('0x4'));var interaction=require('../../components/interaction/service');var config=require(_0x41e1('0x5'));var controller=require(_0x41e1('0x6'));router[_0x41e1('0x7')]('/',auth[_0x41e1('0x8')](),controller[_0x41e1('0x9')]);router[_0x41e1('0x7')](_0x41e1('0xa'),auth[_0x41e1('0x8')](),controller[_0x41e1('0xb')]);router[_0x41e1('0xc')]('/',auth[_0x41e1('0x8')](),controller[_0x41e1('0xd')]);router[_0x41e1('0xe')]('/:id',auth[_0x41e1('0x8')](),controller[_0x41e1('0xf')]);router[_0x41e1('0x10')](_0x41e1('0xa'),auth[_0x41e1('0x8')](),controller['destroy']);module['exports']=router; \ No newline at end of file +var _0xbac8=['Router','fs-extra','../../components/interaction/service','../../config/environment','isAuthenticated','index','get','/:id','show','post','create','update','destroy','exports','multer','util','express'];(function(_0x39e84d,_0x11931d){var _0x1991bc=function(_0xc81e32){while(--_0xc81e32){_0x39e84d['push'](_0x39e84d['shift']());}};_0x1991bc(++_0x11931d);}(_0xbac8,0x140));var _0x8bac=function(_0x274590,_0x4ad5ab){_0x274590=_0x274590-0x0;var _0xba36bb=_0xbac8[_0x274590];return _0xba36bb;};'use strict';var multer=require(_0x8bac('0x0'));var util=require(_0x8bac('0x1'));var path=require('path');var timeout=require('connect-timeout');var express=require(_0x8bac('0x2'));var router=express[_0x8bac('0x3')]();var fs_extra=require(_0x8bac('0x4'));var auth=require('../../components/auth/service');var interaction=require(_0x8bac('0x5'));var config=require(_0x8bac('0x6'));var controller=require('./cmCustomField.controller');router['get']('/',auth[_0x8bac('0x7')](),controller[_0x8bac('0x8')]);router[_0x8bac('0x9')](_0x8bac('0xa'),auth[_0x8bac('0x7')](),controller[_0x8bac('0xb')]);router[_0x8bac('0xc')]('/',auth[_0x8bac('0x7')](),controller[_0x8bac('0xd')]);router['put'](_0x8bac('0xa'),auth[_0x8bac('0x7')](),controller[_0x8bac('0xe')]);router['delete'](_0x8bac('0xa'),auth['isAuthenticated'](),controller[_0x8bac('0xf')]);module[_0x8bac('0x10')]=router; \ No newline at end of file diff --git a/server/api/cmHopper/cmHopper.attributes.js b/server/api/cmHopper/cmHopper.attributes.js index 8749f70..f997b35 100644 --- a/server/api/cmHopper/cmHopper.attributes.js +++ b/server/api/cmHopper/cmHopper.attributes.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xe251=['INTEGER','contactListQueue','moment','sequelize','exports','STRING','BOOLEAN','DATE','format'];(function(_0x224ad0,_0x2482bd){var _0x2e04fc=function(_0x5ee761){while(--_0x5ee761){_0x224ad0['push'](_0x224ad0['shift']());}};_0x2e04fc(++_0x2482bd);}(_0xe251,0xc8));var _0x1e25=function(_0x3b96e5,_0x124abe){_0x3b96e5=_0x3b96e5-0x0;var _0x8facbe=_0xe251[_0x3b96e5];return _0x8facbe;};'use strict';var moment=require(_0x1e25('0x0'));var Sequelize=require(_0x1e25('0x1'));module[_0x1e25('0x2')]={'phone':{'type':Sequelize[_0x1e25('0x3')],'allowNull':![]},'active':{'type':Sequelize[_0x1e25('0x4')],'defaultValue':![]},'scheduledat':{'type':Sequelize[_0x1e25('0x5')],'defaultValue':moment()[_0x1e25('0x6')]('YYYY-MM-DD\x20HH:mm:ss')},'countbusyretry':{'type':Sequelize['INTEGER'],'defaultValue':0x0},'countcongestionretry':{'type':Sequelize[_0x1e25('0x7')],'defaultValue':0x0},'countnoanswerretry':{'type':Sequelize[_0x1e25('0x7')],'defaultValue':0x0},'callback':{'type':Sequelize[_0x1e25('0x4')],'defaultValue':![]},'callbackuniqueid':{'type':Sequelize[_0x1e25('0x3')],'defaultValue':null},'callbackat':{'type':Sequelize[_0x1e25('0x5')]},'priority':{'type':Sequelize['INTEGER'](0x2)['UNSIGNED'],'defaultValue':0x2,'validate':{'min':0x0,'max':0x4}},'recallme':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'ContactId':{'type':Sequelize[_0x1e25('0x7')],'unique':_0x1e25('0x8')},'ListId':{'type':Sequelize['INTEGER'],'unique':_0x1e25('0x8')},'UserId':{'type':Sequelize[_0x1e25('0x7')]},'VoiceQueueId':{'type':Sequelize[_0x1e25('0x7')],'unique':_0x1e25('0x8')},'CampaignId':{'type':Sequelize['INTEGER']},'countnosuchnumberretry':{'type':Sequelize[_0x1e25('0x7')],'defaultValue':0x0},'countdropretry':{'type':Sequelize[_0x1e25('0x7')],'defaultValue':0x0},'countabandonedretry':{'type':Sequelize[_0x1e25('0x7')],'defaultValue':0x0},'countmachineretry':{'type':Sequelize[_0x1e25('0x7')],'defaultValue':0x0},'countagentrejectretry':{'type':Sequelize['INTEGER'],'defaultValue':0x0},'OrderBy':{'type':Sequelize['INTEGER'],'allowNull':!![],'defaultValue':0x0},'dialTimezone':{'type':Sequelize[_0x1e25('0x3')]},'recallmeNotifiedDate':{'type':Sequelize[_0x1e25('0x5')],'allowNull':!![],'defaultValue':null}}; \ No newline at end of file +var _0x69ce=['DATE','format','YYYY-MM-DD\x20HH:mm:ss','INTEGER','UNSIGNED','contactListQueue','moment','sequelize','STRING','BOOLEAN'];(function(_0xdbe2de,_0x3bdc5a){var _0x2facd7=function(_0x50df58){while(--_0x50df58){_0xdbe2de['push'](_0xdbe2de['shift']());}};_0x2facd7(++_0x3bdc5a);}(_0x69ce,0x164));var _0xe69c=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0x69ce[_0x3dd15e];return _0x231fd0;};'use strict';var moment=require(_0xe69c('0x0'));var Sequelize=require(_0xe69c('0x1'));module['exports']={'phone':{'type':Sequelize[_0xe69c('0x2')],'allowNull':![]},'active':{'type':Sequelize[_0xe69c('0x3')],'defaultValue':![]},'scheduledat':{'type':Sequelize[_0xe69c('0x4')],'defaultValue':moment()[_0xe69c('0x5')](_0xe69c('0x6'))},'countbusyretry':{'type':Sequelize[_0xe69c('0x7')],'defaultValue':0x0},'countcongestionretry':{'type':Sequelize['INTEGER'],'defaultValue':0x0},'countnoanswerretry':{'type':Sequelize[_0xe69c('0x7')],'defaultValue':0x0},'callback':{'type':Sequelize[_0xe69c('0x3')],'defaultValue':![]},'callbackuniqueid':{'type':Sequelize[_0xe69c('0x2')],'defaultValue':null},'callbackat':{'type':Sequelize[_0xe69c('0x4')]},'priority':{'type':Sequelize[_0xe69c('0x7')](0x2)[_0xe69c('0x8')],'defaultValue':0x2,'validate':{'min':0x0,'max':0x4}},'recallme':{'type':Sequelize[_0xe69c('0x3')],'defaultValue':![]},'ContactId':{'type':Sequelize[_0xe69c('0x7')],'unique':_0xe69c('0x9')},'ListId':{'type':Sequelize[_0xe69c('0x7')],'unique':_0xe69c('0x9')},'UserId':{'type':Sequelize['INTEGER']},'VoiceQueueId':{'type':Sequelize[_0xe69c('0x7')],'unique':'contactListQueue'},'CampaignId':{'type':Sequelize[_0xe69c('0x7')]},'countnosuchnumberretry':{'type':Sequelize['INTEGER'],'defaultValue':0x0},'countdropretry':{'type':Sequelize[_0xe69c('0x7')],'defaultValue':0x0},'countabandonedretry':{'type':Sequelize['INTEGER'],'defaultValue':0x0},'countmachineretry':{'type':Sequelize[_0xe69c('0x7')],'defaultValue':0x0},'countagentrejectretry':{'type':Sequelize['INTEGER'],'defaultValue':0x0},'OrderBy':{'type':Sequelize[_0xe69c('0x7')],'allowNull':!![],'defaultValue':0x0},'dialTimezone':{'type':Sequelize['STRING']},'recallmeNotifiedDate':{'type':Sequelize[_0xe69c('0x4')],'allowNull':!![],'defaultValue':null}}; \ No newline at end of file diff --git a/server/api/cmHopper/cmHopper.controller.js b/server/api/cmHopper/cmHopper.controller.js index 28c9217..deff6e8 100644 --- a/server/api/cmHopper/cmHopper.controller.js +++ b/server/api/cmHopper/cmHopper.controller.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x9957=['Contact','List','Queue','preview','CmHopper,\x20%s,\x20%s,\x20%s','getOpenContacts','getTimezones','timezones','push','utcOffset','moment','lodash','../../components/parsers/qs','../../config/logger','../../config/environment','../../mysqldb','status','json','undefined','limit','count','offset','Content-Range','update','then','sendStatus','error','stack','name','send','index','map','fieldName','key','query','keys','filters','intersection','concat','$and','$or','$gt','$gte','$lte','$ne','$eq','$not','$between','$notBetween','$notIn','$notLike','$iLike','$notILike','$like','$overlap','$contained','attributes','model','length','order','sort','pick','filter','where','merge','options','includeAll','include','CmHopper','findAll','catch','show','params','rawAttributes','fields','find','create','body','describe','destroy','VoiceQueueId','Campaign','CampaignId','dataValues','createdAt','updatedAt','membername','user','UserId','deleted','deletedat','format','YYYY-MM-DD\x20HH:mm:ss','calleridnum','phone','campaigntype','queue','ivr','CmContact','ContactId','lastName','isNil','calleridname','firstName','finally','CmHopperFinal','CmHopperAdditionalPhone','end','getPreview','getVoiceQueues','outbound','dialOrderByScheduledAt','dialPreviewAutoRecallMe','transaction','value','direction','prev','hopperIds','priority','scheduledAt','DESC','ASC','sequelize','literal','COALESCE(CmHopper.UserId,\x200)\x20ASC','isEmpty','COALESCE(CmHopper.UserId,\x200)\x20DESC','findOne','scheduledat','recallme','LOCK','UPDATE','CmCompany','Company','CmList','VoiceQueue','dialActive'];(function(_0x12d000,_0x338ab3){var _0x488efd=function(_0x44cc48){while(--_0x44cc48){_0x12d000['push'](_0x12d000['shift']());}};_0x488efd(++_0x338ab3);}(_0x9957,0x93));var _0x7995=function(_0x501510,_0x61caa9){_0x501510=_0x501510-0x0;var _0x1e6ee5=_0x9957[_0x501510];return _0x1e6ee5;};'use strict';var moment=require(_0x7995('0x0'));var _=require(_0x7995('0x1'));var qs=require(_0x7995('0x2'));var logger=require(_0x7995('0x3'))('api');var shared=require(_0x7995('0x4'));var db=require(_0x7995('0x5'))['db'];function respondWithResult(_0x1902b4,_0x462a03){_0x462a03=_0x462a03||0xc8;return function(_0x576d89){if(_0x576d89){return _0x1902b4[_0x7995('0x6')](_0x462a03)[_0x7995('0x7')](_0x576d89);}};}function respondWithFilteredResult(_0x137b6b,_0x219534){return function(_0xbda126){if(_0xbda126){var _0x326741=typeof _0x219534['offset']===_0x7995('0x8')&&typeof _0x219534[_0x7995('0x9')]==='undefined';var _0xa2e5f0=_0xbda126[_0x7995('0xa')];var _0x18c8a3=_0x326741?0x0:_0x219534[_0x7995('0xb')];var _0x3c1d19=_0x326741?_0xbda126[_0x7995('0xa')]:_0x219534[_0x7995('0xb')]+_0x219534['limit'];var _0x245143;if(_0x3c1d19>=_0xa2e5f0){_0x3c1d19=_0xa2e5f0;_0x245143=0xc8;}else{_0x245143=0xce;}_0x137b6b[_0x7995('0x6')](_0x245143);return _0x137b6b['set'](_0x7995('0xc'),_0x18c8a3+'-'+_0x3c1d19+'/'+_0xa2e5f0)[_0x7995('0x7')](_0xbda126);}return null;};}function saveUpdates(_0x19a27e,_0x385f00){return function(_0x281576){if(_0x281576){return _0x281576[_0x7995('0xd')](_0x19a27e)[_0x7995('0xe')](function(_0x4cc004){return _0x4cc004;});}return null;};}function handleEntityNotFound(_0x58f5ad,_0x2b4e94){return function(_0x2233dd){if(!_0x2233dd){_0x58f5ad[_0x7995('0xf')](0x194);}return _0x2233dd;};}function handleError(_0x321ae8,_0x3f1d3e){_0x3f1d3e=_0x3f1d3e||0x1f4;return function(_0x1a5310){logger[_0x7995('0x10')](_0x1a5310[_0x7995('0x11')]);if(_0x1a5310['name']){delete _0x1a5310[_0x7995('0x12')];}_0x321ae8['status'](_0x3f1d3e)[_0x7995('0x13')](_0x1a5310);};}exports[_0x7995('0x14')]=function(_0x43d4b8,_0x291317){var _0x1e1415={},_0x37a7d4={},_0x4faa60={'count':0x0,'rows':[]};var _0x54c9ae=_[_0x7995('0x15')](db['CmHopper']['rawAttributes'],function(_0x3ec178){return{'name':_0x3ec178[_0x7995('0x16')],'type':_0x3ec178['type'][_0x7995('0x17')]};});_0x37a7d4['model']=_['map'](_0x54c9ae,_0x7995('0x12'));_0x37a7d4[_0x7995('0x18')]=_[_0x7995('0x19')](_0x43d4b8[_0x7995('0x18')]);_0x37a7d4[_0x7995('0x1a')]=_[_0x7995('0x1b')](_0x37a7d4['model'],_0x37a7d4[_0x7995('0x18')]);_0x37a7d4[_0x7995('0x1a')]=_[_0x7995('0x1c')](_0x37a7d4[_0x7995('0x1a')],[_0x7995('0x1d'),_0x7995('0x1e'),_0x7995('0x1f'),_0x7995('0x20'),'$lt',_0x7995('0x21'),_0x7995('0x22'),_0x7995('0x23'),_0x7995('0x24'),_0x7995('0x25'),_0x7995('0x26'),'$in',_0x7995('0x27'),'$like',_0x7995('0x28'),_0x7995('0x29'),_0x7995('0x2a'),_0x7995('0x2b'),_0x7995('0x2c'),'$contains',_0x7995('0x2d'),'$any']);_0x1e1415[_0x7995('0x2e')]=_[_0x7995('0x1b')](_0x37a7d4[_0x7995('0x2f')],qs['fields'](_0x43d4b8['query']['fields']));_0x1e1415[_0x7995('0x2e')]=_0x1e1415[_0x7995('0x2e')][_0x7995('0x30')]?_0x1e1415[_0x7995('0x2e')]:_0x37a7d4[_0x7995('0x2f')];if(!_0x43d4b8[_0x7995('0x18')]['hasOwnProperty']('nolimit')){_0x1e1415[_0x7995('0x9')]=qs['limit'](_0x43d4b8[_0x7995('0x18')][_0x7995('0x9')]);_0x1e1415[_0x7995('0xb')]=qs[_0x7995('0xb')](_0x43d4b8[_0x7995('0x18')]['offset']);}_0x1e1415[_0x7995('0x31')]=qs[_0x7995('0x32')](_0x43d4b8['query']['sort']);_0x1e1415['where']=qs[_0x7995('0x1a')](_[_0x7995('0x33')](_0x43d4b8['query'],_0x37a7d4[_0x7995('0x1a')]),_0x54c9ae);if(_0x43d4b8['query'][_0x7995('0x34')]){_0x1e1415[_0x7995('0x35')]=_[_0x7995('0x36')](_0x1e1415['where'],{'$or':_['map'](_0x54c9ae,function(_0x36d057){if(_0x36d057['type']!=='VIRTUAL'){var _0x3e99cd={};_0x3e99cd[_0x36d057[_0x7995('0x12')]]={'$like':'%'+_0x43d4b8['query'][_0x7995('0x34')]+'%'};return _0x3e99cd;}})});}_0x1e1415=_[_0x7995('0x36')]({},_0x1e1415,_0x43d4b8[_0x7995('0x37')]);var _0x18667c={'where':_0x1e1415[_0x7995('0x35')]};return db['CmHopper'][_0x7995('0xa')](_0x18667c)[_0x7995('0xe')](function(_0xf612e6){_0x4faa60[_0x7995('0xa')]=_0xf612e6;if(_0x43d4b8['query'][_0x7995('0x38')]){_0x1e1415[_0x7995('0x39')]=[{'all':!![]}];}return db[_0x7995('0x3a')][_0x7995('0x3b')](_0x1e1415);})[_0x7995('0xe')](function(_0x1035dc){_0x4faa60['rows']=_0x1035dc;return _0x4faa60;})[_0x7995('0xe')](respondWithFilteredResult(_0x291317,_0x1e1415))[_0x7995('0x3c')](handleError(_0x291317,null));};exports[_0x7995('0x3d')]=function(_0x2ea47f,_0x2e04cd){var _0x298fc2={'raw':!![],'where':{'id':_0x2ea47f[_0x7995('0x3e')]['id']}},_0x14d638={};_0x14d638[_0x7995('0x2f')]=_[_0x7995('0x19')](db[_0x7995('0x3a')][_0x7995('0x3f')]);_0x14d638[_0x7995('0x18')]=_['keys'](_0x2ea47f['query']);_0x14d638[_0x7995('0x1a')]=_[_0x7995('0x1b')](_0x14d638['model'],_0x14d638['query']);_0x298fc2[_0x7995('0x2e')]=_['intersection'](_0x14d638['model'],qs[_0x7995('0x40')](_0x2ea47f[_0x7995('0x18')][_0x7995('0x40')]));_0x298fc2['attributes']=_0x298fc2[_0x7995('0x2e')]['length']?_0x298fc2[_0x7995('0x2e')]:_0x14d638['model'];if(_0x2ea47f['query'][_0x7995('0x38')]){_0x298fc2[_0x7995('0x39')]=[{'all':!![]}];}_0x298fc2=_[_0x7995('0x36')]({},_0x298fc2,_0x2ea47f[_0x7995('0x37')]);return db['CmHopper'][_0x7995('0x41')](_0x298fc2)[_0x7995('0xe')](handleEntityNotFound(_0x2e04cd,null))[_0x7995('0xe')](respondWithResult(_0x2e04cd,null))[_0x7995('0x3c')](handleError(_0x2e04cd,null));};exports['create']=function(_0x5f28e7,_0x1c37c6){return db['CmHopper'][_0x7995('0x42')](_0x5f28e7['body'],{})[_0x7995('0xe')](respondWithResult(_0x1c37c6,0xc9))['catch'](handleError(_0x1c37c6,null));};exports[_0x7995('0xd')]=function(_0x1b0373,_0x4d9245){if(_0x1b0373[_0x7995('0x43')]['id']){delete _0x1b0373[_0x7995('0x43')]['id'];}return db[_0x7995('0x3a')][_0x7995('0x41')]({'where':{'id':_0x1b0373['params']['id']}})[_0x7995('0xe')](handleEntityNotFound(_0x4d9245,null))[_0x7995('0xe')](saveUpdates(_0x1b0373[_0x7995('0x43')],null))['then'](respondWithResult(_0x4d9245,null))[_0x7995('0x3c')](handleError(_0x4d9245,null));};exports[_0x7995('0x44')]=function(_0x511567,_0x3d8ae3){return db[_0x7995('0x3a')]['describe']()[_0x7995('0xe')](respondWithResult(_0x3d8ae3,null))[_0x7995('0x3c')](handleError(_0x3d8ae3,null));};exports['destroy']=function(_0x3d1dbb,_0x5843ba){var _0x1d87f9;var _0x187735=_0x3d1dbb[_0x7995('0x3e')]['id'];return db[_0x7995('0x3a')][_0x7995('0x41')]({'where':{'id':_0x3d1dbb[_0x7995('0x3e')]['id']}})[_0x7995('0xe')](handleEntityNotFound(_0x5843ba,null))['then'](function(_0x427dcf){if(_0x427dcf){return _0x427dcf[_0x7995('0x45')]()[_0x7995('0xe')](function(_0x4ffc8a){return _0x4ffc8a;});}})[_0x7995('0xe')](function(_0x1fe77e){_0x1d87f9=_0x1fe77e;if(_0x1fe77e){if(_0x1fe77e[_0x7995('0x46')]||_0x1fe77e['CampaignId']){return db[_0x1fe77e['VoiceQueueId']?'VoiceQueue':_0x7995('0x47')][_0x7995('0x41')]({'where':{'id':_0x1fe77e['VoiceQueueId']?_0x1fe77e[_0x7995('0x46')]:_0x1fe77e[_0x7995('0x48')]},'attributes':['id',_0x7995('0x12')],'raw':!![]});}}})[_0x7995('0xe')](function(_0xc04004){var _0x528c8e={};if(_0xc04004){_[_0x7995('0x36')](_0x528c8e,_['omit'](_0x1d87f9[_0x7995('0x49')],[_0x7995('0x4a'),_0x7995('0x4b'),'id']));_0x528c8e['state']=0x15;_0x528c8e['statedesc']='deleted';_0x528c8e['campaign']=_0xc04004[_0x7995('0x12')];_0x528c8e[_0x7995('0x4c')]=_0x3d1dbb[_0x7995('0x4d')][_0x7995('0x12')];_0x528c8e[_0x7995('0x4e')]=_0x3d1dbb[_0x7995('0x4d')]['id'];_0x528c8e[_0x7995('0x4f')]=!![];_0x528c8e[_0x7995('0x50')]=moment()[_0x7995('0x51')](_0x7995('0x52'));_0x528c8e[_0x7995('0x53')]=_0x1d87f9[_0x7995('0x54')];_0x528c8e[_0x7995('0x55')]=_0x1d87f9[_0x7995('0x46')]?_0x7995('0x56'):_0x7995('0x57');return db[_0x7995('0x58')][_0x7995('0x41')]({'where':{'id':_0x528c8e[_0x7995('0x59')]},'attributes':['firstName',_0x7995('0x5a')]})[_0x7995('0xe')](function(_0x3b8a54){if(!_[_0x7995('0x5b')](_0x5843ba)&&!_['isNil'](_0x3b8a54['firstName'])){_0x528c8e[_0x7995('0x5c')]=_0x3b8a54[_0x7995('0x5d')];if(!_[_0x7995('0x5b')](_0x3b8a54[_0x7995('0x5a')])){_0x528c8e['calleridname']+='\x20'+_0x3b8a54[_0x7995('0x5a')];}}})[_0x7995('0x5e')](function(){return db[_0x7995('0x5f')][_0x7995('0x42')](_0x528c8e);});}})['then'](function(_0x5e2d97){return db[_0x7995('0x60')][_0x7995('0x45')]({'where':{'CmHopperId':_0x187735}});})[_0x7995('0xe')](function(){return _0x5843ba[_0x7995('0x6')](0xcc)[_0x7995('0x61')]();})[_0x7995('0x3c')](handleError(_0x5843ba,null));};exports[_0x7995('0x62')]=function(_0x1e2206,_0x984c23){var _0x50caf5=[];return db[_0x7995('0x58')][_0x7995('0x44')]()[_0x7995('0xe')](function(_0x1ecfdb){_0x50caf5=_['keys'](_0x1ecfdb);return _0x1e2206['user'][_0x7995('0x63')]({'where':{'type':_0x7995('0x64'),'dialActive':!![],'dialMethod':'preview'},'attributes':['id',_0x7995('0x65'),_0x7995('0x66')],'raw':!![]});})[_0x7995('0xe')](function(_0x57727e){if(_0x57727e&&_0x57727e[_0x7995('0x30')]){return db['sequelize'][_0x7995('0x67')](function(_0x564fca){var _0x3e0a46={'active':![],'recallme':![],'scheduledAt':{'$lte':moment()[_0x7995('0x51')](_0x7995('0x52'))},'VoiceQueueId':{'$in':_[_0x7995('0x15')](_0x57727e,'id')},'$or':[{'UserId':null},{'UserId':_0x1e2206[_0x7995('0x4d')]['id']}]};var _0xeb8920={'active':![],'recallme':!![],'VoiceQueueId':{'$in':_(_0x57727e)[_0x7995('0x34')]([_0x7995('0x66'),0x0])[_0x7995('0x15')]('id')[_0x7995('0x68')]()},'$or':[{'UserId':null},{'UserId':_0x1e2206[_0x7995('0x4d')]['id']}]};var _0x234d8d={'$or':[_0x3e0a46,_0xeb8920]};var _0x56eb85=[];if(_0x1e2206[_0x7995('0x43')][_0x7995('0x69')]&&_0x1e2206[_0x7995('0x43')][_0x7995('0x69')]===_0x7995('0x6a')){if(!_['isEmpty'](_0x1e2206['body'][_0x7995('0x6b')])){_0x234d8d['id']={'$in':_0x1e2206[_0x7995('0x43')][_0x7995('0x6b')]};}_0x56eb85=[[_0x7995('0x6c'),'ASC'],[_0x7995('0x6d'),_0x57727e[0x0]['dialOrderByScheduledAt']==='ASC'?_0x7995('0x6e'):_0x7995('0x6f')],db[_0x7995('0x70')][_0x7995('0x71')](_0x7995('0x72')),['id',_0x7995('0x6e')]];}else{if(!_[_0x7995('0x73')](_0x1e2206[_0x7995('0x43')][_0x7995('0x6b')])){_0x234d8d['id']={'$notIn':_0x1e2206[_0x7995('0x43')]['hopperIds']};}_0x56eb85=[[_0x7995('0x6c'),_0x7995('0x6e')],[_0x7995('0x6d'),_0x57727e[0x0]['dialOrderByScheduledAt']],db[_0x7995('0x70')][_0x7995('0x71')](_0x7995('0x74')),['id',_0x7995('0x6f')]];}return db[_0x7995('0x3a')][_0x7995('0x75')]({'attributes':['id',_0x7995('0x76'),_0x7995('0x54'),_0x7995('0x77')],'where':_0x234d8d,'order':_0x56eb85,'transaction':_0x564fca,'lock':_0x564fca[_0x7995('0x78')][_0x7995('0x79')],'include':[{'model':db['CmContact'],'as':'Contact','attributes':_0x50caf5,'include':[{'model':db[_0x7995('0x7a')],'as':_0x7995('0x7b'),'attributes':['id',_0x7995('0x12')]}]},{'model':db[_0x7995('0x7c')],'as':'List','attributes':['id',_0x7995('0x12')]},{'model':db[_0x7995('0x7d')],'as':'Queue','attributes':['id','name',_0x7995('0x7e')]}]})[_0x7995('0xe')](function(_0x555277){if(_0x555277){return _0x555277[_0x7995('0xd')]({'UserId':_0x1e2206['user']['id']},{'transaction':_0x564fca});}});});}})[_0x7995('0xe')](handleEntityNotFound(_0x984c23,null))[_0x7995('0xe')](respondWithResult(_0x984c23,null))['catch'](handleError(_0x984c23,null));};exports['getPreviewRecall']=function(_0x1f01c0,_0x50c1a4,_0x31b9e6){var _0xa41fff=[];var _0x3dd197=_0x1f01c0[_0x7995('0x3e')]['id'];var _0x1a1873=_0x1f01c0[_0x7995('0x4d')]['id'];return db[_0x7995('0x58')][_0x7995('0x44')]()[_0x7995('0xe')](function(_0x117317){_0xa41fff=_[_0x7995('0x19')](_0x117317);return db[_0x7995('0x70')][_0x7995('0x67')](function(_0x1ff436){const _0x36e3a7={'id':_0x3dd197};return db[_0x7995('0x3a')][_0x7995('0x75')]({'attributes':['id',_0x7995('0x76'),_0x7995('0x77')],'where':_0x36e3a7,'transaction':_0x1ff436,'lock':_0x1ff436[_0x7995('0x78')][_0x7995('0x79')],'include':[{'model':db[_0x7995('0x58')],'as':_0x7995('0x7f'),'attributes':_0xa41fff,'include':[{'model':db[_0x7995('0x7a')],'as':_0x7995('0x7b'),'attributes':['id',_0x7995('0x12')]}]},{'model':db[_0x7995('0x7c')],'as':_0x7995('0x80'),'attributes':['id','name']},{'model':db[_0x7995('0x7d')],'as':_0x7995('0x81'),'attributes':['id','name','dialActive']}]})[_0x7995('0xe')](function(_0x3fe8fc){if(_0x3fe8fc){return _0x3fe8fc[_0x7995('0xd')]({'UserId':_0x1a1873},{'transaction':_0x1ff436});}});});})[_0x7995('0xe')](handleEntityNotFound(_0x50c1a4,null))[_0x7995('0xe')](respondWithResult(_0x50c1a4,null))[_0x7995('0x3c')](handleError(_0x50c1a4,null));};exports['getOpenContacts']=function(_0x2f8a2d,_0xb68962){return _0x2f8a2d[_0x7995('0x4d')][_0x7995('0x63')]({'where':{'type':_0x7995('0x64'),'dialActive':!![],'dialMethod':_0x7995('0x82')},'attributes':['id'],'raw':!![]})[_0x7995('0xe')](function(_0xc93dcb){if(_0xc93dcb&&_0xc93dcb['length']){return db[_0x7995('0x3a')][_0x7995('0xa')]({'where':{'active':![],'recallme':![],'scheduledAt':{'$lte':moment()['format']('YYYY-MM-DD\x20HH:mm:ss')},'VoiceQueueId':{'$in':_[_0x7995('0x15')](_0xc93dcb,'id')},'$or':[{'UserId':null},{'UserId':_0x2f8a2d[_0x7995('0x4d')]['id']}]}});}return 0x0;})[_0x7995('0xe')](function(_0x3db7a9){if(!_[_0x7995('0x5b')](_0x3db7a9)&&_['isNumber'](_0x3db7a9)){return _0xb68962[_0x7995('0x6')](0xc8)[_0x7995('0x7')]({'contacts':_0x3db7a9});}else{logger['error'](_0x7995('0x83'),_0x7995('0x84'),0x194,'entity\x20not\x20found');_0xb68962[_0x7995('0xf')](0x194);}})['catch'](handleError(_0xb68962,null));};exports[_0x7995('0x85')]=function(_0x2322bf,_0x3ab421){var _0x428a1b=shared[_0x7995('0x86')];var _0x5d16da=[];_[_0x7995('0x15')](_0x428a1b,function(_0x345080){_0x5d16da[_0x7995('0x87')]({'id':_0x345080['name'],'name':_0x345080[_0x7995('0x12')],'utcOffset':_0x345080[_0x7995('0x88')]});});return _0x3ab421[_0x7995('0x6')](0xc8)[_0x7995('0x7')]({'tz':_0x5d16da});};exports['getTimezone']=function(_0x3356fd,_0xf59a39){var _0x3a5f5e=shared['timezones'];var _0x5358d4={};if(!_[_0x7995('0x5b')](_0x3a5f5e[_0x3356fd[_0x7995('0x43')]['id']]))_0x5358d4=_0x3a5f5e[_0x3356fd['body']['id']];return _0xf59a39['status'](0xc8)[_0x7995('0x7')](_0x5358d4);}; \ No newline at end of file +var _0x0bde=['length','hasOwnProperty','nolimit','order','sort','where','pick','filter','type','VIRTUAL','merge','includeAll','include','CmHopper','rows','show','params','options','catch','create','body','find','describe','destroy','VoiceQueueId','CampaignId','VoiceQueue','Campaign','omit','dataValues','createdAt','updatedAt','state','statedesc','deleted','membername','user','deletedat','calleridnum','phone','queue','ivr','CmContact','ContactId','firstName','lastName','isNil','calleridname','finally','CmHopperFinal','CmHopperAdditionalPhone','end','getPreview','getVoiceQueues','dialPreviewAutoRecallMe','transaction','value','direction','prev','isEmpty','hopperIds','priority','ASC','scheduledAt','DESC','sequelize','COALESCE(CmHopper.UserId,\x200)\x20ASC','literal','COALESCE(CmHopper.UserId,\x200)\x20DESC','recallme','LOCK','UPDATE','Contact','CmCompany','Company','CmList','Queue','dialActive','scheduledat','getOpenContacts','outbound','preview','format','YYYY-MM-DD\x20HH:mm:ss','isNumber','error','CmHopper,\x20%s,\x20%s,\x20%s','entity\x20not\x20found','getTimezones','timezones','push','utcOffset','getTimezone','lodash','../../config/logger','api','../../config/environment','../../mysqldb','status','json','undefined','limit','count','offset','Content-Range','update','then','sendStatus','stack','name','send','map','rawAttributes','fieldName','key','model','query','keys','intersection','filters','$and','$or','$gt','$gte','$lt','$lte','$ne','$between','$notBetween','$like','$notLike','$iLike','$notILike','$overlap','$contained','$any','attributes','fields'];(function(_0x2786ea,_0x16c3c3){var _0x5c38e5=function(_0x5a53c5){while(--_0x5a53c5){_0x2786ea['push'](_0x2786ea['shift']());}};_0x5c38e5(++_0x16c3c3);}(_0x0bde,0xe7));var _0xe0bd=function(_0x2641f9,_0x26715f){_0x2641f9=_0x2641f9-0x0;var _0x585741=_0x0bde[_0x2641f9];return _0x585741;};'use strict';var moment=require('moment');var _=require(_0xe0bd('0x0'));var qs=require('../../components/parsers/qs');var logger=require(_0xe0bd('0x1'))(_0xe0bd('0x2'));var shared=require(_0xe0bd('0x3'));var db=require(_0xe0bd('0x4'))['db'];function respondWithResult(_0x2da4bd,_0x5541b9){_0x5541b9=_0x5541b9||0xc8;return function(_0x34df88){if(_0x34df88){return _0x2da4bd[_0xe0bd('0x5')](_0x5541b9)[_0xe0bd('0x6')](_0x34df88);}};}function respondWithFilteredResult(_0x3b712a,_0x22bfd1){return function(_0x26393f){if(_0x26393f){var _0x217145=typeof _0x22bfd1['offset']===_0xe0bd('0x7')&&typeof _0x22bfd1[_0xe0bd('0x8')]===_0xe0bd('0x7');var _0x2d32c6=_0x26393f[_0xe0bd('0x9')];var _0x3c47c4=_0x217145?0x0:_0x22bfd1[_0xe0bd('0xa')];var _0x58d892=_0x217145?_0x26393f['count']:_0x22bfd1['offset']+_0x22bfd1['limit'];var _0x44ffa9;if(_0x58d892>=_0x2d32c6){_0x58d892=_0x2d32c6;_0x44ffa9=0xc8;}else{_0x44ffa9=0xce;}_0x3b712a['status'](_0x44ffa9);return _0x3b712a['set'](_0xe0bd('0xb'),_0x3c47c4+'-'+_0x58d892+'/'+_0x2d32c6)[_0xe0bd('0x6')](_0x26393f);}return null;};}function saveUpdates(_0x54d40e,_0xc492b4){return function(_0x5272ca){if(_0x5272ca){return _0x5272ca[_0xe0bd('0xc')](_0x54d40e)[_0xe0bd('0xd')](function(_0x3b2fb1){return _0x3b2fb1;});}return null;};}function handleEntityNotFound(_0x20ab47,_0x47664e){return function(_0x335f17){if(!_0x335f17){_0x20ab47[_0xe0bd('0xe')](0x194);}return _0x335f17;};}function handleError(_0x210f20,_0x4f63fa){_0x4f63fa=_0x4f63fa||0x1f4;return function(_0x50891d){logger['error'](_0x50891d[_0xe0bd('0xf')]);if(_0x50891d[_0xe0bd('0x10')]){delete _0x50891d[_0xe0bd('0x10')];}_0x210f20[_0xe0bd('0x5')](_0x4f63fa)[_0xe0bd('0x11')](_0x50891d);};}exports['index']=function(_0x4ebe7a,_0x1becc8){var _0x4ac920={},_0x4f36f7={},_0x418d64={'count':0x0,'rows':[]};var _0xec158d=_[_0xe0bd('0x12')](db['CmHopper'][_0xe0bd('0x13')],function(_0xe1d808){return{'name':_0xe1d808[_0xe0bd('0x14')],'type':_0xe1d808['type'][_0xe0bd('0x15')]};});_0x4f36f7[_0xe0bd('0x16')]=_[_0xe0bd('0x12')](_0xec158d,'name');_0x4f36f7[_0xe0bd('0x17')]=_[_0xe0bd('0x18')](_0x4ebe7a[_0xe0bd('0x17')]);_0x4f36f7['filters']=_[_0xe0bd('0x19')](_0x4f36f7['model'],_0x4f36f7[_0xe0bd('0x17')]);_0x4f36f7[_0xe0bd('0x1a')]=_['concat'](_0x4f36f7[_0xe0bd('0x1a')],[_0xe0bd('0x1b'),_0xe0bd('0x1c'),_0xe0bd('0x1d'),_0xe0bd('0x1e'),_0xe0bd('0x1f'),_0xe0bd('0x20'),_0xe0bd('0x21'),'$eq','$not',_0xe0bd('0x22'),_0xe0bd('0x23'),'$in','$notIn',_0xe0bd('0x24'),_0xe0bd('0x25'),_0xe0bd('0x26'),_0xe0bd('0x27'),'$like',_0xe0bd('0x28'),'$contains',_0xe0bd('0x29'),_0xe0bd('0x2a')]);_0x4ac920[_0xe0bd('0x2b')]=_[_0xe0bd('0x19')](_0x4f36f7[_0xe0bd('0x16')],qs[_0xe0bd('0x2c')](_0x4ebe7a[_0xe0bd('0x17')][_0xe0bd('0x2c')]));_0x4ac920[_0xe0bd('0x2b')]=_0x4ac920[_0xe0bd('0x2b')][_0xe0bd('0x2d')]?_0x4ac920[_0xe0bd('0x2b')]:_0x4f36f7[_0xe0bd('0x16')];if(!_0x4ebe7a['query'][_0xe0bd('0x2e')](_0xe0bd('0x2f'))){_0x4ac920[_0xe0bd('0x8')]=qs[_0xe0bd('0x8')](_0x4ebe7a[_0xe0bd('0x17')][_0xe0bd('0x8')]);_0x4ac920['offset']=qs['offset'](_0x4ebe7a[_0xe0bd('0x17')][_0xe0bd('0xa')]);}_0x4ac920[_0xe0bd('0x30')]=qs[_0xe0bd('0x31')](_0x4ebe7a[_0xe0bd('0x17')][_0xe0bd('0x31')]);_0x4ac920[_0xe0bd('0x32')]=qs['filters'](_[_0xe0bd('0x33')](_0x4ebe7a[_0xe0bd('0x17')],_0x4f36f7[_0xe0bd('0x1a')]),_0xec158d);if(_0x4ebe7a[_0xe0bd('0x17')][_0xe0bd('0x34')]){_0x4ac920[_0xe0bd('0x32')]=_['merge'](_0x4ac920[_0xe0bd('0x32')],{'$or':_[_0xe0bd('0x12')](_0xec158d,function(_0x24b857){if(_0x24b857[_0xe0bd('0x35')]!==_0xe0bd('0x36')){var _0x5881e5={};_0x5881e5[_0x24b857['name']]={'$like':'%'+_0x4ebe7a[_0xe0bd('0x17')][_0xe0bd('0x34')]+'%'};return _0x5881e5;}})});}_0x4ac920=_[_0xe0bd('0x37')]({},_0x4ac920,_0x4ebe7a['options']);var _0x8a331={'where':_0x4ac920['where']};return db['CmHopper'][_0xe0bd('0x9')](_0x8a331)[_0xe0bd('0xd')](function(_0x4d8695){_0x418d64['count']=_0x4d8695;if(_0x4ebe7a['query'][_0xe0bd('0x38')]){_0x4ac920[_0xe0bd('0x39')]=[{'all':!![]}];}return db[_0xe0bd('0x3a')]['findAll'](_0x4ac920);})[_0xe0bd('0xd')](function(_0x2b4814){_0x418d64[_0xe0bd('0x3b')]=_0x2b4814;return _0x418d64;})['then'](respondWithFilteredResult(_0x1becc8,_0x4ac920))['catch'](handleError(_0x1becc8,null));};exports[_0xe0bd('0x3c')]=function(_0x4e5247,_0x1eba8b){var _0x195f0f={'raw':!![],'where':{'id':_0x4e5247[_0xe0bd('0x3d')]['id']}},_0x5aee49={};_0x5aee49[_0xe0bd('0x16')]=_[_0xe0bd('0x18')](db[_0xe0bd('0x3a')][_0xe0bd('0x13')]);_0x5aee49[_0xe0bd('0x17')]=_[_0xe0bd('0x18')](_0x4e5247['query']);_0x5aee49[_0xe0bd('0x1a')]=_[_0xe0bd('0x19')](_0x5aee49[_0xe0bd('0x16')],_0x5aee49[_0xe0bd('0x17')]);_0x195f0f[_0xe0bd('0x2b')]=_['intersection'](_0x5aee49['model'],qs['fields'](_0x4e5247[_0xe0bd('0x17')][_0xe0bd('0x2c')]));_0x195f0f[_0xe0bd('0x2b')]=_0x195f0f[_0xe0bd('0x2b')]['length']?_0x195f0f['attributes']:_0x5aee49[_0xe0bd('0x16')];if(_0x4e5247[_0xe0bd('0x17')][_0xe0bd('0x38')]){_0x195f0f[_0xe0bd('0x39')]=[{'all':!![]}];}_0x195f0f=_[_0xe0bd('0x37')]({},_0x195f0f,_0x4e5247[_0xe0bd('0x3e')]);return db[_0xe0bd('0x3a')]['find'](_0x195f0f)[_0xe0bd('0xd')](handleEntityNotFound(_0x1eba8b,null))['then'](respondWithResult(_0x1eba8b,null))[_0xe0bd('0x3f')](handleError(_0x1eba8b,null));};exports[_0xe0bd('0x40')]=function(_0x507876,_0x4cfad0){return db[_0xe0bd('0x3a')][_0xe0bd('0x40')](_0x507876[_0xe0bd('0x41')],{})[_0xe0bd('0xd')](respondWithResult(_0x4cfad0,0xc9))[_0xe0bd('0x3f')](handleError(_0x4cfad0,null));};exports[_0xe0bd('0xc')]=function(_0x368549,_0x37f9ea){if(_0x368549[_0xe0bd('0x41')]['id']){delete _0x368549['body']['id'];}return db[_0xe0bd('0x3a')][_0xe0bd('0x42')]({'where':{'id':_0x368549[_0xe0bd('0x3d')]['id']}})['then'](handleEntityNotFound(_0x37f9ea,null))[_0xe0bd('0xd')](saveUpdates(_0x368549[_0xe0bd('0x41')],null))['then'](respondWithResult(_0x37f9ea,null))[_0xe0bd('0x3f')](handleError(_0x37f9ea,null));};exports[_0xe0bd('0x43')]=function(_0x578792,_0xd14c1d){return db[_0xe0bd('0x3a')][_0xe0bd('0x43')]()['then'](respondWithResult(_0xd14c1d,null))[_0xe0bd('0x3f')](handleError(_0xd14c1d,null));};exports[_0xe0bd('0x44')]=function(_0x147438,_0x21ae20){var _0x119d5c;var _0x2eff0d=_0x147438[_0xe0bd('0x3d')]['id'];return db[_0xe0bd('0x3a')][_0xe0bd('0x42')]({'where':{'id':_0x147438['params']['id']}})['then'](handleEntityNotFound(_0x21ae20,null))['then'](function(_0x43b646){if(_0x43b646){return _0x43b646[_0xe0bd('0x44')]()['then'](function(_0xacd120){return _0xacd120;});}})[_0xe0bd('0xd')](function(_0x1ab9b0){_0x119d5c=_0x1ab9b0;if(_0x1ab9b0){if(_0x1ab9b0[_0xe0bd('0x45')]||_0x1ab9b0[_0xe0bd('0x46')]){return db[_0x1ab9b0[_0xe0bd('0x45')]?_0xe0bd('0x47'):_0xe0bd('0x48')][_0xe0bd('0x42')]({'where':{'id':_0x1ab9b0[_0xe0bd('0x45')]?_0x1ab9b0['VoiceQueueId']:_0x1ab9b0[_0xe0bd('0x46')]},'attributes':['id',_0xe0bd('0x10')],'raw':!![]});}}})[_0xe0bd('0xd')](function(_0x52573c){var _0x16dda5={};if(_0x52573c){_[_0xe0bd('0x37')](_0x16dda5,_[_0xe0bd('0x49')](_0x119d5c[_0xe0bd('0x4a')],[_0xe0bd('0x4b'),_0xe0bd('0x4c'),'id']));_0x16dda5[_0xe0bd('0x4d')]=0x15;_0x16dda5[_0xe0bd('0x4e')]=_0xe0bd('0x4f');_0x16dda5['campaign']=_0x52573c[_0xe0bd('0x10')];_0x16dda5[_0xe0bd('0x50')]=_0x147438[_0xe0bd('0x51')][_0xe0bd('0x10')];_0x16dda5['UserId']=_0x147438[_0xe0bd('0x51')]['id'];_0x16dda5[_0xe0bd('0x4f')]=!![];_0x16dda5[_0xe0bd('0x52')]=moment()['format']('YYYY-MM-DD\x20HH:mm:ss');_0x16dda5[_0xe0bd('0x53')]=_0x119d5c[_0xe0bd('0x54')];_0x16dda5['campaigntype']=_0x119d5c[_0xe0bd('0x45')]?_0xe0bd('0x55'):_0xe0bd('0x56');return db[_0xe0bd('0x57')]['find']({'where':{'id':_0x16dda5[_0xe0bd('0x58')]},'attributes':[_0xe0bd('0x59'),_0xe0bd('0x5a')]})[_0xe0bd('0xd')](function(_0x373846){if(!_[_0xe0bd('0x5b')](_0x21ae20)&&!_[_0xe0bd('0x5b')](_0x373846['firstName'])){_0x16dda5[_0xe0bd('0x5c')]=_0x373846[_0xe0bd('0x59')];if(!_[_0xe0bd('0x5b')](_0x373846[_0xe0bd('0x5a')])){_0x16dda5[_0xe0bd('0x5c')]+='\x20'+_0x373846[_0xe0bd('0x5a')];}}})[_0xe0bd('0x5d')](function(){return db[_0xe0bd('0x5e')][_0xe0bd('0x40')](_0x16dda5);});}})[_0xe0bd('0xd')](function(_0x29b248){return db[_0xe0bd('0x5f')][_0xe0bd('0x44')]({'where':{'CmHopperId':_0x2eff0d}});})[_0xe0bd('0xd')](function(){return _0x21ae20[_0xe0bd('0x5')](0xcc)[_0xe0bd('0x60')]();})[_0xe0bd('0x3f')](handleError(_0x21ae20,null));};exports[_0xe0bd('0x61')]=function(_0x178398,_0x8e61d6){var _0x9d03de=[];return db[_0xe0bd('0x57')][_0xe0bd('0x43')]()['then'](function(_0x4b461a){_0x9d03de=_[_0xe0bd('0x18')](_0x4b461a);return _0x178398[_0xe0bd('0x51')][_0xe0bd('0x62')]({'where':{'type':'outbound','dialActive':!![],'dialMethod':'preview'},'attributes':['id','dialOrderByScheduledAt',_0xe0bd('0x63')],'raw':!![]});})[_0xe0bd('0xd')](function(_0x4dfd2a){if(_0x4dfd2a&&_0x4dfd2a[_0xe0bd('0x2d')]){return db['sequelize'][_0xe0bd('0x64')](function(_0x2ede67){var _0x14bbeb={'active':![],'recallme':![],'scheduledAt':{'$lte':moment()['format']('YYYY-MM-DD\x20HH:mm:ss')},'VoiceQueueId':{'$in':_['map'](_0x4dfd2a,'id')},'$or':[{'UserId':null},{'UserId':_0x178398[_0xe0bd('0x51')]['id']}]};var _0x1c9407={'active':![],'recallme':!![],'VoiceQueueId':{'$in':_(_0x4dfd2a)[_0xe0bd('0x34')]([_0xe0bd('0x63'),0x0])[_0xe0bd('0x12')]('id')[_0xe0bd('0x65')]()},'$or':[{'UserId':null},{'UserId':_0x178398['user']['id']}]};var _0x338028={'$or':[_0x14bbeb,_0x1c9407]};var _0x40a584=[];if(_0x178398['body'][_0xe0bd('0x66')]&&_0x178398[_0xe0bd('0x41')][_0xe0bd('0x66')]===_0xe0bd('0x67')){if(!_[_0xe0bd('0x68')](_0x178398[_0xe0bd('0x41')][_0xe0bd('0x69')])){_0x338028['id']={'$in':_0x178398[_0xe0bd('0x41')]['hopperIds']};}_0x40a584=[[_0xe0bd('0x6a'),_0xe0bd('0x6b')],[_0xe0bd('0x6c'),_0x4dfd2a[0x0]['dialOrderByScheduledAt']===_0xe0bd('0x6b')?_0xe0bd('0x6d'):_0xe0bd('0x6b')],db[_0xe0bd('0x6e')]['literal'](_0xe0bd('0x6f')),['id',_0xe0bd('0x6d')]];}else{if(!_[_0xe0bd('0x68')](_0x178398['body'][_0xe0bd('0x69')])){_0x338028['id']={'$notIn':_0x178398[_0xe0bd('0x41')][_0xe0bd('0x69')]};}_0x40a584=[['priority',_0xe0bd('0x6d')],['scheduledAt',_0x4dfd2a[0x0]['dialOrderByScheduledAt']],db['sequelize'][_0xe0bd('0x70')](_0xe0bd('0x71')),['id',_0xe0bd('0x6b')]];}return db[_0xe0bd('0x3a')]['findOne']({'attributes':['id','scheduledat',_0xe0bd('0x54'),_0xe0bd('0x72')],'where':_0x338028,'order':_0x40a584,'transaction':_0x2ede67,'lock':_0x2ede67[_0xe0bd('0x73')][_0xe0bd('0x74')],'include':[{'model':db[_0xe0bd('0x57')],'as':_0xe0bd('0x75'),'attributes':_0x9d03de,'include':[{'model':db[_0xe0bd('0x76')],'as':_0xe0bd('0x77'),'attributes':['id',_0xe0bd('0x10')]}]},{'model':db[_0xe0bd('0x78')],'as':'List','attributes':['id',_0xe0bd('0x10')]},{'model':db['VoiceQueue'],'as':_0xe0bd('0x79'),'attributes':['id',_0xe0bd('0x10'),_0xe0bd('0x7a')]}]})[_0xe0bd('0xd')](function(_0x191423){if(_0x191423){return _0x191423[_0xe0bd('0xc')]({'UserId':_0x178398[_0xe0bd('0x51')]['id']},{'transaction':_0x2ede67});}});});}})['then'](handleEntityNotFound(_0x8e61d6,null))[_0xe0bd('0xd')](respondWithResult(_0x8e61d6,null))[_0xe0bd('0x3f')](handleError(_0x8e61d6,null));};exports['getPreviewRecall']=function(_0x4303ec,_0x2acb14,_0x1f230d){var _0x4fb0cb=[];var _0x5991e5=_0x4303ec[_0xe0bd('0x3d')]['id'];var _0x1cc0dd=_0x4303ec['user']['id'];return db[_0xe0bd('0x57')][_0xe0bd('0x43')]()['then'](function(_0x485bde){_0x4fb0cb=_[_0xe0bd('0x18')](_0x485bde);return db[_0xe0bd('0x6e')][_0xe0bd('0x64')](function(_0x6e9712){const _0x4e3815={'id':_0x5991e5};return db[_0xe0bd('0x3a')]['findOne']({'attributes':['id',_0xe0bd('0x7b'),_0xe0bd('0x72')],'where':_0x4e3815,'transaction':_0x6e9712,'lock':_0x6e9712[_0xe0bd('0x73')][_0xe0bd('0x74')],'include':[{'model':db[_0xe0bd('0x57')],'as':_0xe0bd('0x75'),'attributes':_0x4fb0cb,'include':[{'model':db[_0xe0bd('0x76')],'as':_0xe0bd('0x77'),'attributes':['id',_0xe0bd('0x10')]}]},{'model':db[_0xe0bd('0x78')],'as':'List','attributes':['id',_0xe0bd('0x10')]},{'model':db[_0xe0bd('0x47')],'as':_0xe0bd('0x79'),'attributes':['id','name',_0xe0bd('0x7a')]}]})[_0xe0bd('0xd')](function(_0x6a6012){if(_0x6a6012){return _0x6a6012[_0xe0bd('0xc')]({'UserId':_0x1cc0dd},{'transaction':_0x6e9712});}});});})[_0xe0bd('0xd')](handleEntityNotFound(_0x2acb14,null))[_0xe0bd('0xd')](respondWithResult(_0x2acb14,null))['catch'](handleError(_0x2acb14,null));};exports[_0xe0bd('0x7c')]=function(_0x378034,_0x17435d){return _0x378034[_0xe0bd('0x51')]['getVoiceQueues']({'where':{'type':_0xe0bd('0x7d'),'dialActive':!![],'dialMethod':_0xe0bd('0x7e')},'attributes':['id'],'raw':!![]})[_0xe0bd('0xd')](function(_0x3fb7f9){if(_0x3fb7f9&&_0x3fb7f9[_0xe0bd('0x2d')]){return db['CmHopper'][_0xe0bd('0x9')]({'where':{'active':![],'recallme':![],'scheduledAt':{'$lte':moment()[_0xe0bd('0x7f')](_0xe0bd('0x80'))},'VoiceQueueId':{'$in':_[_0xe0bd('0x12')](_0x3fb7f9,'id')},'$or':[{'UserId':null},{'UserId':_0x378034[_0xe0bd('0x51')]['id']}]}});}return 0x0;})[_0xe0bd('0xd')](function(_0x3a82a5){if(!_[_0xe0bd('0x5b')](_0x3a82a5)&&_[_0xe0bd('0x81')](_0x3a82a5)){return _0x17435d[_0xe0bd('0x5')](0xc8)[_0xe0bd('0x6')]({'contacts':_0x3a82a5});}else{logger[_0xe0bd('0x82')](_0xe0bd('0x83'),_0xe0bd('0x7c'),0x194,_0xe0bd('0x84'));_0x17435d[_0xe0bd('0xe')](0x194);}})[_0xe0bd('0x3f')](handleError(_0x17435d,null));};exports[_0xe0bd('0x85')]=function(_0x5a9a57,_0x9b312e){var _0x36ca72=shared[_0xe0bd('0x86')];var _0x52287d=[];_[_0xe0bd('0x12')](_0x36ca72,function(_0x1ae29c){_0x52287d[_0xe0bd('0x87')]({'id':_0x1ae29c[_0xe0bd('0x10')],'name':_0x1ae29c[_0xe0bd('0x10')],'utcOffset':_0x1ae29c[_0xe0bd('0x88')]});});return _0x9b312e[_0xe0bd('0x5')](0xc8)[_0xe0bd('0x6')]({'tz':_0x52287d});};exports[_0xe0bd('0x89')]=function(_0x531f39,_0x52a859){var _0x4e9fe0=shared[_0xe0bd('0x86')];var _0x42b1b4={};if(!_[_0xe0bd('0x5b')](_0x4e9fe0[_0x531f39['body']['id']]))_0x42b1b4=_0x4e9fe0[_0x531f39[_0xe0bd('0x41')]['id']];return _0x52a859[_0xe0bd('0x5')](0xc8)[_0xe0bd('0x6')](_0x42b1b4);}; \ No newline at end of file diff --git a/server/api/cmHopper/cmHopper.model.js b/server/api/cmHopper/cmHopper.model.js index 4f9a5ec..1b2d437 100644 --- a/server/api/cmHopper/cmHopper.model.js +++ b/server/api/cmHopper/cmHopper.model.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x5d58=['priority','bluebird','request-promise','rimraf','../../config/environment','exports','define','cm_hopper','scheduledat','phone'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0x5d58,0x187));var _0x85d5=function(_0x188a2c,_0x498dd2){_0x188a2c=_0x188a2c-0x0;var _0xe07c30=_0x5d58[_0x188a2c];return _0xe07c30;};'use strict';var _=require('lodash');var util=require('util');var logger=require('../../config/logger')('api');var moment=require('moment');var BPromise=require(_0x85d5('0x0'));var rp=require(_0x85d5('0x1'));var fs=require('fs');var path=require('path');var rimraf=require(_0x85d5('0x2'));var config=require(_0x85d5('0x3'));var attributes=require('./cmHopper.attributes');module[_0x85d5('0x4')]=function(_0x2d457a,_0x578fad){return _0x2d457a[_0x85d5('0x5')]('CmHopper',attributes,{'tableName':_0x85d5('0x6'),'paranoid':![],'indexes':[{'name':_0x85d5('0x7'),'fields':['scheduledat']},{'name':_0x85d5('0x8'),'fields':['phone']},{'name':_0x85d5('0x9'),'fields':[_0x85d5('0x9')]}],'timestamps':!![]});}; \ No newline at end of file +var _0xd8fb=['util','../../config/logger','api','path','rimraf','./cmHopper.attributes','exports','CmHopper','scheduledat','priority','lodash'];(function(_0x1ac2d8,_0xe1aa59){var _0x2744af=function(_0x37a898){while(--_0x37a898){_0x1ac2d8['push'](_0x1ac2d8['shift']());}};_0x2744af(++_0xe1aa59);}(_0xd8fb,0x99));var _0xbd8f=function(_0x5049fe,_0x3c618f){_0x5049fe=_0x5049fe-0x0;var _0x1ebb06=_0xd8fb[_0x5049fe];return _0x1ebb06;};'use strict';var _=require(_0xbd8f('0x0'));var util=require(_0xbd8f('0x1'));var logger=require(_0xbd8f('0x2'))(_0xbd8f('0x3'));var moment=require('moment');var BPromise=require('bluebird');var rp=require('request-promise');var fs=require('fs');var path=require(_0xbd8f('0x4'));var rimraf=require(_0xbd8f('0x5'));var config=require('../../config/environment');var attributes=require(_0xbd8f('0x6'));module[_0xbd8f('0x7')]=function(_0x5543b2,_0x33d541){return _0x5543b2['define'](_0xbd8f('0x8'),attributes,{'tableName':'cm_hopper','paranoid':![],'indexes':[{'name':_0xbd8f('0x9'),'fields':[_0xbd8f('0x9')]},{'name':'phone','fields':['phone']},{'name':_0xbd8f('0xa'),'fields':[_0xbd8f('0xa')]}],'timestamps':!![]});}; \ No newline at end of file diff --git a/server/api/cmHopper/cmHopper.rpc.js b/server/api/cmHopper/cmHopper.rpc.js index 283273e..0125231 100644 --- a/server/api/cmHopper/cmHopper.rpc.js +++ b/server/api/cmHopper/cmHopper.rpc.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x5216=['message','ShowCmHopper','CmHopper','find','raw','create','body','CreateCmHopper','UpdateCmHopper','update','UpdateCmHopper\x20hopper\x20options\x20[%s]\x20active\x20status\x20[%s]','destroy','DestroyCmHopper','GetContactDialer','CmContact','describe','limit','order','LOCK','UPDATE','User','Agent','name','voicePause','length','push','includes','GetContactDialer\x20hopperId\x20[%s]\x20-\x20contactId\x20[%s]\x20-\x20active\x20status\x20[%s]','dataValues','MoveContactManagedDialer','sequelize','transaction','CmHopperFinal','CountReScheduled','COUNT','literal','`scheduledat`\x20>=\x20','format','\x22%s\x22','YYYY-MM-DD\x20HH:mm:ss','contactsRescheduled','GetContactRecallMe','UserId','all','keys','GetContactByPhone','findOne','dialTimezone','DESC','getContactByPhone','ResetActiveCalls','CmHopperHandlePreviewRecallNotifications','interval','availableAgentsIds','NOW()\x20+\x20INTERVAL\x20','\x20MINUTE','NOW()','util','moment','bluebird','../../config/logger','findAll','options','where','attributes','include','map','model','then','info','GetCmHopper','debug','stringify','catch','error'];(function(_0x55b07e,_0x4dff53){var _0x1b80d5=function(_0x8e70b2){while(--_0x8e70b2){_0x55b07e['push'](_0x55b07e['shift']());}};_0x1b80d5(++_0x4dff53);}(_0x5216,0x165));var _0x6521=function(_0x397e5f,_0x454c8f){_0x397e5f=_0x397e5f-0x0;var _0x5302b8=_0x5216[_0x397e5f];return _0x5302b8;};'use strict';var _=require('lodash');var util=require(_0x6521('0x0'));var moment=require(_0x6521('0x1'));var BPromise=require(_0x6521('0x2'));var db=require('../../mysqldb')['db'];var logger=require(_0x6521('0x3'))('rpc');exports['GetCmHopper']=function(_0xc2629e){var _0x47d5cf=this;return new Promise(function(_0x3b5b88,_0x3023bf){return db['CmHopper'][_0x6521('0x4')]({'raw':_0xc2629e['options']?_0xc2629e[_0x6521('0x5')]['raw']===undefined?!![]:![]:!![],'where':_0xc2629e[_0x6521('0x5')]?_0xc2629e[_0x6521('0x5')][_0x6521('0x6')]||null:null,'attributes':_0xc2629e[_0x6521('0x5')]?_0xc2629e[_0x6521('0x5')][_0x6521('0x7')]||null:null,'limit':_0xc2629e[_0x6521('0x5')]?_0xc2629e[_0x6521('0x5')]['limit']||null:null,'include':_0xc2629e['options']?_0xc2629e[_0x6521('0x5')][_0x6521('0x8')]?_[_0x6521('0x9')](_0xc2629e[_0x6521('0x5')][_0x6521('0x8')],function(_0xaee94){return{'model':db[_0xaee94[_0x6521('0xa')]],'as':_0xaee94['as'],'attributes':_0xaee94[_0x6521('0x7')],'include':_0xaee94[_0x6521('0x8')]?_[_0x6521('0x9')](_0xaee94[_0x6521('0x8')],function(_0xf9982a){return{'model':db[_0xf9982a[_0x6521('0xa')]],'as':_0xf9982a['as'],'attributes':_0xf9982a['attributes'],'include':_0xf9982a[_0x6521('0x8')]?_[_0x6521('0x9')](_0xf9982a[_0x6521('0x8')],function(_0x3b5cb0){return{'model':db[_0x3b5cb0[_0x6521('0xa')]],'as':_0x3b5cb0['as'],'attributes':_0x3b5cb0[_0x6521('0x7')]};}):[]};}):[]};}):[]:[]})[_0x6521('0xb')](function(_0x4266b4){logger[_0x6521('0xc')](_0x6521('0xd'),_0xc2629e);logger[_0x6521('0xe')](_0x6521('0xd'),_0xc2629e,JSON[_0x6521('0xf')](_0x4266b4));_0x3b5b88(_0x4266b4);})[_0x6521('0x10')](function(_0x20a835){logger[_0x6521('0x11')]('GetCmHopper',_0x20a835[_0x6521('0x12')],_0xc2629e);_0x3023bf(_0x47d5cf[_0x6521('0x11')](0x1f4,_0x20a835[_0x6521('0x12')]));});});};exports[_0x6521('0x13')]=function(_0x1be069){var _0x8e4a5e=this;return new Promise(function(_0x2809fa,_0xbeb1cf){return db[_0x6521('0x14')][_0x6521('0x15')]({'raw':_0x1be069[_0x6521('0x5')]?_0x1be069[_0x6521('0x5')][_0x6521('0x16')]===undefined?!![]:![]:!![],'where':_0x1be069['options']?_0x1be069['options'][_0x6521('0x6')]||null:null,'attributes':_0x1be069[_0x6521('0x5')]?_0x1be069[_0x6521('0x5')]['attributes']||null:null,'include':_0x1be069[_0x6521('0x5')]?_0x1be069['options']['include']?_[_0x6521('0x9')](_0x1be069[_0x6521('0x5')][_0x6521('0x8')],function(_0x57cbae){return{'model':db[_0x57cbae[_0x6521('0xa')]],'as':_0x57cbae['as'],'attributes':_0x57cbae['attributes'],'include':_0x57cbae[_0x6521('0x8')]?_[_0x6521('0x9')](_0x57cbae[_0x6521('0x8')],function(_0x340589){return{'model':db[_0x340589[_0x6521('0xa')]],'as':_0x340589['as'],'attributes':_0x340589[_0x6521('0x7')],'include':_0x340589[_0x6521('0x8')]?_['map'](_0x340589[_0x6521('0x8')],function(_0x310bd9){return{'model':db[_0x310bd9[_0x6521('0xa')]],'as':_0x310bd9['as'],'attributes':_0x310bd9[_0x6521('0x7')]};}):[]};}):[]};}):[]:[]})['then'](function(_0x29955a){logger[_0x6521('0xc')](_0x6521('0x13'),_0x1be069);logger['debug']('ShowCmHopper',_0x1be069,JSON[_0x6521('0xf')](_0x29955a));_0x2809fa(_0x29955a);})[_0x6521('0x10')](function(_0x1eb20f){logger[_0x6521('0x11')]('ShowCmHopper',_0x1eb20f[_0x6521('0x12')],_0x1be069);_0xbeb1cf(_0x8e4a5e['error'](0x1f4,_0x1eb20f['message']));});});};exports['CreateCmHopper']=function(_0x35cbdc){var _0x33736a=this;return new Promise(function(_0x60b493,_0xb421af){return db[_0x6521('0x14')][_0x6521('0x17')](_0x35cbdc[_0x6521('0x18')],{'raw':_0x35cbdc[_0x6521('0x5')]?_0x35cbdc[_0x6521('0x5')][_0x6521('0x16')]===undefined?!![]:![]:!![]})[_0x6521('0xb')](function(_0x2ac118){logger['info'](_0x6521('0x19'),_0x35cbdc);logger[_0x6521('0xe')](_0x6521('0x19'),_0x35cbdc,JSON['stringify'](_0x2ac118));_0x60b493(_0x2ac118);})[_0x6521('0x10')](function(_0x36c505){logger[_0x6521('0x11')](_0x6521('0x19'),_0x36c505[_0x6521('0x12')],_0x35cbdc);_0xb421af(_0x33736a['error'](0x1f4,_0x36c505['message']));});});};exports[_0x6521('0x1a')]=function(_0x3d8384){var _0x552147=this;return new Promise(function(_0x13ab0c,_0x483987){return db[_0x6521('0x14')][_0x6521('0x1b')](_0x3d8384['body'],{'raw':_0x3d8384[_0x6521('0x5')]?_0x3d8384[_0x6521('0x5')][_0x6521('0x16')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x3d8384[_0x6521('0x5')]?_0x3d8384[_0x6521('0x5')][_0x6521('0x6')]||null:null,'attributes':_0x3d8384[_0x6521('0x5')]?_0x3d8384[_0x6521('0x5')][_0x6521('0x7')]||null:null,'limit':_0x3d8384[_0x6521('0x5')]?_0x3d8384[_0x6521('0x5')]['limit']||null:null})['then'](function(_0x5f552b){logger[_0x6521('0xc')]('UpdateCmHopper',_0x3d8384);logger[_0x6521('0xc')](_0x6521('0x1c'),JSON['stringify'](_0x3d8384[_0x6521('0x5')][_0x6521('0x6')]),_0x3d8384['body']['active']);logger[_0x6521('0xe')](_0x6521('0x1a'),_0x3d8384,JSON[_0x6521('0xf')](_0x5f552b));_0x13ab0c(_0x5f552b);})['catch'](function(_0x639c25){logger[_0x6521('0x11')]('UpdateCmHopper',_0x639c25['message'],_0x3d8384);_0x483987(_0x552147[_0x6521('0x11')](0x1f4,_0x639c25[_0x6521('0x12')]));});});};exports['DestroyCmHopper']=function(_0x54443a){var _0x735c63=this;return new Promise(function(_0x542611,_0x164235){return db[_0x6521('0x14')][_0x6521('0x1d')]({'where':_0x54443a[_0x6521('0x5')]?_0x54443a[_0x6521('0x5')][_0x6521('0x6')]||null:null})[_0x6521('0xb')](function(_0x2c6d85){logger['info'](_0x6521('0x1e'),_0x54443a);logger['debug'](_0x6521('0x1e'),_0x54443a,JSON[_0x6521('0xf')](_0x2c6d85));_0x542611(_0x2c6d85);})[_0x6521('0x10')](function(_0x1051b3){logger[_0x6521('0x11')](_0x6521('0x1e'),_0x1051b3[_0x6521('0x12')],_0x54443a);_0x164235(_0x735c63[_0x6521('0x11')](0x1f4,_0x1051b3['message']));});});};exports[_0x6521('0x1f')]=function(_0x1f2e31){var _0x177fd7=this;return new Promise(function(_0x2fd732,_0x39d0e5){return db[_0x6521('0x20')][_0x6521('0x21')]()[_0x6521('0xb')](function(_0x177bb7){return db['sequelize']['transaction'](function(_0x240af2){return db[_0x6521('0x14')][_0x6521('0x4')]({'where':_0x1f2e31[_0x6521('0x5')]?_0x1f2e31[_0x6521('0x5')][_0x6521('0x6')]||null:null,'attributes':_0x1f2e31[_0x6521('0x5')]?_0x1f2e31[_0x6521('0x5')]['attributes']||null:null,'limit':_0x1f2e31[_0x6521('0x5')]?_0x1f2e31[_0x6521('0x5')][_0x6521('0x22')]||null:null,'order':_0x1f2e31[_0x6521('0x5')]?_0x1f2e31['options'][_0x6521('0x23')]||null:null,'transaction':_0x240af2,'lock':_0x240af2[_0x6521('0x24')][_0x6521('0x25')],'include':[{'model':db[_0x6521('0x20')],'as':'Contact','attributes':_['keys'](_0x177bb7)},{'model':db[_0x6521('0x26')],'as':_0x6521('0x27'),'attributes':['id',_0x6521('0x28'),_0x6521('0x29')]}]})[_0x6521('0xb')](function(_0x293269){var _0x1a4ad0=[];var _0x6e55db=[];for(var _0x58c46e=0x0;_0x58c46e<_0x293269[_0x6521('0x2a')];_0x58c46e+=0x1){var _0x2920f3=_0x293269[_0x58c46e]['UserId'];if(_0x2920f3===null){_0x1a4ad0[_0x6521('0x2b')](_0x293269[_0x58c46e][_0x6521('0x1b')](_0x1f2e31['body'],{'transaction':_0x240af2}));}else if(!_0x6e55db[_0x6521('0x2c')](_0x2920f3)){_0x6e55db[_0x6521('0x2b')](_0x2920f3);_0x1a4ad0['push'](_0x293269[_0x58c46e][_0x6521('0x1b')](_0x1f2e31[_0x6521('0x18')],{'transaction':_0x240af2}));}}return BPromise['all'](_0x1a4ad0);});})[_0x6521('0xb')](function(_0x236d78){logger[_0x6521('0xc')]('GetContactDialer',_0x1f2e31);if(_0x236d78[_0x6521('0x2a')]>0x0){logger['info'](_0x6521('0x2d'),_0x236d78[0x0][_0x6521('0x2e')]['id'],_0x236d78[0x0][_0x6521('0x2e')]['ContactId'],_0x236d78[0x0][_0x6521('0x2e')]['active']);}logger[_0x6521('0xe')](_0x6521('0x1f'),_0x1f2e31,JSON['stringify'](_0x236d78));_0x2fd732(_0x236d78);})[_0x6521('0x10')](function(_0x610422){logger[_0x6521('0x11')](_0x6521('0x1f'),_0x610422[_0x6521('0x12')],_0x1f2e31);_0x39d0e5(_0x177fd7[_0x6521('0x11')](0x1f4,_0x610422[_0x6521('0x12')]));});});});};exports[_0x6521('0x2f')]=function(_0x3ef21a){var _0x45a13b=this;return new Promise(function(_0x100d2d,_0x4759bc){return db[_0x6521('0x30')][_0x6521('0x31')](function(_0x37f759){return db[_0x6521('0x32')][_0x6521('0x17')](_0x3ef21a[_0x6521('0x18')],{'raw':_0x3ef21a[_0x6521('0x5')]?_0x3ef21a['options']['raw']===undefined?!![]:![]:!![],'transaction':_0x37f759})[_0x6521('0xb')](function(){logger['info']('MoveContactManagedDialer\x20hopper\x20options\x20[%s]\x20active\x20status\x20[%s]',JSON[_0x6521('0xf')](_0x3ef21a['options']['where']),_0x3ef21a[_0x6521('0x5')]['where']['active']);return db['CmHopper']['destroy']({'where':_0x3ef21a[_0x6521('0x5')]?_0x3ef21a[_0x6521('0x5')]['where']||null:null,'transaction':_0x37f759});});})[_0x6521('0xb')](function(_0x2dbb48){logger[_0x6521('0xc')](_0x6521('0x2f'),_0x3ef21a);logger[_0x6521('0xe')](_0x6521('0x2f'),_0x3ef21a,JSON[_0x6521('0xf')](_0x2dbb48));_0x100d2d(_0x2dbb48);})[_0x6521('0x10')](function(_0x1d66e7){logger[_0x6521('0x11')](_0x6521('0x2f'),_0x1d66e7[_0x6521('0x12')],_0x3ef21a);_0x4759bc(_0x45a13b[_0x6521('0x11')](0x1f4,_0x1d66e7[_0x6521('0x12')]));});});};exports[_0x6521('0x33')]=function(_0x556162){var _0x1e1e95=this;return new Promise(function(_0x32b114,_0x335aa6){return db[_0x6521('0x14')][_0x6521('0x4')]({'raw':_0x556162[_0x6521('0x5')]?_0x556162[_0x6521('0x5')]['raw']===undefined?!![]:![]:!![],'where':_0x556162[_0x6521('0x5')]?_0x556162['options'][_0x6521('0x6')]||null:null,'attributes':[[db[_0x6521('0x30')]['fn'](_0x6521('0x34'),db[_0x6521('0x30')]['fn']('IF',db[_0x6521('0x30')][_0x6521('0x35')](_0x6521('0x36')+util[_0x6521('0x37')](_0x6521('0x38'),moment()[_0x6521('0x37')](_0x6521('0x39')))+'\x20,\x201,\x20null'))),_0x6521('0x3a')]]})[_0x6521('0xb')](function(_0x4f445c){logger[_0x6521('0xc')]('CountReScheduled',_0x556162);logger[_0x6521('0xe')](_0x6521('0x33'),_0x556162,JSON[_0x6521('0xf')](_0x4f445c));_0x32b114(_0x4f445c);})[_0x6521('0x10')](function(_0xdd62d3){logger[_0x6521('0x11')](_0x6521('0x33'),_0xdd62d3[_0x6521('0x12')],_0x556162);_0x335aa6(_0x1e1e95[_0x6521('0x11')](0x1f4,_0xdd62d3['message']));});});};exports[_0x6521('0x3b')]=function(_0x169d08){var _0xf793d4=this;return new Promise(function(_0x1645c0,_0x1f8983){return db[_0x6521('0x20')][_0x6521('0x21')]()[_0x6521('0xb')](function(){return db[_0x6521('0x30')][_0x6521('0x31')](function(_0x212da8){return db[_0x6521('0x14')]['findAll']({'where':_0x169d08[_0x6521('0x5')]?_0x169d08[_0x6521('0x5')][_0x6521('0x6')]||null:null,'attributes':_0x169d08['options']?_0x169d08['options'][_0x6521('0x7')]||null:null,'limit':0x1,'order':_0x169d08['options']?_0x169d08[_0x6521('0x5')][_0x6521('0x23')]||null:null,'group':db[_0x6521('0x14')][_0x6521('0x3c')],'transaction':_0x212da8,'lock':_0x212da8['LOCK'][_0x6521('0x25')],'include':_0x169d08[_0x6521('0x5')]?_0x169d08['options']['include']?_[_0x6521('0x9')](_0x169d08[_0x6521('0x5')][_0x6521('0x8')],function(_0x48ca29){return{'model':db[_0x48ca29[_0x6521('0xa')]],'as':_0x48ca29['as'],'attributes':_0x48ca29[_0x6521('0x7')],'include':_0x48ca29[_0x6521('0x8')]?_[_0x6521('0x9')](_0x48ca29[_0x6521('0x8')],function(_0x5748f1){return{'model':db[_0x5748f1[_0x6521('0xa')]],'as':_0x5748f1['as'],'attributes':_0x5748f1[_0x6521('0x7')],'include':_0x5748f1[_0x6521('0x8')]?_[_0x6521('0x9')](_0x5748f1[_0x6521('0x8')],function(_0x372867){return{'model':db[_0x372867[_0x6521('0xa')]],'as':_0x372867['as'],'attributes':_0x372867[_0x6521('0x7')]};}):[]};}):[]};}):[]:[]})['then'](function(_0x515e63){var _0x42da3c=[];for(var _0x3dc037=0x0;_0x3dc037<_0x515e63[_0x6521('0x2a')];_0x3dc037+=0x1){_0x42da3c[_0x6521('0x2b')](_0x515e63[_0x3dc037][_0x6521('0x1b')](_0x169d08['body'],{'transaction':_0x212da8}));}return BPromise[_0x6521('0x3d')](_0x42da3c);});})[_0x6521('0xb')](function(_0x60dfa7){logger['info'](_0x6521('0x3b'),_0x169d08);logger[_0x6521('0xe')]('GetContactRecallMe',_0x169d08,JSON[_0x6521('0xf')](_0x60dfa7));_0x1645c0(_0x60dfa7);})['catch'](function(_0x259ad8){logger['error'](_0x6521('0x3b'),_0x259ad8[_0x6521('0x12')],_0x169d08);_0x1f8983(_0xf793d4[_0x6521('0x11')](0x1f4,_0x259ad8[_0x6521('0x12')]));});});});};exports['GetCmHopperPreview']=function(_0x892870){var _0x4ffdbf=this;return new Promise(function(_0x27da9a,_0x5eccc1){db[_0x6521('0x20')][_0x6521('0x21')]()[_0x6521('0xb')](function(_0x5b7bce){return db[_0x6521('0x14')]['findAll']({'raw':_0x892870[_0x6521('0x5')]?_0x892870[_0x6521('0x5')][_0x6521('0x16')]===undefined?!![]:![]:!![],'where':_0x892870['options']?_0x892870[_0x6521('0x5')][_0x6521('0x6')]||null:null,'attributes':_0x892870[_0x6521('0x5')]?_0x892870[_0x6521('0x5')]['attributes']||null:null,'limit':_0x892870['options']?_0x892870[_0x6521('0x5')][_0x6521('0x22')]||null:null,'include':_0x892870['options']?_0x892870['options']['include']?_[_0x6521('0x9')](_0x892870[_0x6521('0x5')][_0x6521('0x8')],function(_0x3526d1){return{'model':db[_0x3526d1[_0x6521('0xa')]],'as':_0x3526d1['as'],'attributes':_0x3526d1['as']==='Contact'?_[_0x6521('0x3e')](_0x5b7bce):_0x3526d1[_0x6521('0x7')],'include':_0x3526d1['include']?_['map'](_0x3526d1[_0x6521('0x8')],function(_0x3166d4){return{'model':db[_0x3166d4[_0x6521('0xa')]],'as':_0x3166d4['as'],'attributes':_0x3166d4[_0x6521('0x7')],'include':_0x3166d4[_0x6521('0x8')]?_['map'](_0x3166d4[_0x6521('0x8')],function(_0x3437b5){return{'model':db[_0x3437b5[_0x6521('0xa')]],'as':_0x3437b5['as'],'attributes':_0x3437b5['attributes']};}):[]};}):[]};}):[]:[]})[_0x6521('0xb')](function(_0x4732f4){logger['info']('GetCmHopper',_0x892870);logger[_0x6521('0xe')](_0x6521('0xd'),_0x892870,JSON[_0x6521('0xf')](_0x4732f4));_0x27da9a(_0x4732f4);})['catch'](function(_0x31712c){logger[_0x6521('0x11')](_0x6521('0xd'),_0x31712c[_0x6521('0x12')],_0x892870);_0x5eccc1(_0x4ffdbf[_0x6521('0x11')](0x1f4,_0x31712c[_0x6521('0x12')]));});});});};exports[_0x6521('0x3f')]=function(_0x1f4ac8){var _0x42fc85=this;return new Promise(function(_0x14fae9,_0x39f9d7){return db[_0x6521('0x20')][_0x6521('0x40')]({'raw':!![],'where':{'phone':_0x1f4ac8[_0x6521('0x5')][_0x6521('0x6')]['phone']},'attributes':['id',_0x6521('0x41')],'order':[['id',_0x6521('0x42')]]})[_0x6521('0xb')](function(_0x2989bf){logger[_0x6521('0xc')]('getContactByPhone',_0x1f4ac8);logger[_0x6521('0xe')]('getContactByPhone',_0x1f4ac8,JSON[_0x6521('0xf')](_0x2989bf));_0x14fae9(_0x2989bf);})[_0x6521('0x10')](function(_0x2fe8e8){logger[_0x6521('0x11')](_0x6521('0x43'),_0x2fe8e8['message'],_0x1f4ac8);_0x39f9d7(_0x42fc85[_0x6521('0x11')](0x1f4,_0x2fe8e8[_0x6521('0x12')]));});});};exports[_0x6521('0x44')]=function(_0x179ffb){var _0x55853c=this;return new Promise(function(_0x4d24ad,_0xa3c4a8){return db[_0x6521('0x30')][_0x6521('0x31')](function(_0x13450b){var _0x18f33b=_0x179ffb['options']&&_0x179ffb[_0x6521('0x5')][_0x6521('0x6')]?_0x179ffb['options'][_0x6521('0x6')]:{};return db[_0x6521('0x14')][_0x6521('0x1b')](_0x179ffb['body'],{'where':_0x18f33b,'transaction':_0x13450b})[_0x6521('0xb')](function(_0x27804b){logger[_0x6521('0xc')](_0x6521('0x44'),_0x179ffb);logger['debug'](_0x6521('0x44'),_0x179ffb,JSON[_0x6521('0xf')](_0x27804b));_0x4d24ad(_0x27804b);})[_0x6521('0x10')](function(_0x17a5c9){logger[_0x6521('0x11')]('ResetActiveCalls',_0x17a5c9[_0x6521('0x12')],_0x179ffb);_0xa3c4a8(_0x55853c[_0x6521('0x11')](0x1f4,_0x17a5c9[_0x6521('0x12')]));});});});};exports[_0x6521('0x45')]=function(_0x1e2245){var _0x4a1ebf=this;var _0x3411b4=_0x1e2245[_0x6521('0x18')][_0x6521('0x6')]['voiceQueueIds'];var _0x438c93=_0x1e2245[_0x6521('0x18')][_0x6521('0x6')][_0x6521('0x46')];var _0x47ac4c=_0x1e2245['body'][_0x6521('0x6')][_0x6521('0x47')];return new Promise(function(_0x40d710,_0xa6f84d){return db[_0x6521('0x14')][_0x6521('0x4')]({'where':{'voiceQueueId':{'$in':_0x3411b4},'recallme':0x1,'active':0x0,'recallmeNotifiedDate':{'$eq':null},'scheduledat':{'$and':{'$lte':db[_0x6521('0x30')][_0x6521('0x35')](_0x6521('0x48')+_0x438c93+_0x6521('0x49')),'$gt':db['sequelize'][_0x6521('0x35')](_0x6521('0x4a'))}},'UserId':{'$in':_0x47ac4c}},'include':[{'model':db[_0x6521('0x20')],'as':'Contact'},{'model':db['User'],'as':_0x6521('0x27'),'attributes':['id',_0x6521('0x28'),'voicePause']},{'model':db['CmList'],'as':'List'}]})[_0x6521('0xb')](function(_0x4ed412){if(_0x4ed412[_0x6521('0x2a')]>0x0){return db['sequelize'][_0x6521('0x31')](function(_0x114fed){return db[_0x6521('0x14')]['update']({'recallmeNotifiedDate':db['sequelize'][_0x6521('0x35')](_0x6521('0x4a'))},{'where':{'id':{'$in':_['map'](_0x4ed412,'id')}},'transaction':_0x114fed})[_0x6521('0xb')](function(){_0x40d710(_0x4ed412);})[_0x6521('0x10')](function(_0x27aa6f){logger[_0x6521('0x11')]('CmHopperHandlePreviewRecallNotifications',_0x27aa6f[_0x6521('0x12')],_0x1e2245);_0xa6f84d(_0x4a1ebf[_0x6521('0x11')](0x1f4,_0x27aa6f[_0x6521('0x12')]));});})[_0x6521('0x10')](function(_0x261a89){logger[_0x6521('0x11')](_0x6521('0x45'),_0x261a89['message'],_0x1e2245);_0xa6f84d(_0x4a1ebf['error'](0x1f4,_0x261a89[_0x6521('0x12')]));});}else{_0x40d710(_0x4ed412);}});});}; \ No newline at end of file +var _0x6e87=['order','UPDATE','Contact','keys','User','Agent','name','length','UserId','push','includes','all','GetContactDialer\x20hopperId\x20[%s]\x20-\x20contactId\x20[%s]\x20-\x20active\x20status\x20[%s]','dataValues','ContactId','MoveContactManagedDialer','sequelize','CmHopperFinal','destroy','CountReScheduled','COUNT','`scheduledat`\x20>=\x20','format','\x22%s\x22','YYYY-MM-DD\x20HH:mm:ss','\x20,\x201,\x20null','contactsRescheduled','GetContactRecallMe','LOCK','GetContactByPhone','findOne','dialTimezone','DESC','getContactByPhone','ResetActiveCalls','CmHopperHandlePreviewRecallNotifications','interval','availableAgentsIds','NOW()\x20+\x20INTERVAL\x20','\x20MINUTE','literal','NOW()','voicePause','CmList','util','moment','bluebird','../../mysqldb','../../config/logger','rpc','CmHopper','findAll','options','raw','where','attributes','limit','include','map','model','then','GetCmHopper','debug','stringify','catch','error','message','ShowCmHopper','find','CreateCmHopper','create','body','UpdateCmHopper','update','info','UpdateCmHopper\x20hopper\x20options\x20[%s]\x20active\x20status\x20[%s]','active','DestroyCmHopper','GetContactDialer','CmContact','describe','transaction'];(function(_0x6f8634,_0x254758){var _0x5c4d81=function(_0x1fd1c6){while(--_0x1fd1c6){_0x6f8634['push'](_0x6f8634['shift']());}};_0x5c4d81(++_0x254758);}(_0x6e87,0x7e));var _0x76e8=function(_0x2eacf1,_0x2f747f){_0x2eacf1=_0x2eacf1-0x0;var _0x147531=_0x6e87[_0x2eacf1];return _0x147531;};'use strict';var _=require('lodash');var util=require(_0x76e8('0x0'));var moment=require(_0x76e8('0x1'));var BPromise=require(_0x76e8('0x2'));var db=require(_0x76e8('0x3'))['db'];var logger=require(_0x76e8('0x4'))(_0x76e8('0x5'));exports['GetCmHopper']=function(_0x595090){var _0x329714=this;return new Promise(function(_0x10fb54,_0x1cc955){return db[_0x76e8('0x6')][_0x76e8('0x7')]({'raw':_0x595090[_0x76e8('0x8')]?_0x595090[_0x76e8('0x8')][_0x76e8('0x9')]===undefined?!![]:![]:!![],'where':_0x595090['options']?_0x595090['options'][_0x76e8('0xa')]||null:null,'attributes':_0x595090['options']?_0x595090[_0x76e8('0x8')][_0x76e8('0xb')]||null:null,'limit':_0x595090[_0x76e8('0x8')]?_0x595090[_0x76e8('0x8')][_0x76e8('0xc')]||null:null,'include':_0x595090[_0x76e8('0x8')]?_0x595090[_0x76e8('0x8')][_0x76e8('0xd')]?_[_0x76e8('0xe')](_0x595090[_0x76e8('0x8')][_0x76e8('0xd')],function(_0x221d7d){return{'model':db[_0x221d7d[_0x76e8('0xf')]],'as':_0x221d7d['as'],'attributes':_0x221d7d['attributes'],'include':_0x221d7d[_0x76e8('0xd')]?_['map'](_0x221d7d[_0x76e8('0xd')],function(_0x23571d){return{'model':db[_0x23571d[_0x76e8('0xf')]],'as':_0x23571d['as'],'attributes':_0x23571d[_0x76e8('0xb')],'include':_0x23571d[_0x76e8('0xd')]?_[_0x76e8('0xe')](_0x23571d[_0x76e8('0xd')],function(_0x3c0805){return{'model':db[_0x3c0805[_0x76e8('0xf')]],'as':_0x3c0805['as'],'attributes':_0x3c0805['attributes']};}):[]};}):[]};}):[]:[]})[_0x76e8('0x10')](function(_0x1140d9){logger['info'](_0x76e8('0x11'),_0x595090);logger[_0x76e8('0x12')](_0x76e8('0x11'),_0x595090,JSON[_0x76e8('0x13')](_0x1140d9));_0x10fb54(_0x1140d9);})[_0x76e8('0x14')](function(_0x498a6f){logger[_0x76e8('0x15')](_0x76e8('0x11'),_0x498a6f[_0x76e8('0x16')],_0x595090);_0x1cc955(_0x329714[_0x76e8('0x15')](0x1f4,_0x498a6f[_0x76e8('0x16')]));});});};exports[_0x76e8('0x17')]=function(_0x150da1){var _0x18bac6=this;return new Promise(function(_0x202036,_0x2d7de8){return db[_0x76e8('0x6')][_0x76e8('0x18')]({'raw':_0x150da1[_0x76e8('0x8')]?_0x150da1['options']['raw']===undefined?!![]:![]:!![],'where':_0x150da1[_0x76e8('0x8')]?_0x150da1[_0x76e8('0x8')][_0x76e8('0xa')]||null:null,'attributes':_0x150da1[_0x76e8('0x8')]?_0x150da1[_0x76e8('0x8')][_0x76e8('0xb')]||null:null,'include':_0x150da1['options']?_0x150da1[_0x76e8('0x8')][_0x76e8('0xd')]?_['map'](_0x150da1[_0x76e8('0x8')][_0x76e8('0xd')],function(_0x1a3a85){return{'model':db[_0x1a3a85[_0x76e8('0xf')]],'as':_0x1a3a85['as'],'attributes':_0x1a3a85['attributes'],'include':_0x1a3a85[_0x76e8('0xd')]?_[_0x76e8('0xe')](_0x1a3a85['include'],function(_0x3357db){return{'model':db[_0x3357db[_0x76e8('0xf')]],'as':_0x3357db['as'],'attributes':_0x3357db['attributes'],'include':_0x3357db[_0x76e8('0xd')]?_[_0x76e8('0xe')](_0x3357db[_0x76e8('0xd')],function(_0x5352a0){return{'model':db[_0x5352a0['model']],'as':_0x5352a0['as'],'attributes':_0x5352a0['attributes']};}):[]};}):[]};}):[]:[]})[_0x76e8('0x10')](function(_0x3b9ad1){logger['info'](_0x76e8('0x17'),_0x150da1);logger['debug'](_0x76e8('0x17'),_0x150da1,JSON[_0x76e8('0x13')](_0x3b9ad1));_0x202036(_0x3b9ad1);})[_0x76e8('0x14')](function(_0x2f5f04){logger[_0x76e8('0x15')](_0x76e8('0x17'),_0x2f5f04['message'],_0x150da1);_0x2d7de8(_0x18bac6[_0x76e8('0x15')](0x1f4,_0x2f5f04[_0x76e8('0x16')]));});});};exports[_0x76e8('0x19')]=function(_0x578159){var _0x231009=this;return new Promise(function(_0x197e4f,_0x42244e){return db[_0x76e8('0x6')][_0x76e8('0x1a')](_0x578159[_0x76e8('0x1b')],{'raw':_0x578159['options']?_0x578159['options'][_0x76e8('0x9')]===undefined?!![]:![]:!![]})[_0x76e8('0x10')](function(_0x280283){logger['info'](_0x76e8('0x19'),_0x578159);logger[_0x76e8('0x12')](_0x76e8('0x19'),_0x578159,JSON[_0x76e8('0x13')](_0x280283));_0x197e4f(_0x280283);})[_0x76e8('0x14')](function(_0x5da13b){logger[_0x76e8('0x15')](_0x76e8('0x19'),_0x5da13b[_0x76e8('0x16')],_0x578159);_0x42244e(_0x231009['error'](0x1f4,_0x5da13b[_0x76e8('0x16')]));});});};exports[_0x76e8('0x1c')]=function(_0x12748a){var _0x131307=this;return new Promise(function(_0x14f7f7,_0x18db71){return db[_0x76e8('0x6')][_0x76e8('0x1d')](_0x12748a[_0x76e8('0x1b')],{'raw':_0x12748a[_0x76e8('0x8')]?_0x12748a[_0x76e8('0x8')][_0x76e8('0x9')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x12748a[_0x76e8('0x8')]?_0x12748a['options'][_0x76e8('0xa')]||null:null,'attributes':_0x12748a['options']?_0x12748a['options'][_0x76e8('0xb')]||null:null,'limit':_0x12748a[_0x76e8('0x8')]?_0x12748a[_0x76e8('0x8')][_0x76e8('0xc')]||null:null})[_0x76e8('0x10')](function(_0x21eaf8){logger[_0x76e8('0x1e')]('UpdateCmHopper',_0x12748a);logger[_0x76e8('0x1e')](_0x76e8('0x1f'),JSON['stringify'](_0x12748a[_0x76e8('0x8')][_0x76e8('0xa')]),_0x12748a[_0x76e8('0x1b')][_0x76e8('0x20')]);logger['debug'](_0x76e8('0x1c'),_0x12748a,JSON[_0x76e8('0x13')](_0x21eaf8));_0x14f7f7(_0x21eaf8);})['catch'](function(_0x117743){logger['error'](_0x76e8('0x1c'),_0x117743[_0x76e8('0x16')],_0x12748a);_0x18db71(_0x131307[_0x76e8('0x15')](0x1f4,_0x117743['message']));});});};exports['DestroyCmHopper']=function(_0x37c4d8){var _0x4245b1=this;return new Promise(function(_0x4870d9,_0x296365){return db[_0x76e8('0x6')]['destroy']({'where':_0x37c4d8[_0x76e8('0x8')]?_0x37c4d8[_0x76e8('0x8')][_0x76e8('0xa')]||null:null})[_0x76e8('0x10')](function(_0x4287fd){logger[_0x76e8('0x1e')](_0x76e8('0x21'),_0x37c4d8);logger[_0x76e8('0x12')](_0x76e8('0x21'),_0x37c4d8,JSON[_0x76e8('0x13')](_0x4287fd));_0x4870d9(_0x4287fd);})[_0x76e8('0x14')](function(_0x4d57b7){logger[_0x76e8('0x15')](_0x76e8('0x21'),_0x4d57b7[_0x76e8('0x16')],_0x37c4d8);_0x296365(_0x4245b1[_0x76e8('0x15')](0x1f4,_0x4d57b7[_0x76e8('0x16')]));});});};exports[_0x76e8('0x22')]=function(_0x3b268d){var _0x36f5d6=this;return new Promise(function(_0x27d5ac,_0x1d6785){return db[_0x76e8('0x23')][_0x76e8('0x24')]()[_0x76e8('0x10')](function(_0x1363b3){return db['sequelize'][_0x76e8('0x25')](function(_0x5e32a4){return db[_0x76e8('0x6')][_0x76e8('0x7')]({'where':_0x3b268d[_0x76e8('0x8')]?_0x3b268d[_0x76e8('0x8')][_0x76e8('0xa')]||null:null,'attributes':_0x3b268d[_0x76e8('0x8')]?_0x3b268d[_0x76e8('0x8')][_0x76e8('0xb')]||null:null,'limit':_0x3b268d[_0x76e8('0x8')]?_0x3b268d[_0x76e8('0x8')][_0x76e8('0xc')]||null:null,'order':_0x3b268d[_0x76e8('0x8')]?_0x3b268d['options'][_0x76e8('0x26')]||null:null,'transaction':_0x5e32a4,'lock':_0x5e32a4['LOCK'][_0x76e8('0x27')],'include':[{'model':db[_0x76e8('0x23')],'as':_0x76e8('0x28'),'attributes':_[_0x76e8('0x29')](_0x1363b3)},{'model':db[_0x76e8('0x2a')],'as':_0x76e8('0x2b'),'attributes':['id',_0x76e8('0x2c'),'voicePause']}]})['then'](function(_0x52a862){var _0x4569ce=[];var _0x4da141=[];for(var _0x42f5dd=0x0;_0x42f5dd<_0x52a862[_0x76e8('0x2d')];_0x42f5dd+=0x1){var _0x925304=_0x52a862[_0x42f5dd][_0x76e8('0x2e')];if(_0x925304===null){_0x4569ce[_0x76e8('0x2f')](_0x52a862[_0x42f5dd][_0x76e8('0x1d')](_0x3b268d[_0x76e8('0x1b')],{'transaction':_0x5e32a4}));}else if(!_0x4da141[_0x76e8('0x30')](_0x925304)){_0x4da141[_0x76e8('0x2f')](_0x925304);_0x4569ce[_0x76e8('0x2f')](_0x52a862[_0x42f5dd][_0x76e8('0x1d')](_0x3b268d[_0x76e8('0x1b')],{'transaction':_0x5e32a4}));}}return BPromise[_0x76e8('0x31')](_0x4569ce);});})[_0x76e8('0x10')](function(_0x30044b){logger[_0x76e8('0x1e')](_0x76e8('0x22'),_0x3b268d);if(_0x30044b[_0x76e8('0x2d')]>0x0){logger[_0x76e8('0x1e')](_0x76e8('0x32'),_0x30044b[0x0]['dataValues']['id'],_0x30044b[0x0][_0x76e8('0x33')][_0x76e8('0x34')],_0x30044b[0x0][_0x76e8('0x33')]['active']);}logger[_0x76e8('0x12')](_0x76e8('0x22'),_0x3b268d,JSON[_0x76e8('0x13')](_0x30044b));_0x27d5ac(_0x30044b);})[_0x76e8('0x14')](function(_0x4cd210){logger['error'](_0x76e8('0x22'),_0x4cd210[_0x76e8('0x16')],_0x3b268d);_0x1d6785(_0x36f5d6[_0x76e8('0x15')](0x1f4,_0x4cd210[_0x76e8('0x16')]));});});});};exports[_0x76e8('0x35')]=function(_0x13e80c){var _0x3c9f75=this;return new Promise(function(_0x52ad85,_0x50ea70){return db[_0x76e8('0x36')][_0x76e8('0x25')](function(_0x5a8c2c){return db[_0x76e8('0x37')][_0x76e8('0x1a')](_0x13e80c[_0x76e8('0x1b')],{'raw':_0x13e80c['options']?_0x13e80c[_0x76e8('0x8')]['raw']===undefined?!![]:![]:!![],'transaction':_0x5a8c2c})['then'](function(){logger['info']('MoveContactManagedDialer\x20hopper\x20options\x20[%s]\x20active\x20status\x20[%s]',JSON['stringify'](_0x13e80c['options'][_0x76e8('0xa')]),_0x13e80c[_0x76e8('0x8')]['where'][_0x76e8('0x20')]);return db[_0x76e8('0x6')][_0x76e8('0x38')]({'where':_0x13e80c[_0x76e8('0x8')]?_0x13e80c[_0x76e8('0x8')][_0x76e8('0xa')]||null:null,'transaction':_0x5a8c2c});});})['then'](function(_0x228d60){logger[_0x76e8('0x1e')](_0x76e8('0x35'),_0x13e80c);logger[_0x76e8('0x12')](_0x76e8('0x35'),_0x13e80c,JSON[_0x76e8('0x13')](_0x228d60));_0x52ad85(_0x228d60);})[_0x76e8('0x14')](function(_0x3b1601){logger['error'](_0x76e8('0x35'),_0x3b1601['message'],_0x13e80c);_0x50ea70(_0x3c9f75[_0x76e8('0x15')](0x1f4,_0x3b1601[_0x76e8('0x16')]));});});};exports[_0x76e8('0x39')]=function(_0x2059e1){var _0x50b8cb=this;return new Promise(function(_0x59b7a9,_0xd65636){return db[_0x76e8('0x6')][_0x76e8('0x7')]({'raw':_0x2059e1['options']?_0x2059e1[_0x76e8('0x8')][_0x76e8('0x9')]===undefined?!![]:![]:!![],'where':_0x2059e1['options']?_0x2059e1[_0x76e8('0x8')]['where']||null:null,'attributes':[[db['sequelize']['fn'](_0x76e8('0x3a'),db[_0x76e8('0x36')]['fn']('IF',db[_0x76e8('0x36')]['literal'](_0x76e8('0x3b')+util[_0x76e8('0x3c')](_0x76e8('0x3d'),moment()[_0x76e8('0x3c')](_0x76e8('0x3e')))+_0x76e8('0x3f')))),_0x76e8('0x40')]]})['then'](function(_0xee0fb6){logger[_0x76e8('0x1e')](_0x76e8('0x39'),_0x2059e1);logger[_0x76e8('0x12')](_0x76e8('0x39'),_0x2059e1,JSON[_0x76e8('0x13')](_0xee0fb6));_0x59b7a9(_0xee0fb6);})[_0x76e8('0x14')](function(_0x2750d1){logger['error'](_0x76e8('0x39'),_0x2750d1[_0x76e8('0x16')],_0x2059e1);_0xd65636(_0x50b8cb['error'](0x1f4,_0x2750d1[_0x76e8('0x16')]));});});};exports[_0x76e8('0x41')]=function(_0x2fc189){var _0x3e1d27=this;return new Promise(function(_0x1aa7f6,_0x4b94f4){return db[_0x76e8('0x23')][_0x76e8('0x24')]()[_0x76e8('0x10')](function(){return db[_0x76e8('0x36')][_0x76e8('0x25')](function(_0x347692){return db['CmHopper'][_0x76e8('0x7')]({'where':_0x2fc189[_0x76e8('0x8')]?_0x2fc189[_0x76e8('0x8')][_0x76e8('0xa')]||null:null,'attributes':_0x2fc189[_0x76e8('0x8')]?_0x2fc189[_0x76e8('0x8')][_0x76e8('0xb')]||null:null,'limit':0x1,'order':_0x2fc189['options']?_0x2fc189[_0x76e8('0x8')][_0x76e8('0x26')]||null:null,'group':db[_0x76e8('0x6')][_0x76e8('0x2e')],'transaction':_0x347692,'lock':_0x347692[_0x76e8('0x42')][_0x76e8('0x27')],'include':_0x2fc189['options']?_0x2fc189[_0x76e8('0x8')][_0x76e8('0xd')]?_[_0x76e8('0xe')](_0x2fc189['options'][_0x76e8('0xd')],function(_0x127047){return{'model':db[_0x127047['model']],'as':_0x127047['as'],'attributes':_0x127047[_0x76e8('0xb')],'include':_0x127047[_0x76e8('0xd')]?_[_0x76e8('0xe')](_0x127047[_0x76e8('0xd')],function(_0x2f6b0c){return{'model':db[_0x2f6b0c[_0x76e8('0xf')]],'as':_0x2f6b0c['as'],'attributes':_0x2f6b0c[_0x76e8('0xb')],'include':_0x2f6b0c[_0x76e8('0xd')]?_['map'](_0x2f6b0c[_0x76e8('0xd')],function(_0x274ec4){return{'model':db[_0x274ec4[_0x76e8('0xf')]],'as':_0x274ec4['as'],'attributes':_0x274ec4[_0x76e8('0xb')]};}):[]};}):[]};}):[]:[]})['then'](function(_0x29b7e9){var _0xd9ab6e=[];for(var _0x1f07bc=0x0;_0x1f07bc<_0x29b7e9[_0x76e8('0x2d')];_0x1f07bc+=0x1){_0xd9ab6e[_0x76e8('0x2f')](_0x29b7e9[_0x1f07bc][_0x76e8('0x1d')](_0x2fc189['body'],{'transaction':_0x347692}));}return BPromise[_0x76e8('0x31')](_0xd9ab6e);});})[_0x76e8('0x10')](function(_0x411687){logger[_0x76e8('0x1e')](_0x76e8('0x41'),_0x2fc189);logger[_0x76e8('0x12')](_0x76e8('0x41'),_0x2fc189,JSON['stringify'](_0x411687));_0x1aa7f6(_0x411687);})[_0x76e8('0x14')](function(_0x1f89a1){logger[_0x76e8('0x15')](_0x76e8('0x41'),_0x1f89a1['message'],_0x2fc189);_0x4b94f4(_0x3e1d27[_0x76e8('0x15')](0x1f4,_0x1f89a1['message']));});});});};exports['GetCmHopperPreview']=function(_0x2f142e){var _0x51f254=this;return new Promise(function(_0xf0acf3,_0x231f8c){db[_0x76e8('0x23')]['describe']()[_0x76e8('0x10')](function(_0x112fbb){return db['CmHopper'][_0x76e8('0x7')]({'raw':_0x2f142e[_0x76e8('0x8')]?_0x2f142e[_0x76e8('0x8')][_0x76e8('0x9')]===undefined?!![]:![]:!![],'where':_0x2f142e['options']?_0x2f142e[_0x76e8('0x8')][_0x76e8('0xa')]||null:null,'attributes':_0x2f142e[_0x76e8('0x8')]?_0x2f142e['options']['attributes']||null:null,'limit':_0x2f142e['options']?_0x2f142e[_0x76e8('0x8')][_0x76e8('0xc')]||null:null,'include':_0x2f142e[_0x76e8('0x8')]?_0x2f142e[_0x76e8('0x8')][_0x76e8('0xd')]?_[_0x76e8('0xe')](_0x2f142e['options']['include'],function(_0x4b3e83){return{'model':db[_0x4b3e83[_0x76e8('0xf')]],'as':_0x4b3e83['as'],'attributes':_0x4b3e83['as']===_0x76e8('0x28')?_[_0x76e8('0x29')](_0x112fbb):_0x4b3e83[_0x76e8('0xb')],'include':_0x4b3e83[_0x76e8('0xd')]?_[_0x76e8('0xe')](_0x4b3e83[_0x76e8('0xd')],function(_0x4e2174){return{'model':db[_0x4e2174[_0x76e8('0xf')]],'as':_0x4e2174['as'],'attributes':_0x4e2174[_0x76e8('0xb')],'include':_0x4e2174[_0x76e8('0xd')]?_[_0x76e8('0xe')](_0x4e2174[_0x76e8('0xd')],function(_0x56a90b){return{'model':db[_0x56a90b['model']],'as':_0x56a90b['as'],'attributes':_0x56a90b['attributes']};}):[]};}):[]};}):[]:[]})[_0x76e8('0x10')](function(_0x2211ab){logger[_0x76e8('0x1e')](_0x76e8('0x11'),_0x2f142e);logger[_0x76e8('0x12')](_0x76e8('0x11'),_0x2f142e,JSON[_0x76e8('0x13')](_0x2211ab));_0xf0acf3(_0x2211ab);})[_0x76e8('0x14')](function(_0x5dc04f){logger['error'](_0x76e8('0x11'),_0x5dc04f['message'],_0x2f142e);_0x231f8c(_0x51f254[_0x76e8('0x15')](0x1f4,_0x5dc04f[_0x76e8('0x16')]));});});});};exports[_0x76e8('0x43')]=function(_0x11895f){var _0x35c7d6=this;return new Promise(function(_0xf849d1,_0x3781f2){return db[_0x76e8('0x23')][_0x76e8('0x44')]({'raw':!![],'where':{'phone':_0x11895f[_0x76e8('0x8')]['where']['phone']},'attributes':['id',_0x76e8('0x45')],'order':[['id',_0x76e8('0x46')]]})['then'](function(_0x5dc23c){logger['info']('getContactByPhone',_0x11895f);logger['debug']('getContactByPhone',_0x11895f,JSON[_0x76e8('0x13')](_0x5dc23c));_0xf849d1(_0x5dc23c);})['catch'](function(_0x168aa7){logger[_0x76e8('0x15')](_0x76e8('0x47'),_0x168aa7['message'],_0x11895f);_0x3781f2(_0x35c7d6[_0x76e8('0x15')](0x1f4,_0x168aa7[_0x76e8('0x16')]));});});};exports['ResetActiveCalls']=function(_0x59a526){var _0x1ee2f6=this;return new Promise(function(_0x5aa323,_0x2de22d){return db[_0x76e8('0x36')][_0x76e8('0x25')](function(_0x24bbd4){var _0x26030a=_0x59a526[_0x76e8('0x8')]&&_0x59a526[_0x76e8('0x8')][_0x76e8('0xa')]?_0x59a526[_0x76e8('0x8')]['where']:{};return db[_0x76e8('0x6')][_0x76e8('0x1d')](_0x59a526['body'],{'where':_0x26030a,'transaction':_0x24bbd4})[_0x76e8('0x10')](function(_0x514cc2){logger[_0x76e8('0x1e')]('ResetActiveCalls',_0x59a526);logger[_0x76e8('0x12')](_0x76e8('0x48'),_0x59a526,JSON[_0x76e8('0x13')](_0x514cc2));_0x5aa323(_0x514cc2);})[_0x76e8('0x14')](function(_0x45a826){logger[_0x76e8('0x15')](_0x76e8('0x48'),_0x45a826[_0x76e8('0x16')],_0x59a526);_0x2de22d(_0x1ee2f6[_0x76e8('0x15')](0x1f4,_0x45a826['message']));});});});};exports[_0x76e8('0x49')]=function(_0x52f588){var _0x54d527=this;var _0x376db2=_0x52f588[_0x76e8('0x1b')][_0x76e8('0xa')]['voiceQueueIds'];var _0x3267c6=_0x52f588[_0x76e8('0x1b')]['where'][_0x76e8('0x4a')];var _0x523a84=_0x52f588[_0x76e8('0x1b')]['where'][_0x76e8('0x4b')];return new Promise(function(_0x2285c5,_0x34db4d){return db[_0x76e8('0x6')][_0x76e8('0x7')]({'where':{'voiceQueueId':{'$in':_0x376db2},'recallme':0x1,'active':0x0,'recallmeNotifiedDate':{'$eq':null},'scheduledat':{'$and':{'$lte':db['sequelize']['literal'](_0x76e8('0x4c')+_0x3267c6+_0x76e8('0x4d')),'$gt':db[_0x76e8('0x36')][_0x76e8('0x4e')](_0x76e8('0x4f'))}},'UserId':{'$in':_0x523a84}},'include':[{'model':db[_0x76e8('0x23')],'as':'Contact'},{'model':db[_0x76e8('0x2a')],'as':_0x76e8('0x2b'),'attributes':['id',_0x76e8('0x2c'),_0x76e8('0x50')]},{'model':db[_0x76e8('0x51')],'as':'List'}]})['then'](function(_0x296fd8){if(_0x296fd8['length']>0x0){return db[_0x76e8('0x36')][_0x76e8('0x25')](function(_0x558886){return db[_0x76e8('0x6')][_0x76e8('0x1d')]({'recallmeNotifiedDate':db['sequelize'][_0x76e8('0x4e')](_0x76e8('0x4f'))},{'where':{'id':{'$in':_[_0x76e8('0xe')](_0x296fd8,'id')}},'transaction':_0x558886})[_0x76e8('0x10')](function(){_0x2285c5(_0x296fd8);})['catch'](function(_0x1c86de){logger[_0x76e8('0x15')](_0x76e8('0x49'),_0x1c86de[_0x76e8('0x16')],_0x52f588);_0x34db4d(_0x54d527['error'](0x1f4,_0x1c86de[_0x76e8('0x16')]));});})[_0x76e8('0x14')](function(_0x576688){logger[_0x76e8('0x15')](_0x76e8('0x49'),_0x576688[_0x76e8('0x16')],_0x52f588);_0x34db4d(_0x54d527[_0x76e8('0x15')](0x1f4,_0x576688[_0x76e8('0x16')]));});}else{_0x2285c5(_0x296fd8);}});});}; \ No newline at end of file diff --git a/server/api/cmHopper/index.js b/server/api/cmHopper/index.js index acf6ac3..45de847 100644 --- a/server/api/cmHopper/index.js +++ b/server/api/cmHopper/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x6e3e=['index','get','/describe','describe','getOpenContacts','/timezones','getTimezones','/:id','show','/:id/previewrecall','getPreviewRecall','post','create','/preview','getPreview','/timezone','update','delete','exports','express','Router','../../components/auth/service','./cmHopper.controller','isAuthenticated'];(function(_0x3a5e83,_0x598916){var _0x3a3297=function(_0x558bb1){while(--_0x558bb1){_0x3a5e83['push'](_0x3a5e83['shift']());}};_0x3a3297(++_0x598916);}(_0x6e3e,0x103));var _0xe6e3=function(_0x2c61fd,_0x3f538c){_0x2c61fd=_0x2c61fd-0x0;var _0x1f82bc=_0x6e3e[_0x2c61fd];return _0x1f82bc;};'use strict';var express=require(_0xe6e3('0x0'));var router=express[_0xe6e3('0x1')]();var auth=require(_0xe6e3('0x2'));var controller=require(_0xe6e3('0x3'));router['get']('/',auth[_0xe6e3('0x4')](),controller[_0xe6e3('0x5')]);router[_0xe6e3('0x6')](_0xe6e3('0x7'),auth[_0xe6e3('0x4')](),controller[_0xe6e3('0x8')]);router[_0xe6e3('0x6')]('/opencontacts',auth['isAuthenticated'](),controller[_0xe6e3('0x9')]);router[_0xe6e3('0x6')](_0xe6e3('0xa'),auth[_0xe6e3('0x4')](),controller[_0xe6e3('0xb')]);router[_0xe6e3('0x6')](_0xe6e3('0xc'),auth['isAuthenticated'](),controller[_0xe6e3('0xd')]);router[_0xe6e3('0x6')](_0xe6e3('0xe'),auth[_0xe6e3('0x4')](),controller[_0xe6e3('0xf')]);router[_0xe6e3('0x10')]('/',auth['isAuthenticated'](),controller[_0xe6e3('0x11')]);router[_0xe6e3('0x10')](_0xe6e3('0x12'),auth[_0xe6e3('0x4')](),controller[_0xe6e3('0x13')]);router[_0xe6e3('0x10')](_0xe6e3('0x14'),auth[_0xe6e3('0x4')](),controller['getTimezone']);router['put'](_0xe6e3('0xc'),auth['isAuthenticated'](),controller[_0xe6e3('0x15')]);router[_0xe6e3('0x16')](_0xe6e3('0xc'),auth[_0xe6e3('0x4')](),controller['destroy']);module[_0xe6e3('0x17')]=router; \ No newline at end of file +var _0xa4fc=['../../components/auth/service','isAuthenticated','index','get','/describe','/opencontacts','getOpenContacts','/timezones','getTimezones','/:id','show','/:id/previewrecall','getPreviewRecall','post','create','/preview','getTimezone','update','delete','exports','express','Router'];(function(_0x1a7cb4,_0x4a77db){var _0x19ee49=function(_0x59f99c){while(--_0x59f99c){_0x1a7cb4['push'](_0x1a7cb4['shift']());}};_0x19ee49(++_0x4a77db);}(_0xa4fc,0x1e2));var _0xca4f=function(_0x4d9173,_0x2bb95a){_0x4d9173=_0x4d9173-0x0;var _0x268022=_0xa4fc[_0x4d9173];return _0x268022;};'use strict';var express=require(_0xca4f('0x0'));var router=express[_0xca4f('0x1')]();var auth=require(_0xca4f('0x2'));var controller=require('./cmHopper.controller');router['get']('/',auth[_0xca4f('0x3')](),controller[_0xca4f('0x4')]);router[_0xca4f('0x5')](_0xca4f('0x6'),auth[_0xca4f('0x3')](),controller['describe']);router['get'](_0xca4f('0x7'),auth[_0xca4f('0x3')](),controller[_0xca4f('0x8')]);router[_0xca4f('0x5')](_0xca4f('0x9'),auth[_0xca4f('0x3')](),controller[_0xca4f('0xa')]);router[_0xca4f('0x5')](_0xca4f('0xb'),auth[_0xca4f('0x3')](),controller[_0xca4f('0xc')]);router['get'](_0xca4f('0xd'),auth['isAuthenticated'](),controller[_0xca4f('0xe')]);router[_0xca4f('0xf')]('/',auth[_0xca4f('0x3')](),controller[_0xca4f('0x10')]);router[_0xca4f('0xf')](_0xca4f('0x11'),auth['isAuthenticated'](),controller['getPreview']);router[_0xca4f('0xf')]('/timezone',auth[_0xca4f('0x3')](),controller[_0xca4f('0x12')]);router['put'](_0xca4f('0xb'),auth['isAuthenticated'](),controller[_0xca4f('0x13')]);router[_0xca4f('0x14')](_0xca4f('0xb'),auth[_0xca4f('0x3')](),controller['destroy']);module[_0xca4f('0x15')]=router; \ No newline at end of file diff --git a/server/api/cmHopperAdditionalPhone/cmHopperAdditionalPhone.attributes.js b/server/api/cmHopperAdditionalPhone/cmHopperAdditionalPhone.attributes.js index 0ecf18a..94f874a 100644 --- a/server/api/cmHopperAdditionalPhone/cmHopperAdditionalPhone.attributes.js +++ b/server/api/cmHopperAdditionalPhone/cmHopperAdditionalPhone.attributes.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x15d6=['moment','sequelize','exports','STRING','INTEGER','DATE','format','YYYY-MM-DD\x20HH:mm:ss'];(function(_0x13632c,_0x3a0d8e){var _0x3187cd=function(_0x4349d5){while(--_0x4349d5){_0x13632c['push'](_0x13632c['shift']());}};_0x3187cd(++_0x3a0d8e);}(_0x15d6,0x80));var _0x615d=function(_0x20a584,_0xe384a5){_0x20a584=_0x20a584-0x0;var _0x4b41a8=_0x15d6[_0x20a584];return _0x4b41a8;};'use strict';var moment=require(_0x615d('0x0'));var Sequelize=require(_0x615d('0x1'));module[_0x615d('0x2')]={'CmHopperId':{'type':Sequelize['INTEGER']},'phone':{'type':Sequelize[_0x615d('0x3')],'allowNull':![]},'OrderBy':{'type':Sequelize[_0x615d('0x4')],'defaultValue':0x0},'scheduledat':{'type':Sequelize[_0x615d('0x5')],'defaultValue':moment()[_0x615d('0x6')](_0x615d('0x7'))},'countbusyretry':{'type':Sequelize[_0x615d('0x4')],'defaultValue':0x0},'countcongestionretry':{'type':Sequelize[_0x615d('0x4')],'defaultValue':0x0},'countnoanswerretry':{'type':Sequelize[_0x615d('0x4')],'defaultValue':0x0},'countnosuchnumberretry':{'type':Sequelize['INTEGER'],'defaultValue':0x0},'countdropretry':{'type':Sequelize[_0x615d('0x4')],'defaultValue':0x0},'countabandonedretry':{'type':Sequelize[_0x615d('0x4')],'defaultValue':0x0},'countmachineretry':{'type':Sequelize[_0x615d('0x4')],'defaultValue':0x0},'countagentrejectretry':{'type':Sequelize[_0x615d('0x4')],'defaultValue':0x0}}; \ No newline at end of file +var _0x9c07=['format','YYYY-MM-DD\x20HH:mm:ss','moment','sequelize','INTEGER','DATE'];(function(_0x2ddf70,_0x8049d3){var _0xe3a8e=function(_0xc7b60e){while(--_0xc7b60e){_0x2ddf70['push'](_0x2ddf70['shift']());}};_0xe3a8e(++_0x8049d3);}(_0x9c07,0xb0));var _0x79c0=function(_0x5c798b,_0x542a44){_0x5c798b=_0x5c798b-0x0;var _0x4f1a64=_0x9c07[_0x5c798b];return _0x4f1a64;};'use strict';var moment=require(_0x79c0('0x0'));var Sequelize=require(_0x79c0('0x1'));module['exports']={'CmHopperId':{'type':Sequelize[_0x79c0('0x2')]},'phone':{'type':Sequelize['STRING'],'allowNull':![]},'OrderBy':{'type':Sequelize[_0x79c0('0x2')],'defaultValue':0x0},'scheduledat':{'type':Sequelize[_0x79c0('0x3')],'defaultValue':moment()[_0x79c0('0x4')](_0x79c0('0x5'))},'countbusyretry':{'type':Sequelize[_0x79c0('0x2')],'defaultValue':0x0},'countcongestionretry':{'type':Sequelize[_0x79c0('0x2')],'defaultValue':0x0},'countnoanswerretry':{'type':Sequelize['INTEGER'],'defaultValue':0x0},'countnosuchnumberretry':{'type':Sequelize[_0x79c0('0x2')],'defaultValue':0x0},'countdropretry':{'type':Sequelize[_0x79c0('0x2')],'defaultValue':0x0},'countabandonedretry':{'type':Sequelize['INTEGER'],'defaultValue':0x0},'countmachineretry':{'type':Sequelize[_0x79c0('0x2')],'defaultValue':0x0},'countagentrejectretry':{'type':Sequelize[_0x79c0('0x2')],'defaultValue':0x0}}; \ No newline at end of file diff --git a/server/api/cmHopperAdditionalPhone/cmHopperAdditionalPhone.controller.js b/server/api/cmHopperAdditionalPhone/cmHopperAdditionalPhone.controller.js index e22a4b7..69c9f21 100644 --- a/server/api/cmHopperAdditionalPhone/cmHopperAdditionalPhone.controller.js +++ b/server/api/cmHopperAdditionalPhone/cmHopperAdditionalPhone.controller.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xf831=['../../components/parsers/advancedSearch','../../config/license/hardware','api','../../config/utils','../../config/environment','../../config/license/util','sendStatus','status','end','offset','count','limit','Content-Range','json','apply','reject','save','update','destroy','then','error','stack','name','index','map','CmHopperAdditionalPhone','rawAttributes','fieldName','key','model','query','keys','intersection','attributes','fields','length','hasOwnProperty','nolimit','order','sort','where','filters','filter','merge','VIRTUAL','includeAll','include','rows','catch','show','options','find','create','body','role','user','get','CmHopperAdditionalPhones','userProfileId','autoAssociation','UserProfileResource','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','params','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','path','to-csv','ejs','fs-extra','squel','jsforce','desk.js','querystring','ioredis','../../components/parsers/qs'];(function(_0x1b828b,_0x344400){var _0x98da1a=function(_0x1a0f5b){while(--_0x1a0f5b){_0x1b828b['push'](_0x1b828b['shift']());}};_0x98da1a(++_0x344400);}(_0xf831,0x183));var _0x1f83=function(_0x54304f,_0x216245){_0x54304f=_0x54304f-0x0;var _0x1939bc=_0xf831[_0x54304f];return _0x1939bc;};'use strict';var emlformat=require(_0x1f83('0x0'));var rimraf=require(_0x1f83('0x1'));var zipdir=require(_0x1f83('0x2'));var jsonpatch=require(_0x1f83('0x3'));var rp=require(_0x1f83('0x4'));var moment=require(_0x1f83('0x5'));var BPromise=require(_0x1f83('0x6'));var Mustache=require(_0x1f83('0x7'));var util=require('util');var path=require(_0x1f83('0x8'));var sox=require('sox');var csv=require(_0x1f83('0x9'));var ejs=require(_0x1f83('0xa'));var fs=require('fs');var fs_extra=require(_0x1f83('0xb'));var _=require('lodash');var squel=require(_0x1f83('0xc'));var crypto=require('crypto');var jsforce=require(_0x1f83('0xd'));var deskjs=require(_0x1f83('0xe'));var toCsv=require('to-csv');var querystring=require(_0x1f83('0xf'));var Papa=require('papaparse');var Redis=require(_0x1f83('0x10'));var authService=require('../../components/auth/service');var qs=require(_0x1f83('0x11'));var as=require(_0x1f83('0x12'));var hardwareService=require(_0x1f83('0x13'));var logger=require('../../config/logger')(_0x1f83('0x14'));var utils=require(_0x1f83('0x15'));var config=require(_0x1f83('0x16'));var licenseUtil=require(_0x1f83('0x17'));var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0x28719a,_0x5db5b6){_0x5db5b6=_0x5db5b6||0xcc;return function(_0x1e69ff){if(_0x1e69ff){return _0x28719a[_0x1f83('0x18')](_0x5db5b6);}return _0x28719a[_0x1f83('0x19')](_0x5db5b6)[_0x1f83('0x1a')]();};}function respondWithResult(_0x35f354,_0x8cbc70){_0x8cbc70=_0x8cbc70||0xc8;return function(_0x37e12d){if(_0x37e12d){return _0x35f354[_0x1f83('0x19')](_0x8cbc70)['json'](_0x37e12d);}};}function respondWithFilteredResult(_0x2ae250,_0x2ecc06){return function(_0x3371c7){if(_0x3371c7){var _0x41afa3=typeof _0x2ecc06[_0x1f83('0x1b')]==='undefined'&&typeof _0x2ecc06['limit']==='undefined';var _0x5c47fb=_0x3371c7[_0x1f83('0x1c')];var _0x194e7f=_0x41afa3?0x0:_0x2ecc06[_0x1f83('0x1b')];var _0x4f9b1d=_0x41afa3?_0x3371c7[_0x1f83('0x1c')]:_0x2ecc06[_0x1f83('0x1b')]+_0x2ecc06[_0x1f83('0x1d')];var _0x1d3e61;if(_0x4f9b1d>=_0x5c47fb){_0x4f9b1d=_0x5c47fb;_0x1d3e61=0xc8;}else{_0x1d3e61=0xce;}_0x2ae250[_0x1f83('0x19')](_0x1d3e61);return _0x2ae250['set'](_0x1f83('0x1e'),_0x194e7f+'-'+_0x4f9b1d+'/'+_0x5c47fb)[_0x1f83('0x1f')](_0x3371c7);}return null;};}function patchUpdates(_0x2d2e6e){return function(_0x3444df){try{jsonpatch[_0x1f83('0x20')](_0x3444df,_0x2d2e6e,!![]);}catch(_0x1c7eab){return BPromise[_0x1f83('0x21')](_0x1c7eab);}return _0x3444df[_0x1f83('0x22')]();};}function saveUpdates(_0x190647,_0xc6dce2){return function(_0x33c961){if(_0x33c961){return _0x33c961[_0x1f83('0x23')](_0x190647)['then'](function(_0x3eb602){return _0x3eb602;});}return null;};}function removeEntity(_0x28d2b5,_0xd19978){return function(_0xba8e63){if(_0xba8e63){return _0xba8e63[_0x1f83('0x24')]()[_0x1f83('0x25')](function(){var _0x3ac2f0=_0xba8e63['get']({'plain':!![]});var _0x3c94ce='CmHopperAdditionalPhones';return db['UserProfileResource'][_0x1f83('0x24')]({'where':{'type':_0x3c94ce,'resourceId':_0x3ac2f0['id']}})[_0x1f83('0x25')](function(){return _0xba8e63;});})[_0x1f83('0x25')](function(){_0x28d2b5[_0x1f83('0x19')](0xcc)[_0x1f83('0x1a')]();});}};}function handleEntityNotFound(_0x184d37,_0x38f7c8){return function(_0x5ba039){if(!_0x5ba039){_0x184d37['sendStatus'](0x194);}return _0x5ba039;};}function handleError(_0x328581,_0x3acb71){_0x3acb71=_0x3acb71||0x1f4;return function(_0x3986c2){logger[_0x1f83('0x26')](_0x3986c2[_0x1f83('0x27')]);if(_0x3986c2[_0x1f83('0x28')]){delete _0x3986c2['name'];}_0x328581[_0x1f83('0x19')](_0x3acb71)['send'](_0x3986c2);};}exports[_0x1f83('0x29')]=function(_0x4d203e,_0x40fc8c){var _0x1db92a={},_0x263503={},_0x2bce07={'count':0x0,'rows':[]};var _0x11abb4=_[_0x1f83('0x2a')](db[_0x1f83('0x2b')][_0x1f83('0x2c')],function(_0x3af74b){return{'name':_0x3af74b[_0x1f83('0x2d')],'type':_0x3af74b['type'][_0x1f83('0x2e')]};});_0x263503[_0x1f83('0x2f')]=_['map'](_0x11abb4,_0x1f83('0x28'));_0x263503[_0x1f83('0x30')]=_[_0x1f83('0x31')](_0x4d203e[_0x1f83('0x30')]);_0x263503['filters']=_[_0x1f83('0x32')](_0x263503[_0x1f83('0x2f')],_0x263503[_0x1f83('0x30')]);_0x1db92a[_0x1f83('0x33')]=_[_0x1f83('0x32')](_0x263503[_0x1f83('0x2f')],qs['fields'](_0x4d203e[_0x1f83('0x30')][_0x1f83('0x34')]));_0x1db92a['attributes']=_0x1db92a[_0x1f83('0x33')][_0x1f83('0x35')]?_0x1db92a[_0x1f83('0x33')]:_0x263503[_0x1f83('0x2f')];if(!_0x4d203e[_0x1f83('0x30')][_0x1f83('0x36')](_0x1f83('0x37'))){_0x1db92a['limit']=qs['limit'](_0x4d203e[_0x1f83('0x30')]['limit']);_0x1db92a['offset']=qs[_0x1f83('0x1b')](_0x4d203e[_0x1f83('0x30')][_0x1f83('0x1b')]);}_0x1db92a[_0x1f83('0x38')]=qs[_0x1f83('0x39')](_0x4d203e[_0x1f83('0x30')][_0x1f83('0x39')]);_0x1db92a[_0x1f83('0x3a')]=qs[_0x1f83('0x3b')](_['pick'](_0x4d203e[_0x1f83('0x30')],_0x263503[_0x1f83('0x3b')]),_0x11abb4);if(_0x4d203e[_0x1f83('0x30')][_0x1f83('0x3c')]){_0x1db92a['where']=_[_0x1f83('0x3d')](_0x1db92a[_0x1f83('0x3a')],{'$or':_[_0x1f83('0x2a')](_0x11abb4,function(_0x1d28f1){if(_0x1d28f1['type']!==_0x1f83('0x3e')){var _0x4844ff={};_0x4844ff[_0x1d28f1[_0x1f83('0x28')]]={'$like':'%'+_0x4d203e[_0x1f83('0x30')][_0x1f83('0x3c')]+'%'};return _0x4844ff;}})});}_0x1db92a=_[_0x1f83('0x3d')]({},_0x1db92a,_0x4d203e['options']);var _0x28be9d={'where':_0x1db92a[_0x1f83('0x3a')]};return db[_0x1f83('0x2b')]['count'](_0x28be9d)['then'](function(_0x4eaffc){_0x2bce07[_0x1f83('0x1c')]=_0x4eaffc;if(_0x4d203e[_0x1f83('0x30')][_0x1f83('0x3f')]){_0x1db92a[_0x1f83('0x40')]=[{'all':!![]}];}return db[_0x1f83('0x2b')]['findAll'](_0x1db92a);})['then'](function(_0x3cb2e8){_0x2bce07[_0x1f83('0x41')]=_0x3cb2e8;return _0x2bce07;})[_0x1f83('0x25')](respondWithFilteredResult(_0x40fc8c,_0x1db92a))[_0x1f83('0x42')](handleError(_0x40fc8c,null));};exports[_0x1f83('0x43')]=function(_0x3552c3,_0xf8dbb1){var _0x486549={'raw':!![],'where':{'id':_0x3552c3['params']['id']}},_0x203a4e={};_0x203a4e[_0x1f83('0x2f')]=_[_0x1f83('0x31')](db['CmHopperAdditionalPhone'][_0x1f83('0x2c')]);_0x203a4e['query']=_[_0x1f83('0x31')](_0x3552c3[_0x1f83('0x30')]);_0x203a4e[_0x1f83('0x3b')]=_[_0x1f83('0x32')](_0x203a4e[_0x1f83('0x2f')],_0x203a4e[_0x1f83('0x30')]);_0x486549[_0x1f83('0x33')]=_[_0x1f83('0x32')](_0x203a4e['model'],qs[_0x1f83('0x34')](_0x3552c3['query'][_0x1f83('0x34')]));_0x486549[_0x1f83('0x33')]=_0x486549[_0x1f83('0x33')][_0x1f83('0x35')]?_0x486549['attributes']:_0x203a4e[_0x1f83('0x2f')];if(_0x3552c3[_0x1f83('0x30')][_0x1f83('0x3f')]){_0x486549[_0x1f83('0x40')]=[{'all':!![]}];}_0x486549=_['merge']({},_0x486549,_0x3552c3[_0x1f83('0x44')]);return db[_0x1f83('0x2b')][_0x1f83('0x45')](_0x486549)[_0x1f83('0x25')](handleEntityNotFound(_0xf8dbb1,null))[_0x1f83('0x25')](respondWithResult(_0xf8dbb1,null))[_0x1f83('0x42')](handleError(_0xf8dbb1,null));};exports[_0x1f83('0x46')]=function(_0x4a0c9f,_0x39740c){return db[_0x1f83('0x2b')][_0x1f83('0x46')](_0x4a0c9f[_0x1f83('0x47')],{})[_0x1f83('0x25')](function(_0x127c1c){var _0x49688a=_0x4a0c9f['user']['get']({'plain':!![]});if(!_0x49688a)throw new Error('Unable\x20to\x20retrieve\x20the\x20current\x20user');if(_0x49688a[_0x1f83('0x48')]===_0x1f83('0x49')){var _0x98432f=_0x127c1c[_0x1f83('0x4a')]({'plain':!![]});var _0x47ea87=_0x1f83('0x4b');return db['UserProfileSection'][_0x1f83('0x45')]({'where':{'name':_0x47ea87,'userProfileId':_0x49688a[_0x1f83('0x4c')]},'raw':!![]})[_0x1f83('0x25')](function(_0x1acb3d){if(_0x1acb3d&&_0x1acb3d[_0x1f83('0x4d')]===0x0){return db[_0x1f83('0x4e')][_0x1f83('0x46')]({'name':_0x98432f[_0x1f83('0x28')],'resourceId':_0x98432f['id'],'type':_0x1acb3d[_0x1f83('0x28')],'sectionId':_0x1acb3d['id']},{})[_0x1f83('0x25')](function(){return _0x127c1c;});}else{return _0x127c1c;}})[_0x1f83('0x42')](function(_0x102367){logger[_0x1f83('0x26')](_0x1f83('0x4f'),_0x102367);throw _0x102367;});}return _0x127c1c;})[_0x1f83('0x25')](respondWithResult(_0x39740c,0xc9))[_0x1f83('0x42')](handleError(_0x39740c,null));};exports[_0x1f83('0x23')]=function(_0x55700c,_0x3f14c4){if(_0x55700c[_0x1f83('0x47')]['id']){delete _0x55700c[_0x1f83('0x47')]['id'];}return db[_0x1f83('0x2b')][_0x1f83('0x45')]({'where':{'id':_0x55700c[_0x1f83('0x50')]['id']}})[_0x1f83('0x25')](handleEntityNotFound(_0x3f14c4,null))[_0x1f83('0x25')](saveUpdates(_0x55700c[_0x1f83('0x47')],null))[_0x1f83('0x25')](respondWithResult(_0x3f14c4,null))['catch'](handleError(_0x3f14c4,null));};exports[_0x1f83('0x24')]=function(_0x2f1f61,_0x5e562e){return db[_0x1f83('0x2b')][_0x1f83('0x45')]({'where':{'id':_0x2f1f61[_0x1f83('0x50')]['id']}})[_0x1f83('0x25')](handleEntityNotFound(_0x5e562e,null))[_0x1f83('0x25')](removeEntity(_0x5e562e,null))['catch'](handleError(_0x5e562e,null));}; \ No newline at end of file +var _0x3443=['UserProfileResource','error','name','index','rawAttributes','key','model','map','query','filters','intersection','attributes','fields','length','hasOwnProperty','nolimit','order','sort','where','pick','merge','type','VIRTUAL','filter','options','CmHopperAdditionalPhone','includeAll','findAll','rows','catch','show','params','keys','include','create','body','user','role','UserProfileSection','userProfileId','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','find','rimraf','request-promise','moment','bluebird','util','sox','to-csv','ejs','lodash','squel','jsforce','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/utils','../../config/environment','sendStatus','end','status','json','offset','undefined','limit','count','set','apply','reject','save','update','then','destroy','get','CmHopperAdditionalPhones'];(function(_0x4670fd,_0x47d0cf){var _0x50a4e2=function(_0x492041){while(--_0x492041){_0x4670fd['push'](_0x4670fd['shift']());}};_0x50a4e2(++_0x47d0cf);}(_0x3443,0x78));var _0x3344=function(_0x1626ac,_0x517818){_0x1626ac=_0x1626ac-0x0;var _0x3753ef=_0x3443[_0x1626ac];return _0x3753ef;};'use strict';var emlformat=require('eml-format');var rimraf=require(_0x3344('0x0'));var zipdir=require('zip-dir');var jsonpatch=require('fast-json-patch');var rp=require(_0x3344('0x1'));var moment=require(_0x3344('0x2'));var BPromise=require(_0x3344('0x3'));var Mustache=require('mustache');var util=require(_0x3344('0x4'));var path=require('path');var sox=require(_0x3344('0x5'));var csv=require(_0x3344('0x6'));var ejs=require(_0x3344('0x7'));var fs=require('fs');var fs_extra=require('fs-extra');var _=require(_0x3344('0x8'));var squel=require(_0x3344('0x9'));var crypto=require('crypto');var jsforce=require(_0x3344('0xa'));var deskjs=require('desk.js');var toCsv=require('to-csv');var querystring=require(_0x3344('0xb'));var Papa=require(_0x3344('0xc'));var Redis=require(_0x3344('0xd'));var authService=require(_0x3344('0xe'));var qs=require('../../components/parsers/qs');var as=require(_0x3344('0xf'));var hardwareService=require(_0x3344('0x10'));var logger=require('../../config/logger')('api');var utils=require(_0x3344('0x11'));var config=require(_0x3344('0x12'));var licenseUtil=require('../../config/license/util');var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0x4359c7,_0x2965da){_0x2965da=_0x2965da||0xcc;return function(_0x2083ee){if(_0x2083ee){return _0x4359c7[_0x3344('0x13')](_0x2965da);}return _0x4359c7['status'](_0x2965da)[_0x3344('0x14')]();};}function respondWithResult(_0x3059bf,_0x5423a5){_0x5423a5=_0x5423a5||0xc8;return function(_0x2aa0b6){if(_0x2aa0b6){return _0x3059bf[_0x3344('0x15')](_0x5423a5)[_0x3344('0x16')](_0x2aa0b6);}};}function respondWithFilteredResult(_0x3f3f39,_0x5f5666){return function(_0x2b73ef){if(_0x2b73ef){var _0x10d74e=typeof _0x5f5666[_0x3344('0x17')]===_0x3344('0x18')&&typeof _0x5f5666[_0x3344('0x19')]===_0x3344('0x18');var _0x4f79c0=_0x2b73ef[_0x3344('0x1a')];var _0x59172d=_0x10d74e?0x0:_0x5f5666['offset'];var _0x4aa915=_0x10d74e?_0x2b73ef[_0x3344('0x1a')]:_0x5f5666[_0x3344('0x17')]+_0x5f5666['limit'];var _0x2ac521;if(_0x4aa915>=_0x4f79c0){_0x4aa915=_0x4f79c0;_0x2ac521=0xc8;}else{_0x2ac521=0xce;}_0x3f3f39[_0x3344('0x15')](_0x2ac521);return _0x3f3f39[_0x3344('0x1b')]('Content-Range',_0x59172d+'-'+_0x4aa915+'/'+_0x4f79c0)[_0x3344('0x16')](_0x2b73ef);}return null;};}function patchUpdates(_0x3045a2){return function(_0x5aec47){try{jsonpatch[_0x3344('0x1c')](_0x5aec47,_0x3045a2,!![]);}catch(_0x2d30d7){return BPromise[_0x3344('0x1d')](_0x2d30d7);}return _0x5aec47[_0x3344('0x1e')]();};}function saveUpdates(_0x4a8af4,_0x3741fb){return function(_0x178af7){if(_0x178af7){return _0x178af7[_0x3344('0x1f')](_0x4a8af4)[_0x3344('0x20')](function(_0x228675){return _0x228675;});}return null;};}function removeEntity(_0x5231ad,_0x4c18eb){return function(_0x50d819){if(_0x50d819){return _0x50d819[_0x3344('0x21')]()['then'](function(){var _0x397b20=_0x50d819[_0x3344('0x22')]({'plain':!![]});var _0xe80b81=_0x3344('0x23');return db[_0x3344('0x24')]['destroy']({'where':{'type':_0xe80b81,'resourceId':_0x397b20['id']}})[_0x3344('0x20')](function(){return _0x50d819;});})[_0x3344('0x20')](function(){_0x5231ad[_0x3344('0x15')](0xcc)[_0x3344('0x14')]();});}};}function handleEntityNotFound(_0x2676cf,_0x4a689a){return function(_0x19e2c1){if(!_0x19e2c1){_0x2676cf[_0x3344('0x13')](0x194);}return _0x19e2c1;};}function handleError(_0x38e4e3,_0x233d06){_0x233d06=_0x233d06||0x1f4;return function(_0x490971){logger[_0x3344('0x25')](_0x490971['stack']);if(_0x490971[_0x3344('0x26')]){delete _0x490971[_0x3344('0x26')];}_0x38e4e3['status'](_0x233d06)['send'](_0x490971);};}exports[_0x3344('0x27')]=function(_0x2d9555,_0x220b46){var _0x3bfb1d={},_0x2949aa={},_0x16d4a3={'count':0x0,'rows':[]};var _0x109b3d=_['map'](db['CmHopperAdditionalPhone'][_0x3344('0x28')],function(_0x157e5c){return{'name':_0x157e5c['fieldName'],'type':_0x157e5c['type'][_0x3344('0x29')]};});_0x2949aa[_0x3344('0x2a')]=_[_0x3344('0x2b')](_0x109b3d,_0x3344('0x26'));_0x2949aa[_0x3344('0x2c')]=_['keys'](_0x2d9555['query']);_0x2949aa[_0x3344('0x2d')]=_[_0x3344('0x2e')](_0x2949aa[_0x3344('0x2a')],_0x2949aa[_0x3344('0x2c')]);_0x3bfb1d[_0x3344('0x2f')]=_['intersection'](_0x2949aa[_0x3344('0x2a')],qs[_0x3344('0x30')](_0x2d9555[_0x3344('0x2c')]['fields']));_0x3bfb1d[_0x3344('0x2f')]=_0x3bfb1d[_0x3344('0x2f')][_0x3344('0x31')]?_0x3bfb1d[_0x3344('0x2f')]:_0x2949aa['model'];if(!_0x2d9555[_0x3344('0x2c')][_0x3344('0x32')](_0x3344('0x33'))){_0x3bfb1d['limit']=qs[_0x3344('0x19')](_0x2d9555[_0x3344('0x2c')]['limit']);_0x3bfb1d[_0x3344('0x17')]=qs[_0x3344('0x17')](_0x2d9555['query'][_0x3344('0x17')]);}_0x3bfb1d[_0x3344('0x34')]=qs[_0x3344('0x35')](_0x2d9555['query'][_0x3344('0x35')]);_0x3bfb1d[_0x3344('0x36')]=qs[_0x3344('0x2d')](_[_0x3344('0x37')](_0x2d9555[_0x3344('0x2c')],_0x2949aa[_0x3344('0x2d')]),_0x109b3d);if(_0x2d9555[_0x3344('0x2c')]['filter']){_0x3bfb1d[_0x3344('0x36')]=_[_0x3344('0x38')](_0x3bfb1d[_0x3344('0x36')],{'$or':_['map'](_0x109b3d,function(_0x8ceff5){if(_0x8ceff5[_0x3344('0x39')]!==_0x3344('0x3a')){var _0x3371f6={};_0x3371f6[_0x8ceff5[_0x3344('0x26')]]={'$like':'%'+_0x2d9555['query'][_0x3344('0x3b')]+'%'};return _0x3371f6;}})});}_0x3bfb1d=_['merge']({},_0x3bfb1d,_0x2d9555[_0x3344('0x3c')]);var _0x5e2062={'where':_0x3bfb1d[_0x3344('0x36')]};return db[_0x3344('0x3d')][_0x3344('0x1a')](_0x5e2062)[_0x3344('0x20')](function(_0x1b199c){_0x16d4a3[_0x3344('0x1a')]=_0x1b199c;if(_0x2d9555[_0x3344('0x2c')][_0x3344('0x3e')]){_0x3bfb1d['include']=[{'all':!![]}];}return db[_0x3344('0x3d')][_0x3344('0x3f')](_0x3bfb1d);})['then'](function(_0x338843){_0x16d4a3[_0x3344('0x40')]=_0x338843;return _0x16d4a3;})[_0x3344('0x20')](respondWithFilteredResult(_0x220b46,_0x3bfb1d))[_0x3344('0x41')](handleError(_0x220b46,null));};exports[_0x3344('0x42')]=function(_0x438080,_0x18fecc){var _0x63969b={'raw':!![],'where':{'id':_0x438080[_0x3344('0x43')]['id']}},_0x3557ef={};_0x3557ef['model']=_['keys'](db[_0x3344('0x3d')][_0x3344('0x28')]);_0x3557ef[_0x3344('0x2c')]=_[_0x3344('0x44')](_0x438080['query']);_0x3557ef[_0x3344('0x2d')]=_['intersection'](_0x3557ef[_0x3344('0x2a')],_0x3557ef['query']);_0x63969b[_0x3344('0x2f')]=_[_0x3344('0x2e')](_0x3557ef[_0x3344('0x2a')],qs[_0x3344('0x30')](_0x438080[_0x3344('0x2c')][_0x3344('0x30')]));_0x63969b[_0x3344('0x2f')]=_0x63969b[_0x3344('0x2f')]['length']?_0x63969b[_0x3344('0x2f')]:_0x3557ef['model'];if(_0x438080[_0x3344('0x2c')][_0x3344('0x3e')]){_0x63969b[_0x3344('0x45')]=[{'all':!![]}];}_0x63969b=_[_0x3344('0x38')]({},_0x63969b,_0x438080[_0x3344('0x3c')]);return db[_0x3344('0x3d')]['find'](_0x63969b)[_0x3344('0x20')](handleEntityNotFound(_0x18fecc,null))['then'](respondWithResult(_0x18fecc,null))[_0x3344('0x41')](handleError(_0x18fecc,null));};exports[_0x3344('0x46')]=function(_0x492433,_0xfe7f52){return db['CmHopperAdditionalPhone'][_0x3344('0x46')](_0x492433[_0x3344('0x47')],{})['then'](function(_0x4741a1){var _0x743d81=_0x492433[_0x3344('0x48')]['get']({'plain':!![]});if(!_0x743d81)throw new Error('Unable\x20to\x20retrieve\x20the\x20current\x20user');if(_0x743d81[_0x3344('0x49')]===_0x3344('0x48')){var _0x1baf68=_0x4741a1[_0x3344('0x22')]({'plain':!![]});var _0x35317a=_0x3344('0x23');return db[_0x3344('0x4a')]['find']({'where':{'name':_0x35317a,'userProfileId':_0x743d81[_0x3344('0x4b')]},'raw':!![]})[_0x3344('0x20')](function(_0x384131){if(_0x384131&&_0x384131['autoAssociation']===0x0){return db[_0x3344('0x24')]['create']({'name':_0x1baf68[_0x3344('0x26')],'resourceId':_0x1baf68['id'],'type':_0x384131[_0x3344('0x26')],'sectionId':_0x384131['id']},{})[_0x3344('0x20')](function(){return _0x4741a1;});}else{return _0x4741a1;}})[_0x3344('0x41')](function(_0x2c5f02){logger['error'](_0x3344('0x4c'),_0x2c5f02);throw _0x2c5f02;});}return _0x4741a1;})['then'](respondWithResult(_0xfe7f52,0xc9))['catch'](handleError(_0xfe7f52,null));};exports[_0x3344('0x1f')]=function(_0x31a876,_0x42e87e){if(_0x31a876['body']['id']){delete _0x31a876[_0x3344('0x47')]['id'];}return db['CmHopperAdditionalPhone'][_0x3344('0x4d')]({'where':{'id':_0x31a876[_0x3344('0x43')]['id']}})[_0x3344('0x20')](handleEntityNotFound(_0x42e87e,null))['then'](saveUpdates(_0x31a876[_0x3344('0x47')],null))[_0x3344('0x20')](respondWithResult(_0x42e87e,null))['catch'](handleError(_0x42e87e,null));};exports[_0x3344('0x21')]=function(_0xf5cbd4,_0x359a42){return db[_0x3344('0x3d')]['find']({'where':{'id':_0xf5cbd4[_0x3344('0x43')]['id']}})[_0x3344('0x20')](handleEntityNotFound(_0x359a42,null))[_0x3344('0x20')](removeEntity(_0x359a42,null))['catch'](handleError(_0x359a42,null));}; \ No newline at end of file diff --git a/server/api/cmHopperAdditionalPhone/cmHopperAdditionalPhone.model.js b/server/api/cmHopperAdditionalPhone/cmHopperAdditionalPhone.model.js index efd522a..f1fff16 100644 --- a/server/api/cmHopperAdditionalPhone/cmHopperAdditionalPhone.model.js +++ b/server/api/cmHopperAdditionalPhone/cmHopperAdditionalPhone.model.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x0c2b=['cm_hopper_additional_phones','lodash','util','moment','rimraf','./cmHopperAdditionalPhone.attributes','exports','define','CmHopperAdditionalPhone'];(function(_0x19e35c,_0x29cd1e){var _0x3e1fe8=function(_0x17258b){while(--_0x17258b){_0x19e35c['push'](_0x19e35c['shift']());}};_0x3e1fe8(++_0x29cd1e);}(_0x0c2b,0x1de));var _0xb0c2=function(_0x4d8a60,_0x692816){_0x4d8a60=_0x4d8a60-0x0;var _0x5d622b=_0x0c2b[_0x4d8a60];return _0x5d622b;};'use strict';var _=require(_0xb0c2('0x0'));var util=require(_0xb0c2('0x1'));var logger=require('../../config/logger')('api');var moment=require(_0xb0c2('0x2'));var BPromise=require('bluebird');var rp=require('request-promise');var fs=require('fs');var path=require('path');var rimraf=require(_0xb0c2('0x3'));var config=require('../../config/environment');var attributes=require(_0xb0c2('0x4'));module[_0xb0c2('0x5')]=function(_0xf3a37c,_0x468f27){return _0xf3a37c[_0xb0c2('0x6')](_0xb0c2('0x7'),attributes,{'tableName':_0xb0c2('0x8'),'paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file +var _0x29a1=['./cmHopperAdditionalPhone.attributes','exports','CmHopperAdditionalPhone','cm_hopper_additional_phones','lodash','util','../../config/logger','moment','request-promise','path','rimraf','../../config/environment'];(function(_0x3e2241,_0x470fae){var _0x922e5f=function(_0x10f687){while(--_0x10f687){_0x3e2241['push'](_0x3e2241['shift']());}};_0x922e5f(++_0x470fae);}(_0x29a1,0x118));var _0x129a=function(_0x9fcc35,_0xef663a){_0x9fcc35=_0x9fcc35-0x0;var _0x5b42ac=_0x29a1[_0x9fcc35];return _0x5b42ac;};'use strict';var _=require(_0x129a('0x0'));var util=require(_0x129a('0x1'));var logger=require(_0x129a('0x2'))('api');var moment=require(_0x129a('0x3'));var BPromise=require('bluebird');var rp=require(_0x129a('0x4'));var fs=require('fs');var path=require(_0x129a('0x5'));var rimraf=require(_0x129a('0x6'));var config=require(_0x129a('0x7'));var attributes=require(_0x129a('0x8'));module[_0x129a('0x9')]=function(_0x2731ed,_0x1dba91){return _0x2731ed['define'](_0x129a('0xa'),attributes,{'tableName':_0x129a('0xb'),'paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file diff --git a/server/api/cmHopperAdditionalPhone/cmHopperAdditionalPhone.rpc.js b/server/api/cmHopperAdditionalPhone/cmHopperAdditionalPhone.rpc.js index 7c0e30d..2430522 100644 --- a/server/api/cmHopperAdditionalPhone/cmHopperAdditionalPhone.rpc.js +++ b/server/api/cmHopperAdditionalPhone/cmHopperAdditionalPhone.rpc.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x16bd=['SwapAdditionalPhones','ListId','duration','waitTime','isNil','scheduledat','add','minutes','countdropretry','createdAt','updatedAt','sequelize','transaction','update','CmHopper','activateAdditionalPhone','IncrementPreviewCounters','lodash','util','moment','bluebird','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','then','info','request\x20sent','debug','stringify','error','CmHopperAdditionalPhone,\x20%s,\x20%s','message','result','catch','VerifyAdditionalPhones','findOne','body','ContactId','VoiceQueueId','CampaignId','CmHopperAdditionalPhone','OrderBy','ASC','countbusyretry','countcongestionretry','countnosuchnumberretry','countagentrejectretry','entity','countnoanswerretry','countabandonedretry','countmachineretry','dialGlobalMaxRetry'];(function(_0x184b76,_0x36ad4e){var _0x2f27d7=function(_0x143198){while(--_0x143198){_0x184b76['push'](_0x184b76['shift']());}};_0x2f27d7(++_0x36ad4e);}(_0x16bd,0x1d9));var _0xd16b=function(_0x725a4c,_0x102507){_0x725a4c=_0x725a4c-0x0;var _0x37b2cc=_0x16bd[_0x725a4c];return _0x37b2cc;};'use strict';var _=require(_0xd16b('0x0'));var util=require(_0xd16b('0x1'));var moment=require(_0xd16b('0x2'));var BPromise=require(_0xd16b('0x3'));var rs=require('randomstring');var fs=require('fs');var Redis=require('ioredis');var db=require(_0xd16b('0x4'))['db'];var utils=require(_0xd16b('0x5'));var logger=require(_0xd16b('0x6'))(_0xd16b('0x7'));var config=require(_0xd16b('0x8'));var jayson=require(_0xd16b('0x9'));var client=jayson[_0xd16b('0xa')][_0xd16b('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x26f935,_0x4396b6,_0x597a2f){return new BPromise(function(_0x59cdb9,_0x290717){return client['request'](_0x26f935,_0x597a2f)[_0xd16b('0xc')](function(_0x45011c){logger[_0xd16b('0xd')]('CmHopperAdditionalPhone,\x20%s,\x20%s',_0x4396b6,_0xd16b('0xe'));logger[_0xd16b('0xf')]('CmHopperAdditionalPhone,\x20%s,\x20%s,\x20%s',_0x4396b6,_0xd16b('0xe'),JSON[_0xd16b('0x10')](_0x45011c));if(_0x45011c[_0xd16b('0x11')]){if(_0x45011c[_0xd16b('0x11')]['code']===0x1f4){logger['error'](_0xd16b('0x12'),_0x4396b6,_0x45011c[_0xd16b('0x11')][_0xd16b('0x13')]);return _0x290717(_0x45011c[_0xd16b('0x11')]['message']);}logger[_0xd16b('0x11')]('CmHopperAdditionalPhone,\x20%s,\x20%s',_0x4396b6,_0x45011c[_0xd16b('0x11')]['message']);return _0x59cdb9(_0x45011c[_0xd16b('0x11')][_0xd16b('0x13')]);}else{logger[_0xd16b('0xd')](_0xd16b('0x12'),_0x4396b6,_0xd16b('0xe'));_0x59cdb9(_0x45011c[_0xd16b('0x14')][_0xd16b('0x13')]);}})[_0xd16b('0x15')](function(_0x433b34){logger[_0xd16b('0x11')]('CmHopperAdditionalPhone,\x20%s,\x20%s',_0x4396b6,_0x433b34);_0x290717(_0x433b34);});});}exports[_0xd16b('0x16')]=function(_0x4d6ec6){var _0x5ea717=this;return new Promise(function(_0x2fe7b1,_0x307f83){return db['CmHopper'][_0xd16b('0x17')]({'raw':!![],'where':{'ContactId':_0x4d6ec6[_0xd16b('0x18')][_0xd16b('0x19')],'ListId':_0x4d6ec6[_0xd16b('0x18')]['ListId'],'VoiceQueueId':_0x4d6ec6['body'][_0xd16b('0x1a')]===undefined?null:_0x4d6ec6[_0xd16b('0x18')][_0xd16b('0x1a')],'CampaignId':_0x4d6ec6[_0xd16b('0x18')]['CampaignId']===undefined?null:_0x4d6ec6[_0xd16b('0x18')][_0xd16b('0x1b')]}})['then'](function(_0x39736c){if(_0x39736c!=null){return db[_0xd16b('0x1c')]['findOne']({'raw':!![],'where':{'CmHopperId':_0x39736c['id'],'OrderBy':{'$gt':_0x39736c[_0xd16b('0x1d')]}},'order':[[_0xd16b('0x1d'),_0xd16b('0x1e')]]})[_0xd16b('0xc')](function(_0x28452){var _0x114c50=0x0;if(_0x28452){if(_0x28452[_0xd16b('0x1f')]+_0x28452[_0xd16b('0x20')]+_0x28452['countnoanswerretry']+_0x28452[_0xd16b('0x21')]+_0x28452['countdropretry']+_0x28452['countabandonedretry']+_0x28452['countmachineretry']+_0x28452[_0xd16b('0x22')]<_0x4d6ec6[_0xd16b('0x23')]['dialGlobalMaxRetry'])_0x114c50=0x1;_0x2fe7b1({'additional':_0x114c50});}else{return db['CmHopperAdditionalPhone'][_0xd16b('0x17')]({'raw':!![],'where':{'CmHopperId':_0x39736c['id']},'order':[[_0xd16b('0x1d'),_0xd16b('0x1e')]]})[_0xd16b('0xc')](function(_0x19f7da){var _0x5121e3=0x0;if(_0x19f7da){if(_0x19f7da[_0xd16b('0x1f')]+_0x19f7da['countcongestionretry']+_0x19f7da[_0xd16b('0x24')]+_0x19f7da[_0xd16b('0x21')]+_0x19f7da['countdropretry']+_0x19f7da[_0xd16b('0x25')]+_0x19f7da[_0xd16b('0x26')]+_0x19f7da[_0xd16b('0x22')]<_0x4d6ec6[_0xd16b('0x23')][_0xd16b('0x27')])_0x5121e3=0x1;_0x2fe7b1({'additional':_0x5121e3});}else{_0x2fe7b1({'additional':0x0});}})[_0xd16b('0x15')](function(_0x3adeba){logger['error']('VerifyAdditionalPhones',_0x3adeba[_0xd16b('0x13')]);_0x307f83(_0x5ea717[_0xd16b('0x11')](0x1f4,_0x3adeba[_0xd16b('0x13')]));});}})[_0xd16b('0x15')](function(_0xbe044d){logger[_0xd16b('0x11')](_0xd16b('0x16'),_0xbe044d[_0xd16b('0x13')]);_0x307f83(_0x5ea717[_0xd16b('0x11')](0x1f4,_0xbe044d['message']));});}else _0x2fe7b1({'additional':0x0});});});};exports[_0xd16b('0x28')]=function(_0x38595b){var _0x1ccb2e=this;return new Promise(function(_0x288354,_0x308b90){return db['CmHopper'][_0xd16b('0x17')]({'raw':!![],'where':{'ContactId':_0x38595b[_0xd16b('0x18')]['ContactId'],'ListId':_0x38595b[_0xd16b('0x18')][_0xd16b('0x29')],'VoiceQueueId':_0x38595b['body'][_0xd16b('0x1a')]===undefined?null:_0x38595b[_0xd16b('0x18')]['VoiceQueueId'],'CampaignId':_0x38595b['body'][_0xd16b('0x1b')]===undefined?null:_0x38595b[_0xd16b('0x18')][_0xd16b('0x1b')]}})[_0xd16b('0xc')](function(_0x5de5e4){if(_0x5de5e4!=null){return db['CmHopperAdditionalPhone'][_0xd16b('0x17')]({'raw':!![],'where':{'CmHopperId':_0x5de5e4['id'],'OrderBy':{'$gte':_0x5de5e4['OrderBy']}},'order':[[_0xd16b('0x1d'),_0xd16b('0x1e')]]})[_0xd16b('0xc')](function(_0x1d1d36){if(_0x1d1d36)return activateAdditionalPhone(_0x5de5e4,_0x38595b[_0xd16b('0x18')],_0x1d1d36,_0x38595b[_0xd16b('0x2a')],_0x38595b['waitTime'])[_0xd16b('0xc')](function(_0x15366f){_0x288354(_0x15366f);});else{return db[_0xd16b('0x1c')]['findOne']({'raw':!![],'where':{'CmHopperId':_0x5de5e4['id']},'order':[['OrderBy',_0xd16b('0x1e')]]})[_0xd16b('0xc')](function(_0x2e809c){if(_0x2e809c)return activateAdditionalPhone(_0x5de5e4,_0x38595b[_0xd16b('0x18')],_0x2e809c,_0x38595b[_0xd16b('0x2a')],_0x38595b[_0xd16b('0x2b')])['then'](function(_0x326f22){_0x288354(_0x326f22);});else{_0x288354({'id':_0x5de5e4['id'],'phone':''});}})[_0xd16b('0x15')](function(_0x45195b){logger[_0xd16b('0x11')]('VerifyAdditionalPhones',_0x45195b[_0xd16b('0x13')]);_0x308b90(_0x1ccb2e[_0xd16b('0x11')](0x1f4,_0x45195b[_0xd16b('0x13')]));});}})[_0xd16b('0x15')](function(_0x57f099){logger[_0xd16b('0x11')](_0xd16b('0x16'),_0x57f099[_0xd16b('0x13')]);_0x308b90(_0x1ccb2e[_0xd16b('0x11')](0x1f4,_0x57f099[_0xd16b('0x13')]));});}else _0x288354(0x1);});});};function activateAdditionalPhone(_0x1001ba,_0x41f0f,_0x55a443,_0x8d73e3,_0x47b629){return new Promise(function(_0x3ae451,_0x390480){var _0x518dfc;if(_[_0xd16b('0x2c')](_0x55a443[_0xd16b('0x2d')])){_0x55a443[_0xd16b('0x2d')]=moment();}if(moment()>moment(_0x55a443['scheduledat'])){_0x518dfc=moment()[_0xd16b('0x2e')](_0x47b629||0x3,_0xd16b('0x2f'));}else{if(_0x55a443[_0xd16b('0x1d')]==0x0){_0x518dfc=moment(_0x55a443[_0xd16b('0x2d')]);}else{_0x518dfc=moment()[_0xd16b('0x2e')](_0x47b629||0x3,_0xd16b('0x2f'));}}if(_['isNil'](_0x518dfc)){_0x518dfc=moment()[_0xd16b('0x2e')](_0x47b629||0x3,_0xd16b('0x2f'));}var _0x35f7e9={'phone':_0x1001ba['phone'],'active':0x0,'OrderBy':_[_0xd16b('0x2c')](_0x1001ba[_0xd16b('0x1d')])?0x0:_0x1001ba[_0xd16b('0x1d')],'scheduledat':moment()['add'](_0x8d73e3||0x1,_0xd16b('0x2f')),'countbusyretry':_0x41f0f['countbusyretry'],'countcongestionretry':_0x41f0f[_0xd16b('0x20')],'countnoanswerretry':_0x41f0f[_0xd16b('0x24')],'countnosuchnumberretry':_0x41f0f['countnosuchnumberretry'],'countdropretry':_0x41f0f[_0xd16b('0x30')],'countabandonedretry':_0x41f0f[_0xd16b('0x25')],'countmachineretry':_0x41f0f[_0xd16b('0x26')],'countagentrejectretry':_0x41f0f[_0xd16b('0x22')],'createdAt':_0x41f0f[_0xd16b('0x31')],'updatedAt':_0x41f0f['updatedAt']};var _0x310cb6={'CmHopperId':_0x1001ba['id'],'phone':_0x55a443['phone'],'active':0x0,'OrderBy':_['isNil'](_0x55a443[_0xd16b('0x1d')])?0x0:_0x55a443[_0xd16b('0x1d')],'scheduledat':_0x518dfc,'countbusyretry':_0x55a443[_0xd16b('0x1f')],'countcongestionretry':_0x55a443[_0xd16b('0x20')],'countnoanswerretry':_0x55a443[_0xd16b('0x24')],'countnosuchnumberretry':_0x55a443[_0xd16b('0x21')],'countdropretry':_0x55a443['countdropretry'],'countabandonedretry':_0x55a443[_0xd16b('0x25')],'countmachineretry':_0x55a443[_0xd16b('0x26')],'countagentrejectretry':_0x55a443[_0xd16b('0x22')],'createdAt':_0x55a443['createdAt'],'updatedAt':_0x55a443[_0xd16b('0x32')]};return db[_0xd16b('0x33')][_0xd16b('0x34')](function(_0x2cb43b){return db[_0xd16b('0x1c')][_0xd16b('0x35')](_0x35f7e9,{'where':{'id':_0x55a443['id']}},{'transaction':_0x2cb43b})[_0xd16b('0xc')](function(){return db[_0xd16b('0x36')][_0xd16b('0x35')](_0x310cb6,{'where':{'id':_0x1001ba['id']}},{'transaction':_0x2cb43b});});})[_0xd16b('0xc')](function(_0x212509){_0x3ae451({'id':_0x1001ba['id'],'phone':_0x55a443['phone']});})[_0xd16b('0x15')](function(_0x493c6d){logger[_0xd16b('0x11')](_0xd16b('0x37'),_0x493c6d['message']);_0x390480({'error':_0x493c6d['message']});});});}exports[_0xd16b('0x38')]=function(_0x151bb4){var _0x150b05=this;return new Promise(function(_0x227b82,_0x668009){return db[_0xd16b('0x36')][_0xd16b('0x35')](_0x151bb4[_0xd16b('0x18')]['field'],{'where':{'id':_0x151bb4['body']['id']}})[_0xd16b('0xc')](function(_0x23398a){_0x227b82(_0x23398a);})[_0xd16b('0x15')](function(_0x5a1436){logger[_0xd16b('0x11')](_0xd16b('0x38'),_0x5a1436['message']);_0x668009(_0x150b05[_0xd16b('0x11')](0x1f4,_0x5a1436[_0xd16b('0x13')]));});});}; \ No newline at end of file +var _0x91b6=['isNil','scheduledat','add','minutes','createdAt','updatedAt','sequelize','phone','activateAdditionalPhone','update','field','IncrementPreviewCounters','lodash','util','bluebird','../../mysqldb','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','request','then','info','CmHopperAdditionalPhone,\x20%s,\x20%s','request\x20sent','debug','CmHopperAdditionalPhone,\x20%s,\x20%s,\x20%s','error','message','result','catch','CmHopper','findOne','body','ContactId','ListId','VoiceQueueId','CampaignId','CmHopperAdditionalPhone','OrderBy','countcongestionretry','countnoanswerretry','countnosuchnumberretry','countdropretry','countabandonedretry','countmachineretry','ASC','countbusyretry','countagentrejectretry','entity','dialGlobalMaxRetry','VerifyAdditionalPhones','SwapAdditionalPhones','duration','waitTime'];(function(_0x108d5f,_0x33f82d){var _0x456ea3=function(_0x228200){while(--_0x228200){_0x108d5f['push'](_0x108d5f['shift']());}};_0x456ea3(++_0x33f82d);}(_0x91b6,0x1d4));var _0x691b=function(_0x5894ab,_0x18c6fd){_0x5894ab=_0x5894ab-0x0;var _0x1af2f8=_0x91b6[_0x5894ab];return _0x1af2f8;};'use strict';var _=require(_0x691b('0x0'));var util=require(_0x691b('0x1'));var moment=require('moment');var BPromise=require(_0x691b('0x2'));var rs=require('randomstring');var fs=require('fs');var Redis=require('ioredis');var db=require(_0x691b('0x3'))['db'];var utils=require('../../config/utils');var logger=require(_0x691b('0x4'))(_0x691b('0x5'));var config=require(_0x691b('0x6'));var jayson=require(_0x691b('0x7'));var client=jayson[_0x691b('0x8')][_0x691b('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x385f2a,_0x2d6b8f,_0x42c2ae){return new BPromise(function(_0x16073e,_0x342bca){return client[_0x691b('0xa')](_0x385f2a,_0x42c2ae)[_0x691b('0xb')](function(_0x1e4873){logger[_0x691b('0xc')](_0x691b('0xd'),_0x2d6b8f,_0x691b('0xe'));logger[_0x691b('0xf')](_0x691b('0x10'),_0x2d6b8f,'request\x20sent',JSON['stringify'](_0x1e4873));if(_0x1e4873[_0x691b('0x11')]){if(_0x1e4873[_0x691b('0x11')]['code']===0x1f4){logger[_0x691b('0x11')](_0x691b('0xd'),_0x2d6b8f,_0x1e4873[_0x691b('0x11')]['message']);return _0x342bca(_0x1e4873[_0x691b('0x11')][_0x691b('0x12')]);}logger[_0x691b('0x11')](_0x691b('0xd'),_0x2d6b8f,_0x1e4873[_0x691b('0x11')][_0x691b('0x12')]);return _0x16073e(_0x1e4873[_0x691b('0x11')][_0x691b('0x12')]);}else{logger[_0x691b('0xc')](_0x691b('0xd'),_0x2d6b8f,_0x691b('0xe'));_0x16073e(_0x1e4873[_0x691b('0x13')][_0x691b('0x12')]);}})[_0x691b('0x14')](function(_0x1e79e6){logger[_0x691b('0x11')](_0x691b('0xd'),_0x2d6b8f,_0x1e79e6);_0x342bca(_0x1e79e6);});});}exports['VerifyAdditionalPhones']=function(_0x2caba7){var _0x219c59=this;return new Promise(function(_0x238a47,_0x5e5dc6){return db[_0x691b('0x15')][_0x691b('0x16')]({'raw':!![],'where':{'ContactId':_0x2caba7[_0x691b('0x17')][_0x691b('0x18')],'ListId':_0x2caba7[_0x691b('0x17')][_0x691b('0x19')],'VoiceQueueId':_0x2caba7['body'][_0x691b('0x1a')]===undefined?null:_0x2caba7['body'][_0x691b('0x1a')],'CampaignId':_0x2caba7[_0x691b('0x17')][_0x691b('0x1b')]===undefined?null:_0x2caba7[_0x691b('0x17')][_0x691b('0x1b')]}})[_0x691b('0xb')](function(_0x281d52){if(_0x281d52!=null){return db[_0x691b('0x1c')][_0x691b('0x16')]({'raw':!![],'where':{'CmHopperId':_0x281d52['id'],'OrderBy':{'$gt':_0x281d52[_0x691b('0x1d')]}},'order':[['OrderBy','ASC']]})[_0x691b('0xb')](function(_0x297d97){var _0x32b4a6=0x0;if(_0x297d97){if(_0x297d97['countbusyretry']+_0x297d97[_0x691b('0x1e')]+_0x297d97[_0x691b('0x1f')]+_0x297d97[_0x691b('0x20')]+_0x297d97[_0x691b('0x21')]+_0x297d97[_0x691b('0x22')]+_0x297d97[_0x691b('0x23')]+_0x297d97['countagentrejectretry']<_0x2caba7['entity']['dialGlobalMaxRetry'])_0x32b4a6=0x1;_0x238a47({'additional':_0x32b4a6});}else{return db[_0x691b('0x1c')][_0x691b('0x16')]({'raw':!![],'where':{'CmHopperId':_0x281d52['id']},'order':[[_0x691b('0x1d'),_0x691b('0x24')]]})[_0x691b('0xb')](function(_0x598fa7){var _0x33aae7=0x0;if(_0x598fa7){if(_0x598fa7[_0x691b('0x25')]+_0x598fa7[_0x691b('0x1e')]+_0x598fa7[_0x691b('0x1f')]+_0x598fa7[_0x691b('0x20')]+_0x598fa7[_0x691b('0x21')]+_0x598fa7[_0x691b('0x22')]+_0x598fa7[_0x691b('0x23')]+_0x598fa7[_0x691b('0x26')]<_0x2caba7[_0x691b('0x27')][_0x691b('0x28')])_0x33aae7=0x1;_0x238a47({'additional':_0x33aae7});}else{_0x238a47({'additional':0x0});}})[_0x691b('0x14')](function(_0x536e94){logger[_0x691b('0x11')](_0x691b('0x29'),_0x536e94[_0x691b('0x12')]);_0x5e5dc6(_0x219c59[_0x691b('0x11')](0x1f4,_0x536e94[_0x691b('0x12')]));});}})[_0x691b('0x14')](function(_0x4ebce7){logger[_0x691b('0x11')](_0x691b('0x29'),_0x4ebce7['message']);_0x5e5dc6(_0x219c59[_0x691b('0x11')](0x1f4,_0x4ebce7['message']));});}else _0x238a47({'additional':0x0});});});};exports[_0x691b('0x2a')]=function(_0x3c08d0){var _0x12a035=this;return new Promise(function(_0x249eaa,_0x2eef39){return db[_0x691b('0x15')]['findOne']({'raw':!![],'where':{'ContactId':_0x3c08d0[_0x691b('0x17')][_0x691b('0x18')],'ListId':_0x3c08d0[_0x691b('0x17')][_0x691b('0x19')],'VoiceQueueId':_0x3c08d0['body'][_0x691b('0x1a')]===undefined?null:_0x3c08d0['body'][_0x691b('0x1a')],'CampaignId':_0x3c08d0[_0x691b('0x17')][_0x691b('0x1b')]===undefined?null:_0x3c08d0[_0x691b('0x17')][_0x691b('0x1b')]}})[_0x691b('0xb')](function(_0x2efd26){if(_0x2efd26!=null){return db['CmHopperAdditionalPhone'][_0x691b('0x16')]({'raw':!![],'where':{'CmHopperId':_0x2efd26['id'],'OrderBy':{'$gte':_0x2efd26[_0x691b('0x1d')]}},'order':[['OrderBy',_0x691b('0x24')]]})[_0x691b('0xb')](function(_0x2fd363){if(_0x2fd363)return activateAdditionalPhone(_0x2efd26,_0x3c08d0[_0x691b('0x17')],_0x2fd363,_0x3c08d0[_0x691b('0x2b')],_0x3c08d0[_0x691b('0x2c')])[_0x691b('0xb')](function(_0x31f167){_0x249eaa(_0x31f167);});else{return db[_0x691b('0x1c')][_0x691b('0x16')]({'raw':!![],'where':{'CmHopperId':_0x2efd26['id']},'order':[['OrderBy',_0x691b('0x24')]]})['then'](function(_0x21f714){if(_0x21f714)return activateAdditionalPhone(_0x2efd26,_0x3c08d0[_0x691b('0x17')],_0x21f714,_0x3c08d0[_0x691b('0x2b')],_0x3c08d0[_0x691b('0x2c')])[_0x691b('0xb')](function(_0x4e68cf){_0x249eaa(_0x4e68cf);});else{_0x249eaa({'id':_0x2efd26['id'],'phone':''});}})[_0x691b('0x14')](function(_0x443dc8){logger[_0x691b('0x11')]('VerifyAdditionalPhones',_0x443dc8[_0x691b('0x12')]);_0x2eef39(_0x12a035['error'](0x1f4,_0x443dc8[_0x691b('0x12')]));});}})[_0x691b('0x14')](function(_0x1aa367){logger['error'](_0x691b('0x29'),_0x1aa367[_0x691b('0x12')]);_0x2eef39(_0x12a035[_0x691b('0x11')](0x1f4,_0x1aa367['message']));});}else _0x249eaa(0x1);});});};function activateAdditionalPhone(_0x121dd5,_0x21f445,_0x413f5c,_0x5d06f4,_0x31fb6c){return new Promise(function(_0x14e7ff,_0x400f9c){var _0x432b0f;if(_[_0x691b('0x2d')](_0x413f5c['scheduledat'])){_0x413f5c[_0x691b('0x2e')]=moment();}if(moment()>moment(_0x413f5c[_0x691b('0x2e')])){_0x432b0f=moment()[_0x691b('0x2f')](_0x31fb6c||0x3,'minutes');}else{if(_0x413f5c[_0x691b('0x1d')]==0x0){_0x432b0f=moment(_0x413f5c[_0x691b('0x2e')]);}else{_0x432b0f=moment()[_0x691b('0x2f')](_0x31fb6c||0x3,_0x691b('0x30'));}}if(_[_0x691b('0x2d')](_0x432b0f)){_0x432b0f=moment()[_0x691b('0x2f')](_0x31fb6c||0x3,_0x691b('0x30'));}var _0x5eafa6={'phone':_0x121dd5['phone'],'active':0x0,'OrderBy':_['isNil'](_0x121dd5[_0x691b('0x1d')])?0x0:_0x121dd5[_0x691b('0x1d')],'scheduledat':moment()[_0x691b('0x2f')](_0x5d06f4||0x1,_0x691b('0x30')),'countbusyretry':_0x21f445[_0x691b('0x25')],'countcongestionretry':_0x21f445[_0x691b('0x1e')],'countnoanswerretry':_0x21f445['countnoanswerretry'],'countnosuchnumberretry':_0x21f445['countnosuchnumberretry'],'countdropretry':_0x21f445['countdropretry'],'countabandonedretry':_0x21f445['countabandonedretry'],'countmachineretry':_0x21f445['countmachineretry'],'countagentrejectretry':_0x21f445['countagentrejectretry'],'createdAt':_0x21f445[_0x691b('0x31')],'updatedAt':_0x21f445['updatedAt']};var _0x4e6fa7={'CmHopperId':_0x121dd5['id'],'phone':_0x413f5c['phone'],'active':0x0,'OrderBy':_[_0x691b('0x2d')](_0x413f5c[_0x691b('0x1d')])?0x0:_0x413f5c[_0x691b('0x1d')],'scheduledat':_0x432b0f,'countbusyretry':_0x413f5c[_0x691b('0x25')],'countcongestionretry':_0x413f5c[_0x691b('0x1e')],'countnoanswerretry':_0x413f5c[_0x691b('0x1f')],'countnosuchnumberretry':_0x413f5c[_0x691b('0x20')],'countdropretry':_0x413f5c[_0x691b('0x21')],'countabandonedretry':_0x413f5c[_0x691b('0x22')],'countmachineretry':_0x413f5c[_0x691b('0x23')],'countagentrejectretry':_0x413f5c[_0x691b('0x26')],'createdAt':_0x413f5c[_0x691b('0x31')],'updatedAt':_0x413f5c[_0x691b('0x32')]};return db[_0x691b('0x33')]['transaction'](function(_0x13893a){return db[_0x691b('0x1c')]['update'](_0x5eafa6,{'where':{'id':_0x413f5c['id']}},{'transaction':_0x13893a})[_0x691b('0xb')](function(){return db['CmHopper']['update'](_0x4e6fa7,{'where':{'id':_0x121dd5['id']}},{'transaction':_0x13893a});});})[_0x691b('0xb')](function(_0x515c5b){_0x14e7ff({'id':_0x121dd5['id'],'phone':_0x413f5c[_0x691b('0x34')]});})[_0x691b('0x14')](function(_0x503acd){logger[_0x691b('0x11')](_0x691b('0x35'),_0x503acd[_0x691b('0x12')]);_0x400f9c({'error':_0x503acd[_0x691b('0x12')]});});});}exports['IncrementPreviewCounters']=function(_0x40ca00){var _0x23fa73=this;return new Promise(function(_0xbdd08b,_0x1ebff3){return db[_0x691b('0x15')][_0x691b('0x36')](_0x40ca00[_0x691b('0x17')][_0x691b('0x37')],{'where':{'id':_0x40ca00['body']['id']}})['then'](function(_0x139c7a){_0xbdd08b(_0x139c7a);})[_0x691b('0x14')](function(_0x4a6592){logger[_0x691b('0x11')](_0x691b('0x38'),_0x4a6592['message']);_0x1ebff3(_0x23fa73['error'](0x1f4,_0x4a6592[_0x691b('0x12')]));});});}; \ No newline at end of file diff --git a/server/api/cmHopperAdditionalPhone/index.js b/server/api/cmHopperAdditionalPhone/index.js index fd95d96..c678b0c 100644 --- a/server/api/cmHopperAdditionalPhone/index.js +++ b/server/api/cmHopperAdditionalPhone/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xba4e=['multer','express','fs-extra','../../components/auth/service','../../config/environment','./cmHopperAdditionalPhone.controller','isAuthenticated','index','get','/:id','show','post','put','update','delete','destroy','exports'];(function(_0x377587,_0x529ebd){var _0x21889a=function(_0x258edb){while(--_0x258edb){_0x377587['push'](_0x377587['shift']());}};_0x21889a(++_0x529ebd);}(_0xba4e,0x99));var _0xeba4=function(_0x20593e,_0x2f8bde){_0x20593e=_0x20593e-0x0;var _0x4f8546=_0xba4e[_0x20593e];return _0x4f8546;};'use strict';var multer=require(_0xeba4('0x0'));var util=require('util');var path=require('path');var timeout=require('connect-timeout');var express=require(_0xeba4('0x1'));var router=express['Router']();var fs_extra=require(_0xeba4('0x2'));var auth=require(_0xeba4('0x3'));var interaction=require('../../components/interaction/service');var config=require(_0xeba4('0x4'));var controller=require(_0xeba4('0x5'));router['get']('/',auth[_0xeba4('0x6')](),controller[_0xeba4('0x7')]);router[_0xeba4('0x8')](_0xeba4('0x9'),auth[_0xeba4('0x6')](),controller[_0xeba4('0xa')]);router[_0xeba4('0xb')]('/',auth[_0xeba4('0x6')](),controller['create']);router[_0xeba4('0xc')]('/:id',auth['isAuthenticated'](),controller[_0xeba4('0xd')]);router[_0xeba4('0xe')](_0xeba4('0x9'),auth[_0xeba4('0x6')](),controller[_0xeba4('0xf')]);module[_0xeba4('0x10')]=router; \ No newline at end of file +var _0xf7b4=['express','../../components/auth/service','../../components/interaction/service','../../config/environment','./cmHopperAdditionalPhone.controller','get','isAuthenticated','index','/:id','show','post','put','update','delete','destroy','multer','connect-timeout'];(function(_0x2aea9e,_0x1f587f){var _0x430b92=function(_0x416c37){while(--_0x416c37){_0x2aea9e['push'](_0x2aea9e['shift']());}};_0x430b92(++_0x1f587f);}(_0xf7b4,0x152));var _0x4f7b=function(_0x39f28b,_0x999b31){_0x39f28b=_0x39f28b-0x0;var _0xc91de9=_0xf7b4[_0x39f28b];return _0xc91de9;};'use strict';var multer=require(_0x4f7b('0x0'));var util=require('util');var path=require('path');var timeout=require(_0x4f7b('0x1'));var express=require(_0x4f7b('0x2'));var router=express['Router']();var fs_extra=require('fs-extra');var auth=require(_0x4f7b('0x3'));var interaction=require(_0x4f7b('0x4'));var config=require(_0x4f7b('0x5'));var controller=require(_0x4f7b('0x6'));router[_0x4f7b('0x7')]('/',auth[_0x4f7b('0x8')](),controller[_0x4f7b('0x9')]);router[_0x4f7b('0x7')](_0x4f7b('0xa'),auth[_0x4f7b('0x8')](),controller[_0x4f7b('0xb')]);router[_0x4f7b('0xc')]('/',auth[_0x4f7b('0x8')](),controller['create']);router[_0x4f7b('0xd')](_0x4f7b('0xa'),auth['isAuthenticated'](),controller[_0x4f7b('0xe')]);router[_0x4f7b('0xf')](_0x4f7b('0xa'),auth[_0x4f7b('0x8')](),controller[_0x4f7b('0x10')]);module['exports']=router; \ No newline at end of file diff --git a/server/api/cmHopperBlack/cmHopperBlack.attributes.js b/server/api/cmHopperBlack/cmHopperBlack.attributes.js index 53f7402..e8dbd4b 100644 --- a/server/api/cmHopperBlack/cmHopperBlack.attributes.js +++ b/server/api/cmHopperBlack/cmHopperBlack.attributes.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x251b=['sequelize','exports','STRING','INTEGER','contactListQueue','moment'];(function(_0xfcf691,_0x271a7d){var _0x5c0b3e=function(_0x12456f){while(--_0x12456f){_0xfcf691['push'](_0xfcf691['shift']());}};_0x5c0b3e(++_0x271a7d);}(_0x251b,0x185));var _0xb251=function(_0x367a3d,_0x452717){_0x367a3d=_0x367a3d-0x0;var _0x460539=_0x251b[_0x367a3d];return _0x460539;};'use strict';var moment=require(_0xb251('0x0'));var Sequelize=require(_0xb251('0x1'));module[_0xb251('0x2')]={'phone':{'type':Sequelize[_0xb251('0x3')],'allowNull':![]},'ContactId':{'type':Sequelize[_0xb251('0x4')],'unique':_0xb251('0x5')},'ListId':{'type':Sequelize[_0xb251('0x4')],'unique':_0xb251('0x5')},'VoiceQueueId':{'type':Sequelize[_0xb251('0x4')],'unique':_0xb251('0x5')}}; \ No newline at end of file +var _0x2428=['contactListQueue','sequelize','exports','STRING','INTEGER'];(function(_0xec9e3b,_0x136f2e){var _0x44fe44=function(_0x412cdf){while(--_0x412cdf){_0xec9e3b['push'](_0xec9e3b['shift']());}};_0x44fe44(++_0x136f2e);}(_0x2428,0xd3));var _0x8242=function(_0x5881fe,_0x2b60ff){_0x5881fe=_0x5881fe-0x0;var _0x3404db=_0x2428[_0x5881fe];return _0x3404db;};'use strict';var moment=require('moment');var Sequelize=require(_0x8242('0x0'));module[_0x8242('0x1')]={'phone':{'type':Sequelize[_0x8242('0x2')],'allowNull':![]},'ContactId':{'type':Sequelize[_0x8242('0x3')],'unique':_0x8242('0x4')},'ListId':{'type':Sequelize[_0x8242('0x3')],'unique':_0x8242('0x4')},'VoiceQueueId':{'type':Sequelize[_0x8242('0x3')],'unique':_0x8242('0x4')}}; \ No newline at end of file diff --git a/server/api/cmHopperBlack/cmHopperBlack.controller.js b/server/api/cmHopperBlack/cmHopperBlack.controller.js index c9342e6..b020e32 100644 --- a/server/api/cmHopperBlack/cmHopperBlack.controller.js +++ b/server/api/cmHopperBlack/cmHopperBlack.controller.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x1d7c=['path','sox','to-csv','ejs','fs-extra','lodash','squel','crypto','desk.js','querystring','papaparse','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','sendStatus','status','end','json','undefined','count','offset','limit','set','save','update','then','destroy','error','stack','name','send','map','CmHopperBlack','rawAttributes','fieldName','key','model','query','filters','intersection','fields','attributes','length','hasOwnProperty','nolimit','order','sort','pick','filter','where','merge','type','VIRTUAL','options','includeAll','findAll','rows','show','params','keys','include','find','catch','describe','eml-format','rimraf','fast-json-patch','moment','bluebird','mustache','util'];(function(_0x846d62,_0x3da6d4){var _0x230e2b=function(_0x1373d6){while(--_0x1373d6){_0x846d62['push'](_0x846d62['shift']());}};_0x230e2b(++_0x3da6d4);}(_0x1d7c,0xdd));var _0xc1d7=function(_0x11fb16,_0x29a381){_0x11fb16=_0x11fb16-0x0;var _0x343de1=_0x1d7c[_0x11fb16];return _0x343de1;};'use strict';var emlformat=require(_0xc1d7('0x0'));var rimraf=require(_0xc1d7('0x1'));var zipdir=require('zip-dir');var jsonpatch=require(_0xc1d7('0x2'));var rp=require('request-promise');var moment=require(_0xc1d7('0x3'));var BPromise=require(_0xc1d7('0x4'));var Mustache=require(_0xc1d7('0x5'));var util=require(_0xc1d7('0x6'));var path=require(_0xc1d7('0x7'));var sox=require(_0xc1d7('0x8'));var csv=require(_0xc1d7('0x9'));var ejs=require(_0xc1d7('0xa'));var fs=require('fs');var fs_extra=require(_0xc1d7('0xb'));var _=require(_0xc1d7('0xc'));var squel=require(_0xc1d7('0xd'));var crypto=require(_0xc1d7('0xe'));var jsforce=require('jsforce');var deskjs=require(_0xc1d7('0xf'));var toCsv=require(_0xc1d7('0x9'));var querystring=require(_0xc1d7('0x10'));var Papa=require(_0xc1d7('0x11'));var Redis=require('ioredis');var authService=require('../../components/auth/service');var qs=require('../../components/parsers/qs');var as=require(_0xc1d7('0x12'));var hardwareService=require(_0xc1d7('0x13'));var logger=require(_0xc1d7('0x14'))(_0xc1d7('0x15'));var utils=require(_0xc1d7('0x16'));var config=require(_0xc1d7('0x17'));var licenseUtil=require(_0xc1d7('0x18'));var db=require(_0xc1d7('0x19'))['db'];function respondWithStatusCode(_0xd3324b,_0x108812){_0x108812=_0x108812||0xcc;return function(_0x5402c5){if(_0x5402c5){return _0xd3324b[_0xc1d7('0x1a')](_0x108812);}return _0xd3324b[_0xc1d7('0x1b')](_0x108812)[_0xc1d7('0x1c')]();};}function respondWithResult(_0x4b5a39,_0x216970){_0x216970=_0x216970||0xc8;return function(_0x5240e5){if(_0x5240e5){return _0x4b5a39[_0xc1d7('0x1b')](_0x216970)[_0xc1d7('0x1d')](_0x5240e5);}};}function respondWithFilteredResult(_0x1a0ecf,_0xb9ae8c){return function(_0x3d21d7){if(_0x3d21d7){var _0x58350f=typeof _0xb9ae8c['offset']===_0xc1d7('0x1e')&&typeof _0xb9ae8c['limit']===_0xc1d7('0x1e');var _0x58d096=_0x3d21d7[_0xc1d7('0x1f')];var _0x527b31=_0x58350f?0x0:_0xb9ae8c[_0xc1d7('0x20')];var _0x4adada=_0x58350f?_0x3d21d7[_0xc1d7('0x1f')]:_0xb9ae8c[_0xc1d7('0x20')]+_0xb9ae8c[_0xc1d7('0x21')];var _0x26bfd7;if(_0x4adada>=_0x58d096){_0x4adada=_0x58d096;_0x26bfd7=0xc8;}else{_0x26bfd7=0xce;}_0x1a0ecf[_0xc1d7('0x1b')](_0x26bfd7);return _0x1a0ecf[_0xc1d7('0x22')]('Content-Range',_0x527b31+'-'+_0x4adada+'/'+_0x58d096)['json'](_0x3d21d7);}return null;};}function patchUpdates(_0x8e6b0){return function(_0x4db800){try{jsonpatch['apply'](_0x4db800,_0x8e6b0,!![]);}catch(_0x4fe8a6){return BPromise['reject'](_0x4fe8a6);}return _0x4db800[_0xc1d7('0x23')]();};}function saveUpdates(_0x148eea,_0x2732b6){return function(_0x2a7828){if(_0x2a7828){return _0x2a7828[_0xc1d7('0x24')](_0x148eea)[_0xc1d7('0x25')](function(_0x3cbf55){return _0x3cbf55;});}return null;};}function removeEntity(_0x3a66ac,_0x8db688){return function(_0x1f5b0d){if(_0x1f5b0d){return _0x1f5b0d[_0xc1d7('0x26')]()[_0xc1d7('0x25')](function(){_0x3a66ac[_0xc1d7('0x1b')](0xcc)[_0xc1d7('0x1c')]();});}};}function handleEntityNotFound(_0x2fdd1f,_0x1614a1){return function(_0x1caa52){if(!_0x1caa52){_0x2fdd1f[_0xc1d7('0x1a')](0x194);}return _0x1caa52;};}function handleError(_0x277051,_0x14302f){_0x14302f=_0x14302f||0x1f4;return function(_0x5c0f9d){logger[_0xc1d7('0x27')](_0x5c0f9d[_0xc1d7('0x28')]);if(_0x5c0f9d[_0xc1d7('0x29')]){delete _0x5c0f9d[_0xc1d7('0x29')];}_0x277051[_0xc1d7('0x1b')](_0x14302f)[_0xc1d7('0x2a')](_0x5c0f9d);};}exports['index']=function(_0x382283,_0xfc086e){var _0x4e9307={},_0x41d6ee={},_0x44492e={'count':0x0,'rows':[]};var _0xdb6df7=_[_0xc1d7('0x2b')](db[_0xc1d7('0x2c')][_0xc1d7('0x2d')],function(_0x5bb666){return{'name':_0x5bb666[_0xc1d7('0x2e')],'type':_0x5bb666['type'][_0xc1d7('0x2f')]};});_0x41d6ee[_0xc1d7('0x30')]=_[_0xc1d7('0x2b')](_0xdb6df7,_0xc1d7('0x29'));_0x41d6ee[_0xc1d7('0x31')]=_['keys'](_0x382283[_0xc1d7('0x31')]);_0x41d6ee[_0xc1d7('0x32')]=_[_0xc1d7('0x33')](_0x41d6ee['model'],_0x41d6ee[_0xc1d7('0x31')]);_0x4e9307['attributes']=_[_0xc1d7('0x33')](_0x41d6ee[_0xc1d7('0x30')],qs[_0xc1d7('0x34')](_0x382283[_0xc1d7('0x31')]['fields']));_0x4e9307[_0xc1d7('0x35')]=_0x4e9307[_0xc1d7('0x35')][_0xc1d7('0x36')]?_0x4e9307['attributes']:_0x41d6ee[_0xc1d7('0x30')];if(!_0x382283[_0xc1d7('0x31')][_0xc1d7('0x37')](_0xc1d7('0x38'))){_0x4e9307[_0xc1d7('0x21')]=qs[_0xc1d7('0x21')](_0x382283['query'][_0xc1d7('0x21')]);_0x4e9307['offset']=qs[_0xc1d7('0x20')](_0x382283[_0xc1d7('0x31')][_0xc1d7('0x20')]);}_0x4e9307[_0xc1d7('0x39')]=qs['sort'](_0x382283[_0xc1d7('0x31')][_0xc1d7('0x3a')]);_0x4e9307['where']=qs['filters'](_[_0xc1d7('0x3b')](_0x382283[_0xc1d7('0x31')],_0x41d6ee[_0xc1d7('0x32')]),_0xdb6df7);if(_0x382283[_0xc1d7('0x31')][_0xc1d7('0x3c')]){_0x4e9307[_0xc1d7('0x3d')]=_[_0xc1d7('0x3e')](_0x4e9307[_0xc1d7('0x3d')],{'$or':_[_0xc1d7('0x2b')](_0xdb6df7,function(_0x52c102){if(_0x52c102[_0xc1d7('0x3f')]!==_0xc1d7('0x40')){var _0x4ab0e2={};_0x4ab0e2[_0x52c102['name']]={'$like':'%'+_0x382283['query'][_0xc1d7('0x3c')]+'%'};return _0x4ab0e2;}})});}_0x4e9307=_[_0xc1d7('0x3e')]({},_0x4e9307,_0x382283[_0xc1d7('0x41')]);var _0x1f6016={'where':_0x4e9307[_0xc1d7('0x3d')]};return db[_0xc1d7('0x2c')]['count'](_0x1f6016)[_0xc1d7('0x25')](function(_0x1821f0){_0x44492e['count']=_0x1821f0;if(_0x382283[_0xc1d7('0x31')][_0xc1d7('0x42')]){_0x4e9307['include']=[{'all':!![]}];}return db['CmHopperBlack'][_0xc1d7('0x43')](_0x4e9307);})['then'](function(_0x27a078){_0x44492e[_0xc1d7('0x44')]=_0x27a078;return _0x44492e;})[_0xc1d7('0x25')](respondWithFilteredResult(_0xfc086e,_0x4e9307))['catch'](handleError(_0xfc086e,null));};exports[_0xc1d7('0x45')]=function(_0x1329c3,_0x43c109){var _0x13a75d={'raw':!![],'where':{'id':_0x1329c3[_0xc1d7('0x46')]['id']}},_0x1ce14d={};_0x1ce14d[_0xc1d7('0x30')]=_[_0xc1d7('0x47')](db['CmHopperBlack'][_0xc1d7('0x2d')]);_0x1ce14d['query']=_['keys'](_0x1329c3['query']);_0x1ce14d[_0xc1d7('0x32')]=_['intersection'](_0x1ce14d[_0xc1d7('0x30')],_0x1ce14d['query']);_0x13a75d[_0xc1d7('0x35')]=_[_0xc1d7('0x33')](_0x1ce14d[_0xc1d7('0x30')],qs['fields'](_0x1329c3[_0xc1d7('0x31')]['fields']));_0x13a75d[_0xc1d7('0x35')]=_0x13a75d[_0xc1d7('0x35')][_0xc1d7('0x36')]?_0x13a75d[_0xc1d7('0x35')]:_0x1ce14d['model'];if(_0x1329c3[_0xc1d7('0x31')][_0xc1d7('0x42')]){_0x13a75d[_0xc1d7('0x48')]=[{'all':!![]}];}_0x13a75d=_[_0xc1d7('0x3e')]({},_0x13a75d,_0x1329c3['options']);return db[_0xc1d7('0x2c')][_0xc1d7('0x49')](_0x13a75d)[_0xc1d7('0x25')](handleEntityNotFound(_0x43c109,null))[_0xc1d7('0x25')](respondWithResult(_0x43c109,null))[_0xc1d7('0x4a')](handleError(_0x43c109,null));};exports[_0xc1d7('0x24')]=function(_0x10b952,_0x1d0f80){if(_0x10b952['body']['id']){delete _0x10b952['body']['id'];}return db['CmHopperBlack'][_0xc1d7('0x49')]({'where':{'id':_0x10b952[_0xc1d7('0x46')]['id']}})['then'](handleEntityNotFound(_0x1d0f80,null))['then'](saveUpdates(_0x10b952['body'],null))[_0xc1d7('0x25')](respondWithResult(_0x1d0f80,null))['catch'](handleError(_0x1d0f80,null));};exports[_0xc1d7('0x26')]=function(_0x1ff4f8,_0x2c130f){return db[_0xc1d7('0x2c')][_0xc1d7('0x49')]({'where':{'id':_0x1ff4f8[_0xc1d7('0x46')]['id']}})['then'](handleEntityNotFound(_0x2c130f,null))['then'](removeEntity(_0x2c130f,null))[_0xc1d7('0x4a')](handleError(_0x2c130f,null));};exports['describe']=function(_0x3a23ad,_0x34e012){return db['CmHopperBlack'][_0xc1d7('0x4b')]()['then'](respondWithResult(_0x34e012,null))[_0xc1d7('0x4a')](handleError(_0x34e012,null));}; \ No newline at end of file +var _0x77cb=['end','json','offset','undefined','limit','count','set','Content-Range','apply','reject','save','update','then','destroy','sendStatus','error','stack','name','index','CmHopperBlack','fieldName','map','query','keys','intersection','attributes','model','fields','length','hasOwnProperty','nolimit','sort','where','pick','filters','filter','merge','type','options','includeAll','findAll','rows','catch','params','rawAttributes','include','find','body','describe','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','mustache','util','path','sox','to-csv','ejs','fs-extra','lodash','squel','crypto','jsforce','desk.js','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','api','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','status'];(function(_0x14add3,_0x13ce8d){var _0x4a174f=function(_0x2b3ed7){while(--_0x2b3ed7){_0x14add3['push'](_0x14add3['shift']());}};_0x4a174f(++_0x13ce8d);}(_0x77cb,0x1b2));var _0xb77c=function(_0x194cf8,_0x536123){_0x194cf8=_0x194cf8-0x0;var _0x17444f=_0x77cb[_0x194cf8];return _0x17444f;};'use strict';var emlformat=require(_0xb77c('0x0'));var rimraf=require(_0xb77c('0x1'));var zipdir=require(_0xb77c('0x2'));var jsonpatch=require(_0xb77c('0x3'));var rp=require(_0xb77c('0x4'));var moment=require(_0xb77c('0x5'));var BPromise=require('bluebird');var Mustache=require(_0xb77c('0x6'));var util=require(_0xb77c('0x7'));var path=require(_0xb77c('0x8'));var sox=require(_0xb77c('0x9'));var csv=require(_0xb77c('0xa'));var ejs=require(_0xb77c('0xb'));var fs=require('fs');var fs_extra=require(_0xb77c('0xc'));var _=require(_0xb77c('0xd'));var squel=require(_0xb77c('0xe'));var crypto=require(_0xb77c('0xf'));var jsforce=require(_0xb77c('0x10'));var deskjs=require(_0xb77c('0x11'));var toCsv=require(_0xb77c('0xa'));var querystring=require('querystring');var Papa=require('papaparse');var Redis=require(_0xb77c('0x12'));var authService=require(_0xb77c('0x13'));var qs=require(_0xb77c('0x14'));var as=require(_0xb77c('0x15'));var hardwareService=require('../../config/license/hardware');var logger=require('../../config/logger')(_0xb77c('0x16'));var utils=require(_0xb77c('0x17'));var config=require(_0xb77c('0x18'));var licenseUtil=require(_0xb77c('0x19'));var db=require(_0xb77c('0x1a'))['db'];function respondWithStatusCode(_0x158f8f,_0x1fb619){_0x1fb619=_0x1fb619||0xcc;return function(_0x262f83){if(_0x262f83){return _0x158f8f['sendStatus'](_0x1fb619);}return _0x158f8f[_0xb77c('0x1b')](_0x1fb619)[_0xb77c('0x1c')]();};}function respondWithResult(_0x421362,_0xace3f4){_0xace3f4=_0xace3f4||0xc8;return function(_0x361b82){if(_0x361b82){return _0x421362['status'](_0xace3f4)[_0xb77c('0x1d')](_0x361b82);}};}function respondWithFilteredResult(_0x1bcb21,_0x23b3ac){return function(_0x400ecc){if(_0x400ecc){var _0x16068f=typeof _0x23b3ac[_0xb77c('0x1e')]===_0xb77c('0x1f')&&typeof _0x23b3ac[_0xb77c('0x20')]===_0xb77c('0x1f');var _0x2c180a=_0x400ecc[_0xb77c('0x21')];var _0xd1f0df=_0x16068f?0x0:_0x23b3ac[_0xb77c('0x1e')];var _0x56fcbf=_0x16068f?_0x400ecc[_0xb77c('0x21')]:_0x23b3ac['offset']+_0x23b3ac[_0xb77c('0x20')];var _0x17d11f;if(_0x56fcbf>=_0x2c180a){_0x56fcbf=_0x2c180a;_0x17d11f=0xc8;}else{_0x17d11f=0xce;}_0x1bcb21[_0xb77c('0x1b')](_0x17d11f);return _0x1bcb21[_0xb77c('0x22')](_0xb77c('0x23'),_0xd1f0df+'-'+_0x56fcbf+'/'+_0x2c180a)[_0xb77c('0x1d')](_0x400ecc);}return null;};}function patchUpdates(_0x504638){return function(_0x471969){try{jsonpatch[_0xb77c('0x24')](_0x471969,_0x504638,!![]);}catch(_0x385115){return BPromise[_0xb77c('0x25')](_0x385115);}return _0x471969[_0xb77c('0x26')]();};}function saveUpdates(_0x5e4f96,_0x495c58){return function(_0x22895b){if(_0x22895b){return _0x22895b[_0xb77c('0x27')](_0x5e4f96)[_0xb77c('0x28')](function(_0x91de10){return _0x91de10;});}return null;};}function removeEntity(_0x5c4ece,_0x5dbc93){return function(_0x573c44){if(_0x573c44){return _0x573c44[_0xb77c('0x29')]()[_0xb77c('0x28')](function(){_0x5c4ece[_0xb77c('0x1b')](0xcc)['end']();});}};}function handleEntityNotFound(_0xb405cd,_0x329814){return function(_0x409449){if(!_0x409449){_0xb405cd[_0xb77c('0x2a')](0x194);}return _0x409449;};}function handleError(_0x24ee4a,_0x2b9597){_0x2b9597=_0x2b9597||0x1f4;return function(_0x2e3c29){logger[_0xb77c('0x2b')](_0x2e3c29[_0xb77c('0x2c')]);if(_0x2e3c29[_0xb77c('0x2d')]){delete _0x2e3c29[_0xb77c('0x2d')];}_0x24ee4a['status'](_0x2b9597)['send'](_0x2e3c29);};}exports[_0xb77c('0x2e')]=function(_0x52e221,_0x58689c){var _0x8c2248={},_0xe99bee={},_0x266bd7={'count':0x0,'rows':[]};var _0x3ea5f8=_['map'](db[_0xb77c('0x2f')]['rawAttributes'],function(_0x25512f){return{'name':_0x25512f[_0xb77c('0x30')],'type':_0x25512f['type']['key']};});_0xe99bee['model']=_[_0xb77c('0x31')](_0x3ea5f8,_0xb77c('0x2d'));_0xe99bee[_0xb77c('0x32')]=_[_0xb77c('0x33')](_0x52e221['query']);_0xe99bee['filters']=_[_0xb77c('0x34')](_0xe99bee['model'],_0xe99bee['query']);_0x8c2248[_0xb77c('0x35')]=_[_0xb77c('0x34')](_0xe99bee[_0xb77c('0x36')],qs[_0xb77c('0x37')](_0x52e221[_0xb77c('0x32')][_0xb77c('0x37')]));_0x8c2248['attributes']=_0x8c2248['attributes'][_0xb77c('0x38')]?_0x8c2248['attributes']:_0xe99bee[_0xb77c('0x36')];if(!_0x52e221['query'][_0xb77c('0x39')](_0xb77c('0x3a'))){_0x8c2248['limit']=qs[_0xb77c('0x20')](_0x52e221['query'][_0xb77c('0x20')]);_0x8c2248[_0xb77c('0x1e')]=qs['offset'](_0x52e221[_0xb77c('0x32')][_0xb77c('0x1e')]);}_0x8c2248['order']=qs[_0xb77c('0x3b')](_0x52e221[_0xb77c('0x32')][_0xb77c('0x3b')]);_0x8c2248[_0xb77c('0x3c')]=qs['filters'](_[_0xb77c('0x3d')](_0x52e221[_0xb77c('0x32')],_0xe99bee[_0xb77c('0x3e')]),_0x3ea5f8);if(_0x52e221[_0xb77c('0x32')][_0xb77c('0x3f')]){_0x8c2248['where']=_[_0xb77c('0x40')](_0x8c2248[_0xb77c('0x3c')],{'$or':_['map'](_0x3ea5f8,function(_0x368729){if(_0x368729[_0xb77c('0x41')]!=='VIRTUAL'){var _0x1c0699={};_0x1c0699[_0x368729[_0xb77c('0x2d')]]={'$like':'%'+_0x52e221[_0xb77c('0x32')]['filter']+'%'};return _0x1c0699;}})});}_0x8c2248=_[_0xb77c('0x40')]({},_0x8c2248,_0x52e221[_0xb77c('0x42')]);var _0x12ae09={'where':_0x8c2248[_0xb77c('0x3c')]};return db[_0xb77c('0x2f')][_0xb77c('0x21')](_0x12ae09)[_0xb77c('0x28')](function(_0x30540c){_0x266bd7[_0xb77c('0x21')]=_0x30540c;if(_0x52e221[_0xb77c('0x32')][_0xb77c('0x43')]){_0x8c2248['include']=[{'all':!![]}];}return db[_0xb77c('0x2f')][_0xb77c('0x44')](_0x8c2248);})[_0xb77c('0x28')](function(_0x56d3f1){_0x266bd7[_0xb77c('0x45')]=_0x56d3f1;return _0x266bd7;})[_0xb77c('0x28')](respondWithFilteredResult(_0x58689c,_0x8c2248))[_0xb77c('0x46')](handleError(_0x58689c,null));};exports['show']=function(_0x586d53,_0x332021){var _0x1a5675={'raw':!![],'where':{'id':_0x586d53[_0xb77c('0x47')]['id']}},_0x5d1a40={};_0x5d1a40['model']=_[_0xb77c('0x33')](db[_0xb77c('0x2f')][_0xb77c('0x48')]);_0x5d1a40[_0xb77c('0x32')]=_['keys'](_0x586d53[_0xb77c('0x32')]);_0x5d1a40[_0xb77c('0x3e')]=_[_0xb77c('0x34')](_0x5d1a40[_0xb77c('0x36')],_0x5d1a40[_0xb77c('0x32')]);_0x1a5675['attributes']=_[_0xb77c('0x34')](_0x5d1a40[_0xb77c('0x36')],qs[_0xb77c('0x37')](_0x586d53[_0xb77c('0x32')]['fields']));_0x1a5675['attributes']=_0x1a5675[_0xb77c('0x35')]['length']?_0x1a5675[_0xb77c('0x35')]:_0x5d1a40[_0xb77c('0x36')];if(_0x586d53[_0xb77c('0x32')]['includeAll']){_0x1a5675[_0xb77c('0x49')]=[{'all':!![]}];}_0x1a5675=_['merge']({},_0x1a5675,_0x586d53[_0xb77c('0x42')]);return db[_0xb77c('0x2f')][_0xb77c('0x4a')](_0x1a5675)['then'](handleEntityNotFound(_0x332021,null))[_0xb77c('0x28')](respondWithResult(_0x332021,null))['catch'](handleError(_0x332021,null));};exports[_0xb77c('0x27')]=function(_0x4157e1,_0x3fcc5a){if(_0x4157e1[_0xb77c('0x4b')]['id']){delete _0x4157e1[_0xb77c('0x4b')]['id'];}return db[_0xb77c('0x2f')]['find']({'where':{'id':_0x4157e1[_0xb77c('0x47')]['id']}})['then'](handleEntityNotFound(_0x3fcc5a,null))[_0xb77c('0x28')](saveUpdates(_0x4157e1['body'],null))['then'](respondWithResult(_0x3fcc5a,null))[_0xb77c('0x46')](handleError(_0x3fcc5a,null));};exports[_0xb77c('0x29')]=function(_0x360dd6,_0x43e3fd){return db[_0xb77c('0x2f')][_0xb77c('0x4a')]({'where':{'id':_0x360dd6[_0xb77c('0x47')]['id']}})[_0xb77c('0x28')](handleEntityNotFound(_0x43e3fd,null))[_0xb77c('0x28')](removeEntity(_0x43e3fd,null))[_0xb77c('0x46')](handleError(_0x43e3fd,null));};exports['describe']=function(_0x3d29e0,_0x1cf24a){return db['CmHopperBlack'][_0xb77c('0x4c')]()[_0xb77c('0x28')](respondWithResult(_0x1cf24a,null))['catch'](handleError(_0x1cf24a,null));}; \ No newline at end of file diff --git a/server/api/cmHopperBlack/cmHopperBlack.model.js b/server/api/cmHopperBlack/cmHopperBlack.model.js index 871c481..73fc672 100644 --- a/server/api/cmHopperBlack/cmHopperBlack.model.js +++ b/server/api/cmHopperBlack/cmHopperBlack.model.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x2d33=['bluebird','../../config/environment','exports','define','CmHopperBlack','cm_hopper_black','lodash','util','../../config/logger'];(function(_0xe52a4c,_0x47f108){var _0x28e5d4=function(_0x4bad19){while(--_0x4bad19){_0xe52a4c['push'](_0xe52a4c['shift']());}};_0x28e5d4(++_0x47f108);}(_0x2d33,0xcc));var _0x32d3=function(_0x1e4eed,_0x3fbd7f){_0x1e4eed=_0x1e4eed-0x0;var _0x42e2ff=_0x2d33[_0x1e4eed];return _0x42e2ff;};'use strict';var _=require(_0x32d3('0x0'));var util=require(_0x32d3('0x1'));var logger=require(_0x32d3('0x2'))('api');var moment=require('moment');var BPromise=require(_0x32d3('0x3'));var rp=require('request-promise');var fs=require('fs');var path=require('path');var rimraf=require('rimraf');var config=require(_0x32d3('0x4'));var attributes=require('./cmHopperBlack.attributes');module[_0x32d3('0x5')]=function(_0x377391,_0x19ac67){return _0x377391[_0x32d3('0x6')](_0x32d3('0x7'),attributes,{'tableName':_0x32d3('0x8'),'paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file +var _0xcfd7=['util','../../config/logger','api','moment','bluebird','path','rimraf','../../config/environment','./cmHopperBlack.attributes','exports','define','CmHopperBlack','cm_hopper_black','lodash'];(function(_0x5b5eb4,_0x117c87){var _0x42af53=function(_0xdf6fcb){while(--_0xdf6fcb){_0x5b5eb4['push'](_0x5b5eb4['shift']());}};_0x42af53(++_0x117c87);}(_0xcfd7,0x187));var _0x7cfd=function(_0x321bb2,_0x202794){_0x321bb2=_0x321bb2-0x0;var _0x9c12ed=_0xcfd7[_0x321bb2];return _0x9c12ed;};'use strict';var _=require(_0x7cfd('0x0'));var util=require(_0x7cfd('0x1'));var logger=require(_0x7cfd('0x2'))(_0x7cfd('0x3'));var moment=require(_0x7cfd('0x4'));var BPromise=require(_0x7cfd('0x5'));var rp=require('request-promise');var fs=require('fs');var path=require(_0x7cfd('0x6'));var rimraf=require(_0x7cfd('0x7'));var config=require(_0x7cfd('0x8'));var attributes=require(_0x7cfd('0x9'));module[_0x7cfd('0xa')]=function(_0x5333ad,_0x4be040){return _0x5333ad[_0x7cfd('0xb')](_0x7cfd('0xc'),attributes,{'tableName':_0x7cfd('0xd'),'paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file diff --git a/server/api/cmHopperBlack/cmHopperBlack.rpc.js b/server/api/cmHopperBlack/cmHopperBlack.rpc.js index 9e42afd..1a10b38 100644 --- a/server/api/cmHopperBlack/cmHopperBlack.rpc.js +++ b/server/api/cmHopperBlack/cmHopperBlack.rpc.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x2b48=['../../config/utils','../../config/environment','jayson/promise','client','request','then','info','CmHopperBlack,\x20%s,\x20%s','request\x20sent','debug','CmHopperBlack,\x20%s,\x20%s,\x20%s','stringify','error','message','result','catch','CmHopperBlack','findAll','options','raw','attributes','limit','include','model','GetCmHopperBlack','UpdateCmHopperBlack','body','where','destroy','DestroyCmHopperBlack','util','moment','randomstring','ioredis'];(function(_0x47d804,_0x5cc88f){var _0x284c47=function(_0x271c22){while(--_0x271c22){_0x47d804['push'](_0x47d804['shift']());}};_0x284c47(++_0x5cc88f);}(_0x2b48,0x10c));var _0x82b4=function(_0x27af45,_0x1b57aa){_0x27af45=_0x27af45-0x0;var _0x18df21=_0x2b48[_0x27af45];return _0x18df21;};'use strict';var _=require('lodash');var util=require(_0x82b4('0x0'));var moment=require(_0x82b4('0x1'));var BPromise=require('bluebird');var rs=require(_0x82b4('0x2'));var fs=require('fs');var Redis=require(_0x82b4('0x3'));var db=require('../../mysqldb')['db'];var utils=require(_0x82b4('0x4'));var logger=require('../../config/logger')('rpc');var config=require(_0x82b4('0x5'));var jayson=require(_0x82b4('0x6'));var client=jayson[_0x82b4('0x7')]['http']({'port':0x232a});function respondWithRpcPromise(_0xfaeffc,_0x13f253,_0x37943e){return new BPromise(function(_0x2d768d,_0x552214){return client[_0x82b4('0x8')](_0xfaeffc,_0x37943e)[_0x82b4('0x9')](function(_0x3b0b8f){logger[_0x82b4('0xa')](_0x82b4('0xb'),_0x13f253,_0x82b4('0xc'));logger[_0x82b4('0xd')](_0x82b4('0xe'),_0x13f253,_0x82b4('0xc'),JSON[_0x82b4('0xf')](_0x3b0b8f));if(_0x3b0b8f[_0x82b4('0x10')]){if(_0x3b0b8f['error']['code']===0x1f4){logger[_0x82b4('0x10')]('CmHopperBlack,\x20%s,\x20%s',_0x13f253,_0x3b0b8f[_0x82b4('0x10')][_0x82b4('0x11')]);return _0x552214(_0x3b0b8f[_0x82b4('0x10')][_0x82b4('0x11')]);}logger[_0x82b4('0x10')](_0x82b4('0xb'),_0x13f253,_0x3b0b8f[_0x82b4('0x10')][_0x82b4('0x11')]);return _0x2d768d(_0x3b0b8f[_0x82b4('0x10')][_0x82b4('0x11')]);}else{logger[_0x82b4('0xa')]('CmHopperBlack,\x20%s,\x20%s',_0x13f253,_0x82b4('0xc'));_0x2d768d(_0x3b0b8f[_0x82b4('0x12')][_0x82b4('0x11')]);}})[_0x82b4('0x13')](function(_0xdc473c){logger['error']('CmHopperBlack,\x20%s,\x20%s',_0x13f253,_0xdc473c);_0x552214(_0xdc473c);});});}exports['GetCmHopperBlack']=function(_0x2cfb82){var _0x124f30=this;return new Promise(function(_0x25d703,_0x4bc5ef){return db[_0x82b4('0x14')][_0x82b4('0x15')]({'raw':_0x2cfb82['options']?_0x2cfb82[_0x82b4('0x16')][_0x82b4('0x17')]===undefined?!![]:![]:!![],'where':_0x2cfb82[_0x82b4('0x16')]?_0x2cfb82[_0x82b4('0x16')]['where']||null:null,'attributes':_0x2cfb82['options']?_0x2cfb82[_0x82b4('0x16')][_0x82b4('0x18')]||null:null,'limit':_0x2cfb82[_0x82b4('0x16')]?_0x2cfb82['options'][_0x82b4('0x19')]||null:null,'include':_0x2cfb82[_0x82b4('0x16')]?_0x2cfb82['options']['include']?_['map'](_0x2cfb82[_0x82b4('0x16')][_0x82b4('0x1a')],function(_0x5c5f3c){return{'model':db[_0x5c5f3c[_0x82b4('0x1b')]],'as':_0x5c5f3c['as'],'attributes':_0x5c5f3c['attributes'],'include':_0x5c5f3c['include']?_['map'](_0x5c5f3c['include'],function(_0x1ea2bc){return{'model':db[_0x1ea2bc[_0x82b4('0x1b')]],'as':_0x1ea2bc['as'],'attributes':_0x1ea2bc['attributes'],'include':_0x1ea2bc[_0x82b4('0x1a')]?_['map'](_0x1ea2bc[_0x82b4('0x1a')],function(_0x1424d7){return{'model':db[_0x1424d7[_0x82b4('0x1b')]],'as':_0x1424d7['as'],'attributes':_0x1424d7['attributes']};}):[]};}):[]};}):[]:[]})[_0x82b4('0x9')](function(_0x253baf){logger[_0x82b4('0xa')](_0x82b4('0x1c'),_0x2cfb82);logger[_0x82b4('0xd')](_0x82b4('0x1c'),_0x2cfb82,JSON[_0x82b4('0xf')](_0x253baf));_0x25d703(_0x253baf);})['catch'](function(_0x4b1c6d){logger[_0x82b4('0x10')](_0x82b4('0x1c'),_0x4b1c6d[_0x82b4('0x11')],_0x2cfb82);_0x4bc5ef(_0x124f30['error'](0x1f4,_0x4b1c6d[_0x82b4('0x11')]));});});};exports[_0x82b4('0x1d')]=function(_0x42ff3d){var _0x5f1c6c=this;return new Promise(function(_0xde7820,_0x38f83c){return db['CmHopperBlack']['update'](_0x42ff3d[_0x82b4('0x1e')],{'raw':_0x42ff3d[_0x82b4('0x16')]?_0x42ff3d[_0x82b4('0x16')][_0x82b4('0x17')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x42ff3d[_0x82b4('0x16')]?_0x42ff3d[_0x82b4('0x16')][_0x82b4('0x1f')]||null:null,'attributes':_0x42ff3d['options']?_0x42ff3d[_0x82b4('0x16')]['attributes']||null:null,'limit':_0x42ff3d['options']?_0x42ff3d[_0x82b4('0x16')]['limit']||null:null})[_0x82b4('0x9')](function(_0x4e1f7f){logger['info'](_0x82b4('0x1d'),_0x42ff3d);logger['debug'](_0x82b4('0x1d'),_0x42ff3d,JSON['stringify'](_0x4e1f7f));_0xde7820(_0x4e1f7f);})[_0x82b4('0x13')](function(_0x123370){logger[_0x82b4('0x10')](_0x82b4('0x1d'),_0x123370['message'],_0x42ff3d);_0x38f83c(_0x5f1c6c[_0x82b4('0x10')](0x1f4,_0x123370['message']));});});};exports['DestroyCmHopperBlack']=function(_0xbf53cf){var _0x1d4ce8=this;return new Promise(function(_0x10e5c8,_0x36fbe6){return db[_0x82b4('0x14')][_0x82b4('0x20')]({'where':_0xbf53cf[_0x82b4('0x16')]?_0xbf53cf[_0x82b4('0x16')][_0x82b4('0x1f')]||null:null})[_0x82b4('0x9')](function(_0x255fef){logger[_0x82b4('0xa')](_0x82b4('0x21'),_0xbf53cf);logger[_0x82b4('0xd')](_0x82b4('0x21'),_0xbf53cf,JSON[_0x82b4('0xf')](_0x255fef));_0x10e5c8(_0x255fef);})[_0x82b4('0x13')](function(_0x17a3c6){logger[_0x82b4('0x10')](_0x82b4('0x21'),_0x17a3c6['message'],_0xbf53cf);_0x36fbe6(_0x1d4ce8[_0x82b4('0x10')](0x1f4,_0x17a3c6[_0x82b4('0x11')]));});});}; \ No newline at end of file +var _0xca51=['debug','CmHopperBlack,\x20%s,\x20%s,\x20%s','error','message','result','catch','GetCmHopperBlack','CmHopperBlack','options','attributes','map','include','model','update','body','where','UpdateCmHopperBlack','stringify','DestroyCmHopperBlack','destroy','util','moment','bluebird','ioredis','../../mysqldb','../../config/environment','http','request','then','info','CmHopperBlack,\x20%s,\x20%s','request\x20sent'];(function(_0x25f2a4,_0x178542){var _0x3d4983=function(_0xacba37){while(--_0xacba37){_0x25f2a4['push'](_0x25f2a4['shift']());}};_0x3d4983(++_0x178542);}(_0xca51,0xb4));var _0x1ca5=function(_0x5a58af,_0x2fd0e0){_0x5a58af=_0x5a58af-0x0;var _0x40b593=_0xca51[_0x5a58af];return _0x40b593;};'use strict';var _=require('lodash');var util=require(_0x1ca5('0x0'));var moment=require(_0x1ca5('0x1'));var BPromise=require(_0x1ca5('0x2'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x1ca5('0x3'));var db=require(_0x1ca5('0x4'))['db'];var utils=require('../../config/utils');var logger=require('../../config/logger')('rpc');var config=require(_0x1ca5('0x5'));var jayson=require('jayson/promise');var client=jayson['client'][_0x1ca5('0x6')]({'port':0x232a});function respondWithRpcPromise(_0x121abc,_0x4705f1,_0x21efe5){return new BPromise(function(_0x19eae6,_0x4ba4ff){return client[_0x1ca5('0x7')](_0x121abc,_0x21efe5)[_0x1ca5('0x8')](function(_0x44790a){logger[_0x1ca5('0x9')](_0x1ca5('0xa'),_0x4705f1,_0x1ca5('0xb'));logger[_0x1ca5('0xc')](_0x1ca5('0xd'),_0x4705f1,'request\x20sent',JSON['stringify'](_0x44790a));if(_0x44790a[_0x1ca5('0xe')]){if(_0x44790a[_0x1ca5('0xe')]['code']===0x1f4){logger[_0x1ca5('0xe')](_0x1ca5('0xa'),_0x4705f1,_0x44790a['error'][_0x1ca5('0xf')]);return _0x4ba4ff(_0x44790a[_0x1ca5('0xe')]['message']);}logger['error'](_0x1ca5('0xa'),_0x4705f1,_0x44790a['error'][_0x1ca5('0xf')]);return _0x19eae6(_0x44790a[_0x1ca5('0xe')]['message']);}else{logger[_0x1ca5('0x9')](_0x1ca5('0xa'),_0x4705f1,_0x1ca5('0xb'));_0x19eae6(_0x44790a[_0x1ca5('0x10')][_0x1ca5('0xf')]);}})[_0x1ca5('0x11')](function(_0x573f71){logger[_0x1ca5('0xe')]('CmHopperBlack,\x20%s,\x20%s',_0x4705f1,_0x573f71);_0x4ba4ff(_0x573f71);});});}exports[_0x1ca5('0x12')]=function(_0x36cab1){var _0x5d1459=this;return new Promise(function(_0x254b88,_0x1f6d0d){return db[_0x1ca5('0x13')]['findAll']({'raw':_0x36cab1[_0x1ca5('0x14')]?_0x36cab1[_0x1ca5('0x14')]['raw']===undefined?!![]:![]:!![],'where':_0x36cab1['options']?_0x36cab1[_0x1ca5('0x14')]['where']||null:null,'attributes':_0x36cab1[_0x1ca5('0x14')]?_0x36cab1['options'][_0x1ca5('0x15')]||null:null,'limit':_0x36cab1[_0x1ca5('0x14')]?_0x36cab1[_0x1ca5('0x14')]['limit']||null:null,'include':_0x36cab1[_0x1ca5('0x14')]?_0x36cab1['options']['include']?_[_0x1ca5('0x16')](_0x36cab1[_0x1ca5('0x14')][_0x1ca5('0x17')],function(_0x3c90b9){return{'model':db[_0x3c90b9[_0x1ca5('0x18')]],'as':_0x3c90b9['as'],'attributes':_0x3c90b9['attributes'],'include':_0x3c90b9[_0x1ca5('0x17')]?_[_0x1ca5('0x16')](_0x3c90b9[_0x1ca5('0x17')],function(_0x598781){return{'model':db[_0x598781[_0x1ca5('0x18')]],'as':_0x598781['as'],'attributes':_0x598781[_0x1ca5('0x15')],'include':_0x598781[_0x1ca5('0x17')]?_[_0x1ca5('0x16')](_0x598781['include'],function(_0x15ecb4){return{'model':db[_0x15ecb4[_0x1ca5('0x18')]],'as':_0x15ecb4['as'],'attributes':_0x15ecb4['attributes']};}):[]};}):[]};}):[]:[]})[_0x1ca5('0x8')](function(_0x8ca2b){logger[_0x1ca5('0x9')](_0x1ca5('0x12'),_0x36cab1);logger['debug'](_0x1ca5('0x12'),_0x36cab1,JSON['stringify'](_0x8ca2b));_0x254b88(_0x8ca2b);})[_0x1ca5('0x11')](function(_0x1d56ad){logger[_0x1ca5('0xe')](_0x1ca5('0x12'),_0x1d56ad[_0x1ca5('0xf')],_0x36cab1);_0x1f6d0d(_0x5d1459[_0x1ca5('0xe')](0x1f4,_0x1d56ad[_0x1ca5('0xf')]));});});};exports['UpdateCmHopperBlack']=function(_0x4cae5a){var _0xbcc9d=this;return new Promise(function(_0x2668d4,_0x4ee460){return db[_0x1ca5('0x13')][_0x1ca5('0x19')](_0x4cae5a[_0x1ca5('0x1a')],{'raw':_0x4cae5a['options']?_0x4cae5a[_0x1ca5('0x14')]['raw']===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x4cae5a[_0x1ca5('0x14')]?_0x4cae5a[_0x1ca5('0x14')][_0x1ca5('0x1b')]||null:null,'attributes':_0x4cae5a['options']?_0x4cae5a[_0x1ca5('0x14')][_0x1ca5('0x15')]||null:null,'limit':_0x4cae5a[_0x1ca5('0x14')]?_0x4cae5a[_0x1ca5('0x14')]['limit']||null:null})[_0x1ca5('0x8')](function(_0x3a7489){logger['info']('UpdateCmHopperBlack',_0x4cae5a);logger[_0x1ca5('0xc')](_0x1ca5('0x1c'),_0x4cae5a,JSON[_0x1ca5('0x1d')](_0x3a7489));_0x2668d4(_0x3a7489);})[_0x1ca5('0x11')](function(_0x24b7f0){logger[_0x1ca5('0xe')](_0x1ca5('0x1c'),_0x24b7f0[_0x1ca5('0xf')],_0x4cae5a);_0x4ee460(_0xbcc9d[_0x1ca5('0xe')](0x1f4,_0x24b7f0[_0x1ca5('0xf')]));});});};exports[_0x1ca5('0x1e')]=function(_0x4fb771){var _0x182074=this;return new Promise(function(_0x1bdb7b,_0x2a8613){return db[_0x1ca5('0x13')][_0x1ca5('0x1f')]({'where':_0x4fb771[_0x1ca5('0x14')]?_0x4fb771[_0x1ca5('0x14')][_0x1ca5('0x1b')]||null:null})[_0x1ca5('0x8')](function(_0x12c242){logger[_0x1ca5('0x9')]('DestroyCmHopperBlack',_0x4fb771);logger['debug'](_0x1ca5('0x1e'),_0x4fb771,JSON['stringify'](_0x12c242));_0x1bdb7b(_0x12c242);})[_0x1ca5('0x11')](function(_0x3ad4df){logger[_0x1ca5('0xe')](_0x1ca5('0x1e'),_0x3ad4df[_0x1ca5('0xf')],_0x4fb771);_0x2a8613(_0x182074[_0x1ca5('0xe')](0x1f4,_0x3ad4df[_0x1ca5('0xf')]));});});}; \ No newline at end of file diff --git a/server/api/cmHopperBlack/index.js b/server/api/cmHopperBlack/index.js index 98a4c09..1a664e0 100644 --- a/server/api/cmHopperBlack/index.js +++ b/server/api/cmHopperBlack/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xeda8=['get','isAuthenticated','index','describe','/:id','update','delete','exports','multer','util','connect-timeout','express','Router','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','./cmHopperBlack.controller'];(function(_0x1b4943,_0x48bd8d){var _0x1e91f0=function(_0x1799f2){while(--_0x1799f2){_0x1b4943['push'](_0x1b4943['shift']());}};_0x1e91f0(++_0x48bd8d);}(_0xeda8,0x104));var _0x8eda=function(_0x42f7cc,_0x2d9342){_0x42f7cc=_0x42f7cc-0x0;var _0x33407c=_0xeda8[_0x42f7cc];return _0x33407c;};'use strict';var multer=require(_0x8eda('0x0'));var util=require(_0x8eda('0x1'));var path=require('path');var timeout=require(_0x8eda('0x2'));var express=require(_0x8eda('0x3'));var router=express[_0x8eda('0x4')]();var fs_extra=require(_0x8eda('0x5'));var auth=require(_0x8eda('0x6'));var interaction=require(_0x8eda('0x7'));var config=require(_0x8eda('0x8'));var controller=require(_0x8eda('0x9'));router[_0x8eda('0xa')]('/',auth[_0x8eda('0xb')](),controller[_0x8eda('0xc')]);router[_0x8eda('0xa')]('/describe',auth[_0x8eda('0xb')](),controller[_0x8eda('0xd')]);router[_0x8eda('0xa')](_0x8eda('0xe'),auth['isAuthenticated'](),controller['show']);router['put']('/:id',auth[_0x8eda('0xb')](),controller[_0x8eda('0xf')]);router[_0x8eda('0x10')]('/:id',auth[_0x8eda('0xb')](),controller['destroy']);module[_0x8eda('0x11')]=router; \ No newline at end of file +var _0x2ef3=['describe','/:id','show','put','delete','destroy','multer','util','path','connect-timeout','express','Router','../../components/auth/service','../../components/interaction/service','./cmHopperBlack.controller','get','/describe','isAuthenticated'];(function(_0x5f46af,_0x44a02b){var _0x4917=function(_0x91f18e){while(--_0x91f18e){_0x5f46af['push'](_0x5f46af['shift']());}};_0x4917(++_0x44a02b);}(_0x2ef3,0xba));var _0x32ef=function(_0x5da1c2,_0x499952){_0x5da1c2=_0x5da1c2-0x0;var _0x3d2fce=_0x2ef3[_0x5da1c2];return _0x3d2fce;};'use strict';var multer=require(_0x32ef('0x0'));var util=require(_0x32ef('0x1'));var path=require(_0x32ef('0x2'));var timeout=require(_0x32ef('0x3'));var express=require(_0x32ef('0x4'));var router=express[_0x32ef('0x5')]();var fs_extra=require('fs-extra');var auth=require(_0x32ef('0x6'));var interaction=require(_0x32ef('0x7'));var config=require('../../config/environment');var controller=require(_0x32ef('0x8'));router[_0x32ef('0x9')]('/',auth['isAuthenticated'](),controller['index']);router[_0x32ef('0x9')](_0x32ef('0xa'),auth[_0x32ef('0xb')](),controller[_0x32ef('0xc')]);router[_0x32ef('0x9')](_0x32ef('0xd'),auth[_0x32ef('0xb')](),controller[_0x32ef('0xe')]);router[_0x32ef('0xf')](_0x32ef('0xd'),auth['isAuthenticated'](),controller['update']);router[_0x32ef('0x10')](_0x32ef('0xd'),auth[_0x32ef('0xb')](),controller[_0x32ef('0x11')]);module['exports']=router; \ No newline at end of file diff --git a/server/api/cmHopperFinal/cmHopperFinal.attributes.js b/server/api/cmHopperFinal/cmHopperFinal.attributes.js index 5f4e242..25d6169 100644 --- a/server/api/cmHopperFinal/cmHopperFinal.attributes.js +++ b/server/api/cmHopperFinal/cmHopperFinal.attributes.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xe263=['getDataValue','endtime','setDataValue','followuptime','diff','seconds','BOOLEAN','sequelize','exports','STRING','DATE','INTEGER'];(function(_0xa3c06b,_0x490f99){var _0x33aa1d=function(_0x23a88e){while(--_0x23a88e){_0xa3c06b['push'](_0xa3c06b['shift']());}};_0x33aa1d(++_0x490f99);}(_0xe263,0x7f));var _0x3e26=function(_0x35bac7,_0x593c35){_0x35bac7=_0x35bac7-0x0;var _0x47e066=_0xe263[_0x35bac7];return _0x47e066;};'use strict';var Sequelize=require(_0x3e26('0x0'));var moment=require('moment');module[_0x3e26('0x1')]={'state':{'type':Sequelize['INTEGER'](0x2)},'statedesc':{'type':Sequelize[_0x3e26('0x2')]},'scheduledat':{'type':Sequelize[_0x3e26('0x3')]},'countbusyretry':{'type':Sequelize['INTEGER'],'defaultValue':0x0},'countcongestionretry':{'type':Sequelize[_0x3e26('0x4')],'defaultValue':0x0},'countnoanswerretry':{'type':Sequelize[_0x3e26('0x4')],'defaultValue':0x0},'countglobal':{'type':Sequelize[_0x3e26('0x4')],'defaultValue':0x0},'uniqueid':{'type':Sequelize[_0x3e26('0x2')]},'originatecalleridnum':{'type':Sequelize[_0x3e26('0x2')]},'originatecalleridname':{'type':Sequelize[_0x3e26('0x2')]},'calleridnum':{'type':Sequelize[_0x3e26('0x2')]},'calleridname':{'type':Sequelize[_0x3e26('0x2')]},'starttime':{'type':Sequelize[_0x3e26('0x3')]},'responsetime':{'type':Sequelize[_0x3e26('0x3')]},'answertime':{'type':Sequelize[_0x3e26('0x3')]},'droptime':{'type':Sequelize[_0x3e26('0x3')]},'endtime':{'type':Sequelize[_0x3e26('0x3')]},'ringtime':{'type':Sequelize[_0x3e26('0x4')],'defaultValue':0x0},'holdtime':{'type':Sequelize[_0x3e26('0x4')],'defaultValue':0x0},'talktime':{'type':Sequelize[_0x3e26('0x4')],'defaultValue':0x0},'followuptime':{'type':Sequelize[_0x3e26('0x4')],'defaultValue':0x0},'dropreason':{'type':Sequelize[_0x3e26('0x2')]},'campaign':{'type':Sequelize[_0x3e26('0x2')]},'campaigntype':{'type':Sequelize[_0x3e26('0x2')]},'membername':{'type':Sequelize[_0x3e26('0x2')]},'reason':{'type':Sequelize[_0x3e26('0x2')]},'disposition':{'type':Sequelize[_0x3e26('0x2')]},'secondDisposition':{'type':Sequelize[_0x3e26('0x2')]},'thirdDisposition':{'type':Sequelize[_0x3e26('0x2')]},'dispositionat':{'type':Sequelize[_0x3e26('0x3')],'set':function(_0x226e49){var _0x38cbde=this[_0x3e26('0x5')](_0x3e26('0x6'));if(_0x38cbde&&_0x226e49){this[_0x3e26('0x7')](_0x3e26('0x8'),moment(_0x226e49)[_0x3e26('0x9')](moment(_0x38cbde),_0x3e26('0xa')));}}},'amd':{'type':Sequelize[_0x3e26('0xb')],'defaultValue':![]},'fax':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'blacklist':{'type':Sequelize[_0x3e26('0xb')],'defaultValue':![]},'rescheduled':{'type':Sequelize[_0x3e26('0xb')],'defaultValue':![]},'rescheduledat':{'type':Sequelize[_0x3e26('0x3')]},'callback':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'callbackuniqueid':{'type':Sequelize[_0x3e26('0x2')],'defaultValue':null},'callbackat':{'type':Sequelize[_0x3e26('0x3')]},'deleted':{'type':Sequelize[_0x3e26('0x2')],'defaultValue':null},'deletedat':{'type':Sequelize[_0x3e26('0x3')]},'recallme':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'agiafterat':{'type':Sequelize[_0x3e26('0x3')]},'countnosuchnumberretry':{'type':Sequelize[_0x3e26('0x4')],'defaultValue':0x0},'countdropretry':{'type':Sequelize[_0x3e26('0x4')],'defaultValue':0x0},'countabandonedretry':{'type':Sequelize[_0x3e26('0x4')],'defaultValue':0x0},'countmachineretry':{'type':Sequelize[_0x3e26('0x4')],'defaultValue':0x0},'countagentrejectretry':{'type':Sequelize[_0x3e26('0x4')],'defaultValue':0x0}}; \ No newline at end of file +var _0xacc8=['DATE','endtime','setDataValue','followuptime','seconds','BOOLEAN','sequelize','moment','exports','INTEGER','STRING'];(function(_0xcfd2f3,_0x3d9f03){var _0x28ff04=function(_0xfe9cc8){while(--_0xfe9cc8){_0xcfd2f3['push'](_0xcfd2f3['shift']());}};_0x28ff04(++_0x3d9f03);}(_0xacc8,0xed));var _0x8acc=function(_0x4f9c46,_0x361afe){_0x4f9c46=_0x4f9c46-0x0;var _0x155365=_0xacc8[_0x4f9c46];return _0x155365;};'use strict';var Sequelize=require(_0x8acc('0x0'));var moment=require(_0x8acc('0x1'));module[_0x8acc('0x2')]={'state':{'type':Sequelize[_0x8acc('0x3')](0x2)},'statedesc':{'type':Sequelize[_0x8acc('0x4')]},'scheduledat':{'type':Sequelize[_0x8acc('0x5')]},'countbusyretry':{'type':Sequelize['INTEGER'],'defaultValue':0x0},'countcongestionretry':{'type':Sequelize[_0x8acc('0x3')],'defaultValue':0x0},'countnoanswerretry':{'type':Sequelize['INTEGER'],'defaultValue':0x0},'countglobal':{'type':Sequelize['INTEGER'],'defaultValue':0x0},'uniqueid':{'type':Sequelize['STRING']},'originatecalleridnum':{'type':Sequelize[_0x8acc('0x4')]},'originatecalleridname':{'type':Sequelize[_0x8acc('0x4')]},'calleridnum':{'type':Sequelize[_0x8acc('0x4')]},'calleridname':{'type':Sequelize['STRING']},'starttime':{'type':Sequelize[_0x8acc('0x5')]},'responsetime':{'type':Sequelize[_0x8acc('0x5')]},'answertime':{'type':Sequelize['DATE']},'droptime':{'type':Sequelize[_0x8acc('0x5')]},'endtime':{'type':Sequelize[_0x8acc('0x5')]},'ringtime':{'type':Sequelize[_0x8acc('0x3')],'defaultValue':0x0},'holdtime':{'type':Sequelize[_0x8acc('0x3')],'defaultValue':0x0},'talktime':{'type':Sequelize[_0x8acc('0x3')],'defaultValue':0x0},'followuptime':{'type':Sequelize[_0x8acc('0x3')],'defaultValue':0x0},'dropreason':{'type':Sequelize['STRING']},'campaign':{'type':Sequelize[_0x8acc('0x4')]},'campaigntype':{'type':Sequelize[_0x8acc('0x4')]},'membername':{'type':Sequelize[_0x8acc('0x4')]},'reason':{'type':Sequelize[_0x8acc('0x4')]},'disposition':{'type':Sequelize['STRING']},'secondDisposition':{'type':Sequelize[_0x8acc('0x4')]},'thirdDisposition':{'type':Sequelize[_0x8acc('0x4')]},'dispositionat':{'type':Sequelize[_0x8acc('0x5')],'set':function(_0xd37993){var _0xfbacff=this['getDataValue'](_0x8acc('0x6'));if(_0xfbacff&&_0xd37993){this[_0x8acc('0x7')](_0x8acc('0x8'),moment(_0xd37993)['diff'](moment(_0xfbacff),_0x8acc('0x9')));}}},'amd':{'type':Sequelize[_0x8acc('0xa')],'defaultValue':![]},'fax':{'type':Sequelize[_0x8acc('0xa')],'defaultValue':![]},'blacklist':{'type':Sequelize[_0x8acc('0xa')],'defaultValue':![]},'rescheduled':{'type':Sequelize[_0x8acc('0xa')],'defaultValue':![]},'rescheduledat':{'type':Sequelize[_0x8acc('0x5')]},'callback':{'type':Sequelize[_0x8acc('0xa')],'defaultValue':![]},'callbackuniqueid':{'type':Sequelize[_0x8acc('0x4')],'defaultValue':null},'callbackat':{'type':Sequelize[_0x8acc('0x5')]},'deleted':{'type':Sequelize[_0x8acc('0x4')],'defaultValue':null},'deletedat':{'type':Sequelize[_0x8acc('0x5')]},'recallme':{'type':Sequelize[_0x8acc('0xa')],'defaultValue':![]},'agiafterat':{'type':Sequelize[_0x8acc('0x5')]},'countnosuchnumberretry':{'type':Sequelize[_0x8acc('0x3')],'defaultValue':0x0},'countdropretry':{'type':Sequelize[_0x8acc('0x3')],'defaultValue':0x0},'countabandonedretry':{'type':Sequelize[_0x8acc('0x3')],'defaultValue':0x0},'countmachineretry':{'type':Sequelize[_0x8acc('0x3')],'defaultValue':0x0},'countagentrejectretry':{'type':Sequelize[_0x8acc('0x3')],'defaultValue':0x0}}; \ No newline at end of file diff --git a/server/api/cmHopperFinal/cmHopperFinal.controller.js b/server/api/cmHopperFinal/cmHopperFinal.controller.js index c61b4db..e94c7ca 100644 --- a/server/api/cmHopperFinal/cmHopperFinal.controller.js +++ b/server/api/cmHopperFinal/cmHopperFinal.controller.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x2675=['lodash','squel','jsforce','desk.js','querystring','ioredis','../../components/auth/service','../../components/parsers/qs','../../config/license/hardware','api','../../config/environment','../../config/license/util','../../mysqldb','sendStatus','status','end','offset','undefined','limit','count','Content-Range','json','apply','reject','destroy','then','error','name','send','index','map','CmHopperFinal','fieldName','type','key','query','keys','intersection','model','attributes','fields','hasOwnProperty','sort','where','filters','pick','merge','VIRTUAL','filter','includeAll','include','rows','catch','show','rawAttributes','length','options','find','describe','body','uniqueid','params','findAll','sequelize','COUNT','`state`\x20=\x200,\x201,\x20null','literal','`state`\x20=\x203,\x201,\x20null','noAnswerContacts','`state`\x20=\x205,\x201,\x20null','`state`\x20=\x208,\x201,\x20null','congestionContacts','`state`\x20=\x2010\x20,\x201,\x20null','dropContacts','`state`\x20=\x2011\x20,\x201,\x20null','`state`\x20=\x2022,\x201,\x20null','reCallContacts','`state`\x20=\x2019,\x201,\x20null','answeringMachine','countContactsIvrCampaignHopperFinal','noSuchContacts','busyContacts','abandonedContacts','moveContactsQueueCampaignHopperFinal','insert','into','cm_hopper','fromQuery','scheduledAt','ContactId','VoiceQueueId','createdAt','field','ANY_VALUE(calleridnum)','NOW()','ANY_VALUE(ContactId)','ANY_VALUE(ListId)','ListId','ANY_VALUE(VoiceQueueId)','updatedAt','VoiceQueueId\x20=\x20?','toString','state\x20=\x20?','state','calleridnum\x20IS\x20NOT\x20NULL','select','phone','from','calleridnum','cm_hopper_final','state\x20=\x204','moveContactsIvrCampaignHopperFinal','CampaignId','ANY_VALUE(CampaignId)','CampaignId\x20=\x20?','calleridnum\x20NOT\x20IN\x20(?)','group','eml-format','request-promise','moment','mustache','util','sox','to-csv','ejs','fs-extra'];(function(_0x48a3bb,_0x4dbc39){var _0x598464=function(_0x52f27e){while(--_0x52f27e){_0x48a3bb['push'](_0x48a3bb['shift']());}};_0x598464(++_0x4dbc39);}(_0x2675,0x75));var _0x5267=function(_0x4d0f31,_0x214a3f){_0x4d0f31=_0x4d0f31-0x0;var _0x2c9563=_0x2675[_0x4d0f31];return _0x2c9563;};'use strict';var emlformat=require(_0x5267('0x0'));var rimraf=require('rimraf');var zipdir=require('zip-dir');var jsonpatch=require('fast-json-patch');var rp=require(_0x5267('0x1'));var moment=require(_0x5267('0x2'));var BPromise=require('bluebird');var Mustache=require(_0x5267('0x3'));var util=require(_0x5267('0x4'));var path=require('path');var sox=require(_0x5267('0x5'));var csv=require(_0x5267('0x6'));var ejs=require(_0x5267('0x7'));var fs=require('fs');var fs_extra=require(_0x5267('0x8'));var _=require(_0x5267('0x9'));var squel=require(_0x5267('0xa'));var crypto=require('crypto');var jsforce=require(_0x5267('0xb'));var deskjs=require(_0x5267('0xc'));var toCsv=require('to-csv');var querystring=require(_0x5267('0xd'));var Papa=require('papaparse');var Redis=require(_0x5267('0xe'));var authService=require(_0x5267('0xf'));var qs=require(_0x5267('0x10'));var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0x5267('0x11'));var logger=require('../../config/logger')(_0x5267('0x12'));var utils=require('../../config/utils');var config=require(_0x5267('0x13'));var licenseUtil=require(_0x5267('0x14'));var db=require(_0x5267('0x15'))['db'];function respondWithStatusCode(_0x1f9be3,_0x1d7090){_0x1d7090=_0x1d7090||0xcc;return function(_0x1171b9){if(_0x1171b9){return _0x1f9be3[_0x5267('0x16')](_0x1d7090);}return _0x1f9be3[_0x5267('0x17')](_0x1d7090)[_0x5267('0x18')]();};}function respondWithResult(_0x1e2d3b,_0x16e5a7){_0x16e5a7=_0x16e5a7||0xc8;return function(_0x29349a){if(_0x29349a){return _0x1e2d3b[_0x5267('0x17')](_0x16e5a7)['json'](_0x29349a);}};}function respondWithFilteredResult(_0x52e24e,_0xa593fb){return function(_0x40d897){if(_0x40d897){var _0x38a147=typeof _0xa593fb[_0x5267('0x19')]===_0x5267('0x1a')&&typeof _0xa593fb[_0x5267('0x1b')]===_0x5267('0x1a');var _0x6831e0=_0x40d897[_0x5267('0x1c')];var _0xb1c97a=_0x38a147?0x0:_0xa593fb[_0x5267('0x19')];var _0x1ab03=_0x38a147?_0x40d897['count']:_0xa593fb[_0x5267('0x19')]+_0xa593fb[_0x5267('0x1b')];var _0x5069e8;if(_0x1ab03>=_0x6831e0){_0x1ab03=_0x6831e0;_0x5069e8=0xc8;}else{_0x5069e8=0xce;}_0x52e24e[_0x5267('0x17')](_0x5069e8);return _0x52e24e['set'](_0x5267('0x1d'),_0xb1c97a+'-'+_0x1ab03+'/'+_0x6831e0)[_0x5267('0x1e')](_0x40d897);}return null;};}function patchUpdates(_0x39c0c3){return function(_0x2a9f99){try{jsonpatch[_0x5267('0x1f')](_0x2a9f99,_0x39c0c3,!![]);}catch(_0x4dd637){return BPromise[_0x5267('0x20')](_0x4dd637);}return _0x2a9f99['save']();};}function saveUpdates(_0xa32663,_0x420fb8){return function(_0x3b53ac){if(_0x3b53ac){return _0x3b53ac['update'](_0xa32663)['then'](function(_0x5546e2){return _0x5546e2;});}return null;};}function removeEntity(_0x4a17c7,_0x5ea6a6){return function(_0x26c7f8){if(_0x26c7f8){return _0x26c7f8[_0x5267('0x21')]()[_0x5267('0x22')](function(){_0x4a17c7[_0x5267('0x17')](0xcc)[_0x5267('0x18')]();});}};}function handleEntityNotFound(_0x40d1be,_0x126a97){return function(_0x220e03){if(!_0x220e03){_0x40d1be[_0x5267('0x16')](0x194);}return _0x220e03;};}function handleError(_0x59f112,_0x5cb64f){_0x5cb64f=_0x5cb64f||0x1f4;return function(_0x354111){logger[_0x5267('0x23')](_0x354111['stack']);if(_0x354111[_0x5267('0x24')]){delete _0x354111['name'];}_0x59f112['status'](_0x5cb64f)[_0x5267('0x25')](_0x354111);};}exports[_0x5267('0x26')]=function(_0x1f33b7,_0x2d2ace){var _0x33c431={},_0x4f3d4d={},_0x5e87eb={'count':0x0,'rows':[]};var _0x18020c=_[_0x5267('0x27')](db[_0x5267('0x28')]['rawAttributes'],function(_0x58d685){return{'name':_0x58d685[_0x5267('0x29')],'type':_0x58d685[_0x5267('0x2a')][_0x5267('0x2b')]};});_0x4f3d4d['model']=_['map'](_0x18020c,_0x5267('0x24'));_0x4f3d4d[_0x5267('0x2c')]=_[_0x5267('0x2d')](_0x1f33b7[_0x5267('0x2c')]);_0x4f3d4d['filters']=_[_0x5267('0x2e')](_0x4f3d4d[_0x5267('0x2f')],_0x4f3d4d[_0x5267('0x2c')]);_0x33c431[_0x5267('0x30')]=_[_0x5267('0x2e')](_0x4f3d4d[_0x5267('0x2f')],qs[_0x5267('0x31')](_0x1f33b7[_0x5267('0x2c')]['fields']));_0x33c431['attributes']=_0x33c431[_0x5267('0x30')]['length']?_0x33c431[_0x5267('0x30')]:_0x4f3d4d[_0x5267('0x2f')];if(!_0x1f33b7[_0x5267('0x2c')][_0x5267('0x32')]('nolimit')){_0x33c431[_0x5267('0x1b')]=qs[_0x5267('0x1b')](_0x1f33b7[_0x5267('0x2c')][_0x5267('0x1b')]);_0x33c431[_0x5267('0x19')]=qs[_0x5267('0x19')](_0x1f33b7[_0x5267('0x2c')][_0x5267('0x19')]);}_0x33c431['order']=qs[_0x5267('0x33')](_0x1f33b7['query'][_0x5267('0x33')]);_0x33c431[_0x5267('0x34')]=qs[_0x5267('0x35')](_[_0x5267('0x36')](_0x1f33b7[_0x5267('0x2c')],_0x4f3d4d[_0x5267('0x35')]),_0x18020c);if(_0x1f33b7[_0x5267('0x2c')]['filter']){_0x33c431[_0x5267('0x34')]=_[_0x5267('0x37')](_0x33c431[_0x5267('0x34')],{'$or':_[_0x5267('0x27')](_0x18020c,function(_0x82cea7){if(_0x82cea7[_0x5267('0x2a')]!==_0x5267('0x38')){var _0x487dfc={};_0x487dfc[_0x82cea7[_0x5267('0x24')]]={'$like':'%'+_0x1f33b7['query'][_0x5267('0x39')]+'%'};return _0x487dfc;}})});}_0x33c431=_['merge']({},_0x33c431,_0x1f33b7['options']);var _0x51bddd={'where':_0x33c431[_0x5267('0x34')]};return db['CmHopperFinal'][_0x5267('0x1c')](_0x51bddd)[_0x5267('0x22')](function(_0x3d4b19){_0x5e87eb[_0x5267('0x1c')]=_0x3d4b19;if(_0x1f33b7['query'][_0x5267('0x3a')]){_0x33c431[_0x5267('0x3b')]=[{'all':!![]}];}return db['CmHopperFinal']['findAll'](_0x33c431);})[_0x5267('0x22')](function(_0x560cdf){_0x5e87eb[_0x5267('0x3c')]=_0x560cdf;return _0x5e87eb;})[_0x5267('0x22')](respondWithFilteredResult(_0x2d2ace,_0x33c431))[_0x5267('0x3d')](handleError(_0x2d2ace,null));};exports[_0x5267('0x3e')]=function(_0x36d0f1,_0x3012cb){var _0x27add5={'raw':!![],'where':{'id':_0x36d0f1['params']['id']}},_0x5697b3={};_0x5697b3[_0x5267('0x2f')]=_['keys'](db[_0x5267('0x28')][_0x5267('0x3f')]);_0x5697b3['query']=_[_0x5267('0x2d')](_0x36d0f1[_0x5267('0x2c')]);_0x5697b3[_0x5267('0x35')]=_[_0x5267('0x2e')](_0x5697b3[_0x5267('0x2f')],_0x5697b3[_0x5267('0x2c')]);_0x27add5[_0x5267('0x30')]=_[_0x5267('0x2e')](_0x5697b3[_0x5267('0x2f')],qs['fields'](_0x36d0f1[_0x5267('0x2c')][_0x5267('0x31')]));_0x27add5[_0x5267('0x30')]=_0x27add5[_0x5267('0x30')][_0x5267('0x40')]?_0x27add5['attributes']:_0x5697b3[_0x5267('0x2f')];if(_0x36d0f1['query'][_0x5267('0x3a')]){_0x27add5['include']=[{'all':!![]}];}_0x27add5=_['merge']({},_0x27add5,_0x36d0f1[_0x5267('0x41')]);return db['CmHopperFinal'][_0x5267('0x42')](_0x27add5)[_0x5267('0x22')](handleEntityNotFound(_0x3012cb,null))[_0x5267('0x22')](respondWithResult(_0x3012cb,null))[_0x5267('0x3d')](handleError(_0x3012cb,null));};exports['describe']=function(_0x12d6a8,_0x4ee826){return db['CmHopperFinal'][_0x5267('0x43')]()[_0x5267('0x22')](respondWithResult(_0x4ee826,null))['catch'](handleError(_0x4ee826,null));};exports['update']=function(_0x383ebe,_0xe0439e){if(_0x383ebe[_0x5267('0x44')][_0x5267('0x45')]){delete _0x383ebe[_0x5267('0x44')][_0x5267('0x45')];}return db[_0x5267('0x28')][_0x5267('0x42')]({'where':{'uniqueid':_0x383ebe[_0x5267('0x46')]['id']}})[_0x5267('0x22')](handleEntityNotFound(_0xe0439e,null))[_0x5267('0x22')](saveUpdates(_0x383ebe[_0x5267('0x44')],null))[_0x5267('0x22')](respondWithResult(_0xe0439e,null))[_0x5267('0x3d')](handleError(_0xe0439e,null));};exports['countContactsQueueCampaignHopperFinal']=function(_0x8636d0,_0x466d46,_0x371486){return db['CmHopperFinal'][_0x5267('0x47')]({'raw':![],'where':{'VoiceQueueId':_0x8636d0[_0x5267('0x46')]['id']},'attributes':[[db[_0x5267('0x48')]['fn'](_0x5267('0x49'),db[_0x5267('0x48')]['fn']('IF',db[_0x5267('0x48')]['literal'](_0x5267('0x4a')))),'noSuchContacts'],[db[_0x5267('0x48')]['fn'](_0x5267('0x49'),db[_0x5267('0x48')]['fn']('IF',db[_0x5267('0x48')][_0x5267('0x4b')](_0x5267('0x4c')))),_0x5267('0x4d')],[db['sequelize']['fn']('COUNT',db[_0x5267('0x48')]['fn']('IF',db[_0x5267('0x48')]['literal'](_0x5267('0x4e')))),'busyContacts'],[db['sequelize']['fn'](_0x5267('0x49'),db[_0x5267('0x48')]['fn']('IF',db[_0x5267('0x48')][_0x5267('0x4b')](_0x5267('0x4f')))),_0x5267('0x50')],[db[_0x5267('0x48')]['fn'](_0x5267('0x49'),db[_0x5267('0x48')]['fn']('IF',db[_0x5267('0x48')]['literal'](_0x5267('0x51')))),_0x5267('0x52')],[db[_0x5267('0x48')]['fn'](_0x5267('0x49'),db[_0x5267('0x48')]['fn']('IF',db[_0x5267('0x48')]['literal'](_0x5267('0x53')))),'abandonedContacts'],[db[_0x5267('0x48')]['fn'](_0x5267('0x49'),db[_0x5267('0x48')]['fn']('IF',db['sequelize'][_0x5267('0x4b')](_0x5267('0x54')))),_0x5267('0x55')],[db[_0x5267('0x48')]['fn'](_0x5267('0x49'),db[_0x5267('0x48')]['fn']('IF',db['sequelize'][_0x5267('0x4b')](_0x5267('0x56')))),_0x5267('0x57')]]})[_0x5267('0x22')](handleEntityNotFound(_0x466d46,null))['then'](respondWithResult(_0x466d46,null))['catch'](handleError(_0x466d46,null));};exports[_0x5267('0x58')]=function(_0x5393e9,_0x3f5cda,_0x47059c){return db['CmHopperFinal']['findAll']({'raw':![],'where':{'CampaignId':_0x5393e9[_0x5267('0x46')]['id']},'attributes':[[db[_0x5267('0x48')]['fn'](_0x5267('0x49'),db['sequelize']['fn']('IF',db[_0x5267('0x48')][_0x5267('0x4b')](_0x5267('0x4a')))),_0x5267('0x59')],[db['sequelize']['fn']('COUNT',db['sequelize']['fn']('IF',db[_0x5267('0x48')][_0x5267('0x4b')](_0x5267('0x4c')))),_0x5267('0x4d')],[db[_0x5267('0x48')]['fn'](_0x5267('0x49'),db[_0x5267('0x48')]['fn']('IF',db[_0x5267('0x48')]['literal'](_0x5267('0x4e')))),_0x5267('0x5a')],[db['sequelize']['fn'](_0x5267('0x49'),db[_0x5267('0x48')]['fn']('IF',db[_0x5267('0x48')][_0x5267('0x4b')](_0x5267('0x4f')))),_0x5267('0x50')],[db['sequelize']['fn'](_0x5267('0x49'),db[_0x5267('0x48')]['fn']('IF',db[_0x5267('0x48')][_0x5267('0x4b')](_0x5267('0x51')))),_0x5267('0x52')],[db['sequelize']['fn'](_0x5267('0x49'),db[_0x5267('0x48')]['fn']('IF',db[_0x5267('0x48')][_0x5267('0x4b')](_0x5267('0x53')))),_0x5267('0x5b')],[db['sequelize']['fn'](_0x5267('0x49'),db[_0x5267('0x48')]['fn']('IF',db[_0x5267('0x48')][_0x5267('0x4b')]('`state`\x20=\x2022,\x201,\x20null'))),'reCallContacts'],[db['sequelize']['fn'](_0x5267('0x49'),db['sequelize']['fn']('IF',db[_0x5267('0x48')]['literal'](_0x5267('0x56')))),_0x5267('0x57')]]})[_0x5267('0x22')](handleEntityNotFound(_0x3f5cda,null))[_0x5267('0x22')](respondWithResult(_0x3f5cda,null))[_0x5267('0x3d')](handleError(_0x3f5cda,null));};exports[_0x5267('0x5c')]=function(_0x21338f,_0x1103c5,_0x489b9a){return db['VoiceQueue']['find']({'where':{'id':_0x21338f[_0x5267('0x46')]['id']}})[_0x5267('0x22')](handleEntityNotFound(_0x1103c5,null))[_0x5267('0x22')](function(_0x457d84){var _0x4974d1;if(_0x457d84){_0x4974d1=squel[_0x5267('0x5d')]()[_0x5267('0x5e')](_0x5267('0x5f'))[_0x5267('0x60')](['phone',_0x5267('0x61'),_0x5267('0x62'),'ListId',_0x5267('0x63'),_0x5267('0x64'),'updatedAt'],squel['select']()[_0x5267('0x65')](_0x5267('0x66'),'phone')['field'](_0x5267('0x67'),_0x5267('0x61'))[_0x5267('0x65')](_0x5267('0x68'),_0x5267('0x62'))['field'](_0x5267('0x69'),_0x5267('0x6a'))['field'](_0x5267('0x6b'),_0x5267('0x63'))[_0x5267('0x65')](_0x5267('0x67'),_0x5267('0x64'))[_0x5267('0x65')](_0x5267('0x67'),_0x5267('0x6c'))['from']('cm_hopper_final')[_0x5267('0x34')](_0x5267('0x6d'),_0x21338f[_0x5267('0x46')]['id'][_0x5267('0x6e')]())['where'](_0x5267('0x6f'),_0x21338f['body'][_0x5267('0x70')][_0x5267('0x6e')]())[_0x5267('0x34')](_0x5267('0x71'))['where']('calleridnum\x20NOT\x20IN\x20(?)',squel[_0x5267('0x72')]()[_0x5267('0x65')](_0x5267('0x73'))[_0x5267('0x74')](_0x5267('0x5f'))[_0x5267('0x34')]('VoiceQueueId\x20=\x20?',_0x21338f[_0x5267('0x46')]['id']['toString']()))[_0x5267('0x34')]('calleridnum\x20NOT\x20IN\x20(?)',squel[_0x5267('0x72')]()[_0x5267('0x65')](_0x5267('0x75'))[_0x5267('0x74')](_0x5267('0x76'))[_0x5267('0x34')](_0x5267('0x6d'),_0x21338f[_0x5267('0x46')]['id'][_0x5267('0x6e')]())[_0x5267('0x34')](_0x5267('0x77')))['group'](_0x5267('0x62')))[_0x5267('0x6e')]();return db['sequelize'][_0x5267('0x2c')](_0x4974d1);}return[];})[_0x5267('0x22')](respondWithResult(_0x1103c5,null))[_0x5267('0x3d')](handleError(_0x1103c5,null));};exports[_0x5267('0x78')]=function(_0xd18795,_0x37b007,_0x358543){return db['Campaign'][_0x5267('0x42')]({'where':{'id':_0xd18795[_0x5267('0x46')]['id']}})[_0x5267('0x22')](handleEntityNotFound(_0x37b007,null))[_0x5267('0x22')](function(_0x1cdf9f){var _0x4dbaa2;if(_0x1cdf9f){_0x4dbaa2=squel['insert']()[_0x5267('0x5e')](_0x5267('0x5f'))[_0x5267('0x60')]([_0x5267('0x73'),'scheduledAt',_0x5267('0x62'),_0x5267('0x6a'),_0x5267('0x79'),_0x5267('0x64'),_0x5267('0x6c')],squel[_0x5267('0x72')]()[_0x5267('0x65')](_0x5267('0x66'),_0x5267('0x73'))[_0x5267('0x65')](_0x5267('0x67'),_0x5267('0x61'))[_0x5267('0x65')]('ANY_VALUE(ContactId)',_0x5267('0x62'))[_0x5267('0x65')](_0x5267('0x69'),_0x5267('0x6a'))[_0x5267('0x65')](_0x5267('0x7a'),_0x5267('0x79'))[_0x5267('0x65')](_0x5267('0x67'),_0x5267('0x64'))[_0x5267('0x65')](_0x5267('0x67'),_0x5267('0x6c'))[_0x5267('0x74')](_0x5267('0x76'))[_0x5267('0x34')](_0x5267('0x7b'),_0xd18795[_0x5267('0x46')]['id'][_0x5267('0x6e')]())[_0x5267('0x34')](_0x5267('0x6f'),_0xd18795[_0x5267('0x44')][_0x5267('0x70')]['toString']())[_0x5267('0x34')](_0x5267('0x71'))[_0x5267('0x34')](_0x5267('0x7c'),squel[_0x5267('0x72')]()['field'](_0x5267('0x73'))[_0x5267('0x74')]('cm_hopper')['where']('CampaignId\x20=\x20?',_0xd18795[_0x5267('0x46')]['id']['toString']()))[_0x5267('0x34')]('calleridnum\x20NOT\x20IN\x20(?)',squel['select']()[_0x5267('0x65')](_0x5267('0x75'))[_0x5267('0x74')](_0x5267('0x76'))[_0x5267('0x34')]('CampaignId\x20=\x20?',_0xd18795['params']['id'][_0x5267('0x6e')]())[_0x5267('0x34')](_0x5267('0x77')))[_0x5267('0x7d')](_0x5267('0x62')))['toString']();return db[_0x5267('0x48')]['query'](_0x4dbaa2);}return[];})['then'](respondWithResult(_0x37b007,null))[_0x5267('0x3d')](handleError(_0x37b007,null));};exports['checkContactHopper']=function(_0x5da8d6,_0x3ebe63,_0x321322){return db['CmHopper']['findOne']({'where':{'VoiceQueueId':_0x5da8d6['body'][_0x5267('0x63')],'CampaignId':_0x5da8d6['body'][_0x5267('0x79')],'ContactId':_0x5da8d6['body'][_0x5267('0x62')]}})[_0x5267('0x22')](handleEntityNotFound(_0x3ebe63,null))['then'](function(_0x1ae9fe){if(_0x1ae9fe){return _0x1ae9fe;}return null;})[_0x5267('0x22')](respondWithResult(_0x3ebe63,null))[_0x5267('0x3d')](handleError(_0x3ebe63,null));}; \ No newline at end of file +var _0xbd51=['ANY_VALUE(ContactId)','ANY_VALUE(ListId)','ANY_VALUE(VoiceQueueId)','updatedAt','cm_hopper_final','VoiceQueueId\x20=\x20?','state\x20=\x20?','state','toString','calleridnum\x20IS\x20NOT\x20NULL','from','calleridnum\x20NOT\x20IN\x20(?)','state\x20=\x204','group','moveContactsIvrCampaignHopperFinal','Campaign','CampaignId','ANY_VALUE(CampaignId)','CampaignId\x20=\x20?','checkContactHopper','CmHopper','findOne','eml-format','zip-dir','fast-json-patch','request-promise','moment','sox','to-csv','ejs','lodash','squel','crypto','jsforce','desk.js','querystring','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','../../config/utils','../../config/license/util','../../mysqldb','sendStatus','status','json','offset','undefined','limit','count','set','Content-Range','apply','reject','save','update','destroy','error','stack','name','send','index','CmHopperFinal','rawAttributes','fieldName','type','key','query','filters','intersection','model','attributes','fields','hasOwnProperty','nolimit','order','sort','where','pick','filter','merge','map','VIRTUAL','options','then','includeAll','include','rows','show','params','keys','length','catch','describe','body','uniqueid','find','sequelize','COUNT','literal','`state`\x20=\x200,\x201,\x20null','`state`\x20=\x203,\x201,\x20null','`state`\x20=\x205,\x201,\x20null','busyContacts','congestionContacts','`state`\x20=\x2010\x20,\x201,\x20null','dropContacts','`state`\x20=\x2011\x20,\x201,\x20null','abandonedContacts','`state`\x20=\x2022,\x201,\x20null','`state`\x20=\x2019,\x201,\x20null','answeringMachine','countContactsIvrCampaignHopperFinal','findAll','`state`\x20=\x208,\x201,\x20null','reCallContacts','moveContactsQueueCampaignHopperFinal','VoiceQueue','insert','into','cm_hopper','fromQuery','phone','ContactId','ListId','VoiceQueueId','createdAt','select','field','ANY_VALUE(calleridnum)','NOW()','scheduledAt'];(function(_0x5983b1,_0x3649c3){var _0x570598=function(_0x42a989){while(--_0x42a989){_0x5983b1['push'](_0x5983b1['shift']());}};_0x570598(++_0x3649c3);}(_0xbd51,0x1a8));var _0x1bd5=function(_0x47e995,_0x445e70){_0x47e995=_0x47e995-0x0;var _0x371b0f=_0xbd51[_0x47e995];return _0x371b0f;};'use strict';var emlformat=require(_0x1bd5('0x0'));var rimraf=require('rimraf');var zipdir=require(_0x1bd5('0x1'));var jsonpatch=require(_0x1bd5('0x2'));var rp=require(_0x1bd5('0x3'));var moment=require(_0x1bd5('0x4'));var BPromise=require('bluebird');var Mustache=require('mustache');var util=require('util');var path=require('path');var sox=require(_0x1bd5('0x5'));var csv=require(_0x1bd5('0x6'));var ejs=require(_0x1bd5('0x7'));var fs=require('fs');var fs_extra=require('fs-extra');var _=require(_0x1bd5('0x8'));var squel=require(_0x1bd5('0x9'));var crypto=require(_0x1bd5('0xa'));var jsforce=require(_0x1bd5('0xb'));var deskjs=require(_0x1bd5('0xc'));var toCsv=require('to-csv');var querystring=require(_0x1bd5('0xd'));var Papa=require('papaparse');var Redis=require(_0x1bd5('0xe'));var authService=require(_0x1bd5('0xf'));var qs=require(_0x1bd5('0x10'));var as=require(_0x1bd5('0x11'));var hardwareService=require(_0x1bd5('0x12'));var logger=require(_0x1bd5('0x13'))('api');var utils=require(_0x1bd5('0x14'));var config=require('../../config/environment');var licenseUtil=require(_0x1bd5('0x15'));var db=require(_0x1bd5('0x16'))['db'];function respondWithStatusCode(_0x37e8e1,_0x14606b){_0x14606b=_0x14606b||0xcc;return function(_0x177be0){if(_0x177be0){return _0x37e8e1[_0x1bd5('0x17')](_0x14606b);}return _0x37e8e1[_0x1bd5('0x18')](_0x14606b)['end']();};}function respondWithResult(_0x5650b5,_0x8b2390){_0x8b2390=_0x8b2390||0xc8;return function(_0x6d2c40){if(_0x6d2c40){return _0x5650b5[_0x1bd5('0x18')](_0x8b2390)[_0x1bd5('0x19')](_0x6d2c40);}};}function respondWithFilteredResult(_0x48d048,_0x5072c2){return function(_0xa63190){if(_0xa63190){var _0xc7277e=typeof _0x5072c2[_0x1bd5('0x1a')]===_0x1bd5('0x1b')&&typeof _0x5072c2[_0x1bd5('0x1c')]===_0x1bd5('0x1b');var _0x13cf34=_0xa63190[_0x1bd5('0x1d')];var _0x4670b5=_0xc7277e?0x0:_0x5072c2['offset'];var _0x53ad5e=_0xc7277e?_0xa63190[_0x1bd5('0x1d')]:_0x5072c2[_0x1bd5('0x1a')]+_0x5072c2[_0x1bd5('0x1c')];var _0xb95d4e;if(_0x53ad5e>=_0x13cf34){_0x53ad5e=_0x13cf34;_0xb95d4e=0xc8;}else{_0xb95d4e=0xce;}_0x48d048[_0x1bd5('0x18')](_0xb95d4e);return _0x48d048[_0x1bd5('0x1e')](_0x1bd5('0x1f'),_0x4670b5+'-'+_0x53ad5e+'/'+_0x13cf34)[_0x1bd5('0x19')](_0xa63190);}return null;};}function patchUpdates(_0x456051){return function(_0xb1ac1e){try{jsonpatch[_0x1bd5('0x20')](_0xb1ac1e,_0x456051,!![]);}catch(_0x2447c4){return BPromise[_0x1bd5('0x21')](_0x2447c4);}return _0xb1ac1e[_0x1bd5('0x22')]();};}function saveUpdates(_0x253d79,_0x46c580){return function(_0x1f13e7){if(_0x1f13e7){return _0x1f13e7[_0x1bd5('0x23')](_0x253d79)['then'](function(_0x42c43d){return _0x42c43d;});}return null;};}function removeEntity(_0x50c663,_0x18fd18){return function(_0x1e534e){if(_0x1e534e){return _0x1e534e[_0x1bd5('0x24')]()['then'](function(){_0x50c663[_0x1bd5('0x18')](0xcc)['end']();});}};}function handleEntityNotFound(_0x2ed551,_0x30676d){return function(_0x3dba4f){if(!_0x3dba4f){_0x2ed551[_0x1bd5('0x17')](0x194);}return _0x3dba4f;};}function handleError(_0x47c84b,_0x202ed3){_0x202ed3=_0x202ed3||0x1f4;return function(_0x69bb17){logger[_0x1bd5('0x25')](_0x69bb17[_0x1bd5('0x26')]);if(_0x69bb17['name']){delete _0x69bb17[_0x1bd5('0x27')];}_0x47c84b[_0x1bd5('0x18')](_0x202ed3)[_0x1bd5('0x28')](_0x69bb17);};}exports[_0x1bd5('0x29')]=function(_0xe54b9f,_0xc73670){var _0x4e72b2={},_0x289097={},_0x472b22={'count':0x0,'rows':[]};var _0x8d53ba=_['map'](db[_0x1bd5('0x2a')][_0x1bd5('0x2b')],function(_0x345181){return{'name':_0x345181[_0x1bd5('0x2c')],'type':_0x345181[_0x1bd5('0x2d')][_0x1bd5('0x2e')]};});_0x289097['model']=_['map'](_0x8d53ba,_0x1bd5('0x27'));_0x289097[_0x1bd5('0x2f')]=_['keys'](_0xe54b9f[_0x1bd5('0x2f')]);_0x289097[_0x1bd5('0x30')]=_[_0x1bd5('0x31')](_0x289097[_0x1bd5('0x32')],_0x289097['query']);_0x4e72b2[_0x1bd5('0x33')]=_[_0x1bd5('0x31')](_0x289097[_0x1bd5('0x32')],qs[_0x1bd5('0x34')](_0xe54b9f[_0x1bd5('0x2f')][_0x1bd5('0x34')]));_0x4e72b2[_0x1bd5('0x33')]=_0x4e72b2[_0x1bd5('0x33')]['length']?_0x4e72b2[_0x1bd5('0x33')]:_0x289097[_0x1bd5('0x32')];if(!_0xe54b9f[_0x1bd5('0x2f')][_0x1bd5('0x35')](_0x1bd5('0x36'))){_0x4e72b2[_0x1bd5('0x1c')]=qs[_0x1bd5('0x1c')](_0xe54b9f['query'][_0x1bd5('0x1c')]);_0x4e72b2[_0x1bd5('0x1a')]=qs[_0x1bd5('0x1a')](_0xe54b9f[_0x1bd5('0x2f')][_0x1bd5('0x1a')]);}_0x4e72b2[_0x1bd5('0x37')]=qs[_0x1bd5('0x38')](_0xe54b9f['query']['sort']);_0x4e72b2[_0x1bd5('0x39')]=qs[_0x1bd5('0x30')](_[_0x1bd5('0x3a')](_0xe54b9f['query'],_0x289097[_0x1bd5('0x30')]),_0x8d53ba);if(_0xe54b9f['query'][_0x1bd5('0x3b')]){_0x4e72b2[_0x1bd5('0x39')]=_[_0x1bd5('0x3c')](_0x4e72b2[_0x1bd5('0x39')],{'$or':_[_0x1bd5('0x3d')](_0x8d53ba,function(_0x2470ec){if(_0x2470ec[_0x1bd5('0x2d')]!==_0x1bd5('0x3e')){var _0x4bbefc={};_0x4bbefc[_0x2470ec[_0x1bd5('0x27')]]={'$like':'%'+_0xe54b9f[_0x1bd5('0x2f')]['filter']+'%'};return _0x4bbefc;}})});}_0x4e72b2=_[_0x1bd5('0x3c')]({},_0x4e72b2,_0xe54b9f[_0x1bd5('0x3f')]);var _0x20b25c={'where':_0x4e72b2['where']};return db[_0x1bd5('0x2a')][_0x1bd5('0x1d')](_0x20b25c)[_0x1bd5('0x40')](function(_0x4074f1){_0x472b22['count']=_0x4074f1;if(_0xe54b9f[_0x1bd5('0x2f')][_0x1bd5('0x41')]){_0x4e72b2[_0x1bd5('0x42')]=[{'all':!![]}];}return db[_0x1bd5('0x2a')]['findAll'](_0x4e72b2);})['then'](function(_0x40eeff){_0x472b22[_0x1bd5('0x43')]=_0x40eeff;return _0x472b22;})[_0x1bd5('0x40')](respondWithFilteredResult(_0xc73670,_0x4e72b2))['catch'](handleError(_0xc73670,null));};exports[_0x1bd5('0x44')]=function(_0x3b1092,_0x574d95){var _0x1eacac={'raw':!![],'where':{'id':_0x3b1092[_0x1bd5('0x45')]['id']}},_0x5761b8={};_0x5761b8[_0x1bd5('0x32')]=_['keys'](db[_0x1bd5('0x2a')][_0x1bd5('0x2b')]);_0x5761b8[_0x1bd5('0x2f')]=_[_0x1bd5('0x46')](_0x3b1092[_0x1bd5('0x2f')]);_0x5761b8[_0x1bd5('0x30')]=_[_0x1bd5('0x31')](_0x5761b8[_0x1bd5('0x32')],_0x5761b8[_0x1bd5('0x2f')]);_0x1eacac[_0x1bd5('0x33')]=_[_0x1bd5('0x31')](_0x5761b8[_0x1bd5('0x32')],qs['fields'](_0x3b1092[_0x1bd5('0x2f')][_0x1bd5('0x34')]));_0x1eacac[_0x1bd5('0x33')]=_0x1eacac['attributes'][_0x1bd5('0x47')]?_0x1eacac[_0x1bd5('0x33')]:_0x5761b8['model'];if(_0x3b1092[_0x1bd5('0x2f')]['includeAll']){_0x1eacac[_0x1bd5('0x42')]=[{'all':!![]}];}_0x1eacac=_['merge']({},_0x1eacac,_0x3b1092[_0x1bd5('0x3f')]);return db[_0x1bd5('0x2a')]['find'](_0x1eacac)[_0x1bd5('0x40')](handleEntityNotFound(_0x574d95,null))['then'](respondWithResult(_0x574d95,null))[_0x1bd5('0x48')](handleError(_0x574d95,null));};exports[_0x1bd5('0x49')]=function(_0x1a29f3,_0xe71454){return db[_0x1bd5('0x2a')][_0x1bd5('0x49')]()[_0x1bd5('0x40')](respondWithResult(_0xe71454,null))[_0x1bd5('0x48')](handleError(_0xe71454,null));};exports['update']=function(_0x13985e,_0x227a68){if(_0x13985e[_0x1bd5('0x4a')][_0x1bd5('0x4b')]){delete _0x13985e[_0x1bd5('0x4a')][_0x1bd5('0x4b')];}return db['CmHopperFinal'][_0x1bd5('0x4c')]({'where':{'uniqueid':_0x13985e[_0x1bd5('0x45')]['id']}})[_0x1bd5('0x40')](handleEntityNotFound(_0x227a68,null))[_0x1bd5('0x40')](saveUpdates(_0x13985e[_0x1bd5('0x4a')],null))[_0x1bd5('0x40')](respondWithResult(_0x227a68,null))[_0x1bd5('0x48')](handleError(_0x227a68,null));};exports['countContactsQueueCampaignHopperFinal']=function(_0x587c46,_0x126221,_0x2d713b){return db[_0x1bd5('0x2a')]['findAll']({'raw':![],'where':{'VoiceQueueId':_0x587c46[_0x1bd5('0x45')]['id']},'attributes':[[db[_0x1bd5('0x4d')]['fn'](_0x1bd5('0x4e'),db[_0x1bd5('0x4d')]['fn']('IF',db[_0x1bd5('0x4d')][_0x1bd5('0x4f')](_0x1bd5('0x50')))),'noSuchContacts'],[db[_0x1bd5('0x4d')]['fn'](_0x1bd5('0x4e'),db['sequelize']['fn']('IF',db[_0x1bd5('0x4d')]['literal'](_0x1bd5('0x51')))),'noAnswerContacts'],[db[_0x1bd5('0x4d')]['fn'](_0x1bd5('0x4e'),db['sequelize']['fn']('IF',db[_0x1bd5('0x4d')][_0x1bd5('0x4f')](_0x1bd5('0x52')))),_0x1bd5('0x53')],[db[_0x1bd5('0x4d')]['fn'](_0x1bd5('0x4e'),db[_0x1bd5('0x4d')]['fn']('IF',db['sequelize'][_0x1bd5('0x4f')]('`state`\x20=\x208,\x201,\x20null'))),_0x1bd5('0x54')],[db[_0x1bd5('0x4d')]['fn'](_0x1bd5('0x4e'),db['sequelize']['fn']('IF',db['sequelize'][_0x1bd5('0x4f')](_0x1bd5('0x55')))),_0x1bd5('0x56')],[db[_0x1bd5('0x4d')]['fn'](_0x1bd5('0x4e'),db[_0x1bd5('0x4d')]['fn']('IF',db[_0x1bd5('0x4d')][_0x1bd5('0x4f')](_0x1bd5('0x57')))),_0x1bd5('0x58')],[db['sequelize']['fn'](_0x1bd5('0x4e'),db['sequelize']['fn']('IF',db[_0x1bd5('0x4d')][_0x1bd5('0x4f')](_0x1bd5('0x59')))),'reCallContacts'],[db[_0x1bd5('0x4d')]['fn'](_0x1bd5('0x4e'),db[_0x1bd5('0x4d')]['fn']('IF',db['sequelize'][_0x1bd5('0x4f')](_0x1bd5('0x5a')))),_0x1bd5('0x5b')]]})[_0x1bd5('0x40')](handleEntityNotFound(_0x126221,null))['then'](respondWithResult(_0x126221,null))['catch'](handleError(_0x126221,null));};exports[_0x1bd5('0x5c')]=function(_0xec9fac,_0x1790af,_0x54a8c4){return db['CmHopperFinal'][_0x1bd5('0x5d')]({'raw':![],'where':{'CampaignId':_0xec9fac['params']['id']},'attributes':[[db[_0x1bd5('0x4d')]['fn'](_0x1bd5('0x4e'),db['sequelize']['fn']('IF',db[_0x1bd5('0x4d')]['literal'](_0x1bd5('0x50')))),'noSuchContacts'],[db[_0x1bd5('0x4d')]['fn'](_0x1bd5('0x4e'),db['sequelize']['fn']('IF',db[_0x1bd5('0x4d')][_0x1bd5('0x4f')]('`state`\x20=\x203,\x201,\x20null'))),'noAnswerContacts'],[db[_0x1bd5('0x4d')]['fn'](_0x1bd5('0x4e'),db['sequelize']['fn']('IF',db[_0x1bd5('0x4d')][_0x1bd5('0x4f')]('`state`\x20=\x205,\x201,\x20null'))),'busyContacts'],[db[_0x1bd5('0x4d')]['fn'](_0x1bd5('0x4e'),db[_0x1bd5('0x4d')]['fn']('IF',db['sequelize'][_0x1bd5('0x4f')](_0x1bd5('0x5e')))),'congestionContacts'],[db['sequelize']['fn'](_0x1bd5('0x4e'),db[_0x1bd5('0x4d')]['fn']('IF',db[_0x1bd5('0x4d')][_0x1bd5('0x4f')](_0x1bd5('0x55')))),'dropContacts'],[db[_0x1bd5('0x4d')]['fn']('COUNT',db[_0x1bd5('0x4d')]['fn']('IF',db[_0x1bd5('0x4d')][_0x1bd5('0x4f')](_0x1bd5('0x57')))),'abandonedContacts'],[db['sequelize']['fn'](_0x1bd5('0x4e'),db[_0x1bd5('0x4d')]['fn']('IF',db[_0x1bd5('0x4d')][_0x1bd5('0x4f')](_0x1bd5('0x59')))),_0x1bd5('0x5f')],[db[_0x1bd5('0x4d')]['fn'](_0x1bd5('0x4e'),db[_0x1bd5('0x4d')]['fn']('IF',db[_0x1bd5('0x4d')][_0x1bd5('0x4f')](_0x1bd5('0x5a')))),_0x1bd5('0x5b')]]})[_0x1bd5('0x40')](handleEntityNotFound(_0x1790af,null))[_0x1bd5('0x40')](respondWithResult(_0x1790af,null))[_0x1bd5('0x48')](handleError(_0x1790af,null));};exports[_0x1bd5('0x60')]=function(_0x195176,_0x393a8f,_0x1ffbab){return db[_0x1bd5('0x61')][_0x1bd5('0x4c')]({'where':{'id':_0x195176[_0x1bd5('0x45')]['id']}})[_0x1bd5('0x40')](handleEntityNotFound(_0x393a8f,null))['then'](function(_0x3bd058){var _0x1d6223;if(_0x3bd058){_0x1d6223=squel[_0x1bd5('0x62')]()[_0x1bd5('0x63')](_0x1bd5('0x64'))[_0x1bd5('0x65')]([_0x1bd5('0x66'),'scheduledAt',_0x1bd5('0x67'),_0x1bd5('0x68'),_0x1bd5('0x69'),_0x1bd5('0x6a'),'updatedAt'],squel[_0x1bd5('0x6b')]()[_0x1bd5('0x6c')](_0x1bd5('0x6d'),_0x1bd5('0x66'))[_0x1bd5('0x6c')](_0x1bd5('0x6e'),_0x1bd5('0x6f'))['field'](_0x1bd5('0x70'),'ContactId')['field'](_0x1bd5('0x71'),'ListId')[_0x1bd5('0x6c')](_0x1bd5('0x72'),'VoiceQueueId')[_0x1bd5('0x6c')](_0x1bd5('0x6e'),_0x1bd5('0x6a'))[_0x1bd5('0x6c')](_0x1bd5('0x6e'),_0x1bd5('0x73'))['from'](_0x1bd5('0x74'))[_0x1bd5('0x39')](_0x1bd5('0x75'),_0x195176[_0x1bd5('0x45')]['id']['toString']())['where'](_0x1bd5('0x76'),_0x195176[_0x1bd5('0x4a')][_0x1bd5('0x77')][_0x1bd5('0x78')]())['where'](_0x1bd5('0x79'))['where']('calleridnum\x20NOT\x20IN\x20(?)',squel[_0x1bd5('0x6b')]()['field'](_0x1bd5('0x66'))[_0x1bd5('0x7a')](_0x1bd5('0x64'))[_0x1bd5('0x39')](_0x1bd5('0x75'),_0x195176[_0x1bd5('0x45')]['id'][_0x1bd5('0x78')]()))[_0x1bd5('0x39')](_0x1bd5('0x7b'),squel['select']()[_0x1bd5('0x6c')]('calleridnum')['from']('cm_hopper_final')[_0x1bd5('0x39')]('VoiceQueueId\x20=\x20?',_0x195176[_0x1bd5('0x45')]['id'][_0x1bd5('0x78')]())[_0x1bd5('0x39')](_0x1bd5('0x7c')))[_0x1bd5('0x7d')](_0x1bd5('0x67')))[_0x1bd5('0x78')]();return db['sequelize'][_0x1bd5('0x2f')](_0x1d6223);}return[];})['then'](respondWithResult(_0x393a8f,null))[_0x1bd5('0x48')](handleError(_0x393a8f,null));};exports[_0x1bd5('0x7e')]=function(_0x7d097,_0x50f2ac,_0x5db61c){return db[_0x1bd5('0x7f')]['find']({'where':{'id':_0x7d097[_0x1bd5('0x45')]['id']}})['then'](handleEntityNotFound(_0x50f2ac,null))[_0x1bd5('0x40')](function(_0x16f996){var _0x248d66;if(_0x16f996){_0x248d66=squel[_0x1bd5('0x62')]()[_0x1bd5('0x63')](_0x1bd5('0x64'))[_0x1bd5('0x65')]([_0x1bd5('0x66'),_0x1bd5('0x6f'),_0x1bd5('0x67'),_0x1bd5('0x68'),_0x1bd5('0x80'),_0x1bd5('0x6a'),_0x1bd5('0x73')],squel['select']()[_0x1bd5('0x6c')](_0x1bd5('0x6d'),_0x1bd5('0x66'))['field'](_0x1bd5('0x6e'),_0x1bd5('0x6f'))['field'](_0x1bd5('0x70'),_0x1bd5('0x67'))[_0x1bd5('0x6c')]('ANY_VALUE(ListId)',_0x1bd5('0x68'))[_0x1bd5('0x6c')](_0x1bd5('0x81'),_0x1bd5('0x80'))['field'](_0x1bd5('0x6e'),_0x1bd5('0x6a'))[_0x1bd5('0x6c')]('NOW()',_0x1bd5('0x73'))[_0x1bd5('0x7a')]('cm_hopper_final')['where'](_0x1bd5('0x82'),_0x7d097[_0x1bd5('0x45')]['id']['toString']())['where'](_0x1bd5('0x76'),_0x7d097['body']['state'][_0x1bd5('0x78')]())['where'](_0x1bd5('0x79'))[_0x1bd5('0x39')]('calleridnum\x20NOT\x20IN\x20(?)',squel[_0x1bd5('0x6b')]()[_0x1bd5('0x6c')](_0x1bd5('0x66'))['from'](_0x1bd5('0x64'))['where'](_0x1bd5('0x82'),_0x7d097[_0x1bd5('0x45')]['id'][_0x1bd5('0x78')]()))[_0x1bd5('0x39')](_0x1bd5('0x7b'),squel['select']()[_0x1bd5('0x6c')]('calleridnum')[_0x1bd5('0x7a')]('cm_hopper_final')['where'](_0x1bd5('0x82'),_0x7d097[_0x1bd5('0x45')]['id'][_0x1bd5('0x78')]())[_0x1bd5('0x39')]('state\x20=\x204'))[_0x1bd5('0x7d')](_0x1bd5('0x67')))[_0x1bd5('0x78')]();return db[_0x1bd5('0x4d')][_0x1bd5('0x2f')](_0x248d66);}return[];})[_0x1bd5('0x40')](respondWithResult(_0x50f2ac,null))[_0x1bd5('0x48')](handleError(_0x50f2ac,null));};exports[_0x1bd5('0x83')]=function(_0x22e1f4,_0x347d06,_0x3cf023){return db[_0x1bd5('0x84')][_0x1bd5('0x85')]({'where':{'VoiceQueueId':_0x22e1f4[_0x1bd5('0x4a')]['VoiceQueueId'],'CampaignId':_0x22e1f4[_0x1bd5('0x4a')][_0x1bd5('0x80')],'ContactId':_0x22e1f4[_0x1bd5('0x4a')][_0x1bd5('0x67')]}})[_0x1bd5('0x40')](handleEntityNotFound(_0x347d06,null))[_0x1bd5('0x40')](function(_0x28f567){if(_0x28f567){return _0x28f567;}return null;})[_0x1bd5('0x40')](respondWithResult(_0x347d06,null))[_0x1bd5('0x48')](handleError(_0x347d06,null));}; \ No newline at end of file diff --git a/server/api/cmHopperFinal/cmHopperFinal.model.js b/server/api/cmHopperFinal/cmHopperFinal.model.js index b06deac..1b29800 100644 --- a/server/api/cmHopperFinal/cmHopperFinal.model.js +++ b/server/api/cmHopperFinal/cmHopperFinal.model.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x8e4f=['cm_hopper_final','calleridnum','uniqueid','lodash','util','api','moment','request-promise','path','rimraf','../../config/environment','exports','define','CmHopperFinal'];(function(_0x30198b,_0x4a489f){var _0x4255b4=function(_0x158f97){while(--_0x158f97){_0x30198b['push'](_0x30198b['shift']());}};_0x4255b4(++_0x4a489f);}(_0x8e4f,0x161));var _0xf8e4=function(_0x33ab41,_0xa2d039){_0x33ab41=_0x33ab41-0x0;var _0x12403d=_0x8e4f[_0x33ab41];return _0x12403d;};'use strict';var _=require(_0xf8e4('0x0'));var util=require(_0xf8e4('0x1'));var logger=require('../../config/logger')(_0xf8e4('0x2'));var moment=require(_0xf8e4('0x3'));var BPromise=require('bluebird');var rp=require(_0xf8e4('0x4'));var fs=require('fs');var path=require(_0xf8e4('0x5'));var rimraf=require(_0xf8e4('0x6'));var config=require(_0xf8e4('0x7'));var attributes=require('./cmHopperFinal.attributes');module[_0xf8e4('0x8')]=function(_0x54355b,_0x29f0b3){return _0x54355b[_0xf8e4('0x9')](_0xf8e4('0xa'),attributes,{'tableName':_0xf8e4('0xb'),'paranoid':![],'indexes':[{'name':'calleridnum','fields':[_0xf8e4('0xc')]},{'name':'uniqueid','fields':[_0xf8e4('0xd')]}],'timestamps':!![]});}; \ No newline at end of file +var _0x7a5c=['../../config/logger','moment','bluebird','request-promise','../../config/environment','exports','define','cm_hopper_final','calleridnum','uniqueid','lodash'];(function(_0x1e1965,_0x55785c){var _0x1a2e96=function(_0x27d366){while(--_0x27d366){_0x1e1965['push'](_0x1e1965['shift']());}};_0x1a2e96(++_0x55785c);}(_0x7a5c,0x1d8));var _0xc7a5=function(_0x382a9c,_0x2ba948){_0x382a9c=_0x382a9c-0x0;var _0x1043ac=_0x7a5c[_0x382a9c];return _0x1043ac;};'use strict';var _=require(_0xc7a5('0x0'));var util=require('util');var logger=require(_0xc7a5('0x1'))('api');var moment=require(_0xc7a5('0x2'));var BPromise=require(_0xc7a5('0x3'));var rp=require(_0xc7a5('0x4'));var fs=require('fs');var path=require('path');var rimraf=require('rimraf');var config=require(_0xc7a5('0x5'));var attributes=require('./cmHopperFinal.attributes');module[_0xc7a5('0x6')]=function(_0x1ee510,_0x44dee4){return _0x1ee510[_0xc7a5('0x7')]('CmHopperFinal',attributes,{'tableName':_0xc7a5('0x8'),'paranoid':![],'indexes':[{'name':_0xc7a5('0x9'),'fields':[_0xc7a5('0x9')]},{'name':'uniqueid','fields':[_0xc7a5('0xa')]}],'timestamps':!![]});}; \ No newline at end of file diff --git a/server/api/cmHopperFinal/cmHopperFinal.rpc.js b/server/api/cmHopperFinal/cmHopperFinal.rpc.js index 276e5ad..8593e69 100644 --- a/server/api/cmHopperFinal/cmHopperFinal.rpc.js +++ b/server/api/cmHopperFinal/cmHopperFinal.rpc.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xb10b=['debug','lodash','moment','bluebird','randomstring','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','http','request','then','info','CmHopperFinal,\x20%s,\x20%s','CmHopperFinal,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','message','result','CreateCmHopperFinal','CmHopperFinal','create','options','raw'];(function(_0x3506c0,_0x18b63d){var _0x389445=function(_0x54e789){while(--_0x54e789){_0x3506c0['push'](_0x3506c0['shift']());}};_0x389445(++_0x18b63d);}(_0xb10b,0x12a));var _0xbb10=function(_0x5f21aa,_0x3b79af){_0x5f21aa=_0x5f21aa-0x0;var _0x3d621c=_0xb10b[_0x5f21aa];return _0x3d621c;};'use strict';var _=require(_0xbb10('0x0'));var util=require('util');var moment=require(_0xbb10('0x1'));var BPromise=require(_0xbb10('0x2'));var rs=require(_0xbb10('0x3'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0xbb10('0x4'))['db'];var utils=require(_0xbb10('0x5'));var logger=require(_0xbb10('0x6'))(_0xbb10('0x7'));var config=require(_0xbb10('0x8'));var jayson=require(_0xbb10('0x9'));var client=jayson['client'][_0xbb10('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x3cdd53,_0x513741,_0x1b9e94){return new BPromise(function(_0x3fb675,_0x21370f){return client[_0xbb10('0xb')](_0x3cdd53,_0x1b9e94)[_0xbb10('0xc')](function(_0x1ce33e){logger[_0xbb10('0xd')](_0xbb10('0xe'),_0x513741,'request\x20sent');logger['debug'](_0xbb10('0xf'),_0x513741,_0xbb10('0x10'),JSON[_0xbb10('0x11')](_0x1ce33e));if(_0x1ce33e['error']){if(_0x1ce33e[_0xbb10('0x12')]['code']===0x1f4){logger[_0xbb10('0x12')](_0xbb10('0xe'),_0x513741,_0x1ce33e[_0xbb10('0x12')][_0xbb10('0x13')]);return _0x21370f(_0x1ce33e[_0xbb10('0x12')][_0xbb10('0x13')]);}logger['error'](_0xbb10('0xe'),_0x513741,_0x1ce33e[_0xbb10('0x12')][_0xbb10('0x13')]);return _0x3fb675(_0x1ce33e[_0xbb10('0x12')][_0xbb10('0x13')]);}else{logger[_0xbb10('0xd')](_0xbb10('0xe'),_0x513741,_0xbb10('0x10'));_0x3fb675(_0x1ce33e[_0xbb10('0x14')][_0xbb10('0x13')]);}})['catch'](function(_0x2eca0f){logger[_0xbb10('0x12')](_0xbb10('0xe'),_0x513741,_0x2eca0f);_0x21370f(_0x2eca0f);});});}exports[_0xbb10('0x15')]=function(_0x378da8){var _0x1682a4=this;return new Promise(function(_0x575cca,_0x30efc6){return db[_0xbb10('0x16')][_0xbb10('0x17')](_0x378da8['body'],{'raw':_0x378da8[_0xbb10('0x18')]?_0x378da8[_0xbb10('0x18')][_0xbb10('0x19')]===undefined?!![]:![]:!![]})[_0xbb10('0xc')](function(_0xdf237d){logger[_0xbb10('0xd')]('CreateCmHopperFinal',_0x378da8);logger[_0xbb10('0x1a')](_0xbb10('0x15'),_0x378da8,JSON['stringify'](_0xdf237d));_0x575cca(_0xdf237d);})['catch'](function(_0x8e2b97){logger[_0xbb10('0x12')](_0xbb10('0x15'),_0x8e2b97[_0xbb10('0x13')],_0x378da8);_0x30efc6(_0x1682a4[_0xbb10('0x12')](0x1f4,_0x8e2b97[_0xbb10('0x13')]));});});}; \ No newline at end of file +var _0xb10b=['debug','lodash','moment','bluebird','randomstring','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','http','request','then','info','CmHopperFinal,\x20%s,\x20%s','CmHopperFinal,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','message','result','CreateCmHopperFinal','CmHopperFinal','create','options','raw'];(function(_0x5a5a6c,_0x590506){var _0x76b539=function(_0x5749e0){while(--_0x5749e0){_0x5a5a6c['push'](_0x5a5a6c['shift']());}};_0x76b539(++_0x590506);}(_0xb10b,0x12a));var _0xbb10=function(_0x53e4fd,_0xe40fa8){_0x53e4fd=_0x53e4fd-0x0;var _0x4df112=_0xb10b[_0x53e4fd];return _0x4df112;};'use strict';var _=require(_0xbb10('0x0'));var util=require('util');var moment=require(_0xbb10('0x1'));var BPromise=require(_0xbb10('0x2'));var rs=require(_0xbb10('0x3'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0xbb10('0x4'))['db'];var utils=require(_0xbb10('0x5'));var logger=require(_0xbb10('0x6'))(_0xbb10('0x7'));var config=require(_0xbb10('0x8'));var jayson=require(_0xbb10('0x9'));var client=jayson['client'][_0xbb10('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x3cdd53,_0x513741,_0x1b9e94){return new BPromise(function(_0x3fb675,_0x21370f){return client[_0xbb10('0xb')](_0x3cdd53,_0x1b9e94)[_0xbb10('0xc')](function(_0x1ce33e){logger[_0xbb10('0xd')](_0xbb10('0xe'),_0x513741,'request\x20sent');logger['debug'](_0xbb10('0xf'),_0x513741,_0xbb10('0x10'),JSON[_0xbb10('0x11')](_0x1ce33e));if(_0x1ce33e['error']){if(_0x1ce33e[_0xbb10('0x12')]['code']===0x1f4){logger[_0xbb10('0x12')](_0xbb10('0xe'),_0x513741,_0x1ce33e[_0xbb10('0x12')][_0xbb10('0x13')]);return _0x21370f(_0x1ce33e[_0xbb10('0x12')][_0xbb10('0x13')]);}logger['error'](_0xbb10('0xe'),_0x513741,_0x1ce33e[_0xbb10('0x12')][_0xbb10('0x13')]);return _0x3fb675(_0x1ce33e[_0xbb10('0x12')][_0xbb10('0x13')]);}else{logger[_0xbb10('0xd')](_0xbb10('0xe'),_0x513741,_0xbb10('0x10'));_0x3fb675(_0x1ce33e[_0xbb10('0x14')][_0xbb10('0x13')]);}})['catch'](function(_0x2eca0f){logger[_0xbb10('0x12')](_0xbb10('0xe'),_0x513741,_0x2eca0f);_0x21370f(_0x2eca0f);});});}exports[_0xbb10('0x15')]=function(_0x378da8){var _0x1682a4=this;return new Promise(function(_0x575cca,_0x30efc6){return db[_0xbb10('0x16')][_0xbb10('0x17')](_0x378da8['body'],{'raw':_0x378da8[_0xbb10('0x18')]?_0x378da8[_0xbb10('0x18')][_0xbb10('0x19')]===undefined?!![]:![]:!![]})[_0xbb10('0xc')](function(_0xdf237d){logger[_0xbb10('0xd')]('CreateCmHopperFinal',_0x378da8);logger[_0xbb10('0x1a')](_0xbb10('0x15'),_0x378da8,JSON['stringify'](_0xdf237d));_0x575cca(_0xdf237d);})['catch'](function(_0x8e2b97){logger[_0xbb10('0x12')](_0xbb10('0x15'),_0x8e2b97[_0xbb10('0x13')],_0x378da8);_0x30efc6(_0x1682a4[_0xbb10('0x12')](0x1f4,_0x8e2b97[_0xbb10('0x13')]));});});}; \ No newline at end of file diff --git a/server/api/cmHopperFinal/index.js b/server/api/cmHopperFinal/index.js index 32776f2..d2bebd8 100644 --- a/server/api/cmHopperFinal/index.js +++ b/server/api/cmHopperFinal/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x9ad7=['isAuthenticated','show','/voice/queue/countAttributes/:id','countContactsQueueCampaignHopperFinal','/campaign/countAttributes/:id','countContactsIvrCampaignHopperFinal','post','/voice/queue/moveContacts/:id','moveContactsQueueCampaignHopperFinal','/voice/campaign/moveContacts/:id','moveContactsIvrCampaignHopperFinal','checkContactHopper','put','/:id','update','exports','multer','util','path','express','Router','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','./cmHopperFinal.controller','get','index','/describe'];(function(_0x33fcbf,_0x5c52a4){var _0x5bafb2=function(_0x34bf74){while(--_0x34bf74){_0x33fcbf['push'](_0x33fcbf['shift']());}};_0x5bafb2(++_0x5c52a4);}(_0x9ad7,0x84));var _0x79ad=function(_0x13d07a,_0x41efc3){_0x13d07a=_0x13d07a-0x0;var _0x5ee0ee=_0x9ad7[_0x13d07a];return _0x5ee0ee;};'use strict';var multer=require(_0x79ad('0x0'));var util=require(_0x79ad('0x1'));var path=require(_0x79ad('0x2'));var timeout=require('connect-timeout');var express=require(_0x79ad('0x3'));var router=express[_0x79ad('0x4')]();var fs_extra=require(_0x79ad('0x5'));var auth=require(_0x79ad('0x6'));var interaction=require(_0x79ad('0x7'));var config=require(_0x79ad('0x8'));var controller=require(_0x79ad('0x9'));router[_0x79ad('0xa')]('/',auth['isAuthenticated'](),controller[_0x79ad('0xb')]);router[_0x79ad('0xa')](_0x79ad('0xc'),auth[_0x79ad('0xd')](),controller['describe']);router[_0x79ad('0xa')]('/:id',auth['isAuthenticated'](),controller[_0x79ad('0xe')]);router[_0x79ad('0xa')](_0x79ad('0xf'),auth['isAuthenticated'](),controller[_0x79ad('0x10')]);router[_0x79ad('0xa')](_0x79ad('0x11'),auth[_0x79ad('0xd')](),controller[_0x79ad('0x12')]);router[_0x79ad('0x13')](_0x79ad('0x14'),auth[_0x79ad('0xd')](),controller[_0x79ad('0x15')]);router['post'](_0x79ad('0x16'),auth[_0x79ad('0xd')](),controller[_0x79ad('0x17')]);router[_0x79ad('0x13')]('/checkContactHopper',auth['isAuthenticated'](),controller[_0x79ad('0x18')]);router[_0x79ad('0x19')](_0x79ad('0x1a'),auth[_0x79ad('0xd')](),controller[_0x79ad('0x1b')]);module[_0x79ad('0x1c')]=router; \ No newline at end of file +var _0xff89=['util','path','connect-timeout','express','Router','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','./cmHopperFinal.controller','get','index','/describe','describe','/:id','isAuthenticated','show','/voice/queue/countAttributes/:id','/campaign/countAttributes/:id','countContactsIvrCampaignHopperFinal','/voice/queue/moveContacts/:id','moveContactsQueueCampaignHopperFinal','/voice/campaign/moveContacts/:id','moveContactsIvrCampaignHopperFinal','/checkContactHopper','checkContactHopper','put','update','exports','multer'];(function(_0x299c35,_0x2cef34){var _0x17e51d=function(_0x3bd9e4){while(--_0x3bd9e4){_0x299c35['push'](_0x299c35['shift']());}};_0x17e51d(++_0x2cef34);}(_0xff89,0x149));var _0x9ff8=function(_0x37b764,_0x309845){_0x37b764=_0x37b764-0x0;var _0x35a1ef=_0xff89[_0x37b764];return _0x35a1ef;};'use strict';var multer=require(_0x9ff8('0x0'));var util=require(_0x9ff8('0x1'));var path=require(_0x9ff8('0x2'));var timeout=require(_0x9ff8('0x3'));var express=require(_0x9ff8('0x4'));var router=express[_0x9ff8('0x5')]();var fs_extra=require(_0x9ff8('0x6'));var auth=require(_0x9ff8('0x7'));var interaction=require(_0x9ff8('0x8'));var config=require(_0x9ff8('0x9'));var controller=require(_0x9ff8('0xa'));router[_0x9ff8('0xb')]('/',auth['isAuthenticated'](),controller[_0x9ff8('0xc')]);router[_0x9ff8('0xb')](_0x9ff8('0xd'),auth['isAuthenticated'](),controller[_0x9ff8('0xe')]);router[_0x9ff8('0xb')](_0x9ff8('0xf'),auth[_0x9ff8('0x10')](),controller[_0x9ff8('0x11')]);router[_0x9ff8('0xb')](_0x9ff8('0x12'),auth[_0x9ff8('0x10')](),controller['countContactsQueueCampaignHopperFinal']);router[_0x9ff8('0xb')](_0x9ff8('0x13'),auth[_0x9ff8('0x10')](),controller[_0x9ff8('0x14')]);router['post'](_0x9ff8('0x15'),auth[_0x9ff8('0x10')](),controller[_0x9ff8('0x16')]);router['post'](_0x9ff8('0x17'),auth[_0x9ff8('0x10')](),controller[_0x9ff8('0x18')]);router['post'](_0x9ff8('0x19'),auth['isAuthenticated'](),controller[_0x9ff8('0x1a')]);router[_0x9ff8('0x1b')](_0x9ff8('0xf'),auth['isAuthenticated'](),controller[_0x9ff8('0x1c')]);module[_0x9ff8('0x1d')]=router; \ No newline at end of file diff --git a/server/api/cmHopperHistory/cmHopperHistory.attributes.js b/server/api/cmHopperHistory/cmHopperHistory.attributes.js index b27b2bf..2d50018 100644 --- a/server/api/cmHopperHistory/cmHopperHistory.attributes.js +++ b/server/api/cmHopperHistory/cmHopperHistory.attributes.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xec28=['sequelize','exports','STRING','DATE','INTEGER','BOOLEAN'];(function(_0x311c35,_0x534915){var _0x5cc50c=function(_0x3ad680){while(--_0x3ad680){_0x311c35['push'](_0x311c35['shift']());}};_0x5cc50c(++_0x534915);}(_0xec28,0x14a));var _0x8ec2=function(_0x43469e,_0x4e69d6){_0x43469e=_0x43469e-0x0;var _0xcefd2a=_0xec28[_0x43469e];return _0xcefd2a;};'use strict';var Sequelize=require(_0x8ec2('0x0'));module[_0x8ec2('0x1')]={'state':{'type':Sequelize['INTEGER'](0x2)},'statedesc':{'type':Sequelize[_0x8ec2('0x2')]},'scheduledat':{'type':Sequelize[_0x8ec2('0x3')]},'countbusyretry':{'type':Sequelize[_0x8ec2('0x4')],'defaultValue':0x0},'countcongestionretry':{'type':Sequelize[_0x8ec2('0x4')],'defaultValue':0x0},'countnoanswerretry':{'type':Sequelize[_0x8ec2('0x4')],'defaultValue':0x0},'countglobal':{'type':Sequelize[_0x8ec2('0x4')],'defaultValue':0x0},'uniqueid':{'type':Sequelize[_0x8ec2('0x2')]},'originatecalleridnum':{'type':Sequelize[_0x8ec2('0x2')]},'originatecalleridname':{'type':Sequelize[_0x8ec2('0x2')]},'calleridnum':{'type':Sequelize[_0x8ec2('0x2')]},'calleridname':{'type':Sequelize[_0x8ec2('0x2')]},'starttime':{'type':Sequelize[_0x8ec2('0x3')]},'responsetime':{'type':Sequelize[_0x8ec2('0x3')]},'answertime':{'type':Sequelize[_0x8ec2('0x3')]},'droptime':{'type':Sequelize[_0x8ec2('0x3')]},'endtime':{'type':Sequelize[_0x8ec2('0x3')]},'ringtime':{'type':Sequelize[_0x8ec2('0x4')],'defaultValue':0x0},'holdtime':{'type':Sequelize[_0x8ec2('0x4')],'defaultValue':0x0},'talktime':{'type':Sequelize[_0x8ec2('0x4')],'defaultValue':0x0},'followuptime':{'type':Sequelize['INTEGER'],'defaultValue':0x0},'dropreason':{'type':Sequelize[_0x8ec2('0x2')]},'campaign':{'type':Sequelize['STRING']},'campaigntype':{'type':Sequelize[_0x8ec2('0x2')]},'membername':{'type':Sequelize[_0x8ec2('0x2')]},'reason':{'type':Sequelize[_0x8ec2('0x2')]},'amd':{'type':Sequelize[_0x8ec2('0x5')],'defaultValue':![]},'fax':{'type':Sequelize[_0x8ec2('0x5')],'defaultValue':![]},'callback':{'type':Sequelize[_0x8ec2('0x5')],'defaultValue':![]},'callbackuniqueid':{'type':Sequelize['STRING'],'defaultValue':null},'callbackat':{'type':Sequelize[_0x8ec2('0x3')]},'recallme':{'type':Sequelize[_0x8ec2('0x5')],'defaultValue':![]},'editedat':{'type':Sequelize[_0x8ec2('0x3')]},'edited':{'type':Sequelize[_0x8ec2('0x5')],'defaultValue':![]},'countnosuchnumberretry':{'type':Sequelize[_0x8ec2('0x4')],'defaultValue':0x0},'countdropretry':{'type':Sequelize[_0x8ec2('0x4')],'defaultValue':0x0},'countabandonedretry':{'type':Sequelize['INTEGER'],'defaultValue':0x0},'countmachineretry':{'type':Sequelize['INTEGER'],'defaultValue':0x0},'countagentrejectretry':{'type':Sequelize[_0x8ec2('0x4')],'defaultValue':0x0},'dialTimezone':{'type':Sequelize['STRING']}}; \ No newline at end of file +var _0x62b8=['STRING','INTEGER','DATE','BOOLEAN','sequelize','exports'];(function(_0x2e914,_0x1c7566){var _0x936e45=function(_0x1b22e4){while(--_0x1b22e4){_0x2e914['push'](_0x2e914['shift']());}};_0x936e45(++_0x1c7566);}(_0x62b8,0x142));var _0x862b=function(_0x207a02,_0x278c56){_0x207a02=_0x207a02-0x0;var _0xd995c3=_0x62b8[_0x207a02];return _0xd995c3;};'use strict';var Sequelize=require(_0x862b('0x0'));module[_0x862b('0x1')]={'state':{'type':Sequelize['INTEGER'](0x2)},'statedesc':{'type':Sequelize[_0x862b('0x2')]},'scheduledat':{'type':Sequelize['DATE']},'countbusyretry':{'type':Sequelize['INTEGER'],'defaultValue':0x0},'countcongestionretry':{'type':Sequelize['INTEGER'],'defaultValue':0x0},'countnoanswerretry':{'type':Sequelize[_0x862b('0x3')],'defaultValue':0x0},'countglobal':{'type':Sequelize[_0x862b('0x3')],'defaultValue':0x0},'uniqueid':{'type':Sequelize[_0x862b('0x2')]},'originatecalleridnum':{'type':Sequelize['STRING']},'originatecalleridname':{'type':Sequelize[_0x862b('0x2')]},'calleridnum':{'type':Sequelize[_0x862b('0x2')]},'calleridname':{'type':Sequelize['STRING']},'starttime':{'type':Sequelize[_0x862b('0x4')]},'responsetime':{'type':Sequelize[_0x862b('0x4')]},'answertime':{'type':Sequelize[_0x862b('0x4')]},'droptime':{'type':Sequelize[_0x862b('0x4')]},'endtime':{'type':Sequelize[_0x862b('0x4')]},'ringtime':{'type':Sequelize[_0x862b('0x3')],'defaultValue':0x0},'holdtime':{'type':Sequelize['INTEGER'],'defaultValue':0x0},'talktime':{'type':Sequelize[_0x862b('0x3')],'defaultValue':0x0},'followuptime':{'type':Sequelize[_0x862b('0x3')],'defaultValue':0x0},'dropreason':{'type':Sequelize[_0x862b('0x2')]},'campaign':{'type':Sequelize['STRING']},'campaigntype':{'type':Sequelize[_0x862b('0x2')]},'membername':{'type':Sequelize[_0x862b('0x2')]},'reason':{'type':Sequelize[_0x862b('0x2')]},'amd':{'type':Sequelize[_0x862b('0x5')],'defaultValue':![]},'fax':{'type':Sequelize[_0x862b('0x5')],'defaultValue':![]},'callback':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'callbackuniqueid':{'type':Sequelize['STRING'],'defaultValue':null},'callbackat':{'type':Sequelize['DATE']},'recallme':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'editedat':{'type':Sequelize[_0x862b('0x4')]},'edited':{'type':Sequelize[_0x862b('0x5')],'defaultValue':![]},'countnosuchnumberretry':{'type':Sequelize[_0x862b('0x3')],'defaultValue':0x0},'countdropretry':{'type':Sequelize[_0x862b('0x3')],'defaultValue':0x0},'countabandonedretry':{'type':Sequelize['INTEGER'],'defaultValue':0x0},'countmachineretry':{'type':Sequelize[_0x862b('0x3')],'defaultValue':0x0},'countagentrejectretry':{'type':Sequelize[_0x862b('0x3')],'defaultValue':0x0},'dialTimezone':{'type':Sequelize['STRING']}}; \ No newline at end of file diff --git a/server/api/cmHopperHistory/cmHopperHistory.controller.js b/server/api/cmHopperHistory/cmHopperHistory.controller.js index 4cb493b..dd79596 100644 --- a/server/api/cmHopperHistory/cmHopperHistory.controller.js +++ b/server/api/cmHopperHistory/cmHopperHistory.controller.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x55d8=['moment','bluebird','mustache','util','path','to-csv','ejs','fs-extra','lodash','squel','jsforce','desk.js','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','api','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','status','end','json','offset','undefined','limit','count','set','Content-Range','apply','reject','save','then','destroy','sendStatus','stack','name','send','index','map','CmHopperHistory','fieldName','type','key','model','query','filters','attributes','intersection','length','hasOwnProperty','nolimit','order','sort','where','pick','filter','merge','includeAll','findAll','rows','catch','params','keys','rawAttributes','fields','include','options','create','body','describe','update','find','eml-format','fast-json-patch','request-promise'];(function(_0x3e6aac,_0x80ccd9){var _0x1b92ea=function(_0x3cd7db){while(--_0x3cd7db){_0x3e6aac['push'](_0x3e6aac['shift']());}};_0x1b92ea(++_0x80ccd9);}(_0x55d8,0xed));var _0x855d=function(_0x2d5a22,_0x151f05){_0x2d5a22=_0x2d5a22-0x0;var _0x35bdd0=_0x55d8[_0x2d5a22];return _0x35bdd0;};'use strict';var emlformat=require(_0x855d('0x0'));var rimraf=require('rimraf');var zipdir=require('zip-dir');var jsonpatch=require(_0x855d('0x1'));var rp=require(_0x855d('0x2'));var moment=require(_0x855d('0x3'));var BPromise=require(_0x855d('0x4'));var Mustache=require(_0x855d('0x5'));var util=require(_0x855d('0x6'));var path=require(_0x855d('0x7'));var sox=require('sox');var csv=require(_0x855d('0x8'));var ejs=require(_0x855d('0x9'));var fs=require('fs');var fs_extra=require(_0x855d('0xa'));var _=require(_0x855d('0xb'));var squel=require(_0x855d('0xc'));var crypto=require('crypto');var jsforce=require(_0x855d('0xd'));var deskjs=require(_0x855d('0xe'));var toCsv=require(_0x855d('0x8'));var querystring=require(_0x855d('0xf'));var Papa=require(_0x855d('0x10'));var Redis=require(_0x855d('0x11'));var authService=require(_0x855d('0x12'));var qs=require(_0x855d('0x13'));var as=require(_0x855d('0x14'));var hardwareService=require(_0x855d('0x15'));var logger=require('../../config/logger')(_0x855d('0x16'));var utils=require(_0x855d('0x17'));var config=require(_0x855d('0x18'));var licenseUtil=require(_0x855d('0x19'));var db=require(_0x855d('0x1a'))['db'];function respondWithStatusCode(_0x5735d5,_0x2485b1){_0x2485b1=_0x2485b1||0xcc;return function(_0x18b323){if(_0x18b323){return _0x5735d5['sendStatus'](_0x2485b1);}return _0x5735d5[_0x855d('0x1b')](_0x2485b1)[_0x855d('0x1c')]();};}function respondWithResult(_0x584d93,_0x881c09){_0x881c09=_0x881c09||0xc8;return function(_0xa814c7){if(_0xa814c7){return _0x584d93[_0x855d('0x1b')](_0x881c09)[_0x855d('0x1d')](_0xa814c7);}};}function respondWithFilteredResult(_0x22c88e,_0x5ba113){return function(_0x36035c){if(_0x36035c){var _0x3155df=typeof _0x5ba113[_0x855d('0x1e')]===_0x855d('0x1f')&&typeof _0x5ba113[_0x855d('0x20')]==='undefined';var _0x1212d1=_0x36035c['count'];var _0xdfcf6=_0x3155df?0x0:_0x5ba113[_0x855d('0x1e')];var _0x52f721=_0x3155df?_0x36035c[_0x855d('0x21')]:_0x5ba113[_0x855d('0x1e')]+_0x5ba113[_0x855d('0x20')];var _0x5dcd63;if(_0x52f721>=_0x1212d1){_0x52f721=_0x1212d1;_0x5dcd63=0xc8;}else{_0x5dcd63=0xce;}_0x22c88e[_0x855d('0x1b')](_0x5dcd63);return _0x22c88e[_0x855d('0x22')](_0x855d('0x23'),_0xdfcf6+'-'+_0x52f721+'/'+_0x1212d1)['json'](_0x36035c);}return null;};}function patchUpdates(_0x1f9abb){return function(_0x534c5d){try{jsonpatch[_0x855d('0x24')](_0x534c5d,_0x1f9abb,!![]);}catch(_0x3d86bc){return BPromise[_0x855d('0x25')](_0x3d86bc);}return _0x534c5d[_0x855d('0x26')]();};}function saveUpdates(_0xdb05d5,_0x41d1e8){return function(_0x1b0982){if(_0x1b0982){return _0x1b0982['update'](_0xdb05d5)[_0x855d('0x27')](function(_0x3d173a){return _0x3d173a;});}return null;};}function removeEntity(_0x5d35a4,_0x39c5df){return function(_0xa8c62a){if(_0xa8c62a){return _0xa8c62a[_0x855d('0x28')]()[_0x855d('0x27')](function(){_0x5d35a4[_0x855d('0x1b')](0xcc)[_0x855d('0x1c')]();});}};}function handleEntityNotFound(_0x4e3345,_0x551569){return function(_0x35bf13){if(!_0x35bf13){_0x4e3345[_0x855d('0x29')](0x194);}return _0x35bf13;};}function handleError(_0x47db4d,_0x4100fe){_0x4100fe=_0x4100fe||0x1f4;return function(_0x390ed9){logger['error'](_0x390ed9[_0x855d('0x2a')]);if(_0x390ed9[_0x855d('0x2b')]){delete _0x390ed9[_0x855d('0x2b')];}_0x47db4d[_0x855d('0x1b')](_0x4100fe)[_0x855d('0x2c')](_0x390ed9);};}exports[_0x855d('0x2d')]=function(_0x4699a9,_0x10311e){var _0x443af6={},_0xa98507={},_0x564b5b={'count':0x0,'rows':[]};var _0x292cec=_[_0x855d('0x2e')](db[_0x855d('0x2f')]['rawAttributes'],function(_0x4c363a){return{'name':_0x4c363a[_0x855d('0x30')],'type':_0x4c363a[_0x855d('0x31')][_0x855d('0x32')]};});_0xa98507[_0x855d('0x33')]=_[_0x855d('0x2e')](_0x292cec,_0x855d('0x2b'));_0xa98507[_0x855d('0x34')]=_['keys'](_0x4699a9[_0x855d('0x34')]);_0xa98507[_0x855d('0x35')]=_['intersection'](_0xa98507[_0x855d('0x33')],_0xa98507[_0x855d('0x34')]);_0x443af6[_0x855d('0x36')]=_[_0x855d('0x37')](_0xa98507['model'],qs['fields'](_0x4699a9['query']['fields']));_0x443af6[_0x855d('0x36')]=_0x443af6[_0x855d('0x36')][_0x855d('0x38')]?_0x443af6['attributes']:_0xa98507['model'];if(!_0x4699a9[_0x855d('0x34')][_0x855d('0x39')](_0x855d('0x3a'))){_0x443af6['limit']=qs[_0x855d('0x20')](_0x4699a9[_0x855d('0x34')]['limit']);_0x443af6[_0x855d('0x1e')]=qs[_0x855d('0x1e')](_0x4699a9[_0x855d('0x34')][_0x855d('0x1e')]);}_0x443af6[_0x855d('0x3b')]=qs[_0x855d('0x3c')](_0x4699a9[_0x855d('0x34')][_0x855d('0x3c')]);_0x443af6[_0x855d('0x3d')]=qs[_0x855d('0x35')](_[_0x855d('0x3e')](_0x4699a9['query'],_0xa98507[_0x855d('0x35')]),_0x292cec);if(_0x4699a9[_0x855d('0x34')][_0x855d('0x3f')]){_0x443af6[_0x855d('0x3d')]=_[_0x855d('0x40')](_0x443af6[_0x855d('0x3d')],{'$or':_['map'](_0x292cec,function(_0xd910d){if(_0xd910d[_0x855d('0x31')]!=='VIRTUAL'){var _0x420c18={};_0x420c18[_0xd910d['name']]={'$like':'%'+_0x4699a9['query'][_0x855d('0x3f')]+'%'};return _0x420c18;}})});}_0x443af6=_[_0x855d('0x40')]({},_0x443af6,_0x4699a9['options']);var _0x38c6ad={'where':_0x443af6[_0x855d('0x3d')]};return db[_0x855d('0x2f')][_0x855d('0x21')](_0x38c6ad)[_0x855d('0x27')](function(_0x564e47){_0x564b5b['count']=_0x564e47;if(_0x4699a9['query'][_0x855d('0x41')]){_0x443af6['include']=[{'all':!![]}];}return db[_0x855d('0x2f')][_0x855d('0x42')](_0x443af6);})[_0x855d('0x27')](function(_0x5a6638){_0x564b5b[_0x855d('0x43')]=_0x5a6638;return _0x564b5b;})[_0x855d('0x27')](respondWithFilteredResult(_0x10311e,_0x443af6))[_0x855d('0x44')](handleError(_0x10311e,null));};exports['show']=function(_0x213383,_0x351b2f){var _0x4ceaaa={'raw':!![],'where':{'id':_0x213383[_0x855d('0x45')]['id']}},_0x5032fb={};_0x5032fb['model']=_[_0x855d('0x46')](db['CmHopperHistory'][_0x855d('0x47')]);_0x5032fb['query']=_[_0x855d('0x46')](_0x213383[_0x855d('0x34')]);_0x5032fb[_0x855d('0x35')]=_[_0x855d('0x37')](_0x5032fb[_0x855d('0x33')],_0x5032fb['query']);_0x4ceaaa[_0x855d('0x36')]=_[_0x855d('0x37')](_0x5032fb['model'],qs['fields'](_0x213383[_0x855d('0x34')][_0x855d('0x48')]));_0x4ceaaa[_0x855d('0x36')]=_0x4ceaaa['attributes'][_0x855d('0x38')]?_0x4ceaaa['attributes']:_0x5032fb[_0x855d('0x33')];if(_0x213383[_0x855d('0x34')][_0x855d('0x41')]){_0x4ceaaa[_0x855d('0x49')]=[{'all':!![]}];}_0x4ceaaa=_['merge']({},_0x4ceaaa,_0x213383[_0x855d('0x4a')]);return db[_0x855d('0x2f')]['find'](_0x4ceaaa)[_0x855d('0x27')](handleEntityNotFound(_0x351b2f,null))[_0x855d('0x27')](respondWithResult(_0x351b2f,null))[_0x855d('0x44')](handleError(_0x351b2f,null));};exports[_0x855d('0x4b')]=function(_0xb0823b,_0x4a2bf6){return db['CmHopperHistory'][_0x855d('0x4b')](_0xb0823b[_0x855d('0x4c')],{})[_0x855d('0x27')](respondWithResult(_0x4a2bf6,0xc9))[_0x855d('0x44')](handleError(_0x4a2bf6,null));};exports[_0x855d('0x4d')]=function(_0x100c2b,_0x259fd0){return db[_0x855d('0x2f')][_0x855d('0x4d')]()[_0x855d('0x27')](respondWithResult(_0x259fd0,null))['catch'](handleError(_0x259fd0,null));};exports[_0x855d('0x4e')]=function(_0x16a148,_0x1b5957){if(_0x16a148[_0x855d('0x4c')]['uniqueid']){delete _0x16a148[_0x855d('0x4c')]['uniqueid'];}return db[_0x855d('0x2f')][_0x855d('0x4f')]({'where':{'uniqueid':_0x16a148['params']['id']}})[_0x855d('0x27')](handleEntityNotFound(_0x1b5957,null))[_0x855d('0x27')](saveUpdates(_0x16a148[_0x855d('0x4c')],null))[_0x855d('0x27')](respondWithResult(_0x1b5957,null))[_0x855d('0x44')](handleError(_0x1b5957,null));}; \ No newline at end of file +var _0x9552=['../../components/auth/service','../../components/parsers/qs','../../config/logger','../../config/utils','../../config/environment','../../mysqldb','sendStatus','status','end','offset','limit','undefined','count','set','json','apply','reject','then','destroy','error','stack','name','send','index','CmHopperHistory','rawAttributes','fieldName','type','key','model','map','query','keys','filters','intersection','attributes','fields','length','hasOwnProperty','sort','where','pick','filter','VIRTUAL','merge','include','findAll','rows','catch','params','includeAll','options','find','create','body','describe','update','uniqueid','eml-format','rimraf','fast-json-patch','moment','bluebird','mustache','path','sox','ejs','fs-extra','lodash','squel','crypto','jsforce','to-csv','querystring','papaparse'];(function(_0x4e508d,_0x201941){var _0x41bef2=function(_0x1571c1){while(--_0x1571c1){_0x4e508d['push'](_0x4e508d['shift']());}};_0x41bef2(++_0x201941);}(_0x9552,0x166));var _0x2955=function(_0x23fe52,_0x522b22){_0x23fe52=_0x23fe52-0x0;var _0x37cdcb=_0x9552[_0x23fe52];return _0x37cdcb;};'use strict';var emlformat=require(_0x2955('0x0'));var rimraf=require(_0x2955('0x1'));var zipdir=require('zip-dir');var jsonpatch=require(_0x2955('0x2'));var rp=require('request-promise');var moment=require(_0x2955('0x3'));var BPromise=require(_0x2955('0x4'));var Mustache=require(_0x2955('0x5'));var util=require('util');var path=require(_0x2955('0x6'));var sox=require(_0x2955('0x7'));var csv=require('to-csv');var ejs=require(_0x2955('0x8'));var fs=require('fs');var fs_extra=require(_0x2955('0x9'));var _=require(_0x2955('0xa'));var squel=require(_0x2955('0xb'));var crypto=require(_0x2955('0xc'));var jsforce=require(_0x2955('0xd'));var deskjs=require('desk.js');var toCsv=require(_0x2955('0xe'));var querystring=require(_0x2955('0xf'));var Papa=require(_0x2955('0x10'));var Redis=require('ioredis');var authService=require(_0x2955('0x11'));var qs=require(_0x2955('0x12'));var as=require('../../components/parsers/advancedSearch');var hardwareService=require('../../config/license/hardware');var logger=require(_0x2955('0x13'))('api');var utils=require(_0x2955('0x14'));var config=require(_0x2955('0x15'));var licenseUtil=require('../../config/license/util');var db=require(_0x2955('0x16'))['db'];function respondWithStatusCode(_0x33aebf,_0xdc4b47){_0xdc4b47=_0xdc4b47||0xcc;return function(_0x276e6a){if(_0x276e6a){return _0x33aebf[_0x2955('0x17')](_0xdc4b47);}return _0x33aebf[_0x2955('0x18')](_0xdc4b47)[_0x2955('0x19')]();};}function respondWithResult(_0x22c433,_0x349ff5){_0x349ff5=_0x349ff5||0xc8;return function(_0x11a828){if(_0x11a828){return _0x22c433[_0x2955('0x18')](_0x349ff5)['json'](_0x11a828);}};}function respondWithFilteredResult(_0x3d26d3,_0x285b14){return function(_0x5859a1){if(_0x5859a1){var _0x406efd=typeof _0x285b14[_0x2955('0x1a')]==='undefined'&&typeof _0x285b14[_0x2955('0x1b')]===_0x2955('0x1c');var _0x24f1f4=_0x5859a1[_0x2955('0x1d')];var _0x6c7855=_0x406efd?0x0:_0x285b14[_0x2955('0x1a')];var _0x3fc854=_0x406efd?_0x5859a1[_0x2955('0x1d')]:_0x285b14[_0x2955('0x1a')]+_0x285b14[_0x2955('0x1b')];var _0x5e2984;if(_0x3fc854>=_0x24f1f4){_0x3fc854=_0x24f1f4;_0x5e2984=0xc8;}else{_0x5e2984=0xce;}_0x3d26d3[_0x2955('0x18')](_0x5e2984);return _0x3d26d3[_0x2955('0x1e')]('Content-Range',_0x6c7855+'-'+_0x3fc854+'/'+_0x24f1f4)[_0x2955('0x1f')](_0x5859a1);}return null;};}function patchUpdates(_0x4d9f1b){return function(_0x328553){try{jsonpatch[_0x2955('0x20')](_0x328553,_0x4d9f1b,!![]);}catch(_0x216d34){return BPromise[_0x2955('0x21')](_0x216d34);}return _0x328553['save']();};}function saveUpdates(_0x41608d,_0x957dfe){return function(_0x57fef8){if(_0x57fef8){return _0x57fef8['update'](_0x41608d)[_0x2955('0x22')](function(_0x2ee8d6){return _0x2ee8d6;});}return null;};}function removeEntity(_0x29768d,_0x2d795f){return function(_0x59a538){if(_0x59a538){return _0x59a538[_0x2955('0x23')]()[_0x2955('0x22')](function(){_0x29768d[_0x2955('0x18')](0xcc)[_0x2955('0x19')]();});}};}function handleEntityNotFound(_0x1dd947,_0x38c356){return function(_0x29e1bf){if(!_0x29e1bf){_0x1dd947[_0x2955('0x17')](0x194);}return _0x29e1bf;};}function handleError(_0x504be8,_0x4b33d6){_0x4b33d6=_0x4b33d6||0x1f4;return function(_0x969175){logger[_0x2955('0x24')](_0x969175[_0x2955('0x25')]);if(_0x969175[_0x2955('0x26')]){delete _0x969175[_0x2955('0x26')];}_0x504be8[_0x2955('0x18')](_0x4b33d6)[_0x2955('0x27')](_0x969175);};}exports[_0x2955('0x28')]=function(_0x2e3aa5,_0x45eb15){var _0x492aad={},_0x565306={},_0x5cf947={'count':0x0,'rows':[]};var _0x35b88a=_['map'](db[_0x2955('0x29')][_0x2955('0x2a')],function(_0x5b8bf3){return{'name':_0x5b8bf3[_0x2955('0x2b')],'type':_0x5b8bf3[_0x2955('0x2c')][_0x2955('0x2d')]};});_0x565306[_0x2955('0x2e')]=_[_0x2955('0x2f')](_0x35b88a,_0x2955('0x26'));_0x565306[_0x2955('0x30')]=_[_0x2955('0x31')](_0x2e3aa5[_0x2955('0x30')]);_0x565306[_0x2955('0x32')]=_[_0x2955('0x33')](_0x565306[_0x2955('0x2e')],_0x565306[_0x2955('0x30')]);_0x492aad[_0x2955('0x34')]=_[_0x2955('0x33')](_0x565306['model'],qs[_0x2955('0x35')](_0x2e3aa5[_0x2955('0x30')][_0x2955('0x35')]));_0x492aad[_0x2955('0x34')]=_0x492aad[_0x2955('0x34')][_0x2955('0x36')]?_0x492aad['attributes']:_0x565306[_0x2955('0x2e')];if(!_0x2e3aa5[_0x2955('0x30')][_0x2955('0x37')]('nolimit')){_0x492aad['limit']=qs['limit'](_0x2e3aa5[_0x2955('0x30')]['limit']);_0x492aad[_0x2955('0x1a')]=qs[_0x2955('0x1a')](_0x2e3aa5['query'][_0x2955('0x1a')]);}_0x492aad['order']=qs['sort'](_0x2e3aa5[_0x2955('0x30')][_0x2955('0x38')]);_0x492aad[_0x2955('0x39')]=qs[_0x2955('0x32')](_[_0x2955('0x3a')](_0x2e3aa5['query'],_0x565306[_0x2955('0x32')]),_0x35b88a);if(_0x2e3aa5['query'][_0x2955('0x3b')]){_0x492aad[_0x2955('0x39')]=_['merge'](_0x492aad[_0x2955('0x39')],{'$or':_[_0x2955('0x2f')](_0x35b88a,function(_0x47b2f2){if(_0x47b2f2[_0x2955('0x2c')]!==_0x2955('0x3c')){var _0x212686={};_0x212686[_0x47b2f2['name']]={'$like':'%'+_0x2e3aa5[_0x2955('0x30')][_0x2955('0x3b')]+'%'};return _0x212686;}})});}_0x492aad=_[_0x2955('0x3d')]({},_0x492aad,_0x2e3aa5['options']);var _0x5931b9={'where':_0x492aad[_0x2955('0x39')]};return db[_0x2955('0x29')]['count'](_0x5931b9)[_0x2955('0x22')](function(_0x1ceec1){_0x5cf947[_0x2955('0x1d')]=_0x1ceec1;if(_0x2e3aa5['query']['includeAll']){_0x492aad[_0x2955('0x3e')]=[{'all':!![]}];}return db[_0x2955('0x29')][_0x2955('0x3f')](_0x492aad);})[_0x2955('0x22')](function(_0x21d64c){_0x5cf947[_0x2955('0x40')]=_0x21d64c;return _0x5cf947;})[_0x2955('0x22')](respondWithFilteredResult(_0x45eb15,_0x492aad))[_0x2955('0x41')](handleError(_0x45eb15,null));};exports['show']=function(_0x3c6645,_0x30d2df){var _0x310cf8={'raw':!![],'where':{'id':_0x3c6645[_0x2955('0x42')]['id']}},_0x1da45d={};_0x1da45d[_0x2955('0x2e')]=_[_0x2955('0x31')](db[_0x2955('0x29')]['rawAttributes']);_0x1da45d['query']=_[_0x2955('0x31')](_0x3c6645[_0x2955('0x30')]);_0x1da45d[_0x2955('0x32')]=_['intersection'](_0x1da45d['model'],_0x1da45d[_0x2955('0x30')]);_0x310cf8['attributes']=_[_0x2955('0x33')](_0x1da45d[_0x2955('0x2e')],qs[_0x2955('0x35')](_0x3c6645[_0x2955('0x30')][_0x2955('0x35')]));_0x310cf8[_0x2955('0x34')]=_0x310cf8['attributes'][_0x2955('0x36')]?_0x310cf8[_0x2955('0x34')]:_0x1da45d[_0x2955('0x2e')];if(_0x3c6645[_0x2955('0x30')][_0x2955('0x43')]){_0x310cf8[_0x2955('0x3e')]=[{'all':!![]}];}_0x310cf8=_[_0x2955('0x3d')]({},_0x310cf8,_0x3c6645[_0x2955('0x44')]);return db['CmHopperHistory'][_0x2955('0x45')](_0x310cf8)[_0x2955('0x22')](handleEntityNotFound(_0x30d2df,null))[_0x2955('0x22')](respondWithResult(_0x30d2df,null))[_0x2955('0x41')](handleError(_0x30d2df,null));};exports['create']=function(_0x4b97a3,_0x2c9fe1){return db[_0x2955('0x29')][_0x2955('0x46')](_0x4b97a3[_0x2955('0x47')],{})['then'](respondWithResult(_0x2c9fe1,0xc9))[_0x2955('0x41')](handleError(_0x2c9fe1,null));};exports[_0x2955('0x48')]=function(_0x45c874,_0x20f75d){return db[_0x2955('0x29')][_0x2955('0x48')]()[_0x2955('0x22')](respondWithResult(_0x20f75d,null))[_0x2955('0x41')](handleError(_0x20f75d,null));};exports[_0x2955('0x49')]=function(_0x310179,_0x13876e){if(_0x310179[_0x2955('0x47')][_0x2955('0x4a')]){delete _0x310179[_0x2955('0x47')][_0x2955('0x4a')];}return db['CmHopperHistory'][_0x2955('0x45')]({'where':{'uniqueid':_0x310179[_0x2955('0x42')]['id']}})[_0x2955('0x22')](handleEntityNotFound(_0x13876e,null))[_0x2955('0x22')](saveUpdates(_0x310179[_0x2955('0x47')],null))[_0x2955('0x22')](respondWithResult(_0x13876e,null))[_0x2955('0x41')](handleError(_0x13876e,null));}; \ No newline at end of file diff --git a/server/api/cmHopperHistory/cmHopperHistory.model.js b/server/api/cmHopperHistory/cmHopperHistory.model.js index 96b8d97..ecf8a99 100644 --- a/server/api/cmHopperHistory/cmHopperHistory.model.js +++ b/server/api/cmHopperHistory/cmHopperHistory.model.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xabad=['lodash','../../config/logger','api','moment','request-promise','path','../../config/environment','./cmHopperHistory.attributes','exports','define','CmHopperHistory','cm_hopper_history','endtime','uniqueid'];(function(_0x5623cb,_0x20b099){var _0x368ce6=function(_0x3439ad){while(--_0x3439ad){_0x5623cb['push'](_0x5623cb['shift']());}};_0x368ce6(++_0x20b099);}(_0xabad,0x150));var _0xdaba=function(_0x2ffc46,_0x35ce3c){_0x2ffc46=_0x2ffc46-0x0;var _0x1eda8f=_0xabad[_0x2ffc46];return _0x1eda8f;};'use strict';var _=require(_0xdaba('0x0'));var util=require('util');var logger=require(_0xdaba('0x1'))(_0xdaba('0x2'));var moment=require(_0xdaba('0x3'));var BPromise=require('bluebird');var rp=require(_0xdaba('0x4'));var fs=require('fs');var path=require(_0xdaba('0x5'));var rimraf=require('rimraf');var config=require(_0xdaba('0x6'));var attributes=require(_0xdaba('0x7'));module[_0xdaba('0x8')]=function(_0x387d02,_0x20fd9f){return _0x387d02[_0xdaba('0x9')](_0xdaba('0xa'),attributes,{'tableName':_0xdaba('0xb'),'paranoid':![],'indexes':[{'name':'endtime','fields':[_0xdaba('0xc')]},{'name':_0xdaba('0xd'),'fields':[_0xdaba('0xd')]}],'timestamps':!![]});}; \ No newline at end of file +var _0x46c1=['CmHopperHistory','cm_hopper_history','endtime','uniqueid','util','../../config/logger','api','moment','bluebird','path','rimraf','../../config/environment','./cmHopperHistory.attributes','exports','define'];(function(_0x4d8c7c,_0x2dd161){var _0x1e1405=function(_0x328aba){while(--_0x328aba){_0x4d8c7c['push'](_0x4d8c7c['shift']());}};_0x1e1405(++_0x2dd161);}(_0x46c1,0x7c));var _0x146c=function(_0x4b1c4d,_0xaa863e){_0x4b1c4d=_0x4b1c4d-0x0;var _0x23a8f9=_0x46c1[_0x4b1c4d];return _0x23a8f9;};'use strict';var _=require('lodash');var util=require(_0x146c('0x0'));var logger=require(_0x146c('0x1'))(_0x146c('0x2'));var moment=require(_0x146c('0x3'));var BPromise=require(_0x146c('0x4'));var rp=require('request-promise');var fs=require('fs');var path=require(_0x146c('0x5'));var rimraf=require(_0x146c('0x6'));var config=require(_0x146c('0x7'));var attributes=require(_0x146c('0x8'));module[_0x146c('0x9')]=function(_0x49f94f,_0x5ae2f3){return _0x49f94f[_0x146c('0xa')](_0x146c('0xb'),attributes,{'tableName':_0x146c('0xc'),'paranoid':![],'indexes':[{'name':'endtime','fields':[_0x146c('0xd')]},{'name':'uniqueid','fields':[_0x146c('0xe')]}],'timestamps':!![]});}; \ No newline at end of file diff --git a/server/api/cmHopperHistory/cmHopperHistory.rpc.js b/server/api/cmHopperHistory/cmHopperHistory.rpc.js index 33fe981..cf369a0 100644 --- a/server/api/cmHopperHistory/cmHopperHistory.rpc.js +++ b/server/api/cmHopperHistory/cmHopperHistory.rpc.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xdfe9=['then','info','CmHopperHistory,\x20%s,\x20%s','request\x20sent','CmHopperHistory,\x20%s,\x20%s,\x20%s','stringify','error','message','CreateCmHopperHistory','CmHopperHistory','create','body','options','raw','debug','AvgHandleTime','where','sequelize','col','predictiveIntervalTotalCalls','COUNT','`state`\x20=\x204,\x201,\x20null','predictiveIntervalAnsweredCalls','literal','`state`\x20=\x2010,\x201,\x20null','`state`\x20=\x2011,\x201,\x20null','AVG','`state`\x20=\x204,\x20`holdtime`,\x20null','predictiveIntervalAvgHoldtime','`state`\x20=\x204,\x20`talktime`,\x20null','predictiveIntervalAvgTalktime','catch','findAll','campaign','name','`state`\x20=\x203,\x201,\x20null','outboundNoAnswerCallsDay','outboundAnswerCallsDay','`state`\x20=\x205,\x201,\x20null','outboundBusyCallsDay','outboundCongestionCallsDay','`state`\x20=\x2010\x20,\x201,\x20null','outboundDropCallsDayTimeout','outboundDropCallsDayCallersExit','outboundUnknownCallsDay','outboundBlacklistCallsDay','`state`\x20=\x2014,\x201,\x20null','outboundOriginateFailureCallsDay','`state`\x20=\x2018,\x201,\x20null','outboundRejectCallsDay','`state`\x20=\x2016,\x201,\x20null','outboundAnswerAgiCallsDay','`state`\x20=\x2020,\x201,\x20null','`state`\x20=\x2022\x20or\x20`state`\x20=\x2023,\x201,\x20null','GetVoiceQueueHopperHistory','ivrTotalCallsDays','GetCampaignHopperHistory','lodash','moment','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','request'];(function(_0x5b0d18,_0x589214){var _0x539609=function(_0xf961ab){while(--_0xf961ab){_0x5b0d18['push'](_0x5b0d18['shift']());}};_0x539609(++_0x589214);}(_0xdfe9,0xc3));var _0x9dfe=function(_0x4eaff7,_0x581c36){_0x4eaff7=_0x4eaff7-0x0;var _0x276e86=_0xdfe9[_0x4eaff7];return _0x276e86;};'use strict';var _=require(_0x9dfe('0x0'));var util=require('util');var moment=require(_0x9dfe('0x1'));var BPromise=require('bluebird');var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x9dfe('0x2'));var db=require(_0x9dfe('0x3'))['db'];var utils=require(_0x9dfe('0x4'));var logger=require(_0x9dfe('0x5'))(_0x9dfe('0x6'));var config=require(_0x9dfe('0x7'));var jayson=require(_0x9dfe('0x8'));var client=jayson[_0x9dfe('0x9')][_0x9dfe('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x3471f0,_0x13b6f8,_0x5e0faf){return new BPromise(function(_0x377c1e,_0xa21ae3){return client[_0x9dfe('0xb')](_0x3471f0,_0x5e0faf)[_0x9dfe('0xc')](function(_0xcd9ecb){logger[_0x9dfe('0xd')](_0x9dfe('0xe'),_0x13b6f8,_0x9dfe('0xf'));logger['debug'](_0x9dfe('0x10'),_0x13b6f8,_0x9dfe('0xf'),JSON[_0x9dfe('0x11')](_0xcd9ecb));if(_0xcd9ecb[_0x9dfe('0x12')]){if(_0xcd9ecb['error']['code']===0x1f4){logger[_0x9dfe('0x12')](_0x9dfe('0xe'),_0x13b6f8,_0xcd9ecb['error']['message']);return _0xa21ae3(_0xcd9ecb['error'][_0x9dfe('0x13')]);}logger[_0x9dfe('0x12')](_0x9dfe('0xe'),_0x13b6f8,_0xcd9ecb[_0x9dfe('0x12')][_0x9dfe('0x13')]);return _0x377c1e(_0xcd9ecb[_0x9dfe('0x12')][_0x9dfe('0x13')]);}else{logger[_0x9dfe('0xd')](_0x9dfe('0xe'),_0x13b6f8,'request\x20sent');_0x377c1e(_0xcd9ecb['result'][_0x9dfe('0x13')]);}})['catch'](function(_0x1a7cbe){logger[_0x9dfe('0x12')](_0x9dfe('0xe'),_0x13b6f8,_0x1a7cbe);_0xa21ae3(_0x1a7cbe);});});}exports[_0x9dfe('0x14')]=function(_0x15e32b){var _0x1bddd4=this;return new Promise(function(_0x5c7158,_0x270796){return db[_0x9dfe('0x15')][_0x9dfe('0x16')](_0x15e32b[_0x9dfe('0x17')],{'raw':_0x15e32b[_0x9dfe('0x18')]?_0x15e32b[_0x9dfe('0x18')][_0x9dfe('0x19')]===undefined?!![]:![]:!![]})[_0x9dfe('0xc')](function(_0x439cd4){logger[_0x9dfe('0xd')](_0x9dfe('0x14'),_0x15e32b);logger[_0x9dfe('0x1a')](_0x9dfe('0x14'),_0x15e32b,JSON[_0x9dfe('0x11')](_0x439cd4));_0x5c7158(_0x439cd4);})['catch'](function(_0x484f22){logger[_0x9dfe('0x12')](_0x9dfe('0x14'),_0x484f22[_0x9dfe('0x13')],_0x15e32b);_0x270796(_0x1bddd4[_0x9dfe('0x12')](0x1f4,_0x484f22[_0x9dfe('0x13')]));});});};exports[_0x9dfe('0x1b')]=function(_0x3354b7){var _0x361e5e=this;return new Promise(function(_0x3538bb,_0xf7fc28){return db[_0x9dfe('0x15')]['findAll']({'raw':_0x3354b7['options']?_0x3354b7[_0x9dfe('0x18')][_0x9dfe('0x19')]===undefined?!![]:![]:!![],'where':_0x3354b7['options']?_0x3354b7[_0x9dfe('0x18')][_0x9dfe('0x1c')]||null:null,'attributes':[[db[_0x9dfe('0x1d')]['fn']('COUNT',db[_0x9dfe('0x1d')][_0x9dfe('0x1e')]('id')),_0x9dfe('0x1f')],[db[_0x9dfe('0x1d')]['fn'](_0x9dfe('0x20'),db['sequelize']['fn']('IF',db[_0x9dfe('0x1d')]['literal'](_0x9dfe('0x21')))),_0x9dfe('0x22')],[db[_0x9dfe('0x1d')]['fn'](_0x9dfe('0x20'),db[_0x9dfe('0x1d')]['fn']('IF',db[_0x9dfe('0x1d')][_0x9dfe('0x23')](_0x9dfe('0x24')))),'predictiveIntervalDroppedCallsTimeout'],[db['sequelize']['fn'](_0x9dfe('0x20'),db['sequelize']['fn']('IF',db[_0x9dfe('0x1d')][_0x9dfe('0x23')](_0x9dfe('0x25')))),'predictiveIntervalDroppedCallsCallersExit'],[db[_0x9dfe('0x1d')]['fn'](_0x9dfe('0x26'),db['sequelize']['fn']('IF',db['sequelize'][_0x9dfe('0x23')](_0x9dfe('0x27')))),_0x9dfe('0x28')],[db[_0x9dfe('0x1d')]['fn']('AVG',db[_0x9dfe('0x1d')]['fn']('IF',db[_0x9dfe('0x1d')][_0x9dfe('0x23')](_0x9dfe('0x29')))),_0x9dfe('0x2a')]]})['then'](function(_0x2747fd){logger[_0x9dfe('0xd')](_0x9dfe('0x1b'),_0x3354b7);logger[_0x9dfe('0x1a')](_0x9dfe('0x1b'),_0x3354b7,JSON[_0x9dfe('0x11')](_0x2747fd));_0x3538bb(_0x2747fd);})[_0x9dfe('0x2b')](function(_0x55a6c4){logger[_0x9dfe('0x12')](_0x9dfe('0x1b'),_0x55a6c4[_0x9dfe('0x13')],_0x3354b7);_0xf7fc28(_0x361e5e[_0x9dfe('0x12')](0x1f4,_0x55a6c4[_0x9dfe('0x13')]));});});};exports['GetVoiceQueueHopperHistory']=function(_0x31db7f){var _0x153868=this;return new Promise(function(_0x547c93,_0x2edf05){return db['CmHopperHistory'][_0x9dfe('0x2c')]({'raw':_0x31db7f[_0x9dfe('0x18')]?_0x31db7f[_0x9dfe('0x18')][_0x9dfe('0x19')]===undefined?!![]:![]:!![],'where':_0x31db7f[_0x9dfe('0x18')]?_0x31db7f['options']['where']||null:null,'attributes':[[_0x9dfe('0x2d'),_0x9dfe('0x2e')],[db['sequelize']['fn'](_0x9dfe('0x20'),db['sequelize']['fn']('IF',db[_0x9dfe('0x1d')]['literal']('`state`\x20=\x200,\x201,\x20null'))),'outboundNoSuchCallsDay'],[db[_0x9dfe('0x1d')]['fn']('COUNT',db['sequelize']['fn']('IF',db[_0x9dfe('0x1d')]['literal'](_0x9dfe('0x2f')))),_0x9dfe('0x30')],[db[_0x9dfe('0x1d')]['fn'](_0x9dfe('0x20'),db[_0x9dfe('0x1d')]['fn']('IF',db[_0x9dfe('0x1d')][_0x9dfe('0x23')](_0x9dfe('0x21')))),_0x9dfe('0x31')],[db[_0x9dfe('0x1d')]['fn'](_0x9dfe('0x20'),db[_0x9dfe('0x1d')]['fn']('IF',db[_0x9dfe('0x1d')][_0x9dfe('0x23')](_0x9dfe('0x32')))),_0x9dfe('0x33')],[db[_0x9dfe('0x1d')]['fn'](_0x9dfe('0x20'),db[_0x9dfe('0x1d')]['fn']('IF',db[_0x9dfe('0x1d')]['literal']('`state`\x20=\x208,\x201,\x20null'))),_0x9dfe('0x34')],[db['sequelize']['fn']('COUNT',db[_0x9dfe('0x1d')]['fn']('IF',db[_0x9dfe('0x1d')][_0x9dfe('0x23')](_0x9dfe('0x35')))),_0x9dfe('0x36')],[db[_0x9dfe('0x1d')]['fn'](_0x9dfe('0x20'),db[_0x9dfe('0x1d')]['fn']('IF',db[_0x9dfe('0x1d')][_0x9dfe('0x23')]('`state`\x20=\x2011\x20,\x201,\x20null'))),_0x9dfe('0x37')],[db[_0x9dfe('0x1d')]['fn'](_0x9dfe('0x20'),db[_0x9dfe('0x1d')]['fn']('IF',db[_0x9dfe('0x1d')][_0x9dfe('0x23')]('`state`\x20=\x2012,\x201,\x20null'))),_0x9dfe('0x38')],[db[_0x9dfe('0x1d')]['fn'](_0x9dfe('0x20'),db[_0x9dfe('0x1d')]['fn']('IF',db[_0x9dfe('0x1d')][_0x9dfe('0x23')]('`state`\x20=\x2013,\x201,\x20null'))),_0x9dfe('0x39')],[db[_0x9dfe('0x1d')]['fn'](_0x9dfe('0x20'),db[_0x9dfe('0x1d')]['fn']('IF',db[_0x9dfe('0x1d')][_0x9dfe('0x23')](_0x9dfe('0x3a')))),_0x9dfe('0x3b')],[db[_0x9dfe('0x1d')]['fn'](_0x9dfe('0x20'),db[_0x9dfe('0x1d')]['fn']('IF',db[_0x9dfe('0x1d')][_0x9dfe('0x23')](_0x9dfe('0x3c')))),_0x9dfe('0x3d')],[db['sequelize']['fn'](_0x9dfe('0x20'),db[_0x9dfe('0x1d')]['fn']('IF',db['sequelize']['literal'](_0x9dfe('0x3e')))),_0x9dfe('0x3f')],[db['sequelize']['fn']('COUNT',db['sequelize']['fn']('IF',db[_0x9dfe('0x1d')][_0x9dfe('0x23')](_0x9dfe('0x40')))),_0x9dfe('0x3d')],[db['sequelize']['fn'](_0x9dfe('0x20'),db[_0x9dfe('0x1d')]['fn']('IF',db[_0x9dfe('0x1d')][_0x9dfe('0x23')](_0x9dfe('0x41')))),'outboundReCallsDay']],'group':[_0x9dfe('0x2d')]})[_0x9dfe('0xc')](function(_0x5a1f13){logger[_0x9dfe('0xd')](_0x9dfe('0x42'),_0x31db7f);logger['debug'](_0x9dfe('0x42'),_0x31db7f,JSON[_0x9dfe('0x11')](_0x5a1f13));_0x547c93(_0x5a1f13);})[_0x9dfe('0x2b')](function(_0x5b2d25){logger[_0x9dfe('0x12')](_0x9dfe('0x42'),_0x5b2d25['message'],_0x31db7f);_0x2edf05(_0x153868['error'](0x1f4,_0x5b2d25[_0x9dfe('0x13')]));});});};exports['GetCampaignHopperHistory']=function(_0x589b68){var _0xa70ba3=this;return new Promise(function(_0x349c71,_0x14ef32){return db['CmHopperHistory']['findAll']({'raw':_0x589b68[_0x9dfe('0x18')]?_0x589b68[_0x9dfe('0x18')][_0x9dfe('0x19')]===undefined?!![]:![]:!![],'where':_0x589b68[_0x9dfe('0x18')]?_0x589b68[_0x9dfe('0x18')][_0x9dfe('0x1c')]||null:null,'attributes':[[_0x9dfe('0x2d'),'name'],[db[_0x9dfe('0x1d')]['fn'](_0x9dfe('0x20'),db[_0x9dfe('0x1d')]['col']('id')),_0x9dfe('0x43')],[db['sequelize']['fn'](_0x9dfe('0x20'),db[_0x9dfe('0x1d')]['fn']('IF',db[_0x9dfe('0x1d')][_0x9dfe('0x23')](_0x9dfe('0x21')))),'ivrAnswerCallsDay']],'group':[_0x9dfe('0x2d')]})[_0x9dfe('0xc')](function(_0x1fa4d9){logger[_0x9dfe('0xd')](_0x9dfe('0x44'),_0x589b68);logger[_0x9dfe('0x1a')](_0x9dfe('0x44'),_0x589b68,JSON[_0x9dfe('0x11')](_0x1fa4d9));_0x349c71(_0x1fa4d9);})[_0x9dfe('0x2b')](function(_0x4455fc){logger[_0x9dfe('0x12')]('GetCampaignHopperHistory',_0x4455fc[_0x9dfe('0x13')],_0x589b68);_0x14ef32(_0xa70ba3['error'](0x1f4,_0x4455fc['message']));});});}; \ No newline at end of file +var _0x7dc2=['jayson/promise','http','request','then','CmHopperHistory,\x20%s,\x20%s','debug','CmHopperHistory,\x20%s,\x20%s,\x20%s','request\x20sent','error','code','message','info','result','CreateCmHopperHistory','CmHopperHistory','create','body','options','raw','findAll','where','COUNT','sequelize','col','predictiveIntervalTotalCalls','literal','`state`\x20=\x204,\x201,\x20null','predictiveIntervalAnsweredCalls','`state`\x20=\x2010,\x201,\x20null','predictiveIntervalDroppedCallsTimeout','predictiveIntervalDroppedCallsCallersExit','AVG','`state`\x20=\x204,\x20`holdtime`,\x20null','predictiveIntervalAvgHoldtime','`state`\x20=\x204,\x20`talktime`,\x20null','AvgHandleTime','catch','GetVoiceQueueHopperHistory','campaign','name','`state`\x20=\x200,\x201,\x20null','outboundNoSuchCallsDay','outboundNoAnswerCallsDay','outboundCongestionCallsDay','`state`\x20=\x2010\x20,\x201,\x20null','`state`\x20=\x2011\x20,\x201,\x20null','outboundDropCallsDayCallersExit','`state`\x20=\x2012,\x201,\x20null','outboundUnknownCallsDay','`state`\x20=\x2013,\x201,\x20null','outboundBlacklistCallsDay','`state`\x20=\x2014,\x201,\x20null','`state`\x20=\x2018,\x201,\x20null','`state`\x20=\x2016,\x201,\x20null','outboundAnswerAgiCallsDay','`state`\x20=\x2020,\x201,\x20null','outboundRejectCallsDay','`state`\x20=\x2022\x20or\x20`state`\x20=\x2023,\x201,\x20null','outboundReCallsDay','stringify','GetCampaignHopperHistory','ivrTotalCallsDays','ivrAnswerCallsDay','moment','bluebird','randomstring','ioredis','../../config/utils','../../config/logger','../../config/environment'];(function(_0x308408,_0x37d440){var _0x9dc073=function(_0x29f0c9){while(--_0x29f0c9){_0x308408['push'](_0x308408['shift']());}};_0x9dc073(++_0x37d440);}(_0x7dc2,0x19d));var _0x27dc=function(_0x20a584,_0xe384a5){_0x20a584=_0x20a584-0x0;var _0x4b41a8=_0x7dc2[_0x20a584];return _0x4b41a8;};'use strict';var _=require('lodash');var util=require('util');var moment=require(_0x27dc('0x0'));var BPromise=require(_0x27dc('0x1'));var rs=require(_0x27dc('0x2'));var fs=require('fs');var Redis=require(_0x27dc('0x3'));var db=require('../../mysqldb')['db'];var utils=require(_0x27dc('0x4'));var logger=require(_0x27dc('0x5'))('rpc');var config=require(_0x27dc('0x6'));var jayson=require(_0x27dc('0x7'));var client=jayson['client'][_0x27dc('0x8')]({'port':0x232a});function respondWithRpcPromise(_0x4d2e10,_0x95bbb6,_0x3b3eee){return new BPromise(function(_0x5181ab,_0x45aa07){return client[_0x27dc('0x9')](_0x4d2e10,_0x3b3eee)[_0x27dc('0xa')](function(_0x242997){logger['info'](_0x27dc('0xb'),_0x95bbb6,'request\x20sent');logger[_0x27dc('0xc')](_0x27dc('0xd'),_0x95bbb6,_0x27dc('0xe'),JSON['stringify'](_0x242997));if(_0x242997['error']){if(_0x242997[_0x27dc('0xf')][_0x27dc('0x10')]===0x1f4){logger[_0x27dc('0xf')](_0x27dc('0xb'),_0x95bbb6,_0x242997['error'][_0x27dc('0x11')]);return _0x45aa07(_0x242997['error'][_0x27dc('0x11')]);}logger['error'](_0x27dc('0xb'),_0x95bbb6,_0x242997[_0x27dc('0xf')][_0x27dc('0x11')]);return _0x5181ab(_0x242997[_0x27dc('0xf')]['message']);}else{logger[_0x27dc('0x12')](_0x27dc('0xb'),_0x95bbb6,_0x27dc('0xe'));_0x5181ab(_0x242997[_0x27dc('0x13')][_0x27dc('0x11')]);}})['catch'](function(_0x3ff8f8){logger[_0x27dc('0xf')](_0x27dc('0xb'),_0x95bbb6,_0x3ff8f8);_0x45aa07(_0x3ff8f8);});});}exports[_0x27dc('0x14')]=function(_0x5d308b){var _0x5ecb19=this;return new Promise(function(_0x1ff9a2,_0x225b2c){return db[_0x27dc('0x15')][_0x27dc('0x16')](_0x5d308b[_0x27dc('0x17')],{'raw':_0x5d308b[_0x27dc('0x18')]?_0x5d308b[_0x27dc('0x18')][_0x27dc('0x19')]===undefined?!![]:![]:!![]})[_0x27dc('0xa')](function(_0x5064d5){logger[_0x27dc('0x12')](_0x27dc('0x14'),_0x5d308b);logger['debug'](_0x27dc('0x14'),_0x5d308b,JSON['stringify'](_0x5064d5));_0x1ff9a2(_0x5064d5);})['catch'](function(_0x2843b1){logger['error'](_0x27dc('0x14'),_0x2843b1['message'],_0x5d308b);_0x225b2c(_0x5ecb19['error'](0x1f4,_0x2843b1[_0x27dc('0x11')]));});});};exports['AvgHandleTime']=function(_0x37917e){var _0x506130=this;return new Promise(function(_0x38640d,_0x1eb83d){return db[_0x27dc('0x15')][_0x27dc('0x1a')]({'raw':_0x37917e['options']?_0x37917e[_0x27dc('0x18')]['raw']===undefined?!![]:![]:!![],'where':_0x37917e['options']?_0x37917e[_0x27dc('0x18')][_0x27dc('0x1b')]||null:null,'attributes':[[db['sequelize']['fn'](_0x27dc('0x1c'),db[_0x27dc('0x1d')][_0x27dc('0x1e')]('id')),_0x27dc('0x1f')],[db[_0x27dc('0x1d')]['fn'](_0x27dc('0x1c'),db[_0x27dc('0x1d')]['fn']('IF',db[_0x27dc('0x1d')][_0x27dc('0x20')](_0x27dc('0x21')))),_0x27dc('0x22')],[db['sequelize']['fn'](_0x27dc('0x1c'),db[_0x27dc('0x1d')]['fn']('IF',db['sequelize'][_0x27dc('0x20')](_0x27dc('0x23')))),_0x27dc('0x24')],[db[_0x27dc('0x1d')]['fn']('COUNT',db[_0x27dc('0x1d')]['fn']('IF',db[_0x27dc('0x1d')][_0x27dc('0x20')]('`state`\x20=\x2011,\x201,\x20null'))),_0x27dc('0x25')],[db[_0x27dc('0x1d')]['fn'](_0x27dc('0x26'),db[_0x27dc('0x1d')]['fn']('IF',db['sequelize'][_0x27dc('0x20')](_0x27dc('0x27')))),_0x27dc('0x28')],[db['sequelize']['fn'](_0x27dc('0x26'),db[_0x27dc('0x1d')]['fn']('IF',db[_0x27dc('0x1d')][_0x27dc('0x20')](_0x27dc('0x29')))),'predictiveIntervalAvgTalktime']]})[_0x27dc('0xa')](function(_0x416a15){logger[_0x27dc('0x12')](_0x27dc('0x2a'),_0x37917e);logger[_0x27dc('0xc')]('AvgHandleTime',_0x37917e,JSON['stringify'](_0x416a15));_0x38640d(_0x416a15);})[_0x27dc('0x2b')](function(_0x35fbda){logger[_0x27dc('0xf')](_0x27dc('0x2a'),_0x35fbda['message'],_0x37917e);_0x1eb83d(_0x506130['error'](0x1f4,_0x35fbda[_0x27dc('0x11')]));});});};exports[_0x27dc('0x2c')]=function(_0x9b49b5){var _0x55ac93=this;return new Promise(function(_0x1059d1,_0x5c7e6b){return db[_0x27dc('0x15')]['findAll']({'raw':_0x9b49b5[_0x27dc('0x18')]?_0x9b49b5[_0x27dc('0x18')][_0x27dc('0x19')]===undefined?!![]:![]:!![],'where':_0x9b49b5[_0x27dc('0x18')]?_0x9b49b5[_0x27dc('0x18')][_0x27dc('0x1b')]||null:null,'attributes':[[_0x27dc('0x2d'),_0x27dc('0x2e')],[db['sequelize']['fn'](_0x27dc('0x1c'),db[_0x27dc('0x1d')]['fn']('IF',db['sequelize'][_0x27dc('0x20')](_0x27dc('0x2f')))),_0x27dc('0x30')],[db['sequelize']['fn'](_0x27dc('0x1c'),db[_0x27dc('0x1d')]['fn']('IF',db[_0x27dc('0x1d')][_0x27dc('0x20')]('`state`\x20=\x203,\x201,\x20null'))),_0x27dc('0x31')],[db[_0x27dc('0x1d')]['fn'](_0x27dc('0x1c'),db[_0x27dc('0x1d')]['fn']('IF',db[_0x27dc('0x1d')][_0x27dc('0x20')]('`state`\x20=\x204,\x201,\x20null'))),'outboundAnswerCallsDay'],[db['sequelize']['fn'](_0x27dc('0x1c'),db[_0x27dc('0x1d')]['fn']('IF',db[_0x27dc('0x1d')][_0x27dc('0x20')]('`state`\x20=\x205,\x201,\x20null'))),'outboundBusyCallsDay'],[db[_0x27dc('0x1d')]['fn']('COUNT',db[_0x27dc('0x1d')]['fn']('IF',db[_0x27dc('0x1d')][_0x27dc('0x20')]('`state`\x20=\x208,\x201,\x20null'))),_0x27dc('0x32')],[db[_0x27dc('0x1d')]['fn'](_0x27dc('0x1c'),db[_0x27dc('0x1d')]['fn']('IF',db['sequelize'][_0x27dc('0x20')](_0x27dc('0x33')))),'outboundDropCallsDayTimeout'],[db[_0x27dc('0x1d')]['fn'](_0x27dc('0x1c'),db[_0x27dc('0x1d')]['fn']('IF',db[_0x27dc('0x1d')][_0x27dc('0x20')](_0x27dc('0x34')))),_0x27dc('0x35')],[db[_0x27dc('0x1d')]['fn'](_0x27dc('0x1c'),db['sequelize']['fn']('IF',db[_0x27dc('0x1d')]['literal'](_0x27dc('0x36')))),_0x27dc('0x37')],[db[_0x27dc('0x1d')]['fn'](_0x27dc('0x1c'),db[_0x27dc('0x1d')]['fn']('IF',db['sequelize'][_0x27dc('0x20')](_0x27dc('0x38')))),_0x27dc('0x39')],[db[_0x27dc('0x1d')]['fn'](_0x27dc('0x1c'),db[_0x27dc('0x1d')]['fn']('IF',db[_0x27dc('0x1d')][_0x27dc('0x20')](_0x27dc('0x3a')))),'outboundOriginateFailureCallsDay'],[db['sequelize']['fn'](_0x27dc('0x1c'),db[_0x27dc('0x1d')]['fn']('IF',db['sequelize'][_0x27dc('0x20')](_0x27dc('0x3b')))),'outboundRejectCallsDay'],[db['sequelize']['fn']('COUNT',db[_0x27dc('0x1d')]['fn']('IF',db['sequelize']['literal'](_0x27dc('0x3c')))),_0x27dc('0x3d')],[db[_0x27dc('0x1d')]['fn']('COUNT',db[_0x27dc('0x1d')]['fn']('IF',db[_0x27dc('0x1d')]['literal'](_0x27dc('0x3e')))),_0x27dc('0x3f')],[db['sequelize']['fn'](_0x27dc('0x1c'),db[_0x27dc('0x1d')]['fn']('IF',db[_0x27dc('0x1d')][_0x27dc('0x20')](_0x27dc('0x40')))),_0x27dc('0x41')]],'group':['campaign']})[_0x27dc('0xa')](function(_0x32143a){logger['info'](_0x27dc('0x2c'),_0x9b49b5);logger[_0x27dc('0xc')]('GetVoiceQueueHopperHistory',_0x9b49b5,JSON[_0x27dc('0x42')](_0x32143a));_0x1059d1(_0x32143a);})['catch'](function(_0x32ee93){logger[_0x27dc('0xf')]('GetVoiceQueueHopperHistory',_0x32ee93[_0x27dc('0x11')],_0x9b49b5);_0x5c7e6b(_0x55ac93[_0x27dc('0xf')](0x1f4,_0x32ee93[_0x27dc('0x11')]));});});};exports[_0x27dc('0x43')]=function(_0x5af93a){var _0x4c133c=this;return new Promise(function(_0x2f0c69,_0x312982){return db['CmHopperHistory'][_0x27dc('0x1a')]({'raw':_0x5af93a['options']?_0x5af93a[_0x27dc('0x18')][_0x27dc('0x19')]===undefined?!![]:![]:!![],'where':_0x5af93a['options']?_0x5af93a[_0x27dc('0x18')][_0x27dc('0x1b')]||null:null,'attributes':[[_0x27dc('0x2d'),_0x27dc('0x2e')],[db['sequelize']['fn'](_0x27dc('0x1c'),db[_0x27dc('0x1d')][_0x27dc('0x1e')]('id')),_0x27dc('0x44')],[db[_0x27dc('0x1d')]['fn'](_0x27dc('0x1c'),db[_0x27dc('0x1d')]['fn']('IF',db[_0x27dc('0x1d')][_0x27dc('0x20')](_0x27dc('0x21')))),_0x27dc('0x45')]],'group':[_0x27dc('0x2d')]})[_0x27dc('0xa')](function(_0x7e47a5){logger[_0x27dc('0x12')](_0x27dc('0x43'),_0x5af93a);logger['debug'](_0x27dc('0x43'),_0x5af93a,JSON['stringify'](_0x7e47a5));_0x2f0c69(_0x7e47a5);})[_0x27dc('0x2b')](function(_0x193121){logger['error'](_0x27dc('0x43'),_0x193121['message'],_0x5af93a);_0x312982(_0x4c133c['error'](0x1f4,_0x193121[_0x27dc('0x11')]));});});}; \ No newline at end of file diff --git a/server/api/cmHopperHistory/index.js b/server/api/cmHopperHistory/index.js index 593bdc6..c128f02 100644 --- a/server/api/cmHopperHistory/index.js +++ b/server/api/cmHopperHistory/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x04f7=['isAuthenticated','index','/describe','show','post','create','put','exports','multer','util','path','connect-timeout','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','./cmHopperHistory.controller','get'];(function(_0x3f526d,_0x40d4f4){var _0x204bbd=function(_0x193d59){while(--_0x193d59){_0x3f526d['push'](_0x3f526d['shift']());}};_0x204bbd(++_0x40d4f4);}(_0x04f7,0x14c));var _0x704f=function(_0x7cd389,_0x50cacc){_0x7cd389=_0x7cd389-0x0;var _0x1456e0=_0x04f7[_0x7cd389];return _0x1456e0;};'use strict';var multer=require(_0x704f('0x0'));var util=require(_0x704f('0x1'));var path=require(_0x704f('0x2'));var timeout=require(_0x704f('0x3'));var express=require('express');var router=express['Router']();var fs_extra=require(_0x704f('0x4'));var auth=require(_0x704f('0x5'));var interaction=require(_0x704f('0x6'));var config=require(_0x704f('0x7'));var controller=require(_0x704f('0x8'));router[_0x704f('0x9')]('/',auth[_0x704f('0xa')](),controller[_0x704f('0xb')]);router[_0x704f('0x9')](_0x704f('0xc'),auth[_0x704f('0xa')](),controller['describe']);router['get']('/:id',auth[_0x704f('0xa')](),controller[_0x704f('0xd')]);router[_0x704f('0xe')]('/',auth[_0x704f('0xa')](),controller[_0x704f('0xf')]);router[_0x704f('0x10')]('/:id',auth['isAuthenticated'](),controller['update']);module[_0x704f('0x11')]=router; \ No newline at end of file +var _0x9d39=['util','path','connect-timeout','Router','fs-extra','../../components/auth/service','../../components/interaction/service','isAuthenticated','get','/describe','/:id','show','post','create','update','exports','multer'];(function(_0x2f7a54,_0x5d2d9a){var _0x371ae7=function(_0x12bdda){while(--_0x12bdda){_0x2f7a54['push'](_0x2f7a54['shift']());}};_0x371ae7(++_0x5d2d9a);}(_0x9d39,0x1a8));var _0x99d3=function(_0x2641f9,_0x26715f){_0x2641f9=_0x2641f9-0x0;var _0x585741=_0x9d39[_0x2641f9];return _0x585741;};'use strict';var multer=require(_0x99d3('0x0'));var util=require(_0x99d3('0x1'));var path=require(_0x99d3('0x2'));var timeout=require(_0x99d3('0x3'));var express=require('express');var router=express[_0x99d3('0x4')]();var fs_extra=require(_0x99d3('0x5'));var auth=require(_0x99d3('0x6'));var interaction=require(_0x99d3('0x7'));var config=require('../../config/environment');var controller=require('./cmHopperHistory.controller');router['get']('/',auth[_0x99d3('0x8')](),controller['index']);router[_0x99d3('0x9')](_0x99d3('0xa'),auth[_0x99d3('0x8')](),controller['describe']);router[_0x99d3('0x9')](_0x99d3('0xb'),auth[_0x99d3('0x8')](),controller[_0x99d3('0xc')]);router[_0x99d3('0xd')]('/',auth['isAuthenticated'](),controller[_0x99d3('0xe')]);router['put'](_0x99d3('0xb'),auth[_0x99d3('0x8')](),controller[_0x99d3('0xf')]);module[_0x99d3('0x10')]=router; \ No newline at end of file diff --git a/server/api/cmList/cmList.attributes.js b/server/api/cmList/cmList.attributes.js index 38bace4..cdf3231 100644 --- a/server/api/cmList/cmList.attributes.js +++ b/server/api/cmList/cmList.attributes.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xc978=['name','sequelize','exports','STRING'];(function(_0x4b369d,_0x265eb8){var _0x571a98=function(_0x56341a){while(--_0x56341a){_0x4b369d['push'](_0x4b369d['shift']());}};_0x571a98(++_0x265eb8);}(_0xc978,0xcd));var _0x8c97=function(_0x20a584,_0xe384a5){_0x20a584=_0x20a584-0x0;var _0x4b41a8=_0xc978[_0x20a584];return _0x4b41a8;};'use strict';var Sequelize=require(_0x8c97('0x0'));module[_0x8c97('0x1')]={'name':{'type':Sequelize[_0x8c97('0x2')],'unique':_0x8c97('0x3'),'allowNull':![],'validate':{'notEmpty':!![]}},'description':{'type':Sequelize[_0x8c97('0x2')]},'dialPrefix':{'type':Sequelize[_0x8c97('0x2')]}}; \ No newline at end of file +var _0x740a=['name','sequelize','exports','STRING'];(function(_0x387022,_0x30888c){var _0x414c5c=function(_0xbd6f1d){while(--_0xbd6f1d){_0x387022['push'](_0x387022['shift']());}};_0x414c5c(++_0x30888c);}(_0x740a,0x175));var _0xa740=function(_0x3d0b46,_0x154936){_0x3d0b46=_0x3d0b46-0x0;var _0x4db38a=_0x740a[_0x3d0b46];return _0x4db38a;};'use strict';var Sequelize=require(_0xa740('0x0'));module[_0xa740('0x1')]={'name':{'type':Sequelize[_0xa740('0x2')],'unique':_0xa740('0x3'),'allowNull':![],'validate':{'notEmpty':!![]}},'description':{'type':Sequelize[_0xa740('0x2')]},'dialPrefix':{'type':Sequelize[_0xa740('0x2')]}}; \ No newline at end of file diff --git a/server/api/cmList/cmList.controller.js b/server/api/cmList/cmList.controller.js index 69354e1..602a926 100644 --- a/server/api/cmList/cmList.controller.js +++ b/server/api/cmList/cmList.controller.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x561c=['count','set','Content-Range','apply','update','then','destroy','get','UserProfileResource','sendStatus','name','send','index','map','CmList','rawAttributes','key','model','query','keys','filters','intersection','attributes','fields','length','hasOwnProperty','nolimit','order','sort','where','pick','filter','merge','type','VIRTUAL','include','findAll','rows','catch','show','params','includeAll','options','find','create','body','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','user','Lists','userProfileId','autoAssociation','error','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','describe','addDisposition','ListId','Disposition','getDispositions','removeDispositions','ids','addContacts','tags','isArray','join','omit','push','dataValues','message','json','Malformed\x20request\x20syntax','getContacts','CustomFields','CmContact','format','cf_%d','raw','getContactsCsv','ContactItemType','OrderBy','CmCustomField','alias','select','cm_contacts','c.ListId\x20=\x20?','c.deletedAt\x20is\x20null','field','c.cf_','customField_','from','ItemTypeId\x20=\x20?','CmContactId\x20=\x20c.id','description','cm_contact_has_items','description_additionalPhone_','toString','isEmpty','now','writeFileSync','/tmp/list_%d_%s.csv','setHeader','Content-disposition','attachment;\x20filename=','list_%d_%s.csv','Content-type','text/csv','download','addCustomField','findOne','transaction','addCustomFields','Sequelize','TEXT','text','number','BOOLEAN','defaultValue','queryInterface','getCustomFields','findAndCountAll','getGlobalCustomFields','addAgents','spread','emit','removeAgents','userCmList:remove','getAgents','User','info','sequelize','eml-format','zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','util','path','sox','to-csv','ejs','fs-extra','lodash','squel','jsforce','desk.js','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../config/logger','api','../../config/environment','../../mysqldb','redis','defaults','localhost','socket.io-emitter','./cmList.socket','register','end','status','offset','undefined','limit'];(function(_0x35885a,_0x42fed7){var _0xe86249=function(_0x98edb3){while(--_0x98edb3){_0x35885a['push'](_0x35885a['shift']());}};_0xe86249(++_0x42fed7);}(_0x561c,0x82));var _0xc561=function(_0x22a90f,_0x1094c7){_0x22a90f=_0x22a90f-0x0;var _0xa36038=_0x561c[_0x22a90f];return _0xa36038;};'use strict';var emlformat=require(_0xc561('0x0'));var rimraf=require('rimraf');var zipdir=require(_0xc561('0x1'));var jsonpatch=require(_0xc561('0x2'));var rp=require(_0xc561('0x3'));var moment=require(_0xc561('0x4'));var BPromise=require(_0xc561('0x5'));var Mustache=require(_0xc561('0x6'));var util=require(_0xc561('0x7'));var path=require(_0xc561('0x8'));var sox=require(_0xc561('0x9'));var csv=require(_0xc561('0xa'));var ejs=require(_0xc561('0xb'));var fs=require('fs');var fs_extra=require(_0xc561('0xc'));var _=require(_0xc561('0xd'));var squel=require(_0xc561('0xe'));var crypto=require('crypto');var jsforce=require(_0xc561('0xf'));var deskjs=require(_0xc561('0x10'));var toCsv=require('to-csv');var querystring=require('querystring');var Papa=require(_0xc561('0x11'));var Redis=require(_0xc561('0x12'));var authService=require(_0xc561('0x13'));var qs=require(_0xc561('0x14'));var as=require('../../components/parsers/advancedSearch');var hardwareService=require('../../config/license/hardware');var logger=require(_0xc561('0x15'))(_0xc561('0x16'));var utils=require('../../config/utils');var config=require(_0xc561('0x17'));var licenseUtil=require('../../config/license/util');var db=require(_0xc561('0x18'))['db'];var csv_results;config[_0xc561('0x19')]=_[_0xc561('0x1a')](config[_0xc561('0x19')],{'host':_0xc561('0x1b'),'port':0x18eb});var socket=require(_0xc561('0x1c'))(new Redis(config[_0xc561('0x19')]));require(_0xc561('0x1d'))[_0xc561('0x1e')](socket);function respondWithStatusCode(_0x12c571,_0xc83def){_0xc83def=_0xc83def||0xcc;return function(_0x4db3){if(_0x4db3){return _0x12c571['sendStatus'](_0xc83def);}return _0x12c571['status'](_0xc83def)[_0xc561('0x1f')]();};}function respondWithResult(_0x3a663b,_0x33564b){_0x33564b=_0x33564b||0xc8;return function(_0x6d4ca4){if(_0x6d4ca4){return _0x3a663b[_0xc561('0x20')](_0x33564b)['json'](_0x6d4ca4);}};}function respondWithFilteredResult(_0x1a0c53,_0x113c1f){return function(_0xb25899){if(_0xb25899){var _0xc0a7df=typeof _0x113c1f[_0xc561('0x21')]===_0xc561('0x22')&&typeof _0x113c1f[_0xc561('0x23')]==='undefined';var _0x235ff0=_0xb25899[_0xc561('0x24')];var _0x56950a=_0xc0a7df?0x0:_0x113c1f[_0xc561('0x21')];var _0x114b6c=_0xc0a7df?_0xb25899[_0xc561('0x24')]:_0x113c1f['offset']+_0x113c1f[_0xc561('0x23')];var _0x1883ff;if(_0x114b6c>=_0x235ff0){_0x114b6c=_0x235ff0;_0x1883ff=0xc8;}else{_0x1883ff=0xce;}_0x1a0c53[_0xc561('0x20')](_0x1883ff);return _0x1a0c53[_0xc561('0x25')](_0xc561('0x26'),_0x56950a+'-'+_0x114b6c+'/'+_0x235ff0)['json'](_0xb25899);}return null;};}function patchUpdates(_0x26e5c7){return function(_0x482d20){try{jsonpatch[_0xc561('0x27')](_0x482d20,_0x26e5c7,!![]);}catch(_0x11ee41){return BPromise['reject'](_0x11ee41);}return _0x482d20['save']();};}function saveUpdates(_0x1a0728,_0x5c7a94){return function(_0x275a40){if(_0x275a40){return _0x275a40[_0xc561('0x28')](_0x1a0728)[_0xc561('0x29')](function(_0x3bc2c0){return _0x3bc2c0;});}return null;};}function removeEntity(_0x278829,_0x57e128){return function(_0x2c608a){if(_0x2c608a){return _0x2c608a[_0xc561('0x2a')]()[_0xc561('0x29')](function(){var _0x55c865=_0x2c608a[_0xc561('0x2b')]({'plain':!![]});var _0x1c31d0='Lists';return db[_0xc561('0x2c')][_0xc561('0x2a')]({'where':{'type':_0x1c31d0,'resourceId':_0x55c865['id']}})[_0xc561('0x29')](function(){return _0x2c608a;});})['then'](function(){_0x278829[_0xc561('0x20')](0xcc)['end']();});}};}function handleEntityNotFound(_0x3b32ca,_0x19ad64){return function(_0xf67ed){if(!_0xf67ed){_0x3b32ca[_0xc561('0x2d')](0x194);}return _0xf67ed;};}function handleError(_0x513a65,_0x37544e){_0x37544e=_0x37544e||0x1f4;return function(_0x525115){logger['error'](_0x525115['stack']);if(_0x525115[_0xc561('0x2e')]){delete _0x525115['name'];}_0x513a65[_0xc561('0x20')](_0x37544e)[_0xc561('0x2f')](_0x525115);};}exports[_0xc561('0x30')]=function(_0x17bde0,_0x3e3568){var _0x1e1760={},_0x156afa={},_0xd9c84={'count':0x0,'rows':[]};var _0x555dba=_[_0xc561('0x31')](db[_0xc561('0x32')][_0xc561('0x33')],function(_0x3da5e0){return{'name':_0x3da5e0['fieldName'],'type':_0x3da5e0['type'][_0xc561('0x34')]};});_0x156afa[_0xc561('0x35')]=_['map'](_0x555dba,_0xc561('0x2e'));_0x156afa[_0xc561('0x36')]=_[_0xc561('0x37')](_0x17bde0[_0xc561('0x36')]);_0x156afa[_0xc561('0x38')]=_[_0xc561('0x39')](_0x156afa[_0xc561('0x35')],_0x156afa['query']);_0x1e1760[_0xc561('0x3a')]=_[_0xc561('0x39')](_0x156afa['model'],qs['fields'](_0x17bde0[_0xc561('0x36')][_0xc561('0x3b')]));_0x1e1760[_0xc561('0x3a')]=_0x1e1760[_0xc561('0x3a')][_0xc561('0x3c')]?_0x1e1760[_0xc561('0x3a')]:_0x156afa[_0xc561('0x35')];if(!_0x17bde0[_0xc561('0x36')][_0xc561('0x3d')](_0xc561('0x3e'))){_0x1e1760[_0xc561('0x23')]=qs[_0xc561('0x23')](_0x17bde0['query'][_0xc561('0x23')]);_0x1e1760['offset']=qs[_0xc561('0x21')](_0x17bde0[_0xc561('0x36')][_0xc561('0x21')]);}_0x1e1760[_0xc561('0x3f')]=qs[_0xc561('0x40')](_0x17bde0[_0xc561('0x36')][_0xc561('0x40')]);_0x1e1760[_0xc561('0x41')]=qs['filters'](_[_0xc561('0x42')](_0x17bde0[_0xc561('0x36')],_0x156afa[_0xc561('0x38')]),_0x555dba);if(_0x17bde0['query'][_0xc561('0x43')]){_0x1e1760['where']=_[_0xc561('0x44')](_0x1e1760[_0xc561('0x41')],{'$or':_[_0xc561('0x31')](_0x555dba,function(_0x2381e8){if(_0x2381e8[_0xc561('0x45')]!==_0xc561('0x46')){var _0x572cd3={};_0x572cd3[_0x2381e8[_0xc561('0x2e')]]={'$like':'%'+_0x17bde0[_0xc561('0x36')][_0xc561('0x43')]+'%'};return _0x572cd3;}})});}_0x1e1760=_['merge']({},_0x1e1760,_0x17bde0['options']);var _0x5aeba1={'where':_0x1e1760['where']};return db['CmList']['count'](_0x5aeba1)[_0xc561('0x29')](function(_0x5aef77){_0xd9c84[_0xc561('0x24')]=_0x5aef77;if(_0x17bde0[_0xc561('0x36')]['includeAll']){_0x1e1760[_0xc561('0x47')]=[{'all':!![]}];}return db[_0xc561('0x32')][_0xc561('0x48')](_0x1e1760);})[_0xc561('0x29')](function(_0x40d2b6){_0xd9c84[_0xc561('0x49')]=_0x40d2b6;return _0xd9c84;})[_0xc561('0x29')](respondWithFilteredResult(_0x3e3568,_0x1e1760))[_0xc561('0x4a')](handleError(_0x3e3568,null));};exports[_0xc561('0x4b')]=function(_0x10d59a,_0x10fa36){var _0x44b86e={'raw':![],'where':{'id':_0x10d59a[_0xc561('0x4c')]['id']}},_0x3e69ce={};_0x3e69ce[_0xc561('0x35')]=_['keys'](db['CmList'][_0xc561('0x33')]);_0x3e69ce[_0xc561('0x36')]=_[_0xc561('0x37')](_0x10d59a[_0xc561('0x36')]);_0x3e69ce[_0xc561('0x38')]=_[_0xc561('0x39')](_0x3e69ce[_0xc561('0x35')],_0x3e69ce['query']);_0x44b86e[_0xc561('0x3a')]=_[_0xc561('0x39')](_0x3e69ce[_0xc561('0x35')],qs[_0xc561('0x3b')](_0x10d59a[_0xc561('0x36')][_0xc561('0x3b')]));_0x44b86e[_0xc561('0x3a')]=_0x44b86e[_0xc561('0x3a')][_0xc561('0x3c')]?_0x44b86e[_0xc561('0x3a')]:_0x3e69ce['model'];if(_0x10d59a[_0xc561('0x36')][_0xc561('0x4d')]){_0x44b86e[_0xc561('0x47')]=[{'all':!![]}];}_0x44b86e=_[_0xc561('0x44')]({},_0x44b86e,_0x10d59a[_0xc561('0x4e')]);return db[_0xc561('0x32')][_0xc561('0x4f')](_0x44b86e)[_0xc561('0x29')](handleEntityNotFound(_0x10fa36,null))[_0xc561('0x29')](respondWithResult(_0x10fa36,null))[_0xc561('0x4a')](handleError(_0x10fa36,null));};exports[_0xc561('0x50')]=function(_0x340312,_0x42530c){return db[_0xc561('0x32')][_0xc561('0x50')](_0x340312[_0xc561('0x51')],{})['then'](function(_0x320d14){var _0x1fcd0d=_0x340312['user'][_0xc561('0x2b')]({'plain':!![]});if(!_0x1fcd0d)throw new Error(_0xc561('0x52'));if(_0x1fcd0d[_0xc561('0x53')]===_0xc561('0x54')){var _0x54f947=_0x320d14[_0xc561('0x2b')]({'plain':!![]});var _0xb08cb0=_0xc561('0x55');return db['UserProfileSection'][_0xc561('0x4f')]({'where':{'name':_0xb08cb0,'userProfileId':_0x1fcd0d[_0xc561('0x56')]},'raw':!![]})[_0xc561('0x29')](function(_0x50cf4d){if(_0x50cf4d&&_0x50cf4d[_0xc561('0x57')]===0x0){return db[_0xc561('0x2c')][_0xc561('0x50')]({'name':_0x54f947[_0xc561('0x2e')],'resourceId':_0x54f947['id'],'type':_0x50cf4d[_0xc561('0x2e')],'sectionId':_0x50cf4d['id']},{})[_0xc561('0x29')](function(){return _0x320d14;});}else{return _0x320d14;}})[_0xc561('0x4a')](function(_0x2d7b6e){logger[_0xc561('0x58')](_0xc561('0x59'),_0x2d7b6e);throw _0x2d7b6e;});}return _0x320d14;})[_0xc561('0x29')](respondWithResult(_0x42530c,0xc9))['catch'](handleError(_0x42530c,null));};exports[_0xc561('0x28')]=function(_0x4d644d,_0x1237cc){if(_0x4d644d[_0xc561('0x51')]['id']){delete _0x4d644d['body']['id'];}return db[_0xc561('0x32')][_0xc561('0x4f')]({'where':{'id':_0x4d644d[_0xc561('0x4c')]['id']}})['then'](handleEntityNotFound(_0x1237cc,null))[_0xc561('0x29')](saveUpdates(_0x4d644d[_0xc561('0x51')],null))[_0xc561('0x29')](respondWithResult(_0x1237cc,null))[_0xc561('0x4a')](handleError(_0x1237cc,null));};exports['destroy']=function(_0x6e7dd,_0x39ea33){return db[_0xc561('0x32')]['find']({'where':{'id':_0x6e7dd['params']['id']}})[_0xc561('0x29')](handleEntityNotFound(_0x39ea33,null))[_0xc561('0x29')](removeEntity(_0x39ea33,null))[_0xc561('0x4a')](handleError(_0x39ea33,null));};exports[_0xc561('0x5a')]=function(_0x6dbcb1,_0x5b39ad){return db[_0xc561('0x32')][_0xc561('0x5a')]()[_0xc561('0x29')](respondWithResult(_0x5b39ad,null))[_0xc561('0x4a')](handleError(_0x5b39ad,null));};exports[_0xc561('0x5b')]=function(_0x12594a,_0x3833ef,_0x2fc8bd){if(_0x12594a[_0xc561('0x51')]['id']){delete _0x12594a[_0xc561('0x51')]['id'];}return db[_0xc561('0x32')][_0xc561('0x4f')]({'where':{'id':_0x12594a[_0xc561('0x4c')]['id']}})[_0xc561('0x29')](handleEntityNotFound(_0x3833ef,null))['then'](function(_0x56e8fc){if(_0x56e8fc){_0x12594a[_0xc561('0x51')][_0xc561('0x5c')]=_0x56e8fc['id'];return db[_0xc561('0x5d')]['create'](_0x12594a[_0xc561('0x51')]);}})[_0xc561('0x29')](respondWithResult(_0x3833ef,null))[_0xc561('0x4a')](handleError(_0x3833ef,null));};exports[_0xc561('0x5e')]=function(_0x56d27f,_0x31181c,_0x3d18b1){var _0x4fd2d8={'raw':![],'where':{}};var _0x53e67f={};var _0x594375={'count':0x0,'rows':[]};return db[_0xc561('0x32')]['findOne']({'where':{'id':_0x56d27f['params']['id']}})[_0xc561('0x29')](handleEntityNotFound(_0x31181c,null))[_0xc561('0x29')](function(_0x550a52){if(_0x550a52){_0x53e67f[_0xc561('0x35')]=_['keys'](db[_0xc561('0x5d')][_0xc561('0x33')]);_0x53e67f[_0xc561('0x36')]=_[_0xc561('0x37')](_0x56d27f['query']);_0x53e67f['filters']=_[_0xc561('0x39')](_0x53e67f[_0xc561('0x35')],_0x53e67f['query']);_0x4fd2d8[_0xc561('0x3a')]=_['intersection'](_0x53e67f[_0xc561('0x35')],qs['fields'](_0x56d27f[_0xc561('0x36')][_0xc561('0x3b')]));_0x4fd2d8[_0xc561('0x3a')]=_0x4fd2d8[_0xc561('0x3a')][_0xc561('0x3c')]?_0x4fd2d8[_0xc561('0x3a')]:_0x53e67f[_0xc561('0x35')];if(!_0x56d27f[_0xc561('0x36')]['hasOwnProperty']('nolimit')){_0x4fd2d8[_0xc561('0x23')]=qs['limit'](_0x56d27f['query'][_0xc561('0x23')]);_0x4fd2d8[_0xc561('0x21')]=qs['offset'](_0x56d27f['query']['offset']);}_0x4fd2d8[_0xc561('0x3f')]=qs[_0xc561('0x40')](_0x56d27f[_0xc561('0x36')][_0xc561('0x40')]);_0x4fd2d8[_0xc561('0x41')]=qs[_0xc561('0x38')](_['pick'](_0x56d27f[_0xc561('0x36')],_0x53e67f[_0xc561('0x38')]));_0x4fd2d8[_0xc561('0x41')][_0xc561('0x5c')]=_0x550a52['id'];if(_0x56d27f[_0xc561('0x36')][_0xc561('0x43')]){_0x4fd2d8[_0xc561('0x41')]=_[_0xc561('0x44')](_0x4fd2d8[_0xc561('0x41')],{'$or':_['map'](_0x4fd2d8['attributes'],function(_0x4a0cea){var _0x1bd2cf={};_0x1bd2cf[_0x4a0cea]={'$like':'%'+_0x56d27f['query'][_0xc561('0x43')]+'%'};return _0x1bd2cf;})});}_0x4fd2d8=_[_0xc561('0x44')]({},_0x4fd2d8,_0x56d27f['options']);return db[_0xc561('0x5d')][_0xc561('0x24')]({'where':_0x4fd2d8[_0xc561('0x41')]})[_0xc561('0x29')](function(_0x2beafd){_0x594375[_0xc561('0x24')]=_0x2beafd;if(_0x56d27f[_0xc561('0x36')][_0xc561('0x4d')]){_0x4fd2d8[_0xc561('0x47')]=[{'all':!![]}];}return db[_0xc561('0x5d')][_0xc561('0x48')](_0x4fd2d8);})[_0xc561('0x29')](function(_0x313818){_0x594375[_0xc561('0x49')]=_0x313818;return _0x594375;});}})['then'](respondWithFilteredResult(_0x31181c,_0x4fd2d8))['catch'](handleError(_0x31181c,null));};exports['removeDispositions']=function(_0x24e20e,_0x544fbc,_0x2bef9f){return db[_0xc561('0x32')]['find']({'where':{'id':_0x24e20e[_0xc561('0x4c')]['id']}})['then'](handleEntityNotFound(_0x544fbc,null))['then'](function(_0x13c0af){if(_0x13c0af){return _0x13c0af[_0xc561('0x5f')](_0x24e20e[_0xc561('0x36')][_0xc561('0x60')]);}})[_0xc561('0x29')](respondWithStatusCode(_0x544fbc,null))['catch'](handleError(_0x544fbc,null));};exports[_0xc561('0x61')]=function(_0x48b9b5,_0x43ff26,_0x233373){return db[_0xc561('0x32')][_0xc561('0x4f')]({'where':{'id':_0x48b9b5['params']['id']}})[_0xc561('0x29')](handleEntityNotFound(_0x43ff26,null))[_0xc561('0x29')](function(_0x305d27){if(_0x305d27){var _0x26c7fb=[];var _0x3e6c3b={'success':[],'errors':[]};return db['CmContact'][_0xc561('0x5a')]()[_0xc561('0x29')](function(_0x57b3d9){if(_0x48b9b5[_0xc561('0x51')][_0xc561('0x62')]&&_[_0xc561('0x63')](_0x48b9b5['body'][_0xc561('0x62')])){if(_0x48b9b5[_0xc561('0x51')][_0xc561('0x62')]['length']){_0x48b9b5[_0xc561('0x51')][_0xc561('0x62')]=_0x48b9b5['body'][_0xc561('0x62')][_0xc561('0x64')](';')+';';}else{_0x48b9b5[_0xc561('0x51')][_0xc561('0x62')]=null;}}else{_0x48b9b5['body']['tags']=null;}if(_0x48b9b5[_0xc561('0x51')]&&_[_0xc561('0x63')](_0x48b9b5[_0xc561('0x51')])){for(var _0x2922bc=0x0;_0x2922bc<_0x48b9b5['body'][_0xc561('0x3c')];_0x2922bc+=0x1){_0x48b9b5['body'][_0x2922bc]['ListId']=_0x48b9b5['params']['id'];_0x26c7fb['push'](_0x48b9b5[_0xc561('0x51')][_0x2922bc]);}return BPromise['each'](_0x26c7fb,function(_0x40c99f){return db['CmContact'][_0xc561('0x50')](_[_0xc561('0x65')](_0x40c99f,['ids','id'])||{},{'fields':_[_0xc561('0x37')](_0x57b3d9),'raw':!![]})[_0xc561('0x29')](function(_0x10c737){_0x3e6c3b['success'][_0xc561('0x66')](_0x10c737[_0xc561('0x67')]);})[_0xc561('0x4a')](function(_0x4c8e8a){_0x3e6c3b['errors'][_0xc561('0x66')]({'data':_0x40c99f,'error':_0x4c8e8a[_0xc561('0x68')]});});})[_0xc561('0x29')](function(_0x3b0224){return _0x3e6c3b;})['catch'](function(_0x144205){return _0x144205;});}else{_0x43ff26[_0xc561('0x20')](0x190)[_0xc561('0x69')]({'message':_0xc561('0x6a')});}});}})['then'](respondWithResult(_0x43ff26,null))[_0xc561('0x4a')](handleError(_0x43ff26,null));};exports[_0xc561('0x6b')]=function(_0x1e3fbe,_0x2628ce,_0x1759e0){var _0x1b3845;return db['CmList']['find']({'where':{'id':_0x1e3fbe[_0xc561('0x4c')]['id']},'include':[{'model':db['CmCustomField'],'as':_0xc561('0x6c')}]})[_0xc561('0x29')](handleEntityNotFound(_0x2628ce,null))[_0xc561('0x29')](function(_0x303d25){if(_0x303d25){_0x1b3845=_0x303d25;return db[_0xc561('0x6d')][_0xc561('0x33')];}})['then'](function(_0x3146fe){if(_0x3146fe){var _0x19cef1={};var _0x41f130={};_0x41f130['model']=_['concat'](_[_0xc561('0x37')](_0x3146fe),_[_0xc561('0x31')](_0x1b3845[_0xc561('0x6c')],function(_0x2fcefc){return util[_0xc561('0x6e')](_0xc561('0x6f'),_0x2fcefc['id']);}));_0x41f130['query']=_[_0xc561('0x37')](_0x1e3fbe[_0xc561('0x36')]);_0x41f130['filters']=_['intersection'](_0x41f130[_0xc561('0x35')],_0x41f130[_0xc561('0x36')]);_0x19cef1['attributes']=_[_0xc561('0x39')](_0x41f130[_0xc561('0x35')],qs['fields'](_0x1e3fbe[_0xc561('0x36')][_0xc561('0x3b')]));_0x19cef1['attributes']=_0x19cef1[_0xc561('0x3a')][_0xc561('0x3c')]?_0x19cef1[_0xc561('0x3a')]:_0x41f130['model'];if(!_0x1e3fbe[_0xc561('0x36')][_0xc561('0x3d')]('nolimit')){_0x19cef1[_0xc561('0x23')]=qs['limit'](_0x1e3fbe['query'][_0xc561('0x23')]);_0x19cef1[_0xc561('0x21')]=qs[_0xc561('0x21')](_0x1e3fbe[_0xc561('0x36')]['offset']);}_0x19cef1[_0xc561('0x3f')]=qs[_0xc561('0x40')](_0x1e3fbe[_0xc561('0x36')][_0xc561('0x40')]);_0x19cef1[_0xc561('0x41')]=qs[_0xc561('0x38')](_[_0xc561('0x42')](_0x1e3fbe[_0xc561('0x36')],_0x41f130['filters']));_0x19cef1[_0xc561('0x70')]=!![];if(_0x1e3fbe['query'][_0xc561('0x43')]){_0x19cef1[_0xc561('0x41')]=_['merge'](_0x19cef1[_0xc561('0x41')],{'$or':_[_0xc561('0x31')](_0x19cef1[_0xc561('0x3a')],function(_0xe6c749){var _0x148808={};_0x148808[_0xe6c749]={'$like':'%'+_0x1e3fbe['query'][_0xc561('0x43')]+'%'};return _0x148808;})});}_0x19cef1=_[_0xc561('0x44')]({},_0x19cef1,_0x1e3fbe[_0xc561('0x4e')]);return _0x1b3845[_0xc561('0x6b')](_0x19cef1);}})[_0xc561('0x29')](respondWithResult(_0x2628ce,null))[_0xc561('0x4a')](handleError(_0x2628ce,null));};exports[_0xc561('0x71')]=function(_0x1f693f,_0x33baa1,_0x2cfb69){var _0x11195f;var _0x21dd3f;var _0x1b44cf;var _0x338b6b=_0x1f693f[_0xc561('0x4c')]['id'];csv_results=[];return db[_0xc561('0x72')][_0xc561('0x48')]({'attributes':['id',_0xc561('0x2e')],'raw':!![],'order':[_0xc561('0x73')]})['then'](function(_0x4e1a21){_0x11195f=_0x4e1a21;var _0x50a4fd=_[_0xc561('0x37')](db['CmContact'][_0xc561('0x33')]);return db[_0xc561('0x74')]['findAll']({'raw':!![],'attributes':['id',_0xc561('0x75')]})['then'](function(_0x3590bb){_0x21dd3f=_0x3590bb;var _0x177d92=squel[_0xc561('0x76')]()['fields'](_0x50a4fd)['from'](_0xc561('0x77'),'c')[_0xc561('0x41')](_0xc561('0x78'),_0x338b6b)[_0xc561('0x41')](_0xc561('0x79'))['distinct']();for(var _0x446f20=0x0;_0x446f20<_0x21dd3f['length'];_0x446f20++){_0x177d92[_0xc561('0x7a')](_0xc561('0x7b')+_0x21dd3f[_0x446f20]['id'],_0xc561('0x7c')+_0x21dd3f[_0x446f20]['alias']);}for(var _0x446f20=0x0;_0x446f20<_0x11195f[_0xc561('0x3c')];_0x446f20++){_0x177d92[_0xc561('0x7a')](squel[_0xc561('0x76')]()[_0xc561('0x7a')]('item')[_0xc561('0x7d')]('cm_contact_has_items')[_0xc561('0x41')](_0xc561('0x7e'),_0x11195f[_0x446f20]['id'])[_0xc561('0x41')](_0xc561('0x7f')),'additionalPhone_'+_0x11195f[_0x446f20][_0xc561('0x2e')]);_0x177d92[_0xc561('0x7a')](squel['select']()['field'](_0xc561('0x80'))['from'](_0xc561('0x81'))[_0xc561('0x41')](_0xc561('0x7e'),_0x11195f[_0x446f20]['id'])['where'](_0xc561('0x7f')),_0xc561('0x82')+_0x11195f[_0x446f20][_0xc561('0x2e')]);}var _0x3b7709=[];_0x3b7709[_0xc561('0x66')](_0x177d92[_0xc561('0x83')]());BPromise['each'](_0x3b7709,handleQuery)[_0xc561('0x29')](function(_0x20477b){handleQuery(_0x177d92[_0xc561('0x83')]());var _0x198897=csv_results[0x0];if(!_[_0xc561('0x84')](_0x198897)){var _0x2110aa=toCsv(_0x198897);var _0x38486d=Date[_0xc561('0x85')]();fs[_0xc561('0x86')](util[_0xc561('0x6e')](_0xc561('0x87'),_0x338b6b,_0x38486d),_0x2110aa);_0x33baa1[_0xc561('0x88')](_0xc561('0x89'),_0xc561('0x8a')+util[_0xc561('0x6e')](_0xc561('0x8b'),_0x338b6b,_0x38486d));_0x33baa1[_0xc561('0x88')](_0xc561('0x8c'),_0xc561('0x8d'));return _0x33baa1[_0xc561('0x8e')](util[_0xc561('0x6e')](_0xc561('0x87'),_0x338b6b,_0x38486d));}else{return _0x33baa1[_0xc561('0x2d')](0xcc);}});});});};exports[_0xc561('0x8f')]=function(_0x27aa56,_0x67ef88,_0x334f79){var _0xba11fb;delete _0x27aa56[_0xc561('0x51')]['id'];return db['CmList'][_0xc561('0x90')]({'where':{'id':_0x27aa56[_0xc561('0x4c')]['id']}})[_0xc561('0x29')](handleEntityNotFound(_0x67ef88,null))[_0xc561('0x29')](function(_0x2548c8){if(_0x2548c8){return db['sequelize'][_0xc561('0x91')](function(_0x3d313f){return db[_0xc561('0x74')]['create'](_0x27aa56[_0xc561('0x51')],{'transaction':_0x3d313f})[_0xc561('0x29')](function(_0x224373){_0xba11fb=_0x224373;return _0x2548c8[_0xc561('0x92')](_0x224373,{'transaction':_0x3d313f});})['then'](function(){var _0x38a007={'type':db[_0xc561('0x93')][_0xc561('0x94')],'transaction':_0x3d313f};switch(_0x27aa56['body'][_0xc561('0x45')]){case _0xc561('0x95'):_0x38a007['type']=db['Sequelize'][_0xc561('0x94')];break;case _0xc561('0x96'):_0x38a007[_0xc561('0x45')]=db[_0xc561('0x93')]['INTEGER'];break;case'switch':_0x38a007[_0xc561('0x45')]=db[_0xc561('0x93')][_0xc561('0x97')];_0x38a007[_0xc561('0x98')]=![];break;default:}return db['sequelize'][_0xc561('0x99')]['addColumn']('cm_contacts',util['format']('cf_%s',_0xba11fb['id']),_0x38a007);})['then'](function(){return _0xba11fb;});});}})[_0xc561('0x29')](respondWithResult(_0x67ef88,null))[_0xc561('0x4a')](handleError(_0x67ef88,null));};exports[_0xc561('0x9a')]=function(_0x4d4e94,_0x5d6be5,_0x2a14d2){var _0x2cf7d8={};var _0x248820={};var _0x440c42;var _0x385009;return db[_0xc561('0x32')][_0xc561('0x90')]({'where':{'id':_0x4d4e94['params']['id']}})[_0xc561('0x29')](handleEntityNotFound(_0x5d6be5,null))[_0xc561('0x29')](function(_0x2f3cbc){if(_0x2f3cbc){_0x440c42=_0x2f3cbc;_0x248820[_0xc561('0x35')]=_[_0xc561('0x37')](db[_0xc561('0x74')][_0xc561('0x33')]);_0x248820[_0xc561('0x36')]=_[_0xc561('0x37')](_0x4d4e94[_0xc561('0x36')]);_0x248820[_0xc561('0x38')]=_[_0xc561('0x39')](_0x248820[_0xc561('0x35')],_0x248820[_0xc561('0x36')]);_0x2cf7d8['attributes']=_['intersection'](_0x248820[_0xc561('0x35')],qs[_0xc561('0x3b')](_0x4d4e94['query']['fields']));_0x2cf7d8[_0xc561('0x3a')]=_0x2cf7d8['attributes'][_0xc561('0x3c')]?_0x2cf7d8[_0xc561('0x3a')]:_0x248820[_0xc561('0x35')];_0x2cf7d8[_0xc561('0x3f')]=qs[_0xc561('0x40')](_0x4d4e94['query'][_0xc561('0x40')]);_0x2cf7d8[_0xc561('0x41')]=qs[_0xc561('0x38')](_[_0xc561('0x42')](_0x4d4e94['query'],_0x248820[_0xc561('0x38')]));_0x2cf7d8['where']=_['merge'](_0x2cf7d8['where'],{'$or':[{'ListId':_0x2f3cbc['id']},{'ListId':null}]});if(_0x4d4e94[_0xc561('0x36')][_0xc561('0x43')]){_0x2cf7d8[_0xc561('0x41')]=_[_0xc561('0x44')](_0x2cf7d8[_0xc561('0x41')],{'$or':_[_0xc561('0x31')](_0x2cf7d8[_0xc561('0x3a')],function(_0x57e569){var _0x4c287a={};_0x4c287a[_0x57e569]={'$like':'%'+_0x4d4e94[_0xc561('0x36')][_0xc561('0x43')]+'%'};return _0x4c287a;})});}_0x2cf7d8=_[_0xc561('0x44')]({},_0x2cf7d8,_0x4d4e94[_0xc561('0x4e')]);return db['CmCustomField'][_0xc561('0x9b')](_0x2cf7d8);}})[_0xc561('0x29')](respondWithResult(_0x5d6be5,null))[_0xc561('0x4a')](handleError(_0x5d6be5,null));};exports[_0xc561('0x9c')]=function(_0x3500dc,_0x373733){return db['CmCustomField'][_0xc561('0x9b')]({'where':{'ListId':null}})[_0xc561('0x29')](handleEntityNotFound(_0x373733,null))[_0xc561('0x29')](function(_0x2f2721){return _0x2f2721;})['then'](respondWithResult(_0x373733,null))[_0xc561('0x4a')](handleError(_0x373733,null));};exports['addAgents']=function(_0x1520ff,_0x47b507,_0x423ba6){return db[_0xc561('0x32')][_0xc561('0x4f')]({'where':{'id':_0x1520ff[_0xc561('0x4c')]['id']}})['then'](handleEntityNotFound(_0x47b507,null))[_0xc561('0x29')](function(_0x251574){if(_0x251574){return _0x251574[_0xc561('0x9d')](_0x1520ff[_0xc561('0x51')][_0xc561('0x60')],_[_0xc561('0x65')](_0x1520ff[_0xc561('0x51')],[_0xc561('0x60'),'id'])||{})[_0xc561('0x9e')](function(_0x5462d0){for(var _0x50024e=0x0;_0x50024e<_0x1520ff[_0xc561('0x51')][_0xc561('0x60')][_0xc561('0x3c')];_0x50024e+=0x1){socket[_0xc561('0x9f')]('userCmList:save',{'UserId':Number(_0x1520ff[_0xc561('0x51')][_0xc561('0x60')][_0x50024e]),'CmListId':Number(_0x1520ff[_0xc561('0x4c')]['id'])});}return _0x5462d0;});}})['then'](respondWithResult(_0x47b507,null))[_0xc561('0x4a')](handleError(_0x47b507,null));};exports[_0xc561('0xa0')]=function(_0x3a6d35,_0x3ea2a0,_0x331ef6){return db[_0xc561('0x32')][_0xc561('0x4f')]({'where':{'id':_0x3a6d35['params']['id']}})[_0xc561('0x29')](handleEntityNotFound(_0x3ea2a0,null))[_0xc561('0x29')](function(_0x57749f){if(_0x57749f){return _0x57749f['removeAgents'](_0x3a6d35[_0xc561('0x36')][_0xc561('0x60')])['then'](function(){if(_[_0xc561('0x63')](_0x3a6d35[_0xc561('0x36')][_0xc561('0x60')])){for(var _0x5ee204=0x0;_0x5ee204<_0x3a6d35[_0xc561('0x36')]['ids'][_0xc561('0x3c')];_0x5ee204+=0x1){socket[_0xc561('0x9f')](_0xc561('0xa1'),{'UserId':Number(_0x3a6d35[_0xc561('0x36')][_0xc561('0x60')][_0x5ee204]),'CmListId':Number(_0x3a6d35['params']['id'])});}}else{socket[_0xc561('0x9f')]('userCmList:remove',{'UserId':Number(_0x3a6d35['query']['ids']),'CmListId':Number(_0x3a6d35[_0xc561('0x4c')]['id'])});}});}})[_0xc561('0x29')](respondWithStatusCode(_0x3ea2a0,null))[_0xc561('0x4a')](handleError(_0x3ea2a0,null));};exports[_0xc561('0xa2')]=function(_0x2d95bc,_0x4c0698,_0x2c2032){var _0x3bf219={};var _0x5ebfb3={};var _0x4ff985;var _0x5cef15;return db[_0xc561('0x32')][_0xc561('0x90')]({'where':{'id':_0x2d95bc['params']['id']}})[_0xc561('0x29')](handleEntityNotFound(_0x4c0698,null))[_0xc561('0x29')](function(_0xf67ca4){if(_0xf67ca4){_0x4ff985=_0xf67ca4;_0x5ebfb3[_0xc561('0x35')]=_[_0xc561('0x37')](db[_0xc561('0xa3')]['rawAttributes']);_0x5ebfb3['query']=_[_0xc561('0x37')](_0x2d95bc[_0xc561('0x36')]);_0x5ebfb3[_0xc561('0x38')]=_[_0xc561('0x39')](_0x5ebfb3[_0xc561('0x35')],_0x5ebfb3[_0xc561('0x36')]);_0x3bf219[_0xc561('0x3a')]=_['intersection'](_0x5ebfb3[_0xc561('0x35')],qs[_0xc561('0x3b')](_0x2d95bc['query']['fields']));_0x3bf219[_0xc561('0x3a')]=_0x3bf219[_0xc561('0x3a')]['length']?_0x3bf219[_0xc561('0x3a')]:_0x5ebfb3[_0xc561('0x35')];_0x3bf219[_0xc561('0x3f')]=qs[_0xc561('0x40')](_0x2d95bc[_0xc561('0x36')]['sort']);_0x3bf219[_0xc561('0x41')]=qs[_0xc561('0x38')](_[_0xc561('0x42')](_0x2d95bc['query'],_0x5ebfb3[_0xc561('0x38')]));if(_0x2d95bc[_0xc561('0x36')][_0xc561('0x43')]){_0x3bf219[_0xc561('0x41')]=_['merge'](_0x3bf219[_0xc561('0x41')],{'$or':_[_0xc561('0x31')](_0x3bf219[_0xc561('0x3a')],function(_0x3416e5){var _0x2ac868={};_0x2ac868[_0x3416e5]={'$like':'%'+_0x2d95bc[_0xc561('0x36')][_0xc561('0x43')]+'%'};return _0x2ac868;})});}_0x3bf219=_['merge']({},_0x3bf219,_0x2d95bc['options']);return _0x4ff985[_0xc561('0xa2')](_0x3bf219);}})[_0xc561('0x29')](function(_0xa17e5d){if(_0xa17e5d){_0x5cef15=_0xa17e5d[_0xc561('0x3c')];if(!_0x2d95bc['query'][_0xc561('0x3d')]('nolimit')){_0x3bf219[_0xc561('0x23')]=qs[_0xc561('0x23')](_0x2d95bc[_0xc561('0x36')][_0xc561('0x23')]);_0x3bf219['offset']=qs[_0xc561('0x21')](_0x2d95bc[_0xc561('0x36')][_0xc561('0x21')]);}return _0x4ff985['getAgents'](_0x3bf219);}})[_0xc561('0x29')](function(_0x2eaca6){if(_0x2eaca6){return _0x2eaca6?{'count':_0x5cef15,'rows':_0x2eaca6}:null;}})[_0xc561('0x29')](respondWithResult(_0x4c0698,null))['catch'](handleError(_0x4c0698,null));};function handleQuery(_0x15a8d6){logger[_0xc561('0xa4')](_0x15a8d6);return db[_0xc561('0xa5')][_0xc561('0x36')](_0x15a8d6)[_0xc561('0x9e')](function(_0xf726ff){csv_results[_0xc561('0x66')](_0xf726ff);})[_0xc561('0x4a')](function(_0x513ec4){logger[_0xc561('0x58')](_0x513ec4[_0xc561('0x68')]);});} \ No newline at end of file +var _0xfd57=['format','cf_%d','raw','getContactsCsv','ContactItemType','findAll','OrderBy','select','from','c.ListId\x20=\x20?','c.deletedAt\x20is\x20null','field','alias','item','cm_contact_has_items','additionalPhone_','description','ItemTypeId\x20=\x20?','toString','now','writeFileSync','/tmp/list_%d_%s.csv','Content-disposition','attachment;\x20filename=','list_%d_%s.csv','setHeader','Content-type','text/csv','transaction','addCustomFields','Sequelize','TEXT','text','number','INTEGER','switch','BOOLEAN','defaultValue','sequelize','queryInterface','addColumn','cm_contacts','getCustomFields','getGlobalCustomFields','findAndCountAll','spread','emit','userCmList:save','removeAgents','userCmList:remove','getAgents','info','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','util','path','sox','to-csv','ejs','fs-extra','lodash','squel','crypto','querystring','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','../../config/environment','redis','defaults','localhost','./cmList.socket','sendStatus','status','json','offset','undefined','count','set','Content-Range','apply','update','then','get','UserProfileResource','end','error','name','send','map','rawAttributes','type','model','query','keys','filters','intersection','fields','attributes','hasOwnProperty','limit','order','sort','where','pick','filter','merge','options','CmList','include','catch','show','params','includeAll','find','create','body','user','role','Lists','UserProfileSection','userProfileId','autoAssociation','destroy','describe','addDisposition','ListId','findOne','Disposition','length','nolimit','rows','removeDispositions','addContacts','CmContact','tags','join','isArray','push','each','omit','ids','dataValues','message','Malformed\x20request\x20syntax','getContacts','CmCustomField','CustomFields','concat'];(function(_0x45ce40,_0x3b6ba5){var _0x24017c=function(_0x3b1d60){while(--_0x3b1d60){_0x45ce40['push'](_0x45ce40['shift']());}};_0x24017c(++_0x3b6ba5);}(_0xfd57,0xd0));var _0x7fd5=function(_0x3d04c0,_0x2da1e3){_0x3d04c0=_0x3d04c0-0x0;var _0x8749c0=_0xfd57[_0x3d04c0];return _0x8749c0;};'use strict';var emlformat=require('eml-format');var rimraf=require(_0x7fd5('0x0'));var zipdir=require(_0x7fd5('0x1'));var jsonpatch=require(_0x7fd5('0x2'));var rp=require(_0x7fd5('0x3'));var moment=require(_0x7fd5('0x4'));var BPromise=require(_0x7fd5('0x5'));var Mustache=require('mustache');var util=require(_0x7fd5('0x6'));var path=require(_0x7fd5('0x7'));var sox=require(_0x7fd5('0x8'));var csv=require(_0x7fd5('0x9'));var ejs=require(_0x7fd5('0xa'));var fs=require('fs');var fs_extra=require(_0x7fd5('0xb'));var _=require(_0x7fd5('0xc'));var squel=require(_0x7fd5('0xd'));var crypto=require(_0x7fd5('0xe'));var jsforce=require('jsforce');var deskjs=require('desk.js');var toCsv=require(_0x7fd5('0x9'));var querystring=require(_0x7fd5('0xf'));var Papa=require('papaparse');var Redis=require(_0x7fd5('0x10'));var authService=require(_0x7fd5('0x11'));var qs=require(_0x7fd5('0x12'));var as=require(_0x7fd5('0x13'));var hardwareService=require(_0x7fd5('0x14'));var logger=require(_0x7fd5('0x15'))('api');var utils=require('../../config/utils');var config=require(_0x7fd5('0x16'));var licenseUtil=require('../../config/license/util');var db=require('../../mysqldb')['db'];var csv_results;config[_0x7fd5('0x17')]=_[_0x7fd5('0x18')](config[_0x7fd5('0x17')],{'host':_0x7fd5('0x19'),'port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config['redis']));require(_0x7fd5('0x1a'))['register'](socket);function respondWithStatusCode(_0x2e3ffc,_0x180b09){_0x180b09=_0x180b09||0xcc;return function(_0x3983df){if(_0x3983df){return _0x2e3ffc[_0x7fd5('0x1b')](_0x180b09);}return _0x2e3ffc[_0x7fd5('0x1c')](_0x180b09)['end']();};}function respondWithResult(_0x451db7,_0x55873e){_0x55873e=_0x55873e||0xc8;return function(_0x9a3757){if(_0x9a3757){return _0x451db7['status'](_0x55873e)[_0x7fd5('0x1d')](_0x9a3757);}};}function respondWithFilteredResult(_0x53bab2,_0x39665f){return function(_0x3c1d9b){if(_0x3c1d9b){var _0x1cc1d4=typeof _0x39665f[_0x7fd5('0x1e')]===_0x7fd5('0x1f')&&typeof _0x39665f['limit']===_0x7fd5('0x1f');var _0x3e8370=_0x3c1d9b[_0x7fd5('0x20')];var _0x271d0b=_0x1cc1d4?0x0:_0x39665f['offset'];var _0x36685d=_0x1cc1d4?_0x3c1d9b[_0x7fd5('0x20')]:_0x39665f[_0x7fd5('0x1e')]+_0x39665f['limit'];var _0x223e43;if(_0x36685d>=_0x3e8370){_0x36685d=_0x3e8370;_0x223e43=0xc8;}else{_0x223e43=0xce;}_0x53bab2['status'](_0x223e43);return _0x53bab2[_0x7fd5('0x21')](_0x7fd5('0x22'),_0x271d0b+'-'+_0x36685d+'/'+_0x3e8370)[_0x7fd5('0x1d')](_0x3c1d9b);}return null;};}function patchUpdates(_0x5d95da){return function(_0x534fb6){try{jsonpatch[_0x7fd5('0x23')](_0x534fb6,_0x5d95da,!![]);}catch(_0x1b35ad){return BPromise['reject'](_0x1b35ad);}return _0x534fb6['save']();};}function saveUpdates(_0x1f6f9a,_0x36276b){return function(_0xc45281){if(_0xc45281){return _0xc45281[_0x7fd5('0x24')](_0x1f6f9a)[_0x7fd5('0x25')](function(_0x28825c){return _0x28825c;});}return null;};}function removeEntity(_0xe5baa7,_0x39ecde){return function(_0x14a5e6){if(_0x14a5e6){return _0x14a5e6['destroy']()['then'](function(){var _0x49b1f2=_0x14a5e6[_0x7fd5('0x26')]({'plain':!![]});var _0x3a9a7d='Lists';return db[_0x7fd5('0x27')]['destroy']({'where':{'type':_0x3a9a7d,'resourceId':_0x49b1f2['id']}})['then'](function(){return _0x14a5e6;});})[_0x7fd5('0x25')](function(){_0xe5baa7[_0x7fd5('0x1c')](0xcc)[_0x7fd5('0x28')]();});}};}function handleEntityNotFound(_0x11166c,_0x517426){return function(_0x5e5873){if(!_0x5e5873){_0x11166c['sendStatus'](0x194);}return _0x5e5873;};}function handleError(_0x49b12f,_0x524312){_0x524312=_0x524312||0x1f4;return function(_0x22a251){logger[_0x7fd5('0x29')](_0x22a251['stack']);if(_0x22a251['name']){delete _0x22a251[_0x7fd5('0x2a')];}_0x49b12f[_0x7fd5('0x1c')](_0x524312)[_0x7fd5('0x2b')](_0x22a251);};}exports['index']=function(_0x5dadc2,_0x594f52){var _0x2ded3f={},_0x40500c={},_0x5602ac={'count':0x0,'rows':[]};var _0x4b79dd=_[_0x7fd5('0x2c')](db['CmList'][_0x7fd5('0x2d')],function(_0x11cb6f){return{'name':_0x11cb6f['fieldName'],'type':_0x11cb6f[_0x7fd5('0x2e')]['key']};});_0x40500c[_0x7fd5('0x2f')]=_['map'](_0x4b79dd,_0x7fd5('0x2a'));_0x40500c[_0x7fd5('0x30')]=_[_0x7fd5('0x31')](_0x5dadc2[_0x7fd5('0x30')]);_0x40500c[_0x7fd5('0x32')]=_[_0x7fd5('0x33')](_0x40500c[_0x7fd5('0x2f')],_0x40500c[_0x7fd5('0x30')]);_0x2ded3f['attributes']=_[_0x7fd5('0x33')](_0x40500c['model'],qs[_0x7fd5('0x34')](_0x5dadc2[_0x7fd5('0x30')][_0x7fd5('0x34')]));_0x2ded3f[_0x7fd5('0x35')]=_0x2ded3f[_0x7fd5('0x35')]['length']?_0x2ded3f[_0x7fd5('0x35')]:_0x40500c[_0x7fd5('0x2f')];if(!_0x5dadc2['query'][_0x7fd5('0x36')]('nolimit')){_0x2ded3f['limit']=qs['limit'](_0x5dadc2['query'][_0x7fd5('0x37')]);_0x2ded3f[_0x7fd5('0x1e')]=qs[_0x7fd5('0x1e')](_0x5dadc2[_0x7fd5('0x30')][_0x7fd5('0x1e')]);}_0x2ded3f[_0x7fd5('0x38')]=qs[_0x7fd5('0x39')](_0x5dadc2['query'][_0x7fd5('0x39')]);_0x2ded3f[_0x7fd5('0x3a')]=qs['filters'](_[_0x7fd5('0x3b')](_0x5dadc2['query'],_0x40500c[_0x7fd5('0x32')]),_0x4b79dd);if(_0x5dadc2['query'][_0x7fd5('0x3c')]){_0x2ded3f[_0x7fd5('0x3a')]=_['merge'](_0x2ded3f[_0x7fd5('0x3a')],{'$or':_[_0x7fd5('0x2c')](_0x4b79dd,function(_0x2e16cc){if(_0x2e16cc[_0x7fd5('0x2e')]!=='VIRTUAL'){var _0x43da50={};_0x43da50[_0x2e16cc['name']]={'$like':'%'+_0x5dadc2[_0x7fd5('0x30')][_0x7fd5('0x3c')]+'%'};return _0x43da50;}})});}_0x2ded3f=_[_0x7fd5('0x3d')]({},_0x2ded3f,_0x5dadc2[_0x7fd5('0x3e')]);var _0x4f6a92={'where':_0x2ded3f[_0x7fd5('0x3a')]};return db[_0x7fd5('0x3f')]['count'](_0x4f6a92)[_0x7fd5('0x25')](function(_0x1c3152){_0x5602ac[_0x7fd5('0x20')]=_0x1c3152;if(_0x5dadc2['query']['includeAll']){_0x2ded3f[_0x7fd5('0x40')]=[{'all':!![]}];}return db[_0x7fd5('0x3f')]['findAll'](_0x2ded3f);})['then'](function(_0x184977){_0x5602ac['rows']=_0x184977;return _0x5602ac;})['then'](respondWithFilteredResult(_0x594f52,_0x2ded3f))[_0x7fd5('0x41')](handleError(_0x594f52,null));};exports[_0x7fd5('0x42')]=function(_0x5c0beb,_0x31c420){var _0x4bdf30={'raw':![],'where':{'id':_0x5c0beb[_0x7fd5('0x43')]['id']}},_0x4e5d78={};_0x4e5d78[_0x7fd5('0x2f')]=_[_0x7fd5('0x31')](db[_0x7fd5('0x3f')]['rawAttributes']);_0x4e5d78[_0x7fd5('0x30')]=_[_0x7fd5('0x31')](_0x5c0beb[_0x7fd5('0x30')]);_0x4e5d78[_0x7fd5('0x32')]=_[_0x7fd5('0x33')](_0x4e5d78['model'],_0x4e5d78['query']);_0x4bdf30[_0x7fd5('0x35')]=_['intersection'](_0x4e5d78[_0x7fd5('0x2f')],qs['fields'](_0x5c0beb['query'][_0x7fd5('0x34')]));_0x4bdf30[_0x7fd5('0x35')]=_0x4bdf30[_0x7fd5('0x35')]['length']?_0x4bdf30[_0x7fd5('0x35')]:_0x4e5d78[_0x7fd5('0x2f')];if(_0x5c0beb[_0x7fd5('0x30')][_0x7fd5('0x44')]){_0x4bdf30[_0x7fd5('0x40')]=[{'all':!![]}];}_0x4bdf30=_['merge']({},_0x4bdf30,_0x5c0beb[_0x7fd5('0x3e')]);return db['CmList'][_0x7fd5('0x45')](_0x4bdf30)['then'](handleEntityNotFound(_0x31c420,null))[_0x7fd5('0x25')](respondWithResult(_0x31c420,null))['catch'](handleError(_0x31c420,null));};exports[_0x7fd5('0x46')]=function(_0x5cfa9a,_0xa6357){return db['CmList'][_0x7fd5('0x46')](_0x5cfa9a[_0x7fd5('0x47')],{})['then'](function(_0x23f15d){var _0x1bcdc0=_0x5cfa9a[_0x7fd5('0x48')]['get']({'plain':!![]});if(!_0x1bcdc0)throw new Error('Unable\x20to\x20retrieve\x20the\x20current\x20user');if(_0x1bcdc0[_0x7fd5('0x49')]===_0x7fd5('0x48')){var _0x2e929b=_0x23f15d[_0x7fd5('0x26')]({'plain':!![]});var _0x39e7e9=_0x7fd5('0x4a');return db[_0x7fd5('0x4b')][_0x7fd5('0x45')]({'where':{'name':_0x39e7e9,'userProfileId':_0x1bcdc0[_0x7fd5('0x4c')]},'raw':!![]})[_0x7fd5('0x25')](function(_0x3324fc){if(_0x3324fc&&_0x3324fc[_0x7fd5('0x4d')]===0x0){return db[_0x7fd5('0x27')]['create']({'name':_0x2e929b[_0x7fd5('0x2a')],'resourceId':_0x2e929b['id'],'type':_0x3324fc['name'],'sectionId':_0x3324fc['id']},{})[_0x7fd5('0x25')](function(){return _0x23f15d;});}else{return _0x23f15d;}})[_0x7fd5('0x41')](function(_0x371bc7){logger[_0x7fd5('0x29')]('Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s',_0x371bc7);throw _0x371bc7;});}return _0x23f15d;})['then'](respondWithResult(_0xa6357,0xc9))[_0x7fd5('0x41')](handleError(_0xa6357,null));};exports[_0x7fd5('0x24')]=function(_0x3c65c3,_0x248b21){if(_0x3c65c3[_0x7fd5('0x47')]['id']){delete _0x3c65c3[_0x7fd5('0x47')]['id'];}return db[_0x7fd5('0x3f')][_0x7fd5('0x45')]({'where':{'id':_0x3c65c3[_0x7fd5('0x43')]['id']}})['then'](handleEntityNotFound(_0x248b21,null))['then'](saveUpdates(_0x3c65c3[_0x7fd5('0x47')],null))[_0x7fd5('0x25')](respondWithResult(_0x248b21,null))[_0x7fd5('0x41')](handleError(_0x248b21,null));};exports[_0x7fd5('0x4e')]=function(_0x41f6ba,_0x949796){return db[_0x7fd5('0x3f')]['find']({'where':{'id':_0x41f6ba[_0x7fd5('0x43')]['id']}})[_0x7fd5('0x25')](handleEntityNotFound(_0x949796,null))[_0x7fd5('0x25')](removeEntity(_0x949796,null))[_0x7fd5('0x41')](handleError(_0x949796,null));};exports[_0x7fd5('0x4f')]=function(_0x24ff19,_0x52075c){return db['CmList'][_0x7fd5('0x4f')]()[_0x7fd5('0x25')](respondWithResult(_0x52075c,null))['catch'](handleError(_0x52075c,null));};exports[_0x7fd5('0x50')]=function(_0x35bf6c,_0x2f3ad6,_0x4e6eb3){if(_0x35bf6c['body']['id']){delete _0x35bf6c[_0x7fd5('0x47')]['id'];}return db[_0x7fd5('0x3f')][_0x7fd5('0x45')]({'where':{'id':_0x35bf6c['params']['id']}})[_0x7fd5('0x25')](handleEntityNotFound(_0x2f3ad6,null))[_0x7fd5('0x25')](function(_0x11aa41){if(_0x11aa41){_0x35bf6c['body'][_0x7fd5('0x51')]=_0x11aa41['id'];return db['Disposition'][_0x7fd5('0x46')](_0x35bf6c[_0x7fd5('0x47')]);}})[_0x7fd5('0x25')](respondWithResult(_0x2f3ad6,null))['catch'](handleError(_0x2f3ad6,null));};exports['getDispositions']=function(_0xd0bab0,_0x42d2de,_0x580e60){var _0x157144={'raw':![],'where':{}};var _0x56c427={};var _0x167dfe={'count':0x0,'rows':[]};return db[_0x7fd5('0x3f')][_0x7fd5('0x52')]({'where':{'id':_0xd0bab0[_0x7fd5('0x43')]['id']}})[_0x7fd5('0x25')](handleEntityNotFound(_0x42d2de,null))[_0x7fd5('0x25')](function(_0x3c3602){if(_0x3c3602){_0x56c427[_0x7fd5('0x2f')]=_[_0x7fd5('0x31')](db[_0x7fd5('0x53')][_0x7fd5('0x2d')]);_0x56c427[_0x7fd5('0x30')]=_['keys'](_0xd0bab0['query']);_0x56c427[_0x7fd5('0x32')]=_['intersection'](_0x56c427[_0x7fd5('0x2f')],_0x56c427[_0x7fd5('0x30')]);_0x157144['attributes']=_[_0x7fd5('0x33')](_0x56c427[_0x7fd5('0x2f')],qs[_0x7fd5('0x34')](_0xd0bab0[_0x7fd5('0x30')][_0x7fd5('0x34')]));_0x157144[_0x7fd5('0x35')]=_0x157144[_0x7fd5('0x35')][_0x7fd5('0x54')]?_0x157144[_0x7fd5('0x35')]:_0x56c427[_0x7fd5('0x2f')];if(!_0xd0bab0[_0x7fd5('0x30')][_0x7fd5('0x36')](_0x7fd5('0x55'))){_0x157144[_0x7fd5('0x37')]=qs[_0x7fd5('0x37')](_0xd0bab0['query'][_0x7fd5('0x37')]);_0x157144[_0x7fd5('0x1e')]=qs[_0x7fd5('0x1e')](_0xd0bab0[_0x7fd5('0x30')][_0x7fd5('0x1e')]);}_0x157144[_0x7fd5('0x38')]=qs[_0x7fd5('0x39')](_0xd0bab0[_0x7fd5('0x30')][_0x7fd5('0x39')]);_0x157144[_0x7fd5('0x3a')]=qs[_0x7fd5('0x32')](_[_0x7fd5('0x3b')](_0xd0bab0[_0x7fd5('0x30')],_0x56c427[_0x7fd5('0x32')]));_0x157144['where'][_0x7fd5('0x51')]=_0x3c3602['id'];if(_0xd0bab0[_0x7fd5('0x30')][_0x7fd5('0x3c')]){_0x157144[_0x7fd5('0x3a')]=_[_0x7fd5('0x3d')](_0x157144[_0x7fd5('0x3a')],{'$or':_[_0x7fd5('0x2c')](_0x157144[_0x7fd5('0x35')],function(_0x57da61){var _0x322923={};_0x322923[_0x57da61]={'$like':'%'+_0xd0bab0[_0x7fd5('0x30')][_0x7fd5('0x3c')]+'%'};return _0x322923;})});}_0x157144=_[_0x7fd5('0x3d')]({},_0x157144,_0xd0bab0['options']);return db[_0x7fd5('0x53')][_0x7fd5('0x20')]({'where':_0x157144[_0x7fd5('0x3a')]})[_0x7fd5('0x25')](function(_0x3b40c9){_0x167dfe['count']=_0x3b40c9;if(_0xd0bab0[_0x7fd5('0x30')][_0x7fd5('0x44')]){_0x157144[_0x7fd5('0x40')]=[{'all':!![]}];}return db['Disposition']['findAll'](_0x157144);})[_0x7fd5('0x25')](function(_0x184fa4){_0x167dfe[_0x7fd5('0x56')]=_0x184fa4;return _0x167dfe;});}})[_0x7fd5('0x25')](respondWithFilteredResult(_0x42d2de,_0x157144))[_0x7fd5('0x41')](handleError(_0x42d2de,null));};exports[_0x7fd5('0x57')]=function(_0x555430,_0x9f454f,_0x4c2500){return db['CmList'][_0x7fd5('0x45')]({'where':{'id':_0x555430[_0x7fd5('0x43')]['id']}})[_0x7fd5('0x25')](handleEntityNotFound(_0x9f454f,null))[_0x7fd5('0x25')](function(_0x192d4e){if(_0x192d4e){return _0x192d4e['removeDispositions'](_0x555430['query']['ids']);}})[_0x7fd5('0x25')](respondWithStatusCode(_0x9f454f,null))[_0x7fd5('0x41')](handleError(_0x9f454f,null));};exports[_0x7fd5('0x58')]=function(_0xcfbb55,_0x2297ea,_0x27c106){return db[_0x7fd5('0x3f')][_0x7fd5('0x45')]({'where':{'id':_0xcfbb55[_0x7fd5('0x43')]['id']}})[_0x7fd5('0x25')](handleEntityNotFound(_0x2297ea,null))[_0x7fd5('0x25')](function(_0x491910){if(_0x491910){var _0x32bece=[];var _0x4aaae8={'success':[],'errors':[]};return db[_0x7fd5('0x59')][_0x7fd5('0x4f')]()[_0x7fd5('0x25')](function(_0x5e330a){if(_0xcfbb55[_0x7fd5('0x47')][_0x7fd5('0x5a')]&&_['isArray'](_0xcfbb55[_0x7fd5('0x47')]['tags'])){if(_0xcfbb55[_0x7fd5('0x47')][_0x7fd5('0x5a')][_0x7fd5('0x54')]){_0xcfbb55[_0x7fd5('0x47')][_0x7fd5('0x5a')]=_0xcfbb55[_0x7fd5('0x47')]['tags'][_0x7fd5('0x5b')](';')+';';}else{_0xcfbb55[_0x7fd5('0x47')][_0x7fd5('0x5a')]=null;}}else{_0xcfbb55[_0x7fd5('0x47')][_0x7fd5('0x5a')]=null;}if(_0xcfbb55[_0x7fd5('0x47')]&&_[_0x7fd5('0x5c')](_0xcfbb55['body'])){for(var _0x164997=0x0;_0x164997<_0xcfbb55[_0x7fd5('0x47')][_0x7fd5('0x54')];_0x164997+=0x1){_0xcfbb55['body'][_0x164997]['ListId']=_0xcfbb55[_0x7fd5('0x43')]['id'];_0x32bece[_0x7fd5('0x5d')](_0xcfbb55['body'][_0x164997]);}return BPromise[_0x7fd5('0x5e')](_0x32bece,function(_0x2ba8af){return db[_0x7fd5('0x59')][_0x7fd5('0x46')](_[_0x7fd5('0x5f')](_0x2ba8af,[_0x7fd5('0x60'),'id'])||{},{'fields':_['keys'](_0x5e330a),'raw':!![]})[_0x7fd5('0x25')](function(_0x3d7ef2){_0x4aaae8['success'][_0x7fd5('0x5d')](_0x3d7ef2[_0x7fd5('0x61')]);})[_0x7fd5('0x41')](function(_0x37267){_0x4aaae8['errors']['push']({'data':_0x2ba8af,'error':_0x37267[_0x7fd5('0x62')]});});})[_0x7fd5('0x25')](function(_0x36ba0f){return _0x4aaae8;})[_0x7fd5('0x41')](function(_0x84d383){return _0x84d383;});}else{_0x2297ea['status'](0x190)[_0x7fd5('0x1d')]({'message':_0x7fd5('0x63')});}});}})[_0x7fd5('0x25')](respondWithResult(_0x2297ea,null))[_0x7fd5('0x41')](handleError(_0x2297ea,null));};exports[_0x7fd5('0x64')]=function(_0x35159d,_0x1882d0,_0x646d89){var _0x2118cd;return db['CmList'][_0x7fd5('0x45')]({'where':{'id':_0x35159d[_0x7fd5('0x43')]['id']},'include':[{'model':db[_0x7fd5('0x65')],'as':_0x7fd5('0x66')}]})[_0x7fd5('0x25')](handleEntityNotFound(_0x1882d0,null))['then'](function(_0x4b0566){if(_0x4b0566){_0x2118cd=_0x4b0566;return db['CmContact']['rawAttributes'];}})[_0x7fd5('0x25')](function(_0xef60eb){if(_0xef60eb){var _0x5cbc9c={};var _0x9d7add={};_0x9d7add[_0x7fd5('0x2f')]=_[_0x7fd5('0x67')](_['keys'](_0xef60eb),_['map'](_0x2118cd[_0x7fd5('0x66')],function(_0x3f4d50){return util[_0x7fd5('0x68')](_0x7fd5('0x69'),_0x3f4d50['id']);}));_0x9d7add[_0x7fd5('0x30')]=_[_0x7fd5('0x31')](_0x35159d[_0x7fd5('0x30')]);_0x9d7add[_0x7fd5('0x32')]=_[_0x7fd5('0x33')](_0x9d7add[_0x7fd5('0x2f')],_0x9d7add[_0x7fd5('0x30')]);_0x5cbc9c[_0x7fd5('0x35')]=_[_0x7fd5('0x33')](_0x9d7add[_0x7fd5('0x2f')],qs[_0x7fd5('0x34')](_0x35159d[_0x7fd5('0x30')][_0x7fd5('0x34')]));_0x5cbc9c[_0x7fd5('0x35')]=_0x5cbc9c[_0x7fd5('0x35')][_0x7fd5('0x54')]?_0x5cbc9c[_0x7fd5('0x35')]:_0x9d7add[_0x7fd5('0x2f')];if(!_0x35159d[_0x7fd5('0x30')][_0x7fd5('0x36')]('nolimit')){_0x5cbc9c[_0x7fd5('0x37')]=qs[_0x7fd5('0x37')](_0x35159d[_0x7fd5('0x30')][_0x7fd5('0x37')]);_0x5cbc9c[_0x7fd5('0x1e')]=qs['offset'](_0x35159d['query'][_0x7fd5('0x1e')]);}_0x5cbc9c['order']=qs['sort'](_0x35159d[_0x7fd5('0x30')][_0x7fd5('0x39')]);_0x5cbc9c[_0x7fd5('0x3a')]=qs[_0x7fd5('0x32')](_['pick'](_0x35159d[_0x7fd5('0x30')],_0x9d7add[_0x7fd5('0x32')]));_0x5cbc9c[_0x7fd5('0x6a')]=!![];if(_0x35159d['query'][_0x7fd5('0x3c')]){_0x5cbc9c[_0x7fd5('0x3a')]=_[_0x7fd5('0x3d')](_0x5cbc9c[_0x7fd5('0x3a')],{'$or':_[_0x7fd5('0x2c')](_0x5cbc9c['attributes'],function(_0x4d3146){var _0x1ddf23={};_0x1ddf23[_0x4d3146]={'$like':'%'+_0x35159d['query'][_0x7fd5('0x3c')]+'%'};return _0x1ddf23;})});}_0x5cbc9c=_[_0x7fd5('0x3d')]({},_0x5cbc9c,_0x35159d[_0x7fd5('0x3e')]);return _0x2118cd[_0x7fd5('0x64')](_0x5cbc9c);}})[_0x7fd5('0x25')](respondWithResult(_0x1882d0,null))[_0x7fd5('0x41')](handleError(_0x1882d0,null));};exports[_0x7fd5('0x6b')]=function(_0x556b48,_0xbfc2bd,_0xba5640){var _0x56de15;var _0x1d2d79;var _0x9c1034;var _0x4bb478=_0x556b48[_0x7fd5('0x43')]['id'];csv_results=[];return db[_0x7fd5('0x6c')][_0x7fd5('0x6d')]({'attributes':['id',_0x7fd5('0x2a')],'raw':!![],'order':[_0x7fd5('0x6e')]})[_0x7fd5('0x25')](function(_0x19c5f4){_0x56de15=_0x19c5f4;var _0x363f1f=_[_0x7fd5('0x31')](db[_0x7fd5('0x59')]['rawAttributes']);return db['CmCustomField'][_0x7fd5('0x6d')]({'raw':!![],'attributes':['id','alias']})[_0x7fd5('0x25')](function(_0x10e32f){_0x1d2d79=_0x10e32f;var _0x31bc67=squel[_0x7fd5('0x6f')]()[_0x7fd5('0x34')](_0x363f1f)[_0x7fd5('0x70')]('cm_contacts','c')[_0x7fd5('0x3a')](_0x7fd5('0x71'),_0x4bb478)['where'](_0x7fd5('0x72'))['distinct']();for(var _0x54e5a7=0x0;_0x54e5a7<_0x1d2d79['length'];_0x54e5a7++){_0x31bc67[_0x7fd5('0x73')]('c.cf_'+_0x1d2d79[_0x54e5a7]['id'],'customField_'+_0x1d2d79[_0x54e5a7][_0x7fd5('0x74')]);}for(var _0x54e5a7=0x0;_0x54e5a7<_0x56de15[_0x7fd5('0x54')];_0x54e5a7++){_0x31bc67[_0x7fd5('0x73')](squel['select']()[_0x7fd5('0x73')](_0x7fd5('0x75'))[_0x7fd5('0x70')](_0x7fd5('0x76'))[_0x7fd5('0x3a')]('ItemTypeId\x20=\x20?',_0x56de15[_0x54e5a7]['id'])[_0x7fd5('0x3a')]('CmContactId\x20=\x20c.id'),_0x7fd5('0x77')+_0x56de15[_0x54e5a7][_0x7fd5('0x2a')]);_0x31bc67[_0x7fd5('0x73')](squel[_0x7fd5('0x6f')]()[_0x7fd5('0x73')](_0x7fd5('0x78'))[_0x7fd5('0x70')](_0x7fd5('0x76'))[_0x7fd5('0x3a')](_0x7fd5('0x79'),_0x56de15[_0x54e5a7]['id'])[_0x7fd5('0x3a')]('CmContactId\x20=\x20c.id'),'description_additionalPhone_'+_0x56de15[_0x54e5a7]['name']);}var _0x473d9d=[];_0x473d9d[_0x7fd5('0x5d')](_0x31bc67[_0x7fd5('0x7a')]());BPromise[_0x7fd5('0x5e')](_0x473d9d,handleQuery)['then'](function(_0x3c429f){handleQuery(_0x31bc67['toString']());var _0x2db706=csv_results[0x0];if(!_['isEmpty'](_0x2db706)){var _0x89b687=toCsv(_0x2db706);var _0x2d02b6=Date[_0x7fd5('0x7b')]();fs[_0x7fd5('0x7c')](util['format'](_0x7fd5('0x7d'),_0x4bb478,_0x2d02b6),_0x89b687);_0xbfc2bd['setHeader'](_0x7fd5('0x7e'),_0x7fd5('0x7f')+util[_0x7fd5('0x68')](_0x7fd5('0x80'),_0x4bb478,_0x2d02b6));_0xbfc2bd[_0x7fd5('0x81')](_0x7fd5('0x82'),_0x7fd5('0x83'));return _0xbfc2bd['download'](util[_0x7fd5('0x68')]('/tmp/list_%d_%s.csv',_0x4bb478,_0x2d02b6));}else{return _0xbfc2bd[_0x7fd5('0x1b')](0xcc);}});});});};exports['addCustomField']=function(_0x113a9a,_0x28a72d,_0x1cfca7){var _0x3e3d2a;delete _0x113a9a[_0x7fd5('0x47')]['id'];return db[_0x7fd5('0x3f')][_0x7fd5('0x52')]({'where':{'id':_0x113a9a[_0x7fd5('0x43')]['id']}})[_0x7fd5('0x25')](handleEntityNotFound(_0x28a72d,null))[_0x7fd5('0x25')](function(_0x5388dc){if(_0x5388dc){return db['sequelize'][_0x7fd5('0x84')](function(_0x51c3cb){return db[_0x7fd5('0x65')]['create'](_0x113a9a[_0x7fd5('0x47')],{'transaction':_0x51c3cb})[_0x7fd5('0x25')](function(_0x34f668){_0x3e3d2a=_0x34f668;return _0x5388dc[_0x7fd5('0x85')](_0x34f668,{'transaction':_0x51c3cb});})[_0x7fd5('0x25')](function(){var _0x15e5ab={'type':db[_0x7fd5('0x86')][_0x7fd5('0x87')],'transaction':_0x51c3cb};switch(_0x113a9a[_0x7fd5('0x47')]['type']){case _0x7fd5('0x88'):_0x15e5ab[_0x7fd5('0x2e')]=db[_0x7fd5('0x86')][_0x7fd5('0x87')];break;case _0x7fd5('0x89'):_0x15e5ab['type']=db[_0x7fd5('0x86')][_0x7fd5('0x8a')];break;case _0x7fd5('0x8b'):_0x15e5ab[_0x7fd5('0x2e')]=db[_0x7fd5('0x86')][_0x7fd5('0x8c')];_0x15e5ab[_0x7fd5('0x8d')]=![];break;default:}return db[_0x7fd5('0x8e')][_0x7fd5('0x8f')][_0x7fd5('0x90')](_0x7fd5('0x91'),util[_0x7fd5('0x68')]('cf_%s',_0x3e3d2a['id']),_0x15e5ab);})[_0x7fd5('0x25')](function(){return _0x3e3d2a;});});}})[_0x7fd5('0x25')](respondWithResult(_0x28a72d,null))[_0x7fd5('0x41')](handleError(_0x28a72d,null));};exports[_0x7fd5('0x92')]=function(_0x4d86fa,_0x242c3f,_0x59a06c){var _0x38dbe3={};var _0x4809bb={};var _0x3a2bc0;var _0x1629c6;return db['CmList']['findOne']({'where':{'id':_0x4d86fa[_0x7fd5('0x43')]['id']}})['then'](handleEntityNotFound(_0x242c3f,null))[_0x7fd5('0x25')](function(_0x2388cc){if(_0x2388cc){_0x3a2bc0=_0x2388cc;_0x4809bb['model']=_[_0x7fd5('0x31')](db[_0x7fd5('0x65')][_0x7fd5('0x2d')]);_0x4809bb[_0x7fd5('0x30')]=_['keys'](_0x4d86fa[_0x7fd5('0x30')]);_0x4809bb[_0x7fd5('0x32')]=_[_0x7fd5('0x33')](_0x4809bb[_0x7fd5('0x2f')],_0x4809bb['query']);_0x38dbe3[_0x7fd5('0x35')]=_[_0x7fd5('0x33')](_0x4809bb['model'],qs[_0x7fd5('0x34')](_0x4d86fa[_0x7fd5('0x30')]['fields']));_0x38dbe3['attributes']=_0x38dbe3[_0x7fd5('0x35')][_0x7fd5('0x54')]?_0x38dbe3[_0x7fd5('0x35')]:_0x4809bb[_0x7fd5('0x2f')];_0x38dbe3[_0x7fd5('0x38')]=qs[_0x7fd5('0x39')](_0x4d86fa['query'][_0x7fd5('0x39')]);_0x38dbe3[_0x7fd5('0x3a')]=qs[_0x7fd5('0x32')](_[_0x7fd5('0x3b')](_0x4d86fa['query'],_0x4809bb[_0x7fd5('0x32')]));_0x38dbe3['where']=_['merge'](_0x38dbe3[_0x7fd5('0x3a')],{'$or':[{'ListId':_0x2388cc['id']},{'ListId':null}]});if(_0x4d86fa['query'][_0x7fd5('0x3c')]){_0x38dbe3[_0x7fd5('0x3a')]=_[_0x7fd5('0x3d')](_0x38dbe3['where'],{'$or':_['map'](_0x38dbe3['attributes'],function(_0x33ba09){var _0x1ff0c9={};_0x1ff0c9[_0x33ba09]={'$like':'%'+_0x4d86fa[_0x7fd5('0x30')][_0x7fd5('0x3c')]+'%'};return _0x1ff0c9;})});}_0x38dbe3=_['merge']({},_0x38dbe3,_0x4d86fa[_0x7fd5('0x3e')]);return db[_0x7fd5('0x65')]['findAndCountAll'](_0x38dbe3);}})[_0x7fd5('0x25')](respondWithResult(_0x242c3f,null))[_0x7fd5('0x41')](handleError(_0x242c3f,null));};exports[_0x7fd5('0x93')]=function(_0x2b49f1,_0x51ce71){return db['CmCustomField'][_0x7fd5('0x94')]({'where':{'ListId':null}})[_0x7fd5('0x25')](handleEntityNotFound(_0x51ce71,null))['then'](function(_0x3c42c7){return _0x3c42c7;})[_0x7fd5('0x25')](respondWithResult(_0x51ce71,null))['catch'](handleError(_0x51ce71,null));};exports['addAgents']=function(_0x4ae148,_0x434a1a,_0x13998a){return db['CmList'][_0x7fd5('0x45')]({'where':{'id':_0x4ae148[_0x7fd5('0x43')]['id']}})['then'](handleEntityNotFound(_0x434a1a,null))[_0x7fd5('0x25')](function(_0x3cd264){if(_0x3cd264){return _0x3cd264['addAgents'](_0x4ae148['body'][_0x7fd5('0x60')],_[_0x7fd5('0x5f')](_0x4ae148[_0x7fd5('0x47')],[_0x7fd5('0x60'),'id'])||{})[_0x7fd5('0x95')](function(_0x424bf1){for(var _0x3d8335=0x0;_0x3d8335<_0x4ae148['body'][_0x7fd5('0x60')][_0x7fd5('0x54')];_0x3d8335+=0x1){socket[_0x7fd5('0x96')](_0x7fd5('0x97'),{'UserId':Number(_0x4ae148[_0x7fd5('0x47')][_0x7fd5('0x60')][_0x3d8335]),'CmListId':Number(_0x4ae148[_0x7fd5('0x43')]['id'])});}return _0x424bf1;});}})[_0x7fd5('0x25')](respondWithResult(_0x434a1a,null))[_0x7fd5('0x41')](handleError(_0x434a1a,null));};exports[_0x7fd5('0x98')]=function(_0x38233d,_0x1e6d68,_0xa33949){return db['CmList'][_0x7fd5('0x45')]({'where':{'id':_0x38233d['params']['id']}})['then'](handleEntityNotFound(_0x1e6d68,null))[_0x7fd5('0x25')](function(_0x494e47){if(_0x494e47){return _0x494e47[_0x7fd5('0x98')](_0x38233d[_0x7fd5('0x30')][_0x7fd5('0x60')])[_0x7fd5('0x25')](function(){if(_[_0x7fd5('0x5c')](_0x38233d[_0x7fd5('0x30')]['ids'])){for(var _0x17aa9d=0x0;_0x17aa9d<_0x38233d[_0x7fd5('0x30')][_0x7fd5('0x60')][_0x7fd5('0x54')];_0x17aa9d+=0x1){socket[_0x7fd5('0x96')](_0x7fd5('0x99'),{'UserId':Number(_0x38233d[_0x7fd5('0x30')][_0x7fd5('0x60')][_0x17aa9d]),'CmListId':Number(_0x38233d[_0x7fd5('0x43')]['id'])});}}else{socket[_0x7fd5('0x96')](_0x7fd5('0x99'),{'UserId':Number(_0x38233d[_0x7fd5('0x30')][_0x7fd5('0x60')]),'CmListId':Number(_0x38233d[_0x7fd5('0x43')]['id'])});}});}})[_0x7fd5('0x25')](respondWithStatusCode(_0x1e6d68,null))[_0x7fd5('0x41')](handleError(_0x1e6d68,null));};exports['getAgents']=function(_0x245864,_0x3f1af1,_0x1936c1){var _0x401df4={};var _0x567188={};var _0x4d30d8;var _0x2cb096;return db['CmList']['findOne']({'where':{'id':_0x245864[_0x7fd5('0x43')]['id']}})[_0x7fd5('0x25')](handleEntityNotFound(_0x3f1af1,null))[_0x7fd5('0x25')](function(_0x4b3093){if(_0x4b3093){_0x4d30d8=_0x4b3093;_0x567188[_0x7fd5('0x2f')]=_[_0x7fd5('0x31')](db['User'][_0x7fd5('0x2d')]);_0x567188['query']=_[_0x7fd5('0x31')](_0x245864['query']);_0x567188['filters']=_[_0x7fd5('0x33')](_0x567188['model'],_0x567188[_0x7fd5('0x30')]);_0x401df4[_0x7fd5('0x35')]=_[_0x7fd5('0x33')](_0x567188[_0x7fd5('0x2f')],qs[_0x7fd5('0x34')](_0x245864[_0x7fd5('0x30')]['fields']));_0x401df4[_0x7fd5('0x35')]=_0x401df4[_0x7fd5('0x35')][_0x7fd5('0x54')]?_0x401df4[_0x7fd5('0x35')]:_0x567188[_0x7fd5('0x2f')];_0x401df4[_0x7fd5('0x38')]=qs['sort'](_0x245864[_0x7fd5('0x30')][_0x7fd5('0x39')]);_0x401df4[_0x7fd5('0x3a')]=qs['filters'](_[_0x7fd5('0x3b')](_0x245864['query'],_0x567188[_0x7fd5('0x32')]));if(_0x245864[_0x7fd5('0x30')][_0x7fd5('0x3c')]){_0x401df4[_0x7fd5('0x3a')]=_[_0x7fd5('0x3d')](_0x401df4[_0x7fd5('0x3a')],{'$or':_[_0x7fd5('0x2c')](_0x401df4['attributes'],function(_0x57e1eb){var _0x492fec={};_0x492fec[_0x57e1eb]={'$like':'%'+_0x245864[_0x7fd5('0x30')]['filter']+'%'};return _0x492fec;})});}_0x401df4=_[_0x7fd5('0x3d')]({},_0x401df4,_0x245864['options']);return _0x4d30d8[_0x7fd5('0x9a')](_0x401df4);}})[_0x7fd5('0x25')](function(_0x2cea68){if(_0x2cea68){_0x2cb096=_0x2cea68[_0x7fd5('0x54')];if(!_0x245864['query']['hasOwnProperty'](_0x7fd5('0x55'))){_0x401df4[_0x7fd5('0x37')]=qs[_0x7fd5('0x37')](_0x245864[_0x7fd5('0x30')][_0x7fd5('0x37')]);_0x401df4[_0x7fd5('0x1e')]=qs[_0x7fd5('0x1e')](_0x245864[_0x7fd5('0x30')][_0x7fd5('0x1e')]);}return _0x4d30d8[_0x7fd5('0x9a')](_0x401df4);}})['then'](function(_0x3911d7){if(_0x3911d7){return _0x3911d7?{'count':_0x2cb096,'rows':_0x3911d7}:null;}})[_0x7fd5('0x25')](respondWithResult(_0x3f1af1,null))[_0x7fd5('0x41')](handleError(_0x3f1af1,null));};function handleQuery(_0x4bb51e){logger[_0x7fd5('0x9b')](_0x4bb51e);return db[_0x7fd5('0x8e')][_0x7fd5('0x30')](_0x4bb51e)['spread'](function(_0xc85e01){csv_results[_0x7fd5('0x5d')](_0xc85e01);})['catch'](function(_0x250c83){logger[_0x7fd5('0x29')](_0x250c83[_0x7fd5('0x62')]);});} \ No newline at end of file diff --git a/server/api/cmList/cmList.events.js b/server/api/cmList/cmList.events.js index 84a378f..3e854bd 100644 --- a/server/api/cmList/cmList.events.js +++ b/server/api/cmList/cmList.events.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x5fc3=['events','../../mysqldb','setMaxListeners','save','update','remove','emit','hook'];(function(_0x35ef6b,_0x202c42){var _0x3ad145=function(_0x3092de){while(--_0x3092de){_0x35ef6b['push'](_0x35ef6b['shift']());}};_0x3ad145(++_0x202c42);}(_0x5fc3,0xa8));var _0x35fc=function(_0x4de1b1,_0x18c64c){_0x4de1b1=_0x4de1b1-0x0;var _0x639f27=_0x5fc3[_0x4de1b1];return _0x639f27;};'use strict';var EventEmitter=require(_0x35fc('0x0'));var CmList=require(_0x35fc('0x1'))['db']['CmList'];var CmListEvents=new EventEmitter();CmListEvents[_0x35fc('0x2')](0x0);var events={'afterCreate':_0x35fc('0x3'),'afterUpdate':_0x35fc('0x4'),'afterDestroy':_0x35fc('0x5')};function emitEvent(_0xb4f9ce){return function(_0x5e75e6,_0x2d1404,_0x1d5fec){CmListEvents[_0x35fc('0x6')](_0xb4f9ce+':'+_0x5e75e6['id'],_0x5e75e6);CmListEvents['emit'](_0xb4f9ce,_0x5e75e6);_0x1d5fec(null);};}for(var e in events){if(events['hasOwnProperty'](e)){var event=events[e];CmList[_0x35fc('0x7')](e,emitEvent(event));}}module['exports']=CmListEvents; \ No newline at end of file +var _0x7217=['emit','hasOwnProperty','hook','exports','events','CmList','setMaxListeners','save','update','remove'];(function(_0x21eb3c,_0x7ce88b){var _0x4bd2aa=function(_0x1b4bfd){while(--_0x1b4bfd){_0x21eb3c['push'](_0x21eb3c['shift']());}};_0x4bd2aa(++_0x7ce88b);}(_0x7217,0x19e));var _0x7721=function(_0x376b45,_0x5964fb){_0x376b45=_0x376b45-0x0;var _0x2341b3=_0x7217[_0x376b45];return _0x2341b3;};'use strict';var EventEmitter=require(_0x7721('0x0'));var CmList=require('../../mysqldb')['db'][_0x7721('0x1')];var CmListEvents=new EventEmitter();CmListEvents[_0x7721('0x2')](0x0);var events={'afterCreate':_0x7721('0x3'),'afterUpdate':_0x7721('0x4'),'afterDestroy':_0x7721('0x5')};function emitEvent(_0x4d6446){return function(_0x5bf160,_0x472a96,_0xce17f9){CmListEvents[_0x7721('0x6')](_0x4d6446+':'+_0x5bf160['id'],_0x5bf160);CmListEvents[_0x7721('0x6')](_0x4d6446,_0x5bf160);_0xce17f9(null);};}for(var e in events){if(events[_0x7721('0x7')](e)){var event=events[e];CmList[_0x7721('0x8')](e,emitEvent(event));}}module[_0x7721('0x9')]=CmListEvents; \ No newline at end of file diff --git a/server/api/cmList/cmList.model.js b/server/api/cmList/cmList.model.js index d93627a..de68427 100644 --- a/server/api/cmList/cmList.model.js +++ b/server/api/cmList/cmList.model.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xbec5=['request-promise','path','../../config/environment','./cmList.attributes','exports','define','CmList','cm_lists','lodash','util','api','moment','bluebird'];(function(_0x135eca,_0x1efa7d){var _0x964f94=function(_0x5bd932){while(--_0x5bd932){_0x135eca['push'](_0x135eca['shift']());}};_0x964f94(++_0x1efa7d);}(_0xbec5,0xe5));var _0x5bec=function(_0x2cc569,_0x4e9568){_0x2cc569=_0x2cc569-0x0;var _0x1bfc2e=_0xbec5[_0x2cc569];return _0x1bfc2e;};'use strict';var _=require(_0x5bec('0x0'));var util=require(_0x5bec('0x1'));var logger=require('../../config/logger')(_0x5bec('0x2'));var moment=require(_0x5bec('0x3'));var BPromise=require(_0x5bec('0x4'));var rp=require(_0x5bec('0x5'));var fs=require('fs');var path=require(_0x5bec('0x6'));var rimraf=require('rimraf');var config=require(_0x5bec('0x7'));var attributes=require(_0x5bec('0x8'));module[_0x5bec('0x9')]=function(_0x4aaac6,_0x3ed67a){return _0x4aaac6[_0x5bec('0xa')](_0x5bec('0xb'),attributes,{'tableName':_0x5bec('0xc'),'paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file +var _0x2750=['rimraf','../../config/environment','./cmList.attributes','exports','define','CmList','cm_lists','lodash','../../config/logger','api','moment','bluebird','request-promise','path'];(function(_0x4a6976,_0x28ac19){var _0x181580=function(_0x1b2d61){while(--_0x1b2d61){_0x4a6976['push'](_0x4a6976['shift']());}};_0x181580(++_0x28ac19);}(_0x2750,0x13b));var _0x0275=function(_0x2f4466,_0x28d0d4){_0x2f4466=_0x2f4466-0x0;var _0x16d1af=_0x2750[_0x2f4466];return _0x16d1af;};'use strict';var _=require(_0x0275('0x0'));var util=require('util');var logger=require(_0x0275('0x1'))(_0x0275('0x2'));var moment=require(_0x0275('0x3'));var BPromise=require(_0x0275('0x4'));var rp=require(_0x0275('0x5'));var fs=require('fs');var path=require(_0x0275('0x6'));var rimraf=require(_0x0275('0x7'));var config=require(_0x0275('0x8'));var attributes=require(_0x0275('0x9'));module[_0x0275('0xa')]=function(_0x5953f9,_0x3f645f){return _0x5953f9[_0x0275('0xb')](_0x0275('0xc'),attributes,{'tableName':_0x0275('0xd'),'paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file diff --git a/server/api/cmList/cmList.rpc.js b/server/api/cmList/cmList.rpc.js index 1d4af3b..000f8d0 100644 --- a/server/api/cmList/cmList.rpc.js +++ b/server/api/cmList/cmList.rpc.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x4c0c=['socket.io-emitter','./cmList.socket','register','request','then','info','CmList,\x20%s,\x20%s','debug','CmList,\x20%s,\x20%s,\x20%s','request\x20sent','error','message','result','catch','util','moment','randomstring','ioredis','rpc','../../config/environment','client','http','redis','defaults','localhost'];(function(_0x4e7d25,_0x58285f){var _0x526fe6=function(_0x4f0aec){while(--_0x4f0aec){_0x4e7d25['push'](_0x4e7d25['shift']());}};_0x526fe6(++_0x58285f);}(_0x4c0c,0x1e9));var _0xc4c0=function(_0x140558,_0x212c11){_0x140558=_0x140558-0x0;var _0x1fce28=_0x4c0c[_0x140558];return _0x1fce28;};'use strict';var _=require('lodash');var util=require(_0xc4c0('0x0'));var moment=require(_0xc4c0('0x1'));var BPromise=require('bluebird');var rs=require(_0xc4c0('0x2'));var fs=require('fs');var Redis=require(_0xc4c0('0x3'));var db=require('../../mysqldb')['db'];var utils=require('../../config/utils');var logger=require('../../config/logger')(_0xc4c0('0x4'));var config=require(_0xc4c0('0x5'));var jayson=require('jayson/promise');var client=jayson[_0xc4c0('0x6')][_0xc4c0('0x7')]({'port':0x232a});config[_0xc4c0('0x8')]=_[_0xc4c0('0x9')](config[_0xc4c0('0x8')],{'host':_0xc4c0('0xa'),'port':0x18eb});var socket=require(_0xc4c0('0xb'))(new Redis(config[_0xc4c0('0x8')]));require(_0xc4c0('0xc'))[_0xc4c0('0xd')](socket);function respondWithRpcPromise(_0x271dab,_0x392f1a,_0x1906fe){return new BPromise(function(_0x31934a,_0x2a45e5){return client[_0xc4c0('0xe')](_0x271dab,_0x1906fe)[_0xc4c0('0xf')](function(_0x1bcbd4){logger[_0xc4c0('0x10')](_0xc4c0('0x11'),_0x392f1a,'request\x20sent');logger[_0xc4c0('0x12')](_0xc4c0('0x13'),_0x392f1a,_0xc4c0('0x14'),JSON['stringify'](_0x1bcbd4));if(_0x1bcbd4[_0xc4c0('0x15')]){if(_0x1bcbd4[_0xc4c0('0x15')]['code']===0x1f4){logger[_0xc4c0('0x15')](_0xc4c0('0x11'),_0x392f1a,_0x1bcbd4['error'][_0xc4c0('0x16')]);return _0x2a45e5(_0x1bcbd4[_0xc4c0('0x15')][_0xc4c0('0x16')]);}logger['error'](_0xc4c0('0x11'),_0x392f1a,_0x1bcbd4[_0xc4c0('0x15')][_0xc4c0('0x16')]);return _0x31934a(_0x1bcbd4['error'][_0xc4c0('0x16')]);}else{logger[_0xc4c0('0x10')](_0xc4c0('0x11'),_0x392f1a,_0xc4c0('0x14'));_0x31934a(_0x1bcbd4[_0xc4c0('0x17')][_0xc4c0('0x16')]);}})[_0xc4c0('0x18')](function(_0xb559de){logger['error']('CmList,\x20%s,\x20%s',_0x392f1a,_0xb559de);_0x2a45e5(_0xb559de);});});} \ No newline at end of file +var _0xabbd=['ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','http','redis','defaults','localhost','socket.io-emitter','./cmList.socket','register','info','CmList,\x20%s,\x20%s','request\x20sent','debug','CmList,\x20%s,\x20%s,\x20%s','error','message','result','lodash','util','bluebird','randomstring'];(function(_0x16757a,_0x3dc5e2){var _0x4bc089=function(_0x1ff243){while(--_0x1ff243){_0x16757a['push'](_0x16757a['shift']());}};_0x4bc089(++_0x3dc5e2);}(_0xabbd,0x14e));var _0xdabb=function(_0x20f20b,_0xc40935){_0x20f20b=_0x20f20b-0x0;var _0x3af5a1=_0xabbd[_0x20f20b];return _0x3af5a1;};'use strict';var _=require(_0xdabb('0x0'));var util=require(_0xdabb('0x1'));var moment=require('moment');var BPromise=require(_0xdabb('0x2'));var rs=require(_0xdabb('0x3'));var fs=require('fs');var Redis=require(_0xdabb('0x4'));var db=require(_0xdabb('0x5'))['db'];var utils=require(_0xdabb('0x6'));var logger=require(_0xdabb('0x7'))(_0xdabb('0x8'));var config=require(_0xdabb('0x9'));var jayson=require(_0xdabb('0xa'));var client=jayson['client'][_0xdabb('0xb')]({'port':0x232a});config[_0xdabb('0xc')]=_[_0xdabb('0xd')](config[_0xdabb('0xc')],{'host':_0xdabb('0xe'),'port':0x18eb});var socket=require(_0xdabb('0xf'))(new Redis(config['redis']));require(_0xdabb('0x10'))[_0xdabb('0x11')](socket);function respondWithRpcPromise(_0x1bca55,_0x2be9a8,_0x35b892){return new BPromise(function(_0x47850c,_0x562d54){return client['request'](_0x1bca55,_0x35b892)['then'](function(_0x288486){logger[_0xdabb('0x12')](_0xdabb('0x13'),_0x2be9a8,_0xdabb('0x14'));logger[_0xdabb('0x15')](_0xdabb('0x16'),_0x2be9a8,'request\x20sent',JSON['stringify'](_0x288486));if(_0x288486[_0xdabb('0x17')]){if(_0x288486[_0xdabb('0x17')]['code']===0x1f4){logger['error'](_0xdabb('0x13'),_0x2be9a8,_0x288486[_0xdabb('0x17')][_0xdabb('0x18')]);return _0x562d54(_0x288486[_0xdabb('0x17')][_0xdabb('0x18')]);}logger[_0xdabb('0x17')](_0xdabb('0x13'),_0x2be9a8,_0x288486['error'][_0xdabb('0x18')]);return _0x47850c(_0x288486[_0xdabb('0x17')][_0xdabb('0x18')]);}else{logger['info'](_0xdabb('0x13'),_0x2be9a8,_0xdabb('0x14'));_0x47850c(_0x288486[_0xdabb('0x19')][_0xdabb('0x18')]);}})['catch'](function(_0x14bb19){logger[_0xdabb('0x17')](_0xdabb('0x13'),_0x2be9a8,_0x14bb19);_0x562d54(_0x14bb19);});});} \ No newline at end of file diff --git a/server/api/cmList/cmList.socket.js b/server/api/cmList/cmList.socket.js index 40482cd..3a95c07 100644 --- a/server/api/cmList/cmList.socket.js +++ b/server/api/cmList/cmList.socket.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x879f=['update','removeListener','register','length','cmList:','save','remove'];(function(_0x433a86,_0x175b5c){var _0x23000c=function(_0x4b1fa0){while(--_0x4b1fa0){_0x433a86['push'](_0x433a86['shift']());}};_0x23000c(++_0x175b5c);}(_0x879f,0xa6));var _0xf879=function(_0x5f1486,_0x2d7181){_0x5f1486=_0x5f1486-0x0;var _0x1053af=_0x879f[_0x5f1486];return _0x1053af;};'use strict';var CmListEvents=require('./cmList.events');var events=[_0xf879('0x0'),_0xf879('0x1'),_0xf879('0x2')];function createListener(_0x2097b9,_0x10a622){return function(_0x5eb75b){_0x10a622['emit'](_0x2097b9,_0x5eb75b);};}function removeListener(_0x415ad5,_0x5e29c1){return function(){CmListEvents[_0xf879('0x3')](_0x415ad5,_0x5e29c1);};}exports[_0xf879('0x4')]=function(_0x54889f){for(var _0x32b8dc=0x0,_0x15b703=events[_0xf879('0x5')];_0x32b8dc<_0x15b703;_0x32b8dc++){var _0x32a2d6=events[_0x32b8dc];var _0x417fb6=createListener(_0xf879('0x6')+_0x32a2d6,_0x54889f);CmListEvents['on'](_0x32a2d6,_0x417fb6);}}; \ No newline at end of file +var _0x85fe=['length','./cmList.events','save','remove','removeListener','register'];(function(_0x1b6186,_0x1ec7f2){var _0x186121=function(_0x1748a8){while(--_0x1748a8){_0x1b6186['push'](_0x1b6186['shift']());}};_0x186121(++_0x1ec7f2);}(_0x85fe,0x11b));var _0xe85f=function(_0x2a25a6,_0x17f5bb){_0x2a25a6=_0x2a25a6-0x0;var _0x48eb87=_0x85fe[_0x2a25a6];return _0x48eb87;};'use strict';var CmListEvents=require(_0xe85f('0x0'));var events=[_0xe85f('0x1'),_0xe85f('0x2'),'update'];function createListener(_0x478b9e,_0x1f8ba4){return function(_0x2c28da){_0x1f8ba4['emit'](_0x478b9e,_0x2c28da);};}function removeListener(_0x461588,_0x2d48ac){return function(){CmListEvents[_0xe85f('0x3')](_0x461588,_0x2d48ac);};}exports[_0xe85f('0x4')]=function(_0x46e136){for(var _0x44e2f4=0x0,_0x4e3036=events[_0xe85f('0x5')];_0x44e2f4<_0x4e3036;_0x44e2f4++){var _0x2df131=events[_0x44e2f4];var _0x39635a=createListener('cmList:'+_0x2df131,_0x46e136);CmListEvents['on'](_0x2df131,_0x39635a);}}; \ No newline at end of file diff --git a/server/api/cmList/index.js b/server/api/cmList/index.js index 19805f3..1681392 100644 --- a/server/api/cmList/index.js +++ b/server/api/cmList/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x90a8=['get','isAuthenticated','index','/describe','describe','/global_fields','/:id','show','/:id/contacts','getContacts','/:id/fields','getCustomFields','/:id/users','getAgents','post','/:id/dispositions','addDisposition','addContacts','addAgents','put','update','delete','destroy','removeAgents','multer','util','connect-timeout','express','Router','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','./cmList.controller'];(function(_0x657b7d,_0x45a7f8){var _0x3182aa=function(_0x330520){while(--_0x330520){_0x657b7d['push'](_0x657b7d['shift']());}};_0x3182aa(++_0x45a7f8);}(_0x90a8,0x14a));var _0x890a=function(_0x6b0f33,_0x38be20){_0x6b0f33=_0x6b0f33-0x0;var _0x51020f=_0x90a8[_0x6b0f33];return _0x51020f;};'use strict';var multer=require(_0x890a('0x0'));var util=require(_0x890a('0x1'));var path=require('path');var timeout=require(_0x890a('0x2'));var express=require(_0x890a('0x3'));var router=express[_0x890a('0x4')]();var fs_extra=require(_0x890a('0x5'));var auth=require(_0x890a('0x6'));var interaction=require(_0x890a('0x7'));var config=require(_0x890a('0x8'));var controller=require(_0x890a('0x9'));router[_0x890a('0xa')]('/',auth[_0x890a('0xb')](),controller[_0x890a('0xc')]);router['get'](_0x890a('0xd'),auth[_0x890a('0xb')](),controller[_0x890a('0xe')]);router[_0x890a('0xa')](_0x890a('0xf'),auth['isAuthenticated'](),controller['getGlobalCustomFields']);router['get'](_0x890a('0x10'),auth[_0x890a('0xb')](),controller[_0x890a('0x11')]);router[_0x890a('0xa')]('/:id/dispositions',auth['isAuthenticated'](),controller['getDispositions']);router[_0x890a('0xa')](_0x890a('0x12'),auth[_0x890a('0xb')](),controller[_0x890a('0x13')]);router[_0x890a('0xa')]('/:id/contacts/csv',auth[_0x890a('0xb')](),controller['getContactsCsv']);router['get'](_0x890a('0x14'),auth[_0x890a('0xb')](),controller[_0x890a('0x15')]);router[_0x890a('0xa')](_0x890a('0x16'),auth[_0x890a('0xb')](),controller[_0x890a('0x17')]);router[_0x890a('0x18')]('/',auth[_0x890a('0xb')](),controller['create']);router[_0x890a('0x18')](_0x890a('0x19'),auth[_0x890a('0xb')](),controller[_0x890a('0x1a')]);router['post'](_0x890a('0x12'),auth[_0x890a('0xb')](),controller[_0x890a('0x1b')]);router['post'](_0x890a('0x14'),auth[_0x890a('0xb')](),controller['addCustomField']);router[_0x890a('0x18')](_0x890a('0x16'),auth[_0x890a('0xb')](),controller[_0x890a('0x1c')]);router[_0x890a('0x1d')](_0x890a('0x10'),auth['isAuthenticated'](),controller[_0x890a('0x1e')]);router[_0x890a('0x1f')]('/:id',auth[_0x890a('0xb')](),controller[_0x890a('0x20')]);router['delete'](_0x890a('0x19'),auth[_0x890a('0xb')](),controller['removeDispositions']);router[_0x890a('0x1f')]('/:id/users',auth['isAuthenticated'](),controller[_0x890a('0x21')]);module['exports']=router; \ No newline at end of file +var _0xa7aa=['addContacts','/:id/fields','addAgents','update','delete','destroy','removeDispositions','removeAgents','exports','util','path','connect-timeout','express','Router','fs-extra','../../config/environment','index','isAuthenticated','describe','get','/global_fields','getGlobalCustomFields','/:id','show','getDispositions','/:id/contacts','getContacts','getCustomFields','/:id/users','getAgents','post','create','/:id/dispositions'];(function(_0x284258,_0x41159b){var _0x1231fc=function(_0x13683d){while(--_0x13683d){_0x284258['push'](_0x284258['shift']());}};_0x1231fc(++_0x41159b);}(_0xa7aa,0x8d));var _0xaa7a=function(_0x37fb4f,_0x2611c8){_0x37fb4f=_0x37fb4f-0x0;var _0x7c779d=_0xa7aa[_0x37fb4f];return _0x7c779d;};'use strict';var multer=require('multer');var util=require(_0xaa7a('0x0'));var path=require(_0xaa7a('0x1'));var timeout=require(_0xaa7a('0x2'));var express=require(_0xaa7a('0x3'));var router=express[_0xaa7a('0x4')]();var fs_extra=require(_0xaa7a('0x5'));var auth=require('../../components/auth/service');var interaction=require('../../components/interaction/service');var config=require(_0xaa7a('0x6'));var controller=require('./cmList.controller');router['get']('/',auth['isAuthenticated'](),controller[_0xaa7a('0x7')]);router['get']('/describe',auth[_0xaa7a('0x8')](),controller[_0xaa7a('0x9')]);router[_0xaa7a('0xa')](_0xaa7a('0xb'),auth['isAuthenticated'](),controller[_0xaa7a('0xc')]);router[_0xaa7a('0xa')](_0xaa7a('0xd'),auth[_0xaa7a('0x8')](),controller[_0xaa7a('0xe')]);router[_0xaa7a('0xa')]('/:id/dispositions',auth['isAuthenticated'](),controller[_0xaa7a('0xf')]);router[_0xaa7a('0xa')](_0xaa7a('0x10'),auth['isAuthenticated'](),controller[_0xaa7a('0x11')]);router[_0xaa7a('0xa')]('/:id/contacts/csv',auth['isAuthenticated'](),controller['getContactsCsv']);router[_0xaa7a('0xa')]('/:id/fields',auth[_0xaa7a('0x8')](),controller[_0xaa7a('0x12')]);router[_0xaa7a('0xa')](_0xaa7a('0x13'),auth['isAuthenticated'](),controller[_0xaa7a('0x14')]);router[_0xaa7a('0x15')]('/',auth[_0xaa7a('0x8')](),controller[_0xaa7a('0x16')]);router['post'](_0xaa7a('0x17'),auth['isAuthenticated'](),controller['addDisposition']);router[_0xaa7a('0x15')](_0xaa7a('0x10'),auth['isAuthenticated'](),controller[_0xaa7a('0x18')]);router[_0xaa7a('0x15')](_0xaa7a('0x19'),auth['isAuthenticated'](),controller['addCustomField']);router[_0xaa7a('0x15')](_0xaa7a('0x13'),auth[_0xaa7a('0x8')](),controller[_0xaa7a('0x1a')]);router['put'](_0xaa7a('0xd'),auth[_0xaa7a('0x8')](),controller[_0xaa7a('0x1b')]);router[_0xaa7a('0x1c')]('/:id',auth['isAuthenticated'](),controller[_0xaa7a('0x1d')]);router[_0xaa7a('0x1c')](_0xaa7a('0x17'),auth['isAuthenticated'](),controller[_0xaa7a('0x1e')]);router[_0xaa7a('0x1c')](_0xaa7a('0x13'),auth['isAuthenticated'](),controller[_0xaa7a('0x1f')]);module[_0xaa7a('0x20')]=router; \ No newline at end of file diff --git a/server/api/condition/condition.attributes.js b/server/api/condition/condition.attributes.js index 763e07e..0a2988f 100644 --- a/server/api/condition/condition.attributes.js +++ b/server/api/condition/condition.attributes.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x8481=['field','STRING','getDataValue'];(function(_0x24f31b,_0x44b8f3){var _0x488401=function(_0x204caf){while(--_0x204caf){_0x24f31b['push'](_0x24f31b['shift']());}};_0x488401(++_0x44b8f3);}(_0x8481,0x1c1));var _0x1848=function(_0xb24fad,_0xd58756){_0xb24fad=_0xb24fad-0x0;var _0x173226=_0x8481[_0xb24fad];return _0x173226;};'use strict';var Sequelize=require('sequelize');module['exports']={'name':{'type':Sequelize['VIRTUAL'],'get':function(_0x237c97){return this[_0x1848('0x0')](_0x1848('0x1'));}},'field':{'type':Sequelize[_0x1848('0x2')],'allowNull':![]},'operator':{'type':Sequelize['STRING'],'allowNull':![]},'value':{'type':Sequelize['STRING'],'allowNull':![]}}; \ No newline at end of file +var _0xfe1c=['STRING','sequelize','exports','VIRTUAL','getDataValue'];(function(_0xc4514,_0x3c0572){var _0x1b50db=function(_0x2afa0a){while(--_0x2afa0a){_0xc4514['push'](_0xc4514['shift']());}};_0x1b50db(++_0x3c0572);}(_0xfe1c,0x6f));var _0xcfe1=function(_0x222dc6,_0x2ce4b2){_0x222dc6=_0x222dc6-0x0;var _0x3d7eaf=_0xfe1c[_0x222dc6];return _0x3d7eaf;};'use strict';var Sequelize=require(_0xcfe1('0x0'));module[_0xcfe1('0x1')]={'name':{'type':Sequelize[_0xcfe1('0x2')],'get':function(_0x2f4dd9){return this[_0xcfe1('0x3')]('field');}},'field':{'type':Sequelize[_0xcfe1('0x4')],'allowNull':![]},'operator':{'type':Sequelize['STRING'],'allowNull':![]},'value':{'type':Sequelize[_0xcfe1('0x4')],'allowNull':![]}}; \ No newline at end of file diff --git a/server/api/condition/condition.controller.js b/server/api/condition/condition.controller.js index 84f137e..51fd3ee 100644 --- a/server/api/condition/condition.controller.js +++ b/server/api/condition/condition.controller.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x7a54=['sox','to-csv','fs-extra','squel','crypto','desk.js','ioredis','../../components/auth/service','../../components/parsers/advancedSearch','api','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','sendStatus','status','end','json','offset','undefined','count','limit','set','Content-Range','reject','save','update','then','destroy','error','stack','name','send','body','Condition','find','catch','eml-format','rimraf','zip-dir','request-promise','moment','mustache','util','path'];(function(_0x5b6c74,_0x56fd64){var _0x1d3714=function(_0x3b77cc){while(--_0x3b77cc){_0x5b6c74['push'](_0x5b6c74['shift']());}};_0x1d3714(++_0x56fd64);}(_0x7a54,0x106));var _0x47a5=function(_0x50ce98,_0x2e2e74){_0x50ce98=_0x50ce98-0x0;var _0x85e1ec=_0x7a54[_0x50ce98];return _0x85e1ec;};'use strict';var emlformat=require(_0x47a5('0x0'));var rimraf=require(_0x47a5('0x1'));var zipdir=require(_0x47a5('0x2'));var jsonpatch=require('fast-json-patch');var rp=require(_0x47a5('0x3'));var moment=require(_0x47a5('0x4'));var BPromise=require('bluebird');var Mustache=require(_0x47a5('0x5'));var util=require(_0x47a5('0x6'));var path=require(_0x47a5('0x7'));var sox=require(_0x47a5('0x8'));var csv=require(_0x47a5('0x9'));var ejs=require('ejs');var fs=require('fs');var fs_extra=require(_0x47a5('0xa'));var _=require('lodash');var squel=require(_0x47a5('0xb'));var crypto=require(_0x47a5('0xc'));var jsforce=require('jsforce');var deskjs=require(_0x47a5('0xd'));var toCsv=require('to-csv');var querystring=require('querystring');var Papa=require('papaparse');var Redis=require(_0x47a5('0xe'));var authService=require(_0x47a5('0xf'));var qs=require('../../components/parsers/qs');var as=require(_0x47a5('0x10'));var hardwareService=require('../../config/license/hardware');var logger=require('../../config/logger')(_0x47a5('0x11'));var utils=require(_0x47a5('0x12'));var config=require(_0x47a5('0x13'));var licenseUtil=require(_0x47a5('0x14'));var db=require(_0x47a5('0x15'))['db'];function respondWithStatusCode(_0xd308b8,_0x1eae59){_0x1eae59=_0x1eae59||0xcc;return function(_0x5beb89){if(_0x5beb89){return _0xd308b8[_0x47a5('0x16')](_0x1eae59);}return _0xd308b8[_0x47a5('0x17')](_0x1eae59)[_0x47a5('0x18')]();};}function respondWithResult(_0x711793,_0x139f25){_0x139f25=_0x139f25||0xc8;return function(_0x620ee9){if(_0x620ee9){return _0x711793[_0x47a5('0x17')](_0x139f25)[_0x47a5('0x19')](_0x620ee9);}};}function respondWithFilteredResult(_0x4e99a8,_0x362359){return function(_0x11faf5){if(_0x11faf5){var _0x3b001e=typeof _0x362359[_0x47a5('0x1a')]===_0x47a5('0x1b')&&typeof _0x362359['limit']==='undefined';var _0x138bc0=_0x11faf5['count'];var _0x5247fd=_0x3b001e?0x0:_0x362359[_0x47a5('0x1a')];var _0xaf70a6=_0x3b001e?_0x11faf5[_0x47a5('0x1c')]:_0x362359[_0x47a5('0x1a')]+_0x362359[_0x47a5('0x1d')];var _0x12b98e;if(_0xaf70a6>=_0x138bc0){_0xaf70a6=_0x138bc0;_0x12b98e=0xc8;}else{_0x12b98e=0xce;}_0x4e99a8[_0x47a5('0x17')](_0x12b98e);return _0x4e99a8[_0x47a5('0x1e')](_0x47a5('0x1f'),_0x5247fd+'-'+_0xaf70a6+'/'+_0x138bc0)['json'](_0x11faf5);}return null;};}function patchUpdates(_0x1570bc){return function(_0xf160ba){try{jsonpatch['apply'](_0xf160ba,_0x1570bc,!![]);}catch(_0x2b0360){return BPromise[_0x47a5('0x20')](_0x2b0360);}return _0xf160ba[_0x47a5('0x21')]();};}function saveUpdates(_0x4c5910,_0xb8ae6c){return function(_0x2f142b){if(_0x2f142b){return _0x2f142b[_0x47a5('0x22')](_0x4c5910)[_0x47a5('0x23')](function(_0x5ef1b1){return _0x5ef1b1;});}return null;};}function removeEntity(_0xe2dea9,_0x385687){return function(_0x513981){if(_0x513981){return _0x513981[_0x47a5('0x24')]()[_0x47a5('0x23')](function(){_0xe2dea9[_0x47a5('0x17')](0xcc)[_0x47a5('0x18')]();});}};}function handleEntityNotFound(_0x3abd6a,_0x50bf17){return function(_0x53078a){if(!_0x53078a){_0x3abd6a[_0x47a5('0x16')](0x194);}return _0x53078a;};}function handleError(_0x5686db,_0x1ea9c8){_0x1ea9c8=_0x1ea9c8||0x1f4;return function(_0x5b6c4e){logger[_0x47a5('0x25')](_0x5b6c4e[_0x47a5('0x26')]);if(_0x5b6c4e[_0x47a5('0x27')]){delete _0x5b6c4e[_0x47a5('0x27')];}_0x5686db[_0x47a5('0x17')](_0x1ea9c8)[_0x47a5('0x28')](_0x5b6c4e);};}exports[_0x47a5('0x22')]=function(_0x136b14,_0x16631f){if(_0x136b14[_0x47a5('0x29')]['id']){delete _0x136b14[_0x47a5('0x29')]['id'];}return db[_0x47a5('0x2a')][_0x47a5('0x2b')]({'where':{'id':_0x136b14['params']['id']}})[_0x47a5('0x23')](handleEntityNotFound(_0x16631f,null))['then'](saveUpdates(_0x136b14[_0x47a5('0x29')],null))[_0x47a5('0x23')](respondWithResult(_0x16631f,null))[_0x47a5('0x2c')](handleError(_0x16631f,null));};exports['destroy']=function(_0x256650,_0x625952){return db[_0x47a5('0x2a')][_0x47a5('0x2b')]({'where':{'id':_0x256650['params']['id']}})['then'](handleEntityNotFound(_0x625952,null))[_0x47a5('0x23')](removeEntity(_0x625952,null))[_0x47a5('0x2c')](handleError(_0x625952,null));}; \ No newline at end of file +var _0x9957=['eml-format','rimraf','zip-dir','fast-json-patch','moment','bluebird','mustache','util','sox','to-csv','ejs','fs-extra','lodash','squel','jsforce','desk.js','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','api','../../config/utils','../../config/license/util','../../mysqldb','sendStatus','status','json','undefined','count','offset','limit','set','Content-Range','reject','save','then','destroy','error','name','send','update','body','Condition','find','catch','params'];(function(_0xe5b32,_0x57acb6){var _0x17e7e8=function(_0x5b0cb2){while(--_0x5b0cb2){_0xe5b32['push'](_0xe5b32['shift']());}};_0x17e7e8(++_0x57acb6);}(_0x9957,0x93));var _0x7995=function(_0x2f5ac5,_0x1ee939){_0x2f5ac5=_0x2f5ac5-0x0;var _0x37c9a8=_0x9957[_0x2f5ac5];return _0x37c9a8;};'use strict';var emlformat=require(_0x7995('0x0'));var rimraf=require(_0x7995('0x1'));var zipdir=require(_0x7995('0x2'));var jsonpatch=require(_0x7995('0x3'));var rp=require('request-promise');var moment=require(_0x7995('0x4'));var BPromise=require(_0x7995('0x5'));var Mustache=require(_0x7995('0x6'));var util=require(_0x7995('0x7'));var path=require('path');var sox=require(_0x7995('0x8'));var csv=require(_0x7995('0x9'));var ejs=require(_0x7995('0xa'));var fs=require('fs');var fs_extra=require(_0x7995('0xb'));var _=require(_0x7995('0xc'));var squel=require(_0x7995('0xd'));var crypto=require('crypto');var jsforce=require(_0x7995('0xe'));var deskjs=require(_0x7995('0xf'));var toCsv=require('to-csv');var querystring=require(_0x7995('0x10'));var Papa=require(_0x7995('0x11'));var Redis=require(_0x7995('0x12'));var authService=require(_0x7995('0x13'));var qs=require(_0x7995('0x14'));var as=require(_0x7995('0x15'));var hardwareService=require(_0x7995('0x16'));var logger=require('../../config/logger')(_0x7995('0x17'));var utils=require(_0x7995('0x18'));var config=require('../../config/environment');var licenseUtil=require(_0x7995('0x19'));var db=require(_0x7995('0x1a'))['db'];function respondWithStatusCode(_0x19a27e,_0x385f00){_0x385f00=_0x385f00||0xcc;return function(_0x281576){if(_0x281576){return _0x19a27e[_0x7995('0x1b')](_0x385f00);}return _0x19a27e[_0x7995('0x1c')](_0x385f00)['end']();};}function respondWithResult(_0x58f5ad,_0x2b4e94){_0x2b4e94=_0x2b4e94||0xc8;return function(_0x2233dd){if(_0x2233dd){return _0x58f5ad[_0x7995('0x1c')](_0x2b4e94)[_0x7995('0x1d')](_0x2233dd);}};}function respondWithFilteredResult(_0x3f1d3e,_0x1a5310){return function(_0x2202ce){if(_0x2202ce){var _0x41cbf0=typeof _0x1a5310['offset']===_0x7995('0x1e')&&typeof _0x1a5310['limit']===_0x7995('0x1e');var _0x37f297=_0x2202ce[_0x7995('0x1f')];var _0x291317=_0x41cbf0?0x0:_0x1a5310[_0x7995('0x20')];var _0x37a7d4=_0x41cbf0?_0x2202ce['count']:_0x1a5310['offset']+_0x1a5310[_0x7995('0x21')];var _0x5e6f90;if(_0x37a7d4>=_0x37f297){_0x37a7d4=_0x37f297;_0x5e6f90=0xc8;}else{_0x5e6f90=0xce;}_0x3f1d3e['status'](_0x5e6f90);return _0x3f1d3e[_0x7995('0x22')](_0x7995('0x23'),_0x291317+'-'+_0x37a7d4+'/'+_0x37f297)['json'](_0x2202ce);}return null;};}function patchUpdates(_0x3a9b54){return function(_0x51f276){try{jsonpatch['apply'](_0x51f276,_0x3a9b54,!![]);}catch(_0x3e4c54){return BPromise[_0x7995('0x24')](_0x3e4c54);}return _0x51f276[_0x7995('0x25')]();};}function saveUpdates(_0x1a8568,_0x460924){return function(_0x1c278a){if(_0x1c278a){return _0x1c278a['update'](_0x1a8568)[_0x7995('0x26')](function(_0x46ee4b){return _0x46ee4b;});}return null;};}function removeEntity(_0x204507,_0x285437){return function(_0x563799){if(_0x563799){return _0x563799[_0x7995('0x27')]()[_0x7995('0x26')](function(){_0x204507[_0x7995('0x1c')](0xcc)['end']();});}};}function handleEntityNotFound(_0x39df42,_0x34e70c){return function(_0x401dc3){if(!_0x401dc3){_0x39df42[_0x7995('0x1b')](0x194);}return _0x401dc3;};}function handleError(_0x3a3fcf,_0x2a307e){_0x2a307e=_0x2a307e||0x1f4;return function(_0x56691a){logger[_0x7995('0x28')](_0x56691a['stack']);if(_0x56691a[_0x7995('0x29')]){delete _0x56691a[_0x7995('0x29')];}_0x3a3fcf[_0x7995('0x1c')](_0x2a307e)[_0x7995('0x2a')](_0x56691a);};}exports[_0x7995('0x2b')]=function(_0x4b6f99,_0x9b2a15){if(_0x4b6f99['body']['id']){delete _0x4b6f99[_0x7995('0x2c')]['id'];}return db[_0x7995('0x2d')][_0x7995('0x2e')]({'where':{'id':_0x4b6f99['params']['id']}})['then'](handleEntityNotFound(_0x9b2a15,null))['then'](saveUpdates(_0x4b6f99[_0x7995('0x2c')],null))[_0x7995('0x26')](respondWithResult(_0x9b2a15,null))[_0x7995('0x2f')](handleError(_0x9b2a15,null));};exports[_0x7995('0x27')]=function(_0x2e3493,_0x1ca460){return db['Condition']['find']({'where':{'id':_0x2e3493[_0x7995('0x30')]['id']}})['then'](handleEntityNotFound(_0x1ca460,null))[_0x7995('0x26')](removeEntity(_0x1ca460,null))[_0x7995('0x2f')](handleError(_0x1ca460,null));}; \ No newline at end of file diff --git a/server/api/condition/condition.model.js b/server/api/condition/condition.model.js index 2677ce8..748a3ec 100644 --- a/server/api/condition/condition.model.js +++ b/server/api/condition/condition.model.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xe3aa=['request-promise','path','rimraf','../../config/environment','exports','Condition','util','../../config/logger','api','moment'];(function(_0x334e5a,_0x4bef2d){var _0x179fee=function(_0x27d048){while(--_0x27d048){_0x334e5a['push'](_0x334e5a['shift']());}};_0x179fee(++_0x4bef2d);}(_0xe3aa,0x132));var _0xae3a=function(_0x292782,_0x2b724a){_0x292782=_0x292782-0x0;var _0x4f0843=_0xe3aa[_0x292782];return _0x4f0843;};'use strict';var _=require('lodash');var util=require(_0xae3a('0x0'));var logger=require(_0xae3a('0x1'))(_0xae3a('0x2'));var moment=require(_0xae3a('0x3'));var BPromise=require('bluebird');var rp=require(_0xae3a('0x4'));var fs=require('fs');var path=require(_0xae3a('0x5'));var rimraf=require(_0xae3a('0x6'));var config=require(_0xae3a('0x7'));var attributes=require('./condition.attributes');module[_0xae3a('0x8')]=function(_0x39ce8e,_0x42b10d){return _0x39ce8e['define'](_0xae3a('0x9'),attributes,{'tableName':'tools_conditions','paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file +var _0x0df5=['api','moment','bluebird','request-promise','../../config/environment','define','Condition','tools_conditions','util','../../config/logger'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0x0df5,0x166));var _0x50df=function(_0x1f7210,_0x359e76){_0x1f7210=_0x1f7210-0x0;var _0x5162e1=_0x0df5[_0x1f7210];return _0x5162e1;};'use strict';var _=require('lodash');var util=require(_0x50df('0x0'));var logger=require(_0x50df('0x1'))(_0x50df('0x2'));var moment=require(_0x50df('0x3'));var BPromise=require(_0x50df('0x4'));var rp=require(_0x50df('0x5'));var fs=require('fs');var path=require('path');var rimraf=require('rimraf');var config=require(_0x50df('0x6'));var attributes=require('./condition.attributes');module['exports']=function(_0x45762a,_0x259226){return _0x45762a[_0x50df('0x7')](_0x50df('0x8'),attributes,{'tableName':_0x50df('0x9'),'paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file diff --git a/server/api/condition/condition.rpc.js b/server/api/condition/condition.rpc.js index 77013f3..81de364 100644 --- a/server/api/condition/condition.rpc.js +++ b/server/api/condition/condition.rpc.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x71ad=['info','request\x20sent','debug','Condition,\x20%s,\x20%s,\x20%s','error','message','Condition,\x20%s,\x20%s','result','catch','lodash','util','randomstring','ioredis','../../mysqldb','../../config/utils','jayson/promise','client','http','request'];(function(_0x438040,_0x1c1936){var _0x56ed4f=function(_0x5b3582){while(--_0x5b3582){_0x438040['push'](_0x438040['shift']());}};_0x56ed4f(++_0x1c1936);}(_0x71ad,0x126));var _0xd71a=function(_0x594de7,_0x202bea){_0x594de7=_0x594de7-0x0;var _0xecb5d7=_0x71ad[_0x594de7];return _0xecb5d7;};'use strict';var _=require(_0xd71a('0x0'));var util=require(_0xd71a('0x1'));var moment=require('moment');var BPromise=require('bluebird');var rs=require(_0xd71a('0x2'));var fs=require('fs');var Redis=require(_0xd71a('0x3'));var db=require(_0xd71a('0x4'))['db'];var utils=require(_0xd71a('0x5'));var logger=require('../../config/logger')('rpc');var config=require('../../config/environment');var jayson=require(_0xd71a('0x6'));var client=jayson[_0xd71a('0x7')][_0xd71a('0x8')]({'port':0x232a});function respondWithRpcPromise(_0x5e1fee,_0x2e46a9,_0x247d88){return new BPromise(function(_0x2e2bf9,_0x4f6057){return client[_0xd71a('0x9')](_0x5e1fee,_0x247d88)['then'](function(_0x19297c){logger[_0xd71a('0xa')]('Condition,\x20%s,\x20%s',_0x2e46a9,_0xd71a('0xb'));logger[_0xd71a('0xc')](_0xd71a('0xd'),_0x2e46a9,_0xd71a('0xb'),JSON['stringify'](_0x19297c));if(_0x19297c[_0xd71a('0xe')]){if(_0x19297c[_0xd71a('0xe')]['code']===0x1f4){logger[_0xd71a('0xe')]('Condition,\x20%s,\x20%s',_0x2e46a9,_0x19297c[_0xd71a('0xe')][_0xd71a('0xf')]);return _0x4f6057(_0x19297c[_0xd71a('0xe')][_0xd71a('0xf')]);}logger[_0xd71a('0xe')](_0xd71a('0x10'),_0x2e46a9,_0x19297c[_0xd71a('0xe')]['message']);return _0x2e2bf9(_0x19297c[_0xd71a('0xe')][_0xd71a('0xf')]);}else{logger[_0xd71a('0xa')](_0xd71a('0x10'),_0x2e46a9,_0xd71a('0xb'));_0x2e2bf9(_0x19297c[_0xd71a('0x11')][_0xd71a('0xf')]);}})[_0xd71a('0x12')](function(_0x586c15){logger['error'](_0xd71a('0x10'),_0x2e46a9,_0x586c15);_0x4f6057(_0x586c15);});});} \ No newline at end of file +var _0x746d=['debug','stringify','error','code','message','result','lodash','util','randomstring','ioredis','../../mysqldb','../../config/logger','rpc','../../config/environment','http','request','info','Condition,\x20%s,\x20%s','request\x20sent'];(function(_0xca04ff,_0xcb449f){var _0x6b547=function(_0xc91e4b){while(--_0xc91e4b){_0xca04ff['push'](_0xca04ff['shift']());}};_0x6b547(++_0xcb449f);}(_0x746d,0xd7));var _0xd746=function(_0x198d8a,_0x14529){_0x198d8a=_0x198d8a-0x0;var _0x3597a4=_0x746d[_0x198d8a];return _0x3597a4;};'use strict';var _=require(_0xd746('0x0'));var util=require(_0xd746('0x1'));var moment=require('moment');var BPromise=require('bluebird');var rs=require(_0xd746('0x2'));var fs=require('fs');var Redis=require(_0xd746('0x3'));var db=require(_0xd746('0x4'))['db'];var utils=require('../../config/utils');var logger=require(_0xd746('0x5'))(_0xd746('0x6'));var config=require(_0xd746('0x7'));var jayson=require('jayson/promise');var client=jayson['client'][_0xd746('0x8')]({'port':0x232a});function respondWithRpcPromise(_0x30b02c,_0x1b5f1a,_0x475953){return new BPromise(function(_0x1158e9,_0x495b81){return client[_0xd746('0x9')](_0x30b02c,_0x475953)['then'](function(_0xeba3c2){logger[_0xd746('0xa')](_0xd746('0xb'),_0x1b5f1a,_0xd746('0xc'));logger[_0xd746('0xd')]('Condition,\x20%s,\x20%s,\x20%s',_0x1b5f1a,_0xd746('0xc'),JSON[_0xd746('0xe')](_0xeba3c2));if(_0xeba3c2['error']){if(_0xeba3c2[_0xd746('0xf')][_0xd746('0x10')]===0x1f4){logger[_0xd746('0xf')](_0xd746('0xb'),_0x1b5f1a,_0xeba3c2['error'][_0xd746('0x11')]);return _0x495b81(_0xeba3c2[_0xd746('0xf')][_0xd746('0x11')]);}logger['error'](_0xd746('0xb'),_0x1b5f1a,_0xeba3c2[_0xd746('0xf')][_0xd746('0x11')]);return _0x1158e9(_0xeba3c2[_0xd746('0xf')][_0xd746('0x11')]);}else{logger['info']('Condition,\x20%s,\x20%s',_0x1b5f1a,'request\x20sent');_0x1158e9(_0xeba3c2[_0xd746('0x12')][_0xd746('0x11')]);}})['catch'](function(_0x36dd9c){logger[_0xd746('0xf')]('Condition,\x20%s,\x20%s',_0x1b5f1a,_0x36dd9c);_0x495b81(_0x36dd9c);});});} \ No newline at end of file diff --git a/server/api/condition/index.js b/server/api/condition/index.js index c66e169..ddce6df 100644 --- a/server/api/condition/index.js +++ b/server/api/condition/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xe95b=['../../components/auth/service','../../config/environment','./condition.controller','put','/:id','isAuthenticated','update','destroy','multer','util','connect-timeout','Router','fs-extra'];(function(_0x1a1789,_0x194346){var _0x33524a=function(_0x2d883c){while(--_0x2d883c){_0x1a1789['push'](_0x1a1789['shift']());}};_0x33524a(++_0x194346);}(_0xe95b,0x167));var _0xbe95=function(_0xa7c3ca,_0x562f2d){_0xa7c3ca=_0xa7c3ca-0x0;var _0x3b3b42=_0xe95b[_0xa7c3ca];return _0x3b3b42;};'use strict';var multer=require(_0xbe95('0x0'));var util=require(_0xbe95('0x1'));var path=require('path');var timeout=require(_0xbe95('0x2'));var express=require('express');var router=express[_0xbe95('0x3')]();var fs_extra=require(_0xbe95('0x4'));var auth=require(_0xbe95('0x5'));var interaction=require('../../components/interaction/service');var config=require(_0xbe95('0x6'));var controller=require(_0xbe95('0x7'));router[_0xbe95('0x8')](_0xbe95('0x9'),auth[_0xbe95('0xa')](),controller[_0xbe95('0xb')]);router['delete']('/:id',auth[_0xbe95('0xa')](),controller[_0xbe95('0xc')]);module['exports']=router; \ No newline at end of file +var _0xb68e=['../../components/auth/service','./condition.controller','/:id','isAuthenticated','update','destroy','exports','multer','util','connect-timeout','express'];(function(_0x3cc05d,_0x4b8f88){var _0x28b736=function(_0x369b0e){while(--_0x369b0e){_0x3cc05d['push'](_0x3cc05d['shift']());}};_0x28b736(++_0x4b8f88);}(_0xb68e,0x80));var _0xeb68=function(_0x2aafa4,_0x188b99){_0x2aafa4=_0x2aafa4-0x0;var _0x4eb978=_0xb68e[_0x2aafa4];return _0x4eb978;};'use strict';var multer=require(_0xeb68('0x0'));var util=require(_0xeb68('0x1'));var path=require('path');var timeout=require(_0xeb68('0x2'));var express=require(_0xeb68('0x3'));var router=express['Router']();var fs_extra=require('fs-extra');var auth=require(_0xeb68('0x4'));var interaction=require('../../components/interaction/service');var config=require('../../config/environment');var controller=require(_0xeb68('0x5'));router['put'](_0xeb68('0x6'),auth[_0xeb68('0x7')](),controller[_0xeb68('0x8')]);router['delete']('/:id',auth[_0xeb68('0x7')](),controller[_0xeb68('0x9')]);module[_0xeb68('0xa')]=router; \ No newline at end of file diff --git a/server/api/contactItemType/contactItemType.attributes.js b/server/api/contactItemType/contactItemType.attributes.js index 413db69..22da17e 100644 --- a/server/api/contactItemType/contactItemType.attributes.js +++ b/server/api/contactItemType/contactItemType.attributes.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x7aa3=['sequelize','STRING','name'];(function(_0x3794a0,_0x1a9cfc){var _0x5bdaba=function(_0x14a764){while(--_0x14a764){_0x3794a0['push'](_0x3794a0['shift']());}};_0x5bdaba(++_0x1a9cfc);}(_0x7aa3,0xb7));var _0x37aa=function(_0x537e2e,_0x1ba101){_0x537e2e=_0x537e2e-0x0;var _0x2190bc=_0x7aa3[_0x537e2e];return _0x2190bc;};'use strict';var Sequelize=require(_0x37aa('0x0'));module['exports']={'name':{'type':Sequelize[_0x37aa('0x1')],'allowNull':![],'unique':_0x37aa('0x2')},'OrderBy':{'type':Sequelize['INTEGER'],'allowNull':!![]},'rgbBackgroundColor':{'type':Sequelize[_0x37aa('0x1')],'allowNull':!![]}}; \ No newline at end of file +var _0x6f83=['INTEGER','exports','name'];(function(_0x4b99f0,_0x419040){var _0x29d886=function(_0x398626){while(--_0x398626){_0x4b99f0['push'](_0x4b99f0['shift']());}};_0x29d886(++_0x419040);}(_0x6f83,0x154));var _0x36f8=function(_0x1f2073,_0x13e932){_0x1f2073=_0x1f2073-0x0;var _0xe045e5=_0x6f83[_0x1f2073];return _0xe045e5;};'use strict';var Sequelize=require('sequelize');module[_0x36f8('0x0')]={'name':{'type':Sequelize['STRING'],'allowNull':![],'unique':_0x36f8('0x1')},'OrderBy':{'type':Sequelize[_0x36f8('0x2')],'allowNull':!![]},'rgbBackgroundColor':{'type':Sequelize['STRING'],'allowNull':!![]}}; \ No newline at end of file diff --git a/server/api/contactItemType/contactItemType.controller.js b/server/api/contactItemType/contactItemType.controller.js index 906136f..f4f5a10 100644 --- a/server/api/contactItemType/contactItemType.controller.js +++ b/server/api/contactItemType/contactItemType.controller.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x93e9=['send','map','rawAttributes','fieldName','key','model','query','keys','filters','intersection','fields','attributes','length','hasOwnProperty','nolimit','order','sort','filter','where','merge','type','options','ContactItemType','includeAll','include','rows','params','find','catch','create','body','user','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','UserProfileSection','userProfileId','autoAssociation','update','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','path','sox','to-csv','ejs','fs-extra','lodash','squel','crypto','desk.js','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../config/license/hardware','../../config/logger','../../config/environment','../../mysqldb','sendStatus','status','end','json','offset','undefined','limit','count','set','Content-Range','apply','reject','then','destroy','get','ContactItemTypes','UserProfileResource','error','stack','name'];(function(_0x432682,_0x253044){var _0x463d05=function(_0xa73403){while(--_0xa73403){_0x432682['push'](_0x432682['shift']());}};_0x463d05(++_0x253044);}(_0x93e9,0xcc));var _0x993e=function(_0xa9ce4,_0x4597ba){_0xa9ce4=_0xa9ce4-0x0;var _0x138b99=_0x93e9[_0xa9ce4];return _0x138b99;};'use strict';var emlformat=require(_0x993e('0x0'));var rimraf=require(_0x993e('0x1'));var zipdir=require(_0x993e('0x2'));var jsonpatch=require(_0x993e('0x3'));var rp=require(_0x993e('0x4'));var moment=require(_0x993e('0x5'));var BPromise=require(_0x993e('0x6'));var Mustache=require('mustache');var util=require('util');var path=require(_0x993e('0x7'));var sox=require(_0x993e('0x8'));var csv=require(_0x993e('0x9'));var ejs=require(_0x993e('0xa'));var fs=require('fs');var fs_extra=require(_0x993e('0xb'));var _=require(_0x993e('0xc'));var squel=require(_0x993e('0xd'));var crypto=require(_0x993e('0xe'));var jsforce=require('jsforce');var deskjs=require(_0x993e('0xf'));var toCsv=require(_0x993e('0x9'));var querystring=require(_0x993e('0x10'));var Papa=require(_0x993e('0x11'));var Redis=require(_0x993e('0x12'));var authService=require(_0x993e('0x13'));var qs=require(_0x993e('0x14'));var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0x993e('0x15'));var logger=require(_0x993e('0x16'))('api');var utils=require('../../config/utils');var config=require(_0x993e('0x17'));var licenseUtil=require('../../config/license/util');var db=require(_0x993e('0x18'))['db'];function respondWithStatusCode(_0x5d5c0d,_0x4c2707){_0x4c2707=_0x4c2707||0xcc;return function(_0x31ece2){if(_0x31ece2){return _0x5d5c0d[_0x993e('0x19')](_0x4c2707);}return _0x5d5c0d[_0x993e('0x1a')](_0x4c2707)[_0x993e('0x1b')]();};}function respondWithResult(_0x3e082b,_0x397b42){_0x397b42=_0x397b42||0xc8;return function(_0x34ddda){if(_0x34ddda){return _0x3e082b[_0x993e('0x1a')](_0x397b42)[_0x993e('0x1c')](_0x34ddda);}};}function respondWithFilteredResult(_0xa43a4e,_0x1a7726){return function(_0x135771){if(_0x135771){var _0x3df0e7=typeof _0x1a7726[_0x993e('0x1d')]===_0x993e('0x1e')&&typeof _0x1a7726[_0x993e('0x1f')]===_0x993e('0x1e');var _0x526e06=_0x135771[_0x993e('0x20')];var _0x1acd21=_0x3df0e7?0x0:_0x1a7726[_0x993e('0x1d')];var _0x3d6109=_0x3df0e7?_0x135771[_0x993e('0x20')]:_0x1a7726[_0x993e('0x1d')]+_0x1a7726['limit'];var _0x11cd41;if(_0x3d6109>=_0x526e06){_0x3d6109=_0x526e06;_0x11cd41=0xc8;}else{_0x11cd41=0xce;}_0xa43a4e[_0x993e('0x1a')](_0x11cd41);return _0xa43a4e[_0x993e('0x21')](_0x993e('0x22'),_0x1acd21+'-'+_0x3d6109+'/'+_0x526e06)[_0x993e('0x1c')](_0x135771);}return null;};}function patchUpdates(_0x425ab4){return function(_0x29e48d){try{jsonpatch[_0x993e('0x23')](_0x29e48d,_0x425ab4,!![]);}catch(_0x4bbe9c){return BPromise[_0x993e('0x24')](_0x4bbe9c);}return _0x29e48d['save']();};}function saveUpdates(_0x11f6f4,_0x37ff57){return function(_0x32b09e){if(_0x32b09e){return _0x32b09e['update'](_0x11f6f4)[_0x993e('0x25')](function(_0x13db4e){return _0x13db4e;});}return null;};}function removeEntity(_0xfba00f,_0x1c52fd){return function(_0x3b45ef){if(_0x3b45ef){return _0x3b45ef[_0x993e('0x26')]()[_0x993e('0x25')](function(){var _0x3ad96f=_0x3b45ef[_0x993e('0x27')]({'plain':!![]});var _0x18f6ac=_0x993e('0x28');return db[_0x993e('0x29')]['destroy']({'where':{'type':_0x18f6ac,'resourceId':_0x3ad96f['id']}})[_0x993e('0x25')](function(){return _0x3b45ef;});})[_0x993e('0x25')](function(){_0xfba00f['status'](0xcc)[_0x993e('0x1b')]();});}};}function handleEntityNotFound(_0x4f5cc1,_0x14a0c7){return function(_0xa03fbd){if(!_0xa03fbd){_0x4f5cc1[_0x993e('0x19')](0x194);}return _0xa03fbd;};}function handleError(_0x2ff973,_0x5c7507){_0x5c7507=_0x5c7507||0x1f4;return function(_0x48d457){logger[_0x993e('0x2a')](_0x48d457[_0x993e('0x2b')]);if(_0x48d457['name']){delete _0x48d457[_0x993e('0x2c')];}_0x2ff973[_0x993e('0x1a')](_0x5c7507)[_0x993e('0x2d')](_0x48d457);};}exports['index']=function(_0x2495b7,_0x9e0309){var _0x1f5d51={},_0x1fa8a5={},_0x2599ec={'count':0x0,'rows':[]};var _0x54da4e=_[_0x993e('0x2e')](db['ContactItemType'][_0x993e('0x2f')],function(_0x5ba163){return{'name':_0x5ba163[_0x993e('0x30')],'type':_0x5ba163['type'][_0x993e('0x31')]};});_0x1fa8a5[_0x993e('0x32')]=_[_0x993e('0x2e')](_0x54da4e,_0x993e('0x2c'));_0x1fa8a5[_0x993e('0x33')]=_[_0x993e('0x34')](_0x2495b7['query']);_0x1fa8a5[_0x993e('0x35')]=_['intersection'](_0x1fa8a5['model'],_0x1fa8a5[_0x993e('0x33')]);_0x1f5d51['attributes']=_[_0x993e('0x36')](_0x1fa8a5[_0x993e('0x32')],qs[_0x993e('0x37')](_0x2495b7[_0x993e('0x33')][_0x993e('0x37')]));_0x1f5d51[_0x993e('0x38')]=_0x1f5d51[_0x993e('0x38')][_0x993e('0x39')]?_0x1f5d51[_0x993e('0x38')]:_0x1fa8a5[_0x993e('0x32')];if(!_0x2495b7[_0x993e('0x33')][_0x993e('0x3a')](_0x993e('0x3b'))){_0x1f5d51[_0x993e('0x1f')]=qs[_0x993e('0x1f')](_0x2495b7['query'][_0x993e('0x1f')]);_0x1f5d51[_0x993e('0x1d')]=qs[_0x993e('0x1d')](_0x2495b7[_0x993e('0x33')][_0x993e('0x1d')]);}_0x1f5d51[_0x993e('0x3c')]=qs[_0x993e('0x3d')](_0x2495b7[_0x993e('0x33')][_0x993e('0x3d')]);_0x1f5d51['where']=qs[_0x993e('0x35')](_['pick'](_0x2495b7[_0x993e('0x33')],_0x1fa8a5[_0x993e('0x35')]),_0x54da4e);if(_0x2495b7[_0x993e('0x33')][_0x993e('0x3e')]){_0x1f5d51[_0x993e('0x3f')]=_[_0x993e('0x40')](_0x1f5d51[_0x993e('0x3f')],{'$or':_[_0x993e('0x2e')](_0x54da4e,function(_0x4f057e){if(_0x4f057e[_0x993e('0x41')]!=='VIRTUAL'){var _0x180ad4={};_0x180ad4[_0x4f057e['name']]={'$like':'%'+_0x2495b7[_0x993e('0x33')][_0x993e('0x3e')]+'%'};return _0x180ad4;}})});}_0x1f5d51=_[_0x993e('0x40')]({},_0x1f5d51,_0x2495b7[_0x993e('0x42')]);var _0x39424a={'where':_0x1f5d51[_0x993e('0x3f')]};return db[_0x993e('0x43')][_0x993e('0x20')](_0x39424a)['then'](function(_0xe64c){_0x2599ec['count']=_0xe64c;if(_0x2495b7['query'][_0x993e('0x44')]){_0x1f5d51[_0x993e('0x45')]=[{'all':!![]}];}return db[_0x993e('0x43')]['findAll'](_0x1f5d51);})[_0x993e('0x25')](function(_0x40719d){_0x2599ec[_0x993e('0x46')]=_0x40719d;return _0x2599ec;})['then'](respondWithFilteredResult(_0x9e0309,_0x1f5d51))['catch'](handleError(_0x9e0309,null));};exports['show']=function(_0x3f29c8,_0x1adb09){var _0x254f74={'raw':!![],'where':{'id':_0x3f29c8[_0x993e('0x47')]['id']}},_0x539c9d={};_0x539c9d[_0x993e('0x32')]=_['keys'](db[_0x993e('0x43')][_0x993e('0x2f')]);_0x539c9d['query']=_[_0x993e('0x34')](_0x3f29c8[_0x993e('0x33')]);_0x539c9d[_0x993e('0x35')]=_['intersection'](_0x539c9d['model'],_0x539c9d['query']);_0x254f74[_0x993e('0x38')]=_[_0x993e('0x36')](_0x539c9d[_0x993e('0x32')],qs[_0x993e('0x37')](_0x3f29c8['query'][_0x993e('0x37')]));_0x254f74[_0x993e('0x38')]=_0x254f74[_0x993e('0x38')][_0x993e('0x39')]?_0x254f74[_0x993e('0x38')]:_0x539c9d[_0x993e('0x32')];if(_0x3f29c8['query']['includeAll']){_0x254f74[_0x993e('0x45')]=[{'all':!![]}];}_0x254f74=_[_0x993e('0x40')]({},_0x254f74,_0x3f29c8['options']);return db['ContactItemType'][_0x993e('0x48')](_0x254f74)[_0x993e('0x25')](handleEntityNotFound(_0x1adb09,null))[_0x993e('0x25')](respondWithResult(_0x1adb09,null))[_0x993e('0x49')](handleError(_0x1adb09,null));};exports[_0x993e('0x4a')]=function(_0x256ce3,_0x5b18e3){return db[_0x993e('0x43')]['create'](_0x256ce3[_0x993e('0x4b')],{})[_0x993e('0x25')](function(_0x28cf3b){var _0x402e37=_0x256ce3[_0x993e('0x4c')][_0x993e('0x27')]({'plain':!![]});if(!_0x402e37)throw new Error(_0x993e('0x4d'));if(_0x402e37[_0x993e('0x4e')]==='user'){var _0x23f09c=_0x28cf3b[_0x993e('0x27')]({'plain':!![]});var _0x8b1516='ContactItemTypes';return db[_0x993e('0x4f')]['find']({'where':{'name':_0x8b1516,'userProfileId':_0x402e37[_0x993e('0x50')]},'raw':!![]})[_0x993e('0x25')](function(_0x5cd41a){if(_0x5cd41a&&_0x5cd41a[_0x993e('0x51')]===0x0){return db[_0x993e('0x29')]['create']({'name':_0x23f09c[_0x993e('0x2c')],'resourceId':_0x23f09c['id'],'type':_0x5cd41a[_0x993e('0x2c')],'sectionId':_0x5cd41a['id']},{})[_0x993e('0x25')](function(){return _0x28cf3b;});}else{return _0x28cf3b;}})[_0x993e('0x49')](function(_0x2e368e){logger['error']('Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s',_0x2e368e);throw _0x2e368e;});}return _0x28cf3b;})['then'](respondWithResult(_0x5b18e3,0xc9))[_0x993e('0x49')](handleError(_0x5b18e3,null));};exports[_0x993e('0x52')]=function(_0x42af4f,_0x2c3df7){if(_0x42af4f[_0x993e('0x4b')]['id']){delete _0x42af4f[_0x993e('0x4b')]['id'];}return db['ContactItemType'][_0x993e('0x48')]({'where':{'id':_0x42af4f[_0x993e('0x47')]['id']}})[_0x993e('0x25')](handleEntityNotFound(_0x2c3df7,null))['then'](saveUpdates(_0x42af4f[_0x993e('0x4b')],null))['then'](respondWithResult(_0x2c3df7,null))['catch'](handleError(_0x2c3df7,null));};exports[_0x993e('0x26')]=function(_0x37d7b1,_0x511641){return db[_0x993e('0x43')]['find']({'where':{'id':_0x37d7b1[_0x993e('0x47')]['id']}})[_0x993e('0x25')](handleEntityNotFound(_0x511641,null))['then'](db['CmContactHasItem'][_0x993e('0x52')]({'ItemTypeId':null},{'where':{'ItemTypeId':_0x37d7b1[_0x993e('0x47')]['id']}}))[_0x993e('0x25')](removeEntity(_0x511641,null))[_0x993e('0x49')](handleError(_0x511641,null));}; \ No newline at end of file +var _0x4991=['lodash','squel','crypto','jsforce','desk.js','querystring','ioredis','../../components/auth/service','../../components/parsers/advancedSearch','../../config/license/hardware','api','../../config/utils','sendStatus','status','json','offset','limit','undefined','count','set','Content-Range','apply','reject','save','update','then','destroy','get','ContactItemTypes','end','error','stack','name','send','ContactItemType','rawAttributes','fieldName','type','key','model','map','query','keys','filters','intersection','attributes','fields','length','hasOwnProperty','nolimit','sort','where','pick','filter','merge','VIRTUAL','options','include','findAll','rows','catch','show','params','find','create','body','user','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','UserProfileSection','userProfileId','autoAssociation','UserProfileResource','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','CmContactHasItem','eml-format','zip-dir','request-promise','moment','bluebird','mustache','util','path','sox','to-csv','fs-extra'];(function(_0x429230,_0xac45ff){var _0x20a2a3=function(_0x39d543){while(--_0x39d543){_0x429230['push'](_0x429230['shift']());}};_0x20a2a3(++_0xac45ff);}(_0x4991,0xf7));var _0x1499=function(_0x5d543b,_0x6a969a){_0x5d543b=_0x5d543b-0x0;var _0x2015b8=_0x4991[_0x5d543b];return _0x2015b8;};'use strict';var emlformat=require(_0x1499('0x0'));var rimraf=require('rimraf');var zipdir=require(_0x1499('0x1'));var jsonpatch=require('fast-json-patch');var rp=require(_0x1499('0x2'));var moment=require(_0x1499('0x3'));var BPromise=require(_0x1499('0x4'));var Mustache=require(_0x1499('0x5'));var util=require(_0x1499('0x6'));var path=require(_0x1499('0x7'));var sox=require(_0x1499('0x8'));var csv=require(_0x1499('0x9'));var ejs=require('ejs');var fs=require('fs');var fs_extra=require(_0x1499('0xa'));var _=require(_0x1499('0xb'));var squel=require(_0x1499('0xc'));var crypto=require(_0x1499('0xd'));var jsforce=require(_0x1499('0xe'));var deskjs=require(_0x1499('0xf'));var toCsv=require(_0x1499('0x9'));var querystring=require(_0x1499('0x10'));var Papa=require('papaparse');var Redis=require(_0x1499('0x11'));var authService=require(_0x1499('0x12'));var qs=require('../../components/parsers/qs');var as=require(_0x1499('0x13'));var hardwareService=require(_0x1499('0x14'));var logger=require('../../config/logger')(_0x1499('0x15'));var utils=require(_0x1499('0x16'));var config=require('../../config/environment');var licenseUtil=require('../../config/license/util');var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0x3039ce,_0x274bc1){_0x274bc1=_0x274bc1||0xcc;return function(_0x34a928){if(_0x34a928){return _0x3039ce[_0x1499('0x17')](_0x274bc1);}return _0x3039ce[_0x1499('0x18')](_0x274bc1)['end']();};}function respondWithResult(_0x5f34f2,_0x308177){_0x308177=_0x308177||0xc8;return function(_0x4e5195){if(_0x4e5195){return _0x5f34f2[_0x1499('0x18')](_0x308177)[_0x1499('0x19')](_0x4e5195);}};}function respondWithFilteredResult(_0x308318,_0x3ab605){return function(_0x48f654){if(_0x48f654){var _0x1ed43b=typeof _0x3ab605[_0x1499('0x1a')]==='undefined'&&typeof _0x3ab605[_0x1499('0x1b')]===_0x1499('0x1c');var _0x46b364=_0x48f654[_0x1499('0x1d')];var _0x1e45a9=_0x1ed43b?0x0:_0x3ab605[_0x1499('0x1a')];var _0x5b9859=_0x1ed43b?_0x48f654['count']:_0x3ab605['offset']+_0x3ab605[_0x1499('0x1b')];var _0xad534b;if(_0x5b9859>=_0x46b364){_0x5b9859=_0x46b364;_0xad534b=0xc8;}else{_0xad534b=0xce;}_0x308318['status'](_0xad534b);return _0x308318[_0x1499('0x1e')](_0x1499('0x1f'),_0x1e45a9+'-'+_0x5b9859+'/'+_0x46b364)[_0x1499('0x19')](_0x48f654);}return null;};}function patchUpdates(_0x18e4a6){return function(_0x21e887){try{jsonpatch[_0x1499('0x20')](_0x21e887,_0x18e4a6,!![]);}catch(_0x2b0458){return BPromise[_0x1499('0x21')](_0x2b0458);}return _0x21e887[_0x1499('0x22')]();};}function saveUpdates(_0x15bcd4,_0x2bb71f){return function(_0x836081){if(_0x836081){return _0x836081[_0x1499('0x23')](_0x15bcd4)[_0x1499('0x24')](function(_0x4ec57a){return _0x4ec57a;});}return null;};}function removeEntity(_0x1e2c51,_0x2c7f57){return function(_0x5615b4){if(_0x5615b4){return _0x5615b4[_0x1499('0x25')]()[_0x1499('0x24')](function(){var _0x30f014=_0x5615b4[_0x1499('0x26')]({'plain':!![]});var _0x3968e0=_0x1499('0x27');return db['UserProfileResource']['destroy']({'where':{'type':_0x3968e0,'resourceId':_0x30f014['id']}})[_0x1499('0x24')](function(){return _0x5615b4;});})[_0x1499('0x24')](function(){_0x1e2c51[_0x1499('0x18')](0xcc)[_0x1499('0x28')]();});}};}function handleEntityNotFound(_0x32782a,_0x525d6f){return function(_0x3e5ed1){if(!_0x3e5ed1){_0x32782a['sendStatus'](0x194);}return _0x3e5ed1;};}function handleError(_0x5022a4,_0x516f29){_0x516f29=_0x516f29||0x1f4;return function(_0x21d204){logger[_0x1499('0x29')](_0x21d204[_0x1499('0x2a')]);if(_0x21d204[_0x1499('0x2b')]){delete _0x21d204[_0x1499('0x2b')];}_0x5022a4[_0x1499('0x18')](_0x516f29)[_0x1499('0x2c')](_0x21d204);};}exports['index']=function(_0x180171,_0x1a2c99){var _0x39995b={},_0x5b59ea={},_0x2dae84={'count':0x0,'rows':[]};var _0x16466c=_['map'](db[_0x1499('0x2d')][_0x1499('0x2e')],function(_0x497efd){return{'name':_0x497efd[_0x1499('0x2f')],'type':_0x497efd[_0x1499('0x30')][_0x1499('0x31')]};});_0x5b59ea[_0x1499('0x32')]=_[_0x1499('0x33')](_0x16466c,_0x1499('0x2b'));_0x5b59ea[_0x1499('0x34')]=_[_0x1499('0x35')](_0x180171[_0x1499('0x34')]);_0x5b59ea[_0x1499('0x36')]=_[_0x1499('0x37')](_0x5b59ea[_0x1499('0x32')],_0x5b59ea[_0x1499('0x34')]);_0x39995b[_0x1499('0x38')]=_[_0x1499('0x37')](_0x5b59ea[_0x1499('0x32')],qs[_0x1499('0x39')](_0x180171[_0x1499('0x34')][_0x1499('0x39')]));_0x39995b[_0x1499('0x38')]=_0x39995b['attributes'][_0x1499('0x3a')]?_0x39995b[_0x1499('0x38')]:_0x5b59ea[_0x1499('0x32')];if(!_0x180171[_0x1499('0x34')][_0x1499('0x3b')](_0x1499('0x3c'))){_0x39995b[_0x1499('0x1b')]=qs[_0x1499('0x1b')](_0x180171[_0x1499('0x34')][_0x1499('0x1b')]);_0x39995b[_0x1499('0x1a')]=qs['offset'](_0x180171['query'][_0x1499('0x1a')]);}_0x39995b['order']=qs[_0x1499('0x3d')](_0x180171['query'][_0x1499('0x3d')]);_0x39995b[_0x1499('0x3e')]=qs[_0x1499('0x36')](_[_0x1499('0x3f')](_0x180171['query'],_0x5b59ea[_0x1499('0x36')]),_0x16466c);if(_0x180171['query'][_0x1499('0x40')]){_0x39995b[_0x1499('0x3e')]=_[_0x1499('0x41')](_0x39995b[_0x1499('0x3e')],{'$or':_['map'](_0x16466c,function(_0x61f5ce){if(_0x61f5ce[_0x1499('0x30')]!==_0x1499('0x42')){var _0x3b67a7={};_0x3b67a7[_0x61f5ce['name']]={'$like':'%'+_0x180171[_0x1499('0x34')]['filter']+'%'};return _0x3b67a7;}})});}_0x39995b=_[_0x1499('0x41')]({},_0x39995b,_0x180171[_0x1499('0x43')]);var _0x2a2441={'where':_0x39995b[_0x1499('0x3e')]};return db[_0x1499('0x2d')][_0x1499('0x1d')](_0x2a2441)[_0x1499('0x24')](function(_0xcb85eb){_0x2dae84[_0x1499('0x1d')]=_0xcb85eb;if(_0x180171[_0x1499('0x34')]['includeAll']){_0x39995b[_0x1499('0x44')]=[{'all':!![]}];}return db['ContactItemType'][_0x1499('0x45')](_0x39995b);})[_0x1499('0x24')](function(_0x5646cf){_0x2dae84[_0x1499('0x46')]=_0x5646cf;return _0x2dae84;})[_0x1499('0x24')](respondWithFilteredResult(_0x1a2c99,_0x39995b))[_0x1499('0x47')](handleError(_0x1a2c99,null));};exports[_0x1499('0x48')]=function(_0x43e76c,_0x4db5a1){var _0x5d1e9f={'raw':!![],'where':{'id':_0x43e76c[_0x1499('0x49')]['id']}},_0x368fdb={};_0x368fdb['model']=_[_0x1499('0x35')](db[_0x1499('0x2d')]['rawAttributes']);_0x368fdb['query']=_[_0x1499('0x35')](_0x43e76c[_0x1499('0x34')]);_0x368fdb[_0x1499('0x36')]=_['intersection'](_0x368fdb[_0x1499('0x32')],_0x368fdb[_0x1499('0x34')]);_0x5d1e9f[_0x1499('0x38')]=_[_0x1499('0x37')](_0x368fdb['model'],qs[_0x1499('0x39')](_0x43e76c[_0x1499('0x34')][_0x1499('0x39')]));_0x5d1e9f[_0x1499('0x38')]=_0x5d1e9f['attributes'][_0x1499('0x3a')]?_0x5d1e9f[_0x1499('0x38')]:_0x368fdb[_0x1499('0x32')];if(_0x43e76c['query']['includeAll']){_0x5d1e9f[_0x1499('0x44')]=[{'all':!![]}];}_0x5d1e9f=_['merge']({},_0x5d1e9f,_0x43e76c[_0x1499('0x43')]);return db[_0x1499('0x2d')][_0x1499('0x4a')](_0x5d1e9f)[_0x1499('0x24')](handleEntityNotFound(_0x4db5a1,null))[_0x1499('0x24')](respondWithResult(_0x4db5a1,null))[_0x1499('0x47')](handleError(_0x4db5a1,null));};exports[_0x1499('0x4b')]=function(_0x591aa8,_0x420d16){return db['ContactItemType'][_0x1499('0x4b')](_0x591aa8[_0x1499('0x4c')],{})['then'](function(_0x23fb7f){var _0xd4ac1a=_0x591aa8[_0x1499('0x4d')]['get']({'plain':!![]});if(!_0xd4ac1a)throw new Error(_0x1499('0x4e'));if(_0xd4ac1a[_0x1499('0x4f')]===_0x1499('0x4d')){var _0x29ac0f=_0x23fb7f[_0x1499('0x26')]({'plain':!![]});var _0x11aafe=_0x1499('0x27');return db[_0x1499('0x50')][_0x1499('0x4a')]({'where':{'name':_0x11aafe,'userProfileId':_0xd4ac1a[_0x1499('0x51')]},'raw':!![]})['then'](function(_0x13770a){if(_0x13770a&&_0x13770a[_0x1499('0x52')]===0x0){return db[_0x1499('0x53')]['create']({'name':_0x29ac0f[_0x1499('0x2b')],'resourceId':_0x29ac0f['id'],'type':_0x13770a[_0x1499('0x2b')],'sectionId':_0x13770a['id']},{})['then'](function(){return _0x23fb7f;});}else{return _0x23fb7f;}})[_0x1499('0x47')](function(_0x162ddb){logger['error'](_0x1499('0x54'),_0x162ddb);throw _0x162ddb;});}return _0x23fb7f;})[_0x1499('0x24')](respondWithResult(_0x420d16,0xc9))[_0x1499('0x47')](handleError(_0x420d16,null));};exports[_0x1499('0x23')]=function(_0xa870e,_0x16d97c){if(_0xa870e[_0x1499('0x4c')]['id']){delete _0xa870e['body']['id'];}return db[_0x1499('0x2d')][_0x1499('0x4a')]({'where':{'id':_0xa870e[_0x1499('0x49')]['id']}})[_0x1499('0x24')](handleEntityNotFound(_0x16d97c,null))['then'](saveUpdates(_0xa870e['body'],null))[_0x1499('0x24')](respondWithResult(_0x16d97c,null))[_0x1499('0x47')](handleError(_0x16d97c,null));};exports['destroy']=function(_0x3c3a20,_0x1ddb13){return db[_0x1499('0x2d')]['find']({'where':{'id':_0x3c3a20['params']['id']}})['then'](handleEntityNotFound(_0x1ddb13,null))[_0x1499('0x24')](db[_0x1499('0x55')][_0x1499('0x23')]({'ItemTypeId':null},{'where':{'ItemTypeId':_0x3c3a20['params']['id']}}))[_0x1499('0x24')](removeEntity(_0x1ddb13,null))['catch'](handleError(_0x1ddb13,null));}; \ No newline at end of file diff --git a/server/api/contactItemType/contactItemType.model.js b/server/api/contactItemType/contactItemType.model.js index d7f8705..8eefdf8 100644 --- a/server/api/contactItemType/contactItemType.model.js +++ b/server/api/contactItemType/contactItemType.model.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x5dbf=['bluebird','path','exports','define','tools_contact_item_types','util','api'];(function(_0x404e1b,_0xbecab3){var _0x3b1d1e=function(_0x424fb0){while(--_0x424fb0){_0x404e1b['push'](_0x404e1b['shift']());}};_0x3b1d1e(++_0xbecab3);}(_0x5dbf,0x1c5));var _0xf5db=function(_0x303173,_0x50db46){_0x303173=_0x303173-0x0;var _0x1ce23f=_0x5dbf[_0x303173];return _0x1ce23f;};'use strict';var _=require('lodash');var util=require(_0xf5db('0x0'));var logger=require('../../config/logger')(_0xf5db('0x1'));var moment=require('moment');var BPromise=require(_0xf5db('0x2'));var rp=require('request-promise');var fs=require('fs');var path=require(_0xf5db('0x3'));var rimraf=require('rimraf');var config=require('../../config/environment');var attributes=require('./contactItemType.attributes');module[_0xf5db('0x4')]=function(_0x6be319,_0x218478){return _0x6be319[_0xf5db('0x5')]('ContactItemType',attributes,{'tableName':_0xf5db('0x6'),'paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file +var _0x3dbe=['tools_contact_item_types','lodash','util','api','moment','bluebird','request-promise','rimraf','../../config/environment','./contactItemType.attributes','exports','define','ContactItemType'];(function(_0x37205b,_0x2c124d){var _0x4293e5=function(_0x15fc38){while(--_0x15fc38){_0x37205b['push'](_0x37205b['shift']());}};_0x4293e5(++_0x2c124d);}(_0x3dbe,0x1ae));var _0xe3db=function(_0x85bdbd,_0x52cdd8){_0x85bdbd=_0x85bdbd-0x0;var _0x3ff907=_0x3dbe[_0x85bdbd];return _0x3ff907;};'use strict';var _=require(_0xe3db('0x0'));var util=require(_0xe3db('0x1'));var logger=require('../../config/logger')(_0xe3db('0x2'));var moment=require(_0xe3db('0x3'));var BPromise=require(_0xe3db('0x4'));var rp=require(_0xe3db('0x5'));var fs=require('fs');var path=require('path');var rimraf=require(_0xe3db('0x6'));var config=require(_0xe3db('0x7'));var attributes=require(_0xe3db('0x8'));module[_0xe3db('0x9')]=function(_0x52e36f,_0x2dfb1d){return _0x52e36f[_0xe3db('0xa')](_0xe3db('0xb'),attributes,{'tableName':_0xe3db('0xc'),'paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file diff --git a/server/api/contactItemType/contactItemType.rpc.js b/server/api/contactItemType/contactItemType.rpc.js index 42fd943..4999f24 100644 --- a/server/api/contactItemType/contactItemType.rpc.js +++ b/server/api/contactItemType/contactItemType.rpc.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x791a=['../../mysqldb','../../config/environment','jayson/promise','client','request','then','info','ContactItemType,\x20%s,\x20%s','request\x20sent','debug','ContactItemType,\x20%s,\x20%s,\x20%s','error','message','result','catch','lodash','moment','bluebird','randomstring'];(function(_0x18f7cb,_0xadd0e7){var _0x1e3ba8=function(_0x944e49){while(--_0x944e49){_0x18f7cb['push'](_0x18f7cb['shift']());}};_0x1e3ba8(++_0xadd0e7);}(_0x791a,0x6e));var _0xa791=function(_0x271494,_0x581f87){_0x271494=_0x271494-0x0;var _0x14c37d=_0x791a[_0x271494];return _0x14c37d;};'use strict';var _=require(_0xa791('0x0'));var util=require('util');var moment=require(_0xa791('0x1'));var BPromise=require(_0xa791('0x2'));var rs=require(_0xa791('0x3'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0xa791('0x4'))['db'];var utils=require('../../config/utils');var logger=require('../../config/logger')('rpc');var config=require(_0xa791('0x5'));var jayson=require(_0xa791('0x6'));var client=jayson[_0xa791('0x7')]['http']({'port':0x232a});function respondWithRpcPromise(_0x3bcc3c,_0x56011e,_0x297501){return new BPromise(function(_0x4b01aa,_0x5f23e5){return client[_0xa791('0x8')](_0x3bcc3c,_0x297501)[_0xa791('0x9')](function(_0x1f462c){logger[_0xa791('0xa')](_0xa791('0xb'),_0x56011e,_0xa791('0xc'));logger[_0xa791('0xd')](_0xa791('0xe'),_0x56011e,'request\x20sent',JSON['stringify'](_0x1f462c));if(_0x1f462c['error']){if(_0x1f462c[_0xa791('0xf')]['code']===0x1f4){logger['error'](_0xa791('0xb'),_0x56011e,_0x1f462c[_0xa791('0xf')]['message']);return _0x5f23e5(_0x1f462c[_0xa791('0xf')]['message']);}logger[_0xa791('0xf')](_0xa791('0xb'),_0x56011e,_0x1f462c[_0xa791('0xf')][_0xa791('0x10')]);return _0x4b01aa(_0x1f462c[_0xa791('0xf')][_0xa791('0x10')]);}else{logger[_0xa791('0xa')](_0xa791('0xb'),_0x56011e,_0xa791('0xc'));_0x4b01aa(_0x1f462c[_0xa791('0x11')]['message']);}})[_0xa791('0x12')](function(_0x48b9d9){logger[_0xa791('0xf')](_0xa791('0xb'),_0x56011e,_0x48b9d9);_0x5f23e5(_0x48b9d9);});});} \ No newline at end of file +var _0x480b=['code','message','result','catch','bluebird','../../mysqldb','../../config/utils','rpc','../../config/environment','jayson/promise','client','request','then','info','ContactItemType,\x20%s,\x20%s','request\x20sent','debug','ContactItemType,\x20%s,\x20%s,\x20%s','error'];(function(_0x1c52cb,_0x3f7cd4){var _0x37585e=function(_0x1aea64){while(--_0x1aea64){_0x1c52cb['push'](_0x1c52cb['shift']());}};_0x37585e(++_0x3f7cd4);}(_0x480b,0x1b9));var _0xb480=function(_0xdf1eb7,_0x17f252){_0xdf1eb7=_0xdf1eb7-0x0;var _0x514d52=_0x480b[_0xdf1eb7];return _0x514d52;};'use strict';var _=require('lodash');var util=require('util');var moment=require('moment');var BPromise=require(_0xb480('0x0'));var rs=require('randomstring');var fs=require('fs');var Redis=require('ioredis');var db=require(_0xb480('0x1'))['db'];var utils=require(_0xb480('0x2'));var logger=require('../../config/logger')(_0xb480('0x3'));var config=require(_0xb480('0x4'));var jayson=require(_0xb480('0x5'));var client=jayson[_0xb480('0x6')]['http']({'port':0x232a});function respondWithRpcPromise(_0x464ccb,_0x34b309,_0x9f7c00){return new BPromise(function(_0x429dde,_0x1b6fdc){return client[_0xb480('0x7')](_0x464ccb,_0x9f7c00)[_0xb480('0x8')](function(_0x2e66d8){logger[_0xb480('0x9')](_0xb480('0xa'),_0x34b309,_0xb480('0xb'));logger[_0xb480('0xc')](_0xb480('0xd'),_0x34b309,_0xb480('0xb'),JSON['stringify'](_0x2e66d8));if(_0x2e66d8[_0xb480('0xe')]){if(_0x2e66d8[_0xb480('0xe')][_0xb480('0xf')]===0x1f4){logger[_0xb480('0xe')](_0xb480('0xa'),_0x34b309,_0x2e66d8[_0xb480('0xe')][_0xb480('0x10')]);return _0x1b6fdc(_0x2e66d8['error'][_0xb480('0x10')]);}logger[_0xb480('0xe')]('ContactItemType,\x20%s,\x20%s',_0x34b309,_0x2e66d8[_0xb480('0xe')]['message']);return _0x429dde(_0x2e66d8[_0xb480('0xe')][_0xb480('0x10')]);}else{logger[_0xb480('0x9')]('ContactItemType,\x20%s,\x20%s',_0x34b309,_0xb480('0xb'));_0x429dde(_0x2e66d8[_0xb480('0x11')][_0xb480('0x10')]);}})[_0xb480('0x12')](function(_0x8c2dc2){logger['error'](_0xb480('0xa'),_0x34b309,_0x8c2dc2);_0x1b6fdc(_0x8c2dc2);});});} \ No newline at end of file diff --git a/server/api/contactItemType/index.js b/server/api/contactItemType/index.js index 448754a..1edce9f 100644 --- a/server/api/contactItemType/index.js +++ b/server/api/contactItemType/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x74f9=['create','put','update','destroy','exports','path','connect-timeout','express','Router','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','get','isAuthenticated','index','/:id','show','post'];(function(_0x325501,_0x5242f6){var _0x2c1626=function(_0x4270b2){while(--_0x4270b2){_0x325501['push'](_0x325501['shift']());}};_0x2c1626(++_0x5242f6);}(_0x74f9,0x1e0));var _0x974f=function(_0x58476e,_0x2b9574){_0x58476e=_0x58476e-0x0;var _0x115edd=_0x74f9[_0x58476e];return _0x115edd;};'use strict';var multer=require('multer');var util=require('util');var path=require(_0x974f('0x0'));var timeout=require(_0x974f('0x1'));var express=require(_0x974f('0x2'));var router=express[_0x974f('0x3')]();var fs_extra=require(_0x974f('0x4'));var auth=require(_0x974f('0x5'));var interaction=require(_0x974f('0x6'));var config=require(_0x974f('0x7'));var controller=require('./contactItemType.controller');router[_0x974f('0x8')]('/',auth[_0x974f('0x9')](),controller[_0x974f('0xa')]);router[_0x974f('0x8')](_0x974f('0xb'),auth[_0x974f('0x9')](),controller[_0x974f('0xc')]);router[_0x974f('0xd')]('/',auth[_0x974f('0x9')](),controller[_0x974f('0xe')]);router[_0x974f('0xf')](_0x974f('0xb'),auth[_0x974f('0x9')](),controller[_0x974f('0x10')]);router['delete'](_0x974f('0xb'),auth[_0x974f('0x9')](),controller[_0x974f('0x11')]);module[_0x974f('0x12')]=router; \ No newline at end of file +var _0x5d0f=['isAuthenticated','show','post','create','update','delete','exports','multer','util','path','express','Router','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','./contactItemType.controller','index','get','/:id'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0x5d0f,0x197));var _0xf5d0=function(_0x236c89,_0xd76ba9){_0x236c89=_0x236c89-0x0;var _0x3b2a15=_0x5d0f[_0x236c89];return _0x3b2a15;};'use strict';var multer=require(_0xf5d0('0x0'));var util=require(_0xf5d0('0x1'));var path=require(_0xf5d0('0x2'));var timeout=require('connect-timeout');var express=require(_0xf5d0('0x3'));var router=express[_0xf5d0('0x4')]();var fs_extra=require(_0xf5d0('0x5'));var auth=require(_0xf5d0('0x6'));var interaction=require(_0xf5d0('0x7'));var config=require(_0xf5d0('0x8'));var controller=require(_0xf5d0('0x9'));router['get']('/',auth['isAuthenticated'](),controller[_0xf5d0('0xa')]);router[_0xf5d0('0xb')](_0xf5d0('0xc'),auth[_0xf5d0('0xd')](),controller[_0xf5d0('0xe')]);router[_0xf5d0('0xf')]('/',auth[_0xf5d0('0xd')](),controller[_0xf5d0('0x10')]);router['put'](_0xf5d0('0xc'),auth[_0xf5d0('0xd')](),controller[_0xf5d0('0x11')]);router[_0xf5d0('0x12')](_0xf5d0('0xc'),auth['isAuthenticated'](),controller['destroy']);module[_0xf5d0('0x13')]=router; \ No newline at end of file diff --git a/server/api/dashboard/dashboard.attributes.js b/server/api/dashboard/dashboard.attributes.js index 6ad6874..8a378c4 100644 --- a/server/api/dashboard/dashboard.attributes.js +++ b/server/api/dashboard/dashboard.attributes.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xe706=['STRING','sequelize','exports'];(function(_0xb0f7c3,_0x4eae95){var _0x28ea68=function(_0x4395a7){while(--_0x4395a7){_0xb0f7c3['push'](_0xb0f7c3['shift']());}};_0x28ea68(++_0x4eae95);}(_0xe706,0xa3));var _0x6e70=function(_0xef7b42,_0xf9ab01){_0xef7b42=_0xef7b42-0x0;var _0x5c3893=_0xe706[_0xef7b42];return _0x5c3893;};'use strict';var Sequelize=require(_0x6e70('0x0'));module[_0x6e70('0x1')]={'name':{'type':Sequelize[_0x6e70('0x2')],'allowNull':![],'unique':'name'},'description':{'type':Sequelize[_0x6e70('0x2')]}}; \ No newline at end of file +var _0xb10b=['name','sequelize','STRING'];(function(_0x1232c3,_0x1550d6){var _0x1d055e=function(_0x1bad37){while(--_0x1bad37){_0x1232c3['push'](_0x1232c3['shift']());}};_0x1d055e(++_0x1550d6);}(_0xb10b,0x12a));var _0xbb10=function(_0x408758,_0x548c1f){_0x408758=_0x408758-0x0;var _0x2e25ae=_0xb10b[_0x408758];return _0x2e25ae;};'use strict';var Sequelize=require(_0xbb10('0x0'));module['exports']={'name':{'type':Sequelize[_0xbb10('0x1')],'allowNull':![],'unique':_0xbb10('0x2')},'description':{'type':Sequelize[_0xbb10('0x1')]}}; \ No newline at end of file diff --git a/server/api/dashboard/dashboard.controller.js b/server/api/dashboard/dashboard.controller.js index 591d171..4d85fb1 100644 --- a/server/api/dashboard/dashboard.controller.js +++ b/server/api/dashboard/dashboard.controller.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xaa52=['include','findAll','catch','show','params','find','create','body','user','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','UserProfileSection','autoAssociation','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','omit','createdAt','updatedAt','userProfileId','iframe','attrUrl','attrs','value','https://','custom','attrPath','clock','attrHourFormat','HH:mm:ss','attrTimezone','0.00','attrFontSize','counter','attrMetric','total','attrVoiceQueues','attrChannel','voice','attrEmailAccounts','attrFaxAccounts','attrSmsAccounts','attrOpenchannelAccounts','attrWhatsappAccounts','multibar-chart','pie-chart','attrSerie1','attrSerie2','attrSerie3','attrChatWebsites','reportType','attrReport','attrRefresh','stringify','addItem','DashboardId','DashboardItem','findOne','eml-format','rimraf','fast-json-patch','request-promise','moment','bluebird','mustache','util','to-csv','ejs','fs-extra','lodash','squel','jsforce','querystring','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','api','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','redis','defaults','localhost','socket.io-emitter','register','sendStatus','status','end','offset','undefined','limit','count','set','Content-Range','json','apply','reject','save','update','destroy','get','CustomDashboards','UserProfileResource','then','error','stack','name','map','rawAttributes','fieldName','type','key','query','keys','filters','intersection','attributes','model','fields','length','hasOwnProperty','nolimit','order','sort','where','pick','filter','merge','VIRTUAL','options','Dashboard','includeAll'];(function(_0x250f95,_0x5a5728){var _0x4ada97=function(_0x392edc){while(--_0x392edc){_0x250f95['push'](_0x250f95['shift']());}};_0x4ada97(++_0x5a5728);}(_0xaa52,0x142));var _0x2aa5=function(_0x6e2066,_0x1f26b6){_0x6e2066=_0x6e2066-0x0;var _0x4f0e47=_0xaa52[_0x6e2066];return _0x4f0e47;};'use strict';var emlformat=require(_0x2aa5('0x0'));var rimraf=require(_0x2aa5('0x1'));var zipdir=require('zip-dir');var jsonpatch=require(_0x2aa5('0x2'));var rp=require(_0x2aa5('0x3'));var moment=require(_0x2aa5('0x4'));var BPromise=require(_0x2aa5('0x5'));var Mustache=require(_0x2aa5('0x6'));var util=require(_0x2aa5('0x7'));var path=require('path');var sox=require('sox');var csv=require(_0x2aa5('0x8'));var ejs=require(_0x2aa5('0x9'));var fs=require('fs');var fs_extra=require(_0x2aa5('0xa'));var _=require(_0x2aa5('0xb'));var squel=require(_0x2aa5('0xc'));var crypto=require('crypto');var jsforce=require(_0x2aa5('0xd'));var deskjs=require('desk.js');var toCsv=require(_0x2aa5('0x8'));var querystring=require(_0x2aa5('0xe'));var Papa=require('papaparse');var Redis=require(_0x2aa5('0xf'));var authService=require(_0x2aa5('0x10'));var qs=require(_0x2aa5('0x11'));var as=require(_0x2aa5('0x12'));var hardwareService=require(_0x2aa5('0x13'));var logger=require('../../config/logger')(_0x2aa5('0x14'));var utils=require(_0x2aa5('0x15'));var config=require(_0x2aa5('0x16'));var licenseUtil=require(_0x2aa5('0x17'));var db=require(_0x2aa5('0x18'))['db'];config[_0x2aa5('0x19')]=_[_0x2aa5('0x1a')](config[_0x2aa5('0x19')],{'host':_0x2aa5('0x1b'),'port':0x18eb});var socket=require(_0x2aa5('0x1c'))(new Redis(config[_0x2aa5('0x19')]));require('./dashboard.socket')[_0x2aa5('0x1d')](socket);function respondWithStatusCode(_0x54bf02,_0x1f92eb){_0x1f92eb=_0x1f92eb||0xcc;return function(_0x2ab9c4){if(_0x2ab9c4){return _0x54bf02[_0x2aa5('0x1e')](_0x1f92eb);}return _0x54bf02[_0x2aa5('0x1f')](_0x1f92eb)[_0x2aa5('0x20')]();};}function respondWithResult(_0x3013b5,_0x70e76b){_0x70e76b=_0x70e76b||0xc8;return function(_0x160221){if(_0x160221){return _0x3013b5[_0x2aa5('0x1f')](_0x70e76b)['json'](_0x160221);}};}function respondWithFilteredResult(_0x208f32,_0x3d0c7d){return function(_0x5c8727){if(_0x5c8727){var _0x503a78=typeof _0x3d0c7d[_0x2aa5('0x21')]===_0x2aa5('0x22')&&typeof _0x3d0c7d[_0x2aa5('0x23')]===_0x2aa5('0x22');var _0x36cb86=_0x5c8727['count'];var _0x377999=_0x503a78?0x0:_0x3d0c7d[_0x2aa5('0x21')];var _0x170dd5=_0x503a78?_0x5c8727[_0x2aa5('0x24')]:_0x3d0c7d[_0x2aa5('0x21')]+_0x3d0c7d[_0x2aa5('0x23')];var _0x8dfcaf;if(_0x170dd5>=_0x36cb86){_0x170dd5=_0x36cb86;_0x8dfcaf=0xc8;}else{_0x8dfcaf=0xce;}_0x208f32[_0x2aa5('0x1f')](_0x8dfcaf);return _0x208f32[_0x2aa5('0x25')](_0x2aa5('0x26'),_0x377999+'-'+_0x170dd5+'/'+_0x36cb86)[_0x2aa5('0x27')](_0x5c8727);}return null;};}function patchUpdates(_0x5b5a7e){return function(_0x1e641a){try{jsonpatch[_0x2aa5('0x28')](_0x1e641a,_0x5b5a7e,!![]);}catch(_0x19d723){return BPromise[_0x2aa5('0x29')](_0x19d723);}return _0x1e641a[_0x2aa5('0x2a')]();};}function saveUpdates(_0x3694f4,_0x3a866f){return function(_0x3e32fb){if(_0x3e32fb){return _0x3e32fb[_0x2aa5('0x2b')](_0x3694f4)['then'](function(_0x4df95e){return _0x4df95e;});}return null;};}function removeEntity(_0x400b4a,_0x3a2fa0){return function(_0x34d886){if(_0x34d886){return _0x34d886[_0x2aa5('0x2c')]()['then'](function(){var _0x49b93c=_0x34d886[_0x2aa5('0x2d')]({'plain':!![]});var _0x3b7a5c=_0x2aa5('0x2e');return db[_0x2aa5('0x2f')][_0x2aa5('0x2c')]({'where':{'type':_0x3b7a5c,'resourceId':_0x49b93c['id']}})[_0x2aa5('0x30')](function(){return _0x34d886;});})['then'](function(){_0x400b4a[_0x2aa5('0x1f')](0xcc)[_0x2aa5('0x20')]();});}};}function handleEntityNotFound(_0x31021c,_0x14caf9){return function(_0x26a9d8){if(!_0x26a9d8){_0x31021c['sendStatus'](0x194);}return _0x26a9d8;};}function handleError(_0x281b60,_0x5687cb){_0x5687cb=_0x5687cb||0x1f4;return function(_0x3edd57){logger[_0x2aa5('0x31')](_0x3edd57[_0x2aa5('0x32')]);if(_0x3edd57['name']){delete _0x3edd57[_0x2aa5('0x33')];}_0x281b60[_0x2aa5('0x1f')](_0x5687cb)['send'](_0x3edd57);};}exports['index']=function(_0xef35de,_0x131085){var _0xd84ead={},_0x34861f={},_0x115d17={'count':0x0,'rows':[]};var _0x4df48e=_[_0x2aa5('0x34')](db['Dashboard'][_0x2aa5('0x35')],function(_0x241153){return{'name':_0x241153[_0x2aa5('0x36')],'type':_0x241153[_0x2aa5('0x37')][_0x2aa5('0x38')]};});_0x34861f['model']=_[_0x2aa5('0x34')](_0x4df48e,_0x2aa5('0x33'));_0x34861f[_0x2aa5('0x39')]=_[_0x2aa5('0x3a')](_0xef35de[_0x2aa5('0x39')]);_0x34861f[_0x2aa5('0x3b')]=_[_0x2aa5('0x3c')](_0x34861f['model'],_0x34861f[_0x2aa5('0x39')]);_0xd84ead[_0x2aa5('0x3d')]=_[_0x2aa5('0x3c')](_0x34861f[_0x2aa5('0x3e')],qs[_0x2aa5('0x3f')](_0xef35de[_0x2aa5('0x39')]['fields']));_0xd84ead[_0x2aa5('0x3d')]=_0xd84ead['attributes'][_0x2aa5('0x40')]?_0xd84ead['attributes']:_0x34861f[_0x2aa5('0x3e')];if(!_0xef35de['query'][_0x2aa5('0x41')](_0x2aa5('0x42'))){_0xd84ead[_0x2aa5('0x23')]=qs['limit'](_0xef35de[_0x2aa5('0x39')][_0x2aa5('0x23')]);_0xd84ead['offset']=qs[_0x2aa5('0x21')](_0xef35de[_0x2aa5('0x39')][_0x2aa5('0x21')]);}_0xd84ead[_0x2aa5('0x43')]=qs[_0x2aa5('0x44')](_0xef35de[_0x2aa5('0x39')][_0x2aa5('0x44')]);_0xd84ead[_0x2aa5('0x45')]=qs[_0x2aa5('0x3b')](_[_0x2aa5('0x46')](_0xef35de[_0x2aa5('0x39')],_0x34861f['filters']),_0x4df48e);if(_0xef35de['query'][_0x2aa5('0x47')]){_0xd84ead[_0x2aa5('0x45')]=_[_0x2aa5('0x48')](_0xd84ead[_0x2aa5('0x45')],{'$or':_[_0x2aa5('0x34')](_0x4df48e,function(_0x191756){if(_0x191756['type']!==_0x2aa5('0x49')){var _0x10b47c={};_0x10b47c[_0x191756['name']]={'$like':'%'+_0xef35de['query']['filter']+'%'};return _0x10b47c;}})});}_0xd84ead=_[_0x2aa5('0x48')]({},_0xd84ead,_0xef35de[_0x2aa5('0x4a')]);var _0x39d04e={'where':_0xd84ead['where']};return db[_0x2aa5('0x4b')][_0x2aa5('0x24')](_0x39d04e)['then'](function(_0x538fcd){_0x115d17[_0x2aa5('0x24')]=_0x538fcd;if(_0xef35de[_0x2aa5('0x39')][_0x2aa5('0x4c')]){_0xd84ead[_0x2aa5('0x4d')]=[{'all':!![]}];}return db[_0x2aa5('0x4b')][_0x2aa5('0x4e')](_0xd84ead);})[_0x2aa5('0x30')](function(_0x5b2cfd){_0x115d17['rows']=_0x5b2cfd;return _0x115d17;})[_0x2aa5('0x30')](respondWithFilteredResult(_0x131085,_0xd84ead))[_0x2aa5('0x4f')](handleError(_0x131085,null));};exports[_0x2aa5('0x50')]=function(_0x3dc947,_0x20c72b){var _0x17df8a={'raw':![],'where':{'id':_0x3dc947[_0x2aa5('0x51')]['id']}},_0x4277c9={};_0x4277c9['model']=_['keys'](db[_0x2aa5('0x4b')][_0x2aa5('0x35')]);_0x4277c9[_0x2aa5('0x39')]=_['keys'](_0x3dc947['query']);_0x4277c9['filters']=_[_0x2aa5('0x3c')](_0x4277c9[_0x2aa5('0x3e')],_0x4277c9[_0x2aa5('0x39')]);_0x17df8a[_0x2aa5('0x3d')]=_[_0x2aa5('0x3c')](_0x4277c9[_0x2aa5('0x3e')],qs[_0x2aa5('0x3f')](_0x3dc947[_0x2aa5('0x39')][_0x2aa5('0x3f')]));_0x17df8a[_0x2aa5('0x3d')]=_0x17df8a['attributes'][_0x2aa5('0x40')]?_0x17df8a[_0x2aa5('0x3d')]:_0x4277c9[_0x2aa5('0x3e')];if(_0x3dc947[_0x2aa5('0x39')][_0x2aa5('0x4c')]){_0x17df8a[_0x2aa5('0x4d')]=[{'all':!![]}];}_0x17df8a=_[_0x2aa5('0x48')]({},_0x17df8a,_0x3dc947['options']);return db['Dashboard'][_0x2aa5('0x52')](_0x17df8a)[_0x2aa5('0x30')](handleEntityNotFound(_0x20c72b,null))[_0x2aa5('0x30')](respondWithResult(_0x20c72b,null))[_0x2aa5('0x4f')](handleError(_0x20c72b,null));};exports[_0x2aa5('0x53')]=function(_0x12b2fc,_0x136aea){return db['Dashboard'][_0x2aa5('0x53')](_0x12b2fc[_0x2aa5('0x54')],{})[_0x2aa5('0x30')](function(_0x476556){var _0x2d838b=_0x12b2fc[_0x2aa5('0x55')][_0x2aa5('0x2d')]({'plain':!![]});if(!_0x2d838b)throw new Error(_0x2aa5('0x56'));if(_0x2d838b[_0x2aa5('0x57')]===_0x2aa5('0x55')){var _0x3168ca=_0x476556[_0x2aa5('0x2d')]({'plain':!![]});var _0x32379c=_0x2aa5('0x2e');return db[_0x2aa5('0x58')][_0x2aa5('0x52')]({'where':{'name':_0x32379c,'userProfileId':_0x2d838b['userProfileId']},'raw':!![]})[_0x2aa5('0x30')](function(_0x27f98c){if(_0x27f98c&&_0x27f98c[_0x2aa5('0x59')]===0x0){return db[_0x2aa5('0x2f')][_0x2aa5('0x53')]({'name':_0x3168ca['name'],'resourceId':_0x3168ca['id'],'type':_0x27f98c[_0x2aa5('0x33')],'sectionId':_0x27f98c['id']},{})[_0x2aa5('0x30')](function(){return _0x476556;});}else{return _0x476556;}})[_0x2aa5('0x4f')](function(_0x442c49){logger[_0x2aa5('0x31')](_0x2aa5('0x5a'),_0x442c49);throw _0x442c49;});}return _0x476556;})['then'](respondWithResult(_0x136aea,0xc9))[_0x2aa5('0x4f')](handleError(_0x136aea,null));};exports['clone']=function(_0x8d9ce0,_0x74c876){var _0x352183={'where':{'id':_0x8d9ce0[_0x2aa5('0x51')]['id']}},_0x13ecc1={};_0x13ecc1[_0x2aa5('0x3e')]=_[_0x2aa5('0x3a')](db[_0x2aa5('0x4b')][_0x2aa5('0x35')]);_0x352183[_0x2aa5('0x3d')]=_[_0x2aa5('0x3c')](_0x13ecc1[_0x2aa5('0x3e')],qs[_0x2aa5('0x3f')](_0x8d9ce0[_0x2aa5('0x39')][_0x2aa5('0x3f')]));_0x352183[_0x2aa5('0x3d')]=_0x352183[_0x2aa5('0x3d')][_0x2aa5('0x40')]?_0x352183[_0x2aa5('0x3d')]:_0x13ecc1[_0x2aa5('0x3e')];if(_0x8d9ce0['query'][_0x2aa5('0x4c')]){_0x352183[_0x2aa5('0x4d')]=[{'all':!![]}];}_0x352183=_[_0x2aa5('0x48')]({},_0x352183,_0x8d9ce0['options']);return db[_0x2aa5('0x4b')][_0x2aa5('0x52')](_0x352183)['then'](handleEntityNotFound(_0x74c876,null))[_0x2aa5('0x30')](function(_0x4abe88){if(_0x4abe88){var _0x52e929=_0x4abe88[_0x2aa5('0x2d')]({'plain':!![]});_0x52e929=qs[_0x2aa5('0x5b')](_0x52e929,['id',_0x2aa5('0x5c'),_0x2aa5('0x5d')]);_0x8d9ce0[_0x2aa5('0x54')]=_[_0x2aa5('0x5b')](_0x8d9ce0[_0x2aa5('0x54')],['id',_0x2aa5('0x5c'),'updatedAt']);return db['Dashboard'][_0x2aa5('0x53')](_[_0x2aa5('0x48')](_0x52e929,_0x8d9ce0['body']),{'include':_0x8d9ce0[_0x2aa5('0x39')]['includeAll']?[{'all':!![]}]:undefined})['then'](function(_0x49845a){var _0x3e2064=_0x8d9ce0[_0x2aa5('0x55')][_0x2aa5('0x2d')]({'plain':!![]});if(!_0x3e2064)throw new Error(_0x2aa5('0x56'));if(_0x3e2064['role']==='user'){var _0x142336=_0x49845a['get']({'plain':!![]});var _0x4394b4=_0x2aa5('0x2e');return db[_0x2aa5('0x58')][_0x2aa5('0x52')]({'where':{'name':_0x4394b4,'userProfileId':_0x3e2064[_0x2aa5('0x5e')]},'raw':!![]})['then'](function(_0x1f9797){if(_0x1f9797&&_0x1f9797[_0x2aa5('0x59')]===0x0){return db[_0x2aa5('0x2f')][_0x2aa5('0x53')]({'name':_0x142336[_0x2aa5('0x33')],'resourceId':_0x142336['id'],'type':_0x1f9797[_0x2aa5('0x33')],'sectionId':_0x1f9797['id']},{})['then'](function(){return _0x49845a;});}else{return _0x49845a;}})[_0x2aa5('0x4f')](function(_0x34f78d){logger['error'](_0x2aa5('0x5a'),_0x34f78d);throw _0x34f78d;});}return _0x49845a;});}})[_0x2aa5('0x30')](respondWithResult(_0x74c876,0xc9))[_0x2aa5('0x4f')](handleError(_0x74c876,null));};exports[_0x2aa5('0x2b')]=function(_0x36d8ad,_0x57c26a){if(_0x36d8ad['body']['id']){delete _0x36d8ad['body']['id'];}return db['Dashboard'][_0x2aa5('0x52')]({'where':{'id':_0x36d8ad[_0x2aa5('0x51')]['id']}})['then'](handleEntityNotFound(_0x57c26a,null))[_0x2aa5('0x30')](saveUpdates(_0x36d8ad[_0x2aa5('0x54')],null))[_0x2aa5('0x30')](respondWithResult(_0x57c26a,null))[_0x2aa5('0x4f')](handleError(_0x57c26a,null));};exports[_0x2aa5('0x2c')]=function(_0x1879d8,_0x4eca4b){return db[_0x2aa5('0x4b')][_0x2aa5('0x52')]({'where':{'id':_0x1879d8['params']['id']}})[_0x2aa5('0x30')](handleEntityNotFound(_0x4eca4b,null))[_0x2aa5('0x30')](removeEntity(_0x4eca4b,null))['catch'](handleError(_0x4eca4b,null));};function widgetAttributes(_0xe5c2){try{switch(_0xe5c2[_0x2aa5('0x37')]){case _0x2aa5('0x5f'):return[{'name':_0x2aa5('0x60'),'value':_0xe5c2[_0x2aa5('0x60')]||(_0xe5c2[_0x2aa5('0x61')]&&_0xe5c2[_0x2aa5('0x61')][0x0]?_0xe5c2[_0x2aa5('0x61')][0x0][_0x2aa5('0x62')]:undefined)||_0x2aa5('0x63')}];case _0x2aa5('0x64'):return[{'name':_0x2aa5('0x65'),'value':_0xe5c2[_0x2aa5('0x65')]||(_0xe5c2[_0x2aa5('0x61')]&&_0xe5c2[_0x2aa5('0x61')][0x0]?_0xe5c2[_0x2aa5('0x61')][0x0][_0x2aa5('0x62')]:undefined)||''}];case _0x2aa5('0x66'):return[{'name':_0x2aa5('0x67'),'value':_0xe5c2[_0x2aa5('0x67')]||(_0xe5c2[_0x2aa5('0x61')]&&_0xe5c2[_0x2aa5('0x61')][0x0]?_0xe5c2[_0x2aa5('0x61')][0x0]['value']:undefined)||_0x2aa5('0x68')},{'name':_0x2aa5('0x69'),'value':_0xe5c2['attrTimezone']||(_0xe5c2[_0x2aa5('0x61')]&&_0xe5c2[_0x2aa5('0x61')][0x1]?_0xe5c2['attrs'][0x1][_0x2aa5('0x62')]:undefined)||_0x2aa5('0x6a')},{'name':_0x2aa5('0x6b'),'value':_0xe5c2['attrFontSize']||(_0xe5c2[_0x2aa5('0x61')]&&_0xe5c2[_0x2aa5('0x61')][0x2]?_0xe5c2[_0x2aa5('0x61')][0x2][_0x2aa5('0x62')]:undefined)||0xc}];case _0x2aa5('0x6c'):return[{'name':_0x2aa5('0x6d'),'value':_0xe5c2[_0x2aa5('0x6d')]||(_0xe5c2['attrs']&&_0xe5c2[_0x2aa5('0x61')][0x0]?_0xe5c2['attrs'][0x0]['value']:undefined)||_0x2aa5('0x6e')},{'name':_0x2aa5('0x6f'),'value':_0xe5c2[_0x2aa5('0x6f')]||(_0xe5c2['attrs']&&_0xe5c2['attrs'][0x1]?_0xe5c2['attrs'][0x1][_0x2aa5('0x62')]:undefined)||[]},{'name':_0x2aa5('0x6b'),'value':_0xe5c2[_0x2aa5('0x6b')]||(_0xe5c2[_0x2aa5('0x61')]&&_0xe5c2[_0x2aa5('0x61')][0x2]?_0xe5c2['attrs'][0x2][_0x2aa5('0x62')]:undefined)||0x14},{'name':_0x2aa5('0x70'),'value':_0xe5c2[_0x2aa5('0x70')]||(_0xe5c2['attrs']&&_0xe5c2[_0x2aa5('0x61')][0x3]?_0xe5c2[_0x2aa5('0x61')][0x3][_0x2aa5('0x62')]:undefined)||_0x2aa5('0x71')},{'name':_0x2aa5('0x72'),'value':_0xe5c2[_0x2aa5('0x72')]||(_0xe5c2[_0x2aa5('0x61')]&&_0xe5c2[_0x2aa5('0x61')][0x4]?_0xe5c2[_0x2aa5('0x61')][0x4][_0x2aa5('0x62')]:undefined)||''},{'name':_0x2aa5('0x73'),'value':_0xe5c2[_0x2aa5('0x73')]||(_0xe5c2[_0x2aa5('0x61')]&&_0xe5c2[_0x2aa5('0x61')][0x5]?_0xe5c2['attrs'][0x5][_0x2aa5('0x62')]:undefined)||''},{'name':_0x2aa5('0x74'),'value':_0xe5c2['attrSmsAccounts']||(_0xe5c2['attrs']&&_0xe5c2['attrs'][0x6]?_0xe5c2[_0x2aa5('0x61')][0x6]['value']:undefined)||''},{'name':'attrOpenchannelAccounts','value':_0xe5c2[_0x2aa5('0x75')]||(_0xe5c2['attrs']&&_0xe5c2[_0x2aa5('0x61')][0x7]?_0xe5c2[_0x2aa5('0x61')][0x7][_0x2aa5('0x62')]:undefined)||''},{'name':_0x2aa5('0x76'),'value':_0xe5c2[_0x2aa5('0x76')]||(_0xe5c2[_0x2aa5('0x61')]&&_0xe5c2[_0x2aa5('0x61')][0x8]?_0xe5c2[_0x2aa5('0x61')][0x8][_0x2aa5('0x62')]:undefined)||''},{'name':'attrChatWebsites','value':_0xe5c2['attrChatWebsites']||(_0xe5c2[_0x2aa5('0x61')]&&_0xe5c2[_0x2aa5('0x61')][0x9]?_0xe5c2[_0x2aa5('0x61')][0x9][_0x2aa5('0x62')]:undefined)||''}];case _0x2aa5('0x77'):case _0x2aa5('0x78'):return[{'name':'attrSerie1','value':_0xe5c2[_0x2aa5('0x79')]||(_0xe5c2['attrs']&&_0xe5c2[_0x2aa5('0x61')][0x0]?_0xe5c2['attrs'][0x0]['value']:undefined)||_0x2aa5('0x6e')},{'name':'attrSerie2','value':_0xe5c2[_0x2aa5('0x7a')]||(_0xe5c2[_0x2aa5('0x61')]&&_0xe5c2[_0x2aa5('0x61')][0x1]?_0xe5c2[_0x2aa5('0x61')][0x1][_0x2aa5('0x62')]:undefined)||null},{'name':_0x2aa5('0x7b'),'value':_0xe5c2['attrSerie3']||(_0xe5c2[_0x2aa5('0x61')]&&_0xe5c2['attrs'][0x2]?_0xe5c2[_0x2aa5('0x61')][0x2][_0x2aa5('0x62')]:undefined)||null},{'name':_0x2aa5('0x6f'),'value':_0xe5c2[_0x2aa5('0x6f')]||(_0xe5c2[_0x2aa5('0x61')]&&_0xe5c2[_0x2aa5('0x61')][0x3]?_0xe5c2[_0x2aa5('0x61')][0x3][_0x2aa5('0x62')]:undefined)||[]},{'name':_0x2aa5('0x70'),'value':_0xe5c2[_0x2aa5('0x70')]||(_0xe5c2['attrs']&&_0xe5c2[_0x2aa5('0x61')][0x4]?_0xe5c2['attrs'][0x4][_0x2aa5('0x62')]:undefined)||_0x2aa5('0x71')},{'name':_0x2aa5('0x72'),'value':_0xe5c2[_0x2aa5('0x72')]||(_0xe5c2[_0x2aa5('0x61')]&&_0xe5c2[_0x2aa5('0x61')][0x5]?_0xe5c2[_0x2aa5('0x61')][0x5][_0x2aa5('0x62')]:undefined)||''},{'name':_0x2aa5('0x73'),'value':_0xe5c2[_0x2aa5('0x73')]||(_0xe5c2['attrs']&&_0xe5c2[_0x2aa5('0x61')][0x6]?_0xe5c2[_0x2aa5('0x61')][0x6][_0x2aa5('0x62')]:undefined)||''},{'name':_0x2aa5('0x74'),'value':_0xe5c2['attrSmsAccounts']||(_0xe5c2[_0x2aa5('0x61')]&&_0xe5c2[_0x2aa5('0x61')][0x7]?_0xe5c2[_0x2aa5('0x61')][0x7][_0x2aa5('0x62')]:undefined)||''},{'name':_0x2aa5('0x75'),'value':_0xe5c2[_0x2aa5('0x75')]||(_0xe5c2[_0x2aa5('0x61')]&&_0xe5c2['attrs'][0x8]?_0xe5c2[_0x2aa5('0x61')][0x8][_0x2aa5('0x62')]:undefined)||''},{'name':_0x2aa5('0x76'),'value':_0xe5c2[_0x2aa5('0x76')]||(_0xe5c2[_0x2aa5('0x61')]&&_0xe5c2[_0x2aa5('0x61')][0x9]?_0xe5c2['attrs'][0x9][_0x2aa5('0x62')]:undefined)||''},{'name':_0x2aa5('0x7c'),'value':_0xe5c2[_0x2aa5('0x7c')]||(_0xe5c2['attrs']&&_0xe5c2[_0x2aa5('0x61')][0xa]?_0xe5c2['attrs'][0xa]['value']:undefined)||''}];case'web-report':return[{'name':'attrReport','type':_0xe5c2[_0x2aa5('0x7d')]||(_0xe5c2[_0x2aa5('0x61')]&&_0xe5c2[_0x2aa5('0x61')][0x0]?_0xe5c2['attrs'][0x0][_0x2aa5('0x37')]:undefined)||null,'value':_0xe5c2[_0x2aa5('0x7e')]||(_0xe5c2[_0x2aa5('0x61')]&&_0xe5c2['attrs'][0x0]?_0xe5c2[_0x2aa5('0x61')][0x0][_0x2aa5('0x62')]:undefined)||null},{'name':_0x2aa5('0x7f'),'value':_0xe5c2[_0x2aa5('0x7f')]||(_0xe5c2[_0x2aa5('0x61')]&&_0xe5c2[_0x2aa5('0x61')][0x1]?_0xe5c2[_0x2aa5('0x61')][0x1][_0x2aa5('0x62')]:undefined)||0x0}];default:return[];}}catch(_0x2d0b0a){logger[_0x2aa5('0x31')]('widgetAttributes:\x20%s',JSON[_0x2aa5('0x80')](_0x2d0b0a));return[];}}exports[_0x2aa5('0x81')]=function(_0x5dd2c0,_0x23efc2,_0x3afb19){if(_0x5dd2c0[_0x2aa5('0x54')]['id']){delete _0x5dd2c0[_0x2aa5('0x54')]['id'];}return db[_0x2aa5('0x4b')][_0x2aa5('0x52')]({'where':{'id':_0x5dd2c0['params']['id']}})['then'](handleEntityNotFound(_0x23efc2,null))[_0x2aa5('0x30')](function(_0x3ca17b){if(_0x3ca17b){_0x5dd2c0[_0x2aa5('0x54')][_0x2aa5('0x82')]=_0x3ca17b['id'];_0x5dd2c0[_0x2aa5('0x54')][_0x2aa5('0x61')]=widgetAttributes(_0x5dd2c0[_0x2aa5('0x54')]);return db[_0x2aa5('0x83')][_0x2aa5('0x53')](_0x5dd2c0[_0x2aa5('0x54')]);}})[_0x2aa5('0x30')](respondWithResult(_0x23efc2,null))[_0x2aa5('0x4f')](handleError(_0x23efc2,null));};exports['getItems']=function(_0x5254fb,_0x24203f,_0x36d079){var _0x540518={};var _0x41eb19={};var _0x6106a3;var _0x3dbb2f;return db[_0x2aa5('0x4b')][_0x2aa5('0x84')]({'where':{'id':_0x5254fb[_0x2aa5('0x51')]['id']}})['then'](handleEntityNotFound(_0x24203f,null))[_0x2aa5('0x30')](function(_0x494d66){if(_0x494d66){_0x6106a3=_0x494d66;_0x41eb19[_0x2aa5('0x3e')]=_[_0x2aa5('0x3a')](db[_0x2aa5('0x83')]['rawAttributes']);_0x41eb19[_0x2aa5('0x39')]=_['keys'](_0x5254fb[_0x2aa5('0x39')]);_0x41eb19[_0x2aa5('0x3b')]=_['intersection'](_0x41eb19[_0x2aa5('0x3e')],_0x41eb19[_0x2aa5('0x39')]);_0x540518[_0x2aa5('0x3d')]=_[_0x2aa5('0x3c')](_0x41eb19[_0x2aa5('0x3e')],qs['fields'](_0x5254fb[_0x2aa5('0x39')][_0x2aa5('0x3f')]));_0x540518['attributes']=_0x540518[_0x2aa5('0x3d')][_0x2aa5('0x40')]?_0x540518['attributes']:_0x41eb19['model'];_0x540518['order']=qs[_0x2aa5('0x44')](_0x5254fb[_0x2aa5('0x39')][_0x2aa5('0x44')]);_0x540518[_0x2aa5('0x45')]=qs[_0x2aa5('0x3b')](_[_0x2aa5('0x46')](_0x5254fb[_0x2aa5('0x39')],_0x41eb19[_0x2aa5('0x3b')]));if(_0x5254fb['query'][_0x2aa5('0x47')]){_0x540518[_0x2aa5('0x45')]=_[_0x2aa5('0x48')](_0x540518[_0x2aa5('0x45')],{'$or':_['map'](_0x540518[_0x2aa5('0x3d')],function(_0x19081a){var _0x337563={};_0x337563[_0x19081a]={'$like':'%'+_0x5254fb[_0x2aa5('0x39')][_0x2aa5('0x47')]+'%'};return _0x337563;})});}_0x540518=_[_0x2aa5('0x48')]({},_0x540518,_0x5254fb[_0x2aa5('0x4a')]);return _0x6106a3['getItems'](_0x540518);}})[_0x2aa5('0x30')](function(_0x238fc2){if(_0x238fc2){_0x3dbb2f=_0x238fc2[_0x2aa5('0x40')];if(!_0x5254fb[_0x2aa5('0x39')]['hasOwnProperty']('nolimit')){_0x540518[_0x2aa5('0x23')]=qs[_0x2aa5('0x23')](_0x5254fb['query'][_0x2aa5('0x23')]);_0x540518['offset']=qs['offset'](_0x5254fb[_0x2aa5('0x39')]['offset']);}return _0x6106a3['getItems'](_0x540518);}})[_0x2aa5('0x30')](function(_0x56af6a){if(_0x56af6a){return _0x56af6a?{'count':_0x3dbb2f,'rows':_0x56af6a}:null;}})[_0x2aa5('0x30')](respondWithResult(_0x24203f,null))[_0x2aa5('0x4f')](handleError(_0x24203f,null));}; \ No newline at end of file +var _0xa30f=['name','send','fieldName','type','key','model','map','query','keys','filters','intersection','attributes','fields','length','nolimit','order','sort','pick','filter','merge','where','VIRTUAL','options','Dashboard','includeAll','include','rows','catch','show','params','rawAttributes','find','create','body','user','Unable\x20to\x20retrieve\x20the\x20current\x20user','UserProfileSection','userProfileId','autoAssociation','error','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','clone','omit','createdAt','updatedAt','role','update','destroy','iframe','attrUrl','attrs','custom','value','clock','attrHourFormat','HH:mm:ss','attrTimezone','0.00','attrFontSize','counter','attrMetric','attrVoiceQueues','attrChannel','attrEmailAccounts','attrFaxAccounts','attrSmsAccounts','attrOpenchannelAccounts','attrWhatsappAccounts','attrChatWebsites','pie-chart','total','attrSerie2','attrSerie3','web-report','reportType','attrReport','attrRefresh','stringify','DashboardItem','findOne','getItems','eml-format','rimraf','zip-dir','request-promise','moment','bluebird','mustache','util','path','sox','ejs','fs-extra','lodash','squel','crypto','jsforce','desk.js','querystring','ioredis','../../components/parsers/qs','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','redis','defaults','localhost','socket.io-emitter','register','sendStatus','status','undefined','count','offset','limit','Content-Range','apply','reject','save','then','get','CustomDashboards','UserProfileResource','end','stack'];(function(_0x2b62cf,_0x108ced){var _0x4982ae=function(_0x4566ed){while(--_0x4566ed){_0x2b62cf['push'](_0x2b62cf['shift']());}};_0x4982ae(++_0x108ced);}(_0xa30f,0x1d4));var _0xfa30=function(_0x512c93,_0x9e0258){_0x512c93=_0x512c93-0x0;var _0x3bf671=_0xa30f[_0x512c93];return _0x3bf671;};'use strict';var emlformat=require(_0xfa30('0x0'));var rimraf=require(_0xfa30('0x1'));var zipdir=require(_0xfa30('0x2'));var jsonpatch=require('fast-json-patch');var rp=require(_0xfa30('0x3'));var moment=require(_0xfa30('0x4'));var BPromise=require(_0xfa30('0x5'));var Mustache=require(_0xfa30('0x6'));var util=require(_0xfa30('0x7'));var path=require(_0xfa30('0x8'));var sox=require(_0xfa30('0x9'));var csv=require('to-csv');var ejs=require(_0xfa30('0xa'));var fs=require('fs');var fs_extra=require(_0xfa30('0xb'));var _=require(_0xfa30('0xc'));var squel=require(_0xfa30('0xd'));var crypto=require(_0xfa30('0xe'));var jsforce=require(_0xfa30('0xf'));var deskjs=require(_0xfa30('0x10'));var toCsv=require('to-csv');var querystring=require(_0xfa30('0x11'));var Papa=require('papaparse');var Redis=require(_0xfa30('0x12'));var authService=require('../../components/auth/service');var qs=require(_0xfa30('0x13'));var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0xfa30('0x14'));var logger=require(_0xfa30('0x15'))(_0xfa30('0x16'));var utils=require(_0xfa30('0x17'));var config=require(_0xfa30('0x18'));var licenseUtil=require(_0xfa30('0x19'));var db=require(_0xfa30('0x1a'))['db'];config[_0xfa30('0x1b')]=_[_0xfa30('0x1c')](config[_0xfa30('0x1b')],{'host':_0xfa30('0x1d'),'port':0x18eb});var socket=require(_0xfa30('0x1e'))(new Redis(config[_0xfa30('0x1b')]));require('./dashboard.socket')[_0xfa30('0x1f')](socket);function respondWithStatusCode(_0x1e30ec,_0x5bb4e6){_0x5bb4e6=_0x5bb4e6||0xcc;return function(_0x1c8957){if(_0x1c8957){return _0x1e30ec[_0xfa30('0x20')](_0x5bb4e6);}return _0x1e30ec['status'](_0x5bb4e6)['end']();};}function respondWithResult(_0x3524fb,_0x12d2ed){_0x12d2ed=_0x12d2ed||0xc8;return function(_0xec3dd){if(_0xec3dd){return _0x3524fb[_0xfa30('0x21')](_0x12d2ed)['json'](_0xec3dd);}};}function respondWithFilteredResult(_0x33a59c,_0x346c3d){return function(_0x567cda){if(_0x567cda){var _0x3c7dbc=typeof _0x346c3d['offset']===_0xfa30('0x22')&&typeof _0x346c3d['limit']==='undefined';var _0xde5f=_0x567cda[_0xfa30('0x23')];var _0x4e4df8=_0x3c7dbc?0x0:_0x346c3d[_0xfa30('0x24')];var _0x1627da=_0x3c7dbc?_0x567cda[_0xfa30('0x23')]:_0x346c3d['offset']+_0x346c3d[_0xfa30('0x25')];var _0x412a45;if(_0x1627da>=_0xde5f){_0x1627da=_0xde5f;_0x412a45=0xc8;}else{_0x412a45=0xce;}_0x33a59c[_0xfa30('0x21')](_0x412a45);return _0x33a59c['set'](_0xfa30('0x26'),_0x4e4df8+'-'+_0x1627da+'/'+_0xde5f)['json'](_0x567cda);}return null;};}function patchUpdates(_0x11a888){return function(_0x535a00){try{jsonpatch[_0xfa30('0x27')](_0x535a00,_0x11a888,!![]);}catch(_0x3efd47){return BPromise[_0xfa30('0x28')](_0x3efd47);}return _0x535a00[_0xfa30('0x29')]();};}function saveUpdates(_0x16adb9,_0xad6d0d){return function(_0x2e422b){if(_0x2e422b){return _0x2e422b['update'](_0x16adb9)[_0xfa30('0x2a')](function(_0x1b0d2b){return _0x1b0d2b;});}return null;};}function removeEntity(_0x363727,_0xf80736){return function(_0x3a9545){if(_0x3a9545){return _0x3a9545['destroy']()[_0xfa30('0x2a')](function(){var _0x590787=_0x3a9545[_0xfa30('0x2b')]({'plain':!![]});var _0x5040d2=_0xfa30('0x2c');return db[_0xfa30('0x2d')]['destroy']({'where':{'type':_0x5040d2,'resourceId':_0x590787['id']}})['then'](function(){return _0x3a9545;});})['then'](function(){_0x363727[_0xfa30('0x21')](0xcc)[_0xfa30('0x2e')]();});}};}function handleEntityNotFound(_0x3e37e9,_0x542d4){return function(_0x291b50){if(!_0x291b50){_0x3e37e9[_0xfa30('0x20')](0x194);}return _0x291b50;};}function handleError(_0x364427,_0x9e434f){_0x9e434f=_0x9e434f||0x1f4;return function(_0x59896a){logger['error'](_0x59896a[_0xfa30('0x2f')]);if(_0x59896a[_0xfa30('0x30')]){delete _0x59896a[_0xfa30('0x30')];}_0x364427['status'](_0x9e434f)[_0xfa30('0x31')](_0x59896a);};}exports['index']=function(_0x59c8cc,_0x551858){var _0x20f1cb={},_0x21009c={},_0x3de2c4={'count':0x0,'rows':[]};var _0x46ec93=_['map'](db['Dashboard']['rawAttributes'],function(_0x58a31f){return{'name':_0x58a31f[_0xfa30('0x32')],'type':_0x58a31f[_0xfa30('0x33')][_0xfa30('0x34')]};});_0x21009c[_0xfa30('0x35')]=_[_0xfa30('0x36')](_0x46ec93,'name');_0x21009c[_0xfa30('0x37')]=_[_0xfa30('0x38')](_0x59c8cc[_0xfa30('0x37')]);_0x21009c[_0xfa30('0x39')]=_[_0xfa30('0x3a')](_0x21009c['model'],_0x21009c[_0xfa30('0x37')]);_0x20f1cb[_0xfa30('0x3b')]=_[_0xfa30('0x3a')](_0x21009c[_0xfa30('0x35')],qs[_0xfa30('0x3c')](_0x59c8cc[_0xfa30('0x37')]['fields']));_0x20f1cb['attributes']=_0x20f1cb[_0xfa30('0x3b')][_0xfa30('0x3d')]?_0x20f1cb[_0xfa30('0x3b')]:_0x21009c[_0xfa30('0x35')];if(!_0x59c8cc['query']['hasOwnProperty'](_0xfa30('0x3e'))){_0x20f1cb[_0xfa30('0x25')]=qs[_0xfa30('0x25')](_0x59c8cc['query'][_0xfa30('0x25')]);_0x20f1cb['offset']=qs[_0xfa30('0x24')](_0x59c8cc[_0xfa30('0x37')][_0xfa30('0x24')]);}_0x20f1cb[_0xfa30('0x3f')]=qs['sort'](_0x59c8cc[_0xfa30('0x37')][_0xfa30('0x40')]);_0x20f1cb['where']=qs[_0xfa30('0x39')](_[_0xfa30('0x41')](_0x59c8cc[_0xfa30('0x37')],_0x21009c[_0xfa30('0x39')]),_0x46ec93);if(_0x59c8cc[_0xfa30('0x37')][_0xfa30('0x42')]){_0x20f1cb['where']=_[_0xfa30('0x43')](_0x20f1cb[_0xfa30('0x44')],{'$or':_[_0xfa30('0x36')](_0x46ec93,function(_0x412a60){if(_0x412a60['type']!==_0xfa30('0x45')){var _0x14c841={};_0x14c841[_0x412a60['name']]={'$like':'%'+_0x59c8cc[_0xfa30('0x37')]['filter']+'%'};return _0x14c841;}})});}_0x20f1cb=_[_0xfa30('0x43')]({},_0x20f1cb,_0x59c8cc[_0xfa30('0x46')]);var _0x291f0f={'where':_0x20f1cb[_0xfa30('0x44')]};return db[_0xfa30('0x47')]['count'](_0x291f0f)[_0xfa30('0x2a')](function(_0x26acb0){_0x3de2c4[_0xfa30('0x23')]=_0x26acb0;if(_0x59c8cc[_0xfa30('0x37')][_0xfa30('0x48')]){_0x20f1cb[_0xfa30('0x49')]=[{'all':!![]}];}return db[_0xfa30('0x47')]['findAll'](_0x20f1cb);})['then'](function(_0x208633){_0x3de2c4[_0xfa30('0x4a')]=_0x208633;return _0x3de2c4;})[_0xfa30('0x2a')](respondWithFilteredResult(_0x551858,_0x20f1cb))[_0xfa30('0x4b')](handleError(_0x551858,null));};exports[_0xfa30('0x4c')]=function(_0x4574be,_0x32e6af){var _0x3dd7e9={'raw':![],'where':{'id':_0x4574be[_0xfa30('0x4d')]['id']}},_0x22cdf5={};_0x22cdf5['model']=_[_0xfa30('0x38')](db['Dashboard'][_0xfa30('0x4e')]);_0x22cdf5[_0xfa30('0x37')]=_['keys'](_0x4574be[_0xfa30('0x37')]);_0x22cdf5['filters']=_[_0xfa30('0x3a')](_0x22cdf5['model'],_0x22cdf5[_0xfa30('0x37')]);_0x3dd7e9[_0xfa30('0x3b')]=_['intersection'](_0x22cdf5[_0xfa30('0x35')],qs['fields'](_0x4574be[_0xfa30('0x37')][_0xfa30('0x3c')]));_0x3dd7e9[_0xfa30('0x3b')]=_0x3dd7e9[_0xfa30('0x3b')][_0xfa30('0x3d')]?_0x3dd7e9[_0xfa30('0x3b')]:_0x22cdf5['model'];if(_0x4574be[_0xfa30('0x37')][_0xfa30('0x48')]){_0x3dd7e9['include']=[{'all':!![]}];}_0x3dd7e9=_[_0xfa30('0x43')]({},_0x3dd7e9,_0x4574be[_0xfa30('0x46')]);return db[_0xfa30('0x47')][_0xfa30('0x4f')](_0x3dd7e9)['then'](handleEntityNotFound(_0x32e6af,null))[_0xfa30('0x2a')](respondWithResult(_0x32e6af,null))[_0xfa30('0x4b')](handleError(_0x32e6af,null));};exports[_0xfa30('0x50')]=function(_0x41fb27,_0x49bcac){return db[_0xfa30('0x47')][_0xfa30('0x50')](_0x41fb27[_0xfa30('0x51')],{})[_0xfa30('0x2a')](function(_0x23c70a){var _0x3908d9=_0x41fb27[_0xfa30('0x52')][_0xfa30('0x2b')]({'plain':!![]});if(!_0x3908d9)throw new Error(_0xfa30('0x53'));if(_0x3908d9['role']===_0xfa30('0x52')){var _0x532880=_0x23c70a[_0xfa30('0x2b')]({'plain':!![]});var _0x298ee4=_0xfa30('0x2c');return db[_0xfa30('0x54')][_0xfa30('0x4f')]({'where':{'name':_0x298ee4,'userProfileId':_0x3908d9[_0xfa30('0x55')]},'raw':!![]})[_0xfa30('0x2a')](function(_0x1808b3){if(_0x1808b3&&_0x1808b3[_0xfa30('0x56')]===0x0){return db[_0xfa30('0x2d')]['create']({'name':_0x532880[_0xfa30('0x30')],'resourceId':_0x532880['id'],'type':_0x1808b3[_0xfa30('0x30')],'sectionId':_0x1808b3['id']},{})[_0xfa30('0x2a')](function(){return _0x23c70a;});}else{return _0x23c70a;}})['catch'](function(_0x4f868b){logger[_0xfa30('0x57')](_0xfa30('0x58'),_0x4f868b);throw _0x4f868b;});}return _0x23c70a;})['then'](respondWithResult(_0x49bcac,0xc9))['catch'](handleError(_0x49bcac,null));};exports[_0xfa30('0x59')]=function(_0x5e3eef,_0x210bcd){var _0x59ea06={'where':{'id':_0x5e3eef[_0xfa30('0x4d')]['id']}},_0x350394={};_0x350394[_0xfa30('0x35')]=_[_0xfa30('0x38')](db[_0xfa30('0x47')]['rawAttributes']);_0x59ea06[_0xfa30('0x3b')]=_[_0xfa30('0x3a')](_0x350394[_0xfa30('0x35')],qs[_0xfa30('0x3c')](_0x5e3eef['query'][_0xfa30('0x3c')]));_0x59ea06[_0xfa30('0x3b')]=_0x59ea06[_0xfa30('0x3b')][_0xfa30('0x3d')]?_0x59ea06[_0xfa30('0x3b')]:_0x350394['model'];if(_0x5e3eef[_0xfa30('0x37')][_0xfa30('0x48')]){_0x59ea06['include']=[{'all':!![]}];}_0x59ea06=_[_0xfa30('0x43')]({},_0x59ea06,_0x5e3eef[_0xfa30('0x46')]);return db[_0xfa30('0x47')][_0xfa30('0x4f')](_0x59ea06)[_0xfa30('0x2a')](handleEntityNotFound(_0x210bcd,null))[_0xfa30('0x2a')](function(_0x28b748){if(_0x28b748){var _0x3fe7f4=_0x28b748[_0xfa30('0x2b')]({'plain':!![]});_0x3fe7f4=qs[_0xfa30('0x5a')](_0x3fe7f4,['id',_0xfa30('0x5b'),_0xfa30('0x5c')]);_0x5e3eef[_0xfa30('0x51')]=_['omit'](_0x5e3eef['body'],['id','createdAt',_0xfa30('0x5c')]);return db[_0xfa30('0x47')][_0xfa30('0x50')](_[_0xfa30('0x43')](_0x3fe7f4,_0x5e3eef[_0xfa30('0x51')]),{'include':_0x5e3eef[_0xfa30('0x37')][_0xfa30('0x48')]?[{'all':!![]}]:undefined})[_0xfa30('0x2a')](function(_0x47564d){var _0x26efb0=_0x5e3eef[_0xfa30('0x52')][_0xfa30('0x2b')]({'plain':!![]});if(!_0x26efb0)throw new Error(_0xfa30('0x53'));if(_0x26efb0[_0xfa30('0x5d')]===_0xfa30('0x52')){var _0x1b90f8=_0x47564d['get']({'plain':!![]});var _0x43fb15=_0xfa30('0x2c');return db['UserProfileSection'][_0xfa30('0x4f')]({'where':{'name':_0x43fb15,'userProfileId':_0x26efb0[_0xfa30('0x55')]},'raw':!![]})['then'](function(_0x4df76d){if(_0x4df76d&&_0x4df76d[_0xfa30('0x56')]===0x0){return db[_0xfa30('0x2d')][_0xfa30('0x50')]({'name':_0x1b90f8[_0xfa30('0x30')],'resourceId':_0x1b90f8['id'],'type':_0x4df76d[_0xfa30('0x30')],'sectionId':_0x4df76d['id']},{})[_0xfa30('0x2a')](function(){return _0x47564d;});}else{return _0x47564d;}})[_0xfa30('0x4b')](function(_0x19f8a8){logger['error'](_0xfa30('0x58'),_0x19f8a8);throw _0x19f8a8;});}return _0x47564d;});}})[_0xfa30('0x2a')](respondWithResult(_0x210bcd,0xc9))[_0xfa30('0x4b')](handleError(_0x210bcd,null));};exports[_0xfa30('0x5e')]=function(_0x1e3887,_0xbe4eab){if(_0x1e3887[_0xfa30('0x51')]['id']){delete _0x1e3887['body']['id'];}return db['Dashboard']['find']({'where':{'id':_0x1e3887[_0xfa30('0x4d')]['id']}})[_0xfa30('0x2a')](handleEntityNotFound(_0xbe4eab,null))[_0xfa30('0x2a')](saveUpdates(_0x1e3887[_0xfa30('0x51')],null))['then'](respondWithResult(_0xbe4eab,null))[_0xfa30('0x4b')](handleError(_0xbe4eab,null));};exports[_0xfa30('0x5f')]=function(_0x1c1a1c,_0x3d442b){return db[_0xfa30('0x47')][_0xfa30('0x4f')]({'where':{'id':_0x1c1a1c[_0xfa30('0x4d')]['id']}})[_0xfa30('0x2a')](handleEntityNotFound(_0x3d442b,null))[_0xfa30('0x2a')](removeEntity(_0x3d442b,null))[_0xfa30('0x4b')](handleError(_0x3d442b,null));};function widgetAttributes(_0x1bf48d){try{switch(_0x1bf48d[_0xfa30('0x33')]){case _0xfa30('0x60'):return[{'name':_0xfa30('0x61'),'value':_0x1bf48d[_0xfa30('0x61')]||(_0x1bf48d[_0xfa30('0x62')]&&_0x1bf48d[_0xfa30('0x62')][0x0]?_0x1bf48d[_0xfa30('0x62')][0x0]['value']:undefined)||'https://'}];case _0xfa30('0x63'):return[{'name':'attrPath','value':_0x1bf48d['attrPath']||(_0x1bf48d[_0xfa30('0x62')]&&_0x1bf48d[_0xfa30('0x62')][0x0]?_0x1bf48d[_0xfa30('0x62')][0x0][_0xfa30('0x64')]:undefined)||''}];case _0xfa30('0x65'):return[{'name':_0xfa30('0x66'),'value':_0x1bf48d[_0xfa30('0x66')]||(_0x1bf48d[_0xfa30('0x62')]&&_0x1bf48d[_0xfa30('0x62')][0x0]?_0x1bf48d[_0xfa30('0x62')][0x0][_0xfa30('0x64')]:undefined)||_0xfa30('0x67')},{'name':_0xfa30('0x68'),'value':_0x1bf48d[_0xfa30('0x68')]||(_0x1bf48d[_0xfa30('0x62')]&&_0x1bf48d['attrs'][0x1]?_0x1bf48d['attrs'][0x1][_0xfa30('0x64')]:undefined)||_0xfa30('0x69')},{'name':_0xfa30('0x6a'),'value':_0x1bf48d[_0xfa30('0x6a')]||(_0x1bf48d['attrs']&&_0x1bf48d[_0xfa30('0x62')][0x2]?_0x1bf48d[_0xfa30('0x62')][0x2][_0xfa30('0x64')]:undefined)||0xc}];case _0xfa30('0x6b'):return[{'name':_0xfa30('0x6c'),'value':_0x1bf48d[_0xfa30('0x6c')]||(_0x1bf48d[_0xfa30('0x62')]&&_0x1bf48d[_0xfa30('0x62')][0x0]?_0x1bf48d[_0xfa30('0x62')][0x0][_0xfa30('0x64')]:undefined)||'total'},{'name':'attrVoiceQueues','value':_0x1bf48d[_0xfa30('0x6d')]||(_0x1bf48d['attrs']&&_0x1bf48d[_0xfa30('0x62')][0x1]?_0x1bf48d[_0xfa30('0x62')][0x1][_0xfa30('0x64')]:undefined)||[]},{'name':_0xfa30('0x6a'),'value':_0x1bf48d[_0xfa30('0x6a')]||(_0x1bf48d[_0xfa30('0x62')]&&_0x1bf48d[_0xfa30('0x62')][0x2]?_0x1bf48d['attrs'][0x2][_0xfa30('0x64')]:undefined)||0x14},{'name':'attrChannel','value':_0x1bf48d[_0xfa30('0x6e')]||(_0x1bf48d[_0xfa30('0x62')]&&_0x1bf48d[_0xfa30('0x62')][0x3]?_0x1bf48d[_0xfa30('0x62')][0x3][_0xfa30('0x64')]:undefined)||'voice'},{'name':'attrEmailAccounts','value':_0x1bf48d[_0xfa30('0x6f')]||(_0x1bf48d['attrs']&&_0x1bf48d[_0xfa30('0x62')][0x4]?_0x1bf48d['attrs'][0x4][_0xfa30('0x64')]:undefined)||''},{'name':_0xfa30('0x70'),'value':_0x1bf48d['attrFaxAccounts']||(_0x1bf48d['attrs']&&_0x1bf48d[_0xfa30('0x62')][0x5]?_0x1bf48d[_0xfa30('0x62')][0x5]['value']:undefined)||''},{'name':_0xfa30('0x71'),'value':_0x1bf48d['attrSmsAccounts']||(_0x1bf48d[_0xfa30('0x62')]&&_0x1bf48d[_0xfa30('0x62')][0x6]?_0x1bf48d[_0xfa30('0x62')][0x6][_0xfa30('0x64')]:undefined)||''},{'name':_0xfa30('0x72'),'value':_0x1bf48d['attrOpenchannelAccounts']||(_0x1bf48d[_0xfa30('0x62')]&&_0x1bf48d[_0xfa30('0x62')][0x7]?_0x1bf48d[_0xfa30('0x62')][0x7][_0xfa30('0x64')]:undefined)||''},{'name':'attrWhatsappAccounts','value':_0x1bf48d[_0xfa30('0x73')]||(_0x1bf48d[_0xfa30('0x62')]&&_0x1bf48d['attrs'][0x8]?_0x1bf48d[_0xfa30('0x62')][0x8][_0xfa30('0x64')]:undefined)||''},{'name':_0xfa30('0x74'),'value':_0x1bf48d[_0xfa30('0x74')]||(_0x1bf48d[_0xfa30('0x62')]&&_0x1bf48d['attrs'][0x9]?_0x1bf48d[_0xfa30('0x62')][0x9][_0xfa30('0x64')]:undefined)||''}];case'multibar-chart':case _0xfa30('0x75'):return[{'name':'attrSerie1','value':_0x1bf48d['attrSerie1']||(_0x1bf48d[_0xfa30('0x62')]&&_0x1bf48d['attrs'][0x0]?_0x1bf48d[_0xfa30('0x62')][0x0][_0xfa30('0x64')]:undefined)||_0xfa30('0x76')},{'name':_0xfa30('0x77'),'value':_0x1bf48d['attrSerie2']||(_0x1bf48d['attrs']&&_0x1bf48d['attrs'][0x1]?_0x1bf48d[_0xfa30('0x62')][0x1][_0xfa30('0x64')]:undefined)||null},{'name':_0xfa30('0x78'),'value':_0x1bf48d[_0xfa30('0x78')]||(_0x1bf48d['attrs']&&_0x1bf48d[_0xfa30('0x62')][0x2]?_0x1bf48d[_0xfa30('0x62')][0x2][_0xfa30('0x64')]:undefined)||null},{'name':_0xfa30('0x6d'),'value':_0x1bf48d['attrVoiceQueues']||(_0x1bf48d[_0xfa30('0x62')]&&_0x1bf48d[_0xfa30('0x62')][0x3]?_0x1bf48d[_0xfa30('0x62')][0x3][_0xfa30('0x64')]:undefined)||[]},{'name':_0xfa30('0x6e'),'value':_0x1bf48d[_0xfa30('0x6e')]||(_0x1bf48d['attrs']&&_0x1bf48d[_0xfa30('0x62')][0x4]?_0x1bf48d[_0xfa30('0x62')][0x4]['value']:undefined)||'voice'},{'name':_0xfa30('0x6f'),'value':_0x1bf48d[_0xfa30('0x6f')]||(_0x1bf48d[_0xfa30('0x62')]&&_0x1bf48d[_0xfa30('0x62')][0x5]?_0x1bf48d[_0xfa30('0x62')][0x5][_0xfa30('0x64')]:undefined)||''},{'name':_0xfa30('0x70'),'value':_0x1bf48d[_0xfa30('0x70')]||(_0x1bf48d[_0xfa30('0x62')]&&_0x1bf48d[_0xfa30('0x62')][0x6]?_0x1bf48d[_0xfa30('0x62')][0x6]['value']:undefined)||''},{'name':_0xfa30('0x71'),'value':_0x1bf48d['attrSmsAccounts']||(_0x1bf48d['attrs']&&_0x1bf48d[_0xfa30('0x62')][0x7]?_0x1bf48d[_0xfa30('0x62')][0x7]['value']:undefined)||''},{'name':_0xfa30('0x72'),'value':_0x1bf48d[_0xfa30('0x72')]||(_0x1bf48d[_0xfa30('0x62')]&&_0x1bf48d[_0xfa30('0x62')][0x8]?_0x1bf48d[_0xfa30('0x62')][0x8]['value']:undefined)||''},{'name':_0xfa30('0x73'),'value':_0x1bf48d[_0xfa30('0x73')]||(_0x1bf48d[_0xfa30('0x62')]&&_0x1bf48d[_0xfa30('0x62')][0x9]?_0x1bf48d[_0xfa30('0x62')][0x9][_0xfa30('0x64')]:undefined)||''},{'name':'attrChatWebsites','value':_0x1bf48d[_0xfa30('0x74')]||(_0x1bf48d[_0xfa30('0x62')]&&_0x1bf48d['attrs'][0xa]?_0x1bf48d[_0xfa30('0x62')][0xa]['value']:undefined)||''}];case _0xfa30('0x79'):return[{'name':'attrReport','type':_0x1bf48d[_0xfa30('0x7a')]||(_0x1bf48d[_0xfa30('0x62')]&&_0x1bf48d[_0xfa30('0x62')][0x0]?_0x1bf48d[_0xfa30('0x62')][0x0][_0xfa30('0x33')]:undefined)||null,'value':_0x1bf48d[_0xfa30('0x7b')]||(_0x1bf48d[_0xfa30('0x62')]&&_0x1bf48d[_0xfa30('0x62')][0x0]?_0x1bf48d['attrs'][0x0]['value']:undefined)||null},{'name':_0xfa30('0x7c'),'value':_0x1bf48d[_0xfa30('0x7c')]||(_0x1bf48d[_0xfa30('0x62')]&&_0x1bf48d[_0xfa30('0x62')][0x1]?_0x1bf48d[_0xfa30('0x62')][0x1][_0xfa30('0x64')]:undefined)||0x0}];default:return[];}}catch(_0x34980e){logger[_0xfa30('0x57')]('widgetAttributes:\x20%s',JSON[_0xfa30('0x7d')](_0x34980e));return[];}}exports['addItem']=function(_0x7cdc31,_0x97e725,_0x3e46d3){if(_0x7cdc31[_0xfa30('0x51')]['id']){delete _0x7cdc31[_0xfa30('0x51')]['id'];}return db['Dashboard'][_0xfa30('0x4f')]({'where':{'id':_0x7cdc31[_0xfa30('0x4d')]['id']}})['then'](handleEntityNotFound(_0x97e725,null))[_0xfa30('0x2a')](function(_0x521e24){if(_0x521e24){_0x7cdc31['body']['DashboardId']=_0x521e24['id'];_0x7cdc31[_0xfa30('0x51')][_0xfa30('0x62')]=widgetAttributes(_0x7cdc31[_0xfa30('0x51')]);return db[_0xfa30('0x7e')][_0xfa30('0x50')](_0x7cdc31[_0xfa30('0x51')]);}})[_0xfa30('0x2a')](respondWithResult(_0x97e725,null))['catch'](handleError(_0x97e725,null));};exports['getItems']=function(_0x136859,_0x5e9e86,_0x57b841){var _0x162fae={};var _0x35b50e={};var _0x57ec96;var _0x345694;return db[_0xfa30('0x47')][_0xfa30('0x7f')]({'where':{'id':_0x136859[_0xfa30('0x4d')]['id']}})[_0xfa30('0x2a')](handleEntityNotFound(_0x5e9e86,null))[_0xfa30('0x2a')](function(_0x3c2f12){if(_0x3c2f12){_0x57ec96=_0x3c2f12;_0x35b50e[_0xfa30('0x35')]=_[_0xfa30('0x38')](db[_0xfa30('0x7e')]['rawAttributes']);_0x35b50e[_0xfa30('0x37')]=_[_0xfa30('0x38')](_0x136859[_0xfa30('0x37')]);_0x35b50e[_0xfa30('0x39')]=_[_0xfa30('0x3a')](_0x35b50e[_0xfa30('0x35')],_0x35b50e[_0xfa30('0x37')]);_0x162fae[_0xfa30('0x3b')]=_[_0xfa30('0x3a')](_0x35b50e[_0xfa30('0x35')],qs[_0xfa30('0x3c')](_0x136859[_0xfa30('0x37')][_0xfa30('0x3c')]));_0x162fae[_0xfa30('0x3b')]=_0x162fae[_0xfa30('0x3b')][_0xfa30('0x3d')]?_0x162fae['attributes']:_0x35b50e[_0xfa30('0x35')];_0x162fae[_0xfa30('0x3f')]=qs['sort'](_0x136859[_0xfa30('0x37')][_0xfa30('0x40')]);_0x162fae['where']=qs['filters'](_[_0xfa30('0x41')](_0x136859[_0xfa30('0x37')],_0x35b50e[_0xfa30('0x39')]));if(_0x136859[_0xfa30('0x37')][_0xfa30('0x42')]){_0x162fae[_0xfa30('0x44')]=_[_0xfa30('0x43')](_0x162fae[_0xfa30('0x44')],{'$or':_[_0xfa30('0x36')](_0x162fae['attributes'],function(_0x51ceb0){var _0x28ff0c={};_0x28ff0c[_0x51ceb0]={'$like':'%'+_0x136859[_0xfa30('0x37')][_0xfa30('0x42')]+'%'};return _0x28ff0c;})});}_0x162fae=_['merge']({},_0x162fae,_0x136859[_0xfa30('0x46')]);return _0x57ec96[_0xfa30('0x80')](_0x162fae);}})[_0xfa30('0x2a')](function(_0x5b00d1){if(_0x5b00d1){_0x345694=_0x5b00d1[_0xfa30('0x3d')];if(!_0x136859['query']['hasOwnProperty'](_0xfa30('0x3e'))){_0x162fae[_0xfa30('0x25')]=qs[_0xfa30('0x25')](_0x136859[_0xfa30('0x37')][_0xfa30('0x25')]);_0x162fae['offset']=qs[_0xfa30('0x24')](_0x136859[_0xfa30('0x37')][_0xfa30('0x24')]);}return _0x57ec96[_0xfa30('0x80')](_0x162fae);}})['then'](function(_0x7ef3b){if(_0x7ef3b){return _0x7ef3b?{'count':_0x345694,'rows':_0x7ef3b}:null;}})['then'](respondWithResult(_0x5e9e86,null))['catch'](handleError(_0x5e9e86,null));}; \ No newline at end of file diff --git a/server/api/dashboard/dashboard.events.js b/server/api/dashboard/dashboard.events.js index f1de040..44cb4e8 100644 --- a/server/api/dashboard/dashboard.events.js +++ b/server/api/dashboard/dashboard.events.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x2711=['hook','../../mysqldb','Dashboard','update','remove','emit'];(function(_0x4983b6,_0x4679ad){var _0x137337=function(_0x4b7110){while(--_0x4b7110){_0x4983b6['push'](_0x4983b6['shift']());}};_0x137337(++_0x4679ad);}(_0x2711,0x1e1));var _0x1271=function(_0x357d7a,_0x503b19){_0x357d7a=_0x357d7a-0x0;var _0x269362=_0x2711[_0x357d7a];return _0x269362;};'use strict';var EventEmitter=require('events');var Dashboard=require(_0x1271('0x0'))['db'][_0x1271('0x1')];var DashboardEvents=new EventEmitter();DashboardEvents['setMaxListeners'](0x0);var events={'afterCreate':'save','afterUpdate':_0x1271('0x2'),'afterDestroy':_0x1271('0x3')};function emitEvent(_0xdb9e1){return function(_0xb50e9d,_0x474b4f,_0x3ad354){DashboardEvents[_0x1271('0x4')](_0xdb9e1+':'+_0xb50e9d['id'],_0xb50e9d);DashboardEvents[_0x1271('0x4')](_0xdb9e1,_0xb50e9d);_0x3ad354(null);};}for(var e in events){if(events['hasOwnProperty'](e)){var event=events[e];Dashboard[_0x1271('0x5')](e,emitEvent(event));}}module['exports']=DashboardEvents; \ No newline at end of file +var _0xe091=['../../mysqldb','Dashboard','save','update','remove','emit','hasOwnProperty','hook','exports','events'];(function(_0x1bb6d9,_0xe46af9){var _0x2ce766=function(_0xd5af66){while(--_0xd5af66){_0x1bb6d9['push'](_0x1bb6d9['shift']());}};_0x2ce766(++_0xe46af9);}(_0xe091,0x1ad));var _0x1e09=function(_0xe974b2,_0x1895e1){_0xe974b2=_0xe974b2-0x0;var _0xb38cf0=_0xe091[_0xe974b2];return _0xb38cf0;};'use strict';var EventEmitter=require(_0x1e09('0x0'));var Dashboard=require(_0x1e09('0x1'))['db'][_0x1e09('0x2')];var DashboardEvents=new EventEmitter();DashboardEvents['setMaxListeners'](0x0);var events={'afterCreate':_0x1e09('0x3'),'afterUpdate':_0x1e09('0x4'),'afterDestroy':_0x1e09('0x5')};function emitEvent(_0x4e0879){return function(_0x1a43af,_0x110900,_0x1d9cc4){DashboardEvents[_0x1e09('0x6')](_0x4e0879+':'+_0x1a43af['id'],_0x1a43af);DashboardEvents[_0x1e09('0x6')](_0x4e0879,_0x1a43af);_0x1d9cc4(null);};}for(var e in events){if(events[_0x1e09('0x7')](e)){var event=events[e];Dashboard[_0x1e09('0x8')](e,emitEvent(event));}}module[_0x1e09('0x9')]=DashboardEvents; \ No newline at end of file diff --git a/server/api/dashboard/dashboard.model.js b/server/api/dashboard/dashboard.model.js index 55534c5..e44112d 100644 --- a/server/api/dashboard/dashboard.model.js +++ b/server/api/dashboard/dashboard.model.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x0db1=['request-promise','path','rimraf','../../config/environment','exports','Dashboard','dashboards','lodash','util','api'];(function(_0x90f34f,_0x404021){var _0x4b18cf=function(_0x25112d){while(--_0x25112d){_0x90f34f['push'](_0x90f34f['shift']());}};_0x4b18cf(++_0x404021);}(_0x0db1,0x1dd));var _0x10db=function(_0x340335,_0x4bf89c){_0x340335=_0x340335-0x0;var _0x35158a=_0x0db1[_0x340335];return _0x35158a;};'use strict';var _=require(_0x10db('0x0'));var util=require(_0x10db('0x1'));var logger=require('../../config/logger')(_0x10db('0x2'));var moment=require('moment');var BPromise=require('bluebird');var rp=require(_0x10db('0x3'));var fs=require('fs');var path=require(_0x10db('0x4'));var rimraf=require(_0x10db('0x5'));var config=require(_0x10db('0x6'));var attributes=require('./dashboard.attributes');module[_0x10db('0x7')]=function(_0x45560a,_0x2558bc){return _0x45560a['define'](_0x10db('0x8'),attributes,{'tableName':_0x10db('0x9'),'paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file +var _0x1ef8=['Dashboard','dashboards','lodash','util','api','moment','bluebird','rimraf','./dashboard.attributes','exports'];(function(_0x5c8205,_0x45dd52){var _0x19ed05=function(_0x26cee9){while(--_0x26cee9){_0x5c8205['push'](_0x5c8205['shift']());}};_0x19ed05(++_0x45dd52);}(_0x1ef8,0xa2));var _0x81ef=function(_0x2e0a02,_0x49bee1){_0x2e0a02=_0x2e0a02-0x0;var _0x4cdf44=_0x1ef8[_0x2e0a02];return _0x4cdf44;};'use strict';var _=require(_0x81ef('0x0'));var util=require(_0x81ef('0x1'));var logger=require('../../config/logger')(_0x81ef('0x2'));var moment=require(_0x81ef('0x3'));var BPromise=require(_0x81ef('0x4'));var rp=require('request-promise');var fs=require('fs');var path=require('path');var rimraf=require(_0x81ef('0x5'));var config=require('../../config/environment');var attributes=require(_0x81ef('0x6'));module[_0x81ef('0x7')]=function(_0x1805c2,_0x368f16){return _0x1805c2['define'](_0x81ef('0x8'),attributes,{'tableName':_0x81ef('0x9'),'paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file diff --git a/server/api/dashboard/dashboard.rpc.js b/server/api/dashboard/dashboard.rpc.js index 2ab096f..6f8af5f 100644 --- a/server/api/dashboard/dashboard.rpc.js +++ b/server/api/dashboard/dashboard.rpc.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x25ea=['redis','localhost','./dashboard.socket','register','request','then','info','debug','Dashboard,\x20%s,\x20%s,\x20%s','request\x20sent','error','code','Dashboard,\x20%s,\x20%s','message','result','catch','lodash','util','moment','bluebird','randomstring','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','defaults'];(function(_0x38c652,_0x1ea1b7){var _0x218a37=function(_0x5dcb2a){while(--_0x5dcb2a){_0x38c652['push'](_0x38c652['shift']());}};_0x218a37(++_0x1ea1b7);}(_0x25ea,0xc4));var _0xa25e=function(_0x40b2ed,_0x2b1765){_0x40b2ed=_0x40b2ed-0x0;var _0x18397d=_0x25ea[_0x40b2ed];return _0x18397d;};'use strict';var _=require(_0xa25e('0x0'));var util=require(_0xa25e('0x1'));var moment=require(_0xa25e('0x2'));var BPromise=require(_0xa25e('0x3'));var rs=require(_0xa25e('0x4'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0xa25e('0x5'))['db'];var utils=require(_0xa25e('0x6'));var logger=require(_0xa25e('0x7'))(_0xa25e('0x8'));var config=require(_0xa25e('0x9'));var jayson=require(_0xa25e('0xa'));var client=jayson[_0xa25e('0xb')][_0xa25e('0xc')]({'port':0x232a});config['redis']=_[_0xa25e('0xd')](config[_0xa25e('0xe')],{'host':_0xa25e('0xf'),'port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config[_0xa25e('0xe')]));require(_0xa25e('0x10'))[_0xa25e('0x11')](socket);function respondWithRpcPromise(_0x166b4a,_0x4331c1,_0xecacd0){return new BPromise(function(_0x3132a5,_0x3c3d90){return client[_0xa25e('0x12')](_0x166b4a,_0xecacd0)[_0xa25e('0x13')](function(_0x593227){logger[_0xa25e('0x14')]('Dashboard,\x20%s,\x20%s',_0x4331c1,'request\x20sent');logger[_0xa25e('0x15')](_0xa25e('0x16'),_0x4331c1,_0xa25e('0x17'),JSON['stringify'](_0x593227));if(_0x593227[_0xa25e('0x18')]){if(_0x593227[_0xa25e('0x18')][_0xa25e('0x19')]===0x1f4){logger[_0xa25e('0x18')](_0xa25e('0x1a'),_0x4331c1,_0x593227['error'][_0xa25e('0x1b')]);return _0x3c3d90(_0x593227[_0xa25e('0x18')]['message']);}logger[_0xa25e('0x18')](_0xa25e('0x1a'),_0x4331c1,_0x593227[_0xa25e('0x18')][_0xa25e('0x1b')]);return _0x3132a5(_0x593227[_0xa25e('0x18')]['message']);}else{logger[_0xa25e('0x14')](_0xa25e('0x1a'),_0x4331c1,_0xa25e('0x17'));_0x3132a5(_0x593227[_0xa25e('0x1c')][_0xa25e('0x1b')]);}})[_0xa25e('0x1d')](function(_0xbd7df0){logger['error'](_0xa25e('0x1a'),_0x4331c1,_0xbd7df0);_0x3c3d90(_0xbd7df0);});});} \ No newline at end of file +var _0x7771=['bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/environment','jayson/promise','client','redis','localhost','socket.io-emitter','./dashboard.socket','register','request','then','info','request\x20sent','debug','Dashboard,\x20%s,\x20%s,\x20%s','stringify','error','code','Dashboard,\x20%s,\x20%s','message','lodash','util','moment'];(function(_0x5c811c,_0x313b25){var _0x5df3af=function(_0x3460de){while(--_0x3460de){_0x5c811c['push'](_0x5c811c['shift']());}};_0x5df3af(++_0x313b25);}(_0x7771,0x15c));var _0x1777=function(_0xa8369a,_0x3d2319){_0xa8369a=_0xa8369a-0x0;var _0x4b74b7=_0x7771[_0xa8369a];return _0x4b74b7;};'use strict';var _=require(_0x1777('0x0'));var util=require(_0x1777('0x1'));var moment=require(_0x1777('0x2'));var BPromise=require(_0x1777('0x3'));var rs=require(_0x1777('0x4'));var fs=require('fs');var Redis=require(_0x1777('0x5'));var db=require(_0x1777('0x6'))['db'];var utils=require(_0x1777('0x7'));var logger=require('../../config/logger')('rpc');var config=require(_0x1777('0x8'));var jayson=require(_0x1777('0x9'));var client=jayson[_0x1777('0xa')]['http']({'port':0x232a});config[_0x1777('0xb')]=_['defaults'](config[_0x1777('0xb')],{'host':_0x1777('0xc'),'port':0x18eb});var socket=require(_0x1777('0xd'))(new Redis(config[_0x1777('0xb')]));require(_0x1777('0xe'))[_0x1777('0xf')](socket);function respondWithRpcPromise(_0x51800e,_0x45b858,_0x51cdd0){return new BPromise(function(_0x43b931,_0x11721e){return client[_0x1777('0x10')](_0x51800e,_0x51cdd0)[_0x1777('0x11')](function(_0x57d971){logger[_0x1777('0x12')]('Dashboard,\x20%s,\x20%s',_0x45b858,_0x1777('0x13'));logger[_0x1777('0x14')](_0x1777('0x15'),_0x45b858,'request\x20sent',JSON[_0x1777('0x16')](_0x57d971));if(_0x57d971[_0x1777('0x17')]){if(_0x57d971['error'][_0x1777('0x18')]===0x1f4){logger[_0x1777('0x17')](_0x1777('0x19'),_0x45b858,_0x57d971['error'][_0x1777('0x1a')]);return _0x11721e(_0x57d971[_0x1777('0x17')]['message']);}logger[_0x1777('0x17')](_0x1777('0x19'),_0x45b858,_0x57d971[_0x1777('0x17')][_0x1777('0x1a')]);return _0x43b931(_0x57d971[_0x1777('0x17')][_0x1777('0x1a')]);}else{logger[_0x1777('0x12')](_0x1777('0x19'),_0x45b858,_0x1777('0x13'));_0x43b931(_0x57d971['result'][_0x1777('0x1a')]);}})['catch'](function(_0x3fdcac){logger[_0x1777('0x17')](_0x1777('0x19'),_0x45b858,_0x3fdcac);_0x11721e(_0x3fdcac);});});} \ No newline at end of file diff --git a/server/api/dashboard/dashboard.socket.js b/server/api/dashboard/dashboard.socket.js index 4c1237f..729db70 100644 --- a/server/api/dashboard/dashboard.socket.js +++ b/server/api/dashboard/dashboard.socket.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x3ec8=['dashboard:','./dashboard.events','save','remove','update','removeListener','length'];(function(_0x15d358,_0x37f025){var _0x3beb89=function(_0xbddd5d){while(--_0xbddd5d){_0x15d358['push'](_0x15d358['shift']());}};_0x3beb89(++_0x37f025);}(_0x3ec8,0x190));var _0x83ec=function(_0x45d853,_0x4fc622){_0x45d853=_0x45d853-0x0;var _0x242093=_0x3ec8[_0x45d853];return _0x242093;};'use strict';var DashboardEvents=require(_0x83ec('0x0'));var events=[_0x83ec('0x1'),_0x83ec('0x2'),_0x83ec('0x3')];function createListener(_0xc3d840,_0x8f2651){return function(_0xc33e96){_0x8f2651['emit'](_0xc3d840,_0xc33e96);};}function removeListener(_0xac6dac,_0x2083bf){return function(){DashboardEvents[_0x83ec('0x4')](_0xac6dac,_0x2083bf);};}exports['register']=function(_0x6833a6){for(var _0x5b8112=0x0,_0x349ef3=events[_0x83ec('0x5')];_0x5b8112<_0x349ef3;_0x5b8112++){var _0x31bf0a=events[_0x5b8112];var _0x47f019=createListener(_0x83ec('0x6')+_0x31bf0a,_0x6833a6);DashboardEvents['on'](_0x31bf0a,_0x47f019);}}; \ No newline at end of file +var _0x064d=['removeListener','register','length','dashboard:','./dashboard.events','save','remove','update','emit'];(function(_0x279224,_0x949076){var _0x401a4a=function(_0x4d5c3b){while(--_0x4d5c3b){_0x279224['push'](_0x279224['shift']());}};_0x401a4a(++_0x949076);}(_0x064d,0x124));var _0xd064=function(_0x1dfcfb,_0x1d185d){_0x1dfcfb=_0x1dfcfb-0x0;var _0x792502=_0x064d[_0x1dfcfb];return _0x792502;};'use strict';var DashboardEvents=require(_0xd064('0x0'));var events=[_0xd064('0x1'),_0xd064('0x2'),_0xd064('0x3')];function createListener(_0x2b8e9f,_0x1419a9){return function(_0x3274c3){_0x1419a9[_0xd064('0x4')](_0x2b8e9f,_0x3274c3);};}function removeListener(_0x1af583,_0x3de28b){return function(){DashboardEvents[_0xd064('0x5')](_0x1af583,_0x3de28b);};}exports[_0xd064('0x6')]=function(_0x54e839){for(var _0x2c6e9a=0x0,_0x312f12=events[_0xd064('0x7')];_0x2c6e9a<_0x312f12;_0x2c6e9a++){var _0x390e34=events[_0x2c6e9a];var _0x283866=createListener(_0xd064('0x8')+_0x390e34,_0x54e839);DashboardEvents['on'](_0x390e34,_0x283866);}}; \ No newline at end of file diff --git a/server/api/dashboard/index.js b/server/api/dashboard/index.js index e1c9700..4e3ce61 100644 --- a/server/api/dashboard/index.js +++ b/server/api/dashboard/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x5373=['create','/:id/clone','clone','addItem','put','update','delete','destroy','exports','multer','util','path','connect-timeout','Router','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','./dashboard.controller','get','isAuthenticated','/:id','show','/:id/items','getItems','post'];(function(_0x6aafa8,_0x2e4a09){var _0x198b3e=function(_0x765cb0){while(--_0x765cb0){_0x6aafa8['push'](_0x6aafa8['shift']());}};_0x198b3e(++_0x2e4a09);}(_0x5373,0x127));var _0x3537=function(_0x1fc73f,_0x270250){_0x1fc73f=_0x1fc73f-0x0;var _0x17922c=_0x5373[_0x1fc73f];return _0x17922c;};'use strict';var multer=require(_0x3537('0x0'));var util=require(_0x3537('0x1'));var path=require(_0x3537('0x2'));var timeout=require(_0x3537('0x3'));var express=require('express');var router=express[_0x3537('0x4')]();var fs_extra=require(_0x3537('0x5'));var auth=require(_0x3537('0x6'));var interaction=require(_0x3537('0x7'));var config=require(_0x3537('0x8'));var controller=require(_0x3537('0x9'));router[_0x3537('0xa')]('/',auth[_0x3537('0xb')](),controller['index']);router[_0x3537('0xa')](_0x3537('0xc'),auth['isAuthenticated'](),controller[_0x3537('0xd')]);router[_0x3537('0xa')](_0x3537('0xe'),auth['isAuthenticated'](),controller[_0x3537('0xf')]);router[_0x3537('0x10')]('/',auth[_0x3537('0xb')](),controller[_0x3537('0x11')]);router['post'](_0x3537('0x12'),auth[_0x3537('0xb')](),controller[_0x3537('0x13')]);router[_0x3537('0x10')](_0x3537('0xe'),auth[_0x3537('0xb')](),controller[_0x3537('0x14')]);router[_0x3537('0x15')](_0x3537('0xc'),auth['isAuthenticated'](),controller[_0x3537('0x16')]);router[_0x3537('0x17')](_0x3537('0xc'),auth[_0x3537('0xb')](),controller[_0x3537('0x18')]);module[_0x3537('0x19')]=router; \ No newline at end of file +var _0x8172=['put','update','delete','destroy','exports','util','path','express','Router','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','./dashboard.controller','isAuthenticated','get','/:id','show','/:id/items','getItems','post','create','clone','addItem'];(function(_0x14d896,_0x53578b){var _0x28679a=function(_0x14921f){while(--_0x14921f){_0x14d896['push'](_0x14d896['shift']());}};_0x28679a(++_0x53578b);}(_0x8172,0xad));var _0x2817=function(_0x98016a,_0xc9fbb1){_0x98016a=_0x98016a-0x0;var _0x209dae=_0x8172[_0x98016a];return _0x209dae;};'use strict';var multer=require('multer');var util=require(_0x2817('0x0'));var path=require(_0x2817('0x1'));var timeout=require('connect-timeout');var express=require(_0x2817('0x2'));var router=express[_0x2817('0x3')]();var fs_extra=require(_0x2817('0x4'));var auth=require(_0x2817('0x5'));var interaction=require(_0x2817('0x6'));var config=require(_0x2817('0x7'));var controller=require(_0x2817('0x8'));router['get']('/',auth[_0x2817('0x9')](),controller['index']);router[_0x2817('0xa')](_0x2817('0xb'),auth[_0x2817('0x9')](),controller[_0x2817('0xc')]);router['get'](_0x2817('0xd'),auth['isAuthenticated'](),controller[_0x2817('0xe')]);router[_0x2817('0xf')]('/',auth[_0x2817('0x9')](),controller[_0x2817('0x10')]);router[_0x2817('0xf')]('/:id/clone',auth['isAuthenticated'](),controller[_0x2817('0x11')]);router[_0x2817('0xf')](_0x2817('0xd'),auth[_0x2817('0x9')](),controller[_0x2817('0x12')]);router[_0x2817('0x13')](_0x2817('0xb'),auth[_0x2817('0x9')](),controller[_0x2817('0x14')]);router[_0x2817('0x15')](_0x2817('0xb'),auth[_0x2817('0x9')](),controller[_0x2817('0x16')]);module[_0x2817('0x17')]=router; \ No newline at end of file diff --git a/server/api/dashboardItem/dashboardItem.attributes.js b/server/api/dashboardItem/dashboardItem.attributes.js index 264ec1d..3828a89 100644 --- a/server/api/dashboardItem/dashboardItem.attributes.js +++ b/server/api/dashboardItem/dashboardItem.attributes.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x2bd8=['TEXT','long','parse','attrs','stringify','setDataValue','INTEGER','sequelize','lodash','exports','STRING'];(function(_0x4d998e,_0x8e3834){var _0x6300a9=function(_0x30694b){while(--_0x30694b){_0x4d998e['push'](_0x4d998e['shift']());}};_0x6300a9(++_0x8e3834);}(_0x2bd8,0x130));var _0x82bd=function(_0x80596f,_0x8df75f){_0x80596f=_0x80596f-0x0;var _0x5dfb7a=_0x2bd8[_0x80596f];return _0x5dfb7a;};'use strict';var Sequelize=require(_0x82bd('0x0'));var squel=require('squel');var _=require(_0x82bd('0x1'));module[_0x82bd('0x2')]={'title':{'type':Sequelize[_0x82bd('0x3')],'allowNull':![]},'type':{'type':Sequelize[_0x82bd('0x3')](0x14),'allowNull':![],'validate':{'len':[0x1,0x14]}},'attrs':{'type':Sequelize[_0x82bd('0x4')](_0x82bd('0x5')),'get':function(){try{return JSON[_0x82bd('0x6')](this['getDataValue'](_0x82bd('0x7')));}catch(_0x2e1a98){return[];}},'set':function(_0x3bf810){try{this['setDataValue'](_0x82bd('0x7'),JSON[_0x82bd('0x8')](_0x3bf810));}catch(_0x226f60){this[_0x82bd('0x9')]('attrs',JSON[_0x82bd('0x8')]([]));}}},'sizeX':{'type':Sequelize['INTEGER'],'allowNull':![],'defaultValue':0x1},'sizeY':{'type':Sequelize['INTEGER'],'allowNull':![],'defaultValue':0x1},'row':{'type':Sequelize['INTEGER']},'col':{'type':Sequelize[_0x82bd('0xa')]},'background':{'type':Sequelize['STRING'],'allowNull':![],'defaultValue':'#ffffff','validate':{'notEmpty':!![]}},'foreground':{'type':Sequelize[_0x82bd('0x3')],'allowNull':![],'defaultValue':'#2196f3','validate':{'notEmpty':!![]}},'link':{'type':Sequelize['STRING']},'titleFontSize':{'type':Sequelize[_0x82bd('0xa')],'defaultValue':0xc}}; \ No newline at end of file +var _0x7a54=['lodash','STRING','long','parse','getDataValue','attrs','setDataValue','stringify','INTEGER','#ffffff','sequelize','squel'];(function(_0x4baae2,_0x487ab6){var _0x1a2285=function(_0x1cea47){while(--_0x1cea47){_0x4baae2['push'](_0x4baae2['shift']());}};_0x1a2285(++_0x487ab6);}(_0x7a54,0x106));var _0x47a5=function(_0x4dbaee,_0xdbcd2){_0x4dbaee=_0x4dbaee-0x0;var _0x5b5437=_0x7a54[_0x4dbaee];return _0x5b5437;};'use strict';var Sequelize=require(_0x47a5('0x0'));var squel=require(_0x47a5('0x1'));var _=require(_0x47a5('0x2'));module['exports']={'title':{'type':Sequelize[_0x47a5('0x3')],'allowNull':![]},'type':{'type':Sequelize[_0x47a5('0x3')](0x14),'allowNull':![],'validate':{'len':[0x1,0x14]}},'attrs':{'type':Sequelize['TEXT'](_0x47a5('0x4')),'get':function(){try{return JSON[_0x47a5('0x5')](this[_0x47a5('0x6')](_0x47a5('0x7')));}catch(_0xfdf934){return[];}},'set':function(_0x545a97){try{this[_0x47a5('0x8')]('attrs',JSON[_0x47a5('0x9')](_0x545a97));}catch(_0x30e405){this['setDataValue'](_0x47a5('0x7'),JSON['stringify']([]));}}},'sizeX':{'type':Sequelize['INTEGER'],'allowNull':![],'defaultValue':0x1},'sizeY':{'type':Sequelize['INTEGER'],'allowNull':![],'defaultValue':0x1},'row':{'type':Sequelize[_0x47a5('0xa')]},'col':{'type':Sequelize[_0x47a5('0xa')]},'background':{'type':Sequelize['STRING'],'allowNull':![],'defaultValue':_0x47a5('0xb'),'validate':{'notEmpty':!![]}},'foreground':{'type':Sequelize['STRING'],'allowNull':![],'defaultValue':'#2196f3','validate':{'notEmpty':!![]}},'link':{'type':Sequelize[_0x47a5('0x3')]},'titleFontSize':{'type':Sequelize[_0x47a5('0xa')],'defaultValue':0xc}}; \ No newline at end of file diff --git a/server/api/dashboardItem/dashboardItem.controller.js b/server/api/dashboardItem/dashboardItem.controller.js index 8874882..fcb9977 100644 --- a/server/api/dashboardItem/dashboardItem.controller.js +++ b/server/api/dashboardItem/dashboardItem.controller.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xed1f=['attrRefresh','stringify','create','body','eml-format','rimraf','request-promise','bluebird','util','path','sox','to-csv','ejs','fs-extra','lodash','squel','crypto','jsforce','querystring','papaparse','../../components/auth/service','../../config/license/hardware','../../config/logger','../../config/environment','../../config/license/util','redis','localhost','socket.io-emitter','register','sendStatus','status','end','json','offset','undefined','limit','count','set','Content-Range','reject','update','then','error','stack','name','send','show','model','keys','DashboardItem','rawAttributes','query','filters','intersection','attributes','fields','includeAll','merge','catch','find','params','type','attrUrl','attrs','https://','custom','value','attrHourFormat','HH:mm:ss','attrTimezone','0.00','attrFontSize','counter','attrMetric','total','attrVoiceQueues','attrChannel','attrFaxAccounts','attrOpenchannelAccounts','attrWhatsappAccounts','attrChatWebsites','multibar-chart','attrSerie1','attrSerie2','attrSerie3','voice','attrEmailAccounts','attrSmsAccounts','web-report','reportType','attrReport'];(function(_0x5dbea2,_0x120ae6){var _0xa79e6e=function(_0xa70c60){while(--_0xa70c60){_0x5dbea2['push'](_0x5dbea2['shift']());}};_0xa79e6e(++_0x120ae6);}(_0xed1f,0x170));var _0xfed1=function(_0x476bf4,_0x2a3755){_0x476bf4=_0x476bf4-0x0;var _0x788ffe=_0xed1f[_0x476bf4];return _0x788ffe;};'use strict';var emlformat=require(_0xfed1('0x0'));var rimraf=require(_0xfed1('0x1'));var zipdir=require('zip-dir');var jsonpatch=require('fast-json-patch');var rp=require(_0xfed1('0x2'));var moment=require('moment');var BPromise=require(_0xfed1('0x3'));var Mustache=require('mustache');var util=require(_0xfed1('0x4'));var path=require(_0xfed1('0x5'));var sox=require(_0xfed1('0x6'));var csv=require(_0xfed1('0x7'));var ejs=require(_0xfed1('0x8'));var fs=require('fs');var fs_extra=require(_0xfed1('0x9'));var _=require(_0xfed1('0xa'));var squel=require(_0xfed1('0xb'));var crypto=require(_0xfed1('0xc'));var jsforce=require(_0xfed1('0xd'));var deskjs=require('desk.js');var toCsv=require(_0xfed1('0x7'));var querystring=require(_0xfed1('0xe'));var Papa=require(_0xfed1('0xf'));var Redis=require('ioredis');var authService=require(_0xfed1('0x10'));var qs=require('../../components/parsers/qs');var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0xfed1('0x11'));var logger=require(_0xfed1('0x12'))('api');var utils=require('../../config/utils');var config=require(_0xfed1('0x13'));var licenseUtil=require(_0xfed1('0x14'));var db=require('../../mysqldb')['db'];config[_0xfed1('0x15')]=_['defaults'](config[_0xfed1('0x15')],{'host':_0xfed1('0x16'),'port':0x18eb});var socket=require(_0xfed1('0x17'))(new Redis(config[_0xfed1('0x15')]));require('./dashboardItem.socket')[_0xfed1('0x18')](socket);function respondWithStatusCode(_0x3754c2,_0x4a0f51){_0x4a0f51=_0x4a0f51||0xcc;return function(_0x51631c){if(_0x51631c){return _0x3754c2[_0xfed1('0x19')](_0x4a0f51);}return _0x3754c2[_0xfed1('0x1a')](_0x4a0f51)[_0xfed1('0x1b')]();};}function respondWithResult(_0x5ed220,_0x223f42){_0x223f42=_0x223f42||0xc8;return function(_0x2218d5){if(_0x2218d5){return _0x5ed220[_0xfed1('0x1a')](_0x223f42)[_0xfed1('0x1c')](_0x2218d5);}};}function respondWithFilteredResult(_0x5ab809,_0x31ff97){return function(_0x4c492e){if(_0x4c492e){var _0x34512d=typeof _0x31ff97[_0xfed1('0x1d')]===_0xfed1('0x1e')&&typeof _0x31ff97[_0xfed1('0x1f')]===_0xfed1('0x1e');var _0x2926ac=_0x4c492e[_0xfed1('0x20')];var _0x10cc18=_0x34512d?0x0:_0x31ff97[_0xfed1('0x1d')];var _0x568405=_0x34512d?_0x4c492e[_0xfed1('0x20')]:_0x31ff97['offset']+_0x31ff97[_0xfed1('0x1f')];var _0x3e5ada;if(_0x568405>=_0x2926ac){_0x568405=_0x2926ac;_0x3e5ada=0xc8;}else{_0x3e5ada=0xce;}_0x5ab809[_0xfed1('0x1a')](_0x3e5ada);return _0x5ab809[_0xfed1('0x21')](_0xfed1('0x22'),_0x10cc18+'-'+_0x568405+'/'+_0x2926ac)[_0xfed1('0x1c')](_0x4c492e);}return null;};}function patchUpdates(_0x1748f5){return function(_0x15965d){try{jsonpatch['apply'](_0x15965d,_0x1748f5,!![]);}catch(_0x578aaa){return BPromise[_0xfed1('0x23')](_0x578aaa);}return _0x15965d['save']();};}function saveUpdates(_0x36a818,_0x4388f3){return function(_0x4cd3b8){if(_0x4cd3b8){return _0x4cd3b8[_0xfed1('0x24')](_0x36a818)[_0xfed1('0x25')](function(_0x472dbc){return _0x472dbc;});}return null;};}function removeEntity(_0x5bce5d,_0x1e8c3e){return function(_0xea7a81){if(_0xea7a81){return _0xea7a81['destroy']()[_0xfed1('0x25')](function(){_0x5bce5d[_0xfed1('0x1a')](0xcc)[_0xfed1('0x1b')]();});}};}function handleEntityNotFound(_0x5705b9,_0x1337d6){return function(_0x425a47){if(!_0x425a47){_0x5705b9[_0xfed1('0x19')](0x194);}return _0x425a47;};}function handleError(_0x5ab942,_0x3cd60e){_0x3cd60e=_0x3cd60e||0x1f4;return function(_0x46cf02){logger[_0xfed1('0x26')](_0x46cf02[_0xfed1('0x27')]);if(_0x46cf02[_0xfed1('0x28')]){delete _0x46cf02[_0xfed1('0x28')];}_0x5ab942['status'](_0x3cd60e)[_0xfed1('0x29')](_0x46cf02);};}exports[_0xfed1('0x2a')]=function(_0x55b555,_0x34e47b){var _0x3c971d={'raw':![],'where':{'id':_0x55b555['params']['id']}},_0x2d3e62={};_0x2d3e62[_0xfed1('0x2b')]=_[_0xfed1('0x2c')](db[_0xfed1('0x2d')][_0xfed1('0x2e')]);_0x2d3e62['query']=_[_0xfed1('0x2c')](_0x55b555[_0xfed1('0x2f')]);_0x2d3e62[_0xfed1('0x30')]=_[_0xfed1('0x31')](_0x2d3e62[_0xfed1('0x2b')],_0x2d3e62['query']);_0x3c971d[_0xfed1('0x32')]=_[_0xfed1('0x31')](_0x2d3e62[_0xfed1('0x2b')],qs[_0xfed1('0x33')](_0x55b555[_0xfed1('0x2f')][_0xfed1('0x33')]));_0x3c971d[_0xfed1('0x32')]=_0x3c971d[_0xfed1('0x32')]['length']?_0x3c971d['attributes']:_0x2d3e62['model'];if(_0x55b555[_0xfed1('0x2f')][_0xfed1('0x34')]){_0x3c971d['include']=[{'all':!![]}];}_0x3c971d=_[_0xfed1('0x35')]({},_0x3c971d,_0x55b555['options']);return db['DashboardItem']['find'](_0x3c971d)[_0xfed1('0x25')](handleEntityNotFound(_0x34e47b,null))[_0xfed1('0x25')](respondWithResult(_0x34e47b,null))[_0xfed1('0x36')](handleError(_0x34e47b,null));};exports['destroy']=function(_0x4d7e32,_0x2b59f7){return db[_0xfed1('0x2d')][_0xfed1('0x37')]({'where':{'id':_0x4d7e32[_0xfed1('0x38')]['id']}})[_0xfed1('0x25')](handleEntityNotFound(_0x2b59f7,null))[_0xfed1('0x25')](removeEntity(_0x2b59f7,null))[_0xfed1('0x36')](handleError(_0x2b59f7,null));};function widgetAttributes(_0x50375a){try{switch(_0x50375a[_0xfed1('0x39')]){case'iframe':return[{'name':_0xfed1('0x3a'),'value':_0x50375a[_0xfed1('0x3a')]||(_0x50375a['attrs']&&_0x50375a[_0xfed1('0x3b')][0x0]?_0x50375a[_0xfed1('0x3b')][0x0]['value']:undefined)||_0xfed1('0x3c')}];case _0xfed1('0x3d'):return[{'name':'attrPath','value':_0x50375a['attrPath']||(_0x50375a[_0xfed1('0x3b')]&&_0x50375a[_0xfed1('0x3b')][0x0]?_0x50375a[_0xfed1('0x3b')][0x0][_0xfed1('0x3e')]:undefined)||''}];case'clock':return[{'name':_0xfed1('0x3f'),'value':_0x50375a['attrHourFormat']||(_0x50375a[_0xfed1('0x3b')]&&_0x50375a['attrs'][0x0]?_0x50375a[_0xfed1('0x3b')][0x0][_0xfed1('0x3e')]:undefined)||_0xfed1('0x40')},{'name':_0xfed1('0x41'),'value':_0x50375a[_0xfed1('0x41')]||(_0x50375a['attrs']&&_0x50375a[_0xfed1('0x3b')][0x1]?_0x50375a[_0xfed1('0x3b')][0x1][_0xfed1('0x3e')]:undefined)||_0xfed1('0x42')},{'name':_0xfed1('0x43'),'value':_0x50375a['attrFontSize']||(_0x50375a[_0xfed1('0x3b')]&&_0x50375a[_0xfed1('0x3b')][0x2]?_0x50375a[_0xfed1('0x3b')][0x2][_0xfed1('0x3e')]:undefined)||0xc}];case _0xfed1('0x44'):return[{'name':_0xfed1('0x45'),'value':_0x50375a[_0xfed1('0x45')]||(_0x50375a['attrs']&&_0x50375a[_0xfed1('0x3b')][0x0]?_0x50375a['attrs'][0x0][_0xfed1('0x3e')]:undefined)||_0xfed1('0x46')},{'name':_0xfed1('0x47'),'value':_0x50375a[_0xfed1('0x47')]||(_0x50375a[_0xfed1('0x3b')]&&_0x50375a[_0xfed1('0x3b')][0x1]?_0x50375a[_0xfed1('0x3b')][0x1]['value']:undefined)||[]},{'name':_0xfed1('0x43'),'value':_0x50375a[_0xfed1('0x43')]||(_0x50375a['attrs']&&_0x50375a[_0xfed1('0x3b')][0x2]?_0x50375a[_0xfed1('0x3b')][0x2][_0xfed1('0x3e')]:undefined)||0x14},{'name':_0xfed1('0x48'),'value':_0x50375a['attrChannel']||(_0x50375a[_0xfed1('0x3b')]&&_0x50375a[_0xfed1('0x3b')][0x3]?_0x50375a[_0xfed1('0x3b')][0x3]['value']:undefined)||'voice'},{'name':'attrEmailAccounts','value':_0x50375a['attrEmailAccounts']||(_0x50375a[_0xfed1('0x3b')]&&_0x50375a[_0xfed1('0x3b')][0x4]?_0x50375a[_0xfed1('0x3b')][0x4][_0xfed1('0x3e')]:undefined)||''},{'name':_0xfed1('0x49'),'value':_0x50375a['attrFaxAccounts']||(_0x50375a['attrs']&&_0x50375a[_0xfed1('0x3b')][0x5]?_0x50375a[_0xfed1('0x3b')][0x5][_0xfed1('0x3e')]:undefined)||''},{'name':'attrSmsAccounts','value':_0x50375a['attrSmsAccounts']||(_0x50375a[_0xfed1('0x3b')]&&_0x50375a[_0xfed1('0x3b')][0x6]?_0x50375a[_0xfed1('0x3b')][0x6][_0xfed1('0x3e')]:undefined)||''},{'name':_0xfed1('0x4a'),'value':_0x50375a[_0xfed1('0x4a')]||(_0x50375a['attrs']&&_0x50375a[_0xfed1('0x3b')][0x7]?_0x50375a['attrs'][0x7][_0xfed1('0x3e')]:undefined)||''},{'name':_0xfed1('0x4b'),'value':_0x50375a['attrWhatsappAccounts']||(_0x50375a['attrs']&&_0x50375a[_0xfed1('0x3b')][0x8]?_0x50375a[_0xfed1('0x3b')][0x8][_0xfed1('0x3e')]:undefined)||''},{'name':_0xfed1('0x4c'),'value':_0x50375a['attrChatWebsites']||(_0x50375a[_0xfed1('0x3b')]&&_0x50375a[_0xfed1('0x3b')][0x9]?_0x50375a['attrs'][0x9][_0xfed1('0x3e')]:undefined)||''}];case _0xfed1('0x4d'):case'pie-chart':return[{'name':'attrSerie1','value':_0x50375a[_0xfed1('0x4e')]||(_0x50375a[_0xfed1('0x3b')]&&_0x50375a[_0xfed1('0x3b')][0x0]?_0x50375a[_0xfed1('0x3b')][0x0][_0xfed1('0x3e')]:undefined)||_0xfed1('0x46')},{'name':_0xfed1('0x4f'),'value':_0x50375a['attrSerie2']||(_0x50375a[_0xfed1('0x3b')]&&_0x50375a[_0xfed1('0x3b')][0x1]?_0x50375a['attrs'][0x1][_0xfed1('0x3e')]:undefined)||null},{'name':'attrSerie3','value':_0x50375a[_0xfed1('0x50')]||(_0x50375a[_0xfed1('0x3b')]&&_0x50375a['attrs'][0x2]?_0x50375a[_0xfed1('0x3b')][0x2][_0xfed1('0x3e')]:undefined)||null},{'name':_0xfed1('0x47'),'value':_0x50375a[_0xfed1('0x47')]||(_0x50375a[_0xfed1('0x3b')]&&_0x50375a[_0xfed1('0x3b')][0x3]?_0x50375a[_0xfed1('0x3b')][0x3][_0xfed1('0x3e')]:undefined)||[]},{'name':'attrChannel','value':_0x50375a['attrChannel']||(_0x50375a[_0xfed1('0x3b')]&&_0x50375a[_0xfed1('0x3b')][0x4]?_0x50375a['attrs'][0x4][_0xfed1('0x3e')]:undefined)||_0xfed1('0x51')},{'name':_0xfed1('0x52'),'value':_0x50375a['attrEmailAccounts']||(_0x50375a[_0xfed1('0x3b')]&&_0x50375a[_0xfed1('0x3b')][0x5]?_0x50375a[_0xfed1('0x3b')][0x5]['value']:undefined)||''},{'name':_0xfed1('0x49'),'value':_0x50375a[_0xfed1('0x49')]||(_0x50375a['attrs']&&_0x50375a[_0xfed1('0x3b')][0x6]?_0x50375a[_0xfed1('0x3b')][0x6][_0xfed1('0x3e')]:undefined)||''},{'name':_0xfed1('0x53'),'value':_0x50375a[_0xfed1('0x53')]||(_0x50375a['attrs']&&_0x50375a['attrs'][0x7]?_0x50375a[_0xfed1('0x3b')][0x7]['value']:undefined)||''},{'name':_0xfed1('0x4a'),'value':_0x50375a[_0xfed1('0x4a')]||(_0x50375a['attrs']&&_0x50375a['attrs'][0x8]?_0x50375a[_0xfed1('0x3b')][0x8]['value']:undefined)||''},{'name':'attrWhatsappAccounts','value':_0x50375a[_0xfed1('0x4b')]||(_0x50375a['attrs']&&_0x50375a[_0xfed1('0x3b')][0x9]?_0x50375a['attrs'][0x9][_0xfed1('0x3e')]:undefined)||''},{'name':_0xfed1('0x4c'),'value':_0x50375a[_0xfed1('0x4c')]||(_0x50375a[_0xfed1('0x3b')]&&_0x50375a['attrs'][0xa]?_0x50375a[_0xfed1('0x3b')][0xa][_0xfed1('0x3e')]:undefined)||''}];case _0xfed1('0x54'):return[{'name':'attrReport','type':_0x50375a[_0xfed1('0x55')]||(_0x50375a[_0xfed1('0x3b')]&&_0x50375a['attrs'][0x0]?_0x50375a[_0xfed1('0x3b')][0x0][_0xfed1('0x39')]:undefined)||null,'value':_0x50375a[_0xfed1('0x56')]||(_0x50375a[_0xfed1('0x3b')]&&_0x50375a[_0xfed1('0x3b')][0x0]?_0x50375a[_0xfed1('0x3b')][0x0][_0xfed1('0x3e')]:undefined)||null},{'name':_0xfed1('0x57'),'value':_0x50375a[_0xfed1('0x57')]||(_0x50375a[_0xfed1('0x3b')]&&_0x50375a[_0xfed1('0x3b')][0x1]?_0x50375a['attrs'][0x1][_0xfed1('0x3e')]:undefined)||0x0}];default:return[];}}catch(_0x5a8c89){logger[_0xfed1('0x26')]('widgetAttributes:\x20%s',JSON[_0xfed1('0x58')](_0x5a8c89));return[];}}exports[_0xfed1('0x59')]=function(_0xeb4848,_0x5b387a){if(_0xeb4848['body']){_0xeb4848[_0xfed1('0x5a')][_0xfed1('0x3b')]=widgetAttributes(_0xeb4848[_0xfed1('0x5a')]);}return db[_0xfed1('0x2d')][_0xfed1('0x59')](_0xeb4848['body'],{})[_0xfed1('0x25')](respondWithResult(_0x5b387a,0xc9))[_0xfed1('0x36')](handleError(_0x5b387a,null));};exports['update']=function(_0x515b23,_0x3387fc){if(_0x515b23[_0xfed1('0x5a')]['id']){delete _0x515b23[_0xfed1('0x5a')]['id'];}_0x515b23[_0xfed1('0x5a')][_0xfed1('0x3b')]=widgetAttributes(_0x515b23[_0xfed1('0x5a')]);return db[_0xfed1('0x2d')][_0xfed1('0x37')]({'where':{'id':_0x515b23[_0xfed1('0x38')]['id']}})['then'](handleEntityNotFound(_0x3387fc,null))[_0xfed1('0x25')](saveUpdates(_0x515b23[_0xfed1('0x5a')],null))['then'](respondWithResult(_0x3387fc,null))['catch'](handleError(_0x3387fc,null));}; \ No newline at end of file +var _0x7958=['request-promise','moment','bluebird','mustache','util','path','sox','ejs','fs-extra','lodash','crypto','desk.js','to-csv','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../mysqldb','redis','defaults','localhost','socket.io-emitter','sendStatus','status','end','offset','undefined','limit','count','Content-Range','reject','save','destroy','then','error','stack','name','send','show','params','keys','DashboardItem','rawAttributes','query','filters','intersection','attributes','model','fields','length','includeAll','include','merge','options','find','catch','attrUrl','attrs','value','custom','attrPath','HH:mm:ss','attrTimezone','0.00','counter','attrMetric','attrVoiceQueues','attrFontSize','attrChannel','voice','attrEmailAccounts','attrFaxAccounts','attrSmsAccounts','attrWhatsappAccounts','attrChatWebsites','multibar-chart','pie-chart','attrSerie1','total','attrSerie2','attrSerie3','attrOpenchannelAccounts','web-report','attrReport','attrRefresh','widgetAttributes:\x20%s','stringify','create','body','eml-format','rimraf','fast-json-patch'];(function(_0x5354a7,_0x4ae95d){var _0x5c0116=function(_0x2d2a1d){while(--_0x2d2a1d){_0x5354a7['push'](_0x5354a7['shift']());}};_0x5c0116(++_0x4ae95d);}(_0x7958,0x126));var _0x8795=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0x7958[_0x3dd15e];return _0x231fd0;};'use strict';var emlformat=require(_0x8795('0x0'));var rimraf=require(_0x8795('0x1'));var zipdir=require('zip-dir');var jsonpatch=require(_0x8795('0x2'));var rp=require(_0x8795('0x3'));var moment=require(_0x8795('0x4'));var BPromise=require(_0x8795('0x5'));var Mustache=require(_0x8795('0x6'));var util=require(_0x8795('0x7'));var path=require(_0x8795('0x8'));var sox=require(_0x8795('0x9'));var csv=require('to-csv');var ejs=require(_0x8795('0xa'));var fs=require('fs');var fs_extra=require(_0x8795('0xb'));var _=require(_0x8795('0xc'));var squel=require('squel');var crypto=require(_0x8795('0xd'));var jsforce=require('jsforce');var deskjs=require(_0x8795('0xe'));var toCsv=require(_0x8795('0xf'));var querystring=require(_0x8795('0x10'));var Papa=require(_0x8795('0x11'));var Redis=require(_0x8795('0x12'));var authService=require(_0x8795('0x13'));var qs=require(_0x8795('0x14'));var as=require(_0x8795('0x15'));var hardwareService=require(_0x8795('0x16'));var logger=require(_0x8795('0x17'))(_0x8795('0x18'));var utils=require(_0x8795('0x19'));var config=require(_0x8795('0x1a'));var licenseUtil=require('../../config/license/util');var db=require(_0x8795('0x1b'))['db'];config[_0x8795('0x1c')]=_[_0x8795('0x1d')](config[_0x8795('0x1c')],{'host':_0x8795('0x1e'),'port':0x18eb});var socket=require(_0x8795('0x1f'))(new Redis(config[_0x8795('0x1c')]));require('./dashboardItem.socket')['register'](socket);function respondWithStatusCode(_0x595064,_0x283437){_0x283437=_0x283437||0xcc;return function(_0xb3f0d7){if(_0xb3f0d7){return _0x595064[_0x8795('0x20')](_0x283437);}return _0x595064[_0x8795('0x21')](_0x283437)[_0x8795('0x22')]();};}function respondWithResult(_0x2027c1,_0x3f835f){_0x3f835f=_0x3f835f||0xc8;return function(_0x5017fc){if(_0x5017fc){return _0x2027c1[_0x8795('0x21')](_0x3f835f)['json'](_0x5017fc);}};}function respondWithFilteredResult(_0x42005e,_0x1eed23){return function(_0x498eea){if(_0x498eea){var _0x2e5452=typeof _0x1eed23[_0x8795('0x23')]===_0x8795('0x24')&&typeof _0x1eed23[_0x8795('0x25')]==='undefined';var _0x1aae20=_0x498eea[_0x8795('0x26')];var _0x4a65f0=_0x2e5452?0x0:_0x1eed23[_0x8795('0x23')];var _0x2a9501=_0x2e5452?_0x498eea[_0x8795('0x26')]:_0x1eed23[_0x8795('0x23')]+_0x1eed23['limit'];var _0x1930ca;if(_0x2a9501>=_0x1aae20){_0x2a9501=_0x1aae20;_0x1930ca=0xc8;}else{_0x1930ca=0xce;}_0x42005e['status'](_0x1930ca);return _0x42005e['set'](_0x8795('0x27'),_0x4a65f0+'-'+_0x2a9501+'/'+_0x1aae20)['json'](_0x498eea);}return null;};}function patchUpdates(_0x396f97){return function(_0x237091){try{jsonpatch['apply'](_0x237091,_0x396f97,!![]);}catch(_0x2d5097){return BPromise[_0x8795('0x28')](_0x2d5097);}return _0x237091[_0x8795('0x29')]();};}function saveUpdates(_0x1aa57a,_0x170e1b){return function(_0x3db752){if(_0x3db752){return _0x3db752['update'](_0x1aa57a)['then'](function(_0x163707){return _0x163707;});}return null;};}function removeEntity(_0x4ff62c,_0x3ed14c){return function(_0x389c38){if(_0x389c38){return _0x389c38[_0x8795('0x2a')]()[_0x8795('0x2b')](function(){_0x4ff62c[_0x8795('0x21')](0xcc)['end']();});}};}function handleEntityNotFound(_0x8dc441,_0xdef175){return function(_0x5e06c5){if(!_0x5e06c5){_0x8dc441[_0x8795('0x20')](0x194);}return _0x5e06c5;};}function handleError(_0x1baa26,_0x3ce361){_0x3ce361=_0x3ce361||0x1f4;return function(_0x28770c){logger[_0x8795('0x2c')](_0x28770c[_0x8795('0x2d')]);if(_0x28770c[_0x8795('0x2e')]){delete _0x28770c[_0x8795('0x2e')];}_0x1baa26[_0x8795('0x21')](_0x3ce361)[_0x8795('0x2f')](_0x28770c);};}exports[_0x8795('0x30')]=function(_0x4d5707,_0x3fd6e3){var _0xa5c815={'raw':![],'where':{'id':_0x4d5707[_0x8795('0x31')]['id']}},_0x3aab08={};_0x3aab08['model']=_[_0x8795('0x32')](db[_0x8795('0x33')][_0x8795('0x34')]);_0x3aab08[_0x8795('0x35')]=_[_0x8795('0x32')](_0x4d5707[_0x8795('0x35')]);_0x3aab08[_0x8795('0x36')]=_[_0x8795('0x37')](_0x3aab08['model'],_0x3aab08['query']);_0xa5c815[_0x8795('0x38')]=_[_0x8795('0x37')](_0x3aab08[_0x8795('0x39')],qs[_0x8795('0x3a')](_0x4d5707['query'][_0x8795('0x3a')]));_0xa5c815[_0x8795('0x38')]=_0xa5c815[_0x8795('0x38')][_0x8795('0x3b')]?_0xa5c815[_0x8795('0x38')]:_0x3aab08[_0x8795('0x39')];if(_0x4d5707[_0x8795('0x35')][_0x8795('0x3c')]){_0xa5c815[_0x8795('0x3d')]=[{'all':!![]}];}_0xa5c815=_[_0x8795('0x3e')]({},_0xa5c815,_0x4d5707[_0x8795('0x3f')]);return db[_0x8795('0x33')][_0x8795('0x40')](_0xa5c815)[_0x8795('0x2b')](handleEntityNotFound(_0x3fd6e3,null))[_0x8795('0x2b')](respondWithResult(_0x3fd6e3,null))[_0x8795('0x41')](handleError(_0x3fd6e3,null));};exports[_0x8795('0x2a')]=function(_0x3886f2,_0x394e29){return db[_0x8795('0x33')][_0x8795('0x40')]({'where':{'id':_0x3886f2[_0x8795('0x31')]['id']}})[_0x8795('0x2b')](handleEntityNotFound(_0x394e29,null))[_0x8795('0x2b')](removeEntity(_0x394e29,null))[_0x8795('0x41')](handleError(_0x394e29,null));};function widgetAttributes(_0x16ea8f){try{switch(_0x16ea8f['type']){case'iframe':return[{'name':_0x8795('0x42'),'value':_0x16ea8f[_0x8795('0x42')]||(_0x16ea8f[_0x8795('0x43')]&&_0x16ea8f[_0x8795('0x43')][0x0]?_0x16ea8f['attrs'][0x0][_0x8795('0x44')]:undefined)||'https://'}];case _0x8795('0x45'):return[{'name':_0x8795('0x46'),'value':_0x16ea8f['attrPath']||(_0x16ea8f[_0x8795('0x43')]&&_0x16ea8f['attrs'][0x0]?_0x16ea8f[_0x8795('0x43')][0x0][_0x8795('0x44')]:undefined)||''}];case'clock':return[{'name':'attrHourFormat','value':_0x16ea8f['attrHourFormat']||(_0x16ea8f[_0x8795('0x43')]&&_0x16ea8f['attrs'][0x0]?_0x16ea8f['attrs'][0x0][_0x8795('0x44')]:undefined)||_0x8795('0x47')},{'name':_0x8795('0x48'),'value':_0x16ea8f[_0x8795('0x48')]||(_0x16ea8f[_0x8795('0x43')]&&_0x16ea8f[_0x8795('0x43')][0x1]?_0x16ea8f[_0x8795('0x43')][0x1]['value']:undefined)||_0x8795('0x49')},{'name':'attrFontSize','value':_0x16ea8f['attrFontSize']||(_0x16ea8f['attrs']&&_0x16ea8f[_0x8795('0x43')][0x2]?_0x16ea8f[_0x8795('0x43')][0x2][_0x8795('0x44')]:undefined)||0xc}];case _0x8795('0x4a'):return[{'name':_0x8795('0x4b'),'value':_0x16ea8f[_0x8795('0x4b')]||(_0x16ea8f[_0x8795('0x43')]&&_0x16ea8f[_0x8795('0x43')][0x0]?_0x16ea8f['attrs'][0x0][_0x8795('0x44')]:undefined)||'total'},{'name':_0x8795('0x4c'),'value':_0x16ea8f[_0x8795('0x4c')]||(_0x16ea8f['attrs']&&_0x16ea8f[_0x8795('0x43')][0x1]?_0x16ea8f[_0x8795('0x43')][0x1]['value']:undefined)||[]},{'name':_0x8795('0x4d'),'value':_0x16ea8f[_0x8795('0x4d')]||(_0x16ea8f[_0x8795('0x43')]&&_0x16ea8f[_0x8795('0x43')][0x2]?_0x16ea8f['attrs'][0x2][_0x8795('0x44')]:undefined)||0x14},{'name':_0x8795('0x4e'),'value':_0x16ea8f['attrChannel']||(_0x16ea8f['attrs']&&_0x16ea8f[_0x8795('0x43')][0x3]?_0x16ea8f[_0x8795('0x43')][0x3][_0x8795('0x44')]:undefined)||_0x8795('0x4f')},{'name':'attrEmailAccounts','value':_0x16ea8f[_0x8795('0x50')]||(_0x16ea8f[_0x8795('0x43')]&&_0x16ea8f[_0x8795('0x43')][0x4]?_0x16ea8f[_0x8795('0x43')][0x4][_0x8795('0x44')]:undefined)||''},{'name':_0x8795('0x51'),'value':_0x16ea8f[_0x8795('0x51')]||(_0x16ea8f[_0x8795('0x43')]&&_0x16ea8f['attrs'][0x5]?_0x16ea8f['attrs'][0x5][_0x8795('0x44')]:undefined)||''},{'name':'attrSmsAccounts','value':_0x16ea8f[_0x8795('0x52')]||(_0x16ea8f[_0x8795('0x43')]&&_0x16ea8f[_0x8795('0x43')][0x6]?_0x16ea8f[_0x8795('0x43')][0x6][_0x8795('0x44')]:undefined)||''},{'name':'attrOpenchannelAccounts','value':_0x16ea8f['attrOpenchannelAccounts']||(_0x16ea8f[_0x8795('0x43')]&&_0x16ea8f['attrs'][0x7]?_0x16ea8f[_0x8795('0x43')][0x7][_0x8795('0x44')]:undefined)||''},{'name':'attrWhatsappAccounts','value':_0x16ea8f[_0x8795('0x53')]||(_0x16ea8f[_0x8795('0x43')]&&_0x16ea8f['attrs'][0x8]?_0x16ea8f[_0x8795('0x43')][0x8]['value']:undefined)||''},{'name':'attrChatWebsites','value':_0x16ea8f[_0x8795('0x54')]||(_0x16ea8f[_0x8795('0x43')]&&_0x16ea8f[_0x8795('0x43')][0x9]?_0x16ea8f['attrs'][0x9]['value']:undefined)||''}];case _0x8795('0x55'):case _0x8795('0x56'):return[{'name':_0x8795('0x57'),'value':_0x16ea8f['attrSerie1']||(_0x16ea8f[_0x8795('0x43')]&&_0x16ea8f[_0x8795('0x43')][0x0]?_0x16ea8f[_0x8795('0x43')][0x0][_0x8795('0x44')]:undefined)||_0x8795('0x58')},{'name':_0x8795('0x59'),'value':_0x16ea8f[_0x8795('0x59')]||(_0x16ea8f[_0x8795('0x43')]&&_0x16ea8f[_0x8795('0x43')][0x1]?_0x16ea8f[_0x8795('0x43')][0x1]['value']:undefined)||null},{'name':_0x8795('0x5a'),'value':_0x16ea8f[_0x8795('0x5a')]||(_0x16ea8f['attrs']&&_0x16ea8f['attrs'][0x2]?_0x16ea8f[_0x8795('0x43')][0x2][_0x8795('0x44')]:undefined)||null},{'name':_0x8795('0x4c'),'value':_0x16ea8f['attrVoiceQueues']||(_0x16ea8f[_0x8795('0x43')]&&_0x16ea8f[_0x8795('0x43')][0x3]?_0x16ea8f[_0x8795('0x43')][0x3][_0x8795('0x44')]:undefined)||[]},{'name':_0x8795('0x4e'),'value':_0x16ea8f['attrChannel']||(_0x16ea8f['attrs']&&_0x16ea8f['attrs'][0x4]?_0x16ea8f[_0x8795('0x43')][0x4][_0x8795('0x44')]:undefined)||'voice'},{'name':_0x8795('0x50'),'value':_0x16ea8f[_0x8795('0x50')]||(_0x16ea8f[_0x8795('0x43')]&&_0x16ea8f[_0x8795('0x43')][0x5]?_0x16ea8f[_0x8795('0x43')][0x5]['value']:undefined)||''},{'name':'attrFaxAccounts','value':_0x16ea8f['attrFaxAccounts']||(_0x16ea8f['attrs']&&_0x16ea8f[_0x8795('0x43')][0x6]?_0x16ea8f[_0x8795('0x43')][0x6][_0x8795('0x44')]:undefined)||''},{'name':_0x8795('0x52'),'value':_0x16ea8f['attrSmsAccounts']||(_0x16ea8f[_0x8795('0x43')]&&_0x16ea8f[_0x8795('0x43')][0x7]?_0x16ea8f[_0x8795('0x43')][0x7][_0x8795('0x44')]:undefined)||''},{'name':_0x8795('0x5b'),'value':_0x16ea8f[_0x8795('0x5b')]||(_0x16ea8f[_0x8795('0x43')]&&_0x16ea8f['attrs'][0x8]?_0x16ea8f[_0x8795('0x43')][0x8][_0x8795('0x44')]:undefined)||''},{'name':'attrWhatsappAccounts','value':_0x16ea8f[_0x8795('0x53')]||(_0x16ea8f[_0x8795('0x43')]&&_0x16ea8f[_0x8795('0x43')][0x9]?_0x16ea8f[_0x8795('0x43')][0x9][_0x8795('0x44')]:undefined)||''},{'name':_0x8795('0x54'),'value':_0x16ea8f[_0x8795('0x54')]||(_0x16ea8f[_0x8795('0x43')]&&_0x16ea8f[_0x8795('0x43')][0xa]?_0x16ea8f[_0x8795('0x43')][0xa][_0x8795('0x44')]:undefined)||''}];case _0x8795('0x5c'):return[{'name':_0x8795('0x5d'),'type':_0x16ea8f['reportType']||(_0x16ea8f[_0x8795('0x43')]&&_0x16ea8f[_0x8795('0x43')][0x0]?_0x16ea8f['attrs'][0x0]['type']:undefined)||null,'value':_0x16ea8f[_0x8795('0x5d')]||(_0x16ea8f[_0x8795('0x43')]&&_0x16ea8f['attrs'][0x0]?_0x16ea8f[_0x8795('0x43')][0x0][_0x8795('0x44')]:undefined)||null},{'name':_0x8795('0x5e'),'value':_0x16ea8f[_0x8795('0x5e')]||(_0x16ea8f['attrs']&&_0x16ea8f['attrs'][0x1]?_0x16ea8f[_0x8795('0x43')][0x1][_0x8795('0x44')]:undefined)||0x0}];default:return[];}}catch(_0x1219f6){logger['error'](_0x8795('0x5f'),JSON[_0x8795('0x60')](_0x1219f6));return[];}}exports[_0x8795('0x61')]=function(_0x1be553,_0x296a54){if(_0x1be553['body']){_0x1be553[_0x8795('0x62')][_0x8795('0x43')]=widgetAttributes(_0x1be553[_0x8795('0x62')]);}return db[_0x8795('0x33')][_0x8795('0x61')](_0x1be553['body'],{})[_0x8795('0x2b')](respondWithResult(_0x296a54,0xc9))['catch'](handleError(_0x296a54,null));};exports['update']=function(_0xcfdb92,_0x233927){if(_0xcfdb92[_0x8795('0x62')]['id']){delete _0xcfdb92[_0x8795('0x62')]['id'];}_0xcfdb92[_0x8795('0x62')][_0x8795('0x43')]=widgetAttributes(_0xcfdb92[_0x8795('0x62')]);return db[_0x8795('0x33')][_0x8795('0x40')]({'where':{'id':_0xcfdb92[_0x8795('0x31')]['id']}})[_0x8795('0x2b')](handleEntityNotFound(_0x233927,null))['then'](saveUpdates(_0xcfdb92[_0x8795('0x62')],null))[_0x8795('0x2b')](respondWithResult(_0x233927,null))[_0x8795('0x41')](handleError(_0x233927,null));}; \ No newline at end of file diff --git a/server/api/dashboardItem/dashboardItem.events.js b/server/api/dashboardItem/dashboardItem.events.js index e98f30b..92b384f 100644 --- a/server/api/dashboardItem/dashboardItem.events.js +++ b/server/api/dashboardItem/dashboardItem.events.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xa3d1=['hasOwnProperty','hook','exports','../../mysqldb','DashboardItem','update','remove','emit'];(function(_0x3c76ef,_0x503eb7){var _0x106b4c=function(_0x26a152){while(--_0x26a152){_0x3c76ef['push'](_0x3c76ef['shift']());}};_0x106b4c(++_0x503eb7);}(_0xa3d1,0xcb));var _0x1a3d=function(_0x74b5c4,_0x4b8090){_0x74b5c4=_0x74b5c4-0x0;var _0x1816f3=_0xa3d1[_0x74b5c4];return _0x1816f3;};'use strict';var EventEmitter=require('events');var DashboardItem=require(_0x1a3d('0x0'))['db'][_0x1a3d('0x1')];var DashboardItemEvents=new EventEmitter();DashboardItemEvents['setMaxListeners'](0x0);var events={'afterCreate':'save','afterUpdate':_0x1a3d('0x2'),'afterDestroy':_0x1a3d('0x3')};function emitEvent(_0x198500){return function(_0x475d9a,_0x23cb4f,_0x22db36){DashboardItemEvents[_0x1a3d('0x4')](_0x198500+':'+_0x475d9a['id'],_0x475d9a);DashboardItemEvents[_0x1a3d('0x4')](_0x198500,_0x475d9a);_0x22db36(null);};}for(var e in events){if(events[_0x1a3d('0x5')](e)){var event=events[e];DashboardItem[_0x1a3d('0x6')](e,emitEvent(event));}}module[_0x1a3d('0x7')]=DashboardItemEvents; \ No newline at end of file +var _0x0ee6=['setMaxListeners','save','update','remove','emit','exports','events','../../mysqldb'];(function(_0x5c8f3e,_0x33ba70){var _0xb55f35=function(_0x48f8ef){while(--_0x48f8ef){_0x5c8f3e['push'](_0x5c8f3e['shift']());}};_0xb55f35(++_0x33ba70);}(_0x0ee6,0x106));var _0x60ee=function(_0x1054b8,_0x1d23aa){_0x1054b8=_0x1054b8-0x0;var _0x5ab226=_0x0ee6[_0x1054b8];return _0x5ab226;};'use strict';var EventEmitter=require(_0x60ee('0x0'));var DashboardItem=require(_0x60ee('0x1'))['db']['DashboardItem'];var DashboardItemEvents=new EventEmitter();DashboardItemEvents[_0x60ee('0x2')](0x0);var events={'afterCreate':_0x60ee('0x3'),'afterUpdate':_0x60ee('0x4'),'afterDestroy':_0x60ee('0x5')};function emitEvent(_0x5d0b30){return function(_0x36fb3f,_0x1bb6dd,_0x326bc8){DashboardItemEvents[_0x60ee('0x6')](_0x5d0b30+':'+_0x36fb3f['id'],_0x36fb3f);DashboardItemEvents[_0x60ee('0x6')](_0x5d0b30,_0x36fb3f);_0x326bc8(null);};}for(var e in events){if(events['hasOwnProperty'](e)){var event=events[e];DashboardItem['hook'](e,emitEvent(event));}}module[_0x60ee('0x7')]=DashboardItemEvents; \ No newline at end of file diff --git a/server/api/dashboardItem/dashboardItem.model.js b/server/api/dashboardItem/dashboardItem.model.js index a710d1c..143d571 100644 --- a/server/api/dashboardItem/dashboardItem.model.js +++ b/server/api/dashboardItem/dashboardItem.model.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x0b14=['api','moment','bluebird','request-promise','../../config/environment','DashboardItem','dashboard_items','../../config/logger'];(function(_0x5e462f,_0x4cd2aa){var _0x52277e=function(_0x52f414){while(--_0x52f414){_0x5e462f['push'](_0x5e462f['shift']());}};_0x52277e(++_0x4cd2aa);}(_0x0b14,0x117));var _0x40b1=function(_0x8a0e34,_0x322021){_0x8a0e34=_0x8a0e34-0x0;var _0x357057=_0x0b14[_0x8a0e34];return _0x357057;};'use strict';var _=require('lodash');var util=require('util');var logger=require(_0x40b1('0x0'))(_0x40b1('0x1'));var moment=require(_0x40b1('0x2'));var BPromise=require(_0x40b1('0x3'));var rp=require(_0x40b1('0x4'));var fs=require('fs');var path=require('path');var rimraf=require('rimraf');var config=require(_0x40b1('0x5'));var attributes=require('./dashboardItem.attributes');module['exports']=function(_0x23683f,_0x3d34e2){return _0x23683f['define'](_0x40b1('0x6'),attributes,{'tableName':_0x40b1('0x7'),'paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file +var _0xe186=['bluebird','request-promise','path','../../config/environment','exports','dashboard_items','lodash','util','api','moment'];(function(_0x3f8d82,_0x298fa8){var _0x53d50e=function(_0x229ae0){while(--_0x229ae0){_0x3f8d82['push'](_0x3f8d82['shift']());}};_0x53d50e(++_0x298fa8);}(_0xe186,0x146));var _0x6e18=function(_0x4a149d,_0xad2501){_0x4a149d=_0x4a149d-0x0;var _0x214224=_0xe186[_0x4a149d];return _0x214224;};'use strict';var _=require(_0x6e18('0x0'));var util=require(_0x6e18('0x1'));var logger=require('../../config/logger')(_0x6e18('0x2'));var moment=require(_0x6e18('0x3'));var BPromise=require(_0x6e18('0x4'));var rp=require(_0x6e18('0x5'));var fs=require('fs');var path=require(_0x6e18('0x6'));var rimraf=require('rimraf');var config=require(_0x6e18('0x7'));var attributes=require('./dashboardItem.attributes');module[_0x6e18('0x8')]=function(_0x1bafb5,_0x1b9e15){return _0x1bafb5['define']('DashboardItem',attributes,{'tableName':_0x6e18('0x9'),'paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file diff --git a/server/api/dashboardItem/dashboardItem.rpc.js b/server/api/dashboardItem/dashboardItem.rpc.js index 80acd9b..7d330ac 100644 --- a/server/api/dashboardItem/dashboardItem.rpc.js +++ b/server/api/dashboardItem/dashboardItem.rpc.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xf714=['error','code','DashboardItem,\x20%s,\x20%s','message','lodash','util','moment','bluebird','randomstring','ioredis','../../config/logger','http','redis','localhost','socket.io-emitter','./dashboardItem.socket','request','info','debug','DashboardItem,\x20%s,\x20%s,\x20%s','request\x20sent','stringify'];(function(_0x4628c6,_0x212c5e){var _0x181ddc=function(_0x36280a){while(--_0x36280a){_0x4628c6['push'](_0x4628c6['shift']());}};_0x181ddc(++_0x212c5e);}(_0xf714,0x14e));var _0x4f71=function(_0x169585,_0x476cc6){_0x169585=_0x169585-0x0;var _0x5cf666=_0xf714[_0x169585];return _0x5cf666;};'use strict';var _=require(_0x4f71('0x0'));var util=require(_0x4f71('0x1'));var moment=require(_0x4f71('0x2'));var BPromise=require(_0x4f71('0x3'));var rs=require(_0x4f71('0x4'));var fs=require('fs');var Redis=require(_0x4f71('0x5'));var db=require('../../mysqldb')['db'];var utils=require('../../config/utils');var logger=require(_0x4f71('0x6'))('rpc');var config=require('../../config/environment');var jayson=require('jayson/promise');var client=jayson['client'][_0x4f71('0x7')]({'port':0x232a});config[_0x4f71('0x8')]=_['defaults'](config[_0x4f71('0x8')],{'host':_0x4f71('0x9'),'port':0x18eb});var socket=require(_0x4f71('0xa'))(new Redis(config['redis']));require(_0x4f71('0xb'))['register'](socket);function respondWithRpcPromise(_0x3c3711,_0x514aac,_0x545465){return new BPromise(function(_0x2968c6,_0x5e2e81){return client[_0x4f71('0xc')](_0x3c3711,_0x545465)['then'](function(_0x486cfd){logger[_0x4f71('0xd')]('DashboardItem,\x20%s,\x20%s',_0x514aac,'request\x20sent');logger[_0x4f71('0xe')](_0x4f71('0xf'),_0x514aac,_0x4f71('0x10'),JSON[_0x4f71('0x11')](_0x486cfd));if(_0x486cfd[_0x4f71('0x12')]){if(_0x486cfd[_0x4f71('0x12')][_0x4f71('0x13')]===0x1f4){logger[_0x4f71('0x12')](_0x4f71('0x14'),_0x514aac,_0x486cfd['error'][_0x4f71('0x15')]);return _0x5e2e81(_0x486cfd['error'][_0x4f71('0x15')]);}logger[_0x4f71('0x12')]('DashboardItem,\x20%s,\x20%s',_0x514aac,_0x486cfd['error'][_0x4f71('0x15')]);return _0x2968c6(_0x486cfd[_0x4f71('0x12')]['message']);}else{logger[_0x4f71('0xd')]('DashboardItem,\x20%s,\x20%s',_0x514aac,_0x4f71('0x10'));_0x2968c6(_0x486cfd['result'][_0x4f71('0x15')]);}})['catch'](function(_0xfb36b7){logger['error'](_0x4f71('0x14'),_0x514aac,_0xfb36b7);_0x5e2e81(_0xfb36b7);});});} \ No newline at end of file +var _0x9cbd=['code','message','result','catch','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','../../config/environment','client','http','redis','defaults','localhost','socket.io-emitter','register','then','info','DashboardItem,\x20%s,\x20%s','request\x20sent','DashboardItem,\x20%s,\x20%s,\x20%s','stringify','error'];(function(_0xbe65a,_0x4bbcbd){var _0x4882f4=function(_0x13f027){while(--_0x13f027){_0xbe65a['push'](_0xbe65a['shift']());}};_0x4882f4(++_0x4bbcbd);}(_0x9cbd,0x1cf));var _0xd9cb=function(_0x269acd,_0x2f591c){_0x269acd=_0x269acd-0x0;var _0x1b08f3=_0x9cbd[_0x269acd];return _0x1b08f3;};'use strict';var _=require('lodash');var util=require(_0xd9cb('0x0'));var moment=require(_0xd9cb('0x1'));var BPromise=require(_0xd9cb('0x2'));var rs=require(_0xd9cb('0x3'));var fs=require('fs');var Redis=require(_0xd9cb('0x4'));var db=require(_0xd9cb('0x5'))['db'];var utils=require(_0xd9cb('0x6'));var logger=require(_0xd9cb('0x7'))('rpc');var config=require(_0xd9cb('0x8'));var jayson=require('jayson/promise');var client=jayson[_0xd9cb('0x9')][_0xd9cb('0xa')]({'port':0x232a});config[_0xd9cb('0xb')]=_[_0xd9cb('0xc')](config[_0xd9cb('0xb')],{'host':_0xd9cb('0xd'),'port':0x18eb});var socket=require(_0xd9cb('0xe'))(new Redis(config[_0xd9cb('0xb')]));require('./dashboardItem.socket')[_0xd9cb('0xf')](socket);function respondWithRpcPromise(_0x29c432,_0x3e6c3b,_0x4db00c){return new BPromise(function(_0x389ae2,_0x2c15e1){return client['request'](_0x29c432,_0x4db00c)[_0xd9cb('0x10')](function(_0x1c3ccc){logger[_0xd9cb('0x11')](_0xd9cb('0x12'),_0x3e6c3b,_0xd9cb('0x13'));logger['debug'](_0xd9cb('0x14'),_0x3e6c3b,'request\x20sent',JSON[_0xd9cb('0x15')](_0x1c3ccc));if(_0x1c3ccc['error']){if(_0x1c3ccc[_0xd9cb('0x16')][_0xd9cb('0x17')]===0x1f4){logger['error'](_0xd9cb('0x12'),_0x3e6c3b,_0x1c3ccc['error'][_0xd9cb('0x18')]);return _0x2c15e1(_0x1c3ccc['error'][_0xd9cb('0x18')]);}logger[_0xd9cb('0x16')](_0xd9cb('0x12'),_0x3e6c3b,_0x1c3ccc[_0xd9cb('0x16')]['message']);return _0x389ae2(_0x1c3ccc[_0xd9cb('0x16')][_0xd9cb('0x18')]);}else{logger['info'](_0xd9cb('0x12'),_0x3e6c3b,_0xd9cb('0x13'));_0x389ae2(_0x1c3ccc[_0xd9cb('0x19')]['message']);}})[_0xd9cb('0x1a')](function(_0x7a4f87){logger['error'](_0xd9cb('0x12'),_0x3e6c3b,_0x7a4f87);_0x2c15e1(_0x7a4f87);});});} \ No newline at end of file diff --git a/server/api/dashboardItem/dashboardItem.socket.js b/server/api/dashboardItem/dashboardItem.socket.js index bd83739..2fb6a08 100644 --- a/server/api/dashboardItem/dashboardItem.socket.js +++ b/server/api/dashboardItem/dashboardItem.socket.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x6a3e=['emit','removeListener','register','length','dashboardItem:','./dashboardItem.events','save','remove'];(function(_0x44b75f,_0x22b16b){var _0x4f9a3b=function(_0x538251){while(--_0x538251){_0x44b75f['push'](_0x44b75f['shift']());}};_0x4f9a3b(++_0x22b16b);}(_0x6a3e,0xad));var _0xe6a3=function(_0x30b827,_0x246710){_0x30b827=_0x30b827-0x0;var _0x31eda5=_0x6a3e[_0x30b827];return _0x31eda5;};'use strict';var DashboardItemEvents=require(_0xe6a3('0x0'));var events=[_0xe6a3('0x1'),_0xe6a3('0x2'),'update'];function createListener(_0x451bf8,_0x39cb2f){return function(_0x128ead){_0x39cb2f[_0xe6a3('0x3')](_0x451bf8,_0x128ead);};}function removeListener(_0x55087b,_0x4ea7d2){return function(){DashboardItemEvents[_0xe6a3('0x4')](_0x55087b,_0x4ea7d2);};}exports[_0xe6a3('0x5')]=function(_0x35f768){for(var _0x123c87=0x0,_0x3eb612=events[_0xe6a3('0x6')];_0x123c87<_0x3eb612;_0x123c87++){var _0x4a2deb=events[_0x123c87];var _0x5f564e=createListener(_0xe6a3('0x7')+_0x4a2deb,_0x35f768);DashboardItemEvents['on'](_0x4a2deb,_0x5f564e);}}; \ No newline at end of file +var _0x798f=['update','emit','removeListener','register','dashboardItem:','./dashboardItem.events','save','remove'];(function(_0xe0b097,_0x192e79){var _0x5d07e4=function(_0x1a5e51){while(--_0x1a5e51){_0xe0b097['push'](_0xe0b097['shift']());}};_0x5d07e4(++_0x192e79);}(_0x798f,0x14d));var _0xf798=function(_0x14add3,_0x13ce8d){_0x14add3=_0x14add3-0x0;var _0x4a174f=_0x798f[_0x14add3];return _0x4a174f;};'use strict';var DashboardItemEvents=require(_0xf798('0x0'));var events=[_0xf798('0x1'),_0xf798('0x2'),_0xf798('0x3')];function createListener(_0x4332a5,_0xd15ef9){return function(_0x2c3f76){_0xd15ef9[_0xf798('0x4')](_0x4332a5,_0x2c3f76);};}function removeListener(_0x3ce695,_0x4f1a37){return function(){DashboardItemEvents[_0xf798('0x5')](_0x3ce695,_0x4f1a37);};}exports[_0xf798('0x6')]=function(_0x446d3e){for(var _0x32b870=0x0,_0x227eb7=events['length'];_0x32b870<_0x227eb7;_0x32b870++){var _0x555546=events[_0x32b870];var _0x59c42d=createListener(_0xf798('0x7')+_0x555546,_0x446d3e);DashboardItemEvents['on'](_0x555546,_0x59c42d);}}; \ No newline at end of file diff --git a/server/api/dashboardItem/index.js b/server/api/dashboardItem/index.js index 01cfe56..d3fdd0e 100644 --- a/server/api/dashboardItem/index.js +++ b/server/api/dashboardItem/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x2123=['express','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','./dashboardItem.controller','/:id','isAuthenticated','show','post','create','put','destroy','multer','util','path'];(function(_0x2642cb,_0x4b917f){var _0xe6e41=function(_0x281676){while(--_0x281676){_0x2642cb['push'](_0x2642cb['shift']());}};_0xe6e41(++_0x4b917f);}(_0x2123,0x8d));var _0x3212=function(_0x323b76,_0x236ad3){_0x323b76=_0x323b76-0x0;var _0x298acb=_0x2123[_0x323b76];return _0x298acb;};'use strict';var multer=require(_0x3212('0x0'));var util=require(_0x3212('0x1'));var path=require(_0x3212('0x2'));var timeout=require('connect-timeout');var express=require(_0x3212('0x3'));var router=express['Router']();var fs_extra=require(_0x3212('0x4'));var auth=require(_0x3212('0x5'));var interaction=require(_0x3212('0x6'));var config=require(_0x3212('0x7'));var controller=require(_0x3212('0x8'));router['get'](_0x3212('0x9'),auth[_0x3212('0xa')](),controller[_0x3212('0xb')]);router[_0x3212('0xc')]('/',auth[_0x3212('0xa')](),controller[_0x3212('0xd')]);router[_0x3212('0xe')]('/:id',auth[_0x3212('0xa')](),controller['update']);router['delete'](_0x3212('0x9'),auth[_0x3212('0xa')](),controller[_0x3212('0xf')]);module['exports']=router; \ No newline at end of file +var _0x91b1=['./dashboardItem.controller','get','/:id','isAuthenticated','show','create','put','update','delete','destroy','multer','util','path','connect-timeout','express','fs-extra','../../components/auth/service','../../config/environment'];(function(_0x5b1259,_0x34d729){var _0x454ab4=function(_0x3d4351){while(--_0x3d4351){_0x5b1259['push'](_0x5b1259['shift']());}};_0x454ab4(++_0x34d729);}(_0x91b1,0x9a));var _0x191b=function(_0x3c22e0,_0x1dc6ea){_0x3c22e0=_0x3c22e0-0x0;var _0x215811=_0x91b1[_0x3c22e0];return _0x215811;};'use strict';var multer=require(_0x191b('0x0'));var util=require(_0x191b('0x1'));var path=require(_0x191b('0x2'));var timeout=require(_0x191b('0x3'));var express=require(_0x191b('0x4'));var router=express['Router']();var fs_extra=require(_0x191b('0x5'));var auth=require(_0x191b('0x6'));var interaction=require('../../components/interaction/service');var config=require(_0x191b('0x7'));var controller=require(_0x191b('0x8'));router[_0x191b('0x9')](_0x191b('0xa'),auth[_0x191b('0xb')](),controller[_0x191b('0xc')]);router['post']('/',auth['isAuthenticated'](),controller[_0x191b('0xd')]);router[_0x191b('0xe')](_0x191b('0xa'),auth[_0x191b('0xb')](),controller[_0x191b('0xf')]);router[_0x191b('0x10')](_0x191b('0xa'),auth[_0x191b('0xb')](),controller[_0x191b('0x11')]);module['exports']=router; \ No newline at end of file diff --git a/server/api/disposition/disposition.attributes.js b/server/api/disposition/disposition.attributes.js index b3fdc86..0644598 100644 --- a/server/api/disposition/disposition.attributes.js +++ b/server/api/disposition/disposition.attributes.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x2ed9=['third','sequelize','exports','STRING'];(function(_0x487e24,_0xeb62cf){var _0x542a86=function(_0xaa4487){while(--_0xaa4487){_0x487e24['push'](_0x487e24['shift']());}};_0x542a86(++_0xeb62cf);}(_0x2ed9,0x17d));var _0x92ed=function(_0x5f1cf8,_0x5e0923){_0x5f1cf8=_0x5f1cf8-0x0;var _0x27d0fa=_0x2ed9[_0x5f1cf8];return _0x27d0fa;};'use strict';var Sequelize=require(_0x92ed('0x0'));module[_0x92ed('0x1')]={'name':{'type':Sequelize[_0x92ed('0x2')],'allowNull':![]},'level':{'type':Sequelize['ENUM']('first','second',_0x92ed('0x3')),'allowNull':![],'defaultValue':'first'},'description':{'type':Sequelize[_0x92ed('0x2')]}}; \ No newline at end of file +var _0x4152=['second','first','STRING','ENUM'];(function(_0x537c37,_0x536e74){var _0x241f84=function(_0x3fe709){while(--_0x3fe709){_0x537c37['push'](_0x537c37['shift']());}};_0x241f84(++_0x536e74);}(_0x4152,0xc2));var _0x2415=function(_0x29d6e6,_0x264220){_0x29d6e6=_0x29d6e6-0x0;var _0xc75ff0=_0x4152[_0x29d6e6];return _0xc75ff0;};'use strict';var Sequelize=require('sequelize');module['exports']={'name':{'type':Sequelize[_0x2415('0x0')],'allowNull':![]},'level':{'type':Sequelize[_0x2415('0x1')]('first',_0x2415('0x2'),'third'),'allowNull':![],'defaultValue':_0x2415('0x3')},'description':{'type':Sequelize[_0x2415('0x0')]}}; \ No newline at end of file diff --git a/server/api/disposition/disposition.controller.js b/server/api/disposition/disposition.controller.js index a2af777..ddd88ae 100644 --- a/server/api/disposition/disposition.controller.js +++ b/server/api/disposition/disposition.controller.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x4e06=['hasOwnProperty','nolimit','order','sort','where','pick','filter','merge','VIRTUAL','options','Disposition','includeAll','findAll','rows','catch','include','create','body','user','role','UserProfileSection','userProfileId','autoAssociation','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','find','params','eml-format','rimraf','zip-dir','fast-json-patch','moment','bluebird','mustache','util','path','to-csv','ejs','fs-extra','lodash','squel','crypto','jsforce','desk.js','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/logger','api','../../config/utils','../../config/environment','../../mysqldb','sendStatus','status','json','offset','undefined','limit','count','Content-Range','apply','reject','save','update','destroy','then','get','Dispositions','UserProfileResource','error','name','send','index','map','rawAttributes','fieldName','type','key','model','query','keys','filters','intersection','attributes','fields','length'];(function(_0x2afecf,_0x26f2c4){var _0x2dbd57=function(_0x5b2616){while(--_0x5b2616){_0x2afecf['push'](_0x2afecf['shift']());}};_0x2dbd57(++_0x26f2c4);}(_0x4e06,0x1d2));var _0x64e0=function(_0x1de2da,_0x32cb9e){_0x1de2da=_0x1de2da-0x0;var _0x5b2dc3=_0x4e06[_0x1de2da];return _0x5b2dc3;};'use strict';var emlformat=require(_0x64e0('0x0'));var rimraf=require(_0x64e0('0x1'));var zipdir=require(_0x64e0('0x2'));var jsonpatch=require(_0x64e0('0x3'));var rp=require('request-promise');var moment=require(_0x64e0('0x4'));var BPromise=require(_0x64e0('0x5'));var Mustache=require(_0x64e0('0x6'));var util=require(_0x64e0('0x7'));var path=require(_0x64e0('0x8'));var sox=require('sox');var csv=require(_0x64e0('0x9'));var ejs=require(_0x64e0('0xa'));var fs=require('fs');var fs_extra=require(_0x64e0('0xb'));var _=require(_0x64e0('0xc'));var squel=require(_0x64e0('0xd'));var crypto=require(_0x64e0('0xe'));var jsforce=require(_0x64e0('0xf'));var deskjs=require(_0x64e0('0x10'));var toCsv=require(_0x64e0('0x9'));var querystring=require(_0x64e0('0x11'));var Papa=require(_0x64e0('0x12'));var Redis=require(_0x64e0('0x13'));var authService=require(_0x64e0('0x14'));var qs=require(_0x64e0('0x15'));var as=require(_0x64e0('0x16'));var hardwareService=require('../../config/license/hardware');var logger=require(_0x64e0('0x17'))(_0x64e0('0x18'));var utils=require(_0x64e0('0x19'));var config=require(_0x64e0('0x1a'));var licenseUtil=require('../../config/license/util');var db=require(_0x64e0('0x1b'))['db'];function respondWithStatusCode(_0x438ea3,_0x2b2525){_0x2b2525=_0x2b2525||0xcc;return function(_0x40ad35){if(_0x40ad35){return _0x438ea3[_0x64e0('0x1c')](_0x2b2525);}return _0x438ea3[_0x64e0('0x1d')](_0x2b2525)['end']();};}function respondWithResult(_0x4b04b8,_0x25b854){_0x25b854=_0x25b854||0xc8;return function(_0x566c7e){if(_0x566c7e){return _0x4b04b8[_0x64e0('0x1d')](_0x25b854)[_0x64e0('0x1e')](_0x566c7e);}};}function respondWithFilteredResult(_0x3ffeb5,_0x32fdd4){return function(_0x5bb25e){if(_0x5bb25e){var _0x528693=typeof _0x32fdd4[_0x64e0('0x1f')]===_0x64e0('0x20')&&typeof _0x32fdd4[_0x64e0('0x21')]===_0x64e0('0x20');var _0x19ac5f=_0x5bb25e[_0x64e0('0x22')];var _0x3ad6fb=_0x528693?0x0:_0x32fdd4[_0x64e0('0x1f')];var _0x56a743=_0x528693?_0x5bb25e[_0x64e0('0x22')]:_0x32fdd4[_0x64e0('0x1f')]+_0x32fdd4[_0x64e0('0x21')];var _0x4ccdfd;if(_0x56a743>=_0x19ac5f){_0x56a743=_0x19ac5f;_0x4ccdfd=0xc8;}else{_0x4ccdfd=0xce;}_0x3ffeb5[_0x64e0('0x1d')](_0x4ccdfd);return _0x3ffeb5['set'](_0x64e0('0x23'),_0x3ad6fb+'-'+_0x56a743+'/'+_0x19ac5f)[_0x64e0('0x1e')](_0x5bb25e);}return null;};}function patchUpdates(_0xe1e945){return function(_0x39a915){try{jsonpatch[_0x64e0('0x24')](_0x39a915,_0xe1e945,!![]);}catch(_0x578b14){return BPromise[_0x64e0('0x25')](_0x578b14);}return _0x39a915[_0x64e0('0x26')]();};}function saveUpdates(_0x5a604c,_0xf18fac){return function(_0x4257){if(_0x4257){return _0x4257[_0x64e0('0x27')](_0x5a604c)['then'](function(_0x5bcab5){return _0x5bcab5;});}return null;};}function removeEntity(_0x465844,_0x39a4be){return function(_0x530216){if(_0x530216){return _0x530216[_0x64e0('0x28')]()[_0x64e0('0x29')](function(){var _0x175a02=_0x530216[_0x64e0('0x2a')]({'plain':!![]});var _0x41c5b7=_0x64e0('0x2b');return db[_0x64e0('0x2c')]['destroy']({'where':{'type':_0x41c5b7,'resourceId':_0x175a02['id']}})['then'](function(){return _0x530216;});})[_0x64e0('0x29')](function(){_0x465844[_0x64e0('0x1d')](0xcc)['end']();});}};}function handleEntityNotFound(_0x593e7b,_0x1e8bc0){return function(_0x43aebd){if(!_0x43aebd){_0x593e7b['sendStatus'](0x194);}return _0x43aebd;};}function handleError(_0x5ebb16,_0x29bbab){_0x29bbab=_0x29bbab||0x1f4;return function(_0x385fd2){logger[_0x64e0('0x2d')](_0x385fd2['stack']);if(_0x385fd2['name']){delete _0x385fd2[_0x64e0('0x2e')];}_0x5ebb16[_0x64e0('0x1d')](_0x29bbab)[_0x64e0('0x2f')](_0x385fd2);};}exports[_0x64e0('0x30')]=function(_0x176617,_0x10c622){var _0x2ab576={},_0xef6ed={},_0x418562={'count':0x0,'rows':[]};var _0x83d5e2=_[_0x64e0('0x31')](db['Disposition'][_0x64e0('0x32')],function(_0x141883){return{'name':_0x141883[_0x64e0('0x33')],'type':_0x141883[_0x64e0('0x34')][_0x64e0('0x35')]};});_0xef6ed[_0x64e0('0x36')]=_[_0x64e0('0x31')](_0x83d5e2,_0x64e0('0x2e'));_0xef6ed[_0x64e0('0x37')]=_[_0x64e0('0x38')](_0x176617[_0x64e0('0x37')]);_0xef6ed[_0x64e0('0x39')]=_[_0x64e0('0x3a')](_0xef6ed[_0x64e0('0x36')],_0xef6ed[_0x64e0('0x37')]);_0x2ab576[_0x64e0('0x3b')]=_['intersection'](_0xef6ed[_0x64e0('0x36')],qs[_0x64e0('0x3c')](_0x176617[_0x64e0('0x37')]['fields']));_0x2ab576['attributes']=_0x2ab576['attributes'][_0x64e0('0x3d')]?_0x2ab576['attributes']:_0xef6ed['model'];if(!_0x176617[_0x64e0('0x37')][_0x64e0('0x3e')](_0x64e0('0x3f'))){_0x2ab576[_0x64e0('0x21')]=qs[_0x64e0('0x21')](_0x176617[_0x64e0('0x37')][_0x64e0('0x21')]);_0x2ab576[_0x64e0('0x1f')]=qs[_0x64e0('0x1f')](_0x176617[_0x64e0('0x37')][_0x64e0('0x1f')]);}_0x2ab576[_0x64e0('0x40')]=qs[_0x64e0('0x41')](_0x176617[_0x64e0('0x37')][_0x64e0('0x41')]);_0x2ab576[_0x64e0('0x42')]=qs[_0x64e0('0x39')](_[_0x64e0('0x43')](_0x176617[_0x64e0('0x37')],_0xef6ed[_0x64e0('0x39')]),_0x83d5e2);if(_0x176617[_0x64e0('0x37')][_0x64e0('0x44')]){_0x2ab576[_0x64e0('0x42')]=_[_0x64e0('0x45')](_0x2ab576[_0x64e0('0x42')],{'$or':_[_0x64e0('0x31')](_0x83d5e2,function(_0x43db57){if(_0x43db57[_0x64e0('0x34')]!==_0x64e0('0x46')){var _0xdec233={};_0xdec233[_0x43db57['name']]={'$like':'%'+_0x176617[_0x64e0('0x37')][_0x64e0('0x44')]+'%'};return _0xdec233;}})});}_0x2ab576=_[_0x64e0('0x45')]({},_0x2ab576,_0x176617[_0x64e0('0x47')]);var _0x27abfc={'where':_0x2ab576[_0x64e0('0x42')]};return db[_0x64e0('0x48')][_0x64e0('0x22')](_0x27abfc)[_0x64e0('0x29')](function(_0x294b2e){_0x418562['count']=_0x294b2e;if(_0x176617[_0x64e0('0x37')][_0x64e0('0x49')]){_0x2ab576['include']=[{'all':!![]}];}return db[_0x64e0('0x48')][_0x64e0('0x4a')](_0x2ab576);})[_0x64e0('0x29')](function(_0x1d5ddc){_0x418562[_0x64e0('0x4b')]=_0x1d5ddc;return _0x418562;})[_0x64e0('0x29')](respondWithFilteredResult(_0x10c622,_0x2ab576))[_0x64e0('0x4c')](handleError(_0x10c622,null));};exports['show']=function(_0x5ae0c6,_0x288f48){var _0x44d99e={'raw':!![],'where':{'id':_0x5ae0c6['params']['id']}},_0x41c696={};_0x41c696[_0x64e0('0x36')]=_[_0x64e0('0x38')](db[_0x64e0('0x48')][_0x64e0('0x32')]);_0x41c696[_0x64e0('0x37')]=_['keys'](_0x5ae0c6['query']);_0x41c696[_0x64e0('0x39')]=_[_0x64e0('0x3a')](_0x41c696[_0x64e0('0x36')],_0x41c696[_0x64e0('0x37')]);_0x44d99e[_0x64e0('0x3b')]=_[_0x64e0('0x3a')](_0x41c696[_0x64e0('0x36')],qs[_0x64e0('0x3c')](_0x5ae0c6['query']['fields']));_0x44d99e[_0x64e0('0x3b')]=_0x44d99e[_0x64e0('0x3b')][_0x64e0('0x3d')]?_0x44d99e[_0x64e0('0x3b')]:_0x41c696['model'];if(_0x5ae0c6[_0x64e0('0x37')]['includeAll']){_0x44d99e[_0x64e0('0x4d')]=[{'all':!![]}];}_0x44d99e=_[_0x64e0('0x45')]({},_0x44d99e,_0x5ae0c6[_0x64e0('0x47')]);return db[_0x64e0('0x48')]['find'](_0x44d99e)['then'](handleEntityNotFound(_0x288f48,null))[_0x64e0('0x29')](respondWithResult(_0x288f48,null))[_0x64e0('0x4c')](handleError(_0x288f48,null));};exports['create']=function(_0x33a68a,_0x56433f){return db[_0x64e0('0x48')][_0x64e0('0x4e')](_0x33a68a[_0x64e0('0x4f')],{})[_0x64e0('0x29')](function(_0x39ccf0){var _0xeb8ca9=_0x33a68a[_0x64e0('0x50')]['get']({'plain':!![]});if(!_0xeb8ca9)throw new Error('Unable\x20to\x20retrieve\x20the\x20current\x20user');if(_0xeb8ca9[_0x64e0('0x51')]===_0x64e0('0x50')){var _0x162645=_0x39ccf0['get']({'plain':!![]});var _0x15623d=_0x64e0('0x2b');return db[_0x64e0('0x52')]['find']({'where':{'name':_0x15623d,'userProfileId':_0xeb8ca9[_0x64e0('0x53')]},'raw':!![]})[_0x64e0('0x29')](function(_0x3c9e92){if(_0x3c9e92&&_0x3c9e92[_0x64e0('0x54')]===0x0){return db[_0x64e0('0x2c')][_0x64e0('0x4e')]({'name':_0x162645['name'],'resourceId':_0x162645['id'],'type':_0x3c9e92[_0x64e0('0x2e')],'sectionId':_0x3c9e92['id']},{})[_0x64e0('0x29')](function(){return _0x39ccf0;});}else{return _0x39ccf0;}})[_0x64e0('0x4c')](function(_0x3e5d8c){logger[_0x64e0('0x2d')](_0x64e0('0x55'),_0x3e5d8c);throw _0x3e5d8c;});}return _0x39ccf0;})['then'](respondWithResult(_0x56433f,0xc9))['catch'](handleError(_0x56433f,null));};exports[_0x64e0('0x27')]=function(_0x376483,_0x6f9de6){if(_0x376483['body']['id']){delete _0x376483['body']['id'];}return db[_0x64e0('0x48')][_0x64e0('0x56')]({'where':{'id':_0x376483[_0x64e0('0x57')]['id']}})[_0x64e0('0x29')](handleEntityNotFound(_0x6f9de6,null))['then'](saveUpdates(_0x376483[_0x64e0('0x4f')],null))[_0x64e0('0x29')](respondWithResult(_0x6f9de6,null))[_0x64e0('0x4c')](handleError(_0x6f9de6,null));};exports[_0x64e0('0x28')]=function(_0x5b9c5b,_0x2a8403){return db['Disposition'][_0x64e0('0x56')]({'where':{'id':_0x5b9c5b[_0x64e0('0x57')]['id']}})[_0x64e0('0x29')](handleEntityNotFound(_0x2a8403,null))[_0x64e0('0x29')](removeEntity(_0x2a8403,null))['catch'](handleError(_0x2a8403,null));}; \ No newline at end of file +var _0x4e0a=['count','limit','set','apply','reject','save','update','then','destroy','get','Dispositions','UserProfileResource','sendStatus','error','name','send','index','Disposition','fieldName','type','key','model','map','query','filters','attributes','fields','length','hasOwnProperty','nolimit','order','where','pick','merge','VIRTUAL','filter','options','includeAll','include','findAll','rows','show','keys','intersection','catch','create','body','user','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','find','userProfileId','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','params','eml-format','zip-dir','fast-json-patch','moment','bluebird','mustache','util','path','sox','to-csv','ejs','fs-extra','lodash','crypto','jsforce','desk.js','querystring','papaparse','ioredis','../../config/license/hardware','../../config/logger','api','../../config/environment','../../config/license/util','../../mysqldb','status','json','offset','undefined'];(function(_0x17ca37,_0x166d72){var _0x108251=function(_0x2ef26f){while(--_0x2ef26f){_0x17ca37['push'](_0x17ca37['shift']());}};_0x108251(++_0x166d72);}(_0x4e0a,0x1d5));var _0xa4e0=function(_0x3b3750,_0x28f3b8){_0x3b3750=_0x3b3750-0x0;var _0x1b9e8b=_0x4e0a[_0x3b3750];return _0x1b9e8b;};'use strict';var emlformat=require(_0xa4e0('0x0'));var rimraf=require('rimraf');var zipdir=require(_0xa4e0('0x1'));var jsonpatch=require(_0xa4e0('0x2'));var rp=require('request-promise');var moment=require(_0xa4e0('0x3'));var BPromise=require(_0xa4e0('0x4'));var Mustache=require(_0xa4e0('0x5'));var util=require(_0xa4e0('0x6'));var path=require(_0xa4e0('0x7'));var sox=require(_0xa4e0('0x8'));var csv=require(_0xa4e0('0x9'));var ejs=require(_0xa4e0('0xa'));var fs=require('fs');var fs_extra=require(_0xa4e0('0xb'));var _=require(_0xa4e0('0xc'));var squel=require('squel');var crypto=require(_0xa4e0('0xd'));var jsforce=require(_0xa4e0('0xe'));var deskjs=require(_0xa4e0('0xf'));var toCsv=require(_0xa4e0('0x9'));var querystring=require(_0xa4e0('0x10'));var Papa=require(_0xa4e0('0x11'));var Redis=require(_0xa4e0('0x12'));var authService=require('../../components/auth/service');var qs=require('../../components/parsers/qs');var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0xa4e0('0x13'));var logger=require(_0xa4e0('0x14'))(_0xa4e0('0x15'));var utils=require('../../config/utils');var config=require(_0xa4e0('0x16'));var licenseUtil=require(_0xa4e0('0x17'));var db=require(_0xa4e0('0x18'))['db'];function respondWithStatusCode(_0x27a67b,_0x53d161){_0x53d161=_0x53d161||0xcc;return function(_0x12d6a3){if(_0x12d6a3){return _0x27a67b['sendStatus'](_0x53d161);}return _0x27a67b[_0xa4e0('0x19')](_0x53d161)['end']();};}function respondWithResult(_0xb28909,_0x33eaf2){_0x33eaf2=_0x33eaf2||0xc8;return function(_0x479626){if(_0x479626){return _0xb28909[_0xa4e0('0x19')](_0x33eaf2)[_0xa4e0('0x1a')](_0x479626);}};}function respondWithFilteredResult(_0x41063e,_0x49dff5){return function(_0x45eb0b){if(_0x45eb0b){var _0x1ac342=typeof _0x49dff5[_0xa4e0('0x1b')]===_0xa4e0('0x1c')&&typeof _0x49dff5['limit']===_0xa4e0('0x1c');var _0x3fe829=_0x45eb0b[_0xa4e0('0x1d')];var _0x322849=_0x1ac342?0x0:_0x49dff5[_0xa4e0('0x1b')];var _0x2a7833=_0x1ac342?_0x45eb0b[_0xa4e0('0x1d')]:_0x49dff5['offset']+_0x49dff5[_0xa4e0('0x1e')];var _0x226556;if(_0x2a7833>=_0x3fe829){_0x2a7833=_0x3fe829;_0x226556=0xc8;}else{_0x226556=0xce;}_0x41063e['status'](_0x226556);return _0x41063e[_0xa4e0('0x1f')]('Content-Range',_0x322849+'-'+_0x2a7833+'/'+_0x3fe829)[_0xa4e0('0x1a')](_0x45eb0b);}return null;};}function patchUpdates(_0x502d55){return function(_0x2877a7){try{jsonpatch[_0xa4e0('0x20')](_0x2877a7,_0x502d55,!![]);}catch(_0x22a6d6){return BPromise[_0xa4e0('0x21')](_0x22a6d6);}return _0x2877a7[_0xa4e0('0x22')]();};}function saveUpdates(_0x4f643f,_0x16afba){return function(_0x403a81){if(_0x403a81){return _0x403a81[_0xa4e0('0x23')](_0x4f643f)[_0xa4e0('0x24')](function(_0x3d94d5){return _0x3d94d5;});}return null;};}function removeEntity(_0x5cce83,_0x44f31e){return function(_0x32b9fa){if(_0x32b9fa){return _0x32b9fa[_0xa4e0('0x25')]()['then'](function(){var _0x1af0ce=_0x32b9fa[_0xa4e0('0x26')]({'plain':!![]});var _0x5140f4=_0xa4e0('0x27');return db[_0xa4e0('0x28')][_0xa4e0('0x25')]({'where':{'type':_0x5140f4,'resourceId':_0x1af0ce['id']}})[_0xa4e0('0x24')](function(){return _0x32b9fa;});})[_0xa4e0('0x24')](function(){_0x5cce83[_0xa4e0('0x19')](0xcc)['end']();});}};}function handleEntityNotFound(_0x6c2ed7,_0x47b1fa){return function(_0x51a19a){if(!_0x51a19a){_0x6c2ed7[_0xa4e0('0x29')](0x194);}return _0x51a19a;};}function handleError(_0x330801,_0x5631bf){_0x5631bf=_0x5631bf||0x1f4;return function(_0x385ad8){logger[_0xa4e0('0x2a')](_0x385ad8['stack']);if(_0x385ad8[_0xa4e0('0x2b')]){delete _0x385ad8['name'];}_0x330801[_0xa4e0('0x19')](_0x5631bf)[_0xa4e0('0x2c')](_0x385ad8);};}exports[_0xa4e0('0x2d')]=function(_0xbde07b,_0x7f5707){var _0x2562ba={},_0x3bfb11={},_0x4093d9={'count':0x0,'rows':[]};var _0x56779b=_['map'](db[_0xa4e0('0x2e')]['rawAttributes'],function(_0x4509b7){return{'name':_0x4509b7[_0xa4e0('0x2f')],'type':_0x4509b7[_0xa4e0('0x30')][_0xa4e0('0x31')]};});_0x3bfb11[_0xa4e0('0x32')]=_[_0xa4e0('0x33')](_0x56779b,_0xa4e0('0x2b'));_0x3bfb11[_0xa4e0('0x34')]=_['keys'](_0xbde07b[_0xa4e0('0x34')]);_0x3bfb11[_0xa4e0('0x35')]=_['intersection'](_0x3bfb11[_0xa4e0('0x32')],_0x3bfb11[_0xa4e0('0x34')]);_0x2562ba[_0xa4e0('0x36')]=_['intersection'](_0x3bfb11['model'],qs['fields'](_0xbde07b[_0xa4e0('0x34')][_0xa4e0('0x37')]));_0x2562ba[_0xa4e0('0x36')]=_0x2562ba[_0xa4e0('0x36')][_0xa4e0('0x38')]?_0x2562ba[_0xa4e0('0x36')]:_0x3bfb11['model'];if(!_0xbde07b[_0xa4e0('0x34')][_0xa4e0('0x39')](_0xa4e0('0x3a'))){_0x2562ba[_0xa4e0('0x1e')]=qs[_0xa4e0('0x1e')](_0xbde07b[_0xa4e0('0x34')]['limit']);_0x2562ba[_0xa4e0('0x1b')]=qs['offset'](_0xbde07b[_0xa4e0('0x34')]['offset']);}_0x2562ba[_0xa4e0('0x3b')]=qs['sort'](_0xbde07b[_0xa4e0('0x34')]['sort']);_0x2562ba[_0xa4e0('0x3c')]=qs[_0xa4e0('0x35')](_[_0xa4e0('0x3d')](_0xbde07b[_0xa4e0('0x34')],_0x3bfb11[_0xa4e0('0x35')]),_0x56779b);if(_0xbde07b[_0xa4e0('0x34')]['filter']){_0x2562ba[_0xa4e0('0x3c')]=_[_0xa4e0('0x3e')](_0x2562ba[_0xa4e0('0x3c')],{'$or':_[_0xa4e0('0x33')](_0x56779b,function(_0xdb56c4){if(_0xdb56c4['type']!==_0xa4e0('0x3f')){var _0x278de8={};_0x278de8[_0xdb56c4[_0xa4e0('0x2b')]]={'$like':'%'+_0xbde07b[_0xa4e0('0x34')][_0xa4e0('0x40')]+'%'};return _0x278de8;}})});}_0x2562ba=_[_0xa4e0('0x3e')]({},_0x2562ba,_0xbde07b[_0xa4e0('0x41')]);var _0xa5a4ff={'where':_0x2562ba['where']};return db[_0xa4e0('0x2e')][_0xa4e0('0x1d')](_0xa5a4ff)[_0xa4e0('0x24')](function(_0x3b1cec){_0x4093d9[_0xa4e0('0x1d')]=_0x3b1cec;if(_0xbde07b['query'][_0xa4e0('0x42')]){_0x2562ba[_0xa4e0('0x43')]=[{'all':!![]}];}return db[_0xa4e0('0x2e')][_0xa4e0('0x44')](_0x2562ba);})[_0xa4e0('0x24')](function(_0xd73857){_0x4093d9[_0xa4e0('0x45')]=_0xd73857;return _0x4093d9;})[_0xa4e0('0x24')](respondWithFilteredResult(_0x7f5707,_0x2562ba))['catch'](handleError(_0x7f5707,null));};exports[_0xa4e0('0x46')]=function(_0x270f15,_0xc1796e){var _0x4c459a={'raw':!![],'where':{'id':_0x270f15['params']['id']}},_0x253fa5={};_0x253fa5[_0xa4e0('0x32')]=_[_0xa4e0('0x47')](db[_0xa4e0('0x2e')]['rawAttributes']);_0x253fa5[_0xa4e0('0x34')]=_[_0xa4e0('0x47')](_0x270f15[_0xa4e0('0x34')]);_0x253fa5[_0xa4e0('0x35')]=_[_0xa4e0('0x48')](_0x253fa5[_0xa4e0('0x32')],_0x253fa5[_0xa4e0('0x34')]);_0x4c459a[_0xa4e0('0x36')]=_[_0xa4e0('0x48')](_0x253fa5[_0xa4e0('0x32')],qs[_0xa4e0('0x37')](_0x270f15[_0xa4e0('0x34')][_0xa4e0('0x37')]));_0x4c459a[_0xa4e0('0x36')]=_0x4c459a['attributes'][_0xa4e0('0x38')]?_0x4c459a['attributes']:_0x253fa5['model'];if(_0x270f15[_0xa4e0('0x34')]['includeAll']){_0x4c459a[_0xa4e0('0x43')]=[{'all':!![]}];}_0x4c459a=_[_0xa4e0('0x3e')]({},_0x4c459a,_0x270f15[_0xa4e0('0x41')]);return db['Disposition']['find'](_0x4c459a)[_0xa4e0('0x24')](handleEntityNotFound(_0xc1796e,null))[_0xa4e0('0x24')](respondWithResult(_0xc1796e,null))[_0xa4e0('0x49')](handleError(_0xc1796e,null));};exports[_0xa4e0('0x4a')]=function(_0x39a020,_0x32ee47){return db[_0xa4e0('0x2e')][_0xa4e0('0x4a')](_0x39a020[_0xa4e0('0x4b')],{})[_0xa4e0('0x24')](function(_0xd5fac4){var _0x5bb71e=_0x39a020[_0xa4e0('0x4c')][_0xa4e0('0x26')]({'plain':!![]});if(!_0x5bb71e)throw new Error(_0xa4e0('0x4d'));if(_0x5bb71e[_0xa4e0('0x4e')]===_0xa4e0('0x4c')){var _0x23f8f4=_0xd5fac4['get']({'plain':!![]});var _0x7441f4=_0xa4e0('0x27');return db['UserProfileSection'][_0xa4e0('0x4f')]({'where':{'name':_0x7441f4,'userProfileId':_0x5bb71e[_0xa4e0('0x50')]},'raw':!![]})[_0xa4e0('0x24')](function(_0x4c468d){if(_0x4c468d&&_0x4c468d['autoAssociation']===0x0){return db[_0xa4e0('0x28')][_0xa4e0('0x4a')]({'name':_0x23f8f4[_0xa4e0('0x2b')],'resourceId':_0x23f8f4['id'],'type':_0x4c468d['name'],'sectionId':_0x4c468d['id']},{})[_0xa4e0('0x24')](function(){return _0xd5fac4;});}else{return _0xd5fac4;}})[_0xa4e0('0x49')](function(_0x431272){logger[_0xa4e0('0x2a')](_0xa4e0('0x51'),_0x431272);throw _0x431272;});}return _0xd5fac4;})['then'](respondWithResult(_0x32ee47,0xc9))[_0xa4e0('0x49')](handleError(_0x32ee47,null));};exports['update']=function(_0xd173e2,_0x886ef0){if(_0xd173e2[_0xa4e0('0x4b')]['id']){delete _0xd173e2['body']['id'];}return db['Disposition'][_0xa4e0('0x4f')]({'where':{'id':_0xd173e2[_0xa4e0('0x52')]['id']}})[_0xa4e0('0x24')](handleEntityNotFound(_0x886ef0,null))[_0xa4e0('0x24')](saveUpdates(_0xd173e2[_0xa4e0('0x4b')],null))[_0xa4e0('0x24')](respondWithResult(_0x886ef0,null))[_0xa4e0('0x49')](handleError(_0x886ef0,null));};exports[_0xa4e0('0x25')]=function(_0x43a147,_0x3315ae){return db[_0xa4e0('0x2e')][_0xa4e0('0x4f')]({'where':{'id':_0x43a147['params']['id']}})[_0xa4e0('0x24')](handleEntityNotFound(_0x3315ae,null))[_0xa4e0('0x24')](removeEntity(_0x3315ae,null))[_0xa4e0('0x49')](handleError(_0x3315ae,null));}; \ No newline at end of file diff --git a/server/api/disposition/disposition.model.js b/server/api/disposition/disposition.model.js index 767ef59..17204cd 100644 --- a/server/api/disposition/disposition.model.js +++ b/server/api/disposition/disposition.model.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x204c=['tools_dispositions','name_voice','name','ChatWebsiteId','name_mail','name_sms','FaxAccountId','name_openchannel','name_whatsapp','WhatsappAccountId','lodash','../../config/logger','api','bluebird','request-promise','./disposition.attributes','exports','Disposition'];(function(_0x9dabbc,_0x24e497){var _0x4faff5=function(_0x26a73a){while(--_0x26a73a){_0x9dabbc['push'](_0x9dabbc['shift']());}};_0x4faff5(++_0x24e497);}(_0x204c,0x118));var _0xc204=function(_0x13ec8e,_0x170a63){_0x13ec8e=_0x13ec8e-0x0;var _0xe266ea=_0x204c[_0x13ec8e];return _0xe266ea;};'use strict';var _=require(_0xc204('0x0'));var util=require('util');var logger=require(_0xc204('0x1'))(_0xc204('0x2'));var moment=require('moment');var BPromise=require(_0xc204('0x3'));var rp=require(_0xc204('0x4'));var fs=require('fs');var path=require('path');var rimraf=require('rimraf');var config=require('../../config/environment');var attributes=require(_0xc204('0x5'));module[_0xc204('0x6')]=function(_0x4b0c92,_0x1ad79b){return _0x4b0c92['define'](_0xc204('0x7'),attributes,{'tableName':_0xc204('0x8'),'paranoid':![],'indexes':[{'unique':!![],'name':_0xc204('0x9'),'fields':[_0xc204('0xa'),'ListId']},{'unique':!![],'name':'name_chat','fields':[_0xc204('0xa'),_0xc204('0xb')]},{'unique':!![],'name':_0xc204('0xc'),'fields':[_0xc204('0xa'),'MailAccountId']},{'unique':!![],'name':_0xc204('0xd'),'fields':[_0xc204('0xa'),'SmsAccountId']},{'unique':!![],'name':'name_fax','fields':[_0xc204('0xa'),_0xc204('0xe')]},{'unique':!![],'name':_0xc204('0xf'),'fields':[_0xc204('0xa'),'OpenchannelAccountId']},{'unique':!![],'name':_0xc204('0x10'),'fields':[_0xc204('0xa'),_0xc204('0x11')]}],'timestamps':!![]});}; \ No newline at end of file +var _0xc6a6=['name_fax','FaxAccountId','name_openchannel','OpenchannelAccountId','name_whatsapp','WhatsappAccountId','util','../../config/logger','api','moment','bluebird','request-promise','path','rimraf','../../config/environment','./disposition.attributes','exports','Disposition','tools_dispositions','name_voice','ListId','name_chat','name_mail','name','MailAccountId','name_sms','SmsAccountId'];(function(_0x948d60,_0x39ac9c){var _0xadb386=function(_0x2987d7){while(--_0x2987d7){_0x948d60['push'](_0x948d60['shift']());}};_0xadb386(++_0x39ac9c);}(_0xc6a6,0x12f));var _0x6c6a=function(_0x5fb087,_0x13455f){_0x5fb087=_0x5fb087-0x0;var _0x326517=_0xc6a6[_0x5fb087];return _0x326517;};'use strict';var _=require('lodash');var util=require(_0x6c6a('0x0'));var logger=require(_0x6c6a('0x1'))(_0x6c6a('0x2'));var moment=require(_0x6c6a('0x3'));var BPromise=require(_0x6c6a('0x4'));var rp=require(_0x6c6a('0x5'));var fs=require('fs');var path=require(_0x6c6a('0x6'));var rimraf=require(_0x6c6a('0x7'));var config=require(_0x6c6a('0x8'));var attributes=require(_0x6c6a('0x9'));module[_0x6c6a('0xa')]=function(_0x4db5c8,_0x1301fb){return _0x4db5c8['define'](_0x6c6a('0xb'),attributes,{'tableName':_0x6c6a('0xc'),'paranoid':![],'indexes':[{'unique':!![],'name':_0x6c6a('0xd'),'fields':['name',_0x6c6a('0xe')]},{'unique':!![],'name':_0x6c6a('0xf'),'fields':['name','ChatWebsiteId']},{'unique':!![],'name':_0x6c6a('0x10'),'fields':[_0x6c6a('0x11'),_0x6c6a('0x12')]},{'unique':!![],'name':_0x6c6a('0x13'),'fields':[_0x6c6a('0x11'),_0x6c6a('0x14')]},{'unique':!![],'name':_0x6c6a('0x15'),'fields':[_0x6c6a('0x11'),_0x6c6a('0x16')]},{'unique':!![],'name':_0x6c6a('0x17'),'fields':['name',_0x6c6a('0x18')]},{'unique':!![],'name':_0x6c6a('0x19'),'fields':[_0x6c6a('0x11'),_0x6c6a('0x1a')]}],'timestamps':!![]});}; \ No newline at end of file diff --git a/server/api/disposition/disposition.rpc.js b/server/api/disposition/disposition.rpc.js index 953acfb..e59376c 100644 --- a/server/api/disposition/disposition.rpc.js +++ b/server/api/disposition/disposition.rpc.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xa9e0=['http','info','Disposition,\x20%s,\x20%s','request\x20sent','debug','Disposition,\x20%s,\x20%s,\x20%s','code','error','message','result','catch','lodash','util','moment','ioredis','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise'];(function(_0x494b6c,_0x3de788){var _0x5e3e58=function(_0x3277b4){while(--_0x3277b4){_0x494b6c['push'](_0x494b6c['shift']());}};_0x5e3e58(++_0x3de788);}(_0xa9e0,0x123));var _0x0a9e=function(_0x387777,_0x356171){_0x387777=_0x387777-0x0;var _0x3f84c0=_0xa9e0[_0x387777];return _0x3f84c0;};'use strict';var _=require(_0x0a9e('0x0'));var util=require(_0x0a9e('0x1'));var moment=require(_0x0a9e('0x2'));var BPromise=require('bluebird');var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x0a9e('0x3'));var db=require('../../mysqldb')['db'];var utils=require(_0x0a9e('0x4'));var logger=require(_0x0a9e('0x5'))(_0x0a9e('0x6'));var config=require(_0x0a9e('0x7'));var jayson=require(_0x0a9e('0x8'));var client=jayson['client'][_0x0a9e('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x441e3a,_0x2cc193,_0x5f41ea){return new BPromise(function(_0x503809,_0xe42b77){return client['request'](_0x441e3a,_0x5f41ea)['then'](function(_0x39753a){logger[_0x0a9e('0xa')](_0x0a9e('0xb'),_0x2cc193,_0x0a9e('0xc'));logger[_0x0a9e('0xd')](_0x0a9e('0xe'),_0x2cc193,'request\x20sent',JSON['stringify'](_0x39753a));if(_0x39753a['error']){if(_0x39753a['error'][_0x0a9e('0xf')]===0x1f4){logger[_0x0a9e('0x10')](_0x0a9e('0xb'),_0x2cc193,_0x39753a[_0x0a9e('0x10')][_0x0a9e('0x11')]);return _0xe42b77(_0x39753a[_0x0a9e('0x10')]['message']);}logger[_0x0a9e('0x10')](_0x0a9e('0xb'),_0x2cc193,_0x39753a[_0x0a9e('0x10')][_0x0a9e('0x11')]);return _0x503809(_0x39753a[_0x0a9e('0x10')][_0x0a9e('0x11')]);}else{logger['info'](_0x0a9e('0xb'),_0x2cc193,'request\x20sent');_0x503809(_0x39753a[_0x0a9e('0x12')]['message']);}})[_0x0a9e('0x13')](function(_0x12066b){logger['error'](_0x0a9e('0xb'),_0x2cc193,_0x12066b);_0xe42b77(_0x12066b);});});} \ No newline at end of file +var _0xa9e0=['http','info','Disposition,\x20%s,\x20%s','request\x20sent','debug','Disposition,\x20%s,\x20%s,\x20%s','code','error','message','result','catch','lodash','util','moment','ioredis','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise'];(function(_0x2c7373,_0x58496d){var _0x3407d1=function(_0x245ada){while(--_0x245ada){_0x2c7373['push'](_0x2c7373['shift']());}};_0x3407d1(++_0x58496d);}(_0xa9e0,0x123));var _0x0a9e=function(_0x13ea00,_0x12f610){_0x13ea00=_0x13ea00-0x0;var _0x1f7347=_0xa9e0[_0x13ea00];return _0x1f7347;};'use strict';var _=require(_0x0a9e('0x0'));var util=require(_0x0a9e('0x1'));var moment=require(_0x0a9e('0x2'));var BPromise=require('bluebird');var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x0a9e('0x3'));var db=require('../../mysqldb')['db'];var utils=require(_0x0a9e('0x4'));var logger=require(_0x0a9e('0x5'))(_0x0a9e('0x6'));var config=require(_0x0a9e('0x7'));var jayson=require(_0x0a9e('0x8'));var client=jayson['client'][_0x0a9e('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x441e3a,_0x2cc193,_0x5f41ea){return new BPromise(function(_0x503809,_0xe42b77){return client['request'](_0x441e3a,_0x5f41ea)['then'](function(_0x39753a){logger[_0x0a9e('0xa')](_0x0a9e('0xb'),_0x2cc193,_0x0a9e('0xc'));logger[_0x0a9e('0xd')](_0x0a9e('0xe'),_0x2cc193,'request\x20sent',JSON['stringify'](_0x39753a));if(_0x39753a['error']){if(_0x39753a['error'][_0x0a9e('0xf')]===0x1f4){logger[_0x0a9e('0x10')](_0x0a9e('0xb'),_0x2cc193,_0x39753a[_0x0a9e('0x10')][_0x0a9e('0x11')]);return _0xe42b77(_0x39753a[_0x0a9e('0x10')]['message']);}logger[_0x0a9e('0x10')](_0x0a9e('0xb'),_0x2cc193,_0x39753a[_0x0a9e('0x10')][_0x0a9e('0x11')]);return _0x503809(_0x39753a[_0x0a9e('0x10')][_0x0a9e('0x11')]);}else{logger['info'](_0x0a9e('0xb'),_0x2cc193,'request\x20sent');_0x503809(_0x39753a[_0x0a9e('0x12')]['message']);}})[_0x0a9e('0x13')](function(_0x12066b){logger['error'](_0x0a9e('0xb'),_0x2cc193,_0x12066b);_0xe42b77(_0x12066b);});});} \ No newline at end of file diff --git a/server/api/disposition/index.js b/server/api/disposition/index.js index 8226b50..5619cf6 100644 --- a/server/api/disposition/index.js +++ b/server/api/disposition/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x4e4b=['delete','destroy','exports','util','connect-timeout','express','Router','fs-extra','../../components/auth/service','../../components/interaction/service','./disposition.controller','isAuthenticated','index','/:id','show','post','create','put'];(function(_0x480ced,_0x4b4377){var _0x576d92=function(_0x34076d){while(--_0x34076d){_0x480ced['push'](_0x480ced['shift']());}};_0x576d92(++_0x4b4377);}(_0x4e4b,0xc9));var _0xb4e4=function(_0x525c7b,_0x488fcc){_0x525c7b=_0x525c7b-0x0;var _0x27b33e=_0x4e4b[_0x525c7b];return _0x27b33e;};'use strict';var multer=require('multer');var util=require(_0xb4e4('0x0'));var path=require('path');var timeout=require(_0xb4e4('0x1'));var express=require(_0xb4e4('0x2'));var router=express[_0xb4e4('0x3')]();var fs_extra=require(_0xb4e4('0x4'));var auth=require(_0xb4e4('0x5'));var interaction=require(_0xb4e4('0x6'));var config=require('../../config/environment');var controller=require(_0xb4e4('0x7'));router['get']('/',auth[_0xb4e4('0x8')](),controller[_0xb4e4('0x9')]);router['get'](_0xb4e4('0xa'),auth[_0xb4e4('0x8')](),controller[_0xb4e4('0xb')]);router[_0xb4e4('0xc')]('/',auth[_0xb4e4('0x8')](),controller[_0xb4e4('0xd')]);router[_0xb4e4('0xe')](_0xb4e4('0xa'),auth[_0xb4e4('0x8')](),controller['update']);router[_0xb4e4('0xf')](_0xb4e4('0xa'),auth['isAuthenticated'](),controller[_0xb4e4('0x10')]);module[_0xb4e4('0x11')]=router; \ No newline at end of file +var _0x3219=['put','destroy','multer','util','path','Router','fs-extra','../../components/interaction/service','../../config/environment','get','isAuthenticated','index','/:id'];(function(_0x3f6135,_0x474672){var _0x433816=function(_0x5cf9c6){while(--_0x5cf9c6){_0x3f6135['push'](_0x3f6135['shift']());}};_0x433816(++_0x474672);}(_0x3219,0x9e));var _0x9321=function(_0x2f31d0,_0x4fce9a){_0x2f31d0=_0x2f31d0-0x0;var _0x1d0256=_0x3219[_0x2f31d0];return _0x1d0256;};'use strict';var multer=require(_0x9321('0x0'));var util=require(_0x9321('0x1'));var path=require(_0x9321('0x2'));var timeout=require('connect-timeout');var express=require('express');var router=express[_0x9321('0x3')]();var fs_extra=require(_0x9321('0x4'));var auth=require('../../components/auth/service');var interaction=require(_0x9321('0x5'));var config=require(_0x9321('0x6'));var controller=require('./disposition.controller');router[_0x9321('0x7')]('/',auth[_0x9321('0x8')](),controller[_0x9321('0x9')]);router['get'](_0x9321('0xa'),auth[_0x9321('0x8')](),controller['show']);router['post']('/',auth['isAuthenticated'](),controller['create']);router[_0x9321('0xb')](_0x9321('0xa'),auth[_0x9321('0x8')](),controller['update']);router['delete']('/:id',auth['isAuthenticated'](),controller[_0x9321('0xc')]);module['exports']=router; \ No newline at end of file diff --git a/server/api/faxAccount/faxAccount.attributes.js b/server/api/faxAccount/faxAccount.attributes.js index fd8b824..412979a 100644 --- a/server/api/faxAccount/faxAccount.attributes.js +++ b/server/api/faxAccount/faxAccount.attributes.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x6110=['sequelize','exports','STRING','ENUM','yes','xCALLY\x20Motion\x20Fax','localstationid','4800','12000','14400','2400','7200','9600','v17,v27,v29','INTEGER','KHOMP','SIP','TEXT','Account:\x20{{account.name}}
{{#queue}}Queue:\x20{{queue.name}}
{{/queue}}From\x20:\x20{{from}}','BOOLEAN','Enabled/disables\x20mandatory\x20dispo\x20on\x20a\x20queue','setDataValue','mandatoryDispositionPauseId'];(function(_0x40220a,_0x22feb1){var _0x3903cc=function(_0x33a296){while(--_0x33a296){_0x40220a['push'](_0x40220a['shift']());}};_0x3903cc(++_0x22feb1);}(_0x6110,0x12b));var _0x0611=function(_0x30839a,_0x6cd6f4){_0x30839a=_0x30839a-0x0;var _0x21ab5b=_0x6110[_0x30839a];return _0x21ab5b;};'use strict';var Sequelize=require(_0x0611('0x0'));module[_0x0611('0x1')]={'name':{'type':Sequelize[_0x0611('0x2')],'allowNull':![],'validate':{'notEmpty':!![]}},'description':{'type':Sequelize[_0x0611('0x2')]},'ecm':{'type':Sequelize[_0x0611('0x3')](_0x0611('0x4'),'no'),'defaultValue':'yes'},'headerinfo':{'type':Sequelize['STRING'],'defaultValue':_0x0611('0x5')},'localstationid':{'type':Sequelize[_0x0611('0x2')],'unique':_0x0611('0x6')},'minrate':{'type':Sequelize[_0x0611('0x3')]('2400',_0x0611('0x7'),'7200','9600',_0x0611('0x8'),_0x0611('0x9')),'defaultValue':_0x0611('0x7')},'maxrate':{'type':Sequelize[_0x0611('0x3')](_0x0611('0xa'),_0x0611('0x7'),_0x0611('0xb'),_0x0611('0xc'),_0x0611('0x8'),'14400'),'defaultValue':'14400'},'modem':{'type':Sequelize[_0x0611('0x2')],'defaultValue':_0x0611('0xd')},'gateway':{'type':Sequelize['STRING'],'defaultValue':'no','validate':{'is':/^(?:yes|no|[0-9]+)$/}},'faxdetect':{'type':Sequelize['STRING'],'defaultValue':'no','validate':{'is':/^(?:yes|no|t38|cng|[0-9]+)$/}},'t38timeout':{'type':Sequelize[_0x0611('0xe')],'defaultValue':0x1388,'validate':{'min':0x3e8}},'tech':{'type':Sequelize[_0x0611('0x3')]('SIP','IAX','DADHI',_0x0611('0xf')),'defaultValue':_0x0611('0x10')},'key':{'type':Sequelize[_0x0611('0x2')],'allowNull':![]},'notificationTemplate':{'type':Sequelize[_0x0611('0x11')],'defaultValue':function(){return _0x0611('0x12');}},'notificationSound':{'type':Sequelize[_0x0611('0x13')],'defaultValue':!![]},'notificationShake':{'type':Sequelize[_0x0611('0x13')],'defaultValue':![]},'waitForTheAssignedAgent':{'type':Sequelize[_0x0611('0xe')],'validate':{'min':0x1,'max':0x20c49b},'defaultValue':0xa},'queueTransfer':{'type':Sequelize[_0x0611('0x13')],'defaultValue':![]},'queueTransferTimeout':{'type':Sequelize['INTEGER'],'validate':{'min':0x1,'max':0x20c49b},'defaultValue':0x12c},'agentTransfer':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'agentTransferTimeout':{'type':Sequelize[_0x0611('0xe')],'validate':{'min':0x1,'max':0x20c49b},'defaultValue':0x12c},'mandatoryDispositionPauseId':{'type':Sequelize[_0x0611('0xe')],'allowNull':!![],'defaultValue':null,'comment':'Status\x20to\x20put\x20when\x20mandatory\x20disposition\x20is\x20enabled'},'mandatoryDisposition':{'type':Sequelize[_0x0611('0x13')],'defaultValue':![],'comment':_0x0611('0x14'),'set':function(_0x17c8db){if(!_0x17c8db)this[_0x0611('0x15')](_0x0611('0x16'),null);this[_0x0611('0x15')]('mandatoryDisposition',_0x17c8db);}}}; \ No newline at end of file +var _0x1aad=['ENUM','yes','localstationid','4800','9600','12000','14400','7200','INTEGER','SIP','IAX','DADHI','KHOMP','TEXT','Account:\x20{{account.name}}
{{#queue}}Queue:\x20{{queue.name}}
{{/queue}}From\x20:\x20{{from}}','BOOLEAN','Status\x20to\x20put\x20when\x20mandatory\x20disposition\x20is\x20enabled','Enabled/disables\x20mandatory\x20dispo\x20on\x20a\x20queue','setDataValue','mandatoryDisposition','sequelize','exports','STRING'];(function(_0x16585a,_0x325dfb){var _0x240a97=function(_0x88174a){while(--_0x88174a){_0x16585a['push'](_0x16585a['shift']());}};_0x240a97(++_0x325dfb);}(_0x1aad,0x13f));var _0xd1aa=function(_0x25f8e8,_0x519d8e){_0x25f8e8=_0x25f8e8-0x0;var _0x1df02c=_0x1aad[_0x25f8e8];return _0x1df02c;};'use strict';var Sequelize=require(_0xd1aa('0x0'));module[_0xd1aa('0x1')]={'name':{'type':Sequelize[_0xd1aa('0x2')],'allowNull':![],'validate':{'notEmpty':!![]}},'description':{'type':Sequelize['STRING']},'ecm':{'type':Sequelize[_0xd1aa('0x3')](_0xd1aa('0x4'),'no'),'defaultValue':_0xd1aa('0x4')},'headerinfo':{'type':Sequelize[_0xd1aa('0x2')],'defaultValue':'xCALLY\x20Motion\x20Fax'},'localstationid':{'type':Sequelize[_0xd1aa('0x2')],'unique':_0xd1aa('0x5')},'minrate':{'type':Sequelize[_0xd1aa('0x3')]('2400',_0xd1aa('0x6'),'7200',_0xd1aa('0x7'),_0xd1aa('0x8'),_0xd1aa('0x9')),'defaultValue':_0xd1aa('0x6')},'maxrate':{'type':Sequelize['ENUM']('2400','4800',_0xd1aa('0xa'),'9600',_0xd1aa('0x8'),'14400'),'defaultValue':_0xd1aa('0x9')},'modem':{'type':Sequelize[_0xd1aa('0x2')],'defaultValue':'v17,v27,v29'},'gateway':{'type':Sequelize['STRING'],'defaultValue':'no','validate':{'is':/^(?:yes|no|[0-9]+)$/}},'faxdetect':{'type':Sequelize[_0xd1aa('0x2')],'defaultValue':'no','validate':{'is':/^(?:yes|no|t38|cng|[0-9]+)$/}},'t38timeout':{'type':Sequelize[_0xd1aa('0xb')],'defaultValue':0x1388,'validate':{'min':0x3e8}},'tech':{'type':Sequelize[_0xd1aa('0x3')](_0xd1aa('0xc'),_0xd1aa('0xd'),_0xd1aa('0xe'),_0xd1aa('0xf')),'defaultValue':_0xd1aa('0xc')},'key':{'type':Sequelize[_0xd1aa('0x2')],'allowNull':![]},'notificationTemplate':{'type':Sequelize[_0xd1aa('0x10')],'defaultValue':function(){return _0xd1aa('0x11');}},'notificationSound':{'type':Sequelize[_0xd1aa('0x12')],'defaultValue':!![]},'notificationShake':{'type':Sequelize[_0xd1aa('0x12')],'defaultValue':![]},'waitForTheAssignedAgent':{'type':Sequelize[_0xd1aa('0xb')],'validate':{'min':0x1,'max':0x20c49b},'defaultValue':0xa},'queueTransfer':{'type':Sequelize[_0xd1aa('0x12')],'defaultValue':![]},'queueTransferTimeout':{'type':Sequelize[_0xd1aa('0xb')],'validate':{'min':0x1,'max':0x20c49b},'defaultValue':0x12c},'agentTransfer':{'type':Sequelize[_0xd1aa('0x12')],'defaultValue':![]},'agentTransferTimeout':{'type':Sequelize[_0xd1aa('0xb')],'validate':{'min':0x1,'max':0x20c49b},'defaultValue':0x12c},'mandatoryDispositionPauseId':{'type':Sequelize['INTEGER'],'allowNull':!![],'defaultValue':null,'comment':_0xd1aa('0x13')},'mandatoryDisposition':{'type':Sequelize['BOOLEAN'],'defaultValue':![],'comment':_0xd1aa('0x14'),'set':function(_0x2aa775){if(!_0x2aa775)this[_0xd1aa('0x15')]('mandatoryDispositionPauseId',null);this[_0xd1aa('0x15')](_0xd1aa('0x16'),_0x2aa775);}}}; \ No newline at end of file diff --git a/server/api/faxAccount/faxAccount.controller.js b/server/api/faxAccount/faxAccount.controller.js index e7a099c..ac822df 100644 --- a/server/api/faxAccount/faxAccount.controller.js +++ b/server/api/faxAccount/faxAccount.controller.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xa629=['./faxAccount.socket','jayson/promise','client','http','request','then','info','request\x20sent','debug','stringify','error','FaxAccount,\x20%s,\x20%s','message','result','catch','end','status','offset','undefined','limit','count','Content-Range','json','save','update','destroy','get','FaxAccounts','sendStatus','stack','name','send','index','mandatoryDispositionPause','map','FaxAccount','rawAttributes','fieldName','type','model','query','intersection','fields','attributes','length','hasOwnProperty','nolimit','order','sort','filters','filter','where','options','includeAll','include','rows','show','params','Pause','keys','merge','find','create','body','user','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','UserProfileSection','userProfileId','autoAssociation','describe','addDisposition','Disposition','getDispositions','findOne','FaxAccountId','removeDispositions','ids','addAnswer','CannedAnswer','getAnswers','pick','findAll','removeAnswers','FaxInteraction','addInteraction','getInteractions','CmContact','Contact','Owner','fullname','color','tag','sequelize','transaction','Transaction','ISOLATION_LEVELS','FaxApplication','bulkCreate','findAndCountAll','priority','finally','getApplications','context','exten','localstationid','app','system','Fax\x20Extension','appdata','push','Answer','CDR(type)=inbound-fax','Set','ecm','faxdetect','headerinfo','maxrate','minrate','modem','FAXOPT(','Wait','/var/opt/motion2/server/files/attachments/fax-${CALLERID(num)}-${CUT(UNIQUEID,.,1)}-${CUT(UNIQUEID,.,2)}-${STRFTIME(,,%C%y%m%d%H%M%S)}-rx.tif,d','ReceiveFax','addAccountApplications','VoiceExtension','updateAccountApplications','tech','key','createdAt','updatedAt','TrunkId','ListId','$gte','format','YYYY-MM-DD\x20HH:mm:ss','FaxMessage','CmList','List','Contacts','DESC','attachments','root','server/files/attachments','basename','CheckAfterSend','isNil','\x22%s\x22\x20<%s>','fax','Send\x20Fax\x20failed','filename','spread','out','ContactId','dataValues','Messages','SendFax','SendFaxRpc,\x20%s','addAgents','omit','emit','userFaxAccount:save','removeAgents','isArray','userFaxAccount:remove','User','getAgents','eml-format','rimraf','zip-dir','request-promise','moment','mustache','util','path','to-csv','ejs','squel','crypto','jsforce','desk.js','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/license/util','../../mysqldb','redis','defaults','localhost','socket.io-emitter'];(function(_0x27da5c,_0x166578){var _0x4ed16a=function(_0x12a7ac){while(--_0x12a7ac){_0x27da5c['push'](_0x27da5c['shift']());}};_0x4ed16a(++_0x166578);}(_0xa629,0x16a));var _0x9a62=function(_0x321bb2,_0x202794){_0x321bb2=_0x321bb2-0x0;var _0x9c12ed=_0xa629[_0x321bb2];return _0x9c12ed;};'use strict';var emlformat=require(_0x9a62('0x0'));var rimraf=require(_0x9a62('0x1'));var zipdir=require(_0x9a62('0x2'));var jsonpatch=require('fast-json-patch');var rp=require(_0x9a62('0x3'));var moment=require(_0x9a62('0x4'));var BPromise=require('bluebird');var Mustache=require(_0x9a62('0x5'));var util=require(_0x9a62('0x6'));var path=require(_0x9a62('0x7'));var sox=require('sox');var csv=require(_0x9a62('0x8'));var ejs=require(_0x9a62('0x9'));var fs=require('fs');var fs_extra=require('fs-extra');var _=require('lodash');var squel=require(_0x9a62('0xa'));var crypto=require(_0x9a62('0xb'));var jsforce=require(_0x9a62('0xc'));var deskjs=require(_0x9a62('0xd'));var toCsv=require(_0x9a62('0x8'));var querystring=require('querystring');var Papa=require(_0x9a62('0xe'));var Redis=require(_0x9a62('0xf'));var authService=require(_0x9a62('0x10'));var qs=require(_0x9a62('0x11'));var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0x9a62('0x12'));var logger=require(_0x9a62('0x13'))(_0x9a62('0x14'));var utils=require(_0x9a62('0x15'));var config=require('../../config/environment');var licenseUtil=require(_0x9a62('0x16'));var db=require(_0x9a62('0x17'))['db'];config[_0x9a62('0x18')]=_[_0x9a62('0x19')](config['redis'],{'host':_0x9a62('0x1a'),'port':0x18eb});var socket=require(_0x9a62('0x1b'))(new Redis(config[_0x9a62('0x18')]));require(_0x9a62('0x1c'))['register'](socket);var jayson=require(_0x9a62('0x1d'));var client=jayson[_0x9a62('0x1e')][_0x9a62('0x1f')]({'port':0x232c});var client9002=jayson['client']['http']({'port':0x232a});function respondWithRpcPromise(_0x348e90,_0x3354ee,_0x4a467b,_0x3a2c05){return new BPromise(function(_0x10e1b1,_0x46b169){var _0x34a28a=_0x3a2c05||client;return _0x34a28a[_0x9a62('0x20')](_0x348e90,_0x4a467b)[_0x9a62('0x21')](function(_0x12959a){logger[_0x9a62('0x22')]('FaxAccount,\x20%s,\x20%s',_0x3354ee,_0x9a62('0x23'));logger[_0x9a62('0x24')]('FaxAccount,\x20%s,\x20%s,\x20%s',_0x3354ee,_0x9a62('0x23'),JSON[_0x9a62('0x25')](_0x12959a));if(_0x12959a['error']){if(_0x12959a[_0x9a62('0x26')]['code']===0x1f4){logger[_0x9a62('0x26')](_0x9a62('0x27'),_0x3354ee,_0x12959a[_0x9a62('0x26')]['message']);return _0x46b169(_0x12959a[_0x9a62('0x26')][_0x9a62('0x28')]);}logger['error'](_0x9a62('0x27'),_0x3354ee,_0x12959a['error'][_0x9a62('0x28')]);return _0x10e1b1(_0x12959a[_0x9a62('0x26')][_0x9a62('0x28')]);}else{logger[_0x9a62('0x22')](_0x9a62('0x27'),_0x3354ee,_0x9a62('0x23'));_0x10e1b1(_0x12959a[_0x9a62('0x29')][_0x9a62('0x28')]);}})[_0x9a62('0x2a')](function(_0x3ef692){logger['error'](_0x9a62('0x27'),_0x3354ee,_0x3ef692);_0x46b169(_0x3ef692);});});}function respondWithStatusCode(_0x1c9966,_0x20bac5){_0x20bac5=_0x20bac5||0xcc;return function(_0x1f5f6d){if(_0x1f5f6d){return _0x1c9966['sendStatus'](_0x20bac5);}return _0x1c9966['status'](_0x20bac5)[_0x9a62('0x2b')]();};}function respondWithResult(_0x7f0f6c,_0x1cb88f){_0x1cb88f=_0x1cb88f||0xc8;return function(_0x252ca9){if(_0x252ca9){return _0x7f0f6c[_0x9a62('0x2c')](_0x1cb88f)['json'](_0x252ca9);}};}function respondWithFilteredResult(_0x53bfe5,_0x3ea82a){return function(_0x28febf){if(_0x28febf){var _0x28dd48=typeof _0x3ea82a[_0x9a62('0x2d')]===_0x9a62('0x2e')&&typeof _0x3ea82a[_0x9a62('0x2f')]===_0x9a62('0x2e');var _0x4e528c=_0x28febf[_0x9a62('0x30')];var _0x274e52=_0x28dd48?0x0:_0x3ea82a[_0x9a62('0x2d')];var _0x163337=_0x28dd48?_0x28febf[_0x9a62('0x30')]:_0x3ea82a[_0x9a62('0x2d')]+_0x3ea82a[_0x9a62('0x2f')];var _0x4be140;if(_0x163337>=_0x4e528c){_0x163337=_0x4e528c;_0x4be140=0xc8;}else{_0x4be140=0xce;}_0x53bfe5[_0x9a62('0x2c')](_0x4be140);return _0x53bfe5['set'](_0x9a62('0x31'),_0x274e52+'-'+_0x163337+'/'+_0x4e528c)[_0x9a62('0x32')](_0x28febf);}return null;};}function patchUpdates(_0x3da55b){return function(_0x31174a){try{jsonpatch['apply'](_0x31174a,_0x3da55b,!![]);}catch(_0x31b802){return BPromise['reject'](_0x31b802);}return _0x31174a[_0x9a62('0x33')]();};}function saveUpdates(_0x235dcc,_0x2c5424){return function(_0x5d4334){if(_0x5d4334){return _0x5d4334[_0x9a62('0x34')](_0x235dcc)['then'](function(_0x36ae00){return _0x36ae00;});}return null;};}function removeEntity(_0x582bad,_0x9241d){return function(_0x3e382d){if(_0x3e382d){return _0x3e382d[_0x9a62('0x35')]()['then'](function(){var _0x4aa0da=_0x3e382d[_0x9a62('0x36')]({'plain':!![]});var _0x3ecae4=_0x9a62('0x37');return db['UserProfileResource']['destroy']({'where':{'type':_0x3ecae4,'resourceId':_0x4aa0da['id']}})[_0x9a62('0x21')](function(){return _0x3e382d;});})[_0x9a62('0x21')](function(){_0x582bad[_0x9a62('0x2c')](0xcc)[_0x9a62('0x2b')]();});}};}function handleEntityNotFound(_0x1b17c7,_0x20df06){return function(_0x1c2194){if(!_0x1c2194){_0x1b17c7[_0x9a62('0x38')](0x194);}return _0x1c2194;};}function handleError(_0x2f02ce,_0x8c6f9){_0x8c6f9=_0x8c6f9||0x1f4;return function(_0x211216){logger[_0x9a62('0x26')](_0x211216[_0x9a62('0x39')]);if(_0x211216[_0x9a62('0x3a')]){delete _0x211216[_0x9a62('0x3a')];}_0x2f02ce[_0x9a62('0x2c')](_0x8c6f9)[_0x9a62('0x3b')](_0x211216);};}exports[_0x9a62('0x3c')]=function(_0x5a6520,_0x4fff5c){var _0x514be3={'include':[{'model':db['Pause'],'as':_0x9a62('0x3d')}]},_0x2a6d21={},_0x4e51fe={'count':0x0,'rows':[]};var _0x20eee3=_[_0x9a62('0x3e')](db[_0x9a62('0x3f')][_0x9a62('0x40')],function(_0x1922a1){return{'name':_0x1922a1[_0x9a62('0x41')],'type':_0x1922a1[_0x9a62('0x42')]['key']};});_0x2a6d21[_0x9a62('0x43')]=_[_0x9a62('0x3e')](_0x20eee3,'name');_0x2a6d21['query']=_['keys'](_0x5a6520[_0x9a62('0x44')]);_0x2a6d21['filters']=_[_0x9a62('0x45')](_0x2a6d21[_0x9a62('0x43')],_0x2a6d21[_0x9a62('0x44')]);_0x514be3['attributes']=_['intersection'](_0x2a6d21[_0x9a62('0x43')],qs[_0x9a62('0x46')](_0x5a6520['query']['fields']));_0x514be3[_0x9a62('0x47')]=_0x514be3['attributes'][_0x9a62('0x48')]?_0x514be3['attributes']:_0x2a6d21[_0x9a62('0x43')];if(!_0x5a6520[_0x9a62('0x44')][_0x9a62('0x49')](_0x9a62('0x4a'))){_0x514be3[_0x9a62('0x2f')]=qs[_0x9a62('0x2f')](_0x5a6520[_0x9a62('0x44')]['limit']);_0x514be3[_0x9a62('0x2d')]=qs[_0x9a62('0x2d')](_0x5a6520[_0x9a62('0x44')][_0x9a62('0x2d')]);}_0x514be3[_0x9a62('0x4b')]=qs['sort'](_0x5a6520[_0x9a62('0x44')][_0x9a62('0x4c')]);_0x514be3['where']=qs[_0x9a62('0x4d')](_['pick'](_0x5a6520['query'],_0x2a6d21[_0x9a62('0x4d')]),_0x20eee3);if(_0x5a6520[_0x9a62('0x44')][_0x9a62('0x4e')]){_0x514be3['where']=_['merge'](_0x514be3[_0x9a62('0x4f')],{'$or':_[_0x9a62('0x3e')](_0x20eee3,function(_0xbff29f){if(_0xbff29f['type']!=='VIRTUAL'){var _0x5c1478={};_0x5c1478[_0xbff29f[_0x9a62('0x3a')]]={'$like':'%'+_0x5a6520[_0x9a62('0x44')]['filter']+'%'};return _0x5c1478;}})});}_0x514be3=_['merge']({},_0x514be3,_0x5a6520[_0x9a62('0x50')]);var _0x4f435d={'where':_0x514be3[_0x9a62('0x4f')]};return db[_0x9a62('0x3f')]['count'](_0x4f435d)[_0x9a62('0x21')](function(_0x152aa6){_0x4e51fe[_0x9a62('0x30')]=_0x152aa6;if(_0x5a6520[_0x9a62('0x44')][_0x9a62('0x51')]){_0x514be3[_0x9a62('0x52')]=[{'all':!![]}];}return db['FaxAccount']['findAll'](_0x514be3);})[_0x9a62('0x21')](function(_0x130a58){_0x4e51fe[_0x9a62('0x53')]=_0x130a58;return _0x4e51fe;})[_0x9a62('0x21')](respondWithFilteredResult(_0x4fff5c,_0x514be3))[_0x9a62('0x2a')](handleError(_0x4fff5c,null));};exports[_0x9a62('0x54')]=function(_0x22c842,_0x47e045){var _0x1254e7={'raw':![],'where':{'id':_0x22c842[_0x9a62('0x55')]['id']},'include':[{'model':db[_0x9a62('0x56')],'as':_0x9a62('0x3d')}]},_0x570211={};_0x570211[_0x9a62('0x43')]=_[_0x9a62('0x57')](db['FaxAccount']['rawAttributes']);_0x570211[_0x9a62('0x44')]=_['keys'](_0x22c842[_0x9a62('0x44')]);_0x570211['filters']=_['intersection'](_0x570211['model'],_0x570211[_0x9a62('0x44')]);_0x1254e7[_0x9a62('0x47')]=_['intersection'](_0x570211[_0x9a62('0x43')],qs[_0x9a62('0x46')](_0x22c842[_0x9a62('0x44')]['fields']));_0x1254e7['attributes']=_0x1254e7[_0x9a62('0x47')][_0x9a62('0x48')]?_0x1254e7[_0x9a62('0x47')]:_0x570211['model'];if(_0x22c842[_0x9a62('0x44')][_0x9a62('0x51')]){_0x1254e7[_0x9a62('0x52')]=[{'all':!![]}];}_0x1254e7=_[_0x9a62('0x58')]({},_0x1254e7,_0x22c842[_0x9a62('0x50')]);return db['FaxAccount'][_0x9a62('0x59')](_0x1254e7)[_0x9a62('0x21')](handleEntityNotFound(_0x47e045,null))['then'](respondWithResult(_0x47e045,null))[_0x9a62('0x2a')](handleError(_0x47e045,null));};exports[_0x9a62('0x5a')]=function(_0x36ff7d,_0x5f1bd6){return db[_0x9a62('0x3f')][_0x9a62('0x5a')](_0x36ff7d[_0x9a62('0x5b')],{})[_0x9a62('0x21')](function(_0x27af39){var _0x46abcc=_0x36ff7d[_0x9a62('0x5c')]['get']({'plain':!![]});if(!_0x46abcc)throw new Error(_0x9a62('0x5d'));if(_0x46abcc[_0x9a62('0x5e')]===_0x9a62('0x5c')){var _0x1fac5c=_0x27af39[_0x9a62('0x36')]({'plain':!![]});var _0x84992b='FaxAccounts';return db[_0x9a62('0x5f')][_0x9a62('0x59')]({'where':{'name':_0x84992b,'userProfileId':_0x46abcc[_0x9a62('0x60')]},'raw':!![]})[_0x9a62('0x21')](function(_0x5b764a){if(_0x5b764a&&_0x5b764a[_0x9a62('0x61')]===0x0){return db['UserProfileResource']['create']({'name':_0x1fac5c[_0x9a62('0x3a')],'resourceId':_0x1fac5c['id'],'type':_0x5b764a[_0x9a62('0x3a')],'sectionId':_0x5b764a['id']},{})[_0x9a62('0x21')](function(){return _0x27af39;});}else{return _0x27af39;}})[_0x9a62('0x2a')](function(_0x3c9767){logger[_0x9a62('0x26')]('Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s',_0x3c9767);throw _0x3c9767;});}return _0x27af39;})['then'](respondWithResult(_0x5f1bd6,0xc9))[_0x9a62('0x2a')](handleError(_0x5f1bd6,null));};exports['update']=function(_0x3179d5,_0x3332cf){if(_0x3179d5[_0x9a62('0x5b')]['id']){delete _0x3179d5[_0x9a62('0x5b')]['id'];}return db['FaxAccount']['find']({'where':{'id':_0x3179d5[_0x9a62('0x55')]['id']},'include':[{'model':db['Pause'],'as':_0x9a62('0x3d')}]})[_0x9a62('0x21')](handleEntityNotFound(_0x3332cf,null))['then'](saveUpdates(_0x3179d5['body'],null))['then'](respondWithResult(_0x3332cf,null))['catch'](handleError(_0x3332cf,null));};exports[_0x9a62('0x35')]=function(_0x5b68ef,_0x2d87b9){return db['FaxAccount'][_0x9a62('0x59')]({'where':{'id':_0x5b68ef['params']['id']}})[_0x9a62('0x21')](handleEntityNotFound(_0x2d87b9,null))[_0x9a62('0x21')](removeEntity(_0x2d87b9,null))[_0x9a62('0x2a')](handleError(_0x2d87b9,null));};exports['describe']=function(_0x3eed31,_0x424b1a){return db['FaxAccount'][_0x9a62('0x62')]()[_0x9a62('0x21')](respondWithResult(_0x424b1a,null))[_0x9a62('0x2a')](handleError(_0x424b1a,null));};exports[_0x9a62('0x63')]=function(_0x4d7974,_0x4d2e1a,_0x43f870){if(_0x4d7974[_0x9a62('0x5b')]['id']){delete _0x4d7974['body']['id'];}return db[_0x9a62('0x3f')][_0x9a62('0x59')]({'where':{'id':_0x4d7974[_0x9a62('0x55')]['id']}})[_0x9a62('0x21')](handleEntityNotFound(_0x4d2e1a,null))[_0x9a62('0x21')](function(_0x384c7f){if(_0x384c7f){_0x4d7974[_0x9a62('0x5b')]['FaxAccountId']=_0x384c7f['id'];return db[_0x9a62('0x64')]['create'](_0x4d7974[_0x9a62('0x5b')]);}})[_0x9a62('0x21')](respondWithResult(_0x4d2e1a,null))[_0x9a62('0x2a')](handleError(_0x4d2e1a,null));};exports[_0x9a62('0x65')]=function(_0x881359,_0x5db0cc,_0x40a545){var _0x445c6f={'raw':![],'where':{}};var _0x3bace1={};var _0x249299={'count':0x0,'rows':[]};return db[_0x9a62('0x3f')][_0x9a62('0x66')]({'where':{'id':_0x881359[_0x9a62('0x55')]['id']}})[_0x9a62('0x21')](handleEntityNotFound(_0x5db0cc,null))['then'](function(_0x2981d1){if(_0x2981d1){_0x3bace1['model']=_[_0x9a62('0x57')](db[_0x9a62('0x64')][_0x9a62('0x40')]);_0x3bace1[_0x9a62('0x44')]=_[_0x9a62('0x57')](_0x881359[_0x9a62('0x44')]);_0x3bace1['filters']=_[_0x9a62('0x45')](_0x3bace1[_0x9a62('0x43')],_0x3bace1[_0x9a62('0x44')]);_0x445c6f[_0x9a62('0x47')]=_[_0x9a62('0x45')](_0x3bace1[_0x9a62('0x43')],qs[_0x9a62('0x46')](_0x881359[_0x9a62('0x44')][_0x9a62('0x46')]));_0x445c6f[_0x9a62('0x47')]=_0x445c6f[_0x9a62('0x47')][_0x9a62('0x48')]?_0x445c6f['attributes']:_0x3bace1[_0x9a62('0x43')];if(!_0x881359[_0x9a62('0x44')][_0x9a62('0x49')](_0x9a62('0x4a'))){_0x445c6f[_0x9a62('0x2f')]=qs[_0x9a62('0x2f')](_0x881359[_0x9a62('0x44')][_0x9a62('0x2f')]);_0x445c6f[_0x9a62('0x2d')]=qs[_0x9a62('0x2d')](_0x881359[_0x9a62('0x44')]['offset']);}_0x445c6f[_0x9a62('0x4b')]=qs[_0x9a62('0x4c')](_0x881359[_0x9a62('0x44')]['sort']);_0x445c6f[_0x9a62('0x4f')]=qs[_0x9a62('0x4d')](_['pick'](_0x881359[_0x9a62('0x44')],_0x3bace1[_0x9a62('0x4d')]));_0x445c6f[_0x9a62('0x4f')][_0x9a62('0x67')]=_0x2981d1['id'];if(_0x881359[_0x9a62('0x44')][_0x9a62('0x4e')]){_0x445c6f[_0x9a62('0x4f')]=_['merge'](_0x445c6f[_0x9a62('0x4f')],{'$or':_[_0x9a62('0x3e')](_0x445c6f[_0x9a62('0x47')],function(_0x406c3f){var _0x58ecb5={};_0x58ecb5[_0x406c3f]={'$like':'%'+_0x881359['query'][_0x9a62('0x4e')]+'%'};return _0x58ecb5;})});}_0x445c6f=_[_0x9a62('0x58')]({},_0x445c6f,_0x881359[_0x9a62('0x50')]);return db[_0x9a62('0x64')][_0x9a62('0x30')]({'where':_0x445c6f[_0x9a62('0x4f')]})[_0x9a62('0x21')](function(_0x738d4f){_0x249299[_0x9a62('0x30')]=_0x738d4f;if(_0x881359['query']['includeAll']){_0x445c6f[_0x9a62('0x52')]=[{'all':!![]}];}return db[_0x9a62('0x64')]['findAll'](_0x445c6f);})[_0x9a62('0x21')](function(_0x415690){_0x249299[_0x9a62('0x53')]=_0x415690;return _0x249299;});}})['then'](respondWithFilteredResult(_0x5db0cc,_0x445c6f))[_0x9a62('0x2a')](handleError(_0x5db0cc,null));};exports[_0x9a62('0x68')]=function(_0x20c6c8,_0x1c1968,_0x1badca){return db['FaxAccount']['find']({'where':{'id':_0x20c6c8[_0x9a62('0x55')]['id']}})[_0x9a62('0x21')](handleEntityNotFound(_0x1c1968,null))['then'](function(_0x17e6b2){if(_0x17e6b2){return _0x17e6b2[_0x9a62('0x68')](_0x20c6c8[_0x9a62('0x44')][_0x9a62('0x69')]);}})[_0x9a62('0x21')](respondWithStatusCode(_0x1c1968,null))[_0x9a62('0x2a')](handleError(_0x1c1968,null));};exports[_0x9a62('0x6a')]=function(_0x352cc7,_0x1f4461,_0x1be746){if(_0x352cc7[_0x9a62('0x5b')]['id']){delete _0x352cc7[_0x9a62('0x5b')]['id'];}return db[_0x9a62('0x3f')]['find']({'where':{'id':_0x352cc7[_0x9a62('0x55')]['id']}})[_0x9a62('0x21')](handleEntityNotFound(_0x1f4461,null))[_0x9a62('0x21')](function(_0x6d6cda){if(_0x6d6cda){_0x352cc7[_0x9a62('0x5b')][_0x9a62('0x67')]=_0x6d6cda['id'];return db[_0x9a62('0x6b')][_0x9a62('0x5a')](_0x352cc7[_0x9a62('0x5b')]);}})['then'](respondWithResult(_0x1f4461,null))['catch'](handleError(_0x1f4461,null));};exports[_0x9a62('0x6c')]=function(_0xf3ff9,_0x2929da,_0x320aa0){var _0x102f4b={'raw':![],'where':{}};var _0x2f649f={};var _0x518252={'count':0x0,'rows':[]};return db[_0x9a62('0x3f')][_0x9a62('0x66')]({'where':{'id':_0xf3ff9[_0x9a62('0x55')]['id']}})[_0x9a62('0x21')](handleEntityNotFound(_0x2929da,null))[_0x9a62('0x21')](function(_0x1619d4){if(_0x1619d4){_0x2f649f[_0x9a62('0x43')]=_['keys'](db[_0x9a62('0x6b')][_0x9a62('0x40')]);_0x2f649f[_0x9a62('0x44')]=_[_0x9a62('0x57')](_0xf3ff9['query']);_0x2f649f[_0x9a62('0x4d')]=_[_0x9a62('0x45')](_0x2f649f['model'],_0x2f649f['query']);_0x102f4b[_0x9a62('0x47')]=_[_0x9a62('0x45')](_0x2f649f[_0x9a62('0x43')],qs['fields'](_0xf3ff9['query']['fields']));_0x102f4b['attributes']=_0x102f4b[_0x9a62('0x47')][_0x9a62('0x48')]?_0x102f4b[_0x9a62('0x47')]:_0x2f649f[_0x9a62('0x43')];if(!_0xf3ff9['query'][_0x9a62('0x49')]('nolimit')){_0x102f4b[_0x9a62('0x2f')]=qs[_0x9a62('0x2f')](_0xf3ff9['query'][_0x9a62('0x2f')]);_0x102f4b[_0x9a62('0x2d')]=qs[_0x9a62('0x2d')](_0xf3ff9[_0x9a62('0x44')]['offset']);}_0x102f4b['order']=qs[_0x9a62('0x4c')](_0xf3ff9['query'][_0x9a62('0x4c')]);_0x102f4b[_0x9a62('0x4f')]=qs['filters'](_[_0x9a62('0x6d')](_0xf3ff9[_0x9a62('0x44')],_0x2f649f[_0x9a62('0x4d')]));_0x102f4b[_0x9a62('0x4f')][_0x9a62('0x67')]=_0x1619d4['id'];if(_0xf3ff9[_0x9a62('0x44')][_0x9a62('0x4e')]){_0x102f4b['where']=_[_0x9a62('0x58')](_0x102f4b[_0x9a62('0x4f')],{'$or':_[_0x9a62('0x3e')](_0x102f4b[_0x9a62('0x47')],function(_0x4497c5){var _0x3df287={};_0x3df287[_0x4497c5]={'$like':'%'+_0xf3ff9[_0x9a62('0x44')][_0x9a62('0x4e')]+'%'};return _0x3df287;})});}_0x102f4b=_[_0x9a62('0x58')]({},_0x102f4b,_0xf3ff9[_0x9a62('0x50')]);return db['CannedAnswer'][_0x9a62('0x30')]({'where':_0x102f4b['where']})[_0x9a62('0x21')](function(_0x5e0933){_0x518252[_0x9a62('0x30')]=_0x5e0933;if(_0xf3ff9[_0x9a62('0x44')][_0x9a62('0x51')]){_0x102f4b[_0x9a62('0x52')]=[{'all':!![]}];}return db[_0x9a62('0x6b')][_0x9a62('0x6e')](_0x102f4b);})[_0x9a62('0x21')](function(_0x2529f2){_0x518252['rows']=_0x2529f2;return _0x518252;});}})[_0x9a62('0x21')](respondWithFilteredResult(_0x2929da,_0x102f4b))[_0x9a62('0x2a')](handleError(_0x2929da,null));};exports[_0x9a62('0x6f')]=function(_0x216b94,_0xaab18,_0x32075b){return db['FaxAccount'][_0x9a62('0x59')]({'where':{'id':_0x216b94[_0x9a62('0x55')]['id']}})[_0x9a62('0x21')](handleEntityNotFound(_0xaab18,null))[_0x9a62('0x21')](function(_0x515596){if(_0x515596){return _0x515596[_0x9a62('0x6f')](_0x216b94[_0x9a62('0x44')][_0x9a62('0x69')]);}})['then'](respondWithStatusCode(_0xaab18,null))['catch'](handleError(_0xaab18,null));};exports['addInteraction']=function(_0xa55fcc,_0x10c854,_0x3c2530){return db[_0x9a62('0x70')][_0x9a62('0x59')]({'where':{'id':_0xa55fcc[_0x9a62('0x55')]['id']}})[_0x9a62('0x21')](handleEntityNotFound(_0x10c854,null))[_0x9a62('0x21')](function(_0x497cf5){if(_0x497cf5){return _0x497cf5[_0x9a62('0x71')](_0xa55fcc[_0x9a62('0x5b')][_0x9a62('0x69')],_['omit'](_0xa55fcc[_0x9a62('0x5b')],[_0x9a62('0x69'),'id'])||{});}})['then'](respondWithResult(_0x10c854,null))[_0x9a62('0x2a')](handleError(_0x10c854,null));};exports[_0x9a62('0x72')]=function(_0x399649,_0x6444e5,_0x4cd8b1){var _0x144a83={'raw':![],'where':{}};var _0x5798b1={};var _0x32f604={'count':0x0,'rows':[]};return db['FaxAccount'][_0x9a62('0x66')]({'where':{'id':_0x399649['params']['id']}})['then'](handleEntityNotFound(_0x6444e5,null))[_0x9a62('0x21')](function(_0x389907){if(_0x389907){_0x5798b1[_0x9a62('0x43')]=_['keys'](db[_0x9a62('0x70')][_0x9a62('0x40')]);_0x5798b1[_0x9a62('0x44')]=_['keys'](_0x399649[_0x9a62('0x44')]);_0x5798b1[_0x9a62('0x4d')]=_[_0x9a62('0x45')](_0x5798b1['model'],_0x5798b1[_0x9a62('0x44')]);_0x144a83[_0x9a62('0x47')]=_[_0x9a62('0x45')](_0x5798b1['model'],qs[_0x9a62('0x46')](_0x399649['query'][_0x9a62('0x46')]));_0x144a83['attributes']=_0x144a83[_0x9a62('0x47')]['length']?_0x144a83[_0x9a62('0x47')]:_0x5798b1[_0x9a62('0x43')];if(!_0x399649['query']['hasOwnProperty'](_0x9a62('0x4a'))){_0x144a83['limit']=qs['limit'](_0x399649[_0x9a62('0x44')][_0x9a62('0x2f')]);_0x144a83[_0x9a62('0x2d')]=qs[_0x9a62('0x2d')](_0x399649[_0x9a62('0x44')][_0x9a62('0x2d')]);}_0x144a83[_0x9a62('0x4b')]=qs[_0x9a62('0x4c')](_0x399649[_0x9a62('0x44')][_0x9a62('0x4c')]);_0x144a83['where']=qs[_0x9a62('0x4d')](_[_0x9a62('0x6d')](_0x399649[_0x9a62('0x44')],_0x5798b1['filters']));_0x144a83[_0x9a62('0x4f')][_0x9a62('0x67')]=_0x389907['id'];if(_0x399649[_0x9a62('0x44')]['filter']){_0x144a83['where']=_[_0x9a62('0x58')](_0x144a83[_0x9a62('0x4f')],{'$or':_['map'](_0x144a83[_0x9a62('0x47')],function(_0x504de7){var _0x32d463={};_0x32d463[_0x504de7]={'$like':'%'+_0x399649['query'][_0x9a62('0x4e')]+'%'};return _0x32d463;})});}_0x144a83=_[_0x9a62('0x58')]({},_0x144a83,_0x399649[_0x9a62('0x50')]);return db[_0x9a62('0x70')][_0x9a62('0x30')]({'where':_0x144a83[_0x9a62('0x4f')]})[_0x9a62('0x21')](function(_0x51f576){_0x32f604[_0x9a62('0x30')]=_0x51f576;if(_0x399649[_0x9a62('0x44')]['includeAll']){_0x144a83[_0x9a62('0x52')]=[{'model':db[_0x9a62('0x73')],'as':_0x9a62('0x74'),'required':![]},{'model':db['User'],'as':_0x9a62('0x75'),'attributes':[_0x9a62('0x3a'),_0x9a62('0x76'),'internal'],'required':![]},{'model':db['Tag'],'as':'Tags','attributes':['id',_0x9a62('0x3a'),_0x9a62('0x77')],'where':_0x399649[_0x9a62('0x44')][_0x9a62('0x78')]?{'id':_0x399649[_0x9a62('0x44')][_0x9a62('0x78')]}:undefined,'required':_0x399649[_0x9a62('0x44')][_0x9a62('0x78')]?!![]:![]}];}return db[_0x9a62('0x70')][_0x9a62('0x6e')](_0x144a83);})[_0x9a62('0x21')](function(_0x17abf6){_0x32f604[_0x9a62('0x53')]=_0x17abf6;return _0x32f604;});}})['then'](respondWithFilteredResult(_0x6444e5,_0x144a83))[_0x9a62('0x2a')](handleError(_0x6444e5,null));};exports['addApplications']=function(_0x3edb0b,_0x1d7492){var _0x2f0f36=_0x3edb0b[_0x9a62('0x55')]['id'];var _0x5b1125=_0x3edb0b[_0x9a62('0x5b')];var _0x1d39b1=0xc8;var _0x1a57a5=null;return db[_0x9a62('0x79')][_0x9a62('0x7a')]({'isolationLevel':db[_0x9a62('0x79')][_0x9a62('0x7b')][_0x9a62('0x7c')]['READ_COMMITTED']},function(_0x292599){return db[_0x9a62('0x3f')][_0x9a62('0x66')]({'where':{'id':_0x2f0f36},'transaction':_0x292599})[_0x9a62('0x21')](function(_0xb1b1b2){if(_0xb1b1b2){return db['FaxApplication'][_0x9a62('0x35')]({'where':{'FaxAccountId':_0x2f0f36},'transaction':_0x292599})[_0x9a62('0x21')](function(){var _0x47acda=_['map'](_0x5b1125,function(_0x21077b){_0x21077b['FaxAccountId']=_0x2f0f36;return _0x21077b;});return db[_0x9a62('0x7d')][_0x9a62('0x7e')](_0x47acda,{'transaction':_0x292599});});}else{_0x1d39b1=0x194;_0x1a57a5=[];}});})['then'](function(){if(_0x1d39b1!==0x194){return db[_0x9a62('0x7d')][_0x9a62('0x7f')]({'where':{'FaxAccountId':_0x2f0f36},'order':_0x9a62('0x80')})[_0x9a62('0x21')](function(_0x395b2b){_0x1a57a5=_0x395b2b;});}})[_0x9a62('0x2a')](function(_0x92e51d){_0x1d39b1=0x1f4;logger['error'](_0x92e51d['stack']);if(_0x92e51d[_0x9a62('0x3a')]){delete _0x92e51d[_0x9a62('0x3a')];}_0x1a57a5=_0x92e51d;})[_0x9a62('0x81')](function(){if(_0x1a57a5===null){_0x1d7492[_0x9a62('0x38')](_0x1d39b1);}else{if(_0x1d39b1===0x1f4){_0x1d7492[_0x9a62('0x2c')](_0x1d39b1)[_0x9a62('0x3b')](_0x1a57a5);}else{_0x1d7492[_0x9a62('0x2c')](_0x1d39b1)[_0x9a62('0x32')](_0x1a57a5);}}});};exports[_0x9a62('0x82')]=function(_0x241dfa,_0x150c92,_0xddb7a7){var _0x15e069={};var _0x2ac1c7={};var _0x403fbd;var _0x4d2b12;return db[_0x9a62('0x3f')][_0x9a62('0x66')]({'where':{'id':_0x241dfa[_0x9a62('0x55')]['id']}})[_0x9a62('0x21')](handleEntityNotFound(_0x150c92,null))[_0x9a62('0x21')](function(_0x462474){if(_0x462474){_0x403fbd=_0x462474;_0x2ac1c7[_0x9a62('0x43')]=_[_0x9a62('0x57')](db[_0x9a62('0x7d')]['rawAttributes']);_0x2ac1c7[_0x9a62('0x44')]=_[_0x9a62('0x57')](_0x241dfa['query']);_0x2ac1c7[_0x9a62('0x4d')]=_[_0x9a62('0x45')](_0x2ac1c7['model'],_0x2ac1c7[_0x9a62('0x44')]);_0x15e069['attributes']=_['intersection'](_0x2ac1c7[_0x9a62('0x43')],qs[_0x9a62('0x46')](_0x241dfa['query'][_0x9a62('0x46')]));_0x15e069[_0x9a62('0x47')]=_0x15e069[_0x9a62('0x47')][_0x9a62('0x48')]?_0x15e069[_0x9a62('0x47')]:_0x2ac1c7['model'];_0x15e069[_0x9a62('0x4b')]=qs[_0x9a62('0x4c')](_0x241dfa[_0x9a62('0x44')][_0x9a62('0x4c')]);_0x15e069[_0x9a62('0x4f')]=qs['filters'](_['pick'](_0x241dfa[_0x9a62('0x44')],_0x2ac1c7['filters']));if(_0x241dfa['query'][_0x9a62('0x4e')]){_0x15e069[_0x9a62('0x4f')]=_[_0x9a62('0x58')](_0x15e069[_0x9a62('0x4f')],{'$or':_[_0x9a62('0x3e')](_0x15e069[_0x9a62('0x47')],function(_0x46c486){var _0x149490={};_0x149490[_0x46c486]={'$like':'%'+_0x241dfa[_0x9a62('0x44')][_0x9a62('0x4e')]+'%'};return _0x149490;})});}_0x15e069=_[_0x9a62('0x58')]({},_0x15e069,_0x241dfa[_0x9a62('0x50')]);return _0x403fbd[_0x9a62('0x82')](_0x15e069);}})['then'](function(_0x642ae1){if(_0x642ae1){_0x4d2b12=_0x642ae1[_0x9a62('0x48')];if(!_0x241dfa[_0x9a62('0x44')]['hasOwnProperty'](_0x9a62('0x4a'))){_0x15e069[_0x9a62('0x2f')]=qs[_0x9a62('0x2f')](_0x241dfa[_0x9a62('0x44')][_0x9a62('0x2f')]);_0x15e069[_0x9a62('0x2d')]=qs[_0x9a62('0x2d')](_0x241dfa[_0x9a62('0x44')]['offset']);}return _0x403fbd[_0x9a62('0x82')](_0x15e069);}})[_0x9a62('0x21')](function(_0x39d53a){if(_0x39d53a){return _0x39d53a?{'count':_0x4d2b12,'rows':_0x39d53a}:null;}})[_0x9a62('0x21')](respondWithResult(_0x150c92,null))['catch'](handleError(_0x150c92,null));};function Extension(_0xc9b79,_0x17d5d7,_0x549998,_0x3b4f7c){this[_0x9a62('0x83')]='from-voip-provider';this[_0x9a62('0x84')]=_0xc9b79[_0x9a62('0x85')];this[_0x9a62('0x86')]=_0x3b4f7c;this['type']=_0x9a62('0x87');this['description']=_0x9a62('0x88');this[_0x9a62('0x67')]=_0xc9b79['id'];this['priority']=_0x17d5d7;this[_0x9a62('0x89')]=_0x549998;}function createExtensionsReciveFax(_0x5def39){var _0x3999b8=0x1;var _0x56999e=[];_0x56999e[_0x9a62('0x8a')](new Extension(_0x5def39,_0x3999b8,'',_0x9a62('0x8b')));_0x3999b8+=0x1;_0x56999e[_0x9a62('0x8a')](new Extension(_0x5def39,_0x3999b8,_0x9a62('0x8c'),_0x9a62('0x8d')));_0x3999b8+=0x1;for(var _0x30c8a8 in _0x5def39){if(_0x5def39['hasOwnProperty'](_0x30c8a8)&&(_0x30c8a8===_0x9a62('0x8e')||_0x30c8a8===_0x9a62('0x85')||_0x30c8a8==='gateway'||_0x30c8a8===_0x9a62('0x8f')||_0x30c8a8===_0x9a62('0x90')||_0x30c8a8===_0x9a62('0x91')||_0x30c8a8===_0x9a62('0x92')||_0x30c8a8===_0x9a62('0x93')||_0x30c8a8==='t38timeout')){_0x56999e[_0x9a62('0x8a')](new Extension(_0x5def39,_0x3999b8,_0x9a62('0x94')+_0x30c8a8+')='+_0x5def39[_0x30c8a8],_0x9a62('0x8d')));_0x3999b8+=0x1;}}_0x56999e[_0x9a62('0x8a')](new Extension(_0x5def39,_0x3999b8,'6',_0x9a62('0x95')));_0x3999b8+=0x1;_0x56999e['push'](new Extension(_0x5def39,_0x3999b8,_0x9a62('0x96'),_0x9a62('0x97')));_0x3999b8=0x0;return _0x56999e;}exports[_0x9a62('0x98')]=function(_0x22914c,_0x473147,_0x3ef531){var _0x45ef25;return db[_0x9a62('0x79')][_0x9a62('0x7a')](function(_0x1cf470){return db[_0x9a62('0x3f')]['create'](_0x22914c[_0x9a62('0x5b')],{'transaction':_0x1cf470})['then'](function(_0x270531){_0x45ef25=_0x270531[_0x9a62('0x36')]({'plain':!![]});return db[_0x9a62('0x99')][_0x9a62('0x7e')](createExtensionsReciveFax(_0x45ef25),{'transaction':_0x1cf470});});})['then'](function(){return _0x45ef25;})[_0x9a62('0x21')](respondWithResult(_0x473147,null))[_0x9a62('0x2a')](handleError(_0x473147,null));};exports[_0x9a62('0x9a')]=function(_0x1b28fa,_0x58c329,_0x1a95ee){var _0x4441ad;return db['sequelize']['transaction'](function(_0x12df2b){return db[_0x9a62('0x3f')]['update'](_0x1b28fa[_0x9a62('0x5b')],{'where':{'id':_0x1b28fa[_0x9a62('0x5b')]['id']},'transaction':_0x12df2b})['then'](function(_0x21cde2){return db['VoiceExtension'][_0x9a62('0x35')]({'where':{'FaxAccountId':_0x1b28fa['body']['id']},'transaction':_0x12df2b})['then'](function(_0x2e9d92){return db['VoiceExtension']['bulkCreate'](createExtensionsReciveFax(_['omit'](_0x1b28fa[_0x9a62('0x5b')],[_0x9a62('0x9b'),_0x9a62('0x9c'),_0x9a62('0x9d'),_0x9a62('0x9e'),_0x9a62('0x9f'),_0x9a62('0xa0')])),{'transaction':_0x12df2b});});});})['then'](function(){return db['FaxAccount']['findById'](_0x1b28fa[_0x9a62('0x5b')]['id']);})[_0x9a62('0x21')](respondWithResult(_0x58c329,null))[_0x9a62('0x2a')](handleError(_0x58c329,null));};exports['getMessages']=function(_0x1b4d51,_0x351047,_0x26aa8a){var _0x2ba548={'raw':!![],'where':{}};var _0x2e387f={};var _0x3e4bb4={'count':0x0,'rows':[]};return db[_0x9a62('0x3f')][_0x9a62('0x66')]({'where':{'id':_0x1b4d51[_0x9a62('0x55')]['id']}})['then'](handleEntityNotFound(_0x351047,null))[_0x9a62('0x21')](function(_0x1cbd9b){if(_0x1cbd9b){_0x2e387f[_0x9a62('0x43')]=_['keys'](db['FaxMessage'][_0x9a62('0x40')]);_0x2e387f[_0x9a62('0x44')]=_['keys'](_0x1b4d51[_0x9a62('0x44')]);_0x2e387f[_0x9a62('0x4d')]=_[_0x9a62('0x45')](_0x2e387f['model'],_0x2e387f[_0x9a62('0x44')]);_0x2ba548['attributes']=_[_0x9a62('0x45')](_0x2e387f[_0x9a62('0x43')],qs[_0x9a62('0x46')](_0x1b4d51[_0x9a62('0x44')][_0x9a62('0x46')]));_0x2ba548[_0x9a62('0x47')]=_0x2ba548[_0x9a62('0x47')][_0x9a62('0x48')]?_0x2ba548[_0x9a62('0x47')]:_0x2e387f[_0x9a62('0x43')];if(!_0x1b4d51['query'][_0x9a62('0x49')]('nolimit')){_0x2ba548['limit']=qs[_0x9a62('0x2f')](_0x1b4d51[_0x9a62('0x44')][_0x9a62('0x2f')]);_0x2ba548['offset']=qs[_0x9a62('0x2d')](_0x1b4d51[_0x9a62('0x44')][_0x9a62('0x2d')]);}_0x2ba548[_0x9a62('0x4b')]=qs[_0x9a62('0x4c')](_0x1b4d51[_0x9a62('0x44')]['sort']);_0x2ba548[_0x9a62('0x4f')]=qs['filters'](_[_0x9a62('0x6d')](_0x1b4d51['query'],_0x2e387f[_0x9a62('0x4d')]));_0x2ba548[_0x9a62('0x4f')]['FaxAccountId']=_0x1cbd9b['id'];if(_0x1b4d51[_0x9a62('0x44')][_0x9a62('0x4e')]){_0x2ba548['where']=_[_0x9a62('0x58')](_0x2ba548[_0x9a62('0x4f')],{'$or':_[_0x9a62('0x3e')](_0x2ba548['attributes'],function(_0x4c9e60){var _0x3ceb5b={};_0x3ceb5b[_0x4c9e60]={'$like':'%'+_0x1b4d51[_0x9a62('0x44')][_0x9a62('0x4e')]+'%'};return _0x3ceb5b;})});}if(_0x1b4d51[_0x9a62('0x44')][_0x9a62('0xa1')]){var _0x223211=_0x1b4d51[_0x9a62('0x44')]['$gte']['split'](',');var _0x471aa4={};_0x471aa4[_0x223211[0x0]]={'$gte':moment(_0x223211[0x1])[_0x9a62('0xa2')](_0x9a62('0xa3'))};_0x2ba548['where']=_['merge'](_0x2ba548[_0x9a62('0x4f')],_0x471aa4);}_0x2ba548=_[_0x9a62('0x58')]({},_0x2ba548,_0x1b4d51[_0x9a62('0x50')]);return db[_0x9a62('0xa4')]['count']({'where':_0x2ba548['where']})[_0x9a62('0x21')](function(_0x2aed43){_0x3e4bb4[_0x9a62('0x30')]=_0x2aed43;if(_0x1b4d51[_0x9a62('0x44')][_0x9a62('0x51')]){_0x2ba548[_0x9a62('0x52')]=[{'all':!![]}];}return db[_0x9a62('0xa4')][_0x9a62('0x6e')](_0x2ba548);})[_0x9a62('0x21')](function(_0x1f0ccd){_0x3e4bb4[_0x9a62('0x53')]=_0x1f0ccd;return _0x3e4bb4;});}})['then'](respondWithFilteredResult(_0x351047,_0x2ba548))['catch'](handleError(_0x351047,null));};exports[_0x9a62('0x3b')]=function(_0x387b70,_0x1fa5c7,_0x1b6f4d){var _0x5721c3,_0x3f02b2={},_0x3507a3;if(_0x387b70[_0x9a62('0x5b')]['to']){_0x3507a3=_0x387b70[_0x9a62('0x5b')]['to'][0x0];}return db[_0x9a62('0x3f')][_0x9a62('0x59')]({'where':{'id':_0x387b70[_0x9a62('0x55')]['id']},'include':[{'model':db[_0x9a62('0xa5')],'as':_0x9a62('0xa6'),'include':[{'model':db[_0x9a62('0x73')],'as':_0x9a62('0xa7'),'where':{'fax':_0x3507a3},'limit':0x1,'order':[[_0x9a62('0x9e'),_0x9a62('0xa8')]]}]}]})[_0x9a62('0x21')](handleEntityNotFound(_0x1fa5c7,null))[_0x9a62('0x21')](function(_0x26a060){_0x5721c3=_0x26a060;if(_0x387b70[_0x9a62('0x5b')]['attachments']&&_0x387b70[_0x9a62('0x5b')][_0x9a62('0xa9')][_0x9a62('0x48')]){for(var _0x554fd4=0x0;_0x554fd4<_0x387b70[_0x9a62('0x5b')]['attachments'][_0x9a62('0x48')];_0x554fd4+=0x1){_0x387b70[_0x9a62('0x5b')]['attachments'][_0x554fd4]={'filename':_0x387b70[_0x9a62('0x5b')]['attachments'][_0x554fd4][_0x9a62('0x3a')],'id':_0x387b70[_0x9a62('0x5b')][_0x9a62('0xa9')][_0x554fd4]['id'],'path':path['join'](config[_0x9a62('0xaa')],_0x9a62('0xab'),_0x387b70[_0x9a62('0x5b')][_0x9a62('0xa9')][_0x554fd4][_0x9a62('0xac')])};}}return respondWithRpcPromise(_0x9a62('0xad'),_0x9a62('0xad'),{'FaxAccountId':_[_0x9a62('0xae')](_0x387b70['params']['id'])?undefined:_0x387b70[_0x9a62('0x55')]['id'],'path':_['isNil'](_0x387b70[_0x9a62('0x5b')][_0x9a62('0xa9')][0x0][_0x9a62('0x7')])?undefined:_0x387b70[_0x9a62('0x5b')][_0x9a62('0xa9')][0x0][_0x9a62('0x7')],'fax':_[_0x9a62('0xae')](_0x387b70[_0x9a62('0x5b')]['to'][0x0])?undefined:_0x387b70[_0x9a62('0x5b')]['to'][0x0]},client9002);})['then'](function(){if(_0x5721c3){if(_[_0x9a62('0xae')](_0x387b70[_0x9a62('0x5b')]['from'])){_0x387b70[_0x9a62('0x5b')]['from']=util[_0x9a62('0xa2')](_0x9a62('0xaf'),_0x5721c3[_0x9a62('0x3a')],_0x5721c3[_0x9a62('0xb0')]);}if(_0x5721c3[_0x9a62('0xa6')]){if(_0x5721c3[_0x9a62('0xa6')]['Contacts'][_0x9a62('0x48')]){return _0x5721c3['List'][_0x9a62('0xa7')][0x0];}else{return db[_0x9a62('0x73')]['create'](_['defaults'](_0x387b70[_0x9a62('0x5b')],{'firstName':_0x387b70[_0x9a62('0x5b')]['to'][0x0],'phone':_0x387b70['body']['to'][0x0],'fax':_0x387b70[_0x9a62('0x5b')]['to'][0x0],'ListId':_0x5721c3[_0x9a62('0xa0')]}));}}else{throw new Error('List\x20not\x20found');}}else{throw new Error(_0x9a62('0xb1'));}})[_0x9a62('0x21')](function(_0x3a1738){if(_0x3a1738){return db[_0x9a62('0x70')][_0x9a62('0x59')]({'where':{'ContactId':_0x3a1738['id'],'closed':![],'FaxAccountId':_0x5721c3['id']}})[_0x9a62('0x21')](function(_0x313b76){if(_0x313b76){return[_0x313b76,![]];}return db[_0x9a62('0x70')][_0x9a62('0x5a')]({'UserId':_0x387b70[_0x9a62('0x5c')]['id'],'ContactId':_0x3a1738['id'],'FaxAccountId':_0x5721c3['id'],'fax':_0x387b70[_0x9a62('0x5b')]['to'][0x0],'firstMsgDirection':'out','Messages':[_[_0x9a62('0x58')](_0x387b70[_0x9a62('0x5b')],{'read':![],'body':_0x387b70[_0x9a62('0x5b')][_0x9a62('0xa9')][0x0][_0x9a62('0xb2')],'FaxAccountId':_0x5721c3['id'],'UserId':_0x387b70[_0x9a62('0x5c')]['id'],'ContactId':_0x3a1738['id'],'AttachmentId':_0x387b70[_0x9a62('0x5b')][_0x9a62('0xa9')][0x0]['id']})]},{'include':[{'model':db[_0x9a62('0xa4')],'as':'Messages'}]})[_0x9a62('0x21')](function(_0x49302f){return[_0x49302f,!![]];});});}else{throw new Error('Contact\x20not\x20found');}})[_0x9a62('0xb3')](function(_0x42b7a9,_0x2b3025){if(_0x2b3025){return _0x42b7a9;}return db[_0x9a62('0xa4')][_0x9a62('0x5a')]({'direction':_0x9a62('0xb4'),'read':![],'body':_0x387b70[_0x9a62('0x5b')]['attachments'][0x0][_0x9a62('0xb2')],'FaxAccountId':_0x5721c3['id'],'FaxInteractionId':_0x42b7a9['id'],'UserId':_0x387b70[_0x9a62('0x5c')]['id'],'ContactId':_0x42b7a9[_0x9a62('0xb5')],'AttachmentId':_0x387b70[_0x9a62('0x5b')][_0x9a62('0xa9')][0x0]['id']})['then'](function(_0x19f951){_0x42b7a9[_0x9a62('0xb6')][_0x9a62('0xb7')]=[];_0x42b7a9[_0x9a62('0xb6')][_0x9a62('0xb7')][_0x9a62('0x8a')](_0x19f951['dataValues']);return _0x42b7a9;});})[_0x9a62('0x21')](function(_0x3e7f3b){respondWithRpcPromise('SendFax',_0x9a62('0xb8'),{'FaxAccountId':_[_0x9a62('0xae')](_0x387b70[_0x9a62('0x55')]['id'])?undefined:_0x387b70[_0x9a62('0x55')]['id'],'path':_['isNil'](_0x387b70['body'][_0x9a62('0xa9')][0x0][_0x9a62('0x7')])?undefined:_0x387b70[_0x9a62('0x5b')][_0x9a62('0xa9')][0x0][_0x9a62('0x7')],'fax':_[_0x9a62('0xae')](_0x387b70[_0x9a62('0x5b')]['to'][0x0])?undefined:_0x387b70[_0x9a62('0x5b')]['to'][0x0],'AttachmentId':_0x387b70[_0x9a62('0x5b')][_0x9a62('0xa9')][0x0]['id']},client9002)[_0x9a62('0x21')](function(_0x2dd7a8){logger[_0x9a62('0x22')]('SendFaxRpc,\x20%s',_0x2dd7a8);})[_0x9a62('0x2a')](function(_0x9df881){logger['info'](_0x9a62('0xb9'),_0x9df881);});return _0x3e7f3b;})['then'](respondWithResult(_0x1fa5c7,null))[_0x9a62('0x2a')](handleError(_0x1fa5c7,null));};exports[_0x9a62('0xba')]=function(_0x43a46d,_0x3d0f78,_0xc7c164){return db[_0x9a62('0x3f')][_0x9a62('0x59')]({'where':{'id':_0x43a46d['params']['id']}})['then'](handleEntityNotFound(_0x3d0f78,null))[_0x9a62('0x21')](function(_0x49df22){if(_0x49df22){return _0x49df22[_0x9a62('0xba')](_0x43a46d[_0x9a62('0x5b')][_0x9a62('0x69')],_[_0x9a62('0xbb')](_0x43a46d['body'],[_0x9a62('0x69'),'id'])||{})[_0x9a62('0xb3')](function(_0x2e6cc6){for(var _0x5663eb=0x0;_0x5663eb<_0x43a46d[_0x9a62('0x5b')]['ids']['length'];_0x5663eb+=0x1){socket[_0x9a62('0xbc')](_0x9a62('0xbd'),{'UserId':Number(_0x43a46d[_0x9a62('0x5b')][_0x9a62('0x69')][_0x5663eb]),'FaxAccountId':Number(_0x43a46d[_0x9a62('0x55')]['id'])});}return _0x2e6cc6;});}})[_0x9a62('0x21')](respondWithResult(_0x3d0f78,null))['catch'](handleError(_0x3d0f78,null));};exports[_0x9a62('0xbe')]=function(_0x2ac561,_0x54aae4,_0x4e219d){return db['FaxAccount']['find']({'where':{'id':_0x2ac561[_0x9a62('0x55')]['id']}})[_0x9a62('0x21')](handleEntityNotFound(_0x54aae4,null))['then'](function(_0xf5e22){if(_0xf5e22){return _0xf5e22[_0x9a62('0xbe')](_0x2ac561[_0x9a62('0x44')][_0x9a62('0x69')])[_0x9a62('0x21')](function(){if(_[_0x9a62('0xbf')](_0x2ac561[_0x9a62('0x44')][_0x9a62('0x69')])){for(var _0x2d1847=0x0;_0x2d1847<_0x2ac561['query']['ids'][_0x9a62('0x48')];_0x2d1847+=0x1){socket[_0x9a62('0xbc')](_0x9a62('0xc0'),{'UserId':Number(_0x2ac561[_0x9a62('0x44')][_0x9a62('0x69')][_0x2d1847]),'FaxAccountId':Number(_0x2ac561[_0x9a62('0x55')]['id'])});}}else{socket[_0x9a62('0xbc')](_0x9a62('0xc0'),{'UserId':Number(_0x2ac561[_0x9a62('0x44')][_0x9a62('0x69')]),'FaxAccountId':Number(_0x2ac561[_0x9a62('0x55')]['id'])});}});}})['then'](respondWithStatusCode(_0x54aae4,null))[_0x9a62('0x2a')](handleError(_0x54aae4,null));};exports['getAgents']=function(_0x345161,_0x1aca42,_0x50c8fb){var _0x2f7a68={};var _0x1fda74={};var _0x52c146;var _0x170f7e;return db[_0x9a62('0x3f')][_0x9a62('0x66')]({'where':{'id':_0x345161[_0x9a62('0x55')]['id']}})[_0x9a62('0x21')](handleEntityNotFound(_0x1aca42,null))['then'](function(_0x5da7f2){if(_0x5da7f2){_0x52c146=_0x5da7f2;_0x1fda74[_0x9a62('0x43')]=_['keys'](db[_0x9a62('0xc1')]['rawAttributes']);_0x1fda74[_0x9a62('0x44')]=_[_0x9a62('0x57')](_0x345161[_0x9a62('0x44')]);_0x1fda74['filters']=_['intersection'](_0x1fda74[_0x9a62('0x43')],_0x1fda74[_0x9a62('0x44')]);_0x2f7a68[_0x9a62('0x47')]=_[_0x9a62('0x45')](_0x1fda74[_0x9a62('0x43')],qs['fields'](_0x345161[_0x9a62('0x44')][_0x9a62('0x46')]));_0x2f7a68['attributes']=_0x2f7a68[_0x9a62('0x47')][_0x9a62('0x48')]?_0x2f7a68[_0x9a62('0x47')]:_0x1fda74['model'];_0x2f7a68[_0x9a62('0x4b')]=qs['sort'](_0x345161['query']['sort']);_0x2f7a68['where']=qs[_0x9a62('0x4d')](_[_0x9a62('0x6d')](_0x345161[_0x9a62('0x44')],_0x1fda74[_0x9a62('0x4d')]));if(_0x345161[_0x9a62('0x44')][_0x9a62('0x4e')]){_0x2f7a68[_0x9a62('0x4f')]=_[_0x9a62('0x58')](_0x2f7a68[_0x9a62('0x4f')],{'$or':_[_0x9a62('0x3e')](_0x2f7a68[_0x9a62('0x47')],function(_0x4bdd71){var _0x1e30ec={};_0x1e30ec[_0x4bdd71]={'$like':'%'+_0x345161[_0x9a62('0x44')]['filter']+'%'};return _0x1e30ec;})});}_0x2f7a68=_[_0x9a62('0x58')]({},_0x2f7a68,_0x345161['options']);return _0x52c146[_0x9a62('0xc2')](_0x2f7a68);}})['then'](function(_0x55029e){if(_0x55029e){_0x170f7e=_0x55029e['length'];if(!_0x345161['query'][_0x9a62('0x49')](_0x9a62('0x4a'))){_0x2f7a68[_0x9a62('0x2f')]=qs[_0x9a62('0x2f')](_0x345161['query'][_0x9a62('0x2f')]);_0x2f7a68[_0x9a62('0x2d')]=qs[_0x9a62('0x2d')](_0x345161[_0x9a62('0x44')][_0x9a62('0x2d')]);}return _0x52c146['getAgents'](_0x2f7a68);}})['then'](function(_0x4ab083){if(_0x4ab083){return _0x4ab083?{'count':_0x170f7e,'rows':_0x4ab083}:null;}})[_0x9a62('0x21')](respondWithResult(_0x1aca42,null))[_0x9a62('0x2a')](handleError(_0x1aca42,null));}; \ No newline at end of file +var _0x8b7d=['ListId','findById','getMessages','FaxMessage','$gte','split','YYYY-MM-DD\x20HH:mm:ss','CmList','List','Contacts','DESC','attachments','root','server/files/attachments','CheckAfterSend','isNil','format','\x22%s\x22\x20<%s>','fax','defaults','List\x20not\x20found','Send\x20Fax\x20failed','out','Messages','Contact\x20not\x20found','spread','filename','ContactId','dataValues','SendFax','SendFaxRpc,\x20%s','addAgents','emit','userFaxAccount:save','removeAgents','userFaxAccount:remove','getAgents','eml-format','rimraf','zip-dir','request-promise','bluebird','mustache','path','sox','to-csv','ejs','fs-extra','lodash','squel','crypto','desk.js','querystring','../../components/parsers/qs','../../config/logger','api','../../config/utils','../../config/environment','../../mysqldb','redis','localhost','socket.io-emitter','./faxAccount.socket','jayson/promise','client','http','request','info','FaxAccount,\x20%s,\x20%s','request\x20sent','FaxAccount,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','catch','status','end','json','offset','undefined','limit','count','set','Content-Range','reject','save','update','then','destroy','get','FaxAccounts','UserProfileResource','name','send','index','Pause','mandatoryDispositionPause','FaxAccount','rawAttributes','fieldName','key','model','map','query','keys','filters','intersection','attributes','fields','length','sort','where','filter','merge','type','options','includeAll','findAll','rows','show','include','find','create','body','user','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','UserProfileSection','autoAssociation','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','params','describe','addDisposition','FaxAccountId','Disposition','getDispositions','findOne','hasOwnProperty','nolimit','order','pick','ids','addAnswer','CannedAnswer','removeAnswers','addInteraction','FaxInteraction','omit','getInteractions','CmContact','Contact','User','Owner','internal','Tag','color','tag','addApplications','sequelize','Transaction','ISOLATION_LEVELS','READ_COMMITTED','FaxApplication','bulkCreate','findAndCountAll','priority','stack','finally','sendStatus','getApplications','context','from-voip-provider','exten','localstationid','app','description','Fax\x20Extension','appdata','Answer','push','CDR(type)=inbound-fax','Set','ecm','gateway','faxdetect','headerinfo','maxrate','modem','t38timeout','FAXOPT(','Wait','/var/opt/motion2/server/files/attachments/fax-${CALLERID(num)}-${CUT(UNIQUEID,.,1)}-${CUT(UNIQUEID,.,2)}-${STRFTIME(,,%C%y%m%d%H%M%S)}-rx.tif,d','addAccountApplications','transaction','VoiceExtension','tech','createdAt','updatedAt','TrunkId'];(function(_0x5490b6,_0x518350){var _0x3a9f0b=function(_0x4d0e0f){while(--_0x4d0e0f){_0x5490b6['push'](_0x5490b6['shift']());}};_0x3a9f0b(++_0x518350);}(_0x8b7d,0xee));var _0xd8b7=function(_0x175136,_0x5cefc5){_0x175136=_0x175136-0x0;var _0x5931cc=_0x8b7d[_0x175136];return _0x5931cc;};'use strict';var emlformat=require(_0xd8b7('0x0'));var rimraf=require(_0xd8b7('0x1'));var zipdir=require(_0xd8b7('0x2'));var jsonpatch=require('fast-json-patch');var rp=require(_0xd8b7('0x3'));var moment=require('moment');var BPromise=require(_0xd8b7('0x4'));var Mustache=require(_0xd8b7('0x5'));var util=require('util');var path=require(_0xd8b7('0x6'));var sox=require(_0xd8b7('0x7'));var csv=require(_0xd8b7('0x8'));var ejs=require(_0xd8b7('0x9'));var fs=require('fs');var fs_extra=require(_0xd8b7('0xa'));var _=require(_0xd8b7('0xb'));var squel=require(_0xd8b7('0xc'));var crypto=require(_0xd8b7('0xd'));var jsforce=require('jsforce');var deskjs=require(_0xd8b7('0xe'));var toCsv=require(_0xd8b7('0x8'));var querystring=require(_0xd8b7('0xf'));var Papa=require('papaparse');var Redis=require('ioredis');var authService=require('../../components/auth/service');var qs=require(_0xd8b7('0x10'));var as=require('../../components/parsers/advancedSearch');var hardwareService=require('../../config/license/hardware');var logger=require(_0xd8b7('0x11'))(_0xd8b7('0x12'));var utils=require(_0xd8b7('0x13'));var config=require(_0xd8b7('0x14'));var licenseUtil=require('../../config/license/util');var db=require(_0xd8b7('0x15'))['db'];config[_0xd8b7('0x16')]=_['defaults'](config['redis'],{'host':_0xd8b7('0x17'),'port':0x18eb});var socket=require(_0xd8b7('0x18'))(new Redis(config[_0xd8b7('0x16')]));require(_0xd8b7('0x19'))['register'](socket);var jayson=require(_0xd8b7('0x1a'));var client=jayson[_0xd8b7('0x1b')]['http']({'port':0x232c});var client9002=jayson[_0xd8b7('0x1b')][_0xd8b7('0x1c')]({'port':0x232a});function respondWithRpcPromise(_0x56a046,_0x4cbf65,_0x30a6fd,_0x4a2a30){return new BPromise(function(_0x58e749,_0x5bc071){var _0x24bac7=_0x4a2a30||client;return _0x24bac7[_0xd8b7('0x1d')](_0x56a046,_0x30a6fd)['then'](function(_0x39d51c){logger[_0xd8b7('0x1e')](_0xd8b7('0x1f'),_0x4cbf65,_0xd8b7('0x20'));logger['debug'](_0xd8b7('0x21'),_0x4cbf65,'request\x20sent',JSON[_0xd8b7('0x22')](_0x39d51c));if(_0x39d51c['error']){if(_0x39d51c[_0xd8b7('0x23')][_0xd8b7('0x24')]===0x1f4){logger['error']('FaxAccount,\x20%s,\x20%s',_0x4cbf65,_0x39d51c[_0xd8b7('0x23')][_0xd8b7('0x25')]);return _0x5bc071(_0x39d51c['error'][_0xd8b7('0x25')]);}logger['error'](_0xd8b7('0x1f'),_0x4cbf65,_0x39d51c[_0xd8b7('0x23')][_0xd8b7('0x25')]);return _0x58e749(_0x39d51c[_0xd8b7('0x23')]['message']);}else{logger[_0xd8b7('0x1e')](_0xd8b7('0x1f'),_0x4cbf65,_0xd8b7('0x20'));_0x58e749(_0x39d51c[_0xd8b7('0x26')][_0xd8b7('0x25')]);}})[_0xd8b7('0x27')](function(_0x5a9b68){logger['error'](_0xd8b7('0x1f'),_0x4cbf65,_0x5a9b68);_0x5bc071(_0x5a9b68);});});}function respondWithStatusCode(_0x22cfcd,_0x4d04bd){_0x4d04bd=_0x4d04bd||0xcc;return function(_0xad017b){if(_0xad017b){return _0x22cfcd['sendStatus'](_0x4d04bd);}return _0x22cfcd[_0xd8b7('0x28')](_0x4d04bd)[_0xd8b7('0x29')]();};}function respondWithResult(_0x3ebeb9,_0x44f926){_0x44f926=_0x44f926||0xc8;return function(_0x3882af){if(_0x3882af){return _0x3ebeb9[_0xd8b7('0x28')](_0x44f926)[_0xd8b7('0x2a')](_0x3882af);}};}function respondWithFilteredResult(_0xf6d2be,_0x5d5c06){return function(_0x18e99a){if(_0x18e99a){var _0x59d1e7=typeof _0x5d5c06[_0xd8b7('0x2b')]===_0xd8b7('0x2c')&&typeof _0x5d5c06[_0xd8b7('0x2d')]===_0xd8b7('0x2c');var _0x4e0c75=_0x18e99a['count'];var _0x54bf66=_0x59d1e7?0x0:_0x5d5c06[_0xd8b7('0x2b')];var _0x150103=_0x59d1e7?_0x18e99a[_0xd8b7('0x2e')]:_0x5d5c06[_0xd8b7('0x2b')]+_0x5d5c06['limit'];var _0x1f8850;if(_0x150103>=_0x4e0c75){_0x150103=_0x4e0c75;_0x1f8850=0xc8;}else{_0x1f8850=0xce;}_0xf6d2be['status'](_0x1f8850);return _0xf6d2be[_0xd8b7('0x2f')](_0xd8b7('0x30'),_0x54bf66+'-'+_0x150103+'/'+_0x4e0c75)[_0xd8b7('0x2a')](_0x18e99a);}return null;};}function patchUpdates(_0x9125d0){return function(_0x537a3e){try{jsonpatch['apply'](_0x537a3e,_0x9125d0,!![]);}catch(_0x3fda6a){return BPromise[_0xd8b7('0x31')](_0x3fda6a);}return _0x537a3e[_0xd8b7('0x32')]();};}function saveUpdates(_0x1be32d,_0x4114d1){return function(_0x47099a){if(_0x47099a){return _0x47099a[_0xd8b7('0x33')](_0x1be32d)[_0xd8b7('0x34')](function(_0x2fb07a){return _0x2fb07a;});}return null;};}function removeEntity(_0xfbe9e,_0x3eb11a){return function(_0x5abff1){if(_0x5abff1){return _0x5abff1[_0xd8b7('0x35')]()[_0xd8b7('0x34')](function(){var _0x3ee6e8=_0x5abff1[_0xd8b7('0x36')]({'plain':!![]});var _0x2ad3a9=_0xd8b7('0x37');return db[_0xd8b7('0x38')][_0xd8b7('0x35')]({'where':{'type':_0x2ad3a9,'resourceId':_0x3ee6e8['id']}})[_0xd8b7('0x34')](function(){return _0x5abff1;});})[_0xd8b7('0x34')](function(){_0xfbe9e[_0xd8b7('0x28')](0xcc)[_0xd8b7('0x29')]();});}};}function handleEntityNotFound(_0xd95fed,_0x41f3d0){return function(_0xc0637){if(!_0xc0637){_0xd95fed['sendStatus'](0x194);}return _0xc0637;};}function handleError(_0x1574b2,_0x34d8ac){_0x34d8ac=_0x34d8ac||0x1f4;return function(_0x4ab72f){logger[_0xd8b7('0x23')](_0x4ab72f['stack']);if(_0x4ab72f['name']){delete _0x4ab72f[_0xd8b7('0x39')];}_0x1574b2[_0xd8b7('0x28')](_0x34d8ac)[_0xd8b7('0x3a')](_0x4ab72f);};}exports[_0xd8b7('0x3b')]=function(_0x4a4caa,_0x135529){var _0x10b2b3={'include':[{'model':db[_0xd8b7('0x3c')],'as':_0xd8b7('0x3d')}]},_0x1e2a76={},_0x2796e0={'count':0x0,'rows':[]};var _0x5ab6ba=_['map'](db[_0xd8b7('0x3e')][_0xd8b7('0x3f')],function(_0xbbfd9b){return{'name':_0xbbfd9b[_0xd8b7('0x40')],'type':_0xbbfd9b['type'][_0xd8b7('0x41')]};});_0x1e2a76[_0xd8b7('0x42')]=_[_0xd8b7('0x43')](_0x5ab6ba,_0xd8b7('0x39'));_0x1e2a76[_0xd8b7('0x44')]=_[_0xd8b7('0x45')](_0x4a4caa['query']);_0x1e2a76[_0xd8b7('0x46')]=_[_0xd8b7('0x47')](_0x1e2a76[_0xd8b7('0x42')],_0x1e2a76[_0xd8b7('0x44')]);_0x10b2b3[_0xd8b7('0x48')]=_[_0xd8b7('0x47')](_0x1e2a76[_0xd8b7('0x42')],qs[_0xd8b7('0x49')](_0x4a4caa[_0xd8b7('0x44')][_0xd8b7('0x49')]));_0x10b2b3[_0xd8b7('0x48')]=_0x10b2b3[_0xd8b7('0x48')][_0xd8b7('0x4a')]?_0x10b2b3[_0xd8b7('0x48')]:_0x1e2a76[_0xd8b7('0x42')];if(!_0x4a4caa[_0xd8b7('0x44')]['hasOwnProperty']('nolimit')){_0x10b2b3['limit']=qs['limit'](_0x4a4caa['query'][_0xd8b7('0x2d')]);_0x10b2b3[_0xd8b7('0x2b')]=qs[_0xd8b7('0x2b')](_0x4a4caa[_0xd8b7('0x44')][_0xd8b7('0x2b')]);}_0x10b2b3['order']=qs[_0xd8b7('0x4b')](_0x4a4caa[_0xd8b7('0x44')][_0xd8b7('0x4b')]);_0x10b2b3[_0xd8b7('0x4c')]=qs[_0xd8b7('0x46')](_['pick'](_0x4a4caa['query'],_0x1e2a76['filters']),_0x5ab6ba);if(_0x4a4caa[_0xd8b7('0x44')][_0xd8b7('0x4d')]){_0x10b2b3[_0xd8b7('0x4c')]=_[_0xd8b7('0x4e')](_0x10b2b3[_0xd8b7('0x4c')],{'$or':_['map'](_0x5ab6ba,function(_0x2a1df1){if(_0x2a1df1[_0xd8b7('0x4f')]!=='VIRTUAL'){var _0x71f13e={};_0x71f13e[_0x2a1df1['name']]={'$like':'%'+_0x4a4caa[_0xd8b7('0x44')][_0xd8b7('0x4d')]+'%'};return _0x71f13e;}})});}_0x10b2b3=_[_0xd8b7('0x4e')]({},_0x10b2b3,_0x4a4caa[_0xd8b7('0x50')]);var _0x2d51d9={'where':_0x10b2b3['where']};return db[_0xd8b7('0x3e')][_0xd8b7('0x2e')](_0x2d51d9)[_0xd8b7('0x34')](function(_0x44138c){_0x2796e0[_0xd8b7('0x2e')]=_0x44138c;if(_0x4a4caa['query'][_0xd8b7('0x51')]){_0x10b2b3['include']=[{'all':!![]}];}return db['FaxAccount'][_0xd8b7('0x52')](_0x10b2b3);})[_0xd8b7('0x34')](function(_0x49919f){_0x2796e0[_0xd8b7('0x53')]=_0x49919f;return _0x2796e0;})[_0xd8b7('0x34')](respondWithFilteredResult(_0x135529,_0x10b2b3))['catch'](handleError(_0x135529,null));};exports[_0xd8b7('0x54')]=function(_0x1f0955,_0x43dd31){var _0x13f211={'raw':![],'where':{'id':_0x1f0955['params']['id']},'include':[{'model':db[_0xd8b7('0x3c')],'as':_0xd8b7('0x3d')}]},_0x147b73={};_0x147b73[_0xd8b7('0x42')]=_[_0xd8b7('0x45')](db[_0xd8b7('0x3e')][_0xd8b7('0x3f')]);_0x147b73[_0xd8b7('0x44')]=_['keys'](_0x1f0955[_0xd8b7('0x44')]);_0x147b73['filters']=_[_0xd8b7('0x47')](_0x147b73['model'],_0x147b73[_0xd8b7('0x44')]);_0x13f211['attributes']=_[_0xd8b7('0x47')](_0x147b73['model'],qs['fields'](_0x1f0955[_0xd8b7('0x44')][_0xd8b7('0x49')]));_0x13f211[_0xd8b7('0x48')]=_0x13f211[_0xd8b7('0x48')][_0xd8b7('0x4a')]?_0x13f211[_0xd8b7('0x48')]:_0x147b73[_0xd8b7('0x42')];if(_0x1f0955[_0xd8b7('0x44')][_0xd8b7('0x51')]){_0x13f211[_0xd8b7('0x55')]=[{'all':!![]}];}_0x13f211=_['merge']({},_0x13f211,_0x1f0955['options']);return db[_0xd8b7('0x3e')][_0xd8b7('0x56')](_0x13f211)[_0xd8b7('0x34')](handleEntityNotFound(_0x43dd31,null))[_0xd8b7('0x34')](respondWithResult(_0x43dd31,null))[_0xd8b7('0x27')](handleError(_0x43dd31,null));};exports[_0xd8b7('0x57')]=function(_0x22afcb,_0x445a9f){return db[_0xd8b7('0x3e')][_0xd8b7('0x57')](_0x22afcb[_0xd8b7('0x58')],{})[_0xd8b7('0x34')](function(_0x179aab){var _0x4aa3de=_0x22afcb[_0xd8b7('0x59')][_0xd8b7('0x36')]({'plain':!![]});if(!_0x4aa3de)throw new Error(_0xd8b7('0x5a'));if(_0x4aa3de[_0xd8b7('0x5b')]===_0xd8b7('0x59')){var _0x2fe066=_0x179aab[_0xd8b7('0x36')]({'plain':!![]});var _0x39fb37='FaxAccounts';return db[_0xd8b7('0x5c')][_0xd8b7('0x56')]({'where':{'name':_0x39fb37,'userProfileId':_0x4aa3de['userProfileId']},'raw':!![]})[_0xd8b7('0x34')](function(_0x5416a1){if(_0x5416a1&&_0x5416a1[_0xd8b7('0x5d')]===0x0){return db[_0xd8b7('0x38')]['create']({'name':_0x2fe066['name'],'resourceId':_0x2fe066['id'],'type':_0x5416a1[_0xd8b7('0x39')],'sectionId':_0x5416a1['id']},{})['then'](function(){return _0x179aab;});}else{return _0x179aab;}})[_0xd8b7('0x27')](function(_0x419591){logger[_0xd8b7('0x23')](_0xd8b7('0x5e'),_0x419591);throw _0x419591;});}return _0x179aab;})[_0xd8b7('0x34')](respondWithResult(_0x445a9f,0xc9))['catch'](handleError(_0x445a9f,null));};exports[_0xd8b7('0x33')]=function(_0x38b2a5,_0x92ec2c){if(_0x38b2a5[_0xd8b7('0x58')]['id']){delete _0x38b2a5[_0xd8b7('0x58')]['id'];}return db[_0xd8b7('0x3e')][_0xd8b7('0x56')]({'where':{'id':_0x38b2a5[_0xd8b7('0x5f')]['id']},'include':[{'model':db[_0xd8b7('0x3c')],'as':_0xd8b7('0x3d')}]})[_0xd8b7('0x34')](handleEntityNotFound(_0x92ec2c,null))[_0xd8b7('0x34')](saveUpdates(_0x38b2a5[_0xd8b7('0x58')],null))[_0xd8b7('0x34')](respondWithResult(_0x92ec2c,null))[_0xd8b7('0x27')](handleError(_0x92ec2c,null));};exports[_0xd8b7('0x35')]=function(_0x47329e,_0x3c83cd){return db[_0xd8b7('0x3e')]['find']({'where':{'id':_0x47329e[_0xd8b7('0x5f')]['id']}})['then'](handleEntityNotFound(_0x3c83cd,null))[_0xd8b7('0x34')](removeEntity(_0x3c83cd,null))[_0xd8b7('0x27')](handleError(_0x3c83cd,null));};exports[_0xd8b7('0x60')]=function(_0x4d0e3e,_0x19b3d5){return db[_0xd8b7('0x3e')][_0xd8b7('0x60')]()['then'](respondWithResult(_0x19b3d5,null))[_0xd8b7('0x27')](handleError(_0x19b3d5,null));};exports[_0xd8b7('0x61')]=function(_0xf1b3d0,_0xca880f,_0x479616){if(_0xf1b3d0[_0xd8b7('0x58')]['id']){delete _0xf1b3d0[_0xd8b7('0x58')]['id'];}return db[_0xd8b7('0x3e')][_0xd8b7('0x56')]({'where':{'id':_0xf1b3d0[_0xd8b7('0x5f')]['id']}})['then'](handleEntityNotFound(_0xca880f,null))[_0xd8b7('0x34')](function(_0x3b92e3){if(_0x3b92e3){_0xf1b3d0[_0xd8b7('0x58')][_0xd8b7('0x62')]=_0x3b92e3['id'];return db[_0xd8b7('0x63')][_0xd8b7('0x57')](_0xf1b3d0[_0xd8b7('0x58')]);}})['then'](respondWithResult(_0xca880f,null))[_0xd8b7('0x27')](handleError(_0xca880f,null));};exports[_0xd8b7('0x64')]=function(_0x3497a5,_0x5f1da2,_0x50130d){var _0x5c2a06={'raw':![],'where':{}};var _0x27d232={};var _0x87880f={'count':0x0,'rows':[]};return db['FaxAccount'][_0xd8b7('0x65')]({'where':{'id':_0x3497a5[_0xd8b7('0x5f')]['id']}})[_0xd8b7('0x34')](handleEntityNotFound(_0x5f1da2,null))['then'](function(_0x306e86){if(_0x306e86){_0x27d232[_0xd8b7('0x42')]=_[_0xd8b7('0x45')](db[_0xd8b7('0x63')][_0xd8b7('0x3f')]);_0x27d232['query']=_['keys'](_0x3497a5[_0xd8b7('0x44')]);_0x27d232[_0xd8b7('0x46')]=_[_0xd8b7('0x47')](_0x27d232[_0xd8b7('0x42')],_0x27d232[_0xd8b7('0x44')]);_0x5c2a06[_0xd8b7('0x48')]=_[_0xd8b7('0x47')](_0x27d232['model'],qs['fields'](_0x3497a5[_0xd8b7('0x44')][_0xd8b7('0x49')]));_0x5c2a06[_0xd8b7('0x48')]=_0x5c2a06[_0xd8b7('0x48')][_0xd8b7('0x4a')]?_0x5c2a06[_0xd8b7('0x48')]:_0x27d232[_0xd8b7('0x42')];if(!_0x3497a5['query'][_0xd8b7('0x66')](_0xd8b7('0x67'))){_0x5c2a06['limit']=qs[_0xd8b7('0x2d')](_0x3497a5[_0xd8b7('0x44')][_0xd8b7('0x2d')]);_0x5c2a06[_0xd8b7('0x2b')]=qs['offset'](_0x3497a5[_0xd8b7('0x44')][_0xd8b7('0x2b')]);}_0x5c2a06[_0xd8b7('0x68')]=qs[_0xd8b7('0x4b')](_0x3497a5[_0xd8b7('0x44')][_0xd8b7('0x4b')]);_0x5c2a06[_0xd8b7('0x4c')]=qs['filters'](_[_0xd8b7('0x69')](_0x3497a5['query'],_0x27d232[_0xd8b7('0x46')]));_0x5c2a06[_0xd8b7('0x4c')][_0xd8b7('0x62')]=_0x306e86['id'];if(_0x3497a5[_0xd8b7('0x44')][_0xd8b7('0x4d')]){_0x5c2a06[_0xd8b7('0x4c')]=_[_0xd8b7('0x4e')](_0x5c2a06[_0xd8b7('0x4c')],{'$or':_[_0xd8b7('0x43')](_0x5c2a06['attributes'],function(_0x41b0a1){var _0x1e14e6={};_0x1e14e6[_0x41b0a1]={'$like':'%'+_0x3497a5[_0xd8b7('0x44')][_0xd8b7('0x4d')]+'%'};return _0x1e14e6;})});}_0x5c2a06=_[_0xd8b7('0x4e')]({},_0x5c2a06,_0x3497a5[_0xd8b7('0x50')]);return db[_0xd8b7('0x63')][_0xd8b7('0x2e')]({'where':_0x5c2a06[_0xd8b7('0x4c')]})[_0xd8b7('0x34')](function(_0x24bca6){_0x87880f[_0xd8b7('0x2e')]=_0x24bca6;if(_0x3497a5['query']['includeAll']){_0x5c2a06[_0xd8b7('0x55')]=[{'all':!![]}];}return db[_0xd8b7('0x63')][_0xd8b7('0x52')](_0x5c2a06);})['then'](function(_0xa23e58){_0x87880f[_0xd8b7('0x53')]=_0xa23e58;return _0x87880f;});}})[_0xd8b7('0x34')](respondWithFilteredResult(_0x5f1da2,_0x5c2a06))['catch'](handleError(_0x5f1da2,null));};exports['removeDispositions']=function(_0x3bc092,_0x4ef161,_0x4f381d){return db[_0xd8b7('0x3e')][_0xd8b7('0x56')]({'where':{'id':_0x3bc092[_0xd8b7('0x5f')]['id']}})[_0xd8b7('0x34')](handleEntityNotFound(_0x4ef161,null))[_0xd8b7('0x34')](function(_0x5a7f56){if(_0x5a7f56){return _0x5a7f56['removeDispositions'](_0x3bc092[_0xd8b7('0x44')][_0xd8b7('0x6a')]);}})[_0xd8b7('0x34')](respondWithStatusCode(_0x4ef161,null))[_0xd8b7('0x27')](handleError(_0x4ef161,null));};exports[_0xd8b7('0x6b')]=function(_0x16a558,_0x301186,_0x5baf9a){if(_0x16a558['body']['id']){delete _0x16a558['body']['id'];}return db[_0xd8b7('0x3e')][_0xd8b7('0x56')]({'where':{'id':_0x16a558[_0xd8b7('0x5f')]['id']}})['then'](handleEntityNotFound(_0x301186,null))[_0xd8b7('0x34')](function(_0x1052f7){if(_0x1052f7){_0x16a558[_0xd8b7('0x58')][_0xd8b7('0x62')]=_0x1052f7['id'];return db[_0xd8b7('0x6c')][_0xd8b7('0x57')](_0x16a558['body']);}})[_0xd8b7('0x34')](respondWithResult(_0x301186,null))[_0xd8b7('0x27')](handleError(_0x301186,null));};exports['getAnswers']=function(_0x570f65,_0x1c611d,_0x130b68){var _0x3b188d={'raw':![],'where':{}};var _0x3a8a95={};var _0xac4a83={'count':0x0,'rows':[]};return db[_0xd8b7('0x3e')][_0xd8b7('0x65')]({'where':{'id':_0x570f65[_0xd8b7('0x5f')]['id']}})[_0xd8b7('0x34')](handleEntityNotFound(_0x1c611d,null))[_0xd8b7('0x34')](function(_0x4eb03e){if(_0x4eb03e){_0x3a8a95[_0xd8b7('0x42')]=_[_0xd8b7('0x45')](db[_0xd8b7('0x6c')][_0xd8b7('0x3f')]);_0x3a8a95['query']=_[_0xd8b7('0x45')](_0x570f65[_0xd8b7('0x44')]);_0x3a8a95[_0xd8b7('0x46')]=_['intersection'](_0x3a8a95[_0xd8b7('0x42')],_0x3a8a95[_0xd8b7('0x44')]);_0x3b188d[_0xd8b7('0x48')]=_[_0xd8b7('0x47')](_0x3a8a95['model'],qs[_0xd8b7('0x49')](_0x570f65[_0xd8b7('0x44')][_0xd8b7('0x49')]));_0x3b188d[_0xd8b7('0x48')]=_0x3b188d['attributes'][_0xd8b7('0x4a')]?_0x3b188d['attributes']:_0x3a8a95[_0xd8b7('0x42')];if(!_0x570f65[_0xd8b7('0x44')]['hasOwnProperty']('nolimit')){_0x3b188d[_0xd8b7('0x2d')]=qs[_0xd8b7('0x2d')](_0x570f65['query']['limit']);_0x3b188d[_0xd8b7('0x2b')]=qs[_0xd8b7('0x2b')](_0x570f65[_0xd8b7('0x44')]['offset']);}_0x3b188d['order']=qs[_0xd8b7('0x4b')](_0x570f65[_0xd8b7('0x44')]['sort']);_0x3b188d['where']=qs[_0xd8b7('0x46')](_['pick'](_0x570f65['query'],_0x3a8a95[_0xd8b7('0x46')]));_0x3b188d[_0xd8b7('0x4c')][_0xd8b7('0x62')]=_0x4eb03e['id'];if(_0x570f65[_0xd8b7('0x44')][_0xd8b7('0x4d')]){_0x3b188d[_0xd8b7('0x4c')]=_[_0xd8b7('0x4e')](_0x3b188d['where'],{'$or':_[_0xd8b7('0x43')](_0x3b188d['attributes'],function(_0x30df89){var _0x41659d={};_0x41659d[_0x30df89]={'$like':'%'+_0x570f65['query'][_0xd8b7('0x4d')]+'%'};return _0x41659d;})});}_0x3b188d=_[_0xd8b7('0x4e')]({},_0x3b188d,_0x570f65[_0xd8b7('0x50')]);return db['CannedAnswer']['count']({'where':_0x3b188d[_0xd8b7('0x4c')]})[_0xd8b7('0x34')](function(_0x4763bf){_0xac4a83['count']=_0x4763bf;if(_0x570f65[_0xd8b7('0x44')][_0xd8b7('0x51')]){_0x3b188d['include']=[{'all':!![]}];}return db[_0xd8b7('0x6c')][_0xd8b7('0x52')](_0x3b188d);})[_0xd8b7('0x34')](function(_0x529535){_0xac4a83['rows']=_0x529535;return _0xac4a83;});}})[_0xd8b7('0x34')](respondWithFilteredResult(_0x1c611d,_0x3b188d))[_0xd8b7('0x27')](handleError(_0x1c611d,null));};exports['removeAnswers']=function(_0x1732e3,_0xc5dde7,_0x4cb512){return db['FaxAccount']['find']({'where':{'id':_0x1732e3[_0xd8b7('0x5f')]['id']}})[_0xd8b7('0x34')](handleEntityNotFound(_0xc5dde7,null))['then'](function(_0x500497){if(_0x500497){return _0x500497[_0xd8b7('0x6d')](_0x1732e3[_0xd8b7('0x44')]['ids']);}})[_0xd8b7('0x34')](respondWithStatusCode(_0xc5dde7,null))[_0xd8b7('0x27')](handleError(_0xc5dde7,null));};exports[_0xd8b7('0x6e')]=function(_0xf3596c,_0x383b1c,_0x55ebfd){return db[_0xd8b7('0x6f')][_0xd8b7('0x56')]({'where':{'id':_0xf3596c[_0xd8b7('0x5f')]['id']}})[_0xd8b7('0x34')](handleEntityNotFound(_0x383b1c,null))[_0xd8b7('0x34')](function(_0x3debbb){if(_0x3debbb){return _0x3debbb[_0xd8b7('0x6e')](_0xf3596c[_0xd8b7('0x58')]['ids'],_[_0xd8b7('0x70')](_0xf3596c[_0xd8b7('0x58')],[_0xd8b7('0x6a'),'id'])||{});}})[_0xd8b7('0x34')](respondWithResult(_0x383b1c,null))[_0xd8b7('0x27')](handleError(_0x383b1c,null));};exports[_0xd8b7('0x71')]=function(_0x4f9f55,_0x1b91db,_0x29a57f){var _0x1f8132={'raw':![],'where':{}};var _0x45ad60={};var _0x2c2fe1={'count':0x0,'rows':[]};return db[_0xd8b7('0x3e')]['findOne']({'where':{'id':_0x4f9f55[_0xd8b7('0x5f')]['id']}})[_0xd8b7('0x34')](handleEntityNotFound(_0x1b91db,null))[_0xd8b7('0x34')](function(_0x287caa){if(_0x287caa){_0x45ad60[_0xd8b7('0x42')]=_[_0xd8b7('0x45')](db[_0xd8b7('0x6f')]['rawAttributes']);_0x45ad60['query']=_[_0xd8b7('0x45')](_0x4f9f55['query']);_0x45ad60[_0xd8b7('0x46')]=_['intersection'](_0x45ad60['model'],_0x45ad60[_0xd8b7('0x44')]);_0x1f8132[_0xd8b7('0x48')]=_[_0xd8b7('0x47')](_0x45ad60[_0xd8b7('0x42')],qs[_0xd8b7('0x49')](_0x4f9f55['query']['fields']));_0x1f8132[_0xd8b7('0x48')]=_0x1f8132[_0xd8b7('0x48')][_0xd8b7('0x4a')]?_0x1f8132['attributes']:_0x45ad60['model'];if(!_0x4f9f55['query']['hasOwnProperty'](_0xd8b7('0x67'))){_0x1f8132[_0xd8b7('0x2d')]=qs[_0xd8b7('0x2d')](_0x4f9f55[_0xd8b7('0x44')][_0xd8b7('0x2d')]);_0x1f8132['offset']=qs[_0xd8b7('0x2b')](_0x4f9f55[_0xd8b7('0x44')][_0xd8b7('0x2b')]);}_0x1f8132[_0xd8b7('0x68')]=qs[_0xd8b7('0x4b')](_0x4f9f55[_0xd8b7('0x44')][_0xd8b7('0x4b')]);_0x1f8132[_0xd8b7('0x4c')]=qs[_0xd8b7('0x46')](_[_0xd8b7('0x69')](_0x4f9f55[_0xd8b7('0x44')],_0x45ad60[_0xd8b7('0x46')]));_0x1f8132[_0xd8b7('0x4c')][_0xd8b7('0x62')]=_0x287caa['id'];if(_0x4f9f55[_0xd8b7('0x44')][_0xd8b7('0x4d')]){_0x1f8132[_0xd8b7('0x4c')]=_[_0xd8b7('0x4e')](_0x1f8132[_0xd8b7('0x4c')],{'$or':_[_0xd8b7('0x43')](_0x1f8132['attributes'],function(_0x264cb1){var _0x162642={};_0x162642[_0x264cb1]={'$like':'%'+_0x4f9f55[_0xd8b7('0x44')][_0xd8b7('0x4d')]+'%'};return _0x162642;})});}_0x1f8132=_[_0xd8b7('0x4e')]({},_0x1f8132,_0x4f9f55[_0xd8b7('0x50')]);return db[_0xd8b7('0x6f')][_0xd8b7('0x2e')]({'where':_0x1f8132['where']})[_0xd8b7('0x34')](function(_0x4af21e){_0x2c2fe1['count']=_0x4af21e;if(_0x4f9f55[_0xd8b7('0x44')]['includeAll']){_0x1f8132[_0xd8b7('0x55')]=[{'model':db[_0xd8b7('0x72')],'as':_0xd8b7('0x73'),'required':![]},{'model':db[_0xd8b7('0x74')],'as':_0xd8b7('0x75'),'attributes':[_0xd8b7('0x39'),'fullname',_0xd8b7('0x76')],'required':![]},{'model':db[_0xd8b7('0x77')],'as':'Tags','attributes':['id','name',_0xd8b7('0x78')],'where':_0x4f9f55[_0xd8b7('0x44')]['tag']?{'id':_0x4f9f55[_0xd8b7('0x44')][_0xd8b7('0x79')]}:undefined,'required':_0x4f9f55[_0xd8b7('0x44')]['tag']?!![]:![]}];}return db['FaxInteraction'][_0xd8b7('0x52')](_0x1f8132);})[_0xd8b7('0x34')](function(_0x4d7018){_0x2c2fe1[_0xd8b7('0x53')]=_0x4d7018;return _0x2c2fe1;});}})[_0xd8b7('0x34')](respondWithFilteredResult(_0x1b91db,_0x1f8132))['catch'](handleError(_0x1b91db,null));};exports[_0xd8b7('0x7a')]=function(_0x2348b9,_0x1b941e){var _0x555a5f=_0x2348b9[_0xd8b7('0x5f')]['id'];var _0x1c2c8c=_0x2348b9['body'];var _0x291a40=0xc8;var _0x3a4b9f=null;return db[_0xd8b7('0x7b')]['transaction']({'isolationLevel':db[_0xd8b7('0x7b')][_0xd8b7('0x7c')][_0xd8b7('0x7d')][_0xd8b7('0x7e')]},function(_0x5ce39f){return db[_0xd8b7('0x3e')][_0xd8b7('0x65')]({'where':{'id':_0x555a5f},'transaction':_0x5ce39f})[_0xd8b7('0x34')](function(_0x417f6c){if(_0x417f6c){return db[_0xd8b7('0x7f')]['destroy']({'where':{'FaxAccountId':_0x555a5f},'transaction':_0x5ce39f})[_0xd8b7('0x34')](function(){var _0x318b25=_['map'](_0x1c2c8c,function(_0x3658ec){_0x3658ec[_0xd8b7('0x62')]=_0x555a5f;return _0x3658ec;});return db[_0xd8b7('0x7f')][_0xd8b7('0x80')](_0x318b25,{'transaction':_0x5ce39f});});}else{_0x291a40=0x194;_0x3a4b9f=[];}});})[_0xd8b7('0x34')](function(){if(_0x291a40!==0x194){return db['FaxApplication'][_0xd8b7('0x81')]({'where':{'FaxAccountId':_0x555a5f},'order':_0xd8b7('0x82')})[_0xd8b7('0x34')](function(_0x5d3e04){_0x3a4b9f=_0x5d3e04;});}})[_0xd8b7('0x27')](function(_0x58cc19){_0x291a40=0x1f4;logger[_0xd8b7('0x23')](_0x58cc19[_0xd8b7('0x83')]);if(_0x58cc19[_0xd8b7('0x39')]){delete _0x58cc19[_0xd8b7('0x39')];}_0x3a4b9f=_0x58cc19;})[_0xd8b7('0x84')](function(){if(_0x3a4b9f===null){_0x1b941e[_0xd8b7('0x85')](_0x291a40);}else{if(_0x291a40===0x1f4){_0x1b941e[_0xd8b7('0x28')](_0x291a40)[_0xd8b7('0x3a')](_0x3a4b9f);}else{_0x1b941e[_0xd8b7('0x28')](_0x291a40)[_0xd8b7('0x2a')](_0x3a4b9f);}}});};exports[_0xd8b7('0x86')]=function(_0x596a84,_0x44784f,_0x39adb1){var _0x374392={};var _0x558fc7={};var _0x430180;var _0x18dcc2;return db[_0xd8b7('0x3e')][_0xd8b7('0x65')]({'where':{'id':_0x596a84[_0xd8b7('0x5f')]['id']}})[_0xd8b7('0x34')](handleEntityNotFound(_0x44784f,null))[_0xd8b7('0x34')](function(_0x244063){if(_0x244063){_0x430180=_0x244063;_0x558fc7[_0xd8b7('0x42')]=_[_0xd8b7('0x45')](db[_0xd8b7('0x7f')][_0xd8b7('0x3f')]);_0x558fc7[_0xd8b7('0x44')]=_['keys'](_0x596a84[_0xd8b7('0x44')]);_0x558fc7[_0xd8b7('0x46')]=_[_0xd8b7('0x47')](_0x558fc7['model'],_0x558fc7[_0xd8b7('0x44')]);_0x374392[_0xd8b7('0x48')]=_[_0xd8b7('0x47')](_0x558fc7[_0xd8b7('0x42')],qs[_0xd8b7('0x49')](_0x596a84[_0xd8b7('0x44')][_0xd8b7('0x49')]));_0x374392[_0xd8b7('0x48')]=_0x374392[_0xd8b7('0x48')][_0xd8b7('0x4a')]?_0x374392[_0xd8b7('0x48')]:_0x558fc7[_0xd8b7('0x42')];_0x374392[_0xd8b7('0x68')]=qs['sort'](_0x596a84[_0xd8b7('0x44')][_0xd8b7('0x4b')]);_0x374392[_0xd8b7('0x4c')]=qs[_0xd8b7('0x46')](_['pick'](_0x596a84[_0xd8b7('0x44')],_0x558fc7[_0xd8b7('0x46')]));if(_0x596a84['query']['filter']){_0x374392[_0xd8b7('0x4c')]=_[_0xd8b7('0x4e')](_0x374392['where'],{'$or':_[_0xd8b7('0x43')](_0x374392[_0xd8b7('0x48')],function(_0x514c06){var _0xba286c={};_0xba286c[_0x514c06]={'$like':'%'+_0x596a84[_0xd8b7('0x44')]['filter']+'%'};return _0xba286c;})});}_0x374392=_[_0xd8b7('0x4e')]({},_0x374392,_0x596a84[_0xd8b7('0x50')]);return _0x430180['getApplications'](_0x374392);}})[_0xd8b7('0x34')](function(_0xaa7ebc){if(_0xaa7ebc){_0x18dcc2=_0xaa7ebc[_0xd8b7('0x4a')];if(!_0x596a84['query'][_0xd8b7('0x66')](_0xd8b7('0x67'))){_0x374392[_0xd8b7('0x2d')]=qs['limit'](_0x596a84['query'][_0xd8b7('0x2d')]);_0x374392[_0xd8b7('0x2b')]=qs[_0xd8b7('0x2b')](_0x596a84[_0xd8b7('0x44')]['offset']);}return _0x430180[_0xd8b7('0x86')](_0x374392);}})[_0xd8b7('0x34')](function(_0x37afcb){if(_0x37afcb){return _0x37afcb?{'count':_0x18dcc2,'rows':_0x37afcb}:null;}})[_0xd8b7('0x34')](respondWithResult(_0x44784f,null))[_0xd8b7('0x27')](handleError(_0x44784f,null));};function Extension(_0x58ebe7,_0x44804b,_0x54d13a,_0x355c34){this[_0xd8b7('0x87')]=_0xd8b7('0x88');this[_0xd8b7('0x89')]=_0x58ebe7[_0xd8b7('0x8a')];this[_0xd8b7('0x8b')]=_0x355c34;this[_0xd8b7('0x4f')]='system';this[_0xd8b7('0x8c')]=_0xd8b7('0x8d');this['FaxAccountId']=_0x58ebe7['id'];this[_0xd8b7('0x82')]=_0x44804b;this[_0xd8b7('0x8e')]=_0x54d13a;}function createExtensionsReciveFax(_0x151254){var _0x213527=0x1;var _0x2d7471=[];_0x2d7471['push'](new Extension(_0x151254,_0x213527,'',_0xd8b7('0x8f')));_0x213527+=0x1;_0x2d7471[_0xd8b7('0x90')](new Extension(_0x151254,_0x213527,_0xd8b7('0x91'),_0xd8b7('0x92')));_0x213527+=0x1;for(var _0x573337 in _0x151254){if(_0x151254[_0xd8b7('0x66')](_0x573337)&&(_0x573337===_0xd8b7('0x93')||_0x573337===_0xd8b7('0x8a')||_0x573337===_0xd8b7('0x94')||_0x573337===_0xd8b7('0x95')||_0x573337===_0xd8b7('0x96')||_0x573337===_0xd8b7('0x97')||_0x573337==='minrate'||_0x573337===_0xd8b7('0x98')||_0x573337===_0xd8b7('0x99'))){_0x2d7471[_0xd8b7('0x90')](new Extension(_0x151254,_0x213527,_0xd8b7('0x9a')+_0x573337+')='+_0x151254[_0x573337],'Set'));_0x213527+=0x1;}}_0x2d7471[_0xd8b7('0x90')](new Extension(_0x151254,_0x213527,'6',_0xd8b7('0x9b')));_0x213527+=0x1;_0x2d7471['push'](new Extension(_0x151254,_0x213527,_0xd8b7('0x9c'),'ReceiveFax'));_0x213527=0x0;return _0x2d7471;}exports[_0xd8b7('0x9d')]=function(_0x2a96db,_0x520e32,_0x3443f3){var _0x558d51;return db[_0xd8b7('0x7b')][_0xd8b7('0x9e')](function(_0x3b32d3){return db[_0xd8b7('0x3e')]['create'](_0x2a96db[_0xd8b7('0x58')],{'transaction':_0x3b32d3})['then'](function(_0xd28429){_0x558d51=_0xd28429[_0xd8b7('0x36')]({'plain':!![]});return db[_0xd8b7('0x9f')][_0xd8b7('0x80')](createExtensionsReciveFax(_0x558d51),{'transaction':_0x3b32d3});});})['then'](function(){return _0x558d51;})['then'](respondWithResult(_0x520e32,null))[_0xd8b7('0x27')](handleError(_0x520e32,null));};exports['updateAccountApplications']=function(_0x58d8c0,_0x45a871,_0x395eb8){var _0x19286a;return db[_0xd8b7('0x7b')][_0xd8b7('0x9e')](function(_0x408b14){return db[_0xd8b7('0x3e')][_0xd8b7('0x33')](_0x58d8c0[_0xd8b7('0x58')],{'where':{'id':_0x58d8c0[_0xd8b7('0x58')]['id']},'transaction':_0x408b14})[_0xd8b7('0x34')](function(_0x8db78d){return db['VoiceExtension'][_0xd8b7('0x35')]({'where':{'FaxAccountId':_0x58d8c0[_0xd8b7('0x58')]['id']},'transaction':_0x408b14})[_0xd8b7('0x34')](function(_0x442cdb){return db[_0xd8b7('0x9f')][_0xd8b7('0x80')](createExtensionsReciveFax(_[_0xd8b7('0x70')](_0x58d8c0[_0xd8b7('0x58')],[_0xd8b7('0xa0'),_0xd8b7('0x41'),_0xd8b7('0xa1'),_0xd8b7('0xa2'),_0xd8b7('0xa3'),_0xd8b7('0xa4')])),{'transaction':_0x408b14});});});})[_0xd8b7('0x34')](function(){return db[_0xd8b7('0x3e')][_0xd8b7('0xa5')](_0x58d8c0[_0xd8b7('0x58')]['id']);})['then'](respondWithResult(_0x45a871,null))[_0xd8b7('0x27')](handleError(_0x45a871,null));};exports[_0xd8b7('0xa6')]=function(_0x43dbae,_0xd9521a,_0x550d5d){var _0x1e95ae={'raw':!![],'where':{}};var _0x3425ec={};var _0x565b35={'count':0x0,'rows':[]};return db[_0xd8b7('0x3e')][_0xd8b7('0x65')]({'where':{'id':_0x43dbae[_0xd8b7('0x5f')]['id']}})['then'](handleEntityNotFound(_0xd9521a,null))['then'](function(_0x40294a){if(_0x40294a){_0x3425ec[_0xd8b7('0x42')]=_['keys'](db[_0xd8b7('0xa7')][_0xd8b7('0x3f')]);_0x3425ec[_0xd8b7('0x44')]=_[_0xd8b7('0x45')](_0x43dbae['query']);_0x3425ec[_0xd8b7('0x46')]=_[_0xd8b7('0x47')](_0x3425ec['model'],_0x3425ec['query']);_0x1e95ae['attributes']=_[_0xd8b7('0x47')](_0x3425ec['model'],qs[_0xd8b7('0x49')](_0x43dbae[_0xd8b7('0x44')]['fields']));_0x1e95ae[_0xd8b7('0x48')]=_0x1e95ae['attributes'][_0xd8b7('0x4a')]?_0x1e95ae['attributes']:_0x3425ec[_0xd8b7('0x42')];if(!_0x43dbae[_0xd8b7('0x44')][_0xd8b7('0x66')](_0xd8b7('0x67'))){_0x1e95ae[_0xd8b7('0x2d')]=qs[_0xd8b7('0x2d')](_0x43dbae[_0xd8b7('0x44')][_0xd8b7('0x2d')]);_0x1e95ae[_0xd8b7('0x2b')]=qs[_0xd8b7('0x2b')](_0x43dbae[_0xd8b7('0x44')][_0xd8b7('0x2b')]);}_0x1e95ae[_0xd8b7('0x68')]=qs[_0xd8b7('0x4b')](_0x43dbae[_0xd8b7('0x44')]['sort']);_0x1e95ae[_0xd8b7('0x4c')]=qs['filters'](_[_0xd8b7('0x69')](_0x43dbae[_0xd8b7('0x44')],_0x3425ec[_0xd8b7('0x46')]));_0x1e95ae['where'][_0xd8b7('0x62')]=_0x40294a['id'];if(_0x43dbae[_0xd8b7('0x44')]['filter']){_0x1e95ae['where']=_[_0xd8b7('0x4e')](_0x1e95ae['where'],{'$or':_[_0xd8b7('0x43')](_0x1e95ae[_0xd8b7('0x48')],function(_0x4b7a43){var _0xf1c54d={};_0xf1c54d[_0x4b7a43]={'$like':'%'+_0x43dbae[_0xd8b7('0x44')][_0xd8b7('0x4d')]+'%'};return _0xf1c54d;})});}if(_0x43dbae['query'][_0xd8b7('0xa8')]){var _0x172c31=_0x43dbae[_0xd8b7('0x44')][_0xd8b7('0xa8')][_0xd8b7('0xa9')](',');var _0x17bf5c={};_0x17bf5c[_0x172c31[0x0]]={'$gte':moment(_0x172c31[0x1])['format'](_0xd8b7('0xaa'))};_0x1e95ae[_0xd8b7('0x4c')]=_['merge'](_0x1e95ae[_0xd8b7('0x4c')],_0x17bf5c);}_0x1e95ae=_[_0xd8b7('0x4e')]({},_0x1e95ae,_0x43dbae[_0xd8b7('0x50')]);return db[_0xd8b7('0xa7')][_0xd8b7('0x2e')]({'where':_0x1e95ae[_0xd8b7('0x4c')]})['then'](function(_0x59335a){_0x565b35['count']=_0x59335a;if(_0x43dbae[_0xd8b7('0x44')][_0xd8b7('0x51')]){_0x1e95ae[_0xd8b7('0x55')]=[{'all':!![]}];}return db[_0xd8b7('0xa7')]['findAll'](_0x1e95ae);})[_0xd8b7('0x34')](function(_0x336eb6){_0x565b35[_0xd8b7('0x53')]=_0x336eb6;return _0x565b35;});}})[_0xd8b7('0x34')](respondWithFilteredResult(_0xd9521a,_0x1e95ae))[_0xd8b7('0x27')](handleError(_0xd9521a,null));};exports[_0xd8b7('0x3a')]=function(_0x2ad62f,_0x1ea2e9,_0x222e09){var _0x27b9d3,_0x2afdbb={},_0x1f44db;if(_0x2ad62f[_0xd8b7('0x58')]['to']){_0x1f44db=_0x2ad62f[_0xd8b7('0x58')]['to'][0x0];}return db['FaxAccount'][_0xd8b7('0x56')]({'where':{'id':_0x2ad62f[_0xd8b7('0x5f')]['id']},'include':[{'model':db[_0xd8b7('0xab')],'as':_0xd8b7('0xac'),'include':[{'model':db[_0xd8b7('0x72')],'as':_0xd8b7('0xad'),'where':{'fax':_0x1f44db},'limit':0x1,'order':[[_0xd8b7('0xa2'),_0xd8b7('0xae')]]}]}]})['then'](handleEntityNotFound(_0x1ea2e9,null))['then'](function(_0x479499){_0x27b9d3=_0x479499;if(_0x2ad62f[_0xd8b7('0x58')]['attachments']&&_0x2ad62f[_0xd8b7('0x58')][_0xd8b7('0xaf')][_0xd8b7('0x4a')]){for(var _0x32587f=0x0;_0x32587f<_0x2ad62f[_0xd8b7('0x58')][_0xd8b7('0xaf')]['length'];_0x32587f+=0x1){_0x2ad62f[_0xd8b7('0x58')][_0xd8b7('0xaf')][_0x32587f]={'filename':_0x2ad62f[_0xd8b7('0x58')][_0xd8b7('0xaf')][_0x32587f][_0xd8b7('0x39')],'id':_0x2ad62f['body']['attachments'][_0x32587f]['id'],'path':path['join'](config[_0xd8b7('0xb0')],_0xd8b7('0xb1'),_0x2ad62f[_0xd8b7('0x58')]['attachments'][_0x32587f]['basename'])};}}return respondWithRpcPromise(_0xd8b7('0xb2'),_0xd8b7('0xb2'),{'FaxAccountId':_[_0xd8b7('0xb3')](_0x2ad62f[_0xd8b7('0x5f')]['id'])?undefined:_0x2ad62f[_0xd8b7('0x5f')]['id'],'path':_[_0xd8b7('0xb3')](_0x2ad62f[_0xd8b7('0x58')]['attachments'][0x0][_0xd8b7('0x6')])?undefined:_0x2ad62f['body']['attachments'][0x0][_0xd8b7('0x6')],'fax':_[_0xd8b7('0xb3')](_0x2ad62f[_0xd8b7('0x58')]['to'][0x0])?undefined:_0x2ad62f['body']['to'][0x0]},client9002);})['then'](function(){if(_0x27b9d3){if(_['isNil'](_0x2ad62f[_0xd8b7('0x58')]['from'])){_0x2ad62f[_0xd8b7('0x58')]['from']=util[_0xd8b7('0xb4')](_0xd8b7('0xb5'),_0x27b9d3[_0xd8b7('0x39')],_0x27b9d3[_0xd8b7('0xb6')]);}if(_0x27b9d3['List']){if(_0x27b9d3['List'][_0xd8b7('0xad')][_0xd8b7('0x4a')]){return _0x27b9d3[_0xd8b7('0xac')]['Contacts'][0x0];}else{return db[_0xd8b7('0x72')][_0xd8b7('0x57')](_[_0xd8b7('0xb7')](_0x2ad62f[_0xd8b7('0x58')],{'firstName':_0x2ad62f[_0xd8b7('0x58')]['to'][0x0],'phone':_0x2ad62f[_0xd8b7('0x58')]['to'][0x0],'fax':_0x2ad62f[_0xd8b7('0x58')]['to'][0x0],'ListId':_0x27b9d3[_0xd8b7('0xa4')]}));}}else{throw new Error(_0xd8b7('0xb8'));}}else{throw new Error(_0xd8b7('0xb9'));}})[_0xd8b7('0x34')](function(_0x4895e3){if(_0x4895e3){return db[_0xd8b7('0x6f')]['find']({'where':{'ContactId':_0x4895e3['id'],'closed':![],'FaxAccountId':_0x27b9d3['id']}})[_0xd8b7('0x34')](function(_0x455d79){if(_0x455d79){return[_0x455d79,![]];}return db['FaxInteraction'][_0xd8b7('0x57')]({'UserId':_0x2ad62f[_0xd8b7('0x59')]['id'],'ContactId':_0x4895e3['id'],'FaxAccountId':_0x27b9d3['id'],'fax':_0x2ad62f[_0xd8b7('0x58')]['to'][0x0],'firstMsgDirection':_0xd8b7('0xba'),'Messages':[_[_0xd8b7('0x4e')](_0x2ad62f[_0xd8b7('0x58')],{'read':![],'body':_0x2ad62f[_0xd8b7('0x58')][_0xd8b7('0xaf')][0x0]['filename'],'FaxAccountId':_0x27b9d3['id'],'UserId':_0x2ad62f[_0xd8b7('0x59')]['id'],'ContactId':_0x4895e3['id'],'AttachmentId':_0x2ad62f[_0xd8b7('0x58')][_0xd8b7('0xaf')][0x0]['id']})]},{'include':[{'model':db['FaxMessage'],'as':_0xd8b7('0xbb')}]})[_0xd8b7('0x34')](function(_0x1966c1){return[_0x1966c1,!![]];});});}else{throw new Error(_0xd8b7('0xbc'));}})[_0xd8b7('0xbd')](function(_0x3f5561,_0x5d7e45){if(_0x5d7e45){return _0x3f5561;}return db[_0xd8b7('0xa7')]['create']({'direction':_0xd8b7('0xba'),'read':![],'body':_0x2ad62f[_0xd8b7('0x58')]['attachments'][0x0][_0xd8b7('0xbe')],'FaxAccountId':_0x27b9d3['id'],'FaxInteractionId':_0x3f5561['id'],'UserId':_0x2ad62f[_0xd8b7('0x59')]['id'],'ContactId':_0x3f5561[_0xd8b7('0xbf')],'AttachmentId':_0x2ad62f[_0xd8b7('0x58')][_0xd8b7('0xaf')][0x0]['id']})['then'](function(_0x69228d){_0x3f5561[_0xd8b7('0xc0')][_0xd8b7('0xbb')]=[];_0x3f5561[_0xd8b7('0xc0')]['Messages'][_0xd8b7('0x90')](_0x69228d[_0xd8b7('0xc0')]);return _0x3f5561;});})[_0xd8b7('0x34')](function(_0x44dd2c){respondWithRpcPromise(_0xd8b7('0xc1'),'SendFax',{'FaxAccountId':_[_0xd8b7('0xb3')](_0x2ad62f[_0xd8b7('0x5f')]['id'])?undefined:_0x2ad62f[_0xd8b7('0x5f')]['id'],'path':_['isNil'](_0x2ad62f[_0xd8b7('0x58')][_0xd8b7('0xaf')][0x0][_0xd8b7('0x6')])?undefined:_0x2ad62f[_0xd8b7('0x58')][_0xd8b7('0xaf')][0x0][_0xd8b7('0x6')],'fax':_[_0xd8b7('0xb3')](_0x2ad62f['body']['to'][0x0])?undefined:_0x2ad62f['body']['to'][0x0],'AttachmentId':_0x2ad62f[_0xd8b7('0x58')]['attachments'][0x0]['id']},client9002)[_0xd8b7('0x34')](function(_0x1cfb00){logger[_0xd8b7('0x1e')](_0xd8b7('0xc2'),_0x1cfb00);})[_0xd8b7('0x27')](function(_0x15278e){logger[_0xd8b7('0x1e')](_0xd8b7('0xc2'),_0x15278e);});return _0x44dd2c;})[_0xd8b7('0x34')](respondWithResult(_0x1ea2e9,null))[_0xd8b7('0x27')](handleError(_0x1ea2e9,null));};exports[_0xd8b7('0xc3')]=function(_0x288742,_0x457d46,_0x50663d){return db[_0xd8b7('0x3e')][_0xd8b7('0x56')]({'where':{'id':_0x288742[_0xd8b7('0x5f')]['id']}})[_0xd8b7('0x34')](handleEntityNotFound(_0x457d46,null))[_0xd8b7('0x34')](function(_0x2aab12){if(_0x2aab12){return _0x2aab12[_0xd8b7('0xc3')](_0x288742[_0xd8b7('0x58')][_0xd8b7('0x6a')],_[_0xd8b7('0x70')](_0x288742[_0xd8b7('0x58')],[_0xd8b7('0x6a'),'id'])||{})['spread'](function(_0x2c3d73){for(var _0x38a4a9=0x0;_0x38a4a9<_0x288742['body'][_0xd8b7('0x6a')][_0xd8b7('0x4a')];_0x38a4a9+=0x1){socket[_0xd8b7('0xc4')](_0xd8b7('0xc5'),{'UserId':Number(_0x288742['body'][_0xd8b7('0x6a')][_0x38a4a9]),'FaxAccountId':Number(_0x288742[_0xd8b7('0x5f')]['id'])});}return _0x2c3d73;});}})[_0xd8b7('0x34')](respondWithResult(_0x457d46,null))[_0xd8b7('0x27')](handleError(_0x457d46,null));};exports['removeAgents']=function(_0x9b4af7,_0x3bcca6,_0x49f18a){return db[_0xd8b7('0x3e')]['find']({'where':{'id':_0x9b4af7['params']['id']}})['then'](handleEntityNotFound(_0x3bcca6,null))[_0xd8b7('0x34')](function(_0x5bdd75){if(_0x5bdd75){return _0x5bdd75[_0xd8b7('0xc6')](_0x9b4af7[_0xd8b7('0x44')][_0xd8b7('0x6a')])[_0xd8b7('0x34')](function(){if(_['isArray'](_0x9b4af7[_0xd8b7('0x44')][_0xd8b7('0x6a')])){for(var _0x359091=0x0;_0x359091<_0x9b4af7[_0xd8b7('0x44')][_0xd8b7('0x6a')][_0xd8b7('0x4a')];_0x359091+=0x1){socket['emit'](_0xd8b7('0xc7'),{'UserId':Number(_0x9b4af7[_0xd8b7('0x44')][_0xd8b7('0x6a')][_0x359091]),'FaxAccountId':Number(_0x9b4af7[_0xd8b7('0x5f')]['id'])});}}else{socket[_0xd8b7('0xc4')](_0xd8b7('0xc7'),{'UserId':Number(_0x9b4af7[_0xd8b7('0x44')][_0xd8b7('0x6a')]),'FaxAccountId':Number(_0x9b4af7[_0xd8b7('0x5f')]['id'])});}});}})[_0xd8b7('0x34')](respondWithStatusCode(_0x3bcca6,null))[_0xd8b7('0x27')](handleError(_0x3bcca6,null));};exports[_0xd8b7('0xc8')]=function(_0x3e95a7,_0x5de576,_0x483856){var _0x4e810b={};var _0x1151ca={};var _0x28dea8;var _0x458eb5;return db[_0xd8b7('0x3e')]['findOne']({'where':{'id':_0x3e95a7['params']['id']}})['then'](handleEntityNotFound(_0x5de576,null))[_0xd8b7('0x34')](function(_0x5902f1){if(_0x5902f1){_0x28dea8=_0x5902f1;_0x1151ca[_0xd8b7('0x42')]=_[_0xd8b7('0x45')](db[_0xd8b7('0x74')][_0xd8b7('0x3f')]);_0x1151ca['query']=_['keys'](_0x3e95a7['query']);_0x1151ca['filters']=_['intersection'](_0x1151ca[_0xd8b7('0x42')],_0x1151ca['query']);_0x4e810b[_0xd8b7('0x48')]=_['intersection'](_0x1151ca[_0xd8b7('0x42')],qs['fields'](_0x3e95a7['query'][_0xd8b7('0x49')]));_0x4e810b[_0xd8b7('0x48')]=_0x4e810b[_0xd8b7('0x48')][_0xd8b7('0x4a')]?_0x4e810b[_0xd8b7('0x48')]:_0x1151ca['model'];_0x4e810b['order']=qs['sort'](_0x3e95a7['query']['sort']);_0x4e810b[_0xd8b7('0x4c')]=qs['filters'](_['pick'](_0x3e95a7['query'],_0x1151ca[_0xd8b7('0x46')]));if(_0x3e95a7[_0xd8b7('0x44')][_0xd8b7('0x4d')]){_0x4e810b['where']=_[_0xd8b7('0x4e')](_0x4e810b[_0xd8b7('0x4c')],{'$or':_[_0xd8b7('0x43')](_0x4e810b[_0xd8b7('0x48')],function(_0x52838f){var _0x15ba31={};_0x15ba31[_0x52838f]={'$like':'%'+_0x3e95a7[_0xd8b7('0x44')][_0xd8b7('0x4d')]+'%'};return _0x15ba31;})});}_0x4e810b=_[_0xd8b7('0x4e')]({},_0x4e810b,_0x3e95a7[_0xd8b7('0x50')]);return _0x28dea8[_0xd8b7('0xc8')](_0x4e810b);}})[_0xd8b7('0x34')](function(_0x1bfbae){if(_0x1bfbae){_0x458eb5=_0x1bfbae['length'];if(!_0x3e95a7[_0xd8b7('0x44')][_0xd8b7('0x66')](_0xd8b7('0x67'))){_0x4e810b[_0xd8b7('0x2d')]=qs['limit'](_0x3e95a7[_0xd8b7('0x44')][_0xd8b7('0x2d')]);_0x4e810b[_0xd8b7('0x2b')]=qs[_0xd8b7('0x2b')](_0x3e95a7[_0xd8b7('0x44')][_0xd8b7('0x2b')]);}return _0x28dea8[_0xd8b7('0xc8')](_0x4e810b);}})['then'](function(_0x368c6c){if(_0x368c6c){return _0x368c6c?{'count':_0x458eb5,'rows':_0x368c6c}:null;}})['then'](respondWithResult(_0x5de576,null))[_0xd8b7('0x27')](handleError(_0x5de576,null));}; \ No newline at end of file diff --git a/server/api/faxAccount/faxAccount.events.js b/server/api/faxAccount/faxAccount.events.js index 5b12112..997e110 100644 --- a/server/api/faxAccount/faxAccount.events.js +++ b/server/api/faxAccount/faxAccount.events.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x269e=['hook','exports','events','../../mysqldb','setMaxListeners','save','update','emit','hasOwnProperty'];(function(_0x2298c0,_0x837db4){var _0x44dc18=function(_0x5bdb1c){while(--_0x5bdb1c){_0x2298c0['push'](_0x2298c0['shift']());}};_0x44dc18(++_0x837db4);}(_0x269e,0xc8));var _0xe269=function(_0x477ba8,_0x2fba0b){_0x477ba8=_0x477ba8-0x0;var _0x17d458=_0x269e[_0x477ba8];return _0x17d458;};'use strict';var EventEmitter=require(_0xe269('0x0'));var FaxAccount=require(_0xe269('0x1'))['db']['FaxAccount'];var FaxAccountEvents=new EventEmitter();FaxAccountEvents[_0xe269('0x2')](0x0);var events={'afterCreate':_0xe269('0x3'),'afterUpdate':_0xe269('0x4'),'afterDestroy':'remove'};function emitEvent(_0x4b5050){return function(_0x89d64a,_0x2ab544,_0x356bc7){FaxAccountEvents[_0xe269('0x5')](_0x4b5050+':'+_0x89d64a['id'],_0x89d64a);FaxAccountEvents[_0xe269('0x5')](_0x4b5050,_0x89d64a);_0x356bc7(null);};}for(var e in events){if(events[_0xe269('0x6')](e)){var event=events[e];FaxAccount[_0xe269('0x7')](e,emitEvent(event));}}module[_0xe269('0x8')]=FaxAccountEvents; \ No newline at end of file +var _0x1335=['remove','emit','exports','events','../../mysqldb','FaxAccount','setMaxListeners','save','update'];(function(_0xb9781b,_0x434c4f){var _0x254024=function(_0x3af64b){while(--_0x3af64b){_0xb9781b['push'](_0xb9781b['shift']());}};_0x254024(++_0x434c4f);}(_0x1335,0x6f));var _0x5133=function(_0x30f50e,_0x5279f8){_0x30f50e=_0x30f50e-0x0;var _0x1d1faf=_0x1335[_0x30f50e];return _0x1d1faf;};'use strict';var EventEmitter=require(_0x5133('0x0'));var FaxAccount=require(_0x5133('0x1'))['db'][_0x5133('0x2')];var FaxAccountEvents=new EventEmitter();FaxAccountEvents[_0x5133('0x3')](0x0);var events={'afterCreate':_0x5133('0x4'),'afterUpdate':_0x5133('0x5'),'afterDestroy':_0x5133('0x6')};function emitEvent(_0x426e1c){return function(_0x56acfb,_0x5b81e7,_0x3e6742){FaxAccountEvents[_0x5133('0x7')](_0x426e1c+':'+_0x56acfb['id'],_0x56acfb);FaxAccountEvents[_0x5133('0x7')](_0x426e1c,_0x56acfb);_0x3e6742(null);};}for(var e in events){if(events['hasOwnProperty'](e)){var event=events[e];FaxAccount['hook'](e,emitEvent(event));}}module[_0x5133('0x8')]=FaxAccountEvents; \ No newline at end of file diff --git a/server/api/faxAccount/faxAccount.model.js b/server/api/faxAccount/faxAccount.model.js index 5374154..a9e7f5a 100644 --- a/server/api/faxAccount/faxAccount.model.js +++ b/server/api/faxAccount/faxAccount.model.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x3bde=['api','moment','bluebird','request-promise','rimraf','../../config/environment','./faxAccount.attributes','define','fax_accounts','lodash','util'];(function(_0x5b3ad4,_0xeb9a4e){var _0x3e0fe2=function(_0x4ebf3c){while(--_0x4ebf3c){_0x5b3ad4['push'](_0x5b3ad4['shift']());}};_0x3e0fe2(++_0xeb9a4e);}(_0x3bde,0x1a0));var _0xe3bd=function(_0x15c421,_0x6366f7){_0x15c421=_0x15c421-0x0;var _0x5e5ed5=_0x3bde[_0x15c421];return _0x5e5ed5;};'use strict';var _=require(_0xe3bd('0x0'));var util=require(_0xe3bd('0x1'));var logger=require('../../config/logger')(_0xe3bd('0x2'));var moment=require(_0xe3bd('0x3'));var BPromise=require(_0xe3bd('0x4'));var rp=require(_0xe3bd('0x5'));var fs=require('fs');var path=require('path');var rimraf=require(_0xe3bd('0x6'));var config=require(_0xe3bd('0x7'));var attributes=require(_0xe3bd('0x8'));module['exports']=function(_0x38cab5,_0x457721){return _0x38cab5[_0xe3bd('0x9')]('FaxAccount',attributes,{'tableName':_0xe3bd('0xa'),'paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file +var _0x8a1e=['exports','define','fax_accounts','lodash','util','moment','bluebird','request-promise','rimraf','../../config/environment','./faxAccount.attributes'];(function(_0x24c479,_0x52e4b6){var _0x3e05dd=function(_0x277afc){while(--_0x277afc){_0x24c479['push'](_0x24c479['shift']());}};_0x3e05dd(++_0x52e4b6);}(_0x8a1e,0xea));var _0xe8a1=function(_0x15b6ff,_0x6432f8){_0x15b6ff=_0x15b6ff-0x0;var _0x5c94f8=_0x8a1e[_0x15b6ff];return _0x5c94f8;};'use strict';var _=require(_0xe8a1('0x0'));var util=require(_0xe8a1('0x1'));var logger=require('../../config/logger')('api');var moment=require(_0xe8a1('0x2'));var BPromise=require(_0xe8a1('0x3'));var rp=require(_0xe8a1('0x4'));var fs=require('fs');var path=require('path');var rimraf=require(_0xe8a1('0x5'));var config=require(_0xe8a1('0x6'));var attributes=require(_0xe8a1('0x7'));module[_0xe8a1('0x8')]=function(_0x252830,_0x4924ad){return _0x252830[_0xe8a1('0x9')]('FaxAccount',attributes,{'tableName':_0xe8a1('0xa'),'paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file diff --git a/server/api/faxAccount/faxAccount.rpc.js b/server/api/faxAccount/faxAccount.rpc.js index b6d2075..2686725 100644 --- a/server/api/faxAccount/faxAccount.rpc.js +++ b/server/api/faxAccount/faxAccount.rpc.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xd2dd=['from\x20is\x20mandatory','body\x20is\x20mandatory\x20and\x20not\x20empty','mapKey','mapKey\x20is\x20mandatory,\x20please\x20use\x20one\x20of\x20these:\x20','includes','mapKey\x20invalid,\x20please\x20use\x20one\x20of\x20these:\x20','account','List','Contacts','DESC','FaxApplication','Applications','get','orderBy','applications','priority','asc','ListId','create','contact','FaxInteraction','Contact\x20not\x20found','autoclose','push','length','unmanaged','*,*,*,*','created','interaction','FaxMessage','ContactId','AttachmentId','UserId','find','name','unshift','agent','waitForTheAssignedAgent','Start','startRouting','lodash','util','moment','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','../../config/environment','jayson/promise','http','redis','defaults','localhost','socket.io-emitter','register','request','then','info','FaxAccount,\x20%s,\x20%s','request\x20sent','FaxAccount,\x20%s,\x20%s,\x20%s','error','code','message','result','FaxAccount','findAll','options','raw','attributes','limit','include','model','map','GetFaxAccount','catch','NotifyFaxAccount','body','fax','CmContact','describe','Sequelize','no\x20available\x20attributes','createdAt','updatedAt','difference','keys','CompanyId','isNil','from','ValidationError'];(function(_0x1df640,_0x44d207){var _0x4cde5c=function(_0xd5f560){while(--_0xd5f560){_0x1df640['push'](_0x1df640['shift']());}};_0x4cde5c(++_0x44d207);}(_0xd2dd,0xe0));var _0xdd2d=function(_0x1d3d26,_0x5a7a81){_0x1d3d26=_0x1d3d26-0x0;var _0x544597=_0xd2dd[_0x1d3d26];return _0x544597;};'use strict';var _=require(_0xdd2d('0x0'));var util=require(_0xdd2d('0x1'));var moment=require(_0xdd2d('0x2'));var BPromise=require('bluebird');var rs=require(_0xdd2d('0x3'));var fs=require('fs');var Redis=require(_0xdd2d('0x4'));var db=require(_0xdd2d('0x5'))['db'];var utils=require(_0xdd2d('0x6'));var logger=require(_0xdd2d('0x7'))('rpc');var config=require(_0xdd2d('0x8'));var jayson=require(_0xdd2d('0x9'));var client=jayson['client'][_0xdd2d('0xa')]({'port':0x232c});config[_0xdd2d('0xb')]=_[_0xdd2d('0xc')](config['redis'],{'host':_0xdd2d('0xd'),'port':0x18eb});var socket=require(_0xdd2d('0xe'))(new Redis(config[_0xdd2d('0xb')]));require('./faxAccount.socket')[_0xdd2d('0xf')](socket);function respondWithRpcPromise(_0x29889d,_0x2f0881,_0x3cb2a2){return new BPromise(function(_0x5d1eef,_0xa0ef4b){return client[_0xdd2d('0x10')](_0x29889d,_0x3cb2a2)[_0xdd2d('0x11')](function(_0x383f9d){logger[_0xdd2d('0x12')](_0xdd2d('0x13'),_0x2f0881,_0xdd2d('0x14'));logger['debug'](_0xdd2d('0x15'),_0x2f0881,_0xdd2d('0x14'),JSON['stringify'](_0x383f9d));if(_0x383f9d['error']){if(_0x383f9d[_0xdd2d('0x16')][_0xdd2d('0x17')]===0x1f4){logger['error'](_0xdd2d('0x13'),_0x2f0881,_0x383f9d['error']['message']);return _0xa0ef4b(_0x383f9d[_0xdd2d('0x16')][_0xdd2d('0x18')]);}logger[_0xdd2d('0x16')](_0xdd2d('0x13'),_0x2f0881,_0x383f9d['error'][_0xdd2d('0x18')]);return _0x5d1eef(_0x383f9d['error']['message']);}else{logger[_0xdd2d('0x12')](_0xdd2d('0x13'),_0x2f0881,_0xdd2d('0x14'));_0x5d1eef(_0x383f9d[_0xdd2d('0x19')][_0xdd2d('0x18')]);}})['catch'](function(_0x4fd2c2){logger['error'](_0xdd2d('0x13'),_0x2f0881,_0x4fd2c2);_0xa0ef4b(_0x4fd2c2);});});}exports['GetFaxAccount']=function(_0x469276){var _0x33558c=this;return new Promise(function(_0x2ea4fb,_0xfeac66){return db[_0xdd2d('0x1a')][_0xdd2d('0x1b')]({'raw':_0x469276[_0xdd2d('0x1c')]?_0x469276[_0xdd2d('0x1c')][_0xdd2d('0x1d')]===undefined?!![]:![]:!![],'where':_0x469276[_0xdd2d('0x1c')]?_0x469276[_0xdd2d('0x1c')]['where']||null:null,'attributes':_0x469276[_0xdd2d('0x1c')]?_0x469276['options'][_0xdd2d('0x1e')]||null:null,'limit':_0x469276[_0xdd2d('0x1c')]?_0x469276[_0xdd2d('0x1c')][_0xdd2d('0x1f')]||null:null,'include':_0x469276[_0xdd2d('0x1c')]?_0x469276[_0xdd2d('0x1c')][_0xdd2d('0x20')]?_['map'](_0x469276[_0xdd2d('0x1c')][_0xdd2d('0x20')],function(_0x33ae00){return{'model':db[_0x33ae00[_0xdd2d('0x21')]],'as':_0x33ae00['as'],'attributes':_0x33ae00['attributes'],'include':_0x33ae00['include']?_[_0xdd2d('0x22')](_0x33ae00[_0xdd2d('0x20')],function(_0x5952f3){return{'model':db[_0x5952f3[_0xdd2d('0x21')]],'as':_0x5952f3['as'],'attributes':_0x5952f3[_0xdd2d('0x1e')],'include':_0x5952f3[_0xdd2d('0x20')]?_[_0xdd2d('0x22')](_0x5952f3[_0xdd2d('0x20')],function(_0xbeab33){return{'model':db[_0xbeab33[_0xdd2d('0x21')]],'as':_0xbeab33['as'],'attributes':_0xbeab33['attributes']};}):[]};}):[]};}):[]:[]})[_0xdd2d('0x11')](function(_0x159190){logger[_0xdd2d('0x12')](_0xdd2d('0x23'),_0x469276);logger['debug']('GetFaxAccount',_0x469276,JSON['stringify'](_0x159190));_0x2ea4fb(_0x159190);})[_0xdd2d('0x24')](function(_0x2e637d){logger[_0xdd2d('0x16')](_0xdd2d('0x23'),_0x2e637d['message'],_0x469276);_0xfeac66(_0x33558c[_0xdd2d('0x16')](0x1f4,_0x2e637d['message']));});});};exports[_0xdd2d('0x25')]=function(_0x39ba2c,_0x1436f1,_0x4e1e9a){var _0x1dd788=this;return new Promise(function(_0x57ff37,_0x508278){var _0x31f22a={'body':_0x39ba2c[_0xdd2d('0x26')],'channel':_0xdd2d('0x27')};var _0xaa12f6=[];var _0x234a60=[];var _0x2b20b2={};return db[_0xdd2d('0x28')][_0xdd2d('0x29')]()[_0xdd2d('0x11')](function(_0x8a2716){if(!_0x8a2716){throw new db[(_0xdd2d('0x2a'))]['ValidationError'](_0xdd2d('0x2b'));}_0xaa12f6=_['difference'](_['keys'](_0x8a2716),[_0xdd2d('0x2c'),_0xdd2d('0x2d')]);_0x234a60=_[_0xdd2d('0x2e')](_[_0xdd2d('0x2f')](_0x8a2716),[_0xdd2d('0x2c'),'updatedAt',_0xdd2d('0x30'),'ListId']);if(_0x39ba2c[_0xdd2d('0x26')]['id']){delete _0x39ba2c[_0xdd2d('0x26')]['id'];}if(_[_0xdd2d('0x31')](_0x39ba2c['body'][_0xdd2d('0x32')])){throw new db['Sequelize'][(_0xdd2d('0x33'))](_0xdd2d('0x34'));}if(_['isNil'](_0x39ba2c[_0xdd2d('0x26')][_0xdd2d('0x26')])||_0x39ba2c['body'][_0xdd2d('0x26')]===''){throw new db[(_0xdd2d('0x2a'))][(_0xdd2d('0x33'))](_0xdd2d('0x35'));}if(_[_0xdd2d('0x31')](_0x39ba2c['body'][_0xdd2d('0x36')])){throw new db[(_0xdd2d('0x2a'))]['ValidationError'](_0xdd2d('0x37')+_0x234a60);}if(!_[_0xdd2d('0x38')](_0x234a60,_0x39ba2c[_0xdd2d('0x26')][_0xdd2d('0x36')])){throw new db[(_0xdd2d('0x2a'))][(_0xdd2d('0x33'))](_0xdd2d('0x39')+_0x234a60);}_0x2b20b2[_0x39ba2c[_0xdd2d('0x26')][_0xdd2d('0x36')]]=_0x39ba2c[_0xdd2d('0x26')]['from'];})['then'](function(){return db[_0xdd2d('0x1a')]['find']({'where':{'id':_0x39ba2c[_0xdd2d('0x3a')]['id']},'include':[{'model':db['CmList'],'as':_0xdd2d('0x3b'),'include':[{'model':db['CmContact'],'as':_0xdd2d('0x3c'),'where':_0x2b20b2,'limit':0x1,'order':[[_0xdd2d('0x2d'),_0xdd2d('0x3d')]]}]},{'model':db[_0xdd2d('0x3e')],'as':_0xdd2d('0x3f')}]});})[_0xdd2d('0x11')](function(_0x485ea2){if(_0x485ea2&&_0x485ea2[_0xdd2d('0x3b')]){var _0xa8a478=_0x485ea2[_0xdd2d('0x40')]({'plain':!![]});_0x31f22a[_0xdd2d('0x3a')]=_0xa8a478;_0x31f22a['applications']=_0xa8a478[_0xdd2d('0x3f')];_0x31f22a['list']=_0xa8a478[_0xdd2d('0x3b')];_0x31f22a['applications']=_[_0xdd2d('0x41')](_0x31f22a[_0xdd2d('0x42')],[_0xdd2d('0x43')],[_0xdd2d('0x44')]);if(_0x31f22a['account'][_0xdd2d('0x3f')]){delete _0x31f22a[_0xdd2d('0x3a')]['Applications'];}if(_0x31f22a['account'][_0xdd2d('0x3b')]&&_0x31f22a[_0xdd2d('0x3a')][_0xdd2d('0x3b')][_0xdd2d('0x3c')]['length']){return _0x31f22a['account']['List'][_0xdd2d('0x3c')][0x0];}var _0x3c064e=_[_0xdd2d('0xc')](_0x39ba2c[_0xdd2d('0x26')],{'firstName':_0x39ba2c[_0xdd2d('0x26')]['from'],'ListId':_0xa8a478[_0xdd2d('0x45')]});_0x3c064e[_0x39ba2c['body'][_0xdd2d('0x36')]]=_0x39ba2c[_0xdd2d('0x26')][_0xdd2d('0x32')];return db[_0xdd2d('0x28')][_0xdd2d('0x46')](_0x3c064e,{'fields':_0xaa12f6,'raw':!![]});}})['then'](function(_0x2ddfc3){_0x31f22a[_0xdd2d('0x47')]=_0x2ddfc3;if(_0x2ddfc3){var _0x3ef289={'ContactId':_0x2ddfc3['id'],'FaxAccountId':_0x39ba2c[_0xdd2d('0x3a')]['id'],'fax':_0x2ddfc3['fax']};return db[_0xdd2d('0x48')]['find']({'where':{'ContactId':_0x2ddfc3['id'],'closed':![],'FaxAccountId':_0x39ba2c['account']['id']}})[_0xdd2d('0x11')](function(_0x4ffa24){if(_0x4ffa24){return[_0x4ffa24,![]];}return db['FaxInteraction']['create'](_0x3ef289)[_0xdd2d('0x11')](function(_0x261eea){return[_0x261eea,!![]];});});}else{throw new Error(_0xdd2d('0x49'));}})['spread'](function(_0x1898e2,_0x152978){var _0x48f7cf=_0x1898e2['get']({'plain':!![]});if(_0x152978){if(_0x31f22a['account'][_0xdd2d('0x4a')]){_0x31f22a[_0xdd2d('0x42')][_0xdd2d('0x4b')]({'id':0x0,'priority':_0x31f22a['applications'][_0xdd2d('0x4c')]+0x1,'app':'close','appdata':_0xdd2d('0x4d'),'interval':_0xdd2d('0x4e')});}_0x48f7cf[_0xdd2d('0x4f')]=!![];}else{_0x48f7cf[_0xdd2d('0x4f')]=![];}_0x31f22a[_0xdd2d('0x50')]=_0x48f7cf;return db[_0xdd2d('0x51')]['create']({'body':_0x39ba2c['body'][_0xdd2d('0x26')],'FaxAccountId':_0x39ba2c[_0xdd2d('0x3a')]['id'],'FaxInteractionId':_0x1898e2['id'],'direction':'in','ContactId':_0x1898e2[_0xdd2d('0x52')],'AttachmentId':_0x39ba2c[_0xdd2d('0x26')][_0xdd2d('0x53')]});})[_0xdd2d('0x11')](function(_0x37d24f){_0x31f22a[_0xdd2d('0x18')]=_0x37d24f;if(_0x31f22a['interaction'][_0xdd2d('0x54')]){return db['User'][_0xdd2d('0x55')]({'attributes':['id',_0xdd2d('0x56')],'where':{'id':_0x31f22a[_0xdd2d('0x50')][_0xdd2d('0x54')]}})[_0xdd2d('0x11')](function(_0x51a00d){if(_0x51a00d){_0x31f22a[_0xdd2d('0x42')][_0xdd2d('0x57')]({'id':0x0,'priority':0x0,'app':_0xdd2d('0x58'),'appdata':_0x51a00d['name']+','+(_0x31f22a['account'][_0xdd2d('0x59')]||0xa),'interval':_0xdd2d('0x4e')});}return respondWithRpcPromise(_0xdd2d('0x5a'),_0xdd2d('0x5b'),_0x31f22a);});}return respondWithRpcPromise(_0xdd2d('0x5a'),_0xdd2d('0x5b'),_0x31f22a);})[_0xdd2d('0x11')](function(_0x399194){_0x57ff37(_0x399194);})['catch'](function(_0x3b895b){_0x508278(_0x1dd788['error'](0x1f4,_0x3b895b['message']));});});}; \ No newline at end of file +var _0x0042=['Sequelize','ValidationError','no\x20available\x20attributes','difference','keys','updatedAt','createdAt','CompanyId','from','isNil','body\x20is\x20mandatory\x20and\x20not\x20empty','mapKey','mapKey\x20is\x20mandatory,\x20please\x20use\x20one\x20of\x20these:\x20','mapKey\x20invalid,\x20please\x20use\x20one\x20of\x20these:\x20','find','account','CmList','List','Contacts','FaxApplication','Applications','get','applications','list','orderBy','priority','asc','length','ListId','create','contact','Contact\x20not\x20found','spread','autoclose','push','close','*,*,*,*','created','interaction','FaxMessage','ContactId','AttachmentId','UserId','name','agent','startRouting','Start','lodash','util','moment','bluebird','randomstring','ioredis','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','redis','defaults','./faxAccount.socket','register','request','then','info','FaxAccount,\x20%s,\x20%s','debug','FaxAccount,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','code','error','message','result','catch','GetFaxAccount','FaxAccount','findAll','options','raw','where','attributes','limit','include','model','map','body','fax','CmContact','describe'];(function(_0x23b32a,_0x41d380){var _0x1696f9=function(_0x5cf5e8){while(--_0x5cf5e8){_0x23b32a['push'](_0x23b32a['shift']());}};_0x1696f9(++_0x41d380);}(_0x0042,0xe5));var _0x2004=function(_0x35bd6c,_0x585087){_0x35bd6c=_0x35bd6c-0x0;var _0x2f421d=_0x0042[_0x35bd6c];return _0x2f421d;};'use strict';var _=require(_0x2004('0x0'));var util=require(_0x2004('0x1'));var moment=require(_0x2004('0x2'));var BPromise=require(_0x2004('0x3'));var rs=require(_0x2004('0x4'));var fs=require('fs');var Redis=require(_0x2004('0x5'));var db=require('../../mysqldb')['db'];var utils=require(_0x2004('0x6'));var logger=require(_0x2004('0x7'))(_0x2004('0x8'));var config=require(_0x2004('0x9'));var jayson=require(_0x2004('0xa'));var client=jayson[_0x2004('0xb')]['http']({'port':0x232c});config[_0x2004('0xc')]=_[_0x2004('0xd')](config[_0x2004('0xc')],{'host':'localhost','port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config[_0x2004('0xc')]));require(_0x2004('0xe'))[_0x2004('0xf')](socket);function respondWithRpcPromise(_0x2abea2,_0x30c2cc,_0x316b28){return new BPromise(function(_0x27d35f,_0x3d4158){return client[_0x2004('0x10')](_0x2abea2,_0x316b28)[_0x2004('0x11')](function(_0x5dc882){logger[_0x2004('0x12')](_0x2004('0x13'),_0x30c2cc,'request\x20sent');logger[_0x2004('0x14')](_0x2004('0x15'),_0x30c2cc,_0x2004('0x16'),JSON[_0x2004('0x17')](_0x5dc882));if(_0x5dc882['error']){if(_0x5dc882['error'][_0x2004('0x18')]===0x1f4){logger[_0x2004('0x19')](_0x2004('0x13'),_0x30c2cc,_0x5dc882['error'][_0x2004('0x1a')]);return _0x3d4158(_0x5dc882[_0x2004('0x19')][_0x2004('0x1a')]);}logger[_0x2004('0x19')](_0x2004('0x13'),_0x30c2cc,_0x5dc882[_0x2004('0x19')][_0x2004('0x1a')]);return _0x27d35f(_0x5dc882[_0x2004('0x19')]['message']);}else{logger[_0x2004('0x12')](_0x2004('0x13'),_0x30c2cc,_0x2004('0x16'));_0x27d35f(_0x5dc882[_0x2004('0x1b')]['message']);}})[_0x2004('0x1c')](function(_0x400c17){logger[_0x2004('0x19')](_0x2004('0x13'),_0x30c2cc,_0x400c17);_0x3d4158(_0x400c17);});});}exports[_0x2004('0x1d')]=function(_0x3b4d93){var _0x4ab7a8=this;return new Promise(function(_0x2e7fe9,_0x437f42){return db[_0x2004('0x1e')][_0x2004('0x1f')]({'raw':_0x3b4d93[_0x2004('0x20')]?_0x3b4d93[_0x2004('0x20')][_0x2004('0x21')]===undefined?!![]:![]:!![],'where':_0x3b4d93['options']?_0x3b4d93[_0x2004('0x20')][_0x2004('0x22')]||null:null,'attributes':_0x3b4d93[_0x2004('0x20')]?_0x3b4d93[_0x2004('0x20')][_0x2004('0x23')]||null:null,'limit':_0x3b4d93['options']?_0x3b4d93[_0x2004('0x20')][_0x2004('0x24')]||null:null,'include':_0x3b4d93['options']?_0x3b4d93[_0x2004('0x20')][_0x2004('0x25')]?_['map'](_0x3b4d93['options'][_0x2004('0x25')],function(_0x2b48df){return{'model':db[_0x2b48df[_0x2004('0x26')]],'as':_0x2b48df['as'],'attributes':_0x2b48df[_0x2004('0x23')],'include':_0x2b48df['include']?_[_0x2004('0x27')](_0x2b48df[_0x2004('0x25')],function(_0x4ff748){return{'model':db[_0x4ff748[_0x2004('0x26')]],'as':_0x4ff748['as'],'attributes':_0x4ff748[_0x2004('0x23')],'include':_0x4ff748[_0x2004('0x25')]?_[_0x2004('0x27')](_0x4ff748[_0x2004('0x25')],function(_0x3409ae){return{'model':db[_0x3409ae[_0x2004('0x26')]],'as':_0x3409ae['as'],'attributes':_0x3409ae['attributes']};}):[]};}):[]};}):[]:[]})[_0x2004('0x11')](function(_0x1d2058){logger[_0x2004('0x12')](_0x2004('0x1d'),_0x3b4d93);logger['debug']('GetFaxAccount',_0x3b4d93,JSON[_0x2004('0x17')](_0x1d2058));_0x2e7fe9(_0x1d2058);})[_0x2004('0x1c')](function(_0x1e52c2){logger[_0x2004('0x19')](_0x2004('0x1d'),_0x1e52c2['message'],_0x3b4d93);_0x437f42(_0x4ab7a8[_0x2004('0x19')](0x1f4,_0x1e52c2[_0x2004('0x1a')]));});});};exports['NotifyFaxAccount']=function(_0x11f2fb,_0xe028c8,_0x4176a1){var _0x2f4231=this;return new Promise(function(_0x459225,_0x1c03f8){var _0x380013={'body':_0x11f2fb[_0x2004('0x28')],'channel':_0x2004('0x29')};var _0x52fa80=[];var _0x500eed=[];var _0x39fbdb={};return db[_0x2004('0x2a')][_0x2004('0x2b')]()[_0x2004('0x11')](function(_0x55d8dd){if(!_0x55d8dd){throw new db[(_0x2004('0x2c'))][(_0x2004('0x2d'))](_0x2004('0x2e'));}_0x52fa80=_[_0x2004('0x2f')](_[_0x2004('0x30')](_0x55d8dd),['createdAt',_0x2004('0x31')]);_0x500eed=_[_0x2004('0x2f')](_['keys'](_0x55d8dd),[_0x2004('0x32'),_0x2004('0x31'),_0x2004('0x33'),'ListId']);if(_0x11f2fb[_0x2004('0x28')]['id']){delete _0x11f2fb['body']['id'];}if(_['isNil'](_0x11f2fb[_0x2004('0x28')][_0x2004('0x34')])){throw new db[(_0x2004('0x2c'))][(_0x2004('0x2d'))]('from\x20is\x20mandatory');}if(_[_0x2004('0x35')](_0x11f2fb['body'][_0x2004('0x28')])||_0x11f2fb[_0x2004('0x28')][_0x2004('0x28')]===''){throw new db[(_0x2004('0x2c'))]['ValidationError'](_0x2004('0x36'));}if(_['isNil'](_0x11f2fb[_0x2004('0x28')][_0x2004('0x37')])){throw new db[(_0x2004('0x2c'))][(_0x2004('0x2d'))](_0x2004('0x38')+_0x500eed);}if(!_['includes'](_0x500eed,_0x11f2fb[_0x2004('0x28')][_0x2004('0x37')])){throw new db[(_0x2004('0x2c'))][(_0x2004('0x2d'))](_0x2004('0x39')+_0x500eed);}_0x39fbdb[_0x11f2fb[_0x2004('0x28')][_0x2004('0x37')]]=_0x11f2fb[_0x2004('0x28')][_0x2004('0x34')];})[_0x2004('0x11')](function(){return db[_0x2004('0x1e')][_0x2004('0x3a')]({'where':{'id':_0x11f2fb[_0x2004('0x3b')]['id']},'include':[{'model':db[_0x2004('0x3c')],'as':_0x2004('0x3d'),'include':[{'model':db[_0x2004('0x2a')],'as':_0x2004('0x3e'),'where':_0x39fbdb,'limit':0x1,'order':[[_0x2004('0x31'),'DESC']]}]},{'model':db[_0x2004('0x3f')],'as':_0x2004('0x40')}]});})['then'](function(_0x5da2a2){if(_0x5da2a2&&_0x5da2a2['List']){var _0x4db7ef=_0x5da2a2[_0x2004('0x41')]({'plain':!![]});_0x380013[_0x2004('0x3b')]=_0x4db7ef;_0x380013[_0x2004('0x42')]=_0x4db7ef['Applications'];_0x380013[_0x2004('0x43')]=_0x4db7ef['List'];_0x380013[_0x2004('0x42')]=_[_0x2004('0x44')](_0x380013[_0x2004('0x42')],[_0x2004('0x45')],[_0x2004('0x46')]);if(_0x380013[_0x2004('0x3b')][_0x2004('0x40')]){delete _0x380013[_0x2004('0x3b')]['Applications'];}if(_0x380013[_0x2004('0x3b')]['List']&&_0x380013[_0x2004('0x3b')][_0x2004('0x3d')][_0x2004('0x3e')][_0x2004('0x47')]){return _0x380013['account'][_0x2004('0x3d')][_0x2004('0x3e')][0x0];}var _0x135390=_[_0x2004('0xd')](_0x11f2fb[_0x2004('0x28')],{'firstName':_0x11f2fb[_0x2004('0x28')][_0x2004('0x34')],'ListId':_0x4db7ef[_0x2004('0x48')]});_0x135390[_0x11f2fb['body'][_0x2004('0x37')]]=_0x11f2fb[_0x2004('0x28')]['from'];return db['CmContact'][_0x2004('0x49')](_0x135390,{'fields':_0x52fa80,'raw':!![]});}})['then'](function(_0x27b94d){_0x380013[_0x2004('0x4a')]=_0x27b94d;if(_0x27b94d){var _0x6f456b={'ContactId':_0x27b94d['id'],'FaxAccountId':_0x11f2fb[_0x2004('0x3b')]['id'],'fax':_0x27b94d[_0x2004('0x29')]};return db['FaxInteraction']['find']({'where':{'ContactId':_0x27b94d['id'],'closed':![],'FaxAccountId':_0x11f2fb['account']['id']}})['then'](function(_0x5d95c3){if(_0x5d95c3){return[_0x5d95c3,![]];}return db['FaxInteraction'][_0x2004('0x49')](_0x6f456b)[_0x2004('0x11')](function(_0xe2ad36){return[_0xe2ad36,!![]];});});}else{throw new Error(_0x2004('0x4b'));}})[_0x2004('0x4c')](function(_0x199315,_0xcb7e36){var _0x1332f0=_0x199315[_0x2004('0x41')]({'plain':!![]});if(_0xcb7e36){if(_0x380013[_0x2004('0x3b')][_0x2004('0x4d')]){_0x380013['applications'][_0x2004('0x4e')]({'id':0x0,'priority':_0x380013[_0x2004('0x42')]['length']+0x1,'app':_0x2004('0x4f'),'appdata':'unmanaged','interval':_0x2004('0x50')});}_0x1332f0[_0x2004('0x51')]=!![];}else{_0x1332f0[_0x2004('0x51')]=![];}_0x380013[_0x2004('0x52')]=_0x1332f0;return db[_0x2004('0x53')][_0x2004('0x49')]({'body':_0x11f2fb[_0x2004('0x28')][_0x2004('0x28')],'FaxAccountId':_0x11f2fb[_0x2004('0x3b')]['id'],'FaxInteractionId':_0x199315['id'],'direction':'in','ContactId':_0x199315[_0x2004('0x54')],'AttachmentId':_0x11f2fb[_0x2004('0x28')][_0x2004('0x55')]});})[_0x2004('0x11')](function(_0x421394){_0x380013[_0x2004('0x1a')]=_0x421394;if(_0x380013[_0x2004('0x52')][_0x2004('0x56')]){return db['User'][_0x2004('0x3a')]({'attributes':['id',_0x2004('0x57')],'where':{'id':_0x380013[_0x2004('0x52')][_0x2004('0x56')]}})[_0x2004('0x11')](function(_0x32dfa6){if(_0x32dfa6){_0x380013['applications']['unshift']({'id':0x0,'priority':0x0,'app':_0x2004('0x58'),'appdata':_0x32dfa6[_0x2004('0x57')]+','+(_0x380013[_0x2004('0x3b')]['waitForTheAssignedAgent']||0xa),'interval':_0x2004('0x50')});}return respondWithRpcPromise('Start',_0x2004('0x59'),_0x380013);});}return respondWithRpcPromise(_0x2004('0x5a'),_0x2004('0x59'),_0x380013);})['then'](function(_0x32f9eb){_0x459225(_0x32f9eb);})[_0x2004('0x1c')](function(_0x2e31e5){_0x1c03f8(_0x2f4231[_0x2004('0x19')](0x1f4,_0x2e31e5[_0x2004('0x1a')]));});});}; \ No newline at end of file diff --git a/server/api/faxAccount/faxAccount.socket.js b/server/api/faxAccount/faxAccount.socket.js index 20ddc97..def28f3 100644 --- a/server/api/faxAccount/faxAccount.socket.js +++ b/server/api/faxAccount/faxAccount.socket.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x2bcf=['faxAccount:','./faxAccount.events','save','remove','update','removeListener','register','length'];(function(_0x1d8a7f,_0x221531){var _0x5615b1=function(_0xd12d07){while(--_0xd12d07){_0x1d8a7f['push'](_0x1d8a7f['shift']());}};_0x5615b1(++_0x221531);}(_0x2bcf,0xe9));var _0xf2bc=function(_0x3e9ef3,_0x21a7e4){_0x3e9ef3=_0x3e9ef3-0x0;var _0x333748=_0x2bcf[_0x3e9ef3];return _0x333748;};'use strict';var FaxAccountEvents=require(_0xf2bc('0x0'));var events=[_0xf2bc('0x1'),_0xf2bc('0x2'),_0xf2bc('0x3')];function createListener(_0x59dfae,_0x4e461e){return function(_0x5560f4){_0x4e461e['emit'](_0x59dfae,_0x5560f4);};}function removeListener(_0x1cb60d,_0x37ab5a){return function(){FaxAccountEvents[_0xf2bc('0x4')](_0x1cb60d,_0x37ab5a);};}exports[_0xf2bc('0x5')]=function(_0x5910ff){for(var _0x537209=0x0,_0x35255c=events[_0xf2bc('0x6')];_0x537209<_0x35255c;_0x537209++){var _0x270945=events[_0x537209];var _0x44c0d3=createListener(_0xf2bc('0x7')+_0x270945,_0x5910ff);FaxAccountEvents['on'](_0x270945,_0x44c0d3);}}; \ No newline at end of file +var _0x342a=['./faxAccount.events','remove','update','emit','removeListener','register','faxAccount:'];(function(_0x161381,_0xd4e4d6){var _0x6b5803=function(_0x253455){while(--_0x253455){_0x161381['push'](_0x161381['shift']());}};_0x6b5803(++_0xd4e4d6);}(_0x342a,0xa1));var _0xa342=function(_0xaa0309,_0x1c8008){_0xaa0309=_0xaa0309-0x0;var _0x5de7ce=_0x342a[_0xaa0309];return _0x5de7ce;};'use strict';var FaxAccountEvents=require(_0xa342('0x0'));var events=['save',_0xa342('0x1'),_0xa342('0x2')];function createListener(_0x38ef38,_0x53edcb){return function(_0x10c497){_0x53edcb[_0xa342('0x3')](_0x38ef38,_0x10c497);};}function removeListener(_0x3d28d8,_0x39b427){return function(){FaxAccountEvents[_0xa342('0x4')](_0x3d28d8,_0x39b427);};}exports[_0xa342('0x5')]=function(_0x532ce2){for(var _0x2da224=0x0,_0x1b0f8c=events['length'];_0x2da224<_0x1b0f8c;_0x2da224++){var _0x54d265=events[_0x2da224];var _0x3187ec=createListener(_0xa342('0x6')+_0x54d265,_0x532ce2);FaxAccountEvents['on'](_0x54d265,_0x3187ec);}}; \ No newline at end of file diff --git a/server/api/faxAccount/index.js b/server/api/faxAccount/index.js index dff3556..9967f1e 100644 --- a/server/api/faxAccount/index.js +++ b/server/api/faxAccount/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xa9e0=['Router','../../components/auth/service','../../components/interaction/service','../../config/environment','./faxAccount.controller','get','index','/describe','show','/:id/dispositions','isAuthenticated','getDispositions','/:id/interactions','getInteractions','/:id/applications','/:id/messages','getMessages','/:id/users','getAgents','post','addDisposition','/:id/canned_answers','addAnswer','addInteraction','addApplications','addAccountApplications','/updateaccountapplications','/:id/send','send','addAgents','put','/:id','update','destroy','delete','removeDispositions','removeAnswers','removeAgents','exports','multer','util','path'];(function(_0x2ea26e,_0x5c331e){var _0x501c86=function(_0x33ca61){while(--_0x33ca61){_0x2ea26e['push'](_0x2ea26e['shift']());}};_0x501c86(++_0x5c331e);}(_0xa9e0,0x123));var _0x0a9e=function(_0x102e37,_0x14a181){_0x102e37=_0x102e37-0x0;var _0x35a07c=_0xa9e0[_0x102e37];return _0x35a07c;};'use strict';var multer=require(_0x0a9e('0x0'));var util=require(_0x0a9e('0x1'));var path=require(_0x0a9e('0x2'));var timeout=require('connect-timeout');var express=require('express');var router=express[_0x0a9e('0x3')]();var fs_extra=require('fs-extra');var auth=require(_0x0a9e('0x4'));var interaction=require(_0x0a9e('0x5'));var config=require(_0x0a9e('0x6'));var controller=require(_0x0a9e('0x7'));router[_0x0a9e('0x8')]('/',auth['isAuthenticated'](),controller[_0x0a9e('0x9')]);router[_0x0a9e('0x8')](_0x0a9e('0xa'),auth['isAuthenticated'](),controller['describe']);router[_0x0a9e('0x8')]('/:id',auth['isAuthenticated'](),controller[_0x0a9e('0xb')]);router[_0x0a9e('0x8')](_0x0a9e('0xc'),auth[_0x0a9e('0xd')](),controller[_0x0a9e('0xe')]);router[_0x0a9e('0x8')]('/:id/canned_answers',auth['isAuthenticated'](),controller['getAnswers']);router['get'](_0x0a9e('0xf'),auth[_0x0a9e('0xd')](),controller[_0x0a9e('0x10')]);router[_0x0a9e('0x8')](_0x0a9e('0x11'),auth[_0x0a9e('0xd')](),controller['getApplications']);router[_0x0a9e('0x8')](_0x0a9e('0x12'),auth[_0x0a9e('0xd')](),controller[_0x0a9e('0x13')]);router[_0x0a9e('0x8')](_0x0a9e('0x14'),auth['isAuthenticated'](),controller[_0x0a9e('0x15')]);router['post']('/',auth[_0x0a9e('0xd')](),controller['create']);router[_0x0a9e('0x16')](_0x0a9e('0xc'),auth['isAuthenticated'](),controller[_0x0a9e('0x17')]);router['post'](_0x0a9e('0x18'),auth[_0x0a9e('0xd')](),controller[_0x0a9e('0x19')]);router[_0x0a9e('0x16')](_0x0a9e('0xf'),auth[_0x0a9e('0xd')](),controller[_0x0a9e('0x1a')]);router[_0x0a9e('0x16')](_0x0a9e('0x11'),auth[_0x0a9e('0xd')](),controller[_0x0a9e('0x1b')]);router[_0x0a9e('0x16')]('/addaccountapplications',auth[_0x0a9e('0xd')](),controller[_0x0a9e('0x1c')]);router['post'](_0x0a9e('0x1d'),auth['isAuthenticated'](),controller['updateAccountApplications']);router[_0x0a9e('0x16')](_0x0a9e('0x1e'),auth[_0x0a9e('0xd')](),controller[_0x0a9e('0x1f')]);router['post'](_0x0a9e('0x14'),auth[_0x0a9e('0xd')](),controller[_0x0a9e('0x20')]);router[_0x0a9e('0x21')](_0x0a9e('0x22'),auth[_0x0a9e('0xd')](),controller[_0x0a9e('0x23')]);router['delete']('/:id',auth[_0x0a9e('0xd')](),controller[_0x0a9e('0x24')]);router[_0x0a9e('0x25')](_0x0a9e('0xc'),auth['isAuthenticated'](),controller[_0x0a9e('0x26')]);router['delete'](_0x0a9e('0x18'),auth['isAuthenticated'](),controller[_0x0a9e('0x27')]);router[_0x0a9e('0x25')](_0x0a9e('0x14'),auth[_0x0a9e('0xd')](),controller[_0x0a9e('0x28')]);module[_0x0a9e('0x29')]=router; \ No newline at end of file +var _0xa9e0=['Router','../../components/auth/service','../../components/interaction/service','../../config/environment','./faxAccount.controller','get','index','/describe','show','/:id/dispositions','isAuthenticated','getDispositions','/:id/interactions','getInteractions','/:id/applications','/:id/messages','getMessages','/:id/users','getAgents','post','addDisposition','/:id/canned_answers','addAnswer','addInteraction','addApplications','addAccountApplications','/updateaccountapplications','/:id/send','send','addAgents','put','/:id','update','destroy','delete','removeDispositions','removeAnswers','removeAgents','exports','multer','util','path'];(function(_0x50baba,_0x5e1ce2){var _0x5c5d48=function(_0x3aecfd){while(--_0x3aecfd){_0x50baba['push'](_0x50baba['shift']());}};_0x5c5d48(++_0x5e1ce2);}(_0xa9e0,0x123));var _0x0a9e=function(_0x18a79d,_0x57bd2c){_0x18a79d=_0x18a79d-0x0;var _0x4f8848=_0xa9e0[_0x18a79d];return _0x4f8848;};'use strict';var multer=require(_0x0a9e('0x0'));var util=require(_0x0a9e('0x1'));var path=require(_0x0a9e('0x2'));var timeout=require('connect-timeout');var express=require('express');var router=express[_0x0a9e('0x3')]();var fs_extra=require('fs-extra');var auth=require(_0x0a9e('0x4'));var interaction=require(_0x0a9e('0x5'));var config=require(_0x0a9e('0x6'));var controller=require(_0x0a9e('0x7'));router[_0x0a9e('0x8')]('/',auth['isAuthenticated'](),controller[_0x0a9e('0x9')]);router[_0x0a9e('0x8')](_0x0a9e('0xa'),auth['isAuthenticated'](),controller['describe']);router[_0x0a9e('0x8')]('/:id',auth['isAuthenticated'](),controller[_0x0a9e('0xb')]);router[_0x0a9e('0x8')](_0x0a9e('0xc'),auth[_0x0a9e('0xd')](),controller[_0x0a9e('0xe')]);router[_0x0a9e('0x8')]('/:id/canned_answers',auth['isAuthenticated'](),controller['getAnswers']);router['get'](_0x0a9e('0xf'),auth[_0x0a9e('0xd')](),controller[_0x0a9e('0x10')]);router[_0x0a9e('0x8')](_0x0a9e('0x11'),auth[_0x0a9e('0xd')](),controller['getApplications']);router[_0x0a9e('0x8')](_0x0a9e('0x12'),auth[_0x0a9e('0xd')](),controller[_0x0a9e('0x13')]);router[_0x0a9e('0x8')](_0x0a9e('0x14'),auth['isAuthenticated'](),controller[_0x0a9e('0x15')]);router['post']('/',auth[_0x0a9e('0xd')](),controller['create']);router[_0x0a9e('0x16')](_0x0a9e('0xc'),auth['isAuthenticated'](),controller[_0x0a9e('0x17')]);router['post'](_0x0a9e('0x18'),auth[_0x0a9e('0xd')](),controller[_0x0a9e('0x19')]);router[_0x0a9e('0x16')](_0x0a9e('0xf'),auth[_0x0a9e('0xd')](),controller[_0x0a9e('0x1a')]);router[_0x0a9e('0x16')](_0x0a9e('0x11'),auth[_0x0a9e('0xd')](),controller[_0x0a9e('0x1b')]);router[_0x0a9e('0x16')]('/addaccountapplications',auth[_0x0a9e('0xd')](),controller[_0x0a9e('0x1c')]);router['post'](_0x0a9e('0x1d'),auth['isAuthenticated'](),controller['updateAccountApplications']);router[_0x0a9e('0x16')](_0x0a9e('0x1e'),auth[_0x0a9e('0xd')](),controller[_0x0a9e('0x1f')]);router['post'](_0x0a9e('0x14'),auth[_0x0a9e('0xd')](),controller[_0x0a9e('0x20')]);router[_0x0a9e('0x21')](_0x0a9e('0x22'),auth[_0x0a9e('0xd')](),controller[_0x0a9e('0x23')]);router['delete']('/:id',auth[_0x0a9e('0xd')](),controller[_0x0a9e('0x24')]);router[_0x0a9e('0x25')](_0x0a9e('0xc'),auth['isAuthenticated'](),controller[_0x0a9e('0x26')]);router['delete'](_0x0a9e('0x18'),auth['isAuthenticated'](),controller[_0x0a9e('0x27')]);router[_0x0a9e('0x25')](_0x0a9e('0x14'),auth[_0x0a9e('0xd')](),controller[_0x0a9e('0x28')]);module[_0x0a9e('0x29')]=router; \ No newline at end of file diff --git a/server/api/faxApplication/faxApplication.attributes.js b/server/api/faxApplication/faxApplication.attributes.js index 304771c..9f5bcde 100644 --- a/server/api/faxApplication/faxApplication.attributes.js +++ b/server/api/faxApplication/faxApplication.attributes.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x9aa8=['*,*,*,*','sequelize','exports','INTEGER','noop'];(function(_0x42b907,_0x398cf7){var _0x3f938f=function(_0x5adbce){while(--_0x5adbce){_0x42b907['push'](_0x42b907['shift']());}};_0x3f938f(++_0x398cf7);}(_0x9aa8,0x155));var _0x89aa=function(_0x56b4f6,_0x4920be){_0x56b4f6=_0x56b4f6-0x0;var _0xe9abfa=_0x9aa8[_0x56b4f6];return _0xe9abfa;};'use strict';var Sequelize=require(_0x89aa('0x0'));module[_0x89aa('0x1')]={'priority':{'type':Sequelize[_0x89aa('0x2')],'allowNull':![]},'app':{'type':Sequelize['STRING'],'allowNull':![],'defaultValue':_0x89aa('0x3')},'appdata':{'type':Sequelize['TEXT']()},'description':{'type':Sequelize['STRING']},'interval':{'type':Sequelize['STRING'],'defaultValue':_0x89aa('0x4')}}; \ No newline at end of file +var _0x618e=['STRING','noop','TEXT','sequelize','INTEGER'];(function(_0x3826ad,_0x49a30d){var _0x17b900=function(_0x38474f){while(--_0x38474f){_0x3826ad['push'](_0x3826ad['shift']());}};_0x17b900(++_0x49a30d);}(_0x618e,0x198));var _0xe618=function(_0x20c6af,_0x15ac97){_0x20c6af=_0x20c6af-0x0;var _0x1e8088=_0x618e[_0x20c6af];return _0x1e8088;};'use strict';var Sequelize=require(_0xe618('0x0'));module['exports']={'priority':{'type':Sequelize[_0xe618('0x1')],'allowNull':![]},'app':{'type':Sequelize[_0xe618('0x2')],'allowNull':![],'defaultValue':_0xe618('0x3')},'appdata':{'type':Sequelize[_0xe618('0x4')]()},'description':{'type':Sequelize[_0xe618('0x2')]},'interval':{'type':Sequelize['STRING'],'defaultValue':'*,*,*,*'}}; \ No newline at end of file diff --git a/server/api/faxApplication/faxApplication.controller.js b/server/api/faxApplication/faxApplication.controller.js index f256f6a..c239c5f 100644 --- a/server/api/faxApplication/faxApplication.controller.js +++ b/server/api/faxApplication/faxApplication.controller.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x8f38=['lodash','squel','jsforce','desk.js','querystring','papaparse','ioredis','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','sendStatus','status','end','json','offset','undefined','limit','count','set','Content-Range','apply','save','update','then','destroy','index','map','FaxApplication','rawAttributes','key','model','name','filters','intersection','query','attributes','fields','length','hasOwnProperty','nolimit','sort','where','filter','VIRTUAL','merge','includeAll','findAll','rows','catch','show','params','include','options','create','body','find','eml-format','rimraf','zip-dir','fast-json-patch','moment','bluebird','mustache','util','path','sox','to-csv','ejs'];(function(_0x466002,_0x438fc0){var _0x33f1a1=function(_0x770868){while(--_0x770868){_0x466002['push'](_0x466002['shift']());}};_0x33f1a1(++_0x438fc0);}(_0x8f38,0x11c));var _0x88f3=function(_0x307086,_0x3bfe4e){_0x307086=_0x307086-0x0;var _0x699043=_0x8f38[_0x307086];return _0x699043;};'use strict';var emlformat=require(_0x88f3('0x0'));var rimraf=require(_0x88f3('0x1'));var zipdir=require(_0x88f3('0x2'));var jsonpatch=require(_0x88f3('0x3'));var rp=require('request-promise');var moment=require(_0x88f3('0x4'));var BPromise=require(_0x88f3('0x5'));var Mustache=require(_0x88f3('0x6'));var util=require(_0x88f3('0x7'));var path=require(_0x88f3('0x8'));var sox=require(_0x88f3('0x9'));var csv=require(_0x88f3('0xa'));var ejs=require(_0x88f3('0xb'));var fs=require('fs');var fs_extra=require('fs-extra');var _=require(_0x88f3('0xc'));var squel=require(_0x88f3('0xd'));var crypto=require('crypto');var jsforce=require(_0x88f3('0xe'));var deskjs=require(_0x88f3('0xf'));var toCsv=require('to-csv');var querystring=require(_0x88f3('0x10'));var Papa=require(_0x88f3('0x11'));var Redis=require(_0x88f3('0x12'));var authService=require('../../components/auth/service');var qs=require(_0x88f3('0x13'));var as=require(_0x88f3('0x14'));var hardwareService=require(_0x88f3('0x15'));var logger=require(_0x88f3('0x16'))(_0x88f3('0x17'));var utils=require(_0x88f3('0x18'));var config=require(_0x88f3('0x19'));var licenseUtil=require(_0x88f3('0x1a'));var db=require(_0x88f3('0x1b'))['db'];function respondWithStatusCode(_0x599c6a,_0x4faedf){_0x4faedf=_0x4faedf||0xcc;return function(_0x539a5a){if(_0x539a5a){return _0x599c6a[_0x88f3('0x1c')](_0x4faedf);}return _0x599c6a[_0x88f3('0x1d')](_0x4faedf)[_0x88f3('0x1e')]();};}function respondWithResult(_0x57e017,_0x37781d){_0x37781d=_0x37781d||0xc8;return function(_0x50f6f3){if(_0x50f6f3){return _0x57e017['status'](_0x37781d)[_0x88f3('0x1f')](_0x50f6f3);}};}function respondWithFilteredResult(_0x29fcb4,_0x36710d){return function(_0x53adae){if(_0x53adae){var _0x2ff368=typeof _0x36710d[_0x88f3('0x20')]===_0x88f3('0x21')&&typeof _0x36710d[_0x88f3('0x22')]===_0x88f3('0x21');var _0x43463d=_0x53adae[_0x88f3('0x23')];var _0x39e2bd=_0x2ff368?0x0:_0x36710d[_0x88f3('0x20')];var _0x4af5ef=_0x2ff368?_0x53adae['count']:_0x36710d[_0x88f3('0x20')]+_0x36710d['limit'];var _0x1e214c;if(_0x4af5ef>=_0x43463d){_0x4af5ef=_0x43463d;_0x1e214c=0xc8;}else{_0x1e214c=0xce;}_0x29fcb4[_0x88f3('0x1d')](_0x1e214c);return _0x29fcb4[_0x88f3('0x24')](_0x88f3('0x25'),_0x39e2bd+'-'+_0x4af5ef+'/'+_0x43463d)[_0x88f3('0x1f')](_0x53adae);}return null;};}function patchUpdates(_0x3e7f5b){return function(_0x22510c){try{jsonpatch[_0x88f3('0x26')](_0x22510c,_0x3e7f5b,!![]);}catch(_0xa3b042){return BPromise['reject'](_0xa3b042);}return _0x22510c[_0x88f3('0x27')]();};}function saveUpdates(_0x4b8a60,_0x58dbe8){return function(_0x1f3ea0){if(_0x1f3ea0){return _0x1f3ea0[_0x88f3('0x28')](_0x4b8a60)[_0x88f3('0x29')](function(_0x40a68a){return _0x40a68a;});}return null;};}function removeEntity(_0x936a1d,_0x3fd40b){return function(_0x3304bf){if(_0x3304bf){return _0x3304bf[_0x88f3('0x2a')]()['then'](function(){_0x936a1d[_0x88f3('0x1d')](0xcc)[_0x88f3('0x1e')]();});}};}function handleEntityNotFound(_0x2ad3f5,_0x5a636a){return function(_0x171f6e){if(!_0x171f6e){_0x2ad3f5['sendStatus'](0x194);}return _0x171f6e;};}function handleError(_0x4f0a94,_0x1c3245){_0x1c3245=_0x1c3245||0x1f4;return function(_0x3cc668){logger['error'](_0x3cc668['stack']);if(_0x3cc668['name']){delete _0x3cc668['name'];}_0x4f0a94[_0x88f3('0x1d')](_0x1c3245)['send'](_0x3cc668);};}exports[_0x88f3('0x2b')]=function(_0x562eb4,_0x5e48c5){var _0x346957={},_0x3cd183={},_0x5aabb7={'count':0x0,'rows':[]};var _0x570a48=_[_0x88f3('0x2c')](db[_0x88f3('0x2d')][_0x88f3('0x2e')],function(_0x2bae45){return{'name':_0x2bae45['fieldName'],'type':_0x2bae45['type'][_0x88f3('0x2f')]};});_0x3cd183[_0x88f3('0x30')]=_['map'](_0x570a48,_0x88f3('0x31'));_0x3cd183['query']=_['keys'](_0x562eb4['query']);_0x3cd183[_0x88f3('0x32')]=_[_0x88f3('0x33')](_0x3cd183[_0x88f3('0x30')],_0x3cd183[_0x88f3('0x34')]);_0x346957[_0x88f3('0x35')]=_['intersection'](_0x3cd183[_0x88f3('0x30')],qs[_0x88f3('0x36')](_0x562eb4[_0x88f3('0x34')][_0x88f3('0x36')]));_0x346957[_0x88f3('0x35')]=_0x346957[_0x88f3('0x35')][_0x88f3('0x37')]?_0x346957[_0x88f3('0x35')]:_0x3cd183['model'];if(!_0x562eb4['query'][_0x88f3('0x38')](_0x88f3('0x39'))){_0x346957['limit']=qs['limit'](_0x562eb4[_0x88f3('0x34')][_0x88f3('0x22')]);_0x346957[_0x88f3('0x20')]=qs['offset'](_0x562eb4['query'][_0x88f3('0x20')]);}_0x346957['order']=qs['sort'](_0x562eb4[_0x88f3('0x34')][_0x88f3('0x3a')]);_0x346957[_0x88f3('0x3b')]=qs[_0x88f3('0x32')](_['pick'](_0x562eb4[_0x88f3('0x34')],_0x3cd183[_0x88f3('0x32')]),_0x570a48);if(_0x562eb4[_0x88f3('0x34')][_0x88f3('0x3c')]){_0x346957['where']=_['merge'](_0x346957['where'],{'$or':_[_0x88f3('0x2c')](_0x570a48,function(_0x5869e1){if(_0x5869e1['type']!==_0x88f3('0x3d')){var _0xb206d9={};_0xb206d9[_0x5869e1[_0x88f3('0x31')]]={'$like':'%'+_0x562eb4[_0x88f3('0x34')][_0x88f3('0x3c')]+'%'};return _0xb206d9;}})});}_0x346957=_[_0x88f3('0x3e')]({},_0x346957,_0x562eb4['options']);var _0x49b970={'where':_0x346957[_0x88f3('0x3b')]};return db[_0x88f3('0x2d')][_0x88f3('0x23')](_0x49b970)[_0x88f3('0x29')](function(_0x1d94b5){_0x5aabb7[_0x88f3('0x23')]=_0x1d94b5;if(_0x562eb4[_0x88f3('0x34')][_0x88f3('0x3f')]){_0x346957['include']=[{'all':!![]}];}return db[_0x88f3('0x2d')][_0x88f3('0x40')](_0x346957);})[_0x88f3('0x29')](function(_0x3f4c30){_0x5aabb7[_0x88f3('0x41')]=_0x3f4c30;return _0x5aabb7;})[_0x88f3('0x29')](respondWithFilteredResult(_0x5e48c5,_0x346957))[_0x88f3('0x42')](handleError(_0x5e48c5,null));};exports[_0x88f3('0x43')]=function(_0x957876,_0x4da540){var _0x43625b={'raw':!![],'where':{'id':_0x957876[_0x88f3('0x44')]['id']}},_0x1a85b6={};_0x1a85b6[_0x88f3('0x30')]=_['keys'](db[_0x88f3('0x2d')]['rawAttributes']);_0x1a85b6['query']=_['keys'](_0x957876[_0x88f3('0x34')]);_0x1a85b6[_0x88f3('0x32')]=_[_0x88f3('0x33')](_0x1a85b6[_0x88f3('0x30')],_0x1a85b6[_0x88f3('0x34')]);_0x43625b[_0x88f3('0x35')]=_['intersection'](_0x1a85b6[_0x88f3('0x30')],qs[_0x88f3('0x36')](_0x957876[_0x88f3('0x34')][_0x88f3('0x36')]));_0x43625b[_0x88f3('0x35')]=_0x43625b[_0x88f3('0x35')]['length']?_0x43625b[_0x88f3('0x35')]:_0x1a85b6[_0x88f3('0x30')];if(_0x957876[_0x88f3('0x34')][_0x88f3('0x3f')]){_0x43625b[_0x88f3('0x45')]=[{'all':!![]}];}_0x43625b=_[_0x88f3('0x3e')]({},_0x43625b,_0x957876[_0x88f3('0x46')]);return db['FaxApplication']['find'](_0x43625b)[_0x88f3('0x29')](handleEntityNotFound(_0x4da540,null))[_0x88f3('0x29')](respondWithResult(_0x4da540,null))[_0x88f3('0x42')](handleError(_0x4da540,null));};exports[_0x88f3('0x47')]=function(_0x1579d4,_0x5069de){return db[_0x88f3('0x2d')][_0x88f3('0x47')](_0x1579d4['body'],{})[_0x88f3('0x29')](respondWithResult(_0x5069de,0xc9))[_0x88f3('0x42')](handleError(_0x5069de,null));};exports[_0x88f3('0x28')]=function(_0x5eccc7,_0x30f473){if(_0x5eccc7['body']['id']){delete _0x5eccc7[_0x88f3('0x48')]['id'];}return db[_0x88f3('0x2d')][_0x88f3('0x49')]({'where':{'id':_0x5eccc7[_0x88f3('0x44')]['id']}})[_0x88f3('0x29')](handleEntityNotFound(_0x30f473,null))[_0x88f3('0x29')](saveUpdates(_0x5eccc7['body'],null))['then'](respondWithResult(_0x30f473,null))[_0x88f3('0x42')](handleError(_0x30f473,null));};exports['destroy']=function(_0x1583c8,_0x55be6c){return db[_0x88f3('0x2d')][_0x88f3('0x49')]({'where':{'id':_0x1583c8['params']['id']}})[_0x88f3('0x29')](handleEntityNotFound(_0x55be6c,null))[_0x88f3('0x29')](removeEntity(_0x55be6c,null))['catch'](handleError(_0x55be6c,null));}; \ No newline at end of file +var _0x52c7=['name','send','index','map','FaxApplication','rawAttributes','fieldName','key','query','filters','model','attributes','intersection','fields','length','nolimit','order','sort','where','pick','filter','merge','includeAll','include','findAll','rows','catch','show','keys','options','find','create','body','params','destroy','rimraf','zip-dir','request-promise','moment','bluebird','mustache','util','path','sox','to-csv','ejs','lodash','squel','crypto','jsforce','desk.js','papaparse','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','sendStatus','end','status','json','offset','undefined','limit','count','set','Content-Range','apply','reject','save','update','then','error','stack'];(function(_0x46d041,_0x4b80db){var _0x294f8a=function(_0x3ba9f4){while(--_0x3ba9f4){_0x46d041['push'](_0x46d041['shift']());}};_0x294f8a(++_0x4b80db);}(_0x52c7,0x6f));var _0x752c=function(_0x4ae6ef,_0xc2af80){_0x4ae6ef=_0x4ae6ef-0x0;var _0x3cbb4e=_0x52c7[_0x4ae6ef];return _0x3cbb4e;};'use strict';var emlformat=require('eml-format');var rimraf=require(_0x752c('0x0'));var zipdir=require(_0x752c('0x1'));var jsonpatch=require('fast-json-patch');var rp=require(_0x752c('0x2'));var moment=require(_0x752c('0x3'));var BPromise=require(_0x752c('0x4'));var Mustache=require(_0x752c('0x5'));var util=require(_0x752c('0x6'));var path=require(_0x752c('0x7'));var sox=require(_0x752c('0x8'));var csv=require(_0x752c('0x9'));var ejs=require(_0x752c('0xa'));var fs=require('fs');var fs_extra=require('fs-extra');var _=require(_0x752c('0xb'));var squel=require(_0x752c('0xc'));var crypto=require(_0x752c('0xd'));var jsforce=require(_0x752c('0xe'));var deskjs=require(_0x752c('0xf'));var toCsv=require(_0x752c('0x9'));var querystring=require('querystring');var Papa=require(_0x752c('0x10'));var Redis=require('ioredis');var authService=require(_0x752c('0x11'));var qs=require(_0x752c('0x12'));var as=require(_0x752c('0x13'));var hardwareService=require('../../config/license/hardware');var logger=require('../../config/logger')('api');var utils=require(_0x752c('0x14'));var config=require(_0x752c('0x15'));var licenseUtil=require(_0x752c('0x16'));var db=require(_0x752c('0x17'))['db'];function respondWithStatusCode(_0x5bc92e,_0x40c768){_0x40c768=_0x40c768||0xcc;return function(_0x3d7bc0){if(_0x3d7bc0){return _0x5bc92e[_0x752c('0x18')](_0x40c768);}return _0x5bc92e['status'](_0x40c768)[_0x752c('0x19')]();};}function respondWithResult(_0x88bb2f,_0x14c6a4){_0x14c6a4=_0x14c6a4||0xc8;return function(_0x1191ff){if(_0x1191ff){return _0x88bb2f[_0x752c('0x1a')](_0x14c6a4)[_0x752c('0x1b')](_0x1191ff);}};}function respondWithFilteredResult(_0x2f3d8e,_0x5c95c7){return function(_0x5d56b8){if(_0x5d56b8){var _0x1b8471=typeof _0x5c95c7[_0x752c('0x1c')]===_0x752c('0x1d')&&typeof _0x5c95c7[_0x752c('0x1e')]===_0x752c('0x1d');var _0x35327f=_0x5d56b8[_0x752c('0x1f')];var _0x136482=_0x1b8471?0x0:_0x5c95c7['offset'];var _0x16a494=_0x1b8471?_0x5d56b8[_0x752c('0x1f')]:_0x5c95c7[_0x752c('0x1c')]+_0x5c95c7[_0x752c('0x1e')];var _0x411da9;if(_0x16a494>=_0x35327f){_0x16a494=_0x35327f;_0x411da9=0xc8;}else{_0x411da9=0xce;}_0x2f3d8e[_0x752c('0x1a')](_0x411da9);return _0x2f3d8e[_0x752c('0x20')](_0x752c('0x21'),_0x136482+'-'+_0x16a494+'/'+_0x35327f)['json'](_0x5d56b8);}return null;};}function patchUpdates(_0x201fc9){return function(_0x340b56){try{jsonpatch[_0x752c('0x22')](_0x340b56,_0x201fc9,!![]);}catch(_0x59855b){return BPromise[_0x752c('0x23')](_0x59855b);}return _0x340b56[_0x752c('0x24')]();};}function saveUpdates(_0x434a,_0x34fe6d){return function(_0x413fc2){if(_0x413fc2){return _0x413fc2[_0x752c('0x25')](_0x434a)[_0x752c('0x26')](function(_0x2fec26){return _0x2fec26;});}return null;};}function removeEntity(_0x48facf,_0x5da61e){return function(_0x573b2c){if(_0x573b2c){return _0x573b2c['destroy']()[_0x752c('0x26')](function(){_0x48facf[_0x752c('0x1a')](0xcc)[_0x752c('0x19')]();});}};}function handleEntityNotFound(_0x240171,_0x5a533e){return function(_0x10379d){if(!_0x10379d){_0x240171[_0x752c('0x18')](0x194);}return _0x10379d;};}function handleError(_0x1cf165,_0x372f79){_0x372f79=_0x372f79||0x1f4;return function(_0xad5a39){logger[_0x752c('0x27')](_0xad5a39[_0x752c('0x28')]);if(_0xad5a39[_0x752c('0x29')]){delete _0xad5a39[_0x752c('0x29')];}_0x1cf165[_0x752c('0x1a')](_0x372f79)[_0x752c('0x2a')](_0xad5a39);};}exports[_0x752c('0x2b')]=function(_0x4131e8,_0x4770c3){var _0x275041={},_0x1ea2a1={},_0x2efff1={'count':0x0,'rows':[]};var _0xeb7a33=_[_0x752c('0x2c')](db[_0x752c('0x2d')][_0x752c('0x2e')],function(_0x327779){return{'name':_0x327779[_0x752c('0x2f')],'type':_0x327779['type'][_0x752c('0x30')]};});_0x1ea2a1['model']=_[_0x752c('0x2c')](_0xeb7a33,_0x752c('0x29'));_0x1ea2a1[_0x752c('0x31')]=_['keys'](_0x4131e8['query']);_0x1ea2a1[_0x752c('0x32')]=_['intersection'](_0x1ea2a1[_0x752c('0x33')],_0x1ea2a1[_0x752c('0x31')]);_0x275041[_0x752c('0x34')]=_[_0x752c('0x35')](_0x1ea2a1[_0x752c('0x33')],qs[_0x752c('0x36')](_0x4131e8[_0x752c('0x31')][_0x752c('0x36')]));_0x275041[_0x752c('0x34')]=_0x275041[_0x752c('0x34')][_0x752c('0x37')]?_0x275041[_0x752c('0x34')]:_0x1ea2a1[_0x752c('0x33')];if(!_0x4131e8[_0x752c('0x31')]['hasOwnProperty'](_0x752c('0x38'))){_0x275041['limit']=qs[_0x752c('0x1e')](_0x4131e8[_0x752c('0x31')][_0x752c('0x1e')]);_0x275041[_0x752c('0x1c')]=qs[_0x752c('0x1c')](_0x4131e8[_0x752c('0x31')][_0x752c('0x1c')]);}_0x275041[_0x752c('0x39')]=qs[_0x752c('0x3a')](_0x4131e8['query'][_0x752c('0x3a')]);_0x275041[_0x752c('0x3b')]=qs['filters'](_[_0x752c('0x3c')](_0x4131e8['query'],_0x1ea2a1[_0x752c('0x32')]),_0xeb7a33);if(_0x4131e8[_0x752c('0x31')][_0x752c('0x3d')]){_0x275041['where']=_[_0x752c('0x3e')](_0x275041[_0x752c('0x3b')],{'$or':_[_0x752c('0x2c')](_0xeb7a33,function(_0x21ef26){if(_0x21ef26['type']!=='VIRTUAL'){var _0x551555={};_0x551555[_0x21ef26[_0x752c('0x29')]]={'$like':'%'+_0x4131e8[_0x752c('0x31')][_0x752c('0x3d')]+'%'};return _0x551555;}})});}_0x275041=_[_0x752c('0x3e')]({},_0x275041,_0x4131e8['options']);var _0x1303df={'where':_0x275041[_0x752c('0x3b')]};return db['FaxApplication']['count'](_0x1303df)['then'](function(_0x536b65){_0x2efff1[_0x752c('0x1f')]=_0x536b65;if(_0x4131e8[_0x752c('0x31')][_0x752c('0x3f')]){_0x275041[_0x752c('0x40')]=[{'all':!![]}];}return db[_0x752c('0x2d')][_0x752c('0x41')](_0x275041);})[_0x752c('0x26')](function(_0x4a6bca){_0x2efff1[_0x752c('0x42')]=_0x4a6bca;return _0x2efff1;})[_0x752c('0x26')](respondWithFilteredResult(_0x4770c3,_0x275041))[_0x752c('0x43')](handleError(_0x4770c3,null));};exports[_0x752c('0x44')]=function(_0x31a993,_0x53daea){var _0x1c6d6e={'raw':!![],'where':{'id':_0x31a993['params']['id']}},_0x25e19b={};_0x25e19b[_0x752c('0x33')]=_[_0x752c('0x45')](db[_0x752c('0x2d')][_0x752c('0x2e')]);_0x25e19b[_0x752c('0x31')]=_[_0x752c('0x45')](_0x31a993[_0x752c('0x31')]);_0x25e19b[_0x752c('0x32')]=_[_0x752c('0x35')](_0x25e19b[_0x752c('0x33')],_0x25e19b['query']);_0x1c6d6e[_0x752c('0x34')]=_[_0x752c('0x35')](_0x25e19b['model'],qs[_0x752c('0x36')](_0x31a993['query'][_0x752c('0x36')]));_0x1c6d6e[_0x752c('0x34')]=_0x1c6d6e[_0x752c('0x34')][_0x752c('0x37')]?_0x1c6d6e['attributes']:_0x25e19b[_0x752c('0x33')];if(_0x31a993['query'][_0x752c('0x3f')]){_0x1c6d6e[_0x752c('0x40')]=[{'all':!![]}];}_0x1c6d6e=_[_0x752c('0x3e')]({},_0x1c6d6e,_0x31a993[_0x752c('0x46')]);return db[_0x752c('0x2d')][_0x752c('0x47')](_0x1c6d6e)[_0x752c('0x26')](handleEntityNotFound(_0x53daea,null))[_0x752c('0x26')](respondWithResult(_0x53daea,null))[_0x752c('0x43')](handleError(_0x53daea,null));};exports[_0x752c('0x48')]=function(_0x4d2edc,_0x1e6a7c){return db[_0x752c('0x2d')][_0x752c('0x48')](_0x4d2edc[_0x752c('0x49')],{})[_0x752c('0x26')](respondWithResult(_0x1e6a7c,0xc9))[_0x752c('0x43')](handleError(_0x1e6a7c,null));};exports[_0x752c('0x25')]=function(_0x56bca8,_0x369bbf){if(_0x56bca8[_0x752c('0x49')]['id']){delete _0x56bca8['body']['id'];}return db[_0x752c('0x2d')][_0x752c('0x47')]({'where':{'id':_0x56bca8[_0x752c('0x4a')]['id']}})[_0x752c('0x26')](handleEntityNotFound(_0x369bbf,null))[_0x752c('0x26')](saveUpdates(_0x56bca8[_0x752c('0x49')],null))['then'](respondWithResult(_0x369bbf,null))[_0x752c('0x43')](handleError(_0x369bbf,null));};exports[_0x752c('0x4b')]=function(_0x236112,_0x1ccfbd){return db['FaxApplication'][_0x752c('0x47')]({'where':{'id':_0x236112['params']['id']}})['then'](handleEntityNotFound(_0x1ccfbd,null))[_0x752c('0x26')](removeEntity(_0x1ccfbd,null))[_0x752c('0x43')](handleError(_0x1ccfbd,null));}; \ No newline at end of file diff --git a/server/api/faxApplication/faxApplication.model.js b/server/api/faxApplication/faxApplication.model.js index fe40d99..6f6c3a3 100644 --- a/server/api/faxApplication/faxApplication.model.js +++ b/server/api/faxApplication/faxApplication.model.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x8514=['lodash','util','../../config/logger','api','moment','bluebird','request-promise','path','rimraf','./faxApplication.attributes','exports','define','utf8mb4','utf8mb4_unicode_ci'];(function(_0x149d91,_0x44db80){var _0x44b78a=function(_0x554bcb){while(--_0x554bcb){_0x149d91['push'](_0x149d91['shift']());}};_0x44b78a(++_0x44db80);}(_0x8514,0x9a));var _0x4851=function(_0x4ff291,_0x54cb0b){_0x4ff291=_0x4ff291-0x0;var _0x474cca=_0x8514[_0x4ff291];return _0x474cca;};'use strict';var _=require(_0x4851('0x0'));var util=require(_0x4851('0x1'));var logger=require(_0x4851('0x2'))(_0x4851('0x3'));var moment=require(_0x4851('0x4'));var BPromise=require(_0x4851('0x5'));var rp=require(_0x4851('0x6'));var fs=require('fs');var path=require(_0x4851('0x7'));var rimraf=require(_0x4851('0x8'));var config=require('../../config/environment');var attributes=require(_0x4851('0x9'));module[_0x4851('0xa')]=function(_0x2633a5,_0x4adeec){return _0x2633a5[_0x4851('0xb')]('FaxApplication',attributes,{'tableName':'fax_applications','paranoid':![],'indexes':[],'timestamps':!![],'charset':_0x4851('0xc'),'collate':_0x4851('0xd')});}; \ No newline at end of file +var _0x1fa0=['../../config/logger','api','moment','bluebird','request-promise','path','../../config/environment','./faxApplication.attributes','exports','define','fax_applications','utf8mb4','utf8mb4_unicode_ci','lodash'];(function(_0x4f4fb3,_0xbcff79){var _0x5d7c3f=function(_0xdc532d){while(--_0xdc532d){_0x4f4fb3['push'](_0x4f4fb3['shift']());}};_0x5d7c3f(++_0xbcff79);}(_0x1fa0,0x1a3));var _0x01fa=function(_0xe7aa08,_0x480743){_0xe7aa08=_0xe7aa08-0x0;var _0xbc6799=_0x1fa0[_0xe7aa08];return _0xbc6799;};'use strict';var _=require(_0x01fa('0x0'));var util=require('util');var logger=require(_0x01fa('0x1'))(_0x01fa('0x2'));var moment=require(_0x01fa('0x3'));var BPromise=require(_0x01fa('0x4'));var rp=require(_0x01fa('0x5'));var fs=require('fs');var path=require(_0x01fa('0x6'));var rimraf=require('rimraf');var config=require(_0x01fa('0x7'));var attributes=require(_0x01fa('0x8'));module[_0x01fa('0x9')]=function(_0x2cf5dc,_0x27aa9e){return _0x2cf5dc[_0x01fa('0xa')]('FaxApplication',attributes,{'tableName':_0x01fa('0xb'),'paranoid':![],'indexes':[],'timestamps':!![],'charset':_0x01fa('0xc'),'collate':_0x01fa('0xd')});}; \ No newline at end of file diff --git a/server/api/faxApplication/faxApplication.rpc.js b/server/api/faxApplication/faxApplication.rpc.js index 71e3441..e8064e3 100644 --- a/server/api/faxApplication/faxApplication.rpc.js +++ b/server/api/faxApplication/faxApplication.rpc.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x8ef6=['FaxApplication,\x20%s,\x20%s','request\x20sent','debug','FaxApplication,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','catch','FaxApplication','update','body','options','raw','where','attributes','UpdateFaxApplication','lodash','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/logger','rpc','../../config/environment','jayson/promise','request','then','info'];(function(_0x2641f9,_0x26715f){var _0x585741=function(_0x2d1462){while(--_0x2d1462){_0x2641f9['push'](_0x2641f9['shift']());}};_0x585741(++_0x26715f);}(_0x8ef6,0xf2));var _0x68ef=function(_0x3e8b66,_0x4cfa95){_0x3e8b66=_0x3e8b66-0x0;var _0x1e2b99=_0x8ef6[_0x3e8b66];return _0x1e2b99;};'use strict';var _=require(_0x68ef('0x0'));var util=require(_0x68ef('0x1'));var moment=require(_0x68ef('0x2'));var BPromise=require(_0x68ef('0x3'));var rs=require(_0x68ef('0x4'));var fs=require('fs');var Redis=require(_0x68ef('0x5'));var db=require(_0x68ef('0x6'))['db'];var utils=require('../../config/utils');var logger=require(_0x68ef('0x7'))(_0x68ef('0x8'));var config=require(_0x68ef('0x9'));var jayson=require(_0x68ef('0xa'));var client=jayson['client']['http']({'port':0x232a});function respondWithRpcPromise(_0x3c2ff3,_0x4740e8,_0x2de776){return new BPromise(function(_0x4eb5eb,_0x228967){return client[_0x68ef('0xb')](_0x3c2ff3,_0x2de776)[_0x68ef('0xc')](function(_0x22ae26){logger[_0x68ef('0xd')](_0x68ef('0xe'),_0x4740e8,_0x68ef('0xf'));logger[_0x68ef('0x10')](_0x68ef('0x11'),_0x4740e8,_0x68ef('0xf'),JSON[_0x68ef('0x12')](_0x22ae26));if(_0x22ae26[_0x68ef('0x13')]){if(_0x22ae26['error'][_0x68ef('0x14')]===0x1f4){logger[_0x68ef('0x13')](_0x68ef('0xe'),_0x4740e8,_0x22ae26[_0x68ef('0x13')][_0x68ef('0x15')]);return _0x228967(_0x22ae26[_0x68ef('0x13')]['message']);}logger[_0x68ef('0x13')](_0x68ef('0xe'),_0x4740e8,_0x22ae26[_0x68ef('0x13')]['message']);return _0x4eb5eb(_0x22ae26[_0x68ef('0x13')][_0x68ef('0x15')]);}else{logger[_0x68ef('0xd')]('FaxApplication,\x20%s,\x20%s',_0x4740e8,_0x68ef('0xf'));_0x4eb5eb(_0x22ae26[_0x68ef('0x16')][_0x68ef('0x15')]);}})[_0x68ef('0x17')](function(_0x5c4456){logger[_0x68ef('0x13')]('FaxApplication,\x20%s,\x20%s',_0x4740e8,_0x5c4456);_0x228967(_0x5c4456);});});}exports['UpdateFaxApplication']=function(_0x2633c1){var _0x404870=this;return new Promise(function(_0x4ade0d,_0x527870){return db[_0x68ef('0x18')][_0x68ef('0x19')](_0x2633c1[_0x68ef('0x1a')],{'raw':_0x2633c1['options']?_0x2633c1[_0x68ef('0x1b')][_0x68ef('0x1c')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x2633c1[_0x68ef('0x1b')]?_0x2633c1['options'][_0x68ef('0x1d')]||null:null,'attributes':_0x2633c1[_0x68ef('0x1b')]?_0x2633c1['options'][_0x68ef('0x1e')]||null:null,'limit':_0x2633c1[_0x68ef('0x1b')]?_0x2633c1[_0x68ef('0x1b')]['limit']||null:null})['then'](function(_0x59bebc){logger[_0x68ef('0xd')](_0x68ef('0x1f'),_0x2633c1);logger[_0x68ef('0x10')](_0x68ef('0x1f'),_0x2633c1,JSON[_0x68ef('0x12')](_0x59bebc));_0x4ade0d(_0x59bebc);})[_0x68ef('0x17')](function(_0x258cd5){logger[_0x68ef('0x13')](_0x68ef('0x1f'),_0x258cd5[_0x68ef('0x15')],_0x2633c1);_0x527870(_0x404870['error'](0x1f4,_0x258cd5[_0x68ef('0x15')]));});});}; \ No newline at end of file +var _0x385e=['util','moment','bluebird','../../mysqldb','../../config/utils','../../config/environment','jayson/promise','client','http','request','then','info','request\x20sent','debug','FaxApplication,\x20%s,\x20%s,\x20%s','stringify','error','code','message','FaxApplication,\x20%s,\x20%s','result','catch','UpdateFaxApplication','FaxApplication','update','body','options','raw','where','attributes','limit','lodash'];(function(_0x3da912,_0x5e910a){var _0x355e45=function(_0x21b986){while(--_0x21b986){_0x3da912['push'](_0x3da912['shift']());}};_0x355e45(++_0x5e910a);}(_0x385e,0xdf));var _0xe385=function(_0x2cc569,_0x4e9568){_0x2cc569=_0x2cc569-0x0;var _0x1bfc2e=_0x385e[_0x2cc569];return _0x1bfc2e;};'use strict';var _=require(_0xe385('0x0'));var util=require(_0xe385('0x1'));var moment=require(_0xe385('0x2'));var BPromise=require(_0xe385('0x3'));var rs=require('randomstring');var fs=require('fs');var Redis=require('ioredis');var db=require(_0xe385('0x4'))['db'];var utils=require(_0xe385('0x5'));var logger=require('../../config/logger')('rpc');var config=require(_0xe385('0x6'));var jayson=require(_0xe385('0x7'));var client=jayson[_0xe385('0x8')][_0xe385('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x227120,_0x32ac4d,_0x567000){return new BPromise(function(_0xd3a544,_0x582642){return client[_0xe385('0xa')](_0x227120,_0x567000)[_0xe385('0xb')](function(_0xf4a14b){logger[_0xe385('0xc')]('FaxApplication,\x20%s,\x20%s',_0x32ac4d,_0xe385('0xd'));logger[_0xe385('0xe')](_0xe385('0xf'),_0x32ac4d,_0xe385('0xd'),JSON[_0xe385('0x10')](_0xf4a14b));if(_0xf4a14b[_0xe385('0x11')]){if(_0xf4a14b[_0xe385('0x11')][_0xe385('0x12')]===0x1f4){logger[_0xe385('0x11')]('FaxApplication,\x20%s,\x20%s',_0x32ac4d,_0xf4a14b[_0xe385('0x11')]['message']);return _0x582642(_0xf4a14b['error'][_0xe385('0x13')]);}logger['error'](_0xe385('0x14'),_0x32ac4d,_0xf4a14b[_0xe385('0x11')][_0xe385('0x13')]);return _0xd3a544(_0xf4a14b['error'][_0xe385('0x13')]);}else{logger[_0xe385('0xc')]('FaxApplication,\x20%s,\x20%s',_0x32ac4d,_0xe385('0xd'));_0xd3a544(_0xf4a14b[_0xe385('0x15')][_0xe385('0x13')]);}})[_0xe385('0x16')](function(_0x55432b){logger['error']('FaxApplication,\x20%s,\x20%s',_0x32ac4d,_0x55432b);_0x582642(_0x55432b);});});}exports[_0xe385('0x17')]=function(_0x50f7ce){var _0x330603=this;return new Promise(function(_0x4ea1e8,_0x5c48c5){return db[_0xe385('0x18')][_0xe385('0x19')](_0x50f7ce[_0xe385('0x1a')],{'raw':_0x50f7ce[_0xe385('0x1b')]?_0x50f7ce[_0xe385('0x1b')][_0xe385('0x1c')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x50f7ce[_0xe385('0x1b')]?_0x50f7ce[_0xe385('0x1b')][_0xe385('0x1d')]||null:null,'attributes':_0x50f7ce[_0xe385('0x1b')]?_0x50f7ce[_0xe385('0x1b')][_0xe385('0x1e')]||null:null,'limit':_0x50f7ce[_0xe385('0x1b')]?_0x50f7ce[_0xe385('0x1b')][_0xe385('0x1f')]||null:null})[_0xe385('0xb')](function(_0x3237f9){logger[_0xe385('0xc')]('UpdateFaxApplication',_0x50f7ce);logger[_0xe385('0xe')](_0xe385('0x17'),_0x50f7ce,JSON['stringify'](_0x3237f9));_0x4ea1e8(_0x3237f9);})['catch'](function(_0x380280){logger[_0xe385('0x11')]('UpdateFaxApplication',_0x380280[_0xe385('0x13')],_0x50f7ce);_0x5c48c5(_0x330603[_0xe385('0x11')](0x1f4,_0x380280[_0xe385('0x13')]));});});}; \ No newline at end of file diff --git a/server/api/faxApplication/index.js b/server/api/faxApplication/index.js index 6d03efc..9740a62 100644 --- a/server/api/faxApplication/index.js +++ b/server/api/faxApplication/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xa571=['index','/:id','post','create','update','delete','destroy','exports','multer','util','path','connect-timeout','Router','fs-extra','../../config/environment','get','isAuthenticated'];(function(_0x548a32,_0x32b21e){var _0x2399d4=function(_0x5dae19){while(--_0x5dae19){_0x548a32['push'](_0x548a32['shift']());}};_0x2399d4(++_0x32b21e);}(_0xa571,0x107));var _0x1a57=function(_0x122cac,_0x473824){_0x122cac=_0x122cac-0x0;var _0xe35004=_0xa571[_0x122cac];return _0xe35004;};'use strict';var multer=require(_0x1a57('0x0'));var util=require(_0x1a57('0x1'));var path=require(_0x1a57('0x2'));var timeout=require(_0x1a57('0x3'));var express=require('express');var router=express[_0x1a57('0x4')]();var fs_extra=require(_0x1a57('0x5'));var auth=require('../../components/auth/service');var interaction=require('../../components/interaction/service');var config=require(_0x1a57('0x6'));var controller=require('./faxApplication.controller');router[_0x1a57('0x7')]('/',auth[_0x1a57('0x8')](),controller[_0x1a57('0x9')]);router[_0x1a57('0x7')](_0x1a57('0xa'),auth[_0x1a57('0x8')](),controller['show']);router[_0x1a57('0xb')]('/',auth[_0x1a57('0x8')](),controller[_0x1a57('0xc')]);router['put'](_0x1a57('0xa'),auth[_0x1a57('0x8')](),controller[_0x1a57('0xd')]);router[_0x1a57('0xe')](_0x1a57('0xa'),auth[_0x1a57('0x8')](),controller[_0x1a57('0xf')]);module[_0x1a57('0x10')]=router; \ No newline at end of file +var _0x9354=['Router','fs-extra','../../components/auth/service','../../config/environment','./faxApplication.controller','get','isAuthenticated','index','/:id','show','put','update','delete','exports','util','path','express'];(function(_0x6a1952,_0x513f3e){var _0x27f8b8=function(_0x1301b8){while(--_0x1301b8){_0x6a1952['push'](_0x6a1952['shift']());}};_0x27f8b8(++_0x513f3e);}(_0x9354,0x96));var _0x4935=function(_0x4706a6,_0x5a1c63){_0x4706a6=_0x4706a6-0x0;var _0x1bb705=_0x9354[_0x4706a6];return _0x1bb705;};'use strict';var multer=require('multer');var util=require(_0x4935('0x0'));var path=require(_0x4935('0x1'));var timeout=require('connect-timeout');var express=require(_0x4935('0x2'));var router=express[_0x4935('0x3')]();var fs_extra=require(_0x4935('0x4'));var auth=require(_0x4935('0x5'));var interaction=require('../../components/interaction/service');var config=require(_0x4935('0x6'));var controller=require(_0x4935('0x7'));router[_0x4935('0x8')]('/',auth[_0x4935('0x9')](),controller[_0x4935('0xa')]);router[_0x4935('0x8')](_0x4935('0xb'),auth[_0x4935('0x9')](),controller[_0x4935('0xc')]);router['post']('/',auth[_0x4935('0x9')](),controller['create']);router[_0x4935('0xd')](_0x4935('0xb'),auth[_0x4935('0x9')](),controller[_0x4935('0xe')]);router[_0x4935('0xf')](_0x4935('0xb'),auth['isAuthenticated'](),controller['destroy']);module[_0x4935('0x10')]=router; \ No newline at end of file diff --git a/server/api/faxInteraction/faxInteraction.attributes.js b/server/api/faxInteraction/faxInteraction.attributes.js index b1c6161..e030100 100644 --- a/server/api/faxInteraction/faxInteraction.attributes.js +++ b/server/api/faxInteraction/faxInteraction.attributes.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x5b13=['DATE','STRING','ENUM','out','exports','BOOLEAN'];(function(_0x2ccab9,_0x42969d){var _0x20e296=function(_0x58ef89){while(--_0x58ef89){_0x2ccab9['push'](_0x2ccab9['shift']());}};_0x20e296(++_0x42969d);}(_0x5b13,0xbe));var _0x35b1=function(_0x4e0dc2,_0x323815){_0x4e0dc2=_0x4e0dc2-0x0;var _0x377506=_0x5b13[_0x4e0dc2];return _0x377506;};'use strict';var Sequelize=require('sequelize');module[_0x35b1('0x0')]={'closed':{'type':Sequelize[_0x35b1('0x1')],'defaultValue':![]},'closedAt':{'type':Sequelize[_0x35b1('0x2')]},'disposition':{'type':Sequelize[_0x35b1('0x3')]},'secondDisposition':{'type':Sequelize[_0x35b1('0x3')]},'thirdDisposition':{'type':Sequelize[_0x35b1('0x3')]},'note':{'type':Sequelize[_0x35b1('0x3')]},'read1stAt':{'type':Sequelize[_0x35b1('0x2')]},'fax':{'type':Sequelize['STRING']},'firstMsgDirection':{'type':Sequelize[_0x35b1('0x4')]('in',_0x35b1('0x5')),'defaultValue':'in','allowNull':![]},'lastMsgAt':{'type':Sequelize['DATE']},'lastMsgDirection':{'type':Sequelize[_0x35b1('0x4')]('in',_0x35b1('0x5')),'defaultValue':'in','allowNull':![]}}; \ No newline at end of file +var _0x1320=['sequelize','exports','BOOLEAN','STRING','DATE','out'];(function(_0x954fb4,_0x400b09){var _0x4109af=function(_0x48c3c9){while(--_0x48c3c9){_0x954fb4['push'](_0x954fb4['shift']());}};_0x4109af(++_0x400b09);}(_0x1320,0x180));var _0x0132=function(_0x328e34,_0x4fabd0){_0x328e34=_0x328e34-0x0;var _0x1b0d06=_0x1320[_0x328e34];return _0x1b0d06;};'use strict';var Sequelize=require(_0x0132('0x0'));module[_0x0132('0x1')]={'closed':{'type':Sequelize[_0x0132('0x2')],'defaultValue':![]},'closedAt':{'type':Sequelize['DATE']},'disposition':{'type':Sequelize[_0x0132('0x3')]},'secondDisposition':{'type':Sequelize['STRING']},'thirdDisposition':{'type':Sequelize[_0x0132('0x3')]},'note':{'type':Sequelize['STRING']},'read1stAt':{'type':Sequelize[_0x0132('0x4')]},'fax':{'type':Sequelize[_0x0132('0x3')]},'firstMsgDirection':{'type':Sequelize['ENUM']('in','out'),'defaultValue':'in','allowNull':![]},'lastMsgAt':{'type':Sequelize[_0x0132('0x4')]},'lastMsgDirection':{'type':Sequelize['ENUM']('in',_0x0132('0x5')),'defaultValue':'in','allowNull':![]}}; \ No newline at end of file diff --git a/server/api/faxInteraction/faxInteraction.controller.js b/server/api/faxInteraction/faxInteraction.controller.js index 09ae281..9ba4da3 100644 --- a/server/api/faxInteraction/faxInteraction.controller.js +++ b/server/api/faxInteraction/faxInteraction.controller.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x8068=['log','err','unlinkSync','rimraf','zip-dir','moment','bluebird','util','path','lodash','ioredis','../../components/interaction/service','../../components/parsers/qs','api','../../config/environment','../../mysqldb','defaults','redis','localhost','socket.io-emitter','register','sendStatus','status','json','offset','undefined','limit','count','set','Content-Range','update','then','end','error','name','send','rawAttributes','fieldName','getOptions','fax','query','user','catch','show','params','model','keys','FaxInteraction','filters','intersection','attributes','fields','includeAll','include','merge','options','find','create','body','destroy','describe','FaxMessage','addMessage','ids','omit','getMessages','findOne','length','hasOwnProperty','order','sort','where','pick','FaxInteractionId','filter','map','$gte','split','format','findAll','rows','addTags','setTags','spread','Tag','color','emit','faxInteractionTags:save','removeTags','download','unix','toString','join','server','files','root','attachments','push','Attachment','Messages','createdAt','mkdirSync','basename','existsSync','createReadStream','pipe','createWriteStream'];(function(_0x2917d9,_0x293688){var _0x4eff00=function(_0x4cd1f7){while(--_0x4cd1f7){_0x2917d9['push'](_0x2917d9['shift']());}};_0x4eff00(++_0x293688);}(_0x8068,0x1af));var _0x8806=function(_0x34c542,_0x220b05){_0x34c542=_0x34c542-0x0;var _0x5b9ec2=_0x8068[_0x34c542];return _0x5b9ec2;};'use strict';var rimraf=require(_0x8806('0x0'));var zipdir=require(_0x8806('0x1'));var moment=require(_0x8806('0x2'));var BPromise=require(_0x8806('0x3'));var util=require(_0x8806('0x4'));var path=require(_0x8806('0x5'));var fs=require('fs');var _=require(_0x8806('0x6'));var Redis=require(_0x8806('0x7'));var interaction=require(_0x8806('0x8'));var qs=require(_0x8806('0x9'));var logger=require('../../config/logger')(_0x8806('0xa'));var config=require(_0x8806('0xb'));var db=require(_0x8806('0xc'))['db'];config['redis']=_[_0x8806('0xd')](config[_0x8806('0xe')],{'host':_0x8806('0xf'),'port':0x18eb});var socket=require(_0x8806('0x10'))(new Redis(config[_0x8806('0xe')]));require('./faxInteraction.socket')[_0x8806('0x11')](socket);function respondWithStatusCode(_0x3144e7,_0x3fe8bd){_0x3fe8bd=_0x3fe8bd||0xcc;return function(_0x2f55a9){if(_0x2f55a9){return _0x3144e7[_0x8806('0x12')](_0x3fe8bd);}return _0x3144e7[_0x8806('0x13')](_0x3fe8bd)['end']();};}function respondWithResult(_0x3428aa,_0x3789e6){_0x3789e6=_0x3789e6||0xc8;return function(_0x2de0cf){if(_0x2de0cf){return _0x3428aa[_0x8806('0x13')](_0x3789e6)[_0x8806('0x14')](_0x2de0cf);}};}function respondWithFilteredResult(_0x345fd0,_0x5c064e){return function(_0x21891f){if(_0x21891f){var _0x427211=typeof _0x5c064e[_0x8806('0x15')]===_0x8806('0x16')&&typeof _0x5c064e[_0x8806('0x17')]==='undefined';var _0x5ae156=_0x21891f[_0x8806('0x18')];var _0x2f3dad=_0x427211?0x0:_0x5c064e[_0x8806('0x15')];var _0x204865=_0x427211?_0x21891f['count']:_0x5c064e[_0x8806('0x15')]+_0x5c064e[_0x8806('0x17')];var _0x520a63;if(_0x204865>=_0x5ae156){_0x204865=_0x5ae156;_0x520a63=0xc8;}else{_0x520a63=0xce;}_0x345fd0['status'](_0x520a63);return _0x345fd0[_0x8806('0x19')](_0x8806('0x1a'),_0x2f3dad+'-'+_0x204865+'/'+_0x5ae156)[_0x8806('0x14')](_0x21891f);}return null;};}function saveUpdates(_0x227501){return function(_0x3a8981){if(_0x3a8981){return _0x3a8981[_0x8806('0x1b')](_0x227501)['then'](function(_0x32d0b9){return _0x32d0b9;});}return null;};}function removeEntity(_0xcffb5b){return function(_0x4e125b){if(_0x4e125b){return _0x4e125b['destroy']()[_0x8806('0x1c')](function(){_0xcffb5b[_0x8806('0x13')](0xcc)[_0x8806('0x1d')]();});}};}function handleEntityNotFound(_0xb3d874){return function(_0x265446){if(!_0x265446){_0xb3d874['sendStatus'](0x194);}return _0x265446;};}function handleError(_0x39adf4,_0x505c1a){_0x505c1a=_0x505c1a||0x1f4;return function(_0x135bd1){logger[_0x8806('0x1e')](_0x135bd1['stack']);if(_0x135bd1[_0x8806('0x1f')]){delete _0x135bd1['name'];}_0x39adf4['status'](_0x505c1a)[_0x8806('0x20')](_0x135bd1);};}exports['index']=function(_0x539e1e,_0x5c94e4){var _0xca1f80={};var _0x633204=_['map'](db['FaxInteraction'][_0x8806('0x21')],function(_0x432cc0){return{'name':_0x432cc0[_0x8806('0x22')],'type':_0x432cc0['type']['key']};});_0xca1f80=qs[_0x8806('0x23')](_0x633204,_0x539e1e);return interaction['findAll'](_0x8806('0x24'),_0x539e1e[_0x8806('0x25')],_0x539e1e[_0x8806('0x26')],_0xca1f80,_0x633204)[_0x8806('0x1c')](respondWithFilteredResult(_0x5c94e4,_0xca1f80))[_0x8806('0x27')](handleError(_0x5c94e4,null));};exports[_0x8806('0x28')]=function(_0x3bea0b,_0x3b026d){var _0x246de6={'raw':![],'where':{'id':_0x3bea0b[_0x8806('0x29')]['id']}},_0x3fe2b3={};_0x3fe2b3[_0x8806('0x2a')]=_[_0x8806('0x2b')](db[_0x8806('0x2c')][_0x8806('0x21')]);_0x3fe2b3[_0x8806('0x25')]=_[_0x8806('0x2b')](_0x3bea0b[_0x8806('0x25')]);_0x3fe2b3[_0x8806('0x2d')]=_[_0x8806('0x2e')](_0x3fe2b3['model'],_0x3fe2b3[_0x8806('0x25')]);_0x246de6[_0x8806('0x2f')]=_['intersection'](_0x3fe2b3['model'],qs[_0x8806('0x30')](_0x3bea0b[_0x8806('0x25')][_0x8806('0x30')]));_0x246de6[_0x8806('0x2f')]=_0x246de6[_0x8806('0x2f')]['length']?_0x246de6[_0x8806('0x2f')]:_0x3fe2b3[_0x8806('0x2a')];if(_0x3bea0b[_0x8806('0x25')][_0x8806('0x31')]){_0x246de6[_0x8806('0x32')]=[{'all':!![]}];}_0x246de6=_[_0x8806('0x33')]({},_0x246de6,_0x3bea0b[_0x8806('0x34')]);return db[_0x8806('0x2c')][_0x8806('0x35')](_0x246de6)[_0x8806('0x1c')](handleEntityNotFound(_0x3b026d,null))['then'](respondWithResult(_0x3b026d,null))[_0x8806('0x27')](handleError(_0x3b026d,null));};exports[_0x8806('0x36')]=function(_0x49358c,_0x3f0047){return db[_0x8806('0x2c')][_0x8806('0x36')](_0x49358c[_0x8806('0x37')],{})['then'](respondWithResult(_0x3f0047,0xc9))[_0x8806('0x27')](handleError(_0x3f0047,null));};exports[_0x8806('0x1b')]=function(_0x15269e,_0x1f4d75){if(_0x15269e['body']['id']){delete _0x15269e['body']['id'];}return db['FaxInteraction'][_0x8806('0x35')]({'where':{'id':_0x15269e['params']['id']}})[_0x8806('0x1c')](handleEntityNotFound(_0x1f4d75,null))['then'](saveUpdates(_0x15269e['body'],null))[_0x8806('0x1c')](respondWithResult(_0x1f4d75,null))[_0x8806('0x27')](handleError(_0x1f4d75,null));};exports[_0x8806('0x38')]=function(_0x47d876,_0x44daad){return db[_0x8806('0x2c')]['find']({'where':{'id':_0x47d876[_0x8806('0x29')]['id']}})['then'](handleEntityNotFound(_0x44daad,null))[_0x8806('0x1c')](removeEntity(_0x44daad,null))[_0x8806('0x27')](handleError(_0x44daad,null));};exports['describe']=function(_0x5632b6,_0x49a83d){return db['FaxInteraction'][_0x8806('0x39')]()[_0x8806('0x1c')](respondWithResult(_0x49a83d,null))[_0x8806('0x27')](handleError(_0x49a83d,null));};exports['addMessage']=function(_0x411841,_0x212884){return db[_0x8806('0x3a')][_0x8806('0x35')]({'where':{'id':_0x411841['params']['id']}})[_0x8806('0x1c')](handleEntityNotFound(_0x212884,null))[_0x8806('0x1c')](function(_0x488e61){if(_0x488e61){return _0x488e61[_0x8806('0x3b')](_0x411841['body'][_0x8806('0x3c')],_[_0x8806('0x3d')](_0x411841['body'],[_0x8806('0x3c'),'id'])||{});}})[_0x8806('0x1c')](respondWithResult(_0x212884,null))[_0x8806('0x27')](handleError(_0x212884,null));};exports[_0x8806('0x3e')]=function(_0x55cfd0,_0x208272){var _0x4ef42a={'raw':![],'where':{}};var _0x3c0823={};var _0x168271={'count':0x0,'rows':[]};return db[_0x8806('0x2c')][_0x8806('0x3f')]({'where':{'id':_0x55cfd0[_0x8806('0x29')]['id']}})[_0x8806('0x1c')](handleEntityNotFound(_0x208272,null))[_0x8806('0x1c')](function(_0x2db9bf){if(_0x2db9bf){_0x3c0823['model']=_['keys'](db[_0x8806('0x3a')][_0x8806('0x21')]);_0x3c0823['query']=_[_0x8806('0x2b')](_0x55cfd0[_0x8806('0x25')]);_0x3c0823[_0x8806('0x2d')]=_[_0x8806('0x2e')](_0x3c0823[_0x8806('0x2a')],_0x3c0823[_0x8806('0x25')]);_0x4ef42a[_0x8806('0x2f')]=_['intersection'](_0x3c0823[_0x8806('0x2a')],qs['fields'](_0x55cfd0[_0x8806('0x25')]['fields']));_0x4ef42a[_0x8806('0x2f')]=_0x4ef42a[_0x8806('0x2f')][_0x8806('0x40')]?_0x4ef42a[_0x8806('0x2f')]:_0x3c0823[_0x8806('0x2a')];if(!_0x55cfd0['query'][_0x8806('0x41')]('nolimit')){_0x4ef42a['limit']=qs[_0x8806('0x17')](_0x55cfd0[_0x8806('0x25')][_0x8806('0x17')]);_0x4ef42a[_0x8806('0x15')]=qs[_0x8806('0x15')](_0x55cfd0[_0x8806('0x25')][_0x8806('0x15')]);}_0x4ef42a[_0x8806('0x42')]=qs[_0x8806('0x43')](_0x55cfd0['query'][_0x8806('0x43')]);_0x4ef42a[_0x8806('0x44')]=qs[_0x8806('0x2d')](_[_0x8806('0x45')](_0x55cfd0['query'],_0x3c0823[_0x8806('0x2d')]));_0x4ef42a[_0x8806('0x44')][_0x8806('0x46')]=_0x2db9bf['id'];if(_0x55cfd0['query'][_0x8806('0x47')]){_0x4ef42a[_0x8806('0x44')]=_['merge'](_0x4ef42a[_0x8806('0x44')],{'$or':_[_0x8806('0x48')](_0x4ef42a['attributes'],function(_0x12eaff){var _0x45c9cd={};_0x45c9cd[_0x12eaff]={'$like':'%'+_0x55cfd0[_0x8806('0x25')][_0x8806('0x47')]+'%'};return _0x45c9cd;})});}if(_0x55cfd0['query'][_0x8806('0x49')]){var _0x548b19=_0x55cfd0[_0x8806('0x25')][_0x8806('0x49')][_0x8806('0x4a')](',');var _0x5653d3={};_0x5653d3[_0x548b19[0x0]]={'$gte':moment(_0x548b19[0x1])[_0x8806('0x4b')]('YYYY-MM-DD\x20HH:mm:ss')};_0x4ef42a[_0x8806('0x44')]=_[_0x8806('0x33')](_0x4ef42a[_0x8806('0x44')],_0x5653d3);}_0x4ef42a=_[_0x8806('0x33')]({},_0x4ef42a,_0x55cfd0[_0x8806('0x34')]);return db[_0x8806('0x3a')][_0x8806('0x18')]({'where':_0x4ef42a['where']})[_0x8806('0x1c')](function(_0x458ed6){_0x168271[_0x8806('0x18')]=_0x458ed6;if(_0x55cfd0[_0x8806('0x25')][_0x8806('0x31')]){_0x4ef42a[_0x8806('0x32')]=[{'all':!![]}];}return db['FaxMessage'][_0x8806('0x4c')](_0x4ef42a);})[_0x8806('0x1c')](function(_0x241fb0){_0x168271[_0x8806('0x4d')]=_0x241fb0;return _0x168271;});}})['then'](respondWithFilteredResult(_0x208272,_0x4ef42a))[_0x8806('0x27')](handleError(_0x208272,null));};exports[_0x8806('0x4e')]=function(_0x38b17e,_0x57261a){return db[_0x8806('0x2c')][_0x8806('0x35')]({'where':{'id':_0x38b17e[_0x8806('0x29')]['id']}})[_0x8806('0x1c')](handleEntityNotFound(_0x57261a,null))['then'](function(_0x55a301){if(_0x55a301){return _0x55a301[_0x8806('0x4f')](_0x38b17e[_0x8806('0x37')]['ids'],_[_0x8806('0x3d')](_0x38b17e['body'],['ids','id'])||{})[_0x8806('0x50')](function(){return db[_0x8806('0x51')][_0x8806('0x4c')]({'attributes':['id',_0x8806('0x1f'),_0x8806('0x52')],'where':{'id':_0x38b17e['body'][_0x8806('0x3c')]}});})[_0x8806('0x1c')](function(_0x76baa6){socket[_0x8806('0x53')](_0x8806('0x54'),{'id':Number(_0x38b17e[_0x8806('0x29')]['id']),'tags':_0x76baa6||[]});return{'id':Number(_0x38b17e[_0x8806('0x29')]['id']),'tags':_0x76baa6||[]};});}})['then'](respondWithResult(_0x57261a,null))[_0x8806('0x27')](handleError(_0x57261a,null));};exports[_0x8806('0x55')]=function(_0x11df32,_0x4cb44a){return db[_0x8806('0x2c')][_0x8806('0x35')]({'where':{'id':_0x11df32['params']['id']}})[_0x8806('0x1c')](handleEntityNotFound(_0x4cb44a,null))[_0x8806('0x1c')](function(_0x55470d){if(_0x55470d){return _0x55470d['removeTags'](_0x11df32[_0x8806('0x25')][_0x8806('0x3c')]);}})['then'](respondWithStatusCode(_0x4cb44a,null))[_0x8806('0x27')](handleError(_0x4cb44a,null));};exports[_0x8806('0x56')]=function(_0x240019,_0x2bd697){var _0x107cf5=moment()[_0x8806('0x57')]()[_0x8806('0x58')]();var _0x520379=path[_0x8806('0x59')](config['root'],_0x8806('0x5a'),_0x8806('0x5b'),'tmp');var _0x14c26e=path[_0x8806('0x59')](config[_0x8806('0x5c')],_0x8806('0x5a'),_0x8806('0x5b'),_0x8806('0x5d'));var _0x6af61b=path[_0x8806('0x59')](_0x520379,_0x107cf5);var _0x3efeae=util[_0x8806('0x4b')]('transcript-%d-%s.zip',_0x240019[_0x8806('0x29')]['id'],_0x107cf5);var _0x433e99=path[_0x8806('0x59')](_0x520379,_0x3efeae);var _0x506985=[];_0x506985[_0x8806('0x5e')]({'model':db[_0x8806('0x5f')],'as':_0x8806('0x5f'),'raw':!![]});var _0x735941=[{'model':db[_0x8806('0x3a')],'as':_0x8806('0x60'),'attributes':['id','body',_0x8806('0x61')],'include':_0x506985}];return db[_0x8806('0x2c')][_0x8806('0x35')]({'where':{'id':_0x240019[_0x8806('0x29')]['id']},'include':_0x735941})[_0x8806('0x1c')](handleEntityNotFound(_0x2bd697,null))[_0x8806('0x1c')](function(_0x2d7b31){if(_0x2d7b31&&_0x2d7b31[_0x8806('0x60')]){var _0x4cda23=_0x2d7b31['get']({'plain':!![]});fs[_0x8806('0x62')](_0x6af61b);for(var _0x1b2c66=0x0;_0x1b2c66<_0x4cda23['Messages'][_0x8806('0x40')];_0x1b2c66++){var _0xdfe041=_0x4cda23['Messages'][_0x1b2c66][_0x8806('0x5f')];if(_0xdfe041){var _0x2e744b=path[_0x8806('0x59')](_0x14c26e,_0xdfe041[_0x8806('0x63')]);if(fs[_0x8806('0x64')](_0x2e744b)){fs[_0x8806('0x65')](_0x2e744b)[_0x8806('0x66')](fs[_0x8806('0x67')](path[_0x8806('0x59')](_0x6af61b,_0xdfe041[_0x8806('0x63')])));}}}return BPromise['resolve']()[_0x8806('0x1c')](function(){return new BPromise(function(_0x36d493,_0x4e2a36){zipdir(_0x6af61b,{'saveTo':_0x433e99},function(_0x266559,_0x214a6f){if(_0x266559)return _0x4e2a36(_0x266559);return _0x36d493(_0x214a6f);});})[_0x8806('0x1c')](function(){return new BPromise(function(_0x5973c7,_0x5a69ea){rimraf(_0x6af61b,function(_0x2e751f){if(_0x2e751f)_0x5a69ea(_0x2e751f);return _0x5973c7();});});})[_0x8806('0x1c')](function(){return _0x2bd697['download'](_0x433e99,_0x3efeae,function(_0xed890a){if(_0xed890a){console[_0x8806('0x68')](_0x8806('0x69'),_0xed890a);}else{fs[_0x8806('0x6a')](_0x433e99);}});});});}else{return _0x2bd697['sendStatus'](0xc8);}})[_0x8806('0x27')](handleError(_0x2bd697,null));}; \ No newline at end of file +var _0x3d62=['length','includeAll','merge','options','FaxInteraction','find','then','create','body','params','describe','addMessage','ids','omit','getMessages','findOne','FaxMessage','hasOwnProperty','nolimit','order','sort','where','pick','FaxInteractionId','filter','$gte','split','format','YYYY-MM-DD\x20HH:mm:ss','include','rows','addTags','Tag','color','faxInteractionTags:save','download','toString','root','server','files','tmp','join','attachments','transcript-%d-%s.zip','push','Attachment','Messages','createdAt','mkdirSync','basename','existsSync','createReadStream','pipe','createWriteStream','resolve','log','err','unlinkSync','zip-dir','bluebird','path','lodash','../../components/interaction/service','../../config/logger','api','redis','defaults','localhost','./faxInteraction.socket','register','sendStatus','status','end','json','offset','undefined','limit','count','set','Content-Range','update','destroy','stack','name','send','index','map','rawAttributes','getOptions','findAll','query','user','catch','show','model','keys','attributes','intersection','fields'];(function(_0x39464f,_0x5b0f3f){var _0x4033e5=function(_0x436c13){while(--_0x436c13){_0x39464f['push'](_0x39464f['shift']());}};_0x4033e5(++_0x5b0f3f);}(_0x3d62,0x100));var _0x23d6=function(_0x565c5c,_0x32108c){_0x565c5c=_0x565c5c-0x0;var _0x1046da=_0x3d62[_0x565c5c];return _0x1046da;};'use strict';var rimraf=require('rimraf');var zipdir=require(_0x23d6('0x0'));var moment=require('moment');var BPromise=require(_0x23d6('0x1'));var util=require('util');var path=require(_0x23d6('0x2'));var fs=require('fs');var _=require(_0x23d6('0x3'));var Redis=require('ioredis');var interaction=require(_0x23d6('0x4'));var qs=require('../../components/parsers/qs');var logger=require(_0x23d6('0x5'))(_0x23d6('0x6'));var config=require('../../config/environment');var db=require('../../mysqldb')['db'];config[_0x23d6('0x7')]=_[_0x23d6('0x8')](config[_0x23d6('0x7')],{'host':_0x23d6('0x9'),'port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config[_0x23d6('0x7')]));require(_0x23d6('0xa'))[_0x23d6('0xb')](socket);function respondWithStatusCode(_0x8dd63,_0x569dde){_0x569dde=_0x569dde||0xcc;return function(_0x26f970){if(_0x26f970){return _0x8dd63[_0x23d6('0xc')](_0x569dde);}return _0x8dd63[_0x23d6('0xd')](_0x569dde)[_0x23d6('0xe')]();};}function respondWithResult(_0x33f3f1,_0x570f9e){_0x570f9e=_0x570f9e||0xc8;return function(_0x1518cc){if(_0x1518cc){return _0x33f3f1[_0x23d6('0xd')](_0x570f9e)[_0x23d6('0xf')](_0x1518cc);}};}function respondWithFilteredResult(_0x5c47b3,_0xd25e0a){return function(_0x20a0f4){if(_0x20a0f4){var _0x38b6e7=typeof _0xd25e0a[_0x23d6('0x10')]===_0x23d6('0x11')&&typeof _0xd25e0a[_0x23d6('0x12')]===_0x23d6('0x11');var _0x131566=_0x20a0f4['count'];var _0x1afa5e=_0x38b6e7?0x0:_0xd25e0a[_0x23d6('0x10')];var _0x502b05=_0x38b6e7?_0x20a0f4[_0x23d6('0x13')]:_0xd25e0a[_0x23d6('0x10')]+_0xd25e0a[_0x23d6('0x12')];var _0x4217d0;if(_0x502b05>=_0x131566){_0x502b05=_0x131566;_0x4217d0=0xc8;}else{_0x4217d0=0xce;}_0x5c47b3[_0x23d6('0xd')](_0x4217d0);return _0x5c47b3[_0x23d6('0x14')](_0x23d6('0x15'),_0x1afa5e+'-'+_0x502b05+'/'+_0x131566)[_0x23d6('0xf')](_0x20a0f4);}return null;};}function saveUpdates(_0xd943cc){return function(_0x86fde2){if(_0x86fde2){return _0x86fde2[_0x23d6('0x16')](_0xd943cc)['then'](function(_0x220285){return _0x220285;});}return null;};}function removeEntity(_0x4ed5c1){return function(_0x3eb0bc){if(_0x3eb0bc){return _0x3eb0bc[_0x23d6('0x17')]()['then'](function(){_0x4ed5c1[_0x23d6('0xd')](0xcc)[_0x23d6('0xe')]();});}};}function handleEntityNotFound(_0x1b3671){return function(_0x48f702){if(!_0x48f702){_0x1b3671['sendStatus'](0x194);}return _0x48f702;};}function handleError(_0x238015,_0x583b90){_0x583b90=_0x583b90||0x1f4;return function(_0x2daa16){logger['error'](_0x2daa16[_0x23d6('0x18')]);if(_0x2daa16[_0x23d6('0x19')]){delete _0x2daa16[_0x23d6('0x19')];}_0x238015[_0x23d6('0xd')](_0x583b90)[_0x23d6('0x1a')](_0x2daa16);};}exports[_0x23d6('0x1b')]=function(_0x903bae,_0x5552cb){var _0x25a149={};var _0x591fb=_[_0x23d6('0x1c')](db['FaxInteraction'][_0x23d6('0x1d')],function(_0x4247a1){return{'name':_0x4247a1['fieldName'],'type':_0x4247a1['type']['key']};});_0x25a149=qs[_0x23d6('0x1e')](_0x591fb,_0x903bae);return interaction[_0x23d6('0x1f')]('fax',_0x903bae[_0x23d6('0x20')],_0x903bae[_0x23d6('0x21')],_0x25a149,_0x591fb)['then'](respondWithFilteredResult(_0x5552cb,_0x25a149))[_0x23d6('0x22')](handleError(_0x5552cb,null));};exports[_0x23d6('0x23')]=function(_0x23f2d8,_0x34de6e){var _0x112b05={'raw':![],'where':{'id':_0x23f2d8['params']['id']}},_0x3fe94c={};_0x3fe94c[_0x23d6('0x24')]=_[_0x23d6('0x25')](db['FaxInteraction'][_0x23d6('0x1d')]);_0x3fe94c[_0x23d6('0x20')]=_[_0x23d6('0x25')](_0x23f2d8[_0x23d6('0x20')]);_0x3fe94c['filters']=_['intersection'](_0x3fe94c[_0x23d6('0x24')],_0x3fe94c['query']);_0x112b05[_0x23d6('0x26')]=_[_0x23d6('0x27')](_0x3fe94c['model'],qs[_0x23d6('0x28')](_0x23f2d8['query'][_0x23d6('0x28')]));_0x112b05[_0x23d6('0x26')]=_0x112b05[_0x23d6('0x26')][_0x23d6('0x29')]?_0x112b05[_0x23d6('0x26')]:_0x3fe94c[_0x23d6('0x24')];if(_0x23f2d8['query'][_0x23d6('0x2a')]){_0x112b05['include']=[{'all':!![]}];}_0x112b05=_[_0x23d6('0x2b')]({},_0x112b05,_0x23f2d8[_0x23d6('0x2c')]);return db[_0x23d6('0x2d')][_0x23d6('0x2e')](_0x112b05)[_0x23d6('0x2f')](handleEntityNotFound(_0x34de6e,null))[_0x23d6('0x2f')](respondWithResult(_0x34de6e,null))[_0x23d6('0x22')](handleError(_0x34de6e,null));};exports[_0x23d6('0x30')]=function(_0x561b6b,_0x2ca956){return db['FaxInteraction'][_0x23d6('0x30')](_0x561b6b[_0x23d6('0x31')],{})[_0x23d6('0x2f')](respondWithResult(_0x2ca956,0xc9))['catch'](handleError(_0x2ca956,null));};exports[_0x23d6('0x16')]=function(_0x13565f,_0x59d2a8){if(_0x13565f['body']['id']){delete _0x13565f[_0x23d6('0x31')]['id'];}return db[_0x23d6('0x2d')][_0x23d6('0x2e')]({'where':{'id':_0x13565f['params']['id']}})['then'](handleEntityNotFound(_0x59d2a8,null))['then'](saveUpdates(_0x13565f[_0x23d6('0x31')],null))[_0x23d6('0x2f')](respondWithResult(_0x59d2a8,null))[_0x23d6('0x22')](handleError(_0x59d2a8,null));};exports['destroy']=function(_0x4cd68b,_0x1b5bd6){return db['FaxInteraction']['find']({'where':{'id':_0x4cd68b[_0x23d6('0x32')]['id']}})[_0x23d6('0x2f')](handleEntityNotFound(_0x1b5bd6,null))[_0x23d6('0x2f')](removeEntity(_0x1b5bd6,null))['catch'](handleError(_0x1b5bd6,null));};exports[_0x23d6('0x33')]=function(_0x2f079c,_0x2f429c){return db['FaxInteraction'][_0x23d6('0x33')]()['then'](respondWithResult(_0x2f429c,null))['catch'](handleError(_0x2f429c,null));};exports[_0x23d6('0x34')]=function(_0x32a9fd,_0xd25553){return db['FaxMessage']['find']({'where':{'id':_0x32a9fd[_0x23d6('0x32')]['id']}})[_0x23d6('0x2f')](handleEntityNotFound(_0xd25553,null))[_0x23d6('0x2f')](function(_0xfcfd38){if(_0xfcfd38){return _0xfcfd38[_0x23d6('0x34')](_0x32a9fd[_0x23d6('0x31')][_0x23d6('0x35')],_[_0x23d6('0x36')](_0x32a9fd[_0x23d6('0x31')],[_0x23d6('0x35'),'id'])||{});}})[_0x23d6('0x2f')](respondWithResult(_0xd25553,null))[_0x23d6('0x22')](handleError(_0xd25553,null));};exports[_0x23d6('0x37')]=function(_0x5e541b,_0x4a118d){var _0x292f84={'raw':![],'where':{}};var _0x32686e={};var _0x39174e={'count':0x0,'rows':[]};return db[_0x23d6('0x2d')][_0x23d6('0x38')]({'where':{'id':_0x5e541b[_0x23d6('0x32')]['id']}})['then'](handleEntityNotFound(_0x4a118d,null))[_0x23d6('0x2f')](function(_0x3ce8df){if(_0x3ce8df){_0x32686e[_0x23d6('0x24')]=_[_0x23d6('0x25')](db[_0x23d6('0x39')][_0x23d6('0x1d')]);_0x32686e[_0x23d6('0x20')]=_[_0x23d6('0x25')](_0x5e541b[_0x23d6('0x20')]);_0x32686e['filters']=_[_0x23d6('0x27')](_0x32686e['model'],_0x32686e[_0x23d6('0x20')]);_0x292f84[_0x23d6('0x26')]=_[_0x23d6('0x27')](_0x32686e[_0x23d6('0x24')],qs['fields'](_0x5e541b[_0x23d6('0x20')]['fields']));_0x292f84[_0x23d6('0x26')]=_0x292f84[_0x23d6('0x26')][_0x23d6('0x29')]?_0x292f84[_0x23d6('0x26')]:_0x32686e['model'];if(!_0x5e541b['query'][_0x23d6('0x3a')](_0x23d6('0x3b'))){_0x292f84[_0x23d6('0x12')]=qs[_0x23d6('0x12')](_0x5e541b[_0x23d6('0x20')][_0x23d6('0x12')]);_0x292f84[_0x23d6('0x10')]=qs[_0x23d6('0x10')](_0x5e541b['query'][_0x23d6('0x10')]);}_0x292f84[_0x23d6('0x3c')]=qs[_0x23d6('0x3d')](_0x5e541b[_0x23d6('0x20')][_0x23d6('0x3d')]);_0x292f84[_0x23d6('0x3e')]=qs['filters'](_[_0x23d6('0x3f')](_0x5e541b[_0x23d6('0x20')],_0x32686e['filters']));_0x292f84[_0x23d6('0x3e')][_0x23d6('0x40')]=_0x3ce8df['id'];if(_0x5e541b[_0x23d6('0x20')][_0x23d6('0x41')]){_0x292f84[_0x23d6('0x3e')]=_[_0x23d6('0x2b')](_0x292f84[_0x23d6('0x3e')],{'$or':_[_0x23d6('0x1c')](_0x292f84[_0x23d6('0x26')],function(_0x588b64){var _0x54e86a={};_0x54e86a[_0x588b64]={'$like':'%'+_0x5e541b[_0x23d6('0x20')][_0x23d6('0x41')]+'%'};return _0x54e86a;})});}if(_0x5e541b[_0x23d6('0x20')][_0x23d6('0x42')]){var _0x503180=_0x5e541b[_0x23d6('0x20')]['$gte'][_0x23d6('0x43')](',');var _0x158485={};_0x158485[_0x503180[0x0]]={'$gte':moment(_0x503180[0x1])[_0x23d6('0x44')](_0x23d6('0x45'))};_0x292f84[_0x23d6('0x3e')]=_[_0x23d6('0x2b')](_0x292f84['where'],_0x158485);}_0x292f84=_[_0x23d6('0x2b')]({},_0x292f84,_0x5e541b[_0x23d6('0x2c')]);return db[_0x23d6('0x39')][_0x23d6('0x13')]({'where':_0x292f84['where']})[_0x23d6('0x2f')](function(_0xf704c4){_0x39174e[_0x23d6('0x13')]=_0xf704c4;if(_0x5e541b[_0x23d6('0x20')][_0x23d6('0x2a')]){_0x292f84[_0x23d6('0x46')]=[{'all':!![]}];}return db[_0x23d6('0x39')][_0x23d6('0x1f')](_0x292f84);})[_0x23d6('0x2f')](function(_0x2fc075){_0x39174e[_0x23d6('0x47')]=_0x2fc075;return _0x39174e;});}})[_0x23d6('0x2f')](respondWithFilteredResult(_0x4a118d,_0x292f84))[_0x23d6('0x22')](handleError(_0x4a118d,null));};exports[_0x23d6('0x48')]=function(_0x5ec35e,_0x24cfcd){return db[_0x23d6('0x2d')]['find']({'where':{'id':_0x5ec35e['params']['id']}})['then'](handleEntityNotFound(_0x24cfcd,null))[_0x23d6('0x2f')](function(_0xd3313f){if(_0xd3313f){return _0xd3313f['setTags'](_0x5ec35e[_0x23d6('0x31')][_0x23d6('0x35')],_[_0x23d6('0x36')](_0x5ec35e[_0x23d6('0x31')],[_0x23d6('0x35'),'id'])||{})['spread'](function(){return db[_0x23d6('0x49')][_0x23d6('0x1f')]({'attributes':['id',_0x23d6('0x19'),_0x23d6('0x4a')],'where':{'id':_0x5ec35e[_0x23d6('0x31')]['ids']}});})[_0x23d6('0x2f')](function(_0x5cdecd){socket['emit'](_0x23d6('0x4b'),{'id':Number(_0x5ec35e[_0x23d6('0x32')]['id']),'tags':_0x5cdecd||[]});return{'id':Number(_0x5ec35e[_0x23d6('0x32')]['id']),'tags':_0x5cdecd||[]};});}})['then'](respondWithResult(_0x24cfcd,null))[_0x23d6('0x22')](handleError(_0x24cfcd,null));};exports['removeTags']=function(_0x3e3bdf,_0x3c9ea1){return db[_0x23d6('0x2d')][_0x23d6('0x2e')]({'where':{'id':_0x3e3bdf[_0x23d6('0x32')]['id']}})[_0x23d6('0x2f')](handleEntityNotFound(_0x3c9ea1,null))[_0x23d6('0x2f')](function(_0x24e047){if(_0x24e047){return _0x24e047['removeTags'](_0x3e3bdf[_0x23d6('0x20')][_0x23d6('0x35')]);}})[_0x23d6('0x2f')](respondWithStatusCode(_0x3c9ea1,null))['catch'](handleError(_0x3c9ea1,null));};exports[_0x23d6('0x4c')]=function(_0x218ab7,_0x3fb590){var _0x4a53fa=moment()['unix']()[_0x23d6('0x4d')]();var _0x35b926=path['join'](config[_0x23d6('0x4e')],_0x23d6('0x4f'),_0x23d6('0x50'),_0x23d6('0x51'));var _0x4272d1=path[_0x23d6('0x52')](config['root'],'server',_0x23d6('0x50'),_0x23d6('0x53'));var _0x305d72=path['join'](_0x35b926,_0x4a53fa);var _0x6ffc3=util[_0x23d6('0x44')](_0x23d6('0x54'),_0x218ab7[_0x23d6('0x32')]['id'],_0x4a53fa);var _0x5ad384=path['join'](_0x35b926,_0x6ffc3);var _0x200a35=[];_0x200a35[_0x23d6('0x55')]({'model':db[_0x23d6('0x56')],'as':_0x23d6('0x56'),'raw':!![]});var _0x5ae768=[{'model':db[_0x23d6('0x39')],'as':_0x23d6('0x57'),'attributes':['id','body',_0x23d6('0x58')],'include':_0x200a35}];return db[_0x23d6('0x2d')][_0x23d6('0x2e')]({'where':{'id':_0x218ab7[_0x23d6('0x32')]['id']},'include':_0x5ae768})[_0x23d6('0x2f')](handleEntityNotFound(_0x3fb590,null))[_0x23d6('0x2f')](function(_0x5d7fb3){if(_0x5d7fb3&&_0x5d7fb3['Messages']){var _0x444b12=_0x5d7fb3['get']({'plain':!![]});fs[_0x23d6('0x59')](_0x305d72);for(var _0x9b8529=0x0;_0x9b8529<_0x444b12[_0x23d6('0x57')][_0x23d6('0x29')];_0x9b8529++){var _0x267b81=_0x444b12[_0x23d6('0x57')][_0x9b8529][_0x23d6('0x56')];if(_0x267b81){var _0x558273=path[_0x23d6('0x52')](_0x4272d1,_0x267b81[_0x23d6('0x5a')]);if(fs[_0x23d6('0x5b')](_0x558273)){fs[_0x23d6('0x5c')](_0x558273)[_0x23d6('0x5d')](fs[_0x23d6('0x5e')](path[_0x23d6('0x52')](_0x305d72,_0x267b81[_0x23d6('0x5a')])));}}}return BPromise[_0x23d6('0x5f')]()['then'](function(){return new BPromise(function(_0x3269ca,_0x91d919){zipdir(_0x305d72,{'saveTo':_0x5ad384},function(_0x18859a,_0x2bdb30){if(_0x18859a)return _0x91d919(_0x18859a);return _0x3269ca(_0x2bdb30);});})['then'](function(){return new BPromise(function(_0x416838,_0x69c4db){rimraf(_0x305d72,function(_0x57282a){if(_0x57282a)_0x69c4db(_0x57282a);return _0x416838();});});})[_0x23d6('0x2f')](function(){return _0x3fb590[_0x23d6('0x4c')](_0x5ad384,_0x6ffc3,function(_0x194841){if(_0x194841){console[_0x23d6('0x60')](_0x23d6('0x61'),_0x194841);}else{fs[_0x23d6('0x62')](_0x5ad384);}});});});}else{return _0x3fb590[_0x23d6('0xc')](0xc8);}})[_0x23d6('0x22')](handleError(_0x3fb590,null));}; \ No newline at end of file diff --git a/server/api/faxInteraction/faxInteraction.events.js b/server/api/faxInteraction/faxInteraction.events.js index a1b06a8..52badcd 100644 --- a/server/api/faxInteraction/faxInteraction.events.js +++ b/server/api/faxInteraction/faxInteraction.events.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xdb62=['FaxMessage','setMaxListeners','save','update','remove','getUsers','then','setDataValue','Users','unreadMessages','emit','catch','hasOwnProperty','hook','exports','events','../../mysqldb','FaxInteraction'];(function(_0x247fa1,_0x4ec37c){var _0x244f35=function(_0xfb98be){while(--_0xfb98be){_0x247fa1['push'](_0x247fa1['shift']());}};_0x244f35(++_0x4ec37c);}(_0xdb62,0xb1));var _0x2db6=function(_0x264b9b,_0xa1181e){_0x264b9b=_0x264b9b-0x0;var _0x4c7a0e=_0xdb62[_0x264b9b];return _0x4c7a0e;};'use strict';var EventEmitter=require(_0x2db6('0x0'));var FaxInteraction=require(_0x2db6('0x1'))['db'][_0x2db6('0x2')];var FaxMessage=require(_0x2db6('0x1'))['db'][_0x2db6('0x3')];var FaxInteractionEvents=new EventEmitter();FaxInteractionEvents[_0x2db6('0x4')](0x0);var events={'afterCreate':_0x2db6('0x5'),'afterUpdate':_0x2db6('0x6'),'afterDestroy':_0x2db6('0x7')};function emitEvent(_0x253597){return function(_0x5a1d6c,_0x1d0630,_0x4f8679){_0x5a1d6c[_0x2db6('0x8')]({'attributes':['id'],'raw':!![]})[_0x2db6('0x9')](function(_0xcbd0e5){_0x5a1d6c[_0x2db6('0xa')](_0x2db6('0xb'),_0xcbd0e5['map'](function(_0x3e8875){return{'id':_0x3e8875['id']};}));return FaxMessage['findAll']({'where':{'FaxInteractionId':_0x5a1d6c['id'],'direction':'in','read':![]},'raw':!![]});})[_0x2db6('0x9')](function(_0x247751){_0x5a1d6c['setDataValue'](_0x2db6('0xc'),_0x247751['length']);FaxInteractionEvents[_0x2db6('0xd')](_0x253597+':'+_0x5a1d6c['id'],_0x5a1d6c);FaxInteractionEvents['emit'](_0x253597,_0x5a1d6c);_0x4f8679(null);})[_0x2db6('0xe')](_0x4f8679(null));};}for(var e in events){if(events[_0x2db6('0xf')](e)){var event=events[e];FaxInteraction[_0x2db6('0x10')](e,emitEvent(event));}}module[_0x2db6('0x11')]=FaxInteractionEvents; \ No newline at end of file +var _0x5901=['setMaxListeners','save','update','remove','getUsers','Users','map','then','setDataValue','length','emit','catch','hasOwnProperty','hook','exports','events','../../mysqldb','FaxInteraction'];(function(_0x525a71,_0x2e2bcf){var _0x24c295=function(_0x19d270){while(--_0x19d270){_0x525a71['push'](_0x525a71['shift']());}};_0x24c295(++_0x2e2bcf);}(_0x5901,0xb1));var _0x1590=function(_0x2ae476,_0x133239){_0x2ae476=_0x2ae476-0x0;var _0x9e65f8=_0x5901[_0x2ae476];return _0x9e65f8;};'use strict';var EventEmitter=require(_0x1590('0x0'));var FaxInteraction=require(_0x1590('0x1'))['db'][_0x1590('0x2')];var FaxMessage=require('../../mysqldb')['db']['FaxMessage'];var FaxInteractionEvents=new EventEmitter();FaxInteractionEvents[_0x1590('0x3')](0x0);var events={'afterCreate':_0x1590('0x4'),'afterUpdate':_0x1590('0x5'),'afterDestroy':_0x1590('0x6')};function emitEvent(_0x51bd80){return function(_0x10730e,_0x1267ad,_0x2f42df){_0x10730e[_0x1590('0x7')]({'attributes':['id'],'raw':!![]})['then'](function(_0xdd5a59){_0x10730e['setDataValue'](_0x1590('0x8'),_0xdd5a59[_0x1590('0x9')](function(_0x16a28d){return{'id':_0x16a28d['id']};}));return FaxMessage['findAll']({'where':{'FaxInteractionId':_0x10730e['id'],'direction':'in','read':![]},'raw':!![]});})[_0x1590('0xa')](function(_0x3cece3){_0x10730e[_0x1590('0xb')]('unreadMessages',_0x3cece3[_0x1590('0xc')]);FaxInteractionEvents[_0x1590('0xd')](_0x51bd80+':'+_0x10730e['id'],_0x10730e);FaxInteractionEvents[_0x1590('0xd')](_0x51bd80,_0x10730e);_0x2f42df(null);})[_0x1590('0xe')](_0x2f42df(null));};}for(var e in events){if(events[_0x1590('0xf')](e)){var event=events[e];FaxInteraction[_0x1590('0x10')](e,emitEvent(event));}}module[_0x1590('0x11')]=FaxInteractionEvents; \ No newline at end of file diff --git a/server/api/faxInteraction/faxInteraction.model.js b/server/api/faxInteraction/faxInteraction.model.js index cc73c95..ce056e2 100644 --- a/server/api/faxInteraction/faxInteraction.model.js +++ b/server/api/faxInteraction/faxInteraction.model.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x831b=['fax_interactions','closedAt','format','YYYY-MM-DD\x20HH:mm:ss','util','../../config/logger','api','moment','bluebird','request-promise','path','rimraf','../../config/environment','./faxInteraction.attributes','exports','define','FaxInteraction'];(function(_0x1046d6,_0x56d6ca){var _0x5e192b=function(_0x25911f){while(--_0x25911f){_0x1046d6['push'](_0x1046d6['shift']());}};_0x5e192b(++_0x56d6ca);}(_0x831b,0x114));var _0xb831=function(_0x3a82f6,_0x1ac0d0){_0x3a82f6=_0x3a82f6-0x0;var _0x283905=_0x831b[_0x3a82f6];return _0x283905;};'use strict';var _=require('lodash');var util=require(_0xb831('0x0'));var logger=require(_0xb831('0x1'))(_0xb831('0x2'));var moment=require(_0xb831('0x3'));var BPromise=require(_0xb831('0x4'));var rp=require(_0xb831('0x5'));var fs=require('fs');var path=require(_0xb831('0x6'));var rimraf=require(_0xb831('0x7'));var config=require(_0xb831('0x8'));var attributes=require(_0xb831('0x9'));module[_0xb831('0xa')]=function(_0xf292e1,_0x8329fb){return _0xf292e1[_0xb831('0xb')](_0xb831('0xc'),attributes,{'tableName':_0xb831('0xd'),'paranoid':![],'indexes':[],'timestamps':!![],'hooks':{'beforeUpdate':function(_0x525349,_0x1151e7,_0x48b7ae){if(_0x525349['changed']('closed')){_0x525349[_0xb831('0xe')]=moment()[_0xb831('0xf')](_0xb831('0x10'));}_0x48b7ae(null,_0x525349);}}});}; \ No newline at end of file +var _0x4b27=['closedAt','format','YYYY-MM-DD\x20HH:mm:ss','moment','bluebird','request-promise','path','define','FaxInteraction','fax_interactions','closed'];(function(_0x271060,_0x3f86b1){var _0x40540b=function(_0x1735a7){while(--_0x1735a7){_0x271060['push'](_0x271060['shift']());}};_0x40540b(++_0x3f86b1);}(_0x4b27,0xc9));var _0x74b2=function(_0x2b52bd,_0x3bb8b7){_0x2b52bd=_0x2b52bd-0x0;var _0x5cb451=_0x4b27[_0x2b52bd];return _0x5cb451;};'use strict';var _=require('lodash');var util=require('util');var logger=require('../../config/logger')('api');var moment=require(_0x74b2('0x0'));var BPromise=require(_0x74b2('0x1'));var rp=require(_0x74b2('0x2'));var fs=require('fs');var path=require(_0x74b2('0x3'));var rimraf=require('rimraf');var config=require('../../config/environment');var attributes=require('./faxInteraction.attributes');module['exports']=function(_0x2d6d1f,_0x19b8df){return _0x2d6d1f[_0x74b2('0x4')](_0x74b2('0x5'),attributes,{'tableName':_0x74b2('0x6'),'paranoid':![],'indexes':[],'timestamps':!![],'hooks':{'beforeUpdate':function(_0x169d56,_0x4e0dc6,_0x1e5cdc){if(_0x169d56['changed'](_0x74b2('0x7'))){_0x169d56[_0x74b2('0x8')]=moment()[_0x74b2('0x9')](_0x74b2('0xa'));}_0x1e5cdc(null,_0x169d56);}}});}; \ No newline at end of file diff --git a/server/api/faxInteraction/faxInteraction.rpc.js b/server/api/faxInteraction/faxInteraction.rpc.js index fbe75c1..b2e2fa3 100644 --- a/server/api/faxInteraction/faxInteraction.rpc.js +++ b/server/api/faxInteraction/faxInteraction.rpc.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x76ac=['UpdateFaxInteraction','debug','FaxInteraction','find','addTags','body','omit','spread','AddTags','util','moment','bluebird','randomstring','../../mysqldb','../../config/utils','../../config/environment','jayson/promise','client','defaults','redis','localhost','socket.io-emitter','info','FaxInteraction,\x20%s,\x20%s','request\x20sent','FaxInteraction,\x20%s,\x20%s,\x20%s','stringify','error','message','catch','update','options','raw','where','attributes','limit','then'];(function(_0x1cb128,_0x2770eb){var _0x4843e2=function(_0xc5c6b3){while(--_0xc5c6b3){_0x1cb128['push'](_0x1cb128['shift']());}};_0x4843e2(++_0x2770eb);}(_0x76ac,0x1c5));var _0xc76a=function(_0x38e16a,_0x2cb086){_0x38e16a=_0x38e16a-0x0;var _0x42ec89=_0x76ac[_0x38e16a];return _0x42ec89;};'use strict';var _=require('lodash');var util=require(_0xc76a('0x0'));var moment=require(_0xc76a('0x1'));var BPromise=require(_0xc76a('0x2'));var rs=require(_0xc76a('0x3'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0xc76a('0x4'))['db'];var utils=require(_0xc76a('0x5'));var logger=require('../../config/logger')('rpc');var config=require(_0xc76a('0x6'));var jayson=require(_0xc76a('0x7'));var client=jayson[_0xc76a('0x8')]['http']({'port':0x232a});config['redis']=_[_0xc76a('0x9')](config[_0xc76a('0xa')],{'host':_0xc76a('0xb'),'port':0x18eb});var socket=require(_0xc76a('0xc'))(new Redis(config[_0xc76a('0xa')]));require('./faxInteraction.socket')['register'](socket);function respondWithRpcPromise(_0x2980f9,_0x46f890,_0x319d35){return new BPromise(function(_0xa3a28a,_0x5f14c7){return client['request'](_0x2980f9,_0x319d35)['then'](function(_0x358f50){logger[_0xc76a('0xd')](_0xc76a('0xe'),_0x46f890,_0xc76a('0xf'));logger['debug'](_0xc76a('0x10'),_0x46f890,'request\x20sent',JSON[_0xc76a('0x11')](_0x358f50));if(_0x358f50[_0xc76a('0x12')]){if(_0x358f50[_0xc76a('0x12')]['code']===0x1f4){logger[_0xc76a('0x12')]('FaxInteraction,\x20%s,\x20%s',_0x46f890,_0x358f50['error'][_0xc76a('0x13')]);return _0x5f14c7(_0x358f50[_0xc76a('0x12')][_0xc76a('0x13')]);}logger['error'](_0xc76a('0xe'),_0x46f890,_0x358f50[_0xc76a('0x12')]['message']);return _0xa3a28a(_0x358f50[_0xc76a('0x12')]['message']);}else{logger[_0xc76a('0xd')](_0xc76a('0xe'),_0x46f890,_0xc76a('0xf'));_0xa3a28a(_0x358f50['result'][_0xc76a('0x13')]);}})[_0xc76a('0x14')](function(_0x2f8955){logger[_0xc76a('0x12')]('FaxInteraction,\x20%s,\x20%s',_0x46f890,_0x2f8955);_0x5f14c7(_0x2f8955);});});}exports['UpdateFaxInteraction']=function(_0x1bd19d){var _0x2e668c=this;return new Promise(function(_0xaf37c8,_0x22a8f0){return db['FaxInteraction'][_0xc76a('0x15')](_0x1bd19d['body'],{'raw':_0x1bd19d['options']?_0x1bd19d[_0xc76a('0x16')][_0xc76a('0x17')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x1bd19d['options']?_0x1bd19d['options'][_0xc76a('0x18')]||null:null,'attributes':_0x1bd19d[_0xc76a('0x16')]?_0x1bd19d[_0xc76a('0x16')][_0xc76a('0x19')]||null:null,'limit':_0x1bd19d[_0xc76a('0x16')]?_0x1bd19d[_0xc76a('0x16')][_0xc76a('0x1a')]||null:null})[_0xc76a('0x1b')](function(_0x26ad60){logger[_0xc76a('0xd')](_0xc76a('0x1c'),_0x1bd19d);logger[_0xc76a('0x1d')]('UpdateFaxInteraction',_0x1bd19d,JSON[_0xc76a('0x11')](_0x26ad60));_0xaf37c8(_0x26ad60);})[_0xc76a('0x14')](function(_0xf9d3ee){logger[_0xc76a('0x12')](_0xc76a('0x1c'),_0xf9d3ee[_0xc76a('0x13')],_0x1bd19d);_0x22a8f0(_0x2e668c[_0xc76a('0x12')](0x1f4,_0xf9d3ee[_0xc76a('0x13')]));});});};exports['AddTagsToFaxInteraction']=function(_0x79347a){return new Promise(function(_0x5c3288,_0x87bfc8){return db[_0xc76a('0x1e')][_0xc76a('0x1f')]({'where':_0x79347a[_0xc76a('0x16')]?_0x79347a[_0xc76a('0x16')]['where']||null:null})[_0xc76a('0x1b')](function(_0x3c2ff7){if(_0x3c2ff7){return _0x3c2ff7[_0xc76a('0x20')](_0x79347a[_0xc76a('0x21')]['ids'],_[_0xc76a('0x22')](_0x79347a[_0xc76a('0x21')],['ids','id'])||{});}})[_0xc76a('0x23')](function(_0x3455cd){logger['info'](_0xc76a('0x24'),_0x79347a);logger[_0xc76a('0x1d')](_0xc76a('0x24'),_0x79347a,JSON['stringify'](_0x3455cd));_0x5c3288(_0x3455cd);})[_0xc76a('0x14')](function(_0x4cd7d9){logger[_0xc76a('0x12')](_0xc76a('0x24'),_0x4cd7d9[_0xc76a('0x13')],_0x79347a);_0x87bfc8(_this['error'](0x1f4,_0x4cd7d9[_0xc76a('0x13')]));});});}; \ No newline at end of file +var _0xa08c=['defaults','register','request','then','info','FaxInteraction,\x20%s,\x20%s','request\x20sent','debug','FaxInteraction,\x20%s,\x20%s,\x20%s','error','code','message','UpdateFaxInteraction','update','body','options','raw','where','attributes','stringify','catch','FaxInteraction','addTags','ids','omit','spread','AddTags','lodash','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/logger','rpc','jayson/promise','client','redis'];(function(_0x28699a,_0x4f4a11){var _0x4b0e12=function(_0x4f29d9){while(--_0x4f29d9){_0x28699a['push'](_0x28699a['shift']());}};_0x4b0e12(++_0x4f4a11);}(_0xa08c,0xb7));var _0xca08=function(_0x3b58a1,_0x4d30bf){_0x3b58a1=_0x3b58a1-0x0;var _0x2dbff1=_0xa08c[_0x3b58a1];return _0x2dbff1;};'use strict';var _=require(_0xca08('0x0'));var util=require(_0xca08('0x1'));var moment=require(_0xca08('0x2'));var BPromise=require(_0xca08('0x3'));var rs=require(_0xca08('0x4'));var fs=require('fs');var Redis=require(_0xca08('0x5'));var db=require(_0xca08('0x6'))['db'];var utils=require('../../config/utils');var logger=require(_0xca08('0x7'))(_0xca08('0x8'));var config=require('../../config/environment');var jayson=require(_0xca08('0x9'));var client=jayson[_0xca08('0xa')]['http']({'port':0x232a});config[_0xca08('0xb')]=_[_0xca08('0xc')](config[_0xca08('0xb')],{'host':'localhost','port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config['redis']));require('./faxInteraction.socket')[_0xca08('0xd')](socket);function respondWithRpcPromise(_0x1221fe,_0x43fd7b,_0x3d3be1){return new BPromise(function(_0x51a152,_0x540ce2){return client[_0xca08('0xe')](_0x1221fe,_0x3d3be1)[_0xca08('0xf')](function(_0x3e1f9f){logger[_0xca08('0x10')](_0xca08('0x11'),_0x43fd7b,_0xca08('0x12'));logger[_0xca08('0x13')](_0xca08('0x14'),_0x43fd7b,'request\x20sent',JSON['stringify'](_0x3e1f9f));if(_0x3e1f9f[_0xca08('0x15')]){if(_0x3e1f9f[_0xca08('0x15')][_0xca08('0x16')]===0x1f4){logger['error'](_0xca08('0x11'),_0x43fd7b,_0x3e1f9f[_0xca08('0x15')][_0xca08('0x17')]);return _0x540ce2(_0x3e1f9f[_0xca08('0x15')]['message']);}logger[_0xca08('0x15')](_0xca08('0x11'),_0x43fd7b,_0x3e1f9f[_0xca08('0x15')][_0xca08('0x17')]);return _0x51a152(_0x3e1f9f[_0xca08('0x15')][_0xca08('0x17')]);}else{logger['info'](_0xca08('0x11'),_0x43fd7b,_0xca08('0x12'));_0x51a152(_0x3e1f9f['result'][_0xca08('0x17')]);}})['catch'](function(_0x2399bb){logger[_0xca08('0x15')]('FaxInteraction,\x20%s,\x20%s',_0x43fd7b,_0x2399bb);_0x540ce2(_0x2399bb);});});}exports[_0xca08('0x18')]=function(_0x57b2dc){var _0x23b796=this;return new Promise(function(_0x9bda53,_0xf66159){return db['FaxInteraction'][_0xca08('0x19')](_0x57b2dc[_0xca08('0x1a')],{'raw':_0x57b2dc[_0xca08('0x1b')]?_0x57b2dc[_0xca08('0x1b')][_0xca08('0x1c')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x57b2dc[_0xca08('0x1b')]?_0x57b2dc['options'][_0xca08('0x1d')]||null:null,'attributes':_0x57b2dc[_0xca08('0x1b')]?_0x57b2dc['options'][_0xca08('0x1e')]||null:null,'limit':_0x57b2dc[_0xca08('0x1b')]?_0x57b2dc[_0xca08('0x1b')]['limit']||null:null})[_0xca08('0xf')](function(_0xa948e1){logger['info'](_0xca08('0x18'),_0x57b2dc);logger[_0xca08('0x13')](_0xca08('0x18'),_0x57b2dc,JSON[_0xca08('0x1f')](_0xa948e1));_0x9bda53(_0xa948e1);})[_0xca08('0x20')](function(_0x2ead85){logger[_0xca08('0x15')](_0xca08('0x18'),_0x2ead85[_0xca08('0x17')],_0x57b2dc);_0xf66159(_0x23b796[_0xca08('0x15')](0x1f4,_0x2ead85['message']));});});};exports['AddTagsToFaxInteraction']=function(_0x20832c){return new Promise(function(_0x8ad618,_0x334da5){return db[_0xca08('0x21')]['find']({'where':_0x20832c[_0xca08('0x1b')]?_0x20832c[_0xca08('0x1b')][_0xca08('0x1d')]||null:null})[_0xca08('0xf')](function(_0x22cfb7){if(_0x22cfb7){return _0x22cfb7[_0xca08('0x22')](_0x20832c[_0xca08('0x1a')][_0xca08('0x23')],_[_0xca08('0x24')](_0x20832c[_0xca08('0x1a')],[_0xca08('0x23'),'id'])||{});}})[_0xca08('0x25')](function(_0x286714){logger[_0xca08('0x10')]('AddTags',_0x20832c);logger[_0xca08('0x13')]('AddTags',_0x20832c,JSON['stringify'](_0x286714));_0x8ad618(_0x286714);})[_0xca08('0x20')](function(_0x208534){logger[_0xca08('0x15')](_0xca08('0x26'),_0x208534[_0xca08('0x17')],_0x20832c);_0x334da5(_this['error'](0x1f4,_0x208534[_0xca08('0x17')]));});});}; \ No newline at end of file diff --git a/server/api/faxInteraction/faxInteraction.socket.js b/server/api/faxInteraction/faxInteraction.socket.js index e0c16dc..2ded6a3 100644 --- a/server/api/faxInteraction/faxInteraction.socket.js +++ b/server/api/faxInteraction/faxInteraction.socket.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x6b8d=['./faxInteraction.events','save','remove','update','emit','removeListener','register','faxInteraction:'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0x6b8d,0x128));var _0xd6b8=function(_0x4592c1,_0x42da6c){_0x4592c1=_0x4592c1-0x0;var _0x207a18=_0x6b8d[_0x4592c1];return _0x207a18;};'use strict';var FaxInteractionEvents=require(_0xd6b8('0x0'));var events=[_0xd6b8('0x1'),_0xd6b8('0x2'),_0xd6b8('0x3')];function createListener(_0x1ea8d,_0x218a9a){return function(_0x32e279){_0x218a9a[_0xd6b8('0x4')](_0x1ea8d,_0x32e279);};}function removeListener(_0x346269,_0x4baeb0){return function(){FaxInteractionEvents[_0xd6b8('0x5')](_0x346269,_0x4baeb0);};}exports[_0xd6b8('0x6')]=function(_0x2ab593){for(var _0x4a30b3=0x0,_0x3db51c=events['length'];_0x4a30b3<_0x3db51c;_0x4a30b3++){var _0x2a7684=events[_0x4a30b3];var _0x5628b4=createListener(_0xd6b8('0x7')+_0x2a7684,_0x2ab593);FaxInteractionEvents['on'](_0x2a7684,_0x5628b4);}}; \ No newline at end of file +var _0x23e1=['./faxInteraction.events','remove','register','faxInteraction:'];(function(_0x42162e,_0x15e36f){var _0x39e174=function(_0x375726){while(--_0x375726){_0x42162e['push'](_0x42162e['shift']());}};_0x39e174(++_0x15e36f);}(_0x23e1,0x178));var _0x123e=function(_0x3dcd30,_0x3fb9fc){_0x3dcd30=_0x3dcd30-0x0;var _0x79d948=_0x23e1[_0x3dcd30];return _0x79d948;};'use strict';var FaxInteractionEvents=require(_0x123e('0x0'));var events=['save',_0x123e('0x1'),'update'];function createListener(_0x377cba,_0x43d4a1){return function(_0x583ae0){_0x43d4a1['emit'](_0x377cba,_0x583ae0);};}function removeListener(_0x2ce82a,_0x1dd595){return function(){FaxInteractionEvents['removeListener'](_0x2ce82a,_0x1dd595);};}exports[_0x123e('0x2')]=function(_0x3d005b){for(var _0x4f5d12=0x0,_0x3f47d9=events['length'];_0x4f5d12<_0x3f47d9;_0x4f5d12++){var _0x421d01=events[_0x4f5d12];var _0x11eaa1=createListener(_0x123e('0x3')+_0x421d01,_0x3d005b);FaxInteractionEvents['on'](_0x421d01,_0x11eaa1);}}; \ No newline at end of file diff --git a/server/api/faxInteraction/index.js b/server/api/faxInteraction/index.js index 8d54dd4..e67e25a 100644 --- a/server/api/faxInteraction/index.js +++ b/server/api/faxInteraction/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x66d0=['describe','isAuthenticated','/:id/messages','getMessages','/:id/download','download','post','addMessage','/:id/tags','tracked','fax','faxinteraction:addtags','addTags','put','/:id','update','delete','faxinteraction:destroy','destroy','removeTags','exports','multer','util','path','connect-timeout','express','fs-extra','../../components/auth/service','../../config/environment','get','index','/describe'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0x66d0,0x135));var _0x066d=function(_0x15c421,_0x6366f7){_0x15c421=_0x15c421-0x0;var _0x5e5ed5=_0x66d0[_0x15c421];return _0x5e5ed5;};'use strict';var multer=require(_0x066d('0x0'));var util=require(_0x066d('0x1'));var path=require(_0x066d('0x2'));var timeout=require(_0x066d('0x3'));var express=require(_0x066d('0x4'));var router=express['Router']();var fs_extra=require(_0x066d('0x5'));var auth=require(_0x066d('0x6'));var interaction=require('../../components/interaction/service');var config=require(_0x066d('0x7'));var controller=require('./faxInteraction.controller');router[_0x066d('0x8')]('/',auth['isAuthenticated'](),controller[_0x066d('0x9')]);router[_0x066d('0x8')](_0x066d('0xa'),auth['isAuthenticated'](),controller[_0x066d('0xb')]);router[_0x066d('0x8')]('/:id',auth[_0x066d('0xc')](),controller['show']);router['get'](_0x066d('0xd'),auth['isAuthenticated'](),controller[_0x066d('0xe')]);router[_0x066d('0x8')](_0x066d('0xf'),auth[_0x066d('0xc')](),controller[_0x066d('0x10')]);router[_0x066d('0x11')]('/',auth[_0x066d('0xc')](),controller['create']);router[_0x066d('0x11')](_0x066d('0xd'),auth[_0x066d('0xc')](),controller[_0x066d('0x12')]);router[_0x066d('0x11')](_0x066d('0x13'),auth[_0x066d('0xc')](),interaction[_0x066d('0x14')](_0x066d('0x15'),_0x066d('0x16')),controller[_0x066d('0x17')]);router[_0x066d('0x18')](_0x066d('0x19'),auth[_0x066d('0xc')](),interaction[_0x066d('0x14')](_0x066d('0x15'),'faxinteraction:update'),controller[_0x066d('0x1a')]);router[_0x066d('0x1b')]('/:id',auth[_0x066d('0xc')](),interaction[_0x066d('0x14')](_0x066d('0x15'),_0x066d('0x1c')),controller[_0x066d('0x1d')]);router['delete'](_0x066d('0x13'),auth[_0x066d('0xc')](),controller[_0x066d('0x1e')]);module[_0x066d('0x1f')]=router; \ No newline at end of file +var _0x0baf=['destroy','removeTags','exports','path','express','Router','fs-extra','../../components/auth/service','../../config/environment','./faxInteraction.controller','get','isAuthenticated','/describe','describe','/:id','show','getMessages','/:id/download','post','create','/:id/messages','tracked','fax','faxinteraction:addtags','addTags','put','delete','faxinteraction:destroy'];(function(_0x1d30a3,_0x5f428c){var _0x32bba1=function(_0x5a60cc){while(--_0x5a60cc){_0x1d30a3['push'](_0x1d30a3['shift']());}};_0x32bba1(++_0x5f428c);}(_0x0baf,0x73));var _0xf0ba=function(_0x5d2803,_0xf375bd){_0x5d2803=_0x5d2803-0x0;var _0xdcad2c=_0x0baf[_0x5d2803];return _0xdcad2c;};'use strict';var multer=require('multer');var util=require('util');var path=require(_0xf0ba('0x0'));var timeout=require('connect-timeout');var express=require(_0xf0ba('0x1'));var router=express[_0xf0ba('0x2')]();var fs_extra=require(_0xf0ba('0x3'));var auth=require(_0xf0ba('0x4'));var interaction=require('../../components/interaction/service');var config=require(_0xf0ba('0x5'));var controller=require(_0xf0ba('0x6'));router[_0xf0ba('0x7')]('/',auth[_0xf0ba('0x8')](),controller['index']);router['get'](_0xf0ba('0x9'),auth[_0xf0ba('0x8')](),controller[_0xf0ba('0xa')]);router[_0xf0ba('0x7')](_0xf0ba('0xb'),auth[_0xf0ba('0x8')](),controller[_0xf0ba('0xc')]);router['get']('/:id/messages',auth[_0xf0ba('0x8')](),controller[_0xf0ba('0xd')]);router[_0xf0ba('0x7')](_0xf0ba('0xe'),auth[_0xf0ba('0x8')](),controller['download']);router[_0xf0ba('0xf')]('/',auth[_0xf0ba('0x8')](),controller[_0xf0ba('0x10')]);router['post'](_0xf0ba('0x11'),auth[_0xf0ba('0x8')](),controller['addMessage']);router[_0xf0ba('0xf')]('/:id/tags',auth['isAuthenticated'](),interaction[_0xf0ba('0x12')](_0xf0ba('0x13'),_0xf0ba('0x14')),controller[_0xf0ba('0x15')]);router[_0xf0ba('0x16')](_0xf0ba('0xb'),auth[_0xf0ba('0x8')](),interaction['tracked']('fax','faxinteraction:update'),controller['update']);router[_0xf0ba('0x17')](_0xf0ba('0xb'),auth[_0xf0ba('0x8')](),interaction['tracked']('fax',_0xf0ba('0x18')),controller[_0xf0ba('0x19')]);router[_0xf0ba('0x17')]('/:id/tags',auth[_0xf0ba('0x8')](),controller[_0xf0ba('0x1a')]);module[_0xf0ba('0x1b')]=router; \ No newline at end of file diff --git a/server/api/faxMessage/faxMessage.attributes.js b/server/api/faxMessage/faxMessage.attributes.js index cd9050b..d11c4a5 100644 --- a/server/api/faxMessage/faxMessage.attributes.js +++ b/server/api/faxMessage/faxMessage.attributes.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xf874=['ENUM','out','DATE','TEXT','medium','BOOLEAN'];(function(_0x34843e,_0x4c4224){var _0x598f7f=function(_0x12a44c){while(--_0x12a44c){_0x34843e['push'](_0x34843e['shift']());}};_0x598f7f(++_0x4c4224);}(_0xf874,0xed));var _0x4f87=function(_0x1d7b44,_0x2333bd){_0x1d7b44=_0x1d7b44-0x0;var _0x4ccaaa=_0xf874[_0x1d7b44];return _0x4ccaaa;};'use strict';var Sequelize=require('sequelize');module['exports']={'body':{'type':Sequelize[_0x4f87('0x0')](_0x4f87('0x1')),'allowNull':![]},'read':{'type':Sequelize[_0x4f87('0x2')],'defaultValue':![]},'direction':{'type':Sequelize[_0x4f87('0x3')]('in',_0x4f87('0x4')),'defaultValue':_0x4f87('0x4'),'allowNull':![]},'failMessage':{'type':Sequelize['TEXT'],'defaultValue':null},'readAt':{'type':Sequelize[_0x4f87('0x5')]}}; \ No newline at end of file +var _0xa3e6=['sequelize','TEXT','BOOLEAN','ENUM','out'];(function(_0x458ed6,_0x504646){var _0xa5dfd9=function(_0x504e7b){while(--_0x504e7b){_0x458ed6['push'](_0x458ed6['shift']());}};_0xa5dfd9(++_0x504646);}(_0xa3e6,0xbe));var _0x6a3e=function(_0x26ff40,_0x305b3e){_0x26ff40=_0x26ff40-0x0;var _0xa2eb8e=_0xa3e6[_0x26ff40];return _0xa2eb8e;};'use strict';var Sequelize=require(_0x6a3e('0x0'));module['exports']={'body':{'type':Sequelize[_0x6a3e('0x1')]('medium'),'allowNull':![]},'read':{'type':Sequelize[_0x6a3e('0x2')],'defaultValue':![]},'direction':{'type':Sequelize[_0x6a3e('0x3')]('in',_0x6a3e('0x4')),'defaultValue':'out','allowNull':![]},'failMessage':{'type':Sequelize[_0x6a3e('0x1')],'defaultValue':null},'readAt':{'type':Sequelize['DATE']}}; \ No newline at end of file diff --git a/server/api/faxMessage/faxMessage.controller.js b/server/api/faxMessage/faxMessage.controller.js index 38de545..cb10566 100644 --- a/server/api/faxMessage/faxMessage.controller.js +++ b/server/api/faxMessage/faxMessage.controller.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x8cf4=['update','destroy','stack','name','index','map','FaxMessage','rawAttributes','fieldName','type','key','model','keys','query','intersection','attributes','fields','length','hasOwnProperty','nolimit','order','sort','filters','pick','merge','where','VIRTUAL','filter','options','includeAll','findAll','show','params','include','find','body','describe','fax-interactions','accept','readAt','format','YYYY-MM-DD\x20HH:mm:ss','UserId','agent','FaxInteraction','FaxInteractionId','isNil','get','[FAXMESSAGE:ACCEPT]\x20id=%s\x20name=%s\x20role=%s\x20interaction=%s\x20body=%s','user','role','null','AcceptMessage','acceptMessage','ContactId','sequelize','Sequelize','QueryTypes','SELECT','User','fullname','internal','manual','interface','SIP/%s','channel','motionChannel','EventManager','acceptmessage','fax','interaction','[FAXMESSAGE:REJECT]\x20id=%s\x20name=%s\x20role=%s\x20interaction=%s\x20body=%s','RejectMessage','rejectMessage','SELECT\x20*\x20FROM\x20cm_contacts\x20WHERE\x20id\x20=\x20','contact','event','create','CmContact','findOne','Attachment','AttachmentId','SendFax','FaxAccountId','/var/opt/motion2/server/files/attachments/%s','basename','download','join','root','server','attachments','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','path','to-csv','ejs','fs-extra','lodash','squel','crypto','jsforce','desk.js','querystring','ioredis','../../components/auth/service','../../components/parsers/advancedSearch','../../config/logger','api','../../config/environment','defaults','redis','localhost','client','http','request','then','info','debug','FaxMessage,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','code','message','FaxMessage,\x20%s,\x20%s','catch','sendStatus','status','end','json','offset','undefined','limit','count','apply','reject','save'];(function(_0x459944,_0x4958b3){var _0x326b83=function(_0x34c32d){while(--_0x34c32d){_0x459944['push'](_0x459944['shift']());}};_0x326b83(++_0x4958b3);}(_0x8cf4,0x173));var _0x48cf=function(_0x20a584,_0xe384a5){_0x20a584=_0x20a584-0x0;var _0x4b41a8=_0x8cf4[_0x20a584];return _0x4b41a8;};'use strict';var emlformat=require(_0x48cf('0x0'));var rimraf=require(_0x48cf('0x1'));var zipdir=require(_0x48cf('0x2'));var jsonpatch=require(_0x48cf('0x3'));var rp=require(_0x48cf('0x4'));var moment=require('moment');var BPromise=require('bluebird');var Mustache=require('mustache');var util=require('util');var path=require(_0x48cf('0x5'));var sox=require('sox');var csv=require(_0x48cf('0x6'));var ejs=require(_0x48cf('0x7'));var fs=require('fs');var fs_extra=require(_0x48cf('0x8'));var _=require(_0x48cf('0x9'));var squel=require(_0x48cf('0xa'));var crypto=require(_0x48cf('0xb'));var jsforce=require(_0x48cf('0xc'));var deskjs=require(_0x48cf('0xd'));var toCsv=require(_0x48cf('0x6'));var querystring=require(_0x48cf('0xe'));var Papa=require('papaparse');var Redis=require(_0x48cf('0xf'));var authService=require(_0x48cf('0x10'));var qs=require('../../components/parsers/qs');var as=require(_0x48cf('0x11'));var hardwareService=require('../../config/license/hardware');var logger=require(_0x48cf('0x12'))(_0x48cf('0x13'));var utils=require('../../config/utils');var config=require(_0x48cf('0x14'));var licenseUtil=require('../../config/license/util');var db=require('../../mysqldb')['db'];config['redis']=_[_0x48cf('0x15')](config[_0x48cf('0x16')],{'host':_0x48cf('0x17'),'port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config[_0x48cf('0x16')]));require('./faxMessage.socket')['register'](socket);var jayson=require('jayson/promise');var client=jayson[_0x48cf('0x18')]['http']({'port':0x232c});var client9002=jayson[_0x48cf('0x18')][_0x48cf('0x19')]({'port':0x232a});function respondWithRpcPromise(_0x3e6cbe,_0x43dd3c,_0x3a866b,_0x233d0d){return new BPromise(function(_0x599fab,_0x4704d6){var _0x58cdbc=_0x233d0d||client;return _0x58cdbc[_0x48cf('0x1a')](_0x3e6cbe,_0x3a866b)[_0x48cf('0x1b')](function(_0x22faa6){logger[_0x48cf('0x1c')]('FaxMessage,\x20%s,\x20%s',_0x43dd3c,'request\x20sent');logger[_0x48cf('0x1d')](_0x48cf('0x1e'),_0x43dd3c,_0x48cf('0x1f'),JSON[_0x48cf('0x20')](_0x22faa6));if(_0x22faa6[_0x48cf('0x21')]){if(_0x22faa6[_0x48cf('0x21')][_0x48cf('0x22')]===0x1f4){logger[_0x48cf('0x21')]('FaxMessage,\x20%s,\x20%s',_0x43dd3c,_0x22faa6['error'][_0x48cf('0x23')]);return _0x4704d6(_0x22faa6[_0x48cf('0x21')]['message']);}logger['error'](_0x48cf('0x24'),_0x43dd3c,_0x22faa6[_0x48cf('0x21')][_0x48cf('0x23')]);return _0x599fab(_0x22faa6[_0x48cf('0x21')][_0x48cf('0x23')]);}else{logger[_0x48cf('0x1c')](_0x48cf('0x24'),_0x43dd3c,'request\x20sent');_0x599fab(_0x22faa6['result'][_0x48cf('0x23')]);}})[_0x48cf('0x25')](function(_0xc516b7){logger[_0x48cf('0x21')](_0x48cf('0x24'),_0x43dd3c,_0xc516b7);_0x4704d6(_0xc516b7);});});}function respondWithStatusCode(_0x25aff6,_0x3d55ca){_0x3d55ca=_0x3d55ca||0xcc;return function(_0x3e19b5){if(_0x3e19b5){return _0x25aff6[_0x48cf('0x26')](_0x3d55ca);}return _0x25aff6[_0x48cf('0x27')](_0x3d55ca)[_0x48cf('0x28')]();};}function respondWithResult(_0x596677,_0x35fa53){_0x35fa53=_0x35fa53||0xc8;return function(_0x24b6d6){if(_0x24b6d6){return _0x596677[_0x48cf('0x27')](_0x35fa53)[_0x48cf('0x29')](_0x24b6d6);}};}function respondWithFilteredResult(_0x5eaa90,_0x1e21b7){return function(_0x11220f){if(_0x11220f){var _0x677ea1=typeof _0x1e21b7[_0x48cf('0x2a')]===_0x48cf('0x2b')&&typeof _0x1e21b7[_0x48cf('0x2c')]===_0x48cf('0x2b');var _0x53a6e3=_0x11220f[_0x48cf('0x2d')];var _0x70ba1f=_0x677ea1?0x0:_0x1e21b7[_0x48cf('0x2a')];var _0x49c683=_0x677ea1?_0x11220f[_0x48cf('0x2d')]:_0x1e21b7[_0x48cf('0x2a')]+_0x1e21b7[_0x48cf('0x2c')];var _0x510deb;if(_0x49c683>=_0x53a6e3){_0x49c683=_0x53a6e3;_0x510deb=0xc8;}else{_0x510deb=0xce;}_0x5eaa90[_0x48cf('0x27')](_0x510deb);return _0x5eaa90['set']('Content-Range',_0x70ba1f+'-'+_0x49c683+'/'+_0x53a6e3)['json'](_0x11220f);}return null;};}function patchUpdates(_0x4c121c){return function(_0x4830cd){try{jsonpatch[_0x48cf('0x2e')](_0x4830cd,_0x4c121c,!![]);}catch(_0x394ffa){return BPromise[_0x48cf('0x2f')](_0x394ffa);}return _0x4830cd[_0x48cf('0x30')]();};}function saveUpdates(_0x247c0b,_0x25281b){return function(_0x58f52e){if(_0x58f52e){return _0x58f52e[_0x48cf('0x31')](_0x247c0b)[_0x48cf('0x1b')](function(_0x42e093){return _0x42e093;});}return null;};}function removeEntity(_0x4f81e0,_0x509a6a){return function(_0x453640){if(_0x453640){return _0x453640[_0x48cf('0x32')]()['then'](function(){_0x4f81e0[_0x48cf('0x27')](0xcc)['end']();});}};}function handleEntityNotFound(_0xffee68,_0x1cfd93){return function(_0x1b94b6){if(!_0x1b94b6){_0xffee68[_0x48cf('0x26')](0x194);}return _0x1b94b6;};}function handleError(_0x1852df,_0x16dc99){_0x16dc99=_0x16dc99||0x1f4;return function(_0x116185){logger[_0x48cf('0x21')](_0x116185[_0x48cf('0x33')]);if(_0x116185[_0x48cf('0x34')]){delete _0x116185[_0x48cf('0x34')];}_0x1852df[_0x48cf('0x27')](_0x16dc99)['send'](_0x116185);};}exports[_0x48cf('0x35')]=function(_0x1d6a58,_0x1ca2f4){var _0x6d1967={},_0x33e291={},_0x191d9a={'count':0x0,'rows':[]};var _0x21564e=_[_0x48cf('0x36')](db[_0x48cf('0x37')][_0x48cf('0x38')],function(_0x14e538){return{'name':_0x14e538[_0x48cf('0x39')],'type':_0x14e538[_0x48cf('0x3a')][_0x48cf('0x3b')]};});_0x33e291[_0x48cf('0x3c')]=_['map'](_0x21564e,_0x48cf('0x34'));_0x33e291['query']=_[_0x48cf('0x3d')](_0x1d6a58[_0x48cf('0x3e')]);_0x33e291['filters']=_[_0x48cf('0x3f')](_0x33e291[_0x48cf('0x3c')],_0x33e291[_0x48cf('0x3e')]);_0x6d1967[_0x48cf('0x40')]=_[_0x48cf('0x3f')](_0x33e291[_0x48cf('0x3c')],qs['fields'](_0x1d6a58[_0x48cf('0x3e')][_0x48cf('0x41')]));_0x6d1967['attributes']=_0x6d1967[_0x48cf('0x40')][_0x48cf('0x42')]?_0x6d1967[_0x48cf('0x40')]:_0x33e291[_0x48cf('0x3c')];if(!_0x1d6a58[_0x48cf('0x3e')][_0x48cf('0x43')](_0x48cf('0x44'))){_0x6d1967[_0x48cf('0x2c')]=qs['limit'](_0x1d6a58['query'][_0x48cf('0x2c')]);_0x6d1967[_0x48cf('0x2a')]=qs[_0x48cf('0x2a')](_0x1d6a58[_0x48cf('0x3e')][_0x48cf('0x2a')]);}_0x6d1967[_0x48cf('0x45')]=qs[_0x48cf('0x46')](_0x1d6a58[_0x48cf('0x3e')][_0x48cf('0x46')]);_0x6d1967['where']=qs[_0x48cf('0x47')](_[_0x48cf('0x48')](_0x1d6a58[_0x48cf('0x3e')],_0x33e291[_0x48cf('0x47')]),_0x21564e);if(_0x1d6a58[_0x48cf('0x3e')]['filter']){_0x6d1967['where']=_[_0x48cf('0x49')](_0x6d1967[_0x48cf('0x4a')],{'$or':_[_0x48cf('0x36')](_0x21564e,function(_0x4da7a6){if(_0x4da7a6[_0x48cf('0x3a')]!==_0x48cf('0x4b')){var _0x57d852={};_0x57d852[_0x4da7a6[_0x48cf('0x34')]]={'$like':'%'+_0x1d6a58[_0x48cf('0x3e')][_0x48cf('0x4c')]+'%'};return _0x57d852;}})});}_0x6d1967=_[_0x48cf('0x49')]({},_0x6d1967,_0x1d6a58[_0x48cf('0x4d')]);var _0x38b2c0={'where':_0x6d1967[_0x48cf('0x4a')]};return db[_0x48cf('0x37')]['count'](_0x38b2c0)[_0x48cf('0x1b')](function(_0x3ee48e){_0x191d9a[_0x48cf('0x2d')]=_0x3ee48e;if(_0x1d6a58[_0x48cf('0x3e')][_0x48cf('0x4e')]){_0x6d1967['include']=[{'all':!![]}];}return db[_0x48cf('0x37')][_0x48cf('0x4f')](_0x6d1967);})['then'](function(_0x5b6366){_0x191d9a['rows']=_0x5b6366;return _0x191d9a;})[_0x48cf('0x1b')](respondWithFilteredResult(_0x1ca2f4,_0x6d1967))[_0x48cf('0x25')](handleError(_0x1ca2f4,null));};exports[_0x48cf('0x50')]=function(_0x31094e,_0x4a9a1e){var _0x5d0a4f={'raw':!![],'where':{'id':_0x31094e[_0x48cf('0x51')]['id']}},_0x1d9e65={};_0x1d9e65['model']=_[_0x48cf('0x3d')](db[_0x48cf('0x37')][_0x48cf('0x38')]);_0x1d9e65[_0x48cf('0x3e')]=_['keys'](_0x31094e[_0x48cf('0x3e')]);_0x1d9e65[_0x48cf('0x47')]=_['intersection'](_0x1d9e65[_0x48cf('0x3c')],_0x1d9e65[_0x48cf('0x3e')]);_0x5d0a4f[_0x48cf('0x40')]=_[_0x48cf('0x3f')](_0x1d9e65[_0x48cf('0x3c')],qs[_0x48cf('0x41')](_0x31094e[_0x48cf('0x3e')][_0x48cf('0x41')]));_0x5d0a4f[_0x48cf('0x40')]=_0x5d0a4f['attributes']['length']?_0x5d0a4f[_0x48cf('0x40')]:_0x1d9e65['model'];if(_0x31094e[_0x48cf('0x3e')][_0x48cf('0x4e')]){_0x5d0a4f[_0x48cf('0x52')]=[{'all':!![]}];}_0x5d0a4f=_['merge']({},_0x5d0a4f,_0x31094e[_0x48cf('0x4d')]);return db[_0x48cf('0x37')][_0x48cf('0x53')](_0x5d0a4f)[_0x48cf('0x1b')](handleEntityNotFound(_0x4a9a1e,null))[_0x48cf('0x1b')](respondWithResult(_0x4a9a1e,null))['catch'](handleError(_0x4a9a1e,null));};exports[_0x48cf('0x31')]=function(_0x3c60f2,_0x36e517){if(_0x3c60f2[_0x48cf('0x54')]['id']){delete _0x3c60f2[_0x48cf('0x54')]['id'];}return db[_0x48cf('0x37')][_0x48cf('0x53')]({'where':{'id':_0x3c60f2[_0x48cf('0x51')]['id']}})[_0x48cf('0x1b')](handleEntityNotFound(_0x36e517,null))[_0x48cf('0x1b')](saveUpdates(_0x3c60f2[_0x48cf('0x54')],null))[_0x48cf('0x1b')](respondWithResult(_0x36e517,null))[_0x48cf('0x25')](handleError(_0x36e517,null));};exports[_0x48cf('0x32')]=function(_0x40b170,_0x5efffd){return db[_0x48cf('0x37')][_0x48cf('0x53')]({'where':{'id':_0x40b170[_0x48cf('0x51')]['id']}})['then'](handleEntityNotFound(_0x5efffd,null))['then'](removeEntity(_0x5efffd,null))['catch'](handleError(_0x5efffd,null));};exports[_0x48cf('0x55')]=function(_0x29c1a5,_0xda4a62){return db[_0x48cf('0x37')][_0x48cf('0x55')]()[_0x48cf('0x1b')](respondWithResult(_0xda4a62,null))[_0x48cf('0x25')](handleError(_0xda4a62,null));};var interaction_log=require(_0x48cf('0x12'))(_0x48cf('0x56'));exports[_0x48cf('0x57')]=function(_0x2373a1,_0x2fa8eb,_0x41d1a6){var _0x479bfb={'agent':{},'channel':'fax'};if(_0x2373a1['body']['id']){delete _0x2373a1[_0x48cf('0x54')]['id'];}_0x2373a1[_0x48cf('0x54')]['read']=!![];_0x2373a1['body'][_0x48cf('0x58')]=moment()[_0x48cf('0x59')](_0x48cf('0x5a'));_0x2373a1[_0x48cf('0x54')]['UserId']=_0x2373a1[_0x48cf('0x54')][_0x48cf('0x5b')]||_0x2373a1['user']['id'];_0x479bfb[_0x48cf('0x5c')]['id']=_0x2373a1[_0x48cf('0x54')][_0x48cf('0x5b')];return db['FaxMessage'][_0x48cf('0x53')]({'where':{'id':_0x2373a1[_0x48cf('0x51')]['id'],'UserId':null}})[_0x48cf('0x1b')](handleEntityNotFound(_0x2fa8eb,null))[_0x48cf('0x1b')](saveUpdates(_0x2373a1[_0x48cf('0x54')],null))[_0x48cf('0x1b')](function(_0x3e7b23){if(_0x3e7b23){_0x479bfb[_0x48cf('0x23')]=_0x3e7b23['get']({'plain':!![]});return db[_0x48cf('0x5d')]['find']({'where':{'id':_0x3e7b23[_0x48cf('0x5e')]}});}return null;})['then'](handleEntityNotFound(_0x2fa8eb,null))['then'](function(_0x4ac79e){if(_0x4ac79e){return _0x4ac79e[_0x48cf('0x31')]({'UserId':_0x2373a1[_0x48cf('0x54')][_0x48cf('0x5b')],'read1stAt':_[_0x48cf('0x5f')](_0x4ac79e['read1stAt'])?moment()[_0x48cf('0x59')](_0x48cf('0x5a')):undefined});}return null;})[_0x48cf('0x1b')](function(_0x1e45ba){if(_0x1e45ba){_0x479bfb['interaction']=_0x1e45ba[_0x48cf('0x60')]({'plain':!![]});interaction_log[_0x48cf('0x1c')](_0x48cf('0x61'),_0x2373a1[_0x48cf('0x62')]['id'],_0x2373a1[_0x48cf('0x62')][_0x48cf('0x34')],_0x2373a1['user'][_0x48cf('0x63')],_0x479bfb['interaction']['id'],_0x2373a1[_0x48cf('0x54')]?JSON['stringify'](_0x2373a1[_0x48cf('0x54')]):_0x48cf('0x64'));return respondWithRpcPromise(_0x48cf('0x65'),_0x48cf('0x66'),_0x479bfb);}return null;})[_0x48cf('0x1b')](function(_0x45f68c){var _0x45bd7f='SELECT\x20*\x20FROM\x20cm_contacts\x20WHERE\x20id\x20=\x20'+_0x45f68c[_0x48cf('0x23')][_0x48cf('0x67')];return db[_0x48cf('0x68')][_0x48cf('0x3e')](_0x45bd7f,{'type':db[_0x48cf('0x69')][_0x48cf('0x6a')][_0x48cf('0x6b')],'raw':!![]})[_0x48cf('0x1b')](function(_0x3e4219){return _0x3e4219;});})[_0x48cf('0x1b')](function(_0x3a6632){if(_0x3a6632){_0x479bfb[_0x48cf('0x23')]['contact']=_0x3a6632[0x0];if(!_0x2373a1['body']['UserId'])return;return db[_0x48cf('0x6c')]['find']({'where':{'id':_0x2373a1[_0x48cf('0x54')][_0x48cf('0x5b')],'role':_0x48cf('0x5c')},'attributes':['id','name',_0x48cf('0x6d'),'email',_0x48cf('0x6e')],'raw':!![]});}return null;})[_0x48cf('0x1b')](function(_0x2375b2){if(!_0x2375b2)return null;_0x479bfb['message']['agent']=_0x2375b2;return _0x479bfb;})['then'](function(_0x589f0a){if(_0x589f0a){if(_0x2373a1[_0x48cf('0x54')][_0x48cf('0x6f')]){_0x479bfb[_0x48cf('0x23')][_0x48cf('0x70')]=util[_0x48cf('0x59')](_0x48cf('0x71'),_0x2373a1['user']['name']);_0x479bfb[_0x48cf('0x23')]['channel']=_0x479bfb[_0x48cf('0x72')];_0x479bfb[_0x48cf('0x23')][_0x48cf('0x73')]=_0x479bfb[_0x48cf('0x72')];_0x479bfb['message']['event']=_0x48cf('0x57');return respondWithRpcPromise(_0x48cf('0x74'),'EventManager',{'event':_0x48cf('0x75'),'message':_0x479bfb[_0x48cf('0x23')]},client9002)[_0x48cf('0x1b')](function(){return _0x479bfb;});}return _0x479bfb;}return null;})['then'](respondWithResult(_0x2fa8eb,null))[_0x48cf('0x25')](handleError(_0x2fa8eb,null));};var interaction_log=require(_0x48cf('0x12'))(_0x48cf('0x56'));exports[_0x48cf('0x2f')]=function(_0x553889,_0x36d46e,_0x272d7a){var _0x273a05={'agent':{},'channel':_0x48cf('0x76')};if(_0x553889[_0x48cf('0x54')]['id']){delete _0x553889[_0x48cf('0x54')]['id'];}_0x553889[_0x48cf('0x54')][_0x48cf('0x5b')]=_0x553889[_0x48cf('0x54')][_0x48cf('0x5b')]||_0x553889[_0x48cf('0x62')]['id'];_0x273a05[_0x48cf('0x5c')]['id']=_0x553889[_0x48cf('0x54')][_0x48cf('0x5b')];return db[_0x48cf('0x37')]['find']({'where':{'id':_0x553889[_0x48cf('0x51')]['id'],'UserId':null}})['then'](handleEntityNotFound(_0x36d46e,null))[_0x48cf('0x1b')](function(_0x3d0427){if(_0x3d0427){_0x273a05[_0x48cf('0x23')]=_0x3d0427['get']({'plain':!![]});return db[_0x48cf('0x5d')]['find']({'where':{'id':_0x3d0427[_0x48cf('0x5e')]}});}return null;})[_0x48cf('0x1b')](handleEntityNotFound(_0x36d46e,null))[_0x48cf('0x1b')](function(_0x4965b4){if(_0x4965b4){_0x273a05[_0x48cf('0x77')]=_0x4965b4[_0x48cf('0x60')]({'plain':!![]});interaction_log['info'](_0x48cf('0x78'),_0x553889[_0x48cf('0x62')]['id'],_0x553889['user'][_0x48cf('0x34')],_0x553889[_0x48cf('0x62')]['role'],_0x273a05[_0x48cf('0x77')]['id'],_0x553889[_0x48cf('0x54')]?JSON['stringify'](_0x553889[_0x48cf('0x54')]):'null');return respondWithRpcPromise(_0x48cf('0x79'),_0x48cf('0x7a'),_0x273a05);}return null;})[_0x48cf('0x1b')](function(_0x416a40){var _0x20fc9e=_0x48cf('0x7b')+_0x416a40[_0x48cf('0x23')][_0x48cf('0x67')];return db[_0x48cf('0x68')][_0x48cf('0x3e')](_0x20fc9e,{'type':db[_0x48cf('0x69')][_0x48cf('0x6a')][_0x48cf('0x6b')],'raw':!![]})[_0x48cf('0x1b')](function(_0x444a2d){return _0x444a2d;});})[_0x48cf('0x1b')](function(_0x402268){if(_0x402268){_0x273a05[_0x48cf('0x23')][_0x48cf('0x7c')]=_0x402268[0x0];if(!_0x553889[_0x48cf('0x54')][_0x48cf('0x5b')])return;return db['User'][_0x48cf('0x53')]({'where':{'id':_0x553889[_0x48cf('0x54')]['UserId'],'role':'agent'},'attributes':['id',_0x48cf('0x34'),_0x48cf('0x6d'),'email','internal'],'raw':!![]});}return null;})[_0x48cf('0x1b')](function(_0x49a0be){if(!_0x49a0be)return null;_0x273a05[_0x48cf('0x23')][_0x48cf('0x5c')]=_0x49a0be;return _0x273a05;})['then'](function(_0x5de0c9){if(_0x5de0c9){_0x5de0c9[_0x48cf('0x23')][_0x48cf('0x70')]=util[_0x48cf('0x59')](_0x48cf('0x71'),_0x553889[_0x48cf('0x62')][_0x48cf('0x34')]);_0x5de0c9[_0x48cf('0x23')]['channel']=_0x273a05[_0x48cf('0x72')];_0x5de0c9[_0x48cf('0x23')][_0x48cf('0x73')]=_0x273a05['channel'];_0x5de0c9[_0x48cf('0x23')][_0x48cf('0x7d')]='reject';respondWithRpcPromise('EventManager','EventManager',{'event':'rejectmessage','message':_0x5de0c9[_0x48cf('0x23')]},client9002);return _0x273a05;}return null;})['then'](respondWithResult(_0x36d46e,null))[_0x48cf('0x25')](handleError(_0x36d46e,null));};exports[_0x48cf('0x7e')]=function(_0x35a73d,_0x1a582a){var _0x4c750b;return db[_0x48cf('0x37')][_0x48cf('0x7e')](_0x35a73d[_0x48cf('0x54')],{})[_0x48cf('0x1b')](function(_0x1518e5){_0x4c750b=_0x1518e5;return db[_0x48cf('0x7f')][_0x48cf('0x80')]({'where':{'id':_0x4c750b[_0x48cf('0x67')]}});})[_0x48cf('0x1b')](function(_0x158981){if(_[_0x48cf('0x5f')](_0x158981)){return;}else{_0x4c750b['fax']=_0x158981['fax'];return db[_0x48cf('0x81')][_0x48cf('0x80')]({'where':{'id':_0x4c750b[_0x48cf('0x82')]}});}})['then'](function(_0x3a5407){return respondWithRpcPromise(_0x48cf('0x83'),_0x48cf('0x83'),{'FaxAccountId':_[_0x48cf('0x5f')](_0x35a73d[_0x48cf('0x54')])?undefined:_0x35a73d[_0x48cf('0x54')][_0x48cf('0x84')],'path':_[_0x48cf('0x5f')](_0x3a5407)?undefined:util[_0x48cf('0x59')](_0x48cf('0x85'),_0x3a5407[_0x48cf('0x86')]),'fax':_[_0x48cf('0x5f')](_0x4c750b[_0x48cf('0x76')])?undefined:_0x4c750b['fax'],'AttachmentId':_0x4c750b[_0x48cf('0x82')]},client9002);})[_0x48cf('0x1b')](respondWithResult(_0x1a582a,0xc9))[_0x48cf('0x25')](handleError(_0x1a582a,null));};exports[_0x48cf('0x87')]=function(_0x287f91,_0x1c7ad3){var _0x13f76a=path[_0x48cf('0x88')](config[_0x48cf('0x89')],_0x48cf('0x8a'),'files',_0x48cf('0x8b'));return db[_0x48cf('0x37')][_0x48cf('0x53')]({'where':{'id':_0x287f91[_0x48cf('0x51')]['id']},'include':[{'model':db[_0x48cf('0x81')],'as':_0x48cf('0x81')}]})[_0x48cf('0x1b')](handleEntityNotFound(_0x1c7ad3,null))['then'](function(_0x21dec2){if(_0x21dec2){return _0x1c7ad3[_0x48cf('0x87')](path['join'](_0x13f76a,_0x21dec2[_0x48cf('0x81')][_0x48cf('0x86')]));}})[_0x48cf('0x25')](handleError(_0x1c7ad3,null));}; \ No newline at end of file +var _0xe675=['FaxInteraction','FaxInteractionId','isNil','read1stAt','YYYY-MM-DD\x20HH:mm:ss','[FAXMESSAGE:ACCEPT]\x20id=%s\x20name=%s\x20role=%s\x20interaction=%s\x20body=%s','role','null','AcceptMessage','ContactId','sequelize','Sequelize','QueryTypes','contact','User','fullname','interface','SIP/%s','channel','motionChannel','event','EventManager','acceptmessage','get','interaction','[FAXMESSAGE:REJECT]\x20id=%s\x20name=%s\x20role=%s\x20interaction=%s\x20body=%s','RejectMessage','rejectMessage','SELECT\x20*\x20FROM\x20cm_contacts\x20WHERE\x20id\x20=\x20','SELECT','email','internal','create','CmContact','findOne','Attachment','AttachmentId','SendFax','FaxAccountId','/var/opt/motion2/server/files/attachments/%s','download','server','files','attachments','join','basename','eml-format','rimraf','mustache','util','sox','to-csv','ejs','fs-extra','lodash','squel','crypto','jsforce','desk.js','querystring','papaparse','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../mysqldb','redis','defaults','socket.io-emitter','./faxMessage.socket','register','client','http','request','info','request\x20sent','debug','FaxMessage,\x20%s,\x20%s,\x20%s','stringify','error','code','FaxMessage,\x20%s,\x20%s','message','result','catch','sendStatus','status','end','json','undefined','offset','count','limit','set','Content-Range','apply','reject','save','update','then','name','send','index','map','FaxMessage','rawAttributes','type','key','model','query','filters','intersection','fields','attributes','hasOwnProperty','nolimit','sort','pick','merge','where','VIRTUAL','options','include','findAll','show','params','keys','includeAll','find','body','destroy','describe','fax-interactions','accept','fax','read','format','UserId','user','agent'];(function(_0x1bc1ff,_0x29907d){var _0x3042f7=function(_0xa5abc8){while(--_0xa5abc8){_0x1bc1ff['push'](_0x1bc1ff['shift']());}};_0x3042f7(++_0x29907d);}(_0xe675,0x14c));var _0x5e67=function(_0x334564,_0x4a14ca){_0x334564=_0x334564-0x0;var _0x35f756=_0xe675[_0x334564];return _0x35f756;};'use strict';var emlformat=require(_0x5e67('0x0'));var rimraf=require(_0x5e67('0x1'));var zipdir=require('zip-dir');var jsonpatch=require('fast-json-patch');var rp=require('request-promise');var moment=require('moment');var BPromise=require('bluebird');var Mustache=require(_0x5e67('0x2'));var util=require(_0x5e67('0x3'));var path=require('path');var sox=require(_0x5e67('0x4'));var csv=require(_0x5e67('0x5'));var ejs=require(_0x5e67('0x6'));var fs=require('fs');var fs_extra=require(_0x5e67('0x7'));var _=require(_0x5e67('0x8'));var squel=require(_0x5e67('0x9'));var crypto=require(_0x5e67('0xa'));var jsforce=require(_0x5e67('0xb'));var deskjs=require(_0x5e67('0xc'));var toCsv=require(_0x5e67('0x5'));var querystring=require(_0x5e67('0xd'));var Papa=require(_0x5e67('0xe'));var Redis=require('ioredis');var authService=require('../../components/auth/service');var qs=require(_0x5e67('0xf'));var as=require(_0x5e67('0x10'));var hardwareService=require(_0x5e67('0x11'));var logger=require(_0x5e67('0x12'))(_0x5e67('0x13'));var utils=require(_0x5e67('0x14'));var config=require(_0x5e67('0x15'));var licenseUtil=require('../../config/license/util');var db=require(_0x5e67('0x16'))['db'];config[_0x5e67('0x17')]=_[_0x5e67('0x18')](config['redis'],{'host':'localhost','port':0x18eb});var socket=require(_0x5e67('0x19'))(new Redis(config['redis']));require(_0x5e67('0x1a'))[_0x5e67('0x1b')](socket);var jayson=require('jayson/promise');var client=jayson['client']['http']({'port':0x232c});var client9002=jayson[_0x5e67('0x1c')][_0x5e67('0x1d')]({'port':0x232a});function respondWithRpcPromise(_0x2565d8,_0x3d205c,_0x5d734a,_0xeee5f6){return new BPromise(function(_0x50510c,_0x25aa79){var _0x144e2c=_0xeee5f6||client;return _0x144e2c[_0x5e67('0x1e')](_0x2565d8,_0x5d734a)['then'](function(_0x541247){logger[_0x5e67('0x1f')]('FaxMessage,\x20%s,\x20%s',_0x3d205c,_0x5e67('0x20'));logger[_0x5e67('0x21')](_0x5e67('0x22'),_0x3d205c,_0x5e67('0x20'),JSON[_0x5e67('0x23')](_0x541247));if(_0x541247[_0x5e67('0x24')]){if(_0x541247['error'][_0x5e67('0x25')]===0x1f4){logger[_0x5e67('0x24')](_0x5e67('0x26'),_0x3d205c,_0x541247[_0x5e67('0x24')][_0x5e67('0x27')]);return _0x25aa79(_0x541247[_0x5e67('0x24')][_0x5e67('0x27')]);}logger[_0x5e67('0x24')](_0x5e67('0x26'),_0x3d205c,_0x541247[_0x5e67('0x24')][_0x5e67('0x27')]);return _0x50510c(_0x541247[_0x5e67('0x24')][_0x5e67('0x27')]);}else{logger[_0x5e67('0x1f')](_0x5e67('0x26'),_0x3d205c,_0x5e67('0x20'));_0x50510c(_0x541247[_0x5e67('0x28')]['message']);}})[_0x5e67('0x29')](function(_0xfd6bc5){logger[_0x5e67('0x24')](_0x5e67('0x26'),_0x3d205c,_0xfd6bc5);_0x25aa79(_0xfd6bc5);});});}function respondWithStatusCode(_0x56f4bc,_0x14641){_0x14641=_0x14641||0xcc;return function(_0x538378){if(_0x538378){return _0x56f4bc[_0x5e67('0x2a')](_0x14641);}return _0x56f4bc[_0x5e67('0x2b')](_0x14641)[_0x5e67('0x2c')]();};}function respondWithResult(_0x4c7590,_0x43ae46){_0x43ae46=_0x43ae46||0xc8;return function(_0x48f7ef){if(_0x48f7ef){return _0x4c7590[_0x5e67('0x2b')](_0x43ae46)[_0x5e67('0x2d')](_0x48f7ef);}};}function respondWithFilteredResult(_0x4adb22,_0x3bf607){return function(_0x313dd8){if(_0x313dd8){var _0x10753c=typeof _0x3bf607['offset']===_0x5e67('0x2e')&&typeof _0x3bf607['limit']===_0x5e67('0x2e');var _0x5b90fd=_0x313dd8['count'];var _0x9ebb9f=_0x10753c?0x0:_0x3bf607[_0x5e67('0x2f')];var _0x1aa7c2=_0x10753c?_0x313dd8[_0x5e67('0x30')]:_0x3bf607[_0x5e67('0x2f')]+_0x3bf607[_0x5e67('0x31')];var _0x1dcef0;if(_0x1aa7c2>=_0x5b90fd){_0x1aa7c2=_0x5b90fd;_0x1dcef0=0xc8;}else{_0x1dcef0=0xce;}_0x4adb22[_0x5e67('0x2b')](_0x1dcef0);return _0x4adb22[_0x5e67('0x32')](_0x5e67('0x33'),_0x9ebb9f+'-'+_0x1aa7c2+'/'+_0x5b90fd)['json'](_0x313dd8);}return null;};}function patchUpdates(_0x20761c){return function(_0x2857c8){try{jsonpatch[_0x5e67('0x34')](_0x2857c8,_0x20761c,!![]);}catch(_0x17e3b0){return BPromise[_0x5e67('0x35')](_0x17e3b0);}return _0x2857c8[_0x5e67('0x36')]();};}function saveUpdates(_0x35d23e,_0x1e2372){return function(_0x1af3db){if(_0x1af3db){return _0x1af3db[_0x5e67('0x37')](_0x35d23e)[_0x5e67('0x38')](function(_0x3571b1){return _0x3571b1;});}return null;};}function removeEntity(_0x517147,_0x5b9102){return function(_0x1213d1){if(_0x1213d1){return _0x1213d1['destroy']()[_0x5e67('0x38')](function(){_0x517147[_0x5e67('0x2b')](0xcc)[_0x5e67('0x2c')]();});}};}function handleEntityNotFound(_0x57557f,_0xce3d4a){return function(_0x9eeb4e){if(!_0x9eeb4e){_0x57557f['sendStatus'](0x194);}return _0x9eeb4e;};}function handleError(_0x577c35,_0x1f671b){_0x1f671b=_0x1f671b||0x1f4;return function(_0x2ab715){logger[_0x5e67('0x24')](_0x2ab715['stack']);if(_0x2ab715['name']){delete _0x2ab715[_0x5e67('0x39')];}_0x577c35[_0x5e67('0x2b')](_0x1f671b)[_0x5e67('0x3a')](_0x2ab715);};}exports[_0x5e67('0x3b')]=function(_0x41f77d,_0x2b3cab){var _0x3f74dd={},_0x3524df={},_0x490984={'count':0x0,'rows':[]};var _0x24c6aa=_[_0x5e67('0x3c')](db[_0x5e67('0x3d')][_0x5e67('0x3e')],function(_0x41ab72){return{'name':_0x41ab72['fieldName'],'type':_0x41ab72[_0x5e67('0x3f')][_0x5e67('0x40')]};});_0x3524df[_0x5e67('0x41')]=_[_0x5e67('0x3c')](_0x24c6aa,_0x5e67('0x39'));_0x3524df[_0x5e67('0x42')]=_['keys'](_0x41f77d['query']);_0x3524df[_0x5e67('0x43')]=_[_0x5e67('0x44')](_0x3524df[_0x5e67('0x41')],_0x3524df[_0x5e67('0x42')]);_0x3f74dd['attributes']=_[_0x5e67('0x44')](_0x3524df[_0x5e67('0x41')],qs[_0x5e67('0x45')](_0x41f77d[_0x5e67('0x42')]['fields']));_0x3f74dd[_0x5e67('0x46')]=_0x3f74dd[_0x5e67('0x46')]['length']?_0x3f74dd[_0x5e67('0x46')]:_0x3524df[_0x5e67('0x41')];if(!_0x41f77d[_0x5e67('0x42')][_0x5e67('0x47')](_0x5e67('0x48'))){_0x3f74dd[_0x5e67('0x31')]=qs[_0x5e67('0x31')](_0x41f77d['query'][_0x5e67('0x31')]);_0x3f74dd['offset']=qs['offset'](_0x41f77d['query'][_0x5e67('0x2f')]);}_0x3f74dd['order']=qs[_0x5e67('0x49')](_0x41f77d[_0x5e67('0x42')]['sort']);_0x3f74dd['where']=qs[_0x5e67('0x43')](_[_0x5e67('0x4a')](_0x41f77d[_0x5e67('0x42')],_0x3524df[_0x5e67('0x43')]),_0x24c6aa);if(_0x41f77d[_0x5e67('0x42')]['filter']){_0x3f74dd['where']=_[_0x5e67('0x4b')](_0x3f74dd[_0x5e67('0x4c')],{'$or':_[_0x5e67('0x3c')](_0x24c6aa,function(_0x3aeed7){if(_0x3aeed7['type']!==_0x5e67('0x4d')){var _0x56e0e1={};_0x56e0e1[_0x3aeed7[_0x5e67('0x39')]]={'$like':'%'+_0x41f77d[_0x5e67('0x42')]['filter']+'%'};return _0x56e0e1;}})});}_0x3f74dd=_[_0x5e67('0x4b')]({},_0x3f74dd,_0x41f77d[_0x5e67('0x4e')]);var _0x40efcb={'where':_0x3f74dd['where']};return db[_0x5e67('0x3d')][_0x5e67('0x30')](_0x40efcb)['then'](function(_0x221493){_0x490984['count']=_0x221493;if(_0x41f77d['query']['includeAll']){_0x3f74dd[_0x5e67('0x4f')]=[{'all':!![]}];}return db['FaxMessage'][_0x5e67('0x50')](_0x3f74dd);})[_0x5e67('0x38')](function(_0x41959d){_0x490984['rows']=_0x41959d;return _0x490984;})[_0x5e67('0x38')](respondWithFilteredResult(_0x2b3cab,_0x3f74dd))[_0x5e67('0x29')](handleError(_0x2b3cab,null));};exports[_0x5e67('0x51')]=function(_0x35a55e,_0x1a0664){var _0x59c8a0={'raw':!![],'where':{'id':_0x35a55e[_0x5e67('0x52')]['id']}},_0xe96678={};_0xe96678[_0x5e67('0x41')]=_[_0x5e67('0x53')](db[_0x5e67('0x3d')][_0x5e67('0x3e')]);_0xe96678[_0x5e67('0x42')]=_['keys'](_0x35a55e['query']);_0xe96678['filters']=_[_0x5e67('0x44')](_0xe96678[_0x5e67('0x41')],_0xe96678[_0x5e67('0x42')]);_0x59c8a0['attributes']=_[_0x5e67('0x44')](_0xe96678[_0x5e67('0x41')],qs[_0x5e67('0x45')](_0x35a55e[_0x5e67('0x42')][_0x5e67('0x45')]));_0x59c8a0[_0x5e67('0x46')]=_0x59c8a0['attributes']['length']?_0x59c8a0['attributes']:_0xe96678[_0x5e67('0x41')];if(_0x35a55e[_0x5e67('0x42')][_0x5e67('0x54')]){_0x59c8a0[_0x5e67('0x4f')]=[{'all':!![]}];}_0x59c8a0=_['merge']({},_0x59c8a0,_0x35a55e[_0x5e67('0x4e')]);return db[_0x5e67('0x3d')][_0x5e67('0x55')](_0x59c8a0)['then'](handleEntityNotFound(_0x1a0664,null))[_0x5e67('0x38')](respondWithResult(_0x1a0664,null))['catch'](handleError(_0x1a0664,null));};exports[_0x5e67('0x37')]=function(_0x32ea56,_0x24df6f){if(_0x32ea56['body']['id']){delete _0x32ea56[_0x5e67('0x56')]['id'];}return db[_0x5e67('0x3d')][_0x5e67('0x55')]({'where':{'id':_0x32ea56['params']['id']}})['then'](handleEntityNotFound(_0x24df6f,null))[_0x5e67('0x38')](saveUpdates(_0x32ea56[_0x5e67('0x56')],null))['then'](respondWithResult(_0x24df6f,null))[_0x5e67('0x29')](handleError(_0x24df6f,null));};exports[_0x5e67('0x57')]=function(_0x3c7a28,_0x359efa){return db[_0x5e67('0x3d')]['find']({'where':{'id':_0x3c7a28[_0x5e67('0x52')]['id']}})['then'](handleEntityNotFound(_0x359efa,null))[_0x5e67('0x38')](removeEntity(_0x359efa,null))[_0x5e67('0x29')](handleError(_0x359efa,null));};exports['describe']=function(_0x51c995,_0x3a5c63){return db['FaxMessage'][_0x5e67('0x58')]()[_0x5e67('0x38')](respondWithResult(_0x3a5c63,null))['catch'](handleError(_0x3a5c63,null));};var interaction_log=require(_0x5e67('0x12'))(_0x5e67('0x59'));exports[_0x5e67('0x5a')]=function(_0x2c7b0a,_0x49e770,_0x52fe42){var _0x2e097e={'agent':{},'channel':_0x5e67('0x5b')};if(_0x2c7b0a[_0x5e67('0x56')]['id']){delete _0x2c7b0a[_0x5e67('0x56')]['id'];}_0x2c7b0a[_0x5e67('0x56')][_0x5e67('0x5c')]=!![];_0x2c7b0a['body']['readAt']=moment()[_0x5e67('0x5d')]('YYYY-MM-DD\x20HH:mm:ss');_0x2c7b0a['body'][_0x5e67('0x5e')]=_0x2c7b0a[_0x5e67('0x56')][_0x5e67('0x5e')]||_0x2c7b0a[_0x5e67('0x5f')]['id'];_0x2e097e[_0x5e67('0x60')]['id']=_0x2c7b0a[_0x5e67('0x56')][_0x5e67('0x5e')];return db[_0x5e67('0x3d')][_0x5e67('0x55')]({'where':{'id':_0x2c7b0a[_0x5e67('0x52')]['id'],'UserId':null}})[_0x5e67('0x38')](handleEntityNotFound(_0x49e770,null))[_0x5e67('0x38')](saveUpdates(_0x2c7b0a['body'],null))[_0x5e67('0x38')](function(_0x2b46cf){if(_0x2b46cf){_0x2e097e[_0x5e67('0x27')]=_0x2b46cf['get']({'plain':!![]});return db[_0x5e67('0x61')]['find']({'where':{'id':_0x2b46cf[_0x5e67('0x62')]}});}return null;})[_0x5e67('0x38')](handleEntityNotFound(_0x49e770,null))[_0x5e67('0x38')](function(_0x144b87){if(_0x144b87){return _0x144b87[_0x5e67('0x37')]({'UserId':_0x2c7b0a[_0x5e67('0x56')]['UserId'],'read1stAt':_[_0x5e67('0x63')](_0x144b87[_0x5e67('0x64')])?moment()[_0x5e67('0x5d')](_0x5e67('0x65')):undefined});}return null;})[_0x5e67('0x38')](function(_0x3efa07){if(_0x3efa07){_0x2e097e['interaction']=_0x3efa07['get']({'plain':!![]});interaction_log[_0x5e67('0x1f')](_0x5e67('0x66'),_0x2c7b0a[_0x5e67('0x5f')]['id'],_0x2c7b0a[_0x5e67('0x5f')][_0x5e67('0x39')],_0x2c7b0a[_0x5e67('0x5f')][_0x5e67('0x67')],_0x2e097e['interaction']['id'],_0x2c7b0a[_0x5e67('0x56')]?JSON['stringify'](_0x2c7b0a[_0x5e67('0x56')]):_0x5e67('0x68'));return respondWithRpcPromise(_0x5e67('0x69'),'acceptMessage',_0x2e097e);}return null;})['then'](function(_0x480a6c){var _0x58be4a='SELECT\x20*\x20FROM\x20cm_contacts\x20WHERE\x20id\x20=\x20'+_0x480a6c['message'][_0x5e67('0x6a')];return db[_0x5e67('0x6b')][_0x5e67('0x42')](_0x58be4a,{'type':db[_0x5e67('0x6c')][_0x5e67('0x6d')]['SELECT'],'raw':!![]})[_0x5e67('0x38')](function(_0x2d905f){return _0x2d905f;});})['then'](function(_0x745518){if(_0x745518){_0x2e097e['message'][_0x5e67('0x6e')]=_0x745518[0x0];if(!_0x2c7b0a[_0x5e67('0x56')][_0x5e67('0x5e')])return;return db[_0x5e67('0x6f')][_0x5e67('0x55')]({'where':{'id':_0x2c7b0a[_0x5e67('0x56')][_0x5e67('0x5e')],'role':_0x5e67('0x60')},'attributes':['id',_0x5e67('0x39'),_0x5e67('0x70'),'email','internal'],'raw':!![]});}return null;})['then'](function(_0x4b359b){if(!_0x4b359b)return null;_0x2e097e[_0x5e67('0x27')][_0x5e67('0x60')]=_0x4b359b;return _0x2e097e;})['then'](function(_0x361dc7){if(_0x361dc7){if(_0x2c7b0a[_0x5e67('0x56')]['manual']){_0x2e097e[_0x5e67('0x27')][_0x5e67('0x71')]=util['format'](_0x5e67('0x72'),_0x2c7b0a[_0x5e67('0x5f')][_0x5e67('0x39')]);_0x2e097e[_0x5e67('0x27')][_0x5e67('0x73')]=_0x2e097e[_0x5e67('0x73')];_0x2e097e['message'][_0x5e67('0x74')]=_0x2e097e[_0x5e67('0x73')];_0x2e097e[_0x5e67('0x27')][_0x5e67('0x75')]='accept';return respondWithRpcPromise('EventManager',_0x5e67('0x76'),{'event':_0x5e67('0x77'),'message':_0x2e097e['message']},client9002)[_0x5e67('0x38')](function(){return _0x2e097e;});}return _0x2e097e;}return null;})['then'](respondWithResult(_0x49e770,null))[_0x5e67('0x29')](handleError(_0x49e770,null));};var interaction_log=require('../../config/logger')(_0x5e67('0x59'));exports[_0x5e67('0x35')]=function(_0x34b8f6,_0x106bb6,_0x4cbd07){var _0x23229f={'agent':{},'channel':_0x5e67('0x5b')};if(_0x34b8f6[_0x5e67('0x56')]['id']){delete _0x34b8f6[_0x5e67('0x56')]['id'];}_0x34b8f6[_0x5e67('0x56')][_0x5e67('0x5e')]=_0x34b8f6[_0x5e67('0x56')]['UserId']||_0x34b8f6[_0x5e67('0x5f')]['id'];_0x23229f[_0x5e67('0x60')]['id']=_0x34b8f6['body'][_0x5e67('0x5e')];return db[_0x5e67('0x3d')][_0x5e67('0x55')]({'where':{'id':_0x34b8f6[_0x5e67('0x52')]['id'],'UserId':null}})[_0x5e67('0x38')](handleEntityNotFound(_0x106bb6,null))[_0x5e67('0x38')](function(_0x1154e2){if(_0x1154e2){_0x23229f[_0x5e67('0x27')]=_0x1154e2[_0x5e67('0x78')]({'plain':!![]});return db[_0x5e67('0x61')][_0x5e67('0x55')]({'where':{'id':_0x1154e2[_0x5e67('0x62')]}});}return null;})[_0x5e67('0x38')](handleEntityNotFound(_0x106bb6,null))[_0x5e67('0x38')](function(_0x586deb){if(_0x586deb){_0x23229f[_0x5e67('0x79')]=_0x586deb[_0x5e67('0x78')]({'plain':!![]});interaction_log['info'](_0x5e67('0x7a'),_0x34b8f6[_0x5e67('0x5f')]['id'],_0x34b8f6['user'][_0x5e67('0x39')],_0x34b8f6[_0x5e67('0x5f')]['role'],_0x23229f['interaction']['id'],_0x34b8f6[_0x5e67('0x56')]?JSON[_0x5e67('0x23')](_0x34b8f6[_0x5e67('0x56')]):_0x5e67('0x68'));return respondWithRpcPromise(_0x5e67('0x7b'),_0x5e67('0x7c'),_0x23229f);}return null;})[_0x5e67('0x38')](function(_0x1a53f5){var _0x2ffd4f=_0x5e67('0x7d')+_0x1a53f5['message'][_0x5e67('0x6a')];return db['sequelize'][_0x5e67('0x42')](_0x2ffd4f,{'type':db[_0x5e67('0x6c')][_0x5e67('0x6d')][_0x5e67('0x7e')],'raw':!![]})[_0x5e67('0x38')](function(_0x28686e){return _0x28686e;});})[_0x5e67('0x38')](function(_0x327e07){if(_0x327e07){_0x23229f[_0x5e67('0x27')][_0x5e67('0x6e')]=_0x327e07[0x0];if(!_0x34b8f6[_0x5e67('0x56')]['UserId'])return;return db[_0x5e67('0x6f')][_0x5e67('0x55')]({'where':{'id':_0x34b8f6[_0x5e67('0x56')][_0x5e67('0x5e')],'role':_0x5e67('0x60')},'attributes':['id','name',_0x5e67('0x70'),_0x5e67('0x7f'),_0x5e67('0x80')],'raw':!![]});}return null;})[_0x5e67('0x38')](function(_0x42151f){if(!_0x42151f)return null;_0x23229f[_0x5e67('0x27')][_0x5e67('0x60')]=_0x42151f;return _0x23229f;})[_0x5e67('0x38')](function(_0x2c89fc){if(_0x2c89fc){_0x2c89fc[_0x5e67('0x27')]['interface']=util[_0x5e67('0x5d')](_0x5e67('0x72'),_0x34b8f6['user']['name']);_0x2c89fc[_0x5e67('0x27')][_0x5e67('0x73')]=_0x23229f[_0x5e67('0x73')];_0x2c89fc[_0x5e67('0x27')]['motionChannel']=_0x23229f['channel'];_0x2c89fc[_0x5e67('0x27')][_0x5e67('0x75')]=_0x5e67('0x35');respondWithRpcPromise(_0x5e67('0x76'),_0x5e67('0x76'),{'event':'rejectmessage','message':_0x2c89fc[_0x5e67('0x27')]},client9002);return _0x23229f;}return null;})[_0x5e67('0x38')](respondWithResult(_0x106bb6,null))['catch'](handleError(_0x106bb6,null));};exports[_0x5e67('0x81')]=function(_0x3baf53,_0x2fc1ae){var _0x12af2d;return db[_0x5e67('0x3d')]['create'](_0x3baf53[_0x5e67('0x56')],{})[_0x5e67('0x38')](function(_0x394e6c){_0x12af2d=_0x394e6c;return db[_0x5e67('0x82')][_0x5e67('0x83')]({'where':{'id':_0x12af2d[_0x5e67('0x6a')]}});})[_0x5e67('0x38')](function(_0x2777b9){if(_[_0x5e67('0x63')](_0x2777b9)){return;}else{_0x12af2d[_0x5e67('0x5b')]=_0x2777b9[_0x5e67('0x5b')];return db[_0x5e67('0x84')][_0x5e67('0x83')]({'where':{'id':_0x12af2d[_0x5e67('0x85')]}});}})['then'](function(_0x417986){return respondWithRpcPromise(_0x5e67('0x86'),_0x5e67('0x86'),{'FaxAccountId':_[_0x5e67('0x63')](_0x3baf53[_0x5e67('0x56')])?undefined:_0x3baf53[_0x5e67('0x56')][_0x5e67('0x87')],'path':_[_0x5e67('0x63')](_0x417986)?undefined:util[_0x5e67('0x5d')](_0x5e67('0x88'),_0x417986['basename']),'fax':_[_0x5e67('0x63')](_0x12af2d[_0x5e67('0x5b')])?undefined:_0x12af2d[_0x5e67('0x5b')],'AttachmentId':_0x12af2d['AttachmentId']},client9002);})['then'](respondWithResult(_0x2fc1ae,0xc9))['catch'](handleError(_0x2fc1ae,null));};exports[_0x5e67('0x89')]=function(_0x4daef9,_0x44d638){var _0x1dc963=path['join'](config['root'],_0x5e67('0x8a'),_0x5e67('0x8b'),_0x5e67('0x8c'));return db[_0x5e67('0x3d')][_0x5e67('0x55')]({'where':{'id':_0x4daef9[_0x5e67('0x52')]['id']},'include':[{'model':db['Attachment'],'as':'Attachment'}]})['then'](handleEntityNotFound(_0x44d638,null))[_0x5e67('0x38')](function(_0x27dc9a){if(_0x27dc9a){return _0x44d638[_0x5e67('0x89')](path[_0x5e67('0x8d')](_0x1dc963,_0x27dc9a['Attachment'][_0x5e67('0x8e')]));}})[_0x5e67('0x29')](handleError(_0x44d638,null));}; \ No newline at end of file diff --git a/server/api/faxMessage/faxMessage.events.js b/server/api/faxMessage/faxMessage.events.js index ab56c0e..6581b1d 100644 --- a/server/api/faxMessage/faxMessage.events.js +++ b/server/api/faxMessage/faxMessage.events.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xb90a=['setMaxListeners','hasOwnProperty','hook','exports','events','../../mysqldb'];(function(_0x1f5371,_0x104ae8){var _0x1cb99f=function(_0xe1bca6){while(--_0xe1bca6){_0x1f5371['push'](_0x1f5371['shift']());}};_0x1cb99f(++_0x104ae8);}(_0xb90a,0x12a));var _0xab90=function(_0x20b206,_0x38c3bf){_0x20b206=_0x20b206-0x0;var _0x4d5420=_0xb90a[_0x20b206];return _0x4d5420;};'use strict';var EventEmitter=require(_0xab90('0x0'));var FaxMessage=require(_0xab90('0x1'))['db']['FaxMessage'];var FaxMessageEvents=new EventEmitter();FaxMessageEvents[_0xab90('0x2')](0x0);var events={'afterCreate':'save','afterUpdate':'update','afterDestroy':'remove'};function emitEvent(_0x5eaa1d){return function(_0x57672e,_0x3912db,_0x178509){FaxMessageEvents['emit'](_0x5eaa1d+':'+_0x57672e['id'],_0x57672e);FaxMessageEvents['emit'](_0x5eaa1d,_0x57672e);_0x178509(null);};}for(var e in events){if(events[_0xab90('0x3')](e)){var event=events[e];FaxMessage[_0xab90('0x4')](e,emitEvent(event));}}module[_0xab90('0x5')]=FaxMessageEvents; \ No newline at end of file +var _0x82c4=['FaxMessage','setMaxListeners','save','update','remove','emit','hook','exports','events','../../mysqldb'];(function(_0x17174c,_0x266797){var _0x38125a=function(_0x551221){while(--_0x551221){_0x17174c['push'](_0x17174c['shift']());}};_0x38125a(++_0x266797);}(_0x82c4,0x1ca));var _0x482c=function(_0x34596a,_0x4f5372){_0x34596a=_0x34596a-0x0;var _0x1695ec=_0x82c4[_0x34596a];return _0x1695ec;};'use strict';var EventEmitter=require(_0x482c('0x0'));var FaxMessage=require(_0x482c('0x1'))['db'][_0x482c('0x2')];var FaxMessageEvents=new EventEmitter();FaxMessageEvents[_0x482c('0x3')](0x0);var events={'afterCreate':_0x482c('0x4'),'afterUpdate':_0x482c('0x5'),'afterDestroy':_0x482c('0x6')};function emitEvent(_0x56de13){return function(_0x16b0f8,_0x5f4dee,_0x4556c8){FaxMessageEvents['emit'](_0x56de13+':'+_0x16b0f8['id'],_0x16b0f8);FaxMessageEvents[_0x482c('0x7')](_0x56de13,_0x16b0f8);_0x4556c8(null);};}for(var e in events){if(events['hasOwnProperty'](e)){var event=events[e];FaxMessage[_0x482c('0x8')](e,emitEvent(event));}}module[_0x482c('0x9')]=FaxMessageEvents; \ No newline at end of file diff --git a/server/api/faxMessage/faxMessage.model.js b/server/api/faxMessage/faxMessage.model.js index 3a08627..0a7644d 100644 --- a/server/api/faxMessage/faxMessage.model.js +++ b/server/api/faxMessage/faxMessage.model.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xdd00=['lodash','util','../../config/logger','api','moment','bluebird','./faxMessage.attributes','exports','define','FaxMessage','fax_messages','body','FULLTEXT','models','get','direction','toLowerCase','secret','isNil','FaxInteraction','findOne','FaxInteractionId','then','createdAt','error','utf8mb4','utf8mb4_unicode_ci'];(function(_0x4ee584,_0xeb3608){var _0x4d0d29=function(_0x2a8511){while(--_0x2a8511){_0x4ee584['push'](_0x4ee584['shift']());}};_0x4d0d29(++_0xeb3608);}(_0xdd00,0x17a));var _0x0dd0=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0xdd00[_0x3dd15e];return _0x231fd0;};'use strict';var _=require(_0x0dd0('0x0'));var util=require(_0x0dd0('0x1'));var logger=require(_0x0dd0('0x2'))(_0x0dd0('0x3'));var moment=require(_0x0dd0('0x4'));var BPromise=require(_0x0dd0('0x5'));var rp=require('request-promise');var fs=require('fs');var path=require('path');var rimraf=require('rimraf');var config=require('../../config/environment');var attributes=require(_0x0dd0('0x6'));module[_0x0dd0('0x7')]=function(_0x5efdda,_0x37c807){return _0x5efdda[_0x0dd0('0x8')](_0x0dd0('0x9'),attributes,{'tableName':_0x0dd0('0xa'),'paranoid':![],'indexes':[{'name':'fti_fax_messages','fields':[_0x0dd0('0xb')],'type':_0x0dd0('0xc')}],'timestamps':!![],'hooks':{'afterCreate':function(_0x5bfc28,_0x2e02ed,_0xe0ed93){var _0x4faee8=_0x5efdda[_0x0dd0('0xd')];var _0x4a2a00=_0x5bfc28[_0x0dd0('0xe')]({'plain':!![]});if(_0x4a2a00['direction']['toLowerCase']()==='in'||_0x4a2a00[_0x0dd0('0xf')][_0x0dd0('0x10')]()==='out'&&!_0x4a2a00[_0x0dd0('0x11')]&&!_[_0x0dd0('0x12')](_0x4a2a00['UserId'])){_0x4faee8[_0x0dd0('0x13')][_0x0dd0('0x14')]({'where':{'id':_0x4a2a00[_0x0dd0('0x15')]}})[_0x0dd0('0x16')](function(_0x270695){if(_0x270695){_0x270695['update']({'lastMsgAt':_0x4a2a00[_0x0dd0('0x17')],'lastMsgDirection':_0x4a2a00[_0x0dd0('0xf')][_0x0dd0('0x10')]()});}})['catch'](function(_0x3cb820){console[_0x0dd0('0x18')](_0x3cb820);});}_0xe0ed93();}},'charset':_0x0dd0('0x19'),'collate':_0x0dd0('0x1a')});}; \ No newline at end of file +var _0xa884=['toLowerCase','secret','isNil','FaxInteraction','findOne','FaxInteractionId','then','update','createdAt','catch','error','utf8mb4','utf8mb4_unicode_ci','lodash','util','api','moment','bluebird','request-promise','path','rimraf','../../config/environment','exports','define','FaxMessage','fax_messages','fti_fax_messages','body','FULLTEXT','models','get','direction'];(function(_0x2910c5,_0x143843){var _0x3c94de=function(_0x378062){while(--_0x378062){_0x2910c5['push'](_0x2910c5['shift']());}};_0x3c94de(++_0x143843);}(_0xa884,0x1ed));var _0x4a88=function(_0xb99421,_0xaab133){_0xb99421=_0xb99421-0x0;var _0x4b3ec7=_0xa884[_0xb99421];return _0x4b3ec7;};'use strict';var _=require(_0x4a88('0x0'));var util=require(_0x4a88('0x1'));var logger=require('../../config/logger')(_0x4a88('0x2'));var moment=require(_0x4a88('0x3'));var BPromise=require(_0x4a88('0x4'));var rp=require(_0x4a88('0x5'));var fs=require('fs');var path=require(_0x4a88('0x6'));var rimraf=require(_0x4a88('0x7'));var config=require(_0x4a88('0x8'));var attributes=require('./faxMessage.attributes');module[_0x4a88('0x9')]=function(_0x1150be,_0x5a8330){return _0x1150be[_0x4a88('0xa')](_0x4a88('0xb'),attributes,{'tableName':_0x4a88('0xc'),'paranoid':![],'indexes':[{'name':_0x4a88('0xd'),'fields':[_0x4a88('0xe')],'type':_0x4a88('0xf')}],'timestamps':!![],'hooks':{'afterCreate':function(_0x11bb63,_0x5e61ed,_0x33dd86){var _0x1f956a=_0x1150be[_0x4a88('0x10')];var _0x2d6615=_0x11bb63[_0x4a88('0x11')]({'plain':!![]});if(_0x2d6615[_0x4a88('0x12')][_0x4a88('0x13')]()==='in'||_0x2d6615[_0x4a88('0x12')][_0x4a88('0x13')]()==='out'&&!_0x2d6615[_0x4a88('0x14')]&&!_[_0x4a88('0x15')](_0x2d6615['UserId'])){_0x1f956a[_0x4a88('0x16')][_0x4a88('0x17')]({'where':{'id':_0x2d6615[_0x4a88('0x18')]}})[_0x4a88('0x19')](function(_0x316be2){if(_0x316be2){_0x316be2[_0x4a88('0x1a')]({'lastMsgAt':_0x2d6615[_0x4a88('0x1b')],'lastMsgDirection':_0x2d6615[_0x4a88('0x12')][_0x4a88('0x13')]()});}})[_0x4a88('0x1c')](function(_0x271195){console[_0x4a88('0x1d')](_0x271195);});}_0x33dd86();}},'charset':_0x4a88('0x1e'),'collate':_0x4a88('0x1f')});}; \ No newline at end of file diff --git a/server/api/faxMessage/faxMessage.rpc.js b/server/api/faxMessage/faxMessage.rpc.js index a4dada6..e668804 100644 --- a/server/api/faxMessage/faxMessage.rpc.js +++ b/server/api/faxMessage/faxMessage.rpc.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x6aa7=['redis','defaults','socket.io-emitter','./faxMessage.socket','request','then','info','FaxMessage,\x20%s,\x20%s','debug','request\x20sent','stringify','error','code','message','result','CreateFaxMessage','FaxMessage','create','options','raw','catch','update','body','attributes','limit','UpdateFaxMessage','lodash','moment','bluebird','randomstring','ioredis','../../config/utils','../../config/logger','rpc','client'];(function(_0x3f151c,_0x49fec5){var _0x3b3a0=function(_0x44f2c6){while(--_0x44f2c6){_0x3f151c['push'](_0x3f151c['shift']());}};_0x3b3a0(++_0x49fec5);}(_0x6aa7,0x178));var _0x76aa=function(_0x2fbdf3,_0x8705e2){_0x2fbdf3=_0x2fbdf3-0x0;var _0x840c1b=_0x6aa7[_0x2fbdf3];return _0x840c1b;};'use strict';var _=require(_0x76aa('0x0'));var util=require('util');var moment=require(_0x76aa('0x1'));var BPromise=require(_0x76aa('0x2'));var rs=require(_0x76aa('0x3'));var fs=require('fs');var Redis=require(_0x76aa('0x4'));var db=require('../../mysqldb')['db'];var utils=require(_0x76aa('0x5'));var logger=require(_0x76aa('0x6'))(_0x76aa('0x7'));var config=require('../../config/environment');var jayson=require('jayson/promise');var client=jayson[_0x76aa('0x8')]['http']({'port':0x232a});config[_0x76aa('0x9')]=_[_0x76aa('0xa')](config[_0x76aa('0x9')],{'host':'localhost','port':0x18eb});var socket=require(_0x76aa('0xb'))(new Redis(config[_0x76aa('0x9')]));require(_0x76aa('0xc'))['register'](socket);function respondWithRpcPromise(_0xcd99aa,_0x25856d,_0x41643a){return new BPromise(function(_0x16cb50,_0x37f1ab){return client[_0x76aa('0xd')](_0xcd99aa,_0x41643a)[_0x76aa('0xe')](function(_0x8dc35c){logger[_0x76aa('0xf')](_0x76aa('0x10'),_0x25856d,'request\x20sent');logger[_0x76aa('0x11')]('FaxMessage,\x20%s,\x20%s,\x20%s',_0x25856d,_0x76aa('0x12'),JSON[_0x76aa('0x13')](_0x8dc35c));if(_0x8dc35c[_0x76aa('0x14')]){if(_0x8dc35c[_0x76aa('0x14')][_0x76aa('0x15')]===0x1f4){logger['error']('FaxMessage,\x20%s,\x20%s',_0x25856d,_0x8dc35c[_0x76aa('0x14')]['message']);return _0x37f1ab(_0x8dc35c[_0x76aa('0x14')][_0x76aa('0x16')]);}logger['error'](_0x76aa('0x10'),_0x25856d,_0x8dc35c['error'][_0x76aa('0x16')]);return _0x16cb50(_0x8dc35c['error'][_0x76aa('0x16')]);}else{logger[_0x76aa('0xf')](_0x76aa('0x10'),_0x25856d,_0x76aa('0x12'));_0x16cb50(_0x8dc35c[_0x76aa('0x17')][_0x76aa('0x16')]);}})['catch'](function(_0x5d6202){logger[_0x76aa('0x14')](_0x76aa('0x10'),_0x25856d,_0x5d6202);_0x37f1ab(_0x5d6202);});});}exports[_0x76aa('0x18')]=function(_0x15b931){var _0x15109b=this;return new Promise(function(_0x191560,_0x19af92){return db[_0x76aa('0x19')][_0x76aa('0x1a')](_0x15b931['body'],{'raw':_0x15b931[_0x76aa('0x1b')]?_0x15b931[_0x76aa('0x1b')][_0x76aa('0x1c')]===undefined?!![]:![]:!![]})['then'](function(_0x41463a){logger[_0x76aa('0xf')](_0x76aa('0x18'),_0x15b931);logger[_0x76aa('0x11')](_0x76aa('0x18'),_0x15b931,JSON[_0x76aa('0x13')](_0x41463a));_0x191560(_0x41463a);})[_0x76aa('0x1d')](function(_0x3363b3){logger[_0x76aa('0x14')](_0x76aa('0x18'),_0x3363b3[_0x76aa('0x16')],_0x15b931);_0x19af92(_0x15109b[_0x76aa('0x14')](0x1f4,_0x3363b3[_0x76aa('0x16')]));});});};exports['UpdateFaxMessage']=function(_0xb5e8a9){var _0x1d6d15=this;return new Promise(function(_0x25c614,_0x2e7ab4){return db[_0x76aa('0x19')][_0x76aa('0x1e')](_0xb5e8a9[_0x76aa('0x1f')],{'raw':_0xb5e8a9[_0x76aa('0x1b')]?_0xb5e8a9[_0x76aa('0x1b')][_0x76aa('0x1c')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0xb5e8a9['options']?_0xb5e8a9[_0x76aa('0x1b')]['where']||null:null,'attributes':_0xb5e8a9[_0x76aa('0x1b')]?_0xb5e8a9[_0x76aa('0x1b')][_0x76aa('0x20')]||null:null,'limit':_0xb5e8a9[_0x76aa('0x1b')]?_0xb5e8a9[_0x76aa('0x1b')][_0x76aa('0x21')]||null:null})[_0x76aa('0xe')](function(_0x3827ec){logger[_0x76aa('0xf')](_0x76aa('0x22'),_0xb5e8a9);logger['debug'](_0x76aa('0x22'),_0xb5e8a9,JSON[_0x76aa('0x13')](_0x3827ec));_0x25c614(_0x3827ec);})[_0x76aa('0x1d')](function(_0x928ccf){logger[_0x76aa('0x14')](_0x76aa('0x22'),_0x928ccf[_0x76aa('0x16')],_0xb5e8a9);_0x2e7ab4(_0x1d6d15['error'](0x1f4,_0x928ccf[_0x76aa('0x16')]));});});}; \ No newline at end of file +var _0x8d0e=['http','redis','defaults','localhost','socket.io-emitter','./faxMessage.socket','request','then','info','FaxMessage,\x20%s,\x20%s','request\x20sent','FaxMessage,\x20%s,\x20%s,\x20%s','error','message','result','catch','CreateFaxMessage','FaxMessage','create','body','options','raw','debug','UpdateFaxMessage','update','where','attributes','lodash','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','../../config/environment'];(function(_0x2f1753,_0x58ca9b){var _0x4fb12d=function(_0x55e8fd){while(--_0x55e8fd){_0x2f1753['push'](_0x2f1753['shift']());}};_0x4fb12d(++_0x58ca9b);}(_0x8d0e,0x1d7));var _0xe8d0=function(_0x448b42,_0x95ec01){_0x448b42=_0x448b42-0x0;var _0x377ea2=_0x8d0e[_0x448b42];return _0x377ea2;};'use strict';var _=require(_0xe8d0('0x0'));var util=require(_0xe8d0('0x1'));var moment=require(_0xe8d0('0x2'));var BPromise=require(_0xe8d0('0x3'));var rs=require(_0xe8d0('0x4'));var fs=require('fs');var Redis=require(_0xe8d0('0x5'));var db=require(_0xe8d0('0x6'))['db'];var utils=require(_0xe8d0('0x7'));var logger=require(_0xe8d0('0x8'))('rpc');var config=require(_0xe8d0('0x9'));var jayson=require('jayson/promise');var client=jayson['client'][_0xe8d0('0xa')]({'port':0x232a});config[_0xe8d0('0xb')]=_[_0xe8d0('0xc')](config[_0xe8d0('0xb')],{'host':_0xe8d0('0xd'),'port':0x18eb});var socket=require(_0xe8d0('0xe'))(new Redis(config[_0xe8d0('0xb')]));require(_0xe8d0('0xf'))['register'](socket);function respondWithRpcPromise(_0x10e56c,_0x19c3d0,_0x463159){return new BPromise(function(_0x599bc3,_0x580aab){return client[_0xe8d0('0x10')](_0x10e56c,_0x463159)[_0xe8d0('0x11')](function(_0x3da047){logger[_0xe8d0('0x12')](_0xe8d0('0x13'),_0x19c3d0,_0xe8d0('0x14'));logger['debug'](_0xe8d0('0x15'),_0x19c3d0,_0xe8d0('0x14'),JSON['stringify'](_0x3da047));if(_0x3da047[_0xe8d0('0x16')]){if(_0x3da047['error']['code']===0x1f4){logger[_0xe8d0('0x16')](_0xe8d0('0x13'),_0x19c3d0,_0x3da047[_0xe8d0('0x16')][_0xe8d0('0x17')]);return _0x580aab(_0x3da047[_0xe8d0('0x16')][_0xe8d0('0x17')]);}logger['error'](_0xe8d0('0x13'),_0x19c3d0,_0x3da047['error'][_0xe8d0('0x17')]);return _0x599bc3(_0x3da047[_0xe8d0('0x16')][_0xe8d0('0x17')]);}else{logger['info']('FaxMessage,\x20%s,\x20%s',_0x19c3d0,'request\x20sent');_0x599bc3(_0x3da047[_0xe8d0('0x18')][_0xe8d0('0x17')]);}})[_0xe8d0('0x19')](function(_0x44bbe4){logger[_0xe8d0('0x16')]('FaxMessage,\x20%s,\x20%s',_0x19c3d0,_0x44bbe4);_0x580aab(_0x44bbe4);});});}exports[_0xe8d0('0x1a')]=function(_0x12ebf4){var _0x524b00=this;return new Promise(function(_0x5ce284,_0x554402){return db[_0xe8d0('0x1b')][_0xe8d0('0x1c')](_0x12ebf4[_0xe8d0('0x1d')],{'raw':_0x12ebf4[_0xe8d0('0x1e')]?_0x12ebf4[_0xe8d0('0x1e')][_0xe8d0('0x1f')]===undefined?!![]:![]:!![]})[_0xe8d0('0x11')](function(_0x28a6b5){logger[_0xe8d0('0x12')]('CreateFaxMessage',_0x12ebf4);logger[_0xe8d0('0x20')](_0xe8d0('0x1a'),_0x12ebf4,JSON['stringify'](_0x28a6b5));_0x5ce284(_0x28a6b5);})[_0xe8d0('0x19')](function(_0x2e69d1){logger[_0xe8d0('0x16')](_0xe8d0('0x1a'),_0x2e69d1[_0xe8d0('0x17')],_0x12ebf4);_0x554402(_0x524b00[_0xe8d0('0x16')](0x1f4,_0x2e69d1[_0xe8d0('0x17')]));});});};exports[_0xe8d0('0x21')]=function(_0xfa3527){var _0x2dee67=this;return new Promise(function(_0x264de4,_0x539548){return db[_0xe8d0('0x1b')][_0xe8d0('0x22')](_0xfa3527[_0xe8d0('0x1d')],{'raw':_0xfa3527['options']?_0xfa3527[_0xe8d0('0x1e')][_0xe8d0('0x1f')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0xfa3527['options']?_0xfa3527[_0xe8d0('0x1e')][_0xe8d0('0x23')]||null:null,'attributes':_0xfa3527[_0xe8d0('0x1e')]?_0xfa3527[_0xe8d0('0x1e')][_0xe8d0('0x24')]||null:null,'limit':_0xfa3527['options']?_0xfa3527[_0xe8d0('0x1e')]['limit']||null:null})['then'](function(_0x50ad3c){logger[_0xe8d0('0x12')](_0xe8d0('0x21'),_0xfa3527);logger[_0xe8d0('0x20')]('UpdateFaxMessage',_0xfa3527,JSON['stringify'](_0x50ad3c));_0x264de4(_0x50ad3c);})[_0xe8d0('0x19')](function(_0x551999){logger[_0xe8d0('0x16')](_0xe8d0('0x21'),_0x551999[_0xe8d0('0x17')],_0xfa3527);_0x539548(_0x2dee67[_0xe8d0('0x16')](0x1f4,_0x551999[_0xe8d0('0x17')]));});});}; \ No newline at end of file diff --git a/server/api/faxMessage/faxMessage.socket.js b/server/api/faxMessage/faxMessage.socket.js index b1e05a9..6efb4b9 100644 --- a/server/api/faxMessage/faxMessage.socket.js +++ b/server/api/faxMessage/faxMessage.socket.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x9cff=['remove','update','removeListener','register','./faxMessage.events','save'];(function(_0x4d85ff,_0x365f5f){var _0x5d5fc2=function(_0x358866){while(--_0x358866){_0x4d85ff['push'](_0x4d85ff['shift']());}};_0x5d5fc2(++_0x365f5f);}(_0x9cff,0x10c));var _0xf9cf=function(_0x34c89d,_0xd89c5c){_0x34c89d=_0x34c89d-0x0;var _0x18d57e=_0x9cff[_0x34c89d];return _0x18d57e;};'use strict';var FaxMessageEvents=require(_0xf9cf('0x0'));var events=[_0xf9cf('0x1'),_0xf9cf('0x2'),_0xf9cf('0x3')];function createListener(_0x5b0410,_0x3f4582){return function(_0x56460b){_0x3f4582['emit'](_0x5b0410,_0x56460b);};}function removeListener(_0x4bc825,_0x5b226a){return function(){FaxMessageEvents[_0xf9cf('0x4')](_0x4bc825,_0x5b226a);};}exports[_0xf9cf('0x5')]=function(_0x585044){for(var _0x4de7f8=0x0,_0x1851e4=events['length'];_0x4de7f8<_0x1851e4;_0x4de7f8++){var _0x3f863d=events[_0x4de7f8];var _0x112f49=createListener('faxMessage:'+_0x3f863d,_0x585044);FaxMessageEvents['on'](_0x3f863d,_0x112f49);}}; \ No newline at end of file +var _0x0313=['length','./faxMessage.events','update','emit'];(function(_0x4c97d8,_0x3baab4){var _0xf4e6e=function(_0x12ac40){while(--_0x12ac40){_0x4c97d8['push'](_0x4c97d8['shift']());}};_0xf4e6e(++_0x3baab4);}(_0x0313,0x1ad));var _0x3031=function(_0x54c0b6,_0xb7f0e8){_0x54c0b6=_0x54c0b6-0x0;var _0x497fbb=_0x0313[_0x54c0b6];return _0x497fbb;};'use strict';var FaxMessageEvents=require(_0x3031('0x0'));var events=['save','remove',_0x3031('0x1')];function createListener(_0x546c7a,_0x496de7){return function(_0x18e8ee){_0x496de7[_0x3031('0x2')](_0x546c7a,_0x18e8ee);};}function removeListener(_0x115f46,_0x56937c){return function(){FaxMessageEvents['removeListener'](_0x115f46,_0x56937c);};}exports['register']=function(_0x1e7a26){for(var _0x23750b=0x0,_0x1a826d=events[_0x3031('0x3')];_0x23750b<_0x1a826d;_0x23750b++){var _0x35e1d6=events[_0x23750b];var _0x2fd0c8=createListener('faxMessage:'+_0x35e1d6,_0x1e7a26);FaxMessageEvents['on'](_0x35e1d6,_0x2fd0c8);}}; \ No newline at end of file diff --git a/server/api/faxMessage/index.js b/server/api/faxMessage/index.js index f2db72f..aa4b061 100644 --- a/server/api/faxMessage/index.js +++ b/server/api/faxMessage/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x9354=['describe','/:id','show','/:id/download','download','post','fax','put','update','/:id/accept','accept','/:id/reject','reject','delete','destroy','util','path','express','Router','fs-extra','../../components/auth/service','../../config/environment','./faxMessage.controller','get','isAuthenticated','index','/describe'];(function(_0x1a9f77,_0x54282c){var _0x39168a=function(_0x19b8e2){while(--_0x19b8e2){_0x1a9f77['push'](_0x1a9f77['shift']());}};_0x39168a(++_0x54282c);}(_0x9354,0x96));var _0x4935=function(_0x5b34c0,_0x3ad403){_0x5b34c0=_0x5b34c0-0x0;var _0x242bd3=_0x9354[_0x5b34c0];return _0x242bd3;};'use strict';var multer=require('multer');var util=require(_0x4935('0x0'));var path=require(_0x4935('0x1'));var timeout=require('connect-timeout');var express=require(_0x4935('0x2'));var router=express[_0x4935('0x3')]();var fs_extra=require(_0x4935('0x4'));var auth=require(_0x4935('0x5'));var interaction=require('../../components/interaction/service');var config=require(_0x4935('0x6'));var controller=require(_0x4935('0x7'));router[_0x4935('0x8')]('/',auth[_0x4935('0x9')](),controller[_0x4935('0xa')]);router[_0x4935('0x8')](_0x4935('0xb'),auth[_0x4935('0x9')](),controller[_0x4935('0xc')]);router['get'](_0x4935('0xd'),auth['isAuthenticated'](),controller[_0x4935('0xe')]);router[_0x4935('0x8')](_0x4935('0xf'),auth[_0x4935('0x9')](),controller[_0x4935('0x10')]);router[_0x4935('0x11')]('/',auth['isAuthenticated'](),interaction['tracked'](_0x4935('0x12'),'faxmessage:create'),controller['create']);router[_0x4935('0x13')](_0x4935('0xd'),auth[_0x4935('0x9')](),controller[_0x4935('0x14')]);router[_0x4935('0x13')](_0x4935('0x15'),auth[_0x4935('0x9')](),controller[_0x4935('0x16')]);router[_0x4935('0x13')](_0x4935('0x17'),auth[_0x4935('0x9')](),controller[_0x4935('0x18')]);router[_0x4935('0x19')](_0x4935('0xd'),auth[_0x4935('0x9')](),controller[_0x4935('0x1a')]);module['exports']=router; \ No newline at end of file +var _0x2e54=['download','post','fax','faxmessage:create','put','update','/:id/accept','accept','/:id/reject','reject','delete','destroy','exports','multer','connect-timeout','express','Router','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','get','isAuthenticated','index','/describe','describe','/:id','show','/:id/download'];(function(_0x3fb030,_0x12aebe){var _0xd6899b=function(_0x327646){while(--_0x327646){_0x3fb030['push'](_0x3fb030['shift']());}};_0xd6899b(++_0x12aebe);}(_0x2e54,0x1dd));var _0x42e5=function(_0x5f145d,_0x511bcc){_0x5f145d=_0x5f145d-0x0;var _0x1aa85b=_0x2e54[_0x5f145d];return _0x1aa85b;};'use strict';var multer=require(_0x42e5('0x0'));var util=require('util');var path=require('path');var timeout=require(_0x42e5('0x1'));var express=require(_0x42e5('0x2'));var router=express[_0x42e5('0x3')]();var fs_extra=require(_0x42e5('0x4'));var auth=require(_0x42e5('0x5'));var interaction=require(_0x42e5('0x6'));var config=require(_0x42e5('0x7'));var controller=require('./faxMessage.controller');router[_0x42e5('0x8')]('/',auth[_0x42e5('0x9')](),controller[_0x42e5('0xa')]);router['get'](_0x42e5('0xb'),auth['isAuthenticated'](),controller[_0x42e5('0xc')]);router['get'](_0x42e5('0xd'),auth[_0x42e5('0x9')](),controller[_0x42e5('0xe')]);router[_0x42e5('0x8')](_0x42e5('0xf'),auth[_0x42e5('0x9')](),controller[_0x42e5('0x10')]);router[_0x42e5('0x11')]('/',auth[_0x42e5('0x9')](),interaction['tracked'](_0x42e5('0x12'),_0x42e5('0x13')),controller['create']);router[_0x42e5('0x14')](_0x42e5('0xd'),auth[_0x42e5('0x9')](),controller[_0x42e5('0x15')]);router[_0x42e5('0x14')](_0x42e5('0x16'),auth[_0x42e5('0x9')](),controller[_0x42e5('0x17')]);router[_0x42e5('0x14')](_0x42e5('0x18'),auth['isAuthenticated'](),controller[_0x42e5('0x19')]);router[_0x42e5('0x1a')](_0x42e5('0xd'),auth[_0x42e5('0x9')](),controller[_0x42e5('0x1b')]);module[_0x42e5('0x1c')]=router; \ No newline at end of file diff --git a/server/api/faxQueue/faxQueue.attributes.js b/server/api/faxQueue/faxQueue.attributes.js index 96f2a1f..70f2098 100644 --- a/server/api/faxQueue/faxQueue.attributes.js +++ b/server/api/faxQueue/faxQueue.attributes.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x7286=['beepall','INTEGER','sequelize','exports','STRING','name','ENUM','rrmemory'];(function(_0x316507,_0x4201b7){var _0x12f65c=function(_0x3880ec){while(--_0x3880ec){_0x316507['push'](_0x316507['shift']());}};_0x12f65c(++_0x4201b7);}(_0x7286,0xca));var _0x6728=function(_0x49b207,_0x408ade){_0x49b207=_0x49b207-0x0;var _0x2dc8fa=_0x7286[_0x49b207];return _0x2dc8fa;};'use strict';var Sequelize=require(_0x6728('0x0'));module[_0x6728('0x1')]={'name':{'type':Sequelize[_0x6728('0x2')],'unique':_0x6728('0x3'),'allowNull':![],'validate':{'notEmpty':!![],'is':/^[A-Za-z0-9\.\_]+$/i}},'description':{'type':Sequelize[_0x6728('0x2')]},'timeout':{'type':Sequelize['INTEGER'],'allowNull':![],'validate':{'min':0x1,'max':0x20c49b}},'strategy':{'type':Sequelize[_0x6728('0x4')](_0x6728('0x5'),_0x6728('0x6'),'roundrobin'),'allowNull':![]},'lastAgent':{'type':Sequelize[_0x6728('0x7')],'defaultValue':0x0}}; \ No newline at end of file +var _0x6dc9=['name','ENUM','beepall','roundrobin','INTEGER','exports','STRING'];(function(_0x2ae0fc,_0x29a650){var _0xb1e543=function(_0x41cf0a){while(--_0x41cf0a){_0x2ae0fc['push'](_0x2ae0fc['shift']());}};_0xb1e543(++_0x29a650);}(_0x6dc9,0x140));var _0x96dc=function(_0x109dbd,_0x290d2b){_0x109dbd=_0x109dbd-0x0;var _0x395644=_0x6dc9[_0x109dbd];return _0x395644;};'use strict';var Sequelize=require('sequelize');module[_0x96dc('0x0')]={'name':{'type':Sequelize[_0x96dc('0x1')],'unique':_0x96dc('0x2'),'allowNull':![],'validate':{'notEmpty':!![],'is':/^[A-Za-z0-9\.\_]+$/i}},'description':{'type':Sequelize['STRING']},'timeout':{'type':Sequelize['INTEGER'],'allowNull':![],'validate':{'min':0x1,'max':0x20c49b}},'strategy':{'type':Sequelize[_0x96dc('0x3')]('rrmemory',_0x96dc('0x4'),_0x96dc('0x5')),'allowNull':![]},'lastAgent':{'type':Sequelize[_0x96dc('0x6')],'defaultValue':0x0}}; \ No newline at end of file diff --git a/server/api/faxQueue/faxQueue.controller.js b/server/api/faxQueue/faxQueue.controller.js index e5f8c88..1e8f344 100644 --- a/server/api/faxQueue/faxQueue.controller.js +++ b/server/api/faxQueue/faxQueue.controller.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xa8be=['squel','crypto','jsforce','desk.js','to-csv','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','../../config/utils','../../config/license/util','redis','defaults','localhost','socket.io-emitter','./faxQueue.socket','register','status','end','json','offset','undefined','count','limit','Content-Range','apply','reject','save','then','FaxQueues','destroy','sendStatus','error','name','send','FaxQueue','rawAttributes','type','key','model','map','query','keys','filters','attributes','fields','length','hasOwnProperty','nolimit','sort','where','pick','filter','merge','VIRTUAL','options','include','findAll','show','params','intersection','includeAll','find','create','body','user','get','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','UserProfileSection','userProfileId','autoAssociation','UserProfileResource','catch','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','update','describe','getMembers','findOne','order','FaxQueueId','UserFaxQueue','User','findAndCountAll','UserId','agent','faxPause','createdAt','rows','format','%s/%s','SIP','getTeams','Team','addTeams','online','interface','flatMap','Agents','sequelize','transaction','each','findOrCreate','forEach','emit','removeTeams','ids','select','field','team_has_fax_queues','join','user_has_teams','FaxQueueId\x20=\x20?','clone','push','toString','TeamId','all','union','compact','value','isEmpty','removeAgents','userFaxQueue:remove','addAgents','omit','spread','isArray','getAgents','rimraf','zip-dir','request-promise','moment','mustache','util','sox','ejs','fs-extra','lodash'];(function(_0x5a5122,_0x2aca0f){var _0x45e3af=function(_0x4ceea3){while(--_0x4ceea3){_0x5a5122['push'](_0x5a5122['shift']());}};_0x45e3af(++_0x2aca0f);}(_0xa8be,0x114));var _0xea8b=function(_0x198b05,_0x47c7b1){_0x198b05=_0x198b05-0x0;var _0x1f3903=_0xa8be[_0x198b05];return _0x1f3903;};'use strict';var emlformat=require('eml-format');var rimraf=require(_0xea8b('0x0'));var zipdir=require(_0xea8b('0x1'));var jsonpatch=require('fast-json-patch');var rp=require(_0xea8b('0x2'));var moment=require(_0xea8b('0x3'));var BPromise=require('bluebird');var Mustache=require(_0xea8b('0x4'));var util=require(_0xea8b('0x5'));var path=require('path');var sox=require(_0xea8b('0x6'));var csv=require('to-csv');var ejs=require(_0xea8b('0x7'));var fs=require('fs');var fs_extra=require(_0xea8b('0x8'));var _=require(_0xea8b('0x9'));var squel=require(_0xea8b('0xa'));var crypto=require(_0xea8b('0xb'));var jsforce=require(_0xea8b('0xc'));var deskjs=require(_0xea8b('0xd'));var toCsv=require(_0xea8b('0xe'));var querystring=require(_0xea8b('0xf'));var Papa=require(_0xea8b('0x10'));var Redis=require(_0xea8b('0x11'));var authService=require(_0xea8b('0x12'));var qs=require(_0xea8b('0x13'));var as=require(_0xea8b('0x14'));var hardwareService=require(_0xea8b('0x15'));var logger=require(_0xea8b('0x16'))('api');var utils=require(_0xea8b('0x17'));var config=require('../../config/environment');var licenseUtil=require(_0xea8b('0x18'));var db=require('../../mysqldb')['db'];config[_0xea8b('0x19')]=_[_0xea8b('0x1a')](config[_0xea8b('0x19')],{'host':_0xea8b('0x1b'),'port':0x18eb});var socket=require(_0xea8b('0x1c'))(new Redis(config[_0xea8b('0x19')]));require(_0xea8b('0x1d'))[_0xea8b('0x1e')](socket);function respondWithStatusCode(_0x46c572,_0x5aea25){_0x5aea25=_0x5aea25||0xcc;return function(_0x2b0370){if(_0x2b0370){return _0x46c572['sendStatus'](_0x5aea25);}return _0x46c572[_0xea8b('0x1f')](_0x5aea25)[_0xea8b('0x20')]();};}function respondWithResult(_0x390561,_0xb4e56){_0xb4e56=_0xb4e56||0xc8;return function(_0x2a4f16){if(_0x2a4f16){return _0x390561[_0xea8b('0x1f')](_0xb4e56)[_0xea8b('0x21')](_0x2a4f16);}};}function respondWithFilteredResult(_0x15bf00,_0x3d4d2e){return function(_0x4a24ad){if(_0x4a24ad){var _0x2df4b6=typeof _0x3d4d2e[_0xea8b('0x22')]===_0xea8b('0x23')&&typeof _0x3d4d2e['limit']===_0xea8b('0x23');var _0x22701f=_0x4a24ad[_0xea8b('0x24')];var _0x169859=_0x2df4b6?0x0:_0x3d4d2e[_0xea8b('0x22')];var _0x531b10=_0x2df4b6?_0x4a24ad[_0xea8b('0x24')]:_0x3d4d2e[_0xea8b('0x22')]+_0x3d4d2e[_0xea8b('0x25')];var _0x641cfb;if(_0x531b10>=_0x22701f){_0x531b10=_0x22701f;_0x641cfb=0xc8;}else{_0x641cfb=0xce;}_0x15bf00['status'](_0x641cfb);return _0x15bf00['set'](_0xea8b('0x26'),_0x169859+'-'+_0x531b10+'/'+_0x22701f)[_0xea8b('0x21')](_0x4a24ad);}return null;};}function patchUpdates(_0x23b46d){return function(_0x4ca456){try{jsonpatch[_0xea8b('0x27')](_0x4ca456,_0x23b46d,!![]);}catch(_0x2585b4){return BPromise[_0xea8b('0x28')](_0x2585b4);}return _0x4ca456[_0xea8b('0x29')]();};}function saveUpdates(_0x43a67e,_0x3c660c){return function(_0x1ba48d){if(_0x1ba48d){return _0x1ba48d['update'](_0x43a67e)[_0xea8b('0x2a')](function(_0x22544b){return _0x22544b;});}return null;};}function removeEntity(_0x484708,_0x4a832f){return function(_0x33af72){if(_0x33af72){return _0x33af72['destroy']()[_0xea8b('0x2a')](function(){var _0x5c28bb=_0x33af72['get']({'plain':!![]});var _0x164e03=_0xea8b('0x2b');return db['UserProfileResource'][_0xea8b('0x2c')]({'where':{'type':_0x164e03,'resourceId':_0x5c28bb['id']}})[_0xea8b('0x2a')](function(){return _0x33af72;});})[_0xea8b('0x2a')](function(){_0x484708['status'](0xcc)[_0xea8b('0x20')]();});}};}function handleEntityNotFound(_0x10d011,_0x26ce8b){return function(_0x478d96){if(!_0x478d96){_0x10d011[_0xea8b('0x2d')](0x194);}return _0x478d96;};}function handleError(_0x459b0d,_0x41557a){_0x41557a=_0x41557a||0x1f4;return function(_0x42951f){logger[_0xea8b('0x2e')](_0x42951f['stack']);if(_0x42951f[_0xea8b('0x2f')]){delete _0x42951f[_0xea8b('0x2f')];}_0x459b0d['status'](_0x41557a)[_0xea8b('0x30')](_0x42951f);};}exports['index']=function(_0x410fb6,_0x36fb74){var _0x34b63b={},_0x497143={},_0x418bab={'count':0x0,'rows':[]};var _0x5b53db=_['map'](db[_0xea8b('0x31')][_0xea8b('0x32')],function(_0x26b96d){return{'name':_0x26b96d['fieldName'],'type':_0x26b96d[_0xea8b('0x33')][_0xea8b('0x34')]};});_0x497143[_0xea8b('0x35')]=_[_0xea8b('0x36')](_0x5b53db,_0xea8b('0x2f'));_0x497143[_0xea8b('0x37')]=_[_0xea8b('0x38')](_0x410fb6[_0xea8b('0x37')]);_0x497143[_0xea8b('0x39')]=_['intersection'](_0x497143[_0xea8b('0x35')],_0x497143['query']);_0x34b63b[_0xea8b('0x3a')]=_['intersection'](_0x497143[_0xea8b('0x35')],qs['fields'](_0x410fb6['query'][_0xea8b('0x3b')]));_0x34b63b['attributes']=_0x34b63b['attributes'][_0xea8b('0x3c')]?_0x34b63b[_0xea8b('0x3a')]:_0x497143[_0xea8b('0x35')];if(!_0x410fb6[_0xea8b('0x37')][_0xea8b('0x3d')](_0xea8b('0x3e'))){_0x34b63b[_0xea8b('0x25')]=qs['limit'](_0x410fb6['query'][_0xea8b('0x25')]);_0x34b63b[_0xea8b('0x22')]=qs['offset'](_0x410fb6[_0xea8b('0x37')][_0xea8b('0x22')]);}_0x34b63b['order']=qs[_0xea8b('0x3f')](_0x410fb6['query']['sort']);_0x34b63b[_0xea8b('0x40')]=qs[_0xea8b('0x39')](_[_0xea8b('0x41')](_0x410fb6[_0xea8b('0x37')],_0x497143[_0xea8b('0x39')]),_0x5b53db);if(_0x410fb6[_0xea8b('0x37')][_0xea8b('0x42')]){_0x34b63b[_0xea8b('0x40')]=_[_0xea8b('0x43')](_0x34b63b[_0xea8b('0x40')],{'$or':_['map'](_0x5b53db,function(_0x49cf20){if(_0x49cf20[_0xea8b('0x33')]!==_0xea8b('0x44')){var _0x11682d={};_0x11682d[_0x49cf20[_0xea8b('0x2f')]]={'$like':'%'+_0x410fb6['query'][_0xea8b('0x42')]+'%'};return _0x11682d;}})});}_0x34b63b=_[_0xea8b('0x43')]({},_0x34b63b,_0x410fb6[_0xea8b('0x45')]);var _0x1aadc3={'where':_0x34b63b[_0xea8b('0x40')]};return db[_0xea8b('0x31')]['count'](_0x1aadc3)['then'](function(_0x48ef90){_0x418bab['count']=_0x48ef90;if(_0x410fb6['query']['includeAll']){_0x34b63b[_0xea8b('0x46')]=[{'all':!![]}];}return db[_0xea8b('0x31')][_0xea8b('0x47')](_0x34b63b);})[_0xea8b('0x2a')](function(_0x52f008){_0x418bab['rows']=_0x52f008;return _0x418bab;})[_0xea8b('0x2a')](respondWithFilteredResult(_0x36fb74,_0x34b63b))['catch'](handleError(_0x36fb74,null));};exports[_0xea8b('0x48')]=function(_0x560df7,_0x45e084){var _0x4907b4={'raw':!![],'where':{'id':_0x560df7[_0xea8b('0x49')]['id']}},_0x50bae9={};_0x50bae9[_0xea8b('0x35')]=_[_0xea8b('0x38')](db[_0xea8b('0x31')][_0xea8b('0x32')]);_0x50bae9[_0xea8b('0x37')]=_[_0xea8b('0x38')](_0x560df7[_0xea8b('0x37')]);_0x50bae9['filters']=_[_0xea8b('0x4a')](_0x50bae9[_0xea8b('0x35')],_0x50bae9[_0xea8b('0x37')]);_0x4907b4[_0xea8b('0x3a')]=_[_0xea8b('0x4a')](_0x50bae9['model'],qs['fields'](_0x560df7[_0xea8b('0x37')]['fields']));_0x4907b4['attributes']=_0x4907b4[_0xea8b('0x3a')]['length']?_0x4907b4[_0xea8b('0x3a')]:_0x50bae9['model'];if(_0x560df7[_0xea8b('0x37')][_0xea8b('0x4b')]){_0x4907b4[_0xea8b('0x46')]=[{'all':!![]}];}_0x4907b4=_[_0xea8b('0x43')]({},_0x4907b4,_0x560df7['options']);return db[_0xea8b('0x31')][_0xea8b('0x4c')](_0x4907b4)[_0xea8b('0x2a')](handleEntityNotFound(_0x45e084,null))[_0xea8b('0x2a')](respondWithResult(_0x45e084,null))['catch'](handleError(_0x45e084,null));};exports[_0xea8b('0x4d')]=function(_0x22255a,_0x302218){return db['FaxQueue'][_0xea8b('0x4d')](_0x22255a[_0xea8b('0x4e')],{})[_0xea8b('0x2a')](function(_0x18473b){var _0x4f7baa=_0x22255a[_0xea8b('0x4f')][_0xea8b('0x50')]({'plain':!![]});if(!_0x4f7baa)throw new Error(_0xea8b('0x51'));if(_0x4f7baa[_0xea8b('0x52')]===_0xea8b('0x4f')){var _0xd9eef3=_0x18473b[_0xea8b('0x50')]({'plain':!![]});var _0x14fb20=_0xea8b('0x2b');return db[_0xea8b('0x53')][_0xea8b('0x4c')]({'where':{'name':_0x14fb20,'userProfileId':_0x4f7baa[_0xea8b('0x54')]},'raw':!![]})[_0xea8b('0x2a')](function(_0x3c9596){if(_0x3c9596&&_0x3c9596[_0xea8b('0x55')]===0x0){return db[_0xea8b('0x56')]['create']({'name':_0xd9eef3['name'],'resourceId':_0xd9eef3['id'],'type':_0x3c9596[_0xea8b('0x2f')],'sectionId':_0x3c9596['id']},{})[_0xea8b('0x2a')](function(){return _0x18473b;});}else{return _0x18473b;}})[_0xea8b('0x57')](function(_0x175828){logger[_0xea8b('0x2e')](_0xea8b('0x58'),_0x175828);throw _0x175828;});}return _0x18473b;})[_0xea8b('0x2a')](respondWithResult(_0x302218,0xc9))[_0xea8b('0x57')](handleError(_0x302218,null));};exports[_0xea8b('0x59')]=function(_0x5988e7,_0x2d73db){if(_0x5988e7[_0xea8b('0x4e')]['id']){delete _0x5988e7[_0xea8b('0x4e')]['id'];}return db[_0xea8b('0x31')]['find']({'where':{'id':_0x5988e7['params']['id']}})[_0xea8b('0x2a')](handleEntityNotFound(_0x2d73db,null))[_0xea8b('0x2a')](saveUpdates(_0x5988e7[_0xea8b('0x4e')],null))[_0xea8b('0x2a')](respondWithResult(_0x2d73db,null))['catch'](handleError(_0x2d73db,null));};exports[_0xea8b('0x2c')]=function(_0x38a6f8,_0x469eb7){return db[_0xea8b('0x31')][_0xea8b('0x4c')]({'where':{'id':_0x38a6f8['params']['id']}})['then'](handleEntityNotFound(_0x469eb7,null))[_0xea8b('0x2a')](removeEntity(_0x469eb7,null))[_0xea8b('0x57')](handleError(_0x469eb7,null));};exports['describe']=function(_0x2cbe5,_0x531644){return db[_0xea8b('0x31')][_0xea8b('0x5a')]()[_0xea8b('0x2a')](respondWithResult(_0x531644,null))['catch'](handleError(_0x531644,null));};exports[_0xea8b('0x5b')]=function(_0x2c3fff,_0xfd839c,_0x32fb44){var _0x8083b7={'raw':!![],'where':{}},_0x26bbcc={},_0x3c4249;return db[_0xea8b('0x31')][_0xea8b('0x5c')]({'where':{'id':_0x2c3fff[_0xea8b('0x49')]['id']}})[_0xea8b('0x2a')](handleEntityNotFound(_0xfd839c,null))[_0xea8b('0x2a')](function(_0x218850){if(_0x218850){_0x3c4249=_0x218850['get']({'plain':!![]});_0x26bbcc[_0xea8b('0x35')]=_[_0xea8b('0x38')](db['UserFaxQueue'][_0xea8b('0x32')]);_0x26bbcc[_0xea8b('0x37')]=_[_0xea8b('0x38')](_0x2c3fff[_0xea8b('0x37')]);_0x26bbcc[_0xea8b('0x39')]=_[_0xea8b('0x4a')](_0x26bbcc[_0xea8b('0x35')],_0x26bbcc[_0xea8b('0x37')]);_0x8083b7['attributes']=_[_0xea8b('0x4a')](_0x26bbcc[_0xea8b('0x35')],qs['fields'](_0x2c3fff[_0xea8b('0x37')][_0xea8b('0x3b')]));_0x8083b7[_0xea8b('0x3a')]=_0x8083b7[_0xea8b('0x3a')]['length']?_0x8083b7['attributes']:_0x26bbcc[_0xea8b('0x35')];if(!_0x2c3fff['query'][_0xea8b('0x3d')]('nolimit')){_0x8083b7[_0xea8b('0x25')]=qs[_0xea8b('0x25')](_0x2c3fff[_0xea8b('0x37')][_0xea8b('0x25')]);_0x8083b7[_0xea8b('0x22')]=qs[_0xea8b('0x22')](_0x2c3fff[_0xea8b('0x37')][_0xea8b('0x22')]);}_0x8083b7[_0xea8b('0x5d')]=qs[_0xea8b('0x3f')](_0x2c3fff[_0xea8b('0x37')][_0xea8b('0x3f')]);_0x8083b7[_0xea8b('0x40')]=qs[_0xea8b('0x39')](_[_0xea8b('0x41')](_0x2c3fff[_0xea8b('0x37')],_0x26bbcc[_0xea8b('0x39')]));_0x8083b7[_0xea8b('0x40')][_0xea8b('0x5e')]=_0x218850['id'];if(_0x2c3fff[_0xea8b('0x37')][_0xea8b('0x42')]){_0x8083b7['where']=_[_0xea8b('0x43')](_0x8083b7[_0xea8b('0x40')],{'$or':_['map'](_0x8083b7[_0xea8b('0x3a')],function(_0x1ffdfa){var _0x1c5a0b={};_0x1c5a0b[_0x1ffdfa]={'$like':'%'+_0x2c3fff[_0xea8b('0x37')][_0xea8b('0x42')]+'%'};return _0x1c5a0b;})});}_0x8083b7=_[_0xea8b('0x43')]({},_0x8083b7,_0x2c3fff[_0xea8b('0x45')]);return db[_0xea8b('0x5f')]['findAll'](_0x8083b7);}})[_0xea8b('0x2a')](function(_0x42ba7b){if(_0x42ba7b){return db[_0xea8b('0x60')][_0xea8b('0x61')]({'where':{'id':_[_0xea8b('0x36')](_0x42ba7b,_0xea8b('0x62')),'role':_0xea8b('0x63')},'attributes':['id',_0xea8b('0x2f'),_0xea8b('0x64'),'updatedAt',_0xea8b('0x65')]});}})[_0xea8b('0x2a')](function(_0x119fc2){if(_0x119fc2){return{'count':_0x119fc2['count'],'rows':_[_0xea8b('0x36')](_0x119fc2[_0xea8b('0x66')],function(_0x440086){return{'membername':_0x440086[_0xea8b('0x2f')],'UserId':_0x440086['id'],'queue_name':_0x3c4249['name'],'FaxQueueId':_0x3c4249['id'],'interface':util[_0xea8b('0x67')](_0xea8b('0x68'),_0xea8b('0x69'),_0x440086[_0xea8b('0x2f')]),'penalty':0x0,'paused':_0x440086[_0xea8b('0x64')],'createdAt':_0x440086['createdAt'],'updatedAt':_0x440086['updatedAt']};})};}else{return{'count':0x0,'rows':[]};}})[_0xea8b('0x2a')](respondWithFilteredResult(_0xfd839c,_0x8083b7))[_0xea8b('0x57')](handleError(_0xfd839c,null));};exports[_0xea8b('0x6a')]=function(_0x3defa3,_0x28fe03,_0x4e30a1){var _0x1f6fb2={};var _0x24590a={};var _0x46cdb4;var _0x2b6f17;return db[_0xea8b('0x31')][_0xea8b('0x5c')]({'where':{'id':_0x3defa3[_0xea8b('0x49')]['id']}})[_0xea8b('0x2a')](handleEntityNotFound(_0x28fe03,null))['then'](function(_0x2bfe2f){if(_0x2bfe2f){_0x46cdb4=_0x2bfe2f;_0x24590a[_0xea8b('0x35')]=_['keys'](db[_0xea8b('0x6b')][_0xea8b('0x32')]);_0x24590a[_0xea8b('0x37')]=_[_0xea8b('0x38')](_0x3defa3[_0xea8b('0x37')]);_0x24590a[_0xea8b('0x39')]=_['intersection'](_0x24590a[_0xea8b('0x35')],_0x24590a[_0xea8b('0x37')]);_0x1f6fb2[_0xea8b('0x3a')]=_['intersection'](_0x24590a[_0xea8b('0x35')],qs[_0xea8b('0x3b')](_0x3defa3[_0xea8b('0x37')][_0xea8b('0x3b')]));_0x1f6fb2[_0xea8b('0x3a')]=_0x1f6fb2['attributes']['length']?_0x1f6fb2[_0xea8b('0x3a')]:_0x24590a[_0xea8b('0x35')];_0x1f6fb2[_0xea8b('0x5d')]=qs['sort'](_0x3defa3[_0xea8b('0x37')][_0xea8b('0x3f')]);_0x1f6fb2[_0xea8b('0x40')]=qs['filters'](_['pick'](_0x3defa3[_0xea8b('0x37')],_0x24590a[_0xea8b('0x39')]));if(_0x3defa3['query'][_0xea8b('0x42')]){_0x1f6fb2[_0xea8b('0x40')]=_[_0xea8b('0x43')](_0x1f6fb2[_0xea8b('0x40')],{'$or':_[_0xea8b('0x36')](_0x1f6fb2[_0xea8b('0x3a')],function(_0x3c6bb3){var _0x513f32={};_0x513f32[_0x3c6bb3]={'$like':'%'+_0x3defa3[_0xea8b('0x37')][_0xea8b('0x42')]+'%'};return _0x513f32;})});}_0x1f6fb2=_[_0xea8b('0x43')]({},_0x1f6fb2,_0x3defa3[_0xea8b('0x45')]);return _0x46cdb4[_0xea8b('0x6a')](_0x1f6fb2);}})[_0xea8b('0x2a')](function(_0x5b6004){if(_0x5b6004){_0x2b6f17=_0x5b6004[_0xea8b('0x3c')];if(!_0x3defa3[_0xea8b('0x37')][_0xea8b('0x3d')](_0xea8b('0x3e'))){_0x1f6fb2['limit']=qs['limit'](_0x3defa3[_0xea8b('0x37')][_0xea8b('0x25')]);_0x1f6fb2['offset']=qs[_0xea8b('0x22')](_0x3defa3[_0xea8b('0x37')]['offset']);}return _0x46cdb4['getTeams'](_0x1f6fb2);}})[_0xea8b('0x2a')](function(_0xafd3b4){if(_0xafd3b4){return _0xafd3b4?{'count':_0x2b6f17,'rows':_0xafd3b4}:null;}})[_0xea8b('0x2a')](respondWithResult(_0x28fe03,null))[_0xea8b('0x57')](handleError(_0x28fe03,null));};exports[_0xea8b('0x6c')]=function(_0x562965,_0x75ba01,_0x480d32){var _0x582851=_0x562965['body']['ids'];return db[_0xea8b('0x6b')][_0xea8b('0x47')]({'where':{'id':_0x582851},'attributes':['id'],'include':[{'model':db['User'],'as':'Agents','attributes':['id',_0xea8b('0x2f'),_0xea8b('0x6d'),'voicePause',_0xea8b('0x6e')],'raw':!![]}]})[_0xea8b('0x2a')](function(_0x4f85d3){if(_0x4f85d3){var _0x175bf2=_[_0xea8b('0x6f')](_0x4f85d3,function(_0x59e076){var _0xa13012=_0x59e076[_0xea8b('0x50')]({'plain':!![]});return _0xa13012[_0xea8b('0x70')];});return db[_0xea8b('0x31')][_0xea8b('0x4c')]({'where':{'id':_0x562965['params']['id']}})[_0xea8b('0x2a')](function(_0x4c5ef2){return db[_0xea8b('0x71')][_0xea8b('0x72')](function(_0x58d3c9){return _0x4c5ef2[_0xea8b('0x6c')](_0x582851,{'transaction':_0x58d3c9})[_0xea8b('0x2a')](function(){return BPromise[_0xea8b('0x73')](_0x175bf2,function(_0x14504e){return db[_0xea8b('0x5f')][_0xea8b('0x74')]({'where':{'UserId':_0x14504e['id'],'FaxQueueId':_0x562965[_0xea8b('0x49')]['id']},'transaction':_0x58d3c9});});})[_0xea8b('0x2a')](function(){_0x175bf2[_0xea8b('0x75')](function(_0x3c4b9e){socket[_0xea8b('0x76')]('userFaxQueue:save',{'UserId':_0x3c4b9e['id'],'FaxQueueId':_0x4c5ef2['id']});});});});});}})[_0xea8b('0x2a')](respondWithStatusCode(_0x75ba01,null))['catch'](handleError(_0x75ba01,null));};exports[_0xea8b('0x77')]=function(_0x2315c2,_0x49da93,_0x5c57d3){return db[_0xea8b('0x6b')][_0xea8b('0x47')]({'where':{'id':_0x2315c2[_0xea8b('0x37')][_0xea8b('0x78')]},'attributes':['id'],'include':[{'model':db[_0xea8b('0x60')],'as':_0xea8b('0x70'),'attributes':['id'],'raw':!![]}]})[_0xea8b('0x2a')](handleEntityNotFound(_0x49da93,null))[_0xea8b('0x2a')](function(_0x55808b){var _0x1ce57e=_['map'](_0x55808b,'id');var _0x3817b3=[];var _0x21fb84=[];var _0x49a162=squel[_0xea8b('0x79')]();_0x49a162[_0xea8b('0x7a')]('tq.TeamId')['from'](_0xea8b('0x7b'),'tq')[_0xea8b('0x7c')](_0xea8b('0x7d'),'ut','ut.TeamId\x20=\x20tq.TeamId')[_0xea8b('0x40')](_0xea8b('0x7e'),_0x2315c2[_0xea8b('0x49')]['id']);for(var _0x1a76c0=0x0;_0x1a76c0<_0x55808b[_0xea8b('0x3c')];_0x1a76c0+=0x1){let _0x5b71d2=_0x55808b[_0x1a76c0];for(var _0x406f84=0x0;_0x406f84<_0x5b71d2[_0xea8b('0x70')][_0xea8b('0x3c')];_0x406f84+=0x1){let _0x3ffb23=_0x5b71d2['Agents'][_0x406f84];var _0x467e61=_0x49a162[_0xea8b('0x7f')]();_0x467e61[_0xea8b('0x40')]('ut.UserId\x20=\x20?',_0x3ffb23['id']);_0x21fb84[_0xea8b('0x80')](db[_0xea8b('0x71')][_0xea8b('0x37')](_0x467e61[_0xea8b('0x81')](),{'type':db[_0xea8b('0x71')]['QueryTypes']['SELECT']})['then'](function(_0x146d30){if(_0x146d30[_0xea8b('0x3c')]===0x1){return _0x3ffb23['id'];}else{var _0x43d377=_['every'](_['map'](_0x146d30,_0xea8b('0x82')),function(_0x375ace){return _['includes'](_0x1ce57e,_0x375ace);});if(_0x43d377){return _0x3ffb23['id'];}}}));}}return BPromise[_0xea8b('0x83')](_0x21fb84)[_0xea8b('0x2a')](function(_0x2a46d6){_0x3817b3=_(_0x3817b3)[_0xea8b('0x84')](_0x2a46d6)[_0xea8b('0x85')]()[_0xea8b('0x86')]();return db[_0xea8b('0x31')][_0xea8b('0x4c')]({'where':{'id':_0x2315c2['params']['id']}})[_0xea8b('0x2a')](function(_0x2f7d33){return db['sequelize'][_0xea8b('0x72')](function(_0xc7af3f){return _0x2f7d33[_0xea8b('0x77')](_0x2315c2[_0xea8b('0x37')][_0xea8b('0x78')],{'transaction':_0xc7af3f})[_0xea8b('0x2a')](function(){if(!_[_0xea8b('0x87')](_0x3817b3)){return _0x2f7d33[_0xea8b('0x88')](_0x3817b3,{'transaction':_0xc7af3f});}})[_0xea8b('0x2a')](function(){_0x3817b3['forEach'](function(_0xae63d){socket['emit'](_0xea8b('0x89'),{'UserId':_0xae63d,'FaxQueueId':_0x2f7d33['id']});});});});});});})[_0xea8b('0x2a')](respondWithStatusCode(_0x49da93,null))['catch'](handleError(_0x49da93,null));};exports['addAgents']=function(_0xe4de2e,_0x302cff,_0x230c64){return db[_0xea8b('0x31')]['find']({'where':{'id':_0xe4de2e[_0xea8b('0x49')]['id']}})[_0xea8b('0x2a')](handleEntityNotFound(_0x302cff,null))['then'](function(_0x495294){if(_0x495294){return _0x495294[_0xea8b('0x8a')](_0xe4de2e[_0xea8b('0x4e')][_0xea8b('0x78')],_[_0xea8b('0x8b')](_0xe4de2e[_0xea8b('0x4e')],[_0xea8b('0x78'),'id'])||{})[_0xea8b('0x8c')](function(_0x25e09c){for(var _0x3fa72c=0x0;_0x3fa72c<_0xe4de2e[_0xea8b('0x4e')]['ids']['length'];_0x3fa72c+=0x1){socket[_0xea8b('0x76')]('userFaxQueue:save',{'UserId':Number(_0xe4de2e[_0xea8b('0x4e')][_0xea8b('0x78')][_0x3fa72c]),'FaxQueueId':Number(_0xe4de2e['params']['id'])});}return _0x25e09c;});}})[_0xea8b('0x2a')](respondWithResult(_0x302cff,null))[_0xea8b('0x57')](handleError(_0x302cff,null));};exports[_0xea8b('0x88')]=function(_0x1f3ae7,_0x53919e,_0x505231){return db[_0xea8b('0x31')][_0xea8b('0x4c')]({'where':{'id':_0x1f3ae7[_0xea8b('0x49')]['id']}})['then'](handleEntityNotFound(_0x53919e,null))[_0xea8b('0x2a')](function(_0xd521c){if(_0xd521c){return _0xd521c[_0xea8b('0x88')](_0x1f3ae7[_0xea8b('0x37')]['ids'])[_0xea8b('0x2a')](function(){if(_[_0xea8b('0x8d')](_0x1f3ae7[_0xea8b('0x37')][_0xea8b('0x78')])){for(var _0x4a86a1=0x0;_0x4a86a1<_0x1f3ae7[_0xea8b('0x37')][_0xea8b('0x78')][_0xea8b('0x3c')];_0x4a86a1+=0x1){socket[_0xea8b('0x76')](_0xea8b('0x89'),{'UserId':Number(_0x1f3ae7[_0xea8b('0x37')]['ids'][_0x4a86a1]),'FaxQueueId':Number(_0x1f3ae7[_0xea8b('0x49')]['id'])});}}else{socket[_0xea8b('0x76')]('userFaxQueue:remove',{'UserId':Number(_0x1f3ae7[_0xea8b('0x37')][_0xea8b('0x78')]),'FaxQueueId':Number(_0x1f3ae7[_0xea8b('0x49')]['id'])});}});}})[_0xea8b('0x2a')](respondWithStatusCode(_0x53919e,null))[_0xea8b('0x57')](handleError(_0x53919e,null));};exports[_0xea8b('0x8e')]=function(_0x34f081,_0xdfeaee,_0x1f3411){var _0x417a19={};var _0x5416d8={};var _0x2642c4;var _0x529100;return db[_0xea8b('0x31')][_0xea8b('0x5c')]({'where':{'id':_0x34f081[_0xea8b('0x49')]['id']}})[_0xea8b('0x2a')](handleEntityNotFound(_0xdfeaee,null))[_0xea8b('0x2a')](function(_0x2a5447){if(_0x2a5447){_0x2642c4=_0x2a5447;_0x5416d8[_0xea8b('0x35')]=_[_0xea8b('0x38')](db[_0xea8b('0x60')][_0xea8b('0x32')]);_0x5416d8[_0xea8b('0x37')]=_[_0xea8b('0x38')](_0x34f081['query']);_0x5416d8[_0xea8b('0x39')]=_[_0xea8b('0x4a')](_0x5416d8[_0xea8b('0x35')],_0x5416d8[_0xea8b('0x37')]);_0x417a19[_0xea8b('0x3a')]=_[_0xea8b('0x4a')](_0x5416d8[_0xea8b('0x35')],qs[_0xea8b('0x3b')](_0x34f081['query'][_0xea8b('0x3b')]));_0x417a19[_0xea8b('0x3a')]=_0x417a19[_0xea8b('0x3a')][_0xea8b('0x3c')]?_0x417a19['attributes']:_0x5416d8[_0xea8b('0x35')];_0x417a19['order']=qs[_0xea8b('0x3f')](_0x34f081['query'][_0xea8b('0x3f')]);_0x417a19[_0xea8b('0x40')]=qs[_0xea8b('0x39')](_[_0xea8b('0x41')](_0x34f081['query'],_0x5416d8[_0xea8b('0x39')]));if(_0x34f081[_0xea8b('0x37')][_0xea8b('0x42')]){_0x417a19[_0xea8b('0x40')]=_[_0xea8b('0x43')](_0x417a19[_0xea8b('0x40')],{'$or':_[_0xea8b('0x36')](_0x417a19[_0xea8b('0x3a')],function(_0xa5c685){var _0x3f7509={};_0x3f7509[_0xa5c685]={'$like':'%'+_0x34f081[_0xea8b('0x37')][_0xea8b('0x42')]+'%'};return _0x3f7509;})});}_0x417a19=_[_0xea8b('0x43')]({},_0x417a19,_0x34f081[_0xea8b('0x45')]);return _0x2642c4[_0xea8b('0x8e')](_0x417a19);}})[_0xea8b('0x2a')](function(_0xb6d2f8){if(_0xb6d2f8){_0x529100=_0xb6d2f8['length'];if(!_0x34f081[_0xea8b('0x37')]['hasOwnProperty'](_0xea8b('0x3e'))){_0x417a19[_0xea8b('0x25')]=qs[_0xea8b('0x25')](_0x34f081[_0xea8b('0x37')][_0xea8b('0x25')]);_0x417a19[_0xea8b('0x22')]=qs[_0xea8b('0x22')](_0x34f081[_0xea8b('0x37')][_0xea8b('0x22')]);}return _0x2642c4[_0xea8b('0x8e')](_0x417a19);}})['then'](function(_0x20208e){if(_0x20208e){return _0x20208e?{'count':_0x529100,'rows':_0x20208e}:null;}})[_0xea8b('0x2a')](respondWithResult(_0xdfeaee,null))[_0xea8b('0x57')](handleError(_0xdfeaee,null));}; \ No newline at end of file +var _0xf5e7=['params','keys','rawAttributes','find','create','body','user','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','UserProfileSection','userProfileId','UserProfileResource','catch','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','update','describe','getMembers','length','FaxQueueId','User','agent','faxPause','updatedAt','createdAt','rows','format','SIP','getTeams','findOne','Team','addTeams','ids','Agents','online','voicePause','interface','flatMap','sequelize','transaction','each','UserFaxQueue','forEach','emit','userFaxQueue:save','select','field','tq.TeamId','team_has_fax_queues','join','user_has_teams','ut.TeamId\x20=\x20tq.TeamId','FaxQueueId\x20=\x20?','clone','push','toString','QueryTypes','every','TeamId','includes','all','compact','value','removeTeams','removeAgents','addAgents','spread','userFaxQueue:remove','getAgents','zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','sox','to-csv','ejs','lodash','squel','crypto','querystring','papaparse','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','api','../../config/utils','../../config/environment','../../mysqldb','redis','defaults','localhost','./faxQueue.socket','register','sendStatus','status','end','json','limit','undefined','count','set','apply','reject','then','destroy','get','FaxQueues','error','stack','name','send','map','FaxQueue','fieldName','key','model','query','filters','intersection','attributes','fields','hasOwnProperty','nolimit','offset','order','sort','pick','merge','where','type','VIRTUAL','filter','options','includeAll','include','findAll','show'];(function(_0x191fb4,_0x2f7dc7){var _0x1474bb=function(_0x50d02e){while(--_0x50d02e){_0x191fb4['push'](_0x191fb4['shift']());}};_0x1474bb(++_0x2f7dc7);}(_0xf5e7,0x158));var _0x7f5e=function(_0x429003,_0x3508da){_0x429003=_0x429003-0x0;var _0x3cc0d9=_0xf5e7[_0x429003];return _0x3cc0d9;};'use strict';var emlformat=require('eml-format');var rimraf=require('rimraf');var zipdir=require(_0x7f5e('0x0'));var jsonpatch=require(_0x7f5e('0x1'));var rp=require(_0x7f5e('0x2'));var moment=require(_0x7f5e('0x3'));var BPromise=require(_0x7f5e('0x4'));var Mustache=require(_0x7f5e('0x5'));var util=require('util');var path=require('path');var sox=require(_0x7f5e('0x6'));var csv=require(_0x7f5e('0x7'));var ejs=require(_0x7f5e('0x8'));var fs=require('fs');var fs_extra=require('fs-extra');var _=require(_0x7f5e('0x9'));var squel=require(_0x7f5e('0xa'));var crypto=require(_0x7f5e('0xb'));var jsforce=require('jsforce');var deskjs=require('desk.js');var toCsv=require(_0x7f5e('0x7'));var querystring=require(_0x7f5e('0xc'));var Papa=require(_0x7f5e('0xd'));var Redis=require('ioredis');var authService=require(_0x7f5e('0xe'));var qs=require(_0x7f5e('0xf'));var as=require(_0x7f5e('0x10'));var hardwareService=require('../../config/license/hardware');var logger=require('../../config/logger')(_0x7f5e('0x11'));var utils=require(_0x7f5e('0x12'));var config=require(_0x7f5e('0x13'));var licenseUtil=require('../../config/license/util');var db=require(_0x7f5e('0x14'))['db'];config[_0x7f5e('0x15')]=_[_0x7f5e('0x16')](config[_0x7f5e('0x15')],{'host':_0x7f5e('0x17'),'port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config[_0x7f5e('0x15')]));require(_0x7f5e('0x18'))[_0x7f5e('0x19')](socket);function respondWithStatusCode(_0x3c61c1,_0x11057d){_0x11057d=_0x11057d||0xcc;return function(_0x2fa598){if(_0x2fa598){return _0x3c61c1[_0x7f5e('0x1a')](_0x11057d);}return _0x3c61c1[_0x7f5e('0x1b')](_0x11057d)[_0x7f5e('0x1c')]();};}function respondWithResult(_0xad2e87,_0x50cd13){_0x50cd13=_0x50cd13||0xc8;return function(_0x3bea64){if(_0x3bea64){return _0xad2e87['status'](_0x50cd13)[_0x7f5e('0x1d')](_0x3bea64);}};}function respondWithFilteredResult(_0x17962f,_0x401f7e){return function(_0x10903f){if(_0x10903f){var _0x1fdc78=typeof _0x401f7e['offset']==='undefined'&&typeof _0x401f7e[_0x7f5e('0x1e')]===_0x7f5e('0x1f');var _0x341f83=_0x10903f[_0x7f5e('0x20')];var _0x474fe6=_0x1fdc78?0x0:_0x401f7e['offset'];var _0x22bba7=_0x1fdc78?_0x10903f[_0x7f5e('0x20')]:_0x401f7e['offset']+_0x401f7e[_0x7f5e('0x1e')];var _0xafe14a;if(_0x22bba7>=_0x341f83){_0x22bba7=_0x341f83;_0xafe14a=0xc8;}else{_0xafe14a=0xce;}_0x17962f['status'](_0xafe14a);return _0x17962f[_0x7f5e('0x21')]('Content-Range',_0x474fe6+'-'+_0x22bba7+'/'+_0x341f83)[_0x7f5e('0x1d')](_0x10903f);}return null;};}function patchUpdates(_0x5567b1){return function(_0x2073bf){try{jsonpatch[_0x7f5e('0x22')](_0x2073bf,_0x5567b1,!![]);}catch(_0x20251b){return BPromise[_0x7f5e('0x23')](_0x20251b);}return _0x2073bf['save']();};}function saveUpdates(_0x1c13d7,_0x5b8921){return function(_0x540bcc){if(_0x540bcc){return _0x540bcc['update'](_0x1c13d7)[_0x7f5e('0x24')](function(_0x28d984){return _0x28d984;});}return null;};}function removeEntity(_0x209e87,_0x8dec63){return function(_0x2f7730){if(_0x2f7730){return _0x2f7730[_0x7f5e('0x25')]()['then'](function(){var _0x3da507=_0x2f7730[_0x7f5e('0x26')]({'plain':!![]});var _0x3cb390=_0x7f5e('0x27');return db['UserProfileResource']['destroy']({'where':{'type':_0x3cb390,'resourceId':_0x3da507['id']}})[_0x7f5e('0x24')](function(){return _0x2f7730;});})[_0x7f5e('0x24')](function(){_0x209e87['status'](0xcc)[_0x7f5e('0x1c')]();});}};}function handleEntityNotFound(_0x510c14,_0x58ed7e){return function(_0x207906){if(!_0x207906){_0x510c14['sendStatus'](0x194);}return _0x207906;};}function handleError(_0x444d58,_0x4347d0){_0x4347d0=_0x4347d0||0x1f4;return function(_0x358b66){logger[_0x7f5e('0x28')](_0x358b66[_0x7f5e('0x29')]);if(_0x358b66['name']){delete _0x358b66[_0x7f5e('0x2a')];}_0x444d58[_0x7f5e('0x1b')](_0x4347d0)[_0x7f5e('0x2b')](_0x358b66);};}exports['index']=function(_0x566509,_0x13a8c5){var _0xd67bda={},_0x44b980={},_0x40f585={'count':0x0,'rows':[]};var _0x18a2c6=_[_0x7f5e('0x2c')](db[_0x7f5e('0x2d')]['rawAttributes'],function(_0x13b9cf){return{'name':_0x13b9cf[_0x7f5e('0x2e')],'type':_0x13b9cf['type'][_0x7f5e('0x2f')]};});_0x44b980[_0x7f5e('0x30')]=_[_0x7f5e('0x2c')](_0x18a2c6,'name');_0x44b980[_0x7f5e('0x31')]=_['keys'](_0x566509[_0x7f5e('0x31')]);_0x44b980[_0x7f5e('0x32')]=_[_0x7f5e('0x33')](_0x44b980[_0x7f5e('0x30')],_0x44b980['query']);_0xd67bda[_0x7f5e('0x34')]=_[_0x7f5e('0x33')](_0x44b980[_0x7f5e('0x30')],qs[_0x7f5e('0x35')](_0x566509[_0x7f5e('0x31')][_0x7f5e('0x35')]));_0xd67bda[_0x7f5e('0x34')]=_0xd67bda[_0x7f5e('0x34')]['length']?_0xd67bda[_0x7f5e('0x34')]:_0x44b980[_0x7f5e('0x30')];if(!_0x566509[_0x7f5e('0x31')][_0x7f5e('0x36')](_0x7f5e('0x37'))){_0xd67bda[_0x7f5e('0x1e')]=qs['limit'](_0x566509['query'][_0x7f5e('0x1e')]);_0xd67bda[_0x7f5e('0x38')]=qs[_0x7f5e('0x38')](_0x566509[_0x7f5e('0x31')][_0x7f5e('0x38')]);}_0xd67bda[_0x7f5e('0x39')]=qs[_0x7f5e('0x3a')](_0x566509[_0x7f5e('0x31')][_0x7f5e('0x3a')]);_0xd67bda['where']=qs[_0x7f5e('0x32')](_[_0x7f5e('0x3b')](_0x566509['query'],_0x44b980[_0x7f5e('0x32')]),_0x18a2c6);if(_0x566509[_0x7f5e('0x31')]['filter']){_0xd67bda['where']=_[_0x7f5e('0x3c')](_0xd67bda[_0x7f5e('0x3d')],{'$or':_[_0x7f5e('0x2c')](_0x18a2c6,function(_0x10f77f){if(_0x10f77f[_0x7f5e('0x3e')]!==_0x7f5e('0x3f')){var _0x314aea={};_0x314aea[_0x10f77f[_0x7f5e('0x2a')]]={'$like':'%'+_0x566509[_0x7f5e('0x31')][_0x7f5e('0x40')]+'%'};return _0x314aea;}})});}_0xd67bda=_['merge']({},_0xd67bda,_0x566509[_0x7f5e('0x41')]);var _0x55b7f2={'where':_0xd67bda[_0x7f5e('0x3d')]};return db[_0x7f5e('0x2d')][_0x7f5e('0x20')](_0x55b7f2)['then'](function(_0x15f8bb){_0x40f585['count']=_0x15f8bb;if(_0x566509[_0x7f5e('0x31')][_0x7f5e('0x42')]){_0xd67bda[_0x7f5e('0x43')]=[{'all':!![]}];}return db['FaxQueue'][_0x7f5e('0x44')](_0xd67bda);})[_0x7f5e('0x24')](function(_0x210b53){_0x40f585['rows']=_0x210b53;return _0x40f585;})[_0x7f5e('0x24')](respondWithFilteredResult(_0x13a8c5,_0xd67bda))['catch'](handleError(_0x13a8c5,null));};exports[_0x7f5e('0x45')]=function(_0x562d3c,_0x1ebdf7){var _0x287685={'raw':!![],'where':{'id':_0x562d3c[_0x7f5e('0x46')]['id']}},_0x356c78={};_0x356c78['model']=_[_0x7f5e('0x47')](db['FaxQueue'][_0x7f5e('0x48')]);_0x356c78[_0x7f5e('0x31')]=_['keys'](_0x562d3c[_0x7f5e('0x31')]);_0x356c78['filters']=_['intersection'](_0x356c78[_0x7f5e('0x30')],_0x356c78[_0x7f5e('0x31')]);_0x287685[_0x7f5e('0x34')]=_['intersection'](_0x356c78[_0x7f5e('0x30')],qs['fields'](_0x562d3c[_0x7f5e('0x31')][_0x7f5e('0x35')]));_0x287685['attributes']=_0x287685[_0x7f5e('0x34')]['length']?_0x287685[_0x7f5e('0x34')]:_0x356c78['model'];if(_0x562d3c[_0x7f5e('0x31')]['includeAll']){_0x287685[_0x7f5e('0x43')]=[{'all':!![]}];}_0x287685=_[_0x7f5e('0x3c')]({},_0x287685,_0x562d3c[_0x7f5e('0x41')]);return db[_0x7f5e('0x2d')][_0x7f5e('0x49')](_0x287685)['then'](handleEntityNotFound(_0x1ebdf7,null))['then'](respondWithResult(_0x1ebdf7,null))['catch'](handleError(_0x1ebdf7,null));};exports[_0x7f5e('0x4a')]=function(_0x589577,_0x49dc39){return db[_0x7f5e('0x2d')][_0x7f5e('0x4a')](_0x589577[_0x7f5e('0x4b')],{})[_0x7f5e('0x24')](function(_0x212c1b){var _0x4aa3da=_0x589577[_0x7f5e('0x4c')][_0x7f5e('0x26')]({'plain':!![]});if(!_0x4aa3da)throw new Error(_0x7f5e('0x4d'));if(_0x4aa3da[_0x7f5e('0x4e')]===_0x7f5e('0x4c')){var _0x15d82c=_0x212c1b[_0x7f5e('0x26')]({'plain':!![]});var _0x2f8c7a='FaxQueues';return db[_0x7f5e('0x4f')][_0x7f5e('0x49')]({'where':{'name':_0x2f8c7a,'userProfileId':_0x4aa3da[_0x7f5e('0x50')]},'raw':!![]})[_0x7f5e('0x24')](function(_0x5d5f0e){if(_0x5d5f0e&&_0x5d5f0e['autoAssociation']===0x0){return db[_0x7f5e('0x51')][_0x7f5e('0x4a')]({'name':_0x15d82c[_0x7f5e('0x2a')],'resourceId':_0x15d82c['id'],'type':_0x5d5f0e[_0x7f5e('0x2a')],'sectionId':_0x5d5f0e['id']},{})[_0x7f5e('0x24')](function(){return _0x212c1b;});}else{return _0x212c1b;}})[_0x7f5e('0x52')](function(_0xc9d328){logger[_0x7f5e('0x28')](_0x7f5e('0x53'),_0xc9d328);throw _0xc9d328;});}return _0x212c1b;})[_0x7f5e('0x24')](respondWithResult(_0x49dc39,0xc9))[_0x7f5e('0x52')](handleError(_0x49dc39,null));};exports[_0x7f5e('0x54')]=function(_0x2a09ba,_0x3c4261){if(_0x2a09ba['body']['id']){delete _0x2a09ba[_0x7f5e('0x4b')]['id'];}return db[_0x7f5e('0x2d')][_0x7f5e('0x49')]({'where':{'id':_0x2a09ba[_0x7f5e('0x46')]['id']}})[_0x7f5e('0x24')](handleEntityNotFound(_0x3c4261,null))[_0x7f5e('0x24')](saveUpdates(_0x2a09ba['body'],null))[_0x7f5e('0x24')](respondWithResult(_0x3c4261,null))[_0x7f5e('0x52')](handleError(_0x3c4261,null));};exports['destroy']=function(_0x29ed17,_0x266e1e){return db[_0x7f5e('0x2d')]['find']({'where':{'id':_0x29ed17['params']['id']}})[_0x7f5e('0x24')](handleEntityNotFound(_0x266e1e,null))[_0x7f5e('0x24')](removeEntity(_0x266e1e,null))[_0x7f5e('0x52')](handleError(_0x266e1e,null));};exports['describe']=function(_0x660a98,_0x185853){return db[_0x7f5e('0x2d')][_0x7f5e('0x55')]()[_0x7f5e('0x24')](respondWithResult(_0x185853,null))[_0x7f5e('0x52')](handleError(_0x185853,null));};exports[_0x7f5e('0x56')]=function(_0x3298e2,_0x914807,_0xd6621){var _0x422e47={'raw':!![],'where':{}},_0x3e568c={},_0x13fafc;return db[_0x7f5e('0x2d')]['findOne']({'where':{'id':_0x3298e2[_0x7f5e('0x46')]['id']}})[_0x7f5e('0x24')](handleEntityNotFound(_0x914807,null))[_0x7f5e('0x24')](function(_0x287843){if(_0x287843){_0x13fafc=_0x287843[_0x7f5e('0x26')]({'plain':!![]});_0x3e568c['model']=_[_0x7f5e('0x47')](db['UserFaxQueue'][_0x7f5e('0x48')]);_0x3e568c['query']=_[_0x7f5e('0x47')](_0x3298e2[_0x7f5e('0x31')]);_0x3e568c[_0x7f5e('0x32')]=_[_0x7f5e('0x33')](_0x3e568c['model'],_0x3e568c[_0x7f5e('0x31')]);_0x422e47[_0x7f5e('0x34')]=_['intersection'](_0x3e568c[_0x7f5e('0x30')],qs[_0x7f5e('0x35')](_0x3298e2[_0x7f5e('0x31')][_0x7f5e('0x35')]));_0x422e47[_0x7f5e('0x34')]=_0x422e47[_0x7f5e('0x34')][_0x7f5e('0x57')]?_0x422e47[_0x7f5e('0x34')]:_0x3e568c[_0x7f5e('0x30')];if(!_0x3298e2['query'][_0x7f5e('0x36')](_0x7f5e('0x37'))){_0x422e47[_0x7f5e('0x1e')]=qs[_0x7f5e('0x1e')](_0x3298e2[_0x7f5e('0x31')][_0x7f5e('0x1e')]);_0x422e47[_0x7f5e('0x38')]=qs[_0x7f5e('0x38')](_0x3298e2['query'][_0x7f5e('0x38')]);}_0x422e47[_0x7f5e('0x39')]=qs[_0x7f5e('0x3a')](_0x3298e2[_0x7f5e('0x31')][_0x7f5e('0x3a')]);_0x422e47[_0x7f5e('0x3d')]=qs[_0x7f5e('0x32')](_[_0x7f5e('0x3b')](_0x3298e2[_0x7f5e('0x31')],_0x3e568c['filters']));_0x422e47[_0x7f5e('0x3d')][_0x7f5e('0x58')]=_0x287843['id'];if(_0x3298e2[_0x7f5e('0x31')]['filter']){_0x422e47[_0x7f5e('0x3d')]=_['merge'](_0x422e47[_0x7f5e('0x3d')],{'$or':_[_0x7f5e('0x2c')](_0x422e47[_0x7f5e('0x34')],function(_0x3e60a5){var _0x39aa57={};_0x39aa57[_0x3e60a5]={'$like':'%'+_0x3298e2['query'][_0x7f5e('0x40')]+'%'};return _0x39aa57;})});}_0x422e47=_[_0x7f5e('0x3c')]({},_0x422e47,_0x3298e2[_0x7f5e('0x41')]);return db['UserFaxQueue'][_0x7f5e('0x44')](_0x422e47);}})[_0x7f5e('0x24')](function(_0x4fc096){if(_0x4fc096){return db[_0x7f5e('0x59')]['findAndCountAll']({'where':{'id':_[_0x7f5e('0x2c')](_0x4fc096,'UserId'),'role':_0x7f5e('0x5a')},'attributes':['id',_0x7f5e('0x2a'),_0x7f5e('0x5b'),_0x7f5e('0x5c'),_0x7f5e('0x5d')]});}})[_0x7f5e('0x24')](function(_0x348c56){if(_0x348c56){return{'count':_0x348c56[_0x7f5e('0x20')],'rows':_[_0x7f5e('0x2c')](_0x348c56[_0x7f5e('0x5e')],function(_0x5ea85f){return{'membername':_0x5ea85f[_0x7f5e('0x2a')],'UserId':_0x5ea85f['id'],'queue_name':_0x13fafc['name'],'FaxQueueId':_0x13fafc['id'],'interface':util[_0x7f5e('0x5f')]('%s/%s',_0x7f5e('0x60'),_0x5ea85f[_0x7f5e('0x2a')]),'penalty':0x0,'paused':_0x5ea85f['faxPause'],'createdAt':_0x5ea85f[_0x7f5e('0x5d')],'updatedAt':_0x5ea85f[_0x7f5e('0x5c')]};})};}else{return{'count':0x0,'rows':[]};}})[_0x7f5e('0x24')](respondWithFilteredResult(_0x914807,_0x422e47))['catch'](handleError(_0x914807,null));};exports[_0x7f5e('0x61')]=function(_0x4254ca,_0xe62002,_0x2de8ab){var _0x32bfb0={};var _0x2f1c7e={};var _0x239806;var _0xd49a3e;return db[_0x7f5e('0x2d')][_0x7f5e('0x62')]({'where':{'id':_0x4254ca[_0x7f5e('0x46')]['id']}})['then'](handleEntityNotFound(_0xe62002,null))['then'](function(_0x12ed84){if(_0x12ed84){_0x239806=_0x12ed84;_0x2f1c7e['model']=_[_0x7f5e('0x47')](db[_0x7f5e('0x63')]['rawAttributes']);_0x2f1c7e[_0x7f5e('0x31')]=_[_0x7f5e('0x47')](_0x4254ca[_0x7f5e('0x31')]);_0x2f1c7e['filters']=_['intersection'](_0x2f1c7e[_0x7f5e('0x30')],_0x2f1c7e['query']);_0x32bfb0['attributes']=_[_0x7f5e('0x33')](_0x2f1c7e['model'],qs[_0x7f5e('0x35')](_0x4254ca['query']['fields']));_0x32bfb0['attributes']=_0x32bfb0[_0x7f5e('0x34')][_0x7f5e('0x57')]?_0x32bfb0[_0x7f5e('0x34')]:_0x2f1c7e['model'];_0x32bfb0[_0x7f5e('0x39')]=qs[_0x7f5e('0x3a')](_0x4254ca[_0x7f5e('0x31')][_0x7f5e('0x3a')]);_0x32bfb0[_0x7f5e('0x3d')]=qs['filters'](_[_0x7f5e('0x3b')](_0x4254ca[_0x7f5e('0x31')],_0x2f1c7e['filters']));if(_0x4254ca[_0x7f5e('0x31')][_0x7f5e('0x40')]){_0x32bfb0[_0x7f5e('0x3d')]=_[_0x7f5e('0x3c')](_0x32bfb0['where'],{'$or':_['map'](_0x32bfb0[_0x7f5e('0x34')],function(_0x4a7028){var _0x471284={};_0x471284[_0x4a7028]={'$like':'%'+_0x4254ca[_0x7f5e('0x31')][_0x7f5e('0x40')]+'%'};return _0x471284;})});}_0x32bfb0=_[_0x7f5e('0x3c')]({},_0x32bfb0,_0x4254ca[_0x7f5e('0x41')]);return _0x239806[_0x7f5e('0x61')](_0x32bfb0);}})[_0x7f5e('0x24')](function(_0x520659){if(_0x520659){_0xd49a3e=_0x520659[_0x7f5e('0x57')];if(!_0x4254ca['query']['hasOwnProperty'](_0x7f5e('0x37'))){_0x32bfb0['limit']=qs[_0x7f5e('0x1e')](_0x4254ca['query'][_0x7f5e('0x1e')]);_0x32bfb0[_0x7f5e('0x38')]=qs[_0x7f5e('0x38')](_0x4254ca[_0x7f5e('0x31')][_0x7f5e('0x38')]);}return _0x239806[_0x7f5e('0x61')](_0x32bfb0);}})[_0x7f5e('0x24')](function(_0x414ffe){if(_0x414ffe){return _0x414ffe?{'count':_0xd49a3e,'rows':_0x414ffe}:null;}})[_0x7f5e('0x24')](respondWithResult(_0xe62002,null))[_0x7f5e('0x52')](handleError(_0xe62002,null));};exports[_0x7f5e('0x64')]=function(_0x31601e,_0x8afd2d,_0x3421e3){var _0x399ead=_0x31601e[_0x7f5e('0x4b')][_0x7f5e('0x65')];return db['Team'][_0x7f5e('0x44')]({'where':{'id':_0x399ead},'attributes':['id'],'include':[{'model':db[_0x7f5e('0x59')],'as':_0x7f5e('0x66'),'attributes':['id',_0x7f5e('0x2a'),_0x7f5e('0x67'),_0x7f5e('0x68'),_0x7f5e('0x69')],'raw':!![]}]})[_0x7f5e('0x24')](function(_0x4e6b4b){if(_0x4e6b4b){var _0x319bd1=_[_0x7f5e('0x6a')](_0x4e6b4b,function(_0x4290d5){var _0x4bb676=_0x4290d5[_0x7f5e('0x26')]({'plain':!![]});return _0x4bb676[_0x7f5e('0x66')];});return db[_0x7f5e('0x2d')]['find']({'where':{'id':_0x31601e['params']['id']}})['then'](function(_0x44a221){return db[_0x7f5e('0x6b')][_0x7f5e('0x6c')](function(_0x376677){return _0x44a221[_0x7f5e('0x64')](_0x399ead,{'transaction':_0x376677})['then'](function(){return BPromise[_0x7f5e('0x6d')](_0x319bd1,function(_0x56030c){return db[_0x7f5e('0x6e')]['findOrCreate']({'where':{'UserId':_0x56030c['id'],'FaxQueueId':_0x31601e[_0x7f5e('0x46')]['id']},'transaction':_0x376677});});})[_0x7f5e('0x24')](function(){_0x319bd1[_0x7f5e('0x6f')](function(_0x459103){socket[_0x7f5e('0x70')](_0x7f5e('0x71'),{'UserId':_0x459103['id'],'FaxQueueId':_0x44a221['id']});});});});});}})[_0x7f5e('0x24')](respondWithStatusCode(_0x8afd2d,null))[_0x7f5e('0x52')](handleError(_0x8afd2d,null));};exports['removeTeams']=function(_0x3b0ea3,_0x11808a,_0x604aa){return db[_0x7f5e('0x63')][_0x7f5e('0x44')]({'where':{'id':_0x3b0ea3[_0x7f5e('0x31')][_0x7f5e('0x65')]},'attributes':['id'],'include':[{'model':db[_0x7f5e('0x59')],'as':_0x7f5e('0x66'),'attributes':['id'],'raw':!![]}]})['then'](handleEntityNotFound(_0x11808a,null))[_0x7f5e('0x24')](function(_0x299bf2){var _0x149986=_[_0x7f5e('0x2c')](_0x299bf2,'id');var _0x252d66=[];var _0x42b697=[];var _0x1d2b42=squel[_0x7f5e('0x72')]();_0x1d2b42[_0x7f5e('0x73')](_0x7f5e('0x74'))['from'](_0x7f5e('0x75'),'tq')[_0x7f5e('0x76')](_0x7f5e('0x77'),'ut',_0x7f5e('0x78'))['where'](_0x7f5e('0x79'),_0x3b0ea3['params']['id']);for(var _0x421232=0x0;_0x421232<_0x299bf2[_0x7f5e('0x57')];_0x421232+=0x1){let _0x4926b0=_0x299bf2[_0x421232];for(var _0x5dbce3=0x0;_0x5dbce3<_0x4926b0[_0x7f5e('0x66')]['length'];_0x5dbce3+=0x1){let _0x3a33bd=_0x4926b0[_0x7f5e('0x66')][_0x5dbce3];var _0x3667dd=_0x1d2b42[_0x7f5e('0x7a')]();_0x3667dd[_0x7f5e('0x3d')]('ut.UserId\x20=\x20?',_0x3a33bd['id']);_0x42b697[_0x7f5e('0x7b')](db[_0x7f5e('0x6b')][_0x7f5e('0x31')](_0x3667dd[_0x7f5e('0x7c')](),{'type':db[_0x7f5e('0x6b')][_0x7f5e('0x7d')]['SELECT']})[_0x7f5e('0x24')](function(_0x136ca3){if(_0x136ca3[_0x7f5e('0x57')]===0x1){return _0x3a33bd['id'];}else{var _0x39fa44=_[_0x7f5e('0x7e')](_['map'](_0x136ca3,_0x7f5e('0x7f')),function(_0xd7b446){return _[_0x7f5e('0x80')](_0x149986,_0xd7b446);});if(_0x39fa44){return _0x3a33bd['id'];}}}));}}return BPromise[_0x7f5e('0x81')](_0x42b697)[_0x7f5e('0x24')](function(_0x44ee31){_0x252d66=_(_0x252d66)['union'](_0x44ee31)[_0x7f5e('0x82')]()[_0x7f5e('0x83')]();return db[_0x7f5e('0x2d')][_0x7f5e('0x49')]({'where':{'id':_0x3b0ea3[_0x7f5e('0x46')]['id']}})[_0x7f5e('0x24')](function(_0x235e3e){return db['sequelize'][_0x7f5e('0x6c')](function(_0x13c36b){return _0x235e3e[_0x7f5e('0x84')](_0x3b0ea3['query'][_0x7f5e('0x65')],{'transaction':_0x13c36b})[_0x7f5e('0x24')](function(){if(!_['isEmpty'](_0x252d66)){return _0x235e3e[_0x7f5e('0x85')](_0x252d66,{'transaction':_0x13c36b});}})['then'](function(){_0x252d66['forEach'](function(_0x5abbeb){socket[_0x7f5e('0x70')]('userFaxQueue:remove',{'UserId':_0x5abbeb,'FaxQueueId':_0x235e3e['id']});});});});});});})[_0x7f5e('0x24')](respondWithStatusCode(_0x11808a,null))['catch'](handleError(_0x11808a,null));};exports[_0x7f5e('0x86')]=function(_0x53a861,_0x84db4e,_0x324967){return db[_0x7f5e('0x2d')][_0x7f5e('0x49')]({'where':{'id':_0x53a861[_0x7f5e('0x46')]['id']}})['then'](handleEntityNotFound(_0x84db4e,null))[_0x7f5e('0x24')](function(_0x15ef13){if(_0x15ef13){return _0x15ef13[_0x7f5e('0x86')](_0x53a861[_0x7f5e('0x4b')][_0x7f5e('0x65')],_['omit'](_0x53a861[_0x7f5e('0x4b')],[_0x7f5e('0x65'),'id'])||{})[_0x7f5e('0x87')](function(_0x42f06c){for(var _0x2643b9=0x0;_0x2643b9<_0x53a861[_0x7f5e('0x4b')]['ids'][_0x7f5e('0x57')];_0x2643b9+=0x1){socket['emit'](_0x7f5e('0x71'),{'UserId':Number(_0x53a861[_0x7f5e('0x4b')]['ids'][_0x2643b9]),'FaxQueueId':Number(_0x53a861['params']['id'])});}return _0x42f06c;});}})[_0x7f5e('0x24')](respondWithResult(_0x84db4e,null))[_0x7f5e('0x52')](handleError(_0x84db4e,null));};exports[_0x7f5e('0x85')]=function(_0x463d2e,_0x46b859,_0x6ac5d4){return db[_0x7f5e('0x2d')][_0x7f5e('0x49')]({'where':{'id':_0x463d2e[_0x7f5e('0x46')]['id']}})[_0x7f5e('0x24')](handleEntityNotFound(_0x46b859,null))[_0x7f5e('0x24')](function(_0x426a21){if(_0x426a21){return _0x426a21[_0x7f5e('0x85')](_0x463d2e[_0x7f5e('0x31')][_0x7f5e('0x65')])['then'](function(){if(_['isArray'](_0x463d2e[_0x7f5e('0x31')]['ids'])){for(var _0x1c9964=0x0;_0x1c9964<_0x463d2e[_0x7f5e('0x31')]['ids'][_0x7f5e('0x57')];_0x1c9964+=0x1){socket['emit'](_0x7f5e('0x88'),{'UserId':Number(_0x463d2e[_0x7f5e('0x31')]['ids'][_0x1c9964]),'FaxQueueId':Number(_0x463d2e['params']['id'])});}}else{socket[_0x7f5e('0x70')](_0x7f5e('0x88'),{'UserId':Number(_0x463d2e[_0x7f5e('0x31')][_0x7f5e('0x65')]),'FaxQueueId':Number(_0x463d2e['params']['id'])});}});}})[_0x7f5e('0x24')](respondWithStatusCode(_0x46b859,null))['catch'](handleError(_0x46b859,null));};exports[_0x7f5e('0x89')]=function(_0x26d33b,_0x307887,_0x4f07e8){var _0x1765b8={};var _0xa08f8={};var _0xe86649;var _0x394886;return db[_0x7f5e('0x2d')][_0x7f5e('0x62')]({'where':{'id':_0x26d33b[_0x7f5e('0x46')]['id']}})[_0x7f5e('0x24')](handleEntityNotFound(_0x307887,null))[_0x7f5e('0x24')](function(_0x249789){if(_0x249789){_0xe86649=_0x249789;_0xa08f8['model']=_['keys'](db[_0x7f5e('0x59')][_0x7f5e('0x48')]);_0xa08f8[_0x7f5e('0x31')]=_['keys'](_0x26d33b[_0x7f5e('0x31')]);_0xa08f8[_0x7f5e('0x32')]=_[_0x7f5e('0x33')](_0xa08f8['model'],_0xa08f8[_0x7f5e('0x31')]);_0x1765b8[_0x7f5e('0x34')]=_[_0x7f5e('0x33')](_0xa08f8[_0x7f5e('0x30')],qs[_0x7f5e('0x35')](_0x26d33b[_0x7f5e('0x31')][_0x7f5e('0x35')]));_0x1765b8[_0x7f5e('0x34')]=_0x1765b8[_0x7f5e('0x34')][_0x7f5e('0x57')]?_0x1765b8[_0x7f5e('0x34')]:_0xa08f8[_0x7f5e('0x30')];_0x1765b8['order']=qs[_0x7f5e('0x3a')](_0x26d33b[_0x7f5e('0x31')]['sort']);_0x1765b8[_0x7f5e('0x3d')]=qs['filters'](_[_0x7f5e('0x3b')](_0x26d33b[_0x7f5e('0x31')],_0xa08f8[_0x7f5e('0x32')]));if(_0x26d33b[_0x7f5e('0x31')][_0x7f5e('0x40')]){_0x1765b8[_0x7f5e('0x3d')]=_[_0x7f5e('0x3c')](_0x1765b8['where'],{'$or':_[_0x7f5e('0x2c')](_0x1765b8[_0x7f5e('0x34')],function(_0x1e1378){var _0x44f78a={};_0x44f78a[_0x1e1378]={'$like':'%'+_0x26d33b[_0x7f5e('0x31')][_0x7f5e('0x40')]+'%'};return _0x44f78a;})});}_0x1765b8=_['merge']({},_0x1765b8,_0x26d33b['options']);return _0xe86649[_0x7f5e('0x89')](_0x1765b8);}})[_0x7f5e('0x24')](function(_0x460c5d){if(_0x460c5d){_0x394886=_0x460c5d[_0x7f5e('0x57')];if(!_0x26d33b[_0x7f5e('0x31')][_0x7f5e('0x36')](_0x7f5e('0x37'))){_0x1765b8[_0x7f5e('0x1e')]=qs[_0x7f5e('0x1e')](_0x26d33b[_0x7f5e('0x31')]['limit']);_0x1765b8[_0x7f5e('0x38')]=qs['offset'](_0x26d33b['query']['offset']);}return _0xe86649[_0x7f5e('0x89')](_0x1765b8);}})[_0x7f5e('0x24')](function(_0x12238f){if(_0x12238f){return _0x12238f?{'count':_0x394886,'rows':_0x12238f}:null;}})[_0x7f5e('0x24')](respondWithResult(_0x307887,null))[_0x7f5e('0x52')](handleError(_0x307887,null));}; \ No newline at end of file diff --git a/server/api/faxQueue/faxQueue.events.js b/server/api/faxQueue/faxQueue.events.js index 9deea5f..3899811 100644 --- a/server/api/faxQueue/faxQueue.events.js +++ b/server/api/faxQueue/faxQueue.events.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xe0bf=['remove','emit','hasOwnProperty','exports','../../mysqldb','setMaxListeners','save','update'];(function(_0x5b183a,_0x144580){var _0x572694=function(_0x105dad){while(--_0x105dad){_0x5b183a['push'](_0x5b183a['shift']());}};_0x572694(++_0x144580);}(_0xe0bf,0x1ec));var _0xfe0b=function(_0xb92ee9,_0x4a6981){_0xb92ee9=_0xb92ee9-0x0;var _0x488566=_0xe0bf[_0xb92ee9];return _0x488566;};'use strict';var EventEmitter=require('events');var FaxQueue=require(_0xfe0b('0x0'))['db']['FaxQueue'];var FaxQueueEvents=new EventEmitter();FaxQueueEvents[_0xfe0b('0x1')](0x0);var events={'afterCreate':_0xfe0b('0x2'),'afterUpdate':_0xfe0b('0x3'),'afterDestroy':_0xfe0b('0x4')};function emitEvent(_0xb31f16){return function(_0x5a7b67,_0xe441ba,_0x32ca76){FaxQueueEvents[_0xfe0b('0x5')](_0xb31f16+':'+_0x5a7b67['id'],_0x5a7b67);FaxQueueEvents['emit'](_0xb31f16,_0x5a7b67);_0x32ca76(null);};}for(var e in events){if(events[_0xfe0b('0x6')](e)){var event=events[e];FaxQueue['hook'](e,emitEvent(event));}}module[_0xfe0b('0x7')]=FaxQueueEvents; \ No newline at end of file +var _0x2349=['remove','emit','events','../../mysqldb','FaxQueue','save','update'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0x2349,0xb1));var _0x9234=function(_0x3e35e9,_0x343705){_0x3e35e9=_0x3e35e9-0x0;var _0x5a9829=_0x2349[_0x3e35e9];return _0x5a9829;};'use strict';var EventEmitter=require(_0x9234('0x0'));var FaxQueue=require(_0x9234('0x1'))['db'][_0x9234('0x2')];var FaxQueueEvents=new EventEmitter();FaxQueueEvents['setMaxListeners'](0x0);var events={'afterCreate':_0x9234('0x3'),'afterUpdate':_0x9234('0x4'),'afterDestroy':_0x9234('0x5')};function emitEvent(_0x5d3195){return function(_0x23e868,_0x1eba84,_0x1d4694){FaxQueueEvents[_0x9234('0x6')](_0x5d3195+':'+_0x23e868['id'],_0x23e868);FaxQueueEvents[_0x9234('0x6')](_0x5d3195,_0x23e868);_0x1d4694(null);};}for(var e in events){if(events['hasOwnProperty'](e)){var event=events[e];FaxQueue['hook'](e,emitEvent(event));}}module['exports']=FaxQueueEvents; \ No newline at end of file diff --git a/server/api/faxQueue/faxQueue.model.js b/server/api/faxQueue/faxQueue.model.js index 51a0d6f..ff0f815 100644 --- a/server/api/faxQueue/faxQueue.model.js +++ b/server/api/faxQueue/faxQueue.model.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xc7ed=['define','FaxQueue','fax_queues','lodash','util','moment','bluebird','request-promise','rimraf','../../config/environment','./faxQueue.attributes','exports'];(function(_0x3e62cd,_0x30c472){var _0x35c7b6=function(_0xced77d){while(--_0xced77d){_0x3e62cd['push'](_0x3e62cd['shift']());}};_0x35c7b6(++_0x30c472);}(_0xc7ed,0xab));var _0xdc7e=function(_0x4108e9,_0x58da63){_0x4108e9=_0x4108e9-0x0;var _0x369cc4=_0xc7ed[_0x4108e9];return _0x369cc4;};'use strict';var _=require(_0xdc7e('0x0'));var util=require(_0xdc7e('0x1'));var logger=require('../../config/logger')('api');var moment=require(_0xdc7e('0x2'));var BPromise=require(_0xdc7e('0x3'));var rp=require(_0xdc7e('0x4'));var fs=require('fs');var path=require('path');var rimraf=require(_0xdc7e('0x5'));var config=require(_0xdc7e('0x6'));var attributes=require(_0xdc7e('0x7'));module[_0xdc7e('0x8')]=function(_0x5f1163,_0x11d2fa){return _0x5f1163[_0xdc7e('0x9')](_0xdc7e('0xa'),attributes,{'tableName':_0xdc7e('0xb'),'paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file +var _0xf212=['FaxQueue','fax_queues','util','api','moment','bluebird','path','../../config/environment','./faxQueue.attributes','exports','define'];(function(_0x11efe8,_0xe6ad7e){var _0x5954b8=function(_0x48bc36){while(--_0x48bc36){_0x11efe8['push'](_0x11efe8['shift']());}};_0x5954b8(++_0xe6ad7e);}(_0xf212,0xf4));var _0x2f21=function(_0x102147,_0x170d81){_0x102147=_0x102147-0x0;var _0x5e2d52=_0xf212[_0x102147];return _0x5e2d52;};'use strict';var _=require('lodash');var util=require(_0x2f21('0x0'));var logger=require('../../config/logger')(_0x2f21('0x1'));var moment=require(_0x2f21('0x2'));var BPromise=require(_0x2f21('0x3'));var rp=require('request-promise');var fs=require('fs');var path=require(_0x2f21('0x4'));var rimraf=require('rimraf');var config=require(_0x2f21('0x5'));var attributes=require(_0x2f21('0x6'));module[_0x2f21('0x7')]=function(_0xa6309e,_0x40e552){return _0xa6309e[_0x2f21('0x8')](_0x2f21('0x9'),attributes,{'tableName':_0x2f21('0xa'),'paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file diff --git a/server/api/faxQueue/faxQueue.rpc.js b/server/api/faxQueue/faxQueue.rpc.js index 0a4e6cb..9a79612 100644 --- a/server/api/faxQueue/faxQueue.rpc.js +++ b/server/api/faxQueue/faxQueue.rpc.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x4ded=['error','code','message','result','GetFaxQueue','FaxQueue','findAll','options','raw','where','attributes','limit','map','model','include','ShowFaxQueue','find','catch','lodash','moment','bluebird','randomstring','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','client','defaults','redis','localhost','socket.io-emitter','then','info','FaxQueue,\x20%s,\x20%s','request\x20sent','debug','FaxQueue,\x20%s,\x20%s,\x20%s','stringify'];(function(_0x68c979,_0x431cff){var _0x4f0001=function(_0xa7595d){while(--_0xa7595d){_0x68c979['push'](_0x68c979['shift']());}};_0x4f0001(++_0x431cff);}(_0x4ded,0xd5));var _0xd4de=function(_0x1e63e6,_0x5cf064){_0x1e63e6=_0x1e63e6-0x0;var _0xddce43=_0x4ded[_0x1e63e6];return _0xddce43;};'use strict';var _=require(_0xd4de('0x0'));var util=require('util');var moment=require(_0xd4de('0x1'));var BPromise=require(_0xd4de('0x2'));var rs=require(_0xd4de('0x3'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0xd4de('0x4'))['db'];var utils=require(_0xd4de('0x5'));var logger=require(_0xd4de('0x6'))(_0xd4de('0x7'));var config=require(_0xd4de('0x8'));var jayson=require('jayson/promise');var client=jayson[_0xd4de('0x9')]['http']({'port':0x232a});config['redis']=_[_0xd4de('0xa')](config[_0xd4de('0xb')],{'host':_0xd4de('0xc'),'port':0x18eb});var socket=require(_0xd4de('0xd'))(new Redis(config[_0xd4de('0xb')]));require('./faxQueue.socket')['register'](socket);function respondWithRpcPromise(_0x2e8164,_0x16a2d,_0xe9e9fe){return new BPromise(function(_0x39b313,_0x473765){return client['request'](_0x2e8164,_0xe9e9fe)[_0xd4de('0xe')](function(_0x161e53){logger[_0xd4de('0xf')](_0xd4de('0x10'),_0x16a2d,_0xd4de('0x11'));logger[_0xd4de('0x12')](_0xd4de('0x13'),_0x16a2d,'request\x20sent',JSON[_0xd4de('0x14')](_0x161e53));if(_0x161e53[_0xd4de('0x15')]){if(_0x161e53[_0xd4de('0x15')][_0xd4de('0x16')]===0x1f4){logger[_0xd4de('0x15')](_0xd4de('0x10'),_0x16a2d,_0x161e53[_0xd4de('0x15')]['message']);return _0x473765(_0x161e53[_0xd4de('0x15')][_0xd4de('0x17')]);}logger[_0xd4de('0x15')](_0xd4de('0x10'),_0x16a2d,_0x161e53['error'][_0xd4de('0x17')]);return _0x39b313(_0x161e53[_0xd4de('0x15')][_0xd4de('0x17')]);}else{logger['info'](_0xd4de('0x10'),_0x16a2d,_0xd4de('0x11'));_0x39b313(_0x161e53[_0xd4de('0x18')]['message']);}})['catch'](function(_0xd9914d){logger[_0xd4de('0x15')](_0xd4de('0x10'),_0x16a2d,_0xd9914d);_0x473765(_0xd9914d);});});}exports[_0xd4de('0x19')]=function(_0x24d2c1){var _0x4ce327=this;return new Promise(function(_0x1d7875,_0xdb4a41){return db[_0xd4de('0x1a')][_0xd4de('0x1b')]({'raw':_0x24d2c1[_0xd4de('0x1c')]?_0x24d2c1[_0xd4de('0x1c')][_0xd4de('0x1d')]===undefined?!![]:![]:!![],'where':_0x24d2c1[_0xd4de('0x1c')]?_0x24d2c1[_0xd4de('0x1c')][_0xd4de('0x1e')]||null:null,'attributes':_0x24d2c1['options']?_0x24d2c1[_0xd4de('0x1c')][_0xd4de('0x1f')]||null:null,'limit':_0x24d2c1[_0xd4de('0x1c')]?_0x24d2c1[_0xd4de('0x1c')][_0xd4de('0x20')]||null:null,'include':_0x24d2c1[_0xd4de('0x1c')]?_0x24d2c1['options']['include']?_[_0xd4de('0x21')](_0x24d2c1[_0xd4de('0x1c')]['include'],function(_0x21fb06){return{'model':db[_0x21fb06[_0xd4de('0x22')]],'as':_0x21fb06['as'],'attributes':_0x21fb06['attributes'],'include':_0x21fb06['include']?_['map'](_0x21fb06[_0xd4de('0x23')],function(_0x33206b){return{'model':db[_0x33206b[_0xd4de('0x22')]],'as':_0x33206b['as'],'attributes':_0x33206b[_0xd4de('0x1f')],'include':_0x33206b[_0xd4de('0x23')]?_[_0xd4de('0x21')](_0x33206b[_0xd4de('0x23')],function(_0x5d3e73){return{'model':db[_0x5d3e73['model']],'as':_0x5d3e73['as'],'attributes':_0x5d3e73['attributes']};}):[]};}):[]};}):[]:[]})['then'](function(_0x57e409){logger[_0xd4de('0xf')](_0xd4de('0x19'),_0x24d2c1);logger[_0xd4de('0x12')]('GetFaxQueue',_0x24d2c1,JSON[_0xd4de('0x14')](_0x57e409));_0x1d7875(_0x57e409);})['catch'](function(_0x156206){logger[_0xd4de('0x15')]('GetFaxQueue',_0x156206[_0xd4de('0x17')],_0x24d2c1);_0xdb4a41(_0x4ce327[_0xd4de('0x15')](0x1f4,_0x156206[_0xd4de('0x17')]));});});};exports[_0xd4de('0x24')]=function(_0x621d24){var _0x42b7ed=this;return new Promise(function(_0x18f2fb,_0x1423ce){return db[_0xd4de('0x1a')][_0xd4de('0x25')]({'raw':_0x621d24[_0xd4de('0x1c')]?_0x621d24['options'][_0xd4de('0x1d')]===undefined?!![]:![]:!![],'where':_0x621d24['options']?_0x621d24[_0xd4de('0x1c')][_0xd4de('0x1e')]||null:null,'attributes':_0x621d24[_0xd4de('0x1c')]?_0x621d24['options'][_0xd4de('0x1f')]||null:null,'include':_0x621d24['options']?_0x621d24[_0xd4de('0x1c')][_0xd4de('0x23')]?_['map'](_0x621d24[_0xd4de('0x1c')]['include'],function(_0x3b3f4d){return{'model':db[_0x3b3f4d[_0xd4de('0x22')]],'as':_0x3b3f4d['as'],'attributes':_0x3b3f4d['attributes'],'include':_0x3b3f4d[_0xd4de('0x23')]?_['map'](_0x3b3f4d[_0xd4de('0x23')],function(_0x497fc1){return{'model':db[_0x497fc1['model']],'as':_0x497fc1['as'],'attributes':_0x497fc1['attributes'],'include':_0x497fc1[_0xd4de('0x23')]?_['map'](_0x497fc1['include'],function(_0x394f6b){return{'model':db[_0x394f6b[_0xd4de('0x22')]],'as':_0x394f6b['as'],'attributes':_0x394f6b[_0xd4de('0x1f')]};}):[]};}):[]};}):[]:[]})['then'](function(_0x32e181){logger[_0xd4de('0xf')](_0xd4de('0x24'),_0x621d24);logger[_0xd4de('0x12')](_0xd4de('0x24'),_0x621d24,JSON[_0xd4de('0x14')](_0x32e181));_0x18f2fb(_0x32e181);})[_0xd4de('0x26')](function(_0x390950){logger[_0xd4de('0x15')](_0xd4de('0x24'),_0x390950[_0xd4de('0x17')],_0x621d24);_0x1423ce(_0x42b7ed[_0xd4de('0x15')](0x1f4,_0x390950[_0xd4de('0x17')]));});});}; \ No newline at end of file +var _0x692a=['FaxQueue,\x20%s,\x20%s','request\x20sent','debug','FaxQueue,\x20%s,\x20%s,\x20%s','stringify','error','code','message','catch','GetFaxQueue','FaxQueue','findAll','options','raw','where','attributes','limit','include','map','model','find','ShowFaxQueue','lodash','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','http','defaults','redis','localhost','./faxQueue.socket','register','request','then','info'];(function(_0x42e89e,_0x3cbfdd){var _0x3fc33d=function(_0x222418){while(--_0x222418){_0x42e89e['push'](_0x42e89e['shift']());}};_0x3fc33d(++_0x3cbfdd);}(_0x692a,0xbe));var _0xa692=function(_0x103a96,_0x8b7201){_0x103a96=_0x103a96-0x0;var _0x5f4b75=_0x692a[_0x103a96];return _0x5f4b75;};'use strict';var _=require(_0xa692('0x0'));var util=require(_0xa692('0x1'));var moment=require(_0xa692('0x2'));var BPromise=require(_0xa692('0x3'));var rs=require(_0xa692('0x4'));var fs=require('fs');var Redis=require(_0xa692('0x5'));var db=require(_0xa692('0x6'))['db'];var utils=require(_0xa692('0x7'));var logger=require(_0xa692('0x8'))(_0xa692('0x9'));var config=require(_0xa692('0xa'));var jayson=require('jayson/promise');var client=jayson['client'][_0xa692('0xb')]({'port':0x232a});config['redis']=_[_0xa692('0xc')](config[_0xa692('0xd')],{'host':_0xa692('0xe'),'port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config['redis']));require(_0xa692('0xf'))[_0xa692('0x10')](socket);function respondWithRpcPromise(_0x816fbf,_0x1dc578,_0x47d13a){return new BPromise(function(_0x3a867f,_0x4e4f30){return client[_0xa692('0x11')](_0x816fbf,_0x47d13a)[_0xa692('0x12')](function(_0x1b01f5){logger[_0xa692('0x13')](_0xa692('0x14'),_0x1dc578,_0xa692('0x15'));logger[_0xa692('0x16')](_0xa692('0x17'),_0x1dc578,_0xa692('0x15'),JSON[_0xa692('0x18')](_0x1b01f5));if(_0x1b01f5[_0xa692('0x19')]){if(_0x1b01f5[_0xa692('0x19')][_0xa692('0x1a')]===0x1f4){logger[_0xa692('0x19')]('FaxQueue,\x20%s,\x20%s',_0x1dc578,_0x1b01f5['error']['message']);return _0x4e4f30(_0x1b01f5['error'][_0xa692('0x1b')]);}logger[_0xa692('0x19')]('FaxQueue,\x20%s,\x20%s',_0x1dc578,_0x1b01f5[_0xa692('0x19')][_0xa692('0x1b')]);return _0x3a867f(_0x1b01f5['error']['message']);}else{logger[_0xa692('0x13')](_0xa692('0x14'),_0x1dc578,_0xa692('0x15'));_0x3a867f(_0x1b01f5['result']['message']);}})[_0xa692('0x1c')](function(_0x315de7){logger[_0xa692('0x19')](_0xa692('0x14'),_0x1dc578,_0x315de7);_0x4e4f30(_0x315de7);});});}exports[_0xa692('0x1d')]=function(_0x5e45d7){var _0x1cd632=this;return new Promise(function(_0x4c148e,_0x238581){return db[_0xa692('0x1e')][_0xa692('0x1f')]({'raw':_0x5e45d7[_0xa692('0x20')]?_0x5e45d7[_0xa692('0x20')][_0xa692('0x21')]===undefined?!![]:![]:!![],'where':_0x5e45d7[_0xa692('0x20')]?_0x5e45d7[_0xa692('0x20')][_0xa692('0x22')]||null:null,'attributes':_0x5e45d7['options']?_0x5e45d7[_0xa692('0x20')][_0xa692('0x23')]||null:null,'limit':_0x5e45d7[_0xa692('0x20')]?_0x5e45d7[_0xa692('0x20')][_0xa692('0x24')]||null:null,'include':_0x5e45d7[_0xa692('0x20')]?_0x5e45d7[_0xa692('0x20')][_0xa692('0x25')]?_[_0xa692('0x26')](_0x5e45d7['options']['include'],function(_0x2cb542){return{'model':db[_0x2cb542[_0xa692('0x27')]],'as':_0x2cb542['as'],'attributes':_0x2cb542[_0xa692('0x23')],'include':_0x2cb542[_0xa692('0x25')]?_['map'](_0x2cb542[_0xa692('0x25')],function(_0x23cb53){return{'model':db[_0x23cb53[_0xa692('0x27')]],'as':_0x23cb53['as'],'attributes':_0x23cb53[_0xa692('0x23')],'include':_0x23cb53[_0xa692('0x25')]?_[_0xa692('0x26')](_0x23cb53[_0xa692('0x25')],function(_0x41a39d){return{'model':db[_0x41a39d[_0xa692('0x27')]],'as':_0x41a39d['as'],'attributes':_0x41a39d[_0xa692('0x23')]};}):[]};}):[]};}):[]:[]})['then'](function(_0x4a6b15){logger[_0xa692('0x13')](_0xa692('0x1d'),_0x5e45d7);logger['debug'](_0xa692('0x1d'),_0x5e45d7,JSON[_0xa692('0x18')](_0x4a6b15));_0x4c148e(_0x4a6b15);})[_0xa692('0x1c')](function(_0x3d870f){logger[_0xa692('0x19')]('GetFaxQueue',_0x3d870f['message'],_0x5e45d7);_0x238581(_0x1cd632[_0xa692('0x19')](0x1f4,_0x3d870f[_0xa692('0x1b')]));});});};exports['ShowFaxQueue']=function(_0x3bce33){var _0x40ca4c=this;return new Promise(function(_0x8fa8dc,_0x39c771){return db[_0xa692('0x1e')][_0xa692('0x28')]({'raw':_0x3bce33[_0xa692('0x20')]?_0x3bce33[_0xa692('0x20')]['raw']===undefined?!![]:![]:!![],'where':_0x3bce33[_0xa692('0x20')]?_0x3bce33[_0xa692('0x20')][_0xa692('0x22')]||null:null,'attributes':_0x3bce33[_0xa692('0x20')]?_0x3bce33[_0xa692('0x20')][_0xa692('0x23')]||null:null,'include':_0x3bce33[_0xa692('0x20')]?_0x3bce33[_0xa692('0x20')][_0xa692('0x25')]?_[_0xa692('0x26')](_0x3bce33[_0xa692('0x20')]['include'],function(_0x3ccd58){return{'model':db[_0x3ccd58[_0xa692('0x27')]],'as':_0x3ccd58['as'],'attributes':_0x3ccd58[_0xa692('0x23')],'include':_0x3ccd58[_0xa692('0x25')]?_['map'](_0x3ccd58[_0xa692('0x25')],function(_0x1e5ba6){return{'model':db[_0x1e5ba6[_0xa692('0x27')]],'as':_0x1e5ba6['as'],'attributes':_0x1e5ba6[_0xa692('0x23')],'include':_0x1e5ba6['include']?_[_0xa692('0x26')](_0x1e5ba6[_0xa692('0x25')],function(_0x2cfdb4){return{'model':db[_0x2cfdb4['model']],'as':_0x2cfdb4['as'],'attributes':_0x2cfdb4[_0xa692('0x23')]};}):[]};}):[]};}):[]:[]})[_0xa692('0x12')](function(_0x19bc33){logger[_0xa692('0x13')](_0xa692('0x29'),_0x3bce33);logger['debug'](_0xa692('0x29'),_0x3bce33,JSON[_0xa692('0x18')](_0x19bc33));_0x8fa8dc(_0x19bc33);})[_0xa692('0x1c')](function(_0x2a82b5){logger[_0xa692('0x19')](_0xa692('0x29'),_0x2a82b5[_0xa692('0x1b')],_0x3bce33);_0x39c771(_0x40ca4c['error'](0x1f4,_0x2a82b5['message']));});});}; \ No newline at end of file diff --git a/server/api/faxQueue/faxQueue.socket.js b/server/api/faxQueue/faxQueue.socket.js index c1da5a8..f34e407 100644 --- a/server/api/faxQueue/faxQueue.socket.js +++ b/server/api/faxQueue/faxQueue.socket.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x66cd=['emit','register','length','./faxQueue.events','save','remove','update'];(function(_0x371bab,_0x38d15b){var _0x4b7c3f=function(_0x1a06f1){while(--_0x1a06f1){_0x371bab['push'](_0x371bab['shift']());}};_0x4b7c3f(++_0x38d15b);}(_0x66cd,0xa4));var _0xd66c=function(_0x4cf98e,_0xba4b79){_0x4cf98e=_0x4cf98e-0x0;var _0x1623ac=_0x66cd[_0x4cf98e];return _0x1623ac;};'use strict';var FaxQueueEvents=require(_0xd66c('0x0'));var events=[_0xd66c('0x1'),_0xd66c('0x2'),_0xd66c('0x3')];function createListener(_0x526986,_0x3c8471){return function(_0x164177){_0x3c8471[_0xd66c('0x4')](_0x526986,_0x164177);};}function removeListener(_0x3d651b,_0x20903e){return function(){FaxQueueEvents['removeListener'](_0x3d651b,_0x20903e);};}exports[_0xd66c('0x5')]=function(_0x43b318){for(var _0x142583=0x0,_0x528f64=events[_0xd66c('0x6')];_0x142583<_0x528f64;_0x142583++){var _0x4d47fa=events[_0x142583];var _0x2cfaaa=createListener('faxQueue:'+_0x4d47fa,_0x43b318);FaxQueueEvents['on'](_0x4d47fa,_0x2cfaaa);}}; \ No newline at end of file +var _0xa1aa=['emit','register','length','faxQueue:','./faxQueue.events','remove','update'];(function(_0x45bd25,_0x1d4b04){var _0x1c005d=function(_0x10570e){while(--_0x10570e){_0x45bd25['push'](_0x45bd25['shift']());}};_0x1c005d(++_0x1d4b04);}(_0xa1aa,0x1a1));var _0xaa1a=function(_0x5528db,_0x3c3a0b){_0x5528db=_0x5528db-0x0;var _0x39a7dc=_0xa1aa[_0x5528db];return _0x39a7dc;};'use strict';var FaxQueueEvents=require(_0xaa1a('0x0'));var events=['save',_0xaa1a('0x1'),_0xaa1a('0x2')];function createListener(_0x3d5fac,_0x4464b7){return function(_0x21be12){_0x4464b7[_0xaa1a('0x3')](_0x3d5fac,_0x21be12);};}function removeListener(_0x87273b,_0x514589){return function(){FaxQueueEvents['removeListener'](_0x87273b,_0x514589);};}exports[_0xaa1a('0x4')]=function(_0xfef7b){for(var _0x5783af=0x0,_0x2cb8b4=events[_0xaa1a('0x5')];_0x5783af<_0x2cb8b4;_0x5783af++){var _0x5ac892=events[_0x5783af];var _0x2eec6a=createListener(_0xaa1a('0x6')+_0x5ac892,_0xfef7b);FaxQueueEvents['on'](_0x5ac892,_0x2eec6a);}}; \ No newline at end of file diff --git a/server/api/faxQueue/index.js b/server/api/faxQueue/index.js index aefe191..66f25cf 100644 --- a/server/api/faxQueue/index.js +++ b/server/api/faxQueue/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xb46f=['addAgents','put','update','delete','destroy','removeTeams','removeAgents','exports','multer','util','connect-timeout','express','Router','fs-extra','../../components/auth/service','../../config/environment','get','isAuthenticated','index','/describe','describe','/:id/members','getMembers','/:id/teams','getTeams','/:id/users','getAgents','post','addTeams'];(function(_0x135cec,_0x4ea2ee){var _0x2e30ba=function(_0x52eac0){while(--_0x52eac0){_0x135cec['push'](_0x135cec['shift']());}};_0x2e30ba(++_0x4ea2ee);}(_0xb46f,0xb6));var _0xfb46=function(_0x19bc4f,_0x5e5d30){_0x19bc4f=_0x19bc4f-0x0;var _0x3f309e=_0xb46f[_0x19bc4f];return _0x3f309e;};'use strict';var multer=require(_0xfb46('0x0'));var util=require(_0xfb46('0x1'));var path=require('path');var timeout=require(_0xfb46('0x2'));var express=require(_0xfb46('0x3'));var router=express[_0xfb46('0x4')]();var fs_extra=require(_0xfb46('0x5'));var auth=require(_0xfb46('0x6'));var interaction=require('../../components/interaction/service');var config=require(_0xfb46('0x7'));var controller=require('./faxQueue.controller');router[_0xfb46('0x8')]('/',auth[_0xfb46('0x9')](),controller[_0xfb46('0xa')]);router[_0xfb46('0x8')](_0xfb46('0xb'),auth['isAuthenticated'](),controller[_0xfb46('0xc')]);router[_0xfb46('0x8')]('/:id',auth['isAuthenticated'](),controller['show']);router['get'](_0xfb46('0xd'),auth['isAuthenticated'](),controller[_0xfb46('0xe')]);router[_0xfb46('0x8')](_0xfb46('0xf'),auth[_0xfb46('0x9')](),controller[_0xfb46('0x10')]);router[_0xfb46('0x8')](_0xfb46('0x11'),auth[_0xfb46('0x9')](),controller[_0xfb46('0x12')]);router[_0xfb46('0x13')]('/',auth['isAuthenticated'](),controller['create']);router[_0xfb46('0x13')]('/:id/teams',auth[_0xfb46('0x9')](),controller[_0xfb46('0x14')]);router['post'](_0xfb46('0x11'),auth[_0xfb46('0x9')](),controller[_0xfb46('0x15')]);router[_0xfb46('0x16')]('/:id',auth[_0xfb46('0x9')](),controller[_0xfb46('0x17')]);router[_0xfb46('0x18')]('/:id',auth[_0xfb46('0x9')](),controller[_0xfb46('0x19')]);router['delete']('/:id/teams',auth[_0xfb46('0x9')](),controller[_0xfb46('0x1a')]);router[_0xfb46('0x18')](_0xfb46('0x11'),auth[_0xfb46('0x9')](),controller[_0xfb46('0x1b')]);module[_0xfb46('0x1c')]=router; \ No newline at end of file +var _0xed1c=['/:id/users','post','create','addTeams','addAgents','put','update','delete','destroy','removeTeams','removeAgents','exports','multer','util','fs-extra','../../components/auth/service','../../components/interaction/service','./faxQueue.controller','get','isAuthenticated','index','/describe','describe','/:id','show','/:id/teams','getTeams'];(function(_0x21feab,_0xa69cb6){var _0x35be66=function(_0x4f7521){while(--_0x4f7521){_0x21feab['push'](_0x21feab['shift']());}};_0x35be66(++_0xa69cb6);}(_0xed1c,0xe4));var _0xced1=function(_0x1b4a12,_0x2be253){_0x1b4a12=_0x1b4a12-0x0;var _0x2b9694=_0xed1c[_0x1b4a12];return _0x2b9694;};'use strict';var multer=require(_0xced1('0x0'));var util=require(_0xced1('0x1'));var path=require('path');var timeout=require('connect-timeout');var express=require('express');var router=express['Router']();var fs_extra=require(_0xced1('0x2'));var auth=require(_0xced1('0x3'));var interaction=require(_0xced1('0x4'));var config=require('../../config/environment');var controller=require(_0xced1('0x5'));router[_0xced1('0x6')]('/',auth[_0xced1('0x7')](),controller[_0xced1('0x8')]);router['get'](_0xced1('0x9'),auth[_0xced1('0x7')](),controller[_0xced1('0xa')]);router[_0xced1('0x6')](_0xced1('0xb'),auth[_0xced1('0x7')](),controller[_0xced1('0xc')]);router[_0xced1('0x6')]('/:id/members',auth[_0xced1('0x7')](),controller['getMembers']);router[_0xced1('0x6')](_0xced1('0xd'),auth[_0xced1('0x7')](),controller[_0xced1('0xe')]);router[_0xced1('0x6')](_0xced1('0xf'),auth[_0xced1('0x7')](),controller['getAgents']);router[_0xced1('0x10')]('/',auth[_0xced1('0x7')](),controller[_0xced1('0x11')]);router[_0xced1('0x10')]('/:id/teams',auth[_0xced1('0x7')](),controller[_0xced1('0x12')]);router['post'](_0xced1('0xf'),auth[_0xced1('0x7')](),controller[_0xced1('0x13')]);router[_0xced1('0x14')]('/:id',auth['isAuthenticated'](),controller[_0xced1('0x15')]);router[_0xced1('0x16')](_0xced1('0xb'),auth[_0xced1('0x7')](),controller[_0xced1('0x17')]);router[_0xced1('0x16')]('/:id/teams',auth['isAuthenticated'](),controller[_0xced1('0x18')]);router[_0xced1('0x16')](_0xced1('0xf'),auth['isAuthenticated'](),controller[_0xced1('0x19')]);module[_0xced1('0x1a')]=router; \ No newline at end of file diff --git a/server/api/faxQueueReport/faxQueueReport.attributes.js b/server/api/faxQueueReport/faxQueueReport.attributes.js index 6ad479b..b1d2df4 100644 --- a/server/api/faxQueueReport/faxQueueReport.attributes.js +++ b/server/api/faxQueueReport/faxQueueReport.attributes.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x0521=['sequelize','exports','STRING','DATE','moment'];(function(_0xdc37a1,_0x53ebb9){var _0x99b4fe=function(_0x2811e3){while(--_0x2811e3){_0xdc37a1['push'](_0xdc37a1['shift']());}};_0x99b4fe(++_0x53ebb9);}(_0x0521,0x13a));var _0x1052=function(_0x369b7b,_0x3135a9){_0x369b7b=_0x369b7b-0x0;var _0x45f573=_0x0521[_0x369b7b];return _0x45f573;};'use strict';var moment=require(_0x1052('0x0'));var Sequelize=require(_0x1052('0x1'));module[_0x1052('0x2')]={'uniqueid':{'type':Sequelize[_0x1052('0x3')],'allowNull':![]},'from':{'type':Sequelize['STRING']},'joinAt':{'type':Sequelize['DATE']},'leaveAt':{'type':Sequelize[_0x1052('0x4')]},'acceptAt':{'type':Sequelize['DATE']},'exitAt':{'type':Sequelize['DATE']},'reason':{'type':Sequelize[_0x1052('0x3')]}}; \ No newline at end of file +var _0x8d8a=['DATE','moment','sequelize','STRING'];(function(_0x38d382,_0x14324d){var _0x319639=function(_0x399037){while(--_0x399037){_0x38d382['push'](_0x38d382['shift']());}};_0x319639(++_0x14324d);}(_0x8d8a,0x189));var _0xa8d8=function(_0x1ac5c1,_0x5ceee4){_0x1ac5c1=_0x1ac5c1-0x0;var _0xc12500=_0x8d8a[_0x1ac5c1];return _0xc12500;};'use strict';var moment=require(_0xa8d8('0x0'));var Sequelize=require(_0xa8d8('0x1'));module['exports']={'uniqueid':{'type':Sequelize['STRING'],'allowNull':![]},'from':{'type':Sequelize[_0xa8d8('0x2')]},'joinAt':{'type':Sequelize[_0xa8d8('0x3')]},'leaveAt':{'type':Sequelize[_0xa8d8('0x3')]},'acceptAt':{'type':Sequelize[_0xa8d8('0x3')]},'exitAt':{'type':Sequelize[_0xa8d8('0x3')]},'reason':{'type':Sequelize[_0xa8d8('0x2')]}}; \ No newline at end of file diff --git a/server/api/faxQueueReport/faxQueueReport.controller.js b/server/api/faxQueueReport/faxQueueReport.controller.js index 0206098..b090bef 100644 --- a/server/api/faxQueueReport/faxQueueReport.controller.js +++ b/server/api/faxQueueReport/faxQueueReport.controller.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x6f7a=['squel','desk.js','querystring','papaparse','ioredis','../../components/parsers/advancedSearch','../../config/license/hardware','api','../../config/environment','../../config/license/util','../../mysqldb','status','end','json','undefined','limit','offset','count','set','Content-Range','apply','sendStatus','error','name','index','map','FaxQueueReport','rawAttributes','fieldName','key','model','query','filters','intersection','attributes','fields','length','hasOwnProperty','nolimit','order','sort','where','filter','merge','type','VIRTUAL','options','includeAll','include','findAll','then','catch','show','params','keys','create','body','find','destroy','describe','eml-format','rimraf','zip-dir','fast-json-patch','moment','bluebird','mustache','util','path','sox','to-csv','ejs','fs-extra','lodash'];(function(_0x5c0085,_0x4fa8e5){var _0x242a6a=function(_0x42129f){while(--_0x42129f){_0x5c0085['push'](_0x5c0085['shift']());}};_0x242a6a(++_0x4fa8e5);}(_0x6f7a,0x1ae));var _0xa6f7=function(_0x843628,_0x5a5987){_0x843628=_0x843628-0x0;var _0x2b4aac=_0x6f7a[_0x843628];return _0x2b4aac;};'use strict';var emlformat=require(_0xa6f7('0x0'));var rimraf=require(_0xa6f7('0x1'));var zipdir=require(_0xa6f7('0x2'));var jsonpatch=require(_0xa6f7('0x3'));var rp=require('request-promise');var moment=require(_0xa6f7('0x4'));var BPromise=require(_0xa6f7('0x5'));var Mustache=require(_0xa6f7('0x6'));var util=require(_0xa6f7('0x7'));var path=require(_0xa6f7('0x8'));var sox=require(_0xa6f7('0x9'));var csv=require(_0xa6f7('0xa'));var ejs=require(_0xa6f7('0xb'));var fs=require('fs');var fs_extra=require(_0xa6f7('0xc'));var _=require(_0xa6f7('0xd'));var squel=require(_0xa6f7('0xe'));var crypto=require('crypto');var jsforce=require('jsforce');var deskjs=require(_0xa6f7('0xf'));var toCsv=require(_0xa6f7('0xa'));var querystring=require(_0xa6f7('0x10'));var Papa=require(_0xa6f7('0x11'));var Redis=require(_0xa6f7('0x12'));var authService=require('../../components/auth/service');var qs=require('../../components/parsers/qs');var as=require(_0xa6f7('0x13'));var hardwareService=require(_0xa6f7('0x14'));var logger=require('../../config/logger')(_0xa6f7('0x15'));var utils=require('../../config/utils');var config=require(_0xa6f7('0x16'));var licenseUtil=require(_0xa6f7('0x17'));var db=require(_0xa6f7('0x18'))['db'];function respondWithStatusCode(_0xd5558b,_0x5a3035){_0x5a3035=_0x5a3035||0xcc;return function(_0x3fc7f1){if(_0x3fc7f1){return _0xd5558b['sendStatus'](_0x5a3035);}return _0xd5558b[_0xa6f7('0x19')](_0x5a3035)[_0xa6f7('0x1a')]();};}function respondWithResult(_0x25c123,_0x4d3d59){_0x4d3d59=_0x4d3d59||0xc8;return function(_0x34c02d){if(_0x34c02d){return _0x25c123['status'](_0x4d3d59)[_0xa6f7('0x1b')](_0x34c02d);}};}function respondWithFilteredResult(_0x57308a,_0x17b814){return function(_0x17f9c5){if(_0x17f9c5){var _0x6efd38=typeof _0x17b814['offset']===_0xa6f7('0x1c')&&typeof _0x17b814[_0xa6f7('0x1d')]===_0xa6f7('0x1c');var _0x2401b9=_0x17f9c5['count'];var _0x4a8827=_0x6efd38?0x0:_0x17b814[_0xa6f7('0x1e')];var _0x5298ba=_0x6efd38?_0x17f9c5[_0xa6f7('0x1f')]:_0x17b814[_0xa6f7('0x1e')]+_0x17b814['limit'];var _0x18fc4a;if(_0x5298ba>=_0x2401b9){_0x5298ba=_0x2401b9;_0x18fc4a=0xc8;}else{_0x18fc4a=0xce;}_0x57308a[_0xa6f7('0x19')](_0x18fc4a);return _0x57308a[_0xa6f7('0x20')](_0xa6f7('0x21'),_0x4a8827+'-'+_0x5298ba+'/'+_0x2401b9)[_0xa6f7('0x1b')](_0x17f9c5);}return null;};}function patchUpdates(_0x1aa8dc){return function(_0x4887ad){try{jsonpatch[_0xa6f7('0x22')](_0x4887ad,_0x1aa8dc,!![]);}catch(_0x45d79e){return BPromise['reject'](_0x45d79e);}return _0x4887ad['save']();};}function saveUpdates(_0x5ddc8d,_0x1de6c9){return function(_0x119950){if(_0x119950){return _0x119950['update'](_0x5ddc8d)['then'](function(_0x50e2be){return _0x50e2be;});}return null;};}function removeEntity(_0x2b6a84,_0xc77e8e){return function(_0x28263e){if(_0x28263e){return _0x28263e['destroy']()['then'](function(){_0x2b6a84[_0xa6f7('0x19')](0xcc)['end']();});}};}function handleEntityNotFound(_0x47ef97,_0x402d25){return function(_0x5efdce){if(!_0x5efdce){_0x47ef97[_0xa6f7('0x23')](0x194);}return _0x5efdce;};}function handleError(_0x126d24,_0x3c79ea){_0x3c79ea=_0x3c79ea||0x1f4;return function(_0x2b4c6c){logger[_0xa6f7('0x24')](_0x2b4c6c['stack']);if(_0x2b4c6c['name']){delete _0x2b4c6c[_0xa6f7('0x25')];}_0x126d24[_0xa6f7('0x19')](_0x3c79ea)['send'](_0x2b4c6c);};}exports[_0xa6f7('0x26')]=function(_0x27babb,_0x87bccc){var _0x3a7ff9={},_0x224f5a={},_0x10bf77={'count':0x0,'rows':[]};var _0x353de8=_[_0xa6f7('0x27')](db[_0xa6f7('0x28')][_0xa6f7('0x29')],function(_0x40b0f8){return{'name':_0x40b0f8[_0xa6f7('0x2a')],'type':_0x40b0f8['type'][_0xa6f7('0x2b')]};});_0x224f5a[_0xa6f7('0x2c')]=_['map'](_0x353de8,_0xa6f7('0x25'));_0x224f5a[_0xa6f7('0x2d')]=_['keys'](_0x27babb['query']);_0x224f5a[_0xa6f7('0x2e')]=_[_0xa6f7('0x2f')](_0x224f5a[_0xa6f7('0x2c')],_0x224f5a[_0xa6f7('0x2d')]);_0x3a7ff9[_0xa6f7('0x30')]=_['intersection'](_0x224f5a['model'],qs[_0xa6f7('0x31')](_0x27babb['query'][_0xa6f7('0x31')]));_0x3a7ff9[_0xa6f7('0x30')]=_0x3a7ff9[_0xa6f7('0x30')][_0xa6f7('0x32')]?_0x3a7ff9[_0xa6f7('0x30')]:_0x224f5a[_0xa6f7('0x2c')];if(!_0x27babb['query'][_0xa6f7('0x33')](_0xa6f7('0x34'))){_0x3a7ff9[_0xa6f7('0x1d')]=qs['limit'](_0x27babb[_0xa6f7('0x2d')]['limit']);_0x3a7ff9[_0xa6f7('0x1e')]=qs[_0xa6f7('0x1e')](_0x27babb[_0xa6f7('0x2d')]['offset']);}_0x3a7ff9[_0xa6f7('0x35')]=qs[_0xa6f7('0x36')](_0x27babb[_0xa6f7('0x2d')][_0xa6f7('0x36')]);_0x3a7ff9[_0xa6f7('0x37')]=qs[_0xa6f7('0x2e')](_['pick'](_0x27babb[_0xa6f7('0x2d')],_0x224f5a[_0xa6f7('0x2e')]),_0x353de8);if(_0x27babb[_0xa6f7('0x2d')][_0xa6f7('0x38')]){_0x3a7ff9[_0xa6f7('0x37')]=_[_0xa6f7('0x39')](_0x3a7ff9[_0xa6f7('0x37')],{'$or':_[_0xa6f7('0x27')](_0x353de8,function(_0x4c2d2e){if(_0x4c2d2e[_0xa6f7('0x3a')]!==_0xa6f7('0x3b')){var _0x353e54={};_0x353e54[_0x4c2d2e['name']]={'$like':'%'+_0x27babb[_0xa6f7('0x2d')][_0xa6f7('0x38')]+'%'};return _0x353e54;}})});}_0x3a7ff9=_['merge']({},_0x3a7ff9,_0x27babb[_0xa6f7('0x3c')]);var _0x13c7c4={'where':_0x3a7ff9[_0xa6f7('0x37')]};return db[_0xa6f7('0x28')][_0xa6f7('0x1f')](_0x13c7c4)['then'](function(_0x2e3eb2){_0x10bf77[_0xa6f7('0x1f')]=_0x2e3eb2;if(_0x27babb[_0xa6f7('0x2d')][_0xa6f7('0x3d')]){_0x3a7ff9[_0xa6f7('0x3e')]=[{'all':!![]}];}return db[_0xa6f7('0x28')][_0xa6f7('0x3f')](_0x3a7ff9);})[_0xa6f7('0x40')](function(_0x5646b9){_0x10bf77['rows']=_0x5646b9;return _0x10bf77;})[_0xa6f7('0x40')](respondWithFilteredResult(_0x87bccc,_0x3a7ff9))[_0xa6f7('0x41')](handleError(_0x87bccc,null));};exports[_0xa6f7('0x42')]=function(_0x2546a3,_0x2ac07f){var _0x387714={'raw':!![],'where':{'id':_0x2546a3[_0xa6f7('0x43')]['id']}},_0x21fdd7={};_0x21fdd7[_0xa6f7('0x2c')]=_[_0xa6f7('0x44')](db['FaxQueueReport'][_0xa6f7('0x29')]);_0x21fdd7[_0xa6f7('0x2d')]=_['keys'](_0x2546a3[_0xa6f7('0x2d')]);_0x21fdd7[_0xa6f7('0x2e')]=_[_0xa6f7('0x2f')](_0x21fdd7[_0xa6f7('0x2c')],_0x21fdd7['query']);_0x387714[_0xa6f7('0x30')]=_['intersection'](_0x21fdd7['model'],qs[_0xa6f7('0x31')](_0x2546a3[_0xa6f7('0x2d')][_0xa6f7('0x31')]));_0x387714[_0xa6f7('0x30')]=_0x387714[_0xa6f7('0x30')][_0xa6f7('0x32')]?_0x387714[_0xa6f7('0x30')]:_0x21fdd7['model'];if(_0x2546a3[_0xa6f7('0x2d')][_0xa6f7('0x3d')]){_0x387714['include']=[{'all':!![]}];}_0x387714=_[_0xa6f7('0x39')]({},_0x387714,_0x2546a3[_0xa6f7('0x3c')]);return db[_0xa6f7('0x28')]['find'](_0x387714)[_0xa6f7('0x40')](handleEntityNotFound(_0x2ac07f,null))['then'](respondWithResult(_0x2ac07f,null))[_0xa6f7('0x41')](handleError(_0x2ac07f,null));};exports[_0xa6f7('0x45')]=function(_0x260e77,_0x5f3c84){return db['FaxQueueReport'][_0xa6f7('0x45')](_0x260e77['body'],{})[_0xa6f7('0x40')](respondWithResult(_0x5f3c84,0xc9))['catch'](handleError(_0x5f3c84,null));};exports['update']=function(_0x1e7089,_0x2e3a04){if(_0x1e7089[_0xa6f7('0x46')]['id']){delete _0x1e7089[_0xa6f7('0x46')]['id'];}return db[_0xa6f7('0x28')][_0xa6f7('0x47')]({'where':{'id':_0x1e7089['params']['id']}})[_0xa6f7('0x40')](handleEntityNotFound(_0x2e3a04,null))[_0xa6f7('0x40')](saveUpdates(_0x1e7089['body'],null))[_0xa6f7('0x40')](respondWithResult(_0x2e3a04,null))['catch'](handleError(_0x2e3a04,null));};exports[_0xa6f7('0x48')]=function(_0x59091a,_0x488efc){return db[_0xa6f7('0x28')][_0xa6f7('0x47')]({'where':{'id':_0x59091a[_0xa6f7('0x43')]['id']}})[_0xa6f7('0x40')](handleEntityNotFound(_0x488efc,null))[_0xa6f7('0x40')](removeEntity(_0x488efc,null))['catch'](handleError(_0x488efc,null));};exports[_0xa6f7('0x49')]=function(_0x34de29,_0x5cddc9){return db[_0xa6f7('0x28')]['describe']()[_0xa6f7('0x40')](respondWithResult(_0x5cddc9,null))[_0xa6f7('0x41')](handleError(_0x5cddc9,null));}; \ No newline at end of file +var _0x8f7d=['type','VIRTUAL','options','includeAll','include','findAll','catch','show','params','find','create','body','update','describe','eml-format','rimraf','fast-json-patch','bluebird','util','path','sox','to-csv','fs-extra','lodash','squel','crypto','jsforce','desk.js','querystring','ioredis','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','sendStatus','status','end','json','offset','undefined','limit','count','Content-Range','apply','reject','save','then','destroy','error','stack','send','index','map','FaxQueueReport','rawAttributes','fieldName','model','name','keys','query','filters','intersection','fields','attributes','length','hasOwnProperty','nolimit','order','sort','where','filter','merge'];(function(_0x53174f,_0x986a3b){var _0x1cbd1c=function(_0x5bbcb1){while(--_0x5bbcb1){_0x53174f['push'](_0x53174f['shift']());}};_0x1cbd1c(++_0x986a3b);}(_0x8f7d,0xf5));var _0xd8f7=function(_0x5930e1,_0x3b23c7){_0x5930e1=_0x5930e1-0x0;var _0x34cfc9=_0x8f7d[_0x5930e1];return _0x34cfc9;};'use strict';var emlformat=require(_0xd8f7('0x0'));var rimraf=require(_0xd8f7('0x1'));var zipdir=require('zip-dir');var jsonpatch=require(_0xd8f7('0x2'));var rp=require('request-promise');var moment=require('moment');var BPromise=require(_0xd8f7('0x3'));var Mustache=require('mustache');var util=require(_0xd8f7('0x4'));var path=require(_0xd8f7('0x5'));var sox=require(_0xd8f7('0x6'));var csv=require(_0xd8f7('0x7'));var ejs=require('ejs');var fs=require('fs');var fs_extra=require(_0xd8f7('0x8'));var _=require(_0xd8f7('0x9'));var squel=require(_0xd8f7('0xa'));var crypto=require(_0xd8f7('0xb'));var jsforce=require(_0xd8f7('0xc'));var deskjs=require(_0xd8f7('0xd'));var toCsv=require(_0xd8f7('0x7'));var querystring=require(_0xd8f7('0xe'));var Papa=require('papaparse');var Redis=require(_0xd8f7('0xf'));var authService=require('../../components/auth/service');var qs=require(_0xd8f7('0x10'));var as=require(_0xd8f7('0x11'));var hardwareService=require(_0xd8f7('0x12'));var logger=require(_0xd8f7('0x13'))(_0xd8f7('0x14'));var utils=require(_0xd8f7('0x15'));var config=require(_0xd8f7('0x16'));var licenseUtil=require(_0xd8f7('0x17'));var db=require(_0xd8f7('0x18'))['db'];function respondWithStatusCode(_0x41ebd3,_0x29467b){_0x29467b=_0x29467b||0xcc;return function(_0x21ee60){if(_0x21ee60){return _0x41ebd3[_0xd8f7('0x19')](_0x29467b);}return _0x41ebd3[_0xd8f7('0x1a')](_0x29467b)[_0xd8f7('0x1b')]();};}function respondWithResult(_0x4406c7,_0x4b4114){_0x4b4114=_0x4b4114||0xc8;return function(_0x5c1177){if(_0x5c1177){return _0x4406c7['status'](_0x4b4114)[_0xd8f7('0x1c')](_0x5c1177);}};}function respondWithFilteredResult(_0x2b58c1,_0x341152){return function(_0x109488){if(_0x109488){var _0x299208=typeof _0x341152[_0xd8f7('0x1d')]===_0xd8f7('0x1e')&&typeof _0x341152[_0xd8f7('0x1f')]==='undefined';var _0x478e46=_0x109488['count'];var _0x202298=_0x299208?0x0:_0x341152[_0xd8f7('0x1d')];var _0x5d31c5=_0x299208?_0x109488[_0xd8f7('0x20')]:_0x341152[_0xd8f7('0x1d')]+_0x341152[_0xd8f7('0x1f')];var _0x48a97b;if(_0x5d31c5>=_0x478e46){_0x5d31c5=_0x478e46;_0x48a97b=0xc8;}else{_0x48a97b=0xce;}_0x2b58c1[_0xd8f7('0x1a')](_0x48a97b);return _0x2b58c1['set'](_0xd8f7('0x21'),_0x202298+'-'+_0x5d31c5+'/'+_0x478e46)[_0xd8f7('0x1c')](_0x109488);}return null;};}function patchUpdates(_0x4e0ec4){return function(_0xcbc2a5){try{jsonpatch[_0xd8f7('0x22')](_0xcbc2a5,_0x4e0ec4,!![]);}catch(_0x57bf17){return BPromise[_0xd8f7('0x23')](_0x57bf17);}return _0xcbc2a5[_0xd8f7('0x24')]();};}function saveUpdates(_0x54bc78,_0x2fc6cb){return function(_0x58469a){if(_0x58469a){return _0x58469a['update'](_0x54bc78)[_0xd8f7('0x25')](function(_0x4e1e10){return _0x4e1e10;});}return null;};}function removeEntity(_0x148d6f,_0x1bbe84){return function(_0x4d84bb){if(_0x4d84bb){return _0x4d84bb[_0xd8f7('0x26')]()[_0xd8f7('0x25')](function(){_0x148d6f[_0xd8f7('0x1a')](0xcc)[_0xd8f7('0x1b')]();});}};}function handleEntityNotFound(_0x8874d4,_0x380247){return function(_0x3ca18a){if(!_0x3ca18a){_0x8874d4[_0xd8f7('0x19')](0x194);}return _0x3ca18a;};}function handleError(_0x424b91,_0x8a8403){_0x8a8403=_0x8a8403||0x1f4;return function(_0x4ba0f){logger[_0xd8f7('0x27')](_0x4ba0f[_0xd8f7('0x28')]);if(_0x4ba0f['name']){delete _0x4ba0f['name'];}_0x424b91[_0xd8f7('0x1a')](_0x8a8403)[_0xd8f7('0x29')](_0x4ba0f);};}exports[_0xd8f7('0x2a')]=function(_0x20ef3a,_0x35ef58){var _0x101935={},_0x5d54b9={},_0x480635={'count':0x0,'rows':[]};var _0x12bf13=_[_0xd8f7('0x2b')](db[_0xd8f7('0x2c')][_0xd8f7('0x2d')],function(_0x3e2f76){return{'name':_0x3e2f76[_0xd8f7('0x2e')],'type':_0x3e2f76['type']['key']};});_0x5d54b9[_0xd8f7('0x2f')]=_['map'](_0x12bf13,_0xd8f7('0x30'));_0x5d54b9['query']=_[_0xd8f7('0x31')](_0x20ef3a[_0xd8f7('0x32')]);_0x5d54b9[_0xd8f7('0x33')]=_[_0xd8f7('0x34')](_0x5d54b9[_0xd8f7('0x2f')],_0x5d54b9[_0xd8f7('0x32')]);_0x101935['attributes']=_['intersection'](_0x5d54b9[_0xd8f7('0x2f')],qs[_0xd8f7('0x35')](_0x20ef3a['query'][_0xd8f7('0x35')]));_0x101935[_0xd8f7('0x36')]=_0x101935[_0xd8f7('0x36')][_0xd8f7('0x37')]?_0x101935[_0xd8f7('0x36')]:_0x5d54b9[_0xd8f7('0x2f')];if(!_0x20ef3a[_0xd8f7('0x32')][_0xd8f7('0x38')](_0xd8f7('0x39'))){_0x101935[_0xd8f7('0x1f')]=qs[_0xd8f7('0x1f')](_0x20ef3a['query']['limit']);_0x101935[_0xd8f7('0x1d')]=qs['offset'](_0x20ef3a['query'][_0xd8f7('0x1d')]);}_0x101935[_0xd8f7('0x3a')]=qs[_0xd8f7('0x3b')](_0x20ef3a[_0xd8f7('0x32')][_0xd8f7('0x3b')]);_0x101935[_0xd8f7('0x3c')]=qs['filters'](_['pick'](_0x20ef3a[_0xd8f7('0x32')],_0x5d54b9['filters']),_0x12bf13);if(_0x20ef3a[_0xd8f7('0x32')][_0xd8f7('0x3d')]){_0x101935[_0xd8f7('0x3c')]=_[_0xd8f7('0x3e')](_0x101935[_0xd8f7('0x3c')],{'$or':_[_0xd8f7('0x2b')](_0x12bf13,function(_0x40a26c){if(_0x40a26c[_0xd8f7('0x3f')]!==_0xd8f7('0x40')){var _0x41c08c={};_0x41c08c[_0x40a26c[_0xd8f7('0x30')]]={'$like':'%'+_0x20ef3a[_0xd8f7('0x32')][_0xd8f7('0x3d')]+'%'};return _0x41c08c;}})});}_0x101935=_['merge']({},_0x101935,_0x20ef3a[_0xd8f7('0x41')]);var _0x143e1a={'where':_0x101935[_0xd8f7('0x3c')]};return db[_0xd8f7('0x2c')][_0xd8f7('0x20')](_0x143e1a)[_0xd8f7('0x25')](function(_0x153ff0){_0x480635[_0xd8f7('0x20')]=_0x153ff0;if(_0x20ef3a['query'][_0xd8f7('0x42')]){_0x101935[_0xd8f7('0x43')]=[{'all':!![]}];}return db[_0xd8f7('0x2c')][_0xd8f7('0x44')](_0x101935);})[_0xd8f7('0x25')](function(_0x254c15){_0x480635['rows']=_0x254c15;return _0x480635;})[_0xd8f7('0x25')](respondWithFilteredResult(_0x35ef58,_0x101935))[_0xd8f7('0x45')](handleError(_0x35ef58,null));};exports[_0xd8f7('0x46')]=function(_0x51d5a2,_0x265429){var _0x244d12={'raw':!![],'where':{'id':_0x51d5a2[_0xd8f7('0x47')]['id']}},_0x5cadee={};_0x5cadee[_0xd8f7('0x2f')]=_['keys'](db['FaxQueueReport']['rawAttributes']);_0x5cadee[_0xd8f7('0x32')]=_[_0xd8f7('0x31')](_0x51d5a2[_0xd8f7('0x32')]);_0x5cadee[_0xd8f7('0x33')]=_['intersection'](_0x5cadee[_0xd8f7('0x2f')],_0x5cadee[_0xd8f7('0x32')]);_0x244d12[_0xd8f7('0x36')]=_[_0xd8f7('0x34')](_0x5cadee[_0xd8f7('0x2f')],qs[_0xd8f7('0x35')](_0x51d5a2[_0xd8f7('0x32')][_0xd8f7('0x35')]));_0x244d12[_0xd8f7('0x36')]=_0x244d12[_0xd8f7('0x36')][_0xd8f7('0x37')]?_0x244d12[_0xd8f7('0x36')]:_0x5cadee[_0xd8f7('0x2f')];if(_0x51d5a2[_0xd8f7('0x32')][_0xd8f7('0x42')]){_0x244d12[_0xd8f7('0x43')]=[{'all':!![]}];}_0x244d12=_['merge']({},_0x244d12,_0x51d5a2['options']);return db[_0xd8f7('0x2c')][_0xd8f7('0x48')](_0x244d12)[_0xd8f7('0x25')](handleEntityNotFound(_0x265429,null))['then'](respondWithResult(_0x265429,null))[_0xd8f7('0x45')](handleError(_0x265429,null));};exports[_0xd8f7('0x49')]=function(_0x20832d,_0x1e8343){return db['FaxQueueReport'][_0xd8f7('0x49')](_0x20832d[_0xd8f7('0x4a')],{})[_0xd8f7('0x25')](respondWithResult(_0x1e8343,0xc9))[_0xd8f7('0x45')](handleError(_0x1e8343,null));};exports[_0xd8f7('0x4b')]=function(_0x3a317c,_0x522fb2){if(_0x3a317c[_0xd8f7('0x4a')]['id']){delete _0x3a317c[_0xd8f7('0x4a')]['id'];}return db[_0xd8f7('0x2c')][_0xd8f7('0x48')]({'where':{'id':_0x3a317c[_0xd8f7('0x47')]['id']}})[_0xd8f7('0x25')](handleEntityNotFound(_0x522fb2,null))[_0xd8f7('0x25')](saveUpdates(_0x3a317c['body'],null))[_0xd8f7('0x25')](respondWithResult(_0x522fb2,null))['catch'](handleError(_0x522fb2,null));};exports[_0xd8f7('0x26')]=function(_0x2a797d,_0x19ccef){return db['FaxQueueReport']['find']({'where':{'id':_0x2a797d['params']['id']}})['then'](handleEntityNotFound(_0x19ccef,null))['then'](removeEntity(_0x19ccef,null))['catch'](handleError(_0x19ccef,null));};exports[_0xd8f7('0x4c')]=function(_0x14a307,_0x2bca2b){return db[_0xd8f7('0x2c')][_0xd8f7('0x4c')]()[_0xd8f7('0x25')](respondWithResult(_0x2bca2b,null))[_0xd8f7('0x45')](handleError(_0x2bca2b,null));}; \ No newline at end of file diff --git a/server/api/faxQueueReport/faxQueueReport.model.js b/server/api/faxQueueReport/faxQueueReport.model.js index d877e9e..bc8cc62 100644 --- a/server/api/faxQueueReport/faxQueueReport.model.js +++ b/server/api/faxQueueReport/faxQueueReport.model.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xabce=['path','rimraf','../../config/environment','define','report_fax_queue','uniqueid','lodash','util','../../config/logger','api','moment'];(function(_0x3816d2,_0x2e7550){var _0x2cb967=function(_0x280d36){while(--_0x280d36){_0x3816d2['push'](_0x3816d2['shift']());}};_0x2cb967(++_0x2e7550);}(_0xabce,0x103));var _0xeabc=function(_0x20c9b2,_0x55d7b1){_0x20c9b2=_0x20c9b2-0x0;var _0x2c6030=_0xabce[_0x20c9b2];return _0x2c6030;};'use strict';var _=require(_0xeabc('0x0'));var util=require(_0xeabc('0x1'));var logger=require(_0xeabc('0x2'))(_0xeabc('0x3'));var moment=require(_0xeabc('0x4'));var BPromise=require('bluebird');var rp=require('request-promise');var fs=require('fs');var path=require(_0xeabc('0x5'));var rimraf=require(_0xeabc('0x6'));var config=require(_0xeabc('0x7'));var attributes=require('./faxQueueReport.attributes');module['exports']=function(_0x1b07a8,_0x52a4d7){return _0x1b07a8[_0xeabc('0x8')]('FaxQueueReport',attributes,{'tableName':_0xeabc('0x9'),'paranoid':![],'indexes':[{'name':_0xeabc('0xa'),'fields':[_0xeabc('0xa')]}],'timestamps':!![]});}; \ No newline at end of file +var _0x53ec=['path','../../config/environment','./faxQueueReport.attributes','define','FaxQueueReport','uniqueid','lodash','util','../../config/logger','api','moment','bluebird'];(function(_0x372d8f,_0x856fec){var _0xb20127=function(_0x3b718e){while(--_0x3b718e){_0x372d8f['push'](_0x372d8f['shift']());}};_0xb20127(++_0x856fec);}(_0x53ec,0x192));var _0xc53e=function(_0xb6516e,_0x2c0401){_0xb6516e=_0xb6516e-0x0;var _0x575bed=_0x53ec[_0xb6516e];return _0x575bed;};'use strict';var _=require(_0xc53e('0x0'));var util=require(_0xc53e('0x1'));var logger=require(_0xc53e('0x2'))(_0xc53e('0x3'));var moment=require(_0xc53e('0x4'));var BPromise=require(_0xc53e('0x5'));var rp=require('request-promise');var fs=require('fs');var path=require(_0xc53e('0x6'));var rimraf=require('rimraf');var config=require(_0xc53e('0x7'));var attributes=require(_0xc53e('0x8'));module['exports']=function(_0x2f1414,_0x4f989b){return _0x2f1414[_0xc53e('0x9')](_0xc53e('0xa'),attributes,{'tableName':'report_fax_queue','paranoid':![],'indexes':[{'name':_0xc53e('0xb'),'fields':[_0xc53e('0xb')]}],'timestamps':!![]});}; \ No newline at end of file diff --git a/server/api/faxQueueReport/faxQueueReport.rpc.js b/server/api/faxQueueReport/faxQueueReport.rpc.js index ec65000..f919094 100644 --- a/server/api/faxQueueReport/faxQueueReport.rpc.js +++ b/server/api/faxQueueReport/faxQueueReport.rpc.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x5198=['create','body','options','raw','then','debug','UpdateFaxQueueReport','update','where','attributes','limit','lodash','bluebird','randomstring','../../mysqldb','../../config/utils','../../config/environment','jayson/promise','request','info','FaxQueueReport,\x20%s,\x20%s','request\x20sent','FaxQueueReport,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','catch','CreateFaxQueueReport','FaxQueueReport'];(function(_0x4156ef,_0x4699ca){var _0x1a0e21=function(_0x440a58){while(--_0x440a58){_0x4156ef['push'](_0x4156ef['shift']());}};_0x1a0e21(++_0x4699ca);}(_0x5198,0x1bd));var _0x8519=function(_0x7c3a83,_0x2e279a){_0x7c3a83=_0x7c3a83-0x0;var _0x54287b=_0x5198[_0x7c3a83];return _0x54287b;};'use strict';var _=require(_0x8519('0x0'));var util=require('util');var moment=require('moment');var BPromise=require(_0x8519('0x1'));var rs=require(_0x8519('0x2'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0x8519('0x3'))['db'];var utils=require(_0x8519('0x4'));var logger=require('../../config/logger')('rpc');var config=require(_0x8519('0x5'));var jayson=require(_0x8519('0x6'));var client=jayson['client']['http']({'port':0x232a});function respondWithRpcPromise(_0x5e7df4,_0x4d06bc,_0x22bfe9){return new BPromise(function(_0x3557ab,_0xa9b91f){return client[_0x8519('0x7')](_0x5e7df4,_0x22bfe9)['then'](function(_0x3f54e3){logger[_0x8519('0x8')](_0x8519('0x9'),_0x4d06bc,_0x8519('0xa'));logger['debug'](_0x8519('0xb'),_0x4d06bc,_0x8519('0xa'),JSON[_0x8519('0xc')](_0x3f54e3));if(_0x3f54e3['error']){if(_0x3f54e3[_0x8519('0xd')][_0x8519('0xe')]===0x1f4){logger[_0x8519('0xd')](_0x8519('0x9'),_0x4d06bc,_0x3f54e3[_0x8519('0xd')][_0x8519('0xf')]);return _0xa9b91f(_0x3f54e3[_0x8519('0xd')][_0x8519('0xf')]);}logger['error'](_0x8519('0x9'),_0x4d06bc,_0x3f54e3[_0x8519('0xd')][_0x8519('0xf')]);return _0x3557ab(_0x3f54e3[_0x8519('0xd')][_0x8519('0xf')]);}else{logger[_0x8519('0x8')](_0x8519('0x9'),_0x4d06bc,'request\x20sent');_0x3557ab(_0x3f54e3[_0x8519('0x10')][_0x8519('0xf')]);}})[_0x8519('0x11')](function(_0x392fe8){logger['error']('FaxQueueReport,\x20%s,\x20%s',_0x4d06bc,_0x392fe8);_0xa9b91f(_0x392fe8);});});}exports[_0x8519('0x12')]=function(_0x3b838f){var _0x2ba3b9=this;return new Promise(function(_0x12847d,_0x3c3c5e){return db[_0x8519('0x13')][_0x8519('0x14')](_0x3b838f[_0x8519('0x15')],{'raw':_0x3b838f[_0x8519('0x16')]?_0x3b838f[_0x8519('0x16')][_0x8519('0x17')]===undefined?!![]:![]:!![]})[_0x8519('0x18')](function(_0x17aa79){logger[_0x8519('0x8')](_0x8519('0x12'),_0x3b838f);logger[_0x8519('0x19')](_0x8519('0x12'),_0x3b838f,JSON[_0x8519('0xc')](_0x17aa79));_0x12847d(_0x17aa79);})['catch'](function(_0x5dd44f){logger[_0x8519('0xd')](_0x8519('0x12'),_0x5dd44f[_0x8519('0xf')],_0x3b838f);_0x3c3c5e(_0x2ba3b9['error'](0x1f4,_0x5dd44f[_0x8519('0xf')]));});});};exports[_0x8519('0x1a')]=function(_0x1c4956){var _0x2b7acf=this;return new Promise(function(_0x1e33e9,_0x496a8c){return db[_0x8519('0x13')][_0x8519('0x1b')](_0x1c4956[_0x8519('0x15')],{'raw':_0x1c4956[_0x8519('0x16')]?_0x1c4956[_0x8519('0x16')]['raw']===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x1c4956[_0x8519('0x16')]?_0x1c4956[_0x8519('0x16')][_0x8519('0x1c')]||null:null,'attributes':_0x1c4956['options']?_0x1c4956[_0x8519('0x16')][_0x8519('0x1d')]||null:null,'limit':_0x1c4956[_0x8519('0x16')]?_0x1c4956[_0x8519('0x16')][_0x8519('0x1e')]||null:null})[_0x8519('0x18')](function(_0x448932){logger['info'](_0x8519('0x1a'),_0x1c4956);logger[_0x8519('0x19')](_0x8519('0x1a'),_0x1c4956,JSON['stringify'](_0x448932));_0x1e33e9(_0x448932);})[_0x8519('0x11')](function(_0x271085){logger['error']('UpdateFaxQueueReport',_0x271085['message'],_0x1c4956);_0x496a8c(_0x2b7acf['error'](0x1f4,_0x271085['message']));});});}; \ No newline at end of file +var _0x41bf=['catch','body','where','UpdateFaxQueueReport','lodash','util','ioredis','../../config/logger','rpc','../../config/environment','jayson/promise','http','info','FaxQueueReport,\x20%s,\x20%s','debug','FaxQueueReport,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','message','result','CreateFaxQueueReport','FaxQueueReport','create','options','raw','then'];(function(_0x3d8417,_0x5a099b){var _0x46c5a2=function(_0x3f7657){while(--_0x3f7657){_0x3d8417['push'](_0x3d8417['shift']());}};_0x46c5a2(++_0x5a099b);}(_0x41bf,0xa6));var _0xf41b=function(_0x4808ef,_0x411bc7){_0x4808ef=_0x4808ef-0x0;var _0x218d14=_0x41bf[_0x4808ef];return _0x218d14;};'use strict';var _=require(_0xf41b('0x0'));var util=require(_0xf41b('0x1'));var moment=require('moment');var BPromise=require('bluebird');var rs=require('randomstring');var fs=require('fs');var Redis=require(_0xf41b('0x2'));var db=require('../../mysqldb')['db'];var utils=require('../../config/utils');var logger=require(_0xf41b('0x3'))(_0xf41b('0x4'));var config=require(_0xf41b('0x5'));var jayson=require(_0xf41b('0x6'));var client=jayson['client'][_0xf41b('0x7')]({'port':0x232a});function respondWithRpcPromise(_0x21a86a,_0x10f0b5,_0x191ba8){return new BPromise(function(_0x485aa0,_0x5602b1){return client['request'](_0x21a86a,_0x191ba8)['then'](function(_0x251d82){logger[_0xf41b('0x8')](_0xf41b('0x9'),_0x10f0b5,'request\x20sent');logger[_0xf41b('0xa')](_0xf41b('0xb'),_0x10f0b5,_0xf41b('0xc'),JSON[_0xf41b('0xd')](_0x251d82));if(_0x251d82['error']){if(_0x251d82['error']['code']===0x1f4){logger[_0xf41b('0xe')](_0xf41b('0x9'),_0x10f0b5,_0x251d82[_0xf41b('0xe')][_0xf41b('0xf')]);return _0x5602b1(_0x251d82['error']['message']);}logger[_0xf41b('0xe')](_0xf41b('0x9'),_0x10f0b5,_0x251d82['error'][_0xf41b('0xf')]);return _0x485aa0(_0x251d82[_0xf41b('0xe')]['message']);}else{logger[_0xf41b('0x8')](_0xf41b('0x9'),_0x10f0b5,_0xf41b('0xc'));_0x485aa0(_0x251d82[_0xf41b('0x10')][_0xf41b('0xf')]);}})['catch'](function(_0x2428de){logger[_0xf41b('0xe')](_0xf41b('0x9'),_0x10f0b5,_0x2428de);_0x5602b1(_0x2428de);});});}exports[_0xf41b('0x11')]=function(_0x521840){var _0x57c2cd=this;return new Promise(function(_0x38fe81,_0x5dbb91){return db[_0xf41b('0x12')][_0xf41b('0x13')](_0x521840['body'],{'raw':_0x521840[_0xf41b('0x14')]?_0x521840[_0xf41b('0x14')][_0xf41b('0x15')]===undefined?!![]:![]:!![]})[_0xf41b('0x16')](function(_0x33a497){logger['info'](_0xf41b('0x11'),_0x521840);logger[_0xf41b('0xa')](_0xf41b('0x11'),_0x521840,JSON[_0xf41b('0xd')](_0x33a497));_0x38fe81(_0x33a497);})[_0xf41b('0x17')](function(_0x28ce3b){logger[_0xf41b('0xe')](_0xf41b('0x11'),_0x28ce3b[_0xf41b('0xf')],_0x521840);_0x5dbb91(_0x57c2cd['error'](0x1f4,_0x28ce3b[_0xf41b('0xf')]));});});};exports['UpdateFaxQueueReport']=function(_0x17817d){var _0x1078b1=this;return new Promise(function(_0x2ede5e,_0x101ca7){return db[_0xf41b('0x12')]['update'](_0x17817d[_0xf41b('0x18')],{'raw':_0x17817d[_0xf41b('0x14')]?_0x17817d[_0xf41b('0x14')][_0xf41b('0x15')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x17817d[_0xf41b('0x14')]?_0x17817d[_0xf41b('0x14')][_0xf41b('0x19')]||null:null,'attributes':_0x17817d[_0xf41b('0x14')]?_0x17817d[_0xf41b('0x14')]['attributes']||null:null,'limit':_0x17817d[_0xf41b('0x14')]?_0x17817d[_0xf41b('0x14')]['limit']||null:null})[_0xf41b('0x16')](function(_0x33415d){logger[_0xf41b('0x8')](_0xf41b('0x1a'),_0x17817d);logger['debug'](_0xf41b('0x1a'),_0x17817d,JSON['stringify'](_0x33415d));_0x2ede5e(_0x33415d);})[_0xf41b('0x17')](function(_0x5da265){logger[_0xf41b('0xe')](_0xf41b('0x1a'),_0x5da265['message'],_0x17817d);_0x101ca7(_0x1078b1['error'](0x1f4,_0x5da265[_0xf41b('0xf')]));});});}; \ No newline at end of file diff --git a/server/api/faxQueueReport/index.js b/server/api/faxQueueReport/index.js index 9825e41..60ccfae 100644 --- a/server/api/faxQueueReport/index.js +++ b/server/api/faxQueueReport/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xccad=['../../config/environment','./faxQueueReport.controller','get','isAuthenticated','index','describe','show','post','create','put','delete','/:id','destroy','exports','multer','util','path','connect-timeout','Router','../../components/auth/service','../../components/interaction/service'];(function(_0x6b7672,_0x2c0db1){var _0x1c5e1f=function(_0x19be3d){while(--_0x19be3d){_0x6b7672['push'](_0x6b7672['shift']());}};_0x1c5e1f(++_0x2c0db1);}(_0xccad,0x1c7));var _0xdcca=function(_0x2053ea,_0x1ab2d4){_0x2053ea=_0x2053ea-0x0;var _0x2232c4=_0xccad[_0x2053ea];return _0x2232c4;};'use strict';var multer=require(_0xdcca('0x0'));var util=require(_0xdcca('0x1'));var path=require(_0xdcca('0x2'));var timeout=require(_0xdcca('0x3'));var express=require('express');var router=express[_0xdcca('0x4')]();var fs_extra=require('fs-extra');var auth=require(_0xdcca('0x5'));var interaction=require(_0xdcca('0x6'));var config=require(_0xdcca('0x7'));var controller=require(_0xdcca('0x8'));router[_0xdcca('0x9')]('/',auth[_0xdcca('0xa')](),controller[_0xdcca('0xb')]);router[_0xdcca('0x9')]('/describe',auth['isAuthenticated'](),controller[_0xdcca('0xc')]);router['get']('/:id',auth['isAuthenticated'](),controller[_0xdcca('0xd')]);router[_0xdcca('0xe')]('/',auth[_0xdcca('0xa')](),controller[_0xdcca('0xf')]);router[_0xdcca('0x10')]('/:id',auth['isAuthenticated'](),controller['update']);router[_0xdcca('0x11')](_0xdcca('0x12'),auth[_0xdcca('0xa')](),controller[_0xdcca('0x13')]);module[_0xdcca('0x14')]=router; \ No newline at end of file +var _0xbf05=['connect-timeout','express','Router','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','./faxQueueReport.controller','get','isAuthenticated','index','describe','/:id','show','post','put','update','delete','destroy','exports','multer','util','path'];(function(_0x57b54c,_0x54ce0d){var _0x59cc19=function(_0xa33bc6){while(--_0xa33bc6){_0x57b54c['push'](_0x57b54c['shift']());}};_0x59cc19(++_0x54ce0d);}(_0xbf05,0x13f));var _0x5bf0=function(_0x725cf8,_0x18bfae){_0x725cf8=_0x725cf8-0x0;var _0x4b0c66=_0xbf05[_0x725cf8];return _0x4b0c66;};'use strict';var multer=require(_0x5bf0('0x0'));var util=require(_0x5bf0('0x1'));var path=require(_0x5bf0('0x2'));var timeout=require(_0x5bf0('0x3'));var express=require(_0x5bf0('0x4'));var router=express[_0x5bf0('0x5')]();var fs_extra=require(_0x5bf0('0x6'));var auth=require(_0x5bf0('0x7'));var interaction=require(_0x5bf0('0x8'));var config=require(_0x5bf0('0x9'));var controller=require(_0x5bf0('0xa'));router[_0x5bf0('0xb')]('/',auth[_0x5bf0('0xc')](),controller[_0x5bf0('0xd')]);router[_0x5bf0('0xb')]('/describe',auth['isAuthenticated'](),controller[_0x5bf0('0xe')]);router['get'](_0x5bf0('0xf'),auth[_0x5bf0('0xc')](),controller[_0x5bf0('0x10')]);router[_0x5bf0('0x11')]('/',auth[_0x5bf0('0xc')](),controller['create']);router[_0x5bf0('0x12')](_0x5bf0('0xf'),auth[_0x5bf0('0xc')](),controller[_0x5bf0('0x13')]);router[_0x5bf0('0x14')](_0x5bf0('0xf'),auth[_0x5bf0('0xc')](),controller[_0x5bf0('0x15')]);module[_0x5bf0('0x16')]=router; \ No newline at end of file diff --git a/server/api/faxTransferReport/faxTransferReport.attributes.js b/server/api/faxTransferReport/faxTransferReport.attributes.js index 6db07b9..69aa3aa 100644 --- a/server/api/faxTransferReport/faxTransferReport.attributes.js +++ b/server/api/faxTransferReport/faxTransferReport.attributes.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x008c=['ENUM','agent','queue','DATE','NOW','moment','sequelize','exports','STRING'];(function(_0x519756,_0x288785){var _0x37047e=function(_0x3d64a7){while(--_0x3d64a7){_0x519756['push'](_0x519756['shift']());}};_0x37047e(++_0x288785);}(_0x008c,0x188));var _0xc008=function(_0x24594d,_0x18cfaa){_0x24594d=_0x24594d-0x0;var _0x215d28=_0x008c[_0x24594d];return _0x215d28;};'use strict';var moment=require(_0xc008('0x0'));var Sequelize=require(_0xc008('0x1'));module[_0xc008('0x2')]={'uniqueid':{'type':Sequelize[_0xc008('0x3')],'allowNull':![]},'type':{'type':Sequelize[_0xc008('0x4')]('account',_0xc008('0x5'),_0xc008('0x6')),'allowNull':![],'defaultValue':_0xc008('0x6')},'transferredAt':{'type':Sequelize[_0xc008('0x7')],'allowNull':![],'defaultValue':Sequelize[_0xc008('0x8')]}}; \ No newline at end of file +var _0xf3cd=['exports','STRING','ENUM','account','queue','DATE','moment','sequelize'];(function(_0xe4c93f,_0x5549b0){var _0x582ab1=function(_0x4c0cf8){while(--_0x4c0cf8){_0xe4c93f['push'](_0xe4c93f['shift']());}};_0x582ab1(++_0x5549b0);}(_0xf3cd,0xfe));var _0xdf3c=function(_0x399bfc,_0x36d4b0){_0x399bfc=_0x399bfc-0x0;var _0x36846d=_0xf3cd[_0x399bfc];return _0x36846d;};'use strict';var moment=require(_0xdf3c('0x0'));var Sequelize=require(_0xdf3c('0x1'));module[_0xdf3c('0x2')]={'uniqueid':{'type':Sequelize[_0xdf3c('0x3')],'allowNull':![]},'type':{'type':Sequelize[_0xdf3c('0x4')](_0xdf3c('0x5'),'agent',_0xdf3c('0x6')),'allowNull':![],'defaultValue':_0xdf3c('0x6')},'transferredAt':{'type':Sequelize[_0xdf3c('0x7')],'allowNull':![],'defaultValue':Sequelize['NOW']}}; \ No newline at end of file diff --git a/server/api/faxTransferReport/faxTransferReport.controller.js b/server/api/faxTransferReport/faxTransferReport.controller.js index 7b20587..a034174 100644 --- a/server/api/faxTransferReport/faxTransferReport.controller.js +++ b/server/api/faxTransferReport/faxTransferReport.controller.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xe3e9=['FaxTransferReport','rawAttributes','fieldName','type','model','keys','query','filters','attributes','intersection','fields','length','hasOwnProperty','nolimit','order','sort','where','pick','filter','VIRTUAL','merge','options','includeAll','include','findAll','rows','catch','create','body','find','params','describe','rimraf','zip-dir','moment','mustache','path','sox','to-csv','fs-extra','lodash','squel','crypto','jsforce','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','sendStatus','status','end','offset','limit','undefined','count','Content-Range','reject','save','update','then','destroy','error','stack','name','send','map'];(function(_0x56a2a3,_0xc99a73){var _0x592c8b=function(_0x320a55){while(--_0x320a55){_0x56a2a3['push'](_0x56a2a3['shift']());}};_0x592c8b(++_0xc99a73);}(_0xe3e9,0x6a));var _0x9e3e=function(_0x544ca2,_0x427ac9){_0x544ca2=_0x544ca2-0x0;var _0x1f0be5=_0xe3e9[_0x544ca2];return _0x1f0be5;};'use strict';var emlformat=require('eml-format');var rimraf=require(_0x9e3e('0x0'));var zipdir=require(_0x9e3e('0x1'));var jsonpatch=require('fast-json-patch');var rp=require('request-promise');var moment=require(_0x9e3e('0x2'));var BPromise=require('bluebird');var Mustache=require(_0x9e3e('0x3'));var util=require('util');var path=require(_0x9e3e('0x4'));var sox=require(_0x9e3e('0x5'));var csv=require(_0x9e3e('0x6'));var ejs=require('ejs');var fs=require('fs');var fs_extra=require(_0x9e3e('0x7'));var _=require(_0x9e3e('0x8'));var squel=require(_0x9e3e('0x9'));var crypto=require(_0x9e3e('0xa'));var jsforce=require(_0x9e3e('0xb'));var deskjs=require('desk.js');var toCsv=require(_0x9e3e('0x6'));var querystring=require(_0x9e3e('0xc'));var Papa=require(_0x9e3e('0xd'));var Redis=require(_0x9e3e('0xe'));var authService=require(_0x9e3e('0xf'));var qs=require(_0x9e3e('0x10'));var as=require(_0x9e3e('0x11'));var hardwareService=require(_0x9e3e('0x12'));var logger=require(_0x9e3e('0x13'))('api');var utils=require(_0x9e3e('0x14'));var config=require(_0x9e3e('0x15'));var licenseUtil=require(_0x9e3e('0x16'));var db=require(_0x9e3e('0x17'))['db'];function respondWithStatusCode(_0x1558b7,_0x2782a5){_0x2782a5=_0x2782a5||0xcc;return function(_0x4c1602){if(_0x4c1602){return _0x1558b7[_0x9e3e('0x18')](_0x2782a5);}return _0x1558b7[_0x9e3e('0x19')](_0x2782a5)[_0x9e3e('0x1a')]();};}function respondWithResult(_0x39329d,_0x783888){_0x783888=_0x783888||0xc8;return function(_0x2ec7ae){if(_0x2ec7ae){return _0x39329d['status'](_0x783888)['json'](_0x2ec7ae);}};}function respondWithFilteredResult(_0x3b3a08,_0x51bb1f){return function(_0x161a25){if(_0x161a25){var _0x3e5352=typeof _0x51bb1f[_0x9e3e('0x1b')]==='undefined'&&typeof _0x51bb1f[_0x9e3e('0x1c')]===_0x9e3e('0x1d');var _0x459b76=_0x161a25[_0x9e3e('0x1e')];var _0x5abd87=_0x3e5352?0x0:_0x51bb1f[_0x9e3e('0x1b')];var _0x103881=_0x3e5352?_0x161a25[_0x9e3e('0x1e')]:_0x51bb1f[_0x9e3e('0x1b')]+_0x51bb1f['limit'];var _0x179d6a;if(_0x103881>=_0x459b76){_0x103881=_0x459b76;_0x179d6a=0xc8;}else{_0x179d6a=0xce;}_0x3b3a08[_0x9e3e('0x19')](_0x179d6a);return _0x3b3a08['set'](_0x9e3e('0x1f'),_0x5abd87+'-'+_0x103881+'/'+_0x459b76)['json'](_0x161a25);}return null;};}function patchUpdates(_0x5e66d3){return function(_0x2e5f25){try{jsonpatch['apply'](_0x2e5f25,_0x5e66d3,!![]);}catch(_0x409dc9){return BPromise[_0x9e3e('0x20')](_0x409dc9);}return _0x2e5f25[_0x9e3e('0x21')]();};}function saveUpdates(_0x55b240,_0x11c721){return function(_0x57ea1a){if(_0x57ea1a){return _0x57ea1a[_0x9e3e('0x22')](_0x55b240)[_0x9e3e('0x23')](function(_0x462cd3){return _0x462cd3;});}return null;};}function removeEntity(_0xf7f74e,_0x3d1e7d){return function(_0xe87f85){if(_0xe87f85){return _0xe87f85[_0x9e3e('0x24')]()[_0x9e3e('0x23')](function(){_0xf7f74e[_0x9e3e('0x19')](0xcc)['end']();});}};}function handleEntityNotFound(_0x272602,_0xaab0ce){return function(_0x38166f){if(!_0x38166f){_0x272602[_0x9e3e('0x18')](0x194);}return _0x38166f;};}function handleError(_0x356010,_0x4b32c4){_0x4b32c4=_0x4b32c4||0x1f4;return function(_0x2d06a2){logger[_0x9e3e('0x25')](_0x2d06a2[_0x9e3e('0x26')]);if(_0x2d06a2[_0x9e3e('0x27')]){delete _0x2d06a2[_0x9e3e('0x27')];}_0x356010['status'](_0x4b32c4)[_0x9e3e('0x28')](_0x2d06a2);};}exports['index']=function(_0x3a06d7,_0x172466){var _0x3bbcc5={},_0x1c5922={},_0x2dd666={'count':0x0,'rows':[]};var _0x12e36e=_[_0x9e3e('0x29')](db[_0x9e3e('0x2a')][_0x9e3e('0x2b')],function(_0x4358f4){return{'name':_0x4358f4[_0x9e3e('0x2c')],'type':_0x4358f4[_0x9e3e('0x2d')]['key']};});_0x1c5922[_0x9e3e('0x2e')]=_[_0x9e3e('0x29')](_0x12e36e,_0x9e3e('0x27'));_0x1c5922['query']=_[_0x9e3e('0x2f')](_0x3a06d7[_0x9e3e('0x30')]);_0x1c5922[_0x9e3e('0x31')]=_['intersection'](_0x1c5922[_0x9e3e('0x2e')],_0x1c5922[_0x9e3e('0x30')]);_0x3bbcc5[_0x9e3e('0x32')]=_[_0x9e3e('0x33')](_0x1c5922[_0x9e3e('0x2e')],qs[_0x9e3e('0x34')](_0x3a06d7['query'][_0x9e3e('0x34')]));_0x3bbcc5[_0x9e3e('0x32')]=_0x3bbcc5[_0x9e3e('0x32')][_0x9e3e('0x35')]?_0x3bbcc5[_0x9e3e('0x32')]:_0x1c5922[_0x9e3e('0x2e')];if(!_0x3a06d7[_0x9e3e('0x30')][_0x9e3e('0x36')](_0x9e3e('0x37'))){_0x3bbcc5['limit']=qs[_0x9e3e('0x1c')](_0x3a06d7[_0x9e3e('0x30')][_0x9e3e('0x1c')]);_0x3bbcc5[_0x9e3e('0x1b')]=qs[_0x9e3e('0x1b')](_0x3a06d7[_0x9e3e('0x30')]['offset']);}_0x3bbcc5[_0x9e3e('0x38')]=qs['sort'](_0x3a06d7[_0x9e3e('0x30')][_0x9e3e('0x39')]);_0x3bbcc5[_0x9e3e('0x3a')]=qs[_0x9e3e('0x31')](_[_0x9e3e('0x3b')](_0x3a06d7[_0x9e3e('0x30')],_0x1c5922['filters']),_0x12e36e);if(_0x3a06d7[_0x9e3e('0x30')][_0x9e3e('0x3c')]){_0x3bbcc5['where']=_['merge'](_0x3bbcc5['where'],{'$or':_[_0x9e3e('0x29')](_0x12e36e,function(_0x570071){if(_0x570071[_0x9e3e('0x2d')]!==_0x9e3e('0x3d')){var _0x146c40={};_0x146c40[_0x570071['name']]={'$like':'%'+_0x3a06d7[_0x9e3e('0x30')][_0x9e3e('0x3c')]+'%'};return _0x146c40;}})});}_0x3bbcc5=_[_0x9e3e('0x3e')]({},_0x3bbcc5,_0x3a06d7[_0x9e3e('0x3f')]);var _0x54a174={'where':_0x3bbcc5[_0x9e3e('0x3a')]};return db[_0x9e3e('0x2a')][_0x9e3e('0x1e')](_0x54a174)[_0x9e3e('0x23')](function(_0x2b1774){_0x2dd666['count']=_0x2b1774;if(_0x3a06d7[_0x9e3e('0x30')][_0x9e3e('0x40')]){_0x3bbcc5[_0x9e3e('0x41')]=[{'all':!![]}];}return db[_0x9e3e('0x2a')][_0x9e3e('0x42')](_0x3bbcc5);})[_0x9e3e('0x23')](function(_0x274328){_0x2dd666[_0x9e3e('0x43')]=_0x274328;return _0x2dd666;})['then'](respondWithFilteredResult(_0x172466,_0x3bbcc5))[_0x9e3e('0x44')](handleError(_0x172466,null));};exports['show']=function(_0x150f43,_0x12716b){var _0x960f09={'raw':!![],'where':{'id':_0x150f43['params']['id']}},_0x451933={};_0x451933[_0x9e3e('0x2e')]=_[_0x9e3e('0x2f')](db[_0x9e3e('0x2a')][_0x9e3e('0x2b')]);_0x451933[_0x9e3e('0x30')]=_[_0x9e3e('0x2f')](_0x150f43['query']);_0x451933['filters']=_[_0x9e3e('0x33')](_0x451933[_0x9e3e('0x2e')],_0x451933['query']);_0x960f09[_0x9e3e('0x32')]=_[_0x9e3e('0x33')](_0x451933[_0x9e3e('0x2e')],qs[_0x9e3e('0x34')](_0x150f43[_0x9e3e('0x30')][_0x9e3e('0x34')]));_0x960f09[_0x9e3e('0x32')]=_0x960f09[_0x9e3e('0x32')][_0x9e3e('0x35')]?_0x960f09[_0x9e3e('0x32')]:_0x451933['model'];if(_0x150f43[_0x9e3e('0x30')][_0x9e3e('0x40')]){_0x960f09['include']=[{'all':!![]}];}_0x960f09=_[_0x9e3e('0x3e')]({},_0x960f09,_0x150f43[_0x9e3e('0x3f')]);return db[_0x9e3e('0x2a')]['find'](_0x960f09)[_0x9e3e('0x23')](handleEntityNotFound(_0x12716b,null))[_0x9e3e('0x23')](respondWithResult(_0x12716b,null))[_0x9e3e('0x44')](handleError(_0x12716b,null));};exports[_0x9e3e('0x45')]=function(_0x32ca35,_0x33f852){return db[_0x9e3e('0x2a')]['create'](_0x32ca35[_0x9e3e('0x46')],{})[_0x9e3e('0x23')](respondWithResult(_0x33f852,0xc9))['catch'](handleError(_0x33f852,null));};exports[_0x9e3e('0x22')]=function(_0x54fab1,_0xac2852){if(_0x54fab1[_0x9e3e('0x46')]['id']){delete _0x54fab1[_0x9e3e('0x46')]['id'];}return db['FaxTransferReport'][_0x9e3e('0x47')]({'where':{'id':_0x54fab1[_0x9e3e('0x48')]['id']}})['then'](handleEntityNotFound(_0xac2852,null))[_0x9e3e('0x23')](saveUpdates(_0x54fab1[_0x9e3e('0x46')],null))[_0x9e3e('0x23')](respondWithResult(_0xac2852,null))[_0x9e3e('0x44')](handleError(_0xac2852,null));};exports['destroy']=function(_0x30d785,_0x9b3822){return db[_0x9e3e('0x2a')][_0x9e3e('0x47')]({'where':{'id':_0x30d785[_0x9e3e('0x48')]['id']}})[_0x9e3e('0x23')](handleEntityNotFound(_0x9b3822,null))[_0x9e3e('0x23')](removeEntity(_0x9b3822,null))[_0x9e3e('0x44')](handleError(_0x9b3822,null));};exports[_0x9e3e('0x49')]=function(_0xae3ab,_0x525168){return db[_0x9e3e('0x2a')]['describe']()[_0x9e3e('0x23')](respondWithResult(_0x525168,null))[_0x9e3e('0x44')](handleError(_0x525168,null));}; \ No newline at end of file +var _0xbe99=['path','sox','ejs','fs-extra','squel','crypto','jsforce','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','../../config/environment','../../config/license/util','../../mysqldb','sendStatus','status','end','json','offset','limit','undefined','count','set','Content-Range','apply','save','update','then','destroy','error','stack','name','send','index','fieldName','type','model','map','query','keys','filters','intersection','attributes','fields','length','hasOwnProperty','order','sort','pick','filter','where','merge','VIRTUAL','options','FaxTransferReport','includeAll','include','findAll','rows','catch','show','rawAttributes','create','body','params','describe','eml-format','rimraf','fast-json-patch','mustache'];(function(_0x515afd,_0x1a1e91){var _0x536d53=function(_0x1d3a89){while(--_0x1d3a89){_0x515afd['push'](_0x515afd['shift']());}};_0x536d53(++_0x1a1e91);}(_0xbe99,0x1b2));var _0x9be9=function(_0x1f18b1,_0x38f43d){_0x1f18b1=_0x1f18b1-0x0;var _0x188618=_0xbe99[_0x1f18b1];return _0x188618;};'use strict';var emlformat=require(_0x9be9('0x0'));var rimraf=require(_0x9be9('0x1'));var zipdir=require('zip-dir');var jsonpatch=require(_0x9be9('0x2'));var rp=require('request-promise');var moment=require('moment');var BPromise=require('bluebird');var Mustache=require(_0x9be9('0x3'));var util=require('util');var path=require(_0x9be9('0x4'));var sox=require(_0x9be9('0x5'));var csv=require('to-csv');var ejs=require(_0x9be9('0x6'));var fs=require('fs');var fs_extra=require(_0x9be9('0x7'));var _=require('lodash');var squel=require(_0x9be9('0x8'));var crypto=require(_0x9be9('0x9'));var jsforce=require(_0x9be9('0xa'));var deskjs=require('desk.js');var toCsv=require('to-csv');var querystring=require('querystring');var Papa=require(_0x9be9('0xb'));var Redis=require(_0x9be9('0xc'));var authService=require(_0x9be9('0xd'));var qs=require(_0x9be9('0xe'));var as=require(_0x9be9('0xf'));var hardwareService=require(_0x9be9('0x10'));var logger=require(_0x9be9('0x11'))('api');var utils=require('../../config/utils');var config=require(_0x9be9('0x12'));var licenseUtil=require(_0x9be9('0x13'));var db=require(_0x9be9('0x14'))['db'];function respondWithStatusCode(_0x65838c,_0x2bec0f){_0x2bec0f=_0x2bec0f||0xcc;return function(_0x2d550f){if(_0x2d550f){return _0x65838c[_0x9be9('0x15')](_0x2bec0f);}return _0x65838c[_0x9be9('0x16')](_0x2bec0f)[_0x9be9('0x17')]();};}function respondWithResult(_0x278ba4,_0x3833a6){_0x3833a6=_0x3833a6||0xc8;return function(_0x54c4da){if(_0x54c4da){return _0x278ba4[_0x9be9('0x16')](_0x3833a6)[_0x9be9('0x18')](_0x54c4da);}};}function respondWithFilteredResult(_0x88f68b,_0x52d07c){return function(_0x45e811){if(_0x45e811){var _0x77b481=typeof _0x52d07c[_0x9be9('0x19')]==='undefined'&&typeof _0x52d07c[_0x9be9('0x1a')]===_0x9be9('0x1b');var _0x37e3bf=_0x45e811[_0x9be9('0x1c')];var _0x2b92b7=_0x77b481?0x0:_0x52d07c[_0x9be9('0x19')];var _0x3b0779=_0x77b481?_0x45e811[_0x9be9('0x1c')]:_0x52d07c[_0x9be9('0x19')]+_0x52d07c[_0x9be9('0x1a')];var _0x2cc318;if(_0x3b0779>=_0x37e3bf){_0x3b0779=_0x37e3bf;_0x2cc318=0xc8;}else{_0x2cc318=0xce;}_0x88f68b[_0x9be9('0x16')](_0x2cc318);return _0x88f68b[_0x9be9('0x1d')](_0x9be9('0x1e'),_0x2b92b7+'-'+_0x3b0779+'/'+_0x37e3bf)[_0x9be9('0x18')](_0x45e811);}return null;};}function patchUpdates(_0x475f4d){return function(_0xe679cb){try{jsonpatch[_0x9be9('0x1f')](_0xe679cb,_0x475f4d,!![]);}catch(_0x489573){return BPromise['reject'](_0x489573);}return _0xe679cb[_0x9be9('0x20')]();};}function saveUpdates(_0x20a656,_0x1ce403){return function(_0x2cbda8){if(_0x2cbda8){return _0x2cbda8[_0x9be9('0x21')](_0x20a656)[_0x9be9('0x22')](function(_0x5d0ac5){return _0x5d0ac5;});}return null;};}function removeEntity(_0x92de46,_0x4ad765){return function(_0x1ddffb){if(_0x1ddffb){return _0x1ddffb[_0x9be9('0x23')]()[_0x9be9('0x22')](function(){_0x92de46[_0x9be9('0x16')](0xcc)[_0x9be9('0x17')]();});}};}function handleEntityNotFound(_0x3065c9,_0x3b8c41){return function(_0x209406){if(!_0x209406){_0x3065c9[_0x9be9('0x15')](0x194);}return _0x209406;};}function handleError(_0x3fcbba,_0x195897){_0x195897=_0x195897||0x1f4;return function(_0x2f58a4){logger[_0x9be9('0x24')](_0x2f58a4[_0x9be9('0x25')]);if(_0x2f58a4[_0x9be9('0x26')]){delete _0x2f58a4[_0x9be9('0x26')];}_0x3fcbba[_0x9be9('0x16')](_0x195897)[_0x9be9('0x27')](_0x2f58a4);};}exports[_0x9be9('0x28')]=function(_0x1ce045,_0x26a434){var _0x4b288b={},_0x39afe8={},_0x2f4edb={'count':0x0,'rows':[]};var _0x21b217=_['map'](db['FaxTransferReport']['rawAttributes'],function(_0x50d7ca){return{'name':_0x50d7ca[_0x9be9('0x29')],'type':_0x50d7ca[_0x9be9('0x2a')]['key']};});_0x39afe8[_0x9be9('0x2b')]=_[_0x9be9('0x2c')](_0x21b217,_0x9be9('0x26'));_0x39afe8[_0x9be9('0x2d')]=_[_0x9be9('0x2e')](_0x1ce045[_0x9be9('0x2d')]);_0x39afe8[_0x9be9('0x2f')]=_[_0x9be9('0x30')](_0x39afe8[_0x9be9('0x2b')],_0x39afe8['query']);_0x4b288b[_0x9be9('0x31')]=_[_0x9be9('0x30')](_0x39afe8[_0x9be9('0x2b')],qs[_0x9be9('0x32')](_0x1ce045[_0x9be9('0x2d')][_0x9be9('0x32')]));_0x4b288b[_0x9be9('0x31')]=_0x4b288b['attributes'][_0x9be9('0x33')]?_0x4b288b[_0x9be9('0x31')]:_0x39afe8[_0x9be9('0x2b')];if(!_0x1ce045[_0x9be9('0x2d')][_0x9be9('0x34')]('nolimit')){_0x4b288b[_0x9be9('0x1a')]=qs['limit'](_0x1ce045[_0x9be9('0x2d')][_0x9be9('0x1a')]);_0x4b288b['offset']=qs[_0x9be9('0x19')](_0x1ce045[_0x9be9('0x2d')][_0x9be9('0x19')]);}_0x4b288b[_0x9be9('0x35')]=qs[_0x9be9('0x36')](_0x1ce045['query'][_0x9be9('0x36')]);_0x4b288b['where']=qs[_0x9be9('0x2f')](_[_0x9be9('0x37')](_0x1ce045[_0x9be9('0x2d')],_0x39afe8[_0x9be9('0x2f')]),_0x21b217);if(_0x1ce045[_0x9be9('0x2d')][_0x9be9('0x38')]){_0x4b288b[_0x9be9('0x39')]=_[_0x9be9('0x3a')](_0x4b288b['where'],{'$or':_[_0x9be9('0x2c')](_0x21b217,function(_0x31873c){if(_0x31873c[_0x9be9('0x2a')]!==_0x9be9('0x3b')){var _0x1eaa9b={};_0x1eaa9b[_0x31873c[_0x9be9('0x26')]]={'$like':'%'+_0x1ce045[_0x9be9('0x2d')][_0x9be9('0x38')]+'%'};return _0x1eaa9b;}})});}_0x4b288b=_[_0x9be9('0x3a')]({},_0x4b288b,_0x1ce045[_0x9be9('0x3c')]);var _0x1d3053={'where':_0x4b288b[_0x9be9('0x39')]};return db[_0x9be9('0x3d')][_0x9be9('0x1c')](_0x1d3053)['then'](function(_0x13a157){_0x2f4edb['count']=_0x13a157;if(_0x1ce045[_0x9be9('0x2d')][_0x9be9('0x3e')]){_0x4b288b[_0x9be9('0x3f')]=[{'all':!![]}];}return db[_0x9be9('0x3d')][_0x9be9('0x40')](_0x4b288b);})[_0x9be9('0x22')](function(_0x14dbad){_0x2f4edb[_0x9be9('0x41')]=_0x14dbad;return _0x2f4edb;})[_0x9be9('0x22')](respondWithFilteredResult(_0x26a434,_0x4b288b))[_0x9be9('0x42')](handleError(_0x26a434,null));};exports[_0x9be9('0x43')]=function(_0x1d3c8f,_0x195534){var _0x238361={'raw':!![],'where':{'id':_0x1d3c8f['params']['id']}},_0x17053b={};_0x17053b[_0x9be9('0x2b')]=_[_0x9be9('0x2e')](db[_0x9be9('0x3d')][_0x9be9('0x44')]);_0x17053b['query']=_[_0x9be9('0x2e')](_0x1d3c8f['query']);_0x17053b['filters']=_[_0x9be9('0x30')](_0x17053b[_0x9be9('0x2b')],_0x17053b[_0x9be9('0x2d')]);_0x238361['attributes']=_['intersection'](_0x17053b[_0x9be9('0x2b')],qs[_0x9be9('0x32')](_0x1d3c8f[_0x9be9('0x2d')]['fields']));_0x238361['attributes']=_0x238361[_0x9be9('0x31')]['length']?_0x238361[_0x9be9('0x31')]:_0x17053b[_0x9be9('0x2b')];if(_0x1d3c8f[_0x9be9('0x2d')]['includeAll']){_0x238361['include']=[{'all':!![]}];}_0x238361=_[_0x9be9('0x3a')]({},_0x238361,_0x1d3c8f[_0x9be9('0x3c')]);return db[_0x9be9('0x3d')]['find'](_0x238361)['then'](handleEntityNotFound(_0x195534,null))[_0x9be9('0x22')](respondWithResult(_0x195534,null))['catch'](handleError(_0x195534,null));};exports[_0x9be9('0x45')]=function(_0x3d8888,_0x22c18c){return db[_0x9be9('0x3d')]['create'](_0x3d8888['body'],{})[_0x9be9('0x22')](respondWithResult(_0x22c18c,0xc9))[_0x9be9('0x42')](handleError(_0x22c18c,null));};exports[_0x9be9('0x21')]=function(_0x24585e,_0x386fa4){if(_0x24585e[_0x9be9('0x46')]['id']){delete _0x24585e[_0x9be9('0x46')]['id'];}return db[_0x9be9('0x3d')]['find']({'where':{'id':_0x24585e[_0x9be9('0x47')]['id']}})[_0x9be9('0x22')](handleEntityNotFound(_0x386fa4,null))[_0x9be9('0x22')](saveUpdates(_0x24585e[_0x9be9('0x46')],null))[_0x9be9('0x22')](respondWithResult(_0x386fa4,null))['catch'](handleError(_0x386fa4,null));};exports[_0x9be9('0x23')]=function(_0x17ae2b,_0x17d078){return db[_0x9be9('0x3d')]['find']({'where':{'id':_0x17ae2b[_0x9be9('0x47')]['id']}})[_0x9be9('0x22')](handleEntityNotFound(_0x17d078,null))[_0x9be9('0x22')](removeEntity(_0x17d078,null))[_0x9be9('0x42')](handleError(_0x17d078,null));};exports['describe']=function(_0x338277,_0x4146d6){return db[_0x9be9('0x3d')][_0x9be9('0x48')]()[_0x9be9('0x22')](respondWithResult(_0x4146d6,null))['catch'](handleError(_0x4146d6,null));}; \ No newline at end of file diff --git a/server/api/faxTransferReport/faxTransferReport.model.js b/server/api/faxTransferReport/faxTransferReport.model.js index deb9312..dfe3720 100644 --- a/server/api/faxTransferReport/faxTransferReport.model.js +++ b/server/api/faxTransferReport/faxTransferReport.model.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xd9dd=['FaxTransferReport','uniqueid','../../config/logger','api','moment','path','../../config/environment','./faxTransferReport.attributes','define'];(function(_0x2eec7e,_0x8c4a6a){var _0x266083=function(_0x372bc7){while(--_0x372bc7){_0x2eec7e['push'](_0x2eec7e['shift']());}};_0x266083(++_0x8c4a6a);}(_0xd9dd,0x134));var _0xdd9d=function(_0xa464c9,_0x7c86d8){_0xa464c9=_0xa464c9-0x0;var _0x3d73c4=_0xd9dd[_0xa464c9];return _0x3d73c4;};'use strict';var _=require('lodash');var util=require('util');var logger=require(_0xdd9d('0x0'))(_0xdd9d('0x1'));var moment=require(_0xdd9d('0x2'));var BPromise=require('bluebird');var rp=require('request-promise');var fs=require('fs');var path=require(_0xdd9d('0x3'));var rimraf=require('rimraf');var config=require(_0xdd9d('0x4'));var attributes=require(_0xdd9d('0x5'));module['exports']=function(_0x180874,_0x13e45d){return _0x180874[_0xdd9d('0x6')](_0xdd9d('0x7'),attributes,{'tableName':'report_fax_transfer','paranoid':![],'indexes':[{'name':'uniqueid','fields':[_0xdd9d('0x8')]}],'timestamps':!![]});}; \ No newline at end of file +var _0xa0a3=['../../config/logger','moment','bluebird','request-promise','path','rimraf','../../config/environment','./faxTransferReport.attributes','exports','define','FaxTransferReport','report_fax_transfer','util'];(function(_0xe6d9df,_0x4cd0e1){var _0x5212d5=function(_0xf4091){while(--_0xf4091){_0xe6d9df['push'](_0xe6d9df['shift']());}};_0x5212d5(++_0x4cd0e1);}(_0xa0a3,0x1e0));var _0x3a0a=function(_0x3691a6,_0x3f0213){_0x3691a6=_0x3691a6-0x0;var _0x4a6b35=_0xa0a3[_0x3691a6];return _0x4a6b35;};'use strict';var _=require('lodash');var util=require(_0x3a0a('0x0'));var logger=require(_0x3a0a('0x1'))('api');var moment=require(_0x3a0a('0x2'));var BPromise=require(_0x3a0a('0x3'));var rp=require(_0x3a0a('0x4'));var fs=require('fs');var path=require(_0x3a0a('0x5'));var rimraf=require(_0x3a0a('0x6'));var config=require(_0x3a0a('0x7'));var attributes=require(_0x3a0a('0x8'));module[_0x3a0a('0x9')]=function(_0xa047cf,_0x3d7dc7){return _0xa047cf[_0x3a0a('0xa')](_0x3a0a('0xb'),attributes,{'tableName':_0x3a0a('0xc'),'paranoid':![],'indexes':[{'name':'uniqueid','fields':['uniqueid']}],'timestamps':!![]});}; \ No newline at end of file diff --git a/server/api/faxTransferReport/faxTransferReport.rpc.js b/server/api/faxTransferReport/faxTransferReport.rpc.js index d4b1217..f61e04f 100644 --- a/server/api/faxTransferReport/faxTransferReport.rpc.js +++ b/server/api/faxTransferReport/faxTransferReport.rpc.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x0b84=['FaxTransferReport,\x20%s,\x20%s','request\x20sent','debug','FaxTransferReport,\x20%s,\x20%s,\x20%s','stringify','error','code','message','info','result','catch','util','moment','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/environment','client','http','request','then'];(function(_0x6131cd,_0x4c26a1){var _0x47e916=function(_0x1f2bce){while(--_0x1f2bce){_0x6131cd['push'](_0x6131cd['shift']());}};_0x47e916(++_0x4c26a1);}(_0x0b84,0x1ad));var _0x40b8=function(_0x644560,_0x1783aa){_0x644560=_0x644560-0x0;var _0x41b76b=_0x0b84[_0x644560];return _0x41b76b;};'use strict';var _=require('lodash');var util=require(_0x40b8('0x0'));var moment=require(_0x40b8('0x1'));var BPromise=require('bluebird');var rs=require(_0x40b8('0x2'));var fs=require('fs');var Redis=require(_0x40b8('0x3'));var db=require(_0x40b8('0x4'))['db'];var utils=require(_0x40b8('0x5'));var logger=require('../../config/logger')('rpc');var config=require(_0x40b8('0x6'));var jayson=require('jayson/promise');var client=jayson[_0x40b8('0x7')][_0x40b8('0x8')]({'port':0x232a});function respondWithRpcPromise(_0x5938f7,_0x15b219,_0x35b984){return new BPromise(function(_0x3ac6f2,_0x3ec75f){return client[_0x40b8('0x9')](_0x5938f7,_0x35b984)[_0x40b8('0xa')](function(_0x406054){logger['info'](_0x40b8('0xb'),_0x15b219,_0x40b8('0xc'));logger[_0x40b8('0xd')](_0x40b8('0xe'),_0x15b219,'request\x20sent',JSON[_0x40b8('0xf')](_0x406054));if(_0x406054[_0x40b8('0x10')]){if(_0x406054['error'][_0x40b8('0x11')]===0x1f4){logger['error']('FaxTransferReport,\x20%s,\x20%s',_0x15b219,_0x406054[_0x40b8('0x10')][_0x40b8('0x12')]);return _0x3ec75f(_0x406054[_0x40b8('0x10')][_0x40b8('0x12')]);}logger[_0x40b8('0x10')]('FaxTransferReport,\x20%s,\x20%s',_0x15b219,_0x406054[_0x40b8('0x10')][_0x40b8('0x12')]);return _0x3ac6f2(_0x406054[_0x40b8('0x10')]['message']);}else{logger[_0x40b8('0x13')](_0x40b8('0xb'),_0x15b219,_0x40b8('0xc'));_0x3ac6f2(_0x406054[_0x40b8('0x14')][_0x40b8('0x12')]);}})[_0x40b8('0x15')](function(_0x45f6f8){logger['error'](_0x40b8('0xb'),_0x15b219,_0x45f6f8);_0x3ec75f(_0x45f6f8);});});} \ No newline at end of file +var _0x9e45=['client','request','FaxTransferReport,\x20%s,\x20%s','request\x20sent','stringify','error','code','message','info','result','lodash','moment','bluebird','randomstring','../../mysqldb','../../config/utils','rpc','../../config/environment'];(function(_0x5713b5,_0x423f83){var _0x2f795d=function(_0x392aea){while(--_0x392aea){_0x5713b5['push'](_0x5713b5['shift']());}};_0x2f795d(++_0x423f83);}(_0x9e45,0x1de));var _0x59e4=function(_0x1427ab,_0x4978fb){_0x1427ab=_0x1427ab-0x0;var _0x426299=_0x9e45[_0x1427ab];return _0x426299;};'use strict';var _=require(_0x59e4('0x0'));var util=require('util');var moment=require(_0x59e4('0x1'));var BPromise=require(_0x59e4('0x2'));var rs=require(_0x59e4('0x3'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0x59e4('0x4'))['db'];var utils=require(_0x59e4('0x5'));var logger=require('../../config/logger')(_0x59e4('0x6'));var config=require(_0x59e4('0x7'));var jayson=require('jayson/promise');var client=jayson[_0x59e4('0x8')]['http']({'port':0x232a});function respondWithRpcPromise(_0x1bddbb,_0x553944,_0x29fd2c){return new BPromise(function(_0x25856d,_0x7bfa39){return client[_0x59e4('0x9')](_0x1bddbb,_0x29fd2c)['then'](function(_0x5b0b46){logger['info'](_0x59e4('0xa'),_0x553944,_0x59e4('0xb'));logger['debug']('FaxTransferReport,\x20%s,\x20%s,\x20%s',_0x553944,'request\x20sent',JSON[_0x59e4('0xc')](_0x5b0b46));if(_0x5b0b46[_0x59e4('0xd')]){if(_0x5b0b46[_0x59e4('0xd')][_0x59e4('0xe')]===0x1f4){logger[_0x59e4('0xd')]('FaxTransferReport,\x20%s,\x20%s',_0x553944,_0x5b0b46[_0x59e4('0xd')][_0x59e4('0xf')]);return _0x7bfa39(_0x5b0b46[_0x59e4('0xd')]['message']);}logger[_0x59e4('0xd')](_0x59e4('0xa'),_0x553944,_0x5b0b46['error']['message']);return _0x25856d(_0x5b0b46[_0x59e4('0xd')][_0x59e4('0xf')]);}else{logger[_0x59e4('0x10')]('FaxTransferReport,\x20%s,\x20%s',_0x553944,_0x59e4('0xb'));_0x25856d(_0x5b0b46[_0x59e4('0x11')][_0x59e4('0xf')]);}})['catch'](function(_0x30d039){logger['error'](_0x59e4('0xa'),_0x553944,_0x30d039);_0x7bfa39(_0x30d039);});});} \ No newline at end of file diff --git a/server/api/faxTransferReport/index.js b/server/api/faxTransferReport/index.js index 85b5600..88711f0 100644 --- a/server/api/faxTransferReport/index.js +++ b/server/api/faxTransferReport/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xd293=['fs-extra','../../components/auth/service','../../config/environment','get','isAuthenticated','/describe','describe','show','post','create','put','/:id','update','destroy','exports','multer','util','path','connect-timeout','express','Router'];(function(_0x59fac7,_0x10802a){var _0x36da7d=function(_0xd6e091){while(--_0xd6e091){_0x59fac7['push'](_0x59fac7['shift']());}};_0x36da7d(++_0x10802a);}(_0xd293,0x8d));var _0x3d29=function(_0x4724dd,_0x13f2bf){_0x4724dd=_0x4724dd-0x0;var _0x2fba82=_0xd293[_0x4724dd];return _0x2fba82;};'use strict';var multer=require(_0x3d29('0x0'));var util=require(_0x3d29('0x1'));var path=require(_0x3d29('0x2'));var timeout=require(_0x3d29('0x3'));var express=require(_0x3d29('0x4'));var router=express[_0x3d29('0x5')]();var fs_extra=require(_0x3d29('0x6'));var auth=require(_0x3d29('0x7'));var interaction=require('../../components/interaction/service');var config=require(_0x3d29('0x8'));var controller=require('./faxTransferReport.controller');router[_0x3d29('0x9')]('/',auth[_0x3d29('0xa')](),controller['index']);router[_0x3d29('0x9')](_0x3d29('0xb'),auth[_0x3d29('0xa')](),controller[_0x3d29('0xc')]);router[_0x3d29('0x9')]('/:id',auth['isAuthenticated'](),controller[_0x3d29('0xd')]);router[_0x3d29('0xe')]('/',auth[_0x3d29('0xa')](),controller[_0x3d29('0xf')]);router[_0x3d29('0x10')](_0x3d29('0x11'),auth[_0x3d29('0xa')](),controller[_0x3d29('0x12')]);router['delete'](_0x3d29('0x11'),auth[_0x3d29('0xa')](),controller[_0x3d29('0x13')]);module[_0x3d29('0x14')]=router; \ No newline at end of file +var _0x7825=['../../config/environment','get','isAuthenticated','/describe','describe','/:id','show','post','create','put','delete','exports','multer','util','path','connect-timeout','express','Router','fs-extra','../../components/auth/service','../../components/interaction/service'];(function(_0x20a584,_0xe384a5){var _0x4b41a8=function(_0x2127c6){while(--_0x2127c6){_0x20a584['push'](_0x20a584['shift']());}};_0x4b41a8(++_0xe384a5);}(_0x7825,0x147));var _0x5782=function(_0x2c534a,_0x18a19e){_0x2c534a=_0x2c534a-0x0;var _0x3f5c99=_0x7825[_0x2c534a];return _0x3f5c99;};'use strict';var multer=require(_0x5782('0x0'));var util=require(_0x5782('0x1'));var path=require(_0x5782('0x2'));var timeout=require(_0x5782('0x3'));var express=require(_0x5782('0x4'));var router=express[_0x5782('0x5')]();var fs_extra=require(_0x5782('0x6'));var auth=require(_0x5782('0x7'));var interaction=require(_0x5782('0x8'));var config=require(_0x5782('0x9'));var controller=require('./faxTransferReport.controller');router[_0x5782('0xa')]('/',auth[_0x5782('0xb')](),controller['index']);router[_0x5782('0xa')](_0x5782('0xc'),auth[_0x5782('0xb')](),controller[_0x5782('0xd')]);router['get'](_0x5782('0xe'),auth[_0x5782('0xb')](),controller[_0x5782('0xf')]);router[_0x5782('0x10')]('/',auth[_0x5782('0xb')](),controller[_0x5782('0x11')]);router[_0x5782('0x12')](_0x5782('0xe'),auth['isAuthenticated'](),controller['update']);router[_0x5782('0x13')]('/:id',auth[_0x5782('0xb')](),controller['destroy']);module[_0x5782('0x14')]=router; \ No newline at end of file diff --git a/server/api/intDeskAccount/index.js b/server/api/intDeskAccount/index.js index c1dcdde..d9598c2 100644 --- a/server/api/intDeskAccount/index.js +++ b/server/api/intDeskAccount/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x90d6=['exports','util','connect-timeout','express','../../components/auth/service','../../components/interaction/service','../../config/environment','isAuthenticated','index','get','/:id/configurations','getConfigurations','post','create','put','/:id','update','destroy'];(function(_0x9c2427,_0x17c865){var _0x51984f=function(_0x177af6){while(--_0x177af6){_0x9c2427['push'](_0x9c2427['shift']());}};_0x51984f(++_0x17c865);}(_0x90d6,0x18d));var _0x690d=function(_0xa1e3e3,_0x29fe0e){_0xa1e3e3=_0xa1e3e3-0x0;var _0xc980e9=_0x90d6[_0xa1e3e3];return _0xc980e9;};'use strict';var multer=require('multer');var util=require(_0x690d('0x0'));var path=require('path');var timeout=require(_0x690d('0x1'));var express=require(_0x690d('0x2'));var router=express['Router']();var fs_extra=require('fs-extra');var auth=require(_0x690d('0x3'));var interaction=require(_0x690d('0x4'));var config=require(_0x690d('0x5'));var controller=require('./intDeskAccount.controller');router['get']('/',auth[_0x690d('0x6')](),controller[_0x690d('0x7')]);router['get']('/:id',auth[_0x690d('0x6')](),controller['show']);router[_0x690d('0x8')](_0x690d('0x9'),auth[_0x690d('0x6')](),controller[_0x690d('0xa')]);router['get']('/:id/fields',auth[_0x690d('0x6')](),controller['getFields']);router[_0x690d('0xb')]('/',auth[_0x690d('0x6')](),controller[_0x690d('0xc')]);router[_0x690d('0xb')](_0x690d('0x9'),auth[_0x690d('0x6')](),controller['addConfiguration']);router[_0x690d('0xd')](_0x690d('0xe'),auth[_0x690d('0x6')](),controller[_0x690d('0xf')]);router['delete'](_0x690d('0xe'),auth[_0x690d('0x6')](),controller[_0x690d('0x10')]);module[_0x690d('0x11')]=router; \ No newline at end of file +var _0xe284=['express','Router','fs-extra','./intDeskAccount.controller','get','isAuthenticated','index','/:id','show','/:id/configurations','getConfigurations','/:id/fields','getFields','post','create','addConfiguration','put','delete','destroy','exports','multer','util','connect-timeout'];(function(_0x5981f0,_0x5ea307){var _0x532b20=function(_0x139a81){while(--_0x139a81){_0x5981f0['push'](_0x5981f0['shift']());}};_0x532b20(++_0x5ea307);}(_0xe284,0xfa));var _0x4e28=function(_0x5ca644,_0x3d2165){_0x5ca644=_0x5ca644-0x0;var _0x5c87a2=_0xe284[_0x5ca644];return _0x5c87a2;};'use strict';var multer=require(_0x4e28('0x0'));var util=require(_0x4e28('0x1'));var path=require('path');var timeout=require(_0x4e28('0x2'));var express=require(_0x4e28('0x3'));var router=express[_0x4e28('0x4')]();var fs_extra=require(_0x4e28('0x5'));var auth=require('../../components/auth/service');var interaction=require('../../components/interaction/service');var config=require('../../config/environment');var controller=require(_0x4e28('0x6'));router[_0x4e28('0x7')]('/',auth[_0x4e28('0x8')](),controller[_0x4e28('0x9')]);router[_0x4e28('0x7')](_0x4e28('0xa'),auth[_0x4e28('0x8')](),controller[_0x4e28('0xb')]);router['get'](_0x4e28('0xc'),auth[_0x4e28('0x8')](),controller[_0x4e28('0xd')]);router[_0x4e28('0x7')](_0x4e28('0xe'),auth[_0x4e28('0x8')](),controller[_0x4e28('0xf')]);router[_0x4e28('0x10')]('/',auth[_0x4e28('0x8')](),controller[_0x4e28('0x11')]);router[_0x4e28('0x10')](_0x4e28('0xc'),auth[_0x4e28('0x8')](),controller[_0x4e28('0x12')]);router[_0x4e28('0x13')](_0x4e28('0xa'),auth[_0x4e28('0x8')](),controller['update']);router[_0x4e28('0x14')]('/:id',auth[_0x4e28('0x8')](),controller[_0x4e28('0x15')]);module[_0x4e28('0x16')]=router; \ No newline at end of file diff --git a/server/api/intDeskAccount/intDeskAccount.attributes.js b/server/api/intDeskAccount/intDeskAccount.attributes.js index 0211f24..539bc99 100644 --- a/server/api/intDeskAccount/intDeskAccount.attributes.js +++ b/server/api/intDeskAccount/intDeskAccount.attributes.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xd1ad=['exports','STRING','ENUM','basic','newTab','integrationTab'];(function(_0x91a997,_0x411892){var _0x2ee914=function(_0x5443a5){while(--_0x5443a5){_0x91a997['push'](_0x91a997['shift']());}};_0x2ee914(++_0x411892);}(_0xd1ad,0xb4));var _0xdd1a=function(_0x2b5eae,_0x55010d){_0x2b5eae=_0x2b5eae-0x0;var _0x5f3ac9=_0xd1ad[_0x2b5eae];return _0x5f3ac9;};'use strict';var Sequelize=require('sequelize');module[_0xdd1a('0x0')]={'name':{'type':Sequelize['STRING']},'description':{'type':Sequelize['STRING']},'username':{'type':Sequelize[_0xdd1a('0x1')]},'remoteUri':{'type':Sequelize['STRING']},'authType':{'type':Sequelize[_0xdd1a('0x2')](_0xdd1a('0x3')),'defaultValue':_0xdd1a('0x3')},'password':{'type':Sequelize['STRING']},'consumerKey':{'type':Sequelize[_0xdd1a('0x1')]},'consumerSecret':{'type':Sequelize['STRING']},'token':{'type':Sequelize[_0xdd1a('0x1')]},'tokenSecret':{'type':Sequelize[_0xdd1a('0x1')]},'serverUrl':{'type':Sequelize['STRING'],'allowNull':![]},'type':{'type':Sequelize[_0xdd1a('0x2')]('integrationTab',_0xdd1a('0x4')),'defaultValue':_0xdd1a('0x5')}}; \ No newline at end of file +var _0x77ba=['STRING','basic','newTab','exports'];(function(_0x48f62a,_0x1b3782){var _0x4ebe15=function(_0x7f7728){while(--_0x7f7728){_0x48f62a['push'](_0x48f62a['shift']());}};_0x4ebe15(++_0x1b3782);}(_0x77ba,0x19f));var _0xa77b=function(_0x10dc64,_0x11bb29){_0x10dc64=_0x10dc64-0x0;var _0x9cf98d=_0x77ba[_0x10dc64];return _0x9cf98d;};'use strict';var Sequelize=require('sequelize');module[_0xa77b('0x0')]={'name':{'type':Sequelize[_0xa77b('0x1')]},'description':{'type':Sequelize['STRING']},'username':{'type':Sequelize[_0xa77b('0x1')]},'remoteUri':{'type':Sequelize[_0xa77b('0x1')]},'authType':{'type':Sequelize['ENUM'](_0xa77b('0x2')),'defaultValue':_0xa77b('0x2')},'password':{'type':Sequelize[_0xa77b('0x1')]},'consumerKey':{'type':Sequelize[_0xa77b('0x1')]},'consumerSecret':{'type':Sequelize['STRING']},'token':{'type':Sequelize[_0xa77b('0x1')]},'tokenSecret':{'type':Sequelize['STRING']},'serverUrl':{'type':Sequelize[_0xa77b('0x1')],'allowNull':![]},'type':{'type':Sequelize['ENUM']('integrationTab',_0xa77b('0x3')),'defaultValue':'integrationTab'}}; \ No newline at end of file diff --git a/server/api/intDeskAccount/intDeskAccount.controller.js b/server/api/intDeskAccount/intDeskAccount.controller.js index 4f8be6c..d3d0fb4 100644 --- a/server/api/intDeskAccount/intDeskAccount.controller.js +++ b/server/api/intDeskAccount/intDeskAccount.controller.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x9ce9=['findOne','DeskConfiguration','length','order','hasOwnProperty','AccountId','Subjects','getSubjects','channel','type','DeskField','Descriptions','getFields','priority','remoteUri','authType','username','password','consumerKey','consumerSecret','token','slice','substring','lastIndexOf','format','application/json','basic','Authorization','Basic\x20%s','%s:%s','base64','concat','_embedded','entries','active','label','getFields,\x20%s,\x20%s,\x20%s','stringify','test','Wrong\x20credentials','statusCode','eml-format','rimraf','fast-json-patch','moment','bluebird','util','path','sox','ejs','fs-extra','lodash','squel','crypto','jsforce','desk.js','to-csv','querystring','papaparse','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/logger','api','../../config/utils','../../config/environment','../../config/license/util','../../components/integrations/configuration','sendStatus','status','json','offset','undefined','limit','count','set','Content-Range','apply','reject','save','then','destroy','end','error','stack','send','index','DeskAccount','fieldName','model','map','name','query','keys','filters','intersection','attributes','fields','nolimit','sort','pick','filter','where','merge','VIRTUAL','include','findAll','rows','catch','show','rawAttributes','options','find','create','body','update','params','getConfigurations'];(function(_0x34503b,_0x54b357){var _0x54ab9a=function(_0x27f1ed){while(--_0x27f1ed){_0x34503b['push'](_0x34503b['shift']());}};_0x54ab9a(++_0x54b357);}(_0x9ce9,0x18b));var _0x99ce=function(_0x494136,_0x489cf6){_0x494136=_0x494136-0x0;var _0x94dcc2=_0x9ce9[_0x494136];return _0x94dcc2;};'use strict';var emlformat=require(_0x99ce('0x0'));var rimraf=require(_0x99ce('0x1'));var zipdir=require('zip-dir');var jsonpatch=require(_0x99ce('0x2'));var rp=require('request-promise');var moment=require(_0x99ce('0x3'));var BPromise=require(_0x99ce('0x4'));var Mustache=require('mustache');var util=require(_0x99ce('0x5'));var path=require(_0x99ce('0x6'));var sox=require(_0x99ce('0x7'));var csv=require('to-csv');var ejs=require(_0x99ce('0x8'));var fs=require('fs');var fs_extra=require(_0x99ce('0x9'));var _=require(_0x99ce('0xa'));var squel=require(_0x99ce('0xb'));var crypto=require(_0x99ce('0xc'));var jsforce=require(_0x99ce('0xd'));var deskjs=require(_0x99ce('0xe'));var toCsv=require(_0x99ce('0xf'));var querystring=require(_0x99ce('0x10'));var Papa=require(_0x99ce('0x11'));var Redis=require('ioredis');var authService=require(_0x99ce('0x12'));var qs=require(_0x99ce('0x13'));var as=require(_0x99ce('0x14'));var hardwareService=require('../../config/license/hardware');var logger=require(_0x99ce('0x15'))(_0x99ce('0x16'));var utils=require(_0x99ce('0x17'));var config=require(_0x99ce('0x18'));var licenseUtil=require(_0x99ce('0x19'));var db=require('../../mysqldb')['db'];var integrations=require(_0x99ce('0x1a'));function respondWithStatusCode(_0x4f5167,_0x2d9f62){_0x2d9f62=_0x2d9f62||0xcc;return function(_0x2bdfe2){if(_0x2bdfe2){return _0x4f5167[_0x99ce('0x1b')](_0x2d9f62);}return _0x4f5167[_0x99ce('0x1c')](_0x2d9f62)['end']();};}function respondWithResult(_0xaa1b79,_0x14d170){_0x14d170=_0x14d170||0xc8;return function(_0x220b94){if(_0x220b94){return _0xaa1b79[_0x99ce('0x1c')](_0x14d170)[_0x99ce('0x1d')](_0x220b94);}};}function respondWithFilteredResult(_0x3e2d12,_0x1daf32){return function(_0x284473){if(_0x284473){var _0x4e5952=typeof _0x1daf32[_0x99ce('0x1e')]===_0x99ce('0x1f')&&typeof _0x1daf32[_0x99ce('0x20')]===_0x99ce('0x1f');var _0x3968ea=_0x284473[_0x99ce('0x21')];var _0x1211ad=_0x4e5952?0x0:_0x1daf32[_0x99ce('0x1e')];var _0xf21d4e=_0x4e5952?_0x284473[_0x99ce('0x21')]:_0x1daf32['offset']+_0x1daf32[_0x99ce('0x20')];var _0x38367a;if(_0xf21d4e>=_0x3968ea){_0xf21d4e=_0x3968ea;_0x38367a=0xc8;}else{_0x38367a=0xce;}_0x3e2d12['status'](_0x38367a);return _0x3e2d12[_0x99ce('0x22')](_0x99ce('0x23'),_0x1211ad+'-'+_0xf21d4e+'/'+_0x3968ea)[_0x99ce('0x1d')](_0x284473);}return null;};}function patchUpdates(_0x1c1be8){return function(_0x3dff8e){try{jsonpatch[_0x99ce('0x24')](_0x3dff8e,_0x1c1be8,!![]);}catch(_0x5cfd3a){return BPromise[_0x99ce('0x25')](_0x5cfd3a);}return _0x3dff8e[_0x99ce('0x26')]();};}function saveUpdates(_0x395fbb,_0x3e5f97){return function(_0x472df7){if(_0x472df7){return _0x472df7['update'](_0x395fbb)[_0x99ce('0x27')](function(_0x499fca){return _0x499fca;});}return null;};}function removeEntity(_0x184703,_0x3963c1){return function(_0x3e7c43){if(_0x3e7c43){return _0x3e7c43[_0x99ce('0x28')]()[_0x99ce('0x27')](function(){_0x184703[_0x99ce('0x1c')](0xcc)[_0x99ce('0x29')]();});}};}function handleEntityNotFound(_0x20d02c,_0x3506e8){return function(_0x293c5f){if(!_0x293c5f){_0x20d02c[_0x99ce('0x1b')](0x194);}return _0x293c5f;};}function handleError(_0x13d767,_0x530499){_0x530499=_0x530499||0x1f4;return function(_0x3a4399){logger[_0x99ce('0x2a')](_0x3a4399[_0x99ce('0x2b')]);if(_0x3a4399['name']){delete _0x3a4399['name'];}_0x13d767[_0x99ce('0x1c')](_0x530499)[_0x99ce('0x2c')](_0x3a4399);};}exports[_0x99ce('0x2d')]=function(_0x36463f,_0x38e5e7){var _0x51bcd2={},_0x1196de={},_0x120bd0={'count':0x0,'rows':[]};var _0x204096=_['map'](db[_0x99ce('0x2e')]['rawAttributes'],function(_0x11dca4){return{'name':_0x11dca4[_0x99ce('0x2f')],'type':_0x11dca4['type']['key']};});_0x1196de[_0x99ce('0x30')]=_[_0x99ce('0x31')](_0x204096,_0x99ce('0x32'));_0x1196de[_0x99ce('0x33')]=_[_0x99ce('0x34')](_0x36463f[_0x99ce('0x33')]);_0x1196de[_0x99ce('0x35')]=_[_0x99ce('0x36')](_0x1196de['model'],_0x1196de[_0x99ce('0x33')]);_0x51bcd2[_0x99ce('0x37')]=_['intersection'](_0x1196de[_0x99ce('0x30')],qs['fields'](_0x36463f[_0x99ce('0x33')][_0x99ce('0x38')]));_0x51bcd2[_0x99ce('0x37')]=_0x51bcd2[_0x99ce('0x37')]['length']?_0x51bcd2[_0x99ce('0x37')]:_0x1196de[_0x99ce('0x30')];if(!_0x36463f[_0x99ce('0x33')]['hasOwnProperty'](_0x99ce('0x39'))){_0x51bcd2[_0x99ce('0x20')]=qs['limit'](_0x36463f[_0x99ce('0x33')]['limit']);_0x51bcd2[_0x99ce('0x1e')]=qs['offset'](_0x36463f[_0x99ce('0x33')][_0x99ce('0x1e')]);}_0x51bcd2['order']=qs[_0x99ce('0x3a')](_0x36463f[_0x99ce('0x33')][_0x99ce('0x3a')]);_0x51bcd2['where']=qs[_0x99ce('0x35')](_[_0x99ce('0x3b')](_0x36463f[_0x99ce('0x33')],_0x1196de['filters']),_0x204096);if(_0x36463f[_0x99ce('0x33')][_0x99ce('0x3c')]){_0x51bcd2[_0x99ce('0x3d')]=_[_0x99ce('0x3e')](_0x51bcd2[_0x99ce('0x3d')],{'$or':_[_0x99ce('0x31')](_0x204096,function(_0x1d5da2){if(_0x1d5da2['type']!==_0x99ce('0x3f')){var _0x4893e5={};_0x4893e5[_0x1d5da2['name']]={'$like':'%'+_0x36463f[_0x99ce('0x33')]['filter']+'%'};return _0x4893e5;}})});}_0x51bcd2=_[_0x99ce('0x3e')]({},_0x51bcd2,_0x36463f['options']);var _0x3554d9={'where':_0x51bcd2[_0x99ce('0x3d')]};return db[_0x99ce('0x2e')][_0x99ce('0x21')](_0x3554d9)[_0x99ce('0x27')](function(_0x4270a6){_0x120bd0[_0x99ce('0x21')]=_0x4270a6;if(_0x36463f[_0x99ce('0x33')]['includeAll']){_0x51bcd2[_0x99ce('0x40')]=[{'all':!![]}];}return db[_0x99ce('0x2e')][_0x99ce('0x41')](_0x51bcd2);})['then'](function(_0x197f96){_0x120bd0[_0x99ce('0x42')]=_0x197f96;return _0x120bd0;})[_0x99ce('0x27')](respondWithFilteredResult(_0x38e5e7,_0x51bcd2))[_0x99ce('0x43')](handleError(_0x38e5e7,null));};exports[_0x99ce('0x44')]=function(_0x23d80a,_0x53fd2e){var _0x38d936={'raw':![],'where':{'id':_0x23d80a['params']['id']}},_0x2e2161={};_0x2e2161[_0x99ce('0x30')]=_['keys'](db[_0x99ce('0x2e')][_0x99ce('0x45')]);_0x2e2161[_0x99ce('0x33')]=_['keys'](_0x23d80a['query']);_0x2e2161[_0x99ce('0x35')]=_[_0x99ce('0x36')](_0x2e2161[_0x99ce('0x30')],_0x2e2161['query']);_0x38d936[_0x99ce('0x37')]=_['intersection'](_0x2e2161[_0x99ce('0x30')],qs[_0x99ce('0x38')](_0x23d80a[_0x99ce('0x33')]['fields']));_0x38d936[_0x99ce('0x37')]=_0x38d936[_0x99ce('0x37')]['length']?_0x38d936[_0x99ce('0x37')]:_0x2e2161[_0x99ce('0x30')];if(_0x23d80a[_0x99ce('0x33')]['includeAll']){_0x38d936[_0x99ce('0x40')]=[{'all':!![]}];}_0x38d936=_['merge']({},_0x38d936,_0x23d80a[_0x99ce('0x46')]);return db[_0x99ce('0x2e')][_0x99ce('0x47')](_0x38d936)[_0x99ce('0x27')](handleEntityNotFound(_0x53fd2e,null))[_0x99ce('0x27')](respondWithResult(_0x53fd2e,null))['catch'](handleError(_0x53fd2e,null));};exports['create']=function(_0x370107,_0x1a2c6d){return db[_0x99ce('0x2e')][_0x99ce('0x48')](_0x370107[_0x99ce('0x49')],{})[_0x99ce('0x27')](respondWithResult(_0x1a2c6d,0xc9))[_0x99ce('0x43')](handleError(_0x1a2c6d,null));};exports[_0x99ce('0x4a')]=function(_0x19e594,_0x26636f){if(_0x19e594['body']['id']){delete _0x19e594[_0x99ce('0x49')]['id'];}return db[_0x99ce('0x2e')]['find']({'where':{'id':_0x19e594[_0x99ce('0x4b')]['id']}})['then'](handleEntityNotFound(_0x26636f,null))[_0x99ce('0x27')](saveUpdates(_0x19e594[_0x99ce('0x49')],null))[_0x99ce('0x27')](respondWithResult(_0x26636f,null))[_0x99ce('0x43')](handleError(_0x26636f,null));};exports[_0x99ce('0x28')]=function(_0x3ceafa,_0x2ed2f4){return db[_0x99ce('0x2e')][_0x99ce('0x47')]({'where':{'id':_0x3ceafa[_0x99ce('0x4b')]['id']}})['then'](handleEntityNotFound(_0x2ed2f4,null))[_0x99ce('0x27')](removeEntity(_0x2ed2f4,null))['catch'](handleError(_0x2ed2f4,null));};exports[_0x99ce('0x4c')]=function(_0x545347,_0x5798b6,_0x4d34e8){var _0x21895d={};var _0x3bbc24={};var _0x1869db;var _0x592f0e;return db[_0x99ce('0x2e')][_0x99ce('0x4d')]({'where':{'id':_0x545347['params']['id']}})[_0x99ce('0x27')](handleEntityNotFound(_0x5798b6,null))[_0x99ce('0x27')](function(_0x16cc3c){if(_0x16cc3c){_0x1869db=_0x16cc3c;_0x3bbc24[_0x99ce('0x30')]=_[_0x99ce('0x34')](db[_0x99ce('0x4e')][_0x99ce('0x45')]);_0x3bbc24[_0x99ce('0x33')]=_[_0x99ce('0x34')](_0x545347['query']);_0x3bbc24[_0x99ce('0x35')]=_[_0x99ce('0x36')](_0x3bbc24[_0x99ce('0x30')],_0x3bbc24['query']);_0x21895d[_0x99ce('0x37')]=_[_0x99ce('0x36')](_0x3bbc24[_0x99ce('0x30')],qs['fields'](_0x545347[_0x99ce('0x33')]['fields']));_0x21895d[_0x99ce('0x37')]=_0x21895d[_0x99ce('0x37')][_0x99ce('0x4f')]?_0x21895d[_0x99ce('0x37')]:_0x3bbc24[_0x99ce('0x30')];_0x21895d[_0x99ce('0x50')]=qs[_0x99ce('0x3a')](_0x545347[_0x99ce('0x33')][_0x99ce('0x3a')]);_0x21895d[_0x99ce('0x3d')]=qs[_0x99ce('0x35')](_['pick'](_0x545347[_0x99ce('0x33')],_0x3bbc24['filters']));if(_0x545347[_0x99ce('0x33')][_0x99ce('0x3c')]){_0x21895d[_0x99ce('0x3d')]=_[_0x99ce('0x3e')](_0x21895d[_0x99ce('0x3d')],{'$or':_['map'](_0x21895d[_0x99ce('0x37')],function(_0x567b19){var _0x692875={};_0x692875[_0x567b19]={'$like':'%'+_0x545347[_0x99ce('0x33')][_0x99ce('0x3c')]+'%'};return _0x692875;})});}_0x21895d=_[_0x99ce('0x3e')]({},_0x21895d,_0x545347['options']);return _0x1869db[_0x99ce('0x4c')](_0x21895d);}})[_0x99ce('0x27')](function(_0x23ab88){if(_0x23ab88){_0x592f0e=_0x23ab88[_0x99ce('0x4f')];if(!_0x545347['query'][_0x99ce('0x51')](_0x99ce('0x39'))){_0x21895d[_0x99ce('0x20')]=qs[_0x99ce('0x20')](_0x545347[_0x99ce('0x33')][_0x99ce('0x20')]);_0x21895d[_0x99ce('0x1e')]=qs[_0x99ce('0x1e')](_0x545347[_0x99ce('0x33')]['offset']);}return _0x1869db['getConfigurations'](_0x21895d);}})['then'](function(_0x28b1b9){if(_0x28b1b9){return _0x28b1b9?{'count':_0x592f0e,'rows':_0x28b1b9}:null;}})[_0x99ce('0x27')](respondWithResult(_0x5798b6,null))[_0x99ce('0x43')](handleError(_0x5798b6,null));};exports['addConfiguration']=function(_0x58e512,_0x3573c4,_0xf04083){if(_0x58e512['body']['id']){delete _0x58e512['body']['id'];}return db[_0x99ce('0x2e')][_0x99ce('0x4d')]({'where':{'id':_0x58e512[_0x99ce('0x4b')]['id']}})[_0x99ce('0x27')](handleEntityNotFound(_0x3573c4,null))[_0x99ce('0x27')](function(_0x10168c){if(_0x10168c){_0x58e512[_0x99ce('0x49')][_0x99ce('0x52')]=_0x10168c['id'];_0x58e512[_0x99ce('0x49')][_0x99ce('0x53')]=integrations[_0x99ce('0x54')](_0x58e512[_0x99ce('0x49')][_0x99ce('0x55')],_0x58e512['body'][_0x99ce('0x56')]);_0x58e512[_0x99ce('0x49')]['Descriptions']=integrations['getDescriptions'](_0x58e512[_0x99ce('0x49')][_0x99ce('0x55')],_0x58e512[_0x99ce('0x49')][_0x99ce('0x56')]);return db[_0x99ce('0x4e')][_0x99ce('0x48')](_0x58e512[_0x99ce('0x49')],{'include':[{'model':db[_0x99ce('0x57')],'as':_0x99ce('0x53')},{'model':db[_0x99ce('0x57')],'as':_0x99ce('0x58')}]});}return null;})['then'](respondWithResult(_0x3573c4,null))[_0x99ce('0x43')](handleError(_0x3573c4,null));};exports[_0x99ce('0x59')]=function(_0x29a9a6,_0x327795,_0x2118cd){var _0x54d0c4=[{'name':_0x99ce('0x5a'),'label':_0x99ce('0x5a'),'custom':![],'options':[{'name':0x1,'value':0x1},{'name':0x2,'value':0x2},{'name':0x3,'value':0x3},{'name':0x4,'value':0x4},{'name':0x5,'value':0x5},{'name':0x6,'value':0x6},{'name':0x7,'value':0x7},{'name':0x8,'value':0x8},{'name':0x9,'value':0x9},{'name':0xa,'value':0xa}]}];var _0x48b18d='';return db[_0x99ce('0x2e')]['findOne']({'where':{'id':_0x29a9a6['params']['id']},'attributes':['id',_0x99ce('0x5b'),_0x99ce('0x5c'),_0x99ce('0x5d'),_0x99ce('0x5e'),_0x99ce('0x5f'),_0x99ce('0x60'),_0x99ce('0x61'),'tokenSecret']})[_0x99ce('0x27')](handleEntityNotFound(_0x327795,null))[_0x99ce('0x27')](function(_0x7f677a){if(_0x7f677a){_0x48b18d=_0x7f677a[_0x99ce('0x5b')];var _0x26d459=_0x48b18d[_0x99ce('0x62')](-0x1);if(_0x26d459==='/'){_0x48b18d=_0x48b18d[_0x99ce('0x63')](0x0,_0x48b18d[_0x99ce('0x64')](_0x26d459));}var _0x1662f6={'method':'GET','uri':util[_0x99ce('0x65')]('%s/custom_fields',_0x48b18d),'headers':{'Content-Type':_0x99ce('0x66'),'Accept':_0x99ce('0x66')},'json':!![]};if(_0x7f677a[_0x99ce('0x5c')]===_0x99ce('0x67')){_0x1662f6['headers'][_0x99ce('0x68')]=util[_0x99ce('0x65')](_0x99ce('0x69'),new Buffer(util['format'](_0x99ce('0x6a'),_0x7f677a[_0x99ce('0x5d')],_0x7f677a['password']))['toString'](_0x99ce('0x6b')));}return rp(_0x1662f6)[_0x99ce('0x27')](function(_0x2bdcd7){return _0x54d0c4[_0x99ce('0x6c')](_[_0x99ce('0x31')](_0x2bdcd7[_0x99ce('0x6d')][_0x99ce('0x6e')],function(_0x2c511f){return{'id':_0x2c511f[_0x99ce('0x32')],'name':_0x2c511f[_0x99ce('0x32')],'type':_0x2c511f[_0x99ce('0x56')],'active':_0x2c511f[_0x99ce('0x6f')],'label':_0x2c511f[_0x99ce('0x70')],'custom':!![]};}));});}})[_0x99ce('0x27')](function(_0x1162c9){return{'count':_0x1162c9[_0x99ce('0x4f')],'rows':_0x1162c9};})[_0x99ce('0x27')](respondWithResult(_0x327795,null))[_0x99ce('0x43')](function(_0x561e21){var _0x572306=_0x29a9a6[_0x99ce('0x33')]['test']?0x1f4:_0x561e21['statusCode']||0x1f4;logger[_0x99ce('0x2a')](_0x99ce('0x71'),_0x99ce('0x59'),_0x572306,JSON[_0x99ce('0x72')](_0x561e21));delete _0x561e21[_0x99ce('0x32')];if(_0x572306===0x191){_0x572306=0x190;}_0x327795['status'](_0x572306)['send'](_0x29a9a6[_0x99ce('0x33')][_0x99ce('0x73')]?{'message':_0x99ce('0x74'),'statusCode':_0x561e21[_0x99ce('0x75')]}:_0x561e21);});}; \ No newline at end of file +var _0xa774=['find','create','update','body','destroy','getConfigurations','findOne','DeskConfiguration','where','pick','filter','addConfiguration','AccountId','getSubjects','Descriptions','channel','DeskField','Subjects','getFields','priority','remoteUri','authType','username','consumerKey','consumerSecret','token','tokenSecret','slice','substring','GET','format','application/json','basic','Authorization','Basic\x20%s','%s:%s','password','toString','_embedded','statusCode','getFields,\x20%s,\x20%s,\x20%s','test','Wrong\x20credentials','eml-format','request-promise','moment','bluebird','mustache','path','sox','to-csv','lodash','squel','jsforce','desk.js','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../mysqldb','../../components/integrations/configuration','end','status','json','undefined','limit','count','offset','Content-Range','apply','reject','save','then','sendStatus','error','name','send','map','DeskAccount','rawAttributes','type','model','query','keys','attributes','intersection','fields','length','hasOwnProperty','nolimit','order','sort','filters','merge','VIRTUAL','options','includeAll','include','findAll','rows','catch','params'];(function(_0xff42c7,_0x1da97f){var _0x36eb2b=function(_0x37056c){while(--_0x37056c){_0xff42c7['push'](_0xff42c7['shift']());}};_0x36eb2b(++_0x1da97f);}(_0xa774,0x1d3));var _0x4a77=function(_0x377a6e,_0x59b99d){_0x377a6e=_0x377a6e-0x0;var _0x37f751=_0xa774[_0x377a6e];return _0x37f751;};'use strict';var emlformat=require(_0x4a77('0x0'));var rimraf=require('rimraf');var zipdir=require('zip-dir');var jsonpatch=require('fast-json-patch');var rp=require(_0x4a77('0x1'));var moment=require(_0x4a77('0x2'));var BPromise=require(_0x4a77('0x3'));var Mustache=require(_0x4a77('0x4'));var util=require('util');var path=require(_0x4a77('0x5'));var sox=require(_0x4a77('0x6'));var csv=require(_0x4a77('0x7'));var ejs=require('ejs');var fs=require('fs');var fs_extra=require('fs-extra');var _=require(_0x4a77('0x8'));var squel=require(_0x4a77('0x9'));var crypto=require('crypto');var jsforce=require(_0x4a77('0xa'));var deskjs=require(_0x4a77('0xb'));var toCsv=require(_0x4a77('0x7'));var querystring=require(_0x4a77('0xc'));var Papa=require(_0x4a77('0xd'));var Redis=require(_0x4a77('0xe'));var authService=require(_0x4a77('0xf'));var qs=require('../../components/parsers/qs');var as=require(_0x4a77('0x10'));var hardwareService=require(_0x4a77('0x11'));var logger=require(_0x4a77('0x12'))(_0x4a77('0x13'));var utils=require('../../config/utils');var config=require('../../config/environment');var licenseUtil=require('../../config/license/util');var db=require(_0x4a77('0x14'))['db'];var integrations=require(_0x4a77('0x15'));function respondWithStatusCode(_0x4b5d90,_0x1f9439){_0x1f9439=_0x1f9439||0xcc;return function(_0x320642){if(_0x320642){return _0x4b5d90['sendStatus'](_0x1f9439);}return _0x4b5d90['status'](_0x1f9439)[_0x4a77('0x16')]();};}function respondWithResult(_0x44f46f,_0x4165cf){_0x4165cf=_0x4165cf||0xc8;return function(_0x1c754b){if(_0x1c754b){return _0x44f46f[_0x4a77('0x17')](_0x4165cf)[_0x4a77('0x18')](_0x1c754b);}};}function respondWithFilteredResult(_0x569ee2,_0x2e6cdc){return function(_0x4eec62){if(_0x4eec62){var _0x429d45=typeof _0x2e6cdc['offset']===_0x4a77('0x19')&&typeof _0x2e6cdc[_0x4a77('0x1a')]===_0x4a77('0x19');var _0x576269=_0x4eec62[_0x4a77('0x1b')];var _0x3cc461=_0x429d45?0x0:_0x2e6cdc['offset'];var _0x5d0980=_0x429d45?_0x4eec62[_0x4a77('0x1b')]:_0x2e6cdc[_0x4a77('0x1c')]+_0x2e6cdc[_0x4a77('0x1a')];var _0x2817d5;if(_0x5d0980>=_0x576269){_0x5d0980=_0x576269;_0x2817d5=0xc8;}else{_0x2817d5=0xce;}_0x569ee2['status'](_0x2817d5);return _0x569ee2['set'](_0x4a77('0x1d'),_0x3cc461+'-'+_0x5d0980+'/'+_0x576269)['json'](_0x4eec62);}return null;};}function patchUpdates(_0x5f4cd6){return function(_0x3acba3){try{jsonpatch[_0x4a77('0x1e')](_0x3acba3,_0x5f4cd6,!![]);}catch(_0x21778f){return BPromise[_0x4a77('0x1f')](_0x21778f);}return _0x3acba3[_0x4a77('0x20')]();};}function saveUpdates(_0x164705,_0x110564){return function(_0x1ebd4e){if(_0x1ebd4e){return _0x1ebd4e['update'](_0x164705)[_0x4a77('0x21')](function(_0x125249){return _0x125249;});}return null;};}function removeEntity(_0x3b1848,_0x494838){return function(_0x204c69){if(_0x204c69){return _0x204c69['destroy']()[_0x4a77('0x21')](function(){_0x3b1848[_0x4a77('0x17')](0xcc)['end']();});}};}function handleEntityNotFound(_0x2f14f2,_0x2b74d0){return function(_0x463554){if(!_0x463554){_0x2f14f2[_0x4a77('0x22')](0x194);}return _0x463554;};}function handleError(_0x917e6d,_0x19bb57){_0x19bb57=_0x19bb57||0x1f4;return function(_0x4ad4ac){logger[_0x4a77('0x23')](_0x4ad4ac['stack']);if(_0x4ad4ac['name']){delete _0x4ad4ac[_0x4a77('0x24')];}_0x917e6d['status'](_0x19bb57)[_0x4a77('0x25')](_0x4ad4ac);};}exports['index']=function(_0x58ae40,_0x538fab){var _0x38f20d={},_0x20ee7f={},_0x4e4f5f={'count':0x0,'rows':[]};var _0x2513ee=_[_0x4a77('0x26')](db[_0x4a77('0x27')][_0x4a77('0x28')],function(_0x3c38c4){return{'name':_0x3c38c4['fieldName'],'type':_0x3c38c4[_0x4a77('0x29')]['key']};});_0x20ee7f[_0x4a77('0x2a')]=_[_0x4a77('0x26')](_0x2513ee,_0x4a77('0x24'));_0x20ee7f[_0x4a77('0x2b')]=_[_0x4a77('0x2c')](_0x58ae40[_0x4a77('0x2b')]);_0x20ee7f['filters']=_['intersection'](_0x20ee7f[_0x4a77('0x2a')],_0x20ee7f[_0x4a77('0x2b')]);_0x38f20d[_0x4a77('0x2d')]=_[_0x4a77('0x2e')](_0x20ee7f[_0x4a77('0x2a')],qs['fields'](_0x58ae40[_0x4a77('0x2b')][_0x4a77('0x2f')]));_0x38f20d[_0x4a77('0x2d')]=_0x38f20d[_0x4a77('0x2d')][_0x4a77('0x30')]?_0x38f20d['attributes']:_0x20ee7f[_0x4a77('0x2a')];if(!_0x58ae40[_0x4a77('0x2b')][_0x4a77('0x31')](_0x4a77('0x32'))){_0x38f20d[_0x4a77('0x1a')]=qs[_0x4a77('0x1a')](_0x58ae40[_0x4a77('0x2b')]['limit']);_0x38f20d[_0x4a77('0x1c')]=qs[_0x4a77('0x1c')](_0x58ae40[_0x4a77('0x2b')][_0x4a77('0x1c')]);}_0x38f20d[_0x4a77('0x33')]=qs[_0x4a77('0x34')](_0x58ae40[_0x4a77('0x2b')]['sort']);_0x38f20d['where']=qs[_0x4a77('0x35')](_['pick'](_0x58ae40[_0x4a77('0x2b')],_0x20ee7f[_0x4a77('0x35')]),_0x2513ee);if(_0x58ae40['query']['filter']){_0x38f20d['where']=_[_0x4a77('0x36')](_0x38f20d['where'],{'$or':_['map'](_0x2513ee,function(_0x94b858){if(_0x94b858[_0x4a77('0x29')]!==_0x4a77('0x37')){var _0x2d1b6f={};_0x2d1b6f[_0x94b858['name']]={'$like':'%'+_0x58ae40[_0x4a77('0x2b')]['filter']+'%'};return _0x2d1b6f;}})});}_0x38f20d=_[_0x4a77('0x36')]({},_0x38f20d,_0x58ae40[_0x4a77('0x38')]);var _0x53c174={'where':_0x38f20d['where']};return db['DeskAccount'][_0x4a77('0x1b')](_0x53c174)[_0x4a77('0x21')](function(_0x372529){_0x4e4f5f[_0x4a77('0x1b')]=_0x372529;if(_0x58ae40[_0x4a77('0x2b')][_0x4a77('0x39')]){_0x38f20d[_0x4a77('0x3a')]=[{'all':!![]}];}return db['DeskAccount'][_0x4a77('0x3b')](_0x38f20d);})[_0x4a77('0x21')](function(_0x2b9c75){_0x4e4f5f[_0x4a77('0x3c')]=_0x2b9c75;return _0x4e4f5f;})[_0x4a77('0x21')](respondWithFilteredResult(_0x538fab,_0x38f20d))[_0x4a77('0x3d')](handleError(_0x538fab,null));};exports['show']=function(_0x3095af,_0x64f354){var _0x5aa78a={'raw':![],'where':{'id':_0x3095af[_0x4a77('0x3e')]['id']}},_0x12b202={};_0x12b202[_0x4a77('0x2a')]=_[_0x4a77('0x2c')](db[_0x4a77('0x27')]['rawAttributes']);_0x12b202[_0x4a77('0x2b')]=_[_0x4a77('0x2c')](_0x3095af[_0x4a77('0x2b')]);_0x12b202[_0x4a77('0x35')]=_[_0x4a77('0x2e')](_0x12b202['model'],_0x12b202[_0x4a77('0x2b')]);_0x5aa78a[_0x4a77('0x2d')]=_['intersection'](_0x12b202[_0x4a77('0x2a')],qs[_0x4a77('0x2f')](_0x3095af[_0x4a77('0x2b')][_0x4a77('0x2f')]));_0x5aa78a['attributes']=_0x5aa78a[_0x4a77('0x2d')][_0x4a77('0x30')]?_0x5aa78a[_0x4a77('0x2d')]:_0x12b202[_0x4a77('0x2a')];if(_0x3095af[_0x4a77('0x2b')][_0x4a77('0x39')]){_0x5aa78a[_0x4a77('0x3a')]=[{'all':!![]}];}_0x5aa78a=_[_0x4a77('0x36')]({},_0x5aa78a,_0x3095af[_0x4a77('0x38')]);return db['DeskAccount'][_0x4a77('0x3f')](_0x5aa78a)[_0x4a77('0x21')](handleEntityNotFound(_0x64f354,null))[_0x4a77('0x21')](respondWithResult(_0x64f354,null))[_0x4a77('0x3d')](handleError(_0x64f354,null));};exports['create']=function(_0x4489c4,_0x112bc1){return db[_0x4a77('0x27')][_0x4a77('0x40')](_0x4489c4['body'],{})[_0x4a77('0x21')](respondWithResult(_0x112bc1,0xc9))[_0x4a77('0x3d')](handleError(_0x112bc1,null));};exports[_0x4a77('0x41')]=function(_0x18365d,_0x1a0999){if(_0x18365d[_0x4a77('0x42')]['id']){delete _0x18365d[_0x4a77('0x42')]['id'];}return db[_0x4a77('0x27')]['find']({'where':{'id':_0x18365d[_0x4a77('0x3e')]['id']}})[_0x4a77('0x21')](handleEntityNotFound(_0x1a0999,null))[_0x4a77('0x21')](saveUpdates(_0x18365d['body'],null))[_0x4a77('0x21')](respondWithResult(_0x1a0999,null))[_0x4a77('0x3d')](handleError(_0x1a0999,null));};exports[_0x4a77('0x43')]=function(_0x518928,_0x247d04){return db['DeskAccount'][_0x4a77('0x3f')]({'where':{'id':_0x518928[_0x4a77('0x3e')]['id']}})[_0x4a77('0x21')](handleEntityNotFound(_0x247d04,null))[_0x4a77('0x21')](removeEntity(_0x247d04,null))[_0x4a77('0x3d')](handleError(_0x247d04,null));};exports[_0x4a77('0x44')]=function(_0x953df,_0x104e90,_0x1e3989){var _0x396771={};var _0x331dc5={};var _0x15c4b9;var _0x331652;return db[_0x4a77('0x27')][_0x4a77('0x45')]({'where':{'id':_0x953df[_0x4a77('0x3e')]['id']}})[_0x4a77('0x21')](handleEntityNotFound(_0x104e90,null))['then'](function(_0x1cccfa){if(_0x1cccfa){_0x15c4b9=_0x1cccfa;_0x331dc5[_0x4a77('0x2a')]=_[_0x4a77('0x2c')](db[_0x4a77('0x46')][_0x4a77('0x28')]);_0x331dc5[_0x4a77('0x2b')]=_['keys'](_0x953df['query']);_0x331dc5[_0x4a77('0x35')]=_['intersection'](_0x331dc5[_0x4a77('0x2a')],_0x331dc5[_0x4a77('0x2b')]);_0x396771[_0x4a77('0x2d')]=_['intersection'](_0x331dc5[_0x4a77('0x2a')],qs['fields'](_0x953df['query']['fields']));_0x396771['attributes']=_0x396771[_0x4a77('0x2d')][_0x4a77('0x30')]?_0x396771[_0x4a77('0x2d')]:_0x331dc5[_0x4a77('0x2a')];_0x396771[_0x4a77('0x33')]=qs[_0x4a77('0x34')](_0x953df[_0x4a77('0x2b')][_0x4a77('0x34')]);_0x396771[_0x4a77('0x47')]=qs[_0x4a77('0x35')](_[_0x4a77('0x48')](_0x953df[_0x4a77('0x2b')],_0x331dc5[_0x4a77('0x35')]));if(_0x953df[_0x4a77('0x2b')][_0x4a77('0x49')]){_0x396771[_0x4a77('0x47')]=_[_0x4a77('0x36')](_0x396771[_0x4a77('0x47')],{'$or':_[_0x4a77('0x26')](_0x396771[_0x4a77('0x2d')],function(_0x468270){var _0x26d0ea={};_0x26d0ea[_0x468270]={'$like':'%'+_0x953df[_0x4a77('0x2b')][_0x4a77('0x49')]+'%'};return _0x26d0ea;})});}_0x396771=_[_0x4a77('0x36')]({},_0x396771,_0x953df[_0x4a77('0x38')]);return _0x15c4b9[_0x4a77('0x44')](_0x396771);}})['then'](function(_0x4106c0){if(_0x4106c0){_0x331652=_0x4106c0[_0x4a77('0x30')];if(!_0x953df[_0x4a77('0x2b')][_0x4a77('0x31')](_0x4a77('0x32'))){_0x396771[_0x4a77('0x1a')]=qs[_0x4a77('0x1a')](_0x953df[_0x4a77('0x2b')][_0x4a77('0x1a')]);_0x396771[_0x4a77('0x1c')]=qs[_0x4a77('0x1c')](_0x953df[_0x4a77('0x2b')][_0x4a77('0x1c')]);}return _0x15c4b9[_0x4a77('0x44')](_0x396771);}})[_0x4a77('0x21')](function(_0x3ac2fc){if(_0x3ac2fc){return _0x3ac2fc?{'count':_0x331652,'rows':_0x3ac2fc}:null;}})[_0x4a77('0x21')](respondWithResult(_0x104e90,null))[_0x4a77('0x3d')](handleError(_0x104e90,null));};exports[_0x4a77('0x4a')]=function(_0x58de33,_0x561513,_0x526705){if(_0x58de33[_0x4a77('0x42')]['id']){delete _0x58de33[_0x4a77('0x42')]['id'];}return db[_0x4a77('0x27')][_0x4a77('0x45')]({'where':{'id':_0x58de33[_0x4a77('0x3e')]['id']}})['then'](handleEntityNotFound(_0x561513,null))[_0x4a77('0x21')](function(_0x2866fd){if(_0x2866fd){_0x58de33[_0x4a77('0x42')][_0x4a77('0x4b')]=_0x2866fd['id'];_0x58de33['body']['Subjects']=integrations[_0x4a77('0x4c')](_0x58de33[_0x4a77('0x42')]['channel'],_0x58de33[_0x4a77('0x42')][_0x4a77('0x29')]);_0x58de33[_0x4a77('0x42')][_0x4a77('0x4d')]=integrations['getDescriptions'](_0x58de33[_0x4a77('0x42')][_0x4a77('0x4e')],_0x58de33[_0x4a77('0x42')]['type']);return db[_0x4a77('0x46')]['create'](_0x58de33[_0x4a77('0x42')],{'include':[{'model':db[_0x4a77('0x4f')],'as':_0x4a77('0x50')},{'model':db['DeskField'],'as':_0x4a77('0x4d')}]});}return null;})[_0x4a77('0x21')](respondWithResult(_0x561513,null))[_0x4a77('0x3d')](handleError(_0x561513,null));};exports[_0x4a77('0x51')]=function(_0x44e66c,_0x277f41,_0x1b4eb8){var _0x25d7d2=[{'name':_0x4a77('0x52'),'label':_0x4a77('0x52'),'custom':![],'options':[{'name':0x1,'value':0x1},{'name':0x2,'value':0x2},{'name':0x3,'value':0x3},{'name':0x4,'value':0x4},{'name':0x5,'value':0x5},{'name':0x6,'value':0x6},{'name':0x7,'value':0x7},{'name':0x8,'value':0x8},{'name':0x9,'value':0x9},{'name':0xa,'value':0xa}]}];var _0x3a6b91='';return db[_0x4a77('0x27')][_0x4a77('0x45')]({'where':{'id':_0x44e66c[_0x4a77('0x3e')]['id']},'attributes':['id',_0x4a77('0x53'),_0x4a77('0x54'),_0x4a77('0x55'),'password',_0x4a77('0x56'),_0x4a77('0x57'),_0x4a77('0x58'),_0x4a77('0x59')]})['then'](handleEntityNotFound(_0x277f41,null))['then'](function(_0x28c15e){if(_0x28c15e){_0x3a6b91=_0x28c15e['remoteUri'];var _0x4cfa46=_0x3a6b91[_0x4a77('0x5a')](-0x1);if(_0x4cfa46==='/'){_0x3a6b91=_0x3a6b91[_0x4a77('0x5b')](0x0,_0x3a6b91['lastIndexOf'](_0x4cfa46));}var _0x437cae={'method':_0x4a77('0x5c'),'uri':util[_0x4a77('0x5d')]('%s/custom_fields',_0x3a6b91),'headers':{'Content-Type':'application/json','Accept':_0x4a77('0x5e')},'json':!![]};if(_0x28c15e[_0x4a77('0x54')]===_0x4a77('0x5f')){_0x437cae['headers'][_0x4a77('0x60')]=util[_0x4a77('0x5d')](_0x4a77('0x61'),new Buffer(util[_0x4a77('0x5d')](_0x4a77('0x62'),_0x28c15e[_0x4a77('0x55')],_0x28c15e[_0x4a77('0x63')]))[_0x4a77('0x64')]('base64'));}return rp(_0x437cae)[_0x4a77('0x21')](function(_0x43100d){return _0x25d7d2['concat'](_['map'](_0x43100d[_0x4a77('0x65')]['entries'],function(_0x45cd0c){return{'id':_0x45cd0c[_0x4a77('0x24')],'name':_0x45cd0c[_0x4a77('0x24')],'type':_0x45cd0c[_0x4a77('0x29')],'active':_0x45cd0c['active'],'label':_0x45cd0c['label'],'custom':!![]};}));});}})[_0x4a77('0x21')](function(_0x1bd516){return{'count':_0x1bd516[_0x4a77('0x30')],'rows':_0x1bd516};})['then'](respondWithResult(_0x277f41,null))['catch'](function(_0x513a88){var _0x1b11f2=_0x44e66c['query']['test']?0x1f4:_0x513a88[_0x4a77('0x66')]||0x1f4;logger['error'](_0x4a77('0x67'),_0x4a77('0x51'),_0x1b11f2,JSON['stringify'](_0x513a88));delete _0x513a88['name'];if(_0x1b11f2===0x191){_0x1b11f2=0x190;}_0x277f41[_0x4a77('0x17')](_0x1b11f2)[_0x4a77('0x25')](_0x44e66c[_0x4a77('0x2b')][_0x4a77('0x68')]?{'message':_0x4a77('0x69'),'statusCode':_0x513a88[_0x4a77('0x66')]}:_0x513a88);});}; \ No newline at end of file diff --git a/server/api/intDeskAccount/intDeskAccount.model.js b/server/api/intDeskAccount/intDeskAccount.model.js index 871c418..32f4d6a 100644 --- a/server/api/intDeskAccount/intDeskAccount.model.js +++ b/server/api/intDeskAccount/intDeskAccount.model.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x527c=['../../components/integrations/configuration','exports','define','DeskAccount','lodash','util','../../config/logger','moment','bluebird','request-promise','path','rimraf','../../config/environment','./intDeskAccount.attributes'];(function(_0x375126,_0x514a8e){var _0x1f76bb=function(_0x22f2d0){while(--_0x22f2d0){_0x375126['push'](_0x375126['shift']());}};_0x1f76bb(++_0x514a8e);}(_0x527c,0x1ee));var _0xc527=function(_0x1ee9a1,_0x5f1434){_0x1ee9a1=_0x1ee9a1-0x0;var _0x21270f=_0x527c[_0x1ee9a1];return _0x21270f;};'use strict';var _=require(_0xc527('0x0'));var util=require(_0xc527('0x1'));var logger=require(_0xc527('0x2'))('api');var moment=require(_0xc527('0x3'));var BPromise=require(_0xc527('0x4'));var rp=require(_0xc527('0x5'));var fs=require('fs');var path=require(_0xc527('0x6'));var rimraf=require(_0xc527('0x7'));var config=require(_0xc527('0x8'));var attributes=require(_0xc527('0x9'));var integrations=require(_0xc527('0xa'));module[_0xc527('0xb')]=function(_0x4c548d,_0x47f71c){return _0x4c548d[_0xc527('0xc')](_0xc527('0xd'),attributes,{'tableName':'int_desk_accounts','paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file +var _0xcace=['request-promise','path','rimraf','../../components/integrations/configuration','exports','DeskAccount','lodash','util','../../config/logger','api','moment','bluebird'];(function(_0x44d0ef,_0x3cb88a){var _0x277d42=function(_0x230334){while(--_0x230334){_0x44d0ef['push'](_0x44d0ef['shift']());}};_0x277d42(++_0x3cb88a);}(_0xcace,0x126));var _0xecac=function(_0x184f5f,_0x2034dd){_0x184f5f=_0x184f5f-0x0;var _0x467cd7=_0xcace[_0x184f5f];return _0x467cd7;};'use strict';var _=require(_0xecac('0x0'));var util=require(_0xecac('0x1'));var logger=require(_0xecac('0x2'))(_0xecac('0x3'));var moment=require(_0xecac('0x4'));var BPromise=require(_0xecac('0x5'));var rp=require(_0xecac('0x6'));var fs=require('fs');var path=require(_0xecac('0x7'));var rimraf=require(_0xecac('0x8'));var config=require('../../config/environment');var attributes=require('./intDeskAccount.attributes');var integrations=require(_0xecac('0x9'));module[_0xecac('0xa')]=function(_0x2b42f4,_0x229f57){return _0x2b42f4['define'](_0xecac('0xb'),attributes,{'tableName':'int_desk_accounts','paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file diff --git a/server/api/intDeskAccount/intDeskAccount.rpc.js b/server/api/intDeskAccount/intDeskAccount.rpc.js index abc20ec..9ce13d2 100644 --- a/server/api/intDeskAccount/intDeskAccount.rpc.js +++ b/server/api/intDeskAccount/intDeskAccount.rpc.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xa3eb=['http','then','DeskAccount,\x20%s,\x20%s','DeskAccount,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','code','message','info','catch','DeskAccount','findAll','options','raw','where','attributes','include','map','model','debug','GetDeskAccount','ShowDeskAccount','find','lodash','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','../../config/environment','jayson/promise'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0xa3eb,0x106));var _0xba3e=function(_0x618414,_0x1a7a60){_0x618414=_0x618414-0x0;var _0x21c19a=_0xa3eb[_0x618414];return _0x21c19a;};'use strict';var _=require(_0xba3e('0x0'));var util=require('util');var moment=require(_0xba3e('0x1'));var BPromise=require(_0xba3e('0x2'));var rs=require(_0xba3e('0x3'));var fs=require('fs');var Redis=require(_0xba3e('0x4'));var db=require(_0xba3e('0x5'))['db'];var utils=require(_0xba3e('0x6'));var logger=require(_0xba3e('0x7'))('rpc');var config=require(_0xba3e('0x8'));var jayson=require(_0xba3e('0x9'));var client=jayson['client'][_0xba3e('0xa')]({'port':0x232a});function respondWithRpcPromise(_0xa30530,_0x2a6134,_0x5cb41a){return new BPromise(function(_0x133723,_0x18396e){return client['request'](_0xa30530,_0x5cb41a)[_0xba3e('0xb')](function(_0x3462df){logger['info'](_0xba3e('0xc'),_0x2a6134,'request\x20sent');logger['debug'](_0xba3e('0xd'),_0x2a6134,_0xba3e('0xe'),JSON[_0xba3e('0xf')](_0x3462df));if(_0x3462df[_0xba3e('0x10')]){if(_0x3462df[_0xba3e('0x10')][_0xba3e('0x11')]===0x1f4){logger[_0xba3e('0x10')](_0xba3e('0xc'),_0x2a6134,_0x3462df['error']['message']);return _0x18396e(_0x3462df[_0xba3e('0x10')][_0xba3e('0x12')]);}logger[_0xba3e('0x10')](_0xba3e('0xc'),_0x2a6134,_0x3462df['error'][_0xba3e('0x12')]);return _0x133723(_0x3462df['error'][_0xba3e('0x12')]);}else{logger[_0xba3e('0x13')](_0xba3e('0xc'),_0x2a6134,_0xba3e('0xe'));_0x133723(_0x3462df['result'][_0xba3e('0x12')]);}})[_0xba3e('0x14')](function(_0x59b92d){logger[_0xba3e('0x10')](_0xba3e('0xc'),_0x2a6134,_0x59b92d);_0x18396e(_0x59b92d);});});}exports['GetDeskAccount']=function(_0x3bdb5a){var _0x11b91c=this;return new Promise(function(_0x3baf4f,_0x12c52c){return db[_0xba3e('0x15')][_0xba3e('0x16')]({'raw':_0x3bdb5a[_0xba3e('0x17')]?_0x3bdb5a[_0xba3e('0x17')][_0xba3e('0x18')]===undefined?!![]:![]:!![],'where':_0x3bdb5a[_0xba3e('0x17')]?_0x3bdb5a[_0xba3e('0x17')][_0xba3e('0x19')]||null:null,'attributes':_0x3bdb5a['options']?_0x3bdb5a[_0xba3e('0x17')][_0xba3e('0x1a')]||null:null,'limit':_0x3bdb5a['options']?_0x3bdb5a[_0xba3e('0x17')]['limit']||null:null,'include':_0x3bdb5a['options']?_0x3bdb5a[_0xba3e('0x17')][_0xba3e('0x1b')]?_[_0xba3e('0x1c')](_0x3bdb5a[_0xba3e('0x17')][_0xba3e('0x1b')],function(_0x577265){return{'model':db[_0x577265[_0xba3e('0x1d')]],'as':_0x577265['as'],'attributes':_0x577265[_0xba3e('0x1a')],'include':_0x577265[_0xba3e('0x1b')]?_[_0xba3e('0x1c')](_0x577265[_0xba3e('0x1b')],function(_0x53bce2){return{'model':db[_0x53bce2[_0xba3e('0x1d')]],'as':_0x53bce2['as'],'attributes':_0x53bce2[_0xba3e('0x1a')],'include':_0x53bce2[_0xba3e('0x1b')]?_['map'](_0x53bce2[_0xba3e('0x1b')],function(_0x5eb043){return{'model':db[_0x5eb043[_0xba3e('0x1d')]],'as':_0x5eb043['as'],'attributes':_0x5eb043[_0xba3e('0x1a')]};}):[]};}):[]};}):[]:[]})[_0xba3e('0xb')](function(_0x407807){logger[_0xba3e('0x13')]('GetDeskAccount',_0x3bdb5a);logger[_0xba3e('0x1e')]('GetDeskAccount',_0x3bdb5a,JSON[_0xba3e('0xf')](_0x407807));_0x3baf4f(_0x407807);})['catch'](function(_0x199757){logger[_0xba3e('0x10')](_0xba3e('0x1f'),_0x199757['message'],_0x3bdb5a);_0x12c52c(_0x11b91c[_0xba3e('0x10')](0x1f4,_0x199757[_0xba3e('0x12')]));});});};exports[_0xba3e('0x20')]=function(_0xb12a71){var _0x45363e=this;return new Promise(function(_0x1ca8f7,_0x1c8aa2){return db[_0xba3e('0x15')][_0xba3e('0x21')]({'raw':_0xb12a71[_0xba3e('0x17')]?_0xb12a71[_0xba3e('0x17')][_0xba3e('0x18')]===undefined?!![]:![]:!![],'where':_0xb12a71[_0xba3e('0x17')]?_0xb12a71[_0xba3e('0x17')][_0xba3e('0x19')]||null:null,'attributes':_0xb12a71[_0xba3e('0x17')]?_0xb12a71[_0xba3e('0x17')][_0xba3e('0x1a')]||null:null,'include':_0xb12a71[_0xba3e('0x17')]?_0xb12a71[_0xba3e('0x17')][_0xba3e('0x1b')]?_[_0xba3e('0x1c')](_0xb12a71[_0xba3e('0x17')][_0xba3e('0x1b')],function(_0x351fb9){return{'model':db[_0x351fb9[_0xba3e('0x1d')]],'as':_0x351fb9['as'],'attributes':_0x351fb9[_0xba3e('0x1a')],'include':_0x351fb9['include']?_[_0xba3e('0x1c')](_0x351fb9[_0xba3e('0x1b')],function(_0x5ea6e3){return{'model':db[_0x5ea6e3[_0xba3e('0x1d')]],'as':_0x5ea6e3['as'],'attributes':_0x5ea6e3[_0xba3e('0x1a')],'include':_0x5ea6e3[_0xba3e('0x1b')]?_[_0xba3e('0x1c')](_0x5ea6e3[_0xba3e('0x1b')],function(_0x47ab99){return{'model':db[_0x47ab99[_0xba3e('0x1d')]],'as':_0x47ab99['as'],'attributes':_0x47ab99[_0xba3e('0x1a')]};}):[]};}):[]};}):[]:[]})[_0xba3e('0xb')](function(_0x1b074e){logger['info'](_0xba3e('0x20'),_0xb12a71);logger['debug']('ShowDeskAccount',_0xb12a71,JSON[_0xba3e('0xf')](_0x1b074e));_0x1ca8f7(_0x1b074e);})[_0xba3e('0x14')](function(_0x3eb000){logger['error'](_0xba3e('0x20'),_0x3eb000[_0xba3e('0x12')],_0xb12a71);_0x1c8aa2(_0x45363e[_0xba3e('0x10')](0x1f4,_0x3eb000['message']));});});}; \ No newline at end of file +var _0xea7c=['ShowDeskAccount','lodash','moment','bluebird','rpc','client','http','request','then','info','DeskAccount,\x20%s,\x20%s','request\x20sent','DeskAccount,\x20%s,\x20%s,\x20%s','error','code','message','catch','DeskAccount','findAll','options','raw','where','attributes','include','map','model','GetDeskAccount','debug','stringify','find'];(function(_0x1a87b3,_0x45ba68){var _0x37e84d=function(_0x39f49e){while(--_0x39f49e){_0x1a87b3['push'](_0x1a87b3['shift']());}};_0x37e84d(++_0x45ba68);}(_0xea7c,0x169));var _0xcea7=function(_0x4565bf,_0x5ad9d6){_0x4565bf=_0x4565bf-0x0;var _0x5610ba=_0xea7c[_0x4565bf];return _0x5610ba;};'use strict';var _=require(_0xcea7('0x0'));var util=require('util');var moment=require(_0xcea7('0x1'));var BPromise=require(_0xcea7('0x2'));var rs=require('randomstring');var fs=require('fs');var Redis=require('ioredis');var db=require('../../mysqldb')['db'];var utils=require('../../config/utils');var logger=require('../../config/logger')(_0xcea7('0x3'));var config=require('../../config/environment');var jayson=require('jayson/promise');var client=jayson[_0xcea7('0x4')][_0xcea7('0x5')]({'port':0x232a});function respondWithRpcPromise(_0x153f85,_0x562227,_0xe3a66a){return new BPromise(function(_0x2ea9b9,_0x16baba){return client[_0xcea7('0x6')](_0x153f85,_0xe3a66a)[_0xcea7('0x7')](function(_0x1f8378){logger[_0xcea7('0x8')](_0xcea7('0x9'),_0x562227,_0xcea7('0xa'));logger['debug'](_0xcea7('0xb'),_0x562227,_0xcea7('0xa'),JSON['stringify'](_0x1f8378));if(_0x1f8378['error']){if(_0x1f8378[_0xcea7('0xc')][_0xcea7('0xd')]===0x1f4){logger['error'](_0xcea7('0x9'),_0x562227,_0x1f8378['error']['message']);return _0x16baba(_0x1f8378[_0xcea7('0xc')][_0xcea7('0xe')]);}logger[_0xcea7('0xc')]('DeskAccount,\x20%s,\x20%s',_0x562227,_0x1f8378[_0xcea7('0xc')]['message']);return _0x2ea9b9(_0x1f8378[_0xcea7('0xc')][_0xcea7('0xe')]);}else{logger['info'](_0xcea7('0x9'),_0x562227,'request\x20sent');_0x2ea9b9(_0x1f8378['result'][_0xcea7('0xe')]);}})[_0xcea7('0xf')](function(_0x1028f3){logger[_0xcea7('0xc')](_0xcea7('0x9'),_0x562227,_0x1028f3);_0x16baba(_0x1028f3);});});}exports['GetDeskAccount']=function(_0x370981){var _0x2e6abd=this;return new Promise(function(_0x5e199f,_0x214264){return db[_0xcea7('0x10')][_0xcea7('0x11')]({'raw':_0x370981[_0xcea7('0x12')]?_0x370981['options'][_0xcea7('0x13')]===undefined?!![]:![]:!![],'where':_0x370981['options']?_0x370981[_0xcea7('0x12')][_0xcea7('0x14')]||null:null,'attributes':_0x370981[_0xcea7('0x12')]?_0x370981[_0xcea7('0x12')][_0xcea7('0x15')]||null:null,'limit':_0x370981['options']?_0x370981['options']['limit']||null:null,'include':_0x370981['options']?_0x370981[_0xcea7('0x12')][_0xcea7('0x16')]?_[_0xcea7('0x17')](_0x370981[_0xcea7('0x12')][_0xcea7('0x16')],function(_0x4d4c4d){return{'model':db[_0x4d4c4d['model']],'as':_0x4d4c4d['as'],'attributes':_0x4d4c4d[_0xcea7('0x15')],'include':_0x4d4c4d[_0xcea7('0x16')]?_['map'](_0x4d4c4d['include'],function(_0x118041){return{'model':db[_0x118041[_0xcea7('0x18')]],'as':_0x118041['as'],'attributes':_0x118041[_0xcea7('0x15')],'include':_0x118041['include']?_[_0xcea7('0x17')](_0x118041[_0xcea7('0x16')],function(_0x1af469){return{'model':db[_0x1af469['model']],'as':_0x1af469['as'],'attributes':_0x1af469[_0xcea7('0x15')]};}):[]};}):[]};}):[]:[]})[_0xcea7('0x7')](function(_0x26b060){logger[_0xcea7('0x8')](_0xcea7('0x19'),_0x370981);logger[_0xcea7('0x1a')](_0xcea7('0x19'),_0x370981,JSON[_0xcea7('0x1b')](_0x26b060));_0x5e199f(_0x26b060);})[_0xcea7('0xf')](function(_0x35d88b){logger['error'](_0xcea7('0x19'),_0x35d88b['message'],_0x370981);_0x214264(_0x2e6abd[_0xcea7('0xc')](0x1f4,_0x35d88b[_0xcea7('0xe')]));});});};exports['ShowDeskAccount']=function(_0x265160){var _0x571ae6=this;return new Promise(function(_0x543416,_0x120db6){return db[_0xcea7('0x10')][_0xcea7('0x1c')]({'raw':_0x265160[_0xcea7('0x12')]?_0x265160[_0xcea7('0x12')][_0xcea7('0x13')]===undefined?!![]:![]:!![],'where':_0x265160[_0xcea7('0x12')]?_0x265160[_0xcea7('0x12')]['where']||null:null,'attributes':_0x265160['options']?_0x265160[_0xcea7('0x12')][_0xcea7('0x15')]||null:null,'include':_0x265160['options']?_0x265160[_0xcea7('0x12')][_0xcea7('0x16')]?_[_0xcea7('0x17')](_0x265160[_0xcea7('0x12')][_0xcea7('0x16')],function(_0x29bcb6){return{'model':db[_0x29bcb6[_0xcea7('0x18')]],'as':_0x29bcb6['as'],'attributes':_0x29bcb6[_0xcea7('0x15')],'include':_0x29bcb6[_0xcea7('0x16')]?_[_0xcea7('0x17')](_0x29bcb6[_0xcea7('0x16')],function(_0x24f738){return{'model':db[_0x24f738[_0xcea7('0x18')]],'as':_0x24f738['as'],'attributes':_0x24f738[_0xcea7('0x15')],'include':_0x24f738['include']?_['map'](_0x24f738['include'],function(_0x33647f){return{'model':db[_0x33647f['model']],'as':_0x33647f['as'],'attributes':_0x33647f[_0xcea7('0x15')]};}):[]};}):[]};}):[]:[]})['then'](function(_0x24c092){logger['info'](_0xcea7('0x1d'),_0x265160);logger['debug'](_0xcea7('0x1d'),_0x265160,JSON[_0xcea7('0x1b')](_0x24c092));_0x543416(_0x24c092);})[_0xcea7('0xf')](function(_0x4b5626){logger[_0xcea7('0xc')]('ShowDeskAccount',_0x4b5626[_0xcea7('0xe')],_0x265160);_0x120db6(_0x571ae6[_0xcea7('0xc')](0x1f4,_0x4b5626['message']));});});}; \ No newline at end of file diff --git a/server/api/intDeskConfiguration/index.js b/server/api/intDeskConfiguration/index.js index 1792c39..b4fa1eb 100644 --- a/server/api/intDeskConfiguration/index.js +++ b/server/api/intDeskConfiguration/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x008c=['../../config/environment','./intDeskConfiguration.controller','get','isAuthenticated','index','getFields','/:id/descriptions','getDescriptions','/:id/tags','getTags','post','setTags','put','/:id','update','destroy','exports','multer','util','path','connect-timeout','express','fs-extra','../../components/auth/service','../../components/interaction/service'];(function(_0x22de08,_0x1cf192){var _0x33aa20=function(_0x4e0fba){while(--_0x4e0fba){_0x22de08['push'](_0x22de08['shift']());}};_0x33aa20(++_0x1cf192);}(_0x008c,0x188));var _0xc008=function(_0x46f7fe,_0x40ecd3){_0x46f7fe=_0x46f7fe-0x0;var _0x276f00=_0x008c[_0x46f7fe];return _0x276f00;};'use strict';var multer=require(_0xc008('0x0'));var util=require(_0xc008('0x1'));var path=require(_0xc008('0x2'));var timeout=require(_0xc008('0x3'));var express=require(_0xc008('0x4'));var router=express['Router']();var fs_extra=require(_0xc008('0x5'));var auth=require(_0xc008('0x6'));var interaction=require(_0xc008('0x7'));var config=require(_0xc008('0x8'));var controller=require(_0xc008('0x9'));router[_0xc008('0xa')]('/',auth[_0xc008('0xb')](),controller[_0xc008('0xc')]);router[_0xc008('0xa')]('/:id',auth[_0xc008('0xb')](),controller['show']);router[_0xc008('0xa')]('/:id/fields',auth['isAuthenticated'](),controller[_0xc008('0xd')]);router[_0xc008('0xa')]('/:id/subjects',auth['isAuthenticated'](),controller['getSubjects']);router[_0xc008('0xa')](_0xc008('0xe'),auth['isAuthenticated'](),controller[_0xc008('0xf')]);router[_0xc008('0xa')](_0xc008('0x10'),auth[_0xc008('0xb')](),controller[_0xc008('0x11')]);router[_0xc008('0x12')]('/',auth[_0xc008('0xb')](),controller['create']);router['post'](_0xc008('0x10'),auth['isAuthenticated'](),controller[_0xc008('0x13')]);router[_0xc008('0x14')](_0xc008('0x15'),auth[_0xc008('0xb')](),controller[_0xc008('0x16')]);router['delete']('/:id',auth['isAuthenticated'](),controller[_0xc008('0x17')]);module[_0xc008('0x18')]=router; \ No newline at end of file +var _0x9957=['/:id/subjects','getSubjects','getDescriptions','/:id/tags','getTags','post','create','setTags','put','update','delete','exports','multer','util','path','connect-timeout','Router','fs-extra','../../components/auth/service','../../components/interaction/service','./intDeskConfiguration.controller','get','isAuthenticated','index','/:id','show','getFields'];(function(_0x179971,_0x2df84e){var _0x2d47c3=function(_0x280275){while(--_0x280275){_0x179971['push'](_0x179971['shift']());}};_0x2d47c3(++_0x2df84e);}(_0x9957,0x93));var _0x7995=function(_0x501510,_0x61caa9){_0x501510=_0x501510-0x0;var _0x1e6ee5=_0x9957[_0x501510];return _0x1e6ee5;};'use strict';var multer=require(_0x7995('0x0'));var util=require(_0x7995('0x1'));var path=require(_0x7995('0x2'));var timeout=require(_0x7995('0x3'));var express=require('express');var router=express[_0x7995('0x4')]();var fs_extra=require(_0x7995('0x5'));var auth=require(_0x7995('0x6'));var interaction=require(_0x7995('0x7'));var config=require('../../config/environment');var controller=require(_0x7995('0x8'));router[_0x7995('0x9')]('/',auth[_0x7995('0xa')](),controller[_0x7995('0xb')]);router[_0x7995('0x9')](_0x7995('0xc'),auth['isAuthenticated'](),controller[_0x7995('0xd')]);router[_0x7995('0x9')]('/:id/fields',auth[_0x7995('0xa')](),controller[_0x7995('0xe')]);router[_0x7995('0x9')](_0x7995('0xf'),auth[_0x7995('0xa')](),controller[_0x7995('0x10')]);router[_0x7995('0x9')]('/:id/descriptions',auth[_0x7995('0xa')](),controller[_0x7995('0x11')]);router['get'](_0x7995('0x12'),auth[_0x7995('0xa')](),controller[_0x7995('0x13')]);router[_0x7995('0x14')]('/',auth[_0x7995('0xa')](),controller[_0x7995('0x15')]);router[_0x7995('0x14')]('/:id/tags',auth['isAuthenticated'](),controller[_0x7995('0x16')]);router[_0x7995('0x17')](_0x7995('0xc'),auth[_0x7995('0xa')](),controller[_0x7995('0x18')]);router[_0x7995('0x19')](_0x7995('0xc'),auth[_0x7995('0xa')](),controller['destroy']);module[_0x7995('0x1a')]=router; \ No newline at end of file diff --git a/server/api/intDeskConfiguration/intDeskConfiguration.attributes.js b/server/api/intDeskConfiguration/intDeskConfiguration.attributes.js index a2d3b9f..4df6e75 100644 --- a/server/api/intDeskConfiguration/intDeskConfiguration.attributes.js +++ b/server/api/intDeskConfiguration/intDeskConfiguration.attributes.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xe7c7=['sequelize','exports'];(function(_0x479f6f,_0x1c26c4){var _0x24e701=function(_0x5291dd){while(--_0x5291dd){_0x479f6f['push'](_0x479f6f['shift']());}};_0x24e701(++_0x1c26c4);}(_0xe7c7,0x142));var _0x7e7c=function(_0x46698a,_0x8de1e4){_0x46698a=_0x46698a-0x0;var _0x356db0=_0xe7c7[_0x46698a];return _0x356db0;};'use strict';var Sequelize=require(_0x7e7c('0x0'));module[_0x7e7c('0x1')]={'name':{'type':Sequelize['STRING']},'description':{'type':Sequelize['STRING']}}; \ No newline at end of file +var _0xee7b=['STRING','exports'];(function(_0xdde91,_0x3ae43e){var _0x1166d4=function(_0x147ac4){while(--_0x147ac4){_0xdde91['push'](_0xdde91['shift']());}};_0x1166d4(++_0x3ae43e);}(_0xee7b,0x95));var _0xbee7=function(_0x1e8099,_0x32f41f){_0x1e8099=_0x1e8099-0x0;var _0x429c38=_0xee7b[_0x1e8099];return _0x429c38;};'use strict';var Sequelize=require('sequelize');module[_0xbee7('0x0')]={'name':{'type':Sequelize[_0xbee7('0x1')]},'description':{'type':Sequelize[_0xbee7('0x1')]}}; \ No newline at end of file diff --git a/server/api/intDeskConfiguration/intDeskConfiguration.controller.js b/server/api/intDeskConfiguration/intDeskConfiguration.controller.js index 8be39a4..347af1c 100644 --- a/server/api/intDeskConfiguration/intDeskConfiguration.controller.js +++ b/server/api/intDeskConfiguration/intDeskConfiguration.controller.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xaadb=['end','status','json','offset','limit','undefined','count','set','apply','reject','save','update','then','destroy','stack','name','index','map','DeskConfiguration','rawAttributes','fieldName','key','model','query','keys','intersection','fields','attributes','hasOwnProperty','nolimit','sort','where','filters','pick','filter','type','VIRTUAL','merge','options','include','show','params','length','includeAll','find','catch','create','body','getFields','findOne','DeskField','order','getSubjects','getDescriptions','getTags','Tag','setTags','ids','eml-format','rimraf','fast-json-patch','request-promise','moment','bluebird','mustache','util','path','sox','to-csv','ejs','lodash','crypto','jsforce','desk.js','querystring','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../config/license/util','sendStatus'];(function(_0x4555a7,_0x48778b){var _0x166f00=function(_0x5f1b4b){while(--_0x5f1b4b){_0x4555a7['push'](_0x4555a7['shift']());}};_0x166f00(++_0x48778b);}(_0xaadb,0xe6));var _0xbaad=function(_0x12912c,_0x18edeb){_0x12912c=_0x12912c-0x0;var _0x2980da=_0xaadb[_0x12912c];return _0x2980da;};'use strict';var emlformat=require(_0xbaad('0x0'));var rimraf=require(_0xbaad('0x1'));var zipdir=require('zip-dir');var jsonpatch=require(_0xbaad('0x2'));var rp=require(_0xbaad('0x3'));var moment=require(_0xbaad('0x4'));var BPromise=require(_0xbaad('0x5'));var Mustache=require(_0xbaad('0x6'));var util=require(_0xbaad('0x7'));var path=require(_0xbaad('0x8'));var sox=require(_0xbaad('0x9'));var csv=require(_0xbaad('0xa'));var ejs=require(_0xbaad('0xb'));var fs=require('fs');var fs_extra=require('fs-extra');var _=require(_0xbaad('0xc'));var squel=require('squel');var crypto=require(_0xbaad('0xd'));var jsforce=require(_0xbaad('0xe'));var deskjs=require(_0xbaad('0xf'));var toCsv=require(_0xbaad('0xa'));var querystring=require(_0xbaad('0x10'));var Papa=require('papaparse');var Redis=require(_0xbaad('0x11'));var authService=require(_0xbaad('0x12'));var qs=require(_0xbaad('0x13'));var as=require(_0xbaad('0x14'));var hardwareService=require(_0xbaad('0x15'));var logger=require(_0xbaad('0x16'))(_0xbaad('0x17'));var utils=require(_0xbaad('0x18'));var config=require(_0xbaad('0x19'));var licenseUtil=require(_0xbaad('0x1a'));var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0xd70bd3,_0x3e974f){_0x3e974f=_0x3e974f||0xcc;return function(_0x2ae5d5){if(_0x2ae5d5){return _0xd70bd3[_0xbaad('0x1b')](_0x3e974f);}return _0xd70bd3['status'](_0x3e974f)[_0xbaad('0x1c')]();};}function respondWithResult(_0x5de729,_0x43b18c){_0x43b18c=_0x43b18c||0xc8;return function(_0x2bac35){if(_0x2bac35){return _0x5de729[_0xbaad('0x1d')](_0x43b18c)[_0xbaad('0x1e')](_0x2bac35);}};}function respondWithFilteredResult(_0x3190f3,_0x337b6e){return function(_0x2cc03e){if(_0x2cc03e){var _0xb345a2=typeof _0x337b6e[_0xbaad('0x1f')]==='undefined'&&typeof _0x337b6e[_0xbaad('0x20')]===_0xbaad('0x21');var _0x128f7c=_0x2cc03e[_0xbaad('0x22')];var _0x17fcef=_0xb345a2?0x0:_0x337b6e[_0xbaad('0x1f')];var _0x3199c5=_0xb345a2?_0x2cc03e['count']:_0x337b6e[_0xbaad('0x1f')]+_0x337b6e[_0xbaad('0x20')];var _0x2d35d3;if(_0x3199c5>=_0x128f7c){_0x3199c5=_0x128f7c;_0x2d35d3=0xc8;}else{_0x2d35d3=0xce;}_0x3190f3['status'](_0x2d35d3);return _0x3190f3[_0xbaad('0x23')]('Content-Range',_0x17fcef+'-'+_0x3199c5+'/'+_0x128f7c)['json'](_0x2cc03e);}return null;};}function patchUpdates(_0x12576c){return function(_0x12ed9e){try{jsonpatch[_0xbaad('0x24')](_0x12ed9e,_0x12576c,!![]);}catch(_0x4e14ad){return BPromise[_0xbaad('0x25')](_0x4e14ad);}return _0x12ed9e[_0xbaad('0x26')]();};}function saveUpdates(_0x22b98c,_0x202a67){return function(_0x2b8b32){if(_0x2b8b32){return _0x2b8b32[_0xbaad('0x27')](_0x22b98c)[_0xbaad('0x28')](function(_0x4d90dd){return _0x4d90dd;});}return null;};}function removeEntity(_0x5ce6eb,_0xa4c2c7){return function(_0x125763){if(_0x125763){return _0x125763[_0xbaad('0x29')]()[_0xbaad('0x28')](function(){_0x5ce6eb['status'](0xcc)[_0xbaad('0x1c')]();});}};}function handleEntityNotFound(_0x5c288f,_0x230e28){return function(_0x5ad758){if(!_0x5ad758){_0x5c288f['sendStatus'](0x194);}return _0x5ad758;};}function handleError(_0x1bdfb9,_0x1e128e){_0x1e128e=_0x1e128e||0x1f4;return function(_0x21609d){logger['error'](_0x21609d[_0xbaad('0x2a')]);if(_0x21609d['name']){delete _0x21609d[_0xbaad('0x2b')];}_0x1bdfb9['status'](_0x1e128e)['send'](_0x21609d);};}exports[_0xbaad('0x2c')]=function(_0x538fc9,_0x8281ef){var _0x4564ef={},_0xdf6c6e={},_0x5c951b={'count':0x0,'rows':[]};var _0x2c049f=_[_0xbaad('0x2d')](db[_0xbaad('0x2e')][_0xbaad('0x2f')],function(_0x54f00c){return{'name':_0x54f00c[_0xbaad('0x30')],'type':_0x54f00c['type'][_0xbaad('0x31')]};});_0xdf6c6e[_0xbaad('0x32')]=_[_0xbaad('0x2d')](_0x2c049f,'name');_0xdf6c6e[_0xbaad('0x33')]=_[_0xbaad('0x34')](_0x538fc9['query']);_0xdf6c6e['filters']=_['intersection'](_0xdf6c6e[_0xbaad('0x32')],_0xdf6c6e['query']);_0x4564ef['attributes']=_[_0xbaad('0x35')](_0xdf6c6e[_0xbaad('0x32')],qs[_0xbaad('0x36')](_0x538fc9['query']['fields']));_0x4564ef[_0xbaad('0x37')]=_0x4564ef['attributes']['length']?_0x4564ef[_0xbaad('0x37')]:_0xdf6c6e[_0xbaad('0x32')];if(!_0x538fc9[_0xbaad('0x33')][_0xbaad('0x38')](_0xbaad('0x39'))){_0x4564ef[_0xbaad('0x20')]=qs[_0xbaad('0x20')](_0x538fc9['query'][_0xbaad('0x20')]);_0x4564ef[_0xbaad('0x1f')]=qs[_0xbaad('0x1f')](_0x538fc9[_0xbaad('0x33')][_0xbaad('0x1f')]);}_0x4564ef['order']=qs[_0xbaad('0x3a')](_0x538fc9[_0xbaad('0x33')][_0xbaad('0x3a')]);_0x4564ef[_0xbaad('0x3b')]=qs[_0xbaad('0x3c')](_[_0xbaad('0x3d')](_0x538fc9[_0xbaad('0x33')],_0xdf6c6e[_0xbaad('0x3c')]),_0x2c049f);if(_0x538fc9['query'][_0xbaad('0x3e')]){_0x4564ef['where']=_['merge'](_0x4564ef[_0xbaad('0x3b')],{'$or':_[_0xbaad('0x2d')](_0x2c049f,function(_0x2b0db2){if(_0x2b0db2[_0xbaad('0x3f')]!==_0xbaad('0x40')){var _0x3ab06c={};_0x3ab06c[_0x2b0db2[_0xbaad('0x2b')]]={'$like':'%'+_0x538fc9[_0xbaad('0x33')][_0xbaad('0x3e')]+'%'};return _0x3ab06c;}})});}_0x4564ef=_[_0xbaad('0x41')]({},_0x4564ef,_0x538fc9[_0xbaad('0x42')]);var _0x3c3b37={'where':_0x4564ef['where']};return db[_0xbaad('0x2e')]['count'](_0x3c3b37)['then'](function(_0x2874ed){_0x5c951b['count']=_0x2874ed;if(_0x538fc9['query']['includeAll']){_0x4564ef[_0xbaad('0x43')]=[{'all':!![]}];}return db[_0xbaad('0x2e')]['findAll'](_0x4564ef);})[_0xbaad('0x28')](function(_0x42d571){_0x5c951b['rows']=_0x42d571;return _0x5c951b;})[_0xbaad('0x28')](respondWithFilteredResult(_0x8281ef,_0x4564ef))['catch'](handleError(_0x8281ef,null));};exports[_0xbaad('0x44')]=function(_0x7d682e,_0x102534){var _0x33f806={'raw':![],'where':{'id':_0x7d682e[_0xbaad('0x45')]['id']}},_0xafccbf={};_0xafccbf['model']=_['keys'](db['DeskConfiguration']['rawAttributes']);_0xafccbf[_0xbaad('0x33')]=_[_0xbaad('0x34')](_0x7d682e[_0xbaad('0x33')]);_0xafccbf[_0xbaad('0x3c')]=_[_0xbaad('0x35')](_0xafccbf[_0xbaad('0x32')],_0xafccbf[_0xbaad('0x33')]);_0x33f806[_0xbaad('0x37')]=_[_0xbaad('0x35')](_0xafccbf[_0xbaad('0x32')],qs[_0xbaad('0x36')](_0x7d682e['query']['fields']));_0x33f806[_0xbaad('0x37')]=_0x33f806['attributes'][_0xbaad('0x46')]?_0x33f806['attributes']:_0xafccbf[_0xbaad('0x32')];if(_0x7d682e[_0xbaad('0x33')][_0xbaad('0x47')]){_0x33f806[_0xbaad('0x43')]=[{'all':!![]}];}_0x33f806=_[_0xbaad('0x41')]({},_0x33f806,_0x7d682e['options']);return db['DeskConfiguration'][_0xbaad('0x48')](_0x33f806)[_0xbaad('0x28')](handleEntityNotFound(_0x102534,null))[_0xbaad('0x28')](respondWithResult(_0x102534,null))[_0xbaad('0x49')](handleError(_0x102534,null));};exports['create']=function(_0x5733d4,_0xd9ac11){return db[_0xbaad('0x2e')][_0xbaad('0x4a')](_0x5733d4[_0xbaad('0x4b')],{})[_0xbaad('0x28')](respondWithResult(_0xd9ac11,0xc9))[_0xbaad('0x49')](handleError(_0xd9ac11,null));};exports[_0xbaad('0x27')]=function(_0x2254a7,_0x27987c){if(_0x2254a7[_0xbaad('0x4b')]['id']){delete _0x2254a7[_0xbaad('0x4b')]['id'];}return db[_0xbaad('0x2e')][_0xbaad('0x48')]({'where':{'id':_0x2254a7[_0xbaad('0x45')]['id']}})['then'](handleEntityNotFound(_0x27987c,null))[_0xbaad('0x28')](saveUpdates(_0x2254a7[_0xbaad('0x4b')],null))[_0xbaad('0x28')](respondWithResult(_0x27987c,null))[_0xbaad('0x49')](handleError(_0x27987c,null));};exports[_0xbaad('0x29')]=function(_0xfb4900,_0x481a14){return db[_0xbaad('0x2e')][_0xbaad('0x48')]({'where':{'id':_0xfb4900['params']['id']}})[_0xbaad('0x28')](handleEntityNotFound(_0x481a14,null))[_0xbaad('0x28')](removeEntity(_0x481a14,null))[_0xbaad('0x49')](handleError(_0x481a14,null));};exports[_0xbaad('0x4c')]=function(_0x1293e5,_0x53b086,_0x2abd5a){var _0x2dff8a={};var _0x55cab1={};var _0x8fd014;var _0x3bc782;return db[_0xbaad('0x2e')][_0xbaad('0x4d')]({'where':{'id':_0x1293e5[_0xbaad('0x45')]['id']}})[_0xbaad('0x28')](handleEntityNotFound(_0x53b086,null))[_0xbaad('0x28')](function(_0x3549b6){if(_0x3549b6){_0x8fd014=_0x3549b6;_0x55cab1['model']=_[_0xbaad('0x34')](db[_0xbaad('0x4e')]['rawAttributes']);_0x55cab1[_0xbaad('0x33')]=_[_0xbaad('0x34')](_0x1293e5['query']);_0x55cab1['filters']=_[_0xbaad('0x35')](_0x55cab1[_0xbaad('0x32')],_0x55cab1[_0xbaad('0x33')]);_0x2dff8a[_0xbaad('0x37')]=_[_0xbaad('0x35')](_0x55cab1[_0xbaad('0x32')],qs[_0xbaad('0x36')](_0x1293e5[_0xbaad('0x33')][_0xbaad('0x36')]));_0x2dff8a[_0xbaad('0x37')]=_0x2dff8a[_0xbaad('0x37')][_0xbaad('0x46')]?_0x2dff8a['attributes']:_0x55cab1[_0xbaad('0x32')];_0x2dff8a['order']=qs[_0xbaad('0x3a')](_0x1293e5[_0xbaad('0x33')][_0xbaad('0x3a')]);_0x2dff8a[_0xbaad('0x3b')]=qs[_0xbaad('0x3c')](_['pick'](_0x1293e5[_0xbaad('0x33')],_0x55cab1['filters']));if(_0x1293e5[_0xbaad('0x33')][_0xbaad('0x3e')]){_0x2dff8a[_0xbaad('0x3b')]=_[_0xbaad('0x41')](_0x2dff8a[_0xbaad('0x3b')],{'$or':_[_0xbaad('0x2d')](_0x2dff8a[_0xbaad('0x37')],function(_0x467f1a){var _0x4ca5ff={};_0x4ca5ff[_0x467f1a]={'$like':'%'+_0x1293e5[_0xbaad('0x33')]['filter']+'%'};return _0x4ca5ff;})});}_0x2dff8a=_[_0xbaad('0x41')]({},_0x2dff8a,_0x1293e5[_0xbaad('0x42')]);return _0x8fd014[_0xbaad('0x4c')](_0x2dff8a);}})[_0xbaad('0x28')](function(_0x204d3c){if(_0x204d3c){_0x3bc782=_0x204d3c[_0xbaad('0x46')];if(!_0x1293e5[_0xbaad('0x33')][_0xbaad('0x38')](_0xbaad('0x39'))){_0x2dff8a[_0xbaad('0x20')]=qs[_0xbaad('0x20')](_0x1293e5[_0xbaad('0x33')][_0xbaad('0x20')]);_0x2dff8a[_0xbaad('0x1f')]=qs[_0xbaad('0x1f')](_0x1293e5[_0xbaad('0x33')]['offset']);}return _0x8fd014[_0xbaad('0x4c')](_0x2dff8a);}})['then'](function(_0x41b849){if(_0x41b849){return _0x41b849?{'count':_0x3bc782,'rows':_0x41b849}:null;}})[_0xbaad('0x28')](respondWithResult(_0x53b086,null))['catch'](handleError(_0x53b086,null));};exports['getSubjects']=function(_0x4630a4,_0x367cef,_0x84d9bf){var _0x3016aa={};var _0xed49bb={};var _0x1e7fa8;var _0x1c2337;return db[_0xbaad('0x2e')]['findOne']({'where':{'id':_0x4630a4[_0xbaad('0x45')]['id']}})[_0xbaad('0x28')](handleEntityNotFound(_0x367cef,null))[_0xbaad('0x28')](function(_0x61c1fe){if(_0x61c1fe){_0x1e7fa8=_0x61c1fe;_0xed49bb[_0xbaad('0x32')]=_[_0xbaad('0x34')](db[_0xbaad('0x4e')][_0xbaad('0x2f')]);_0xed49bb[_0xbaad('0x33')]=_[_0xbaad('0x34')](_0x4630a4[_0xbaad('0x33')]);_0xed49bb[_0xbaad('0x3c')]=_[_0xbaad('0x35')](_0xed49bb['model'],_0xed49bb[_0xbaad('0x33')]);_0x3016aa[_0xbaad('0x37')]=_['intersection'](_0xed49bb['model'],qs[_0xbaad('0x36')](_0x4630a4['query']['fields']));_0x3016aa[_0xbaad('0x37')]=_0x3016aa[_0xbaad('0x37')][_0xbaad('0x46')]?_0x3016aa[_0xbaad('0x37')]:_0xed49bb[_0xbaad('0x32')];_0x3016aa[_0xbaad('0x4f')]=qs[_0xbaad('0x3a')](_0x4630a4[_0xbaad('0x33')][_0xbaad('0x3a')]);_0x3016aa['where']=qs[_0xbaad('0x3c')](_[_0xbaad('0x3d')](_0x4630a4[_0xbaad('0x33')],_0xed49bb[_0xbaad('0x3c')]));if(_0x4630a4[_0xbaad('0x33')]['filter']){_0x3016aa[_0xbaad('0x3b')]=_[_0xbaad('0x41')](_0x3016aa[_0xbaad('0x3b')],{'$or':_[_0xbaad('0x2d')](_0x3016aa['attributes'],function(_0x253ad8){var _0x2bf309={};_0x2bf309[_0x253ad8]={'$like':'%'+_0x4630a4[_0xbaad('0x33')][_0xbaad('0x3e')]+'%'};return _0x2bf309;})});}_0x3016aa=_[_0xbaad('0x41')]({},_0x3016aa,_0x4630a4[_0xbaad('0x42')]);return _0x1e7fa8['getSubjects'](_0x3016aa);}})[_0xbaad('0x28')](function(_0xfa7859){if(_0xfa7859){_0x1c2337=_0xfa7859[_0xbaad('0x46')];if(!_0x4630a4[_0xbaad('0x33')][_0xbaad('0x38')](_0xbaad('0x39'))){_0x3016aa[_0xbaad('0x20')]=qs[_0xbaad('0x20')](_0x4630a4[_0xbaad('0x33')][_0xbaad('0x20')]);_0x3016aa[_0xbaad('0x1f')]=qs[_0xbaad('0x1f')](_0x4630a4[_0xbaad('0x33')][_0xbaad('0x1f')]);}return _0x1e7fa8[_0xbaad('0x50')](_0x3016aa);}})['then'](function(_0x799379){if(_0x799379){return _0x799379?{'count':_0x1c2337,'rows':_0x799379}:null;}})[_0xbaad('0x28')](respondWithResult(_0x367cef,null))[_0xbaad('0x49')](handleError(_0x367cef,null));};exports[_0xbaad('0x51')]=function(_0x4da162,_0x2ce61c,_0x114866){var _0x10fa0b={};var _0x4efb97={};var _0x322a5d;var _0x50425d;return db['DeskConfiguration']['findOne']({'where':{'id':_0x4da162[_0xbaad('0x45')]['id']}})[_0xbaad('0x28')](handleEntityNotFound(_0x2ce61c,null))[_0xbaad('0x28')](function(_0x372464){if(_0x372464){_0x322a5d=_0x372464;_0x4efb97[_0xbaad('0x32')]=_[_0xbaad('0x34')](db[_0xbaad('0x4e')][_0xbaad('0x2f')]);_0x4efb97[_0xbaad('0x33')]=_['keys'](_0x4da162[_0xbaad('0x33')]);_0x4efb97[_0xbaad('0x3c')]=_[_0xbaad('0x35')](_0x4efb97[_0xbaad('0x32')],_0x4efb97[_0xbaad('0x33')]);_0x10fa0b['attributes']=_[_0xbaad('0x35')](_0x4efb97[_0xbaad('0x32')],qs[_0xbaad('0x36')](_0x4da162['query'][_0xbaad('0x36')]));_0x10fa0b['attributes']=_0x10fa0b['attributes']['length']?_0x10fa0b[_0xbaad('0x37')]:_0x4efb97['model'];_0x10fa0b['order']=qs[_0xbaad('0x3a')](_0x4da162[_0xbaad('0x33')]['sort']);_0x10fa0b['where']=qs[_0xbaad('0x3c')](_[_0xbaad('0x3d')](_0x4da162[_0xbaad('0x33')],_0x4efb97[_0xbaad('0x3c')]));if(_0x4da162[_0xbaad('0x33')][_0xbaad('0x3e')]){_0x10fa0b[_0xbaad('0x3b')]=_[_0xbaad('0x41')](_0x10fa0b[_0xbaad('0x3b')],{'$or':_['map'](_0x10fa0b[_0xbaad('0x37')],function(_0x4bb71c){var _0x47eb2a={};_0x47eb2a[_0x4bb71c]={'$like':'%'+_0x4da162['query'][_0xbaad('0x3e')]+'%'};return _0x47eb2a;})});}_0x10fa0b=_['merge']({},_0x10fa0b,_0x4da162[_0xbaad('0x42')]);return _0x322a5d[_0xbaad('0x51')](_0x10fa0b);}})[_0xbaad('0x28')](function(_0x2552c1){if(_0x2552c1){_0x50425d=_0x2552c1['length'];if(!_0x4da162[_0xbaad('0x33')][_0xbaad('0x38')](_0xbaad('0x39'))){_0x10fa0b[_0xbaad('0x20')]=qs[_0xbaad('0x20')](_0x4da162[_0xbaad('0x33')][_0xbaad('0x20')]);_0x10fa0b[_0xbaad('0x1f')]=qs[_0xbaad('0x1f')](_0x4da162[_0xbaad('0x33')][_0xbaad('0x1f')]);}return _0x322a5d['getDescriptions'](_0x10fa0b);}})[_0xbaad('0x28')](function(_0x7564b3){if(_0x7564b3){return _0x7564b3?{'count':_0x50425d,'rows':_0x7564b3}:null;}})[_0xbaad('0x28')](respondWithResult(_0x2ce61c,null))['catch'](handleError(_0x2ce61c,null));};exports[_0xbaad('0x52')]=function(_0x1f489d,_0x333ea9,_0x5e8135){var _0x5147da={};var _0x310c07={};var _0x9c88b5;var _0x167680;return db[_0xbaad('0x2e')][_0xbaad('0x4d')]({'where':{'id':_0x1f489d[_0xbaad('0x45')]['id']}})['then'](handleEntityNotFound(_0x333ea9,null))[_0xbaad('0x28')](function(_0x1a2f36){if(_0x1a2f36){_0x9c88b5=_0x1a2f36;_0x310c07[_0xbaad('0x32')]=_[_0xbaad('0x34')](db[_0xbaad('0x53')][_0xbaad('0x2f')]);_0x310c07[_0xbaad('0x33')]=_[_0xbaad('0x34')](_0x1f489d[_0xbaad('0x33')]);_0x310c07[_0xbaad('0x3c')]=_[_0xbaad('0x35')](_0x310c07[_0xbaad('0x32')],_0x310c07[_0xbaad('0x33')]);_0x5147da[_0xbaad('0x37')]=_[_0xbaad('0x35')](_0x310c07[_0xbaad('0x32')],qs[_0xbaad('0x36')](_0x1f489d[_0xbaad('0x33')][_0xbaad('0x36')]));_0x5147da[_0xbaad('0x37')]=_0x5147da['attributes'][_0xbaad('0x46')]?_0x5147da['attributes']:_0x310c07[_0xbaad('0x32')];_0x5147da[_0xbaad('0x4f')]=qs[_0xbaad('0x3a')](_0x1f489d['query'][_0xbaad('0x3a')]);_0x5147da['where']=qs[_0xbaad('0x3c')](_['pick'](_0x1f489d['query'],_0x310c07[_0xbaad('0x3c')]));if(_0x1f489d[_0xbaad('0x33')]['filter']){_0x5147da['where']=_[_0xbaad('0x41')](_0x5147da[_0xbaad('0x3b')],{'$or':_['map'](_0x5147da[_0xbaad('0x37')],function(_0xa91946){var _0x5324bc={};_0x5324bc[_0xa91946]={'$like':'%'+_0x1f489d['query']['filter']+'%'};return _0x5324bc;})});}_0x5147da=_[_0xbaad('0x41')]({},_0x5147da,_0x1f489d[_0xbaad('0x42')]);return _0x9c88b5[_0xbaad('0x52')](_0x5147da);}})[_0xbaad('0x28')](function(_0x2d0218){if(_0x2d0218){_0x167680=_0x2d0218[_0xbaad('0x46')];if(!_0x1f489d[_0xbaad('0x33')]['hasOwnProperty'](_0xbaad('0x39'))){_0x5147da[_0xbaad('0x20')]=qs['limit'](_0x1f489d[_0xbaad('0x33')][_0xbaad('0x20')]);_0x5147da['offset']=qs['offset'](_0x1f489d[_0xbaad('0x33')][_0xbaad('0x1f')]);}return _0x9c88b5['getTags'](_0x5147da);}})[_0xbaad('0x28')](function(_0x131e04){if(_0x131e04){return _0x131e04?{'count':_0x167680,'rows':_0x131e04}:null;}})[_0xbaad('0x28')](respondWithResult(_0x333ea9,null))[_0xbaad('0x49')](handleError(_0x333ea9,null));};exports['setTags']=function(_0xcb9cb1,_0x312bfe,_0x4a065d){if(_0xcb9cb1[_0xbaad('0x4b')]['id']){delete _0xcb9cb1[_0xbaad('0x4b')]['id'];}return db[_0xbaad('0x2e')][_0xbaad('0x4d')]({'where':{'id':_0xcb9cb1['params']['id']}})[_0xbaad('0x28')](handleEntityNotFound(_0x312bfe,null))[_0xbaad('0x28')](function(_0x24d5b5){if(_0x24d5b5){return _0x24d5b5[_0xbaad('0x54')](_0xcb9cb1[_0xbaad('0x4b')][_0xbaad('0x55')]||[]);}return null;})[_0xbaad('0x28')](respondWithResult(_0x312bfe,null))[_0xbaad('0x49')](handleError(_0x312bfe,null));}; \ No newline at end of file +var _0x3c61=['VIRTUAL','DeskConfiguration','includeAll','rows','catch','show','params','length','include','create','body','find','getFields','findOne','DeskField','pick','options','getSubjects','getDescriptions','getTags','Tag','setTags','eml-format','rimraf','fast-json-patch','request-promise','moment','bluebird','mustache','util','path','sox','ejs','lodash','squel','crypto','jsforce','querystring','papaparse','../../components/auth/service','../../components/parsers/qs','../../config/license/hardware','../../config/logger','../../config/utils','../../config/license/util','../../mysqldb','sendStatus','offset','undefined','limit','count','json','apply','save','update','destroy','then','status','error','stack','name','index','map','rawAttributes','fieldName','type','model','query','keys','filters','intersection','attributes','fields','hasOwnProperty','nolimit','order','sort','where','filter','merge'];(function(_0x405754,_0x2f76c5){var _0x2a76f6=function(_0x29a203){while(--_0x29a203){_0x405754['push'](_0x405754['shift']());}};_0x2a76f6(++_0x2f76c5);}(_0x3c61,0xb6));var _0x13c6=function(_0x205e85,_0xebc595){_0x205e85=_0x205e85-0x0;var _0x4f0cfb=_0x3c61[_0x205e85];return _0x4f0cfb;};'use strict';var emlformat=require(_0x13c6('0x0'));var rimraf=require(_0x13c6('0x1'));var zipdir=require('zip-dir');var jsonpatch=require(_0x13c6('0x2'));var rp=require(_0x13c6('0x3'));var moment=require(_0x13c6('0x4'));var BPromise=require(_0x13c6('0x5'));var Mustache=require(_0x13c6('0x6'));var util=require(_0x13c6('0x7'));var path=require(_0x13c6('0x8'));var sox=require(_0x13c6('0x9'));var csv=require('to-csv');var ejs=require(_0x13c6('0xa'));var fs=require('fs');var fs_extra=require('fs-extra');var _=require(_0x13c6('0xb'));var squel=require(_0x13c6('0xc'));var crypto=require(_0x13c6('0xd'));var jsforce=require(_0x13c6('0xe'));var deskjs=require('desk.js');var toCsv=require('to-csv');var querystring=require(_0x13c6('0xf'));var Papa=require(_0x13c6('0x10'));var Redis=require('ioredis');var authService=require(_0x13c6('0x11'));var qs=require(_0x13c6('0x12'));var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0x13c6('0x13'));var logger=require(_0x13c6('0x14'))('api');var utils=require(_0x13c6('0x15'));var config=require('../../config/environment');var licenseUtil=require(_0x13c6('0x16'));var db=require(_0x13c6('0x17'))['db'];function respondWithStatusCode(_0x426fa9,_0x211908){_0x211908=_0x211908||0xcc;return function(_0x22f9bc){if(_0x22f9bc){return _0x426fa9[_0x13c6('0x18')](_0x211908);}return _0x426fa9['status'](_0x211908)['end']();};}function respondWithResult(_0x56a3e5,_0x5f271a){_0x5f271a=_0x5f271a||0xc8;return function(_0x226a4c){if(_0x226a4c){return _0x56a3e5['status'](_0x5f271a)['json'](_0x226a4c);}};}function respondWithFilteredResult(_0x28e892,_0x2b4e86){return function(_0x397b47){if(_0x397b47){var _0x4c2bf0=typeof _0x2b4e86[_0x13c6('0x19')]===_0x13c6('0x1a')&&typeof _0x2b4e86[_0x13c6('0x1b')]===_0x13c6('0x1a');var _0x224f4f=_0x397b47[_0x13c6('0x1c')];var _0x595f20=_0x4c2bf0?0x0:_0x2b4e86[_0x13c6('0x19')];var _0x1bbdae=_0x4c2bf0?_0x397b47[_0x13c6('0x1c')]:_0x2b4e86[_0x13c6('0x19')]+_0x2b4e86[_0x13c6('0x1b')];var _0x1d6563;if(_0x1bbdae>=_0x224f4f){_0x1bbdae=_0x224f4f;_0x1d6563=0xc8;}else{_0x1d6563=0xce;}_0x28e892['status'](_0x1d6563);return _0x28e892['set']('Content-Range',_0x595f20+'-'+_0x1bbdae+'/'+_0x224f4f)[_0x13c6('0x1d')](_0x397b47);}return null;};}function patchUpdates(_0x48b3f8){return function(_0x1318ab){try{jsonpatch[_0x13c6('0x1e')](_0x1318ab,_0x48b3f8,!![]);}catch(_0x1f0d82){return BPromise['reject'](_0x1f0d82);}return _0x1318ab[_0x13c6('0x1f')]();};}function saveUpdates(_0x5c47b4,_0x469044){return function(_0x4e3850){if(_0x4e3850){return _0x4e3850[_0x13c6('0x20')](_0x5c47b4)['then'](function(_0x154b45){return _0x154b45;});}return null;};}function removeEntity(_0x3011b3,_0x24cd32){return function(_0x34d104){if(_0x34d104){return _0x34d104[_0x13c6('0x21')]()[_0x13c6('0x22')](function(){_0x3011b3[_0x13c6('0x23')](0xcc)['end']();});}};}function handleEntityNotFound(_0x295ae4,_0x2dd143){return function(_0x4ac81b){if(!_0x4ac81b){_0x295ae4[_0x13c6('0x18')](0x194);}return _0x4ac81b;};}function handleError(_0x161afd,_0x2e0478){_0x2e0478=_0x2e0478||0x1f4;return function(_0x46e5bb){logger[_0x13c6('0x24')](_0x46e5bb[_0x13c6('0x25')]);if(_0x46e5bb[_0x13c6('0x26')]){delete _0x46e5bb[_0x13c6('0x26')];}_0x161afd[_0x13c6('0x23')](_0x2e0478)['send'](_0x46e5bb);};}exports[_0x13c6('0x27')]=function(_0x2f0bc7,_0x4829ac){var _0x280e7f={},_0x22cba5={},_0x15c494={'count':0x0,'rows':[]};var _0x1f269d=_[_0x13c6('0x28')](db['DeskConfiguration'][_0x13c6('0x29')],function(_0x590a81){return{'name':_0x590a81[_0x13c6('0x2a')],'type':_0x590a81[_0x13c6('0x2b')]['key']};});_0x22cba5[_0x13c6('0x2c')]=_['map'](_0x1f269d,_0x13c6('0x26'));_0x22cba5[_0x13c6('0x2d')]=_[_0x13c6('0x2e')](_0x2f0bc7['query']);_0x22cba5[_0x13c6('0x2f')]=_[_0x13c6('0x30')](_0x22cba5['model'],_0x22cba5['query']);_0x280e7f[_0x13c6('0x31')]=_[_0x13c6('0x30')](_0x22cba5[_0x13c6('0x2c')],qs[_0x13c6('0x32')](_0x2f0bc7[_0x13c6('0x2d')][_0x13c6('0x32')]));_0x280e7f[_0x13c6('0x31')]=_0x280e7f[_0x13c6('0x31')]['length']?_0x280e7f[_0x13c6('0x31')]:_0x22cba5[_0x13c6('0x2c')];if(!_0x2f0bc7[_0x13c6('0x2d')][_0x13c6('0x33')](_0x13c6('0x34'))){_0x280e7f[_0x13c6('0x1b')]=qs[_0x13c6('0x1b')](_0x2f0bc7[_0x13c6('0x2d')]['limit']);_0x280e7f[_0x13c6('0x19')]=qs[_0x13c6('0x19')](_0x2f0bc7['query'][_0x13c6('0x19')]);}_0x280e7f[_0x13c6('0x35')]=qs[_0x13c6('0x36')](_0x2f0bc7[_0x13c6('0x2d')][_0x13c6('0x36')]);_0x280e7f[_0x13c6('0x37')]=qs['filters'](_['pick'](_0x2f0bc7[_0x13c6('0x2d')],_0x22cba5['filters']),_0x1f269d);if(_0x2f0bc7[_0x13c6('0x2d')][_0x13c6('0x38')]){_0x280e7f[_0x13c6('0x37')]=_[_0x13c6('0x39')](_0x280e7f[_0x13c6('0x37')],{'$or':_[_0x13c6('0x28')](_0x1f269d,function(_0x4d5d7c){if(_0x4d5d7c['type']!==_0x13c6('0x3a')){var _0x381ecc={};_0x381ecc[_0x4d5d7c[_0x13c6('0x26')]]={'$like':'%'+_0x2f0bc7[_0x13c6('0x2d')][_0x13c6('0x38')]+'%'};return _0x381ecc;}})});}_0x280e7f=_[_0x13c6('0x39')]({},_0x280e7f,_0x2f0bc7['options']);var _0x51e1ef={'where':_0x280e7f['where']};return db[_0x13c6('0x3b')][_0x13c6('0x1c')](_0x51e1ef)['then'](function(_0x208ef3){_0x15c494[_0x13c6('0x1c')]=_0x208ef3;if(_0x2f0bc7[_0x13c6('0x2d')][_0x13c6('0x3c')]){_0x280e7f['include']=[{'all':!![]}];}return db[_0x13c6('0x3b')]['findAll'](_0x280e7f);})[_0x13c6('0x22')](function(_0x4ccf92){_0x15c494[_0x13c6('0x3d')]=_0x4ccf92;return _0x15c494;})['then'](respondWithFilteredResult(_0x4829ac,_0x280e7f))[_0x13c6('0x3e')](handleError(_0x4829ac,null));};exports[_0x13c6('0x3f')]=function(_0x5168c7,_0x2da1d8){var _0x1e177d={'raw':![],'where':{'id':_0x5168c7[_0x13c6('0x40')]['id']}},_0x385d81={};_0x385d81[_0x13c6('0x2c')]=_['keys'](db[_0x13c6('0x3b')][_0x13c6('0x29')]);_0x385d81[_0x13c6('0x2d')]=_['keys'](_0x5168c7['query']);_0x385d81[_0x13c6('0x2f')]=_[_0x13c6('0x30')](_0x385d81['model'],_0x385d81['query']);_0x1e177d[_0x13c6('0x31')]=_[_0x13c6('0x30')](_0x385d81['model'],qs[_0x13c6('0x32')](_0x5168c7['query'][_0x13c6('0x32')]));_0x1e177d[_0x13c6('0x31')]=_0x1e177d['attributes'][_0x13c6('0x41')]?_0x1e177d[_0x13c6('0x31')]:_0x385d81['model'];if(_0x5168c7[_0x13c6('0x2d')][_0x13c6('0x3c')]){_0x1e177d[_0x13c6('0x42')]=[{'all':!![]}];}_0x1e177d=_['merge']({},_0x1e177d,_0x5168c7['options']);return db[_0x13c6('0x3b')]['find'](_0x1e177d)[_0x13c6('0x22')](handleEntityNotFound(_0x2da1d8,null))['then'](respondWithResult(_0x2da1d8,null))[_0x13c6('0x3e')](handleError(_0x2da1d8,null));};exports[_0x13c6('0x43')]=function(_0x1a30ea,_0x23bb78){return db[_0x13c6('0x3b')][_0x13c6('0x43')](_0x1a30ea[_0x13c6('0x44')],{})[_0x13c6('0x22')](respondWithResult(_0x23bb78,0xc9))[_0x13c6('0x3e')](handleError(_0x23bb78,null));};exports[_0x13c6('0x20')]=function(_0xb6693e,_0x113537){if(_0xb6693e[_0x13c6('0x44')]['id']){delete _0xb6693e[_0x13c6('0x44')]['id'];}return db[_0x13c6('0x3b')][_0x13c6('0x45')]({'where':{'id':_0xb6693e[_0x13c6('0x40')]['id']}})[_0x13c6('0x22')](handleEntityNotFound(_0x113537,null))[_0x13c6('0x22')](saveUpdates(_0xb6693e[_0x13c6('0x44')],null))[_0x13c6('0x22')](respondWithResult(_0x113537,null))[_0x13c6('0x3e')](handleError(_0x113537,null));};exports[_0x13c6('0x21')]=function(_0xc0bc00,_0x51fca4){return db['DeskConfiguration'][_0x13c6('0x45')]({'where':{'id':_0xc0bc00[_0x13c6('0x40')]['id']}})[_0x13c6('0x22')](handleEntityNotFound(_0x51fca4,null))['then'](removeEntity(_0x51fca4,null))['catch'](handleError(_0x51fca4,null));};exports[_0x13c6('0x46')]=function(_0xdf46f3,_0x655a11,_0x7c75e1){var _0x7be0c7={};var _0x171d1c={};var _0x2d8d5e;var _0x1f7d51;return db['DeskConfiguration'][_0x13c6('0x47')]({'where':{'id':_0xdf46f3[_0x13c6('0x40')]['id']}})[_0x13c6('0x22')](handleEntityNotFound(_0x655a11,null))[_0x13c6('0x22')](function(_0x15e666){if(_0x15e666){_0x2d8d5e=_0x15e666;_0x171d1c[_0x13c6('0x2c')]=_[_0x13c6('0x2e')](db[_0x13c6('0x48')]['rawAttributes']);_0x171d1c[_0x13c6('0x2d')]=_[_0x13c6('0x2e')](_0xdf46f3[_0x13c6('0x2d')]);_0x171d1c[_0x13c6('0x2f')]=_[_0x13c6('0x30')](_0x171d1c['model'],_0x171d1c[_0x13c6('0x2d')]);_0x7be0c7[_0x13c6('0x31')]=_[_0x13c6('0x30')](_0x171d1c[_0x13c6('0x2c')],qs['fields'](_0xdf46f3['query']['fields']));_0x7be0c7['attributes']=_0x7be0c7[_0x13c6('0x31')][_0x13c6('0x41')]?_0x7be0c7[_0x13c6('0x31')]:_0x171d1c[_0x13c6('0x2c')];_0x7be0c7['order']=qs[_0x13c6('0x36')](_0xdf46f3['query']['sort']);_0x7be0c7[_0x13c6('0x37')]=qs['filters'](_[_0x13c6('0x49')](_0xdf46f3[_0x13c6('0x2d')],_0x171d1c[_0x13c6('0x2f')]));if(_0xdf46f3[_0x13c6('0x2d')][_0x13c6('0x38')]){_0x7be0c7[_0x13c6('0x37')]=_[_0x13c6('0x39')](_0x7be0c7[_0x13c6('0x37')],{'$or':_[_0x13c6('0x28')](_0x7be0c7['attributes'],function(_0x38d130){var _0x1c76c7={};_0x1c76c7[_0x38d130]={'$like':'%'+_0xdf46f3[_0x13c6('0x2d')][_0x13c6('0x38')]+'%'};return _0x1c76c7;})});}_0x7be0c7=_[_0x13c6('0x39')]({},_0x7be0c7,_0xdf46f3[_0x13c6('0x4a')]);return _0x2d8d5e[_0x13c6('0x46')](_0x7be0c7);}})[_0x13c6('0x22')](function(_0x3ed282){if(_0x3ed282){_0x1f7d51=_0x3ed282[_0x13c6('0x41')];if(!_0xdf46f3['query'][_0x13c6('0x33')](_0x13c6('0x34'))){_0x7be0c7['limit']=qs[_0x13c6('0x1b')](_0xdf46f3[_0x13c6('0x2d')][_0x13c6('0x1b')]);_0x7be0c7['offset']=qs['offset'](_0xdf46f3[_0x13c6('0x2d')]['offset']);}return _0x2d8d5e[_0x13c6('0x46')](_0x7be0c7);}})[_0x13c6('0x22')](function(_0x17d93c){if(_0x17d93c){return _0x17d93c?{'count':_0x1f7d51,'rows':_0x17d93c}:null;}})[_0x13c6('0x22')](respondWithResult(_0x655a11,null))['catch'](handleError(_0x655a11,null));};exports[_0x13c6('0x4b')]=function(_0x59ec79,_0x4eeda9,_0x41d3ed){var _0x5d0333={};var _0x58e0ee={};var _0x2bc9c8;var _0x432ae2;return db['DeskConfiguration']['findOne']({'where':{'id':_0x59ec79['params']['id']}})[_0x13c6('0x22')](handleEntityNotFound(_0x4eeda9,null))['then'](function(_0x1b062c){if(_0x1b062c){_0x2bc9c8=_0x1b062c;_0x58e0ee['model']=_[_0x13c6('0x2e')](db[_0x13c6('0x48')][_0x13c6('0x29')]);_0x58e0ee['query']=_[_0x13c6('0x2e')](_0x59ec79[_0x13c6('0x2d')]);_0x58e0ee[_0x13c6('0x2f')]=_[_0x13c6('0x30')](_0x58e0ee[_0x13c6('0x2c')],_0x58e0ee[_0x13c6('0x2d')]);_0x5d0333[_0x13c6('0x31')]=_[_0x13c6('0x30')](_0x58e0ee['model'],qs[_0x13c6('0x32')](_0x59ec79['query'][_0x13c6('0x32')]));_0x5d0333['attributes']=_0x5d0333[_0x13c6('0x31')][_0x13c6('0x41')]?_0x5d0333[_0x13c6('0x31')]:_0x58e0ee[_0x13c6('0x2c')];_0x5d0333[_0x13c6('0x35')]=qs[_0x13c6('0x36')](_0x59ec79[_0x13c6('0x2d')][_0x13c6('0x36')]);_0x5d0333[_0x13c6('0x37')]=qs[_0x13c6('0x2f')](_[_0x13c6('0x49')](_0x59ec79[_0x13c6('0x2d')],_0x58e0ee[_0x13c6('0x2f')]));if(_0x59ec79[_0x13c6('0x2d')][_0x13c6('0x38')]){_0x5d0333[_0x13c6('0x37')]=_['merge'](_0x5d0333[_0x13c6('0x37')],{'$or':_['map'](_0x5d0333[_0x13c6('0x31')],function(_0xc1273d){var _0x184f29={};_0x184f29[_0xc1273d]={'$like':'%'+_0x59ec79['query'][_0x13c6('0x38')]+'%'};return _0x184f29;})});}_0x5d0333=_['merge']({},_0x5d0333,_0x59ec79[_0x13c6('0x4a')]);return _0x2bc9c8[_0x13c6('0x4b')](_0x5d0333);}})['then'](function(_0x1e910e){if(_0x1e910e){_0x432ae2=_0x1e910e['length'];if(!_0x59ec79[_0x13c6('0x2d')][_0x13c6('0x33')](_0x13c6('0x34'))){_0x5d0333[_0x13c6('0x1b')]=qs['limit'](_0x59ec79['query'][_0x13c6('0x1b')]);_0x5d0333[_0x13c6('0x19')]=qs['offset'](_0x59ec79[_0x13c6('0x2d')]['offset']);}return _0x2bc9c8['getSubjects'](_0x5d0333);}})[_0x13c6('0x22')](function(_0x35729f){if(_0x35729f){return _0x35729f?{'count':_0x432ae2,'rows':_0x35729f}:null;}})['then'](respondWithResult(_0x4eeda9,null))[_0x13c6('0x3e')](handleError(_0x4eeda9,null));};exports['getDescriptions']=function(_0x14d899,_0x3ba370,_0x5434c3){var _0x1fab56={};var _0x5356e0={};var _0x364ac1;var _0x43640e;return db['DeskConfiguration'][_0x13c6('0x47')]({'where':{'id':_0x14d899[_0x13c6('0x40')]['id']}})['then'](handleEntityNotFound(_0x3ba370,null))[_0x13c6('0x22')](function(_0x2ee63b){if(_0x2ee63b){_0x364ac1=_0x2ee63b;_0x5356e0[_0x13c6('0x2c')]=_['keys'](db[_0x13c6('0x48')][_0x13c6('0x29')]);_0x5356e0[_0x13c6('0x2d')]=_[_0x13c6('0x2e')](_0x14d899['query']);_0x5356e0['filters']=_[_0x13c6('0x30')](_0x5356e0[_0x13c6('0x2c')],_0x5356e0[_0x13c6('0x2d')]);_0x1fab56[_0x13c6('0x31')]=_['intersection'](_0x5356e0[_0x13c6('0x2c')],qs['fields'](_0x14d899[_0x13c6('0x2d')][_0x13c6('0x32')]));_0x1fab56[_0x13c6('0x31')]=_0x1fab56[_0x13c6('0x31')]['length']?_0x1fab56[_0x13c6('0x31')]:_0x5356e0[_0x13c6('0x2c')];_0x1fab56[_0x13c6('0x35')]=qs[_0x13c6('0x36')](_0x14d899[_0x13c6('0x2d')][_0x13c6('0x36')]);_0x1fab56[_0x13c6('0x37')]=qs[_0x13c6('0x2f')](_[_0x13c6('0x49')](_0x14d899[_0x13c6('0x2d')],_0x5356e0[_0x13c6('0x2f')]));if(_0x14d899[_0x13c6('0x2d')]['filter']){_0x1fab56['where']=_[_0x13c6('0x39')](_0x1fab56[_0x13c6('0x37')],{'$or':_[_0x13c6('0x28')](_0x1fab56[_0x13c6('0x31')],function(_0x3cc51b){var _0x31d8de={};_0x31d8de[_0x3cc51b]={'$like':'%'+_0x14d899[_0x13c6('0x2d')][_0x13c6('0x38')]+'%'};return _0x31d8de;})});}_0x1fab56=_[_0x13c6('0x39')]({},_0x1fab56,_0x14d899[_0x13c6('0x4a')]);return _0x364ac1[_0x13c6('0x4c')](_0x1fab56);}})['then'](function(_0x1dd5e1){if(_0x1dd5e1){_0x43640e=_0x1dd5e1['length'];if(!_0x14d899[_0x13c6('0x2d')][_0x13c6('0x33')](_0x13c6('0x34'))){_0x1fab56[_0x13c6('0x1b')]=qs[_0x13c6('0x1b')](_0x14d899['query'][_0x13c6('0x1b')]);_0x1fab56[_0x13c6('0x19')]=qs[_0x13c6('0x19')](_0x14d899['query'][_0x13c6('0x19')]);}return _0x364ac1[_0x13c6('0x4c')](_0x1fab56);}})[_0x13c6('0x22')](function(_0x307561){if(_0x307561){return _0x307561?{'count':_0x43640e,'rows':_0x307561}:null;}})[_0x13c6('0x22')](respondWithResult(_0x3ba370,null))['catch'](handleError(_0x3ba370,null));};exports[_0x13c6('0x4d')]=function(_0x3329c5,_0x145282,_0x4aba5a){var _0x46895f={};var _0x5732c0={};var _0x13ed74;var _0x44dd58;return db[_0x13c6('0x3b')]['findOne']({'where':{'id':_0x3329c5['params']['id']}})[_0x13c6('0x22')](handleEntityNotFound(_0x145282,null))[_0x13c6('0x22')](function(_0x181162){if(_0x181162){_0x13ed74=_0x181162;_0x5732c0['model']=_['keys'](db[_0x13c6('0x4e')][_0x13c6('0x29')]);_0x5732c0[_0x13c6('0x2d')]=_[_0x13c6('0x2e')](_0x3329c5['query']);_0x5732c0[_0x13c6('0x2f')]=_[_0x13c6('0x30')](_0x5732c0['model'],_0x5732c0[_0x13c6('0x2d')]);_0x46895f['attributes']=_[_0x13c6('0x30')](_0x5732c0[_0x13c6('0x2c')],qs[_0x13c6('0x32')](_0x3329c5[_0x13c6('0x2d')][_0x13c6('0x32')]));_0x46895f[_0x13c6('0x31')]=_0x46895f[_0x13c6('0x31')]['length']?_0x46895f[_0x13c6('0x31')]:_0x5732c0['model'];_0x46895f[_0x13c6('0x35')]=qs[_0x13c6('0x36')](_0x3329c5['query'][_0x13c6('0x36')]);_0x46895f[_0x13c6('0x37')]=qs[_0x13c6('0x2f')](_[_0x13c6('0x49')](_0x3329c5[_0x13c6('0x2d')],_0x5732c0[_0x13c6('0x2f')]));if(_0x3329c5[_0x13c6('0x2d')][_0x13c6('0x38')]){_0x46895f[_0x13c6('0x37')]=_[_0x13c6('0x39')](_0x46895f['where'],{'$or':_[_0x13c6('0x28')](_0x46895f[_0x13c6('0x31')],function(_0xa96044){var _0x127d1d={};_0x127d1d[_0xa96044]={'$like':'%'+_0x3329c5['query']['filter']+'%'};return _0x127d1d;})});}_0x46895f=_[_0x13c6('0x39')]({},_0x46895f,_0x3329c5[_0x13c6('0x4a')]);return _0x13ed74[_0x13c6('0x4d')](_0x46895f);}})[_0x13c6('0x22')](function(_0x21f34a){if(_0x21f34a){_0x44dd58=_0x21f34a[_0x13c6('0x41')];if(!_0x3329c5[_0x13c6('0x2d')][_0x13c6('0x33')](_0x13c6('0x34'))){_0x46895f[_0x13c6('0x1b')]=qs[_0x13c6('0x1b')](_0x3329c5['query'][_0x13c6('0x1b')]);_0x46895f[_0x13c6('0x19')]=qs[_0x13c6('0x19')](_0x3329c5[_0x13c6('0x2d')][_0x13c6('0x19')]);}return _0x13ed74[_0x13c6('0x4d')](_0x46895f);}})['then'](function(_0xe97b7d){if(_0xe97b7d){return _0xe97b7d?{'count':_0x44dd58,'rows':_0xe97b7d}:null;}})[_0x13c6('0x22')](respondWithResult(_0x145282,null))[_0x13c6('0x3e')](handleError(_0x145282,null));};exports['setTags']=function(_0x533408,_0x49a2b5,_0x2ff1f9){if(_0x533408[_0x13c6('0x44')]['id']){delete _0x533408[_0x13c6('0x44')]['id'];}return db[_0x13c6('0x3b')][_0x13c6('0x47')]({'where':{'id':_0x533408[_0x13c6('0x40')]['id']}})['then'](handleEntityNotFound(_0x49a2b5,null))[_0x13c6('0x22')](function(_0x370725){if(_0x370725){return _0x370725[_0x13c6('0x4f')](_0x533408[_0x13c6('0x44')]['ids']||[]);}return null;})[_0x13c6('0x22')](respondWithResult(_0x49a2b5,null))[_0x13c6('0x3e')](handleError(_0x49a2b5,null));}; \ No newline at end of file diff --git a/server/api/intDeskConfiguration/intDeskConfiguration.model.js b/server/api/intDeskConfiguration/intDeskConfiguration.model.js index 29a7c9c..23fe4a2 100644 --- a/server/api/intDeskConfiguration/intDeskConfiguration.model.js +++ b/server/api/intDeskConfiguration/intDeskConfiguration.model.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x593a=['moment','bluebird','path','../../config/environment','define','DeskConfiguration','int_desk_configurations','lodash','util','../../config/logger','api'];(function(_0x20a584,_0xe384a5){var _0x4b41a8=function(_0x2127c6){while(--_0x2127c6){_0x20a584['push'](_0x20a584['shift']());}};_0x4b41a8(++_0xe384a5);}(_0x593a,0x1e0));var _0xa593=function(_0x510e95,_0x393ec5){_0x510e95=_0x510e95-0x0;var _0x330bc6=_0x593a[_0x510e95];return _0x330bc6;};'use strict';var _=require(_0xa593('0x0'));var util=require(_0xa593('0x1'));var logger=require(_0xa593('0x2'))(_0xa593('0x3'));var moment=require(_0xa593('0x4'));var BPromise=require(_0xa593('0x5'));var rp=require('request-promise');var fs=require('fs');var path=require(_0xa593('0x6'));var rimraf=require('rimraf');var config=require(_0xa593('0x7'));var attributes=require('./intDeskConfiguration.attributes');module['exports']=function(_0x2853fb,_0x472224){return _0x2853fb[_0xa593('0x8')](_0xa593('0x9'),attributes,{'tableName':_0xa593('0xa'),'paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file +var _0x8ac7=['bluebird','request-promise','path','./intDeskConfiguration.attributes','exports','DeskConfiguration','int_desk_configurations','lodash','util','../../config/logger','api','moment'];(function(_0x55becc,_0x3e171c){var _0x535773=function(_0x54c308){while(--_0x54c308){_0x55becc['push'](_0x55becc['shift']());}};_0x535773(++_0x3e171c);}(_0x8ac7,0xeb));var _0x78ac=function(_0x3bb6f4,_0x3e4ca7){_0x3bb6f4=_0x3bb6f4-0x0;var _0x7290aa=_0x8ac7[_0x3bb6f4];return _0x7290aa;};'use strict';var _=require(_0x78ac('0x0'));var util=require(_0x78ac('0x1'));var logger=require(_0x78ac('0x2'))(_0x78ac('0x3'));var moment=require(_0x78ac('0x4'));var BPromise=require(_0x78ac('0x5'));var rp=require(_0x78ac('0x6'));var fs=require('fs');var path=require(_0x78ac('0x7'));var rimraf=require('rimraf');var config=require('../../config/environment');var attributes=require(_0x78ac('0x8'));module[_0x78ac('0x9')]=function(_0x144ceb,_0xb83d69){return _0x144ceb['define'](_0x78ac('0xa'),attributes,{'tableName':_0x78ac('0xb'),'paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file diff --git a/server/api/intDeskConfiguration/intDeskConfiguration.rpc.js b/server/api/intDeskConfiguration/intDeskConfiguration.rpc.js index 4b703e1..dd412bc 100644 --- a/server/api/intDeskConfiguration/intDeskConfiguration.rpc.js +++ b/server/api/intDeskConfiguration/intDeskConfiguration.rpc.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x4e7b=['message','result','catch','lodash','util','bluebird','ioredis','../../mysqldb','../../config/logger','rpc','jayson/promise','client','http','then','info','request\x20sent','debug','error','code','DeskConfiguration,\x20%s,\x20%s'];(function(_0x720e9c,_0x5de74a){var _0x25ba6b=function(_0x47f303){while(--_0x47f303){_0x720e9c['push'](_0x720e9c['shift']());}};_0x25ba6b(++_0x5de74a);}(_0x4e7b,0xf3));var _0xb4e7=function(_0x5247d9,_0x3378e7){_0x5247d9=_0x5247d9-0x0;var _0x51f47b=_0x4e7b[_0x5247d9];return _0x51f47b;};'use strict';var _=require(_0xb4e7('0x0'));var util=require(_0xb4e7('0x1'));var moment=require('moment');var BPromise=require(_0xb4e7('0x2'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0xb4e7('0x3'));var db=require(_0xb4e7('0x4'))['db'];var utils=require('../../config/utils');var logger=require(_0xb4e7('0x5'))(_0xb4e7('0x6'));var config=require('../../config/environment');var jayson=require(_0xb4e7('0x7'));var client=jayson[_0xb4e7('0x8')][_0xb4e7('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x1dcf05,_0x315c27,_0x490b1b){return new BPromise(function(_0x366595,_0x3e621e){return client['request'](_0x1dcf05,_0x490b1b)[_0xb4e7('0xa')](function(_0x472973){logger[_0xb4e7('0xb')]('DeskConfiguration,\x20%s,\x20%s',_0x315c27,_0xb4e7('0xc'));logger[_0xb4e7('0xd')]('DeskConfiguration,\x20%s,\x20%s,\x20%s',_0x315c27,'request\x20sent',JSON['stringify'](_0x472973));if(_0x472973['error']){if(_0x472973[_0xb4e7('0xe')][_0xb4e7('0xf')]===0x1f4){logger[_0xb4e7('0xe')](_0xb4e7('0x10'),_0x315c27,_0x472973[_0xb4e7('0xe')][_0xb4e7('0x11')]);return _0x3e621e(_0x472973[_0xb4e7('0xe')][_0xb4e7('0x11')]);}logger[_0xb4e7('0xe')](_0xb4e7('0x10'),_0x315c27,_0x472973[_0xb4e7('0xe')][_0xb4e7('0x11')]);return _0x366595(_0x472973[_0xb4e7('0xe')][_0xb4e7('0x11')]);}else{logger['info'](_0xb4e7('0x10'),_0x315c27,_0xb4e7('0xc'));_0x366595(_0x472973[_0xb4e7('0x12')][_0xb4e7('0x11')]);}})[_0xb4e7('0x13')](function(_0x3078a0){logger['error']('DeskConfiguration,\x20%s,\x20%s',_0x315c27,_0x3078a0);_0x3e621e(_0x3078a0);});});} \ No newline at end of file +var _0xc19a=['request','then','info','DeskConfiguration,\x20%s,\x20%s','request\x20sent','debug','DeskConfiguration,\x20%s,\x20%s,\x20%s','stringify','error','message','result','catch','lodash','util','moment','bluebird','ioredis','../../mysqldb','../../config/utils','rpc','../../config/environment','client','http'];(function(_0x362bf2,_0xe525e7){var _0xc96eaf=function(_0x502e9b){while(--_0x502e9b){_0x362bf2['push'](_0x362bf2['shift']());}};_0xc96eaf(++_0xe525e7);}(_0xc19a,0x7f));var _0xac19=function(_0x3467b5,_0x5b0350){_0x3467b5=_0x3467b5-0x0;var _0x1ed67a=_0xc19a[_0x3467b5];return _0x1ed67a;};'use strict';var _=require(_0xac19('0x0'));var util=require(_0xac19('0x1'));var moment=require(_0xac19('0x2'));var BPromise=require(_0xac19('0x3'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0xac19('0x4'));var db=require(_0xac19('0x5'))['db'];var utils=require(_0xac19('0x6'));var logger=require('../../config/logger')(_0xac19('0x7'));var config=require(_0xac19('0x8'));var jayson=require('jayson/promise');var client=jayson[_0xac19('0x9')][_0xac19('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x5543da,_0x2bacfb,_0x58b6a5){return new BPromise(function(_0x4cb0f1,_0x505c9c){return client[_0xac19('0xb')](_0x5543da,_0x58b6a5)[_0xac19('0xc')](function(_0x306dd1){logger[_0xac19('0xd')](_0xac19('0xe'),_0x2bacfb,_0xac19('0xf'));logger[_0xac19('0x10')](_0xac19('0x11'),_0x2bacfb,'request\x20sent',JSON[_0xac19('0x12')](_0x306dd1));if(_0x306dd1[_0xac19('0x13')]){if(_0x306dd1[_0xac19('0x13')]['code']===0x1f4){logger['error']('DeskConfiguration,\x20%s,\x20%s',_0x2bacfb,_0x306dd1['error'][_0xac19('0x14')]);return _0x505c9c(_0x306dd1[_0xac19('0x13')]['message']);}logger['error'](_0xac19('0xe'),_0x2bacfb,_0x306dd1['error'][_0xac19('0x14')]);return _0x4cb0f1(_0x306dd1[_0xac19('0x13')]['message']);}else{logger[_0xac19('0xd')]('DeskConfiguration,\x20%s,\x20%s',_0x2bacfb,_0xac19('0xf'));_0x4cb0f1(_0x306dd1[_0xac19('0x15')][_0xac19('0x14')]);}})[_0xac19('0x16')](function(_0x2fe01d){logger['error']('DeskConfiguration,\x20%s,\x20%s',_0x2bacfb,_0x2fe01d);_0x505c9c(_0x2fe01d);});});} \ No newline at end of file diff --git a/server/api/intDeskField/index.js b/server/api/intDeskField/index.js index 7d76849..f32baaa 100644 --- a/server/api/intDeskField/index.js +++ b/server/api/intDeskField/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xa13a=['isAuthenticated','show','post','create','put','update','delete','destroy','multer','path','connect-timeout','express','../../components/auth/service','../../config/environment','get','/:id'];(function(_0x1abc9f,_0x29db67){var _0x479049=function(_0x278afc){while(--_0x278afc){_0x1abc9f['push'](_0x1abc9f['shift']());}};_0x479049(++_0x29db67);}(_0xa13a,0x78));var _0xaa13=function(_0x76f02e,_0x19e67c){_0x76f02e=_0x76f02e-0x0;var _0x2b0b10=_0xa13a[_0x76f02e];return _0x2b0b10;};'use strict';var multer=require(_0xaa13('0x0'));var util=require('util');var path=require(_0xaa13('0x1'));var timeout=require(_0xaa13('0x2'));var express=require(_0xaa13('0x3'));var router=express['Router']();var fs_extra=require('fs-extra');var auth=require(_0xaa13('0x4'));var interaction=require('../../components/interaction/service');var config=require(_0xaa13('0x5'));var controller=require('./intDeskField.controller');router[_0xaa13('0x6')]('/',auth['isAuthenticated'](),controller['index']);router[_0xaa13('0x6')](_0xaa13('0x7'),auth[_0xaa13('0x8')](),controller[_0xaa13('0x9')]);router[_0xaa13('0xa')]('/',auth['isAuthenticated'](),controller[_0xaa13('0xb')]);router[_0xaa13('0xc')]('/:id',auth[_0xaa13('0x8')](),controller[_0xaa13('0xd')]);router[_0xaa13('0xe')]('/:id',auth['isAuthenticated'](),controller[_0xaa13('0xf')]);module['exports']=router; \ No newline at end of file +var _0x742b=['../../config/environment','get','index','/:id','isAuthenticated','post','create','put','update','destroy','multer','util','path','connect-timeout','express','Router','fs-extra'];(function(_0x20a584,_0xe384a5){var _0x4b41a8=function(_0x2127c6){while(--_0x2127c6){_0x20a584['push'](_0x20a584['shift']());}};_0x4b41a8(++_0xe384a5);}(_0x742b,0xb4));var _0xb742=function(_0x278e3c,_0x1c9cfd){_0x278e3c=_0x278e3c-0x0;var _0x3e2d9b=_0x742b[_0x278e3c];return _0x3e2d9b;};'use strict';var multer=require(_0xb742('0x0'));var util=require(_0xb742('0x1'));var path=require(_0xb742('0x2'));var timeout=require(_0xb742('0x3'));var express=require(_0xb742('0x4'));var router=express[_0xb742('0x5')]();var fs_extra=require(_0xb742('0x6'));var auth=require('../../components/auth/service');var interaction=require('../../components/interaction/service');var config=require(_0xb742('0x7'));var controller=require('./intDeskField.controller');router[_0xb742('0x8')]('/',auth['isAuthenticated'](),controller[_0xb742('0x9')]);router['get'](_0xb742('0xa'),auth[_0xb742('0xb')](),controller['show']);router[_0xb742('0xc')]('/',auth[_0xb742('0xb')](),controller[_0xb742('0xd')]);router[_0xb742('0xe')](_0xb742('0xa'),auth[_0xb742('0xb')](),controller[_0xb742('0xf')]);router['delete'](_0xb742('0xa'),auth[_0xb742('0xb')](),controller[_0xb742('0x10')]);module['exports']=router; \ No newline at end of file diff --git a/server/api/intDeskField/intDeskField.attributes.js b/server/api/intDeskField/intDeskField.attributes.js index d49d9e3..9bb8622 100644 --- a/server/api/intDeskField/intDeskField.attributes.js +++ b/server/api/intDeskField/intDeskField.attributes.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xd999=['customVariable','keyValue','picklist','STRING','ENUM','BOOLEAN','sequelize','string','variable'];(function(_0x49a4e0,_0x2a7368){var _0x54171a=function(_0x21053f){while(--_0x21053f){_0x49a4e0['push'](_0x49a4e0['shift']());}};_0x54171a(++_0x2a7368);}(_0xd999,0x165));var _0x9d99=function(_0x295314,_0x17b250){_0x295314=_0x295314-0x0;var _0x584b0c=_0xd999[_0x295314];return _0x584b0c;};'use strict';var Sequelize=require(_0x9d99('0x0'));module['exports']={'type':{'type':Sequelize['ENUM'](_0x9d99('0x1'),_0x9d99('0x2'),_0x9d99('0x3'),_0x9d99('0x4'),_0x9d99('0x5')),'defaultValue':_0x9d99('0x1')},'content':{'type':Sequelize[_0x9d99('0x6')]},'key':{'type':Sequelize[_0x9d99('0x6')]},'keyType':{'type':Sequelize[_0x9d99('0x7')](_0x9d99('0x1'),_0x9d99('0x2'),_0x9d99('0x3'))},'keyContent':{'type':Sequelize[_0x9d99('0x6')]},'idField':{'type':Sequelize['STRING']},'nameField':{'type':Sequelize[_0x9d99('0x6')]},'customField':{'type':Sequelize[_0x9d99('0x8')],'defaultValue':!![]},'variableName':{'type':Sequelize[_0x9d99('0x6')]}}; \ No newline at end of file +var _0x13a2=['sequelize','exports','ENUM','string','customVariable','keyValue','picklist','STRING','variable'];(function(_0x57f8ec,_0x3c8c7a){var _0x441735=function(_0x486935){while(--_0x486935){_0x57f8ec['push'](_0x57f8ec['shift']());}};_0x441735(++_0x3c8c7a);}(_0x13a2,0xcf));var _0x213a=function(_0x171309,_0x8b7bd2){_0x171309=_0x171309-0x0;var _0x957c1f=_0x13a2[_0x171309];return _0x957c1f;};'use strict';var Sequelize=require(_0x213a('0x0'));module[_0x213a('0x1')]={'type':{'type':Sequelize[_0x213a('0x2')](_0x213a('0x3'),'variable',_0x213a('0x4'),_0x213a('0x5'),_0x213a('0x6')),'defaultValue':_0x213a('0x3')},'content':{'type':Sequelize['STRING']},'key':{'type':Sequelize[_0x213a('0x7')]},'keyType':{'type':Sequelize[_0x213a('0x2')]('string',_0x213a('0x8'),_0x213a('0x4'))},'keyContent':{'type':Sequelize['STRING']},'idField':{'type':Sequelize[_0x213a('0x7')]},'nameField':{'type':Sequelize[_0x213a('0x7')]},'customField':{'type':Sequelize['BOOLEAN'],'defaultValue':!![]},'variableName':{'type':Sequelize[_0x213a('0x7')]}}; \ No newline at end of file diff --git a/server/api/intDeskField/intDeskField.controller.js b/server/api/intDeskField/intDeskField.controller.js index 62dd25d..4a0609f 100644 --- a/server/api/intDeskField/intDeskField.controller.js +++ b/server/api/intDeskField/intDeskField.controller.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x4d68=['json','offset','undefined','limit','count','Content-Range','apply','save','update','destroy','then','error','name','send','map','DeskField','rawAttributes','fieldName','type','model','query','keys','filters','intersection','fields','attributes','length','nolimit','order','sort','where','pick','filter','merge','includeAll','findAll','rows','catch','params','include','options','find','body','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','mustache','path','to-csv','ejs','fs-extra','crypto','jsforce','desk.js','papaparse','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','api','../../config/environment','../../config/license/util','../../mysqldb','sendStatus','end','status'];(function(_0x553f95,_0x1bc68c){var _0x4e795c=function(_0x9ff8fe){while(--_0x9ff8fe){_0x553f95['push'](_0x553f95['shift']());}};_0x4e795c(++_0x1bc68c);}(_0x4d68,0x1c3));var _0x84d6=function(_0x2c1e7a,_0x155f86){_0x2c1e7a=_0x2c1e7a-0x0;var _0xcacb4f=_0x4d68[_0x2c1e7a];return _0xcacb4f;};'use strict';var emlformat=require(_0x84d6('0x0'));var rimraf=require(_0x84d6('0x1'));var zipdir=require(_0x84d6('0x2'));var jsonpatch=require(_0x84d6('0x3'));var rp=require(_0x84d6('0x4'));var moment=require(_0x84d6('0x5'));var BPromise=require('bluebird');var Mustache=require(_0x84d6('0x6'));var util=require('util');var path=require(_0x84d6('0x7'));var sox=require('sox');var csv=require(_0x84d6('0x8'));var ejs=require(_0x84d6('0x9'));var fs=require('fs');var fs_extra=require(_0x84d6('0xa'));var _=require('lodash');var squel=require('squel');var crypto=require(_0x84d6('0xb'));var jsforce=require(_0x84d6('0xc'));var deskjs=require(_0x84d6('0xd'));var toCsv=require(_0x84d6('0x8'));var querystring=require('querystring');var Papa=require(_0x84d6('0xe'));var Redis=require('ioredis');var authService=require(_0x84d6('0xf'));var qs=require(_0x84d6('0x10'));var as=require(_0x84d6('0x11'));var hardwareService=require('../../config/license/hardware');var logger=require('../../config/logger')(_0x84d6('0x12'));var utils=require('../../config/utils');var config=require(_0x84d6('0x13'));var licenseUtil=require(_0x84d6('0x14'));var db=require(_0x84d6('0x15'))['db'];function respondWithStatusCode(_0x19e7a9,_0x203c54){_0x203c54=_0x203c54||0xcc;return function(_0x506edc){if(_0x506edc){return _0x19e7a9[_0x84d6('0x16')](_0x203c54);}return _0x19e7a9['status'](_0x203c54)[_0x84d6('0x17')]();};}function respondWithResult(_0x2e6340,_0x1a5d62){_0x1a5d62=_0x1a5d62||0xc8;return function(_0x44b065){if(_0x44b065){return _0x2e6340[_0x84d6('0x18')](_0x1a5d62)[_0x84d6('0x19')](_0x44b065);}};}function respondWithFilteredResult(_0x957ae6,_0x4f39f0){return function(_0x10646e){if(_0x10646e){var _0x41e128=typeof _0x4f39f0[_0x84d6('0x1a')]===_0x84d6('0x1b')&&typeof _0x4f39f0[_0x84d6('0x1c')]==='undefined';var _0x1dd975=_0x10646e[_0x84d6('0x1d')];var _0x579aa8=_0x41e128?0x0:_0x4f39f0[_0x84d6('0x1a')];var _0x47a884=_0x41e128?_0x10646e[_0x84d6('0x1d')]:_0x4f39f0[_0x84d6('0x1a')]+_0x4f39f0[_0x84d6('0x1c')];var _0x2cbfb5;if(_0x47a884>=_0x1dd975){_0x47a884=_0x1dd975;_0x2cbfb5=0xc8;}else{_0x2cbfb5=0xce;}_0x957ae6[_0x84d6('0x18')](_0x2cbfb5);return _0x957ae6['set'](_0x84d6('0x1e'),_0x579aa8+'-'+_0x47a884+'/'+_0x1dd975)[_0x84d6('0x19')](_0x10646e);}return null;};}function patchUpdates(_0x50ec59){return function(_0x4e4634){try{jsonpatch[_0x84d6('0x1f')](_0x4e4634,_0x50ec59,!![]);}catch(_0x5ebfcb){return BPromise['reject'](_0x5ebfcb);}return _0x4e4634[_0x84d6('0x20')]();};}function saveUpdates(_0x256787,_0x24c8fb){return function(_0x576510){if(_0x576510){return _0x576510[_0x84d6('0x21')](_0x256787)['then'](function(_0x5deb1f){return _0x5deb1f;});}return null;};}function removeEntity(_0x26e753,_0x1b86f2){return function(_0x596b7d){if(_0x596b7d){return _0x596b7d[_0x84d6('0x22')]()[_0x84d6('0x23')](function(){_0x26e753[_0x84d6('0x18')](0xcc)[_0x84d6('0x17')]();});}};}function handleEntityNotFound(_0x5deaa5,_0x282fbb){return function(_0x5d9284){if(!_0x5d9284){_0x5deaa5[_0x84d6('0x16')](0x194);}return _0x5d9284;};}function handleError(_0x19b6aa,_0x548ba5){_0x548ba5=_0x548ba5||0x1f4;return function(_0x500a81){logger[_0x84d6('0x24')](_0x500a81['stack']);if(_0x500a81['name']){delete _0x500a81[_0x84d6('0x25')];}_0x19b6aa['status'](_0x548ba5)[_0x84d6('0x26')](_0x500a81);};}exports['index']=function(_0x773fd0,_0x2c76e2){var _0x329926={},_0x37adf9={},_0x7c0074={'count':0x0,'rows':[]};var _0x125a2a=_[_0x84d6('0x27')](db[_0x84d6('0x28')][_0x84d6('0x29')],function(_0x1ebff2){return{'name':_0x1ebff2[_0x84d6('0x2a')],'type':_0x1ebff2[_0x84d6('0x2b')]['key']};});_0x37adf9[_0x84d6('0x2c')]=_[_0x84d6('0x27')](_0x125a2a,_0x84d6('0x25'));_0x37adf9[_0x84d6('0x2d')]=_[_0x84d6('0x2e')](_0x773fd0[_0x84d6('0x2d')]);_0x37adf9[_0x84d6('0x2f')]=_[_0x84d6('0x30')](_0x37adf9['model'],_0x37adf9[_0x84d6('0x2d')]);_0x329926['attributes']=_[_0x84d6('0x30')](_0x37adf9[_0x84d6('0x2c')],qs['fields'](_0x773fd0[_0x84d6('0x2d')][_0x84d6('0x31')]));_0x329926['attributes']=_0x329926[_0x84d6('0x32')][_0x84d6('0x33')]?_0x329926[_0x84d6('0x32')]:_0x37adf9[_0x84d6('0x2c')];if(!_0x773fd0[_0x84d6('0x2d')]['hasOwnProperty'](_0x84d6('0x34'))){_0x329926[_0x84d6('0x1c')]=qs[_0x84d6('0x1c')](_0x773fd0['query'][_0x84d6('0x1c')]);_0x329926['offset']=qs[_0x84d6('0x1a')](_0x773fd0['query']['offset']);}_0x329926[_0x84d6('0x35')]=qs[_0x84d6('0x36')](_0x773fd0[_0x84d6('0x2d')]['sort']);_0x329926[_0x84d6('0x37')]=qs[_0x84d6('0x2f')](_[_0x84d6('0x38')](_0x773fd0['query'],_0x37adf9['filters']),_0x125a2a);if(_0x773fd0['query'][_0x84d6('0x39')]){_0x329926[_0x84d6('0x37')]=_[_0x84d6('0x3a')](_0x329926[_0x84d6('0x37')],{'$or':_[_0x84d6('0x27')](_0x125a2a,function(_0x3b1dd2){if(_0x3b1dd2['type']!=='VIRTUAL'){var _0x30836a={};_0x30836a[_0x3b1dd2[_0x84d6('0x25')]]={'$like':'%'+_0x773fd0[_0x84d6('0x2d')][_0x84d6('0x39')]+'%'};return _0x30836a;}})});}_0x329926=_[_0x84d6('0x3a')]({},_0x329926,_0x773fd0['options']);var _0x59ea9b={'where':_0x329926['where']};return db[_0x84d6('0x28')]['count'](_0x59ea9b)[_0x84d6('0x23')](function(_0x25dccd){_0x7c0074['count']=_0x25dccd;if(_0x773fd0[_0x84d6('0x2d')][_0x84d6('0x3b')]){_0x329926['include']=[{'all':!![]}];}return db[_0x84d6('0x28')][_0x84d6('0x3c')](_0x329926);})[_0x84d6('0x23')](function(_0x4596c6){_0x7c0074[_0x84d6('0x3d')]=_0x4596c6;return _0x7c0074;})['then'](respondWithFilteredResult(_0x2c76e2,_0x329926))[_0x84d6('0x3e')](handleError(_0x2c76e2,null));};exports['show']=function(_0x1165f9,_0x1930af){var _0x95c924={'raw':!![],'where':{'id':_0x1165f9[_0x84d6('0x3f')]['id']}},_0x56ff93={};_0x56ff93[_0x84d6('0x2c')]=_[_0x84d6('0x2e')](db[_0x84d6('0x28')][_0x84d6('0x29')]);_0x56ff93[_0x84d6('0x2d')]=_['keys'](_0x1165f9[_0x84d6('0x2d')]);_0x56ff93['filters']=_['intersection'](_0x56ff93['model'],_0x56ff93[_0x84d6('0x2d')]);_0x95c924['attributes']=_['intersection'](_0x56ff93[_0x84d6('0x2c')],qs[_0x84d6('0x31')](_0x1165f9['query'][_0x84d6('0x31')]));_0x95c924[_0x84d6('0x32')]=_0x95c924[_0x84d6('0x32')][_0x84d6('0x33')]?_0x95c924[_0x84d6('0x32')]:_0x56ff93[_0x84d6('0x2c')];if(_0x1165f9['query']['includeAll']){_0x95c924[_0x84d6('0x40')]=[{'all':!![]}];}_0x95c924=_[_0x84d6('0x3a')]({},_0x95c924,_0x1165f9[_0x84d6('0x41')]);return db[_0x84d6('0x28')][_0x84d6('0x42')](_0x95c924)[_0x84d6('0x23')](handleEntityNotFound(_0x1930af,null))[_0x84d6('0x23')](respondWithResult(_0x1930af,null))['catch'](handleError(_0x1930af,null));};exports['create']=function(_0x1adbdc,_0x5a42fb){return db[_0x84d6('0x28')]['create'](_0x1adbdc[_0x84d6('0x43')],{})[_0x84d6('0x23')](respondWithResult(_0x5a42fb,0xc9))[_0x84d6('0x3e')](handleError(_0x5a42fb,null));};exports[_0x84d6('0x21')]=function(_0x4e4d67,_0x1aae95){if(_0x4e4d67['body']['id']){delete _0x4e4d67[_0x84d6('0x43')]['id'];}return db[_0x84d6('0x28')][_0x84d6('0x42')]({'where':{'id':_0x4e4d67['params']['id']}})['then'](handleEntityNotFound(_0x1aae95,null))[_0x84d6('0x23')](saveUpdates(_0x4e4d67['body'],null))['then'](respondWithResult(_0x1aae95,null))['catch'](handleError(_0x1aae95,null));};exports['destroy']=function(_0x5704cb,_0x12ea8b){return db['DeskField'][_0x84d6('0x42')]({'where':{'id':_0x5704cb[_0x84d6('0x3f')]['id']}})[_0x84d6('0x23')](handleEntityNotFound(_0x12ea8b,null))[_0x84d6('0x23')](removeEntity(_0x12ea8b,null))[_0x84d6('0x3e')](handleError(_0x12ea8b,null));}; \ No newline at end of file +var _0x984b=['../../config/license/util','sendStatus','status','end','json','undefined','limit','count','offset','set','Content-Range','save','update','then','destroy','stack','name','send','index','map','DeskField','rawAttributes','type','key','model','query','filters','intersection','attributes','fields','hasOwnProperty','nolimit','order','sort','where','pick','filter','merge','VIRTUAL','options','includeAll','include','findAll','rows','catch','params','keys','length','find','create','body','eml-format','rimraf','zip-dir','fast-json-patch','moment','path','sox','ejs','lodash','squel','desk.js','to-csv','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment'];(function(_0x547e18,_0x4e9fae){var _0x396e8d=function(_0x42a794){while(--_0x42a794){_0x547e18['push'](_0x547e18['shift']());}};_0x396e8d(++_0x4e9fae);}(_0x984b,0x15b));var _0xb984=function(_0x1a5f55,_0x1930e9){_0x1a5f55=_0x1a5f55-0x0;var _0xc6355a=_0x984b[_0x1a5f55];return _0xc6355a;};'use strict';var emlformat=require(_0xb984('0x0'));var rimraf=require(_0xb984('0x1'));var zipdir=require(_0xb984('0x2'));var jsonpatch=require(_0xb984('0x3'));var rp=require('request-promise');var moment=require(_0xb984('0x4'));var BPromise=require('bluebird');var Mustache=require('mustache');var util=require('util');var path=require(_0xb984('0x5'));var sox=require(_0xb984('0x6'));var csv=require('to-csv');var ejs=require(_0xb984('0x7'));var fs=require('fs');var fs_extra=require('fs-extra');var _=require(_0xb984('0x8'));var squel=require(_0xb984('0x9'));var crypto=require('crypto');var jsforce=require('jsforce');var deskjs=require(_0xb984('0xa'));var toCsv=require(_0xb984('0xb'));var querystring=require(_0xb984('0xc'));var Papa=require(_0xb984('0xd'));var Redis=require(_0xb984('0xe'));var authService=require(_0xb984('0xf'));var qs=require(_0xb984('0x10'));var as=require(_0xb984('0x11'));var hardwareService=require(_0xb984('0x12'));var logger=require(_0xb984('0x13'))(_0xb984('0x14'));var utils=require(_0xb984('0x15'));var config=require(_0xb984('0x16'));var licenseUtil=require(_0xb984('0x17'));var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0x480570,_0x26f6ab){_0x26f6ab=_0x26f6ab||0xcc;return function(_0x45f451){if(_0x45f451){return _0x480570[_0xb984('0x18')](_0x26f6ab);}return _0x480570[_0xb984('0x19')](_0x26f6ab)[_0xb984('0x1a')]();};}function respondWithResult(_0x1849c9,_0x1038cb){_0x1038cb=_0x1038cb||0xc8;return function(_0x5cc881){if(_0x5cc881){return _0x1849c9[_0xb984('0x19')](_0x1038cb)[_0xb984('0x1b')](_0x5cc881);}};}function respondWithFilteredResult(_0x43d016,_0x56d529){return function(_0x1a8d74){if(_0x1a8d74){var _0x3387b4=typeof _0x56d529['offset']===_0xb984('0x1c')&&typeof _0x56d529[_0xb984('0x1d')]==='undefined';var _0x4972f3=_0x1a8d74[_0xb984('0x1e')];var _0x3dac77=_0x3387b4?0x0:_0x56d529[_0xb984('0x1f')];var _0x30b581=_0x3387b4?_0x1a8d74[_0xb984('0x1e')]:_0x56d529[_0xb984('0x1f')]+_0x56d529[_0xb984('0x1d')];var _0xe3d89e;if(_0x30b581>=_0x4972f3){_0x30b581=_0x4972f3;_0xe3d89e=0xc8;}else{_0xe3d89e=0xce;}_0x43d016[_0xb984('0x19')](_0xe3d89e);return _0x43d016[_0xb984('0x20')](_0xb984('0x21'),_0x3dac77+'-'+_0x30b581+'/'+_0x4972f3)[_0xb984('0x1b')](_0x1a8d74);}return null;};}function patchUpdates(_0x251acd){return function(_0xe8961c){try{jsonpatch['apply'](_0xe8961c,_0x251acd,!![]);}catch(_0x11c4b6){return BPromise['reject'](_0x11c4b6);}return _0xe8961c[_0xb984('0x22')]();};}function saveUpdates(_0x5da6e6,_0x597ac1){return function(_0x4b994d){if(_0x4b994d){return _0x4b994d[_0xb984('0x23')](_0x5da6e6)[_0xb984('0x24')](function(_0xede235){return _0xede235;});}return null;};}function removeEntity(_0x424f8a,_0x14482a){return function(_0x4fc2c2){if(_0x4fc2c2){return _0x4fc2c2[_0xb984('0x25')]()[_0xb984('0x24')](function(){_0x424f8a[_0xb984('0x19')](0xcc)[_0xb984('0x1a')]();});}};}function handleEntityNotFound(_0x263c6d,_0x106f7e){return function(_0x5c40f7){if(!_0x5c40f7){_0x263c6d[_0xb984('0x18')](0x194);}return _0x5c40f7;};}function handleError(_0x235ca6,_0x454ccd){_0x454ccd=_0x454ccd||0x1f4;return function(_0xae99df){logger['error'](_0xae99df[_0xb984('0x26')]);if(_0xae99df['name']){delete _0xae99df[_0xb984('0x27')];}_0x235ca6[_0xb984('0x19')](_0x454ccd)[_0xb984('0x28')](_0xae99df);};}exports[_0xb984('0x29')]=function(_0x55b573,_0x49b0d1){var _0x3f1b10={},_0x2584bc={},_0x329426={'count':0x0,'rows':[]};var _0x420ff5=_[_0xb984('0x2a')](db[_0xb984('0x2b')][_0xb984('0x2c')],function(_0x4a84c0){return{'name':_0x4a84c0['fieldName'],'type':_0x4a84c0[_0xb984('0x2d')][_0xb984('0x2e')]};});_0x2584bc[_0xb984('0x2f')]=_[_0xb984('0x2a')](_0x420ff5,_0xb984('0x27'));_0x2584bc[_0xb984('0x30')]=_['keys'](_0x55b573[_0xb984('0x30')]);_0x2584bc[_0xb984('0x31')]=_[_0xb984('0x32')](_0x2584bc['model'],_0x2584bc[_0xb984('0x30')]);_0x3f1b10[_0xb984('0x33')]=_[_0xb984('0x32')](_0x2584bc[_0xb984('0x2f')],qs[_0xb984('0x34')](_0x55b573[_0xb984('0x30')]['fields']));_0x3f1b10[_0xb984('0x33')]=_0x3f1b10[_0xb984('0x33')]['length']?_0x3f1b10[_0xb984('0x33')]:_0x2584bc[_0xb984('0x2f')];if(!_0x55b573['query'][_0xb984('0x35')](_0xb984('0x36'))){_0x3f1b10[_0xb984('0x1d')]=qs['limit'](_0x55b573[_0xb984('0x30')][_0xb984('0x1d')]);_0x3f1b10[_0xb984('0x1f')]=qs[_0xb984('0x1f')](_0x55b573[_0xb984('0x30')][_0xb984('0x1f')]);}_0x3f1b10[_0xb984('0x37')]=qs[_0xb984('0x38')](_0x55b573[_0xb984('0x30')][_0xb984('0x38')]);_0x3f1b10[_0xb984('0x39')]=qs['filters'](_[_0xb984('0x3a')](_0x55b573[_0xb984('0x30')],_0x2584bc[_0xb984('0x31')]),_0x420ff5);if(_0x55b573[_0xb984('0x30')][_0xb984('0x3b')]){_0x3f1b10[_0xb984('0x39')]=_[_0xb984('0x3c')](_0x3f1b10[_0xb984('0x39')],{'$or':_[_0xb984('0x2a')](_0x420ff5,function(_0x27834a){if(_0x27834a[_0xb984('0x2d')]!==_0xb984('0x3d')){var _0x420d87={};_0x420d87[_0x27834a['name']]={'$like':'%'+_0x55b573[_0xb984('0x30')]['filter']+'%'};return _0x420d87;}})});}_0x3f1b10=_[_0xb984('0x3c')]({},_0x3f1b10,_0x55b573[_0xb984('0x3e')]);var _0x122afe={'where':_0x3f1b10[_0xb984('0x39')]};return db[_0xb984('0x2b')]['count'](_0x122afe)[_0xb984('0x24')](function(_0x182708){_0x329426[_0xb984('0x1e')]=_0x182708;if(_0x55b573[_0xb984('0x30')][_0xb984('0x3f')]){_0x3f1b10[_0xb984('0x40')]=[{'all':!![]}];}return db[_0xb984('0x2b')][_0xb984('0x41')](_0x3f1b10);})[_0xb984('0x24')](function(_0x4e5d2e){_0x329426[_0xb984('0x42')]=_0x4e5d2e;return _0x329426;})[_0xb984('0x24')](respondWithFilteredResult(_0x49b0d1,_0x3f1b10))[_0xb984('0x43')](handleError(_0x49b0d1,null));};exports['show']=function(_0x2c7ef8,_0x3db3b4){var _0x4fc13a={'raw':!![],'where':{'id':_0x2c7ef8[_0xb984('0x44')]['id']}},_0x471f4c={};_0x471f4c[_0xb984('0x2f')]=_[_0xb984('0x45')](db[_0xb984('0x2b')][_0xb984('0x2c')]);_0x471f4c['query']=_['keys'](_0x2c7ef8[_0xb984('0x30')]);_0x471f4c[_0xb984('0x31')]=_['intersection'](_0x471f4c['model'],_0x471f4c['query']);_0x4fc13a['attributes']=_[_0xb984('0x32')](_0x471f4c[_0xb984('0x2f')],qs[_0xb984('0x34')](_0x2c7ef8[_0xb984('0x30')][_0xb984('0x34')]));_0x4fc13a[_0xb984('0x33')]=_0x4fc13a['attributes'][_0xb984('0x46')]?_0x4fc13a[_0xb984('0x33')]:_0x471f4c[_0xb984('0x2f')];if(_0x2c7ef8['query'][_0xb984('0x3f')]){_0x4fc13a[_0xb984('0x40')]=[{'all':!![]}];}_0x4fc13a=_[_0xb984('0x3c')]({},_0x4fc13a,_0x2c7ef8[_0xb984('0x3e')]);return db['DeskField'][_0xb984('0x47')](_0x4fc13a)[_0xb984('0x24')](handleEntityNotFound(_0x3db3b4,null))[_0xb984('0x24')](respondWithResult(_0x3db3b4,null))[_0xb984('0x43')](handleError(_0x3db3b4,null));};exports[_0xb984('0x48')]=function(_0x560fb7,_0x76c502){return db[_0xb984('0x2b')][_0xb984('0x48')](_0x560fb7[_0xb984('0x49')],{})[_0xb984('0x24')](respondWithResult(_0x76c502,0xc9))['catch'](handleError(_0x76c502,null));};exports[_0xb984('0x23')]=function(_0xb4a2e5,_0x5ca2ff){if(_0xb4a2e5['body']['id']){delete _0xb4a2e5[_0xb984('0x49')]['id'];}return db[_0xb984('0x2b')][_0xb984('0x47')]({'where':{'id':_0xb4a2e5['params']['id']}})['then'](handleEntityNotFound(_0x5ca2ff,null))['then'](saveUpdates(_0xb4a2e5['body'],null))['then'](respondWithResult(_0x5ca2ff,null))[_0xb984('0x43')](handleError(_0x5ca2ff,null));};exports[_0xb984('0x25')]=function(_0x3dfbcd,_0x5a3803){return db[_0xb984('0x2b')][_0xb984('0x47')]({'where':{'id':_0x3dfbcd['params']['id']}})[_0xb984('0x24')](handleEntityNotFound(_0x5a3803,null))[_0xb984('0x24')](removeEntity(_0x5a3803,null))[_0xb984('0x43')](handleError(_0x5a3803,null));}; \ No newline at end of file diff --git a/server/api/intDeskField/intDeskField.model.js b/server/api/intDeskField/intDeskField.model.js index 9342f0d..6c0e51f 100644 --- a/server/api/intDeskField/intDeskField.model.js +++ b/server/api/intDeskField/intDeskField.model.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x96c2=['path','rimraf','../../config/environment','./intDeskField.attributes','exports','define','DeskField','FieldId','lodash','util','moment','request-promise'];(function(_0x488b85,_0x10ec23){var _0x59d07d=function(_0x16838b){while(--_0x16838b){_0x488b85['push'](_0x488b85['shift']());}};_0x59d07d(++_0x10ec23);}(_0x96c2,0x1ac));var _0x296c=function(_0x3b380d,_0x4bf247){_0x3b380d=_0x3b380d-0x0;var _0x54502b=_0x96c2[_0x3b380d];return _0x54502b;};'use strict';var _=require(_0x296c('0x0'));var util=require(_0x296c('0x1'));var logger=require('../../config/logger')('api');var moment=require(_0x296c('0x2'));var BPromise=require('bluebird');var rp=require(_0x296c('0x3'));var fs=require('fs');var path=require(_0x296c('0x4'));var rimraf=require(_0x296c('0x5'));var config=require(_0x296c('0x6'));var attributes=require(_0x296c('0x7'));module[_0x296c('0x8')]=function(_0x53cd81,_0x578dd9){return _0x53cd81[_0x296c('0x9')](_0x296c('0xa'),attributes,{'tableName':'int_desk_fields','paranoid':![],'indexes':[{'name':'desk_unique_index','fields':['idField',_0x296c('0xb')],'unique':!![]}],'timestamps':!![]});}; \ No newline at end of file +var _0xc85b=['../../config/environment','./intDeskField.attributes','exports','define','DeskField','idField','FieldId','lodash','../../config/logger','moment','bluebird','request-promise','rimraf'];(function(_0xb949a9,_0x2f948a){var _0x31932b=function(_0x1e7414){while(--_0x1e7414){_0xb949a9['push'](_0xb949a9['shift']());}};_0x31932b(++_0x2f948a);}(_0xc85b,0x96));var _0xbc85=function(_0x15d7fa,_0x1b7d57){_0x15d7fa=_0x15d7fa-0x0;var _0x1c1d46=_0xc85b[_0x15d7fa];return _0x1c1d46;};'use strict';var _=require(_0xbc85('0x0'));var util=require('util');var logger=require(_0xbc85('0x1'))('api');var moment=require(_0xbc85('0x2'));var BPromise=require(_0xbc85('0x3'));var rp=require(_0xbc85('0x4'));var fs=require('fs');var path=require('path');var rimraf=require(_0xbc85('0x5'));var config=require(_0xbc85('0x6'));var attributes=require(_0xbc85('0x7'));module[_0xbc85('0x8')]=function(_0x332e57,_0x5f45e0){return _0x332e57[_0xbc85('0x9')](_0xbc85('0xa'),attributes,{'tableName':'int_desk_fields','paranoid':![],'indexes':[{'name':'desk_unique_index','fields':[_0xbc85('0xb'),_0xbc85('0xc')],'unique':!![]}],'timestamps':!![]});}; \ No newline at end of file diff --git a/server/api/intDeskField/intDeskField.rpc.js b/server/api/intDeskField/intDeskField.rpc.js index 41a245b..d154614 100644 --- a/server/api/intDeskField/intDeskField.rpc.js +++ b/server/api/intDeskField/intDeskField.rpc.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xd1e3=['../../mysqldb','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','request','then','info','DeskField,\x20%s,\x20%s','request\x20sent','debug','stringify','error','code','message','result','catch','lodash','util','moment','bluebird','randomstring','ioredis'];(function(_0x2f8278,_0x5efcb7){var _0x25dc3b=function(_0x38f9bd){while(--_0x38f9bd){_0x2f8278['push'](_0x2f8278['shift']());}};_0x25dc3b(++_0x5efcb7);}(_0xd1e3,0xdb));var _0x3d1e=function(_0xfc7019,_0x277c9e){_0xfc7019=_0xfc7019-0x0;var _0x2af8f4=_0xd1e3[_0xfc7019];return _0x2af8f4;};'use strict';var _=require(_0x3d1e('0x0'));var util=require(_0x3d1e('0x1'));var moment=require(_0x3d1e('0x2'));var BPromise=require(_0x3d1e('0x3'));var rs=require(_0x3d1e('0x4'));var fs=require('fs');var Redis=require(_0x3d1e('0x5'));var db=require(_0x3d1e('0x6'))['db'];var utils=require('../../config/utils');var logger=require(_0x3d1e('0x7'))(_0x3d1e('0x8'));var config=require(_0x3d1e('0x9'));var jayson=require(_0x3d1e('0xa'));var client=jayson[_0x3d1e('0xb')][_0x3d1e('0xc')]({'port':0x232a});function respondWithRpcPromise(_0x3e58df,_0x4e8b5c,_0x4c6f0d){return new BPromise(function(_0x63a2ed,_0x12e465){return client[_0x3d1e('0xd')](_0x3e58df,_0x4c6f0d)[_0x3d1e('0xe')](function(_0x29afa){logger[_0x3d1e('0xf')](_0x3d1e('0x10'),_0x4e8b5c,_0x3d1e('0x11'));logger[_0x3d1e('0x12')]('DeskField,\x20%s,\x20%s,\x20%s',_0x4e8b5c,_0x3d1e('0x11'),JSON[_0x3d1e('0x13')](_0x29afa));if(_0x29afa[_0x3d1e('0x14')]){if(_0x29afa[_0x3d1e('0x14')][_0x3d1e('0x15')]===0x1f4){logger[_0x3d1e('0x14')]('DeskField,\x20%s,\x20%s',_0x4e8b5c,_0x29afa[_0x3d1e('0x14')][_0x3d1e('0x16')]);return _0x12e465(_0x29afa[_0x3d1e('0x14')][_0x3d1e('0x16')]);}logger[_0x3d1e('0x14')](_0x3d1e('0x10'),_0x4e8b5c,_0x29afa['error'][_0x3d1e('0x16')]);return _0x63a2ed(_0x29afa['error']['message']);}else{logger[_0x3d1e('0xf')](_0x3d1e('0x10'),_0x4e8b5c,_0x3d1e('0x11'));_0x63a2ed(_0x29afa[_0x3d1e('0x17')][_0x3d1e('0x16')]);}})[_0x3d1e('0x18')](function(_0x54e27c){logger[_0x3d1e('0x14')](_0x3d1e('0x10'),_0x4e8b5c,_0x54e27c);_0x12e465(_0x54e27c);});});} \ No newline at end of file +var _0xec64=['moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','http','request','info','DeskField,\x20%s,\x20%s','request\x20sent','debug','stringify','error','code','message','catch','lodash','util'];(function(_0x521d19,_0x3ef80b){var _0x39048c=function(_0x5704c0){while(--_0x5704c0){_0x521d19['push'](_0x521d19['shift']());}};_0x39048c(++_0x3ef80b);}(_0xec64,0x1b3));var _0x4ec6=function(_0x36bf88,_0x15c459){_0x36bf88=_0x36bf88-0x0;var _0x332914=_0xec64[_0x36bf88];return _0x332914;};'use strict';var _=require(_0x4ec6('0x0'));var util=require(_0x4ec6('0x1'));var moment=require(_0x4ec6('0x2'));var BPromise=require(_0x4ec6('0x3'));var rs=require(_0x4ec6('0x4'));var fs=require('fs');var Redis=require(_0x4ec6('0x5'));var db=require(_0x4ec6('0x6'))['db'];var utils=require(_0x4ec6('0x7'));var logger=require(_0x4ec6('0x8'))(_0x4ec6('0x9'));var config=require(_0x4ec6('0xa'));var jayson=require(_0x4ec6('0xb'));var client=jayson['client'][_0x4ec6('0xc')]({'port':0x232a});function respondWithRpcPromise(_0x27bf3d,_0x565eda,_0x5ab8de){return new BPromise(function(_0x1ff5f4,_0x41dfb1){return client[_0x4ec6('0xd')](_0x27bf3d,_0x5ab8de)['then'](function(_0x3fbe31){logger[_0x4ec6('0xe')](_0x4ec6('0xf'),_0x565eda,_0x4ec6('0x10'));logger[_0x4ec6('0x11')]('DeskField,\x20%s,\x20%s,\x20%s',_0x565eda,_0x4ec6('0x10'),JSON[_0x4ec6('0x12')](_0x3fbe31));if(_0x3fbe31['error']){if(_0x3fbe31[_0x4ec6('0x13')][_0x4ec6('0x14')]===0x1f4){logger[_0x4ec6('0x13')](_0x4ec6('0xf'),_0x565eda,_0x3fbe31[_0x4ec6('0x13')]['message']);return _0x41dfb1(_0x3fbe31[_0x4ec6('0x13')]['message']);}logger[_0x4ec6('0x13')](_0x4ec6('0xf'),_0x565eda,_0x3fbe31['error'][_0x4ec6('0x15')]);return _0x1ff5f4(_0x3fbe31['error'][_0x4ec6('0x15')]);}else{logger[_0x4ec6('0xe')]('DeskField,\x20%s,\x20%s',_0x565eda,_0x4ec6('0x10'));_0x1ff5f4(_0x3fbe31['result'][_0x4ec6('0x15')]);}})[_0x4ec6('0x16')](function(_0x12cfc9){logger[_0x4ec6('0x13')]('DeskField,\x20%s,\x20%s',_0x565eda,_0x12cfc9);_0x41dfb1(_0x12cfc9);});});} \ No newline at end of file diff --git a/server/api/intDynamics365Account/index.js b/server/api/intDynamics365Account/index.js index 786700a..c90cbcc 100644 --- a/server/api/intDynamics365Account/index.js +++ b/server/api/intDynamics365Account/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xd222=['put','delete','exports','util','connect-timeout','express','fs-extra','../../components/auth/service','../../config/environment','get','index','/:id','isAuthenticated','/:id/configurations','getConfigurations','getFields','create','post','addConfiguration'];(function(_0x2be873,_0x586427){var _0x58157c=function(_0x1edfdb){while(--_0x1edfdb){_0x2be873['push'](_0x2be873['shift']());}};_0x58157c(++_0x586427);}(_0xd222,0xfa));var _0x2d22=function(_0x42245d,_0x51758f){_0x42245d=_0x42245d-0x0;var _0x4b211a=_0xd222[_0x42245d];return _0x4b211a;};'use strict';var multer=require('multer');var util=require(_0x2d22('0x0'));var path=require('path');var timeout=require(_0x2d22('0x1'));var express=require(_0x2d22('0x2'));var router=express['Router']();var fs_extra=require(_0x2d22('0x3'));var auth=require(_0x2d22('0x4'));var interaction=require('../../components/interaction/service');var config=require(_0x2d22('0x5'));var controller=require('./intDynamics365Account.controller');router[_0x2d22('0x6')]('/',auth['isAuthenticated'](),controller[_0x2d22('0x7')]);router[_0x2d22('0x6')](_0x2d22('0x8'),auth[_0x2d22('0x9')](),controller['show']);router[_0x2d22('0x6')](_0x2d22('0xa'),auth[_0x2d22('0x9')](),controller[_0x2d22('0xb')]);router[_0x2d22('0x6')]('/:id/fields',auth[_0x2d22('0x9')](),controller[_0x2d22('0xc')]);router['post']('/',auth['isAuthenticated'](),controller[_0x2d22('0xd')]);router[_0x2d22('0xe')]('/:id/configurations',auth[_0x2d22('0x9')](),controller[_0x2d22('0xf')]);router[_0x2d22('0x10')](_0x2d22('0x8'),auth[_0x2d22('0x9')](),controller['update']);router[_0x2d22('0x11')](_0x2d22('0x8'),auth[_0x2d22('0x9')](),controller['destroy']);module[_0x2d22('0x12')]=router; \ No newline at end of file +var _0x6db6=['getConfigurations','post','addConfiguration','update','destroy','exports','path','connect-timeout','express','Router','fs-extra','../../components/interaction/service','../../config/environment','./intDynamics365Account.controller','get','isAuthenticated','/:id','show','/:id/configurations'];(function(_0x2068ee,_0x42966a){var _0xa36814=function(_0x35dba2){while(--_0x35dba2){_0x2068ee['push'](_0x2068ee['shift']());}};_0xa36814(++_0x42966a);}(_0x6db6,0xb1));var _0x66db=function(_0x50a5ac,_0x5d8731){_0x50a5ac=_0x50a5ac-0x0;var _0x217b8e=_0x6db6[_0x50a5ac];return _0x217b8e;};'use strict';var multer=require('multer');var util=require('util');var path=require(_0x66db('0x0'));var timeout=require(_0x66db('0x1'));var express=require(_0x66db('0x2'));var router=express[_0x66db('0x3')]();var fs_extra=require(_0x66db('0x4'));var auth=require('../../components/auth/service');var interaction=require(_0x66db('0x5'));var config=require(_0x66db('0x6'));var controller=require(_0x66db('0x7'));router[_0x66db('0x8')]('/',auth[_0x66db('0x9')](),controller['index']);router['get'](_0x66db('0xa'),auth[_0x66db('0x9')](),controller[_0x66db('0xb')]);router[_0x66db('0x8')](_0x66db('0xc'),auth[_0x66db('0x9')](),controller[_0x66db('0xd')]);router[_0x66db('0x8')]('/:id/fields',auth['isAuthenticated'](),controller['getFields']);router['post']('/',auth[_0x66db('0x9')](),controller['create']);router[_0x66db('0xe')](_0x66db('0xc'),auth['isAuthenticated'](),controller[_0x66db('0xf')]);router['put'](_0x66db('0xa'),auth[_0x66db('0x9')](),controller[_0x66db('0x10')]);router['delete']('/:id',auth[_0x66db('0x9')](),controller[_0x66db('0x11')]);module[_0x66db('0x12')]=router; \ No newline at end of file diff --git a/server/api/intDynamics365Account/intDynamics365Account.attributes.js b/server/api/intDynamics365Account/intDynamics365Account.attributes.js index c6ed81d..954edbb 100644 --- a/server/api/intDynamics365Account/intDynamics365Account.attributes.js +++ b/server/api/intDynamics365Account/intDynamics365Account.attributes.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x3f27=['sequelize','exports','STRING','BOOLEAN'];(function(_0x502c7d,_0x2f1285){var _0x30b7ed=function(_0x2d92f3){while(--_0x2d92f3){_0x502c7d['push'](_0x502c7d['shift']());}};_0x30b7ed(++_0x2f1285);}(_0x3f27,0x1f4));var _0x73f2=function(_0x5f2b7d,_0x4aa234){_0x5f2b7d=_0x5f2b7d-0x0;var _0x5718db=_0x3f27[_0x5f2b7d];return _0x5718db;};'use strict';var Sequelize=require(_0x73f2('0x0'));module[_0x73f2('0x1')]={'name':{'type':Sequelize[_0x73f2('0x2')]},'username':{'type':Sequelize[_0x73f2('0x2')]},'password':{'type':Sequelize[_0x73f2('0x2')]},'remoteUri':{'type':Sequelize['STRING']},'tenantId':{'type':Sequelize[_0x73f2('0x2')]},'clientId':{'type':Sequelize[_0x73f2('0x2')]},'clientSecret':{'type':Sequelize['STRING']},'serverUrl':{'type':Sequelize['STRING'],'allowNull':![]},'description':{'type':Sequelize['STRING']},'modernAuthentication':{'type':Sequelize[_0x73f2('0x3')],'defaultValue':!![]}}; \ No newline at end of file +var _0x1a44=['BOOLEAN','sequelize','STRING'];(function(_0x42ca15,_0x193ccb){var _0x1c6ded=function(_0x40989a){while(--_0x40989a){_0x42ca15['push'](_0x42ca15['shift']());}};_0x1c6ded(++_0x193ccb);}(_0x1a44,0xc4));var _0x41a4=function(_0x1d8bee,_0x4a0a6f){_0x1d8bee=_0x1d8bee-0x0;var _0x5c1a6f=_0x1a44[_0x1d8bee];return _0x5c1a6f;};'use strict';var Sequelize=require(_0x41a4('0x0'));module['exports']={'name':{'type':Sequelize[_0x41a4('0x1')]},'username':{'type':Sequelize[_0x41a4('0x1')]},'password':{'type':Sequelize[_0x41a4('0x1')]},'remoteUri':{'type':Sequelize[_0x41a4('0x1')]},'tenantId':{'type':Sequelize[_0x41a4('0x1')]},'clientId':{'type':Sequelize[_0x41a4('0x1')]},'clientSecret':{'type':Sequelize[_0x41a4('0x1')]},'serverUrl':{'type':Sequelize['STRING'],'allowNull':![]},'description':{'type':Sequelize[_0x41a4('0x1')]},'modernAuthentication':{'type':Sequelize[_0x41a4('0x2')],'defaultValue':!![]}}; \ No newline at end of file diff --git a/server/api/intDynamics365Account/intDynamics365Account.controller.js b/server/api/intDynamics365Account/intDynamics365Account.controller.js index 25b8ed6..13240f5 100644 --- a/server/api/intDynamics365Account/intDynamics365Account.controller.js +++ b/server/api/intDynamics365Account/intDynamics365Account.controller.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xde44=['../../components/integrations/configuration','status','offset','undefined','limit','count','Content-Range','json','update','then','end','sendStatus','error','stack','name','send','index','map','Dynamics365Account','rawAttributes','type','model','query','keys','filters','intersection','attributes','fields','nolimit','order','sort','where','filter','merge','options','findAll','catch','params','length','includeAll','include','body','find','destroy','getConfigurations','findOne','pick','hasOwnProperty','AccountId','Subjects','getSubjects','channel','getDescriptions','Dynamics365Configuration','create','Dynamics365Field','substring','%s/api/data/v9.0/','ticketType','Incident','title','description','ownerid','caseorigincode','phonenumber','regardingobjectid','directioncode','phonecall_activity_parties','accountidname','accountidyominame','actualserviceunits','billedserviceunits','contactidname','contactidyominame','contractdetailidname','contractidname','createdbyexternalpartyname','createdbyexternalpartyyominame','createdbyname','createdbyyominame','createdonbehalfbyname','emailaddress','entitlementidname','entityimage_url','escalatedon','exchangerate','firstresponsebykpiidname','followupby','importsequencenumber','influencescore','kbarticleidname','lastonholdtime','masteridname','modifiedbyexternalpartyname','modifiedbyexternalpartyyominame','modifiedbyyominame','modifiedon','modifiedonbehalfbyname','modifiedonbehalfbyyominame','msdyn_incidenttypename','msdyn_iotalertname','numberofchildincidents','onholdtime','owneridname','owneridtype','owneridyominame','parentcaseidname','primarycontactidname','primarycontactidyominame','prioritycodename','productidname','productserialnumber','resolveby','responseby','responsiblecontactidname','responsiblecontactidyominame','slaname','socialprofileidname','statuscode','subjectidname','ticketnumber','traversedpath','utcconversiontimezonecode','concat','password','tenantId','clientId','clientSecret','modernAuthentication','data7','CloudProvider','remoteUri','POST','https://login.microsoftonline.com/','/oauth2/token','access_token','GET','EntityDefinitions?$select=DisplayName,EntitySetName&$filter=SchemaName\x20eq\x20\x27','Bearer\x20','4.0','EntityDefinitions(','Attributes','forEach','@odata.type','lastIndexOf','push','MetadataId','all','BooleanAttributeMetadata','DoubleAttributeMetadata','BigIntAttributeMetadata','MemoAttributeMetadata','StatusAttributeMetadata','EntityNameAttributeMetadata','StateAttributeMetadata','DecimalAttributeMetadata','test','statusCode','Wrong\x20credentials',')/Attributes(',')/Microsoft.Dynamics.CRM.PicklistAttributeMetadata?','$select=DisplayName,LogicalName&$expand=OptionSet($select=Options)','Label','UserLocalizedLabel','Value',')/Microsoft.Dynamics.CRM.BooleanAttributeMetadata?$select=DisplayName,LogicalName&$expand=OptionSet($select=FalseOption,\x20TrueOption)','OptionSet','FalseOption','false','LogicalName',')/Microsoft.Dynamics.CRM.','?$select=DisplayName,LogicalName','DisplayName','request-promise','util','lodash','../../components/parsers/qs','api','../../mysqldb'];(function(_0x442ec2,_0x1d0e6c){var _0x15987f=function(_0x5e7627){while(--_0x5e7627){_0x442ec2['push'](_0x442ec2['shift']());}};_0x15987f(++_0x1d0e6c);}(_0xde44,0x160));var _0x4de4=function(_0x347e89,_0x2fb256){_0x347e89=_0x347e89-0x0;var _0x5b07f1=_0xde44[_0x347e89];return _0x5b07f1;};'use strict';var rp=require(_0x4de4('0x0'));var util=require(_0x4de4('0x1'));var _=require(_0x4de4('0x2'));var qs=require(_0x4de4('0x3'));var logger=require('../../config/logger')(_0x4de4('0x4'));var db=require(_0x4de4('0x5'))['db'];var integrations=require(_0x4de4('0x6'));function respondWithResult(_0x34fb68,_0x85c4fe){_0x85c4fe=_0x85c4fe||0xc8;return function(_0x4c906b){if(_0x4c906b){return _0x34fb68[_0x4de4('0x7')](_0x85c4fe)['json'](_0x4c906b);}};}function respondWithFilteredResult(_0x1794e1,_0x406f08){return function(_0x4f0c11){if(_0x4f0c11){var _0x4f13e7=typeof _0x406f08[_0x4de4('0x8')]===_0x4de4('0x9')&&typeof _0x406f08[_0x4de4('0xa')]==='undefined';var _0xcd37c7=_0x4f0c11['count'];var _0x448ff2=_0x4f13e7?0x0:_0x406f08['offset'];var _0x2bae4b=_0x4f13e7?_0x4f0c11[_0x4de4('0xb')]:_0x406f08['offset']+_0x406f08[_0x4de4('0xa')];var _0x22b204;if(_0x2bae4b>=_0xcd37c7){_0x2bae4b=_0xcd37c7;_0x22b204=0xc8;}else{_0x22b204=0xce;}_0x1794e1['status'](_0x22b204);return _0x1794e1['set'](_0x4de4('0xc'),_0x448ff2+'-'+_0x2bae4b+'/'+_0xcd37c7)[_0x4de4('0xd')](_0x4f0c11);}return null;};}function saveUpdates(_0x2fc62a){return function(_0x4c45f6){if(_0x4c45f6){return _0x4c45f6[_0x4de4('0xe')](_0x2fc62a)[_0x4de4('0xf')](function(_0x1e4851){return _0x1e4851;});}return null;};}function removeEntity(_0x510c05){return function(_0x2a3513){if(_0x2a3513){return _0x2a3513['destroy']()[_0x4de4('0xf')](function(){_0x510c05[_0x4de4('0x7')](0xcc)[_0x4de4('0x10')]();});}};}function handleEntityNotFound(_0x41ffdf){return function(_0x1af75d){if(!_0x1af75d){_0x41ffdf[_0x4de4('0x11')](0x194);}return _0x1af75d;};}function handleError(_0x290843,_0x908533){_0x908533=_0x908533||0x1f4;return function(_0x5c2ef2){logger[_0x4de4('0x12')](_0x5c2ef2[_0x4de4('0x13')]);if(_0x5c2ef2[_0x4de4('0x14')]){delete _0x5c2ef2['name'];}_0x290843[_0x4de4('0x7')](_0x908533)[_0x4de4('0x15')](_0x5c2ef2);};}exports[_0x4de4('0x16')]=function(_0x2c09d8,_0x390422){var _0x3619c6={},_0xf59a2a={},_0xa316a4={'count':0x0,'rows':[]};var _0x446971=_[_0x4de4('0x17')](db[_0x4de4('0x18')][_0x4de4('0x19')],function(_0x2aa440){return{'name':_0x2aa440['fieldName'],'type':_0x2aa440[_0x4de4('0x1a')]['key']};});_0xf59a2a[_0x4de4('0x1b')]=_[_0x4de4('0x17')](_0x446971,_0x4de4('0x14'));_0xf59a2a[_0x4de4('0x1c')]=_[_0x4de4('0x1d')](_0x2c09d8[_0x4de4('0x1c')]);_0xf59a2a[_0x4de4('0x1e')]=_[_0x4de4('0x1f')](_0xf59a2a['model'],_0xf59a2a[_0x4de4('0x1c')]);_0x3619c6[_0x4de4('0x20')]=_[_0x4de4('0x1f')](_0xf59a2a['model'],qs[_0x4de4('0x21')](_0x2c09d8[_0x4de4('0x1c')][_0x4de4('0x21')]));_0x3619c6[_0x4de4('0x20')]=_0x3619c6['attributes']['length']?_0x3619c6[_0x4de4('0x20')]:_0xf59a2a[_0x4de4('0x1b')];if(!_0x2c09d8['query']['hasOwnProperty'](_0x4de4('0x22'))){_0x3619c6['limit']=qs['limit'](_0x2c09d8[_0x4de4('0x1c')][_0x4de4('0xa')]);_0x3619c6[_0x4de4('0x8')]=qs[_0x4de4('0x8')](_0x2c09d8[_0x4de4('0x1c')]['offset']);}_0x3619c6[_0x4de4('0x23')]=qs['sort'](_0x2c09d8[_0x4de4('0x1c')][_0x4de4('0x24')]);_0x3619c6[_0x4de4('0x25')]=qs[_0x4de4('0x1e')](_['pick'](_0x2c09d8[_0x4de4('0x1c')],_0xf59a2a[_0x4de4('0x1e')]),_0x446971);if(_0x2c09d8['query'][_0x4de4('0x26')]){_0x3619c6['where']=_[_0x4de4('0x27')](_0x3619c6[_0x4de4('0x25')],{'$or':_[_0x4de4('0x17')](_0x446971,function(_0x1fb282){if(_0x1fb282[_0x4de4('0x1a')]!=='VIRTUAL'){var _0x41cc49={};_0x41cc49[_0x1fb282['name']]={'$like':'%'+_0x2c09d8[_0x4de4('0x1c')][_0x4de4('0x26')]+'%'};return _0x41cc49;}})});}_0x3619c6=_[_0x4de4('0x27')]({},_0x3619c6,_0x2c09d8[_0x4de4('0x28')]);var _0x2f8f83={'where':_0x3619c6[_0x4de4('0x25')]};return db['Dynamics365Account']['count'](_0x2f8f83)[_0x4de4('0xf')](function(_0x50f683){_0xa316a4[_0x4de4('0xb')]=_0x50f683;if(_0x2c09d8[_0x4de4('0x1c')]['includeAll']){_0x3619c6['include']=[{'all':!![]}];}return db[_0x4de4('0x18')][_0x4de4('0x29')](_0x3619c6);})['then'](function(_0x116968){_0xa316a4['rows']=_0x116968;return _0xa316a4;})[_0x4de4('0xf')](respondWithFilteredResult(_0x390422,_0x3619c6))[_0x4de4('0x2a')](handleError(_0x390422,null));};exports['show']=function(_0x3d6e25,_0x4a8aae){var _0x505bf1={'raw':![],'where':{'id':_0x3d6e25[_0x4de4('0x2b')]['id']}},_0x5dadb9={};_0x5dadb9['model']=_['keys'](db[_0x4de4('0x18')]['rawAttributes']);_0x5dadb9[_0x4de4('0x1c')]=_[_0x4de4('0x1d')](_0x3d6e25[_0x4de4('0x1c')]);_0x5dadb9[_0x4de4('0x1e')]=_[_0x4de4('0x1f')](_0x5dadb9['model'],_0x5dadb9[_0x4de4('0x1c')]);_0x505bf1[_0x4de4('0x20')]=_[_0x4de4('0x1f')](_0x5dadb9[_0x4de4('0x1b')],qs[_0x4de4('0x21')](_0x3d6e25[_0x4de4('0x1c')][_0x4de4('0x21')]));_0x505bf1[_0x4de4('0x20')]=_0x505bf1[_0x4de4('0x20')][_0x4de4('0x2c')]?_0x505bf1[_0x4de4('0x20')]:_0x5dadb9[_0x4de4('0x1b')];if(_0x3d6e25['query'][_0x4de4('0x2d')]){_0x505bf1[_0x4de4('0x2e')]=[{'all':!![]}];}_0x505bf1=_['merge']({},_0x505bf1,_0x3d6e25[_0x4de4('0x28')]);return db[_0x4de4('0x18')]['find'](_0x505bf1)[_0x4de4('0xf')](handleEntityNotFound(_0x4a8aae,null))[_0x4de4('0xf')](respondWithResult(_0x4a8aae,null))[_0x4de4('0x2a')](handleError(_0x4a8aae,null));};exports['create']=function(_0x36f2ce,_0x21c086){return db[_0x4de4('0x18')]['create'](_0x36f2ce[_0x4de4('0x2f')],{})[_0x4de4('0xf')](respondWithResult(_0x21c086,0xc9))[_0x4de4('0x2a')](handleError(_0x21c086,null));};exports[_0x4de4('0xe')]=function(_0x2e9a3d,_0x2af21b){if(_0x2e9a3d[_0x4de4('0x2f')]['id']){delete _0x2e9a3d[_0x4de4('0x2f')]['id'];}return db[_0x4de4('0x18')][_0x4de4('0x30')]({'where':{'id':_0x2e9a3d[_0x4de4('0x2b')]['id']}})[_0x4de4('0xf')](handleEntityNotFound(_0x2af21b,null))[_0x4de4('0xf')](saveUpdates(_0x2e9a3d[_0x4de4('0x2f')],null))['then'](respondWithResult(_0x2af21b,null))[_0x4de4('0x2a')](handleError(_0x2af21b,null));};exports[_0x4de4('0x31')]=function(_0x43cc6f,_0x576d2d){return db[_0x4de4('0x18')][_0x4de4('0x30')]({'where':{'id':_0x43cc6f[_0x4de4('0x2b')]['id']}})[_0x4de4('0xf')](handleEntityNotFound(_0x576d2d,null))[_0x4de4('0xf')](removeEntity(_0x576d2d,null))[_0x4de4('0x2a')](handleError(_0x576d2d,null));};exports[_0x4de4('0x32')]=function(_0x3ebd0d,_0x2c4fe8){var _0x175fa7={};var _0x3ac1c7={};var _0x439f29;var _0x4b95c4;return db[_0x4de4('0x18')][_0x4de4('0x33')]({'where':{'id':_0x3ebd0d[_0x4de4('0x2b')]['id']}})[_0x4de4('0xf')](handleEntityNotFound(_0x2c4fe8,null))[_0x4de4('0xf')](function(_0x219eba){if(_0x219eba){_0x439f29=_0x219eba;_0x3ac1c7['model']=_[_0x4de4('0x1d')](db['Dynamics365Configuration'][_0x4de4('0x19')]);_0x3ac1c7['query']=_[_0x4de4('0x1d')](_0x3ebd0d['query']);_0x3ac1c7[_0x4de4('0x1e')]=_[_0x4de4('0x1f')](_0x3ac1c7[_0x4de4('0x1b')],_0x3ac1c7['query']);_0x175fa7['attributes']=_['intersection'](_0x3ac1c7['model'],qs[_0x4de4('0x21')](_0x3ebd0d[_0x4de4('0x1c')][_0x4de4('0x21')]));_0x175fa7[_0x4de4('0x20')]=_0x175fa7[_0x4de4('0x20')][_0x4de4('0x2c')]?_0x175fa7[_0x4de4('0x20')]:_0x3ac1c7[_0x4de4('0x1b')];_0x175fa7[_0x4de4('0x23')]=qs[_0x4de4('0x24')](_0x3ebd0d[_0x4de4('0x1c')][_0x4de4('0x24')]);_0x175fa7[_0x4de4('0x25')]=qs['filters'](_[_0x4de4('0x34')](_0x3ebd0d['query'],_0x3ac1c7['filters']));if(_0x3ebd0d[_0x4de4('0x1c')][_0x4de4('0x26')]){_0x175fa7[_0x4de4('0x25')]=_[_0x4de4('0x27')](_0x175fa7[_0x4de4('0x25')],{'$or':_[_0x4de4('0x17')](_0x175fa7[_0x4de4('0x20')],function(_0xf01ac){var _0x5e47b4={};_0x5e47b4[_0xf01ac]={'$like':'%'+_0x3ebd0d[_0x4de4('0x1c')][_0x4de4('0x26')]+'%'};return _0x5e47b4;})});}_0x175fa7=_[_0x4de4('0x27')]({},_0x175fa7,_0x3ebd0d[_0x4de4('0x28')]);return _0x439f29[_0x4de4('0x32')](_0x175fa7);}})[_0x4de4('0xf')](function(_0x1281df){if(_0x1281df){_0x4b95c4=_0x1281df[_0x4de4('0x2c')];if(!_0x3ebd0d[_0x4de4('0x1c')][_0x4de4('0x35')](_0x4de4('0x22'))){_0x175fa7[_0x4de4('0xa')]=qs[_0x4de4('0xa')](_0x3ebd0d[_0x4de4('0x1c')][_0x4de4('0xa')]);_0x175fa7[_0x4de4('0x8')]=qs[_0x4de4('0x8')](_0x3ebd0d[_0x4de4('0x1c')]['offset']);}return _0x439f29[_0x4de4('0x32')](_0x175fa7);}})[_0x4de4('0xf')](function(_0x554471){if(_0x554471){return _0x554471?{'count':_0x4b95c4,'rows':_0x554471}:null;}})['then'](respondWithResult(_0x2c4fe8,null))['catch'](handleError(_0x2c4fe8,null));};exports['addConfiguration']=function(_0x58482e,_0x727e91){if(_0x58482e[_0x4de4('0x2f')]['id']){delete _0x58482e[_0x4de4('0x2f')]['id'];}return db['Dynamics365Account'][_0x4de4('0x33')]({'where':{'id':_0x58482e['params']['id']}})['then'](handleEntityNotFound(_0x727e91,null))[_0x4de4('0xf')](function(_0x113162){if(_0x113162){_0x58482e[_0x4de4('0x2f')][_0x4de4('0x36')]=_0x113162['id'];_0x58482e['body'][_0x4de4('0x37')]=integrations[_0x4de4('0x38')](_0x58482e['body'][_0x4de4('0x39')],_0x58482e[_0x4de4('0x2f')][_0x4de4('0x1a')]);_0x58482e[_0x4de4('0x2f')]['Descriptions']=integrations[_0x4de4('0x3a')](_0x58482e['body'][_0x4de4('0x39')],_0x58482e['body'][_0x4de4('0x1a')]);return db[_0x4de4('0x3b')][_0x4de4('0x3c')](_0x58482e['body'],{'include':[{'model':db[_0x4de4('0x3d')],'as':_0x4de4('0x37')},{'model':db['Dynamics365Field'],'as':'Descriptions'}]});}return null;})[_0x4de4('0xf')](respondWithResult(_0x727e91,null))['catch'](handleError(_0x727e91,null));};function sanitizeRemoteUri(_0x257465){var _0x2e6101=_0x257465['slice'](-0x1);if(_0x2e6101==='/')return _0x257465[_0x4de4('0x3e')](0x0,_0x257465['lastIndexOf'](_0x2e6101));return _0x257465;}function getWebApiUrl(_0x19e063){return util['format'](_0x4de4('0x3f'),_0x19e063);}exports['getFields']=function(_0xa6afd6,_0x50e058){var _0x3a9756=_0xa6afd6[_0x4de4('0x1c')][_0x4de4('0x40')];var _0x5d6555=_0x3a9756==='incident'?_0x4de4('0x41'):'PhoneCall';var _0x76ef6='';var _0x1a4044='';var _0x1bbf73='';var _0x36b64a='';var _0x204688='';var _0x4fd2c3='';var _0x31b0a7='';var _0x82c887='';var _0x4f8668=[_0x4de4('0x42'),_0x4de4('0x43'),'customerid',_0x4de4('0x44'),_0x4de4('0x45'),'subject',_0x4de4('0x46'),_0x4de4('0x47'),_0x4de4('0x48'),_0x4de4('0x49')];var _0x1652da=[_0x4de4('0x4a'),_0x4de4('0x4b'),_0x4de4('0x4c'),_0x4de4('0x4d'),_0x4de4('0x4e'),_0x4de4('0x4f'),_0x4de4('0x50'),_0x4de4('0x51'),_0x4de4('0x52'),_0x4de4('0x53'),_0x4de4('0x54'),_0x4de4('0x55'),'createdon',_0x4de4('0x56'),'createdonbehalfbyyominame','customeridname','customeridtype','customeridyominame',_0x4de4('0x57'),_0x4de4('0x58'),'entityimage_timestamp',_0x4de4('0x59'),_0x4de4('0x5a'),_0x4de4('0x5b'),_0x4de4('0x5c'),_0x4de4('0x5d'),_0x4de4('0x5e'),_0x4de4('0x5f'),_0x4de4('0x60'),_0x4de4('0x61'),_0x4de4('0x62'),_0x4de4('0x63'),_0x4de4('0x64'),'modifiedbyname',_0x4de4('0x65'),_0x4de4('0x66'),_0x4de4('0x67'),_0x4de4('0x68'),_0x4de4('0x69'),_0x4de4('0x6a'),_0x4de4('0x6b'),_0x4de4('0x6c'),'overriddencreatedon',_0x4de4('0x6d'),_0x4de4('0x6e'),_0x4de4('0x6f'),_0x4de4('0x70'),_0x4de4('0x71'),_0x4de4('0x72'),_0x4de4('0x73'),_0x4de4('0x74'),_0x4de4('0x75'),_0x4de4('0x76'),'resolvebykpiidname',_0x4de4('0x77'),_0x4de4('0x78'),_0x4de4('0x79'),'sentimentvalue','slainvokedidname',_0x4de4('0x7a'),_0x4de4('0x7b'),'statecode',_0x4de4('0x7c'),_0x4de4('0x7d'),_0x4de4('0x7e'),'timezoneruleversionnumber','transactioncurrencyidname',_0x4de4('0x7f'),_0x4de4('0x80'),'versionnumber'];var _0x40a04c=_0x4f8668[_0x4de4('0x81')](_0x1652da);return db[_0x4de4('0x18')][_0x4de4('0x33')]({'where':{'id':_0xa6afd6[_0x4de4('0x2b')]['id']},'attributes':['id','username',_0x4de4('0x82'),'remoteUri',_0x4de4('0x83'),_0x4de4('0x84'),_0x4de4('0x85'),_0x4de4('0x86')],'include':[{'model':db['CloudProvider'],'as':'CloudProvider','attributes':['id','data5',_0x4de4('0x87')]}]})[_0x4de4('0xf')](handleEntityNotFound(_0x50e058,null))['then'](function(_0x42babe){if(_0x42babe){if(_0x42babe[_0x4de4('0x86')]){_0x42babe['access_token']=_0x42babe[_0x4de4('0x88')]['data5'];_0x82c887=sanitizeRemoteUri(_0x42babe[_0x4de4('0x88')][_0x4de4('0x87')]);_0x31b0a7=getWebApiUrl(_0x82c887);return _0x42babe;}_0x82c887=sanitizeRemoteUri(_0x42babe[_0x4de4('0x89')]);_0x31b0a7=getWebApiUrl(_0x82c887);var _0x2e3038={'method':_0x4de4('0x8a'),'uri':_0x4de4('0x8b')+_0x42babe[_0x4de4('0x83')]+_0x4de4('0x8c'),'form':{'client_id':_0x42babe[_0x4de4('0x84')],'resource':_0x82c887,'username':_0x42babe['username'],'password':_0x42babe[_0x4de4('0x82')],'grant_type':_0x4de4('0x82'),'client_secret':_0x42babe['clientSecret']},'json':!![]};return rp(_0x2e3038);}})[_0x4de4('0xf')](function(_0x21b46d){_0x4fd2c3=_0x21b46d[_0x4de4('0x8d')];var _0x3aaf94={'method':_0x4de4('0x8e'),'uri':encodeURI(_0x31b0a7+_0x4de4('0x8f')+_0x5d6555+'\x27'),'headers':{'Authorization':_0x4de4('0x90')+_0x4fd2c3,'If-None-Match':null,'OData-Version':_0x4de4('0x91')},'json':!![]};return rp(_0x3aaf94);})[_0x4de4('0xf')](function(_0x548ffc){var _0x95e005=_0x548ffc['value'][0x0];var _0x4344cc=_0x95e005['MetadataId'];var _0xcac774={'method':_0x4de4('0x8e'),'uri':_0x31b0a7+_0x4de4('0x92')+_0x4344cc+')?$select=LogicalName&$expand=Attributes($select=LogicalName)','headers':{'Authorization':_0x4de4('0x90')+_0x4fd2c3,'If-None-Match':null,'OData-Version':_0x4de4('0x91')},'json':!![]};return rp(_0xcac774);})[_0x4de4('0xf')](function(_0x54baf3){_0x76ef6=_0x54baf3;_0x1a4044=_0x76ef6[_0x4de4('0x93')];_0x1a4044=_['remove'](_0x1a4044,function(_0x2185d5){return!_0x40a04c['includes'](_0x2185d5['LogicalName']);});var _0x4e392d=[];var _0x58cb04=[];_0x1a4044[_0x4de4('0x94')](function(_0x122875){if(_0x122875['@odata.type']){var _0x1b98e0=_0x122875[_0x4de4('0x95')][_0x4de4('0x3e')](_0x122875[_0x4de4('0x95')][_0x4de4('0x96')]('.')+0x1);if(_0x1b98e0==='PicklistAttributeMetadata'){_0x4e392d[_0x4de4('0x97')](getSelectList(_0x31b0a7,_0x3a9756,_0x58cb04,_0x76ef6[_0x4de4('0x98')],_0x122875[_0x4de4('0x98')],_0x4fd2c3));}}});return Promise[_0x4de4('0x99')](_0x4e392d);})[_0x4de4('0xf')](function(_0x155e45){_0x1bbf73=_0x155e45[0x0];var _0x400ade=[];var _0x4359c7=[];_0x1a4044[_0x4de4('0x94')](function(_0x57a904){if(!_['isNil'](_0x57a904['@odata.type'])){var _0x47be39=_0x57a904[_0x4de4('0x95')][_0x4de4('0x3e')](_0x57a904['@odata.type'][_0x4de4('0x96')]('.')+0x1);if(_0x47be39===_0x4de4('0x9a')){_0x400ade['push'](getBooleanList(_0x31b0a7,_0x3a9756,_0x4359c7,_0x76ef6[_0x4de4('0x98')],_0x57a904['MetadataId'],_0x4fd2c3));}}});return Promise[_0x4de4('0x99')](_0x400ade);})[_0x4de4('0xf')](function(_0xb52a63){_0x36b64a=_0xb52a63[0x0];var _0x1786ee=[];var _0x3c4987=[];_0x1a4044['forEach'](function(_0x3f4c81){if(_0x3f4c81['@odata.type']){var _0x238d31=_0x3f4c81[_0x4de4('0x95')][_0x4de4('0x3e')](_0x3f4c81[_0x4de4('0x95')][_0x4de4('0x96')]('.')+0x1);if(_0x238d31==='StringAttributeMetadata'||_0x238d31===_0x4de4('0x9b')||_0x238d31===_0x4de4('0x9c')||_0x238d31==='IntegerAttributeMetadata'||_0x238d31===_0x4de4('0x9d')||_0x238d31==='DateTimeAttributeMetadata'||_0x238d31===_0x4de4('0x9e')||_0x238d31===_0x4de4('0x9f')||_0x238d31===_0x4de4('0xa0')||_0x238d31===_0x4de4('0xa1')){_0x1786ee[_0x4de4('0x97')](getInputList(_0x31b0a7,_0x3a9756,_0x238d31,_0x3c4987,_0x76ef6[_0x4de4('0x98')],_0x3f4c81[_0x4de4('0x98')],_0x4fd2c3));}}});return Promise['all'](_0x1786ee);})[_0x4de4('0xf')](function(_0x4fe4fe){_0x204688=_0x4fe4fe[0x0];var _0x3fb432=_0x1bbf73[_0x4de4('0x81')](_0x36b64a)[_0x4de4('0x81')](_0x204688);var _0x168c12={'count':_0x3fb432[_0x4de4('0x2c')],'rows':_0x3fb432};return _0x168c12;})[_0x4de4('0xf')](respondWithResult(_0x50e058,null))['catch'](function(_0x11ddce){var _0x19dcdf=_0xa6afd6[_0x4de4('0x1c')][_0x4de4('0xa2')]?0x1f4:_0x11ddce[_0x4de4('0xa3')]||0x1f4;logger['error'](_0x11ddce[_0x4de4('0x13')]);delete _0x11ddce['name'];if(_0x19dcdf===0x191){_0x19dcdf=0x190;}_0x50e058[_0x4de4('0x7')](_0x19dcdf)[_0x4de4('0x15')](_0xa6afd6[_0x4de4('0x1c')][_0x4de4('0xa2')]?{'message':_0x4de4('0xa4'),'statusCode':_0x11ddce[_0x4de4('0xa3')]}:_0x11ddce);});};function getSelectList(_0x557f44,_0x1b40af,_0xb78044,_0x185c38,_0xde0612,_0x12220b){var _0x229727={'method':_0x4de4('0x8e'),'uri':_0x557f44+_0x4de4('0x92')+_0x185c38+_0x4de4('0xa5')+_0xde0612+_0x4de4('0xa6')+_0x4de4('0xa7'),'headers':{'Authorization':'Bearer\x20'+_0x12220b,'If-None-Match':null,'OData-Version':_0x4de4('0x91')},'json':!![]};return rp(_0x229727)[_0x4de4('0xf')](function(_0x4162f7){var _0x1c7124=[];var _0x372690=_0x4162f7['OptionSet']['Options'];_0x372690[_0x4de4('0x94')](function(_0x408baf){_0x1c7124[_0x4de4('0x97')]({'name':_0x408baf[_0x4de4('0xa8')][_0x4de4('0xa9')][_0x4de4('0xa8')],'value':String(_0x408baf[_0x4de4('0xaa')])});});var _0x5a31c5={'id':_0x1b40af+'_'+_0x4162f7['LogicalName'],'name':_0x4162f7['DisplayName'][_0x4de4('0xa9')]['Label'],'custom':![],'options':_0x1c7124};_0xb78044[_0x4de4('0x97')](_0x5a31c5);return _0xb78044;});}function getBooleanList(_0x84b01c,_0x24e2c5,_0x11dbbc,_0x3adc7f,_0x4ac61a,_0x611e32){var _0x1e4945={'method':_0x4de4('0x8e'),'uri':_0x84b01c+_0x4de4('0x92')+_0x3adc7f+_0x4de4('0xa5')+_0x4ac61a+_0x4de4('0xab'),'headers':{'Authorization':'Bearer\x20'+_0x611e32,'If-None-Match':null,'OData-Version':_0x4de4('0x91')},'json':!![]};return rp(_0x1e4945)[_0x4de4('0xf')](function(_0x30a4b4){var _0x16bfc4=[];_0x16bfc4[_0x4de4('0x97')]({'name':_0x30a4b4[_0x4de4('0xac')]['TrueOption'][_0x4de4('0xa8')][_0x4de4('0xa9')][_0x4de4('0xa8')],'value':'true'},{'name':_0x30a4b4[_0x4de4('0xac')][_0x4de4('0xad')][_0x4de4('0xa8')]['UserLocalizedLabel'][_0x4de4('0xa8')],'value':_0x4de4('0xae')});var _0x1f8781={'id':_0x24e2c5+'_'+_0x30a4b4[_0x4de4('0xaf')],'name':_0x30a4b4['DisplayName'][_0x4de4('0xa9')][_0x4de4('0xa8')],'custom':![],'options':_0x16bfc4};_0x11dbbc[_0x4de4('0x97')](_0x1f8781);return _0x11dbbc;});}function getInputList(_0x1da974,_0x46251a,_0x4b1897,_0x1579d9,_0x2b6e3b,_0xc05f9f,_0x94c153){var _0x5d31f9={'method':_0x4de4('0x8e'),'uri':_0x1da974+_0x4de4('0x92')+_0x2b6e3b+_0x4de4('0xa5')+_0xc05f9f+_0x4de4('0xb0')+_0x4b1897+_0x4de4('0xb1'),'headers':{'Authorization':_0x4de4('0x90')+_0x94c153,'If-None-Match':null,'OData-Version':_0x4de4('0x91')},'json':!![]};return rp(_0x5d31f9)[_0x4de4('0xf')](function(_0x1b6c43){var _0x41012={'id':_0x46251a+'_'+_0x1b6c43[_0x4de4('0xaf')],'name':_0x1b6c43[_0x4de4('0xb2')][_0x4de4('0xa9')]?_0x1b6c43['DisplayName'][_0x4de4('0xa9')][_0x4de4('0xa8')]:_0x1b6c43['LogicalName'],'custom':![],'options':[]};_0x1579d9[_0x4de4('0x97')](_0x41012);return _0x1579d9;});} \ No newline at end of file +var _0xe64e=['timezoneruleversionnumber','transactioncurrencyidname','traversedpath','utcconversiontimezonecode','concat','username','password','remoteUri','tenantId','clientId','clientSecret','modernAuthentication','CloudProvider','data5','data7','access_token','POST','https://login.microsoftonline.com/','/oauth2/token','GET','EntityDefinitions?$select=DisplayName,EntitySetName&$filter=SchemaName\x20eq\x20\x27','Bearer\x20','4.0','value','EntityDefinitions(','Attributes','remove','includes','LogicalName','forEach','@odata.type','PicklistAttributeMetadata','push','MetadataId','all','isNil','BooleanAttributeMetadata','StringAttributeMetadata','DoubleAttributeMetadata','MemoAttributeMetadata','EntityNameAttributeMetadata','StateAttributeMetadata','DecimalAttributeMetadata','test','send','Wrong\x20credentials','statusCode',')/Attributes(',')/Microsoft.Dynamics.CRM.PicklistAttributeMetadata?','$select=DisplayName,LogicalName&$expand=OptionSet($select=Options)','Options','Label','UserLocalizedLabel','Value','DisplayName',')/Microsoft.Dynamics.CRM.BooleanAttributeMetadata?$select=DisplayName,LogicalName&$expand=OptionSet($select=FalseOption,\x20TrueOption)','OptionSet','true','FalseOption','false',')/Microsoft.Dynamics.CRM.','?$select=DisplayName,LogicalName','request-promise','util','lodash','../../components/parsers/qs','../../config/logger','api','../../mysqldb','../../components/integrations/configuration','json','offset','undefined','limit','count','status','set','Content-Range','then','destroy','error','stack','name','index','map','Dynamics365Account','rawAttributes','fieldName','type','key','model','query','keys','filters','attributes','intersection','fields','length','nolimit','order','sort','where','pick','filter','merge','VIRTUAL','options','includeAll','include','findAll','rows','catch','params','find','create','body','update','getConfigurations','findOne','addConfiguration','Subjects','getSubjects','channel','Descriptions','getDescriptions','Dynamics365Configuration','Dynamics365Field','slice','substring','lastIndexOf','format','%s/api/data/v9.0/','ticketType','Incident','PhoneCall','title','description','customerid','caseorigincode','subject','regardingobjectid','phonecall_activity_parties','actualserviceunits','billedserviceunits','contactidname','contactidyominame','contractdetailidname','contractidname','createdbyname','createdbyyominame','createdonbehalfbyname','customeridtype','customeridyominame','emailaddress','entitlementidname','exchangerate','firstresponsebykpiidname','followupby','importsequencenumber','influencescore','kbarticleidname','lastonholdtime','modifiedbyexternalpartyname','modifiedbyexternalpartyyominame','modifiedbyname','modifiedbyyominame','modifiedonbehalfbyyominame','onholdtime','owneridname','owneridtype','owneridyominame','parentcaseidname','primarycontactidname','primarycontactidyominame','prioritycodename','resolvebykpiidname','responseby','responsiblecontactidname','responsiblecontactidyominame','sentimentvalue','slainvokedidname','slaname','socialprofileidname','subjectidname','ticketnumber'];(function(_0x535f9d,_0x4e6dde){var _0x9c6991=function(_0x48f948){while(--_0x48f948){_0x535f9d['push'](_0x535f9d['shift']());}};_0x9c6991(++_0x4e6dde);}(_0xe64e,0x1b0));var _0xee64=function(_0x20a584,_0xe384a5){_0x20a584=_0x20a584-0x0;var _0x4b41a8=_0xe64e[_0x20a584];return _0x4b41a8;};'use strict';var rp=require(_0xee64('0x0'));var util=require(_0xee64('0x1'));var _=require(_0xee64('0x2'));var qs=require(_0xee64('0x3'));var logger=require(_0xee64('0x4'))(_0xee64('0x5'));var db=require(_0xee64('0x6'))['db'];var integrations=require(_0xee64('0x7'));function respondWithResult(_0x1d1e83,_0x21ab00){_0x21ab00=_0x21ab00||0xc8;return function(_0x262a74){if(_0x262a74){return _0x1d1e83['status'](_0x21ab00)[_0xee64('0x8')](_0x262a74);}};}function respondWithFilteredResult(_0x332a1a,_0x19cbae){return function(_0x2ff12d){if(_0x2ff12d){var _0x44a1cf=typeof _0x19cbae[_0xee64('0x9')]===_0xee64('0xa')&&typeof _0x19cbae[_0xee64('0xb')]==='undefined';var _0xd77aa3=_0x2ff12d[_0xee64('0xc')];var _0x16d7da=_0x44a1cf?0x0:_0x19cbae[_0xee64('0x9')];var _0x56320f=_0x44a1cf?_0x2ff12d[_0xee64('0xc')]:_0x19cbae[_0xee64('0x9')]+_0x19cbae[_0xee64('0xb')];var _0x5aa70c;if(_0x56320f>=_0xd77aa3){_0x56320f=_0xd77aa3;_0x5aa70c=0xc8;}else{_0x5aa70c=0xce;}_0x332a1a[_0xee64('0xd')](_0x5aa70c);return _0x332a1a[_0xee64('0xe')](_0xee64('0xf'),_0x16d7da+'-'+_0x56320f+'/'+_0xd77aa3)[_0xee64('0x8')](_0x2ff12d);}return null;};}function saveUpdates(_0x5d1f7e){return function(_0xfba780){if(_0xfba780){return _0xfba780['update'](_0x5d1f7e)[_0xee64('0x10')](function(_0x20fce1){return _0x20fce1;});}return null;};}function removeEntity(_0x502e8d){return function(_0x277400){if(_0x277400){return _0x277400[_0xee64('0x11')]()[_0xee64('0x10')](function(){_0x502e8d[_0xee64('0xd')](0xcc)['end']();});}};}function handleEntityNotFound(_0xc089a5){return function(_0x1df4fb){if(!_0x1df4fb){_0xc089a5['sendStatus'](0x194);}return _0x1df4fb;};}function handleError(_0x473d15,_0x418e78){_0x418e78=_0x418e78||0x1f4;return function(_0x2bf9ec){logger[_0xee64('0x12')](_0x2bf9ec[_0xee64('0x13')]);if(_0x2bf9ec[_0xee64('0x14')]){delete _0x2bf9ec[_0xee64('0x14')];}_0x473d15['status'](_0x418e78)['send'](_0x2bf9ec);};}exports[_0xee64('0x15')]=function(_0x1a7e24,_0x3317f1){var _0x126b18={},_0x23e839={},_0x50b487={'count':0x0,'rows':[]};var _0x27e416=_[_0xee64('0x16')](db[_0xee64('0x17')][_0xee64('0x18')],function(_0xdad72e){return{'name':_0xdad72e[_0xee64('0x19')],'type':_0xdad72e[_0xee64('0x1a')][_0xee64('0x1b')]};});_0x23e839[_0xee64('0x1c')]=_[_0xee64('0x16')](_0x27e416,_0xee64('0x14'));_0x23e839[_0xee64('0x1d')]=_[_0xee64('0x1e')](_0x1a7e24[_0xee64('0x1d')]);_0x23e839[_0xee64('0x1f')]=_['intersection'](_0x23e839[_0xee64('0x1c')],_0x23e839['query']);_0x126b18[_0xee64('0x20')]=_[_0xee64('0x21')](_0x23e839[_0xee64('0x1c')],qs[_0xee64('0x22')](_0x1a7e24[_0xee64('0x1d')][_0xee64('0x22')]));_0x126b18[_0xee64('0x20')]=_0x126b18[_0xee64('0x20')][_0xee64('0x23')]?_0x126b18[_0xee64('0x20')]:_0x23e839['model'];if(!_0x1a7e24[_0xee64('0x1d')]['hasOwnProperty'](_0xee64('0x24'))){_0x126b18['limit']=qs['limit'](_0x1a7e24[_0xee64('0x1d')]['limit']);_0x126b18[_0xee64('0x9')]=qs[_0xee64('0x9')](_0x1a7e24[_0xee64('0x1d')][_0xee64('0x9')]);}_0x126b18[_0xee64('0x25')]=qs[_0xee64('0x26')](_0x1a7e24[_0xee64('0x1d')]['sort']);_0x126b18[_0xee64('0x27')]=qs[_0xee64('0x1f')](_[_0xee64('0x28')](_0x1a7e24[_0xee64('0x1d')],_0x23e839[_0xee64('0x1f')]),_0x27e416);if(_0x1a7e24[_0xee64('0x1d')][_0xee64('0x29')]){_0x126b18[_0xee64('0x27')]=_[_0xee64('0x2a')](_0x126b18[_0xee64('0x27')],{'$or':_[_0xee64('0x16')](_0x27e416,function(_0x4e1242){if(_0x4e1242[_0xee64('0x1a')]!==_0xee64('0x2b')){var _0x112177={};_0x112177[_0x4e1242[_0xee64('0x14')]]={'$like':'%'+_0x1a7e24['query'][_0xee64('0x29')]+'%'};return _0x112177;}})});}_0x126b18=_[_0xee64('0x2a')]({},_0x126b18,_0x1a7e24[_0xee64('0x2c')]);var _0x52d185={'where':_0x126b18[_0xee64('0x27')]};return db[_0xee64('0x17')][_0xee64('0xc')](_0x52d185)[_0xee64('0x10')](function(_0x56a341){_0x50b487[_0xee64('0xc')]=_0x56a341;if(_0x1a7e24['query'][_0xee64('0x2d')]){_0x126b18[_0xee64('0x2e')]=[{'all':!![]}];}return db[_0xee64('0x17')][_0xee64('0x2f')](_0x126b18);})['then'](function(_0x5287fd){_0x50b487[_0xee64('0x30')]=_0x5287fd;return _0x50b487;})[_0xee64('0x10')](respondWithFilteredResult(_0x3317f1,_0x126b18))[_0xee64('0x31')](handleError(_0x3317f1,null));};exports['show']=function(_0x159361,_0x481e88){var _0x146f70={'raw':![],'where':{'id':_0x159361[_0xee64('0x32')]['id']}},_0x1d0194={};_0x1d0194[_0xee64('0x1c')]=_[_0xee64('0x1e')](db[_0xee64('0x17')][_0xee64('0x18')]);_0x1d0194[_0xee64('0x1d')]=_[_0xee64('0x1e')](_0x159361[_0xee64('0x1d')]);_0x1d0194['filters']=_['intersection'](_0x1d0194['model'],_0x1d0194[_0xee64('0x1d')]);_0x146f70['attributes']=_['intersection'](_0x1d0194[_0xee64('0x1c')],qs['fields'](_0x159361[_0xee64('0x1d')]['fields']));_0x146f70[_0xee64('0x20')]=_0x146f70[_0xee64('0x20')][_0xee64('0x23')]?_0x146f70[_0xee64('0x20')]:_0x1d0194[_0xee64('0x1c')];if(_0x159361[_0xee64('0x1d')][_0xee64('0x2d')]){_0x146f70[_0xee64('0x2e')]=[{'all':!![]}];}_0x146f70=_[_0xee64('0x2a')]({},_0x146f70,_0x159361[_0xee64('0x2c')]);return db[_0xee64('0x17')][_0xee64('0x33')](_0x146f70)['then'](handleEntityNotFound(_0x481e88,null))['then'](respondWithResult(_0x481e88,null))[_0xee64('0x31')](handleError(_0x481e88,null));};exports[_0xee64('0x34')]=function(_0x422158,_0xe8bb68){return db[_0xee64('0x17')]['create'](_0x422158[_0xee64('0x35')],{})[_0xee64('0x10')](respondWithResult(_0xe8bb68,0xc9))[_0xee64('0x31')](handleError(_0xe8bb68,null));};exports[_0xee64('0x36')]=function(_0x35de62,_0x3f901e){if(_0x35de62[_0xee64('0x35')]['id']){delete _0x35de62[_0xee64('0x35')]['id'];}return db[_0xee64('0x17')][_0xee64('0x33')]({'where':{'id':_0x35de62[_0xee64('0x32')]['id']}})['then'](handleEntityNotFound(_0x3f901e,null))['then'](saveUpdates(_0x35de62[_0xee64('0x35')],null))[_0xee64('0x10')](respondWithResult(_0x3f901e,null))[_0xee64('0x31')](handleError(_0x3f901e,null));};exports[_0xee64('0x11')]=function(_0xf48f52,_0x95a9b5){return db[_0xee64('0x17')][_0xee64('0x33')]({'where':{'id':_0xf48f52['params']['id']}})[_0xee64('0x10')](handleEntityNotFound(_0x95a9b5,null))[_0xee64('0x10')](removeEntity(_0x95a9b5,null))[_0xee64('0x31')](handleError(_0x95a9b5,null));};exports[_0xee64('0x37')]=function(_0x4e5621,_0x370e64){var _0x36ea30={};var _0x44f8c0={};var _0x3e5565;var _0x396f96;return db['Dynamics365Account'][_0xee64('0x38')]({'where':{'id':_0x4e5621[_0xee64('0x32')]['id']}})[_0xee64('0x10')](handleEntityNotFound(_0x370e64,null))[_0xee64('0x10')](function(_0x7f59ef){if(_0x7f59ef){_0x3e5565=_0x7f59ef;_0x44f8c0[_0xee64('0x1c')]=_[_0xee64('0x1e')](db['Dynamics365Configuration']['rawAttributes']);_0x44f8c0[_0xee64('0x1d')]=_['keys'](_0x4e5621[_0xee64('0x1d')]);_0x44f8c0[_0xee64('0x1f')]=_['intersection'](_0x44f8c0[_0xee64('0x1c')],_0x44f8c0[_0xee64('0x1d')]);_0x36ea30[_0xee64('0x20')]=_[_0xee64('0x21')](_0x44f8c0[_0xee64('0x1c')],qs[_0xee64('0x22')](_0x4e5621[_0xee64('0x1d')][_0xee64('0x22')]));_0x36ea30['attributes']=_0x36ea30[_0xee64('0x20')][_0xee64('0x23')]?_0x36ea30[_0xee64('0x20')]:_0x44f8c0[_0xee64('0x1c')];_0x36ea30[_0xee64('0x25')]=qs[_0xee64('0x26')](_0x4e5621['query']['sort']);_0x36ea30[_0xee64('0x27')]=qs[_0xee64('0x1f')](_[_0xee64('0x28')](_0x4e5621[_0xee64('0x1d')],_0x44f8c0[_0xee64('0x1f')]));if(_0x4e5621[_0xee64('0x1d')][_0xee64('0x29')]){_0x36ea30[_0xee64('0x27')]=_['merge'](_0x36ea30['where'],{'$or':_[_0xee64('0x16')](_0x36ea30[_0xee64('0x20')],function(_0x156ae4){var _0x42ae81={};_0x42ae81[_0x156ae4]={'$like':'%'+_0x4e5621[_0xee64('0x1d')][_0xee64('0x29')]+'%'};return _0x42ae81;})});}_0x36ea30=_[_0xee64('0x2a')]({},_0x36ea30,_0x4e5621[_0xee64('0x2c')]);return _0x3e5565[_0xee64('0x37')](_0x36ea30);}})[_0xee64('0x10')](function(_0x30d2e7){if(_0x30d2e7){_0x396f96=_0x30d2e7[_0xee64('0x23')];if(!_0x4e5621[_0xee64('0x1d')]['hasOwnProperty'](_0xee64('0x24'))){_0x36ea30[_0xee64('0xb')]=qs[_0xee64('0xb')](_0x4e5621['query'][_0xee64('0xb')]);_0x36ea30[_0xee64('0x9')]=qs['offset'](_0x4e5621['query']['offset']);}return _0x3e5565[_0xee64('0x37')](_0x36ea30);}})[_0xee64('0x10')](function(_0x50731d){if(_0x50731d){return _0x50731d?{'count':_0x396f96,'rows':_0x50731d}:null;}})[_0xee64('0x10')](respondWithResult(_0x370e64,null))[_0xee64('0x31')](handleError(_0x370e64,null));};exports[_0xee64('0x39')]=function(_0x22bafe,_0x2e24fb){if(_0x22bafe['body']['id']){delete _0x22bafe['body']['id'];}return db['Dynamics365Account'][_0xee64('0x38')]({'where':{'id':_0x22bafe[_0xee64('0x32')]['id']}})[_0xee64('0x10')](handleEntityNotFound(_0x2e24fb,null))[_0xee64('0x10')](function(_0x3af928){if(_0x3af928){_0x22bafe[_0xee64('0x35')]['AccountId']=_0x3af928['id'];_0x22bafe[_0xee64('0x35')][_0xee64('0x3a')]=integrations[_0xee64('0x3b')](_0x22bafe[_0xee64('0x35')][_0xee64('0x3c')],_0x22bafe[_0xee64('0x35')]['type']);_0x22bafe[_0xee64('0x35')][_0xee64('0x3d')]=integrations[_0xee64('0x3e')](_0x22bafe[_0xee64('0x35')]['channel'],_0x22bafe['body'][_0xee64('0x1a')]);return db[_0xee64('0x3f')][_0xee64('0x34')](_0x22bafe['body'],{'include':[{'model':db[_0xee64('0x40')],'as':_0xee64('0x3a')},{'model':db[_0xee64('0x40')],'as':'Descriptions'}]});}return null;})['then'](respondWithResult(_0x2e24fb,null))[_0xee64('0x31')](handleError(_0x2e24fb,null));};function sanitizeRemoteUri(_0x52ee96){var _0x2682be=_0x52ee96[_0xee64('0x41')](-0x1);if(_0x2682be==='/')return _0x52ee96[_0xee64('0x42')](0x0,_0x52ee96[_0xee64('0x43')](_0x2682be));return _0x52ee96;}function getWebApiUrl(_0x49474e){return util[_0xee64('0x44')](_0xee64('0x45'),_0x49474e);}exports['getFields']=function(_0x1b4950,_0x5ca731){var _0x3f2d72=_0x1b4950['query'][_0xee64('0x46')];var _0x8310b4=_0x3f2d72==='incident'?_0xee64('0x47'):_0xee64('0x48');var _0x345f32='';var _0x508672='';var _0x276665='';var _0x7f6470='';var _0x24276f='';var _0x2d0a9a='';var _0x414d0a='';var _0x5c1155='';var _0x2c4dd9=[_0xee64('0x49'),_0xee64('0x4a'),_0xee64('0x4b'),'ownerid',_0xee64('0x4c'),_0xee64('0x4d'),'phonenumber',_0xee64('0x4e'),'directioncode',_0xee64('0x4f')];var _0x4e4521=['accountidname','accountidyominame',_0xee64('0x50'),_0xee64('0x51'),_0xee64('0x52'),_0xee64('0x53'),_0xee64('0x54'),_0xee64('0x55'),'createdbyexternalpartyname','createdbyexternalpartyyominame',_0xee64('0x56'),_0xee64('0x57'),'createdon',_0xee64('0x58'),'createdonbehalfbyyominame','customeridname',_0xee64('0x59'),_0xee64('0x5a'),_0xee64('0x5b'),_0xee64('0x5c'),'entityimage_timestamp','entityimage_url','escalatedon',_0xee64('0x5d'),_0xee64('0x5e'),_0xee64('0x5f'),_0xee64('0x60'),_0xee64('0x61'),_0xee64('0x62'),_0xee64('0x63'),'masteridname',_0xee64('0x64'),_0xee64('0x65'),_0xee64('0x66'),_0xee64('0x67'),'modifiedon','modifiedonbehalfbyname',_0xee64('0x68'),'msdyn_incidenttypename','msdyn_iotalertname','numberofchildincidents',_0xee64('0x69'),'overriddencreatedon',_0xee64('0x6a'),_0xee64('0x6b'),_0xee64('0x6c'),_0xee64('0x6d'),_0xee64('0x6e'),_0xee64('0x6f'),_0xee64('0x70'),'productidname','productserialnumber','resolveby',_0xee64('0x71'),_0xee64('0x72'),_0xee64('0x73'),_0xee64('0x74'),_0xee64('0x75'),_0xee64('0x76'),_0xee64('0x77'),_0xee64('0x78'),'statecode','statuscode',_0xee64('0x79'),_0xee64('0x7a'),_0xee64('0x7b'),_0xee64('0x7c'),_0xee64('0x7d'),_0xee64('0x7e'),'versionnumber'];var _0x39e6a2=_0x2c4dd9[_0xee64('0x7f')](_0x4e4521);return db[_0xee64('0x17')][_0xee64('0x38')]({'where':{'id':_0x1b4950[_0xee64('0x32')]['id']},'attributes':['id',_0xee64('0x80'),_0xee64('0x81'),_0xee64('0x82'),_0xee64('0x83'),_0xee64('0x84'),_0xee64('0x85'),_0xee64('0x86')],'include':[{'model':db['CloudProvider'],'as':_0xee64('0x87'),'attributes':['id',_0xee64('0x88'),_0xee64('0x89')]}]})['then'](handleEntityNotFound(_0x5ca731,null))['then'](function(_0x500805){if(_0x500805){if(_0x500805[_0xee64('0x86')]){_0x500805[_0xee64('0x8a')]=_0x500805[_0xee64('0x87')]['data5'];_0x5c1155=sanitizeRemoteUri(_0x500805['CloudProvider'][_0xee64('0x89')]);_0x414d0a=getWebApiUrl(_0x5c1155);return _0x500805;}_0x5c1155=sanitizeRemoteUri(_0x500805[_0xee64('0x82')]);_0x414d0a=getWebApiUrl(_0x5c1155);var _0x475db5={'method':_0xee64('0x8b'),'uri':_0xee64('0x8c')+_0x500805['tenantId']+_0xee64('0x8d'),'form':{'client_id':_0x500805[_0xee64('0x84')],'resource':_0x5c1155,'username':_0x500805[_0xee64('0x80')],'password':_0x500805['password'],'grant_type':_0xee64('0x81'),'client_secret':_0x500805[_0xee64('0x85')]},'json':!![]};return rp(_0x475db5);}})[_0xee64('0x10')](function(_0xe68881){_0x2d0a9a=_0xe68881[_0xee64('0x8a')];var _0x380331={'method':_0xee64('0x8e'),'uri':encodeURI(_0x414d0a+_0xee64('0x8f')+_0x8310b4+'\x27'),'headers':{'Authorization':_0xee64('0x90')+_0x2d0a9a,'If-None-Match':null,'OData-Version':_0xee64('0x91')},'json':!![]};return rp(_0x380331);})[_0xee64('0x10')](function(_0x3aa7fb){var _0x4b3be8=_0x3aa7fb[_0xee64('0x92')][0x0];var _0x329fb8=_0x4b3be8['MetadataId'];var _0x1fac7d={'method':_0xee64('0x8e'),'uri':_0x414d0a+_0xee64('0x93')+_0x329fb8+')?$select=LogicalName&$expand=Attributes($select=LogicalName)','headers':{'Authorization':_0xee64('0x90')+_0x2d0a9a,'If-None-Match':null,'OData-Version':_0xee64('0x91')},'json':!![]};return rp(_0x1fac7d);})[_0xee64('0x10')](function(_0x449e8c){_0x345f32=_0x449e8c;_0x508672=_0x345f32[_0xee64('0x94')];_0x508672=_[_0xee64('0x95')](_0x508672,function(_0x37d0e4){return!_0x39e6a2[_0xee64('0x96')](_0x37d0e4[_0xee64('0x97')]);});var _0x572117=[];var _0x37d92c=[];_0x508672[_0xee64('0x98')](function(_0x79a88d){if(_0x79a88d['@odata.type']){var _0x341856=_0x79a88d[_0xee64('0x99')]['substring'](_0x79a88d[_0xee64('0x99')]['lastIndexOf']('.')+0x1);if(_0x341856===_0xee64('0x9a')){_0x572117[_0xee64('0x9b')](getSelectList(_0x414d0a,_0x3f2d72,_0x37d92c,_0x345f32[_0xee64('0x9c')],_0x79a88d['MetadataId'],_0x2d0a9a));}}});return Promise[_0xee64('0x9d')](_0x572117);})['then'](function(_0x2a98ea){_0x276665=_0x2a98ea[0x0];var _0x4c05b8=[];var _0x51bdc7=[];_0x508672[_0xee64('0x98')](function(_0x58e3b8){if(!_[_0xee64('0x9e')](_0x58e3b8[_0xee64('0x99')])){var _0x9e6898=_0x58e3b8[_0xee64('0x99')]['substring'](_0x58e3b8[_0xee64('0x99')]['lastIndexOf']('.')+0x1);if(_0x9e6898===_0xee64('0x9f')){_0x4c05b8[_0xee64('0x9b')](getBooleanList(_0x414d0a,_0x3f2d72,_0x51bdc7,_0x345f32['MetadataId'],_0x58e3b8[_0xee64('0x9c')],_0x2d0a9a));}}});return Promise['all'](_0x4c05b8);})[_0xee64('0x10')](function(_0x3f3a28){_0x7f6470=_0x3f3a28[0x0];var _0x58c908=[];var _0x13c95c=[];_0x508672[_0xee64('0x98')](function(_0x255c8e){if(_0x255c8e[_0xee64('0x99')]){var _0x458880=_0x255c8e[_0xee64('0x99')][_0xee64('0x42')](_0x255c8e['@odata.type']['lastIndexOf']('.')+0x1);if(_0x458880===_0xee64('0xa0')||_0x458880===_0xee64('0xa1')||_0x458880==='BigIntAttributeMetadata'||_0x458880==='IntegerAttributeMetadata'||_0x458880===_0xee64('0xa2')||_0x458880==='DateTimeAttributeMetadata'||_0x458880==='StatusAttributeMetadata'||_0x458880===_0xee64('0xa3')||_0x458880===_0xee64('0xa4')||_0x458880===_0xee64('0xa5')){_0x58c908[_0xee64('0x9b')](getInputList(_0x414d0a,_0x3f2d72,_0x458880,_0x13c95c,_0x345f32[_0xee64('0x9c')],_0x255c8e[_0xee64('0x9c')],_0x2d0a9a));}}});return Promise['all'](_0x58c908);})[_0xee64('0x10')](function(_0x2b6e8b){_0x24276f=_0x2b6e8b[0x0];var _0x5eed4c=_0x276665[_0xee64('0x7f')](_0x7f6470)[_0xee64('0x7f')](_0x24276f);var _0x22b366={'count':_0x5eed4c[_0xee64('0x23')],'rows':_0x5eed4c};return _0x22b366;})[_0xee64('0x10')](respondWithResult(_0x5ca731,null))['catch'](function(_0x2360e9){var _0x205b52=_0x1b4950[_0xee64('0x1d')][_0xee64('0xa6')]?0x1f4:_0x2360e9['statusCode']||0x1f4;logger['error'](_0x2360e9['stack']);delete _0x2360e9[_0xee64('0x14')];if(_0x205b52===0x191){_0x205b52=0x190;}_0x5ca731[_0xee64('0xd')](_0x205b52)[_0xee64('0xa7')](_0x1b4950['query'][_0xee64('0xa6')]?{'message':_0xee64('0xa8'),'statusCode':_0x2360e9[_0xee64('0xa9')]}:_0x2360e9);});};function getSelectList(_0x464cdc,_0x2205a5,_0x4dfc54,_0x52f584,_0xf77098,_0xf081d8){var _0x1c599c={'method':_0xee64('0x8e'),'uri':_0x464cdc+'EntityDefinitions('+_0x52f584+_0xee64('0xaa')+_0xf77098+_0xee64('0xab')+_0xee64('0xac'),'headers':{'Authorization':'Bearer\x20'+_0xf081d8,'If-None-Match':null,'OData-Version':'4.0'},'json':!![]};return rp(_0x1c599c)[_0xee64('0x10')](function(_0x1e7b09){var _0x3c754f=[];var _0x1b1293=_0x1e7b09['OptionSet'][_0xee64('0xad')];_0x1b1293[_0xee64('0x98')](function(_0x4e0576){_0x3c754f[_0xee64('0x9b')]({'name':_0x4e0576[_0xee64('0xae')][_0xee64('0xaf')][_0xee64('0xae')],'value':String(_0x4e0576[_0xee64('0xb0')])});});var _0x452d46={'id':_0x2205a5+'_'+_0x1e7b09[_0xee64('0x97')],'name':_0x1e7b09[_0xee64('0xb1')][_0xee64('0xaf')]['Label'],'custom':![],'options':_0x3c754f};_0x4dfc54['push'](_0x452d46);return _0x4dfc54;});}function getBooleanList(_0x20f5d4,_0x437eab,_0x3a6aee,_0x29b612,_0xd9e2fb,_0x509c9e){var _0x50d630={'method':'GET','uri':_0x20f5d4+_0xee64('0x93')+_0x29b612+_0xee64('0xaa')+_0xd9e2fb+_0xee64('0xb2'),'headers':{'Authorization':_0xee64('0x90')+_0x509c9e,'If-None-Match':null,'OData-Version':_0xee64('0x91')},'json':!![]};return rp(_0x50d630)[_0xee64('0x10')](function(_0x31aee4){var _0x7b9f09=[];_0x7b9f09[_0xee64('0x9b')]({'name':_0x31aee4[_0xee64('0xb3')]['TrueOption']['Label'][_0xee64('0xaf')][_0xee64('0xae')],'value':_0xee64('0xb4')},{'name':_0x31aee4[_0xee64('0xb3')][_0xee64('0xb5')][_0xee64('0xae')][_0xee64('0xaf')][_0xee64('0xae')],'value':_0xee64('0xb6')});var _0x46156b={'id':_0x437eab+'_'+_0x31aee4[_0xee64('0x97')],'name':_0x31aee4['DisplayName'][_0xee64('0xaf')][_0xee64('0xae')],'custom':![],'options':_0x7b9f09};_0x3a6aee[_0xee64('0x9b')](_0x46156b);return _0x3a6aee;});}function getInputList(_0xe8ef57,_0x371c6c,_0x4fca59,_0x3c8e22,_0x42e6ea,_0xb55122,_0x9dff99){var _0x2a861e={'method':'GET','uri':_0xe8ef57+'EntityDefinitions('+_0x42e6ea+_0xee64('0xaa')+_0xb55122+_0xee64('0xb7')+_0x4fca59+_0xee64('0xb8'),'headers':{'Authorization':'Bearer\x20'+_0x9dff99,'If-None-Match':null,'OData-Version':_0xee64('0x91')},'json':!![]};return rp(_0x2a861e)[_0xee64('0x10')](function(_0xef2327){var _0x149c1f={'id':_0x371c6c+'_'+_0xef2327[_0xee64('0x97')],'name':_0xef2327[_0xee64('0xb1')][_0xee64('0xaf')]?_0xef2327['DisplayName'][_0xee64('0xaf')][_0xee64('0xae')]:_0xef2327['LogicalName'],'custom':![],'options':[]};_0x3c8e22[_0xee64('0x9b')](_0x149c1f);return _0x3c8e22;});} \ No newline at end of file diff --git a/server/api/intDynamics365Account/intDynamics365Account.model.js b/server/api/intDynamics365Account/intDynamics365Account.model.js index daf4733..6e5568a 100644 --- a/server/api/intDynamics365Account/intDynamics365Account.model.js +++ b/server/api/intDynamics365Account/intDynamics365Account.model.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xe706=['../../config/logger','moment','bluebird','request-promise','path','rimraf','../../config/environment','./intDynamics365Account.attributes','../../components/integrations/configuration','exports','define','Dynamics365Account','int_dynamics365_accounts','lodash','util'];(function(_0x3dc1ef,_0x3f2d03){var _0x164285=function(_0x5af4b9){while(--_0x5af4b9){_0x3dc1ef['push'](_0x3dc1ef['shift']());}};_0x164285(++_0x3f2d03);}(_0xe706,0xa3));var _0x6e70=function(_0x4bed2d,_0x4ebe20){_0x4bed2d=_0x4bed2d-0x0;var _0xe82d9f=_0xe706[_0x4bed2d];return _0xe82d9f;};'use strict';var _=require(_0x6e70('0x0'));var util=require(_0x6e70('0x1'));var logger=require(_0x6e70('0x2'))('api');var moment=require(_0x6e70('0x3'));var BPromise=require(_0x6e70('0x4'));var rp=require(_0x6e70('0x5'));var fs=require('fs');var path=require(_0x6e70('0x6'));var rimraf=require(_0x6e70('0x7'));var config=require(_0x6e70('0x8'));var attributes=require(_0x6e70('0x9'));var integrations=require(_0x6e70('0xa'));module[_0x6e70('0xb')]=function(_0x4381d1,_0x36357b){return _0x4381d1[_0x6e70('0xc')](_0x6e70('0xd'),attributes,{'tableName':_0x6e70('0xe'),'paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file +var _0x0713=['../../config/logger','api','moment','bluebird','request-promise','rimraf','../../config/environment','./intDynamics365Account.attributes','../../components/integrations/configuration','exports','define','Dynamics365Account','int_dynamics365_accounts'];(function(_0x12e073,_0x4d43db){var _0x267748=function(_0x381284){while(--_0x381284){_0x12e073['push'](_0x12e073['shift']());}};_0x267748(++_0x4d43db);}(_0x0713,0x1ba));var _0x3071=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0x0713[_0x3dd15e];return _0x231fd0;};'use strict';var _=require('lodash');var util=require('util');var logger=require(_0x3071('0x0'))(_0x3071('0x1'));var moment=require(_0x3071('0x2'));var BPromise=require(_0x3071('0x3'));var rp=require(_0x3071('0x4'));var fs=require('fs');var path=require('path');var rimraf=require(_0x3071('0x5'));var config=require(_0x3071('0x6'));var attributes=require(_0x3071('0x7'));var integrations=require(_0x3071('0x8'));module[_0x3071('0x9')]=function(_0x41cf76,_0x1d3dd6){return _0x41cf76[_0x3071('0xa')](_0x3071('0xb'),attributes,{'tableName':_0x3071('0xc'),'paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file diff --git a/server/api/intDynamics365Account/intDynamics365Account.rpc.js b/server/api/intDynamics365Account/intDynamics365Account.rpc.js index 7c33c7a..eed91ca 100644 --- a/server/api/intDynamics365Account/intDynamics365Account.rpc.js +++ b/server/api/intDynamics365Account/intDynamics365Account.rpc.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x462c=['../../config/utils','rpc','../../config/environment','jayson/promise','client','http','then','info','Dynamics365Account,\x20%s,\x20%s','request\x20sent','debug','Dynamics365Account,\x20%s,\x20%s,\x20%s','error','code','message','GetDynamics365Account','findAll','options','raw','where','attributes','limit','map','include','model','stringify','catch','ShowDynamics365Account','Dynamics365Account','moment','bluebird','ioredis','../../mysqldb'];(function(_0x388b47,_0x5cdac5){var _0x4859df=function(_0x466a16){while(--_0x466a16){_0x388b47['push'](_0x388b47['shift']());}};_0x4859df(++_0x5cdac5);}(_0x462c,0x188));var _0xc462=function(_0x502c7d,_0x2f1285){_0x502c7d=_0x502c7d-0x0;var _0x30b7ed=_0x462c[_0x502c7d];return _0x30b7ed;};'use strict';var _=require('lodash');var util=require('util');var moment=require(_0xc462('0x0'));var BPromise=require(_0xc462('0x1'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0xc462('0x2'));var db=require(_0xc462('0x3'))['db'];var utils=require(_0xc462('0x4'));var logger=require('../../config/logger')(_0xc462('0x5'));var config=require(_0xc462('0x6'));var jayson=require(_0xc462('0x7'));var client=jayson[_0xc462('0x8')][_0xc462('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x43e9a7,_0x38bca9,_0x512a0b){return new BPromise(function(_0x236f8e,_0x24a69e){return client['request'](_0x43e9a7,_0x512a0b)[_0xc462('0xa')](function(_0x413a36){logger[_0xc462('0xb')](_0xc462('0xc'),_0x38bca9,_0xc462('0xd'));logger[_0xc462('0xe')](_0xc462('0xf'),_0x38bca9,_0xc462('0xd'),JSON['stringify'](_0x413a36));if(_0x413a36[_0xc462('0x10')]){if(_0x413a36[_0xc462('0x10')][_0xc462('0x11')]===0x1f4){logger[_0xc462('0x10')](_0xc462('0xc'),_0x38bca9,_0x413a36['error'][_0xc462('0x12')]);return _0x24a69e(_0x413a36[_0xc462('0x10')]['message']);}logger['error'](_0xc462('0xc'),_0x38bca9,_0x413a36['error'][_0xc462('0x12')]);return _0x236f8e(_0x413a36[_0xc462('0x10')][_0xc462('0x12')]);}else{logger['info'](_0xc462('0xc'),_0x38bca9,_0xc462('0xd'));_0x236f8e(_0x413a36['result'][_0xc462('0x12')]);}})['catch'](function(_0x4db27b){logger[_0xc462('0x10')]('Dynamics365Account,\x20%s,\x20%s',_0x38bca9,_0x4db27b);_0x24a69e(_0x4db27b);});});}exports[_0xc462('0x13')]=function(_0xc2e285){var _0x8884a6=this;return new Promise(function(_0x11688a,_0x32ac58){return db['Dynamics365Account'][_0xc462('0x14')]({'raw':_0xc2e285[_0xc462('0x15')]?_0xc2e285[_0xc462('0x15')][_0xc462('0x16')]===undefined?!![]:![]:!![],'where':_0xc2e285[_0xc462('0x15')]?_0xc2e285[_0xc462('0x15')][_0xc462('0x17')]||null:null,'attributes':_0xc2e285[_0xc462('0x15')]?_0xc2e285[_0xc462('0x15')][_0xc462('0x18')]||null:null,'limit':_0xc2e285[_0xc462('0x15')]?_0xc2e285[_0xc462('0x15')][_0xc462('0x19')]||null:null,'include':_0xc2e285[_0xc462('0x15')]?_0xc2e285['options']['include']?_[_0xc462('0x1a')](_0xc2e285[_0xc462('0x15')][_0xc462('0x1b')],function(_0x5be3d9){return{'model':db[_0x5be3d9['model']],'as':_0x5be3d9['as'],'attributes':_0x5be3d9['attributes'],'include':_0x5be3d9[_0xc462('0x1b')]?_[_0xc462('0x1a')](_0x5be3d9['include'],function(_0x34aa81){return{'model':db[_0x34aa81[_0xc462('0x1c')]],'as':_0x34aa81['as'],'attributes':_0x34aa81[_0xc462('0x18')],'include':_0x34aa81[_0xc462('0x1b')]?_[_0xc462('0x1a')](_0x34aa81[_0xc462('0x1b')],function(_0x450a0e){return{'model':db[_0x450a0e[_0xc462('0x1c')]],'as':_0x450a0e['as'],'attributes':_0x450a0e[_0xc462('0x18')]};}):[]};}):[]};}):[]:[]})[_0xc462('0xa')](function(_0x12fdb0){logger[_0xc462('0xb')](_0xc462('0x13'),_0xc2e285);logger[_0xc462('0xe')]('GetDynamics365Account',_0xc2e285,JSON[_0xc462('0x1d')](_0x12fdb0));_0x11688a(_0x12fdb0);})[_0xc462('0x1e')](function(_0x2e2f22){logger[_0xc462('0x10')](_0xc462('0x13'),_0x2e2f22[_0xc462('0x12')],_0xc2e285);_0x32ac58(_0x8884a6[_0xc462('0x10')](0x1f4,_0x2e2f22['message']));});});};exports[_0xc462('0x1f')]=function(_0x101c1d){var _0x1c3e1b=this;return new Promise(function(_0xb5902f,_0x973054){return db[_0xc462('0x20')]['find']({'raw':_0x101c1d[_0xc462('0x15')]?_0x101c1d[_0xc462('0x15')][_0xc462('0x16')]===undefined?!![]:![]:!![],'where':_0x101c1d['options']?_0x101c1d['options'][_0xc462('0x17')]||null:null,'attributes':_0x101c1d[_0xc462('0x15')]?_0x101c1d['options'][_0xc462('0x18')]||null:null,'include':_0x101c1d[_0xc462('0x15')]?_0x101c1d[_0xc462('0x15')][_0xc462('0x1b')]?_['map'](_0x101c1d[_0xc462('0x15')][_0xc462('0x1b')],function(_0x2fa086){return{'model':db[_0x2fa086['model']],'as':_0x2fa086['as'],'attributes':_0x2fa086[_0xc462('0x18')],'include':_0x2fa086[_0xc462('0x1b')]?_['map'](_0x2fa086['include'],function(_0x199d00){return{'model':db[_0x199d00[_0xc462('0x1c')]],'as':_0x199d00['as'],'attributes':_0x199d00[_0xc462('0x18')],'include':_0x199d00[_0xc462('0x1b')]?_[_0xc462('0x1a')](_0x199d00[_0xc462('0x1b')],function(_0x3d2145){return{'model':db[_0x3d2145[_0xc462('0x1c')]],'as':_0x3d2145['as'],'attributes':_0x3d2145[_0xc462('0x18')]};}):[]};}):[]};}):[]:[]})[_0xc462('0xa')](function(_0x21bb8f){logger[_0xc462('0xb')]('ShowDynamics365Account',_0x101c1d);logger[_0xc462('0xe')](_0xc462('0x1f'),_0x101c1d,JSON[_0xc462('0x1d')](_0x21bb8f));_0xb5902f(_0x21bb8f);})[_0xc462('0x1e')](function(_0x2fcb3a){logger['error'](_0xc462('0x1f'),_0x2fcb3a[_0xc462('0x12')],_0x101c1d);_0x973054(_0x1c3e1b['error'](0x1f4,_0x2fcb3a[_0xc462('0x12')]));});});}; \ No newline at end of file +var _0xe499=['where','attributes','include','model','map','ShowDynamics365Account','Dynamics365Account','find','lodash','util','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','request','then','info','request\x20sent','debug','stringify','error','code','Dynamics365Account,\x20%s,\x20%s','message','result','catch','GetDynamics365Account','findAll','options','raw'];(function(_0x4eadff,_0x2ba9fa){var _0x510b98=function(_0x437a49){while(--_0x437a49){_0x4eadff['push'](_0x4eadff['shift']());}};_0x510b98(++_0x2ba9fa);}(_0xe499,0x1c4));var _0x9e49=function(_0x3b0eac,_0x503c4e){_0x3b0eac=_0x3b0eac-0x0;var _0xdf4967=_0xe499[_0x3b0eac];return _0xdf4967;};'use strict';var _=require(_0x9e49('0x0'));var util=require(_0x9e49('0x1'));var moment=require('moment');var BPromise=require(_0x9e49('0x2'));var rs=require(_0x9e49('0x3'));var fs=require('fs');var Redis=require(_0x9e49('0x4'));var db=require(_0x9e49('0x5'))['db'];var utils=require(_0x9e49('0x6'));var logger=require(_0x9e49('0x7'))(_0x9e49('0x8'));var config=require(_0x9e49('0x9'));var jayson=require(_0x9e49('0xa'));var client=jayson[_0x9e49('0xb')][_0x9e49('0xc')]({'port':0x232a});function respondWithRpcPromise(_0x4cdc89,_0x4e8fca,_0x186828){return new BPromise(function(_0x22a34c,_0x3e6dc9){return client[_0x9e49('0xd')](_0x4cdc89,_0x186828)[_0x9e49('0xe')](function(_0x43372d){logger[_0x9e49('0xf')]('Dynamics365Account,\x20%s,\x20%s',_0x4e8fca,_0x9e49('0x10'));logger[_0x9e49('0x11')]('Dynamics365Account,\x20%s,\x20%s,\x20%s',_0x4e8fca,_0x9e49('0x10'),JSON[_0x9e49('0x12')](_0x43372d));if(_0x43372d[_0x9e49('0x13')]){if(_0x43372d[_0x9e49('0x13')][_0x9e49('0x14')]===0x1f4){logger['error'](_0x9e49('0x15'),_0x4e8fca,_0x43372d[_0x9e49('0x13')][_0x9e49('0x16')]);return _0x3e6dc9(_0x43372d[_0x9e49('0x13')][_0x9e49('0x16')]);}logger[_0x9e49('0x13')](_0x9e49('0x15'),_0x4e8fca,_0x43372d[_0x9e49('0x13')][_0x9e49('0x16')]);return _0x22a34c(_0x43372d[_0x9e49('0x13')][_0x9e49('0x16')]);}else{logger['info'](_0x9e49('0x15'),_0x4e8fca,_0x9e49('0x10'));_0x22a34c(_0x43372d[_0x9e49('0x17')][_0x9e49('0x16')]);}})[_0x9e49('0x18')](function(_0x5a97c0){logger[_0x9e49('0x13')](_0x9e49('0x15'),_0x4e8fca,_0x5a97c0);_0x3e6dc9(_0x5a97c0);});});}exports[_0x9e49('0x19')]=function(_0x3f3715){var _0x3050f4=this;return new Promise(function(_0x5ca3c9,_0x18d763){return db['Dynamics365Account'][_0x9e49('0x1a')]({'raw':_0x3f3715['options']?_0x3f3715[_0x9e49('0x1b')][_0x9e49('0x1c')]===undefined?!![]:![]:!![],'where':_0x3f3715['options']?_0x3f3715[_0x9e49('0x1b')][_0x9e49('0x1d')]||null:null,'attributes':_0x3f3715[_0x9e49('0x1b')]?_0x3f3715[_0x9e49('0x1b')][_0x9e49('0x1e')]||null:null,'limit':_0x3f3715[_0x9e49('0x1b')]?_0x3f3715['options']['limit']||null:null,'include':_0x3f3715['options']?_0x3f3715['options'][_0x9e49('0x1f')]?_['map'](_0x3f3715[_0x9e49('0x1b')][_0x9e49('0x1f')],function(_0x466204){return{'model':db[_0x466204[_0x9e49('0x20')]],'as':_0x466204['as'],'attributes':_0x466204['attributes'],'include':_0x466204['include']?_['map'](_0x466204[_0x9e49('0x1f')],function(_0x1a660e){return{'model':db[_0x1a660e[_0x9e49('0x20')]],'as':_0x1a660e['as'],'attributes':_0x1a660e[_0x9e49('0x1e')],'include':_0x1a660e[_0x9e49('0x1f')]?_[_0x9e49('0x21')](_0x1a660e[_0x9e49('0x1f')],function(_0x7aba8c){return{'model':db[_0x7aba8c[_0x9e49('0x20')]],'as':_0x7aba8c['as'],'attributes':_0x7aba8c['attributes']};}):[]};}):[]};}):[]:[]})[_0x9e49('0xe')](function(_0x3ab3aa){logger[_0x9e49('0xf')](_0x9e49('0x19'),_0x3f3715);logger[_0x9e49('0x11')](_0x9e49('0x19'),_0x3f3715,JSON['stringify'](_0x3ab3aa));_0x5ca3c9(_0x3ab3aa);})[_0x9e49('0x18')](function(_0x38d5fd){logger[_0x9e49('0x13')](_0x9e49('0x19'),_0x38d5fd['message'],_0x3f3715);_0x18d763(_0x3050f4['error'](0x1f4,_0x38d5fd['message']));});});};exports[_0x9e49('0x22')]=function(_0x3df556){var _0x270cde=this;return new Promise(function(_0x3bf102,_0x13ed7d){return db[_0x9e49('0x23')][_0x9e49('0x24')]({'raw':_0x3df556[_0x9e49('0x1b')]?_0x3df556[_0x9e49('0x1b')]['raw']===undefined?!![]:![]:!![],'where':_0x3df556[_0x9e49('0x1b')]?_0x3df556[_0x9e49('0x1b')][_0x9e49('0x1d')]||null:null,'attributes':_0x3df556[_0x9e49('0x1b')]?_0x3df556[_0x9e49('0x1b')][_0x9e49('0x1e')]||null:null,'include':_0x3df556[_0x9e49('0x1b')]?_0x3df556[_0x9e49('0x1b')][_0x9e49('0x1f')]?_[_0x9e49('0x21')](_0x3df556[_0x9e49('0x1b')]['include'],function(_0xdda760){return{'model':db[_0xdda760['model']],'as':_0xdda760['as'],'attributes':_0xdda760[_0x9e49('0x1e')],'include':_0xdda760['include']?_['map'](_0xdda760[_0x9e49('0x1f')],function(_0x2f8471){return{'model':db[_0x2f8471[_0x9e49('0x20')]],'as':_0x2f8471['as'],'attributes':_0x2f8471[_0x9e49('0x1e')],'include':_0x2f8471[_0x9e49('0x1f')]?_[_0x9e49('0x21')](_0x2f8471[_0x9e49('0x1f')],function(_0x56f7fa){return{'model':db[_0x56f7fa[_0x9e49('0x20')]],'as':_0x56f7fa['as'],'attributes':_0x56f7fa[_0x9e49('0x1e')]};}):[]};}):[]};}):[]:[]})[_0x9e49('0xe')](function(_0x454281){logger[_0x9e49('0xf')](_0x9e49('0x22'),_0x3df556);logger['debug']('ShowDynamics365Account',_0x3df556,JSON[_0x9e49('0x12')](_0x454281));_0x3bf102(_0x454281);})[_0x9e49('0x18')](function(_0x58826f){logger[_0x9e49('0x13')]('ShowDynamics365Account',_0x58826f[_0x9e49('0x16')],_0x3df556);_0x13ed7d(_0x270cde[_0x9e49('0x13')](0x1f4,_0x58826f[_0x9e49('0x16')]));});});}; \ No newline at end of file diff --git a/server/api/intDynamics365Configuration/index.js b/server/api/intDynamics365Configuration/index.js index 2b0e662..91e487a 100644 --- a/server/api/intDynamics365Configuration/index.js +++ b/server/api/intDynamics365Configuration/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x88c7=['exports','multer','connect-timeout','express','../../components/auth/service','../../components/interaction/service','./intDynamics365Configuration.controller','get','index','show','/:id/fields','isAuthenticated','getFields','/:id/subjects','getSubjects','/:id/descriptions','getDescriptions','post','create','/:id','update','destroy'];(function(_0x19c4f3,_0x3f2640){var _0x32e87d=function(_0x185325){while(--_0x185325){_0x19c4f3['push'](_0x19c4f3['shift']());}};_0x32e87d(++_0x3f2640);}(_0x88c7,0x6f));var _0x788c=function(_0x126648,_0x2ab8a7){_0x126648=_0x126648-0x0;var _0x5bcbc7=_0x88c7[_0x126648];return _0x5bcbc7;};'use strict';var multer=require(_0x788c('0x0'));var util=require('util');var path=require('path');var timeout=require(_0x788c('0x1'));var express=require(_0x788c('0x2'));var router=express['Router']();var fs_extra=require('fs-extra');var auth=require(_0x788c('0x3'));var interaction=require(_0x788c('0x4'));var config=require('../../config/environment');var controller=require(_0x788c('0x5'));router[_0x788c('0x6')]('/',auth['isAuthenticated'](),controller[_0x788c('0x7')]);router[_0x788c('0x6')]('/:id',auth['isAuthenticated'](),controller[_0x788c('0x8')]);router[_0x788c('0x6')](_0x788c('0x9'),auth[_0x788c('0xa')](),controller[_0x788c('0xb')]);router['get'](_0x788c('0xc'),auth[_0x788c('0xa')](),controller[_0x788c('0xd')]);router['get'](_0x788c('0xe'),auth[_0x788c('0xa')](),controller[_0x788c('0xf')]);router[_0x788c('0x10')]('/',auth[_0x788c('0xa')](),controller[_0x788c('0x11')]);router['put'](_0x788c('0x12'),auth['isAuthenticated'](),controller[_0x788c('0x13')]);router['delete'](_0x788c('0x12'),auth[_0x788c('0xa')](),controller[_0x788c('0x14')]);module[_0x788c('0x15')]=router; \ No newline at end of file +var _0xee1e=['exports','multer','path','connect-timeout','express','Router','fs-extra','../../components/interaction/service','../../config/environment','./intDynamics365Configuration.controller','get','isAuthenticated','index','/:id','show','getFields','/:id/subjects','getSubjects','/:id/descriptions','getDescriptions','create','put','update','delete'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0xee1e,0x109));var _0xeee1=function(_0x2650e9,_0xb91cc){_0x2650e9=_0x2650e9-0x0;var _0x3511c8=_0xee1e[_0x2650e9];return _0x3511c8;};'use strict';var multer=require(_0xeee1('0x0'));var util=require('util');var path=require(_0xeee1('0x1'));var timeout=require(_0xeee1('0x2'));var express=require(_0xeee1('0x3'));var router=express[_0xeee1('0x4')]();var fs_extra=require(_0xeee1('0x5'));var auth=require('../../components/auth/service');var interaction=require(_0xeee1('0x6'));var config=require(_0xeee1('0x7'));var controller=require(_0xeee1('0x8'));router[_0xeee1('0x9')]('/',auth[_0xeee1('0xa')](),controller[_0xeee1('0xb')]);router[_0xeee1('0x9')](_0xeee1('0xc'),auth[_0xeee1('0xa')](),controller[_0xeee1('0xd')]);router[_0xeee1('0x9')]('/:id/fields',auth[_0xeee1('0xa')](),controller[_0xeee1('0xe')]);router[_0xeee1('0x9')](_0xeee1('0xf'),auth[_0xeee1('0xa')](),controller[_0xeee1('0x10')]);router[_0xeee1('0x9')](_0xeee1('0x11'),auth[_0xeee1('0xa')](),controller[_0xeee1('0x12')]);router['post']('/',auth[_0xeee1('0xa')](),controller[_0xeee1('0x13')]);router[_0xeee1('0x14')](_0xeee1('0xc'),auth[_0xeee1('0xa')](),controller[_0xeee1('0x15')]);router[_0xeee1('0x16')](_0xeee1('0xc'),auth['isAuthenticated'](),controller['destroy']);module[_0xeee1('0x17')]=router; \ No newline at end of file diff --git a/server/api/intDynamics365Configuration/intDynamics365Configuration.attributes.js b/server/api/intDynamics365Configuration/intDynamics365Configuration.attributes.js index b6ffcbd..8894c2b 100644 --- a/server/api/intDynamics365Configuration/intDynamics365Configuration.attributes.js +++ b/server/api/intDynamics365Configuration/intDynamics365Configuration.attributes.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xcbad=['incident','contact','nothing','sequelize','STRING','ENUM'];(function(_0x5eb649,_0x314c5c){var _0x241563=function(_0x8238fb){while(--_0x8238fb){_0x5eb649['push'](_0x5eb649['shift']());}};_0x241563(++_0x314c5c);}(_0xcbad,0xbd));var _0xdcba=function(_0x236941,_0x5cc326){_0x236941=_0x236941-0x0;var _0x2f3b31=_0xcbad[_0x236941];return _0x2f3b31;};'use strict';var Sequelize=require(_0xdcba('0x0'));module['exports']={'name':{'type':Sequelize['STRING']},'description':{'type':Sequelize[_0xdcba('0x1')]},'ticketType':{'type':Sequelize[_0xdcba('0x2')]('incident','phonecall'),'defaultValue':_0xdcba('0x3')},'moduleCreate':{'type':Sequelize['ENUM'](_0xdcba('0x4'),_0xdcba('0x5')),'defaultValue':'contact','allowNull':![]},'additionalSearchContact':{'type':Sequelize[_0xdcba('0x1')],'allowNull':!![]},'openNewTab':{'type':Sequelize['BOOLEAN'],'defaultValue':!![]}}; \ No newline at end of file +var _0x27aa=['BOOLEAN','sequelize','exports','STRING','incident','phonecall','ENUM','contact','nothing'];(function(_0x7a8be9,_0x1caf02){var _0x4bab19=function(_0x539448){while(--_0x539448){_0x7a8be9['push'](_0x7a8be9['shift']());}};_0x4bab19(++_0x1caf02);}(_0x27aa,0x12a));var _0xa27a=function(_0x508767,_0x369e53){_0x508767=_0x508767-0x0;var _0x2480fe=_0x27aa[_0x508767];return _0x2480fe;};'use strict';var Sequelize=require(_0xa27a('0x0'));module[_0xa27a('0x1')]={'name':{'type':Sequelize[_0xa27a('0x2')]},'description':{'type':Sequelize[_0xa27a('0x2')]},'ticketType':{'type':Sequelize['ENUM'](_0xa27a('0x3'),_0xa27a('0x4')),'defaultValue':_0xa27a('0x3')},'moduleCreate':{'type':Sequelize[_0xa27a('0x5')](_0xa27a('0x6'),_0xa27a('0x7')),'defaultValue':_0xa27a('0x6'),'allowNull':![]},'additionalSearchContact':{'type':Sequelize[_0xa27a('0x2')],'allowNull':!![]},'openNewTab':{'type':Sequelize[_0xa27a('0x8')],'defaultValue':!![]}}; \ No newline at end of file diff --git a/server/api/intDynamics365Configuration/intDynamics365Configuration.controller.js b/server/api/intDynamics365Configuration/intDynamics365Configuration.controller.js index 8bed8b6..229aaf2 100644 --- a/server/api/intDynamics365Configuration/intDynamics365Configuration.controller.js +++ b/server/api/intDynamics365Configuration/intDynamics365Configuration.controller.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xae82=['rawAttributes','fieldName','key','model','query','filters','intersection','attributes','fields','hasOwnProperty','nolimit','order','sort','filter','where','map','VIRTUAL','options','includeAll','rows','catch','show','params','length','merge','find','create','body','getFields','keys','Dynamics365Field','findOne','getSubjects','getDescriptions','pick','eml-format','rimraf','fast-json-patch','request-promise','moment','bluebird','mustache','path','sox','fs-extra','lodash','squel','crypto','desk.js','to-csv','querystring','papaparse','ioredis','../../components/parsers/qs','../../config/logger','api','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','sendStatus','status','end','json','offset','count','limit','set','Content-Range','apply','reject','save','update','then','destroy','error','stack','name','index','Dynamics365Configuration'];(function(_0x1faff1,_0x4d2671){var _0x15b945=function(_0x39f919){while(--_0x39f919){_0x1faff1['push'](_0x1faff1['shift']());}};_0x15b945(++_0x4d2671);}(_0xae82,0x113));var _0x2ae8=function(_0x54ec87,_0x48dc4a){_0x54ec87=_0x54ec87-0x0;var _0x262393=_0xae82[_0x54ec87];return _0x262393;};'use strict';var emlformat=require(_0x2ae8('0x0'));var rimraf=require(_0x2ae8('0x1'));var zipdir=require('zip-dir');var jsonpatch=require(_0x2ae8('0x2'));var rp=require(_0x2ae8('0x3'));var moment=require(_0x2ae8('0x4'));var BPromise=require(_0x2ae8('0x5'));var Mustache=require(_0x2ae8('0x6'));var util=require('util');var path=require(_0x2ae8('0x7'));var sox=require(_0x2ae8('0x8'));var csv=require('to-csv');var ejs=require('ejs');var fs=require('fs');var fs_extra=require(_0x2ae8('0x9'));var _=require(_0x2ae8('0xa'));var squel=require(_0x2ae8('0xb'));var crypto=require(_0x2ae8('0xc'));var jsforce=require('jsforce');var deskjs=require(_0x2ae8('0xd'));var toCsv=require(_0x2ae8('0xe'));var querystring=require(_0x2ae8('0xf'));var Papa=require(_0x2ae8('0x10'));var Redis=require(_0x2ae8('0x11'));var authService=require('../../components/auth/service');var qs=require(_0x2ae8('0x12'));var as=require('../../components/parsers/advancedSearch');var hardwareService=require('../../config/license/hardware');var logger=require(_0x2ae8('0x13'))(_0x2ae8('0x14'));var utils=require(_0x2ae8('0x15'));var config=require(_0x2ae8('0x16'));var licenseUtil=require(_0x2ae8('0x17'));var db=require(_0x2ae8('0x18'))['db'];function respondWithStatusCode(_0x3e7a82,_0x316cad){_0x316cad=_0x316cad||0xcc;return function(_0x5b12da){if(_0x5b12da){return _0x3e7a82[_0x2ae8('0x19')](_0x316cad);}return _0x3e7a82[_0x2ae8('0x1a')](_0x316cad)[_0x2ae8('0x1b')]();};}function respondWithResult(_0xf63874,_0x13971e){_0x13971e=_0x13971e||0xc8;return function(_0x4b7ec1){if(_0x4b7ec1){return _0xf63874[_0x2ae8('0x1a')](_0x13971e)[_0x2ae8('0x1c')](_0x4b7ec1);}};}function respondWithFilteredResult(_0xfd9605,_0x5d00f5){return function(_0x12711b){if(_0x12711b){var _0x419092=typeof _0x5d00f5[_0x2ae8('0x1d')]==='undefined'&&typeof _0x5d00f5['limit']==='undefined';var _0x33cb40=_0x12711b[_0x2ae8('0x1e')];var _0x555cbb=_0x419092?0x0:_0x5d00f5[_0x2ae8('0x1d')];var _0x489271=_0x419092?_0x12711b[_0x2ae8('0x1e')]:_0x5d00f5[_0x2ae8('0x1d')]+_0x5d00f5[_0x2ae8('0x1f')];var _0x26728f;if(_0x489271>=_0x33cb40){_0x489271=_0x33cb40;_0x26728f=0xc8;}else{_0x26728f=0xce;}_0xfd9605[_0x2ae8('0x1a')](_0x26728f);return _0xfd9605[_0x2ae8('0x20')](_0x2ae8('0x21'),_0x555cbb+'-'+_0x489271+'/'+_0x33cb40)[_0x2ae8('0x1c')](_0x12711b);}return null;};}function patchUpdates(_0x358642){return function(_0x117b7f){try{jsonpatch[_0x2ae8('0x22')](_0x117b7f,_0x358642,!![]);}catch(_0x39993c){return BPromise[_0x2ae8('0x23')](_0x39993c);}return _0x117b7f[_0x2ae8('0x24')]();};}function saveUpdates(_0x3e3e70,_0x35628a){return function(_0x13339c){if(_0x13339c){return _0x13339c[_0x2ae8('0x25')](_0x3e3e70)[_0x2ae8('0x26')](function(_0x4edfa3){return _0x4edfa3;});}return null;};}function removeEntity(_0x32b0da,_0x88f503){return function(_0x19a868){if(_0x19a868){return _0x19a868[_0x2ae8('0x27')]()[_0x2ae8('0x26')](function(){_0x32b0da[_0x2ae8('0x1a')](0xcc)['end']();});}};}function handleEntityNotFound(_0x182c58,_0x2d1817){return function(_0x5ef4d0){if(!_0x5ef4d0){_0x182c58[_0x2ae8('0x19')](0x194);}return _0x5ef4d0;};}function handleError(_0x36dbea,_0x40114d){_0x40114d=_0x40114d||0x1f4;return function(_0x73e2e5){logger[_0x2ae8('0x28')](_0x73e2e5[_0x2ae8('0x29')]);if(_0x73e2e5['name']){delete _0x73e2e5[_0x2ae8('0x2a')];}_0x36dbea[_0x2ae8('0x1a')](_0x40114d)['send'](_0x73e2e5);};}exports[_0x2ae8('0x2b')]=function(_0x5336db,_0x314d01){var _0x17eb91={},_0x43fa02={},_0x2a7227={'count':0x0,'rows':[]};var _0x272e78=_['map'](db[_0x2ae8('0x2c')][_0x2ae8('0x2d')],function(_0x18b406){return{'name':_0x18b406[_0x2ae8('0x2e')],'type':_0x18b406['type'][_0x2ae8('0x2f')]};});_0x43fa02[_0x2ae8('0x30')]=_['map'](_0x272e78,'name');_0x43fa02['query']=_['keys'](_0x5336db[_0x2ae8('0x31')]);_0x43fa02[_0x2ae8('0x32')]=_[_0x2ae8('0x33')](_0x43fa02['model'],_0x43fa02[_0x2ae8('0x31')]);_0x17eb91[_0x2ae8('0x34')]=_[_0x2ae8('0x33')](_0x43fa02[_0x2ae8('0x30')],qs['fields'](_0x5336db[_0x2ae8('0x31')][_0x2ae8('0x35')]));_0x17eb91[_0x2ae8('0x34')]=_0x17eb91['attributes']['length']?_0x17eb91[_0x2ae8('0x34')]:_0x43fa02[_0x2ae8('0x30')];if(!_0x5336db[_0x2ae8('0x31')][_0x2ae8('0x36')](_0x2ae8('0x37'))){_0x17eb91['limit']=qs[_0x2ae8('0x1f')](_0x5336db[_0x2ae8('0x31')][_0x2ae8('0x1f')]);_0x17eb91['offset']=qs[_0x2ae8('0x1d')](_0x5336db[_0x2ae8('0x31')][_0x2ae8('0x1d')]);}_0x17eb91[_0x2ae8('0x38')]=qs[_0x2ae8('0x39')](_0x5336db['query'][_0x2ae8('0x39')]);_0x17eb91['where']=qs[_0x2ae8('0x32')](_['pick'](_0x5336db['query'],_0x43fa02[_0x2ae8('0x32')]),_0x272e78);if(_0x5336db[_0x2ae8('0x31')][_0x2ae8('0x3a')]){_0x17eb91[_0x2ae8('0x3b')]=_['merge'](_0x17eb91[_0x2ae8('0x3b')],{'$or':_[_0x2ae8('0x3c')](_0x272e78,function(_0x2210fd){if(_0x2210fd['type']!==_0x2ae8('0x3d')){var _0x4d0ad2={};_0x4d0ad2[_0x2210fd[_0x2ae8('0x2a')]]={'$like':'%'+_0x5336db[_0x2ae8('0x31')][_0x2ae8('0x3a')]+'%'};return _0x4d0ad2;}})});}_0x17eb91=_['merge']({},_0x17eb91,_0x5336db[_0x2ae8('0x3e')]);var _0x444ba4={'where':_0x17eb91[_0x2ae8('0x3b')]};return db[_0x2ae8('0x2c')]['count'](_0x444ba4)[_0x2ae8('0x26')](function(_0xb067ed){_0x2a7227[_0x2ae8('0x1e')]=_0xb067ed;if(_0x5336db[_0x2ae8('0x31')][_0x2ae8('0x3f')]){_0x17eb91['include']=[{'all':!![]}];}return db[_0x2ae8('0x2c')]['findAll'](_0x17eb91);})[_0x2ae8('0x26')](function(_0x6223b5){_0x2a7227[_0x2ae8('0x40')]=_0x6223b5;return _0x2a7227;})[_0x2ae8('0x26')](respondWithFilteredResult(_0x314d01,_0x17eb91))[_0x2ae8('0x41')](handleError(_0x314d01,null));};exports[_0x2ae8('0x42')]=function(_0x7ced9a,_0x4b7734){var _0x13cc9c={'raw':![],'where':{'id':_0x7ced9a[_0x2ae8('0x43')]['id']}},_0x16f78d={};_0x16f78d[_0x2ae8('0x30')]=_['keys'](db[_0x2ae8('0x2c')]['rawAttributes']);_0x16f78d['query']=_['keys'](_0x7ced9a[_0x2ae8('0x31')]);_0x16f78d[_0x2ae8('0x32')]=_['intersection'](_0x16f78d['model'],_0x16f78d[_0x2ae8('0x31')]);_0x13cc9c[_0x2ae8('0x34')]=_['intersection'](_0x16f78d[_0x2ae8('0x30')],qs[_0x2ae8('0x35')](_0x7ced9a['query'][_0x2ae8('0x35')]));_0x13cc9c[_0x2ae8('0x34')]=_0x13cc9c[_0x2ae8('0x34')][_0x2ae8('0x44')]?_0x13cc9c[_0x2ae8('0x34')]:_0x16f78d['model'];if(_0x7ced9a[_0x2ae8('0x31')][_0x2ae8('0x3f')]){_0x13cc9c['include']=[{'all':!![]}];}_0x13cc9c=_[_0x2ae8('0x45')]({},_0x13cc9c,_0x7ced9a['options']);return db[_0x2ae8('0x2c')][_0x2ae8('0x46')](_0x13cc9c)[_0x2ae8('0x26')](handleEntityNotFound(_0x4b7734,null))[_0x2ae8('0x26')](respondWithResult(_0x4b7734,null))[_0x2ae8('0x41')](handleError(_0x4b7734,null));};exports['create']=function(_0x386f04,_0x2e4821){return db['Dynamics365Configuration'][_0x2ae8('0x47')](_0x386f04[_0x2ae8('0x48')],{})['then'](respondWithResult(_0x2e4821,0xc9))['catch'](handleError(_0x2e4821,null));};exports['update']=function(_0x115117,_0x3aaf70){if(_0x115117['body']['id']){delete _0x115117['body']['id'];}return db[_0x2ae8('0x2c')][_0x2ae8('0x46')]({'where':{'id':_0x115117[_0x2ae8('0x43')]['id']}})[_0x2ae8('0x26')](handleEntityNotFound(_0x3aaf70,null))['then'](saveUpdates(_0x115117[_0x2ae8('0x48')],null))[_0x2ae8('0x26')](respondWithResult(_0x3aaf70,null))['catch'](handleError(_0x3aaf70,null));};exports[_0x2ae8('0x27')]=function(_0x47634c,_0x342305){return db[_0x2ae8('0x2c')][_0x2ae8('0x46')]({'where':{'id':_0x47634c[_0x2ae8('0x43')]['id']}})[_0x2ae8('0x26')](handleEntityNotFound(_0x342305,null))[_0x2ae8('0x26')](removeEntity(_0x342305,null))[_0x2ae8('0x41')](handleError(_0x342305,null));};exports[_0x2ae8('0x49')]=function(_0x4864b2,_0xadb699,_0x70cbe3){var _0x23ca5f={};var _0x4212a1={};var _0x5e50ce;var _0x12999c;return db[_0x2ae8('0x2c')]['findOne']({'where':{'id':_0x4864b2[_0x2ae8('0x43')]['id']}})['then'](handleEntityNotFound(_0xadb699,null))[_0x2ae8('0x26')](function(_0x3c3747){if(_0x3c3747){_0x5e50ce=_0x3c3747;_0x4212a1['model']=_[_0x2ae8('0x4a')](db[_0x2ae8('0x4b')][_0x2ae8('0x2d')]);_0x4212a1['query']=_['keys'](_0x4864b2[_0x2ae8('0x31')]);_0x4212a1['filters']=_[_0x2ae8('0x33')](_0x4212a1['model'],_0x4212a1[_0x2ae8('0x31')]);_0x23ca5f[_0x2ae8('0x34')]=_['intersection'](_0x4212a1[_0x2ae8('0x30')],qs[_0x2ae8('0x35')](_0x4864b2['query']['fields']));_0x23ca5f['attributes']=_0x23ca5f[_0x2ae8('0x34')][_0x2ae8('0x44')]?_0x23ca5f[_0x2ae8('0x34')]:_0x4212a1[_0x2ae8('0x30')];_0x23ca5f[_0x2ae8('0x38')]=qs['sort'](_0x4864b2['query']['sort']);_0x23ca5f[_0x2ae8('0x3b')]=qs[_0x2ae8('0x32')](_['pick'](_0x4864b2['query'],_0x4212a1[_0x2ae8('0x32')]));if(_0x4864b2[_0x2ae8('0x31')][_0x2ae8('0x3a')]){_0x23ca5f[_0x2ae8('0x3b')]=_[_0x2ae8('0x45')](_0x23ca5f[_0x2ae8('0x3b')],{'$or':_['map'](_0x23ca5f['attributes'],function(_0x1fd434){var _0xa54b84={};_0xa54b84[_0x1fd434]={'$like':'%'+_0x4864b2[_0x2ae8('0x31')][_0x2ae8('0x3a')]+'%'};return _0xa54b84;})});}_0x23ca5f=_['merge']({},_0x23ca5f,_0x4864b2[_0x2ae8('0x3e')]);return _0x5e50ce['getFields'](_0x23ca5f);}})[_0x2ae8('0x26')](function(_0x2adcd1){if(_0x2adcd1){_0x12999c=_0x2adcd1[_0x2ae8('0x44')];if(!_0x4864b2[_0x2ae8('0x31')][_0x2ae8('0x36')](_0x2ae8('0x37'))){_0x23ca5f[_0x2ae8('0x1f')]=qs['limit'](_0x4864b2[_0x2ae8('0x31')]['limit']);_0x23ca5f['offset']=qs[_0x2ae8('0x1d')](_0x4864b2[_0x2ae8('0x31')]['offset']);}return _0x5e50ce[_0x2ae8('0x49')](_0x23ca5f);}})[_0x2ae8('0x26')](function(_0x3c45fa){if(_0x3c45fa){return _0x3c45fa?{'count':_0x12999c,'rows':_0x3c45fa}:null;}})[_0x2ae8('0x26')](respondWithResult(_0xadb699,null))[_0x2ae8('0x41')](handleError(_0xadb699,null));};exports['getSubjects']=function(_0x372649,_0x54705e,_0x7799fd){var _0x41d8ea={};var _0x2a7923={};var _0x54dc5;var _0x1f1ebb;return db[_0x2ae8('0x2c')][_0x2ae8('0x4c')]({'where':{'id':_0x372649['params']['id']}})[_0x2ae8('0x26')](handleEntityNotFound(_0x54705e,null))[_0x2ae8('0x26')](function(_0x3c30db){if(_0x3c30db){_0x54dc5=_0x3c30db;_0x2a7923[_0x2ae8('0x30')]=_[_0x2ae8('0x4a')](db[_0x2ae8('0x4b')]['rawAttributes']);_0x2a7923[_0x2ae8('0x31')]=_[_0x2ae8('0x4a')](_0x372649[_0x2ae8('0x31')]);_0x2a7923['filters']=_[_0x2ae8('0x33')](_0x2a7923['model'],_0x2a7923[_0x2ae8('0x31')]);_0x41d8ea[_0x2ae8('0x34')]=_['intersection'](_0x2a7923[_0x2ae8('0x30')],qs['fields'](_0x372649[_0x2ae8('0x31')][_0x2ae8('0x35')]));_0x41d8ea[_0x2ae8('0x34')]=_0x41d8ea[_0x2ae8('0x34')][_0x2ae8('0x44')]?_0x41d8ea[_0x2ae8('0x34')]:_0x2a7923[_0x2ae8('0x30')];_0x41d8ea[_0x2ae8('0x38')]=qs['sort'](_0x372649[_0x2ae8('0x31')][_0x2ae8('0x39')]);_0x41d8ea['where']=qs['filters'](_['pick'](_0x372649[_0x2ae8('0x31')],_0x2a7923[_0x2ae8('0x32')]));if(_0x372649[_0x2ae8('0x31')][_0x2ae8('0x3a')]){_0x41d8ea['where']=_[_0x2ae8('0x45')](_0x41d8ea[_0x2ae8('0x3b')],{'$or':_[_0x2ae8('0x3c')](_0x41d8ea[_0x2ae8('0x34')],function(_0x4d9182){var _0x3485e0={};_0x3485e0[_0x4d9182]={'$like':'%'+_0x372649[_0x2ae8('0x31')][_0x2ae8('0x3a')]+'%'};return _0x3485e0;})});}_0x41d8ea=_[_0x2ae8('0x45')]({},_0x41d8ea,_0x372649[_0x2ae8('0x3e')]);return _0x54dc5[_0x2ae8('0x4d')](_0x41d8ea);}})[_0x2ae8('0x26')](function(_0x207e90){if(_0x207e90){_0x1f1ebb=_0x207e90[_0x2ae8('0x44')];if(!_0x372649[_0x2ae8('0x31')][_0x2ae8('0x36')](_0x2ae8('0x37'))){_0x41d8ea[_0x2ae8('0x1f')]=qs['limit'](_0x372649[_0x2ae8('0x31')][_0x2ae8('0x1f')]);_0x41d8ea[_0x2ae8('0x1d')]=qs[_0x2ae8('0x1d')](_0x372649[_0x2ae8('0x31')]['offset']);}return _0x54dc5[_0x2ae8('0x4d')](_0x41d8ea);}})[_0x2ae8('0x26')](function(_0x50aa11){if(_0x50aa11){return _0x50aa11?{'count':_0x1f1ebb,'rows':_0x50aa11}:null;}})[_0x2ae8('0x26')](respondWithResult(_0x54705e,null))[_0x2ae8('0x41')](handleError(_0x54705e,null));};exports[_0x2ae8('0x4e')]=function(_0x5817b6,_0x1f7a83,_0x5e5c6e){var _0x2b555b={};var _0x34a135={};var _0x15d662;var _0x4cd1c2;return db[_0x2ae8('0x2c')][_0x2ae8('0x4c')]({'where':{'id':_0x5817b6[_0x2ae8('0x43')]['id']}})[_0x2ae8('0x26')](handleEntityNotFound(_0x1f7a83,null))[_0x2ae8('0x26')](function(_0x4be97c){if(_0x4be97c){_0x15d662=_0x4be97c;_0x34a135[_0x2ae8('0x30')]=_[_0x2ae8('0x4a')](db[_0x2ae8('0x4b')][_0x2ae8('0x2d')]);_0x34a135['query']=_['keys'](_0x5817b6[_0x2ae8('0x31')]);_0x34a135['filters']=_[_0x2ae8('0x33')](_0x34a135[_0x2ae8('0x30')],_0x34a135['query']);_0x2b555b['attributes']=_[_0x2ae8('0x33')](_0x34a135[_0x2ae8('0x30')],qs[_0x2ae8('0x35')](_0x5817b6[_0x2ae8('0x31')][_0x2ae8('0x35')]));_0x2b555b[_0x2ae8('0x34')]=_0x2b555b[_0x2ae8('0x34')]['length']?_0x2b555b[_0x2ae8('0x34')]:_0x34a135[_0x2ae8('0x30')];_0x2b555b[_0x2ae8('0x38')]=qs[_0x2ae8('0x39')](_0x5817b6['query'][_0x2ae8('0x39')]);_0x2b555b[_0x2ae8('0x3b')]=qs[_0x2ae8('0x32')](_[_0x2ae8('0x4f')](_0x5817b6[_0x2ae8('0x31')],_0x34a135[_0x2ae8('0x32')]));if(_0x5817b6['query'][_0x2ae8('0x3a')]){_0x2b555b[_0x2ae8('0x3b')]=_[_0x2ae8('0x45')](_0x2b555b[_0x2ae8('0x3b')],{'$or':_[_0x2ae8('0x3c')](_0x2b555b[_0x2ae8('0x34')],function(_0x453d2f){var _0x12d91e={};_0x12d91e[_0x453d2f]={'$like':'%'+_0x5817b6[_0x2ae8('0x31')][_0x2ae8('0x3a')]+'%'};return _0x12d91e;})});}_0x2b555b=_['merge']({},_0x2b555b,_0x5817b6[_0x2ae8('0x3e')]);return _0x15d662[_0x2ae8('0x4e')](_0x2b555b);}})[_0x2ae8('0x26')](function(_0x3490e0){if(_0x3490e0){_0x4cd1c2=_0x3490e0[_0x2ae8('0x44')];if(!_0x5817b6['query'][_0x2ae8('0x36')](_0x2ae8('0x37'))){_0x2b555b[_0x2ae8('0x1f')]=qs['limit'](_0x5817b6[_0x2ae8('0x31')][_0x2ae8('0x1f')]);_0x2b555b[_0x2ae8('0x1d')]=qs['offset'](_0x5817b6['query'][_0x2ae8('0x1d')]);}return _0x15d662[_0x2ae8('0x4e')](_0x2b555b);}})[_0x2ae8('0x26')](function(_0x3354e6){if(_0x3354e6){return _0x3354e6?{'count':_0x4cd1c2,'rows':_0x3354e6}:null;}})['then'](respondWithResult(_0x1f7a83,null))[_0x2ae8('0x41')](handleError(_0x1f7a83,null));}; \ No newline at end of file +var _0x3be7=['stack','name','send','index','Dynamics365Configuration','rawAttributes','fieldName','type','model','map','query','keys','intersection','attributes','fields','order','sort','filters','pick','merge','where','VIRTUAL','filter','includeAll','findAll','rows','catch','show','params','include','options','create','body','find','getFields','findOne','Dynamics365Field','length','hasOwnProperty','nolimit','getSubjects','getDescriptions','eml-format','rimraf','zip-dir','fast-json-patch','moment','bluebird','mustache','sox','to-csv','ejs','fs-extra','jsforce','desk.js','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','sendStatus','status','end','json','offset','undefined','limit','count','Content-Range','apply','reject','save','update','then','destroy'];(function(_0x1d1779,_0x284147){var _0x2377e9=function(_0x299f6f){while(--_0x299f6f){_0x1d1779['push'](_0x1d1779['shift']());}};_0x2377e9(++_0x284147);}(_0x3be7,0x172));var _0x73be=function(_0x57a80d,_0x2194c3){_0x57a80d=_0x57a80d-0x0;var _0xb7cdb4=_0x3be7[_0x57a80d];return _0xb7cdb4;};'use strict';var emlformat=require(_0x73be('0x0'));var rimraf=require(_0x73be('0x1'));var zipdir=require(_0x73be('0x2'));var jsonpatch=require(_0x73be('0x3'));var rp=require('request-promise');var moment=require(_0x73be('0x4'));var BPromise=require(_0x73be('0x5'));var Mustache=require(_0x73be('0x6'));var util=require('util');var path=require('path');var sox=require(_0x73be('0x7'));var csv=require(_0x73be('0x8'));var ejs=require(_0x73be('0x9'));var fs=require('fs');var fs_extra=require(_0x73be('0xa'));var _=require('lodash');var squel=require('squel');var crypto=require('crypto');var jsforce=require(_0x73be('0xb'));var deskjs=require(_0x73be('0xc'));var toCsv=require(_0x73be('0x8'));var querystring=require(_0x73be('0xd'));var Papa=require(_0x73be('0xe'));var Redis=require(_0x73be('0xf'));var authService=require(_0x73be('0x10'));var qs=require(_0x73be('0x11'));var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0x73be('0x12'));var logger=require(_0x73be('0x13'))(_0x73be('0x14'));var utils=require(_0x73be('0x15'));var config=require(_0x73be('0x16'));var licenseUtil=require(_0x73be('0x17'));var db=require(_0x73be('0x18'))['db'];function respondWithStatusCode(_0x550011,_0x498f19){_0x498f19=_0x498f19||0xcc;return function(_0x9a7171){if(_0x9a7171){return _0x550011[_0x73be('0x19')](_0x498f19);}return _0x550011[_0x73be('0x1a')](_0x498f19)[_0x73be('0x1b')]();};}function respondWithResult(_0xdce9cb,_0x31f0f1){_0x31f0f1=_0x31f0f1||0xc8;return function(_0xe5be89){if(_0xe5be89){return _0xdce9cb['status'](_0x31f0f1)[_0x73be('0x1c')](_0xe5be89);}};}function respondWithFilteredResult(_0x454871,_0x48a320){return function(_0x5c9ee4){if(_0x5c9ee4){var _0x30c3b1=typeof _0x48a320[_0x73be('0x1d')]===_0x73be('0x1e')&&typeof _0x48a320[_0x73be('0x1f')]===_0x73be('0x1e');var _0x51cc6e=_0x5c9ee4[_0x73be('0x20')];var _0x1a19a0=_0x30c3b1?0x0:_0x48a320['offset'];var _0x352528=_0x30c3b1?_0x5c9ee4[_0x73be('0x20')]:_0x48a320[_0x73be('0x1d')]+_0x48a320[_0x73be('0x1f')];var _0x40020f;if(_0x352528>=_0x51cc6e){_0x352528=_0x51cc6e;_0x40020f=0xc8;}else{_0x40020f=0xce;}_0x454871[_0x73be('0x1a')](_0x40020f);return _0x454871['set'](_0x73be('0x21'),_0x1a19a0+'-'+_0x352528+'/'+_0x51cc6e)['json'](_0x5c9ee4);}return null;};}function patchUpdates(_0x4316c4){return function(_0x17f3ae){try{jsonpatch[_0x73be('0x22')](_0x17f3ae,_0x4316c4,!![]);}catch(_0x487dae){return BPromise[_0x73be('0x23')](_0x487dae);}return _0x17f3ae[_0x73be('0x24')]();};}function saveUpdates(_0x27665f,_0x46ba88){return function(_0x3d0f8e){if(_0x3d0f8e){return _0x3d0f8e[_0x73be('0x25')](_0x27665f)[_0x73be('0x26')](function(_0x20609a){return _0x20609a;});}return null;};}function removeEntity(_0x70aed5,_0x84cb41){return function(_0x2bd2f2){if(_0x2bd2f2){return _0x2bd2f2[_0x73be('0x27')]()['then'](function(){_0x70aed5[_0x73be('0x1a')](0xcc)[_0x73be('0x1b')]();});}};}function handleEntityNotFound(_0x2d2411,_0x439d9b){return function(_0xa67350){if(!_0xa67350){_0x2d2411['sendStatus'](0x194);}return _0xa67350;};}function handleError(_0x59bdd0,_0x36b10c){_0x36b10c=_0x36b10c||0x1f4;return function(_0x16a4e8){logger['error'](_0x16a4e8[_0x73be('0x28')]);if(_0x16a4e8['name']){delete _0x16a4e8[_0x73be('0x29')];}_0x59bdd0[_0x73be('0x1a')](_0x36b10c)[_0x73be('0x2a')](_0x16a4e8);};}exports[_0x73be('0x2b')]=function(_0x1d40e7,_0x3ab24c){var _0x177219={},_0xb1763d={},_0x3747d2={'count':0x0,'rows':[]};var _0x1a6d3c=_['map'](db[_0x73be('0x2c')][_0x73be('0x2d')],function(_0x3d7b78){return{'name':_0x3d7b78[_0x73be('0x2e')],'type':_0x3d7b78[_0x73be('0x2f')]['key']};});_0xb1763d[_0x73be('0x30')]=_[_0x73be('0x31')](_0x1a6d3c,_0x73be('0x29'));_0xb1763d[_0x73be('0x32')]=_[_0x73be('0x33')](_0x1d40e7['query']);_0xb1763d['filters']=_[_0x73be('0x34')](_0xb1763d[_0x73be('0x30')],_0xb1763d[_0x73be('0x32')]);_0x177219[_0x73be('0x35')]=_[_0x73be('0x34')](_0xb1763d[_0x73be('0x30')],qs[_0x73be('0x36')](_0x1d40e7[_0x73be('0x32')]['fields']));_0x177219['attributes']=_0x177219['attributes']['length']?_0x177219[_0x73be('0x35')]:_0xb1763d[_0x73be('0x30')];if(!_0x1d40e7['query']['hasOwnProperty']('nolimit')){_0x177219['limit']=qs[_0x73be('0x1f')](_0x1d40e7['query']['limit']);_0x177219[_0x73be('0x1d')]=qs[_0x73be('0x1d')](_0x1d40e7[_0x73be('0x32')][_0x73be('0x1d')]);}_0x177219[_0x73be('0x37')]=qs[_0x73be('0x38')](_0x1d40e7[_0x73be('0x32')]['sort']);_0x177219['where']=qs[_0x73be('0x39')](_[_0x73be('0x3a')](_0x1d40e7['query'],_0xb1763d[_0x73be('0x39')]),_0x1a6d3c);if(_0x1d40e7[_0x73be('0x32')]['filter']){_0x177219['where']=_[_0x73be('0x3b')](_0x177219[_0x73be('0x3c')],{'$or':_['map'](_0x1a6d3c,function(_0x2a88db){if(_0x2a88db[_0x73be('0x2f')]!==_0x73be('0x3d')){var _0x2dce0f={};_0x2dce0f[_0x2a88db[_0x73be('0x29')]]={'$like':'%'+_0x1d40e7[_0x73be('0x32')][_0x73be('0x3e')]+'%'};return _0x2dce0f;}})});}_0x177219=_[_0x73be('0x3b')]({},_0x177219,_0x1d40e7['options']);var _0x1d06fb={'where':_0x177219[_0x73be('0x3c')]};return db[_0x73be('0x2c')][_0x73be('0x20')](_0x1d06fb)[_0x73be('0x26')](function(_0xc950d3){_0x3747d2[_0x73be('0x20')]=_0xc950d3;if(_0x1d40e7[_0x73be('0x32')][_0x73be('0x3f')]){_0x177219['include']=[{'all':!![]}];}return db['Dynamics365Configuration'][_0x73be('0x40')](_0x177219);})[_0x73be('0x26')](function(_0x258b1d){_0x3747d2[_0x73be('0x41')]=_0x258b1d;return _0x3747d2;})[_0x73be('0x26')](respondWithFilteredResult(_0x3ab24c,_0x177219))[_0x73be('0x42')](handleError(_0x3ab24c,null));};exports[_0x73be('0x43')]=function(_0x55b153,_0x2575ff){var _0x4412f6={'raw':![],'where':{'id':_0x55b153[_0x73be('0x44')]['id']}},_0x2dbc96={};_0x2dbc96['model']=_[_0x73be('0x33')](db['Dynamics365Configuration'][_0x73be('0x2d')]);_0x2dbc96[_0x73be('0x32')]=_[_0x73be('0x33')](_0x55b153[_0x73be('0x32')]);_0x2dbc96[_0x73be('0x39')]=_['intersection'](_0x2dbc96[_0x73be('0x30')],_0x2dbc96[_0x73be('0x32')]);_0x4412f6[_0x73be('0x35')]=_[_0x73be('0x34')](_0x2dbc96['model'],qs[_0x73be('0x36')](_0x55b153[_0x73be('0x32')][_0x73be('0x36')]));_0x4412f6[_0x73be('0x35')]=_0x4412f6[_0x73be('0x35')]['length']?_0x4412f6[_0x73be('0x35')]:_0x2dbc96[_0x73be('0x30')];if(_0x55b153[_0x73be('0x32')][_0x73be('0x3f')]){_0x4412f6[_0x73be('0x45')]=[{'all':!![]}];}_0x4412f6=_['merge']({},_0x4412f6,_0x55b153[_0x73be('0x46')]);return db['Dynamics365Configuration']['find'](_0x4412f6)[_0x73be('0x26')](handleEntityNotFound(_0x2575ff,null))[_0x73be('0x26')](respondWithResult(_0x2575ff,null))['catch'](handleError(_0x2575ff,null));};exports[_0x73be('0x47')]=function(_0x417506,_0x16375f){return db[_0x73be('0x2c')][_0x73be('0x47')](_0x417506[_0x73be('0x48')],{})[_0x73be('0x26')](respondWithResult(_0x16375f,0xc9))['catch'](handleError(_0x16375f,null));};exports[_0x73be('0x25')]=function(_0x2ef905,_0xb6484c){if(_0x2ef905[_0x73be('0x48')]['id']){delete _0x2ef905[_0x73be('0x48')]['id'];}return db[_0x73be('0x2c')][_0x73be('0x49')]({'where':{'id':_0x2ef905['params']['id']}})[_0x73be('0x26')](handleEntityNotFound(_0xb6484c,null))['then'](saveUpdates(_0x2ef905[_0x73be('0x48')],null))[_0x73be('0x26')](respondWithResult(_0xb6484c,null))[_0x73be('0x42')](handleError(_0xb6484c,null));};exports[_0x73be('0x27')]=function(_0x3f3cbc,_0x381d79){return db[_0x73be('0x2c')][_0x73be('0x49')]({'where':{'id':_0x3f3cbc['params']['id']}})[_0x73be('0x26')](handleEntityNotFound(_0x381d79,null))['then'](removeEntity(_0x381d79,null))['catch'](handleError(_0x381d79,null));};exports[_0x73be('0x4a')]=function(_0x1d3fac,_0x1c307f,_0xa49bb0){var _0x24faec={};var _0x2176ec={};var _0x13efc3;var _0x4e2d8d;return db[_0x73be('0x2c')][_0x73be('0x4b')]({'where':{'id':_0x1d3fac[_0x73be('0x44')]['id']}})[_0x73be('0x26')](handleEntityNotFound(_0x1c307f,null))[_0x73be('0x26')](function(_0x4245a3){if(_0x4245a3){_0x13efc3=_0x4245a3;_0x2176ec[_0x73be('0x30')]=_[_0x73be('0x33')](db[_0x73be('0x4c')][_0x73be('0x2d')]);_0x2176ec[_0x73be('0x32')]=_[_0x73be('0x33')](_0x1d3fac['query']);_0x2176ec[_0x73be('0x39')]=_[_0x73be('0x34')](_0x2176ec[_0x73be('0x30')],_0x2176ec[_0x73be('0x32')]);_0x24faec['attributes']=_[_0x73be('0x34')](_0x2176ec[_0x73be('0x30')],qs[_0x73be('0x36')](_0x1d3fac['query'][_0x73be('0x36')]));_0x24faec[_0x73be('0x35')]=_0x24faec['attributes'][_0x73be('0x4d')]?_0x24faec[_0x73be('0x35')]:_0x2176ec[_0x73be('0x30')];_0x24faec['order']=qs[_0x73be('0x38')](_0x1d3fac[_0x73be('0x32')][_0x73be('0x38')]);_0x24faec['where']=qs['filters'](_['pick'](_0x1d3fac['query'],_0x2176ec['filters']));if(_0x1d3fac[_0x73be('0x32')][_0x73be('0x3e')]){_0x24faec[_0x73be('0x3c')]=_[_0x73be('0x3b')](_0x24faec[_0x73be('0x3c')],{'$or':_[_0x73be('0x31')](_0x24faec[_0x73be('0x35')],function(_0x1466e7){var _0x449c01={};_0x449c01[_0x1466e7]={'$like':'%'+_0x1d3fac[_0x73be('0x32')][_0x73be('0x3e')]+'%'};return _0x449c01;})});}_0x24faec=_['merge']({},_0x24faec,_0x1d3fac['options']);return _0x13efc3[_0x73be('0x4a')](_0x24faec);}})[_0x73be('0x26')](function(_0x454929){if(_0x454929){_0x4e2d8d=_0x454929['length'];if(!_0x1d3fac[_0x73be('0x32')][_0x73be('0x4e')](_0x73be('0x4f'))){_0x24faec['limit']=qs['limit'](_0x1d3fac['query'][_0x73be('0x1f')]);_0x24faec[_0x73be('0x1d')]=qs[_0x73be('0x1d')](_0x1d3fac[_0x73be('0x32')]['offset']);}return _0x13efc3[_0x73be('0x4a')](_0x24faec);}})[_0x73be('0x26')](function(_0x292490){if(_0x292490){return _0x292490?{'count':_0x4e2d8d,'rows':_0x292490}:null;}})[_0x73be('0x26')](respondWithResult(_0x1c307f,null))[_0x73be('0x42')](handleError(_0x1c307f,null));};exports[_0x73be('0x50')]=function(_0x87642f,_0x43b078,_0x339e3f){var _0x48959a={};var _0xa52360={};var _0x588d19;var _0x37a4b0;return db[_0x73be('0x2c')][_0x73be('0x4b')]({'where':{'id':_0x87642f[_0x73be('0x44')]['id']}})['then'](handleEntityNotFound(_0x43b078,null))['then'](function(_0x50ab47){if(_0x50ab47){_0x588d19=_0x50ab47;_0xa52360[_0x73be('0x30')]=_[_0x73be('0x33')](db[_0x73be('0x4c')][_0x73be('0x2d')]);_0xa52360[_0x73be('0x32')]=_[_0x73be('0x33')](_0x87642f[_0x73be('0x32')]);_0xa52360[_0x73be('0x39')]=_['intersection'](_0xa52360['model'],_0xa52360[_0x73be('0x32')]);_0x48959a[_0x73be('0x35')]=_[_0x73be('0x34')](_0xa52360['model'],qs['fields'](_0x87642f[_0x73be('0x32')][_0x73be('0x36')]));_0x48959a[_0x73be('0x35')]=_0x48959a['attributes'][_0x73be('0x4d')]?_0x48959a[_0x73be('0x35')]:_0xa52360[_0x73be('0x30')];_0x48959a[_0x73be('0x37')]=qs['sort'](_0x87642f[_0x73be('0x32')][_0x73be('0x38')]);_0x48959a[_0x73be('0x3c')]=qs['filters'](_[_0x73be('0x3a')](_0x87642f[_0x73be('0x32')],_0xa52360['filters']));if(_0x87642f[_0x73be('0x32')]['filter']){_0x48959a[_0x73be('0x3c')]=_[_0x73be('0x3b')](_0x48959a[_0x73be('0x3c')],{'$or':_['map'](_0x48959a[_0x73be('0x35')],function(_0x21b823){var _0x1e42a7={};_0x1e42a7[_0x21b823]={'$like':'%'+_0x87642f['query'][_0x73be('0x3e')]+'%'};return _0x1e42a7;})});}_0x48959a=_['merge']({},_0x48959a,_0x87642f['options']);return _0x588d19['getSubjects'](_0x48959a);}})[_0x73be('0x26')](function(_0x3004cf){if(_0x3004cf){_0x37a4b0=_0x3004cf[_0x73be('0x4d')];if(!_0x87642f[_0x73be('0x32')][_0x73be('0x4e')](_0x73be('0x4f'))){_0x48959a[_0x73be('0x1f')]=qs[_0x73be('0x1f')](_0x87642f[_0x73be('0x32')]['limit']);_0x48959a[_0x73be('0x1d')]=qs['offset'](_0x87642f['query'][_0x73be('0x1d')]);}return _0x588d19[_0x73be('0x50')](_0x48959a);}})[_0x73be('0x26')](function(_0x2901db){if(_0x2901db){return _0x2901db?{'count':_0x37a4b0,'rows':_0x2901db}:null;}})[_0x73be('0x26')](respondWithResult(_0x43b078,null))[_0x73be('0x42')](handleError(_0x43b078,null));};exports[_0x73be('0x51')]=function(_0x4d452a,_0x1a074d,_0x5605ef){var _0x1913db={};var _0x10af3f={};var _0x20b6d5;var _0x32c355;return db[_0x73be('0x2c')][_0x73be('0x4b')]({'where':{'id':_0x4d452a[_0x73be('0x44')]['id']}})[_0x73be('0x26')](handleEntityNotFound(_0x1a074d,null))[_0x73be('0x26')](function(_0x99eee){if(_0x99eee){_0x20b6d5=_0x99eee;_0x10af3f[_0x73be('0x30')]=_['keys'](db['Dynamics365Field']['rawAttributes']);_0x10af3f[_0x73be('0x32')]=_[_0x73be('0x33')](_0x4d452a['query']);_0x10af3f[_0x73be('0x39')]=_[_0x73be('0x34')](_0x10af3f[_0x73be('0x30')],_0x10af3f[_0x73be('0x32')]);_0x1913db[_0x73be('0x35')]=_['intersection'](_0x10af3f[_0x73be('0x30')],qs[_0x73be('0x36')](_0x4d452a[_0x73be('0x32')][_0x73be('0x36')]));_0x1913db[_0x73be('0x35')]=_0x1913db[_0x73be('0x35')][_0x73be('0x4d')]?_0x1913db[_0x73be('0x35')]:_0x10af3f[_0x73be('0x30')];_0x1913db[_0x73be('0x37')]=qs[_0x73be('0x38')](_0x4d452a[_0x73be('0x32')][_0x73be('0x38')]);_0x1913db['where']=qs[_0x73be('0x39')](_['pick'](_0x4d452a[_0x73be('0x32')],_0x10af3f[_0x73be('0x39')]));if(_0x4d452a['query'][_0x73be('0x3e')]){_0x1913db[_0x73be('0x3c')]=_['merge'](_0x1913db[_0x73be('0x3c')],{'$or':_[_0x73be('0x31')](_0x1913db[_0x73be('0x35')],function(_0x1c83c6){var _0x16052c={};_0x16052c[_0x1c83c6]={'$like':'%'+_0x4d452a[_0x73be('0x32')]['filter']+'%'};return _0x16052c;})});}_0x1913db=_['merge']({},_0x1913db,_0x4d452a['options']);return _0x20b6d5['getDescriptions'](_0x1913db);}})[_0x73be('0x26')](function(_0x137e6f){if(_0x137e6f){_0x32c355=_0x137e6f[_0x73be('0x4d')];if(!_0x4d452a[_0x73be('0x32')][_0x73be('0x4e')](_0x73be('0x4f'))){_0x1913db[_0x73be('0x1f')]=qs[_0x73be('0x1f')](_0x4d452a['query'][_0x73be('0x1f')]);_0x1913db['offset']=qs['offset'](_0x4d452a[_0x73be('0x32')][_0x73be('0x1d')]);}return _0x20b6d5[_0x73be('0x51')](_0x1913db);}})[_0x73be('0x26')](function(_0x427086){if(_0x427086){return _0x427086?{'count':_0x32c355,'rows':_0x427086}:null;}})[_0x73be('0x26')](respondWithResult(_0x1a074d,null))[_0x73be('0x42')](handleError(_0x1a074d,null));}; \ No newline at end of file diff --git a/server/api/intDynamics365Configuration/intDynamics365Configuration.model.js b/server/api/intDynamics365Configuration/intDynamics365Configuration.model.js index 0293dc8..050d275 100644 --- a/server/api/intDynamics365Configuration/intDynamics365Configuration.model.js +++ b/server/api/intDynamics365Configuration/intDynamics365Configuration.model.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x81bd=['../../config/environment','./intDynamics365Configuration.attributes','define','lodash','util','../../config/logger','api','moment','bluebird','request-promise','rimraf'];(function(_0x27834f,_0x11545b){var _0x417837=function(_0xd9e639){while(--_0xd9e639){_0x27834f['push'](_0x27834f['shift']());}};_0x417837(++_0x11545b);}(_0x81bd,0x7c));var _0xd81b=function(_0x191b40,_0xe86fd6){_0x191b40=_0x191b40-0x0;var _0xe3fe81=_0x81bd[_0x191b40];return _0xe3fe81;};'use strict';var _=require(_0xd81b('0x0'));var util=require(_0xd81b('0x1'));var logger=require(_0xd81b('0x2'))(_0xd81b('0x3'));var moment=require(_0xd81b('0x4'));var BPromise=require(_0xd81b('0x5'));var rp=require(_0xd81b('0x6'));var fs=require('fs');var path=require('path');var rimraf=require(_0xd81b('0x7'));var config=require(_0xd81b('0x8'));var attributes=require(_0xd81b('0x9'));module['exports']=function(_0x42a0aa,_0x34eb73){return _0x42a0aa[_0xd81b('0xa')]('Dynamics365Configuration',attributes,{'tableName':'int_dynamics365_configurations','paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file +var _0x3e74=['exports','Dynamics365Configuration','int_dynamics365_configurations','lodash','../../config/logger','api','moment','path','../../config/environment','./intDynamics365Configuration.attributes'];(function(_0x90e3d5,_0x3eea2b){var _0x5c2252=function(_0x3c7a2e){while(--_0x3c7a2e){_0x90e3d5['push'](_0x90e3d5['shift']());}};_0x5c2252(++_0x3eea2b);}(_0x3e74,0x175));var _0x43e7=function(_0x1c290a,_0x55c88b){_0x1c290a=_0x1c290a-0x0;var _0x5b128a=_0x3e74[_0x1c290a];return _0x5b128a;};'use strict';var _=require(_0x43e7('0x0'));var util=require('util');var logger=require(_0x43e7('0x1'))(_0x43e7('0x2'));var moment=require(_0x43e7('0x3'));var BPromise=require('bluebird');var rp=require('request-promise');var fs=require('fs');var path=require(_0x43e7('0x4'));var rimraf=require('rimraf');var config=require(_0x43e7('0x5'));var attributes=require(_0x43e7('0x6'));module[_0x43e7('0x7')]=function(_0x1c503b,_0xc98b9c){return _0x1c503b['define'](_0x43e7('0x8'),attributes,{'tableName':_0x43e7('0x9'),'paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file diff --git a/server/api/intDynamics365Configuration/intDynamics365Configuration.rpc.js b/server/api/intDynamics365Configuration/intDynamics365Configuration.rpc.js index 8c9ba4a..7c04a3a 100644 --- a/server/api/intDynamics365Configuration/intDynamics365Configuration.rpc.js +++ b/server/api/intDynamics365Configuration/intDynamics365Configuration.rpc.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x3918=['stringify','error','message','info','catch','lodash','moment','bluebird','ioredis','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','request','Dynamics365Configuration,\x20%s,\x20%s','request\x20sent','debug','Dynamics365Configuration,\x20%s,\x20%s,\x20%s'];(function(_0x3d3f8,_0x24e92b){var _0x1cc8d1=function(_0x4af162){while(--_0x4af162){_0x3d3f8['push'](_0x3d3f8['shift']());}};_0x1cc8d1(++_0x24e92b);}(_0x3918,0x12b));var _0x8391=function(_0x321bb2,_0x202794){_0x321bb2=_0x321bb2-0x0;var _0x9c12ed=_0x3918[_0x321bb2];return _0x9c12ed;};'use strict';var _=require(_0x8391('0x0'));var util=require('util');var moment=require(_0x8391('0x1'));var BPromise=require(_0x8391('0x2'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x8391('0x3'));var db=require('../../mysqldb')['db'];var utils=require(_0x8391('0x4'));var logger=require(_0x8391('0x5'))(_0x8391('0x6'));var config=require(_0x8391('0x7'));var jayson=require(_0x8391('0x8'));var client=jayson[_0x8391('0x9')][_0x8391('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x2eed7b,_0x15b683,_0x58a851){return new BPromise(function(_0x3156c8,_0x4c62ed){return client[_0x8391('0xb')](_0x2eed7b,_0x58a851)['then'](function(_0x285fc9){logger['info'](_0x8391('0xc'),_0x15b683,_0x8391('0xd'));logger[_0x8391('0xe')](_0x8391('0xf'),_0x15b683,'request\x20sent',JSON[_0x8391('0x10')](_0x285fc9));if(_0x285fc9[_0x8391('0x11')]){if(_0x285fc9[_0x8391('0x11')]['code']===0x1f4){logger[_0x8391('0x11')](_0x8391('0xc'),_0x15b683,_0x285fc9['error']['message']);return _0x4c62ed(_0x285fc9[_0x8391('0x11')]['message']);}logger['error'](_0x8391('0xc'),_0x15b683,_0x285fc9[_0x8391('0x11')][_0x8391('0x12')]);return _0x3156c8(_0x285fc9[_0x8391('0x11')][_0x8391('0x12')]);}else{logger[_0x8391('0x13')](_0x8391('0xc'),_0x15b683,_0x8391('0xd'));_0x3156c8(_0x285fc9['result'][_0x8391('0x12')]);}})[_0x8391('0x14')](function(_0x30c323){logger[_0x8391('0x11')](_0x8391('0xc'),_0x15b683,_0x30c323);_0x4c62ed(_0x30c323);});});} \ No newline at end of file +var _0xa8fb=['client','http','request','then','info','Dynamics365Configuration,\x20%s,\x20%s','request\x20sent','debug','Dynamics365Configuration,\x20%s,\x20%s,\x20%s','stringify','error','message','result','catch','util','moment','bluebird','randomstring','../../config/utils','../../config/environment'];(function(_0x1544c7,_0x52670b){var _0x1a350d=function(_0x97f4e9){while(--_0x97f4e9){_0x1544c7['push'](_0x1544c7['shift']());}};_0x1a350d(++_0x52670b);}(_0xa8fb,0xae));var _0xba8f=function(_0x59ee6f,_0x450239){_0x59ee6f=_0x59ee6f-0x0;var _0x4c0979=_0xa8fb[_0x59ee6f];return _0x4c0979;};'use strict';var _=require('lodash');var util=require(_0xba8f('0x0'));var moment=require(_0xba8f('0x1'));var BPromise=require(_0xba8f('0x2'));var rs=require(_0xba8f('0x3'));var fs=require('fs');var Redis=require('ioredis');var db=require('../../mysqldb')['db'];var utils=require(_0xba8f('0x4'));var logger=require('../../config/logger')('rpc');var config=require(_0xba8f('0x5'));var jayson=require('jayson/promise');var client=jayson[_0xba8f('0x6')][_0xba8f('0x7')]({'port':0x232a});function respondWithRpcPromise(_0x1bfa5c,_0x310543,_0x44e365){return new BPromise(function(_0x5790ad,_0x5eb9c2){return client[_0xba8f('0x8')](_0x1bfa5c,_0x44e365)[_0xba8f('0x9')](function(_0x3b0442){logger[_0xba8f('0xa')](_0xba8f('0xb'),_0x310543,_0xba8f('0xc'));logger[_0xba8f('0xd')](_0xba8f('0xe'),_0x310543,'request\x20sent',JSON[_0xba8f('0xf')](_0x3b0442));if(_0x3b0442[_0xba8f('0x10')]){if(_0x3b0442[_0xba8f('0x10')]['code']===0x1f4){logger[_0xba8f('0x10')]('Dynamics365Configuration,\x20%s,\x20%s',_0x310543,_0x3b0442[_0xba8f('0x10')]['message']);return _0x5eb9c2(_0x3b0442[_0xba8f('0x10')][_0xba8f('0x11')]);}logger[_0xba8f('0x10')](_0xba8f('0xb'),_0x310543,_0x3b0442[_0xba8f('0x10')]['message']);return _0x5790ad(_0x3b0442[_0xba8f('0x10')]['message']);}else{logger[_0xba8f('0xa')](_0xba8f('0xb'),_0x310543,_0xba8f('0xc'));_0x5790ad(_0x3b0442[_0xba8f('0x12')][_0xba8f('0x11')]);}})[_0xba8f('0x13')](function(_0x202b38){logger[_0xba8f('0x10')](_0xba8f('0xb'),_0x310543,_0x202b38);_0x5eb9c2(_0x202b38);});});} \ No newline at end of file diff --git a/server/api/intDynamics365Field/index.js b/server/api/intDynamics365Field/index.js index cd9000f..16fef58 100644 --- a/server/api/intDynamics365Field/index.js +++ b/server/api/intDynamics365Field/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x46a6=['connect-timeout','express','Router','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','./intDynamics365Field.controller','get','isAuthenticated','/:id','show','create','update','delete','exports','multer','path'];(function(_0x1b6186,_0x1ec7f2){var _0x186121=function(_0x1748a8){while(--_0x1748a8){_0x1b6186['push'](_0x1b6186['shift']());}};_0x186121(++_0x1ec7f2);}(_0x46a6,0x1c0));var _0x646a=function(_0x4ab3fb,_0x776775){_0x4ab3fb=_0x4ab3fb-0x0;var _0x34fe1e=_0x46a6[_0x4ab3fb];return _0x34fe1e;};'use strict';var multer=require(_0x646a('0x0'));var util=require('util');var path=require(_0x646a('0x1'));var timeout=require(_0x646a('0x2'));var express=require(_0x646a('0x3'));var router=express[_0x646a('0x4')]();var fs_extra=require(_0x646a('0x5'));var auth=require(_0x646a('0x6'));var interaction=require(_0x646a('0x7'));var config=require(_0x646a('0x8'));var controller=require(_0x646a('0x9'));router[_0x646a('0xa')]('/',auth[_0x646a('0xb')](),controller['index']);router[_0x646a('0xa')](_0x646a('0xc'),auth[_0x646a('0xb')](),controller[_0x646a('0xd')]);router['post']('/',auth[_0x646a('0xb')](),controller[_0x646a('0xe')]);router['put'](_0x646a('0xc'),auth[_0x646a('0xb')](),controller[_0x646a('0xf')]);router[_0x646a('0x10')]('/:id',auth[_0x646a('0xb')](),controller['destroy']);module[_0x646a('0x11')]=router; \ No newline at end of file +var _0xc74f=['../../components/interaction/service','./intDynamics365Field.controller','get','/:id','isAuthenticated','post','create','put','update','delete','destroy','exports','multer','path','express','Router','fs-extra','../../components/auth/service'];(function(_0x566a4e,_0xeeb3f6){var _0x36d409=function(_0x25960c){while(--_0x25960c){_0x566a4e['push'](_0x566a4e['shift']());}};_0x36d409(++_0xeeb3f6);}(_0xc74f,0x1e0));var _0xfc74=function(_0x3a6180,_0x36cfc7){_0x3a6180=_0x3a6180-0x0;var _0xda6e53=_0xc74f[_0x3a6180];return _0xda6e53;};'use strict';var multer=require(_0xfc74('0x0'));var util=require('util');var path=require(_0xfc74('0x1'));var timeout=require('connect-timeout');var express=require(_0xfc74('0x2'));var router=express[_0xfc74('0x3')]();var fs_extra=require(_0xfc74('0x4'));var auth=require(_0xfc74('0x5'));var interaction=require(_0xfc74('0x6'));var config=require('../../config/environment');var controller=require(_0xfc74('0x7'));router[_0xfc74('0x8')]('/',auth['isAuthenticated'](),controller['index']);router[_0xfc74('0x8')](_0xfc74('0x9'),auth[_0xfc74('0xa')](),controller['show']);router[_0xfc74('0xb')]('/',auth['isAuthenticated'](),controller[_0xfc74('0xc')]);router[_0xfc74('0xd')](_0xfc74('0x9'),auth['isAuthenticated'](),controller[_0xfc74('0xe')]);router[_0xfc74('0xf')](_0xfc74('0x9'),auth['isAuthenticated'](),controller[_0xfc74('0x10')]);module[_0xfc74('0x11')]=router; \ No newline at end of file diff --git a/server/api/intDynamics365Field/intDynamics365Field.attributes.js b/server/api/intDynamics365Field/intDynamics365Field.attributes.js index d2aa3e5..fadfbfa 100644 --- a/server/api/intDynamics365Field/intDynamics365Field.attributes.js +++ b/server/api/intDynamics365Field/intDynamics365Field.attributes.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x39bf=['sequelize','exports','ENUM','variable','keyValue','picklist','STRING','string','customVariable','BOOLEAN'];(function(_0x2b7764,_0x2606f1){var _0x848dcb=function(_0x1ae85b){while(--_0x1ae85b){_0x2b7764['push'](_0x2b7764['shift']());}};_0x848dcb(++_0x2606f1);}(_0x39bf,0x154));var _0xf39b=function(_0xfe901a,_0x4dde1b){_0xfe901a=_0xfe901a-0x0;var _0x436e92=_0x39bf[_0xfe901a];return _0x436e92;};'use strict';var Sequelize=require(_0xf39b('0x0'));module[_0xf39b('0x1')]={'type':{'type':Sequelize[_0xf39b('0x2')]('string',_0xf39b('0x3'),'customVariable',_0xf39b('0x4'),_0xf39b('0x5')),'defaultValue':'string'},'content':{'type':Sequelize['STRING']},'key':{'type':Sequelize[_0xf39b('0x6')]},'keyType':{'type':Sequelize['ENUM'](_0xf39b('0x7'),'variable',_0xf39b('0x8'))},'keyContent':{'type':Sequelize[_0xf39b('0x6')]},'idField':{'type':Sequelize[_0xf39b('0x6')]},'nameField':{'type':Sequelize[_0xf39b('0x6')]},'customField':{'type':Sequelize[_0xf39b('0x9')],'defaultValue':!![]},'variableName':{'type':Sequelize['STRING']}}; \ No newline at end of file +var _0x53d6=['STRING','sequelize','exports','ENUM','string','customVariable','keyValue','picklist'];(function(_0x59c683,_0x209444){var _0x47251b=function(_0x4db046){while(--_0x4db046){_0x59c683['push'](_0x59c683['shift']());}};_0x47251b(++_0x209444);}(_0x53d6,0xa1));var _0x653d=function(_0x1ffd67,_0x1c18ba){_0x1ffd67=_0x1ffd67-0x0;var _0xce170f=_0x53d6[_0x1ffd67];return _0xce170f;};'use strict';var Sequelize=require(_0x653d('0x0'));module[_0x653d('0x1')]={'type':{'type':Sequelize[_0x653d('0x2')](_0x653d('0x3'),'variable',_0x653d('0x4'),_0x653d('0x5'),_0x653d('0x6')),'defaultValue':_0x653d('0x3')},'content':{'type':Sequelize[_0x653d('0x7')]},'key':{'type':Sequelize[_0x653d('0x7')]},'keyType':{'type':Sequelize['ENUM']('string','variable',_0x653d('0x4'))},'keyContent':{'type':Sequelize[_0x653d('0x7')]},'idField':{'type':Sequelize['STRING']},'nameField':{'type':Sequelize['STRING']},'customField':{'type':Sequelize['BOOLEAN'],'defaultValue':!![]},'variableName':{'type':Sequelize[_0x653d('0x7')]}}; \ No newline at end of file diff --git a/server/api/intDynamics365Field/intDynamics365Field.controller.js b/server/api/intDynamics365Field/intDynamics365Field.controller.js index e092370..6622816 100644 --- a/server/api/intDynamics365Field/intDynamics365Field.controller.js +++ b/server/api/intDynamics365Field/intDynamics365Field.controller.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xad5c=['querystring','papaparse','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../mysqldb','sendStatus','status','end','json','offset','undefined','limit','count','Content-Range','apply','reject','save','update','destroy','then','error','name','send','index','map','Dynamics365Field','rawAttributes','fieldName','keys','query','filters','intersection','model','fields','attributes','length','hasOwnProperty','nolimit','order','sort','filter','where','type','VIRTUAL','options','findAll','rows','catch','params','includeAll','include','merge','find','create','eml-format','zip-dir','fast-json-patch','moment','bluebird','mustache','util','path','sox','to-csv','ejs','fs-extra','lodash','squel','crypto','jsforce','desk.js'];(function(_0x184e6f,_0x37f6dd){var _0x263707=function(_0x22469f){while(--_0x22469f){_0x184e6f['push'](_0x184e6f['shift']());}};_0x263707(++_0x37f6dd);}(_0xad5c,0xd6));var _0xcad5=function(_0x1a212e,_0x3e5eae){_0x1a212e=_0x1a212e-0x0;var _0x3e8c0b=_0xad5c[_0x1a212e];return _0x3e8c0b;};'use strict';var emlformat=require(_0xcad5('0x0'));var rimraf=require('rimraf');var zipdir=require(_0xcad5('0x1'));var jsonpatch=require(_0xcad5('0x2'));var rp=require('request-promise');var moment=require(_0xcad5('0x3'));var BPromise=require(_0xcad5('0x4'));var Mustache=require(_0xcad5('0x5'));var util=require(_0xcad5('0x6'));var path=require(_0xcad5('0x7'));var sox=require(_0xcad5('0x8'));var csv=require(_0xcad5('0x9'));var ejs=require(_0xcad5('0xa'));var fs=require('fs');var fs_extra=require(_0xcad5('0xb'));var _=require(_0xcad5('0xc'));var squel=require(_0xcad5('0xd'));var crypto=require(_0xcad5('0xe'));var jsforce=require(_0xcad5('0xf'));var deskjs=require(_0xcad5('0x10'));var toCsv=require(_0xcad5('0x9'));var querystring=require(_0xcad5('0x11'));var Papa=require(_0xcad5('0x12'));var Redis=require('ioredis');var authService=require(_0xcad5('0x13'));var qs=require(_0xcad5('0x14'));var as=require(_0xcad5('0x15'));var hardwareService=require(_0xcad5('0x16'));var logger=require(_0xcad5('0x17'))(_0xcad5('0x18'));var utils=require(_0xcad5('0x19'));var config=require(_0xcad5('0x1a'));var licenseUtil=require('../../config/license/util');var db=require(_0xcad5('0x1b'))['db'];function respondWithStatusCode(_0x41614c,_0x2e90a2){_0x2e90a2=_0x2e90a2||0xcc;return function(_0x1e6a53){if(_0x1e6a53){return _0x41614c[_0xcad5('0x1c')](_0x2e90a2);}return _0x41614c[_0xcad5('0x1d')](_0x2e90a2)[_0xcad5('0x1e')]();};}function respondWithResult(_0x2c6a2f,_0x1a362b){_0x1a362b=_0x1a362b||0xc8;return function(_0xc61f4e){if(_0xc61f4e){return _0x2c6a2f[_0xcad5('0x1d')](_0x1a362b)[_0xcad5('0x1f')](_0xc61f4e);}};}function respondWithFilteredResult(_0x51fed6,_0x2e9cd5){return function(_0x4452af){if(_0x4452af){var _0x43a797=typeof _0x2e9cd5[_0xcad5('0x20')]===_0xcad5('0x21')&&typeof _0x2e9cd5[_0xcad5('0x22')]===_0xcad5('0x21');var _0x57dcf3=_0x4452af[_0xcad5('0x23')];var _0x519f2f=_0x43a797?0x0:_0x2e9cd5[_0xcad5('0x20')];var _0x3df300=_0x43a797?_0x4452af[_0xcad5('0x23')]:_0x2e9cd5['offset']+_0x2e9cd5[_0xcad5('0x22')];var _0x17bf5f;if(_0x3df300>=_0x57dcf3){_0x3df300=_0x57dcf3;_0x17bf5f=0xc8;}else{_0x17bf5f=0xce;}_0x51fed6[_0xcad5('0x1d')](_0x17bf5f);return _0x51fed6['set'](_0xcad5('0x24'),_0x519f2f+'-'+_0x3df300+'/'+_0x57dcf3)[_0xcad5('0x1f')](_0x4452af);}return null;};}function patchUpdates(_0x428670){return function(_0x353a75){try{jsonpatch[_0xcad5('0x25')](_0x353a75,_0x428670,!![]);}catch(_0x4d3015){return BPromise[_0xcad5('0x26')](_0x4d3015);}return _0x353a75[_0xcad5('0x27')]();};}function saveUpdates(_0x4977be,_0x365def){return function(_0x3f92f3){if(_0x3f92f3){return _0x3f92f3[_0xcad5('0x28')](_0x4977be)['then'](function(_0x44c947){return _0x44c947;});}return null;};}function removeEntity(_0x4d3727,_0x3921ae){return function(_0x1fb3ac){if(_0x1fb3ac){return _0x1fb3ac[_0xcad5('0x29')]()[_0xcad5('0x2a')](function(){_0x4d3727['status'](0xcc)[_0xcad5('0x1e')]();});}};}function handleEntityNotFound(_0x37b3b8,_0x120129){return function(_0xe1e202){if(!_0xe1e202){_0x37b3b8[_0xcad5('0x1c')](0x194);}return _0xe1e202;};}function handleError(_0x585bad,_0x50d4a1){_0x50d4a1=_0x50d4a1||0x1f4;return function(_0x18a4ed){logger[_0xcad5('0x2b')](_0x18a4ed['stack']);if(_0x18a4ed[_0xcad5('0x2c')]){delete _0x18a4ed[_0xcad5('0x2c')];}_0x585bad[_0xcad5('0x1d')](_0x50d4a1)[_0xcad5('0x2d')](_0x18a4ed);};}exports[_0xcad5('0x2e')]=function(_0x2b432f,_0x1a1450){var _0x1b009e={},_0x15a9ef={},_0xcb6df7={'count':0x0,'rows':[]};var _0x3a8211=_[_0xcad5('0x2f')](db[_0xcad5('0x30')][_0xcad5('0x31')],function(_0xc57d99){return{'name':_0xc57d99[_0xcad5('0x32')],'type':_0xc57d99['type']['key']};});_0x15a9ef['model']=_['map'](_0x3a8211,'name');_0x15a9ef['query']=_[_0xcad5('0x33')](_0x2b432f[_0xcad5('0x34')]);_0x15a9ef[_0xcad5('0x35')]=_[_0xcad5('0x36')](_0x15a9ef['model'],_0x15a9ef[_0xcad5('0x34')]);_0x1b009e['attributes']=_[_0xcad5('0x36')](_0x15a9ef[_0xcad5('0x37')],qs['fields'](_0x2b432f[_0xcad5('0x34')][_0xcad5('0x38')]));_0x1b009e[_0xcad5('0x39')]=_0x1b009e[_0xcad5('0x39')][_0xcad5('0x3a')]?_0x1b009e[_0xcad5('0x39')]:_0x15a9ef[_0xcad5('0x37')];if(!_0x2b432f['query'][_0xcad5('0x3b')](_0xcad5('0x3c'))){_0x1b009e[_0xcad5('0x22')]=qs[_0xcad5('0x22')](_0x2b432f[_0xcad5('0x34')][_0xcad5('0x22')]);_0x1b009e['offset']=qs['offset'](_0x2b432f[_0xcad5('0x34')][_0xcad5('0x20')]);}_0x1b009e[_0xcad5('0x3d')]=qs[_0xcad5('0x3e')](_0x2b432f['query'][_0xcad5('0x3e')]);_0x1b009e['where']=qs[_0xcad5('0x35')](_['pick'](_0x2b432f['query'],_0x15a9ef[_0xcad5('0x35')]),_0x3a8211);if(_0x2b432f[_0xcad5('0x34')][_0xcad5('0x3f')]){_0x1b009e[_0xcad5('0x40')]=_['merge'](_0x1b009e[_0xcad5('0x40')],{'$or':_[_0xcad5('0x2f')](_0x3a8211,function(_0x44cc52){if(_0x44cc52[_0xcad5('0x41')]!==_0xcad5('0x42')){var _0x52f5fe={};_0x52f5fe[_0x44cc52[_0xcad5('0x2c')]]={'$like':'%'+_0x2b432f['query']['filter']+'%'};return _0x52f5fe;}})});}_0x1b009e=_['merge']({},_0x1b009e,_0x2b432f[_0xcad5('0x43')]);var _0x4a2b92={'where':_0x1b009e[_0xcad5('0x40')]};return db[_0xcad5('0x30')][_0xcad5('0x23')](_0x4a2b92)[_0xcad5('0x2a')](function(_0x161660){_0xcb6df7[_0xcad5('0x23')]=_0x161660;if(_0x2b432f['query']['includeAll']){_0x1b009e['include']=[{'all':!![]}];}return db['Dynamics365Field'][_0xcad5('0x44')](_0x1b009e);})[_0xcad5('0x2a')](function(_0x7df9c7){_0xcb6df7[_0xcad5('0x45')]=_0x7df9c7;return _0xcb6df7;})['then'](respondWithFilteredResult(_0x1a1450,_0x1b009e))[_0xcad5('0x46')](handleError(_0x1a1450,null));};exports['show']=function(_0x1f894,_0x393e20){var _0x1e7494={'raw':!![],'where':{'id':_0x1f894[_0xcad5('0x47')]['id']}},_0x2b3d69={};_0x2b3d69[_0xcad5('0x37')]=_[_0xcad5('0x33')](db[_0xcad5('0x30')]['rawAttributes']);_0x2b3d69[_0xcad5('0x34')]=_['keys'](_0x1f894[_0xcad5('0x34')]);_0x2b3d69[_0xcad5('0x35')]=_[_0xcad5('0x36')](_0x2b3d69[_0xcad5('0x37')],_0x2b3d69['query']);_0x1e7494[_0xcad5('0x39')]=_[_0xcad5('0x36')](_0x2b3d69['model'],qs[_0xcad5('0x38')](_0x1f894[_0xcad5('0x34')][_0xcad5('0x38')]));_0x1e7494[_0xcad5('0x39')]=_0x1e7494[_0xcad5('0x39')][_0xcad5('0x3a')]?_0x1e7494[_0xcad5('0x39')]:_0x2b3d69[_0xcad5('0x37')];if(_0x1f894[_0xcad5('0x34')][_0xcad5('0x48')]){_0x1e7494[_0xcad5('0x49')]=[{'all':!![]}];}_0x1e7494=_[_0xcad5('0x4a')]({},_0x1e7494,_0x1f894['options']);return db['Dynamics365Field'][_0xcad5('0x4b')](_0x1e7494)[_0xcad5('0x2a')](handleEntityNotFound(_0x393e20,null))[_0xcad5('0x2a')](respondWithResult(_0x393e20,null))[_0xcad5('0x46')](handleError(_0x393e20,null));};exports['create']=function(_0xd59ee8,_0x18c063){return db[_0xcad5('0x30')][_0xcad5('0x4c')](_0xd59ee8['body'],{})['then'](respondWithResult(_0x18c063,0xc9))[_0xcad5('0x46')](handleError(_0x18c063,null));};exports['update']=function(_0x2da781,_0x55d800){if(_0x2da781['body']['id']){delete _0x2da781['body']['id'];}return db[_0xcad5('0x30')]['find']({'where':{'id':_0x2da781[_0xcad5('0x47')]['id']}})[_0xcad5('0x2a')](handleEntityNotFound(_0x55d800,null))[_0xcad5('0x2a')](saveUpdates(_0x2da781['body'],null))[_0xcad5('0x2a')](respondWithResult(_0x55d800,null))[_0xcad5('0x46')](handleError(_0x55d800,null));};exports['destroy']=function(_0x8de603,_0x5d0b70){return db['Dynamics365Field']['find']({'where':{'id':_0x8de603[_0xcad5('0x47')]['id']}})[_0xcad5('0x2a')](handleEntityNotFound(_0x5d0b70,null))[_0xcad5('0x2a')](removeEntity(_0x5d0b70,null))[_0xcad5('0x46')](handleError(_0x5d0b70,null));}; \ No newline at end of file +var _0xf685=['undefined','count','set','Content-Range','apply','reject','save','update','then','destroy','end','error','name','send','map','fieldName','model','query','keys','filters','intersection','fields','attributes','hasOwnProperty','nolimit','sort','pick','filter','merge','where','type','options','Dynamics365Field','includeAll','include','findAll','rows','catch','show','rawAttributes','length','find','create','body','params','eml-format','rimraf','zip-dir','fast-json-patch','moment','bluebird','mustache','to-csv','fs-extra','squel','jsforce','papaparse','ioredis','../../components/parsers/qs','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','sendStatus','status','json','offset','limit'];(function(_0x4aad02,_0x25acc0){var _0x238924=function(_0x14fadf){while(--_0x14fadf){_0x4aad02['push'](_0x4aad02['shift']());}};_0x238924(++_0x25acc0);}(_0xf685,0x190));var _0x5f68=function(_0x282a80,_0xc08d67){_0x282a80=_0x282a80-0x0;var _0x4aaa15=_0xf685[_0x282a80];return _0x4aaa15;};'use strict';var emlformat=require(_0x5f68('0x0'));var rimraf=require(_0x5f68('0x1'));var zipdir=require(_0x5f68('0x2'));var jsonpatch=require(_0x5f68('0x3'));var rp=require('request-promise');var moment=require(_0x5f68('0x4'));var BPromise=require(_0x5f68('0x5'));var Mustache=require(_0x5f68('0x6'));var util=require('util');var path=require('path');var sox=require('sox');var csv=require(_0x5f68('0x7'));var ejs=require('ejs');var fs=require('fs');var fs_extra=require(_0x5f68('0x8'));var _=require('lodash');var squel=require(_0x5f68('0x9'));var crypto=require('crypto');var jsforce=require(_0x5f68('0xa'));var deskjs=require('desk.js');var toCsv=require(_0x5f68('0x7'));var querystring=require('querystring');var Papa=require(_0x5f68('0xb'));var Redis=require(_0x5f68('0xc'));var authService=require('../../components/auth/service');var qs=require(_0x5f68('0xd'));var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0x5f68('0xe'));var logger=require(_0x5f68('0xf'))(_0x5f68('0x10'));var utils=require(_0x5f68('0x11'));var config=require(_0x5f68('0x12'));var licenseUtil=require(_0x5f68('0x13'));var db=require(_0x5f68('0x14'))['db'];function respondWithStatusCode(_0xeaec1c,_0x4d01c5){_0x4d01c5=_0x4d01c5||0xcc;return function(_0x575da0){if(_0x575da0){return _0xeaec1c[_0x5f68('0x15')](_0x4d01c5);}return _0xeaec1c[_0x5f68('0x16')](_0x4d01c5)['end']();};}function respondWithResult(_0x28feb1,_0x289652){_0x289652=_0x289652||0xc8;return function(_0x57cb77){if(_0x57cb77){return _0x28feb1[_0x5f68('0x16')](_0x289652)[_0x5f68('0x17')](_0x57cb77);}};}function respondWithFilteredResult(_0x1d5b93,_0x5ce1bb){return function(_0x18ea91){if(_0x18ea91){var _0x1f4cdf=typeof _0x5ce1bb[_0x5f68('0x18')]==='undefined'&&typeof _0x5ce1bb[_0x5f68('0x19')]===_0x5f68('0x1a');var _0x46fd90=_0x18ea91[_0x5f68('0x1b')];var _0x5cbcb5=_0x1f4cdf?0x0:_0x5ce1bb[_0x5f68('0x18')];var _0x36f807=_0x1f4cdf?_0x18ea91['count']:_0x5ce1bb[_0x5f68('0x18')]+_0x5ce1bb['limit'];var _0x794e2b;if(_0x36f807>=_0x46fd90){_0x36f807=_0x46fd90;_0x794e2b=0xc8;}else{_0x794e2b=0xce;}_0x1d5b93[_0x5f68('0x16')](_0x794e2b);return _0x1d5b93[_0x5f68('0x1c')](_0x5f68('0x1d'),_0x5cbcb5+'-'+_0x36f807+'/'+_0x46fd90)['json'](_0x18ea91);}return null;};}function patchUpdates(_0xd6acd1){return function(_0x1f5167){try{jsonpatch[_0x5f68('0x1e')](_0x1f5167,_0xd6acd1,!![]);}catch(_0x37943b){return BPromise[_0x5f68('0x1f')](_0x37943b);}return _0x1f5167[_0x5f68('0x20')]();};}function saveUpdates(_0x4f40bb,_0x28f76f){return function(_0xb20262){if(_0xb20262){return _0xb20262[_0x5f68('0x21')](_0x4f40bb)[_0x5f68('0x22')](function(_0x507d26){return _0x507d26;});}return null;};}function removeEntity(_0xc9b3dd,_0x534b33){return function(_0x2c5924){if(_0x2c5924){return _0x2c5924[_0x5f68('0x23')]()['then'](function(){_0xc9b3dd[_0x5f68('0x16')](0xcc)[_0x5f68('0x24')]();});}};}function handleEntityNotFound(_0x3d81b8,_0x88727b){return function(_0x2e3471){if(!_0x2e3471){_0x3d81b8['sendStatus'](0x194);}return _0x2e3471;};}function handleError(_0x39d8eb,_0x33679e){_0x33679e=_0x33679e||0x1f4;return function(_0x11f58f){logger[_0x5f68('0x25')](_0x11f58f['stack']);if(_0x11f58f[_0x5f68('0x26')]){delete _0x11f58f[_0x5f68('0x26')];}_0x39d8eb['status'](_0x33679e)[_0x5f68('0x27')](_0x11f58f);};}exports['index']=function(_0x25cb2e,_0x7652b8){var _0x796f4a={},_0x5e25fb={},_0x98fb14={'count':0x0,'rows':[]};var _0x3ef177=_[_0x5f68('0x28')](db['Dynamics365Field']['rawAttributes'],function(_0x53d1d1){return{'name':_0x53d1d1[_0x5f68('0x29')],'type':_0x53d1d1['type']['key']};});_0x5e25fb[_0x5f68('0x2a')]=_[_0x5f68('0x28')](_0x3ef177,_0x5f68('0x26'));_0x5e25fb[_0x5f68('0x2b')]=_[_0x5f68('0x2c')](_0x25cb2e[_0x5f68('0x2b')]);_0x5e25fb[_0x5f68('0x2d')]=_[_0x5f68('0x2e')](_0x5e25fb['model'],_0x5e25fb['query']);_0x796f4a['attributes']=_[_0x5f68('0x2e')](_0x5e25fb[_0x5f68('0x2a')],qs[_0x5f68('0x2f')](_0x25cb2e[_0x5f68('0x2b')][_0x5f68('0x2f')]));_0x796f4a[_0x5f68('0x30')]=_0x796f4a[_0x5f68('0x30')]['length']?_0x796f4a['attributes']:_0x5e25fb[_0x5f68('0x2a')];if(!_0x25cb2e[_0x5f68('0x2b')][_0x5f68('0x31')](_0x5f68('0x32'))){_0x796f4a[_0x5f68('0x19')]=qs[_0x5f68('0x19')](_0x25cb2e['query']['limit']);_0x796f4a[_0x5f68('0x18')]=qs[_0x5f68('0x18')](_0x25cb2e[_0x5f68('0x2b')]['offset']);}_0x796f4a['order']=qs[_0x5f68('0x33')](_0x25cb2e['query'][_0x5f68('0x33')]);_0x796f4a['where']=qs[_0x5f68('0x2d')](_[_0x5f68('0x34')](_0x25cb2e[_0x5f68('0x2b')],_0x5e25fb[_0x5f68('0x2d')]),_0x3ef177);if(_0x25cb2e['query'][_0x5f68('0x35')]){_0x796f4a['where']=_[_0x5f68('0x36')](_0x796f4a[_0x5f68('0x37')],{'$or':_['map'](_0x3ef177,function(_0xa34089){if(_0xa34089[_0x5f68('0x38')]!=='VIRTUAL'){var _0x4262fd={};_0x4262fd[_0xa34089[_0x5f68('0x26')]]={'$like':'%'+_0x25cb2e[_0x5f68('0x2b')][_0x5f68('0x35')]+'%'};return _0x4262fd;}})});}_0x796f4a=_[_0x5f68('0x36')]({},_0x796f4a,_0x25cb2e[_0x5f68('0x39')]);var _0x4cfe4f={'where':_0x796f4a[_0x5f68('0x37')]};return db[_0x5f68('0x3a')][_0x5f68('0x1b')](_0x4cfe4f)[_0x5f68('0x22')](function(_0x285069){_0x98fb14[_0x5f68('0x1b')]=_0x285069;if(_0x25cb2e[_0x5f68('0x2b')][_0x5f68('0x3b')]){_0x796f4a[_0x5f68('0x3c')]=[{'all':!![]}];}return db[_0x5f68('0x3a')][_0x5f68('0x3d')](_0x796f4a);})[_0x5f68('0x22')](function(_0x12b3f4){_0x98fb14[_0x5f68('0x3e')]=_0x12b3f4;return _0x98fb14;})[_0x5f68('0x22')](respondWithFilteredResult(_0x7652b8,_0x796f4a))[_0x5f68('0x3f')](handleError(_0x7652b8,null));};exports[_0x5f68('0x40')]=function(_0x29ff96,_0x2f4766){var _0x29b01d={'raw':!![],'where':{'id':_0x29ff96['params']['id']}},_0x4b3715={};_0x4b3715[_0x5f68('0x2a')]=_[_0x5f68('0x2c')](db[_0x5f68('0x3a')][_0x5f68('0x41')]);_0x4b3715[_0x5f68('0x2b')]=_[_0x5f68('0x2c')](_0x29ff96[_0x5f68('0x2b')]);_0x4b3715[_0x5f68('0x2d')]=_[_0x5f68('0x2e')](_0x4b3715[_0x5f68('0x2a')],_0x4b3715['query']);_0x29b01d[_0x5f68('0x30')]=_[_0x5f68('0x2e')](_0x4b3715['model'],qs['fields'](_0x29ff96[_0x5f68('0x2b')]['fields']));_0x29b01d[_0x5f68('0x30')]=_0x29b01d[_0x5f68('0x30')][_0x5f68('0x42')]?_0x29b01d[_0x5f68('0x30')]:_0x4b3715['model'];if(_0x29ff96[_0x5f68('0x2b')][_0x5f68('0x3b')]){_0x29b01d[_0x5f68('0x3c')]=[{'all':!![]}];}_0x29b01d=_[_0x5f68('0x36')]({},_0x29b01d,_0x29ff96[_0x5f68('0x39')]);return db[_0x5f68('0x3a')][_0x5f68('0x43')](_0x29b01d)[_0x5f68('0x22')](handleEntityNotFound(_0x2f4766,null))[_0x5f68('0x22')](respondWithResult(_0x2f4766,null))[_0x5f68('0x3f')](handleError(_0x2f4766,null));};exports[_0x5f68('0x44')]=function(_0x25b15a,_0x2733be){return db[_0x5f68('0x3a')][_0x5f68('0x44')](_0x25b15a['body'],{})['then'](respondWithResult(_0x2733be,0xc9))[_0x5f68('0x3f')](handleError(_0x2733be,null));};exports[_0x5f68('0x21')]=function(_0x16cb74,_0x29ab3c){if(_0x16cb74[_0x5f68('0x45')]['id']){delete _0x16cb74[_0x5f68('0x45')]['id'];}return db['Dynamics365Field'][_0x5f68('0x43')]({'where':{'id':_0x16cb74[_0x5f68('0x46')]['id']}})['then'](handleEntityNotFound(_0x29ab3c,null))[_0x5f68('0x22')](saveUpdates(_0x16cb74[_0x5f68('0x45')],null))[_0x5f68('0x22')](respondWithResult(_0x29ab3c,null))['catch'](handleError(_0x29ab3c,null));};exports[_0x5f68('0x23')]=function(_0x2b410e,_0x5a5b7e){return db[_0x5f68('0x3a')][_0x5f68('0x43')]({'where':{'id':_0x2b410e['params']['id']}})['then'](handleEntityNotFound(_0x5a5b7e,null))[_0x5f68('0x22')](removeEntity(_0x5a5b7e,null))[_0x5f68('0x3f')](handleError(_0x5a5b7e,null));}; \ No newline at end of file diff --git a/server/api/intDynamics365Field/intDynamics365Field.model.js b/server/api/intDynamics365Field/intDynamics365Field.model.js index 13e0477..68c8049 100644 --- a/server/api/intDynamics365Field/intDynamics365Field.model.js +++ b/server/api/intDynamics365Field/intDynamics365Field.model.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xb3dd=['FieldId','lodash','util','api','moment','request-promise','rimraf','define','Dynamics365Field','idField'];(function(_0x7e3555,_0x5e13f9){var _0x32b51a=function(_0x265ab6){while(--_0x265ab6){_0x7e3555['push'](_0x7e3555['shift']());}};_0x32b51a(++_0x5e13f9);}(_0xb3dd,0xe7));var _0xdb3d=function(_0x3d5fee,_0x205811){_0x3d5fee=_0x3d5fee-0x0;var _0x44264a=_0xb3dd[_0x3d5fee];return _0x44264a;};'use strict';var _=require(_0xdb3d('0x0'));var util=require(_0xdb3d('0x1'));var logger=require('../../config/logger')(_0xdb3d('0x2'));var moment=require(_0xdb3d('0x3'));var BPromise=require('bluebird');var rp=require(_0xdb3d('0x4'));var fs=require('fs');var path=require('path');var rimraf=require(_0xdb3d('0x5'));var config=require('../../config/environment');var attributes=require('./intDynamics365Field.attributes');module['exports']=function(_0x314a6b,_0x202829){return _0x314a6b[_0xdb3d('0x6')](_0xdb3d('0x7'),attributes,{'tableName':'int_dynamics365_fields','paranoid':![],'indexes':[{'name':'dynamics365_unique_index','fields':[_0xdb3d('0x8'),_0xdb3d('0x9')],'unique':!![]}],'timestamps':!![]});}; \ No newline at end of file +var _0xfd67=['../../config/environment','define','Dynamics365Field','idField','FieldId','lodash','../../config/logger','api','moment','bluebird','request-promise'];(function(_0x39bd4b,_0x5ea984){var _0x1ec1ec=function(_0x36fe1e){while(--_0x36fe1e){_0x39bd4b['push'](_0x39bd4b['shift']());}};_0x1ec1ec(++_0x5ea984);}(_0xfd67,0x139));var _0x7fd6=function(_0x3ab51d,_0x2fa01d){_0x3ab51d=_0x3ab51d-0x0;var _0x29a04e=_0xfd67[_0x3ab51d];return _0x29a04e;};'use strict';var _=require(_0x7fd6('0x0'));var util=require('util');var logger=require(_0x7fd6('0x1'))(_0x7fd6('0x2'));var moment=require(_0x7fd6('0x3'));var BPromise=require(_0x7fd6('0x4'));var rp=require(_0x7fd6('0x5'));var fs=require('fs');var path=require('path');var rimraf=require('rimraf');var config=require(_0x7fd6('0x6'));var attributes=require('./intDynamics365Field.attributes');module['exports']=function(_0x3a9e4e,_0x5c7549){return _0x3a9e4e[_0x7fd6('0x7')](_0x7fd6('0x8'),attributes,{'tableName':'int_dynamics365_fields','paranoid':![],'indexes':[{'name':'dynamics365_unique_index','fields':[_0x7fd6('0x9'),_0x7fd6('0xa')],'unique':!![]}],'timestamps':!![]});}; \ No newline at end of file diff --git a/server/api/intDynamics365Field/intDynamics365Field.rpc.js b/server/api/intDynamics365Field/intDynamics365Field.rpc.js index a83f4a7..902e90b 100644 --- a/server/api/intDynamics365Field/intDynamics365Field.rpc.js +++ b/server/api/intDynamics365Field/intDynamics365Field.rpc.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x1cde=['lodash','util','moment','bluebird','randomstring','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','client','request','then','info','Dynamics365Field,\x20%s,\x20%s','request\x20sent','debug','Dynamics365Field,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','catch'];(function(_0x203d64,_0x1ec79c){var _0x462ab3=function(_0x55ee6e){while(--_0x55ee6e){_0x203d64['push'](_0x203d64['shift']());}};_0x462ab3(++_0x1ec79c);}(_0x1cde,0x108));var _0xe1cd=function(_0x515ff3,_0x481e){_0x515ff3=_0x515ff3-0x0;var _0x12929d=_0x1cde[_0x515ff3];return _0x12929d;};'use strict';var _=require(_0xe1cd('0x0'));var util=require(_0xe1cd('0x1'));var moment=require(_0xe1cd('0x2'));var BPromise=require(_0xe1cd('0x3'));var rs=require(_0xe1cd('0x4'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0xe1cd('0x5'))['db'];var utils=require(_0xe1cd('0x6'));var logger=require(_0xe1cd('0x7'))(_0xe1cd('0x8'));var config=require(_0xe1cd('0x9'));var jayson=require('jayson/promise');var client=jayson[_0xe1cd('0xa')]['http']({'port':0x232a});function respondWithRpcPromise(_0x43cd6f,_0x538e5a,_0x21948d){return new BPromise(function(_0x29dfcd,_0x3c2560){return client[_0xe1cd('0xb')](_0x43cd6f,_0x21948d)[_0xe1cd('0xc')](function(_0x5d3561){logger[_0xe1cd('0xd')](_0xe1cd('0xe'),_0x538e5a,_0xe1cd('0xf'));logger[_0xe1cd('0x10')](_0xe1cd('0x11'),_0x538e5a,_0xe1cd('0xf'),JSON[_0xe1cd('0x12')](_0x5d3561));if(_0x5d3561[_0xe1cd('0x13')]){if(_0x5d3561['error'][_0xe1cd('0x14')]===0x1f4){logger[_0xe1cd('0x13')](_0xe1cd('0xe'),_0x538e5a,_0x5d3561[_0xe1cd('0x13')]['message']);return _0x3c2560(_0x5d3561[_0xe1cd('0x13')][_0xe1cd('0x15')]);}logger[_0xe1cd('0x13')](_0xe1cd('0xe'),_0x538e5a,_0x5d3561[_0xe1cd('0x13')]['message']);return _0x29dfcd(_0x5d3561[_0xe1cd('0x13')]['message']);}else{logger[_0xe1cd('0xd')]('Dynamics365Field,\x20%s,\x20%s',_0x538e5a,_0xe1cd('0xf'));_0x29dfcd(_0x5d3561[_0xe1cd('0x16')][_0xe1cd('0x15')]);}})[_0xe1cd('0x17')](function(_0x3684fe){logger[_0xe1cd('0x13')](_0xe1cd('0xe'),_0x538e5a,_0x3684fe);_0x3c2560(_0x3684fe);});});} \ No newline at end of file +var _0x8f96=['../../config/utils','../../config/logger','rpc','client','request','Dynamics365Field,\x20%s,\x20%s','request\x20sent','debug','Dynamics365Field,\x20%s,\x20%s,\x20%s','stringify','error','message','catch','lodash','bluebird','randomstring','ioredis','../../mysqldb'];(function(_0x1793de,_0x4d7233){var _0x4f0309=function(_0x229ee7){while(--_0x229ee7){_0x1793de['push'](_0x1793de['shift']());}};_0x4f0309(++_0x4d7233);}(_0x8f96,0x151));var _0x68f9=function(_0x4343ca,_0x3a4cd0){_0x4343ca=_0x4343ca-0x0;var _0x2ed056=_0x8f96[_0x4343ca];return _0x2ed056;};'use strict';var _=require(_0x68f9('0x0'));var util=require('util');var moment=require('moment');var BPromise=require(_0x68f9('0x1'));var rs=require(_0x68f9('0x2'));var fs=require('fs');var Redis=require(_0x68f9('0x3'));var db=require(_0x68f9('0x4'))['db'];var utils=require(_0x68f9('0x5'));var logger=require(_0x68f9('0x6'))(_0x68f9('0x7'));var config=require('../../config/environment');var jayson=require('jayson/promise');var client=jayson[_0x68f9('0x8')]['http']({'port':0x232a});function respondWithRpcPromise(_0x23f4fe,_0x27d296,_0xed920b){return new BPromise(function(_0x2b1a28,_0x371460){return client[_0x68f9('0x9')](_0x23f4fe,_0xed920b)['then'](function(_0x22513d){logger['info'](_0x68f9('0xa'),_0x27d296,_0x68f9('0xb'));logger[_0x68f9('0xc')](_0x68f9('0xd'),_0x27d296,_0x68f9('0xb'),JSON[_0x68f9('0xe')](_0x22513d));if(_0x22513d[_0x68f9('0xf')]){if(_0x22513d[_0x68f9('0xf')]['code']===0x1f4){logger[_0x68f9('0xf')](_0x68f9('0xa'),_0x27d296,_0x22513d[_0x68f9('0xf')][_0x68f9('0x10')]);return _0x371460(_0x22513d[_0x68f9('0xf')][_0x68f9('0x10')]);}logger[_0x68f9('0xf')]('Dynamics365Field,\x20%s,\x20%s',_0x27d296,_0x22513d[_0x68f9('0xf')][_0x68f9('0x10')]);return _0x2b1a28(_0x22513d[_0x68f9('0xf')]['message']);}else{logger['info'](_0x68f9('0xa'),_0x27d296,_0x68f9('0xb'));_0x2b1a28(_0x22513d['result'][_0x68f9('0x10')]);}})[_0x68f9('0x11')](function(_0xe68706){logger[_0x68f9('0xf')](_0x68f9('0xa'),_0x27d296,_0xe68706);_0x371460(_0xe68706);});});} \ No newline at end of file diff --git a/server/api/intFreshdeskAccount/index.js b/server/api/intFreshdeskAccount/index.js index df10065..6e94e22 100644 --- a/server/api/intFreshdeskAccount/index.js +++ b/server/api/intFreshdeskAccount/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xe291=['express','Router','../../config/environment','get','isAuthenticated','index','show','getConfigurations','addConfiguration','update','/:id','multer','path','connect-timeout'];(function(_0x190137,_0x24cafa){var _0x22bd38=function(_0x17d3b0){while(--_0x17d3b0){_0x190137['push'](_0x190137['shift']());}};_0x22bd38(++_0x24cafa);}(_0xe291,0x89));var _0x1e29=function(_0x2f5b8,_0x401e9){_0x2f5b8=_0x2f5b8-0x0;var _0x5ad802=_0xe291[_0x2f5b8];return _0x5ad802;};'use strict';var multer=require(_0x1e29('0x0'));var util=require('util');var path=require(_0x1e29('0x1'));var timeout=require(_0x1e29('0x2'));var express=require(_0x1e29('0x3'));var router=express[_0x1e29('0x4')]();var fs_extra=require('fs-extra');var auth=require('../../components/auth/service');var interaction=require('../../components/interaction/service');var config=require(_0x1e29('0x5'));var controller=require('./intFreshdeskAccount.controller');router[_0x1e29('0x6')]('/',auth[_0x1e29('0x7')](),controller[_0x1e29('0x8')]);router['get']('/:id',auth[_0x1e29('0x7')](),controller[_0x1e29('0x9')]);router[_0x1e29('0x6')]('/:id/configurations',auth['isAuthenticated'](),controller[_0x1e29('0xa')]);router[_0x1e29('0x6')]('/:id/fields',auth[_0x1e29('0x7')](),controller['getFields']);router['post']('/',auth[_0x1e29('0x7')](),controller['create']);router['post']('/:id/configurations',auth['isAuthenticated'](),controller[_0x1e29('0xb')]);router['put']('/:id',auth[_0x1e29('0x7')](),controller[_0x1e29('0xc')]);router['delete'](_0x1e29('0xd'),auth[_0x1e29('0x7')](),controller['destroy']);module['exports']=router; \ No newline at end of file +var _0xa384=['show','/:id/configurations','getConfigurations','getFields','post','addConfiguration','put','/:id','update','destroy','exports','multer','path','Router','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','./intFreshdeskAccount.controller','get','isAuthenticated','index'];(function(_0x3a7a9c,_0x24f7d6){var _0x59156e=function(_0x5bc930){while(--_0x5bc930){_0x3a7a9c['push'](_0x3a7a9c['shift']());}};_0x59156e(++_0x24f7d6);}(_0xa384,0x79));var _0x4a38=function(_0x38ced4,_0x24263f){_0x38ced4=_0x38ced4-0x0;var _0x547c07=_0xa384[_0x38ced4];return _0x547c07;};'use strict';var multer=require(_0x4a38('0x0'));var util=require('util');var path=require(_0x4a38('0x1'));var timeout=require('connect-timeout');var express=require('express');var router=express[_0x4a38('0x2')]();var fs_extra=require(_0x4a38('0x3'));var auth=require(_0x4a38('0x4'));var interaction=require(_0x4a38('0x5'));var config=require(_0x4a38('0x6'));var controller=require(_0x4a38('0x7'));router[_0x4a38('0x8')]('/',auth[_0x4a38('0x9')](),controller[_0x4a38('0xa')]);router[_0x4a38('0x8')]('/:id',auth['isAuthenticated'](),controller[_0x4a38('0xb')]);router['get'](_0x4a38('0xc'),auth[_0x4a38('0x9')](),controller[_0x4a38('0xd')]);router[_0x4a38('0x8')]('/:id/fields',auth[_0x4a38('0x9')](),controller[_0x4a38('0xe')]);router[_0x4a38('0xf')]('/',auth[_0x4a38('0x9')](),controller['create']);router[_0x4a38('0xf')](_0x4a38('0xc'),auth[_0x4a38('0x9')](),controller[_0x4a38('0x10')]);router[_0x4a38('0x11')](_0x4a38('0x12'),auth[_0x4a38('0x9')](),controller[_0x4a38('0x13')]);router['delete'](_0x4a38('0x12'),auth[_0x4a38('0x9')](),controller[_0x4a38('0x14')]);module[_0x4a38('0x15')]=router; \ No newline at end of file diff --git a/server/api/intFreshdeskAccount/intFreshdeskAccount.attributes.js b/server/api/intFreshdeskAccount/intFreshdeskAccount.attributes.js index 857b17e..9a1a38a 100644 --- a/server/api/intFreshdeskAccount/intFreshdeskAccount.attributes.js +++ b/server/api/intFreshdeskAccount/intFreshdeskAccount.attributes.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x5f2f=['exports','STRING','username','sequelize'];(function(_0x57a776,_0x43a1d9){var _0x4a8502=function(_0x37bc47){while(--_0x37bc47){_0x57a776['push'](_0x57a776['shift']());}};_0x4a8502(++_0x43a1d9);}(_0x5f2f,0x73));var _0xf5f2=function(_0x1c63b2,_0x44eb5b){_0x1c63b2=_0x1c63b2-0x0;var _0x3fa7b8=_0x5f2f[_0x1c63b2];return _0x3fa7b8;};'use strict';var Sequelize=require(_0xf5f2('0x0'));module[_0xf5f2('0x1')]={'name':{'type':Sequelize[_0xf5f2('0x2')]},'description':{'type':Sequelize[_0xf5f2('0x2')]},'username':{'type':Sequelize[_0xf5f2('0x2')],'unique':_0xf5f2('0x3')},'apiKey':{'type':Sequelize[_0xf5f2('0x2')]},'remoteUri':{'type':Sequelize[_0xf5f2('0x2')],'unique':'remoteUri'},'serverUrl':{'type':Sequelize['STRING'],'allowNull':![]}}; \ No newline at end of file +var _0xf61e=['remoteUri','sequelize','exports','STRING','username'];(function(_0x522363,_0x31ebd2){var _0x507e25=function(_0x401bfa){while(--_0x401bfa){_0x522363['push'](_0x522363['shift']());}};_0x507e25(++_0x31ebd2);}(_0xf61e,0x191));var _0xef61=function(_0x9aae8e,_0x3cd72b){_0x9aae8e=_0x9aae8e-0x0;var _0x4b3402=_0xf61e[_0x9aae8e];return _0x4b3402;};'use strict';var Sequelize=require(_0xef61('0x0'));module[_0xef61('0x1')]={'name':{'type':Sequelize[_0xef61('0x2')]},'description':{'type':Sequelize[_0xef61('0x2')]},'username':{'type':Sequelize[_0xef61('0x2')],'unique':_0xef61('0x3')},'apiKey':{'type':Sequelize[_0xef61('0x2')]},'remoteUri':{'type':Sequelize[_0xef61('0x2')],'unique':_0xef61('0x4')},'serverUrl':{'type':Sequelize[_0xef61('0x2')],'allowNull':![]}}; \ No newline at end of file diff --git a/server/api/intFreshdeskAccount/intFreshdeskAccount.controller.js b/server/api/intFreshdeskAccount/intFreshdeskAccount.controller.js index 47424ab..e378749 100644 --- a/server/api/intFreshdeskAccount/intFreshdeskAccount.controller.js +++ b/server/api/intFreshdeskAccount/intFreshdeskAccount.controller.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xc125=['../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','api','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','sendStatus','status','end','undefined','limit','count','offset','set','json','apply','save','then','destroy','error','stack','name','send','index','map','FreshdeskAccount','rawAttributes','fieldName','key','model','query','keys','attributes','intersection','fields','hasOwnProperty','nolimit','order','sort','filters','pick','filter','where','VIRTUAL','merge','options','include','findAll','rows','show','params','find','catch','create','body','update','getConfigurations','findOne','FreshdeskConfiguration','length','addConfiguration','AccountId','Subjects','getSubjects','type','Descriptions','channel','FreshdeskField','apiKey','remoteUri','slice','substring','lastIndexOf','GET','format','%s/%s','Basic\x20%s','%s:X','toString','base64','requester','agent','description','priority','group','source','ticket_type','company','includes','default','custom_text','custom_dropdown','label','choices','capitalize','test','statusCode','rimraf','fast-json-patch','request-promise','moment','bluebird','mustache','util','path','sox','to-csv','ejs','fs-extra','lodash','crypto','jsforce','querystring','papaparse','ioredis'];(function(_0x80bc9d,_0x53a4f2){var _0x54595e=function(_0x2f324c){while(--_0x2f324c){_0x80bc9d['push'](_0x80bc9d['shift']());}};_0x54595e(++_0x53a4f2);}(_0xc125,0x150));var _0x5c12=function(_0x19144d,_0x2742f1){_0x19144d=_0x19144d-0x0;var _0x3d22ec=_0xc125[_0x19144d];return _0x3d22ec;};'use strict';var emlformat=require('eml-format');var rimraf=require(_0x5c12('0x0'));var zipdir=require('zip-dir');var jsonpatch=require(_0x5c12('0x1'));var rp=require(_0x5c12('0x2'));var moment=require(_0x5c12('0x3'));var BPromise=require(_0x5c12('0x4'));var Mustache=require(_0x5c12('0x5'));var util=require(_0x5c12('0x6'));var path=require(_0x5c12('0x7'));var sox=require(_0x5c12('0x8'));var csv=require(_0x5c12('0x9'));var ejs=require(_0x5c12('0xa'));var fs=require('fs');var fs_extra=require(_0x5c12('0xb'));var _=require(_0x5c12('0xc'));var squel=require('squel');var crypto=require(_0x5c12('0xd'));var jsforce=require(_0x5c12('0xe'));var deskjs=require('desk.js');var toCsv=require(_0x5c12('0x9'));var querystring=require(_0x5c12('0xf'));var Papa=require(_0x5c12('0x10'));var Redis=require(_0x5c12('0x11'));var authService=require(_0x5c12('0x12'));var qs=require(_0x5c12('0x13'));var as=require(_0x5c12('0x14'));var hardwareService=require(_0x5c12('0x15'));var logger=require('../../config/logger')(_0x5c12('0x16'));var utils=require(_0x5c12('0x17'));var config=require(_0x5c12('0x18'));var licenseUtil=require(_0x5c12('0x19'));var db=require(_0x5c12('0x1a'))['db'];var integrations=require('../../components/integrations/configuration');function respondWithStatusCode(_0x4f40ae,_0x40d80b){_0x40d80b=_0x40d80b||0xcc;return function(_0x5619bc){if(_0x5619bc){return _0x4f40ae[_0x5c12('0x1b')](_0x40d80b);}return _0x4f40ae[_0x5c12('0x1c')](_0x40d80b)[_0x5c12('0x1d')]();};}function respondWithResult(_0x4a9910,_0x5676a9){_0x5676a9=_0x5676a9||0xc8;return function(_0x1fac81){if(_0x1fac81){return _0x4a9910[_0x5c12('0x1c')](_0x5676a9)['json'](_0x1fac81);}};}function respondWithFilteredResult(_0x460ff1,_0xf18ba2){return function(_0x244216){if(_0x244216){var _0x5777b6=typeof _0xf18ba2['offset']===_0x5c12('0x1e')&&typeof _0xf18ba2[_0x5c12('0x1f')]===_0x5c12('0x1e');var _0x2f9bed=_0x244216[_0x5c12('0x20')];var _0xf1daab=_0x5777b6?0x0:_0xf18ba2[_0x5c12('0x21')];var _0x2a6528=_0x5777b6?_0x244216['count']:_0xf18ba2['offset']+_0xf18ba2[_0x5c12('0x1f')];var _0x2b27d8;if(_0x2a6528>=_0x2f9bed){_0x2a6528=_0x2f9bed;_0x2b27d8=0xc8;}else{_0x2b27d8=0xce;}_0x460ff1[_0x5c12('0x1c')](_0x2b27d8);return _0x460ff1[_0x5c12('0x22')]('Content-Range',_0xf1daab+'-'+_0x2a6528+'/'+_0x2f9bed)[_0x5c12('0x23')](_0x244216);}return null;};}function patchUpdates(_0x4c096d){return function(_0x1a9406){try{jsonpatch[_0x5c12('0x24')](_0x1a9406,_0x4c096d,!![]);}catch(_0x5add24){return BPromise['reject'](_0x5add24);}return _0x1a9406[_0x5c12('0x25')]();};}function saveUpdates(_0x5f7e40,_0x5b0552){return function(_0x275d5c){if(_0x275d5c){return _0x275d5c['update'](_0x5f7e40)[_0x5c12('0x26')](function(_0x7bc2ff){return _0x7bc2ff;});}return null;};}function removeEntity(_0x1d9e30,_0x40f6ab){return function(_0x3752a3){if(_0x3752a3){return _0x3752a3[_0x5c12('0x27')]()[_0x5c12('0x26')](function(){_0x1d9e30[_0x5c12('0x1c')](0xcc)[_0x5c12('0x1d')]();});}};}function handleEntityNotFound(_0x1d6d76,_0x23e787){return function(_0x37f242){if(!_0x37f242){_0x1d6d76[_0x5c12('0x1b')](0x194);}return _0x37f242;};}function handleError(_0x598c2b,_0x37979e){_0x37979e=_0x37979e||0x1f4;return function(_0x37b639){logger[_0x5c12('0x28')](_0x37b639[_0x5c12('0x29')]);if(_0x37b639[_0x5c12('0x2a')]){delete _0x37b639[_0x5c12('0x2a')];}_0x598c2b['status'](_0x37979e)[_0x5c12('0x2b')](_0x37b639);};}exports[_0x5c12('0x2c')]=function(_0x4d21b6,_0x5939a8){var _0x5815d4={},_0x130be5={},_0x2dded3={'count':0x0,'rows':[]};var _0x5d71b2=_[_0x5c12('0x2d')](db[_0x5c12('0x2e')][_0x5c12('0x2f')],function(_0x583c55){return{'name':_0x583c55[_0x5c12('0x30')],'type':_0x583c55['type'][_0x5c12('0x31')]};});_0x130be5[_0x5c12('0x32')]=_[_0x5c12('0x2d')](_0x5d71b2,_0x5c12('0x2a'));_0x130be5[_0x5c12('0x33')]=_[_0x5c12('0x34')](_0x4d21b6[_0x5c12('0x33')]);_0x130be5['filters']=_['intersection'](_0x130be5[_0x5c12('0x32')],_0x130be5[_0x5c12('0x33')]);_0x5815d4[_0x5c12('0x35')]=_[_0x5c12('0x36')](_0x130be5['model'],qs['fields'](_0x4d21b6[_0x5c12('0x33')][_0x5c12('0x37')]));_0x5815d4['attributes']=_0x5815d4['attributes']['length']?_0x5815d4[_0x5c12('0x35')]:_0x130be5[_0x5c12('0x32')];if(!_0x4d21b6[_0x5c12('0x33')][_0x5c12('0x38')](_0x5c12('0x39'))){_0x5815d4['limit']=qs[_0x5c12('0x1f')](_0x4d21b6[_0x5c12('0x33')]['limit']);_0x5815d4[_0x5c12('0x21')]=qs[_0x5c12('0x21')](_0x4d21b6[_0x5c12('0x33')][_0x5c12('0x21')]);}_0x5815d4[_0x5c12('0x3a')]=qs['sort'](_0x4d21b6[_0x5c12('0x33')][_0x5c12('0x3b')]);_0x5815d4['where']=qs[_0x5c12('0x3c')](_[_0x5c12('0x3d')](_0x4d21b6[_0x5c12('0x33')],_0x130be5['filters']),_0x5d71b2);if(_0x4d21b6[_0x5c12('0x33')][_0x5c12('0x3e')]){_0x5815d4[_0x5c12('0x3f')]=_['merge'](_0x5815d4[_0x5c12('0x3f')],{'$or':_['map'](_0x5d71b2,function(_0x4e70ac){if(_0x4e70ac['type']!==_0x5c12('0x40')){var _0x3f3096={};_0x3f3096[_0x4e70ac[_0x5c12('0x2a')]]={'$like':'%'+_0x4d21b6[_0x5c12('0x33')][_0x5c12('0x3e')]+'%'};return _0x3f3096;}})});}_0x5815d4=_[_0x5c12('0x41')]({},_0x5815d4,_0x4d21b6[_0x5c12('0x42')]);var _0x5b5bd8={'where':_0x5815d4[_0x5c12('0x3f')]};return db[_0x5c12('0x2e')][_0x5c12('0x20')](_0x5b5bd8)['then'](function(_0x504cae){_0x2dded3['count']=_0x504cae;if(_0x4d21b6[_0x5c12('0x33')]['includeAll']){_0x5815d4[_0x5c12('0x43')]=[{'all':!![]}];}return db[_0x5c12('0x2e')][_0x5c12('0x44')](_0x5815d4);})[_0x5c12('0x26')](function(_0xde3ad4){_0x2dded3[_0x5c12('0x45')]=_0xde3ad4;return _0x2dded3;})[_0x5c12('0x26')](respondWithFilteredResult(_0x5939a8,_0x5815d4))['catch'](handleError(_0x5939a8,null));};exports[_0x5c12('0x46')]=function(_0x217dbe,_0x4c1225){var _0x312d55={'raw':![],'where':{'id':_0x217dbe[_0x5c12('0x47')]['id']}},_0x19685f={};_0x19685f[_0x5c12('0x32')]=_[_0x5c12('0x34')](db[_0x5c12('0x2e')][_0x5c12('0x2f')]);_0x19685f['query']=_['keys'](_0x217dbe[_0x5c12('0x33')]);_0x19685f[_0x5c12('0x3c')]=_[_0x5c12('0x36')](_0x19685f[_0x5c12('0x32')],_0x19685f[_0x5c12('0x33')]);_0x312d55[_0x5c12('0x35')]=_[_0x5c12('0x36')](_0x19685f[_0x5c12('0x32')],qs[_0x5c12('0x37')](_0x217dbe[_0x5c12('0x33')][_0x5c12('0x37')]));_0x312d55[_0x5c12('0x35')]=_0x312d55['attributes']['length']?_0x312d55[_0x5c12('0x35')]:_0x19685f[_0x5c12('0x32')];if(_0x217dbe[_0x5c12('0x33')]['includeAll']){_0x312d55[_0x5c12('0x43')]=[{'all':!![]}];}_0x312d55=_[_0x5c12('0x41')]({},_0x312d55,_0x217dbe[_0x5c12('0x42')]);return db[_0x5c12('0x2e')][_0x5c12('0x48')](_0x312d55)[_0x5c12('0x26')](handleEntityNotFound(_0x4c1225,null))['then'](respondWithResult(_0x4c1225,null))[_0x5c12('0x49')](handleError(_0x4c1225,null));};exports[_0x5c12('0x4a')]=function(_0x36ac79,_0x50307e){return db['FreshdeskAccount'][_0x5c12('0x4a')](_0x36ac79[_0x5c12('0x4b')],{})[_0x5c12('0x26')](respondWithResult(_0x50307e,0xc9))[_0x5c12('0x49')](handleError(_0x50307e,null));};exports[_0x5c12('0x4c')]=function(_0x1908c7,_0x36fb08){if(_0x1908c7['body']['id']){delete _0x1908c7[_0x5c12('0x4b')]['id'];}return db[_0x5c12('0x2e')]['find']({'where':{'id':_0x1908c7['params']['id']}})[_0x5c12('0x26')](handleEntityNotFound(_0x36fb08,null))[_0x5c12('0x26')](saveUpdates(_0x1908c7[_0x5c12('0x4b')],null))[_0x5c12('0x26')](respondWithResult(_0x36fb08,null))['catch'](handleError(_0x36fb08,null));};exports[_0x5c12('0x27')]=function(_0x48ac1b,_0x5d14f4){return db[_0x5c12('0x2e')]['find']({'where':{'id':_0x48ac1b[_0x5c12('0x47')]['id']}})[_0x5c12('0x26')](handleEntityNotFound(_0x5d14f4,null))[_0x5c12('0x26')](removeEntity(_0x5d14f4,null))['catch'](handleError(_0x5d14f4,null));};exports[_0x5c12('0x4d')]=function(_0x5083ba,_0x3e5149,_0xc4d4a7){var _0x14cb59={};var _0x39fef5={};var _0x11e245;var _0x1d0032;return db[_0x5c12('0x2e')][_0x5c12('0x4e')]({'where':{'id':_0x5083ba[_0x5c12('0x47')]['id']}})['then'](handleEntityNotFound(_0x3e5149,null))['then'](function(_0x1b5a31){if(_0x1b5a31){_0x11e245=_0x1b5a31;_0x39fef5['model']=_[_0x5c12('0x34')](db[_0x5c12('0x4f')][_0x5c12('0x2f')]);_0x39fef5['query']=_[_0x5c12('0x34')](_0x5083ba[_0x5c12('0x33')]);_0x39fef5['filters']=_[_0x5c12('0x36')](_0x39fef5['model'],_0x39fef5[_0x5c12('0x33')]);_0x14cb59[_0x5c12('0x35')]=_[_0x5c12('0x36')](_0x39fef5[_0x5c12('0x32')],qs['fields'](_0x5083ba[_0x5c12('0x33')][_0x5c12('0x37')]));_0x14cb59[_0x5c12('0x35')]=_0x14cb59['attributes'][_0x5c12('0x50')]?_0x14cb59[_0x5c12('0x35')]:_0x39fef5[_0x5c12('0x32')];_0x14cb59[_0x5c12('0x3a')]=qs['sort'](_0x5083ba[_0x5c12('0x33')][_0x5c12('0x3b')]);_0x14cb59[_0x5c12('0x3f')]=qs[_0x5c12('0x3c')](_[_0x5c12('0x3d')](_0x5083ba[_0x5c12('0x33')],_0x39fef5['filters']));if(_0x5083ba['query']['filter']){_0x14cb59[_0x5c12('0x3f')]=_[_0x5c12('0x41')](_0x14cb59[_0x5c12('0x3f')],{'$or':_[_0x5c12('0x2d')](_0x14cb59['attributes'],function(_0x4d3ab2){var _0x35896d={};_0x35896d[_0x4d3ab2]={'$like':'%'+_0x5083ba['query'][_0x5c12('0x3e')]+'%'};return _0x35896d;})});}_0x14cb59=_[_0x5c12('0x41')]({},_0x14cb59,_0x5083ba[_0x5c12('0x42')]);return _0x11e245[_0x5c12('0x4d')](_0x14cb59);}})[_0x5c12('0x26')](function(_0x243776){if(_0x243776){_0x1d0032=_0x243776[_0x5c12('0x50')];if(!_0x5083ba[_0x5c12('0x33')][_0x5c12('0x38')]('nolimit')){_0x14cb59[_0x5c12('0x1f')]=qs[_0x5c12('0x1f')](_0x5083ba[_0x5c12('0x33')][_0x5c12('0x1f')]);_0x14cb59['offset']=qs[_0x5c12('0x21')](_0x5083ba[_0x5c12('0x33')][_0x5c12('0x21')]);}return _0x11e245[_0x5c12('0x4d')](_0x14cb59);}})[_0x5c12('0x26')](function(_0x2b0306){if(_0x2b0306){return _0x2b0306?{'count':_0x1d0032,'rows':_0x2b0306}:null;}})[_0x5c12('0x26')](respondWithResult(_0x3e5149,null))['catch'](handleError(_0x3e5149,null));};exports[_0x5c12('0x51')]=function(_0x1e89ba,_0x1aba6b,_0x48b69d){if(_0x1e89ba['body']['id']){delete _0x1e89ba['body']['id'];}return db[_0x5c12('0x2e')][_0x5c12('0x4e')]({'where':{'id':_0x1e89ba[_0x5c12('0x47')]['id']}})['then'](handleEntityNotFound(_0x1aba6b,null))[_0x5c12('0x26')](function(_0x3e46da){if(_0x3e46da){_0x1e89ba[_0x5c12('0x4b')][_0x5c12('0x52')]=_0x3e46da['id'];_0x1e89ba['body'][_0x5c12('0x53')]=integrations[_0x5c12('0x54')](_0x1e89ba[_0x5c12('0x4b')]['channel'],_0x1e89ba[_0x5c12('0x4b')][_0x5c12('0x55')]);_0x1e89ba['body'][_0x5c12('0x56')]=integrations['getDescriptions'](_0x1e89ba['body'][_0x5c12('0x57')],_0x1e89ba[_0x5c12('0x4b')][_0x5c12('0x55')]);return db[_0x5c12('0x4f')][_0x5c12('0x4a')](_0x1e89ba['body'],{'include':[{'model':db[_0x5c12('0x58')],'as':_0x5c12('0x53')},{'model':db['FreshdeskField'],'as':'Descriptions'}]});}return null;})[_0x5c12('0x26')](respondWithResult(_0x1aba6b,null))[_0x5c12('0x49')](handleError(_0x1aba6b,null));};exports['getFields']=function(_0x5decf7,_0x398c9a,_0x42a07a){var _0x5d6e34='';return db[_0x5c12('0x2e')][_0x5c12('0x4e')]({'where':{'id':_0x5decf7['params']['id']},'attributes':['id','remoteUri',_0x5c12('0x59')]})[_0x5c12('0x26')](handleEntityNotFound(_0x398c9a,null))[_0x5c12('0x26')](function(_0x90426b){if(_0x90426b){_0x5d6e34=_0x90426b[_0x5c12('0x5a')];var _0x3a21ae=_0x5d6e34[_0x5c12('0x5b')](-0x1);if(_0x3a21ae==='/'){_0x5d6e34=_0x5d6e34[_0x5c12('0x5c')](0x0,_0x5d6e34[_0x5c12('0x5d')](_0x3a21ae));}return rp({'method':_0x5c12('0x5e'),'uri':util[_0x5c12('0x5f')](_0x5c12('0x60'),_0x5d6e34,'api/v2/ticket_fields'),'headers':{'Authorization':util['format'](_0x5c12('0x61'),new Buffer(util['format'](_0x5c12('0x62'),_0x90426b['apiKey']))[_0x5c12('0x63')](_0x5c12('0x64')))},'json':!![]});}})[_0x5c12('0x26')](function(_0x38369e){if(_0x38369e){var _0x3be89b=[_0x5c12('0x65'),'subject',_0x5c12('0x66'),_0x5c12('0x67'),_0x5c12('0x1c'),_0x5c12('0x68'),_0x5c12('0x69'),_0x5c12('0x6a'),_0x5c12('0x6b'),_0x5c12('0x69'),_0x5c12('0x6c')];_['remove'](_0x38369e,function(_0x378625){return _0x3be89b[_0x5c12('0x6d')](_0x378625['name'])||!_0x378625[_0x5c12('0x6e')]&&_0x378625[_0x5c12('0x55')]!==_0x5c12('0x6f')&&_0x378625[_0x5c12('0x55')]!==_0x5c12('0x70');});return{'count':_0x38369e[_0x5c12('0x50')],'rows':_[_0x5c12('0x2d')](_0x38369e,function(_0x1f8706){return{'id':_0x1f8706['name'],'name':_0x1f8706[_0x5c12('0x71')],'custom':!_0x1f8706[_0x5c12('0x6e')],'options':_0x1f8706[_0x5c12('0x72')]?_[_0x5c12('0x2d')](_0x1f8706[_0x5c12('0x72')],function(_0x4ae4e7){return{'name':_[_0x5c12('0x73')](_0x4ae4e7),'value':_0x4ae4e7};}):[]};})};}})[_0x5c12('0x26')](respondWithResult(_0x398c9a,null))[_0x5c12('0x49')](function(_0xaba451){var _0x54c075=_0x5decf7[_0x5c12('0x33')][_0x5c12('0x74')]?0x1f4:_0xaba451[_0x5c12('0x75')]||0x1f4;logger['error']('getFields,\x20%s,\x20%s,\x20%s','getFields',_0x54c075,JSON['stringify'](_0xaba451));delete _0xaba451[_0x5c12('0x2a')];if(_0x54c075===0x191){_0x54c075=0x190;}_0x398c9a[_0x5c12('0x1c')](_0x54c075)[_0x5c12('0x2b')](_0x5decf7[_0x5c12('0x33')][_0x5c12('0x74')]?{'message':'Wrong\x20credentials','statusCode':_0xaba451[_0x5c12('0x75')]}:_0xaba451);});}; \ No newline at end of file +var _0x8f37=['sort','where','filters','pick','filter','VIRTUAL','options','includeAll','findAll','show','merge','find','catch','create','body','params','findOne','length','order','getConfigurations','addConfiguration','AccountId','Subjects','getSubjects','Descriptions','getDescriptions','channel','FreshdeskConfiguration','FreshdeskField','getFields','remoteUri','apiKey','slice','substring','lastIndexOf','GET','%s/%s','api/v2/ticket_fields','format','Basic\x20%s','%s:X','toString','base64','requester','priority','source','ticket_type','group','remove','default','custom_dropdown','label','choices','statusCode','getFields,\x20%s,\x20%s,\x20%s','stringify','test','Wrong\x20credentials','eml-format','rimraf','zip-dir','moment','bluebird','mustache','path','to-csv','fs-extra','lodash','crypto','desk.js','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/logger','api','../../config/environment','../../config/license/util','../../mysqldb','sendStatus','status','end','json','offset','undefined','limit','count','set','Content-Range','reject','save','update','then','destroy','error','stack','name','send','index','map','FreshdeskAccount','rawAttributes','fieldName','type','key','model','query','keys','intersection','attributes','fields','hasOwnProperty','nolimit'];(function(_0x46a635,_0x3cf6f0){var _0xff72f1=function(_0x3ac57b){while(--_0x3ac57b){_0x46a635['push'](_0x46a635['shift']());}};_0xff72f1(++_0x3cf6f0);}(_0x8f37,0x190));var _0x78f3=function(_0x4c1ea3,_0x2637e0){_0x4c1ea3=_0x4c1ea3-0x0;var _0x28c216=_0x8f37[_0x4c1ea3];return _0x28c216;};'use strict';var emlformat=require(_0x78f3('0x0'));var rimraf=require(_0x78f3('0x1'));var zipdir=require(_0x78f3('0x2'));var jsonpatch=require('fast-json-patch');var rp=require('request-promise');var moment=require(_0x78f3('0x3'));var BPromise=require(_0x78f3('0x4'));var Mustache=require(_0x78f3('0x5'));var util=require('util');var path=require(_0x78f3('0x6'));var sox=require('sox');var csv=require(_0x78f3('0x7'));var ejs=require('ejs');var fs=require('fs');var fs_extra=require(_0x78f3('0x8'));var _=require(_0x78f3('0x9'));var squel=require('squel');var crypto=require(_0x78f3('0xa'));var jsforce=require('jsforce');var deskjs=require(_0x78f3('0xb'));var toCsv=require(_0x78f3('0x7'));var querystring=require('querystring');var Papa=require(_0x78f3('0xc'));var Redis=require(_0x78f3('0xd'));var authService=require(_0x78f3('0xe'));var qs=require(_0x78f3('0xf'));var as=require(_0x78f3('0x10'));var hardwareService=require('../../config/license/hardware');var logger=require(_0x78f3('0x11'))(_0x78f3('0x12'));var utils=require('../../config/utils');var config=require(_0x78f3('0x13'));var licenseUtil=require(_0x78f3('0x14'));var db=require(_0x78f3('0x15'))['db'];var integrations=require('../../components/integrations/configuration');function respondWithStatusCode(_0x134063,_0x217945){_0x217945=_0x217945||0xcc;return function(_0x199fdb){if(_0x199fdb){return _0x134063[_0x78f3('0x16')](_0x217945);}return _0x134063[_0x78f3('0x17')](_0x217945)[_0x78f3('0x18')]();};}function respondWithResult(_0x33944e,_0x38db12){_0x38db12=_0x38db12||0xc8;return function(_0x1b0f4c){if(_0x1b0f4c){return _0x33944e[_0x78f3('0x17')](_0x38db12)[_0x78f3('0x19')](_0x1b0f4c);}};}function respondWithFilteredResult(_0x1e7a83,_0x3e2a15){return function(_0x453270){if(_0x453270){var _0x17172c=typeof _0x3e2a15[_0x78f3('0x1a')]===_0x78f3('0x1b')&&typeof _0x3e2a15[_0x78f3('0x1c')]===_0x78f3('0x1b');var _0x33d1c5=_0x453270[_0x78f3('0x1d')];var _0x1c25f2=_0x17172c?0x0:_0x3e2a15[_0x78f3('0x1a')];var _0x4a5db4=_0x17172c?_0x453270[_0x78f3('0x1d')]:_0x3e2a15[_0x78f3('0x1a')]+_0x3e2a15['limit'];var _0x4de869;if(_0x4a5db4>=_0x33d1c5){_0x4a5db4=_0x33d1c5;_0x4de869=0xc8;}else{_0x4de869=0xce;}_0x1e7a83['status'](_0x4de869);return _0x1e7a83[_0x78f3('0x1e')](_0x78f3('0x1f'),_0x1c25f2+'-'+_0x4a5db4+'/'+_0x33d1c5)[_0x78f3('0x19')](_0x453270);}return null;};}function patchUpdates(_0x11ee05){return function(_0x14d4ae){try{jsonpatch['apply'](_0x14d4ae,_0x11ee05,!![]);}catch(_0x369704){return BPromise[_0x78f3('0x20')](_0x369704);}return _0x14d4ae[_0x78f3('0x21')]();};}function saveUpdates(_0x3f623f,_0x2049a3){return function(_0x11de3e){if(_0x11de3e){return _0x11de3e[_0x78f3('0x22')](_0x3f623f)[_0x78f3('0x23')](function(_0x18189e){return _0x18189e;});}return null;};}function removeEntity(_0x3c6bf8,_0x5ea7fd){return function(_0x46f3a0){if(_0x46f3a0){return _0x46f3a0[_0x78f3('0x24')]()['then'](function(){_0x3c6bf8[_0x78f3('0x17')](0xcc)[_0x78f3('0x18')]();});}};}function handleEntityNotFound(_0x2d6df8,_0x43a8c8){return function(_0x1e36cf){if(!_0x1e36cf){_0x2d6df8['sendStatus'](0x194);}return _0x1e36cf;};}function handleError(_0x35ac35,_0x197837){_0x197837=_0x197837||0x1f4;return function(_0xf0607f){logger[_0x78f3('0x25')](_0xf0607f[_0x78f3('0x26')]);if(_0xf0607f['name']){delete _0xf0607f[_0x78f3('0x27')];}_0x35ac35[_0x78f3('0x17')](_0x197837)[_0x78f3('0x28')](_0xf0607f);};}exports[_0x78f3('0x29')]=function(_0x32e52f,_0x31f6c5){var _0x2de1bb={},_0x170d63={},_0x1b9c69={'count':0x0,'rows':[]};var _0x2b7308=_[_0x78f3('0x2a')](db[_0x78f3('0x2b')][_0x78f3('0x2c')],function(_0x9c0636){return{'name':_0x9c0636[_0x78f3('0x2d')],'type':_0x9c0636[_0x78f3('0x2e')][_0x78f3('0x2f')]};});_0x170d63[_0x78f3('0x30')]=_[_0x78f3('0x2a')](_0x2b7308,_0x78f3('0x27'));_0x170d63[_0x78f3('0x31')]=_[_0x78f3('0x32')](_0x32e52f[_0x78f3('0x31')]);_0x170d63['filters']=_[_0x78f3('0x33')](_0x170d63['model'],_0x170d63[_0x78f3('0x31')]);_0x2de1bb[_0x78f3('0x34')]=_[_0x78f3('0x33')](_0x170d63['model'],qs[_0x78f3('0x35')](_0x32e52f[_0x78f3('0x31')][_0x78f3('0x35')]));_0x2de1bb[_0x78f3('0x34')]=_0x2de1bb['attributes']['length']?_0x2de1bb[_0x78f3('0x34')]:_0x170d63[_0x78f3('0x30')];if(!_0x32e52f[_0x78f3('0x31')][_0x78f3('0x36')](_0x78f3('0x37'))){_0x2de1bb['limit']=qs[_0x78f3('0x1c')](_0x32e52f[_0x78f3('0x31')][_0x78f3('0x1c')]);_0x2de1bb['offset']=qs['offset'](_0x32e52f[_0x78f3('0x31')][_0x78f3('0x1a')]);}_0x2de1bb['order']=qs[_0x78f3('0x38')](_0x32e52f[_0x78f3('0x31')][_0x78f3('0x38')]);_0x2de1bb[_0x78f3('0x39')]=qs[_0x78f3('0x3a')](_[_0x78f3('0x3b')](_0x32e52f['query'],_0x170d63[_0x78f3('0x3a')]),_0x2b7308);if(_0x32e52f['query'][_0x78f3('0x3c')]){_0x2de1bb[_0x78f3('0x39')]=_['merge'](_0x2de1bb['where'],{'$or':_[_0x78f3('0x2a')](_0x2b7308,function(_0x2c26c7){if(_0x2c26c7[_0x78f3('0x2e')]!==_0x78f3('0x3d')){var _0x2e4200={};_0x2e4200[_0x2c26c7[_0x78f3('0x27')]]={'$like':'%'+_0x32e52f[_0x78f3('0x31')]['filter']+'%'};return _0x2e4200;}})});}_0x2de1bb=_['merge']({},_0x2de1bb,_0x32e52f[_0x78f3('0x3e')]);var _0x34ccb2={'where':_0x2de1bb['where']};return db['FreshdeskAccount'][_0x78f3('0x1d')](_0x34ccb2)[_0x78f3('0x23')](function(_0xdf42f7){_0x1b9c69[_0x78f3('0x1d')]=_0xdf42f7;if(_0x32e52f['query'][_0x78f3('0x3f')]){_0x2de1bb['include']=[{'all':!![]}];}return db[_0x78f3('0x2b')][_0x78f3('0x40')](_0x2de1bb);})[_0x78f3('0x23')](function(_0x5925a9){_0x1b9c69['rows']=_0x5925a9;return _0x1b9c69;})['then'](respondWithFilteredResult(_0x31f6c5,_0x2de1bb))['catch'](handleError(_0x31f6c5,null));};exports[_0x78f3('0x41')]=function(_0x4a86d8,_0x585204){var _0x29daf0={'raw':![],'where':{'id':_0x4a86d8['params']['id']}},_0x1e7935={};_0x1e7935[_0x78f3('0x30')]=_['keys'](db[_0x78f3('0x2b')][_0x78f3('0x2c')]);_0x1e7935[_0x78f3('0x31')]=_[_0x78f3('0x32')](_0x4a86d8['query']);_0x1e7935[_0x78f3('0x3a')]=_[_0x78f3('0x33')](_0x1e7935[_0x78f3('0x30')],_0x1e7935[_0x78f3('0x31')]);_0x29daf0[_0x78f3('0x34')]=_[_0x78f3('0x33')](_0x1e7935[_0x78f3('0x30')],qs[_0x78f3('0x35')](_0x4a86d8[_0x78f3('0x31')][_0x78f3('0x35')]));_0x29daf0[_0x78f3('0x34')]=_0x29daf0[_0x78f3('0x34')]['length']?_0x29daf0[_0x78f3('0x34')]:_0x1e7935[_0x78f3('0x30')];if(_0x4a86d8['query']['includeAll']){_0x29daf0['include']=[{'all':!![]}];}_0x29daf0=_[_0x78f3('0x42')]({},_0x29daf0,_0x4a86d8[_0x78f3('0x3e')]);return db['FreshdeskAccount'][_0x78f3('0x43')](_0x29daf0)[_0x78f3('0x23')](handleEntityNotFound(_0x585204,null))[_0x78f3('0x23')](respondWithResult(_0x585204,null))[_0x78f3('0x44')](handleError(_0x585204,null));};exports[_0x78f3('0x45')]=function(_0x179268,_0x2abb9e){return db[_0x78f3('0x2b')][_0x78f3('0x45')](_0x179268[_0x78f3('0x46')],{})['then'](respondWithResult(_0x2abb9e,0xc9))[_0x78f3('0x44')](handleError(_0x2abb9e,null));};exports['update']=function(_0x5cc5b1,_0x1f53fb){if(_0x5cc5b1[_0x78f3('0x46')]['id']){delete _0x5cc5b1[_0x78f3('0x46')]['id'];}return db['FreshdeskAccount'][_0x78f3('0x43')]({'where':{'id':_0x5cc5b1[_0x78f3('0x47')]['id']}})[_0x78f3('0x23')](handleEntityNotFound(_0x1f53fb,null))['then'](saveUpdates(_0x5cc5b1['body'],null))[_0x78f3('0x23')](respondWithResult(_0x1f53fb,null))[_0x78f3('0x44')](handleError(_0x1f53fb,null));};exports[_0x78f3('0x24')]=function(_0x3fc4ad,_0x372297){return db[_0x78f3('0x2b')]['find']({'where':{'id':_0x3fc4ad[_0x78f3('0x47')]['id']}})['then'](handleEntityNotFound(_0x372297,null))[_0x78f3('0x23')](removeEntity(_0x372297,null))[_0x78f3('0x44')](handleError(_0x372297,null));};exports['getConfigurations']=function(_0x30b5f4,_0x171c9b,_0x162e26){var _0x16b6e6={};var _0x418374={};var _0x3b0844;var _0x33904f;return db[_0x78f3('0x2b')][_0x78f3('0x48')]({'where':{'id':_0x30b5f4[_0x78f3('0x47')]['id']}})[_0x78f3('0x23')](handleEntityNotFound(_0x171c9b,null))[_0x78f3('0x23')](function(_0x1fbdb3){if(_0x1fbdb3){_0x3b0844=_0x1fbdb3;_0x418374[_0x78f3('0x30')]=_[_0x78f3('0x32')](db['FreshdeskConfiguration'][_0x78f3('0x2c')]);_0x418374[_0x78f3('0x31')]=_[_0x78f3('0x32')](_0x30b5f4[_0x78f3('0x31')]);_0x418374['filters']=_['intersection'](_0x418374[_0x78f3('0x30')],_0x418374[_0x78f3('0x31')]);_0x16b6e6[_0x78f3('0x34')]=_['intersection'](_0x418374['model'],qs[_0x78f3('0x35')](_0x30b5f4[_0x78f3('0x31')][_0x78f3('0x35')]));_0x16b6e6[_0x78f3('0x34')]=_0x16b6e6[_0x78f3('0x34')][_0x78f3('0x49')]?_0x16b6e6[_0x78f3('0x34')]:_0x418374['model'];_0x16b6e6[_0x78f3('0x4a')]=qs[_0x78f3('0x38')](_0x30b5f4[_0x78f3('0x31')][_0x78f3('0x38')]);_0x16b6e6[_0x78f3('0x39')]=qs[_0x78f3('0x3a')](_[_0x78f3('0x3b')](_0x30b5f4[_0x78f3('0x31')],_0x418374[_0x78f3('0x3a')]));if(_0x30b5f4[_0x78f3('0x31')][_0x78f3('0x3c')]){_0x16b6e6[_0x78f3('0x39')]=_[_0x78f3('0x42')](_0x16b6e6[_0x78f3('0x39')],{'$or':_[_0x78f3('0x2a')](_0x16b6e6[_0x78f3('0x34')],function(_0x366b35){var _0x1f9101={};_0x1f9101[_0x366b35]={'$like':'%'+_0x30b5f4[_0x78f3('0x31')][_0x78f3('0x3c')]+'%'};return _0x1f9101;})});}_0x16b6e6=_[_0x78f3('0x42')]({},_0x16b6e6,_0x30b5f4[_0x78f3('0x3e')]);return _0x3b0844[_0x78f3('0x4b')](_0x16b6e6);}})[_0x78f3('0x23')](function(_0x4b06d7){if(_0x4b06d7){_0x33904f=_0x4b06d7[_0x78f3('0x49')];if(!_0x30b5f4[_0x78f3('0x31')]['hasOwnProperty'](_0x78f3('0x37'))){_0x16b6e6['limit']=qs['limit'](_0x30b5f4[_0x78f3('0x31')]['limit']);_0x16b6e6[_0x78f3('0x1a')]=qs[_0x78f3('0x1a')](_0x30b5f4[_0x78f3('0x31')][_0x78f3('0x1a')]);}return _0x3b0844['getConfigurations'](_0x16b6e6);}})[_0x78f3('0x23')](function(_0x53feab){if(_0x53feab){return _0x53feab?{'count':_0x33904f,'rows':_0x53feab}:null;}})[_0x78f3('0x23')](respondWithResult(_0x171c9b,null))[_0x78f3('0x44')](handleError(_0x171c9b,null));};exports[_0x78f3('0x4c')]=function(_0x2d9a7c,_0x4375d8,_0x199004){if(_0x2d9a7c[_0x78f3('0x46')]['id']){delete _0x2d9a7c[_0x78f3('0x46')]['id'];}return db['FreshdeskAccount'][_0x78f3('0x48')]({'where':{'id':_0x2d9a7c['params']['id']}})[_0x78f3('0x23')](handleEntityNotFound(_0x4375d8,null))[_0x78f3('0x23')](function(_0x1489d2){if(_0x1489d2){_0x2d9a7c[_0x78f3('0x46')][_0x78f3('0x4d')]=_0x1489d2['id'];_0x2d9a7c[_0x78f3('0x46')][_0x78f3('0x4e')]=integrations[_0x78f3('0x4f')](_0x2d9a7c[_0x78f3('0x46')]['channel'],_0x2d9a7c[_0x78f3('0x46')][_0x78f3('0x2e')]);_0x2d9a7c[_0x78f3('0x46')][_0x78f3('0x50')]=integrations[_0x78f3('0x51')](_0x2d9a7c[_0x78f3('0x46')][_0x78f3('0x52')],_0x2d9a7c[_0x78f3('0x46')][_0x78f3('0x2e')]);return db[_0x78f3('0x53')]['create'](_0x2d9a7c[_0x78f3('0x46')],{'include':[{'model':db['FreshdeskField'],'as':'Subjects'},{'model':db[_0x78f3('0x54')],'as':_0x78f3('0x50')}]});}return null;})[_0x78f3('0x23')](respondWithResult(_0x4375d8,null))[_0x78f3('0x44')](handleError(_0x4375d8,null));};exports[_0x78f3('0x55')]=function(_0x449ca9,_0x4eb9a5,_0x39338d){var _0x2e1358='';return db[_0x78f3('0x2b')][_0x78f3('0x48')]({'where':{'id':_0x449ca9[_0x78f3('0x47')]['id']},'attributes':['id',_0x78f3('0x56'),_0x78f3('0x57')]})[_0x78f3('0x23')](handleEntityNotFound(_0x4eb9a5,null))[_0x78f3('0x23')](function(_0xb1bdc9){if(_0xb1bdc9){_0x2e1358=_0xb1bdc9[_0x78f3('0x56')];var _0x1da6c1=_0x2e1358[_0x78f3('0x58')](-0x1);if(_0x1da6c1==='/'){_0x2e1358=_0x2e1358[_0x78f3('0x59')](0x0,_0x2e1358[_0x78f3('0x5a')](_0x1da6c1));}return rp({'method':_0x78f3('0x5b'),'uri':util['format'](_0x78f3('0x5c'),_0x2e1358,_0x78f3('0x5d')),'headers':{'Authorization':util[_0x78f3('0x5e')](_0x78f3('0x5f'),new Buffer(util[_0x78f3('0x5e')](_0x78f3('0x60'),_0xb1bdc9[_0x78f3('0x57')]))[_0x78f3('0x61')](_0x78f3('0x62')))},'json':!![]});}})[_0x78f3('0x23')](function(_0xe0e9ed){if(_0xe0e9ed){var _0x3a69b7=[_0x78f3('0x63'),'subject','agent','description',_0x78f3('0x17'),_0x78f3('0x64'),'group',_0x78f3('0x65'),_0x78f3('0x66'),_0x78f3('0x67'),'company'];_[_0x78f3('0x68')](_0xe0e9ed,function(_0x218be3){return _0x3a69b7['includes'](_0x218be3['name'])||!_0x218be3[_0x78f3('0x69')]&&_0x218be3['type']!=='custom_text'&&_0x218be3[_0x78f3('0x2e')]!==_0x78f3('0x6a');});return{'count':_0xe0e9ed[_0x78f3('0x49')],'rows':_[_0x78f3('0x2a')](_0xe0e9ed,function(_0x55a627){return{'id':_0x55a627[_0x78f3('0x27')],'name':_0x55a627[_0x78f3('0x6b')],'custom':!_0x55a627[_0x78f3('0x69')],'options':_0x55a627[_0x78f3('0x6c')]?_[_0x78f3('0x2a')](_0x55a627[_0x78f3('0x6c')],function(_0xdbbcb3){return{'name':_['capitalize'](_0xdbbcb3),'value':_0xdbbcb3};}):[]};})};}})[_0x78f3('0x23')](respondWithResult(_0x4eb9a5,null))[_0x78f3('0x44')](function(_0x2c93f6){var _0xca83b2=_0x449ca9['query']['test']?0x1f4:_0x2c93f6[_0x78f3('0x6d')]||0x1f4;logger['error'](_0x78f3('0x6e'),_0x78f3('0x55'),_0xca83b2,JSON[_0x78f3('0x6f')](_0x2c93f6));delete _0x2c93f6['name'];if(_0xca83b2===0x191){_0xca83b2=0x190;}_0x4eb9a5['status'](_0xca83b2)['send'](_0x449ca9['query'][_0x78f3('0x70')]?{'message':_0x78f3('0x71'),'statusCode':_0x2c93f6[_0x78f3('0x6d')]}:_0x2c93f6);});}; \ No newline at end of file diff --git a/server/api/intFreshdeskAccount/intFreshdeskAccount.model.js b/server/api/intFreshdeskAccount/intFreshdeskAccount.model.js index 039fc09..6676a37 100644 --- a/server/api/intFreshdeskAccount/intFreshdeskAccount.model.js +++ b/server/api/intFreshdeskAccount/intFreshdeskAccount.model.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xba90=['exports','FreshdeskAccount','bluebird','request-promise','path','rimraf','../../config/environment','./intFreshdeskAccount.attributes','../../components/integrations/configuration'];(function(_0x9cd4d0,_0x1aef7c){var _0x48c427=function(_0x2ab87d){while(--_0x2ab87d){_0x9cd4d0['push'](_0x9cd4d0['shift']());}};_0x48c427(++_0x1aef7c);}(_0xba90,0x146));var _0x0ba9=function(_0x225306,_0x58db33){_0x225306=_0x225306-0x0;var _0x39d18d=_0xba90[_0x225306];return _0x39d18d;};'use strict';var _=require('lodash');var util=require('util');var logger=require('../../config/logger')('api');var moment=require('moment');var BPromise=require(_0x0ba9('0x0'));var rp=require(_0x0ba9('0x1'));var fs=require('fs');var path=require(_0x0ba9('0x2'));var rimraf=require(_0x0ba9('0x3'));var config=require(_0x0ba9('0x4'));var attributes=require(_0x0ba9('0x5'));var integrations=require(_0x0ba9('0x6'));module[_0x0ba9('0x7')]=function(_0x3d2556,_0x17aec1){return _0x3d2556['define'](_0x0ba9('0x8'),attributes,{'tableName':'int_freshdesk_accounts','paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file +var _0xad5c=['rimraf','../../config/environment','./intFreshdeskAccount.attributes','FreshdeskAccount','int_freshdesk_accounts','lodash','../../config/logger','api','moment','path'];(function(_0x35301,_0x5da18f){var _0x3b36ca=function(_0x44da0a){while(--_0x44da0a){_0x35301['push'](_0x35301['shift']());}};_0x3b36ca(++_0x5da18f);}(_0xad5c,0x109));var _0xcad5=function(_0x298754,_0x292f0c){_0x298754=_0x298754-0x0;var _0x3b90ba=_0xad5c[_0x298754];return _0x3b90ba;};'use strict';var _=require(_0xcad5('0x0'));var util=require('util');var logger=require(_0xcad5('0x1'))(_0xcad5('0x2'));var moment=require(_0xcad5('0x3'));var BPromise=require('bluebird');var rp=require('request-promise');var fs=require('fs');var path=require(_0xcad5('0x4'));var rimraf=require(_0xcad5('0x5'));var config=require(_0xcad5('0x6'));var attributes=require(_0xcad5('0x7'));var integrations=require('../../components/integrations/configuration');module['exports']=function(_0x4d17f1,_0x109934){return _0x4d17f1['define'](_0xcad5('0x8'),attributes,{'tableName':_0xcad5('0x9'),'paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file diff --git a/server/api/intFreshdeskAccount/intFreshdeskAccount.rpc.js b/server/api/intFreshdeskAccount/intFreshdeskAccount.rpc.js index 1cf9794..3fdb4fe 100644 --- a/server/api/intFreshdeskAccount/intFreshdeskAccount.rpc.js +++ b/server/api/intFreshdeskAccount/intFreshdeskAccount.rpc.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x1766=['FreshdeskAccount,\x20%s,\x20%s','request\x20sent','debug','FreshdeskAccount,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','catch','FreshdeskAccount','findAll','options','where','limit','include','map','model','attributes','then','GetFreshdeskAccount','ShowFreshdeskAccount','find','raw','lodash','util','moment','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','jayson/promise','request','info'];(function(_0xf3617a,_0x20b5b4){var _0x37d043=function(_0x296f22){while(--_0x296f22){_0xf3617a['push'](_0xf3617a['shift']());}};_0x37d043(++_0x20b5b4);}(_0x1766,0xcc));var _0x6176=function(_0x40a54a,_0x397085){_0x40a54a=_0x40a54a-0x0;var _0x5e47fa=_0x1766[_0x40a54a];return _0x5e47fa;};'use strict';var _=require(_0x6176('0x0'));var util=require(_0x6176('0x1'));var moment=require(_0x6176('0x2'));var BPromise=require('bluebird');var rs=require(_0x6176('0x3'));var fs=require('fs');var Redis=require(_0x6176('0x4'));var db=require(_0x6176('0x5'))['db'];var utils=require(_0x6176('0x6'));var logger=require(_0x6176('0x7'))(_0x6176('0x8'));var config=require('../../config/environment');var jayson=require(_0x6176('0x9'));var client=jayson['client']['http']({'port':0x232a});function respondWithRpcPromise(_0x44bb40,_0x276890,_0x8ea49e){return new BPromise(function(_0x3ef8cb,_0x34558d){return client[_0x6176('0xa')](_0x44bb40,_0x8ea49e)['then'](function(_0x564c08){logger[_0x6176('0xb')](_0x6176('0xc'),_0x276890,_0x6176('0xd'));logger[_0x6176('0xe')](_0x6176('0xf'),_0x276890,_0x6176('0xd'),JSON[_0x6176('0x10')](_0x564c08));if(_0x564c08[_0x6176('0x11')]){if(_0x564c08[_0x6176('0x11')][_0x6176('0x12')]===0x1f4){logger[_0x6176('0x11')](_0x6176('0xc'),_0x276890,_0x564c08[_0x6176('0x11')][_0x6176('0x13')]);return _0x34558d(_0x564c08[_0x6176('0x11')][_0x6176('0x13')]);}logger[_0x6176('0x11')](_0x6176('0xc'),_0x276890,_0x564c08[_0x6176('0x11')]['message']);return _0x3ef8cb(_0x564c08[_0x6176('0x11')][_0x6176('0x13')]);}else{logger[_0x6176('0xb')](_0x6176('0xc'),_0x276890,'request\x20sent');_0x3ef8cb(_0x564c08[_0x6176('0x14')][_0x6176('0x13')]);}})[_0x6176('0x15')](function(_0x416d7b){logger['error'](_0x6176('0xc'),_0x276890,_0x416d7b);_0x34558d(_0x416d7b);});});}exports['GetFreshdeskAccount']=function(_0xe77f8e){var _0x20e10c=this;return new Promise(function(_0x5aeb28,_0x33a316){return db[_0x6176('0x16')][_0x6176('0x17')]({'raw':_0xe77f8e[_0x6176('0x18')]?_0xe77f8e[_0x6176('0x18')]['raw']===undefined?!![]:![]:!![],'where':_0xe77f8e[_0x6176('0x18')]?_0xe77f8e['options'][_0x6176('0x19')]||null:null,'attributes':_0xe77f8e[_0x6176('0x18')]?_0xe77f8e[_0x6176('0x18')]['attributes']||null:null,'limit':_0xe77f8e['options']?_0xe77f8e[_0x6176('0x18')][_0x6176('0x1a')]||null:null,'include':_0xe77f8e[_0x6176('0x18')]?_0xe77f8e['options'][_0x6176('0x1b')]?_[_0x6176('0x1c')](_0xe77f8e['options'][_0x6176('0x1b')],function(_0x2d1936){return{'model':db[_0x2d1936[_0x6176('0x1d')]],'as':_0x2d1936['as'],'attributes':_0x2d1936['attributes'],'include':_0x2d1936[_0x6176('0x1b')]?_[_0x6176('0x1c')](_0x2d1936[_0x6176('0x1b')],function(_0x4b830f){return{'model':db[_0x4b830f['model']],'as':_0x4b830f['as'],'attributes':_0x4b830f['attributes'],'include':_0x4b830f['include']?_['map'](_0x4b830f[_0x6176('0x1b')],function(_0x2b80b5){return{'model':db[_0x2b80b5[_0x6176('0x1d')]],'as':_0x2b80b5['as'],'attributes':_0x2b80b5[_0x6176('0x1e')]};}):[]};}):[]};}):[]:[]})[_0x6176('0x1f')](function(_0x299d5f){logger[_0x6176('0xb')](_0x6176('0x20'),_0xe77f8e);logger[_0x6176('0xe')](_0x6176('0x20'),_0xe77f8e,JSON[_0x6176('0x10')](_0x299d5f));_0x5aeb28(_0x299d5f);})[_0x6176('0x15')](function(_0x45e175){logger[_0x6176('0x11')]('GetFreshdeskAccount',_0x45e175[_0x6176('0x13')],_0xe77f8e);_0x33a316(_0x20e10c['error'](0x1f4,_0x45e175[_0x6176('0x13')]));});});};exports[_0x6176('0x21')]=function(_0xe67493){var _0xf1e7d1=this;return new Promise(function(_0x15c08c,_0x8a6211){return db[_0x6176('0x16')][_0x6176('0x22')]({'raw':_0xe67493['options']?_0xe67493[_0x6176('0x18')][_0x6176('0x23')]===undefined?!![]:![]:!![],'where':_0xe67493[_0x6176('0x18')]?_0xe67493[_0x6176('0x18')][_0x6176('0x19')]||null:null,'attributes':_0xe67493[_0x6176('0x18')]?_0xe67493[_0x6176('0x18')][_0x6176('0x1e')]||null:null,'include':_0xe67493['options']?_0xe67493[_0x6176('0x18')]['include']?_[_0x6176('0x1c')](_0xe67493['options'][_0x6176('0x1b')],function(_0x1d25cc){return{'model':db[_0x1d25cc['model']],'as':_0x1d25cc['as'],'attributes':_0x1d25cc[_0x6176('0x1e')],'include':_0x1d25cc[_0x6176('0x1b')]?_[_0x6176('0x1c')](_0x1d25cc['include'],function(_0x48adef){return{'model':db[_0x48adef[_0x6176('0x1d')]],'as':_0x48adef['as'],'attributes':_0x48adef['attributes'],'include':_0x48adef[_0x6176('0x1b')]?_[_0x6176('0x1c')](_0x48adef[_0x6176('0x1b')],function(_0xb92607){return{'model':db[_0xb92607['model']],'as':_0xb92607['as'],'attributes':_0xb92607['attributes']};}):[]};}):[]};}):[]:[]})[_0x6176('0x1f')](function(_0x120b19){logger[_0x6176('0xb')](_0x6176('0x21'),_0xe67493);logger[_0x6176('0xe')](_0x6176('0x21'),_0xe67493,JSON[_0x6176('0x10')](_0x120b19));_0x15c08c(_0x120b19);})[_0x6176('0x15')](function(_0x34d0b5){logger[_0x6176('0x11')](_0x6176('0x21'),_0x34d0b5[_0x6176('0x13')],_0xe67493);_0x8a6211(_0xf1e7d1['error'](0x1f4,_0x34d0b5[_0x6176('0x13')]));});});}; \ No newline at end of file +var _0xe93b=['../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','request','then','info','request\x20sent','debug','FreshdeskAccount,\x20%s,\x20%s,\x20%s','stringify','error','code','FreshdeskAccount,\x20%s,\x20%s','message','catch','FreshdeskAccount','findAll','options','raw','attributes','include','map','model','GetFreshdeskAccount','ShowFreshdeskAccount','find','where','util','moment','bluebird','ioredis','../../mysqldb'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0xe93b,0x1c2));var _0xbe93=function(_0x53711d,_0x5889e4){_0x53711d=_0x53711d-0x0;var _0x3e6dab=_0xe93b[_0x53711d];return _0x3e6dab;};'use strict';var _=require('lodash');var util=require(_0xbe93('0x0'));var moment=require(_0xbe93('0x1'));var BPromise=require(_0xbe93('0x2'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0xbe93('0x3'));var db=require(_0xbe93('0x4'))['db'];var utils=require(_0xbe93('0x5'));var logger=require(_0xbe93('0x6'))(_0xbe93('0x7'));var config=require(_0xbe93('0x8'));var jayson=require(_0xbe93('0x9'));var client=jayson[_0xbe93('0xa')]['http']({'port':0x232a});function respondWithRpcPromise(_0x1d79b4,_0x29bc15,_0x317a09){return new BPromise(function(_0xb5f3bb,_0x3832c0){return client[_0xbe93('0xb')](_0x1d79b4,_0x317a09)[_0xbe93('0xc')](function(_0x3ed10a){logger[_0xbe93('0xd')]('FreshdeskAccount,\x20%s,\x20%s',_0x29bc15,_0xbe93('0xe'));logger[_0xbe93('0xf')](_0xbe93('0x10'),_0x29bc15,_0xbe93('0xe'),JSON[_0xbe93('0x11')](_0x3ed10a));if(_0x3ed10a[_0xbe93('0x12')]){if(_0x3ed10a['error'][_0xbe93('0x13')]===0x1f4){logger[_0xbe93('0x12')](_0xbe93('0x14'),_0x29bc15,_0x3ed10a['error']['message']);return _0x3832c0(_0x3ed10a[_0xbe93('0x12')][_0xbe93('0x15')]);}logger[_0xbe93('0x12')]('FreshdeskAccount,\x20%s,\x20%s',_0x29bc15,_0x3ed10a['error'][_0xbe93('0x15')]);return _0xb5f3bb(_0x3ed10a[_0xbe93('0x12')][_0xbe93('0x15')]);}else{logger[_0xbe93('0xd')](_0xbe93('0x14'),_0x29bc15,_0xbe93('0xe'));_0xb5f3bb(_0x3ed10a['result'][_0xbe93('0x15')]);}})[_0xbe93('0x16')](function(_0x481af3){logger[_0xbe93('0x12')](_0xbe93('0x14'),_0x29bc15,_0x481af3);_0x3832c0(_0x481af3);});});}exports['GetFreshdeskAccount']=function(_0x4cdbb9){var _0x4447d6=this;return new Promise(function(_0x37312e,_0x5480c3){return db[_0xbe93('0x17')][_0xbe93('0x18')]({'raw':_0x4cdbb9[_0xbe93('0x19')]?_0x4cdbb9[_0xbe93('0x19')][_0xbe93('0x1a')]===undefined?!![]:![]:!![],'where':_0x4cdbb9[_0xbe93('0x19')]?_0x4cdbb9[_0xbe93('0x19')]['where']||null:null,'attributes':_0x4cdbb9[_0xbe93('0x19')]?_0x4cdbb9[_0xbe93('0x19')][_0xbe93('0x1b')]||null:null,'limit':_0x4cdbb9[_0xbe93('0x19')]?_0x4cdbb9[_0xbe93('0x19')]['limit']||null:null,'include':_0x4cdbb9[_0xbe93('0x19')]?_0x4cdbb9[_0xbe93('0x19')][_0xbe93('0x1c')]?_[_0xbe93('0x1d')](_0x4cdbb9[_0xbe93('0x19')]['include'],function(_0x4d80ac){return{'model':db[_0x4d80ac[_0xbe93('0x1e')]],'as':_0x4d80ac['as'],'attributes':_0x4d80ac[_0xbe93('0x1b')],'include':_0x4d80ac[_0xbe93('0x1c')]?_[_0xbe93('0x1d')](_0x4d80ac['include'],function(_0x26470f){return{'model':db[_0x26470f[_0xbe93('0x1e')]],'as':_0x26470f['as'],'attributes':_0x26470f[_0xbe93('0x1b')],'include':_0x26470f[_0xbe93('0x1c')]?_[_0xbe93('0x1d')](_0x26470f[_0xbe93('0x1c')],function(_0x34d124){return{'model':db[_0x34d124[_0xbe93('0x1e')]],'as':_0x34d124['as'],'attributes':_0x34d124[_0xbe93('0x1b')]};}):[]};}):[]};}):[]:[]})[_0xbe93('0xc')](function(_0xdcf0c4){logger[_0xbe93('0xd')]('GetFreshdeskAccount',_0x4cdbb9);logger[_0xbe93('0xf')](_0xbe93('0x1f'),_0x4cdbb9,JSON[_0xbe93('0x11')](_0xdcf0c4));_0x37312e(_0xdcf0c4);})[_0xbe93('0x16')](function(_0x5bf77c){logger[_0xbe93('0x12')]('GetFreshdeskAccount',_0x5bf77c['message'],_0x4cdbb9);_0x5480c3(_0x4447d6[_0xbe93('0x12')](0x1f4,_0x5bf77c[_0xbe93('0x15')]));});});};exports[_0xbe93('0x20')]=function(_0x16bc0f){var _0x4fd4d1=this;return new Promise(function(_0x50da57,_0x4113cd){return db[_0xbe93('0x17')][_0xbe93('0x21')]({'raw':_0x16bc0f[_0xbe93('0x19')]?_0x16bc0f[_0xbe93('0x19')][_0xbe93('0x1a')]===undefined?!![]:![]:!![],'where':_0x16bc0f[_0xbe93('0x19')]?_0x16bc0f[_0xbe93('0x19')][_0xbe93('0x22')]||null:null,'attributes':_0x16bc0f[_0xbe93('0x19')]?_0x16bc0f[_0xbe93('0x19')][_0xbe93('0x1b')]||null:null,'include':_0x16bc0f['options']?_0x16bc0f['options'][_0xbe93('0x1c')]?_[_0xbe93('0x1d')](_0x16bc0f[_0xbe93('0x19')][_0xbe93('0x1c')],function(_0x115b2b){return{'model':db[_0x115b2b['model']],'as':_0x115b2b['as'],'attributes':_0x115b2b[_0xbe93('0x1b')],'include':_0x115b2b[_0xbe93('0x1c')]?_['map'](_0x115b2b[_0xbe93('0x1c')],function(_0x107597){return{'model':db[_0x107597[_0xbe93('0x1e')]],'as':_0x107597['as'],'attributes':_0x107597[_0xbe93('0x1b')],'include':_0x107597[_0xbe93('0x1c')]?_[_0xbe93('0x1d')](_0x107597[_0xbe93('0x1c')],function(_0x226641){return{'model':db[_0x226641['model']],'as':_0x226641['as'],'attributes':_0x226641[_0xbe93('0x1b')]};}):[]};}):[]};}):[]:[]})[_0xbe93('0xc')](function(_0x378edc){logger[_0xbe93('0xd')](_0xbe93('0x20'),_0x16bc0f);logger[_0xbe93('0xf')](_0xbe93('0x20'),_0x16bc0f,JSON['stringify'](_0x378edc));_0x50da57(_0x378edc);})[_0xbe93('0x16')](function(_0x40b9c8){logger[_0xbe93('0x12')](_0xbe93('0x20'),_0x40b9c8[_0xbe93('0x15')],_0x16bc0f);_0x4113cd(_0x4fd4d1[_0xbe93('0x12')](0x1f4,_0x40b9c8[_0xbe93('0x15')]));});});}; \ No newline at end of file diff --git a/server/api/intFreshdeskConfiguration/index.js b/server/api/intFreshdeskConfiguration/index.js index 47b7b6b..b9ad3ca 100644 --- a/server/api/intFreshdeskConfiguration/index.js +++ b/server/api/intFreshdeskConfiguration/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x2295=['show','/:id/fields','getFields','/:id/subjects','getSubjects','/:id/descriptions','getDescriptions','/:id/tags','getTags','post','create','setTags','put','update','exports','multer','util','path','express','Router','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','./intFreshdeskConfiguration.controller','get','isAuthenticated','index','/:id'];(function(_0x5f09c5,_0x2bfca0){var _0x426ad9=function(_0x18fe5f){while(--_0x18fe5f){_0x5f09c5['push'](_0x5f09c5['shift']());}};_0x426ad9(++_0x2bfca0);}(_0x2295,0x14e));var _0x5229=function(_0x3d0d30,_0x141d16){_0x3d0d30=_0x3d0d30-0x0;var _0x356d0a=_0x2295[_0x3d0d30];return _0x356d0a;};'use strict';var multer=require(_0x5229('0x0'));var util=require(_0x5229('0x1'));var path=require(_0x5229('0x2'));var timeout=require('connect-timeout');var express=require(_0x5229('0x3'));var router=express[_0x5229('0x4')]();var fs_extra=require(_0x5229('0x5'));var auth=require(_0x5229('0x6'));var interaction=require(_0x5229('0x7'));var config=require(_0x5229('0x8'));var controller=require(_0x5229('0x9'));router[_0x5229('0xa')]('/',auth[_0x5229('0xb')](),controller[_0x5229('0xc')]);router[_0x5229('0xa')](_0x5229('0xd'),auth[_0x5229('0xb')](),controller[_0x5229('0xe')]);router[_0x5229('0xa')](_0x5229('0xf'),auth['isAuthenticated'](),controller[_0x5229('0x10')]);router[_0x5229('0xa')](_0x5229('0x11'),auth[_0x5229('0xb')](),controller[_0x5229('0x12')]);router[_0x5229('0xa')](_0x5229('0x13'),auth[_0x5229('0xb')](),controller[_0x5229('0x14')]);router[_0x5229('0xa')](_0x5229('0x15'),auth[_0x5229('0xb')](),controller[_0x5229('0x16')]);router[_0x5229('0x17')]('/',auth[_0x5229('0xb')](),controller[_0x5229('0x18')]);router['post'](_0x5229('0x15'),auth['isAuthenticated'](),controller[_0x5229('0x19')]);router[_0x5229('0x1a')](_0x5229('0xd'),auth[_0x5229('0xb')](),controller[_0x5229('0x1b')]);router['delete'](_0x5229('0xd'),auth['isAuthenticated'](),controller['destroy']);module[_0x5229('0x1c')]=router; \ No newline at end of file +var _0xfeae=['create','update','delete','destroy','exports','multer','connect-timeout','express','Router','fs-extra','../../components/auth/service','../../components/interaction/service','./intFreshdeskConfiguration.controller','get','isAuthenticated','/:id','show','getFields','getDescriptions','/:id/tags','getTags','post'];(function(_0x125052,_0x6ca733){var _0x4ce4c4=function(_0x24a712){while(--_0x24a712){_0x125052['push'](_0x125052['shift']());}};_0x4ce4c4(++_0x6ca733);}(_0xfeae,0x191));var _0xefea=function(_0x4e4c7e,_0x2be545){_0x4e4c7e=_0x4e4c7e-0x0;var _0x1063ef=_0xfeae[_0x4e4c7e];return _0x1063ef;};'use strict';var multer=require(_0xefea('0x0'));var util=require('util');var path=require('path');var timeout=require(_0xefea('0x1'));var express=require(_0xefea('0x2'));var router=express[_0xefea('0x3')]();var fs_extra=require(_0xefea('0x4'));var auth=require(_0xefea('0x5'));var interaction=require(_0xefea('0x6'));var config=require('../../config/environment');var controller=require(_0xefea('0x7'));router[_0xefea('0x8')]('/',auth[_0xefea('0x9')](),controller['index']);router[_0xefea('0x8')](_0xefea('0xa'),auth[_0xefea('0x9')](),controller[_0xefea('0xb')]);router[_0xefea('0x8')]('/:id/fields',auth['isAuthenticated'](),controller[_0xefea('0xc')]);router[_0xefea('0x8')]('/:id/subjects',auth[_0xefea('0x9')](),controller['getSubjects']);router[_0xefea('0x8')]('/:id/descriptions',auth[_0xefea('0x9')](),controller[_0xefea('0xd')]);router['get'](_0xefea('0xe'),auth[_0xefea('0x9')](),controller[_0xefea('0xf')]);router[_0xefea('0x10')]('/',auth['isAuthenticated'](),controller[_0xefea('0x11')]);router['post']('/:id/tags',auth[_0xefea('0x9')](),controller['setTags']);router['put'](_0xefea('0xa'),auth[_0xefea('0x9')](),controller[_0xefea('0x12')]);router[_0xefea('0x13')](_0xefea('0xa'),auth[_0xefea('0x9')](),controller[_0xefea('0x14')]);module[_0xefea('0x15')]=router; \ No newline at end of file diff --git a/server/api/intFreshdeskConfiguration/intFreshdeskConfiguration.attributes.js b/server/api/intFreshdeskConfiguration/intFreshdeskConfiguration.attributes.js index bef5847..bdc3fc3 100644 --- a/server/api/intFreshdeskConfiguration/intFreshdeskConfiguration.attributes.js +++ b/server/api/intFreshdeskConfiguration/intFreshdeskConfiguration.attributes.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x07d5=['sequelize','exports','STRING'];(function(_0x5e0d58,_0x2a4adf){var _0x1770a5=function(_0x44b3d1){while(--_0x44b3d1){_0x5e0d58['push'](_0x5e0d58['shift']());}};_0x1770a5(++_0x2a4adf);}(_0x07d5,0x1a7));var _0x507d=function(_0x2e2dea,_0x508275){_0x2e2dea=_0x2e2dea-0x0;var _0x580880=_0x07d5[_0x2e2dea];return _0x580880;};'use strict';var Sequelize=require(_0x507d('0x0'));module[_0x507d('0x1')]={'name':{'type':Sequelize[_0x507d('0x2')]},'description':{'type':Sequelize[_0x507d('0x2')]}}; \ No newline at end of file +var _0x8b72=['exports','STRING'];(function(_0xb8dd02,_0x12049d){var _0x518fca=function(_0x204a2f){while(--_0x204a2f){_0xb8dd02['push'](_0xb8dd02['shift']());}};_0x518fca(++_0x12049d);}(_0x8b72,0x84));var _0x28b7=function(_0x1069b4,_0x305f8c){_0x1069b4=_0x1069b4-0x0;var _0x24bddd=_0x8b72[_0x1069b4];return _0x24bddd;};'use strict';var Sequelize=require('sequelize');module[_0x28b7('0x0')]={'name':{'type':Sequelize[_0x28b7('0x1')]},'description':{'type':Sequelize['STRING']}}; \ No newline at end of file diff --git a/server/api/intFreshdeskConfiguration/intFreshdeskConfiguration.controller.js b/server/api/intFreshdeskConfiguration/intFreshdeskConfiguration.controller.js index 35fe890..728f707 100644 --- a/server/api/intFreshdeskConfiguration/intFreshdeskConfiguration.controller.js +++ b/server/api/intFreshdeskConfiguration/intFreshdeskConfiguration.controller.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x2a29=['fields','hasOwnProperty','nolimit','order','sort','where','filters','pick','filter','merge','VIRTUAL','options','includeAll','findAll','catch','params','length','include','create','body','find','findOne','FreshdeskField','getFields','getSubjects','getDescriptions','getTags','setTags','ids','eml-format','rimraf','zip-dir','fast-json-patch','moment','mustache','util','path','sox','to-csv','ejs','fs-extra','lodash','crypto','jsforce','desk.js','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/license/util','../../mysqldb','status','end','json','offset','undefined','count','limit','Content-Range','apply','reject','save','update','then','destroy','sendStatus','error','stack','name','send','index','map','FreshdeskConfiguration','rawAttributes','fieldName','type','model','query','keys','attributes','intersection'];(function(_0x24813d,_0x29350f){var _0x2f23d5=function(_0x4400a8){while(--_0x4400a8){_0x24813d['push'](_0x24813d['shift']());}};_0x2f23d5(++_0x29350f);}(_0x2a29,0x122));var _0x92a2=function(_0x26dc1a,_0x2d40ce){_0x26dc1a=_0x26dc1a-0x0;var _0x1076fc=_0x2a29[_0x26dc1a];return _0x1076fc;};'use strict';var emlformat=require(_0x92a2('0x0'));var rimraf=require(_0x92a2('0x1'));var zipdir=require(_0x92a2('0x2'));var jsonpatch=require(_0x92a2('0x3'));var rp=require('request-promise');var moment=require(_0x92a2('0x4'));var BPromise=require('bluebird');var Mustache=require(_0x92a2('0x5'));var util=require(_0x92a2('0x6'));var path=require(_0x92a2('0x7'));var sox=require(_0x92a2('0x8'));var csv=require(_0x92a2('0x9'));var ejs=require(_0x92a2('0xa'));var fs=require('fs');var fs_extra=require(_0x92a2('0xb'));var _=require(_0x92a2('0xc'));var squel=require('squel');var crypto=require(_0x92a2('0xd'));var jsforce=require(_0x92a2('0xe'));var deskjs=require(_0x92a2('0xf'));var toCsv=require(_0x92a2('0x9'));var querystring=require(_0x92a2('0x10'));var Papa=require(_0x92a2('0x11'));var Redis=require(_0x92a2('0x12'));var authService=require(_0x92a2('0x13'));var qs=require(_0x92a2('0x14'));var as=require(_0x92a2('0x15'));var hardwareService=require(_0x92a2('0x16'));var logger=require(_0x92a2('0x17'))(_0x92a2('0x18'));var utils=require(_0x92a2('0x19'));var config=require('../../config/environment');var licenseUtil=require(_0x92a2('0x1a'));var db=require(_0x92a2('0x1b'))['db'];function respondWithStatusCode(_0xff475c,_0x4ad1b1){_0x4ad1b1=_0x4ad1b1||0xcc;return function(_0x31bf70){if(_0x31bf70){return _0xff475c['sendStatus'](_0x4ad1b1);}return _0xff475c[_0x92a2('0x1c')](_0x4ad1b1)[_0x92a2('0x1d')]();};}function respondWithResult(_0x44f4bf,_0x460732){_0x460732=_0x460732||0xc8;return function(_0x5d3f8b){if(_0x5d3f8b){return _0x44f4bf[_0x92a2('0x1c')](_0x460732)[_0x92a2('0x1e')](_0x5d3f8b);}};}function respondWithFilteredResult(_0x608328,_0x2d593b){return function(_0x422408){if(_0x422408){var _0x374250=typeof _0x2d593b[_0x92a2('0x1f')]===_0x92a2('0x20')&&typeof _0x2d593b['limit']===_0x92a2('0x20');var _0x5dc99b=_0x422408['count'];var _0xcec5b8=_0x374250?0x0:_0x2d593b[_0x92a2('0x1f')];var _0x4db006=_0x374250?_0x422408[_0x92a2('0x21')]:_0x2d593b[_0x92a2('0x1f')]+_0x2d593b[_0x92a2('0x22')];var _0x473451;if(_0x4db006>=_0x5dc99b){_0x4db006=_0x5dc99b;_0x473451=0xc8;}else{_0x473451=0xce;}_0x608328[_0x92a2('0x1c')](_0x473451);return _0x608328['set'](_0x92a2('0x23'),_0xcec5b8+'-'+_0x4db006+'/'+_0x5dc99b)[_0x92a2('0x1e')](_0x422408);}return null;};}function patchUpdates(_0x1d124e){return function(_0xc31bb1){try{jsonpatch[_0x92a2('0x24')](_0xc31bb1,_0x1d124e,!![]);}catch(_0x56b88d){return BPromise[_0x92a2('0x25')](_0x56b88d);}return _0xc31bb1[_0x92a2('0x26')]();};}function saveUpdates(_0x37a251,_0x4a3c5b){return function(_0x49db1e){if(_0x49db1e){return _0x49db1e[_0x92a2('0x27')](_0x37a251)[_0x92a2('0x28')](function(_0x664f07){return _0x664f07;});}return null;};}function removeEntity(_0x317dbf,_0x4f5801){return function(_0x37a82b){if(_0x37a82b){return _0x37a82b[_0x92a2('0x29')]()['then'](function(){_0x317dbf[_0x92a2('0x1c')](0xcc)['end']();});}};}function handleEntityNotFound(_0x44a1c4,_0x3dd16f){return function(_0x3dd772){if(!_0x3dd772){_0x44a1c4[_0x92a2('0x2a')](0x194);}return _0x3dd772;};}function handleError(_0x1d1617,_0x54f285){_0x54f285=_0x54f285||0x1f4;return function(_0xef5f18){logger[_0x92a2('0x2b')](_0xef5f18[_0x92a2('0x2c')]);if(_0xef5f18[_0x92a2('0x2d')]){delete _0xef5f18[_0x92a2('0x2d')];}_0x1d1617[_0x92a2('0x1c')](_0x54f285)[_0x92a2('0x2e')](_0xef5f18);};}exports[_0x92a2('0x2f')]=function(_0x3cc479,_0x4e4693){var _0x42d425={},_0xe6b6bf={},_0x2629e5={'count':0x0,'rows':[]};var _0x29cab6=_[_0x92a2('0x30')](db[_0x92a2('0x31')][_0x92a2('0x32')],function(_0x2d7a5c){return{'name':_0x2d7a5c[_0x92a2('0x33')],'type':_0x2d7a5c[_0x92a2('0x34')]['key']};});_0xe6b6bf[_0x92a2('0x35')]=_[_0x92a2('0x30')](_0x29cab6,_0x92a2('0x2d'));_0xe6b6bf[_0x92a2('0x36')]=_[_0x92a2('0x37')](_0x3cc479[_0x92a2('0x36')]);_0xe6b6bf['filters']=_['intersection'](_0xe6b6bf[_0x92a2('0x35')],_0xe6b6bf[_0x92a2('0x36')]);_0x42d425[_0x92a2('0x38')]=_[_0x92a2('0x39')](_0xe6b6bf[_0x92a2('0x35')],qs[_0x92a2('0x3a')](_0x3cc479['query'][_0x92a2('0x3a')]));_0x42d425[_0x92a2('0x38')]=_0x42d425[_0x92a2('0x38')]['length']?_0x42d425[_0x92a2('0x38')]:_0xe6b6bf['model'];if(!_0x3cc479[_0x92a2('0x36')][_0x92a2('0x3b')](_0x92a2('0x3c'))){_0x42d425[_0x92a2('0x22')]=qs[_0x92a2('0x22')](_0x3cc479[_0x92a2('0x36')]['limit']);_0x42d425[_0x92a2('0x1f')]=qs['offset'](_0x3cc479[_0x92a2('0x36')]['offset']);}_0x42d425[_0x92a2('0x3d')]=qs['sort'](_0x3cc479[_0x92a2('0x36')][_0x92a2('0x3e')]);_0x42d425[_0x92a2('0x3f')]=qs[_0x92a2('0x40')](_[_0x92a2('0x41')](_0x3cc479[_0x92a2('0x36')],_0xe6b6bf['filters']),_0x29cab6);if(_0x3cc479['query'][_0x92a2('0x42')]){_0x42d425['where']=_[_0x92a2('0x43')](_0x42d425[_0x92a2('0x3f')],{'$or':_[_0x92a2('0x30')](_0x29cab6,function(_0x24abb9){if(_0x24abb9[_0x92a2('0x34')]!==_0x92a2('0x44')){var _0x11fe59={};_0x11fe59[_0x24abb9[_0x92a2('0x2d')]]={'$like':'%'+_0x3cc479['query']['filter']+'%'};return _0x11fe59;}})});}_0x42d425=_[_0x92a2('0x43')]({},_0x42d425,_0x3cc479[_0x92a2('0x45')]);var _0x45493e={'where':_0x42d425[_0x92a2('0x3f')]};return db[_0x92a2('0x31')][_0x92a2('0x21')](_0x45493e)[_0x92a2('0x28')](function(_0x5b3b73){_0x2629e5['count']=_0x5b3b73;if(_0x3cc479[_0x92a2('0x36')][_0x92a2('0x46')]){_0x42d425['include']=[{'all':!![]}];}return db['FreshdeskConfiguration'][_0x92a2('0x47')](_0x42d425);})[_0x92a2('0x28')](function(_0x53a04b){_0x2629e5['rows']=_0x53a04b;return _0x2629e5;})[_0x92a2('0x28')](respondWithFilteredResult(_0x4e4693,_0x42d425))[_0x92a2('0x48')](handleError(_0x4e4693,null));};exports['show']=function(_0x430e89,_0x371a26){var _0x260855={'raw':![],'where':{'id':_0x430e89[_0x92a2('0x49')]['id']}},_0x26fa0a={};_0x26fa0a['model']=_['keys'](db[_0x92a2('0x31')][_0x92a2('0x32')]);_0x26fa0a[_0x92a2('0x36')]=_[_0x92a2('0x37')](_0x430e89[_0x92a2('0x36')]);_0x26fa0a[_0x92a2('0x40')]=_[_0x92a2('0x39')](_0x26fa0a[_0x92a2('0x35')],_0x26fa0a[_0x92a2('0x36')]);_0x260855['attributes']=_[_0x92a2('0x39')](_0x26fa0a[_0x92a2('0x35')],qs[_0x92a2('0x3a')](_0x430e89[_0x92a2('0x36')][_0x92a2('0x3a')]));_0x260855[_0x92a2('0x38')]=_0x260855['attributes'][_0x92a2('0x4a')]?_0x260855[_0x92a2('0x38')]:_0x26fa0a[_0x92a2('0x35')];if(_0x430e89['query']['includeAll']){_0x260855[_0x92a2('0x4b')]=[{'all':!![]}];}_0x260855=_[_0x92a2('0x43')]({},_0x260855,_0x430e89[_0x92a2('0x45')]);return db[_0x92a2('0x31')]['find'](_0x260855)['then'](handleEntityNotFound(_0x371a26,null))[_0x92a2('0x28')](respondWithResult(_0x371a26,null))[_0x92a2('0x48')](handleError(_0x371a26,null));};exports[_0x92a2('0x4c')]=function(_0x1c412f,_0x41818e){return db[_0x92a2('0x31')][_0x92a2('0x4c')](_0x1c412f[_0x92a2('0x4d')],{})[_0x92a2('0x28')](respondWithResult(_0x41818e,0xc9))[_0x92a2('0x48')](handleError(_0x41818e,null));};exports['update']=function(_0x1c0507,_0x3d4144){if(_0x1c0507[_0x92a2('0x4d')]['id']){delete _0x1c0507['body']['id'];}return db['FreshdeskConfiguration'][_0x92a2('0x4e')]({'where':{'id':_0x1c0507[_0x92a2('0x49')]['id']}})['then'](handleEntityNotFound(_0x3d4144,null))[_0x92a2('0x28')](saveUpdates(_0x1c0507['body'],null))[_0x92a2('0x28')](respondWithResult(_0x3d4144,null))[_0x92a2('0x48')](handleError(_0x3d4144,null));};exports[_0x92a2('0x29')]=function(_0x375860,_0x2f6791){return db['FreshdeskConfiguration'][_0x92a2('0x4e')]({'where':{'id':_0x375860[_0x92a2('0x49')]['id']}})[_0x92a2('0x28')](handleEntityNotFound(_0x2f6791,null))[_0x92a2('0x28')](removeEntity(_0x2f6791,null))[_0x92a2('0x48')](handleError(_0x2f6791,null));};exports['getFields']=function(_0x4e4346,_0x24cd3d,_0x427b81){var _0x20e175={};var _0x426489={};var _0x5b2cdc;var _0x2364b8;return db[_0x92a2('0x31')][_0x92a2('0x4f')]({'where':{'id':_0x4e4346[_0x92a2('0x49')]['id']}})[_0x92a2('0x28')](handleEntityNotFound(_0x24cd3d,null))[_0x92a2('0x28')](function(_0xcd057a){if(_0xcd057a){_0x5b2cdc=_0xcd057a;_0x426489[_0x92a2('0x35')]=_[_0x92a2('0x37')](db[_0x92a2('0x50')][_0x92a2('0x32')]);_0x426489[_0x92a2('0x36')]=_[_0x92a2('0x37')](_0x4e4346[_0x92a2('0x36')]);_0x426489[_0x92a2('0x40')]=_[_0x92a2('0x39')](_0x426489['model'],_0x426489[_0x92a2('0x36')]);_0x20e175[_0x92a2('0x38')]=_['intersection'](_0x426489['model'],qs[_0x92a2('0x3a')](_0x4e4346[_0x92a2('0x36')]['fields']));_0x20e175[_0x92a2('0x38')]=_0x20e175[_0x92a2('0x38')][_0x92a2('0x4a')]?_0x20e175['attributes']:_0x426489[_0x92a2('0x35')];_0x20e175[_0x92a2('0x3d')]=qs['sort'](_0x4e4346[_0x92a2('0x36')][_0x92a2('0x3e')]);_0x20e175[_0x92a2('0x3f')]=qs[_0x92a2('0x40')](_[_0x92a2('0x41')](_0x4e4346[_0x92a2('0x36')],_0x426489[_0x92a2('0x40')]));if(_0x4e4346[_0x92a2('0x36')]['filter']){_0x20e175['where']=_[_0x92a2('0x43')](_0x20e175['where'],{'$or':_['map'](_0x20e175['attributes'],function(_0x2aca91){var _0x47e35e={};_0x47e35e[_0x2aca91]={'$like':'%'+_0x4e4346[_0x92a2('0x36')]['filter']+'%'};return _0x47e35e;})});}_0x20e175=_[_0x92a2('0x43')]({},_0x20e175,_0x4e4346[_0x92a2('0x45')]);return _0x5b2cdc[_0x92a2('0x51')](_0x20e175);}})[_0x92a2('0x28')](function(_0xf517e3){if(_0xf517e3){_0x2364b8=_0xf517e3['length'];if(!_0x4e4346['query'][_0x92a2('0x3b')](_0x92a2('0x3c'))){_0x20e175[_0x92a2('0x22')]=qs[_0x92a2('0x22')](_0x4e4346['query'][_0x92a2('0x22')]);_0x20e175['offset']=qs[_0x92a2('0x1f')](_0x4e4346[_0x92a2('0x36')]['offset']);}return _0x5b2cdc['getFields'](_0x20e175);}})[_0x92a2('0x28')](function(_0x1323b0){if(_0x1323b0){return _0x1323b0?{'count':_0x2364b8,'rows':_0x1323b0}:null;}})[_0x92a2('0x28')](respondWithResult(_0x24cd3d,null))[_0x92a2('0x48')](handleError(_0x24cd3d,null));};exports['getSubjects']=function(_0x6ae15a,_0x4f231f,_0x44e548){var _0x18661f={};var _0x1b16b6={};var _0x8492a5;var _0x3eb915;return db[_0x92a2('0x31')][_0x92a2('0x4f')]({'where':{'id':_0x6ae15a[_0x92a2('0x49')]['id']}})[_0x92a2('0x28')](handleEntityNotFound(_0x4f231f,null))[_0x92a2('0x28')](function(_0x3ca841){if(_0x3ca841){_0x8492a5=_0x3ca841;_0x1b16b6['model']=_[_0x92a2('0x37')](db[_0x92a2('0x50')][_0x92a2('0x32')]);_0x1b16b6[_0x92a2('0x36')]=_['keys'](_0x6ae15a[_0x92a2('0x36')]);_0x1b16b6['filters']=_[_0x92a2('0x39')](_0x1b16b6['model'],_0x1b16b6[_0x92a2('0x36')]);_0x18661f[_0x92a2('0x38')]=_[_0x92a2('0x39')](_0x1b16b6['model'],qs[_0x92a2('0x3a')](_0x6ae15a['query'][_0x92a2('0x3a')]));_0x18661f['attributes']=_0x18661f[_0x92a2('0x38')][_0x92a2('0x4a')]?_0x18661f[_0x92a2('0x38')]:_0x1b16b6[_0x92a2('0x35')];_0x18661f[_0x92a2('0x3d')]=qs['sort'](_0x6ae15a[_0x92a2('0x36')]['sort']);_0x18661f[_0x92a2('0x3f')]=qs[_0x92a2('0x40')](_[_0x92a2('0x41')](_0x6ae15a[_0x92a2('0x36')],_0x1b16b6[_0x92a2('0x40')]));if(_0x6ae15a[_0x92a2('0x36')][_0x92a2('0x42')]){_0x18661f['where']=_['merge'](_0x18661f['where'],{'$or':_[_0x92a2('0x30')](_0x18661f[_0x92a2('0x38')],function(_0x5db5f1){var _0x45a711={};_0x45a711[_0x5db5f1]={'$like':'%'+_0x6ae15a[_0x92a2('0x36')]['filter']+'%'};return _0x45a711;})});}_0x18661f=_['merge']({},_0x18661f,_0x6ae15a['options']);return _0x8492a5[_0x92a2('0x52')](_0x18661f);}})[_0x92a2('0x28')](function(_0x50f32e){if(_0x50f32e){_0x3eb915=_0x50f32e['length'];if(!_0x6ae15a[_0x92a2('0x36')][_0x92a2('0x3b')](_0x92a2('0x3c'))){_0x18661f[_0x92a2('0x22')]=qs[_0x92a2('0x22')](_0x6ae15a['query'][_0x92a2('0x22')]);_0x18661f[_0x92a2('0x1f')]=qs[_0x92a2('0x1f')](_0x6ae15a[_0x92a2('0x36')][_0x92a2('0x1f')]);}return _0x8492a5[_0x92a2('0x52')](_0x18661f);}})[_0x92a2('0x28')](function(_0x4587ab){if(_0x4587ab){return _0x4587ab?{'count':_0x3eb915,'rows':_0x4587ab}:null;}})[_0x92a2('0x28')](respondWithResult(_0x4f231f,null))[_0x92a2('0x48')](handleError(_0x4f231f,null));};exports[_0x92a2('0x53')]=function(_0x24740f,_0x37bb92,_0x3b02fb){var _0x520837={};var _0xf69adc={};var _0x12353f;var _0x50f29b;return db[_0x92a2('0x31')][_0x92a2('0x4f')]({'where':{'id':_0x24740f[_0x92a2('0x49')]['id']}})[_0x92a2('0x28')](handleEntityNotFound(_0x37bb92,null))[_0x92a2('0x28')](function(_0x2b531f){if(_0x2b531f){_0x12353f=_0x2b531f;_0xf69adc[_0x92a2('0x35')]=_[_0x92a2('0x37')](db[_0x92a2('0x50')][_0x92a2('0x32')]);_0xf69adc['query']=_[_0x92a2('0x37')](_0x24740f[_0x92a2('0x36')]);_0xf69adc[_0x92a2('0x40')]=_[_0x92a2('0x39')](_0xf69adc[_0x92a2('0x35')],_0xf69adc[_0x92a2('0x36')]);_0x520837[_0x92a2('0x38')]=_[_0x92a2('0x39')](_0xf69adc[_0x92a2('0x35')],qs['fields'](_0x24740f['query'][_0x92a2('0x3a')]));_0x520837[_0x92a2('0x38')]=_0x520837[_0x92a2('0x38')][_0x92a2('0x4a')]?_0x520837['attributes']:_0xf69adc[_0x92a2('0x35')];_0x520837[_0x92a2('0x3d')]=qs[_0x92a2('0x3e')](_0x24740f[_0x92a2('0x36')]['sort']);_0x520837[_0x92a2('0x3f')]=qs[_0x92a2('0x40')](_[_0x92a2('0x41')](_0x24740f[_0x92a2('0x36')],_0xf69adc[_0x92a2('0x40')]));if(_0x24740f[_0x92a2('0x36')][_0x92a2('0x42')]){_0x520837[_0x92a2('0x3f')]=_['merge'](_0x520837[_0x92a2('0x3f')],{'$or':_[_0x92a2('0x30')](_0x520837[_0x92a2('0x38')],function(_0x1079c6){var _0x5c58ab={};_0x5c58ab[_0x1079c6]={'$like':'%'+_0x24740f[_0x92a2('0x36')]['filter']+'%'};return _0x5c58ab;})});}_0x520837=_[_0x92a2('0x43')]({},_0x520837,_0x24740f['options']);return _0x12353f[_0x92a2('0x53')](_0x520837);}})[_0x92a2('0x28')](function(_0x3e9946){if(_0x3e9946){_0x50f29b=_0x3e9946[_0x92a2('0x4a')];if(!_0x24740f[_0x92a2('0x36')][_0x92a2('0x3b')](_0x92a2('0x3c'))){_0x520837[_0x92a2('0x22')]=qs[_0x92a2('0x22')](_0x24740f[_0x92a2('0x36')][_0x92a2('0x22')]);_0x520837['offset']=qs[_0x92a2('0x1f')](_0x24740f[_0x92a2('0x36')][_0x92a2('0x1f')]);}return _0x12353f[_0x92a2('0x53')](_0x520837);}})['then'](function(_0x1f78ee){if(_0x1f78ee){return _0x1f78ee?{'count':_0x50f29b,'rows':_0x1f78ee}:null;}})[_0x92a2('0x28')](respondWithResult(_0x37bb92,null))['catch'](handleError(_0x37bb92,null));};exports[_0x92a2('0x54')]=function(_0x1bed40,_0x4b10e3,_0x32e419){var _0x1d630a={};var _0x42101e={};var _0x48ca7a;var _0x2592b6;return db[_0x92a2('0x31')][_0x92a2('0x4f')]({'where':{'id':_0x1bed40[_0x92a2('0x49')]['id']}})[_0x92a2('0x28')](handleEntityNotFound(_0x4b10e3,null))[_0x92a2('0x28')](function(_0x2db3dd){if(_0x2db3dd){_0x48ca7a=_0x2db3dd;_0x42101e[_0x92a2('0x35')]=_[_0x92a2('0x37')](db['Tag']['rawAttributes']);_0x42101e['query']=_['keys'](_0x1bed40['query']);_0x42101e[_0x92a2('0x40')]=_[_0x92a2('0x39')](_0x42101e[_0x92a2('0x35')],_0x42101e[_0x92a2('0x36')]);_0x1d630a[_0x92a2('0x38')]=_['intersection'](_0x42101e[_0x92a2('0x35')],qs[_0x92a2('0x3a')](_0x1bed40[_0x92a2('0x36')][_0x92a2('0x3a')]));_0x1d630a[_0x92a2('0x38')]=_0x1d630a[_0x92a2('0x38')]['length']?_0x1d630a[_0x92a2('0x38')]:_0x42101e[_0x92a2('0x35')];_0x1d630a[_0x92a2('0x3d')]=qs['sort'](_0x1bed40['query'][_0x92a2('0x3e')]);_0x1d630a[_0x92a2('0x3f')]=qs[_0x92a2('0x40')](_[_0x92a2('0x41')](_0x1bed40[_0x92a2('0x36')],_0x42101e[_0x92a2('0x40')]));if(_0x1bed40[_0x92a2('0x36')]['filter']){_0x1d630a[_0x92a2('0x3f')]=_[_0x92a2('0x43')](_0x1d630a[_0x92a2('0x3f')],{'$or':_[_0x92a2('0x30')](_0x1d630a[_0x92a2('0x38')],function(_0x351777){var _0xcaad0d={};_0xcaad0d[_0x351777]={'$like':'%'+_0x1bed40[_0x92a2('0x36')]['filter']+'%'};return _0xcaad0d;})});}_0x1d630a=_['merge']({},_0x1d630a,_0x1bed40[_0x92a2('0x45')]);return _0x48ca7a[_0x92a2('0x54')](_0x1d630a);}})['then'](function(_0x3e7d53){if(_0x3e7d53){_0x2592b6=_0x3e7d53[_0x92a2('0x4a')];if(!_0x1bed40[_0x92a2('0x36')][_0x92a2('0x3b')](_0x92a2('0x3c'))){_0x1d630a[_0x92a2('0x22')]=qs[_0x92a2('0x22')](_0x1bed40[_0x92a2('0x36')][_0x92a2('0x22')]);_0x1d630a['offset']=qs[_0x92a2('0x1f')](_0x1bed40[_0x92a2('0x36')][_0x92a2('0x1f')]);}return _0x48ca7a[_0x92a2('0x54')](_0x1d630a);}})[_0x92a2('0x28')](function(_0x3d6ea3){if(_0x3d6ea3){return _0x3d6ea3?{'count':_0x2592b6,'rows':_0x3d6ea3}:null;}})[_0x92a2('0x28')](respondWithResult(_0x4b10e3,null))[_0x92a2('0x48')](handleError(_0x4b10e3,null));};exports[_0x92a2('0x55')]=function(_0x2c617e,_0x4d855a,_0x2021fe){if(_0x2c617e[_0x92a2('0x4d')]['id']){delete _0x2c617e[_0x92a2('0x4d')]['id'];}return db[_0x92a2('0x31')][_0x92a2('0x4f')]({'where':{'id':_0x2c617e[_0x92a2('0x49')]['id']}})['then'](handleEntityNotFound(_0x4d855a,null))[_0x92a2('0x28')](function(_0x4f58ab){if(_0x4f58ab){return _0x4f58ab[_0x92a2('0x55')](_0x2c617e['body'][_0x92a2('0x56')]||[]);}return null;})[_0x92a2('0x28')](respondWithResult(_0x4d855a,null))[_0x92a2('0x48')](handleError(_0x4d855a,null));}; \ No newline at end of file +var _0xd744=['moment','bluebird','mustache','util','path','sox','to-csv','lodash','squel','jsforce','desk.js','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/logger','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','sendStatus','status','end','json','offset','undefined','limit','count','set','apply','reject','save','update','then','error','stack','name','send','index','map','rawAttributes','fieldName','type','key','model','query','filters','intersection','fields','attributes','length','hasOwnProperty','nolimit','order','sort','where','filter','merge','VIRTUAL','options','FreshdeskConfiguration','includeAll','include','findAll','rows','catch','params','keys','find','create','body','destroy','getFields','findOne','FreshdeskField','pick','getDescriptions','getTags','Tag','setTags','rimraf','zip-dir','request-promise'];(function(_0x261262,_0x224883){var _0xa9d33e=function(_0x5bdba2){while(--_0x5bdba2){_0x261262['push'](_0x261262['shift']());}};_0xa9d33e(++_0x224883);}(_0xd744,0xf9));var _0x4d74=function(_0x4565bf,_0x5ad9d6){_0x4565bf=_0x4565bf-0x0;var _0x5610ba=_0xd744[_0x4565bf];return _0x5610ba;};'use strict';var emlformat=require('eml-format');var rimraf=require(_0x4d74('0x0'));var zipdir=require(_0x4d74('0x1'));var jsonpatch=require('fast-json-patch');var rp=require(_0x4d74('0x2'));var moment=require(_0x4d74('0x3'));var BPromise=require(_0x4d74('0x4'));var Mustache=require(_0x4d74('0x5'));var util=require(_0x4d74('0x6'));var path=require(_0x4d74('0x7'));var sox=require(_0x4d74('0x8'));var csv=require(_0x4d74('0x9'));var ejs=require('ejs');var fs=require('fs');var fs_extra=require('fs-extra');var _=require(_0x4d74('0xa'));var squel=require(_0x4d74('0xb'));var crypto=require('crypto');var jsforce=require(_0x4d74('0xc'));var deskjs=require(_0x4d74('0xd'));var toCsv=require(_0x4d74('0x9'));var querystring=require('querystring');var Papa=require(_0x4d74('0xe'));var Redis=require(_0x4d74('0xf'));var authService=require(_0x4d74('0x10'));var qs=require(_0x4d74('0x11'));var as=require(_0x4d74('0x12'));var hardwareService=require('../../config/license/hardware');var logger=require(_0x4d74('0x13'))('api');var utils=require(_0x4d74('0x14'));var config=require(_0x4d74('0x15'));var licenseUtil=require(_0x4d74('0x16'));var db=require(_0x4d74('0x17'))['db'];function respondWithStatusCode(_0x1d1abe,_0x3fdeed){_0x3fdeed=_0x3fdeed||0xcc;return function(_0x35b0af){if(_0x35b0af){return _0x1d1abe[_0x4d74('0x18')](_0x3fdeed);}return _0x1d1abe[_0x4d74('0x19')](_0x3fdeed)[_0x4d74('0x1a')]();};}function respondWithResult(_0x2c306e,_0x1d3ad2){_0x1d3ad2=_0x1d3ad2||0xc8;return function(_0x58bfcd){if(_0x58bfcd){return _0x2c306e['status'](_0x1d3ad2)[_0x4d74('0x1b')](_0x58bfcd);}};}function respondWithFilteredResult(_0x2e4131,_0x14af73){return function(_0x342684){if(_0x342684){var _0x1f180b=typeof _0x14af73[_0x4d74('0x1c')]===_0x4d74('0x1d')&&typeof _0x14af73[_0x4d74('0x1e')]==='undefined';var _0xa3abb5=_0x342684[_0x4d74('0x1f')];var _0x57c644=_0x1f180b?0x0:_0x14af73['offset'];var _0x56c4c2=_0x1f180b?_0x342684[_0x4d74('0x1f')]:_0x14af73[_0x4d74('0x1c')]+_0x14af73[_0x4d74('0x1e')];var _0x13b06f;if(_0x56c4c2>=_0xa3abb5){_0x56c4c2=_0xa3abb5;_0x13b06f=0xc8;}else{_0x13b06f=0xce;}_0x2e4131[_0x4d74('0x19')](_0x13b06f);return _0x2e4131[_0x4d74('0x20')]('Content-Range',_0x57c644+'-'+_0x56c4c2+'/'+_0xa3abb5)[_0x4d74('0x1b')](_0x342684);}return null;};}function patchUpdates(_0x2871f9){return function(_0x2d2630){try{jsonpatch[_0x4d74('0x21')](_0x2d2630,_0x2871f9,!![]);}catch(_0x131d20){return BPromise[_0x4d74('0x22')](_0x131d20);}return _0x2d2630[_0x4d74('0x23')]();};}function saveUpdates(_0x5d777d,_0x3ec276){return function(_0x16729a){if(_0x16729a){return _0x16729a[_0x4d74('0x24')](_0x5d777d)[_0x4d74('0x25')](function(_0x2058bf){return _0x2058bf;});}return null;};}function removeEntity(_0x384451,_0x229236){return function(_0x4781c5){if(_0x4781c5){return _0x4781c5['destroy']()['then'](function(){_0x384451[_0x4d74('0x19')](0xcc)[_0x4d74('0x1a')]();});}};}function handleEntityNotFound(_0x2fda5f,_0x20c7ed){return function(_0x179f82){if(!_0x179f82){_0x2fda5f[_0x4d74('0x18')](0x194);}return _0x179f82;};}function handleError(_0x46184b,_0x2fe5d8){_0x2fe5d8=_0x2fe5d8||0x1f4;return function(_0x38eac3){logger[_0x4d74('0x26')](_0x38eac3[_0x4d74('0x27')]);if(_0x38eac3[_0x4d74('0x28')]){delete _0x38eac3[_0x4d74('0x28')];}_0x46184b[_0x4d74('0x19')](_0x2fe5d8)[_0x4d74('0x29')](_0x38eac3);};}exports[_0x4d74('0x2a')]=function(_0x3b8a32,_0x569ea2){var _0x45d0c4={},_0x1c052d={},_0x50e77a={'count':0x0,'rows':[]};var _0x3b9760=_[_0x4d74('0x2b')](db['FreshdeskConfiguration'][_0x4d74('0x2c')],function(_0x5569ca){return{'name':_0x5569ca[_0x4d74('0x2d')],'type':_0x5569ca[_0x4d74('0x2e')][_0x4d74('0x2f')]};});_0x1c052d[_0x4d74('0x30')]=_[_0x4d74('0x2b')](_0x3b9760,_0x4d74('0x28'));_0x1c052d[_0x4d74('0x31')]=_['keys'](_0x3b8a32['query']);_0x1c052d[_0x4d74('0x32')]=_['intersection'](_0x1c052d['model'],_0x1c052d['query']);_0x45d0c4['attributes']=_[_0x4d74('0x33')](_0x1c052d[_0x4d74('0x30')],qs[_0x4d74('0x34')](_0x3b8a32[_0x4d74('0x31')][_0x4d74('0x34')]));_0x45d0c4[_0x4d74('0x35')]=_0x45d0c4[_0x4d74('0x35')][_0x4d74('0x36')]?_0x45d0c4[_0x4d74('0x35')]:_0x1c052d[_0x4d74('0x30')];if(!_0x3b8a32[_0x4d74('0x31')][_0x4d74('0x37')](_0x4d74('0x38'))){_0x45d0c4[_0x4d74('0x1e')]=qs['limit'](_0x3b8a32[_0x4d74('0x31')][_0x4d74('0x1e')]);_0x45d0c4[_0x4d74('0x1c')]=qs[_0x4d74('0x1c')](_0x3b8a32[_0x4d74('0x31')][_0x4d74('0x1c')]);}_0x45d0c4[_0x4d74('0x39')]=qs['sort'](_0x3b8a32[_0x4d74('0x31')][_0x4d74('0x3a')]);_0x45d0c4[_0x4d74('0x3b')]=qs[_0x4d74('0x32')](_['pick'](_0x3b8a32[_0x4d74('0x31')],_0x1c052d['filters']),_0x3b9760);if(_0x3b8a32[_0x4d74('0x31')][_0x4d74('0x3c')]){_0x45d0c4[_0x4d74('0x3b')]=_[_0x4d74('0x3d')](_0x45d0c4[_0x4d74('0x3b')],{'$or':_[_0x4d74('0x2b')](_0x3b9760,function(_0x45bdc9){if(_0x45bdc9[_0x4d74('0x2e')]!==_0x4d74('0x3e')){var _0x25a387={};_0x25a387[_0x45bdc9[_0x4d74('0x28')]]={'$like':'%'+_0x3b8a32['query'][_0x4d74('0x3c')]+'%'};return _0x25a387;}})});}_0x45d0c4=_['merge']({},_0x45d0c4,_0x3b8a32[_0x4d74('0x3f')]);var _0x399aee={'where':_0x45d0c4[_0x4d74('0x3b')]};return db[_0x4d74('0x40')][_0x4d74('0x1f')](_0x399aee)[_0x4d74('0x25')](function(_0x116cf8){_0x50e77a[_0x4d74('0x1f')]=_0x116cf8;if(_0x3b8a32[_0x4d74('0x31')][_0x4d74('0x41')]){_0x45d0c4[_0x4d74('0x42')]=[{'all':!![]}];}return db[_0x4d74('0x40')][_0x4d74('0x43')](_0x45d0c4);})[_0x4d74('0x25')](function(_0x36af5b){_0x50e77a[_0x4d74('0x44')]=_0x36af5b;return _0x50e77a;})['then'](respondWithFilteredResult(_0x569ea2,_0x45d0c4))[_0x4d74('0x45')](handleError(_0x569ea2,null));};exports['show']=function(_0x1f52f6,_0x24b219){var _0x508f9c={'raw':![],'where':{'id':_0x1f52f6[_0x4d74('0x46')]['id']}},_0x2587f7={};_0x2587f7['model']=_[_0x4d74('0x47')](db[_0x4d74('0x40')][_0x4d74('0x2c')]);_0x2587f7[_0x4d74('0x31')]=_[_0x4d74('0x47')](_0x1f52f6[_0x4d74('0x31')]);_0x2587f7[_0x4d74('0x32')]=_['intersection'](_0x2587f7[_0x4d74('0x30')],_0x2587f7[_0x4d74('0x31')]);_0x508f9c[_0x4d74('0x35')]=_[_0x4d74('0x33')](_0x2587f7[_0x4d74('0x30')],qs[_0x4d74('0x34')](_0x1f52f6[_0x4d74('0x31')]['fields']));_0x508f9c[_0x4d74('0x35')]=_0x508f9c[_0x4d74('0x35')][_0x4d74('0x36')]?_0x508f9c[_0x4d74('0x35')]:_0x2587f7[_0x4d74('0x30')];if(_0x1f52f6['query'][_0x4d74('0x41')]){_0x508f9c[_0x4d74('0x42')]=[{'all':!![]}];}_0x508f9c=_[_0x4d74('0x3d')]({},_0x508f9c,_0x1f52f6[_0x4d74('0x3f')]);return db['FreshdeskConfiguration'][_0x4d74('0x48')](_0x508f9c)[_0x4d74('0x25')](handleEntityNotFound(_0x24b219,null))[_0x4d74('0x25')](respondWithResult(_0x24b219,null))['catch'](handleError(_0x24b219,null));};exports[_0x4d74('0x49')]=function(_0x5f3b68,_0x11e1b7){return db[_0x4d74('0x40')][_0x4d74('0x49')](_0x5f3b68[_0x4d74('0x4a')],{})[_0x4d74('0x25')](respondWithResult(_0x11e1b7,0xc9))[_0x4d74('0x45')](handleError(_0x11e1b7,null));};exports[_0x4d74('0x24')]=function(_0x33d5d8,_0x19f2f7){if(_0x33d5d8[_0x4d74('0x4a')]['id']){delete _0x33d5d8[_0x4d74('0x4a')]['id'];}return db[_0x4d74('0x40')]['find']({'where':{'id':_0x33d5d8['params']['id']}})[_0x4d74('0x25')](handleEntityNotFound(_0x19f2f7,null))[_0x4d74('0x25')](saveUpdates(_0x33d5d8['body'],null))[_0x4d74('0x25')](respondWithResult(_0x19f2f7,null))[_0x4d74('0x45')](handleError(_0x19f2f7,null));};exports[_0x4d74('0x4b')]=function(_0x245556,_0x4978cd){return db[_0x4d74('0x40')][_0x4d74('0x48')]({'where':{'id':_0x245556['params']['id']}})[_0x4d74('0x25')](handleEntityNotFound(_0x4978cd,null))[_0x4d74('0x25')](removeEntity(_0x4978cd,null))['catch'](handleError(_0x4978cd,null));};exports[_0x4d74('0x4c')]=function(_0xa26442,_0x1193bb,_0x4254be){var _0xfec88={};var _0x2c7fdf={};var _0x366640;var _0x358aee;return db['FreshdeskConfiguration'][_0x4d74('0x4d')]({'where':{'id':_0xa26442[_0x4d74('0x46')]['id']}})['then'](handleEntityNotFound(_0x1193bb,null))[_0x4d74('0x25')](function(_0x1c6873){if(_0x1c6873){_0x366640=_0x1c6873;_0x2c7fdf[_0x4d74('0x30')]=_[_0x4d74('0x47')](db[_0x4d74('0x4e')][_0x4d74('0x2c')]);_0x2c7fdf['query']=_[_0x4d74('0x47')](_0xa26442[_0x4d74('0x31')]);_0x2c7fdf['filters']=_[_0x4d74('0x33')](_0x2c7fdf['model'],_0x2c7fdf['query']);_0xfec88[_0x4d74('0x35')]=_[_0x4d74('0x33')](_0x2c7fdf['model'],qs[_0x4d74('0x34')](_0xa26442['query'][_0x4d74('0x34')]));_0xfec88[_0x4d74('0x35')]=_0xfec88[_0x4d74('0x35')][_0x4d74('0x36')]?_0xfec88[_0x4d74('0x35')]:_0x2c7fdf['model'];_0xfec88[_0x4d74('0x39')]=qs[_0x4d74('0x3a')](_0xa26442[_0x4d74('0x31')][_0x4d74('0x3a')]);_0xfec88[_0x4d74('0x3b')]=qs['filters'](_[_0x4d74('0x4f')](_0xa26442['query'],_0x2c7fdf[_0x4d74('0x32')]));if(_0xa26442[_0x4d74('0x31')]['filter']){_0xfec88['where']=_[_0x4d74('0x3d')](_0xfec88[_0x4d74('0x3b')],{'$or':_[_0x4d74('0x2b')](_0xfec88[_0x4d74('0x35')],function(_0x2451bc){var _0x4cdc3f={};_0x4cdc3f[_0x2451bc]={'$like':'%'+_0xa26442['query']['filter']+'%'};return _0x4cdc3f;})});}_0xfec88=_['merge']({},_0xfec88,_0xa26442[_0x4d74('0x3f')]);return _0x366640['getFields'](_0xfec88);}})[_0x4d74('0x25')](function(_0x36dd76){if(_0x36dd76){_0x358aee=_0x36dd76[_0x4d74('0x36')];if(!_0xa26442['query'][_0x4d74('0x37')](_0x4d74('0x38'))){_0xfec88[_0x4d74('0x1e')]=qs[_0x4d74('0x1e')](_0xa26442[_0x4d74('0x31')][_0x4d74('0x1e')]);_0xfec88[_0x4d74('0x1c')]=qs[_0x4d74('0x1c')](_0xa26442[_0x4d74('0x31')][_0x4d74('0x1c')]);}return _0x366640[_0x4d74('0x4c')](_0xfec88);}})[_0x4d74('0x25')](function(_0x2dabbf){if(_0x2dabbf){return _0x2dabbf?{'count':_0x358aee,'rows':_0x2dabbf}:null;}})[_0x4d74('0x25')](respondWithResult(_0x1193bb,null))[_0x4d74('0x45')](handleError(_0x1193bb,null));};exports['getSubjects']=function(_0x1d3af8,_0x58374f,_0x47d9bb){var _0xf0649c={};var _0x6251c0={};var _0x184143;var _0x4a09e5;return db[_0x4d74('0x40')][_0x4d74('0x4d')]({'where':{'id':_0x1d3af8[_0x4d74('0x46')]['id']}})[_0x4d74('0x25')](handleEntityNotFound(_0x58374f,null))[_0x4d74('0x25')](function(_0x1218a5){if(_0x1218a5){_0x184143=_0x1218a5;_0x6251c0[_0x4d74('0x30')]=_[_0x4d74('0x47')](db['FreshdeskField'][_0x4d74('0x2c')]);_0x6251c0[_0x4d74('0x31')]=_[_0x4d74('0x47')](_0x1d3af8['query']);_0x6251c0[_0x4d74('0x32')]=_[_0x4d74('0x33')](_0x6251c0[_0x4d74('0x30')],_0x6251c0[_0x4d74('0x31')]);_0xf0649c[_0x4d74('0x35')]=_['intersection'](_0x6251c0[_0x4d74('0x30')],qs['fields'](_0x1d3af8[_0x4d74('0x31')]['fields']));_0xf0649c[_0x4d74('0x35')]=_0xf0649c['attributes'][_0x4d74('0x36')]?_0xf0649c[_0x4d74('0x35')]:_0x6251c0[_0x4d74('0x30')];_0xf0649c[_0x4d74('0x39')]=qs[_0x4d74('0x3a')](_0x1d3af8[_0x4d74('0x31')]['sort']);_0xf0649c[_0x4d74('0x3b')]=qs[_0x4d74('0x32')](_['pick'](_0x1d3af8['query'],_0x6251c0[_0x4d74('0x32')]));if(_0x1d3af8[_0x4d74('0x31')][_0x4d74('0x3c')]){_0xf0649c[_0x4d74('0x3b')]=_[_0x4d74('0x3d')](_0xf0649c[_0x4d74('0x3b')],{'$or':_[_0x4d74('0x2b')](_0xf0649c['attributes'],function(_0x3ebc6b){var _0xbcd9fb={};_0xbcd9fb[_0x3ebc6b]={'$like':'%'+_0x1d3af8[_0x4d74('0x31')]['filter']+'%'};return _0xbcd9fb;})});}_0xf0649c=_[_0x4d74('0x3d')]({},_0xf0649c,_0x1d3af8['options']);return _0x184143['getSubjects'](_0xf0649c);}})[_0x4d74('0x25')](function(_0x2c14f3){if(_0x2c14f3){_0x4a09e5=_0x2c14f3[_0x4d74('0x36')];if(!_0x1d3af8[_0x4d74('0x31')][_0x4d74('0x37')](_0x4d74('0x38'))){_0xf0649c[_0x4d74('0x1e')]=qs['limit'](_0x1d3af8['query']['limit']);_0xf0649c[_0x4d74('0x1c')]=qs['offset'](_0x1d3af8[_0x4d74('0x31')]['offset']);}return _0x184143['getSubjects'](_0xf0649c);}})['then'](function(_0x17f468){if(_0x17f468){return _0x17f468?{'count':_0x4a09e5,'rows':_0x17f468}:null;}})[_0x4d74('0x25')](respondWithResult(_0x58374f,null))[_0x4d74('0x45')](handleError(_0x58374f,null));};exports[_0x4d74('0x50')]=function(_0x5c7089,_0x2308f2,_0x4d127a){var _0x5d2460={};var _0x5265e5={};var _0x16e0c9;var _0x8641aa;return db['FreshdeskConfiguration'][_0x4d74('0x4d')]({'where':{'id':_0x5c7089[_0x4d74('0x46')]['id']}})[_0x4d74('0x25')](handleEntityNotFound(_0x2308f2,null))[_0x4d74('0x25')](function(_0x64c1a3){if(_0x64c1a3){_0x16e0c9=_0x64c1a3;_0x5265e5[_0x4d74('0x30')]=_[_0x4d74('0x47')](db[_0x4d74('0x4e')]['rawAttributes']);_0x5265e5['query']=_[_0x4d74('0x47')](_0x5c7089[_0x4d74('0x31')]);_0x5265e5[_0x4d74('0x32')]=_[_0x4d74('0x33')](_0x5265e5['model'],_0x5265e5[_0x4d74('0x31')]);_0x5d2460[_0x4d74('0x35')]=_[_0x4d74('0x33')](_0x5265e5['model'],qs[_0x4d74('0x34')](_0x5c7089[_0x4d74('0x31')][_0x4d74('0x34')]));_0x5d2460['attributes']=_0x5d2460['attributes'][_0x4d74('0x36')]?_0x5d2460[_0x4d74('0x35')]:_0x5265e5[_0x4d74('0x30')];_0x5d2460[_0x4d74('0x39')]=qs['sort'](_0x5c7089['query'][_0x4d74('0x3a')]);_0x5d2460[_0x4d74('0x3b')]=qs[_0x4d74('0x32')](_[_0x4d74('0x4f')](_0x5c7089[_0x4d74('0x31')],_0x5265e5[_0x4d74('0x32')]));if(_0x5c7089[_0x4d74('0x31')][_0x4d74('0x3c')]){_0x5d2460[_0x4d74('0x3b')]=_['merge'](_0x5d2460['where'],{'$or':_[_0x4d74('0x2b')](_0x5d2460['attributes'],function(_0x212a48){var _0x143e20={};_0x143e20[_0x212a48]={'$like':'%'+_0x5c7089[_0x4d74('0x31')][_0x4d74('0x3c')]+'%'};return _0x143e20;})});}_0x5d2460=_[_0x4d74('0x3d')]({},_0x5d2460,_0x5c7089['options']);return _0x16e0c9[_0x4d74('0x50')](_0x5d2460);}})['then'](function(_0x170098){if(_0x170098){_0x8641aa=_0x170098[_0x4d74('0x36')];if(!_0x5c7089['query'][_0x4d74('0x37')](_0x4d74('0x38'))){_0x5d2460['limit']=qs[_0x4d74('0x1e')](_0x5c7089['query']['limit']);_0x5d2460[_0x4d74('0x1c')]=qs[_0x4d74('0x1c')](_0x5c7089[_0x4d74('0x31')][_0x4d74('0x1c')]);}return _0x16e0c9['getDescriptions'](_0x5d2460);}})[_0x4d74('0x25')](function(_0x525f81){if(_0x525f81){return _0x525f81?{'count':_0x8641aa,'rows':_0x525f81}:null;}})[_0x4d74('0x25')](respondWithResult(_0x2308f2,null))['catch'](handleError(_0x2308f2,null));};exports[_0x4d74('0x51')]=function(_0x2d4e18,_0x25e7e6,_0x434de8){var _0x4fc279={};var _0x257b69={};var _0x48b0ad;var _0x567406;return db['FreshdeskConfiguration'][_0x4d74('0x4d')]({'where':{'id':_0x2d4e18[_0x4d74('0x46')]['id']}})[_0x4d74('0x25')](handleEntityNotFound(_0x25e7e6,null))[_0x4d74('0x25')](function(_0x5738db){if(_0x5738db){_0x48b0ad=_0x5738db;_0x257b69[_0x4d74('0x30')]=_[_0x4d74('0x47')](db[_0x4d74('0x52')]['rawAttributes']);_0x257b69[_0x4d74('0x31')]=_[_0x4d74('0x47')](_0x2d4e18[_0x4d74('0x31')]);_0x257b69[_0x4d74('0x32')]=_[_0x4d74('0x33')](_0x257b69['model'],_0x257b69[_0x4d74('0x31')]);_0x4fc279[_0x4d74('0x35')]=_['intersection'](_0x257b69[_0x4d74('0x30')],qs[_0x4d74('0x34')](_0x2d4e18[_0x4d74('0x31')][_0x4d74('0x34')]));_0x4fc279['attributes']=_0x4fc279[_0x4d74('0x35')][_0x4d74('0x36')]?_0x4fc279[_0x4d74('0x35')]:_0x257b69['model'];_0x4fc279['order']=qs['sort'](_0x2d4e18[_0x4d74('0x31')]['sort']);_0x4fc279[_0x4d74('0x3b')]=qs['filters'](_[_0x4d74('0x4f')](_0x2d4e18['query'],_0x257b69[_0x4d74('0x32')]));if(_0x2d4e18['query'][_0x4d74('0x3c')]){_0x4fc279[_0x4d74('0x3b')]=_['merge'](_0x4fc279[_0x4d74('0x3b')],{'$or':_['map'](_0x4fc279[_0x4d74('0x35')],function(_0x152969){var _0x3188f1={};_0x3188f1[_0x152969]={'$like':'%'+_0x2d4e18['query'][_0x4d74('0x3c')]+'%'};return _0x3188f1;})});}_0x4fc279=_[_0x4d74('0x3d')]({},_0x4fc279,_0x2d4e18[_0x4d74('0x3f')]);return _0x48b0ad[_0x4d74('0x51')](_0x4fc279);}})['then'](function(_0x167e51){if(_0x167e51){_0x567406=_0x167e51[_0x4d74('0x36')];if(!_0x2d4e18[_0x4d74('0x31')][_0x4d74('0x37')](_0x4d74('0x38'))){_0x4fc279['limit']=qs[_0x4d74('0x1e')](_0x2d4e18['query'][_0x4d74('0x1e')]);_0x4fc279[_0x4d74('0x1c')]=qs[_0x4d74('0x1c')](_0x2d4e18['query'][_0x4d74('0x1c')]);}return _0x48b0ad[_0x4d74('0x51')](_0x4fc279);}})['then'](function(_0x19f118){if(_0x19f118){return _0x19f118?{'count':_0x567406,'rows':_0x19f118}:null;}})[_0x4d74('0x25')](respondWithResult(_0x25e7e6,null))[_0x4d74('0x45')](handleError(_0x25e7e6,null));};exports['setTags']=function(_0x33525b,_0x472dc4,_0x4daf02){if(_0x33525b[_0x4d74('0x4a')]['id']){delete _0x33525b[_0x4d74('0x4a')]['id'];}return db[_0x4d74('0x40')][_0x4d74('0x4d')]({'where':{'id':_0x33525b[_0x4d74('0x46')]['id']}})[_0x4d74('0x25')](handleEntityNotFound(_0x472dc4,null))[_0x4d74('0x25')](function(_0x4878fc){if(_0x4878fc){return _0x4878fc[_0x4d74('0x53')](_0x33525b['body']['ids']||[]);}return null;})[_0x4d74('0x25')](respondWithResult(_0x472dc4,null))['catch'](handleError(_0x472dc4,null));}; \ No newline at end of file diff --git a/server/api/intFreshdeskConfiguration/intFreshdeskConfiguration.model.js b/server/api/intFreshdeskConfiguration/intFreshdeskConfiguration.model.js index 49a7ca2..a70a39a 100644 --- a/server/api/intFreshdeskConfiguration/intFreshdeskConfiguration.model.js +++ b/server/api/intFreshdeskConfiguration/intFreshdeskConfiguration.model.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xaafd=['moment','bluebird','request-promise','rimraf','../../config/environment','./intFreshdeskConfiguration.attributes','exports','define','FreshdeskConfiguration','lodash','../../config/logger','api'];(function(_0x3b2377,_0x1be5c4){var _0x4defd8=function(_0x1d21f0){while(--_0x1d21f0){_0x3b2377['push'](_0x3b2377['shift']());}};_0x4defd8(++_0x1be5c4);}(_0xaafd,0xed));var _0xdaaf=function(_0x29782b,_0x33ff83){_0x29782b=_0x29782b-0x0;var _0x5c2c1f=_0xaafd[_0x29782b];return _0x5c2c1f;};'use strict';var _=require(_0xdaaf('0x0'));var util=require('util');var logger=require(_0xdaaf('0x1'))(_0xdaaf('0x2'));var moment=require(_0xdaaf('0x3'));var BPromise=require(_0xdaaf('0x4'));var rp=require(_0xdaaf('0x5'));var fs=require('fs');var path=require('path');var rimraf=require(_0xdaaf('0x6'));var config=require(_0xdaaf('0x7'));var attributes=require(_0xdaaf('0x8'));module[_0xdaaf('0x9')]=function(_0x21075f,_0x23df95){return _0x21075f[_0xdaaf('0xa')](_0xdaaf('0xb'),attributes,{'tableName':'int_freshdesk_configurations','paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file +var _0x81ff=['moment','bluebird','path','rimraf','../../config/environment','./intFreshdeskConfiguration.attributes','exports','FreshdeskConfiguration','lodash','util','../../config/logger','api'];(function(_0x1c82e2,_0x1c7db7){var _0x11fdc9=function(_0x44ce33){while(--_0x44ce33){_0x1c82e2['push'](_0x1c82e2['shift']());}};_0x11fdc9(++_0x1c7db7);}(_0x81ff,0x1e8));var _0xf81f=function(_0x39a0ec,_0x58e84b){_0x39a0ec=_0x39a0ec-0x0;var _0x46157b=_0x81ff[_0x39a0ec];return _0x46157b;};'use strict';var _=require(_0xf81f('0x0'));var util=require(_0xf81f('0x1'));var logger=require(_0xf81f('0x2'))(_0xf81f('0x3'));var moment=require(_0xf81f('0x4'));var BPromise=require(_0xf81f('0x5'));var rp=require('request-promise');var fs=require('fs');var path=require(_0xf81f('0x6'));var rimraf=require(_0xf81f('0x7'));var config=require(_0xf81f('0x8'));var attributes=require(_0xf81f('0x9'));module[_0xf81f('0xa')]=function(_0x4a9bd0,_0x3a2b8c){return _0x4a9bd0['define'](_0xf81f('0xb'),attributes,{'tableName':'int_freshdesk_configurations','paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file diff --git a/server/api/intFreshdeskConfiguration/intFreshdeskConfiguration.rpc.js b/server/api/intFreshdeskConfiguration/intFreshdeskConfiguration.rpc.js index 4679a30..f33474f 100644 --- a/server/api/intFreshdeskConfiguration/intFreshdeskConfiguration.rpc.js +++ b/server/api/intFreshdeskConfiguration/intFreshdeskConfiguration.rpc.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x2039=['lodash','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/logger','../../config/environment','client','http','then','info','FreshdeskConfiguration,\x20%s,\x20%s','FreshdeskConfiguration,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','code','message'];(function(_0x58cbe9,_0x20713e){var _0x4ddb01=function(_0x16e55f){while(--_0x16e55f){_0x58cbe9['push'](_0x58cbe9['shift']());}};_0x4ddb01(++_0x20713e);}(_0x2039,0x1b8));var _0x9203=function(_0x3947c9,_0x4d6c97){_0x3947c9=_0x3947c9-0x0;var _0x2e7871=_0x2039[_0x3947c9];return _0x2e7871;};'use strict';var _=require(_0x9203('0x0'));var util=require(_0x9203('0x1'));var moment=require(_0x9203('0x2'));var BPromise=require(_0x9203('0x3'));var rs=require(_0x9203('0x4'));var fs=require('fs');var Redis=require(_0x9203('0x5'));var db=require(_0x9203('0x6'))['db'];var utils=require('../../config/utils');var logger=require(_0x9203('0x7'))('rpc');var config=require(_0x9203('0x8'));var jayson=require('jayson/promise');var client=jayson[_0x9203('0x9')][_0x9203('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x4f9240,_0x4eab72,_0x246600){return new BPromise(function(_0x2c7106,_0x23d86a){return client['request'](_0x4f9240,_0x246600)[_0x9203('0xb')](function(_0x4425bd){logger[_0x9203('0xc')](_0x9203('0xd'),_0x4eab72,'request\x20sent');logger['debug'](_0x9203('0xe'),_0x4eab72,_0x9203('0xf'),JSON[_0x9203('0x10')](_0x4425bd));if(_0x4425bd['error']){if(_0x4425bd[_0x9203('0x11')][_0x9203('0x12')]===0x1f4){logger['error'](_0x9203('0xd'),_0x4eab72,_0x4425bd[_0x9203('0x11')][_0x9203('0x13')]);return _0x23d86a(_0x4425bd[_0x9203('0x11')][_0x9203('0x13')]);}logger[_0x9203('0x11')](_0x9203('0xd'),_0x4eab72,_0x4425bd[_0x9203('0x11')][_0x9203('0x13')]);return _0x2c7106(_0x4425bd[_0x9203('0x11')][_0x9203('0x13')]);}else{logger[_0x9203('0xc')](_0x9203('0xd'),_0x4eab72,_0x9203('0xf'));_0x2c7106(_0x4425bd['result'][_0x9203('0x13')]);}})['catch'](function(_0x5da99f){logger[_0x9203('0x11')](_0x9203('0xd'),_0x4eab72,_0x5da99f);_0x23d86a(_0x5da99f);});});} \ No newline at end of file +var _0x945d=['catch','lodash','util','moment','randomstring','ioredis','../../mysqldb','../../config/utils','jayson/promise','client','http','request','info','FreshdeskConfiguration,\x20%s,\x20%s','request\x20sent','debug','FreshdeskConfiguration,\x20%s,\x20%s,\x20%s','stringify','error','code','message'];(function(_0x5af7c5,_0x23f1d6){var _0x500a58=function(_0x274e7c){while(--_0x274e7c){_0x5af7c5['push'](_0x5af7c5['shift']());}};_0x500a58(++_0x23f1d6);}(_0x945d,0x1cf));var _0xd945=function(_0x5692ec,_0x5154fe){_0x5692ec=_0x5692ec-0x0;var _0x1ea117=_0x945d[_0x5692ec];return _0x1ea117;};'use strict';var _=require(_0xd945('0x0'));var util=require(_0xd945('0x1'));var moment=require(_0xd945('0x2'));var BPromise=require('bluebird');var rs=require(_0xd945('0x3'));var fs=require('fs');var Redis=require(_0xd945('0x4'));var db=require(_0xd945('0x5'))['db'];var utils=require(_0xd945('0x6'));var logger=require('../../config/logger')('rpc');var config=require('../../config/environment');var jayson=require(_0xd945('0x7'));var client=jayson[_0xd945('0x8')][_0xd945('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x38131a,_0x295de4,_0x50db6e){return new BPromise(function(_0x2d4da7,_0x49855b){return client[_0xd945('0xa')](_0x38131a,_0x50db6e)['then'](function(_0x2e55a4){logger[_0xd945('0xb')](_0xd945('0xc'),_0x295de4,_0xd945('0xd'));logger[_0xd945('0xe')](_0xd945('0xf'),_0x295de4,_0xd945('0xd'),JSON[_0xd945('0x10')](_0x2e55a4));if(_0x2e55a4[_0xd945('0x11')]){if(_0x2e55a4[_0xd945('0x11')][_0xd945('0x12')]===0x1f4){logger[_0xd945('0x11')](_0xd945('0xc'),_0x295de4,_0x2e55a4[_0xd945('0x11')][_0xd945('0x13')]);return _0x49855b(_0x2e55a4['error'][_0xd945('0x13')]);}logger[_0xd945('0x11')](_0xd945('0xc'),_0x295de4,_0x2e55a4[_0xd945('0x11')][_0xd945('0x13')]);return _0x2d4da7(_0x2e55a4[_0xd945('0x11')][_0xd945('0x13')]);}else{logger[_0xd945('0xb')](_0xd945('0xc'),_0x295de4,_0xd945('0xd'));_0x2d4da7(_0x2e55a4['result']['message']);}})[_0xd945('0x14')](function(_0x9534f8){logger[_0xd945('0x11')](_0xd945('0xc'),_0x295de4,_0x9534f8);_0x49855b(_0x9534f8);});});} \ No newline at end of file diff --git a/server/api/intFreshdeskField/index.js b/server/api/intFreshdeskField/index.js index 9575331..3340f0a 100644 --- a/server/api/intFreshdeskField/index.js +++ b/server/api/intFreshdeskField/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xccf9=['connect-timeout','Router','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','get','index','/:id','show','post','isAuthenticated','create','put','delete','exports','util'];(function(_0x31a9b6,_0x29217a){var _0xe7dfd0=function(_0x3186ef){while(--_0x3186ef){_0x31a9b6['push'](_0x31a9b6['shift']());}};_0xe7dfd0(++_0x29217a);}(_0xccf9,0x65));var _0x9ccf=function(_0x19d59a,_0x48afd8){_0x19d59a=_0x19d59a-0x0;var _0x498df2=_0xccf9[_0x19d59a];return _0x498df2;};'use strict';var multer=require('multer');var util=require(_0x9ccf('0x0'));var path=require('path');var timeout=require(_0x9ccf('0x1'));var express=require('express');var router=express[_0x9ccf('0x2')]();var fs_extra=require(_0x9ccf('0x3'));var auth=require(_0x9ccf('0x4'));var interaction=require(_0x9ccf('0x5'));var config=require(_0x9ccf('0x6'));var controller=require('./intFreshdeskField.controller');router[_0x9ccf('0x7')]('/',auth['isAuthenticated'](),controller[_0x9ccf('0x8')]);router[_0x9ccf('0x7')](_0x9ccf('0x9'),auth['isAuthenticated'](),controller[_0x9ccf('0xa')]);router[_0x9ccf('0xb')]('/',auth[_0x9ccf('0xc')](),controller[_0x9ccf('0xd')]);router[_0x9ccf('0xe')](_0x9ccf('0x9'),auth[_0x9ccf('0xc')](),controller['update']);router[_0x9ccf('0xf')](_0x9ccf('0x9'),auth[_0x9ccf('0xc')](),controller['destroy']);module[_0x9ccf('0x10')]=router; \ No newline at end of file +var _0xc5bb=['express','Router','../../components/interaction/service','../../config/environment','get','isAuthenticated','index','/:id','show','post','put','update','delete','exports','multer','connect-timeout'];(function(_0x4f02d4,_0x1ed9bf){var _0x163b04=function(_0x52e36d){while(--_0x52e36d){_0x4f02d4['push'](_0x4f02d4['shift']());}};_0x163b04(++_0x1ed9bf);}(_0xc5bb,0x18e));var _0xbc5b=function(_0x145191,_0x3d888b){_0x145191=_0x145191-0x0;var _0x5661c3=_0xc5bb[_0x145191];return _0x5661c3;};'use strict';var multer=require(_0xbc5b('0x0'));var util=require('util');var path=require('path');var timeout=require(_0xbc5b('0x1'));var express=require(_0xbc5b('0x2'));var router=express[_0xbc5b('0x3')]();var fs_extra=require('fs-extra');var auth=require('../../components/auth/service');var interaction=require(_0xbc5b('0x4'));var config=require(_0xbc5b('0x5'));var controller=require('./intFreshdeskField.controller');router[_0xbc5b('0x6')]('/',auth[_0xbc5b('0x7')](),controller[_0xbc5b('0x8')]);router[_0xbc5b('0x6')](_0xbc5b('0x9'),auth[_0xbc5b('0x7')](),controller[_0xbc5b('0xa')]);router[_0xbc5b('0xb')]('/',auth[_0xbc5b('0x7')](),controller['create']);router[_0xbc5b('0xc')](_0xbc5b('0x9'),auth[_0xbc5b('0x7')](),controller[_0xbc5b('0xd')]);router[_0xbc5b('0xe')](_0xbc5b('0x9'),auth[_0xbc5b('0x7')](),controller['destroy']);module[_0xbc5b('0xf')]=router; \ No newline at end of file diff --git a/server/api/intFreshdeskField/intFreshdeskField.attributes.js b/server/api/intFreshdeskField/intFreshdeskField.attributes.js index 72f3b8d..921309a 100644 --- a/server/api/intFreshdeskField/intFreshdeskField.attributes.js +++ b/server/api/intFreshdeskField/intFreshdeskField.attributes.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x9158=['string','STRING','variable','BOOLEAN','sequelize','exports','ENUM','customVariable','keyValue','picklist'];(function(_0x53f505,_0x37c629){var _0x56143d=function(_0x230559){while(--_0x230559){_0x53f505['push'](_0x53f505['shift']());}};_0x56143d(++_0x37c629);}(_0x9158,0x194));var _0x8915=function(_0x2a7b4e,_0x3bfc0e){_0x2a7b4e=_0x2a7b4e-0x0;var _0x5dc554=_0x9158[_0x2a7b4e];return _0x5dc554;};'use strict';var Sequelize=require(_0x8915('0x0'));module[_0x8915('0x1')]={'type':{'type':Sequelize[_0x8915('0x2')]('string','variable',_0x8915('0x3'),_0x8915('0x4'),_0x8915('0x5')),'defaultValue':_0x8915('0x6')},'content':{'type':Sequelize[_0x8915('0x7')]},'key':{'type':Sequelize[_0x8915('0x7')]},'keyType':{'type':Sequelize['ENUM'](_0x8915('0x6'),_0x8915('0x8'),_0x8915('0x3'))},'keyContent':{'type':Sequelize[_0x8915('0x7')]},'idField':{'type':Sequelize[_0x8915('0x7')]},'nameField':{'type':Sequelize['STRING']},'customField':{'type':Sequelize[_0x8915('0x9')],'defaultValue':!![]},'variableName':{'type':Sequelize[_0x8915('0x7')]}}; \ No newline at end of file +var _0x5f21=['string','variable','customVariable','keyValue','picklist','STRING','sequelize','ENUM'];(function(_0x4aafb9,_0x9c0c15){var _0x1bd998=function(_0x373a6f){while(--_0x373a6f){_0x4aafb9['push'](_0x4aafb9['shift']());}};_0x1bd998(++_0x9c0c15);}(_0x5f21,0x1de));var _0x15f2=function(_0x124128,_0x1934dd){_0x124128=_0x124128-0x0;var _0x25079e=_0x5f21[_0x124128];return _0x25079e;};'use strict';var Sequelize=require(_0x15f2('0x0'));module['exports']={'type':{'type':Sequelize[_0x15f2('0x1')](_0x15f2('0x2'),_0x15f2('0x3'),_0x15f2('0x4'),_0x15f2('0x5'),_0x15f2('0x6')),'defaultValue':_0x15f2('0x2')},'content':{'type':Sequelize[_0x15f2('0x7')]},'key':{'type':Sequelize[_0x15f2('0x7')]},'keyType':{'type':Sequelize[_0x15f2('0x1')](_0x15f2('0x2'),_0x15f2('0x3'),_0x15f2('0x4'))},'keyContent':{'type':Sequelize[_0x15f2('0x7')]},'idField':{'type':Sequelize[_0x15f2('0x7')]},'nameField':{'type':Sequelize[_0x15f2('0x7')]},'customField':{'type':Sequelize['BOOLEAN'],'defaultValue':!![]},'variableName':{'type':Sequelize[_0x15f2('0x7')]}}; \ No newline at end of file diff --git a/server/api/intFreshdeskField/intFreshdeskField.controller.js b/server/api/intFreshdeskField/intFreshdeskField.controller.js index c93278c..7b095c5 100644 --- a/server/api/intFreshdeskField/intFreshdeskField.controller.js +++ b/server/api/intFreshdeskField/intFreshdeskField.controller.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x8ce3=['Content-Range','apply','reject','save','update','then','destroy','error','stack','name','send','index','map','rawAttributes','type','model','query','keys','filters','intersection','attributes','fields','length','hasOwnProperty','order','sort','where','pick','merge','filter','options','includeAll','findAll','rows','catch','show','params','find','create','body','FreshdeskField','eml-format','rimraf','fast-json-patch','request-promise','moment','bluebird','mustache','util','path','sox','ejs','fs-extra','squel','crypto','jsforce','to-csv','papaparse','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','sendStatus','status','end','json','offset','limit','undefined','count','set'];(function(_0x125ff8,_0x41925f){var _0x2d9ef=function(_0x4ef34c){while(--_0x4ef34c){_0x125ff8['push'](_0x125ff8['shift']());}};_0x2d9ef(++_0x41925f);}(_0x8ce3,0xc3));var _0x38ce=function(_0x38b100,_0x177901){_0x38b100=_0x38b100-0x0;var _0x2bece2=_0x8ce3[_0x38b100];return _0x2bece2;};'use strict';var emlformat=require(_0x38ce('0x0'));var rimraf=require(_0x38ce('0x1'));var zipdir=require('zip-dir');var jsonpatch=require(_0x38ce('0x2'));var rp=require(_0x38ce('0x3'));var moment=require(_0x38ce('0x4'));var BPromise=require(_0x38ce('0x5'));var Mustache=require(_0x38ce('0x6'));var util=require(_0x38ce('0x7'));var path=require(_0x38ce('0x8'));var sox=require(_0x38ce('0x9'));var csv=require('to-csv');var ejs=require(_0x38ce('0xa'));var fs=require('fs');var fs_extra=require(_0x38ce('0xb'));var _=require('lodash');var squel=require(_0x38ce('0xc'));var crypto=require(_0x38ce('0xd'));var jsforce=require(_0x38ce('0xe'));var deskjs=require('desk.js');var toCsv=require(_0x38ce('0xf'));var querystring=require('querystring');var Papa=require(_0x38ce('0x10'));var Redis=require('ioredis');var authService=require(_0x38ce('0x11'));var qs=require(_0x38ce('0x12'));var as=require(_0x38ce('0x13'));var hardwareService=require(_0x38ce('0x14'));var logger=require(_0x38ce('0x15'))(_0x38ce('0x16'));var utils=require(_0x38ce('0x17'));var config=require(_0x38ce('0x18'));var licenseUtil=require(_0x38ce('0x19'));var db=require(_0x38ce('0x1a'))['db'];function respondWithStatusCode(_0x42e234,_0x3ef662){_0x3ef662=_0x3ef662||0xcc;return function(_0x28b554){if(_0x28b554){return _0x42e234[_0x38ce('0x1b')](_0x3ef662);}return _0x42e234[_0x38ce('0x1c')](_0x3ef662)[_0x38ce('0x1d')]();};}function respondWithResult(_0x56a09f,_0x48ba7c){_0x48ba7c=_0x48ba7c||0xc8;return function(_0x3c4d7f){if(_0x3c4d7f){return _0x56a09f[_0x38ce('0x1c')](_0x48ba7c)[_0x38ce('0x1e')](_0x3c4d7f);}};}function respondWithFilteredResult(_0x55be6a,_0x2f3b99){return function(_0x54fcd3){if(_0x54fcd3){var _0x2771ec=typeof _0x2f3b99[_0x38ce('0x1f')]==='undefined'&&typeof _0x2f3b99[_0x38ce('0x20')]===_0x38ce('0x21');var _0x1dfaba=_0x54fcd3['count'];var _0xe4099a=_0x2771ec?0x0:_0x2f3b99[_0x38ce('0x1f')];var _0x3df527=_0x2771ec?_0x54fcd3[_0x38ce('0x22')]:_0x2f3b99[_0x38ce('0x1f')]+_0x2f3b99[_0x38ce('0x20')];var _0x2d4218;if(_0x3df527>=_0x1dfaba){_0x3df527=_0x1dfaba;_0x2d4218=0xc8;}else{_0x2d4218=0xce;}_0x55be6a['status'](_0x2d4218);return _0x55be6a[_0x38ce('0x23')](_0x38ce('0x24'),_0xe4099a+'-'+_0x3df527+'/'+_0x1dfaba)[_0x38ce('0x1e')](_0x54fcd3);}return null;};}function patchUpdates(_0x303391){return function(_0x30b060){try{jsonpatch[_0x38ce('0x25')](_0x30b060,_0x303391,!![]);}catch(_0x323490){return BPromise[_0x38ce('0x26')](_0x323490);}return _0x30b060[_0x38ce('0x27')]();};}function saveUpdates(_0x3cf50b,_0x1aace7){return function(_0x580cf3){if(_0x580cf3){return _0x580cf3[_0x38ce('0x28')](_0x3cf50b)[_0x38ce('0x29')](function(_0xe40e9c){return _0xe40e9c;});}return null;};}function removeEntity(_0xcf5d9e,_0x4a56b0){return function(_0x2c85e6){if(_0x2c85e6){return _0x2c85e6[_0x38ce('0x2a')]()['then'](function(){_0xcf5d9e[_0x38ce('0x1c')](0xcc)[_0x38ce('0x1d')]();});}};}function handleEntityNotFound(_0x43b479,_0x5b330c){return function(_0x4a7e8e){if(!_0x4a7e8e){_0x43b479[_0x38ce('0x1b')](0x194);}return _0x4a7e8e;};}function handleError(_0x28ab4c,_0x142d72){_0x142d72=_0x142d72||0x1f4;return function(_0x21d4e7){logger[_0x38ce('0x2b')](_0x21d4e7[_0x38ce('0x2c')]);if(_0x21d4e7[_0x38ce('0x2d')]){delete _0x21d4e7[_0x38ce('0x2d')];}_0x28ab4c[_0x38ce('0x1c')](_0x142d72)[_0x38ce('0x2e')](_0x21d4e7);};}exports[_0x38ce('0x2f')]=function(_0x381703,_0x50692a){var _0x1212dd={},_0x1538a0={},_0x5b4a7a={'count':0x0,'rows':[]};var _0x229ac2=_[_0x38ce('0x30')](db['FreshdeskField'][_0x38ce('0x31')],function(_0x282ee4){return{'name':_0x282ee4['fieldName'],'type':_0x282ee4[_0x38ce('0x32')]['key']};});_0x1538a0[_0x38ce('0x33')]=_[_0x38ce('0x30')](_0x229ac2,_0x38ce('0x2d'));_0x1538a0[_0x38ce('0x34')]=_[_0x38ce('0x35')](_0x381703[_0x38ce('0x34')]);_0x1538a0[_0x38ce('0x36')]=_[_0x38ce('0x37')](_0x1538a0['model'],_0x1538a0['query']);_0x1212dd[_0x38ce('0x38')]=_[_0x38ce('0x37')](_0x1538a0[_0x38ce('0x33')],qs[_0x38ce('0x39')](_0x381703[_0x38ce('0x34')]['fields']));_0x1212dd[_0x38ce('0x38')]=_0x1212dd[_0x38ce('0x38')][_0x38ce('0x3a')]?_0x1212dd[_0x38ce('0x38')]:_0x1538a0[_0x38ce('0x33')];if(!_0x381703[_0x38ce('0x34')][_0x38ce('0x3b')]('nolimit')){_0x1212dd[_0x38ce('0x20')]=qs[_0x38ce('0x20')](_0x381703['query'][_0x38ce('0x20')]);_0x1212dd[_0x38ce('0x1f')]=qs[_0x38ce('0x1f')](_0x381703[_0x38ce('0x34')][_0x38ce('0x1f')]);}_0x1212dd[_0x38ce('0x3c')]=qs[_0x38ce('0x3d')](_0x381703[_0x38ce('0x34')]['sort']);_0x1212dd[_0x38ce('0x3e')]=qs[_0x38ce('0x36')](_[_0x38ce('0x3f')](_0x381703[_0x38ce('0x34')],_0x1538a0['filters']),_0x229ac2);if(_0x381703[_0x38ce('0x34')]['filter']){_0x1212dd[_0x38ce('0x3e')]=_[_0x38ce('0x40')](_0x1212dd[_0x38ce('0x3e')],{'$or':_[_0x38ce('0x30')](_0x229ac2,function(_0x43d629){if(_0x43d629[_0x38ce('0x32')]!=='VIRTUAL'){var _0x1c3fd5={};_0x1c3fd5[_0x43d629['name']]={'$like':'%'+_0x381703[_0x38ce('0x34')][_0x38ce('0x41')]+'%'};return _0x1c3fd5;}})});}_0x1212dd=_[_0x38ce('0x40')]({},_0x1212dd,_0x381703[_0x38ce('0x42')]);var _0x277e94={'where':_0x1212dd[_0x38ce('0x3e')]};return db['FreshdeskField'][_0x38ce('0x22')](_0x277e94)[_0x38ce('0x29')](function(_0x318ff8){_0x5b4a7a[_0x38ce('0x22')]=_0x318ff8;if(_0x381703[_0x38ce('0x34')][_0x38ce('0x43')]){_0x1212dd['include']=[{'all':!![]}];}return db['FreshdeskField'][_0x38ce('0x44')](_0x1212dd);})[_0x38ce('0x29')](function(_0x174c86){_0x5b4a7a[_0x38ce('0x45')]=_0x174c86;return _0x5b4a7a;})[_0x38ce('0x29')](respondWithFilteredResult(_0x50692a,_0x1212dd))[_0x38ce('0x46')](handleError(_0x50692a,null));};exports[_0x38ce('0x47')]=function(_0x570a3d,_0x43b4fc){var _0x30cfe3={'raw':!![],'where':{'id':_0x570a3d[_0x38ce('0x48')]['id']}},_0x5a689b={};_0x5a689b[_0x38ce('0x33')]=_[_0x38ce('0x35')](db['FreshdeskField'][_0x38ce('0x31')]);_0x5a689b[_0x38ce('0x34')]=_[_0x38ce('0x35')](_0x570a3d[_0x38ce('0x34')]);_0x5a689b[_0x38ce('0x36')]=_[_0x38ce('0x37')](_0x5a689b['model'],_0x5a689b[_0x38ce('0x34')]);_0x30cfe3[_0x38ce('0x38')]=_[_0x38ce('0x37')](_0x5a689b[_0x38ce('0x33')],qs[_0x38ce('0x39')](_0x570a3d[_0x38ce('0x34')]['fields']));_0x30cfe3[_0x38ce('0x38')]=_0x30cfe3[_0x38ce('0x38')]['length']?_0x30cfe3['attributes']:_0x5a689b['model'];if(_0x570a3d[_0x38ce('0x34')][_0x38ce('0x43')]){_0x30cfe3['include']=[{'all':!![]}];}_0x30cfe3=_['merge']({},_0x30cfe3,_0x570a3d[_0x38ce('0x42')]);return db['FreshdeskField'][_0x38ce('0x49')](_0x30cfe3)['then'](handleEntityNotFound(_0x43b4fc,null))[_0x38ce('0x29')](respondWithResult(_0x43b4fc,null))[_0x38ce('0x46')](handleError(_0x43b4fc,null));};exports['create']=function(_0x1d9ef8,_0x17a8cf){return db['FreshdeskField'][_0x38ce('0x4a')](_0x1d9ef8[_0x38ce('0x4b')],{})[_0x38ce('0x29')](respondWithResult(_0x17a8cf,0xc9))[_0x38ce('0x46')](handleError(_0x17a8cf,null));};exports[_0x38ce('0x28')]=function(_0x25a299,_0x58cc6f){if(_0x25a299[_0x38ce('0x4b')]['id']){delete _0x25a299[_0x38ce('0x4b')]['id'];}return db['FreshdeskField'][_0x38ce('0x49')]({'where':{'id':_0x25a299[_0x38ce('0x48')]['id']}})[_0x38ce('0x29')](handleEntityNotFound(_0x58cc6f,null))[_0x38ce('0x29')](saveUpdates(_0x25a299[_0x38ce('0x4b')],null))[_0x38ce('0x29')](respondWithResult(_0x58cc6f,null))[_0x38ce('0x46')](handleError(_0x58cc6f,null));};exports['destroy']=function(_0x3e1522,_0x34a118){return db[_0x38ce('0x4c')][_0x38ce('0x49')]({'where':{'id':_0x3e1522[_0x38ce('0x48')]['id']}})[_0x38ce('0x29')](handleEntityNotFound(_0x34a118,null))['then'](removeEntity(_0x34a118,null))['catch'](handleError(_0x34a118,null));}; \ No newline at end of file +var _0xe13a=['bluebird','mustache','util','path','sox','to-csv','ejs','fs-extra','lodash','crypto','jsforce','desk.js','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','status','json','offset','limit','undefined','count','set','Content-Range','apply','reject','save','update','destroy','stack','name','send','index','map','FreshdeskField','rawAttributes','fieldName','key','model','query','keys','attributes','intersection','fields','order','sort','where','pick','filters','merge','type','VIRTUAL','options','then','includeAll','include','findAll','rows','show','length','find','catch','create','body','rimraf','zip-dir','fast-json-patch','request-promise'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0xe13a,0x178));var _0xae13=function(_0x5f2838,_0x5de0ef){_0x5f2838=_0x5f2838-0x0;var _0x477570=_0xe13a[_0x5f2838];return _0x477570;};'use strict';var emlformat=require('eml-format');var rimraf=require(_0xae13('0x0'));var zipdir=require(_0xae13('0x1'));var jsonpatch=require(_0xae13('0x2'));var rp=require(_0xae13('0x3'));var moment=require('moment');var BPromise=require(_0xae13('0x4'));var Mustache=require(_0xae13('0x5'));var util=require(_0xae13('0x6'));var path=require(_0xae13('0x7'));var sox=require(_0xae13('0x8'));var csv=require(_0xae13('0x9'));var ejs=require(_0xae13('0xa'));var fs=require('fs');var fs_extra=require(_0xae13('0xb'));var _=require(_0xae13('0xc'));var squel=require('squel');var crypto=require(_0xae13('0xd'));var jsforce=require(_0xae13('0xe'));var deskjs=require(_0xae13('0xf'));var toCsv=require(_0xae13('0x9'));var querystring=require(_0xae13('0x10'));var Papa=require(_0xae13('0x11'));var Redis=require(_0xae13('0x12'));var authService=require(_0xae13('0x13'));var qs=require(_0xae13('0x14'));var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0xae13('0x15'));var logger=require(_0xae13('0x16'))(_0xae13('0x17'));var utils=require(_0xae13('0x18'));var config=require(_0xae13('0x19'));var licenseUtil=require(_0xae13('0x1a'));var db=require(_0xae13('0x1b'))['db'];function respondWithStatusCode(_0x4dd599,_0x42d869){_0x42d869=_0x42d869||0xcc;return function(_0x159632){if(_0x159632){return _0x4dd599['sendStatus'](_0x42d869);}return _0x4dd599['status'](_0x42d869)['end']();};}function respondWithResult(_0x50f7c4,_0x52484b){_0x52484b=_0x52484b||0xc8;return function(_0x26ff3e){if(_0x26ff3e){return _0x50f7c4[_0xae13('0x1c')](_0x52484b)[_0xae13('0x1d')](_0x26ff3e);}};}function respondWithFilteredResult(_0x90cdc1,_0x537889){return function(_0x2912a2){if(_0x2912a2){var _0x5c25a4=typeof _0x537889[_0xae13('0x1e')]==='undefined'&&typeof _0x537889[_0xae13('0x1f')]===_0xae13('0x20');var _0x207363=_0x2912a2[_0xae13('0x21')];var _0x1a9c07=_0x5c25a4?0x0:_0x537889[_0xae13('0x1e')];var _0x32dcbe=_0x5c25a4?_0x2912a2[_0xae13('0x21')]:_0x537889[_0xae13('0x1e')]+_0x537889['limit'];var _0x4462a5;if(_0x32dcbe>=_0x207363){_0x32dcbe=_0x207363;_0x4462a5=0xc8;}else{_0x4462a5=0xce;}_0x90cdc1['status'](_0x4462a5);return _0x90cdc1[_0xae13('0x22')](_0xae13('0x23'),_0x1a9c07+'-'+_0x32dcbe+'/'+_0x207363)['json'](_0x2912a2);}return null;};}function patchUpdates(_0x25a195){return function(_0x39d41c){try{jsonpatch[_0xae13('0x24')](_0x39d41c,_0x25a195,!![]);}catch(_0x240802){return BPromise[_0xae13('0x25')](_0x240802);}return _0x39d41c[_0xae13('0x26')]();};}function saveUpdates(_0x54b3b4,_0x520692){return function(_0x149eda){if(_0x149eda){return _0x149eda[_0xae13('0x27')](_0x54b3b4)['then'](function(_0x168b92){return _0x168b92;});}return null;};}function removeEntity(_0x519a37,_0x13c2de){return function(_0x194437){if(_0x194437){return _0x194437[_0xae13('0x28')]()['then'](function(){_0x519a37['status'](0xcc)['end']();});}};}function handleEntityNotFound(_0x4edb8c,_0xc5e6a7){return function(_0x17ce58){if(!_0x17ce58){_0x4edb8c['sendStatus'](0x194);}return _0x17ce58;};}function handleError(_0x370874,_0x517e71){_0x517e71=_0x517e71||0x1f4;return function(_0x3d0d60){logger['error'](_0x3d0d60[_0xae13('0x29')]);if(_0x3d0d60[_0xae13('0x2a')]){delete _0x3d0d60['name'];}_0x370874[_0xae13('0x1c')](_0x517e71)[_0xae13('0x2b')](_0x3d0d60);};}exports[_0xae13('0x2c')]=function(_0x306dfb,_0x578e99){var _0x41ceb7={},_0x27b737={},_0x1d7152={'count':0x0,'rows':[]};var _0x68ce70=_[_0xae13('0x2d')](db[_0xae13('0x2e')][_0xae13('0x2f')],function(_0x5bd0ee){return{'name':_0x5bd0ee[_0xae13('0x30')],'type':_0x5bd0ee['type'][_0xae13('0x31')]};});_0x27b737[_0xae13('0x32')]=_[_0xae13('0x2d')](_0x68ce70,_0xae13('0x2a'));_0x27b737[_0xae13('0x33')]=_[_0xae13('0x34')](_0x306dfb[_0xae13('0x33')]);_0x27b737['filters']=_['intersection'](_0x27b737[_0xae13('0x32')],_0x27b737[_0xae13('0x33')]);_0x41ceb7[_0xae13('0x35')]=_[_0xae13('0x36')](_0x27b737[_0xae13('0x32')],qs[_0xae13('0x37')](_0x306dfb[_0xae13('0x33')][_0xae13('0x37')]));_0x41ceb7[_0xae13('0x35')]=_0x41ceb7[_0xae13('0x35')]['length']?_0x41ceb7[_0xae13('0x35')]:_0x27b737[_0xae13('0x32')];if(!_0x306dfb[_0xae13('0x33')]['hasOwnProperty']('nolimit')){_0x41ceb7['limit']=qs['limit'](_0x306dfb['query']['limit']);_0x41ceb7[_0xae13('0x1e')]=qs[_0xae13('0x1e')](_0x306dfb[_0xae13('0x33')]['offset']);}_0x41ceb7[_0xae13('0x38')]=qs[_0xae13('0x39')](_0x306dfb[_0xae13('0x33')][_0xae13('0x39')]);_0x41ceb7[_0xae13('0x3a')]=qs['filters'](_[_0xae13('0x3b')](_0x306dfb[_0xae13('0x33')],_0x27b737[_0xae13('0x3c')]),_0x68ce70);if(_0x306dfb['query']['filter']){_0x41ceb7[_0xae13('0x3a')]=_[_0xae13('0x3d')](_0x41ceb7[_0xae13('0x3a')],{'$or':_[_0xae13('0x2d')](_0x68ce70,function(_0x4a17bb){if(_0x4a17bb[_0xae13('0x3e')]!==_0xae13('0x3f')){var _0x538283={};_0x538283[_0x4a17bb[_0xae13('0x2a')]]={'$like':'%'+_0x306dfb[_0xae13('0x33')]['filter']+'%'};return _0x538283;}})});}_0x41ceb7=_[_0xae13('0x3d')]({},_0x41ceb7,_0x306dfb[_0xae13('0x40')]);var _0x3d3569={'where':_0x41ceb7[_0xae13('0x3a')]};return db['FreshdeskField'][_0xae13('0x21')](_0x3d3569)[_0xae13('0x41')](function(_0x166091){_0x1d7152[_0xae13('0x21')]=_0x166091;if(_0x306dfb['query'][_0xae13('0x42')]){_0x41ceb7[_0xae13('0x43')]=[{'all':!![]}];}return db[_0xae13('0x2e')][_0xae13('0x44')](_0x41ceb7);})['then'](function(_0x49428a){_0x1d7152[_0xae13('0x45')]=_0x49428a;return _0x1d7152;})[_0xae13('0x41')](respondWithFilteredResult(_0x578e99,_0x41ceb7))['catch'](handleError(_0x578e99,null));};exports[_0xae13('0x46')]=function(_0x4a3a43,_0x2b589f){var _0x230ba6={'raw':!![],'where':{'id':_0x4a3a43['params']['id']}},_0x3fca0a={};_0x3fca0a[_0xae13('0x32')]=_[_0xae13('0x34')](db[_0xae13('0x2e')][_0xae13('0x2f')]);_0x3fca0a['query']=_[_0xae13('0x34')](_0x4a3a43[_0xae13('0x33')]);_0x3fca0a[_0xae13('0x3c')]=_[_0xae13('0x36')](_0x3fca0a[_0xae13('0x32')],_0x3fca0a[_0xae13('0x33')]);_0x230ba6[_0xae13('0x35')]=_[_0xae13('0x36')](_0x3fca0a['model'],qs[_0xae13('0x37')](_0x4a3a43['query'][_0xae13('0x37')]));_0x230ba6[_0xae13('0x35')]=_0x230ba6[_0xae13('0x35')][_0xae13('0x47')]?_0x230ba6['attributes']:_0x3fca0a[_0xae13('0x32')];if(_0x4a3a43['query'][_0xae13('0x42')]){_0x230ba6[_0xae13('0x43')]=[{'all':!![]}];}_0x230ba6=_['merge']({},_0x230ba6,_0x4a3a43[_0xae13('0x40')]);return db[_0xae13('0x2e')][_0xae13('0x48')](_0x230ba6)[_0xae13('0x41')](handleEntityNotFound(_0x2b589f,null))[_0xae13('0x41')](respondWithResult(_0x2b589f,null))[_0xae13('0x49')](handleError(_0x2b589f,null));};exports['create']=function(_0x417ef2,_0x26dcbb){return db[_0xae13('0x2e')][_0xae13('0x4a')](_0x417ef2[_0xae13('0x4b')],{})['then'](respondWithResult(_0x26dcbb,0xc9))[_0xae13('0x49')](handleError(_0x26dcbb,null));};exports[_0xae13('0x27')]=function(_0x8e6f1e,_0x551ed6){if(_0x8e6f1e['body']['id']){delete _0x8e6f1e['body']['id'];}return db['FreshdeskField'][_0xae13('0x48')]({'where':{'id':_0x8e6f1e['params']['id']}})[_0xae13('0x41')](handleEntityNotFound(_0x551ed6,null))['then'](saveUpdates(_0x8e6f1e[_0xae13('0x4b')],null))[_0xae13('0x41')](respondWithResult(_0x551ed6,null))[_0xae13('0x49')](handleError(_0x551ed6,null));};exports[_0xae13('0x28')]=function(_0x4509ea,_0x53d341){return db[_0xae13('0x2e')][_0xae13('0x48')]({'where':{'id':_0x4509ea['params']['id']}})[_0xae13('0x41')](handleEntityNotFound(_0x53d341,null))[_0xae13('0x41')](removeEntity(_0x53d341,null))['catch'](handleError(_0x53d341,null));}; \ No newline at end of file diff --git a/server/api/intFreshdeskField/intFreshdeskField.model.js b/server/api/intFreshdeskField/intFreshdeskField.model.js index b71285c..014b1c4 100644 --- a/server/api/intFreshdeskField/intFreshdeskField.model.js +++ b/server/api/intFreshdeskField/intFreshdeskField.model.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xb38a=['freshdesk_unique_index','idField','lodash','util','../../config/logger','bluebird','request-promise','path','rimraf','../../config/environment','exports','FreshdeskField','int_freshdesk_fields'];(function(_0x521eeb,_0x2077b0){var _0x4029bb=function(_0x159e54){while(--_0x159e54){_0x521eeb['push'](_0x521eeb['shift']());}};_0x4029bb(++_0x2077b0);}(_0xb38a,0x77));var _0xab38=function(_0x2e3f14,_0x2f2dca){_0x2e3f14=_0x2e3f14-0x0;var _0x572430=_0xb38a[_0x2e3f14];return _0x572430;};'use strict';var _=require(_0xab38('0x0'));var util=require(_0xab38('0x1'));var logger=require(_0xab38('0x2'))('api');var moment=require('moment');var BPromise=require(_0xab38('0x3'));var rp=require(_0xab38('0x4'));var fs=require('fs');var path=require(_0xab38('0x5'));var rimraf=require(_0xab38('0x6'));var config=require(_0xab38('0x7'));var attributes=require('./intFreshdeskField.attributes');module[_0xab38('0x8')]=function(_0xa421a2,_0x38ec14){return _0xa421a2['define'](_0xab38('0x9'),attributes,{'tableName':_0xab38('0xa'),'paranoid':![],'indexes':[{'name':_0xab38('0xb'),'fields':[_0xab38('0xc'),'FieldId'],'unique':!![]}],'timestamps':!![]});}; \ No newline at end of file +var _0x2630=['../../config/environment','./intFreshdeskField.attributes','exports','FreshdeskField','int_freshdesk_fields','freshdesk_unique_index','idField','util','../../config/logger','api','moment','bluebird','path','rimraf'];(function(_0x427217,_0x4039b1){var _0x5b28fb=function(_0x3eaa08){while(--_0x3eaa08){_0x427217['push'](_0x427217['shift']());}};_0x5b28fb(++_0x4039b1);}(_0x2630,0x1b9));var _0x0263=function(_0x2e528d,_0x51971e){_0x2e528d=_0x2e528d-0x0;var _0x24ac34=_0x2630[_0x2e528d];return _0x24ac34;};'use strict';var _=require('lodash');var util=require(_0x0263('0x0'));var logger=require(_0x0263('0x1'))(_0x0263('0x2'));var moment=require(_0x0263('0x3'));var BPromise=require(_0x0263('0x4'));var rp=require('request-promise');var fs=require('fs');var path=require(_0x0263('0x5'));var rimraf=require(_0x0263('0x6'));var config=require(_0x0263('0x7'));var attributes=require(_0x0263('0x8'));module[_0x0263('0x9')]=function(_0x49bf12,_0x4310cc){return _0x49bf12['define'](_0x0263('0xa'),attributes,{'tableName':_0x0263('0xb'),'paranoid':![],'indexes':[{'name':_0x0263('0xc'),'fields':[_0x0263('0xd'),'FieldId'],'unique':!![]}],'timestamps':!![]});}; \ No newline at end of file diff --git a/server/api/intFreshdeskField/intFreshdeskField.rpc.js b/server/api/intFreshdeskField/intFreshdeskField.rpc.js index 3c68c59..873f438 100644 --- a/server/api/intFreshdeskField/intFreshdeskField.rpc.js +++ b/server/api/intFreshdeskField/intFreshdeskField.rpc.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x6be3=['http','request','then','info','debug','FreshdeskField,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','message','FreshdeskField,\x20%s,\x20%s','result','catch','lodash','moment','bluebird','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise'];(function(_0x3ea8ff,_0x478d2c){var _0x3ec65d=function(_0x19f65e){while(--_0x19f65e){_0x3ea8ff['push'](_0x3ea8ff['shift']());}};_0x3ec65d(++_0x478d2c);}(_0x6be3,0x138));var _0x36be=function(_0xdd83e4,_0x356cca){_0xdd83e4=_0xdd83e4-0x0;var _0x5c9bfc=_0x6be3[_0xdd83e4];return _0x5c9bfc;};'use strict';var _=require(_0x36be('0x0'));var util=require('util');var moment=require(_0x36be('0x1'));var BPromise=require(_0x36be('0x2'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x36be('0x3'));var db=require(_0x36be('0x4'))['db'];var utils=require(_0x36be('0x5'));var logger=require(_0x36be('0x6'))(_0x36be('0x7'));var config=require(_0x36be('0x8'));var jayson=require(_0x36be('0x9'));var client=jayson['client'][_0x36be('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x428685,_0x20acd6,_0x1d5034){return new BPromise(function(_0x5d0aed,_0x36ec53){return client[_0x36be('0xb')](_0x428685,_0x1d5034)[_0x36be('0xc')](function(_0x414864){logger[_0x36be('0xd')]('FreshdeskField,\x20%s,\x20%s',_0x20acd6,'request\x20sent');logger[_0x36be('0xe')](_0x36be('0xf'),_0x20acd6,_0x36be('0x10'),JSON[_0x36be('0x11')](_0x414864));if(_0x414864[_0x36be('0x12')]){if(_0x414864[_0x36be('0x12')]['code']===0x1f4){logger[_0x36be('0x12')]('FreshdeskField,\x20%s,\x20%s',_0x20acd6,_0x414864[_0x36be('0x12')][_0x36be('0x13')]);return _0x36ec53(_0x414864['error']['message']);}logger[_0x36be('0x12')](_0x36be('0x14'),_0x20acd6,_0x414864[_0x36be('0x12')][_0x36be('0x13')]);return _0x5d0aed(_0x414864[_0x36be('0x12')]['message']);}else{logger['info'](_0x36be('0x14'),_0x20acd6,'request\x20sent');_0x5d0aed(_0x414864[_0x36be('0x15')][_0x36be('0x13')]);}})[_0x36be('0x16')](function(_0x3b6c8b){logger[_0x36be('0x12')]('FreshdeskField,\x20%s,\x20%s',_0x20acd6,_0x3b6c8b);_0x36ec53(_0x3b6c8b);});});} \ No newline at end of file +var _0x35cb=['bluebird','ioredis','../../mysqldb','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','request','then','info','FreshdeskField,\x20%s,\x20%s','debug','FreshdeskField,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','message','lodash'];(function(_0x3f9093,_0x31c061){var _0x4873ac=function(_0x145568){while(--_0x145568){_0x3f9093['push'](_0x3f9093['shift']());}};_0x4873ac(++_0x31c061);}(_0x35cb,0x1b7));var _0xb35c=function(_0x5913d7,_0x3df32d){_0x5913d7=_0x5913d7-0x0;var _0xa64bd1=_0x35cb[_0x5913d7];return _0xa64bd1;};'use strict';var _=require(_0xb35c('0x0'));var util=require('util');var moment=require('moment');var BPromise=require(_0xb35c('0x1'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0xb35c('0x2'));var db=require(_0xb35c('0x3'))['db'];var utils=require('../../config/utils');var logger=require(_0xb35c('0x4'))(_0xb35c('0x5'));var config=require(_0xb35c('0x6'));var jayson=require(_0xb35c('0x7'));var client=jayson[_0xb35c('0x8')][_0xb35c('0x9')]({'port':0x232a});function respondWithRpcPromise(_0xea8dfa,_0x12fae7,_0x45e3b5){return new BPromise(function(_0x56702e,_0x3b472b){return client[_0xb35c('0xa')](_0xea8dfa,_0x45e3b5)[_0xb35c('0xb')](function(_0x2841c7){logger[_0xb35c('0xc')](_0xb35c('0xd'),_0x12fae7,'request\x20sent');logger[_0xb35c('0xe')](_0xb35c('0xf'),_0x12fae7,_0xb35c('0x10'),JSON[_0xb35c('0x11')](_0x2841c7));if(_0x2841c7['error']){if(_0x2841c7[_0xb35c('0x12')]['code']===0x1f4){logger[_0xb35c('0x12')](_0xb35c('0xd'),_0x12fae7,_0x2841c7[_0xb35c('0x12')][_0xb35c('0x13')]);return _0x3b472b(_0x2841c7[_0xb35c('0x12')]['message']);}logger['error'](_0xb35c('0xd'),_0x12fae7,_0x2841c7[_0xb35c('0x12')][_0xb35c('0x13')]);return _0x56702e(_0x2841c7[_0xb35c('0x12')]['message']);}else{logger['info'](_0xb35c('0xd'),_0x12fae7,_0xb35c('0x10'));_0x56702e(_0x2841c7['result'][_0xb35c('0x13')]);}})['catch'](function(_0x8ae891){logger[_0xb35c('0x12')](_0xb35c('0xd'),_0x12fae7,_0x8ae891);_0x3b472b(_0x8ae891);});});} \ No newline at end of file diff --git a/server/api/intFreshsalesAccount/index.js b/server/api/intFreshsalesAccount/index.js index 688564b..1b88377 100644 --- a/server/api/intFreshsalesAccount/index.js +++ b/server/api/intFreshsalesAccount/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x5c00=['isAuthenticated','index','show','getConfigurations','/:id/fields','getFields','create','/:id/configurations','addConfiguration','/:id','update','delete','destroy','exports','multer','util','path','express','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','get'];(function(_0x17440e,_0x242b2d){var _0xb27c78=function(_0x18d28b){while(--_0x18d28b){_0x17440e['push'](_0x17440e['shift']());}};_0xb27c78(++_0x242b2d);}(_0x5c00,0x17e));var _0x05c0=function(_0x5b8608,_0x527731){_0x5b8608=_0x5b8608-0x0;var _0x3f8d3d=_0x5c00[_0x5b8608];return _0x3f8d3d;};'use strict';var multer=require(_0x05c0('0x0'));var util=require(_0x05c0('0x1'));var path=require(_0x05c0('0x2'));var timeout=require('connect-timeout');var express=require(_0x05c0('0x3'));var router=express['Router']();var fs_extra=require(_0x05c0('0x4'));var auth=require(_0x05c0('0x5'));var interaction=require(_0x05c0('0x6'));var config=require(_0x05c0('0x7'));var controller=require('./intFreshsalesAccount.controller');router[_0x05c0('0x8')]('/',auth[_0x05c0('0x9')](),controller[_0x05c0('0xa')]);router[_0x05c0('0x8')]('/:id',auth[_0x05c0('0x9')](),controller[_0x05c0('0xb')]);router[_0x05c0('0x8')]('/:id/configurations',auth[_0x05c0('0x9')](),controller[_0x05c0('0xc')]);router[_0x05c0('0x8')](_0x05c0('0xd'),auth[_0x05c0('0x9')](),controller[_0x05c0('0xe')]);router['post']('/',auth['isAuthenticated'](),controller[_0x05c0('0xf')]);router['post'](_0x05c0('0x10'),auth[_0x05c0('0x9')](),controller[_0x05c0('0x11')]);router['put'](_0x05c0('0x12'),auth['isAuthenticated'](),controller[_0x05c0('0x13')]);router[_0x05c0('0x14')](_0x05c0('0x12'),auth[_0x05c0('0x9')](),controller[_0x05c0('0x15')]);module[_0x05c0('0x16')]=router; \ No newline at end of file +var _0xe205=['./intFreshsalesAccount.controller','get','isAuthenticated','index','/:id/configurations','/:id/fields','getFields','create','post','addConfiguration','/:id','update','destroy','multer','util','path','connect-timeout','express','Router','fs-extra','../../components/auth/service','../../components/interaction/service'];(function(_0xc8a931,_0x260690){var _0x28bd27=function(_0x591b9f){while(--_0x591b9f){_0xc8a931['push'](_0xc8a931['shift']());}};_0x28bd27(++_0x260690);}(_0xe205,0xa7));var _0x5e20=function(_0x371232,_0x398d0e){_0x371232=_0x371232-0x0;var _0x2bfa7=_0xe205[_0x371232];return _0x2bfa7;};'use strict';var multer=require(_0x5e20('0x0'));var util=require(_0x5e20('0x1'));var path=require(_0x5e20('0x2'));var timeout=require(_0x5e20('0x3'));var express=require(_0x5e20('0x4'));var router=express[_0x5e20('0x5')]();var fs_extra=require(_0x5e20('0x6'));var auth=require(_0x5e20('0x7'));var interaction=require(_0x5e20('0x8'));var config=require('../../config/environment');var controller=require(_0x5e20('0x9'));router[_0x5e20('0xa')]('/',auth[_0x5e20('0xb')](),controller[_0x5e20('0xc')]);router['get']('/:id',auth[_0x5e20('0xb')](),controller['show']);router['get'](_0x5e20('0xd'),auth[_0x5e20('0xb')](),controller['getConfigurations']);router[_0x5e20('0xa')](_0x5e20('0xe'),auth[_0x5e20('0xb')](),controller[_0x5e20('0xf')]);router['post']('/',auth[_0x5e20('0xb')](),controller[_0x5e20('0x10')]);router[_0x5e20('0x11')](_0x5e20('0xd'),auth[_0x5e20('0xb')](),controller[_0x5e20('0x12')]);router['put'](_0x5e20('0x13'),auth[_0x5e20('0xb')](),controller[_0x5e20('0x14')]);router['delete'](_0x5e20('0x13'),auth['isAuthenticated'](),controller[_0x5e20('0x15')]);module['exports']=router; \ No newline at end of file diff --git a/server/api/intFreshsalesAccount/intFreshsalesAccount.attributes.js b/server/api/intFreshsalesAccount/intFreshsalesAccount.attributes.js index 3b37e9a..72c4d7f 100644 --- a/server/api/intFreshsalesAccount/intFreshsalesAccount.attributes.js +++ b/server/api/intFreshsalesAccount/intFreshsalesAccount.attributes.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x6d38=['exports','STRING','remoteUri'];(function(_0x1fa381,_0x758c2a){var _0x47eefe=function(_0x127f8c){while(--_0x127f8c){_0x1fa381['push'](_0x1fa381['shift']());}};_0x47eefe(++_0x758c2a);}(_0x6d38,0x1ef));var _0x86d3=function(_0x3947c9,_0x4d6c97){_0x3947c9=_0x3947c9-0x0;var _0x2e7871=_0x6d38[_0x3947c9];return _0x2e7871;};'use strict';var Sequelize=require('sequelize');module[_0x86d3('0x0')]={'name':{'type':Sequelize[_0x86d3('0x1')]},'description':{'type':Sequelize[_0x86d3('0x1')]},'username':{'type':Sequelize['STRING'],'unique':'username'},'apiKey':{'type':Sequelize[_0x86d3('0x1')]},'remoteUri':{'type':Sequelize['STRING'],'unique':_0x86d3('0x2')},'serverUrl':{'type':Sequelize[_0x86d3('0x1')],'allowNull':![]}}; \ No newline at end of file +var _0xed3c=['STRING','username','sequelize','exports'];(function(_0x1d4c02,_0x527f59){var _0x10d034=function(_0xb3c381){while(--_0xb3c381){_0x1d4c02['push'](_0x1d4c02['shift']());}};_0x10d034(++_0x527f59);}(_0xed3c,0x1a6));var _0xced3=function(_0x1c9093,_0x31eb87){_0x1c9093=_0x1c9093-0x0;var _0x32dd36=_0xed3c[_0x1c9093];return _0x32dd36;};'use strict';var Sequelize=require(_0xced3('0x0'));module[_0xced3('0x1')]={'name':{'type':Sequelize[_0xced3('0x2')]},'description':{'type':Sequelize[_0xced3('0x2')]},'username':{'type':Sequelize['STRING'],'unique':_0xced3('0x3')},'apiKey':{'type':Sequelize[_0xced3('0x2')]},'remoteUri':{'type':Sequelize[_0xced3('0x2')],'unique':'remoteUri'},'serverUrl':{'type':Sequelize['STRING'],'allowNull':![]}}; \ No newline at end of file diff --git a/server/api/intFreshsalesAccount/intFreshsalesAccount.controller.js b/server/api/intFreshsalesAccount/intFreshsalesAccount.controller.js index d4749a4..06720c2 100644 --- a/server/api/intFreshsalesAccount/intFreshsalesAccount.controller.js +++ b/server/api/intFreshsalesAccount/intFreshsalesAccount.controller.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x1c8b=['limit','count','status','set','Content-Range','apply','reject','then','destroy','error','name','send','index','map','rawAttributes','fieldName','key','model','query','filters','intersection','fields','attributes','length','hasOwnProperty','nolimit','order','where','merge','filter','options','FreshsalesAccount','includeAll','findAll','rows','catch','show','params','keys','include','find','create','body','getConfigurations','findOne','FreshsalesConfiguration','sort','pick','Subjects','getSubjects','channel','Descriptions','getDescriptions','type','username','remoteUri','substring','lastIndexOf','GET','%s%s','users','Requested\x20Resource\x20not\x20Found','statusCode','getFields,\x20%s,\x20%s,\x20%s','getFields','stringify','test','Wrong\x20credentials','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','bluebird','mustache','util','path','sox','to-csv','ejs','lodash','squel','crypto','jsforce','desk.js','querystring','ioredis','../../components/auth/service','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','sendStatus','end','json','offset','undefined'];(function(_0x3cdf59,_0x1cdeef){var _0x17a5af=function(_0x525884){while(--_0x525884){_0x3cdf59['push'](_0x3cdf59['shift']());}};_0x17a5af(++_0x1cdeef);}(_0x1c8b,0x1d8));var _0xb1c8=function(_0x57c98b,_0x4d4ea4){_0x57c98b=_0x57c98b-0x0;var _0xd7f811=_0x1c8b[_0x57c98b];return _0xd7f811;};'use strict';var emlformat=require(_0xb1c8('0x0'));var rimraf=require(_0xb1c8('0x1'));var zipdir=require(_0xb1c8('0x2'));var jsonpatch=require(_0xb1c8('0x3'));var rp=require(_0xb1c8('0x4'));var moment=require('moment');var BPromise=require(_0xb1c8('0x5'));var Mustache=require(_0xb1c8('0x6'));var util=require(_0xb1c8('0x7'));var path=require(_0xb1c8('0x8'));var sox=require(_0xb1c8('0x9'));var csv=require(_0xb1c8('0xa'));var ejs=require(_0xb1c8('0xb'));var fs=require('fs');var fs_extra=require('fs-extra');var _=require(_0xb1c8('0xc'));var squel=require(_0xb1c8('0xd'));var crypto=require(_0xb1c8('0xe'));var jsforce=require(_0xb1c8('0xf'));var deskjs=require(_0xb1c8('0x10'));var toCsv=require(_0xb1c8('0xa'));var querystring=require(_0xb1c8('0x11'));var Papa=require('papaparse');var Redis=require(_0xb1c8('0x12'));var authService=require(_0xb1c8('0x13'));var qs=require('../../components/parsers/qs');var as=require(_0xb1c8('0x14'));var hardwareService=require(_0xb1c8('0x15'));var logger=require(_0xb1c8('0x16'))(_0xb1c8('0x17'));var utils=require(_0xb1c8('0x18'));var config=require(_0xb1c8('0x19'));var licenseUtil=require(_0xb1c8('0x1a'));var db=require(_0xb1c8('0x1b'))['db'];var integrations=require('../../components/integrations/configuration');function respondWithStatusCode(_0x74cb52,_0x1b8eba){_0x1b8eba=_0x1b8eba||0xcc;return function(_0x33bb71){if(_0x33bb71){return _0x74cb52[_0xb1c8('0x1c')](_0x1b8eba);}return _0x74cb52['status'](_0x1b8eba)[_0xb1c8('0x1d')]();};}function respondWithResult(_0x131765,_0x3a5156){_0x3a5156=_0x3a5156||0xc8;return function(_0x4b863d){if(_0x4b863d){return _0x131765['status'](_0x3a5156)[_0xb1c8('0x1e')](_0x4b863d);}};}function respondWithFilteredResult(_0x54a09c,_0x1d6512){return function(_0x61d5ed){if(_0x61d5ed){var _0x58678e=typeof _0x1d6512[_0xb1c8('0x1f')]===_0xb1c8('0x20')&&typeof _0x1d6512[_0xb1c8('0x21')]==='undefined';var _0x538ec0=_0x61d5ed[_0xb1c8('0x22')];var _0x3ae626=_0x58678e?0x0:_0x1d6512[_0xb1c8('0x1f')];var _0x2d4362=_0x58678e?_0x61d5ed[_0xb1c8('0x22')]:_0x1d6512['offset']+_0x1d6512[_0xb1c8('0x21')];var _0x1a6d6b;if(_0x2d4362>=_0x538ec0){_0x2d4362=_0x538ec0;_0x1a6d6b=0xc8;}else{_0x1a6d6b=0xce;}_0x54a09c[_0xb1c8('0x23')](_0x1a6d6b);return _0x54a09c[_0xb1c8('0x24')](_0xb1c8('0x25'),_0x3ae626+'-'+_0x2d4362+'/'+_0x538ec0)[_0xb1c8('0x1e')](_0x61d5ed);}return null;};}function patchUpdates(_0x2ea192){return function(_0x1dd672){try{jsonpatch[_0xb1c8('0x26')](_0x1dd672,_0x2ea192,!![]);}catch(_0x880901){return BPromise[_0xb1c8('0x27')](_0x880901);}return _0x1dd672['save']();};}function saveUpdates(_0x5a98ba,_0x53bcae){return function(_0x4e42fb){if(_0x4e42fb){return _0x4e42fb['update'](_0x5a98ba)[_0xb1c8('0x28')](function(_0x51b9e6){return _0x51b9e6;});}return null;};}function removeEntity(_0x52efc4,_0x86b899){return function(_0x5c0845){if(_0x5c0845){return _0x5c0845[_0xb1c8('0x29')]()['then'](function(){_0x52efc4[_0xb1c8('0x23')](0xcc)[_0xb1c8('0x1d')]();});}};}function handleEntityNotFound(_0x15ac98,_0xd272e0){return function(_0x2119dd){if(!_0x2119dd){_0x15ac98['sendStatus'](0x194);}return _0x2119dd;};}function handleError(_0x1e70e6,_0x43d871){_0x43d871=_0x43d871||0x1f4;return function(_0x2b8038){logger[_0xb1c8('0x2a')](_0x2b8038['stack']);if(_0x2b8038['name']){delete _0x2b8038[_0xb1c8('0x2b')];}_0x1e70e6['status'](_0x43d871)[_0xb1c8('0x2c')](_0x2b8038);};}exports[_0xb1c8('0x2d')]=function(_0x2283a4,_0x4d0e61){var _0x8b9984={},_0x129323={},_0x194430={'count':0x0,'rows':[]};var _0x16fc7a=_[_0xb1c8('0x2e')](db['FreshsalesAccount'][_0xb1c8('0x2f')],function(_0x302e6f){return{'name':_0x302e6f[_0xb1c8('0x30')],'type':_0x302e6f['type'][_0xb1c8('0x31')]};});_0x129323[_0xb1c8('0x32')]=_[_0xb1c8('0x2e')](_0x16fc7a,'name');_0x129323[_0xb1c8('0x33')]=_['keys'](_0x2283a4[_0xb1c8('0x33')]);_0x129323[_0xb1c8('0x34')]=_[_0xb1c8('0x35')](_0x129323[_0xb1c8('0x32')],_0x129323[_0xb1c8('0x33')]);_0x8b9984['attributes']=_[_0xb1c8('0x35')](_0x129323[_0xb1c8('0x32')],qs[_0xb1c8('0x36')](_0x2283a4['query'][_0xb1c8('0x36')]));_0x8b9984[_0xb1c8('0x37')]=_0x8b9984['attributes'][_0xb1c8('0x38')]?_0x8b9984['attributes']:_0x129323[_0xb1c8('0x32')];if(!_0x2283a4['query'][_0xb1c8('0x39')](_0xb1c8('0x3a'))){_0x8b9984[_0xb1c8('0x21')]=qs['limit'](_0x2283a4[_0xb1c8('0x33')]['limit']);_0x8b9984['offset']=qs[_0xb1c8('0x1f')](_0x2283a4[_0xb1c8('0x33')][_0xb1c8('0x1f')]);}_0x8b9984[_0xb1c8('0x3b')]=qs['sort'](_0x2283a4['query']['sort']);_0x8b9984['where']=qs['filters'](_['pick'](_0x2283a4[_0xb1c8('0x33')],_0x129323[_0xb1c8('0x34')]),_0x16fc7a);if(_0x2283a4['query']['filter']){_0x8b9984[_0xb1c8('0x3c')]=_[_0xb1c8('0x3d')](_0x8b9984[_0xb1c8('0x3c')],{'$or':_['map'](_0x16fc7a,function(_0x2bb39b){if(_0x2bb39b['type']!=='VIRTUAL'){var _0x26d1d1={};_0x26d1d1[_0x2bb39b['name']]={'$like':'%'+_0x2283a4[_0xb1c8('0x33')][_0xb1c8('0x3e')]+'%'};return _0x26d1d1;}})});}_0x8b9984=_[_0xb1c8('0x3d')]({},_0x8b9984,_0x2283a4[_0xb1c8('0x3f')]);var _0x3330d1={'where':_0x8b9984[_0xb1c8('0x3c')]};return db[_0xb1c8('0x40')][_0xb1c8('0x22')](_0x3330d1)[_0xb1c8('0x28')](function(_0x1df75f){_0x194430[_0xb1c8('0x22')]=_0x1df75f;if(_0x2283a4[_0xb1c8('0x33')][_0xb1c8('0x41')]){_0x8b9984['include']=[{'all':!![]}];}return db['FreshsalesAccount'][_0xb1c8('0x42')](_0x8b9984);})['then'](function(_0x2a7a02){_0x194430[_0xb1c8('0x43')]=_0x2a7a02;return _0x194430;})[_0xb1c8('0x28')](respondWithFilteredResult(_0x4d0e61,_0x8b9984))[_0xb1c8('0x44')](handleError(_0x4d0e61,null));};exports[_0xb1c8('0x45')]=function(_0x4cb1ff,_0x1dadff){var _0x3717e3={'raw':![],'where':{'id':_0x4cb1ff[_0xb1c8('0x46')]['id']}},_0x3b0b15={};_0x3b0b15[_0xb1c8('0x32')]=_[_0xb1c8('0x47')](db['FreshsalesAccount']['rawAttributes']);_0x3b0b15['query']=_[_0xb1c8('0x47')](_0x4cb1ff[_0xb1c8('0x33')]);_0x3b0b15[_0xb1c8('0x34')]=_[_0xb1c8('0x35')](_0x3b0b15[_0xb1c8('0x32')],_0x3b0b15[_0xb1c8('0x33')]);_0x3717e3[_0xb1c8('0x37')]=_[_0xb1c8('0x35')](_0x3b0b15['model'],qs['fields'](_0x4cb1ff[_0xb1c8('0x33')][_0xb1c8('0x36')]));_0x3717e3[_0xb1c8('0x37')]=_0x3717e3[_0xb1c8('0x37')][_0xb1c8('0x38')]?_0x3717e3[_0xb1c8('0x37')]:_0x3b0b15[_0xb1c8('0x32')];if(_0x4cb1ff[_0xb1c8('0x33')][_0xb1c8('0x41')]){_0x3717e3[_0xb1c8('0x48')]=[{'all':!![]}];}_0x3717e3=_['merge']({},_0x3717e3,_0x4cb1ff['options']);return db[_0xb1c8('0x40')][_0xb1c8('0x49')](_0x3717e3)[_0xb1c8('0x28')](handleEntityNotFound(_0x1dadff,null))[_0xb1c8('0x28')](respondWithResult(_0x1dadff,null))[_0xb1c8('0x44')](handleError(_0x1dadff,null));};exports['create']=function(_0x2b2413,_0x3b594a){return db[_0xb1c8('0x40')][_0xb1c8('0x4a')](_0x2b2413[_0xb1c8('0x4b')],{})[_0xb1c8('0x28')](respondWithResult(_0x3b594a,0xc9))[_0xb1c8('0x44')](handleError(_0x3b594a,null));};exports['update']=function(_0xc6fc87,_0x28968b){if(_0xc6fc87[_0xb1c8('0x4b')]['id']){delete _0xc6fc87[_0xb1c8('0x4b')]['id'];}return db['FreshsalesAccount'][_0xb1c8('0x49')]({'where':{'id':_0xc6fc87[_0xb1c8('0x46')]['id']}})[_0xb1c8('0x28')](handleEntityNotFound(_0x28968b,null))['then'](saveUpdates(_0xc6fc87[_0xb1c8('0x4b')],null))[_0xb1c8('0x28')](respondWithResult(_0x28968b,null))[_0xb1c8('0x44')](handleError(_0x28968b,null));};exports[_0xb1c8('0x29')]=function(_0x9fe329,_0x126310){return db[_0xb1c8('0x40')]['find']({'where':{'id':_0x9fe329[_0xb1c8('0x46')]['id']}})[_0xb1c8('0x28')](handleEntityNotFound(_0x126310,null))['then'](removeEntity(_0x126310,null))[_0xb1c8('0x44')](handleError(_0x126310,null));};exports[_0xb1c8('0x4c')]=function(_0x28f80a,_0x1a840d,_0x4e0bd3){var _0xe620c4={};var _0x2c6526={};var _0x3879ab;var _0x4215fc;return db[_0xb1c8('0x40')][_0xb1c8('0x4d')]({'where':{'id':_0x28f80a['params']['id']}})[_0xb1c8('0x28')](handleEntityNotFound(_0x1a840d,null))[_0xb1c8('0x28')](function(_0x51504b){if(_0x51504b){_0x3879ab=_0x51504b;_0x2c6526[_0xb1c8('0x32')]=_[_0xb1c8('0x47')](db[_0xb1c8('0x4e')]['rawAttributes']);_0x2c6526[_0xb1c8('0x33')]=_[_0xb1c8('0x47')](_0x28f80a[_0xb1c8('0x33')]);_0x2c6526[_0xb1c8('0x34')]=_['intersection'](_0x2c6526[_0xb1c8('0x32')],_0x2c6526['query']);_0xe620c4['attributes']=_[_0xb1c8('0x35')](_0x2c6526[_0xb1c8('0x32')],qs['fields'](_0x28f80a['query'][_0xb1c8('0x36')]));_0xe620c4[_0xb1c8('0x37')]=_0xe620c4[_0xb1c8('0x37')][_0xb1c8('0x38')]?_0xe620c4[_0xb1c8('0x37')]:_0x2c6526['model'];_0xe620c4[_0xb1c8('0x3b')]=qs[_0xb1c8('0x4f')](_0x28f80a[_0xb1c8('0x33')][_0xb1c8('0x4f')]);_0xe620c4[_0xb1c8('0x3c')]=qs['filters'](_[_0xb1c8('0x50')](_0x28f80a[_0xb1c8('0x33')],_0x2c6526[_0xb1c8('0x34')]));if(_0x28f80a[_0xb1c8('0x33')][_0xb1c8('0x3e')]){_0xe620c4[_0xb1c8('0x3c')]=_[_0xb1c8('0x3d')](_0xe620c4[_0xb1c8('0x3c')],{'$or':_[_0xb1c8('0x2e')](_0xe620c4['attributes'],function(_0x364512){var _0x3ec507={};_0x3ec507[_0x364512]={'$like':'%'+_0x28f80a[_0xb1c8('0x33')][_0xb1c8('0x3e')]+'%'};return _0x3ec507;})});}_0xe620c4=_['merge']({},_0xe620c4,_0x28f80a[_0xb1c8('0x3f')]);return _0x3879ab[_0xb1c8('0x4c')](_0xe620c4);}})[_0xb1c8('0x28')](function(_0x4646fa){if(_0x4646fa){_0x4215fc=_0x4646fa['length'];if(!_0x28f80a[_0xb1c8('0x33')][_0xb1c8('0x39')](_0xb1c8('0x3a'))){_0xe620c4[_0xb1c8('0x21')]=qs[_0xb1c8('0x21')](_0x28f80a['query']['limit']);_0xe620c4[_0xb1c8('0x1f')]=qs[_0xb1c8('0x1f')](_0x28f80a[_0xb1c8('0x33')]['offset']);}return _0x3879ab[_0xb1c8('0x4c')](_0xe620c4);}})[_0xb1c8('0x28')](function(_0x2e2a5b){if(_0x2e2a5b){return _0x2e2a5b?{'count':_0x4215fc,'rows':_0x2e2a5b}:null;}})[_0xb1c8('0x28')](respondWithResult(_0x1a840d,null))[_0xb1c8('0x44')](handleError(_0x1a840d,null));};exports['addConfiguration']=function(_0x3c5d4c,_0x5772c4,_0x1cfd77){if(_0x3c5d4c[_0xb1c8('0x4b')]['id']){delete _0x3c5d4c[_0xb1c8('0x4b')]['id'];}return db[_0xb1c8('0x40')][_0xb1c8('0x4d')]({'where':{'id':_0x3c5d4c[_0xb1c8('0x46')]['id']}})[_0xb1c8('0x28')](handleEntityNotFound(_0x5772c4,null))[_0xb1c8('0x28')](function(_0x4decaa){if(_0x4decaa){_0x3c5d4c[_0xb1c8('0x4b')]['AccountId']=_0x4decaa['id'];_0x3c5d4c[_0xb1c8('0x4b')][_0xb1c8('0x51')]=integrations[_0xb1c8('0x52')](_0x3c5d4c[_0xb1c8('0x4b')][_0xb1c8('0x53')],_0x3c5d4c[_0xb1c8('0x4b')]['type']);_0x3c5d4c[_0xb1c8('0x4b')][_0xb1c8('0x54')]=integrations[_0xb1c8('0x55')](_0x3c5d4c[_0xb1c8('0x4b')][_0xb1c8('0x53')],_0x3c5d4c[_0xb1c8('0x4b')][_0xb1c8('0x56')]);return db[_0xb1c8('0x4e')][_0xb1c8('0x4a')](_0x3c5d4c[_0xb1c8('0x4b')],{'include':[{'model':db['FreshsalesField'],'as':_0xb1c8('0x51')},{'model':db['FreshsalesField'],'as':_0xb1c8('0x54')}]});}return null;})[_0xb1c8('0x28')](respondWithResult(_0x5772c4,null))['catch'](handleError(_0x5772c4,null));};exports['getFields']=function(_0x1e23e5,_0x458ebc,_0x25ffa6){var _0x5e56e6='';var _0x1e8dca='';return db[_0xb1c8('0x40')][_0xb1c8('0x4d')]({'where':{'id':_0x1e23e5[_0xb1c8('0x46')]['id']},'attributes':['id',_0xb1c8('0x57'),_0xb1c8('0x58'),'apiKey']})[_0xb1c8('0x28')](handleEntityNotFound(_0x458ebc,null))['then'](function(_0x51116e){if(_0x51116e){_0x1e8dca=_0x51116e[_0xb1c8('0x57')];_0x5e56e6=_0x51116e[_0xb1c8('0x58')];var _0x5ed762=_0x51116e['remoteUri']['slice'](-0x1);if(_0x5ed762==='/'){_0x5e56e6=_0x5e56e6[_0xb1c8('0x59')](0x0,_0x5e56e6[_0xb1c8('0x5a')](_0x5ed762));}return rp({'method':_0xb1c8('0x5b'),'uri':util['format'](_0xb1c8('0x5c'),_0x5e56e6,'/api/selector/owners'),'headers':{'Authorization':'Token\x20token='+_0x51116e['apiKey']},'json':!![]});}})[_0xb1c8('0x28')](function(_0x43ea2c){if(_0x43ea2c){var _0x42579a=_0x43ea2c[_0xb1c8('0x5d')];var _0x52fe65=![];var _0x178f0b=null;for(_0x178f0b=0x0;_0x178f0b<_0x42579a[_0xb1c8('0x38')];_0x178f0b++){if(_0x42579a[_0x178f0b]['email']===_0x1e8dca){_0x52fe65=!![];}}if(_0x52fe65){return!![];}else{throw new Error({'statusCode':0x194,'message':_0xb1c8('0x5e')});}}})[_0xb1c8('0x28')](respondWithResult(_0x458ebc,null))[_0xb1c8('0x44')](function(_0x54c9a2){var _0x3ad7df=_0x1e23e5[_0xb1c8('0x33')]['test']?0x1f4:_0x54c9a2[_0xb1c8('0x5f')]||0x1f4;logger[_0xb1c8('0x2a')](_0xb1c8('0x60'),_0xb1c8('0x61'),_0x3ad7df,JSON[_0xb1c8('0x62')](_0x54c9a2));delete _0x54c9a2['name'];if(_0x3ad7df===0x191){_0x3ad7df=0x190;}_0x458ebc['status'](_0x3ad7df)[_0xb1c8('0x2c')](_0x1e23e5['query'][_0xb1c8('0x63')]?{'message':_0xb1c8('0x64'),'statusCode':_0x54c9a2['statusCode']}:_0x54c9a2);});}; \ No newline at end of file +var _0xd5cb=['email','Requested\x20Resource\x20not\x20Found','statusCode','getFields,\x20%s,\x20%s,\x20%s','send','test','Wrong\x20credentials','eml-format','rimraf','fast-json-patch','request-promise','moment','bluebird','mustache','util','path','sox','to-csv','ejs','fs-extra','lodash','squel','crypto','jsforce','desk.js','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','../../components/integrations/configuration','sendStatus','offset','undefined','limit','count','status','set','Content-Range','json','apply','reject','save','update','then','end','error','stack','name','index','map','FreshsalesAccount','rawAttributes','fieldName','type','key','model','query','keys','intersection','attributes','fields','hasOwnProperty','nolimit','sort','where','filters','pick','merge','VIRTUAL','options','include','findAll','rows','show','length','includeAll','find','catch','create','body','params','destroy','getConfigurations','findOne','FreshsalesConfiguration','filter','addConfiguration','AccountId','Subjects','getSubjects','channel','Descriptions','getFields','apiKey','username','remoteUri','substring','lastIndexOf','format','%s%s','/api/selector/owners','Token\x20token=','users'];(function(_0x36f8bc,_0x46fd0e){var _0x57aad1=function(_0x1ad085){while(--_0x1ad085){_0x36f8bc['push'](_0x36f8bc['shift']());}};_0x57aad1(++_0x46fd0e);}(_0xd5cb,0xe7));var _0xbd5c=function(_0x2bf961,_0x201073){_0x2bf961=_0x2bf961-0x0;var _0xc77320=_0xd5cb[_0x2bf961];return _0xc77320;};'use strict';var emlformat=require(_0xbd5c('0x0'));var rimraf=require(_0xbd5c('0x1'));var zipdir=require('zip-dir');var jsonpatch=require(_0xbd5c('0x2'));var rp=require(_0xbd5c('0x3'));var moment=require(_0xbd5c('0x4'));var BPromise=require(_0xbd5c('0x5'));var Mustache=require(_0xbd5c('0x6'));var util=require(_0xbd5c('0x7'));var path=require(_0xbd5c('0x8'));var sox=require(_0xbd5c('0x9'));var csv=require(_0xbd5c('0xa'));var ejs=require(_0xbd5c('0xb'));var fs=require('fs');var fs_extra=require(_0xbd5c('0xc'));var _=require(_0xbd5c('0xd'));var squel=require(_0xbd5c('0xe'));var crypto=require(_0xbd5c('0xf'));var jsforce=require(_0xbd5c('0x10'));var deskjs=require(_0xbd5c('0x11'));var toCsv=require(_0xbd5c('0xa'));var querystring=require(_0xbd5c('0x12'));var Papa=require(_0xbd5c('0x13'));var Redis=require(_0xbd5c('0x14'));var authService=require(_0xbd5c('0x15'));var qs=require(_0xbd5c('0x16'));var as=require(_0xbd5c('0x17'));var hardwareService=require(_0xbd5c('0x18'));var logger=require(_0xbd5c('0x19'))(_0xbd5c('0x1a'));var utils=require(_0xbd5c('0x1b'));var config=require(_0xbd5c('0x1c'));var licenseUtil=require(_0xbd5c('0x1d'));var db=require(_0xbd5c('0x1e'))['db'];var integrations=require(_0xbd5c('0x1f'));function respondWithStatusCode(_0x49501a,_0x4d87b8){_0x4d87b8=_0x4d87b8||0xcc;return function(_0x1bf227){if(_0x1bf227){return _0x49501a[_0xbd5c('0x20')](_0x4d87b8);}return _0x49501a['status'](_0x4d87b8)['end']();};}function respondWithResult(_0x3d4d5b,_0x55ac7b){_0x55ac7b=_0x55ac7b||0xc8;return function(_0x4e770d){if(_0x4e770d){return _0x3d4d5b['status'](_0x55ac7b)['json'](_0x4e770d);}};}function respondWithFilteredResult(_0x31e9b3,_0x44dbde){return function(_0x45b59d){if(_0x45b59d){var _0x1d4789=typeof _0x44dbde[_0xbd5c('0x21')]===_0xbd5c('0x22')&&typeof _0x44dbde[_0xbd5c('0x23')]===_0xbd5c('0x22');var _0x2a1ea5=_0x45b59d[_0xbd5c('0x24')];var _0x501e55=_0x1d4789?0x0:_0x44dbde[_0xbd5c('0x21')];var _0xee4256=_0x1d4789?_0x45b59d[_0xbd5c('0x24')]:_0x44dbde[_0xbd5c('0x21')]+_0x44dbde[_0xbd5c('0x23')];var _0x3733cd;if(_0xee4256>=_0x2a1ea5){_0xee4256=_0x2a1ea5;_0x3733cd=0xc8;}else{_0x3733cd=0xce;}_0x31e9b3[_0xbd5c('0x25')](_0x3733cd);return _0x31e9b3[_0xbd5c('0x26')](_0xbd5c('0x27'),_0x501e55+'-'+_0xee4256+'/'+_0x2a1ea5)[_0xbd5c('0x28')](_0x45b59d);}return null;};}function patchUpdates(_0x5a7965){return function(_0x3f378f){try{jsonpatch[_0xbd5c('0x29')](_0x3f378f,_0x5a7965,!![]);}catch(_0x48aa69){return BPromise[_0xbd5c('0x2a')](_0x48aa69);}return _0x3f378f[_0xbd5c('0x2b')]();};}function saveUpdates(_0x11a255,_0x5e7f8b){return function(_0x2bf445){if(_0x2bf445){return _0x2bf445[_0xbd5c('0x2c')](_0x11a255)[_0xbd5c('0x2d')](function(_0x47f1b5){return _0x47f1b5;});}return null;};}function removeEntity(_0x2cba1e,_0x538884){return function(_0x1d09f9){if(_0x1d09f9){return _0x1d09f9['destroy']()[_0xbd5c('0x2d')](function(){_0x2cba1e[_0xbd5c('0x25')](0xcc)[_0xbd5c('0x2e')]();});}};}function handleEntityNotFound(_0x1ed0d4,_0x455456){return function(_0x9c46d5){if(!_0x9c46d5){_0x1ed0d4['sendStatus'](0x194);}return _0x9c46d5;};}function handleError(_0x4a9a4c,_0x373250){_0x373250=_0x373250||0x1f4;return function(_0x3181ed){logger[_0xbd5c('0x2f')](_0x3181ed[_0xbd5c('0x30')]);if(_0x3181ed[_0xbd5c('0x31')]){delete _0x3181ed['name'];}_0x4a9a4c[_0xbd5c('0x25')](_0x373250)['send'](_0x3181ed);};}exports[_0xbd5c('0x32')]=function(_0x19bc79,_0xfbc643){var _0x4672ee={},_0x230f59={},_0x52afce={'count':0x0,'rows':[]};var _0x518e1=_[_0xbd5c('0x33')](db[_0xbd5c('0x34')][_0xbd5c('0x35')],function(_0x307344){return{'name':_0x307344[_0xbd5c('0x36')],'type':_0x307344[_0xbd5c('0x37')][_0xbd5c('0x38')]};});_0x230f59[_0xbd5c('0x39')]=_['map'](_0x518e1,_0xbd5c('0x31'));_0x230f59[_0xbd5c('0x3a')]=_[_0xbd5c('0x3b')](_0x19bc79['query']);_0x230f59['filters']=_[_0xbd5c('0x3c')](_0x230f59['model'],_0x230f59[_0xbd5c('0x3a')]);_0x4672ee[_0xbd5c('0x3d')]=_[_0xbd5c('0x3c')](_0x230f59[_0xbd5c('0x39')],qs['fields'](_0x19bc79[_0xbd5c('0x3a')][_0xbd5c('0x3e')]));_0x4672ee['attributes']=_0x4672ee[_0xbd5c('0x3d')]['length']?_0x4672ee[_0xbd5c('0x3d')]:_0x230f59[_0xbd5c('0x39')];if(!_0x19bc79['query'][_0xbd5c('0x3f')](_0xbd5c('0x40'))){_0x4672ee['limit']=qs['limit'](_0x19bc79['query'][_0xbd5c('0x23')]);_0x4672ee[_0xbd5c('0x21')]=qs[_0xbd5c('0x21')](_0x19bc79['query'][_0xbd5c('0x21')]);}_0x4672ee['order']=qs[_0xbd5c('0x41')](_0x19bc79[_0xbd5c('0x3a')][_0xbd5c('0x41')]);_0x4672ee[_0xbd5c('0x42')]=qs[_0xbd5c('0x43')](_[_0xbd5c('0x44')](_0x19bc79['query'],_0x230f59[_0xbd5c('0x43')]),_0x518e1);if(_0x19bc79['query']['filter']){_0x4672ee[_0xbd5c('0x42')]=_[_0xbd5c('0x45')](_0x4672ee[_0xbd5c('0x42')],{'$or':_[_0xbd5c('0x33')](_0x518e1,function(_0x55116c){if(_0x55116c['type']!==_0xbd5c('0x46')){var _0x336b43={};_0x336b43[_0x55116c[_0xbd5c('0x31')]]={'$like':'%'+_0x19bc79['query']['filter']+'%'};return _0x336b43;}})});}_0x4672ee=_[_0xbd5c('0x45')]({},_0x4672ee,_0x19bc79[_0xbd5c('0x47')]);var _0x2c1210={'where':_0x4672ee[_0xbd5c('0x42')]};return db['FreshsalesAccount'][_0xbd5c('0x24')](_0x2c1210)[_0xbd5c('0x2d')](function(_0x26f1c1){_0x52afce[_0xbd5c('0x24')]=_0x26f1c1;if(_0x19bc79['query']['includeAll']){_0x4672ee[_0xbd5c('0x48')]=[{'all':!![]}];}return db[_0xbd5c('0x34')][_0xbd5c('0x49')](_0x4672ee);})[_0xbd5c('0x2d')](function(_0x450ca4){_0x52afce[_0xbd5c('0x4a')]=_0x450ca4;return _0x52afce;})[_0xbd5c('0x2d')](respondWithFilteredResult(_0xfbc643,_0x4672ee))['catch'](handleError(_0xfbc643,null));};exports[_0xbd5c('0x4b')]=function(_0x43bbeb,_0x1528a7){var _0x591bd3={'raw':![],'where':{'id':_0x43bbeb['params']['id']}},_0x50e29e={};_0x50e29e['model']=_[_0xbd5c('0x3b')](db[_0xbd5c('0x34')][_0xbd5c('0x35')]);_0x50e29e[_0xbd5c('0x3a')]=_[_0xbd5c('0x3b')](_0x43bbeb[_0xbd5c('0x3a')]);_0x50e29e[_0xbd5c('0x43')]=_[_0xbd5c('0x3c')](_0x50e29e['model'],_0x50e29e[_0xbd5c('0x3a')]);_0x591bd3[_0xbd5c('0x3d')]=_[_0xbd5c('0x3c')](_0x50e29e['model'],qs[_0xbd5c('0x3e')](_0x43bbeb[_0xbd5c('0x3a')][_0xbd5c('0x3e')]));_0x591bd3[_0xbd5c('0x3d')]=_0x591bd3[_0xbd5c('0x3d')][_0xbd5c('0x4c')]?_0x591bd3[_0xbd5c('0x3d')]:_0x50e29e[_0xbd5c('0x39')];if(_0x43bbeb[_0xbd5c('0x3a')][_0xbd5c('0x4d')]){_0x591bd3['include']=[{'all':!![]}];}_0x591bd3=_[_0xbd5c('0x45')]({},_0x591bd3,_0x43bbeb[_0xbd5c('0x47')]);return db[_0xbd5c('0x34')][_0xbd5c('0x4e')](_0x591bd3)['then'](handleEntityNotFound(_0x1528a7,null))['then'](respondWithResult(_0x1528a7,null))[_0xbd5c('0x4f')](handleError(_0x1528a7,null));};exports[_0xbd5c('0x50')]=function(_0x1e893c,_0x4e4911){return db['FreshsalesAccount'][_0xbd5c('0x50')](_0x1e893c[_0xbd5c('0x51')],{})[_0xbd5c('0x2d')](respondWithResult(_0x4e4911,0xc9))[_0xbd5c('0x4f')](handleError(_0x4e4911,null));};exports[_0xbd5c('0x2c')]=function(_0x2f378c,_0x4b245f){if(_0x2f378c[_0xbd5c('0x51')]['id']){delete _0x2f378c[_0xbd5c('0x51')]['id'];}return db['FreshsalesAccount']['find']({'where':{'id':_0x2f378c[_0xbd5c('0x52')]['id']}})[_0xbd5c('0x2d')](handleEntityNotFound(_0x4b245f,null))[_0xbd5c('0x2d')](saveUpdates(_0x2f378c[_0xbd5c('0x51')],null))[_0xbd5c('0x2d')](respondWithResult(_0x4b245f,null))['catch'](handleError(_0x4b245f,null));};exports[_0xbd5c('0x53')]=function(_0x5158cf,_0x306aae){return db[_0xbd5c('0x34')][_0xbd5c('0x4e')]({'where':{'id':_0x5158cf[_0xbd5c('0x52')]['id']}})['then'](handleEntityNotFound(_0x306aae,null))[_0xbd5c('0x2d')](removeEntity(_0x306aae,null))[_0xbd5c('0x4f')](handleError(_0x306aae,null));};exports[_0xbd5c('0x54')]=function(_0x590333,_0x4768d5,_0x3f391a){var _0x23058c={};var _0x4a8d3a={};var _0x1137b4;var _0x31986c;return db[_0xbd5c('0x34')][_0xbd5c('0x55')]({'where':{'id':_0x590333[_0xbd5c('0x52')]['id']}})[_0xbd5c('0x2d')](handleEntityNotFound(_0x4768d5,null))[_0xbd5c('0x2d')](function(_0x5b30c2){if(_0x5b30c2){_0x1137b4=_0x5b30c2;_0x4a8d3a[_0xbd5c('0x39')]=_[_0xbd5c('0x3b')](db[_0xbd5c('0x56')][_0xbd5c('0x35')]);_0x4a8d3a[_0xbd5c('0x3a')]=_[_0xbd5c('0x3b')](_0x590333[_0xbd5c('0x3a')]);_0x4a8d3a[_0xbd5c('0x43')]=_[_0xbd5c('0x3c')](_0x4a8d3a[_0xbd5c('0x39')],_0x4a8d3a[_0xbd5c('0x3a')]);_0x23058c[_0xbd5c('0x3d')]=_['intersection'](_0x4a8d3a[_0xbd5c('0x39')],qs[_0xbd5c('0x3e')](_0x590333['query'][_0xbd5c('0x3e')]));_0x23058c[_0xbd5c('0x3d')]=_0x23058c['attributes']['length']?_0x23058c[_0xbd5c('0x3d')]:_0x4a8d3a[_0xbd5c('0x39')];_0x23058c['order']=qs[_0xbd5c('0x41')](_0x590333[_0xbd5c('0x3a')][_0xbd5c('0x41')]);_0x23058c['where']=qs['filters'](_[_0xbd5c('0x44')](_0x590333[_0xbd5c('0x3a')],_0x4a8d3a[_0xbd5c('0x43')]));if(_0x590333[_0xbd5c('0x3a')][_0xbd5c('0x57')]){_0x23058c['where']=_['merge'](_0x23058c[_0xbd5c('0x42')],{'$or':_['map'](_0x23058c[_0xbd5c('0x3d')],function(_0x2f4341){var _0x4d33ba={};_0x4d33ba[_0x2f4341]={'$like':'%'+_0x590333[_0xbd5c('0x3a')][_0xbd5c('0x57')]+'%'};return _0x4d33ba;})});}_0x23058c=_['merge']({},_0x23058c,_0x590333[_0xbd5c('0x47')]);return _0x1137b4[_0xbd5c('0x54')](_0x23058c);}})[_0xbd5c('0x2d')](function(_0x228712){if(_0x228712){_0x31986c=_0x228712[_0xbd5c('0x4c')];if(!_0x590333[_0xbd5c('0x3a')][_0xbd5c('0x3f')](_0xbd5c('0x40'))){_0x23058c['limit']=qs['limit'](_0x590333[_0xbd5c('0x3a')][_0xbd5c('0x23')]);_0x23058c[_0xbd5c('0x21')]=qs[_0xbd5c('0x21')](_0x590333[_0xbd5c('0x3a')][_0xbd5c('0x21')]);}return _0x1137b4[_0xbd5c('0x54')](_0x23058c);}})[_0xbd5c('0x2d')](function(_0x291c86){if(_0x291c86){return _0x291c86?{'count':_0x31986c,'rows':_0x291c86}:null;}})[_0xbd5c('0x2d')](respondWithResult(_0x4768d5,null))[_0xbd5c('0x4f')](handleError(_0x4768d5,null));};exports[_0xbd5c('0x58')]=function(_0x34dc56,_0x3a8815,_0x3f58cd){if(_0x34dc56[_0xbd5c('0x51')]['id']){delete _0x34dc56[_0xbd5c('0x51')]['id'];}return db[_0xbd5c('0x34')][_0xbd5c('0x55')]({'where':{'id':_0x34dc56['params']['id']}})['then'](handleEntityNotFound(_0x3a8815,null))[_0xbd5c('0x2d')](function(_0xd80fbe){if(_0xd80fbe){_0x34dc56['body'][_0xbd5c('0x59')]=_0xd80fbe['id'];_0x34dc56[_0xbd5c('0x51')][_0xbd5c('0x5a')]=integrations[_0xbd5c('0x5b')](_0x34dc56[_0xbd5c('0x51')][_0xbd5c('0x5c')],_0x34dc56[_0xbd5c('0x51')][_0xbd5c('0x37')]);_0x34dc56['body']['Descriptions']=integrations['getDescriptions'](_0x34dc56['body']['channel'],_0x34dc56[_0xbd5c('0x51')][_0xbd5c('0x37')]);return db[_0xbd5c('0x56')]['create'](_0x34dc56['body'],{'include':[{'model':db['FreshsalesField'],'as':_0xbd5c('0x5a')},{'model':db['FreshsalesField'],'as':_0xbd5c('0x5d')}]});}return null;})[_0xbd5c('0x2d')](respondWithResult(_0x3a8815,null))[_0xbd5c('0x4f')](handleError(_0x3a8815,null));};exports[_0xbd5c('0x5e')]=function(_0x3ba6a6,_0xb230e7,_0xd08fda){var _0x52d057='';var _0x3606a5='';return db[_0xbd5c('0x34')][_0xbd5c('0x55')]({'where':{'id':_0x3ba6a6[_0xbd5c('0x52')]['id']},'attributes':['id','username','remoteUri',_0xbd5c('0x5f')]})[_0xbd5c('0x2d')](handleEntityNotFound(_0xb230e7,null))[_0xbd5c('0x2d')](function(_0x523c53){if(_0x523c53){_0x3606a5=_0x523c53[_0xbd5c('0x60')];_0x52d057=_0x523c53[_0xbd5c('0x61')];var _0x477889=_0x523c53[_0xbd5c('0x61')]['slice'](-0x1);if(_0x477889==='/'){_0x52d057=_0x52d057[_0xbd5c('0x62')](0x0,_0x52d057[_0xbd5c('0x63')](_0x477889));}return rp({'method':'GET','uri':util[_0xbd5c('0x64')](_0xbd5c('0x65'),_0x52d057,_0xbd5c('0x66')),'headers':{'Authorization':_0xbd5c('0x67')+_0x523c53[_0xbd5c('0x5f')]},'json':!![]});}})[_0xbd5c('0x2d')](function(_0x1cadb5){if(_0x1cadb5){var _0x29898a=_0x1cadb5[_0xbd5c('0x68')];var _0x4454fd=![];var _0x295a79=null;for(_0x295a79=0x0;_0x295a79<_0x29898a['length'];_0x295a79++){if(_0x29898a[_0x295a79][_0xbd5c('0x69')]===_0x3606a5){_0x4454fd=!![];}}if(_0x4454fd){return!![];}else{throw new Error({'statusCode':0x194,'message':_0xbd5c('0x6a')});}}})['then'](respondWithResult(_0xb230e7,null))[_0xbd5c('0x4f')](function(_0x5dde0b){var _0x5f0b2e=_0x3ba6a6[_0xbd5c('0x3a')]['test']?0x1f4:_0x5dde0b[_0xbd5c('0x6b')]||0x1f4;logger[_0xbd5c('0x2f')](_0xbd5c('0x6c'),_0xbd5c('0x5e'),_0x5f0b2e,JSON['stringify'](_0x5dde0b));delete _0x5dde0b[_0xbd5c('0x31')];if(_0x5f0b2e===0x191){_0x5f0b2e=0x190;}_0xb230e7['status'](_0x5f0b2e)[_0xbd5c('0x6d')](_0x3ba6a6[_0xbd5c('0x3a')][_0xbd5c('0x6e')]?{'message':_0xbd5c('0x6f'),'statusCode':_0x5dde0b[_0xbd5c('0x6b')]}:_0x5dde0b);});}; \ No newline at end of file diff --git a/server/api/intFreshsalesAccount/intFreshsalesAccount.model.js b/server/api/intFreshsalesAccount/intFreshsalesAccount.model.js index 7c531ad..7a4dad1 100644 --- a/server/api/intFreshsalesAccount/intFreshsalesAccount.model.js +++ b/server/api/intFreshsalesAccount/intFreshsalesAccount.model.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x81c6=['define','util','bluebird','request-promise','path','../../config/environment','./intFreshsalesAccount.attributes','../../components/integrations/configuration','exports'];(function(_0xfae23b,_0x2be4ba){var _0x200640=function(_0x4ae258){while(--_0x4ae258){_0xfae23b['push'](_0xfae23b['shift']());}};_0x200640(++_0x2be4ba);}(_0x81c6,0x1d5));var _0x681c=function(_0x1fb9d2,_0x57a208){_0x1fb9d2=_0x1fb9d2-0x0;var _0x4a8916=_0x81c6[_0x1fb9d2];return _0x4a8916;};'use strict';var _=require('lodash');var util=require(_0x681c('0x0'));var logger=require('../../config/logger')('api');var moment=require('moment');var BPromise=require(_0x681c('0x1'));var rp=require(_0x681c('0x2'));var fs=require('fs');var path=require(_0x681c('0x3'));var rimraf=require('rimraf');var config=require(_0x681c('0x4'));var attributes=require(_0x681c('0x5'));var integrations=require(_0x681c('0x6'));module[_0x681c('0x7')]=function(_0x4ea522,_0x45331){return _0x4ea522[_0x681c('0x8')]('FreshsalesAccount',attributes,{'tableName':'int_freshsales_accounts','paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file +var _0xb145=['request-promise','path','rimraf','./intFreshsalesAccount.attributes','../../components/integrations/configuration','exports','define','FreshsalesAccount','int_freshsales_accounts','util','../../config/logger','api','moment','bluebird'];(function(_0x453691,_0x19ae63){var _0x21c62d=function(_0x26151d){while(--_0x26151d){_0x453691['push'](_0x453691['shift']());}};_0x21c62d(++_0x19ae63);}(_0xb145,0xa3));var _0x5b14=function(_0x4ba42c,_0x428175){_0x4ba42c=_0x4ba42c-0x0;var _0x5753a0=_0xb145[_0x4ba42c];return _0x5753a0;};'use strict';var _=require('lodash');var util=require(_0x5b14('0x0'));var logger=require(_0x5b14('0x1'))(_0x5b14('0x2'));var moment=require(_0x5b14('0x3'));var BPromise=require(_0x5b14('0x4'));var rp=require(_0x5b14('0x5'));var fs=require('fs');var path=require(_0x5b14('0x6'));var rimraf=require(_0x5b14('0x7'));var config=require('../../config/environment');var attributes=require(_0x5b14('0x8'));var integrations=require(_0x5b14('0x9'));module[_0x5b14('0xa')]=function(_0x4d82ad,_0x50fd91){return _0x4d82ad[_0x5b14('0xb')](_0x5b14('0xc'),attributes,{'tableName':_0x5b14('0xd'),'paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file diff --git a/server/api/intFreshsalesAccount/intFreshsalesAccount.rpc.js b/server/api/intFreshsalesAccount/intFreshsalesAccount.rpc.js index 056403f..3f1cf39 100644 --- a/server/api/intFreshsalesAccount/intFreshsalesAccount.rpc.js +++ b/server/api/intFreshsalesAccount/intFreshsalesAccount.rpc.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x1967=['../../config/environment','client','http','request','then','info','FreshsalesAccount,\x20%s,\x20%s','FreshsalesAccount,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','code','message','result','catch','GetFreshsalesAccount','FreshsalesAccount','findAll','options','raw','where','limit','include','map','model','attributes','ShowFreshsalesAccount','find','debug','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc'];(function(_0xfe0cfc,_0x281525){var _0x34f996=function(_0x2d9c54){while(--_0x2d9c54){_0xfe0cfc['push'](_0xfe0cfc['shift']());}};_0x34f996(++_0x281525);}(_0x1967,0x173));var _0x7196=function(_0x23c8ed,_0x2f65af){_0x23c8ed=_0x23c8ed-0x0;var _0x1e6902=_0x1967[_0x23c8ed];return _0x1e6902;};'use strict';var _=require('lodash');var util=require(_0x7196('0x0'));var moment=require(_0x7196('0x1'));var BPromise=require(_0x7196('0x2'));var rs=require(_0x7196('0x3'));var fs=require('fs');var Redis=require(_0x7196('0x4'));var db=require(_0x7196('0x5'))['db'];var utils=require(_0x7196('0x6'));var logger=require(_0x7196('0x7'))(_0x7196('0x8'));var config=require(_0x7196('0x9'));var jayson=require('jayson/promise');var client=jayson[_0x7196('0xa')][_0x7196('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x194746,_0x40e0af,_0x266a6e){return new BPromise(function(_0xad78a,_0x510c72){return client[_0x7196('0xc')](_0x194746,_0x266a6e)[_0x7196('0xd')](function(_0x3f846e){logger[_0x7196('0xe')](_0x7196('0xf'),_0x40e0af,'request\x20sent');logger['debug'](_0x7196('0x10'),_0x40e0af,_0x7196('0x11'),JSON[_0x7196('0x12')](_0x3f846e));if(_0x3f846e[_0x7196('0x13')]){if(_0x3f846e[_0x7196('0x13')][_0x7196('0x14')]===0x1f4){logger[_0x7196('0x13')](_0x7196('0xf'),_0x40e0af,_0x3f846e[_0x7196('0x13')][_0x7196('0x15')]);return _0x510c72(_0x3f846e[_0x7196('0x13')]['message']);}logger[_0x7196('0x13')](_0x7196('0xf'),_0x40e0af,_0x3f846e[_0x7196('0x13')][_0x7196('0x15')]);return _0xad78a(_0x3f846e['error'][_0x7196('0x15')]);}else{logger['info'](_0x7196('0xf'),_0x40e0af,_0x7196('0x11'));_0xad78a(_0x3f846e[_0x7196('0x16')][_0x7196('0x15')]);}})[_0x7196('0x17')](function(_0x2e3e0e){logger[_0x7196('0x13')](_0x7196('0xf'),_0x40e0af,_0x2e3e0e);_0x510c72(_0x2e3e0e);});});}exports[_0x7196('0x18')]=function(_0x32fe2b){var _0x385f2d=this;return new Promise(function(_0x5b716a,_0x4c4f91){return db[_0x7196('0x19')][_0x7196('0x1a')]({'raw':_0x32fe2b[_0x7196('0x1b')]?_0x32fe2b['options'][_0x7196('0x1c')]===undefined?!![]:![]:!![],'where':_0x32fe2b['options']?_0x32fe2b['options'][_0x7196('0x1d')]||null:null,'attributes':_0x32fe2b[_0x7196('0x1b')]?_0x32fe2b[_0x7196('0x1b')]['attributes']||null:null,'limit':_0x32fe2b['options']?_0x32fe2b[_0x7196('0x1b')][_0x7196('0x1e')]||null:null,'include':_0x32fe2b['options']?_0x32fe2b[_0x7196('0x1b')][_0x7196('0x1f')]?_[_0x7196('0x20')](_0x32fe2b[_0x7196('0x1b')][_0x7196('0x1f')],function(_0x549f34){return{'model':db[_0x549f34[_0x7196('0x21')]],'as':_0x549f34['as'],'attributes':_0x549f34['attributes'],'include':_0x549f34[_0x7196('0x1f')]?_[_0x7196('0x20')](_0x549f34[_0x7196('0x1f')],function(_0xa69810){return{'model':db[_0xa69810[_0x7196('0x21')]],'as':_0xa69810['as'],'attributes':_0xa69810[_0x7196('0x22')],'include':_0xa69810['include']?_['map'](_0xa69810[_0x7196('0x1f')],function(_0x2d284f){return{'model':db[_0x2d284f[_0x7196('0x21')]],'as':_0x2d284f['as'],'attributes':_0x2d284f['attributes']};}):[]};}):[]};}):[]:[]})['then'](function(_0x41cfd2){logger[_0x7196('0xe')](_0x7196('0x18'),_0x32fe2b);logger['debug'](_0x7196('0x18'),_0x32fe2b,JSON['stringify'](_0x41cfd2));_0x5b716a(_0x41cfd2);})[_0x7196('0x17')](function(_0x59d79d){logger[_0x7196('0x13')](_0x7196('0x18'),_0x59d79d[_0x7196('0x15')],_0x32fe2b);_0x4c4f91(_0x385f2d['error'](0x1f4,_0x59d79d[_0x7196('0x15')]));});});};exports[_0x7196('0x23')]=function(_0x2f9583){var _0xf999e9=this;return new Promise(function(_0x50c386,_0x39710d){return db[_0x7196('0x19')][_0x7196('0x24')]({'raw':_0x2f9583[_0x7196('0x1b')]?_0x2f9583[_0x7196('0x1b')][_0x7196('0x1c')]===undefined?!![]:![]:!![],'where':_0x2f9583[_0x7196('0x1b')]?_0x2f9583[_0x7196('0x1b')][_0x7196('0x1d')]||null:null,'attributes':_0x2f9583[_0x7196('0x1b')]?_0x2f9583[_0x7196('0x1b')]['attributes']||null:null,'include':_0x2f9583[_0x7196('0x1b')]?_0x2f9583['options'][_0x7196('0x1f')]?_['map'](_0x2f9583[_0x7196('0x1b')][_0x7196('0x1f')],function(_0x5616ed){return{'model':db[_0x5616ed[_0x7196('0x21')]],'as':_0x5616ed['as'],'attributes':_0x5616ed[_0x7196('0x22')],'include':_0x5616ed[_0x7196('0x1f')]?_[_0x7196('0x20')](_0x5616ed[_0x7196('0x1f')],function(_0x4a8580){return{'model':db[_0x4a8580[_0x7196('0x21')]],'as':_0x4a8580['as'],'attributes':_0x4a8580[_0x7196('0x22')],'include':_0x4a8580[_0x7196('0x1f')]?_[_0x7196('0x20')](_0x4a8580[_0x7196('0x1f')],function(_0x123cad){return{'model':db[_0x123cad['model']],'as':_0x123cad['as'],'attributes':_0x123cad[_0x7196('0x22')]};}):[]};}):[]};}):[]:[]})[_0x7196('0xd')](function(_0x191df2){logger['info'](_0x7196('0x23'),_0x2f9583);logger[_0x7196('0x25')](_0x7196('0x23'),_0x2f9583,JSON[_0x7196('0x12')](_0x191df2));_0x50c386(_0x191df2);})[_0x7196('0x17')](function(_0x31fca7){logger[_0x7196('0x13')](_0x7196('0x23'),_0x31fca7[_0x7196('0x15')],_0x2f9583);_0x39710d(_0xf999e9[_0x7196('0x13')](0x1f4,_0x31fca7['message']));});});}; \ No newline at end of file +var _0x32f4=['lodash','util','moment','bluebird','ioredis','../../mysqldb','../../config/logger','rpc','../../config/environment','jayson/promise','client','then','info','FreshsalesAccount,\x20%s,\x20%s','request\x20sent','FreshsalesAccount,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','catch','GetFreshsalesAccount','FreshsalesAccount','options','raw','where','attributes','limit','include','model','map','find','ShowFreshsalesAccount'];(function(_0x154b31,_0x2d12bc){var _0x1183d8=function(_0x5c9e27){while(--_0x5c9e27){_0x154b31['push'](_0x154b31['shift']());}};_0x1183d8(++_0x2d12bc);}(_0x32f4,0x154));var _0x432f=function(_0x1f756a,_0x2781b6){_0x1f756a=_0x1f756a-0x0;var _0x303ba5=_0x32f4[_0x1f756a];return _0x303ba5;};'use strict';var _=require(_0x432f('0x0'));var util=require(_0x432f('0x1'));var moment=require(_0x432f('0x2'));var BPromise=require(_0x432f('0x3'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x432f('0x4'));var db=require(_0x432f('0x5'))['db'];var utils=require('../../config/utils');var logger=require(_0x432f('0x6'))(_0x432f('0x7'));var config=require(_0x432f('0x8'));var jayson=require(_0x432f('0x9'));var client=jayson[_0x432f('0xa')]['http']({'port':0x232a});function respondWithRpcPromise(_0x5b5f08,_0x2f66fd,_0x32b062){return new BPromise(function(_0x4a5b56,_0x2a2ef6){return client['request'](_0x5b5f08,_0x32b062)[_0x432f('0xb')](function(_0x340fe9){logger[_0x432f('0xc')](_0x432f('0xd'),_0x2f66fd,_0x432f('0xe'));logger['debug'](_0x432f('0xf'),_0x2f66fd,'request\x20sent',JSON[_0x432f('0x10')](_0x340fe9));if(_0x340fe9['error']){if(_0x340fe9[_0x432f('0x11')][_0x432f('0x12')]===0x1f4){logger['error'](_0x432f('0xd'),_0x2f66fd,_0x340fe9[_0x432f('0x11')]['message']);return _0x2a2ef6(_0x340fe9[_0x432f('0x11')][_0x432f('0x13')]);}logger['error']('FreshsalesAccount,\x20%s,\x20%s',_0x2f66fd,_0x340fe9[_0x432f('0x11')][_0x432f('0x13')]);return _0x4a5b56(_0x340fe9[_0x432f('0x11')][_0x432f('0x13')]);}else{logger[_0x432f('0xc')]('FreshsalesAccount,\x20%s,\x20%s',_0x2f66fd,_0x432f('0xe'));_0x4a5b56(_0x340fe9[_0x432f('0x14')][_0x432f('0x13')]);}})[_0x432f('0x15')](function(_0x5bae29){logger[_0x432f('0x11')](_0x432f('0xd'),_0x2f66fd,_0x5bae29);_0x2a2ef6(_0x5bae29);});});}exports[_0x432f('0x16')]=function(_0x243cf){var _0x3cd5da=this;return new Promise(function(_0x129582,_0x5ae24e){return db[_0x432f('0x17')]['findAll']({'raw':_0x243cf[_0x432f('0x18')]?_0x243cf[_0x432f('0x18')][_0x432f('0x19')]===undefined?!![]:![]:!![],'where':_0x243cf[_0x432f('0x18')]?_0x243cf[_0x432f('0x18')][_0x432f('0x1a')]||null:null,'attributes':_0x243cf[_0x432f('0x18')]?_0x243cf[_0x432f('0x18')][_0x432f('0x1b')]||null:null,'limit':_0x243cf[_0x432f('0x18')]?_0x243cf[_0x432f('0x18')][_0x432f('0x1c')]||null:null,'include':_0x243cf['options']?_0x243cf['options'][_0x432f('0x1d')]?_['map'](_0x243cf[_0x432f('0x18')]['include'],function(_0x37f136){return{'model':db[_0x37f136[_0x432f('0x1e')]],'as':_0x37f136['as'],'attributes':_0x37f136[_0x432f('0x1b')],'include':_0x37f136[_0x432f('0x1d')]?_[_0x432f('0x1f')](_0x37f136[_0x432f('0x1d')],function(_0x59f352){return{'model':db[_0x59f352[_0x432f('0x1e')]],'as':_0x59f352['as'],'attributes':_0x59f352[_0x432f('0x1b')],'include':_0x59f352['include']?_[_0x432f('0x1f')](_0x59f352[_0x432f('0x1d')],function(_0x2bcbb4){return{'model':db[_0x2bcbb4[_0x432f('0x1e')]],'as':_0x2bcbb4['as'],'attributes':_0x2bcbb4[_0x432f('0x1b')]};}):[]};}):[]};}):[]:[]})[_0x432f('0xb')](function(_0x138a6a){logger['info'](_0x432f('0x16'),_0x243cf);logger['debug'](_0x432f('0x16'),_0x243cf,JSON['stringify'](_0x138a6a));_0x129582(_0x138a6a);})[_0x432f('0x15')](function(_0x5a2c14){logger[_0x432f('0x11')]('GetFreshsalesAccount',_0x5a2c14[_0x432f('0x13')],_0x243cf);_0x5ae24e(_0x3cd5da[_0x432f('0x11')](0x1f4,_0x5a2c14[_0x432f('0x13')]));});});};exports['ShowFreshsalesAccount']=function(_0x6a116e){var _0x24406a=this;return new Promise(function(_0x48139b,_0x5ee0fa){return db[_0x432f('0x17')][_0x432f('0x20')]({'raw':_0x6a116e[_0x432f('0x18')]?_0x6a116e[_0x432f('0x18')][_0x432f('0x19')]===undefined?!![]:![]:!![],'where':_0x6a116e[_0x432f('0x18')]?_0x6a116e['options']['where']||null:null,'attributes':_0x6a116e[_0x432f('0x18')]?_0x6a116e[_0x432f('0x18')][_0x432f('0x1b')]||null:null,'include':_0x6a116e['options']?_0x6a116e[_0x432f('0x18')][_0x432f('0x1d')]?_[_0x432f('0x1f')](_0x6a116e[_0x432f('0x18')][_0x432f('0x1d')],function(_0x3ad632){return{'model':db[_0x3ad632[_0x432f('0x1e')]],'as':_0x3ad632['as'],'attributes':_0x3ad632[_0x432f('0x1b')],'include':_0x3ad632['include']?_['map'](_0x3ad632[_0x432f('0x1d')],function(_0xa5e0d){return{'model':db[_0xa5e0d['model']],'as':_0xa5e0d['as'],'attributes':_0xa5e0d['attributes'],'include':_0xa5e0d['include']?_[_0x432f('0x1f')](_0xa5e0d[_0x432f('0x1d')],function(_0x5648a7){return{'model':db[_0x5648a7[_0x432f('0x1e')]],'as':_0x5648a7['as'],'attributes':_0x5648a7[_0x432f('0x1b')]};}):[]};}):[]};}):[]:[]})[_0x432f('0xb')](function(_0x5903f6){logger[_0x432f('0xc')](_0x432f('0x21'),_0x6a116e);logger['debug'](_0x432f('0x21'),_0x6a116e,JSON[_0x432f('0x10')](_0x5903f6));_0x48139b(_0x5903f6);})['catch'](function(_0x28da2e){logger[_0x432f('0x11')](_0x432f('0x21'),_0x28da2e[_0x432f('0x13')],_0x6a116e);_0x5ee0fa(_0x24406a[_0x432f('0x11')](0x1f4,_0x28da2e[_0x432f('0x13')]));});});}; \ No newline at end of file diff --git a/server/api/intFreshsalesConfiguration/index.js b/server/api/intFreshsalesConfiguration/index.js index 18f795e..379fa70 100644 --- a/server/api/intFreshsalesConfiguration/index.js +++ b/server/api/intFreshsalesConfiguration/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x478e=['isAuthenticated','show','/:id/descriptions','getDescriptions','/:id/fields','getFields','create','put','delete','destroy','exports','multer','util','path','connect-timeout','express','Router','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','./intFreshsalesConfiguration.controller','index','get','/:id'];(function(_0x1c38fa,_0x50a1f3){var _0x177798=function(_0x4f7888){while(--_0x4f7888){_0x1c38fa['push'](_0x1c38fa['shift']());}};_0x177798(++_0x50a1f3);}(_0x478e,0x169));var _0xe478=function(_0x5ab27f,_0x21a462){_0x5ab27f=_0x5ab27f-0x0;var _0x23826c=_0x478e[_0x5ab27f];return _0x23826c;};'use strict';var multer=require(_0xe478('0x0'));var util=require(_0xe478('0x1'));var path=require(_0xe478('0x2'));var timeout=require(_0xe478('0x3'));var express=require(_0xe478('0x4'));var router=express[_0xe478('0x5')]();var fs_extra=require(_0xe478('0x6'));var auth=require(_0xe478('0x7'));var interaction=require(_0xe478('0x8'));var config=require(_0xe478('0x9'));var controller=require(_0xe478('0xa'));router['get']('/',auth['isAuthenticated'](),controller[_0xe478('0xb')]);router[_0xe478('0xc')](_0xe478('0xd'),auth[_0xe478('0xe')](),controller[_0xe478('0xf')]);router[_0xe478('0xc')]('/:id/subjects',auth[_0xe478('0xe')](),controller['getSubjects']);router['get'](_0xe478('0x10'),auth[_0xe478('0xe')](),controller[_0xe478('0x11')]);router[_0xe478('0xc')](_0xe478('0x12'),auth[_0xe478('0xe')](),controller[_0xe478('0x13')]);router['post']('/',auth[_0xe478('0xe')](),controller[_0xe478('0x14')]);router[_0xe478('0x15')](_0xe478('0xd'),auth[_0xe478('0xe')](),controller['update']);router[_0xe478('0x16')]('/:id',auth[_0xe478('0xe')](),controller[_0xe478('0x17')]);module[_0xe478('0x18')]=router; \ No newline at end of file +var _0x18e2=['connect-timeout','express','fs-extra','../../components/auth/service','../../components/interaction/service','./intFreshsalesConfiguration.controller','isAuthenticated','index','/:id','get','getSubjects','/:id/descriptions','getDescriptions','/:id/fields','getFields','post','put','update','delete','destroy','exports','multer','util','path'];(function(_0x1c6a2f,_0x5b7146){var _0x66320c=function(_0x4cee6a){while(--_0x4cee6a){_0x1c6a2f['push'](_0x1c6a2f['shift']());}};_0x66320c(++_0x5b7146);}(_0x18e2,0x165));var _0x218e=function(_0x1531b5,_0x522e09){_0x1531b5=_0x1531b5-0x0;var _0xeba8ab=_0x18e2[_0x1531b5];return _0xeba8ab;};'use strict';var multer=require(_0x218e('0x0'));var util=require(_0x218e('0x1'));var path=require(_0x218e('0x2'));var timeout=require(_0x218e('0x3'));var express=require(_0x218e('0x4'));var router=express['Router']();var fs_extra=require(_0x218e('0x5'));var auth=require(_0x218e('0x6'));var interaction=require(_0x218e('0x7'));var config=require('../../config/environment');var controller=require(_0x218e('0x8'));router['get']('/',auth[_0x218e('0x9')](),controller[_0x218e('0xa')]);router['get'](_0x218e('0xb'),auth[_0x218e('0x9')](),controller['show']);router[_0x218e('0xc')]('/:id/subjects',auth[_0x218e('0x9')](),controller[_0x218e('0xd')]);router[_0x218e('0xc')](_0x218e('0xe'),auth[_0x218e('0x9')](),controller[_0x218e('0xf')]);router[_0x218e('0xc')](_0x218e('0x10'),auth['isAuthenticated'](),controller[_0x218e('0x11')]);router[_0x218e('0x12')]('/',auth[_0x218e('0x9')](),controller['create']);router[_0x218e('0x13')](_0x218e('0xb'),auth[_0x218e('0x9')](),controller[_0x218e('0x14')]);router[_0x218e('0x15')](_0x218e('0xb'),auth[_0x218e('0x9')](),controller[_0x218e('0x16')]);module[_0x218e('0x17')]=router; \ No newline at end of file diff --git a/server/api/intFreshsalesConfiguration/intFreshsalesConfiguration.attributes.js b/server/api/intFreshsalesConfiguration/intFreshsalesConfiguration.attributes.js index c206629..4657ab4 100644 --- a/server/api/intFreshsalesConfiguration/intFreshsalesConfiguration.attributes.js +++ b/server/api/intFreshsalesConfiguration/intFreshsalesConfiguration.attributes.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xadac=['exports','STRING'];(function(_0x21a9d9,_0x4d5ac8){var _0x46adce=function(_0xfdd336){while(--_0xfdd336){_0x21a9d9['push'](_0x21a9d9['shift']());}};_0x46adce(++_0x4d5ac8);}(_0xadac,0x1e2));var _0xcada=function(_0x5cd7a3,_0x1aa14f){_0x5cd7a3=_0x5cd7a3-0x0;var _0x21235d=_0xadac[_0x5cd7a3];return _0x21235d;};'use strict';var Sequelize=require('sequelize');module[_0xcada('0x0')]={'name':{'type':Sequelize[_0xcada('0x1')]},'description':{'type':Sequelize[_0xcada('0x1')]}}; \ No newline at end of file +var _0xf38c=['STRING'];(function(_0x20c502,_0xd41920){var _0x3baa61=function(_0x4ccd95){while(--_0x4ccd95){_0x20c502['push'](_0x20c502['shift']());}};_0x3baa61(++_0xd41920);}(_0xf38c,0x1ac));var _0xcf38=function(_0x122ef9,_0x451d2a){_0x122ef9=_0x122ef9-0x0;var _0x42fba0=_0xf38c[_0x122ef9];return _0x42fba0;};'use strict';var Sequelize=require('sequelize');module['exports']={'name':{'type':Sequelize[_0xcf38('0x0')]},'description':{'type':Sequelize[_0xcf38('0x0')]}}; \ No newline at end of file diff --git a/server/api/intFreshsalesConfiguration/intFreshsalesConfiguration.controller.js b/server/api/intFreshsalesConfiguration/intFreshsalesConfiguration.controller.js index b636fdc..a221f51 100644 --- a/server/api/intFreshsalesConfiguration/intFreshsalesConfiguration.controller.js +++ b/server/api/intFreshsalesConfiguration/intFreshsalesConfiguration.controller.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x2c80=['moment','bluebird','path','sox','to-csv','ejs','fs-extra','lodash','squel','crypto','jsforce','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/environment','../../config/license/util','../../mysqldb','sendStatus','json','offset','undefined','limit','count','set','Content-Range','save','update','then','destroy','status','end','stack','name','send','index','map','rawAttributes','fieldName','type','model','query','keys','filters','intersection','fields','attributes','nolimit','order','sort','pick','filter','where','merge','options','FreshsalesConfiguration','includeAll','findAll','rows','params','length','include','find','catch','create','body','getSubjects','findOne','FreshsalesField','hasOwnProperty','getDescriptions','getFields','eml-format','rimraf','zip-dir','request-promise'];(function(_0x4db998,_0xb7014f){var _0x5b9838=function(_0x388def){while(--_0x388def){_0x4db998['push'](_0x4db998['shift']());}};_0x5b9838(++_0xb7014f);}(_0x2c80,0x1dc));var _0x02c8=function(_0x253b13,_0x247a2f){_0x253b13=_0x253b13-0x0;var _0x396bcc=_0x2c80[_0x253b13];return _0x396bcc;};'use strict';var emlformat=require(_0x02c8('0x0'));var rimraf=require(_0x02c8('0x1'));var zipdir=require(_0x02c8('0x2'));var jsonpatch=require('fast-json-patch');var rp=require(_0x02c8('0x3'));var moment=require(_0x02c8('0x4'));var BPromise=require(_0x02c8('0x5'));var Mustache=require('mustache');var util=require('util');var path=require(_0x02c8('0x6'));var sox=require(_0x02c8('0x7'));var csv=require(_0x02c8('0x8'));var ejs=require(_0x02c8('0x9'));var fs=require('fs');var fs_extra=require(_0x02c8('0xa'));var _=require(_0x02c8('0xb'));var squel=require(_0x02c8('0xc'));var crypto=require(_0x02c8('0xd'));var jsforce=require(_0x02c8('0xe'));var deskjs=require('desk.js');var toCsv=require(_0x02c8('0x8'));var querystring=require(_0x02c8('0xf'));var Papa=require(_0x02c8('0x10'));var Redis=require(_0x02c8('0x11'));var authService=require(_0x02c8('0x12'));var qs=require('../../components/parsers/qs');var as=require(_0x02c8('0x13'));var hardwareService=require(_0x02c8('0x14'));var logger=require(_0x02c8('0x15'))(_0x02c8('0x16'));var utils=require('../../config/utils');var config=require(_0x02c8('0x17'));var licenseUtil=require(_0x02c8('0x18'));var db=require(_0x02c8('0x19'))['db'];function respondWithStatusCode(_0x11556e,_0x351832){_0x351832=_0x351832||0xcc;return function(_0xa71c2d){if(_0xa71c2d){return _0x11556e[_0x02c8('0x1a')](_0x351832);}return _0x11556e['status'](_0x351832)['end']();};}function respondWithResult(_0x9fbaa7,_0x1a84bf){_0x1a84bf=_0x1a84bf||0xc8;return function(_0x9e73c9){if(_0x9e73c9){return _0x9fbaa7['status'](_0x1a84bf)[_0x02c8('0x1b')](_0x9e73c9);}};}function respondWithFilteredResult(_0x57137e,_0xaa4925){return function(_0x4bde9){if(_0x4bde9){var _0x1cf865=typeof _0xaa4925[_0x02c8('0x1c')]===_0x02c8('0x1d')&&typeof _0xaa4925[_0x02c8('0x1e')]===_0x02c8('0x1d');var _0x37f9a6=_0x4bde9['count'];var _0xd4f145=_0x1cf865?0x0:_0xaa4925[_0x02c8('0x1c')];var _0x3aeeb6=_0x1cf865?_0x4bde9[_0x02c8('0x1f')]:_0xaa4925[_0x02c8('0x1c')]+_0xaa4925[_0x02c8('0x1e')];var _0x523b60;if(_0x3aeeb6>=_0x37f9a6){_0x3aeeb6=_0x37f9a6;_0x523b60=0xc8;}else{_0x523b60=0xce;}_0x57137e['status'](_0x523b60);return _0x57137e[_0x02c8('0x20')](_0x02c8('0x21'),_0xd4f145+'-'+_0x3aeeb6+'/'+_0x37f9a6)[_0x02c8('0x1b')](_0x4bde9);}return null;};}function patchUpdates(_0x45658d){return function(_0x3ee8e2){try{jsonpatch['apply'](_0x3ee8e2,_0x45658d,!![]);}catch(_0x3e2472){return BPromise['reject'](_0x3e2472);}return _0x3ee8e2[_0x02c8('0x22')]();};}function saveUpdates(_0x3d3749,_0x3bc350){return function(_0x48dad8){if(_0x48dad8){return _0x48dad8[_0x02c8('0x23')](_0x3d3749)[_0x02c8('0x24')](function(_0x176488){return _0x176488;});}return null;};}function removeEntity(_0x261785,_0x3427df){return function(_0x23ca2d){if(_0x23ca2d){return _0x23ca2d[_0x02c8('0x25')]()[_0x02c8('0x24')](function(){_0x261785[_0x02c8('0x26')](0xcc)[_0x02c8('0x27')]();});}};}function handleEntityNotFound(_0x48a11e,_0x306f81){return function(_0x1a20af){if(!_0x1a20af){_0x48a11e['sendStatus'](0x194);}return _0x1a20af;};}function handleError(_0x4434a5,_0x230550){_0x230550=_0x230550||0x1f4;return function(_0x1377c6){logger['error'](_0x1377c6[_0x02c8('0x28')]);if(_0x1377c6[_0x02c8('0x29')]){delete _0x1377c6[_0x02c8('0x29')];}_0x4434a5['status'](_0x230550)[_0x02c8('0x2a')](_0x1377c6);};}exports[_0x02c8('0x2b')]=function(_0x23fb16,_0x12518f){var _0x26922d={},_0x252e4c={},_0x3a7c75={'count':0x0,'rows':[]};var _0x585ec3=_[_0x02c8('0x2c')](db['FreshsalesConfiguration'][_0x02c8('0x2d')],function(_0xd45191){return{'name':_0xd45191[_0x02c8('0x2e')],'type':_0xd45191[_0x02c8('0x2f')]['key']};});_0x252e4c[_0x02c8('0x30')]=_['map'](_0x585ec3,_0x02c8('0x29'));_0x252e4c[_0x02c8('0x31')]=_[_0x02c8('0x32')](_0x23fb16[_0x02c8('0x31')]);_0x252e4c[_0x02c8('0x33')]=_[_0x02c8('0x34')](_0x252e4c[_0x02c8('0x30')],_0x252e4c[_0x02c8('0x31')]);_0x26922d['attributes']=_[_0x02c8('0x34')](_0x252e4c[_0x02c8('0x30')],qs[_0x02c8('0x35')](_0x23fb16['query'][_0x02c8('0x35')]));_0x26922d[_0x02c8('0x36')]=_0x26922d[_0x02c8('0x36')]['length']?_0x26922d[_0x02c8('0x36')]:_0x252e4c['model'];if(!_0x23fb16['query']['hasOwnProperty'](_0x02c8('0x37'))){_0x26922d[_0x02c8('0x1e')]=qs[_0x02c8('0x1e')](_0x23fb16[_0x02c8('0x31')][_0x02c8('0x1e')]);_0x26922d[_0x02c8('0x1c')]=qs[_0x02c8('0x1c')](_0x23fb16[_0x02c8('0x31')][_0x02c8('0x1c')]);}_0x26922d[_0x02c8('0x38')]=qs[_0x02c8('0x39')](_0x23fb16['query']['sort']);_0x26922d['where']=qs['filters'](_[_0x02c8('0x3a')](_0x23fb16['query'],_0x252e4c[_0x02c8('0x33')]),_0x585ec3);if(_0x23fb16[_0x02c8('0x31')][_0x02c8('0x3b')]){_0x26922d[_0x02c8('0x3c')]=_[_0x02c8('0x3d')](_0x26922d[_0x02c8('0x3c')],{'$or':_[_0x02c8('0x2c')](_0x585ec3,function(_0x53f29c){if(_0x53f29c[_0x02c8('0x2f')]!=='VIRTUAL'){var _0x732864={};_0x732864[_0x53f29c[_0x02c8('0x29')]]={'$like':'%'+_0x23fb16['query'][_0x02c8('0x3b')]+'%'};return _0x732864;}})});}_0x26922d=_[_0x02c8('0x3d')]({},_0x26922d,_0x23fb16[_0x02c8('0x3e')]);var _0x13a479={'where':_0x26922d['where']};return db[_0x02c8('0x3f')][_0x02c8('0x1f')](_0x13a479)[_0x02c8('0x24')](function(_0xb97ac9){_0x3a7c75[_0x02c8('0x1f')]=_0xb97ac9;if(_0x23fb16[_0x02c8('0x31')][_0x02c8('0x40')]){_0x26922d['include']=[{'all':!![]}];}return db[_0x02c8('0x3f')][_0x02c8('0x41')](_0x26922d);})[_0x02c8('0x24')](function(_0x3b2376){_0x3a7c75[_0x02c8('0x42')]=_0x3b2376;return _0x3a7c75;})[_0x02c8('0x24')](respondWithFilteredResult(_0x12518f,_0x26922d))['catch'](handleError(_0x12518f,null));};exports['show']=function(_0x35517c,_0x3351b7){var _0x574a51={'raw':![],'where':{'id':_0x35517c[_0x02c8('0x43')]['id']}},_0x2f5740={};_0x2f5740[_0x02c8('0x30')]=_['keys'](db[_0x02c8('0x3f')][_0x02c8('0x2d')]);_0x2f5740[_0x02c8('0x31')]=_[_0x02c8('0x32')](_0x35517c[_0x02c8('0x31')]);_0x2f5740[_0x02c8('0x33')]=_['intersection'](_0x2f5740[_0x02c8('0x30')],_0x2f5740[_0x02c8('0x31')]);_0x574a51[_0x02c8('0x36')]=_['intersection'](_0x2f5740[_0x02c8('0x30')],qs[_0x02c8('0x35')](_0x35517c[_0x02c8('0x31')][_0x02c8('0x35')]));_0x574a51['attributes']=_0x574a51[_0x02c8('0x36')][_0x02c8('0x44')]?_0x574a51[_0x02c8('0x36')]:_0x2f5740['model'];if(_0x35517c['query'][_0x02c8('0x40')]){_0x574a51[_0x02c8('0x45')]=[{'all':!![]}];}_0x574a51=_[_0x02c8('0x3d')]({},_0x574a51,_0x35517c[_0x02c8('0x3e')]);return db['FreshsalesConfiguration'][_0x02c8('0x46')](_0x574a51)[_0x02c8('0x24')](handleEntityNotFound(_0x3351b7,null))['then'](respondWithResult(_0x3351b7,null))[_0x02c8('0x47')](handleError(_0x3351b7,null));};exports[_0x02c8('0x48')]=function(_0x1bf9b7,_0x855d1e){return db[_0x02c8('0x3f')][_0x02c8('0x48')](_0x1bf9b7[_0x02c8('0x49')],{})[_0x02c8('0x24')](respondWithResult(_0x855d1e,0xc9))[_0x02c8('0x47')](handleError(_0x855d1e,null));};exports[_0x02c8('0x23')]=function(_0x4162b2,_0x2b7584){if(_0x4162b2['body']['id']){delete _0x4162b2['body']['id'];}return db[_0x02c8('0x3f')][_0x02c8('0x46')]({'where':{'id':_0x4162b2[_0x02c8('0x43')]['id']}})[_0x02c8('0x24')](handleEntityNotFound(_0x2b7584,null))['then'](saveUpdates(_0x4162b2[_0x02c8('0x49')],null))[_0x02c8('0x24')](respondWithResult(_0x2b7584,null))[_0x02c8('0x47')](handleError(_0x2b7584,null));};exports[_0x02c8('0x25')]=function(_0x47ce6d,_0x5e06cd){return db['FreshsalesConfiguration'][_0x02c8('0x46')]({'where':{'id':_0x47ce6d[_0x02c8('0x43')]['id']}})[_0x02c8('0x24')](handleEntityNotFound(_0x5e06cd,null))[_0x02c8('0x24')](removeEntity(_0x5e06cd,null))[_0x02c8('0x47')](handleError(_0x5e06cd,null));};exports[_0x02c8('0x4a')]=function(_0xc6a01,_0xd5e3f0,_0x209081){var _0x3a8127={};var _0x1b6f1e={};var _0x57e775;var _0x259139;return db[_0x02c8('0x3f')][_0x02c8('0x4b')]({'where':{'id':_0xc6a01['params']['id']}})['then'](handleEntityNotFound(_0xd5e3f0,null))[_0x02c8('0x24')](function(_0x5f22a1){if(_0x5f22a1){_0x57e775=_0x5f22a1;_0x1b6f1e['model']=_[_0x02c8('0x32')](db[_0x02c8('0x4c')][_0x02c8('0x2d')]);_0x1b6f1e[_0x02c8('0x31')]=_['keys'](_0xc6a01[_0x02c8('0x31')]);_0x1b6f1e[_0x02c8('0x33')]=_[_0x02c8('0x34')](_0x1b6f1e['model'],_0x1b6f1e['query']);_0x3a8127[_0x02c8('0x36')]=_[_0x02c8('0x34')](_0x1b6f1e['model'],qs[_0x02c8('0x35')](_0xc6a01['query'][_0x02c8('0x35')]));_0x3a8127[_0x02c8('0x36')]=_0x3a8127[_0x02c8('0x36')][_0x02c8('0x44')]?_0x3a8127[_0x02c8('0x36')]:_0x1b6f1e[_0x02c8('0x30')];_0x3a8127['order']=qs['sort'](_0xc6a01[_0x02c8('0x31')][_0x02c8('0x39')]);_0x3a8127[_0x02c8('0x3c')]=qs['filters'](_[_0x02c8('0x3a')](_0xc6a01[_0x02c8('0x31')],_0x1b6f1e[_0x02c8('0x33')]));if(_0xc6a01[_0x02c8('0x31')][_0x02c8('0x3b')]){_0x3a8127[_0x02c8('0x3c')]=_[_0x02c8('0x3d')](_0x3a8127[_0x02c8('0x3c')],{'$or':_[_0x02c8('0x2c')](_0x3a8127[_0x02c8('0x36')],function(_0x4cbcbb){var _0x405000={};_0x405000[_0x4cbcbb]={'$like':'%'+_0xc6a01['query']['filter']+'%'};return _0x405000;})});}_0x3a8127=_[_0x02c8('0x3d')]({},_0x3a8127,_0xc6a01[_0x02c8('0x3e')]);return _0x57e775[_0x02c8('0x4a')](_0x3a8127);}})[_0x02c8('0x24')](function(_0x50f29c){if(_0x50f29c){_0x259139=_0x50f29c[_0x02c8('0x44')];if(!_0xc6a01[_0x02c8('0x31')][_0x02c8('0x4d')](_0x02c8('0x37'))){_0x3a8127['limit']=qs[_0x02c8('0x1e')](_0xc6a01['query'][_0x02c8('0x1e')]);_0x3a8127[_0x02c8('0x1c')]=qs[_0x02c8('0x1c')](_0xc6a01['query']['offset']);}return _0x57e775[_0x02c8('0x4a')](_0x3a8127);}})[_0x02c8('0x24')](function(_0x274cda){if(_0x274cda){return _0x274cda?{'count':_0x259139,'rows':_0x274cda}:null;}})['then'](respondWithResult(_0xd5e3f0,null))[_0x02c8('0x47')](handleError(_0xd5e3f0,null));};exports[_0x02c8('0x4e')]=function(_0x1c5f43,_0x28786a,_0x27c6fe){var _0x48d870={};var _0x293606={};var _0x18fa2c;var _0x4221b3;return db[_0x02c8('0x3f')]['findOne']({'where':{'id':_0x1c5f43['params']['id']}})[_0x02c8('0x24')](handleEntityNotFound(_0x28786a,null))[_0x02c8('0x24')](function(_0x5dce25){if(_0x5dce25){_0x18fa2c=_0x5dce25;_0x293606[_0x02c8('0x30')]=_['keys'](db[_0x02c8('0x4c')][_0x02c8('0x2d')]);_0x293606['query']=_[_0x02c8('0x32')](_0x1c5f43[_0x02c8('0x31')]);_0x293606['filters']=_['intersection'](_0x293606[_0x02c8('0x30')],_0x293606[_0x02c8('0x31')]);_0x48d870[_0x02c8('0x36')]=_[_0x02c8('0x34')](_0x293606['model'],qs['fields'](_0x1c5f43['query'][_0x02c8('0x35')]));_0x48d870[_0x02c8('0x36')]=_0x48d870[_0x02c8('0x36')]['length']?_0x48d870[_0x02c8('0x36')]:_0x293606['model'];_0x48d870[_0x02c8('0x38')]=qs[_0x02c8('0x39')](_0x1c5f43[_0x02c8('0x31')]['sort']);_0x48d870[_0x02c8('0x3c')]=qs[_0x02c8('0x33')](_[_0x02c8('0x3a')](_0x1c5f43[_0x02c8('0x31')],_0x293606[_0x02c8('0x33')]));if(_0x1c5f43[_0x02c8('0x31')][_0x02c8('0x3b')]){_0x48d870[_0x02c8('0x3c')]=_[_0x02c8('0x3d')](_0x48d870[_0x02c8('0x3c')],{'$or':_[_0x02c8('0x2c')](_0x48d870[_0x02c8('0x36')],function(_0x27827e){var _0x1a6157={};_0x1a6157[_0x27827e]={'$like':'%'+_0x1c5f43[_0x02c8('0x31')][_0x02c8('0x3b')]+'%'};return _0x1a6157;})});}_0x48d870=_['merge']({},_0x48d870,_0x1c5f43[_0x02c8('0x3e')]);return _0x18fa2c[_0x02c8('0x4e')](_0x48d870);}})[_0x02c8('0x24')](function(_0x137d04){if(_0x137d04){_0x4221b3=_0x137d04['length'];if(!_0x1c5f43[_0x02c8('0x31')][_0x02c8('0x4d')](_0x02c8('0x37'))){_0x48d870['limit']=qs['limit'](_0x1c5f43[_0x02c8('0x31')][_0x02c8('0x1e')]);_0x48d870[_0x02c8('0x1c')]=qs[_0x02c8('0x1c')](_0x1c5f43[_0x02c8('0x31')][_0x02c8('0x1c')]);}return _0x18fa2c[_0x02c8('0x4e')](_0x48d870);}})[_0x02c8('0x24')](function(_0x5db0b3){if(_0x5db0b3){return _0x5db0b3?{'count':_0x4221b3,'rows':_0x5db0b3}:null;}})[_0x02c8('0x24')](respondWithResult(_0x28786a,null))[_0x02c8('0x47')](handleError(_0x28786a,null));};exports[_0x02c8('0x4f')]=function(_0x3efc87,_0x1bb459,_0xfdf325){var _0x574b71={};var _0x2f371a={};var _0x1ff961;var _0x27d7b9;return db[_0x02c8('0x3f')][_0x02c8('0x4b')]({'where':{'id':_0x3efc87[_0x02c8('0x43')]['id']}})[_0x02c8('0x24')](handleEntityNotFound(_0x1bb459,null))['then'](function(_0x4c149b){if(_0x4c149b){_0x1ff961=_0x4c149b;_0x2f371a[_0x02c8('0x30')]=_[_0x02c8('0x32')](db[_0x02c8('0x4c')]['rawAttributes']);_0x2f371a[_0x02c8('0x31')]=_['keys'](_0x3efc87[_0x02c8('0x31')]);_0x2f371a[_0x02c8('0x33')]=_[_0x02c8('0x34')](_0x2f371a[_0x02c8('0x30')],_0x2f371a['query']);_0x574b71['attributes']=_[_0x02c8('0x34')](_0x2f371a[_0x02c8('0x30')],qs[_0x02c8('0x35')](_0x3efc87['query'][_0x02c8('0x35')]));_0x574b71[_0x02c8('0x36')]=_0x574b71[_0x02c8('0x36')][_0x02c8('0x44')]?_0x574b71[_0x02c8('0x36')]:_0x2f371a[_0x02c8('0x30')];_0x574b71['order']=qs[_0x02c8('0x39')](_0x3efc87['query'][_0x02c8('0x39')]);_0x574b71[_0x02c8('0x3c')]=qs[_0x02c8('0x33')](_[_0x02c8('0x3a')](_0x3efc87[_0x02c8('0x31')],_0x2f371a['filters']));if(_0x3efc87[_0x02c8('0x31')][_0x02c8('0x3b')]){_0x574b71[_0x02c8('0x3c')]=_[_0x02c8('0x3d')](_0x574b71[_0x02c8('0x3c')],{'$or':_[_0x02c8('0x2c')](_0x574b71[_0x02c8('0x36')],function(_0x4be9c9){var _0x21efa8={};_0x21efa8[_0x4be9c9]={'$like':'%'+_0x3efc87['query'][_0x02c8('0x3b')]+'%'};return _0x21efa8;})});}_0x574b71=_[_0x02c8('0x3d')]({},_0x574b71,_0x3efc87['options']);return _0x1ff961[_0x02c8('0x4f')](_0x574b71);}})['then'](function(_0x5bef8e){if(_0x5bef8e){_0x27d7b9=_0x5bef8e[_0x02c8('0x44')];if(!_0x3efc87[_0x02c8('0x31')][_0x02c8('0x4d')](_0x02c8('0x37'))){_0x574b71[_0x02c8('0x1e')]=qs[_0x02c8('0x1e')](_0x3efc87[_0x02c8('0x31')][_0x02c8('0x1e')]);_0x574b71[_0x02c8('0x1c')]=qs['offset'](_0x3efc87['query']['offset']);}return _0x1ff961[_0x02c8('0x4f')](_0x574b71);}})[_0x02c8('0x24')](function(_0x3e6f2b){if(_0x3e6f2b){return _0x3e6f2b?{'count':_0x27d7b9,'rows':_0x3e6f2b}:null;}})[_0x02c8('0x24')](respondWithResult(_0x1bb459,null))[_0x02c8('0x47')](handleError(_0x1bb459,null));}; \ No newline at end of file +var _0x1803=['FreshsalesConfiguration','rawAttributes','fieldName','type','key','model','map','keys','query','filters','intersection','attributes','fields','length','hasOwnProperty','nolimit','sort','where','merge','filter','options','count','include','findAll','rows','catch','show','includeAll','create','body','find','findOne','params','FreshsalesField','order','pick','getSubjects','getDescriptions','getFields','eml-format','zip-dir','fast-json-patch','request-promise','moment','bluebird','util','path','ejs','fs-extra','lodash','squel','crypto','jsforce','to-csv','ioredis','../../components/auth/service','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','../../config/environment','../../config/license/util','status','json','undefined','limit','offset','set','apply','save','update','destroy','then','end','sendStatus','error','stack','name','index'];(function(_0x2aa0e7,_0x4e5145){var _0x1472c0=function(_0x4deaeb){while(--_0x4deaeb){_0x2aa0e7['push'](_0x2aa0e7['shift']());}};_0x1472c0(++_0x4e5145);}(_0x1803,0x111));var _0x3180=function(_0x2333ac,_0x8920e6){_0x2333ac=_0x2333ac-0x0;var _0x458430=_0x1803[_0x2333ac];return _0x458430;};'use strict';var emlformat=require(_0x3180('0x0'));var rimraf=require('rimraf');var zipdir=require(_0x3180('0x1'));var jsonpatch=require(_0x3180('0x2'));var rp=require(_0x3180('0x3'));var moment=require(_0x3180('0x4'));var BPromise=require(_0x3180('0x5'));var Mustache=require('mustache');var util=require(_0x3180('0x6'));var path=require(_0x3180('0x7'));var sox=require('sox');var csv=require('to-csv');var ejs=require(_0x3180('0x8'));var fs=require('fs');var fs_extra=require(_0x3180('0x9'));var _=require(_0x3180('0xa'));var squel=require(_0x3180('0xb'));var crypto=require(_0x3180('0xc'));var jsforce=require(_0x3180('0xd'));var deskjs=require('desk.js');var toCsv=require(_0x3180('0xe'));var querystring=require('querystring');var Papa=require('papaparse');var Redis=require(_0x3180('0xf'));var authService=require(_0x3180('0x10'));var qs=require('../../components/parsers/qs');var as=require(_0x3180('0x11'));var hardwareService=require(_0x3180('0x12'));var logger=require(_0x3180('0x13'))('api');var utils=require('../../config/utils');var config=require(_0x3180('0x14'));var licenseUtil=require(_0x3180('0x15'));var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0x221909,_0x3232f3){_0x3232f3=_0x3232f3||0xcc;return function(_0x5a0892){if(_0x5a0892){return _0x221909['sendStatus'](_0x3232f3);}return _0x221909[_0x3180('0x16')](_0x3232f3)['end']();};}function respondWithResult(_0x3326e8,_0x349c54){_0x349c54=_0x349c54||0xc8;return function(_0x1844a6){if(_0x1844a6){return _0x3326e8[_0x3180('0x16')](_0x349c54)[_0x3180('0x17')](_0x1844a6);}};}function respondWithFilteredResult(_0x2bf29d,_0x10adc0){return function(_0x45e3ef){if(_0x45e3ef){var _0x9d5441=typeof _0x10adc0['offset']===_0x3180('0x18')&&typeof _0x10adc0[_0x3180('0x19')]==='undefined';var _0x150ecd=_0x45e3ef['count'];var _0x20739c=_0x9d5441?0x0:_0x10adc0[_0x3180('0x1a')];var _0x28045b=_0x9d5441?_0x45e3ef['count']:_0x10adc0[_0x3180('0x1a')]+_0x10adc0[_0x3180('0x19')];var _0x578e18;if(_0x28045b>=_0x150ecd){_0x28045b=_0x150ecd;_0x578e18=0xc8;}else{_0x578e18=0xce;}_0x2bf29d[_0x3180('0x16')](_0x578e18);return _0x2bf29d[_0x3180('0x1b')]('Content-Range',_0x20739c+'-'+_0x28045b+'/'+_0x150ecd)[_0x3180('0x17')](_0x45e3ef);}return null;};}function patchUpdates(_0x55b354){return function(_0x53a4d2){try{jsonpatch[_0x3180('0x1c')](_0x53a4d2,_0x55b354,!![]);}catch(_0x5d6abe){return BPromise['reject'](_0x5d6abe);}return _0x53a4d2[_0x3180('0x1d')]();};}function saveUpdates(_0x1d5551,_0x5b306d){return function(_0x294b94){if(_0x294b94){return _0x294b94[_0x3180('0x1e')](_0x1d5551)['then'](function(_0x21f2e6){return _0x21f2e6;});}return null;};}function removeEntity(_0x266286,_0x1d7e0d){return function(_0x4b4cec){if(_0x4b4cec){return _0x4b4cec[_0x3180('0x1f')]()[_0x3180('0x20')](function(){_0x266286[_0x3180('0x16')](0xcc)[_0x3180('0x21')]();});}};}function handleEntityNotFound(_0x4f341f,_0xfbb058){return function(_0x5eeb5c){if(!_0x5eeb5c){_0x4f341f[_0x3180('0x22')](0x194);}return _0x5eeb5c;};}function handleError(_0x4ee12c,_0x3e3182){_0x3e3182=_0x3e3182||0x1f4;return function(_0x1587c7){logger[_0x3180('0x23')](_0x1587c7[_0x3180('0x24')]);if(_0x1587c7[_0x3180('0x25')]){delete _0x1587c7[_0x3180('0x25')];}_0x4ee12c[_0x3180('0x16')](_0x3e3182)['send'](_0x1587c7);};}exports[_0x3180('0x26')]=function(_0x2925c9,_0x2278e1){var _0x51869b={},_0x1fe494={},_0x4ac21a={'count':0x0,'rows':[]};var _0x347b6b=_['map'](db[_0x3180('0x27')][_0x3180('0x28')],function(_0x5321af){return{'name':_0x5321af[_0x3180('0x29')],'type':_0x5321af[_0x3180('0x2a')][_0x3180('0x2b')]};});_0x1fe494[_0x3180('0x2c')]=_[_0x3180('0x2d')](_0x347b6b,'name');_0x1fe494['query']=_[_0x3180('0x2e')](_0x2925c9[_0x3180('0x2f')]);_0x1fe494[_0x3180('0x30')]=_[_0x3180('0x31')](_0x1fe494[_0x3180('0x2c')],_0x1fe494[_0x3180('0x2f')]);_0x51869b[_0x3180('0x32')]=_[_0x3180('0x31')](_0x1fe494[_0x3180('0x2c')],qs[_0x3180('0x33')](_0x2925c9[_0x3180('0x2f')]['fields']));_0x51869b[_0x3180('0x32')]=_0x51869b[_0x3180('0x32')][_0x3180('0x34')]?_0x51869b[_0x3180('0x32')]:_0x1fe494[_0x3180('0x2c')];if(!_0x2925c9[_0x3180('0x2f')][_0x3180('0x35')](_0x3180('0x36'))){_0x51869b['limit']=qs[_0x3180('0x19')](_0x2925c9[_0x3180('0x2f')][_0x3180('0x19')]);_0x51869b['offset']=qs['offset'](_0x2925c9[_0x3180('0x2f')][_0x3180('0x1a')]);}_0x51869b['order']=qs[_0x3180('0x37')](_0x2925c9[_0x3180('0x2f')][_0x3180('0x37')]);_0x51869b[_0x3180('0x38')]=qs['filters'](_['pick'](_0x2925c9[_0x3180('0x2f')],_0x1fe494['filters']),_0x347b6b);if(_0x2925c9[_0x3180('0x2f')]['filter']){_0x51869b[_0x3180('0x38')]=_[_0x3180('0x39')](_0x51869b[_0x3180('0x38')],{'$or':_['map'](_0x347b6b,function(_0x885c46){if(_0x885c46[_0x3180('0x2a')]!=='VIRTUAL'){var _0x2db919={};_0x2db919[_0x885c46[_0x3180('0x25')]]={'$like':'%'+_0x2925c9[_0x3180('0x2f')][_0x3180('0x3a')]+'%'};return _0x2db919;}})});}_0x51869b=_['merge']({},_0x51869b,_0x2925c9[_0x3180('0x3b')]);var _0xa59f46={'where':_0x51869b[_0x3180('0x38')]};return db[_0x3180('0x27')][_0x3180('0x3c')](_0xa59f46)[_0x3180('0x20')](function(_0x11eb6a){_0x4ac21a[_0x3180('0x3c')]=_0x11eb6a;if(_0x2925c9[_0x3180('0x2f')]['includeAll']){_0x51869b[_0x3180('0x3d')]=[{'all':!![]}];}return db[_0x3180('0x27')][_0x3180('0x3e')](_0x51869b);})[_0x3180('0x20')](function(_0x16da52){_0x4ac21a[_0x3180('0x3f')]=_0x16da52;return _0x4ac21a;})[_0x3180('0x20')](respondWithFilteredResult(_0x2278e1,_0x51869b))[_0x3180('0x40')](handleError(_0x2278e1,null));};exports[_0x3180('0x41')]=function(_0x3ba3bf,_0x438913){var _0x2f3e07={'raw':![],'where':{'id':_0x3ba3bf['params']['id']}},_0x699c26={};_0x699c26[_0x3180('0x2c')]=_[_0x3180('0x2e')](db['FreshsalesConfiguration'][_0x3180('0x28')]);_0x699c26['query']=_['keys'](_0x3ba3bf[_0x3180('0x2f')]);_0x699c26['filters']=_[_0x3180('0x31')](_0x699c26[_0x3180('0x2c')],_0x699c26[_0x3180('0x2f')]);_0x2f3e07['attributes']=_[_0x3180('0x31')](_0x699c26['model'],qs[_0x3180('0x33')](_0x3ba3bf[_0x3180('0x2f')][_0x3180('0x33')]));_0x2f3e07[_0x3180('0x32')]=_0x2f3e07[_0x3180('0x32')]['length']?_0x2f3e07[_0x3180('0x32')]:_0x699c26[_0x3180('0x2c')];if(_0x3ba3bf['query'][_0x3180('0x42')]){_0x2f3e07['include']=[{'all':!![]}];}_0x2f3e07=_['merge']({},_0x2f3e07,_0x3ba3bf[_0x3180('0x3b')]);return db[_0x3180('0x27')]['find'](_0x2f3e07)[_0x3180('0x20')](handleEntityNotFound(_0x438913,null))[_0x3180('0x20')](respondWithResult(_0x438913,null))[_0x3180('0x40')](handleError(_0x438913,null));};exports[_0x3180('0x43')]=function(_0x1e4a14,_0x35bb4f){return db[_0x3180('0x27')][_0x3180('0x43')](_0x1e4a14[_0x3180('0x44')],{})['then'](respondWithResult(_0x35bb4f,0xc9))[_0x3180('0x40')](handleError(_0x35bb4f,null));};exports[_0x3180('0x1e')]=function(_0x1554cd,_0x36db8c){if(_0x1554cd[_0x3180('0x44')]['id']){delete _0x1554cd[_0x3180('0x44')]['id'];}return db[_0x3180('0x27')][_0x3180('0x45')]({'where':{'id':_0x1554cd['params']['id']}})[_0x3180('0x20')](handleEntityNotFound(_0x36db8c,null))[_0x3180('0x20')](saveUpdates(_0x1554cd[_0x3180('0x44')],null))[_0x3180('0x20')](respondWithResult(_0x36db8c,null))[_0x3180('0x40')](handleError(_0x36db8c,null));};exports[_0x3180('0x1f')]=function(_0x5194cd,_0x1e1df1){return db[_0x3180('0x27')][_0x3180('0x45')]({'where':{'id':_0x5194cd['params']['id']}})['then'](handleEntityNotFound(_0x1e1df1,null))[_0x3180('0x20')](removeEntity(_0x1e1df1,null))[_0x3180('0x40')](handleError(_0x1e1df1,null));};exports['getSubjects']=function(_0x2f4c24,_0x252c14,_0x59bb35){var _0x1ec035={};var _0x436e48={};var _0x5d61d1;var _0x4c2332;return db[_0x3180('0x27')][_0x3180('0x46')]({'where':{'id':_0x2f4c24[_0x3180('0x47')]['id']}})[_0x3180('0x20')](handleEntityNotFound(_0x252c14,null))['then'](function(_0x3c8f9d){if(_0x3c8f9d){_0x5d61d1=_0x3c8f9d;_0x436e48['model']=_[_0x3180('0x2e')](db[_0x3180('0x48')]['rawAttributes']);_0x436e48[_0x3180('0x2f')]=_[_0x3180('0x2e')](_0x2f4c24[_0x3180('0x2f')]);_0x436e48[_0x3180('0x30')]=_[_0x3180('0x31')](_0x436e48['model'],_0x436e48[_0x3180('0x2f')]);_0x1ec035[_0x3180('0x32')]=_['intersection'](_0x436e48[_0x3180('0x2c')],qs[_0x3180('0x33')](_0x2f4c24['query'][_0x3180('0x33')]));_0x1ec035[_0x3180('0x32')]=_0x1ec035[_0x3180('0x32')]['length']?_0x1ec035[_0x3180('0x32')]:_0x436e48[_0x3180('0x2c')];_0x1ec035[_0x3180('0x49')]=qs[_0x3180('0x37')](_0x2f4c24['query']['sort']);_0x1ec035['where']=qs['filters'](_[_0x3180('0x4a')](_0x2f4c24[_0x3180('0x2f')],_0x436e48[_0x3180('0x30')]));if(_0x2f4c24[_0x3180('0x2f')][_0x3180('0x3a')]){_0x1ec035[_0x3180('0x38')]=_['merge'](_0x1ec035[_0x3180('0x38')],{'$or':_[_0x3180('0x2d')](_0x1ec035['attributes'],function(_0xe5047f){var _0x32059f={};_0x32059f[_0xe5047f]={'$like':'%'+_0x2f4c24['query'][_0x3180('0x3a')]+'%'};return _0x32059f;})});}_0x1ec035=_[_0x3180('0x39')]({},_0x1ec035,_0x2f4c24[_0x3180('0x3b')]);return _0x5d61d1[_0x3180('0x4b')](_0x1ec035);}})[_0x3180('0x20')](function(_0x33ea41){if(_0x33ea41){_0x4c2332=_0x33ea41[_0x3180('0x34')];if(!_0x2f4c24[_0x3180('0x2f')][_0x3180('0x35')](_0x3180('0x36'))){_0x1ec035[_0x3180('0x19')]=qs['limit'](_0x2f4c24['query'][_0x3180('0x19')]);_0x1ec035[_0x3180('0x1a')]=qs['offset'](_0x2f4c24[_0x3180('0x2f')]['offset']);}return _0x5d61d1[_0x3180('0x4b')](_0x1ec035);}})[_0x3180('0x20')](function(_0x484075){if(_0x484075){return _0x484075?{'count':_0x4c2332,'rows':_0x484075}:null;}})[_0x3180('0x20')](respondWithResult(_0x252c14,null))[_0x3180('0x40')](handleError(_0x252c14,null));};exports['getDescriptions']=function(_0x16d36b,_0x3e2686,_0x2ce844){var _0x5140dd={};var _0x5cf03d={};var _0x2a2017;var _0x2b16e8;return db[_0x3180('0x27')][_0x3180('0x46')]({'where':{'id':_0x16d36b[_0x3180('0x47')]['id']}})[_0x3180('0x20')](handleEntityNotFound(_0x3e2686,null))[_0x3180('0x20')](function(_0x5ea052){if(_0x5ea052){_0x2a2017=_0x5ea052;_0x5cf03d['model']=_[_0x3180('0x2e')](db[_0x3180('0x48')][_0x3180('0x28')]);_0x5cf03d['query']=_[_0x3180('0x2e')](_0x16d36b[_0x3180('0x2f')]);_0x5cf03d['filters']=_[_0x3180('0x31')](_0x5cf03d[_0x3180('0x2c')],_0x5cf03d[_0x3180('0x2f')]);_0x5140dd[_0x3180('0x32')]=_[_0x3180('0x31')](_0x5cf03d[_0x3180('0x2c')],qs[_0x3180('0x33')](_0x16d36b['query'][_0x3180('0x33')]));_0x5140dd['attributes']=_0x5140dd[_0x3180('0x32')][_0x3180('0x34')]?_0x5140dd['attributes']:_0x5cf03d['model'];_0x5140dd[_0x3180('0x49')]=qs['sort'](_0x16d36b['query'][_0x3180('0x37')]);_0x5140dd[_0x3180('0x38')]=qs[_0x3180('0x30')](_[_0x3180('0x4a')](_0x16d36b['query'],_0x5cf03d[_0x3180('0x30')]));if(_0x16d36b[_0x3180('0x2f')]['filter']){_0x5140dd[_0x3180('0x38')]=_[_0x3180('0x39')](_0x5140dd[_0x3180('0x38')],{'$or':_[_0x3180('0x2d')](_0x5140dd[_0x3180('0x32')],function(_0x1c41b3){var _0x5a8826={};_0x5a8826[_0x1c41b3]={'$like':'%'+_0x16d36b[_0x3180('0x2f')][_0x3180('0x3a')]+'%'};return _0x5a8826;})});}_0x5140dd=_[_0x3180('0x39')]({},_0x5140dd,_0x16d36b[_0x3180('0x3b')]);return _0x2a2017[_0x3180('0x4c')](_0x5140dd);}})[_0x3180('0x20')](function(_0x4dd7f8){if(_0x4dd7f8){_0x2b16e8=_0x4dd7f8[_0x3180('0x34')];if(!_0x16d36b[_0x3180('0x2f')][_0x3180('0x35')]('nolimit')){_0x5140dd[_0x3180('0x19')]=qs[_0x3180('0x19')](_0x16d36b['query'][_0x3180('0x19')]);_0x5140dd[_0x3180('0x1a')]=qs[_0x3180('0x1a')](_0x16d36b[_0x3180('0x2f')]['offset']);}return _0x2a2017[_0x3180('0x4c')](_0x5140dd);}})[_0x3180('0x20')](function(_0x53fdaa){if(_0x53fdaa){return _0x53fdaa?{'count':_0x2b16e8,'rows':_0x53fdaa}:null;}})[_0x3180('0x20')](respondWithResult(_0x3e2686,null))[_0x3180('0x40')](handleError(_0x3e2686,null));};exports[_0x3180('0x4d')]=function(_0x411564,_0x301638,_0x2b6a98){var _0xe1212d={};var _0x396535={};var _0x5aa9e6;var _0x5ecbd9;return db[_0x3180('0x27')][_0x3180('0x46')]({'where':{'id':_0x411564[_0x3180('0x47')]['id']}})[_0x3180('0x20')](handleEntityNotFound(_0x301638,null))[_0x3180('0x20')](function(_0x1d5567){if(_0x1d5567){_0x5aa9e6=_0x1d5567;_0x396535[_0x3180('0x2c')]=_[_0x3180('0x2e')](db[_0x3180('0x48')]['rawAttributes']);_0x396535[_0x3180('0x2f')]=_[_0x3180('0x2e')](_0x411564[_0x3180('0x2f')]);_0x396535[_0x3180('0x30')]=_[_0x3180('0x31')](_0x396535[_0x3180('0x2c')],_0x396535[_0x3180('0x2f')]);_0xe1212d[_0x3180('0x32')]=_[_0x3180('0x31')](_0x396535[_0x3180('0x2c')],qs[_0x3180('0x33')](_0x411564[_0x3180('0x2f')]['fields']));_0xe1212d[_0x3180('0x32')]=_0xe1212d[_0x3180('0x32')]['length']?_0xe1212d[_0x3180('0x32')]:_0x396535[_0x3180('0x2c')];_0xe1212d[_0x3180('0x49')]=qs[_0x3180('0x37')](_0x411564['query'][_0x3180('0x37')]);_0xe1212d[_0x3180('0x38')]=qs[_0x3180('0x30')](_[_0x3180('0x4a')](_0x411564[_0x3180('0x2f')],_0x396535['filters']));if(_0x411564[_0x3180('0x2f')][_0x3180('0x3a')]){_0xe1212d[_0x3180('0x38')]=_[_0x3180('0x39')](_0xe1212d['where'],{'$or':_['map'](_0xe1212d[_0x3180('0x32')],function(_0xfc7fe0){var _0x33d8a9={};_0x33d8a9[_0xfc7fe0]={'$like':'%'+_0x411564[_0x3180('0x2f')][_0x3180('0x3a')]+'%'};return _0x33d8a9;})});}_0xe1212d=_[_0x3180('0x39')]({},_0xe1212d,_0x411564['options']);return _0x5aa9e6[_0x3180('0x4d')](_0xe1212d);}})[_0x3180('0x20')](function(_0x5de032){if(_0x5de032){_0x5ecbd9=_0x5de032[_0x3180('0x34')];if(!_0x411564[_0x3180('0x2f')]['hasOwnProperty']('nolimit')){_0xe1212d['limit']=qs['limit'](_0x411564[_0x3180('0x2f')][_0x3180('0x19')]);_0xe1212d[_0x3180('0x1a')]=qs[_0x3180('0x1a')](_0x411564[_0x3180('0x2f')]['offset']);}return _0x5aa9e6['getFields'](_0xe1212d);}})['then'](function(_0x1a324d){if(_0x1a324d){return _0x1a324d?{'count':_0x5ecbd9,'rows':_0x1a324d}:null;}})['then'](respondWithResult(_0x301638,null))[_0x3180('0x40')](handleError(_0x301638,null));}; \ No newline at end of file diff --git a/server/api/intFreshsalesConfiguration/intFreshsalesConfiguration.model.js b/server/api/intFreshsalesConfiguration/intFreshsalesConfiguration.model.js index a09f96e..b83a003 100644 --- a/server/api/intFreshsalesConfiguration/intFreshsalesConfiguration.model.js +++ b/server/api/intFreshsalesConfiguration/intFreshsalesConfiguration.model.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x87e3=['util','../../config/logger','api','moment','request-promise','rimraf','./intFreshsalesConfiguration.attributes','exports','int_freshsales_configurations','lodash'];(function(_0x40e18a,_0x2989a8){var _0x3aef1d=function(_0x1f9aaa){while(--_0x1f9aaa){_0x40e18a['push'](_0x40e18a['shift']());}};_0x3aef1d(++_0x2989a8);}(_0x87e3,0x77));var _0x387e=function(_0x5e36d1,_0x471178){_0x5e36d1=_0x5e36d1-0x0;var _0x950b9e=_0x87e3[_0x5e36d1];return _0x950b9e;};'use strict';var _=require(_0x387e('0x0'));var util=require(_0x387e('0x1'));var logger=require(_0x387e('0x2'))(_0x387e('0x3'));var moment=require(_0x387e('0x4'));var BPromise=require('bluebird');var rp=require(_0x387e('0x5'));var fs=require('fs');var path=require('path');var rimraf=require(_0x387e('0x6'));var config=require('../../config/environment');var attributes=require(_0x387e('0x7'));module[_0x387e('0x8')]=function(_0x4d66bb,_0x513d5c){return _0x4d66bb['define']('FreshsalesConfiguration',attributes,{'tableName':_0x387e('0x9'),'paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file +var _0x0aaf=['./intFreshsalesConfiguration.attributes','exports','define','FreshsalesConfiguration','int_freshsales_configurations','lodash','util','api','moment','bluebird','path','../../config/environment'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0x0aaf,0x155));var _0xf0aa=function(_0x1d2195,_0x4b8096){_0x1d2195=_0x1d2195-0x0;var _0x4962cd=_0x0aaf[_0x1d2195];return _0x4962cd;};'use strict';var _=require(_0xf0aa('0x0'));var util=require(_0xf0aa('0x1'));var logger=require('../../config/logger')(_0xf0aa('0x2'));var moment=require(_0xf0aa('0x3'));var BPromise=require(_0xf0aa('0x4'));var rp=require('request-promise');var fs=require('fs');var path=require(_0xf0aa('0x5'));var rimraf=require('rimraf');var config=require(_0xf0aa('0x6'));var attributes=require(_0xf0aa('0x7'));module[_0xf0aa('0x8')]=function(_0x5493f9,_0x59315a){return _0x5493f9[_0xf0aa('0x9')](_0xf0aa('0xa'),attributes,{'tableName':_0xf0aa('0xb'),'paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file diff --git a/server/api/intFreshsalesConfiguration/intFreshsalesConfiguration.rpc.js b/server/api/intFreshsalesConfiguration/intFreshsalesConfiguration.rpc.js index 40a3837..1168859 100644 --- a/server/api/intFreshsalesConfiguration/intFreshsalesConfiguration.rpc.js +++ b/server/api/intFreshsalesConfiguration/intFreshsalesConfiguration.rpc.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x3b02=['then','FreshsalesConfiguration,\x20%s,\x20%s','debug','FreshsalesConfiguration,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','code','message','info','result','catch','util','moment','bluebird','randomstring','../../mysqldb','../../config/utils','../../config/logger','rpc','jayson/promise','client','http'];(function(_0x20a584,_0xe384a5){var _0x4b41a8=function(_0x2127c6){while(--_0x2127c6){_0x20a584['push'](_0x20a584['shift']());}};_0x4b41a8(++_0xe384a5);}(_0x3b02,0x7f));var _0x23b0=function(_0x49ca18,_0x5e6d05){_0x49ca18=_0x49ca18-0x0;var _0x145d54=_0x3b02[_0x49ca18];return _0x145d54;};'use strict';var _=require('lodash');var util=require(_0x23b0('0x0'));var moment=require(_0x23b0('0x1'));var BPromise=require(_0x23b0('0x2'));var rs=require(_0x23b0('0x3'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0x23b0('0x4'))['db'];var utils=require(_0x23b0('0x5'));var logger=require(_0x23b0('0x6'))(_0x23b0('0x7'));var config=require('../../config/environment');var jayson=require(_0x23b0('0x8'));var client=jayson[_0x23b0('0x9')][_0x23b0('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x40b4a8,_0x1d4aa5,_0x37c74f){return new BPromise(function(_0x4eb55f,_0x6c0d11){return client['request'](_0x40b4a8,_0x37c74f)[_0x23b0('0xb')](function(_0x43cf04){logger['info'](_0x23b0('0xc'),_0x1d4aa5,'request\x20sent');logger[_0x23b0('0xd')](_0x23b0('0xe'),_0x1d4aa5,_0x23b0('0xf'),JSON[_0x23b0('0x10')](_0x43cf04));if(_0x43cf04[_0x23b0('0x11')]){if(_0x43cf04[_0x23b0('0x11')][_0x23b0('0x12')]===0x1f4){logger[_0x23b0('0x11')](_0x23b0('0xc'),_0x1d4aa5,_0x43cf04[_0x23b0('0x11')][_0x23b0('0x13')]);return _0x6c0d11(_0x43cf04[_0x23b0('0x11')][_0x23b0('0x13')]);}logger['error']('FreshsalesConfiguration,\x20%s,\x20%s',_0x1d4aa5,_0x43cf04[_0x23b0('0x11')][_0x23b0('0x13')]);return _0x4eb55f(_0x43cf04[_0x23b0('0x11')][_0x23b0('0x13')]);}else{logger[_0x23b0('0x14')](_0x23b0('0xc'),_0x1d4aa5,_0x23b0('0xf'));_0x4eb55f(_0x43cf04[_0x23b0('0x15')][_0x23b0('0x13')]);}})[_0x23b0('0x16')](function(_0x13b60b){logger[_0x23b0('0x11')](_0x23b0('0xc'),_0x1d4aa5,_0x13b60b);_0x6c0d11(_0x13b60b);});});} \ No newline at end of file +var _0xf7e7=['message','catch','util','moment','randomstring','ioredis','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','request','then','info','FreshsalesConfiguration,\x20%s,\x20%s','request\x20sent','stringify','error','code'];(function(_0x342baa,_0x4a110f){var _0x1208f3=function(_0x56a645){while(--_0x56a645){_0x342baa['push'](_0x342baa['shift']());}};_0x1208f3(++_0x4a110f);}(_0xf7e7,0x1d0));var _0x7f7e=function(_0x247364,_0x1b8168){_0x247364=_0x247364-0x0;var _0x4a720e=_0xf7e7[_0x247364];return _0x4a720e;};'use strict';var _=require('lodash');var util=require(_0x7f7e('0x0'));var moment=require(_0x7f7e('0x1'));var BPromise=require('bluebird');var rs=require(_0x7f7e('0x2'));var fs=require('fs');var Redis=require(_0x7f7e('0x3'));var db=require('../../mysqldb')['db'];var utils=require(_0x7f7e('0x4'));var logger=require(_0x7f7e('0x5'))(_0x7f7e('0x6'));var config=require(_0x7f7e('0x7'));var jayson=require(_0x7f7e('0x8'));var client=jayson[_0x7f7e('0x9')][_0x7f7e('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x131245,_0x11f4fb,_0x54674a){return new BPromise(function(_0x45f09f,_0x4e0f11){return client[_0x7f7e('0xb')](_0x131245,_0x54674a)[_0x7f7e('0xc')](function(_0x3f4386){logger[_0x7f7e('0xd')](_0x7f7e('0xe'),_0x11f4fb,'request\x20sent');logger['debug']('FreshsalesConfiguration,\x20%s,\x20%s,\x20%s',_0x11f4fb,_0x7f7e('0xf'),JSON[_0x7f7e('0x10')](_0x3f4386));if(_0x3f4386[_0x7f7e('0x11')]){if(_0x3f4386[_0x7f7e('0x11')][_0x7f7e('0x12')]===0x1f4){logger[_0x7f7e('0x11')](_0x7f7e('0xe'),_0x11f4fb,_0x3f4386['error'][_0x7f7e('0x13')]);return _0x4e0f11(_0x3f4386[_0x7f7e('0x11')][_0x7f7e('0x13')]);}logger[_0x7f7e('0x11')]('FreshsalesConfiguration,\x20%s,\x20%s',_0x11f4fb,_0x3f4386[_0x7f7e('0x11')][_0x7f7e('0x13')]);return _0x45f09f(_0x3f4386[_0x7f7e('0x11')][_0x7f7e('0x13')]);}else{logger[_0x7f7e('0xd')]('FreshsalesConfiguration,\x20%s,\x20%s',_0x11f4fb,_0x7f7e('0xf'));_0x45f09f(_0x3f4386['result'][_0x7f7e('0x13')]);}})[_0x7f7e('0x14')](function(_0x1d180d){logger['error'](_0x7f7e('0xe'),_0x11f4fb,_0x1d180d);_0x4e0f11(_0x1d180d);});});} \ No newline at end of file diff --git a/server/api/intFreshsalesField/index.js b/server/api/intFreshsalesField/index.js index d1e0631..7065211 100644 --- a/server/api/intFreshsalesField/index.js +++ b/server/api/intFreshsalesField/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xf46a=['update','delete','destroy','exports','multer','path','connect-timeout','Router','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','./intFreshsalesField.controller','get','isAuthenticated','index','/:id','show','post','create'];(function(_0x12d6c2,_0x409bc8){var _0x1c9825=function(_0x569f66){while(--_0x569f66){_0x12d6c2['push'](_0x12d6c2['shift']());}};_0x1c9825(++_0x409bc8);}(_0xf46a,0xa4));var _0xaf46=function(_0x3935a6,_0xd9e888){_0x3935a6=_0x3935a6-0x0;var _0x3e7faa=_0xf46a[_0x3935a6];return _0x3e7faa;};'use strict';var multer=require(_0xaf46('0x0'));var util=require('util');var path=require(_0xaf46('0x1'));var timeout=require(_0xaf46('0x2'));var express=require('express');var router=express[_0xaf46('0x3')]();var fs_extra=require(_0xaf46('0x4'));var auth=require(_0xaf46('0x5'));var interaction=require(_0xaf46('0x6'));var config=require(_0xaf46('0x7'));var controller=require(_0xaf46('0x8'));router[_0xaf46('0x9')]('/',auth[_0xaf46('0xa')](),controller[_0xaf46('0xb')]);router[_0xaf46('0x9')](_0xaf46('0xc'),auth[_0xaf46('0xa')](),controller[_0xaf46('0xd')]);router[_0xaf46('0xe')]('/',auth['isAuthenticated'](),controller[_0xaf46('0xf')]);router['put']('/:id',auth['isAuthenticated'](),controller[_0xaf46('0x10')]);router[_0xaf46('0x11')]('/:id',auth[_0xaf46('0xa')](),controller[_0xaf46('0x12')]);module[_0xaf46('0x13')]=router; \ No newline at end of file +var _0xd49c=['../../components/interaction/service','./intFreshsalesField.controller','get','isAuthenticated','index','/:id','show','post','create','update','delete','destroy','exports','util','connect-timeout','express','fs-extra'];(function(_0x20ea89,_0x1bfce6){var _0x1f06a8=function(_0xc541ce){while(--_0xc541ce){_0x20ea89['push'](_0x20ea89['shift']());}};_0x1f06a8(++_0x1bfce6);}(_0xd49c,0x1d8));var _0xcd49=function(_0x131c55,_0x29ecdd){_0x131c55=_0x131c55-0x0;var _0x444320=_0xd49c[_0x131c55];return _0x444320;};'use strict';var multer=require('multer');var util=require(_0xcd49('0x0'));var path=require('path');var timeout=require(_0xcd49('0x1'));var express=require(_0xcd49('0x2'));var router=express['Router']();var fs_extra=require(_0xcd49('0x3'));var auth=require('../../components/auth/service');var interaction=require(_0xcd49('0x4'));var config=require('../../config/environment');var controller=require(_0xcd49('0x5'));router[_0xcd49('0x6')]('/',auth[_0xcd49('0x7')](),controller[_0xcd49('0x8')]);router[_0xcd49('0x6')](_0xcd49('0x9'),auth[_0xcd49('0x7')](),controller[_0xcd49('0xa')]);router[_0xcd49('0xb')]('/',auth[_0xcd49('0x7')](),controller[_0xcd49('0xc')]);router['put'](_0xcd49('0x9'),auth[_0xcd49('0x7')](),controller[_0xcd49('0xd')]);router[_0xcd49('0xe')](_0xcd49('0x9'),auth[_0xcd49('0x7')](),controller[_0xcd49('0xf')]);module[_0xcd49('0x10')]=router; \ No newline at end of file diff --git a/server/api/intFreshsalesField/intFreshsalesField.attributes.js b/server/api/intFreshsalesField/intFreshsalesField.attributes.js index f942add..bacaef2 100644 --- a/server/api/intFreshsalesField/intFreshsalesField.attributes.js +++ b/server/api/intFreshsalesField/intFreshsalesField.attributes.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xe453=['keyValue','picklist','STRING','BOOLEAN','sequelize','exports','ENUM','string','variable'];(function(_0x250a6e,_0x47add5){var _0x198fa4=function(_0xf5e4af){while(--_0xf5e4af){_0x250a6e['push'](_0x250a6e['shift']());}};_0x198fa4(++_0x47add5);}(_0xe453,0x9d));var _0x3e45=function(_0x178e48,_0x3c9509){_0x178e48=_0x178e48-0x0;var _0x440d7e=_0xe453[_0x178e48];return _0x440d7e;};'use strict';var Sequelize=require(_0x3e45('0x0'));module[_0x3e45('0x1')]={'type':{'type':Sequelize[_0x3e45('0x2')](_0x3e45('0x3'),_0x3e45('0x4'),'customVariable',_0x3e45('0x5'),_0x3e45('0x6')),'defaultValue':'string'},'content':{'type':Sequelize['STRING']},'key':{'type':Sequelize['STRING']},'keyType':{'type':Sequelize[_0x3e45('0x2')](_0x3e45('0x3'),'variable','customVariable')},'keyContent':{'type':Sequelize[_0x3e45('0x7')]},'idField':{'type':Sequelize[_0x3e45('0x7')]},'nameField':{'type':Sequelize[_0x3e45('0x7')]},'customField':{'type':Sequelize[_0x3e45('0x8')],'defaultValue':!![]},'variableName':{'type':Sequelize[_0x3e45('0x7')]}}; \ No newline at end of file +var _0x6ec4=['keyValue','STRING','variable','BOOLEAN','sequelize','ENUM','string','customVariable'];(function(_0x1beef3,_0x57c4b8){var _0x5af964=function(_0x36f463){while(--_0x36f463){_0x1beef3['push'](_0x1beef3['shift']());}};_0x5af964(++_0x57c4b8);}(_0x6ec4,0x194));var _0x46ec=function(_0x253ac6,_0x2c4e61){_0x253ac6=_0x253ac6-0x0;var _0x53c386=_0x6ec4[_0x253ac6];return _0x53c386;};'use strict';var Sequelize=require(_0x46ec('0x0'));module['exports']={'type':{'type':Sequelize[_0x46ec('0x1')](_0x46ec('0x2'),'variable',_0x46ec('0x3'),_0x46ec('0x4'),'picklist'),'defaultValue':_0x46ec('0x2')},'content':{'type':Sequelize[_0x46ec('0x5')]},'key':{'type':Sequelize[_0x46ec('0x5')]},'keyType':{'type':Sequelize['ENUM']('string',_0x46ec('0x6'),_0x46ec('0x3'))},'keyContent':{'type':Sequelize[_0x46ec('0x5')]},'idField':{'type':Sequelize['STRING']},'nameField':{'type':Sequelize[_0x46ec('0x5')]},'customField':{'type':Sequelize[_0x46ec('0x7')],'defaultValue':!![]},'variableName':{'type':Sequelize[_0x46ec('0x5')]}}; \ No newline at end of file diff --git a/server/api/intFreshsalesField/intFreshsalesField.controller.js b/server/api/intFreshsalesField/intFreshsalesField.controller.js index 110f609..e4ed136 100644 --- a/server/api/intFreshsalesField/intFreshsalesField.controller.js +++ b/server/api/intFreshsalesField/intFreshsalesField.controller.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x91ef=['catch','params','find','create','body','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','util','path','sox','ejs','fs-extra','lodash','squel','crypto','jsforce','desk.js','to-csv','querystring','ioredis','../../components/auth/service','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../mysqldb','sendStatus','status','json','offset','limit','count','set','Content-Range','apply','save','update','then','destroy','end','error','stack','name','index','map','FreshsalesField','rawAttributes','fieldName','type','key','model','query','keys','filters','intersection','attributes','fields','length','hasOwnProperty','order','sort','where','pick','filter','merge','VIRTUAL','options','includeAll','include','findAll','rows'];(function(_0x35ef6b,_0x202c42){var _0x3ad145=function(_0x3092de){while(--_0x3092de){_0x35ef6b['push'](_0x35ef6b['shift']());}};_0x3ad145(++_0x202c42);}(_0x91ef,0x18b));var _0xf91e=function(_0x1fa759,_0x4ecdce){_0x1fa759=_0x1fa759-0x0;var _0x2da9f4=_0x91ef[_0x1fa759];return _0x2da9f4;};'use strict';var emlformat=require(_0xf91e('0x0'));var rimraf=require(_0xf91e('0x1'));var zipdir=require(_0xf91e('0x2'));var jsonpatch=require(_0xf91e('0x3'));var rp=require(_0xf91e('0x4'));var moment=require(_0xf91e('0x5'));var BPromise=require(_0xf91e('0x6'));var Mustache=require(_0xf91e('0x7'));var util=require(_0xf91e('0x8'));var path=require(_0xf91e('0x9'));var sox=require(_0xf91e('0xa'));var csv=require('to-csv');var ejs=require(_0xf91e('0xb'));var fs=require('fs');var fs_extra=require(_0xf91e('0xc'));var _=require(_0xf91e('0xd'));var squel=require(_0xf91e('0xe'));var crypto=require(_0xf91e('0xf'));var jsforce=require(_0xf91e('0x10'));var deskjs=require(_0xf91e('0x11'));var toCsv=require(_0xf91e('0x12'));var querystring=require(_0xf91e('0x13'));var Papa=require('papaparse');var Redis=require(_0xf91e('0x14'));var authService=require(_0xf91e('0x15'));var qs=require('../../components/parsers/qs');var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0xf91e('0x16'));var logger=require(_0xf91e('0x17'))(_0xf91e('0x18'));var utils=require(_0xf91e('0x19'));var config=require(_0xf91e('0x1a'));var licenseUtil=require('../../config/license/util');var db=require(_0xf91e('0x1b'))['db'];function respondWithStatusCode(_0x1a72f7,_0xa6cb62){_0xa6cb62=_0xa6cb62||0xcc;return function(_0x196078){if(_0x196078){return _0x1a72f7[_0xf91e('0x1c')](_0xa6cb62);}return _0x1a72f7['status'](_0xa6cb62)['end']();};}function respondWithResult(_0x14cb48,_0x273360){_0x273360=_0x273360||0xc8;return function(_0x2357b6){if(_0x2357b6){return _0x14cb48[_0xf91e('0x1d')](_0x273360)[_0xf91e('0x1e')](_0x2357b6);}};}function respondWithFilteredResult(_0x19352e,_0x551411){return function(_0x5b377d){if(_0x5b377d){var _0x4efe70=typeof _0x551411[_0xf91e('0x1f')]==='undefined'&&typeof _0x551411[_0xf91e('0x20')]==='undefined';var _0xe04345=_0x5b377d[_0xf91e('0x21')];var _0x5553f8=_0x4efe70?0x0:_0x551411[_0xf91e('0x1f')];var _0x26d8ec=_0x4efe70?_0x5b377d[_0xf91e('0x21')]:_0x551411['offset']+_0x551411[_0xf91e('0x20')];var _0x4f401d;if(_0x26d8ec>=_0xe04345){_0x26d8ec=_0xe04345;_0x4f401d=0xc8;}else{_0x4f401d=0xce;}_0x19352e[_0xf91e('0x1d')](_0x4f401d);return _0x19352e[_0xf91e('0x22')](_0xf91e('0x23'),_0x5553f8+'-'+_0x26d8ec+'/'+_0xe04345)[_0xf91e('0x1e')](_0x5b377d);}return null;};}function patchUpdates(_0x51f134){return function(_0x32532d){try{jsonpatch[_0xf91e('0x24')](_0x32532d,_0x51f134,!![]);}catch(_0x127a79){return BPromise['reject'](_0x127a79);}return _0x32532d[_0xf91e('0x25')]();};}function saveUpdates(_0xa48a4e,_0xf29cda){return function(_0x4f8712){if(_0x4f8712){return _0x4f8712[_0xf91e('0x26')](_0xa48a4e)[_0xf91e('0x27')](function(_0x4ec956){return _0x4ec956;});}return null;};}function removeEntity(_0x436b9f,_0x31bb5e){return function(_0x4e5cd0){if(_0x4e5cd0){return _0x4e5cd0[_0xf91e('0x28')]()['then'](function(){_0x436b9f[_0xf91e('0x1d')](0xcc)[_0xf91e('0x29')]();});}};}function handleEntityNotFound(_0x244cce,_0x322bae){return function(_0xa2050d){if(!_0xa2050d){_0x244cce[_0xf91e('0x1c')](0x194);}return _0xa2050d;};}function handleError(_0x5ed838,_0x170313){_0x170313=_0x170313||0x1f4;return function(_0x4e1458){logger[_0xf91e('0x2a')](_0x4e1458[_0xf91e('0x2b')]);if(_0x4e1458['name']){delete _0x4e1458[_0xf91e('0x2c')];}_0x5ed838[_0xf91e('0x1d')](_0x170313)['send'](_0x4e1458);};}exports[_0xf91e('0x2d')]=function(_0x280f59,_0xd708b2){var _0x4ec277={},_0x4c60c6={},_0x2e1016={'count':0x0,'rows':[]};var _0x427a07=_[_0xf91e('0x2e')](db[_0xf91e('0x2f')][_0xf91e('0x30')],function(_0xf272e6){return{'name':_0xf272e6[_0xf91e('0x31')],'type':_0xf272e6[_0xf91e('0x32')][_0xf91e('0x33')]};});_0x4c60c6[_0xf91e('0x34')]=_['map'](_0x427a07,_0xf91e('0x2c'));_0x4c60c6[_0xf91e('0x35')]=_[_0xf91e('0x36')](_0x280f59[_0xf91e('0x35')]);_0x4c60c6[_0xf91e('0x37')]=_[_0xf91e('0x38')](_0x4c60c6[_0xf91e('0x34')],_0x4c60c6[_0xf91e('0x35')]);_0x4ec277[_0xf91e('0x39')]=_[_0xf91e('0x38')](_0x4c60c6[_0xf91e('0x34')],qs[_0xf91e('0x3a')](_0x280f59[_0xf91e('0x35')][_0xf91e('0x3a')]));_0x4ec277['attributes']=_0x4ec277[_0xf91e('0x39')][_0xf91e('0x3b')]?_0x4ec277[_0xf91e('0x39')]:_0x4c60c6['model'];if(!_0x280f59[_0xf91e('0x35')][_0xf91e('0x3c')]('nolimit')){_0x4ec277[_0xf91e('0x20')]=qs[_0xf91e('0x20')](_0x280f59[_0xf91e('0x35')][_0xf91e('0x20')]);_0x4ec277[_0xf91e('0x1f')]=qs[_0xf91e('0x1f')](_0x280f59[_0xf91e('0x35')][_0xf91e('0x1f')]);}_0x4ec277[_0xf91e('0x3d')]=qs[_0xf91e('0x3e')](_0x280f59['query'][_0xf91e('0x3e')]);_0x4ec277[_0xf91e('0x3f')]=qs[_0xf91e('0x37')](_[_0xf91e('0x40')](_0x280f59[_0xf91e('0x35')],_0x4c60c6[_0xf91e('0x37')]),_0x427a07);if(_0x280f59[_0xf91e('0x35')][_0xf91e('0x41')]){_0x4ec277[_0xf91e('0x3f')]=_[_0xf91e('0x42')](_0x4ec277[_0xf91e('0x3f')],{'$or':_['map'](_0x427a07,function(_0x31fd4e){if(_0x31fd4e[_0xf91e('0x32')]!==_0xf91e('0x43')){var _0x113302={};_0x113302[_0x31fd4e['name']]={'$like':'%'+_0x280f59[_0xf91e('0x35')][_0xf91e('0x41')]+'%'};return _0x113302;}})});}_0x4ec277=_[_0xf91e('0x42')]({},_0x4ec277,_0x280f59[_0xf91e('0x44')]);var _0x57c549={'where':_0x4ec277[_0xf91e('0x3f')]};return db[_0xf91e('0x2f')][_0xf91e('0x21')](_0x57c549)['then'](function(_0x16b5da){_0x2e1016['count']=_0x16b5da;if(_0x280f59[_0xf91e('0x35')][_0xf91e('0x45')]){_0x4ec277[_0xf91e('0x46')]=[{'all':!![]}];}return db[_0xf91e('0x2f')][_0xf91e('0x47')](_0x4ec277);})['then'](function(_0x11c918){_0x2e1016[_0xf91e('0x48')]=_0x11c918;return _0x2e1016;})[_0xf91e('0x27')](respondWithFilteredResult(_0xd708b2,_0x4ec277))[_0xf91e('0x49')](handleError(_0xd708b2,null));};exports['show']=function(_0x30366e,_0x14a4e5){var _0x5194e5={'raw':!![],'where':{'id':_0x30366e[_0xf91e('0x4a')]['id']}},_0x4eb813={};_0x4eb813[_0xf91e('0x34')]=_['keys'](db[_0xf91e('0x2f')][_0xf91e('0x30')]);_0x4eb813[_0xf91e('0x35')]=_[_0xf91e('0x36')](_0x30366e[_0xf91e('0x35')]);_0x4eb813[_0xf91e('0x37')]=_[_0xf91e('0x38')](_0x4eb813[_0xf91e('0x34')],_0x4eb813[_0xf91e('0x35')]);_0x5194e5[_0xf91e('0x39')]=_['intersection'](_0x4eb813[_0xf91e('0x34')],qs[_0xf91e('0x3a')](_0x30366e[_0xf91e('0x35')][_0xf91e('0x3a')]));_0x5194e5[_0xf91e('0x39')]=_0x5194e5['attributes'][_0xf91e('0x3b')]?_0x5194e5[_0xf91e('0x39')]:_0x4eb813[_0xf91e('0x34')];if(_0x30366e[_0xf91e('0x35')][_0xf91e('0x45')]){_0x5194e5[_0xf91e('0x46')]=[{'all':!![]}];}_0x5194e5=_[_0xf91e('0x42')]({},_0x5194e5,_0x30366e[_0xf91e('0x44')]);return db['FreshsalesField'][_0xf91e('0x4b')](_0x5194e5)[_0xf91e('0x27')](handleEntityNotFound(_0x14a4e5,null))['then'](respondWithResult(_0x14a4e5,null))[_0xf91e('0x49')](handleError(_0x14a4e5,null));};exports[_0xf91e('0x4c')]=function(_0x23e8c8,_0x3203ab){return db[_0xf91e('0x2f')]['create'](_0x23e8c8[_0xf91e('0x4d')],{})[_0xf91e('0x27')](respondWithResult(_0x3203ab,0xc9))[_0xf91e('0x49')](handleError(_0x3203ab,null));};exports[_0xf91e('0x26')]=function(_0x44d49d,_0x31cbb1){if(_0x44d49d[_0xf91e('0x4d')]['id']){delete _0x44d49d[_0xf91e('0x4d')]['id'];}return db[_0xf91e('0x2f')]['find']({'where':{'id':_0x44d49d[_0xf91e('0x4a')]['id']}})[_0xf91e('0x27')](handleEntityNotFound(_0x31cbb1,null))['then'](saveUpdates(_0x44d49d[_0xf91e('0x4d')],null))[_0xf91e('0x27')](respondWithResult(_0x31cbb1,null))[_0xf91e('0x49')](handleError(_0x31cbb1,null));};exports[_0xf91e('0x28')]=function(_0x319cbd,_0x3a0df5){return db[_0xf91e('0x2f')]['find']({'where':{'id':_0x319cbd[_0xf91e('0x4a')]['id']}})[_0xf91e('0x27')](handleEntityNotFound(_0x3a0df5,null))[_0xf91e('0x27')](removeEntity(_0x3a0df5,null))['catch'](handleError(_0x3a0df5,null));}; \ No newline at end of file +var _0xcad3=['mustache','util','path','sox','to-csv','ejs','jsforce','desk.js','querystring','papaparse','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','api','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','sendStatus','status','end','json','undefined','limit','count','offset','set','Content-Range','reject','save','then','destroy','stack','name','FreshsalesField','rawAttributes','fieldName','type','query','keys','intersection','model','attributes','fields','length','hasOwnProperty','nolimit','order','sort','where','filters','pick','filter','merge','map','VIRTUAL','options','includeAll','include','findAll','rows','show','find','catch','create','body','update','params','eml-format','rimraf','zip-dir','fast-json-patch','moment','bluebird'];(function(_0x536a73,_0x5cce8b){var _0x112420=function(_0x23891e){while(--_0x23891e){_0x536a73['push'](_0x536a73['shift']());}};_0x112420(++_0x5cce8b);}(_0xcad3,0xdb));var _0x3cad=function(_0x19dd7a,_0x51de21){_0x19dd7a=_0x19dd7a-0x0;var _0x3feb6a=_0xcad3[_0x19dd7a];return _0x3feb6a;};'use strict';var emlformat=require(_0x3cad('0x0'));var rimraf=require(_0x3cad('0x1'));var zipdir=require(_0x3cad('0x2'));var jsonpatch=require(_0x3cad('0x3'));var rp=require('request-promise');var moment=require(_0x3cad('0x4'));var BPromise=require(_0x3cad('0x5'));var Mustache=require(_0x3cad('0x6'));var util=require(_0x3cad('0x7'));var path=require(_0x3cad('0x8'));var sox=require(_0x3cad('0x9'));var csv=require(_0x3cad('0xa'));var ejs=require(_0x3cad('0xb'));var fs=require('fs');var fs_extra=require('fs-extra');var _=require('lodash');var squel=require('squel');var crypto=require('crypto');var jsforce=require(_0x3cad('0xc'));var deskjs=require(_0x3cad('0xd'));var toCsv=require('to-csv');var querystring=require(_0x3cad('0xe'));var Papa=require(_0x3cad('0xf'));var Redis=require('ioredis');var authService=require(_0x3cad('0x10'));var qs=require(_0x3cad('0x11'));var as=require(_0x3cad('0x12'));var hardwareService=require(_0x3cad('0x13'));var logger=require('../../config/logger')(_0x3cad('0x14'));var utils=require(_0x3cad('0x15'));var config=require(_0x3cad('0x16'));var licenseUtil=require(_0x3cad('0x17'));var db=require(_0x3cad('0x18'))['db'];function respondWithStatusCode(_0x534386,_0x2d811a){_0x2d811a=_0x2d811a||0xcc;return function(_0x28017a){if(_0x28017a){return _0x534386[_0x3cad('0x19')](_0x2d811a);}return _0x534386[_0x3cad('0x1a')](_0x2d811a)[_0x3cad('0x1b')]();};}function respondWithResult(_0x422d55,_0x38b6df){_0x38b6df=_0x38b6df||0xc8;return function(_0x1ab890){if(_0x1ab890){return _0x422d55['status'](_0x38b6df)[_0x3cad('0x1c')](_0x1ab890);}};}function respondWithFilteredResult(_0x30b9b9,_0x5069ea){return function(_0x1a17cf){if(_0x1a17cf){var _0x27eca9=typeof _0x5069ea['offset']===_0x3cad('0x1d')&&typeof _0x5069ea[_0x3cad('0x1e')]===_0x3cad('0x1d');var _0x50e1b2=_0x1a17cf[_0x3cad('0x1f')];var _0x278822=_0x27eca9?0x0:_0x5069ea['offset'];var _0x24ce2c=_0x27eca9?_0x1a17cf[_0x3cad('0x1f')]:_0x5069ea[_0x3cad('0x20')]+_0x5069ea[_0x3cad('0x1e')];var _0x59109e;if(_0x24ce2c>=_0x50e1b2){_0x24ce2c=_0x50e1b2;_0x59109e=0xc8;}else{_0x59109e=0xce;}_0x30b9b9[_0x3cad('0x1a')](_0x59109e);return _0x30b9b9[_0x3cad('0x21')](_0x3cad('0x22'),_0x278822+'-'+_0x24ce2c+'/'+_0x50e1b2)[_0x3cad('0x1c')](_0x1a17cf);}return null;};}function patchUpdates(_0x28c281){return function(_0x255162){try{jsonpatch['apply'](_0x255162,_0x28c281,!![]);}catch(_0x54cd4c){return BPromise[_0x3cad('0x23')](_0x54cd4c);}return _0x255162[_0x3cad('0x24')]();};}function saveUpdates(_0x2d7479,_0x4ee4f4){return function(_0xed2b80){if(_0xed2b80){return _0xed2b80['update'](_0x2d7479)[_0x3cad('0x25')](function(_0x57b151){return _0x57b151;});}return null;};}function removeEntity(_0x35a1a9,_0x3fc503){return function(_0x102b6c){if(_0x102b6c){return _0x102b6c[_0x3cad('0x26')]()['then'](function(){_0x35a1a9[_0x3cad('0x1a')](0xcc)[_0x3cad('0x1b')]();});}};}function handleEntityNotFound(_0x314f43,_0x2bbde6){return function(_0x2eec05){if(!_0x2eec05){_0x314f43[_0x3cad('0x19')](0x194);}return _0x2eec05;};}function handleError(_0x529faf,_0x43b94a){_0x43b94a=_0x43b94a||0x1f4;return function(_0x23177b){logger['error'](_0x23177b[_0x3cad('0x27')]);if(_0x23177b[_0x3cad('0x28')]){delete _0x23177b[_0x3cad('0x28')];}_0x529faf[_0x3cad('0x1a')](_0x43b94a)['send'](_0x23177b);};}exports['index']=function(_0x1f789e,_0x43c603){var _0x41b600={},_0x3b4e89={},_0x4f233b={'count':0x0,'rows':[]};var _0x42b2c2=_['map'](db[_0x3cad('0x29')][_0x3cad('0x2a')],function(_0x38bc88){return{'name':_0x38bc88[_0x3cad('0x2b')],'type':_0x38bc88[_0x3cad('0x2c')]['key']};});_0x3b4e89['model']=_['map'](_0x42b2c2,_0x3cad('0x28'));_0x3b4e89[_0x3cad('0x2d')]=_[_0x3cad('0x2e')](_0x1f789e['query']);_0x3b4e89['filters']=_[_0x3cad('0x2f')](_0x3b4e89[_0x3cad('0x30')],_0x3b4e89[_0x3cad('0x2d')]);_0x41b600[_0x3cad('0x31')]=_['intersection'](_0x3b4e89[_0x3cad('0x30')],qs[_0x3cad('0x32')](_0x1f789e['query'][_0x3cad('0x32')]));_0x41b600[_0x3cad('0x31')]=_0x41b600[_0x3cad('0x31')][_0x3cad('0x33')]?_0x41b600[_0x3cad('0x31')]:_0x3b4e89[_0x3cad('0x30')];if(!_0x1f789e[_0x3cad('0x2d')][_0x3cad('0x34')](_0x3cad('0x35'))){_0x41b600['limit']=qs[_0x3cad('0x1e')](_0x1f789e[_0x3cad('0x2d')][_0x3cad('0x1e')]);_0x41b600[_0x3cad('0x20')]=qs[_0x3cad('0x20')](_0x1f789e[_0x3cad('0x2d')]['offset']);}_0x41b600[_0x3cad('0x36')]=qs[_0x3cad('0x37')](_0x1f789e[_0x3cad('0x2d')][_0x3cad('0x37')]);_0x41b600[_0x3cad('0x38')]=qs[_0x3cad('0x39')](_[_0x3cad('0x3a')](_0x1f789e[_0x3cad('0x2d')],_0x3b4e89[_0x3cad('0x39')]),_0x42b2c2);if(_0x1f789e[_0x3cad('0x2d')][_0x3cad('0x3b')]){_0x41b600[_0x3cad('0x38')]=_[_0x3cad('0x3c')](_0x41b600[_0x3cad('0x38')],{'$or':_[_0x3cad('0x3d')](_0x42b2c2,function(_0x1a735b){if(_0x1a735b['type']!==_0x3cad('0x3e')){var _0x3df0ed={};_0x3df0ed[_0x1a735b['name']]={'$like':'%'+_0x1f789e['query'][_0x3cad('0x3b')]+'%'};return _0x3df0ed;}})});}_0x41b600=_[_0x3cad('0x3c')]({},_0x41b600,_0x1f789e[_0x3cad('0x3f')]);var _0x13273b={'where':_0x41b600[_0x3cad('0x38')]};return db[_0x3cad('0x29')]['count'](_0x13273b)[_0x3cad('0x25')](function(_0x5cccdd){_0x4f233b['count']=_0x5cccdd;if(_0x1f789e['query'][_0x3cad('0x40')]){_0x41b600[_0x3cad('0x41')]=[{'all':!![]}];}return db[_0x3cad('0x29')][_0x3cad('0x42')](_0x41b600);})[_0x3cad('0x25')](function(_0x20ac41){_0x4f233b[_0x3cad('0x43')]=_0x20ac41;return _0x4f233b;})['then'](respondWithFilteredResult(_0x43c603,_0x41b600))['catch'](handleError(_0x43c603,null));};exports[_0x3cad('0x44')]=function(_0x3ccf68,_0x4059f1){var _0x42748b={'raw':!![],'where':{'id':_0x3ccf68['params']['id']}},_0x51c313={};_0x51c313[_0x3cad('0x30')]=_['keys'](db['FreshsalesField'][_0x3cad('0x2a')]);_0x51c313['query']=_[_0x3cad('0x2e')](_0x3ccf68[_0x3cad('0x2d')]);_0x51c313[_0x3cad('0x39')]=_[_0x3cad('0x2f')](_0x51c313[_0x3cad('0x30')],_0x51c313[_0x3cad('0x2d')]);_0x42748b[_0x3cad('0x31')]=_[_0x3cad('0x2f')](_0x51c313[_0x3cad('0x30')],qs['fields'](_0x3ccf68[_0x3cad('0x2d')][_0x3cad('0x32')]));_0x42748b[_0x3cad('0x31')]=_0x42748b[_0x3cad('0x31')][_0x3cad('0x33')]?_0x42748b['attributes']:_0x51c313[_0x3cad('0x30')];if(_0x3ccf68[_0x3cad('0x2d')][_0x3cad('0x40')]){_0x42748b[_0x3cad('0x41')]=[{'all':!![]}];}_0x42748b=_[_0x3cad('0x3c')]({},_0x42748b,_0x3ccf68[_0x3cad('0x3f')]);return db['FreshsalesField'][_0x3cad('0x45')](_0x42748b)[_0x3cad('0x25')](handleEntityNotFound(_0x4059f1,null))['then'](respondWithResult(_0x4059f1,null))[_0x3cad('0x46')](handleError(_0x4059f1,null));};exports[_0x3cad('0x47')]=function(_0x499e13,_0x22b541){return db['FreshsalesField'][_0x3cad('0x47')](_0x499e13[_0x3cad('0x48')],{})[_0x3cad('0x25')](respondWithResult(_0x22b541,0xc9))[_0x3cad('0x46')](handleError(_0x22b541,null));};exports[_0x3cad('0x49')]=function(_0xf38e53,_0x35e07d){if(_0xf38e53[_0x3cad('0x48')]['id']){delete _0xf38e53[_0x3cad('0x48')]['id'];}return db[_0x3cad('0x29')][_0x3cad('0x45')]({'where':{'id':_0xf38e53[_0x3cad('0x4a')]['id']}})[_0x3cad('0x25')](handleEntityNotFound(_0x35e07d,null))['then'](saveUpdates(_0xf38e53['body'],null))[_0x3cad('0x25')](respondWithResult(_0x35e07d,null))[_0x3cad('0x46')](handleError(_0x35e07d,null));};exports['destroy']=function(_0x4be75e,_0x267140){return db[_0x3cad('0x29')]['find']({'where':{'id':_0x4be75e[_0x3cad('0x4a')]['id']}})[_0x3cad('0x25')](handleEntityNotFound(_0x267140,null))['then'](removeEntity(_0x267140,null))[_0x3cad('0x46')](handleError(_0x267140,null));}; \ No newline at end of file diff --git a/server/api/intFreshsalesField/intFreshsalesField.model.js b/server/api/intFreshsalesField/intFreshsalesField.model.js index 1ab1620..e732493 100644 --- a/server/api/intFreshsalesField/intFreshsalesField.model.js +++ b/server/api/intFreshsalesField/intFreshsalesField.model.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x3d04=['request-promise','path','../../config/environment','./intFreshsalesField.attributes','exports','freshsales_unique_index','idField','FieldId','lodash','util','../../config/logger','api','moment','bluebird'];(function(_0x350598,_0x363a1b){var _0x1e5203=function(_0x16c4cb){while(--_0x16c4cb){_0x350598['push'](_0x350598['shift']());}};_0x1e5203(++_0x363a1b);}(_0x3d04,0xbe));var _0x43d0=function(_0x501510,_0x61caa9){_0x501510=_0x501510-0x0;var _0x1e6ee5=_0x3d04[_0x501510];return _0x1e6ee5;};'use strict';var _=require(_0x43d0('0x0'));var util=require(_0x43d0('0x1'));var logger=require(_0x43d0('0x2'))(_0x43d0('0x3'));var moment=require(_0x43d0('0x4'));var BPromise=require(_0x43d0('0x5'));var rp=require(_0x43d0('0x6'));var fs=require('fs');var path=require(_0x43d0('0x7'));var rimraf=require('rimraf');var config=require(_0x43d0('0x8'));var attributes=require(_0x43d0('0x9'));module[_0x43d0('0xa')]=function(_0x617bf,_0x5e284f){return _0x617bf['define']('FreshsalesField',attributes,{'tableName':'int_freshsales_fields','paranoid':![],'indexes':[{'name':_0x43d0('0xb'),'fields':[_0x43d0('0xc'),_0x43d0('0xd')],'unique':!![]}],'timestamps':!![]});}; \ No newline at end of file +var _0x6edc=['lodash','util','../../config/logger','api','request-promise','path','rimraf','../../config/environment','exports','FreshsalesField','freshsales_unique_index','idField','FieldId'];(function(_0x5b577b,_0x52c3c7){var _0x529bb8=function(_0x5bd7bc){while(--_0x5bd7bc){_0x5b577b['push'](_0x5b577b['shift']());}};_0x529bb8(++_0x52c3c7);}(_0x6edc,0x138));var _0xc6ed=function(_0x4eb8e0,_0x487ec2){_0x4eb8e0=_0x4eb8e0-0x0;var _0x44474e=_0x6edc[_0x4eb8e0];return _0x44474e;};'use strict';var _=require(_0xc6ed('0x0'));var util=require(_0xc6ed('0x1'));var logger=require(_0xc6ed('0x2'))(_0xc6ed('0x3'));var moment=require('moment');var BPromise=require('bluebird');var rp=require(_0xc6ed('0x4'));var fs=require('fs');var path=require(_0xc6ed('0x5'));var rimraf=require(_0xc6ed('0x6'));var config=require(_0xc6ed('0x7'));var attributes=require('./intFreshsalesField.attributes');module[_0xc6ed('0x8')]=function(_0x442466,_0x2b3e56){return _0x442466['define'](_0xc6ed('0x9'),attributes,{'tableName':'int_freshsales_fields','paranoid':![],'indexes':[{'name':_0xc6ed('0xa'),'fields':[_0xc6ed('0xb'),_0xc6ed('0xc')],'unique':!![]}],'timestamps':!![]});}; \ No newline at end of file diff --git a/server/api/intFreshsalesField/intFreshsalesField.rpc.js b/server/api/intFreshsalesField/intFreshsalesField.rpc.js index 6d15c90..9e4abfe 100644 --- a/server/api/intFreshsalesField/intFreshsalesField.rpc.js +++ b/server/api/intFreshsalesField/intFreshsalesField.rpc.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xacf4=['message','result','catch','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','../../config/environment','jayson/promise','http','then','info','FreshsalesField,\x20%s,\x20%s','request\x20sent','FreshsalesField,\x20%s,\x20%s,\x20%s','error'];(function(_0x2ec461,_0x5f588a){var _0x28603d=function(_0x21114b){while(--_0x21114b){_0x2ec461['push'](_0x2ec461['shift']());}};_0x28603d(++_0x5f588a);}(_0xacf4,0xe7));var _0x4acf=function(_0x45aa75,_0x20cf2c){_0x45aa75=_0x45aa75-0x0;var _0x4bc326=_0xacf4[_0x45aa75];return _0x4bc326;};'use strict';var _=require('lodash');var util=require('util');var moment=require(_0x4acf('0x0'));var BPromise=require(_0x4acf('0x1'));var rs=require(_0x4acf('0x2'));var fs=require('fs');var Redis=require(_0x4acf('0x3'));var db=require(_0x4acf('0x4'))['db'];var utils=require(_0x4acf('0x5'));var logger=require(_0x4acf('0x6'))('rpc');var config=require(_0x4acf('0x7'));var jayson=require(_0x4acf('0x8'));var client=jayson['client'][_0x4acf('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x2ba08a,_0x649ad2,_0x45a5a4){return new BPromise(function(_0x25d345,_0x50f5f4){return client['request'](_0x2ba08a,_0x45a5a4)[_0x4acf('0xa')](function(_0x59f559){logger[_0x4acf('0xb')](_0x4acf('0xc'),_0x649ad2,_0x4acf('0xd'));logger['debug'](_0x4acf('0xe'),_0x649ad2,_0x4acf('0xd'),JSON['stringify'](_0x59f559));if(_0x59f559['error']){if(_0x59f559[_0x4acf('0xf')]['code']===0x1f4){logger['error'](_0x4acf('0xc'),_0x649ad2,_0x59f559[_0x4acf('0xf')][_0x4acf('0x10')]);return _0x50f5f4(_0x59f559[_0x4acf('0xf')][_0x4acf('0x10')]);}logger[_0x4acf('0xf')](_0x4acf('0xc'),_0x649ad2,_0x59f559[_0x4acf('0xf')][_0x4acf('0x10')]);return _0x25d345(_0x59f559[_0x4acf('0xf')][_0x4acf('0x10')]);}else{logger['info'](_0x4acf('0xc'),_0x649ad2,'request\x20sent');_0x25d345(_0x59f559[_0x4acf('0x11')][_0x4acf('0x10')]);}})[_0x4acf('0x12')](function(_0x5d934a){logger['error'](_0x4acf('0xc'),_0x649ad2,_0x5d934a);_0x50f5f4(_0x5d934a);});});} \ No newline at end of file +var _0xabce=['util','moment','bluebird','randomstring','../../config/utils','../../config/logger','rpc','client','then','info','FreshsalesField,\x20%s,\x20%s','request\x20sent','debug','FreshsalesField,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','lodash'];(function(_0x37b617,_0x3e76f1){var _0x22b26e=function(_0x5cd44a){while(--_0x5cd44a){_0x37b617['push'](_0x37b617['shift']());}};_0x22b26e(++_0x3e76f1);}(_0xabce,0x103));var _0xeabc=function(_0x4baae2,_0x487ab6){_0x4baae2=_0x4baae2-0x0;var _0x1a2285=_0xabce[_0x4baae2];return _0x1a2285;};'use strict';var _=require(_0xeabc('0x0'));var util=require(_0xeabc('0x1'));var moment=require(_0xeabc('0x2'));var BPromise=require(_0xeabc('0x3'));var rs=require(_0xeabc('0x4'));var fs=require('fs');var Redis=require('ioredis');var db=require('../../mysqldb')['db'];var utils=require(_0xeabc('0x5'));var logger=require(_0xeabc('0x6'))(_0xeabc('0x7'));var config=require('../../config/environment');var jayson=require('jayson/promise');var client=jayson[_0xeabc('0x8')]['http']({'port':0x232a});function respondWithRpcPromise(_0x229ba4,_0x52ede8,_0x3bdc29){return new BPromise(function(_0x9417af,_0x8434c5){return client['request'](_0x229ba4,_0x3bdc29)[_0xeabc('0x9')](function(_0x341f16){logger[_0xeabc('0xa')](_0xeabc('0xb'),_0x52ede8,_0xeabc('0xc'));logger[_0xeabc('0xd')](_0xeabc('0xe'),_0x52ede8,_0xeabc('0xc'),JSON[_0xeabc('0xf')](_0x341f16));if(_0x341f16[_0xeabc('0x10')]){if(_0x341f16[_0xeabc('0x10')][_0xeabc('0x11')]===0x1f4){logger[_0xeabc('0x10')](_0xeabc('0xb'),_0x52ede8,_0x341f16[_0xeabc('0x10')][_0xeabc('0x12')]);return _0x8434c5(_0x341f16['error'][_0xeabc('0x12')]);}logger[_0xeabc('0x10')](_0xeabc('0xb'),_0x52ede8,_0x341f16['error']['message']);return _0x9417af(_0x341f16[_0xeabc('0x10')][_0xeabc('0x12')]);}else{logger[_0xeabc('0xa')]('FreshsalesField,\x20%s,\x20%s',_0x52ede8,_0xeabc('0xc'));_0x9417af(_0x341f16[_0xeabc('0x13')]['message']);}})['catch'](function(_0x10fa8e){logger['error'](_0xeabc('0xb'),_0x52ede8,_0x10fa8e);_0x8434c5(_0x10fa8e);});});} \ No newline at end of file diff --git a/server/api/intSalesforceAccount/index.js b/server/api/intSalesforceAccount/index.js index f86879c..542b834 100644 --- a/server/api/intSalesforceAccount/index.js +++ b/server/api/intSalesforceAccount/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xa9e0=['Router','../../components/auth/service','../../components/interaction/service','../../config/environment','./intSalesforceAccount.controller','get','index','/:id','getConfigurations','/:id/fields','isAuthenticated','getFields','post','addConfiguration','put','update','destroy','exports','multer','util','path'];(function(_0x55d18d,_0x4f9fbb){var _0x5d7589=function(_0x3b9587){while(--_0x3b9587){_0x55d18d['push'](_0x55d18d['shift']());}};_0x5d7589(++_0x4f9fbb);}(_0xa9e0,0x123));var _0x0a9e=function(_0x43d11d,_0xccff91){_0x43d11d=_0x43d11d-0x0;var _0x38cd08=_0xa9e0[_0x43d11d];return _0x38cd08;};'use strict';var multer=require(_0x0a9e('0x0'));var util=require(_0x0a9e('0x1'));var path=require(_0x0a9e('0x2'));var timeout=require('connect-timeout');var express=require('express');var router=express[_0x0a9e('0x3')]();var fs_extra=require('fs-extra');var auth=require(_0x0a9e('0x4'));var interaction=require(_0x0a9e('0x5'));var config=require(_0x0a9e('0x6'));var controller=require(_0x0a9e('0x7'));router[_0x0a9e('0x8')]('/',auth['isAuthenticated'](),controller[_0x0a9e('0x9')]);router[_0x0a9e('0x8')](_0x0a9e('0xa'),auth['isAuthenticated'](),controller['show']);router[_0x0a9e('0x8')]('/:id/configurations',auth['isAuthenticated'](),controller[_0x0a9e('0xb')]);router[_0x0a9e('0x8')](_0x0a9e('0xc'),auth[_0x0a9e('0xd')](),controller[_0x0a9e('0xe')]);router[_0x0a9e('0xf')]('/',auth['isAuthenticated'](),controller['create']);router['post']('/:id/configurations',auth[_0x0a9e('0xd')](),controller[_0x0a9e('0x10')]);router[_0x0a9e('0x11')](_0x0a9e('0xa'),auth[_0x0a9e('0xd')](),controller[_0x0a9e('0x12')]);router['delete'](_0x0a9e('0xa'),auth[_0x0a9e('0xd')](),controller[_0x0a9e('0x13')]);module[_0x0a9e('0x14')]=router; \ No newline at end of file +var _0x9957=['connect-timeout','Router','fs-extra','../../components/auth/service','../../components/interaction/service','./intSalesforceAccount.controller','get','isAuthenticated','index','/:id','show','getConfigurations','/:id/fields','getFields','post','create','addConfiguration','put','update','delete','destroy','exports','multer','util','path'];(function(_0x22d041,_0x50c578){var _0xa51460=function(_0x1aa349){while(--_0x1aa349){_0x22d041['push'](_0x22d041['shift']());}};_0xa51460(++_0x50c578);}(_0x9957,0x93));var _0x7995=function(_0x2f5ac5,_0x1ee939){_0x2f5ac5=_0x2f5ac5-0x0;var _0x37c9a8=_0x9957[_0x2f5ac5];return _0x37c9a8;};'use strict';var multer=require(_0x7995('0x0'));var util=require(_0x7995('0x1'));var path=require(_0x7995('0x2'));var timeout=require(_0x7995('0x3'));var express=require('express');var router=express[_0x7995('0x4')]();var fs_extra=require(_0x7995('0x5'));var auth=require(_0x7995('0x6'));var interaction=require(_0x7995('0x7'));var config=require('../../config/environment');var controller=require(_0x7995('0x8'));router[_0x7995('0x9')]('/',auth[_0x7995('0xa')](),controller[_0x7995('0xb')]);router[_0x7995('0x9')](_0x7995('0xc'),auth['isAuthenticated'](),controller[_0x7995('0xd')]);router[_0x7995('0x9')]('/:id/configurations',auth[_0x7995('0xa')](),controller[_0x7995('0xe')]);router[_0x7995('0x9')](_0x7995('0xf'),auth[_0x7995('0xa')](),controller[_0x7995('0x10')]);router[_0x7995('0x11')]('/',auth['isAuthenticated'](),controller[_0x7995('0x12')]);router[_0x7995('0x11')]('/:id/configurations',auth[_0x7995('0xa')](),controller[_0x7995('0x13')]);router[_0x7995('0x14')](_0x7995('0xc'),auth[_0x7995('0xa')](),controller[_0x7995('0x15')]);router[_0x7995('0x16')]('/:id',auth['isAuthenticated'](),controller[_0x7995('0x17')]);module[_0x7995('0x18')]=router; \ No newline at end of file diff --git a/server/api/intSalesforceAccount/intSalesforceAccount.attributes.js b/server/api/intSalesforceAccount/intSalesforceAccount.attributes.js index 9c734e5..1360925 100644 --- a/server/api/intSalesforceAccount/intSalesforceAccount.attributes.js +++ b/server/api/intSalesforceAccount/intSalesforceAccount.attributes.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xa93a=['STRING','username','ENUM','integrationTab'];(function(_0x5bbfa2,_0x476678){var _0x9508af=function(_0x5ca149){while(--_0x5ca149){_0x5bbfa2['push'](_0x5bbfa2['shift']());}};_0x9508af(++_0x476678);}(_0xa93a,0xb8));var _0xaa93=function(_0x3c6684,_0x1334fc){_0x3c6684=_0x3c6684-0x0;var _0x19e1b2=_0xa93a[_0x3c6684];return _0x19e1b2;};'use strict';var Sequelize=require('sequelize');module['exports']={'name':{'type':Sequelize[_0xaa93('0x0')]},'description':{'type':Sequelize['STRING']},'username':{'type':Sequelize['STRING'],'unique':_0xaa93('0x1')},'remoteUri':{'type':Sequelize['STRING']},'password':{'type':Sequelize[_0xaa93('0x0')]},'clientId':{'type':Sequelize['STRING']},'clientSecret':{'type':Sequelize[_0xaa93('0x0')]},'securityToken':{'type':Sequelize[_0xaa93('0x0')]},'serverUrl':{'type':Sequelize[_0xaa93('0x0')],'allowNull':![]},'type':{'type':Sequelize[_0xaa93('0x2')](_0xaa93('0x3'),'newTab'),'defaultValue':_0xaa93('0x3')}}; \ No newline at end of file +var _0x285b=['ENUM','integrationTab','newTab','sequelize','STRING','username'];(function(_0x4565bf,_0x5ad9d6){var _0x5610ba=function(_0x170988){while(--_0x170988){_0x4565bf['push'](_0x4565bf['shift']());}};_0x5610ba(++_0x5ad9d6);}(_0x285b,0x171));var _0xb285=function(_0x530afb,_0x419b3b){_0x530afb=_0x530afb-0x0;var _0x597d9b=_0x285b[_0x530afb];return _0x597d9b;};'use strict';var Sequelize=require(_0xb285('0x0'));module['exports']={'name':{'type':Sequelize[_0xb285('0x1')]},'description':{'type':Sequelize[_0xb285('0x1')]},'username':{'type':Sequelize['STRING'],'unique':_0xb285('0x2')},'remoteUri':{'type':Sequelize[_0xb285('0x1')]},'password':{'type':Sequelize[_0xb285('0x1')]},'clientId':{'type':Sequelize[_0xb285('0x1')]},'clientSecret':{'type':Sequelize[_0xb285('0x1')]},'securityToken':{'type':Sequelize[_0xb285('0x1')]},'serverUrl':{'type':Sequelize[_0xb285('0x1')],'allowNull':![]},'type':{'type':Sequelize[_0xb285('0x3')](_0xb285('0x4'),_0xb285('0x5')),'defaultValue':'integrationTab'}}; \ No newline at end of file diff --git a/server/api/intSalesforceAccount/intSalesforceAccount.controller.js b/server/api/intSalesforceAccount/intSalesforceAccount.controller.js index 53046c6..4999683 100644 --- a/server/api/intSalesforceAccount/intSalesforceAccount.controller.js +++ b/server/api/intSalesforceAccount/intSalesforceAccount.controller.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x554d=['lastIndexOf','Connection','clientSecret','login','isNil','ticketType','sobject','describe','OwnerId','IsReminderSet','IsRecurrence','Subject','Description','string','int','picklist','boolean','email','textarea','remove','includes','label','picklistValues','value','true','False','false','test','statusCode','error','getFields,\x20%s,\x20%s,\x20%s','Wrong\x20credentials','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','util','path','sox','to-csv','ejs','fs-extra','squel','jsforce','desk.js','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','api','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','../../components/integrations/configuration','sendStatus','status','end','json','undefined','count','offset','set','reject','save','update','destroy','then','stack','name','send','index','map','SalesforceAccount','rawAttributes','fieldName','type','model','query','keys','filters','intersection','fields','attributes','hasOwnProperty','limit','sort','where','pick','filter','merge','VIRTUAL','options','include','findAll','rows','catch','params','length','includeAll','find','create','body','getConfigurations','findOne','order','nolimit','addConfiguration','AccountId','Subjects','getSubjects','channel','Descriptions','getDescriptions','SalesforceConfiguration','SalesforceField','getFields','Task','remoteUri','clientId','username','password','securityToken','substring'];(function(_0x66808a,_0x60f3bd){var _0x760006=function(_0x520c41){while(--_0x520c41){_0x66808a['push'](_0x66808a['shift']());}};_0x760006(++_0x60f3bd);}(_0x554d,0x1a6));var _0xd554=function(_0x173e58,_0x248ab0){_0x173e58=_0x173e58-0x0;var _0xbc3f05=_0x554d[_0x173e58];return _0xbc3f05;};'use strict';var emlformat=require('eml-format');var rimraf=require(_0xd554('0x0'));var zipdir=require(_0xd554('0x1'));var jsonpatch=require(_0xd554('0x2'));var rp=require(_0xd554('0x3'));var moment=require(_0xd554('0x4'));var BPromise=require(_0xd554('0x5'));var Mustache=require(_0xd554('0x6'));var util=require(_0xd554('0x7'));var path=require(_0xd554('0x8'));var sox=require(_0xd554('0x9'));var csv=require(_0xd554('0xa'));var ejs=require(_0xd554('0xb'));var fs=require('fs');var fs_extra=require(_0xd554('0xc'));var _=require('lodash');var squel=require(_0xd554('0xd'));var crypto=require('crypto');var jsforce=require(_0xd554('0xe'));var deskjs=require(_0xd554('0xf'));var toCsv=require(_0xd554('0xa'));var querystring=require(_0xd554('0x10'));var Papa=require(_0xd554('0x11'));var Redis=require(_0xd554('0x12'));var authService=require(_0xd554('0x13'));var qs=require(_0xd554('0x14'));var as=require(_0xd554('0x15'));var hardwareService=require(_0xd554('0x16'));var logger=require('../../config/logger')(_0xd554('0x17'));var utils=require(_0xd554('0x18'));var config=require(_0xd554('0x19'));var licenseUtil=require(_0xd554('0x1a'));var db=require(_0xd554('0x1b'))['db'];var integrations=require(_0xd554('0x1c'));function respondWithStatusCode(_0x441ab2,_0x1cab1a){_0x1cab1a=_0x1cab1a||0xcc;return function(_0x44d86a){if(_0x44d86a){return _0x441ab2[_0xd554('0x1d')](_0x1cab1a);}return _0x441ab2[_0xd554('0x1e')](_0x1cab1a)[_0xd554('0x1f')]();};}function respondWithResult(_0x181e55,_0x224c55){_0x224c55=_0x224c55||0xc8;return function(_0x2ca0c4){if(_0x2ca0c4){return _0x181e55[_0xd554('0x1e')](_0x224c55)[_0xd554('0x20')](_0x2ca0c4);}};}function respondWithFilteredResult(_0x1f3ee0,_0x45e658){return function(_0x55a954){if(_0x55a954){var _0xc109c7=typeof _0x45e658['offset']===_0xd554('0x21')&&typeof _0x45e658['limit']===_0xd554('0x21');var _0x491000=_0x55a954[_0xd554('0x22')];var _0x201576=_0xc109c7?0x0:_0x45e658[_0xd554('0x23')];var _0x146651=_0xc109c7?_0x55a954[_0xd554('0x22')]:_0x45e658[_0xd554('0x23')]+_0x45e658['limit'];var _0x143c53;if(_0x146651>=_0x491000){_0x146651=_0x491000;_0x143c53=0xc8;}else{_0x143c53=0xce;}_0x1f3ee0[_0xd554('0x1e')](_0x143c53);return _0x1f3ee0[_0xd554('0x24')]('Content-Range',_0x201576+'-'+_0x146651+'/'+_0x491000)[_0xd554('0x20')](_0x55a954);}return null;};}function patchUpdates(_0xc804fb){return function(_0x16742c){try{jsonpatch['apply'](_0x16742c,_0xc804fb,!![]);}catch(_0x1614b8){return BPromise[_0xd554('0x25')](_0x1614b8);}return _0x16742c[_0xd554('0x26')]();};}function saveUpdates(_0x3469dd,_0x2b1c02){return function(_0x53663d){if(_0x53663d){return _0x53663d[_0xd554('0x27')](_0x3469dd)['then'](function(_0x4c4e09){return _0x4c4e09;});}return null;};}function removeEntity(_0x5b03bb,_0x43eb2e){return function(_0xe2bffc){if(_0xe2bffc){return _0xe2bffc[_0xd554('0x28')]()[_0xd554('0x29')](function(){_0x5b03bb['status'](0xcc)[_0xd554('0x1f')]();});}};}function handleEntityNotFound(_0x5ca97a,_0x4105d4){return function(_0x401bc6){if(!_0x401bc6){_0x5ca97a[_0xd554('0x1d')](0x194);}return _0x401bc6;};}function handleError(_0x4ca724,_0xb8f24){_0xb8f24=_0xb8f24||0x1f4;return function(_0x2aa287){logger['error'](_0x2aa287[_0xd554('0x2a')]);if(_0x2aa287[_0xd554('0x2b')]){delete _0x2aa287[_0xd554('0x2b')];}_0x4ca724[_0xd554('0x1e')](_0xb8f24)[_0xd554('0x2c')](_0x2aa287);};}exports[_0xd554('0x2d')]=function(_0x4166cb,_0x4919a5){var _0x14e4c0={},_0x7414e0={},_0x77a240={'count':0x0,'rows':[]};var _0x4a5282=_[_0xd554('0x2e')](db[_0xd554('0x2f')][_0xd554('0x30')],function(_0x4d5c69){return{'name':_0x4d5c69[_0xd554('0x31')],'type':_0x4d5c69[_0xd554('0x32')]['key']};});_0x7414e0[_0xd554('0x33')]=_['map'](_0x4a5282,'name');_0x7414e0[_0xd554('0x34')]=_[_0xd554('0x35')](_0x4166cb['query']);_0x7414e0[_0xd554('0x36')]=_[_0xd554('0x37')](_0x7414e0[_0xd554('0x33')],_0x7414e0['query']);_0x14e4c0['attributes']=_[_0xd554('0x37')](_0x7414e0['model'],qs['fields'](_0x4166cb['query'][_0xd554('0x38')]));_0x14e4c0[_0xd554('0x39')]=_0x14e4c0['attributes']['length']?_0x14e4c0[_0xd554('0x39')]:_0x7414e0[_0xd554('0x33')];if(!_0x4166cb[_0xd554('0x34')][_0xd554('0x3a')]('nolimit')){_0x14e4c0[_0xd554('0x3b')]=qs[_0xd554('0x3b')](_0x4166cb[_0xd554('0x34')][_0xd554('0x3b')]);_0x14e4c0[_0xd554('0x23')]=qs[_0xd554('0x23')](_0x4166cb[_0xd554('0x34')][_0xd554('0x23')]);}_0x14e4c0['order']=qs[_0xd554('0x3c')](_0x4166cb[_0xd554('0x34')][_0xd554('0x3c')]);_0x14e4c0[_0xd554('0x3d')]=qs['filters'](_[_0xd554('0x3e')](_0x4166cb[_0xd554('0x34')],_0x7414e0[_0xd554('0x36')]),_0x4a5282);if(_0x4166cb[_0xd554('0x34')][_0xd554('0x3f')]){_0x14e4c0[_0xd554('0x3d')]=_[_0xd554('0x40')](_0x14e4c0[_0xd554('0x3d')],{'$or':_['map'](_0x4a5282,function(_0x4a5226){if(_0x4a5226[_0xd554('0x32')]!==_0xd554('0x41')){var _0xa13bd8={};_0xa13bd8[_0x4a5226[_0xd554('0x2b')]]={'$like':'%'+_0x4166cb[_0xd554('0x34')][_0xd554('0x3f')]+'%'};return _0xa13bd8;}})});}_0x14e4c0=_[_0xd554('0x40')]({},_0x14e4c0,_0x4166cb[_0xd554('0x42')]);var _0x3e5c69={'where':_0x14e4c0[_0xd554('0x3d')]};return db[_0xd554('0x2f')]['count'](_0x3e5c69)['then'](function(_0x149d1a){_0x77a240[_0xd554('0x22')]=_0x149d1a;if(_0x4166cb['query']['includeAll']){_0x14e4c0[_0xd554('0x43')]=[{'all':!![]}];}return db[_0xd554('0x2f')][_0xd554('0x44')](_0x14e4c0);})[_0xd554('0x29')](function(_0x10cb83){_0x77a240[_0xd554('0x45')]=_0x10cb83;return _0x77a240;})[_0xd554('0x29')](respondWithFilteredResult(_0x4919a5,_0x14e4c0))[_0xd554('0x46')](handleError(_0x4919a5,null));};exports['show']=function(_0x3f5c8,_0x4fc435){var _0x146970={'raw':![],'where':{'id':_0x3f5c8[_0xd554('0x47')]['id']}},_0x4a21f8={};_0x4a21f8[_0xd554('0x33')]=_[_0xd554('0x35')](db[_0xd554('0x2f')][_0xd554('0x30')]);_0x4a21f8[_0xd554('0x34')]=_[_0xd554('0x35')](_0x3f5c8[_0xd554('0x34')]);_0x4a21f8['filters']=_[_0xd554('0x37')](_0x4a21f8[_0xd554('0x33')],_0x4a21f8[_0xd554('0x34')]);_0x146970[_0xd554('0x39')]=_[_0xd554('0x37')](_0x4a21f8[_0xd554('0x33')],qs[_0xd554('0x38')](_0x3f5c8['query'][_0xd554('0x38')]));_0x146970[_0xd554('0x39')]=_0x146970[_0xd554('0x39')][_0xd554('0x48')]?_0x146970[_0xd554('0x39')]:_0x4a21f8['model'];if(_0x3f5c8[_0xd554('0x34')][_0xd554('0x49')]){_0x146970[_0xd554('0x43')]=[{'all':!![]}];}_0x146970=_['merge']({},_0x146970,_0x3f5c8[_0xd554('0x42')]);return db['SalesforceAccount'][_0xd554('0x4a')](_0x146970)[_0xd554('0x29')](handleEntityNotFound(_0x4fc435,null))[_0xd554('0x29')](respondWithResult(_0x4fc435,null))[_0xd554('0x46')](handleError(_0x4fc435,null));};exports[_0xd554('0x4b')]=function(_0x5183a8,_0x2fc765){return db[_0xd554('0x2f')][_0xd554('0x4b')](_0x5183a8[_0xd554('0x4c')],{})[_0xd554('0x29')](respondWithResult(_0x2fc765,0xc9))[_0xd554('0x46')](handleError(_0x2fc765,null));};exports[_0xd554('0x27')]=function(_0x5a0b92,_0x3c316d){if(_0x5a0b92[_0xd554('0x4c')]['id']){delete _0x5a0b92['body']['id'];}return db[_0xd554('0x2f')][_0xd554('0x4a')]({'where':{'id':_0x5a0b92[_0xd554('0x47')]['id']}})[_0xd554('0x29')](handleEntityNotFound(_0x3c316d,null))[_0xd554('0x29')](saveUpdates(_0x5a0b92[_0xd554('0x4c')],null))[_0xd554('0x29')](respondWithResult(_0x3c316d,null))['catch'](handleError(_0x3c316d,null));};exports[_0xd554('0x28')]=function(_0x5706fd,_0xd679d6){return db['SalesforceAccount'][_0xd554('0x4a')]({'where':{'id':_0x5706fd[_0xd554('0x47')]['id']}})['then'](handleEntityNotFound(_0xd679d6,null))[_0xd554('0x29')](removeEntity(_0xd679d6,null))[_0xd554('0x46')](handleError(_0xd679d6,null));};exports[_0xd554('0x4d')]=function(_0xbda392,_0x1b6ca3,_0x477d7c){var _0x1f4040={};var _0x29e11d={};var _0x25f169;var _0x359264;return db[_0xd554('0x2f')][_0xd554('0x4e')]({'where':{'id':_0xbda392[_0xd554('0x47')]['id']}})[_0xd554('0x29')](handleEntityNotFound(_0x1b6ca3,null))[_0xd554('0x29')](function(_0x419a65){if(_0x419a65){_0x25f169=_0x419a65;_0x29e11d[_0xd554('0x33')]=_[_0xd554('0x35')](db['SalesforceConfiguration'][_0xd554('0x30')]);_0x29e11d[_0xd554('0x34')]=_[_0xd554('0x35')](_0xbda392['query']);_0x29e11d[_0xd554('0x36')]=_[_0xd554('0x37')](_0x29e11d[_0xd554('0x33')],_0x29e11d[_0xd554('0x34')]);_0x1f4040[_0xd554('0x39')]=_[_0xd554('0x37')](_0x29e11d[_0xd554('0x33')],qs[_0xd554('0x38')](_0xbda392[_0xd554('0x34')][_0xd554('0x38')]));_0x1f4040[_0xd554('0x39')]=_0x1f4040['attributes'][_0xd554('0x48')]?_0x1f4040[_0xd554('0x39')]:_0x29e11d[_0xd554('0x33')];_0x1f4040[_0xd554('0x4f')]=qs['sort'](_0xbda392[_0xd554('0x34')][_0xd554('0x3c')]);_0x1f4040[_0xd554('0x3d')]=qs['filters'](_[_0xd554('0x3e')](_0xbda392['query'],_0x29e11d[_0xd554('0x36')]));if(_0xbda392['query'][_0xd554('0x3f')]){_0x1f4040[_0xd554('0x3d')]=_[_0xd554('0x40')](_0x1f4040[_0xd554('0x3d')],{'$or':_[_0xd554('0x2e')](_0x1f4040[_0xd554('0x39')],function(_0x5392c2){var _0xdddddd={};_0xdddddd[_0x5392c2]={'$like':'%'+_0xbda392[_0xd554('0x34')][_0xd554('0x3f')]+'%'};return _0xdddddd;})});}_0x1f4040=_[_0xd554('0x40')]({},_0x1f4040,_0xbda392[_0xd554('0x42')]);return _0x25f169[_0xd554('0x4d')](_0x1f4040);}})['then'](function(_0x19236e){if(_0x19236e){_0x359264=_0x19236e[_0xd554('0x48')];if(!_0xbda392[_0xd554('0x34')]['hasOwnProperty'](_0xd554('0x50'))){_0x1f4040['limit']=qs[_0xd554('0x3b')](_0xbda392[_0xd554('0x34')][_0xd554('0x3b')]);_0x1f4040[_0xd554('0x23')]=qs[_0xd554('0x23')](_0xbda392[_0xd554('0x34')][_0xd554('0x23')]);}return _0x25f169[_0xd554('0x4d')](_0x1f4040);}})[_0xd554('0x29')](function(_0x2e2243){if(_0x2e2243){return _0x2e2243?{'count':_0x359264,'rows':_0x2e2243}:null;}})[_0xd554('0x29')](respondWithResult(_0x1b6ca3,null))['catch'](handleError(_0x1b6ca3,null));};exports[_0xd554('0x51')]=function(_0x379aa2,_0x3e86fa,_0x228c9e){if(_0x379aa2[_0xd554('0x4c')]['id']){delete _0x379aa2[_0xd554('0x4c')]['id'];}return db['SalesforceAccount']['findOne']({'where':{'id':_0x379aa2['params']['id']}})[_0xd554('0x29')](handleEntityNotFound(_0x3e86fa,null))[_0xd554('0x29')](function(_0x8c64a9){if(_0x8c64a9){_0x379aa2[_0xd554('0x4c')][_0xd554('0x52')]=_0x8c64a9['id'];_0x379aa2[_0xd554('0x4c')][_0xd554('0x53')]=integrations[_0xd554('0x54')](_0x379aa2[_0xd554('0x4c')][_0xd554('0x55')],_0x379aa2['body']['type']);_0x379aa2['body'][_0xd554('0x56')]=integrations[_0xd554('0x57')](_0x379aa2[_0xd554('0x4c')][_0xd554('0x55')],_0x379aa2[_0xd554('0x4c')][_0xd554('0x32')]);return db[_0xd554('0x58')][_0xd554('0x4b')](_0x379aa2['body'],{'include':[{'model':db[_0xd554('0x59')],'as':'Subjects'},{'model':db[_0xd554('0x59')],'as':'Descriptions'}]});}return null;})[_0xd554('0x29')](respondWithResult(_0x3e86fa,null))['catch'](handleError(_0x3e86fa,null));};exports[_0xd554('0x5a')]=function(_0xbe6e8d,_0x3b5176,_0x137412){var _0x2fa02b;var _0x5d1a05='';var _0x1e5ad8=_0xd554('0x5b');return db[_0xd554('0x2f')][_0xd554('0x4e')]({'where':{'id':_0xbe6e8d[_0xd554('0x47')]['id']},'attributes':['id',_0xd554('0x5c'),_0xd554('0x5d'),'clientSecret',_0xd554('0x5e'),_0xd554('0x5f'),_0xd554('0x60')]})[_0xd554('0x29')](handleEntityNotFound(_0x3b5176,null))[_0xd554('0x29')](function(_0x4179c5){if(_0x4179c5){_0x5d1a05=_0x4179c5[_0xd554('0x5c')];var _0x53a129=_0x5d1a05['slice'](-0x1);if(_0x53a129==='/'){_0x5d1a05=_0x5d1a05[_0xd554('0x61')](0x0,_0x5d1a05[_0xd554('0x62')](_0x53a129));}_0x2fa02b=new jsforce[(_0xd554('0x63'))]({'oauth2':{'loginUrl':_0x5d1a05,'clientId':_0x4179c5[_0xd554('0x5d')],'clientSecret':_0x4179c5[_0xd554('0x64')]}});return _0x2fa02b[_0xd554('0x65')](_0x4179c5[_0xd554('0x5e')],_0x4179c5[_0xd554('0x5f')]['concat'](_0x4179c5['securityToken']));}})[_0xd554('0x29')](function(_0x671c19){if(_0x671c19){if(!_[_0xd554('0x66')](_0xbe6e8d['query'][_0xd554('0x67')])){_0x1e5ad8=_0xbe6e8d[_0xd554('0x34')][_0xd554('0x67')];}return _0x2fa02b[_0xd554('0x68')](_0x1e5ad8)[_0xd554('0x69')]();}})[_0xd554('0x29')](function(_0x5e248a){var _0x7f4df0=[_0xd554('0x6a'),'ActivityDate',_0xd554('0x6b'),_0xd554('0x6c'),_0xd554('0x6d'),_0xd554('0x6e')];var _0x514da4=[_0xd554('0x6f'),_0xd554('0x70'),_0xd554('0x71'),_0xd554('0x72'),_0xd554('0x73'),_0xd554('0x74'),'phone'];if(_0x5e248a){_[_0xd554('0x75')](_0x5e248a['fields'],function(_0x3e9919){return _0x7f4df0[_0xd554('0x76')](_0x3e9919[_0xd554('0x2b')])||!_0x514da4[_0xd554('0x76')](_0x3e9919['type']);});return{'count':_0x5e248a[_0xd554('0x38')]['length'],'rows':_[_0xd554('0x2e')](_0x5e248a['fields'],function(_0x55a7af){return{'id':_0x55a7af[_0xd554('0x2b')],'name':_0x55a7af[_0xd554('0x77')],'custom':_0x55a7af['custom'],'options':_0x55a7af[_0xd554('0x78')]['length']>0x0?_['map'](_0x55a7af[_0xd554('0x78')],function(_0x2d98d5){return{'name':_0x2d98d5[_0xd554('0x77')],'value':_0x2d98d5[_0xd554('0x79')]};}):_0x55a7af[_0xd554('0x32')]==_0xd554('0x72')?[{'name':'True','value':_0xd554('0x7a')},{'name':_0xd554('0x7b'),'value':_0xd554('0x7c')}]:[]};})};}})[_0xd554('0x29')](respondWithResult(_0x3b5176,null))[_0xd554('0x46')](function(_0xcf26f5){var _0x59c857=_0xbe6e8d[_0xd554('0x34')][_0xd554('0x7d')]?0x1f4:_0xcf26f5[_0xd554('0x7e')]||0x1f4;logger[_0xd554('0x7f')](_0xd554('0x80'),_0xd554('0x5a'),_0x59c857,JSON['stringify'](_0xcf26f5));delete _0xcf26f5[_0xd554('0x2b')];if(_0x59c857===0x191){_0x59c857=0x190;}_0x3b5176[_0xd554('0x1e')](_0x59c857)[_0xd554('0x2c')](_0xbe6e8d[_0xd554('0x34')][_0xd554('0x7d')]?{'message':_0xd554('0x81'),'statusCode':_0xcf26f5['statusCode']}:_0xcf26f5);});}; \ No newline at end of file +var _0x9182=['to-csv','ejs','fs-extra','lodash','squel','crypto','jsforce','desk.js','querystring','papaparse','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../components/integrations/configuration','status','end','json','undefined','limit','count','offset','set','Content-Range','apply','reject','then','sendStatus','error','stack','name','send','map','SalesforceAccount','rawAttributes','fieldName','key','model','query','intersection','fields','attributes','hasOwnProperty','nolimit','order','sort','where','filters','pick','type','VIRTUAL','filter','merge','options','includeAll','include','rows','catch','params','keys','find','create','body','update','getConfigurations','findOne','length','AccountId','Subjects','getSubjects','channel','Descriptions','getDescriptions','SalesforceField','getFields','remoteUri','clientId','clientSecret','username','securityToken','slice','lastIndexOf','login','concat','ticketType','sobject','describe','OwnerId','ActivityDate','IsReminderSet','IsRecurrence','Subject','Description','string','picklist','boolean','email','phone','custom','picklistValues','label','value','True','False','false','test','statusCode','getFields,\x20%s,\x20%s,\x20%s','eml-format','zip-dir','request-promise','moment','bluebird','mustache','util','path','sox'];(function(_0x2837ac,_0x353be5){var _0x2775b4=function(_0x177445){while(--_0x177445){_0x2837ac['push'](_0x2837ac['shift']());}};_0x2775b4(++_0x353be5);}(_0x9182,0xe7));var _0x2918=function(_0x4831c0,_0x5f0326){_0x4831c0=_0x4831c0-0x0;var _0x2a7937=_0x9182[_0x4831c0];return _0x2a7937;};'use strict';var emlformat=require(_0x2918('0x0'));var rimraf=require('rimraf');var zipdir=require(_0x2918('0x1'));var jsonpatch=require('fast-json-patch');var rp=require(_0x2918('0x2'));var moment=require(_0x2918('0x3'));var BPromise=require(_0x2918('0x4'));var Mustache=require(_0x2918('0x5'));var util=require(_0x2918('0x6'));var path=require(_0x2918('0x7'));var sox=require(_0x2918('0x8'));var csv=require(_0x2918('0x9'));var ejs=require(_0x2918('0xa'));var fs=require('fs');var fs_extra=require(_0x2918('0xb'));var _=require(_0x2918('0xc'));var squel=require(_0x2918('0xd'));var crypto=require(_0x2918('0xe'));var jsforce=require(_0x2918('0xf'));var deskjs=require(_0x2918('0x10'));var toCsv=require(_0x2918('0x9'));var querystring=require(_0x2918('0x11'));var Papa=require(_0x2918('0x12'));var Redis=require('ioredis');var authService=require('../../components/auth/service');var qs=require(_0x2918('0x13'));var as=require(_0x2918('0x14'));var hardwareService=require(_0x2918('0x15'));var logger=require(_0x2918('0x16'))(_0x2918('0x17'));var utils=require(_0x2918('0x18'));var config=require(_0x2918('0x19'));var licenseUtil=require('../../config/license/util');var db=require('../../mysqldb')['db'];var integrations=require(_0x2918('0x1a'));function respondWithStatusCode(_0x15384a,_0x275b1d){_0x275b1d=_0x275b1d||0xcc;return function(_0x4a52dc){if(_0x4a52dc){return _0x15384a['sendStatus'](_0x275b1d);}return _0x15384a[_0x2918('0x1b')](_0x275b1d)[_0x2918('0x1c')]();};}function respondWithResult(_0x35c5fb,_0x519b4d){_0x519b4d=_0x519b4d||0xc8;return function(_0x57be7c){if(_0x57be7c){return _0x35c5fb['status'](_0x519b4d)[_0x2918('0x1d')](_0x57be7c);}};}function respondWithFilteredResult(_0x163f0e,_0x2954b9){return function(_0x315fc1){if(_0x315fc1){var _0x206f57=typeof _0x2954b9['offset']===_0x2918('0x1e')&&typeof _0x2954b9[_0x2918('0x1f')]===_0x2918('0x1e');var _0x4f8c8d=_0x315fc1[_0x2918('0x20')];var _0x439774=_0x206f57?0x0:_0x2954b9[_0x2918('0x21')];var _0x48676f=_0x206f57?_0x315fc1[_0x2918('0x20')]:_0x2954b9['offset']+_0x2954b9['limit'];var _0x2dd6c3;if(_0x48676f>=_0x4f8c8d){_0x48676f=_0x4f8c8d;_0x2dd6c3=0xc8;}else{_0x2dd6c3=0xce;}_0x163f0e[_0x2918('0x1b')](_0x2dd6c3);return _0x163f0e[_0x2918('0x22')](_0x2918('0x23'),_0x439774+'-'+_0x48676f+'/'+_0x4f8c8d)[_0x2918('0x1d')](_0x315fc1);}return null;};}function patchUpdates(_0x533500){return function(_0x508812){try{jsonpatch[_0x2918('0x24')](_0x508812,_0x533500,!![]);}catch(_0x553f0f){return BPromise[_0x2918('0x25')](_0x553f0f);}return _0x508812['save']();};}function saveUpdates(_0x4719ba,_0x1c7687){return function(_0x763563){if(_0x763563){return _0x763563['update'](_0x4719ba)[_0x2918('0x26')](function(_0x4f1817){return _0x4f1817;});}return null;};}function removeEntity(_0x18f365,_0x1386bd){return function(_0x321f71){if(_0x321f71){return _0x321f71['destroy']()[_0x2918('0x26')](function(){_0x18f365[_0x2918('0x1b')](0xcc)[_0x2918('0x1c')]();});}};}function handleEntityNotFound(_0x3883d0,_0x10469e){return function(_0x130fdd){if(!_0x130fdd){_0x3883d0[_0x2918('0x27')](0x194);}return _0x130fdd;};}function handleError(_0x291861,_0xc9e756){_0xc9e756=_0xc9e756||0x1f4;return function(_0x5646f8){logger[_0x2918('0x28')](_0x5646f8[_0x2918('0x29')]);if(_0x5646f8[_0x2918('0x2a')]){delete _0x5646f8[_0x2918('0x2a')];}_0x291861[_0x2918('0x1b')](_0xc9e756)[_0x2918('0x2b')](_0x5646f8);};}exports['index']=function(_0x5167c7,_0x55eb8b){var _0x33ae81={},_0x28eb5c={},_0x249106={'count':0x0,'rows':[]};var _0x33cdf8=_[_0x2918('0x2c')](db[_0x2918('0x2d')][_0x2918('0x2e')],function(_0x35adb2){return{'name':_0x35adb2[_0x2918('0x2f')],'type':_0x35adb2['type'][_0x2918('0x30')]};});_0x28eb5c[_0x2918('0x31')]=_['map'](_0x33cdf8,_0x2918('0x2a'));_0x28eb5c[_0x2918('0x32')]=_['keys'](_0x5167c7[_0x2918('0x32')]);_0x28eb5c['filters']=_['intersection'](_0x28eb5c[_0x2918('0x31')],_0x28eb5c[_0x2918('0x32')]);_0x33ae81['attributes']=_[_0x2918('0x33')](_0x28eb5c['model'],qs['fields'](_0x5167c7[_0x2918('0x32')][_0x2918('0x34')]));_0x33ae81[_0x2918('0x35')]=_0x33ae81[_0x2918('0x35')]['length']?_0x33ae81['attributes']:_0x28eb5c[_0x2918('0x31')];if(!_0x5167c7[_0x2918('0x32')][_0x2918('0x36')](_0x2918('0x37'))){_0x33ae81[_0x2918('0x1f')]=qs['limit'](_0x5167c7[_0x2918('0x32')][_0x2918('0x1f')]);_0x33ae81[_0x2918('0x21')]=qs[_0x2918('0x21')](_0x5167c7[_0x2918('0x32')][_0x2918('0x21')]);}_0x33ae81[_0x2918('0x38')]=qs[_0x2918('0x39')](_0x5167c7[_0x2918('0x32')][_0x2918('0x39')]);_0x33ae81[_0x2918('0x3a')]=qs[_0x2918('0x3b')](_[_0x2918('0x3c')](_0x5167c7[_0x2918('0x32')],_0x28eb5c[_0x2918('0x3b')]),_0x33cdf8);if(_0x5167c7[_0x2918('0x32')]['filter']){_0x33ae81['where']=_['merge'](_0x33ae81[_0x2918('0x3a')],{'$or':_[_0x2918('0x2c')](_0x33cdf8,function(_0x1a2179){if(_0x1a2179[_0x2918('0x3d')]!==_0x2918('0x3e')){var _0x32dd1f={};_0x32dd1f[_0x1a2179[_0x2918('0x2a')]]={'$like':'%'+_0x5167c7[_0x2918('0x32')][_0x2918('0x3f')]+'%'};return _0x32dd1f;}})});}_0x33ae81=_[_0x2918('0x40')]({},_0x33ae81,_0x5167c7[_0x2918('0x41')]);var _0x2f4196={'where':_0x33ae81['where']};return db[_0x2918('0x2d')][_0x2918('0x20')](_0x2f4196)[_0x2918('0x26')](function(_0x27363b){_0x249106['count']=_0x27363b;if(_0x5167c7[_0x2918('0x32')][_0x2918('0x42')]){_0x33ae81[_0x2918('0x43')]=[{'all':!![]}];}return db['SalesforceAccount']['findAll'](_0x33ae81);})[_0x2918('0x26')](function(_0x15c65e){_0x249106[_0x2918('0x44')]=_0x15c65e;return _0x249106;})[_0x2918('0x26')](respondWithFilteredResult(_0x55eb8b,_0x33ae81))[_0x2918('0x45')](handleError(_0x55eb8b,null));};exports['show']=function(_0x5890ef,_0x582d96){var _0x202ab0={'raw':![],'where':{'id':_0x5890ef[_0x2918('0x46')]['id']}},_0x5f161c={};_0x5f161c['model']=_[_0x2918('0x47')](db[_0x2918('0x2d')][_0x2918('0x2e')]);_0x5f161c[_0x2918('0x32')]=_['keys'](_0x5890ef['query']);_0x5f161c['filters']=_[_0x2918('0x33')](_0x5f161c[_0x2918('0x31')],_0x5f161c['query']);_0x202ab0['attributes']=_[_0x2918('0x33')](_0x5f161c['model'],qs[_0x2918('0x34')](_0x5890ef[_0x2918('0x32')][_0x2918('0x34')]));_0x202ab0[_0x2918('0x35')]=_0x202ab0[_0x2918('0x35')]['length']?_0x202ab0[_0x2918('0x35')]:_0x5f161c[_0x2918('0x31')];if(_0x5890ef[_0x2918('0x32')][_0x2918('0x42')]){_0x202ab0['include']=[{'all':!![]}];}_0x202ab0=_[_0x2918('0x40')]({},_0x202ab0,_0x5890ef[_0x2918('0x41')]);return db['SalesforceAccount'][_0x2918('0x48')](_0x202ab0)[_0x2918('0x26')](handleEntityNotFound(_0x582d96,null))[_0x2918('0x26')](respondWithResult(_0x582d96,null))[_0x2918('0x45')](handleError(_0x582d96,null));};exports[_0x2918('0x49')]=function(_0x10dcd2,_0x3e5dd6){return db['SalesforceAccount'][_0x2918('0x49')](_0x10dcd2[_0x2918('0x4a')],{})[_0x2918('0x26')](respondWithResult(_0x3e5dd6,0xc9))[_0x2918('0x45')](handleError(_0x3e5dd6,null));};exports[_0x2918('0x4b')]=function(_0x21263f,_0x1af317){if(_0x21263f[_0x2918('0x4a')]['id']){delete _0x21263f['body']['id'];}return db[_0x2918('0x2d')][_0x2918('0x48')]({'where':{'id':_0x21263f[_0x2918('0x46')]['id']}})[_0x2918('0x26')](handleEntityNotFound(_0x1af317,null))[_0x2918('0x26')](saveUpdates(_0x21263f[_0x2918('0x4a')],null))[_0x2918('0x26')](respondWithResult(_0x1af317,null))['catch'](handleError(_0x1af317,null));};exports['destroy']=function(_0x181304,_0x52a615){return db[_0x2918('0x2d')][_0x2918('0x48')]({'where':{'id':_0x181304['params']['id']}})[_0x2918('0x26')](handleEntityNotFound(_0x52a615,null))[_0x2918('0x26')](removeEntity(_0x52a615,null))[_0x2918('0x45')](handleError(_0x52a615,null));};exports[_0x2918('0x4c')]=function(_0x164c0d,_0x1ae270,_0x545c3e){var _0x5080dd={};var _0x267ab2={};var _0xd3580b;var _0x2c2f3c;return db[_0x2918('0x2d')][_0x2918('0x4d')]({'where':{'id':_0x164c0d[_0x2918('0x46')]['id']}})[_0x2918('0x26')](handleEntityNotFound(_0x1ae270,null))[_0x2918('0x26')](function(_0xa2affa){if(_0xa2affa){_0xd3580b=_0xa2affa;_0x267ab2['model']=_[_0x2918('0x47')](db['SalesforceConfiguration'][_0x2918('0x2e')]);_0x267ab2[_0x2918('0x32')]=_[_0x2918('0x47')](_0x164c0d[_0x2918('0x32')]);_0x267ab2[_0x2918('0x3b')]=_['intersection'](_0x267ab2['model'],_0x267ab2['query']);_0x5080dd[_0x2918('0x35')]=_[_0x2918('0x33')](_0x267ab2['model'],qs[_0x2918('0x34')](_0x164c0d[_0x2918('0x32')][_0x2918('0x34')]));_0x5080dd[_0x2918('0x35')]=_0x5080dd['attributes'][_0x2918('0x4e')]?_0x5080dd[_0x2918('0x35')]:_0x267ab2[_0x2918('0x31')];_0x5080dd[_0x2918('0x38')]=qs[_0x2918('0x39')](_0x164c0d['query'][_0x2918('0x39')]);_0x5080dd[_0x2918('0x3a')]=qs[_0x2918('0x3b')](_[_0x2918('0x3c')](_0x164c0d[_0x2918('0x32')],_0x267ab2[_0x2918('0x3b')]));if(_0x164c0d[_0x2918('0x32')][_0x2918('0x3f')]){_0x5080dd[_0x2918('0x3a')]=_[_0x2918('0x40')](_0x5080dd['where'],{'$or':_[_0x2918('0x2c')](_0x5080dd[_0x2918('0x35')],function(_0x48e2cc){var _0x57d5e0={};_0x57d5e0[_0x48e2cc]={'$like':'%'+_0x164c0d[_0x2918('0x32')]['filter']+'%'};return _0x57d5e0;})});}_0x5080dd=_[_0x2918('0x40')]({},_0x5080dd,_0x164c0d[_0x2918('0x41')]);return _0xd3580b[_0x2918('0x4c')](_0x5080dd);}})[_0x2918('0x26')](function(_0x47c118){if(_0x47c118){_0x2c2f3c=_0x47c118[_0x2918('0x4e')];if(!_0x164c0d['query'][_0x2918('0x36')](_0x2918('0x37'))){_0x5080dd[_0x2918('0x1f')]=qs[_0x2918('0x1f')](_0x164c0d['query'][_0x2918('0x1f')]);_0x5080dd[_0x2918('0x21')]=qs['offset'](_0x164c0d[_0x2918('0x32')]['offset']);}return _0xd3580b['getConfigurations'](_0x5080dd);}})[_0x2918('0x26')](function(_0x1a4c38){if(_0x1a4c38){return _0x1a4c38?{'count':_0x2c2f3c,'rows':_0x1a4c38}:null;}})[_0x2918('0x26')](respondWithResult(_0x1ae270,null))[_0x2918('0x45')](handleError(_0x1ae270,null));};exports['addConfiguration']=function(_0x37e16e,_0x498954,_0x428c8a){if(_0x37e16e[_0x2918('0x4a')]['id']){delete _0x37e16e[_0x2918('0x4a')]['id'];}return db['SalesforceAccount']['findOne']({'where':{'id':_0x37e16e[_0x2918('0x46')]['id']}})['then'](handleEntityNotFound(_0x498954,null))[_0x2918('0x26')](function(_0x44bf87){if(_0x44bf87){_0x37e16e['body'][_0x2918('0x4f')]=_0x44bf87['id'];_0x37e16e[_0x2918('0x4a')][_0x2918('0x50')]=integrations[_0x2918('0x51')](_0x37e16e[_0x2918('0x4a')][_0x2918('0x52')],_0x37e16e['body'][_0x2918('0x3d')]);_0x37e16e[_0x2918('0x4a')][_0x2918('0x53')]=integrations[_0x2918('0x54')](_0x37e16e['body'][_0x2918('0x52')],_0x37e16e[_0x2918('0x4a')][_0x2918('0x3d')]);return db['SalesforceConfiguration'][_0x2918('0x49')](_0x37e16e[_0x2918('0x4a')],{'include':[{'model':db[_0x2918('0x55')],'as':_0x2918('0x50')},{'model':db[_0x2918('0x55')],'as':'Descriptions'}]});}return null;})['then'](respondWithResult(_0x498954,null))['catch'](handleError(_0x498954,null));};exports[_0x2918('0x56')]=function(_0x520db3,_0xc8e4e3,_0x4b6fb0){var _0x4b5502;var _0x4c52c4='';var _0x55c9c4='Task';return db['SalesforceAccount']['findOne']({'where':{'id':_0x520db3['params']['id']},'attributes':['id',_0x2918('0x57'),_0x2918('0x58'),_0x2918('0x59'),_0x2918('0x5a'),'password',_0x2918('0x5b')]})['then'](handleEntityNotFound(_0xc8e4e3,null))['then'](function(_0x46a0d0){if(_0x46a0d0){_0x4c52c4=_0x46a0d0['remoteUri'];var _0x362027=_0x4c52c4[_0x2918('0x5c')](-0x1);if(_0x362027==='/'){_0x4c52c4=_0x4c52c4['substring'](0x0,_0x4c52c4[_0x2918('0x5d')](_0x362027));}_0x4b5502=new jsforce['Connection']({'oauth2':{'loginUrl':_0x4c52c4,'clientId':_0x46a0d0[_0x2918('0x58')],'clientSecret':_0x46a0d0[_0x2918('0x59')]}});return _0x4b5502[_0x2918('0x5e')](_0x46a0d0['username'],_0x46a0d0['password'][_0x2918('0x5f')](_0x46a0d0['securityToken']));}})[_0x2918('0x26')](function(_0x268a81){if(_0x268a81){if(!_['isNil'](_0x520db3[_0x2918('0x32')][_0x2918('0x60')])){_0x55c9c4=_0x520db3[_0x2918('0x32')]['ticketType'];}return _0x4b5502[_0x2918('0x61')](_0x55c9c4)[_0x2918('0x62')]();}})[_0x2918('0x26')](function(_0x3809fb){var _0x4075ea=[_0x2918('0x63'),_0x2918('0x64'),_0x2918('0x65'),_0x2918('0x66'),_0x2918('0x67'),_0x2918('0x68')];var _0x4fe539=[_0x2918('0x69'),'int',_0x2918('0x6a'),_0x2918('0x6b'),_0x2918('0x6c'),'textarea',_0x2918('0x6d')];if(_0x3809fb){_['remove'](_0x3809fb[_0x2918('0x34')],function(_0x542246){return _0x4075ea['includes'](_0x542246['name'])||!_0x4fe539['includes'](_0x542246['type']);});return{'count':_0x3809fb[_0x2918('0x34')][_0x2918('0x4e')],'rows':_[_0x2918('0x2c')](_0x3809fb[_0x2918('0x34')],function(_0x2b568a){return{'id':_0x2b568a[_0x2918('0x2a')],'name':_0x2b568a['label'],'custom':_0x2b568a[_0x2918('0x6e')],'options':_0x2b568a['picklistValues'][_0x2918('0x4e')]>0x0?_[_0x2918('0x2c')](_0x2b568a[_0x2918('0x6f')],function(_0x439bde){return{'name':_0x439bde[_0x2918('0x70')],'value':_0x439bde[_0x2918('0x71')]};}):_0x2b568a[_0x2918('0x3d')]==_0x2918('0x6b')?[{'name':_0x2918('0x72'),'value':'true'},{'name':_0x2918('0x73'),'value':_0x2918('0x74')}]:[]};})};}})[_0x2918('0x26')](respondWithResult(_0xc8e4e3,null))[_0x2918('0x45')](function(_0x50032c){var _0x4d1cd8=_0x520db3[_0x2918('0x32')][_0x2918('0x75')]?0x1f4:_0x50032c[_0x2918('0x76')]||0x1f4;logger[_0x2918('0x28')](_0x2918('0x77'),_0x2918('0x56'),_0x4d1cd8,JSON['stringify'](_0x50032c));delete _0x50032c[_0x2918('0x2a')];if(_0x4d1cd8===0x191){_0x4d1cd8=0x190;}_0xc8e4e3[_0x2918('0x1b')](_0x4d1cd8)['send'](_0x520db3[_0x2918('0x32')][_0x2918('0x75')]?{'message':'Wrong\x20credentials','statusCode':_0x50032c['statusCode']}:_0x50032c);});}; \ No newline at end of file diff --git a/server/api/intSalesforceAccount/intSalesforceAccount.model.js b/server/api/intSalesforceAccount/intSalesforceAccount.model.js index b6804d5..3dfae9d 100644 --- a/server/api/intSalesforceAccount/intSalesforceAccount.model.js +++ b/server/api/intSalesforceAccount/intSalesforceAccount.model.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x17d6=['api','moment','bluebird','request-promise','path','rimraf','../../components/integrations/configuration','int_salesforce_accounts','util'];(function(_0x346737,_0x3e6081){var _0x1ade2e=function(_0x15e50e){while(--_0x15e50e){_0x346737['push'](_0x346737['shift']());}};_0x1ade2e(++_0x3e6081);}(_0x17d6,0xbc));var _0x617d=function(_0x428268,_0xb2dc30){_0x428268=_0x428268-0x0;var _0x20c4c8=_0x17d6[_0x428268];return _0x20c4c8;};'use strict';var _=require('lodash');var util=require(_0x617d('0x0'));var logger=require('../../config/logger')(_0x617d('0x1'));var moment=require(_0x617d('0x2'));var BPromise=require(_0x617d('0x3'));var rp=require(_0x617d('0x4'));var fs=require('fs');var path=require(_0x617d('0x5'));var rimraf=require(_0x617d('0x6'));var config=require('../../config/environment');var attributes=require('./intSalesforceAccount.attributes');var integrations=require(_0x617d('0x7'));module['exports']=function(_0x11c5d8,_0xb721b4){return _0x11c5d8['define']('SalesforceAccount',attributes,{'tableName':_0x617d('0x8'),'paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file +var _0x3397=['util','moment','bluebird','path','rimraf','../../config/environment','../../components/integrations/configuration','exports','int_salesforce_accounts','lodash'];(function(_0x50a635,_0x158de3){var _0x15fcdf=function(_0x16342e){while(--_0x16342e){_0x50a635['push'](_0x50a635['shift']());}};_0x15fcdf(++_0x158de3);}(_0x3397,0x1a3));var _0x7339=function(_0x3b380d,_0x4bf247){_0x3b380d=_0x3b380d-0x0;var _0x54502b=_0x3397[_0x3b380d];return _0x54502b;};'use strict';var _=require(_0x7339('0x0'));var util=require(_0x7339('0x1'));var logger=require('../../config/logger')('api');var moment=require(_0x7339('0x2'));var BPromise=require(_0x7339('0x3'));var rp=require('request-promise');var fs=require('fs');var path=require(_0x7339('0x4'));var rimraf=require(_0x7339('0x5'));var config=require(_0x7339('0x6'));var attributes=require('./intSalesforceAccount.attributes');var integrations=require(_0x7339('0x7'));module[_0x7339('0x8')]=function(_0x1e42c4,_0x24b6bc){return _0x1e42c4['define']('SalesforceAccount',attributes,{'tableName':_0x7339('0x9'),'paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file diff --git a/server/api/intSalesforceAccount/intSalesforceAccount.rpc.js b/server/api/intSalesforceAccount/intSalesforceAccount.rpc.js index a119401..91524bf 100644 --- a/server/api/intSalesforceAccount/intSalesforceAccount.rpc.js +++ b/server/api/intSalesforceAccount/intSalesforceAccount.rpc.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xc41e=['request','info','SalesforceAccount,\x20%s,\x20%s','request\x20sent','SalesforceAccount,\x20%s,\x20%s,\x20%s','error','code','message','SalesforceAccount','findAll','raw','options','attributes','limit','include','map','model','GetSalesforceAccount','debug','stringify','catch','ShowSalesforceAccount','find','then','moment','bluebird','randomstring','ioredis','../../config/utils','../../config/logger','rpc','../../config/environment','http'];(function(_0x1754db,_0x3e32f7){var _0x273e77=function(_0x2c71c3){while(--_0x2c71c3){_0x1754db['push'](_0x1754db['shift']());}};_0x273e77(++_0x3e32f7);}(_0xc41e,0x9c));var _0xec41=function(_0x1d1779,_0x284147){_0x1d1779=_0x1d1779-0x0;var _0x2377e9=_0xc41e[_0x1d1779];return _0x2377e9;};'use strict';var _=require('lodash');var util=require('util');var moment=require(_0xec41('0x0'));var BPromise=require(_0xec41('0x1'));var rs=require(_0xec41('0x2'));var fs=require('fs');var Redis=require(_0xec41('0x3'));var db=require('../../mysqldb')['db'];var utils=require(_0xec41('0x4'));var logger=require(_0xec41('0x5'))(_0xec41('0x6'));var config=require(_0xec41('0x7'));var jayson=require('jayson/promise');var client=jayson['client'][_0xec41('0x8')]({'port':0x232a});function respondWithRpcPromise(_0x399dcd,_0x4bb934,_0x26f811){return new BPromise(function(_0x5cd1b3,_0x186449){return client[_0xec41('0x9')](_0x399dcd,_0x26f811)['then'](function(_0x2b8186){logger[_0xec41('0xa')](_0xec41('0xb'),_0x4bb934,_0xec41('0xc'));logger['debug'](_0xec41('0xd'),_0x4bb934,_0xec41('0xc'),JSON['stringify'](_0x2b8186));if(_0x2b8186[_0xec41('0xe')]){if(_0x2b8186[_0xec41('0xe')][_0xec41('0xf')]===0x1f4){logger[_0xec41('0xe')](_0xec41('0xb'),_0x4bb934,_0x2b8186['error'][_0xec41('0x10')]);return _0x186449(_0x2b8186[_0xec41('0xe')][_0xec41('0x10')]);}logger[_0xec41('0xe')]('SalesforceAccount,\x20%s,\x20%s',_0x4bb934,_0x2b8186[_0xec41('0xe')][_0xec41('0x10')]);return _0x5cd1b3(_0x2b8186[_0xec41('0xe')][_0xec41('0x10')]);}else{logger['info'](_0xec41('0xb'),_0x4bb934,_0xec41('0xc'));_0x5cd1b3(_0x2b8186['result']['message']);}})['catch'](function(_0x3053be){logger['error'](_0xec41('0xb'),_0x4bb934,_0x3053be);_0x186449(_0x3053be);});});}exports['GetSalesforceAccount']=function(_0x591aef){var _0x4a84f8=this;return new Promise(function(_0x1172a7,_0x2f0ef7){return db[_0xec41('0x11')][_0xec41('0x12')]({'raw':_0x591aef['options']?_0x591aef['options'][_0xec41('0x13')]===undefined?!![]:![]:!![],'where':_0x591aef[_0xec41('0x14')]?_0x591aef[_0xec41('0x14')]['where']||null:null,'attributes':_0x591aef['options']?_0x591aef[_0xec41('0x14')][_0xec41('0x15')]||null:null,'limit':_0x591aef['options']?_0x591aef[_0xec41('0x14')][_0xec41('0x16')]||null:null,'include':_0x591aef['options']?_0x591aef['options'][_0xec41('0x17')]?_['map'](_0x591aef[_0xec41('0x14')][_0xec41('0x17')],function(_0x163043){return{'model':db[_0x163043['model']],'as':_0x163043['as'],'attributes':_0x163043[_0xec41('0x15')],'include':_0x163043[_0xec41('0x17')]?_[_0xec41('0x18')](_0x163043[_0xec41('0x17')],function(_0x3f0d16){return{'model':db[_0x3f0d16[_0xec41('0x19')]],'as':_0x3f0d16['as'],'attributes':_0x3f0d16[_0xec41('0x15')],'include':_0x3f0d16[_0xec41('0x17')]?_[_0xec41('0x18')](_0x3f0d16[_0xec41('0x17')],function(_0x5c4238){return{'model':db[_0x5c4238['model']],'as':_0x5c4238['as'],'attributes':_0x5c4238['attributes']};}):[]};}):[]};}):[]:[]})['then'](function(_0x593ad5){logger['info'](_0xec41('0x1a'),_0x591aef);logger[_0xec41('0x1b')](_0xec41('0x1a'),_0x591aef,JSON[_0xec41('0x1c')](_0x593ad5));_0x1172a7(_0x593ad5);})[_0xec41('0x1d')](function(_0xf9d92e){logger[_0xec41('0xe')](_0xec41('0x1a'),_0xf9d92e['message'],_0x591aef);_0x2f0ef7(_0x4a84f8[_0xec41('0xe')](0x1f4,_0xf9d92e[_0xec41('0x10')]));});});};exports[_0xec41('0x1e')]=function(_0x20bce8){var _0x4d6c7f=this;return new Promise(function(_0x133ea2,_0x560ef3){return db[_0xec41('0x11')][_0xec41('0x1f')]({'raw':_0x20bce8[_0xec41('0x14')]?_0x20bce8[_0xec41('0x14')]['raw']===undefined?!![]:![]:!![],'where':_0x20bce8[_0xec41('0x14')]?_0x20bce8[_0xec41('0x14')]['where']||null:null,'attributes':_0x20bce8[_0xec41('0x14')]?_0x20bce8[_0xec41('0x14')][_0xec41('0x15')]||null:null,'include':_0x20bce8[_0xec41('0x14')]?_0x20bce8[_0xec41('0x14')][_0xec41('0x17')]?_[_0xec41('0x18')](_0x20bce8[_0xec41('0x14')][_0xec41('0x17')],function(_0x6bab1e){return{'model':db[_0x6bab1e[_0xec41('0x19')]],'as':_0x6bab1e['as'],'attributes':_0x6bab1e[_0xec41('0x15')],'include':_0x6bab1e['include']?_[_0xec41('0x18')](_0x6bab1e[_0xec41('0x17')],function(_0x1c35da){return{'model':db[_0x1c35da[_0xec41('0x19')]],'as':_0x1c35da['as'],'attributes':_0x1c35da['attributes'],'include':_0x1c35da[_0xec41('0x17')]?_['map'](_0x1c35da[_0xec41('0x17')],function(_0x1bbb5f){return{'model':db[_0x1bbb5f['model']],'as':_0x1bbb5f['as'],'attributes':_0x1bbb5f[_0xec41('0x15')]};}):[]};}):[]};}):[]:[]})[_0xec41('0x20')](function(_0x3a3c85){logger[_0xec41('0xa')](_0xec41('0x1e'),_0x20bce8);logger[_0xec41('0x1b')]('ShowSalesforceAccount',_0x20bce8,JSON[_0xec41('0x1c')](_0x3a3c85));_0x133ea2(_0x3a3c85);})[_0xec41('0x1d')](function(_0x2cad1d){logger[_0xec41('0xe')](_0xec41('0x1e'),_0x2cad1d[_0xec41('0x10')],_0x20bce8);_0x560ef3(_0x4d6c7f[_0xec41('0xe')](0x1f4,_0x2cad1d[_0xec41('0x10')]));});});}; \ No newline at end of file +var _0xdc45=['ShowSalesforceAccount','find','lodash','util','moment','randomstring','../../config/utils','../../config/logger','rpc','../../config/environment','client','http','request','then','info','SalesforceAccount,\x20%s,\x20%s','debug','request\x20sent','error','code','message','result','catch','GetSalesforceAccount','SalesforceAccount','options','raw','where','limit','include','map','attributes','model','stringify'];(function(_0x35de6f,_0x42689b){var _0x478c89=function(_0x39015f){while(--_0x39015f){_0x35de6f['push'](_0x35de6f['shift']());}};_0x478c89(++_0x42689b);}(_0xdc45,0x156));var _0x5dc4=function(_0x20cdea,_0x57e509){_0x20cdea=_0x20cdea-0x0;var _0x58e655=_0xdc45[_0x20cdea];return _0x58e655;};'use strict';var _=require(_0x5dc4('0x0'));var util=require(_0x5dc4('0x1'));var moment=require(_0x5dc4('0x2'));var BPromise=require('bluebird');var rs=require(_0x5dc4('0x3'));var fs=require('fs');var Redis=require('ioredis');var db=require('../../mysqldb')['db'];var utils=require(_0x5dc4('0x4'));var logger=require(_0x5dc4('0x5'))(_0x5dc4('0x6'));var config=require(_0x5dc4('0x7'));var jayson=require('jayson/promise');var client=jayson[_0x5dc4('0x8')][_0x5dc4('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x438a82,_0x480ab2,_0x5268e4){return new BPromise(function(_0xd60c91,_0x5f0a20){return client[_0x5dc4('0xa')](_0x438a82,_0x5268e4)[_0x5dc4('0xb')](function(_0x429c49){logger[_0x5dc4('0xc')](_0x5dc4('0xd'),_0x480ab2,'request\x20sent');logger[_0x5dc4('0xe')]('SalesforceAccount,\x20%s,\x20%s,\x20%s',_0x480ab2,_0x5dc4('0xf'),JSON['stringify'](_0x429c49));if(_0x429c49[_0x5dc4('0x10')]){if(_0x429c49[_0x5dc4('0x10')][_0x5dc4('0x11')]===0x1f4){logger['error'](_0x5dc4('0xd'),_0x480ab2,_0x429c49[_0x5dc4('0x10')][_0x5dc4('0x12')]);return _0x5f0a20(_0x429c49[_0x5dc4('0x10')][_0x5dc4('0x12')]);}logger[_0x5dc4('0x10')](_0x5dc4('0xd'),_0x480ab2,_0x429c49[_0x5dc4('0x10')][_0x5dc4('0x12')]);return _0xd60c91(_0x429c49['error'][_0x5dc4('0x12')]);}else{logger[_0x5dc4('0xc')](_0x5dc4('0xd'),_0x480ab2,_0x5dc4('0xf'));_0xd60c91(_0x429c49[_0x5dc4('0x13')][_0x5dc4('0x12')]);}})[_0x5dc4('0x14')](function(_0x42606b){logger[_0x5dc4('0x10')]('SalesforceAccount,\x20%s,\x20%s',_0x480ab2,_0x42606b);_0x5f0a20(_0x42606b);});});}exports[_0x5dc4('0x15')]=function(_0x5d528b){var _0x54647f=this;return new Promise(function(_0x30204b,_0x42f537){return db[_0x5dc4('0x16')]['findAll']({'raw':_0x5d528b[_0x5dc4('0x17')]?_0x5d528b[_0x5dc4('0x17')][_0x5dc4('0x18')]===undefined?!![]:![]:!![],'where':_0x5d528b[_0x5dc4('0x17')]?_0x5d528b[_0x5dc4('0x17')][_0x5dc4('0x19')]||null:null,'attributes':_0x5d528b[_0x5dc4('0x17')]?_0x5d528b[_0x5dc4('0x17')]['attributes']||null:null,'limit':_0x5d528b['options']?_0x5d528b[_0x5dc4('0x17')][_0x5dc4('0x1a')]||null:null,'include':_0x5d528b[_0x5dc4('0x17')]?_0x5d528b['options'][_0x5dc4('0x1b')]?_[_0x5dc4('0x1c')](_0x5d528b['options'][_0x5dc4('0x1b')],function(_0x146b81){return{'model':db[_0x146b81['model']],'as':_0x146b81['as'],'attributes':_0x146b81[_0x5dc4('0x1d')],'include':_0x146b81['include']?_[_0x5dc4('0x1c')](_0x146b81[_0x5dc4('0x1b')],function(_0x45c603){return{'model':db[_0x45c603[_0x5dc4('0x1e')]],'as':_0x45c603['as'],'attributes':_0x45c603[_0x5dc4('0x1d')],'include':_0x45c603[_0x5dc4('0x1b')]?_['map'](_0x45c603[_0x5dc4('0x1b')],function(_0x1002f5){return{'model':db[_0x1002f5[_0x5dc4('0x1e')]],'as':_0x1002f5['as'],'attributes':_0x1002f5[_0x5dc4('0x1d')]};}):[]};}):[]};}):[]:[]})[_0x5dc4('0xb')](function(_0x45ed58){logger['info'](_0x5dc4('0x15'),_0x5d528b);logger[_0x5dc4('0xe')](_0x5dc4('0x15'),_0x5d528b,JSON[_0x5dc4('0x1f')](_0x45ed58));_0x30204b(_0x45ed58);})[_0x5dc4('0x14')](function(_0x24d4f0){logger[_0x5dc4('0x10')](_0x5dc4('0x15'),_0x24d4f0['message'],_0x5d528b);_0x42f537(_0x54647f[_0x5dc4('0x10')](0x1f4,_0x24d4f0[_0x5dc4('0x12')]));});});};exports[_0x5dc4('0x20')]=function(_0x284dd9){var _0x148754=this;return new Promise(function(_0x4c195b,_0x23ad95){return db[_0x5dc4('0x16')][_0x5dc4('0x21')]({'raw':_0x284dd9[_0x5dc4('0x17')]?_0x284dd9[_0x5dc4('0x17')][_0x5dc4('0x18')]===undefined?!![]:![]:!![],'where':_0x284dd9['options']?_0x284dd9['options']['where']||null:null,'attributes':_0x284dd9['options']?_0x284dd9[_0x5dc4('0x17')]['attributes']||null:null,'include':_0x284dd9['options']?_0x284dd9['options'][_0x5dc4('0x1b')]?_[_0x5dc4('0x1c')](_0x284dd9[_0x5dc4('0x17')][_0x5dc4('0x1b')],function(_0x334772){return{'model':db[_0x334772[_0x5dc4('0x1e')]],'as':_0x334772['as'],'attributes':_0x334772['attributes'],'include':_0x334772[_0x5dc4('0x1b')]?_[_0x5dc4('0x1c')](_0x334772[_0x5dc4('0x1b')],function(_0x5ed0fc){return{'model':db[_0x5ed0fc['model']],'as':_0x5ed0fc['as'],'attributes':_0x5ed0fc['attributes'],'include':_0x5ed0fc[_0x5dc4('0x1b')]?_[_0x5dc4('0x1c')](_0x5ed0fc['include'],function(_0x34f0dc){return{'model':db[_0x34f0dc[_0x5dc4('0x1e')]],'as':_0x34f0dc['as'],'attributes':_0x34f0dc[_0x5dc4('0x1d')]};}):[]};}):[]};}):[]:[]})['then'](function(_0x13b8f7){logger[_0x5dc4('0xc')](_0x5dc4('0x20'),_0x284dd9);logger['debug'](_0x5dc4('0x20'),_0x284dd9,JSON[_0x5dc4('0x1f')](_0x13b8f7));_0x4c195b(_0x13b8f7);})[_0x5dc4('0x14')](function(_0x2742e7){logger['error']('ShowSalesforceAccount',_0x2742e7[_0x5dc4('0x12')],_0x284dd9);_0x23ad95(_0x148754[_0x5dc4('0x10')](0x1f4,_0x2742e7[_0x5dc4('0x12')]));});});}; \ No newline at end of file diff --git a/server/api/intSalesforceConfiguration/index.js b/server/api/intSalesforceConfiguration/index.js index 66f5dd0..43a0a18 100644 --- a/server/api/intSalesforceConfiguration/index.js +++ b/server/api/intSalesforceConfiguration/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xadb5=['Router','../../components/auth/service','../../components/interaction/service','../../config/environment','get','isAuthenticated','index','/:id','show','/:id/fields','getFields','/:id/subjects','/:id/descriptions','getDescriptions','put','update','delete','destroy','exports','util','connect-timeout','express'];(function(_0x5cdb26,_0x190971){var _0x5b9a7c=function(_0x348d39){while(--_0x348d39){_0x5cdb26['push'](_0x5cdb26['shift']());}};_0x5b9a7c(++_0x190971);}(_0xadb5,0xad));var _0x5adb=function(_0x4cb6b8,_0x5dcb56){_0x4cb6b8=_0x4cb6b8-0x0;var _0x16a49e=_0xadb5[_0x4cb6b8];return _0x16a49e;};'use strict';var multer=require('multer');var util=require(_0x5adb('0x0'));var path=require('path');var timeout=require(_0x5adb('0x1'));var express=require(_0x5adb('0x2'));var router=express[_0x5adb('0x3')]();var fs_extra=require('fs-extra');var auth=require(_0x5adb('0x4'));var interaction=require(_0x5adb('0x5'));var config=require(_0x5adb('0x6'));var controller=require('./intSalesforceConfiguration.controller');router[_0x5adb('0x7')]('/',auth[_0x5adb('0x8')](),controller[_0x5adb('0x9')]);router[_0x5adb('0x7')](_0x5adb('0xa'),auth[_0x5adb('0x8')](),controller[_0x5adb('0xb')]);router[_0x5adb('0x7')](_0x5adb('0xc'),auth[_0x5adb('0x8')](),controller[_0x5adb('0xd')]);router[_0x5adb('0x7')](_0x5adb('0xe'),auth[_0x5adb('0x8')](),controller['getSubjects']);router['get'](_0x5adb('0xf'),auth[_0x5adb('0x8')](),controller[_0x5adb('0x10')]);router['post']('/',auth[_0x5adb('0x8')](),controller['create']);router[_0x5adb('0x11')]('/:id',auth[_0x5adb('0x8')](),controller[_0x5adb('0x12')]);router[_0x5adb('0x13')]('/:id',auth[_0x5adb('0x8')](),controller[_0x5adb('0x14')]);module[_0x5adb('0x15')]=router; \ No newline at end of file +var _0x5f2f=['Router','fs-extra','../../components/auth/service','./intSalesforceConfiguration.controller','get','isAuthenticated','index','/:id','show','/:id/fields','getFields','/:id/subjects','getSubjects','getDescriptions','create','put','update','destroy','exports','multer','util','path','connect-timeout','express'];(function(_0x70d5e9,_0x5eef5d){var _0x5df019=function(_0xcc7f4b){while(--_0xcc7f4b){_0x70d5e9['push'](_0x70d5e9['shift']());}};_0x5df019(++_0x5eef5d);}(_0x5f2f,0x73));var _0xf5f2=function(_0x4750ca,_0x2e513b){_0x4750ca=_0x4750ca-0x0;var _0x2f6418=_0x5f2f[_0x4750ca];return _0x2f6418;};'use strict';var multer=require(_0xf5f2('0x0'));var util=require(_0xf5f2('0x1'));var path=require(_0xf5f2('0x2'));var timeout=require(_0xf5f2('0x3'));var express=require(_0xf5f2('0x4'));var router=express[_0xf5f2('0x5')]();var fs_extra=require(_0xf5f2('0x6'));var auth=require(_0xf5f2('0x7'));var interaction=require('../../components/interaction/service');var config=require('../../config/environment');var controller=require(_0xf5f2('0x8'));router[_0xf5f2('0x9')]('/',auth[_0xf5f2('0xa')](),controller[_0xf5f2('0xb')]);router[_0xf5f2('0x9')](_0xf5f2('0xc'),auth['isAuthenticated'](),controller[_0xf5f2('0xd')]);router[_0xf5f2('0x9')](_0xf5f2('0xe'),auth['isAuthenticated'](),controller[_0xf5f2('0xf')]);router[_0xf5f2('0x9')](_0xf5f2('0x10'),auth['isAuthenticated'](),controller[_0xf5f2('0x11')]);router['get']('/:id/descriptions',auth[_0xf5f2('0xa')](),controller[_0xf5f2('0x12')]);router['post']('/',auth[_0xf5f2('0xa')](),controller[_0xf5f2('0x13')]);router[_0xf5f2('0x14')](_0xf5f2('0xc'),auth[_0xf5f2('0xa')](),controller[_0xf5f2('0x15')]);router['delete'](_0xf5f2('0xc'),auth[_0xf5f2('0xa')](),controller[_0xf5f2('0x16')]);module[_0xf5f2('0x17')]=router; \ No newline at end of file diff --git a/server/api/intSalesforceConfiguration/intSalesforceConfiguration.attributes.js b/server/api/intSalesforceConfiguration/intSalesforceConfiguration.attributes.js index 815aeee..3e10e7a 100644 --- a/server/api/intSalesforceConfiguration/intSalesforceConfiguration.attributes.js +++ b/server/api/intSalesforceConfiguration/intSalesforceConfiguration.attributes.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xa7ef=['nothing','lead','sequelize','STRING','ENUM','Task','Case','contact_lead','contact','account'];(function(_0x4db483,_0x5293a9){var _0x401534=function(_0x15d072){while(--_0x15d072){_0x4db483['push'](_0x4db483['shift']());}};_0x401534(++_0x5293a9);}(_0xa7ef,0x70));var _0xfa7e=function(_0x59c342,_0x279360){_0x59c342=_0x59c342-0x0;var _0x53de94=_0xa7ef[_0x59c342];return _0x53de94;};'use strict';var Sequelize=require(_0xfa7e('0x0'));module['exports']={'name':{'type':Sequelize['STRING']},'description':{'type':Sequelize[_0xfa7e('0x1')]},'ticketType':{'type':Sequelize[_0xfa7e('0x2')](_0xfa7e('0x3'),_0xfa7e('0x4')),'defaultValue':_0xfa7e('0x3')},'moduleSearch':{'type':Sequelize[_0xfa7e('0x2')](_0xfa7e('0x5'),_0xfa7e('0x6'),'lead','account_contact_lead',_0xfa7e('0x7')),'defaultValue':_0xfa7e('0x5')},'moduleCreate':{'type':Sequelize[_0xfa7e('0x2')](_0xfa7e('0x8'),_0xfa7e('0x6'),_0xfa7e('0x9'),_0xfa7e('0x7')),'defaultValue':'lead'},'leadId':{'type':Sequelize[_0xfa7e('0x1')]},'additionalSearchAccount':{'type':Sequelize[_0xfa7e('0x1')]},'additionalSearchContact':{'type':Sequelize[_0xfa7e('0x1')]},'additionalSearchLead':{'type':Sequelize['STRING']}}; \ No newline at end of file +var _0xbfca=['STRING','ENUM','Case','Task','contact','account_contact_lead','account','contact_lead','nothing','lead','sequelize','exports'];(function(_0x50ab95,_0x480438){var _0x2c62cd=function(_0x2af369){while(--_0x2af369){_0x50ab95['push'](_0x50ab95['shift']());}};_0x2c62cd(++_0x480438);}(_0xbfca,0x112));var _0xabfc=function(_0x4d33f9,_0x431815){_0x4d33f9=_0x4d33f9-0x0;var _0x4d4ced=_0xbfca[_0x4d33f9];return _0x4d4ced;};'use strict';var Sequelize=require(_0xabfc('0x0'));module[_0xabfc('0x1')]={'name':{'type':Sequelize[_0xabfc('0x2')]},'description':{'type':Sequelize[_0xabfc('0x2')]},'ticketType':{'type':Sequelize[_0xabfc('0x3')]('Task',_0xabfc('0x4')),'defaultValue':_0xabfc('0x5')},'moduleSearch':{'type':Sequelize[_0xabfc('0x3')]('contact_lead',_0xabfc('0x6'),'lead',_0xabfc('0x7'),_0xabfc('0x8')),'defaultValue':_0xabfc('0x9')},'moduleCreate':{'type':Sequelize[_0xabfc('0x3')](_0xabfc('0xa'),_0xabfc('0x6'),_0xabfc('0xb'),'account'),'defaultValue':_0xabfc('0xb')},'leadId':{'type':Sequelize[_0xabfc('0x2')]},'additionalSearchAccount':{'type':Sequelize[_0xabfc('0x2')]},'additionalSearchContact':{'type':Sequelize['STRING']},'additionalSearchLead':{'type':Sequelize[_0xabfc('0x2')]}}; \ No newline at end of file diff --git a/server/api/intSalesforceConfiguration/intSalesforceConfiguration.controller.js b/server/api/intSalesforceConfiguration/intSalesforceConfiguration.controller.js index 08403cb..c4fee20 100644 --- a/server/api/intSalesforceConfiguration/intSalesforceConfiguration.controller.js +++ b/server/api/intSalesforceConfiguration/intSalesforceConfiguration.controller.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xa04d=['Content-Range','apply','save','update','then','destroy','end','error','stack','name','send','index','SalesforceConfiguration','rawAttributes','fieldName','type','model','map','keys','query','intersection','attributes','fields','hasOwnProperty','order','sort','where','pick','filters','merge','options','includeAll','findAll','rows','catch','show','params','length','include','find','create','body','getFields','findOne','filter','nolimit','getSubjects','getDescriptions','SalesforceField','rimraf','zip-dir','request-promise','moment','bluebird','mustache','to-csv','ejs','fs-extra','squel','crypto','desk.js','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','sendStatus','status','json','offset','undefined','limit','count'];(function(_0x3c5955,_0x48bbbc){var _0x1e902f=function(_0x3bf8f5){while(--_0x3bf8f5){_0x3c5955['push'](_0x3c5955['shift']());}};_0x1e902f(++_0x48bbbc);}(_0xa04d,0x118));var _0xda04=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0xa04d[_0x3dd15e];return _0x231fd0;};'use strict';var emlformat=require('eml-format');var rimraf=require(_0xda04('0x0'));var zipdir=require(_0xda04('0x1'));var jsonpatch=require('fast-json-patch');var rp=require(_0xda04('0x2'));var moment=require(_0xda04('0x3'));var BPromise=require(_0xda04('0x4'));var Mustache=require(_0xda04('0x5'));var util=require('util');var path=require('path');var sox=require('sox');var csv=require(_0xda04('0x6'));var ejs=require(_0xda04('0x7'));var fs=require('fs');var fs_extra=require(_0xda04('0x8'));var _=require('lodash');var squel=require(_0xda04('0x9'));var crypto=require(_0xda04('0xa'));var jsforce=require('jsforce');var deskjs=require(_0xda04('0xb'));var toCsv=require(_0xda04('0x6'));var querystring=require('querystring');var Papa=require(_0xda04('0xc'));var Redis=require(_0xda04('0xd'));var authService=require(_0xda04('0xe'));var qs=require(_0xda04('0xf'));var as=require(_0xda04('0x10'));var hardwareService=require(_0xda04('0x11'));var logger=require(_0xda04('0x12'))(_0xda04('0x13'));var utils=require(_0xda04('0x14'));var config=require('../../config/environment');var licenseUtil=require('../../config/license/util');var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0x7ad41c,_0x1a1a9e){_0x1a1a9e=_0x1a1a9e||0xcc;return function(_0x411646){if(_0x411646){return _0x7ad41c[_0xda04('0x15')](_0x1a1a9e);}return _0x7ad41c[_0xda04('0x16')](_0x1a1a9e)['end']();};}function respondWithResult(_0x5d3f8e,_0x3222a1){_0x3222a1=_0x3222a1||0xc8;return function(_0x4a0c82){if(_0x4a0c82){return _0x5d3f8e[_0xda04('0x16')](_0x3222a1)[_0xda04('0x17')](_0x4a0c82);}};}function respondWithFilteredResult(_0x4aeb51,_0x1dc9c3){return function(_0x121e3d){if(_0x121e3d){var _0x1cba78=typeof _0x1dc9c3[_0xda04('0x18')]===_0xda04('0x19')&&typeof _0x1dc9c3[_0xda04('0x1a')]===_0xda04('0x19');var _0x9c787=_0x121e3d[_0xda04('0x1b')];var _0x15b92d=_0x1cba78?0x0:_0x1dc9c3['offset'];var _0x17c0c3=_0x1cba78?_0x121e3d[_0xda04('0x1b')]:_0x1dc9c3['offset']+_0x1dc9c3['limit'];var _0x36a290;if(_0x17c0c3>=_0x9c787){_0x17c0c3=_0x9c787;_0x36a290=0xc8;}else{_0x36a290=0xce;}_0x4aeb51['status'](_0x36a290);return _0x4aeb51['set'](_0xda04('0x1c'),_0x15b92d+'-'+_0x17c0c3+'/'+_0x9c787)[_0xda04('0x17')](_0x121e3d);}return null;};}function patchUpdates(_0x49cf19){return function(_0x399870){try{jsonpatch[_0xda04('0x1d')](_0x399870,_0x49cf19,!![]);}catch(_0x200bf9){return BPromise['reject'](_0x200bf9);}return _0x399870[_0xda04('0x1e')]();};}function saveUpdates(_0x2c8314,_0x3be566){return function(_0x4296a1){if(_0x4296a1){return _0x4296a1[_0xda04('0x1f')](_0x2c8314)[_0xda04('0x20')](function(_0x2ec244){return _0x2ec244;});}return null;};}function removeEntity(_0x4a4257,_0xe2cb06){return function(_0x16c336){if(_0x16c336){return _0x16c336[_0xda04('0x21')]()[_0xda04('0x20')](function(){_0x4a4257[_0xda04('0x16')](0xcc)[_0xda04('0x22')]();});}};}function handleEntityNotFound(_0x5cb9da,_0x59d80b){return function(_0x166e63){if(!_0x166e63){_0x5cb9da[_0xda04('0x15')](0x194);}return _0x166e63;};}function handleError(_0x27d447,_0x2b2cd8){_0x2b2cd8=_0x2b2cd8||0x1f4;return function(_0x101ef4){logger[_0xda04('0x23')](_0x101ef4[_0xda04('0x24')]);if(_0x101ef4[_0xda04('0x25')]){delete _0x101ef4[_0xda04('0x25')];}_0x27d447[_0xda04('0x16')](_0x2b2cd8)[_0xda04('0x26')](_0x101ef4);};}exports[_0xda04('0x27')]=function(_0x18f586,_0x3f5392){var _0x18b41f={},_0x374e43={},_0x5ce7cb={'count':0x0,'rows':[]};var _0x137dca=_['map'](db[_0xda04('0x28')][_0xda04('0x29')],function(_0x5c9e54){return{'name':_0x5c9e54[_0xda04('0x2a')],'type':_0x5c9e54[_0xda04('0x2b')]['key']};});_0x374e43[_0xda04('0x2c')]=_[_0xda04('0x2d')](_0x137dca,_0xda04('0x25'));_0x374e43['query']=_[_0xda04('0x2e')](_0x18f586[_0xda04('0x2f')]);_0x374e43['filters']=_[_0xda04('0x30')](_0x374e43[_0xda04('0x2c')],_0x374e43[_0xda04('0x2f')]);_0x18b41f[_0xda04('0x31')]=_[_0xda04('0x30')](_0x374e43[_0xda04('0x2c')],qs[_0xda04('0x32')](_0x18f586[_0xda04('0x2f')]['fields']));_0x18b41f[_0xda04('0x31')]=_0x18b41f[_0xda04('0x31')]['length']?_0x18b41f[_0xda04('0x31')]:_0x374e43[_0xda04('0x2c')];if(!_0x18f586[_0xda04('0x2f')][_0xda04('0x33')]('nolimit')){_0x18b41f[_0xda04('0x1a')]=qs[_0xda04('0x1a')](_0x18f586[_0xda04('0x2f')][_0xda04('0x1a')]);_0x18b41f[_0xda04('0x18')]=qs[_0xda04('0x18')](_0x18f586[_0xda04('0x2f')][_0xda04('0x18')]);}_0x18b41f[_0xda04('0x34')]=qs['sort'](_0x18f586[_0xda04('0x2f')][_0xda04('0x35')]);_0x18b41f[_0xda04('0x36')]=qs['filters'](_[_0xda04('0x37')](_0x18f586[_0xda04('0x2f')],_0x374e43[_0xda04('0x38')]),_0x137dca);if(_0x18f586['query']['filter']){_0x18b41f[_0xda04('0x36')]=_[_0xda04('0x39')](_0x18b41f[_0xda04('0x36')],{'$or':_[_0xda04('0x2d')](_0x137dca,function(_0x53c302){if(_0x53c302[_0xda04('0x2b')]!=='VIRTUAL'){var _0x4a36cb={};_0x4a36cb[_0x53c302['name']]={'$like':'%'+_0x18f586[_0xda04('0x2f')]['filter']+'%'};return _0x4a36cb;}})});}_0x18b41f=_[_0xda04('0x39')]({},_0x18b41f,_0x18f586[_0xda04('0x3a')]);var _0x5b571a={'where':_0x18b41f[_0xda04('0x36')]};return db[_0xda04('0x28')][_0xda04('0x1b')](_0x5b571a)[_0xda04('0x20')](function(_0x47e56a){_0x5ce7cb['count']=_0x47e56a;if(_0x18f586['query'][_0xda04('0x3b')]){_0x18b41f['include']=[{'all':!![]}];}return db['SalesforceConfiguration'][_0xda04('0x3c')](_0x18b41f);})[_0xda04('0x20')](function(_0x2331d0){_0x5ce7cb[_0xda04('0x3d')]=_0x2331d0;return _0x5ce7cb;})[_0xda04('0x20')](respondWithFilteredResult(_0x3f5392,_0x18b41f))[_0xda04('0x3e')](handleError(_0x3f5392,null));};exports[_0xda04('0x3f')]=function(_0x1eba9b,_0x1e9579){var _0xddfbd0={'raw':![],'where':{'id':_0x1eba9b[_0xda04('0x40')]['id']}},_0x3025fa={};_0x3025fa[_0xda04('0x2c')]=_[_0xda04('0x2e')](db[_0xda04('0x28')][_0xda04('0x29')]);_0x3025fa[_0xda04('0x2f')]=_[_0xda04('0x2e')](_0x1eba9b[_0xda04('0x2f')]);_0x3025fa['filters']=_['intersection'](_0x3025fa[_0xda04('0x2c')],_0x3025fa[_0xda04('0x2f')]);_0xddfbd0[_0xda04('0x31')]=_[_0xda04('0x30')](_0x3025fa[_0xda04('0x2c')],qs[_0xda04('0x32')](_0x1eba9b[_0xda04('0x2f')]['fields']));_0xddfbd0[_0xda04('0x31')]=_0xddfbd0[_0xda04('0x31')][_0xda04('0x41')]?_0xddfbd0[_0xda04('0x31')]:_0x3025fa[_0xda04('0x2c')];if(_0x1eba9b[_0xda04('0x2f')]['includeAll']){_0xddfbd0[_0xda04('0x42')]=[{'all':!![]}];}_0xddfbd0=_['merge']({},_0xddfbd0,_0x1eba9b['options']);return db['SalesforceConfiguration'][_0xda04('0x43')](_0xddfbd0)[_0xda04('0x20')](handleEntityNotFound(_0x1e9579,null))[_0xda04('0x20')](respondWithResult(_0x1e9579,null))['catch'](handleError(_0x1e9579,null));};exports[_0xda04('0x44')]=function(_0x4a57fd,_0x30152a){return db[_0xda04('0x28')][_0xda04('0x44')](_0x4a57fd[_0xda04('0x45')],{})[_0xda04('0x20')](respondWithResult(_0x30152a,0xc9))['catch'](handleError(_0x30152a,null));};exports['update']=function(_0x58284a,_0x42a5ca){if(_0x58284a['body']['id']){delete _0x58284a[_0xda04('0x45')]['id'];}return db[_0xda04('0x28')][_0xda04('0x43')]({'where':{'id':_0x58284a[_0xda04('0x40')]['id']}})[_0xda04('0x20')](handleEntityNotFound(_0x42a5ca,null))[_0xda04('0x20')](saveUpdates(_0x58284a['body'],null))[_0xda04('0x20')](respondWithResult(_0x42a5ca,null))[_0xda04('0x3e')](handleError(_0x42a5ca,null));};exports['destroy']=function(_0x363b6a,_0x4545a7){return db['SalesforceConfiguration']['find']({'where':{'id':_0x363b6a[_0xda04('0x40')]['id']}})[_0xda04('0x20')](handleEntityNotFound(_0x4545a7,null))[_0xda04('0x20')](removeEntity(_0x4545a7,null))[_0xda04('0x3e')](handleError(_0x4545a7,null));};exports[_0xda04('0x46')]=function(_0x471c1b,_0x1d9611,_0x2f442f){var _0x4f8360={};var _0x5e4374={};var _0xd81393;var _0x4fe63a;return db[_0xda04('0x28')][_0xda04('0x47')]({'where':{'id':_0x471c1b[_0xda04('0x40')]['id']}})['then'](handleEntityNotFound(_0x1d9611,null))[_0xda04('0x20')](function(_0x21dae4){if(_0x21dae4){_0xd81393=_0x21dae4;_0x5e4374['model']=_[_0xda04('0x2e')](db['SalesforceField']['rawAttributes']);_0x5e4374['query']=_[_0xda04('0x2e')](_0x471c1b[_0xda04('0x2f')]);_0x5e4374[_0xda04('0x38')]=_[_0xda04('0x30')](_0x5e4374[_0xda04('0x2c')],_0x5e4374[_0xda04('0x2f')]);_0x4f8360[_0xda04('0x31')]=_[_0xda04('0x30')](_0x5e4374['model'],qs[_0xda04('0x32')](_0x471c1b[_0xda04('0x2f')]['fields']));_0x4f8360['attributes']=_0x4f8360['attributes']['length']?_0x4f8360[_0xda04('0x31')]:_0x5e4374[_0xda04('0x2c')];_0x4f8360[_0xda04('0x34')]=qs['sort'](_0x471c1b['query'][_0xda04('0x35')]);_0x4f8360[_0xda04('0x36')]=qs[_0xda04('0x38')](_[_0xda04('0x37')](_0x471c1b[_0xda04('0x2f')],_0x5e4374['filters']));if(_0x471c1b[_0xda04('0x2f')][_0xda04('0x48')]){_0x4f8360[_0xda04('0x36')]=_[_0xda04('0x39')](_0x4f8360[_0xda04('0x36')],{'$or':_[_0xda04('0x2d')](_0x4f8360[_0xda04('0x31')],function(_0x203667){var _0xe389f9={};_0xe389f9[_0x203667]={'$like':'%'+_0x471c1b['query'][_0xda04('0x48')]+'%'};return _0xe389f9;})});}_0x4f8360=_['merge']({},_0x4f8360,_0x471c1b[_0xda04('0x3a')]);return _0xd81393[_0xda04('0x46')](_0x4f8360);}})['then'](function(_0x432c47){if(_0x432c47){_0x4fe63a=_0x432c47['length'];if(!_0x471c1b[_0xda04('0x2f')][_0xda04('0x33')](_0xda04('0x49'))){_0x4f8360['limit']=qs[_0xda04('0x1a')](_0x471c1b[_0xda04('0x2f')][_0xda04('0x1a')]);_0x4f8360[_0xda04('0x18')]=qs['offset'](_0x471c1b[_0xda04('0x2f')][_0xda04('0x18')]);}return _0xd81393[_0xda04('0x46')](_0x4f8360);}})[_0xda04('0x20')](function(_0x37d14a){if(_0x37d14a){return _0x37d14a?{'count':_0x4fe63a,'rows':_0x37d14a}:null;}})[_0xda04('0x20')](respondWithResult(_0x1d9611,null))['catch'](handleError(_0x1d9611,null));};exports[_0xda04('0x4a')]=function(_0x1b7aaf,_0x244f4a,_0x29b589){var _0x414319={};var _0x1781f1={};var _0x1a03eb;var _0x3e070a;return db[_0xda04('0x28')][_0xda04('0x47')]({'where':{'id':_0x1b7aaf[_0xda04('0x40')]['id']}})[_0xda04('0x20')](handleEntityNotFound(_0x244f4a,null))[_0xda04('0x20')](function(_0x4acf2f){if(_0x4acf2f){_0x1a03eb=_0x4acf2f;_0x1781f1[_0xda04('0x2c')]=_[_0xda04('0x2e')](db['SalesforceField'][_0xda04('0x29')]);_0x1781f1[_0xda04('0x2f')]=_[_0xda04('0x2e')](_0x1b7aaf[_0xda04('0x2f')]);_0x1781f1[_0xda04('0x38')]=_['intersection'](_0x1781f1[_0xda04('0x2c')],_0x1781f1[_0xda04('0x2f')]);_0x414319[_0xda04('0x31')]=_['intersection'](_0x1781f1[_0xda04('0x2c')],qs[_0xda04('0x32')](_0x1b7aaf[_0xda04('0x2f')][_0xda04('0x32')]));_0x414319[_0xda04('0x31')]=_0x414319[_0xda04('0x31')]['length']?_0x414319[_0xda04('0x31')]:_0x1781f1['model'];_0x414319['order']=qs['sort'](_0x1b7aaf[_0xda04('0x2f')][_0xda04('0x35')]);_0x414319[_0xda04('0x36')]=qs[_0xda04('0x38')](_[_0xda04('0x37')](_0x1b7aaf['query'],_0x1781f1['filters']));if(_0x1b7aaf[_0xda04('0x2f')][_0xda04('0x48')]){_0x414319[_0xda04('0x36')]=_[_0xda04('0x39')](_0x414319['where'],{'$or':_[_0xda04('0x2d')](_0x414319['attributes'],function(_0x36c2fa){var _0xe37a85={};_0xe37a85[_0x36c2fa]={'$like':'%'+_0x1b7aaf[_0xda04('0x2f')]['filter']+'%'};return _0xe37a85;})});}_0x414319=_[_0xda04('0x39')]({},_0x414319,_0x1b7aaf[_0xda04('0x3a')]);return _0x1a03eb[_0xda04('0x4a')](_0x414319);}})[_0xda04('0x20')](function(_0x3d55cf){if(_0x3d55cf){_0x3e070a=_0x3d55cf[_0xda04('0x41')];if(!_0x1b7aaf[_0xda04('0x2f')][_0xda04('0x33')](_0xda04('0x49'))){_0x414319[_0xda04('0x1a')]=qs[_0xda04('0x1a')](_0x1b7aaf[_0xda04('0x2f')]['limit']);_0x414319['offset']=qs[_0xda04('0x18')](_0x1b7aaf[_0xda04('0x2f')][_0xda04('0x18')]);}return _0x1a03eb[_0xda04('0x4a')](_0x414319);}})['then'](function(_0x3b25fb){if(_0x3b25fb){return _0x3b25fb?{'count':_0x3e070a,'rows':_0x3b25fb}:null;}})[_0xda04('0x20')](respondWithResult(_0x244f4a,null))[_0xda04('0x3e')](handleError(_0x244f4a,null));};exports[_0xda04('0x4b')]=function(_0x54dc59,_0x35d3db,_0x1f7a2c){var _0x69a73a={};var _0x207a4e={};var _0x4381b1;var _0x501245;return db['SalesforceConfiguration'][_0xda04('0x47')]({'where':{'id':_0x54dc59[_0xda04('0x40')]['id']}})[_0xda04('0x20')](handleEntityNotFound(_0x35d3db,null))[_0xda04('0x20')](function(_0x3f5291){if(_0x3f5291){_0x4381b1=_0x3f5291;_0x207a4e[_0xda04('0x2c')]=_[_0xda04('0x2e')](db[_0xda04('0x4c')][_0xda04('0x29')]);_0x207a4e[_0xda04('0x2f')]=_[_0xda04('0x2e')](_0x54dc59['query']);_0x207a4e[_0xda04('0x38')]=_[_0xda04('0x30')](_0x207a4e[_0xda04('0x2c')],_0x207a4e[_0xda04('0x2f')]);_0x69a73a[_0xda04('0x31')]=_[_0xda04('0x30')](_0x207a4e['model'],qs['fields'](_0x54dc59[_0xda04('0x2f')][_0xda04('0x32')]));_0x69a73a[_0xda04('0x31')]=_0x69a73a[_0xda04('0x31')][_0xda04('0x41')]?_0x69a73a[_0xda04('0x31')]:_0x207a4e[_0xda04('0x2c')];_0x69a73a[_0xda04('0x34')]=qs['sort'](_0x54dc59[_0xda04('0x2f')][_0xda04('0x35')]);_0x69a73a['where']=qs[_0xda04('0x38')](_[_0xda04('0x37')](_0x54dc59[_0xda04('0x2f')],_0x207a4e[_0xda04('0x38')]));if(_0x54dc59['query'][_0xda04('0x48')]){_0x69a73a[_0xda04('0x36')]=_[_0xda04('0x39')](_0x69a73a[_0xda04('0x36')],{'$or':_[_0xda04('0x2d')](_0x69a73a['attributes'],function(_0x20fa2a){var _0x490231={};_0x490231[_0x20fa2a]={'$like':'%'+_0x54dc59[_0xda04('0x2f')]['filter']+'%'};return _0x490231;})});}_0x69a73a=_['merge']({},_0x69a73a,_0x54dc59[_0xda04('0x3a')]);return _0x4381b1[_0xda04('0x4b')](_0x69a73a);}})[_0xda04('0x20')](function(_0x276529){if(_0x276529){_0x501245=_0x276529[_0xda04('0x41')];if(!_0x54dc59['query'][_0xda04('0x33')]('nolimit')){_0x69a73a[_0xda04('0x1a')]=qs[_0xda04('0x1a')](_0x54dc59['query'][_0xda04('0x1a')]);_0x69a73a['offset']=qs[_0xda04('0x18')](_0x54dc59['query'][_0xda04('0x18')]);}return _0x4381b1['getDescriptions'](_0x69a73a);}})[_0xda04('0x20')](function(_0x326603){if(_0x326603){return _0x326603?{'count':_0x501245,'rows':_0x326603}:null;}})[_0xda04('0x20')](respondWithResult(_0x35d3db,null))['catch'](handleError(_0x35d3db,null));}; \ No newline at end of file +var _0x3e1f=['util','path','to-csv','ejs','fs-extra','lodash','jsforce','desk.js','querystring','papaparse','../../components/parsers/qs','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../mysqldb','status','end','json','offset','limit','undefined','count','set','Content-Range','apply','reject','save','update','then','destroy','sendStatus','error','stack','name','send','map','rawAttributes','fieldName','type','query','keys','filters','intersection','model','attributes','fields','length','hasOwnProperty','nolimit','order','sort','where','pick','filter','VIRTUAL','merge','options','SalesforceConfiguration','includeAll','include','findAll','rows','find','catch','create','body','params','getFields','findOne','SalesforceField','getSubjects','getDescriptions','rimraf','zip-dir','fast-json-patch','moment','bluebird','mustache'];(function(_0x172747,_0x1732bd){var _0x509692=function(_0x448c56){while(--_0x448c56){_0x172747['push'](_0x172747['shift']());}};_0x509692(++_0x1732bd);}(_0x3e1f,0x18a));var _0xf3e1=function(_0x4f1da5,_0x4ced17){_0x4f1da5=_0x4f1da5-0x0;var _0xe972a8=_0x3e1f[_0x4f1da5];return _0xe972a8;};'use strict';var emlformat=require('eml-format');var rimraf=require(_0xf3e1('0x0'));var zipdir=require(_0xf3e1('0x1'));var jsonpatch=require(_0xf3e1('0x2'));var rp=require('request-promise');var moment=require(_0xf3e1('0x3'));var BPromise=require(_0xf3e1('0x4'));var Mustache=require(_0xf3e1('0x5'));var util=require(_0xf3e1('0x6'));var path=require(_0xf3e1('0x7'));var sox=require('sox');var csv=require(_0xf3e1('0x8'));var ejs=require(_0xf3e1('0x9'));var fs=require('fs');var fs_extra=require(_0xf3e1('0xa'));var _=require(_0xf3e1('0xb'));var squel=require('squel');var crypto=require('crypto');var jsforce=require(_0xf3e1('0xc'));var deskjs=require(_0xf3e1('0xd'));var toCsv=require('to-csv');var querystring=require(_0xf3e1('0xe'));var Papa=require(_0xf3e1('0xf'));var Redis=require('ioredis');var authService=require('../../components/auth/service');var qs=require(_0xf3e1('0x10'));var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0xf3e1('0x11'));var logger=require(_0xf3e1('0x12'))(_0xf3e1('0x13'));var utils=require(_0xf3e1('0x14'));var config=require(_0xf3e1('0x15'));var licenseUtil=require('../../config/license/util');var db=require(_0xf3e1('0x16'))['db'];function respondWithStatusCode(_0x58ab03,_0xb69ec0){_0xb69ec0=_0xb69ec0||0xcc;return function(_0x449ed7){if(_0x449ed7){return _0x58ab03['sendStatus'](_0xb69ec0);}return _0x58ab03[_0xf3e1('0x17')](_0xb69ec0)[_0xf3e1('0x18')]();};}function respondWithResult(_0xfc07a2,_0x2f4722){_0x2f4722=_0x2f4722||0xc8;return function(_0x395668){if(_0x395668){return _0xfc07a2['status'](_0x2f4722)[_0xf3e1('0x19')](_0x395668);}};}function respondWithFilteredResult(_0x3061fa,_0xb18131){return function(_0x3dea57){if(_0x3dea57){var _0x3bce21=typeof _0xb18131[_0xf3e1('0x1a')]==='undefined'&&typeof _0xb18131[_0xf3e1('0x1b')]===_0xf3e1('0x1c');var _0x1bcb42=_0x3dea57[_0xf3e1('0x1d')];var _0x49b90c=_0x3bce21?0x0:_0xb18131[_0xf3e1('0x1a')];var _0x1598c0=_0x3bce21?_0x3dea57[_0xf3e1('0x1d')]:_0xb18131['offset']+_0xb18131[_0xf3e1('0x1b')];var _0xd97824;if(_0x1598c0>=_0x1bcb42){_0x1598c0=_0x1bcb42;_0xd97824=0xc8;}else{_0xd97824=0xce;}_0x3061fa[_0xf3e1('0x17')](_0xd97824);return _0x3061fa[_0xf3e1('0x1e')](_0xf3e1('0x1f'),_0x49b90c+'-'+_0x1598c0+'/'+_0x1bcb42)[_0xf3e1('0x19')](_0x3dea57);}return null;};}function patchUpdates(_0x3fd1ce){return function(_0x37828b){try{jsonpatch[_0xf3e1('0x20')](_0x37828b,_0x3fd1ce,!![]);}catch(_0x4eb593){return BPromise[_0xf3e1('0x21')](_0x4eb593);}return _0x37828b[_0xf3e1('0x22')]();};}function saveUpdates(_0xdb0be4,_0x48aa67){return function(_0x1f84b5){if(_0x1f84b5){return _0x1f84b5[_0xf3e1('0x23')](_0xdb0be4)[_0xf3e1('0x24')](function(_0x59532a){return _0x59532a;});}return null;};}function removeEntity(_0x139291,_0x4a8b38){return function(_0x2b26b9){if(_0x2b26b9){return _0x2b26b9[_0xf3e1('0x25')]()[_0xf3e1('0x24')](function(){_0x139291['status'](0xcc)[_0xf3e1('0x18')]();});}};}function handleEntityNotFound(_0x3d7c3f,_0x248b84){return function(_0x324449){if(!_0x324449){_0x3d7c3f[_0xf3e1('0x26')](0x194);}return _0x324449;};}function handleError(_0x44668c,_0x487a5e){_0x487a5e=_0x487a5e||0x1f4;return function(_0xa9bf1a){logger[_0xf3e1('0x27')](_0xa9bf1a[_0xf3e1('0x28')]);if(_0xa9bf1a['name']){delete _0xa9bf1a[_0xf3e1('0x29')];}_0x44668c[_0xf3e1('0x17')](_0x487a5e)[_0xf3e1('0x2a')](_0xa9bf1a);};}exports['index']=function(_0x34d523,_0x28210){var _0x38bd5c={},_0x221bdb={},_0xc9b5f9={'count':0x0,'rows':[]};var _0x19db85=_[_0xf3e1('0x2b')](db['SalesforceConfiguration'][_0xf3e1('0x2c')],function(_0x1e4fea){return{'name':_0x1e4fea[_0xf3e1('0x2d')],'type':_0x1e4fea[_0xf3e1('0x2e')]['key']};});_0x221bdb['model']=_[_0xf3e1('0x2b')](_0x19db85,'name');_0x221bdb[_0xf3e1('0x2f')]=_[_0xf3e1('0x30')](_0x34d523[_0xf3e1('0x2f')]);_0x221bdb[_0xf3e1('0x31')]=_[_0xf3e1('0x32')](_0x221bdb[_0xf3e1('0x33')],_0x221bdb[_0xf3e1('0x2f')]);_0x38bd5c[_0xf3e1('0x34')]=_[_0xf3e1('0x32')](_0x221bdb['model'],qs[_0xf3e1('0x35')](_0x34d523[_0xf3e1('0x2f')][_0xf3e1('0x35')]));_0x38bd5c[_0xf3e1('0x34')]=_0x38bd5c[_0xf3e1('0x34')][_0xf3e1('0x36')]?_0x38bd5c[_0xf3e1('0x34')]:_0x221bdb[_0xf3e1('0x33')];if(!_0x34d523[_0xf3e1('0x2f')][_0xf3e1('0x37')](_0xf3e1('0x38'))){_0x38bd5c[_0xf3e1('0x1b')]=qs['limit'](_0x34d523[_0xf3e1('0x2f')][_0xf3e1('0x1b')]);_0x38bd5c[_0xf3e1('0x1a')]=qs[_0xf3e1('0x1a')](_0x34d523[_0xf3e1('0x2f')][_0xf3e1('0x1a')]);}_0x38bd5c[_0xf3e1('0x39')]=qs[_0xf3e1('0x3a')](_0x34d523[_0xf3e1('0x2f')]['sort']);_0x38bd5c[_0xf3e1('0x3b')]=qs[_0xf3e1('0x31')](_[_0xf3e1('0x3c')](_0x34d523['query'],_0x221bdb[_0xf3e1('0x31')]),_0x19db85);if(_0x34d523['query'][_0xf3e1('0x3d')]){_0x38bd5c[_0xf3e1('0x3b')]=_['merge'](_0x38bd5c[_0xf3e1('0x3b')],{'$or':_[_0xf3e1('0x2b')](_0x19db85,function(_0x571131){if(_0x571131[_0xf3e1('0x2e')]!==_0xf3e1('0x3e')){var _0x126ebd={};_0x126ebd[_0x571131[_0xf3e1('0x29')]]={'$like':'%'+_0x34d523['query']['filter']+'%'};return _0x126ebd;}})});}_0x38bd5c=_[_0xf3e1('0x3f')]({},_0x38bd5c,_0x34d523[_0xf3e1('0x40')]);var _0x4d9aa7={'where':_0x38bd5c['where']};return db[_0xf3e1('0x41')][_0xf3e1('0x1d')](_0x4d9aa7)[_0xf3e1('0x24')](function(_0x19feeb){_0xc9b5f9['count']=_0x19feeb;if(_0x34d523[_0xf3e1('0x2f')][_0xf3e1('0x42')]){_0x38bd5c[_0xf3e1('0x43')]=[{'all':!![]}];}return db['SalesforceConfiguration'][_0xf3e1('0x44')](_0x38bd5c);})[_0xf3e1('0x24')](function(_0xa6bc52){_0xc9b5f9[_0xf3e1('0x45')]=_0xa6bc52;return _0xc9b5f9;})['then'](respondWithFilteredResult(_0x28210,_0x38bd5c))['catch'](handleError(_0x28210,null));};exports['show']=function(_0x23a45e,_0x564b8c){var _0x51700d={'raw':![],'where':{'id':_0x23a45e['params']['id']}},_0x127b14={};_0x127b14[_0xf3e1('0x33')]=_['keys'](db[_0xf3e1('0x41')][_0xf3e1('0x2c')]);_0x127b14['query']=_[_0xf3e1('0x30')](_0x23a45e[_0xf3e1('0x2f')]);_0x127b14[_0xf3e1('0x31')]=_['intersection'](_0x127b14['model'],_0x127b14['query']);_0x51700d['attributes']=_[_0xf3e1('0x32')](_0x127b14[_0xf3e1('0x33')],qs[_0xf3e1('0x35')](_0x23a45e['query'][_0xf3e1('0x35')]));_0x51700d[_0xf3e1('0x34')]=_0x51700d[_0xf3e1('0x34')]['length']?_0x51700d[_0xf3e1('0x34')]:_0x127b14['model'];if(_0x23a45e[_0xf3e1('0x2f')][_0xf3e1('0x42')]){_0x51700d[_0xf3e1('0x43')]=[{'all':!![]}];}_0x51700d=_[_0xf3e1('0x3f')]({},_0x51700d,_0x23a45e[_0xf3e1('0x40')]);return db['SalesforceConfiguration'][_0xf3e1('0x46')](_0x51700d)['then'](handleEntityNotFound(_0x564b8c,null))[_0xf3e1('0x24')](respondWithResult(_0x564b8c,null))[_0xf3e1('0x47')](handleError(_0x564b8c,null));};exports[_0xf3e1('0x48')]=function(_0x10e849,_0x45c23e){return db['SalesforceConfiguration'][_0xf3e1('0x48')](_0x10e849[_0xf3e1('0x49')],{})[_0xf3e1('0x24')](respondWithResult(_0x45c23e,0xc9))[_0xf3e1('0x47')](handleError(_0x45c23e,null));};exports[_0xf3e1('0x23')]=function(_0x4e923c,_0x249c5d){if(_0x4e923c['body']['id']){delete _0x4e923c[_0xf3e1('0x49')]['id'];}return db[_0xf3e1('0x41')][_0xf3e1('0x46')]({'where':{'id':_0x4e923c[_0xf3e1('0x4a')]['id']}})[_0xf3e1('0x24')](handleEntityNotFound(_0x249c5d,null))[_0xf3e1('0x24')](saveUpdates(_0x4e923c[_0xf3e1('0x49')],null))[_0xf3e1('0x24')](respondWithResult(_0x249c5d,null))[_0xf3e1('0x47')](handleError(_0x249c5d,null));};exports[_0xf3e1('0x25')]=function(_0x382599,_0x4439e2){return db[_0xf3e1('0x41')]['find']({'where':{'id':_0x382599[_0xf3e1('0x4a')]['id']}})[_0xf3e1('0x24')](handleEntityNotFound(_0x4439e2,null))[_0xf3e1('0x24')](removeEntity(_0x4439e2,null))[_0xf3e1('0x47')](handleError(_0x4439e2,null));};exports[_0xf3e1('0x4b')]=function(_0x38b41c,_0x1971cb,_0x4ba0c4){var _0x3a073e={};var _0x3d4018={};var _0x1d5617;var _0x212357;return db[_0xf3e1('0x41')][_0xf3e1('0x4c')]({'where':{'id':_0x38b41c[_0xf3e1('0x4a')]['id']}})['then'](handleEntityNotFound(_0x1971cb,null))[_0xf3e1('0x24')](function(_0x10fcbb){if(_0x10fcbb){_0x1d5617=_0x10fcbb;_0x3d4018[_0xf3e1('0x33')]=_[_0xf3e1('0x30')](db[_0xf3e1('0x4d')][_0xf3e1('0x2c')]);_0x3d4018['query']=_[_0xf3e1('0x30')](_0x38b41c[_0xf3e1('0x2f')]);_0x3d4018[_0xf3e1('0x31')]=_[_0xf3e1('0x32')](_0x3d4018['model'],_0x3d4018[_0xf3e1('0x2f')]);_0x3a073e['attributes']=_[_0xf3e1('0x32')](_0x3d4018[_0xf3e1('0x33')],qs[_0xf3e1('0x35')](_0x38b41c[_0xf3e1('0x2f')]['fields']));_0x3a073e[_0xf3e1('0x34')]=_0x3a073e[_0xf3e1('0x34')][_0xf3e1('0x36')]?_0x3a073e['attributes']:_0x3d4018['model'];_0x3a073e['order']=qs['sort'](_0x38b41c[_0xf3e1('0x2f')][_0xf3e1('0x3a')]);_0x3a073e[_0xf3e1('0x3b')]=qs[_0xf3e1('0x31')](_[_0xf3e1('0x3c')](_0x38b41c[_0xf3e1('0x2f')],_0x3d4018['filters']));if(_0x38b41c[_0xf3e1('0x2f')][_0xf3e1('0x3d')]){_0x3a073e[_0xf3e1('0x3b')]=_[_0xf3e1('0x3f')](_0x3a073e[_0xf3e1('0x3b')],{'$or':_[_0xf3e1('0x2b')](_0x3a073e[_0xf3e1('0x34')],function(_0x4c20ae){var _0x3dae28={};_0x3dae28[_0x4c20ae]={'$like':'%'+_0x38b41c[_0xf3e1('0x2f')][_0xf3e1('0x3d')]+'%'};return _0x3dae28;})});}_0x3a073e=_[_0xf3e1('0x3f')]({},_0x3a073e,_0x38b41c[_0xf3e1('0x40')]);return _0x1d5617['getFields'](_0x3a073e);}})[_0xf3e1('0x24')](function(_0x11a1ec){if(_0x11a1ec){_0x212357=_0x11a1ec[_0xf3e1('0x36')];if(!_0x38b41c[_0xf3e1('0x2f')][_0xf3e1('0x37')]('nolimit')){_0x3a073e[_0xf3e1('0x1b')]=qs[_0xf3e1('0x1b')](_0x38b41c[_0xf3e1('0x2f')][_0xf3e1('0x1b')]);_0x3a073e[_0xf3e1('0x1a')]=qs[_0xf3e1('0x1a')](_0x38b41c[_0xf3e1('0x2f')]['offset']);}return _0x1d5617[_0xf3e1('0x4b')](_0x3a073e);}})[_0xf3e1('0x24')](function(_0x10997b){if(_0x10997b){return _0x10997b?{'count':_0x212357,'rows':_0x10997b}:null;}})[_0xf3e1('0x24')](respondWithResult(_0x1971cb,null))[_0xf3e1('0x47')](handleError(_0x1971cb,null));};exports[_0xf3e1('0x4e')]=function(_0xf7a2b,_0x48a160,_0x3bf999){var _0x2fc593={};var _0x3c07e6={};var _0x46852a;var _0x1e92e6;return db['SalesforceConfiguration'][_0xf3e1('0x4c')]({'where':{'id':_0xf7a2b[_0xf3e1('0x4a')]['id']}})['then'](handleEntityNotFound(_0x48a160,null))[_0xf3e1('0x24')](function(_0xa5377b){if(_0xa5377b){_0x46852a=_0xa5377b;_0x3c07e6[_0xf3e1('0x33')]=_[_0xf3e1('0x30')](db[_0xf3e1('0x4d')]['rawAttributes']);_0x3c07e6[_0xf3e1('0x2f')]=_[_0xf3e1('0x30')](_0xf7a2b[_0xf3e1('0x2f')]);_0x3c07e6[_0xf3e1('0x31')]=_[_0xf3e1('0x32')](_0x3c07e6[_0xf3e1('0x33')],_0x3c07e6[_0xf3e1('0x2f')]);_0x2fc593[_0xf3e1('0x34')]=_['intersection'](_0x3c07e6[_0xf3e1('0x33')],qs[_0xf3e1('0x35')](_0xf7a2b[_0xf3e1('0x2f')][_0xf3e1('0x35')]));_0x2fc593['attributes']=_0x2fc593[_0xf3e1('0x34')][_0xf3e1('0x36')]?_0x2fc593[_0xf3e1('0x34')]:_0x3c07e6[_0xf3e1('0x33')];_0x2fc593[_0xf3e1('0x39')]=qs[_0xf3e1('0x3a')](_0xf7a2b[_0xf3e1('0x2f')][_0xf3e1('0x3a')]);_0x2fc593[_0xf3e1('0x3b')]=qs[_0xf3e1('0x31')](_[_0xf3e1('0x3c')](_0xf7a2b['query'],_0x3c07e6[_0xf3e1('0x31')]));if(_0xf7a2b[_0xf3e1('0x2f')]['filter']){_0x2fc593[_0xf3e1('0x3b')]=_[_0xf3e1('0x3f')](_0x2fc593[_0xf3e1('0x3b')],{'$or':_[_0xf3e1('0x2b')](_0x2fc593[_0xf3e1('0x34')],function(_0x273107){var _0x40cc33={};_0x40cc33[_0x273107]={'$like':'%'+_0xf7a2b['query'][_0xf3e1('0x3d')]+'%'};return _0x40cc33;})});}_0x2fc593=_[_0xf3e1('0x3f')]({},_0x2fc593,_0xf7a2b[_0xf3e1('0x40')]);return _0x46852a['getSubjects'](_0x2fc593);}})[_0xf3e1('0x24')](function(_0xaba7bd){if(_0xaba7bd){_0x1e92e6=_0xaba7bd['length'];if(!_0xf7a2b[_0xf3e1('0x2f')][_0xf3e1('0x37')](_0xf3e1('0x38'))){_0x2fc593[_0xf3e1('0x1b')]=qs[_0xf3e1('0x1b')](_0xf7a2b[_0xf3e1('0x2f')][_0xf3e1('0x1b')]);_0x2fc593['offset']=qs['offset'](_0xf7a2b[_0xf3e1('0x2f')][_0xf3e1('0x1a')]);}return _0x46852a[_0xf3e1('0x4e')](_0x2fc593);}})[_0xf3e1('0x24')](function(_0x40cf2b){if(_0x40cf2b){return _0x40cf2b?{'count':_0x1e92e6,'rows':_0x40cf2b}:null;}})['then'](respondWithResult(_0x48a160,null))['catch'](handleError(_0x48a160,null));};exports[_0xf3e1('0x4f')]=function(_0x55ddbc,_0x3f7792,_0x35e2d6){var _0x4bb6d5={};var _0x2a171e={};var _0x173e7c;var _0x242d83;return db[_0xf3e1('0x41')][_0xf3e1('0x4c')]({'where':{'id':_0x55ddbc['params']['id']}})['then'](handleEntityNotFound(_0x3f7792,null))[_0xf3e1('0x24')](function(_0x1b52b4){if(_0x1b52b4){_0x173e7c=_0x1b52b4;_0x2a171e[_0xf3e1('0x33')]=_[_0xf3e1('0x30')](db[_0xf3e1('0x4d')]['rawAttributes']);_0x2a171e[_0xf3e1('0x2f')]=_[_0xf3e1('0x30')](_0x55ddbc[_0xf3e1('0x2f')]);_0x2a171e['filters']=_[_0xf3e1('0x32')](_0x2a171e[_0xf3e1('0x33')],_0x2a171e[_0xf3e1('0x2f')]);_0x4bb6d5[_0xf3e1('0x34')]=_[_0xf3e1('0x32')](_0x2a171e[_0xf3e1('0x33')],qs[_0xf3e1('0x35')](_0x55ddbc[_0xf3e1('0x2f')]['fields']));_0x4bb6d5['attributes']=_0x4bb6d5[_0xf3e1('0x34')]['length']?_0x4bb6d5[_0xf3e1('0x34')]:_0x2a171e[_0xf3e1('0x33')];_0x4bb6d5[_0xf3e1('0x39')]=qs[_0xf3e1('0x3a')](_0x55ddbc[_0xf3e1('0x2f')][_0xf3e1('0x3a')]);_0x4bb6d5[_0xf3e1('0x3b')]=qs[_0xf3e1('0x31')](_[_0xf3e1('0x3c')](_0x55ddbc[_0xf3e1('0x2f')],_0x2a171e['filters']));if(_0x55ddbc[_0xf3e1('0x2f')]['filter']){_0x4bb6d5[_0xf3e1('0x3b')]=_['merge'](_0x4bb6d5[_0xf3e1('0x3b')],{'$or':_[_0xf3e1('0x2b')](_0x4bb6d5[_0xf3e1('0x34')],function(_0x169ed1){var _0xef6ca0={};_0xef6ca0[_0x169ed1]={'$like':'%'+_0x55ddbc[_0xf3e1('0x2f')][_0xf3e1('0x3d')]+'%'};return _0xef6ca0;})});}_0x4bb6d5=_['merge']({},_0x4bb6d5,_0x55ddbc[_0xf3e1('0x40')]);return _0x173e7c[_0xf3e1('0x4f')](_0x4bb6d5);}})[_0xf3e1('0x24')](function(_0x2d83dc){if(_0x2d83dc){_0x242d83=_0x2d83dc[_0xf3e1('0x36')];if(!_0x55ddbc[_0xf3e1('0x2f')]['hasOwnProperty'](_0xf3e1('0x38'))){_0x4bb6d5[_0xf3e1('0x1b')]=qs[_0xf3e1('0x1b')](_0x55ddbc['query']['limit']);_0x4bb6d5[_0xf3e1('0x1a')]=qs[_0xf3e1('0x1a')](_0x55ddbc[_0xf3e1('0x2f')][_0xf3e1('0x1a')]);}return _0x173e7c['getDescriptions'](_0x4bb6d5);}})['then'](function(_0x279956){if(_0x279956){return _0x279956?{'count':_0x242d83,'rows':_0x279956}:null;}})[_0xf3e1('0x24')](respondWithResult(_0x3f7792,null))[_0xf3e1('0x47')](handleError(_0x3f7792,null));}; \ No newline at end of file diff --git a/server/api/intSalesforceConfiguration/intSalesforceConfiguration.model.js b/server/api/intSalesforceConfiguration/intSalesforceConfiguration.model.js index 64db747..ce849c0 100644 --- a/server/api/intSalesforceConfiguration/intSalesforceConfiguration.model.js +++ b/server/api/intSalesforceConfiguration/intSalesforceConfiguration.model.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xa169=['moment','bluebird','../../config/environment','./intSalesforceConfiguration.attributes','define','SalesforceConfiguration','int_salesforce_configurations','lodash','util'];(function(_0x1a1cfc,_0x6e3352){var _0x1e6156=function(_0x4436db){while(--_0x4436db){_0x1a1cfc['push'](_0x1a1cfc['shift']());}};_0x1e6156(++_0x6e3352);}(_0xa169,0x1ed));var _0x9a16=function(_0x4dce76,_0x255a11){_0x4dce76=_0x4dce76-0x0;var _0x41a70d=_0xa169[_0x4dce76];return _0x41a70d;};'use strict';var _=require(_0x9a16('0x0'));var util=require(_0x9a16('0x1'));var logger=require('../../config/logger')('api');var moment=require(_0x9a16('0x2'));var BPromise=require(_0x9a16('0x3'));var rp=require('request-promise');var fs=require('fs');var path=require('path');var rimraf=require('rimraf');var config=require(_0x9a16('0x4'));var attributes=require(_0x9a16('0x5'));module['exports']=function(_0x3c775f,_0x515526){return _0x3c775f[_0x9a16('0x6')](_0x9a16('0x7'),attributes,{'tableName':_0x9a16('0x8'),'paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file +var _0xa969=['lodash','api','moment','bluebird','request-promise','path','rimraf','./intSalesforceConfiguration.attributes','exports','define','SalesforceConfiguration','int_salesforce_configurations'];(function(_0x47f4e7,_0x46f17f){var _0x49085b=function(_0x558433){while(--_0x558433){_0x47f4e7['push'](_0x47f4e7['shift']());}};_0x49085b(++_0x46f17f);}(_0xa969,0x174));var _0x9a96=function(_0x7275e9,_0x321fa5){_0x7275e9=_0x7275e9-0x0;var _0x17b99d=_0xa969[_0x7275e9];return _0x17b99d;};'use strict';var _=require(_0x9a96('0x0'));var util=require('util');var logger=require('../../config/logger')(_0x9a96('0x1'));var moment=require(_0x9a96('0x2'));var BPromise=require(_0x9a96('0x3'));var rp=require(_0x9a96('0x4'));var fs=require('fs');var path=require(_0x9a96('0x5'));var rimraf=require(_0x9a96('0x6'));var config=require('../../config/environment');var attributes=require(_0x9a96('0x7'));module[_0x9a96('0x8')]=function(_0xa5fd36,_0x35fc00){return _0xa5fd36[_0x9a96('0x9')](_0x9a96('0xa'),attributes,{'tableName':_0x9a96('0xb'),'paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file diff --git a/server/api/intSalesforceConfiguration/intSalesforceConfiguration.rpc.js b/server/api/intSalesforceConfiguration/intSalesforceConfiguration.rpc.js index 57ca492..5725e2a 100644 --- a/server/api/intSalesforceConfiguration/intSalesforceConfiguration.rpc.js +++ b/server/api/intSalesforceConfiguration/intSalesforceConfiguration.rpc.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xf738=['client','http','then','debug','SalesforceConfiguration,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','code','message','SalesforceConfiguration,\x20%s,\x20%s','info','result','lodash','bluebird','randomstring','../../mysqldb','../../config/logger','jayson/promise'];(function(_0x138adb,_0x193fee){var _0x1b27f2=function(_0x5e97a2){while(--_0x5e97a2){_0x138adb['push'](_0x138adb['shift']());}};_0x1b27f2(++_0x193fee);}(_0xf738,0x19c));var _0x8f73=function(_0x1ac120,_0x3e7e45){_0x1ac120=_0x1ac120-0x0;var _0x19b703=_0xf738[_0x1ac120];return _0x19b703;};'use strict';var _=require(_0x8f73('0x0'));var util=require('util');var moment=require('moment');var BPromise=require(_0x8f73('0x1'));var rs=require(_0x8f73('0x2'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0x8f73('0x3'))['db'];var utils=require('../../config/utils');var logger=require(_0x8f73('0x4'))('rpc');var config=require('../../config/environment');var jayson=require(_0x8f73('0x5'));var client=jayson[_0x8f73('0x6')][_0x8f73('0x7')]({'port':0x232a});function respondWithRpcPromise(_0x1100ed,_0x3a0f76,_0x19b32f){return new BPromise(function(_0xe5fbcf,_0x195cc7){return client['request'](_0x1100ed,_0x19b32f)[_0x8f73('0x8')](function(_0x24b837){logger['info']('SalesforceConfiguration,\x20%s,\x20%s',_0x3a0f76,'request\x20sent');logger[_0x8f73('0x9')](_0x8f73('0xa'),_0x3a0f76,_0x8f73('0xb'),JSON[_0x8f73('0xc')](_0x24b837));if(_0x24b837[_0x8f73('0xd')]){if(_0x24b837[_0x8f73('0xd')][_0x8f73('0xe')]===0x1f4){logger['error']('SalesforceConfiguration,\x20%s,\x20%s',_0x3a0f76,_0x24b837[_0x8f73('0xd')][_0x8f73('0xf')]);return _0x195cc7(_0x24b837[_0x8f73('0xd')][_0x8f73('0xf')]);}logger[_0x8f73('0xd')](_0x8f73('0x10'),_0x3a0f76,_0x24b837[_0x8f73('0xd')][_0x8f73('0xf')]);return _0xe5fbcf(_0x24b837[_0x8f73('0xd')][_0x8f73('0xf')]);}else{logger[_0x8f73('0x11')](_0x8f73('0x10'),_0x3a0f76,_0x8f73('0xb'));_0xe5fbcf(_0x24b837[_0x8f73('0x12')]['message']);}})['catch'](function(_0x1ef721){logger['error'](_0x8f73('0x10'),_0x3a0f76,_0x1ef721);_0x195cc7(_0x1ef721);});});} \ No newline at end of file +var _0xa408=['stringify','error','code','SalesforceConfiguration,\x20%s,\x20%s','message','result','catch','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','http','then','info','debug','request\x20sent'];(function(_0x5d52d9,_0x2dc2f7){var _0x561b60=function(_0x402337){while(--_0x402337){_0x5d52d9['push'](_0x5d52d9['shift']());}};_0x561b60(++_0x2dc2f7);}(_0xa408,0x8b));var _0x8a40=function(_0x44946b,_0xf874ec){_0x44946b=_0x44946b-0x0;var _0x249bc4=_0xa408[_0x44946b];return _0x249bc4;};'use strict';var _=require('lodash');var util=require('util');var moment=require(_0x8a40('0x0'));var BPromise=require(_0x8a40('0x1'));var rs=require(_0x8a40('0x2'));var fs=require('fs');var Redis=require(_0x8a40('0x3'));var db=require(_0x8a40('0x4'))['db'];var utils=require(_0x8a40('0x5'));var logger=require(_0x8a40('0x6'))(_0x8a40('0x7'));var config=require(_0x8a40('0x8'));var jayson=require(_0x8a40('0x9'));var client=jayson['client'][_0x8a40('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x5ce1c8,_0x8a6103,_0x528881){return new BPromise(function(_0x39db45,_0x571b4a){return client['request'](_0x5ce1c8,_0x528881)[_0x8a40('0xb')](function(_0xc8df7b){logger[_0x8a40('0xc')]('SalesforceConfiguration,\x20%s,\x20%s',_0x8a6103,'request\x20sent');logger[_0x8a40('0xd')]('SalesforceConfiguration,\x20%s,\x20%s,\x20%s',_0x8a6103,_0x8a40('0xe'),JSON[_0x8a40('0xf')](_0xc8df7b));if(_0xc8df7b[_0x8a40('0x10')]){if(_0xc8df7b[_0x8a40('0x10')][_0x8a40('0x11')]===0x1f4){logger[_0x8a40('0x10')](_0x8a40('0x12'),_0x8a6103,_0xc8df7b[_0x8a40('0x10')][_0x8a40('0x13')]);return _0x571b4a(_0xc8df7b[_0x8a40('0x10')][_0x8a40('0x13')]);}logger['error'](_0x8a40('0x12'),_0x8a6103,_0xc8df7b[_0x8a40('0x10')]['message']);return _0x39db45(_0xc8df7b[_0x8a40('0x10')][_0x8a40('0x13')]);}else{logger[_0x8a40('0xc')](_0x8a40('0x12'),_0x8a6103,'request\x20sent');_0x39db45(_0xc8df7b[_0x8a40('0x14')][_0x8a40('0x13')]);}})[_0x8a40('0x15')](function(_0x116192){logger[_0x8a40('0x10')](_0x8a40('0x12'),_0x8a6103,_0x116192);_0x571b4a(_0x116192);});});} \ No newline at end of file diff --git a/server/api/intSalesforceField/index.js b/server/api/intSalesforceField/index.js index dfd24c8..50c1dcc 100644 --- a/server/api/intSalesforceField/index.js +++ b/server/api/intSalesforceField/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x8b96=['show','post','create','put','delete','destroy','exports','util','path','connect-timeout','express','Router','../../components/auth/service','../../components/interaction/service','../../config/environment','get','isAuthenticated','index','/:id'];(function(_0x8c8bec,_0xd75319){var _0x5e16a1=function(_0x4f2d4a){while(--_0x4f2d4a){_0x8c8bec['push'](_0x8c8bec['shift']());}};_0x5e16a1(++_0xd75319);}(_0x8b96,0xd8));var _0x68b9=function(_0x27b007,_0x120489){_0x27b007=_0x27b007-0x0;var _0x2473d7=_0x8b96[_0x27b007];return _0x2473d7;};'use strict';var multer=require('multer');var util=require(_0x68b9('0x0'));var path=require(_0x68b9('0x1'));var timeout=require(_0x68b9('0x2'));var express=require(_0x68b9('0x3'));var router=express[_0x68b9('0x4')]();var fs_extra=require('fs-extra');var auth=require(_0x68b9('0x5'));var interaction=require(_0x68b9('0x6'));var config=require(_0x68b9('0x7'));var controller=require('./intSalesforceField.controller');router[_0x68b9('0x8')]('/',auth[_0x68b9('0x9')](),controller[_0x68b9('0xa')]);router['get'](_0x68b9('0xb'),auth[_0x68b9('0x9')](),controller[_0x68b9('0xc')]);router[_0x68b9('0xd')]('/',auth['isAuthenticated'](),controller[_0x68b9('0xe')]);router[_0x68b9('0xf')](_0x68b9('0xb'),auth[_0x68b9('0x9')](),controller['update']);router[_0x68b9('0x10')]('/:id',auth[_0x68b9('0x9')](),controller[_0x68b9('0x11')]);module[_0x68b9('0x12')]=router; \ No newline at end of file +var _0x9849=['post','delete','destroy','exports','multer','util','path','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','./intSalesforceField.controller','get','isAuthenticated','index','/:id'];(function(_0x30928e,_0x45a538){var _0x4b64ad=function(_0x4ed3c6){while(--_0x4ed3c6){_0x30928e['push'](_0x30928e['shift']());}};_0x4b64ad(++_0x45a538);}(_0x9849,0x154));var _0x9984=function(_0x710815,_0x520da8){_0x710815=_0x710815-0x0;var _0x5b3b89=_0x9849[_0x710815];return _0x5b3b89;};'use strict';var multer=require(_0x9984('0x0'));var util=require(_0x9984('0x1'));var path=require(_0x9984('0x2'));var timeout=require('connect-timeout');var express=require('express');var router=express['Router']();var fs_extra=require(_0x9984('0x3'));var auth=require(_0x9984('0x4'));var interaction=require(_0x9984('0x5'));var config=require(_0x9984('0x6'));var controller=require(_0x9984('0x7'));router[_0x9984('0x8')]('/',auth[_0x9984('0x9')](),controller[_0x9984('0xa')]);router[_0x9984('0x8')](_0x9984('0xb'),auth['isAuthenticated'](),controller['show']);router[_0x9984('0xc')]('/',auth['isAuthenticated'](),controller['create']);router['put']('/:id',auth['isAuthenticated'](),controller['update']);router[_0x9984('0xd')](_0x9984('0xb'),auth[_0x9984('0x9')](),controller[_0x9984('0xe')]);module[_0x9984('0xf')]=router; \ No newline at end of file diff --git a/server/api/intSalesforceField/intSalesforceField.attributes.js b/server/api/intSalesforceField/intSalesforceField.attributes.js index e3157b2..96e8ca8 100644 --- a/server/api/intSalesforceField/intSalesforceField.attributes.js +++ b/server/api/intSalesforceField/intSalesforceField.attributes.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xe1dc=['exports','ENUM','string','variable','customVariable','keyValue','picklist','STRING'];(function(_0x1a8f86,_0x5ed9c4){var _0x20d876=function(_0x596e1b){while(--_0x596e1b){_0x1a8f86['push'](_0x1a8f86['shift']());}};_0x20d876(++_0x5ed9c4);}(_0xe1dc,0x108));var _0xce1d=function(_0x584fd6,_0x54904c){_0x584fd6=_0x584fd6-0x0;var _0x41d318=_0xe1dc[_0x584fd6];return _0x41d318;};'use strict';var Sequelize=require('sequelize');module[_0xce1d('0x0')]={'type':{'type':Sequelize[_0xce1d('0x1')](_0xce1d('0x2'),_0xce1d('0x3'),_0xce1d('0x4'),_0xce1d('0x5'),_0xce1d('0x6')),'defaultValue':_0xce1d('0x2')},'content':{'type':Sequelize[_0xce1d('0x7')]},'key':{'type':Sequelize[_0xce1d('0x7')]},'keyType':{'type':Sequelize[_0xce1d('0x1')]('string','variable',_0xce1d('0x4'))},'keyContent':{'type':Sequelize[_0xce1d('0x7')]},'idField':{'type':Sequelize['STRING']},'variableName':{'type':Sequelize[_0xce1d('0x7')]}}; \ No newline at end of file +var _0x1356=['picklist','STRING','exports','ENUM','string','variable','customVariable','keyValue'];(function(_0x5618c4,_0x4e8f57){var _0xdf390f=function(_0x1406cb){while(--_0x1406cb){_0x5618c4['push'](_0x5618c4['shift']());}};_0xdf390f(++_0x4e8f57);}(_0x1356,0x112));var _0x6135=function(_0x3a3448,_0x49d4ab){_0x3a3448=_0x3a3448-0x0;var _0x112114=_0x1356[_0x3a3448];return _0x112114;};'use strict';var Sequelize=require('sequelize');module[_0x6135('0x0')]={'type':{'type':Sequelize[_0x6135('0x1')](_0x6135('0x2'),_0x6135('0x3'),_0x6135('0x4'),_0x6135('0x5'),_0x6135('0x6')),'defaultValue':'string'},'content':{'type':Sequelize[_0x6135('0x7')]},'key':{'type':Sequelize[_0x6135('0x7')]},'keyType':{'type':Sequelize[_0x6135('0x1')](_0x6135('0x2'),'variable','customVariable')},'keyContent':{'type':Sequelize[_0x6135('0x7')]},'idField':{'type':Sequelize[_0x6135('0x7')]},'variableName':{'type':Sequelize[_0x6135('0x7')]}}; \ No newline at end of file diff --git a/server/api/intSalesforceField/intSalesforceField.controller.js b/server/api/intSalesforceField/intSalesforceField.controller.js index f384780..fbd0b40 100644 --- a/server/api/intSalesforceField/intSalesforceField.controller.js +++ b/server/api/intSalesforceField/intSalesforceField.controller.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x497a=['order','sort','where','filters','pick','filter','merge','VIRTUAL','name','options','catch','params','length','include','find','create','body','update','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','util','sox','to-csv','ejs','fs-extra','lodash','crypto','desk.js','querystring','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','../../config/utils','../../config/license/util','../../mysqldb','sendStatus','status','json','offset','undefined','limit','count','set','Content-Range','apply','save','then','destroy','end','error','stack','send','index','SalesforceField','rawAttributes','fieldName','type','key','model','map','keys','query','intersection','fields','attributes','hasOwnProperty'];(function(_0x327f60,_0x3f5282){var _0x2090e6=function(_0x212e9b){while(--_0x212e9b){_0x327f60['push'](_0x327f60['shift']());}};_0x2090e6(++_0x3f5282);}(_0x497a,0xf0));var _0xa497=function(_0x62c958,_0x2bfdbc){_0x62c958=_0x62c958-0x0;var _0x57ec61=_0x497a[_0x62c958];return _0x57ec61;};'use strict';var emlformat=require('eml-format');var rimraf=require(_0xa497('0x0'));var zipdir=require(_0xa497('0x1'));var jsonpatch=require(_0xa497('0x2'));var rp=require(_0xa497('0x3'));var moment=require(_0xa497('0x4'));var BPromise=require(_0xa497('0x5'));var Mustache=require(_0xa497('0x6'));var util=require(_0xa497('0x7'));var path=require('path');var sox=require(_0xa497('0x8'));var csv=require(_0xa497('0x9'));var ejs=require(_0xa497('0xa'));var fs=require('fs');var fs_extra=require(_0xa497('0xb'));var _=require(_0xa497('0xc'));var squel=require('squel');var crypto=require(_0xa497('0xd'));var jsforce=require('jsforce');var deskjs=require(_0xa497('0xe'));var toCsv=require('to-csv');var querystring=require(_0xa497('0xf'));var Papa=require('papaparse');var Redis=require(_0xa497('0x10'));var authService=require(_0xa497('0x11'));var qs=require(_0xa497('0x12'));var as=require(_0xa497('0x13'));var hardwareService=require(_0xa497('0x14'));var logger=require(_0xa497('0x15'))('api');var utils=require(_0xa497('0x16'));var config=require('../../config/environment');var licenseUtil=require(_0xa497('0x17'));var db=require(_0xa497('0x18'))['db'];function respondWithStatusCode(_0x366405,_0x1ca9d6){_0x1ca9d6=_0x1ca9d6||0xcc;return function(_0x46ad05){if(_0x46ad05){return _0x366405[_0xa497('0x19')](_0x1ca9d6);}return _0x366405[_0xa497('0x1a')](_0x1ca9d6)['end']();};}function respondWithResult(_0x284877,_0xa7a3a6){_0xa7a3a6=_0xa7a3a6||0xc8;return function(_0x3e5992){if(_0x3e5992){return _0x284877['status'](_0xa7a3a6)[_0xa497('0x1b')](_0x3e5992);}};}function respondWithFilteredResult(_0x284b95,_0x44792f){return function(_0x2d4dfd){if(_0x2d4dfd){var _0x54f1c2=typeof _0x44792f[_0xa497('0x1c')]===_0xa497('0x1d')&&typeof _0x44792f[_0xa497('0x1e')]===_0xa497('0x1d');var _0x5856ad=_0x2d4dfd[_0xa497('0x1f')];var _0x5d1e2b=_0x54f1c2?0x0:_0x44792f[_0xa497('0x1c')];var _0x34c51d=_0x54f1c2?_0x2d4dfd[_0xa497('0x1f')]:_0x44792f[_0xa497('0x1c')]+_0x44792f[_0xa497('0x1e')];var _0x10552a;if(_0x34c51d>=_0x5856ad){_0x34c51d=_0x5856ad;_0x10552a=0xc8;}else{_0x10552a=0xce;}_0x284b95['status'](_0x10552a);return _0x284b95[_0xa497('0x20')](_0xa497('0x21'),_0x5d1e2b+'-'+_0x34c51d+'/'+_0x5856ad)[_0xa497('0x1b')](_0x2d4dfd);}return null;};}function patchUpdates(_0x39b547){return function(_0x300b40){try{jsonpatch[_0xa497('0x22')](_0x300b40,_0x39b547,!![]);}catch(_0x4ba920){return BPromise['reject'](_0x4ba920);}return _0x300b40[_0xa497('0x23')]();};}function saveUpdates(_0x416993,_0x3b1704){return function(_0x2513f1){if(_0x2513f1){return _0x2513f1['update'](_0x416993)[_0xa497('0x24')](function(_0x3be800){return _0x3be800;});}return null;};}function removeEntity(_0x5706e1,_0x18478a){return function(_0x2e4ce3){if(_0x2e4ce3){return _0x2e4ce3[_0xa497('0x25')]()[_0xa497('0x24')](function(){_0x5706e1[_0xa497('0x1a')](0xcc)[_0xa497('0x26')]();});}};}function handleEntityNotFound(_0x1d4cf5,_0x5ecd31){return function(_0x1dc1b9){if(!_0x1dc1b9){_0x1d4cf5['sendStatus'](0x194);}return _0x1dc1b9;};}function handleError(_0x494ab3,_0x2e4652){_0x2e4652=_0x2e4652||0x1f4;return function(_0x22d5d9){logger[_0xa497('0x27')](_0x22d5d9[_0xa497('0x28')]);if(_0x22d5d9['name']){delete _0x22d5d9['name'];}_0x494ab3['status'](_0x2e4652)[_0xa497('0x29')](_0x22d5d9);};}exports[_0xa497('0x2a')]=function(_0x41fd2b,_0x4c0d9e){var _0x118aa0={},_0x494312={},_0x3d01c5={'count':0x0,'rows':[]};var _0x4aea89=_['map'](db[_0xa497('0x2b')][_0xa497('0x2c')],function(_0xf979ab){return{'name':_0xf979ab[_0xa497('0x2d')],'type':_0xf979ab[_0xa497('0x2e')][_0xa497('0x2f')]};});_0x494312[_0xa497('0x30')]=_[_0xa497('0x31')](_0x4aea89,'name');_0x494312['query']=_[_0xa497('0x32')](_0x41fd2b[_0xa497('0x33')]);_0x494312['filters']=_[_0xa497('0x34')](_0x494312[_0xa497('0x30')],_0x494312[_0xa497('0x33')]);_0x118aa0['attributes']=_[_0xa497('0x34')](_0x494312[_0xa497('0x30')],qs[_0xa497('0x35')](_0x41fd2b['query'][_0xa497('0x35')]));_0x118aa0[_0xa497('0x36')]=_0x118aa0[_0xa497('0x36')]['length']?_0x118aa0[_0xa497('0x36')]:_0x494312['model'];if(!_0x41fd2b[_0xa497('0x33')][_0xa497('0x37')]('nolimit')){_0x118aa0[_0xa497('0x1e')]=qs['limit'](_0x41fd2b[_0xa497('0x33')][_0xa497('0x1e')]);_0x118aa0[_0xa497('0x1c')]=qs['offset'](_0x41fd2b[_0xa497('0x33')][_0xa497('0x1c')]);}_0x118aa0[_0xa497('0x38')]=qs['sort'](_0x41fd2b[_0xa497('0x33')][_0xa497('0x39')]);_0x118aa0[_0xa497('0x3a')]=qs[_0xa497('0x3b')](_[_0xa497('0x3c')](_0x41fd2b[_0xa497('0x33')],_0x494312[_0xa497('0x3b')]),_0x4aea89);if(_0x41fd2b[_0xa497('0x33')][_0xa497('0x3d')]){_0x118aa0[_0xa497('0x3a')]=_[_0xa497('0x3e')](_0x118aa0[_0xa497('0x3a')],{'$or':_[_0xa497('0x31')](_0x4aea89,function(_0x437117){if(_0x437117['type']!==_0xa497('0x3f')){var _0x16c9c1={};_0x16c9c1[_0x437117[_0xa497('0x40')]]={'$like':'%'+_0x41fd2b[_0xa497('0x33')][_0xa497('0x3d')]+'%'};return _0x16c9c1;}})});}_0x118aa0=_[_0xa497('0x3e')]({},_0x118aa0,_0x41fd2b[_0xa497('0x41')]);var _0x3bf6dd={'where':_0x118aa0[_0xa497('0x3a')]};return db[_0xa497('0x2b')][_0xa497('0x1f')](_0x3bf6dd)[_0xa497('0x24')](function(_0x1543dd){_0x3d01c5[_0xa497('0x1f')]=_0x1543dd;if(_0x41fd2b[_0xa497('0x33')]['includeAll']){_0x118aa0['include']=[{'all':!![]}];}return db[_0xa497('0x2b')]['findAll'](_0x118aa0);})[_0xa497('0x24')](function(_0x5648b9){_0x3d01c5['rows']=_0x5648b9;return _0x3d01c5;})[_0xa497('0x24')](respondWithFilteredResult(_0x4c0d9e,_0x118aa0))[_0xa497('0x42')](handleError(_0x4c0d9e,null));};exports['show']=function(_0x15bc62,_0x277c51){var _0x371756={'raw':!![],'where':{'id':_0x15bc62[_0xa497('0x43')]['id']}},_0x53de38={};_0x53de38['model']=_[_0xa497('0x32')](db['SalesforceField'][_0xa497('0x2c')]);_0x53de38['query']=_[_0xa497('0x32')](_0x15bc62[_0xa497('0x33')]);_0x53de38['filters']=_['intersection'](_0x53de38[_0xa497('0x30')],_0x53de38['query']);_0x371756[_0xa497('0x36')]=_[_0xa497('0x34')](_0x53de38[_0xa497('0x30')],qs[_0xa497('0x35')](_0x15bc62[_0xa497('0x33')][_0xa497('0x35')]));_0x371756[_0xa497('0x36')]=_0x371756[_0xa497('0x36')][_0xa497('0x44')]?_0x371756[_0xa497('0x36')]:_0x53de38[_0xa497('0x30')];if(_0x15bc62[_0xa497('0x33')]['includeAll']){_0x371756[_0xa497('0x45')]=[{'all':!![]}];}_0x371756=_[_0xa497('0x3e')]({},_0x371756,_0x15bc62[_0xa497('0x41')]);return db[_0xa497('0x2b')][_0xa497('0x46')](_0x371756)[_0xa497('0x24')](handleEntityNotFound(_0x277c51,null))[_0xa497('0x24')](respondWithResult(_0x277c51,null))[_0xa497('0x42')](handleError(_0x277c51,null));};exports['create']=function(_0x3df602,_0x4c572a){return db[_0xa497('0x2b')][_0xa497('0x47')](_0x3df602[_0xa497('0x48')],{})[_0xa497('0x24')](respondWithResult(_0x4c572a,0xc9))[_0xa497('0x42')](handleError(_0x4c572a,null));};exports[_0xa497('0x49')]=function(_0x54c529,_0x1706c0){if(_0x54c529[_0xa497('0x48')]['id']){delete _0x54c529[_0xa497('0x48')]['id'];}return db[_0xa497('0x2b')][_0xa497('0x46')]({'where':{'id':_0x54c529[_0xa497('0x43')]['id']}})[_0xa497('0x24')](handleEntityNotFound(_0x1706c0,null))[_0xa497('0x24')](saveUpdates(_0x54c529['body'],null))['then'](respondWithResult(_0x1706c0,null))[_0xa497('0x42')](handleError(_0x1706c0,null));};exports['destroy']=function(_0x51ad6f,_0x5e7d25){return db[_0xa497('0x2b')]['find']({'where':{'id':_0x51ad6f[_0xa497('0x43')]['id']}})[_0xa497('0x24')](handleEntityNotFound(_0x5e7d25,null))[_0xa497('0x24')](removeEntity(_0x5e7d25,null))['catch'](handleError(_0x5e7d25,null));}; \ No newline at end of file +var _0x6b05=['../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/logger','api','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','status','end','offset','undefined','count','set','Content-Range','json','apply','reject','update','then','error','stack','name','index','map','rawAttributes','fieldName','type','model','query','keys','filters','intersection','fields','attributes','length','hasOwnProperty','nolimit','limit','sort','where','filter','options','includeAll','include','SalesforceField','findAll','catch','show','params','merge','find','create','body','destroy','zip-dir','request-promise','moment','bluebird','mustache','path','sox','to-csv','lodash','squel','crypto','desk.js','querystring','papaparse','ioredis'];(function(_0x220d28,_0xe0cf5e){var _0x5e77d8=function(_0x54d47e){while(--_0x54d47e){_0x220d28['push'](_0x220d28['shift']());}};_0x5e77d8(++_0xe0cf5e);}(_0x6b05,0xc3));var _0x56b0=function(_0x9ef431,_0x572264){_0x9ef431=_0x9ef431-0x0;var _0xc7ee41=_0x6b05[_0x9ef431];return _0xc7ee41;};'use strict';var emlformat=require('eml-format');var rimraf=require('rimraf');var zipdir=require(_0x56b0('0x0'));var jsonpatch=require('fast-json-patch');var rp=require(_0x56b0('0x1'));var moment=require(_0x56b0('0x2'));var BPromise=require(_0x56b0('0x3'));var Mustache=require(_0x56b0('0x4'));var util=require('util');var path=require(_0x56b0('0x5'));var sox=require(_0x56b0('0x6'));var csv=require(_0x56b0('0x7'));var ejs=require('ejs');var fs=require('fs');var fs_extra=require('fs-extra');var _=require(_0x56b0('0x8'));var squel=require(_0x56b0('0x9'));var crypto=require(_0x56b0('0xa'));var jsforce=require('jsforce');var deskjs=require(_0x56b0('0xb'));var toCsv=require(_0x56b0('0x7'));var querystring=require(_0x56b0('0xc'));var Papa=require(_0x56b0('0xd'));var Redis=require(_0x56b0('0xe'));var authService=require('../../components/auth/service');var qs=require(_0x56b0('0xf'));var as=require(_0x56b0('0x10'));var hardwareService=require('../../config/license/hardware');var logger=require(_0x56b0('0x11'))(_0x56b0('0x12'));var utils=require(_0x56b0('0x13'));var config=require(_0x56b0('0x14'));var licenseUtil=require(_0x56b0('0x15'));var db=require(_0x56b0('0x16'))['db'];function respondWithStatusCode(_0x260ed9,_0x30c9ad){_0x30c9ad=_0x30c9ad||0xcc;return function(_0x4db44b){if(_0x4db44b){return _0x260ed9['sendStatus'](_0x30c9ad);}return _0x260ed9[_0x56b0('0x17')](_0x30c9ad)[_0x56b0('0x18')]();};}function respondWithResult(_0x14157e,_0x1e6f99){_0x1e6f99=_0x1e6f99||0xc8;return function(_0x47ca41){if(_0x47ca41){return _0x14157e[_0x56b0('0x17')](_0x1e6f99)['json'](_0x47ca41);}};}function respondWithFilteredResult(_0x4c2566,_0x2ba736){return function(_0x457ebb){if(_0x457ebb){var _0xd1ac4f=typeof _0x2ba736[_0x56b0('0x19')]===_0x56b0('0x1a')&&typeof _0x2ba736['limit']===_0x56b0('0x1a');var _0x2ff598=_0x457ebb['count'];var _0x26c13a=_0xd1ac4f?0x0:_0x2ba736['offset'];var _0x2a6c55=_0xd1ac4f?_0x457ebb[_0x56b0('0x1b')]:_0x2ba736[_0x56b0('0x19')]+_0x2ba736['limit'];var _0x201df5;if(_0x2a6c55>=_0x2ff598){_0x2a6c55=_0x2ff598;_0x201df5=0xc8;}else{_0x201df5=0xce;}_0x4c2566[_0x56b0('0x17')](_0x201df5);return _0x4c2566[_0x56b0('0x1c')](_0x56b0('0x1d'),_0x26c13a+'-'+_0x2a6c55+'/'+_0x2ff598)[_0x56b0('0x1e')](_0x457ebb);}return null;};}function patchUpdates(_0x2f4b12){return function(_0x2f6b7b){try{jsonpatch[_0x56b0('0x1f')](_0x2f6b7b,_0x2f4b12,!![]);}catch(_0x1334ab){return BPromise[_0x56b0('0x20')](_0x1334ab);}return _0x2f6b7b['save']();};}function saveUpdates(_0x2164d2,_0x5f3599){return function(_0x320bf3){if(_0x320bf3){return _0x320bf3[_0x56b0('0x21')](_0x2164d2)['then'](function(_0x2e8ce8){return _0x2e8ce8;});}return null;};}function removeEntity(_0x1edcb5,_0x441543){return function(_0x5832c6){if(_0x5832c6){return _0x5832c6['destroy']()[_0x56b0('0x22')](function(){_0x1edcb5[_0x56b0('0x17')](0xcc)[_0x56b0('0x18')]();});}};}function handleEntityNotFound(_0x3e0744,_0x449d67){return function(_0x5c9ff0){if(!_0x5c9ff0){_0x3e0744['sendStatus'](0x194);}return _0x5c9ff0;};}function handleError(_0x1415f5,_0x2b2a64){_0x2b2a64=_0x2b2a64||0x1f4;return function(_0x34ddc2){logger[_0x56b0('0x23')](_0x34ddc2[_0x56b0('0x24')]);if(_0x34ddc2[_0x56b0('0x25')]){delete _0x34ddc2['name'];}_0x1415f5[_0x56b0('0x17')](_0x2b2a64)['send'](_0x34ddc2);};}exports[_0x56b0('0x26')]=function(_0x545db8,_0x19c790){var _0x17daf4={},_0x359f10={},_0x1a2e6c={'count':0x0,'rows':[]};var _0x2005f1=_[_0x56b0('0x27')](db['SalesforceField'][_0x56b0('0x28')],function(_0x1163a9){return{'name':_0x1163a9[_0x56b0('0x29')],'type':_0x1163a9[_0x56b0('0x2a')]['key']};});_0x359f10[_0x56b0('0x2b')]=_['map'](_0x2005f1,_0x56b0('0x25'));_0x359f10[_0x56b0('0x2c')]=_[_0x56b0('0x2d')](_0x545db8[_0x56b0('0x2c')]);_0x359f10[_0x56b0('0x2e')]=_['intersection'](_0x359f10[_0x56b0('0x2b')],_0x359f10['query']);_0x17daf4['attributes']=_[_0x56b0('0x2f')](_0x359f10[_0x56b0('0x2b')],qs[_0x56b0('0x30')](_0x545db8[_0x56b0('0x2c')][_0x56b0('0x30')]));_0x17daf4[_0x56b0('0x31')]=_0x17daf4[_0x56b0('0x31')][_0x56b0('0x32')]?_0x17daf4[_0x56b0('0x31')]:_0x359f10['model'];if(!_0x545db8[_0x56b0('0x2c')][_0x56b0('0x33')](_0x56b0('0x34'))){_0x17daf4[_0x56b0('0x35')]=qs[_0x56b0('0x35')](_0x545db8[_0x56b0('0x2c')][_0x56b0('0x35')]);_0x17daf4[_0x56b0('0x19')]=qs[_0x56b0('0x19')](_0x545db8[_0x56b0('0x2c')]['offset']);}_0x17daf4['order']=qs['sort'](_0x545db8[_0x56b0('0x2c')][_0x56b0('0x36')]);_0x17daf4['where']=qs[_0x56b0('0x2e')](_['pick'](_0x545db8['query'],_0x359f10['filters']),_0x2005f1);if(_0x545db8[_0x56b0('0x2c')]['filter']){_0x17daf4[_0x56b0('0x37')]=_['merge'](_0x17daf4[_0x56b0('0x37')],{'$or':_[_0x56b0('0x27')](_0x2005f1,function(_0x342036){if(_0x342036[_0x56b0('0x2a')]!=='VIRTUAL'){var _0xd37407={};_0xd37407[_0x342036[_0x56b0('0x25')]]={'$like':'%'+_0x545db8['query'][_0x56b0('0x38')]+'%'};return _0xd37407;}})});}_0x17daf4=_['merge']({},_0x17daf4,_0x545db8[_0x56b0('0x39')]);var _0x23ff46={'where':_0x17daf4['where']};return db['SalesforceField'][_0x56b0('0x1b')](_0x23ff46)[_0x56b0('0x22')](function(_0x1303a8){_0x1a2e6c[_0x56b0('0x1b')]=_0x1303a8;if(_0x545db8[_0x56b0('0x2c')][_0x56b0('0x3a')]){_0x17daf4[_0x56b0('0x3b')]=[{'all':!![]}];}return db[_0x56b0('0x3c')][_0x56b0('0x3d')](_0x17daf4);})[_0x56b0('0x22')](function(_0x143a69){_0x1a2e6c['rows']=_0x143a69;return _0x1a2e6c;})[_0x56b0('0x22')](respondWithFilteredResult(_0x19c790,_0x17daf4))[_0x56b0('0x3e')](handleError(_0x19c790,null));};exports[_0x56b0('0x3f')]=function(_0x4ff6a5,_0x1e1d6c){var _0x5d2ccb={'raw':!![],'where':{'id':_0x4ff6a5[_0x56b0('0x40')]['id']}},_0x5461d0={};_0x5461d0[_0x56b0('0x2b')]=_[_0x56b0('0x2d')](db[_0x56b0('0x3c')]['rawAttributes']);_0x5461d0['query']=_[_0x56b0('0x2d')](_0x4ff6a5[_0x56b0('0x2c')]);_0x5461d0[_0x56b0('0x2e')]=_['intersection'](_0x5461d0[_0x56b0('0x2b')],_0x5461d0['query']);_0x5d2ccb['attributes']=_[_0x56b0('0x2f')](_0x5461d0[_0x56b0('0x2b')],qs[_0x56b0('0x30')](_0x4ff6a5[_0x56b0('0x2c')]['fields']));_0x5d2ccb['attributes']=_0x5d2ccb[_0x56b0('0x31')][_0x56b0('0x32')]?_0x5d2ccb[_0x56b0('0x31')]:_0x5461d0[_0x56b0('0x2b')];if(_0x4ff6a5[_0x56b0('0x2c')][_0x56b0('0x3a')]){_0x5d2ccb[_0x56b0('0x3b')]=[{'all':!![]}];}_0x5d2ccb=_[_0x56b0('0x41')]({},_0x5d2ccb,_0x4ff6a5[_0x56b0('0x39')]);return db[_0x56b0('0x3c')][_0x56b0('0x42')](_0x5d2ccb)['then'](handleEntityNotFound(_0x1e1d6c,null))[_0x56b0('0x22')](respondWithResult(_0x1e1d6c,null))[_0x56b0('0x3e')](handleError(_0x1e1d6c,null));};exports[_0x56b0('0x43')]=function(_0x30881c,_0x2455bc){return db[_0x56b0('0x3c')][_0x56b0('0x43')](_0x30881c[_0x56b0('0x44')],{})[_0x56b0('0x22')](respondWithResult(_0x2455bc,0xc9))[_0x56b0('0x3e')](handleError(_0x2455bc,null));};exports[_0x56b0('0x21')]=function(_0x2b5df4,_0x40bb0f){if(_0x2b5df4[_0x56b0('0x44')]['id']){delete _0x2b5df4['body']['id'];}return db[_0x56b0('0x3c')][_0x56b0('0x42')]({'where':{'id':_0x2b5df4[_0x56b0('0x40')]['id']}})[_0x56b0('0x22')](handleEntityNotFound(_0x40bb0f,null))[_0x56b0('0x22')](saveUpdates(_0x2b5df4[_0x56b0('0x44')],null))['then'](respondWithResult(_0x40bb0f,null))[_0x56b0('0x3e')](handleError(_0x40bb0f,null));};exports[_0x56b0('0x45')]=function(_0x409f44,_0x477e0e){return db[_0x56b0('0x3c')][_0x56b0('0x42')]({'where':{'id':_0x409f44['params']['id']}})['then'](handleEntityNotFound(_0x477e0e,null))[_0x56b0('0x22')](removeEntity(_0x477e0e,null))[_0x56b0('0x3e')](handleError(_0x477e0e,null));}; \ No newline at end of file diff --git a/server/api/intSalesforceField/intSalesforceField.model.js b/server/api/intSalesforceField/intSalesforceField.model.js index dc5d757..ee9937e 100644 --- a/server/api/intSalesforceField/intSalesforceField.model.js +++ b/server/api/intSalesforceField/intSalesforceField.model.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xcda2=['request-promise','path','rimraf','../../config/environment','define','idField','FieldId','../../config/logger','api','moment','bluebird'];(function(_0x42ca15,_0x193ccb){var _0x1c6ded=function(_0x40989a){while(--_0x40989a){_0x42ca15['push'](_0x42ca15['shift']());}};_0x1c6ded(++_0x193ccb);}(_0xcda2,0x96));var _0x2cda=function(_0xf90544,_0x211f7a){_0xf90544=_0xf90544-0x0;var _0x22b0ed=_0xcda2[_0xf90544];return _0x22b0ed;};'use strict';var _=require('lodash');var util=require('util');var logger=require(_0x2cda('0x0'))(_0x2cda('0x1'));var moment=require(_0x2cda('0x2'));var BPromise=require(_0x2cda('0x3'));var rp=require(_0x2cda('0x4'));var fs=require('fs');var path=require(_0x2cda('0x5'));var rimraf=require(_0x2cda('0x6'));var config=require(_0x2cda('0x7'));var attributes=require('./intSalesforceField.attributes');module['exports']=function(_0x3bcea6,_0xb5428d){return _0x3bcea6[_0x2cda('0x8')]('SalesforceField',attributes,{'tableName':'int_salesforce_fields','paranoid':![],'indexes':[{'name':'salesforce_unique_index','fields':[_0x2cda('0x9'),_0x2cda('0xa')],'unique':!![]}],'timestamps':!![]});}; \ No newline at end of file +var _0x9b01=['exports','SalesforceField','int_salesforce_fields','idField','util','api','moment','bluebird','request-promise','path','rimraf'];(function(_0x173441,_0x26b0d9){var _0x2423a8=function(_0x4d96c2){while(--_0x4d96c2){_0x173441['push'](_0x173441['shift']());}};_0x2423a8(++_0x26b0d9);}(_0x9b01,0x7d));var _0x19b0=function(_0x1fc18b,_0x13d27d){_0x1fc18b=_0x1fc18b-0x0;var _0x16a351=_0x9b01[_0x1fc18b];return _0x16a351;};'use strict';var _=require('lodash');var util=require(_0x19b0('0x0'));var logger=require('../../config/logger')(_0x19b0('0x1'));var moment=require(_0x19b0('0x2'));var BPromise=require(_0x19b0('0x3'));var rp=require(_0x19b0('0x4'));var fs=require('fs');var path=require(_0x19b0('0x5'));var rimraf=require(_0x19b0('0x6'));var config=require('../../config/environment');var attributes=require('./intSalesforceField.attributes');module[_0x19b0('0x7')]=function(_0x11a21a,_0x43f514){return _0x11a21a['define'](_0x19b0('0x8'),attributes,{'tableName':_0x19b0('0x9'),'paranoid':![],'indexes':[{'name':'salesforce_unique_index','fields':[_0x19b0('0xa'),'FieldId'],'unique':!![]}],'timestamps':!![]});}; \ No newline at end of file diff --git a/server/api/intSalesforceField/intSalesforceField.rpc.js b/server/api/intSalesforceField/intSalesforceField.rpc.js index d2240a2..c7509c2 100644 --- a/server/api/intSalesforceField/intSalesforceField.rpc.js +++ b/server/api/intSalesforceField/intSalesforceField.rpc.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x4ba4=['then','SalesforceField,\x20%s,\x20%s','request\x20sent','debug','stringify','error','message','info','result','util','moment','bluebird','randomstring','ioredis','../../config/utils','../../config/logger','../../config/environment','jayson/promise','client','request'];(function(_0x4cf98e,_0xba4b79){var _0x1623ac=function(_0x459bc0){while(--_0x459bc0){_0x4cf98e['push'](_0x4cf98e['shift']());}};_0x1623ac(++_0xba4b79);}(_0x4ba4,0x15d));var _0x44ba=function(_0x5c0a94,_0x2a8dd1){_0x5c0a94=_0x5c0a94-0x0;var _0x5d7baa=_0x4ba4[_0x5c0a94];return _0x5d7baa;};'use strict';var _=require('lodash');var util=require(_0x44ba('0x0'));var moment=require(_0x44ba('0x1'));var BPromise=require(_0x44ba('0x2'));var rs=require(_0x44ba('0x3'));var fs=require('fs');var Redis=require(_0x44ba('0x4'));var db=require('../../mysqldb')['db'];var utils=require(_0x44ba('0x5'));var logger=require(_0x44ba('0x6'))('rpc');var config=require(_0x44ba('0x7'));var jayson=require(_0x44ba('0x8'));var client=jayson[_0x44ba('0x9')]['http']({'port':0x232a});function respondWithRpcPromise(_0x1ed55f,_0x2fcd2b,_0x254711){return new BPromise(function(_0x1fb100,_0x2da69f){return client[_0x44ba('0xa')](_0x1ed55f,_0x254711)[_0x44ba('0xb')](function(_0x4f50a7){logger['info'](_0x44ba('0xc'),_0x2fcd2b,_0x44ba('0xd'));logger[_0x44ba('0xe')]('SalesforceField,\x20%s,\x20%s,\x20%s',_0x2fcd2b,'request\x20sent',JSON[_0x44ba('0xf')](_0x4f50a7));if(_0x4f50a7[_0x44ba('0x10')]){if(_0x4f50a7[_0x44ba('0x10')]['code']===0x1f4){logger[_0x44ba('0x10')](_0x44ba('0xc'),_0x2fcd2b,_0x4f50a7['error'][_0x44ba('0x11')]);return _0x2da69f(_0x4f50a7['error']['message']);}logger[_0x44ba('0x10')](_0x44ba('0xc'),_0x2fcd2b,_0x4f50a7[_0x44ba('0x10')][_0x44ba('0x11')]);return _0x1fb100(_0x4f50a7['error'][_0x44ba('0x11')]);}else{logger[_0x44ba('0x12')](_0x44ba('0xc'),_0x2fcd2b,_0x44ba('0xd'));_0x1fb100(_0x4f50a7[_0x44ba('0x13')]['message']);}})['catch'](function(_0x2e3aa0){logger[_0x44ba('0x10')](_0x44ba('0xc'),_0x2fcd2b,_0x2e3aa0);_0x2da69f(_0x2e3aa0);});});} \ No newline at end of file +var _0xf774=['util','moment','bluebird','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','then','info','SalesforceField,\x20%s,\x20%s,\x20%s','stringify','error','message','SalesforceField,\x20%s,\x20%s','request\x20sent','result','lodash'];(function(_0x37d640,_0x390bfc){var _0x35b049=function(_0x17288f){while(--_0x17288f){_0x37d640['push'](_0x37d640['shift']());}};_0x35b049(++_0x390bfc);}(_0xf774,0x15f));var _0x4f77=function(_0x56287f,_0x41cae7){_0x56287f=_0x56287f-0x0;var _0x36cb41=_0xf774[_0x56287f];return _0x36cb41;};'use strict';var _=require(_0x4f77('0x0'));var util=require(_0x4f77('0x1'));var moment=require(_0x4f77('0x2'));var BPromise=require(_0x4f77('0x3'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x4f77('0x4'));var db=require(_0x4f77('0x5'))['db'];var utils=require(_0x4f77('0x6'));var logger=require(_0x4f77('0x7'))(_0x4f77('0x8'));var config=require(_0x4f77('0x9'));var jayson=require(_0x4f77('0xa'));var client=jayson[_0x4f77('0xb')][_0x4f77('0xc')]({'port':0x232a});function respondWithRpcPromise(_0x3bbd69,_0x5c5ada,_0x3169cf){return new BPromise(function(_0x45ecb5,_0x4471c2){return client['request'](_0x3bbd69,_0x3169cf)[_0x4f77('0xd')](function(_0x5da502){logger[_0x4f77('0xe')]('SalesforceField,\x20%s,\x20%s',_0x5c5ada,'request\x20sent');logger['debug'](_0x4f77('0xf'),_0x5c5ada,'request\x20sent',JSON[_0x4f77('0x10')](_0x5da502));if(_0x5da502[_0x4f77('0x11')]){if(_0x5da502[_0x4f77('0x11')]['code']===0x1f4){logger['error']('SalesforceField,\x20%s,\x20%s',_0x5c5ada,_0x5da502[_0x4f77('0x11')][_0x4f77('0x12')]);return _0x4471c2(_0x5da502[_0x4f77('0x11')]['message']);}logger[_0x4f77('0x11')](_0x4f77('0x13'),_0x5c5ada,_0x5da502[_0x4f77('0x11')]['message']);return _0x45ecb5(_0x5da502[_0x4f77('0x11')][_0x4f77('0x12')]);}else{logger[_0x4f77('0xe')](_0x4f77('0x13'),_0x5c5ada,_0x4f77('0x14'));_0x45ecb5(_0x5da502[_0x4f77('0x15')][_0x4f77('0x12')]);}})['catch'](function(_0x1d1881){logger[_0x4f77('0x11')]('SalesforceField,\x20%s,\x20%s',_0x5c5ada,_0x1d1881);_0x4471c2(_0x1d1881);});});} \ No newline at end of file diff --git a/server/api/intServicenowAccount/index.js b/server/api/intServicenowAccount/index.js index 63ae60e..8f2f06a 100644 --- a/server/api/intServicenowAccount/index.js +++ b/server/api/intServicenowAccount/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xadda=['delete','destroy','exports','multer','util','path','connect-timeout','express','Router','fs-extra','./intServicenowAccount.controller','get','/:id','/:id/configurations','getConfigurations','isAuthenticated','create','post','put','update'];(function(_0x46cafa,_0x3fd3e6){var _0x493221=function(_0x1e572e){while(--_0x1e572e){_0x46cafa['push'](_0x46cafa['shift']());}};_0x493221(++_0x3fd3e6);}(_0xadda,0xa3));var _0xaadd=function(_0x1facfa,_0x1acf7d){_0x1facfa=_0x1facfa-0x0;var _0x9ec701=_0xadda[_0x1facfa];return _0x9ec701;};'use strict';var multer=require(_0xaadd('0x0'));var util=require(_0xaadd('0x1'));var path=require(_0xaadd('0x2'));var timeout=require(_0xaadd('0x3'));var express=require(_0xaadd('0x4'));var router=express[_0xaadd('0x5')]();var fs_extra=require(_0xaadd('0x6'));var auth=require('../../components/auth/service');var interaction=require('../../components/interaction/service');var config=require('../../config/environment');var controller=require(_0xaadd('0x7'));router[_0xaadd('0x8')]('/',auth['isAuthenticated'](),controller['index']);router['get'](_0xaadd('0x9'),auth['isAuthenticated'](),controller['show']);router['get'](_0xaadd('0xa'),auth['isAuthenticated'](),controller[_0xaadd('0xb')]);router[_0xaadd('0x8')]('/:id/fields',auth[_0xaadd('0xc')](),controller['getFields']);router['post']('/',auth[_0xaadd('0xc')](),controller[_0xaadd('0xd')]);router[_0xaadd('0xe')](_0xaadd('0xa'),auth[_0xaadd('0xc')](),controller['addConfiguration']);router[_0xaadd('0xf')](_0xaadd('0x9'),auth['isAuthenticated'](),controller[_0xaadd('0x10')]);router[_0xaadd('0x11')]('/:id',auth[_0xaadd('0xc')](),controller[_0xaadd('0x12')]);module[_0xaadd('0x13')]=router; \ No newline at end of file +var _0x191a=['isAuthenticated','/:id','show','getConfigurations','/:id/fields','getFields','create','post','/:id/configurations','addConfiguration','put','update','destroy','exports','multer','path','connect-timeout','express','Router','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','./intServicenowAccount.controller','get'];(function(_0x4ca888,_0x2af15b){var _0x38aa3c=function(_0x492d7e){while(--_0x492d7e){_0x4ca888['push'](_0x4ca888['shift']());}};_0x38aa3c(++_0x2af15b);}(_0x191a,0xef));var _0xa191=function(_0x31a3b0,_0x4aeb7d){_0x31a3b0=_0x31a3b0-0x0;var _0x4529fb=_0x191a[_0x31a3b0];return _0x4529fb;};'use strict';var multer=require(_0xa191('0x0'));var util=require('util');var path=require(_0xa191('0x1'));var timeout=require(_0xa191('0x2'));var express=require(_0xa191('0x3'));var router=express[_0xa191('0x4')]();var fs_extra=require(_0xa191('0x5'));var auth=require(_0xa191('0x6'));var interaction=require(_0xa191('0x7'));var config=require(_0xa191('0x8'));var controller=require(_0xa191('0x9'));router[_0xa191('0xa')]('/',auth[_0xa191('0xb')](),controller['index']);router[_0xa191('0xa')](_0xa191('0xc'),auth['isAuthenticated'](),controller[_0xa191('0xd')]);router[_0xa191('0xa')]('/:id/configurations',auth[_0xa191('0xb')](),controller[_0xa191('0xe')]);router[_0xa191('0xa')](_0xa191('0xf'),auth['isAuthenticated'](),controller[_0xa191('0x10')]);router['post']('/',auth['isAuthenticated'](),controller[_0xa191('0x11')]);router[_0xa191('0x12')](_0xa191('0x13'),auth[_0xa191('0xb')](),controller[_0xa191('0x14')]);router[_0xa191('0x15')](_0xa191('0xc'),auth['isAuthenticated'](),controller[_0xa191('0x16')]);router['delete']('/:id',auth['isAuthenticated'](),controller[_0xa191('0x17')]);module[_0xa191('0x18')]=router; \ No newline at end of file diff --git a/server/api/intServicenowAccount/intServicenowAccount.attributes.js b/server/api/intServicenowAccount/intServicenowAccount.attributes.js index dd6c881..6d03d03 100644 --- a/server/api/intServicenowAccount/intServicenowAccount.attributes.js +++ b/server/api/intServicenowAccount/intServicenowAccount.attributes.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xcc1c=['sequelize','exports','STRING','username'];(function(_0x25e1a2,_0x8d3307){var _0x40a473=function(_0x5f1201){while(--_0x5f1201){_0x25e1a2['push'](_0x25e1a2['shift']());}};_0x40a473(++_0x8d3307);}(_0xcc1c,0x1cc));var _0xccc1=function(_0xf91841,_0x182ae3){_0xf91841=_0xf91841-0x0;var _0x4b9c44=_0xcc1c[_0xf91841];return _0x4b9c44;};'use strict';var Sequelize=require(_0xccc1('0x0'));module[_0xccc1('0x1')]={'name':{'type':Sequelize[_0xccc1('0x2')]},'description':{'type':Sequelize[_0xccc1('0x2')]},'username':{'type':Sequelize['STRING'],'unique':_0xccc1('0x3')},'password':{'type':Sequelize[_0xccc1('0x2')]},'email':{'type':Sequelize['STRING']},'remoteUri':{'type':Sequelize[_0xccc1('0x2')],'unique':'remoteUri'},'serverUrl':{'type':Sequelize[_0xccc1('0x2')],'allowNull':![]}}; \ No newline at end of file +var _0x1cee=['remoteUri','sequelize','exports','STRING','username'];(function(_0x2af1fa,_0x4f6545){var _0x24873d=function(_0x4393ac){while(--_0x4393ac){_0x2af1fa['push'](_0x2af1fa['shift']());}};_0x24873d(++_0x4f6545);}(_0x1cee,0xf1));var _0xe1ce=function(_0x240da3,_0x756fb5){_0x240da3=_0x240da3-0x0;var _0x2ad370=_0x1cee[_0x240da3];return _0x2ad370;};'use strict';var Sequelize=require(_0xe1ce('0x0'));module[_0xe1ce('0x1')]={'name':{'type':Sequelize[_0xe1ce('0x2')]},'description':{'type':Sequelize['STRING']},'username':{'type':Sequelize[_0xe1ce('0x2')],'unique':_0xe1ce('0x3')},'password':{'type':Sequelize[_0xe1ce('0x2')]},'email':{'type':Sequelize['STRING']},'remoteUri':{'type':Sequelize[_0xe1ce('0x2')],'unique':_0xe1ce('0x4')},'serverUrl':{'type':Sequelize[_0xe1ce('0x2')],'allowNull':![]}}; \ No newline at end of file diff --git a/server/api/intServicenowAccount/intServicenowAccount.controller.js b/server/api/intServicenowAccount/intServicenowAccount.controller.js index e03524a..91ca833 100644 --- a/server/api/intServicenowAccount/intServicenowAccount.controller.js +++ b/server/api/intServicenowAccount/intServicenowAccount.controller.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x94d8=['findOne','ServicenowConfiguration','nolimit','addConfiguration','AccountId','Subjects','getSubjects','channel','Descriptions','getDescriptions','ServicenowField','getFields','made_sla','knowledge','subcategory','incident_state','severity','category','watch_list','upon_reject','sys_updated_on','child_incidents','hold_reason','approval_history','resolved_by','sys_updated_by','opened_by','user_input','sys_created_on','sys_domain','calendar_stc','closed_at','cmdb_ci','delivery_plan','active','priority','sys_domain_path','rfc','time_worked','expected_start','opened_at','business_duration','group_list','approval_set','work_notes','close_code','correlation_display','delivery_task','work_start','business_stc','additional_assignee_list','description','calendar_duration','notify','sys_class_name','close_notes','closed_by','follow_up','sys_id','contact_type','reopened_by','urgency','problem_id','company','reassignment_count','activity_due','assigned_to','comments','approval','comments_and_work_notes','due_date','sys_mod_count','reopen_count','sys_tags','escalation','upon_approval','correlation_id','location','username','email','remoteUri','serverUrl','format','%s/api/now/doc/table/schema/','%s/api/now/table/','password','incident?sysparm_display_value=all','result','log','incident\x20table\x20objects','assign','forEach','internalType','push','remove','includes','TCL:\x20exports.getEntityFields\x20->\x20_objectsCustom','label','all','concat','ServiceNow\x20error:\x20','test','statusCode','Wrong\x20credentials','boolean','True','true','inactive','false','value','eml-format','rimraf','zip-dir','fast-json-patch','moment','bluebird','mustache','util','path','ejs','fs-extra','crypto','jsforce','to-csv','querystring','papaparse','ioredis','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/license/util','../../mysqldb','../../components/integrations/configuration','end','status','json','undefined','limit','count','offset','Content-Range','reject','then','destroy','sendStatus','error','stack','name','send','index','map','ServicenowAccount','rawAttributes','fieldName','type','query','keys','filters','intersection','model','fields','attributes','length','hasOwnProperty','order','sort','where','pick','filter','merge','VIRTUAL','options','includeAll','include','findAll','catch','create','body','update','find','params','getConfigurations'];(function(_0x4f09b2,_0x3b90e8){var _0x31f167=function(_0x2aed4c){while(--_0x2aed4c){_0x4f09b2['push'](_0x4f09b2['shift']());}};_0x31f167(++_0x3b90e8);}(_0x94d8,0x1e0));var _0x894d=function(_0xef6b9d,_0x572f84){_0xef6b9d=_0xef6b9d-0x0;var _0xc1c03=_0x94d8[_0xef6b9d];return _0xc1c03;};'use strict';var emlformat=require(_0x894d('0x0'));var rimraf=require(_0x894d('0x1'));var zipdir=require(_0x894d('0x2'));var jsonpatch=require(_0x894d('0x3'));var rp=require('request-promise');var moment=require(_0x894d('0x4'));var BPromise=require(_0x894d('0x5'));var Mustache=require(_0x894d('0x6'));var util=require(_0x894d('0x7'));var path=require(_0x894d('0x8'));var sox=require('sox');var csv=require('to-csv');var ejs=require(_0x894d('0x9'));var fs=require('fs');var fs_extra=require(_0x894d('0xa'));var _=require('lodash');var squel=require('squel');var crypto=require(_0x894d('0xb'));var jsforce=require(_0x894d('0xc'));var deskjs=require('desk.js');var toCsv=require(_0x894d('0xd'));var querystring=require(_0x894d('0xe'));var Papa=require(_0x894d('0xf'));var Redis=require(_0x894d('0x10'));var authService=require('../../components/auth/service');var qs=require(_0x894d('0x11'));var as=require(_0x894d('0x12'));var hardwareService=require(_0x894d('0x13'));var logger=require(_0x894d('0x14'))(_0x894d('0x15'));var utils=require(_0x894d('0x16'));var config=require('../../config/environment');var licenseUtil=require(_0x894d('0x17'));var db=require(_0x894d('0x18'))['db'];var integrations=require(_0x894d('0x19'));function respondWithStatusCode(_0x384d83,_0x576ac9){_0x576ac9=_0x576ac9||0xcc;return function(_0x32fe5e){if(_0x32fe5e){return _0x384d83['sendStatus'](_0x576ac9);}return _0x384d83['status'](_0x576ac9)[_0x894d('0x1a')]();};}function respondWithResult(_0x4b7767,_0x56b089){_0x56b089=_0x56b089||0xc8;return function(_0x3af0c1){if(_0x3af0c1){return _0x4b7767[_0x894d('0x1b')](_0x56b089)[_0x894d('0x1c')](_0x3af0c1);}};}function respondWithFilteredResult(_0x16dce7,_0x15f74f){return function(_0x327025){if(_0x327025){var _0x47921c=typeof _0x15f74f['offset']===_0x894d('0x1d')&&typeof _0x15f74f[_0x894d('0x1e')]===_0x894d('0x1d');var _0x4df507=_0x327025[_0x894d('0x1f')];var _0x1c4e41=_0x47921c?0x0:_0x15f74f['offset'];var _0x34d3a9=_0x47921c?_0x327025[_0x894d('0x1f')]:_0x15f74f[_0x894d('0x20')]+_0x15f74f[_0x894d('0x1e')];var _0x363d1e;if(_0x34d3a9>=_0x4df507){_0x34d3a9=_0x4df507;_0x363d1e=0xc8;}else{_0x363d1e=0xce;}_0x16dce7[_0x894d('0x1b')](_0x363d1e);return _0x16dce7['set'](_0x894d('0x21'),_0x1c4e41+'-'+_0x34d3a9+'/'+_0x4df507)[_0x894d('0x1c')](_0x327025);}return null;};}function patchUpdates(_0x311eab){return function(_0x40daec){try{jsonpatch['apply'](_0x40daec,_0x311eab,!![]);}catch(_0x326db2){return BPromise[_0x894d('0x22')](_0x326db2);}return _0x40daec['save']();};}function saveUpdates(_0x48c2c6,_0x34ae65){return function(_0x563ba4){if(_0x563ba4){return _0x563ba4['update'](_0x48c2c6)[_0x894d('0x23')](function(_0x32f293){return _0x32f293;});}return null;};}function removeEntity(_0x21bb38,_0x1258c0){return function(_0x496277){if(_0x496277){return _0x496277[_0x894d('0x24')]()[_0x894d('0x23')](function(){_0x21bb38[_0x894d('0x1b')](0xcc)[_0x894d('0x1a')]();});}};}function handleEntityNotFound(_0x15a3e1,_0x2b0793){return function(_0x2d4361){if(!_0x2d4361){_0x15a3e1[_0x894d('0x25')](0x194);}return _0x2d4361;};}function handleError(_0x1927eb,_0x40d8d7){_0x40d8d7=_0x40d8d7||0x1f4;return function(_0x30a20c){logger[_0x894d('0x26')](_0x30a20c[_0x894d('0x27')]);if(_0x30a20c[_0x894d('0x28')]){delete _0x30a20c['name'];}_0x1927eb[_0x894d('0x1b')](_0x40d8d7)[_0x894d('0x29')](_0x30a20c);};}exports[_0x894d('0x2a')]=function(_0x5eaea8,_0x1f6a0d){var _0x34db79={},_0x497619={},_0x4ec763={'count':0x0,'rows':[]};var _0x203836=_[_0x894d('0x2b')](db[_0x894d('0x2c')][_0x894d('0x2d')],function(_0x451cf4){return{'name':_0x451cf4[_0x894d('0x2e')],'type':_0x451cf4[_0x894d('0x2f')]['key']};});_0x497619['model']=_['map'](_0x203836,_0x894d('0x28'));_0x497619[_0x894d('0x30')]=_[_0x894d('0x31')](_0x5eaea8[_0x894d('0x30')]);_0x497619[_0x894d('0x32')]=_[_0x894d('0x33')](_0x497619[_0x894d('0x34')],_0x497619[_0x894d('0x30')]);_0x34db79['attributes']=_['intersection'](_0x497619[_0x894d('0x34')],qs[_0x894d('0x35')](_0x5eaea8[_0x894d('0x30')][_0x894d('0x35')]));_0x34db79['attributes']=_0x34db79[_0x894d('0x36')][_0x894d('0x37')]?_0x34db79[_0x894d('0x36')]:_0x497619[_0x894d('0x34')];if(!_0x5eaea8[_0x894d('0x30')][_0x894d('0x38')]('nolimit')){_0x34db79[_0x894d('0x1e')]=qs['limit'](_0x5eaea8[_0x894d('0x30')][_0x894d('0x1e')]);_0x34db79['offset']=qs[_0x894d('0x20')](_0x5eaea8['query']['offset']);}_0x34db79[_0x894d('0x39')]=qs[_0x894d('0x3a')](_0x5eaea8[_0x894d('0x30')]['sort']);_0x34db79[_0x894d('0x3b')]=qs[_0x894d('0x32')](_[_0x894d('0x3c')](_0x5eaea8['query'],_0x497619[_0x894d('0x32')]),_0x203836);if(_0x5eaea8[_0x894d('0x30')][_0x894d('0x3d')]){_0x34db79[_0x894d('0x3b')]=_[_0x894d('0x3e')](_0x34db79[_0x894d('0x3b')],{'$or':_[_0x894d('0x2b')](_0x203836,function(_0x28bc8d){if(_0x28bc8d[_0x894d('0x2f')]!==_0x894d('0x3f')){var _0x211a77={};_0x211a77[_0x28bc8d['name']]={'$like':'%'+_0x5eaea8['query'][_0x894d('0x3d')]+'%'};return _0x211a77;}})});}_0x34db79=_[_0x894d('0x3e')]({},_0x34db79,_0x5eaea8[_0x894d('0x40')]);var _0x52c806={'where':_0x34db79['where']};return db[_0x894d('0x2c')][_0x894d('0x1f')](_0x52c806)[_0x894d('0x23')](function(_0x5f555e){_0x4ec763[_0x894d('0x1f')]=_0x5f555e;if(_0x5eaea8[_0x894d('0x30')][_0x894d('0x41')]){_0x34db79[_0x894d('0x42')]=[{'all':!![]}];}return db[_0x894d('0x2c')][_0x894d('0x43')](_0x34db79);})['then'](function(_0x3fcb73){_0x4ec763['rows']=_0x3fcb73;return _0x4ec763;})[_0x894d('0x23')](respondWithFilteredResult(_0x1f6a0d,_0x34db79))[_0x894d('0x44')](handleError(_0x1f6a0d,null));};exports['show']=function(_0x402bce,_0x321b01){var _0x5b607f={'raw':![],'where':{'id':_0x402bce['params']['id']}},_0x377839={};_0x377839['model']=_[_0x894d('0x31')](db['ServicenowAccount'][_0x894d('0x2d')]);_0x377839[_0x894d('0x30')]=_[_0x894d('0x31')](_0x402bce['query']);_0x377839['filters']=_[_0x894d('0x33')](_0x377839['model'],_0x377839[_0x894d('0x30')]);_0x5b607f[_0x894d('0x36')]=_[_0x894d('0x33')](_0x377839[_0x894d('0x34')],qs['fields'](_0x402bce['query'][_0x894d('0x35')]));_0x5b607f['attributes']=_0x5b607f['attributes']['length']?_0x5b607f[_0x894d('0x36')]:_0x377839[_0x894d('0x34')];if(_0x402bce[_0x894d('0x30')][_0x894d('0x41')]){_0x5b607f[_0x894d('0x42')]=[{'all':!![]}];}_0x5b607f=_[_0x894d('0x3e')]({},_0x5b607f,_0x402bce[_0x894d('0x40')]);return db['ServicenowAccount']['find'](_0x5b607f)[_0x894d('0x23')](handleEntityNotFound(_0x321b01,null))[_0x894d('0x23')](respondWithResult(_0x321b01,null))['catch'](handleError(_0x321b01,null));};exports[_0x894d('0x45')]=function(_0xbf6cc2,_0x468e4b){return db['ServicenowAccount']['create'](_0xbf6cc2[_0x894d('0x46')],{})['then'](respondWithResult(_0x468e4b,0xc9))[_0x894d('0x44')](handleError(_0x468e4b,null));};exports[_0x894d('0x47')]=function(_0x3d9dae,_0x422f94){if(_0x3d9dae[_0x894d('0x46')]['id']){delete _0x3d9dae[_0x894d('0x46')]['id'];}return db['ServicenowAccount'][_0x894d('0x48')]({'where':{'id':_0x3d9dae[_0x894d('0x49')]['id']}})[_0x894d('0x23')](handleEntityNotFound(_0x422f94,null))[_0x894d('0x23')](saveUpdates(_0x3d9dae[_0x894d('0x46')],null))[_0x894d('0x23')](respondWithResult(_0x422f94,null))['catch'](handleError(_0x422f94,null));};exports[_0x894d('0x24')]=function(_0x185506,_0x386fce){return db[_0x894d('0x2c')]['find']({'where':{'id':_0x185506[_0x894d('0x49')]['id']}})[_0x894d('0x23')](handleEntityNotFound(_0x386fce,null))[_0x894d('0x23')](removeEntity(_0x386fce,null))['catch'](handleError(_0x386fce,null));};exports[_0x894d('0x4a')]=function(_0x5373b5,_0x1f1e71,_0x5c2c52){var _0x15c167={};var _0x44a725={};var _0x5c5922;var _0x4db509;return db[_0x894d('0x2c')][_0x894d('0x4b')]({'where':{'id':_0x5373b5[_0x894d('0x49')]['id']}})['then'](handleEntityNotFound(_0x1f1e71,null))[_0x894d('0x23')](function(_0x25815a){if(_0x25815a){_0x5c5922=_0x25815a;_0x44a725[_0x894d('0x34')]=_['keys'](db[_0x894d('0x4c')][_0x894d('0x2d')]);_0x44a725[_0x894d('0x30')]=_[_0x894d('0x31')](_0x5373b5[_0x894d('0x30')]);_0x44a725['filters']=_[_0x894d('0x33')](_0x44a725[_0x894d('0x34')],_0x44a725['query']);_0x15c167[_0x894d('0x36')]=_[_0x894d('0x33')](_0x44a725[_0x894d('0x34')],qs[_0x894d('0x35')](_0x5373b5[_0x894d('0x30')][_0x894d('0x35')]));_0x15c167[_0x894d('0x36')]=_0x15c167[_0x894d('0x36')][_0x894d('0x37')]?_0x15c167[_0x894d('0x36')]:_0x44a725[_0x894d('0x34')];_0x15c167[_0x894d('0x39')]=qs[_0x894d('0x3a')](_0x5373b5[_0x894d('0x30')][_0x894d('0x3a')]);_0x15c167[_0x894d('0x3b')]=qs[_0x894d('0x32')](_[_0x894d('0x3c')](_0x5373b5[_0x894d('0x30')],_0x44a725['filters']));if(_0x5373b5[_0x894d('0x30')][_0x894d('0x3d')]){_0x15c167[_0x894d('0x3b')]=_['merge'](_0x15c167[_0x894d('0x3b')],{'$or':_[_0x894d('0x2b')](_0x15c167[_0x894d('0x36')],function(_0x215a69){var _0x3c5402={};_0x3c5402[_0x215a69]={'$like':'%'+_0x5373b5[_0x894d('0x30')][_0x894d('0x3d')]+'%'};return _0x3c5402;})});}_0x15c167=_[_0x894d('0x3e')]({},_0x15c167,_0x5373b5[_0x894d('0x40')]);return _0x5c5922[_0x894d('0x4a')](_0x15c167);}})[_0x894d('0x23')](function(_0x2fb657){if(_0x2fb657){_0x4db509=_0x2fb657[_0x894d('0x37')];if(!_0x5373b5[_0x894d('0x30')][_0x894d('0x38')](_0x894d('0x4d'))){_0x15c167[_0x894d('0x1e')]=qs['limit'](_0x5373b5[_0x894d('0x30')][_0x894d('0x1e')]);_0x15c167[_0x894d('0x20')]=qs[_0x894d('0x20')](_0x5373b5[_0x894d('0x30')][_0x894d('0x20')]);}return _0x5c5922[_0x894d('0x4a')](_0x15c167);}})[_0x894d('0x23')](function(_0x24292b){if(_0x24292b){return _0x24292b?{'count':_0x4db509,'rows':_0x24292b}:null;}})[_0x894d('0x23')](respondWithResult(_0x1f1e71,null))['catch'](handleError(_0x1f1e71,null));};exports[_0x894d('0x4e')]=function(_0x267f25,_0x5c260b,_0x34923a){if(_0x267f25[_0x894d('0x46')]['id']){delete _0x267f25[_0x894d('0x46')]['id'];}return db[_0x894d('0x2c')][_0x894d('0x4b')]({'where':{'id':_0x267f25[_0x894d('0x49')]['id']}})[_0x894d('0x23')](handleEntityNotFound(_0x5c260b,null))[_0x894d('0x23')](function(_0x581397){if(_0x581397){_0x267f25['body'][_0x894d('0x4f')]=_0x581397['id'];_0x267f25[_0x894d('0x46')][_0x894d('0x50')]=integrations[_0x894d('0x51')](_0x267f25[_0x894d('0x46')][_0x894d('0x52')],_0x267f25[_0x894d('0x46')][_0x894d('0x2f')]);_0x267f25[_0x894d('0x46')][_0x894d('0x53')]=integrations[_0x894d('0x54')](_0x267f25[_0x894d('0x46')][_0x894d('0x52')],_0x267f25[_0x894d('0x46')][_0x894d('0x2f')]);return db['ServicenowConfiguration'][_0x894d('0x45')](_0x267f25[_0x894d('0x46')],{'include':[{'model':db[_0x894d('0x55')],'as':'Subjects'},{'model':db[_0x894d('0x55')],'as':_0x894d('0x53')}]});}return null;})[_0x894d('0x23')](respondWithResult(_0x5c260b,null))[_0x894d('0x44')](handleError(_0x5c260b,null));};exports[_0x894d('0x56')]=function(_0x39b1e4,_0x290eec,_0x622ed3){var _0x145538=[_0x894d('0x57'),'hold_reason',_0x894d('0x58'),_0x894d('0x59'),'close_code','notify',_0x894d('0x5a'),_0x894d('0x5b'),_0x894d('0x5c')];var _0x8e50d3=['parent',_0x894d('0x57'),'caused_by',_0x894d('0x5d'),_0x894d('0x5e'),_0x894d('0x5f'),_0x894d('0x60'),_0x894d('0x61'),_0x894d('0x62'),'number',_0x894d('0x63'),_0x894d('0x64'),_0x894d('0x65'),_0x894d('0x66'),_0x894d('0x67'),_0x894d('0x68'),'state','sys_created_by',_0x894d('0x58'),'order',_0x894d('0x69'),_0x894d('0x6a'),_0x894d('0x6b'),_0x894d('0x6c'),'impact',_0x894d('0x6d'),'work_notes_list','business_service',_0x894d('0x6e'),_0x894d('0x6f'),_0x894d('0x70'),_0x894d('0x71'),_0x894d('0x72'),_0x894d('0x73'),_0x894d('0x74'),_0x894d('0x75'),'work_end','reopened_time','resolved_at','caller_id',_0x894d('0x76'),_0x894d('0x59'),_0x894d('0x77'),'short_description',_0x894d('0x78'),_0x894d('0x79'),_0x894d('0x7a'),_0x894d('0x7b'),'assignment_group',_0x894d('0x7c'),_0x894d('0x7d'),_0x894d('0x7e'),_0x894d('0x7f'),_0x894d('0x80'),_0x894d('0x81'),_0x894d('0x82'),_0x894d('0x83'),_0x894d('0x84'),'parent_incident',_0x894d('0x85'),_0x894d('0x86'),_0x894d('0x87'),_0x894d('0x5a'),_0x894d('0x88'),_0x894d('0x89'),_0x894d('0x8a'),_0x894d('0x8b'),_0x894d('0x8c'),_0x894d('0x8d'),_0x894d('0x5b'),_0x894d('0x8e'),'sla_due',_0x894d('0x8f'),_0x894d('0x90'),_0x894d('0x91'),_0x894d('0x92'),_0x894d('0x93'),_0x894d('0x94'),_0x894d('0x95'),_0x894d('0x96'),_0x894d('0x97'),_0x894d('0x98'),_0x894d('0x5c')];var _0x4d173f='';var _0x19752c='';var _0x229360=[];var _0x341711='';var _0x454c62='';var _0x4c858a=[];var _0x27dbde='';var _0x2a4dcf='';var _0x1f0805={};var _0x4970af='';return db[_0x894d('0x2c')][_0x894d('0x4b')]({'where':{'id':_0x39b1e4[_0x894d('0x49')]['id']},'attributes':['id',_0x894d('0x99'),'password',_0x894d('0x9a'),_0x894d('0x9b'),_0x894d('0x9c')]})[_0x894d('0x23')](handleEntityNotFound(_0x290eec,null))['then'](function(_0x50d5d5){if(_0x50d5d5){_0x4970af=_0x50d5d5[_0x894d('0x9b')];var _0x135343=_0x4970af['slice'](-0x1);if(_0x135343==='/'){_0x4970af=_0x4970af['substring'](0x0,_0x4970af['lastIndexOf'](_0x135343));}_0x2a4dcf=util[_0x894d('0x9d')](_0x894d('0x9e'),_0x4970af);_0x27dbde=util['format'](_0x894d('0x9f'),_0x4970af);_0x1f0805={'user':_0x50d5d5[_0x894d('0x99')],'pass':_0x50d5d5[_0x894d('0xa0')]};var _0x4b7a5a={'method':'GET','uri':_0x2a4dcf+_0x894d('0xa1'),'auth':_0x1f0805,'json':!![]};return rp(_0x4b7a5a);}})[_0x894d('0x23')](function(_0x46fc2b){if(_0x46fc2b[_0x894d('0xa2')]['length']>0x0){_0x4d173f=_0x46fc2b['result'];}console[_0x894d('0xa3')](_0x894d('0xa4'),_0x4d173f);_0x4c858a=[];_0x19752c=Object[_0x894d('0xa5')]([],_0x4d173f);_['remove'](_0x19752c,function(_0x559b42){return!_0x145538['includes'](_0x559b42[_0x894d('0x28')]);});_0x19752c[_0x894d('0xa6')](function(_0x392e86){var _0x3a3963=createFieldObject(_0x27dbde,_0x1f0805,_0x392e86[_0x894d('0xa7')],_0x392e86[_0x894d('0x28')],_0x392e86['label'],![]);_0x4c858a[_0x894d('0xa8')](_0x3a3963);});return Promise['all'](_0x4c858a);})['then'](function(_0x4c29e3){_0x229360=_0x4c29e3;_0x341711=Object['assign']([],_0x4d173f);console[_0x894d('0xa3')]('TCL:\x20_object',_0x4d173f);_[_0x894d('0xa9')](_0x341711,function(_0x14cbff){return _0x8e50d3[_0x894d('0xaa')](_0x14cbff[_0x894d('0x28')]);});console[_0x894d('0xa3')](_0x894d('0xab'),_0x341711);_0x4c858a=[];_0x341711[_0x894d('0xa6')](function(_0x48a763){var _0x434d4d=createFieldObject(_0x27dbde,_0x1f0805,_0x48a763[_0x894d('0xa7')],_0x48a763[_0x894d('0x28')],_0x48a763[_0x894d('0xac')],!![]);_0x4c858a[_0x894d('0xa8')](_0x434d4d);});return Promise[_0x894d('0xad')](_0x4c858a);})['then'](function(_0x3ca316){_0x454c62=_0x3ca316;var _0x585d95=_0x229360[_0x894d('0xae')](_0x454c62);return{'count':_0x585d95[_0x894d('0x37')],'rows':_0x585d95};})[_0x894d('0x23')](respondWithResult(_0x290eec,null))[_0x894d('0x44')](function(_0x3a2f62){console[_0x894d('0xa3')](_0x894d('0xaf')+_0x3a2f62);var _0xdc033e=_0x39b1e4[_0x894d('0x30')][_0x894d('0xb0')]?0x1f4:_0x3a2f62[_0x894d('0xb1')]||0x1f4;logger[_0x894d('0x26')](_0x3a2f62['stack']);delete _0x3a2f62[_0x894d('0x28')];if(_0xdc033e===0x191){_0xdc033e=0x190;}_0x290eec[_0x894d('0x1b')](_0xdc033e)['send'](_0x39b1e4[_0x894d('0x30')][_0x894d('0xb0')]?{'message':_0x894d('0xb2'),'statusCode':_0x3a2f62[_0x894d('0xb1')]}:_0x3a2f62);});};function createFieldObject(_0x6f3244,_0x2f0958,_0xd6558e,_0x33c1e1,_0x55f4d4,_0x3e650d){return new Promise(function(_0x1346c1,_0x35dab6){var _0x491920={'id':_0x33c1e1,'name':_0x55f4d4,'custom':_0x3e650d};if(_0xd6558e===_0x894d('0xb3')){_0x491920[_0x894d('0x40')]=[{'name':_0x894d('0xb4'),'value':_0x894d('0xb5')},{'name':'False','value':'false'}];_0x1346c1(_0x491920);}else{var _0x4c849d={'method':'GET','uri':_0x6f3244+'sys_choice?sysparm_query=name=incident^element='+_0x33c1e1,'auth':_0x2f0958,'json':!![]};return rp(_0x4c849d)[_0x894d('0x23')](function(_0x1c2322){var _0x1d5ce5=[];if(_0x1c2322[_0x894d('0xa2')]['length']>0x0){_0x1c2322[_0x894d('0xa2')][_0x894d('0xa6')](function(_0x2d48a6){if(_0x2d48a6[_0x894d('0xb6')]===_0x894d('0xb7')){var _0x43c77e={'name':_0x2d48a6[_0x894d('0xac')],'value':_0x2d48a6[_0x894d('0xb8')]};_0x1d5ce5['push'](_0x43c77e);}});}_0x491920[_0x894d('0x40')]=_0x1d5ce5;if(_0x491920[_0x894d('0x40')][_0x894d('0x37')]>0x0){_0x1346c1(_0x491920);}else{if(_0x3e650d==![]){_0x1346c1();}else{_0x1346c1(_0x491920);}}});}});} \ No newline at end of file +var _0x8c54=['company','assigned_to','comments','sla_due','comments_and_work_notes','due_date','escalation','correlation_id','location','email','remoteUri','serverUrl','slice','substring','lastIndexOf','format','%s/api/now/table/','username','password','GET','incident?sysparm_display_value=all','result','incident\x20table\x20objects','assign','remove','includes','forEach','internalType','push','log','TCL:\x20_object','TCL:\x20exports.getEntityFields\x20->\x20_objectsCustom','label','all','concat','ServiceNow\x20error:\x20','test','send','Wrong\x20credentials','statusCode','boolean','True','true','False','false','sys_choice?sysparm_query=name=incident^element=','inactive','value','eml-format','fast-json-patch','moment','bluebird','util','path','to-csv','ejs','lodash','squel','crypto','jsforce','desk.js','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','api','../../config/license/util','../../mysqldb','sendStatus','status','offset','count','limit','set','Content-Range','apply','reject','update','then','destroy','end','error','stack','name','index','map','fieldName','type','key','query','keys','filters','intersection','model','attributes','fields','length','hasOwnProperty','order','sort','where','pick','filter','VIRTUAL','merge','options','ServicenowAccount','includeAll','include','findAll','rows','show','params','rawAttributes','find','catch','create','body','findOne','getConfigurations','nolimit','addConfiguration','AccountId','Subjects','channel','Descriptions','getDescriptions','ServicenowField','getFields','made_sla','hold_reason','notify','incident_state','severity','category','parent','caused_by','watch_list','upon_reject','approval_history','number','resolved_by','sys_updated_by','opened_by','user_input','sys_created_on','sys_domain','state','sys_created_by','knowledge','calendar_stc','cmdb_ci','delivery_plan','impact','active','business_service','sys_domain_path','rfc','time_worked','expected_start','opened_at','business_duration','work_end','resolved_at','subcategory','work_notes','close_code','correlation_display','work_start','assignment_group','business_stc','description','calendar_duration','close_notes','closed_by','follow_up','sys_id','contact_type','urgency','problem_id'];(function(_0x4eb55c,_0x5da5d9){var _0x49e1d5=function(_0x243cab){while(--_0x243cab){_0x4eb55c['push'](_0x4eb55c['shift']());}};_0x49e1d5(++_0x5da5d9);}(_0x8c54,0x19a));var _0x48c5=function(_0x29795,_0x8399c){_0x29795=_0x29795-0x0;var _0x1470f0=_0x8c54[_0x29795];return _0x1470f0;};'use strict';var emlformat=require(_0x48c5('0x0'));var rimraf=require('rimraf');var zipdir=require('zip-dir');var jsonpatch=require(_0x48c5('0x1'));var rp=require('request-promise');var moment=require(_0x48c5('0x2'));var BPromise=require(_0x48c5('0x3'));var Mustache=require('mustache');var util=require(_0x48c5('0x4'));var path=require(_0x48c5('0x5'));var sox=require('sox');var csv=require(_0x48c5('0x6'));var ejs=require(_0x48c5('0x7'));var fs=require('fs');var fs_extra=require('fs-extra');var _=require(_0x48c5('0x8'));var squel=require(_0x48c5('0x9'));var crypto=require(_0x48c5('0xa'));var jsforce=require(_0x48c5('0xb'));var deskjs=require(_0x48c5('0xc'));var toCsv=require(_0x48c5('0x6'));var querystring=require('querystring');var Papa=require(_0x48c5('0xd'));var Redis=require(_0x48c5('0xe'));var authService=require(_0x48c5('0xf'));var qs=require(_0x48c5('0x10'));var as=require(_0x48c5('0x11'));var hardwareService=require('../../config/license/hardware');var logger=require('../../config/logger')(_0x48c5('0x12'));var utils=require('../../config/utils');var config=require('../../config/environment');var licenseUtil=require(_0x48c5('0x13'));var db=require(_0x48c5('0x14'))['db'];var integrations=require('../../components/integrations/configuration');function respondWithStatusCode(_0x43bc2c,_0x595e9f){_0x595e9f=_0x595e9f||0xcc;return function(_0x2e83f4){if(_0x2e83f4){return _0x43bc2c[_0x48c5('0x15')](_0x595e9f);}return _0x43bc2c[_0x48c5('0x16')](_0x595e9f)['end']();};}function respondWithResult(_0x31ab6c,_0x4d0db6){_0x4d0db6=_0x4d0db6||0xc8;return function(_0x2ec516){if(_0x2ec516){return _0x31ab6c['status'](_0x4d0db6)['json'](_0x2ec516);}};}function respondWithFilteredResult(_0x496f99,_0x5d97ba){return function(_0x240808){if(_0x240808){var _0x274d25=typeof _0x5d97ba[_0x48c5('0x17')]==='undefined'&&typeof _0x5d97ba['limit']==='undefined';var _0x13ca2c=_0x240808[_0x48c5('0x18')];var _0x4f5e97=_0x274d25?0x0:_0x5d97ba['offset'];var _0x1c2425=_0x274d25?_0x240808['count']:_0x5d97ba[_0x48c5('0x17')]+_0x5d97ba[_0x48c5('0x19')];var _0x591ad8;if(_0x1c2425>=_0x13ca2c){_0x1c2425=_0x13ca2c;_0x591ad8=0xc8;}else{_0x591ad8=0xce;}_0x496f99[_0x48c5('0x16')](_0x591ad8);return _0x496f99[_0x48c5('0x1a')](_0x48c5('0x1b'),_0x4f5e97+'-'+_0x1c2425+'/'+_0x13ca2c)['json'](_0x240808);}return null;};}function patchUpdates(_0x9cae7f){return function(_0xb04bee){try{jsonpatch[_0x48c5('0x1c')](_0xb04bee,_0x9cae7f,!![]);}catch(_0x41df8f){return BPromise[_0x48c5('0x1d')](_0x41df8f);}return _0xb04bee['save']();};}function saveUpdates(_0x59c66b,_0x855230){return function(_0x406c5b){if(_0x406c5b){return _0x406c5b[_0x48c5('0x1e')](_0x59c66b)[_0x48c5('0x1f')](function(_0x289798){return _0x289798;});}return null;};}function removeEntity(_0x4309f3,_0x893ac4){return function(_0x27f912){if(_0x27f912){return _0x27f912[_0x48c5('0x20')]()[_0x48c5('0x1f')](function(){_0x4309f3[_0x48c5('0x16')](0xcc)[_0x48c5('0x21')]();});}};}function handleEntityNotFound(_0x1cce23,_0x83976){return function(_0x35525e){if(!_0x35525e){_0x1cce23['sendStatus'](0x194);}return _0x35525e;};}function handleError(_0x1f48f5,_0x2db156){_0x2db156=_0x2db156||0x1f4;return function(_0x3b222b){logger[_0x48c5('0x22')](_0x3b222b[_0x48c5('0x23')]);if(_0x3b222b[_0x48c5('0x24')]){delete _0x3b222b[_0x48c5('0x24')];}_0x1f48f5[_0x48c5('0x16')](_0x2db156)['send'](_0x3b222b);};}exports[_0x48c5('0x25')]=function(_0x3b830d,_0x5c0c73){var _0x50f610={},_0x3eed59={},_0x4f554b={'count':0x0,'rows':[]};var _0x108edd=_[_0x48c5('0x26')](db['ServicenowAccount']['rawAttributes'],function(_0xa4f821){return{'name':_0xa4f821[_0x48c5('0x27')],'type':_0xa4f821[_0x48c5('0x28')][_0x48c5('0x29')]};});_0x3eed59['model']=_[_0x48c5('0x26')](_0x108edd,'name');_0x3eed59[_0x48c5('0x2a')]=_[_0x48c5('0x2b')](_0x3b830d[_0x48c5('0x2a')]);_0x3eed59[_0x48c5('0x2c')]=_[_0x48c5('0x2d')](_0x3eed59[_0x48c5('0x2e')],_0x3eed59[_0x48c5('0x2a')]);_0x50f610[_0x48c5('0x2f')]=_[_0x48c5('0x2d')](_0x3eed59[_0x48c5('0x2e')],qs[_0x48c5('0x30')](_0x3b830d[_0x48c5('0x2a')][_0x48c5('0x30')]));_0x50f610[_0x48c5('0x2f')]=_0x50f610[_0x48c5('0x2f')][_0x48c5('0x31')]?_0x50f610['attributes']:_0x3eed59[_0x48c5('0x2e')];if(!_0x3b830d[_0x48c5('0x2a')][_0x48c5('0x32')]('nolimit')){_0x50f610[_0x48c5('0x19')]=qs[_0x48c5('0x19')](_0x3b830d['query'][_0x48c5('0x19')]);_0x50f610[_0x48c5('0x17')]=qs[_0x48c5('0x17')](_0x3b830d['query']['offset']);}_0x50f610[_0x48c5('0x33')]=qs[_0x48c5('0x34')](_0x3b830d['query'][_0x48c5('0x34')]);_0x50f610[_0x48c5('0x35')]=qs[_0x48c5('0x2c')](_[_0x48c5('0x36')](_0x3b830d['query'],_0x3eed59[_0x48c5('0x2c')]),_0x108edd);if(_0x3b830d[_0x48c5('0x2a')][_0x48c5('0x37')]){_0x50f610[_0x48c5('0x35')]=_['merge'](_0x50f610[_0x48c5('0x35')],{'$or':_['map'](_0x108edd,function(_0xb0ada3){if(_0xb0ada3[_0x48c5('0x28')]!==_0x48c5('0x38')){var _0x1c686e={};_0x1c686e[_0xb0ada3[_0x48c5('0x24')]]={'$like':'%'+_0x3b830d[_0x48c5('0x2a')]['filter']+'%'};return _0x1c686e;}})});}_0x50f610=_[_0x48c5('0x39')]({},_0x50f610,_0x3b830d[_0x48c5('0x3a')]);var _0x2664c4={'where':_0x50f610['where']};return db[_0x48c5('0x3b')][_0x48c5('0x18')](_0x2664c4)[_0x48c5('0x1f')](function(_0x2cad09){_0x4f554b[_0x48c5('0x18')]=_0x2cad09;if(_0x3b830d['query'][_0x48c5('0x3c')]){_0x50f610[_0x48c5('0x3d')]=[{'all':!![]}];}return db[_0x48c5('0x3b')][_0x48c5('0x3e')](_0x50f610);})[_0x48c5('0x1f')](function(_0x264f37){_0x4f554b[_0x48c5('0x3f')]=_0x264f37;return _0x4f554b;})[_0x48c5('0x1f')](respondWithFilteredResult(_0x5c0c73,_0x50f610))['catch'](handleError(_0x5c0c73,null));};exports[_0x48c5('0x40')]=function(_0x2f0d5,_0x122ef1){var _0x1c4ecd={'raw':![],'where':{'id':_0x2f0d5[_0x48c5('0x41')]['id']}},_0xc66f85={};_0xc66f85[_0x48c5('0x2e')]=_['keys'](db['ServicenowAccount'][_0x48c5('0x42')]);_0xc66f85[_0x48c5('0x2a')]=_[_0x48c5('0x2b')](_0x2f0d5[_0x48c5('0x2a')]);_0xc66f85[_0x48c5('0x2c')]=_[_0x48c5('0x2d')](_0xc66f85[_0x48c5('0x2e')],_0xc66f85[_0x48c5('0x2a')]);_0x1c4ecd[_0x48c5('0x2f')]=_[_0x48c5('0x2d')](_0xc66f85[_0x48c5('0x2e')],qs[_0x48c5('0x30')](_0x2f0d5['query'][_0x48c5('0x30')]));_0x1c4ecd['attributes']=_0x1c4ecd[_0x48c5('0x2f')]['length']?_0x1c4ecd['attributes']:_0xc66f85[_0x48c5('0x2e')];if(_0x2f0d5[_0x48c5('0x2a')]['includeAll']){_0x1c4ecd[_0x48c5('0x3d')]=[{'all':!![]}];}_0x1c4ecd=_[_0x48c5('0x39')]({},_0x1c4ecd,_0x2f0d5[_0x48c5('0x3a')]);return db[_0x48c5('0x3b')][_0x48c5('0x43')](_0x1c4ecd)[_0x48c5('0x1f')](handleEntityNotFound(_0x122ef1,null))[_0x48c5('0x1f')](respondWithResult(_0x122ef1,null))[_0x48c5('0x44')](handleError(_0x122ef1,null));};exports[_0x48c5('0x45')]=function(_0x538905,_0x5a9da3){return db[_0x48c5('0x3b')][_0x48c5('0x45')](_0x538905['body'],{})['then'](respondWithResult(_0x5a9da3,0xc9))['catch'](handleError(_0x5a9da3,null));};exports[_0x48c5('0x1e')]=function(_0x1bb681,_0x407980){if(_0x1bb681[_0x48c5('0x46')]['id']){delete _0x1bb681[_0x48c5('0x46')]['id'];}return db[_0x48c5('0x3b')][_0x48c5('0x43')]({'where':{'id':_0x1bb681[_0x48c5('0x41')]['id']}})['then'](handleEntityNotFound(_0x407980,null))['then'](saveUpdates(_0x1bb681['body'],null))[_0x48c5('0x1f')](respondWithResult(_0x407980,null))['catch'](handleError(_0x407980,null));};exports[_0x48c5('0x20')]=function(_0x2dd430,_0x117996){return db[_0x48c5('0x3b')][_0x48c5('0x43')]({'where':{'id':_0x2dd430[_0x48c5('0x41')]['id']}})[_0x48c5('0x1f')](handleEntityNotFound(_0x117996,null))['then'](removeEntity(_0x117996,null))['catch'](handleError(_0x117996,null));};exports['getConfigurations']=function(_0x5590aa,_0xb6c0d2,_0x220aa9){var _0x3f7a0f={};var _0x4dbefb={};var _0x5e9ad4;var _0x12201a;return db['ServicenowAccount'][_0x48c5('0x47')]({'where':{'id':_0x5590aa[_0x48c5('0x41')]['id']}})[_0x48c5('0x1f')](handleEntityNotFound(_0xb6c0d2,null))['then'](function(_0x4872de){if(_0x4872de){_0x5e9ad4=_0x4872de;_0x4dbefb[_0x48c5('0x2e')]=_[_0x48c5('0x2b')](db['ServicenowConfiguration'][_0x48c5('0x42')]);_0x4dbefb[_0x48c5('0x2a')]=_['keys'](_0x5590aa[_0x48c5('0x2a')]);_0x4dbefb['filters']=_[_0x48c5('0x2d')](_0x4dbefb['model'],_0x4dbefb[_0x48c5('0x2a')]);_0x3f7a0f[_0x48c5('0x2f')]=_[_0x48c5('0x2d')](_0x4dbefb['model'],qs[_0x48c5('0x30')](_0x5590aa['query'][_0x48c5('0x30')]));_0x3f7a0f[_0x48c5('0x2f')]=_0x3f7a0f['attributes'][_0x48c5('0x31')]?_0x3f7a0f[_0x48c5('0x2f')]:_0x4dbefb[_0x48c5('0x2e')];_0x3f7a0f['order']=qs[_0x48c5('0x34')](_0x5590aa[_0x48c5('0x2a')]['sort']);_0x3f7a0f[_0x48c5('0x35')]=qs[_0x48c5('0x2c')](_[_0x48c5('0x36')](_0x5590aa['query'],_0x4dbefb[_0x48c5('0x2c')]));if(_0x5590aa['query'][_0x48c5('0x37')]){_0x3f7a0f['where']=_['merge'](_0x3f7a0f['where'],{'$or':_[_0x48c5('0x26')](_0x3f7a0f[_0x48c5('0x2f')],function(_0x1e1715){var _0x386e7d={};_0x386e7d[_0x1e1715]={'$like':'%'+_0x5590aa[_0x48c5('0x2a')][_0x48c5('0x37')]+'%'};return _0x386e7d;})});}_0x3f7a0f=_[_0x48c5('0x39')]({},_0x3f7a0f,_0x5590aa['options']);return _0x5e9ad4[_0x48c5('0x48')](_0x3f7a0f);}})[_0x48c5('0x1f')](function(_0x297ac5){if(_0x297ac5){_0x12201a=_0x297ac5[_0x48c5('0x31')];if(!_0x5590aa[_0x48c5('0x2a')][_0x48c5('0x32')](_0x48c5('0x49'))){_0x3f7a0f[_0x48c5('0x19')]=qs[_0x48c5('0x19')](_0x5590aa[_0x48c5('0x2a')][_0x48c5('0x19')]);_0x3f7a0f[_0x48c5('0x17')]=qs['offset'](_0x5590aa[_0x48c5('0x2a')][_0x48c5('0x17')]);}return _0x5e9ad4[_0x48c5('0x48')](_0x3f7a0f);}})['then'](function(_0x2051e0){if(_0x2051e0){return _0x2051e0?{'count':_0x12201a,'rows':_0x2051e0}:null;}})[_0x48c5('0x1f')](respondWithResult(_0xb6c0d2,null))[_0x48c5('0x44')](handleError(_0xb6c0d2,null));};exports[_0x48c5('0x4a')]=function(_0xb51253,_0x2ec0df,_0xa58e7a){if(_0xb51253[_0x48c5('0x46')]['id']){delete _0xb51253[_0x48c5('0x46')]['id'];}return db[_0x48c5('0x3b')][_0x48c5('0x47')]({'where':{'id':_0xb51253[_0x48c5('0x41')]['id']}})[_0x48c5('0x1f')](handleEntityNotFound(_0x2ec0df,null))[_0x48c5('0x1f')](function(_0x47ebac){if(_0x47ebac){_0xb51253[_0x48c5('0x46')][_0x48c5('0x4b')]=_0x47ebac['id'];_0xb51253['body'][_0x48c5('0x4c')]=integrations['getSubjects'](_0xb51253['body'][_0x48c5('0x4d')],_0xb51253['body'][_0x48c5('0x28')]);_0xb51253[_0x48c5('0x46')][_0x48c5('0x4e')]=integrations[_0x48c5('0x4f')](_0xb51253[_0x48c5('0x46')][_0x48c5('0x4d')],_0xb51253[_0x48c5('0x46')][_0x48c5('0x28')]);return db['ServicenowConfiguration'][_0x48c5('0x45')](_0xb51253[_0x48c5('0x46')],{'include':[{'model':db[_0x48c5('0x50')],'as':_0x48c5('0x4c')},{'model':db[_0x48c5('0x50')],'as':_0x48c5('0x4e')}]});}return null;})['then'](respondWithResult(_0x2ec0df,null))[_0x48c5('0x44')](handleError(_0x2ec0df,null));};exports[_0x48c5('0x51')]=function(_0x44e429,_0xfe7b2,_0x2a8116){var _0x421ac0=[_0x48c5('0x52'),_0x48c5('0x53'),'knowledge','subcategory','close_code',_0x48c5('0x54'),_0x48c5('0x55'),_0x48c5('0x56'),_0x48c5('0x57')];var _0x532028=[_0x48c5('0x58'),_0x48c5('0x52'),_0x48c5('0x59'),_0x48c5('0x5a'),_0x48c5('0x5b'),'sys_updated_on','child_incidents','hold_reason',_0x48c5('0x5c'),_0x48c5('0x5d'),_0x48c5('0x5e'),_0x48c5('0x5f'),_0x48c5('0x60'),_0x48c5('0x61'),_0x48c5('0x62'),_0x48c5('0x63'),_0x48c5('0x64'),_0x48c5('0x65'),_0x48c5('0x66'),_0x48c5('0x33'),_0x48c5('0x67'),'closed_at',_0x48c5('0x68'),_0x48c5('0x69'),_0x48c5('0x6a'),_0x48c5('0x6b'),'work_notes_list',_0x48c5('0x6c'),'priority',_0x48c5('0x6d'),_0x48c5('0x6e'),_0x48c5('0x6f'),_0x48c5('0x70'),_0x48c5('0x71'),_0x48c5('0x72'),'group_list',_0x48c5('0x73'),'reopened_time',_0x48c5('0x74'),'caller_id','approval_set',_0x48c5('0x75'),_0x48c5('0x76'),'short_description',_0x48c5('0x77'),_0x48c5('0x78'),'delivery_task',_0x48c5('0x79'),_0x48c5('0x7a'),_0x48c5('0x7b'),'additional_assignee_list',_0x48c5('0x7c'),_0x48c5('0x7d'),_0x48c5('0x54'),'sys_class_name',_0x48c5('0x7e'),_0x48c5('0x7f'),_0x48c5('0x80'),'parent_incident',_0x48c5('0x81'),_0x48c5('0x82'),'reopened_by',_0x48c5('0x55'),_0x48c5('0x83'),_0x48c5('0x84'),_0x48c5('0x85'),'reassignment_count','activity_due',_0x48c5('0x86'),'severity',_0x48c5('0x87'),_0x48c5('0x88'),'approval',_0x48c5('0x89'),_0x48c5('0x8a'),'sys_mod_count','reopen_count','sys_tags',_0x48c5('0x8b'),'upon_approval',_0x48c5('0x8c'),_0x48c5('0x8d'),_0x48c5('0x57')];var _0x305baf='';var _0x1cf7d6='';var _0x39c275=[];var _0x5bbec4='';var _0x227670='';var _0x108023=[];var _0x468f68='';var _0x40204a='';var _0x4c7726={};var _0x13b656='';return db['ServicenowAccount'][_0x48c5('0x47')]({'where':{'id':_0x44e429[_0x48c5('0x41')]['id']},'attributes':['id','username','password',_0x48c5('0x8e'),_0x48c5('0x8f'),_0x48c5('0x90')]})[_0x48c5('0x1f')](handleEntityNotFound(_0xfe7b2,null))['then'](function(_0x38308b){if(_0x38308b){_0x13b656=_0x38308b[_0x48c5('0x8f')];var _0x180113=_0x13b656[_0x48c5('0x91')](-0x1);if(_0x180113==='/'){_0x13b656=_0x13b656[_0x48c5('0x92')](0x0,_0x13b656[_0x48c5('0x93')](_0x180113));}_0x40204a=util[_0x48c5('0x94')]('%s/api/now/doc/table/schema/',_0x13b656);_0x468f68=util[_0x48c5('0x94')](_0x48c5('0x95'),_0x13b656);_0x4c7726={'user':_0x38308b[_0x48c5('0x96')],'pass':_0x38308b[_0x48c5('0x97')]};var _0xbc2ecd={'method':_0x48c5('0x98'),'uri':_0x40204a+_0x48c5('0x99'),'auth':_0x4c7726,'json':!![]};return rp(_0xbc2ecd);}})[_0x48c5('0x1f')](function(_0x2fef29){if(_0x2fef29['result'][_0x48c5('0x31')]>0x0){_0x305baf=_0x2fef29[_0x48c5('0x9a')];}console['log'](_0x48c5('0x9b'),_0x305baf);_0x108023=[];_0x1cf7d6=Object[_0x48c5('0x9c')]([],_0x305baf);_[_0x48c5('0x9d')](_0x1cf7d6,function(_0x17b9f4){return!_0x421ac0[_0x48c5('0x9e')](_0x17b9f4[_0x48c5('0x24')]);});_0x1cf7d6[_0x48c5('0x9f')](function(_0x10ed48){var _0x4eed78=createFieldObject(_0x468f68,_0x4c7726,_0x10ed48[_0x48c5('0xa0')],_0x10ed48[_0x48c5('0x24')],_0x10ed48['label'],![]);_0x108023[_0x48c5('0xa1')](_0x4eed78);});return Promise['all'](_0x108023);})[_0x48c5('0x1f')](function(_0xe65431){_0x39c275=_0xe65431;_0x5bbec4=Object['assign']([],_0x305baf);console[_0x48c5('0xa2')](_0x48c5('0xa3'),_0x305baf);_[_0x48c5('0x9d')](_0x5bbec4,function(_0x290838){return _0x532028[_0x48c5('0x9e')](_0x290838[_0x48c5('0x24')]);});console[_0x48c5('0xa2')](_0x48c5('0xa4'),_0x5bbec4);_0x108023=[];_0x5bbec4[_0x48c5('0x9f')](function(_0x3f5160){var _0x5334e1=createFieldObject(_0x468f68,_0x4c7726,_0x3f5160[_0x48c5('0xa0')],_0x3f5160[_0x48c5('0x24')],_0x3f5160[_0x48c5('0xa5')],!![]);_0x108023[_0x48c5('0xa1')](_0x5334e1);});return Promise[_0x48c5('0xa6')](_0x108023);})[_0x48c5('0x1f')](function(_0x132a55){_0x227670=_0x132a55;var _0x562e18=_0x39c275[_0x48c5('0xa7')](_0x227670);return{'count':_0x562e18[_0x48c5('0x31')],'rows':_0x562e18};})['then'](respondWithResult(_0xfe7b2,null))['catch'](function(_0xede16e){console[_0x48c5('0xa2')](_0x48c5('0xa8')+_0xede16e);var _0x31e6a2=_0x44e429['query'][_0x48c5('0xa9')]?0x1f4:_0xede16e['statusCode']||0x1f4;logger[_0x48c5('0x22')](_0xede16e['stack']);delete _0xede16e[_0x48c5('0x24')];if(_0x31e6a2===0x191){_0x31e6a2=0x190;}_0xfe7b2['status'](_0x31e6a2)[_0x48c5('0xaa')](_0x44e429[_0x48c5('0x2a')][_0x48c5('0xa9')]?{'message':_0x48c5('0xab'),'statusCode':_0xede16e[_0x48c5('0xac')]}:_0xede16e);});};function createFieldObject(_0x1f7da9,_0x176227,_0xc97784,_0x78c527,_0x250a7f,_0x143544){return new Promise(function(_0x11ad4c,_0x127609){var _0xcb5b58={'id':_0x78c527,'name':_0x250a7f,'custom':_0x143544};if(_0xc97784===_0x48c5('0xad')){_0xcb5b58[_0x48c5('0x3a')]=[{'name':_0x48c5('0xae'),'value':_0x48c5('0xaf')},{'name':_0x48c5('0xb0'),'value':_0x48c5('0xb1')}];_0x11ad4c(_0xcb5b58);}else{var _0x3e5956={'method':_0x48c5('0x98'),'uri':_0x1f7da9+_0x48c5('0xb2')+_0x78c527,'auth':_0x176227,'json':!![]};return rp(_0x3e5956)[_0x48c5('0x1f')](function(_0x14394){var _0x3742bd=[];if(_0x14394[_0x48c5('0x9a')][_0x48c5('0x31')]>0x0){_0x14394[_0x48c5('0x9a')][_0x48c5('0x9f')](function(_0x23b201){if(_0x23b201[_0x48c5('0xb3')]===_0x48c5('0xb1')){var _0x14eb79={'name':_0x23b201[_0x48c5('0xa5')],'value':_0x23b201[_0x48c5('0xb4')]};_0x3742bd[_0x48c5('0xa1')](_0x14eb79);}});}_0xcb5b58[_0x48c5('0x3a')]=_0x3742bd;if(_0xcb5b58[_0x48c5('0x3a')][_0x48c5('0x31')]>0x0){_0x11ad4c(_0xcb5b58);}else{if(_0x143544==![]){_0x11ad4c();}else{_0x11ad4c(_0xcb5b58);}}});}});} \ No newline at end of file diff --git a/server/api/intServicenowAccount/intServicenowAccount.model.js b/server/api/intServicenowAccount/intServicenowAccount.model.js index 5eeb5a7..c4e95fd 100644 --- a/server/api/intServicenowAccount/intServicenowAccount.model.js +++ b/server/api/intServicenowAccount/intServicenowAccount.model.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x4819=['request-promise','path','rimraf','../../config/environment','./intServicenowAccount.attributes','exports','define','ServicenowAccount','int_servicenow_accounts','util','../../config/logger','api','moment','bluebird'];(function(_0x4e1676,_0x2f08a0){var _0x44684b=function(_0x4b6d79){while(--_0x4b6d79){_0x4e1676['push'](_0x4e1676['shift']());}};_0x44684b(++_0x2f08a0);}(_0x4819,0xcd));var _0x9481=function(_0x24a972,_0x5079b5){_0x24a972=_0x24a972-0x0;var _0x2d4871=_0x4819[_0x24a972];return _0x2d4871;};'use strict';var _=require('lodash');var util=require(_0x9481('0x0'));var logger=require(_0x9481('0x1'))(_0x9481('0x2'));var moment=require(_0x9481('0x3'));var BPromise=require(_0x9481('0x4'));var rp=require(_0x9481('0x5'));var fs=require('fs');var path=require(_0x9481('0x6'));var rimraf=require(_0x9481('0x7'));var config=require(_0x9481('0x8'));var attributes=require(_0x9481('0x9'));var integrations=require('../../components/integrations/configuration');module[_0x9481('0xa')]=function(_0x5def07,_0x54cc78){return _0x5def07[_0x9481('0xb')](_0x9481('0xc'),attributes,{'tableName':_0x9481('0xd'),'paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file +var _0x7a54=['../../config/logger','moment','bluebird','path','rimraf','../../config/environment','./intServicenowAccount.attributes','../../components/integrations/configuration','define','ServicenowAccount','lodash','util'];(function(_0x2a0350,_0x249319){var _0x425220=function(_0x1d5f78){while(--_0x1d5f78){_0x2a0350['push'](_0x2a0350['shift']());}};_0x425220(++_0x249319);}(_0x7a54,0x106));var _0x47a5=function(_0x46efd6,_0x55719c){_0x46efd6=_0x46efd6-0x0;var _0x564dc9=_0x7a54[_0x46efd6];return _0x564dc9;};'use strict';var _=require(_0x47a5('0x0'));var util=require(_0x47a5('0x1'));var logger=require(_0x47a5('0x2'))('api');var moment=require(_0x47a5('0x3'));var BPromise=require(_0x47a5('0x4'));var rp=require('request-promise');var fs=require('fs');var path=require(_0x47a5('0x5'));var rimraf=require(_0x47a5('0x6'));var config=require(_0x47a5('0x7'));var attributes=require(_0x47a5('0x8'));var integrations=require(_0x47a5('0x9'));module['exports']=function(_0x3d5629,_0x59199c){return _0x3d5629[_0x47a5('0xa')](_0x47a5('0xb'),attributes,{'tableName':'int_servicenow_accounts','paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file diff --git a/server/api/intServicenowAccount/intServicenowAccount.rpc.js b/server/api/intServicenowAccount/intServicenowAccount.rpc.js index b9ded88..b1e0fc3 100644 --- a/server/api/intServicenowAccount/intServicenowAccount.rpc.js +++ b/server/api/intServicenowAccount/intServicenowAccount.rpc.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xe8e4=['info','ShowServicenowAccount','raw','lodash','util','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','request','then','ServicenowAccount,\x20%s,\x20%s','request\x20sent','debug','ServicenowAccount,\x20%s,\x20%s,\x20%s','stringify','error','code','message','catch','GetServicenowAccount','ServicenowAccount','options','where','attributes','include','model','map'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0xe8e4,0x11b));var _0x4e8e=function(_0x29f81a,_0x717019){_0x29f81a=_0x29f81a-0x0;var _0x28ae30=_0xe8e4[_0x29f81a];return _0x28ae30;};'use strict';var _=require(_0x4e8e('0x0'));var util=require(_0x4e8e('0x1'));var moment=require('moment');var BPromise=require(_0x4e8e('0x2'));var rs=require(_0x4e8e('0x3'));var fs=require('fs');var Redis=require(_0x4e8e('0x4'));var db=require(_0x4e8e('0x5'))['db'];var utils=require(_0x4e8e('0x6'));var logger=require(_0x4e8e('0x7'))(_0x4e8e('0x8'));var config=require(_0x4e8e('0x9'));var jayson=require(_0x4e8e('0xa'));var client=jayson[_0x4e8e('0xb')][_0x4e8e('0xc')]({'port':0x232a});function respondWithRpcPromise(_0x5ba3ca,_0x28eca9,_0x143baf){return new BPromise(function(_0x13805a,_0x1e3dea){return client[_0x4e8e('0xd')](_0x5ba3ca,_0x143baf)[_0x4e8e('0xe')](function(_0xdf99ad){logger['info'](_0x4e8e('0xf'),_0x28eca9,_0x4e8e('0x10'));logger[_0x4e8e('0x11')](_0x4e8e('0x12'),_0x28eca9,_0x4e8e('0x10'),JSON[_0x4e8e('0x13')](_0xdf99ad));if(_0xdf99ad[_0x4e8e('0x14')]){if(_0xdf99ad[_0x4e8e('0x14')][_0x4e8e('0x15')]===0x1f4){logger[_0x4e8e('0x14')](_0x4e8e('0xf'),_0x28eca9,_0xdf99ad[_0x4e8e('0x14')][_0x4e8e('0x16')]);return _0x1e3dea(_0xdf99ad[_0x4e8e('0x14')][_0x4e8e('0x16')]);}logger[_0x4e8e('0x14')](_0x4e8e('0xf'),_0x28eca9,_0xdf99ad['error'][_0x4e8e('0x16')]);return _0x13805a(_0xdf99ad[_0x4e8e('0x14')]['message']);}else{logger['info'](_0x4e8e('0xf'),_0x28eca9,_0x4e8e('0x10'));_0x13805a(_0xdf99ad['result'][_0x4e8e('0x16')]);}})[_0x4e8e('0x17')](function(_0x2f7486){logger[_0x4e8e('0x14')](_0x4e8e('0xf'),_0x28eca9,_0x2f7486);_0x1e3dea(_0x2f7486);});});}exports[_0x4e8e('0x18')]=function(_0x3a850e){var _0x4f2272=this;return new Promise(function(_0x4d90b1,_0x263b2e){return db[_0x4e8e('0x19')]['findAll']({'raw':_0x3a850e[_0x4e8e('0x1a')]?_0x3a850e['options']['raw']===undefined?!![]:![]:!![],'where':_0x3a850e[_0x4e8e('0x1a')]?_0x3a850e[_0x4e8e('0x1a')][_0x4e8e('0x1b')]||null:null,'attributes':_0x3a850e[_0x4e8e('0x1a')]?_0x3a850e[_0x4e8e('0x1a')][_0x4e8e('0x1c')]||null:null,'limit':_0x3a850e['options']?_0x3a850e[_0x4e8e('0x1a')]['limit']||null:null,'include':_0x3a850e[_0x4e8e('0x1a')]?_0x3a850e['options']['include']?_['map'](_0x3a850e[_0x4e8e('0x1a')][_0x4e8e('0x1d')],function(_0x56b36d){return{'model':db[_0x56b36d[_0x4e8e('0x1e')]],'as':_0x56b36d['as'],'attributes':_0x56b36d[_0x4e8e('0x1c')],'include':_0x56b36d[_0x4e8e('0x1d')]?_[_0x4e8e('0x1f')](_0x56b36d[_0x4e8e('0x1d')],function(_0x527f15){return{'model':db[_0x527f15[_0x4e8e('0x1e')]],'as':_0x527f15['as'],'attributes':_0x527f15['attributes'],'include':_0x527f15[_0x4e8e('0x1d')]?_[_0x4e8e('0x1f')](_0x527f15[_0x4e8e('0x1d')],function(_0x2f60c8){return{'model':db[_0x2f60c8[_0x4e8e('0x1e')]],'as':_0x2f60c8['as'],'attributes':_0x2f60c8[_0x4e8e('0x1c')]};}):[]};}):[]};}):[]:[]})['then'](function(_0x5b5a4e){logger[_0x4e8e('0x20')](_0x4e8e('0x18'),_0x3a850e);logger['debug'](_0x4e8e('0x18'),_0x3a850e,JSON[_0x4e8e('0x13')](_0x5b5a4e));_0x4d90b1(_0x5b5a4e);})[_0x4e8e('0x17')](function(_0x7dc367){logger[_0x4e8e('0x14')](_0x4e8e('0x18'),_0x7dc367[_0x4e8e('0x16')],_0x3a850e);_0x263b2e(_0x4f2272[_0x4e8e('0x14')](0x1f4,_0x7dc367[_0x4e8e('0x16')]));});});};exports[_0x4e8e('0x21')]=function(_0x2736c9){var _0xa41241=this;return new Promise(function(_0xc37283,_0xd78526){return db[_0x4e8e('0x19')]['find']({'raw':_0x2736c9[_0x4e8e('0x1a')]?_0x2736c9[_0x4e8e('0x1a')][_0x4e8e('0x22')]===undefined?!![]:![]:!![],'where':_0x2736c9[_0x4e8e('0x1a')]?_0x2736c9[_0x4e8e('0x1a')][_0x4e8e('0x1b')]||null:null,'attributes':_0x2736c9[_0x4e8e('0x1a')]?_0x2736c9[_0x4e8e('0x1a')]['attributes']||null:null,'include':_0x2736c9['options']?_0x2736c9['options'][_0x4e8e('0x1d')]?_[_0x4e8e('0x1f')](_0x2736c9[_0x4e8e('0x1a')][_0x4e8e('0x1d')],function(_0xd95446){return{'model':db[_0xd95446['model']],'as':_0xd95446['as'],'attributes':_0xd95446[_0x4e8e('0x1c')],'include':_0xd95446['include']?_[_0x4e8e('0x1f')](_0xd95446[_0x4e8e('0x1d')],function(_0x1de85c){return{'model':db[_0x1de85c['model']],'as':_0x1de85c['as'],'attributes':_0x1de85c[_0x4e8e('0x1c')],'include':_0x1de85c[_0x4e8e('0x1d')]?_['map'](_0x1de85c['include'],function(_0x338ce4){return{'model':db[_0x338ce4[_0x4e8e('0x1e')]],'as':_0x338ce4['as'],'attributes':_0x338ce4[_0x4e8e('0x1c')]};}):[]};}):[]};}):[]:[]})[_0x4e8e('0xe')](function(_0x33bbef){logger[_0x4e8e('0x20')]('ShowServicenowAccount',_0x2736c9);logger[_0x4e8e('0x11')](_0x4e8e('0x21'),_0x2736c9,JSON[_0x4e8e('0x13')](_0x33bbef));_0xc37283(_0x33bbef);})['catch'](function(_0x4d91d1){logger['error']('ShowServicenowAccount',_0x4d91d1[_0x4e8e('0x16')],_0x2736c9);_0xd78526(_0xa41241[_0x4e8e('0x14')](0x1f4,_0x4d91d1[_0x4e8e('0x16')]));});});}; \ No newline at end of file +var _0xd875=['findAll','options','raw','where','attributes','limit','include','map','model','ShowServicenowAccount','find','util','moment','randomstring','../../config/logger','rpc','jayson/promise','http','request','then','info','request\x20sent','debug','ServicenowAccount,\x20%s,\x20%s,\x20%s','stringify','error','ServicenowAccount,\x20%s,\x20%s','message','catch','GetServicenowAccount','ServicenowAccount'];(function(_0xc9bd13,_0x3ceab7){var _0x3e7481=function(_0x281b77){while(--_0x281b77){_0xc9bd13['push'](_0xc9bd13['shift']());}};_0x3e7481(++_0x3ceab7);}(_0xd875,0xe4));var _0x5d87=function(_0x9c79b3,_0x5c5ac0){_0x9c79b3=_0x9c79b3-0x0;var _0x2b897a=_0xd875[_0x9c79b3];return _0x2b897a;};'use strict';var _=require('lodash');var util=require(_0x5d87('0x0'));var moment=require(_0x5d87('0x1'));var BPromise=require('bluebird');var rs=require(_0x5d87('0x2'));var fs=require('fs');var Redis=require('ioredis');var db=require('../../mysqldb')['db'];var utils=require('../../config/utils');var logger=require(_0x5d87('0x3'))(_0x5d87('0x4'));var config=require('../../config/environment');var jayson=require(_0x5d87('0x5'));var client=jayson['client'][_0x5d87('0x6')]({'port':0x232a});function respondWithRpcPromise(_0x5a6210,_0x58356f,_0x2e898d){return new BPromise(function(_0x471fd8,_0x306f89){return client[_0x5d87('0x7')](_0x5a6210,_0x2e898d)[_0x5d87('0x8')](function(_0x5e5fa9){logger[_0x5d87('0x9')]('ServicenowAccount,\x20%s,\x20%s',_0x58356f,_0x5d87('0xa'));logger[_0x5d87('0xb')](_0x5d87('0xc'),_0x58356f,_0x5d87('0xa'),JSON[_0x5d87('0xd')](_0x5e5fa9));if(_0x5e5fa9[_0x5d87('0xe')]){if(_0x5e5fa9[_0x5d87('0xe')]['code']===0x1f4){logger[_0x5d87('0xe')](_0x5d87('0xf'),_0x58356f,_0x5e5fa9[_0x5d87('0xe')][_0x5d87('0x10')]);return _0x306f89(_0x5e5fa9[_0x5d87('0xe')][_0x5d87('0x10')]);}logger[_0x5d87('0xe')](_0x5d87('0xf'),_0x58356f,_0x5e5fa9[_0x5d87('0xe')][_0x5d87('0x10')]);return _0x471fd8(_0x5e5fa9['error']['message']);}else{logger[_0x5d87('0x9')](_0x5d87('0xf'),_0x58356f,_0x5d87('0xa'));_0x471fd8(_0x5e5fa9['result'][_0x5d87('0x10')]);}})[_0x5d87('0x11')](function(_0x5c335b){logger['error'](_0x5d87('0xf'),_0x58356f,_0x5c335b);_0x306f89(_0x5c335b);});});}exports[_0x5d87('0x12')]=function(_0x31ff54){var _0x36af93=this;return new Promise(function(_0x5ea7b5,_0xf698e8){return db[_0x5d87('0x13')][_0x5d87('0x14')]({'raw':_0x31ff54[_0x5d87('0x15')]?_0x31ff54[_0x5d87('0x15')][_0x5d87('0x16')]===undefined?!![]:![]:!![],'where':_0x31ff54[_0x5d87('0x15')]?_0x31ff54[_0x5d87('0x15')][_0x5d87('0x17')]||null:null,'attributes':_0x31ff54['options']?_0x31ff54['options'][_0x5d87('0x18')]||null:null,'limit':_0x31ff54[_0x5d87('0x15')]?_0x31ff54[_0x5d87('0x15')][_0x5d87('0x19')]||null:null,'include':_0x31ff54['options']?_0x31ff54[_0x5d87('0x15')][_0x5d87('0x1a')]?_[_0x5d87('0x1b')](_0x31ff54['options'][_0x5d87('0x1a')],function(_0x2956b7){return{'model':db[_0x2956b7[_0x5d87('0x1c')]],'as':_0x2956b7['as'],'attributes':_0x2956b7[_0x5d87('0x18')],'include':_0x2956b7[_0x5d87('0x1a')]?_[_0x5d87('0x1b')](_0x2956b7['include'],function(_0x46724b){return{'model':db[_0x46724b[_0x5d87('0x1c')]],'as':_0x46724b['as'],'attributes':_0x46724b[_0x5d87('0x18')],'include':_0x46724b[_0x5d87('0x1a')]?_['map'](_0x46724b[_0x5d87('0x1a')],function(_0x22d189){return{'model':db[_0x22d189['model']],'as':_0x22d189['as'],'attributes':_0x22d189[_0x5d87('0x18')]};}):[]};}):[]};}):[]:[]})[_0x5d87('0x8')](function(_0x404cbe){logger[_0x5d87('0x9')](_0x5d87('0x12'),_0x31ff54);logger[_0x5d87('0xb')]('GetServicenowAccount',_0x31ff54,JSON[_0x5d87('0xd')](_0x404cbe));_0x5ea7b5(_0x404cbe);})[_0x5d87('0x11')](function(_0x8967b3){logger[_0x5d87('0xe')](_0x5d87('0x12'),_0x8967b3[_0x5d87('0x10')],_0x31ff54);_0xf698e8(_0x36af93[_0x5d87('0xe')](0x1f4,_0x8967b3['message']));});});};exports[_0x5d87('0x1d')]=function(_0x305a1d){var _0x4efad5=this;return new Promise(function(_0x203251,_0x25a650){return db['ServicenowAccount'][_0x5d87('0x1e')]({'raw':_0x305a1d[_0x5d87('0x15')]?_0x305a1d['options']['raw']===undefined?!![]:![]:!![],'where':_0x305a1d['options']?_0x305a1d['options'][_0x5d87('0x17')]||null:null,'attributes':_0x305a1d[_0x5d87('0x15')]?_0x305a1d[_0x5d87('0x15')][_0x5d87('0x18')]||null:null,'include':_0x305a1d[_0x5d87('0x15')]?_0x305a1d[_0x5d87('0x15')][_0x5d87('0x1a')]?_[_0x5d87('0x1b')](_0x305a1d[_0x5d87('0x15')][_0x5d87('0x1a')],function(_0x2382d4){return{'model':db[_0x2382d4[_0x5d87('0x1c')]],'as':_0x2382d4['as'],'attributes':_0x2382d4[_0x5d87('0x18')],'include':_0x2382d4[_0x5d87('0x1a')]?_[_0x5d87('0x1b')](_0x2382d4['include'],function(_0x4dba77){return{'model':db[_0x4dba77['model']],'as':_0x4dba77['as'],'attributes':_0x4dba77['attributes'],'include':_0x4dba77['include']?_[_0x5d87('0x1b')](_0x4dba77[_0x5d87('0x1a')],function(_0x510dc5){return{'model':db[_0x510dc5[_0x5d87('0x1c')]],'as':_0x510dc5['as'],'attributes':_0x510dc5[_0x5d87('0x18')]};}):[]};}):[]};}):[]:[]})[_0x5d87('0x8')](function(_0x2d656d){logger[_0x5d87('0x9')](_0x5d87('0x1d'),_0x305a1d);logger[_0x5d87('0xb')](_0x5d87('0x1d'),_0x305a1d,JSON[_0x5d87('0xd')](_0x2d656d));_0x203251(_0x2d656d);})[_0x5d87('0x11')](function(_0x58f951){logger[_0x5d87('0xe')](_0x5d87('0x1d'),_0x58f951[_0x5d87('0x10')],_0x305a1d);_0x25a650(_0x4efad5[_0x5d87('0xe')](0x1f4,_0x58f951[_0x5d87('0x10')]));});});}; \ No newline at end of file diff --git a/server/api/intServicenowConfiguration/index.js b/server/api/intServicenowConfiguration/index.js index 8103ef8..b1e2955 100644 --- a/server/api/intServicenowConfiguration/index.js +++ b/server/api/intServicenowConfiguration/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x9f28=['/:id/descriptions','getDescriptions','post','create','put','update','delete','destroy','util','path','connect-timeout','express','Router','fs-extra','../../components/auth/service','../../config/environment','./intServicenowConfiguration.controller','get','index','/:id','isAuthenticated','show','/:id/subjects','getSubjects'];(function(_0x11c6b8,_0x5b2d7b){var _0x38b38f=function(_0x641ad0){while(--_0x641ad0){_0x11c6b8['push'](_0x11c6b8['shift']());}};_0x38b38f(++_0x5b2d7b);}(_0x9f28,0xc8));var _0x89f2=function(_0x106709,_0x14e903){_0x106709=_0x106709-0x0;var _0x355653=_0x9f28[_0x106709];return _0x355653;};'use strict';var multer=require('multer');var util=require(_0x89f2('0x0'));var path=require(_0x89f2('0x1'));var timeout=require(_0x89f2('0x2'));var express=require(_0x89f2('0x3'));var router=express[_0x89f2('0x4')]();var fs_extra=require(_0x89f2('0x5'));var auth=require(_0x89f2('0x6'));var interaction=require('../../components/interaction/service');var config=require(_0x89f2('0x7'));var controller=require(_0x89f2('0x8'));router[_0x89f2('0x9')]('/',auth['isAuthenticated'](),controller[_0x89f2('0xa')]);router['get'](_0x89f2('0xb'),auth[_0x89f2('0xc')](),controller[_0x89f2('0xd')]);router[_0x89f2('0x9')]('/:id/fields',auth[_0x89f2('0xc')](),controller['getFields']);router[_0x89f2('0x9')](_0x89f2('0xe'),auth[_0x89f2('0xc')](),controller[_0x89f2('0xf')]);router['get'](_0x89f2('0x10'),auth[_0x89f2('0xc')](),controller[_0x89f2('0x11')]);router[_0x89f2('0x12')]('/',auth[_0x89f2('0xc')](),controller[_0x89f2('0x13')]);router[_0x89f2('0x14')](_0x89f2('0xb'),auth[_0x89f2('0xc')](),controller[_0x89f2('0x15')]);router[_0x89f2('0x16')](_0x89f2('0xb'),auth[_0x89f2('0xc')](),controller[_0x89f2('0x17')]);module['exports']=router; \ No newline at end of file +var _0x74d4=['/:id/descriptions','post','create','update','delete','/:id','destroy','exports','util','path','connect-timeout','express','Router','fs-extra','../../components/auth/service','../../components/interaction/service','./intServicenowConfiguration.controller','get','isAuthenticated','show','/:id/fields','/:id/subjects'];(function(_0x49f3d8,_0x300bf1){var _0x3c05eb=function(_0x3aa5f4){while(--_0x3aa5f4){_0x49f3d8['push'](_0x49f3d8['shift']());}};_0x3c05eb(++_0x300bf1);}(_0x74d4,0xe4));var _0x474d=function(_0x5cd0fb,_0x253865){_0x5cd0fb=_0x5cd0fb-0x0;var _0x5301f0=_0x74d4[_0x5cd0fb];return _0x5301f0;};'use strict';var multer=require('multer');var util=require(_0x474d('0x0'));var path=require(_0x474d('0x1'));var timeout=require(_0x474d('0x2'));var express=require(_0x474d('0x3'));var router=express[_0x474d('0x4')]();var fs_extra=require(_0x474d('0x5'));var auth=require(_0x474d('0x6'));var interaction=require(_0x474d('0x7'));var config=require('../../config/environment');var controller=require(_0x474d('0x8'));router[_0x474d('0x9')]('/',auth[_0x474d('0xa')](),controller['index']);router[_0x474d('0x9')]('/:id',auth[_0x474d('0xa')](),controller[_0x474d('0xb')]);router['get'](_0x474d('0xc'),auth[_0x474d('0xa')](),controller['getFields']);router[_0x474d('0x9')](_0x474d('0xd'),auth[_0x474d('0xa')](),controller['getSubjects']);router[_0x474d('0x9')](_0x474d('0xe'),auth[_0x474d('0xa')](),controller['getDescriptions']);router[_0x474d('0xf')]('/',auth[_0x474d('0xa')](),controller[_0x474d('0x10')]);router['put']('/:id',auth[_0x474d('0xa')](),controller[_0x474d('0x11')]);router[_0x474d('0x12')](_0x474d('0x13'),auth[_0x474d('0xa')](),controller[_0x474d('0x14')]);module[_0x474d('0x15')]=router; \ No newline at end of file diff --git a/server/api/intServicenowConfiguration/intServicenowConfiguration.attributes.js b/server/api/intServicenowConfiguration/intServicenowConfiguration.attributes.js index 8ed491f..5e37bac 100644 --- a/server/api/intServicenowConfiguration/intServicenowConfiguration.attributes.js +++ b/server/api/intServicenowConfiguration/intServicenowConfiguration.attributes.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xb4e7=['exports','STRING'];(function(_0x32349f,_0x30fd65){var _0x2209ae=function(_0x228a31){while(--_0x228a31){_0x32349f['push'](_0x32349f['shift']());}};_0x2209ae(++_0x30fd65);}(_0xb4e7,0x126));var _0x7b4e=function(_0x31e29a,_0x349c9b){_0x31e29a=_0x31e29a-0x0;var _0x32d892=_0xb4e7[_0x31e29a];return _0x32d892;};'use strict';var Sequelize=require('sequelize');module[_0x7b4e('0x0')]={'name':{'type':Sequelize[_0x7b4e('0x1')]},'description':{'type':Sequelize[_0x7b4e('0x1')]}}; \ No newline at end of file +var _0x157a=['exports','STRING'];(function(_0x117c47,_0x4b9fdb){var _0xc7ee7e=function(_0x183bfb){while(--_0x183bfb){_0x117c47['push'](_0x117c47['shift']());}};_0xc7ee7e(++_0x4b9fdb);}(_0x157a,0x1c4));var _0xa157=function(_0x15cc52,_0x167dca){_0x15cc52=_0x15cc52-0x0;var _0x47224b=_0x157a[_0x15cc52];return _0x47224b;};'use strict';var Sequelize=require('sequelize');module[_0xa157('0x0')]={'name':{'type':Sequelize[_0xa157('0x1')]},'description':{'type':Sequelize['STRING']}}; \ No newline at end of file diff --git a/server/api/intServicenowConfiguration/intServicenowConfiguration.controller.js b/server/api/intServicenowConfiguration/intServicenowConfiguration.controller.js index eb17f34..49d51db 100644 --- a/server/api/intServicenowConfiguration/intServicenowConfiguration.controller.js +++ b/server/api/intServicenowConfiguration/intServicenowConfiguration.controller.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xe0e6=['../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','sendStatus','end','json','offset','limit','undefined','count','status','set','Content-Range','apply','reject','save','update','then','stack','name','map','ServicenowConfiguration','rawAttributes','fieldName','type','key','model','keys','query','filters','intersection','attributes','fields','length','hasOwnProperty','nolimit','order','sort','where','filter','merge','VIRTUAL','options','includeAll','include','catch','find','create','body','params','destroy','getFields','findOne','ServicenowField','pick','getSubjects','getDescriptions','eml-format','rimraf','zip-dir','fast-json-patch','moment','util','path','sox','squel','crypto','jsforce','desk.js','to-csv','papaparse','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/logger','api'];(function(_0x16dfee,_0x1dba0b){var _0x3ced82=function(_0x1fac3f){while(--_0x1fac3f){_0x16dfee['push'](_0x16dfee['shift']());}};_0x3ced82(++_0x1dba0b);}(_0xe0e6,0x16a));var _0x6e0e=function(_0x4ff939,_0x5f54ea){_0x4ff939=_0x4ff939-0x0;var _0x3f8ba8=_0xe0e6[_0x4ff939];return _0x3f8ba8;};'use strict';var emlformat=require(_0x6e0e('0x0'));var rimraf=require(_0x6e0e('0x1'));var zipdir=require(_0x6e0e('0x2'));var jsonpatch=require(_0x6e0e('0x3'));var rp=require('request-promise');var moment=require(_0x6e0e('0x4'));var BPromise=require('bluebird');var Mustache=require('mustache');var util=require(_0x6e0e('0x5'));var path=require(_0x6e0e('0x6'));var sox=require(_0x6e0e('0x7'));var csv=require('to-csv');var ejs=require('ejs');var fs=require('fs');var fs_extra=require('fs-extra');var _=require('lodash');var squel=require(_0x6e0e('0x8'));var crypto=require(_0x6e0e('0x9'));var jsforce=require(_0x6e0e('0xa'));var deskjs=require(_0x6e0e('0xb'));var toCsv=require(_0x6e0e('0xc'));var querystring=require('querystring');var Papa=require(_0x6e0e('0xd'));var Redis=require('ioredis');var authService=require('../../components/auth/service');var qs=require(_0x6e0e('0xe'));var as=require(_0x6e0e('0xf'));var hardwareService=require('../../config/license/hardware');var logger=require(_0x6e0e('0x10'))(_0x6e0e('0x11'));var utils=require(_0x6e0e('0x12'));var config=require(_0x6e0e('0x13'));var licenseUtil=require(_0x6e0e('0x14'));var db=require(_0x6e0e('0x15'))['db'];function respondWithStatusCode(_0x39af55,_0x44bada){_0x44bada=_0x44bada||0xcc;return function(_0x463080){if(_0x463080){return _0x39af55[_0x6e0e('0x16')](_0x44bada);}return _0x39af55['status'](_0x44bada)[_0x6e0e('0x17')]();};}function respondWithResult(_0x522e85,_0x536d17){_0x536d17=_0x536d17||0xc8;return function(_0xc62bed){if(_0xc62bed){return _0x522e85['status'](_0x536d17)[_0x6e0e('0x18')](_0xc62bed);}};}function respondWithFilteredResult(_0x896dee,_0x541adb){return function(_0x4fc187){if(_0x4fc187){var _0xbcae37=typeof _0x541adb[_0x6e0e('0x19')]==='undefined'&&typeof _0x541adb[_0x6e0e('0x1a')]===_0x6e0e('0x1b');var _0x105f7a=_0x4fc187[_0x6e0e('0x1c')];var _0x3ae2ad=_0xbcae37?0x0:_0x541adb[_0x6e0e('0x19')];var _0xa981b6=_0xbcae37?_0x4fc187[_0x6e0e('0x1c')]:_0x541adb[_0x6e0e('0x19')]+_0x541adb[_0x6e0e('0x1a')];var _0x44bb34;if(_0xa981b6>=_0x105f7a){_0xa981b6=_0x105f7a;_0x44bb34=0xc8;}else{_0x44bb34=0xce;}_0x896dee[_0x6e0e('0x1d')](_0x44bb34);return _0x896dee[_0x6e0e('0x1e')](_0x6e0e('0x1f'),_0x3ae2ad+'-'+_0xa981b6+'/'+_0x105f7a)[_0x6e0e('0x18')](_0x4fc187);}return null;};}function patchUpdates(_0x382fdf){return function(_0x234992){try{jsonpatch[_0x6e0e('0x20')](_0x234992,_0x382fdf,!![]);}catch(_0x17ed3d){return BPromise[_0x6e0e('0x21')](_0x17ed3d);}return _0x234992[_0x6e0e('0x22')]();};}function saveUpdates(_0xc59f90,_0x5da9a3){return function(_0x40244c){if(_0x40244c){return _0x40244c[_0x6e0e('0x23')](_0xc59f90)[_0x6e0e('0x24')](function(_0x4affb6){return _0x4affb6;});}return null;};}function removeEntity(_0xa7348c,_0x14ebd6){return function(_0x21418f){if(_0x21418f){return _0x21418f['destroy']()['then'](function(){_0xa7348c[_0x6e0e('0x1d')](0xcc)[_0x6e0e('0x17')]();});}};}function handleEntityNotFound(_0x580c03,_0x4f9797){return function(_0x1f3777){if(!_0x1f3777){_0x580c03[_0x6e0e('0x16')](0x194);}return _0x1f3777;};}function handleError(_0x4c0b3c,_0x531a65){_0x531a65=_0x531a65||0x1f4;return function(_0x29d14f){logger['error'](_0x29d14f[_0x6e0e('0x25')]);if(_0x29d14f[_0x6e0e('0x26')]){delete _0x29d14f[_0x6e0e('0x26')];}_0x4c0b3c[_0x6e0e('0x1d')](_0x531a65)['send'](_0x29d14f);};}exports['index']=function(_0x4927f1,_0x2748d4){var _0x3b887b={},_0x2c2e1e={},_0x507b55={'count':0x0,'rows':[]};var _0x11c5b9=_[_0x6e0e('0x27')](db[_0x6e0e('0x28')][_0x6e0e('0x29')],function(_0x1d7986){return{'name':_0x1d7986[_0x6e0e('0x2a')],'type':_0x1d7986[_0x6e0e('0x2b')][_0x6e0e('0x2c')]};});_0x2c2e1e[_0x6e0e('0x2d')]=_[_0x6e0e('0x27')](_0x11c5b9,_0x6e0e('0x26'));_0x2c2e1e['query']=_[_0x6e0e('0x2e')](_0x4927f1[_0x6e0e('0x2f')]);_0x2c2e1e[_0x6e0e('0x30')]=_[_0x6e0e('0x31')](_0x2c2e1e[_0x6e0e('0x2d')],_0x2c2e1e['query']);_0x3b887b[_0x6e0e('0x32')]=_['intersection'](_0x2c2e1e[_0x6e0e('0x2d')],qs[_0x6e0e('0x33')](_0x4927f1['query'][_0x6e0e('0x33')]));_0x3b887b['attributes']=_0x3b887b[_0x6e0e('0x32')][_0x6e0e('0x34')]?_0x3b887b[_0x6e0e('0x32')]:_0x2c2e1e['model'];if(!_0x4927f1['query'][_0x6e0e('0x35')](_0x6e0e('0x36'))){_0x3b887b[_0x6e0e('0x1a')]=qs['limit'](_0x4927f1[_0x6e0e('0x2f')][_0x6e0e('0x1a')]);_0x3b887b[_0x6e0e('0x19')]=qs['offset'](_0x4927f1[_0x6e0e('0x2f')][_0x6e0e('0x19')]);}_0x3b887b[_0x6e0e('0x37')]=qs[_0x6e0e('0x38')](_0x4927f1['query'][_0x6e0e('0x38')]);_0x3b887b[_0x6e0e('0x39')]=qs['filters'](_['pick'](_0x4927f1[_0x6e0e('0x2f')],_0x2c2e1e[_0x6e0e('0x30')]),_0x11c5b9);if(_0x4927f1[_0x6e0e('0x2f')][_0x6e0e('0x3a')]){_0x3b887b[_0x6e0e('0x39')]=_[_0x6e0e('0x3b')](_0x3b887b[_0x6e0e('0x39')],{'$or':_['map'](_0x11c5b9,function(_0x3f02b9){if(_0x3f02b9['type']!==_0x6e0e('0x3c')){var _0x23f3df={};_0x23f3df[_0x3f02b9[_0x6e0e('0x26')]]={'$like':'%'+_0x4927f1[_0x6e0e('0x2f')][_0x6e0e('0x3a')]+'%'};return _0x23f3df;}})});}_0x3b887b=_[_0x6e0e('0x3b')]({},_0x3b887b,_0x4927f1[_0x6e0e('0x3d')]);var _0x4d9d78={'where':_0x3b887b[_0x6e0e('0x39')]};return db['ServicenowConfiguration'][_0x6e0e('0x1c')](_0x4d9d78)[_0x6e0e('0x24')](function(_0x3f383d){_0x507b55[_0x6e0e('0x1c')]=_0x3f383d;if(_0x4927f1['query'][_0x6e0e('0x3e')]){_0x3b887b[_0x6e0e('0x3f')]=[{'all':!![]}];}return db['ServicenowConfiguration']['findAll'](_0x3b887b);})[_0x6e0e('0x24')](function(_0x5e2214){_0x507b55['rows']=_0x5e2214;return _0x507b55;})[_0x6e0e('0x24')](respondWithFilteredResult(_0x2748d4,_0x3b887b))[_0x6e0e('0x40')](handleError(_0x2748d4,null));};exports['show']=function(_0x13e0c5,_0x17b644){var _0x216ad0={'raw':![],'where':{'id':_0x13e0c5['params']['id']}},_0x213ffc={};_0x213ffc[_0x6e0e('0x2d')]=_['keys'](db['ServicenowConfiguration'][_0x6e0e('0x29')]);_0x213ffc[_0x6e0e('0x2f')]=_['keys'](_0x13e0c5[_0x6e0e('0x2f')]);_0x213ffc[_0x6e0e('0x30')]=_[_0x6e0e('0x31')](_0x213ffc['model'],_0x213ffc[_0x6e0e('0x2f')]);_0x216ad0[_0x6e0e('0x32')]=_[_0x6e0e('0x31')](_0x213ffc[_0x6e0e('0x2d')],qs[_0x6e0e('0x33')](_0x13e0c5['query'][_0x6e0e('0x33')]));_0x216ad0['attributes']=_0x216ad0[_0x6e0e('0x32')]['length']?_0x216ad0['attributes']:_0x213ffc[_0x6e0e('0x2d')];if(_0x13e0c5[_0x6e0e('0x2f')][_0x6e0e('0x3e')]){_0x216ad0[_0x6e0e('0x3f')]=[{'all':!![]}];}_0x216ad0=_[_0x6e0e('0x3b')]({},_0x216ad0,_0x13e0c5[_0x6e0e('0x3d')]);return db['ServicenowConfiguration'][_0x6e0e('0x41')](_0x216ad0)['then'](handleEntityNotFound(_0x17b644,null))[_0x6e0e('0x24')](respondWithResult(_0x17b644,null))['catch'](handleError(_0x17b644,null));};exports[_0x6e0e('0x42')]=function(_0x278123,_0x37ca3b){return db['ServicenowConfiguration'][_0x6e0e('0x42')](_0x278123[_0x6e0e('0x43')],{})[_0x6e0e('0x24')](respondWithResult(_0x37ca3b,0xc9))[_0x6e0e('0x40')](handleError(_0x37ca3b,null));};exports['update']=function(_0x417e1a,_0x4ef123){if(_0x417e1a[_0x6e0e('0x43')]['id']){delete _0x417e1a['body']['id'];}return db[_0x6e0e('0x28')][_0x6e0e('0x41')]({'where':{'id':_0x417e1a[_0x6e0e('0x44')]['id']}})[_0x6e0e('0x24')](handleEntityNotFound(_0x4ef123,null))[_0x6e0e('0x24')](saveUpdates(_0x417e1a['body'],null))['then'](respondWithResult(_0x4ef123,null))[_0x6e0e('0x40')](handleError(_0x4ef123,null));};exports[_0x6e0e('0x45')]=function(_0xe59aa2,_0x19928e){return db[_0x6e0e('0x28')][_0x6e0e('0x41')]({'where':{'id':_0xe59aa2['params']['id']}})[_0x6e0e('0x24')](handleEntityNotFound(_0x19928e,null))[_0x6e0e('0x24')](removeEntity(_0x19928e,null))[_0x6e0e('0x40')](handleError(_0x19928e,null));};exports[_0x6e0e('0x46')]=function(_0x2eabaf,_0x10fab2,_0x504929){var _0x4b8d44={};var _0x5ec571={};var _0x4fd00a;var _0x2e966c;return db[_0x6e0e('0x28')][_0x6e0e('0x47')]({'where':{'id':_0x2eabaf[_0x6e0e('0x44')]['id']}})[_0x6e0e('0x24')](handleEntityNotFound(_0x10fab2,null))['then'](function(_0x5acf24){if(_0x5acf24){_0x4fd00a=_0x5acf24;_0x5ec571[_0x6e0e('0x2d')]=_[_0x6e0e('0x2e')](db[_0x6e0e('0x48')]['rawAttributes']);_0x5ec571[_0x6e0e('0x2f')]=_[_0x6e0e('0x2e')](_0x2eabaf[_0x6e0e('0x2f')]);_0x5ec571[_0x6e0e('0x30')]=_['intersection'](_0x5ec571[_0x6e0e('0x2d')],_0x5ec571[_0x6e0e('0x2f')]);_0x4b8d44[_0x6e0e('0x32')]=_[_0x6e0e('0x31')](_0x5ec571['model'],qs['fields'](_0x2eabaf['query'][_0x6e0e('0x33')]));_0x4b8d44[_0x6e0e('0x32')]=_0x4b8d44[_0x6e0e('0x32')][_0x6e0e('0x34')]?_0x4b8d44['attributes']:_0x5ec571[_0x6e0e('0x2d')];_0x4b8d44['order']=qs[_0x6e0e('0x38')](_0x2eabaf['query']['sort']);_0x4b8d44[_0x6e0e('0x39')]=qs[_0x6e0e('0x30')](_['pick'](_0x2eabaf[_0x6e0e('0x2f')],_0x5ec571[_0x6e0e('0x30')]));if(_0x2eabaf[_0x6e0e('0x2f')][_0x6e0e('0x3a')]){_0x4b8d44[_0x6e0e('0x39')]=_['merge'](_0x4b8d44['where'],{'$or':_['map'](_0x4b8d44[_0x6e0e('0x32')],function(_0x2d6a7a){var _0x4535dc={};_0x4535dc[_0x2d6a7a]={'$like':'%'+_0x2eabaf[_0x6e0e('0x2f')]['filter']+'%'};return _0x4535dc;})});}_0x4b8d44=_['merge']({},_0x4b8d44,_0x2eabaf[_0x6e0e('0x3d')]);return _0x4fd00a['getFields'](_0x4b8d44);}})[_0x6e0e('0x24')](function(_0x240ee7){if(_0x240ee7){_0x2e966c=_0x240ee7['length'];if(!_0x2eabaf[_0x6e0e('0x2f')]['hasOwnProperty']('nolimit')){_0x4b8d44[_0x6e0e('0x1a')]=qs[_0x6e0e('0x1a')](_0x2eabaf['query'][_0x6e0e('0x1a')]);_0x4b8d44[_0x6e0e('0x19')]=qs[_0x6e0e('0x19')](_0x2eabaf[_0x6e0e('0x2f')]['offset']);}return _0x4fd00a[_0x6e0e('0x46')](_0x4b8d44);}})[_0x6e0e('0x24')](function(_0x2aa7e6){if(_0x2aa7e6){return _0x2aa7e6?{'count':_0x2e966c,'rows':_0x2aa7e6}:null;}})['then'](respondWithResult(_0x10fab2,null))[_0x6e0e('0x40')](handleError(_0x10fab2,null));};exports['getSubjects']=function(_0x566ed7,_0x85bb3e,_0x5c1748){var _0x1626e4={};var _0x1caee5={};var _0x4cbbaf;var _0x20ef0b;return db['ServicenowConfiguration']['findOne']({'where':{'id':_0x566ed7['params']['id']}})[_0x6e0e('0x24')](handleEntityNotFound(_0x85bb3e,null))[_0x6e0e('0x24')](function(_0x3e230b){if(_0x3e230b){_0x4cbbaf=_0x3e230b;_0x1caee5[_0x6e0e('0x2d')]=_[_0x6e0e('0x2e')](db[_0x6e0e('0x48')][_0x6e0e('0x29')]);_0x1caee5[_0x6e0e('0x2f')]=_[_0x6e0e('0x2e')](_0x566ed7[_0x6e0e('0x2f')]);_0x1caee5['filters']=_['intersection'](_0x1caee5[_0x6e0e('0x2d')],_0x1caee5['query']);_0x1626e4['attributes']=_[_0x6e0e('0x31')](_0x1caee5['model'],qs['fields'](_0x566ed7[_0x6e0e('0x2f')][_0x6e0e('0x33')]));_0x1626e4['attributes']=_0x1626e4[_0x6e0e('0x32')][_0x6e0e('0x34')]?_0x1626e4['attributes']:_0x1caee5[_0x6e0e('0x2d')];_0x1626e4['order']=qs[_0x6e0e('0x38')](_0x566ed7['query']['sort']);_0x1626e4[_0x6e0e('0x39')]=qs['filters'](_[_0x6e0e('0x49')](_0x566ed7['query'],_0x1caee5[_0x6e0e('0x30')]));if(_0x566ed7['query'][_0x6e0e('0x3a')]){_0x1626e4['where']=_['merge'](_0x1626e4[_0x6e0e('0x39')],{'$or':_[_0x6e0e('0x27')](_0x1626e4['attributes'],function(_0x32c463){var _0x368dca={};_0x368dca[_0x32c463]={'$like':'%'+_0x566ed7['query']['filter']+'%'};return _0x368dca;})});}_0x1626e4=_[_0x6e0e('0x3b')]({},_0x1626e4,_0x566ed7['options']);return _0x4cbbaf[_0x6e0e('0x4a')](_0x1626e4);}})['then'](function(_0x48db8e){if(_0x48db8e){_0x20ef0b=_0x48db8e[_0x6e0e('0x34')];if(!_0x566ed7[_0x6e0e('0x2f')][_0x6e0e('0x35')](_0x6e0e('0x36'))){_0x1626e4[_0x6e0e('0x1a')]=qs[_0x6e0e('0x1a')](_0x566ed7[_0x6e0e('0x2f')][_0x6e0e('0x1a')]);_0x1626e4[_0x6e0e('0x19')]=qs[_0x6e0e('0x19')](_0x566ed7['query'][_0x6e0e('0x19')]);}return _0x4cbbaf[_0x6e0e('0x4a')](_0x1626e4);}})[_0x6e0e('0x24')](function(_0x198af7){if(_0x198af7){return _0x198af7?{'count':_0x20ef0b,'rows':_0x198af7}:null;}})[_0x6e0e('0x24')](respondWithResult(_0x85bb3e,null))['catch'](handleError(_0x85bb3e,null));};exports[_0x6e0e('0x4b')]=function(_0x559551,_0x7f26ba,_0x40089a){var _0x55fdcd={};var _0x23ca9b={};var _0x457993;var _0x16a8ff;return db[_0x6e0e('0x28')][_0x6e0e('0x47')]({'where':{'id':_0x559551[_0x6e0e('0x44')]['id']}})[_0x6e0e('0x24')](handleEntityNotFound(_0x7f26ba,null))[_0x6e0e('0x24')](function(_0x53cea6){if(_0x53cea6){_0x457993=_0x53cea6;_0x23ca9b[_0x6e0e('0x2d')]=_[_0x6e0e('0x2e')](db[_0x6e0e('0x48')]['rawAttributes']);_0x23ca9b['query']=_[_0x6e0e('0x2e')](_0x559551[_0x6e0e('0x2f')]);_0x23ca9b[_0x6e0e('0x30')]=_[_0x6e0e('0x31')](_0x23ca9b[_0x6e0e('0x2d')],_0x23ca9b[_0x6e0e('0x2f')]);_0x55fdcd[_0x6e0e('0x32')]=_[_0x6e0e('0x31')](_0x23ca9b['model'],qs[_0x6e0e('0x33')](_0x559551[_0x6e0e('0x2f')][_0x6e0e('0x33')]));_0x55fdcd[_0x6e0e('0x32')]=_0x55fdcd[_0x6e0e('0x32')][_0x6e0e('0x34')]?_0x55fdcd[_0x6e0e('0x32')]:_0x23ca9b['model'];_0x55fdcd[_0x6e0e('0x37')]=qs[_0x6e0e('0x38')](_0x559551[_0x6e0e('0x2f')][_0x6e0e('0x38')]);_0x55fdcd[_0x6e0e('0x39')]=qs[_0x6e0e('0x30')](_['pick'](_0x559551[_0x6e0e('0x2f')],_0x23ca9b[_0x6e0e('0x30')]));if(_0x559551[_0x6e0e('0x2f')][_0x6e0e('0x3a')]){_0x55fdcd[_0x6e0e('0x39')]=_[_0x6e0e('0x3b')](_0x55fdcd[_0x6e0e('0x39')],{'$or':_[_0x6e0e('0x27')](_0x55fdcd[_0x6e0e('0x32')],function(_0x1abdbb){var _0x50d509={};_0x50d509[_0x1abdbb]={'$like':'%'+_0x559551[_0x6e0e('0x2f')][_0x6e0e('0x3a')]+'%'};return _0x50d509;})});}_0x55fdcd=_[_0x6e0e('0x3b')]({},_0x55fdcd,_0x559551['options']);return _0x457993[_0x6e0e('0x4b')](_0x55fdcd);}})['then'](function(_0x3683a0){if(_0x3683a0){_0x16a8ff=_0x3683a0[_0x6e0e('0x34')];if(!_0x559551[_0x6e0e('0x2f')][_0x6e0e('0x35')](_0x6e0e('0x36'))){_0x55fdcd[_0x6e0e('0x1a')]=qs['limit'](_0x559551['query'][_0x6e0e('0x1a')]);_0x55fdcd[_0x6e0e('0x19')]=qs['offset'](_0x559551[_0x6e0e('0x2f')]['offset']);}return _0x457993[_0x6e0e('0x4b')](_0x55fdcd);}})[_0x6e0e('0x24')](function(_0x1cf6ff){if(_0x1cf6ff){return _0x1cf6ff?{'count':_0x16a8ff,'rows':_0x1cf6ff}:null;}})['then'](respondWithResult(_0x7f26ba,null))[_0x6e0e('0x40')](handleError(_0x7f26ba,null));}; \ No newline at end of file +var _0xfff2=['params','keys','find','create','body','ServicenowField','sort','getFields','getSubjects','getDescriptions','findOne','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','util','sox','to-csv','fs-extra','lodash','squel','desk.js','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','api','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','end','status','offset','undefined','count','Content-Range','json','reject','update','destroy','then','sendStatus','error','stack','name','index','map','ServicenowConfiguration','rawAttributes','fieldName','type','key','model','filters','intersection','attributes','fields','query','length','hasOwnProperty','nolimit','limit','order','where','pick','filter','merge','VIRTUAL','options','includeAll','include','catch','show'];(function(_0x4a34e0,_0x29ff2f){var _0xb5ce1d=function(_0x225c39){while(--_0x225c39){_0x4a34e0['push'](_0x4a34e0['shift']());}};_0xb5ce1d(++_0x29ff2f);}(_0xfff2,0x1f1));var _0x2fff=function(_0x252cc9,_0xbcab3d){_0x252cc9=_0x252cc9-0x0;var _0x85a4f4=_0xfff2[_0x252cc9];return _0x85a4f4;};'use strict';var emlformat=require(_0x2fff('0x0'));var rimraf=require(_0x2fff('0x1'));var zipdir=require(_0x2fff('0x2'));var jsonpatch=require(_0x2fff('0x3'));var rp=require(_0x2fff('0x4'));var moment=require(_0x2fff('0x5'));var BPromise=require(_0x2fff('0x6'));var Mustache=require(_0x2fff('0x7'));var util=require(_0x2fff('0x8'));var path=require('path');var sox=require(_0x2fff('0x9'));var csv=require(_0x2fff('0xa'));var ejs=require('ejs');var fs=require('fs');var fs_extra=require(_0x2fff('0xb'));var _=require(_0x2fff('0xc'));var squel=require(_0x2fff('0xd'));var crypto=require('crypto');var jsforce=require('jsforce');var deskjs=require(_0x2fff('0xe'));var toCsv=require(_0x2fff('0xa'));var querystring=require(_0x2fff('0xf'));var Papa=require(_0x2fff('0x10'));var Redis=require(_0x2fff('0x11'));var authService=require(_0x2fff('0x12'));var qs=require(_0x2fff('0x13'));var as=require(_0x2fff('0x14'));var hardwareService=require(_0x2fff('0x15'));var logger=require('../../config/logger')(_0x2fff('0x16'));var utils=require(_0x2fff('0x17'));var config=require(_0x2fff('0x18'));var licenseUtil=require(_0x2fff('0x19'));var db=require(_0x2fff('0x1a'))['db'];function respondWithStatusCode(_0x5b9b4c,_0x54b361){_0x54b361=_0x54b361||0xcc;return function(_0x5a74e3){if(_0x5a74e3){return _0x5b9b4c['sendStatus'](_0x54b361);}return _0x5b9b4c['status'](_0x54b361)[_0x2fff('0x1b')]();};}function respondWithResult(_0x19834a,_0x3d2775){_0x3d2775=_0x3d2775||0xc8;return function(_0x1477f4){if(_0x1477f4){return _0x19834a[_0x2fff('0x1c')](_0x3d2775)['json'](_0x1477f4);}};}function respondWithFilteredResult(_0x58fdbe,_0x5a9903){return function(_0x143b53){if(_0x143b53){var _0x5a56a1=typeof _0x5a9903[_0x2fff('0x1d')]===_0x2fff('0x1e')&&typeof _0x5a9903['limit']==='undefined';var _0x591713=_0x143b53[_0x2fff('0x1f')];var _0x4b31f2=_0x5a56a1?0x0:_0x5a9903['offset'];var _0x1ce7a3=_0x5a56a1?_0x143b53['count']:_0x5a9903[_0x2fff('0x1d')]+_0x5a9903['limit'];var _0x17b56e;if(_0x1ce7a3>=_0x591713){_0x1ce7a3=_0x591713;_0x17b56e=0xc8;}else{_0x17b56e=0xce;}_0x58fdbe['status'](_0x17b56e);return _0x58fdbe['set'](_0x2fff('0x20'),_0x4b31f2+'-'+_0x1ce7a3+'/'+_0x591713)[_0x2fff('0x21')](_0x143b53);}return null;};}function patchUpdates(_0x58100a){return function(_0x20429){try{jsonpatch['apply'](_0x20429,_0x58100a,!![]);}catch(_0x548a2){return BPromise[_0x2fff('0x22')](_0x548a2);}return _0x20429['save']();};}function saveUpdates(_0x31ec3f,_0x249c2b){return function(_0x1b9fde){if(_0x1b9fde){return _0x1b9fde[_0x2fff('0x23')](_0x31ec3f)['then'](function(_0x1bac6a){return _0x1bac6a;});}return null;};}function removeEntity(_0x3aa2e2,_0x4faf1e){return function(_0x4dddc0){if(_0x4dddc0){return _0x4dddc0[_0x2fff('0x24')]()[_0x2fff('0x25')](function(){_0x3aa2e2[_0x2fff('0x1c')](0xcc)[_0x2fff('0x1b')]();});}};}function handleEntityNotFound(_0x369726,_0x2d8231){return function(_0x30eaa3){if(!_0x30eaa3){_0x369726[_0x2fff('0x26')](0x194);}return _0x30eaa3;};}function handleError(_0x12b2d5,_0x3b3d17){_0x3b3d17=_0x3b3d17||0x1f4;return function(_0x361181){logger[_0x2fff('0x27')](_0x361181[_0x2fff('0x28')]);if(_0x361181[_0x2fff('0x29')]){delete _0x361181[_0x2fff('0x29')];}_0x12b2d5['status'](_0x3b3d17)['send'](_0x361181);};}exports[_0x2fff('0x2a')]=function(_0x448537,_0x1fe86b){var _0x4a4b67={},_0x46b429={},_0x53401c={'count':0x0,'rows':[]};var _0x2e8465=_[_0x2fff('0x2b')](db[_0x2fff('0x2c')][_0x2fff('0x2d')],function(_0x4377dd){return{'name':_0x4377dd[_0x2fff('0x2e')],'type':_0x4377dd[_0x2fff('0x2f')][_0x2fff('0x30')]};});_0x46b429[_0x2fff('0x31')]=_[_0x2fff('0x2b')](_0x2e8465,_0x2fff('0x29'));_0x46b429['query']=_['keys'](_0x448537['query']);_0x46b429[_0x2fff('0x32')]=_[_0x2fff('0x33')](_0x46b429[_0x2fff('0x31')],_0x46b429['query']);_0x4a4b67[_0x2fff('0x34')]=_[_0x2fff('0x33')](_0x46b429[_0x2fff('0x31')],qs[_0x2fff('0x35')](_0x448537[_0x2fff('0x36')][_0x2fff('0x35')]));_0x4a4b67[_0x2fff('0x34')]=_0x4a4b67[_0x2fff('0x34')][_0x2fff('0x37')]?_0x4a4b67[_0x2fff('0x34')]:_0x46b429[_0x2fff('0x31')];if(!_0x448537[_0x2fff('0x36')][_0x2fff('0x38')](_0x2fff('0x39'))){_0x4a4b67[_0x2fff('0x3a')]=qs['limit'](_0x448537[_0x2fff('0x36')]['limit']);_0x4a4b67[_0x2fff('0x1d')]=qs[_0x2fff('0x1d')](_0x448537[_0x2fff('0x36')][_0x2fff('0x1d')]);}_0x4a4b67[_0x2fff('0x3b')]=qs['sort'](_0x448537['query']['sort']);_0x4a4b67[_0x2fff('0x3c')]=qs[_0x2fff('0x32')](_[_0x2fff('0x3d')](_0x448537[_0x2fff('0x36')],_0x46b429[_0x2fff('0x32')]),_0x2e8465);if(_0x448537['query'][_0x2fff('0x3e')]){_0x4a4b67[_0x2fff('0x3c')]=_[_0x2fff('0x3f')](_0x4a4b67[_0x2fff('0x3c')],{'$or':_[_0x2fff('0x2b')](_0x2e8465,function(_0x21d332){if(_0x21d332[_0x2fff('0x2f')]!==_0x2fff('0x40')){var _0x150f9c={};_0x150f9c[_0x21d332[_0x2fff('0x29')]]={'$like':'%'+_0x448537['query']['filter']+'%'};return _0x150f9c;}})});}_0x4a4b67=_[_0x2fff('0x3f')]({},_0x4a4b67,_0x448537[_0x2fff('0x41')]);var _0x321751={'where':_0x4a4b67[_0x2fff('0x3c')]};return db[_0x2fff('0x2c')][_0x2fff('0x1f')](_0x321751)[_0x2fff('0x25')](function(_0x20227a){_0x53401c[_0x2fff('0x1f')]=_0x20227a;if(_0x448537[_0x2fff('0x36')][_0x2fff('0x42')]){_0x4a4b67[_0x2fff('0x43')]=[{'all':!![]}];}return db[_0x2fff('0x2c')]['findAll'](_0x4a4b67);})[_0x2fff('0x25')](function(_0x927525){_0x53401c['rows']=_0x927525;return _0x53401c;})['then'](respondWithFilteredResult(_0x1fe86b,_0x4a4b67))[_0x2fff('0x44')](handleError(_0x1fe86b,null));};exports[_0x2fff('0x45')]=function(_0x5b8ca1,_0x1c8f66){var _0x252770={'raw':![],'where':{'id':_0x5b8ca1[_0x2fff('0x46')]['id']}},_0x14fae6={};_0x14fae6[_0x2fff('0x31')]=_[_0x2fff('0x47')](db[_0x2fff('0x2c')]['rawAttributes']);_0x14fae6[_0x2fff('0x36')]=_['keys'](_0x5b8ca1['query']);_0x14fae6['filters']=_[_0x2fff('0x33')](_0x14fae6[_0x2fff('0x31')],_0x14fae6[_0x2fff('0x36')]);_0x252770[_0x2fff('0x34')]=_['intersection'](_0x14fae6['model'],qs[_0x2fff('0x35')](_0x5b8ca1['query'][_0x2fff('0x35')]));_0x252770['attributes']=_0x252770['attributes'][_0x2fff('0x37')]?_0x252770['attributes']:_0x14fae6[_0x2fff('0x31')];if(_0x5b8ca1['query'][_0x2fff('0x42')]){_0x252770[_0x2fff('0x43')]=[{'all':!![]}];}_0x252770=_[_0x2fff('0x3f')]({},_0x252770,_0x5b8ca1[_0x2fff('0x41')]);return db[_0x2fff('0x2c')][_0x2fff('0x48')](_0x252770)['then'](handleEntityNotFound(_0x1c8f66,null))['then'](respondWithResult(_0x1c8f66,null))[_0x2fff('0x44')](handleError(_0x1c8f66,null));};exports[_0x2fff('0x49')]=function(_0x3adc8e,_0x2181b6){return db[_0x2fff('0x2c')][_0x2fff('0x49')](_0x3adc8e[_0x2fff('0x4a')],{})[_0x2fff('0x25')](respondWithResult(_0x2181b6,0xc9))['catch'](handleError(_0x2181b6,null));};exports['update']=function(_0x4b5a86,_0x4caf13){if(_0x4b5a86[_0x2fff('0x4a')]['id']){delete _0x4b5a86[_0x2fff('0x4a')]['id'];}return db[_0x2fff('0x2c')][_0x2fff('0x48')]({'where':{'id':_0x4b5a86[_0x2fff('0x46')]['id']}})['then'](handleEntityNotFound(_0x4caf13,null))[_0x2fff('0x25')](saveUpdates(_0x4b5a86[_0x2fff('0x4a')],null))['then'](respondWithResult(_0x4caf13,null))['catch'](handleError(_0x4caf13,null));};exports[_0x2fff('0x24')]=function(_0x4d2ff5,_0x2003b1){return db['ServicenowConfiguration']['find']({'where':{'id':_0x4d2ff5[_0x2fff('0x46')]['id']}})['then'](handleEntityNotFound(_0x2003b1,null))[_0x2fff('0x25')](removeEntity(_0x2003b1,null))[_0x2fff('0x44')](handleError(_0x2003b1,null));};exports['getFields']=function(_0x5ede0c,_0x52b389,_0x2f978a){var _0x391ffe={};var _0x4b6456={};var _0x55a9ed;var _0xe809df;return db[_0x2fff('0x2c')]['findOne']({'where':{'id':_0x5ede0c[_0x2fff('0x46')]['id']}})[_0x2fff('0x25')](handleEntityNotFound(_0x52b389,null))['then'](function(_0x1c331f){if(_0x1c331f){_0x55a9ed=_0x1c331f;_0x4b6456[_0x2fff('0x31')]=_[_0x2fff('0x47')](db[_0x2fff('0x4b')][_0x2fff('0x2d')]);_0x4b6456['query']=_[_0x2fff('0x47')](_0x5ede0c['query']);_0x4b6456['filters']=_[_0x2fff('0x33')](_0x4b6456[_0x2fff('0x31')],_0x4b6456[_0x2fff('0x36')]);_0x391ffe[_0x2fff('0x34')]=_[_0x2fff('0x33')](_0x4b6456['model'],qs['fields'](_0x5ede0c['query'][_0x2fff('0x35')]));_0x391ffe[_0x2fff('0x34')]=_0x391ffe['attributes']['length']?_0x391ffe[_0x2fff('0x34')]:_0x4b6456['model'];_0x391ffe[_0x2fff('0x3b')]=qs[_0x2fff('0x4c')](_0x5ede0c[_0x2fff('0x36')][_0x2fff('0x4c')]);_0x391ffe[_0x2fff('0x3c')]=qs[_0x2fff('0x32')](_['pick'](_0x5ede0c['query'],_0x4b6456[_0x2fff('0x32')]));if(_0x5ede0c['query'][_0x2fff('0x3e')]){_0x391ffe[_0x2fff('0x3c')]=_['merge'](_0x391ffe[_0x2fff('0x3c')],{'$or':_[_0x2fff('0x2b')](_0x391ffe['attributes'],function(_0x5eec1f){var _0x591765={};_0x591765[_0x5eec1f]={'$like':'%'+_0x5ede0c[_0x2fff('0x36')]['filter']+'%'};return _0x591765;})});}_0x391ffe=_['merge']({},_0x391ffe,_0x5ede0c[_0x2fff('0x41')]);return _0x55a9ed[_0x2fff('0x4d')](_0x391ffe);}})[_0x2fff('0x25')](function(_0x2e405e){if(_0x2e405e){_0xe809df=_0x2e405e[_0x2fff('0x37')];if(!_0x5ede0c[_0x2fff('0x36')][_0x2fff('0x38')](_0x2fff('0x39'))){_0x391ffe['limit']=qs['limit'](_0x5ede0c[_0x2fff('0x36')][_0x2fff('0x3a')]);_0x391ffe['offset']=qs[_0x2fff('0x1d')](_0x5ede0c[_0x2fff('0x36')]['offset']);}return _0x55a9ed[_0x2fff('0x4d')](_0x391ffe);}})['then'](function(_0xb415f){if(_0xb415f){return _0xb415f?{'count':_0xe809df,'rows':_0xb415f}:null;}})[_0x2fff('0x25')](respondWithResult(_0x52b389,null))[_0x2fff('0x44')](handleError(_0x52b389,null));};exports[_0x2fff('0x4e')]=function(_0x5c52c2,_0x2e1fea,_0x2cd8ba){var _0xc60c44={};var _0x280e96={};var _0x4dc4ae;var _0x35583d;return db[_0x2fff('0x2c')]['findOne']({'where':{'id':_0x5c52c2[_0x2fff('0x46')]['id']}})[_0x2fff('0x25')](handleEntityNotFound(_0x2e1fea,null))[_0x2fff('0x25')](function(_0x3b6cf1){if(_0x3b6cf1){_0x4dc4ae=_0x3b6cf1;_0x280e96['model']=_[_0x2fff('0x47')](db[_0x2fff('0x4b')][_0x2fff('0x2d')]);_0x280e96[_0x2fff('0x36')]=_[_0x2fff('0x47')](_0x5c52c2['query']);_0x280e96['filters']=_['intersection'](_0x280e96['model'],_0x280e96[_0x2fff('0x36')]);_0xc60c44[_0x2fff('0x34')]=_[_0x2fff('0x33')](_0x280e96[_0x2fff('0x31')],qs[_0x2fff('0x35')](_0x5c52c2[_0x2fff('0x36')][_0x2fff('0x35')]));_0xc60c44[_0x2fff('0x34')]=_0xc60c44[_0x2fff('0x34')][_0x2fff('0x37')]?_0xc60c44[_0x2fff('0x34')]:_0x280e96[_0x2fff('0x31')];_0xc60c44[_0x2fff('0x3b')]=qs['sort'](_0x5c52c2[_0x2fff('0x36')][_0x2fff('0x4c')]);_0xc60c44[_0x2fff('0x3c')]=qs['filters'](_[_0x2fff('0x3d')](_0x5c52c2[_0x2fff('0x36')],_0x280e96[_0x2fff('0x32')]));if(_0x5c52c2[_0x2fff('0x36')]['filter']){_0xc60c44[_0x2fff('0x3c')]=_['merge'](_0xc60c44[_0x2fff('0x3c')],{'$or':_['map'](_0xc60c44[_0x2fff('0x34')],function(_0x5c0921){var _0xadabe0={};_0xadabe0[_0x5c0921]={'$like':'%'+_0x5c52c2['query'][_0x2fff('0x3e')]+'%'};return _0xadabe0;})});}_0xc60c44=_[_0x2fff('0x3f')]({},_0xc60c44,_0x5c52c2[_0x2fff('0x41')]);return _0x4dc4ae['getSubjects'](_0xc60c44);}})[_0x2fff('0x25')](function(_0x4d3455){if(_0x4d3455){_0x35583d=_0x4d3455[_0x2fff('0x37')];if(!_0x5c52c2[_0x2fff('0x36')][_0x2fff('0x38')](_0x2fff('0x39'))){_0xc60c44[_0x2fff('0x3a')]=qs[_0x2fff('0x3a')](_0x5c52c2[_0x2fff('0x36')]['limit']);_0xc60c44[_0x2fff('0x1d')]=qs[_0x2fff('0x1d')](_0x5c52c2[_0x2fff('0x36')][_0x2fff('0x1d')]);}return _0x4dc4ae['getSubjects'](_0xc60c44);}})[_0x2fff('0x25')](function(_0x57e9bd){if(_0x57e9bd){return _0x57e9bd?{'count':_0x35583d,'rows':_0x57e9bd}:null;}})[_0x2fff('0x25')](respondWithResult(_0x2e1fea,null))[_0x2fff('0x44')](handleError(_0x2e1fea,null));};exports[_0x2fff('0x4f')]=function(_0x5ad1f4,_0xda20b1,_0x494166){var _0x23310e={};var _0x49c8be={};var _0x250475;var _0x2bc5c8;return db[_0x2fff('0x2c')][_0x2fff('0x50')]({'where':{'id':_0x5ad1f4['params']['id']}})[_0x2fff('0x25')](handleEntityNotFound(_0xda20b1,null))[_0x2fff('0x25')](function(_0x21bc65){if(_0x21bc65){_0x250475=_0x21bc65;_0x49c8be[_0x2fff('0x31')]=_[_0x2fff('0x47')](db['ServicenowField'][_0x2fff('0x2d')]);_0x49c8be[_0x2fff('0x36')]=_[_0x2fff('0x47')](_0x5ad1f4[_0x2fff('0x36')]);_0x49c8be['filters']=_[_0x2fff('0x33')](_0x49c8be[_0x2fff('0x31')],_0x49c8be[_0x2fff('0x36')]);_0x23310e[_0x2fff('0x34')]=_[_0x2fff('0x33')](_0x49c8be[_0x2fff('0x31')],qs[_0x2fff('0x35')](_0x5ad1f4[_0x2fff('0x36')][_0x2fff('0x35')]));_0x23310e[_0x2fff('0x34')]=_0x23310e['attributes'][_0x2fff('0x37')]?_0x23310e[_0x2fff('0x34')]:_0x49c8be[_0x2fff('0x31')];_0x23310e['order']=qs[_0x2fff('0x4c')](_0x5ad1f4['query'][_0x2fff('0x4c')]);_0x23310e[_0x2fff('0x3c')]=qs['filters'](_['pick'](_0x5ad1f4[_0x2fff('0x36')],_0x49c8be[_0x2fff('0x32')]));if(_0x5ad1f4[_0x2fff('0x36')]['filter']){_0x23310e['where']=_[_0x2fff('0x3f')](_0x23310e[_0x2fff('0x3c')],{'$or':_[_0x2fff('0x2b')](_0x23310e['attributes'],function(_0x54f3c5){var _0x6e2f94={};_0x6e2f94[_0x54f3c5]={'$like':'%'+_0x5ad1f4['query'][_0x2fff('0x3e')]+'%'};return _0x6e2f94;})});}_0x23310e=_[_0x2fff('0x3f')]({},_0x23310e,_0x5ad1f4['options']);return _0x250475[_0x2fff('0x4f')](_0x23310e);}})[_0x2fff('0x25')](function(_0x34e36a){if(_0x34e36a){_0x2bc5c8=_0x34e36a[_0x2fff('0x37')];if(!_0x5ad1f4[_0x2fff('0x36')][_0x2fff('0x38')]('nolimit')){_0x23310e[_0x2fff('0x3a')]=qs[_0x2fff('0x3a')](_0x5ad1f4['query'][_0x2fff('0x3a')]);_0x23310e[_0x2fff('0x1d')]=qs['offset'](_0x5ad1f4[_0x2fff('0x36')][_0x2fff('0x1d')]);}return _0x250475['getDescriptions'](_0x23310e);}})[_0x2fff('0x25')](function(_0x59b30a){if(_0x59b30a){return _0x59b30a?{'count':_0x2bc5c8,'rows':_0x59b30a}:null;}})['then'](respondWithResult(_0xda20b1,null))[_0x2fff('0x44')](handleError(_0xda20b1,null));}; \ No newline at end of file diff --git a/server/api/intServicenowConfiguration/intServicenowConfiguration.model.js b/server/api/intServicenowConfiguration/intServicenowConfiguration.model.js index 16899f1..4a8b330 100644 --- a/server/api/intServicenowConfiguration/intServicenowConfiguration.model.js +++ b/server/api/intServicenowConfiguration/intServicenowConfiguration.model.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x235b=['int_servicenow_configurations','lodash','api','moment','bluebird','request-promise','path','rimraf','./intServicenowConfiguration.attributes','exports','define','ServicenowConfiguration'];(function(_0x509083,_0xa6676b){var _0x4b2495=function(_0x2a14f5){while(--_0x2a14f5){_0x509083['push'](_0x509083['shift']());}};_0x4b2495(++_0xa6676b);}(_0x235b,0x1ed));var _0xb235=function(_0x315cf7,_0x2c5d48){_0x315cf7=_0x315cf7-0x0;var _0x2217af=_0x235b[_0x315cf7];return _0x2217af;};'use strict';var _=require(_0xb235('0x0'));var util=require('util');var logger=require('../../config/logger')(_0xb235('0x1'));var moment=require(_0xb235('0x2'));var BPromise=require(_0xb235('0x3'));var rp=require(_0xb235('0x4'));var fs=require('fs');var path=require(_0xb235('0x5'));var rimraf=require(_0xb235('0x6'));var config=require('../../config/environment');var attributes=require(_0xb235('0x7'));module[_0xb235('0x8')]=function(_0x334353,_0x5298de){return _0x334353[_0xb235('0x9')](_0xb235('0xa'),attributes,{'tableName':_0xb235('0xb'),'paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file +var _0x7e05=['../../config/environment','./intServicenowConfiguration.attributes','exports','define','int_servicenow_configurations','lodash','util','api','bluebird','request-promise'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0x7e05,0x69));var _0x57e0=function(_0x2dafbe,_0x5d04de){_0x2dafbe=_0x2dafbe-0x0;var _0x58a45a=_0x7e05[_0x2dafbe];return _0x58a45a;};'use strict';var _=require(_0x57e0('0x0'));var util=require(_0x57e0('0x1'));var logger=require('../../config/logger')(_0x57e0('0x2'));var moment=require('moment');var BPromise=require(_0x57e0('0x3'));var rp=require(_0x57e0('0x4'));var fs=require('fs');var path=require('path');var rimraf=require('rimraf');var config=require(_0x57e0('0x5'));var attributes=require(_0x57e0('0x6'));module[_0x57e0('0x7')]=function(_0x327596,_0x5f4f7e){return _0x327596[_0x57e0('0x8')]('ServicenowConfiguration',attributes,{'tableName':_0x57e0('0x9'),'paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file diff --git a/server/api/intServicenowConfiguration/intServicenowConfiguration.rpc.js b/server/api/intServicenowConfiguration/intServicenowConfiguration.rpc.js index ac4ba3f..899c49d 100644 --- a/server/api/intServicenowConfiguration/intServicenowConfiguration.rpc.js +++ b/server/api/intServicenowConfiguration/intServicenowConfiguration.rpc.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x34dd=['ServicenowConfiguration,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','ServicenowConfiguration,\x20%s,\x20%s','message','result','catch','lodash','util','moment','randomstring','ioredis','../../config/utils','rpc','../../config/environment','jayson/promise','client','http','request','info','debug'];(function(_0x1ac595,_0x5d2081){var _0x455fff=function(_0x3043ee){while(--_0x3043ee){_0x1ac595['push'](_0x1ac595['shift']());}};_0x455fff(++_0x5d2081);}(_0x34dd,0xa2));var _0xd34d=function(_0x63a7bf,_0x28fc03){_0x63a7bf=_0x63a7bf-0x0;var _0x3a3085=_0x34dd[_0x63a7bf];return _0x3a3085;};'use strict';var _=require(_0xd34d('0x0'));var util=require(_0xd34d('0x1'));var moment=require(_0xd34d('0x2'));var BPromise=require('bluebird');var rs=require(_0xd34d('0x3'));var fs=require('fs');var Redis=require(_0xd34d('0x4'));var db=require('../../mysqldb')['db'];var utils=require(_0xd34d('0x5'));var logger=require('../../config/logger')(_0xd34d('0x6'));var config=require(_0xd34d('0x7'));var jayson=require(_0xd34d('0x8'));var client=jayson[_0xd34d('0x9')][_0xd34d('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x2f66b5,_0x53d661,_0x1288b9){return new BPromise(function(_0xcbea55,_0x143635){return client[_0xd34d('0xb')](_0x2f66b5,_0x1288b9)['then'](function(_0x36f66a){logger[_0xd34d('0xc')]('ServicenowConfiguration,\x20%s,\x20%s',_0x53d661,'request\x20sent');logger[_0xd34d('0xd')](_0xd34d('0xe'),_0x53d661,_0xd34d('0xf'),JSON[_0xd34d('0x10')](_0x36f66a));if(_0x36f66a[_0xd34d('0x11')]){if(_0x36f66a[_0xd34d('0x11')]['code']===0x1f4){logger[_0xd34d('0x11')](_0xd34d('0x12'),_0x53d661,_0x36f66a['error']['message']);return _0x143635(_0x36f66a['error'][_0xd34d('0x13')]);}logger[_0xd34d('0x11')](_0xd34d('0x12'),_0x53d661,_0x36f66a[_0xd34d('0x11')]['message']);return _0xcbea55(_0x36f66a[_0xd34d('0x11')][_0xd34d('0x13')]);}else{logger[_0xd34d('0xc')](_0xd34d('0x12'),_0x53d661,'request\x20sent');_0xcbea55(_0x36f66a[_0xd34d('0x14')][_0xd34d('0x13')]);}})[_0xd34d('0x15')](function(_0x5a1d8d){logger[_0xd34d('0x11')](_0xd34d('0x12'),_0x53d661,_0x5a1d8d);_0x143635(_0x5a1d8d);});});} \ No newline at end of file +var _0xf690=['code','message','ServicenowConfiguration,\x20%s,\x20%s','result','catch','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','jayson/promise','client','http','request','then','info','request\x20sent','debug','ServicenowConfiguration,\x20%s,\x20%s,\x20%s','error'];(function(_0x5f309e,_0x66e31){var _0x487b5e=function(_0x44f203){while(--_0x44f203){_0x5f309e['push'](_0x5f309e['shift']());}};_0x487b5e(++_0x66e31);}(_0xf690,0xa6));var _0x0f69=function(_0x36b037,_0x2b234e){_0x36b037=_0x36b037-0x0;var _0x409194=_0xf690[_0x36b037];return _0x409194;};'use strict';var _=require('lodash');var util=require(_0x0f69('0x0'));var moment=require(_0x0f69('0x1'));var BPromise=require(_0x0f69('0x2'));var rs=require(_0x0f69('0x3'));var fs=require('fs');var Redis=require(_0x0f69('0x4'));var db=require(_0x0f69('0x5'))['db'];var utils=require(_0x0f69('0x6'));var logger=require(_0x0f69('0x7'))('rpc');var config=require('../../config/environment');var jayson=require(_0x0f69('0x8'));var client=jayson[_0x0f69('0x9')][_0x0f69('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x49a3e2,_0x2809c2,_0x8a6d0){return new BPromise(function(_0x54269f,_0x3c5dca){return client[_0x0f69('0xb')](_0x49a3e2,_0x8a6d0)[_0x0f69('0xc')](function(_0x491744){logger[_0x0f69('0xd')]('ServicenowConfiguration,\x20%s,\x20%s',_0x2809c2,_0x0f69('0xe'));logger[_0x0f69('0xf')](_0x0f69('0x10'),_0x2809c2,_0x0f69('0xe'),JSON['stringify'](_0x491744));if(_0x491744[_0x0f69('0x11')]){if(_0x491744[_0x0f69('0x11')][_0x0f69('0x12')]===0x1f4){logger[_0x0f69('0x11')]('ServicenowConfiguration,\x20%s,\x20%s',_0x2809c2,_0x491744[_0x0f69('0x11')][_0x0f69('0x13')]);return _0x3c5dca(_0x491744[_0x0f69('0x11')][_0x0f69('0x13')]);}logger[_0x0f69('0x11')](_0x0f69('0x14'),_0x2809c2,_0x491744[_0x0f69('0x11')]['message']);return _0x54269f(_0x491744['error'][_0x0f69('0x13')]);}else{logger[_0x0f69('0xd')](_0x0f69('0x14'),_0x2809c2,_0x0f69('0xe'));_0x54269f(_0x491744[_0x0f69('0x15')][_0x0f69('0x13')]);}})[_0x0f69('0x16')](function(_0x5582db){logger[_0x0f69('0x11')](_0x0f69('0x14'),_0x2809c2,_0x5582db);_0x3c5dca(_0x5582db);});});} \ No newline at end of file diff --git a/server/api/intServicenowField/index.js b/server/api/intServicenowField/index.js index f2c0a14..0233c7f 100644 --- a/server/api/intServicenowField/index.js +++ b/server/api/intServicenowField/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x7db8=['update','destroy','exports','multer','util','connect-timeout','express','../../components/auth/service','../../components/interaction/service','./intServicenowField.controller','get','isAuthenticated','index','/:id','show','post','create','put'];(function(_0x587fb5,_0x59cb3b){var _0x551105=function(_0x5bbef4){while(--_0x5bbef4){_0x587fb5['push'](_0x587fb5['shift']());}};_0x551105(++_0x59cb3b);}(_0x7db8,0x111));var _0x87db=function(_0x199b86,_0x2ff897){_0x199b86=_0x199b86-0x0;var _0xfae87f=_0x7db8[_0x199b86];return _0xfae87f;};'use strict';var multer=require(_0x87db('0x0'));var util=require(_0x87db('0x1'));var path=require('path');var timeout=require(_0x87db('0x2'));var express=require(_0x87db('0x3'));var router=express['Router']();var fs_extra=require('fs-extra');var auth=require(_0x87db('0x4'));var interaction=require(_0x87db('0x5'));var config=require('../../config/environment');var controller=require(_0x87db('0x6'));router[_0x87db('0x7')]('/',auth[_0x87db('0x8')](),controller[_0x87db('0x9')]);router[_0x87db('0x7')](_0x87db('0xa'),auth[_0x87db('0x8')](),controller[_0x87db('0xb')]);router[_0x87db('0xc')]('/',auth[_0x87db('0x8')](),controller[_0x87db('0xd')]);router[_0x87db('0xe')](_0x87db('0xa'),auth[_0x87db('0x8')](),controller[_0x87db('0xf')]);router['delete']('/:id',auth[_0x87db('0x8')](),controller[_0x87db('0x10')]);module[_0x87db('0x11')]=router; \ No newline at end of file +var _0xcd24=['Router','fs-extra','../../components/auth/service','../../components/interaction/service','./intServicenowField.controller','get','isAuthenticated','index','/:id','post','update','delete','destroy','exports','multer','util','path','connect-timeout'];(function(_0x1dd78b,_0x213fd9){var _0x2d9bf6=function(_0x2c749a){while(--_0x2c749a){_0x1dd78b['push'](_0x1dd78b['shift']());}};_0x2d9bf6(++_0x213fd9);}(_0xcd24,0x8c));var _0x4cd2=function(_0x4d761f,_0x1364ca){_0x4d761f=_0x4d761f-0x0;var _0x11fe7f=_0xcd24[_0x4d761f];return _0x11fe7f;};'use strict';var multer=require(_0x4cd2('0x0'));var util=require(_0x4cd2('0x1'));var path=require(_0x4cd2('0x2'));var timeout=require(_0x4cd2('0x3'));var express=require('express');var router=express[_0x4cd2('0x4')]();var fs_extra=require(_0x4cd2('0x5'));var auth=require(_0x4cd2('0x6'));var interaction=require(_0x4cd2('0x7'));var config=require('../../config/environment');var controller=require(_0x4cd2('0x8'));router[_0x4cd2('0x9')]('/',auth[_0x4cd2('0xa')](),controller[_0x4cd2('0xb')]);router[_0x4cd2('0x9')](_0x4cd2('0xc'),auth[_0x4cd2('0xa')](),controller['show']);router[_0x4cd2('0xd')]('/',auth[_0x4cd2('0xa')](),controller['create']);router['put'](_0x4cd2('0xc'),auth[_0x4cd2('0xa')](),controller[_0x4cd2('0xe')]);router[_0x4cd2('0xf')](_0x4cd2('0xc'),auth['isAuthenticated'](),controller[_0x4cd2('0x10')]);module[_0x4cd2('0x11')]=router; \ No newline at end of file diff --git a/server/api/intServicenowField/intServicenowField.attributes.js b/server/api/intServicenowField/intServicenowField.attributes.js index 1f2506a..0c4fa8b 100644 --- a/server/api/intServicenowField/intServicenowField.attributes.js +++ b/server/api/intServicenowField/intServicenowField.attributes.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x2019=['customVariable','keyValue','picklist','variable','STRING','BOOLEAN','exports','ENUM','string'];(function(_0x3c623f,_0x55efeb){var _0xcd5f57=function(_0x47b121){while(--_0x47b121){_0x3c623f['push'](_0x3c623f['shift']());}};_0xcd5f57(++_0x55efeb);}(_0x2019,0x1b6));var _0x9201=function(_0x2aec52,_0x59d962){_0x2aec52=_0x2aec52-0x0;var _0x3b8835=_0x2019[_0x2aec52];return _0x3b8835;};'use strict';var Sequelize=require('sequelize');module[_0x9201('0x0')]={'type':{'type':Sequelize[_0x9201('0x1')](_0x9201('0x2'),'variable',_0x9201('0x3'),_0x9201('0x4'),_0x9201('0x5')),'defaultValue':_0x9201('0x2')},'content':{'type':Sequelize['STRING']},'key':{'type':Sequelize['STRING']},'keyType':{'type':Sequelize[_0x9201('0x1')](_0x9201('0x2'),_0x9201('0x6'),_0x9201('0x3'))},'keyContent':{'type':Sequelize[_0x9201('0x7')]},'idField':{'type':Sequelize[_0x9201('0x7')]},'nameField':{'type':Sequelize[_0x9201('0x7')]},'customField':{'type':Sequelize[_0x9201('0x8')],'defaultValue':!![]},'variableName':{'type':Sequelize[_0x9201('0x7')]}}; \ No newline at end of file +var _0xd34f=['variable','customVariable','keyValue','picklist','STRING','BOOLEAN','exports','ENUM','string'];(function(_0x4a569e,_0x26f401){var _0x31b4cf=function(_0x4bdcb3){while(--_0x4bdcb3){_0x4a569e['push'](_0x4a569e['shift']());}};_0x31b4cf(++_0x26f401);}(_0xd34f,0x1e3));var _0xfd34=function(_0x4cfd3f,_0x7cf913){_0x4cfd3f=_0x4cfd3f-0x0;var _0x132313=_0xd34f[_0x4cfd3f];return _0x132313;};'use strict';var Sequelize=require('sequelize');module[_0xfd34('0x0')]={'type':{'type':Sequelize[_0xfd34('0x1')](_0xfd34('0x2'),_0xfd34('0x3'),_0xfd34('0x4'),_0xfd34('0x5'),_0xfd34('0x6')),'defaultValue':_0xfd34('0x2')},'content':{'type':Sequelize[_0xfd34('0x7')]},'key':{'type':Sequelize[_0xfd34('0x7')]},'keyType':{'type':Sequelize['ENUM'](_0xfd34('0x2'),_0xfd34('0x3'),_0xfd34('0x4'))},'keyContent':{'type':Sequelize[_0xfd34('0x7')]},'idField':{'type':Sequelize[_0xfd34('0x7')]},'nameField':{'type':Sequelize[_0xfd34('0x7')]},'customField':{'type':Sequelize[_0xfd34('0x8')],'defaultValue':!![]},'variableName':{'type':Sequelize[_0xfd34('0x7')]}}; \ No newline at end of file diff --git a/server/api/intServicenowField/intServicenowField.controller.js b/server/api/intServicenowField/intServicenowField.controller.js index e384af9..0db6c6b 100644 --- a/server/api/intServicenowField/intServicenowField.controller.js +++ b/server/api/intServicenowField/intServicenowField.controller.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x44a9=['type','key','model','query','keys','filters','intersection','attributes','fields','length','hasOwnProperty','order','sort','pick','filter','where','options','includeAll','findAll','rows','catch','show','params','include','merge','find','create','body','update','eml-format','rimraf','fast-json-patch','request-promise','bluebird','mustache','util','path','sox','to-csv','ejs','fs-extra','lodash','crypto','jsforce','desk.js','querystring','papaparse','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','../../config/utils','../../config/environment','../../config/license/util','sendStatus','status','end','json','offset','limit','undefined','count','set','Content-Range','reject','save','then','destroy','error','name','send','index','map','ServicenowField','rawAttributes','fieldName'];(function(_0x2b8391,_0x2ebff2){var _0x3c417a=function(_0x198cb1){while(--_0x198cb1){_0x2b8391['push'](_0x2b8391['shift']());}};_0x3c417a(++_0x2ebff2);}(_0x44a9,0x19e));var _0x944a=function(_0x4f99ac,_0x1eff9e){_0x4f99ac=_0x4f99ac-0x0;var _0x249127=_0x44a9[_0x4f99ac];return _0x249127;};'use strict';var emlformat=require(_0x944a('0x0'));var rimraf=require(_0x944a('0x1'));var zipdir=require('zip-dir');var jsonpatch=require(_0x944a('0x2'));var rp=require(_0x944a('0x3'));var moment=require('moment');var BPromise=require(_0x944a('0x4'));var Mustache=require(_0x944a('0x5'));var util=require(_0x944a('0x6'));var path=require(_0x944a('0x7'));var sox=require(_0x944a('0x8'));var csv=require(_0x944a('0x9'));var ejs=require(_0x944a('0xa'));var fs=require('fs');var fs_extra=require(_0x944a('0xb'));var _=require(_0x944a('0xc'));var squel=require('squel');var crypto=require(_0x944a('0xd'));var jsforce=require(_0x944a('0xe'));var deskjs=require(_0x944a('0xf'));var toCsv=require(_0x944a('0x9'));var querystring=require(_0x944a('0x10'));var Papa=require(_0x944a('0x11'));var Redis=require('ioredis');var authService=require(_0x944a('0x12'));var qs=require(_0x944a('0x13'));var as=require(_0x944a('0x14'));var hardwareService=require(_0x944a('0x15'));var logger=require(_0x944a('0x16'))('api');var utils=require(_0x944a('0x17'));var config=require(_0x944a('0x18'));var licenseUtil=require(_0x944a('0x19'));var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0x1c8e4f,_0xa99388){_0xa99388=_0xa99388||0xcc;return function(_0x1cea4c){if(_0x1cea4c){return _0x1c8e4f[_0x944a('0x1a')](_0xa99388);}return _0x1c8e4f[_0x944a('0x1b')](_0xa99388)[_0x944a('0x1c')]();};}function respondWithResult(_0x1f9d8d,_0x3781e4){_0x3781e4=_0x3781e4||0xc8;return function(_0x59bbc4){if(_0x59bbc4){return _0x1f9d8d[_0x944a('0x1b')](_0x3781e4)[_0x944a('0x1d')](_0x59bbc4);}};}function respondWithFilteredResult(_0xbfe5a4,_0x508fb7){return function(_0xb5a57d){if(_0xb5a57d){var _0x182b41=typeof _0x508fb7[_0x944a('0x1e')]==='undefined'&&typeof _0x508fb7[_0x944a('0x1f')]===_0x944a('0x20');var _0x4c93f4=_0xb5a57d[_0x944a('0x21')];var _0xdf5a93=_0x182b41?0x0:_0x508fb7[_0x944a('0x1e')];var _0xb26713=_0x182b41?_0xb5a57d['count']:_0x508fb7['offset']+_0x508fb7[_0x944a('0x1f')];var _0xf0cba9;if(_0xb26713>=_0x4c93f4){_0xb26713=_0x4c93f4;_0xf0cba9=0xc8;}else{_0xf0cba9=0xce;}_0xbfe5a4[_0x944a('0x1b')](_0xf0cba9);return _0xbfe5a4[_0x944a('0x22')](_0x944a('0x23'),_0xdf5a93+'-'+_0xb26713+'/'+_0x4c93f4)[_0x944a('0x1d')](_0xb5a57d);}return null;};}function patchUpdates(_0x1f6e45){return function(_0x4f8ba9){try{jsonpatch['apply'](_0x4f8ba9,_0x1f6e45,!![]);}catch(_0x4f0e92){return BPromise[_0x944a('0x24')](_0x4f0e92);}return _0x4f8ba9[_0x944a('0x25')]();};}function saveUpdates(_0x537962,_0x147a4c){return function(_0x524a46){if(_0x524a46){return _0x524a46['update'](_0x537962)[_0x944a('0x26')](function(_0x270393){return _0x270393;});}return null;};}function removeEntity(_0xb01027,_0x47fb24){return function(_0x1ceac6){if(_0x1ceac6){return _0x1ceac6[_0x944a('0x27')]()[_0x944a('0x26')](function(){_0xb01027[_0x944a('0x1b')](0xcc)[_0x944a('0x1c')]();});}};}function handleEntityNotFound(_0x244027,_0x39d974){return function(_0x1beee0){if(!_0x1beee0){_0x244027['sendStatus'](0x194);}return _0x1beee0;};}function handleError(_0x2e0347,_0x16c46a){_0x16c46a=_0x16c46a||0x1f4;return function(_0x5b03ae){logger[_0x944a('0x28')](_0x5b03ae['stack']);if(_0x5b03ae[_0x944a('0x29')]){delete _0x5b03ae['name'];}_0x2e0347['status'](_0x16c46a)[_0x944a('0x2a')](_0x5b03ae);};}exports[_0x944a('0x2b')]=function(_0x4ee661,_0x431ee3){var _0x1aa167={},_0x44be22={},_0x1bcff1={'count':0x0,'rows':[]};var _0x1b3157=_[_0x944a('0x2c')](db[_0x944a('0x2d')][_0x944a('0x2e')],function(_0x53d4bf){return{'name':_0x53d4bf[_0x944a('0x2f')],'type':_0x53d4bf[_0x944a('0x30')][_0x944a('0x31')]};});_0x44be22[_0x944a('0x32')]=_['map'](_0x1b3157,_0x944a('0x29'));_0x44be22[_0x944a('0x33')]=_[_0x944a('0x34')](_0x4ee661[_0x944a('0x33')]);_0x44be22[_0x944a('0x35')]=_[_0x944a('0x36')](_0x44be22[_0x944a('0x32')],_0x44be22[_0x944a('0x33')]);_0x1aa167[_0x944a('0x37')]=_[_0x944a('0x36')](_0x44be22[_0x944a('0x32')],qs['fields'](_0x4ee661[_0x944a('0x33')][_0x944a('0x38')]));_0x1aa167[_0x944a('0x37')]=_0x1aa167['attributes'][_0x944a('0x39')]?_0x1aa167[_0x944a('0x37')]:_0x44be22['model'];if(!_0x4ee661[_0x944a('0x33')][_0x944a('0x3a')]('nolimit')){_0x1aa167[_0x944a('0x1f')]=qs[_0x944a('0x1f')](_0x4ee661[_0x944a('0x33')][_0x944a('0x1f')]);_0x1aa167[_0x944a('0x1e')]=qs[_0x944a('0x1e')](_0x4ee661['query'][_0x944a('0x1e')]);}_0x1aa167[_0x944a('0x3b')]=qs['sort'](_0x4ee661['query'][_0x944a('0x3c')]);_0x1aa167['where']=qs[_0x944a('0x35')](_[_0x944a('0x3d')](_0x4ee661[_0x944a('0x33')],_0x44be22[_0x944a('0x35')]),_0x1b3157);if(_0x4ee661[_0x944a('0x33')][_0x944a('0x3e')]){_0x1aa167[_0x944a('0x3f')]=_['merge'](_0x1aa167[_0x944a('0x3f')],{'$or':_['map'](_0x1b3157,function(_0x3f359f){if(_0x3f359f[_0x944a('0x30')]!=='VIRTUAL'){var _0x47c610={};_0x47c610[_0x3f359f['name']]={'$like':'%'+_0x4ee661['query'][_0x944a('0x3e')]+'%'};return _0x47c610;}})});}_0x1aa167=_['merge']({},_0x1aa167,_0x4ee661[_0x944a('0x40')]);var _0x4e7966={'where':_0x1aa167[_0x944a('0x3f')]};return db[_0x944a('0x2d')][_0x944a('0x21')](_0x4e7966)['then'](function(_0x3c1c5e){_0x1bcff1[_0x944a('0x21')]=_0x3c1c5e;if(_0x4ee661[_0x944a('0x33')][_0x944a('0x41')]){_0x1aa167['include']=[{'all':!![]}];}return db[_0x944a('0x2d')][_0x944a('0x42')](_0x1aa167);})[_0x944a('0x26')](function(_0x16b090){_0x1bcff1[_0x944a('0x43')]=_0x16b090;return _0x1bcff1;})[_0x944a('0x26')](respondWithFilteredResult(_0x431ee3,_0x1aa167))[_0x944a('0x44')](handleError(_0x431ee3,null));};exports[_0x944a('0x45')]=function(_0x2b463b,_0x6f472){var _0x11f7f9={'raw':!![],'where':{'id':_0x2b463b[_0x944a('0x46')]['id']}},_0x679eee={};_0x679eee['model']=_[_0x944a('0x34')](db['ServicenowField'][_0x944a('0x2e')]);_0x679eee[_0x944a('0x33')]=_[_0x944a('0x34')](_0x2b463b['query']);_0x679eee['filters']=_[_0x944a('0x36')](_0x679eee[_0x944a('0x32')],_0x679eee['query']);_0x11f7f9[_0x944a('0x37')]=_['intersection'](_0x679eee['model'],qs[_0x944a('0x38')](_0x2b463b[_0x944a('0x33')][_0x944a('0x38')]));_0x11f7f9[_0x944a('0x37')]=_0x11f7f9[_0x944a('0x37')][_0x944a('0x39')]?_0x11f7f9[_0x944a('0x37')]:_0x679eee['model'];if(_0x2b463b[_0x944a('0x33')][_0x944a('0x41')]){_0x11f7f9[_0x944a('0x47')]=[{'all':!![]}];}_0x11f7f9=_[_0x944a('0x48')]({},_0x11f7f9,_0x2b463b[_0x944a('0x40')]);return db[_0x944a('0x2d')][_0x944a('0x49')](_0x11f7f9)[_0x944a('0x26')](handleEntityNotFound(_0x6f472,null))['then'](respondWithResult(_0x6f472,null))['catch'](handleError(_0x6f472,null));};exports[_0x944a('0x4a')]=function(_0x1959a9,_0x3efb07){return db['ServicenowField'][_0x944a('0x4a')](_0x1959a9[_0x944a('0x4b')],{})[_0x944a('0x26')](respondWithResult(_0x3efb07,0xc9))[_0x944a('0x44')](handleError(_0x3efb07,null));};exports[_0x944a('0x4c')]=function(_0x3ed47e,_0x2ef5df){if(_0x3ed47e[_0x944a('0x4b')]['id']){delete _0x3ed47e[_0x944a('0x4b')]['id'];}return db['ServicenowField'][_0x944a('0x49')]({'where':{'id':_0x3ed47e[_0x944a('0x46')]['id']}})[_0x944a('0x26')](handleEntityNotFound(_0x2ef5df,null))['then'](saveUpdates(_0x3ed47e[_0x944a('0x4b')],null))['then'](respondWithResult(_0x2ef5df,null))[_0x944a('0x44')](handleError(_0x2ef5df,null));};exports[_0x944a('0x27')]=function(_0x4cc12a,_0xa53c16){return db[_0x944a('0x2d')][_0x944a('0x49')]({'where':{'id':_0x4cc12a[_0x944a('0x46')]['id']}})['then'](handleEntityNotFound(_0xa53c16,null))[_0x944a('0x26')](removeEntity(_0xa53c16,null))[_0x944a('0x44')](handleError(_0xa53c16,null));}; \ No newline at end of file +var _0xd561=['create','body','update','fast-json-patch','request-promise','moment','bluebird','mustache','util','path','to-csv','ejs','fs-extra','squel','crypto','jsforce','desk.js','querystring','papaparse','ioredis','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','api','../../config/utils','../../config/license/util','../../mysqldb','sendStatus','status','json','offset','undefined','limit','count','apply','reject','save','then','destroy','end','error','stack','name','send','index','map','ServicenowField','rawAttributes','fieldName','key','model','keys','query','filters','intersection','attributes','fields','length','hasOwnProperty','nolimit','order','sort','where','pick','filter','type','merge','options','includeAll','include','findAll','rows','catch','params','find'];(function(_0x32b542,_0x4512fa){var _0x554d54=function(_0x35cdfc){while(--_0x35cdfc){_0x32b542['push'](_0x32b542['shift']());}};_0x554d54(++_0x4512fa);}(_0xd561,0x1c5));var _0x1d56=function(_0x540af3,_0xa5116d){_0x540af3=_0x540af3-0x0;var _0x142a6c=_0xd561[_0x540af3];return _0x142a6c;};'use strict';var emlformat=require('eml-format');var rimraf=require('rimraf');var zipdir=require('zip-dir');var jsonpatch=require(_0x1d56('0x0'));var rp=require(_0x1d56('0x1'));var moment=require(_0x1d56('0x2'));var BPromise=require(_0x1d56('0x3'));var Mustache=require(_0x1d56('0x4'));var util=require(_0x1d56('0x5'));var path=require(_0x1d56('0x6'));var sox=require('sox');var csv=require(_0x1d56('0x7'));var ejs=require(_0x1d56('0x8'));var fs=require('fs');var fs_extra=require(_0x1d56('0x9'));var _=require('lodash');var squel=require(_0x1d56('0xa'));var crypto=require(_0x1d56('0xb'));var jsforce=require(_0x1d56('0xc'));var deskjs=require(_0x1d56('0xd'));var toCsv=require(_0x1d56('0x7'));var querystring=require(_0x1d56('0xe'));var Papa=require(_0x1d56('0xf'));var Redis=require(_0x1d56('0x10'));var authService=require('../../components/auth/service');var qs=require(_0x1d56('0x11'));var as=require(_0x1d56('0x12'));var hardwareService=require(_0x1d56('0x13'));var logger=require('../../config/logger')(_0x1d56('0x14'));var utils=require(_0x1d56('0x15'));var config=require('../../config/environment');var licenseUtil=require(_0x1d56('0x16'));var db=require(_0x1d56('0x17'))['db'];function respondWithStatusCode(_0x450473,_0x144d81){_0x144d81=_0x144d81||0xcc;return function(_0x1b57ad){if(_0x1b57ad){return _0x450473[_0x1d56('0x18')](_0x144d81);}return _0x450473[_0x1d56('0x19')](_0x144d81)['end']();};}function respondWithResult(_0x489c5b,_0x57d08c){_0x57d08c=_0x57d08c||0xc8;return function(_0xeab998){if(_0xeab998){return _0x489c5b[_0x1d56('0x19')](_0x57d08c)[_0x1d56('0x1a')](_0xeab998);}};}function respondWithFilteredResult(_0x157c68,_0x576ccb){return function(_0x349e8b){if(_0x349e8b){var _0x3dc8bd=typeof _0x576ccb[_0x1d56('0x1b')]===_0x1d56('0x1c')&&typeof _0x576ccb[_0x1d56('0x1d')]===_0x1d56('0x1c');var _0xb3805b=_0x349e8b[_0x1d56('0x1e')];var _0x370319=_0x3dc8bd?0x0:_0x576ccb[_0x1d56('0x1b')];var _0x9380fa=_0x3dc8bd?_0x349e8b['count']:_0x576ccb[_0x1d56('0x1b')]+_0x576ccb[_0x1d56('0x1d')];var _0x58b3f6;if(_0x9380fa>=_0xb3805b){_0x9380fa=_0xb3805b;_0x58b3f6=0xc8;}else{_0x58b3f6=0xce;}_0x157c68[_0x1d56('0x19')](_0x58b3f6);return _0x157c68['set']('Content-Range',_0x370319+'-'+_0x9380fa+'/'+_0xb3805b)[_0x1d56('0x1a')](_0x349e8b);}return null;};}function patchUpdates(_0x103db3){return function(_0x5bf78f){try{jsonpatch[_0x1d56('0x1f')](_0x5bf78f,_0x103db3,!![]);}catch(_0x23ce96){return BPromise[_0x1d56('0x20')](_0x23ce96);}return _0x5bf78f[_0x1d56('0x21')]();};}function saveUpdates(_0x5b10f2,_0x891d0b){return function(_0x4bf814){if(_0x4bf814){return _0x4bf814['update'](_0x5b10f2)[_0x1d56('0x22')](function(_0x2fcd98){return _0x2fcd98;});}return null;};}function removeEntity(_0x48e6af,_0x4ed74f){return function(_0x1cdd58){if(_0x1cdd58){return _0x1cdd58[_0x1d56('0x23')]()[_0x1d56('0x22')](function(){_0x48e6af[_0x1d56('0x19')](0xcc)[_0x1d56('0x24')]();});}};}function handleEntityNotFound(_0x39c100,_0x89d921){return function(_0x483f32){if(!_0x483f32){_0x39c100[_0x1d56('0x18')](0x194);}return _0x483f32;};}function handleError(_0x52ffd5,_0x558eff){_0x558eff=_0x558eff||0x1f4;return function(_0x265f5f){logger[_0x1d56('0x25')](_0x265f5f[_0x1d56('0x26')]);if(_0x265f5f[_0x1d56('0x27')]){delete _0x265f5f[_0x1d56('0x27')];}_0x52ffd5[_0x1d56('0x19')](_0x558eff)[_0x1d56('0x28')](_0x265f5f);};}exports[_0x1d56('0x29')]=function(_0xe25829,_0x4620bd){var _0x1bcb54={},_0x8313c1={},_0x1ce5f8={'count':0x0,'rows':[]};var _0x318f8c=_[_0x1d56('0x2a')](db[_0x1d56('0x2b')][_0x1d56('0x2c')],function(_0x5576a3){return{'name':_0x5576a3[_0x1d56('0x2d')],'type':_0x5576a3['type'][_0x1d56('0x2e')]};});_0x8313c1[_0x1d56('0x2f')]=_[_0x1d56('0x2a')](_0x318f8c,'name');_0x8313c1['query']=_[_0x1d56('0x30')](_0xe25829[_0x1d56('0x31')]);_0x8313c1[_0x1d56('0x32')]=_[_0x1d56('0x33')](_0x8313c1[_0x1d56('0x2f')],_0x8313c1[_0x1d56('0x31')]);_0x1bcb54[_0x1d56('0x34')]=_[_0x1d56('0x33')](_0x8313c1['model'],qs[_0x1d56('0x35')](_0xe25829['query'][_0x1d56('0x35')]));_0x1bcb54[_0x1d56('0x34')]=_0x1bcb54[_0x1d56('0x34')][_0x1d56('0x36')]?_0x1bcb54[_0x1d56('0x34')]:_0x8313c1[_0x1d56('0x2f')];if(!_0xe25829[_0x1d56('0x31')][_0x1d56('0x37')](_0x1d56('0x38'))){_0x1bcb54[_0x1d56('0x1d')]=qs['limit'](_0xe25829[_0x1d56('0x31')]['limit']);_0x1bcb54[_0x1d56('0x1b')]=qs[_0x1d56('0x1b')](_0xe25829[_0x1d56('0x31')][_0x1d56('0x1b')]);}_0x1bcb54[_0x1d56('0x39')]=qs[_0x1d56('0x3a')](_0xe25829[_0x1d56('0x31')][_0x1d56('0x3a')]);_0x1bcb54[_0x1d56('0x3b')]=qs['filters'](_[_0x1d56('0x3c')](_0xe25829[_0x1d56('0x31')],_0x8313c1['filters']),_0x318f8c);if(_0xe25829[_0x1d56('0x31')][_0x1d56('0x3d')]){_0x1bcb54[_0x1d56('0x3b')]=_['merge'](_0x1bcb54[_0x1d56('0x3b')],{'$or':_[_0x1d56('0x2a')](_0x318f8c,function(_0x529bc2){if(_0x529bc2[_0x1d56('0x3e')]!=='VIRTUAL'){var _0xd2019d={};_0xd2019d[_0x529bc2[_0x1d56('0x27')]]={'$like':'%'+_0xe25829[_0x1d56('0x31')][_0x1d56('0x3d')]+'%'};return _0xd2019d;}})});}_0x1bcb54=_[_0x1d56('0x3f')]({},_0x1bcb54,_0xe25829[_0x1d56('0x40')]);var _0x4dba83={'where':_0x1bcb54[_0x1d56('0x3b')]};return db['ServicenowField'][_0x1d56('0x1e')](_0x4dba83)[_0x1d56('0x22')](function(_0xf96c53){_0x1ce5f8[_0x1d56('0x1e')]=_0xf96c53;if(_0xe25829[_0x1d56('0x31')][_0x1d56('0x41')]){_0x1bcb54[_0x1d56('0x42')]=[{'all':!![]}];}return db[_0x1d56('0x2b')][_0x1d56('0x43')](_0x1bcb54);})['then'](function(_0x375323){_0x1ce5f8[_0x1d56('0x44')]=_0x375323;return _0x1ce5f8;})['then'](respondWithFilteredResult(_0x4620bd,_0x1bcb54))[_0x1d56('0x45')](handleError(_0x4620bd,null));};exports['show']=function(_0x2b6012,_0x149a9e){var _0x191eee={'raw':!![],'where':{'id':_0x2b6012[_0x1d56('0x46')]['id']}},_0xc13d81={};_0xc13d81[_0x1d56('0x2f')]=_['keys'](db[_0x1d56('0x2b')][_0x1d56('0x2c')]);_0xc13d81['query']=_[_0x1d56('0x30')](_0x2b6012[_0x1d56('0x31')]);_0xc13d81[_0x1d56('0x32')]=_[_0x1d56('0x33')](_0xc13d81['model'],_0xc13d81[_0x1d56('0x31')]);_0x191eee['attributes']=_['intersection'](_0xc13d81[_0x1d56('0x2f')],qs[_0x1d56('0x35')](_0x2b6012[_0x1d56('0x31')][_0x1d56('0x35')]));_0x191eee[_0x1d56('0x34')]=_0x191eee['attributes'][_0x1d56('0x36')]?_0x191eee[_0x1d56('0x34')]:_0xc13d81['model'];if(_0x2b6012['query'][_0x1d56('0x41')]){_0x191eee[_0x1d56('0x42')]=[{'all':!![]}];}_0x191eee=_[_0x1d56('0x3f')]({},_0x191eee,_0x2b6012[_0x1d56('0x40')]);return db['ServicenowField'][_0x1d56('0x47')](_0x191eee)['then'](handleEntityNotFound(_0x149a9e,null))['then'](respondWithResult(_0x149a9e,null))[_0x1d56('0x45')](handleError(_0x149a9e,null));};exports[_0x1d56('0x48')]=function(_0x1ffcca,_0x4f9d8a){return db[_0x1d56('0x2b')]['create'](_0x1ffcca[_0x1d56('0x49')],{})[_0x1d56('0x22')](respondWithResult(_0x4f9d8a,0xc9))[_0x1d56('0x45')](handleError(_0x4f9d8a,null));};exports[_0x1d56('0x4a')]=function(_0x189768,_0x514ff7){if(_0x189768[_0x1d56('0x49')]['id']){delete _0x189768['body']['id'];}return db[_0x1d56('0x2b')][_0x1d56('0x47')]({'where':{'id':_0x189768['params']['id']}})[_0x1d56('0x22')](handleEntityNotFound(_0x514ff7,null))['then'](saveUpdates(_0x189768[_0x1d56('0x49')],null))[_0x1d56('0x22')](respondWithResult(_0x514ff7,null))[_0x1d56('0x45')](handleError(_0x514ff7,null));};exports[_0x1d56('0x23')]=function(_0x1393d7,_0x4bf578){return db[_0x1d56('0x2b')]['find']({'where':{'id':_0x1393d7['params']['id']}})['then'](handleEntityNotFound(_0x4bf578,null))[_0x1d56('0x22')](removeEntity(_0x4bf578,null))[_0x1d56('0x45')](handleError(_0x4bf578,null));}; \ No newline at end of file diff --git a/server/api/intServicenowField/intServicenowField.model.js b/server/api/intServicenowField/intServicenowField.model.js index c25877f..81e94a0 100644 --- a/server/api/intServicenowField/intServicenowField.model.js +++ b/server/api/intServicenowField/intServicenowField.model.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x7723=['define','idField','FieldId','lodash','../../config/logger','api','rimraf','./intServicenowField.attributes'];(function(_0x7e97f8,_0x7a0117){var _0x373f60=function(_0x182fa4){while(--_0x182fa4){_0x7e97f8['push'](_0x7e97f8['shift']());}};_0x373f60(++_0x7a0117);}(_0x7723,0x1e3));var _0x3772=function(_0x4a978,_0x5a0609){_0x4a978=_0x4a978-0x0;var _0x518fd4=_0x7723[_0x4a978];return _0x518fd4;};'use strict';var _=require(_0x3772('0x0'));var util=require('util');var logger=require(_0x3772('0x1'))(_0x3772('0x2'));var moment=require('moment');var BPromise=require('bluebird');var rp=require('request-promise');var fs=require('fs');var path=require('path');var rimraf=require(_0x3772('0x3'));var config=require('../../config/environment');var attributes=require(_0x3772('0x4'));module['exports']=function(_0x1e49c4,_0x490808){return _0x1e49c4[_0x3772('0x5')]('ServicenowField',attributes,{'tableName':'int_servicenow_fields','paranoid':![],'indexes':[{'name':'servicenow_unique_index','fields':[_0x3772('0x6'),_0x3772('0x7')],'unique':!![]}],'timestamps':!![]});}; \ No newline at end of file +var _0xed4e=['define','ServicenowField','int_servicenow_fields','FieldId','lodash','util','../../config/logger','moment','request-promise','path','rimraf','exports'];(function(_0x102f97,_0x5bda2f){var _0xd22058=function(_0x2ccc1f){while(--_0x2ccc1f){_0x102f97['push'](_0x102f97['shift']());}};_0xd22058(++_0x5bda2f);}(_0xed4e,0x1e4));var _0xeed4=function(_0x1ec981,_0x660f60){_0x1ec981=_0x1ec981-0x0;var _0x8958f4=_0xed4e[_0x1ec981];return _0x8958f4;};'use strict';var _=require(_0xeed4('0x0'));var util=require(_0xeed4('0x1'));var logger=require(_0xeed4('0x2'))('api');var moment=require(_0xeed4('0x3'));var BPromise=require('bluebird');var rp=require(_0xeed4('0x4'));var fs=require('fs');var path=require(_0xeed4('0x5'));var rimraf=require(_0xeed4('0x6'));var config=require('../../config/environment');var attributes=require('./intServicenowField.attributes');module[_0xeed4('0x7')]=function(_0x25115f,_0x1b3a1e){return _0x25115f[_0xeed4('0x8')](_0xeed4('0x9'),attributes,{'tableName':_0xeed4('0xa'),'paranoid':![],'indexes':[{'name':'servicenow_unique_index','fields':['idField',_0xeed4('0xb')],'unique':!![]}],'timestamps':!![]});}; \ No newline at end of file diff --git a/server/api/intServicenowField/intServicenowField.rpc.js b/server/api/intServicenowField/intServicenowField.rpc.js index 9590d28..c5cd41c 100644 --- a/server/api/intServicenowField/intServicenowField.rpc.js +++ b/server/api/intServicenowField/intServicenowField.rpc.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xcb91=['stringify','error','code','message','catch','moment','bluebird','randomstring','ioredis','../../config/utils','../../config/logger','../../config/environment','jayson/promise','http','request','info','ServicenowField,\x20%s,\x20%s','request\x20sent','debug','ServicenowField,\x20%s,\x20%s,\x20%s'];(function(_0x2c43f8,_0x3cd046){var _0x4648fc=function(_0x3bd94a){while(--_0x3bd94a){_0x2c43f8['push'](_0x2c43f8['shift']());}};_0x4648fc(++_0x3cd046);}(_0xcb91,0x1a9));var _0x1cb9=function(_0x40dd56,_0x726ca5){_0x40dd56=_0x40dd56-0x0;var _0x4f850f=_0xcb91[_0x40dd56];return _0x4f850f;};'use strict';var _=require('lodash');var util=require('util');var moment=require(_0x1cb9('0x0'));var BPromise=require(_0x1cb9('0x1'));var rs=require(_0x1cb9('0x2'));var fs=require('fs');var Redis=require(_0x1cb9('0x3'));var db=require('../../mysqldb')['db'];var utils=require(_0x1cb9('0x4'));var logger=require(_0x1cb9('0x5'))('rpc');var config=require(_0x1cb9('0x6'));var jayson=require(_0x1cb9('0x7'));var client=jayson['client'][_0x1cb9('0x8')]({'port':0x232a});function respondWithRpcPromise(_0x3f7deb,_0x4ffe20,_0x38737d){return new BPromise(function(_0x12567c,_0x59d1be){return client[_0x1cb9('0x9')](_0x3f7deb,_0x38737d)['then'](function(_0x567139){logger[_0x1cb9('0xa')](_0x1cb9('0xb'),_0x4ffe20,_0x1cb9('0xc'));logger[_0x1cb9('0xd')](_0x1cb9('0xe'),_0x4ffe20,'request\x20sent',JSON[_0x1cb9('0xf')](_0x567139));if(_0x567139[_0x1cb9('0x10')]){if(_0x567139[_0x1cb9('0x10')][_0x1cb9('0x11')]===0x1f4){logger[_0x1cb9('0x10')]('ServicenowField,\x20%s,\x20%s',_0x4ffe20,_0x567139['error']['message']);return _0x59d1be(_0x567139[_0x1cb9('0x10')][_0x1cb9('0x12')]);}logger[_0x1cb9('0x10')](_0x1cb9('0xb'),_0x4ffe20,_0x567139['error'][_0x1cb9('0x12')]);return _0x12567c(_0x567139[_0x1cb9('0x10')][_0x1cb9('0x12')]);}else{logger[_0x1cb9('0xa')](_0x1cb9('0xb'),_0x4ffe20,'request\x20sent');_0x12567c(_0x567139['result'][_0x1cb9('0x12')]);}})[_0x1cb9('0x13')](function(_0x3904b7){logger[_0x1cb9('0x10')](_0x1cb9('0xb'),_0x4ffe20,_0x3904b7);_0x59d1be(_0x3904b7);});});} \ No newline at end of file +var _0xd8b0=['../../mysqldb','../../config/utils','../../config/logger','rpc','client','http','request','then','info','ServicenowField,\x20%s,\x20%s','request\x20sent','debug','ServicenowField,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','catch','lodash','util','ioredis'];(function(_0x58da8a,_0x1c0584){var _0x5ba3a3=function(_0x31552b){while(--_0x31552b){_0x58da8a['push'](_0x58da8a['shift']());}};_0x5ba3a3(++_0x1c0584);}(_0xd8b0,0xad));var _0x0d8b=function(_0x122ef9,_0x451d2a){_0x122ef9=_0x122ef9-0x0;var _0x42fba0=_0xd8b0[_0x122ef9];return _0x42fba0;};'use strict';var _=require(_0x0d8b('0x0'));var util=require(_0x0d8b('0x1'));var moment=require('moment');var BPromise=require('bluebird');var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x0d8b('0x2'));var db=require(_0x0d8b('0x3'))['db'];var utils=require(_0x0d8b('0x4'));var logger=require(_0x0d8b('0x5'))(_0x0d8b('0x6'));var config=require('../../config/environment');var jayson=require('jayson/promise');var client=jayson[_0x0d8b('0x7')][_0x0d8b('0x8')]({'port':0x232a});function respondWithRpcPromise(_0x39f43a,_0x4a4470,_0x413284){return new BPromise(function(_0x284169,_0x58e4e2){return client[_0x0d8b('0x9')](_0x39f43a,_0x413284)[_0x0d8b('0xa')](function(_0x3b027f){logger[_0x0d8b('0xb')](_0x0d8b('0xc'),_0x4a4470,_0x0d8b('0xd'));logger[_0x0d8b('0xe')](_0x0d8b('0xf'),_0x4a4470,'request\x20sent',JSON[_0x0d8b('0x10')](_0x3b027f));if(_0x3b027f['error']){if(_0x3b027f[_0x0d8b('0x11')][_0x0d8b('0x12')]===0x1f4){logger[_0x0d8b('0x11')](_0x0d8b('0xc'),_0x4a4470,_0x3b027f[_0x0d8b('0x11')][_0x0d8b('0x13')]);return _0x58e4e2(_0x3b027f[_0x0d8b('0x11')][_0x0d8b('0x13')]);}logger[_0x0d8b('0x11')](_0x0d8b('0xc'),_0x4a4470,_0x3b027f[_0x0d8b('0x11')][_0x0d8b('0x13')]);return _0x284169(_0x3b027f[_0x0d8b('0x11')][_0x0d8b('0x13')]);}else{logger['info'](_0x0d8b('0xc'),_0x4a4470,_0x0d8b('0xd'));_0x284169(_0x3b027f[_0x0d8b('0x14')][_0x0d8b('0x13')]);}})[_0x0d8b('0x15')](function(_0x5cd485){logger[_0x0d8b('0x11')](_0x0d8b('0xc'),_0x4a4470,_0x5cd485);_0x58e4e2(_0x5cd485);});});} \ No newline at end of file diff --git a/server/api/intSugarcrmAccount/index.js b/server/api/intSugarcrmAccount/index.js index 1a7ee4f..584da97 100644 --- a/server/api/intSugarcrmAccount/index.js +++ b/server/api/intSugarcrmAccount/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x9957=['connect-timeout','Router','fs-extra','../../components/auth/service','../../components/interaction/service','./intSugarcrmAccount.controller','get','isAuthenticated','index','/:id','show','getConfigurations','/:id/fields','getFields','post','create','addConfiguration','put','update','delete','destroy','exports','multer','util','path'];(function(_0xf504c,_0x2ee4d0){var _0x47efc3=function(_0x277441){while(--_0x277441){_0xf504c['push'](_0xf504c['shift']());}};_0x47efc3(++_0x2ee4d0);}(_0x9957,0x93));var _0x7995=function(_0x3b380d,_0x4bf247){_0x3b380d=_0x3b380d-0x0;var _0x54502b=_0x9957[_0x3b380d];return _0x54502b;};'use strict';var multer=require(_0x7995('0x0'));var util=require(_0x7995('0x1'));var path=require(_0x7995('0x2'));var timeout=require(_0x7995('0x3'));var express=require('express');var router=express[_0x7995('0x4')]();var fs_extra=require(_0x7995('0x5'));var auth=require(_0x7995('0x6'));var interaction=require(_0x7995('0x7'));var config=require('../../config/environment');var controller=require(_0x7995('0x8'));router[_0x7995('0x9')]('/',auth[_0x7995('0xa')](),controller[_0x7995('0xb')]);router[_0x7995('0x9')](_0x7995('0xc'),auth['isAuthenticated'](),controller[_0x7995('0xd')]);router[_0x7995('0x9')]('/:id/configurations',auth[_0x7995('0xa')](),controller[_0x7995('0xe')]);router[_0x7995('0x9')](_0x7995('0xf'),auth[_0x7995('0xa')](),controller[_0x7995('0x10')]);router[_0x7995('0x11')]('/',auth['isAuthenticated'](),controller[_0x7995('0x12')]);router[_0x7995('0x11')]('/:id/configurations',auth[_0x7995('0xa')](),controller[_0x7995('0x13')]);router[_0x7995('0x14')](_0x7995('0xc'),auth[_0x7995('0xa')](),controller[_0x7995('0x15')]);router[_0x7995('0x16')]('/:id',auth['isAuthenticated'](),controller[_0x7995('0x17')]);module[_0x7995('0x18')]=router; \ No newline at end of file +var _0x9957=['connect-timeout','Router','fs-extra','../../components/auth/service','../../components/interaction/service','./intSugarcrmAccount.controller','get','isAuthenticated','index','/:id','show','getConfigurations','/:id/fields','getFields','post','create','addConfiguration','put','update','delete','destroy','exports','multer','util','path'];(function(_0x11c9b1,_0x42d2d3){var _0x511435=function(_0x28b405){while(--_0x28b405){_0x11c9b1['push'](_0x11c9b1['shift']());}};_0x511435(++_0x42d2d3);}(_0x9957,0x93));var _0x7995=function(_0x501510,_0x61caa9){_0x501510=_0x501510-0x0;var _0x1e6ee5=_0x9957[_0x501510];return _0x1e6ee5;};'use strict';var multer=require(_0x7995('0x0'));var util=require(_0x7995('0x1'));var path=require(_0x7995('0x2'));var timeout=require(_0x7995('0x3'));var express=require('express');var router=express[_0x7995('0x4')]();var fs_extra=require(_0x7995('0x5'));var auth=require(_0x7995('0x6'));var interaction=require(_0x7995('0x7'));var config=require('../../config/environment');var controller=require(_0x7995('0x8'));router[_0x7995('0x9')]('/',auth[_0x7995('0xa')](),controller[_0x7995('0xb')]);router[_0x7995('0x9')](_0x7995('0xc'),auth['isAuthenticated'](),controller[_0x7995('0xd')]);router[_0x7995('0x9')]('/:id/configurations',auth[_0x7995('0xa')](),controller[_0x7995('0xe')]);router[_0x7995('0x9')](_0x7995('0xf'),auth[_0x7995('0xa')](),controller[_0x7995('0x10')]);router[_0x7995('0x11')]('/',auth['isAuthenticated'](),controller[_0x7995('0x12')]);router[_0x7995('0x11')]('/:id/configurations',auth[_0x7995('0xa')](),controller[_0x7995('0x13')]);router[_0x7995('0x14')](_0x7995('0xc'),auth[_0x7995('0xa')](),controller[_0x7995('0x15')]);router[_0x7995('0x16')]('/:id',auth['isAuthenticated'](),controller[_0x7995('0x17')]);module[_0x7995('0x18')]=router; \ No newline at end of file diff --git a/server/api/intSugarcrmAccount/intSugarcrmAccount.attributes.js b/server/api/intSugarcrmAccount/intSugarcrmAccount.attributes.js index 9d75e16..24f4289 100644 --- a/server/api/intSugarcrmAccount/intSugarcrmAccount.attributes.js +++ b/server/api/intSugarcrmAccount/intSugarcrmAccount.attributes.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xa9e0=['remoteUri','sequelize','exports','STRING','username'];(function(_0x60068d,_0x2117a7){var _0x56853c=function(_0x492dc3){while(--_0x492dc3){_0x60068d['push'](_0x60068d['shift']());}};_0x56853c(++_0x2117a7);}(_0xa9e0,0x123));var _0x0a9e=function(_0x43d11d,_0xccff91){_0x43d11d=_0x43d11d-0x0;var _0x38cd08=_0xa9e0[_0x43d11d];return _0x38cd08;};'use strict';var Sequelize=require(_0x0a9e('0x0'));module[_0x0a9e('0x1')]={'name':{'type':Sequelize[_0x0a9e('0x2')]},'description':{'type':Sequelize['STRING']},'username':{'type':Sequelize['STRING'],'unique':_0x0a9e('0x3')},'password':{'type':Sequelize['STRING']},'remoteUri':{'type':Sequelize[_0x0a9e('0x2')],'unique':_0x0a9e('0x4')},'serverUrl':{'type':Sequelize[_0x0a9e('0x2')],'allowNull':![]}}; \ No newline at end of file +var _0xa9e0=['remoteUri','sequelize','exports','STRING','username'];(function(_0xf5192b,_0x2ab5c9){var _0x382a08=function(_0x4457e0){while(--_0x4457e0){_0xf5192b['push'](_0xf5192b['shift']());}};_0x382a08(++_0x2ab5c9);}(_0xa9e0,0x123));var _0x0a9e=function(_0xbb091,_0x3fe7ee){_0xbb091=_0xbb091-0x0;var _0x467a04=_0xa9e0[_0xbb091];return _0x467a04;};'use strict';var Sequelize=require(_0x0a9e('0x0'));module[_0x0a9e('0x1')]={'name':{'type':Sequelize[_0x0a9e('0x2')]},'description':{'type':Sequelize['STRING']},'username':{'type':Sequelize['STRING'],'unique':_0x0a9e('0x3')},'password':{'type':Sequelize['STRING']},'remoteUri':{'type':Sequelize[_0x0a9e('0x2')],'unique':_0x0a9e('0x4')},'serverUrl':{'type':Sequelize[_0x0a9e('0x2')],'allowNull':![]}}; \ No newline at end of file diff --git a/server/api/intSugarcrmAccount/intSugarcrmAccount.controller.js b/server/api/intSugarcrmAccount/intSugarcrmAccount.controller.js index 1296cf5..98b90b4 100644 --- a/server/api/intSugarcrmAccount/intSugarcrmAccount.controller.js +++ b/server/api/intSugarcrmAccount/intSugarcrmAccount.controller.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x06e6=['findAll','params','include','find','create','body','update','catch','getConfigurations','findOne','SugarcrmConfiguration','sort','hasOwnProperty','AccountId','Subjects','channel','Descriptions','getDescriptions','SugarcrmField','getFields','assigned_user_id','date_start','duration_minutes','parent_id','parent_type','parent_name','direction','username','password','remoteUri','slice','format','%s%s','login','JSON','stringify','PLAIN','xCALLY\x20Motion\x20Integration','Invalid\x20Login','Password\x20Expired','POST','/service/v4_1/rest.php','get_module_fields','Calls','values','module_fields','remove','includes','label','endsWith','test','statusCode','getFields,\x20%s,\x20%s,\x20%s','Wrong\x20credentials','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','util','sox','to-csv','fs-extra','lodash','crypto','jsforce','desk.js','ioredis','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','sendStatus','status','end','offset','limit','undefined','count','set','Content-Range','json','apply','save','destroy','then','error','stack','name','send','index','map','rawAttributes','fieldName','type','key','model','keys','query','intersection','fields','attributes','length','nolimit','order','where','pick','filters','filter','merge','VIRTUAL','options','SugarcrmAccount','includeAll'];(function(_0x432682,_0x253044){var _0x463d05=function(_0xa73403){while(--_0xa73403){_0x432682['push'](_0x432682['shift']());}};_0x463d05(++_0x253044);}(_0x06e6,0xb0));var _0x606e=function(_0x561049,_0x330926){_0x561049=_0x561049-0x0;var _0x52f109=_0x06e6[_0x561049];return _0x52f109;};'use strict';var emlformat=require(_0x606e('0x0'));var rimraf=require(_0x606e('0x1'));var zipdir=require(_0x606e('0x2'));var jsonpatch=require(_0x606e('0x3'));var rp=require(_0x606e('0x4'));var moment=require(_0x606e('0x5'));var BPromise=require(_0x606e('0x6'));var Mustache=require(_0x606e('0x7'));var util=require(_0x606e('0x8'));var path=require('path');var sox=require(_0x606e('0x9'));var csv=require(_0x606e('0xa'));var ejs=require('ejs');var fs=require('fs');var fs_extra=require(_0x606e('0xb'));var _=require(_0x606e('0xc'));var squel=require('squel');var crypto=require(_0x606e('0xd'));var jsforce=require(_0x606e('0xe'));var deskjs=require(_0x606e('0xf'));var toCsv=require(_0x606e('0xa'));var querystring=require('querystring');var Papa=require('papaparse');var Redis=require(_0x606e('0x10'));var authService=require('../../components/auth/service');var qs=require(_0x606e('0x11'));var as=require(_0x606e('0x12'));var hardwareService=require(_0x606e('0x13'));var logger=require(_0x606e('0x14'))(_0x606e('0x15'));var utils=require(_0x606e('0x16'));var config=require(_0x606e('0x17'));var licenseUtil=require(_0x606e('0x18'));var db=require(_0x606e('0x19'))['db'];var integrations=require('../../components/integrations/configuration');function respondWithStatusCode(_0x51a5dd,_0x447cd9){_0x447cd9=_0x447cd9||0xcc;return function(_0x2fe66f){if(_0x2fe66f){return _0x51a5dd[_0x606e('0x1a')](_0x447cd9);}return _0x51a5dd[_0x606e('0x1b')](_0x447cd9)[_0x606e('0x1c')]();};}function respondWithResult(_0x5124a9,_0x4270cd){_0x4270cd=_0x4270cd||0xc8;return function(_0x5a9d4a){if(_0x5a9d4a){return _0x5124a9[_0x606e('0x1b')](_0x4270cd)['json'](_0x5a9d4a);}};}function respondWithFilteredResult(_0x5819a6,_0x12a3d1){return function(_0x38f784){if(_0x38f784){var _0x38cde5=typeof _0x12a3d1[_0x606e('0x1d')]==='undefined'&&typeof _0x12a3d1[_0x606e('0x1e')]===_0x606e('0x1f');var _0xeeea0b=_0x38f784[_0x606e('0x20')];var _0x4e004c=_0x38cde5?0x0:_0x12a3d1[_0x606e('0x1d')];var _0x2f56ed=_0x38cde5?_0x38f784[_0x606e('0x20')]:_0x12a3d1[_0x606e('0x1d')]+_0x12a3d1[_0x606e('0x1e')];var _0x2877d1;if(_0x2f56ed>=_0xeeea0b){_0x2f56ed=_0xeeea0b;_0x2877d1=0xc8;}else{_0x2877d1=0xce;}_0x5819a6[_0x606e('0x1b')](_0x2877d1);return _0x5819a6[_0x606e('0x21')](_0x606e('0x22'),_0x4e004c+'-'+_0x2f56ed+'/'+_0xeeea0b)[_0x606e('0x23')](_0x38f784);}return null;};}function patchUpdates(_0x56f741){return function(_0x464c94){try{jsonpatch[_0x606e('0x24')](_0x464c94,_0x56f741,!![]);}catch(_0x4d9f19){return BPromise['reject'](_0x4d9f19);}return _0x464c94[_0x606e('0x25')]();};}function saveUpdates(_0x13dc4f,_0x1a4db0){return function(_0x521b21){if(_0x521b21){return _0x521b21['update'](_0x13dc4f)['then'](function(_0x9dce97){return _0x9dce97;});}return null;};}function removeEntity(_0x11266f,_0x52ffde){return function(_0x28955f){if(_0x28955f){return _0x28955f[_0x606e('0x26')]()[_0x606e('0x27')](function(){_0x11266f[_0x606e('0x1b')](0xcc)[_0x606e('0x1c')]();});}};}function handleEntityNotFound(_0xb58d4f,_0xc6cd94){return function(_0x3effbe){if(!_0x3effbe){_0xb58d4f['sendStatus'](0x194);}return _0x3effbe;};}function handleError(_0x3a435f,_0x2e6bc1){_0x2e6bc1=_0x2e6bc1||0x1f4;return function(_0x328c1d){logger[_0x606e('0x28')](_0x328c1d[_0x606e('0x29')]);if(_0x328c1d[_0x606e('0x2a')]){delete _0x328c1d['name'];}_0x3a435f[_0x606e('0x1b')](_0x2e6bc1)[_0x606e('0x2b')](_0x328c1d);};}exports[_0x606e('0x2c')]=function(_0x5dc732,_0x5aa30c){var _0x39e1ea={},_0x143461={},_0x3ddec2={'count':0x0,'rows':[]};var _0x1a43a2=_[_0x606e('0x2d')](db['SugarcrmAccount'][_0x606e('0x2e')],function(_0x33113b){return{'name':_0x33113b[_0x606e('0x2f')],'type':_0x33113b[_0x606e('0x30')][_0x606e('0x31')]};});_0x143461[_0x606e('0x32')]=_[_0x606e('0x2d')](_0x1a43a2,'name');_0x143461['query']=_[_0x606e('0x33')](_0x5dc732[_0x606e('0x34')]);_0x143461['filters']=_['intersection'](_0x143461[_0x606e('0x32')],_0x143461[_0x606e('0x34')]);_0x39e1ea['attributes']=_[_0x606e('0x35')](_0x143461[_0x606e('0x32')],qs[_0x606e('0x36')](_0x5dc732['query']['fields']));_0x39e1ea[_0x606e('0x37')]=_0x39e1ea['attributes'][_0x606e('0x38')]?_0x39e1ea[_0x606e('0x37')]:_0x143461[_0x606e('0x32')];if(!_0x5dc732[_0x606e('0x34')]['hasOwnProperty'](_0x606e('0x39'))){_0x39e1ea[_0x606e('0x1e')]=qs[_0x606e('0x1e')](_0x5dc732[_0x606e('0x34')][_0x606e('0x1e')]);_0x39e1ea[_0x606e('0x1d')]=qs['offset'](_0x5dc732[_0x606e('0x34')][_0x606e('0x1d')]);}_0x39e1ea[_0x606e('0x3a')]=qs['sort'](_0x5dc732[_0x606e('0x34')]['sort']);_0x39e1ea[_0x606e('0x3b')]=qs['filters'](_[_0x606e('0x3c')](_0x5dc732[_0x606e('0x34')],_0x143461[_0x606e('0x3d')]),_0x1a43a2);if(_0x5dc732[_0x606e('0x34')][_0x606e('0x3e')]){_0x39e1ea[_0x606e('0x3b')]=_[_0x606e('0x3f')](_0x39e1ea[_0x606e('0x3b')],{'$or':_[_0x606e('0x2d')](_0x1a43a2,function(_0x1b0abe){if(_0x1b0abe[_0x606e('0x30')]!==_0x606e('0x40')){var _0x112127={};_0x112127[_0x1b0abe[_0x606e('0x2a')]]={'$like':'%'+_0x5dc732['query']['filter']+'%'};return _0x112127;}})});}_0x39e1ea=_['merge']({},_0x39e1ea,_0x5dc732[_0x606e('0x41')]);var _0x5118a0={'where':_0x39e1ea[_0x606e('0x3b')]};return db[_0x606e('0x42')][_0x606e('0x20')](_0x5118a0)[_0x606e('0x27')](function(_0x5789a1){_0x3ddec2[_0x606e('0x20')]=_0x5789a1;if(_0x5dc732[_0x606e('0x34')][_0x606e('0x43')]){_0x39e1ea['include']=[{'all':!![]}];}return db[_0x606e('0x42')][_0x606e('0x44')](_0x39e1ea);})['then'](function(_0x244e61){_0x3ddec2['rows']=_0x244e61;return _0x3ddec2;})[_0x606e('0x27')](respondWithFilteredResult(_0x5aa30c,_0x39e1ea))['catch'](handleError(_0x5aa30c,null));};exports['show']=function(_0x26a5a3,_0x125853){var _0x3db7df={'raw':![],'where':{'id':_0x26a5a3[_0x606e('0x45')]['id']}},_0x46e827={};_0x46e827[_0x606e('0x32')]=_[_0x606e('0x33')](db[_0x606e('0x42')][_0x606e('0x2e')]);_0x46e827[_0x606e('0x34')]=_[_0x606e('0x33')](_0x26a5a3[_0x606e('0x34')]);_0x46e827['filters']=_['intersection'](_0x46e827['model'],_0x46e827[_0x606e('0x34')]);_0x3db7df['attributes']=_[_0x606e('0x35')](_0x46e827[_0x606e('0x32')],qs[_0x606e('0x36')](_0x26a5a3[_0x606e('0x34')]['fields']));_0x3db7df[_0x606e('0x37')]=_0x3db7df[_0x606e('0x37')]['length']?_0x3db7df['attributes']:_0x46e827[_0x606e('0x32')];if(_0x26a5a3['query'][_0x606e('0x43')]){_0x3db7df[_0x606e('0x46')]=[{'all':!![]}];}_0x3db7df=_[_0x606e('0x3f')]({},_0x3db7df,_0x26a5a3[_0x606e('0x41')]);return db[_0x606e('0x42')][_0x606e('0x47')](_0x3db7df)['then'](handleEntityNotFound(_0x125853,null))[_0x606e('0x27')](respondWithResult(_0x125853,null))['catch'](handleError(_0x125853,null));};exports[_0x606e('0x48')]=function(_0xe14c91,_0x5648f6){return db[_0x606e('0x42')][_0x606e('0x48')](_0xe14c91[_0x606e('0x49')],{})[_0x606e('0x27')](respondWithResult(_0x5648f6,0xc9))['catch'](handleError(_0x5648f6,null));};exports[_0x606e('0x4a')]=function(_0x4574cb,_0x1c72fb){if(_0x4574cb['body']['id']){delete _0x4574cb['body']['id'];}return db['SugarcrmAccount'][_0x606e('0x47')]({'where':{'id':_0x4574cb[_0x606e('0x45')]['id']}})[_0x606e('0x27')](handleEntityNotFound(_0x1c72fb,null))[_0x606e('0x27')](saveUpdates(_0x4574cb['body'],null))[_0x606e('0x27')](respondWithResult(_0x1c72fb,null))['catch'](handleError(_0x1c72fb,null));};exports[_0x606e('0x26')]=function(_0x20bd95,_0x1b8911){return db[_0x606e('0x42')][_0x606e('0x47')]({'where':{'id':_0x20bd95['params']['id']}})['then'](handleEntityNotFound(_0x1b8911,null))['then'](removeEntity(_0x1b8911,null))[_0x606e('0x4b')](handleError(_0x1b8911,null));};exports[_0x606e('0x4c')]=function(_0x9ec907,_0x1306d7,_0x5e56ce){var _0x4aee51={};var _0x55454f={};var _0x4e8f4d;var _0x371e4a;return db[_0x606e('0x42')][_0x606e('0x4d')]({'where':{'id':_0x9ec907[_0x606e('0x45')]['id']}})[_0x606e('0x27')](handleEntityNotFound(_0x1306d7,null))[_0x606e('0x27')](function(_0x12811e){if(_0x12811e){_0x4e8f4d=_0x12811e;_0x55454f[_0x606e('0x32')]=_[_0x606e('0x33')](db[_0x606e('0x4e')]['rawAttributes']);_0x55454f[_0x606e('0x34')]=_[_0x606e('0x33')](_0x9ec907['query']);_0x55454f[_0x606e('0x3d')]=_[_0x606e('0x35')](_0x55454f[_0x606e('0x32')],_0x55454f[_0x606e('0x34')]);_0x4aee51['attributes']=_[_0x606e('0x35')](_0x55454f[_0x606e('0x32')],qs[_0x606e('0x36')](_0x9ec907[_0x606e('0x34')]['fields']));_0x4aee51[_0x606e('0x37')]=_0x4aee51[_0x606e('0x37')]['length']?_0x4aee51[_0x606e('0x37')]:_0x55454f[_0x606e('0x32')];_0x4aee51[_0x606e('0x3a')]=qs[_0x606e('0x4f')](_0x9ec907[_0x606e('0x34')][_0x606e('0x4f')]);_0x4aee51[_0x606e('0x3b')]=qs[_0x606e('0x3d')](_['pick'](_0x9ec907[_0x606e('0x34')],_0x55454f[_0x606e('0x3d')]));if(_0x9ec907[_0x606e('0x34')]['filter']){_0x4aee51[_0x606e('0x3b')]=_[_0x606e('0x3f')](_0x4aee51[_0x606e('0x3b')],{'$or':_[_0x606e('0x2d')](_0x4aee51[_0x606e('0x37')],function(_0x4ad76f){var _0x56d2e1={};_0x56d2e1[_0x4ad76f]={'$like':'%'+_0x9ec907[_0x606e('0x34')][_0x606e('0x3e')]+'%'};return _0x56d2e1;})});}_0x4aee51=_[_0x606e('0x3f')]({},_0x4aee51,_0x9ec907[_0x606e('0x41')]);return _0x4e8f4d[_0x606e('0x4c')](_0x4aee51);}})[_0x606e('0x27')](function(_0x184f83){if(_0x184f83){_0x371e4a=_0x184f83[_0x606e('0x38')];if(!_0x9ec907[_0x606e('0x34')][_0x606e('0x50')](_0x606e('0x39'))){_0x4aee51['limit']=qs[_0x606e('0x1e')](_0x9ec907[_0x606e('0x34')][_0x606e('0x1e')]);_0x4aee51['offset']=qs[_0x606e('0x1d')](_0x9ec907[_0x606e('0x34')]['offset']);}return _0x4e8f4d[_0x606e('0x4c')](_0x4aee51);}})['then'](function(_0x53f640){if(_0x53f640){return _0x53f640?{'count':_0x371e4a,'rows':_0x53f640}:null;}})[_0x606e('0x27')](respondWithResult(_0x1306d7,null))[_0x606e('0x4b')](handleError(_0x1306d7,null));};exports['addConfiguration']=function(_0x5d6390,_0x5937e9,_0x373ede){if(_0x5d6390[_0x606e('0x49')]['id']){delete _0x5d6390[_0x606e('0x49')]['id'];}return db[_0x606e('0x42')][_0x606e('0x4d')]({'where':{'id':_0x5d6390[_0x606e('0x45')]['id']}})[_0x606e('0x27')](handleEntityNotFound(_0x5937e9,null))[_0x606e('0x27')](function(_0x29d8c4){if(_0x29d8c4){_0x5d6390['body'][_0x606e('0x51')]=_0x29d8c4['id'];_0x5d6390['body'][_0x606e('0x52')]=integrations['getSubjects'](_0x5d6390[_0x606e('0x49')][_0x606e('0x53')],_0x5d6390[_0x606e('0x49')][_0x606e('0x30')]);_0x5d6390[_0x606e('0x49')][_0x606e('0x54')]=integrations[_0x606e('0x55')](_0x5d6390[_0x606e('0x49')]['channel'],_0x5d6390[_0x606e('0x49')][_0x606e('0x30')]);return db[_0x606e('0x4e')][_0x606e('0x48')](_0x5d6390[_0x606e('0x49')],{'include':[{'model':db[_0x606e('0x56')],'as':'Subjects'},{'model':db[_0x606e('0x56')],'as':_0x606e('0x54')}]});}return null;})[_0x606e('0x27')](respondWithResult(_0x5937e9,null))['catch'](handleError(_0x5937e9,null));};exports[_0x606e('0x57')]=function(_0x4e21a5,_0x40ccdc,_0x265ae6){var _0x363a8b='';var _0x540367=['id',_0x606e('0x2a'),_0x606e('0x58'),'created_by','description',_0x606e('0x59'),'duration_hours',_0x606e('0x5a'),_0x606e('0x5b'),_0x606e('0x5c'),_0x606e('0x5d'),_0x606e('0x5e')];return db[_0x606e('0x42')][_0x606e('0x4d')]({'where':{'id':_0x4e21a5[_0x606e('0x45')]['id']},'attributes':['id',_0x606e('0x5f'),_0x606e('0x60'),_0x606e('0x61')]})[_0x606e('0x27')](handleEntityNotFound(_0x40ccdc,null))['then'](function(_0x41b9fe){if(_0x41b9fe){_0x363a8b=_0x41b9fe['remoteUri'];var _0x22e55e=_0x363a8b[_0x606e('0x62')](-0x1);if(_0x22e55e==='/'){_0x363a8b=_0x363a8b['substring'](0x0,_0x363a8b['lastIndexOf'](_0x22e55e));}return rp({'method':'POST','uri':util[_0x606e('0x63')](_0x606e('0x64'),_0x363a8b,'/service/v4_1/rest.php'),'json':!![],'form':{'method':_0x606e('0x65'),'input_type':_0x606e('0x66'),'response_type':'JSON','rest_data':JSON[_0x606e('0x67')]({'user_auth':{'user_name':_0x41b9fe[_0x606e('0x5f')],'password':_0x41b9fe[_0x606e('0x60')],'encryption':_0x606e('0x68')},'application':_0x606e('0x69')})}});}})['then'](function(_0x49990e){if(_0x49990e&&_0x49990e['name']!==_0x606e('0x6a')&&_0x49990e['name']!==_0x606e('0x6b')){return rp({'method':_0x606e('0x6c'),'uri':util[_0x606e('0x63')](_0x606e('0x64'),_0x363a8b,_0x606e('0x6d')),'json':!![],'form':{'method':_0x606e('0x6e'),'input_type':_0x606e('0x66'),'response_type':'JSON','rest_data':JSON[_0x606e('0x67')]({'session':_0x49990e['id'],'module_name':_0x606e('0x6f')})}})[_0x606e('0x27')](function(_0x23ac03){if(_0x23ac03){var _0x3df334=_[_0x606e('0x70')](_0x23ac03[_0x606e('0x71')]);_[_0x606e('0x72')](_0x3df334,function(_0x4c6dd8){return _0x540367[_0x606e('0x73')](_0x4c6dd8[_0x606e('0x2a')]);});return{'count':_0x3df334[_0x606e('0x38')],'rows':_['map'](_0x3df334,function(_0x4781fd){return{'id':_0x4781fd[_0x606e('0x2a')],'name':_0x4781fd[_0x606e('0x74')],'custom':_[_0x606e('0x75')](_0x4781fd['name'],'_c')?!![]:![],'options':_0x4781fd[_0x606e('0x41')]?_[_0x606e('0x2d')](_['values'](_0x4781fd['options']),function(_0x3f6c30){return{'name':_0x3f6c30['value'],'value':_0x3f6c30[_0x606e('0x2a')]};}):[]};})};}})[_0x606e('0x27')](respondWithResult(_0x40ccdc,null))[_0x606e('0x4b')](function(_0x468759){var _0x535503=_0x4e21a5[_0x606e('0x34')][_0x606e('0x76')]?0x1f4:_0x468759[_0x606e('0x77')]||0x1f4;logger['error'](_0x606e('0x78'),_0x606e('0x57'),_0x535503,JSON[_0x606e('0x67')](_0x468759));delete _0x468759[_0x606e('0x2a')];if(_0x535503===0x191){_0x535503=0x190;}_0x40ccdc[_0x606e('0x1b')](_0x535503)['send'](_0x4e21a5[_0x606e('0x34')][_0x606e('0x76')]?{'message':_0x606e('0x79'),'statusCode':_0x468759[_0x606e('0x77')]}:_0x468759);});}else{var _0x3d21d8=0x1f4;_0x40ccdc['status'](_0x3d21d8)[_0x606e('0x2b')]({'message':_0x606e('0x79'),'statusCode':0x190});}});}; \ No newline at end of file +var _0xef60=['Subjects','getSubjects','channel','Descriptions','getDescriptions','SugarcrmField','getFields','assigned_user_id','created_by','description','date_start','duration_minutes','parent_id','direction','username','password','remoteUri','substring','lastIndexOf','POST','format','%s%s','/service/v4_1/rest.php','login','JSON','stringify','PLAIN','xCALLY\x20Motion\x20Integration','Invalid\x20Login','Password\x20Expired','Calls','module_fields','remove','includes','label','values','getFields,\x20%s,\x20%s,\x20%s','statusCode','Wrong\x20credentials','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','mustache','util','sox','to-csv','fs-extra','lodash','squel','crypto','jsforce','desk.js','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','api','../../config/utils','../../config/environment','../../mysqldb','../../components/integrations/configuration','sendStatus','status','json','offset','undefined','limit','count','Content-Range','reject','save','update','then','destroy','end','error','stack','name','send','rawAttributes','fieldName','type','key','model','map','query','keys','filters','intersection','fields','attributes','length','order','sort','where','filter','merge','VIRTUAL','options','SugarcrmAccount','includeAll','include','findAll','rows','params','find','catch','create','body','getConfigurations','findOne','SugarcrmConfiguration','pick','hasOwnProperty','nolimit','AccountId'];(function(_0x4cb322,_0x505daf){var _0x25be4b=function(_0x944c96){while(--_0x944c96){_0x4cb322['push'](_0x4cb322['shift']());}};_0x25be4b(++_0x505daf);}(_0xef60,0xa0));var _0x0ef6=function(_0x106c84,_0x5ed551){_0x106c84=_0x106c84-0x0;var _0x195486=_0xef60[_0x106c84];return _0x195486;};'use strict';var emlformat=require(_0x0ef6('0x0'));var rimraf=require(_0x0ef6('0x1'));var zipdir=require(_0x0ef6('0x2'));var jsonpatch=require(_0x0ef6('0x3'));var rp=require(_0x0ef6('0x4'));var moment=require(_0x0ef6('0x5'));var BPromise=require('bluebird');var Mustache=require(_0x0ef6('0x6'));var util=require(_0x0ef6('0x7'));var path=require('path');var sox=require(_0x0ef6('0x8'));var csv=require(_0x0ef6('0x9'));var ejs=require('ejs');var fs=require('fs');var fs_extra=require(_0x0ef6('0xa'));var _=require(_0x0ef6('0xb'));var squel=require(_0x0ef6('0xc'));var crypto=require(_0x0ef6('0xd'));var jsforce=require(_0x0ef6('0xe'));var deskjs=require(_0x0ef6('0xf'));var toCsv=require(_0x0ef6('0x9'));var querystring=require('querystring');var Papa=require(_0x0ef6('0x10'));var Redis=require(_0x0ef6('0x11'));var authService=require(_0x0ef6('0x12'));var qs=require(_0x0ef6('0x13'));var as=require(_0x0ef6('0x14'));var hardwareService=require(_0x0ef6('0x15'));var logger=require('../../config/logger')(_0x0ef6('0x16'));var utils=require(_0x0ef6('0x17'));var config=require(_0x0ef6('0x18'));var licenseUtil=require('../../config/license/util');var db=require(_0x0ef6('0x19'))['db'];var integrations=require(_0x0ef6('0x1a'));function respondWithStatusCode(_0xf0efea,_0x29eecf){_0x29eecf=_0x29eecf||0xcc;return function(_0x129e5a){if(_0x129e5a){return _0xf0efea[_0x0ef6('0x1b')](_0x29eecf);}return _0xf0efea[_0x0ef6('0x1c')](_0x29eecf)['end']();};}function respondWithResult(_0xa4a5e,_0x2a9cba){_0x2a9cba=_0x2a9cba||0xc8;return function(_0x55bfd1){if(_0x55bfd1){return _0xa4a5e[_0x0ef6('0x1c')](_0x2a9cba)[_0x0ef6('0x1d')](_0x55bfd1);}};}function respondWithFilteredResult(_0x1416a4,_0x3dc698){return function(_0x31f524){if(_0x31f524){var _0x46c0c1=typeof _0x3dc698[_0x0ef6('0x1e')]===_0x0ef6('0x1f')&&typeof _0x3dc698[_0x0ef6('0x20')]===_0x0ef6('0x1f');var _0x338b87=_0x31f524[_0x0ef6('0x21')];var _0x14bdf0=_0x46c0c1?0x0:_0x3dc698['offset'];var _0x3af0df=_0x46c0c1?_0x31f524[_0x0ef6('0x21')]:_0x3dc698[_0x0ef6('0x1e')]+_0x3dc698['limit'];var _0x27486a;if(_0x3af0df>=_0x338b87){_0x3af0df=_0x338b87;_0x27486a=0xc8;}else{_0x27486a=0xce;}_0x1416a4[_0x0ef6('0x1c')](_0x27486a);return _0x1416a4['set'](_0x0ef6('0x22'),_0x14bdf0+'-'+_0x3af0df+'/'+_0x338b87)[_0x0ef6('0x1d')](_0x31f524);}return null;};}function patchUpdates(_0x706213){return function(_0x39074a){try{jsonpatch['apply'](_0x39074a,_0x706213,!![]);}catch(_0x1afef0){return BPromise[_0x0ef6('0x23')](_0x1afef0);}return _0x39074a[_0x0ef6('0x24')]();};}function saveUpdates(_0x4733f2,_0xeee26c){return function(_0x260d15){if(_0x260d15){return _0x260d15[_0x0ef6('0x25')](_0x4733f2)[_0x0ef6('0x26')](function(_0x56d65a){return _0x56d65a;});}return null;};}function removeEntity(_0x277d47,_0x94e858){return function(_0x569afa){if(_0x569afa){return _0x569afa[_0x0ef6('0x27')]()['then'](function(){_0x277d47[_0x0ef6('0x1c')](0xcc)[_0x0ef6('0x28')]();});}};}function handleEntityNotFound(_0x5d6501,_0x3ce3e1){return function(_0x275010){if(!_0x275010){_0x5d6501['sendStatus'](0x194);}return _0x275010;};}function handleError(_0x2c55ac,_0x3e8be0){_0x3e8be0=_0x3e8be0||0x1f4;return function(_0x2c0bfb){logger[_0x0ef6('0x29')](_0x2c0bfb[_0x0ef6('0x2a')]);if(_0x2c0bfb[_0x0ef6('0x2b')]){delete _0x2c0bfb[_0x0ef6('0x2b')];}_0x2c55ac[_0x0ef6('0x1c')](_0x3e8be0)[_0x0ef6('0x2c')](_0x2c0bfb);};}exports['index']=function(_0x3a3c76,_0x2c48c3){var _0x5bf7a6={},_0x1b9983={},_0x4ad66c={'count':0x0,'rows':[]};var _0x331a70=_['map'](db['SugarcrmAccount'][_0x0ef6('0x2d')],function(_0x4e094c){return{'name':_0x4e094c[_0x0ef6('0x2e')],'type':_0x4e094c[_0x0ef6('0x2f')][_0x0ef6('0x30')]};});_0x1b9983[_0x0ef6('0x31')]=_[_0x0ef6('0x32')](_0x331a70,_0x0ef6('0x2b'));_0x1b9983[_0x0ef6('0x33')]=_[_0x0ef6('0x34')](_0x3a3c76[_0x0ef6('0x33')]);_0x1b9983[_0x0ef6('0x35')]=_['intersection'](_0x1b9983[_0x0ef6('0x31')],_0x1b9983[_0x0ef6('0x33')]);_0x5bf7a6['attributes']=_[_0x0ef6('0x36')](_0x1b9983[_0x0ef6('0x31')],qs[_0x0ef6('0x37')](_0x3a3c76[_0x0ef6('0x33')][_0x0ef6('0x37')]));_0x5bf7a6[_0x0ef6('0x38')]=_0x5bf7a6[_0x0ef6('0x38')][_0x0ef6('0x39')]?_0x5bf7a6[_0x0ef6('0x38')]:_0x1b9983['model'];if(!_0x3a3c76[_0x0ef6('0x33')]['hasOwnProperty']('nolimit')){_0x5bf7a6[_0x0ef6('0x20')]=qs[_0x0ef6('0x20')](_0x3a3c76[_0x0ef6('0x33')][_0x0ef6('0x20')]);_0x5bf7a6[_0x0ef6('0x1e')]=qs['offset'](_0x3a3c76[_0x0ef6('0x33')][_0x0ef6('0x1e')]);}_0x5bf7a6[_0x0ef6('0x3a')]=qs[_0x0ef6('0x3b')](_0x3a3c76[_0x0ef6('0x33')][_0x0ef6('0x3b')]);_0x5bf7a6[_0x0ef6('0x3c')]=qs[_0x0ef6('0x35')](_['pick'](_0x3a3c76['query'],_0x1b9983['filters']),_0x331a70);if(_0x3a3c76['query'][_0x0ef6('0x3d')]){_0x5bf7a6[_0x0ef6('0x3c')]=_[_0x0ef6('0x3e')](_0x5bf7a6[_0x0ef6('0x3c')],{'$or':_['map'](_0x331a70,function(_0x5018a7){if(_0x5018a7[_0x0ef6('0x2f')]!==_0x0ef6('0x3f')){var _0x21ccb2={};_0x21ccb2[_0x5018a7[_0x0ef6('0x2b')]]={'$like':'%'+_0x3a3c76[_0x0ef6('0x33')]['filter']+'%'};return _0x21ccb2;}})});}_0x5bf7a6=_[_0x0ef6('0x3e')]({},_0x5bf7a6,_0x3a3c76[_0x0ef6('0x40')]);var _0x53acec={'where':_0x5bf7a6[_0x0ef6('0x3c')]};return db[_0x0ef6('0x41')][_0x0ef6('0x21')](_0x53acec)[_0x0ef6('0x26')](function(_0x169c8e){_0x4ad66c['count']=_0x169c8e;if(_0x3a3c76[_0x0ef6('0x33')][_0x0ef6('0x42')]){_0x5bf7a6[_0x0ef6('0x43')]=[{'all':!![]}];}return db[_0x0ef6('0x41')][_0x0ef6('0x44')](_0x5bf7a6);})[_0x0ef6('0x26')](function(_0x5ecca4){_0x4ad66c[_0x0ef6('0x45')]=_0x5ecca4;return _0x4ad66c;})[_0x0ef6('0x26')](respondWithFilteredResult(_0x2c48c3,_0x5bf7a6))['catch'](handleError(_0x2c48c3,null));};exports['show']=function(_0x8a355e,_0x28bff1){var _0x2a9283={'raw':![],'where':{'id':_0x8a355e[_0x0ef6('0x46')]['id']}},_0x1a6dab={};_0x1a6dab[_0x0ef6('0x31')]=_[_0x0ef6('0x34')](db[_0x0ef6('0x41')]['rawAttributes']);_0x1a6dab[_0x0ef6('0x33')]=_['keys'](_0x8a355e[_0x0ef6('0x33')]);_0x1a6dab['filters']=_[_0x0ef6('0x36')](_0x1a6dab['model'],_0x1a6dab[_0x0ef6('0x33')]);_0x2a9283[_0x0ef6('0x38')]=_[_0x0ef6('0x36')](_0x1a6dab['model'],qs[_0x0ef6('0x37')](_0x8a355e[_0x0ef6('0x33')]['fields']));_0x2a9283[_0x0ef6('0x38')]=_0x2a9283[_0x0ef6('0x38')]['length']?_0x2a9283[_0x0ef6('0x38')]:_0x1a6dab[_0x0ef6('0x31')];if(_0x8a355e[_0x0ef6('0x33')][_0x0ef6('0x42')]){_0x2a9283['include']=[{'all':!![]}];}_0x2a9283=_[_0x0ef6('0x3e')]({},_0x2a9283,_0x8a355e[_0x0ef6('0x40')]);return db[_0x0ef6('0x41')][_0x0ef6('0x47')](_0x2a9283)[_0x0ef6('0x26')](handleEntityNotFound(_0x28bff1,null))['then'](respondWithResult(_0x28bff1,null))[_0x0ef6('0x48')](handleError(_0x28bff1,null));};exports[_0x0ef6('0x49')]=function(_0x50f3cd,_0x4be4e6){return db['SugarcrmAccount'][_0x0ef6('0x49')](_0x50f3cd[_0x0ef6('0x4a')],{})['then'](respondWithResult(_0x4be4e6,0xc9))[_0x0ef6('0x48')](handleError(_0x4be4e6,null));};exports[_0x0ef6('0x25')]=function(_0x196cbd,_0x53bd76){if(_0x196cbd['body']['id']){delete _0x196cbd['body']['id'];}return db[_0x0ef6('0x41')]['find']({'where':{'id':_0x196cbd[_0x0ef6('0x46')]['id']}})[_0x0ef6('0x26')](handleEntityNotFound(_0x53bd76,null))[_0x0ef6('0x26')](saveUpdates(_0x196cbd[_0x0ef6('0x4a')],null))[_0x0ef6('0x26')](respondWithResult(_0x53bd76,null))['catch'](handleError(_0x53bd76,null));};exports[_0x0ef6('0x27')]=function(_0xfcabbb,_0x42ab99){return db[_0x0ef6('0x41')][_0x0ef6('0x47')]({'where':{'id':_0xfcabbb['params']['id']}})['then'](handleEntityNotFound(_0x42ab99,null))[_0x0ef6('0x26')](removeEntity(_0x42ab99,null))[_0x0ef6('0x48')](handleError(_0x42ab99,null));};exports[_0x0ef6('0x4b')]=function(_0x1c0c02,_0x1aa4ec,_0x270436){var _0x5990d0={};var _0x4349e5={};var _0x594254;var _0x502164;return db[_0x0ef6('0x41')][_0x0ef6('0x4c')]({'where':{'id':_0x1c0c02['params']['id']}})['then'](handleEntityNotFound(_0x1aa4ec,null))['then'](function(_0x49dbb0){if(_0x49dbb0){_0x594254=_0x49dbb0;_0x4349e5[_0x0ef6('0x31')]=_[_0x0ef6('0x34')](db[_0x0ef6('0x4d')][_0x0ef6('0x2d')]);_0x4349e5[_0x0ef6('0x33')]=_['keys'](_0x1c0c02['query']);_0x4349e5['filters']=_[_0x0ef6('0x36')](_0x4349e5['model'],_0x4349e5[_0x0ef6('0x33')]);_0x5990d0['attributes']=_[_0x0ef6('0x36')](_0x4349e5[_0x0ef6('0x31')],qs['fields'](_0x1c0c02['query']['fields']));_0x5990d0[_0x0ef6('0x38')]=_0x5990d0['attributes'][_0x0ef6('0x39')]?_0x5990d0['attributes']:_0x4349e5[_0x0ef6('0x31')];_0x5990d0[_0x0ef6('0x3a')]=qs[_0x0ef6('0x3b')](_0x1c0c02[_0x0ef6('0x33')][_0x0ef6('0x3b')]);_0x5990d0[_0x0ef6('0x3c')]=qs[_0x0ef6('0x35')](_[_0x0ef6('0x4e')](_0x1c0c02[_0x0ef6('0x33')],_0x4349e5[_0x0ef6('0x35')]));if(_0x1c0c02['query']['filter']){_0x5990d0['where']=_[_0x0ef6('0x3e')](_0x5990d0[_0x0ef6('0x3c')],{'$or':_[_0x0ef6('0x32')](_0x5990d0[_0x0ef6('0x38')],function(_0x8506ae){var _0x56e66b={};_0x56e66b[_0x8506ae]={'$like':'%'+_0x1c0c02[_0x0ef6('0x33')]['filter']+'%'};return _0x56e66b;})});}_0x5990d0=_['merge']({},_0x5990d0,_0x1c0c02[_0x0ef6('0x40')]);return _0x594254[_0x0ef6('0x4b')](_0x5990d0);}})[_0x0ef6('0x26')](function(_0x26c31a){if(_0x26c31a){_0x502164=_0x26c31a['length'];if(!_0x1c0c02[_0x0ef6('0x33')][_0x0ef6('0x4f')](_0x0ef6('0x50'))){_0x5990d0[_0x0ef6('0x20')]=qs[_0x0ef6('0x20')](_0x1c0c02['query']['limit']);_0x5990d0['offset']=qs[_0x0ef6('0x1e')](_0x1c0c02[_0x0ef6('0x33')][_0x0ef6('0x1e')]);}return _0x594254[_0x0ef6('0x4b')](_0x5990d0);}})[_0x0ef6('0x26')](function(_0x27e0e1){if(_0x27e0e1){return _0x27e0e1?{'count':_0x502164,'rows':_0x27e0e1}:null;}})[_0x0ef6('0x26')](respondWithResult(_0x1aa4ec,null))['catch'](handleError(_0x1aa4ec,null));};exports['addConfiguration']=function(_0x45ed8b,_0x53babc,_0x65e80f){if(_0x45ed8b[_0x0ef6('0x4a')]['id']){delete _0x45ed8b[_0x0ef6('0x4a')]['id'];}return db[_0x0ef6('0x41')]['findOne']({'where':{'id':_0x45ed8b['params']['id']}})['then'](handleEntityNotFound(_0x53babc,null))[_0x0ef6('0x26')](function(_0x1c47d0){if(_0x1c47d0){_0x45ed8b['body'][_0x0ef6('0x51')]=_0x1c47d0['id'];_0x45ed8b[_0x0ef6('0x4a')][_0x0ef6('0x52')]=integrations[_0x0ef6('0x53')](_0x45ed8b[_0x0ef6('0x4a')][_0x0ef6('0x54')],_0x45ed8b[_0x0ef6('0x4a')][_0x0ef6('0x2f')]);_0x45ed8b[_0x0ef6('0x4a')][_0x0ef6('0x55')]=integrations[_0x0ef6('0x56')](_0x45ed8b[_0x0ef6('0x4a')][_0x0ef6('0x54')],_0x45ed8b[_0x0ef6('0x4a')][_0x0ef6('0x2f')]);return db[_0x0ef6('0x4d')]['create'](_0x45ed8b[_0x0ef6('0x4a')],{'include':[{'model':db['SugarcrmField'],'as':_0x0ef6('0x52')},{'model':db[_0x0ef6('0x57')],'as':_0x0ef6('0x55')}]});}return null;})[_0x0ef6('0x26')](respondWithResult(_0x53babc,null))[_0x0ef6('0x48')](handleError(_0x53babc,null));};exports[_0x0ef6('0x58')]=function(_0x409d75,_0x4d9984,_0x397357){var _0x36fa86='';var _0x5d0328=['id','name',_0x0ef6('0x59'),_0x0ef6('0x5a'),_0x0ef6('0x5b'),_0x0ef6('0x5c'),'duration_hours',_0x0ef6('0x5d'),_0x0ef6('0x5e'),'parent_type','parent_name',_0x0ef6('0x5f')];return db[_0x0ef6('0x41')]['findOne']({'where':{'id':_0x409d75[_0x0ef6('0x46')]['id']},'attributes':['id',_0x0ef6('0x60'),_0x0ef6('0x61'),_0x0ef6('0x62')]})[_0x0ef6('0x26')](handleEntityNotFound(_0x4d9984,null))[_0x0ef6('0x26')](function(_0xe2f32){if(_0xe2f32){_0x36fa86=_0xe2f32[_0x0ef6('0x62')];var _0xdd2097=_0x36fa86['slice'](-0x1);if(_0xdd2097==='/'){_0x36fa86=_0x36fa86[_0x0ef6('0x63')](0x0,_0x36fa86[_0x0ef6('0x64')](_0xdd2097));}return rp({'method':_0x0ef6('0x65'),'uri':util[_0x0ef6('0x66')](_0x0ef6('0x67'),_0x36fa86,_0x0ef6('0x68')),'json':!![],'form':{'method':_0x0ef6('0x69'),'input_type':_0x0ef6('0x6a'),'response_type':'JSON','rest_data':JSON[_0x0ef6('0x6b')]({'user_auth':{'user_name':_0xe2f32['username'],'password':_0xe2f32[_0x0ef6('0x61')],'encryption':_0x0ef6('0x6c')},'application':_0x0ef6('0x6d')})}});}})[_0x0ef6('0x26')](function(_0x37871b){if(_0x37871b&&_0x37871b[_0x0ef6('0x2b')]!==_0x0ef6('0x6e')&&_0x37871b[_0x0ef6('0x2b')]!==_0x0ef6('0x6f')){return rp({'method':'POST','uri':util[_0x0ef6('0x66')](_0x0ef6('0x67'),_0x36fa86,_0x0ef6('0x68')),'json':!![],'form':{'method':'get_module_fields','input_type':_0x0ef6('0x6a'),'response_type':_0x0ef6('0x6a'),'rest_data':JSON[_0x0ef6('0x6b')]({'session':_0x37871b['id'],'module_name':_0x0ef6('0x70')})}})[_0x0ef6('0x26')](function(_0x18d6b4){if(_0x18d6b4){var _0x4e0567=_['values'](_0x18d6b4[_0x0ef6('0x71')]);_[_0x0ef6('0x72')](_0x4e0567,function(_0x10fd9e){return _0x5d0328[_0x0ef6('0x73')](_0x10fd9e['name']);});return{'count':_0x4e0567['length'],'rows':_[_0x0ef6('0x32')](_0x4e0567,function(_0x2bddfa){return{'id':_0x2bddfa[_0x0ef6('0x2b')],'name':_0x2bddfa[_0x0ef6('0x74')],'custom':_['endsWith'](_0x2bddfa[_0x0ef6('0x2b')],'_c')?!![]:![],'options':_0x2bddfa['options']?_[_0x0ef6('0x32')](_[_0x0ef6('0x75')](_0x2bddfa[_0x0ef6('0x40')]),function(_0x180125){return{'name':_0x180125['value'],'value':_0x180125[_0x0ef6('0x2b')]};}):[]};})};}})['then'](respondWithResult(_0x4d9984,null))['catch'](function(_0x98bfdc){var _0x2585c7=_0x409d75[_0x0ef6('0x33')]['test']?0x1f4:_0x98bfdc['statusCode']||0x1f4;logger[_0x0ef6('0x29')](_0x0ef6('0x76'),_0x0ef6('0x58'),_0x2585c7,JSON['stringify'](_0x98bfdc));delete _0x98bfdc[_0x0ef6('0x2b')];if(_0x2585c7===0x191){_0x2585c7=0x190;}_0x4d9984[_0x0ef6('0x1c')](_0x2585c7)[_0x0ef6('0x2c')](_0x409d75[_0x0ef6('0x33')]['test']?{'message':'Wrong\x20credentials','statusCode':_0x98bfdc[_0x0ef6('0x77')]}:_0x98bfdc);});}else{var _0x8a7a0f=0x1f4;_0x4d9984[_0x0ef6('0x1c')](_0x8a7a0f)[_0x0ef6('0x2c')]({'message':_0x0ef6('0x78'),'statusCode':0x190});}});}; \ No newline at end of file diff --git a/server/api/intSugarcrmAccount/intSugarcrmAccount.model.js b/server/api/intSugarcrmAccount/intSugarcrmAccount.model.js index 0bb99ad..f3dc1b5 100644 --- a/server/api/intSugarcrmAccount/intSugarcrmAccount.model.js +++ b/server/api/intSugarcrmAccount/intSugarcrmAccount.model.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xdec0=['int_sugarcrm_accounts','lodash','../../config/logger','api','moment','bluebird','request-promise','rimraf','./intSugarcrmAccount.attributes','../../components/integrations/configuration'];(function(_0x52d835,_0x17e8c5){var _0x51ac58=function(_0x46db25){while(--_0x46db25){_0x52d835['push'](_0x52d835['shift']());}};_0x51ac58(++_0x17e8c5);}(_0xdec0,0xab));var _0x0dec=function(_0xc36d01,_0x3bf1a6){_0xc36d01=_0xc36d01-0x0;var _0xecb231=_0xdec0[_0xc36d01];return _0xecb231;};'use strict';var _=require(_0x0dec('0x0'));var util=require('util');var logger=require(_0x0dec('0x1'))(_0x0dec('0x2'));var moment=require(_0x0dec('0x3'));var BPromise=require(_0x0dec('0x4'));var rp=require(_0x0dec('0x5'));var fs=require('fs');var path=require('path');var rimraf=require(_0x0dec('0x6'));var config=require('../../config/environment');var attributes=require(_0x0dec('0x7'));var integrations=require(_0x0dec('0x8'));module['exports']=function(_0x79bd2e,_0x492989){return _0x79bd2e['define']('SugarcrmAccount',attributes,{'tableName':_0x0dec('0x9'),'paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file +var _0x52c4=['int_sugarcrm_accounts','lodash','util','../../config/logger','api','moment','path','rimraf','../../config/environment','../../components/integrations/configuration','exports','SugarcrmAccount'];(function(_0x105760,_0x4c2c93){var _0x3a8477=function(_0xe5d355){while(--_0xe5d355){_0x105760['push'](_0x105760['shift']());}};_0x3a8477(++_0x4c2c93);}(_0x52c4,0x1b1));var _0x452c=function(_0x26a026,_0x2b5b07){_0x26a026=_0x26a026-0x0;var _0x2ff357=_0x52c4[_0x26a026];return _0x2ff357;};'use strict';var _=require(_0x452c('0x0'));var util=require(_0x452c('0x1'));var logger=require(_0x452c('0x2'))(_0x452c('0x3'));var moment=require(_0x452c('0x4'));var BPromise=require('bluebird');var rp=require('request-promise');var fs=require('fs');var path=require(_0x452c('0x5'));var rimraf=require(_0x452c('0x6'));var config=require(_0x452c('0x7'));var attributes=require('./intSugarcrmAccount.attributes');var integrations=require(_0x452c('0x8'));module[_0x452c('0x9')]=function(_0x50aa40,_0x3b4519){return _0x50aa40['define'](_0x452c('0xa'),attributes,{'tableName':_0x452c('0xb'),'paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file diff --git a/server/api/intSugarcrmAccount/intSugarcrmAccount.rpc.js b/server/api/intSugarcrmAccount/intSugarcrmAccount.rpc.js index e87a070..995eb9f 100644 --- a/server/api/intSugarcrmAccount/intSugarcrmAccount.rpc.js +++ b/server/api/intSugarcrmAccount/intSugarcrmAccount.rpc.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x3a0f=['request','then','info','request\x20sent','debug','SugarcrmAccount,\x20%s,\x20%s,\x20%s','stringify','error','code','SugarcrmAccount,\x20%s,\x20%s','message','result','GetSugarcrmAccount','SugarcrmAccount','findAll','options','raw','where','attributes','include','map','model','ShowSugarcrmAccount','find','catch','lodash','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','../../config/environment','client','http'];(function(_0x184e30,_0xe43397){var _0x3ec719=function(_0x231faf){while(--_0x231faf){_0x184e30['push'](_0x184e30['shift']());}};_0x3ec719(++_0xe43397);}(_0x3a0f,0x18b));var _0xf3a0=function(_0x57b51a,_0x4dbf1d){_0x57b51a=_0x57b51a-0x0;var _0x4ee69e=_0x3a0f[_0x57b51a];return _0x4ee69e;};'use strict';var _=require(_0xf3a0('0x0'));var util=require(_0xf3a0('0x1'));var moment=require(_0xf3a0('0x2'));var BPromise=require(_0xf3a0('0x3'));var rs=require(_0xf3a0('0x4'));var fs=require('fs');var Redis=require(_0xf3a0('0x5'));var db=require(_0xf3a0('0x6'))['db'];var utils=require(_0xf3a0('0x7'));var logger=require(_0xf3a0('0x8'))('rpc');var config=require(_0xf3a0('0x9'));var jayson=require('jayson/promise');var client=jayson[_0xf3a0('0xa')][_0xf3a0('0xb')]({'port':0x232a});function respondWithRpcPromise(_0xfbe2a0,_0x2de8f1,_0x315717){return new BPromise(function(_0x268b40,_0x4d575d){return client[_0xf3a0('0xc')](_0xfbe2a0,_0x315717)[_0xf3a0('0xd')](function(_0x236619){logger[_0xf3a0('0xe')]('SugarcrmAccount,\x20%s,\x20%s',_0x2de8f1,_0xf3a0('0xf'));logger[_0xf3a0('0x10')](_0xf3a0('0x11'),_0x2de8f1,'request\x20sent',JSON[_0xf3a0('0x12')](_0x236619));if(_0x236619[_0xf3a0('0x13')]){if(_0x236619[_0xf3a0('0x13')][_0xf3a0('0x14')]===0x1f4){logger['error'](_0xf3a0('0x15'),_0x2de8f1,_0x236619[_0xf3a0('0x13')][_0xf3a0('0x16')]);return _0x4d575d(_0x236619['error'][_0xf3a0('0x16')]);}logger[_0xf3a0('0x13')](_0xf3a0('0x15'),_0x2de8f1,_0x236619[_0xf3a0('0x13')][_0xf3a0('0x16')]);return _0x268b40(_0x236619['error'][_0xf3a0('0x16')]);}else{logger['info'](_0xf3a0('0x15'),_0x2de8f1,_0xf3a0('0xf'));_0x268b40(_0x236619[_0xf3a0('0x17')]['message']);}})['catch'](function(_0xd3c163){logger['error'](_0xf3a0('0x15'),_0x2de8f1,_0xd3c163);_0x4d575d(_0xd3c163);});});}exports[_0xf3a0('0x18')]=function(_0x2b5920){var _0x4562dd=this;return new Promise(function(_0x435d0d,_0x13c454){return db[_0xf3a0('0x19')][_0xf3a0('0x1a')]({'raw':_0x2b5920[_0xf3a0('0x1b')]?_0x2b5920[_0xf3a0('0x1b')][_0xf3a0('0x1c')]===undefined?!![]:![]:!![],'where':_0x2b5920['options']?_0x2b5920[_0xf3a0('0x1b')][_0xf3a0('0x1d')]||null:null,'attributes':_0x2b5920[_0xf3a0('0x1b')]?_0x2b5920[_0xf3a0('0x1b')][_0xf3a0('0x1e')]||null:null,'limit':_0x2b5920[_0xf3a0('0x1b')]?_0x2b5920[_0xf3a0('0x1b')]['limit']||null:null,'include':_0x2b5920[_0xf3a0('0x1b')]?_0x2b5920[_0xf3a0('0x1b')][_0xf3a0('0x1f')]?_[_0xf3a0('0x20')](_0x2b5920[_0xf3a0('0x1b')]['include'],function(_0x13e037){return{'model':db[_0x13e037[_0xf3a0('0x21')]],'as':_0x13e037['as'],'attributes':_0x13e037[_0xf3a0('0x1e')],'include':_0x13e037[_0xf3a0('0x1f')]?_[_0xf3a0('0x20')](_0x13e037[_0xf3a0('0x1f')],function(_0x4eb6d9){return{'model':db[_0x4eb6d9[_0xf3a0('0x21')]],'as':_0x4eb6d9['as'],'attributes':_0x4eb6d9[_0xf3a0('0x1e')],'include':_0x4eb6d9[_0xf3a0('0x1f')]?_[_0xf3a0('0x20')](_0x4eb6d9['include'],function(_0x25aa78){return{'model':db[_0x25aa78['model']],'as':_0x25aa78['as'],'attributes':_0x25aa78[_0xf3a0('0x1e')]};}):[]};}):[]};}):[]:[]})[_0xf3a0('0xd')](function(_0x3049ab){logger[_0xf3a0('0xe')](_0xf3a0('0x18'),_0x2b5920);logger['debug'](_0xf3a0('0x18'),_0x2b5920,JSON[_0xf3a0('0x12')](_0x3049ab));_0x435d0d(_0x3049ab);})['catch'](function(_0x33e245){logger[_0xf3a0('0x13')](_0xf3a0('0x18'),_0x33e245[_0xf3a0('0x16')],_0x2b5920);_0x13c454(_0x4562dd[_0xf3a0('0x13')](0x1f4,_0x33e245[_0xf3a0('0x16')]));});});};exports[_0xf3a0('0x22')]=function(_0x45202a){var _0x9d9343=this;return new Promise(function(_0x223635,_0x45b47d){return db[_0xf3a0('0x19')][_0xf3a0('0x23')]({'raw':_0x45202a[_0xf3a0('0x1b')]?_0x45202a[_0xf3a0('0x1b')][_0xf3a0('0x1c')]===undefined?!![]:![]:!![],'where':_0x45202a['options']?_0x45202a[_0xf3a0('0x1b')][_0xf3a0('0x1d')]||null:null,'attributes':_0x45202a['options']?_0x45202a[_0xf3a0('0x1b')][_0xf3a0('0x1e')]||null:null,'include':_0x45202a['options']?_0x45202a[_0xf3a0('0x1b')][_0xf3a0('0x1f')]?_['map'](_0x45202a[_0xf3a0('0x1b')]['include'],function(_0x2f32b3){return{'model':db[_0x2f32b3[_0xf3a0('0x21')]],'as':_0x2f32b3['as'],'attributes':_0x2f32b3['attributes'],'include':_0x2f32b3[_0xf3a0('0x1f')]?_['map'](_0x2f32b3[_0xf3a0('0x1f')],function(_0x426e42){return{'model':db[_0x426e42['model']],'as':_0x426e42['as'],'attributes':_0x426e42[_0xf3a0('0x1e')],'include':_0x426e42[_0xf3a0('0x1f')]?_['map'](_0x426e42[_0xf3a0('0x1f')],function(_0x3e0e02){return{'model':db[_0x3e0e02[_0xf3a0('0x21')]],'as':_0x3e0e02['as'],'attributes':_0x3e0e02['attributes']};}):[]};}):[]};}):[]:[]})[_0xf3a0('0xd')](function(_0x1936d3){logger['info'](_0xf3a0('0x22'),_0x45202a);logger[_0xf3a0('0x10')]('ShowSugarcrmAccount',_0x45202a,JSON[_0xf3a0('0x12')](_0x1936d3));_0x223635(_0x1936d3);})[_0xf3a0('0x24')](function(_0x3bf022){logger['error'](_0xf3a0('0x22'),_0x3bf022[_0xf3a0('0x16')],_0x45202a);_0x45b47d(_0x9d9343[_0xf3a0('0x13')](0x1f4,_0x3bf022[_0xf3a0('0x16')]));});});}; \ No newline at end of file +var _0x0f56=['rpc','client','http','request','then','info','request\x20sent','debug','stringify','error','SugarcrmAccount,\x20%s,\x20%s','message','result','catch','SugarcrmAccount','findAll','raw','options','attributes','model','map','include','GetSugarcrmAccount','ShowSugarcrmAccount','find','lodash','util','moment','bluebird','randomstring','ioredis','../../config/utils','../../config/logger'];(function(_0x27ef43,_0x2643a6){var _0x14e648=function(_0x53cae5){while(--_0x53cae5){_0x27ef43['push'](_0x27ef43['shift']());}};_0x14e648(++_0x2643a6);}(_0x0f56,0x121));var _0x60f5=function(_0x4bc3db,_0x40c671){_0x4bc3db=_0x4bc3db-0x0;var _0x20d44e=_0x0f56[_0x4bc3db];return _0x20d44e;};'use strict';var _=require(_0x60f5('0x0'));var util=require(_0x60f5('0x1'));var moment=require(_0x60f5('0x2'));var BPromise=require(_0x60f5('0x3'));var rs=require(_0x60f5('0x4'));var fs=require('fs');var Redis=require(_0x60f5('0x5'));var db=require('../../mysqldb')['db'];var utils=require(_0x60f5('0x6'));var logger=require(_0x60f5('0x7'))(_0x60f5('0x8'));var config=require('../../config/environment');var jayson=require('jayson/promise');var client=jayson[_0x60f5('0x9')][_0x60f5('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x2d65c7,_0x29b9b9,_0xedea32){return new BPromise(function(_0x27f678,_0x5ece8f){return client[_0x60f5('0xb')](_0x2d65c7,_0xedea32)[_0x60f5('0xc')](function(_0x2515fa){logger[_0x60f5('0xd')]('SugarcrmAccount,\x20%s,\x20%s',_0x29b9b9,_0x60f5('0xe'));logger[_0x60f5('0xf')]('SugarcrmAccount,\x20%s,\x20%s,\x20%s',_0x29b9b9,'request\x20sent',JSON[_0x60f5('0x10')](_0x2515fa));if(_0x2515fa[_0x60f5('0x11')]){if(_0x2515fa['error']['code']===0x1f4){logger[_0x60f5('0x11')](_0x60f5('0x12'),_0x29b9b9,_0x2515fa[_0x60f5('0x11')][_0x60f5('0x13')]);return _0x5ece8f(_0x2515fa[_0x60f5('0x11')][_0x60f5('0x13')]);}logger[_0x60f5('0x11')](_0x60f5('0x12'),_0x29b9b9,_0x2515fa[_0x60f5('0x11')][_0x60f5('0x13')]);return _0x27f678(_0x2515fa['error'][_0x60f5('0x13')]);}else{logger[_0x60f5('0xd')]('SugarcrmAccount,\x20%s,\x20%s',_0x29b9b9,_0x60f5('0xe'));_0x27f678(_0x2515fa[_0x60f5('0x14')][_0x60f5('0x13')]);}})[_0x60f5('0x15')](function(_0x35bee4){logger[_0x60f5('0x11')](_0x60f5('0x12'),_0x29b9b9,_0x35bee4);_0x5ece8f(_0x35bee4);});});}exports['GetSugarcrmAccount']=function(_0x440d1a){var _0x1506a6=this;return new Promise(function(_0x384e79,_0x606921){return db[_0x60f5('0x16')][_0x60f5('0x17')]({'raw':_0x440d1a['options']?_0x440d1a['options'][_0x60f5('0x18')]===undefined?!![]:![]:!![],'where':_0x440d1a[_0x60f5('0x19')]?_0x440d1a[_0x60f5('0x19')]['where']||null:null,'attributes':_0x440d1a['options']?_0x440d1a[_0x60f5('0x19')][_0x60f5('0x1a')]||null:null,'limit':_0x440d1a[_0x60f5('0x19')]?_0x440d1a['options']['limit']||null:null,'include':_0x440d1a[_0x60f5('0x19')]?_0x440d1a['options']['include']?_['map'](_0x440d1a[_0x60f5('0x19')]['include'],function(_0xb01e4a){return{'model':db[_0xb01e4a[_0x60f5('0x1b')]],'as':_0xb01e4a['as'],'attributes':_0xb01e4a[_0x60f5('0x1a')],'include':_0xb01e4a['include']?_[_0x60f5('0x1c')](_0xb01e4a[_0x60f5('0x1d')],function(_0x2cf6de){return{'model':db[_0x2cf6de[_0x60f5('0x1b')]],'as':_0x2cf6de['as'],'attributes':_0x2cf6de[_0x60f5('0x1a')],'include':_0x2cf6de['include']?_[_0x60f5('0x1c')](_0x2cf6de['include'],function(_0x57c621){return{'model':db[_0x57c621[_0x60f5('0x1b')]],'as':_0x57c621['as'],'attributes':_0x57c621[_0x60f5('0x1a')]};}):[]};}):[]};}):[]:[]})[_0x60f5('0xc')](function(_0x4beced){logger[_0x60f5('0xd')]('GetSugarcrmAccount',_0x440d1a);logger[_0x60f5('0xf')](_0x60f5('0x1e'),_0x440d1a,JSON[_0x60f5('0x10')](_0x4beced));_0x384e79(_0x4beced);})[_0x60f5('0x15')](function(_0x2b5235){logger[_0x60f5('0x11')](_0x60f5('0x1e'),_0x2b5235[_0x60f5('0x13')],_0x440d1a);_0x606921(_0x1506a6[_0x60f5('0x11')](0x1f4,_0x2b5235[_0x60f5('0x13')]));});});};exports[_0x60f5('0x1f')]=function(_0x4359a2){var _0x884e03=this;return new Promise(function(_0x32f800,_0x36d6d0){return db[_0x60f5('0x16')][_0x60f5('0x20')]({'raw':_0x4359a2[_0x60f5('0x19')]?_0x4359a2[_0x60f5('0x19')]['raw']===undefined?!![]:![]:!![],'where':_0x4359a2[_0x60f5('0x19')]?_0x4359a2[_0x60f5('0x19')]['where']||null:null,'attributes':_0x4359a2[_0x60f5('0x19')]?_0x4359a2[_0x60f5('0x19')][_0x60f5('0x1a')]||null:null,'include':_0x4359a2[_0x60f5('0x19')]?_0x4359a2[_0x60f5('0x19')][_0x60f5('0x1d')]?_['map'](_0x4359a2[_0x60f5('0x19')]['include'],function(_0x4f38f3){return{'model':db[_0x4f38f3['model']],'as':_0x4f38f3['as'],'attributes':_0x4f38f3['attributes'],'include':_0x4f38f3['include']?_['map'](_0x4f38f3['include'],function(_0x16ddbd){return{'model':db[_0x16ddbd[_0x60f5('0x1b')]],'as':_0x16ddbd['as'],'attributes':_0x16ddbd['attributes'],'include':_0x16ddbd['include']?_[_0x60f5('0x1c')](_0x16ddbd['include'],function(_0x5b5e22){return{'model':db[_0x5b5e22[_0x60f5('0x1b')]],'as':_0x5b5e22['as'],'attributes':_0x5b5e22[_0x60f5('0x1a')]};}):[]};}):[]};}):[]:[]})['then'](function(_0x4f8822){logger[_0x60f5('0xd')](_0x60f5('0x1f'),_0x4359a2);logger['debug']('ShowSugarcrmAccount',_0x4359a2,JSON['stringify'](_0x4f8822));_0x32f800(_0x4f8822);})[_0x60f5('0x15')](function(_0x595267){logger[_0x60f5('0x11')](_0x60f5('0x1f'),_0x595267[_0x60f5('0x13')],_0x4359a2);_0x36d6d0(_0x884e03[_0x60f5('0x11')](0x1f4,_0x595267[_0x60f5('0x13')]));});});}; \ No newline at end of file diff --git a/server/api/intSugarcrmConfiguration/index.js b/server/api/intSugarcrmConfiguration/index.js index 0b8360f..8f54f41 100644 --- a/server/api/intSugarcrmConfiguration/index.js +++ b/server/api/intSugarcrmConfiguration/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x518a=['post','put','update','delete','destroy','exports','util','path','connect-timeout','express','Router','fs-extra','../../components/interaction/service','./intSugarcrmConfiguration.controller','get','index','/:id','isAuthenticated','show','/:id/subjects','/:id/descriptions','getDescriptions'];(function(_0x1318ae,_0x1c3e9c){var _0x1b0b5a=function(_0x1be677){while(--_0x1be677){_0x1318ae['push'](_0x1318ae['shift']());}};_0x1b0b5a(++_0x1c3e9c);}(_0x518a,0x10e));var _0xa518=function(_0x8dd85f,_0x102a4c){_0x8dd85f=_0x8dd85f-0x0;var _0x5d55ee=_0x518a[_0x8dd85f];return _0x5d55ee;};'use strict';var multer=require('multer');var util=require(_0xa518('0x0'));var path=require(_0xa518('0x1'));var timeout=require(_0xa518('0x2'));var express=require(_0xa518('0x3'));var router=express[_0xa518('0x4')]();var fs_extra=require(_0xa518('0x5'));var auth=require('../../components/auth/service');var interaction=require(_0xa518('0x6'));var config=require('../../config/environment');var controller=require(_0xa518('0x7'));router[_0xa518('0x8')]('/',auth['isAuthenticated'](),controller[_0xa518('0x9')]);router['get'](_0xa518('0xa'),auth[_0xa518('0xb')](),controller[_0xa518('0xc')]);router[_0xa518('0x8')]('/:id/fields',auth[_0xa518('0xb')](),controller['getFields']);router['get'](_0xa518('0xd'),auth[_0xa518('0xb')](),controller['getSubjects']);router[_0xa518('0x8')](_0xa518('0xe'),auth[_0xa518('0xb')](),controller[_0xa518('0xf')]);router[_0xa518('0x10')]('/',auth[_0xa518('0xb')](),controller['create']);router[_0xa518('0x11')](_0xa518('0xa'),auth[_0xa518('0xb')](),controller[_0xa518('0x12')]);router[_0xa518('0x13')](_0xa518('0xa'),auth[_0xa518('0xb')](),controller[_0xa518('0x14')]);module[_0xa518('0x15')]=router; \ No newline at end of file +var _0x4bc0=['../../components/interaction/service','../../config/environment','./intSugarcrmConfiguration.controller','get','isAuthenticated','index','/:id','show','getFields','/:id/subjects','getSubjects','/:id/descriptions','create','update','delete','destroy','multer','util','path','express','Router','fs-extra','../../components/auth/service'];(function(_0x2bce42,_0xd429b9){var _0x158ade=function(_0x5057b1){while(--_0x5057b1){_0x2bce42['push'](_0x2bce42['shift']());}};_0x158ade(++_0xd429b9);}(_0x4bc0,0x13b));var _0x04bc=function(_0x2b1029,_0x19920a){_0x2b1029=_0x2b1029-0x0;var _0x1ae1b9=_0x4bc0[_0x2b1029];return _0x1ae1b9;};'use strict';var multer=require(_0x04bc('0x0'));var util=require(_0x04bc('0x1'));var path=require(_0x04bc('0x2'));var timeout=require('connect-timeout');var express=require(_0x04bc('0x3'));var router=express[_0x04bc('0x4')]();var fs_extra=require(_0x04bc('0x5'));var auth=require(_0x04bc('0x6'));var interaction=require(_0x04bc('0x7'));var config=require(_0x04bc('0x8'));var controller=require(_0x04bc('0x9'));router[_0x04bc('0xa')]('/',auth[_0x04bc('0xb')](),controller[_0x04bc('0xc')]);router[_0x04bc('0xa')](_0x04bc('0xd'),auth[_0x04bc('0xb')](),controller[_0x04bc('0xe')]);router[_0x04bc('0xa')]('/:id/fields',auth[_0x04bc('0xb')](),controller[_0x04bc('0xf')]);router['get'](_0x04bc('0x10'),auth[_0x04bc('0xb')](),controller[_0x04bc('0x11')]);router[_0x04bc('0xa')](_0x04bc('0x12'),auth['isAuthenticated'](),controller['getDescriptions']);router['post']('/',auth[_0x04bc('0xb')](),controller[_0x04bc('0x13')]);router['put']('/:id',auth[_0x04bc('0xb')](),controller[_0x04bc('0x14')]);router[_0x04bc('0x15')](_0x04bc('0xd'),auth['isAuthenticated'](),controller[_0x04bc('0x16')]);module['exports']=router; \ No newline at end of file diff --git a/server/api/intSugarcrmConfiguration/intSugarcrmConfiguration.attributes.js b/server/api/intSugarcrmConfiguration/intSugarcrmConfiguration.attributes.js index b72bbfe..499bf02 100644 --- a/server/api/intSugarcrmConfiguration/intSugarcrmConfiguration.attributes.js +++ b/server/api/intSugarcrmConfiguration/intSugarcrmConfiguration.attributes.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x50f6=['STRING','sequelize','exports'];(function(_0x15a97d,_0x14416a){var _0x316148=function(_0x5a7a99){while(--_0x5a7a99){_0x15a97d['push'](_0x15a97d['shift']());}};_0x316148(++_0x14416a);}(_0x50f6,0x106));var _0x650f=function(_0x240700,_0x13e7d9){_0x240700=_0x240700-0x0;var _0x51530c=_0x50f6[_0x240700];return _0x51530c;};'use strict';var Sequelize=require(_0x650f('0x0'));module[_0x650f('0x1')]={'name':{'type':Sequelize['STRING']},'description':{'type':Sequelize[_0x650f('0x2')]}}; \ No newline at end of file +var _0x45cc=['exports','STRING','sequelize'];(function(_0x592c8e,_0x4a9b9d){var _0x4ac1d9=function(_0x5e6306){while(--_0x5e6306){_0x592c8e['push'](_0x592c8e['shift']());}};_0x4ac1d9(++_0x4a9b9d);}(_0x45cc,0x83));var _0xc45c=function(_0x502773,_0xe55d92){_0x502773=_0x502773-0x0;var _0x568f34=_0x45cc[_0x502773];return _0x568f34;};'use strict';var Sequelize=require(_0xc45c('0x0'));module[_0xc45c('0x1')]={'name':{'type':Sequelize[_0xc45c('0x2')]},'description':{'type':Sequelize[_0xc45c('0x2')]}}; \ No newline at end of file diff --git a/server/api/intSugarcrmConfiguration/intSugarcrmConfiguration.controller.js b/server/api/intSugarcrmConfiguration/intSugarcrmConfiguration.controller.js index bc29e07..53ce458 100644 --- a/server/api/intSugarcrmConfiguration/intSugarcrmConfiguration.controller.js +++ b/server/api/intSugarcrmConfiguration/intSugarcrmConfiguration.controller.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x9edd=['rawAttributes','length','include','merge','find','create','body','getFields','findOne','SugarcrmField','nolimit','getSubjects','getDescriptions','eml-format','zip-dir','fast-json-patch','request-promise','bluebird','mustache','util','path','sox','to-csv','ejs','fs-extra','lodash','squel','desk.js','querystring','ioredis','../../components/parsers/advancedSearch','../../config/license/hardware','api','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','sendStatus','status','json','offset','undefined','limit','count','apply','reject','update','then','destroy','end','stack','name','index','map','SugarcrmConfiguration','fieldName','type','key','model','query','keys','intersection','attributes','fields','hasOwnProperty','order','sort','where','pick','filters','filter','VIRTUAL','options','includeAll','findAll','rows','catch','show','params'];(function(_0x4a0208,_0x86d6e9){var _0x8ea293=function(_0x57fd2b){while(--_0x57fd2b){_0x4a0208['push'](_0x4a0208['shift']());}};_0x8ea293(++_0x86d6e9);}(_0x9edd,0xab));var _0xd9ed=function(_0x5687c7,_0x1a21d5){_0x5687c7=_0x5687c7-0x0;var _0x14c024=_0x9edd[_0x5687c7];return _0x14c024;};'use strict';var emlformat=require(_0xd9ed('0x0'));var rimraf=require('rimraf');var zipdir=require(_0xd9ed('0x1'));var jsonpatch=require(_0xd9ed('0x2'));var rp=require(_0xd9ed('0x3'));var moment=require('moment');var BPromise=require(_0xd9ed('0x4'));var Mustache=require(_0xd9ed('0x5'));var util=require(_0xd9ed('0x6'));var path=require(_0xd9ed('0x7'));var sox=require(_0xd9ed('0x8'));var csv=require(_0xd9ed('0x9'));var ejs=require(_0xd9ed('0xa'));var fs=require('fs');var fs_extra=require(_0xd9ed('0xb'));var _=require(_0xd9ed('0xc'));var squel=require(_0xd9ed('0xd'));var crypto=require('crypto');var jsforce=require('jsforce');var deskjs=require(_0xd9ed('0xe'));var toCsv=require(_0xd9ed('0x9'));var querystring=require(_0xd9ed('0xf'));var Papa=require('papaparse');var Redis=require(_0xd9ed('0x10'));var authService=require('../../components/auth/service');var qs=require('../../components/parsers/qs');var as=require(_0xd9ed('0x11'));var hardwareService=require(_0xd9ed('0x12'));var logger=require('../../config/logger')(_0xd9ed('0x13'));var utils=require(_0xd9ed('0x14'));var config=require(_0xd9ed('0x15'));var licenseUtil=require(_0xd9ed('0x16'));var db=require(_0xd9ed('0x17'))['db'];function respondWithStatusCode(_0x30eda6,_0x5e54b9){_0x5e54b9=_0x5e54b9||0xcc;return function(_0x457ea2){if(_0x457ea2){return _0x30eda6[_0xd9ed('0x18')](_0x5e54b9);}return _0x30eda6['status'](_0x5e54b9)['end']();};}function respondWithResult(_0x5f09d2,_0x37a721){_0x37a721=_0x37a721||0xc8;return function(_0x954de9){if(_0x954de9){return _0x5f09d2[_0xd9ed('0x19')](_0x37a721)[_0xd9ed('0x1a')](_0x954de9);}};}function respondWithFilteredResult(_0x5b993e,_0x24048f){return function(_0x1bffa7){if(_0x1bffa7){var _0x2bffc5=typeof _0x24048f[_0xd9ed('0x1b')]===_0xd9ed('0x1c')&&typeof _0x24048f[_0xd9ed('0x1d')]===_0xd9ed('0x1c');var _0x507f58=_0x1bffa7[_0xd9ed('0x1e')];var _0x16a696=_0x2bffc5?0x0:_0x24048f[_0xd9ed('0x1b')];var _0x4f684b=_0x2bffc5?_0x1bffa7[_0xd9ed('0x1e')]:_0x24048f[_0xd9ed('0x1b')]+_0x24048f[_0xd9ed('0x1d')];var _0x2a35d6;if(_0x4f684b>=_0x507f58){_0x4f684b=_0x507f58;_0x2a35d6=0xc8;}else{_0x2a35d6=0xce;}_0x5b993e[_0xd9ed('0x19')](_0x2a35d6);return _0x5b993e['set']('Content-Range',_0x16a696+'-'+_0x4f684b+'/'+_0x507f58)['json'](_0x1bffa7);}return null;};}function patchUpdates(_0x5bc0ef){return function(_0x4cad4c){try{jsonpatch[_0xd9ed('0x1f')](_0x4cad4c,_0x5bc0ef,!![]);}catch(_0x10f8e1){return BPromise[_0xd9ed('0x20')](_0x10f8e1);}return _0x4cad4c['save']();};}function saveUpdates(_0x3224b9,_0x2ab88b){return function(_0x1341d9){if(_0x1341d9){return _0x1341d9[_0xd9ed('0x21')](_0x3224b9)[_0xd9ed('0x22')](function(_0x576aed){return _0x576aed;});}return null;};}function removeEntity(_0x715def,_0x446539){return function(_0x595011){if(_0x595011){return _0x595011[_0xd9ed('0x23')]()[_0xd9ed('0x22')](function(){_0x715def['status'](0xcc)[_0xd9ed('0x24')]();});}};}function handleEntityNotFound(_0x267859,_0x2d7abd){return function(_0x4bf75f){if(!_0x4bf75f){_0x267859[_0xd9ed('0x18')](0x194);}return _0x4bf75f;};}function handleError(_0x2dcb99,_0x347b2b){_0x347b2b=_0x347b2b||0x1f4;return function(_0x15eebf){logger['error'](_0x15eebf[_0xd9ed('0x25')]);if(_0x15eebf['name']){delete _0x15eebf[_0xd9ed('0x26')];}_0x2dcb99['status'](_0x347b2b)['send'](_0x15eebf);};}exports[_0xd9ed('0x27')]=function(_0x4346b9,_0x3a4fc9){var _0x2e8fb2={},_0x5b9f4e={},_0x53fdf7={'count':0x0,'rows':[]};var _0x151763=_[_0xd9ed('0x28')](db[_0xd9ed('0x29')]['rawAttributes'],function(_0x3b220e){return{'name':_0x3b220e[_0xd9ed('0x2a')],'type':_0x3b220e[_0xd9ed('0x2b')][_0xd9ed('0x2c')]};});_0x5b9f4e[_0xd9ed('0x2d')]=_[_0xd9ed('0x28')](_0x151763,_0xd9ed('0x26'));_0x5b9f4e[_0xd9ed('0x2e')]=_[_0xd9ed('0x2f')](_0x4346b9[_0xd9ed('0x2e')]);_0x5b9f4e['filters']=_[_0xd9ed('0x30')](_0x5b9f4e[_0xd9ed('0x2d')],_0x5b9f4e[_0xd9ed('0x2e')]);_0x2e8fb2[_0xd9ed('0x31')]=_['intersection'](_0x5b9f4e[_0xd9ed('0x2d')],qs[_0xd9ed('0x32')](_0x4346b9[_0xd9ed('0x2e')][_0xd9ed('0x32')]));_0x2e8fb2[_0xd9ed('0x31')]=_0x2e8fb2[_0xd9ed('0x31')]['length']?_0x2e8fb2['attributes']:_0x5b9f4e[_0xd9ed('0x2d')];if(!_0x4346b9['query'][_0xd9ed('0x33')]('nolimit')){_0x2e8fb2[_0xd9ed('0x1d')]=qs[_0xd9ed('0x1d')](_0x4346b9[_0xd9ed('0x2e')][_0xd9ed('0x1d')]);_0x2e8fb2[_0xd9ed('0x1b')]=qs[_0xd9ed('0x1b')](_0x4346b9[_0xd9ed('0x2e')][_0xd9ed('0x1b')]);}_0x2e8fb2[_0xd9ed('0x34')]=qs[_0xd9ed('0x35')](_0x4346b9['query']['sort']);_0x2e8fb2[_0xd9ed('0x36')]=qs['filters'](_[_0xd9ed('0x37')](_0x4346b9[_0xd9ed('0x2e')],_0x5b9f4e[_0xd9ed('0x38')]),_0x151763);if(_0x4346b9[_0xd9ed('0x2e')][_0xd9ed('0x39')]){_0x2e8fb2[_0xd9ed('0x36')]=_['merge'](_0x2e8fb2['where'],{'$or':_[_0xd9ed('0x28')](_0x151763,function(_0x52bf13){if(_0x52bf13[_0xd9ed('0x2b')]!==_0xd9ed('0x3a')){var _0x23c2f3={};_0x23c2f3[_0x52bf13['name']]={'$like':'%'+_0x4346b9[_0xd9ed('0x2e')][_0xd9ed('0x39')]+'%'};return _0x23c2f3;}})});}_0x2e8fb2=_['merge']({},_0x2e8fb2,_0x4346b9[_0xd9ed('0x3b')]);var _0x2fe47f={'where':_0x2e8fb2[_0xd9ed('0x36')]};return db[_0xd9ed('0x29')][_0xd9ed('0x1e')](_0x2fe47f)[_0xd9ed('0x22')](function(_0x254e2f){_0x53fdf7[_0xd9ed('0x1e')]=_0x254e2f;if(_0x4346b9[_0xd9ed('0x2e')][_0xd9ed('0x3c')]){_0x2e8fb2['include']=[{'all':!![]}];}return db[_0xd9ed('0x29')][_0xd9ed('0x3d')](_0x2e8fb2);})[_0xd9ed('0x22')](function(_0x5a2cdd){_0x53fdf7[_0xd9ed('0x3e')]=_0x5a2cdd;return _0x53fdf7;})[_0xd9ed('0x22')](respondWithFilteredResult(_0x3a4fc9,_0x2e8fb2))[_0xd9ed('0x3f')](handleError(_0x3a4fc9,null));};exports[_0xd9ed('0x40')]=function(_0x256eb1,_0x38c8f7){var _0x57f984={'raw':![],'where':{'id':_0x256eb1[_0xd9ed('0x41')]['id']}},_0x3a9fbc={};_0x3a9fbc[_0xd9ed('0x2d')]=_[_0xd9ed('0x2f')](db[_0xd9ed('0x29')][_0xd9ed('0x42')]);_0x3a9fbc[_0xd9ed('0x2e')]=_[_0xd9ed('0x2f')](_0x256eb1[_0xd9ed('0x2e')]);_0x3a9fbc[_0xd9ed('0x38')]=_['intersection'](_0x3a9fbc[_0xd9ed('0x2d')],_0x3a9fbc[_0xd9ed('0x2e')]);_0x57f984[_0xd9ed('0x31')]=_[_0xd9ed('0x30')](_0x3a9fbc[_0xd9ed('0x2d')],qs['fields'](_0x256eb1[_0xd9ed('0x2e')][_0xd9ed('0x32')]));_0x57f984[_0xd9ed('0x31')]=_0x57f984[_0xd9ed('0x31')][_0xd9ed('0x43')]?_0x57f984[_0xd9ed('0x31')]:_0x3a9fbc['model'];if(_0x256eb1[_0xd9ed('0x2e')][_0xd9ed('0x3c')]){_0x57f984[_0xd9ed('0x44')]=[{'all':!![]}];}_0x57f984=_[_0xd9ed('0x45')]({},_0x57f984,_0x256eb1[_0xd9ed('0x3b')]);return db[_0xd9ed('0x29')][_0xd9ed('0x46')](_0x57f984)[_0xd9ed('0x22')](handleEntityNotFound(_0x38c8f7,null))[_0xd9ed('0x22')](respondWithResult(_0x38c8f7,null))['catch'](handleError(_0x38c8f7,null));};exports[_0xd9ed('0x47')]=function(_0x2c3d5e,_0x3da5cf){return db[_0xd9ed('0x29')][_0xd9ed('0x47')](_0x2c3d5e[_0xd9ed('0x48')],{})[_0xd9ed('0x22')](respondWithResult(_0x3da5cf,0xc9))[_0xd9ed('0x3f')](handleError(_0x3da5cf,null));};exports[_0xd9ed('0x21')]=function(_0x7140c2,_0x118a8f){if(_0x7140c2[_0xd9ed('0x48')]['id']){delete _0x7140c2[_0xd9ed('0x48')]['id'];}return db['SugarcrmConfiguration']['find']({'where':{'id':_0x7140c2['params']['id']}})[_0xd9ed('0x22')](handleEntityNotFound(_0x118a8f,null))[_0xd9ed('0x22')](saveUpdates(_0x7140c2[_0xd9ed('0x48')],null))[_0xd9ed('0x22')](respondWithResult(_0x118a8f,null))[_0xd9ed('0x3f')](handleError(_0x118a8f,null));};exports[_0xd9ed('0x23')]=function(_0x3bb724,_0x8767d9){return db[_0xd9ed('0x29')][_0xd9ed('0x46')]({'where':{'id':_0x3bb724[_0xd9ed('0x41')]['id']}})['then'](handleEntityNotFound(_0x8767d9,null))[_0xd9ed('0x22')](removeEntity(_0x8767d9,null))['catch'](handleError(_0x8767d9,null));};exports[_0xd9ed('0x49')]=function(_0x199d46,_0x31d0d3,_0x373317){var _0x58d55b={};var _0x18b97a={};var _0x7aafc1;var _0x486a7f;return db[_0xd9ed('0x29')][_0xd9ed('0x4a')]({'where':{'id':_0x199d46['params']['id']}})[_0xd9ed('0x22')](handleEntityNotFound(_0x31d0d3,null))[_0xd9ed('0x22')](function(_0x2b3614){if(_0x2b3614){_0x7aafc1=_0x2b3614;_0x18b97a[_0xd9ed('0x2d')]=_[_0xd9ed('0x2f')](db[_0xd9ed('0x4b')][_0xd9ed('0x42')]);_0x18b97a['query']=_[_0xd9ed('0x2f')](_0x199d46[_0xd9ed('0x2e')]);_0x18b97a[_0xd9ed('0x38')]=_[_0xd9ed('0x30')](_0x18b97a['model'],_0x18b97a[_0xd9ed('0x2e')]);_0x58d55b['attributes']=_[_0xd9ed('0x30')](_0x18b97a['model'],qs['fields'](_0x199d46[_0xd9ed('0x2e')][_0xd9ed('0x32')]));_0x58d55b[_0xd9ed('0x31')]=_0x58d55b[_0xd9ed('0x31')][_0xd9ed('0x43')]?_0x58d55b[_0xd9ed('0x31')]:_0x18b97a['model'];_0x58d55b['order']=qs[_0xd9ed('0x35')](_0x199d46[_0xd9ed('0x2e')][_0xd9ed('0x35')]);_0x58d55b[_0xd9ed('0x36')]=qs[_0xd9ed('0x38')](_[_0xd9ed('0x37')](_0x199d46['query'],_0x18b97a[_0xd9ed('0x38')]));if(_0x199d46['query'][_0xd9ed('0x39')]){_0x58d55b[_0xd9ed('0x36')]=_[_0xd9ed('0x45')](_0x58d55b[_0xd9ed('0x36')],{'$or':_[_0xd9ed('0x28')](_0x58d55b[_0xd9ed('0x31')],function(_0x2874d9){var _0x5dbf43={};_0x5dbf43[_0x2874d9]={'$like':'%'+_0x199d46[_0xd9ed('0x2e')][_0xd9ed('0x39')]+'%'};return _0x5dbf43;})});}_0x58d55b=_[_0xd9ed('0x45')]({},_0x58d55b,_0x199d46[_0xd9ed('0x3b')]);return _0x7aafc1['getFields'](_0x58d55b);}})[_0xd9ed('0x22')](function(_0x38402f){if(_0x38402f){_0x486a7f=_0x38402f['length'];if(!_0x199d46[_0xd9ed('0x2e')]['hasOwnProperty'](_0xd9ed('0x4c'))){_0x58d55b['limit']=qs['limit'](_0x199d46[_0xd9ed('0x2e')]['limit']);_0x58d55b[_0xd9ed('0x1b')]=qs[_0xd9ed('0x1b')](_0x199d46[_0xd9ed('0x2e')]['offset']);}return _0x7aafc1[_0xd9ed('0x49')](_0x58d55b);}})[_0xd9ed('0x22')](function(_0x1c4db5){if(_0x1c4db5){return _0x1c4db5?{'count':_0x486a7f,'rows':_0x1c4db5}:null;}})[_0xd9ed('0x22')](respondWithResult(_0x31d0d3,null))[_0xd9ed('0x3f')](handleError(_0x31d0d3,null));};exports[_0xd9ed('0x4d')]=function(_0x2b87e6,_0x6593e3,_0x3473b0){var _0x16d1d5={};var _0x4658f9={};var _0x1bd6fc;var _0x4403b3;return db[_0xd9ed('0x29')][_0xd9ed('0x4a')]({'where':{'id':_0x2b87e6[_0xd9ed('0x41')]['id']}})[_0xd9ed('0x22')](handleEntityNotFound(_0x6593e3,null))['then'](function(_0x206cab){if(_0x206cab){_0x1bd6fc=_0x206cab;_0x4658f9[_0xd9ed('0x2d')]=_[_0xd9ed('0x2f')](db[_0xd9ed('0x4b')][_0xd9ed('0x42')]);_0x4658f9[_0xd9ed('0x2e')]=_[_0xd9ed('0x2f')](_0x2b87e6[_0xd9ed('0x2e')]);_0x4658f9[_0xd9ed('0x38')]=_[_0xd9ed('0x30')](_0x4658f9[_0xd9ed('0x2d')],_0x4658f9[_0xd9ed('0x2e')]);_0x16d1d5[_0xd9ed('0x31')]=_[_0xd9ed('0x30')](_0x4658f9[_0xd9ed('0x2d')],qs[_0xd9ed('0x32')](_0x2b87e6[_0xd9ed('0x2e')][_0xd9ed('0x32')]));_0x16d1d5[_0xd9ed('0x31')]=_0x16d1d5[_0xd9ed('0x31')]['length']?_0x16d1d5[_0xd9ed('0x31')]:_0x4658f9[_0xd9ed('0x2d')];_0x16d1d5[_0xd9ed('0x34')]=qs[_0xd9ed('0x35')](_0x2b87e6[_0xd9ed('0x2e')][_0xd9ed('0x35')]);_0x16d1d5[_0xd9ed('0x36')]=qs['filters'](_[_0xd9ed('0x37')](_0x2b87e6[_0xd9ed('0x2e')],_0x4658f9[_0xd9ed('0x38')]));if(_0x2b87e6[_0xd9ed('0x2e')][_0xd9ed('0x39')]){_0x16d1d5[_0xd9ed('0x36')]=_[_0xd9ed('0x45')](_0x16d1d5[_0xd9ed('0x36')],{'$or':_[_0xd9ed('0x28')](_0x16d1d5[_0xd9ed('0x31')],function(_0x5e5498){var _0xe284cd={};_0xe284cd[_0x5e5498]={'$like':'%'+_0x2b87e6[_0xd9ed('0x2e')][_0xd9ed('0x39')]+'%'};return _0xe284cd;})});}_0x16d1d5=_[_0xd9ed('0x45')]({},_0x16d1d5,_0x2b87e6[_0xd9ed('0x3b')]);return _0x1bd6fc[_0xd9ed('0x4d')](_0x16d1d5);}})[_0xd9ed('0x22')](function(_0x45f0f1){if(_0x45f0f1){_0x4403b3=_0x45f0f1[_0xd9ed('0x43')];if(!_0x2b87e6[_0xd9ed('0x2e')][_0xd9ed('0x33')](_0xd9ed('0x4c'))){_0x16d1d5[_0xd9ed('0x1d')]=qs[_0xd9ed('0x1d')](_0x2b87e6[_0xd9ed('0x2e')][_0xd9ed('0x1d')]);_0x16d1d5[_0xd9ed('0x1b')]=qs['offset'](_0x2b87e6['query'][_0xd9ed('0x1b')]);}return _0x1bd6fc[_0xd9ed('0x4d')](_0x16d1d5);}})[_0xd9ed('0x22')](function(_0x1141e6){if(_0x1141e6){return _0x1141e6?{'count':_0x4403b3,'rows':_0x1141e6}:null;}})['then'](respondWithResult(_0x6593e3,null))[_0xd9ed('0x3f')](handleError(_0x6593e3,null));};exports[_0xd9ed('0x4e')]=function(_0x51700a,_0x292234,_0x35b13f){var _0x294cce={};var _0x43e1e8={};var _0x50ea86;var _0x734d1e;return db[_0xd9ed('0x29')][_0xd9ed('0x4a')]({'where':{'id':_0x51700a[_0xd9ed('0x41')]['id']}})[_0xd9ed('0x22')](handleEntityNotFound(_0x292234,null))[_0xd9ed('0x22')](function(_0x3e7a7b){if(_0x3e7a7b){_0x50ea86=_0x3e7a7b;_0x43e1e8[_0xd9ed('0x2d')]=_[_0xd9ed('0x2f')](db[_0xd9ed('0x4b')]['rawAttributes']);_0x43e1e8[_0xd9ed('0x2e')]=_[_0xd9ed('0x2f')](_0x51700a[_0xd9ed('0x2e')]);_0x43e1e8[_0xd9ed('0x38')]=_[_0xd9ed('0x30')](_0x43e1e8[_0xd9ed('0x2d')],_0x43e1e8[_0xd9ed('0x2e')]);_0x294cce['attributes']=_[_0xd9ed('0x30')](_0x43e1e8[_0xd9ed('0x2d')],qs[_0xd9ed('0x32')](_0x51700a[_0xd9ed('0x2e')]['fields']));_0x294cce[_0xd9ed('0x31')]=_0x294cce['attributes'][_0xd9ed('0x43')]?_0x294cce[_0xd9ed('0x31')]:_0x43e1e8[_0xd9ed('0x2d')];_0x294cce[_0xd9ed('0x34')]=qs['sort'](_0x51700a[_0xd9ed('0x2e')]['sort']);_0x294cce[_0xd9ed('0x36')]=qs[_0xd9ed('0x38')](_[_0xd9ed('0x37')](_0x51700a[_0xd9ed('0x2e')],_0x43e1e8['filters']));if(_0x51700a[_0xd9ed('0x2e')][_0xd9ed('0x39')]){_0x294cce['where']=_['merge'](_0x294cce[_0xd9ed('0x36')],{'$or':_['map'](_0x294cce[_0xd9ed('0x31')],function(_0x195369){var _0x4f648e={};_0x4f648e[_0x195369]={'$like':'%'+_0x51700a[_0xd9ed('0x2e')][_0xd9ed('0x39')]+'%'};return _0x4f648e;})});}_0x294cce=_[_0xd9ed('0x45')]({},_0x294cce,_0x51700a[_0xd9ed('0x3b')]);return _0x50ea86[_0xd9ed('0x4e')](_0x294cce);}})[_0xd9ed('0x22')](function(_0x954685){if(_0x954685){_0x734d1e=_0x954685[_0xd9ed('0x43')];if(!_0x51700a[_0xd9ed('0x2e')][_0xd9ed('0x33')](_0xd9ed('0x4c'))){_0x294cce[_0xd9ed('0x1d')]=qs[_0xd9ed('0x1d')](_0x51700a[_0xd9ed('0x2e')][_0xd9ed('0x1d')]);_0x294cce['offset']=qs[_0xd9ed('0x1b')](_0x51700a[_0xd9ed('0x2e')][_0xd9ed('0x1b')]);}return _0x50ea86['getDescriptions'](_0x294cce);}})['then'](function(_0x5e6a2d){if(_0x5e6a2d){return _0x5e6a2d?{'count':_0x734d1e,'rows':_0x5e6a2d}:null;}})['then'](respondWithResult(_0x292234,null))[_0xd9ed('0x3f')](handleError(_0x292234,null));}; \ No newline at end of file +var _0xd17e=['undefined','set','Content-Range','reject','update','then','error','stack','name','index','map','SugarcrmConfiguration','rawAttributes','fieldName','type','key','model','query','keys','filters','intersection','attributes','length','hasOwnProperty','nolimit','limit','order','sort','where','pick','merge','VIRTUAL','filter','options','count','findAll','rows','catch','show','params','fields','includeAll','include','body','find','destroy','getFields','findOne','SugarcrmField','getSubjects','getDescriptions','eml-format','rimraf','fast-json-patch','request-promise','moment','bluebird','mustache','util','path','ejs','fs-extra','lodash','squel','crypto','jsforce','desk.js','to-csv','querystring','papaparse','ioredis','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../config/license/util','sendStatus','status','end','json','offset'];(function(_0x4ac584,_0x137322){var _0x3b3b57=function(_0x45b4a1){while(--_0x45b4a1){_0x4ac584['push'](_0x4ac584['shift']());}};_0x3b3b57(++_0x137322);}(_0xd17e,0x1d2));var _0xed17=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0xd17e[_0x3dd15e];return _0x231fd0;};'use strict';var emlformat=require(_0xed17('0x0'));var rimraf=require(_0xed17('0x1'));var zipdir=require('zip-dir');var jsonpatch=require(_0xed17('0x2'));var rp=require(_0xed17('0x3'));var moment=require(_0xed17('0x4'));var BPromise=require(_0xed17('0x5'));var Mustache=require(_0xed17('0x6'));var util=require(_0xed17('0x7'));var path=require(_0xed17('0x8'));var sox=require('sox');var csv=require('to-csv');var ejs=require(_0xed17('0x9'));var fs=require('fs');var fs_extra=require(_0xed17('0xa'));var _=require(_0xed17('0xb'));var squel=require(_0xed17('0xc'));var crypto=require(_0xed17('0xd'));var jsforce=require(_0xed17('0xe'));var deskjs=require(_0xed17('0xf'));var toCsv=require(_0xed17('0x10'));var querystring=require(_0xed17('0x11'));var Papa=require(_0xed17('0x12'));var Redis=require(_0xed17('0x13'));var authService=require('../../components/auth/service');var qs=require('../../components/parsers/qs');var as=require(_0xed17('0x14'));var hardwareService=require(_0xed17('0x15'));var logger=require(_0xed17('0x16'))(_0xed17('0x17'));var utils=require(_0xed17('0x18'));var config=require(_0xed17('0x19'));var licenseUtil=require(_0xed17('0x1a'));var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0x2c27cb,_0x5f3deb){_0x5f3deb=_0x5f3deb||0xcc;return function(_0x30ca62){if(_0x30ca62){return _0x2c27cb[_0xed17('0x1b')](_0x5f3deb);}return _0x2c27cb[_0xed17('0x1c')](_0x5f3deb)[_0xed17('0x1d')]();};}function respondWithResult(_0x32bbc2,_0x45ae28){_0x45ae28=_0x45ae28||0xc8;return function(_0x16fd6b){if(_0x16fd6b){return _0x32bbc2['status'](_0x45ae28)[_0xed17('0x1e')](_0x16fd6b);}};}function respondWithFilteredResult(_0x3b2b01,_0x4ae1d5){return function(_0x512612){if(_0x512612){var _0x1ef419=typeof _0x4ae1d5[_0xed17('0x1f')]==='undefined'&&typeof _0x4ae1d5['limit']===_0xed17('0x20');var _0x52cd45=_0x512612['count'];var _0x285d20=_0x1ef419?0x0:_0x4ae1d5[_0xed17('0x1f')];var _0x22e5bc=_0x1ef419?_0x512612['count']:_0x4ae1d5[_0xed17('0x1f')]+_0x4ae1d5['limit'];var _0x56644c;if(_0x22e5bc>=_0x52cd45){_0x22e5bc=_0x52cd45;_0x56644c=0xc8;}else{_0x56644c=0xce;}_0x3b2b01['status'](_0x56644c);return _0x3b2b01[_0xed17('0x21')](_0xed17('0x22'),_0x285d20+'-'+_0x22e5bc+'/'+_0x52cd45)[_0xed17('0x1e')](_0x512612);}return null;};}function patchUpdates(_0xaa8418){return function(_0x33986f){try{jsonpatch['apply'](_0x33986f,_0xaa8418,!![]);}catch(_0x26f78c){return BPromise[_0xed17('0x23')](_0x26f78c);}return _0x33986f['save']();};}function saveUpdates(_0x3d539a,_0x41c729){return function(_0x3d501d){if(_0x3d501d){return _0x3d501d[_0xed17('0x24')](_0x3d539a)['then'](function(_0x4e1eb3){return _0x4e1eb3;});}return null;};}function removeEntity(_0x4b38ec,_0x586db1){return function(_0x5408f5){if(_0x5408f5){return _0x5408f5['destroy']()[_0xed17('0x25')](function(){_0x4b38ec['status'](0xcc)[_0xed17('0x1d')]();});}};}function handleEntityNotFound(_0x2ee6bf,_0x358c30){return function(_0x1cf61b){if(!_0x1cf61b){_0x2ee6bf[_0xed17('0x1b')](0x194);}return _0x1cf61b;};}function handleError(_0x5529e1,_0x32b1e4){_0x32b1e4=_0x32b1e4||0x1f4;return function(_0x10e0e1){logger[_0xed17('0x26')](_0x10e0e1[_0xed17('0x27')]);if(_0x10e0e1[_0xed17('0x28')]){delete _0x10e0e1[_0xed17('0x28')];}_0x5529e1[_0xed17('0x1c')](_0x32b1e4)['send'](_0x10e0e1);};}exports[_0xed17('0x29')]=function(_0x13ae9a,_0x19b2b2){var _0x5627af={},_0xae83b2={},_0x1500db={'count':0x0,'rows':[]};var _0x7f9564=_[_0xed17('0x2a')](db[_0xed17('0x2b')][_0xed17('0x2c')],function(_0x319b5f){return{'name':_0x319b5f[_0xed17('0x2d')],'type':_0x319b5f[_0xed17('0x2e')][_0xed17('0x2f')]};});_0xae83b2[_0xed17('0x30')]=_[_0xed17('0x2a')](_0x7f9564,_0xed17('0x28'));_0xae83b2[_0xed17('0x31')]=_[_0xed17('0x32')](_0x13ae9a['query']);_0xae83b2[_0xed17('0x33')]=_[_0xed17('0x34')](_0xae83b2[_0xed17('0x30')],_0xae83b2[_0xed17('0x31')]);_0x5627af[_0xed17('0x35')]=_['intersection'](_0xae83b2[_0xed17('0x30')],qs['fields'](_0x13ae9a[_0xed17('0x31')]['fields']));_0x5627af['attributes']=_0x5627af[_0xed17('0x35')][_0xed17('0x36')]?_0x5627af[_0xed17('0x35')]:_0xae83b2['model'];if(!_0x13ae9a[_0xed17('0x31')][_0xed17('0x37')](_0xed17('0x38'))){_0x5627af[_0xed17('0x39')]=qs[_0xed17('0x39')](_0x13ae9a[_0xed17('0x31')]['limit']);_0x5627af['offset']=qs[_0xed17('0x1f')](_0x13ae9a[_0xed17('0x31')][_0xed17('0x1f')]);}_0x5627af[_0xed17('0x3a')]=qs['sort'](_0x13ae9a[_0xed17('0x31')][_0xed17('0x3b')]);_0x5627af[_0xed17('0x3c')]=qs[_0xed17('0x33')](_[_0xed17('0x3d')](_0x13ae9a[_0xed17('0x31')],_0xae83b2[_0xed17('0x33')]),_0x7f9564);if(_0x13ae9a['query']['filter']){_0x5627af[_0xed17('0x3c')]=_[_0xed17('0x3e')](_0x5627af[_0xed17('0x3c')],{'$or':_[_0xed17('0x2a')](_0x7f9564,function(_0x321b31){if(_0x321b31[_0xed17('0x2e')]!==_0xed17('0x3f')){var _0x558194={};_0x558194[_0x321b31[_0xed17('0x28')]]={'$like':'%'+_0x13ae9a[_0xed17('0x31')][_0xed17('0x40')]+'%'};return _0x558194;}})});}_0x5627af=_['merge']({},_0x5627af,_0x13ae9a[_0xed17('0x41')]);var _0x259b15={'where':_0x5627af[_0xed17('0x3c')]};return db[_0xed17('0x2b')][_0xed17('0x42')](_0x259b15)[_0xed17('0x25')](function(_0x33d2a3){_0x1500db['count']=_0x33d2a3;if(_0x13ae9a[_0xed17('0x31')]['includeAll']){_0x5627af['include']=[{'all':!![]}];}return db[_0xed17('0x2b')][_0xed17('0x43')](_0x5627af);})[_0xed17('0x25')](function(_0x4d8c76){_0x1500db[_0xed17('0x44')]=_0x4d8c76;return _0x1500db;})['then'](respondWithFilteredResult(_0x19b2b2,_0x5627af))[_0xed17('0x45')](handleError(_0x19b2b2,null));};exports[_0xed17('0x46')]=function(_0x1d1990,_0x4c2a74){var _0x2f09be={'raw':![],'where':{'id':_0x1d1990[_0xed17('0x47')]['id']}},_0x5e7b3c={};_0x5e7b3c[_0xed17('0x30')]=_[_0xed17('0x32')](db[_0xed17('0x2b')]['rawAttributes']);_0x5e7b3c[_0xed17('0x31')]=_[_0xed17('0x32')](_0x1d1990[_0xed17('0x31')]);_0x5e7b3c[_0xed17('0x33')]=_['intersection'](_0x5e7b3c[_0xed17('0x30')],_0x5e7b3c[_0xed17('0x31')]);_0x2f09be[_0xed17('0x35')]=_['intersection'](_0x5e7b3c[_0xed17('0x30')],qs[_0xed17('0x48')](_0x1d1990['query'][_0xed17('0x48')]));_0x2f09be[_0xed17('0x35')]=_0x2f09be[_0xed17('0x35')][_0xed17('0x36')]?_0x2f09be[_0xed17('0x35')]:_0x5e7b3c[_0xed17('0x30')];if(_0x1d1990[_0xed17('0x31')][_0xed17('0x49')]){_0x2f09be[_0xed17('0x4a')]=[{'all':!![]}];}_0x2f09be=_['merge']({},_0x2f09be,_0x1d1990[_0xed17('0x41')]);return db[_0xed17('0x2b')]['find'](_0x2f09be)['then'](handleEntityNotFound(_0x4c2a74,null))['then'](respondWithResult(_0x4c2a74,null))[_0xed17('0x45')](handleError(_0x4c2a74,null));};exports['create']=function(_0x476d86,_0x3561bd){return db[_0xed17('0x2b')]['create'](_0x476d86[_0xed17('0x4b')],{})['then'](respondWithResult(_0x3561bd,0xc9))['catch'](handleError(_0x3561bd,null));};exports[_0xed17('0x24')]=function(_0x5cbc5a,_0x3baa82){if(_0x5cbc5a[_0xed17('0x4b')]['id']){delete _0x5cbc5a['body']['id'];}return db['SugarcrmConfiguration'][_0xed17('0x4c')]({'where':{'id':_0x5cbc5a[_0xed17('0x47')]['id']}})[_0xed17('0x25')](handleEntityNotFound(_0x3baa82,null))[_0xed17('0x25')](saveUpdates(_0x5cbc5a[_0xed17('0x4b')],null))[_0xed17('0x25')](respondWithResult(_0x3baa82,null))[_0xed17('0x45')](handleError(_0x3baa82,null));};exports[_0xed17('0x4d')]=function(_0x5582a0,_0x350b2b){return db['SugarcrmConfiguration'][_0xed17('0x4c')]({'where':{'id':_0x5582a0['params']['id']}})['then'](handleEntityNotFound(_0x350b2b,null))[_0xed17('0x25')](removeEntity(_0x350b2b,null))[_0xed17('0x45')](handleError(_0x350b2b,null));};exports[_0xed17('0x4e')]=function(_0x69395f,_0x5f088a,_0x208f33){var _0x25a60e={};var _0x32888a={};var _0xbd6f93;var _0x517056;return db[_0xed17('0x2b')][_0xed17('0x4f')]({'where':{'id':_0x69395f[_0xed17('0x47')]['id']}})[_0xed17('0x25')](handleEntityNotFound(_0x5f088a,null))[_0xed17('0x25')](function(_0x7f7d4c){if(_0x7f7d4c){_0xbd6f93=_0x7f7d4c;_0x32888a['model']=_['keys'](db[_0xed17('0x50')]['rawAttributes']);_0x32888a[_0xed17('0x31')]=_['keys'](_0x69395f[_0xed17('0x31')]);_0x32888a[_0xed17('0x33')]=_[_0xed17('0x34')](_0x32888a[_0xed17('0x30')],_0x32888a['query']);_0x25a60e[_0xed17('0x35')]=_[_0xed17('0x34')](_0x32888a['model'],qs[_0xed17('0x48')](_0x69395f['query']['fields']));_0x25a60e[_0xed17('0x35')]=_0x25a60e[_0xed17('0x35')]['length']?_0x25a60e[_0xed17('0x35')]:_0x32888a[_0xed17('0x30')];_0x25a60e['order']=qs[_0xed17('0x3b')](_0x69395f['query']['sort']);_0x25a60e[_0xed17('0x3c')]=qs['filters'](_['pick'](_0x69395f[_0xed17('0x31')],_0x32888a[_0xed17('0x33')]));if(_0x69395f[_0xed17('0x31')][_0xed17('0x40')]){_0x25a60e['where']=_[_0xed17('0x3e')](_0x25a60e[_0xed17('0x3c')],{'$or':_[_0xed17('0x2a')](_0x25a60e[_0xed17('0x35')],function(_0x4e0227){var _0x5855d6={};_0x5855d6[_0x4e0227]={'$like':'%'+_0x69395f[_0xed17('0x31')][_0xed17('0x40')]+'%'};return _0x5855d6;})});}_0x25a60e=_[_0xed17('0x3e')]({},_0x25a60e,_0x69395f['options']);return _0xbd6f93[_0xed17('0x4e')](_0x25a60e);}})['then'](function(_0x738f79){if(_0x738f79){_0x517056=_0x738f79['length'];if(!_0x69395f[_0xed17('0x31')]['hasOwnProperty'](_0xed17('0x38'))){_0x25a60e[_0xed17('0x39')]=qs[_0xed17('0x39')](_0x69395f[_0xed17('0x31')]['limit']);_0x25a60e[_0xed17('0x1f')]=qs[_0xed17('0x1f')](_0x69395f[_0xed17('0x31')][_0xed17('0x1f')]);}return _0xbd6f93[_0xed17('0x4e')](_0x25a60e);}})[_0xed17('0x25')](function(_0x251458){if(_0x251458){return _0x251458?{'count':_0x517056,'rows':_0x251458}:null;}})['then'](respondWithResult(_0x5f088a,null))[_0xed17('0x45')](handleError(_0x5f088a,null));};exports['getSubjects']=function(_0x1b087b,_0xd6655a,_0x3fe07e){var _0x2cded5={};var _0x206db7={};var _0x43634f;var _0x46fdda;return db[_0xed17('0x2b')][_0xed17('0x4f')]({'where':{'id':_0x1b087b[_0xed17('0x47')]['id']}})[_0xed17('0x25')](handleEntityNotFound(_0xd6655a,null))[_0xed17('0x25')](function(_0x10b5b1){if(_0x10b5b1){_0x43634f=_0x10b5b1;_0x206db7[_0xed17('0x30')]=_[_0xed17('0x32')](db[_0xed17('0x50')][_0xed17('0x2c')]);_0x206db7[_0xed17('0x31')]=_[_0xed17('0x32')](_0x1b087b[_0xed17('0x31')]);_0x206db7[_0xed17('0x33')]=_[_0xed17('0x34')](_0x206db7[_0xed17('0x30')],_0x206db7[_0xed17('0x31')]);_0x2cded5[_0xed17('0x35')]=_['intersection'](_0x206db7[_0xed17('0x30')],qs[_0xed17('0x48')](_0x1b087b[_0xed17('0x31')][_0xed17('0x48')]));_0x2cded5[_0xed17('0x35')]=_0x2cded5[_0xed17('0x35')][_0xed17('0x36')]?_0x2cded5[_0xed17('0x35')]:_0x206db7[_0xed17('0x30')];_0x2cded5[_0xed17('0x3a')]=qs[_0xed17('0x3b')](_0x1b087b[_0xed17('0x31')]['sort']);_0x2cded5[_0xed17('0x3c')]=qs[_0xed17('0x33')](_['pick'](_0x1b087b['query'],_0x206db7[_0xed17('0x33')]));if(_0x1b087b['query']['filter']){_0x2cded5[_0xed17('0x3c')]=_['merge'](_0x2cded5[_0xed17('0x3c')],{'$or':_[_0xed17('0x2a')](_0x2cded5['attributes'],function(_0x105538){var _0x411cf4={};_0x411cf4[_0x105538]={'$like':'%'+_0x1b087b[_0xed17('0x31')][_0xed17('0x40')]+'%'};return _0x411cf4;})});}_0x2cded5=_[_0xed17('0x3e')]({},_0x2cded5,_0x1b087b['options']);return _0x43634f[_0xed17('0x51')](_0x2cded5);}})[_0xed17('0x25')](function(_0x39005d){if(_0x39005d){_0x46fdda=_0x39005d[_0xed17('0x36')];if(!_0x1b087b['query']['hasOwnProperty']('nolimit')){_0x2cded5[_0xed17('0x39')]=qs[_0xed17('0x39')](_0x1b087b[_0xed17('0x31')][_0xed17('0x39')]);_0x2cded5[_0xed17('0x1f')]=qs[_0xed17('0x1f')](_0x1b087b[_0xed17('0x31')][_0xed17('0x1f')]);}return _0x43634f['getSubjects'](_0x2cded5);}})[_0xed17('0x25')](function(_0x4bdb17){if(_0x4bdb17){return _0x4bdb17?{'count':_0x46fdda,'rows':_0x4bdb17}:null;}})['then'](respondWithResult(_0xd6655a,null))[_0xed17('0x45')](handleError(_0xd6655a,null));};exports[_0xed17('0x52')]=function(_0x547a8b,_0x5a66cd,_0x40e3af){var _0x508601={};var _0x1cc2eb={};var _0x18576d;var _0x4da0f5;return db[_0xed17('0x2b')]['findOne']({'where':{'id':_0x547a8b[_0xed17('0x47')]['id']}})['then'](handleEntityNotFound(_0x5a66cd,null))[_0xed17('0x25')](function(_0x20a9f3){if(_0x20a9f3){_0x18576d=_0x20a9f3;_0x1cc2eb[_0xed17('0x30')]=_['keys'](db['SugarcrmField'][_0xed17('0x2c')]);_0x1cc2eb['query']=_[_0xed17('0x32')](_0x547a8b['query']);_0x1cc2eb[_0xed17('0x33')]=_[_0xed17('0x34')](_0x1cc2eb[_0xed17('0x30')],_0x1cc2eb['query']);_0x508601['attributes']=_[_0xed17('0x34')](_0x1cc2eb[_0xed17('0x30')],qs[_0xed17('0x48')](_0x547a8b[_0xed17('0x31')]['fields']));_0x508601[_0xed17('0x35')]=_0x508601['attributes'][_0xed17('0x36')]?_0x508601['attributes']:_0x1cc2eb[_0xed17('0x30')];_0x508601[_0xed17('0x3a')]=qs[_0xed17('0x3b')](_0x547a8b['query'][_0xed17('0x3b')]);_0x508601['where']=qs['filters'](_[_0xed17('0x3d')](_0x547a8b[_0xed17('0x31')],_0x1cc2eb[_0xed17('0x33')]));if(_0x547a8b['query'][_0xed17('0x40')]){_0x508601[_0xed17('0x3c')]=_[_0xed17('0x3e')](_0x508601[_0xed17('0x3c')],{'$or':_[_0xed17('0x2a')](_0x508601[_0xed17('0x35')],function(_0x1c27df){var _0x2b5f7c={};_0x2b5f7c[_0x1c27df]={'$like':'%'+_0x547a8b[_0xed17('0x31')][_0xed17('0x40')]+'%'};return _0x2b5f7c;})});}_0x508601=_['merge']({},_0x508601,_0x547a8b['options']);return _0x18576d[_0xed17('0x52')](_0x508601);}})['then'](function(_0x4dfd7c){if(_0x4dfd7c){_0x4da0f5=_0x4dfd7c[_0xed17('0x36')];if(!_0x547a8b[_0xed17('0x31')][_0xed17('0x37')]('nolimit')){_0x508601[_0xed17('0x39')]=qs[_0xed17('0x39')](_0x547a8b[_0xed17('0x31')][_0xed17('0x39')]);_0x508601[_0xed17('0x1f')]=qs[_0xed17('0x1f')](_0x547a8b[_0xed17('0x31')]['offset']);}return _0x18576d[_0xed17('0x52')](_0x508601);}})[_0xed17('0x25')](function(_0x49fd3b){if(_0x49fd3b){return _0x49fd3b?{'count':_0x4da0f5,'rows':_0x49fd3b}:null;}})[_0xed17('0x25')](respondWithResult(_0x5a66cd,null))[_0xed17('0x45')](handleError(_0x5a66cd,null));}; \ No newline at end of file diff --git a/server/api/intSugarcrmConfiguration/intSugarcrmConfiguration.model.js b/server/api/intSugarcrmConfiguration/intSugarcrmConfiguration.model.js index e8a3f63..9a6972f 100644 --- a/server/api/intSugarcrmConfiguration/intSugarcrmConfiguration.model.js +++ b/server/api/intSugarcrmConfiguration/intSugarcrmConfiguration.model.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x8cb1=['../../config/logger','bluebird','path','../../config/environment','define','SugarcrmConfiguration','int_sugarcrm_configurations','lodash','util'];(function(_0x4e1060,_0x3ea39b){var _0x226e66=function(_0x1bc828){while(--_0x1bc828){_0x4e1060['push'](_0x4e1060['shift']());}};_0x226e66(++_0x3ea39b);}(_0x8cb1,0x16f));var _0x18cb=function(_0x3e0242,_0x4a4116){_0x3e0242=_0x3e0242-0x0;var _0x5a39f6=_0x8cb1[_0x3e0242];return _0x5a39f6;};'use strict';var _=require(_0x18cb('0x0'));var util=require(_0x18cb('0x1'));var logger=require(_0x18cb('0x2'))('api');var moment=require('moment');var BPromise=require(_0x18cb('0x3'));var rp=require('request-promise');var fs=require('fs');var path=require(_0x18cb('0x4'));var rimraf=require('rimraf');var config=require(_0x18cb('0x5'));var attributes=require('./intSugarcrmConfiguration.attributes');module['exports']=function(_0x2706bc,_0x5eed52){return _0x2706bc[_0x18cb('0x6')](_0x18cb('0x7'),attributes,{'tableName':_0x18cb('0x8'),'paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file +var _0x64b2=['../../config/logger','api','moment','request-promise','path','rimraf','./intSugarcrmConfiguration.attributes','exports','define','SugarcrmConfiguration','int_sugarcrm_configurations','lodash','util'];(function(_0x41cd69,_0x28ffa0){var _0x138cc2=function(_0xf84cae){while(--_0xf84cae){_0x41cd69['push'](_0x41cd69['shift']());}};_0x138cc2(++_0x28ffa0);}(_0x64b2,0x143));var _0x264b=function(_0x2aec52,_0x59d962){_0x2aec52=_0x2aec52-0x0;var _0x3b8835=_0x64b2[_0x2aec52];return _0x3b8835;};'use strict';var _=require(_0x264b('0x0'));var util=require(_0x264b('0x1'));var logger=require(_0x264b('0x2'))(_0x264b('0x3'));var moment=require(_0x264b('0x4'));var BPromise=require('bluebird');var rp=require(_0x264b('0x5'));var fs=require('fs');var path=require(_0x264b('0x6'));var rimraf=require(_0x264b('0x7'));var config=require('../../config/environment');var attributes=require(_0x264b('0x8'));module[_0x264b('0x9')]=function(_0x1b80ad,_0x58dc15){return _0x1b80ad[_0x264b('0xa')](_0x264b('0xb'),attributes,{'tableName':_0x264b('0xc'),'paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file diff --git a/server/api/intSugarcrmConfiguration/intSugarcrmConfiguration.rpc.js b/server/api/intSugarcrmConfiguration/intSugarcrmConfiguration.rpc.js index ddbbbd8..7031da4 100644 --- a/server/api/intSugarcrmConfiguration/intSugarcrmConfiguration.rpc.js +++ b/server/api/intSugarcrmConfiguration/intSugarcrmConfiguration.rpc.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x2a4b=['../../mysqldb','../../config/logger','client','http','then','info','request\x20sent','stringify','error','SugarcrmConfiguration,\x20%s,\x20%s','message','result','catch','lodash','util','moment','bluebird','ioredis'];(function(_0x21503d,_0xb4dc51){var _0x346288=function(_0x417f14){while(--_0x417f14){_0x21503d['push'](_0x21503d['shift']());}};_0x346288(++_0xb4dc51);}(_0x2a4b,0x199));var _0xb2a4=function(_0x2b30e7,_0x594809){_0x2b30e7=_0x2b30e7-0x0;var _0x254819=_0x2a4b[_0x2b30e7];return _0x254819;};'use strict';var _=require(_0xb2a4('0x0'));var util=require(_0xb2a4('0x1'));var moment=require(_0xb2a4('0x2'));var BPromise=require(_0xb2a4('0x3'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0xb2a4('0x4'));var db=require(_0xb2a4('0x5'))['db'];var utils=require('../../config/utils');var logger=require(_0xb2a4('0x6'))('rpc');var config=require('../../config/environment');var jayson=require('jayson/promise');var client=jayson[_0xb2a4('0x7')][_0xb2a4('0x8')]({'port':0x232a});function respondWithRpcPromise(_0x4e52ff,_0xfb5da7,_0x4492dd){return new BPromise(function(_0x320ff7,_0x45e7ac){return client['request'](_0x4e52ff,_0x4492dd)[_0xb2a4('0x9')](function(_0x480fa3){logger[_0xb2a4('0xa')]('SugarcrmConfiguration,\x20%s,\x20%s',_0xfb5da7,_0xb2a4('0xb'));logger['debug']('SugarcrmConfiguration,\x20%s,\x20%s,\x20%s',_0xfb5da7,_0xb2a4('0xb'),JSON[_0xb2a4('0xc')](_0x480fa3));if(_0x480fa3[_0xb2a4('0xd')]){if(_0x480fa3[_0xb2a4('0xd')]['code']===0x1f4){logger['error'](_0xb2a4('0xe'),_0xfb5da7,_0x480fa3[_0xb2a4('0xd')][_0xb2a4('0xf')]);return _0x45e7ac(_0x480fa3[_0xb2a4('0xd')][_0xb2a4('0xf')]);}logger['error'](_0xb2a4('0xe'),_0xfb5da7,_0x480fa3['error'][_0xb2a4('0xf')]);return _0x320ff7(_0x480fa3[_0xb2a4('0xd')][_0xb2a4('0xf')]);}else{logger[_0xb2a4('0xa')]('SugarcrmConfiguration,\x20%s,\x20%s',_0xfb5da7,_0xb2a4('0xb'));_0x320ff7(_0x480fa3[_0xb2a4('0x10')]['message']);}})[_0xb2a4('0x11')](function(_0x11b1a7){logger[_0xb2a4('0xd')](_0xb2a4('0xe'),_0xfb5da7,_0x11b1a7);_0x45e7ac(_0x11b1a7);});});} \ No newline at end of file +var _0x7bb9=['message','info','SugarcrmConfiguration,\x20%s,\x20%s','result','catch','lodash','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','request','then','request\x20sent','stringify','error'];(function(_0x324e86,_0x81b1cb){var _0x592846=function(_0x33439c){while(--_0x33439c){_0x324e86['push'](_0x324e86['shift']());}};_0x592846(++_0x81b1cb);}(_0x7bb9,0xa6));var _0x97bb=function(_0x243b59,_0x3f9495){_0x243b59=_0x243b59-0x0;var _0x3e1676=_0x7bb9[_0x243b59];return _0x3e1676;};'use strict';var _=require(_0x97bb('0x0'));var util=require('util');var moment=require(_0x97bb('0x1'));var BPromise=require(_0x97bb('0x2'));var rs=require(_0x97bb('0x3'));var fs=require('fs');var Redis=require(_0x97bb('0x4'));var db=require(_0x97bb('0x5'))['db'];var utils=require(_0x97bb('0x6'));var logger=require(_0x97bb('0x7'))(_0x97bb('0x8'));var config=require(_0x97bb('0x9'));var jayson=require(_0x97bb('0xa'));var client=jayson[_0x97bb('0xb')][_0x97bb('0xc')]({'port':0x232a});function respondWithRpcPromise(_0x1a8056,_0xde0be3,_0x54190c){return new BPromise(function(_0x226914,_0x47e8fe){return client[_0x97bb('0xd')](_0x1a8056,_0x54190c)[_0x97bb('0xe')](function(_0x430caa){logger['info']('SugarcrmConfiguration,\x20%s,\x20%s',_0xde0be3,_0x97bb('0xf'));logger['debug']('SugarcrmConfiguration,\x20%s,\x20%s,\x20%s',_0xde0be3,_0x97bb('0xf'),JSON[_0x97bb('0x10')](_0x430caa));if(_0x430caa[_0x97bb('0x11')]){if(_0x430caa[_0x97bb('0x11')]['code']===0x1f4){logger['error']('SugarcrmConfiguration,\x20%s,\x20%s',_0xde0be3,_0x430caa[_0x97bb('0x11')][_0x97bb('0x12')]);return _0x47e8fe(_0x430caa[_0x97bb('0x11')]['message']);}logger[_0x97bb('0x11')]('SugarcrmConfiguration,\x20%s,\x20%s',_0xde0be3,_0x430caa[_0x97bb('0x11')][_0x97bb('0x12')]);return _0x226914(_0x430caa[_0x97bb('0x11')]['message']);}else{logger[_0x97bb('0x13')](_0x97bb('0x14'),_0xde0be3,_0x97bb('0xf'));_0x226914(_0x430caa[_0x97bb('0x15')]['message']);}})[_0x97bb('0x16')](function(_0x4a7438){logger[_0x97bb('0x11')]('SugarcrmConfiguration,\x20%s,\x20%s',_0xde0be3,_0x4a7438);_0x47e8fe(_0x4a7438);});});} \ No newline at end of file diff --git a/server/api/intSugarcrmField/index.js b/server/api/intSugarcrmField/index.js index f8c8d6c..d948376 100644 --- a/server/api/intSugarcrmField/index.js +++ b/server/api/intSugarcrmField/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x1558=['put','update','delete','destroy','exports','multer','util','path','express','Router','fs-extra','../../components/auth/service','../../config/environment','./intSugarcrmField.controller','get','isAuthenticated','index','/:id','show','post','create'];(function(_0x177721,_0x54dbde){var _0x158fb2=function(_0x273520){while(--_0x273520){_0x177721['push'](_0x177721['shift']());}};_0x158fb2(++_0x54dbde);}(_0x1558,0x1a9));var _0x8155=function(_0x4a7193,_0x556c6a){_0x4a7193=_0x4a7193-0x0;var _0xc33d94=_0x1558[_0x4a7193];return _0xc33d94;};'use strict';var multer=require(_0x8155('0x0'));var util=require(_0x8155('0x1'));var path=require(_0x8155('0x2'));var timeout=require('connect-timeout');var express=require(_0x8155('0x3'));var router=express[_0x8155('0x4')]();var fs_extra=require(_0x8155('0x5'));var auth=require(_0x8155('0x6'));var interaction=require('../../components/interaction/service');var config=require(_0x8155('0x7'));var controller=require(_0x8155('0x8'));router[_0x8155('0x9')]('/',auth[_0x8155('0xa')](),controller[_0x8155('0xb')]);router['get'](_0x8155('0xc'),auth[_0x8155('0xa')](),controller[_0x8155('0xd')]);router[_0x8155('0xe')]('/',auth[_0x8155('0xa')](),controller[_0x8155('0xf')]);router[_0x8155('0x10')]('/:id',auth[_0x8155('0xa')](),controller[_0x8155('0x11')]);router[_0x8155('0x12')](_0x8155('0xc'),auth[_0x8155('0xa')](),controller[_0x8155('0x13')]);module[_0x8155('0x14')]=router; \ No newline at end of file +var _0x2ebe=['multer','util','path','connect-timeout','express','Router','fs-extra','../../components/auth/service','../../config/environment','./intSugarcrmField.controller','get','isAuthenticated','index','show','post','/:id','destroy','exports'];(function(_0x220c48,_0xcb524d){var _0x43febf=function(_0x1a7754){while(--_0x1a7754){_0x220c48['push'](_0x220c48['shift']());}};_0x43febf(++_0xcb524d);}(_0x2ebe,0x156));var _0xe2eb=function(_0x1654cc,_0x1fd3ea){_0x1654cc=_0x1654cc-0x0;var _0x583fdb=_0x2ebe[_0x1654cc];return _0x583fdb;};'use strict';var multer=require(_0xe2eb('0x0'));var util=require(_0xe2eb('0x1'));var path=require(_0xe2eb('0x2'));var timeout=require(_0xe2eb('0x3'));var express=require(_0xe2eb('0x4'));var router=express[_0xe2eb('0x5')]();var fs_extra=require(_0xe2eb('0x6'));var auth=require(_0xe2eb('0x7'));var interaction=require('../../components/interaction/service');var config=require(_0xe2eb('0x8'));var controller=require(_0xe2eb('0x9'));router[_0xe2eb('0xa')]('/',auth[_0xe2eb('0xb')](),controller[_0xe2eb('0xc')]);router[_0xe2eb('0xa')]('/:id',auth[_0xe2eb('0xb')](),controller[_0xe2eb('0xd')]);router[_0xe2eb('0xe')]('/',auth[_0xe2eb('0xb')](),controller['create']);router['put'](_0xe2eb('0xf'),auth['isAuthenticated'](),controller['update']);router['delete']('/:id',auth[_0xe2eb('0xb')](),controller[_0xe2eb('0x10')]);module[_0xe2eb('0x11')]=router; \ No newline at end of file diff --git a/server/api/intSugarcrmField/intSugarcrmField.attributes.js b/server/api/intSugarcrmField/intSugarcrmField.attributes.js index a5456c9..f708e76 100644 --- a/server/api/intSugarcrmField/intSugarcrmField.attributes.js +++ b/server/api/intSugarcrmField/intSugarcrmField.attributes.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x1d19=['BOOLEAN','exports','ENUM','variable','picklist','string','STRING'];(function(_0x59bcb1,_0x5a4b6c){var _0x4a737f=function(_0x546a49){while(--_0x546a49){_0x59bcb1['push'](_0x59bcb1['shift']());}};_0x4a737f(++_0x5a4b6c);}(_0x1d19,0x1cf));var _0x91d1=function(_0x56e2b1,_0x137766){_0x56e2b1=_0x56e2b1-0x0;var _0x3bc4fc=_0x1d19[_0x56e2b1];return _0x3bc4fc;};'use strict';var Sequelize=require('sequelize');module[_0x91d1('0x0')]={'type':{'type':Sequelize[_0x91d1('0x1')]('string',_0x91d1('0x2'),'customVariable','keyValue',_0x91d1('0x3')),'defaultValue':_0x91d1('0x4')},'content':{'type':Sequelize[_0x91d1('0x5')]},'key':{'type':Sequelize[_0x91d1('0x5')]},'keyType':{'type':Sequelize[_0x91d1('0x1')]('string',_0x91d1('0x2'),'customVariable')},'keyContent':{'type':Sequelize[_0x91d1('0x5')]},'idField':{'type':Sequelize[_0x91d1('0x5')]},'nameField':{'type':Sequelize[_0x91d1('0x5')]},'customField':{'type':Sequelize[_0x91d1('0x6')],'defaultValue':!![]},'variableName':{'type':Sequelize[_0x91d1('0x5')]}}; \ No newline at end of file +var _0xfcc2=['ENUM','string','variable','keyValue','picklist','STRING','customVariable','BOOLEAN','sequelize','exports'];(function(_0x4f3173,_0x52ad78){var _0x103329=function(_0x3c5341){while(--_0x3c5341){_0x4f3173['push'](_0x4f3173['shift']());}};_0x103329(++_0x52ad78);}(_0xfcc2,0x94));var _0x2fcc=function(_0x2c5655,_0x2cab10){_0x2c5655=_0x2c5655-0x0;var _0xe23b4f=_0xfcc2[_0x2c5655];return _0xe23b4f;};'use strict';var Sequelize=require(_0x2fcc('0x0'));module[_0x2fcc('0x1')]={'type':{'type':Sequelize[_0x2fcc('0x2')](_0x2fcc('0x3'),_0x2fcc('0x4'),'customVariable',_0x2fcc('0x5'),_0x2fcc('0x6')),'defaultValue':_0x2fcc('0x3')},'content':{'type':Sequelize[_0x2fcc('0x7')]},'key':{'type':Sequelize[_0x2fcc('0x7')]},'keyType':{'type':Sequelize[_0x2fcc('0x2')]('string','variable',_0x2fcc('0x8'))},'keyContent':{'type':Sequelize[_0x2fcc('0x7')]},'idField':{'type':Sequelize[_0x2fcc('0x7')]},'nameField':{'type':Sequelize[_0x2fcc('0x7')]},'customField':{'type':Sequelize[_0x2fcc('0x9')],'defaultValue':!![]},'variableName':{'type':Sequelize[_0x2fcc('0x7')]}}; \ No newline at end of file diff --git a/server/api/intSugarcrmField/intSugarcrmField.controller.js b/server/api/intSugarcrmField/intSugarcrmField.controller.js index 51d4030..c817549 100644 --- a/server/api/intSugarcrmField/intSugarcrmField.controller.js +++ b/server/api/intSugarcrmField/intSugarcrmField.controller.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x2434=['json','offset','undefined','limit','count','set','apply','save','update','then','destroy','name','send','index','SugarcrmField','rawAttributes','key','model','keys','query','filters','intersection','attributes','fields','length','nolimit','order','sort','where','pick','merge','VIRTUAL','filter','include','findAll','catch','params','options','find','create','body','eml-format','rimraf','fast-json-patch','request-promise','moment','bluebird','mustache','util','path','sox','to-csv','ejs','fs-extra','lodash','squel','crypto','jsforce','querystring','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','api','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','sendStatus','status','end'];(function(_0x314ccd,_0xb410af){var _0x27ed35=function(_0x35fd09){while(--_0x35fd09){_0x314ccd['push'](_0x314ccd['shift']());}};_0x27ed35(++_0xb410af);}(_0x2434,0x191));var _0x4243=function(_0x287f9b,_0x557885){_0x287f9b=_0x287f9b-0x0;var _0x5248bb=_0x2434[_0x287f9b];return _0x5248bb;};'use strict';var emlformat=require(_0x4243('0x0'));var rimraf=require(_0x4243('0x1'));var zipdir=require('zip-dir');var jsonpatch=require(_0x4243('0x2'));var rp=require(_0x4243('0x3'));var moment=require(_0x4243('0x4'));var BPromise=require(_0x4243('0x5'));var Mustache=require(_0x4243('0x6'));var util=require(_0x4243('0x7'));var path=require(_0x4243('0x8'));var sox=require(_0x4243('0x9'));var csv=require(_0x4243('0xa'));var ejs=require(_0x4243('0xb'));var fs=require('fs');var fs_extra=require(_0x4243('0xc'));var _=require(_0x4243('0xd'));var squel=require(_0x4243('0xe'));var crypto=require(_0x4243('0xf'));var jsforce=require(_0x4243('0x10'));var deskjs=require('desk.js');var toCsv=require(_0x4243('0xa'));var querystring=require(_0x4243('0x11'));var Papa=require('papaparse');var Redis=require(_0x4243('0x12'));var authService=require(_0x4243('0x13'));var qs=require(_0x4243('0x14'));var as=require(_0x4243('0x15'));var hardwareService=require(_0x4243('0x16'));var logger=require('../../config/logger')(_0x4243('0x17'));var utils=require(_0x4243('0x18'));var config=require(_0x4243('0x19'));var licenseUtil=require(_0x4243('0x1a'));var db=require(_0x4243('0x1b'))['db'];function respondWithStatusCode(_0x4d7c64,_0x3c379a){_0x3c379a=_0x3c379a||0xcc;return function(_0x4ab8b4){if(_0x4ab8b4){return _0x4d7c64[_0x4243('0x1c')](_0x3c379a);}return _0x4d7c64[_0x4243('0x1d')](_0x3c379a)[_0x4243('0x1e')]();};}function respondWithResult(_0x227f3b,_0x562a0b){_0x562a0b=_0x562a0b||0xc8;return function(_0x24cfb9){if(_0x24cfb9){return _0x227f3b[_0x4243('0x1d')](_0x562a0b)[_0x4243('0x1f')](_0x24cfb9);}};}function respondWithFilteredResult(_0x11efa8,_0x1114e2){return function(_0x58e851){if(_0x58e851){var _0xceeebd=typeof _0x1114e2[_0x4243('0x20')]===_0x4243('0x21')&&typeof _0x1114e2[_0x4243('0x22')]==='undefined';var _0x4d23cd=_0x58e851['count'];var _0xce7db9=_0xceeebd?0x0:_0x1114e2[_0x4243('0x20')];var _0x55ed2e=_0xceeebd?_0x58e851[_0x4243('0x23')]:_0x1114e2['offset']+_0x1114e2[_0x4243('0x22')];var _0x43c6eb;if(_0x55ed2e>=_0x4d23cd){_0x55ed2e=_0x4d23cd;_0x43c6eb=0xc8;}else{_0x43c6eb=0xce;}_0x11efa8[_0x4243('0x1d')](_0x43c6eb);return _0x11efa8[_0x4243('0x24')]('Content-Range',_0xce7db9+'-'+_0x55ed2e+'/'+_0x4d23cd)['json'](_0x58e851);}return null;};}function patchUpdates(_0x3d78f6){return function(_0x3071d1){try{jsonpatch[_0x4243('0x25')](_0x3071d1,_0x3d78f6,!![]);}catch(_0x41ca8f){return BPromise['reject'](_0x41ca8f);}return _0x3071d1[_0x4243('0x26')]();};}function saveUpdates(_0x13be86,_0x319027){return function(_0x474f14){if(_0x474f14){return _0x474f14[_0x4243('0x27')](_0x13be86)[_0x4243('0x28')](function(_0x134aad){return _0x134aad;});}return null;};}function removeEntity(_0x3bcc7d,_0x56c16e){return function(_0x19d4b4){if(_0x19d4b4){return _0x19d4b4[_0x4243('0x29')]()[_0x4243('0x28')](function(){_0x3bcc7d['status'](0xcc)[_0x4243('0x1e')]();});}};}function handleEntityNotFound(_0x48bd53,_0x5cc244){return function(_0x1d99d6){if(!_0x1d99d6){_0x48bd53[_0x4243('0x1c')](0x194);}return _0x1d99d6;};}function handleError(_0x5d8b5a,_0x49bc33){_0x49bc33=_0x49bc33||0x1f4;return function(_0x5d4778){logger['error'](_0x5d4778['stack']);if(_0x5d4778[_0x4243('0x2a')]){delete _0x5d4778['name'];}_0x5d8b5a['status'](_0x49bc33)[_0x4243('0x2b')](_0x5d4778);};}exports[_0x4243('0x2c')]=function(_0x239b37,_0x59f77f){var _0x564545={},_0x2db9ea={},_0x1264c8={'count':0x0,'rows':[]};var _0x2eb4aa=_['map'](db[_0x4243('0x2d')][_0x4243('0x2e')],function(_0x132bf3){return{'name':_0x132bf3['fieldName'],'type':_0x132bf3['type'][_0x4243('0x2f')]};});_0x2db9ea[_0x4243('0x30')]=_['map'](_0x2eb4aa,_0x4243('0x2a'));_0x2db9ea['query']=_[_0x4243('0x31')](_0x239b37[_0x4243('0x32')]);_0x2db9ea[_0x4243('0x33')]=_[_0x4243('0x34')](_0x2db9ea['model'],_0x2db9ea[_0x4243('0x32')]);_0x564545[_0x4243('0x35')]=_[_0x4243('0x34')](_0x2db9ea[_0x4243('0x30')],qs[_0x4243('0x36')](_0x239b37['query'][_0x4243('0x36')]));_0x564545['attributes']=_0x564545[_0x4243('0x35')][_0x4243('0x37')]?_0x564545[_0x4243('0x35')]:_0x2db9ea[_0x4243('0x30')];if(!_0x239b37[_0x4243('0x32')]['hasOwnProperty'](_0x4243('0x38'))){_0x564545['limit']=qs[_0x4243('0x22')](_0x239b37[_0x4243('0x32')][_0x4243('0x22')]);_0x564545[_0x4243('0x20')]=qs[_0x4243('0x20')](_0x239b37[_0x4243('0x32')][_0x4243('0x20')]);}_0x564545[_0x4243('0x39')]=qs[_0x4243('0x3a')](_0x239b37[_0x4243('0x32')][_0x4243('0x3a')]);_0x564545[_0x4243('0x3b')]=qs['filters'](_[_0x4243('0x3c')](_0x239b37[_0x4243('0x32')],_0x2db9ea[_0x4243('0x33')]),_0x2eb4aa);if(_0x239b37['query']['filter']){_0x564545[_0x4243('0x3b')]=_[_0x4243('0x3d')](_0x564545[_0x4243('0x3b')],{'$or':_['map'](_0x2eb4aa,function(_0x226936){if(_0x226936['type']!==_0x4243('0x3e')){var _0x14c968={};_0x14c968[_0x226936[_0x4243('0x2a')]]={'$like':'%'+_0x239b37[_0x4243('0x32')][_0x4243('0x3f')]+'%'};return _0x14c968;}})});}_0x564545=_['merge']({},_0x564545,_0x239b37['options']);var _0xe3a21b={'where':_0x564545['where']};return db['SugarcrmField']['count'](_0xe3a21b)[_0x4243('0x28')](function(_0x2ef320){_0x1264c8[_0x4243('0x23')]=_0x2ef320;if(_0x239b37[_0x4243('0x32')]['includeAll']){_0x564545[_0x4243('0x40')]=[{'all':!![]}];}return db[_0x4243('0x2d')][_0x4243('0x41')](_0x564545);})[_0x4243('0x28')](function(_0x503480){_0x1264c8['rows']=_0x503480;return _0x1264c8;})[_0x4243('0x28')](respondWithFilteredResult(_0x59f77f,_0x564545))[_0x4243('0x42')](handleError(_0x59f77f,null));};exports['show']=function(_0x274d5a,_0x398a6e){var _0x74dbeb={'raw':!![],'where':{'id':_0x274d5a[_0x4243('0x43')]['id']}},_0x2c4d5f={};_0x2c4d5f[_0x4243('0x30')]=_[_0x4243('0x31')](db[_0x4243('0x2d')]['rawAttributes']);_0x2c4d5f[_0x4243('0x32')]=_[_0x4243('0x31')](_0x274d5a[_0x4243('0x32')]);_0x2c4d5f[_0x4243('0x33')]=_[_0x4243('0x34')](_0x2c4d5f[_0x4243('0x30')],_0x2c4d5f[_0x4243('0x32')]);_0x74dbeb[_0x4243('0x35')]=_[_0x4243('0x34')](_0x2c4d5f[_0x4243('0x30')],qs[_0x4243('0x36')](_0x274d5a['query'][_0x4243('0x36')]));_0x74dbeb[_0x4243('0x35')]=_0x74dbeb[_0x4243('0x35')][_0x4243('0x37')]?_0x74dbeb[_0x4243('0x35')]:_0x2c4d5f[_0x4243('0x30')];if(_0x274d5a['query']['includeAll']){_0x74dbeb[_0x4243('0x40')]=[{'all':!![]}];}_0x74dbeb=_['merge']({},_0x74dbeb,_0x274d5a[_0x4243('0x44')]);return db[_0x4243('0x2d')][_0x4243('0x45')](_0x74dbeb)[_0x4243('0x28')](handleEntityNotFound(_0x398a6e,null))['then'](respondWithResult(_0x398a6e,null))[_0x4243('0x42')](handleError(_0x398a6e,null));};exports[_0x4243('0x46')]=function(_0x228f26,_0x29864e){return db[_0x4243('0x2d')][_0x4243('0x46')](_0x228f26[_0x4243('0x47')],{})[_0x4243('0x28')](respondWithResult(_0x29864e,0xc9))[_0x4243('0x42')](handleError(_0x29864e,null));};exports[_0x4243('0x27')]=function(_0x576036,_0x320c0b){if(_0x576036[_0x4243('0x47')]['id']){delete _0x576036[_0x4243('0x47')]['id'];}return db[_0x4243('0x2d')][_0x4243('0x45')]({'where':{'id':_0x576036['params']['id']}})[_0x4243('0x28')](handleEntityNotFound(_0x320c0b,null))[_0x4243('0x28')](saveUpdates(_0x576036[_0x4243('0x47')],null))[_0x4243('0x28')](respondWithResult(_0x320c0b,null))[_0x4243('0x42')](handleError(_0x320c0b,null));};exports[_0x4243('0x29')]=function(_0x4f938a,_0x2175e5){return db[_0x4243('0x2d')][_0x4243('0x45')]({'where':{'id':_0x4f938a['params']['id']}})[_0x4243('0x28')](handleEntityNotFound(_0x2175e5,null))['then'](removeEntity(_0x2175e5,null))[_0x4243('0x42')](handleError(_0x2175e5,null));}; \ No newline at end of file +var _0x53cd=['lodash','squel','crypto','jsforce','desk.js','../../components/parsers/qs','../../config/logger','api','../../config/utils','../../config/license/util','../../mysqldb','sendStatus','status','end','json','offset','undefined','limit','count','set','apply','reject','save','update','then','destroy','error','stack','name','send','index','SugarcrmField','rawAttributes','type','key','model','keys','filters','attributes','intersection','query','fields','hasOwnProperty','nolimit','order','sort','where','pick','map','filter','merge','options','includeAll','include','findAll','rows','show','length','create','body','find','params','catch','eml-format','zip-dir','fast-json-patch','moment','bluebird','mustache','util','path','sox','to-csv','fs-extra'];(function(_0x37a3a1,_0x1e9cb5){var _0x3cc96f=function(_0x56462d){while(--_0x56462d){_0x37a3a1['push'](_0x37a3a1['shift']());}};_0x3cc96f(++_0x1e9cb5);}(_0x53cd,0x89));var _0xd53c=function(_0x2b8e43,_0xe69f5c){_0x2b8e43=_0x2b8e43-0x0;var _0x1fbc9f=_0x53cd[_0x2b8e43];return _0x1fbc9f;};'use strict';var emlformat=require(_0xd53c('0x0'));var rimraf=require('rimraf');var zipdir=require(_0xd53c('0x1'));var jsonpatch=require(_0xd53c('0x2'));var rp=require('request-promise');var moment=require(_0xd53c('0x3'));var BPromise=require(_0xd53c('0x4'));var Mustache=require(_0xd53c('0x5'));var util=require(_0xd53c('0x6'));var path=require(_0xd53c('0x7'));var sox=require(_0xd53c('0x8'));var csv=require(_0xd53c('0x9'));var ejs=require('ejs');var fs=require('fs');var fs_extra=require(_0xd53c('0xa'));var _=require(_0xd53c('0xb'));var squel=require(_0xd53c('0xc'));var crypto=require(_0xd53c('0xd'));var jsforce=require(_0xd53c('0xe'));var deskjs=require(_0xd53c('0xf'));var toCsv=require(_0xd53c('0x9'));var querystring=require('querystring');var Papa=require('papaparse');var Redis=require('ioredis');var authService=require('../../components/auth/service');var qs=require(_0xd53c('0x10'));var as=require('../../components/parsers/advancedSearch');var hardwareService=require('../../config/license/hardware');var logger=require(_0xd53c('0x11'))(_0xd53c('0x12'));var utils=require(_0xd53c('0x13'));var config=require('../../config/environment');var licenseUtil=require(_0xd53c('0x14'));var db=require(_0xd53c('0x15'))['db'];function respondWithStatusCode(_0x1f1f78,_0x551936){_0x551936=_0x551936||0xcc;return function(_0x2a98bb){if(_0x2a98bb){return _0x1f1f78[_0xd53c('0x16')](_0x551936);}return _0x1f1f78[_0xd53c('0x17')](_0x551936)[_0xd53c('0x18')]();};}function respondWithResult(_0xa836b3,_0x293b33){_0x293b33=_0x293b33||0xc8;return function(_0x41e110){if(_0x41e110){return _0xa836b3[_0xd53c('0x17')](_0x293b33)[_0xd53c('0x19')](_0x41e110);}};}function respondWithFilteredResult(_0x16d14e,_0x445444){return function(_0x147abd){if(_0x147abd){var _0x40d3be=typeof _0x445444[_0xd53c('0x1a')]===_0xd53c('0x1b')&&typeof _0x445444[_0xd53c('0x1c')]==='undefined';var _0x4c50d1=_0x147abd[_0xd53c('0x1d')];var _0x2ba102=_0x40d3be?0x0:_0x445444[_0xd53c('0x1a')];var _0x5a61e5=_0x40d3be?_0x147abd[_0xd53c('0x1d')]:_0x445444[_0xd53c('0x1a')]+_0x445444[_0xd53c('0x1c')];var _0x192529;if(_0x5a61e5>=_0x4c50d1){_0x5a61e5=_0x4c50d1;_0x192529=0xc8;}else{_0x192529=0xce;}_0x16d14e['status'](_0x192529);return _0x16d14e[_0xd53c('0x1e')]('Content-Range',_0x2ba102+'-'+_0x5a61e5+'/'+_0x4c50d1)[_0xd53c('0x19')](_0x147abd);}return null;};}function patchUpdates(_0x2de16d){return function(_0x52d315){try{jsonpatch[_0xd53c('0x1f')](_0x52d315,_0x2de16d,!![]);}catch(_0x50fa22){return BPromise[_0xd53c('0x20')](_0x50fa22);}return _0x52d315[_0xd53c('0x21')]();};}function saveUpdates(_0x3426ae,_0x508d36){return function(_0xdaf11){if(_0xdaf11){return _0xdaf11[_0xd53c('0x22')](_0x3426ae)[_0xd53c('0x23')](function(_0x264f63){return _0x264f63;});}return null;};}function removeEntity(_0x5591a2,_0x29e60b){return function(_0x40d1c1){if(_0x40d1c1){return _0x40d1c1[_0xd53c('0x24')]()[_0xd53c('0x23')](function(){_0x5591a2[_0xd53c('0x17')](0xcc)[_0xd53c('0x18')]();});}};}function handleEntityNotFound(_0x29fc8e,_0x581bdb){return function(_0x5c5c68){if(!_0x5c5c68){_0x29fc8e['sendStatus'](0x194);}return _0x5c5c68;};}function handleError(_0x2725bb,_0x427c84){_0x427c84=_0x427c84||0x1f4;return function(_0x243a0a){logger[_0xd53c('0x25')](_0x243a0a[_0xd53c('0x26')]);if(_0x243a0a[_0xd53c('0x27')]){delete _0x243a0a[_0xd53c('0x27')];}_0x2725bb['status'](_0x427c84)[_0xd53c('0x28')](_0x243a0a);};}exports[_0xd53c('0x29')]=function(_0x5b82cd,_0x3cd7bb){var _0x4547ac={},_0x35ce2f={},_0x118762={'count':0x0,'rows':[]};var _0x12db6d=_['map'](db[_0xd53c('0x2a')][_0xd53c('0x2b')],function(_0x370a33){return{'name':_0x370a33['fieldName'],'type':_0x370a33[_0xd53c('0x2c')][_0xd53c('0x2d')]};});_0x35ce2f[_0xd53c('0x2e')]=_['map'](_0x12db6d,_0xd53c('0x27'));_0x35ce2f['query']=_[_0xd53c('0x2f')](_0x5b82cd['query']);_0x35ce2f[_0xd53c('0x30')]=_['intersection'](_0x35ce2f[_0xd53c('0x2e')],_0x35ce2f['query']);_0x4547ac[_0xd53c('0x31')]=_[_0xd53c('0x32')](_0x35ce2f['model'],qs['fields'](_0x5b82cd[_0xd53c('0x33')][_0xd53c('0x34')]));_0x4547ac['attributes']=_0x4547ac[_0xd53c('0x31')]['length']?_0x4547ac['attributes']:_0x35ce2f['model'];if(!_0x5b82cd['query'][_0xd53c('0x35')](_0xd53c('0x36'))){_0x4547ac[_0xd53c('0x1c')]=qs[_0xd53c('0x1c')](_0x5b82cd[_0xd53c('0x33')][_0xd53c('0x1c')]);_0x4547ac[_0xd53c('0x1a')]=qs[_0xd53c('0x1a')](_0x5b82cd[_0xd53c('0x33')][_0xd53c('0x1a')]);}_0x4547ac[_0xd53c('0x37')]=qs[_0xd53c('0x38')](_0x5b82cd['query'][_0xd53c('0x38')]);_0x4547ac[_0xd53c('0x39')]=qs[_0xd53c('0x30')](_[_0xd53c('0x3a')](_0x5b82cd[_0xd53c('0x33')],_0x35ce2f['filters']),_0x12db6d);if(_0x5b82cd[_0xd53c('0x33')]['filter']){_0x4547ac['where']=_['merge'](_0x4547ac[_0xd53c('0x39')],{'$or':_[_0xd53c('0x3b')](_0x12db6d,function(_0x1cebb0){if(_0x1cebb0[_0xd53c('0x2c')]!=='VIRTUAL'){var _0x1e96ff={};_0x1e96ff[_0x1cebb0[_0xd53c('0x27')]]={'$like':'%'+_0x5b82cd[_0xd53c('0x33')][_0xd53c('0x3c')]+'%'};return _0x1e96ff;}})});}_0x4547ac=_[_0xd53c('0x3d')]({},_0x4547ac,_0x5b82cd[_0xd53c('0x3e')]);var _0x21be95={'where':_0x4547ac['where']};return db['SugarcrmField']['count'](_0x21be95)[_0xd53c('0x23')](function(_0xe35f4){_0x118762[_0xd53c('0x1d')]=_0xe35f4;if(_0x5b82cd[_0xd53c('0x33')][_0xd53c('0x3f')]){_0x4547ac[_0xd53c('0x40')]=[{'all':!![]}];}return db[_0xd53c('0x2a')][_0xd53c('0x41')](_0x4547ac);})['then'](function(_0xa85327){_0x118762[_0xd53c('0x42')]=_0xa85327;return _0x118762;})[_0xd53c('0x23')](respondWithFilteredResult(_0x3cd7bb,_0x4547ac))['catch'](handleError(_0x3cd7bb,null));};exports[_0xd53c('0x43')]=function(_0x2943ee,_0x89a53f){var _0x2e6415={'raw':!![],'where':{'id':_0x2943ee['params']['id']}},_0x349cbb={};_0x349cbb['model']=_[_0xd53c('0x2f')](db[_0xd53c('0x2a')][_0xd53c('0x2b')]);_0x349cbb[_0xd53c('0x33')]=_[_0xd53c('0x2f')](_0x2943ee[_0xd53c('0x33')]);_0x349cbb[_0xd53c('0x30')]=_['intersection'](_0x349cbb[_0xd53c('0x2e')],_0x349cbb['query']);_0x2e6415[_0xd53c('0x31')]=_[_0xd53c('0x32')](_0x349cbb[_0xd53c('0x2e')],qs[_0xd53c('0x34')](_0x2943ee['query'][_0xd53c('0x34')]));_0x2e6415['attributes']=_0x2e6415[_0xd53c('0x31')][_0xd53c('0x44')]?_0x2e6415['attributes']:_0x349cbb['model'];if(_0x2943ee['query']['includeAll']){_0x2e6415['include']=[{'all':!![]}];}_0x2e6415=_[_0xd53c('0x3d')]({},_0x2e6415,_0x2943ee['options']);return db[_0xd53c('0x2a')]['find'](_0x2e6415)[_0xd53c('0x23')](handleEntityNotFound(_0x89a53f,null))['then'](respondWithResult(_0x89a53f,null))['catch'](handleError(_0x89a53f,null));};exports[_0xd53c('0x45')]=function(_0x1e05d9,_0x6f33e8){return db[_0xd53c('0x2a')][_0xd53c('0x45')](_0x1e05d9[_0xd53c('0x46')],{})[_0xd53c('0x23')](respondWithResult(_0x6f33e8,0xc9))['catch'](handleError(_0x6f33e8,null));};exports[_0xd53c('0x22')]=function(_0x4ce991,_0x5b7cee){if(_0x4ce991[_0xd53c('0x46')]['id']){delete _0x4ce991[_0xd53c('0x46')]['id'];}return db['SugarcrmField'][_0xd53c('0x47')]({'where':{'id':_0x4ce991[_0xd53c('0x48')]['id']}})[_0xd53c('0x23')](handleEntityNotFound(_0x5b7cee,null))['then'](saveUpdates(_0x4ce991[_0xd53c('0x46')],null))[_0xd53c('0x23')](respondWithResult(_0x5b7cee,null))[_0xd53c('0x49')](handleError(_0x5b7cee,null));};exports[_0xd53c('0x24')]=function(_0x4dc493,_0x27438e){return db['SugarcrmField'][_0xd53c('0x47')]({'where':{'id':_0x4dc493[_0xd53c('0x48')]['id']}})[_0xd53c('0x23')](handleEntityNotFound(_0x27438e,null))['then'](removeEntity(_0x27438e,null))[_0xd53c('0x49')](handleError(_0x27438e,null));}; \ No newline at end of file diff --git a/server/api/intSugarcrmField/intSugarcrmField.model.js b/server/api/intSugarcrmField/intSugarcrmField.model.js index 34af7bd..82d1d31 100644 --- a/server/api/intSugarcrmField/intSugarcrmField.model.js +++ b/server/api/intSugarcrmField/intSugarcrmField.model.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x522f=['FieldId','lodash','util','api','bluebird','request-promise','path','rimraf','../../config/environment','./intSugarcrmField.attributes','exports','SugarcrmField','int_sugarcrm_fields','sugarcrm_unique_index','idField'];(function(_0x8f78a5,_0x1a1dbb){var _0x55e471=function(_0x144b5b){while(--_0x144b5b){_0x8f78a5['push'](_0x8f78a5['shift']());}};_0x55e471(++_0x1a1dbb);}(_0x522f,0x187));var _0xf522=function(_0x321bb2,_0x202794){_0x321bb2=_0x321bb2-0x0;var _0x9c12ed=_0x522f[_0x321bb2];return _0x9c12ed;};'use strict';var _=require(_0xf522('0x0'));var util=require(_0xf522('0x1'));var logger=require('../../config/logger')(_0xf522('0x2'));var moment=require('moment');var BPromise=require(_0xf522('0x3'));var rp=require(_0xf522('0x4'));var fs=require('fs');var path=require(_0xf522('0x5'));var rimraf=require(_0xf522('0x6'));var config=require(_0xf522('0x7'));var attributes=require(_0xf522('0x8'));module[_0xf522('0x9')]=function(_0x299649,_0x31e79c){return _0x299649['define'](_0xf522('0xa'),attributes,{'tableName':_0xf522('0xb'),'paranoid':![],'indexes':[{'name':_0xf522('0xc'),'fields':[_0xf522('0xd'),_0xf522('0xe')],'unique':!![]}],'timestamps':!![]});}; \ No newline at end of file +var _0xf56b=['exports','SugarcrmField','int_sugarcrm_fields','sugarcrm_unique_index','FieldId','../../config/logger','api','request-promise','path','rimraf','./intSugarcrmField.attributes'];(function(_0x283348,_0xfef144){var _0x3f1de8=function(_0x490c61){while(--_0x490c61){_0x283348['push'](_0x283348['shift']());}};_0x3f1de8(++_0xfef144);}(_0xf56b,0x123));var _0xbf56=function(_0x3d2b32,_0x201572){_0x3d2b32=_0x3d2b32-0x0;var _0x545405=_0xf56b[_0x3d2b32];return _0x545405;};'use strict';var _=require('lodash');var util=require('util');var logger=require(_0xbf56('0x0'))(_0xbf56('0x1'));var moment=require('moment');var BPromise=require('bluebird');var rp=require(_0xbf56('0x2'));var fs=require('fs');var path=require(_0xbf56('0x3'));var rimraf=require(_0xbf56('0x4'));var config=require('../../config/environment');var attributes=require(_0xbf56('0x5'));module[_0xbf56('0x6')]=function(_0x490c7a,_0x9cf7e){return _0x490c7a['define'](_0xbf56('0x7'),attributes,{'tableName':_0xbf56('0x8'),'paranoid':![],'indexes':[{'name':_0xbf56('0x9'),'fields':['idField',_0xbf56('0xa')],'unique':!![]}],'timestamps':!![]});}; \ No newline at end of file diff --git a/server/api/intSugarcrmField/intSugarcrmField.rpc.js b/server/api/intSugarcrmField/intSugarcrmField.rpc.js index 4c53785..2d4fa19 100644 --- a/server/api/intSugarcrmField/intSugarcrmField.rpc.js +++ b/server/api/intSugarcrmField/intSugarcrmField.rpc.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xa569=['message','info','catch','moment','bluebird','randomstring','ioredis','../../config/utils','rpc','../../config/environment','client','http','request','then','SugarcrmField,\x20%s,\x20%s','debug','SugarcrmField,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','code'];(function(_0x35dbcf,_0x125d42){var _0x59bc6a=function(_0x2f0336){while(--_0x2f0336){_0x35dbcf['push'](_0x35dbcf['shift']());}};_0x59bc6a(++_0x125d42);}(_0xa569,0x192));var _0x9a56=function(_0x120123,_0x4eff59){_0x120123=_0x120123-0x0;var _0x3bec4c=_0xa569[_0x120123];return _0x3bec4c;};'use strict';var _=require('lodash');var util=require('util');var moment=require(_0x9a56('0x0'));var BPromise=require(_0x9a56('0x1'));var rs=require(_0x9a56('0x2'));var fs=require('fs');var Redis=require(_0x9a56('0x3'));var db=require('../../mysqldb')['db'];var utils=require(_0x9a56('0x4'));var logger=require('../../config/logger')(_0x9a56('0x5'));var config=require(_0x9a56('0x6'));var jayson=require('jayson/promise');var client=jayson[_0x9a56('0x7')][_0x9a56('0x8')]({'port':0x232a});function respondWithRpcPromise(_0x2ef053,_0x4ad0e6,_0x66a2c9){return new BPromise(function(_0x302979,_0x2bde54){return client[_0x9a56('0x9')](_0x2ef053,_0x66a2c9)[_0x9a56('0xa')](function(_0x2fb8dc){logger['info'](_0x9a56('0xb'),_0x4ad0e6,'request\x20sent');logger[_0x9a56('0xc')](_0x9a56('0xd'),_0x4ad0e6,_0x9a56('0xe'),JSON[_0x9a56('0xf')](_0x2fb8dc));if(_0x2fb8dc[_0x9a56('0x10')]){if(_0x2fb8dc[_0x9a56('0x10')][_0x9a56('0x11')]===0x1f4){logger['error'](_0x9a56('0xb'),_0x4ad0e6,_0x2fb8dc[_0x9a56('0x10')][_0x9a56('0x12')]);return _0x2bde54(_0x2fb8dc['error'][_0x9a56('0x12')]);}logger['error'](_0x9a56('0xb'),_0x4ad0e6,_0x2fb8dc[_0x9a56('0x10')][_0x9a56('0x12')]);return _0x302979(_0x2fb8dc[_0x9a56('0x10')][_0x9a56('0x12')]);}else{logger[_0x9a56('0x13')]('SugarcrmField,\x20%s,\x20%s',_0x4ad0e6,_0x9a56('0xe'));_0x302979(_0x2fb8dc['result'][_0x9a56('0x12')]);}})[_0x9a56('0x14')](function(_0x3a8640){logger[_0x9a56('0x10')](_0x9a56('0xb'),_0x4ad0e6,_0x3a8640);_0x2bde54(_0x3a8640);});});} \ No newline at end of file +var _0x47bd=['../../config/logger','rpc','../../config/environment','jayson/promise','client','http','request','then','info','SugarcrmField,\x20%s,\x20%s','request\x20sent','debug','SugarcrmField,\x20%s,\x20%s,\x20%s','stringify','error','message','result','lodash','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils'];(function(_0x3071b4,_0x5d2892){var _0x5b1d56=function(_0x3ddd3e){while(--_0x3ddd3e){_0x3071b4['push'](_0x3071b4['shift']());}};_0x5b1d56(++_0x5d2892);}(_0x47bd,0x156));var _0xd47b=function(_0x261d2d,_0x4322d6){_0x261d2d=_0x261d2d-0x0;var _0x42cd72=_0x47bd[_0x261d2d];return _0x42cd72;};'use strict';var _=require(_0xd47b('0x0'));var util=require(_0xd47b('0x1'));var moment=require(_0xd47b('0x2'));var BPromise=require(_0xd47b('0x3'));var rs=require(_0xd47b('0x4'));var fs=require('fs');var Redis=require(_0xd47b('0x5'));var db=require(_0xd47b('0x6'))['db'];var utils=require(_0xd47b('0x7'));var logger=require(_0xd47b('0x8'))(_0xd47b('0x9'));var config=require(_0xd47b('0xa'));var jayson=require(_0xd47b('0xb'));var client=jayson[_0xd47b('0xc')][_0xd47b('0xd')]({'port':0x232a});function respondWithRpcPromise(_0x132e5b,_0x7ed1ce,_0xce5196){return new BPromise(function(_0x46d123,_0x18e028){return client[_0xd47b('0xe')](_0x132e5b,_0xce5196)[_0xd47b('0xf')](function(_0x11361c){logger[_0xd47b('0x10')](_0xd47b('0x11'),_0x7ed1ce,_0xd47b('0x12'));logger[_0xd47b('0x13')](_0xd47b('0x14'),_0x7ed1ce,_0xd47b('0x12'),JSON[_0xd47b('0x15')](_0x11361c));if(_0x11361c[_0xd47b('0x16')]){if(_0x11361c['error']['code']===0x1f4){logger['error'](_0xd47b('0x11'),_0x7ed1ce,_0x11361c['error'][_0xd47b('0x17')]);return _0x18e028(_0x11361c[_0xd47b('0x16')][_0xd47b('0x17')]);}logger[_0xd47b('0x16')](_0xd47b('0x11'),_0x7ed1ce,_0x11361c['error'][_0xd47b('0x17')]);return _0x46d123(_0x11361c[_0xd47b('0x16')][_0xd47b('0x17')]);}else{logger['info'](_0xd47b('0x11'),_0x7ed1ce,_0xd47b('0x12'));_0x46d123(_0x11361c[_0xd47b('0x18')][_0xd47b('0x17')]);}})['catch'](function(_0x2be764){logger[_0xd47b('0x16')](_0xd47b('0x11'),_0x7ed1ce,_0x2be764);_0x18e028(_0x2be764);});});} \ No newline at end of file diff --git a/server/api/intVtigerAccount/index.js b/server/api/intVtigerAccount/index.js index b8a2dfa..45e0d13 100644 --- a/server/api/intVtigerAccount/index.js +++ b/server/api/intVtigerAccount/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xac52=['Router','../../components/auth/service','../../components/interaction/service','./intVtigerAccount.controller','get','isAuthenticated','/:id','show','/:id/configurations','getConfigurations','/:id/fields','post','create','put','update','delete','exports','util','path','connect-timeout','express'];(function(_0x1e15a5,_0xbcaf1e){var _0x4acc10=function(_0x441665){while(--_0x441665){_0x1e15a5['push'](_0x1e15a5['shift']());}};_0x4acc10(++_0xbcaf1e);}(_0xac52,0x122));var _0x2ac5=function(_0x138f59,_0x1b53fb){_0x138f59=_0x138f59-0x0;var _0x3d114d=_0xac52[_0x138f59];return _0x3d114d;};'use strict';var multer=require('multer');var util=require(_0x2ac5('0x0'));var path=require(_0x2ac5('0x1'));var timeout=require(_0x2ac5('0x2'));var express=require(_0x2ac5('0x3'));var router=express[_0x2ac5('0x4')]();var fs_extra=require('fs-extra');var auth=require(_0x2ac5('0x5'));var interaction=require(_0x2ac5('0x6'));var config=require('../../config/environment');var controller=require(_0x2ac5('0x7'));router[_0x2ac5('0x8')]('/',auth[_0x2ac5('0x9')](),controller['index']);router['get'](_0x2ac5('0xa'),auth[_0x2ac5('0x9')](),controller[_0x2ac5('0xb')]);router[_0x2ac5('0x8')](_0x2ac5('0xc'),auth[_0x2ac5('0x9')](),controller[_0x2ac5('0xd')]);router[_0x2ac5('0x8')](_0x2ac5('0xe'),auth[_0x2ac5('0x9')](),controller['getFields']);router[_0x2ac5('0xf')]('/',auth[_0x2ac5('0x9')](),controller[_0x2ac5('0x10')]);router[_0x2ac5('0xf')]('/:id/configurations',auth['isAuthenticated'](),controller['addConfiguration']);router[_0x2ac5('0x11')](_0x2ac5('0xa'),auth[_0x2ac5('0x9')](),controller[_0x2ac5('0x12')]);router[_0x2ac5('0x13')]('/:id',auth[_0x2ac5('0x9')](),controller['destroy']);module[_0x2ac5('0x14')]=router; \ No newline at end of file +var _0x60e6=['../../components/interaction/service','../../config/environment','./intVtigerAccount.controller','get','isAuthenticated','/:id','/:id/configurations','getConfigurations','/:id/fields','getFields','post','create','addConfiguration','put','update','delete','destroy','exports','multer','util','express','Router','fs-extra','../../components/auth/service'];(function(_0x5b23c1,_0x4aeeaa){var _0x26ba4c=function(_0x112356){while(--_0x112356){_0x5b23c1['push'](_0x5b23c1['shift']());}};_0x26ba4c(++_0x4aeeaa);}(_0x60e6,0xd2));var _0x660e=function(_0x1deb03,_0xd05ad8){_0x1deb03=_0x1deb03-0x0;var _0x189fe7=_0x60e6[_0x1deb03];return _0x189fe7;};'use strict';var multer=require(_0x660e('0x0'));var util=require(_0x660e('0x1'));var path=require('path');var timeout=require('connect-timeout');var express=require(_0x660e('0x2'));var router=express[_0x660e('0x3')]();var fs_extra=require(_0x660e('0x4'));var auth=require(_0x660e('0x5'));var interaction=require(_0x660e('0x6'));var config=require(_0x660e('0x7'));var controller=require(_0x660e('0x8'));router[_0x660e('0x9')]('/',auth[_0x660e('0xa')](),controller['index']);router[_0x660e('0x9')](_0x660e('0xb'),auth[_0x660e('0xa')](),controller['show']);router[_0x660e('0x9')](_0x660e('0xc'),auth['isAuthenticated'](),controller[_0x660e('0xd')]);router[_0x660e('0x9')](_0x660e('0xe'),auth[_0x660e('0xa')](),controller[_0x660e('0xf')]);router[_0x660e('0x10')]('/',auth[_0x660e('0xa')](),controller[_0x660e('0x11')]);router[_0x660e('0x10')](_0x660e('0xc'),auth[_0x660e('0xa')](),controller[_0x660e('0x12')]);router[_0x660e('0x13')]('/:id',auth[_0x660e('0xa')](),controller[_0x660e('0x14')]);router[_0x660e('0x15')](_0x660e('0xb'),auth[_0x660e('0xa')](),controller[_0x660e('0x16')]);module[_0x660e('0x17')]=router; \ No newline at end of file diff --git a/server/api/intVtigerAccount/intVtigerAccount.attributes.js b/server/api/intVtigerAccount/intVtigerAccount.attributes.js index d895e6c..8680dea 100644 --- a/server/api/intVtigerAccount/intVtigerAccount.attributes.js +++ b/server/api/intVtigerAccount/intVtigerAccount.attributes.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x88ee=['STRING','sequelize'];(function(_0x300384,_0x13c496){var _0x37afb1=function(_0x383f7c){while(--_0x383f7c){_0x300384['push'](_0x300384['shift']());}};_0x37afb1(++_0x13c496);}(_0x88ee,0x85));var _0xe88e=function(_0x3f9f15,_0x200a7b){_0x3f9f15=_0x3f9f15-0x0;var _0x3db403=_0x88ee[_0x3f9f15];return _0x3db403;};'use strict';var Sequelize=require(_0xe88e('0x0'));module['exports']={'name':{'type':Sequelize[_0xe88e('0x1')],'allowNull':![]},'description':{'type':Sequelize[_0xe88e('0x1')]},'username':{'type':Sequelize[_0xe88e('0x1')],'allowNull':![]},'moduleName':{'type':Sequelize[_0xe88e('0x1')],'allowNull':![],'defaultValue':'HelpDesk'},'remoteUri':{'type':Sequelize[_0xe88e('0x1')],'allowNull':![]},'serverUrl':{'type':Sequelize[_0xe88e('0x1')],'allowNull':![]},'accessKey':{'type':Sequelize['STRING'],'allowNull':![]}}; \ No newline at end of file +var _0x185a=['STRING','HelpDesk'];(function(_0x4c7fb5,_0x2548ef){var _0x2e10ac=function(_0xf7e27c){while(--_0xf7e27c){_0x4c7fb5['push'](_0x4c7fb5['shift']());}};_0x2e10ac(++_0x2548ef);}(_0x185a,0xcc));var _0xa185=function(_0x2dafbe,_0x5d04de){_0x2dafbe=_0x2dafbe-0x0;var _0x58a45a=_0x185a[_0x2dafbe];return _0x58a45a;};'use strict';var Sequelize=require('sequelize');module['exports']={'name':{'type':Sequelize[_0xa185('0x0')],'allowNull':![]},'description':{'type':Sequelize[_0xa185('0x0')]},'username':{'type':Sequelize['STRING'],'allowNull':![]},'moduleName':{'type':Sequelize[_0xa185('0x0')],'allowNull':![],'defaultValue':_0xa185('0x1')},'remoteUri':{'type':Sequelize[_0xa185('0x0')],'allowNull':![]},'serverUrl':{'type':Sequelize['STRING'],'allowNull':![]},'accessKey':{'type':Sequelize[_0xa185('0x0')],'allowNull':![]}}; \ No newline at end of file diff --git a/server/api/intVtigerAccount/intVtigerAccount.controller.js b/server/api/intVtigerAccount/intVtigerAccount.controller.js index 01f6699..6918da8 100644 --- a/server/api/intVtigerAccount/intVtigerAccount.controller.js +++ b/server/api/intVtigerAccount/intVtigerAccount.controller.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xd4db=['sort','where','pick','filter','merge','VIRTUAL','options','includeAll','findAll','catch','show','params','include','find','create','update','body','getConfigurations','findOne','addConfiguration','Subjects','getSubjects','channel','Descriptions','getDescriptions','VtigerConfiguration','VtigerField','md5','username','description','remoteUri','accessKey','moduleName','slice','substring','lastIndexOf','format','%s/webservice.php','GET','getchallenge','success','POST','login','result','token','describe','sessionName','owner','remove','editable','false','cf_','picklistValues','label','log','vTiger\x20error:\x20','test','statusCode','stringify','Wrong\x20credentials','rimraf','zip-dir','request-promise','moment','util','path','sox','ejs','fs-extra','lodash','squel','crypto','jsforce','to-csv','querystring','papaparse','../../components/auth/service','../../components/parsers/qs','../../config/license/hardware','../../config/logger','api','../../config/environment','../../components/integrations/configuration','end','status','json','undefined','limit','count','offset','Content-Range','apply','reject','save','then','destroy','error','stack','name','send','index','map','VtigerAccount','rawAttributes','fieldName','type','key','query','keys','filters','intersection','model','attributes','fields','length','hasOwnProperty','nolimit','order'];(function(_0x1ed46f,_0x7691d7){var _0x43b931=function(_0x5f2454){while(--_0x5f2454){_0x1ed46f['push'](_0x1ed46f['shift']());}};_0x43b931(++_0x7691d7);}(_0xd4db,0x128));var _0xbd4d=function(_0x5c1ba8,_0xe05727){_0x5c1ba8=_0x5c1ba8-0x0;var _0x2ba80c=_0xd4db[_0x5c1ba8];return _0x2ba80c;};'use strict';var emlformat=require('eml-format');var rimraf=require(_0xbd4d('0x0'));var zipdir=require(_0xbd4d('0x1'));var jsonpatch=require('fast-json-patch');var rp=require(_0xbd4d('0x2'));var moment=require(_0xbd4d('0x3'));var BPromise=require('bluebird');var Mustache=require('mustache');var util=require(_0xbd4d('0x4'));var path=require(_0xbd4d('0x5'));var sox=require(_0xbd4d('0x6'));var csv=require('to-csv');var ejs=require(_0xbd4d('0x7'));var fs=require('fs');var fs_extra=require(_0xbd4d('0x8'));var _=require(_0xbd4d('0x9'));var squel=require(_0xbd4d('0xa'));var crypto=require(_0xbd4d('0xb'));var jsforce=require(_0xbd4d('0xc'));var deskjs=require('desk.js');var toCsv=require(_0xbd4d('0xd'));var querystring=require(_0xbd4d('0xe'));var Papa=require(_0xbd4d('0xf'));var Redis=require('ioredis');var authService=require(_0xbd4d('0x10'));var qs=require(_0xbd4d('0x11'));var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0xbd4d('0x12'));var logger=require(_0xbd4d('0x13'))(_0xbd4d('0x14'));var utils=require('../../config/utils');var config=require(_0xbd4d('0x15'));var licenseUtil=require('../../config/license/util');var db=require('../../mysqldb')['db'];var integrations=require(_0xbd4d('0x16'));function respondWithStatusCode(_0x40be07,_0x3d69cd){_0x3d69cd=_0x3d69cd||0xcc;return function(_0x115559){if(_0x115559){return _0x40be07['sendStatus'](_0x3d69cd);}return _0x40be07['status'](_0x3d69cd)[_0xbd4d('0x17')]();};}function respondWithResult(_0x29e370,_0x5f19bd){_0x5f19bd=_0x5f19bd||0xc8;return function(_0x4b6bbe){if(_0x4b6bbe){return _0x29e370[_0xbd4d('0x18')](_0x5f19bd)[_0xbd4d('0x19')](_0x4b6bbe);}};}function respondWithFilteredResult(_0x2df0f1,_0x513b29){return function(_0xe94075){if(_0xe94075){var _0x502ee9=typeof _0x513b29['offset']===_0xbd4d('0x1a')&&typeof _0x513b29[_0xbd4d('0x1b')]===_0xbd4d('0x1a');var _0x1c88cb=_0xe94075[_0xbd4d('0x1c')];var _0xde808c=_0x502ee9?0x0:_0x513b29[_0xbd4d('0x1d')];var _0x31b263=_0x502ee9?_0xe94075[_0xbd4d('0x1c')]:_0x513b29[_0xbd4d('0x1d')]+_0x513b29[_0xbd4d('0x1b')];var _0x78e2d0;if(_0x31b263>=_0x1c88cb){_0x31b263=_0x1c88cb;_0x78e2d0=0xc8;}else{_0x78e2d0=0xce;}_0x2df0f1[_0xbd4d('0x18')](_0x78e2d0);return _0x2df0f1['set'](_0xbd4d('0x1e'),_0xde808c+'-'+_0x31b263+'/'+_0x1c88cb)[_0xbd4d('0x19')](_0xe94075);}return null;};}function patchUpdates(_0x220c6f){return function(_0x38f0bd){try{jsonpatch[_0xbd4d('0x1f')](_0x38f0bd,_0x220c6f,!![]);}catch(_0x2a9c42){return BPromise[_0xbd4d('0x20')](_0x2a9c42);}return _0x38f0bd[_0xbd4d('0x21')]();};}function saveUpdates(_0x50845f,_0x4ebcbc){return function(_0x25b6a9){if(_0x25b6a9){return _0x25b6a9['update'](_0x50845f)[_0xbd4d('0x22')](function(_0x1644a5){return _0x1644a5;});}return null;};}function removeEntity(_0x13650b,_0x4098b6){return function(_0x2e0678){if(_0x2e0678){return _0x2e0678[_0xbd4d('0x23')]()['then'](function(){_0x13650b[_0xbd4d('0x18')](0xcc)[_0xbd4d('0x17')]();});}};}function handleEntityNotFound(_0xa004c7,_0x1262d7){return function(_0x35f48b){if(!_0x35f48b){_0xa004c7['sendStatus'](0x194);}return _0x35f48b;};}function handleError(_0x4db5a2,_0x362cbe){_0x362cbe=_0x362cbe||0x1f4;return function(_0x155cb1){logger[_0xbd4d('0x24')](_0x155cb1[_0xbd4d('0x25')]);if(_0x155cb1[_0xbd4d('0x26')]){delete _0x155cb1[_0xbd4d('0x26')];}_0x4db5a2[_0xbd4d('0x18')](_0x362cbe)[_0xbd4d('0x27')](_0x155cb1);};}exports[_0xbd4d('0x28')]=function(_0x4c3e4c,_0x88c93d){var _0x40e290={},_0x3f0a73={},_0x47711a={'count':0x0,'rows':[]};var _0x1268bb=_[_0xbd4d('0x29')](db[_0xbd4d('0x2a')][_0xbd4d('0x2b')],function(_0x5cb47b){return{'name':_0x5cb47b[_0xbd4d('0x2c')],'type':_0x5cb47b[_0xbd4d('0x2d')][_0xbd4d('0x2e')]};});_0x3f0a73['model']=_['map'](_0x1268bb,_0xbd4d('0x26'));_0x3f0a73[_0xbd4d('0x2f')]=_[_0xbd4d('0x30')](_0x4c3e4c[_0xbd4d('0x2f')]);_0x3f0a73[_0xbd4d('0x31')]=_[_0xbd4d('0x32')](_0x3f0a73[_0xbd4d('0x33')],_0x3f0a73['query']);_0x40e290[_0xbd4d('0x34')]=_['intersection'](_0x3f0a73[_0xbd4d('0x33')],qs[_0xbd4d('0x35')](_0x4c3e4c['query'][_0xbd4d('0x35')]));_0x40e290[_0xbd4d('0x34')]=_0x40e290[_0xbd4d('0x34')][_0xbd4d('0x36')]?_0x40e290['attributes']:_0x3f0a73[_0xbd4d('0x33')];if(!_0x4c3e4c[_0xbd4d('0x2f')][_0xbd4d('0x37')](_0xbd4d('0x38'))){_0x40e290[_0xbd4d('0x1b')]=qs['limit'](_0x4c3e4c[_0xbd4d('0x2f')][_0xbd4d('0x1b')]);_0x40e290[_0xbd4d('0x1d')]=qs[_0xbd4d('0x1d')](_0x4c3e4c[_0xbd4d('0x2f')][_0xbd4d('0x1d')]);}_0x40e290[_0xbd4d('0x39')]=qs[_0xbd4d('0x3a')](_0x4c3e4c[_0xbd4d('0x2f')]['sort']);_0x40e290[_0xbd4d('0x3b')]=qs['filters'](_[_0xbd4d('0x3c')](_0x4c3e4c[_0xbd4d('0x2f')],_0x3f0a73[_0xbd4d('0x31')]),_0x1268bb);if(_0x4c3e4c['query'][_0xbd4d('0x3d')]){_0x40e290['where']=_[_0xbd4d('0x3e')](_0x40e290[_0xbd4d('0x3b')],{'$or':_[_0xbd4d('0x29')](_0x1268bb,function(_0x4668f9){if(_0x4668f9[_0xbd4d('0x2d')]!==_0xbd4d('0x3f')){var _0x559834={};_0x559834[_0x4668f9[_0xbd4d('0x26')]]={'$like':'%'+_0x4c3e4c[_0xbd4d('0x2f')]['filter']+'%'};return _0x559834;}})});}_0x40e290=_[_0xbd4d('0x3e')]({},_0x40e290,_0x4c3e4c[_0xbd4d('0x40')]);var _0x336a7a={'where':_0x40e290[_0xbd4d('0x3b')]};return db[_0xbd4d('0x2a')][_0xbd4d('0x1c')](_0x336a7a)[_0xbd4d('0x22')](function(_0x2c4f56){_0x47711a[_0xbd4d('0x1c')]=_0x2c4f56;if(_0x4c3e4c['query'][_0xbd4d('0x41')]){_0x40e290['include']=[{'all':!![]}];}return db[_0xbd4d('0x2a')][_0xbd4d('0x42')](_0x40e290);})[_0xbd4d('0x22')](function(_0x5268c9){_0x47711a['rows']=_0x5268c9;return _0x47711a;})[_0xbd4d('0x22')](respondWithFilteredResult(_0x88c93d,_0x40e290))[_0xbd4d('0x43')](handleError(_0x88c93d,null));};exports[_0xbd4d('0x44')]=function(_0x2d7255,_0x440e32){var _0x1b462d={'raw':![],'where':{'id':_0x2d7255[_0xbd4d('0x45')]['id']}},_0x8c1a13={};_0x8c1a13[_0xbd4d('0x33')]=_['keys'](db['VtigerAccount'][_0xbd4d('0x2b')]);_0x8c1a13['query']=_[_0xbd4d('0x30')](_0x2d7255['query']);_0x8c1a13[_0xbd4d('0x31')]=_[_0xbd4d('0x32')](_0x8c1a13[_0xbd4d('0x33')],_0x8c1a13[_0xbd4d('0x2f')]);_0x1b462d[_0xbd4d('0x34')]=_[_0xbd4d('0x32')](_0x8c1a13[_0xbd4d('0x33')],qs[_0xbd4d('0x35')](_0x2d7255[_0xbd4d('0x2f')][_0xbd4d('0x35')]));_0x1b462d[_0xbd4d('0x34')]=_0x1b462d[_0xbd4d('0x34')][_0xbd4d('0x36')]?_0x1b462d[_0xbd4d('0x34')]:_0x8c1a13[_0xbd4d('0x33')];if(_0x2d7255[_0xbd4d('0x2f')][_0xbd4d('0x41')]){_0x1b462d[_0xbd4d('0x46')]=[{'all':!![]}];}_0x1b462d=_[_0xbd4d('0x3e')]({},_0x1b462d,_0x2d7255[_0xbd4d('0x40')]);return db[_0xbd4d('0x2a')][_0xbd4d('0x47')](_0x1b462d)[_0xbd4d('0x22')](handleEntityNotFound(_0x440e32,null))[_0xbd4d('0x22')](respondWithResult(_0x440e32,null))['catch'](handleError(_0x440e32,null));};exports[_0xbd4d('0x48')]=function(_0x2f15e0,_0x4d7210){return db['VtigerAccount'][_0xbd4d('0x48')](_0x2f15e0['body'],{})[_0xbd4d('0x22')](respondWithResult(_0x4d7210,0xc9))['catch'](handleError(_0x4d7210,null));};exports[_0xbd4d('0x49')]=function(_0x402cd8,_0x4ca784){if(_0x402cd8[_0xbd4d('0x4a')]['id']){delete _0x402cd8[_0xbd4d('0x4a')]['id'];}return db[_0xbd4d('0x2a')]['find']({'where':{'id':_0x402cd8['params']['id']}})[_0xbd4d('0x22')](handleEntityNotFound(_0x4ca784,null))[_0xbd4d('0x22')](saveUpdates(_0x402cd8[_0xbd4d('0x4a')],null))[_0xbd4d('0x22')](respondWithResult(_0x4ca784,null))[_0xbd4d('0x43')](handleError(_0x4ca784,null));};exports[_0xbd4d('0x23')]=function(_0x41bd44,_0x16bfeb){return db['VtigerAccount'][_0xbd4d('0x47')]({'where':{'id':_0x41bd44[_0xbd4d('0x45')]['id']}})[_0xbd4d('0x22')](handleEntityNotFound(_0x16bfeb,null))[_0xbd4d('0x22')](removeEntity(_0x16bfeb,null))[_0xbd4d('0x43')](handleError(_0x16bfeb,null));};exports[_0xbd4d('0x4b')]=function(_0x36398e,_0x527c63,_0x1f177f){var _0x1fc742={};var _0x4c2426={};var _0x36628d;var _0x1d6fd8;return db[_0xbd4d('0x2a')][_0xbd4d('0x4c')]({'where':{'id':_0x36398e['params']['id']}})[_0xbd4d('0x22')](handleEntityNotFound(_0x527c63,null))[_0xbd4d('0x22')](function(_0x3f2ef7){if(_0x3f2ef7){_0x36628d=_0x3f2ef7;_0x4c2426['model']=_[_0xbd4d('0x30')](db['VtigerConfiguration'][_0xbd4d('0x2b')]);_0x4c2426['query']=_['keys'](_0x36398e['query']);_0x4c2426['filters']=_[_0xbd4d('0x32')](_0x4c2426[_0xbd4d('0x33')],_0x4c2426[_0xbd4d('0x2f')]);_0x1fc742[_0xbd4d('0x34')]=_[_0xbd4d('0x32')](_0x4c2426[_0xbd4d('0x33')],qs[_0xbd4d('0x35')](_0x36398e['query']['fields']));_0x1fc742[_0xbd4d('0x34')]=_0x1fc742[_0xbd4d('0x34')]['length']?_0x1fc742[_0xbd4d('0x34')]:_0x4c2426['model'];_0x1fc742['order']=qs[_0xbd4d('0x3a')](_0x36398e[_0xbd4d('0x2f')][_0xbd4d('0x3a')]);_0x1fc742[_0xbd4d('0x3b')]=qs['filters'](_[_0xbd4d('0x3c')](_0x36398e[_0xbd4d('0x2f')],_0x4c2426[_0xbd4d('0x31')]));if(_0x36398e[_0xbd4d('0x2f')][_0xbd4d('0x3d')]){_0x1fc742[_0xbd4d('0x3b')]=_[_0xbd4d('0x3e')](_0x1fc742[_0xbd4d('0x3b')],{'$or':_[_0xbd4d('0x29')](_0x1fc742[_0xbd4d('0x34')],function(_0xc3e2a4){var _0x193bee={};_0x193bee[_0xc3e2a4]={'$like':'%'+_0x36398e['query'][_0xbd4d('0x3d')]+'%'};return _0x193bee;})});}_0x1fc742=_[_0xbd4d('0x3e')]({},_0x1fc742,_0x36398e['options']);return _0x36628d[_0xbd4d('0x4b')](_0x1fc742);}})[_0xbd4d('0x22')](function(_0x22ac19){if(_0x22ac19){_0x1d6fd8=_0x22ac19['length'];if(!_0x36398e[_0xbd4d('0x2f')]['hasOwnProperty'](_0xbd4d('0x38'))){_0x1fc742[_0xbd4d('0x1b')]=qs[_0xbd4d('0x1b')](_0x36398e[_0xbd4d('0x2f')][_0xbd4d('0x1b')]);_0x1fc742['offset']=qs['offset'](_0x36398e[_0xbd4d('0x2f')][_0xbd4d('0x1d')]);}return _0x36628d[_0xbd4d('0x4b')](_0x1fc742);}})[_0xbd4d('0x22')](function(_0x294465){if(_0x294465){return _0x294465?{'count':_0x1d6fd8,'rows':_0x294465}:null;}})[_0xbd4d('0x22')](respondWithResult(_0x527c63,null))['catch'](handleError(_0x527c63,null));};exports[_0xbd4d('0x4d')]=function(_0x74299d,_0x3800ec,_0x2234bb){if(_0x74299d[_0xbd4d('0x4a')]['id']){delete _0x74299d[_0xbd4d('0x4a')]['id'];}return db[_0xbd4d('0x2a')]['findOne']({'where':{'id':_0x74299d[_0xbd4d('0x45')]['id']}})[_0xbd4d('0x22')](handleEntityNotFound(_0x3800ec,null))[_0xbd4d('0x22')](function(_0x5538d8){if(_0x5538d8){_0x74299d['body']['AccountId']=_0x5538d8['id'];_0x74299d['body'][_0xbd4d('0x4e')]=integrations[_0xbd4d('0x4f')](_0x74299d[_0xbd4d('0x4a')][_0xbd4d('0x50')],_0x74299d['body'][_0xbd4d('0x2d')]);_0x74299d[_0xbd4d('0x4a')][_0xbd4d('0x51')]=integrations[_0xbd4d('0x52')](_0x74299d[_0xbd4d('0x4a')][_0xbd4d('0x50')],_0x74299d['body'][_0xbd4d('0x2d')]);return db[_0xbd4d('0x53')][_0xbd4d('0x48')](_0x74299d[_0xbd4d('0x4a')],{'include':[{'model':db[_0xbd4d('0x54')],'as':_0xbd4d('0x4e')},{'model':db['VtigerField'],'as':_0xbd4d('0x51')}]});}return null;})[_0xbd4d('0x22')](respondWithResult(_0x3800ec,null))[_0xbd4d('0x43')](handleError(_0x3800ec,null));};var md5=require(_0xbd4d('0x55'));exports['getFields']=function(_0x1a1aef,_0x43300d,_0x3d2ada){var _0x44ced8=null;var _0x4eb748=null;var _0x43d5ea=null;var _0x4230a8=null;var _0x348253='';return db[_0xbd4d('0x2a')][_0xbd4d('0x4c')]({'where':{'id':_0x1a1aef[_0xbd4d('0x45')]['id']},'attributes':['id',_0xbd4d('0x26'),_0xbd4d('0x56'),_0xbd4d('0x57'),'moduleName',_0xbd4d('0x58'),'serverUrl',_0xbd4d('0x59')]})[_0xbd4d('0x22')](handleEntityNotFound(_0x43300d,null))[_0xbd4d('0x22')](function(_0x53d256){if(_0x53d256){_0x44ced8=_0x53d256[_0xbd4d('0x56')];_0x4eb748=_0x53d256[_0xbd4d('0x59')];_0x43d5ea=_0x53d256[_0xbd4d('0x5a')];_0x348253=_0x53d256['remoteUri'];var _0x233be3=_0x348253[_0xbd4d('0x5b')](-0x1);if(_0x233be3==='/'){_0x348253=_0x348253[_0xbd4d('0x5c')](0x0,_0x348253[_0xbd4d('0x5d')](_0x233be3));}_0x4230a8=util[_0xbd4d('0x5e')](_0xbd4d('0x5f'),_0x348253);var _0x46551d={'method':_0xbd4d('0x60'),'uri':_0x4230a8,'qs':{'operation':_0xbd4d('0x61'),'username':_0x53d256[_0xbd4d('0x56')]},'json':!![]};return rp(_0x46551d);}})[_0xbd4d('0x22')](function(_0x4827c4){if(_0x4827c4[_0xbd4d('0x62')]){var _0x3041f5={'method':_0xbd4d('0x63'),'uri':_0x4230a8,'form':{'operation':_0xbd4d('0x64'),'username':_0x44ced8,'accessKey':md5(_0x4827c4[_0xbd4d('0x65')][_0xbd4d('0x66')]+_0x4eb748)},'json':!![]};return rp(_0x3041f5);}})[_0xbd4d('0x22')](function(_0x1f674e){if(_0x1f674e[_0xbd4d('0x62')]){var _0x4797e3={'method':_0xbd4d('0x60'),'uri':_0x4230a8,'qs':{'operation':_0xbd4d('0x67'),'username':_0x44ced8,'sessionName':_0x1f674e[_0xbd4d('0x65')][_0xbd4d('0x68')],'elementType':_0x43d5ea},'json':!![]};return rp(_0x4797e3);}})[_0xbd4d('0x22')](function(_0x55aa6b){if(_0x55aa6b['success']){var _0x31da37=['autogenerated','reference',_0xbd4d('0x69')];_[_0xbd4d('0x6a')](_0x55aa6b['result'][_0xbd4d('0x35')],function(_0x59d201){return _0x31da37['includes'](_0x59d201[_0xbd4d('0x2d')][_0xbd4d('0x26')]);});_[_0xbd4d('0x6a')](_0x55aa6b[_0xbd4d('0x65')]['fields'],function(_0x1ed4de){return _0x1ed4de[_0xbd4d('0x6b')]===_0xbd4d('0x6c');});return{'count':_0x55aa6b[_0xbd4d('0x65')]['fields'][_0xbd4d('0x36')],'rows':_['map'](_0x55aa6b[_0xbd4d('0x65')][_0xbd4d('0x35')],function(_0x4f642e){return{'id':_0x4f642e[_0xbd4d('0x26')],'name':_0x4f642e['label'],'custom':_['startsWith'](_0x4f642e[_0xbd4d('0x26')],_0xbd4d('0x6d'))?!![]:![],'options':_0x4f642e[_0xbd4d('0x2d')]['name']==='picklist'&&_0x4f642e['type'][_0xbd4d('0x6e')][_0xbd4d('0x36')]>0x0?_['map'](_0x4f642e[_0xbd4d('0x2d')][_0xbd4d('0x6e')],function(_0xcefa7b){return{'name':_0xcefa7b[_0xbd4d('0x6f')],'value':_0xcefa7b['value']};}):[]};})};}})[_0xbd4d('0x22')](respondWithResult(_0x43300d,null))[_0xbd4d('0x43')](function(_0x4e9984){console[_0xbd4d('0x70')](_0xbd4d('0x71')+_0x4e9984);var _0x1bc149=_0x1a1aef[_0xbd4d('0x2f')][_0xbd4d('0x72')]?0x1f4:_0x4e9984[_0xbd4d('0x73')]||0x1f4;logger['error']('getFields,\x20%s,\x20%s,\x20%s','getFields',_0x1bc149,JSON[_0xbd4d('0x74')](_0x4e9984));delete _0x4e9984[_0xbd4d('0x26')];if(_0x1bc149===0x191){_0x1bc149=0x190;}_0x43300d[_0xbd4d('0x18')](_0x1bc149)['send'](_0x1a1aef['query']['test']?{'message':_0xbd4d('0x75'),'statusCode':_0x4e9984[_0xbd4d('0x73')]}:_0x4e9984);});}; \ No newline at end of file +var _0x64b9=['params','body','find','getConfigurations','findOne','VtigerConfiguration','nolimit','addConfiguration','AccountId','Descriptions','getDescriptions','create','Subjects','VtigerField','md5','username','moduleName','remoteUri','serverUrl','accessKey','slice','substring','lastIndexOf','format','%s/webservice.php','GET','getchallenge','success','POST','login','result','token','describe','sessionName','remove','includes','editable','false','label','startsWith','cf_','picklist','picklistValues','value','log','vTiger\x20error:\x20','test','statusCode','getFields,\x20%s,\x20%s,\x20%s','getFields','stringify','Wrong\x20credentials','rimraf','fast-json-patch','moment','path','sox','to-csv','ejs','fs-extra','squel','crypto','desk.js','papaparse','ioredis','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','../../components/integrations/configuration','status','json','offset','undefined','count','limit','set','Content-Range','reject','save','then','destroy','end','sendStatus','stack','name','send','VtigerAccount','rawAttributes','fieldName','type','model','query','keys','intersection','attributes','fields','length','hasOwnProperty','order','sort','where','filters','pick','filter','merge','map','options','includeAll','include','findAll','catch','show'];(function(_0x5e3115,_0x540600){var _0x5a1dc6=function(_0x1163f5){while(--_0x1163f5){_0x5e3115['push'](_0x5e3115['shift']());}};_0x5a1dc6(++_0x540600);}(_0x64b9,0xaa));var _0x964b=function(_0x2591ef,_0x513a9b){_0x2591ef=_0x2591ef-0x0;var _0x5a999a=_0x64b9[_0x2591ef];return _0x5a999a;};'use strict';var emlformat=require('eml-format');var rimraf=require(_0x964b('0x0'));var zipdir=require('zip-dir');var jsonpatch=require(_0x964b('0x1'));var rp=require('request-promise');var moment=require(_0x964b('0x2'));var BPromise=require('bluebird');var Mustache=require('mustache');var util=require('util');var path=require(_0x964b('0x3'));var sox=require(_0x964b('0x4'));var csv=require(_0x964b('0x5'));var ejs=require(_0x964b('0x6'));var fs=require('fs');var fs_extra=require(_0x964b('0x7'));var _=require('lodash');var squel=require(_0x964b('0x8'));var crypto=require(_0x964b('0x9'));var jsforce=require('jsforce');var deskjs=require(_0x964b('0xa'));var toCsv=require(_0x964b('0x5'));var querystring=require('querystring');var Papa=require(_0x964b('0xb'));var Redis=require(_0x964b('0xc'));var authService=require('../../components/auth/service');var qs=require(_0x964b('0xd'));var as=require(_0x964b('0xe'));var hardwareService=require(_0x964b('0xf'));var logger=require(_0x964b('0x10'))(_0x964b('0x11'));var utils=require(_0x964b('0x12'));var config=require(_0x964b('0x13'));var licenseUtil=require(_0x964b('0x14'));var db=require(_0x964b('0x15'))['db'];var integrations=require(_0x964b('0x16'));function respondWithStatusCode(_0x4bfd79,_0x2283ba){_0x2283ba=_0x2283ba||0xcc;return function(_0x163b08){if(_0x163b08){return _0x4bfd79['sendStatus'](_0x2283ba);}return _0x4bfd79[_0x964b('0x17')](_0x2283ba)['end']();};}function respondWithResult(_0x39c101,_0x182342){_0x182342=_0x182342||0xc8;return function(_0x1e9cd3){if(_0x1e9cd3){return _0x39c101[_0x964b('0x17')](_0x182342)[_0x964b('0x18')](_0x1e9cd3);}};}function respondWithFilteredResult(_0x44c634,_0x3e411e){return function(_0x27d7fb){if(_0x27d7fb){var _0x2576ac=typeof _0x3e411e[_0x964b('0x19')]===_0x964b('0x1a')&&typeof _0x3e411e['limit']==='undefined';var _0x311f85=_0x27d7fb[_0x964b('0x1b')];var _0x345f8d=_0x2576ac?0x0:_0x3e411e[_0x964b('0x19')];var _0x483d5b=_0x2576ac?_0x27d7fb[_0x964b('0x1b')]:_0x3e411e[_0x964b('0x19')]+_0x3e411e[_0x964b('0x1c')];var _0x3f9cf0;if(_0x483d5b>=_0x311f85){_0x483d5b=_0x311f85;_0x3f9cf0=0xc8;}else{_0x3f9cf0=0xce;}_0x44c634[_0x964b('0x17')](_0x3f9cf0);return _0x44c634[_0x964b('0x1d')](_0x964b('0x1e'),_0x345f8d+'-'+_0x483d5b+'/'+_0x311f85)[_0x964b('0x18')](_0x27d7fb);}return null;};}function patchUpdates(_0x165ab4){return function(_0xc26aed){try{jsonpatch['apply'](_0xc26aed,_0x165ab4,!![]);}catch(_0x44772b){return BPromise[_0x964b('0x1f')](_0x44772b);}return _0xc26aed[_0x964b('0x20')]();};}function saveUpdates(_0x190cd9,_0x5d359f){return function(_0x2d56bf){if(_0x2d56bf){return _0x2d56bf['update'](_0x190cd9)[_0x964b('0x21')](function(_0x468008){return _0x468008;});}return null;};}function removeEntity(_0x23f245,_0x4a12ff){return function(_0x2a64d6){if(_0x2a64d6){return _0x2a64d6[_0x964b('0x22')]()['then'](function(){_0x23f245['status'](0xcc)[_0x964b('0x23')]();});}};}function handleEntityNotFound(_0xddc05,_0x4f3686){return function(_0xfd1d78){if(!_0xfd1d78){_0xddc05[_0x964b('0x24')](0x194);}return _0xfd1d78;};}function handleError(_0x2888f1,_0xa27a47){_0xa27a47=_0xa27a47||0x1f4;return function(_0x26da9f){logger['error'](_0x26da9f[_0x964b('0x25')]);if(_0x26da9f[_0x964b('0x26')]){delete _0x26da9f[_0x964b('0x26')];}_0x2888f1[_0x964b('0x17')](_0xa27a47)[_0x964b('0x27')](_0x26da9f);};}exports['index']=function(_0x1a5bec,_0x13ca65){var _0x18897e={},_0x4cb82f={},_0x4dedcf={'count':0x0,'rows':[]};var _0x2fafc5=_['map'](db[_0x964b('0x28')][_0x964b('0x29')],function(_0x17ce88){return{'name':_0x17ce88[_0x964b('0x2a')],'type':_0x17ce88[_0x964b('0x2b')]['key']};});_0x4cb82f[_0x964b('0x2c')]=_['map'](_0x2fafc5,_0x964b('0x26'));_0x4cb82f[_0x964b('0x2d')]=_[_0x964b('0x2e')](_0x1a5bec[_0x964b('0x2d')]);_0x4cb82f['filters']=_[_0x964b('0x2f')](_0x4cb82f[_0x964b('0x2c')],_0x4cb82f[_0x964b('0x2d')]);_0x18897e[_0x964b('0x30')]=_[_0x964b('0x2f')](_0x4cb82f[_0x964b('0x2c')],qs[_0x964b('0x31')](_0x1a5bec[_0x964b('0x2d')]['fields']));_0x18897e['attributes']=_0x18897e[_0x964b('0x30')][_0x964b('0x32')]?_0x18897e[_0x964b('0x30')]:_0x4cb82f[_0x964b('0x2c')];if(!_0x1a5bec[_0x964b('0x2d')][_0x964b('0x33')]('nolimit')){_0x18897e[_0x964b('0x1c')]=qs[_0x964b('0x1c')](_0x1a5bec[_0x964b('0x2d')][_0x964b('0x1c')]);_0x18897e[_0x964b('0x19')]=qs[_0x964b('0x19')](_0x1a5bec[_0x964b('0x2d')]['offset']);}_0x18897e[_0x964b('0x34')]=qs[_0x964b('0x35')](_0x1a5bec[_0x964b('0x2d')][_0x964b('0x35')]);_0x18897e[_0x964b('0x36')]=qs[_0x964b('0x37')](_[_0x964b('0x38')](_0x1a5bec[_0x964b('0x2d')],_0x4cb82f[_0x964b('0x37')]),_0x2fafc5);if(_0x1a5bec[_0x964b('0x2d')][_0x964b('0x39')]){_0x18897e[_0x964b('0x36')]=_[_0x964b('0x3a')](_0x18897e[_0x964b('0x36')],{'$or':_[_0x964b('0x3b')](_0x2fafc5,function(_0x50bbb9){if(_0x50bbb9['type']!=='VIRTUAL'){var _0x5ee80f={};_0x5ee80f[_0x50bbb9[_0x964b('0x26')]]={'$like':'%'+_0x1a5bec[_0x964b('0x2d')][_0x964b('0x39')]+'%'};return _0x5ee80f;}})});}_0x18897e=_[_0x964b('0x3a')]({},_0x18897e,_0x1a5bec[_0x964b('0x3c')]);var _0x170edc={'where':_0x18897e[_0x964b('0x36')]};return db[_0x964b('0x28')]['count'](_0x170edc)[_0x964b('0x21')](function(_0x3e97bc){_0x4dedcf[_0x964b('0x1b')]=_0x3e97bc;if(_0x1a5bec[_0x964b('0x2d')][_0x964b('0x3d')]){_0x18897e[_0x964b('0x3e')]=[{'all':!![]}];}return db['VtigerAccount'][_0x964b('0x3f')](_0x18897e);})[_0x964b('0x21')](function(_0x23c028){_0x4dedcf['rows']=_0x23c028;return _0x4dedcf;})[_0x964b('0x21')](respondWithFilteredResult(_0x13ca65,_0x18897e))[_0x964b('0x40')](handleError(_0x13ca65,null));};exports[_0x964b('0x41')]=function(_0x226359,_0x9c38c9){var _0x2db0c4={'raw':![],'where':{'id':_0x226359[_0x964b('0x42')]['id']}},_0xe89131={};_0xe89131[_0x964b('0x2c')]=_[_0x964b('0x2e')](db[_0x964b('0x28')][_0x964b('0x29')]);_0xe89131[_0x964b('0x2d')]=_['keys'](_0x226359[_0x964b('0x2d')]);_0xe89131[_0x964b('0x37')]=_[_0x964b('0x2f')](_0xe89131[_0x964b('0x2c')],_0xe89131['query']);_0x2db0c4[_0x964b('0x30')]=_[_0x964b('0x2f')](_0xe89131[_0x964b('0x2c')],qs[_0x964b('0x31')](_0x226359[_0x964b('0x2d')][_0x964b('0x31')]));_0x2db0c4['attributes']=_0x2db0c4[_0x964b('0x30')][_0x964b('0x32')]?_0x2db0c4[_0x964b('0x30')]:_0xe89131[_0x964b('0x2c')];if(_0x226359['query'][_0x964b('0x3d')]){_0x2db0c4[_0x964b('0x3e')]=[{'all':!![]}];}_0x2db0c4=_[_0x964b('0x3a')]({},_0x2db0c4,_0x226359[_0x964b('0x3c')]);return db[_0x964b('0x28')]['find'](_0x2db0c4)[_0x964b('0x21')](handleEntityNotFound(_0x9c38c9,null))[_0x964b('0x21')](respondWithResult(_0x9c38c9,null))[_0x964b('0x40')](handleError(_0x9c38c9,null));};exports['create']=function(_0x3695b6,_0x1060e3){return db[_0x964b('0x28')]['create'](_0x3695b6[_0x964b('0x43')],{})[_0x964b('0x21')](respondWithResult(_0x1060e3,0xc9))['catch'](handleError(_0x1060e3,null));};exports['update']=function(_0xd54ece,_0xcf815a){if(_0xd54ece['body']['id']){delete _0xd54ece[_0x964b('0x43')]['id'];}return db[_0x964b('0x28')]['find']({'where':{'id':_0xd54ece[_0x964b('0x42')]['id']}})['then'](handleEntityNotFound(_0xcf815a,null))['then'](saveUpdates(_0xd54ece['body'],null))['then'](respondWithResult(_0xcf815a,null))[_0x964b('0x40')](handleError(_0xcf815a,null));};exports[_0x964b('0x22')]=function(_0x15ec83,_0x4fc050){return db['VtigerAccount'][_0x964b('0x44')]({'where':{'id':_0x15ec83['params']['id']}})[_0x964b('0x21')](handleEntityNotFound(_0x4fc050,null))[_0x964b('0x21')](removeEntity(_0x4fc050,null))[_0x964b('0x40')](handleError(_0x4fc050,null));};exports[_0x964b('0x45')]=function(_0x144d0c,_0x4abb2e,_0x5dabcd){var _0x285558={};var _0x1a18af={};var _0x4b439f;var _0x470e9a;return db[_0x964b('0x28')][_0x964b('0x46')]({'where':{'id':_0x144d0c[_0x964b('0x42')]['id']}})['then'](handleEntityNotFound(_0x4abb2e,null))[_0x964b('0x21')](function(_0x592e53){if(_0x592e53){_0x4b439f=_0x592e53;_0x1a18af[_0x964b('0x2c')]=_[_0x964b('0x2e')](db[_0x964b('0x47')][_0x964b('0x29')]);_0x1a18af['query']=_['keys'](_0x144d0c['query']);_0x1a18af[_0x964b('0x37')]=_[_0x964b('0x2f')](_0x1a18af[_0x964b('0x2c')],_0x1a18af['query']);_0x285558[_0x964b('0x30')]=_['intersection'](_0x1a18af[_0x964b('0x2c')],qs[_0x964b('0x31')](_0x144d0c[_0x964b('0x2d')]['fields']));_0x285558[_0x964b('0x30')]=_0x285558[_0x964b('0x30')][_0x964b('0x32')]?_0x285558[_0x964b('0x30')]:_0x1a18af['model'];_0x285558[_0x964b('0x34')]=qs[_0x964b('0x35')](_0x144d0c[_0x964b('0x2d')][_0x964b('0x35')]);_0x285558[_0x964b('0x36')]=qs[_0x964b('0x37')](_[_0x964b('0x38')](_0x144d0c[_0x964b('0x2d')],_0x1a18af[_0x964b('0x37')]));if(_0x144d0c['query'][_0x964b('0x39')]){_0x285558[_0x964b('0x36')]=_[_0x964b('0x3a')](_0x285558[_0x964b('0x36')],{'$or':_[_0x964b('0x3b')](_0x285558['attributes'],function(_0x48ea2e){var _0x29ec11={};_0x29ec11[_0x48ea2e]={'$like':'%'+_0x144d0c[_0x964b('0x2d')][_0x964b('0x39')]+'%'};return _0x29ec11;})});}_0x285558=_[_0x964b('0x3a')]({},_0x285558,_0x144d0c[_0x964b('0x3c')]);return _0x4b439f['getConfigurations'](_0x285558);}})[_0x964b('0x21')](function(_0x1d474e){if(_0x1d474e){_0x470e9a=_0x1d474e['length'];if(!_0x144d0c['query'][_0x964b('0x33')](_0x964b('0x48'))){_0x285558[_0x964b('0x1c')]=qs[_0x964b('0x1c')](_0x144d0c['query'][_0x964b('0x1c')]);_0x285558[_0x964b('0x19')]=qs[_0x964b('0x19')](_0x144d0c[_0x964b('0x2d')]['offset']);}return _0x4b439f[_0x964b('0x45')](_0x285558);}})[_0x964b('0x21')](function(_0x1e304a){if(_0x1e304a){return _0x1e304a?{'count':_0x470e9a,'rows':_0x1e304a}:null;}})[_0x964b('0x21')](respondWithResult(_0x4abb2e,null))[_0x964b('0x40')](handleError(_0x4abb2e,null));};exports[_0x964b('0x49')]=function(_0xd5c141,_0x15d768,_0x459f62){if(_0xd5c141['body']['id']){delete _0xd5c141[_0x964b('0x43')]['id'];}return db['VtigerAccount'][_0x964b('0x46')]({'where':{'id':_0xd5c141['params']['id']}})[_0x964b('0x21')](handleEntityNotFound(_0x15d768,null))[_0x964b('0x21')](function(_0x400b08){if(_0x400b08){_0xd5c141[_0x964b('0x43')][_0x964b('0x4a')]=_0x400b08['id'];_0xd5c141['body']['Subjects']=integrations['getSubjects'](_0xd5c141[_0x964b('0x43')]['channel'],_0xd5c141[_0x964b('0x43')][_0x964b('0x2b')]);_0xd5c141[_0x964b('0x43')][_0x964b('0x4b')]=integrations[_0x964b('0x4c')](_0xd5c141[_0x964b('0x43')]['channel'],_0xd5c141[_0x964b('0x43')][_0x964b('0x2b')]);return db[_0x964b('0x47')][_0x964b('0x4d')](_0xd5c141[_0x964b('0x43')],{'include':[{'model':db['VtigerField'],'as':_0x964b('0x4e')},{'model':db[_0x964b('0x4f')],'as':_0x964b('0x4b')}]});}return null;})[_0x964b('0x21')](respondWithResult(_0x15d768,null))[_0x964b('0x40')](handleError(_0x15d768,null));};var md5=require(_0x964b('0x50'));exports['getFields']=function(_0x37507b,_0x82b2b1,_0xaaefa8){var _0x1fefae=null;var _0x2ec556=null;var _0x3b8f99=null;var _0x2e0029=null;var _0x3a242b='';return db[_0x964b('0x28')][_0x964b('0x46')]({'where':{'id':_0x37507b[_0x964b('0x42')]['id']},'attributes':['id','name',_0x964b('0x51'),'description',_0x964b('0x52'),_0x964b('0x53'),_0x964b('0x54'),_0x964b('0x55')]})[_0x964b('0x21')](handleEntityNotFound(_0x82b2b1,null))[_0x964b('0x21')](function(_0x2b1387){if(_0x2b1387){_0x1fefae=_0x2b1387[_0x964b('0x51')];_0x2ec556=_0x2b1387['accessKey'];_0x3b8f99=_0x2b1387[_0x964b('0x52')];_0x3a242b=_0x2b1387[_0x964b('0x53')];var _0x3a22cb=_0x3a242b[_0x964b('0x56')](-0x1);if(_0x3a22cb==='/'){_0x3a242b=_0x3a242b[_0x964b('0x57')](0x0,_0x3a242b[_0x964b('0x58')](_0x3a22cb));}_0x2e0029=util[_0x964b('0x59')](_0x964b('0x5a'),_0x3a242b);var _0x1a2540={'method':_0x964b('0x5b'),'uri':_0x2e0029,'qs':{'operation':_0x964b('0x5c'),'username':_0x2b1387[_0x964b('0x51')]},'json':!![]};return rp(_0x1a2540);}})[_0x964b('0x21')](function(_0x3a0dfe){if(_0x3a0dfe[_0x964b('0x5d')]){var _0xf8cbf1={'method':_0x964b('0x5e'),'uri':_0x2e0029,'form':{'operation':_0x964b('0x5f'),'username':_0x1fefae,'accessKey':md5(_0x3a0dfe[_0x964b('0x60')][_0x964b('0x61')]+_0x2ec556)},'json':!![]};return rp(_0xf8cbf1);}})[_0x964b('0x21')](function(_0x2a3d7d){if(_0x2a3d7d[_0x964b('0x5d')]){var _0x36d323={'method':'GET','uri':_0x2e0029,'qs':{'operation':_0x964b('0x62'),'username':_0x1fefae,'sessionName':_0x2a3d7d[_0x964b('0x60')][_0x964b('0x63')],'elementType':_0x3b8f99},'json':!![]};return rp(_0x36d323);}})['then'](function(_0x127992){if(_0x127992[_0x964b('0x5d')]){var _0x2b34a2=['autogenerated','reference','owner'];_[_0x964b('0x64')](_0x127992['result'][_0x964b('0x31')],function(_0x46e5a9){return _0x2b34a2[_0x964b('0x65')](_0x46e5a9['type'][_0x964b('0x26')]);});_[_0x964b('0x64')](_0x127992[_0x964b('0x60')][_0x964b('0x31')],function(_0x1ce1fe){return _0x1ce1fe[_0x964b('0x66')]===_0x964b('0x67');});return{'count':_0x127992[_0x964b('0x60')][_0x964b('0x31')][_0x964b('0x32')],'rows':_[_0x964b('0x3b')](_0x127992[_0x964b('0x60')]['fields'],function(_0x3ebc0c){return{'id':_0x3ebc0c[_0x964b('0x26')],'name':_0x3ebc0c[_0x964b('0x68')],'custom':_[_0x964b('0x69')](_0x3ebc0c[_0x964b('0x26')],_0x964b('0x6a'))?!![]:![],'options':_0x3ebc0c['type'][_0x964b('0x26')]===_0x964b('0x6b')&&_0x3ebc0c[_0x964b('0x2b')][_0x964b('0x6c')][_0x964b('0x32')]>0x0?_[_0x964b('0x3b')](_0x3ebc0c[_0x964b('0x2b')][_0x964b('0x6c')],function(_0x24cc49){return{'name':_0x24cc49[_0x964b('0x68')],'value':_0x24cc49[_0x964b('0x6d')]};}):[]};})};}})[_0x964b('0x21')](respondWithResult(_0x82b2b1,null))[_0x964b('0x40')](function(_0x15eff0){console[_0x964b('0x6e')](_0x964b('0x6f')+_0x15eff0);var _0x4e62d7=_0x37507b[_0x964b('0x2d')][_0x964b('0x70')]?0x1f4:_0x15eff0[_0x964b('0x71')]||0x1f4;logger['error'](_0x964b('0x72'),_0x964b('0x73'),_0x4e62d7,JSON[_0x964b('0x74')](_0x15eff0));delete _0x15eff0[_0x964b('0x26')];if(_0x4e62d7===0x191){_0x4e62d7=0x190;}_0x82b2b1[_0x964b('0x17')](_0x4e62d7)[_0x964b('0x27')](_0x37507b[_0x964b('0x2d')][_0x964b('0x70')]?{'message':_0x964b('0x75'),'statusCode':_0x15eff0['statusCode']}:_0x15eff0);});}; \ No newline at end of file diff --git a/server/api/intVtigerAccount/intVtigerAccount.model.js b/server/api/intVtigerAccount/intVtigerAccount.model.js index dbd3784..109d8bd 100644 --- a/server/api/intVtigerAccount/intVtigerAccount.model.js +++ b/server/api/intVtigerAccount/intVtigerAccount.model.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xc247=['define','VtigerAccount','lodash','util','../../config/logger','moment','bluebird','rimraf','../../config/environment','./intVtigerAccount.attributes','../../components/integrations/configuration','exports'];(function(_0x4c4c29,_0x32c34b){var _0x511493=function(_0xc7e1b2){while(--_0xc7e1b2){_0x4c4c29['push'](_0x4c4c29['shift']());}};_0x511493(++_0x32c34b);}(_0xc247,0xfe));var _0x7c24=function(_0x34bd34,_0x1444f7){_0x34bd34=_0x34bd34-0x0;var _0x4e36d6=_0xc247[_0x34bd34];return _0x4e36d6;};'use strict';var _=require(_0x7c24('0x0'));var util=require(_0x7c24('0x1'));var logger=require(_0x7c24('0x2'))('api');var moment=require(_0x7c24('0x3'));var BPromise=require(_0x7c24('0x4'));var rp=require('request-promise');var fs=require('fs');var path=require('path');var rimraf=require(_0x7c24('0x5'));var config=require(_0x7c24('0x6'));var attributes=require(_0x7c24('0x7'));var integrations=require(_0x7c24('0x8'));module[_0x7c24('0x9')]=function(_0x45d8b3,_0x226ea2){return _0x45d8b3[_0x7c24('0xa')](_0x7c24('0xb'),attributes,{'tableName':'int_vtiger_accounts','paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file +var _0xd97a=['path','rimraf','../../config/environment','./intVtigerAccount.attributes','../../components/integrations/configuration','exports','lodash','../../config/logger','api','request-promise'];(function(_0x40eb4e,_0x4bdbcd){var _0x249c0b=function(_0x34af78){while(--_0x34af78){_0x40eb4e['push'](_0x40eb4e['shift']());}};_0x249c0b(++_0x4bdbcd);}(_0xd97a,0x13c));var _0xad97=function(_0x21dabf,_0x46d99d){_0x21dabf=_0x21dabf-0x0;var _0x44f90f=_0xd97a[_0x21dabf];return _0x44f90f;};'use strict';var _=require(_0xad97('0x0'));var util=require('util');var logger=require(_0xad97('0x1'))(_0xad97('0x2'));var moment=require('moment');var BPromise=require('bluebird');var rp=require(_0xad97('0x3'));var fs=require('fs');var path=require(_0xad97('0x4'));var rimraf=require(_0xad97('0x5'));var config=require(_0xad97('0x6'));var attributes=require(_0xad97('0x7'));var integrations=require(_0xad97('0x8'));module[_0xad97('0x9')]=function(_0x3b9ec8,_0xd0914a){return _0x3b9ec8['define']('VtigerAccount',attributes,{'tableName':'int_vtiger_accounts','paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file diff --git a/server/api/intVtigerAccount/intVtigerAccount.rpc.js b/server/api/intVtigerAccount/intVtigerAccount.rpc.js index b9f84f2..cece7df 100644 --- a/server/api/intVtigerAccount/intVtigerAccount.rpc.js +++ b/server/api/intVtigerAccount/intVtigerAccount.rpc.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xdb94=['findAll','options','raw','attributes','limit','include','map','model','stringify','ShowVtigerAccount','find','lodash','util','moment','bluebird','randomstring','../../mysqldb','../../config/utils','../../config/environment','http','request','then','info','VtigerAccount,\x20%s,\x20%s','request\x20sent','debug','VtigerAccount,\x20%s,\x20%s,\x20%s','error','message','catch','GetVtigerAccount','VtigerAccount'];(function(_0x35abc6,_0x1bdf56){var _0xcee228=function(_0xa4fe6f){while(--_0xa4fe6f){_0x35abc6['push'](_0x35abc6['shift']());}};_0xcee228(++_0x1bdf56);}(_0xdb94,0xab));var _0x4db9=function(_0x405d48,_0xbcf413){_0x405d48=_0x405d48-0x0;var _0xf94710=_0xdb94[_0x405d48];return _0xf94710;};'use strict';var _=require(_0x4db9('0x0'));var util=require(_0x4db9('0x1'));var moment=require(_0x4db9('0x2'));var BPromise=require(_0x4db9('0x3'));var rs=require(_0x4db9('0x4'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0x4db9('0x5'))['db'];var utils=require(_0x4db9('0x6'));var logger=require('../../config/logger')('rpc');var config=require(_0x4db9('0x7'));var jayson=require('jayson/promise');var client=jayson['client'][_0x4db9('0x8')]({'port':0x232a});function respondWithRpcPromise(_0x5d1f45,_0x196ede,_0x50c27a){return new BPromise(function(_0x14deb9,_0x26248b){return client[_0x4db9('0x9')](_0x5d1f45,_0x50c27a)[_0x4db9('0xa')](function(_0x2cacca){logger[_0x4db9('0xb')](_0x4db9('0xc'),_0x196ede,_0x4db9('0xd'));logger[_0x4db9('0xe')](_0x4db9('0xf'),_0x196ede,_0x4db9('0xd'),JSON['stringify'](_0x2cacca));if(_0x2cacca[_0x4db9('0x10')]){if(_0x2cacca[_0x4db9('0x10')]['code']===0x1f4){logger['error'](_0x4db9('0xc'),_0x196ede,_0x2cacca['error']['message']);return _0x26248b(_0x2cacca[_0x4db9('0x10')][_0x4db9('0x11')]);}logger['error'](_0x4db9('0xc'),_0x196ede,_0x2cacca[_0x4db9('0x10')][_0x4db9('0x11')]);return _0x14deb9(_0x2cacca[_0x4db9('0x10')]['message']);}else{logger['info'](_0x4db9('0xc'),_0x196ede,_0x4db9('0xd'));_0x14deb9(_0x2cacca['result'][_0x4db9('0x11')]);}})[_0x4db9('0x12')](function(_0x5d6471){logger['error'](_0x4db9('0xc'),_0x196ede,_0x5d6471);_0x26248b(_0x5d6471);});});}exports[_0x4db9('0x13')]=function(_0x462af3){var _0xa693c4=this;return new Promise(function(_0x1d3c33,_0x55494a){return db[_0x4db9('0x14')][_0x4db9('0x15')]({'raw':_0x462af3[_0x4db9('0x16')]?_0x462af3['options'][_0x4db9('0x17')]===undefined?!![]:![]:!![],'where':_0x462af3[_0x4db9('0x16')]?_0x462af3[_0x4db9('0x16')]['where']||null:null,'attributes':_0x462af3[_0x4db9('0x16')]?_0x462af3[_0x4db9('0x16')][_0x4db9('0x18')]||null:null,'limit':_0x462af3[_0x4db9('0x16')]?_0x462af3[_0x4db9('0x16')][_0x4db9('0x19')]||null:null,'include':_0x462af3[_0x4db9('0x16')]?_0x462af3['options'][_0x4db9('0x1a')]?_[_0x4db9('0x1b')](_0x462af3[_0x4db9('0x16')][_0x4db9('0x1a')],function(_0x4aaa84){return{'model':db[_0x4aaa84[_0x4db9('0x1c')]],'as':_0x4aaa84['as'],'attributes':_0x4aaa84[_0x4db9('0x18')],'include':_0x4aaa84['include']?_[_0x4db9('0x1b')](_0x4aaa84[_0x4db9('0x1a')],function(_0x2987c6){return{'model':db[_0x2987c6['model']],'as':_0x2987c6['as'],'attributes':_0x2987c6[_0x4db9('0x18')],'include':_0x2987c6[_0x4db9('0x1a')]?_[_0x4db9('0x1b')](_0x2987c6[_0x4db9('0x1a')],function(_0x3f9f7e){return{'model':db[_0x3f9f7e[_0x4db9('0x1c')]],'as':_0x3f9f7e['as'],'attributes':_0x3f9f7e[_0x4db9('0x18')]};}):[]};}):[]};}):[]:[]})[_0x4db9('0xa')](function(_0x3d0f12){logger[_0x4db9('0xb')](_0x4db9('0x13'),_0x462af3);logger[_0x4db9('0xe')](_0x4db9('0x13'),_0x462af3,JSON[_0x4db9('0x1d')](_0x3d0f12));_0x1d3c33(_0x3d0f12);})['catch'](function(_0x5031fe){logger[_0x4db9('0x10')](_0x4db9('0x13'),_0x5031fe[_0x4db9('0x11')],_0x462af3);_0x55494a(_0xa693c4[_0x4db9('0x10')](0x1f4,_0x5031fe[_0x4db9('0x11')]));});});};exports[_0x4db9('0x1e')]=function(_0x4dc946){var _0x375834=this;return new Promise(function(_0x554eef,_0x3b6a64){return db[_0x4db9('0x14')][_0x4db9('0x1f')]({'raw':_0x4dc946[_0x4db9('0x16')]?_0x4dc946[_0x4db9('0x16')]['raw']===undefined?!![]:![]:!![],'where':_0x4dc946['options']?_0x4dc946[_0x4db9('0x16')]['where']||null:null,'attributes':_0x4dc946[_0x4db9('0x16')]?_0x4dc946[_0x4db9('0x16')]['attributes']||null:null,'include':_0x4dc946[_0x4db9('0x16')]?_0x4dc946[_0x4db9('0x16')][_0x4db9('0x1a')]?_['map'](_0x4dc946[_0x4db9('0x16')]['include'],function(_0x40226c){return{'model':db[_0x40226c[_0x4db9('0x1c')]],'as':_0x40226c['as'],'attributes':_0x40226c[_0x4db9('0x18')],'include':_0x40226c['include']?_['map'](_0x40226c[_0x4db9('0x1a')],function(_0x1494bc){return{'model':db[_0x1494bc[_0x4db9('0x1c')]],'as':_0x1494bc['as'],'attributes':_0x1494bc[_0x4db9('0x18')],'include':_0x1494bc[_0x4db9('0x1a')]?_[_0x4db9('0x1b')](_0x1494bc[_0x4db9('0x1a')],function(_0x2bbf0e){return{'model':db[_0x2bbf0e[_0x4db9('0x1c')]],'as':_0x2bbf0e['as'],'attributes':_0x2bbf0e['attributes']};}):[]};}):[]};}):[]:[]})[_0x4db9('0xa')](function(_0x94536b){logger[_0x4db9('0xb')](_0x4db9('0x1e'),_0x4dc946);logger['debug'](_0x4db9('0x1e'),_0x4dc946,JSON[_0x4db9('0x1d')](_0x94536b));_0x554eef(_0x94536b);})[_0x4db9('0x12')](function(_0x5495ed){logger[_0x4db9('0x10')](_0x4db9('0x1e'),_0x5495ed[_0x4db9('0x11')],_0x4dc946);_0x3b6a64(_0x375834[_0x4db9('0x10')](0x1f4,_0x5495ed['message']));});});}; \ No newline at end of file +var _0x4024=['attributes','include','map','model','then','debug','ShowVtigerAccount','find','where','lodash','util','bluebird','randomstring','../../mysqldb','../../config/logger','rpc','client','http','request','info','request\x20sent','VtigerAccount,\x20%s,\x20%s,\x20%s','stringify','error','code','VtigerAccount,\x20%s,\x20%s','message','result','catch','GetVtigerAccount','VtigerAccount','options'];(function(_0x1c8e65,_0x3016ea){var _0x4549fc=function(_0x32d776){while(--_0x32d776){_0x1c8e65['push'](_0x1c8e65['shift']());}};_0x4549fc(++_0x3016ea);}(_0x4024,0x89));var _0x4402=function(_0x5c2ed4,_0x392942){_0x5c2ed4=_0x5c2ed4-0x0;var _0x6f63f9=_0x4024[_0x5c2ed4];return _0x6f63f9;};'use strict';var _=require(_0x4402('0x0'));var util=require(_0x4402('0x1'));var moment=require('moment');var BPromise=require(_0x4402('0x2'));var rs=require(_0x4402('0x3'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0x4402('0x4'))['db'];var utils=require('../../config/utils');var logger=require(_0x4402('0x5'))(_0x4402('0x6'));var config=require('../../config/environment');var jayson=require('jayson/promise');var client=jayson[_0x4402('0x7')][_0x4402('0x8')]({'port':0x232a});function respondWithRpcPromise(_0x168acd,_0x4ed77d,_0x3045ae){return new BPromise(function(_0x5d7ca4,_0x5c0b70){return client[_0x4402('0x9')](_0x168acd,_0x3045ae)['then'](function(_0x4d2882){logger[_0x4402('0xa')]('VtigerAccount,\x20%s,\x20%s',_0x4ed77d,_0x4402('0xb'));logger['debug'](_0x4402('0xc'),_0x4ed77d,'request\x20sent',JSON[_0x4402('0xd')](_0x4d2882));if(_0x4d2882[_0x4402('0xe')]){if(_0x4d2882['error'][_0x4402('0xf')]===0x1f4){logger[_0x4402('0xe')](_0x4402('0x10'),_0x4ed77d,_0x4d2882['error'][_0x4402('0x11')]);return _0x5c0b70(_0x4d2882[_0x4402('0xe')][_0x4402('0x11')]);}logger[_0x4402('0xe')](_0x4402('0x10'),_0x4ed77d,_0x4d2882[_0x4402('0xe')][_0x4402('0x11')]);return _0x5d7ca4(_0x4d2882[_0x4402('0xe')][_0x4402('0x11')]);}else{logger[_0x4402('0xa')](_0x4402('0x10'),_0x4ed77d,_0x4402('0xb'));_0x5d7ca4(_0x4d2882[_0x4402('0x12')][_0x4402('0x11')]);}})[_0x4402('0x13')](function(_0x30c390){logger[_0x4402('0xe')](_0x4402('0x10'),_0x4ed77d,_0x30c390);_0x5c0b70(_0x30c390);});});}exports[_0x4402('0x14')]=function(_0x231382){var _0x5b127f=this;return new Promise(function(_0x494389,_0x663ab7){return db[_0x4402('0x15')]['findAll']({'raw':_0x231382[_0x4402('0x16')]?_0x231382[_0x4402('0x16')]['raw']===undefined?!![]:![]:!![],'where':_0x231382[_0x4402('0x16')]?_0x231382['options']['where']||null:null,'attributes':_0x231382[_0x4402('0x16')]?_0x231382[_0x4402('0x16')][_0x4402('0x17')]||null:null,'limit':_0x231382['options']?_0x231382[_0x4402('0x16')]['limit']||null:null,'include':_0x231382['options']?_0x231382[_0x4402('0x16')][_0x4402('0x18')]?_[_0x4402('0x19')](_0x231382[_0x4402('0x16')][_0x4402('0x18')],function(_0x2e6fee){return{'model':db[_0x2e6fee[_0x4402('0x1a')]],'as':_0x2e6fee['as'],'attributes':_0x2e6fee[_0x4402('0x17')],'include':_0x2e6fee[_0x4402('0x18')]?_['map'](_0x2e6fee[_0x4402('0x18')],function(_0x4e1c04){return{'model':db[_0x4e1c04[_0x4402('0x1a')]],'as':_0x4e1c04['as'],'attributes':_0x4e1c04[_0x4402('0x17')],'include':_0x4e1c04[_0x4402('0x18')]?_[_0x4402('0x19')](_0x4e1c04['include'],function(_0x15c19f){return{'model':db[_0x15c19f['model']],'as':_0x15c19f['as'],'attributes':_0x15c19f['attributes']};}):[]};}):[]};}):[]:[]})[_0x4402('0x1b')](function(_0x395e49){logger[_0x4402('0xa')](_0x4402('0x14'),_0x231382);logger[_0x4402('0x1c')]('GetVtigerAccount',_0x231382,JSON[_0x4402('0xd')](_0x395e49));_0x494389(_0x395e49);})['catch'](function(_0x71da2f){logger[_0x4402('0xe')](_0x4402('0x14'),_0x71da2f['message'],_0x231382);_0x663ab7(_0x5b127f[_0x4402('0xe')](0x1f4,_0x71da2f[_0x4402('0x11')]));});});};exports[_0x4402('0x1d')]=function(_0x3f4bcb){var _0x2526d1=this;return new Promise(function(_0x605702,_0x1189b8){return db[_0x4402('0x15')][_0x4402('0x1e')]({'raw':_0x3f4bcb[_0x4402('0x16')]?_0x3f4bcb[_0x4402('0x16')]['raw']===undefined?!![]:![]:!![],'where':_0x3f4bcb[_0x4402('0x16')]?_0x3f4bcb['options'][_0x4402('0x1f')]||null:null,'attributes':_0x3f4bcb['options']?_0x3f4bcb[_0x4402('0x16')][_0x4402('0x17')]||null:null,'include':_0x3f4bcb[_0x4402('0x16')]?_0x3f4bcb[_0x4402('0x16')][_0x4402('0x18')]?_['map'](_0x3f4bcb[_0x4402('0x16')][_0x4402('0x18')],function(_0x169340){return{'model':db[_0x169340['model']],'as':_0x169340['as'],'attributes':_0x169340[_0x4402('0x17')],'include':_0x169340[_0x4402('0x18')]?_['map'](_0x169340[_0x4402('0x18')],function(_0x437e83){return{'model':db[_0x437e83[_0x4402('0x1a')]],'as':_0x437e83['as'],'attributes':_0x437e83[_0x4402('0x17')],'include':_0x437e83[_0x4402('0x18')]?_[_0x4402('0x19')](_0x437e83[_0x4402('0x18')],function(_0x6e9fb7){return{'model':db[_0x6e9fb7[_0x4402('0x1a')]],'as':_0x6e9fb7['as'],'attributes':_0x6e9fb7['attributes']};}):[]};}):[]};}):[]:[]})[_0x4402('0x1b')](function(_0x28fee8){logger[_0x4402('0xa')]('ShowVtigerAccount',_0x3f4bcb);logger[_0x4402('0x1c')](_0x4402('0x1d'),_0x3f4bcb,JSON['stringify'](_0x28fee8));_0x605702(_0x28fee8);})['catch'](function(_0x2b9d51){logger[_0x4402('0xe')](_0x4402('0x1d'),_0x2b9d51[_0x4402('0x11')],_0x3f4bcb);_0x1189b8(_0x2526d1['error'](0x1f4,_0x2b9d51['message']));});});}; \ No newline at end of file diff --git a/server/api/intVtigerConfiguration/index.js b/server/api/intVtigerConfiguration/index.js index 406e7a3..8ac69a3 100644 --- a/server/api/intVtigerConfiguration/index.js +++ b/server/api/intVtigerConfiguration/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xbdd8=['delete','exports','multer','util','path','connect-timeout','express','Router','../../components/auth/service','../../components/interaction/service','./intVtigerConfiguration.controller','index','get','/:id','isAuthenticated','show','/:id/fields','getFields','/:id/subjects','getSubjects','/:id/descriptions','update'];(function(_0x308319,_0x470254){var _0x36df3f=function(_0x3bd6c4){while(--_0x3bd6c4){_0x308319['push'](_0x308319['shift']());}};_0x36df3f(++_0x470254);}(_0xbdd8,0xc8));var _0x8bdd=function(_0x2db626,_0x1714a8){_0x2db626=_0x2db626-0x0;var _0x99667=_0xbdd8[_0x2db626];return _0x99667;};'use strict';var multer=require(_0x8bdd('0x0'));var util=require(_0x8bdd('0x1'));var path=require(_0x8bdd('0x2'));var timeout=require(_0x8bdd('0x3'));var express=require(_0x8bdd('0x4'));var router=express[_0x8bdd('0x5')]();var fs_extra=require('fs-extra');var auth=require(_0x8bdd('0x6'));var interaction=require(_0x8bdd('0x7'));var config=require('../../config/environment');var controller=require(_0x8bdd('0x8'));router['get']('/',auth['isAuthenticated'](),controller[_0x8bdd('0x9')]);router[_0x8bdd('0xa')](_0x8bdd('0xb'),auth[_0x8bdd('0xc')](),controller[_0x8bdd('0xd')]);router[_0x8bdd('0xa')](_0x8bdd('0xe'),auth['isAuthenticated'](),controller[_0x8bdd('0xf')]);router[_0x8bdd('0xa')](_0x8bdd('0x10'),auth[_0x8bdd('0xc')](),controller[_0x8bdd('0x11')]);router['get'](_0x8bdd('0x12'),auth[_0x8bdd('0xc')](),controller['getDescriptions']);router['post']('/',auth[_0x8bdd('0xc')](),controller['create']);router['put'](_0x8bdd('0xb'),auth[_0x8bdd('0xc')](),controller[_0x8bdd('0x13')]);router[_0x8bdd('0x14')](_0x8bdd('0xb'),auth[_0x8bdd('0xc')](),controller['destroy']);module[_0x8bdd('0x15')]=router; \ No newline at end of file +var _0xaf2b=['/:id','show','get','/:id/fields','/:id/subjects','getSubjects','getDescriptions','post','create','put','delete','path','connect-timeout','Router','../../components/auth/service','../../config/environment','./intVtigerConfiguration.controller','isAuthenticated','index'];(function(_0x379a23,_0x4cbb8b){var _0x29d687=function(_0x42664c){while(--_0x42664c){_0x379a23['push'](_0x379a23['shift']());}};_0x29d687(++_0x4cbb8b);}(_0xaf2b,0x13b));var _0xbaf2=function(_0x5d949e,_0x555707){_0x5d949e=_0x5d949e-0x0;var _0x445c1e=_0xaf2b[_0x5d949e];return _0x445c1e;};'use strict';var multer=require('multer');var util=require('util');var path=require(_0xbaf2('0x0'));var timeout=require(_0xbaf2('0x1'));var express=require('express');var router=express[_0xbaf2('0x2')]();var fs_extra=require('fs-extra');var auth=require(_0xbaf2('0x3'));var interaction=require('../../components/interaction/service');var config=require(_0xbaf2('0x4'));var controller=require(_0xbaf2('0x5'));router['get']('/',auth[_0xbaf2('0x6')](),controller[_0xbaf2('0x7')]);router['get'](_0xbaf2('0x8'),auth[_0xbaf2('0x6')](),controller[_0xbaf2('0x9')]);router[_0xbaf2('0xa')](_0xbaf2('0xb'),auth[_0xbaf2('0x6')](),controller['getFields']);router['get'](_0xbaf2('0xc'),auth[_0xbaf2('0x6')](),controller[_0xbaf2('0xd')]);router[_0xbaf2('0xa')]('/:id/descriptions',auth[_0xbaf2('0x6')](),controller[_0xbaf2('0xe')]);router[_0xbaf2('0xf')]('/',auth[_0xbaf2('0x6')](),controller[_0xbaf2('0x10')]);router[_0xbaf2('0x11')](_0xbaf2('0x8'),auth['isAuthenticated'](),controller['update']);router[_0xbaf2('0x12')](_0xbaf2('0x8'),auth['isAuthenticated'](),controller['destroy']);module['exports']=router; \ No newline at end of file diff --git a/server/api/intVtigerConfiguration/intVtigerConfiguration.attributes.js b/server/api/intVtigerConfiguration/intVtigerConfiguration.attributes.js index b2bceed..194d224 100644 --- a/server/api/intVtigerConfiguration/intVtigerConfiguration.attributes.js +++ b/server/api/intVtigerConfiguration/intVtigerConfiguration.attributes.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x9146=['exports','STRING','sequelize'];(function(_0x24237f,_0x4cf32c){var _0x48298e=function(_0x3f7511){while(--_0x3f7511){_0x24237f['push'](_0x24237f['shift']());}};_0x48298e(++_0x4cf32c);}(_0x9146,0x1d6));var _0x6914=function(_0xe5b349,_0x5f06e4){_0xe5b349=_0xe5b349-0x0;var _0x26b0ad=_0x9146[_0xe5b349];return _0x26b0ad;};'use strict';var Sequelize=require(_0x6914('0x0'));module[_0x6914('0x1')]={'name':{'type':Sequelize[_0x6914('0x2')]},'description':{'type':Sequelize[_0x6914('0x2')]}}; \ No newline at end of file +var _0xa5aa=['STRING','exports'];(function(_0x379dca,_0x3340b3){var _0x19f5e0=function(_0x201749){while(--_0x201749){_0x379dca['push'](_0x379dca['shift']());}};_0x19f5e0(++_0x3340b3);}(_0xa5aa,0x7d));var _0xaa5a=function(_0x34a11c,_0x13b20a){_0x34a11c=_0x34a11c-0x0;var _0x5d64b5=_0xa5aa[_0x34a11c];return _0x5d64b5;};'use strict';var Sequelize=require('sequelize');module[_0xaa5a('0x0')]={'name':{'type':Sequelize[_0xaa5a('0x1')]},'description':{'type':Sequelize[_0xaa5a('0x1')]}}; \ No newline at end of file diff --git a/server/api/intVtigerConfiguration/intVtigerConfiguration.controller.js b/server/api/intVtigerConfiguration/intVtigerConfiguration.controller.js index 1fb8955..1020feb 100644 --- a/server/api/intVtigerConfiguration/intVtigerConfiguration.controller.js +++ b/server/api/intVtigerConfiguration/intVtigerConfiguration.controller.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xab44=['merge','VIRTUAL','options','includeAll','findAll','rows','catch','show','attributes','include','create','update','body','find','params','getFields','findOne','VtigerField','hasOwnProperty','getSubjects','getDescriptions','eml-format','rimraf','request-promise','moment','bluebird','mustache','util','path','sox','lodash','squel','crypto','jsforce','desk.js','to-csv','querystring','papaparse','../../components/auth/service','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','../../mysqldb','status','end','offset','undefined','limit','count','set','Content-Range','json','apply','reject','save','then','destroy','sendStatus','error','stack','name','VtigerConfiguration','rawAttributes','fieldName','type','model','map','query','keys','filters','intersection','fields','length','nolimit','order','sort','where','pick','filter'];(function(_0x183b70,_0x103cb6){var _0x23ae14=function(_0x468903){while(--_0x468903){_0x183b70['push'](_0x183b70['shift']());}};_0x23ae14(++_0x103cb6);}(_0xab44,0x1aa));var _0x4ab4=function(_0x2418f3,_0xcb8450){_0x2418f3=_0x2418f3-0x0;var _0x4a062c=_0xab44[_0x2418f3];return _0x4a062c;};'use strict';var emlformat=require(_0x4ab4('0x0'));var rimraf=require(_0x4ab4('0x1'));var zipdir=require('zip-dir');var jsonpatch=require('fast-json-patch');var rp=require(_0x4ab4('0x2'));var moment=require(_0x4ab4('0x3'));var BPromise=require(_0x4ab4('0x4'));var Mustache=require(_0x4ab4('0x5'));var util=require(_0x4ab4('0x6'));var path=require(_0x4ab4('0x7'));var sox=require(_0x4ab4('0x8'));var csv=require('to-csv');var ejs=require('ejs');var fs=require('fs');var fs_extra=require('fs-extra');var _=require(_0x4ab4('0x9'));var squel=require(_0x4ab4('0xa'));var crypto=require(_0x4ab4('0xb'));var jsforce=require(_0x4ab4('0xc'));var deskjs=require(_0x4ab4('0xd'));var toCsv=require(_0x4ab4('0xe'));var querystring=require(_0x4ab4('0xf'));var Papa=require(_0x4ab4('0x10'));var Redis=require('ioredis');var authService=require(_0x4ab4('0x11'));var qs=require('../../components/parsers/qs');var as=require(_0x4ab4('0x12'));var hardwareService=require(_0x4ab4('0x13'));var logger=require(_0x4ab4('0x14'))(_0x4ab4('0x15'));var utils=require(_0x4ab4('0x16'));var config=require('../../config/environment');var licenseUtil=require('../../config/license/util');var db=require(_0x4ab4('0x17'))['db'];function respondWithStatusCode(_0x4a6b8f,_0x3189d3){_0x3189d3=_0x3189d3||0xcc;return function(_0x1de17a){if(_0x1de17a){return _0x4a6b8f['sendStatus'](_0x3189d3);}return _0x4a6b8f[_0x4ab4('0x18')](_0x3189d3)[_0x4ab4('0x19')]();};}function respondWithResult(_0x46d924,_0x1b9550){_0x1b9550=_0x1b9550||0xc8;return function(_0x362a45){if(_0x362a45){return _0x46d924[_0x4ab4('0x18')](_0x1b9550)['json'](_0x362a45);}};}function respondWithFilteredResult(_0x2947cb,_0x54253d){return function(_0x35c8da){if(_0x35c8da){var _0x21cae7=typeof _0x54253d[_0x4ab4('0x1a')]===_0x4ab4('0x1b')&&typeof _0x54253d[_0x4ab4('0x1c')]===_0x4ab4('0x1b');var _0x5ac82a=_0x35c8da[_0x4ab4('0x1d')];var _0x208736=_0x21cae7?0x0:_0x54253d[_0x4ab4('0x1a')];var _0x4eefb6=_0x21cae7?_0x35c8da[_0x4ab4('0x1d')]:_0x54253d[_0x4ab4('0x1a')]+_0x54253d[_0x4ab4('0x1c')];var _0x3d8ab2;if(_0x4eefb6>=_0x5ac82a){_0x4eefb6=_0x5ac82a;_0x3d8ab2=0xc8;}else{_0x3d8ab2=0xce;}_0x2947cb[_0x4ab4('0x18')](_0x3d8ab2);return _0x2947cb[_0x4ab4('0x1e')](_0x4ab4('0x1f'),_0x208736+'-'+_0x4eefb6+'/'+_0x5ac82a)[_0x4ab4('0x20')](_0x35c8da);}return null;};}function patchUpdates(_0x560efa){return function(_0x3b69d5){try{jsonpatch[_0x4ab4('0x21')](_0x3b69d5,_0x560efa,!![]);}catch(_0x2e00ed){return BPromise[_0x4ab4('0x22')](_0x2e00ed);}return _0x3b69d5[_0x4ab4('0x23')]();};}function saveUpdates(_0x118f62,_0x157f6b){return function(_0x48aed9){if(_0x48aed9){return _0x48aed9['update'](_0x118f62)[_0x4ab4('0x24')](function(_0x2f635e){return _0x2f635e;});}return null;};}function removeEntity(_0x2744a5,_0x3c5c7a){return function(_0x346870){if(_0x346870){return _0x346870[_0x4ab4('0x25')]()[_0x4ab4('0x24')](function(){_0x2744a5[_0x4ab4('0x18')](0xcc)['end']();});}};}function handleEntityNotFound(_0x35a00c,_0x392844){return function(_0x26bc2d){if(!_0x26bc2d){_0x35a00c[_0x4ab4('0x26')](0x194);}return _0x26bc2d;};}function handleError(_0x12d017,_0x2dca25){_0x2dca25=_0x2dca25||0x1f4;return function(_0x446adc){logger[_0x4ab4('0x27')](_0x446adc[_0x4ab4('0x28')]);if(_0x446adc[_0x4ab4('0x29')]){delete _0x446adc[_0x4ab4('0x29')];}_0x12d017[_0x4ab4('0x18')](_0x2dca25)['send'](_0x446adc);};}exports['index']=function(_0x1ed169,_0x5f07ec){var _0x25a2d2={},_0xf2d47={},_0x57dce4={'count':0x0,'rows':[]};var _0x3b0392=_['map'](db[_0x4ab4('0x2a')][_0x4ab4('0x2b')],function(_0x1c9d12){return{'name':_0x1c9d12[_0x4ab4('0x2c')],'type':_0x1c9d12[_0x4ab4('0x2d')]['key']};});_0xf2d47[_0x4ab4('0x2e')]=_[_0x4ab4('0x2f')](_0x3b0392,'name');_0xf2d47[_0x4ab4('0x30')]=_[_0x4ab4('0x31')](_0x1ed169[_0x4ab4('0x30')]);_0xf2d47[_0x4ab4('0x32')]=_[_0x4ab4('0x33')](_0xf2d47[_0x4ab4('0x2e')],_0xf2d47[_0x4ab4('0x30')]);_0x25a2d2['attributes']=_[_0x4ab4('0x33')](_0xf2d47[_0x4ab4('0x2e')],qs[_0x4ab4('0x34')](_0x1ed169[_0x4ab4('0x30')]['fields']));_0x25a2d2['attributes']=_0x25a2d2['attributes'][_0x4ab4('0x35')]?_0x25a2d2['attributes']:_0xf2d47['model'];if(!_0x1ed169[_0x4ab4('0x30')]['hasOwnProperty'](_0x4ab4('0x36'))){_0x25a2d2['limit']=qs[_0x4ab4('0x1c')](_0x1ed169[_0x4ab4('0x30')][_0x4ab4('0x1c')]);_0x25a2d2[_0x4ab4('0x1a')]=qs[_0x4ab4('0x1a')](_0x1ed169[_0x4ab4('0x30')][_0x4ab4('0x1a')]);}_0x25a2d2[_0x4ab4('0x37')]=qs[_0x4ab4('0x38')](_0x1ed169[_0x4ab4('0x30')][_0x4ab4('0x38')]);_0x25a2d2[_0x4ab4('0x39')]=qs[_0x4ab4('0x32')](_[_0x4ab4('0x3a')](_0x1ed169[_0x4ab4('0x30')],_0xf2d47[_0x4ab4('0x32')]),_0x3b0392);if(_0x1ed169[_0x4ab4('0x30')][_0x4ab4('0x3b')]){_0x25a2d2[_0x4ab4('0x39')]=_[_0x4ab4('0x3c')](_0x25a2d2[_0x4ab4('0x39')],{'$or':_[_0x4ab4('0x2f')](_0x3b0392,function(_0x46012e){if(_0x46012e['type']!==_0x4ab4('0x3d')){var _0x1e9365={};_0x1e9365[_0x46012e['name']]={'$like':'%'+_0x1ed169[_0x4ab4('0x30')]['filter']+'%'};return _0x1e9365;}})});}_0x25a2d2=_[_0x4ab4('0x3c')]({},_0x25a2d2,_0x1ed169[_0x4ab4('0x3e')]);var _0x4f1d72={'where':_0x25a2d2['where']};return db[_0x4ab4('0x2a')]['count'](_0x4f1d72)[_0x4ab4('0x24')](function(_0x28a738){_0x57dce4[_0x4ab4('0x1d')]=_0x28a738;if(_0x1ed169[_0x4ab4('0x30')][_0x4ab4('0x3f')]){_0x25a2d2['include']=[{'all':!![]}];}return db[_0x4ab4('0x2a')][_0x4ab4('0x40')](_0x25a2d2);})[_0x4ab4('0x24')](function(_0x232bc4){_0x57dce4[_0x4ab4('0x41')]=_0x232bc4;return _0x57dce4;})[_0x4ab4('0x24')](respondWithFilteredResult(_0x5f07ec,_0x25a2d2))[_0x4ab4('0x42')](handleError(_0x5f07ec,null));};exports[_0x4ab4('0x43')]=function(_0x136a30,_0x13ccf0){var _0x43468e={'raw':![],'where':{'id':_0x136a30['params']['id']}},_0x56548c={};_0x56548c['model']=_[_0x4ab4('0x31')](db[_0x4ab4('0x2a')][_0x4ab4('0x2b')]);_0x56548c[_0x4ab4('0x30')]=_['keys'](_0x136a30['query']);_0x56548c[_0x4ab4('0x32')]=_[_0x4ab4('0x33')](_0x56548c['model'],_0x56548c['query']);_0x43468e[_0x4ab4('0x44')]=_[_0x4ab4('0x33')](_0x56548c[_0x4ab4('0x2e')],qs['fields'](_0x136a30[_0x4ab4('0x30')][_0x4ab4('0x34')]));_0x43468e[_0x4ab4('0x44')]=_0x43468e[_0x4ab4('0x44')][_0x4ab4('0x35')]?_0x43468e['attributes']:_0x56548c[_0x4ab4('0x2e')];if(_0x136a30[_0x4ab4('0x30')][_0x4ab4('0x3f')]){_0x43468e[_0x4ab4('0x45')]=[{'all':!![]}];}_0x43468e=_[_0x4ab4('0x3c')]({},_0x43468e,_0x136a30[_0x4ab4('0x3e')]);return db[_0x4ab4('0x2a')]['find'](_0x43468e)['then'](handleEntityNotFound(_0x13ccf0,null))[_0x4ab4('0x24')](respondWithResult(_0x13ccf0,null))[_0x4ab4('0x42')](handleError(_0x13ccf0,null));};exports[_0x4ab4('0x46')]=function(_0x42e1ec,_0x2a8a0c){return db[_0x4ab4('0x2a')][_0x4ab4('0x46')](_0x42e1ec['body'],{})[_0x4ab4('0x24')](respondWithResult(_0x2a8a0c,0xc9))[_0x4ab4('0x42')](handleError(_0x2a8a0c,null));};exports[_0x4ab4('0x47')]=function(_0x4cd454,_0x29708e){if(_0x4cd454[_0x4ab4('0x48')]['id']){delete _0x4cd454['body']['id'];}return db[_0x4ab4('0x2a')][_0x4ab4('0x49')]({'where':{'id':_0x4cd454[_0x4ab4('0x4a')]['id']}})[_0x4ab4('0x24')](handleEntityNotFound(_0x29708e,null))[_0x4ab4('0x24')](saveUpdates(_0x4cd454['body'],null))[_0x4ab4('0x24')](respondWithResult(_0x29708e,null))[_0x4ab4('0x42')](handleError(_0x29708e,null));};exports['destroy']=function(_0x557838,_0x37f706){return db[_0x4ab4('0x2a')][_0x4ab4('0x49')]({'where':{'id':_0x557838[_0x4ab4('0x4a')]['id']}})[_0x4ab4('0x24')](handleEntityNotFound(_0x37f706,null))[_0x4ab4('0x24')](removeEntity(_0x37f706,null))['catch'](handleError(_0x37f706,null));};exports[_0x4ab4('0x4b')]=function(_0x58ad89,_0x5ef41c,_0x1fcfeb){var _0x30069c={};var _0x5731c5={};var _0x12c41c;var _0x504c47;return db['VtigerConfiguration'][_0x4ab4('0x4c')]({'where':{'id':_0x58ad89['params']['id']}})[_0x4ab4('0x24')](handleEntityNotFound(_0x5ef41c,null))[_0x4ab4('0x24')](function(_0x12e479){if(_0x12e479){_0x12c41c=_0x12e479;_0x5731c5[_0x4ab4('0x2e')]=_[_0x4ab4('0x31')](db[_0x4ab4('0x4d')]['rawAttributes']);_0x5731c5[_0x4ab4('0x30')]=_[_0x4ab4('0x31')](_0x58ad89[_0x4ab4('0x30')]);_0x5731c5['filters']=_[_0x4ab4('0x33')](_0x5731c5[_0x4ab4('0x2e')],_0x5731c5['query']);_0x30069c[_0x4ab4('0x44')]=_[_0x4ab4('0x33')](_0x5731c5[_0x4ab4('0x2e')],qs['fields'](_0x58ad89[_0x4ab4('0x30')][_0x4ab4('0x34')]));_0x30069c[_0x4ab4('0x44')]=_0x30069c['attributes'][_0x4ab4('0x35')]?_0x30069c[_0x4ab4('0x44')]:_0x5731c5[_0x4ab4('0x2e')];_0x30069c[_0x4ab4('0x37')]=qs[_0x4ab4('0x38')](_0x58ad89[_0x4ab4('0x30')][_0x4ab4('0x38')]);_0x30069c['where']=qs[_0x4ab4('0x32')](_['pick'](_0x58ad89['query'],_0x5731c5[_0x4ab4('0x32')]));if(_0x58ad89[_0x4ab4('0x30')][_0x4ab4('0x3b')]){_0x30069c[_0x4ab4('0x39')]=_[_0x4ab4('0x3c')](_0x30069c[_0x4ab4('0x39')],{'$or':_['map'](_0x30069c['attributes'],function(_0x1889c1){var _0x32cdaf={};_0x32cdaf[_0x1889c1]={'$like':'%'+_0x58ad89['query']['filter']+'%'};return _0x32cdaf;})});}_0x30069c=_[_0x4ab4('0x3c')]({},_0x30069c,_0x58ad89[_0x4ab4('0x3e')]);return _0x12c41c[_0x4ab4('0x4b')](_0x30069c);}})['then'](function(_0x34adee){if(_0x34adee){_0x504c47=_0x34adee[_0x4ab4('0x35')];if(!_0x58ad89[_0x4ab4('0x30')][_0x4ab4('0x4e')](_0x4ab4('0x36'))){_0x30069c[_0x4ab4('0x1c')]=qs['limit'](_0x58ad89['query'][_0x4ab4('0x1c')]);_0x30069c[_0x4ab4('0x1a')]=qs[_0x4ab4('0x1a')](_0x58ad89[_0x4ab4('0x30')][_0x4ab4('0x1a')]);}return _0x12c41c[_0x4ab4('0x4b')](_0x30069c);}})[_0x4ab4('0x24')](function(_0x215849){if(_0x215849){return _0x215849?{'count':_0x504c47,'rows':_0x215849}:null;}})[_0x4ab4('0x24')](respondWithResult(_0x5ef41c,null))[_0x4ab4('0x42')](handleError(_0x5ef41c,null));};exports['getSubjects']=function(_0x2adbc6,_0x377c97,_0x35cb55){var _0x327168={};var _0x5f2570={};var _0x59a49f;var _0x5ed7ba;return db[_0x4ab4('0x2a')]['findOne']({'where':{'id':_0x2adbc6['params']['id']}})[_0x4ab4('0x24')](handleEntityNotFound(_0x377c97,null))[_0x4ab4('0x24')](function(_0x4f2642){if(_0x4f2642){_0x59a49f=_0x4f2642;_0x5f2570[_0x4ab4('0x2e')]=_[_0x4ab4('0x31')](db['VtigerField']['rawAttributes']);_0x5f2570[_0x4ab4('0x30')]=_[_0x4ab4('0x31')](_0x2adbc6[_0x4ab4('0x30')]);_0x5f2570[_0x4ab4('0x32')]=_[_0x4ab4('0x33')](_0x5f2570[_0x4ab4('0x2e')],_0x5f2570[_0x4ab4('0x30')]);_0x327168[_0x4ab4('0x44')]=_[_0x4ab4('0x33')](_0x5f2570['model'],qs[_0x4ab4('0x34')](_0x2adbc6[_0x4ab4('0x30')][_0x4ab4('0x34')]));_0x327168[_0x4ab4('0x44')]=_0x327168['attributes'][_0x4ab4('0x35')]?_0x327168[_0x4ab4('0x44')]:_0x5f2570[_0x4ab4('0x2e')];_0x327168[_0x4ab4('0x37')]=qs[_0x4ab4('0x38')](_0x2adbc6[_0x4ab4('0x30')][_0x4ab4('0x38')]);_0x327168['where']=qs['filters'](_[_0x4ab4('0x3a')](_0x2adbc6['query'],_0x5f2570[_0x4ab4('0x32')]));if(_0x2adbc6[_0x4ab4('0x30')][_0x4ab4('0x3b')]){_0x327168[_0x4ab4('0x39')]=_[_0x4ab4('0x3c')](_0x327168['where'],{'$or':_[_0x4ab4('0x2f')](_0x327168[_0x4ab4('0x44')],function(_0x3f283c){var _0x289246={};_0x289246[_0x3f283c]={'$like':'%'+_0x2adbc6[_0x4ab4('0x30')][_0x4ab4('0x3b')]+'%'};return _0x289246;})});}_0x327168=_[_0x4ab4('0x3c')]({},_0x327168,_0x2adbc6['options']);return _0x59a49f[_0x4ab4('0x4f')](_0x327168);}})[_0x4ab4('0x24')](function(_0x17bbb9){if(_0x17bbb9){_0x5ed7ba=_0x17bbb9[_0x4ab4('0x35')];if(!_0x2adbc6[_0x4ab4('0x30')][_0x4ab4('0x4e')]('nolimit')){_0x327168['limit']=qs[_0x4ab4('0x1c')](_0x2adbc6[_0x4ab4('0x30')][_0x4ab4('0x1c')]);_0x327168[_0x4ab4('0x1a')]=qs[_0x4ab4('0x1a')](_0x2adbc6['query'][_0x4ab4('0x1a')]);}return _0x59a49f['getSubjects'](_0x327168);}})[_0x4ab4('0x24')](function(_0x1697a1){if(_0x1697a1){return _0x1697a1?{'count':_0x5ed7ba,'rows':_0x1697a1}:null;}})[_0x4ab4('0x24')](respondWithResult(_0x377c97,null))[_0x4ab4('0x42')](handleError(_0x377c97,null));};exports[_0x4ab4('0x50')]=function(_0x3a7592,_0x597fb6,_0x3b8851){var _0x2b20a7={};var _0x1be1f3={};var _0x652aa4;var _0x3dee5a;return db[_0x4ab4('0x2a')][_0x4ab4('0x4c')]({'where':{'id':_0x3a7592[_0x4ab4('0x4a')]['id']}})[_0x4ab4('0x24')](handleEntityNotFound(_0x597fb6,null))[_0x4ab4('0x24')](function(_0x238308){if(_0x238308){_0x652aa4=_0x238308;_0x1be1f3[_0x4ab4('0x2e')]=_[_0x4ab4('0x31')](db[_0x4ab4('0x4d')][_0x4ab4('0x2b')]);_0x1be1f3[_0x4ab4('0x30')]=_[_0x4ab4('0x31')](_0x3a7592[_0x4ab4('0x30')]);_0x1be1f3[_0x4ab4('0x32')]=_[_0x4ab4('0x33')](_0x1be1f3[_0x4ab4('0x2e')],_0x1be1f3[_0x4ab4('0x30')]);_0x2b20a7['attributes']=_[_0x4ab4('0x33')](_0x1be1f3[_0x4ab4('0x2e')],qs[_0x4ab4('0x34')](_0x3a7592[_0x4ab4('0x30')][_0x4ab4('0x34')]));_0x2b20a7[_0x4ab4('0x44')]=_0x2b20a7[_0x4ab4('0x44')][_0x4ab4('0x35')]?_0x2b20a7[_0x4ab4('0x44')]:_0x1be1f3[_0x4ab4('0x2e')];_0x2b20a7[_0x4ab4('0x37')]=qs[_0x4ab4('0x38')](_0x3a7592[_0x4ab4('0x30')][_0x4ab4('0x38')]);_0x2b20a7[_0x4ab4('0x39')]=qs[_0x4ab4('0x32')](_[_0x4ab4('0x3a')](_0x3a7592['query'],_0x1be1f3['filters']));if(_0x3a7592[_0x4ab4('0x30')][_0x4ab4('0x3b')]){_0x2b20a7['where']=_[_0x4ab4('0x3c')](_0x2b20a7[_0x4ab4('0x39')],{'$or':_[_0x4ab4('0x2f')](_0x2b20a7[_0x4ab4('0x44')],function(_0x48fbae){var _0x387360={};_0x387360[_0x48fbae]={'$like':'%'+_0x3a7592[_0x4ab4('0x30')][_0x4ab4('0x3b')]+'%'};return _0x387360;})});}_0x2b20a7=_[_0x4ab4('0x3c')]({},_0x2b20a7,_0x3a7592['options']);return _0x652aa4[_0x4ab4('0x50')](_0x2b20a7);}})['then'](function(_0x2efe61){if(_0x2efe61){_0x3dee5a=_0x2efe61[_0x4ab4('0x35')];if(!_0x3a7592[_0x4ab4('0x30')][_0x4ab4('0x4e')]('nolimit')){_0x2b20a7[_0x4ab4('0x1c')]=qs[_0x4ab4('0x1c')](_0x3a7592[_0x4ab4('0x30')][_0x4ab4('0x1c')]);_0x2b20a7['offset']=qs['offset'](_0x3a7592[_0x4ab4('0x30')][_0x4ab4('0x1a')]);}return _0x652aa4['getDescriptions'](_0x2b20a7);}})[_0x4ab4('0x24')](function(_0xc9aee1){if(_0xc9aee1){return _0xc9aee1?{'count':_0x3dee5a,'rows':_0xc9aee1}:null;}})['then'](respondWithResult(_0x597fb6,null))[_0x4ab4('0x42')](handleError(_0x597fb6,null));}; \ No newline at end of file +var _0xcc8c=['rows','catch','show','params','include','find','create','body','getFields','VtigerField','getSubjects','findOne','getDescriptions','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','path','sox','to-csv','ejs','squel','jsforce','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../config/license/hardware','../../config/logger','../../config/utils','../../config/environment','../../mysqldb','sendStatus','status','json','undefined','count','offset','limit','Content-Range','apply','reject','save','update','then','destroy','end','error','stack','name','send','index','map','rawAttributes','fieldName','type','key','model','keys','query','filters','intersection','attributes','fields','length','hasOwnProperty','nolimit','order','sort','where','pick','filter','merge','VIRTUAL','options','VtigerConfiguration','includeAll'];(function(_0x1c817c,_0x55f2ff){var _0x569f07=function(_0x292d30){while(--_0x292d30){_0x1c817c['push'](_0x1c817c['shift']());}};_0x569f07(++_0x55f2ff);}(_0xcc8c,0x151));var _0xccc8=function(_0x30fde3,_0x69fd6){_0x30fde3=_0x30fde3-0x0;var _0x45703f=_0xcc8c[_0x30fde3];return _0x45703f;};'use strict';var emlformat=require(_0xccc8('0x0'));var rimraf=require(_0xccc8('0x1'));var zipdir=require(_0xccc8('0x2'));var jsonpatch=require(_0xccc8('0x3'));var rp=require(_0xccc8('0x4'));var moment=require(_0xccc8('0x5'));var BPromise=require(_0xccc8('0x6'));var Mustache=require('mustache');var util=require('util');var path=require(_0xccc8('0x7'));var sox=require(_0xccc8('0x8'));var csv=require(_0xccc8('0x9'));var ejs=require(_0xccc8('0xa'));var fs=require('fs');var fs_extra=require('fs-extra');var _=require('lodash');var squel=require(_0xccc8('0xb'));var crypto=require('crypto');var jsforce=require(_0xccc8('0xc'));var deskjs=require('desk.js');var toCsv=require(_0xccc8('0x9'));var querystring=require(_0xccc8('0xd'));var Papa=require(_0xccc8('0xe'));var Redis=require(_0xccc8('0xf'));var authService=require(_0xccc8('0x10'));var qs=require(_0xccc8('0x11'));var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0xccc8('0x12'));var logger=require(_0xccc8('0x13'))('api');var utils=require(_0xccc8('0x14'));var config=require(_0xccc8('0x15'));var licenseUtil=require('../../config/license/util');var db=require(_0xccc8('0x16'))['db'];function respondWithStatusCode(_0x2bfbc7,_0x3bc2f1){_0x3bc2f1=_0x3bc2f1||0xcc;return function(_0x1494bc){if(_0x1494bc){return _0x2bfbc7[_0xccc8('0x17')](_0x3bc2f1);}return _0x2bfbc7[_0xccc8('0x18')](_0x3bc2f1)['end']();};}function respondWithResult(_0x4e0d2c,_0xdce64f){_0xdce64f=_0xdce64f||0xc8;return function(_0xba7b7d){if(_0xba7b7d){return _0x4e0d2c[_0xccc8('0x18')](_0xdce64f)[_0xccc8('0x19')](_0xba7b7d);}};}function respondWithFilteredResult(_0x5d06ef,_0x38f4b3){return function(_0x15ab58){if(_0x15ab58){var _0x24cd70=typeof _0x38f4b3['offset']===_0xccc8('0x1a')&&typeof _0x38f4b3['limit']===_0xccc8('0x1a');var _0x37ec6c=_0x15ab58[_0xccc8('0x1b')];var _0x3009fb=_0x24cd70?0x0:_0x38f4b3['offset'];var _0x3c02fd=_0x24cd70?_0x15ab58[_0xccc8('0x1b')]:_0x38f4b3[_0xccc8('0x1c')]+_0x38f4b3[_0xccc8('0x1d')];var _0x2b7c38;if(_0x3c02fd>=_0x37ec6c){_0x3c02fd=_0x37ec6c;_0x2b7c38=0xc8;}else{_0x2b7c38=0xce;}_0x5d06ef[_0xccc8('0x18')](_0x2b7c38);return _0x5d06ef['set'](_0xccc8('0x1e'),_0x3009fb+'-'+_0x3c02fd+'/'+_0x37ec6c)[_0xccc8('0x19')](_0x15ab58);}return null;};}function patchUpdates(_0x42a720){return function(_0x3fb1c5){try{jsonpatch[_0xccc8('0x1f')](_0x3fb1c5,_0x42a720,!![]);}catch(_0x15384f){return BPromise[_0xccc8('0x20')](_0x15384f);}return _0x3fb1c5[_0xccc8('0x21')]();};}function saveUpdates(_0x2a4e59,_0xd0411d){return function(_0x5116c5){if(_0x5116c5){return _0x5116c5[_0xccc8('0x22')](_0x2a4e59)[_0xccc8('0x23')](function(_0x433fa0){return _0x433fa0;});}return null;};}function removeEntity(_0x511b46,_0x19bf00){return function(_0x212574){if(_0x212574){return _0x212574[_0xccc8('0x24')]()[_0xccc8('0x23')](function(){_0x511b46[_0xccc8('0x18')](0xcc)[_0xccc8('0x25')]();});}};}function handleEntityNotFound(_0x40f68a,_0x33d744){return function(_0x579bd1){if(!_0x579bd1){_0x40f68a[_0xccc8('0x17')](0x194);}return _0x579bd1;};}function handleError(_0x1ee2a3,_0x57d859){_0x57d859=_0x57d859||0x1f4;return function(_0x2adf1c){logger[_0xccc8('0x26')](_0x2adf1c[_0xccc8('0x27')]);if(_0x2adf1c[_0xccc8('0x28')]){delete _0x2adf1c[_0xccc8('0x28')];}_0x1ee2a3[_0xccc8('0x18')](_0x57d859)[_0xccc8('0x29')](_0x2adf1c);};}exports[_0xccc8('0x2a')]=function(_0x318403,_0x2f25a0){var _0x18cb1f={},_0x3e0403={},_0x3541d5={'count':0x0,'rows':[]};var _0x53053a=_[_0xccc8('0x2b')](db['VtigerConfiguration'][_0xccc8('0x2c')],function(_0x5dedf6){return{'name':_0x5dedf6[_0xccc8('0x2d')],'type':_0x5dedf6[_0xccc8('0x2e')][_0xccc8('0x2f')]};});_0x3e0403[_0xccc8('0x30')]=_[_0xccc8('0x2b')](_0x53053a,'name');_0x3e0403['query']=_[_0xccc8('0x31')](_0x318403[_0xccc8('0x32')]);_0x3e0403[_0xccc8('0x33')]=_[_0xccc8('0x34')](_0x3e0403[_0xccc8('0x30')],_0x3e0403[_0xccc8('0x32')]);_0x18cb1f[_0xccc8('0x35')]=_['intersection'](_0x3e0403[_0xccc8('0x30')],qs[_0xccc8('0x36')](_0x318403[_0xccc8('0x32')]['fields']));_0x18cb1f[_0xccc8('0x35')]=_0x18cb1f[_0xccc8('0x35')][_0xccc8('0x37')]?_0x18cb1f['attributes']:_0x3e0403['model'];if(!_0x318403[_0xccc8('0x32')][_0xccc8('0x38')](_0xccc8('0x39'))){_0x18cb1f[_0xccc8('0x1d')]=qs['limit'](_0x318403[_0xccc8('0x32')][_0xccc8('0x1d')]);_0x18cb1f[_0xccc8('0x1c')]=qs[_0xccc8('0x1c')](_0x318403[_0xccc8('0x32')][_0xccc8('0x1c')]);}_0x18cb1f[_0xccc8('0x3a')]=qs[_0xccc8('0x3b')](_0x318403[_0xccc8('0x32')][_0xccc8('0x3b')]);_0x18cb1f[_0xccc8('0x3c')]=qs[_0xccc8('0x33')](_[_0xccc8('0x3d')](_0x318403['query'],_0x3e0403['filters']),_0x53053a);if(_0x318403['query'][_0xccc8('0x3e')]){_0x18cb1f['where']=_[_0xccc8('0x3f')](_0x18cb1f[_0xccc8('0x3c')],{'$or':_[_0xccc8('0x2b')](_0x53053a,function(_0x1e6c55){if(_0x1e6c55[_0xccc8('0x2e')]!==_0xccc8('0x40')){var _0x39ddff={};_0x39ddff[_0x1e6c55[_0xccc8('0x28')]]={'$like':'%'+_0x318403[_0xccc8('0x32')][_0xccc8('0x3e')]+'%'};return _0x39ddff;}})});}_0x18cb1f=_[_0xccc8('0x3f')]({},_0x18cb1f,_0x318403[_0xccc8('0x41')]);var _0x4103cc={'where':_0x18cb1f[_0xccc8('0x3c')]};return db[_0xccc8('0x42')][_0xccc8('0x1b')](_0x4103cc)[_0xccc8('0x23')](function(_0x29093c){_0x3541d5[_0xccc8('0x1b')]=_0x29093c;if(_0x318403[_0xccc8('0x32')][_0xccc8('0x43')]){_0x18cb1f['include']=[{'all':!![]}];}return db[_0xccc8('0x42')]['findAll'](_0x18cb1f);})[_0xccc8('0x23')](function(_0x2fc8eb){_0x3541d5[_0xccc8('0x44')]=_0x2fc8eb;return _0x3541d5;})['then'](respondWithFilteredResult(_0x2f25a0,_0x18cb1f))[_0xccc8('0x45')](handleError(_0x2f25a0,null));};exports[_0xccc8('0x46')]=function(_0x8cdfbc,_0x56ae7d){var _0x2b1ef9={'raw':![],'where':{'id':_0x8cdfbc[_0xccc8('0x47')]['id']}},_0x5dcebb={};_0x5dcebb[_0xccc8('0x30')]=_['keys'](db[_0xccc8('0x42')][_0xccc8('0x2c')]);_0x5dcebb[_0xccc8('0x32')]=_[_0xccc8('0x31')](_0x8cdfbc['query']);_0x5dcebb[_0xccc8('0x33')]=_[_0xccc8('0x34')](_0x5dcebb[_0xccc8('0x30')],_0x5dcebb['query']);_0x2b1ef9[_0xccc8('0x35')]=_['intersection'](_0x5dcebb[_0xccc8('0x30')],qs[_0xccc8('0x36')](_0x8cdfbc[_0xccc8('0x32')][_0xccc8('0x36')]));_0x2b1ef9[_0xccc8('0x35')]=_0x2b1ef9[_0xccc8('0x35')]['length']?_0x2b1ef9[_0xccc8('0x35')]:_0x5dcebb[_0xccc8('0x30')];if(_0x8cdfbc[_0xccc8('0x32')][_0xccc8('0x43')]){_0x2b1ef9[_0xccc8('0x48')]=[{'all':!![]}];}_0x2b1ef9=_[_0xccc8('0x3f')]({},_0x2b1ef9,_0x8cdfbc[_0xccc8('0x41')]);return db['VtigerConfiguration'][_0xccc8('0x49')](_0x2b1ef9)[_0xccc8('0x23')](handleEntityNotFound(_0x56ae7d,null))[_0xccc8('0x23')](respondWithResult(_0x56ae7d,null))[_0xccc8('0x45')](handleError(_0x56ae7d,null));};exports[_0xccc8('0x4a')]=function(_0x292b6a,_0xa78467){return db[_0xccc8('0x42')][_0xccc8('0x4a')](_0x292b6a['body'],{})[_0xccc8('0x23')](respondWithResult(_0xa78467,0xc9))[_0xccc8('0x45')](handleError(_0xa78467,null));};exports[_0xccc8('0x22')]=function(_0x37102f,_0x3ec088){if(_0x37102f[_0xccc8('0x4b')]['id']){delete _0x37102f['body']['id'];}return db[_0xccc8('0x42')][_0xccc8('0x49')]({'where':{'id':_0x37102f['params']['id']}})[_0xccc8('0x23')](handleEntityNotFound(_0x3ec088,null))[_0xccc8('0x23')](saveUpdates(_0x37102f[_0xccc8('0x4b')],null))[_0xccc8('0x23')](respondWithResult(_0x3ec088,null))['catch'](handleError(_0x3ec088,null));};exports[_0xccc8('0x24')]=function(_0x2709da,_0x2e9134){return db['VtigerConfiguration'][_0xccc8('0x49')]({'where':{'id':_0x2709da[_0xccc8('0x47')]['id']}})['then'](handleEntityNotFound(_0x2e9134,null))[_0xccc8('0x23')](removeEntity(_0x2e9134,null))['catch'](handleError(_0x2e9134,null));};exports[_0xccc8('0x4c')]=function(_0x5e15f5,_0x822119,_0x5b5128){var _0x52338d={};var _0x61607c={};var _0x535c06;var _0xc73906;return db[_0xccc8('0x42')]['findOne']({'where':{'id':_0x5e15f5[_0xccc8('0x47')]['id']}})['then'](handleEntityNotFound(_0x822119,null))['then'](function(_0x38db71){if(_0x38db71){_0x535c06=_0x38db71;_0x61607c[_0xccc8('0x30')]=_[_0xccc8('0x31')](db[_0xccc8('0x4d')]['rawAttributes']);_0x61607c[_0xccc8('0x32')]=_[_0xccc8('0x31')](_0x5e15f5[_0xccc8('0x32')]);_0x61607c[_0xccc8('0x33')]=_[_0xccc8('0x34')](_0x61607c['model'],_0x61607c['query']);_0x52338d[_0xccc8('0x35')]=_[_0xccc8('0x34')](_0x61607c['model'],qs[_0xccc8('0x36')](_0x5e15f5[_0xccc8('0x32')][_0xccc8('0x36')]));_0x52338d[_0xccc8('0x35')]=_0x52338d[_0xccc8('0x35')][_0xccc8('0x37')]?_0x52338d[_0xccc8('0x35')]:_0x61607c['model'];_0x52338d[_0xccc8('0x3a')]=qs[_0xccc8('0x3b')](_0x5e15f5[_0xccc8('0x32')]['sort']);_0x52338d[_0xccc8('0x3c')]=qs['filters'](_['pick'](_0x5e15f5[_0xccc8('0x32')],_0x61607c[_0xccc8('0x33')]));if(_0x5e15f5[_0xccc8('0x32')]['filter']){_0x52338d['where']=_[_0xccc8('0x3f')](_0x52338d[_0xccc8('0x3c')],{'$or':_[_0xccc8('0x2b')](_0x52338d[_0xccc8('0x35')],function(_0xd2ade2){var _0x48d23b={};_0x48d23b[_0xd2ade2]={'$like':'%'+_0x5e15f5[_0xccc8('0x32')][_0xccc8('0x3e')]+'%'};return _0x48d23b;})});}_0x52338d=_['merge']({},_0x52338d,_0x5e15f5[_0xccc8('0x41')]);return _0x535c06[_0xccc8('0x4c')](_0x52338d);}})[_0xccc8('0x23')](function(_0x1687f8){if(_0x1687f8){_0xc73906=_0x1687f8[_0xccc8('0x37')];if(!_0x5e15f5['query'][_0xccc8('0x38')](_0xccc8('0x39'))){_0x52338d[_0xccc8('0x1d')]=qs[_0xccc8('0x1d')](_0x5e15f5['query'][_0xccc8('0x1d')]);_0x52338d['offset']=qs[_0xccc8('0x1c')](_0x5e15f5[_0xccc8('0x32')][_0xccc8('0x1c')]);}return _0x535c06[_0xccc8('0x4c')](_0x52338d);}})[_0xccc8('0x23')](function(_0x507b96){if(_0x507b96){return _0x507b96?{'count':_0xc73906,'rows':_0x507b96}:null;}})[_0xccc8('0x23')](respondWithResult(_0x822119,null))[_0xccc8('0x45')](handleError(_0x822119,null));};exports[_0xccc8('0x4e')]=function(_0x1dd5b5,_0x583b79,_0x5cc416){var _0x2fca5b={};var _0x4aee67={};var _0x225ee5;var _0x40e177;return db[_0xccc8('0x42')][_0xccc8('0x4f')]({'where':{'id':_0x1dd5b5[_0xccc8('0x47')]['id']}})[_0xccc8('0x23')](handleEntityNotFound(_0x583b79,null))['then'](function(_0x1a793d){if(_0x1a793d){_0x225ee5=_0x1a793d;_0x4aee67['model']=_['keys'](db[_0xccc8('0x4d')][_0xccc8('0x2c')]);_0x4aee67[_0xccc8('0x32')]=_[_0xccc8('0x31')](_0x1dd5b5[_0xccc8('0x32')]);_0x4aee67[_0xccc8('0x33')]=_[_0xccc8('0x34')](_0x4aee67[_0xccc8('0x30')],_0x4aee67['query']);_0x2fca5b[_0xccc8('0x35')]=_[_0xccc8('0x34')](_0x4aee67['model'],qs[_0xccc8('0x36')](_0x1dd5b5[_0xccc8('0x32')][_0xccc8('0x36')]));_0x2fca5b[_0xccc8('0x35')]=_0x2fca5b[_0xccc8('0x35')]['length']?_0x2fca5b['attributes']:_0x4aee67[_0xccc8('0x30')];_0x2fca5b['order']=qs[_0xccc8('0x3b')](_0x1dd5b5['query']['sort']);_0x2fca5b[_0xccc8('0x3c')]=qs[_0xccc8('0x33')](_[_0xccc8('0x3d')](_0x1dd5b5['query'],_0x4aee67[_0xccc8('0x33')]));if(_0x1dd5b5['query'][_0xccc8('0x3e')]){_0x2fca5b[_0xccc8('0x3c')]=_[_0xccc8('0x3f')](_0x2fca5b[_0xccc8('0x3c')],{'$or':_[_0xccc8('0x2b')](_0x2fca5b[_0xccc8('0x35')],function(_0x5e2776){var _0x10a7d4={};_0x10a7d4[_0x5e2776]={'$like':'%'+_0x1dd5b5[_0xccc8('0x32')][_0xccc8('0x3e')]+'%'};return _0x10a7d4;})});}_0x2fca5b=_[_0xccc8('0x3f')]({},_0x2fca5b,_0x1dd5b5[_0xccc8('0x41')]);return _0x225ee5['getSubjects'](_0x2fca5b);}})[_0xccc8('0x23')](function(_0x2cc69d){if(_0x2cc69d){_0x40e177=_0x2cc69d[_0xccc8('0x37')];if(!_0x1dd5b5[_0xccc8('0x32')]['hasOwnProperty']('nolimit')){_0x2fca5b[_0xccc8('0x1d')]=qs[_0xccc8('0x1d')](_0x1dd5b5['query'][_0xccc8('0x1d')]);_0x2fca5b['offset']=qs[_0xccc8('0x1c')](_0x1dd5b5['query'][_0xccc8('0x1c')]);}return _0x225ee5[_0xccc8('0x4e')](_0x2fca5b);}})[_0xccc8('0x23')](function(_0x2255a0){if(_0x2255a0){return _0x2255a0?{'count':_0x40e177,'rows':_0x2255a0}:null;}})[_0xccc8('0x23')](respondWithResult(_0x583b79,null))[_0xccc8('0x45')](handleError(_0x583b79,null));};exports[_0xccc8('0x50')]=function(_0x5ce562,_0x4c14c0,_0x1a18a6){var _0x92fd99={};var _0x1497ac={};var _0x5bb8d9;var _0x4fef27;return db[_0xccc8('0x42')][_0xccc8('0x4f')]({'where':{'id':_0x5ce562['params']['id']}})[_0xccc8('0x23')](handleEntityNotFound(_0x4c14c0,null))['then'](function(_0x28c6db){if(_0x28c6db){_0x5bb8d9=_0x28c6db;_0x1497ac['model']=_[_0xccc8('0x31')](db['VtigerField'][_0xccc8('0x2c')]);_0x1497ac[_0xccc8('0x32')]=_[_0xccc8('0x31')](_0x5ce562[_0xccc8('0x32')]);_0x1497ac[_0xccc8('0x33')]=_[_0xccc8('0x34')](_0x1497ac[_0xccc8('0x30')],_0x1497ac[_0xccc8('0x32')]);_0x92fd99[_0xccc8('0x35')]=_[_0xccc8('0x34')](_0x1497ac[_0xccc8('0x30')],qs[_0xccc8('0x36')](_0x5ce562[_0xccc8('0x32')][_0xccc8('0x36')]));_0x92fd99[_0xccc8('0x35')]=_0x92fd99[_0xccc8('0x35')][_0xccc8('0x37')]?_0x92fd99[_0xccc8('0x35')]:_0x1497ac[_0xccc8('0x30')];_0x92fd99[_0xccc8('0x3a')]=qs[_0xccc8('0x3b')](_0x5ce562[_0xccc8('0x32')][_0xccc8('0x3b')]);_0x92fd99[_0xccc8('0x3c')]=qs['filters'](_[_0xccc8('0x3d')](_0x5ce562[_0xccc8('0x32')],_0x1497ac[_0xccc8('0x33')]));if(_0x5ce562[_0xccc8('0x32')]['filter']){_0x92fd99['where']=_['merge'](_0x92fd99[_0xccc8('0x3c')],{'$or':_[_0xccc8('0x2b')](_0x92fd99[_0xccc8('0x35')],function(_0x47c9e6){var _0xa2c34d={};_0xa2c34d[_0x47c9e6]={'$like':'%'+_0x5ce562[_0xccc8('0x32')][_0xccc8('0x3e')]+'%'};return _0xa2c34d;})});}_0x92fd99=_[_0xccc8('0x3f')]({},_0x92fd99,_0x5ce562[_0xccc8('0x41')]);return _0x5bb8d9[_0xccc8('0x50')](_0x92fd99);}})[_0xccc8('0x23')](function(_0x5e7df5){if(_0x5e7df5){_0x4fef27=_0x5e7df5['length'];if(!_0x5ce562[_0xccc8('0x32')]['hasOwnProperty'](_0xccc8('0x39'))){_0x92fd99[_0xccc8('0x1d')]=qs[_0xccc8('0x1d')](_0x5ce562['query'][_0xccc8('0x1d')]);_0x92fd99[_0xccc8('0x1c')]=qs[_0xccc8('0x1c')](_0x5ce562['query'][_0xccc8('0x1c')]);}return _0x5bb8d9['getDescriptions'](_0x92fd99);}})[_0xccc8('0x23')](function(_0x131417){if(_0x131417){return _0x131417?{'count':_0x4fef27,'rows':_0x131417}:null;}})['then'](respondWithResult(_0x4c14c0,null))['catch'](handleError(_0x4c14c0,null));}; \ No newline at end of file diff --git a/server/api/intVtigerConfiguration/intVtigerConfiguration.model.js b/server/api/intVtigerConfiguration/intVtigerConfiguration.model.js index be139b1..86ad791 100644 --- a/server/api/intVtigerConfiguration/intVtigerConfiguration.model.js +++ b/server/api/intVtigerConfiguration/intVtigerConfiguration.model.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x35da=['exports','VtigerConfiguration','int_vtiger_configurations','util','api','moment','bluebird','request-promise','path','./intVtigerConfiguration.attributes'];(function(_0x15ee6b,_0x7ddc0a){var _0x324a38=function(_0x4c75e8){while(--_0x4c75e8){_0x15ee6b['push'](_0x15ee6b['shift']());}};_0x324a38(++_0x7ddc0a);}(_0x35da,0x143));var _0xa35d=function(_0x4937c1,_0x1aeed1){_0x4937c1=_0x4937c1-0x0;var _0x355b82=_0x35da[_0x4937c1];return _0x355b82;};'use strict';var _=require('lodash');var util=require(_0xa35d('0x0'));var logger=require('../../config/logger')(_0xa35d('0x1'));var moment=require(_0xa35d('0x2'));var BPromise=require(_0xa35d('0x3'));var rp=require(_0xa35d('0x4'));var fs=require('fs');var path=require(_0xa35d('0x5'));var rimraf=require('rimraf');var config=require('../../config/environment');var attributes=require(_0xa35d('0x6'));module[_0xa35d('0x7')]=function(_0x4782d1,_0x4a92b0){return _0x4782d1['define'](_0xa35d('0x8'),attributes,{'tableName':_0xa35d('0x9'),'paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file +var _0x642d=['request-promise','path','rimraf','../../config/environment','./intVtigerConfiguration.attributes','exports','define','VtigerConfiguration','int_vtiger_configurations','util','../../config/logger','moment','bluebird'];(function(_0x8eb4eb,_0xa70079){var _0x1ff8e3=function(_0x1e118e){while(--_0x1e118e){_0x8eb4eb['push'](_0x8eb4eb['shift']());}};_0x1ff8e3(++_0xa70079);}(_0x642d,0x8b));var _0xd642=function(_0x923eae,_0x24de30){_0x923eae=_0x923eae-0x0;var _0x431ed1=_0x642d[_0x923eae];return _0x431ed1;};'use strict';var _=require('lodash');var util=require(_0xd642('0x0'));var logger=require(_0xd642('0x1'))('api');var moment=require(_0xd642('0x2'));var BPromise=require(_0xd642('0x3'));var rp=require(_0xd642('0x4'));var fs=require('fs');var path=require(_0xd642('0x5'));var rimraf=require(_0xd642('0x6'));var config=require(_0xd642('0x7'));var attributes=require(_0xd642('0x8'));module[_0xd642('0x9')]=function(_0xcb7710,_0x34dbb0){return _0xcb7710[_0xd642('0xa')](_0xd642('0xb'),attributes,{'tableName':_0xd642('0xc'),'paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file diff --git a/server/api/intVtigerConfiguration/intVtigerConfiguration.rpc.js b/server/api/intVtigerConfiguration/intVtigerConfiguration.rpc.js index 3844a0b..8607ba9 100644 --- a/server/api/intVtigerConfiguration/intVtigerConfiguration.rpc.js +++ b/server/api/intVtigerConfiguration/intVtigerConfiguration.rpc.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xb533=['lodash','util','bluebird','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','request','info','request\x20sent','debug','VtigerConfiguration,\x20%s,\x20%s,\x20%s','stringify','error','code','VtigerConfiguration,\x20%s,\x20%s','message','catch'];(function(_0x99dac5,_0x2bcaf0){var _0x2b53a5=function(_0x3187e2){while(--_0x3187e2){_0x99dac5['push'](_0x99dac5['shift']());}};_0x2b53a5(++_0x2bcaf0);}(_0xb533,0x187));var _0x3b53=function(_0x160c73,_0x2ee678){_0x160c73=_0x160c73-0x0;var _0xd9302=_0xb533[_0x160c73];return _0xd9302;};'use strict';var _=require(_0x3b53('0x0'));var util=require(_0x3b53('0x1'));var moment=require('moment');var BPromise=require(_0x3b53('0x2'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x3b53('0x3'));var db=require(_0x3b53('0x4'))['db'];var utils=require(_0x3b53('0x5'));var logger=require(_0x3b53('0x6'))(_0x3b53('0x7'));var config=require(_0x3b53('0x8'));var jayson=require(_0x3b53('0x9'));var client=jayson[_0x3b53('0xa')][_0x3b53('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x24065e,_0x4247d0,_0x2728ab){return new BPromise(function(_0xba94ff,_0x1f4bd0){return client[_0x3b53('0xc')](_0x24065e,_0x2728ab)['then'](function(_0x599254){logger[_0x3b53('0xd')]('VtigerConfiguration,\x20%s,\x20%s',_0x4247d0,_0x3b53('0xe'));logger[_0x3b53('0xf')](_0x3b53('0x10'),_0x4247d0,_0x3b53('0xe'),JSON[_0x3b53('0x11')](_0x599254));if(_0x599254['error']){if(_0x599254[_0x3b53('0x12')][_0x3b53('0x13')]===0x1f4){logger['error'](_0x3b53('0x14'),_0x4247d0,_0x599254[_0x3b53('0x12')][_0x3b53('0x15')]);return _0x1f4bd0(_0x599254[_0x3b53('0x12')][_0x3b53('0x15')]);}logger[_0x3b53('0x12')](_0x3b53('0x14'),_0x4247d0,_0x599254[_0x3b53('0x12')]['message']);return _0xba94ff(_0x599254[_0x3b53('0x12')]['message']);}else{logger['info'](_0x3b53('0x14'),_0x4247d0,_0x3b53('0xe'));_0xba94ff(_0x599254['result'][_0x3b53('0x15')]);}})[_0x3b53('0x16')](function(_0x29d3b9){logger[_0x3b53('0x12')](_0x3b53('0x14'),_0x4247d0,_0x29d3b9);_0x1f4bd0(_0x29d3b9);});});} \ No newline at end of file +var _0xf83f=['rpc','../../config/environment','jayson/promise','http','request','then','info','VtigerConfiguration,\x20%s,\x20%s','request\x20sent','VtigerConfiguration,\x20%s,\x20%s,\x20%s','error','code','message','result','catch','util','randomstring','ioredis','../../mysqldb'];(function(_0x3db9e0,_0x1068ee){var _0x528569=function(_0x14f6dc){while(--_0x14f6dc){_0x3db9e0['push'](_0x3db9e0['shift']());}};_0x528569(++_0x1068ee);}(_0xf83f,0x178));var _0xff83=function(_0x2ce9a5,_0x5bbdf2){_0x2ce9a5=_0x2ce9a5-0x0;var _0x420895=_0xf83f[_0x2ce9a5];return _0x420895;};'use strict';var _=require('lodash');var util=require(_0xff83('0x0'));var moment=require('moment');var BPromise=require('bluebird');var rs=require(_0xff83('0x1'));var fs=require('fs');var Redis=require(_0xff83('0x2'));var db=require(_0xff83('0x3'))['db'];var utils=require('../../config/utils');var logger=require('../../config/logger')(_0xff83('0x4'));var config=require(_0xff83('0x5'));var jayson=require(_0xff83('0x6'));var client=jayson['client'][_0xff83('0x7')]({'port':0x232a});function respondWithRpcPromise(_0x5e85b2,_0x442260,_0x349cc8){return new BPromise(function(_0x3d1adb,_0xe31c1){return client[_0xff83('0x8')](_0x5e85b2,_0x349cc8)[_0xff83('0x9')](function(_0x18064){logger[_0xff83('0xa')](_0xff83('0xb'),_0x442260,_0xff83('0xc'));logger['debug'](_0xff83('0xd'),_0x442260,_0xff83('0xc'),JSON['stringify'](_0x18064));if(_0x18064[_0xff83('0xe')]){if(_0x18064[_0xff83('0xe')][_0xff83('0xf')]===0x1f4){logger[_0xff83('0xe')](_0xff83('0xb'),_0x442260,_0x18064['error']['message']);return _0xe31c1(_0x18064[_0xff83('0xe')][_0xff83('0x10')]);}logger[_0xff83('0xe')]('VtigerConfiguration,\x20%s,\x20%s',_0x442260,_0x18064[_0xff83('0xe')]['message']);return _0x3d1adb(_0x18064[_0xff83('0xe')][_0xff83('0x10')]);}else{logger[_0xff83('0xa')](_0xff83('0xb'),_0x442260,_0xff83('0xc'));_0x3d1adb(_0x18064[_0xff83('0x11')][_0xff83('0x10')]);}})[_0xff83('0x12')](function(_0x1feb42){logger[_0xff83('0xe')](_0xff83('0xb'),_0x442260,_0x1feb42);_0xe31c1(_0x1feb42);});});} \ No newline at end of file diff --git a/server/api/intVtigerField/index.js b/server/api/intVtigerField/index.js index 6ebf360..678922b 100644 --- a/server/api/intVtigerField/index.js +++ b/server/api/intVtigerField/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x4585=['express','Router','fs-extra','../../components/interaction/service','../../config/environment','./intVtigerField.controller','get','isAuthenticated','index','/:id','show','put','update','delete','destroy','path','connect-timeout'];(function(_0x4cc11f,_0x4962c6){var _0x4be0dc=function(_0x371b1f){while(--_0x371b1f){_0x4cc11f['push'](_0x4cc11f['shift']());}};_0x4be0dc(++_0x4962c6);}(_0x4585,0x1da));var _0x5458=function(_0x1a36a5,_0x746928){_0x1a36a5=_0x1a36a5-0x0;var _0x746243=_0x4585[_0x1a36a5];return _0x746243;};'use strict';var multer=require('multer');var util=require('util');var path=require(_0x5458('0x0'));var timeout=require(_0x5458('0x1'));var express=require(_0x5458('0x2'));var router=express[_0x5458('0x3')]();var fs_extra=require(_0x5458('0x4'));var auth=require('../../components/auth/service');var interaction=require(_0x5458('0x5'));var config=require(_0x5458('0x6'));var controller=require(_0x5458('0x7'));router[_0x5458('0x8')]('/',auth[_0x5458('0x9')](),controller[_0x5458('0xa')]);router[_0x5458('0x8')](_0x5458('0xb'),auth['isAuthenticated'](),controller[_0x5458('0xc')]);router['post']('/',auth['isAuthenticated'](),controller['create']);router[_0x5458('0xd')](_0x5458('0xb'),auth[_0x5458('0x9')](),controller[_0x5458('0xe')]);router[_0x5458('0xf')]('/:id',auth['isAuthenticated'](),controller[_0x5458('0x10')]);module['exports']=router; \ No newline at end of file +var _0x0894=['/:id','isAuthenticated','show','post','create','put','delete','destroy','exports','multer','path','connect-timeout','Router','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','./intVtigerField.controller','index','get'];(function(_0x23ec06,_0x561142){var _0x2831d4=function(_0x3802bc){while(--_0x3802bc){_0x23ec06['push'](_0x23ec06['shift']());}};_0x2831d4(++_0x561142);}(_0x0894,0x1ad));var _0x4089=function(_0x9d35dd,_0x87b0d4){_0x9d35dd=_0x9d35dd-0x0;var _0xeb3bc6=_0x0894[_0x9d35dd];return _0xeb3bc6;};'use strict';var multer=require(_0x4089('0x0'));var util=require('util');var path=require(_0x4089('0x1'));var timeout=require(_0x4089('0x2'));var express=require('express');var router=express[_0x4089('0x3')]();var fs_extra=require(_0x4089('0x4'));var auth=require(_0x4089('0x5'));var interaction=require(_0x4089('0x6'));var config=require(_0x4089('0x7'));var controller=require(_0x4089('0x8'));router['get']('/',auth['isAuthenticated'](),controller[_0x4089('0x9')]);router[_0x4089('0xa')](_0x4089('0xb'),auth[_0x4089('0xc')](),controller[_0x4089('0xd')]);router[_0x4089('0xe')]('/',auth[_0x4089('0xc')](),controller[_0x4089('0xf')]);router[_0x4089('0x10')]('/:id',auth[_0x4089('0xc')](),controller['update']);router[_0x4089('0x11')](_0x4089('0xb'),auth[_0x4089('0xc')](),controller[_0x4089('0x12')]);module[_0x4089('0x13')]=router; \ No newline at end of file diff --git a/server/api/intVtigerField/intVtigerField.attributes.js b/server/api/intVtigerField/intVtigerField.attributes.js index 8af6821..9eabe2b 100644 --- a/server/api/intVtigerField/intVtigerField.attributes.js +++ b/server/api/intVtigerField/intVtigerField.attributes.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xe808=['ENUM','string','customVariable','keyValue','picklist','STRING','exports'];(function(_0x4108f7,_0x51d271){var _0x4c394c=function(_0x2725ef){while(--_0x2725ef){_0x4108f7['push'](_0x4108f7['shift']());}};_0x4c394c(++_0x51d271);}(_0xe808,0x195));var _0x8e80=function(_0x3dfe68,_0x1d3349){_0x3dfe68=_0x3dfe68-0x0;var _0x16ec83=_0xe808[_0x3dfe68];return _0x16ec83;};'use strict';var Sequelize=require('sequelize');module[_0x8e80('0x0')]={'type':{'type':Sequelize[_0x8e80('0x1')](_0x8e80('0x2'),'variable',_0x8e80('0x3'),_0x8e80('0x4'),_0x8e80('0x5')),'defaultValue':_0x8e80('0x2')},'content':{'type':Sequelize[_0x8e80('0x6')]},'key':{'type':Sequelize['STRING']},'keyType':{'type':Sequelize[_0x8e80('0x1')](_0x8e80('0x2'),'variable','customVariable')},'keyContent':{'type':Sequelize[_0x8e80('0x6')]},'idField':{'type':Sequelize[_0x8e80('0x6')]},'nameField':{'type':Sequelize[_0x8e80('0x6')]},'customField':{'type':Sequelize['BOOLEAN'],'defaultValue':!![]},'variableName':{'type':Sequelize[_0x8e80('0x6')]}}; \ No newline at end of file +var _0x135c=['picklist','variable','STRING','ENUM','string','customVariable','keyValue'];(function(_0x1eef12,_0x553c4c){var _0x23d2b5=function(_0x5da74c){while(--_0x5da74c){_0x1eef12['push'](_0x1eef12['shift']());}};_0x23d2b5(++_0x553c4c);}(_0x135c,0xce));var _0xc135=function(_0x21d6c7,_0x575186){_0x21d6c7=_0x21d6c7-0x0;var _0x362704=_0x135c[_0x21d6c7];return _0x362704;};'use strict';var Sequelize=require('sequelize');module['exports']={'type':{'type':Sequelize[_0xc135('0x0')](_0xc135('0x1'),'variable',_0xc135('0x2'),_0xc135('0x3'),_0xc135('0x4')),'defaultValue':'string'},'content':{'type':Sequelize['STRING']},'key':{'type':Sequelize['STRING']},'keyType':{'type':Sequelize[_0xc135('0x0')]('string',_0xc135('0x5'),_0xc135('0x2'))},'keyContent':{'type':Sequelize['STRING']},'idField':{'type':Sequelize[_0xc135('0x6')]},'nameField':{'type':Sequelize['STRING']},'customField':{'type':Sequelize['BOOLEAN'],'defaultValue':!![]},'variableName':{'type':Sequelize['STRING']}}; \ No newline at end of file diff --git a/server/api/intVtigerField/intVtigerField.controller.js b/server/api/intVtigerField/intVtigerField.controller.js index 6b9bade..ff06e78 100644 --- a/server/api/intVtigerField/intVtigerField.controller.js +++ b/server/api/intVtigerField/intVtigerField.controller.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x3400=['squel','crypto','desk.js','querystring','papaparse','ioredis','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','sendStatus','end','status','json','offset','undefined','limit','count','set','Content-Range','apply','reject','save','then','name','send','index','map','VtigerField','fieldName','type','key','query','filters','intersection','model','fields','attributes','length','hasOwnProperty','nolimit','order','sort','where','filter','merge','VIRTUAL','options','includeAll','include','findAll','rows','catch','show','params','keys','rawAttributes','find','create','update','body','destroy','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','path','to-csv','ejs','fs-extra','lodash'];(function(_0x12b260,_0x56e60d){var _0x595cb8=function(_0x791a67){while(--_0x791a67){_0x12b260['push'](_0x12b260['shift']());}};_0x595cb8(++_0x56e60d);}(_0x3400,0x133));var _0x0340=function(_0x565c49,_0x54acd0){_0x565c49=_0x565c49-0x0;var _0x20ca34=_0x3400[_0x565c49];return _0x20ca34;};'use strict';var emlformat=require(_0x0340('0x0'));var rimraf=require(_0x0340('0x1'));var zipdir=require(_0x0340('0x2'));var jsonpatch=require(_0x0340('0x3'));var rp=require(_0x0340('0x4'));var moment=require(_0x0340('0x5'));var BPromise=require(_0x0340('0x6'));var Mustache=require(_0x0340('0x7'));var util=require('util');var path=require(_0x0340('0x8'));var sox=require('sox');var csv=require(_0x0340('0x9'));var ejs=require(_0x0340('0xa'));var fs=require('fs');var fs_extra=require(_0x0340('0xb'));var _=require(_0x0340('0xc'));var squel=require(_0x0340('0xd'));var crypto=require(_0x0340('0xe'));var jsforce=require('jsforce');var deskjs=require(_0x0340('0xf'));var toCsv=require(_0x0340('0x9'));var querystring=require(_0x0340('0x10'));var Papa=require(_0x0340('0x11'));var Redis=require(_0x0340('0x12'));var authService=require('../../components/auth/service');var qs=require(_0x0340('0x13'));var as=require(_0x0340('0x14'));var hardwareService=require(_0x0340('0x15'));var logger=require(_0x0340('0x16'))(_0x0340('0x17'));var utils=require(_0x0340('0x18'));var config=require(_0x0340('0x19'));var licenseUtil=require(_0x0340('0x1a'));var db=require(_0x0340('0x1b'))['db'];function respondWithStatusCode(_0x42a04e,_0x45fdd3){_0x45fdd3=_0x45fdd3||0xcc;return function(_0x2213a6){if(_0x2213a6){return _0x42a04e[_0x0340('0x1c')](_0x45fdd3);}return _0x42a04e['status'](_0x45fdd3)[_0x0340('0x1d')]();};}function respondWithResult(_0x234566,_0x352dd3){_0x352dd3=_0x352dd3||0xc8;return function(_0xe277b6){if(_0xe277b6){return _0x234566[_0x0340('0x1e')](_0x352dd3)[_0x0340('0x1f')](_0xe277b6);}};}function respondWithFilteredResult(_0xc80ecc,_0x312883){return function(_0x46a584){if(_0x46a584){var _0x558898=typeof _0x312883[_0x0340('0x20')]===_0x0340('0x21')&&typeof _0x312883[_0x0340('0x22')]===_0x0340('0x21');var _0x3360f2=_0x46a584[_0x0340('0x23')];var _0x2a8dd5=_0x558898?0x0:_0x312883[_0x0340('0x20')];var _0x5b0753=_0x558898?_0x46a584[_0x0340('0x23')]:_0x312883[_0x0340('0x20')]+_0x312883[_0x0340('0x22')];var _0x3da9b9;if(_0x5b0753>=_0x3360f2){_0x5b0753=_0x3360f2;_0x3da9b9=0xc8;}else{_0x3da9b9=0xce;}_0xc80ecc[_0x0340('0x1e')](_0x3da9b9);return _0xc80ecc[_0x0340('0x24')](_0x0340('0x25'),_0x2a8dd5+'-'+_0x5b0753+'/'+_0x3360f2)[_0x0340('0x1f')](_0x46a584);}return null;};}function patchUpdates(_0x5e1fd3){return function(_0x5bf45f){try{jsonpatch[_0x0340('0x26')](_0x5bf45f,_0x5e1fd3,!![]);}catch(_0xbe3767){return BPromise[_0x0340('0x27')](_0xbe3767);}return _0x5bf45f[_0x0340('0x28')]();};}function saveUpdates(_0x581465,_0x39c43){return function(_0x299788){if(_0x299788){return _0x299788['update'](_0x581465)[_0x0340('0x29')](function(_0x13ee19){return _0x13ee19;});}return null;};}function removeEntity(_0x5da08e,_0x4a6ca3){return function(_0x1df365){if(_0x1df365){return _0x1df365['destroy']()[_0x0340('0x29')](function(){_0x5da08e[_0x0340('0x1e')](0xcc)[_0x0340('0x1d')]();});}};}function handleEntityNotFound(_0x22de14,_0x66f374){return function(_0x139943){if(!_0x139943){_0x22de14['sendStatus'](0x194);}return _0x139943;};}function handleError(_0x1e715d,_0x5490ad){_0x5490ad=_0x5490ad||0x1f4;return function(_0x4a5a46){logger['error'](_0x4a5a46['stack']);if(_0x4a5a46[_0x0340('0x2a')]){delete _0x4a5a46[_0x0340('0x2a')];}_0x1e715d[_0x0340('0x1e')](_0x5490ad)[_0x0340('0x2b')](_0x4a5a46);};}exports[_0x0340('0x2c')]=function(_0x2809c5,_0x3f5030){var _0x13d067={},_0x324f6e={},_0x28655e={'count':0x0,'rows':[]};var _0xa231cb=_[_0x0340('0x2d')](db[_0x0340('0x2e')]['rawAttributes'],function(_0x3840e5){return{'name':_0x3840e5[_0x0340('0x2f')],'type':_0x3840e5[_0x0340('0x30')][_0x0340('0x31')]};});_0x324f6e['model']=_['map'](_0xa231cb,_0x0340('0x2a'));_0x324f6e[_0x0340('0x32')]=_['keys'](_0x2809c5['query']);_0x324f6e[_0x0340('0x33')]=_[_0x0340('0x34')](_0x324f6e[_0x0340('0x35')],_0x324f6e[_0x0340('0x32')]);_0x13d067['attributes']=_[_0x0340('0x34')](_0x324f6e[_0x0340('0x35')],qs[_0x0340('0x36')](_0x2809c5[_0x0340('0x32')]['fields']));_0x13d067[_0x0340('0x37')]=_0x13d067['attributes'][_0x0340('0x38')]?_0x13d067['attributes']:_0x324f6e['model'];if(!_0x2809c5[_0x0340('0x32')][_0x0340('0x39')](_0x0340('0x3a'))){_0x13d067[_0x0340('0x22')]=qs[_0x0340('0x22')](_0x2809c5[_0x0340('0x32')]['limit']);_0x13d067['offset']=qs[_0x0340('0x20')](_0x2809c5[_0x0340('0x32')]['offset']);}_0x13d067[_0x0340('0x3b')]=qs[_0x0340('0x3c')](_0x2809c5[_0x0340('0x32')][_0x0340('0x3c')]);_0x13d067[_0x0340('0x3d')]=qs[_0x0340('0x33')](_['pick'](_0x2809c5[_0x0340('0x32')],_0x324f6e[_0x0340('0x33')]),_0xa231cb);if(_0x2809c5[_0x0340('0x32')][_0x0340('0x3e')]){_0x13d067[_0x0340('0x3d')]=_[_0x0340('0x3f')](_0x13d067[_0x0340('0x3d')],{'$or':_['map'](_0xa231cb,function(_0x6d94dd){if(_0x6d94dd['type']!==_0x0340('0x40')){var _0xf59666={};_0xf59666[_0x6d94dd[_0x0340('0x2a')]]={'$like':'%'+_0x2809c5[_0x0340('0x32')]['filter']+'%'};return _0xf59666;}})});}_0x13d067=_[_0x0340('0x3f')]({},_0x13d067,_0x2809c5[_0x0340('0x41')]);var _0x372924={'where':_0x13d067[_0x0340('0x3d')]};return db[_0x0340('0x2e')][_0x0340('0x23')](_0x372924)[_0x0340('0x29')](function(_0x2e2d1f){_0x28655e[_0x0340('0x23')]=_0x2e2d1f;if(_0x2809c5[_0x0340('0x32')][_0x0340('0x42')]){_0x13d067[_0x0340('0x43')]=[{'all':!![]}];}return db[_0x0340('0x2e')][_0x0340('0x44')](_0x13d067);})[_0x0340('0x29')](function(_0x2afa48){_0x28655e[_0x0340('0x45')]=_0x2afa48;return _0x28655e;})['then'](respondWithFilteredResult(_0x3f5030,_0x13d067))[_0x0340('0x46')](handleError(_0x3f5030,null));};exports[_0x0340('0x47')]=function(_0x5b3832,_0x38722b){var _0x4054e8={'raw':!![],'where':{'id':_0x5b3832[_0x0340('0x48')]['id']}},_0x39ae74={};_0x39ae74[_0x0340('0x35')]=_[_0x0340('0x49')](db['VtigerField'][_0x0340('0x4a')]);_0x39ae74[_0x0340('0x32')]=_[_0x0340('0x49')](_0x5b3832['query']);_0x39ae74['filters']=_[_0x0340('0x34')](_0x39ae74[_0x0340('0x35')],_0x39ae74[_0x0340('0x32')]);_0x4054e8['attributes']=_['intersection'](_0x39ae74[_0x0340('0x35')],qs['fields'](_0x5b3832[_0x0340('0x32')][_0x0340('0x36')]));_0x4054e8[_0x0340('0x37')]=_0x4054e8[_0x0340('0x37')][_0x0340('0x38')]?_0x4054e8['attributes']:_0x39ae74[_0x0340('0x35')];if(_0x5b3832['query'][_0x0340('0x42')]){_0x4054e8[_0x0340('0x43')]=[{'all':!![]}];}_0x4054e8=_[_0x0340('0x3f')]({},_0x4054e8,_0x5b3832[_0x0340('0x41')]);return db[_0x0340('0x2e')][_0x0340('0x4b')](_0x4054e8)['then'](handleEntityNotFound(_0x38722b,null))[_0x0340('0x29')](respondWithResult(_0x38722b,null))[_0x0340('0x46')](handleError(_0x38722b,null));};exports[_0x0340('0x4c')]=function(_0xe55c50,_0x3b6e66){return db[_0x0340('0x2e')]['create'](_0xe55c50['body'],{})[_0x0340('0x29')](respondWithResult(_0x3b6e66,0xc9))[_0x0340('0x46')](handleError(_0x3b6e66,null));};exports[_0x0340('0x4d')]=function(_0x449005,_0x200e69){if(_0x449005[_0x0340('0x4e')]['id']){delete _0x449005[_0x0340('0x4e')]['id'];}return db[_0x0340('0x2e')][_0x0340('0x4b')]({'where':{'id':_0x449005[_0x0340('0x48')]['id']}})[_0x0340('0x29')](handleEntityNotFound(_0x200e69,null))[_0x0340('0x29')](saveUpdates(_0x449005[_0x0340('0x4e')],null))[_0x0340('0x29')](respondWithResult(_0x200e69,null))[_0x0340('0x46')](handleError(_0x200e69,null));};exports[_0x0340('0x4f')]=function(_0x3051d8,_0x44735d){return db[_0x0340('0x2e')][_0x0340('0x4b')]({'where':{'id':_0x3051d8[_0x0340('0x48')]['id']}})[_0x0340('0x29')](handleEntityNotFound(_0x44735d,null))[_0x0340('0x29')](removeEntity(_0x44735d,null))[_0x0340('0x46')](handleError(_0x44735d,null));}; \ No newline at end of file +var _0x29a0=['Content-Range','json','apply','save','then','sendStatus','stack','name','send','index','map','VtigerField','rawAttributes','fieldName','type','model','keys','query','filters','intersection','attributes','fields','length','hasOwnProperty','nolimit','sort','where','pick','filter','merge','VIRTUAL','options','findAll','rows','catch','show','params','includeAll','find','create','body','destroy','eml-format','zip-dir','fast-json-patch','request-promise','moment','util','path','sox','to-csv','ejs','fs-extra','lodash','squel','crypto','jsforce','desk.js','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/advancedSearch','../../config/logger','../../config/utils','../../config/license/util','../../mysqldb','status','end','offset','limit','undefined','count'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0x29a0,0xbc));var _0x029a=function(_0x52ed8c,_0x3bb747){_0x52ed8c=_0x52ed8c-0x0;var _0x1d5547=_0x29a0[_0x52ed8c];return _0x1d5547;};'use strict';var emlformat=require(_0x029a('0x0'));var rimraf=require('rimraf');var zipdir=require(_0x029a('0x1'));var jsonpatch=require(_0x029a('0x2'));var rp=require(_0x029a('0x3'));var moment=require(_0x029a('0x4'));var BPromise=require('bluebird');var Mustache=require('mustache');var util=require(_0x029a('0x5'));var path=require(_0x029a('0x6'));var sox=require(_0x029a('0x7'));var csv=require(_0x029a('0x8'));var ejs=require(_0x029a('0x9'));var fs=require('fs');var fs_extra=require(_0x029a('0xa'));var _=require(_0x029a('0xb'));var squel=require(_0x029a('0xc'));var crypto=require(_0x029a('0xd'));var jsforce=require(_0x029a('0xe'));var deskjs=require(_0x029a('0xf'));var toCsv=require(_0x029a('0x8'));var querystring=require(_0x029a('0x10'));var Papa=require(_0x029a('0x11'));var Redis=require(_0x029a('0x12'));var authService=require(_0x029a('0x13'));var qs=require('../../components/parsers/qs');var as=require(_0x029a('0x14'));var hardwareService=require('../../config/license/hardware');var logger=require(_0x029a('0x15'))('api');var utils=require(_0x029a('0x16'));var config=require('../../config/environment');var licenseUtil=require(_0x029a('0x17'));var db=require(_0x029a('0x18'))['db'];function respondWithStatusCode(_0x26fc31,_0xb8a8e9){_0xb8a8e9=_0xb8a8e9||0xcc;return function(_0x43e35e){if(_0x43e35e){return _0x26fc31['sendStatus'](_0xb8a8e9);}return _0x26fc31[_0x029a('0x19')](_0xb8a8e9)[_0x029a('0x1a')]();};}function respondWithResult(_0x1c0a59,_0x24ecc9){_0x24ecc9=_0x24ecc9||0xc8;return function(_0x2cf661){if(_0x2cf661){return _0x1c0a59[_0x029a('0x19')](_0x24ecc9)['json'](_0x2cf661);}};}function respondWithFilteredResult(_0x52adec,_0x27d269){return function(_0x4e855d){if(_0x4e855d){var _0x26ba03=typeof _0x27d269[_0x029a('0x1b')]==='undefined'&&typeof _0x27d269[_0x029a('0x1c')]===_0x029a('0x1d');var _0x59f2e6=_0x4e855d[_0x029a('0x1e')];var _0x5e05c0=_0x26ba03?0x0:_0x27d269[_0x029a('0x1b')];var _0x1bd05b=_0x26ba03?_0x4e855d['count']:_0x27d269['offset']+_0x27d269[_0x029a('0x1c')];var _0x207adf;if(_0x1bd05b>=_0x59f2e6){_0x1bd05b=_0x59f2e6;_0x207adf=0xc8;}else{_0x207adf=0xce;}_0x52adec['status'](_0x207adf);return _0x52adec['set'](_0x029a('0x1f'),_0x5e05c0+'-'+_0x1bd05b+'/'+_0x59f2e6)[_0x029a('0x20')](_0x4e855d);}return null;};}function patchUpdates(_0x32c1e3){return function(_0x151849){try{jsonpatch[_0x029a('0x21')](_0x151849,_0x32c1e3,!![]);}catch(_0x223b41){return BPromise['reject'](_0x223b41);}return _0x151849[_0x029a('0x22')]();};}function saveUpdates(_0x329ead,_0x15e32e){return function(_0x121a10){if(_0x121a10){return _0x121a10['update'](_0x329ead)[_0x029a('0x23')](function(_0x5d4242){return _0x5d4242;});}return null;};}function removeEntity(_0x4dc164,_0x9c8bf3){return function(_0x58a986){if(_0x58a986){return _0x58a986['destroy']()[_0x029a('0x23')](function(){_0x4dc164['status'](0xcc)[_0x029a('0x1a')]();});}};}function handleEntityNotFound(_0x2f5bec,_0x618c33){return function(_0x1dcc6b){if(!_0x1dcc6b){_0x2f5bec[_0x029a('0x24')](0x194);}return _0x1dcc6b;};}function handleError(_0x13fde5,_0x4dd315){_0x4dd315=_0x4dd315||0x1f4;return function(_0x1c53e5){logger['error'](_0x1c53e5[_0x029a('0x25')]);if(_0x1c53e5[_0x029a('0x26')]){delete _0x1c53e5[_0x029a('0x26')];}_0x13fde5[_0x029a('0x19')](_0x4dd315)[_0x029a('0x27')](_0x1c53e5);};}exports[_0x029a('0x28')]=function(_0x4c331e,_0x5a095c){var _0x572359={},_0x1be163={},_0x29dfe3={'count':0x0,'rows':[]};var _0x469989=_[_0x029a('0x29')](db[_0x029a('0x2a')][_0x029a('0x2b')],function(_0x18cab1){return{'name':_0x18cab1[_0x029a('0x2c')],'type':_0x18cab1[_0x029a('0x2d')]['key']};});_0x1be163[_0x029a('0x2e')]=_[_0x029a('0x29')](_0x469989,'name');_0x1be163['query']=_[_0x029a('0x2f')](_0x4c331e[_0x029a('0x30')]);_0x1be163[_0x029a('0x31')]=_[_0x029a('0x32')](_0x1be163[_0x029a('0x2e')],_0x1be163[_0x029a('0x30')]);_0x572359[_0x029a('0x33')]=_[_0x029a('0x32')](_0x1be163[_0x029a('0x2e')],qs[_0x029a('0x34')](_0x4c331e[_0x029a('0x30')][_0x029a('0x34')]));_0x572359[_0x029a('0x33')]=_0x572359[_0x029a('0x33')][_0x029a('0x35')]?_0x572359[_0x029a('0x33')]:_0x1be163[_0x029a('0x2e')];if(!_0x4c331e[_0x029a('0x30')][_0x029a('0x36')](_0x029a('0x37'))){_0x572359['limit']=qs['limit'](_0x4c331e[_0x029a('0x30')][_0x029a('0x1c')]);_0x572359[_0x029a('0x1b')]=qs[_0x029a('0x1b')](_0x4c331e[_0x029a('0x30')]['offset']);}_0x572359['order']=qs[_0x029a('0x38')](_0x4c331e[_0x029a('0x30')]['sort']);_0x572359[_0x029a('0x39')]=qs[_0x029a('0x31')](_[_0x029a('0x3a')](_0x4c331e[_0x029a('0x30')],_0x1be163[_0x029a('0x31')]),_0x469989);if(_0x4c331e[_0x029a('0x30')][_0x029a('0x3b')]){_0x572359[_0x029a('0x39')]=_[_0x029a('0x3c')](_0x572359[_0x029a('0x39')],{'$or':_[_0x029a('0x29')](_0x469989,function(_0xee30fa){if(_0xee30fa[_0x029a('0x2d')]!==_0x029a('0x3d')){var _0x22cd2f={};_0x22cd2f[_0xee30fa[_0x029a('0x26')]]={'$like':'%'+_0x4c331e['query']['filter']+'%'};return _0x22cd2f;}})});}_0x572359=_['merge']({},_0x572359,_0x4c331e[_0x029a('0x3e')]);var _0x3111f1={'where':_0x572359[_0x029a('0x39')]};return db[_0x029a('0x2a')][_0x029a('0x1e')](_0x3111f1)[_0x029a('0x23')](function(_0x4236b8){_0x29dfe3['count']=_0x4236b8;if(_0x4c331e[_0x029a('0x30')]['includeAll']){_0x572359['include']=[{'all':!![]}];}return db[_0x029a('0x2a')][_0x029a('0x3f')](_0x572359);})[_0x029a('0x23')](function(_0x3e1643){_0x29dfe3[_0x029a('0x40')]=_0x3e1643;return _0x29dfe3;})[_0x029a('0x23')](respondWithFilteredResult(_0x5a095c,_0x572359))[_0x029a('0x41')](handleError(_0x5a095c,null));};exports[_0x029a('0x42')]=function(_0x5404c9,_0x2331e5){var _0x4ce03c={'raw':!![],'where':{'id':_0x5404c9[_0x029a('0x43')]['id']}},_0x144140={};_0x144140[_0x029a('0x2e')]=_['keys'](db[_0x029a('0x2a')][_0x029a('0x2b')]);_0x144140[_0x029a('0x30')]=_['keys'](_0x5404c9[_0x029a('0x30')]);_0x144140[_0x029a('0x31')]=_[_0x029a('0x32')](_0x144140[_0x029a('0x2e')],_0x144140[_0x029a('0x30')]);_0x4ce03c['attributes']=_[_0x029a('0x32')](_0x144140['model'],qs[_0x029a('0x34')](_0x5404c9['query'][_0x029a('0x34')]));_0x4ce03c[_0x029a('0x33')]=_0x4ce03c[_0x029a('0x33')][_0x029a('0x35')]?_0x4ce03c[_0x029a('0x33')]:_0x144140[_0x029a('0x2e')];if(_0x5404c9['query'][_0x029a('0x44')]){_0x4ce03c['include']=[{'all':!![]}];}_0x4ce03c=_[_0x029a('0x3c')]({},_0x4ce03c,_0x5404c9[_0x029a('0x3e')]);return db['VtigerField'][_0x029a('0x45')](_0x4ce03c)['then'](handleEntityNotFound(_0x2331e5,null))['then'](respondWithResult(_0x2331e5,null))['catch'](handleError(_0x2331e5,null));};exports[_0x029a('0x46')]=function(_0x403164,_0x11ea76){return db[_0x029a('0x2a')]['create'](_0x403164[_0x029a('0x47')],{})[_0x029a('0x23')](respondWithResult(_0x11ea76,0xc9))[_0x029a('0x41')](handleError(_0x11ea76,null));};exports['update']=function(_0x3f10cc,_0xb295aa){if(_0x3f10cc[_0x029a('0x47')]['id']){delete _0x3f10cc[_0x029a('0x47')]['id'];}return db[_0x029a('0x2a')]['find']({'where':{'id':_0x3f10cc[_0x029a('0x43')]['id']}})[_0x029a('0x23')](handleEntityNotFound(_0xb295aa,null))[_0x029a('0x23')](saveUpdates(_0x3f10cc[_0x029a('0x47')],null))['then'](respondWithResult(_0xb295aa,null))[_0x029a('0x41')](handleError(_0xb295aa,null));};exports[_0x029a('0x48')]=function(_0x43926f,_0x25f98d){return db[_0x029a('0x2a')]['find']({'where':{'id':_0x43926f['params']['id']}})['then'](handleEntityNotFound(_0x25f98d,null))[_0x029a('0x23')](removeEntity(_0x25f98d,null))[_0x029a('0x41')](handleError(_0x25f98d,null));}; \ No newline at end of file diff --git a/server/api/intVtigerField/intVtigerField.model.js b/server/api/intVtigerField/intVtigerField.model.js index 1d91877..bf5d463 100644 --- a/server/api/intVtigerField/intVtigerField.model.js +++ b/server/api/intVtigerField/intVtigerField.model.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x581f=['VtigerField','int_vtiger_fields','idField','FieldId','lodash','util','../../config/logger','api','bluebird','request-promise','path','rimraf','../../config/environment','./intVtigerField.attributes','exports','define'];(function(_0x4fd994,_0x199a8a){var _0x5034ec=function(_0x43e6e0){while(--_0x43e6e0){_0x4fd994['push'](_0x4fd994['shift']());}};_0x5034ec(++_0x199a8a);}(_0x581f,0x74));var _0xf581=function(_0x3f978c,_0x3781cd){_0x3f978c=_0x3f978c-0x0;var _0x5ea78c=_0x581f[_0x3f978c];return _0x5ea78c;};'use strict';var _=require(_0xf581('0x0'));var util=require(_0xf581('0x1'));var logger=require(_0xf581('0x2'))(_0xf581('0x3'));var moment=require('moment');var BPromise=require(_0xf581('0x4'));var rp=require(_0xf581('0x5'));var fs=require('fs');var path=require(_0xf581('0x6'));var rimraf=require(_0xf581('0x7'));var config=require(_0xf581('0x8'));var attributes=require(_0xf581('0x9'));module[_0xf581('0xa')]=function(_0x6ad4bc,_0x5e94f7){return _0x6ad4bc[_0xf581('0xb')](_0xf581('0xc'),attributes,{'tableName':_0xf581('0xd'),'paranoid':![],'indexes':[{'name':'vtiger_unique_index','fields':[_0xf581('0xe'),_0xf581('0xf')],'unique':!![]}],'timestamps':!![]});}; \ No newline at end of file +var _0xbbdc=['FieldId','util','../../config/logger','api','moment','bluebird','request-promise','path','rimraf','exports','define','int_vtiger_fields','vtiger_unique_index','idField'];(function(_0x15af0f,_0x5454ce){var _0x2bd1cb=function(_0x593818){while(--_0x593818){_0x15af0f['push'](_0x15af0f['shift']());}};_0x2bd1cb(++_0x5454ce);}(_0xbbdc,0xd3));var _0xcbbd=function(_0x344a3f,_0x579a22){_0x344a3f=_0x344a3f-0x0;var _0x264712=_0xbbdc[_0x344a3f];return _0x264712;};'use strict';var _=require('lodash');var util=require(_0xcbbd('0x0'));var logger=require(_0xcbbd('0x1'))(_0xcbbd('0x2'));var moment=require(_0xcbbd('0x3'));var BPromise=require(_0xcbbd('0x4'));var rp=require(_0xcbbd('0x5'));var fs=require('fs');var path=require(_0xcbbd('0x6'));var rimraf=require(_0xcbbd('0x7'));var config=require('../../config/environment');var attributes=require('./intVtigerField.attributes');module[_0xcbbd('0x8')]=function(_0x184444,_0x531f1b){return _0x184444[_0xcbbd('0x9')]('VtigerField',attributes,{'tableName':_0xcbbd('0xa'),'paranoid':![],'indexes':[{'name':_0xcbbd('0xb'),'fields':[_0xcbbd('0xc'),_0xcbbd('0xd')],'unique':!![]}],'timestamps':!![]});}; \ No newline at end of file diff --git a/server/api/intVtigerField/intVtigerField.rpc.js b/server/api/intVtigerField/intVtigerField.rpc.js index 33321f5..8cbd1a3 100644 --- a/server/api/intVtigerField/intVtigerField.rpc.js +++ b/server/api/intVtigerField/intVtigerField.rpc.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x0642=['ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','jayson/promise','client','http','request','then','info','VtigerField,\x20%s,\x20%s','VtigerField,\x20%s,\x20%s,\x20%s','stringify','error','code','message','request\x20sent','result','catch','lodash','moment','bluebird','randomstring'];(function(_0x2c452e,_0xecf837){var _0x2e8fc9=function(_0x2f6c6f){while(--_0x2f6c6f){_0x2c452e['push'](_0x2c452e['shift']());}};_0x2e8fc9(++_0xecf837);}(_0x0642,0x1dc));var _0x2064=function(_0x138f59,_0x1b53fb){_0x138f59=_0x138f59-0x0;var _0x3d114d=_0x0642[_0x138f59];return _0x3d114d;};'use strict';var _=require(_0x2064('0x0'));var util=require('util');var moment=require(_0x2064('0x1'));var BPromise=require(_0x2064('0x2'));var rs=require(_0x2064('0x3'));var fs=require('fs');var Redis=require(_0x2064('0x4'));var db=require(_0x2064('0x5'))['db'];var utils=require(_0x2064('0x6'));var logger=require(_0x2064('0x7'))(_0x2064('0x8'));var config=require('../../config/environment');var jayson=require(_0x2064('0x9'));var client=jayson[_0x2064('0xa')][_0x2064('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x397297,_0x13df9d,_0x39dc5b){return new BPromise(function(_0x507929,_0x351905){return client[_0x2064('0xc')](_0x397297,_0x39dc5b)[_0x2064('0xd')](function(_0x87a83e){logger[_0x2064('0xe')](_0x2064('0xf'),_0x13df9d,'request\x20sent');logger['debug'](_0x2064('0x10'),_0x13df9d,'request\x20sent',JSON[_0x2064('0x11')](_0x87a83e));if(_0x87a83e[_0x2064('0x12')]){if(_0x87a83e[_0x2064('0x12')][_0x2064('0x13')]===0x1f4){logger[_0x2064('0x12')]('VtigerField,\x20%s,\x20%s',_0x13df9d,_0x87a83e['error'][_0x2064('0x14')]);return _0x351905(_0x87a83e[_0x2064('0x12')]['message']);}logger[_0x2064('0x12')]('VtigerField,\x20%s,\x20%s',_0x13df9d,_0x87a83e[_0x2064('0x12')]['message']);return _0x507929(_0x87a83e[_0x2064('0x12')]['message']);}else{logger[_0x2064('0xe')](_0x2064('0xf'),_0x13df9d,_0x2064('0x15'));_0x507929(_0x87a83e[_0x2064('0x16')][_0x2064('0x14')]);}})[_0x2064('0x17')](function(_0x8ed40b){logger['error'](_0x2064('0xf'),_0x13df9d,_0x8ed40b);_0x351905(_0x8ed40b);});});} \ No newline at end of file +var _0xc2a8=['message','info','result','catch','lodash','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','rpc','../../config/environment','jayson/promise','then','VtigerField,\x20%s,\x20%s','request\x20sent','debug','stringify','error','code'];(function(_0x4ced59,_0x3e46cc){var _0x4cc09a=function(_0x46736d){while(--_0x46736d){_0x4ced59['push'](_0x4ced59['shift']());}};_0x4cc09a(++_0x3e46cc);}(_0xc2a8,0x1bc));var _0x8c2a=function(_0x53f344,_0x59947b){_0x53f344=_0x53f344-0x0;var _0x1e2750=_0xc2a8[_0x53f344];return _0x1e2750;};'use strict';var _=require(_0x8c2a('0x0'));var util=require(_0x8c2a('0x1'));var moment=require(_0x8c2a('0x2'));var BPromise=require(_0x8c2a('0x3'));var rs=require(_0x8c2a('0x4'));var fs=require('fs');var Redis=require(_0x8c2a('0x5'));var db=require(_0x8c2a('0x6'))['db'];var utils=require(_0x8c2a('0x7'));var logger=require('../../config/logger')(_0x8c2a('0x8'));var config=require(_0x8c2a('0x9'));var jayson=require(_0x8c2a('0xa'));var client=jayson['client']['http']({'port':0x232a});function respondWithRpcPromise(_0x594b06,_0x18ab57,_0x242832){return new BPromise(function(_0x4951e9,_0x4cd7d4){return client['request'](_0x594b06,_0x242832)[_0x8c2a('0xb')](function(_0x76006e){logger['info'](_0x8c2a('0xc'),_0x18ab57,_0x8c2a('0xd'));logger[_0x8c2a('0xe')]('VtigerField,\x20%s,\x20%s,\x20%s',_0x18ab57,_0x8c2a('0xd'),JSON[_0x8c2a('0xf')](_0x76006e));if(_0x76006e[_0x8c2a('0x10')]){if(_0x76006e[_0x8c2a('0x10')][_0x8c2a('0x11')]===0x1f4){logger[_0x8c2a('0x10')]('VtigerField,\x20%s,\x20%s',_0x18ab57,_0x76006e[_0x8c2a('0x10')][_0x8c2a('0x12')]);return _0x4cd7d4(_0x76006e[_0x8c2a('0x10')][_0x8c2a('0x12')]);}logger[_0x8c2a('0x10')](_0x8c2a('0xc'),_0x18ab57,_0x76006e[_0x8c2a('0x10')]['message']);return _0x4951e9(_0x76006e['error'][_0x8c2a('0x12')]);}else{logger[_0x8c2a('0x13')](_0x8c2a('0xc'),_0x18ab57,'request\x20sent');_0x4951e9(_0x76006e[_0x8c2a('0x14')]['message']);}})[_0x8c2a('0x15')](function(_0x3d57b8){logger[_0x8c2a('0x10')](_0x8c2a('0xc'),_0x18ab57,_0x3d57b8);_0x4cd7d4(_0x3d57b8);});});} \ No newline at end of file diff --git a/server/api/intZendeskAccount/index.js b/server/api/intZendeskAccount/index.js index 244bf59..be62d76 100644 --- a/server/api/intZendeskAccount/index.js +++ b/server/api/intZendeskAccount/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xfbc5=['show','get','/:id/configurations','getConfigurations','getFields','post','create','delete','exports','path','connect-timeout','express','Router','../../components/auth/service','../../components/interaction/service','../../config/environment','isAuthenticated','index','/:id'];(function(_0x367e6b,_0xda405b){var _0x522893=function(_0x47a37c){while(--_0x47a37c){_0x367e6b['push'](_0x367e6b['shift']());}};_0x522893(++_0xda405b);}(_0xfbc5,0x1ab));var _0x5fbc=function(_0x56dbe6,_0x15eb41){_0x56dbe6=_0x56dbe6-0x0;var _0x3d2ba4=_0xfbc5[_0x56dbe6];return _0x3d2ba4;};'use strict';var multer=require('multer');var util=require('util');var path=require(_0x5fbc('0x0'));var timeout=require(_0x5fbc('0x1'));var express=require(_0x5fbc('0x2'));var router=express[_0x5fbc('0x3')]();var fs_extra=require('fs-extra');var auth=require(_0x5fbc('0x4'));var interaction=require(_0x5fbc('0x5'));var config=require(_0x5fbc('0x6'));var controller=require('./intZendeskAccount.controller');router['get']('/',auth[_0x5fbc('0x7')](),controller[_0x5fbc('0x8')]);router['get'](_0x5fbc('0x9'),auth['isAuthenticated'](),controller[_0x5fbc('0xa')]);router[_0x5fbc('0xb')](_0x5fbc('0xc'),auth['isAuthenticated'](),controller[_0x5fbc('0xd')]);router['get']('/:id/fields',auth[_0x5fbc('0x7')](),controller[_0x5fbc('0xe')]);router[_0x5fbc('0xf')]('/',auth[_0x5fbc('0x7')](),controller[_0x5fbc('0x10')]);router[_0x5fbc('0xf')](_0x5fbc('0xc'),auth['isAuthenticated'](),controller['addConfiguration']);router['put']('/:id',auth[_0x5fbc('0x7')](),controller['update']);router[_0x5fbc('0x11')](_0x5fbc('0x9'),auth[_0x5fbc('0x7')](),controller['destroy']);module[_0x5fbc('0x12')]=router; \ No newline at end of file +var _0x0946=['../../components/interaction/service','../../config/environment','./intZendeskAccount.controller','get','isAuthenticated','index','/:id','show','/:id/configurations','getConfigurations','/:id/fields','post','create','addConfiguration','update','destroy','multer','util','path','connect-timeout','express','Router','fs-extra','../../components/auth/service'];(function(_0x509cd3,_0x2f3032){var _0x3cdd06=function(_0x21ee1a){while(--_0x21ee1a){_0x509cd3['push'](_0x509cd3['shift']());}};_0x3cdd06(++_0x2f3032);}(_0x0946,0x130));var _0x6094=function(_0x1757f2,_0x1b09fa){_0x1757f2=_0x1757f2-0x0;var _0x5e7212=_0x0946[_0x1757f2];return _0x5e7212;};'use strict';var multer=require(_0x6094('0x0'));var util=require(_0x6094('0x1'));var path=require(_0x6094('0x2'));var timeout=require(_0x6094('0x3'));var express=require(_0x6094('0x4'));var router=express[_0x6094('0x5')]();var fs_extra=require(_0x6094('0x6'));var auth=require(_0x6094('0x7'));var interaction=require(_0x6094('0x8'));var config=require(_0x6094('0x9'));var controller=require(_0x6094('0xa'));router[_0x6094('0xb')]('/',auth[_0x6094('0xc')](),controller[_0x6094('0xd')]);router[_0x6094('0xb')](_0x6094('0xe'),auth[_0x6094('0xc')](),controller[_0x6094('0xf')]);router['get'](_0x6094('0x10'),auth[_0x6094('0xc')](),controller[_0x6094('0x11')]);router[_0x6094('0xb')](_0x6094('0x12'),auth[_0x6094('0xc')](),controller['getFields']);router[_0x6094('0x13')]('/',auth['isAuthenticated'](),controller[_0x6094('0x14')]);router[_0x6094('0x13')](_0x6094('0x10'),auth[_0x6094('0xc')](),controller[_0x6094('0x15')]);router['put']('/:id',auth['isAuthenticated'](),controller[_0x6094('0x16')]);router['delete'](_0x6094('0xe'),auth[_0x6094('0xc')](),controller[_0x6094('0x17')]);module['exports']=router; \ No newline at end of file diff --git a/server/api/intZendeskAccount/intZendeskAccount.attributes.js b/server/api/intZendeskAccount/intZendeskAccount.attributes.js index 4d996ff..bd318a3 100644 --- a/server/api/intZendeskAccount/intZendeskAccount.attributes.js +++ b/server/api/intZendeskAccount/intZendeskAccount.attributes.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x9f0e=['STRING','remoteUri','ENUM','password','integrationTab','sequelize','exports'];(function(_0x29534d,_0x69ae43){var _0x32802b=function(_0x377f89){while(--_0x377f89){_0x29534d['push'](_0x29534d['shift']());}};_0x32802b(++_0x69ae43);}(_0x9f0e,0x116));var _0xe9f0=function(_0x53ebdb,_0x53e576){_0x53ebdb=_0x53ebdb-0x0;var _0x44e25d=_0x9f0e[_0x53ebdb];return _0x44e25d;};'use strict';var Sequelize=require(_0xe9f0('0x0'));module[_0xe9f0('0x1')]={'name':{'type':Sequelize[_0xe9f0('0x2')]},'description':{'type':Sequelize[_0xe9f0('0x2')]},'username':{'type':Sequelize[_0xe9f0('0x2')],'unique':'username'},'password':{'type':Sequelize['STRING']},'token':{'type':Sequelize[_0xe9f0('0x2')]},'remoteUri':{'type':Sequelize[_0xe9f0('0x2')],'unique':_0xe9f0('0x3')},'authType':{'type':Sequelize[_0xe9f0('0x4')](_0xe9f0('0x5'),'token'),'defaultValue':'password'},'serverUrl':{'type':Sequelize[_0xe9f0('0x2')],'allowNull':![]},'type':{'type':Sequelize[_0xe9f0('0x4')](_0xe9f0('0x6'),'newTab'),'defaultValue':_0xe9f0('0x6')}}; \ No newline at end of file +var _0x1261=['ENUM','password','integrationTab','newTab','exports','STRING','username','remoteUri'];(function(_0x39b9ad,_0x353c33){var _0x74dfd5=function(_0x362433){while(--_0x362433){_0x39b9ad['push'](_0x39b9ad['shift']());}};_0x74dfd5(++_0x353c33);}(_0x1261,0x144));var _0x1126=function(_0xecc551,_0x471cac){_0xecc551=_0xecc551-0x0;var _0x344658=_0x1261[_0xecc551];return _0x344658;};'use strict';var Sequelize=require('sequelize');module[_0x1126('0x0')]={'name':{'type':Sequelize[_0x1126('0x1')]},'description':{'type':Sequelize[_0x1126('0x1')]},'username':{'type':Sequelize[_0x1126('0x1')],'unique':_0x1126('0x2')},'password':{'type':Sequelize[_0x1126('0x1')]},'token':{'type':Sequelize[_0x1126('0x1')]},'remoteUri':{'type':Sequelize[_0x1126('0x1')],'unique':_0x1126('0x3')},'authType':{'type':Sequelize[_0x1126('0x4')]('password','token'),'defaultValue':_0x1126('0x5')},'serverUrl':{'type':Sequelize[_0x1126('0x1')],'allowNull':![]},'type':{'type':Sequelize['ENUM'](_0x1126('0x6'),_0x1126('0x7')),'defaultValue':_0x1126('0x6')}}; \ No newline at end of file diff --git a/server/api/intZendeskAccount/intZendeskAccount.controller.js b/server/api/intZendeskAccount/intZendeskAccount.controller.js index 5224c5b..e721e71 100644 --- a/server/api/intZendeskAccount/intZendeskAccount.controller.js +++ b/server/api/intZendeskAccount/intZendeskAccount.controller.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xcf66=['rimraf','zip-dir','request-promise','moment','util','path','to-csv','ejs','fs-extra','squel','crypto','jsforce','desk.js','querystring','../../components/parsers/qs','../../config/license/hardware','../../config/logger','api','../../config/utils','../../components/integrations/configuration','sendStatus','status','offset','undefined','limit','count','set','Content-Range','json','apply','reject','save','update','destroy','then','end','error','stack','name','index','rawAttributes','fieldName','type','key','map','query','filters','intersection','model','attributes','fields','length','hasOwnProperty','order','sort','where','pick','filter','merge','VIRTUAL','ZendeskAccount','includeAll','include','findAll','rows','catch','params','keys','find','create','body','getConfigurations','findOne','ZendeskConfiguration','options','nolimit','AccountId','Subjects','getSubjects','Descriptions','channel','getFields','username','password','token','authType','remoteUri','slice','lastIndexOf','format','%s/%s','ticket_fields','Basic\x20%s','%s:%s','toString','%s/token:%s','base64','Sequelize','ValidationError','Unknown\x20authentication\x20type','subject','group','assignee','remove','includes','position','title','system_field_options','test','statusCode','getFields,\x20%s,\x20%s,\x20%s','stringify','send','eml-format'];(function(_0x1f9a32,_0x57d685){var _0x12cb1a=function(_0xd54bb8){while(--_0xd54bb8){_0x1f9a32['push'](_0x1f9a32['shift']());}};_0x12cb1a(++_0x57d685);}(_0xcf66,0x71));var _0x6cf6=function(_0x25f421,_0x1de48f){_0x25f421=_0x25f421-0x0;var _0x488534=_0xcf66[_0x25f421];return _0x488534;};'use strict';var emlformat=require(_0x6cf6('0x0'));var rimraf=require(_0x6cf6('0x1'));var zipdir=require(_0x6cf6('0x2'));var jsonpatch=require('fast-json-patch');var rp=require(_0x6cf6('0x3'));var moment=require(_0x6cf6('0x4'));var BPromise=require('bluebird');var Mustache=require('mustache');var util=require(_0x6cf6('0x5'));var path=require(_0x6cf6('0x6'));var sox=require('sox');var csv=require(_0x6cf6('0x7'));var ejs=require(_0x6cf6('0x8'));var fs=require('fs');var fs_extra=require(_0x6cf6('0x9'));var _=require('lodash');var squel=require(_0x6cf6('0xa'));var crypto=require(_0x6cf6('0xb'));var jsforce=require(_0x6cf6('0xc'));var deskjs=require(_0x6cf6('0xd'));var toCsv=require(_0x6cf6('0x7'));var querystring=require(_0x6cf6('0xe'));var Papa=require('papaparse');var Redis=require('ioredis');var authService=require('../../components/auth/service');var qs=require(_0x6cf6('0xf'));var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0x6cf6('0x10'));var logger=require(_0x6cf6('0x11'))(_0x6cf6('0x12'));var utils=require(_0x6cf6('0x13'));var config=require('../../config/environment');var licenseUtil=require('../../config/license/util');var db=require('../../mysqldb')['db'];var integrations=require(_0x6cf6('0x14'));function respondWithStatusCode(_0x13b1ad,_0x372d12){_0x372d12=_0x372d12||0xcc;return function(_0x39e8c3){if(_0x39e8c3){return _0x13b1ad[_0x6cf6('0x15')](_0x372d12);}return _0x13b1ad[_0x6cf6('0x16')](_0x372d12)['end']();};}function respondWithResult(_0x32fe64,_0x494ece){_0x494ece=_0x494ece||0xc8;return function(_0x4dbae8){if(_0x4dbae8){return _0x32fe64[_0x6cf6('0x16')](_0x494ece)['json'](_0x4dbae8);}};}function respondWithFilteredResult(_0x40e413,_0x1b40f8){return function(_0x2d23ab){if(_0x2d23ab){var _0x74486a=typeof _0x1b40f8[_0x6cf6('0x17')]===_0x6cf6('0x18')&&typeof _0x1b40f8[_0x6cf6('0x19')]===_0x6cf6('0x18');var _0x18c2f9=_0x2d23ab[_0x6cf6('0x1a')];var _0x5e8b11=_0x74486a?0x0:_0x1b40f8[_0x6cf6('0x17')];var _0x22915c=_0x74486a?_0x2d23ab[_0x6cf6('0x1a')]:_0x1b40f8['offset']+_0x1b40f8[_0x6cf6('0x19')];var _0x39b4a2;if(_0x22915c>=_0x18c2f9){_0x22915c=_0x18c2f9;_0x39b4a2=0xc8;}else{_0x39b4a2=0xce;}_0x40e413[_0x6cf6('0x16')](_0x39b4a2);return _0x40e413[_0x6cf6('0x1b')](_0x6cf6('0x1c'),_0x5e8b11+'-'+_0x22915c+'/'+_0x18c2f9)[_0x6cf6('0x1d')](_0x2d23ab);}return null;};}function patchUpdates(_0x123993){return function(_0x4eb6bd){try{jsonpatch[_0x6cf6('0x1e')](_0x4eb6bd,_0x123993,!![]);}catch(_0x306a64){return BPromise[_0x6cf6('0x1f')](_0x306a64);}return _0x4eb6bd[_0x6cf6('0x20')]();};}function saveUpdates(_0x5cba3a,_0x470ea4){return function(_0x41344f){if(_0x41344f){return _0x41344f[_0x6cf6('0x21')](_0x5cba3a)['then'](function(_0x5b30e0){return _0x5b30e0;});}return null;};}function removeEntity(_0x276225,_0x59f838){return function(_0x45ce6e){if(_0x45ce6e){return _0x45ce6e[_0x6cf6('0x22')]()[_0x6cf6('0x23')](function(){_0x276225[_0x6cf6('0x16')](0xcc)[_0x6cf6('0x24')]();});}};}function handleEntityNotFound(_0x565fad,_0x1c966e){return function(_0x4e0e85){if(!_0x4e0e85){_0x565fad[_0x6cf6('0x15')](0x194);}return _0x4e0e85;};}function handleError(_0xc7b489,_0x3eaa31){_0x3eaa31=_0x3eaa31||0x1f4;return function(_0x558405){logger[_0x6cf6('0x25')](_0x558405[_0x6cf6('0x26')]);if(_0x558405[_0x6cf6('0x27')]){delete _0x558405[_0x6cf6('0x27')];}_0xc7b489['status'](_0x3eaa31)['send'](_0x558405);};}exports[_0x6cf6('0x28')]=function(_0x4521af,_0x57099f){var _0x5869e9={},_0x5ccc8f={},_0x2afc06={'count':0x0,'rows':[]};var _0x52717d=_['map'](db['ZendeskAccount'][_0x6cf6('0x29')],function(_0x65433){return{'name':_0x65433[_0x6cf6('0x2a')],'type':_0x65433[_0x6cf6('0x2b')][_0x6cf6('0x2c')]};});_0x5ccc8f['model']=_[_0x6cf6('0x2d')](_0x52717d,_0x6cf6('0x27'));_0x5ccc8f[_0x6cf6('0x2e')]=_['keys'](_0x4521af[_0x6cf6('0x2e')]);_0x5ccc8f[_0x6cf6('0x2f')]=_[_0x6cf6('0x30')](_0x5ccc8f[_0x6cf6('0x31')],_0x5ccc8f[_0x6cf6('0x2e')]);_0x5869e9[_0x6cf6('0x32')]=_[_0x6cf6('0x30')](_0x5ccc8f[_0x6cf6('0x31')],qs[_0x6cf6('0x33')](_0x4521af[_0x6cf6('0x2e')][_0x6cf6('0x33')]));_0x5869e9[_0x6cf6('0x32')]=_0x5869e9[_0x6cf6('0x32')][_0x6cf6('0x34')]?_0x5869e9[_0x6cf6('0x32')]:_0x5ccc8f[_0x6cf6('0x31')];if(!_0x4521af[_0x6cf6('0x2e')][_0x6cf6('0x35')]('nolimit')){_0x5869e9[_0x6cf6('0x19')]=qs[_0x6cf6('0x19')](_0x4521af[_0x6cf6('0x2e')][_0x6cf6('0x19')]);_0x5869e9[_0x6cf6('0x17')]=qs[_0x6cf6('0x17')](_0x4521af[_0x6cf6('0x2e')][_0x6cf6('0x17')]);}_0x5869e9[_0x6cf6('0x36')]=qs[_0x6cf6('0x37')](_0x4521af[_0x6cf6('0x2e')]['sort']);_0x5869e9[_0x6cf6('0x38')]=qs[_0x6cf6('0x2f')](_[_0x6cf6('0x39')](_0x4521af[_0x6cf6('0x2e')],_0x5ccc8f[_0x6cf6('0x2f')]),_0x52717d);if(_0x4521af[_0x6cf6('0x2e')][_0x6cf6('0x3a')]){_0x5869e9[_0x6cf6('0x38')]=_[_0x6cf6('0x3b')](_0x5869e9['where'],{'$or':_[_0x6cf6('0x2d')](_0x52717d,function(_0x46423f){if(_0x46423f[_0x6cf6('0x2b')]!==_0x6cf6('0x3c')){var _0x14e0eb={};_0x14e0eb[_0x46423f[_0x6cf6('0x27')]]={'$like':'%'+_0x4521af[_0x6cf6('0x2e')][_0x6cf6('0x3a')]+'%'};return _0x14e0eb;}})});}_0x5869e9=_[_0x6cf6('0x3b')]({},_0x5869e9,_0x4521af['options']);var _0x23622f={'where':_0x5869e9['where']};return db[_0x6cf6('0x3d')][_0x6cf6('0x1a')](_0x23622f)[_0x6cf6('0x23')](function(_0x1ce0be){_0x2afc06[_0x6cf6('0x1a')]=_0x1ce0be;if(_0x4521af[_0x6cf6('0x2e')][_0x6cf6('0x3e')]){_0x5869e9[_0x6cf6('0x3f')]=[{'all':!![]}];}return db['ZendeskAccount'][_0x6cf6('0x40')](_0x5869e9);})[_0x6cf6('0x23')](function(_0x52c417){_0x2afc06[_0x6cf6('0x41')]=_0x52c417;return _0x2afc06;})[_0x6cf6('0x23')](respondWithFilteredResult(_0x57099f,_0x5869e9))[_0x6cf6('0x42')](handleError(_0x57099f,null));};exports['show']=function(_0x10bb9b,_0x128f7a){var _0x51d915={'raw':![],'where':{'id':_0x10bb9b[_0x6cf6('0x43')]['id']}},_0x3f1084={};_0x3f1084[_0x6cf6('0x31')]=_[_0x6cf6('0x44')](db[_0x6cf6('0x3d')][_0x6cf6('0x29')]);_0x3f1084[_0x6cf6('0x2e')]=_['keys'](_0x10bb9b[_0x6cf6('0x2e')]);_0x3f1084['filters']=_[_0x6cf6('0x30')](_0x3f1084[_0x6cf6('0x31')],_0x3f1084['query']);_0x51d915[_0x6cf6('0x32')]=_[_0x6cf6('0x30')](_0x3f1084[_0x6cf6('0x31')],qs[_0x6cf6('0x33')](_0x10bb9b[_0x6cf6('0x2e')]['fields']));_0x51d915[_0x6cf6('0x32')]=_0x51d915[_0x6cf6('0x32')][_0x6cf6('0x34')]?_0x51d915['attributes']:_0x3f1084[_0x6cf6('0x31')];if(_0x10bb9b[_0x6cf6('0x2e')][_0x6cf6('0x3e')]){_0x51d915['include']=[{'all':!![]}];}_0x51d915=_[_0x6cf6('0x3b')]({},_0x51d915,_0x10bb9b['options']);return db['ZendeskAccount'][_0x6cf6('0x45')](_0x51d915)[_0x6cf6('0x23')](handleEntityNotFound(_0x128f7a,null))[_0x6cf6('0x23')](respondWithResult(_0x128f7a,null))[_0x6cf6('0x42')](handleError(_0x128f7a,null));};exports[_0x6cf6('0x46')]=function(_0x311745,_0x28629d){return db[_0x6cf6('0x3d')][_0x6cf6('0x46')](_0x311745[_0x6cf6('0x47')],{})[_0x6cf6('0x23')](respondWithResult(_0x28629d,0xc9))[_0x6cf6('0x42')](handleError(_0x28629d,null));};exports[_0x6cf6('0x21')]=function(_0x4c8ada,_0x26a6ff){if(_0x4c8ada[_0x6cf6('0x47')]['id']){delete _0x4c8ada['body']['id'];}return db['ZendeskAccount'][_0x6cf6('0x45')]({'where':{'id':_0x4c8ada[_0x6cf6('0x43')]['id']}})[_0x6cf6('0x23')](handleEntityNotFound(_0x26a6ff,null))[_0x6cf6('0x23')](saveUpdates(_0x4c8ada[_0x6cf6('0x47')],null))[_0x6cf6('0x23')](respondWithResult(_0x26a6ff,null))['catch'](handleError(_0x26a6ff,null));};exports[_0x6cf6('0x22')]=function(_0x262c23,_0x2503dc){return db['ZendeskAccount']['find']({'where':{'id':_0x262c23[_0x6cf6('0x43')]['id']}})[_0x6cf6('0x23')](handleEntityNotFound(_0x2503dc,null))[_0x6cf6('0x23')](removeEntity(_0x2503dc,null))[_0x6cf6('0x42')](handleError(_0x2503dc,null));};exports[_0x6cf6('0x48')]=function(_0x1fb6f1,_0x2cb470,_0x3e8aee){var _0x3800fe={};var _0x10df16={};var _0x4bb37e;var _0x217072;return db[_0x6cf6('0x3d')][_0x6cf6('0x49')]({'where':{'id':_0x1fb6f1[_0x6cf6('0x43')]['id']}})[_0x6cf6('0x23')](handleEntityNotFound(_0x2cb470,null))[_0x6cf6('0x23')](function(_0x2e1ee7){if(_0x2e1ee7){_0x4bb37e=_0x2e1ee7;_0x10df16[_0x6cf6('0x31')]=_[_0x6cf6('0x44')](db[_0x6cf6('0x4a')][_0x6cf6('0x29')]);_0x10df16['query']=_[_0x6cf6('0x44')](_0x1fb6f1['query']);_0x10df16[_0x6cf6('0x2f')]=_[_0x6cf6('0x30')](_0x10df16['model'],_0x10df16[_0x6cf6('0x2e')]);_0x3800fe[_0x6cf6('0x32')]=_[_0x6cf6('0x30')](_0x10df16[_0x6cf6('0x31')],qs[_0x6cf6('0x33')](_0x1fb6f1[_0x6cf6('0x2e')]['fields']));_0x3800fe[_0x6cf6('0x32')]=_0x3800fe[_0x6cf6('0x32')][_0x6cf6('0x34')]?_0x3800fe['attributes']:_0x10df16['model'];_0x3800fe[_0x6cf6('0x36')]=qs[_0x6cf6('0x37')](_0x1fb6f1['query'][_0x6cf6('0x37')]);_0x3800fe[_0x6cf6('0x38')]=qs[_0x6cf6('0x2f')](_[_0x6cf6('0x39')](_0x1fb6f1[_0x6cf6('0x2e')],_0x10df16['filters']));if(_0x1fb6f1[_0x6cf6('0x2e')][_0x6cf6('0x3a')]){_0x3800fe['where']=_['merge'](_0x3800fe[_0x6cf6('0x38')],{'$or':_[_0x6cf6('0x2d')](_0x3800fe[_0x6cf6('0x32')],function(_0x32a6c6){var _0x26dfc7={};_0x26dfc7[_0x32a6c6]={'$like':'%'+_0x1fb6f1['query']['filter']+'%'};return _0x26dfc7;})});}_0x3800fe=_[_0x6cf6('0x3b')]({},_0x3800fe,_0x1fb6f1[_0x6cf6('0x4b')]);return _0x4bb37e[_0x6cf6('0x48')](_0x3800fe);}})[_0x6cf6('0x23')](function(_0xf8c052){if(_0xf8c052){_0x217072=_0xf8c052['length'];if(!_0x1fb6f1['query']['hasOwnProperty'](_0x6cf6('0x4c'))){_0x3800fe[_0x6cf6('0x19')]=qs[_0x6cf6('0x19')](_0x1fb6f1[_0x6cf6('0x2e')]['limit']);_0x3800fe[_0x6cf6('0x17')]=qs['offset'](_0x1fb6f1[_0x6cf6('0x2e')]['offset']);}return _0x4bb37e[_0x6cf6('0x48')](_0x3800fe);}})[_0x6cf6('0x23')](function(_0x2f2ee3){if(_0x2f2ee3){return _0x2f2ee3?{'count':_0x217072,'rows':_0x2f2ee3}:null;}})[_0x6cf6('0x23')](respondWithResult(_0x2cb470,null))[_0x6cf6('0x42')](handleError(_0x2cb470,null));};exports['addConfiguration']=function(_0x21ea76,_0x5bc1cb,_0x4498cd){if(_0x21ea76['body']['id']){delete _0x21ea76[_0x6cf6('0x47')]['id'];}return db['ZendeskAccount'][_0x6cf6('0x49')]({'where':{'id':_0x21ea76[_0x6cf6('0x43')]['id']}})['then'](handleEntityNotFound(_0x5bc1cb,null))[_0x6cf6('0x23')](function(_0x15ae6c){if(_0x15ae6c){_0x21ea76[_0x6cf6('0x47')][_0x6cf6('0x4d')]=_0x15ae6c['id'];_0x21ea76[_0x6cf6('0x47')][_0x6cf6('0x4e')]=integrations[_0x6cf6('0x4f')](_0x21ea76['body']['channel'],_0x21ea76[_0x6cf6('0x47')][_0x6cf6('0x2b')]);_0x21ea76['body'][_0x6cf6('0x50')]=integrations['getDescriptions'](_0x21ea76['body'][_0x6cf6('0x51')],_0x21ea76['body']['type']);return db[_0x6cf6('0x4a')][_0x6cf6('0x46')](_0x21ea76[_0x6cf6('0x47')],{'include':[{'model':db['ZendeskField'],'as':_0x6cf6('0x4e')},{'model':db['ZendeskField'],'as':_0x6cf6('0x50')}]});}return null;})[_0x6cf6('0x23')](respondWithResult(_0x5bc1cb,null))['catch'](handleError(_0x5bc1cb,null));};exports[_0x6cf6('0x52')]=function(_0xe2db1d,_0x1f5e5a,_0x421819){var _0xa36ee1='';return db[_0x6cf6('0x3d')]['findOne']({'where':{'id':_0xe2db1d[_0x6cf6('0x43')]['id']},'attributes':['id',_0x6cf6('0x53'),_0x6cf6('0x54'),_0x6cf6('0x55'),_0x6cf6('0x56'),_0x6cf6('0x57')]})['then'](handleEntityNotFound(_0x1f5e5a,null))['then'](function(_0x54bdca){if(_0x54bdca){_0xa36ee1=_0x54bdca[_0x6cf6('0x57')];var _0x5902bd=_0xa36ee1[_0x6cf6('0x58')](-0x1);if(_0x5902bd==='/'){_0xa36ee1=_0xa36ee1['substring'](0x0,_0xa36ee1[_0x6cf6('0x59')](_0x5902bd));}var _0x461f80={'method':'GET','uri':util[_0x6cf6('0x5a')](_0x6cf6('0x5b'),_0xa36ee1,_0x6cf6('0x5c')),'json':!![]};switch(_0x54bdca['authType']){case _0x6cf6('0x54'):_0x461f80['headers']={'Authorization':util[_0x6cf6('0x5a')](_0x6cf6('0x5d'),new Buffer(util[_0x6cf6('0x5a')](_0x6cf6('0x5e'),_0x54bdca[_0x6cf6('0x53')],_0x54bdca[_0x6cf6('0x54')]))[_0x6cf6('0x5f')]('base64'))};break;case _0x6cf6('0x55'):_0x461f80['headers']={'Authorization':util[_0x6cf6('0x5a')](_0x6cf6('0x5d'),new Buffer(util[_0x6cf6('0x5a')](_0x6cf6('0x60'),_0x54bdca['username'],_0x54bdca['token']))[_0x6cf6('0x5f')](_0x6cf6('0x61')))};break;default:throw new db[(_0x6cf6('0x62'))][(_0x6cf6('0x63'))](_0x6cf6('0x64'));}return rp(_0x461f80);}})[_0x6cf6('0x23')](function(_0x5527d6){if(_0x5527d6){var _0x517c8e=[_0x6cf6('0x65'),'description',_0x6cf6('0x66'),_0x6cf6('0x67')];_[_0x6cf6('0x68')](_0x5527d6[_0x6cf6('0x5c')],function(_0x5801be){return _0x517c8e[_0x6cf6('0x69')](_0x5801be['type']);});return{'count':_0x5527d6[_0x6cf6('0x5c')][_0x6cf6('0x34')],'rows':_[_0x6cf6('0x2d')](_0x5527d6['ticket_fields'],function(_0xc509d3){return{'id':_0xc509d3['id'],'name':_0xc509d3[_0x6cf6('0x6a')]>0x7?_0xc509d3[_0x6cf6('0x6b')]:_0xc509d3['type'],'custom':_0xc509d3[_0x6cf6('0x6a')]>0x7?!![]:![],'options':_0xc509d3[_0x6cf6('0x6c')]?_0xc509d3[_0x6cf6('0x6c')]:_0xc509d3['custom_field_options']?_0xc509d3['custom_field_options']:[]};})};}})[_0x6cf6('0x23')](respondWithResult(_0x1f5e5a,null))['catch'](function(_0x4c3136){var _0x1f1cbb=_0xe2db1d[_0x6cf6('0x2e')][_0x6cf6('0x6d')]?0x1f4:_0x4c3136[_0x6cf6('0x6e')]||0x1f4;logger[_0x6cf6('0x25')](_0x6cf6('0x6f'),_0x6cf6('0x52'),_0x1f1cbb,JSON[_0x6cf6('0x70')](_0x4c3136));delete _0x4c3136[_0x6cf6('0x27')];if(_0x1f1cbb===0x191){_0x1f1cbb=0x190;}_0x1f5e5a['status'](_0x1f1cbb)[_0x6cf6('0x71')](_0xe2db1d[_0x6cf6('0x2e')][_0x6cf6('0x6d')]?{'message':'Wrong\x20credentials','statusCode':_0x4c3136['statusCode']}:_0x4c3136);});}; \ No newline at end of file +var _0xf4eb=['includes','position','title','system_field_options','custom_field_options','test','statusCode','error','getFields','stringify','send','Wrong\x20credentials','eml-format','moment','util','path','sox','to-csv','ejs','fs-extra','lodash','crypto','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','api','../../config/environment','../../config/license/util','../../components/integrations/configuration','sendStatus','status','end','json','offset','undefined','limit','count','set','Content-Range','apply','reject','save','update','then','destroy','stack','name','index','map','ZendeskAccount','fieldName','type','key','model','query','keys','filters','intersection','fields','attributes','length','hasOwnProperty','sort','where','pick','merge','filter','options','includeAll','include','catch','show','params','find','create','body','getConfigurations','order','nolimit','addConfiguration','Subjects','getSubjects','channel','getDescriptions','ZendeskConfiguration','ZendeskField','findOne','username','password','authType','remoteUri','slice','substring','lastIndexOf','GET','format','%s/%s','headers','Basic\x20%s','%s:%s','toString','base64','%s/token:%s','token','ValidationError','description','assignee','remove','ticket_fields'];(function(_0x503b3c,_0x4207c0){var _0x2009ba=function(_0x56f0c0){while(--_0x56f0c0){_0x503b3c['push'](_0x503b3c['shift']());}};_0x2009ba(++_0x4207c0);}(_0xf4eb,0xec));var _0xbf4e=function(_0x1d580f,_0x3f3a87){_0x1d580f=_0x1d580f-0x0;var _0x2c4fc9=_0xf4eb[_0x1d580f];return _0x2c4fc9;};'use strict';var emlformat=require(_0xbf4e('0x0'));var rimraf=require('rimraf');var zipdir=require('zip-dir');var jsonpatch=require('fast-json-patch');var rp=require('request-promise');var moment=require(_0xbf4e('0x1'));var BPromise=require('bluebird');var Mustache=require('mustache');var util=require(_0xbf4e('0x2'));var path=require(_0xbf4e('0x3'));var sox=require(_0xbf4e('0x4'));var csv=require(_0xbf4e('0x5'));var ejs=require(_0xbf4e('0x6'));var fs=require('fs');var fs_extra=require(_0xbf4e('0x7'));var _=require(_0xbf4e('0x8'));var squel=require('squel');var crypto=require(_0xbf4e('0x9'));var jsforce=require('jsforce');var deskjs=require('desk.js');var toCsv=require(_0xbf4e('0x5'));var querystring=require(_0xbf4e('0xa'));var Papa=require(_0xbf4e('0xb'));var Redis=require(_0xbf4e('0xc'));var authService=require(_0xbf4e('0xd'));var qs=require(_0xbf4e('0xe'));var as=require(_0xbf4e('0xf'));var hardwareService=require('../../config/license/hardware');var logger=require('../../config/logger')(_0xbf4e('0x10'));var utils=require('../../config/utils');var config=require(_0xbf4e('0x11'));var licenseUtil=require(_0xbf4e('0x12'));var db=require('../../mysqldb')['db'];var integrations=require(_0xbf4e('0x13'));function respondWithStatusCode(_0x5a3035,_0x56d185){_0x56d185=_0x56d185||0xcc;return function(_0x209b25){if(_0x209b25){return _0x5a3035[_0xbf4e('0x14')](_0x56d185);}return _0x5a3035[_0xbf4e('0x15')](_0x56d185)[_0xbf4e('0x16')]();};}function respondWithResult(_0x3b74bd,_0x61bd54){_0x61bd54=_0x61bd54||0xc8;return function(_0x4984b4){if(_0x4984b4){return _0x3b74bd['status'](_0x61bd54)[_0xbf4e('0x17')](_0x4984b4);}};}function respondWithFilteredResult(_0x1735ae,_0x28fc6b){return function(_0x542909){if(_0x542909){var _0x14110b=typeof _0x28fc6b[_0xbf4e('0x18')]===_0xbf4e('0x19')&&typeof _0x28fc6b[_0xbf4e('0x1a')]==='undefined';var _0x247322=_0x542909['count'];var _0x5db03f=_0x14110b?0x0:_0x28fc6b['offset'];var _0x4f8762=_0x14110b?_0x542909[_0xbf4e('0x1b')]:_0x28fc6b[_0xbf4e('0x18')]+_0x28fc6b[_0xbf4e('0x1a')];var _0x4d9c2a;if(_0x4f8762>=_0x247322){_0x4f8762=_0x247322;_0x4d9c2a=0xc8;}else{_0x4d9c2a=0xce;}_0x1735ae['status'](_0x4d9c2a);return _0x1735ae[_0xbf4e('0x1c')](_0xbf4e('0x1d'),_0x5db03f+'-'+_0x4f8762+'/'+_0x247322)[_0xbf4e('0x17')](_0x542909);}return null;};}function patchUpdates(_0x3a875b){return function(_0x344727){try{jsonpatch[_0xbf4e('0x1e')](_0x344727,_0x3a875b,!![]);}catch(_0x415963){return BPromise[_0xbf4e('0x1f')](_0x415963);}return _0x344727[_0xbf4e('0x20')]();};}function saveUpdates(_0x376832,_0x30539b){return function(_0x59bd84){if(_0x59bd84){return _0x59bd84[_0xbf4e('0x21')](_0x376832)[_0xbf4e('0x22')](function(_0x51648c){return _0x51648c;});}return null;};}function removeEntity(_0x31e3f5,_0x30994d){return function(_0x114412){if(_0x114412){return _0x114412[_0xbf4e('0x23')]()[_0xbf4e('0x22')](function(){_0x31e3f5['status'](0xcc)[_0xbf4e('0x16')]();});}};}function handleEntityNotFound(_0x36688a,_0x3d6863){return function(_0x5766d4){if(!_0x5766d4){_0x36688a[_0xbf4e('0x14')](0x194);}return _0x5766d4;};}function handleError(_0x5e08b1,_0x5bcf71){_0x5bcf71=_0x5bcf71||0x1f4;return function(_0x2bfccf){logger['error'](_0x2bfccf[_0xbf4e('0x24')]);if(_0x2bfccf[_0xbf4e('0x25')]){delete _0x2bfccf[_0xbf4e('0x25')];}_0x5e08b1[_0xbf4e('0x15')](_0x5bcf71)['send'](_0x2bfccf);};}exports[_0xbf4e('0x26')]=function(_0x8e0ab5,_0x43879d){var _0x4cd4a1={},_0x681c3b={},_0x590c85={'count':0x0,'rows':[]};var _0x1dfa81=_[_0xbf4e('0x27')](db[_0xbf4e('0x28')]['rawAttributes'],function(_0x1d12e2){return{'name':_0x1d12e2[_0xbf4e('0x29')],'type':_0x1d12e2[_0xbf4e('0x2a')][_0xbf4e('0x2b')]};});_0x681c3b[_0xbf4e('0x2c')]=_[_0xbf4e('0x27')](_0x1dfa81,'name');_0x681c3b[_0xbf4e('0x2d')]=_[_0xbf4e('0x2e')](_0x8e0ab5['query']);_0x681c3b[_0xbf4e('0x2f')]=_[_0xbf4e('0x30')](_0x681c3b['model'],_0x681c3b[_0xbf4e('0x2d')]);_0x4cd4a1['attributes']=_[_0xbf4e('0x30')](_0x681c3b['model'],qs[_0xbf4e('0x31')](_0x8e0ab5[_0xbf4e('0x2d')][_0xbf4e('0x31')]));_0x4cd4a1['attributes']=_0x4cd4a1[_0xbf4e('0x32')][_0xbf4e('0x33')]?_0x4cd4a1[_0xbf4e('0x32')]:_0x681c3b[_0xbf4e('0x2c')];if(!_0x8e0ab5[_0xbf4e('0x2d')][_0xbf4e('0x34')]('nolimit')){_0x4cd4a1[_0xbf4e('0x1a')]=qs[_0xbf4e('0x1a')](_0x8e0ab5[_0xbf4e('0x2d')][_0xbf4e('0x1a')]);_0x4cd4a1[_0xbf4e('0x18')]=qs['offset'](_0x8e0ab5['query']['offset']);}_0x4cd4a1['order']=qs[_0xbf4e('0x35')](_0x8e0ab5[_0xbf4e('0x2d')][_0xbf4e('0x35')]);_0x4cd4a1[_0xbf4e('0x36')]=qs[_0xbf4e('0x2f')](_[_0xbf4e('0x37')](_0x8e0ab5[_0xbf4e('0x2d')],_0x681c3b[_0xbf4e('0x2f')]),_0x1dfa81);if(_0x8e0ab5[_0xbf4e('0x2d')]['filter']){_0x4cd4a1['where']=_[_0xbf4e('0x38')](_0x4cd4a1[_0xbf4e('0x36')],{'$or':_[_0xbf4e('0x27')](_0x1dfa81,function(_0x4ae676){if(_0x4ae676[_0xbf4e('0x2a')]!=='VIRTUAL'){var _0x370d90={};_0x370d90[_0x4ae676[_0xbf4e('0x25')]]={'$like':'%'+_0x8e0ab5[_0xbf4e('0x2d')][_0xbf4e('0x39')]+'%'};return _0x370d90;}})});}_0x4cd4a1=_['merge']({},_0x4cd4a1,_0x8e0ab5[_0xbf4e('0x3a')]);var _0x78ab2d={'where':_0x4cd4a1[_0xbf4e('0x36')]};return db[_0xbf4e('0x28')]['count'](_0x78ab2d)[_0xbf4e('0x22')](function(_0x44e96b){_0x590c85[_0xbf4e('0x1b')]=_0x44e96b;if(_0x8e0ab5[_0xbf4e('0x2d')][_0xbf4e('0x3b')]){_0x4cd4a1[_0xbf4e('0x3c')]=[{'all':!![]}];}return db[_0xbf4e('0x28')]['findAll'](_0x4cd4a1);})[_0xbf4e('0x22')](function(_0x7b3a94){_0x590c85['rows']=_0x7b3a94;return _0x590c85;})['then'](respondWithFilteredResult(_0x43879d,_0x4cd4a1))[_0xbf4e('0x3d')](handleError(_0x43879d,null));};exports[_0xbf4e('0x3e')]=function(_0x495e53,_0x5bfc4d){var _0x2b1bf4={'raw':![],'where':{'id':_0x495e53[_0xbf4e('0x3f')]['id']}},_0x150224={};_0x150224[_0xbf4e('0x2c')]=_[_0xbf4e('0x2e')](db[_0xbf4e('0x28')]['rawAttributes']);_0x150224[_0xbf4e('0x2d')]=_[_0xbf4e('0x2e')](_0x495e53['query']);_0x150224['filters']=_['intersection'](_0x150224['model'],_0x150224[_0xbf4e('0x2d')]);_0x2b1bf4['attributes']=_[_0xbf4e('0x30')](_0x150224[_0xbf4e('0x2c')],qs['fields'](_0x495e53['query'][_0xbf4e('0x31')]));_0x2b1bf4[_0xbf4e('0x32')]=_0x2b1bf4[_0xbf4e('0x32')][_0xbf4e('0x33')]?_0x2b1bf4[_0xbf4e('0x32')]:_0x150224['model'];if(_0x495e53[_0xbf4e('0x2d')][_0xbf4e('0x3b')]){_0x2b1bf4[_0xbf4e('0x3c')]=[{'all':!![]}];}_0x2b1bf4=_[_0xbf4e('0x38')]({},_0x2b1bf4,_0x495e53[_0xbf4e('0x3a')]);return db[_0xbf4e('0x28')][_0xbf4e('0x40')](_0x2b1bf4)[_0xbf4e('0x22')](handleEntityNotFound(_0x5bfc4d,null))['then'](respondWithResult(_0x5bfc4d,null))[_0xbf4e('0x3d')](handleError(_0x5bfc4d,null));};exports[_0xbf4e('0x41')]=function(_0x1833c1,_0x32bed6){return db[_0xbf4e('0x28')][_0xbf4e('0x41')](_0x1833c1[_0xbf4e('0x42')],{})[_0xbf4e('0x22')](respondWithResult(_0x32bed6,0xc9))[_0xbf4e('0x3d')](handleError(_0x32bed6,null));};exports[_0xbf4e('0x21')]=function(_0x2fdba9,_0x6fd78d){if(_0x2fdba9[_0xbf4e('0x42')]['id']){delete _0x2fdba9[_0xbf4e('0x42')]['id'];}return db[_0xbf4e('0x28')][_0xbf4e('0x40')]({'where':{'id':_0x2fdba9[_0xbf4e('0x3f')]['id']}})['then'](handleEntityNotFound(_0x6fd78d,null))[_0xbf4e('0x22')](saveUpdates(_0x2fdba9[_0xbf4e('0x42')],null))[_0xbf4e('0x22')](respondWithResult(_0x6fd78d,null))['catch'](handleError(_0x6fd78d,null));};exports[_0xbf4e('0x23')]=function(_0x5ed838,_0x4a050e){return db[_0xbf4e('0x28')][_0xbf4e('0x40')]({'where':{'id':_0x5ed838['params']['id']}})[_0xbf4e('0x22')](handleEntityNotFound(_0x4a050e,null))[_0xbf4e('0x22')](removeEntity(_0x4a050e,null))[_0xbf4e('0x3d')](handleError(_0x4a050e,null));};exports[_0xbf4e('0x43')]=function(_0x42eef6,_0x2ac2c8,_0x419969){var _0x1cdd8c={};var _0x3cd61b={};var _0xc058e1;var _0x271ad2;return db['ZendeskAccount']['findOne']({'where':{'id':_0x42eef6[_0xbf4e('0x3f')]['id']}})[_0xbf4e('0x22')](handleEntityNotFound(_0x2ac2c8,null))[_0xbf4e('0x22')](function(_0x586f5d){if(_0x586f5d){_0xc058e1=_0x586f5d;_0x3cd61b[_0xbf4e('0x2c')]=_[_0xbf4e('0x2e')](db['ZendeskConfiguration']['rawAttributes']);_0x3cd61b[_0xbf4e('0x2d')]=_['keys'](_0x42eef6['query']);_0x3cd61b[_0xbf4e('0x2f')]=_[_0xbf4e('0x30')](_0x3cd61b[_0xbf4e('0x2c')],_0x3cd61b[_0xbf4e('0x2d')]);_0x1cdd8c[_0xbf4e('0x32')]=_['intersection'](_0x3cd61b[_0xbf4e('0x2c')],qs['fields'](_0x42eef6[_0xbf4e('0x2d')]['fields']));_0x1cdd8c[_0xbf4e('0x32')]=_0x1cdd8c['attributes'][_0xbf4e('0x33')]?_0x1cdd8c[_0xbf4e('0x32')]:_0x3cd61b[_0xbf4e('0x2c')];_0x1cdd8c[_0xbf4e('0x44')]=qs[_0xbf4e('0x35')](_0x42eef6['query']['sort']);_0x1cdd8c['where']=qs['filters'](_[_0xbf4e('0x37')](_0x42eef6[_0xbf4e('0x2d')],_0x3cd61b['filters']));if(_0x42eef6[_0xbf4e('0x2d')][_0xbf4e('0x39')]){_0x1cdd8c[_0xbf4e('0x36')]=_[_0xbf4e('0x38')](_0x1cdd8c[_0xbf4e('0x36')],{'$or':_[_0xbf4e('0x27')](_0x1cdd8c[_0xbf4e('0x32')],function(_0x48682c){var _0x25c254={};_0x25c254[_0x48682c]={'$like':'%'+_0x42eef6[_0xbf4e('0x2d')][_0xbf4e('0x39')]+'%'};return _0x25c254;})});}_0x1cdd8c=_['merge']({},_0x1cdd8c,_0x42eef6['options']);return _0xc058e1[_0xbf4e('0x43')](_0x1cdd8c);}})[_0xbf4e('0x22')](function(_0x2e8a62){if(_0x2e8a62){_0x271ad2=_0x2e8a62['length'];if(!_0x42eef6[_0xbf4e('0x2d')][_0xbf4e('0x34')](_0xbf4e('0x45'))){_0x1cdd8c[_0xbf4e('0x1a')]=qs[_0xbf4e('0x1a')](_0x42eef6[_0xbf4e('0x2d')][_0xbf4e('0x1a')]);_0x1cdd8c[_0xbf4e('0x18')]=qs[_0xbf4e('0x18')](_0x42eef6[_0xbf4e('0x2d')][_0xbf4e('0x18')]);}return _0xc058e1[_0xbf4e('0x43')](_0x1cdd8c);}})['then'](function(_0x21cbd2){if(_0x21cbd2){return _0x21cbd2?{'count':_0x271ad2,'rows':_0x21cbd2}:null;}})['then'](respondWithResult(_0x2ac2c8,null))[_0xbf4e('0x3d')](handleError(_0x2ac2c8,null));};exports[_0xbf4e('0x46')]=function(_0x400fa5,_0x180b13,_0x2080ec){if(_0x400fa5[_0xbf4e('0x42')]['id']){delete _0x400fa5[_0xbf4e('0x42')]['id'];}return db[_0xbf4e('0x28')]['findOne']({'where':{'id':_0x400fa5[_0xbf4e('0x3f')]['id']}})[_0xbf4e('0x22')](handleEntityNotFound(_0x180b13,null))[_0xbf4e('0x22')](function(_0x33f9c4){if(_0x33f9c4){_0x400fa5[_0xbf4e('0x42')]['AccountId']=_0x33f9c4['id'];_0x400fa5[_0xbf4e('0x42')][_0xbf4e('0x47')]=integrations[_0xbf4e('0x48')](_0x400fa5[_0xbf4e('0x42')][_0xbf4e('0x49')],_0x400fa5[_0xbf4e('0x42')]['type']);_0x400fa5[_0xbf4e('0x42')]['Descriptions']=integrations[_0xbf4e('0x4a')](_0x400fa5[_0xbf4e('0x42')][_0xbf4e('0x49')],_0x400fa5[_0xbf4e('0x42')]['type']);return db[_0xbf4e('0x4b')]['create'](_0x400fa5['body'],{'include':[{'model':db[_0xbf4e('0x4c')],'as':_0xbf4e('0x47')},{'model':db[_0xbf4e('0x4c')],'as':'Descriptions'}]});}return null;})[_0xbf4e('0x22')](respondWithResult(_0x180b13,null))[_0xbf4e('0x3d')](handleError(_0x180b13,null));};exports['getFields']=function(_0x19c5b4,_0x42df5f,_0x4405b9){var _0x137224='';return db[_0xbf4e('0x28')][_0xbf4e('0x4d')]({'where':{'id':_0x19c5b4[_0xbf4e('0x3f')]['id']},'attributes':['id',_0xbf4e('0x4e'),_0xbf4e('0x4f'),'token',_0xbf4e('0x50'),_0xbf4e('0x51')]})[_0xbf4e('0x22')](handleEntityNotFound(_0x42df5f,null))[_0xbf4e('0x22')](function(_0x54f450){if(_0x54f450){_0x137224=_0x54f450[_0xbf4e('0x51')];var _0x667836=_0x137224[_0xbf4e('0x52')](-0x1);if(_0x667836==='/'){_0x137224=_0x137224[_0xbf4e('0x53')](0x0,_0x137224[_0xbf4e('0x54')](_0x667836));}var _0x3448f5={'method':_0xbf4e('0x55'),'uri':util[_0xbf4e('0x56')](_0xbf4e('0x57'),_0x137224,'ticket_fields'),'json':!![]};switch(_0x54f450[_0xbf4e('0x50')]){case'password':_0x3448f5[_0xbf4e('0x58')]={'Authorization':util[_0xbf4e('0x56')](_0xbf4e('0x59'),new Buffer(util[_0xbf4e('0x56')](_0xbf4e('0x5a'),_0x54f450['username'],_0x54f450[_0xbf4e('0x4f')]))[_0xbf4e('0x5b')](_0xbf4e('0x5c')))};break;case'token':_0x3448f5[_0xbf4e('0x58')]={'Authorization':util[_0xbf4e('0x56')](_0xbf4e('0x59'),new Buffer(util['format'](_0xbf4e('0x5d'),_0x54f450[_0xbf4e('0x4e')],_0x54f450[_0xbf4e('0x5e')]))[_0xbf4e('0x5b')](_0xbf4e('0x5c')))};break;default:throw new db['Sequelize'][(_0xbf4e('0x5f'))]('Unknown\x20authentication\x20type');}return rp(_0x3448f5);}})[_0xbf4e('0x22')](function(_0x504723){if(_0x504723){var _0x19a7e9=['subject',_0xbf4e('0x60'),'group',_0xbf4e('0x61')];_[_0xbf4e('0x62')](_0x504723[_0xbf4e('0x63')],function(_0x23de82){return _0x19a7e9[_0xbf4e('0x64')](_0x23de82[_0xbf4e('0x2a')]);});return{'count':_0x504723[_0xbf4e('0x63')]['length'],'rows':_[_0xbf4e('0x27')](_0x504723[_0xbf4e('0x63')],function(_0x2a242b){return{'id':_0x2a242b['id'],'name':_0x2a242b[_0xbf4e('0x65')]>0x7?_0x2a242b[_0xbf4e('0x66')]:_0x2a242b[_0xbf4e('0x2a')],'custom':_0x2a242b['position']>0x7?!![]:![],'options':_0x2a242b[_0xbf4e('0x67')]?_0x2a242b[_0xbf4e('0x67')]:_0x2a242b['custom_field_options']?_0x2a242b[_0xbf4e('0x68')]:[]};})};}})[_0xbf4e('0x22')](respondWithResult(_0x42df5f,null))[_0xbf4e('0x3d')](function(_0xb6d122){var _0x19ec7e=_0x19c5b4[_0xbf4e('0x2d')][_0xbf4e('0x69')]?0x1f4:_0xb6d122[_0xbf4e('0x6a')]||0x1f4;logger[_0xbf4e('0x6b')]('getFields,\x20%s,\x20%s,\x20%s',_0xbf4e('0x6c'),_0x19ec7e,JSON[_0xbf4e('0x6d')](_0xb6d122));delete _0xb6d122[_0xbf4e('0x25')];if(_0x19ec7e===0x191){_0x19ec7e=0x190;}_0x42df5f['status'](_0x19ec7e)[_0xbf4e('0x6e')](_0x19c5b4[_0xbf4e('0x2d')]['test']?{'message':_0xbf4e('0x6f'),'statusCode':_0xb6d122[_0xbf4e('0x6a')]}:_0xb6d122);});}; \ No newline at end of file diff --git a/server/api/intZendeskAccount/intZendeskAccount.model.js b/server/api/intZendeskAccount/intZendeskAccount.model.js index 8c699d9..2822310 100644 --- a/server/api/intZendeskAccount/intZendeskAccount.model.js +++ b/server/api/intZendeskAccount/intZendeskAccount.model.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x6c01=['request-promise','rimraf','../../components/integrations/configuration','exports','define','int_zendesk_accounts','util','api'];(function(_0x486f4a,_0x478dc7){var _0x135d99=function(_0x434008){while(--_0x434008){_0x486f4a['push'](_0x486f4a['shift']());}};_0x135d99(++_0x478dc7);}(_0x6c01,0xae));var _0x16c0=function(_0x4112c0,_0x1e8209){_0x4112c0=_0x4112c0-0x0;var _0x24935f=_0x6c01[_0x4112c0];return _0x24935f;};'use strict';var _=require('lodash');var util=require(_0x16c0('0x0'));var logger=require('../../config/logger')(_0x16c0('0x1'));var moment=require('moment');var BPromise=require('bluebird');var rp=require(_0x16c0('0x2'));var fs=require('fs');var path=require('path');var rimraf=require(_0x16c0('0x3'));var config=require('../../config/environment');var attributes=require('./intZendeskAccount.attributes');var integrations=require(_0x16c0('0x4'));module[_0x16c0('0x5')]=function(_0x351758,_0x2c30d2){return _0x351758[_0x16c0('0x6')]('ZendeskAccount',attributes,{'tableName':_0x16c0('0x7'),'paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file +var _0x57ca=['../../components/integrations/configuration','define','ZendeskAccount','util','../../config/logger','api','moment','bluebird','path','rimraf','../../config/environment','./intZendeskAccount.attributes'];(function(_0x1facfa,_0x1acf7d){var _0x9ec701=function(_0x115e37){while(--_0x115e37){_0x1facfa['push'](_0x1facfa['shift']());}};_0x9ec701(++_0x1acf7d);}(_0x57ca,0xff));var _0xa57c=function(_0x912ce8,_0x1f7cb5){_0x912ce8=_0x912ce8-0x0;var _0x4cd09a=_0x57ca[_0x912ce8];return _0x4cd09a;};'use strict';var _=require('lodash');var util=require(_0xa57c('0x0'));var logger=require(_0xa57c('0x1'))(_0xa57c('0x2'));var moment=require(_0xa57c('0x3'));var BPromise=require(_0xa57c('0x4'));var rp=require('request-promise');var fs=require('fs');var path=require(_0xa57c('0x5'));var rimraf=require(_0xa57c('0x6'));var config=require(_0xa57c('0x7'));var attributes=require(_0xa57c('0x8'));var integrations=require(_0xa57c('0x9'));module['exports']=function(_0x36da95,_0x1ac8ab){return _0x36da95[_0xa57c('0xa')](_0xa57c('0xb'),attributes,{'tableName':'int_zendesk_accounts','paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file diff --git a/server/api/intZendeskAccount/intZendeskAccount.rpc.js b/server/api/intZendeskAccount/intZendeskAccount.rpc.js index 0fabbf6..1ee26b1 100644 --- a/server/api/intZendeskAccount/intZendeskAccount.rpc.js +++ b/server/api/intZendeskAccount/intZendeskAccount.rpc.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xbef5=['catch','find','raw','info','ShowZendeskAccount','util','moment','bluebird','randomstring','ioredis','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','request','then','ZendeskAccount,\x20%s,\x20%s','request\x20sent','debug','ZendeskAccount,\x20%s,\x20%s,\x20%s','stringify','error','message','result','GetZendeskAccount','ZendeskAccount','findAll','options','where','attributes','limit','include','model','map'];(function(_0x4ab6a1,_0x4d64d5){var _0x2a24cc=function(_0x2625a0){while(--_0x2625a0){_0x4ab6a1['push'](_0x4ab6a1['shift']());}};_0x2a24cc(++_0x4d64d5);}(_0xbef5,0x101));var _0x5bef=function(_0x2c6977,_0x4b53e3){_0x2c6977=_0x2c6977-0x0;var _0x4951c8=_0xbef5[_0x2c6977];return _0x4951c8;};'use strict';var _=require('lodash');var util=require(_0x5bef('0x0'));var moment=require(_0x5bef('0x1'));var BPromise=require(_0x5bef('0x2'));var rs=require(_0x5bef('0x3'));var fs=require('fs');var Redis=require(_0x5bef('0x4'));var db=require('../../mysqldb')['db'];var utils=require(_0x5bef('0x5'));var logger=require(_0x5bef('0x6'))(_0x5bef('0x7'));var config=require(_0x5bef('0x8'));var jayson=require(_0x5bef('0x9'));var client=jayson[_0x5bef('0xa')]['http']({'port':0x232a});function respondWithRpcPromise(_0x48df74,_0x321cf5,_0x5d71d6){return new BPromise(function(_0x5ddc2e,_0x2cafdc){return client[_0x5bef('0xb')](_0x48df74,_0x5d71d6)[_0x5bef('0xc')](function(_0x2fb45f){logger['info'](_0x5bef('0xd'),_0x321cf5,_0x5bef('0xe'));logger[_0x5bef('0xf')](_0x5bef('0x10'),_0x321cf5,_0x5bef('0xe'),JSON[_0x5bef('0x11')](_0x2fb45f));if(_0x2fb45f['error']){if(_0x2fb45f[_0x5bef('0x12')]['code']===0x1f4){logger[_0x5bef('0x12')](_0x5bef('0xd'),_0x321cf5,_0x2fb45f[_0x5bef('0x12')][_0x5bef('0x13')]);return _0x2cafdc(_0x2fb45f[_0x5bef('0x12')][_0x5bef('0x13')]);}logger[_0x5bef('0x12')](_0x5bef('0xd'),_0x321cf5,_0x2fb45f['error'][_0x5bef('0x13')]);return _0x5ddc2e(_0x2fb45f['error']['message']);}else{logger['info'](_0x5bef('0xd'),_0x321cf5,_0x5bef('0xe'));_0x5ddc2e(_0x2fb45f[_0x5bef('0x14')][_0x5bef('0x13')]);}})['catch'](function(_0x1bc2a4){logger[_0x5bef('0x12')]('ZendeskAccount,\x20%s,\x20%s',_0x321cf5,_0x1bc2a4);_0x2cafdc(_0x1bc2a4);});});}exports[_0x5bef('0x15')]=function(_0x52e1d7){var _0x423a3f=this;return new Promise(function(_0x3030aa,_0x338791){return db[_0x5bef('0x16')][_0x5bef('0x17')]({'raw':_0x52e1d7['options']?_0x52e1d7[_0x5bef('0x18')]['raw']===undefined?!![]:![]:!![],'where':_0x52e1d7[_0x5bef('0x18')]?_0x52e1d7['options'][_0x5bef('0x19')]||null:null,'attributes':_0x52e1d7[_0x5bef('0x18')]?_0x52e1d7[_0x5bef('0x18')][_0x5bef('0x1a')]||null:null,'limit':_0x52e1d7[_0x5bef('0x18')]?_0x52e1d7[_0x5bef('0x18')][_0x5bef('0x1b')]||null:null,'include':_0x52e1d7[_0x5bef('0x18')]?_0x52e1d7[_0x5bef('0x18')]['include']?_['map'](_0x52e1d7[_0x5bef('0x18')][_0x5bef('0x1c')],function(_0x536dee){return{'model':db[_0x536dee[_0x5bef('0x1d')]],'as':_0x536dee['as'],'attributes':_0x536dee[_0x5bef('0x1a')],'include':_0x536dee['include']?_['map'](_0x536dee['include'],function(_0x4861c4){return{'model':db[_0x4861c4[_0x5bef('0x1d')]],'as':_0x4861c4['as'],'attributes':_0x4861c4['attributes'],'include':_0x4861c4[_0x5bef('0x1c')]?_[_0x5bef('0x1e')](_0x4861c4[_0x5bef('0x1c')],function(_0x21aa9c){return{'model':db[_0x21aa9c[_0x5bef('0x1d')]],'as':_0x21aa9c['as'],'attributes':_0x21aa9c[_0x5bef('0x1a')]};}):[]};}):[]};}):[]:[]})[_0x5bef('0xc')](function(_0xe68126){logger['info'](_0x5bef('0x15'),_0x52e1d7);logger[_0x5bef('0xf')](_0x5bef('0x15'),_0x52e1d7,JSON[_0x5bef('0x11')](_0xe68126));_0x3030aa(_0xe68126);})[_0x5bef('0x1f')](function(_0x5cc798){logger[_0x5bef('0x12')]('GetZendeskAccount',_0x5cc798[_0x5bef('0x13')],_0x52e1d7);_0x338791(_0x423a3f[_0x5bef('0x12')](0x1f4,_0x5cc798['message']));});});};exports['ShowZendeskAccount']=function(_0x193c59){var _0x20aff7=this;return new Promise(function(_0x40f514,_0x3a1f93){return db['ZendeskAccount'][_0x5bef('0x20')]({'raw':_0x193c59[_0x5bef('0x18')]?_0x193c59[_0x5bef('0x18')][_0x5bef('0x21')]===undefined?!![]:![]:!![],'where':_0x193c59[_0x5bef('0x18')]?_0x193c59[_0x5bef('0x18')][_0x5bef('0x19')]||null:null,'attributes':_0x193c59['options']?_0x193c59[_0x5bef('0x18')][_0x5bef('0x1a')]||null:null,'include':_0x193c59[_0x5bef('0x18')]?_0x193c59[_0x5bef('0x18')][_0x5bef('0x1c')]?_['map'](_0x193c59[_0x5bef('0x18')][_0x5bef('0x1c')],function(_0x3d2ece){return{'model':db[_0x3d2ece[_0x5bef('0x1d')]],'as':_0x3d2ece['as'],'attributes':_0x3d2ece[_0x5bef('0x1a')],'include':_0x3d2ece[_0x5bef('0x1c')]?_[_0x5bef('0x1e')](_0x3d2ece[_0x5bef('0x1c')],function(_0x4520d5){return{'model':db[_0x4520d5[_0x5bef('0x1d')]],'as':_0x4520d5['as'],'attributes':_0x4520d5[_0x5bef('0x1a')],'include':_0x4520d5['include']?_[_0x5bef('0x1e')](_0x4520d5[_0x5bef('0x1c')],function(_0x73cf65){return{'model':db[_0x73cf65[_0x5bef('0x1d')]],'as':_0x73cf65['as'],'attributes':_0x73cf65[_0x5bef('0x1a')]};}):[]};}):[]};}):[]:[]})[_0x5bef('0xc')](function(_0x9498e0){logger[_0x5bef('0x22')]('ShowZendeskAccount',_0x193c59);logger['debug'](_0x5bef('0x23'),_0x193c59,JSON[_0x5bef('0x11')](_0x9498e0));_0x40f514(_0x9498e0);})['catch'](function(_0x1c10b8){logger['error']('ShowZendeskAccount',_0x1c10b8[_0x5bef('0x13')],_0x193c59);_0x3a1f93(_0x20aff7[_0x5bef('0x12')](0x1f4,_0x1c10b8['message']));});});}; \ No newline at end of file +var _0xc794=['request','info','ZendeskAccount,\x20%s,\x20%s','request\x20sent','ZendeskAccount,\x20%s,\x20%s,\x20%s','stringify','error','code','message','catch','GetZendeskAccount','ZendeskAccount','findAll','options','where','attributes','limit','include','map','model','then','debug','ShowZendeskAccount','find','raw','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','jayson/promise','client','http'];(function(_0x472072,_0x5add18){var _0x38ca35=function(_0x197592){while(--_0x197592){_0x472072['push'](_0x472072['shift']());}};_0x38ca35(++_0x5add18);}(_0xc794,0x141));var _0x4c79=function(_0x16963b,_0x5a7432){_0x16963b=_0x16963b-0x0;var _0x15cc6a=_0xc794[_0x16963b];return _0x15cc6a;};'use strict';var _=require('lodash');var util=require(_0x4c79('0x0'));var moment=require(_0x4c79('0x1'));var BPromise=require(_0x4c79('0x2'));var rs=require(_0x4c79('0x3'));var fs=require('fs');var Redis=require(_0x4c79('0x4'));var db=require(_0x4c79('0x5'))['db'];var utils=require(_0x4c79('0x6'));var logger=require(_0x4c79('0x7'))(_0x4c79('0x8'));var config=require('../../config/environment');var jayson=require(_0x4c79('0x9'));var client=jayson[_0x4c79('0xa')][_0x4c79('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x24ace2,_0x5ccf1f,_0x177f8c){return new BPromise(function(_0x2f9547,_0x2747fb){return client[_0x4c79('0xc')](_0x24ace2,_0x177f8c)['then'](function(_0x2c7910){logger[_0x4c79('0xd')](_0x4c79('0xe'),_0x5ccf1f,_0x4c79('0xf'));logger['debug'](_0x4c79('0x10'),_0x5ccf1f,_0x4c79('0xf'),JSON[_0x4c79('0x11')](_0x2c7910));if(_0x2c7910['error']){if(_0x2c7910[_0x4c79('0x12')][_0x4c79('0x13')]===0x1f4){logger['error']('ZendeskAccount,\x20%s,\x20%s',_0x5ccf1f,_0x2c7910[_0x4c79('0x12')][_0x4c79('0x14')]);return _0x2747fb(_0x2c7910[_0x4c79('0x12')][_0x4c79('0x14')]);}logger[_0x4c79('0x12')](_0x4c79('0xe'),_0x5ccf1f,_0x2c7910['error'][_0x4c79('0x14')]);return _0x2f9547(_0x2c7910[_0x4c79('0x12')][_0x4c79('0x14')]);}else{logger[_0x4c79('0xd')](_0x4c79('0xe'),_0x5ccf1f,_0x4c79('0xf'));_0x2f9547(_0x2c7910['result'][_0x4c79('0x14')]);}})[_0x4c79('0x15')](function(_0x121370){logger['error'](_0x4c79('0xe'),_0x5ccf1f,_0x121370);_0x2747fb(_0x121370);});});}exports[_0x4c79('0x16')]=function(_0x12e9af){var _0x11c45b=this;return new Promise(function(_0x584754,_0x3e4548){return db[_0x4c79('0x17')][_0x4c79('0x18')]({'raw':_0x12e9af[_0x4c79('0x19')]?_0x12e9af['options']['raw']===undefined?!![]:![]:!![],'where':_0x12e9af[_0x4c79('0x19')]?_0x12e9af[_0x4c79('0x19')][_0x4c79('0x1a')]||null:null,'attributes':_0x12e9af[_0x4c79('0x19')]?_0x12e9af[_0x4c79('0x19')][_0x4c79('0x1b')]||null:null,'limit':_0x12e9af[_0x4c79('0x19')]?_0x12e9af[_0x4c79('0x19')][_0x4c79('0x1c')]||null:null,'include':_0x12e9af[_0x4c79('0x19')]?_0x12e9af[_0x4c79('0x19')][_0x4c79('0x1d')]?_[_0x4c79('0x1e')](_0x12e9af[_0x4c79('0x19')][_0x4c79('0x1d')],function(_0x1e25ce){return{'model':db[_0x1e25ce[_0x4c79('0x1f')]],'as':_0x1e25ce['as'],'attributes':_0x1e25ce[_0x4c79('0x1b')],'include':_0x1e25ce['include']?_['map'](_0x1e25ce[_0x4c79('0x1d')],function(_0xa0c16c){return{'model':db[_0xa0c16c[_0x4c79('0x1f')]],'as':_0xa0c16c['as'],'attributes':_0xa0c16c[_0x4c79('0x1b')],'include':_0xa0c16c[_0x4c79('0x1d')]?_['map'](_0xa0c16c[_0x4c79('0x1d')],function(_0x3cfc37){return{'model':db[_0x3cfc37['model']],'as':_0x3cfc37['as'],'attributes':_0x3cfc37[_0x4c79('0x1b')]};}):[]};}):[]};}):[]:[]})[_0x4c79('0x20')](function(_0x45b0d8){logger[_0x4c79('0xd')]('GetZendeskAccount',_0x12e9af);logger[_0x4c79('0x21')](_0x4c79('0x16'),_0x12e9af,JSON[_0x4c79('0x11')](_0x45b0d8));_0x584754(_0x45b0d8);})[_0x4c79('0x15')](function(_0x3923a9){logger[_0x4c79('0x12')](_0x4c79('0x16'),_0x3923a9[_0x4c79('0x14')],_0x12e9af);_0x3e4548(_0x11c45b[_0x4c79('0x12')](0x1f4,_0x3923a9[_0x4c79('0x14')]));});});};exports[_0x4c79('0x22')]=function(_0xa1b0c5){var _0x5a7d7c=this;return new Promise(function(_0xf80c22,_0x186cba){return db[_0x4c79('0x17')][_0x4c79('0x23')]({'raw':_0xa1b0c5[_0x4c79('0x19')]?_0xa1b0c5['options'][_0x4c79('0x24')]===undefined?!![]:![]:!![],'where':_0xa1b0c5[_0x4c79('0x19')]?_0xa1b0c5[_0x4c79('0x19')][_0x4c79('0x1a')]||null:null,'attributes':_0xa1b0c5[_0x4c79('0x19')]?_0xa1b0c5[_0x4c79('0x19')]['attributes']||null:null,'include':_0xa1b0c5[_0x4c79('0x19')]?_0xa1b0c5['options'][_0x4c79('0x1d')]?_['map'](_0xa1b0c5[_0x4c79('0x19')][_0x4c79('0x1d')],function(_0x2f7e60){return{'model':db[_0x2f7e60['model']],'as':_0x2f7e60['as'],'attributes':_0x2f7e60[_0x4c79('0x1b')],'include':_0x2f7e60['include']?_[_0x4c79('0x1e')](_0x2f7e60[_0x4c79('0x1d')],function(_0x250aca){return{'model':db[_0x250aca['model']],'as':_0x250aca['as'],'attributes':_0x250aca[_0x4c79('0x1b')],'include':_0x250aca['include']?_[_0x4c79('0x1e')](_0x250aca[_0x4c79('0x1d')],function(_0x29e827){return{'model':db[_0x29e827[_0x4c79('0x1f')]],'as':_0x29e827['as'],'attributes':_0x29e827[_0x4c79('0x1b')]};}):[]};}):[]};}):[]:[]})[_0x4c79('0x20')](function(_0x3d3076){logger[_0x4c79('0xd')]('ShowZendeskAccount',_0xa1b0c5);logger[_0x4c79('0x21')](_0x4c79('0x22'),_0xa1b0c5,JSON[_0x4c79('0x11')](_0x3d3076));_0xf80c22(_0x3d3076);})[_0x4c79('0x15')](function(_0x32949c){logger[_0x4c79('0x12')](_0x4c79('0x22'),_0x32949c[_0x4c79('0x14')],_0xa1b0c5);_0x186cba(_0x5a7d7c[_0x4c79('0x12')](0x1f4,_0x32949c[_0x4c79('0x14')]));});});}; \ No newline at end of file diff --git a/server/api/intZendeskConfiguration/index.js b/server/api/intZendeskConfiguration/index.js index 648908e..c3af703 100644 --- a/server/api/intZendeskConfiguration/index.js +++ b/server/api/intZendeskConfiguration/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x4483=['getSubjects','/:id/descriptions','getDescriptions','getTags','post','create','/:id/tags','setTags','put','update','delete','destroy','exports','multer','util','path','express','Router','fs-extra','../../components/auth/service','../../components/interaction/service','./intZendeskConfiguration.controller','get','isAuthenticated','index','/:id','show','getFields','/:id/subjects'];(function(_0x331e77,_0x114123){var _0x5b1b95=function(_0x1691ae){while(--_0x1691ae){_0x331e77['push'](_0x331e77['shift']());}};_0x5b1b95(++_0x114123);}(_0x4483,0x1a3));var _0x3448=function(_0x339e1f,_0xf33032){_0x339e1f=_0x339e1f-0x0;var _0x30a09c=_0x4483[_0x339e1f];return _0x30a09c;};'use strict';var multer=require(_0x3448('0x0'));var util=require(_0x3448('0x1'));var path=require(_0x3448('0x2'));var timeout=require('connect-timeout');var express=require(_0x3448('0x3'));var router=express[_0x3448('0x4')]();var fs_extra=require(_0x3448('0x5'));var auth=require(_0x3448('0x6'));var interaction=require(_0x3448('0x7'));var config=require('../../config/environment');var controller=require(_0x3448('0x8'));router[_0x3448('0x9')]('/',auth[_0x3448('0xa')](),controller[_0x3448('0xb')]);router[_0x3448('0x9')](_0x3448('0xc'),auth[_0x3448('0xa')](),controller[_0x3448('0xd')]);router['get']('/:id/fields',auth[_0x3448('0xa')](),controller[_0x3448('0xe')]);router[_0x3448('0x9')](_0x3448('0xf'),auth[_0x3448('0xa')](),controller[_0x3448('0x10')]);router[_0x3448('0x9')](_0x3448('0x11'),auth[_0x3448('0xa')](),controller[_0x3448('0x12')]);router[_0x3448('0x9')]('/:id/tags',auth['isAuthenticated'](),controller[_0x3448('0x13')]);router[_0x3448('0x14')]('/',auth['isAuthenticated'](),controller[_0x3448('0x15')]);router[_0x3448('0x14')](_0x3448('0x16'),auth['isAuthenticated'](),controller[_0x3448('0x17')]);router[_0x3448('0x18')]('/:id',auth[_0x3448('0xa')](),controller[_0x3448('0x19')]);router[_0x3448('0x1a')]('/:id',auth[_0x3448('0xa')](),controller[_0x3448('0x1b')]);module[_0x3448('0x1c')]=router; \ No newline at end of file +var _0x5c00=['path','express','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','get','isAuthenticated','index','show','getFields','/:id/subjects','getSubjects','/:id/tags','post','create','setTags','put','/:id','delete','destroy','exports','multer','util'];(function(_0x4ca645,_0x11e071){var _0xe5e86e=function(_0x1c8abe){while(--_0x1c8abe){_0x4ca645['push'](_0x4ca645['shift']());}};_0xe5e86e(++_0x11e071);}(_0x5c00,0x17e));var _0x05c0=function(_0x95975e,_0x51412c){_0x95975e=_0x95975e-0x0;var _0x5d4933=_0x5c00[_0x95975e];return _0x5d4933;};'use strict';var multer=require(_0x05c0('0x0'));var util=require(_0x05c0('0x1'));var path=require(_0x05c0('0x2'));var timeout=require('connect-timeout');var express=require(_0x05c0('0x3'));var router=express['Router']();var fs_extra=require(_0x05c0('0x4'));var auth=require(_0x05c0('0x5'));var interaction=require(_0x05c0('0x6'));var config=require(_0x05c0('0x7'));var controller=require('./intZendeskConfiguration.controller');router[_0x05c0('0x8')]('/',auth[_0x05c0('0x9')](),controller[_0x05c0('0xa')]);router[_0x05c0('0x8')]('/:id',auth[_0x05c0('0x9')](),controller[_0x05c0('0xb')]);router[_0x05c0('0x8')]('/:id/fields',auth[_0x05c0('0x9')](),controller[_0x05c0('0xc')]);router[_0x05c0('0x8')](_0x05c0('0xd'),auth[_0x05c0('0x9')](),controller[_0x05c0('0xe')]);router['get']('/:id/descriptions',auth[_0x05c0('0x9')](),controller['getDescriptions']);router[_0x05c0('0x8')](_0x05c0('0xf'),auth[_0x05c0('0x9')](),controller['getTags']);router[_0x05c0('0x10')]('/',auth['isAuthenticated'](),controller[_0x05c0('0x11')]);router[_0x05c0('0x10')](_0x05c0('0xf'),auth[_0x05c0('0x9')](),controller[_0x05c0('0x12')]);router[_0x05c0('0x13')](_0x05c0('0x14'),auth[_0x05c0('0x9')](),controller['update']);router[_0x05c0('0x15')](_0x05c0('0x14'),auth[_0x05c0('0x9')](),controller[_0x05c0('0x16')]);module[_0x05c0('0x17')]=router; \ No newline at end of file diff --git a/server/api/intZendeskConfiguration/intZendeskConfiguration.attributes.js b/server/api/intZendeskConfiguration/intZendeskConfiguration.attributes.js index c2f0e5e..6b0cd39 100644 --- a/server/api/intZendeskConfiguration/intZendeskConfiguration.attributes.js +++ b/server/api/intZendeskConfiguration/intZendeskConfiguration.attributes.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xca84=['STRING','exports'];(function(_0xe1f9f0,_0x426702){var _0x24a6c9=function(_0x1bc919){while(--_0x1bc919){_0xe1f9f0['push'](_0xe1f9f0['shift']());}};_0x24a6c9(++_0x426702);}(_0xca84,0x1a9));var _0x4ca8=function(_0x4a39cd,_0x5b148f){_0x4a39cd=_0x4a39cd-0x0;var _0x8c303c=_0xca84[_0x4a39cd];return _0x8c303c;};'use strict';var Sequelize=require('sequelize');module[_0x4ca8('0x0')]={'name':{'type':Sequelize[_0x4ca8('0x1')]},'description':{'type':Sequelize[_0x4ca8('0x1')]}}; \ No newline at end of file +var _0x7ebc=['exports','STRING','sequelize'];(function(_0x563252,_0x34ddcf){var _0x3edc4e=function(_0x849aa0){while(--_0x849aa0){_0x563252['push'](_0x563252['shift']());}};_0x3edc4e(++_0x34ddcf);}(_0x7ebc,0x140));var _0xc7eb=function(_0x1da527,_0x2dc953){_0x1da527=_0x1da527-0x0;var _0x40fc7c=_0x7ebc[_0x1da527];return _0x40fc7c;};'use strict';var Sequelize=require(_0xc7eb('0x0'));module[_0xc7eb('0x1')]={'name':{'type':Sequelize[_0xc7eb('0x2')]},'description':{'type':Sequelize['STRING']}}; \ No newline at end of file diff --git a/server/api/intZendeskConfiguration/intZendeskConfiguration.controller.js b/server/api/intZendeskConfiguration/intZendeskConfiguration.controller.js index c5719ad..0c8f5a6 100644 --- a/server/api/intZendeskConfiguration/intZendeskConfiguration.controller.js +++ b/server/api/intZendeskConfiguration/intZendeskConfiguration.controller.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xcbb6=['hasOwnProperty','order','sort','where','filters','pick','filter','merge','VIRTUAL','options','includeAll','include','findAll','rows','catch','show','params','find','create','body','destroy','findOne','ZendeskField','nolimit','getSubjects','getDescriptions','getTags','setTags','rimraf','zip-dir','fast-json-patch','request-promise','moment','mustache','path','to-csv','ejs','fs-extra','lodash','squel','crypto','jsforce','desk.js','querystring','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','api','../../config/utils','../../config/environment','../../mysqldb','sendStatus','status','json','offset','undefined','limit','count','set','Content-Range','apply','save','update','then','end','error','stack','name','index','map','ZendeskConfiguration','rawAttributes','fieldName','type','key','model','query','keys','intersection','attributes','fields','length'];(function(_0x44e112,_0x1382d1){var _0x2bce4e=function(_0x4db7a8){while(--_0x4db7a8){_0x44e112['push'](_0x44e112['shift']());}};_0x2bce4e(++_0x1382d1);}(_0xcbb6,0xc4));var _0x6cbb=function(_0x432682,_0x253044){_0x432682=_0x432682-0x0;var _0x463d05=_0xcbb6[_0x432682];return _0x463d05;};'use strict';var emlformat=require('eml-format');var rimraf=require(_0x6cbb('0x0'));var zipdir=require(_0x6cbb('0x1'));var jsonpatch=require(_0x6cbb('0x2'));var rp=require(_0x6cbb('0x3'));var moment=require(_0x6cbb('0x4'));var BPromise=require('bluebird');var Mustache=require(_0x6cbb('0x5'));var util=require('util');var path=require(_0x6cbb('0x6'));var sox=require('sox');var csv=require(_0x6cbb('0x7'));var ejs=require(_0x6cbb('0x8'));var fs=require('fs');var fs_extra=require(_0x6cbb('0x9'));var _=require(_0x6cbb('0xa'));var squel=require(_0x6cbb('0xb'));var crypto=require(_0x6cbb('0xc'));var jsforce=require(_0x6cbb('0xd'));var deskjs=require(_0x6cbb('0xe'));var toCsv=require(_0x6cbb('0x7'));var querystring=require(_0x6cbb('0xf'));var Papa=require('papaparse');var Redis=require(_0x6cbb('0x10'));var authService=require(_0x6cbb('0x11'));var qs=require(_0x6cbb('0x12'));var as=require(_0x6cbb('0x13'));var hardwareService=require(_0x6cbb('0x14'));var logger=require('../../config/logger')(_0x6cbb('0x15'));var utils=require(_0x6cbb('0x16'));var config=require(_0x6cbb('0x17'));var licenseUtil=require('../../config/license/util');var db=require(_0x6cbb('0x18'))['db'];function respondWithStatusCode(_0xb1a02a,_0x463089){_0x463089=_0x463089||0xcc;return function(_0x4e3408){if(_0x4e3408){return _0xb1a02a[_0x6cbb('0x19')](_0x463089);}return _0xb1a02a[_0x6cbb('0x1a')](_0x463089)['end']();};}function respondWithResult(_0x3375c5,_0x453f75){_0x453f75=_0x453f75||0xc8;return function(_0x294f91){if(_0x294f91){return _0x3375c5[_0x6cbb('0x1a')](_0x453f75)[_0x6cbb('0x1b')](_0x294f91);}};}function respondWithFilteredResult(_0x5d0616,_0x2fd453){return function(_0x1247bf){if(_0x1247bf){var _0x15c954=typeof _0x2fd453[_0x6cbb('0x1c')]===_0x6cbb('0x1d')&&typeof _0x2fd453[_0x6cbb('0x1e')]==='undefined';var _0x5c65e8=_0x1247bf[_0x6cbb('0x1f')];var _0x157844=_0x15c954?0x0:_0x2fd453[_0x6cbb('0x1c')];var _0x216f7a=_0x15c954?_0x1247bf['count']:_0x2fd453[_0x6cbb('0x1c')]+_0x2fd453[_0x6cbb('0x1e')];var _0x506bc9;if(_0x216f7a>=_0x5c65e8){_0x216f7a=_0x5c65e8;_0x506bc9=0xc8;}else{_0x506bc9=0xce;}_0x5d0616[_0x6cbb('0x1a')](_0x506bc9);return _0x5d0616[_0x6cbb('0x20')](_0x6cbb('0x21'),_0x157844+'-'+_0x216f7a+'/'+_0x5c65e8)[_0x6cbb('0x1b')](_0x1247bf);}return null;};}function patchUpdates(_0xf7e4b8){return function(_0x5710de){try{jsonpatch[_0x6cbb('0x22')](_0x5710de,_0xf7e4b8,!![]);}catch(_0x53c257){return BPromise['reject'](_0x53c257);}return _0x5710de[_0x6cbb('0x23')]();};}function saveUpdates(_0x5c40b5,_0x11f971){return function(_0x4410a9){if(_0x4410a9){return _0x4410a9[_0x6cbb('0x24')](_0x5c40b5)[_0x6cbb('0x25')](function(_0x4d3ea7){return _0x4d3ea7;});}return null;};}function removeEntity(_0xeb27a2,_0x1b1668){return function(_0x545e08){if(_0x545e08){return _0x545e08['destroy']()['then'](function(){_0xeb27a2['status'](0xcc)[_0x6cbb('0x26')]();});}};}function handleEntityNotFound(_0x35af0f,_0xfe6535){return function(_0x5e24c4){if(!_0x5e24c4){_0x35af0f[_0x6cbb('0x19')](0x194);}return _0x5e24c4;};}function handleError(_0x555268,_0x5d6392){_0x5d6392=_0x5d6392||0x1f4;return function(_0x52888a){logger[_0x6cbb('0x27')](_0x52888a[_0x6cbb('0x28')]);if(_0x52888a[_0x6cbb('0x29')]){delete _0x52888a[_0x6cbb('0x29')];}_0x555268[_0x6cbb('0x1a')](_0x5d6392)['send'](_0x52888a);};}exports[_0x6cbb('0x2a')]=function(_0x1a2e53,_0x4aafb9){var _0x143c41={},_0x4a0d6d={},_0x42e232={'count':0x0,'rows':[]};var _0x14b009=_[_0x6cbb('0x2b')](db[_0x6cbb('0x2c')][_0x6cbb('0x2d')],function(_0x450d7a){return{'name':_0x450d7a[_0x6cbb('0x2e')],'type':_0x450d7a[_0x6cbb('0x2f')][_0x6cbb('0x30')]};});_0x4a0d6d[_0x6cbb('0x31')]=_[_0x6cbb('0x2b')](_0x14b009,_0x6cbb('0x29'));_0x4a0d6d[_0x6cbb('0x32')]=_[_0x6cbb('0x33')](_0x1a2e53[_0x6cbb('0x32')]);_0x4a0d6d['filters']=_[_0x6cbb('0x34')](_0x4a0d6d[_0x6cbb('0x31')],_0x4a0d6d[_0x6cbb('0x32')]);_0x143c41[_0x6cbb('0x35')]=_[_0x6cbb('0x34')](_0x4a0d6d[_0x6cbb('0x31')],qs[_0x6cbb('0x36')](_0x1a2e53[_0x6cbb('0x32')]['fields']));_0x143c41[_0x6cbb('0x35')]=_0x143c41['attributes'][_0x6cbb('0x37')]?_0x143c41['attributes']:_0x4a0d6d[_0x6cbb('0x31')];if(!_0x1a2e53[_0x6cbb('0x32')][_0x6cbb('0x38')]('nolimit')){_0x143c41['limit']=qs[_0x6cbb('0x1e')](_0x1a2e53[_0x6cbb('0x32')][_0x6cbb('0x1e')]);_0x143c41[_0x6cbb('0x1c')]=qs[_0x6cbb('0x1c')](_0x1a2e53[_0x6cbb('0x32')][_0x6cbb('0x1c')]);}_0x143c41[_0x6cbb('0x39')]=qs[_0x6cbb('0x3a')](_0x1a2e53[_0x6cbb('0x32')][_0x6cbb('0x3a')]);_0x143c41[_0x6cbb('0x3b')]=qs[_0x6cbb('0x3c')](_[_0x6cbb('0x3d')](_0x1a2e53[_0x6cbb('0x32')],_0x4a0d6d[_0x6cbb('0x3c')]),_0x14b009);if(_0x1a2e53[_0x6cbb('0x32')][_0x6cbb('0x3e')]){_0x143c41[_0x6cbb('0x3b')]=_[_0x6cbb('0x3f')](_0x143c41[_0x6cbb('0x3b')],{'$or':_[_0x6cbb('0x2b')](_0x14b009,function(_0x2ca3b9){if(_0x2ca3b9['type']!==_0x6cbb('0x40')){var _0xe44d7f={};_0xe44d7f[_0x2ca3b9[_0x6cbb('0x29')]]={'$like':'%'+_0x1a2e53['query'][_0x6cbb('0x3e')]+'%'};return _0xe44d7f;}})});}_0x143c41=_[_0x6cbb('0x3f')]({},_0x143c41,_0x1a2e53[_0x6cbb('0x41')]);var _0x525c39={'where':_0x143c41[_0x6cbb('0x3b')]};return db[_0x6cbb('0x2c')]['count'](_0x525c39)[_0x6cbb('0x25')](function(_0x4e6b4a){_0x42e232[_0x6cbb('0x1f')]=_0x4e6b4a;if(_0x1a2e53[_0x6cbb('0x32')][_0x6cbb('0x42')]){_0x143c41[_0x6cbb('0x43')]=[{'all':!![]}];}return db[_0x6cbb('0x2c')][_0x6cbb('0x44')](_0x143c41);})[_0x6cbb('0x25')](function(_0x23418e){_0x42e232[_0x6cbb('0x45')]=_0x23418e;return _0x42e232;})[_0x6cbb('0x25')](respondWithFilteredResult(_0x4aafb9,_0x143c41))[_0x6cbb('0x46')](handleError(_0x4aafb9,null));};exports[_0x6cbb('0x47')]=function(_0x5d49c8,_0x5cf384){var _0x5d0228={'raw':![],'where':{'id':_0x5d49c8[_0x6cbb('0x48')]['id']}},_0x162175={};_0x162175['model']=_['keys'](db['ZendeskConfiguration'][_0x6cbb('0x2d')]);_0x162175[_0x6cbb('0x32')]=_[_0x6cbb('0x33')](_0x5d49c8[_0x6cbb('0x32')]);_0x162175['filters']=_['intersection'](_0x162175['model'],_0x162175[_0x6cbb('0x32')]);_0x5d0228[_0x6cbb('0x35')]=_[_0x6cbb('0x34')](_0x162175[_0x6cbb('0x31')],qs[_0x6cbb('0x36')](_0x5d49c8[_0x6cbb('0x32')][_0x6cbb('0x36')]));_0x5d0228[_0x6cbb('0x35')]=_0x5d0228[_0x6cbb('0x35')][_0x6cbb('0x37')]?_0x5d0228[_0x6cbb('0x35')]:_0x162175[_0x6cbb('0x31')];if(_0x5d49c8[_0x6cbb('0x32')]['includeAll']){_0x5d0228[_0x6cbb('0x43')]=[{'all':!![]}];}_0x5d0228=_[_0x6cbb('0x3f')]({},_0x5d0228,_0x5d49c8[_0x6cbb('0x41')]);return db[_0x6cbb('0x2c')][_0x6cbb('0x49')](_0x5d0228)[_0x6cbb('0x25')](handleEntityNotFound(_0x5cf384,null))[_0x6cbb('0x25')](respondWithResult(_0x5cf384,null))['catch'](handleError(_0x5cf384,null));};exports[_0x6cbb('0x4a')]=function(_0x2ad411,_0x346c9f){return db['ZendeskConfiguration']['create'](_0x2ad411[_0x6cbb('0x4b')],{})[_0x6cbb('0x25')](respondWithResult(_0x346c9f,0xc9))[_0x6cbb('0x46')](handleError(_0x346c9f,null));};exports[_0x6cbb('0x24')]=function(_0x4236ac,_0x310079){if(_0x4236ac[_0x6cbb('0x4b')]['id']){delete _0x4236ac['body']['id'];}return db[_0x6cbb('0x2c')][_0x6cbb('0x49')]({'where':{'id':_0x4236ac[_0x6cbb('0x48')]['id']}})[_0x6cbb('0x25')](handleEntityNotFound(_0x310079,null))[_0x6cbb('0x25')](saveUpdates(_0x4236ac[_0x6cbb('0x4b')],null))['then'](respondWithResult(_0x310079,null))[_0x6cbb('0x46')](handleError(_0x310079,null));};exports[_0x6cbb('0x4c')]=function(_0x117497,_0x151a20){return db[_0x6cbb('0x2c')]['find']({'where':{'id':_0x117497[_0x6cbb('0x48')]['id']}})['then'](handleEntityNotFound(_0x151a20,null))[_0x6cbb('0x25')](removeEntity(_0x151a20,null))[_0x6cbb('0x46')](handleError(_0x151a20,null));};exports['getFields']=function(_0x2858e8,_0x49d83a,_0x370c54){var _0x46ff5a={};var _0x20310f={};var _0x87f404;var _0x91a6aa;return db['ZendeskConfiguration'][_0x6cbb('0x4d')]({'where':{'id':_0x2858e8['params']['id']}})['then'](handleEntityNotFound(_0x49d83a,null))['then'](function(_0x10ba90){if(_0x10ba90){_0x87f404=_0x10ba90;_0x20310f[_0x6cbb('0x31')]=_['keys'](db[_0x6cbb('0x4e')]['rawAttributes']);_0x20310f[_0x6cbb('0x32')]=_[_0x6cbb('0x33')](_0x2858e8['query']);_0x20310f[_0x6cbb('0x3c')]=_[_0x6cbb('0x34')](_0x20310f[_0x6cbb('0x31')],_0x20310f['query']);_0x46ff5a['attributes']=_['intersection'](_0x20310f[_0x6cbb('0x31')],qs['fields'](_0x2858e8[_0x6cbb('0x32')][_0x6cbb('0x36')]));_0x46ff5a[_0x6cbb('0x35')]=_0x46ff5a[_0x6cbb('0x35')][_0x6cbb('0x37')]?_0x46ff5a[_0x6cbb('0x35')]:_0x20310f[_0x6cbb('0x31')];_0x46ff5a[_0x6cbb('0x39')]=qs[_0x6cbb('0x3a')](_0x2858e8[_0x6cbb('0x32')][_0x6cbb('0x3a')]);_0x46ff5a[_0x6cbb('0x3b')]=qs[_0x6cbb('0x3c')](_[_0x6cbb('0x3d')](_0x2858e8[_0x6cbb('0x32')],_0x20310f[_0x6cbb('0x3c')]));if(_0x2858e8[_0x6cbb('0x32')][_0x6cbb('0x3e')]){_0x46ff5a['where']=_['merge'](_0x46ff5a[_0x6cbb('0x3b')],{'$or':_[_0x6cbb('0x2b')](_0x46ff5a[_0x6cbb('0x35')],function(_0x11bbc4){var _0x53ae12={};_0x53ae12[_0x11bbc4]={'$like':'%'+_0x2858e8[_0x6cbb('0x32')][_0x6cbb('0x3e')]+'%'};return _0x53ae12;})});}_0x46ff5a=_[_0x6cbb('0x3f')]({},_0x46ff5a,_0x2858e8['options']);return _0x87f404['getFields'](_0x46ff5a);}})[_0x6cbb('0x25')](function(_0x40055e){if(_0x40055e){_0x91a6aa=_0x40055e['length'];if(!_0x2858e8[_0x6cbb('0x32')]['hasOwnProperty'](_0x6cbb('0x4f'))){_0x46ff5a[_0x6cbb('0x1e')]=qs[_0x6cbb('0x1e')](_0x2858e8[_0x6cbb('0x32')]['limit']);_0x46ff5a['offset']=qs[_0x6cbb('0x1c')](_0x2858e8[_0x6cbb('0x32')][_0x6cbb('0x1c')]);}return _0x87f404['getFields'](_0x46ff5a);}})[_0x6cbb('0x25')](function(_0x59f2d1){if(_0x59f2d1){return _0x59f2d1?{'count':_0x91a6aa,'rows':_0x59f2d1}:null;}})[_0x6cbb('0x25')](respondWithResult(_0x49d83a,null))[_0x6cbb('0x46')](handleError(_0x49d83a,null));};exports[_0x6cbb('0x50')]=function(_0x495e95,_0x3dd4b1,_0x11f321){var _0x51dc5e={};var _0x41c26a={};var _0x4c1197;var _0x1102c1;return db[_0x6cbb('0x2c')]['findOne']({'where':{'id':_0x495e95['params']['id']}})[_0x6cbb('0x25')](handleEntityNotFound(_0x3dd4b1,null))[_0x6cbb('0x25')](function(_0x276879){if(_0x276879){_0x4c1197=_0x276879;_0x41c26a[_0x6cbb('0x31')]=_[_0x6cbb('0x33')](db[_0x6cbb('0x4e')][_0x6cbb('0x2d')]);_0x41c26a[_0x6cbb('0x32')]=_[_0x6cbb('0x33')](_0x495e95[_0x6cbb('0x32')]);_0x41c26a[_0x6cbb('0x3c')]=_['intersection'](_0x41c26a[_0x6cbb('0x31')],_0x41c26a[_0x6cbb('0x32')]);_0x51dc5e[_0x6cbb('0x35')]=_[_0x6cbb('0x34')](_0x41c26a[_0x6cbb('0x31')],qs[_0x6cbb('0x36')](_0x495e95[_0x6cbb('0x32')]['fields']));_0x51dc5e[_0x6cbb('0x35')]=_0x51dc5e[_0x6cbb('0x35')][_0x6cbb('0x37')]?_0x51dc5e[_0x6cbb('0x35')]:_0x41c26a[_0x6cbb('0x31')];_0x51dc5e['order']=qs[_0x6cbb('0x3a')](_0x495e95[_0x6cbb('0x32')][_0x6cbb('0x3a')]);_0x51dc5e[_0x6cbb('0x3b')]=qs[_0x6cbb('0x3c')](_[_0x6cbb('0x3d')](_0x495e95['query'],_0x41c26a['filters']));if(_0x495e95[_0x6cbb('0x32')][_0x6cbb('0x3e')]){_0x51dc5e['where']=_['merge'](_0x51dc5e[_0x6cbb('0x3b')],{'$or':_[_0x6cbb('0x2b')](_0x51dc5e[_0x6cbb('0x35')],function(_0x1b4bc0){var _0x5e2af9={};_0x5e2af9[_0x1b4bc0]={'$like':'%'+_0x495e95[_0x6cbb('0x32')][_0x6cbb('0x3e')]+'%'};return _0x5e2af9;})});}_0x51dc5e=_[_0x6cbb('0x3f')]({},_0x51dc5e,_0x495e95['options']);return _0x4c1197[_0x6cbb('0x50')](_0x51dc5e);}})['then'](function(_0x2ea6d){if(_0x2ea6d){_0x1102c1=_0x2ea6d['length'];if(!_0x495e95['query'][_0x6cbb('0x38')](_0x6cbb('0x4f'))){_0x51dc5e[_0x6cbb('0x1e')]=qs[_0x6cbb('0x1e')](_0x495e95['query'][_0x6cbb('0x1e')]);_0x51dc5e['offset']=qs['offset'](_0x495e95['query'][_0x6cbb('0x1c')]);}return _0x4c1197[_0x6cbb('0x50')](_0x51dc5e);}})['then'](function(_0x3b108d){if(_0x3b108d){return _0x3b108d?{'count':_0x1102c1,'rows':_0x3b108d}:null;}})[_0x6cbb('0x25')](respondWithResult(_0x3dd4b1,null))[_0x6cbb('0x46')](handleError(_0x3dd4b1,null));};exports[_0x6cbb('0x51')]=function(_0x3d5122,_0xafbf26,_0x3a03f4){var _0x877649={};var _0x2dde82={};var _0x3822bd;var _0x41b3ca;return db['ZendeskConfiguration'][_0x6cbb('0x4d')]({'where':{'id':_0x3d5122[_0x6cbb('0x48')]['id']}})['then'](handleEntityNotFound(_0xafbf26,null))['then'](function(_0x9ce53a){if(_0x9ce53a){_0x3822bd=_0x9ce53a;_0x2dde82[_0x6cbb('0x31')]=_[_0x6cbb('0x33')](db[_0x6cbb('0x4e')][_0x6cbb('0x2d')]);_0x2dde82[_0x6cbb('0x32')]=_[_0x6cbb('0x33')](_0x3d5122[_0x6cbb('0x32')]);_0x2dde82[_0x6cbb('0x3c')]=_[_0x6cbb('0x34')](_0x2dde82[_0x6cbb('0x31')],_0x2dde82[_0x6cbb('0x32')]);_0x877649[_0x6cbb('0x35')]=_[_0x6cbb('0x34')](_0x2dde82[_0x6cbb('0x31')],qs['fields'](_0x3d5122[_0x6cbb('0x32')][_0x6cbb('0x36')]));_0x877649[_0x6cbb('0x35')]=_0x877649[_0x6cbb('0x35')][_0x6cbb('0x37')]?_0x877649[_0x6cbb('0x35')]:_0x2dde82['model'];_0x877649[_0x6cbb('0x39')]=qs[_0x6cbb('0x3a')](_0x3d5122[_0x6cbb('0x32')][_0x6cbb('0x3a')]);_0x877649['where']=qs[_0x6cbb('0x3c')](_[_0x6cbb('0x3d')](_0x3d5122[_0x6cbb('0x32')],_0x2dde82[_0x6cbb('0x3c')]));if(_0x3d5122[_0x6cbb('0x32')]['filter']){_0x877649[_0x6cbb('0x3b')]=_[_0x6cbb('0x3f')](_0x877649[_0x6cbb('0x3b')],{'$or':_[_0x6cbb('0x2b')](_0x877649[_0x6cbb('0x35')],function(_0x5e0b02){var _0x179d38={};_0x179d38[_0x5e0b02]={'$like':'%'+_0x3d5122[_0x6cbb('0x32')][_0x6cbb('0x3e')]+'%'};return _0x179d38;})});}_0x877649=_[_0x6cbb('0x3f')]({},_0x877649,_0x3d5122['options']);return _0x3822bd[_0x6cbb('0x51')](_0x877649);}})['then'](function(_0x5008f1){if(_0x5008f1){_0x41b3ca=_0x5008f1[_0x6cbb('0x37')];if(!_0x3d5122[_0x6cbb('0x32')]['hasOwnProperty'](_0x6cbb('0x4f'))){_0x877649[_0x6cbb('0x1e')]=qs[_0x6cbb('0x1e')](_0x3d5122[_0x6cbb('0x32')]['limit']);_0x877649[_0x6cbb('0x1c')]=qs[_0x6cbb('0x1c')](_0x3d5122['query'][_0x6cbb('0x1c')]);}return _0x3822bd[_0x6cbb('0x51')](_0x877649);}})['then'](function(_0x213f5e){if(_0x213f5e){return _0x213f5e?{'count':_0x41b3ca,'rows':_0x213f5e}:null;}})[_0x6cbb('0x25')](respondWithResult(_0xafbf26,null))[_0x6cbb('0x46')](handleError(_0xafbf26,null));};exports[_0x6cbb('0x52')]=function(_0x4a97e4,_0x2629df,_0xfea1be){var _0x56e08d={};var _0x1764b6={};var _0xe31c27;var _0xcae5d9;return db['ZendeskConfiguration'][_0x6cbb('0x4d')]({'where':{'id':_0x4a97e4['params']['id']}})['then'](handleEntityNotFound(_0x2629df,null))['then'](function(_0x1dbb94){if(_0x1dbb94){_0xe31c27=_0x1dbb94;_0x1764b6['model']=_[_0x6cbb('0x33')](db['Tag'][_0x6cbb('0x2d')]);_0x1764b6[_0x6cbb('0x32')]=_['keys'](_0x4a97e4['query']);_0x1764b6[_0x6cbb('0x3c')]=_[_0x6cbb('0x34')](_0x1764b6[_0x6cbb('0x31')],_0x1764b6[_0x6cbb('0x32')]);_0x56e08d[_0x6cbb('0x35')]=_[_0x6cbb('0x34')](_0x1764b6[_0x6cbb('0x31')],qs[_0x6cbb('0x36')](_0x4a97e4['query'][_0x6cbb('0x36')]));_0x56e08d[_0x6cbb('0x35')]=_0x56e08d[_0x6cbb('0x35')]['length']?_0x56e08d['attributes']:_0x1764b6['model'];_0x56e08d[_0x6cbb('0x39')]=qs[_0x6cbb('0x3a')](_0x4a97e4[_0x6cbb('0x32')][_0x6cbb('0x3a')]);_0x56e08d['where']=qs['filters'](_[_0x6cbb('0x3d')](_0x4a97e4[_0x6cbb('0x32')],_0x1764b6[_0x6cbb('0x3c')]));if(_0x4a97e4[_0x6cbb('0x32')][_0x6cbb('0x3e')]){_0x56e08d['where']=_[_0x6cbb('0x3f')](_0x56e08d['where'],{'$or':_[_0x6cbb('0x2b')](_0x56e08d['attributes'],function(_0x316fb6){var _0x453b26={};_0x453b26[_0x316fb6]={'$like':'%'+_0x4a97e4[_0x6cbb('0x32')][_0x6cbb('0x3e')]+'%'};return _0x453b26;})});}_0x56e08d=_[_0x6cbb('0x3f')]({},_0x56e08d,_0x4a97e4[_0x6cbb('0x41')]);return _0xe31c27[_0x6cbb('0x52')](_0x56e08d);}})['then'](function(_0x2202ab){if(_0x2202ab){_0xcae5d9=_0x2202ab['length'];if(!_0x4a97e4['query'][_0x6cbb('0x38')](_0x6cbb('0x4f'))){_0x56e08d[_0x6cbb('0x1e')]=qs['limit'](_0x4a97e4[_0x6cbb('0x32')][_0x6cbb('0x1e')]);_0x56e08d[_0x6cbb('0x1c')]=qs[_0x6cbb('0x1c')](_0x4a97e4[_0x6cbb('0x32')]['offset']);}return _0xe31c27['getTags'](_0x56e08d);}})[_0x6cbb('0x25')](function(_0x1e2446){if(_0x1e2446){return _0x1e2446?{'count':_0xcae5d9,'rows':_0x1e2446}:null;}})[_0x6cbb('0x25')](respondWithResult(_0x2629df,null))[_0x6cbb('0x46')](handleError(_0x2629df,null));};exports['setTags']=function(_0x19d799,_0x12b033,_0x1cf22f){if(_0x19d799[_0x6cbb('0x4b')]['id']){delete _0x19d799[_0x6cbb('0x4b')]['id'];}return db[_0x6cbb('0x2c')]['findOne']({'where':{'id':_0x19d799['params']['id']}})[_0x6cbb('0x25')](handleEntityNotFound(_0x12b033,null))[_0x6cbb('0x25')](function(_0x342eb0){if(_0x342eb0){return _0x342eb0[_0x6cbb('0x53')](_0x19d799['body']['ids']||[]);}return null;})['then'](respondWithResult(_0x12b033,null))[_0x6cbb('0x46')](handleError(_0x12b033,null));}; \ No newline at end of file +var _0x3fa4=['bluebird','mustache','util','path','sox','ejs','fs-extra','lodash','crypto','jsforce','desk.js','querystring','papaparse','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/environment','../../config/license/util','../../mysqldb','sendStatus','end','status','offset','undefined','limit','count','set','Content-Range','apply','reject','update','then','error','stack','name','send','index','map','ZendeskConfiguration','rawAttributes','fieldName','type','key','model','query','keys','filters','attributes','fields','nolimit','order','sort','where','pick','filter','merge','options','includeAll','include','catch','intersection','length','find','create','body','params','findOne','getFields','hasOwnProperty','getSubjects','ZendeskField','getDescriptions','getTags','Tag','setTags','ids','eml-format','request-promise','moment'];(function(_0x38c294,_0x580e77){var _0x3d5bdf=function(_0x38f330){while(--_0x38f330){_0x38c294['push'](_0x38c294['shift']());}};_0x3d5bdf(++_0x580e77);}(_0x3fa4,0xf0));var _0x43fa=function(_0x4ae837,_0x1a1ece){_0x4ae837=_0x4ae837-0x0;var _0x22b5da=_0x3fa4[_0x4ae837];return _0x22b5da;};'use strict';var emlformat=require(_0x43fa('0x0'));var rimraf=require('rimraf');var zipdir=require('zip-dir');var jsonpatch=require('fast-json-patch');var rp=require(_0x43fa('0x1'));var moment=require(_0x43fa('0x2'));var BPromise=require(_0x43fa('0x3'));var Mustache=require(_0x43fa('0x4'));var util=require(_0x43fa('0x5'));var path=require(_0x43fa('0x6'));var sox=require(_0x43fa('0x7'));var csv=require('to-csv');var ejs=require(_0x43fa('0x8'));var fs=require('fs');var fs_extra=require(_0x43fa('0x9'));var _=require(_0x43fa('0xa'));var squel=require('squel');var crypto=require(_0x43fa('0xb'));var jsforce=require(_0x43fa('0xc'));var deskjs=require(_0x43fa('0xd'));var toCsv=require('to-csv');var querystring=require(_0x43fa('0xe'));var Papa=require(_0x43fa('0xf'));var Redis=require('ioredis');var authService=require('../../components/auth/service');var qs=require(_0x43fa('0x10'));var as=require(_0x43fa('0x11'));var hardwareService=require(_0x43fa('0x12'));var logger=require(_0x43fa('0x13'))(_0x43fa('0x14'));var utils=require('../../config/utils');var config=require(_0x43fa('0x15'));var licenseUtil=require(_0x43fa('0x16'));var db=require(_0x43fa('0x17'))['db'];function respondWithStatusCode(_0x582ec2,_0xfbf89e){_0xfbf89e=_0xfbf89e||0xcc;return function(_0x4353c1){if(_0x4353c1){return _0x582ec2[_0x43fa('0x18')](_0xfbf89e);}return _0x582ec2['status'](_0xfbf89e)[_0x43fa('0x19')]();};}function respondWithResult(_0x4bb4b0,_0x5bc292){_0x5bc292=_0x5bc292||0xc8;return function(_0x4fba54){if(_0x4fba54){return _0x4bb4b0[_0x43fa('0x1a')](_0x5bc292)['json'](_0x4fba54);}};}function respondWithFilteredResult(_0x1a898a,_0x12ae9e){return function(_0x4a07b5){if(_0x4a07b5){var _0x27b87f=typeof _0x12ae9e[_0x43fa('0x1b')]===_0x43fa('0x1c')&&typeof _0x12ae9e[_0x43fa('0x1d')]===_0x43fa('0x1c');var _0x53c04c=_0x4a07b5['count'];var _0x479d81=_0x27b87f?0x0:_0x12ae9e[_0x43fa('0x1b')];var _0x29b8aa=_0x27b87f?_0x4a07b5[_0x43fa('0x1e')]:_0x12ae9e[_0x43fa('0x1b')]+_0x12ae9e[_0x43fa('0x1d')];var _0x15e594;if(_0x29b8aa>=_0x53c04c){_0x29b8aa=_0x53c04c;_0x15e594=0xc8;}else{_0x15e594=0xce;}_0x1a898a[_0x43fa('0x1a')](_0x15e594);return _0x1a898a[_0x43fa('0x1f')](_0x43fa('0x20'),_0x479d81+'-'+_0x29b8aa+'/'+_0x53c04c)['json'](_0x4a07b5);}return null;};}function patchUpdates(_0xfd8d3){return function(_0x551528){try{jsonpatch[_0x43fa('0x21')](_0x551528,_0xfd8d3,!![]);}catch(_0x319cfd){return BPromise[_0x43fa('0x22')](_0x319cfd);}return _0x551528['save']();};}function saveUpdates(_0x2c6075,_0x3c78fb){return function(_0x2db3dd){if(_0x2db3dd){return _0x2db3dd[_0x43fa('0x23')](_0x2c6075)[_0x43fa('0x24')](function(_0x1d3328){return _0x1d3328;});}return null;};}function removeEntity(_0x3b8cb9,_0x241948){return function(_0x427426){if(_0x427426){return _0x427426['destroy']()['then'](function(){_0x3b8cb9[_0x43fa('0x1a')](0xcc)[_0x43fa('0x19')]();});}};}function handleEntityNotFound(_0x28f695,_0x78f105){return function(_0x40969a){if(!_0x40969a){_0x28f695[_0x43fa('0x18')](0x194);}return _0x40969a;};}function handleError(_0x5014fb,_0x4f6101){_0x4f6101=_0x4f6101||0x1f4;return function(_0x1fa077){logger[_0x43fa('0x25')](_0x1fa077[_0x43fa('0x26')]);if(_0x1fa077[_0x43fa('0x27')]){delete _0x1fa077['name'];}_0x5014fb[_0x43fa('0x1a')](_0x4f6101)[_0x43fa('0x28')](_0x1fa077);};}exports[_0x43fa('0x29')]=function(_0x186249,_0x4d6c8c){var _0x3d5abd={},_0x44fdef={},_0x398c44={'count':0x0,'rows':[]};var _0x28b833=_[_0x43fa('0x2a')](db[_0x43fa('0x2b')][_0x43fa('0x2c')],function(_0x41a3cf){return{'name':_0x41a3cf[_0x43fa('0x2d')],'type':_0x41a3cf[_0x43fa('0x2e')][_0x43fa('0x2f')]};});_0x44fdef[_0x43fa('0x30')]=_['map'](_0x28b833,'name');_0x44fdef[_0x43fa('0x31')]=_[_0x43fa('0x32')](_0x186249[_0x43fa('0x31')]);_0x44fdef[_0x43fa('0x33')]=_['intersection'](_0x44fdef[_0x43fa('0x30')],_0x44fdef[_0x43fa('0x31')]);_0x3d5abd[_0x43fa('0x34')]=_['intersection'](_0x44fdef[_0x43fa('0x30')],qs[_0x43fa('0x35')](_0x186249[_0x43fa('0x31')][_0x43fa('0x35')]));_0x3d5abd['attributes']=_0x3d5abd[_0x43fa('0x34')]['length']?_0x3d5abd[_0x43fa('0x34')]:_0x44fdef[_0x43fa('0x30')];if(!_0x186249[_0x43fa('0x31')]['hasOwnProperty'](_0x43fa('0x36'))){_0x3d5abd['limit']=qs['limit'](_0x186249[_0x43fa('0x31')][_0x43fa('0x1d')]);_0x3d5abd[_0x43fa('0x1b')]=qs['offset'](_0x186249[_0x43fa('0x31')][_0x43fa('0x1b')]);}_0x3d5abd[_0x43fa('0x37')]=qs[_0x43fa('0x38')](_0x186249[_0x43fa('0x31')]['sort']);_0x3d5abd[_0x43fa('0x39')]=qs[_0x43fa('0x33')](_[_0x43fa('0x3a')](_0x186249[_0x43fa('0x31')],_0x44fdef['filters']),_0x28b833);if(_0x186249['query'][_0x43fa('0x3b')]){_0x3d5abd[_0x43fa('0x39')]=_[_0x43fa('0x3c')](_0x3d5abd[_0x43fa('0x39')],{'$or':_[_0x43fa('0x2a')](_0x28b833,function(_0x595d49){if(_0x595d49[_0x43fa('0x2e')]!=='VIRTUAL'){var _0x4cb1bd={};_0x4cb1bd[_0x595d49[_0x43fa('0x27')]]={'$like':'%'+_0x186249['query'][_0x43fa('0x3b')]+'%'};return _0x4cb1bd;}})});}_0x3d5abd=_[_0x43fa('0x3c')]({},_0x3d5abd,_0x186249[_0x43fa('0x3d')]);var _0x17403c={'where':_0x3d5abd['where']};return db['ZendeskConfiguration']['count'](_0x17403c)[_0x43fa('0x24')](function(_0x15ef49){_0x398c44['count']=_0x15ef49;if(_0x186249[_0x43fa('0x31')][_0x43fa('0x3e')]){_0x3d5abd[_0x43fa('0x3f')]=[{'all':!![]}];}return db[_0x43fa('0x2b')]['findAll'](_0x3d5abd);})[_0x43fa('0x24')](function(_0x23e156){_0x398c44['rows']=_0x23e156;return _0x398c44;})['then'](respondWithFilteredResult(_0x4d6c8c,_0x3d5abd))[_0x43fa('0x40')](handleError(_0x4d6c8c,null));};exports['show']=function(_0x3a6d39,_0x137ef){var _0x5cef1e={'raw':![],'where':{'id':_0x3a6d39['params']['id']}},_0x4735d1={};_0x4735d1[_0x43fa('0x30')]=_[_0x43fa('0x32')](db[_0x43fa('0x2b')]['rawAttributes']);_0x4735d1[_0x43fa('0x31')]=_[_0x43fa('0x32')](_0x3a6d39[_0x43fa('0x31')]);_0x4735d1[_0x43fa('0x33')]=_[_0x43fa('0x41')](_0x4735d1[_0x43fa('0x30')],_0x4735d1['query']);_0x5cef1e[_0x43fa('0x34')]=_['intersection'](_0x4735d1[_0x43fa('0x30')],qs['fields'](_0x3a6d39[_0x43fa('0x31')][_0x43fa('0x35')]));_0x5cef1e[_0x43fa('0x34')]=_0x5cef1e[_0x43fa('0x34')][_0x43fa('0x42')]?_0x5cef1e['attributes']:_0x4735d1[_0x43fa('0x30')];if(_0x3a6d39['query']['includeAll']){_0x5cef1e['include']=[{'all':!![]}];}_0x5cef1e=_[_0x43fa('0x3c')]({},_0x5cef1e,_0x3a6d39[_0x43fa('0x3d')]);return db[_0x43fa('0x2b')][_0x43fa('0x43')](_0x5cef1e)[_0x43fa('0x24')](handleEntityNotFound(_0x137ef,null))['then'](respondWithResult(_0x137ef,null))[_0x43fa('0x40')](handleError(_0x137ef,null));};exports[_0x43fa('0x44')]=function(_0x305e90,_0x19b0f0){return db[_0x43fa('0x2b')][_0x43fa('0x44')](_0x305e90[_0x43fa('0x45')],{})[_0x43fa('0x24')](respondWithResult(_0x19b0f0,0xc9))[_0x43fa('0x40')](handleError(_0x19b0f0,null));};exports[_0x43fa('0x23')]=function(_0x1ae6e0,_0x52d66f){if(_0x1ae6e0[_0x43fa('0x45')]['id']){delete _0x1ae6e0[_0x43fa('0x45')]['id'];}return db['ZendeskConfiguration'][_0x43fa('0x43')]({'where':{'id':_0x1ae6e0['params']['id']}})[_0x43fa('0x24')](handleEntityNotFound(_0x52d66f,null))[_0x43fa('0x24')](saveUpdates(_0x1ae6e0[_0x43fa('0x45')],null))[_0x43fa('0x24')](respondWithResult(_0x52d66f,null))[_0x43fa('0x40')](handleError(_0x52d66f,null));};exports['destroy']=function(_0x1bbae4,_0x4a24f1){return db[_0x43fa('0x2b')][_0x43fa('0x43')]({'where':{'id':_0x1bbae4[_0x43fa('0x46')]['id']}})['then'](handleEntityNotFound(_0x4a24f1,null))['then'](removeEntity(_0x4a24f1,null))[_0x43fa('0x40')](handleError(_0x4a24f1,null));};exports['getFields']=function(_0x2ca431,_0x574076,_0x518317){var _0x2228e0={};var _0x393842={};var _0x4c48b5;var _0x43f94c;return db[_0x43fa('0x2b')][_0x43fa('0x47')]({'where':{'id':_0x2ca431[_0x43fa('0x46')]['id']}})['then'](handleEntityNotFound(_0x574076,null))[_0x43fa('0x24')](function(_0x172c23){if(_0x172c23){_0x4c48b5=_0x172c23;_0x393842[_0x43fa('0x30')]=_[_0x43fa('0x32')](db['ZendeskField']['rawAttributes']);_0x393842[_0x43fa('0x31')]=_['keys'](_0x2ca431['query']);_0x393842['filters']=_[_0x43fa('0x41')](_0x393842[_0x43fa('0x30')],_0x393842[_0x43fa('0x31')]);_0x2228e0[_0x43fa('0x34')]=_[_0x43fa('0x41')](_0x393842[_0x43fa('0x30')],qs[_0x43fa('0x35')](_0x2ca431['query'][_0x43fa('0x35')]));_0x2228e0[_0x43fa('0x34')]=_0x2228e0['attributes'][_0x43fa('0x42')]?_0x2228e0['attributes']:_0x393842[_0x43fa('0x30')];_0x2228e0[_0x43fa('0x37')]=qs[_0x43fa('0x38')](_0x2ca431[_0x43fa('0x31')]['sort']);_0x2228e0['where']=qs[_0x43fa('0x33')](_[_0x43fa('0x3a')](_0x2ca431[_0x43fa('0x31')],_0x393842[_0x43fa('0x33')]));if(_0x2ca431['query']['filter']){_0x2228e0[_0x43fa('0x39')]=_['merge'](_0x2228e0[_0x43fa('0x39')],{'$or':_[_0x43fa('0x2a')](_0x2228e0[_0x43fa('0x34')],function(_0x33e439){var _0x50a1e9={};_0x50a1e9[_0x33e439]={'$like':'%'+_0x2ca431['query'][_0x43fa('0x3b')]+'%'};return _0x50a1e9;})});}_0x2228e0=_['merge']({},_0x2228e0,_0x2ca431[_0x43fa('0x3d')]);return _0x4c48b5[_0x43fa('0x48')](_0x2228e0);}})[_0x43fa('0x24')](function(_0x379a9b){if(_0x379a9b){_0x43f94c=_0x379a9b[_0x43fa('0x42')];if(!_0x2ca431[_0x43fa('0x31')][_0x43fa('0x49')]('nolimit')){_0x2228e0[_0x43fa('0x1d')]=qs[_0x43fa('0x1d')](_0x2ca431[_0x43fa('0x31')][_0x43fa('0x1d')]);_0x2228e0[_0x43fa('0x1b')]=qs['offset'](_0x2ca431[_0x43fa('0x31')][_0x43fa('0x1b')]);}return _0x4c48b5[_0x43fa('0x48')](_0x2228e0);}})[_0x43fa('0x24')](function(_0x78f0a9){if(_0x78f0a9){return _0x78f0a9?{'count':_0x43f94c,'rows':_0x78f0a9}:null;}})[_0x43fa('0x24')](respondWithResult(_0x574076,null))[_0x43fa('0x40')](handleError(_0x574076,null));};exports[_0x43fa('0x4a')]=function(_0xd06168,_0x5ac94a,_0x1395f4){var _0x25eb08={};var _0x2d8a01={};var _0x170dac;var _0x31fdeb;return db['ZendeskConfiguration']['findOne']({'where':{'id':_0xd06168[_0x43fa('0x46')]['id']}})[_0x43fa('0x24')](handleEntityNotFound(_0x5ac94a,null))[_0x43fa('0x24')](function(_0x1adb75){if(_0x1adb75){_0x170dac=_0x1adb75;_0x2d8a01[_0x43fa('0x30')]=_[_0x43fa('0x32')](db[_0x43fa('0x4b')][_0x43fa('0x2c')]);_0x2d8a01[_0x43fa('0x31')]=_[_0x43fa('0x32')](_0xd06168[_0x43fa('0x31')]);_0x2d8a01[_0x43fa('0x33')]=_[_0x43fa('0x41')](_0x2d8a01[_0x43fa('0x30')],_0x2d8a01[_0x43fa('0x31')]);_0x25eb08[_0x43fa('0x34')]=_[_0x43fa('0x41')](_0x2d8a01[_0x43fa('0x30')],qs[_0x43fa('0x35')](_0xd06168[_0x43fa('0x31')][_0x43fa('0x35')]));_0x25eb08[_0x43fa('0x34')]=_0x25eb08['attributes']['length']?_0x25eb08[_0x43fa('0x34')]:_0x2d8a01[_0x43fa('0x30')];_0x25eb08['order']=qs[_0x43fa('0x38')](_0xd06168['query'][_0x43fa('0x38')]);_0x25eb08['where']=qs[_0x43fa('0x33')](_[_0x43fa('0x3a')](_0xd06168[_0x43fa('0x31')],_0x2d8a01[_0x43fa('0x33')]));if(_0xd06168[_0x43fa('0x31')]['filter']){_0x25eb08[_0x43fa('0x39')]=_['merge'](_0x25eb08[_0x43fa('0x39')],{'$or':_[_0x43fa('0x2a')](_0x25eb08[_0x43fa('0x34')],function(_0x1619ae){var _0x195c8b={};_0x195c8b[_0x1619ae]={'$like':'%'+_0xd06168['query'][_0x43fa('0x3b')]+'%'};return _0x195c8b;})});}_0x25eb08=_[_0x43fa('0x3c')]({},_0x25eb08,_0xd06168['options']);return _0x170dac[_0x43fa('0x4a')](_0x25eb08);}})['then'](function(_0x258e00){if(_0x258e00){_0x31fdeb=_0x258e00[_0x43fa('0x42')];if(!_0xd06168['query'][_0x43fa('0x49')](_0x43fa('0x36'))){_0x25eb08[_0x43fa('0x1d')]=qs['limit'](_0xd06168['query'][_0x43fa('0x1d')]);_0x25eb08[_0x43fa('0x1b')]=qs[_0x43fa('0x1b')](_0xd06168[_0x43fa('0x31')]['offset']);}return _0x170dac[_0x43fa('0x4a')](_0x25eb08);}})['then'](function(_0x5b4308){if(_0x5b4308){return _0x5b4308?{'count':_0x31fdeb,'rows':_0x5b4308}:null;}})[_0x43fa('0x24')](respondWithResult(_0x5ac94a,null))[_0x43fa('0x40')](handleError(_0x5ac94a,null));};exports[_0x43fa('0x4c')]=function(_0x29e704,_0x2d7f8b,_0x13adec){var _0x4842b1={};var _0x3eca2f={};var _0x19d1bd;var _0x117181;return db['ZendeskConfiguration'][_0x43fa('0x47')]({'where':{'id':_0x29e704[_0x43fa('0x46')]['id']}})[_0x43fa('0x24')](handleEntityNotFound(_0x2d7f8b,null))['then'](function(_0x2e0331){if(_0x2e0331){_0x19d1bd=_0x2e0331;_0x3eca2f[_0x43fa('0x30')]=_['keys'](db['ZendeskField'][_0x43fa('0x2c')]);_0x3eca2f[_0x43fa('0x31')]=_[_0x43fa('0x32')](_0x29e704[_0x43fa('0x31')]);_0x3eca2f[_0x43fa('0x33')]=_[_0x43fa('0x41')](_0x3eca2f[_0x43fa('0x30')],_0x3eca2f[_0x43fa('0x31')]);_0x4842b1[_0x43fa('0x34')]=_[_0x43fa('0x41')](_0x3eca2f[_0x43fa('0x30')],qs[_0x43fa('0x35')](_0x29e704[_0x43fa('0x31')][_0x43fa('0x35')]));_0x4842b1[_0x43fa('0x34')]=_0x4842b1[_0x43fa('0x34')]['length']?_0x4842b1[_0x43fa('0x34')]:_0x3eca2f[_0x43fa('0x30')];_0x4842b1[_0x43fa('0x37')]=qs[_0x43fa('0x38')](_0x29e704['query'][_0x43fa('0x38')]);_0x4842b1['where']=qs['filters'](_['pick'](_0x29e704[_0x43fa('0x31')],_0x3eca2f['filters']));if(_0x29e704[_0x43fa('0x31')][_0x43fa('0x3b')]){_0x4842b1[_0x43fa('0x39')]=_[_0x43fa('0x3c')](_0x4842b1[_0x43fa('0x39')],{'$or':_['map'](_0x4842b1[_0x43fa('0x34')],function(_0x1d28b5){var _0x44b968={};_0x44b968[_0x1d28b5]={'$like':'%'+_0x29e704[_0x43fa('0x31')]['filter']+'%'};return _0x44b968;})});}_0x4842b1=_['merge']({},_0x4842b1,_0x29e704['options']);return _0x19d1bd['getDescriptions'](_0x4842b1);}})[_0x43fa('0x24')](function(_0x830a70){if(_0x830a70){_0x117181=_0x830a70[_0x43fa('0x42')];if(!_0x29e704['query'][_0x43fa('0x49')](_0x43fa('0x36'))){_0x4842b1[_0x43fa('0x1d')]=qs[_0x43fa('0x1d')](_0x29e704['query'][_0x43fa('0x1d')]);_0x4842b1[_0x43fa('0x1b')]=qs[_0x43fa('0x1b')](_0x29e704[_0x43fa('0x31')][_0x43fa('0x1b')]);}return _0x19d1bd[_0x43fa('0x4c')](_0x4842b1);}})[_0x43fa('0x24')](function(_0x4f04ef){if(_0x4f04ef){return _0x4f04ef?{'count':_0x117181,'rows':_0x4f04ef}:null;}})['then'](respondWithResult(_0x2d7f8b,null))['catch'](handleError(_0x2d7f8b,null));};exports[_0x43fa('0x4d')]=function(_0xe218b0,_0x3c141e,_0x500a1b){var _0x3ff0ce={};var _0x3f4839={};var _0x268cb2;var _0x563487;return db[_0x43fa('0x2b')][_0x43fa('0x47')]({'where':{'id':_0xe218b0[_0x43fa('0x46')]['id']}})['then'](handleEntityNotFound(_0x3c141e,null))[_0x43fa('0x24')](function(_0x457006){if(_0x457006){_0x268cb2=_0x457006;_0x3f4839[_0x43fa('0x30')]=_['keys'](db[_0x43fa('0x4e')][_0x43fa('0x2c')]);_0x3f4839['query']=_[_0x43fa('0x32')](_0xe218b0[_0x43fa('0x31')]);_0x3f4839[_0x43fa('0x33')]=_['intersection'](_0x3f4839[_0x43fa('0x30')],_0x3f4839[_0x43fa('0x31')]);_0x3ff0ce[_0x43fa('0x34')]=_[_0x43fa('0x41')](_0x3f4839[_0x43fa('0x30')],qs[_0x43fa('0x35')](_0xe218b0['query'][_0x43fa('0x35')]));_0x3ff0ce[_0x43fa('0x34')]=_0x3ff0ce[_0x43fa('0x34')][_0x43fa('0x42')]?_0x3ff0ce[_0x43fa('0x34')]:_0x3f4839[_0x43fa('0x30')];_0x3ff0ce[_0x43fa('0x37')]=qs[_0x43fa('0x38')](_0xe218b0['query']['sort']);_0x3ff0ce[_0x43fa('0x39')]=qs[_0x43fa('0x33')](_[_0x43fa('0x3a')](_0xe218b0[_0x43fa('0x31')],_0x3f4839['filters']));if(_0xe218b0[_0x43fa('0x31')][_0x43fa('0x3b')]){_0x3ff0ce['where']=_[_0x43fa('0x3c')](_0x3ff0ce[_0x43fa('0x39')],{'$or':_[_0x43fa('0x2a')](_0x3ff0ce[_0x43fa('0x34')],function(_0x187b74){var _0x562405={};_0x562405[_0x187b74]={'$like':'%'+_0xe218b0[_0x43fa('0x31')][_0x43fa('0x3b')]+'%'};return _0x562405;})});}_0x3ff0ce=_[_0x43fa('0x3c')]({},_0x3ff0ce,_0xe218b0[_0x43fa('0x3d')]);return _0x268cb2[_0x43fa('0x4d')](_0x3ff0ce);}})[_0x43fa('0x24')](function(_0x303923){if(_0x303923){_0x563487=_0x303923[_0x43fa('0x42')];if(!_0xe218b0[_0x43fa('0x31')]['hasOwnProperty'](_0x43fa('0x36'))){_0x3ff0ce[_0x43fa('0x1d')]=qs[_0x43fa('0x1d')](_0xe218b0[_0x43fa('0x31')][_0x43fa('0x1d')]);_0x3ff0ce[_0x43fa('0x1b')]=qs[_0x43fa('0x1b')](_0xe218b0['query'][_0x43fa('0x1b')]);}return _0x268cb2['getTags'](_0x3ff0ce);}})[_0x43fa('0x24')](function(_0xf08895){if(_0xf08895){return _0xf08895?{'count':_0x563487,'rows':_0xf08895}:null;}})['then'](respondWithResult(_0x3c141e,null))['catch'](handleError(_0x3c141e,null));};exports[_0x43fa('0x4f')]=function(_0x12a889,_0x30a504,_0x262aee){if(_0x12a889[_0x43fa('0x45')]['id']){delete _0x12a889[_0x43fa('0x45')]['id'];}return db[_0x43fa('0x2b')][_0x43fa('0x47')]({'where':{'id':_0x12a889['params']['id']}})[_0x43fa('0x24')](handleEntityNotFound(_0x30a504,null))[_0x43fa('0x24')](function(_0x17024c){if(_0x17024c){return _0x17024c[_0x43fa('0x4f')](_0x12a889[_0x43fa('0x45')][_0x43fa('0x50')]||[]);}return null;})['then'](respondWithResult(_0x30a504,null))['catch'](handleError(_0x30a504,null));}; \ No newline at end of file diff --git a/server/api/intZendeskConfiguration/intZendeskConfiguration.model.js b/server/api/intZendeskConfiguration/intZendeskConfiguration.model.js index f91a35d..4c836b1 100644 --- a/server/api/intZendeskConfiguration/intZendeskConfiguration.model.js +++ b/server/api/intZendeskConfiguration/intZendeskConfiguration.model.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xeb74=['rimraf','../../config/environment','./intZendeskConfiguration.attributes','exports','define','int_zendesk_configurations','lodash','util','../../config/logger','api','moment','bluebird','request-promise'];(function(_0x1137e2,_0x2d31db){var _0x118ce8=function(_0x22ce56){while(--_0x22ce56){_0x1137e2['push'](_0x1137e2['shift']());}};_0x118ce8(++_0x2d31db);}(_0xeb74,0xe3));var _0x4eb7=function(_0x272909,_0x19ca17){_0x272909=_0x272909-0x0;var _0xb6791=_0xeb74[_0x272909];return _0xb6791;};'use strict';var _=require(_0x4eb7('0x0'));var util=require(_0x4eb7('0x1'));var logger=require(_0x4eb7('0x2'))(_0x4eb7('0x3'));var moment=require(_0x4eb7('0x4'));var BPromise=require(_0x4eb7('0x5'));var rp=require(_0x4eb7('0x6'));var fs=require('fs');var path=require('path');var rimraf=require(_0x4eb7('0x7'));var config=require(_0x4eb7('0x8'));var attributes=require(_0x4eb7('0x9'));module[_0x4eb7('0xa')]=function(_0xa6e086,_0x563d6e){return _0xa6e086[_0x4eb7('0xb')]('ZendeskConfiguration',attributes,{'tableName':_0x4eb7('0xc'),'paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file +var _0x7334=['exports','define','ZendeskConfiguration','int_zendesk_configurations','lodash','util','../../config/logger','bluebird','path','rimraf','../../config/environment','./intZendeskConfiguration.attributes'];(function(_0x22f8ab,_0x15d8ff){var _0x2a70e5=function(_0x5e6895){while(--_0x5e6895){_0x22f8ab['push'](_0x22f8ab['shift']());}};_0x2a70e5(++_0x15d8ff);}(_0x7334,0x184));var _0x4733=function(_0x441672,_0x50c448){_0x441672=_0x441672-0x0;var _0x444bc4=_0x7334[_0x441672];return _0x444bc4;};'use strict';var _=require(_0x4733('0x0'));var util=require(_0x4733('0x1'));var logger=require(_0x4733('0x2'))('api');var moment=require('moment');var BPromise=require(_0x4733('0x3'));var rp=require('request-promise');var fs=require('fs');var path=require(_0x4733('0x4'));var rimraf=require(_0x4733('0x5'));var config=require(_0x4733('0x6'));var attributes=require(_0x4733('0x7'));module[_0x4733('0x8')]=function(_0x449ead,_0x16d7cc){return _0x449ead[_0x4733('0x9')](_0x4733('0xa'),attributes,{'tableName':_0x4733('0xb'),'paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file diff --git a/server/api/intZendeskConfiguration/intZendeskConfiguration.rpc.js b/server/api/intZendeskConfiguration/intZendeskConfiguration.rpc.js index 46808c1..0777558 100644 --- a/server/api/intZendeskConfiguration/intZendeskConfiguration.rpc.js +++ b/server/api/intZendeskConfiguration/intZendeskConfiguration.rpc.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xdde4=['result','catch','lodash','util','ioredis','../../mysqldb','../../config/logger','rpc','jayson/promise','client','http','request','then','ZendeskConfiguration,\x20%s,\x20%s','request\x20sent','debug','ZendeskConfiguration,\x20%s,\x20%s,\x20%s','error','code','message','info'];(function(_0x2d418a,_0x31764e){var _0x125eb9=function(_0xf4c60e){while(--_0xf4c60e){_0x2d418a['push'](_0x2d418a['shift']());}};_0x125eb9(++_0x31764e);}(_0xdde4,0x95));var _0x4dde=function(_0x4785a8,_0x2cd0c4){_0x4785a8=_0x4785a8-0x0;var _0x20dc1a=_0xdde4[_0x4785a8];return _0x20dc1a;};'use strict';var _=require(_0x4dde('0x0'));var util=require(_0x4dde('0x1'));var moment=require('moment');var BPromise=require('bluebird');var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x4dde('0x2'));var db=require(_0x4dde('0x3'))['db'];var utils=require('../../config/utils');var logger=require(_0x4dde('0x4'))(_0x4dde('0x5'));var config=require('../../config/environment');var jayson=require(_0x4dde('0x6'));var client=jayson[_0x4dde('0x7')][_0x4dde('0x8')]({'port':0x232a});function respondWithRpcPromise(_0x561198,_0x1b1d38,_0x58b80c){return new BPromise(function(_0x50d49d,_0x4e7350){return client[_0x4dde('0x9')](_0x561198,_0x58b80c)[_0x4dde('0xa')](function(_0xc218f7){logger['info'](_0x4dde('0xb'),_0x1b1d38,_0x4dde('0xc'));logger[_0x4dde('0xd')](_0x4dde('0xe'),_0x1b1d38,_0x4dde('0xc'),JSON['stringify'](_0xc218f7));if(_0xc218f7[_0x4dde('0xf')]){if(_0xc218f7[_0x4dde('0xf')][_0x4dde('0x10')]===0x1f4){logger[_0x4dde('0xf')](_0x4dde('0xb'),_0x1b1d38,_0xc218f7['error'][_0x4dde('0x11')]);return _0x4e7350(_0xc218f7[_0x4dde('0xf')][_0x4dde('0x11')]);}logger['error']('ZendeskConfiguration,\x20%s,\x20%s',_0x1b1d38,_0xc218f7[_0x4dde('0xf')][_0x4dde('0x11')]);return _0x50d49d(_0xc218f7[_0x4dde('0xf')][_0x4dde('0x11')]);}else{logger[_0x4dde('0x12')](_0x4dde('0xb'),_0x1b1d38,'request\x20sent');_0x50d49d(_0xc218f7[_0x4dde('0x13')]['message']);}})[_0x4dde('0x14')](function(_0x26bf90){logger[_0x4dde('0xf')](_0x4dde('0xb'),_0x1b1d38,_0x26bf90);_0x4e7350(_0x26bf90);});});} \ No newline at end of file +var _0x93c0=['request','info','ZendeskConfiguration,\x20%s,\x20%s','request\x20sent','debug','ZendeskConfiguration,\x20%s,\x20%s,\x20%s','error','message','catch','lodash','util','bluebird','randomstring','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client'];(function(_0x9b494f,_0x2d68ff){var _0x36597c=function(_0x5bcafb){while(--_0x5bcafb){_0x9b494f['push'](_0x9b494f['shift']());}};_0x36597c(++_0x2d68ff);}(_0x93c0,0x185));var _0x093c=function(_0x5b644e,_0x2e5e07){_0x5b644e=_0x5b644e-0x0;var _0x49c6bf=_0x93c0[_0x5b644e];return _0x49c6bf;};'use strict';var _=require(_0x093c('0x0'));var util=require(_0x093c('0x1'));var moment=require('moment');var BPromise=require(_0x093c('0x2'));var rs=require(_0x093c('0x3'));var fs=require('fs');var Redis=require('ioredis');var db=require('../../mysqldb')['db'];var utils=require(_0x093c('0x4'));var logger=require(_0x093c('0x5'))(_0x093c('0x6'));var config=require(_0x093c('0x7'));var jayson=require(_0x093c('0x8'));var client=jayson[_0x093c('0x9')]['http']({'port':0x232a});function respondWithRpcPromise(_0x3080d8,_0x2ee17c,_0x4f322c){return new BPromise(function(_0x215db8,_0x551159){return client[_0x093c('0xa')](_0x3080d8,_0x4f322c)['then'](function(_0x2be0ab){logger[_0x093c('0xb')](_0x093c('0xc'),_0x2ee17c,_0x093c('0xd'));logger[_0x093c('0xe')](_0x093c('0xf'),_0x2ee17c,_0x093c('0xd'),JSON['stringify'](_0x2be0ab));if(_0x2be0ab[_0x093c('0x10')]){if(_0x2be0ab[_0x093c('0x10')]['code']===0x1f4){logger[_0x093c('0x10')](_0x093c('0xc'),_0x2ee17c,_0x2be0ab['error'][_0x093c('0x11')]);return _0x551159(_0x2be0ab[_0x093c('0x10')][_0x093c('0x11')]);}logger[_0x093c('0x10')](_0x093c('0xc'),_0x2ee17c,_0x2be0ab['error'][_0x093c('0x11')]);return _0x215db8(_0x2be0ab[_0x093c('0x10')]['message']);}else{logger[_0x093c('0xb')]('ZendeskConfiguration,\x20%s,\x20%s',_0x2ee17c,'request\x20sent');_0x215db8(_0x2be0ab['result'][_0x093c('0x11')]);}})[_0x093c('0x12')](function(_0x1e5ef6){logger[_0x093c('0x10')](_0x093c('0xc'),_0x2ee17c,_0x1e5ef6);_0x551159(_0x1e5ef6);});});} \ No newline at end of file diff --git a/server/api/intZendeskField/index.js b/server/api/intZendeskField/index.js index 331ecdb..509cafa 100644 --- a/server/api/intZendeskField/index.js +++ b/server/api/intZendeskField/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xd7b7=['show','post','create','put','/:id','delete','destroy','exports','path','connect-timeout','express','Router','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','./intZendeskField.controller','get','isAuthenticated','index'];(function(_0x6cf19c,_0x2f3f02){var _0xce14f3=function(_0x474587){while(--_0x474587){_0x6cf19c['push'](_0x6cf19c['shift']());}};_0xce14f3(++_0x2f3f02);}(_0xd7b7,0xf8));var _0x7d7b=function(_0x1b6c47,_0xe90f5f){_0x1b6c47=_0x1b6c47-0x0;var _0x565df0=_0xd7b7[_0x1b6c47];return _0x565df0;};'use strict';var multer=require('multer');var util=require('util');var path=require(_0x7d7b('0x0'));var timeout=require(_0x7d7b('0x1'));var express=require(_0x7d7b('0x2'));var router=express[_0x7d7b('0x3')]();var fs_extra=require(_0x7d7b('0x4'));var auth=require(_0x7d7b('0x5'));var interaction=require(_0x7d7b('0x6'));var config=require(_0x7d7b('0x7'));var controller=require(_0x7d7b('0x8'));router[_0x7d7b('0x9')]('/',auth[_0x7d7b('0xa')](),controller[_0x7d7b('0xb')]);router[_0x7d7b('0x9')]('/:id',auth['isAuthenticated'](),controller[_0x7d7b('0xc')]);router[_0x7d7b('0xd')]('/',auth[_0x7d7b('0xa')](),controller[_0x7d7b('0xe')]);router[_0x7d7b('0xf')](_0x7d7b('0x10'),auth['isAuthenticated'](),controller['update']);router[_0x7d7b('0x11')](_0x7d7b('0x10'),auth[_0x7d7b('0xa')](),controller[_0x7d7b('0x12')]);module[_0x7d7b('0x13')]=router; \ No newline at end of file +var _0xfa7d=['index','get','/:id','show','post','create','put','delete','destroy','util','connect-timeout','Router','fs-extra','../../components/interaction/service','../../config/environment','./intZendeskField.controller','isAuthenticated'];(function(_0x58fbd8,_0x5494e8){var _0x34de43=function(_0x37a842){while(--_0x37a842){_0x58fbd8['push'](_0x58fbd8['shift']());}};_0x34de43(++_0x5494e8);}(_0xfa7d,0x6f));var _0xdfa7=function(_0x3899d1,_0x4aa04c){_0x3899d1=_0x3899d1-0x0;var _0xeb4a7d=_0xfa7d[_0x3899d1];return _0xeb4a7d;};'use strict';var multer=require('multer');var util=require(_0xdfa7('0x0'));var path=require('path');var timeout=require(_0xdfa7('0x1'));var express=require('express');var router=express[_0xdfa7('0x2')]();var fs_extra=require(_0xdfa7('0x3'));var auth=require('../../components/auth/service');var interaction=require(_0xdfa7('0x4'));var config=require(_0xdfa7('0x5'));var controller=require(_0xdfa7('0x6'));router['get']('/',auth[_0xdfa7('0x7')](),controller[_0xdfa7('0x8')]);router[_0xdfa7('0x9')](_0xdfa7('0xa'),auth[_0xdfa7('0x7')](),controller[_0xdfa7('0xb')]);router[_0xdfa7('0xc')]('/',auth[_0xdfa7('0x7')](),controller[_0xdfa7('0xd')]);router[_0xdfa7('0xe')](_0xdfa7('0xa'),auth['isAuthenticated'](),controller['update']);router[_0xdfa7('0xf')](_0xdfa7('0xa'),auth[_0xdfa7('0x7')](),controller[_0xdfa7('0x10')]);module['exports']=router; \ No newline at end of file diff --git a/server/api/intZendeskField/intZendeskField.attributes.js b/server/api/intZendeskField/intZendeskField.attributes.js index ca5e7e6..ca6b4d8 100644 --- a/server/api/intZendeskField/intZendeskField.attributes.js +++ b/server/api/intZendeskField/intZendeskField.attributes.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xfafa=['exports','keyValue','picklist','string','STRING','ENUM','variable','customVariable','BOOLEAN','sequelize'];(function(_0xd60031,_0x5efb93){var _0x43d00a=function(_0x21ac92){while(--_0x21ac92){_0xd60031['push'](_0xd60031['shift']());}};_0x43d00a(++_0x5efb93);}(_0xfafa,0x1a3));var _0xafaf=function(_0x499adf,_0x4cd260){_0x499adf=_0x499adf-0x0;var _0x47f5cf=_0xfafa[_0x499adf];return _0x47f5cf;};'use strict';var Sequelize=require(_0xafaf('0x0'));module[_0xafaf('0x1')]={'type':{'type':Sequelize['ENUM']('string','variable','customVariable',_0xafaf('0x2'),_0xafaf('0x3')),'defaultValue':_0xafaf('0x4')},'content':{'type':Sequelize[_0xafaf('0x5')]},'key':{'type':Sequelize[_0xafaf('0x5')]},'keyType':{'type':Sequelize[_0xafaf('0x6')](_0xafaf('0x4'),_0xafaf('0x7'),_0xafaf('0x8'))},'keyContent':{'type':Sequelize[_0xafaf('0x5')]},'idField':{'type':Sequelize[_0xafaf('0x5')]},'nameField':{'type':Sequelize[_0xafaf('0x5')]},'customField':{'type':Sequelize[_0xafaf('0x9')],'defaultValue':!![]},'variableName':{'type':Sequelize[_0xafaf('0x5')]}}; \ No newline at end of file +var _0x84c9=['string','STRING','variable','sequelize','exports','ENUM','customVariable','keyValue','picklist'];(function(_0xdc71d3,_0x23722c){var _0xd9cac8=function(_0x3b403d){while(--_0x3b403d){_0xdc71d3['push'](_0xdc71d3['shift']());}};_0xd9cac8(++_0x23722c);}(_0x84c9,0xe4));var _0x984c=function(_0x3f925c,_0x38f349){_0x3f925c=_0x3f925c-0x0;var _0xc1b88d=_0x84c9[_0x3f925c];return _0xc1b88d;};'use strict';var Sequelize=require(_0x984c('0x0'));module[_0x984c('0x1')]={'type':{'type':Sequelize[_0x984c('0x2')]('string','variable',_0x984c('0x3'),_0x984c('0x4'),_0x984c('0x5')),'defaultValue':_0x984c('0x6')},'content':{'type':Sequelize[_0x984c('0x7')]},'key':{'type':Sequelize[_0x984c('0x7')]},'keyType':{'type':Sequelize[_0x984c('0x2')]('string',_0x984c('0x8'),'customVariable')},'keyContent':{'type':Sequelize[_0x984c('0x7')]},'idField':{'type':Sequelize[_0x984c('0x7')]},'nameField':{'type':Sequelize['STRING']},'customField':{'type':Sequelize['BOOLEAN'],'defaultValue':!![]},'variableName':{'type':Sequelize['STRING']}}; \ No newline at end of file diff --git a/server/api/intZendeskField/intZendeskField.controller.js b/server/api/intZendeskField/intZendeskField.controller.js index 0eda572..16640c4 100644 --- a/server/api/intZendeskField/intZendeskField.controller.js +++ b/server/api/intZendeskField/intZendeskField.controller.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x06c4=['lodash','squel','crypto','jsforce','desk.js','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','sendStatus','end','status','json','offset','undefined','limit','count','set','apply','save','update','destroy','then','error','stack','name','send','map','rawAttributes','fieldName','type','key','keys','query','model','intersection','fields','attributes','order','sort','where','filters','pick','filter','merge','VIRTUAL','options','includeAll','include','ZendeskField','findAll','catch','show','length','body','find','params','eml-format','zip-dir','request-promise','moment','bluebird','mustache','util','sox','to-csv','ejs'];(function(_0x5ad61b,_0x4027b6){var _0x5acb6c=function(_0x3e6db9){while(--_0x3e6db9){_0x5ad61b['push'](_0x5ad61b['shift']());}};_0x5acb6c(++_0x4027b6);}(_0x06c4,0x122));var _0x406c=function(_0x14add3,_0x13ce8d){_0x14add3=_0x14add3-0x0;var _0x4a174f=_0x06c4[_0x14add3];return _0x4a174f;};'use strict';var emlformat=require(_0x406c('0x0'));var rimraf=require('rimraf');var zipdir=require(_0x406c('0x1'));var jsonpatch=require('fast-json-patch');var rp=require(_0x406c('0x2'));var moment=require(_0x406c('0x3'));var BPromise=require(_0x406c('0x4'));var Mustache=require(_0x406c('0x5'));var util=require(_0x406c('0x6'));var path=require('path');var sox=require(_0x406c('0x7'));var csv=require(_0x406c('0x8'));var ejs=require(_0x406c('0x9'));var fs=require('fs');var fs_extra=require('fs-extra');var _=require(_0x406c('0xa'));var squel=require(_0x406c('0xb'));var crypto=require(_0x406c('0xc'));var jsforce=require(_0x406c('0xd'));var deskjs=require(_0x406c('0xe'));var toCsv=require('to-csv');var querystring=require(_0x406c('0xf'));var Papa=require(_0x406c('0x10'));var Redis=require(_0x406c('0x11'));var authService=require(_0x406c('0x12'));var qs=require(_0x406c('0x13'));var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0x406c('0x14'));var logger=require(_0x406c('0x15'))(_0x406c('0x16'));var utils=require(_0x406c('0x17'));var config=require(_0x406c('0x18'));var licenseUtil=require(_0x406c('0x19'));var db=require(_0x406c('0x1a'))['db'];function respondWithStatusCode(_0x5d559f,_0x42c170){_0x42c170=_0x42c170||0xcc;return function(_0x348a0b){if(_0x348a0b){return _0x5d559f[_0x406c('0x1b')](_0x42c170);}return _0x5d559f['status'](_0x42c170)[_0x406c('0x1c')]();};}function respondWithResult(_0x293863,_0x289cee){_0x289cee=_0x289cee||0xc8;return function(_0xecd600){if(_0xecd600){return _0x293863[_0x406c('0x1d')](_0x289cee)[_0x406c('0x1e')](_0xecd600);}};}function respondWithFilteredResult(_0x5b67bb,_0x3a50f3){return function(_0x5db960){if(_0x5db960){var _0x468866=typeof _0x3a50f3[_0x406c('0x1f')]===_0x406c('0x20')&&typeof _0x3a50f3[_0x406c('0x21')]===_0x406c('0x20');var _0xb3d818=_0x5db960[_0x406c('0x22')];var _0x13f911=_0x468866?0x0:_0x3a50f3[_0x406c('0x1f')];var _0x1127e0=_0x468866?_0x5db960[_0x406c('0x22')]:_0x3a50f3[_0x406c('0x1f')]+_0x3a50f3[_0x406c('0x21')];var _0x368111;if(_0x1127e0>=_0xb3d818){_0x1127e0=_0xb3d818;_0x368111=0xc8;}else{_0x368111=0xce;}_0x5b67bb[_0x406c('0x1d')](_0x368111);return _0x5b67bb[_0x406c('0x23')]('Content-Range',_0x13f911+'-'+_0x1127e0+'/'+_0xb3d818)[_0x406c('0x1e')](_0x5db960);}return null;};}function patchUpdates(_0x17447f){return function(_0x50e539){try{jsonpatch[_0x406c('0x24')](_0x50e539,_0x17447f,!![]);}catch(_0x3feecc){return BPromise['reject'](_0x3feecc);}return _0x50e539[_0x406c('0x25')]();};}function saveUpdates(_0x4f6709,_0x4025a1){return function(_0x4aa506){if(_0x4aa506){return _0x4aa506[_0x406c('0x26')](_0x4f6709)['then'](function(_0x5dfab7){return _0x5dfab7;});}return null;};}function removeEntity(_0x3e3550,_0x3c7850){return function(_0xdf1ed0){if(_0xdf1ed0){return _0xdf1ed0[_0x406c('0x27')]()[_0x406c('0x28')](function(){_0x3e3550['status'](0xcc)[_0x406c('0x1c')]();});}};}function handleEntityNotFound(_0x2f828a,_0x4542c1){return function(_0x2f87b){if(!_0x2f87b){_0x2f828a[_0x406c('0x1b')](0x194);}return _0x2f87b;};}function handleError(_0x481597,_0x310532){_0x310532=_0x310532||0x1f4;return function(_0x57ccdd){logger[_0x406c('0x29')](_0x57ccdd[_0x406c('0x2a')]);if(_0x57ccdd[_0x406c('0x2b')]){delete _0x57ccdd[_0x406c('0x2b')];}_0x481597[_0x406c('0x1d')](_0x310532)[_0x406c('0x2c')](_0x57ccdd);};}exports['index']=function(_0x2e2855,_0x25f317){var _0x3317dc={},_0x15fb62={},_0x53565f={'count':0x0,'rows':[]};var _0x572aba=_[_0x406c('0x2d')](db['ZendeskField'][_0x406c('0x2e')],function(_0x114d6c){return{'name':_0x114d6c[_0x406c('0x2f')],'type':_0x114d6c[_0x406c('0x30')][_0x406c('0x31')]};});_0x15fb62['model']=_[_0x406c('0x2d')](_0x572aba,'name');_0x15fb62['query']=_[_0x406c('0x32')](_0x2e2855[_0x406c('0x33')]);_0x15fb62['filters']=_['intersection'](_0x15fb62[_0x406c('0x34')],_0x15fb62[_0x406c('0x33')]);_0x3317dc['attributes']=_[_0x406c('0x35')](_0x15fb62[_0x406c('0x34')],qs[_0x406c('0x36')](_0x2e2855['query'][_0x406c('0x36')]));_0x3317dc[_0x406c('0x37')]=_0x3317dc[_0x406c('0x37')]['length']?_0x3317dc[_0x406c('0x37')]:_0x15fb62['model'];if(!_0x2e2855[_0x406c('0x33')]['hasOwnProperty']('nolimit')){_0x3317dc[_0x406c('0x21')]=qs[_0x406c('0x21')](_0x2e2855[_0x406c('0x33')][_0x406c('0x21')]);_0x3317dc[_0x406c('0x1f')]=qs[_0x406c('0x1f')](_0x2e2855[_0x406c('0x33')][_0x406c('0x1f')]);}_0x3317dc[_0x406c('0x38')]=qs[_0x406c('0x39')](_0x2e2855['query'][_0x406c('0x39')]);_0x3317dc[_0x406c('0x3a')]=qs[_0x406c('0x3b')](_[_0x406c('0x3c')](_0x2e2855[_0x406c('0x33')],_0x15fb62[_0x406c('0x3b')]),_0x572aba);if(_0x2e2855['query'][_0x406c('0x3d')]){_0x3317dc['where']=_[_0x406c('0x3e')](_0x3317dc[_0x406c('0x3a')],{'$or':_[_0x406c('0x2d')](_0x572aba,function(_0x1e1e92){if(_0x1e1e92[_0x406c('0x30')]!==_0x406c('0x3f')){var _0x4df6a3={};_0x4df6a3[_0x1e1e92[_0x406c('0x2b')]]={'$like':'%'+_0x2e2855[_0x406c('0x33')][_0x406c('0x3d')]+'%'};return _0x4df6a3;}})});}_0x3317dc=_[_0x406c('0x3e')]({},_0x3317dc,_0x2e2855[_0x406c('0x40')]);var _0x4b58b4={'where':_0x3317dc['where']};return db['ZendeskField'][_0x406c('0x22')](_0x4b58b4)[_0x406c('0x28')](function(_0x51f8de){_0x53565f[_0x406c('0x22')]=_0x51f8de;if(_0x2e2855['query'][_0x406c('0x41')]){_0x3317dc[_0x406c('0x42')]=[{'all':!![]}];}return db[_0x406c('0x43')][_0x406c('0x44')](_0x3317dc);})[_0x406c('0x28')](function(_0x58bbd5){_0x53565f['rows']=_0x58bbd5;return _0x53565f;})[_0x406c('0x28')](respondWithFilteredResult(_0x25f317,_0x3317dc))[_0x406c('0x45')](handleError(_0x25f317,null));};exports[_0x406c('0x46')]=function(_0x472149,_0x19f486){var _0x4367c7={'raw':!![],'where':{'id':_0x472149['params']['id']}},_0x38a87a={};_0x38a87a[_0x406c('0x34')]=_[_0x406c('0x32')](db['ZendeskField'][_0x406c('0x2e')]);_0x38a87a['query']=_[_0x406c('0x32')](_0x472149[_0x406c('0x33')]);_0x38a87a[_0x406c('0x3b')]=_[_0x406c('0x35')](_0x38a87a['model'],_0x38a87a[_0x406c('0x33')]);_0x4367c7[_0x406c('0x37')]=_[_0x406c('0x35')](_0x38a87a[_0x406c('0x34')],qs[_0x406c('0x36')](_0x472149[_0x406c('0x33')]['fields']));_0x4367c7[_0x406c('0x37')]=_0x4367c7[_0x406c('0x37')][_0x406c('0x47')]?_0x4367c7[_0x406c('0x37')]:_0x38a87a[_0x406c('0x34')];if(_0x472149[_0x406c('0x33')]['includeAll']){_0x4367c7['include']=[{'all':!![]}];}_0x4367c7=_[_0x406c('0x3e')]({},_0x4367c7,_0x472149[_0x406c('0x40')]);return db['ZendeskField']['find'](_0x4367c7)[_0x406c('0x28')](handleEntityNotFound(_0x19f486,null))[_0x406c('0x28')](respondWithResult(_0x19f486,null))[_0x406c('0x45')](handleError(_0x19f486,null));};exports['create']=function(_0x2c300f,_0x27f7a4){return db[_0x406c('0x43')]['create'](_0x2c300f[_0x406c('0x48')],{})['then'](respondWithResult(_0x27f7a4,0xc9))[_0x406c('0x45')](handleError(_0x27f7a4,null));};exports[_0x406c('0x26')]=function(_0x1c58a6,_0x3eb2a2){if(_0x1c58a6[_0x406c('0x48')]['id']){delete _0x1c58a6[_0x406c('0x48')]['id'];}return db[_0x406c('0x43')][_0x406c('0x49')]({'where':{'id':_0x1c58a6[_0x406c('0x4a')]['id']}})[_0x406c('0x28')](handleEntityNotFound(_0x3eb2a2,null))['then'](saveUpdates(_0x1c58a6[_0x406c('0x48')],null))[_0x406c('0x28')](respondWithResult(_0x3eb2a2,null))[_0x406c('0x45')](handleError(_0x3eb2a2,null));};exports[_0x406c('0x27')]=function(_0x54b606,_0x4de7fe){return db[_0x406c('0x43')][_0x406c('0x49')]({'where':{'id':_0x54b606[_0x406c('0x4a')]['id']}})['then'](handleEntityNotFound(_0x4de7fe,null))[_0x406c('0x28')](removeEntity(_0x4de7fe,null))[_0x406c('0x45')](handleError(_0x4de7fe,null));}; \ No newline at end of file +var _0xc1cd=['destroy','error','stack','name','send','ZendeskField','rawAttributes','fieldName','type','key','map','query','keys','filters','attributes','model','fields','hasOwnProperty','nolimit','order','sort','where','pick','filter','merge','VIRTUAL','options','includeAll','include','rows','catch','show','params','intersection','find','body','eml-format','rimraf','zip-dir','fast-json-patch','moment','bluebird','util','path','to-csv','ejs','fs-extra','lodash','squel','jsforce','desk.js','querystring','papaparse','../../components/auth/service','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/environment','../../config/license/util','../../mysqldb','sendStatus','status','end','json','offset','undefined','limit','count','set','Content-Range','reject','save','update','then'];(function(_0x446186,_0x116e31){var _0x63b564=function(_0x590a14){while(--_0x590a14){_0x446186['push'](_0x446186['shift']());}};_0x63b564(++_0x116e31);}(_0xc1cd,0x1e6));var _0xdc1c=function(_0x463542,_0x40d201){_0x463542=_0x463542-0x0;var _0x8267f2=_0xc1cd[_0x463542];return _0x8267f2;};'use strict';var emlformat=require(_0xdc1c('0x0'));var rimraf=require(_0xdc1c('0x1'));var zipdir=require(_0xdc1c('0x2'));var jsonpatch=require(_0xdc1c('0x3'));var rp=require('request-promise');var moment=require(_0xdc1c('0x4'));var BPromise=require(_0xdc1c('0x5'));var Mustache=require('mustache');var util=require(_0xdc1c('0x6'));var path=require(_0xdc1c('0x7'));var sox=require('sox');var csv=require(_0xdc1c('0x8'));var ejs=require(_0xdc1c('0x9'));var fs=require('fs');var fs_extra=require(_0xdc1c('0xa'));var _=require(_0xdc1c('0xb'));var squel=require(_0xdc1c('0xc'));var crypto=require('crypto');var jsforce=require(_0xdc1c('0xd'));var deskjs=require(_0xdc1c('0xe'));var toCsv=require('to-csv');var querystring=require(_0xdc1c('0xf'));var Papa=require(_0xdc1c('0x10'));var Redis=require('ioredis');var authService=require(_0xdc1c('0x11'));var qs=require('../../components/parsers/qs');var as=require(_0xdc1c('0x12'));var hardwareService=require(_0xdc1c('0x13'));var logger=require(_0xdc1c('0x14'))(_0xdc1c('0x15'));var utils=require('../../config/utils');var config=require(_0xdc1c('0x16'));var licenseUtil=require(_0xdc1c('0x17'));var db=require(_0xdc1c('0x18'))['db'];function respondWithStatusCode(_0x16f013,_0x2b25ef){_0x2b25ef=_0x2b25ef||0xcc;return function(_0x1d4e86){if(_0x1d4e86){return _0x16f013[_0xdc1c('0x19')](_0x2b25ef);}return _0x16f013[_0xdc1c('0x1a')](_0x2b25ef)[_0xdc1c('0x1b')]();};}function respondWithResult(_0x544685,_0x2f1ec7){_0x2f1ec7=_0x2f1ec7||0xc8;return function(_0x1a45a9){if(_0x1a45a9){return _0x544685[_0xdc1c('0x1a')](_0x2f1ec7)[_0xdc1c('0x1c')](_0x1a45a9);}};}function respondWithFilteredResult(_0xaf1d5,_0x27842c){return function(_0x47be19){if(_0x47be19){var _0x1669c1=typeof _0x27842c[_0xdc1c('0x1d')]===_0xdc1c('0x1e')&&typeof _0x27842c[_0xdc1c('0x1f')]===_0xdc1c('0x1e');var _0x3ec757=_0x47be19[_0xdc1c('0x20')];var _0x49bc37=_0x1669c1?0x0:_0x27842c['offset'];var _0x47c609=_0x1669c1?_0x47be19[_0xdc1c('0x20')]:_0x27842c['offset']+_0x27842c[_0xdc1c('0x1f')];var _0x1abcbd;if(_0x47c609>=_0x3ec757){_0x47c609=_0x3ec757;_0x1abcbd=0xc8;}else{_0x1abcbd=0xce;}_0xaf1d5[_0xdc1c('0x1a')](_0x1abcbd);return _0xaf1d5[_0xdc1c('0x21')](_0xdc1c('0x22'),_0x49bc37+'-'+_0x47c609+'/'+_0x3ec757)[_0xdc1c('0x1c')](_0x47be19);}return null;};}function patchUpdates(_0x2b3e9d){return function(_0x315ee1){try{jsonpatch['apply'](_0x315ee1,_0x2b3e9d,!![]);}catch(_0x426498){return BPromise[_0xdc1c('0x23')](_0x426498);}return _0x315ee1[_0xdc1c('0x24')]();};}function saveUpdates(_0x546a68,_0x83d7ab){return function(_0x37d167){if(_0x37d167){return _0x37d167[_0xdc1c('0x25')](_0x546a68)[_0xdc1c('0x26')](function(_0x4c7a8f){return _0x4c7a8f;});}return null;};}function removeEntity(_0x143f6f,_0x53e296){return function(_0x24ee8e){if(_0x24ee8e){return _0x24ee8e[_0xdc1c('0x27')]()[_0xdc1c('0x26')](function(){_0x143f6f[_0xdc1c('0x1a')](0xcc)[_0xdc1c('0x1b')]();});}};}function handleEntityNotFound(_0x469b6d,_0x470a28){return function(_0x4a0085){if(!_0x4a0085){_0x469b6d[_0xdc1c('0x19')](0x194);}return _0x4a0085;};}function handleError(_0x3cd97f,_0x1f603a){_0x1f603a=_0x1f603a||0x1f4;return function(_0x16dbc6){logger[_0xdc1c('0x28')](_0x16dbc6[_0xdc1c('0x29')]);if(_0x16dbc6[_0xdc1c('0x2a')]){delete _0x16dbc6[_0xdc1c('0x2a')];}_0x3cd97f[_0xdc1c('0x1a')](_0x1f603a)[_0xdc1c('0x2b')](_0x16dbc6);};}exports['index']=function(_0xb77c16,_0x30bd89){var _0x306be2={},_0x2df256={},_0x48eb9a={'count':0x0,'rows':[]};var _0x4a320c=_['map'](db[_0xdc1c('0x2c')][_0xdc1c('0x2d')],function(_0x2fd38e){return{'name':_0x2fd38e[_0xdc1c('0x2e')],'type':_0x2fd38e[_0xdc1c('0x2f')][_0xdc1c('0x30')]};});_0x2df256['model']=_[_0xdc1c('0x31')](_0x4a320c,'name');_0x2df256[_0xdc1c('0x32')]=_[_0xdc1c('0x33')](_0xb77c16[_0xdc1c('0x32')]);_0x2df256[_0xdc1c('0x34')]=_['intersection'](_0x2df256['model'],_0x2df256['query']);_0x306be2[_0xdc1c('0x35')]=_['intersection'](_0x2df256[_0xdc1c('0x36')],qs['fields'](_0xb77c16[_0xdc1c('0x32')][_0xdc1c('0x37')]));_0x306be2[_0xdc1c('0x35')]=_0x306be2[_0xdc1c('0x35')]['length']?_0x306be2[_0xdc1c('0x35')]:_0x2df256[_0xdc1c('0x36')];if(!_0xb77c16['query'][_0xdc1c('0x38')](_0xdc1c('0x39'))){_0x306be2[_0xdc1c('0x1f')]=qs[_0xdc1c('0x1f')](_0xb77c16[_0xdc1c('0x32')][_0xdc1c('0x1f')]);_0x306be2[_0xdc1c('0x1d')]=qs['offset'](_0xb77c16[_0xdc1c('0x32')][_0xdc1c('0x1d')]);}_0x306be2[_0xdc1c('0x3a')]=qs[_0xdc1c('0x3b')](_0xb77c16[_0xdc1c('0x32')]['sort']);_0x306be2[_0xdc1c('0x3c')]=qs[_0xdc1c('0x34')](_[_0xdc1c('0x3d')](_0xb77c16[_0xdc1c('0x32')],_0x2df256[_0xdc1c('0x34')]),_0x4a320c);if(_0xb77c16['query'][_0xdc1c('0x3e')]){_0x306be2[_0xdc1c('0x3c')]=_[_0xdc1c('0x3f')](_0x306be2[_0xdc1c('0x3c')],{'$or':_[_0xdc1c('0x31')](_0x4a320c,function(_0xc527e3){if(_0xc527e3['type']!==_0xdc1c('0x40')){var _0x324615={};_0x324615[_0xc527e3['name']]={'$like':'%'+_0xb77c16[_0xdc1c('0x32')][_0xdc1c('0x3e')]+'%'};return _0x324615;}})});}_0x306be2=_[_0xdc1c('0x3f')]({},_0x306be2,_0xb77c16[_0xdc1c('0x41')]);var _0x3ab0cf={'where':_0x306be2[_0xdc1c('0x3c')]};return db['ZendeskField'][_0xdc1c('0x20')](_0x3ab0cf)[_0xdc1c('0x26')](function(_0x395461){_0x48eb9a[_0xdc1c('0x20')]=_0x395461;if(_0xb77c16['query'][_0xdc1c('0x42')]){_0x306be2[_0xdc1c('0x43')]=[{'all':!![]}];}return db[_0xdc1c('0x2c')]['findAll'](_0x306be2);})[_0xdc1c('0x26')](function(_0x131186){_0x48eb9a[_0xdc1c('0x44')]=_0x131186;return _0x48eb9a;})[_0xdc1c('0x26')](respondWithFilteredResult(_0x30bd89,_0x306be2))[_0xdc1c('0x45')](handleError(_0x30bd89,null));};exports[_0xdc1c('0x46')]=function(_0x3c3cf1,_0x4d4c93){var _0xd1ec27={'raw':!![],'where':{'id':_0x3c3cf1[_0xdc1c('0x47')]['id']}},_0x29bc80={};_0x29bc80[_0xdc1c('0x36')]=_[_0xdc1c('0x33')](db['ZendeskField'][_0xdc1c('0x2d')]);_0x29bc80[_0xdc1c('0x32')]=_[_0xdc1c('0x33')](_0x3c3cf1[_0xdc1c('0x32')]);_0x29bc80[_0xdc1c('0x34')]=_['intersection'](_0x29bc80[_0xdc1c('0x36')],_0x29bc80[_0xdc1c('0x32')]);_0xd1ec27[_0xdc1c('0x35')]=_[_0xdc1c('0x48')](_0x29bc80[_0xdc1c('0x36')],qs[_0xdc1c('0x37')](_0x3c3cf1[_0xdc1c('0x32')][_0xdc1c('0x37')]));_0xd1ec27[_0xdc1c('0x35')]=_0xd1ec27[_0xdc1c('0x35')]['length']?_0xd1ec27['attributes']:_0x29bc80[_0xdc1c('0x36')];if(_0x3c3cf1['query'][_0xdc1c('0x42')]){_0xd1ec27[_0xdc1c('0x43')]=[{'all':!![]}];}_0xd1ec27=_[_0xdc1c('0x3f')]({},_0xd1ec27,_0x3c3cf1[_0xdc1c('0x41')]);return db[_0xdc1c('0x2c')][_0xdc1c('0x49')](_0xd1ec27)[_0xdc1c('0x26')](handleEntityNotFound(_0x4d4c93,null))[_0xdc1c('0x26')](respondWithResult(_0x4d4c93,null))[_0xdc1c('0x45')](handleError(_0x4d4c93,null));};exports['create']=function(_0x3ea884,_0x4021c1){return db[_0xdc1c('0x2c')]['create'](_0x3ea884[_0xdc1c('0x4a')],{})[_0xdc1c('0x26')](respondWithResult(_0x4021c1,0xc9))['catch'](handleError(_0x4021c1,null));};exports[_0xdc1c('0x25')]=function(_0x4897e7,_0x21ecef){if(_0x4897e7['body']['id']){delete _0x4897e7[_0xdc1c('0x4a')]['id'];}return db['ZendeskField'][_0xdc1c('0x49')]({'where':{'id':_0x4897e7[_0xdc1c('0x47')]['id']}})[_0xdc1c('0x26')](handleEntityNotFound(_0x21ecef,null))[_0xdc1c('0x26')](saveUpdates(_0x4897e7[_0xdc1c('0x4a')],null))[_0xdc1c('0x26')](respondWithResult(_0x21ecef,null))[_0xdc1c('0x45')](handleError(_0x21ecef,null));};exports['destroy']=function(_0xc7c018,_0x338323){return db[_0xdc1c('0x2c')][_0xdc1c('0x49')]({'where':{'id':_0xc7c018['params']['id']}})['then'](handleEntityNotFound(_0x338323,null))[_0xdc1c('0x26')](removeEntity(_0x338323,null))[_0xdc1c('0x45')](handleError(_0x338323,null));}; \ No newline at end of file diff --git a/server/api/intZendeskField/intZendeskField.model.js b/server/api/intZendeskField/intZendeskField.model.js index b834a31..c76a9ac 100644 --- a/server/api/intZendeskField/intZendeskField.model.js +++ b/server/api/intZendeskField/intZendeskField.model.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x3b2b=['../../config/logger','path','rimraf','./intZendeskField.attributes','exports','define','int_zendesk_fields','zendesk_unique_index','idField','FieldId','lodash','util'];(function(_0x2c3a8f,_0x374e56){var _0x189412=function(_0x560055){while(--_0x560055){_0x2c3a8f['push'](_0x2c3a8f['shift']());}};_0x189412(++_0x374e56);}(_0x3b2b,0x112));var _0xb3b2=function(_0x3826ad,_0x49a30d){_0x3826ad=_0x3826ad-0x0;var _0x17b900=_0x3b2b[_0x3826ad];return _0x17b900;};'use strict';var _=require(_0xb3b2('0x0'));var util=require(_0xb3b2('0x1'));var logger=require(_0xb3b2('0x2'))('api');var moment=require('moment');var BPromise=require('bluebird');var rp=require('request-promise');var fs=require('fs');var path=require(_0xb3b2('0x3'));var rimraf=require(_0xb3b2('0x4'));var config=require('../../config/environment');var attributes=require(_0xb3b2('0x5'));module[_0xb3b2('0x6')]=function(_0x3bd44c,_0x22a1d6){return _0x3bd44c[_0xb3b2('0x7')]('ZendeskField',attributes,{'tableName':_0xb3b2('0x8'),'paranoid':![],'indexes':[{'name':_0xb3b2('0x9'),'fields':[_0xb3b2('0xa'),_0xb3b2('0xb')],'unique':!![]}],'timestamps':!![]});}; \ No newline at end of file +var _0x4b83=['lodash','util','../../config/logger','api','bluebird','request-promise','path','rimraf','../../config/environment','./intZendeskField.attributes','define','int_zendesk_fields','FieldId'];(function(_0x539b71,_0x4daf0b){var _0x3d1a59=function(_0x1a59ed){while(--_0x1a59ed){_0x539b71['push'](_0x539b71['shift']());}};_0x3d1a59(++_0x4daf0b);}(_0x4b83,0xea));var _0x34b8=function(_0x4c5493,_0x5428da){_0x4c5493=_0x4c5493-0x0;var _0x4b0a4b=_0x4b83[_0x4c5493];return _0x4b0a4b;};'use strict';var _=require(_0x34b8('0x0'));var util=require(_0x34b8('0x1'));var logger=require(_0x34b8('0x2'))(_0x34b8('0x3'));var moment=require('moment');var BPromise=require(_0x34b8('0x4'));var rp=require(_0x34b8('0x5'));var fs=require('fs');var path=require(_0x34b8('0x6'));var rimraf=require(_0x34b8('0x7'));var config=require(_0x34b8('0x8'));var attributes=require(_0x34b8('0x9'));module['exports']=function(_0x1eaa85,_0x4a8234){return _0x1eaa85[_0x34b8('0xa')]('ZendeskField',attributes,{'tableName':_0x34b8('0xb'),'paranoid':![],'indexes':[{'name':'zendesk_unique_index','fields':['idField',_0x34b8('0xc')],'unique':!![]}],'timestamps':!![]});}; \ No newline at end of file diff --git a/server/api/intZendeskField/intZendeskField.rpc.js b/server/api/intZendeskField/intZendeskField.rpc.js index 001d1b3..b4be5ae 100644 --- a/server/api/intZendeskField/intZendeskField.rpc.js +++ b/server/api/intZendeskField/intZendeskField.rpc.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x5247=['catch','lodash','util','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','request','info','debug','ZendeskField,\x20%s,\x20%s,\x20%s','request\x20sent','error','message','ZendeskField,\x20%s,\x20%s','result'];(function(_0x1eca7e,_0x38b415){var _0x55cd02=function(_0x5ae68d){while(--_0x5ae68d){_0x1eca7e['push'](_0x1eca7e['shift']());}};_0x55cd02(++_0x38b415);}(_0x5247,0x143));var _0x7524=function(_0x9bf153,_0x3b8c8a){_0x9bf153=_0x9bf153-0x0;var _0x36af78=_0x5247[_0x9bf153];return _0x36af78;};'use strict';var _=require(_0x7524('0x0'));var util=require(_0x7524('0x1'));var moment=require('moment');var BPromise=require(_0x7524('0x2'));var rs=require(_0x7524('0x3'));var fs=require('fs');var Redis=require(_0x7524('0x4'));var db=require(_0x7524('0x5'))['db'];var utils=require(_0x7524('0x6'));var logger=require(_0x7524('0x7'))(_0x7524('0x8'));var config=require(_0x7524('0x9'));var jayson=require(_0x7524('0xa'));var client=jayson[_0x7524('0xb')][_0x7524('0xc')]({'port':0x232a});function respondWithRpcPromise(_0x36af48,_0x4c6ca5,_0x4796e0){return new BPromise(function(_0x1cd518,_0x2b4475){return client[_0x7524('0xd')](_0x36af48,_0x4796e0)['then'](function(_0x52c35a){logger[_0x7524('0xe')]('ZendeskField,\x20%s,\x20%s',_0x4c6ca5,'request\x20sent');logger[_0x7524('0xf')](_0x7524('0x10'),_0x4c6ca5,_0x7524('0x11'),JSON['stringify'](_0x52c35a));if(_0x52c35a['error']){if(_0x52c35a['error']['code']===0x1f4){logger[_0x7524('0x12')]('ZendeskField,\x20%s,\x20%s',_0x4c6ca5,_0x52c35a[_0x7524('0x12')][_0x7524('0x13')]);return _0x2b4475(_0x52c35a['error'][_0x7524('0x13')]);}logger[_0x7524('0x12')]('ZendeskField,\x20%s,\x20%s',_0x4c6ca5,_0x52c35a[_0x7524('0x12')][_0x7524('0x13')]);return _0x1cd518(_0x52c35a[_0x7524('0x12')]['message']);}else{logger[_0x7524('0xe')](_0x7524('0x14'),_0x4c6ca5,'request\x20sent');_0x1cd518(_0x52c35a[_0x7524('0x15')][_0x7524('0x13')]);}})[_0x7524('0x16')](function(_0x5bf00c){logger['error'](_0x7524('0x14'),_0x4c6ca5,_0x5bf00c);_0x2b4475(_0x5bf00c);});});} \ No newline at end of file +var _0xb604=['debug','stringify','error','code','message','info','result','catch','lodash','util','moment','bluebird','randomstring','ioredis','../../config/utils','rpc','../../config/environment','jayson/promise','client','http','ZendeskField,\x20%s,\x20%s','request\x20sent'];(function(_0x4d7c82,_0x2f2fff){var _0x173bf7=function(_0x564926){while(--_0x564926){_0x4d7c82['push'](_0x4d7c82['shift']());}};_0x173bf7(++_0x2f2fff);}(_0xb604,0xb8));var _0x4b60=function(_0x245b57,_0x420f33){_0x245b57=_0x245b57-0x0;var _0x1d07d9=_0xb604[_0x245b57];return _0x1d07d9;};'use strict';var _=require(_0x4b60('0x0'));var util=require(_0x4b60('0x1'));var moment=require(_0x4b60('0x2'));var BPromise=require(_0x4b60('0x3'));var rs=require(_0x4b60('0x4'));var fs=require('fs');var Redis=require(_0x4b60('0x5'));var db=require('../../mysqldb')['db'];var utils=require(_0x4b60('0x6'));var logger=require('../../config/logger')(_0x4b60('0x7'));var config=require(_0x4b60('0x8'));var jayson=require(_0x4b60('0x9'));var client=jayson[_0x4b60('0xa')][_0x4b60('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x129eb9,_0x23e265,_0x8416ed){return new BPromise(function(_0x422cde,_0x164e72){return client['request'](_0x129eb9,_0x8416ed)['then'](function(_0xba7625){logger['info'](_0x4b60('0xc'),_0x23e265,_0x4b60('0xd'));logger[_0x4b60('0xe')]('ZendeskField,\x20%s,\x20%s,\x20%s',_0x23e265,_0x4b60('0xd'),JSON[_0x4b60('0xf')](_0xba7625));if(_0xba7625[_0x4b60('0x10')]){if(_0xba7625[_0x4b60('0x10')][_0x4b60('0x11')]===0x1f4){logger[_0x4b60('0x10')](_0x4b60('0xc'),_0x23e265,_0xba7625[_0x4b60('0x10')][_0x4b60('0x12')]);return _0x164e72(_0xba7625[_0x4b60('0x10')][_0x4b60('0x12')]);}logger['error'](_0x4b60('0xc'),_0x23e265,_0xba7625[_0x4b60('0x10')]['message']);return _0x422cde(_0xba7625[_0x4b60('0x10')][_0x4b60('0x12')]);}else{logger[_0x4b60('0x13')](_0x4b60('0xc'),_0x23e265,_0x4b60('0xd'));_0x422cde(_0xba7625[_0x4b60('0x14')][_0x4b60('0x12')]);}})[_0x4b60('0x15')](function(_0x2554af){logger['error'](_0x4b60('0xc'),_0x23e265,_0x2554af);_0x164e72(_0x2554af);});});} \ No newline at end of file diff --git a/server/api/intZohoAccount/index.js b/server/api/intZohoAccount/index.js index 7e1a9fe..8bc087d 100644 --- a/server/api/intZohoAccount/index.js +++ b/server/api/intZohoAccount/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xa873=['../../config/environment','./intZohoAccount.controller','index','get','isAuthenticated','show','getConfigurations','/:id/fields','post','/:id/configurations','addConfiguration','put','/:id','update','destroy','exports','util','path','connect-timeout','Router','fs-extra','../../components/interaction/service'];(function(_0x411374,_0x14dfca){var _0x4bc10d=function(_0x3333dc){while(--_0x3333dc){_0x411374['push'](_0x411374['shift']());}};_0x4bc10d(++_0x14dfca);}(_0xa873,0x94));var _0x3a87=function(_0x3b24a3,_0x1dd129){_0x3b24a3=_0x3b24a3-0x0;var _0x2b1585=_0xa873[_0x3b24a3];return _0x2b1585;};'use strict';var multer=require('multer');var util=require(_0x3a87('0x0'));var path=require(_0x3a87('0x1'));var timeout=require(_0x3a87('0x2'));var express=require('express');var router=express[_0x3a87('0x3')]();var fs_extra=require(_0x3a87('0x4'));var auth=require('../../components/auth/service');var interaction=require(_0x3a87('0x5'));var config=require(_0x3a87('0x6'));var controller=require(_0x3a87('0x7'));router['get']('/',auth['isAuthenticated'](),controller[_0x3a87('0x8')]);router[_0x3a87('0x9')]('/:id',auth[_0x3a87('0xa')](),controller[_0x3a87('0xb')]);router[_0x3a87('0x9')]('/:id/configurations',auth[_0x3a87('0xa')](),controller[_0x3a87('0xc')]);router[_0x3a87('0x9')](_0x3a87('0xd'),auth['isAuthenticated'](),controller['getFields']);router['post']('/',auth['isAuthenticated'](),controller['create']);router[_0x3a87('0xe')](_0x3a87('0xf'),auth['isAuthenticated'](),controller[_0x3a87('0x10')]);router[_0x3a87('0x11')](_0x3a87('0x12'),auth[_0x3a87('0xa')](),controller[_0x3a87('0x13')]);router['delete']('/:id',auth[_0x3a87('0xa')](),controller[_0x3a87('0x14')]);module[_0x3a87('0x15')]=router; \ No newline at end of file +var _0xbe43=['/:id','show','get','/:id/configurations','getConfigurations','post','addConfiguration','put','update','delete','destroy','exports','multer','util','path','connect-timeout','express','Router','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','./intZohoAccount.controller','isAuthenticated'];(function(_0x58a4ac,_0x43fd42){var _0x545810=function(_0x308e65){while(--_0x308e65){_0x58a4ac['push'](_0x58a4ac['shift']());}};_0x545810(++_0x43fd42);}(_0xbe43,0x1bc));var _0x3be4=function(_0x52693e,_0x110211){_0x52693e=_0x52693e-0x0;var _0x553c56=_0xbe43[_0x52693e];return _0x553c56;};'use strict';var multer=require(_0x3be4('0x0'));var util=require(_0x3be4('0x1'));var path=require(_0x3be4('0x2'));var timeout=require(_0x3be4('0x3'));var express=require(_0x3be4('0x4'));var router=express[_0x3be4('0x5')]();var fs_extra=require(_0x3be4('0x6'));var auth=require(_0x3be4('0x7'));var interaction=require(_0x3be4('0x8'));var config=require(_0x3be4('0x9'));var controller=require(_0x3be4('0xa'));router['get']('/',auth[_0x3be4('0xb')](),controller['index']);router['get'](_0x3be4('0xc'),auth[_0x3be4('0xb')](),controller[_0x3be4('0xd')]);router[_0x3be4('0xe')](_0x3be4('0xf'),auth['isAuthenticated'](),controller[_0x3be4('0x10')]);router[_0x3be4('0xe')]('/:id/fields',auth['isAuthenticated'](),controller['getFields']);router[_0x3be4('0x11')]('/',auth[_0x3be4('0xb')](),controller['create']);router[_0x3be4('0x11')](_0x3be4('0xf'),auth[_0x3be4('0xb')](),controller[_0x3be4('0x12')]);router[_0x3be4('0x13')](_0x3be4('0xc'),auth[_0x3be4('0xb')](),controller[_0x3be4('0x14')]);router[_0x3be4('0x15')]('/:id',auth[_0x3be4('0xb')](),controller[_0x3be4('0x16')]);module[_0x3be4('0x17')]=router; \ No newline at end of file diff --git a/server/api/intZohoAccount/intZohoAccount.attributes.js b/server/api/intZohoAccount/intZohoAccount.attributes.js index bd1a149..02e1e6d 100644 --- a/server/api/intZohoAccount/intZohoAccount.attributes.js +++ b/server/api/intZohoAccount/intZohoAccount.attributes.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xd2ea=['sequelize','exports','STRING'];(function(_0x32b542,_0x4512fa){var _0x554d54=function(_0x35cdfc){while(--_0x35cdfc){_0x32b542['push'](_0x32b542['shift']());}};_0x554d54(++_0x4512fa);}(_0xd2ea,0x15f));var _0xad2e=function(_0x1c4ce8,_0x32930f){_0x1c4ce8=_0x1c4ce8-0x0;var _0x1150c1=_0xd2ea[_0x1c4ce8];return _0x1150c1;};'use strict';var Sequelize=require(_0xad2e('0x0'));module[_0xad2e('0x1')]={'name':{'type':Sequelize[_0xad2e('0x2')]},'description':{'type':Sequelize[_0xad2e('0x2')]},'host':{'type':Sequelize[_0xad2e('0x2')]},'zone':{'type':Sequelize['STRING']},'clientId':{'type':Sequelize[_0xad2e('0x2')]},'clientSecret':{'type':Sequelize[_0xad2e('0x2')]},'serverUrl':{'type':Sequelize[_0xad2e('0x2')],'allowNull':![]},'code':{'type':Sequelize[_0xad2e('0x2')]},'refreshToken':{'type':Sequelize[_0xad2e('0x2')]}}; \ No newline at end of file +var _0xb821=['STRING','exports'];(function(_0x1780f8,_0x11ba93){var _0x33a410=function(_0x2a015f){while(--_0x2a015f){_0x1780f8['push'](_0x1780f8['shift']());}};_0x33a410(++_0x11ba93);}(_0xb821,0xa7));var _0x1b82=function(_0x126878,_0x1e7e93){_0x126878=_0x126878-0x0;var _0x63f30f=_0xb821[_0x126878];return _0x63f30f;};'use strict';var Sequelize=require('sequelize');module[_0x1b82('0x0')]={'name':{'type':Sequelize[_0x1b82('0x1')]},'description':{'type':Sequelize['STRING']},'host':{'type':Sequelize['STRING']},'zone':{'type':Sequelize[_0x1b82('0x1')]},'clientId':{'type':Sequelize['STRING']},'clientSecret':{'type':Sequelize['STRING']},'serverUrl':{'type':Sequelize[_0x1b82('0x1')],'allowNull':![]},'code':{'type':Sequelize[_0x1b82('0x1')]},'refreshToken':{'type':Sequelize[_0x1b82('0x1')]}}; \ No newline at end of file diff --git a/server/api/intZohoAccount/intZohoAccount.controller.js b/server/api/intZohoAccount/intZohoAccount.controller.js index 32a8b7a..4129c5b 100644 --- a/server/api/intZohoAccount/intZohoAccount.controller.js +++ b/server/api/intZohoAccount/intZohoAccount.controller.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xea39=['Calls','Zoho-oauthtoken\x20','response','error','message','Owner','Subject','Description','WhoId','Call_Duration','Call_Start_Time','Call_Type','remove','includes','api_name','push','display_label','data_type','picklist','pick_list_values','statusCode','getFields,\x20%s,\x20%s,\x20%s','getFields','stringify','Wrong\x20credentials','eml-format','request-promise','moment','bluebird','mustache','util','path','sox','to-csv','fs-extra','lodash','squel','crypto','jsforce','papaparse','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','../../components/integrations/configuration','end','status','json','limit','undefined','count','offset','set','Content-Range','reject','update','then','sendStatus','stack','name','index','map','ZohoAccount','rawAttributes','type','key','query','keys','filters','model','attributes','intersection','fields','length','hasOwnProperty','sort','where','pick','filter','merge','VIRTUAL','options','includeAll','include','rows','catch','show','params','find','create','body','destroy','getConfigurations','findOne','ZohoConfiguration','order','nolimit','addConfiguration','AccountId','getSubjects','getDescriptions','channel','ZohoField','Subjects','Descriptions','zone','https://accounts.zoho.com','https://accounts.zoho.in','https://accounts.zoho.com.cn','https://accounts.zoho.eu','POST','/oauth/v2/token','clientSecret','refresh_token','access_token','Unable\x20to\x20retrieve\x20the\x20access\x20token','host','clientId','code','refreshToken','zoho.eu','serverUrl','slice','lastIndexOf','GET','format','https://www.zohoapis.%s/crm/v2/settings/fields'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0xea39,0x11d));var _0x9ea3=function(_0x7de84,_0x15a0af){_0x7de84=_0x7de84-0x0;var _0x4bd521=_0xea39[_0x7de84];return _0x4bd521;};'use strict';var emlformat=require(_0x9ea3('0x0'));var rimraf=require('rimraf');var zipdir=require('zip-dir');var jsonpatch=require('fast-json-patch');var rp=require(_0x9ea3('0x1'));var moment=require(_0x9ea3('0x2'));var BPromise=require(_0x9ea3('0x3'));var Mustache=require(_0x9ea3('0x4'));var util=require(_0x9ea3('0x5'));var path=require(_0x9ea3('0x6'));var sox=require(_0x9ea3('0x7'));var csv=require(_0x9ea3('0x8'));var ejs=require('ejs');var fs=require('fs');var fs_extra=require(_0x9ea3('0x9'));var _=require(_0x9ea3('0xa'));var squel=require(_0x9ea3('0xb'));var crypto=require(_0x9ea3('0xc'));var jsforce=require(_0x9ea3('0xd'));var deskjs=require('desk.js');var toCsv=require(_0x9ea3('0x8'));var querystring=require('querystring');var Papa=require(_0x9ea3('0xe'));var Redis=require('ioredis');var authService=require(_0x9ea3('0xf'));var qs=require(_0x9ea3('0x10'));var as=require(_0x9ea3('0x11'));var hardwareService=require(_0x9ea3('0x12'));var logger=require(_0x9ea3('0x13'))(_0x9ea3('0x14'));var utils=require(_0x9ea3('0x15'));var config=require('../../config/environment');var licenseUtil=require('../../config/license/util');var db=require('../../mysqldb')['db'];var integrations=require(_0x9ea3('0x16'));function respondWithStatusCode(_0x4ad9b1,_0x438eec){_0x438eec=_0x438eec||0xcc;return function(_0x21ca50){if(_0x21ca50){return _0x4ad9b1['sendStatus'](_0x438eec);}return _0x4ad9b1['status'](_0x438eec)[_0x9ea3('0x17')]();};}function respondWithResult(_0xc8d2f4,_0xa9380){_0xa9380=_0xa9380||0xc8;return function(_0xd63f67){if(_0xd63f67){return _0xc8d2f4[_0x9ea3('0x18')](_0xa9380)[_0x9ea3('0x19')](_0xd63f67);}};}function respondWithFilteredResult(_0x3a2a33,_0x1b8f54){return function(_0xddac13){if(_0xddac13){var _0x15fb78=typeof _0x1b8f54['offset']==='undefined'&&typeof _0x1b8f54[_0x9ea3('0x1a')]===_0x9ea3('0x1b');var _0x3964af=_0xddac13[_0x9ea3('0x1c')];var _0x184166=_0x15fb78?0x0:_0x1b8f54[_0x9ea3('0x1d')];var _0x728d4d=_0x15fb78?_0xddac13['count']:_0x1b8f54[_0x9ea3('0x1d')]+_0x1b8f54[_0x9ea3('0x1a')];var _0x38d175;if(_0x728d4d>=_0x3964af){_0x728d4d=_0x3964af;_0x38d175=0xc8;}else{_0x38d175=0xce;}_0x3a2a33[_0x9ea3('0x18')](_0x38d175);return _0x3a2a33[_0x9ea3('0x1e')](_0x9ea3('0x1f'),_0x184166+'-'+_0x728d4d+'/'+_0x3964af)[_0x9ea3('0x19')](_0xddac13);}return null;};}function patchUpdates(_0x208857){return function(_0x250670){try{jsonpatch['apply'](_0x250670,_0x208857,!![]);}catch(_0x391006){return BPromise[_0x9ea3('0x20')](_0x391006);}return _0x250670['save']();};}function saveUpdates(_0x789472,_0x59cee3){return function(_0x3c208e){if(_0x3c208e){return _0x3c208e[_0x9ea3('0x21')](_0x789472)[_0x9ea3('0x22')](function(_0xb18d88){return _0xb18d88;});}return null;};}function removeEntity(_0x80ec40,_0x25d541){return function(_0xc3a4eb){if(_0xc3a4eb){return _0xc3a4eb['destroy']()[_0x9ea3('0x22')](function(){_0x80ec40[_0x9ea3('0x18')](0xcc)['end']();});}};}function handleEntityNotFound(_0x3cfefd,_0xab2041){return function(_0x27d4c7){if(!_0x27d4c7){_0x3cfefd[_0x9ea3('0x23')](0x194);}return _0x27d4c7;};}function handleError(_0x4a38a4,_0x5c9049){_0x5c9049=_0x5c9049||0x1f4;return function(_0x1015bf){logger['error'](_0x1015bf[_0x9ea3('0x24')]);if(_0x1015bf[_0x9ea3('0x25')]){delete _0x1015bf['name'];}_0x4a38a4[_0x9ea3('0x18')](_0x5c9049)['send'](_0x1015bf);};}exports[_0x9ea3('0x26')]=function(_0x11be36,_0x32f86e){var _0x3f3f3c={},_0x323051={},_0x5709bb={'count':0x0,'rows':[]};var _0x6406a6=_[_0x9ea3('0x27')](db[_0x9ea3('0x28')][_0x9ea3('0x29')],function(_0x328ff7){return{'name':_0x328ff7['fieldName'],'type':_0x328ff7[_0x9ea3('0x2a')][_0x9ea3('0x2b')]};});_0x323051['model']=_[_0x9ea3('0x27')](_0x6406a6,_0x9ea3('0x25'));_0x323051[_0x9ea3('0x2c')]=_[_0x9ea3('0x2d')](_0x11be36['query']);_0x323051[_0x9ea3('0x2e')]=_['intersection'](_0x323051[_0x9ea3('0x2f')],_0x323051[_0x9ea3('0x2c')]);_0x3f3f3c[_0x9ea3('0x30')]=_[_0x9ea3('0x31')](_0x323051[_0x9ea3('0x2f')],qs[_0x9ea3('0x32')](_0x11be36['query']['fields']));_0x3f3f3c[_0x9ea3('0x30')]=_0x3f3f3c[_0x9ea3('0x30')][_0x9ea3('0x33')]?_0x3f3f3c[_0x9ea3('0x30')]:_0x323051[_0x9ea3('0x2f')];if(!_0x11be36['query'][_0x9ea3('0x34')]('nolimit')){_0x3f3f3c[_0x9ea3('0x1a')]=qs[_0x9ea3('0x1a')](_0x11be36['query']['limit']);_0x3f3f3c['offset']=qs['offset'](_0x11be36[_0x9ea3('0x2c')][_0x9ea3('0x1d')]);}_0x3f3f3c['order']=qs[_0x9ea3('0x35')](_0x11be36['query'][_0x9ea3('0x35')]);_0x3f3f3c[_0x9ea3('0x36')]=qs[_0x9ea3('0x2e')](_[_0x9ea3('0x37')](_0x11be36[_0x9ea3('0x2c')],_0x323051[_0x9ea3('0x2e')]),_0x6406a6);if(_0x11be36[_0x9ea3('0x2c')][_0x9ea3('0x38')]){_0x3f3f3c[_0x9ea3('0x36')]=_[_0x9ea3('0x39')](_0x3f3f3c[_0x9ea3('0x36')],{'$or':_[_0x9ea3('0x27')](_0x6406a6,function(_0x5529fd){if(_0x5529fd['type']!==_0x9ea3('0x3a')){var _0x2e1bbc={};_0x2e1bbc[_0x5529fd['name']]={'$like':'%'+_0x11be36[_0x9ea3('0x2c')][_0x9ea3('0x38')]+'%'};return _0x2e1bbc;}})});}_0x3f3f3c=_[_0x9ea3('0x39')]({},_0x3f3f3c,_0x11be36[_0x9ea3('0x3b')]);var _0x450db6={'where':_0x3f3f3c[_0x9ea3('0x36')]};return db['ZohoAccount'][_0x9ea3('0x1c')](_0x450db6)['then'](function(_0x239925){_0x5709bb[_0x9ea3('0x1c')]=_0x239925;if(_0x11be36[_0x9ea3('0x2c')][_0x9ea3('0x3c')]){_0x3f3f3c[_0x9ea3('0x3d')]=[{'all':!![]}];}return db[_0x9ea3('0x28')]['findAll'](_0x3f3f3c);})[_0x9ea3('0x22')](function(_0x4a69d1){_0x5709bb[_0x9ea3('0x3e')]=_0x4a69d1;return _0x5709bb;})[_0x9ea3('0x22')](respondWithFilteredResult(_0x32f86e,_0x3f3f3c))[_0x9ea3('0x3f')](handleError(_0x32f86e,null));};exports[_0x9ea3('0x40')]=function(_0x3bf115,_0x344a35){var _0x14bad4={'raw':![],'where':{'id':_0x3bf115[_0x9ea3('0x41')]['id']}},_0x3e0de1={};_0x3e0de1[_0x9ea3('0x2f')]=_[_0x9ea3('0x2d')](db[_0x9ea3('0x28')][_0x9ea3('0x29')]);_0x3e0de1['query']=_[_0x9ea3('0x2d')](_0x3bf115[_0x9ea3('0x2c')]);_0x3e0de1[_0x9ea3('0x2e')]=_[_0x9ea3('0x31')](_0x3e0de1['model'],_0x3e0de1[_0x9ea3('0x2c')]);_0x14bad4[_0x9ea3('0x30')]=_[_0x9ea3('0x31')](_0x3e0de1[_0x9ea3('0x2f')],qs[_0x9ea3('0x32')](_0x3bf115[_0x9ea3('0x2c')][_0x9ea3('0x32')]));_0x14bad4['attributes']=_0x14bad4[_0x9ea3('0x30')][_0x9ea3('0x33')]?_0x14bad4['attributes']:_0x3e0de1[_0x9ea3('0x2f')];if(_0x3bf115[_0x9ea3('0x2c')][_0x9ea3('0x3c')]){_0x14bad4['include']=[{'all':!![]}];}_0x14bad4=_[_0x9ea3('0x39')]({},_0x14bad4,_0x3bf115[_0x9ea3('0x3b')]);return db['ZohoAccount'][_0x9ea3('0x42')](_0x14bad4)['then'](handleEntityNotFound(_0x344a35,null))['then'](respondWithResult(_0x344a35,null))['catch'](handleError(_0x344a35,null));};exports[_0x9ea3('0x43')]=function(_0xed0e7,_0x428673){return db[_0x9ea3('0x28')][_0x9ea3('0x43')](_0xed0e7[_0x9ea3('0x44')],{})['then'](respondWithResult(_0x428673,0xc9))[_0x9ea3('0x3f')](handleError(_0x428673,null));};exports[_0x9ea3('0x21')]=function(_0x27f1c7,_0x443049){if(_0x27f1c7['body']['id']){delete _0x27f1c7[_0x9ea3('0x44')]['id'];}return db[_0x9ea3('0x28')]['find']({'where':{'id':_0x27f1c7[_0x9ea3('0x41')]['id']}})[_0x9ea3('0x22')](handleEntityNotFound(_0x443049,null))['then'](saveUpdates(_0x27f1c7['body'],null))[_0x9ea3('0x22')](respondWithResult(_0x443049,null))['catch'](handleError(_0x443049,null));};exports[_0x9ea3('0x45')]=function(_0x33bf59,_0x2e8a6b){return db[_0x9ea3('0x28')][_0x9ea3('0x42')]({'where':{'id':_0x33bf59[_0x9ea3('0x41')]['id']}})[_0x9ea3('0x22')](handleEntityNotFound(_0x2e8a6b,null))[_0x9ea3('0x22')](removeEntity(_0x2e8a6b,null))[_0x9ea3('0x3f')](handleError(_0x2e8a6b,null));};exports[_0x9ea3('0x46')]=function(_0x574762,_0x34d633,_0x516279){var _0x202579={};var _0x1eee4e={};var _0xe0508a;var _0x483f3a;return db[_0x9ea3('0x28')][_0x9ea3('0x47')]({'where':{'id':_0x574762[_0x9ea3('0x41')]['id']}})['then'](handleEntityNotFound(_0x34d633,null))['then'](function(_0x2561d2){if(_0x2561d2){_0xe0508a=_0x2561d2;_0x1eee4e[_0x9ea3('0x2f')]=_[_0x9ea3('0x2d')](db[_0x9ea3('0x48')][_0x9ea3('0x29')]);_0x1eee4e[_0x9ea3('0x2c')]=_['keys'](_0x574762[_0x9ea3('0x2c')]);_0x1eee4e[_0x9ea3('0x2e')]=_[_0x9ea3('0x31')](_0x1eee4e[_0x9ea3('0x2f')],_0x1eee4e[_0x9ea3('0x2c')]);_0x202579[_0x9ea3('0x30')]=_['intersection'](_0x1eee4e[_0x9ea3('0x2f')],qs[_0x9ea3('0x32')](_0x574762[_0x9ea3('0x2c')][_0x9ea3('0x32')]));_0x202579[_0x9ea3('0x30')]=_0x202579[_0x9ea3('0x30')][_0x9ea3('0x33')]?_0x202579['attributes']:_0x1eee4e['model'];_0x202579[_0x9ea3('0x49')]=qs[_0x9ea3('0x35')](_0x574762[_0x9ea3('0x2c')][_0x9ea3('0x35')]);_0x202579[_0x9ea3('0x36')]=qs[_0x9ea3('0x2e')](_[_0x9ea3('0x37')](_0x574762['query'],_0x1eee4e['filters']));if(_0x574762[_0x9ea3('0x2c')][_0x9ea3('0x38')]){_0x202579[_0x9ea3('0x36')]=_[_0x9ea3('0x39')](_0x202579['where'],{'$or':_[_0x9ea3('0x27')](_0x202579[_0x9ea3('0x30')],function(_0x381304){var _0x140084={};_0x140084[_0x381304]={'$like':'%'+_0x574762[_0x9ea3('0x2c')]['filter']+'%'};return _0x140084;})});}_0x202579=_[_0x9ea3('0x39')]({},_0x202579,_0x574762['options']);return _0xe0508a[_0x9ea3('0x46')](_0x202579);}})[_0x9ea3('0x22')](function(_0x3b8874){if(_0x3b8874){_0x483f3a=_0x3b8874['length'];if(!_0x574762[_0x9ea3('0x2c')][_0x9ea3('0x34')](_0x9ea3('0x4a'))){_0x202579['limit']=qs[_0x9ea3('0x1a')](_0x574762[_0x9ea3('0x2c')][_0x9ea3('0x1a')]);_0x202579[_0x9ea3('0x1d')]=qs['offset'](_0x574762[_0x9ea3('0x2c')]['offset']);}return _0xe0508a['getConfigurations'](_0x202579);}})[_0x9ea3('0x22')](function(_0x1dcdb3){if(_0x1dcdb3){return _0x1dcdb3?{'count':_0x483f3a,'rows':_0x1dcdb3}:null;}})[_0x9ea3('0x22')](respondWithResult(_0x34d633,null))[_0x9ea3('0x3f')](handleError(_0x34d633,null));};exports[_0x9ea3('0x4b')]=function(_0x4fc1ee,_0x1f831a,_0x201233){if(_0x4fc1ee[_0x9ea3('0x44')]['id']){delete _0x4fc1ee['body']['id'];}return db[_0x9ea3('0x28')][_0x9ea3('0x47')]({'where':{'id':_0x4fc1ee[_0x9ea3('0x41')]['id']}})['then'](handleEntityNotFound(_0x1f831a,null))[_0x9ea3('0x22')](function(_0x53b1d3){if(_0x53b1d3){_0x4fc1ee[_0x9ea3('0x44')][_0x9ea3('0x4c')]=_0x53b1d3['id'];_0x4fc1ee[_0x9ea3('0x44')]['Subjects']=integrations[_0x9ea3('0x4d')](_0x4fc1ee['body']['channel'],_0x4fc1ee['body']['type']);_0x4fc1ee[_0x9ea3('0x44')]['Descriptions']=integrations[_0x9ea3('0x4e')](_0x4fc1ee[_0x9ea3('0x44')][_0x9ea3('0x4f')],_0x4fc1ee[_0x9ea3('0x44')][_0x9ea3('0x2a')]);return db['ZohoConfiguration'][_0x9ea3('0x43')](_0x4fc1ee['body'],{'include':[{'model':db[_0x9ea3('0x50')],'as':_0x9ea3('0x51')},{'model':db['ZohoField'],'as':_0x9ea3('0x52')}]});}return null;})[_0x9ea3('0x22')](respondWithResult(_0x1f831a,null))[_0x9ea3('0x3f')](handleError(_0x1f831a,null));};function getAccessToken(_0x5c3ef5){return new Promise(function(_0x3116c3,_0x123c5b){var _0x2b1a99;switch(_0x5c3ef5[_0x9ea3('0x53')]){case'US':_0x2b1a99=_0x9ea3('0x54');break;case'AU':_0x2b1a99='https://accounts.zoho.com.au';break;case'EU':_0x2b1a99='https://accounts.zoho.eu';break;case'IN':_0x2b1a99=_0x9ea3('0x55');break;case'CN':_0x2b1a99=_0x9ea3('0x56');break;default:_0x2b1a99=_0x9ea3('0x57');break;}var _0x28facc={'method':_0x9ea3('0x58'),'uri':_0x2b1a99+_0x9ea3('0x59'),'qs':{'refresh_token':_0x5c3ef5['refreshToken'],'client_id':_0x5c3ef5['clientId'],'client_secret':_0x5c3ef5[_0x9ea3('0x5a')],'grant_type':_0x9ea3('0x5b')},'json':!![]};return rp(_0x28facc)[_0x9ea3('0x22')](function(_0x5355a2){if(_0x5355a2[_0x9ea3('0x5c')]){_0x3116c3(_0x5355a2[_0x9ea3('0x5c')]);}else{_0x123c5b(_0x9ea3('0x5d'));}})['catch'](function(_0x1ebcb0){_0x123c5b(_0x1ebcb0);});});}exports['getFields']=function(_0x45546e,_0x3f9003,_0x421437){var _0x2369fa,_0x4b8aa8,_0x3b5688,_0x44aa39,_0x16575e;return db[_0x9ea3('0x28')][_0x9ea3('0x47')]({'where':{'id':_0x45546e[_0x9ea3('0x41')]['id']},'attributes':['id',_0x9ea3('0x5e'),_0x9ea3('0x53'),_0x9ea3('0x5f'),_0x9ea3('0x5a'),'serverUrl',_0x9ea3('0x60'),_0x9ea3('0x61')]})[_0x9ea3('0x22')](handleEntityNotFound(_0x3f9003,null))[_0x9ea3('0x22')](function(_0x1fd9a3){_0x16575e=_0x1fd9a3;_0x2369fa=_0x16575e['host'];_0x4b8aa8=_0x2369fa===_0x9ea3('0x62')?'eu':'com';_0x3b5688=_0x16575e[_0x9ea3('0x63')];var _0x11dfcf=_0x3b5688[_0x9ea3('0x64')](-0x1);if(_0x11dfcf==='/'||_0x11dfcf==='\x5c'||_0x11dfcf===':'){_0x3b5688=_0x3b5688['substring'](0x0,_0x3b5688[_0x9ea3('0x65')](_0x11dfcf));}if(!_0x16575e[_0x9ea3('0x61')]){throw new Error('Refresh\x20Token\x20not\x20available\x20for\x20the\x20account');}return getAccessToken(_0x16575e);})[_0x9ea3('0x22')](function(_0x3510d5){if(_0x3510d5){return rp({'method':_0x9ea3('0x66'),'uri':util[_0x9ea3('0x67')](_0x9ea3('0x68'),_0x4b8aa8),'qs':{'module':_0x9ea3('0x69')},'headers':{'Authorization':_0x9ea3('0x6a')+_0x3510d5},'json':!![]});}})['then'](function(_0x38b83d){if(_0x38b83d){if(_0x38b83d[_0x9ea3('0x6b')]&&_0x38b83d['response'][_0x9ea3('0x6c')]){throw new Error(_0x38b83d[_0x9ea3('0x6b')][_0x9ea3('0x6c')][_0x9ea3('0x6d')]);}var _0x2fb61f=[];var _0x39b169=[];var _0x403fc0=[_0x9ea3('0x6e'),_0x9ea3('0x6f'),_0x9ea3('0x70'),_0x9ea3('0x71'),_0x9ea3('0x72'),'Call_Result',_0x9ea3('0x73'),_0x9ea3('0x74')];_0x39b169=_[_0x9ea3('0x75')](_0x38b83d['fields'],function(_0x406e09){return _0x403fc0[_0x9ea3('0x76')](_0x406e09[_0x9ea3('0x77')]);});for(var _0x4b348c=0x0;_0x4b348c<_0x39b169[_0x9ea3('0x33')];_0x4b348c++){if(_0x39b169[_0x4b348c]['system_mandatory']===![]){_0x2fb61f[_0x9ea3('0x78')]({'id':_0x39b169[_0x4b348c]['id'],'name':_0x39b169[_0x4b348c][_0x9ea3('0x79')],'custom':_0x39b169[_0x4b348c]['custom_field'],'options':_0x39b169[_0x4b348c][_0x9ea3('0x7a')]===_0x9ea3('0x7b')&&_0x39b169[_0x4b348c][_0x9ea3('0x7c')][_0x9ea3('0x33')]>-0x1?_[_0x9ea3('0x27')](_0x39b169[_0x4b348c][_0x9ea3('0x7c')],function(_0x53637e){return{'name':_0x53637e,'value':_0x53637e};}):[]});}}return{'count':_0x2fb61f[_0x9ea3('0x33')],'rows':_0x2fb61f};}else{return{'count':0x0,'rows':[]};}})['then'](respondWithResult(_0x3f9003,null))[_0x9ea3('0x3f')](function(_0x5211c8){var _0x4d67c2=_0x45546e[_0x9ea3('0x2c')]['test']?0x1f4:_0x5211c8[_0x9ea3('0x7d')]||0x1f4;logger[_0x9ea3('0x6c')](_0x9ea3('0x7e'),_0x9ea3('0x7f'),_0x4d67c2,JSON[_0x9ea3('0x80')](_0x5211c8));delete _0x5211c8[_0x9ea3('0x25')];if(_0x4d67c2===0x191){_0x4d67c2=0x190;}_0x3f9003[_0x9ea3('0x18')](_0x4d67c2)['send'](_0x45546e['query']['test']?{'message':_0x9ea3('0x81'),'statusCode':_0x5211c8['statusCode']}:_0x5211c8);});}; \ No newline at end of file +var _0x2b77=['destroy','end','sendStatus','stack','name','send','index','map','fieldName','type','key','model','query','keys','filters','intersection','attributes','fields','length','hasOwnProperty','nolimit','order','sort','where','pick','merge','VIRTUAL','ZohoAccount','includeAll','include','params','rawAttributes','options','find','catch','create','body','getConfigurations','findOne','ZohoConfiguration','filter','AccountId','Subjects','Descriptions','getDescriptions','ZohoField','zone','https://accounts.zoho.com','https://accounts.zoho.com.au','https://accounts.zoho.eu','https://accounts.zoho.in','https://accounts.zoho.com.cn','POST','/oauth/v2/token','clientId','refresh_token','access_token','Unable\x20to\x20retrieve\x20the\x20access\x20token','clientSecret','serverUrl','refreshToken','host','zoho.eu','com','slice','substring','lastIndexOf','Refresh\x20Token\x20not\x20available\x20for\x20the\x20account','Calls','Zoho-oauthtoken\x20','response','error','message','Owner','Subject','Description','WhoId','Call_Duration','Call_Result','Call_Start_Time','Call_Type','includes','api_name','system_mandatory','push','display_label','custom_field','data_type','picklist','pick_list_values','statusCode','getFields','stringify','Wrong\x20credentials','rimraf','zip-dir','fast-json-patch','request-promise','moment','mustache','path','sox','to-csv','ejs','fs-extra','lodash','squel','crypto','desk.js','querystring','papaparse','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/logger','api','../../config/utils','../../config/environment','../../config/license/util','../../components/integrations/configuration','status','offset','undefined','limit','count','set','apply','save','update','then'];(function(_0x16acb7,_0x23f034){var _0x39bf39=function(_0x21281e){while(--_0x21281e){_0x16acb7['push'](_0x16acb7['shift']());}};_0x39bf39(++_0x23f034);}(_0x2b77,0x1e4));var _0x72b7=function(_0x407cc1,_0xf59640){_0x407cc1=_0x407cc1-0x0;var _0x39da5c=_0x2b77[_0x407cc1];return _0x39da5c;};'use strict';var emlformat=require('eml-format');var rimraf=require(_0x72b7('0x0'));var zipdir=require(_0x72b7('0x1'));var jsonpatch=require(_0x72b7('0x2'));var rp=require(_0x72b7('0x3'));var moment=require(_0x72b7('0x4'));var BPromise=require('bluebird');var Mustache=require(_0x72b7('0x5'));var util=require('util');var path=require(_0x72b7('0x6'));var sox=require(_0x72b7('0x7'));var csv=require(_0x72b7('0x8'));var ejs=require(_0x72b7('0x9'));var fs=require('fs');var fs_extra=require(_0x72b7('0xa'));var _=require(_0x72b7('0xb'));var squel=require(_0x72b7('0xc'));var crypto=require(_0x72b7('0xd'));var jsforce=require('jsforce');var deskjs=require(_0x72b7('0xe'));var toCsv=require('to-csv');var querystring=require(_0x72b7('0xf'));var Papa=require(_0x72b7('0x10'));var Redis=require('ioredis');var authService=require(_0x72b7('0x11'));var qs=require(_0x72b7('0x12'));var as=require(_0x72b7('0x13'));var hardwareService=require('../../config/license/hardware');var logger=require(_0x72b7('0x14'))(_0x72b7('0x15'));var utils=require(_0x72b7('0x16'));var config=require(_0x72b7('0x17'));var licenseUtil=require(_0x72b7('0x18'));var db=require('../../mysqldb')['db'];var integrations=require(_0x72b7('0x19'));function respondWithStatusCode(_0x1f1e14,_0x46f57e){_0x46f57e=_0x46f57e||0xcc;return function(_0x1a79c1){if(_0x1a79c1){return _0x1f1e14['sendStatus'](_0x46f57e);}return _0x1f1e14[_0x72b7('0x1a')](_0x46f57e)['end']();};}function respondWithResult(_0x567c98,_0x4e1598){_0x4e1598=_0x4e1598||0xc8;return function(_0x370e5c){if(_0x370e5c){return _0x567c98[_0x72b7('0x1a')](_0x4e1598)['json'](_0x370e5c);}};}function respondWithFilteredResult(_0x2f5e04,_0x276f7){return function(_0x3aa827){if(_0x3aa827){var _0x3783ef=typeof _0x276f7[_0x72b7('0x1b')]===_0x72b7('0x1c')&&typeof _0x276f7[_0x72b7('0x1d')]===_0x72b7('0x1c');var _0x931bf8=_0x3aa827[_0x72b7('0x1e')];var _0x423b19=_0x3783ef?0x0:_0x276f7['offset'];var _0x2a7cc5=_0x3783ef?_0x3aa827[_0x72b7('0x1e')]:_0x276f7[_0x72b7('0x1b')]+_0x276f7[_0x72b7('0x1d')];var _0x2f7e5f;if(_0x2a7cc5>=_0x931bf8){_0x2a7cc5=_0x931bf8;_0x2f7e5f=0xc8;}else{_0x2f7e5f=0xce;}_0x2f5e04['status'](_0x2f7e5f);return _0x2f5e04[_0x72b7('0x1f')]('Content-Range',_0x423b19+'-'+_0x2a7cc5+'/'+_0x931bf8)['json'](_0x3aa827);}return null;};}function patchUpdates(_0x4ee5e8){return function(_0x1d59e7){try{jsonpatch[_0x72b7('0x20')](_0x1d59e7,_0x4ee5e8,!![]);}catch(_0x5aec05){return BPromise['reject'](_0x5aec05);}return _0x1d59e7[_0x72b7('0x21')]();};}function saveUpdates(_0x5b3049,_0x596721){return function(_0x1e49ce){if(_0x1e49ce){return _0x1e49ce[_0x72b7('0x22')](_0x5b3049)[_0x72b7('0x23')](function(_0x32e67d){return _0x32e67d;});}return null;};}function removeEntity(_0x151feb,_0x461322){return function(_0x5471a6){if(_0x5471a6){return _0x5471a6[_0x72b7('0x24')]()[_0x72b7('0x23')](function(){_0x151feb[_0x72b7('0x1a')](0xcc)[_0x72b7('0x25')]();});}};}function handleEntityNotFound(_0x40102b,_0x5c466c){return function(_0xd28bce){if(!_0xd28bce){_0x40102b[_0x72b7('0x26')](0x194);}return _0xd28bce;};}function handleError(_0x3f0366,_0x4a6f2d){_0x4a6f2d=_0x4a6f2d||0x1f4;return function(_0x2512c5){logger['error'](_0x2512c5[_0x72b7('0x27')]);if(_0x2512c5[_0x72b7('0x28')]){delete _0x2512c5['name'];}_0x3f0366[_0x72b7('0x1a')](_0x4a6f2d)[_0x72b7('0x29')](_0x2512c5);};}exports[_0x72b7('0x2a')]=function(_0x502ef0,_0x41cd5a){var _0x2a0e68={},_0x3ea9db={},_0x31e928={'count':0x0,'rows':[]};var _0x274263=_[_0x72b7('0x2b')](db['ZohoAccount']['rawAttributes'],function(_0x3b2bf9){return{'name':_0x3b2bf9[_0x72b7('0x2c')],'type':_0x3b2bf9[_0x72b7('0x2d')][_0x72b7('0x2e')]};});_0x3ea9db[_0x72b7('0x2f')]=_[_0x72b7('0x2b')](_0x274263,_0x72b7('0x28'));_0x3ea9db[_0x72b7('0x30')]=_[_0x72b7('0x31')](_0x502ef0[_0x72b7('0x30')]);_0x3ea9db[_0x72b7('0x32')]=_[_0x72b7('0x33')](_0x3ea9db[_0x72b7('0x2f')],_0x3ea9db['query']);_0x2a0e68[_0x72b7('0x34')]=_[_0x72b7('0x33')](_0x3ea9db[_0x72b7('0x2f')],qs[_0x72b7('0x35')](_0x502ef0[_0x72b7('0x30')][_0x72b7('0x35')]));_0x2a0e68[_0x72b7('0x34')]=_0x2a0e68[_0x72b7('0x34')][_0x72b7('0x36')]?_0x2a0e68[_0x72b7('0x34')]:_0x3ea9db['model'];if(!_0x502ef0[_0x72b7('0x30')][_0x72b7('0x37')](_0x72b7('0x38'))){_0x2a0e68['limit']=qs[_0x72b7('0x1d')](_0x502ef0[_0x72b7('0x30')][_0x72b7('0x1d')]);_0x2a0e68[_0x72b7('0x1b')]=qs[_0x72b7('0x1b')](_0x502ef0[_0x72b7('0x30')][_0x72b7('0x1b')]);}_0x2a0e68[_0x72b7('0x39')]=qs[_0x72b7('0x3a')](_0x502ef0[_0x72b7('0x30')][_0x72b7('0x3a')]);_0x2a0e68[_0x72b7('0x3b')]=qs[_0x72b7('0x32')](_[_0x72b7('0x3c')](_0x502ef0[_0x72b7('0x30')],_0x3ea9db[_0x72b7('0x32')]),_0x274263);if(_0x502ef0[_0x72b7('0x30')]['filter']){_0x2a0e68[_0x72b7('0x3b')]=_[_0x72b7('0x3d')](_0x2a0e68['where'],{'$or':_[_0x72b7('0x2b')](_0x274263,function(_0x3b4213){if(_0x3b4213[_0x72b7('0x2d')]!==_0x72b7('0x3e')){var _0x693ad0={};_0x693ad0[_0x3b4213[_0x72b7('0x28')]]={'$like':'%'+_0x502ef0['query']['filter']+'%'};return _0x693ad0;}})});}_0x2a0e68=_[_0x72b7('0x3d')]({},_0x2a0e68,_0x502ef0['options']);var _0x74edde={'where':_0x2a0e68[_0x72b7('0x3b')]};return db[_0x72b7('0x3f')][_0x72b7('0x1e')](_0x74edde)['then'](function(_0x4db600){_0x31e928[_0x72b7('0x1e')]=_0x4db600;if(_0x502ef0[_0x72b7('0x30')][_0x72b7('0x40')]){_0x2a0e68[_0x72b7('0x41')]=[{'all':!![]}];}return db[_0x72b7('0x3f')]['findAll'](_0x2a0e68);})[_0x72b7('0x23')](function(_0x2c95a0){_0x31e928['rows']=_0x2c95a0;return _0x31e928;})[_0x72b7('0x23')](respondWithFilteredResult(_0x41cd5a,_0x2a0e68))['catch'](handleError(_0x41cd5a,null));};exports['show']=function(_0x2f756b,_0x2e2a55){var _0x2d934e={'raw':![],'where':{'id':_0x2f756b[_0x72b7('0x42')]['id']}},_0x192c01={};_0x192c01[_0x72b7('0x2f')]=_[_0x72b7('0x31')](db[_0x72b7('0x3f')][_0x72b7('0x43')]);_0x192c01['query']=_[_0x72b7('0x31')](_0x2f756b[_0x72b7('0x30')]);_0x192c01[_0x72b7('0x32')]=_[_0x72b7('0x33')](_0x192c01[_0x72b7('0x2f')],_0x192c01['query']);_0x2d934e[_0x72b7('0x34')]=_['intersection'](_0x192c01[_0x72b7('0x2f')],qs[_0x72b7('0x35')](_0x2f756b[_0x72b7('0x30')][_0x72b7('0x35')]));_0x2d934e['attributes']=_0x2d934e[_0x72b7('0x34')][_0x72b7('0x36')]?_0x2d934e[_0x72b7('0x34')]:_0x192c01[_0x72b7('0x2f')];if(_0x2f756b[_0x72b7('0x30')]['includeAll']){_0x2d934e['include']=[{'all':!![]}];}_0x2d934e=_['merge']({},_0x2d934e,_0x2f756b[_0x72b7('0x44')]);return db['ZohoAccount'][_0x72b7('0x45')](_0x2d934e)['then'](handleEntityNotFound(_0x2e2a55,null))[_0x72b7('0x23')](respondWithResult(_0x2e2a55,null))[_0x72b7('0x46')](handleError(_0x2e2a55,null));};exports[_0x72b7('0x47')]=function(_0x152135,_0xe2bab4){return db['ZohoAccount'][_0x72b7('0x47')](_0x152135[_0x72b7('0x48')],{})[_0x72b7('0x23')](respondWithResult(_0xe2bab4,0xc9))['catch'](handleError(_0xe2bab4,null));};exports[_0x72b7('0x22')]=function(_0x4191f7,_0x3edea9){if(_0x4191f7[_0x72b7('0x48')]['id']){delete _0x4191f7[_0x72b7('0x48')]['id'];}return db[_0x72b7('0x3f')][_0x72b7('0x45')]({'where':{'id':_0x4191f7[_0x72b7('0x42')]['id']}})[_0x72b7('0x23')](handleEntityNotFound(_0x3edea9,null))[_0x72b7('0x23')](saveUpdates(_0x4191f7[_0x72b7('0x48')],null))['then'](respondWithResult(_0x3edea9,null))[_0x72b7('0x46')](handleError(_0x3edea9,null));};exports[_0x72b7('0x24')]=function(_0x28171b,_0x50e75a){return db['ZohoAccount'][_0x72b7('0x45')]({'where':{'id':_0x28171b[_0x72b7('0x42')]['id']}})['then'](handleEntityNotFound(_0x50e75a,null))[_0x72b7('0x23')](removeEntity(_0x50e75a,null))['catch'](handleError(_0x50e75a,null));};exports[_0x72b7('0x49')]=function(_0xfc74e8,_0x187fbb,_0x3acfb8){var _0x5ea424={};var _0x11c6a9={};var _0x2edc01;var _0x2f6e1b;return db[_0x72b7('0x3f')][_0x72b7('0x4a')]({'where':{'id':_0xfc74e8['params']['id']}})[_0x72b7('0x23')](handleEntityNotFound(_0x187fbb,null))[_0x72b7('0x23')](function(_0x223eb9){if(_0x223eb9){_0x2edc01=_0x223eb9;_0x11c6a9[_0x72b7('0x2f')]=_[_0x72b7('0x31')](db[_0x72b7('0x4b')][_0x72b7('0x43')]);_0x11c6a9['query']=_[_0x72b7('0x31')](_0xfc74e8[_0x72b7('0x30')]);_0x11c6a9[_0x72b7('0x32')]=_[_0x72b7('0x33')](_0x11c6a9[_0x72b7('0x2f')],_0x11c6a9[_0x72b7('0x30')]);_0x5ea424[_0x72b7('0x34')]=_['intersection'](_0x11c6a9['model'],qs[_0x72b7('0x35')](_0xfc74e8['query']['fields']));_0x5ea424[_0x72b7('0x34')]=_0x5ea424[_0x72b7('0x34')][_0x72b7('0x36')]?_0x5ea424[_0x72b7('0x34')]:_0x11c6a9['model'];_0x5ea424[_0x72b7('0x39')]=qs[_0x72b7('0x3a')](_0xfc74e8['query']['sort']);_0x5ea424['where']=qs[_0x72b7('0x32')](_[_0x72b7('0x3c')](_0xfc74e8['query'],_0x11c6a9[_0x72b7('0x32')]));if(_0xfc74e8['query']['filter']){_0x5ea424[_0x72b7('0x3b')]=_['merge'](_0x5ea424[_0x72b7('0x3b')],{'$or':_[_0x72b7('0x2b')](_0x5ea424[_0x72b7('0x34')],function(_0x3f8e01){var _0x3c5fe5={};_0x3c5fe5[_0x3f8e01]={'$like':'%'+_0xfc74e8['query'][_0x72b7('0x4c')]+'%'};return _0x3c5fe5;})});}_0x5ea424=_[_0x72b7('0x3d')]({},_0x5ea424,_0xfc74e8['options']);return _0x2edc01['getConfigurations'](_0x5ea424);}})[_0x72b7('0x23')](function(_0xd69908){if(_0xd69908){_0x2f6e1b=_0xd69908[_0x72b7('0x36')];if(!_0xfc74e8[_0x72b7('0x30')][_0x72b7('0x37')](_0x72b7('0x38'))){_0x5ea424[_0x72b7('0x1d')]=qs[_0x72b7('0x1d')](_0xfc74e8['query'][_0x72b7('0x1d')]);_0x5ea424[_0x72b7('0x1b')]=qs[_0x72b7('0x1b')](_0xfc74e8[_0x72b7('0x30')][_0x72b7('0x1b')]);}return _0x2edc01[_0x72b7('0x49')](_0x5ea424);}})[_0x72b7('0x23')](function(_0x5e47a3){if(_0x5e47a3){return _0x5e47a3?{'count':_0x2f6e1b,'rows':_0x5e47a3}:null;}})['then'](respondWithResult(_0x187fbb,null))['catch'](handleError(_0x187fbb,null));};exports['addConfiguration']=function(_0x226549,_0x552735,_0x46cc5f){if(_0x226549[_0x72b7('0x48')]['id']){delete _0x226549[_0x72b7('0x48')]['id'];}return db[_0x72b7('0x3f')]['findOne']({'where':{'id':_0x226549[_0x72b7('0x42')]['id']}})['then'](handleEntityNotFound(_0x552735,null))['then'](function(_0x3882bb){if(_0x3882bb){_0x226549[_0x72b7('0x48')][_0x72b7('0x4d')]=_0x3882bb['id'];_0x226549[_0x72b7('0x48')][_0x72b7('0x4e')]=integrations['getSubjects'](_0x226549[_0x72b7('0x48')]['channel'],_0x226549[_0x72b7('0x48')][_0x72b7('0x2d')]);_0x226549[_0x72b7('0x48')][_0x72b7('0x4f')]=integrations[_0x72b7('0x50')](_0x226549[_0x72b7('0x48')]['channel'],_0x226549[_0x72b7('0x48')][_0x72b7('0x2d')]);return db[_0x72b7('0x4b')]['create'](_0x226549['body'],{'include':[{'model':db[_0x72b7('0x51')],'as':_0x72b7('0x4e')},{'model':db[_0x72b7('0x51')],'as':'Descriptions'}]});}return null;})['then'](respondWithResult(_0x552735,null))[_0x72b7('0x46')](handleError(_0x552735,null));};function getAccessToken(_0x21c0a5){return new Promise(function(_0x25da3b,_0x32e62e){var _0x377859;switch(_0x21c0a5[_0x72b7('0x52')]){case'US':_0x377859=_0x72b7('0x53');break;case'AU':_0x377859=_0x72b7('0x54');break;case'EU':_0x377859=_0x72b7('0x55');break;case'IN':_0x377859=_0x72b7('0x56');break;case'CN':_0x377859=_0x72b7('0x57');break;default:_0x377859='https://accounts.zoho.eu';break;}var _0x4fb8b8={'method':_0x72b7('0x58'),'uri':_0x377859+_0x72b7('0x59'),'qs':{'refresh_token':_0x21c0a5['refreshToken'],'client_id':_0x21c0a5[_0x72b7('0x5a')],'client_secret':_0x21c0a5['clientSecret'],'grant_type':_0x72b7('0x5b')},'json':!![]};return rp(_0x4fb8b8)[_0x72b7('0x23')](function(_0x36ba4f){if(_0x36ba4f[_0x72b7('0x5c')]){_0x25da3b(_0x36ba4f[_0x72b7('0x5c')]);}else{_0x32e62e(_0x72b7('0x5d'));}})[_0x72b7('0x46')](function(_0x10ff5e){_0x32e62e(_0x10ff5e);});});}exports['getFields']=function(_0x26633c,_0x4ac5c4,_0x1ee476){var _0xd3158a,_0x3a52fc,_0x31e9e7,_0x21dacc,_0x395844;return db['ZohoAccount'][_0x72b7('0x4a')]({'where':{'id':_0x26633c[_0x72b7('0x42')]['id']},'attributes':['id','host',_0x72b7('0x52'),_0x72b7('0x5a'),_0x72b7('0x5e'),_0x72b7('0x5f'),'code',_0x72b7('0x60')]})[_0x72b7('0x23')](handleEntityNotFound(_0x4ac5c4,null))[_0x72b7('0x23')](function(_0x4e5f81){_0x395844=_0x4e5f81;_0xd3158a=_0x395844[_0x72b7('0x61')];_0x3a52fc=_0xd3158a===_0x72b7('0x62')?'eu':_0x72b7('0x63');_0x31e9e7=_0x395844[_0x72b7('0x5f')];var _0x34493e=_0x31e9e7[_0x72b7('0x64')](-0x1);if(_0x34493e==='/'||_0x34493e==='\x5c'||_0x34493e===':'){_0x31e9e7=_0x31e9e7[_0x72b7('0x65')](0x0,_0x31e9e7[_0x72b7('0x66')](_0x34493e));}if(!_0x395844[_0x72b7('0x60')]){throw new Error(_0x72b7('0x67'));}return getAccessToken(_0x395844);})[_0x72b7('0x23')](function(_0x1bf8d0){if(_0x1bf8d0){return rp({'method':'GET','uri':util['format']('https://www.zohoapis.%s/crm/v2/settings/fields',_0x3a52fc),'qs':{'module':_0x72b7('0x68')},'headers':{'Authorization':_0x72b7('0x69')+_0x1bf8d0},'json':!![]});}})[_0x72b7('0x23')](function(_0x2180d2){if(_0x2180d2){if(_0x2180d2[_0x72b7('0x6a')]&&_0x2180d2[_0x72b7('0x6a')]['error']){throw new Error(_0x2180d2['response'][_0x72b7('0x6b')][_0x72b7('0x6c')]);}var _0x2ae66e=[];var _0x29bb2f=[];var _0x5beef4=[_0x72b7('0x6d'),_0x72b7('0x6e'),_0x72b7('0x6f'),_0x72b7('0x70'),_0x72b7('0x71'),_0x72b7('0x72'),_0x72b7('0x73'),_0x72b7('0x74')];_0x29bb2f=_['remove'](_0x2180d2[_0x72b7('0x35')],function(_0x2d8169){return _0x5beef4[_0x72b7('0x75')](_0x2d8169[_0x72b7('0x76')]);});for(var _0x259993=0x0;_0x259993<_0x29bb2f['length'];_0x259993++){if(_0x29bb2f[_0x259993][_0x72b7('0x77')]===![]){_0x2ae66e[_0x72b7('0x78')]({'id':_0x29bb2f[_0x259993]['id'],'name':_0x29bb2f[_0x259993][_0x72b7('0x79')],'custom':_0x29bb2f[_0x259993][_0x72b7('0x7a')],'options':_0x29bb2f[_0x259993][_0x72b7('0x7b')]===_0x72b7('0x7c')&&_0x29bb2f[_0x259993][_0x72b7('0x7d')][_0x72b7('0x36')]>-0x1?_['map'](_0x29bb2f[_0x259993][_0x72b7('0x7d')],function(_0x155c9b){return{'name':_0x155c9b,'value':_0x155c9b};}):[]});}}return{'count':_0x2ae66e['length'],'rows':_0x2ae66e};}else{return{'count':0x0,'rows':[]};}})[_0x72b7('0x23')](respondWithResult(_0x4ac5c4,null))[_0x72b7('0x46')](function(_0xede114){var _0x2264e4=_0x26633c[_0x72b7('0x30')]['test']?0x1f4:_0xede114[_0x72b7('0x7e')]||0x1f4;logger['error']('getFields,\x20%s,\x20%s,\x20%s',_0x72b7('0x7f'),_0x2264e4,JSON[_0x72b7('0x80')](_0xede114));delete _0xede114[_0x72b7('0x28')];if(_0x2264e4===0x191){_0x2264e4=0x190;}_0x4ac5c4[_0x72b7('0x1a')](_0x2264e4)[_0x72b7('0x29')](_0x26633c[_0x72b7('0x30')]['test']?{'message':_0x72b7('0x81'),'statusCode':_0xede114[_0x72b7('0x7e')]}:_0xede114);});}; \ No newline at end of file diff --git a/server/api/intZohoAccount/intZohoAccount.model.js b/server/api/intZohoAccount/intZohoAccount.model.js index 61c8b32..cff58f8 100644 --- a/server/api/intZohoAccount/intZohoAccount.model.js +++ b/server/api/intZohoAccount/intZohoAccount.model.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x8900=['error','ZohoAccount,\x20Unable\x20to\x20generate\x20the\x20refresh\x20token\x20for\x20account\x20\x22%s\x22\x20#%d','catch','name','inspect','slice','authorization_code','refresh_token','refreshToken','lodash','util','../../config/logger','moment','bluebird','request-promise','path','rimraf','./intZohoAccount.attributes','../../components/integrations/configuration','exports','define','ZohoAccount','int_zoho_accounts','zone','changed','serverUrl','clientId','clientSecret','code','host','substring','https://accounts.zoho.com.au','https://accounts.zoho.in','https://accounts.zoho.com.cn','https://accounts.zoho.eu','POST','/oauth/v2/token','application/x-www-form-urlencoded','then','parse','format','ZohoAccount,\x20Refresh\x20token\x20successfully\x20generated\x20for\x20account\x20\x22%s\x22\x20#%d'];(function(_0xf983b5,_0x11fc4a){var _0x2e5acb=function(_0x4ebd23){while(--_0x4ebd23){_0xf983b5['push'](_0xf983b5['shift']());}};_0x2e5acb(++_0x11fc4a);}(_0x8900,0x87));var _0x0890=function(_0x2ad3b0,_0xeea71d){_0x2ad3b0=_0x2ad3b0-0x0;var _0x245959=_0x8900[_0x2ad3b0];return _0x245959;};'use strict';var _=require(_0x0890('0x0'));var util=require(_0x0890('0x1'));var logger=require(_0x0890('0x2'))('api');var moment=require(_0x0890('0x3'));var BPromise=require(_0x0890('0x4'));var rp=require(_0x0890('0x5'));var fs=require('fs');var path=require(_0x0890('0x6'));var rimraf=require(_0x0890('0x7'));var config=require('../../config/environment');var attributes=require(_0x0890('0x8'));var integrations=require(_0x0890('0x9'));module[_0x0890('0xa')]=function(_0x74000f,_0x3e9b99){return _0x74000f[_0x0890('0xb')](_0x0890('0xc'),attributes,{'tableName':_0x0890('0xd'),'paranoid':![],'indexes':[],'timestamps':!![],'hooks':{'beforeCreate':function(_0x66b33b,_0x48c0c1,_0x4afc5f){if(_0x66b33b['changed'](_0x0890('0xe'))||_0x66b33b[_0x0890('0xf')](_0x0890('0x10'))||_0x66b33b[_0x0890('0xf')](_0x0890('0x11'))||_0x66b33b[_0x0890('0xf')](_0x0890('0x12'))||_0x66b33b[_0x0890('0xf')](_0x0890('0x13'))||_0x66b33b[_0x0890('0xf')](_0x0890('0x14'))){var _0x420768,_0x23a714;_0x420768=_0x66b33b['serverUrl'];var _0x4952bd=_0x420768['slice'](-0x1);if(_0x4952bd==='/'||_0x4952bd==='\x5c'||_0x4952bd===':'){_0x420768=_0x420768[_0x0890('0x15')](0x0,_0x420768['lastIndexOf'](_0x4952bd));}switch(_0x66b33b['zone']){case'US':_0x23a714='https://accounts.zoho.com';break;case'AU':_0x23a714=_0x0890('0x16');break;case'IN':_0x23a714=_0x0890('0x17');break;case'CN':_0x23a714=_0x0890('0x18');break;default:_0x23a714=_0x0890('0x19');break;}var _0x4c98b9={'method':_0x0890('0x1a'),'uri':_0x23a714+_0x0890('0x1b'),'form':{'grant_type':'authorization_code','client_id':_0x66b33b[_0x0890('0x11')],'client_secret':_0x66b33b[_0x0890('0x12')],'redirect_uri':_0x66b33b[_0x0890('0x10')],'code':_0x66b33b[_0x0890('0x13')]},'headers':{'Content-Type':_0x0890('0x1c')}};return rp(_0x4c98b9)[_0x0890('0x1d')](function(_0x2e3434){var _0x180ae8=JSON[_0x0890('0x1e')](_0x2e3434);if(_0x180ae8['refresh_token']){_0x66b33b['refreshToken']=_0x180ae8['refresh_token'];logger['info'](util[_0x0890('0x1f')](_0x0890('0x20'),_0x66b33b['name'],_0x66b33b['id']));}else{logger[_0x0890('0x21')](util[_0x0890('0x1f')](_0x0890('0x22'),_0x66b33b['name'],_0x66b33b['id']),util['inspect'](_0x180ae8,{'showHidden':![],'depth':null}));}return _0x4afc5f(null,_0x48c0c1);})[_0x0890('0x23')](function(_0x13cd2d){logger[_0x0890('0x21')](util[_0x0890('0x1f')](_0x0890('0x22'),_0x66b33b[_0x0890('0x24')],_0x66b33b['id']),util[_0x0890('0x25')](parsedResult,{'showHidden':![],'depth':null}));return _0x4afc5f(_0x13cd2d);});}else{return _0x4afc5f(null,_0x48c0c1);}},'beforeUpdate':function(_0x3fc028,_0x28c9f4,_0x5f4fa3){if(_0x3fc028['changed'](_0x0890('0xe'))||_0x3fc028[_0x0890('0xf')](_0x0890('0x10'))||_0x3fc028[_0x0890('0xf')](_0x0890('0x11'))||_0x3fc028[_0x0890('0xf')](_0x0890('0x12'))||_0x3fc028[_0x0890('0xf')](_0x0890('0x13'))||_0x3fc028[_0x0890('0xf')](_0x0890('0x14'))){var _0x2a9b1e,_0x5de3f3;_0x2a9b1e=_0x3fc028[_0x0890('0x10')];var _0x2d1969=_0x2a9b1e[_0x0890('0x26')](-0x1);if(_0x2d1969==='/'||_0x2d1969==='\x5c'||_0x2d1969===':'){_0x2a9b1e=_0x2a9b1e[_0x0890('0x15')](0x0,_0x2a9b1e['lastIndexOf'](_0x2d1969));}switch(_0x3fc028['zone']){case'US':_0x5de3f3='https://accounts.zoho.com';break;case'AU':_0x5de3f3=_0x0890('0x16');break;case'IN':_0x5de3f3='https://accounts.zoho.in';break;case'CN':_0x5de3f3=_0x0890('0x18');break;default:_0x5de3f3=_0x0890('0x19');break;}var _0x23c28f={'method':_0x0890('0x1a'),'uri':_0x5de3f3+'/oauth/v2/token','form':{'grant_type':_0x0890('0x27'),'client_id':_0x3fc028[_0x0890('0x11')],'client_secret':_0x3fc028[_0x0890('0x12')],'redirect_uri':_0x3fc028[_0x0890('0x10')],'code':_0x3fc028[_0x0890('0x13')]},'headers':{'Content-Type':_0x0890('0x1c')}};return rp(_0x23c28f)[_0x0890('0x1d')](function(_0x19d71a){var _0x114c4e=JSON[_0x0890('0x1e')](_0x19d71a);if(_0x114c4e[_0x0890('0x28')]){_0x3fc028[_0x0890('0x29')]=_0x114c4e[_0x0890('0x28')];logger['info'](util[_0x0890('0x1f')](_0x0890('0x20'),_0x3fc028['name'],_0x3fc028['id']));}else{logger['error'](util['format'](_0x0890('0x22'),_0x3fc028[_0x0890('0x24')],_0x3fc028['id']),util['inspect'](_0x114c4e,{'showHidden':![],'depth':null}));}return _0x5f4fa3(null,_0x28c9f4);})[_0x0890('0x23')](function(_0x5848eb){logger['error'](util[_0x0890('0x1f')](_0x0890('0x22'),_0x3fc028[_0x0890('0x24')],_0x3fc028['id']),util['inspect'](parsedResult,{'showHidden':![],'depth':null}));return _0x5f4fa3(_0x5848eb);});}else{return _0x5f4fa3(null,_0x28c9f4);}}}});}; \ No newline at end of file +var _0xeb1c=['define','int_zoho_accounts','changed','serverUrl','clientId','clientSecret','lastIndexOf','zone','https://accounts.zoho.com.au','https://accounts.zoho.com.cn','https://accounts.zoho.eu','POST','/oauth/v2/token','authorization_code','code','then','parse','refresh_token','info','format','error','ZohoAccount,\x20Unable\x20to\x20generate\x20the\x20refresh\x20token\x20for\x20account\x20\x22%s\x22\x20#%d','name','inspect','catch','host','slice','substring','https://accounts.zoho.com','https://accounts.zoho.in','ZohoAccount,\x20Refresh\x20token\x20successfully\x20generated\x20for\x20account\x20\x22%s\x22\x20#%d','util','api','bluebird','request-promise','path','rimraf','./intZohoAccount.attributes','exports'];(function(_0x3ec1da,_0x1e36f5){var _0x472358=function(_0x1d41b1){while(--_0x1d41b1){_0x3ec1da['push'](_0x3ec1da['shift']());}};_0x472358(++_0x1e36f5);}(_0xeb1c,0x17e));var _0xceb1=function(_0x28f6ec,_0x538bbf){_0x28f6ec=_0x28f6ec-0x0;var _0x1e0c7b=_0xeb1c[_0x28f6ec];return _0x1e0c7b;};'use strict';var _=require('lodash');var util=require(_0xceb1('0x0'));var logger=require('../../config/logger')(_0xceb1('0x1'));var moment=require('moment');var BPromise=require(_0xceb1('0x2'));var rp=require(_0xceb1('0x3'));var fs=require('fs');var path=require(_0xceb1('0x4'));var rimraf=require(_0xceb1('0x5'));var config=require('../../config/environment');var attributes=require(_0xceb1('0x6'));var integrations=require('../../components/integrations/configuration');module[_0xceb1('0x7')]=function(_0x155130,_0x286021){return _0x155130[_0xceb1('0x8')]('ZohoAccount',attributes,{'tableName':_0xceb1('0x9'),'paranoid':![],'indexes':[],'timestamps':!![],'hooks':{'beforeCreate':function(_0x2098dc,_0x1cd63e,_0x3647fa){if(_0x2098dc[_0xceb1('0xa')]('zone')||_0x2098dc[_0xceb1('0xa')](_0xceb1('0xb'))||_0x2098dc[_0xceb1('0xa')](_0xceb1('0xc'))||_0x2098dc[_0xceb1('0xa')](_0xceb1('0xd'))||_0x2098dc[_0xceb1('0xa')]('code')||_0x2098dc[_0xceb1('0xa')]('host')){var _0x23ab2b,_0x24c44d;_0x23ab2b=_0x2098dc[_0xceb1('0xb')];var _0x7f1c5b=_0x23ab2b['slice'](-0x1);if(_0x7f1c5b==='/'||_0x7f1c5b==='\x5c'||_0x7f1c5b===':'){_0x23ab2b=_0x23ab2b['substring'](0x0,_0x23ab2b[_0xceb1('0xe')](_0x7f1c5b));}switch(_0x2098dc[_0xceb1('0xf')]){case'US':_0x24c44d='https://accounts.zoho.com';break;case'AU':_0x24c44d=_0xceb1('0x10');break;case'IN':_0x24c44d='https://accounts.zoho.in';break;case'CN':_0x24c44d=_0xceb1('0x11');break;default:_0x24c44d=_0xceb1('0x12');break;}var _0x53ecea={'method':_0xceb1('0x13'),'uri':_0x24c44d+_0xceb1('0x14'),'form':{'grant_type':_0xceb1('0x15'),'client_id':_0x2098dc[_0xceb1('0xc')],'client_secret':_0x2098dc['clientSecret'],'redirect_uri':_0x2098dc[_0xceb1('0xb')],'code':_0x2098dc[_0xceb1('0x16')]},'headers':{'Content-Type':'application/x-www-form-urlencoded'}};return rp(_0x53ecea)[_0xceb1('0x17')](function(_0x396457){var _0x2f79ff=JSON[_0xceb1('0x18')](_0x396457);if(_0x2f79ff[_0xceb1('0x19')]){_0x2098dc['refreshToken']=_0x2f79ff[_0xceb1('0x19')];logger[_0xceb1('0x1a')](util[_0xceb1('0x1b')]('ZohoAccount,\x20Refresh\x20token\x20successfully\x20generated\x20for\x20account\x20\x22%s\x22\x20#%d',_0x2098dc['name'],_0x2098dc['id']));}else{logger[_0xceb1('0x1c')](util[_0xceb1('0x1b')](_0xceb1('0x1d'),_0x2098dc[_0xceb1('0x1e')],_0x2098dc['id']),util[_0xceb1('0x1f')](_0x2f79ff,{'showHidden':![],'depth':null}));}return _0x3647fa(null,_0x1cd63e);})[_0xceb1('0x20')](function(_0x451486){logger['error'](util[_0xceb1('0x1b')](_0xceb1('0x1d'),_0x2098dc[_0xceb1('0x1e')],_0x2098dc['id']),util[_0xceb1('0x1f')](parsedResult,{'showHidden':![],'depth':null}));return _0x3647fa(_0x451486);});}else{return _0x3647fa(null,_0x1cd63e);}},'beforeUpdate':function(_0x5bac66,_0xe7171b,_0x5673d3){if(_0x5bac66[_0xceb1('0xa')](_0xceb1('0xf'))||_0x5bac66[_0xceb1('0xa')](_0xceb1('0xb'))||_0x5bac66[_0xceb1('0xa')]('clientId')||_0x5bac66[_0xceb1('0xa')](_0xceb1('0xd'))||_0x5bac66[_0xceb1('0xa')]('code')||_0x5bac66['changed'](_0xceb1('0x21'))){var _0x4088ef,_0x2f7e5b;_0x4088ef=_0x5bac66[_0xceb1('0xb')];var _0x49e4e7=_0x4088ef[_0xceb1('0x22')](-0x1);if(_0x49e4e7==='/'||_0x49e4e7==='\x5c'||_0x49e4e7===':'){_0x4088ef=_0x4088ef[_0xceb1('0x23')](0x0,_0x4088ef[_0xceb1('0xe')](_0x49e4e7));}switch(_0x5bac66[_0xceb1('0xf')]){case'US':_0x2f7e5b=_0xceb1('0x24');break;case'AU':_0x2f7e5b=_0xceb1('0x10');break;case'IN':_0x2f7e5b=_0xceb1('0x25');break;case'CN':_0x2f7e5b='https://accounts.zoho.com.cn';break;default:_0x2f7e5b=_0xceb1('0x12');break;}var _0x3a0e31={'method':_0xceb1('0x13'),'uri':_0x2f7e5b+_0xceb1('0x14'),'form':{'grant_type':_0xceb1('0x15'),'client_id':_0x5bac66['clientId'],'client_secret':_0x5bac66[_0xceb1('0xd')],'redirect_uri':_0x5bac66['serverUrl'],'code':_0x5bac66[_0xceb1('0x16')]},'headers':{'Content-Type':'application/x-www-form-urlencoded'}};return rp(_0x3a0e31)[_0xceb1('0x17')](function(_0x30e60e){var _0x2dcd62=JSON[_0xceb1('0x18')](_0x30e60e);if(_0x2dcd62['refresh_token']){_0x5bac66['refreshToken']=_0x2dcd62[_0xceb1('0x19')];logger[_0xceb1('0x1a')](util[_0xceb1('0x1b')](_0xceb1('0x26'),_0x5bac66[_0xceb1('0x1e')],_0x5bac66['id']));}else{logger[_0xceb1('0x1c')](util[_0xceb1('0x1b')](_0xceb1('0x1d'),_0x5bac66[_0xceb1('0x1e')],_0x5bac66['id']),util['inspect'](_0x2dcd62,{'showHidden':![],'depth':null}));}return _0x5673d3(null,_0xe7171b);})['catch'](function(_0x1f552a){logger[_0xceb1('0x1c')](util[_0xceb1('0x1b')]('ZohoAccount,\x20Unable\x20to\x20generate\x20the\x20refresh\x20token\x20for\x20account\x20\x22%s\x22\x20#%d',_0x5bac66['name'],_0x5bac66['id']),util['inspect'](parsedResult,{'showHidden':![],'depth':null}));return _0x5673d3(_0x1f552a);});}else{return _0x5673d3(null,_0xe7171b);}}}});}; \ No newline at end of file diff --git a/server/api/intZohoAccount/intZohoAccount.rpc.js b/server/api/intZohoAccount/intZohoAccount.rpc.js index 681e6a7..a048bec 100644 --- a/server/api/intZohoAccount/intZohoAccount.rpc.js +++ b/server/api/intZohoAccount/intZohoAccount.rpc.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x44c2=['bluebird','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','http','request','request\x20sent','ZohoAccount,\x20%s,\x20%s,\x20%s','stringify','code','error','ZohoAccount,\x20%s,\x20%s','message','result','catch','GetZohoAccount','ZohoAccount','findAll','options','where','attributes','limit','include','map','model','then','info','debug','ShowZohoAccount','find','raw','lodash','util','moment'];(function(_0x1311c8,_0x3ad3fe){var _0x56e047=function(_0x2b74fc){while(--_0x2b74fc){_0x1311c8['push'](_0x1311c8['shift']());}};_0x56e047(++_0x3ad3fe);}(_0x44c2,0x100));var _0x244c=function(_0x3f8282,_0x11b607){_0x3f8282=_0x3f8282-0x0;var _0x50f918=_0x44c2[_0x3f8282];return _0x50f918;};'use strict';var _=require(_0x244c('0x0'));var util=require(_0x244c('0x1'));var moment=require(_0x244c('0x2'));var BPromise=require(_0x244c('0x3'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x244c('0x4'));var db=require(_0x244c('0x5'))['db'];var utils=require(_0x244c('0x6'));var logger=require(_0x244c('0x7'))(_0x244c('0x8'));var config=require(_0x244c('0x9'));var jayson=require('jayson/promise');var client=jayson['client'][_0x244c('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x4c758e,_0x18491b,_0x5b49a1){return new BPromise(function(_0x54b673,_0x1a0f7d){return client[_0x244c('0xb')](_0x4c758e,_0x5b49a1)['then'](function(_0xf5430e){logger['info']('ZohoAccount,\x20%s,\x20%s',_0x18491b,_0x244c('0xc'));logger['debug'](_0x244c('0xd'),_0x18491b,'request\x20sent',JSON[_0x244c('0xe')](_0xf5430e));if(_0xf5430e['error']){if(_0xf5430e['error'][_0x244c('0xf')]===0x1f4){logger[_0x244c('0x10')](_0x244c('0x11'),_0x18491b,_0xf5430e['error'][_0x244c('0x12')]);return _0x1a0f7d(_0xf5430e[_0x244c('0x10')][_0x244c('0x12')]);}logger[_0x244c('0x10')](_0x244c('0x11'),_0x18491b,_0xf5430e[_0x244c('0x10')][_0x244c('0x12')]);return _0x54b673(_0xf5430e['error'][_0x244c('0x12')]);}else{logger['info']('ZohoAccount,\x20%s,\x20%s',_0x18491b,_0x244c('0xc'));_0x54b673(_0xf5430e[_0x244c('0x13')][_0x244c('0x12')]);}})[_0x244c('0x14')](function(_0x5f2a11){logger[_0x244c('0x10')](_0x244c('0x11'),_0x18491b,_0x5f2a11);_0x1a0f7d(_0x5f2a11);});});}exports[_0x244c('0x15')]=function(_0x1c339f){var _0x1ba203=this;return new Promise(function(_0x4ee7b2,_0x3531b){return db[_0x244c('0x16')][_0x244c('0x17')]({'raw':_0x1c339f['options']?_0x1c339f['options']['raw']===undefined?!![]:![]:!![],'where':_0x1c339f[_0x244c('0x18')]?_0x1c339f[_0x244c('0x18')][_0x244c('0x19')]||null:null,'attributes':_0x1c339f[_0x244c('0x18')]?_0x1c339f[_0x244c('0x18')][_0x244c('0x1a')]||null:null,'limit':_0x1c339f['options']?_0x1c339f[_0x244c('0x18')][_0x244c('0x1b')]||null:null,'include':_0x1c339f[_0x244c('0x18')]?_0x1c339f['options'][_0x244c('0x1c')]?_['map'](_0x1c339f['options'][_0x244c('0x1c')],function(_0x6aa1f4){return{'model':db[_0x6aa1f4['model']],'as':_0x6aa1f4['as'],'attributes':_0x6aa1f4[_0x244c('0x1a')],'include':_0x6aa1f4[_0x244c('0x1c')]?_[_0x244c('0x1d')](_0x6aa1f4[_0x244c('0x1c')],function(_0x54b7ae){return{'model':db[_0x54b7ae[_0x244c('0x1e')]],'as':_0x54b7ae['as'],'attributes':_0x54b7ae[_0x244c('0x1a')],'include':_0x54b7ae[_0x244c('0x1c')]?_[_0x244c('0x1d')](_0x54b7ae[_0x244c('0x1c')],function(_0x584d44){return{'model':db[_0x584d44['model']],'as':_0x584d44['as'],'attributes':_0x584d44[_0x244c('0x1a')]};}):[]};}):[]};}):[]:[]})[_0x244c('0x1f')](function(_0x193c50){logger[_0x244c('0x20')](_0x244c('0x15'),_0x1c339f);logger[_0x244c('0x21')](_0x244c('0x15'),_0x1c339f,JSON[_0x244c('0xe')](_0x193c50));_0x4ee7b2(_0x193c50);})[_0x244c('0x14')](function(_0x3dc983){logger['error']('GetZohoAccount',_0x3dc983[_0x244c('0x12')],_0x1c339f);_0x3531b(_0x1ba203[_0x244c('0x10')](0x1f4,_0x3dc983[_0x244c('0x12')]));});});};exports[_0x244c('0x22')]=function(_0xf82c11){var _0x1e7340=this;return new Promise(function(_0x53d882,_0x33b062){return db[_0x244c('0x16')][_0x244c('0x23')]({'raw':_0xf82c11[_0x244c('0x18')]?_0xf82c11[_0x244c('0x18')][_0x244c('0x24')]===undefined?!![]:![]:!![],'where':_0xf82c11[_0x244c('0x18')]?_0xf82c11[_0x244c('0x18')][_0x244c('0x19')]||null:null,'attributes':_0xf82c11[_0x244c('0x18')]?_0xf82c11[_0x244c('0x18')][_0x244c('0x1a')]||null:null,'include':_0xf82c11['options']?_0xf82c11[_0x244c('0x18')][_0x244c('0x1c')]?_[_0x244c('0x1d')](_0xf82c11[_0x244c('0x18')][_0x244c('0x1c')],function(_0x442ab8){return{'model':db[_0x442ab8[_0x244c('0x1e')]],'as':_0x442ab8['as'],'attributes':_0x442ab8[_0x244c('0x1a')],'include':_0x442ab8['include']?_[_0x244c('0x1d')](_0x442ab8[_0x244c('0x1c')],function(_0x4dd3a3){return{'model':db[_0x4dd3a3[_0x244c('0x1e')]],'as':_0x4dd3a3['as'],'attributes':_0x4dd3a3[_0x244c('0x1a')],'include':_0x4dd3a3[_0x244c('0x1c')]?_[_0x244c('0x1d')](_0x4dd3a3[_0x244c('0x1c')],function(_0x3f6beb){return{'model':db[_0x3f6beb[_0x244c('0x1e')]],'as':_0x3f6beb['as'],'attributes':_0x3f6beb[_0x244c('0x1a')]};}):[]};}):[]};}):[]:[]})[_0x244c('0x1f')](function(_0xb7dacb){logger['info'](_0x244c('0x22'),_0xf82c11);logger[_0x244c('0x21')](_0x244c('0x22'),_0xf82c11,JSON[_0x244c('0xe')](_0xb7dacb));_0x53d882(_0xb7dacb);})[_0x244c('0x14')](function(_0x491f85){logger['error'](_0x244c('0x22'),_0x491f85['message'],_0xf82c11);_0x33b062(_0x1e7340[_0x244c('0x10')](0x1f4,_0x491f85[_0x244c('0x12')]));});});}; \ No newline at end of file +var _0xf79e=['message','result','catch','GetZohoAccount','findAll','options','attributes','limit','include','map','model','ShowZohoAccount','ZohoAccount','raw','where','util','moment','bluebird','ioredis','../../mysqldb','rpc','../../config/environment','jayson/promise','client','http','request','info','ZohoAccount,\x20%s,\x20%s','request\x20sent','debug','ZohoAccount,\x20%s,\x20%s,\x20%s','stringify','error','code'];(function(_0x5583e9,_0x1847d3){var _0x253c77=function(_0x5d5259){while(--_0x5d5259){_0x5583e9['push'](_0x5583e9['shift']());}};_0x253c77(++_0x1847d3);}(_0xf79e,0x185));var _0xef79=function(_0x4027da,_0x5c66fc){_0x4027da=_0x4027da-0x0;var _0x449636=_0xf79e[_0x4027da];return _0x449636;};'use strict';var _=require('lodash');var util=require(_0xef79('0x0'));var moment=require(_0xef79('0x1'));var BPromise=require(_0xef79('0x2'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0xef79('0x3'));var db=require(_0xef79('0x4'))['db'];var utils=require('../../config/utils');var logger=require('../../config/logger')(_0xef79('0x5'));var config=require(_0xef79('0x6'));var jayson=require(_0xef79('0x7'));var client=jayson[_0xef79('0x8')][_0xef79('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x2fa668,_0x49d0ea,_0x1e7443){return new BPromise(function(_0x4a8de0,_0x33b384){return client[_0xef79('0xa')](_0x2fa668,_0x1e7443)['then'](function(_0x42dee6){logger[_0xef79('0xb')](_0xef79('0xc'),_0x49d0ea,_0xef79('0xd'));logger[_0xef79('0xe')](_0xef79('0xf'),_0x49d0ea,_0xef79('0xd'),JSON[_0xef79('0x10')](_0x42dee6));if(_0x42dee6['error']){if(_0x42dee6[_0xef79('0x11')][_0xef79('0x12')]===0x1f4){logger[_0xef79('0x11')](_0xef79('0xc'),_0x49d0ea,_0x42dee6[_0xef79('0x11')][_0xef79('0x13')]);return _0x33b384(_0x42dee6[_0xef79('0x11')][_0xef79('0x13')]);}logger[_0xef79('0x11')](_0xef79('0xc'),_0x49d0ea,_0x42dee6['error']['message']);return _0x4a8de0(_0x42dee6['error']['message']);}else{logger[_0xef79('0xb')](_0xef79('0xc'),_0x49d0ea,_0xef79('0xd'));_0x4a8de0(_0x42dee6[_0xef79('0x14')]['message']);}})[_0xef79('0x15')](function(_0x6a689c){logger['error'](_0xef79('0xc'),_0x49d0ea,_0x6a689c);_0x33b384(_0x6a689c);});});}exports[_0xef79('0x16')]=function(_0x249a8c){var _0x406ca2=this;return new Promise(function(_0x55492c,_0x276b8b){return db['ZohoAccount'][_0xef79('0x17')]({'raw':_0x249a8c[_0xef79('0x18')]?_0x249a8c[_0xef79('0x18')]['raw']===undefined?!![]:![]:!![],'where':_0x249a8c[_0xef79('0x18')]?_0x249a8c[_0xef79('0x18')]['where']||null:null,'attributes':_0x249a8c['options']?_0x249a8c[_0xef79('0x18')][_0xef79('0x19')]||null:null,'limit':_0x249a8c['options']?_0x249a8c[_0xef79('0x18')][_0xef79('0x1a')]||null:null,'include':_0x249a8c[_0xef79('0x18')]?_0x249a8c['options'][_0xef79('0x1b')]?_['map'](_0x249a8c['options'][_0xef79('0x1b')],function(_0x196672){return{'model':db[_0x196672['model']],'as':_0x196672['as'],'attributes':_0x196672[_0xef79('0x19')],'include':_0x196672[_0xef79('0x1b')]?_[_0xef79('0x1c')](_0x196672[_0xef79('0x1b')],function(_0x5b4017){return{'model':db[_0x5b4017[_0xef79('0x1d')]],'as':_0x5b4017['as'],'attributes':_0x5b4017[_0xef79('0x19')],'include':_0x5b4017[_0xef79('0x1b')]?_[_0xef79('0x1c')](_0x5b4017['include'],function(_0x38ec60){return{'model':db[_0x38ec60['model']],'as':_0x38ec60['as'],'attributes':_0x38ec60[_0xef79('0x19')]};}):[]};}):[]};}):[]:[]})['then'](function(_0x102d6f){logger[_0xef79('0xb')](_0xef79('0x16'),_0x249a8c);logger[_0xef79('0xe')](_0xef79('0x16'),_0x249a8c,JSON[_0xef79('0x10')](_0x102d6f));_0x55492c(_0x102d6f);})[_0xef79('0x15')](function(_0x2e3bbf){logger['error'](_0xef79('0x16'),_0x2e3bbf['message'],_0x249a8c);_0x276b8b(_0x406ca2[_0xef79('0x11')](0x1f4,_0x2e3bbf[_0xef79('0x13')]));});});};exports[_0xef79('0x1e')]=function(_0x34db2f){var _0x84ad52=this;return new Promise(function(_0x3bb745,_0x2d70ce){return db[_0xef79('0x1f')]['find']({'raw':_0x34db2f[_0xef79('0x18')]?_0x34db2f[_0xef79('0x18')][_0xef79('0x20')]===undefined?!![]:![]:!![],'where':_0x34db2f[_0xef79('0x18')]?_0x34db2f[_0xef79('0x18')][_0xef79('0x21')]||null:null,'attributes':_0x34db2f[_0xef79('0x18')]?_0x34db2f['options'][_0xef79('0x19')]||null:null,'include':_0x34db2f[_0xef79('0x18')]?_0x34db2f[_0xef79('0x18')][_0xef79('0x1b')]?_[_0xef79('0x1c')](_0x34db2f[_0xef79('0x18')][_0xef79('0x1b')],function(_0x360b28){return{'model':db[_0x360b28[_0xef79('0x1d')]],'as':_0x360b28['as'],'attributes':_0x360b28[_0xef79('0x19')],'include':_0x360b28[_0xef79('0x1b')]?_[_0xef79('0x1c')](_0x360b28[_0xef79('0x1b')],function(_0x41d36b){return{'model':db[_0x41d36b[_0xef79('0x1d')]],'as':_0x41d36b['as'],'attributes':_0x41d36b[_0xef79('0x19')],'include':_0x41d36b[_0xef79('0x1b')]?_[_0xef79('0x1c')](_0x41d36b[_0xef79('0x1b')],function(_0x565cf1){return{'model':db[_0x565cf1['model']],'as':_0x565cf1['as'],'attributes':_0x565cf1[_0xef79('0x19')]};}):[]};}):[]};}):[]:[]})['then'](function(_0x4bc12a){logger['info'](_0xef79('0x1e'),_0x34db2f);logger[_0xef79('0xe')]('ShowZohoAccount',_0x34db2f,JSON[_0xef79('0x10')](_0x4bc12a));_0x3bb745(_0x4bc12a);})['catch'](function(_0x529bb4){logger['error'](_0xef79('0x1e'),_0x529bb4[_0xef79('0x13')],_0x34db2f);_0x2d70ce(_0x84ad52[_0xef79('0x11')](0x1f4,_0x529bb4[_0xef79('0x13')]));});});}; \ No newline at end of file diff --git a/server/api/intZohoConfiguration/index.js b/server/api/intZohoConfiguration/index.js index 5385c89..45e468f 100644 --- a/server/api/intZohoConfiguration/index.js +++ b/server/api/intZohoConfiguration/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xecdb=['destroy','exports','multer','path','Router','fs-extra','../../components/auth/service','../../config/environment','./intZohoConfiguration.controller','isAuthenticated','index','get','getFields','/:id/subjects','create','put','update','/:id'];(function(_0x1035c1,_0x2d8583){var _0x308d67=function(_0x58ddb6){while(--_0x58ddb6){_0x1035c1['push'](_0x1035c1['shift']());}};_0x308d67(++_0x2d8583);}(_0xecdb,0x146));var _0xbecd=function(_0x21d40a,_0x4fe406){_0x21d40a=_0x21d40a-0x0;var _0x45fffa=_0xecdb[_0x21d40a];return _0x45fffa;};'use strict';var multer=require(_0xbecd('0x0'));var util=require('util');var path=require(_0xbecd('0x1'));var timeout=require('connect-timeout');var express=require('express');var router=express[_0xbecd('0x2')]();var fs_extra=require(_0xbecd('0x3'));var auth=require(_0xbecd('0x4'));var interaction=require('../../components/interaction/service');var config=require(_0xbecd('0x5'));var controller=require(_0xbecd('0x6'));router['get']('/',auth[_0xbecd('0x7')](),controller[_0xbecd('0x8')]);router[_0xbecd('0x9')]('/:id',auth['isAuthenticated'](),controller['show']);router[_0xbecd('0x9')]('/:id/fields',auth[_0xbecd('0x7')](),controller[_0xbecd('0xa')]);router['get'](_0xbecd('0xb'),auth['isAuthenticated'](),controller['getSubjects']);router[_0xbecd('0x9')]('/:id/descriptions',auth[_0xbecd('0x7')](),controller['getDescriptions']);router['post']('/',auth[_0xbecd('0x7')](),controller[_0xbecd('0xc')]);router[_0xbecd('0xd')]('/:id',auth[_0xbecd('0x7')](),controller[_0xbecd('0xe')]);router['delete'](_0xbecd('0xf'),auth['isAuthenticated'](),controller[_0xbecd('0x10')]);module[_0xbecd('0x11')]=router; \ No newline at end of file +var _0xcdbf=['delete','destroy','exports','multer','path','connect-timeout','express','../../components/auth/service','../../config/environment','./intZohoConfiguration.controller','get','/:id','isAuthenticated','show','getFields','/:id/subjects','getSubjects','/:id/descriptions','getDescriptions','post','create','put','update'];(function(_0x1d0aee,_0x2c4454){var _0x34ee2c=function(_0x6e3b9d){while(--_0x6e3b9d){_0x1d0aee['push'](_0x1d0aee['shift']());}};_0x34ee2c(++_0x2c4454);}(_0xcdbf,0xe9));var _0xfcdb=function(_0x4b369d,_0x265eb8){_0x4b369d=_0x4b369d-0x0;var _0x571a98=_0xcdbf[_0x4b369d];return _0x571a98;};'use strict';var multer=require(_0xfcdb('0x0'));var util=require('util');var path=require(_0xfcdb('0x1'));var timeout=require(_0xfcdb('0x2'));var express=require(_0xfcdb('0x3'));var router=express['Router']();var fs_extra=require('fs-extra');var auth=require(_0xfcdb('0x4'));var interaction=require('../../components/interaction/service');var config=require(_0xfcdb('0x5'));var controller=require(_0xfcdb('0x6'));router[_0xfcdb('0x7')]('/',auth['isAuthenticated'](),controller['index']);router[_0xfcdb('0x7')](_0xfcdb('0x8'),auth[_0xfcdb('0x9')](),controller[_0xfcdb('0xa')]);router[_0xfcdb('0x7')]('/:id/fields',auth[_0xfcdb('0x9')](),controller[_0xfcdb('0xb')]);router[_0xfcdb('0x7')](_0xfcdb('0xc'),auth[_0xfcdb('0x9')](),controller[_0xfcdb('0xd')]);router['get'](_0xfcdb('0xe'),auth[_0xfcdb('0x9')](),controller[_0xfcdb('0xf')]);router[_0xfcdb('0x10')]('/',auth[_0xfcdb('0x9')](),controller[_0xfcdb('0x11')]);router[_0xfcdb('0x12')](_0xfcdb('0x8'),auth['isAuthenticated'](),controller[_0xfcdb('0x13')]);router[_0xfcdb('0x14')]('/:id',auth['isAuthenticated'](),controller[_0xfcdb('0x15')]);module[_0xfcdb('0x16')]=router; \ No newline at end of file diff --git a/server/api/intZohoConfiguration/intZohoConfiguration.attributes.js b/server/api/intZohoConfiguration/intZohoConfiguration.attributes.js index b5dfc55..533f864 100644 --- a/server/api/intZohoConfiguration/intZohoConfiguration.attributes.js +++ b/server/api/intZohoConfiguration/intZohoConfiguration.attributes.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xf2ca=['ENUM','contact_lead','sequelize','exports','STRING','lead','contact','nothing'];(function(_0x1a710d,_0x4433dd){var _0x432c39=function(_0x1688c0){while(--_0x1688c0){_0x1a710d['push'](_0x1a710d['shift']());}};_0x432c39(++_0x4433dd);}(_0xf2ca,0x16a));var _0xaf2c=function(_0xe30e17,_0xce02be){_0xe30e17=_0xe30e17-0x0;var _0x2342c9=_0xf2ca[_0xe30e17];return _0x2342c9;};'use strict';var Sequelize=require(_0xaf2c('0x0'));module[_0xaf2c('0x1')]={'name':{'type':Sequelize[_0xaf2c('0x2')]},'moduleCreate':{'type':Sequelize['ENUM'](_0xaf2c('0x3'),_0xaf2c('0x4'),_0xaf2c('0x5')),'defaultValue':_0xaf2c('0x3')},'moduleSearch':{'type':Sequelize[_0xaf2c('0x6')](_0xaf2c('0x7'),'contact',_0xaf2c('0x3')),'defaultValue':_0xaf2c('0x7')},'description':{'type':Sequelize[_0xaf2c('0x2')]}}; \ No newline at end of file +var _0x84f7=['nothing','ENUM','contact_lead','contact','sequelize','STRING','lead'];(function(_0x3a9ea3,_0x33f993){var _0x10d765=function(_0x1447f2){while(--_0x1447f2){_0x3a9ea3['push'](_0x3a9ea3['shift']());}};_0x10d765(++_0x33f993);}(_0x84f7,0x1e0));var _0x784f=function(_0x215e65,_0x183f97){_0x215e65=_0x215e65-0x0;var _0xa85842=_0x84f7[_0x215e65];return _0xa85842;};'use strict';var Sequelize=require(_0x784f('0x0'));module['exports']={'name':{'type':Sequelize[_0x784f('0x1')]},'moduleCreate':{'type':Sequelize['ENUM'](_0x784f('0x2'),'contact',_0x784f('0x3')),'defaultValue':_0x784f('0x2')},'moduleSearch':{'type':Sequelize[_0x784f('0x4')](_0x784f('0x5'),_0x784f('0x6'),_0x784f('0x2')),'defaultValue':_0x784f('0x5')},'description':{'type':Sequelize[_0x784f('0x1')]}}; \ No newline at end of file diff --git a/server/api/intZohoConfiguration/intZohoConfiguration.controller.js b/server/api/intZohoConfiguration/intZohoConfiguration.controller.js index d792688..5da7f89 100644 --- a/server/api/intZohoConfiguration/intZohoConfiguration.controller.js +++ b/server/api/intZohoConfiguration/intZohoConfiguration.controller.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xf9ba=['set','Content-Range','json','apply','reject','save','update','then','destroy','error','stack','send','index','ZohoConfiguration','rawAttributes','type','key','model','map','keys','query','filters','attributes','fields','length','nolimit','order','sort','where','filter','merge','VIRTUAL','name','options','includeAll','include','findAll','catch','show','params','intersection','find','create','body','getFields','findOne','pick','hasOwnProperty','getSubjects','ZohoField','getDescriptions','eml-format','rimraf','zip-dir','fast-json-patch','moment','mustache','util','path','sox','to-csv','ejs','fs-extra','lodash','crypto','jsforce','desk.js','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/utils','../../config/environment','../../mysqldb','sendStatus','status','end','offset','undefined','limit','count'];(function(_0x431b83,_0x4ecf29){var _0x3c954a=function(_0x5a7974){while(--_0x5a7974){_0x431b83['push'](_0x431b83['shift']());}};_0x3c954a(++_0x4ecf29);}(_0xf9ba,0x1d7));var _0xaf9b=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0xf9ba[_0x3dd15e];return _0x231fd0;};'use strict';var emlformat=require(_0xaf9b('0x0'));var rimraf=require(_0xaf9b('0x1'));var zipdir=require(_0xaf9b('0x2'));var jsonpatch=require(_0xaf9b('0x3'));var rp=require('request-promise');var moment=require(_0xaf9b('0x4'));var BPromise=require('bluebird');var Mustache=require(_0xaf9b('0x5'));var util=require(_0xaf9b('0x6'));var path=require(_0xaf9b('0x7'));var sox=require(_0xaf9b('0x8'));var csv=require(_0xaf9b('0x9'));var ejs=require(_0xaf9b('0xa'));var fs=require('fs');var fs_extra=require(_0xaf9b('0xb'));var _=require(_0xaf9b('0xc'));var squel=require('squel');var crypto=require(_0xaf9b('0xd'));var jsforce=require(_0xaf9b('0xe'));var deskjs=require(_0xaf9b('0xf'));var toCsv=require(_0xaf9b('0x9'));var querystring=require(_0xaf9b('0x10'));var Papa=require(_0xaf9b('0x11'));var Redis=require(_0xaf9b('0x12'));var authService=require(_0xaf9b('0x13'));var qs=require(_0xaf9b('0x14'));var as=require(_0xaf9b('0x15'));var hardwareService=require(_0xaf9b('0x16'));var logger=require('../../config/logger')('api');var utils=require(_0xaf9b('0x17'));var config=require(_0xaf9b('0x18'));var licenseUtil=require('../../config/license/util');var db=require(_0xaf9b('0x19'))['db'];function respondWithStatusCode(_0x5901aa,_0x23d92a){_0x23d92a=_0x23d92a||0xcc;return function(_0x16a96d){if(_0x16a96d){return _0x5901aa[_0xaf9b('0x1a')](_0x23d92a);}return _0x5901aa[_0xaf9b('0x1b')](_0x23d92a)[_0xaf9b('0x1c')]();};}function respondWithResult(_0x5b9464,_0x15e5e4){_0x15e5e4=_0x15e5e4||0xc8;return function(_0x4618e9){if(_0x4618e9){return _0x5b9464[_0xaf9b('0x1b')](_0x15e5e4)['json'](_0x4618e9);}};}function respondWithFilteredResult(_0x92e46a,_0x40f98d){return function(_0x10eef7){if(_0x10eef7){var _0x50416a=typeof _0x40f98d[_0xaf9b('0x1d')]===_0xaf9b('0x1e')&&typeof _0x40f98d[_0xaf9b('0x1f')]===_0xaf9b('0x1e');var _0x4d2946=_0x10eef7[_0xaf9b('0x20')];var _0x4d7800=_0x50416a?0x0:_0x40f98d[_0xaf9b('0x1d')];var _0x12f5b8=_0x50416a?_0x10eef7[_0xaf9b('0x20')]:_0x40f98d[_0xaf9b('0x1d')]+_0x40f98d['limit'];var _0x1b6675;if(_0x12f5b8>=_0x4d2946){_0x12f5b8=_0x4d2946;_0x1b6675=0xc8;}else{_0x1b6675=0xce;}_0x92e46a[_0xaf9b('0x1b')](_0x1b6675);return _0x92e46a[_0xaf9b('0x21')](_0xaf9b('0x22'),_0x4d7800+'-'+_0x12f5b8+'/'+_0x4d2946)[_0xaf9b('0x23')](_0x10eef7);}return null;};}function patchUpdates(_0x34b7b5){return function(_0x44a2ee){try{jsonpatch[_0xaf9b('0x24')](_0x44a2ee,_0x34b7b5,!![]);}catch(_0x13d231){return BPromise[_0xaf9b('0x25')](_0x13d231);}return _0x44a2ee[_0xaf9b('0x26')]();};}function saveUpdates(_0x19fb77,_0x52b384){return function(_0x30a3ba){if(_0x30a3ba){return _0x30a3ba[_0xaf9b('0x27')](_0x19fb77)[_0xaf9b('0x28')](function(_0x5c14bc){return _0x5c14bc;});}return null;};}function removeEntity(_0xe2b756,_0x5ce8d0){return function(_0x58faa4){if(_0x58faa4){return _0x58faa4[_0xaf9b('0x29')]()[_0xaf9b('0x28')](function(){_0xe2b756['status'](0xcc)['end']();});}};}function handleEntityNotFound(_0x2ae310,_0x2eb7ad){return function(_0x2f54a2){if(!_0x2f54a2){_0x2ae310[_0xaf9b('0x1a')](0x194);}return _0x2f54a2;};}function handleError(_0x5c8f6c,_0x20dd9e){_0x20dd9e=_0x20dd9e||0x1f4;return function(_0x27c6d0){logger[_0xaf9b('0x2a')](_0x27c6d0[_0xaf9b('0x2b')]);if(_0x27c6d0['name']){delete _0x27c6d0['name'];}_0x5c8f6c[_0xaf9b('0x1b')](_0x20dd9e)[_0xaf9b('0x2c')](_0x27c6d0);};}exports[_0xaf9b('0x2d')]=function(_0x358b6c,_0x22655f){var _0x49f291={},_0x28f65a={},_0x1cf930={'count':0x0,'rows':[]};var _0x246e45=_['map'](db[_0xaf9b('0x2e')][_0xaf9b('0x2f')],function(_0x10cdab){return{'name':_0x10cdab['fieldName'],'type':_0x10cdab[_0xaf9b('0x30')][_0xaf9b('0x31')]};});_0x28f65a[_0xaf9b('0x32')]=_[_0xaf9b('0x33')](_0x246e45,'name');_0x28f65a['query']=_[_0xaf9b('0x34')](_0x358b6c[_0xaf9b('0x35')]);_0x28f65a[_0xaf9b('0x36')]=_['intersection'](_0x28f65a['model'],_0x28f65a[_0xaf9b('0x35')]);_0x49f291[_0xaf9b('0x37')]=_['intersection'](_0x28f65a[_0xaf9b('0x32')],qs[_0xaf9b('0x38')](_0x358b6c[_0xaf9b('0x35')][_0xaf9b('0x38')]));_0x49f291[_0xaf9b('0x37')]=_0x49f291[_0xaf9b('0x37')][_0xaf9b('0x39')]?_0x49f291[_0xaf9b('0x37')]:_0x28f65a[_0xaf9b('0x32')];if(!_0x358b6c[_0xaf9b('0x35')]['hasOwnProperty'](_0xaf9b('0x3a'))){_0x49f291['limit']=qs['limit'](_0x358b6c[_0xaf9b('0x35')]['limit']);_0x49f291[_0xaf9b('0x1d')]=qs[_0xaf9b('0x1d')](_0x358b6c[_0xaf9b('0x35')][_0xaf9b('0x1d')]);}_0x49f291[_0xaf9b('0x3b')]=qs[_0xaf9b('0x3c')](_0x358b6c[_0xaf9b('0x35')]['sort']);_0x49f291[_0xaf9b('0x3d')]=qs['filters'](_['pick'](_0x358b6c[_0xaf9b('0x35')],_0x28f65a[_0xaf9b('0x36')]),_0x246e45);if(_0x358b6c[_0xaf9b('0x35')][_0xaf9b('0x3e')]){_0x49f291['where']=_[_0xaf9b('0x3f')](_0x49f291[_0xaf9b('0x3d')],{'$or':_[_0xaf9b('0x33')](_0x246e45,function(_0x41c5dc){if(_0x41c5dc['type']!==_0xaf9b('0x40')){var _0x1b87aa={};_0x1b87aa[_0x41c5dc[_0xaf9b('0x41')]]={'$like':'%'+_0x358b6c[_0xaf9b('0x35')][_0xaf9b('0x3e')]+'%'};return _0x1b87aa;}})});}_0x49f291=_[_0xaf9b('0x3f')]({},_0x49f291,_0x358b6c[_0xaf9b('0x42')]);var _0x4e934e={'where':_0x49f291[_0xaf9b('0x3d')]};return db[_0xaf9b('0x2e')]['count'](_0x4e934e)['then'](function(_0x4b775e){_0x1cf930[_0xaf9b('0x20')]=_0x4b775e;if(_0x358b6c['query'][_0xaf9b('0x43')]){_0x49f291[_0xaf9b('0x44')]=[{'all':!![]}];}return db[_0xaf9b('0x2e')][_0xaf9b('0x45')](_0x49f291);})[_0xaf9b('0x28')](function(_0x1306c9){_0x1cf930['rows']=_0x1306c9;return _0x1cf930;})['then'](respondWithFilteredResult(_0x22655f,_0x49f291))[_0xaf9b('0x46')](handleError(_0x22655f,null));};exports[_0xaf9b('0x47')]=function(_0xb95381,_0x462528){var _0xb3ad78={'raw':![],'where':{'id':_0xb95381[_0xaf9b('0x48')]['id']}},_0x10ad8d={};_0x10ad8d[_0xaf9b('0x32')]=_['keys'](db[_0xaf9b('0x2e')][_0xaf9b('0x2f')]);_0x10ad8d[_0xaf9b('0x35')]=_[_0xaf9b('0x34')](_0xb95381[_0xaf9b('0x35')]);_0x10ad8d[_0xaf9b('0x36')]=_[_0xaf9b('0x49')](_0x10ad8d['model'],_0x10ad8d['query']);_0xb3ad78[_0xaf9b('0x37')]=_[_0xaf9b('0x49')](_0x10ad8d[_0xaf9b('0x32')],qs['fields'](_0xb95381[_0xaf9b('0x35')][_0xaf9b('0x38')]));_0xb3ad78['attributes']=_0xb3ad78[_0xaf9b('0x37')][_0xaf9b('0x39')]?_0xb3ad78[_0xaf9b('0x37')]:_0x10ad8d[_0xaf9b('0x32')];if(_0xb95381['query'][_0xaf9b('0x43')]){_0xb3ad78[_0xaf9b('0x44')]=[{'all':!![]}];}_0xb3ad78=_[_0xaf9b('0x3f')]({},_0xb3ad78,_0xb95381[_0xaf9b('0x42')]);return db[_0xaf9b('0x2e')][_0xaf9b('0x4a')](_0xb3ad78)[_0xaf9b('0x28')](handleEntityNotFound(_0x462528,null))[_0xaf9b('0x28')](respondWithResult(_0x462528,null))[_0xaf9b('0x46')](handleError(_0x462528,null));};exports[_0xaf9b('0x4b')]=function(_0x55b76f,_0x676bc4){return db[_0xaf9b('0x2e')][_0xaf9b('0x4b')](_0x55b76f[_0xaf9b('0x4c')],{})[_0xaf9b('0x28')](respondWithResult(_0x676bc4,0xc9))[_0xaf9b('0x46')](handleError(_0x676bc4,null));};exports['update']=function(_0xd576f5,_0x3e5539){if(_0xd576f5['body']['id']){delete _0xd576f5[_0xaf9b('0x4c')]['id'];}return db[_0xaf9b('0x2e')]['find']({'where':{'id':_0xd576f5[_0xaf9b('0x48')]['id']}})[_0xaf9b('0x28')](handleEntityNotFound(_0x3e5539,null))[_0xaf9b('0x28')](saveUpdates(_0xd576f5[_0xaf9b('0x4c')],null))[_0xaf9b('0x28')](respondWithResult(_0x3e5539,null))[_0xaf9b('0x46')](handleError(_0x3e5539,null));};exports['destroy']=function(_0x3f2d64,_0x41a9b3){return db[_0xaf9b('0x2e')][_0xaf9b('0x4a')]({'where':{'id':_0x3f2d64[_0xaf9b('0x48')]['id']}})[_0xaf9b('0x28')](handleEntityNotFound(_0x41a9b3,null))[_0xaf9b('0x28')](removeEntity(_0x41a9b3,null))[_0xaf9b('0x46')](handleError(_0x41a9b3,null));};exports[_0xaf9b('0x4d')]=function(_0x44c945,_0x332a74,_0x32a682){var _0x1369a5={};var _0x447e16={};var _0x40dfc5;var _0xde92e1;return db[_0xaf9b('0x2e')][_0xaf9b('0x4e')]({'where':{'id':_0x44c945[_0xaf9b('0x48')]['id']}})[_0xaf9b('0x28')](handleEntityNotFound(_0x332a74,null))[_0xaf9b('0x28')](function(_0x86f787){if(_0x86f787){_0x40dfc5=_0x86f787;_0x447e16[_0xaf9b('0x32')]=_[_0xaf9b('0x34')](db['ZohoField'][_0xaf9b('0x2f')]);_0x447e16[_0xaf9b('0x35')]=_[_0xaf9b('0x34')](_0x44c945[_0xaf9b('0x35')]);_0x447e16[_0xaf9b('0x36')]=_[_0xaf9b('0x49')](_0x447e16[_0xaf9b('0x32')],_0x447e16[_0xaf9b('0x35')]);_0x1369a5['attributes']=_[_0xaf9b('0x49')](_0x447e16['model'],qs[_0xaf9b('0x38')](_0x44c945[_0xaf9b('0x35')][_0xaf9b('0x38')]));_0x1369a5[_0xaf9b('0x37')]=_0x1369a5[_0xaf9b('0x37')][_0xaf9b('0x39')]?_0x1369a5[_0xaf9b('0x37')]:_0x447e16[_0xaf9b('0x32')];_0x1369a5[_0xaf9b('0x3b')]=qs['sort'](_0x44c945['query'][_0xaf9b('0x3c')]);_0x1369a5[_0xaf9b('0x3d')]=qs[_0xaf9b('0x36')](_[_0xaf9b('0x4f')](_0x44c945['query'],_0x447e16[_0xaf9b('0x36')]));if(_0x44c945[_0xaf9b('0x35')][_0xaf9b('0x3e')]){_0x1369a5[_0xaf9b('0x3d')]=_[_0xaf9b('0x3f')](_0x1369a5['where'],{'$or':_['map'](_0x1369a5[_0xaf9b('0x37')],function(_0x358a5a){var _0x51cb7a={};_0x51cb7a[_0x358a5a]={'$like':'%'+_0x44c945[_0xaf9b('0x35')]['filter']+'%'};return _0x51cb7a;})});}_0x1369a5=_[_0xaf9b('0x3f')]({},_0x1369a5,_0x44c945['options']);return _0x40dfc5[_0xaf9b('0x4d')](_0x1369a5);}})[_0xaf9b('0x28')](function(_0xae9026){if(_0xae9026){_0xde92e1=_0xae9026[_0xaf9b('0x39')];if(!_0x44c945[_0xaf9b('0x35')][_0xaf9b('0x50')](_0xaf9b('0x3a'))){_0x1369a5[_0xaf9b('0x1f')]=qs[_0xaf9b('0x1f')](_0x44c945[_0xaf9b('0x35')][_0xaf9b('0x1f')]);_0x1369a5[_0xaf9b('0x1d')]=qs[_0xaf9b('0x1d')](_0x44c945[_0xaf9b('0x35')][_0xaf9b('0x1d')]);}return _0x40dfc5[_0xaf9b('0x4d')](_0x1369a5);}})[_0xaf9b('0x28')](function(_0x35ecec){if(_0x35ecec){return _0x35ecec?{'count':_0xde92e1,'rows':_0x35ecec}:null;}})[_0xaf9b('0x28')](respondWithResult(_0x332a74,null))[_0xaf9b('0x46')](handleError(_0x332a74,null));};exports[_0xaf9b('0x51')]=function(_0x202cb1,_0x1daef6,_0x5f4509){var _0x46a80d={};var _0x3eeedf={};var _0x34ee3b;var _0x10fa01;return db['ZohoConfiguration'][_0xaf9b('0x4e')]({'where':{'id':_0x202cb1[_0xaf9b('0x48')]['id']}})[_0xaf9b('0x28')](handleEntityNotFound(_0x1daef6,null))[_0xaf9b('0x28')](function(_0x163033){if(_0x163033){_0x34ee3b=_0x163033;_0x3eeedf[_0xaf9b('0x32')]=_[_0xaf9b('0x34')](db[_0xaf9b('0x52')][_0xaf9b('0x2f')]);_0x3eeedf[_0xaf9b('0x35')]=_[_0xaf9b('0x34')](_0x202cb1[_0xaf9b('0x35')]);_0x3eeedf['filters']=_[_0xaf9b('0x49')](_0x3eeedf[_0xaf9b('0x32')],_0x3eeedf['query']);_0x46a80d[_0xaf9b('0x37')]=_[_0xaf9b('0x49')](_0x3eeedf[_0xaf9b('0x32')],qs['fields'](_0x202cb1[_0xaf9b('0x35')][_0xaf9b('0x38')]));_0x46a80d[_0xaf9b('0x37')]=_0x46a80d[_0xaf9b('0x37')][_0xaf9b('0x39')]?_0x46a80d[_0xaf9b('0x37')]:_0x3eeedf[_0xaf9b('0x32')];_0x46a80d[_0xaf9b('0x3b')]=qs['sort'](_0x202cb1[_0xaf9b('0x35')][_0xaf9b('0x3c')]);_0x46a80d['where']=qs[_0xaf9b('0x36')](_[_0xaf9b('0x4f')](_0x202cb1['query'],_0x3eeedf[_0xaf9b('0x36')]));if(_0x202cb1[_0xaf9b('0x35')][_0xaf9b('0x3e')]){_0x46a80d[_0xaf9b('0x3d')]=_[_0xaf9b('0x3f')](_0x46a80d[_0xaf9b('0x3d')],{'$or':_['map'](_0x46a80d['attributes'],function(_0x136989){var _0x253bf0={};_0x253bf0[_0x136989]={'$like':'%'+_0x202cb1[_0xaf9b('0x35')][_0xaf9b('0x3e')]+'%'};return _0x253bf0;})});}_0x46a80d=_['merge']({},_0x46a80d,_0x202cb1[_0xaf9b('0x42')]);return _0x34ee3b[_0xaf9b('0x51')](_0x46a80d);}})[_0xaf9b('0x28')](function(_0x2592d7){if(_0x2592d7){_0x10fa01=_0x2592d7[_0xaf9b('0x39')];if(!_0x202cb1[_0xaf9b('0x35')][_0xaf9b('0x50')](_0xaf9b('0x3a'))){_0x46a80d[_0xaf9b('0x1f')]=qs[_0xaf9b('0x1f')](_0x202cb1['query'][_0xaf9b('0x1f')]);_0x46a80d[_0xaf9b('0x1d')]=qs['offset'](_0x202cb1[_0xaf9b('0x35')][_0xaf9b('0x1d')]);}return _0x34ee3b['getSubjects'](_0x46a80d);}})[_0xaf9b('0x28')](function(_0xe4d906){if(_0xe4d906){return _0xe4d906?{'count':_0x10fa01,'rows':_0xe4d906}:null;}})[_0xaf9b('0x28')](respondWithResult(_0x1daef6,null))[_0xaf9b('0x46')](handleError(_0x1daef6,null));};exports['getDescriptions']=function(_0x5d7bbe,_0x53321b,_0x48790b){var _0x349dc2={};var _0x8c2837={};var _0xd29623;var _0x4a6756;return db[_0xaf9b('0x2e')][_0xaf9b('0x4e')]({'where':{'id':_0x5d7bbe[_0xaf9b('0x48')]['id']}})[_0xaf9b('0x28')](handleEntityNotFound(_0x53321b,null))['then'](function(_0x47b8eb){if(_0x47b8eb){_0xd29623=_0x47b8eb;_0x8c2837[_0xaf9b('0x32')]=_[_0xaf9b('0x34')](db[_0xaf9b('0x52')]['rawAttributes']);_0x8c2837[_0xaf9b('0x35')]=_[_0xaf9b('0x34')](_0x5d7bbe['query']);_0x8c2837[_0xaf9b('0x36')]=_[_0xaf9b('0x49')](_0x8c2837['model'],_0x8c2837['query']);_0x349dc2[_0xaf9b('0x37')]=_[_0xaf9b('0x49')](_0x8c2837[_0xaf9b('0x32')],qs[_0xaf9b('0x38')](_0x5d7bbe[_0xaf9b('0x35')][_0xaf9b('0x38')]));_0x349dc2[_0xaf9b('0x37')]=_0x349dc2[_0xaf9b('0x37')][_0xaf9b('0x39')]?_0x349dc2['attributes']:_0x8c2837[_0xaf9b('0x32')];_0x349dc2[_0xaf9b('0x3b')]=qs[_0xaf9b('0x3c')](_0x5d7bbe[_0xaf9b('0x35')][_0xaf9b('0x3c')]);_0x349dc2[_0xaf9b('0x3d')]=qs[_0xaf9b('0x36')](_[_0xaf9b('0x4f')](_0x5d7bbe[_0xaf9b('0x35')],_0x8c2837[_0xaf9b('0x36')]));if(_0x5d7bbe['query'][_0xaf9b('0x3e')]){_0x349dc2['where']=_['merge'](_0x349dc2[_0xaf9b('0x3d')],{'$or':_[_0xaf9b('0x33')](_0x349dc2['attributes'],function(_0x301be6){var _0x105e46={};_0x105e46[_0x301be6]={'$like':'%'+_0x5d7bbe[_0xaf9b('0x35')]['filter']+'%'};return _0x105e46;})});}_0x349dc2=_['merge']({},_0x349dc2,_0x5d7bbe['options']);return _0xd29623[_0xaf9b('0x53')](_0x349dc2);}})[_0xaf9b('0x28')](function(_0x325a97){if(_0x325a97){_0x4a6756=_0x325a97[_0xaf9b('0x39')];if(!_0x5d7bbe[_0xaf9b('0x35')]['hasOwnProperty'](_0xaf9b('0x3a'))){_0x349dc2['limit']=qs['limit'](_0x5d7bbe[_0xaf9b('0x35')][_0xaf9b('0x1f')]);_0x349dc2[_0xaf9b('0x1d')]=qs['offset'](_0x5d7bbe['query'][_0xaf9b('0x1d')]);}return _0xd29623['getDescriptions'](_0x349dc2);}})['then'](function(_0x4d8cc5){if(_0x4d8cc5){return _0x4d8cc5?{'count':_0x4a6756,'rows':_0x4d8cc5}:null;}})[_0xaf9b('0x28')](respondWithResult(_0x53321b,null))[_0xaf9b('0x46')](handleError(_0x53321b,null));}; \ No newline at end of file +var _0x709f=['keys','find','create','body','destroy','getFields','findOne','ZohoField','getSubjects','getDescriptions','rimraf','zip-dir','fast-json-patch','moment','bluebird','mustache','util','sox','to-csv','fs-extra','lodash','squel','crypto','desk.js','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','sendStatus','end','status','json','offset','undefined','limit','count','set','Content-Range','apply','reject','save','update','then','error','stack','name','index','map','rawAttributes','fieldName','type','key','query','filters','intersection','model','attributes','fields','length','hasOwnProperty','nolimit','order','sort','where','pick','filter','merge','options','ZohoConfiguration','includeAll','findAll','rows','catch','params'];(function(_0x5ddb1c,_0x5ea4df){var _0x354adc=function(_0x2dfb1f){while(--_0x2dfb1f){_0x5ddb1c['push'](_0x5ddb1c['shift']());}};_0x354adc(++_0x5ea4df);}(_0x709f,0x152));var _0xf709=function(_0x80544e,_0x37a3f3){_0x80544e=_0x80544e-0x0;var _0x4f9b90=_0x709f[_0x80544e];return _0x4f9b90;};'use strict';var emlformat=require('eml-format');var rimraf=require(_0xf709('0x0'));var zipdir=require(_0xf709('0x1'));var jsonpatch=require(_0xf709('0x2'));var rp=require('request-promise');var moment=require(_0xf709('0x3'));var BPromise=require(_0xf709('0x4'));var Mustache=require(_0xf709('0x5'));var util=require(_0xf709('0x6'));var path=require('path');var sox=require(_0xf709('0x7'));var csv=require(_0xf709('0x8'));var ejs=require('ejs');var fs=require('fs');var fs_extra=require(_0xf709('0x9'));var _=require(_0xf709('0xa'));var squel=require(_0xf709('0xb'));var crypto=require(_0xf709('0xc'));var jsforce=require('jsforce');var deskjs=require(_0xf709('0xd'));var toCsv=require(_0xf709('0x8'));var querystring=require(_0xf709('0xe'));var Papa=require(_0xf709('0xf'));var Redis=require(_0xf709('0x10'));var authService=require(_0xf709('0x11'));var qs=require(_0xf709('0x12'));var as=require(_0xf709('0x13'));var hardwareService=require(_0xf709('0x14'));var logger=require(_0xf709('0x15'))('api');var utils=require(_0xf709('0x16'));var config=require(_0xf709('0x17'));var licenseUtil=require(_0xf709('0x18'));var db=require(_0xf709('0x19'))['db'];function respondWithStatusCode(_0x2ef940,_0x1600a2){_0x1600a2=_0x1600a2||0xcc;return function(_0x3280d3){if(_0x3280d3){return _0x2ef940[_0xf709('0x1a')](_0x1600a2);}return _0x2ef940['status'](_0x1600a2)[_0xf709('0x1b')]();};}function respondWithResult(_0x5e73f2,_0x36d7e4){_0x36d7e4=_0x36d7e4||0xc8;return function(_0x501edb){if(_0x501edb){return _0x5e73f2[_0xf709('0x1c')](_0x36d7e4)[_0xf709('0x1d')](_0x501edb);}};}function respondWithFilteredResult(_0x38337e,_0x5d1196){return function(_0xce50a9){if(_0xce50a9){var _0x2efca2=typeof _0x5d1196[_0xf709('0x1e')]===_0xf709('0x1f')&&typeof _0x5d1196[_0xf709('0x20')]===_0xf709('0x1f');var _0x226eee=_0xce50a9[_0xf709('0x21')];var _0x21dfa2=_0x2efca2?0x0:_0x5d1196[_0xf709('0x1e')];var _0x28bac9=_0x2efca2?_0xce50a9[_0xf709('0x21')]:_0x5d1196[_0xf709('0x1e')]+_0x5d1196[_0xf709('0x20')];var _0x47e84e;if(_0x28bac9>=_0x226eee){_0x28bac9=_0x226eee;_0x47e84e=0xc8;}else{_0x47e84e=0xce;}_0x38337e[_0xf709('0x1c')](_0x47e84e);return _0x38337e[_0xf709('0x22')](_0xf709('0x23'),_0x21dfa2+'-'+_0x28bac9+'/'+_0x226eee)[_0xf709('0x1d')](_0xce50a9);}return null;};}function patchUpdates(_0xd0e560){return function(_0x42481c){try{jsonpatch[_0xf709('0x24')](_0x42481c,_0xd0e560,!![]);}catch(_0x24ed99){return BPromise[_0xf709('0x25')](_0x24ed99);}return _0x42481c[_0xf709('0x26')]();};}function saveUpdates(_0x5428e5,_0x480ccd){return function(_0x17ca84){if(_0x17ca84){return _0x17ca84[_0xf709('0x27')](_0x5428e5)[_0xf709('0x28')](function(_0xb6ab71){return _0xb6ab71;});}return null;};}function removeEntity(_0x18ff54,_0x287537){return function(_0x393591){if(_0x393591){return _0x393591['destroy']()['then'](function(){_0x18ff54[_0xf709('0x1c')](0xcc)[_0xf709('0x1b')]();});}};}function handleEntityNotFound(_0x127e10,_0x3e4212){return function(_0x3f5749){if(!_0x3f5749){_0x127e10[_0xf709('0x1a')](0x194);}return _0x3f5749;};}function handleError(_0x154f3b,_0x2c81a1){_0x2c81a1=_0x2c81a1||0x1f4;return function(_0x2fb86b){logger[_0xf709('0x29')](_0x2fb86b[_0xf709('0x2a')]);if(_0x2fb86b[_0xf709('0x2b')]){delete _0x2fb86b[_0xf709('0x2b')];}_0x154f3b['status'](_0x2c81a1)['send'](_0x2fb86b);};}exports[_0xf709('0x2c')]=function(_0x413ada,_0x4ae251){var _0xa48d27={},_0xd45cc1={},_0xb5b5c3={'count':0x0,'rows':[]};var _0x20192b=_[_0xf709('0x2d')](db['ZohoConfiguration'][_0xf709('0x2e')],function(_0xbdc659){return{'name':_0xbdc659[_0xf709('0x2f')],'type':_0xbdc659[_0xf709('0x30')][_0xf709('0x31')]};});_0xd45cc1['model']=_[_0xf709('0x2d')](_0x20192b,'name');_0xd45cc1['query']=_['keys'](_0x413ada[_0xf709('0x32')]);_0xd45cc1[_0xf709('0x33')]=_[_0xf709('0x34')](_0xd45cc1[_0xf709('0x35')],_0xd45cc1[_0xf709('0x32')]);_0xa48d27[_0xf709('0x36')]=_[_0xf709('0x34')](_0xd45cc1[_0xf709('0x35')],qs[_0xf709('0x37')](_0x413ada[_0xf709('0x32')][_0xf709('0x37')]));_0xa48d27[_0xf709('0x36')]=_0xa48d27['attributes'][_0xf709('0x38')]?_0xa48d27[_0xf709('0x36')]:_0xd45cc1[_0xf709('0x35')];if(!_0x413ada[_0xf709('0x32')][_0xf709('0x39')](_0xf709('0x3a'))){_0xa48d27[_0xf709('0x20')]=qs[_0xf709('0x20')](_0x413ada[_0xf709('0x32')][_0xf709('0x20')]);_0xa48d27[_0xf709('0x1e')]=qs[_0xf709('0x1e')](_0x413ada[_0xf709('0x32')][_0xf709('0x1e')]);}_0xa48d27[_0xf709('0x3b')]=qs[_0xf709('0x3c')](_0x413ada[_0xf709('0x32')][_0xf709('0x3c')]);_0xa48d27[_0xf709('0x3d')]=qs[_0xf709('0x33')](_[_0xf709('0x3e')](_0x413ada[_0xf709('0x32')],_0xd45cc1[_0xf709('0x33')]),_0x20192b);if(_0x413ada[_0xf709('0x32')][_0xf709('0x3f')]){_0xa48d27['where']=_[_0xf709('0x40')](_0xa48d27[_0xf709('0x3d')],{'$or':_[_0xf709('0x2d')](_0x20192b,function(_0x5198ec){if(_0x5198ec[_0xf709('0x30')]!=='VIRTUAL'){var _0x132a23={};_0x132a23[_0x5198ec[_0xf709('0x2b')]]={'$like':'%'+_0x413ada[_0xf709('0x32')]['filter']+'%'};return _0x132a23;}})});}_0xa48d27=_['merge']({},_0xa48d27,_0x413ada[_0xf709('0x41')]);var _0x2c42e9={'where':_0xa48d27['where']};return db[_0xf709('0x42')]['count'](_0x2c42e9)[_0xf709('0x28')](function(_0x34ac56){_0xb5b5c3[_0xf709('0x21')]=_0x34ac56;if(_0x413ada[_0xf709('0x32')][_0xf709('0x43')]){_0xa48d27['include']=[{'all':!![]}];}return db[_0xf709('0x42')][_0xf709('0x44')](_0xa48d27);})[_0xf709('0x28')](function(_0x3e07ff){_0xb5b5c3[_0xf709('0x45')]=_0x3e07ff;return _0xb5b5c3;})[_0xf709('0x28')](respondWithFilteredResult(_0x4ae251,_0xa48d27))[_0xf709('0x46')](handleError(_0x4ae251,null));};exports['show']=function(_0x1a967f,_0x4fb813){var _0x3b9d9f={'raw':![],'where':{'id':_0x1a967f[_0xf709('0x47')]['id']}},_0x34e03f={};_0x34e03f['model']=_[_0xf709('0x48')](db[_0xf709('0x42')][_0xf709('0x2e')]);_0x34e03f[_0xf709('0x32')]=_[_0xf709('0x48')](_0x1a967f[_0xf709('0x32')]);_0x34e03f[_0xf709('0x33')]=_[_0xf709('0x34')](_0x34e03f[_0xf709('0x35')],_0x34e03f[_0xf709('0x32')]);_0x3b9d9f['attributes']=_['intersection'](_0x34e03f[_0xf709('0x35')],qs['fields'](_0x1a967f['query'][_0xf709('0x37')]));_0x3b9d9f[_0xf709('0x36')]=_0x3b9d9f[_0xf709('0x36')]['length']?_0x3b9d9f['attributes']:_0x34e03f[_0xf709('0x35')];if(_0x1a967f[_0xf709('0x32')][_0xf709('0x43')]){_0x3b9d9f['include']=[{'all':!![]}];}_0x3b9d9f=_[_0xf709('0x40')]({},_0x3b9d9f,_0x1a967f[_0xf709('0x41')]);return db['ZohoConfiguration'][_0xf709('0x49')](_0x3b9d9f)[_0xf709('0x28')](handleEntityNotFound(_0x4fb813,null))[_0xf709('0x28')](respondWithResult(_0x4fb813,null))[_0xf709('0x46')](handleError(_0x4fb813,null));};exports[_0xf709('0x4a')]=function(_0x1b6be2,_0xe36199){return db[_0xf709('0x42')][_0xf709('0x4a')](_0x1b6be2['body'],{})[_0xf709('0x28')](respondWithResult(_0xe36199,0xc9))[_0xf709('0x46')](handleError(_0xe36199,null));};exports[_0xf709('0x27')]=function(_0x3f65ce,_0x5c6e9b){if(_0x3f65ce['body']['id']){delete _0x3f65ce[_0xf709('0x4b')]['id'];}return db[_0xf709('0x42')][_0xf709('0x49')]({'where':{'id':_0x3f65ce['params']['id']}})[_0xf709('0x28')](handleEntityNotFound(_0x5c6e9b,null))[_0xf709('0x28')](saveUpdates(_0x3f65ce[_0xf709('0x4b')],null))['then'](respondWithResult(_0x5c6e9b,null))[_0xf709('0x46')](handleError(_0x5c6e9b,null));};exports[_0xf709('0x4c')]=function(_0x402467,_0x4346d2){return db[_0xf709('0x42')]['find']({'where':{'id':_0x402467['params']['id']}})['then'](handleEntityNotFound(_0x4346d2,null))[_0xf709('0x28')](removeEntity(_0x4346d2,null))[_0xf709('0x46')](handleError(_0x4346d2,null));};exports[_0xf709('0x4d')]=function(_0x48c532,_0x2ba785,_0x20a867){var _0x8afc26={};var _0xf204f7={};var _0xe89b48;var _0x3407dc;return db[_0xf709('0x42')][_0xf709('0x4e')]({'where':{'id':_0x48c532['params']['id']}})[_0xf709('0x28')](handleEntityNotFound(_0x2ba785,null))[_0xf709('0x28')](function(_0x1c95aa){if(_0x1c95aa){_0xe89b48=_0x1c95aa;_0xf204f7[_0xf709('0x35')]=_[_0xf709('0x48')](db[_0xf709('0x4f')][_0xf709('0x2e')]);_0xf204f7[_0xf709('0x32')]=_[_0xf709('0x48')](_0x48c532[_0xf709('0x32')]);_0xf204f7[_0xf709('0x33')]=_['intersection'](_0xf204f7[_0xf709('0x35')],_0xf204f7['query']);_0x8afc26[_0xf709('0x36')]=_[_0xf709('0x34')](_0xf204f7[_0xf709('0x35')],qs[_0xf709('0x37')](_0x48c532['query']['fields']));_0x8afc26['attributes']=_0x8afc26[_0xf709('0x36')][_0xf709('0x38')]?_0x8afc26[_0xf709('0x36')]:_0xf204f7[_0xf709('0x35')];_0x8afc26[_0xf709('0x3b')]=qs[_0xf709('0x3c')](_0x48c532['query'][_0xf709('0x3c')]);_0x8afc26[_0xf709('0x3d')]=qs[_0xf709('0x33')](_[_0xf709('0x3e')](_0x48c532[_0xf709('0x32')],_0xf204f7[_0xf709('0x33')]));if(_0x48c532['query'][_0xf709('0x3f')]){_0x8afc26[_0xf709('0x3d')]=_[_0xf709('0x40')](_0x8afc26[_0xf709('0x3d')],{'$or':_[_0xf709('0x2d')](_0x8afc26[_0xf709('0x36')],function(_0x48a9ab){var _0x269cc7={};_0x269cc7[_0x48a9ab]={'$like':'%'+_0x48c532['query'][_0xf709('0x3f')]+'%'};return _0x269cc7;})});}_0x8afc26=_[_0xf709('0x40')]({},_0x8afc26,_0x48c532[_0xf709('0x41')]);return _0xe89b48[_0xf709('0x4d')](_0x8afc26);}})['then'](function(_0x2bed97){if(_0x2bed97){_0x3407dc=_0x2bed97[_0xf709('0x38')];if(!_0x48c532[_0xf709('0x32')][_0xf709('0x39')]('nolimit')){_0x8afc26['limit']=qs['limit'](_0x48c532['query']['limit']);_0x8afc26['offset']=qs['offset'](_0x48c532[_0xf709('0x32')][_0xf709('0x1e')]);}return _0xe89b48['getFields'](_0x8afc26);}})['then'](function(_0x3a04d7){if(_0x3a04d7){return _0x3a04d7?{'count':_0x3407dc,'rows':_0x3a04d7}:null;}})[_0xf709('0x28')](respondWithResult(_0x2ba785,null))[_0xf709('0x46')](handleError(_0x2ba785,null));};exports['getSubjects']=function(_0x18aa62,_0x454914,_0x51591a){var _0x413e25={};var _0x46d223={};var _0x7ec6ee;var _0x2af4e5;return db[_0xf709('0x42')][_0xf709('0x4e')]({'where':{'id':_0x18aa62[_0xf709('0x47')]['id']}})[_0xf709('0x28')](handleEntityNotFound(_0x454914,null))[_0xf709('0x28')](function(_0x54d2f1){if(_0x54d2f1){_0x7ec6ee=_0x54d2f1;_0x46d223['model']=_['keys'](db[_0xf709('0x4f')]['rawAttributes']);_0x46d223[_0xf709('0x32')]=_[_0xf709('0x48')](_0x18aa62[_0xf709('0x32')]);_0x46d223[_0xf709('0x33')]=_[_0xf709('0x34')](_0x46d223['model'],_0x46d223[_0xf709('0x32')]);_0x413e25[_0xf709('0x36')]=_[_0xf709('0x34')](_0x46d223[_0xf709('0x35')],qs[_0xf709('0x37')](_0x18aa62[_0xf709('0x32')][_0xf709('0x37')]));_0x413e25[_0xf709('0x36')]=_0x413e25[_0xf709('0x36')][_0xf709('0x38')]?_0x413e25[_0xf709('0x36')]:_0x46d223[_0xf709('0x35')];_0x413e25[_0xf709('0x3b')]=qs[_0xf709('0x3c')](_0x18aa62[_0xf709('0x32')][_0xf709('0x3c')]);_0x413e25[_0xf709('0x3d')]=qs[_0xf709('0x33')](_['pick'](_0x18aa62['query'],_0x46d223[_0xf709('0x33')]));if(_0x18aa62['query'][_0xf709('0x3f')]){_0x413e25[_0xf709('0x3d')]=_[_0xf709('0x40')](_0x413e25[_0xf709('0x3d')],{'$or':_[_0xf709('0x2d')](_0x413e25[_0xf709('0x36')],function(_0x32658f){var _0x55f2fa={};_0x55f2fa[_0x32658f]={'$like':'%'+_0x18aa62[_0xf709('0x32')][_0xf709('0x3f')]+'%'};return _0x55f2fa;})});}_0x413e25=_[_0xf709('0x40')]({},_0x413e25,_0x18aa62[_0xf709('0x41')]);return _0x7ec6ee[_0xf709('0x50')](_0x413e25);}})['then'](function(_0x3f0fde){if(_0x3f0fde){_0x2af4e5=_0x3f0fde['length'];if(!_0x18aa62[_0xf709('0x32')][_0xf709('0x39')](_0xf709('0x3a'))){_0x413e25[_0xf709('0x20')]=qs[_0xf709('0x20')](_0x18aa62[_0xf709('0x32')][_0xf709('0x20')]);_0x413e25[_0xf709('0x1e')]=qs[_0xf709('0x1e')](_0x18aa62['query'][_0xf709('0x1e')]);}return _0x7ec6ee[_0xf709('0x50')](_0x413e25);}})[_0xf709('0x28')](function(_0x53a4c6){if(_0x53a4c6){return _0x53a4c6?{'count':_0x2af4e5,'rows':_0x53a4c6}:null;}})[_0xf709('0x28')](respondWithResult(_0x454914,null))['catch'](handleError(_0x454914,null));};exports[_0xf709('0x51')]=function(_0x4feab5,_0x3a0b21,_0xdc5d29){var _0x23a208={};var _0x4b214a={};var _0xcf743d;var _0x2eecc0;return db[_0xf709('0x42')]['findOne']({'where':{'id':_0x4feab5['params']['id']}})[_0xf709('0x28')](handleEntityNotFound(_0x3a0b21,null))[_0xf709('0x28')](function(_0x52f7ef){if(_0x52f7ef){_0xcf743d=_0x52f7ef;_0x4b214a[_0xf709('0x35')]=_[_0xf709('0x48')](db[_0xf709('0x4f')][_0xf709('0x2e')]);_0x4b214a[_0xf709('0x32')]=_[_0xf709('0x48')](_0x4feab5[_0xf709('0x32')]);_0x4b214a[_0xf709('0x33')]=_['intersection'](_0x4b214a[_0xf709('0x35')],_0x4b214a['query']);_0x23a208['attributes']=_[_0xf709('0x34')](_0x4b214a[_0xf709('0x35')],qs[_0xf709('0x37')](_0x4feab5['query'][_0xf709('0x37')]));_0x23a208[_0xf709('0x36')]=_0x23a208[_0xf709('0x36')]['length']?_0x23a208[_0xf709('0x36')]:_0x4b214a['model'];_0x23a208[_0xf709('0x3b')]=qs[_0xf709('0x3c')](_0x4feab5[_0xf709('0x32')]['sort']);_0x23a208['where']=qs[_0xf709('0x33')](_[_0xf709('0x3e')](_0x4feab5[_0xf709('0x32')],_0x4b214a['filters']));if(_0x4feab5[_0xf709('0x32')][_0xf709('0x3f')]){_0x23a208[_0xf709('0x3d')]=_['merge'](_0x23a208['where'],{'$or':_[_0xf709('0x2d')](_0x23a208['attributes'],function(_0x789354){var _0x2a02dd={};_0x2a02dd[_0x789354]={'$like':'%'+_0x4feab5[_0xf709('0x32')][_0xf709('0x3f')]+'%'};return _0x2a02dd;})});}_0x23a208=_[_0xf709('0x40')]({},_0x23a208,_0x4feab5['options']);return _0xcf743d[_0xf709('0x51')](_0x23a208);}})['then'](function(_0x5a1978){if(_0x5a1978){_0x2eecc0=_0x5a1978[_0xf709('0x38')];if(!_0x4feab5[_0xf709('0x32')]['hasOwnProperty'](_0xf709('0x3a'))){_0x23a208[_0xf709('0x20')]=qs['limit'](_0x4feab5[_0xf709('0x32')][_0xf709('0x20')]);_0x23a208[_0xf709('0x1e')]=qs[_0xf709('0x1e')](_0x4feab5[_0xf709('0x32')][_0xf709('0x1e')]);}return _0xcf743d[_0xf709('0x51')](_0x23a208);}})['then'](function(_0x3f1cca){if(_0x3f1cca){return _0x3f1cca?{'count':_0x2eecc0,'rows':_0x3f1cca}:null;}})[_0xf709('0x28')](respondWithResult(_0x3a0b21,null))[_0xf709('0x46')](handleError(_0x3a0b21,null));}; \ No newline at end of file diff --git a/server/api/intZohoConfiguration/intZohoConfiguration.model.js b/server/api/intZohoConfiguration/intZohoConfiguration.model.js index ec5c5f8..8ed5729 100644 --- a/server/api/intZohoConfiguration/intZohoConfiguration.model.js +++ b/server/api/intZohoConfiguration/intZohoConfiguration.model.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xc573=['../../config/environment','./intZohoConfiguration.attributes','exports','define','int_zoho_configurations','lodash','util','../../config/logger','api','moment','bluebird','path','rimraf'];(function(_0x4c72e2,_0x34afd1){var _0x34601e=function(_0x1400d6){while(--_0x1400d6){_0x4c72e2['push'](_0x4c72e2['shift']());}};_0x34601e(++_0x34afd1);}(_0xc573,0x1a5));var _0x3c57=function(_0x138adb,_0x193fee){_0x138adb=_0x138adb-0x0;var _0x1b27f2=_0xc573[_0x138adb];return _0x1b27f2;};'use strict';var _=require(_0x3c57('0x0'));var util=require(_0x3c57('0x1'));var logger=require(_0x3c57('0x2'))(_0x3c57('0x3'));var moment=require(_0x3c57('0x4'));var BPromise=require(_0x3c57('0x5'));var rp=require('request-promise');var fs=require('fs');var path=require(_0x3c57('0x6'));var rimraf=require(_0x3c57('0x7'));var config=require(_0x3c57('0x8'));var attributes=require(_0x3c57('0x9'));module[_0x3c57('0xa')]=function(_0x21bde5,_0x5545b2){return _0x21bde5[_0x3c57('0xb')]('ZohoConfiguration',attributes,{'tableName':_0x3c57('0xc'),'paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file +var _0x33ed=['lodash','util','../../config/logger','bluebird','request-promise','path','rimraf','../../config/environment','define','ZohoConfiguration','int_zoho_configurations'];(function(_0x2defb5,_0x1cda14){var _0x229c53=function(_0x5dd408){while(--_0x5dd408){_0x2defb5['push'](_0x2defb5['shift']());}};_0x229c53(++_0x1cda14);}(_0x33ed,0x1c3));var _0xd33e=function(_0x568cf0,_0x1a44cb){_0x568cf0=_0x568cf0-0x0;var _0x360f81=_0x33ed[_0x568cf0];return _0x360f81;};'use strict';var _=require(_0xd33e('0x0'));var util=require(_0xd33e('0x1'));var logger=require(_0xd33e('0x2'))('api');var moment=require('moment');var BPromise=require(_0xd33e('0x3'));var rp=require(_0xd33e('0x4'));var fs=require('fs');var path=require(_0xd33e('0x5'));var rimraf=require(_0xd33e('0x6'));var config=require(_0xd33e('0x7'));var attributes=require('./intZohoConfiguration.attributes');module['exports']=function(_0x150bad,_0x4b2e0f){return _0x150bad[_0xd33e('0x8')](_0xd33e('0x9'),attributes,{'tableName':_0xd33e('0xa'),'paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file diff --git a/server/api/intZohoConfiguration/intZohoConfiguration.rpc.js b/server/api/intZohoConfiguration/intZohoConfiguration.rpc.js index 61bd3d0..0e86994 100644 --- a/server/api/intZohoConfiguration/intZohoConfiguration.rpc.js +++ b/server/api/intZohoConfiguration/intZohoConfiguration.rpc.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xe10e=['result','catch','lodash','util','moment','../../config/utils','../../config/logger','../../config/environment','jayson/promise','info','ZohoConfiguration,\x20%s,\x20%s','request\x20sent','debug','stringify','error','message'];(function(_0x46266b,_0x267976){var _0x25ab15=function(_0x52bb81){while(--_0x52bb81){_0x46266b['push'](_0x46266b['shift']());}};_0x25ab15(++_0x267976);}(_0xe10e,0x182));var _0xee10=function(_0x2aa91d,_0x1b4ef5){_0x2aa91d=_0x2aa91d-0x0;var _0x204079=_0xe10e[_0x2aa91d];return _0x204079;};'use strict';var _=require(_0xee10('0x0'));var util=require(_0xee10('0x1'));var moment=require(_0xee10('0x2'));var BPromise=require('bluebird');var rs=require('randomstring');var fs=require('fs');var Redis=require('ioredis');var db=require('../../mysqldb')['db'];var utils=require(_0xee10('0x3'));var logger=require(_0xee10('0x4'))('rpc');var config=require(_0xee10('0x5'));var jayson=require(_0xee10('0x6'));var client=jayson['client']['http']({'port':0x232a});function respondWithRpcPromise(_0x3dcaa8,_0x248f76,_0x471ae5){return new BPromise(function(_0x397bd4,_0xb450c0){return client['request'](_0x3dcaa8,_0x471ae5)['then'](function(_0x151fbb){logger[_0xee10('0x7')](_0xee10('0x8'),_0x248f76,_0xee10('0x9'));logger[_0xee10('0xa')]('ZohoConfiguration,\x20%s,\x20%s,\x20%s',_0x248f76,_0xee10('0x9'),JSON[_0xee10('0xb')](_0x151fbb));if(_0x151fbb[_0xee10('0xc')]){if(_0x151fbb[_0xee10('0xc')]['code']===0x1f4){logger['error']('ZohoConfiguration,\x20%s,\x20%s',_0x248f76,_0x151fbb[_0xee10('0xc')][_0xee10('0xd')]);return _0xb450c0(_0x151fbb[_0xee10('0xc')][_0xee10('0xd')]);}logger[_0xee10('0xc')]('ZohoConfiguration,\x20%s,\x20%s',_0x248f76,_0x151fbb[_0xee10('0xc')][_0xee10('0xd')]);return _0x397bd4(_0x151fbb['error'][_0xee10('0xd')]);}else{logger[_0xee10('0x7')](_0xee10('0x8'),_0x248f76,_0xee10('0x9'));_0x397bd4(_0x151fbb[_0xee10('0xe')][_0xee10('0xd')]);}})[_0xee10('0xf')](function(_0x522ea5){logger[_0xee10('0xc')]('ZohoConfiguration,\x20%s,\x20%s',_0x248f76,_0x522ea5);_0xb450c0(_0x522ea5);});});} \ No newline at end of file +var _0x018d=['client','http','info','ZohoConfiguration,\x20%s,\x20%s','request\x20sent','debug','ZohoConfiguration,\x20%s,\x20%s,\x20%s','error','message','result','catch','lodash','util','moment','ioredis','../../mysqldb','../../config/utils','../../config/logger','../../config/environment'];(function(_0x342fff,_0xb16078){var _0x115b0d=function(_0x5c9ecf){while(--_0x5c9ecf){_0x342fff['push'](_0x342fff['shift']());}};_0x115b0d(++_0xb16078);}(_0x018d,0xa3));var _0xd018=function(_0x56e984,_0x57363d){_0x56e984=_0x56e984-0x0;var _0x4cb323=_0x018d[_0x56e984];return _0x4cb323;};'use strict';var _=require(_0xd018('0x0'));var util=require(_0xd018('0x1'));var moment=require(_0xd018('0x2'));var BPromise=require('bluebird');var rs=require('randomstring');var fs=require('fs');var Redis=require(_0xd018('0x3'));var db=require(_0xd018('0x4'))['db'];var utils=require(_0xd018('0x5'));var logger=require(_0xd018('0x6'))('rpc');var config=require(_0xd018('0x7'));var jayson=require('jayson/promise');var client=jayson[_0xd018('0x8')][_0xd018('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x166cc9,_0x1719cb,_0x43d46f){return new BPromise(function(_0x1cb047,_0x218cb4){return client['request'](_0x166cc9,_0x43d46f)['then'](function(_0x16dc71){logger[_0xd018('0xa')](_0xd018('0xb'),_0x1719cb,_0xd018('0xc'));logger[_0xd018('0xd')](_0xd018('0xe'),_0x1719cb,_0xd018('0xc'),JSON['stringify'](_0x16dc71));if(_0x16dc71['error']){if(_0x16dc71[_0xd018('0xf')]['code']===0x1f4){logger[_0xd018('0xf')]('ZohoConfiguration,\x20%s,\x20%s',_0x1719cb,_0x16dc71['error'][_0xd018('0x10')]);return _0x218cb4(_0x16dc71[_0xd018('0xf')][_0xd018('0x10')]);}logger[_0xd018('0xf')](_0xd018('0xb'),_0x1719cb,_0x16dc71['error'][_0xd018('0x10')]);return _0x1cb047(_0x16dc71[_0xd018('0xf')][_0xd018('0x10')]);}else{logger['info'](_0xd018('0xb'),_0x1719cb,_0xd018('0xc'));_0x1cb047(_0x16dc71[_0xd018('0x11')][_0xd018('0x10')]);}})[_0xd018('0x12')](function(_0x1d6e5a){logger[_0xd018('0xf')](_0xd018('0xb'),_0x1719cb,_0x1d6e5a);_0x218cb4(_0x1d6e5a);});});} \ No newline at end of file diff --git a/server/api/intZohoField/index.js b/server/api/intZohoField/index.js index 8f9c84b..801f12f 100644 --- a/server/api/intZohoField/index.js +++ b/server/api/intZohoField/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x60b6=['exports','multer','util','connect-timeout','express','Router','../../components/auth/service','../../components/interaction/service','./intZohoField.controller','get','isAuthenticated','index','/:id','show','post','create','put','delete','destroy'];(function(_0x57b54c,_0x54ce0d){var _0x59cc19=function(_0xa33bc6){while(--_0xa33bc6){_0x57b54c['push'](_0x57b54c['shift']());}};_0x59cc19(++_0x54ce0d);}(_0x60b6,0xd2));var _0x660b=function(_0x39af0f,_0x3666ab){_0x39af0f=_0x39af0f-0x0;var _0x72c357=_0x60b6[_0x39af0f];return _0x72c357;};'use strict';var multer=require(_0x660b('0x0'));var util=require(_0x660b('0x1'));var path=require('path');var timeout=require(_0x660b('0x2'));var express=require(_0x660b('0x3'));var router=express[_0x660b('0x4')]();var fs_extra=require('fs-extra');var auth=require(_0x660b('0x5'));var interaction=require(_0x660b('0x6'));var config=require('../../config/environment');var controller=require(_0x660b('0x7'));router[_0x660b('0x8')]('/',auth[_0x660b('0x9')](),controller[_0x660b('0xa')]);router[_0x660b('0x8')](_0x660b('0xb'),auth[_0x660b('0x9')](),controller[_0x660b('0xc')]);router[_0x660b('0xd')]('/',auth[_0x660b('0x9')](),controller[_0x660b('0xe')]);router[_0x660b('0xf')](_0x660b('0xb'),auth['isAuthenticated'](),controller['update']);router[_0x660b('0x10')](_0x660b('0xb'),auth[_0x660b('0x9')](),controller[_0x660b('0x11')]);module[_0x660b('0x12')]=router; \ No newline at end of file +var _0x5071=['Router','fs-extra','../../components/interaction/service','../../config/environment','./intZohoField.controller','/:id','isAuthenticated','post','put','update','delete','util','path','connect-timeout','express'];(function(_0x1f7591,_0x989408){var _0x11cfde=function(_0x34a3f1){while(--_0x34a3f1){_0x1f7591['push'](_0x1f7591['shift']());}};_0x11cfde(++_0x989408);}(_0x5071,0xbf));var _0x1507=function(_0x53d9a7,_0x44c4a3){_0x53d9a7=_0x53d9a7-0x0;var _0x1c8958=_0x5071[_0x53d9a7];return _0x1c8958;};'use strict';var multer=require('multer');var util=require(_0x1507('0x0'));var path=require(_0x1507('0x1'));var timeout=require(_0x1507('0x2'));var express=require(_0x1507('0x3'));var router=express[_0x1507('0x4')]();var fs_extra=require(_0x1507('0x5'));var auth=require('../../components/auth/service');var interaction=require(_0x1507('0x6'));var config=require(_0x1507('0x7'));var controller=require(_0x1507('0x8'));router['get']('/',auth['isAuthenticated'](),controller['index']);router['get'](_0x1507('0x9'),auth[_0x1507('0xa')](),controller['show']);router[_0x1507('0xb')]('/',auth[_0x1507('0xa')](),controller['create']);router[_0x1507('0xc')]('/:id',auth[_0x1507('0xa')](),controller[_0x1507('0xd')]);router[_0x1507('0xe')]('/:id',auth['isAuthenticated'](),controller['destroy']);module['exports']=router; \ No newline at end of file diff --git a/server/api/intZohoField/intZohoField.attributes.js b/server/api/intZohoField/intZohoField.attributes.js index 25a8ea7..eb01c50 100644 --- a/server/api/intZohoField/intZohoField.attributes.js +++ b/server/api/intZohoField/intZohoField.attributes.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x50d3=['STRING','BOOLEAN','sequelize','ENUM','string','variable','customVariable','keyValue','picklist'];(function(_0x1e5c8d,_0x1bd355){var _0x17f720=function(_0x4cdadf){while(--_0x4cdadf){_0x1e5c8d['push'](_0x1e5c8d['shift']());}};_0x17f720(++_0x1bd355);}(_0x50d3,0xad));var _0x350d=function(_0x1cfa0d,_0x4391f2){_0x1cfa0d=_0x1cfa0d-0x0;var _0xe33279=_0x50d3[_0x1cfa0d];return _0xe33279;};'use strict';var Sequelize=require(_0x350d('0x0'));module['exports']={'type':{'type':Sequelize[_0x350d('0x1')](_0x350d('0x2'),_0x350d('0x3'),_0x350d('0x4'),_0x350d('0x5'),_0x350d('0x6')),'defaultValue':_0x350d('0x2')},'content':{'type':Sequelize[_0x350d('0x7')]},'key':{'type':Sequelize[_0x350d('0x7')]},'keyType':{'type':Sequelize[_0x350d('0x1')]('string',_0x350d('0x3'),_0x350d('0x4'))},'keyContent':{'type':Sequelize['STRING']},'idField':{'type':Sequelize['STRING']},'nameField':{'type':Sequelize[_0x350d('0x7')]},'customField':{'type':Sequelize[_0x350d('0x8')],'defaultValue':!![]},'variableName':{'type':Sequelize['STRING']}}; \ No newline at end of file +var _0xf05a=['keyValue','STRING','sequelize','exports','ENUM','string','variable','customVariable'];(function(_0x513aa5,_0x1fba79){var _0x1a1a7c=function(_0x240e3f){while(--_0x240e3f){_0x513aa5['push'](_0x513aa5['shift']());}};_0x1a1a7c(++_0x1fba79);}(_0xf05a,0x72));var _0xaf05=function(_0x4a9fb1,_0x273043){_0x4a9fb1=_0x4a9fb1-0x0;var _0x348672=_0xf05a[_0x4a9fb1];return _0x348672;};'use strict';var Sequelize=require(_0xaf05('0x0'));module[_0xaf05('0x1')]={'type':{'type':Sequelize[_0xaf05('0x2')](_0xaf05('0x3'),_0xaf05('0x4'),_0xaf05('0x5'),_0xaf05('0x6'),'picklist'),'defaultValue':_0xaf05('0x3')},'content':{'type':Sequelize[_0xaf05('0x7')]},'key':{'type':Sequelize[_0xaf05('0x7')]},'keyType':{'type':Sequelize[_0xaf05('0x2')](_0xaf05('0x3'),'variable',_0xaf05('0x5'))},'keyContent':{'type':Sequelize['STRING']},'idField':{'type':Sequelize['STRING']},'nameField':{'type':Sequelize[_0xaf05('0x7')]},'customField':{'type':Sequelize['BOOLEAN'],'defaultValue':!![]},'variableName':{'type':Sequelize[_0xaf05('0x7')]}}; \ No newline at end of file diff --git a/server/api/intZohoField/intZohoField.controller.js b/server/api/intZohoField/intZohoField.controller.js index 3d53a4e..4980d2e 100644 --- a/server/api/intZohoField/intZohoField.controller.js +++ b/server/api/intZohoField/intZohoField.controller.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x239e=['stack','name','send','index','map','ZohoField','rawAttributes','fieldName','type','key','model','query','keys','attributes','intersection','fields','length','hasOwnProperty','nolimit','order','sort','where','filters','pick','filter','merge','options','includeAll','include','findAll','rows','catch','show','params','find','create','body','eml-format','rimraf','zip-dir','request-promise','moment','mustache','util','path','to-csv','ejs','lodash','squel','crypto','jsforce','desk.js','querystring','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/environment','../../mysqldb','sendStatus','status','end','offset','undefined','count','limit','set','json','apply','reject','update','then','destroy','error'];(function(_0x1745ee,_0x3e3cc2){var _0x415394=function(_0x5c6ebe){while(--_0x5c6ebe){_0x1745ee['push'](_0x1745ee['shift']());}};_0x415394(++_0x3e3cc2);}(_0x239e,0xbd));var _0xe239=function(_0x4243a3,_0x447337){_0x4243a3=_0x4243a3-0x0;var _0x1b2a33=_0x239e[_0x4243a3];return _0x1b2a33;};'use strict';var emlformat=require(_0xe239('0x0'));var rimraf=require(_0xe239('0x1'));var zipdir=require(_0xe239('0x2'));var jsonpatch=require('fast-json-patch');var rp=require(_0xe239('0x3'));var moment=require(_0xe239('0x4'));var BPromise=require('bluebird');var Mustache=require(_0xe239('0x5'));var util=require(_0xe239('0x6'));var path=require(_0xe239('0x7'));var sox=require('sox');var csv=require(_0xe239('0x8'));var ejs=require(_0xe239('0x9'));var fs=require('fs');var fs_extra=require('fs-extra');var _=require(_0xe239('0xa'));var squel=require(_0xe239('0xb'));var crypto=require(_0xe239('0xc'));var jsforce=require(_0xe239('0xd'));var deskjs=require(_0xe239('0xe'));var toCsv=require(_0xe239('0x8'));var querystring=require(_0xe239('0xf'));var Papa=require('papaparse');var Redis=require('ioredis');var authService=require(_0xe239('0x10'));var qs=require(_0xe239('0x11'));var as=require(_0xe239('0x12'));var hardwareService=require(_0xe239('0x13'));var logger=require(_0xe239('0x14'))(_0xe239('0x15'));var utils=require('../../config/utils');var config=require(_0xe239('0x16'));var licenseUtil=require('../../config/license/util');var db=require(_0xe239('0x17'))['db'];function respondWithStatusCode(_0x511624,_0x49748e){_0x49748e=_0x49748e||0xcc;return function(_0x58258d){if(_0x58258d){return _0x511624[_0xe239('0x18')](_0x49748e);}return _0x511624[_0xe239('0x19')](_0x49748e)[_0xe239('0x1a')]();};}function respondWithResult(_0x38dd53,_0x139eb7){_0x139eb7=_0x139eb7||0xc8;return function(_0x4c58b0){if(_0x4c58b0){return _0x38dd53[_0xe239('0x19')](_0x139eb7)['json'](_0x4c58b0);}};}function respondWithFilteredResult(_0x5f5da7,_0x2fec5d){return function(_0x6a48b0){if(_0x6a48b0){var _0x10c849=typeof _0x2fec5d[_0xe239('0x1b')]===_0xe239('0x1c')&&typeof _0x2fec5d['limit']==='undefined';var _0x32f559=_0x6a48b0[_0xe239('0x1d')];var _0x1c9d6c=_0x10c849?0x0:_0x2fec5d[_0xe239('0x1b')];var _0x24b58a=_0x10c849?_0x6a48b0['count']:_0x2fec5d[_0xe239('0x1b')]+_0x2fec5d[_0xe239('0x1e')];var _0x4ed4a6;if(_0x24b58a>=_0x32f559){_0x24b58a=_0x32f559;_0x4ed4a6=0xc8;}else{_0x4ed4a6=0xce;}_0x5f5da7[_0xe239('0x19')](_0x4ed4a6);return _0x5f5da7[_0xe239('0x1f')]('Content-Range',_0x1c9d6c+'-'+_0x24b58a+'/'+_0x32f559)[_0xe239('0x20')](_0x6a48b0);}return null;};}function patchUpdates(_0x4bd4ff){return function(_0x1765b7){try{jsonpatch[_0xe239('0x21')](_0x1765b7,_0x4bd4ff,!![]);}catch(_0x57a419){return BPromise[_0xe239('0x22')](_0x57a419);}return _0x1765b7['save']();};}function saveUpdates(_0x105fa1,_0x29cec1){return function(_0x3a2824){if(_0x3a2824){return _0x3a2824[_0xe239('0x23')](_0x105fa1)[_0xe239('0x24')](function(_0x3cc45e){return _0x3cc45e;});}return null;};}function removeEntity(_0x193279,_0x3e3451){return function(_0x39dbea){if(_0x39dbea){return _0x39dbea[_0xe239('0x25')]()[_0xe239('0x24')](function(){_0x193279[_0xe239('0x19')](0xcc)['end']();});}};}function handleEntityNotFound(_0x1e441c,_0x246066){return function(_0x3349b6){if(!_0x3349b6){_0x1e441c[_0xe239('0x18')](0x194);}return _0x3349b6;};}function handleError(_0x40c73a,_0x266d19){_0x266d19=_0x266d19||0x1f4;return function(_0x4edfd6){logger[_0xe239('0x26')](_0x4edfd6[_0xe239('0x27')]);if(_0x4edfd6[_0xe239('0x28')]){delete _0x4edfd6['name'];}_0x40c73a[_0xe239('0x19')](_0x266d19)[_0xe239('0x29')](_0x4edfd6);};}exports[_0xe239('0x2a')]=function(_0x43e1b1,_0x44f6e0){var _0x19a863={},_0x32a82e={},_0x395226={'count':0x0,'rows':[]};var _0x1dfe1f=_[_0xe239('0x2b')](db[_0xe239('0x2c')][_0xe239('0x2d')],function(_0x58d76c){return{'name':_0x58d76c[_0xe239('0x2e')],'type':_0x58d76c[_0xe239('0x2f')][_0xe239('0x30')]};});_0x32a82e[_0xe239('0x31')]=_[_0xe239('0x2b')](_0x1dfe1f,_0xe239('0x28'));_0x32a82e[_0xe239('0x32')]=_[_0xe239('0x33')](_0x43e1b1['query']);_0x32a82e['filters']=_['intersection'](_0x32a82e[_0xe239('0x31')],_0x32a82e[_0xe239('0x32')]);_0x19a863[_0xe239('0x34')]=_[_0xe239('0x35')](_0x32a82e[_0xe239('0x31')],qs['fields'](_0x43e1b1[_0xe239('0x32')][_0xe239('0x36')]));_0x19a863['attributes']=_0x19a863[_0xe239('0x34')][_0xe239('0x37')]?_0x19a863[_0xe239('0x34')]:_0x32a82e[_0xe239('0x31')];if(!_0x43e1b1[_0xe239('0x32')][_0xe239('0x38')](_0xe239('0x39'))){_0x19a863[_0xe239('0x1e')]=qs[_0xe239('0x1e')](_0x43e1b1[_0xe239('0x32')][_0xe239('0x1e')]);_0x19a863[_0xe239('0x1b')]=qs[_0xe239('0x1b')](_0x43e1b1[_0xe239('0x32')][_0xe239('0x1b')]);}_0x19a863[_0xe239('0x3a')]=qs[_0xe239('0x3b')](_0x43e1b1[_0xe239('0x32')][_0xe239('0x3b')]);_0x19a863[_0xe239('0x3c')]=qs[_0xe239('0x3d')](_[_0xe239('0x3e')](_0x43e1b1[_0xe239('0x32')],_0x32a82e[_0xe239('0x3d')]),_0x1dfe1f);if(_0x43e1b1[_0xe239('0x32')][_0xe239('0x3f')]){_0x19a863[_0xe239('0x3c')]=_[_0xe239('0x40')](_0x19a863[_0xe239('0x3c')],{'$or':_[_0xe239('0x2b')](_0x1dfe1f,function(_0x9d3b57){if(_0x9d3b57['type']!=='VIRTUAL'){var _0x3ca9d0={};_0x3ca9d0[_0x9d3b57[_0xe239('0x28')]]={'$like':'%'+_0x43e1b1[_0xe239('0x32')][_0xe239('0x3f')]+'%'};return _0x3ca9d0;}})});}_0x19a863=_[_0xe239('0x40')]({},_0x19a863,_0x43e1b1[_0xe239('0x41')]);var _0x4040d8={'where':_0x19a863[_0xe239('0x3c')]};return db['ZohoField'][_0xe239('0x1d')](_0x4040d8)[_0xe239('0x24')](function(_0x5af558){_0x395226[_0xe239('0x1d')]=_0x5af558;if(_0x43e1b1[_0xe239('0x32')][_0xe239('0x42')]){_0x19a863[_0xe239('0x43')]=[{'all':!![]}];}return db['ZohoField'][_0xe239('0x44')](_0x19a863);})[_0xe239('0x24')](function(_0x658bcf){_0x395226[_0xe239('0x45')]=_0x658bcf;return _0x395226;})['then'](respondWithFilteredResult(_0x44f6e0,_0x19a863))[_0xe239('0x46')](handleError(_0x44f6e0,null));};exports[_0xe239('0x47')]=function(_0xe1a635,_0x23af37){var _0x56ab44={'raw':!![],'where':{'id':_0xe1a635[_0xe239('0x48')]['id']}},_0x1bd6a0={};_0x1bd6a0[_0xe239('0x31')]=_[_0xe239('0x33')](db[_0xe239('0x2c')][_0xe239('0x2d')]);_0x1bd6a0[_0xe239('0x32')]=_[_0xe239('0x33')](_0xe1a635[_0xe239('0x32')]);_0x1bd6a0[_0xe239('0x3d')]=_['intersection'](_0x1bd6a0['model'],_0x1bd6a0[_0xe239('0x32')]);_0x56ab44[_0xe239('0x34')]=_[_0xe239('0x35')](_0x1bd6a0[_0xe239('0x31')],qs['fields'](_0xe1a635['query'][_0xe239('0x36')]));_0x56ab44[_0xe239('0x34')]=_0x56ab44['attributes'][_0xe239('0x37')]?_0x56ab44[_0xe239('0x34')]:_0x1bd6a0['model'];if(_0xe1a635['query']['includeAll']){_0x56ab44[_0xe239('0x43')]=[{'all':!![]}];}_0x56ab44=_[_0xe239('0x40')]({},_0x56ab44,_0xe1a635[_0xe239('0x41')]);return db[_0xe239('0x2c')][_0xe239('0x49')](_0x56ab44)[_0xe239('0x24')](handleEntityNotFound(_0x23af37,null))[_0xe239('0x24')](respondWithResult(_0x23af37,null))[_0xe239('0x46')](handleError(_0x23af37,null));};exports[_0xe239('0x4a')]=function(_0x62fd77,_0x4abea0){return db[_0xe239('0x2c')][_0xe239('0x4a')](_0x62fd77[_0xe239('0x4b')],{})['then'](respondWithResult(_0x4abea0,0xc9))['catch'](handleError(_0x4abea0,null));};exports['update']=function(_0x564cb0,_0x81bffc){if(_0x564cb0[_0xe239('0x4b')]['id']){delete _0x564cb0[_0xe239('0x4b')]['id'];}return db[_0xe239('0x2c')][_0xe239('0x49')]({'where':{'id':_0x564cb0[_0xe239('0x48')]['id']}})['then'](handleEntityNotFound(_0x81bffc,null))[_0xe239('0x24')](saveUpdates(_0x564cb0[_0xe239('0x4b')],null))['then'](respondWithResult(_0x81bffc,null))[_0xe239('0x46')](handleError(_0x81bffc,null));};exports[_0xe239('0x25')]=function(_0xb72b65,_0x1af0d1){return db[_0xe239('0x2c')][_0xe239('0x49')]({'where':{'id':_0xb72b65['params']['id']}})[_0xe239('0x24')](handleEntityNotFound(_0x1af0d1,null))['then'](removeEntity(_0x1af0d1,null))[_0xe239('0x46')](handleError(_0x1af0d1,null));}; \ No newline at end of file +var _0x0185=['limit','count','json','reject','then','destroy','stack','name','send','map','ZohoField','fieldName','type','key','model','query','keys','filters','intersection','attributes','fields','length','hasOwnProperty','sort','where','pick','merge','VIRTUAL','filter','options','include','findAll','rows','catch','params','includeAll','find','create','body','eml-format','zip-dir','request-promise','moment','bluebird','mustache','util','sox','to-csv','ejs','fs-extra','lodash','squel','crypto','jsforce','querystring','papaparse','ioredis','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','sendStatus','status','end','offset','undefined'];(function(_0x46117a,_0x19d46b){var _0xbac905=function(_0x3c1e58){while(--_0x3c1e58){_0x46117a['push'](_0x46117a['shift']());}};_0xbac905(++_0x19d46b);}(_0x0185,0xb3));var _0x5018=function(_0x710815,_0x520da8){_0x710815=_0x710815-0x0;var _0x5b3b89=_0x0185[_0x710815];return _0x5b3b89;};'use strict';var emlformat=require(_0x5018('0x0'));var rimraf=require('rimraf');var zipdir=require(_0x5018('0x1'));var jsonpatch=require('fast-json-patch');var rp=require(_0x5018('0x2'));var moment=require(_0x5018('0x3'));var BPromise=require(_0x5018('0x4'));var Mustache=require(_0x5018('0x5'));var util=require(_0x5018('0x6'));var path=require('path');var sox=require(_0x5018('0x7'));var csv=require(_0x5018('0x8'));var ejs=require(_0x5018('0x9'));var fs=require('fs');var fs_extra=require(_0x5018('0xa'));var _=require(_0x5018('0xb'));var squel=require(_0x5018('0xc'));var crypto=require(_0x5018('0xd'));var jsforce=require(_0x5018('0xe'));var deskjs=require('desk.js');var toCsv=require('to-csv');var querystring=require(_0x5018('0xf'));var Papa=require(_0x5018('0x10'));var Redis=require(_0x5018('0x11'));var authService=require('../../components/auth/service');var qs=require(_0x5018('0x12'));var as=require(_0x5018('0x13'));var hardwareService=require(_0x5018('0x14'));var logger=require(_0x5018('0x15'))('api');var utils=require(_0x5018('0x16'));var config=require(_0x5018('0x17'));var licenseUtil=require(_0x5018('0x18'));var db=require(_0x5018('0x19'))['db'];function respondWithStatusCode(_0x57df45,_0x4c0358){_0x4c0358=_0x4c0358||0xcc;return function(_0x7db5be){if(_0x7db5be){return _0x57df45[_0x5018('0x1a')](_0x4c0358);}return _0x57df45[_0x5018('0x1b')](_0x4c0358)[_0x5018('0x1c')]();};}function respondWithResult(_0x278149,_0x4660b4){_0x4660b4=_0x4660b4||0xc8;return function(_0xc3100c){if(_0xc3100c){return _0x278149[_0x5018('0x1b')](_0x4660b4)['json'](_0xc3100c);}};}function respondWithFilteredResult(_0x43844f,_0x553eaa){return function(_0x3324e9){if(_0x3324e9){var _0xffd182=typeof _0x553eaa[_0x5018('0x1d')]===_0x5018('0x1e')&&typeof _0x553eaa[_0x5018('0x1f')]===_0x5018('0x1e');var _0x47544f=_0x3324e9['count'];var _0x2159d8=_0xffd182?0x0:_0x553eaa[_0x5018('0x1d')];var _0x167611=_0xffd182?_0x3324e9[_0x5018('0x20')]:_0x553eaa[_0x5018('0x1d')]+_0x553eaa[_0x5018('0x1f')];var _0xf05cb5;if(_0x167611>=_0x47544f){_0x167611=_0x47544f;_0xf05cb5=0xc8;}else{_0xf05cb5=0xce;}_0x43844f[_0x5018('0x1b')](_0xf05cb5);return _0x43844f['set']('Content-Range',_0x2159d8+'-'+_0x167611+'/'+_0x47544f)[_0x5018('0x21')](_0x3324e9);}return null;};}function patchUpdates(_0x5411c5){return function(_0x4ed192){try{jsonpatch['apply'](_0x4ed192,_0x5411c5,!![]);}catch(_0x12e804){return BPromise[_0x5018('0x22')](_0x12e804);}return _0x4ed192['save']();};}function saveUpdates(_0x337aed,_0x2d39fe){return function(_0x155b9b){if(_0x155b9b){return _0x155b9b['update'](_0x337aed)[_0x5018('0x23')](function(_0x54f5cb){return _0x54f5cb;});}return null;};}function removeEntity(_0x30793e,_0x323b19){return function(_0x3d19fd){if(_0x3d19fd){return _0x3d19fd[_0x5018('0x24')]()[_0x5018('0x23')](function(){_0x30793e[_0x5018('0x1b')](0xcc)['end']();});}};}function handleEntityNotFound(_0x2260e6,_0x56932f){return function(_0x1982d8){if(!_0x1982d8){_0x2260e6[_0x5018('0x1a')](0x194);}return _0x1982d8;};}function handleError(_0x107b78,_0x54913e){_0x54913e=_0x54913e||0x1f4;return function(_0x5d9133){logger['error'](_0x5d9133[_0x5018('0x25')]);if(_0x5d9133[_0x5018('0x26')]){delete _0x5d9133['name'];}_0x107b78['status'](_0x54913e)[_0x5018('0x27')](_0x5d9133);};}exports['index']=function(_0x89d812,_0x47b1f3){var _0x1efe03={},_0x56a3ed={},_0x54a836={'count':0x0,'rows':[]};var _0x468cb6=_[_0x5018('0x28')](db[_0x5018('0x29')]['rawAttributes'],function(_0x299497){return{'name':_0x299497[_0x5018('0x2a')],'type':_0x299497[_0x5018('0x2b')][_0x5018('0x2c')]};});_0x56a3ed[_0x5018('0x2d')]=_['map'](_0x468cb6,'name');_0x56a3ed[_0x5018('0x2e')]=_[_0x5018('0x2f')](_0x89d812[_0x5018('0x2e')]);_0x56a3ed[_0x5018('0x30')]=_[_0x5018('0x31')](_0x56a3ed['model'],_0x56a3ed[_0x5018('0x2e')]);_0x1efe03[_0x5018('0x32')]=_[_0x5018('0x31')](_0x56a3ed[_0x5018('0x2d')],qs[_0x5018('0x33')](_0x89d812[_0x5018('0x2e')]['fields']));_0x1efe03[_0x5018('0x32')]=_0x1efe03[_0x5018('0x32')][_0x5018('0x34')]?_0x1efe03[_0x5018('0x32')]:_0x56a3ed[_0x5018('0x2d')];if(!_0x89d812[_0x5018('0x2e')][_0x5018('0x35')]('nolimit')){_0x1efe03[_0x5018('0x1f')]=qs['limit'](_0x89d812[_0x5018('0x2e')][_0x5018('0x1f')]);_0x1efe03[_0x5018('0x1d')]=qs['offset'](_0x89d812[_0x5018('0x2e')][_0x5018('0x1d')]);}_0x1efe03['order']=qs[_0x5018('0x36')](_0x89d812['query'][_0x5018('0x36')]);_0x1efe03[_0x5018('0x37')]=qs[_0x5018('0x30')](_[_0x5018('0x38')](_0x89d812[_0x5018('0x2e')],_0x56a3ed[_0x5018('0x30')]),_0x468cb6);if(_0x89d812[_0x5018('0x2e')]['filter']){_0x1efe03['where']=_[_0x5018('0x39')](_0x1efe03[_0x5018('0x37')],{'$or':_[_0x5018('0x28')](_0x468cb6,function(_0x5be355){if(_0x5be355[_0x5018('0x2b')]!==_0x5018('0x3a')){var _0x1a5cc3={};_0x1a5cc3[_0x5be355[_0x5018('0x26')]]={'$like':'%'+_0x89d812[_0x5018('0x2e')][_0x5018('0x3b')]+'%'};return _0x1a5cc3;}})});}_0x1efe03=_[_0x5018('0x39')]({},_0x1efe03,_0x89d812[_0x5018('0x3c')]);var _0x130b48={'where':_0x1efe03[_0x5018('0x37')]};return db[_0x5018('0x29')][_0x5018('0x20')](_0x130b48)[_0x5018('0x23')](function(_0x4bb43f){_0x54a836[_0x5018('0x20')]=_0x4bb43f;if(_0x89d812['query']['includeAll']){_0x1efe03[_0x5018('0x3d')]=[{'all':!![]}];}return db['ZohoField'][_0x5018('0x3e')](_0x1efe03);})['then'](function(_0xdb3a7f){_0x54a836[_0x5018('0x3f')]=_0xdb3a7f;return _0x54a836;})[_0x5018('0x23')](respondWithFilteredResult(_0x47b1f3,_0x1efe03))[_0x5018('0x40')](handleError(_0x47b1f3,null));};exports['show']=function(_0x50734f,_0x4dfdb2){var _0x551654={'raw':!![],'where':{'id':_0x50734f[_0x5018('0x41')]['id']}},_0x25d386={};_0x25d386[_0x5018('0x2d')]=_[_0x5018('0x2f')](db[_0x5018('0x29')]['rawAttributes']);_0x25d386['query']=_['keys'](_0x50734f['query']);_0x25d386[_0x5018('0x30')]=_[_0x5018('0x31')](_0x25d386[_0x5018('0x2d')],_0x25d386[_0x5018('0x2e')]);_0x551654[_0x5018('0x32')]=_[_0x5018('0x31')](_0x25d386['model'],qs[_0x5018('0x33')](_0x50734f[_0x5018('0x2e')][_0x5018('0x33')]));_0x551654[_0x5018('0x32')]=_0x551654[_0x5018('0x32')][_0x5018('0x34')]?_0x551654[_0x5018('0x32')]:_0x25d386[_0x5018('0x2d')];if(_0x50734f[_0x5018('0x2e')][_0x5018('0x42')]){_0x551654['include']=[{'all':!![]}];}_0x551654=_[_0x5018('0x39')]({},_0x551654,_0x50734f[_0x5018('0x3c')]);return db['ZohoField'][_0x5018('0x43')](_0x551654)[_0x5018('0x23')](handleEntityNotFound(_0x4dfdb2,null))[_0x5018('0x23')](respondWithResult(_0x4dfdb2,null))['catch'](handleError(_0x4dfdb2,null));};exports['create']=function(_0x373dc1,_0x3261b7){return db['ZohoField'][_0x5018('0x44')](_0x373dc1[_0x5018('0x45')],{})[_0x5018('0x23')](respondWithResult(_0x3261b7,0xc9))[_0x5018('0x40')](handleError(_0x3261b7,null));};exports['update']=function(_0x59d89a,_0x546e82){if(_0x59d89a[_0x5018('0x45')]['id']){delete _0x59d89a[_0x5018('0x45')]['id'];}return db[_0x5018('0x29')][_0x5018('0x43')]({'where':{'id':_0x59d89a['params']['id']}})[_0x5018('0x23')](handleEntityNotFound(_0x546e82,null))[_0x5018('0x23')](saveUpdates(_0x59d89a[_0x5018('0x45')],null))[_0x5018('0x23')](respondWithResult(_0x546e82,null))[_0x5018('0x40')](handleError(_0x546e82,null));};exports['destroy']=function(_0xa7c69b,_0x5ec4fa){return db[_0x5018('0x29')][_0x5018('0x43')]({'where':{'id':_0xa7c69b['params']['id']}})['then'](handleEntityNotFound(_0x5ec4fa,null))[_0x5018('0x23')](removeEntity(_0x5ec4fa,null))[_0x5018('0x40')](handleError(_0x5ec4fa,null));}; \ No newline at end of file diff --git a/server/api/intZohoField/intZohoField.model.js b/server/api/intZohoField/intZohoField.model.js index 7d914ac..a02270d 100644 --- a/server/api/intZohoField/intZohoField.model.js +++ b/server/api/intZohoField/intZohoField.model.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xed1c=['lodash','util','request-promise','path','rimraf','./intZohoField.attributes','exports','ZohoField','int_zoho_fields','zoho_unique_index','idField','FieldId'];(function(_0x30bd4d,_0x50eb60){var _0x306915=function(_0x5ae782){while(--_0x5ae782){_0x30bd4d['push'](_0x30bd4d['shift']());}};_0x306915(++_0x50eb60);}(_0xed1c,0xe4));var _0xced1=function(_0x48fc8e,_0xb41bdd){_0x48fc8e=_0x48fc8e-0x0;var _0x5c1035=_0xed1c[_0x48fc8e];return _0x5c1035;};'use strict';var _=require(_0xced1('0x0'));var util=require(_0xced1('0x1'));var logger=require('../../config/logger')('api');var moment=require('moment');var BPromise=require('bluebird');var rp=require(_0xced1('0x2'));var fs=require('fs');var path=require(_0xced1('0x3'));var rimraf=require(_0xced1('0x4'));var config=require('../../config/environment');var attributes=require(_0xced1('0x5'));module[_0xced1('0x6')]=function(_0x466657,_0x37b22b){return _0x466657['define'](_0xced1('0x7'),attributes,{'tableName':_0xced1('0x8'),'paranoid':![],'indexes':[{'name':_0xced1('0x9'),'fields':[_0xced1('0xa'),_0xced1('0xb')],'unique':!![]}],'timestamps':!![]});}; \ No newline at end of file +var _0xafc4=['bluebird','request-promise','path','exports','define','ZohoField','int_zoho_fields','idField','FieldId','lodash','../../config/logger','moment'];(function(_0x21f970,_0x1e8bbb){var _0x23df47=function(_0x340493){while(--_0x340493){_0x21f970['push'](_0x21f970['shift']());}};_0x23df47(++_0x1e8bbb);}(_0xafc4,0x69));var _0x4afc=function(_0x6873c5,_0x5cb1fc){_0x6873c5=_0x6873c5-0x0;var _0x4bb50e=_0xafc4[_0x6873c5];return _0x4bb50e;};'use strict';var _=require(_0x4afc('0x0'));var util=require('util');var logger=require(_0x4afc('0x1'))('api');var moment=require(_0x4afc('0x2'));var BPromise=require(_0x4afc('0x3'));var rp=require(_0x4afc('0x4'));var fs=require('fs');var path=require(_0x4afc('0x5'));var rimraf=require('rimraf');var config=require('../../config/environment');var attributes=require('./intZohoField.attributes');module[_0x4afc('0x6')]=function(_0x471d45,_0x16953b){return _0x471d45[_0x4afc('0x7')](_0x4afc('0x8'),attributes,{'tableName':_0x4afc('0x9'),'paranoid':![],'indexes':[{'name':'zoho_unique_index','fields':[_0x4afc('0xa'),_0x4afc('0xb')],'unique':!![]}],'timestamps':!![]});}; \ No newline at end of file diff --git a/server/api/intZohoField/intZohoField.rpc.js b/server/api/intZohoField/intZohoField.rpc.js index ecc108a..11154a2 100644 --- a/server/api/intZohoField/intZohoField.rpc.js +++ b/server/api/intZohoField/intZohoField.rpc.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x8780=['message','catch','lodash','util','moment','bluebird','../../config/utils','rpc','../../config/environment','jayson/promise','http','request','then','info','ZohoField,\x20%s,\x20%s','request\x20sent','debug','stringify','error','code'];(function(_0x410d05,_0x1dfafd){var _0x5b89ab=function(_0xc015dc){while(--_0xc015dc){_0x410d05['push'](_0x410d05['shift']());}};_0x5b89ab(++_0x1dfafd);}(_0x8780,0x142));var _0x0878=function(_0x507ad5,_0x5b06a9){_0x507ad5=_0x507ad5-0x0;var _0x3611bc=_0x8780[_0x507ad5];return _0x3611bc;};'use strict';var _=require(_0x0878('0x0'));var util=require(_0x0878('0x1'));var moment=require(_0x0878('0x2'));var BPromise=require(_0x0878('0x3'));var rs=require('randomstring');var fs=require('fs');var Redis=require('ioredis');var db=require('../../mysqldb')['db'];var utils=require(_0x0878('0x4'));var logger=require('../../config/logger')(_0x0878('0x5'));var config=require(_0x0878('0x6'));var jayson=require(_0x0878('0x7'));var client=jayson['client'][_0x0878('0x8')]({'port':0x232a});function respondWithRpcPromise(_0x499038,_0x59915b,_0x16035a){return new BPromise(function(_0x45bb97,_0x4396d9){return client[_0x0878('0x9')](_0x499038,_0x16035a)[_0x0878('0xa')](function(_0xb99829){logger[_0x0878('0xb')](_0x0878('0xc'),_0x59915b,_0x0878('0xd'));logger[_0x0878('0xe')]('ZohoField,\x20%s,\x20%s,\x20%s',_0x59915b,'request\x20sent',JSON[_0x0878('0xf')](_0xb99829));if(_0xb99829[_0x0878('0x10')]){if(_0xb99829[_0x0878('0x10')][_0x0878('0x11')]===0x1f4){logger['error'](_0x0878('0xc'),_0x59915b,_0xb99829[_0x0878('0x10')][_0x0878('0x12')]);return _0x4396d9(_0xb99829['error']['message']);}logger[_0x0878('0x10')](_0x0878('0xc'),_0x59915b,_0xb99829['error'][_0x0878('0x12')]);return _0x45bb97(_0xb99829[_0x0878('0x10')][_0x0878('0x12')]);}else{logger[_0x0878('0xb')](_0x0878('0xc'),_0x59915b,_0x0878('0xd'));_0x45bb97(_0xb99829['result'][_0x0878('0x12')]);}})[_0x0878('0x13')](function(_0x433be5){logger[_0x0878('0x10')](_0x0878('0xc'),_0x59915b,_0x433be5);_0x4396d9(_0x433be5);});});} \ No newline at end of file +var _0x881a=['error','code','message','result','catch','lodash','util','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','rpc','http','request','then','info','ZohoField,\x20%s,\x20%s','debug','ZohoField,\x20%s,\x20%s,\x20%s','request\x20sent','stringify'];(function(_0xd1c39b,_0x16f0c6){var _0x58f5bc=function(_0x412cf3){while(--_0x412cf3){_0xd1c39b['push'](_0xd1c39b['shift']());}};_0x58f5bc(++_0x16f0c6);}(_0x881a,0x1e9));var _0xa881=function(_0x336d19,_0x3767d0){_0x336d19=_0x336d19-0x0;var _0x419656=_0x881a[_0x336d19];return _0x419656;};'use strict';var _=require(_0xa881('0x0'));var util=require(_0xa881('0x1'));var moment=require('moment');var BPromise=require(_0xa881('0x2'));var rs=require(_0xa881('0x3'));var fs=require('fs');var Redis=require(_0xa881('0x4'));var db=require(_0xa881('0x5'))['db'];var utils=require(_0xa881('0x6'));var logger=require('../../config/logger')(_0xa881('0x7'));var config=require('../../config/environment');var jayson=require('jayson/promise');var client=jayson['client'][_0xa881('0x8')]({'port':0x232a});function respondWithRpcPromise(_0x5cef71,_0x2b60bd,_0x4cef02){return new BPromise(function(_0x108a15,_0x1d61dc){return client[_0xa881('0x9')](_0x5cef71,_0x4cef02)[_0xa881('0xa')](function(_0x2dbfe0){logger[_0xa881('0xb')](_0xa881('0xc'),_0x2b60bd,'request\x20sent');logger[_0xa881('0xd')](_0xa881('0xe'),_0x2b60bd,_0xa881('0xf'),JSON[_0xa881('0x10')](_0x2dbfe0));if(_0x2dbfe0[_0xa881('0x11')]){if(_0x2dbfe0[_0xa881('0x11')][_0xa881('0x12')]===0x1f4){logger[_0xa881('0x11')]('ZohoField,\x20%s,\x20%s',_0x2b60bd,_0x2dbfe0[_0xa881('0x11')]['message']);return _0x1d61dc(_0x2dbfe0['error'][_0xa881('0x13')]);}logger[_0xa881('0x11')]('ZohoField,\x20%s,\x20%s',_0x2b60bd,_0x2dbfe0[_0xa881('0x11')]['message']);return _0x108a15(_0x2dbfe0[_0xa881('0x11')][_0xa881('0x13')]);}else{logger[_0xa881('0xb')](_0xa881('0xc'),_0x2b60bd,_0xa881('0xf'));_0x108a15(_0x2dbfe0[_0xa881('0x14')][_0xa881('0x13')]);}})[_0xa881('0x15')](function(_0x52cb3b){logger[_0xa881('0x11')](_0xa881('0xc'),_0x2b60bd,_0x52cb3b);_0x1d61dc(_0x52cb3b);});});} \ No newline at end of file diff --git a/server/api/integration/index.js b/server/api/integration/index.js index 222de83..66e57b8 100644 --- a/server/api/integration/index.js +++ b/server/api/integration/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xa9e0=['../../components/interaction/service','../../config/environment','exports','multer','util','path','Router','../../components/auth/service'];(function(_0x58e09b,_0x6ef44c){var _0x243038=function(_0x1564bf){while(--_0x1564bf){_0x58e09b['push'](_0x58e09b['shift']());}};_0x243038(++_0x6ef44c);}(_0xa9e0,0x123));var _0x0a9e=function(_0x24237f,_0x4cf32c){_0x24237f=_0x24237f-0x0;var _0x48298e=_0xa9e0[_0x24237f];return _0x48298e;};'use strict';var multer=require(_0x0a9e('0x0'));var util=require(_0x0a9e('0x1'));var path=require(_0x0a9e('0x2'));var timeout=require('connect-timeout');var express=require('express');var router=express[_0x0a9e('0x3')]();var fs_extra=require('fs-extra');var auth=require(_0x0a9e('0x4'));var interaction=require(_0x0a9e('0x5'));var config=require(_0x0a9e('0x6'));module[_0x0a9e('0x7')]=router; \ No newline at end of file +var _0xcb91=['express','Router','../../components/auth/service','../../components/interaction/service','exports','path','connect-timeout'];(function(_0x342fce,_0x3ea24c){var _0x59b07f=function(_0x13352f){while(--_0x13352f){_0x342fce['push'](_0x342fce['shift']());}};_0x59b07f(++_0x3ea24c);}(_0xcb91,0x1a9));var _0x1cb9=function(_0xa79977,_0x4f7f12){_0xa79977=_0xa79977-0x0;var _0x109f10=_0xcb91[_0xa79977];return _0x109f10;};'use strict';var multer=require('multer');var util=require('util');var path=require(_0x1cb9('0x0'));var timeout=require(_0x1cb9('0x1'));var express=require(_0x1cb9('0x2'));var router=express[_0x1cb9('0x3')]();var fs_extra=require('fs-extra');var auth=require(_0x1cb9('0x4'));var interaction=require(_0x1cb9('0x5'));var config=require('../../config/environment');module[_0x1cb9('0x6')]=router; \ No newline at end of file diff --git a/server/api/integration/integration.attributes.js b/server/api/integration/integration.attributes.js index f72b7e0..6faeaa6 100644 --- a/server/api/integration/integration.attributes.js +++ b/server/api/integration/integration.attributes.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x6c05=['STRING','unique_name_and_version','app.js','state','sequelize','exports'];(function(_0x697b66,_0x2ee2d8){var _0x3a1467=function(_0x10e029){while(--_0x10e029){_0x697b66['push'](_0x697b66['shift']());}};_0x3a1467(++_0x2ee2d8);}(_0x6c05,0x64));var _0x56c0=function(_0x4ab10a,_0x18e4de){_0x4ab10a=_0x4ab10a-0x0;var _0x305166=_0x6c05[_0x4ab10a];return _0x305166;};'use strict';var Sequelize=require(_0x56c0('0x0'));module[_0x56c0('0x1')]={'name':{'type':Sequelize[_0x56c0('0x2')],'allowNull':![],'unique':'unique_name_and_version'},'version':{'type':Sequelize['STRING'],'allowNull':![],'unique':_0x56c0('0x3')},'main':{'type':Sequelize[_0x56c0('0x2')],'defaultValue':_0x56c0('0x4')},'filename':{'type':Sequelize[_0x56c0('0x2')]},'path':{'type':Sequelize[_0x56c0('0x2')]},'type':{'type':Sequelize[_0x56c0('0x2')]},'size':{'type':Sequelize['INTEGER']},'active':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'author':{'type':Sequelize[_0x56c0('0x2')]},'logo':{'type':Sequelize[_0x56c0('0x2')]},'state':{'type':Sequelize[_0x56c0('0x2')],'unique':_0x56c0('0x5')},'description':{'type':Sequelize[_0x56c0('0x2')]},'title':{'type':Sequelize[_0x56c0('0x2')]},'remoteUri':{'type':Sequelize[_0x56c0('0x2')]},'link':{'type':Sequelize[_0x56c0('0x2')],'defaultValue':'#'}}; \ No newline at end of file +var _0xa85c=['exports','STRING','unique_name_and_version','INTEGER','sequelize'];(function(_0x498dea,_0x5cb3b2){var _0x58c484=function(_0x22492b){while(--_0x22492b){_0x498dea['push'](_0x498dea['shift']());}};_0x58c484(++_0x5cb3b2);}(_0xa85c,0x158));var _0xca85=function(_0x38a6c6,_0x4062ca){_0x38a6c6=_0x38a6c6-0x0;var _0x142f0a=_0xa85c[_0x38a6c6];return _0x142f0a;};'use strict';var Sequelize=require(_0xca85('0x0'));module[_0xca85('0x1')]={'name':{'type':Sequelize[_0xca85('0x2')],'allowNull':![],'unique':'unique_name_and_version'},'version':{'type':Sequelize[_0xca85('0x2')],'allowNull':![],'unique':_0xca85('0x3')},'main':{'type':Sequelize[_0xca85('0x2')],'defaultValue':'app.js'},'filename':{'type':Sequelize[_0xca85('0x2')]},'path':{'type':Sequelize['STRING']},'type':{'type':Sequelize[_0xca85('0x2')]},'size':{'type':Sequelize[_0xca85('0x4')]},'active':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'author':{'type':Sequelize[_0xca85('0x2')]},'logo':{'type':Sequelize['STRING']},'state':{'type':Sequelize['STRING'],'unique':'state'},'description':{'type':Sequelize[_0xca85('0x2')]},'title':{'type':Sequelize['STRING']},'remoteUri':{'type':Sequelize[_0xca85('0x2')]},'link':{'type':Sequelize[_0xca85('0x2')],'defaultValue':'#'}}; \ No newline at end of file diff --git a/server/api/integration/integration.controller.js b/server/api/integration/integration.controller.js index 46b75fb..7464f00 100644 --- a/server/api/integration/integration.controller.js +++ b/server/api/integration/integration.controller.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x687b=['order','sort','where','filter','VIRTUAL','options','include','findAll','rows','show','length','includeAll','merge','find','catch','create','body','params','eml-format','rimraf','zip-dir','fast-json-patch','bluebird','mustache','util','path','sox','to-csv','ejs','fs-extra','lodash','squel','jsforce','desk.js','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/environment','../../config/license/util','../../mysqldb','sendStatus','status','json','offset','undefined','limit','count','Content-Range','save','update','then','destroy','end','error','stack','name','send','index','map','Integration','rawAttributes','fieldName','type','model','query','keys','filters','intersection','attributes','fields','hasOwnProperty','nolimit'];(function(_0x46891a,_0x3e3051){var _0x4c578d=function(_0x3cf400){while(--_0x3cf400){_0x46891a['push'](_0x46891a['shift']());}};_0x4c578d(++_0x3e3051);}(_0x687b,0x14a));var _0xb687=function(_0x30e980,_0x56ed61){_0x30e980=_0x30e980-0x0;var _0x27f955=_0x687b[_0x30e980];return _0x27f955;};'use strict';var emlformat=require(_0xb687('0x0'));var rimraf=require(_0xb687('0x1'));var zipdir=require(_0xb687('0x2'));var jsonpatch=require(_0xb687('0x3'));var rp=require('request-promise');var moment=require('moment');var BPromise=require(_0xb687('0x4'));var Mustache=require(_0xb687('0x5'));var util=require(_0xb687('0x6'));var path=require(_0xb687('0x7'));var sox=require(_0xb687('0x8'));var csv=require(_0xb687('0x9'));var ejs=require(_0xb687('0xa'));var fs=require('fs');var fs_extra=require(_0xb687('0xb'));var _=require(_0xb687('0xc'));var squel=require(_0xb687('0xd'));var crypto=require('crypto');var jsforce=require(_0xb687('0xe'));var deskjs=require(_0xb687('0xf'));var toCsv=require('to-csv');var querystring=require(_0xb687('0x10'));var Papa=require(_0xb687('0x11'));var Redis=require(_0xb687('0x12'));var authService=require(_0xb687('0x13'));var qs=require(_0xb687('0x14'));var as=require(_0xb687('0x15'));var hardwareService=require(_0xb687('0x16'));var logger=require(_0xb687('0x17'))(_0xb687('0x18'));var utils=require('../../config/utils');var config=require(_0xb687('0x19'));var licenseUtil=require(_0xb687('0x1a'));var db=require(_0xb687('0x1b'))['db'];function respondWithStatusCode(_0x12a0be,_0x4f9c19){_0x4f9c19=_0x4f9c19||0xcc;return function(_0x4c97ed){if(_0x4c97ed){return _0x12a0be[_0xb687('0x1c')](_0x4f9c19);}return _0x12a0be[_0xb687('0x1d')](_0x4f9c19)['end']();};}function respondWithResult(_0x108fd0,_0x2f1ac0){_0x2f1ac0=_0x2f1ac0||0xc8;return function(_0x1f1f35){if(_0x1f1f35){return _0x108fd0[_0xb687('0x1d')](_0x2f1ac0)[_0xb687('0x1e')](_0x1f1f35);}};}function respondWithFilteredResult(_0x3ab914,_0x30622f){return function(_0x141375){if(_0x141375){var _0x263085=typeof _0x30622f[_0xb687('0x1f')]===_0xb687('0x20')&&typeof _0x30622f[_0xb687('0x21')]==='undefined';var _0x214b06=_0x141375[_0xb687('0x22')];var _0x30d370=_0x263085?0x0:_0x30622f['offset'];var _0x48958d=_0x263085?_0x141375[_0xb687('0x22')]:_0x30622f[_0xb687('0x1f')]+_0x30622f[_0xb687('0x21')];var _0x4b593b;if(_0x48958d>=_0x214b06){_0x48958d=_0x214b06;_0x4b593b=0xc8;}else{_0x4b593b=0xce;}_0x3ab914[_0xb687('0x1d')](_0x4b593b);return _0x3ab914['set'](_0xb687('0x23'),_0x30d370+'-'+_0x48958d+'/'+_0x214b06)[_0xb687('0x1e')](_0x141375);}return null;};}function patchUpdates(_0x170dc0){return function(_0x44bd0b){try{jsonpatch['apply'](_0x44bd0b,_0x170dc0,!![]);}catch(_0x3a73d5){return BPromise['reject'](_0x3a73d5);}return _0x44bd0b[_0xb687('0x24')]();};}function saveUpdates(_0x90e892,_0x274241){return function(_0x546fde){if(_0x546fde){return _0x546fde[_0xb687('0x25')](_0x90e892)[_0xb687('0x26')](function(_0xa95e91){return _0xa95e91;});}return null;};}function removeEntity(_0x16cdcb,_0xbf6c58){return function(_0x38866c){if(_0x38866c){return _0x38866c[_0xb687('0x27')]()[_0xb687('0x26')](function(){_0x16cdcb['status'](0xcc)[_0xb687('0x28')]();});}};}function handleEntityNotFound(_0x129347,_0x1c1585){return function(_0x1a0261){if(!_0x1a0261){_0x129347[_0xb687('0x1c')](0x194);}return _0x1a0261;};}function handleError(_0x4136c9,_0x17ff2b){_0x17ff2b=_0x17ff2b||0x1f4;return function(_0x3cb2f2){logger[_0xb687('0x29')](_0x3cb2f2[_0xb687('0x2a')]);if(_0x3cb2f2['name']){delete _0x3cb2f2[_0xb687('0x2b')];}_0x4136c9[_0xb687('0x1d')](_0x17ff2b)[_0xb687('0x2c')](_0x3cb2f2);};}exports[_0xb687('0x2d')]=function(_0x2e5c8d,_0x173c58){var _0x4e9a06={},_0x28b69a={},_0x5143af={'count':0x0,'rows':[]};var _0x360429=_[_0xb687('0x2e')](db[_0xb687('0x2f')][_0xb687('0x30')],function(_0x1ad3ef){return{'name':_0x1ad3ef[_0xb687('0x31')],'type':_0x1ad3ef[_0xb687('0x32')]['key']};});_0x28b69a[_0xb687('0x33')]=_[_0xb687('0x2e')](_0x360429,_0xb687('0x2b'));_0x28b69a[_0xb687('0x34')]=_[_0xb687('0x35')](_0x2e5c8d[_0xb687('0x34')]);_0x28b69a[_0xb687('0x36')]=_[_0xb687('0x37')](_0x28b69a[_0xb687('0x33')],_0x28b69a[_0xb687('0x34')]);_0x4e9a06[_0xb687('0x38')]=_['intersection'](_0x28b69a['model'],qs[_0xb687('0x39')](_0x2e5c8d[_0xb687('0x34')][_0xb687('0x39')]));_0x4e9a06[_0xb687('0x38')]=_0x4e9a06['attributes']['length']?_0x4e9a06[_0xb687('0x38')]:_0x28b69a[_0xb687('0x33')];if(!_0x2e5c8d['query'][_0xb687('0x3a')](_0xb687('0x3b'))){_0x4e9a06['limit']=qs[_0xb687('0x21')](_0x2e5c8d['query'][_0xb687('0x21')]);_0x4e9a06[_0xb687('0x1f')]=qs[_0xb687('0x1f')](_0x2e5c8d[_0xb687('0x34')][_0xb687('0x1f')]);}_0x4e9a06[_0xb687('0x3c')]=qs['sort'](_0x2e5c8d[_0xb687('0x34')][_0xb687('0x3d')]);_0x4e9a06[_0xb687('0x3e')]=qs[_0xb687('0x36')](_['pick'](_0x2e5c8d[_0xb687('0x34')],_0x28b69a[_0xb687('0x36')]),_0x360429);if(_0x2e5c8d[_0xb687('0x34')][_0xb687('0x3f')]){_0x4e9a06[_0xb687('0x3e')]=_['merge'](_0x4e9a06[_0xb687('0x3e')],{'$or':_[_0xb687('0x2e')](_0x360429,function(_0x24c013){if(_0x24c013[_0xb687('0x32')]!==_0xb687('0x40')){var _0x29cf09={};_0x29cf09[_0x24c013['name']]={'$like':'%'+_0x2e5c8d['query'][_0xb687('0x3f')]+'%'};return _0x29cf09;}})});}_0x4e9a06=_['merge']({},_0x4e9a06,_0x2e5c8d[_0xb687('0x41')]);var _0x2f4550={'where':_0x4e9a06['where']};return db[_0xb687('0x2f')][_0xb687('0x22')](_0x2f4550)['then'](function(_0x394b56){_0x5143af[_0xb687('0x22')]=_0x394b56;if(_0x2e5c8d[_0xb687('0x34')]['includeAll']){_0x4e9a06[_0xb687('0x42')]=[{'all':!![]}];}return db[_0xb687('0x2f')][_0xb687('0x43')](_0x4e9a06);})[_0xb687('0x26')](function(_0x140388){_0x5143af[_0xb687('0x44')]=_0x140388;return _0x5143af;})[_0xb687('0x26')](respondWithFilteredResult(_0x173c58,_0x4e9a06))['catch'](handleError(_0x173c58,null));};exports[_0xb687('0x45')]=function(_0x4cf6ad,_0x50fdb7){var _0xa3a9e0={'raw':![],'where':{'id':_0x4cf6ad['params']['id']}},_0x430364={};_0x430364[_0xb687('0x33')]=_['keys'](db[_0xb687('0x2f')][_0xb687('0x30')]);_0x430364['query']=_[_0xb687('0x35')](_0x4cf6ad[_0xb687('0x34')]);_0x430364['filters']=_[_0xb687('0x37')](_0x430364[_0xb687('0x33')],_0x430364[_0xb687('0x34')]);_0xa3a9e0[_0xb687('0x38')]=_[_0xb687('0x37')](_0x430364[_0xb687('0x33')],qs[_0xb687('0x39')](_0x4cf6ad[_0xb687('0x34')][_0xb687('0x39')]));_0xa3a9e0[_0xb687('0x38')]=_0xa3a9e0[_0xb687('0x38')][_0xb687('0x46')]?_0xa3a9e0['attributes']:_0x430364[_0xb687('0x33')];if(_0x4cf6ad['query'][_0xb687('0x47')]){_0xa3a9e0[_0xb687('0x42')]=[{'all':!![]}];}_0xa3a9e0=_[_0xb687('0x48')]({},_0xa3a9e0,_0x4cf6ad[_0xb687('0x41')]);return db[_0xb687('0x2f')][_0xb687('0x49')](_0xa3a9e0)['then'](handleEntityNotFound(_0x50fdb7,null))['then'](respondWithResult(_0x50fdb7,null))[_0xb687('0x4a')](handleError(_0x50fdb7,null));};exports[_0xb687('0x4b')]=function(_0x40558a,_0x4f3069){return db['Integration'][_0xb687('0x4b')](_0x40558a[_0xb687('0x4c')],{})[_0xb687('0x26')](respondWithResult(_0x4f3069,0xc9))[_0xb687('0x4a')](handleError(_0x4f3069,null));};exports['update']=function(_0x33a0b0,_0xfc4c5f){if(_0x33a0b0[_0xb687('0x4c')]['id']){delete _0x33a0b0[_0xb687('0x4c')]['id'];}return db['Integration']['find']({'where':{'id':_0x33a0b0[_0xb687('0x4d')]['id']}})[_0xb687('0x26')](handleEntityNotFound(_0xfc4c5f,null))[_0xb687('0x26')](saveUpdates(_0x33a0b0['body'],null))['then'](respondWithResult(_0xfc4c5f,null))[_0xb687('0x4a')](handleError(_0xfc4c5f,null));};exports[_0xb687('0x27')]=function(_0xd5bdb7,_0x22e618){return db[_0xb687('0x2f')][_0xb687('0x49')]({'where':{'id':_0xd5bdb7[_0xb687('0x4d')]['id']}})[_0xb687('0x26')](handleEntityNotFound(_0x22e618,null))['then'](removeEntity(_0x22e618,null))[_0xb687('0x4a')](handleError(_0x22e618,null));}; \ No newline at end of file +var _0x53ec=['count','set','Content-Range','apply','reject','save','then','sendStatus','name','send','map','Integration','rawAttributes','fieldName','key','model','query','filters','attributes','intersection','fields','length','hasOwnProperty','nolimit','sort','pick','filter','where','VIRTUAL','merge','options','includeAll','rows','show','params','include','find','catch','create','update','body','destroy','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','mustache','path','sox','ejs','lodash','squel','jsforce','desk.js','to-csv','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','api','../../config/license/util','../../mysqldb','status','end','json','offset','undefined','limit'];(function(_0x334841,_0x2bbc4c){var _0x5beb4b=function(_0x4bea72){while(--_0x4bea72){_0x334841['push'](_0x334841['shift']());}};_0x5beb4b(++_0x2bbc4c);}(_0x53ec,0x192));var _0xc53e=function(_0x5e6f73,_0x3f27d8){_0x5e6f73=_0x5e6f73-0x0;var _0x432614=_0x53ec[_0x5e6f73];return _0x432614;};'use strict';var emlformat=require(_0xc53e('0x0'));var rimraf=require(_0xc53e('0x1'));var zipdir=require(_0xc53e('0x2'));var jsonpatch=require(_0xc53e('0x3'));var rp=require(_0xc53e('0x4'));var moment=require(_0xc53e('0x5'));var BPromise=require('bluebird');var Mustache=require(_0xc53e('0x6'));var util=require('util');var path=require(_0xc53e('0x7'));var sox=require(_0xc53e('0x8'));var csv=require('to-csv');var ejs=require(_0xc53e('0x9'));var fs=require('fs');var fs_extra=require('fs-extra');var _=require(_0xc53e('0xa'));var squel=require(_0xc53e('0xb'));var crypto=require('crypto');var jsforce=require(_0xc53e('0xc'));var deskjs=require(_0xc53e('0xd'));var toCsv=require(_0xc53e('0xe'));var querystring=require(_0xc53e('0xf'));var Papa=require(_0xc53e('0x10'));var Redis=require(_0xc53e('0x11'));var authService=require(_0xc53e('0x12'));var qs=require(_0xc53e('0x13'));var as=require(_0xc53e('0x14'));var hardwareService=require('../../config/license/hardware');var logger=require('../../config/logger')(_0xc53e('0x15'));var utils=require('../../config/utils');var config=require('../../config/environment');var licenseUtil=require(_0xc53e('0x16'));var db=require(_0xc53e('0x17'))['db'];function respondWithStatusCode(_0x863fa,_0x4203aa){_0x4203aa=_0x4203aa||0xcc;return function(_0x56f0e5){if(_0x56f0e5){return _0x863fa['sendStatus'](_0x4203aa);}return _0x863fa[_0xc53e('0x18')](_0x4203aa)[_0xc53e('0x19')]();};}function respondWithResult(_0x7cd798,_0x3d2e17){_0x3d2e17=_0x3d2e17||0xc8;return function(_0x358ef3){if(_0x358ef3){return _0x7cd798[_0xc53e('0x18')](_0x3d2e17)[_0xc53e('0x1a')](_0x358ef3);}};}function respondWithFilteredResult(_0x19c0d1,_0x455e4d){return function(_0x2ad6eb){if(_0x2ad6eb){var _0x5b0a88=typeof _0x455e4d[_0xc53e('0x1b')]===_0xc53e('0x1c')&&typeof _0x455e4d[_0xc53e('0x1d')]===_0xc53e('0x1c');var _0x15333b=_0x2ad6eb[_0xc53e('0x1e')];var _0x164016=_0x5b0a88?0x0:_0x455e4d[_0xc53e('0x1b')];var _0x3b550e=_0x5b0a88?_0x2ad6eb['count']:_0x455e4d['offset']+_0x455e4d[_0xc53e('0x1d')];var _0x2a5bac;if(_0x3b550e>=_0x15333b){_0x3b550e=_0x15333b;_0x2a5bac=0xc8;}else{_0x2a5bac=0xce;}_0x19c0d1[_0xc53e('0x18')](_0x2a5bac);return _0x19c0d1[_0xc53e('0x1f')](_0xc53e('0x20'),_0x164016+'-'+_0x3b550e+'/'+_0x15333b)[_0xc53e('0x1a')](_0x2ad6eb);}return null;};}function patchUpdates(_0x15a015){return function(_0x25702b){try{jsonpatch[_0xc53e('0x21')](_0x25702b,_0x15a015,!![]);}catch(_0x401af6){return BPromise[_0xc53e('0x22')](_0x401af6);}return _0x25702b[_0xc53e('0x23')]();};}function saveUpdates(_0x426467,_0x4fb695){return function(_0x47cfdd){if(_0x47cfdd){return _0x47cfdd['update'](_0x426467)[_0xc53e('0x24')](function(_0x384218){return _0x384218;});}return null;};}function removeEntity(_0x7591c1,_0x4015c8){return function(_0x180811){if(_0x180811){return _0x180811['destroy']()['then'](function(){_0x7591c1[_0xc53e('0x18')](0xcc)['end']();});}};}function handleEntityNotFound(_0x1ae55e,_0x3a5ce8){return function(_0x443179){if(!_0x443179){_0x1ae55e[_0xc53e('0x25')](0x194);}return _0x443179;};}function handleError(_0x63c5dc,_0x4df8cf){_0x4df8cf=_0x4df8cf||0x1f4;return function(_0x398e7a){logger['error'](_0x398e7a['stack']);if(_0x398e7a['name']){delete _0x398e7a[_0xc53e('0x26')];}_0x63c5dc['status'](_0x4df8cf)[_0xc53e('0x27')](_0x398e7a);};}exports['index']=function(_0x24a77e,_0x5112d2){var _0x5ce216={},_0x8f0ee6={},_0x6a62b0={'count':0x0,'rows':[]};var _0x42dec1=_[_0xc53e('0x28')](db[_0xc53e('0x29')][_0xc53e('0x2a')],function(_0x3280fe){return{'name':_0x3280fe[_0xc53e('0x2b')],'type':_0x3280fe['type'][_0xc53e('0x2c')]};});_0x8f0ee6[_0xc53e('0x2d')]=_[_0xc53e('0x28')](_0x42dec1,'name');_0x8f0ee6[_0xc53e('0x2e')]=_['keys'](_0x24a77e[_0xc53e('0x2e')]);_0x8f0ee6[_0xc53e('0x2f')]=_['intersection'](_0x8f0ee6['model'],_0x8f0ee6[_0xc53e('0x2e')]);_0x5ce216[_0xc53e('0x30')]=_[_0xc53e('0x31')](_0x8f0ee6[_0xc53e('0x2d')],qs[_0xc53e('0x32')](_0x24a77e[_0xc53e('0x2e')][_0xc53e('0x32')]));_0x5ce216[_0xc53e('0x30')]=_0x5ce216['attributes'][_0xc53e('0x33')]?_0x5ce216[_0xc53e('0x30')]:_0x8f0ee6[_0xc53e('0x2d')];if(!_0x24a77e[_0xc53e('0x2e')][_0xc53e('0x34')](_0xc53e('0x35'))){_0x5ce216[_0xc53e('0x1d')]=qs[_0xc53e('0x1d')](_0x24a77e[_0xc53e('0x2e')]['limit']);_0x5ce216[_0xc53e('0x1b')]=qs['offset'](_0x24a77e[_0xc53e('0x2e')][_0xc53e('0x1b')]);}_0x5ce216['order']=qs[_0xc53e('0x36')](_0x24a77e[_0xc53e('0x2e')][_0xc53e('0x36')]);_0x5ce216['where']=qs[_0xc53e('0x2f')](_[_0xc53e('0x37')](_0x24a77e[_0xc53e('0x2e')],_0x8f0ee6[_0xc53e('0x2f')]),_0x42dec1);if(_0x24a77e[_0xc53e('0x2e')][_0xc53e('0x38')]){_0x5ce216[_0xc53e('0x39')]=_['merge'](_0x5ce216[_0xc53e('0x39')],{'$or':_[_0xc53e('0x28')](_0x42dec1,function(_0x2db711){if(_0x2db711['type']!==_0xc53e('0x3a')){var _0x5e8ab7={};_0x5e8ab7[_0x2db711[_0xc53e('0x26')]]={'$like':'%'+_0x24a77e[_0xc53e('0x2e')][_0xc53e('0x38')]+'%'};return _0x5e8ab7;}})});}_0x5ce216=_[_0xc53e('0x3b')]({},_0x5ce216,_0x24a77e[_0xc53e('0x3c')]);var _0x5507d0={'where':_0x5ce216[_0xc53e('0x39')]};return db[_0xc53e('0x29')]['count'](_0x5507d0)['then'](function(_0x5e9e15){_0x6a62b0['count']=_0x5e9e15;if(_0x24a77e[_0xc53e('0x2e')][_0xc53e('0x3d')]){_0x5ce216['include']=[{'all':!![]}];}return db[_0xc53e('0x29')]['findAll'](_0x5ce216);})['then'](function(_0x53447e){_0x6a62b0[_0xc53e('0x3e')]=_0x53447e;return _0x6a62b0;})['then'](respondWithFilteredResult(_0x5112d2,_0x5ce216))['catch'](handleError(_0x5112d2,null));};exports[_0xc53e('0x3f')]=function(_0x53a82f,_0x422088){var _0x360af9={'raw':![],'where':{'id':_0x53a82f[_0xc53e('0x40')]['id']}},_0x49f204={};_0x49f204[_0xc53e('0x2d')]=_['keys'](db[_0xc53e('0x29')]['rawAttributes']);_0x49f204['query']=_['keys'](_0x53a82f['query']);_0x49f204[_0xc53e('0x2f')]=_[_0xc53e('0x31')](_0x49f204[_0xc53e('0x2d')],_0x49f204['query']);_0x360af9[_0xc53e('0x30')]=_[_0xc53e('0x31')](_0x49f204['model'],qs['fields'](_0x53a82f[_0xc53e('0x2e')][_0xc53e('0x32')]));_0x360af9[_0xc53e('0x30')]=_0x360af9['attributes'][_0xc53e('0x33')]?_0x360af9[_0xc53e('0x30')]:_0x49f204[_0xc53e('0x2d')];if(_0x53a82f[_0xc53e('0x2e')][_0xc53e('0x3d')]){_0x360af9[_0xc53e('0x41')]=[{'all':!![]}];}_0x360af9=_[_0xc53e('0x3b')]({},_0x360af9,_0x53a82f['options']);return db[_0xc53e('0x29')][_0xc53e('0x42')](_0x360af9)[_0xc53e('0x24')](handleEntityNotFound(_0x422088,null))['then'](respondWithResult(_0x422088,null))[_0xc53e('0x43')](handleError(_0x422088,null));};exports[_0xc53e('0x44')]=function(_0x4458c8,_0x15e744){return db[_0xc53e('0x29')][_0xc53e('0x44')](_0x4458c8['body'],{})[_0xc53e('0x24')](respondWithResult(_0x15e744,0xc9))[_0xc53e('0x43')](handleError(_0x15e744,null));};exports[_0xc53e('0x45')]=function(_0x5a6e41,_0x33d45c){if(_0x5a6e41[_0xc53e('0x46')]['id']){delete _0x5a6e41[_0xc53e('0x46')]['id'];}return db[_0xc53e('0x29')][_0xc53e('0x42')]({'where':{'id':_0x5a6e41[_0xc53e('0x40')]['id']}})[_0xc53e('0x24')](handleEntityNotFound(_0x33d45c,null))[_0xc53e('0x24')](saveUpdates(_0x5a6e41[_0xc53e('0x46')],null))[_0xc53e('0x24')](respondWithResult(_0x33d45c,null))['catch'](handleError(_0x33d45c,null));};exports[_0xc53e('0x47')]=function(_0x17cf13,_0x38520c){return db[_0xc53e('0x29')][_0xc53e('0x42')]({'where':{'id':_0x17cf13['params']['id']}})['then'](handleEntityNotFound(_0x38520c,null))[_0xc53e('0x24')](removeEntity(_0x38520c,null))['catch'](handleError(_0x38520c,null));}; \ No newline at end of file diff --git a/server/api/integration/integration.model.js b/server/api/integration/integration.model.js index e0665be..5d86a05 100644 --- a/server/api/integration/integration.model.js +++ b/server/api/integration/integration.model.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x493a=['define','Integration','util','../../config/logger','api','moment','bluebird','request-promise','path','../../config/environment','./integration.attributes','exports'];(function(_0xa64c8f,_0x2144d1){var _0x34112c=function(_0x3167ca){while(--_0x3167ca){_0xa64c8f['push'](_0xa64c8f['shift']());}};_0x34112c(++_0x2144d1);}(_0x493a,0x176));var _0xa493=function(_0x3f3bad,_0x193f06){_0x3f3bad=_0x3f3bad-0x0;var _0x4f0801=_0x493a[_0x3f3bad];return _0x4f0801;};'use strict';var _=require('lodash');var util=require(_0xa493('0x0'));var logger=require(_0xa493('0x1'))(_0xa493('0x2'));var moment=require(_0xa493('0x3'));var BPromise=require(_0xa493('0x4'));var rp=require(_0xa493('0x5'));var fs=require('fs');var path=require(_0xa493('0x6'));var rimraf=require('rimraf');var config=require(_0xa493('0x7'));var attributes=require(_0xa493('0x8'));module[_0xa493('0x9')]=function(_0x141ab9,_0x1e8e8f){return _0x141ab9[_0xa493('0xa')](_0xa493('0xb'),attributes,{'tableName':'integrations','paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file +var _0xfba0=['define','integrations','lodash','../../config/logger','bluebird','request-promise','path','rimraf','./integration.attributes'];(function(_0x2272a5,_0x12cc1d){var _0xcbc51a=function(_0x58f409){while(--_0x58f409){_0x2272a5['push'](_0x2272a5['shift']());}};_0xcbc51a(++_0x12cc1d);}(_0xfba0,0x1c4));var _0x0fba=function(_0x342950,_0x225d79){_0x342950=_0x342950-0x0;var _0x22db1e=_0xfba0[_0x342950];return _0x22db1e;};'use strict';var _=require(_0x0fba('0x0'));var util=require('util');var logger=require(_0x0fba('0x1'))('api');var moment=require('moment');var BPromise=require(_0x0fba('0x2'));var rp=require(_0x0fba('0x3'));var fs=require('fs');var path=require(_0x0fba('0x4'));var rimraf=require(_0x0fba('0x5'));var config=require('../../config/environment');var attributes=require(_0x0fba('0x6'));module['exports']=function(_0x434de4,_0x13c690){return _0x434de4[_0x0fba('0x7')]('Integration',attributes,{'tableName':_0x0fba('0x8'),'paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file diff --git a/server/api/integration/integration.rpc.js b/server/api/integration/integration.rpc.js index 272708b..cd14cc4 100644 --- a/server/api/integration/integration.rpc.js +++ b/server/api/integration/integration.rpc.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x0295=['client','http','then','info','request\x20sent','debug','Integration,\x20%s,\x20%s,\x20%s','stringify','error','Integration,\x20%s,\x20%s','message','result','catch','lodash','bluebird','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise'];(function(_0x4360d0,_0x53b62e){var _0x581b9b=function(_0x17e526){while(--_0x17e526){_0x4360d0['push'](_0x4360d0['shift']());}};_0x581b9b(++_0x53b62e);}(_0x0295,0x1f0));var _0x5029=function(_0x404174,_0x5624ea){_0x404174=_0x404174-0x0;var _0x1783ce=_0x0295[_0x404174];return _0x1783ce;};'use strict';var _=require(_0x5029('0x0'));var util=require('util');var moment=require('moment');var BPromise=require(_0x5029('0x1'));var rs=require('randomstring');var fs=require('fs');var Redis=require('ioredis');var db=require(_0x5029('0x2'))['db'];var utils=require(_0x5029('0x3'));var logger=require(_0x5029('0x4'))(_0x5029('0x5'));var config=require(_0x5029('0x6'));var jayson=require(_0x5029('0x7'));var client=jayson[_0x5029('0x8')][_0x5029('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x5b3cd,_0x502a62,_0x54978f){return new BPromise(function(_0x4ee867,_0xf4459b){return client['request'](_0x5b3cd,_0x54978f)[_0x5029('0xa')](function(_0x5bccfc){logger[_0x5029('0xb')]('Integration,\x20%s,\x20%s',_0x502a62,_0x5029('0xc'));logger[_0x5029('0xd')](_0x5029('0xe'),_0x502a62,'request\x20sent',JSON[_0x5029('0xf')](_0x5bccfc));if(_0x5bccfc[_0x5029('0x10')]){if(_0x5bccfc[_0x5029('0x10')]['code']===0x1f4){logger[_0x5029('0x10')](_0x5029('0x11'),_0x502a62,_0x5bccfc['error']['message']);return _0xf4459b(_0x5bccfc['error']['message']);}logger[_0x5029('0x10')](_0x5029('0x11'),_0x502a62,_0x5bccfc[_0x5029('0x10')][_0x5029('0x12')]);return _0x4ee867(_0x5bccfc[_0x5029('0x10')][_0x5029('0x12')]);}else{logger[_0x5029('0xb')](_0x5029('0x11'),_0x502a62,_0x5029('0xc'));_0x4ee867(_0x5bccfc[_0x5029('0x13')][_0x5029('0x12')]);}})[_0x5029('0x14')](function(_0x3786b5){logger[_0x5029('0x10')](_0x5029('0x11'),_0x502a62,_0x3786b5);_0xf4459b(_0x3786b5);});});} \ No newline at end of file +var _0x57ca=['client','http','request','info','request\x20sent','Integration,\x20%s,\x20%s,\x20%s','error','code','Integration,\x20%s,\x20%s','message','result','catch','util','moment','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','../../config/environment','jayson/promise'];(function(_0x44f2ae,_0x10707b){var _0x1f50cd=function(_0x2d182d){while(--_0x2d182d){_0x44f2ae['push'](_0x44f2ae['shift']());}};_0x1f50cd(++_0x10707b);}(_0x57ca,0x108));var _0xa57c=function(_0x165184,_0x6f6b4c){_0x165184=_0x165184-0x0;var _0x25046c=_0x57ca[_0x165184];return _0x25046c;};'use strict';var _=require('lodash');var util=require(_0xa57c('0x0'));var moment=require(_0xa57c('0x1'));var BPromise=require('bluebird');var rs=require(_0xa57c('0x2'));var fs=require('fs');var Redis=require(_0xa57c('0x3'));var db=require(_0xa57c('0x4'))['db'];var utils=require(_0xa57c('0x5'));var logger=require(_0xa57c('0x6'))('rpc');var config=require(_0xa57c('0x7'));var jayson=require(_0xa57c('0x8'));var client=jayson[_0xa57c('0x9')][_0xa57c('0xa')]({'port':0x232a});function respondWithRpcPromise(_0xbdfffb,_0x314574,_0x19e28e){return new BPromise(function(_0x271ccc,_0x5e3962){return client[_0xa57c('0xb')](_0xbdfffb,_0x19e28e)['then'](function(_0x46ba92){logger[_0xa57c('0xc')]('Integration,\x20%s,\x20%s',_0x314574,_0xa57c('0xd'));logger['debug'](_0xa57c('0xe'),_0x314574,_0xa57c('0xd'),JSON['stringify'](_0x46ba92));if(_0x46ba92[_0xa57c('0xf')]){if(_0x46ba92['error'][_0xa57c('0x10')]===0x1f4){logger[_0xa57c('0xf')](_0xa57c('0x11'),_0x314574,_0x46ba92[_0xa57c('0xf')][_0xa57c('0x12')]);return _0x5e3962(_0x46ba92['error'][_0xa57c('0x12')]);}logger['error'](_0xa57c('0x11'),_0x314574,_0x46ba92[_0xa57c('0xf')][_0xa57c('0x12')]);return _0x271ccc(_0x46ba92[_0xa57c('0xf')][_0xa57c('0x12')]);}else{logger[_0xa57c('0xc')](_0xa57c('0x11'),_0x314574,'request\x20sent');_0x271ccc(_0x46ba92[_0xa57c('0x13')][_0xa57c('0x12')]);}})[_0xa57c('0x14')](function(_0x5a6024){logger[_0xa57c('0xf')]('Integration,\x20%s,\x20%s',_0x314574,_0x5a6024);_0x5e3962(_0x5a6024);});});} \ No newline at end of file diff --git a/server/api/integrationReport/index.js b/server/api/integrationReport/index.js index 4df5ade..bf2e1ed 100644 --- a/server/api/integrationReport/index.js +++ b/server/api/integrationReport/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xc2c7=['/:id','show','create','put','update','delete','destroy','exports','util','path','connect-timeout','express','Router','fs-extra','../../components/auth/service','../../components/interaction/service','get','isAuthenticated','index','describe'];(function(_0x1d5948,_0x190727){var _0x2a6298=function(_0x29afee){while(--_0x29afee){_0x1d5948['push'](_0x1d5948['shift']());}};_0x2a6298(++_0x190727);}(_0xc2c7,0x134));var _0x7c2c=function(_0x220761,_0x349a4a){_0x220761=_0x220761-0x0;var _0x5755cf=_0xc2c7[_0x220761];return _0x5755cf;};'use strict';var multer=require('multer');var util=require(_0x7c2c('0x0'));var path=require(_0x7c2c('0x1'));var timeout=require(_0x7c2c('0x2'));var express=require(_0x7c2c('0x3'));var router=express[_0x7c2c('0x4')]();var fs_extra=require(_0x7c2c('0x5'));var auth=require(_0x7c2c('0x6'));var interaction=require(_0x7c2c('0x7'));var config=require('../../config/environment');var controller=require('./integrationReport.controller');router[_0x7c2c('0x8')]('/',auth[_0x7c2c('0x9')](),controller[_0x7c2c('0xa')]);router['get']('/describe',auth['isAuthenticated'](),controller[_0x7c2c('0xb')]);router[_0x7c2c('0x8')](_0x7c2c('0xc'),auth[_0x7c2c('0x9')](),controller[_0x7c2c('0xd')]);router['post']('/',auth[_0x7c2c('0x9')](),controller[_0x7c2c('0xe')]);router[_0x7c2c('0xf')](_0x7c2c('0xc'),auth[_0x7c2c('0x9')](),controller[_0x7c2c('0x10')]);router[_0x7c2c('0x11')](_0x7c2c('0xc'),auth[_0x7c2c('0x9')](),controller[_0x7c2c('0x12')]);module[_0x7c2c('0x13')]=router; \ No newline at end of file +var _0xdb28=['destroy','exports','multer','util','path','connect-timeout','Router','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','get','isAuthenticated','/describe','describe','/:id','show','create','put','update'];(function(_0x18ab2a,_0x4debcd){var _0x16dcee=function(_0x10107a){while(--_0x10107a){_0x18ab2a['push'](_0x18ab2a['shift']());}};_0x16dcee(++_0x4debcd);}(_0xdb28,0x106));var _0x8db2=function(_0x34d558,_0x1d1a5f){_0x34d558=_0x34d558-0x0;var _0x4b3408=_0xdb28[_0x34d558];return _0x4b3408;};'use strict';var multer=require(_0x8db2('0x0'));var util=require(_0x8db2('0x1'));var path=require(_0x8db2('0x2'));var timeout=require(_0x8db2('0x3'));var express=require('express');var router=express[_0x8db2('0x4')]();var fs_extra=require(_0x8db2('0x5'));var auth=require(_0x8db2('0x6'));var interaction=require(_0x8db2('0x7'));var config=require(_0x8db2('0x8'));var controller=require('./integrationReport.controller');router[_0x8db2('0x9')]('/',auth[_0x8db2('0xa')](),controller['index']);router['get'](_0x8db2('0xb'),auth[_0x8db2('0xa')](),controller[_0x8db2('0xc')]);router[_0x8db2('0x9')](_0x8db2('0xd'),auth[_0x8db2('0xa')](),controller[_0x8db2('0xe')]);router['post']('/',auth[_0x8db2('0xa')](),controller[_0x8db2('0xf')]);router[_0x8db2('0x10')]('/:id',auth[_0x8db2('0xa')](),controller[_0x8db2('0x11')]);router['delete'](_0x8db2('0xd'),auth[_0x8db2('0xa')](),controller[_0x8db2('0x12')]);module[_0x8db2('0x13')]=router; \ No newline at end of file diff --git a/server/api/integrationReport/integrationReport.attributes.js b/server/api/integrationReport/integrationReport.attributes.js index 36ba9a1..0931542 100644 --- a/server/api/integrationReport/integrationReport.attributes.js +++ b/server/api/integrationReport/integrationReport.attributes.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x1ed3=['FAILED','exports','STRING','DATE','INTEGER','BOOLEAN','TEXT','ENUM','RECEIVED'];(function(_0x15df18,_0x19e397){var _0xe6062b=function(_0x31d655){while(--_0x31d655){_0x15df18['push'](_0x15df18['shift']());}};_0xe6062b(++_0x19e397);}(_0x1ed3,0xd0));var _0x31ed=function(_0x4ddc7a,_0x5b6cb8){_0x4ddc7a=_0x4ddc7a-0x0;var _0x4547c1=_0x1ed3[_0x4ddc7a];return _0x4547c1;};'use strict';var Sequelize=require('sequelize');module[_0x31ed('0x0')]={'integration':{'type':Sequelize['STRING']},'eventChannel':{'type':Sequelize[_0x31ed('0x1')]},'exitStatus':{'type':Sequelize[_0x31ed('0x1')]},'ticketId':{'type':Sequelize['STRING']},'integrationId':{'type':Sequelize['INTEGER']},'contacts':{'type':Sequelize[_0x31ed('0x1')]},'uniqueid':{'type':Sequelize['STRING']},'calleridnum':{'type':Sequelize[_0x31ed('0x1')]},'calleridname':{'type':Sequelize['STRING']},'queue':{'type':Sequelize[_0x31ed('0x1')]},'interface':{'type':Sequelize[_0x31ed('0x1')]},'membername':{'type':Sequelize[_0x31ed('0x1')]},'agentcalledAt':{'type':Sequelize[_0x31ed('0x2')]},'agentconnectAt':{'type':Sequelize['DATE']},'holdtime':{'type':Sequelize[_0x31ed('0x3')]},'agentcomplete':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'agentcompleteAt':{'type':Sequelize[_0x31ed('0x2')]},'talktime':{'type':Sequelize[_0x31ed('0x3')]},'agentacw':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'acwtime':{'type':Sequelize[_0x31ed('0x3')]},'reason':{'type':Sequelize['STRING']},'agentringnoanswer':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'agentringnoanswerAt':{'type':Sequelize[_0x31ed('0x2')]},'agentdump':{'type':Sequelize[_0x31ed('0x4')],'defaultValue':![]},'agentdumpAt':{'type':Sequelize['DATE']},'lastevent':{'type':Sequelize[_0x31ed('0x1')]},'channel':{'type':Sequelize[_0x31ed('0x1')]},'channelstate':{'type':Sequelize['INTEGER']},'channelstatedesc':{'type':Sequelize[_0x31ed('0x1')]},'connectedlinenum':{'type':Sequelize[_0x31ed('0x1')]},'connectedlinename':{'type':Sequelize['STRING']},'language':{'type':Sequelize['STRING']},'accountcode':{'type':Sequelize[_0x31ed('0x1')]},'context':{'type':Sequelize[_0x31ed('0x1')]},'exten':{'type':Sequelize[_0x31ed('0x1')]},'priority':{'type':Sequelize['STRING']},'destchannel':{'type':Sequelize[_0x31ed('0x1')]},'destchannelstate':{'type':Sequelize[_0x31ed('0x3')]},'destchannelstatedesc':{'type':Sequelize[_0x31ed('0x1')]},'destcalleridnum':{'type':Sequelize[_0x31ed('0x1')]},'destcalleridname':{'type':Sequelize['STRING']},'destconnectedlinenum':{'type':Sequelize[_0x31ed('0x1')]},'destconnectedlinename':{'type':Sequelize[_0x31ed('0x1')]},'destlanguage':{'type':Sequelize[_0x31ed('0x1')]},'destaccountcode':{'type':Sequelize[_0x31ed('0x1')]},'destcontext':{'type':Sequelize[_0x31ed('0x1')]},'destexten':{'type':Sequelize[_0x31ed('0x1')]},'destpriority':{'type':Sequelize[_0x31ed('0x1')]},'destuniqueid':{'type':Sequelize[_0x31ed('0x1')]},'messageId':{'type':Sequelize[_0x31ed('0x1')]},'inReplyTo':{'type':Sequelize[_0x31ed('0x1')]},'subject':{'type':Sequelize[_0x31ed('0x1')]},'from':{'type':Sequelize[_0x31ed('0x1')]},'to':{'type':Sequelize['STRING']},'cc':{'type':Sequelize['STRING']},'attachment':{'type':Sequelize[_0x31ed('0x5')]},'html':{'type':Sequelize['TEXT']},'text':{'type':Sequelize[_0x31ed('0x5')]},'status':{'type':Sequelize[_0x31ed('0x6')]('SENT','SENDING',_0x31ed('0x7'),_0x31ed('0x8'))},'url':{'type':Sequelize[_0x31ed('0x1')]},'app':{'type':Sequelize[_0x31ed('0x1')]},'appdata':{'type':Sequelize['STRING']},'projectId':{'type':Sequelize[_0x31ed('0x3')]}}; \ No newline at end of file +var _0x5b65=['SENDING','RECEIVED','FAILED','sequelize','exports','STRING','INTEGER','DATE','BOOLEAN','TEXT','SENT'];(function(_0x21e76d,_0x273988){var _0x4d54df=function(_0x3cc0ba){while(--_0x3cc0ba){_0x21e76d['push'](_0x21e76d['shift']());}};_0x4d54df(++_0x273988);}(_0x5b65,0x121));var _0x55b6=function(_0x5eeb1a,_0xd2f607){_0x5eeb1a=_0x5eeb1a-0x0;var _0x293625=_0x5b65[_0x5eeb1a];return _0x293625;};'use strict';var Sequelize=require(_0x55b6('0x0'));module[_0x55b6('0x1')]={'integration':{'type':Sequelize[_0x55b6('0x2')]},'eventChannel':{'type':Sequelize[_0x55b6('0x2')]},'exitStatus':{'type':Sequelize[_0x55b6('0x2')]},'ticketId':{'type':Sequelize[_0x55b6('0x2')]},'integrationId':{'type':Sequelize[_0x55b6('0x3')]},'contacts':{'type':Sequelize[_0x55b6('0x2')]},'uniqueid':{'type':Sequelize[_0x55b6('0x2')]},'calleridnum':{'type':Sequelize[_0x55b6('0x2')]},'calleridname':{'type':Sequelize[_0x55b6('0x2')]},'queue':{'type':Sequelize['STRING']},'interface':{'type':Sequelize[_0x55b6('0x2')]},'membername':{'type':Sequelize[_0x55b6('0x2')]},'agentcalledAt':{'type':Sequelize['DATE']},'agentconnectAt':{'type':Sequelize[_0x55b6('0x4')]},'holdtime':{'type':Sequelize[_0x55b6('0x3')]},'agentcomplete':{'type':Sequelize[_0x55b6('0x5')],'defaultValue':![]},'agentcompleteAt':{'type':Sequelize[_0x55b6('0x4')]},'talktime':{'type':Sequelize['INTEGER']},'agentacw':{'type':Sequelize[_0x55b6('0x5')],'defaultValue':![]},'acwtime':{'type':Sequelize['INTEGER']},'reason':{'type':Sequelize[_0x55b6('0x2')]},'agentringnoanswer':{'type':Sequelize[_0x55b6('0x5')],'defaultValue':![]},'agentringnoanswerAt':{'type':Sequelize['DATE']},'agentdump':{'type':Sequelize[_0x55b6('0x5')],'defaultValue':![]},'agentdumpAt':{'type':Sequelize[_0x55b6('0x4')]},'lastevent':{'type':Sequelize[_0x55b6('0x2')]},'channel':{'type':Sequelize['STRING']},'channelstate':{'type':Sequelize[_0x55b6('0x3')]},'channelstatedesc':{'type':Sequelize['STRING']},'connectedlinenum':{'type':Sequelize['STRING']},'connectedlinename':{'type':Sequelize[_0x55b6('0x2')]},'language':{'type':Sequelize['STRING']},'accountcode':{'type':Sequelize[_0x55b6('0x2')]},'context':{'type':Sequelize[_0x55b6('0x2')]},'exten':{'type':Sequelize[_0x55b6('0x2')]},'priority':{'type':Sequelize['STRING']},'destchannel':{'type':Sequelize['STRING']},'destchannelstate':{'type':Sequelize[_0x55b6('0x3')]},'destchannelstatedesc':{'type':Sequelize[_0x55b6('0x2')]},'destcalleridnum':{'type':Sequelize['STRING']},'destcalleridname':{'type':Sequelize['STRING']},'destconnectedlinenum':{'type':Sequelize['STRING']},'destconnectedlinename':{'type':Sequelize[_0x55b6('0x2')]},'destlanguage':{'type':Sequelize[_0x55b6('0x2')]},'destaccountcode':{'type':Sequelize[_0x55b6('0x2')]},'destcontext':{'type':Sequelize['STRING']},'destexten':{'type':Sequelize[_0x55b6('0x2')]},'destpriority':{'type':Sequelize[_0x55b6('0x2')]},'destuniqueid':{'type':Sequelize[_0x55b6('0x2')]},'messageId':{'type':Sequelize[_0x55b6('0x2')]},'inReplyTo':{'type':Sequelize[_0x55b6('0x2')]},'subject':{'type':Sequelize['STRING']},'from':{'type':Sequelize['STRING']},'to':{'type':Sequelize[_0x55b6('0x2')]},'cc':{'type':Sequelize['STRING']},'attachment':{'type':Sequelize[_0x55b6('0x6')]},'html':{'type':Sequelize['TEXT']},'text':{'type':Sequelize[_0x55b6('0x6')]},'status':{'type':Sequelize['ENUM'](_0x55b6('0x7'),_0x55b6('0x8'),_0x55b6('0x9'),_0x55b6('0xa'))},'url':{'type':Sequelize[_0x55b6('0x2')]},'app':{'type':Sequelize['STRING']},'appdata':{'type':Sequelize[_0x55b6('0x2')]},'projectId':{'type':Sequelize[_0x55b6('0x3')]}}; \ No newline at end of file diff --git a/server/api/integrationReport/integrationReport.controller.js b/server/api/integrationReport/integrationReport.controller.js index 987ad09..701b306 100644 --- a/server/api/integrationReport/integrationReport.controller.js +++ b/server/api/integrationReport/integrationReport.controller.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xa24c=['then','error','stack','name','send','map','IntegrationReport','rawAttributes','fieldName','type','key','model','query','keys','filters','intersection','fields','attributes','length','sort','where','pick','filter','merge','VIRTUAL','includeAll','findAll','rows','params','include','options','find','catch','create','body','destroy','describe','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','util','path','sox','to-csv','ejs','fs-extra','lodash','squel','jsforce','desk.js','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','api','../../config/utils','../../config/license/util','../../mysqldb','sendStatus','status','end','json','offset','undefined','count','limit','Content-Range','apply','reject','update'];(function(_0x4a97e2,_0x30c08c){var _0x1b852a=function(_0x539179){while(--_0x539179){_0x4a97e2['push'](_0x4a97e2['shift']());}};_0x1b852a(++_0x30c08c);}(_0xa24c,0xc1));var _0xca24=function(_0x13ead0,_0x3c6d09){_0x13ead0=_0x13ead0-0x0;var _0x438d24=_0xa24c[_0x13ead0];return _0x438d24;};'use strict';var emlformat=require(_0xca24('0x0'));var rimraf=require(_0xca24('0x1'));var zipdir=require(_0xca24('0x2'));var jsonpatch=require(_0xca24('0x3'));var rp=require(_0xca24('0x4'));var moment=require(_0xca24('0x5'));var BPromise=require(_0xca24('0x6'));var Mustache=require(_0xca24('0x7'));var util=require(_0xca24('0x8'));var path=require(_0xca24('0x9'));var sox=require(_0xca24('0xa'));var csv=require(_0xca24('0xb'));var ejs=require(_0xca24('0xc'));var fs=require('fs');var fs_extra=require(_0xca24('0xd'));var _=require(_0xca24('0xe'));var squel=require(_0xca24('0xf'));var crypto=require('crypto');var jsforce=require(_0xca24('0x10'));var deskjs=require(_0xca24('0x11'));var toCsv=require('to-csv');var querystring=require(_0xca24('0x12'));var Papa=require(_0xca24('0x13'));var Redis=require(_0xca24('0x14'));var authService=require(_0xca24('0x15'));var qs=require(_0xca24('0x16'));var as=require(_0xca24('0x17'));var hardwareService=require(_0xca24('0x18'));var logger=require('../../config/logger')(_0xca24('0x19'));var utils=require(_0xca24('0x1a'));var config=require('../../config/environment');var licenseUtil=require(_0xca24('0x1b'));var db=require(_0xca24('0x1c'))['db'];function respondWithStatusCode(_0x4d799d,_0x2b4a19){_0x2b4a19=_0x2b4a19||0xcc;return function(_0x505cad){if(_0x505cad){return _0x4d799d[_0xca24('0x1d')](_0x2b4a19);}return _0x4d799d[_0xca24('0x1e')](_0x2b4a19)[_0xca24('0x1f')]();};}function respondWithResult(_0xbf0937,_0x4998a4){_0x4998a4=_0x4998a4||0xc8;return function(_0xfb8c1d){if(_0xfb8c1d){return _0xbf0937[_0xca24('0x1e')](_0x4998a4)[_0xca24('0x20')](_0xfb8c1d);}};}function respondWithFilteredResult(_0x340d6a,_0x5943f2){return function(_0x2f8707){if(_0x2f8707){var _0x2fb522=typeof _0x5943f2[_0xca24('0x21')]===_0xca24('0x22')&&typeof _0x5943f2['limit']==='undefined';var _0x529f03=_0x2f8707[_0xca24('0x23')];var _0x1680b0=_0x2fb522?0x0:_0x5943f2[_0xca24('0x21')];var _0x315abe=_0x2fb522?_0x2f8707[_0xca24('0x23')]:_0x5943f2[_0xca24('0x21')]+_0x5943f2[_0xca24('0x24')];var _0x850c26;if(_0x315abe>=_0x529f03){_0x315abe=_0x529f03;_0x850c26=0xc8;}else{_0x850c26=0xce;}_0x340d6a[_0xca24('0x1e')](_0x850c26);return _0x340d6a['set'](_0xca24('0x25'),_0x1680b0+'-'+_0x315abe+'/'+_0x529f03)[_0xca24('0x20')](_0x2f8707);}return null;};}function patchUpdates(_0x2a412a){return function(_0x5b1c45){try{jsonpatch[_0xca24('0x26')](_0x5b1c45,_0x2a412a,!![]);}catch(_0x4ddf2b){return BPromise[_0xca24('0x27')](_0x4ddf2b);}return _0x5b1c45['save']();};}function saveUpdates(_0x37705b,_0x1daf05){return function(_0x14715e){if(_0x14715e){return _0x14715e[_0xca24('0x28')](_0x37705b)[_0xca24('0x29')](function(_0x25b3ad){return _0x25b3ad;});}return null;};}function removeEntity(_0x1474c3,_0x5d9af2){return function(_0x3141b9){if(_0x3141b9){return _0x3141b9['destroy']()[_0xca24('0x29')](function(){_0x1474c3[_0xca24('0x1e')](0xcc)[_0xca24('0x1f')]();});}};}function handleEntityNotFound(_0x5e9e00,_0x101222){return function(_0x418578){if(!_0x418578){_0x5e9e00['sendStatus'](0x194);}return _0x418578;};}function handleError(_0x4af54e,_0x4acd6d){_0x4acd6d=_0x4acd6d||0x1f4;return function(_0x184ba2){logger[_0xca24('0x2a')](_0x184ba2[_0xca24('0x2b')]);if(_0x184ba2[_0xca24('0x2c')]){delete _0x184ba2['name'];}_0x4af54e[_0xca24('0x1e')](_0x4acd6d)[_0xca24('0x2d')](_0x184ba2);};}exports['index']=function(_0x266804,_0x51095b){var _0x32c02b={},_0xdfd08e={},_0x1cddfd={'count':0x0,'rows':[]};var _0x3b5693=_[_0xca24('0x2e')](db[_0xca24('0x2f')][_0xca24('0x30')],function(_0x1d62dd){return{'name':_0x1d62dd[_0xca24('0x31')],'type':_0x1d62dd[_0xca24('0x32')][_0xca24('0x33')]};});_0xdfd08e[_0xca24('0x34')]=_[_0xca24('0x2e')](_0x3b5693,_0xca24('0x2c'));_0xdfd08e[_0xca24('0x35')]=_[_0xca24('0x36')](_0x266804[_0xca24('0x35')]);_0xdfd08e[_0xca24('0x37')]=_[_0xca24('0x38')](_0xdfd08e[_0xca24('0x34')],_0xdfd08e[_0xca24('0x35')]);_0x32c02b['attributes']=_[_0xca24('0x38')](_0xdfd08e[_0xca24('0x34')],qs[_0xca24('0x39')](_0x266804[_0xca24('0x35')][_0xca24('0x39')]));_0x32c02b[_0xca24('0x3a')]=_0x32c02b[_0xca24('0x3a')][_0xca24('0x3b')]?_0x32c02b[_0xca24('0x3a')]:_0xdfd08e['model'];if(!_0x266804[_0xca24('0x35')]['hasOwnProperty']('nolimit')){_0x32c02b[_0xca24('0x24')]=qs[_0xca24('0x24')](_0x266804[_0xca24('0x35')][_0xca24('0x24')]);_0x32c02b[_0xca24('0x21')]=qs['offset'](_0x266804[_0xca24('0x35')][_0xca24('0x21')]);}_0x32c02b['order']=qs[_0xca24('0x3c')](_0x266804[_0xca24('0x35')][_0xca24('0x3c')]);_0x32c02b[_0xca24('0x3d')]=qs[_0xca24('0x37')](_[_0xca24('0x3e')](_0x266804[_0xca24('0x35')],_0xdfd08e[_0xca24('0x37')]),_0x3b5693);if(_0x266804[_0xca24('0x35')][_0xca24('0x3f')]){_0x32c02b[_0xca24('0x3d')]=_[_0xca24('0x40')](_0x32c02b['where'],{'$or':_['map'](_0x3b5693,function(_0x17668c){if(_0x17668c[_0xca24('0x32')]!==_0xca24('0x41')){var _0x27925c={};_0x27925c[_0x17668c[_0xca24('0x2c')]]={'$like':'%'+_0x266804[_0xca24('0x35')][_0xca24('0x3f')]+'%'};return _0x27925c;}})});}_0x32c02b=_[_0xca24('0x40')]({},_0x32c02b,_0x266804['options']);var _0x5b2fa6={'where':_0x32c02b[_0xca24('0x3d')]};return db[_0xca24('0x2f')][_0xca24('0x23')](_0x5b2fa6)[_0xca24('0x29')](function(_0x3f406e){_0x1cddfd[_0xca24('0x23')]=_0x3f406e;if(_0x266804['query'][_0xca24('0x42')]){_0x32c02b['include']=[{'all':!![]}];}return db[_0xca24('0x2f')][_0xca24('0x43')](_0x32c02b);})[_0xca24('0x29')](function(_0x2b7c4f){_0x1cddfd[_0xca24('0x44')]=_0x2b7c4f;return _0x1cddfd;})[_0xca24('0x29')](respondWithFilteredResult(_0x51095b,_0x32c02b))['catch'](handleError(_0x51095b,null));};exports['show']=function(_0x52fcf9,_0x2d05e5){var _0xc823e2={'raw':![],'where':{'id':_0x52fcf9[_0xca24('0x45')]['id']}},_0x35d0e6={};_0x35d0e6[_0xca24('0x34')]=_[_0xca24('0x36')](db['IntegrationReport'][_0xca24('0x30')]);_0x35d0e6[_0xca24('0x35')]=_['keys'](_0x52fcf9[_0xca24('0x35')]);_0x35d0e6['filters']=_[_0xca24('0x38')](_0x35d0e6[_0xca24('0x34')],_0x35d0e6[_0xca24('0x35')]);_0xc823e2[_0xca24('0x3a')]=_[_0xca24('0x38')](_0x35d0e6[_0xca24('0x34')],qs[_0xca24('0x39')](_0x52fcf9[_0xca24('0x35')][_0xca24('0x39')]));_0xc823e2[_0xca24('0x3a')]=_0xc823e2[_0xca24('0x3a')][_0xca24('0x3b')]?_0xc823e2[_0xca24('0x3a')]:_0x35d0e6[_0xca24('0x34')];if(_0x52fcf9['query'][_0xca24('0x42')]){_0xc823e2[_0xca24('0x46')]=[{'all':!![]}];}_0xc823e2=_[_0xca24('0x40')]({},_0xc823e2,_0x52fcf9[_0xca24('0x47')]);return db['IntegrationReport'][_0xca24('0x48')](_0xc823e2)[_0xca24('0x29')](handleEntityNotFound(_0x2d05e5,null))[_0xca24('0x29')](respondWithResult(_0x2d05e5,null))[_0xca24('0x49')](handleError(_0x2d05e5,null));};exports[_0xca24('0x4a')]=function(_0x266d26,_0x28cc09){return db['IntegrationReport'][_0xca24('0x4a')](_0x266d26[_0xca24('0x4b')],{})['then'](respondWithResult(_0x28cc09,0xc9))[_0xca24('0x49')](handleError(_0x28cc09,null));};exports[_0xca24('0x28')]=function(_0x495976,_0x4d2945){if(_0x495976[_0xca24('0x4b')]['id']){delete _0x495976[_0xca24('0x4b')]['id'];}return db[_0xca24('0x2f')][_0xca24('0x48')]({'where':{'id':_0x495976[_0xca24('0x45')]['id']}})[_0xca24('0x29')](handleEntityNotFound(_0x4d2945,null))['then'](saveUpdates(_0x495976[_0xca24('0x4b')],null))[_0xca24('0x29')](respondWithResult(_0x4d2945,null))[_0xca24('0x49')](handleError(_0x4d2945,null));};exports[_0xca24('0x4c')]=function(_0xb168c5,_0x145f85){return db['IntegrationReport'][_0xca24('0x48')]({'where':{'id':_0xb168c5[_0xca24('0x45')]['id']}})[_0xca24('0x29')](handleEntityNotFound(_0x145f85,null))[_0xca24('0x29')](removeEntity(_0x145f85,null))['catch'](handleError(_0x145f85,null));};exports[_0xca24('0x4d')]=function(_0x4bb46e,_0x383236){return db['IntegrationReport'][_0xca24('0x4d')]()[_0xca24('0x29')](respondWithResult(_0x383236,null))[_0xca24('0x49')](handleError(_0x383236,null));}; \ No newline at end of file +var _0xffca=['then','destroy','end','error','stack','name','index','map','rawAttributes','fieldName','type','key','model','query','keys','filters','intersection','attributes','fields','length','hasOwnProperty','nolimit','order','sort','where','pick','VIRTUAL','filter','IntegrationReport','includeAll','include','findAll','rows','catch','show','merge','options','find','create','body','params','describe','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','mustache','util','path','sox','to-csv','ejs','lodash','squel','crypto','jsforce','papaparse','ioredis','../../components/auth/service','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','sendStatus','status','json','offset','undefined','limit','count','set','Content-Range','apply','reject','save','update'];(function(_0x5bd619,_0x2455ff){var _0x5f12b0=function(_0x16d7c2){while(--_0x16d7c2){_0x5bd619['push'](_0x5bd619['shift']());}};_0x5f12b0(++_0x2455ff);}(_0xffca,0xcc));var _0xaffc=function(_0x1d1779,_0x284147){_0x1d1779=_0x1d1779-0x0;var _0x2377e9=_0xffca[_0x1d1779];return _0x2377e9;};'use strict';var emlformat=require(_0xaffc('0x0'));var rimraf=require(_0xaffc('0x1'));var zipdir=require(_0xaffc('0x2'));var jsonpatch=require(_0xaffc('0x3'));var rp=require(_0xaffc('0x4'));var moment=require(_0xaffc('0x5'));var BPromise=require('bluebird');var Mustache=require(_0xaffc('0x6'));var util=require(_0xaffc('0x7'));var path=require(_0xaffc('0x8'));var sox=require(_0xaffc('0x9'));var csv=require(_0xaffc('0xa'));var ejs=require(_0xaffc('0xb'));var fs=require('fs');var fs_extra=require('fs-extra');var _=require(_0xaffc('0xc'));var squel=require(_0xaffc('0xd'));var crypto=require(_0xaffc('0xe'));var jsforce=require(_0xaffc('0xf'));var deskjs=require('desk.js');var toCsv=require(_0xaffc('0xa'));var querystring=require('querystring');var Papa=require(_0xaffc('0x10'));var Redis=require(_0xaffc('0x11'));var authService=require(_0xaffc('0x12'));var qs=require('../../components/parsers/qs');var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0xaffc('0x13'));var logger=require(_0xaffc('0x14'))(_0xaffc('0x15'));var utils=require(_0xaffc('0x16'));var config=require(_0xaffc('0x17'));var licenseUtil=require(_0xaffc('0x18'));var db=require(_0xaffc('0x19'))['db'];function respondWithStatusCode(_0x7c332c,_0x1c9a48){_0x1c9a48=_0x1c9a48||0xcc;return function(_0x3d8882){if(_0x3d8882){return _0x7c332c[_0xaffc('0x1a')](_0x1c9a48);}return _0x7c332c[_0xaffc('0x1b')](_0x1c9a48)['end']();};}function respondWithResult(_0x12728e,_0x1163a7){_0x1163a7=_0x1163a7||0xc8;return function(_0x7f6665){if(_0x7f6665){return _0x12728e[_0xaffc('0x1b')](_0x1163a7)[_0xaffc('0x1c')](_0x7f6665);}};}function respondWithFilteredResult(_0x5532af,_0x8b82df){return function(_0x2b65ce){if(_0x2b65ce){var _0x510532=typeof _0x8b82df[_0xaffc('0x1d')]===_0xaffc('0x1e')&&typeof _0x8b82df[_0xaffc('0x1f')]===_0xaffc('0x1e');var _0x1e06dc=_0x2b65ce[_0xaffc('0x20')];var _0x1fb640=_0x510532?0x0:_0x8b82df['offset'];var _0xca7836=_0x510532?_0x2b65ce[_0xaffc('0x20')]:_0x8b82df[_0xaffc('0x1d')]+_0x8b82df[_0xaffc('0x1f')];var _0x2649f3;if(_0xca7836>=_0x1e06dc){_0xca7836=_0x1e06dc;_0x2649f3=0xc8;}else{_0x2649f3=0xce;}_0x5532af[_0xaffc('0x1b')](_0x2649f3);return _0x5532af[_0xaffc('0x21')](_0xaffc('0x22'),_0x1fb640+'-'+_0xca7836+'/'+_0x1e06dc)[_0xaffc('0x1c')](_0x2b65ce);}return null;};}function patchUpdates(_0x23756d){return function(_0x11a130){try{jsonpatch[_0xaffc('0x23')](_0x11a130,_0x23756d,!![]);}catch(_0x50f8dd){return BPromise[_0xaffc('0x24')](_0x50f8dd);}return _0x11a130[_0xaffc('0x25')]();};}function saveUpdates(_0x4f5f46,_0x4bc531){return function(_0x42384f){if(_0x42384f){return _0x42384f[_0xaffc('0x26')](_0x4f5f46)[_0xaffc('0x27')](function(_0x2a51dc){return _0x2a51dc;});}return null;};}function removeEntity(_0xc6402a,_0x56438a){return function(_0x14c8c8){if(_0x14c8c8){return _0x14c8c8[_0xaffc('0x28')]()['then'](function(){_0xc6402a[_0xaffc('0x1b')](0xcc)[_0xaffc('0x29')]();});}};}function handleEntityNotFound(_0x4f87d2,_0x47189b){return function(_0x5c0d78){if(!_0x5c0d78){_0x4f87d2[_0xaffc('0x1a')](0x194);}return _0x5c0d78;};}function handleError(_0x4f5e84,_0x52b999){_0x52b999=_0x52b999||0x1f4;return function(_0x2cc601){logger[_0xaffc('0x2a')](_0x2cc601[_0xaffc('0x2b')]);if(_0x2cc601[_0xaffc('0x2c')]){delete _0x2cc601['name'];}_0x4f5e84['status'](_0x52b999)['send'](_0x2cc601);};}exports[_0xaffc('0x2d')]=function(_0x15cbfb,_0x1192fa){var _0xad416a={},_0x273e73={},_0x496c03={'count':0x0,'rows':[]};var _0x2d2479=_[_0xaffc('0x2e')](db['IntegrationReport'][_0xaffc('0x2f')],function(_0x411d6a){return{'name':_0x411d6a[_0xaffc('0x30')],'type':_0x411d6a[_0xaffc('0x31')][_0xaffc('0x32')]};});_0x273e73[_0xaffc('0x33')]=_['map'](_0x2d2479,'name');_0x273e73[_0xaffc('0x34')]=_[_0xaffc('0x35')](_0x15cbfb[_0xaffc('0x34')]);_0x273e73[_0xaffc('0x36')]=_[_0xaffc('0x37')](_0x273e73[_0xaffc('0x33')],_0x273e73[_0xaffc('0x34')]);_0xad416a[_0xaffc('0x38')]=_['intersection'](_0x273e73['model'],qs[_0xaffc('0x39')](_0x15cbfb[_0xaffc('0x34')][_0xaffc('0x39')]));_0xad416a[_0xaffc('0x38')]=_0xad416a[_0xaffc('0x38')][_0xaffc('0x3a')]?_0xad416a[_0xaffc('0x38')]:_0x273e73['model'];if(!_0x15cbfb[_0xaffc('0x34')][_0xaffc('0x3b')](_0xaffc('0x3c'))){_0xad416a[_0xaffc('0x1f')]=qs['limit'](_0x15cbfb[_0xaffc('0x34')][_0xaffc('0x1f')]);_0xad416a[_0xaffc('0x1d')]=qs[_0xaffc('0x1d')](_0x15cbfb[_0xaffc('0x34')][_0xaffc('0x1d')]);}_0xad416a[_0xaffc('0x3d')]=qs['sort'](_0x15cbfb['query'][_0xaffc('0x3e')]);_0xad416a[_0xaffc('0x3f')]=qs[_0xaffc('0x36')](_[_0xaffc('0x40')](_0x15cbfb['query'],_0x273e73['filters']),_0x2d2479);if(_0x15cbfb[_0xaffc('0x34')]['filter']){_0xad416a[_0xaffc('0x3f')]=_['merge'](_0xad416a['where'],{'$or':_[_0xaffc('0x2e')](_0x2d2479,function(_0x47e104){if(_0x47e104[_0xaffc('0x31')]!==_0xaffc('0x41')){var _0x4d3b87={};_0x4d3b87[_0x47e104['name']]={'$like':'%'+_0x15cbfb[_0xaffc('0x34')][_0xaffc('0x42')]+'%'};return _0x4d3b87;}})});}_0xad416a=_['merge']({},_0xad416a,_0x15cbfb['options']);var _0x54aa44={'where':_0xad416a['where']};return db[_0xaffc('0x43')]['count'](_0x54aa44)['then'](function(_0x18474e){_0x496c03['count']=_0x18474e;if(_0x15cbfb[_0xaffc('0x34')][_0xaffc('0x44')]){_0xad416a[_0xaffc('0x45')]=[{'all':!![]}];}return db[_0xaffc('0x43')][_0xaffc('0x46')](_0xad416a);})['then'](function(_0x4dcecc){_0x496c03[_0xaffc('0x47')]=_0x4dcecc;return _0x496c03;})['then'](respondWithFilteredResult(_0x1192fa,_0xad416a))[_0xaffc('0x48')](handleError(_0x1192fa,null));};exports[_0xaffc('0x49')]=function(_0x183371,_0x3363aa){var _0x10dc35={'raw':![],'where':{'id':_0x183371['params']['id']}},_0x2965a3={};_0x2965a3[_0xaffc('0x33')]=_[_0xaffc('0x35')](db[_0xaffc('0x43')][_0xaffc('0x2f')]);_0x2965a3[_0xaffc('0x34')]=_[_0xaffc('0x35')](_0x183371[_0xaffc('0x34')]);_0x2965a3[_0xaffc('0x36')]=_['intersection'](_0x2965a3[_0xaffc('0x33')],_0x2965a3['query']);_0x10dc35[_0xaffc('0x38')]=_[_0xaffc('0x37')](_0x2965a3[_0xaffc('0x33')],qs[_0xaffc('0x39')](_0x183371[_0xaffc('0x34')]['fields']));_0x10dc35[_0xaffc('0x38')]=_0x10dc35[_0xaffc('0x38')][_0xaffc('0x3a')]?_0x10dc35[_0xaffc('0x38')]:_0x2965a3['model'];if(_0x183371['query']['includeAll']){_0x10dc35[_0xaffc('0x45')]=[{'all':!![]}];}_0x10dc35=_[_0xaffc('0x4a')]({},_0x10dc35,_0x183371[_0xaffc('0x4b')]);return db[_0xaffc('0x43')][_0xaffc('0x4c')](_0x10dc35)[_0xaffc('0x27')](handleEntityNotFound(_0x3363aa,null))['then'](respondWithResult(_0x3363aa,null))['catch'](handleError(_0x3363aa,null));};exports['create']=function(_0x351694,_0xf5738e){return db[_0xaffc('0x43')][_0xaffc('0x4d')](_0x351694[_0xaffc('0x4e')],{})['then'](respondWithResult(_0xf5738e,0xc9))[_0xaffc('0x48')](handleError(_0xf5738e,null));};exports[_0xaffc('0x26')]=function(_0x4b14a7,_0x3c20ce){if(_0x4b14a7[_0xaffc('0x4e')]['id']){delete _0x4b14a7[_0xaffc('0x4e')]['id'];}return db[_0xaffc('0x43')][_0xaffc('0x4c')]({'where':{'id':_0x4b14a7[_0xaffc('0x4f')]['id']}})[_0xaffc('0x27')](handleEntityNotFound(_0x3c20ce,null))[_0xaffc('0x27')](saveUpdates(_0x4b14a7[_0xaffc('0x4e')],null))[_0xaffc('0x27')](respondWithResult(_0x3c20ce,null))[_0xaffc('0x48')](handleError(_0x3c20ce,null));};exports[_0xaffc('0x28')]=function(_0x12efb6,_0x299a5d){return db[_0xaffc('0x43')][_0xaffc('0x4c')]({'where':{'id':_0x12efb6['params']['id']}})[_0xaffc('0x27')](handleEntityNotFound(_0x299a5d,null))[_0xaffc('0x27')](removeEntity(_0x299a5d,null))[_0xaffc('0x48')](handleError(_0x299a5d,null));};exports['describe']=function(_0x3fb3cd,_0x5adcef){return db[_0xaffc('0x43')][_0xaffc('0x50')]()[_0xaffc('0x27')](respondWithResult(_0x5adcef,null))[_0xaffc('0x48')](handleError(_0x5adcef,null));}; \ No newline at end of file diff --git a/server/api/integrationReport/integrationReport.model.js b/server/api/integrationReport/integrationReport.model.js index 2f24eb4..a60b38b 100644 --- a/server/api/integrationReport/integrationReport.model.js +++ b/server/api/integrationReport/integrationReport.model.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xe995=['request-promise','path','rimraf','./integrationReport.attributes','exports','define','IntegrationReport','report_integration','lodash','util','../../config/logger','bluebird'];(function(_0x4385ba,_0x21bb05){var _0xf089b1=function(_0x1cbad3){while(--_0x1cbad3){_0x4385ba['push'](_0x4385ba['shift']());}};_0xf089b1(++_0x21bb05);}(_0xe995,0x1c4));var _0x5e99=function(_0x2427bc,_0x13c094){_0x2427bc=_0x2427bc-0x0;var _0x4e8e43=_0xe995[_0x2427bc];return _0x4e8e43;};'use strict';var _=require(_0x5e99('0x0'));var util=require(_0x5e99('0x1'));var logger=require(_0x5e99('0x2'))('api');var moment=require('moment');var BPromise=require(_0x5e99('0x3'));var rp=require(_0x5e99('0x4'));var fs=require('fs');var path=require(_0x5e99('0x5'));var rimraf=require(_0x5e99('0x6'));var config=require('../../config/environment');var attributes=require(_0x5e99('0x7'));module[_0x5e99('0x8')]=function(_0x3bcabb,_0xe72dd0){return _0x3bcabb[_0x5e99('0x9')](_0x5e99('0xa'),attributes,{'tableName':_0x5e99('0xb'),'paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file +var _0x4eeb=['bluebird','request-promise','path','rimraf','exports','define','report_integration','lodash','util','../../config/logger','api'];(function(_0x3dc35c,_0x1acaea){var _0x4e821a=function(_0x44f97e){while(--_0x44f97e){_0x3dc35c['push'](_0x3dc35c['shift']());}};_0x4e821a(++_0x1acaea);}(_0x4eeb,0x104));var _0xb4ee=function(_0x48a50c,_0xb7fbba){_0x48a50c=_0x48a50c-0x0;var _0x1ff5ac=_0x4eeb[_0x48a50c];return _0x1ff5ac;};'use strict';var _=require(_0xb4ee('0x0'));var util=require(_0xb4ee('0x1'));var logger=require(_0xb4ee('0x2'))(_0xb4ee('0x3'));var moment=require('moment');var BPromise=require(_0xb4ee('0x4'));var rp=require(_0xb4ee('0x5'));var fs=require('fs');var path=require(_0xb4ee('0x6'));var rimraf=require(_0xb4ee('0x7'));var config=require('../../config/environment');var attributes=require('./integrationReport.attributes');module[_0xb4ee('0x8')]=function(_0x14537d,_0x282e23){return _0x14537d[_0xb4ee('0x9')]('IntegrationReport',attributes,{'tableName':_0xb4ee('0xa'),'paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file diff --git a/server/api/integrationReport/integrationReport.rpc.js b/server/api/integrationReport/integrationReport.rpc.js index ecc0d6e..0391ba8 100644 --- a/server/api/integrationReport/integrationReport.rpc.js +++ b/server/api/integrationReport/integrationReport.rpc.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xadb5=['error','code','message','result','catch','util','bluebird','randomstring','ioredis','../../config/utils','../../config/logger','rpc','jayson/promise','client','http','request','then','info','IntegrationReport,\x20%s,\x20%s','request\x20sent','stringify'];(function(_0x3f68dc,_0x3ae2f8){var _0x8c9e6f=function(_0x32b1cd){while(--_0x32b1cd){_0x3f68dc['push'](_0x3f68dc['shift']());}};_0x8c9e6f(++_0x3ae2f8);}(_0xadb5,0xad));var _0x5adb=function(_0x680a82,_0x416905){_0x680a82=_0x680a82-0x0;var _0x3b4d33=_0xadb5[_0x680a82];return _0x3b4d33;};'use strict';var _=require('lodash');var util=require(_0x5adb('0x0'));var moment=require('moment');var BPromise=require(_0x5adb('0x1'));var rs=require(_0x5adb('0x2'));var fs=require('fs');var Redis=require(_0x5adb('0x3'));var db=require('../../mysqldb')['db'];var utils=require(_0x5adb('0x4'));var logger=require(_0x5adb('0x5'))(_0x5adb('0x6'));var config=require('../../config/environment');var jayson=require(_0x5adb('0x7'));var client=jayson[_0x5adb('0x8')][_0x5adb('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x3213e8,_0xdf3776,_0x353885){return new BPromise(function(_0x47228a,_0x6d1b45){return client[_0x5adb('0xa')](_0x3213e8,_0x353885)[_0x5adb('0xb')](function(_0x34f59d){logger[_0x5adb('0xc')](_0x5adb('0xd'),_0xdf3776,_0x5adb('0xe'));logger['debug']('IntegrationReport,\x20%s,\x20%s,\x20%s',_0xdf3776,_0x5adb('0xe'),JSON[_0x5adb('0xf')](_0x34f59d));if(_0x34f59d[_0x5adb('0x10')]){if(_0x34f59d['error'][_0x5adb('0x11')]===0x1f4){logger['error'](_0x5adb('0xd'),_0xdf3776,_0x34f59d['error'][_0x5adb('0x12')]);return _0x6d1b45(_0x34f59d[_0x5adb('0x10')][_0x5adb('0x12')]);}logger['error'](_0x5adb('0xd'),_0xdf3776,_0x34f59d[_0x5adb('0x10')][_0x5adb('0x12')]);return _0x47228a(_0x34f59d['error'][_0x5adb('0x12')]);}else{logger['info'](_0x5adb('0xd'),_0xdf3776,_0x5adb('0xe'));_0x47228a(_0x34f59d[_0x5adb('0x13')][_0x5adb('0x12')]);}})[_0x5adb('0x14')](function(_0x39d24d){logger[_0x5adb('0x10')](_0x5adb('0xd'),_0xdf3776,_0x39d24d);_0x6d1b45(_0x39d24d);});});} \ No newline at end of file +var _0x687b=['../../config/logger','rpc','../../config/environment','jayson/promise','client','http','then','info','IntegrationReport,\x20%s,\x20%s','request\x20sent','debug','IntegrationReport,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','catch','lodash','util','moment','bluebird','../../mysqldb','../../config/utils'];(function(_0x568496,_0x565afd){var _0x26c5c1=function(_0x4d251e){while(--_0x4d251e){_0x568496['push'](_0x568496['shift']());}};_0x26c5c1(++_0x565afd);}(_0x687b,0x14a));var _0xb687=function(_0x5295a5,_0x2f106a){_0x5295a5=_0x5295a5-0x0;var _0x499291=_0x687b[_0x5295a5];return _0x499291;};'use strict';var _=require(_0xb687('0x0'));var util=require(_0xb687('0x1'));var moment=require(_0xb687('0x2'));var BPromise=require(_0xb687('0x3'));var rs=require('randomstring');var fs=require('fs');var Redis=require('ioredis');var db=require(_0xb687('0x4'))['db'];var utils=require(_0xb687('0x5'));var logger=require(_0xb687('0x6'))(_0xb687('0x7'));var config=require(_0xb687('0x8'));var jayson=require(_0xb687('0x9'));var client=jayson[_0xb687('0xa')][_0xb687('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x47ffea,_0x27b750,_0x48942b){return new BPromise(function(_0x2aea59,_0xd40346){return client['request'](_0x47ffea,_0x48942b)[_0xb687('0xc')](function(_0x21e3ab){logger[_0xb687('0xd')](_0xb687('0xe'),_0x27b750,_0xb687('0xf'));logger[_0xb687('0x10')](_0xb687('0x11'),_0x27b750,_0xb687('0xf'),JSON[_0xb687('0x12')](_0x21e3ab));if(_0x21e3ab['error']){if(_0x21e3ab[_0xb687('0x13')][_0xb687('0x14')]===0x1f4){logger[_0xb687('0x13')](_0xb687('0xe'),_0x27b750,_0x21e3ab['error']['message']);return _0xd40346(_0x21e3ab[_0xb687('0x13')][_0xb687('0x15')]);}logger['error'](_0xb687('0xe'),_0x27b750,_0x21e3ab[_0xb687('0x13')][_0xb687('0x15')]);return _0x2aea59(_0x21e3ab[_0xb687('0x13')][_0xb687('0x15')]);}else{logger[_0xb687('0xd')](_0xb687('0xe'),_0x27b750,_0xb687('0xf'));_0x2aea59(_0x21e3ab[_0xb687('0x16')][_0xb687('0x15')]);}})[_0xb687('0x17')](function(_0x19bb29){logger['error'](_0xb687('0xe'),_0x27b750,_0x19bb29);_0xd40346(_0x19bb29);});});} \ No newline at end of file diff --git a/server/api/interval/index.js b/server/api/interval/index.js index 0bf12df..c3298c0 100644 --- a/server/api/interval/index.js +++ b/server/api/interval/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xfe65=['connect-timeout','express','Router','fs-extra','../../components/interaction/service','./interval.controller','get','index','/:id','show','/:id/sub_intervals','isAuthenticated','post','addInterval','/:id/sub_intervals/create_many','put','update','delete','destroy','exports','multer','util'];(function(_0x80acfa,_0xf93f1f){var _0x3e68e9=function(_0x3dfc5e){while(--_0x3dfc5e){_0x80acfa['push'](_0x80acfa['shift']());}};_0x3e68e9(++_0xf93f1f);}(_0xfe65,0xc4));var _0x5fe6=function(_0x3cb409,_0x369721){_0x3cb409=_0x3cb409-0x0;var _0x52d2b8=_0xfe65[_0x3cb409];return _0x52d2b8;};'use strict';var multer=require(_0x5fe6('0x0'));var util=require(_0x5fe6('0x1'));var path=require('path');var timeout=require(_0x5fe6('0x2'));var express=require(_0x5fe6('0x3'));var router=express[_0x5fe6('0x4')]();var fs_extra=require(_0x5fe6('0x5'));var auth=require('../../components/auth/service');var interaction=require(_0x5fe6('0x6'));var config=require('../../config/environment');var controller=require(_0x5fe6('0x7'));router[_0x5fe6('0x8')]('/',auth['isAuthenticated'](),controller[_0x5fe6('0x9')]);router[_0x5fe6('0x8')](_0x5fe6('0xa'),auth['isAuthenticated'](),controller[_0x5fe6('0xb')]);router[_0x5fe6('0x8')](_0x5fe6('0xc'),auth[_0x5fe6('0xd')](),controller['getIntervals']);router['post']('/',auth['isAuthenticated'](),controller['create']);router[_0x5fe6('0xe')]('/:id/sub_intervals',auth[_0x5fe6('0xd')](),controller[_0x5fe6('0xf')]);router[_0x5fe6('0xe')](_0x5fe6('0x10'),auth[_0x5fe6('0xd')](),controller['addIntervals']);router[_0x5fe6('0x11')](_0x5fe6('0xa'),auth[_0x5fe6('0xd')](),controller[_0x5fe6('0x12')]);router[_0x5fe6('0x13')]('/:id',auth[_0x5fe6('0xd')](),controller[_0x5fe6('0x14')]);module[_0x5fe6('0x15')]=router; \ No newline at end of file +var _0x3dc1=['../../config/environment','get','isAuthenticated','/:id','show','getIntervals','post','/:id/sub_intervals','addInterval','/:id/sub_intervals/create_many','addIntervals','put','delete','destroy','exports','path','Router','fs-extra','../../components/auth/service','../../components/interaction/service'];(function(_0x1d0f15,_0x56c566){var _0x56725b=function(_0x444af7){while(--_0x444af7){_0x1d0f15['push'](_0x1d0f15['shift']());}};_0x56725b(++_0x56c566);}(_0x3dc1,0x127));var _0x13dc=function(_0x2aba7f,_0x52f819){_0x2aba7f=_0x2aba7f-0x0;var _0x231d9a=_0x3dc1[_0x2aba7f];return _0x231d9a;};'use strict';var multer=require('multer');var util=require('util');var path=require(_0x13dc('0x0'));var timeout=require('connect-timeout');var express=require('express');var router=express[_0x13dc('0x1')]();var fs_extra=require(_0x13dc('0x2'));var auth=require(_0x13dc('0x3'));var interaction=require(_0x13dc('0x4'));var config=require(_0x13dc('0x5'));var controller=require('./interval.controller');router[_0x13dc('0x6')]('/',auth[_0x13dc('0x7')](),controller['index']);router['get'](_0x13dc('0x8'),auth['isAuthenticated'](),controller[_0x13dc('0x9')]);router[_0x13dc('0x6')]('/:id/sub_intervals',auth[_0x13dc('0x7')](),controller[_0x13dc('0xa')]);router[_0x13dc('0xb')]('/',auth[_0x13dc('0x7')](),controller['create']);router[_0x13dc('0xb')](_0x13dc('0xc'),auth['isAuthenticated'](),controller[_0x13dc('0xd')]);router[_0x13dc('0xb')](_0x13dc('0xe'),auth['isAuthenticated'](),controller[_0x13dc('0xf')]);router[_0x13dc('0x10')]('/:id',auth[_0x13dc('0x7')](),controller['update']);router[_0x13dc('0x11')](_0x13dc('0x8'),auth[_0x13dc('0x7')](),controller[_0x13dc('0x12')]);module[_0x13dc('0x13')]=router; \ No newline at end of file diff --git a/server/api/interval/interval.attributes.js b/server/api/interval/interval.attributes.js index d62a79d..b4a9d92 100644 --- a/server/api/interval/interval.attributes.js +++ b/server/api/interval/interval.attributes.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x657f=['STRING'];(function(_0x101a17,_0x5d047a){var _0x3b76ee=function(_0x89be1b){while(--_0x89be1b){_0x101a17['push'](_0x101a17['shift']());}};_0x3b76ee(++_0x5d047a);}(_0x657f,0x12f));var _0xf657=function(_0x1098db,_0x39ba6b){_0x1098db=_0x1098db-0x0;var _0x14f090=_0x657f[_0x1098db];return _0x14f090;};'use strict';var Sequelize=require('sequelize');module['exports']={'name':{'type':Sequelize[_0xf657('0x0')]},'description':{'type':Sequelize[_0xf657('0x0')]},'interval':{'type':Sequelize['STRING'],'allowNull':!![]}}; \ No newline at end of file +var _0xa88b=['STRING','sequelize','exports'];(function(_0x1af80e,_0x8a8525){var _0x347585=function(_0x462d98){while(--_0x462d98){_0x1af80e['push'](_0x1af80e['shift']());}};_0x347585(++_0x8a8525);}(_0xa88b,0xd3));var _0xba88=function(_0x30d87a,_0xf3a07f){_0x30d87a=_0x30d87a-0x0;var _0x48f64b=_0xa88b[_0x30d87a];return _0x48f64b;};'use strict';var Sequelize=require(_0xba88('0x0'));module[_0xba88('0x1')]={'name':{'type':Sequelize[_0xba88('0x2')]},'description':{'type':Sequelize[_0xba88('0x2')]},'interval':{'type':Sequelize[_0xba88('0x2')],'allowNull':!![]}}; \ No newline at end of file diff --git a/server/api/interval/interval.controller.js b/server/api/interval/interval.controller.js index becfcff..0aba335 100644 --- a/server/api/interval/interval.controller.js +++ b/server/api/interval/interval.controller.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x5ec4=['stack','name','send','index','map','Interval','rawAttributes','type','query','keys','intersection','model','attributes','hasOwnProperty','nolimit','order','sort','where','filters','pick','filter','merge','options','includeAll','include','findAll','rows','catch','show','params','length','create','body','get','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','user','UserProfileSection','find','userProfileId','autoAssociation','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','IntervalId','getIntervals','findOne','fields','addIntervals','transaction','bulkCreate','zip-dir','fast-json-patch','bluebird','util','sox','to-csv','ejs','fs-extra','squel','crypto','jsforce','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','api','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','../../components/extensions/rewrite','status','end','offset','undefined','count','limit','set','Content-Range','json','save','update','destroy','Intervals','UserProfileResource','then','sendStatus','error'];(function(_0x58b70f,_0x5e9371){var _0x494fa2=function(_0x332079){while(--_0x332079){_0x58b70f['push'](_0x58b70f['shift']());}};_0x494fa2(++_0x5e9371);}(_0x5ec4,0x8b));var _0x45ec=function(_0x5e95b4,_0x5e6fd5){_0x5e95b4=_0x5e95b4-0x0;var _0x410add=_0x5ec4[_0x5e95b4];return _0x410add;};'use strict';var emlformat=require('eml-format');var rimraf=require('rimraf');var zipdir=require(_0x45ec('0x0'));var jsonpatch=require(_0x45ec('0x1'));var rp=require('request-promise');var moment=require('moment');var BPromise=require(_0x45ec('0x2'));var Mustache=require('mustache');var util=require(_0x45ec('0x3'));var path=require('path');var sox=require(_0x45ec('0x4'));var csv=require(_0x45ec('0x5'));var ejs=require(_0x45ec('0x6'));var fs=require('fs');var fs_extra=require(_0x45ec('0x7'));var _=require('lodash');var squel=require(_0x45ec('0x8'));var crypto=require(_0x45ec('0x9'));var jsforce=require(_0x45ec('0xa'));var deskjs=require('desk.js');var toCsv=require(_0x45ec('0x5'));var querystring=require(_0x45ec('0xb'));var Papa=require(_0x45ec('0xc'));var Redis=require(_0x45ec('0xd'));var authService=require(_0x45ec('0xe'));var qs=require(_0x45ec('0xf'));var as=require(_0x45ec('0x10'));var hardwareService=require(_0x45ec('0x11'));var logger=require('../../config/logger')(_0x45ec('0x12'));var utils=require(_0x45ec('0x13'));var config=require(_0x45ec('0x14'));var licenseUtil=require(_0x45ec('0x15'));var db=require(_0x45ec('0x16'))['db'];var extensions=require(_0x45ec('0x17'));function respondWithStatusCode(_0x2ebf36,_0x434b9c){_0x434b9c=_0x434b9c||0xcc;return function(_0x57da58){if(_0x57da58){return _0x2ebf36['sendStatus'](_0x434b9c);}return _0x2ebf36[_0x45ec('0x18')](_0x434b9c)[_0x45ec('0x19')]();};}function respondWithResult(_0x20c68e,_0x541b81){_0x541b81=_0x541b81||0xc8;return function(_0x2f3874){if(_0x2f3874){return _0x20c68e[_0x45ec('0x18')](_0x541b81)['json'](_0x2f3874);}};}function respondWithFilteredResult(_0x425f6c,_0x1ff30d){return function(_0x408add){if(_0x408add){var _0x23c556=typeof _0x1ff30d[_0x45ec('0x1a')]==='undefined'&&typeof _0x1ff30d['limit']===_0x45ec('0x1b');var _0x39a8a7=_0x408add['count'];var _0x2125e4=_0x23c556?0x0:_0x1ff30d['offset'];var _0x439a6f=_0x23c556?_0x408add[_0x45ec('0x1c')]:_0x1ff30d[_0x45ec('0x1a')]+_0x1ff30d[_0x45ec('0x1d')];var _0x2754f4;if(_0x439a6f>=_0x39a8a7){_0x439a6f=_0x39a8a7;_0x2754f4=0xc8;}else{_0x2754f4=0xce;}_0x425f6c[_0x45ec('0x18')](_0x2754f4);return _0x425f6c[_0x45ec('0x1e')](_0x45ec('0x1f'),_0x2125e4+'-'+_0x439a6f+'/'+_0x39a8a7)[_0x45ec('0x20')](_0x408add);}return null;};}function patchUpdates(_0x310dcf){return function(_0x425414){try{jsonpatch['apply'](_0x425414,_0x310dcf,!![]);}catch(_0xba8f4d){return BPromise['reject'](_0xba8f4d);}return _0x425414[_0x45ec('0x21')]();};}function saveUpdates(_0x40087d,_0x7c73bd){return function(_0x2777bb){if(_0x2777bb){return _0x2777bb[_0x45ec('0x22')](_0x40087d)['then'](function(_0x479581){return _0x479581;});}return null;};}function removeEntity(_0xd3ecdc,_0x14febb){return function(_0x583197){if(_0x583197){return _0x583197[_0x45ec('0x23')]()['then'](function(){var _0x54f9bd=_0x583197['get']({'plain':!![]});var _0x24e676=_0x45ec('0x24');return db[_0x45ec('0x25')]['destroy']({'where':{'type':_0x24e676,'resourceId':_0x54f9bd['id']}})[_0x45ec('0x26')](function(){return _0x583197;});})['then'](function(){_0xd3ecdc[_0x45ec('0x18')](0xcc)[_0x45ec('0x19')]();});}};}function handleEntityNotFound(_0x424924,_0x529fe1){return function(_0x34af4c){if(!_0x34af4c){_0x424924[_0x45ec('0x27')](0x194);}return _0x34af4c;};}function handleError(_0x104141,_0x5e6020){_0x5e6020=_0x5e6020||0x1f4;return function(_0x1fd288){logger[_0x45ec('0x28')](_0x1fd288[_0x45ec('0x29')]);if(_0x1fd288[_0x45ec('0x2a')]){delete _0x1fd288['name'];}_0x104141[_0x45ec('0x18')](_0x5e6020)[_0x45ec('0x2b')](_0x1fd288);};}exports[_0x45ec('0x2c')]=function(_0x4dd525,_0x54298d){var _0x1c4e3f={},_0x53d263={},_0x566efd={'count':0x0,'rows':[]};var _0x9bae3c=_[_0x45ec('0x2d')](db[_0x45ec('0x2e')][_0x45ec('0x2f')],function(_0x8db1f0){return{'name':_0x8db1f0['fieldName'],'type':_0x8db1f0[_0x45ec('0x30')]['key']};});_0x53d263['model']=_[_0x45ec('0x2d')](_0x9bae3c,_0x45ec('0x2a'));_0x53d263[_0x45ec('0x31')]=_[_0x45ec('0x32')](_0x4dd525[_0x45ec('0x31')]);_0x53d263['filters']=_[_0x45ec('0x33')](_0x53d263[_0x45ec('0x34')],_0x53d263[_0x45ec('0x31')]);_0x1c4e3f[_0x45ec('0x35')]=_[_0x45ec('0x33')](_0x53d263['model'],qs['fields'](_0x4dd525[_0x45ec('0x31')]['fields']));_0x1c4e3f[_0x45ec('0x35')]=_0x1c4e3f[_0x45ec('0x35')]['length']?_0x1c4e3f[_0x45ec('0x35')]:_0x53d263['model'];if(!_0x4dd525['query'][_0x45ec('0x36')](_0x45ec('0x37'))){_0x1c4e3f[_0x45ec('0x1d')]=qs[_0x45ec('0x1d')](_0x4dd525['query'][_0x45ec('0x1d')]);_0x1c4e3f[_0x45ec('0x1a')]=qs[_0x45ec('0x1a')](_0x4dd525['query'][_0x45ec('0x1a')]);}_0x1c4e3f[_0x45ec('0x38')]=qs[_0x45ec('0x39')](_0x4dd525['query'][_0x45ec('0x39')]);_0x1c4e3f[_0x45ec('0x3a')]=qs[_0x45ec('0x3b')](_[_0x45ec('0x3c')](_0x4dd525['query'],_0x53d263[_0x45ec('0x3b')]),_0x9bae3c);if(_0x4dd525[_0x45ec('0x31')][_0x45ec('0x3d')]){_0x1c4e3f[_0x45ec('0x3a')]=_[_0x45ec('0x3e')](_0x1c4e3f[_0x45ec('0x3a')],{'$or':_[_0x45ec('0x2d')](_0x9bae3c,function(_0xe327d){if(_0xe327d[_0x45ec('0x30')]!=='VIRTUAL'){var _0x4f34fc={};_0x4f34fc[_0xe327d[_0x45ec('0x2a')]]={'$like':'%'+_0x4dd525['query'][_0x45ec('0x3d')]+'%'};return _0x4f34fc;}})});}_0x1c4e3f=_[_0x45ec('0x3e')]({},_0x1c4e3f,_0x4dd525[_0x45ec('0x3f')]);var _0x4bc094={'where':_0x1c4e3f[_0x45ec('0x3a')]};return db[_0x45ec('0x2e')][_0x45ec('0x1c')](_0x4bc094)[_0x45ec('0x26')](function(_0x356c73){_0x566efd[_0x45ec('0x1c')]=_0x356c73;if(_0x4dd525['query'][_0x45ec('0x40')]){_0x1c4e3f[_0x45ec('0x41')]=[{'all':!![]}];}return db[_0x45ec('0x2e')][_0x45ec('0x42')](_0x1c4e3f);})[_0x45ec('0x26')](function(_0x390424){_0x566efd[_0x45ec('0x43')]=_0x390424;return _0x566efd;})['then'](respondWithFilteredResult(_0x54298d,_0x1c4e3f))[_0x45ec('0x44')](handleError(_0x54298d,null));};exports[_0x45ec('0x45')]=function(_0x46e39a,_0x3dce39){var _0x463a6c={'raw':!![],'where':{'id':_0x46e39a[_0x45ec('0x46')]['id']}},_0x43f343={};_0x43f343[_0x45ec('0x34')]=_[_0x45ec('0x32')](db[_0x45ec('0x2e')][_0x45ec('0x2f')]);_0x43f343[_0x45ec('0x31')]=_[_0x45ec('0x32')](_0x46e39a[_0x45ec('0x31')]);_0x43f343[_0x45ec('0x3b')]=_[_0x45ec('0x33')](_0x43f343[_0x45ec('0x34')],_0x43f343[_0x45ec('0x31')]);_0x463a6c[_0x45ec('0x35')]=_[_0x45ec('0x33')](_0x43f343[_0x45ec('0x34')],qs['fields'](_0x46e39a['query']['fields']));_0x463a6c[_0x45ec('0x35')]=_0x463a6c[_0x45ec('0x35')][_0x45ec('0x47')]?_0x463a6c[_0x45ec('0x35')]:_0x43f343[_0x45ec('0x34')];if(_0x46e39a[_0x45ec('0x31')][_0x45ec('0x40')]){_0x463a6c[_0x45ec('0x41')]=[{'all':!![]}];}_0x463a6c=_[_0x45ec('0x3e')]({},_0x463a6c,_0x46e39a[_0x45ec('0x3f')]);return db[_0x45ec('0x2e')]['find'](_0x463a6c)[_0x45ec('0x26')](handleEntityNotFound(_0x3dce39,null))[_0x45ec('0x26')](respondWithResult(_0x3dce39,null))[_0x45ec('0x44')](handleError(_0x3dce39,null));};exports[_0x45ec('0x48')]=function(_0x4d2da1,_0x457a51){return db['Interval']['create'](_0x4d2da1[_0x45ec('0x49')],{})[_0x45ec('0x26')](function(_0x54cad5){var _0x186970=_0x4d2da1['user'][_0x45ec('0x4a')]({'plain':!![]});if(!_0x186970)throw new Error(_0x45ec('0x4b'));if(_0x186970[_0x45ec('0x4c')]===_0x45ec('0x4d')){var _0x2198c1=_0x54cad5[_0x45ec('0x4a')]({'plain':!![]});var _0x2f94d8=_0x45ec('0x24');return db[_0x45ec('0x4e')][_0x45ec('0x4f')]({'where':{'name':_0x2f94d8,'userProfileId':_0x186970[_0x45ec('0x50')]},'raw':!![]})['then'](function(_0x307123){if(_0x307123&&_0x307123[_0x45ec('0x51')]===0x0){return db[_0x45ec('0x25')][_0x45ec('0x48')]({'name':_0x2198c1[_0x45ec('0x2a')],'resourceId':_0x2198c1['id'],'type':_0x307123[_0x45ec('0x2a')],'sectionId':_0x307123['id']},{})[_0x45ec('0x26')](function(){return _0x54cad5;});}else{return _0x54cad5;}})[_0x45ec('0x44')](function(_0xcaa1ed){logger['error'](_0x45ec('0x52'),_0xcaa1ed);throw _0xcaa1ed;});}return _0x54cad5;})[_0x45ec('0x26')](respondWithResult(_0x457a51,0xc9))['catch'](handleError(_0x457a51,null));};exports['update']=function(_0x165d44,_0x3ebc83){if(_0x165d44[_0x45ec('0x49')]['id']){delete _0x165d44['body']['id'];}return db[_0x45ec('0x2e')][_0x45ec('0x4f')]({'where':{'id':_0x165d44[_0x45ec('0x46')]['id']}})['then'](handleEntityNotFound(_0x3ebc83,null))[_0x45ec('0x26')](saveUpdates(_0x165d44[_0x45ec('0x49')],null))[_0x45ec('0x26')](respondWithResult(_0x3ebc83,null))['catch'](handleError(_0x3ebc83,null));};exports['destroy']=function(_0x16eade,_0x3596d1){return db[_0x45ec('0x2e')][_0x45ec('0x4f')]({'where':{'id':_0x16eade[_0x45ec('0x46')]['id']}})['then'](handleEntityNotFound(_0x3596d1,null))[_0x45ec('0x26')](removeEntity(_0x3596d1,null))[_0x45ec('0x44')](handleError(_0x3596d1,null));};exports['addInterval']=function(_0xfcb91f,_0x53c036,_0x494c12){if(_0xfcb91f['body']['id']){delete _0xfcb91f[_0x45ec('0x49')]['id'];}return db[_0x45ec('0x2e')][_0x45ec('0x4f')]({'where':{'id':_0xfcb91f['params']['id']}})[_0x45ec('0x26')](handleEntityNotFound(_0x53c036,null))[_0x45ec('0x26')](function(_0x30cd53){if(_0x30cd53){_0xfcb91f[_0x45ec('0x49')][_0x45ec('0x53')]=_0x30cd53['id'];return db[_0x45ec('0x2e')][_0x45ec('0x48')](_0xfcb91f[_0x45ec('0x49')]);}})[_0x45ec('0x26')](respondWithResult(_0x53c036,null))[_0x45ec('0x44')](handleError(_0x53c036,null));};exports[_0x45ec('0x54')]=function(_0x2c29a9,_0x503261,_0x571445){var _0x59767e={};var _0xd00e={};var _0x10d3b9;var _0x3457c1;return db[_0x45ec('0x2e')][_0x45ec('0x55')]({'where':{'id':_0x2c29a9[_0x45ec('0x46')]['id']}})[_0x45ec('0x26')](handleEntityNotFound(_0x503261,null))[_0x45ec('0x26')](function(_0x35fc58){if(_0x35fc58){_0x10d3b9=_0x35fc58;_0xd00e[_0x45ec('0x34')]=_[_0x45ec('0x32')](db[_0x45ec('0x2e')]['rawAttributes']);_0xd00e['query']=_[_0x45ec('0x32')](_0x2c29a9[_0x45ec('0x31')]);_0xd00e[_0x45ec('0x3b')]=_[_0x45ec('0x33')](_0xd00e[_0x45ec('0x34')],_0xd00e['query']);_0x59767e[_0x45ec('0x35')]=_[_0x45ec('0x33')](_0xd00e[_0x45ec('0x34')],qs[_0x45ec('0x56')](_0x2c29a9['query'][_0x45ec('0x56')]));_0x59767e['attributes']=_0x59767e[_0x45ec('0x35')]['length']?_0x59767e[_0x45ec('0x35')]:_0xd00e[_0x45ec('0x34')];_0x59767e[_0x45ec('0x38')]=qs['sort'](_0x2c29a9[_0x45ec('0x31')][_0x45ec('0x39')]);_0x59767e[_0x45ec('0x3a')]=qs['filters'](_[_0x45ec('0x3c')](_0x2c29a9[_0x45ec('0x31')],_0xd00e[_0x45ec('0x3b')]));if(_0x2c29a9[_0x45ec('0x31')][_0x45ec('0x3d')]){_0x59767e[_0x45ec('0x3a')]=_[_0x45ec('0x3e')](_0x59767e[_0x45ec('0x3a')],{'$or':_[_0x45ec('0x2d')](_0x59767e['attributes'],function(_0x4493fb){var _0x3dc471={};_0x3dc471[_0x4493fb]={'$like':'%'+_0x2c29a9[_0x45ec('0x31')]['filter']+'%'};return _0x3dc471;})});}_0x59767e=_['merge']({},_0x59767e,_0x2c29a9[_0x45ec('0x3f')]);return _0x10d3b9[_0x45ec('0x54')](_0x59767e);}})[_0x45ec('0x26')](function(_0x4775fe){if(_0x4775fe){_0x3457c1=_0x4775fe[_0x45ec('0x47')];if(!_0x2c29a9[_0x45ec('0x31')][_0x45ec('0x36')]('nolimit')){_0x59767e[_0x45ec('0x1d')]=qs[_0x45ec('0x1d')](_0x2c29a9[_0x45ec('0x31')][_0x45ec('0x1d')]);_0x59767e['offset']=qs[_0x45ec('0x1a')](_0x2c29a9['query']['offset']);}return _0x10d3b9['getIntervals'](_0x59767e);}})[_0x45ec('0x26')](function(_0xf925c4){if(_0xf925c4){return _0xf925c4?{'count':_0x3457c1,'rows':_0xf925c4}:null;}})[_0x45ec('0x26')](respondWithResult(_0x503261,null))['catch'](handleError(_0x503261,null));};exports[_0x45ec('0x57')]=function(_0x3d8f69,_0x23a883,_0x13450c){return db['Interval']['findOne']({'where':{'id':_0x3d8f69[_0x45ec('0x46')]['id']}})[_0x45ec('0x26')](handleEntityNotFound(_0x23a883,null))['then'](function(_0x4e037d){if(_0x4e037d){return db['sequelize'][_0x45ec('0x58')](function(_0x22ff05){return db[_0x45ec('0x2e')][_0x45ec('0x23')]({'where':{'IntervalId':_0x3d8f69[_0x45ec('0x46')]['id']},'transaction':_0x22ff05})['then'](function(_0x534c6e){var _0x1d329c=_[_0x45ec('0x2d')](_0x3d8f69[_0x45ec('0x49')],function(_0x30729f){delete _0x30729f['id'];_0x30729f[_0x45ec('0x53')]=_0x3d8f69['params']['id'];return _0x30729f;});return db[_0x45ec('0x2e')][_0x45ec('0x59')](_0x1d329c,{'transaction':_0x22ff05});});})[_0x45ec('0x26')](function(){return db[_0x45ec('0x2e')][_0x45ec('0x42')]({'where':{'IntervalId':_0x3d8f69['params']['id']}});});}})[_0x45ec('0x26')](respondWithResult(_0x23a883,null))[_0x45ec('0x44')](handleError(_0x23a883,null));}; \ No newline at end of file +var _0x4180=['includeAll','include','Interval','findAll','rows','catch','show','params','rawAttributes','create','user','get','Unable\x20to\x20retrieve\x20the\x20current\x20user','UserProfileSection','find','userProfileId','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','body','addInterval','IntervalId','getIntervals','length','pick','nolimit','findOne','transaction','bulkCreate','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','util','path','sox','lodash','squel','crypto','jsforce','querystring','../../components/auth/service','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','../../mysqldb','../../components/extensions/rewrite','sendStatus','status','end','json','limit','count','offset','apply','update','then','destroy','Intervals','stack','name','send','index','map','fieldName','model','query','keys','intersection','fields','attributes','hasOwnProperty','order','sort','where','filters','filter','merge','type','VIRTUAL','options'];(function(_0x2510db,_0x3c3c74){var _0x4c9c46=function(_0x29ee7d){while(--_0x29ee7d){_0x2510db['push'](_0x2510db['shift']());}};_0x4c9c46(++_0x3c3c74);}(_0x4180,0xc3));var _0x0418=function(_0x397171,_0x10bc1f){_0x397171=_0x397171-0x0;var _0xb39da2=_0x4180[_0x397171];return _0xb39da2;};'use strict';var emlformat=require('eml-format');var rimraf=require(_0x0418('0x0'));var zipdir=require(_0x0418('0x1'));var jsonpatch=require(_0x0418('0x2'));var rp=require(_0x0418('0x3'));var moment=require(_0x0418('0x4'));var BPromise=require(_0x0418('0x5'));var Mustache=require(_0x0418('0x6'));var util=require(_0x0418('0x7'));var path=require(_0x0418('0x8'));var sox=require(_0x0418('0x9'));var csv=require('to-csv');var ejs=require('ejs');var fs=require('fs');var fs_extra=require('fs-extra');var _=require(_0x0418('0xa'));var squel=require(_0x0418('0xb'));var crypto=require(_0x0418('0xc'));var jsforce=require(_0x0418('0xd'));var deskjs=require('desk.js');var toCsv=require('to-csv');var querystring=require(_0x0418('0xe'));var Papa=require('papaparse');var Redis=require('ioredis');var authService=require(_0x0418('0xf'));var qs=require('../../components/parsers/qs');var as=require(_0x0418('0x10'));var hardwareService=require(_0x0418('0x11'));var logger=require(_0x0418('0x12'))(_0x0418('0x13'));var utils=require(_0x0418('0x14'));var config=require('../../config/environment');var licenseUtil=require('../../config/license/util');var db=require(_0x0418('0x15'))['db'];var extensions=require(_0x0418('0x16'));function respondWithStatusCode(_0x2c815d,_0x237307){_0x237307=_0x237307||0xcc;return function(_0x9b4640){if(_0x9b4640){return _0x2c815d[_0x0418('0x17')](_0x237307);}return _0x2c815d[_0x0418('0x18')](_0x237307)[_0x0418('0x19')]();};}function respondWithResult(_0x2fc581,_0x44394b){_0x44394b=_0x44394b||0xc8;return function(_0x55ee2f){if(_0x55ee2f){return _0x2fc581['status'](_0x44394b)[_0x0418('0x1a')](_0x55ee2f);}};}function respondWithFilteredResult(_0x35dd15,_0x356e1e){return function(_0x26458c){if(_0x26458c){var _0x3123c0=typeof _0x356e1e['offset']==='undefined'&&typeof _0x356e1e[_0x0418('0x1b')]==='undefined';var _0x40fc16=_0x26458c[_0x0418('0x1c')];var _0x196808=_0x3123c0?0x0:_0x356e1e[_0x0418('0x1d')];var _0x1df22e=_0x3123c0?_0x26458c[_0x0418('0x1c')]:_0x356e1e['offset']+_0x356e1e[_0x0418('0x1b')];var _0x59caa3;if(_0x1df22e>=_0x40fc16){_0x1df22e=_0x40fc16;_0x59caa3=0xc8;}else{_0x59caa3=0xce;}_0x35dd15[_0x0418('0x18')](_0x59caa3);return _0x35dd15['set']('Content-Range',_0x196808+'-'+_0x1df22e+'/'+_0x40fc16)[_0x0418('0x1a')](_0x26458c);}return null;};}function patchUpdates(_0x3c517a){return function(_0x16f5fb){try{jsonpatch[_0x0418('0x1e')](_0x16f5fb,_0x3c517a,!![]);}catch(_0x12ee46){return BPromise['reject'](_0x12ee46);}return _0x16f5fb['save']();};}function saveUpdates(_0xd3ce2f,_0x474689){return function(_0x1956f7){if(_0x1956f7){return _0x1956f7[_0x0418('0x1f')](_0xd3ce2f)[_0x0418('0x20')](function(_0x514741){return _0x514741;});}return null;};}function removeEntity(_0x23a141,_0x203b61){return function(_0x18699e){if(_0x18699e){return _0x18699e[_0x0418('0x21')]()[_0x0418('0x20')](function(){var _0x26b61c=_0x18699e['get']({'plain':!![]});var _0x3a94f8=_0x0418('0x22');return db['UserProfileResource'][_0x0418('0x21')]({'where':{'type':_0x3a94f8,'resourceId':_0x26b61c['id']}})[_0x0418('0x20')](function(){return _0x18699e;});})[_0x0418('0x20')](function(){_0x23a141[_0x0418('0x18')](0xcc)[_0x0418('0x19')]();});}};}function handleEntityNotFound(_0x1d7bb3,_0x5ce90a){return function(_0x24d2a7){if(!_0x24d2a7){_0x1d7bb3['sendStatus'](0x194);}return _0x24d2a7;};}function handleError(_0x48c242,_0x310981){_0x310981=_0x310981||0x1f4;return function(_0x5eae5d){logger['error'](_0x5eae5d[_0x0418('0x23')]);if(_0x5eae5d['name']){delete _0x5eae5d[_0x0418('0x24')];}_0x48c242[_0x0418('0x18')](_0x310981)[_0x0418('0x25')](_0x5eae5d);};}exports[_0x0418('0x26')]=function(_0x35273d,_0xeca73e){var _0x50899c={},_0x2fc259={},_0x2f9116={'count':0x0,'rows':[]};var _0x42ac5a=_[_0x0418('0x27')](db['Interval']['rawAttributes'],function(_0x19f02f){return{'name':_0x19f02f[_0x0418('0x28')],'type':_0x19f02f['type']['key']};});_0x2fc259[_0x0418('0x29')]=_[_0x0418('0x27')](_0x42ac5a,_0x0418('0x24'));_0x2fc259[_0x0418('0x2a')]=_[_0x0418('0x2b')](_0x35273d[_0x0418('0x2a')]);_0x2fc259['filters']=_[_0x0418('0x2c')](_0x2fc259[_0x0418('0x29')],_0x2fc259['query']);_0x50899c['attributes']=_[_0x0418('0x2c')](_0x2fc259['model'],qs[_0x0418('0x2d')](_0x35273d[_0x0418('0x2a')][_0x0418('0x2d')]));_0x50899c[_0x0418('0x2e')]=_0x50899c[_0x0418('0x2e')]['length']?_0x50899c[_0x0418('0x2e')]:_0x2fc259['model'];if(!_0x35273d[_0x0418('0x2a')][_0x0418('0x2f')]('nolimit')){_0x50899c[_0x0418('0x1b')]=qs[_0x0418('0x1b')](_0x35273d[_0x0418('0x2a')][_0x0418('0x1b')]);_0x50899c[_0x0418('0x1d')]=qs[_0x0418('0x1d')](_0x35273d['query'][_0x0418('0x1d')]);}_0x50899c[_0x0418('0x30')]=qs['sort'](_0x35273d[_0x0418('0x2a')][_0x0418('0x31')]);_0x50899c[_0x0418('0x32')]=qs[_0x0418('0x33')](_['pick'](_0x35273d[_0x0418('0x2a')],_0x2fc259['filters']),_0x42ac5a);if(_0x35273d[_0x0418('0x2a')][_0x0418('0x34')]){_0x50899c[_0x0418('0x32')]=_[_0x0418('0x35')](_0x50899c['where'],{'$or':_[_0x0418('0x27')](_0x42ac5a,function(_0x9e1d48){if(_0x9e1d48[_0x0418('0x36')]!==_0x0418('0x37')){var _0x3f7662={};_0x3f7662[_0x9e1d48['name']]={'$like':'%'+_0x35273d[_0x0418('0x2a')][_0x0418('0x34')]+'%'};return _0x3f7662;}})});}_0x50899c=_['merge']({},_0x50899c,_0x35273d[_0x0418('0x38')]);var _0xf8d93d={'where':_0x50899c[_0x0418('0x32')]};return db['Interval']['count'](_0xf8d93d)[_0x0418('0x20')](function(_0x452641){_0x2f9116[_0x0418('0x1c')]=_0x452641;if(_0x35273d[_0x0418('0x2a')][_0x0418('0x39')]){_0x50899c[_0x0418('0x3a')]=[{'all':!![]}];}return db[_0x0418('0x3b')][_0x0418('0x3c')](_0x50899c);})[_0x0418('0x20')](function(_0x32dd71){_0x2f9116[_0x0418('0x3d')]=_0x32dd71;return _0x2f9116;})['then'](respondWithFilteredResult(_0xeca73e,_0x50899c))[_0x0418('0x3e')](handleError(_0xeca73e,null));};exports[_0x0418('0x3f')]=function(_0x32220f,_0x4672e6){var _0x1125d3={'raw':!![],'where':{'id':_0x32220f[_0x0418('0x40')]['id']}},_0x46a27f={};_0x46a27f['model']=_[_0x0418('0x2b')](db['Interval'][_0x0418('0x41')]);_0x46a27f[_0x0418('0x2a')]=_[_0x0418('0x2b')](_0x32220f[_0x0418('0x2a')]);_0x46a27f[_0x0418('0x33')]=_[_0x0418('0x2c')](_0x46a27f[_0x0418('0x29')],_0x46a27f[_0x0418('0x2a')]);_0x1125d3[_0x0418('0x2e')]=_[_0x0418('0x2c')](_0x46a27f[_0x0418('0x29')],qs[_0x0418('0x2d')](_0x32220f[_0x0418('0x2a')]['fields']));_0x1125d3[_0x0418('0x2e')]=_0x1125d3[_0x0418('0x2e')]['length']?_0x1125d3[_0x0418('0x2e')]:_0x46a27f['model'];if(_0x32220f['query']['includeAll']){_0x1125d3[_0x0418('0x3a')]=[{'all':!![]}];}_0x1125d3=_['merge']({},_0x1125d3,_0x32220f[_0x0418('0x38')]);return db['Interval']['find'](_0x1125d3)[_0x0418('0x20')](handleEntityNotFound(_0x4672e6,null))[_0x0418('0x20')](respondWithResult(_0x4672e6,null))[_0x0418('0x3e')](handleError(_0x4672e6,null));};exports[_0x0418('0x42')]=function(_0x1c2b18,_0x237192){return db[_0x0418('0x3b')][_0x0418('0x42')](_0x1c2b18['body'],{})[_0x0418('0x20')](function(_0x2897a6){var _0x46130a=_0x1c2b18[_0x0418('0x43')][_0x0418('0x44')]({'plain':!![]});if(!_0x46130a)throw new Error(_0x0418('0x45'));if(_0x46130a['role']==='user'){var _0x231868=_0x2897a6[_0x0418('0x44')]({'plain':!![]});var _0x9b3732='Intervals';return db[_0x0418('0x46')][_0x0418('0x47')]({'where':{'name':_0x9b3732,'userProfileId':_0x46130a[_0x0418('0x48')]},'raw':!![]})['then'](function(_0x25125f){if(_0x25125f&&_0x25125f['autoAssociation']===0x0){return db['UserProfileResource']['create']({'name':_0x231868[_0x0418('0x24')],'resourceId':_0x231868['id'],'type':_0x25125f[_0x0418('0x24')],'sectionId':_0x25125f['id']},{})[_0x0418('0x20')](function(){return _0x2897a6;});}else{return _0x2897a6;}})['catch'](function(_0x18516f){logger['error'](_0x0418('0x49'),_0x18516f);throw _0x18516f;});}return _0x2897a6;})[_0x0418('0x20')](respondWithResult(_0x237192,0xc9))['catch'](handleError(_0x237192,null));};exports[_0x0418('0x1f')]=function(_0x4e33b7,_0x21287d){if(_0x4e33b7[_0x0418('0x4a')]['id']){delete _0x4e33b7[_0x0418('0x4a')]['id'];}return db[_0x0418('0x3b')][_0x0418('0x47')]({'where':{'id':_0x4e33b7[_0x0418('0x40')]['id']}})[_0x0418('0x20')](handleEntityNotFound(_0x21287d,null))[_0x0418('0x20')](saveUpdates(_0x4e33b7[_0x0418('0x4a')],null))['then'](respondWithResult(_0x21287d,null))[_0x0418('0x3e')](handleError(_0x21287d,null));};exports['destroy']=function(_0x1280b3,_0x533f30){return db['Interval'][_0x0418('0x47')]({'where':{'id':_0x1280b3[_0x0418('0x40')]['id']}})['then'](handleEntityNotFound(_0x533f30,null))['then'](removeEntity(_0x533f30,null))[_0x0418('0x3e')](handleError(_0x533f30,null));};exports[_0x0418('0x4b')]=function(_0x6ca55d,_0x546807,_0x48fb5c){if(_0x6ca55d['body']['id']){delete _0x6ca55d['body']['id'];}return db['Interval'][_0x0418('0x47')]({'where':{'id':_0x6ca55d[_0x0418('0x40')]['id']}})['then'](handleEntityNotFound(_0x546807,null))[_0x0418('0x20')](function(_0x30f461){if(_0x30f461){_0x6ca55d[_0x0418('0x4a')][_0x0418('0x4c')]=_0x30f461['id'];return db[_0x0418('0x3b')][_0x0418('0x42')](_0x6ca55d[_0x0418('0x4a')]);}})[_0x0418('0x20')](respondWithResult(_0x546807,null))[_0x0418('0x3e')](handleError(_0x546807,null));};exports[_0x0418('0x4d')]=function(_0x485811,_0x5d4baa,_0x141abd){var _0x5ce450={};var _0x1e13f5={};var _0x254d09;var _0x307786;return db['Interval']['findOne']({'where':{'id':_0x485811['params']['id']}})[_0x0418('0x20')](handleEntityNotFound(_0x5d4baa,null))[_0x0418('0x20')](function(_0x5b2743){if(_0x5b2743){_0x254d09=_0x5b2743;_0x1e13f5[_0x0418('0x29')]=_[_0x0418('0x2b')](db['Interval'][_0x0418('0x41')]);_0x1e13f5[_0x0418('0x2a')]=_[_0x0418('0x2b')](_0x485811[_0x0418('0x2a')]);_0x1e13f5[_0x0418('0x33')]=_[_0x0418('0x2c')](_0x1e13f5['model'],_0x1e13f5[_0x0418('0x2a')]);_0x5ce450[_0x0418('0x2e')]=_[_0x0418('0x2c')](_0x1e13f5[_0x0418('0x29')],qs[_0x0418('0x2d')](_0x485811[_0x0418('0x2a')][_0x0418('0x2d')]));_0x5ce450[_0x0418('0x2e')]=_0x5ce450[_0x0418('0x2e')][_0x0418('0x4e')]?_0x5ce450['attributes']:_0x1e13f5[_0x0418('0x29')];_0x5ce450[_0x0418('0x30')]=qs[_0x0418('0x31')](_0x485811[_0x0418('0x2a')]['sort']);_0x5ce450[_0x0418('0x32')]=qs[_0x0418('0x33')](_[_0x0418('0x4f')](_0x485811[_0x0418('0x2a')],_0x1e13f5[_0x0418('0x33')]));if(_0x485811['query'][_0x0418('0x34')]){_0x5ce450[_0x0418('0x32')]=_[_0x0418('0x35')](_0x5ce450[_0x0418('0x32')],{'$or':_[_0x0418('0x27')](_0x5ce450[_0x0418('0x2e')],function(_0x1e263a){var _0x409b30={};_0x409b30[_0x1e263a]={'$like':'%'+_0x485811[_0x0418('0x2a')][_0x0418('0x34')]+'%'};return _0x409b30;})});}_0x5ce450=_[_0x0418('0x35')]({},_0x5ce450,_0x485811[_0x0418('0x38')]);return _0x254d09[_0x0418('0x4d')](_0x5ce450);}})['then'](function(_0x5adee7){if(_0x5adee7){_0x307786=_0x5adee7[_0x0418('0x4e')];if(!_0x485811[_0x0418('0x2a')][_0x0418('0x2f')](_0x0418('0x50'))){_0x5ce450[_0x0418('0x1b')]=qs['limit'](_0x485811[_0x0418('0x2a')][_0x0418('0x1b')]);_0x5ce450[_0x0418('0x1d')]=qs[_0x0418('0x1d')](_0x485811[_0x0418('0x2a')]['offset']);}return _0x254d09['getIntervals'](_0x5ce450);}})[_0x0418('0x20')](function(_0x566fe){if(_0x566fe){return _0x566fe?{'count':_0x307786,'rows':_0x566fe}:null;}})['then'](respondWithResult(_0x5d4baa,null))['catch'](handleError(_0x5d4baa,null));};exports['addIntervals']=function(_0x11d413,_0x2fb8bd,_0x411af0){return db[_0x0418('0x3b')][_0x0418('0x51')]({'where':{'id':_0x11d413[_0x0418('0x40')]['id']}})[_0x0418('0x20')](handleEntityNotFound(_0x2fb8bd,null))[_0x0418('0x20')](function(_0xc15860){if(_0xc15860){return db['sequelize'][_0x0418('0x52')](function(_0x2cd638){return db[_0x0418('0x3b')][_0x0418('0x21')]({'where':{'IntervalId':_0x11d413[_0x0418('0x40')]['id']},'transaction':_0x2cd638})[_0x0418('0x20')](function(_0x3fb1a3){var _0x159203=_['map'](_0x11d413['body'],function(_0xabc81a){delete _0xabc81a['id'];_0xabc81a['IntervalId']=_0x11d413[_0x0418('0x40')]['id'];return _0xabc81a;});return db['Interval'][_0x0418('0x53')](_0x159203,{'transaction':_0x2cd638});});})[_0x0418('0x20')](function(){return db[_0x0418('0x3b')][_0x0418('0x3c')]({'where':{'IntervalId':_0x11d413[_0x0418('0x40')]['id']}});});}})[_0x0418('0x20')](respondWithResult(_0x2fb8bd,null))[_0x0418('0x3e')](handleError(_0x2fb8bd,null));}; \ No newline at end of file diff --git a/server/api/interval/interval.model.js b/server/api/interval/interval.model.js index 0feb59e..4cd6dc5 100644 --- a/server/api/interval/interval.model.js +++ b/server/api/interval/interval.model.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x0e47=['define','Interval','tools_intervals','rewrite','interval','string','getIntervals','then','all','ifTime','reduce','../../components/extensions/rewrite','../../utils/iftime','iftime','exports'];(function(_0x847c89,_0x49e32e){var _0x529175=function(_0x57df0c){while(--_0x57df0c){_0x847c89['push'](_0x847c89['shift']());}};_0x529175(++_0x49e32e);}(_0x0e47,0xdd));var _0x70e4=function(_0x262c39,_0x14b574){_0x262c39=_0x262c39-0x0;var _0x371d00=_0x0e47[_0x262c39];return _0x371d00;};'use strict';var attributes=require('./interval.attributes');var extensions=require(_0x70e4('0x0'));var iftime=require(_0x70e4('0x1'))[_0x70e4('0x2')];module[_0x70e4('0x3')]=function(_0xaf5939){return _0xaf5939[_0x70e4('0x4')](_0x70e4('0x5'),attributes,{'tableName':_0x70e4('0x6'),'paranoid':![],'indexes':[],'timestamps':!![],'hooks':{'afterCreate':function(_0x34d2d3){extensions[_0x70e4('0x7')](_0xaf5939,_0x34d2d3);},'afterBulkCreate':function(_0x12714a,_0x1d1a8c,_0x380f22){_0x380f22();extensions[_0x70e4('0x7')](_0xaf5939,_0x12714a[0x0]);},'afterUpdate':function(_0x1eaeea){extensions[_0x70e4('0x7')](_0xaf5939,_0x1eaeea);},'afterDestroy':function(_0x378490){extensions['rewrite'](_0xaf5939,_0x378490);}},'instanceMethods':{'ifTime':function(_0x1f4a69=undefined,_0x16365c=new Date()){if(typeof this[_0x70e4('0x8')]===_0x70e4('0x9')){return iftime(this[_0x70e4('0x8')],_0x1f4a69,_0x16365c);}else{return this[_0x70e4('0xa')]()[_0x70e4('0xb')](function(_0x3039d7){return Promise[_0x70e4('0xc')](_0x3039d7['map'](function(_0x24c968){return _0x24c968[_0x70e4('0xd')](_0x1f4a69,_0x16365c);}));})[_0x70e4('0xb')](function(_0x4184cb){return _0x4184cb[_0x70e4('0xe')](function(_0x4f3aef,_0x2062c3){return _0x4f3aef||_0x2062c3;},![]);});}}}});}; \ No newline at end of file +var _0xa354=['iftime','exports','Interval','tools_intervals','rewrite','interval','getIntervals','then','all','map','../../components/extensions/rewrite','../../utils/iftime'];(function(_0x2c83a3,_0x4dcd84){var _0x1efdc1=function(_0x2b42ad){while(--_0x2b42ad){_0x2c83a3['push'](_0x2c83a3['shift']());}};_0x1efdc1(++_0x4dcd84);}(_0xa354,0x6a));var _0x4a35=function(_0x291501,_0x3116c0){_0x291501=_0x291501-0x0;var _0x5a8084=_0xa354[_0x291501];return _0x5a8084;};'use strict';var attributes=require('./interval.attributes');var extensions=require(_0x4a35('0x0'));var iftime=require(_0x4a35('0x1'))[_0x4a35('0x2')];module[_0x4a35('0x3')]=function(_0x2ca22d){return _0x2ca22d['define'](_0x4a35('0x4'),attributes,{'tableName':_0x4a35('0x5'),'paranoid':![],'indexes':[],'timestamps':!![],'hooks':{'afterCreate':function(_0x1139b2){extensions[_0x4a35('0x6')](_0x2ca22d,_0x1139b2);},'afterBulkCreate':function(_0x4528b4,_0x21520b,_0x1d1cea){_0x1d1cea();extensions[_0x4a35('0x6')](_0x2ca22d,_0x4528b4[0x0]);},'afterUpdate':function(_0x21fc35){extensions[_0x4a35('0x6')](_0x2ca22d,_0x21fc35);},'afterDestroy':function(_0x524765){extensions[_0x4a35('0x6')](_0x2ca22d,_0x524765);}},'instanceMethods':{'ifTime':function(_0x336f89=undefined,_0x2d1186=new Date()){if(typeof this[_0x4a35('0x7')]==='string'){return iftime(this['interval'],_0x336f89,_0x2d1186);}else{return this[_0x4a35('0x8')]()[_0x4a35('0x9')](function(_0x5df2ea){return Promise[_0x4a35('0xa')](_0x5df2ea[_0x4a35('0xb')](function(_0x15b2ad){return _0x15b2ad['ifTime'](_0x336f89,_0x2d1186);}));})[_0x4a35('0x9')](function(_0xacca38){return _0xacca38['reduce'](function(_0x288a18,_0x1c14c0){return _0x288a18||_0x1c14c0;},![]);});}}}});}; \ No newline at end of file diff --git a/server/api/interval/interval.rpc.js b/server/api/interval/interval.rpc.js index 3f553cb..0567954 100644 --- a/server/api/interval/interval.rpc.js +++ b/server/api/interval/interval.rpc.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x1a26=['timezone','length','IntervalIftime:\x20interval\x20strings\x20=\x20%s','IntervalIftime:\x20timezone\x20=\x20%s','Iftime','silly','reduce','util','../../mysqldb','../../utils/iftime','iftime','rpc','GetInterval','Interval','findAll','options','raw','where','attributes','include','model','map','then','info','debug','stringify','error','message','ShowInterval','find','catch','ifTime','format','name','join','findById','IntervalIftime:\x20interval\x20=\x20%s\x20(id\x20=\x20%s)','IntervalIftime','intervalIds','isArray','intervals','string'];(function(_0xe8830,_0x79b413){var _0x23bdaf=function(_0x290a0b){while(--_0x290a0b){_0xe8830['push'](_0xe8830['shift']());}};_0x23bdaf(++_0x79b413);}(_0x1a26,0x1d5));var _0x61a2=function(_0x500419,_0x549162){_0x500419=_0x500419-0x0;var _0x241c1a=_0x1a26[_0x500419];return _0x241c1a;};'use strict';var _=require('lodash');var util=require(_0x61a2('0x0'));var db=require(_0x61a2('0x1'))['db'];var iftime=require(_0x61a2('0x2'))[_0x61a2('0x3')];var logger=require('../../config/logger')(_0x61a2('0x4'));exports[_0x61a2('0x5')]=function(_0xe6f30c){var _0x48c93a=this;return new Promise(function(_0x36dba8,_0x4eb906){return db[_0x61a2('0x6')][_0x61a2('0x7')]({'raw':_0xe6f30c[_0x61a2('0x8')]?_0xe6f30c[_0x61a2('0x8')][_0x61a2('0x9')]===undefined?!![]:![]:!![],'where':_0xe6f30c['options']?_0xe6f30c[_0x61a2('0x8')][_0x61a2('0xa')]||null:null,'attributes':_0xe6f30c[_0x61a2('0x8')]?_0xe6f30c[_0x61a2('0x8')][_0x61a2('0xb')]||null:null,'limit':_0xe6f30c['options']?_0xe6f30c[_0x61a2('0x8')]['limit']||null:null,'include':_0xe6f30c[_0x61a2('0x8')]?_0xe6f30c[_0x61a2('0x8')][_0x61a2('0xc')]?_['map'](_0xe6f30c[_0x61a2('0x8')][_0x61a2('0xc')],function(_0x24d6b2){return{'model':db[_0x24d6b2[_0x61a2('0xd')]],'as':_0x24d6b2['as'],'attributes':_0x24d6b2[_0x61a2('0xb')],'include':_0x24d6b2[_0x61a2('0xc')]?_[_0x61a2('0xe')](_0x24d6b2['include'],function(_0x3789f5){return{'model':db[_0x3789f5[_0x61a2('0xd')]],'as':_0x3789f5['as'],'attributes':_0x3789f5[_0x61a2('0xb')],'include':_0x3789f5[_0x61a2('0xc')]?_[_0x61a2('0xe')](_0x3789f5[_0x61a2('0xc')],function(_0x25be94){return{'model':db[_0x25be94[_0x61a2('0xd')]],'as':_0x25be94['as'],'attributes':_0x25be94[_0x61a2('0xb')]};}):[]};}):[]};}):[]:[]})[_0x61a2('0xf')](function(_0x269208){logger[_0x61a2('0x10')](_0x61a2('0x5'),_0xe6f30c);logger[_0x61a2('0x11')](_0x61a2('0x5'),_0xe6f30c,JSON[_0x61a2('0x12')](_0x269208));_0x36dba8(_0x269208);})['catch'](function(_0x460dba){logger[_0x61a2('0x13')](_0x61a2('0x5'),_0x460dba['message'],_0xe6f30c);_0x4eb906(_0x48c93a[_0x61a2('0x13')](0x1f4,_0x460dba[_0x61a2('0x14')]));});});};exports[_0x61a2('0x15')]=function(_0x4d291e){var _0x21e547=this;return new Promise(function(_0x108252,_0x3c466d){return db[_0x61a2('0x6')][_0x61a2('0x16')]({'raw':_0x4d291e[_0x61a2('0x8')]?_0x4d291e[_0x61a2('0x8')][_0x61a2('0x9')]===undefined?!![]:![]:!![],'where':_0x4d291e['options']?_0x4d291e[_0x61a2('0x8')]['where']||null:null,'attributes':_0x4d291e[_0x61a2('0x8')]?_0x4d291e[_0x61a2('0x8')]['attributes']||null:null,'include':_0x4d291e['options']?_0x4d291e[_0x61a2('0x8')][_0x61a2('0xc')]?_[_0x61a2('0xe')](_0x4d291e['options'][_0x61a2('0xc')],function(_0x1fce47){return{'model':db[_0x1fce47[_0x61a2('0xd')]],'as':_0x1fce47['as'],'attributes':_0x1fce47['attributes'],'include':_0x1fce47['include']?_[_0x61a2('0xe')](_0x1fce47[_0x61a2('0xc')],function(_0x1f77f0){return{'model':db[_0x1f77f0[_0x61a2('0xd')]],'as':_0x1f77f0['as'],'attributes':_0x1f77f0[_0x61a2('0xb')],'include':_0x1f77f0[_0x61a2('0xc')]?_[_0x61a2('0xe')](_0x1f77f0[_0x61a2('0xc')],function(_0x244889){return{'model':db[_0x244889[_0x61a2('0xd')]],'as':_0x244889['as'],'attributes':_0x244889[_0x61a2('0xb')]};}):[]};}):[]};}):[]:[]})[_0x61a2('0xf')](function(_0x353e42){logger[_0x61a2('0x10')](_0x61a2('0x15'),_0x4d291e);logger[_0x61a2('0x11')](_0x61a2('0x15'),_0x4d291e,JSON[_0x61a2('0x12')](_0x353e42));_0x108252(_0x353e42);})[_0x61a2('0x17')](function(_0x370284){logger[_0x61a2('0x13')](_0x61a2('0x15'),_0x370284['message'],_0x4d291e);_0x3c466d(_0x21e547[_0x61a2('0x13')](0x1f4,_0x370284[_0x61a2('0x14')]));});});};function checkArrayOfIntervals(_0x42b011,_0x51bafb){var _0x1bd682=[];return db[_0x61a2('0x6')][_0x61a2('0x7')]({'where':{'id':_0x42b011}})[_0x61a2('0xf')](function(_0x428654){_0x1bd682=_0x428654;return Promise['all'](_0x1bd682['map'](function(_0x2f0380){return _0x2f0380[_0x61a2('0x18')](_0x51bafb);}));})[_0x61a2('0xf')](function(_0x203652){var _0x3b1dad=_0x203652['reduce'](function(_0x48f7b5,_0x8a4aed){return _0x48f7b5||_0x8a4aed;},![]);logger['info'](util[_0x61a2('0x19')]('IntervalIftime:\x20intervals\x20=\x20%s\x20(ids\x20=\x20%s)',_0x1bd682['map'](function(_0x166f19){return _0x166f19[_0x61a2('0x1a')];})[_0x61a2('0x1b')](',\x20'),_0x1bd682[_0x61a2('0xe')](function(_0xe2dbfe){return _0xe2dbfe['id'];})[_0x61a2('0x1b')](',\x20')));return _0x3b1dad;});}function checkSingleInterval(_0x50da1f,_0x6835be){return db[_0x61a2('0x6')][_0x61a2('0x1c')](_0x50da1f)[_0x61a2('0xf')](function(_0x5c0bee){if(_0x5c0bee){logger[_0x61a2('0x10')](util[_0x61a2('0x19')](_0x61a2('0x1d'),_0x5c0bee[_0x61a2('0x1a')],_0x5c0bee['id']));return _0x5c0bee[_0x61a2('0x18')](_0x6835be);}});}exports[_0x61a2('0x1e')]=function(_0x3b7277){var _0x4a4b7a=_0x3b7277[_0x61a2('0x1f')];var _0x14b62f=Array[_0x61a2('0x20')](_0x3b7277[_0x61a2('0x21')])?_0x3b7277[_0x61a2('0x21')]:typeof _0x3b7277[_0x61a2('0x21')]===_0x61a2('0x22')?[_0x3b7277['intervals']]:[];var _0x70384f=_0x3b7277[_0x61a2('0x23')]||undefined;var _0x20aa3b=![];if(_0x14b62f[_0x61a2('0x24')]){logger[_0x61a2('0x10')](util[_0x61a2('0x19')](_0x61a2('0x25'),_0x14b62f[_0x61a2('0x1b')](';\x20')));}if(_0x70384f){logger[_0x61a2('0x10')](util[_0x61a2('0x19')](_0x61a2('0x26'),_0x70384f));}logger[_0x61a2('0x11')](_0x61a2('0x27'),_0x20aa3b);logger[_0x61a2('0x28')](_0x61a2('0x1e'),_0x3b7277);return Promise['resolve']()[_0x61a2('0xf')](function(){if(Array[_0x61a2('0x20')](_0x4a4b7a)){return checkArrayOfIntervals(_0x4a4b7a,_0x70384f);}else if(_0x4a4b7a){return checkSingleInterval(_0x4a4b7a,_0x70384f);}})[_0x61a2('0xf')](function(_0x4fe360){var _0x53899d=_0x14b62f[_0x61a2('0x29')](function(_0x597285,_0x435508){return _0x597285||iftime(_0x435508,_0x70384f);},![]);_0x20aa3b=_0x4fe360||_0x53899d;return _0x20aa3b;})[_0x61a2('0x17')](function(_0x1295f7){logger[_0x61a2('0x13')](_0x61a2('0x1e'),_0x3b7277,_0x1295f7);throw this[_0x61a2('0x13')](0x1f4,_0x1295f7[_0x61a2('0x14')]);});}; \ No newline at end of file +var _0xb239=['include','map','model','info','debug','stringify','catch','message','error','ShowInterval','find','then','all','ifTime','reduce','format','join','findById','IntervalIftime:\x20interval\x20=\x20%s\x20(id\x20=\x20%s)','name','intervals','length','IntervalIftime:\x20interval\x20strings\x20=\x20%s','IntervalIftime:\x20timezone\x20=\x20%s','silly','IntervalIftime','resolve','isArray','lodash','../../mysqldb','../../utils/iftime','iftime','../../config/logger','GetInterval','Interval','findAll','options','raw','where','attributes','limit'];(function(_0xa6a39c,_0x3fb727){var _0x4e5ff8=function(_0x271baa){while(--_0x271baa){_0xa6a39c['push'](_0xa6a39c['shift']());}};_0x4e5ff8(++_0x3fb727);}(_0xb239,0x112));var _0x9b23=function(_0x5cf76b,_0xfbf968){_0x5cf76b=_0x5cf76b-0x0;var _0x50d61f=_0xb239[_0x5cf76b];return _0x50d61f;};'use strict';var _=require(_0x9b23('0x0'));var util=require('util');var db=require(_0x9b23('0x1'))['db'];var iftime=require(_0x9b23('0x2'))[_0x9b23('0x3')];var logger=require(_0x9b23('0x4'))('rpc');exports[_0x9b23('0x5')]=function(_0x208fcc){var _0x1b53f0=this;return new Promise(function(_0x37f5a4,_0x4a426d){return db[_0x9b23('0x6')][_0x9b23('0x7')]({'raw':_0x208fcc[_0x9b23('0x8')]?_0x208fcc[_0x9b23('0x8')][_0x9b23('0x9')]===undefined?!![]:![]:!![],'where':_0x208fcc[_0x9b23('0x8')]?_0x208fcc[_0x9b23('0x8')][_0x9b23('0xa')]||null:null,'attributes':_0x208fcc[_0x9b23('0x8')]?_0x208fcc[_0x9b23('0x8')][_0x9b23('0xb')]||null:null,'limit':_0x208fcc['options']?_0x208fcc[_0x9b23('0x8')][_0x9b23('0xc')]||null:null,'include':_0x208fcc[_0x9b23('0x8')]?_0x208fcc[_0x9b23('0x8')][_0x9b23('0xd')]?_[_0x9b23('0xe')](_0x208fcc[_0x9b23('0x8')]['include'],function(_0x5e947a){return{'model':db[_0x5e947a[_0x9b23('0xf')]],'as':_0x5e947a['as'],'attributes':_0x5e947a['attributes'],'include':_0x5e947a[_0x9b23('0xd')]?_[_0x9b23('0xe')](_0x5e947a['include'],function(_0x3da30d){return{'model':db[_0x3da30d[_0x9b23('0xf')]],'as':_0x3da30d['as'],'attributes':_0x3da30d['attributes'],'include':_0x3da30d['include']?_['map'](_0x3da30d[_0x9b23('0xd')],function(_0x1a89b6){return{'model':db[_0x1a89b6[_0x9b23('0xf')]],'as':_0x1a89b6['as'],'attributes':_0x1a89b6[_0x9b23('0xb')]};}):[]};}):[]};}):[]:[]})['then'](function(_0x333a77){logger[_0x9b23('0x10')]('GetInterval',_0x208fcc);logger[_0x9b23('0x11')](_0x9b23('0x5'),_0x208fcc,JSON[_0x9b23('0x12')](_0x333a77));_0x37f5a4(_0x333a77);})[_0x9b23('0x13')](function(_0x39ea7a){logger['error'](_0x9b23('0x5'),_0x39ea7a[_0x9b23('0x14')],_0x208fcc);_0x4a426d(_0x1b53f0[_0x9b23('0x15')](0x1f4,_0x39ea7a[_0x9b23('0x14')]));});});};exports[_0x9b23('0x16')]=function(_0x49dee5){var _0x45fbf5=this;return new Promise(function(_0x165bf3,_0x453e11){return db[_0x9b23('0x6')][_0x9b23('0x17')]({'raw':_0x49dee5[_0x9b23('0x8')]?_0x49dee5['options'][_0x9b23('0x9')]===undefined?!![]:![]:!![],'where':_0x49dee5['options']?_0x49dee5[_0x9b23('0x8')][_0x9b23('0xa')]||null:null,'attributes':_0x49dee5[_0x9b23('0x8')]?_0x49dee5[_0x9b23('0x8')]['attributes']||null:null,'include':_0x49dee5['options']?_0x49dee5[_0x9b23('0x8')][_0x9b23('0xd')]?_['map'](_0x49dee5[_0x9b23('0x8')][_0x9b23('0xd')],function(_0xce6873){return{'model':db[_0xce6873[_0x9b23('0xf')]],'as':_0xce6873['as'],'attributes':_0xce6873[_0x9b23('0xb')],'include':_0xce6873[_0x9b23('0xd')]?_[_0x9b23('0xe')](_0xce6873[_0x9b23('0xd')],function(_0x527b5f){return{'model':db[_0x527b5f[_0x9b23('0xf')]],'as':_0x527b5f['as'],'attributes':_0x527b5f['attributes'],'include':_0x527b5f[_0x9b23('0xd')]?_['map'](_0x527b5f[_0x9b23('0xd')],function(_0x42888e){return{'model':db[_0x42888e['model']],'as':_0x42888e['as'],'attributes':_0x42888e[_0x9b23('0xb')]};}):[]};}):[]};}):[]:[]})[_0x9b23('0x18')](function(_0x1e51b0){logger[_0x9b23('0x10')](_0x9b23('0x16'),_0x49dee5);logger[_0x9b23('0x11')](_0x9b23('0x16'),_0x49dee5,JSON[_0x9b23('0x12')](_0x1e51b0));_0x165bf3(_0x1e51b0);})[_0x9b23('0x13')](function(_0x27a2b6){logger[_0x9b23('0x15')]('ShowInterval',_0x27a2b6['message'],_0x49dee5);_0x453e11(_0x45fbf5[_0x9b23('0x15')](0x1f4,_0x27a2b6[_0x9b23('0x14')]));});});};function checkArrayOfIntervals(_0x5f26f0,_0x3de815){var _0x279c1c=[];return db[_0x9b23('0x6')][_0x9b23('0x7')]({'where':{'id':_0x5f26f0}})[_0x9b23('0x18')](function(_0x26705f){_0x279c1c=_0x26705f;return Promise[_0x9b23('0x19')](_0x279c1c[_0x9b23('0xe')](function(_0x4a138a){return _0x4a138a[_0x9b23('0x1a')](_0x3de815);}));})['then'](function(_0x4b1fa2){var _0xae449a=_0x4b1fa2[_0x9b23('0x1b')](function(_0x3c5f55,_0x492717){return _0x3c5f55||_0x492717;},![]);logger[_0x9b23('0x10')](util[_0x9b23('0x1c')]('IntervalIftime:\x20intervals\x20=\x20%s\x20(ids\x20=\x20%s)',_0x279c1c[_0x9b23('0xe')](function(_0x49033a){return _0x49033a['name'];})[_0x9b23('0x1d')](',\x20'),_0x279c1c[_0x9b23('0xe')](function(_0x431815){return _0x431815['id'];})[_0x9b23('0x1d')](',\x20')));return _0xae449a;});}function checkSingleInterval(_0x1d2f49,_0x7f35e){return db['Interval'][_0x9b23('0x1e')](_0x1d2f49)[_0x9b23('0x18')](function(_0x397432){if(_0x397432){logger['info'](util[_0x9b23('0x1c')](_0x9b23('0x1f'),_0x397432[_0x9b23('0x20')],_0x397432['id']));return _0x397432[_0x9b23('0x1a')](_0x7f35e);}});}exports['IntervalIftime']=function(_0x5e20a2){var _0x11de5a=_0x5e20a2['intervalIds'];var _0x20eec3=Array['isArray'](_0x5e20a2[_0x9b23('0x21')])?_0x5e20a2[_0x9b23('0x21')]:typeof _0x5e20a2[_0x9b23('0x21')]==='string'?[_0x5e20a2[_0x9b23('0x21')]]:[];var _0x22506b=_0x5e20a2['timezone']||undefined;var _0x3b07e5=![];if(_0x20eec3[_0x9b23('0x22')]){logger[_0x9b23('0x10')](util[_0x9b23('0x1c')](_0x9b23('0x23'),_0x20eec3[_0x9b23('0x1d')](';\x20')));}if(_0x22506b){logger[_0x9b23('0x10')](util[_0x9b23('0x1c')](_0x9b23('0x24'),_0x22506b));}logger[_0x9b23('0x11')]('Iftime',_0x3b07e5);logger[_0x9b23('0x25')](_0x9b23('0x26'),_0x5e20a2);return Promise[_0x9b23('0x27')]()[_0x9b23('0x18')](function(){if(Array[_0x9b23('0x28')](_0x11de5a)){return checkArrayOfIntervals(_0x11de5a,_0x22506b);}else if(_0x11de5a){return checkSingleInterval(_0x11de5a,_0x22506b);}})[_0x9b23('0x18')](function(_0x11445f){var _0x10aaea=_0x20eec3[_0x9b23('0x1b')](function(_0x129079,_0x2c8517){return _0x129079||iftime(_0x2c8517,_0x22506b);},![]);_0x3b07e5=_0x11445f||_0x10aaea;return _0x3b07e5;})[_0x9b23('0x13')](function(_0x444fb0){logger[_0x9b23('0x15')](_0x9b23('0x26'),_0x5e20a2,_0x444fb0);throw this['error'](0x1f4,_0x444fb0[_0x9b23('0x14')]);});}; \ No newline at end of file diff --git a/server/api/jira/index.js b/server/api/jira/index.js index d930fc1..44efa93 100644 --- a/server/api/jira/index.js +++ b/server/api/jira/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x2032=['isAuthenticated','send','Router','../../components/auth/service','./jira.controller'];(function(_0x1aa2e7,_0x14c3e0){var _0x1470d9=function(_0x2c0f42){while(--_0x2c0f42){_0x1aa2e7['push'](_0x1aa2e7['shift']());}};_0x1470d9(++_0x14c3e0);}(_0x2032,0xd9));var _0x2203=function(_0x359ff7,_0x3d5f5b){_0x359ff7=_0x359ff7-0x0;var _0x2fcdef=_0x2032[_0x359ff7];return _0x2fcdef;};'use strict';var express=require('express');var router=express[_0x2203('0x0')]();var auth=require(_0x2203('0x1'));var controller=require(_0x2203('0x2'));router['post']('/',auth[_0x2203('0x3')](),controller[_0x2203('0x4')]);module['exports']=router; \ No newline at end of file +var _0x0b0e=['exports','express','../../components/auth/service','post','isAuthenticated','send'];(function(_0x16b9ed,_0x56517a){var _0x66b1f8=function(_0x1c883){while(--_0x1c883){_0x16b9ed['push'](_0x16b9ed['shift']());}};_0x66b1f8(++_0x56517a);}(_0x0b0e,0x187));var _0xe0b0=function(_0x485865,_0x11d29a){_0x485865=_0x485865-0x0;var _0x11ef06=_0x0b0e[_0x485865];return _0x11ef06;};'use strict';var express=require(_0xe0b0('0x0'));var router=express['Router']();var auth=require(_0xe0b0('0x1'));var controller=require('./jira.controller');router[_0xe0b0('0x2')]('/',auth[_0xe0b0('0x3')](),controller[_0xe0b0('0x4')]);module[_0xe0b0('0x5')]=router; \ No newline at end of file diff --git a/server/api/jira/jira.controller.js b/server/api/jira/jira.controller.js index 4e7c3d7..ed3d3a4 100644 --- a/server/api/jira/jira.controller.js +++ b/server/api/jira/jira.controller.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xb22d=['headers','x-forwarded-for','connection','remoteAddress','../../config/logger','support','3eAmWpBVP0','MOTGUI','summary','\x20from\x20','description','stringify','issuetype','fields','customfield_11500','email','customfield_11501','oldToken','customfield_11502','customfield_11503','name','reason','customfield_10102','track.xcallymotion.com','application/json','Basic\x20','toString','base64','request','setEncoding','status','statusCode','json','parse','error','api.jira','write','end','openIssue','send'];(function(_0x28bc73,_0x2f1c0e){var _0x18109d=function(_0x1c184e){while(--_0x1c184e){_0x28bc73['push'](_0x28bc73['shift']());}};_0x18109d(++_0x2f1c0e);}(_0xb22d,0x1bc));var _0xdb22=function(_0x3bef2c,_0x5a86fd){_0x3bef2c=_0x3bef2c-0x0;var _0x331503=_0xb22d[_0x3bef2c];return _0x331503;};'use strict';var BPromise=require('bluebird');var https=require('https');var logger=require(_0xdb22('0x0'))('api');var USERNAME=_0xdb22('0x1');var PASSWORD=_0xdb22('0x2');function openIssue(_0x584ae5,_0x325667){var _0x391866={'fields':{'project':{'key':_0x584ae5['key']||_0xdb22('0x3')},'summary':(_0x584ae5[_0xdb22('0x4')]||'Report')+_0xdb22('0x5')+_0x584ae5['ip'],'description':_0x584ae5[_0xdb22('0x6')]||JSON[_0xdb22('0x7')](_0x584ae5),'issuetype':{'name':_0x584ae5[_0xdb22('0x8')]||'Bug'}}};_0x391866[_0xdb22('0x9')][_0xdb22('0xa')]=_0x584ae5[_0xdb22('0xb')];_0x391866[_0xdb22('0x9')][_0xdb22('0xc')]=_0x584ae5[_0xdb22('0xd')];_0x391866['fields'][_0xdb22('0xe')]=_0x584ae5['newToken'];_0x391866[_0xdb22('0x9')][_0xdb22('0xf')]=_0x584ae5[_0xdb22('0x10')];_0x391866[_0xdb22('0x9')]['customfield_11504']=_0x584ae5[_0xdb22('0x11')];_0x391866[_0xdb22('0x9')][_0xdb22('0x12')]=_0x584ae5['ip'];var _0xc176={'host':_0xdb22('0x13'),'port':0x1bb,'path':'/rest/api/2/issue','method':'POST','timeout':0x4e20,'headers':{'Content-Type':_0xdb22('0x14'),'Authorization':_0xdb22('0x15')+new Buffer(USERNAME+':'+PASSWORD)[_0xdb22('0x16')](_0xdb22('0x17'))}};var _0x39f1eb=JSON[_0xdb22('0x7')](_0x391866);var _0x4c8313=https[_0xdb22('0x18')](_0xc176,function(_0x68b4a4){_0x68b4a4[_0xdb22('0x19')]('utf8');var _0x2ba9b5='';_0x68b4a4['on']('data',function(_0x2d95df){_0x2ba9b5+=_0x2d95df;});_0x68b4a4['on']('end',function(){if(_0x325667){return _0x325667[_0xdb22('0x1a')](_0x68b4a4[_0xdb22('0x1b')])[_0xdb22('0x1c')](JSON[_0xdb22('0x1d')](_0x2ba9b5));}});});_0x4c8313['on'](_0xdb22('0x1e'),function(_0x226fc5){if(_0x325667){return _0x325667['status'](0x1f4)[_0xdb22('0x1c')]({'errors':[{'message':'Error\x20during\x20license\x20request.\x20Please\x20contact\x20our\x20license\x20team\x20at\x20license@xcally.com\x20with\x20your\x20request','type':_0xdb22('0x1f')}]});}});_0x4c8313[_0xdb22('0x20')](_0x39f1eb);_0x4c8313[_0xdb22('0x21')]();}exports[_0xdb22('0x22')]=openIssue;exports[_0xdb22('0x23')]=function(_0x3e07d9,_0xd1c24c){_0x3e07d9['body']['ip']=_0x3e07d9[_0xdb22('0x24')][_0xdb22('0x25')]||_0x3e07d9[_0xdb22('0x26')][_0xdb22('0x27')]||_0x3e07d9['socket'][_0xdb22('0x27')]||_0x3e07d9[_0xdb22('0x26')]['socket'][_0xdb22('0x27')];return openIssue(_0x3e07d9['body'],_0xd1c24c);}; \ No newline at end of file +var _0xf952=['json','parse','status','Error\x20during\x20license\x20request.\x20Please\x20contact\x20our\x20license\x20team\x20at\x20license@xcally.com\x20with\x20your\x20request','api.jira','openIssue','send','body','headers','x-forwarded-for','remoteAddress','socket','connection','bluebird','../../config/logger','support','3eAmWpBVP0','summary','Report','\x20from\x20','description','stringify','issuetype','Bug','fields','customfield_11500','email','customfield_11501','oldToken','newToken','customfield_11503','customfield_10102','track.xcallymotion.com','POST','application/json','Basic\x20','toString','request','setEncoding','utf8','data','end','statusCode'];(function(_0x2da230,_0x5a5dfc){var _0x3504a9=function(_0x5bc685){while(--_0x5bc685){_0x2da230['push'](_0x2da230['shift']());}};_0x3504a9(++_0x5a5dfc);}(_0xf952,0x1e6));var _0x2f95=function(_0xedfea7,_0xc17e11){_0xedfea7=_0xedfea7-0x0;var _0x4c7b82=_0xf952[_0xedfea7];return _0x4c7b82;};'use strict';var BPromise=require(_0x2f95('0x0'));var https=require('https');var logger=require(_0x2f95('0x1'))('api');var USERNAME=_0x2f95('0x2');var PASSWORD=_0x2f95('0x3');function openIssue(_0x467e9,_0x4e0a6a){var _0x313b63={'fields':{'project':{'key':_0x467e9['key']||'MOTGUI'},'summary':(_0x467e9[_0x2f95('0x4')]||_0x2f95('0x5'))+_0x2f95('0x6')+_0x467e9['ip'],'description':_0x467e9[_0x2f95('0x7')]||JSON[_0x2f95('0x8')](_0x467e9),'issuetype':{'name':_0x467e9[_0x2f95('0x9')]||_0x2f95('0xa')}}};_0x313b63[_0x2f95('0xb')][_0x2f95('0xc')]=_0x467e9[_0x2f95('0xd')];_0x313b63[_0x2f95('0xb')][_0x2f95('0xe')]=_0x467e9[_0x2f95('0xf')];_0x313b63['fields']['customfield_11502']=_0x467e9[_0x2f95('0x10')];_0x313b63[_0x2f95('0xb')][_0x2f95('0x11')]=_0x467e9['name'];_0x313b63[_0x2f95('0xb')]['customfield_11504']=_0x467e9['reason'];_0x313b63[_0x2f95('0xb')][_0x2f95('0x12')]=_0x467e9['ip'];var _0x1599ba={'host':_0x2f95('0x13'),'port':0x1bb,'path':'/rest/api/2/issue','method':_0x2f95('0x14'),'timeout':0x4e20,'headers':{'Content-Type':_0x2f95('0x15'),'Authorization':_0x2f95('0x16')+new Buffer(USERNAME+':'+PASSWORD)[_0x2f95('0x17')]('base64')}};var _0x434ea5=JSON[_0x2f95('0x8')](_0x313b63);var _0xdd2d0a=https[_0x2f95('0x18')](_0x1599ba,function(_0x3cd881){_0x3cd881[_0x2f95('0x19')](_0x2f95('0x1a'));var _0x8a5f76='';_0x3cd881['on'](_0x2f95('0x1b'),function(_0xbdef8d){_0x8a5f76+=_0xbdef8d;});_0x3cd881['on'](_0x2f95('0x1c'),function(){if(_0x4e0a6a){return _0x4e0a6a['status'](_0x3cd881[_0x2f95('0x1d')])[_0x2f95('0x1e')](JSON[_0x2f95('0x1f')](_0x8a5f76));}});});_0xdd2d0a['on']('error',function(_0x5ab0e4){if(_0x4e0a6a){return _0x4e0a6a[_0x2f95('0x20')](0x1f4)[_0x2f95('0x1e')]({'errors':[{'message':_0x2f95('0x21'),'type':_0x2f95('0x22')}]});}});_0xdd2d0a['write'](_0x434ea5);_0xdd2d0a[_0x2f95('0x1c')]();}exports[_0x2f95('0x23')]=openIssue;exports[_0x2f95('0x24')]=function(_0x2b3bb7,_0x51f7c6){_0x2b3bb7[_0x2f95('0x25')]['ip']=_0x2b3bb7[_0x2f95('0x26')][_0x2f95('0x27')]||_0x2b3bb7['connection'][_0x2f95('0x28')]||_0x2b3bb7[_0x2f95('0x29')]['remoteAddress']||_0x2b3bb7[_0x2f95('0x2a')]['socket'][_0x2f95('0x28')];return openIssue(_0x2b3bb7[_0x2f95('0x25')],_0x51f7c6);}; \ No newline at end of file diff --git a/server/api/jscriptyAnswerReport/index.js b/server/api/jscriptyAnswerReport/index.js index f46ed7b..3e01ccd 100644 --- a/server/api/jscriptyAnswerReport/index.js +++ b/server/api/jscriptyAnswerReport/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xf109=['fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','./jscriptyAnswerReport.controller','get','isAuthenticated','index','/describe','/:id','show','post','create','put','delete','exports','multer','util','path'];(function(_0xca1f0e,_0x2713d5){var _0x35e4ef=function(_0x44c40f){while(--_0x44c40f){_0xca1f0e['push'](_0xca1f0e['shift']());}};_0x35e4ef(++_0x2713d5);}(_0xf109,0xce));var _0x9f10=function(_0x44946b,_0xf874ec){_0x44946b=_0x44946b-0x0;var _0x249bc4=_0xf109[_0x44946b];return _0x249bc4;};'use strict';var multer=require(_0x9f10('0x0'));var util=require(_0x9f10('0x1'));var path=require(_0x9f10('0x2'));var timeout=require('connect-timeout');var express=require('express');var router=express['Router']();var fs_extra=require(_0x9f10('0x3'));var auth=require(_0x9f10('0x4'));var interaction=require(_0x9f10('0x5'));var config=require(_0x9f10('0x6'));var controller=require(_0x9f10('0x7'));router[_0x9f10('0x8')]('/',auth[_0x9f10('0x9')](),controller[_0x9f10('0xa')]);router[_0x9f10('0x8')](_0x9f10('0xb'),auth[_0x9f10('0x9')](),controller['describe']);router[_0x9f10('0x8')](_0x9f10('0xc'),auth[_0x9f10('0x9')](),controller[_0x9f10('0xd')]);router[_0x9f10('0xe')]('/',auth['isAuthenticated'](),controller[_0x9f10('0xf')]);router[_0x9f10('0x10')](_0x9f10('0xc'),auth['isAuthenticated'](),controller['update']);router[_0x9f10('0x11')](_0x9f10('0xc'),auth[_0x9f10('0x9')](),controller['destroy']);module[_0x9f10('0x12')]=router; \ No newline at end of file +var _0xd2ea=['./jscriptyAnswerReport.controller','get','isAuthenticated','/describe','/:id','show','create','put','update','destroy','exports','multer','util','path','connect-timeout','express','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment'];(function(_0x5c5d97,_0x392697){var _0x13c92a=function(_0x47ea8c){while(--_0x47ea8c){_0x5c5d97['push'](_0x5c5d97['shift']());}};_0x13c92a(++_0x392697);}(_0xd2ea,0x15f));var _0xad2e=function(_0x5da657,_0x2144ce){_0x5da657=_0x5da657-0x0;var _0x24f12f=_0xd2ea[_0x5da657];return _0x24f12f;};'use strict';var multer=require(_0xad2e('0x0'));var util=require(_0xad2e('0x1'));var path=require(_0xad2e('0x2'));var timeout=require(_0xad2e('0x3'));var express=require(_0xad2e('0x4'));var router=express['Router']();var fs_extra=require(_0xad2e('0x5'));var auth=require(_0xad2e('0x6'));var interaction=require(_0xad2e('0x7'));var config=require(_0xad2e('0x8'));var controller=require(_0xad2e('0x9'));router[_0xad2e('0xa')]('/',auth[_0xad2e('0xb')](),controller['index']);router[_0xad2e('0xa')](_0xad2e('0xc'),auth[_0xad2e('0xb')](),controller['describe']);router[_0xad2e('0xa')](_0xad2e('0xd'),auth['isAuthenticated'](),controller[_0xad2e('0xe')]);router['post']('/',auth[_0xad2e('0xb')](),controller[_0xad2e('0xf')]);router[_0xad2e('0x10')](_0xad2e('0xd'),auth['isAuthenticated'](),controller[_0xad2e('0x11')]);router['delete'](_0xad2e('0xd'),auth[_0xad2e('0xb')](),controller[_0xad2e('0x12')]);module[_0xad2e('0x13')]=router; \ No newline at end of file diff --git a/server/api/jscriptyAnswerReport/jscriptyAnswerReport.attributes.js b/server/api/jscriptyAnswerReport/jscriptyAnswerReport.attributes.js index ac76957..72a7559 100644 --- a/server/api/jscriptyAnswerReport/jscriptyAnswerReport.attributes.js +++ b/server/api/jscriptyAnswerReport/jscriptyAnswerReport.attributes.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x7a54=['long','STRING','sequelize','exports','TEXT'];(function(_0x2064e5,_0x4f6fa2){var _0x21a233=function(_0x1b2491){while(--_0x1b2491){_0x2064e5['push'](_0x2064e5['shift']());}};_0x21a233(++_0x4f6fa2);}(_0x7a54,0x106));var _0x47a5=function(_0x555283,_0x259528){_0x555283=_0x555283-0x0;var _0x1649c6=_0x7a54[_0x555283];return _0x1649c6;};'use strict';var Sequelize=require(_0x47a5('0x0'));module[_0x47a5('0x1')]={'question':{'type':Sequelize[_0x47a5('0x2')]},'answer':{'type':Sequelize['TEXT'](_0x47a5('0x3'))},'membername':{'type':Sequelize[_0x47a5('0x4')]},'projectname':{'type':Sequelize['STRING']},'queue':{'type':Sequelize[_0x47a5('0x4')]},'uniqueid':{'type':Sequelize[_0x47a5('0x4')]},'calleridname':{'type':Sequelize[_0x47a5('0x4')]},'calleridnum':{'type':Sequelize[_0x47a5('0x4')]},'questionId':{'type':Sequelize[_0x47a5('0x4')]}}; \ No newline at end of file +var _0x7a54=['long','STRING','sequelize','exports','TEXT'];(function(_0x2235bf,_0x3a06a7){var _0x4c3a64=function(_0x3b3bb6){while(--_0x3b3bb6){_0x2235bf['push'](_0x2235bf['shift']());}};_0x4c3a64(++_0x3a06a7);}(_0x7a54,0x106));var _0x47a5=function(_0x7e175c,_0x524379){_0x7e175c=_0x7e175c-0x0;var _0x5808b7=_0x7a54[_0x7e175c];return _0x5808b7;};'use strict';var Sequelize=require(_0x47a5('0x0'));module[_0x47a5('0x1')]={'question':{'type':Sequelize[_0x47a5('0x2')]},'answer':{'type':Sequelize['TEXT'](_0x47a5('0x3'))},'membername':{'type':Sequelize[_0x47a5('0x4')]},'projectname':{'type':Sequelize['STRING']},'queue':{'type':Sequelize[_0x47a5('0x4')]},'uniqueid':{'type':Sequelize[_0x47a5('0x4')]},'calleridname':{'type':Sequelize[_0x47a5('0x4')]},'calleridnum':{'type':Sequelize[_0x47a5('0x4')]},'questionId':{'type':Sequelize[_0x47a5('0x4')]}}; \ No newline at end of file diff --git a/server/api/jscriptyAnswerReport/jscriptyAnswerReport.controller.js b/server/api/jscriptyAnswerReport/jscriptyAnswerReport.controller.js index 367746e..12274af 100644 --- a/server/api/jscriptyAnswerReport/jscriptyAnswerReport.controller.js +++ b/server/api/jscriptyAnswerReport/jscriptyAnswerReport.controller.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x78d3=['error','stack','index','key','map','name','query','filters','intersection','model','fields','attributes','hasOwnProperty','order','sort','where','pick','filter','type','VIRTUAL','merge','options','JscriptyAnswerReport','includeAll','include','findAll','rows','catch','show','params','keys','length','create','update','body','find','destroy','describe','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','util','path','sox','to-csv','ejs','fs-extra','crypto','desk.js','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','../../config/utils','../../mysqldb','sendStatus','status','json','undefined','limit','count','offset','set','Content-Range','apply','reject','save','then','end'];(function(_0x34fbbf,_0x4c03af){var _0x4fdbab=function(_0x4caba8){while(--_0x4caba8){_0x34fbbf['push'](_0x34fbbf['shift']());}};_0x4fdbab(++_0x4c03af);}(_0x78d3,0x73));var _0x378d=function(_0x5db2a6,_0x228ce0){_0x5db2a6=_0x5db2a6-0x0;var _0x301fc4=_0x78d3[_0x5db2a6];return _0x301fc4;};'use strict';var emlformat=require(_0x378d('0x0'));var rimraf=require(_0x378d('0x1'));var zipdir=require(_0x378d('0x2'));var jsonpatch=require(_0x378d('0x3'));var rp=require(_0x378d('0x4'));var moment=require(_0x378d('0x5'));var BPromise=require(_0x378d('0x6'));var Mustache=require(_0x378d('0x7'));var util=require(_0x378d('0x8'));var path=require(_0x378d('0x9'));var sox=require(_0x378d('0xa'));var csv=require(_0x378d('0xb'));var ejs=require(_0x378d('0xc'));var fs=require('fs');var fs_extra=require(_0x378d('0xd'));var _=require('lodash');var squel=require('squel');var crypto=require(_0x378d('0xe'));var jsforce=require('jsforce');var deskjs=require(_0x378d('0xf'));var toCsv=require(_0x378d('0xb'));var querystring=require(_0x378d('0x10'));var Papa=require(_0x378d('0x11'));var Redis=require(_0x378d('0x12'));var authService=require(_0x378d('0x13'));var qs=require('../../components/parsers/qs');var as=require(_0x378d('0x14'));var hardwareService=require(_0x378d('0x15'));var logger=require(_0x378d('0x16'))('api');var utils=require(_0x378d('0x17'));var config=require('../../config/environment');var licenseUtil=require('../../config/license/util');var db=require(_0x378d('0x18'))['db'];function respondWithStatusCode(_0x184383,_0x5a1c1f){_0x5a1c1f=_0x5a1c1f||0xcc;return function(_0x43785f){if(_0x43785f){return _0x184383[_0x378d('0x19')](_0x5a1c1f);}return _0x184383[_0x378d('0x1a')](_0x5a1c1f)['end']();};}function respondWithResult(_0x4609b7,_0x5bf43f){_0x5bf43f=_0x5bf43f||0xc8;return function(_0x756450){if(_0x756450){return _0x4609b7[_0x378d('0x1a')](_0x5bf43f)[_0x378d('0x1b')](_0x756450);}};}function respondWithFilteredResult(_0x40c4fb,_0x209292){return function(_0x5f48db){if(_0x5f48db){var _0x46856f=typeof _0x209292['offset']===_0x378d('0x1c')&&typeof _0x209292[_0x378d('0x1d')]===_0x378d('0x1c');var _0x254ff5=_0x5f48db[_0x378d('0x1e')];var _0x50ce98=_0x46856f?0x0:_0x209292[_0x378d('0x1f')];var _0x4b54c7=_0x46856f?_0x5f48db[_0x378d('0x1e')]:_0x209292[_0x378d('0x1f')]+_0x209292[_0x378d('0x1d')];var _0x1d2852;if(_0x4b54c7>=_0x254ff5){_0x4b54c7=_0x254ff5;_0x1d2852=0xc8;}else{_0x1d2852=0xce;}_0x40c4fb[_0x378d('0x1a')](_0x1d2852);return _0x40c4fb[_0x378d('0x20')](_0x378d('0x21'),_0x50ce98+'-'+_0x4b54c7+'/'+_0x254ff5)['json'](_0x5f48db);}return null;};}function patchUpdates(_0x5a936c){return function(_0x238f30){try{jsonpatch[_0x378d('0x22')](_0x238f30,_0x5a936c,!![]);}catch(_0x48b7f9){return BPromise[_0x378d('0x23')](_0x48b7f9);}return _0x238f30[_0x378d('0x24')]();};}function saveUpdates(_0x2d6c8f,_0x1339fb){return function(_0x3acdf9){if(_0x3acdf9){return _0x3acdf9['update'](_0x2d6c8f)[_0x378d('0x25')](function(_0x4f43a6){return _0x4f43a6;});}return null;};}function removeEntity(_0x17bbf2,_0x402913){return function(_0x3f2ebc){if(_0x3f2ebc){return _0x3f2ebc['destroy']()[_0x378d('0x25')](function(){_0x17bbf2[_0x378d('0x1a')](0xcc)[_0x378d('0x26')]();});}};}function handleEntityNotFound(_0x5e515d,_0x20e5e6){return function(_0x22fee7){if(!_0x22fee7){_0x5e515d[_0x378d('0x19')](0x194);}return _0x22fee7;};}function handleError(_0x1c302a,_0xb65852){_0xb65852=_0xb65852||0x1f4;return function(_0x2ed3ed){logger[_0x378d('0x27')](_0x2ed3ed[_0x378d('0x28')]);if(_0x2ed3ed['name']){delete _0x2ed3ed['name'];}_0x1c302a[_0x378d('0x1a')](_0xb65852)['send'](_0x2ed3ed);};}exports[_0x378d('0x29')]=function(_0x292b73,_0x3f2d5b){var _0x17f952={},_0x53637f={},_0x59945b={'count':0x0,'rows':[]};var _0x3de1af=_['map'](db['JscriptyAnswerReport']['rawAttributes'],function(_0x3e1dac){return{'name':_0x3e1dac['fieldName'],'type':_0x3e1dac['type'][_0x378d('0x2a')]};});_0x53637f['model']=_[_0x378d('0x2b')](_0x3de1af,_0x378d('0x2c'));_0x53637f[_0x378d('0x2d')]=_['keys'](_0x292b73[_0x378d('0x2d')]);_0x53637f[_0x378d('0x2e')]=_[_0x378d('0x2f')](_0x53637f[_0x378d('0x30')],_0x53637f[_0x378d('0x2d')]);_0x17f952['attributes']=_[_0x378d('0x2f')](_0x53637f[_0x378d('0x30')],qs[_0x378d('0x31')](_0x292b73[_0x378d('0x2d')]['fields']));_0x17f952[_0x378d('0x32')]=_0x17f952['attributes']['length']?_0x17f952[_0x378d('0x32')]:_0x53637f[_0x378d('0x30')];if(!_0x292b73['query'][_0x378d('0x33')]('nolimit')){_0x17f952['limit']=qs['limit'](_0x292b73[_0x378d('0x2d')][_0x378d('0x1d')]);_0x17f952[_0x378d('0x1f')]=qs[_0x378d('0x1f')](_0x292b73[_0x378d('0x2d')]['offset']);}_0x17f952[_0x378d('0x34')]=qs[_0x378d('0x35')](_0x292b73[_0x378d('0x2d')]['sort']);_0x17f952[_0x378d('0x36')]=qs[_0x378d('0x2e')](_[_0x378d('0x37')](_0x292b73['query'],_0x53637f[_0x378d('0x2e')]),_0x3de1af);if(_0x292b73['query'][_0x378d('0x38')]){_0x17f952['where']=_['merge'](_0x17f952[_0x378d('0x36')],{'$or':_[_0x378d('0x2b')](_0x3de1af,function(_0x43a0d7){if(_0x43a0d7[_0x378d('0x39')]!==_0x378d('0x3a')){var _0x7f668c={};_0x7f668c[_0x43a0d7['name']]={'$like':'%'+_0x292b73['query'][_0x378d('0x38')]+'%'};return _0x7f668c;}})});}_0x17f952=_[_0x378d('0x3b')]({},_0x17f952,_0x292b73[_0x378d('0x3c')]);var _0x1b039d={'where':_0x17f952[_0x378d('0x36')]};return db[_0x378d('0x3d')][_0x378d('0x1e')](_0x1b039d)[_0x378d('0x25')](function(_0x32c4f6){_0x59945b[_0x378d('0x1e')]=_0x32c4f6;if(_0x292b73[_0x378d('0x2d')][_0x378d('0x3e')]){_0x17f952[_0x378d('0x3f')]=[{'all':!![]}];}return db['JscriptyAnswerReport'][_0x378d('0x40')](_0x17f952);})['then'](function(_0x5e1b33){_0x59945b[_0x378d('0x41')]=_0x5e1b33;return _0x59945b;})['then'](respondWithFilteredResult(_0x3f2d5b,_0x17f952))[_0x378d('0x42')](handleError(_0x3f2d5b,null));};exports[_0x378d('0x43')]=function(_0x514c6d,_0x480835){var _0x5c3e1e={'raw':!![],'where':{'id':_0x514c6d[_0x378d('0x44')]['id']}},_0x2d2ee2={};_0x2d2ee2[_0x378d('0x30')]=_['keys'](db[_0x378d('0x3d')]['rawAttributes']);_0x2d2ee2[_0x378d('0x2d')]=_[_0x378d('0x45')](_0x514c6d[_0x378d('0x2d')]);_0x2d2ee2[_0x378d('0x2e')]=_['intersection'](_0x2d2ee2[_0x378d('0x30')],_0x2d2ee2['query']);_0x5c3e1e[_0x378d('0x32')]=_[_0x378d('0x2f')](_0x2d2ee2[_0x378d('0x30')],qs[_0x378d('0x31')](_0x514c6d[_0x378d('0x2d')][_0x378d('0x31')]));_0x5c3e1e['attributes']=_0x5c3e1e['attributes'][_0x378d('0x46')]?_0x5c3e1e[_0x378d('0x32')]:_0x2d2ee2[_0x378d('0x30')];if(_0x514c6d['query']['includeAll']){_0x5c3e1e[_0x378d('0x3f')]=[{'all':!![]}];}_0x5c3e1e=_['merge']({},_0x5c3e1e,_0x514c6d['options']);return db['JscriptyAnswerReport']['find'](_0x5c3e1e)[_0x378d('0x25')](handleEntityNotFound(_0x480835,null))[_0x378d('0x25')](respondWithResult(_0x480835,null))[_0x378d('0x42')](handleError(_0x480835,null));};exports[_0x378d('0x47')]=function(_0x404176,_0x5c5733){return db[_0x378d('0x3d')][_0x378d('0x47')](_0x404176['body'],{})['then'](respondWithResult(_0x5c5733,0xc9))[_0x378d('0x42')](handleError(_0x5c5733,null));};exports[_0x378d('0x48')]=function(_0x50a8a0,_0x3e6275){if(_0x50a8a0[_0x378d('0x49')]['id']){delete _0x50a8a0[_0x378d('0x49')]['id'];}return db[_0x378d('0x3d')][_0x378d('0x4a')]({'where':{'id':_0x50a8a0[_0x378d('0x44')]['id']}})[_0x378d('0x25')](handleEntityNotFound(_0x3e6275,null))['then'](saveUpdates(_0x50a8a0[_0x378d('0x49')],null))[_0x378d('0x25')](respondWithResult(_0x3e6275,null))[_0x378d('0x42')](handleError(_0x3e6275,null));};exports[_0x378d('0x4b')]=function(_0x509bf1,_0x2e4cd0){return db[_0x378d('0x3d')]['find']({'where':{'id':_0x509bf1[_0x378d('0x44')]['id']}})[_0x378d('0x25')](handleEntityNotFound(_0x2e4cd0,null))['then'](removeEntity(_0x2e4cd0,null))[_0x378d('0x42')](handleError(_0x2e4cd0,null));};exports['describe']=function(_0x31b959,_0x5562d8){return db[_0x378d('0x3d')][_0x378d('0x4c')]()[_0x378d('0x25')](respondWithResult(_0x5562d8,null))[_0x378d('0x42')](handleError(_0x5562d8,null));}; \ No newline at end of file +var _0xd8b1=['then','destroy','error','stack','name','index','JscriptyAnswerReport','rawAttributes','fieldName','type','key','map','query','keys','filters','intersection','model','fields','attributes','length','hasOwnProperty','nolimit','order','sort','where','pick','merge','filter','options','includeAll','include','findAll','catch','show','params','find','create','body','describe','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','bluebird','mustache','path','fs-extra','squel','crypto','jsforce','desk.js','papaparse','../../components/parsers/qs','../../config/license/hardware','api','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','sendStatus','status','end','offset','undefined','limit','count','set','Content-Range','json','apply','reject','save','update'];(function(_0x1cd880,_0x31fc63){var _0x218fe0=function(_0x2be449){while(--_0x2be449){_0x1cd880['push'](_0x1cd880['shift']());}};_0x218fe0(++_0x31fc63);}(_0xd8b1,0x105));var _0x1d8b=function(_0xd8dd66,_0x3ccfcd){_0xd8dd66=_0xd8dd66-0x0;var _0x3744c1=_0xd8b1[_0xd8dd66];return _0x3744c1;};'use strict';var emlformat=require(_0x1d8b('0x0'));var rimraf=require(_0x1d8b('0x1'));var zipdir=require(_0x1d8b('0x2'));var jsonpatch=require(_0x1d8b('0x3'));var rp=require(_0x1d8b('0x4'));var moment=require('moment');var BPromise=require(_0x1d8b('0x5'));var Mustache=require(_0x1d8b('0x6'));var util=require('util');var path=require(_0x1d8b('0x7'));var sox=require('sox');var csv=require('to-csv');var ejs=require('ejs');var fs=require('fs');var fs_extra=require(_0x1d8b('0x8'));var _=require('lodash');var squel=require(_0x1d8b('0x9'));var crypto=require(_0x1d8b('0xa'));var jsforce=require(_0x1d8b('0xb'));var deskjs=require(_0x1d8b('0xc'));var toCsv=require('to-csv');var querystring=require('querystring');var Papa=require(_0x1d8b('0xd'));var Redis=require('ioredis');var authService=require('../../components/auth/service');var qs=require(_0x1d8b('0xe'));var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0x1d8b('0xf'));var logger=require('../../config/logger')(_0x1d8b('0x10'));var utils=require(_0x1d8b('0x11'));var config=require(_0x1d8b('0x12'));var licenseUtil=require(_0x1d8b('0x13'));var db=require(_0x1d8b('0x14'))['db'];function respondWithStatusCode(_0xfd985b,_0x4f506a){_0x4f506a=_0x4f506a||0xcc;return function(_0xec0671){if(_0xec0671){return _0xfd985b[_0x1d8b('0x15')](_0x4f506a);}return _0xfd985b[_0x1d8b('0x16')](_0x4f506a)[_0x1d8b('0x17')]();};}function respondWithResult(_0x4486a8,_0x3a23d0){_0x3a23d0=_0x3a23d0||0xc8;return function(_0x46bd8c){if(_0x46bd8c){return _0x4486a8[_0x1d8b('0x16')](_0x3a23d0)['json'](_0x46bd8c);}};}function respondWithFilteredResult(_0x50c75f,_0x3d54d3){return function(_0x3f31a4){if(_0x3f31a4){var _0x44ebbe=typeof _0x3d54d3[_0x1d8b('0x18')]===_0x1d8b('0x19')&&typeof _0x3d54d3[_0x1d8b('0x1a')]==='undefined';var _0x5aeef3=_0x3f31a4[_0x1d8b('0x1b')];var _0x100a9b=_0x44ebbe?0x0:_0x3d54d3[_0x1d8b('0x18')];var _0x1b6440=_0x44ebbe?_0x3f31a4[_0x1d8b('0x1b')]:_0x3d54d3['offset']+_0x3d54d3[_0x1d8b('0x1a')];var _0x57c63a;if(_0x1b6440>=_0x5aeef3){_0x1b6440=_0x5aeef3;_0x57c63a=0xc8;}else{_0x57c63a=0xce;}_0x50c75f['status'](_0x57c63a);return _0x50c75f[_0x1d8b('0x1c')](_0x1d8b('0x1d'),_0x100a9b+'-'+_0x1b6440+'/'+_0x5aeef3)[_0x1d8b('0x1e')](_0x3f31a4);}return null;};}function patchUpdates(_0x4f3342){return function(_0x2274c5){try{jsonpatch[_0x1d8b('0x1f')](_0x2274c5,_0x4f3342,!![]);}catch(_0x3cdf3b){return BPromise[_0x1d8b('0x20')](_0x3cdf3b);}return _0x2274c5[_0x1d8b('0x21')]();};}function saveUpdates(_0x130c00,_0x3c2c78){return function(_0x4d5ea8){if(_0x4d5ea8){return _0x4d5ea8[_0x1d8b('0x22')](_0x130c00)[_0x1d8b('0x23')](function(_0x3d8fcb){return _0x3d8fcb;});}return null;};}function removeEntity(_0x308b89,_0x5235b6){return function(_0x5bee29){if(_0x5bee29){return _0x5bee29[_0x1d8b('0x24')]()[_0x1d8b('0x23')](function(){_0x308b89['status'](0xcc)[_0x1d8b('0x17')]();});}};}function handleEntityNotFound(_0x461405,_0x497d02){return function(_0x4df3ab){if(!_0x4df3ab){_0x461405[_0x1d8b('0x15')](0x194);}return _0x4df3ab;};}function handleError(_0x19b9aa,_0x374954){_0x374954=_0x374954||0x1f4;return function(_0xe76d45){logger[_0x1d8b('0x25')](_0xe76d45[_0x1d8b('0x26')]);if(_0xe76d45[_0x1d8b('0x27')]){delete _0xe76d45['name'];}_0x19b9aa[_0x1d8b('0x16')](_0x374954)['send'](_0xe76d45);};}exports[_0x1d8b('0x28')]=function(_0x4ccfa9,_0x37c284){var _0x3f16de={},_0x14928e={},_0x41a54e={'count':0x0,'rows':[]};var _0x569ed4=_['map'](db[_0x1d8b('0x29')][_0x1d8b('0x2a')],function(_0x35efca){return{'name':_0x35efca[_0x1d8b('0x2b')],'type':_0x35efca[_0x1d8b('0x2c')][_0x1d8b('0x2d')]};});_0x14928e['model']=_[_0x1d8b('0x2e')](_0x569ed4,_0x1d8b('0x27'));_0x14928e[_0x1d8b('0x2f')]=_[_0x1d8b('0x30')](_0x4ccfa9[_0x1d8b('0x2f')]);_0x14928e[_0x1d8b('0x31')]=_[_0x1d8b('0x32')](_0x14928e[_0x1d8b('0x33')],_0x14928e[_0x1d8b('0x2f')]);_0x3f16de['attributes']=_[_0x1d8b('0x32')](_0x14928e['model'],qs['fields'](_0x4ccfa9['query'][_0x1d8b('0x34')]));_0x3f16de[_0x1d8b('0x35')]=_0x3f16de[_0x1d8b('0x35')][_0x1d8b('0x36')]?_0x3f16de[_0x1d8b('0x35')]:_0x14928e['model'];if(!_0x4ccfa9[_0x1d8b('0x2f')][_0x1d8b('0x37')](_0x1d8b('0x38'))){_0x3f16de[_0x1d8b('0x1a')]=qs[_0x1d8b('0x1a')](_0x4ccfa9[_0x1d8b('0x2f')][_0x1d8b('0x1a')]);_0x3f16de[_0x1d8b('0x18')]=qs['offset'](_0x4ccfa9[_0x1d8b('0x2f')]['offset']);}_0x3f16de[_0x1d8b('0x39')]=qs['sort'](_0x4ccfa9[_0x1d8b('0x2f')][_0x1d8b('0x3a')]);_0x3f16de[_0x1d8b('0x3b')]=qs['filters'](_[_0x1d8b('0x3c')](_0x4ccfa9[_0x1d8b('0x2f')],_0x14928e[_0x1d8b('0x31')]),_0x569ed4);if(_0x4ccfa9[_0x1d8b('0x2f')]['filter']){_0x3f16de[_0x1d8b('0x3b')]=_[_0x1d8b('0x3d')](_0x3f16de['where'],{'$or':_[_0x1d8b('0x2e')](_0x569ed4,function(_0x48217f){if(_0x48217f['type']!=='VIRTUAL'){var _0x21e9e0={};_0x21e9e0[_0x48217f[_0x1d8b('0x27')]]={'$like':'%'+_0x4ccfa9[_0x1d8b('0x2f')][_0x1d8b('0x3e')]+'%'};return _0x21e9e0;}})});}_0x3f16de=_[_0x1d8b('0x3d')]({},_0x3f16de,_0x4ccfa9[_0x1d8b('0x3f')]);var _0xaee456={'where':_0x3f16de['where']};return db[_0x1d8b('0x29')]['count'](_0xaee456)[_0x1d8b('0x23')](function(_0x5da0e7){_0x41a54e[_0x1d8b('0x1b')]=_0x5da0e7;if(_0x4ccfa9[_0x1d8b('0x2f')][_0x1d8b('0x40')]){_0x3f16de[_0x1d8b('0x41')]=[{'all':!![]}];}return db[_0x1d8b('0x29')][_0x1d8b('0x42')](_0x3f16de);})[_0x1d8b('0x23')](function(_0x47a4e6){_0x41a54e['rows']=_0x47a4e6;return _0x41a54e;})[_0x1d8b('0x23')](respondWithFilteredResult(_0x37c284,_0x3f16de))[_0x1d8b('0x43')](handleError(_0x37c284,null));};exports[_0x1d8b('0x44')]=function(_0x108a51,_0x39cfd3){var _0x4ea452={'raw':!![],'where':{'id':_0x108a51[_0x1d8b('0x45')]['id']}},_0x280775={};_0x280775['model']=_['keys'](db['JscriptyAnswerReport'][_0x1d8b('0x2a')]);_0x280775['query']=_[_0x1d8b('0x30')](_0x108a51[_0x1d8b('0x2f')]);_0x280775['filters']=_[_0x1d8b('0x32')](_0x280775[_0x1d8b('0x33')],_0x280775[_0x1d8b('0x2f')]);_0x4ea452[_0x1d8b('0x35')]=_[_0x1d8b('0x32')](_0x280775['model'],qs['fields'](_0x108a51[_0x1d8b('0x2f')][_0x1d8b('0x34')]));_0x4ea452[_0x1d8b('0x35')]=_0x4ea452['attributes'][_0x1d8b('0x36')]?_0x4ea452[_0x1d8b('0x35')]:_0x280775[_0x1d8b('0x33')];if(_0x108a51[_0x1d8b('0x2f')][_0x1d8b('0x40')]){_0x4ea452[_0x1d8b('0x41')]=[{'all':!![]}];}_0x4ea452=_[_0x1d8b('0x3d')]({},_0x4ea452,_0x108a51[_0x1d8b('0x3f')]);return db['JscriptyAnswerReport'][_0x1d8b('0x46')](_0x4ea452)[_0x1d8b('0x23')](handleEntityNotFound(_0x39cfd3,null))[_0x1d8b('0x23')](respondWithResult(_0x39cfd3,null))[_0x1d8b('0x43')](handleError(_0x39cfd3,null));};exports[_0x1d8b('0x47')]=function(_0xfaf101,_0x44cc0f){return db[_0x1d8b('0x29')]['create'](_0xfaf101[_0x1d8b('0x48')],{})[_0x1d8b('0x23')](respondWithResult(_0x44cc0f,0xc9))['catch'](handleError(_0x44cc0f,null));};exports['update']=function(_0x33d7cd,_0x51584d){if(_0x33d7cd[_0x1d8b('0x48')]['id']){delete _0x33d7cd[_0x1d8b('0x48')]['id'];}return db[_0x1d8b('0x29')][_0x1d8b('0x46')]({'where':{'id':_0x33d7cd[_0x1d8b('0x45')]['id']}})[_0x1d8b('0x23')](handleEntityNotFound(_0x51584d,null))[_0x1d8b('0x23')](saveUpdates(_0x33d7cd[_0x1d8b('0x48')],null))[_0x1d8b('0x23')](respondWithResult(_0x51584d,null))[_0x1d8b('0x43')](handleError(_0x51584d,null));};exports[_0x1d8b('0x24')]=function(_0x29d30c,_0x28aee5){return db[_0x1d8b('0x29')][_0x1d8b('0x46')]({'where':{'id':_0x29d30c[_0x1d8b('0x45')]['id']}})['then'](handleEntityNotFound(_0x28aee5,null))['then'](removeEntity(_0x28aee5,null))[_0x1d8b('0x43')](handleError(_0x28aee5,null));};exports[_0x1d8b('0x49')]=function(_0x573ba8,_0x2445d3){return db['JscriptyAnswerReport']['describe']()['then'](respondWithResult(_0x2445d3,null))[_0x1d8b('0x43')](handleError(_0x2445d3,null));}; \ No newline at end of file diff --git a/server/api/jscriptyAnswerReport/jscriptyAnswerReport.model.js b/server/api/jscriptyAnswerReport/jscriptyAnswerReport.model.js index c45a30a..8e7018f 100644 --- a/server/api/jscriptyAnswerReport/jscriptyAnswerReport.model.js +++ b/server/api/jscriptyAnswerReport/jscriptyAnswerReport.model.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xda04=['define','JscriptyAnswerReport','report_jscripty_answers','lodash','../../config/logger','api','moment','bluebird','request-promise','path','exports'];(function(_0x20e7e3,_0x1529be){var _0x14b9de=function(_0xa82925){while(--_0xa82925){_0x20e7e3['push'](_0x20e7e3['shift']());}};_0x14b9de(++_0x1529be);}(_0xda04,0x1e7));var _0x4da0=function(_0x418330,_0x4c8c2d){_0x418330=_0x418330-0x0;var _0x503c9a=_0xda04[_0x418330];return _0x503c9a;};'use strict';var _=require(_0x4da0('0x0'));var util=require('util');var logger=require(_0x4da0('0x1'))(_0x4da0('0x2'));var moment=require(_0x4da0('0x3'));var BPromise=require(_0x4da0('0x4'));var rp=require(_0x4da0('0x5'));var fs=require('fs');var path=require(_0x4da0('0x6'));var rimraf=require('rimraf');var config=require('../../config/environment');var attributes=require('./jscriptyAnswerReport.attributes');module[_0x4da0('0x7')]=function(_0x425a52,_0x1c3e7f){return _0x425a52[_0x4da0('0x8')](_0x4da0('0x9'),attributes,{'tableName':_0x4da0('0xa'),'paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file +var _0x88a4=['path','rimraf','./jscriptyAnswerReport.attributes','define','JscriptyAnswerReport','report_jscripty_answers','lodash','../../config/logger','api','bluebird'];(function(_0x5f0225,_0x52631a){var _0x2cef4b=function(_0x5a29c6){while(--_0x5a29c6){_0x5f0225['push'](_0x5f0225['shift']());}};_0x2cef4b(++_0x52631a);}(_0x88a4,0x150));var _0x488a=function(_0x120db0,_0x1734be){_0x120db0=_0x120db0-0x0;var _0x48451e=_0x88a4[_0x120db0];return _0x48451e;};'use strict';var _=require(_0x488a('0x0'));var util=require('util');var logger=require(_0x488a('0x1'))(_0x488a('0x2'));var moment=require('moment');var BPromise=require(_0x488a('0x3'));var rp=require('request-promise');var fs=require('fs');var path=require(_0x488a('0x4'));var rimraf=require(_0x488a('0x5'));var config=require('../../config/environment');var attributes=require(_0x488a('0x6'));module['exports']=function(_0x2b6b7d,_0x186574){return _0x2b6b7d[_0x488a('0x7')](_0x488a('0x8'),attributes,{'tableName':_0x488a('0x9'),'paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file diff --git a/server/api/jscriptyAnswerReport/jscriptyAnswerReport.rpc.js b/server/api/jscriptyAnswerReport/jscriptyAnswerReport.rpc.js index b5872a2..3ecb7aa 100644 --- a/server/api/jscriptyAnswerReport/jscriptyAnswerReport.rpc.js +++ b/server/api/jscriptyAnswerReport/jscriptyAnswerReport.rpc.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x7e8e=['code','message','result','catch','lodash','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','info','JscriptyAnswerReport,\x20%s,\x20%s','request\x20sent','debug','JscriptyAnswerReport,\x20%s,\x20%s,\x20%s','stringify','error'];(function(_0x11ce46,_0x177a85){var _0x368a1e=function(_0x425454){while(--_0x425454){_0x11ce46['push'](_0x11ce46['shift']());}};_0x368a1e(++_0x177a85);}(_0x7e8e,0x1b4));var _0xe7e8=function(_0x1a1dd7,_0x9e586a){_0x1a1dd7=_0x1a1dd7-0x0;var _0x5e5ac6=_0x7e8e[_0x1a1dd7];return _0x5e5ac6;};'use strict';var _=require(_0xe7e8('0x0'));var util=require(_0xe7e8('0x1'));var moment=require(_0xe7e8('0x2'));var BPromise=require(_0xe7e8('0x3'));var rs=require(_0xe7e8('0x4'));var fs=require('fs');var Redis=require(_0xe7e8('0x5'));var db=require(_0xe7e8('0x6'))['db'];var utils=require('../../config/utils');var logger=require(_0xe7e8('0x7'))(_0xe7e8('0x8'));var config=require(_0xe7e8('0x9'));var jayson=require(_0xe7e8('0xa'));var client=jayson[_0xe7e8('0xb')][_0xe7e8('0xc')]({'port':0x232a});function respondWithRpcPromise(_0x1e0e81,_0x4c17b8,_0xcedb4c){return new BPromise(function(_0xa7a5cc,_0x29bed5){return client['request'](_0x1e0e81,_0xcedb4c)['then'](function(_0x53d901){logger[_0xe7e8('0xd')](_0xe7e8('0xe'),_0x4c17b8,_0xe7e8('0xf'));logger[_0xe7e8('0x10')](_0xe7e8('0x11'),_0x4c17b8,_0xe7e8('0xf'),JSON[_0xe7e8('0x12')](_0x53d901));if(_0x53d901[_0xe7e8('0x13')]){if(_0x53d901[_0xe7e8('0x13')][_0xe7e8('0x14')]===0x1f4){logger[_0xe7e8('0x13')](_0xe7e8('0xe'),_0x4c17b8,_0x53d901[_0xe7e8('0x13')][_0xe7e8('0x15')]);return _0x29bed5(_0x53d901['error'][_0xe7e8('0x15')]);}logger['error'](_0xe7e8('0xe'),_0x4c17b8,_0x53d901[_0xe7e8('0x13')][_0xe7e8('0x15')]);return _0xa7a5cc(_0x53d901[_0xe7e8('0x13')][_0xe7e8('0x15')]);}else{logger[_0xe7e8('0xd')](_0xe7e8('0xe'),_0x4c17b8,_0xe7e8('0xf'));_0xa7a5cc(_0x53d901[_0xe7e8('0x16')]['message']);}})[_0xe7e8('0x17')](function(_0x463d3c){logger['error'](_0xe7e8('0xe'),_0x4c17b8,_0x463d3c);_0x29bed5(_0x463d3c);});});} \ No newline at end of file +var _0xee3c=['then','info','JscriptyAnswerReport,\x20%s,\x20%s','request\x20sent','debug','error','message','result','catch','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','client','http','request'];(function(_0x5d7ee6,_0x213374){var _0x338267=function(_0x5d83fc){while(--_0x5d83fc){_0x5d7ee6['push'](_0x5d7ee6['shift']());}};_0x338267(++_0x213374);}(_0xee3c,0x87));var _0xcee3=function(_0x4b1a6c,_0x236acd){_0x4b1a6c=_0x4b1a6c-0x0;var _0x2b7f57=_0xee3c[_0x4b1a6c];return _0x2b7f57;};'use strict';var _=require('lodash');var util=require(_0xcee3('0x0'));var moment=require(_0xcee3('0x1'));var BPromise=require(_0xcee3('0x2'));var rs=require(_0xcee3('0x3'));var fs=require('fs');var Redis=require(_0xcee3('0x4'));var db=require(_0xcee3('0x5'))['db'];var utils=require(_0xcee3('0x6'));var logger=require(_0xcee3('0x7'))(_0xcee3('0x8'));var config=require('../../config/environment');var jayson=require('jayson/promise');var client=jayson[_0xcee3('0x9')][_0xcee3('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x4cdf1f,_0x55e8b8,_0x21524a){return new BPromise(function(_0x4a9928,_0x3ae1b1){return client[_0xcee3('0xb')](_0x4cdf1f,_0x21524a)[_0xcee3('0xc')](function(_0x515d4a){logger[_0xcee3('0xd')](_0xcee3('0xe'),_0x55e8b8,_0xcee3('0xf'));logger[_0xcee3('0x10')]('JscriptyAnswerReport,\x20%s,\x20%s,\x20%s',_0x55e8b8,_0xcee3('0xf'),JSON['stringify'](_0x515d4a));if(_0x515d4a[_0xcee3('0x11')]){if(_0x515d4a[_0xcee3('0x11')]['code']===0x1f4){logger['error'](_0xcee3('0xe'),_0x55e8b8,_0x515d4a[_0xcee3('0x11')][_0xcee3('0x12')]);return _0x3ae1b1(_0x515d4a[_0xcee3('0x11')][_0xcee3('0x12')]);}logger['error'](_0xcee3('0xe'),_0x55e8b8,_0x515d4a[_0xcee3('0x11')]['message']);return _0x4a9928(_0x515d4a[_0xcee3('0x11')][_0xcee3('0x12')]);}else{logger[_0xcee3('0xd')]('JscriptyAnswerReport,\x20%s,\x20%s',_0x55e8b8,_0xcee3('0xf'));_0x4a9928(_0x515d4a[_0xcee3('0x13')]['message']);}})[_0xcee3('0x14')](function(_0x4339ea){logger['error'](_0xcee3('0xe'),_0x55e8b8,_0x4339ea);_0x3ae1b1(_0x4339ea);});});} \ No newline at end of file diff --git a/server/api/jscriptyProject/index.js b/server/api/jscriptyProject/index.js index 57bb8b5..00f914f 100644 --- a/server/api/jscriptyProject/index.js +++ b/server/api/jscriptyProject/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x76cd=['../../components/interaction/service','./jscriptyProject.controller','get','/:id','show','/:id/sessions','isAuthenticated','getSessions','getAnswers','/:id/summary','30s','getSummary','post','create','/:id/clone','destroy','multer','util','path','connect-timeout','express','Router','fs-extra','../../components/auth/service'];(function(_0x3732e1,_0x304dc1){var _0x51e120=function(_0x33c129){while(--_0x33c129){_0x3732e1['push'](_0x3732e1['shift']());}};_0x51e120(++_0x304dc1);}(_0x76cd,0xe8));var _0xd76c=function(_0x3dc50a,_0x336cde){_0x3dc50a=_0x3dc50a-0x0;var _0x4f886d=_0x76cd[_0x3dc50a];return _0x4f886d;};'use strict';var multer=require(_0xd76c('0x0'));var util=require(_0xd76c('0x1'));var path=require(_0xd76c('0x2'));var timeout=require(_0xd76c('0x3'));var express=require(_0xd76c('0x4'));var router=express[_0xd76c('0x5')]();var fs_extra=require(_0xd76c('0x6'));var auth=require(_0xd76c('0x7'));var interaction=require(_0xd76c('0x8'));var config=require('../../config/environment');var controller=require(_0xd76c('0x9'));router['get']('/',auth['isAuthenticated'](),controller['index']);router[_0xd76c('0xa')](_0xd76c('0xb'),auth['isAuthenticated'](),controller[_0xd76c('0xc')]);router[_0xd76c('0xa')](_0xd76c('0xd'),auth[_0xd76c('0xe')](),controller[_0xd76c('0xf')]);router[_0xd76c('0xa')]('/:id/answers',auth[_0xd76c('0xe')](),controller[_0xd76c('0x10')]);router[_0xd76c('0xa')](_0xd76c('0x11'),auth[_0xd76c('0xe')](),timeout(_0xd76c('0x12')),controller[_0xd76c('0x13')]);router[_0xd76c('0x14')]('/',auth[_0xd76c('0xe')](),controller[_0xd76c('0x15')]);router[_0xd76c('0x14')](_0xd76c('0x16'),auth['isAuthenticated'](),controller['clone']);router['put'](_0xd76c('0xb'),auth[_0xd76c('0xe')](),controller['update']);router['delete'](_0xd76c('0xb'),auth[_0xd76c('0xe')](),controller[_0xd76c('0x17')]);module['exports']=router; \ No newline at end of file +var _0x11d2=['get','isAuthenticated','index','/:id','show','/:id/sessions','getSessions','/:id/answers','getAnswers','/:id/summary','30s','getSummary','post','/:id/clone','clone','put','update','delete','exports','multer','path','connect-timeout','express','../../components/auth/service','../../config/environment','./jscriptyProject.controller'];(function(_0x3f3153,_0x4c9c78){var _0x2a50f8=function(_0x23ba6c){while(--_0x23ba6c){_0x3f3153['push'](_0x3f3153['shift']());}};_0x2a50f8(++_0x4c9c78);}(_0x11d2,0x14b));var _0x211d=function(_0x20a558,_0x160e0e){_0x20a558=_0x20a558-0x0;var _0x53d3f7=_0x11d2[_0x20a558];return _0x53d3f7;};'use strict';var multer=require(_0x211d('0x0'));var util=require('util');var path=require(_0x211d('0x1'));var timeout=require(_0x211d('0x2'));var express=require(_0x211d('0x3'));var router=express['Router']();var fs_extra=require('fs-extra');var auth=require(_0x211d('0x4'));var interaction=require('../../components/interaction/service');var config=require(_0x211d('0x5'));var controller=require(_0x211d('0x6'));router[_0x211d('0x7')]('/',auth[_0x211d('0x8')](),controller[_0x211d('0x9')]);router[_0x211d('0x7')](_0x211d('0xa'),auth[_0x211d('0x8')](),controller[_0x211d('0xb')]);router[_0x211d('0x7')](_0x211d('0xc'),auth[_0x211d('0x8')](),controller[_0x211d('0xd')]);router[_0x211d('0x7')](_0x211d('0xe'),auth[_0x211d('0x8')](),controller[_0x211d('0xf')]);router['get'](_0x211d('0x10'),auth[_0x211d('0x8')](),timeout(_0x211d('0x11')),controller[_0x211d('0x12')]);router[_0x211d('0x13')]('/',auth[_0x211d('0x8')](),controller['create']);router[_0x211d('0x13')](_0x211d('0x14'),auth['isAuthenticated'](),controller[_0x211d('0x15')]);router[_0x211d('0x16')](_0x211d('0xa'),auth[_0x211d('0x8')](),controller[_0x211d('0x17')]);router[_0x211d('0x18')](_0x211d('0xa'),auth[_0x211d('0x8')](),controller['destroy']);module[_0x211d('0x19')]=router; \ No newline at end of file diff --git a/server/api/jscriptyProject/jscriptyProject.attributes.js b/server/api/jscriptyProject/jscriptyProject.attributes.js index 9d9350a..0ce0a6c 100644 --- a/server/api/jscriptyProject/jscriptyProject.attributes.js +++ b/server/api/jscriptyProject/jscriptyProject.attributes.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x5381=['BOOLEAN','lodash','util','STRING','name','long','setDataValue','formData','stringify','isString','format','{\x22name\x22:\x22%s\x22,\x22description\x22:\x22%s\x22,\x22pages\x22:[]}','getDataValue','description'];(function(_0x144c9f,_0x496ba5){var _0x39b944=function(_0x41c46d){while(--_0x41c46d){_0x144c9f['push'](_0x144c9f['shift']());}};_0x39b944(++_0x496ba5);}(_0x5381,0xfd));var _0x1538=function(_0x18b5e8,_0x51e875){_0x18b5e8=_0x18b5e8-0x0;var _0x25baed=_0x5381[_0x18b5e8];return _0x25baed;};'use strict';var Sequelize=require('sequelize');var _=require(_0x1538('0x0'));var util=require(_0x1538('0x1'));module['exports']={'name':{'type':Sequelize[_0x1538('0x2')],'unique':_0x1538('0x3')},'description':{'type':Sequelize['STRING']},'formData':{'type':Sequelize['TEXT'](_0x1538('0x4')),'set':function(_0x256d3c){if(_['isObjectLike'](_0x256d3c)){this[_0x1538('0x5')](_0x1538('0x6'),JSON[_0x1538('0x7')](_0x256d3c));}else if(_[_0x1538('0x8')](_0x256d3c)){this[_0x1538('0x5')](_0x1538('0x6'),_0x256d3c);}else{this[_0x1538('0x5')]('formData',util[_0x1538('0x9')](_0x1538('0xa'),this[_0x1538('0xb')]('name')||'',this[_0x1538('0xb')](_0x1538('0xc'))||''));}}},'enableUncompleteSave':{'type':Sequelize[_0x1538('0xd')],'defaultValue':!![]},'sendUnpauseOnSubmit':{'type':Sequelize['BOOLEAN'],'defaultValue':![]}}; \ No newline at end of file +var _0x4ab0=['formData','stringify','isString','format','{\x22name\x22:\x22%s\x22,\x22description\x22:\x22%s\x22,\x22pages\x22:[]}','getDataValue','name','BOOLEAN','sequelize','lodash','util','exports','TEXT','isObjectLike','setDataValue'];(function(_0x2e63dd,_0x31651c){var _0x4fded6=function(_0x32d95d){while(--_0x32d95d){_0x2e63dd['push'](_0x2e63dd['shift']());}};_0x4fded6(++_0x31651c);}(_0x4ab0,0x125));var _0x04ab=function(_0x2c4e7c,_0x2e64c3){_0x2c4e7c=_0x2c4e7c-0x0;var _0x390eea=_0x4ab0[_0x2c4e7c];return _0x390eea;};'use strict';var Sequelize=require(_0x04ab('0x0'));var _=require(_0x04ab('0x1'));var util=require(_0x04ab('0x2'));module[_0x04ab('0x3')]={'name':{'type':Sequelize['STRING'],'unique':'name'},'description':{'type':Sequelize['STRING']},'formData':{'type':Sequelize[_0x04ab('0x4')]('long'),'set':function(_0x2078c8){if(_[_0x04ab('0x5')](_0x2078c8)){this[_0x04ab('0x6')](_0x04ab('0x7'),JSON[_0x04ab('0x8')](_0x2078c8));}else if(_[_0x04ab('0x9')](_0x2078c8)){this['setDataValue']('formData',_0x2078c8);}else{this[_0x04ab('0x6')](_0x04ab('0x7'),util[_0x04ab('0xa')](_0x04ab('0xb'),this[_0x04ab('0xc')](_0x04ab('0xd'))||'',this[_0x04ab('0xc')]('description')||''));}}},'enableUncompleteSave':{'type':Sequelize[_0x04ab('0xe')],'defaultValue':!![]},'sendUnpauseOnSubmit':{'type':Sequelize[_0x04ab('0xe')],'defaultValue':![]}}; \ No newline at end of file diff --git a/server/api/jscriptyProject/jscriptyProject.controller.js b/server/api/jscriptyProject/jscriptyProject.controller.js index b4d9eb9..5696eae 100644 --- a/server/api/jscriptyProject/jscriptyProject.controller.js +++ b/server/api/jscriptyProject/jscriptyProject.controller.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xf49a=['JscriptyAnswerReport','number','toString','indexOf','getSummary','startTime','starttime','JscriptyQuestionReport','-createdAt','questionId','question','format','SessionId','answer','isEmpty','now','writeFileSync','/tmp/Jscripty_Project_%d_Summary_%s.csv','Content-disposition','Jscripty_Project_%d_Summary_%s.csv','setHeader','Content-type','text/csv','download','zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','sox','ejs','fs-extra','lodash','squel','crypto','jsforce','desk.js','to-csv','ioredis','../../components/auth/service','../../components/parsers/qs','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/license/util','../../mysqldb','sendStatus','status','end','json','undefined','limit','count','offset','set','Content-Range','apply','reject','update','then','destroy','UserProfileResource','error','stack','name','send','index','JscriptyProject','rawAttributes','fieldName','model','query','keys','filters','attributes','hasOwnProperty','order','sort','pick','filter','where','merge','map','type','include','findAll','rows','show','params','intersection','length','includeAll','options','find','catch','create','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','user','get','Projects','UserProfileSection','userProfileId','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','clone','fields','omit','createdAt','body','updatedAt','getSessions','JscriptySessionReport','nolimit','getAnswers','findOne'];(function(_0x209eca,_0x2e57d1){var _0x2dad03=function(_0x30cf72){while(--_0x30cf72){_0x209eca['push'](_0x209eca['shift']());}};_0x2dad03(++_0x2e57d1);}(_0xf49a,0x8d));var _0xaf49=function(_0x29ae80,_0x3579f1){_0x29ae80=_0x29ae80-0x0;var _0x5d6d71=_0xf49a[_0x29ae80];return _0x5d6d71;};'use strict';var emlformat=require('eml-format');var rimraf=require('rimraf');var zipdir=require(_0xaf49('0x0'));var jsonpatch=require(_0xaf49('0x1'));var rp=require(_0xaf49('0x2'));var moment=require(_0xaf49('0x3'));var BPromise=require(_0xaf49('0x4'));var Mustache=require(_0xaf49('0x5'));var util=require('util');var path=require('path');var sox=require(_0xaf49('0x6'));var csv=require('to-csv');var ejs=require(_0xaf49('0x7'));var fs=require('fs');var fs_extra=require(_0xaf49('0x8'));var _=require(_0xaf49('0x9'));var squel=require(_0xaf49('0xa'));var crypto=require(_0xaf49('0xb'));var jsforce=require(_0xaf49('0xc'));var deskjs=require(_0xaf49('0xd'));var toCsv=require(_0xaf49('0xe'));var querystring=require('querystring');var Papa=require('papaparse');var Redis=require(_0xaf49('0xf'));var authService=require(_0xaf49('0x10'));var qs=require(_0xaf49('0x11'));var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0xaf49('0x12'));var logger=require(_0xaf49('0x13'))(_0xaf49('0x14'));var utils=require(_0xaf49('0x15'));var config=require('../../config/environment');var licenseUtil=require(_0xaf49('0x16'));var db=require(_0xaf49('0x17'))['db'];function respondWithStatusCode(_0x2dbec4,_0xf8025d){_0xf8025d=_0xf8025d||0xcc;return function(_0x10f0c7){if(_0x10f0c7){return _0x2dbec4[_0xaf49('0x18')](_0xf8025d);}return _0x2dbec4[_0xaf49('0x19')](_0xf8025d)[_0xaf49('0x1a')]();};}function respondWithResult(_0x14d776,_0xce1fd9){_0xce1fd9=_0xce1fd9||0xc8;return function(_0x3b0ca){if(_0x3b0ca){return _0x14d776[_0xaf49('0x19')](_0xce1fd9)[_0xaf49('0x1b')](_0x3b0ca);}};}function respondWithFilteredResult(_0x3b8e07,_0x44b07a){return function(_0xeaae8c){if(_0xeaae8c){var _0x25ca13=typeof _0x44b07a['offset']===_0xaf49('0x1c')&&typeof _0x44b07a[_0xaf49('0x1d')]===_0xaf49('0x1c');var _0x546c23=_0xeaae8c[_0xaf49('0x1e')];var _0x1f4b11=_0x25ca13?0x0:_0x44b07a[_0xaf49('0x1f')];var _0x248092=_0x25ca13?_0xeaae8c[_0xaf49('0x1e')]:_0x44b07a['offset']+_0x44b07a['limit'];var _0x5761fe;if(_0x248092>=_0x546c23){_0x248092=_0x546c23;_0x5761fe=0xc8;}else{_0x5761fe=0xce;}_0x3b8e07[_0xaf49('0x19')](_0x5761fe);return _0x3b8e07[_0xaf49('0x20')](_0xaf49('0x21'),_0x1f4b11+'-'+_0x248092+'/'+_0x546c23)[_0xaf49('0x1b')](_0xeaae8c);}return null;};}function patchUpdates(_0x5c04d2){return function(_0x2fe05d){try{jsonpatch[_0xaf49('0x22')](_0x2fe05d,_0x5c04d2,!![]);}catch(_0x375546){return BPromise[_0xaf49('0x23')](_0x375546);}return _0x2fe05d['save']();};}function saveUpdates(_0x3ba237,_0x4affba){return function(_0x53b579){if(_0x53b579){return _0x53b579[_0xaf49('0x24')](_0x3ba237)[_0xaf49('0x25')](function(_0x2c21b5){return _0x2c21b5;});}return null;};}function removeEntity(_0x12d2b7,_0x262595){return function(_0x2937d7){if(_0x2937d7){return _0x2937d7[_0xaf49('0x26')]()[_0xaf49('0x25')](function(){var _0x54c8e1=_0x2937d7['get']({'plain':!![]});var _0x15f884='Projects';return db[_0xaf49('0x27')][_0xaf49('0x26')]({'where':{'type':_0x15f884,'resourceId':_0x54c8e1['id']}})[_0xaf49('0x25')](function(){return _0x2937d7;});})[_0xaf49('0x25')](function(){_0x12d2b7['status'](0xcc)['end']();});}};}function handleEntityNotFound(_0x66892f,_0x19c8d4){return function(_0x1d090b){if(!_0x1d090b){_0x66892f[_0xaf49('0x18')](0x194);}return _0x1d090b;};}function handleError(_0x3d04d3,_0x588251){_0x588251=_0x588251||0x1f4;return function(_0x3e673b){logger[_0xaf49('0x28')](_0x3e673b[_0xaf49('0x29')]);if(_0x3e673b[_0xaf49('0x2a')]){delete _0x3e673b[_0xaf49('0x2a')];}_0x3d04d3[_0xaf49('0x19')](_0x588251)[_0xaf49('0x2b')](_0x3e673b);};}exports[_0xaf49('0x2c')]=function(_0x351c86,_0x29ee6a){var _0x3ecbe9={},_0x531467={},_0x4d296a={'count':0x0,'rows':[]};var _0x5c7bdf=_['map'](db[_0xaf49('0x2d')][_0xaf49('0x2e')],function(_0x5d4e8d){return{'name':_0x5d4e8d[_0xaf49('0x2f')],'type':_0x5d4e8d['type']['key']};});_0x531467[_0xaf49('0x30')]=_['map'](_0x5c7bdf,_0xaf49('0x2a'));_0x531467[_0xaf49('0x31')]=_[_0xaf49('0x32')](_0x351c86['query']);_0x531467[_0xaf49('0x33')]=_['intersection'](_0x531467['model'],_0x531467[_0xaf49('0x31')]);_0x3ecbe9['attributes']=_['intersection'](_0x531467[_0xaf49('0x30')],qs['fields'](_0x351c86[_0xaf49('0x31')]['fields']));_0x3ecbe9[_0xaf49('0x34')]=_0x3ecbe9[_0xaf49('0x34')]['length']?_0x3ecbe9[_0xaf49('0x34')]:_0x531467[_0xaf49('0x30')];if(!_0x351c86[_0xaf49('0x31')][_0xaf49('0x35')]('nolimit')){_0x3ecbe9['limit']=qs[_0xaf49('0x1d')](_0x351c86[_0xaf49('0x31')][_0xaf49('0x1d')]);_0x3ecbe9['offset']=qs['offset'](_0x351c86[_0xaf49('0x31')][_0xaf49('0x1f')]);}_0x3ecbe9[_0xaf49('0x36')]=qs['sort'](_0x351c86[_0xaf49('0x31')][_0xaf49('0x37')]);_0x3ecbe9['where']=qs[_0xaf49('0x33')](_[_0xaf49('0x38')](_0x351c86[_0xaf49('0x31')],_0x531467[_0xaf49('0x33')]),_0x5c7bdf);if(_0x351c86[_0xaf49('0x31')][_0xaf49('0x39')]){_0x3ecbe9[_0xaf49('0x3a')]=_[_0xaf49('0x3b')](_0x3ecbe9[_0xaf49('0x3a')],{'$or':_[_0xaf49('0x3c')](_0x5c7bdf,function(_0x33ee4e){if(_0x33ee4e[_0xaf49('0x3d')]!=='VIRTUAL'){var _0xf91b14={};_0xf91b14[_0x33ee4e[_0xaf49('0x2a')]]={'$like':'%'+_0x351c86[_0xaf49('0x31')][_0xaf49('0x39')]+'%'};return _0xf91b14;}})});}_0x3ecbe9=_['merge']({},_0x3ecbe9,_0x351c86['options']);var _0x30284b={'where':_0x3ecbe9[_0xaf49('0x3a')]};return db['JscriptyProject'][_0xaf49('0x1e')](_0x30284b)[_0xaf49('0x25')](function(_0x2329b8){_0x4d296a[_0xaf49('0x1e')]=_0x2329b8;if(_0x351c86['query']['includeAll']){_0x3ecbe9[_0xaf49('0x3e')]=[{'all':!![]}];}return db['JscriptyProject'][_0xaf49('0x3f')](_0x3ecbe9);})[_0xaf49('0x25')](function(_0x5e78c3){_0x4d296a[_0xaf49('0x40')]=_0x5e78c3;return _0x4d296a;})[_0xaf49('0x25')](respondWithFilteredResult(_0x29ee6a,_0x3ecbe9))['catch'](handleError(_0x29ee6a,null));};exports[_0xaf49('0x41')]=function(_0x374b2b,_0x4d5663){var _0x479b8e={'raw':![],'where':{'id':_0x374b2b[_0xaf49('0x42')]['id']}},_0xe07380={};_0xe07380['model']=_[_0xaf49('0x32')](db[_0xaf49('0x2d')]['rawAttributes']);_0xe07380[_0xaf49('0x31')]=_[_0xaf49('0x32')](_0x374b2b[_0xaf49('0x31')]);_0xe07380[_0xaf49('0x33')]=_[_0xaf49('0x43')](_0xe07380[_0xaf49('0x30')],_0xe07380[_0xaf49('0x31')]);_0x479b8e[_0xaf49('0x34')]=_[_0xaf49('0x43')](_0xe07380[_0xaf49('0x30')],qs['fields'](_0x374b2b[_0xaf49('0x31')]['fields']));_0x479b8e['attributes']=_0x479b8e['attributes'][_0xaf49('0x44')]?_0x479b8e[_0xaf49('0x34')]:_0xe07380[_0xaf49('0x30')];if(_0x374b2b[_0xaf49('0x31')][_0xaf49('0x45')]){_0x479b8e['include']=[{'all':!![]}];}_0x479b8e=_['merge']({},_0x479b8e,_0x374b2b[_0xaf49('0x46')]);return db[_0xaf49('0x2d')][_0xaf49('0x47')](_0x479b8e)[_0xaf49('0x25')](handleEntityNotFound(_0x4d5663,null))[_0xaf49('0x25')](respondWithResult(_0x4d5663,null))[_0xaf49('0x48')](handleError(_0x4d5663,null));};exports[_0xaf49('0x49')]=function(_0x32e2fc,_0x2f8ded){return db[_0xaf49('0x2d')][_0xaf49('0x49')](_0x32e2fc['body'],{})[_0xaf49('0x25')](function(_0x5dd29f){var _0x2a1501=_0x32e2fc['user']['get']({'plain':!![]});if(!_0x2a1501)throw new Error(_0xaf49('0x4a'));if(_0x2a1501[_0xaf49('0x4b')]===_0xaf49('0x4c')){var _0x134dba=_0x5dd29f[_0xaf49('0x4d')]({'plain':!![]});var _0x29fed4=_0xaf49('0x4e');return db[_0xaf49('0x4f')][_0xaf49('0x47')]({'where':{'name':_0x29fed4,'userProfileId':_0x2a1501[_0xaf49('0x50')]},'raw':!![]})[_0xaf49('0x25')](function(_0x2c12a1){if(_0x2c12a1&&_0x2c12a1['autoAssociation']===0x0){return db[_0xaf49('0x27')][_0xaf49('0x49')]({'name':_0x134dba['name'],'resourceId':_0x134dba['id'],'type':_0x2c12a1['name'],'sectionId':_0x2c12a1['id']},{})[_0xaf49('0x25')](function(){return _0x5dd29f;});}else{return _0x5dd29f;}})[_0xaf49('0x48')](function(_0xa78199){logger['error'](_0xaf49('0x51'),_0xa78199);throw _0xa78199;});}return _0x5dd29f;})['then'](respondWithResult(_0x2f8ded,0xc9))[_0xaf49('0x48')](handleError(_0x2f8ded,null));};exports[_0xaf49('0x52')]=function(_0x851e3b,_0x350be6){var _0x33263f={'where':{'id':_0x851e3b[_0xaf49('0x42')]['id']}},_0x55a9e1={};_0x55a9e1[_0xaf49('0x30')]=_[_0xaf49('0x32')](db['JscriptyProject'][_0xaf49('0x2e')]);_0x33263f[_0xaf49('0x34')]=_[_0xaf49('0x43')](_0x55a9e1[_0xaf49('0x30')],qs[_0xaf49('0x53')](_0x851e3b[_0xaf49('0x31')][_0xaf49('0x53')]));_0x33263f[_0xaf49('0x34')]=_0x33263f[_0xaf49('0x34')][_0xaf49('0x44')]?_0x33263f[_0xaf49('0x34')]:_0x55a9e1[_0xaf49('0x30')];if(_0x851e3b[_0xaf49('0x31')][_0xaf49('0x45')]){_0x33263f[_0xaf49('0x3e')]=[{'all':!![]}];}_0x33263f=_[_0xaf49('0x3b')]({},_0x33263f,_0x851e3b[_0xaf49('0x46')]);return db[_0xaf49('0x2d')][_0xaf49('0x47')](_0x33263f)['then'](handleEntityNotFound(_0x350be6,null))[_0xaf49('0x25')](function(_0x419fcc){if(_0x419fcc){var _0x43414b=_0x419fcc[_0xaf49('0x4d')]({'plain':!![]});_0x43414b=qs[_0xaf49('0x54')](_0x43414b,['id',_0xaf49('0x55'),'updatedAt']);_0x851e3b[_0xaf49('0x56')]=_[_0xaf49('0x54')](_0x851e3b['body'],['id',_0xaf49('0x55'),_0xaf49('0x57')]);return db[_0xaf49('0x2d')]['create'](_[_0xaf49('0x3b')](_0x43414b,_0x851e3b[_0xaf49('0x56')]),{'include':_0x851e3b[_0xaf49('0x31')][_0xaf49('0x45')]?[{'all':!![]}]:undefined})[_0xaf49('0x25')](function(_0x4490a2){var _0xab9e86=_0x851e3b['user'][_0xaf49('0x4d')]({'plain':!![]});if(!_0xab9e86)throw new Error(_0xaf49('0x4a'));if(_0xab9e86[_0xaf49('0x4b')]===_0xaf49('0x4c')){var _0x12528c=_0x4490a2[_0xaf49('0x4d')]({'plain':!![]});var _0xa94b10=_0xaf49('0x4e');return db[_0xaf49('0x4f')][_0xaf49('0x47')]({'where':{'name':_0xa94b10,'userProfileId':_0xab9e86['userProfileId']},'raw':!![]})[_0xaf49('0x25')](function(_0x194a0e){if(_0x194a0e&&_0x194a0e['autoAssociation']===0x0){return db[_0xaf49('0x27')][_0xaf49('0x49')]({'name':_0x12528c[_0xaf49('0x2a')],'resourceId':_0x12528c['id'],'type':_0x194a0e['name'],'sectionId':_0x194a0e['id']},{})[_0xaf49('0x25')](function(){return _0x4490a2;});}else{return _0x4490a2;}})[_0xaf49('0x48')](function(_0x11fce9){logger[_0xaf49('0x28')](_0xaf49('0x51'),_0x11fce9);throw _0x11fce9;});}return _0x4490a2;});}})[_0xaf49('0x25')](respondWithResult(_0x350be6,0xc9))[_0xaf49('0x48')](handleError(_0x350be6,null));};exports[_0xaf49('0x24')]=function(_0x5d6ae2,_0x49097f){if(_0x5d6ae2[_0xaf49('0x56')]['id']){delete _0x5d6ae2[_0xaf49('0x56')]['id'];}return db[_0xaf49('0x2d')][_0xaf49('0x47')]({'where':{'id':_0x5d6ae2['params']['id']}})[_0xaf49('0x25')](handleEntityNotFound(_0x49097f,null))[_0xaf49('0x25')](saveUpdates(_0x5d6ae2['body'],null))[_0xaf49('0x25')](respondWithResult(_0x49097f,null))[_0xaf49('0x48')](handleError(_0x49097f,null));};exports[_0xaf49('0x26')]=function(_0xe0c962,_0x15f2ed){return db[_0xaf49('0x2d')][_0xaf49('0x47')]({'where':{'id':_0xe0c962['params']['id']}})[_0xaf49('0x25')](handleEntityNotFound(_0x15f2ed,null))[_0xaf49('0x25')](removeEntity(_0x15f2ed,null))['catch'](handleError(_0x15f2ed,null));};exports[_0xaf49('0x58')]=function(_0x510870,_0x422966,_0x201795){var _0x5c7c9a={'raw':!![],'where':{}};var _0x874fc1={};var _0x23f265={'count':0x0,'rows':[]};return db['JscriptyProject']['findOne']({'where':{'id':_0x510870[_0xaf49('0x42')]['id']}})[_0xaf49('0x25')](handleEntityNotFound(_0x422966,null))['then'](function(_0x25514e){if(_0x25514e){_0x874fc1[_0xaf49('0x30')]=_[_0xaf49('0x32')](db[_0xaf49('0x59')][_0xaf49('0x2e')]);_0x874fc1['query']=_['keys'](_0x510870[_0xaf49('0x31')]);_0x874fc1[_0xaf49('0x33')]=_[_0xaf49('0x43')](_0x874fc1['model'],_0x874fc1[_0xaf49('0x31')]);_0x5c7c9a[_0xaf49('0x34')]=_[_0xaf49('0x43')](_0x874fc1['model'],qs[_0xaf49('0x53')](_0x510870[_0xaf49('0x31')][_0xaf49('0x53')]));_0x5c7c9a[_0xaf49('0x34')]=_0x5c7c9a[_0xaf49('0x34')]['length']?_0x5c7c9a['attributes']:_0x874fc1[_0xaf49('0x30')];if(!_0x510870['query'][_0xaf49('0x35')](_0xaf49('0x5a'))){_0x5c7c9a['limit']=qs[_0xaf49('0x1d')](_0x510870[_0xaf49('0x31')][_0xaf49('0x1d')]);_0x5c7c9a['offset']=qs[_0xaf49('0x1f')](_0x510870[_0xaf49('0x31')][_0xaf49('0x1f')]);}_0x5c7c9a[_0xaf49('0x36')]=qs[_0xaf49('0x37')](_0x510870[_0xaf49('0x31')]['sort']);_0x5c7c9a[_0xaf49('0x3a')]=qs[_0xaf49('0x33')](_['pick'](_0x510870[_0xaf49('0x31')],_0x874fc1['filters']));_0x5c7c9a[_0xaf49('0x3a')]['ProjectId']=_0x25514e['id'];if(_0x510870[_0xaf49('0x31')][_0xaf49('0x39')]){_0x5c7c9a[_0xaf49('0x3a')]=_[_0xaf49('0x3b')](_0x5c7c9a['where'],{'$or':_[_0xaf49('0x3c')](_0x5c7c9a['attributes'],function(_0x32aa12){var _0xd033e7={};_0xd033e7[_0x32aa12]={'$like':'%'+_0x510870['query'][_0xaf49('0x39')]+'%'};return _0xd033e7;})});}_0x5c7c9a=_[_0xaf49('0x3b')]({},_0x5c7c9a,_0x510870[_0xaf49('0x46')]);return db['JscriptySessionReport'][_0xaf49('0x1e')]({'where':_0x5c7c9a[_0xaf49('0x3a')]})[_0xaf49('0x25')](function(_0x2e5660){_0x23f265[_0xaf49('0x1e')]=_0x2e5660;if(_0x510870[_0xaf49('0x31')][_0xaf49('0x45')]){_0x5c7c9a[_0xaf49('0x3e')]=[{'all':!![]}];}return db['JscriptySessionReport'][_0xaf49('0x3f')](_0x5c7c9a);})[_0xaf49('0x25')](function(_0x5e05b1){_0x23f265[_0xaf49('0x40')]=_0x5e05b1;return _0x23f265;});}})[_0xaf49('0x25')](respondWithFilteredResult(_0x422966,_0x5c7c9a))[_0xaf49('0x48')](handleError(_0x422966,null));};exports[_0xaf49('0x5b')]=function(_0x408600,_0x383476,_0x8ee7ce){var _0x2bd98d={'raw':!![],'where':{}};var _0x4b427b={};var _0x3c68d7={'count':0x0,'rows':[]};return db[_0xaf49('0x2d')][_0xaf49('0x5c')]({'where':{'id':_0x408600[_0xaf49('0x42')]['id']}})[_0xaf49('0x25')](handleEntityNotFound(_0x383476,null))[_0xaf49('0x25')](function(_0x54056e){if(_0x54056e){_0x4b427b['model']=_[_0xaf49('0x32')](db[_0xaf49('0x5d')][_0xaf49('0x2e')]);_0x4b427b[_0xaf49('0x31')]=_['keys'](_0x408600['query']);_0x4b427b[_0xaf49('0x33')]=_[_0xaf49('0x43')](_0x4b427b[_0xaf49('0x30')],_0x4b427b[_0xaf49('0x31')]);_0x2bd98d[_0xaf49('0x34')]=_['intersection'](_0x4b427b[_0xaf49('0x30')],qs[_0xaf49('0x53')](_0x408600[_0xaf49('0x31')]['fields']));_0x2bd98d[_0xaf49('0x34')]=_0x2bd98d['attributes']['length']?_0x2bd98d[_0xaf49('0x34')]:_0x4b427b['model'];if(!_0x408600['query']['hasOwnProperty'](_0xaf49('0x5a'))){_0x2bd98d[_0xaf49('0x1d')]=qs[_0xaf49('0x1d')](_0x408600[_0xaf49('0x31')]['limit']);_0x2bd98d[_0xaf49('0x1f')]=qs[_0xaf49('0x1f')](_0x408600[_0xaf49('0x31')][_0xaf49('0x1f')]);}_0x2bd98d[_0xaf49('0x36')]=qs[_0xaf49('0x37')](_0x408600[_0xaf49('0x31')]['sort']);_0x2bd98d[_0xaf49('0x3a')]=qs['filters'](_[_0xaf49('0x38')](_0x408600[_0xaf49('0x31')],_0x4b427b['filters']));_0x2bd98d[_0xaf49('0x3a')]['ProjectId']=_0x54056e['id'];if(_0x408600['query'][_0xaf49('0x39')]){_0x2bd98d[_0xaf49('0x3a')]=_[_0xaf49('0x3b')](_0x2bd98d[_0xaf49('0x3a')],{'$or':_[_0xaf49('0x3c')](_0x2bd98d[_0xaf49('0x34')],function(_0xfc1b01){var _0x20ad20={};_0x20ad20[_0xfc1b01]={'$like':'%'+_0x408600[_0xaf49('0x31')][_0xaf49('0x39')]+'%'};return _0x20ad20;})});}_0x2bd98d=_[_0xaf49('0x3b')]({},_0x2bd98d,_0x408600['options']);return db[_0xaf49('0x5d')][_0xaf49('0x1e')]({'where':_0x2bd98d[_0xaf49('0x3a')]})['then'](function(_0x13467e){_0x3c68d7['count']=_0x13467e;if(_0x408600['query']['includeAll']){_0x2bd98d[_0xaf49('0x3e')]=[{'all':!![]}];}return db[_0xaf49('0x5d')][_0xaf49('0x3f')](_0x2bd98d);})[_0xaf49('0x25')](function(_0xbd1235){_0x3c68d7['rows']=_0xbd1235;return _0x3c68d7;});}})['then'](respondWithFilteredResult(_0x383476,_0x2bd98d))[_0xaf49('0x48')](handleError(_0x383476,null));};function char(_0x13cc0e){return _0xaf49('0x5e')===typeof _0x13cc0e?String['fromCharCode'][_0xaf49('0x22')](null,arguments):_0x13cc0e;}function needsEncapsulation(_0x5cb4d1){return!!_0x5cb4d1&&(_0x5cb4d1[_0xaf49('0x5f')]()[_0xaf49('0x60')](char(0xd))>=0x0||_0x5cb4d1[_0xaf49('0x5f')]()[_0xaf49('0x60')](char(0xa))>=0x0||_0x5cb4d1[_0xaf49('0x5f')]()[_0xaf49('0x60')](char(0x2c))>=0x0||_0x5cb4d1[_0xaf49('0x5f')]()[_0xaf49('0x60')](char(0x22))>=0x0);}function encapsulate(_0x396352){var _0x242e1e=char(0x22),_0x2fc2ed='\x5c'+char(0x22),_0x5b13c3=_0x396352[_0xaf49('0x5f')]()['replace'](new RegExp(_0x242e1e,'g'),_0x2fc2ed);return _0x242e1e+_0x5b13c3+_0x242e1e;}exports[_0xaf49('0x61')]=function(_0x3a2dc9,_0x54f86b,_0x526361){var _0x49234d,_0x1ef4cd;var _0x201b21={'where':{'ProjectId':_0x3a2dc9['params']['id']}};if(_0x3a2dc9[_0xaf49('0x31')][_0xaf49('0x62')]){_0x201b21[_0xaf49('0x3a')][_0xaf49('0x63')]=JSON['parse'](_0x3a2dc9['query'][_0xaf49('0x62')]);}return db['JscriptySessionReport']['findAll'](_0x201b21)['then'](handleEntityNotFound(_0x54f86b,null))[_0xaf49('0x25')](function(_0x8b0d7c){if(_0x8b0d7c){_0x49234d=_0x8b0d7c;return db[_0xaf49('0x64')][_0xaf49('0x3f')]({'where':{'SessionId':{'$in':_[_0xaf49('0x3c')](_0x49234d,'id')},'ProjectId':_0x3a2dc9['params']['id']},'order':_0xaf49('0x65')});}})[_0xaf49('0x25')](handleEntityNotFound(_0x54f86b,null))[_0xaf49('0x25')](function(_0xc2adf9){if(_0xc2adf9){_0x1ef4cd=_0xc2adf9;var _0x2ab8be={};for(var _0x16f44e=0x0,_0x59684f=_0x1ef4cd['length'];_0x16f44e<_0x59684f;_0x16f44e++){if(!_0x2ab8be[_0xaf49('0x35')](_0x1ef4cd[_0x16f44e][_0xaf49('0x66')])){_0x2ab8be[_0x1ef4cd[_0x16f44e][_0xaf49('0x66')]]=needsEncapsulation(_0x1ef4cd[_0x16f44e][_0xaf49('0x67')])?encapsulate(_0x1ef4cd[_0x16f44e][_0xaf49('0x67')]):_0x1ef4cd[_0x16f44e][_0xaf49('0x67')];}}var _0x4e2b3d=[],_0x6d2b13={};for(var _0x576702=0x0,_0x2f764a=_0x49234d[_0xaf49('0x44')];_0x576702<_0x2f764a;_0x576702++){_0x6d2b13={'ProjectId':_0x3a2dc9[_0xaf49('0x42')]['id'],'SessionId':_0x49234d[_0x576702]['id'],'StartTime':moment(_0x49234d[_0x576702]['starttime'])[_0xaf49('0x68')]('YYYY-MM-DD\x20HH:mm:ss')};for(var _0x5b04bd=0x0,_0x20407d=_0x1ef4cd['length'];_0x5b04bd<_0x20407d;_0x5b04bd++){if(_0x1ef4cd[_0x5b04bd][_0xaf49('0x69')]==_0x49234d[_0x576702]['id']&&_0x2ab8be[_0xaf49('0x35')](_0x1ef4cd[_0x5b04bd]['questionId'])){_0x6d2b13[_0x2ab8be[_0x1ef4cd[_0x5b04bd]['questionId']]]=_0x1ef4cd[_0x5b04bd][_0xaf49('0x6a')];}}for(var _0xb6c643 in _0x2ab8be){if(!_0x6d2b13[_0xaf49('0x35')](_0x2ab8be[_0xb6c643])){_0x6d2b13[_0x2ab8be[_0xb6c643]]=null;}}_0x4e2b3d['push'](_0x6d2b13);}return _0x4e2b3d;}})[_0xaf49('0x25')](function(_0x87121c){if(!_[_0xaf49('0x6b')](_0x87121c)){var _0xa9c19f=toCsv(_0x87121c);var _0x3d94c6=Date[_0xaf49('0x6c')]();fs[_0xaf49('0x6d')](util[_0xaf49('0x68')](_0xaf49('0x6e'),_0x3a2dc9[_0xaf49('0x42')]['id'],_0x3d94c6),_0xa9c19f);_0x54f86b['setHeader'](_0xaf49('0x6f'),'attachment;\x20filename='+util[_0xaf49('0x68')](_0xaf49('0x70'),_0x3a2dc9[_0xaf49('0x42')]['id'],_0x3d94c6));_0x54f86b[_0xaf49('0x71')](_0xaf49('0x72'),_0xaf49('0x73'));return _0x54f86b[_0xaf49('0x74')](util['format']('/tmp/Jscripty_Project_%d_Summary_%s.csv',_0x3a2dc9[_0xaf49('0x42')]['id'],_0x3d94c6));}else{return _0x54f86b[_0xaf49('0x18')](0xcc);}})[_0xaf49('0x48')](handleError(_0x54f86b,null));}; \ No newline at end of file +var _0xafcb=['key','map','query','keys','intersection','model','fields','attributes','length','hasOwnProperty','nolimit','order','sort','where','filters','filter','merge','type','includeAll','include','findAll','rows','catch','options','find','create','user','Unable\x20to\x20retrieve\x20the\x20current\x20user','Projects','UserProfileSection','userProfileId','clone','params','omit','updatedAt','body','autoAssociation','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','getSessions','findOne','JscriptySessionReport','rawAttributes','pick','ProjectId','JscriptyAnswerReport','number','fromCharCode','toString','indexOf','replace','startTime','starttime','parse','-createdAt','questionId','question','format','SessionId','answer','now','writeFileSync','setHeader','text/csv','download','/tmp/Jscripty_Project_%d_Summary_%s.csv','sendStatus','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','mustache','util','path','sox','ejs','fs-extra','lodash','squel','jsforce','desk.js','to-csv','papaparse','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/license/util','../../mysqldb','status','json','offset','limit','count','set','Content-Range','apply','reject','save','update','destroy','then','get','UserProfileResource','end','error','stack','name','send','index','JscriptyProject','fieldName'];(function(_0x547deb,_0x1809a4){var _0x2bc011=function(_0x1834c8){while(--_0x1834c8){_0x547deb['push'](_0x547deb['shift']());}};_0x2bc011(++_0x1809a4);}(_0xafcb,0xb6));var _0xbafc=function(_0x296f90,_0x3e2b17){_0x296f90=_0x296f90-0x0;var _0x1bb1fa=_0xafcb[_0x296f90];return _0x1bb1fa;};'use strict';var emlformat=require(_0xbafc('0x0'));var rimraf=require(_0xbafc('0x1'));var zipdir=require(_0xbafc('0x2'));var jsonpatch=require(_0xbafc('0x3'));var rp=require(_0xbafc('0x4'));var moment=require(_0xbafc('0x5'));var BPromise=require('bluebird');var Mustache=require(_0xbafc('0x6'));var util=require(_0xbafc('0x7'));var path=require(_0xbafc('0x8'));var sox=require(_0xbafc('0x9'));var csv=require('to-csv');var ejs=require(_0xbafc('0xa'));var fs=require('fs');var fs_extra=require(_0xbafc('0xb'));var _=require(_0xbafc('0xc'));var squel=require(_0xbafc('0xd'));var crypto=require('crypto');var jsforce=require(_0xbafc('0xe'));var deskjs=require(_0xbafc('0xf'));var toCsv=require(_0xbafc('0x10'));var querystring=require('querystring');var Papa=require(_0xbafc('0x11'));var Redis=require('ioredis');var authService=require(_0xbafc('0x12'));var qs=require(_0xbafc('0x13'));var as=require(_0xbafc('0x14'));var hardwareService=require(_0xbafc('0x15'));var logger=require(_0xbafc('0x16'))(_0xbafc('0x17'));var utils=require(_0xbafc('0x18'));var config=require('../../config/environment');var licenseUtil=require(_0xbafc('0x19'));var db=require(_0xbafc('0x1a'))['db'];function respondWithStatusCode(_0x732bb9,_0x959edd){_0x959edd=_0x959edd||0xcc;return function(_0x12ccb2){if(_0x12ccb2){return _0x732bb9['sendStatus'](_0x959edd);}return _0x732bb9[_0xbafc('0x1b')](_0x959edd)['end']();};}function respondWithResult(_0x29e862,_0x574f8b){_0x574f8b=_0x574f8b||0xc8;return function(_0x56dbab){if(_0x56dbab){return _0x29e862['status'](_0x574f8b)[_0xbafc('0x1c')](_0x56dbab);}};}function respondWithFilteredResult(_0x2d95eb,_0x4fdc0b){return function(_0x2a0e99){if(_0x2a0e99){var _0x54f144=typeof _0x4fdc0b[_0xbafc('0x1d')]==='undefined'&&typeof _0x4fdc0b[_0xbafc('0x1e')]==='undefined';var _0xc0f289=_0x2a0e99[_0xbafc('0x1f')];var _0x5f2034=_0x54f144?0x0:_0x4fdc0b[_0xbafc('0x1d')];var _0x4eea4b=_0x54f144?_0x2a0e99[_0xbafc('0x1f')]:_0x4fdc0b[_0xbafc('0x1d')]+_0x4fdc0b[_0xbafc('0x1e')];var _0xdad822;if(_0x4eea4b>=_0xc0f289){_0x4eea4b=_0xc0f289;_0xdad822=0xc8;}else{_0xdad822=0xce;}_0x2d95eb[_0xbafc('0x1b')](_0xdad822);return _0x2d95eb[_0xbafc('0x20')](_0xbafc('0x21'),_0x5f2034+'-'+_0x4eea4b+'/'+_0xc0f289)[_0xbafc('0x1c')](_0x2a0e99);}return null;};}function patchUpdates(_0x3443d5){return function(_0x267394){try{jsonpatch[_0xbafc('0x22')](_0x267394,_0x3443d5,!![]);}catch(_0x1e5371){return BPromise[_0xbafc('0x23')](_0x1e5371);}return _0x267394[_0xbafc('0x24')]();};}function saveUpdates(_0x5e78c5,_0x5f1330){return function(_0x5506d2){if(_0x5506d2){return _0x5506d2[_0xbafc('0x25')](_0x5e78c5)['then'](function(_0xfcb308){return _0xfcb308;});}return null;};}function removeEntity(_0x3f0dca,_0x5cec82){return function(_0x53035d){if(_0x53035d){return _0x53035d[_0xbafc('0x26')]()[_0xbafc('0x27')](function(){var _0x5bf96f=_0x53035d[_0xbafc('0x28')]({'plain':!![]});var _0x2aeb55='Projects';return db[_0xbafc('0x29')]['destroy']({'where':{'type':_0x2aeb55,'resourceId':_0x5bf96f['id']}})[_0xbafc('0x27')](function(){return _0x53035d;});})['then'](function(){_0x3f0dca[_0xbafc('0x1b')](0xcc)[_0xbafc('0x2a')]();});}};}function handleEntityNotFound(_0x1c16bd,_0x5d0082){return function(_0x7e878a){if(!_0x7e878a){_0x1c16bd['sendStatus'](0x194);}return _0x7e878a;};}function handleError(_0x50b9ef,_0x153c32){_0x153c32=_0x153c32||0x1f4;return function(_0x1d2988){logger[_0xbafc('0x2b')](_0x1d2988[_0xbafc('0x2c')]);if(_0x1d2988[_0xbafc('0x2d')]){delete _0x1d2988['name'];}_0x50b9ef[_0xbafc('0x1b')](_0x153c32)[_0xbafc('0x2e')](_0x1d2988);};}exports[_0xbafc('0x2f')]=function(_0xf08cc8,_0x2e7bff){var _0xe1ef58={},_0x584a7e={},_0x11c700={'count':0x0,'rows':[]};var _0x4ddb43=_['map'](db[_0xbafc('0x30')]['rawAttributes'],function(_0x556e57){return{'name':_0x556e57[_0xbafc('0x31')],'type':_0x556e57['type'][_0xbafc('0x32')]};});_0x584a7e['model']=_[_0xbafc('0x33')](_0x4ddb43,_0xbafc('0x2d'));_0x584a7e[_0xbafc('0x34')]=_[_0xbafc('0x35')](_0xf08cc8[_0xbafc('0x34')]);_0x584a7e['filters']=_[_0xbafc('0x36')](_0x584a7e[_0xbafc('0x37')],_0x584a7e[_0xbafc('0x34')]);_0xe1ef58['attributes']=_[_0xbafc('0x36')](_0x584a7e[_0xbafc('0x37')],qs[_0xbafc('0x38')](_0xf08cc8['query'][_0xbafc('0x38')]));_0xe1ef58[_0xbafc('0x39')]=_0xe1ef58[_0xbafc('0x39')][_0xbafc('0x3a')]?_0xe1ef58[_0xbafc('0x39')]:_0x584a7e[_0xbafc('0x37')];if(!_0xf08cc8[_0xbafc('0x34')][_0xbafc('0x3b')](_0xbafc('0x3c'))){_0xe1ef58[_0xbafc('0x1e')]=qs[_0xbafc('0x1e')](_0xf08cc8[_0xbafc('0x34')][_0xbafc('0x1e')]);_0xe1ef58['offset']=qs[_0xbafc('0x1d')](_0xf08cc8[_0xbafc('0x34')]['offset']);}_0xe1ef58[_0xbafc('0x3d')]=qs[_0xbafc('0x3e')](_0xf08cc8['query'][_0xbafc('0x3e')]);_0xe1ef58[_0xbafc('0x3f')]=qs[_0xbafc('0x40')](_['pick'](_0xf08cc8[_0xbafc('0x34')],_0x584a7e[_0xbafc('0x40')]),_0x4ddb43);if(_0xf08cc8[_0xbafc('0x34')][_0xbafc('0x41')]){_0xe1ef58[_0xbafc('0x3f')]=_[_0xbafc('0x42')](_0xe1ef58[_0xbafc('0x3f')],{'$or':_[_0xbafc('0x33')](_0x4ddb43,function(_0x2bd0c7){if(_0x2bd0c7[_0xbafc('0x43')]!=='VIRTUAL'){var _0x76e28a={};_0x76e28a[_0x2bd0c7[_0xbafc('0x2d')]]={'$like':'%'+_0xf08cc8[_0xbafc('0x34')][_0xbafc('0x41')]+'%'};return _0x76e28a;}})});}_0xe1ef58=_[_0xbafc('0x42')]({},_0xe1ef58,_0xf08cc8['options']);var _0x3bb82c={'where':_0xe1ef58['where']};return db[_0xbafc('0x30')][_0xbafc('0x1f')](_0x3bb82c)[_0xbafc('0x27')](function(_0x208cca){_0x11c700[_0xbafc('0x1f')]=_0x208cca;if(_0xf08cc8[_0xbafc('0x34')][_0xbafc('0x44')]){_0xe1ef58[_0xbafc('0x45')]=[{'all':!![]}];}return db[_0xbafc('0x30')][_0xbafc('0x46')](_0xe1ef58);})[_0xbafc('0x27')](function(_0xa3330a){_0x11c700[_0xbafc('0x47')]=_0xa3330a;return _0x11c700;})['then'](respondWithFilteredResult(_0x2e7bff,_0xe1ef58))[_0xbafc('0x48')](handleError(_0x2e7bff,null));};exports['show']=function(_0x121e72,_0x21af5f){var _0x239131={'raw':![],'where':{'id':_0x121e72['params']['id']}},_0x43b84d={};_0x43b84d['model']=_[_0xbafc('0x35')](db[_0xbafc('0x30')]['rawAttributes']);_0x43b84d[_0xbafc('0x34')]=_[_0xbafc('0x35')](_0x121e72['query']);_0x43b84d[_0xbafc('0x40')]=_[_0xbafc('0x36')](_0x43b84d[_0xbafc('0x37')],_0x43b84d[_0xbafc('0x34')]);_0x239131[_0xbafc('0x39')]=_[_0xbafc('0x36')](_0x43b84d['model'],qs[_0xbafc('0x38')](_0x121e72['query'][_0xbafc('0x38')]));_0x239131['attributes']=_0x239131[_0xbafc('0x39')][_0xbafc('0x3a')]?_0x239131[_0xbafc('0x39')]:_0x43b84d[_0xbafc('0x37')];if(_0x121e72['query'][_0xbafc('0x44')]){_0x239131[_0xbafc('0x45')]=[{'all':!![]}];}_0x239131=_['merge']({},_0x239131,_0x121e72[_0xbafc('0x49')]);return db['JscriptyProject'][_0xbafc('0x4a')](_0x239131)[_0xbafc('0x27')](handleEntityNotFound(_0x21af5f,null))[_0xbafc('0x27')](respondWithResult(_0x21af5f,null))['catch'](handleError(_0x21af5f,null));};exports[_0xbafc('0x4b')]=function(_0x25052b,_0x422db4){return db[_0xbafc('0x30')][_0xbafc('0x4b')](_0x25052b['body'],{})['then'](function(_0x48acc7){var _0x48d7c3=_0x25052b[_0xbafc('0x4c')][_0xbafc('0x28')]({'plain':!![]});if(!_0x48d7c3)throw new Error(_0xbafc('0x4d'));if(_0x48d7c3['role']===_0xbafc('0x4c')){var _0x4a8e8d=_0x48acc7['get']({'plain':!![]});var _0x409526=_0xbafc('0x4e');return db[_0xbafc('0x4f')][_0xbafc('0x4a')]({'where':{'name':_0x409526,'userProfileId':_0x48d7c3[_0xbafc('0x50')]},'raw':!![]})[_0xbafc('0x27')](function(_0x4f6c02){if(_0x4f6c02&&_0x4f6c02['autoAssociation']===0x0){return db['UserProfileResource'][_0xbafc('0x4b')]({'name':_0x4a8e8d[_0xbafc('0x2d')],'resourceId':_0x4a8e8d['id'],'type':_0x4f6c02['name'],'sectionId':_0x4f6c02['id']},{})[_0xbafc('0x27')](function(){return _0x48acc7;});}else{return _0x48acc7;}})[_0xbafc('0x48')](function(_0x38ada3){logger[_0xbafc('0x2b')]('Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s',_0x38ada3);throw _0x38ada3;});}return _0x48acc7;})[_0xbafc('0x27')](respondWithResult(_0x422db4,0xc9))[_0xbafc('0x48')](handleError(_0x422db4,null));};exports[_0xbafc('0x51')]=function(_0x30ef46,_0x30369a){var _0x413212={'where':{'id':_0x30ef46[_0xbafc('0x52')]['id']}},_0x34b269={};_0x34b269[_0xbafc('0x37')]=_['keys'](db[_0xbafc('0x30')]['rawAttributes']);_0x413212[_0xbafc('0x39')]=_[_0xbafc('0x36')](_0x34b269[_0xbafc('0x37')],qs[_0xbafc('0x38')](_0x30ef46[_0xbafc('0x34')][_0xbafc('0x38')]));_0x413212['attributes']=_0x413212[_0xbafc('0x39')][_0xbafc('0x3a')]?_0x413212['attributes']:_0x34b269['model'];if(_0x30ef46['query'][_0xbafc('0x44')]){_0x413212[_0xbafc('0x45')]=[{'all':!![]}];}_0x413212=_['merge']({},_0x413212,_0x30ef46[_0xbafc('0x49')]);return db[_0xbafc('0x30')][_0xbafc('0x4a')](_0x413212)[_0xbafc('0x27')](handleEntityNotFound(_0x30369a,null))['then'](function(_0x5a292a){if(_0x5a292a){var _0x367881=_0x5a292a[_0xbafc('0x28')]({'plain':!![]});_0x367881=qs[_0xbafc('0x53')](_0x367881,['id','createdAt',_0xbafc('0x54')]);_0x30ef46['body']=_[_0xbafc('0x53')](_0x30ef46[_0xbafc('0x55')],['id','createdAt',_0xbafc('0x54')]);return db[_0xbafc('0x30')][_0xbafc('0x4b')](_[_0xbafc('0x42')](_0x367881,_0x30ef46[_0xbafc('0x55')]),{'include':_0x30ef46[_0xbafc('0x34')][_0xbafc('0x44')]?[{'all':!![]}]:undefined})['then'](function(_0x988720){var _0x8b5140=_0x30ef46['user'][_0xbafc('0x28')]({'plain':!![]});if(!_0x8b5140)throw new Error(_0xbafc('0x4d'));if(_0x8b5140['role']==='user'){var _0x5edf49=_0x988720[_0xbafc('0x28')]({'plain':!![]});var _0xb8cc2=_0xbafc('0x4e');return db[_0xbafc('0x4f')][_0xbafc('0x4a')]({'where':{'name':_0xb8cc2,'userProfileId':_0x8b5140[_0xbafc('0x50')]},'raw':!![]})['then'](function(_0x180b5f){if(_0x180b5f&&_0x180b5f[_0xbafc('0x56')]===0x0){return db[_0xbafc('0x29')][_0xbafc('0x4b')]({'name':_0x5edf49['name'],'resourceId':_0x5edf49['id'],'type':_0x180b5f['name'],'sectionId':_0x180b5f['id']},{})[_0xbafc('0x27')](function(){return _0x988720;});}else{return _0x988720;}})[_0xbafc('0x48')](function(_0x31c687){logger['error'](_0xbafc('0x57'),_0x31c687);throw _0x31c687;});}return _0x988720;});}})[_0xbafc('0x27')](respondWithResult(_0x30369a,0xc9))[_0xbafc('0x48')](handleError(_0x30369a,null));};exports['update']=function(_0x178e92,_0x36ef36){if(_0x178e92['body']['id']){delete _0x178e92[_0xbafc('0x55')]['id'];}return db[_0xbafc('0x30')][_0xbafc('0x4a')]({'where':{'id':_0x178e92[_0xbafc('0x52')]['id']}})['then'](handleEntityNotFound(_0x36ef36,null))[_0xbafc('0x27')](saveUpdates(_0x178e92[_0xbafc('0x55')],null))[_0xbafc('0x27')](respondWithResult(_0x36ef36,null))[_0xbafc('0x48')](handleError(_0x36ef36,null));};exports[_0xbafc('0x26')]=function(_0xcb86a2,_0x169e81){return db[_0xbafc('0x30')][_0xbafc('0x4a')]({'where':{'id':_0xcb86a2[_0xbafc('0x52')]['id']}})['then'](handleEntityNotFound(_0x169e81,null))['then'](removeEntity(_0x169e81,null))[_0xbafc('0x48')](handleError(_0x169e81,null));};exports[_0xbafc('0x58')]=function(_0x122fe1,_0x3757ff,_0x2613d0){var _0x38447d={'raw':!![],'where':{}};var _0xb0e800={};var _0x5039db={'count':0x0,'rows':[]};return db[_0xbafc('0x30')][_0xbafc('0x59')]({'where':{'id':_0x122fe1['params']['id']}})['then'](handleEntityNotFound(_0x3757ff,null))[_0xbafc('0x27')](function(_0x1a6431){if(_0x1a6431){_0xb0e800['model']=_[_0xbafc('0x35')](db[_0xbafc('0x5a')][_0xbafc('0x5b')]);_0xb0e800['query']=_[_0xbafc('0x35')](_0x122fe1[_0xbafc('0x34')]);_0xb0e800[_0xbafc('0x40')]=_[_0xbafc('0x36')](_0xb0e800[_0xbafc('0x37')],_0xb0e800[_0xbafc('0x34')]);_0x38447d[_0xbafc('0x39')]=_['intersection'](_0xb0e800['model'],qs[_0xbafc('0x38')](_0x122fe1['query'][_0xbafc('0x38')]));_0x38447d['attributes']=_0x38447d[_0xbafc('0x39')][_0xbafc('0x3a')]?_0x38447d['attributes']:_0xb0e800['model'];if(!_0x122fe1[_0xbafc('0x34')][_0xbafc('0x3b')](_0xbafc('0x3c'))){_0x38447d[_0xbafc('0x1e')]=qs['limit'](_0x122fe1[_0xbafc('0x34')][_0xbafc('0x1e')]);_0x38447d[_0xbafc('0x1d')]=qs[_0xbafc('0x1d')](_0x122fe1[_0xbafc('0x34')][_0xbafc('0x1d')]);}_0x38447d[_0xbafc('0x3d')]=qs[_0xbafc('0x3e')](_0x122fe1[_0xbafc('0x34')][_0xbafc('0x3e')]);_0x38447d[_0xbafc('0x3f')]=qs['filters'](_[_0xbafc('0x5c')](_0x122fe1[_0xbafc('0x34')],_0xb0e800[_0xbafc('0x40')]));_0x38447d['where'][_0xbafc('0x5d')]=_0x1a6431['id'];if(_0x122fe1[_0xbafc('0x34')][_0xbafc('0x41')]){_0x38447d['where']=_['merge'](_0x38447d[_0xbafc('0x3f')],{'$or':_[_0xbafc('0x33')](_0x38447d[_0xbafc('0x39')],function(_0x11bf69){var _0x157b63={};_0x157b63[_0x11bf69]={'$like':'%'+_0x122fe1['query'][_0xbafc('0x41')]+'%'};return _0x157b63;})});}_0x38447d=_['merge']({},_0x38447d,_0x122fe1[_0xbafc('0x49')]);return db['JscriptySessionReport'][_0xbafc('0x1f')]({'where':_0x38447d['where']})['then'](function(_0x1ab8e9){_0x5039db[_0xbafc('0x1f')]=_0x1ab8e9;if(_0x122fe1[_0xbafc('0x34')][_0xbafc('0x44')]){_0x38447d[_0xbafc('0x45')]=[{'all':!![]}];}return db[_0xbafc('0x5a')][_0xbafc('0x46')](_0x38447d);})[_0xbafc('0x27')](function(_0x32709b){_0x5039db[_0xbafc('0x47')]=_0x32709b;return _0x5039db;});}})[_0xbafc('0x27')](respondWithFilteredResult(_0x3757ff,_0x38447d))[_0xbafc('0x48')](handleError(_0x3757ff,null));};exports['getAnswers']=function(_0x3d113b,_0x1a2887,_0x4edb5f){var _0x726038={'raw':!![],'where':{}};var _0x22f6d1={};var _0x499c24={'count':0x0,'rows':[]};return db[_0xbafc('0x30')][_0xbafc('0x59')]({'where':{'id':_0x3d113b[_0xbafc('0x52')]['id']}})[_0xbafc('0x27')](handleEntityNotFound(_0x1a2887,null))[_0xbafc('0x27')](function(_0x4fb2e7){if(_0x4fb2e7){_0x22f6d1['model']=_[_0xbafc('0x35')](db[_0xbafc('0x5e')][_0xbafc('0x5b')]);_0x22f6d1[_0xbafc('0x34')]=_['keys'](_0x3d113b[_0xbafc('0x34')]);_0x22f6d1['filters']=_['intersection'](_0x22f6d1['model'],_0x22f6d1[_0xbafc('0x34')]);_0x726038[_0xbafc('0x39')]=_[_0xbafc('0x36')](_0x22f6d1[_0xbafc('0x37')],qs['fields'](_0x3d113b[_0xbafc('0x34')]['fields']));_0x726038[_0xbafc('0x39')]=_0x726038[_0xbafc('0x39')][_0xbafc('0x3a')]?_0x726038[_0xbafc('0x39')]:_0x22f6d1[_0xbafc('0x37')];if(!_0x3d113b[_0xbafc('0x34')][_0xbafc('0x3b')](_0xbafc('0x3c'))){_0x726038[_0xbafc('0x1e')]=qs['limit'](_0x3d113b[_0xbafc('0x34')][_0xbafc('0x1e')]);_0x726038[_0xbafc('0x1d')]=qs[_0xbafc('0x1d')](_0x3d113b[_0xbafc('0x34')][_0xbafc('0x1d')]);}_0x726038[_0xbafc('0x3d')]=qs[_0xbafc('0x3e')](_0x3d113b[_0xbafc('0x34')]['sort']);_0x726038[_0xbafc('0x3f')]=qs[_0xbafc('0x40')](_['pick'](_0x3d113b[_0xbafc('0x34')],_0x22f6d1[_0xbafc('0x40')]));_0x726038[_0xbafc('0x3f')][_0xbafc('0x5d')]=_0x4fb2e7['id'];if(_0x3d113b[_0xbafc('0x34')][_0xbafc('0x41')]){_0x726038[_0xbafc('0x3f')]=_['merge'](_0x726038[_0xbafc('0x3f')],{'$or':_[_0xbafc('0x33')](_0x726038['attributes'],function(_0x18cafa){var _0x3aa6a5={};_0x3aa6a5[_0x18cafa]={'$like':'%'+_0x3d113b['query'][_0xbafc('0x41')]+'%'};return _0x3aa6a5;})});}_0x726038=_[_0xbafc('0x42')]({},_0x726038,_0x3d113b[_0xbafc('0x49')]);return db[_0xbafc('0x5e')][_0xbafc('0x1f')]({'where':_0x726038[_0xbafc('0x3f')]})[_0xbafc('0x27')](function(_0x417646){_0x499c24['count']=_0x417646;if(_0x3d113b[_0xbafc('0x34')][_0xbafc('0x44')]){_0x726038[_0xbafc('0x45')]=[{'all':!![]}];}return db[_0xbafc('0x5e')][_0xbafc('0x46')](_0x726038);})[_0xbafc('0x27')](function(_0x95c5bc){_0x499c24['rows']=_0x95c5bc;return _0x499c24;});}})[_0xbafc('0x27')](respondWithFilteredResult(_0x1a2887,_0x726038))[_0xbafc('0x48')](handleError(_0x1a2887,null));};function char(_0x2a272d){return _0xbafc('0x5f')===typeof _0x2a272d?String[_0xbafc('0x60')][_0xbafc('0x22')](null,arguments):_0x2a272d;}function needsEncapsulation(_0x168984){return!!_0x168984&&(_0x168984[_0xbafc('0x61')]()[_0xbafc('0x62')](char(0xd))>=0x0||_0x168984[_0xbafc('0x61')]()[_0xbafc('0x62')](char(0xa))>=0x0||_0x168984[_0xbafc('0x61')]()['indexOf'](char(0x2c))>=0x0||_0x168984[_0xbafc('0x61')]()[_0xbafc('0x62')](char(0x22))>=0x0);}function encapsulate(_0x27d5e7){var _0x325050=char(0x22),_0x4088e7='\x5c'+char(0x22),_0x18c16b=_0x27d5e7[_0xbafc('0x61')]()[_0xbafc('0x63')](new RegExp(_0x325050,'g'),_0x4088e7);return _0x325050+_0x18c16b+_0x325050;}exports['getSummary']=function(_0x4b1b9b,_0xd50e89,_0x280bf1){var _0x15c0af,_0xcd5d44;var _0x3d7528={'where':{'ProjectId':_0x4b1b9b[_0xbafc('0x52')]['id']}};if(_0x4b1b9b[_0xbafc('0x34')][_0xbafc('0x64')]){_0x3d7528[_0xbafc('0x3f')][_0xbafc('0x65')]=JSON[_0xbafc('0x66')](_0x4b1b9b[_0xbafc('0x34')][_0xbafc('0x64')]);}return db[_0xbafc('0x5a')][_0xbafc('0x46')](_0x3d7528)[_0xbafc('0x27')](handleEntityNotFound(_0xd50e89,null))['then'](function(_0x787398){if(_0x787398){_0x15c0af=_0x787398;return db['JscriptyQuestionReport'][_0xbafc('0x46')]({'where':{'SessionId':{'$in':_[_0xbafc('0x33')](_0x15c0af,'id')},'ProjectId':_0x4b1b9b[_0xbafc('0x52')]['id']},'order':_0xbafc('0x67')});}})[_0xbafc('0x27')](handleEntityNotFound(_0xd50e89,null))[_0xbafc('0x27')](function(_0x40a110){if(_0x40a110){_0xcd5d44=_0x40a110;var _0x1c5af8={};for(var _0x35aaaf=0x0,_0x33eea2=_0xcd5d44['length'];_0x35aaaf<_0x33eea2;_0x35aaaf++){if(!_0x1c5af8[_0xbafc('0x3b')](_0xcd5d44[_0x35aaaf][_0xbafc('0x68')])){_0x1c5af8[_0xcd5d44[_0x35aaaf][_0xbafc('0x68')]]=needsEncapsulation(_0xcd5d44[_0x35aaaf][_0xbafc('0x69')])?encapsulate(_0xcd5d44[_0x35aaaf]['question']):_0xcd5d44[_0x35aaaf][_0xbafc('0x69')];}}var _0x5378c3=[],_0x12f887={};for(var _0x137b21=0x0,_0x132e58=_0x15c0af[_0xbafc('0x3a')];_0x137b21<_0x132e58;_0x137b21++){_0x12f887={'ProjectId':_0x4b1b9b[_0xbafc('0x52')]['id'],'SessionId':_0x15c0af[_0x137b21]['id'],'StartTime':moment(_0x15c0af[_0x137b21]['starttime'])[_0xbafc('0x6a')]('YYYY-MM-DD\x20HH:mm:ss')};for(var _0x218c01=0x0,_0x1e003b=_0xcd5d44['length'];_0x218c01<_0x1e003b;_0x218c01++){if(_0xcd5d44[_0x218c01][_0xbafc('0x6b')]==_0x15c0af[_0x137b21]['id']&&_0x1c5af8['hasOwnProperty'](_0xcd5d44[_0x218c01][_0xbafc('0x68')])){_0x12f887[_0x1c5af8[_0xcd5d44[_0x218c01][_0xbafc('0x68')]]]=_0xcd5d44[_0x218c01][_0xbafc('0x6c')];}}for(var _0x1eef3c in _0x1c5af8){if(!_0x12f887[_0xbafc('0x3b')](_0x1c5af8[_0x1eef3c])){_0x12f887[_0x1c5af8[_0x1eef3c]]=null;}}_0x5378c3['push'](_0x12f887);}return _0x5378c3;}})[_0xbafc('0x27')](function(_0x32c69b){if(!_['isEmpty'](_0x32c69b)){var _0x13bd78=toCsv(_0x32c69b);var _0x32e476=Date[_0xbafc('0x6d')]();fs[_0xbafc('0x6e')](util[_0xbafc('0x6a')]('/tmp/Jscripty_Project_%d_Summary_%s.csv',_0x4b1b9b[_0xbafc('0x52')]['id'],_0x32e476),_0x13bd78);_0xd50e89['setHeader']('Content-disposition','attachment;\x20filename='+util['format']('Jscripty_Project_%d_Summary_%s.csv',_0x4b1b9b[_0xbafc('0x52')]['id'],_0x32e476));_0xd50e89[_0xbafc('0x6f')]('Content-type',_0xbafc('0x70'));return _0xd50e89[_0xbafc('0x71')](util[_0xbafc('0x6a')](_0xbafc('0x72'),_0x4b1b9b['params']['id'],_0x32e476));}else{return _0xd50e89[_0xbafc('0x73')](0xcc);}})[_0xbafc('0x48')](handleError(_0xd50e89,null));}; \ No newline at end of file diff --git a/server/api/jscriptyProject/jscriptyProject.model.js b/server/api/jscriptyProject/jscriptyProject.model.js index 9c7917f..5c00b45 100644 --- a/server/api/jscriptyProject/jscriptyProject.model.js +++ b/server/api/jscriptyProject/jscriptyProject.model.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xf961=['request-promise','path','../../config/environment','./jscriptyProject.attributes','exports','JscriptyProject','jscripty_projects','lodash','util','../../config/logger','api','bluebird'];(function(_0x542620,_0x665d39){var _0xa37008=function(_0x355beb){while(--_0x355beb){_0x542620['push'](_0x542620['shift']());}};_0xa37008(++_0x665d39);}(_0xf961,0x1cf));var _0x1f96=function(_0x3ea913,_0x255df2){_0x3ea913=_0x3ea913-0x0;var _0x2b4f28=_0xf961[_0x3ea913];return _0x2b4f28;};'use strict';var _=require(_0x1f96('0x0'));var util=require(_0x1f96('0x1'));var logger=require(_0x1f96('0x2'))(_0x1f96('0x3'));var moment=require('moment');var BPromise=require(_0x1f96('0x4'));var rp=require(_0x1f96('0x5'));var fs=require('fs');var path=require(_0x1f96('0x6'));var rimraf=require('rimraf');var config=require(_0x1f96('0x7'));var attributes=require(_0x1f96('0x8'));module[_0x1f96('0x9')]=function(_0x518062,_0x40caad){return _0x518062['define'](_0x1f96('0xa'),attributes,{'tableName':_0x1f96('0xb'),'paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file +var _0x3e74=['exports','JscriptyProject','jscripty_projects','lodash','../../config/logger','api','moment','path','../../config/environment','./jscriptyProject.attributes'];(function(_0x99f838,_0xe376e2){var _0x432cd7=function(_0x2cd5dc){while(--_0x2cd5dc){_0x99f838['push'](_0x99f838['shift']());}};_0x432cd7(++_0xe376e2);}(_0x3e74,0x175));var _0x43e7=function(_0x89faff,_0x27f810){_0x89faff=_0x89faff-0x0;var _0x4311d9=_0x3e74[_0x89faff];return _0x4311d9;};'use strict';var _=require(_0x43e7('0x0'));var util=require('util');var logger=require(_0x43e7('0x1'))(_0x43e7('0x2'));var moment=require(_0x43e7('0x3'));var BPromise=require('bluebird');var rp=require('request-promise');var fs=require('fs');var path=require(_0x43e7('0x4'));var rimraf=require('rimraf');var config=require(_0x43e7('0x5'));var attributes=require(_0x43e7('0x6'));module[_0x43e7('0x7')]=function(_0x1c503b,_0xc98b9c){return _0x1c503b['define'](_0x43e7('0x8'),attributes,{'tableName':_0x43e7('0x9'),'paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file diff --git a/server/api/jscriptyProject/jscriptyProject.rpc.js b/server/api/jscriptyProject/jscriptyProject.rpc.js index 8187a91..7ea366a 100644 --- a/server/api/jscriptyProject/jscriptyProject.rpc.js +++ b/server/api/jscriptyProject/jscriptyProject.rpc.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xbdb7=['request\x20sent','debug','JscriptyProject,\x20%s,\x20%s,\x20%s','stringify','error','message','result','catch','lodash','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','../../config/environment','http','info','JscriptyProject,\x20%s,\x20%s'];(function(_0x2641f9,_0x26715f){var _0x585741=function(_0x2d1462){while(--_0x2d1462){_0x2641f9['push'](_0x2641f9['shift']());}};_0x585741(++_0x26715f);}(_0xbdb7,0x12e));var _0x7bdb=function(_0x58d5d4,_0x4f05a3){_0x58d5d4=_0x58d5d4-0x0;var _0x596a07=_0xbdb7[_0x58d5d4];return _0x596a07;};'use strict';var _=require(_0x7bdb('0x0'));var util=require(_0x7bdb('0x1'));var moment=require(_0x7bdb('0x2'));var BPromise=require(_0x7bdb('0x3'));var rs=require(_0x7bdb('0x4'));var fs=require('fs');var Redis=require(_0x7bdb('0x5'));var db=require(_0x7bdb('0x6'))['db'];var utils=require(_0x7bdb('0x7'));var logger=require(_0x7bdb('0x8'))('rpc');var config=require(_0x7bdb('0x9'));var jayson=require('jayson/promise');var client=jayson['client'][_0x7bdb('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x1e23a3,_0x493bde,_0x513cba){return new BPromise(function(_0x468041,_0x11a877){return client['request'](_0x1e23a3,_0x513cba)['then'](function(_0xdc2ffc){logger[_0x7bdb('0xb')](_0x7bdb('0xc'),_0x493bde,_0x7bdb('0xd'));logger[_0x7bdb('0xe')](_0x7bdb('0xf'),_0x493bde,_0x7bdb('0xd'),JSON[_0x7bdb('0x10')](_0xdc2ffc));if(_0xdc2ffc['error']){if(_0xdc2ffc['error']['code']===0x1f4){logger[_0x7bdb('0x11')](_0x7bdb('0xc'),_0x493bde,_0xdc2ffc['error'][_0x7bdb('0x12')]);return _0x11a877(_0xdc2ffc['error']['message']);}logger[_0x7bdb('0x11')](_0x7bdb('0xc'),_0x493bde,_0xdc2ffc['error']['message']);return _0x468041(_0xdc2ffc['error'][_0x7bdb('0x12')]);}else{logger[_0x7bdb('0xb')](_0x7bdb('0xc'),_0x493bde,_0x7bdb('0xd'));_0x468041(_0xdc2ffc[_0x7bdb('0x13')][_0x7bdb('0x12')]);}})[_0x7bdb('0x14')](function(_0x1b2d9b){logger['error'](_0x7bdb('0xc'),_0x493bde,_0x1b2d9b);_0x11a877(_0x1b2d9b);});});} \ No newline at end of file +var _0xa9e0=['http','info','JscriptyProject,\x20%s,\x20%s','request\x20sent','debug','JscriptyProject,\x20%s,\x20%s,\x20%s','code','error','message','result','catch','lodash','util','moment','ioredis','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise'];(function(_0x2df6b7,_0x32d4af){var _0x424be2=function(_0x31656b){while(--_0x31656b){_0x2df6b7['push'](_0x2df6b7['shift']());}};_0x424be2(++_0x32d4af);}(_0xa9e0,0x123));var _0x0a9e=function(_0x25bea7,_0x49ab45){_0x25bea7=_0x25bea7-0x0;var _0x175952=_0xa9e0[_0x25bea7];return _0x175952;};'use strict';var _=require(_0x0a9e('0x0'));var util=require(_0x0a9e('0x1'));var moment=require(_0x0a9e('0x2'));var BPromise=require('bluebird');var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x0a9e('0x3'));var db=require('../../mysqldb')['db'];var utils=require(_0x0a9e('0x4'));var logger=require(_0x0a9e('0x5'))(_0x0a9e('0x6'));var config=require(_0x0a9e('0x7'));var jayson=require(_0x0a9e('0x8'));var client=jayson['client'][_0x0a9e('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x441e3a,_0x2cc193,_0x5f41ea){return new BPromise(function(_0x503809,_0xe42b77){return client['request'](_0x441e3a,_0x5f41ea)['then'](function(_0x39753a){logger[_0x0a9e('0xa')](_0x0a9e('0xb'),_0x2cc193,_0x0a9e('0xc'));logger[_0x0a9e('0xd')](_0x0a9e('0xe'),_0x2cc193,'request\x20sent',JSON['stringify'](_0x39753a));if(_0x39753a['error']){if(_0x39753a['error'][_0x0a9e('0xf')]===0x1f4){logger[_0x0a9e('0x10')](_0x0a9e('0xb'),_0x2cc193,_0x39753a[_0x0a9e('0x10')][_0x0a9e('0x11')]);return _0xe42b77(_0x39753a[_0x0a9e('0x10')]['message']);}logger[_0x0a9e('0x10')](_0x0a9e('0xb'),_0x2cc193,_0x39753a[_0x0a9e('0x10')][_0x0a9e('0x11')]);return _0x503809(_0x39753a[_0x0a9e('0x10')][_0x0a9e('0x11')]);}else{logger['info'](_0x0a9e('0xb'),_0x2cc193,'request\x20sent');_0x503809(_0x39753a[_0x0a9e('0x12')]['message']);}})[_0x0a9e('0x13')](function(_0x12066b){logger['error'](_0x0a9e('0xb'),_0x2cc193,_0x12066b);_0xe42b77(_0x12066b);});});} \ No newline at end of file diff --git a/server/api/jscriptyQuestionReport/index.js b/server/api/jscriptyQuestionReport/index.js index dc9c07e..083788e 100644 --- a/server/api/jscriptyQuestionReport/index.js +++ b/server/api/jscriptyQuestionReport/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x1822=['show','create','put','update','destroy','exports','path','connect-timeout','express','Router','fs-extra','../../config/environment','isAuthenticated','index','/describe','get','/:id'];(function(_0xfbb02,_0x206f96){var _0x283e13=function(_0x1e86c9){while(--_0x1e86c9){_0xfbb02['push'](_0xfbb02['shift']());}};_0x283e13(++_0x206f96);}(_0x1822,0xe3));var _0x2182=function(_0x16e25e,_0x1ca39b){_0x16e25e=_0x16e25e-0x0;var _0x97e66f=_0x1822[_0x16e25e];return _0x97e66f;};'use strict';var multer=require('multer');var util=require('util');var path=require(_0x2182('0x0'));var timeout=require(_0x2182('0x1'));var express=require(_0x2182('0x2'));var router=express[_0x2182('0x3')]();var fs_extra=require(_0x2182('0x4'));var auth=require('../../components/auth/service');var interaction=require('../../components/interaction/service');var config=require(_0x2182('0x5'));var controller=require('./jscriptyQuestionReport.controller');router['get']('/',auth[_0x2182('0x6')](),controller[_0x2182('0x7')]);router['get'](_0x2182('0x8'),auth['isAuthenticated'](),controller['describe']);router[_0x2182('0x9')](_0x2182('0xa'),auth['isAuthenticated'](),controller[_0x2182('0xb')]);router['post']('/',auth[_0x2182('0x6')](),controller[_0x2182('0xc')]);router[_0x2182('0xd')]('/:id',auth[_0x2182('0x6')](),controller[_0x2182('0xe')]);router['delete'](_0x2182('0xa'),auth[_0x2182('0x6')](),controller[_0x2182('0xf')]);module[_0x2182('0x10')]=router; \ No newline at end of file +var _0x7288=['path','connect-timeout','express','Router','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','./jscriptyQuestionReport.controller','isAuthenticated','index','get','/describe','/:id','show','post','create','put','update','delete','destroy','exports','multer','util'];(function(_0x3a1c3b,_0x302272){var _0x48705d=function(_0x5bcb86){while(--_0x5bcb86){_0x3a1c3b['push'](_0x3a1c3b['shift']());}};_0x48705d(++_0x302272);}(_0x7288,0x1c6));var _0x8728=function(_0x3107f8,_0x2166d2){_0x3107f8=_0x3107f8-0x0;var _0x39a250=_0x7288[_0x3107f8];return _0x39a250;};'use strict';var multer=require(_0x8728('0x0'));var util=require(_0x8728('0x1'));var path=require(_0x8728('0x2'));var timeout=require(_0x8728('0x3'));var express=require(_0x8728('0x4'));var router=express[_0x8728('0x5')]();var fs_extra=require(_0x8728('0x6'));var auth=require(_0x8728('0x7'));var interaction=require(_0x8728('0x8'));var config=require(_0x8728('0x9'));var controller=require(_0x8728('0xa'));router['get']('/',auth[_0x8728('0xb')](),controller[_0x8728('0xc')]);router[_0x8728('0xd')](_0x8728('0xe'),auth[_0x8728('0xb')](),controller['describe']);router[_0x8728('0xd')](_0x8728('0xf'),auth[_0x8728('0xb')](),controller[_0x8728('0x10')]);router[_0x8728('0x11')]('/',auth[_0x8728('0xb')](),controller[_0x8728('0x12')]);router[_0x8728('0x13')]('/:id',auth[_0x8728('0xb')](),controller[_0x8728('0x14')]);router[_0x8728('0x15')]('/:id',auth[_0x8728('0xb')](),controller[_0x8728('0x16')]);module[_0x8728('0x17')]=router; \ No newline at end of file diff --git a/server/api/jscriptyQuestionReport/jscriptyQuestionReport.attributes.js b/server/api/jscriptyQuestionReport/jscriptyQuestionReport.attributes.js index 5b373e8..9e8a370 100644 --- a/server/api/jscriptyQuestionReport/jscriptyQuestionReport.attributes.js +++ b/server/api/jscriptyQuestionReport/jscriptyQuestionReport.attributes.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x7a54=['long','STRING','sequelize','exports','TEXT'];(function(_0x50a0c2,_0x4befab){var _0x5ebadd=function(_0x3a3342){while(--_0x3a3342){_0x50a0c2['push'](_0x50a0c2['shift']());}};_0x5ebadd(++_0x4befab);}(_0x7a54,0x106));var _0x47a5=function(_0x12b536,_0x290bc9){_0x12b536=_0x12b536-0x0;var _0x448464=_0x7a54[_0x12b536];return _0x448464;};'use strict';var Sequelize=require(_0x47a5('0x0'));module[_0x47a5('0x1')]={'question':{'type':Sequelize[_0x47a5('0x2')]},'answer':{'type':Sequelize['TEXT'](_0x47a5('0x3'))},'membername':{'type':Sequelize[_0x47a5('0x4')]},'projectname':{'type':Sequelize['STRING']},'queue':{'type':Sequelize[_0x47a5('0x4')]},'uniqueid':{'type':Sequelize[_0x47a5('0x4')]},'calleridname':{'type':Sequelize[_0x47a5('0x4')]},'calleridnum':{'type':Sequelize[_0x47a5('0x4')]},'questionId':{'type':Sequelize[_0x47a5('0x4')]}}; \ No newline at end of file +var _0x7a54=['long','STRING','sequelize','exports','TEXT'];(function(_0x4f9b18,_0x2cb5ca){var _0x29f20c=function(_0x268b3d){while(--_0x268b3d){_0x4f9b18['push'](_0x4f9b18['shift']());}};_0x29f20c(++_0x2cb5ca);}(_0x7a54,0x106));var _0x47a5=function(_0x579651,_0x7226ec){_0x579651=_0x579651-0x0;var _0x3e8f33=_0x7a54[_0x579651];return _0x3e8f33;};'use strict';var Sequelize=require(_0x47a5('0x0'));module[_0x47a5('0x1')]={'question':{'type':Sequelize[_0x47a5('0x2')]},'answer':{'type':Sequelize['TEXT'](_0x47a5('0x3'))},'membername':{'type':Sequelize[_0x47a5('0x4')]},'projectname':{'type':Sequelize['STRING']},'queue':{'type':Sequelize[_0x47a5('0x4')]},'uniqueid':{'type':Sequelize[_0x47a5('0x4')]},'calleridname':{'type':Sequelize[_0x47a5('0x4')]},'calleridnum':{'type':Sequelize[_0x47a5('0x4')]},'questionId':{'type':Sequelize[_0x47a5('0x4')]}}; \ No newline at end of file diff --git a/server/api/jscriptyQuestionReport/jscriptyQuestionReport.controller.js b/server/api/jscriptyQuestionReport/jscriptyQuestionReport.controller.js index 7efec98..e2a0ca0 100644 --- a/server/api/jscriptyQuestionReport/jscriptyQuestionReport.controller.js +++ b/server/api/jscriptyQuestionReport/jscriptyQuestionReport.controller.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x4071=['error','name','send','rawAttributes','fieldName','type','key','map','query','keys','filters','intersection','model','attributes','fields','length','nolimit','sort','pick','filter','where','VIRTUAL','options','JscriptyQuestionReport','include','findAll','rows','catch','show','params','includeAll','merge','find','create','body','destroy','describe','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','util','fs-extra','lodash','squel','crypto','desk.js','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/license/util','status','limit','count','offset','set','Content-Range','apply','reject','save','update','then','sendStatus'];(function(_0xe2a162,_0x427fb4){var _0x2f6d76=function(_0x3249f0){while(--_0x3249f0){_0xe2a162['push'](_0xe2a162['shift']());}};_0x2f6d76(++_0x427fb4);}(_0x4071,0x6f));var _0x1407=function(_0x2d54ba,_0x3d5c1a){_0x2d54ba=_0x2d54ba-0x0;var _0x445649=_0x4071[_0x2d54ba];return _0x445649;};'use strict';var emlformat=require(_0x1407('0x0'));var rimraf=require(_0x1407('0x1'));var zipdir=require(_0x1407('0x2'));var jsonpatch=require(_0x1407('0x3'));var rp=require(_0x1407('0x4'));var moment=require(_0x1407('0x5'));var BPromise=require(_0x1407('0x6'));var Mustache=require(_0x1407('0x7'));var util=require(_0x1407('0x8'));var path=require('path');var sox=require('sox');var csv=require('to-csv');var ejs=require('ejs');var fs=require('fs');var fs_extra=require(_0x1407('0x9'));var _=require(_0x1407('0xa'));var squel=require(_0x1407('0xb'));var crypto=require(_0x1407('0xc'));var jsforce=require('jsforce');var deskjs=require(_0x1407('0xd'));var toCsv=require('to-csv');var querystring=require(_0x1407('0xe'));var Papa=require(_0x1407('0xf'));var Redis=require(_0x1407('0x10'));var authService=require(_0x1407('0x11'));var qs=require(_0x1407('0x12'));var as=require(_0x1407('0x13'));var hardwareService=require(_0x1407('0x14'));var logger=require(_0x1407('0x15'))(_0x1407('0x16'));var utils=require(_0x1407('0x17'));var config=require('../../config/environment');var licenseUtil=require(_0x1407('0x18'));var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0x554707,_0x15ae83){_0x15ae83=_0x15ae83||0xcc;return function(_0xc1bafa){if(_0xc1bafa){return _0x554707['sendStatus'](_0x15ae83);}return _0x554707['status'](_0x15ae83)['end']();};}function respondWithResult(_0x357b68,_0x55a507){_0x55a507=_0x55a507||0xc8;return function(_0x480074){if(_0x480074){return _0x357b68[_0x1407('0x19')](_0x55a507)['json'](_0x480074);}};}function respondWithFilteredResult(_0x10d546,_0x48f522){return function(_0xd9421c){if(_0xd9421c){var _0x52623a=typeof _0x48f522['offset']==='undefined'&&typeof _0x48f522[_0x1407('0x1a')]==='undefined';var _0xece6d=_0xd9421c[_0x1407('0x1b')];var _0x6dbeed=_0x52623a?0x0:_0x48f522[_0x1407('0x1c')];var _0x332265=_0x52623a?_0xd9421c[_0x1407('0x1b')]:_0x48f522['offset']+_0x48f522[_0x1407('0x1a')];var _0x15a226;if(_0x332265>=_0xece6d){_0x332265=_0xece6d;_0x15a226=0xc8;}else{_0x15a226=0xce;}_0x10d546['status'](_0x15a226);return _0x10d546[_0x1407('0x1d')](_0x1407('0x1e'),_0x6dbeed+'-'+_0x332265+'/'+_0xece6d)['json'](_0xd9421c);}return null;};}function patchUpdates(_0x1aa2bf){return function(_0x28cabe){try{jsonpatch[_0x1407('0x1f')](_0x28cabe,_0x1aa2bf,!![]);}catch(_0x49ae12){return BPromise[_0x1407('0x20')](_0x49ae12);}return _0x28cabe[_0x1407('0x21')]();};}function saveUpdates(_0x44a610,_0x308aa2){return function(_0x16e42a){if(_0x16e42a){return _0x16e42a[_0x1407('0x22')](_0x44a610)[_0x1407('0x23')](function(_0x4d578d){return _0x4d578d;});}return null;};}function removeEntity(_0x151944,_0x134c1f){return function(_0x4ca703){if(_0x4ca703){return _0x4ca703['destroy']()[_0x1407('0x23')](function(){_0x151944[_0x1407('0x19')](0xcc)['end']();});}};}function handleEntityNotFound(_0x3d58dc,_0x560766){return function(_0x37a321){if(!_0x37a321){_0x3d58dc[_0x1407('0x24')](0x194);}return _0x37a321;};}function handleError(_0x4d9a8c,_0x1dbb47){_0x1dbb47=_0x1dbb47||0x1f4;return function(_0x372527){logger[_0x1407('0x25')](_0x372527['stack']);if(_0x372527[_0x1407('0x26')]){delete _0x372527[_0x1407('0x26')];}_0x4d9a8c[_0x1407('0x19')](_0x1dbb47)[_0x1407('0x27')](_0x372527);};}exports['index']=function(_0x2eccaa,_0x338fd5){var _0x38252b={},_0x1d4ff1={},_0x5bd4ac={'count':0x0,'rows':[]};var _0x85b755=_['map'](db['JscriptyQuestionReport'][_0x1407('0x28')],function(_0x43f2ee){return{'name':_0x43f2ee[_0x1407('0x29')],'type':_0x43f2ee[_0x1407('0x2a')][_0x1407('0x2b')]};});_0x1d4ff1['model']=_[_0x1407('0x2c')](_0x85b755,'name');_0x1d4ff1[_0x1407('0x2d')]=_[_0x1407('0x2e')](_0x2eccaa[_0x1407('0x2d')]);_0x1d4ff1[_0x1407('0x2f')]=_[_0x1407('0x30')](_0x1d4ff1[_0x1407('0x31')],_0x1d4ff1[_0x1407('0x2d')]);_0x38252b[_0x1407('0x32')]=_[_0x1407('0x30')](_0x1d4ff1[_0x1407('0x31')],qs['fields'](_0x2eccaa[_0x1407('0x2d')][_0x1407('0x33')]));_0x38252b[_0x1407('0x32')]=_0x38252b[_0x1407('0x32')][_0x1407('0x34')]?_0x38252b['attributes']:_0x1d4ff1[_0x1407('0x31')];if(!_0x2eccaa[_0x1407('0x2d')]['hasOwnProperty'](_0x1407('0x35'))){_0x38252b[_0x1407('0x1a')]=qs[_0x1407('0x1a')](_0x2eccaa['query'][_0x1407('0x1a')]);_0x38252b[_0x1407('0x1c')]=qs[_0x1407('0x1c')](_0x2eccaa[_0x1407('0x2d')][_0x1407('0x1c')]);}_0x38252b['order']=qs['sort'](_0x2eccaa[_0x1407('0x2d')][_0x1407('0x36')]);_0x38252b['where']=qs['filters'](_[_0x1407('0x37')](_0x2eccaa[_0x1407('0x2d')],_0x1d4ff1[_0x1407('0x2f')]),_0x85b755);if(_0x2eccaa[_0x1407('0x2d')][_0x1407('0x38')]){_0x38252b[_0x1407('0x39')]=_['merge'](_0x38252b[_0x1407('0x39')],{'$or':_['map'](_0x85b755,function(_0x33dd73){if(_0x33dd73[_0x1407('0x2a')]!==_0x1407('0x3a')){var _0x221518={};_0x221518[_0x33dd73[_0x1407('0x26')]]={'$like':'%'+_0x2eccaa[_0x1407('0x2d')][_0x1407('0x38')]+'%'};return _0x221518;}})});}_0x38252b=_['merge']({},_0x38252b,_0x2eccaa[_0x1407('0x3b')]);var _0x3985f9={'where':_0x38252b[_0x1407('0x39')]};return db[_0x1407('0x3c')][_0x1407('0x1b')](_0x3985f9)[_0x1407('0x23')](function(_0x5ef339){_0x5bd4ac[_0x1407('0x1b')]=_0x5ef339;if(_0x2eccaa[_0x1407('0x2d')]['includeAll']){_0x38252b[_0x1407('0x3d')]=[{'all':!![]}];}return db[_0x1407('0x3c')][_0x1407('0x3e')](_0x38252b);})[_0x1407('0x23')](function(_0x5f1b94){_0x5bd4ac[_0x1407('0x3f')]=_0x5f1b94;return _0x5bd4ac;})[_0x1407('0x23')](respondWithFilteredResult(_0x338fd5,_0x38252b))[_0x1407('0x40')](handleError(_0x338fd5,null));};exports[_0x1407('0x41')]=function(_0x2d1b2c,_0x221d96){var _0x1b3c4f={'raw':!![],'where':{'id':_0x2d1b2c[_0x1407('0x42')]['id']}},_0xdbd21b={};_0xdbd21b[_0x1407('0x31')]=_[_0x1407('0x2e')](db[_0x1407('0x3c')][_0x1407('0x28')]);_0xdbd21b['query']=_[_0x1407('0x2e')](_0x2d1b2c['query']);_0xdbd21b[_0x1407('0x2f')]=_['intersection'](_0xdbd21b['model'],_0xdbd21b[_0x1407('0x2d')]);_0x1b3c4f[_0x1407('0x32')]=_['intersection'](_0xdbd21b[_0x1407('0x31')],qs[_0x1407('0x33')](_0x2d1b2c[_0x1407('0x2d')][_0x1407('0x33')]));_0x1b3c4f[_0x1407('0x32')]=_0x1b3c4f['attributes'][_0x1407('0x34')]?_0x1b3c4f[_0x1407('0x32')]:_0xdbd21b[_0x1407('0x31')];if(_0x2d1b2c[_0x1407('0x2d')][_0x1407('0x43')]){_0x1b3c4f[_0x1407('0x3d')]=[{'all':!![]}];}_0x1b3c4f=_[_0x1407('0x44')]({},_0x1b3c4f,_0x2d1b2c[_0x1407('0x3b')]);return db['JscriptyQuestionReport'][_0x1407('0x45')](_0x1b3c4f)['then'](handleEntityNotFound(_0x221d96,null))[_0x1407('0x23')](respondWithResult(_0x221d96,null))[_0x1407('0x40')](handleError(_0x221d96,null));};exports[_0x1407('0x46')]=function(_0x13ef29,_0x1e8059){return db[_0x1407('0x3c')][_0x1407('0x46')](_0x13ef29[_0x1407('0x47')],{})[_0x1407('0x23')](respondWithResult(_0x1e8059,0xc9))[_0x1407('0x40')](handleError(_0x1e8059,null));};exports[_0x1407('0x22')]=function(_0x2a66cd,_0x5a555e){if(_0x2a66cd['body']['id']){delete _0x2a66cd[_0x1407('0x47')]['id'];}return db[_0x1407('0x3c')][_0x1407('0x45')]({'where':{'id':_0x2a66cd[_0x1407('0x42')]['id']}})[_0x1407('0x23')](handleEntityNotFound(_0x5a555e,null))[_0x1407('0x23')](saveUpdates(_0x2a66cd['body'],null))[_0x1407('0x23')](respondWithResult(_0x5a555e,null))[_0x1407('0x40')](handleError(_0x5a555e,null));};exports[_0x1407('0x48')]=function(_0x5a5e84,_0x492b9d){return db[_0x1407('0x3c')][_0x1407('0x45')]({'where':{'id':_0x5a5e84['params']['id']}})[_0x1407('0x23')](handleEntityNotFound(_0x492b9d,null))['then'](removeEntity(_0x492b9d,null))['catch'](handleError(_0x492b9d,null));};exports[_0x1407('0x49')]=function(_0x3bb82b,_0x2762ef){return db[_0x1407('0x3c')][_0x1407('0x49')]()[_0x1407('0x23')](respondWithResult(_0x2762ef,null))[_0x1407('0x40')](handleError(_0x2762ef,null));}; \ No newline at end of file +var _0x73ae=['offset','undefined','count','limit','set','Content-Range','json','apply','update','destroy','error','stack','name','send','index','map','type','query','keys','filters','intersection','model','attributes','fields','hasOwnProperty','order','where','pick','merge','VIRTUAL','filter','options','then','include','findAll','catch','show','JscriptyQuestionReport','rawAttributes','length','includeAll','body','find','params','describe','rimraf','request-promise','moment','util','to-csv','fs-extra','lodash','squel','crypto','jsforce','desk.js','querystring','papaparse','../../components/auth/service','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','../../config/utils','sendStatus','status','end'];(function(_0x5ae423,_0x3b4052){var _0x17b4ae=function(_0x47d5c4){while(--_0x47d5c4){_0x5ae423['push'](_0x5ae423['shift']());}};_0x17b4ae(++_0x3b4052);}(_0x73ae,0x135));var _0xe73a=function(_0x3ea913,_0x255df2){_0x3ea913=_0x3ea913-0x0;var _0x2b4f28=_0x73ae[_0x3ea913];return _0x2b4f28;};'use strict';var emlformat=require('eml-format');var rimraf=require(_0xe73a('0x0'));var zipdir=require('zip-dir');var jsonpatch=require('fast-json-patch');var rp=require(_0xe73a('0x1'));var moment=require(_0xe73a('0x2'));var BPromise=require('bluebird');var Mustache=require('mustache');var util=require(_0xe73a('0x3'));var path=require('path');var sox=require('sox');var csv=require(_0xe73a('0x4'));var ejs=require('ejs');var fs=require('fs');var fs_extra=require(_0xe73a('0x5'));var _=require(_0xe73a('0x6'));var squel=require(_0xe73a('0x7'));var crypto=require(_0xe73a('0x8'));var jsforce=require(_0xe73a('0x9'));var deskjs=require(_0xe73a('0xa'));var toCsv=require(_0xe73a('0x4'));var querystring=require(_0xe73a('0xb'));var Papa=require(_0xe73a('0xc'));var Redis=require('ioredis');var authService=require(_0xe73a('0xd'));var qs=require('../../components/parsers/qs');var as=require(_0xe73a('0xe'));var hardwareService=require(_0xe73a('0xf'));var logger=require(_0xe73a('0x10'))('api');var utils=require(_0xe73a('0x11'));var config=require('../../config/environment');var licenseUtil=require('../../config/license/util');var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0x835f5a,_0x551a0a){_0x551a0a=_0x551a0a||0xcc;return function(_0x3808d6){if(_0x3808d6){return _0x835f5a[_0xe73a('0x12')](_0x551a0a);}return _0x835f5a[_0xe73a('0x13')](_0x551a0a)[_0xe73a('0x14')]();};}function respondWithResult(_0x1aeb32,_0x235f6f){_0x235f6f=_0x235f6f||0xc8;return function(_0xd1b88c){if(_0xd1b88c){return _0x1aeb32['status'](_0x235f6f)['json'](_0xd1b88c);}};}function respondWithFilteredResult(_0x467435,_0x23ea40){return function(_0x42229c){if(_0x42229c){var _0x8e2b02=typeof _0x23ea40[_0xe73a('0x15')]==='undefined'&&typeof _0x23ea40['limit']===_0xe73a('0x16');var _0x1071b3=_0x42229c['count'];var _0x4389ba=_0x8e2b02?0x0:_0x23ea40[_0xe73a('0x15')];var _0x2f9676=_0x8e2b02?_0x42229c[_0xe73a('0x17')]:_0x23ea40[_0xe73a('0x15')]+_0x23ea40[_0xe73a('0x18')];var _0x25ec1f;if(_0x2f9676>=_0x1071b3){_0x2f9676=_0x1071b3;_0x25ec1f=0xc8;}else{_0x25ec1f=0xce;}_0x467435['status'](_0x25ec1f);return _0x467435[_0xe73a('0x19')](_0xe73a('0x1a'),_0x4389ba+'-'+_0x2f9676+'/'+_0x1071b3)[_0xe73a('0x1b')](_0x42229c);}return null;};}function patchUpdates(_0x273aed){return function(_0x1dd643){try{jsonpatch[_0xe73a('0x1c')](_0x1dd643,_0x273aed,!![]);}catch(_0x333313){return BPromise['reject'](_0x333313);}return _0x1dd643['save']();};}function saveUpdates(_0x118423,_0x56ee1e){return function(_0x2754da){if(_0x2754da){return _0x2754da[_0xe73a('0x1d')](_0x118423)['then'](function(_0x82b940){return _0x82b940;});}return null;};}function removeEntity(_0x5c26da,_0x1e5d24){return function(_0x5d91de){if(_0x5d91de){return _0x5d91de[_0xe73a('0x1e')]()['then'](function(){_0x5c26da[_0xe73a('0x13')](0xcc)['end']();});}};}function handleEntityNotFound(_0x579ec8,_0x3c3cea){return function(_0xbf05b9){if(!_0xbf05b9){_0x579ec8['sendStatus'](0x194);}return _0xbf05b9;};}function handleError(_0x14deb6,_0x19e28b){_0x19e28b=_0x19e28b||0x1f4;return function(_0x59cd1e){logger[_0xe73a('0x1f')](_0x59cd1e[_0xe73a('0x20')]);if(_0x59cd1e[_0xe73a('0x21')]){delete _0x59cd1e[_0xe73a('0x21')];}_0x14deb6[_0xe73a('0x13')](_0x19e28b)[_0xe73a('0x22')](_0x59cd1e);};}exports[_0xe73a('0x23')]=function(_0xfe4a3f,_0xf1dd6c){var _0x9886d4={},_0x2c63d5={},_0x18a7aa={'count':0x0,'rows':[]};var _0x92d101=_[_0xe73a('0x24')](db['JscriptyQuestionReport']['rawAttributes'],function(_0x3abc97){return{'name':_0x3abc97['fieldName'],'type':_0x3abc97[_0xe73a('0x25')]['key']};});_0x2c63d5['model']=_[_0xe73a('0x24')](_0x92d101,_0xe73a('0x21'));_0x2c63d5[_0xe73a('0x26')]=_[_0xe73a('0x27')](_0xfe4a3f['query']);_0x2c63d5[_0xe73a('0x28')]=_[_0xe73a('0x29')](_0x2c63d5[_0xe73a('0x2a')],_0x2c63d5[_0xe73a('0x26')]);_0x9886d4[_0xe73a('0x2b')]=_['intersection'](_0x2c63d5[_0xe73a('0x2a')],qs['fields'](_0xfe4a3f[_0xe73a('0x26')][_0xe73a('0x2c')]));_0x9886d4['attributes']=_0x9886d4[_0xe73a('0x2b')]['length']?_0x9886d4[_0xe73a('0x2b')]:_0x2c63d5[_0xe73a('0x2a')];if(!_0xfe4a3f['query'][_0xe73a('0x2d')]('nolimit')){_0x9886d4[_0xe73a('0x18')]=qs[_0xe73a('0x18')](_0xfe4a3f['query']['limit']);_0x9886d4[_0xe73a('0x15')]=qs[_0xe73a('0x15')](_0xfe4a3f[_0xe73a('0x26')][_0xe73a('0x15')]);}_0x9886d4[_0xe73a('0x2e')]=qs['sort'](_0xfe4a3f[_0xe73a('0x26')]['sort']);_0x9886d4[_0xe73a('0x2f')]=qs[_0xe73a('0x28')](_[_0xe73a('0x30')](_0xfe4a3f[_0xe73a('0x26')],_0x2c63d5['filters']),_0x92d101);if(_0xfe4a3f['query']['filter']){_0x9886d4[_0xe73a('0x2f')]=_[_0xe73a('0x31')](_0x9886d4['where'],{'$or':_['map'](_0x92d101,function(_0xbf3550){if(_0xbf3550[_0xe73a('0x25')]!==_0xe73a('0x32')){var _0x19b9e2={};_0x19b9e2[_0xbf3550['name']]={'$like':'%'+_0xfe4a3f[_0xe73a('0x26')][_0xe73a('0x33')]+'%'};return _0x19b9e2;}})});}_0x9886d4=_['merge']({},_0x9886d4,_0xfe4a3f[_0xe73a('0x34')]);var _0x5d023f={'where':_0x9886d4[_0xe73a('0x2f')]};return db['JscriptyQuestionReport']['count'](_0x5d023f)[_0xe73a('0x35')](function(_0x5cd694){_0x18a7aa[_0xe73a('0x17')]=_0x5cd694;if(_0xfe4a3f[_0xe73a('0x26')]['includeAll']){_0x9886d4[_0xe73a('0x36')]=[{'all':!![]}];}return db['JscriptyQuestionReport'][_0xe73a('0x37')](_0x9886d4);})['then'](function(_0x29ecd8){_0x18a7aa['rows']=_0x29ecd8;return _0x18a7aa;})[_0xe73a('0x35')](respondWithFilteredResult(_0xf1dd6c,_0x9886d4))[_0xe73a('0x38')](handleError(_0xf1dd6c,null));};exports[_0xe73a('0x39')]=function(_0x45e93a,_0x2af2e4){var _0x4cc2bc={'raw':!![],'where':{'id':_0x45e93a['params']['id']}},_0x449d6d={};_0x449d6d[_0xe73a('0x2a')]=_[_0xe73a('0x27')](db[_0xe73a('0x3a')][_0xe73a('0x3b')]);_0x449d6d[_0xe73a('0x26')]=_['keys'](_0x45e93a[_0xe73a('0x26')]);_0x449d6d[_0xe73a('0x28')]=_['intersection'](_0x449d6d['model'],_0x449d6d[_0xe73a('0x26')]);_0x4cc2bc[_0xe73a('0x2b')]=_[_0xe73a('0x29')](_0x449d6d[_0xe73a('0x2a')],qs[_0xe73a('0x2c')](_0x45e93a[_0xe73a('0x26')][_0xe73a('0x2c')]));_0x4cc2bc[_0xe73a('0x2b')]=_0x4cc2bc[_0xe73a('0x2b')][_0xe73a('0x3c')]?_0x4cc2bc[_0xe73a('0x2b')]:_0x449d6d[_0xe73a('0x2a')];if(_0x45e93a[_0xe73a('0x26')][_0xe73a('0x3d')]){_0x4cc2bc[_0xe73a('0x36')]=[{'all':!![]}];}_0x4cc2bc=_[_0xe73a('0x31')]({},_0x4cc2bc,_0x45e93a[_0xe73a('0x34')]);return db['JscriptyQuestionReport']['find'](_0x4cc2bc)['then'](handleEntityNotFound(_0x2af2e4,null))[_0xe73a('0x35')](respondWithResult(_0x2af2e4,null))[_0xe73a('0x38')](handleError(_0x2af2e4,null));};exports['create']=function(_0xab31e8,_0x437311){return db['JscriptyQuestionReport']['create'](_0xab31e8[_0xe73a('0x3e')],{})['then'](respondWithResult(_0x437311,0xc9))['catch'](handleError(_0x437311,null));};exports[_0xe73a('0x1d')]=function(_0x5bb1ba,_0x561811){if(_0x5bb1ba[_0xe73a('0x3e')]['id']){delete _0x5bb1ba[_0xe73a('0x3e')]['id'];}return db[_0xe73a('0x3a')][_0xe73a('0x3f')]({'where':{'id':_0x5bb1ba[_0xe73a('0x40')]['id']}})[_0xe73a('0x35')](handleEntityNotFound(_0x561811,null))[_0xe73a('0x35')](saveUpdates(_0x5bb1ba[_0xe73a('0x3e')],null))['then'](respondWithResult(_0x561811,null))[_0xe73a('0x38')](handleError(_0x561811,null));};exports[_0xe73a('0x1e')]=function(_0x1fab3d,_0x437dd1){return db[_0xe73a('0x3a')][_0xe73a('0x3f')]({'where':{'id':_0x1fab3d['params']['id']}})[_0xe73a('0x35')](handleEntityNotFound(_0x437dd1,null))[_0xe73a('0x35')](removeEntity(_0x437dd1,null))[_0xe73a('0x38')](handleError(_0x437dd1,null));};exports[_0xe73a('0x41')]=function(_0x3ea0fb,_0x3dbfe3){return db['JscriptyQuestionReport'][_0xe73a('0x41')]()['then'](respondWithResult(_0x3dbfe3,null))['catch'](handleError(_0x3dbfe3,null));}; \ No newline at end of file diff --git a/server/api/jscriptyQuestionReport/jscriptyQuestionReport.model.js b/server/api/jscriptyQuestionReport/jscriptyQuestionReport.model.js index a5eedcf..4365e43 100644 --- a/server/api/jscriptyQuestionReport/jscriptyQuestionReport.model.js +++ b/server/api/jscriptyQuestionReport/jscriptyQuestionReport.model.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x8e0d=['request-promise','rimraf','../../config/environment','./jscriptyQuestionReport.attributes','exports','define','JscriptyQuestionReport','report_jscripty_questions','lodash','util','../../config/logger','api','moment','bluebird'];(function(_0xd39959,_0x302d09){var _0x1ff69c=function(_0x17c97f){while(--_0x17c97f){_0xd39959['push'](_0xd39959['shift']());}};_0x1ff69c(++_0x302d09);}(_0x8e0d,0x94));var _0xd8e0=function(_0x597484,_0x199340){_0x597484=_0x597484-0x0;var _0x218e64=_0x8e0d[_0x597484];return _0x218e64;};'use strict';var _=require(_0xd8e0('0x0'));var util=require(_0xd8e0('0x1'));var logger=require(_0xd8e0('0x2'))(_0xd8e0('0x3'));var moment=require(_0xd8e0('0x4'));var BPromise=require(_0xd8e0('0x5'));var rp=require(_0xd8e0('0x6'));var fs=require('fs');var path=require('path');var rimraf=require(_0xd8e0('0x7'));var config=require(_0xd8e0('0x8'));var attributes=require(_0xd8e0('0x9'));module[_0xd8e0('0xa')]=function(_0x3ec2e8,_0x445924){return _0x3ec2e8[_0xd8e0('0xb')](_0xd8e0('0xc'),attributes,{'tableName':_0xd8e0('0xd'),'paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file +var _0x05a4=['../../config/environment','./jscriptyQuestionReport.attributes','define','JscriptyQuestionReport','report_jscripty_questions','lodash','../../config/logger','api','request-promise'];(function(_0x693235,_0x53a413){var _0x53ae8a=function(_0x21bce0){while(--_0x21bce0){_0x693235['push'](_0x693235['shift']());}};_0x53ae8a(++_0x53a413);}(_0x05a4,0xe6));var _0x405a=function(_0x675f47,_0x3b2a1c){_0x675f47=_0x675f47-0x0;var _0x708695=_0x05a4[_0x675f47];return _0x708695;};'use strict';var _=require(_0x405a('0x0'));var util=require('util');var logger=require(_0x405a('0x1'))(_0x405a('0x2'));var moment=require('moment');var BPromise=require('bluebird');var rp=require(_0x405a('0x3'));var fs=require('fs');var path=require('path');var rimraf=require('rimraf');var config=require(_0x405a('0x4'));var attributes=require(_0x405a('0x5'));module['exports']=function(_0x3e63cd,_0x446547){return _0x3e63cd[_0x405a('0x6')](_0x405a('0x7'),attributes,{'tableName':_0x405a('0x8'),'paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file diff --git a/server/api/jscriptyQuestionReport/jscriptyQuestionReport.rpc.js b/server/api/jscriptyQuestionReport/jscriptyQuestionReport.rpc.js index a97ad52..95b8288 100644 --- a/server/api/jscriptyQuestionReport/jscriptyQuestionReport.rpc.js +++ b/server/api/jscriptyQuestionReport/jscriptyQuestionReport.rpc.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x8ec0=['../../mysqldb','../../config/utils','jayson/promise','client','http','request','then','JscriptyQuestionReport,\x20%s,\x20%s','debug','request\x20sent','error','code','message','info','catch','lodash','moment','randomstring','ioredis'];(function(_0x3b5288,_0x3991c){var _0x26b527=function(_0x4418bc){while(--_0x4418bc){_0x3b5288['push'](_0x3b5288['shift']());}};_0x26b527(++_0x3991c);}(_0x8ec0,0x19e));var _0x08ec=function(_0x5dcd2d,_0x32de4a){_0x5dcd2d=_0x5dcd2d-0x0;var _0x5ef48b=_0x8ec0[_0x5dcd2d];return _0x5ef48b;};'use strict';var _=require(_0x08ec('0x0'));var util=require('util');var moment=require(_0x08ec('0x1'));var BPromise=require('bluebird');var rs=require(_0x08ec('0x2'));var fs=require('fs');var Redis=require(_0x08ec('0x3'));var db=require(_0x08ec('0x4'))['db'];var utils=require(_0x08ec('0x5'));var logger=require('../../config/logger')('rpc');var config=require('../../config/environment');var jayson=require(_0x08ec('0x6'));var client=jayson[_0x08ec('0x7')][_0x08ec('0x8')]({'port':0x232a});function respondWithRpcPromise(_0x186da5,_0x25fd67,_0xfc6368){return new BPromise(function(_0x5a741c,_0x4503e4){return client[_0x08ec('0x9')](_0x186da5,_0xfc6368)[_0x08ec('0xa')](function(_0x19962d){logger['info'](_0x08ec('0xb'),_0x25fd67,'request\x20sent');logger[_0x08ec('0xc')]('JscriptyQuestionReport,\x20%s,\x20%s,\x20%s',_0x25fd67,_0x08ec('0xd'),JSON['stringify'](_0x19962d));if(_0x19962d['error']){if(_0x19962d[_0x08ec('0xe')][_0x08ec('0xf')]===0x1f4){logger['error'](_0x08ec('0xb'),_0x25fd67,_0x19962d[_0x08ec('0xe')][_0x08ec('0x10')]);return _0x4503e4(_0x19962d[_0x08ec('0xe')][_0x08ec('0x10')]);}logger[_0x08ec('0xe')]('JscriptyQuestionReport,\x20%s,\x20%s',_0x25fd67,_0x19962d[_0x08ec('0xe')]['message']);return _0x5a741c(_0x19962d['error']['message']);}else{logger[_0x08ec('0x11')]('JscriptyQuestionReport,\x20%s,\x20%s',_0x25fd67,_0x08ec('0xd'));_0x5a741c(_0x19962d['result'][_0x08ec('0x10')]);}})[_0x08ec('0x12')](function(_0x1ef3b6){logger['error'](_0x08ec('0xb'),_0x25fd67,_0x1ef3b6);_0x4503e4(_0x1ef3b6);});});} \ No newline at end of file +var _0xfc50=['request\x20sent','debug','stringify','error','message','result','catch','lodash','util','bluebird','ioredis','../../mysqldb','../../config/utils','rpc','../../config/environment','jayson/promise','client','http','request','then','info','JscriptyQuestionReport,\x20%s,\x20%s'];(function(_0x377cce,_0x3b4f48){var _0x256bc9=function(_0x45d5ce){while(--_0x45d5ce){_0x377cce['push'](_0x377cce['shift']());}};_0x256bc9(++_0x3b4f48);}(_0xfc50,0x193));var _0x0fc5=function(_0x5b561d,_0x422b7c){_0x5b561d=_0x5b561d-0x0;var _0x431060=_0xfc50[_0x5b561d];return _0x431060;};'use strict';var _=require(_0x0fc5('0x0'));var util=require(_0x0fc5('0x1'));var moment=require('moment');var BPromise=require(_0x0fc5('0x2'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x0fc5('0x3'));var db=require(_0x0fc5('0x4'))['db'];var utils=require(_0x0fc5('0x5'));var logger=require('../../config/logger')(_0x0fc5('0x6'));var config=require(_0x0fc5('0x7'));var jayson=require(_0x0fc5('0x8'));var client=jayson[_0x0fc5('0x9')][_0x0fc5('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x7f414f,_0x5e19d4,_0x51cd84){return new BPromise(function(_0x4eafaa,_0x12b8b6){return client[_0x0fc5('0xb')](_0x7f414f,_0x51cd84)[_0x0fc5('0xc')](function(_0x5a9210){logger[_0x0fc5('0xd')](_0x0fc5('0xe'),_0x5e19d4,_0x0fc5('0xf'));logger[_0x0fc5('0x10')]('JscriptyQuestionReport,\x20%s,\x20%s,\x20%s',_0x5e19d4,_0x0fc5('0xf'),JSON[_0x0fc5('0x11')](_0x5a9210));if(_0x5a9210[_0x0fc5('0x12')]){if(_0x5a9210['error']['code']===0x1f4){logger[_0x0fc5('0x12')](_0x0fc5('0xe'),_0x5e19d4,_0x5a9210[_0x0fc5('0x12')][_0x0fc5('0x13')]);return _0x12b8b6(_0x5a9210[_0x0fc5('0x12')]['message']);}logger[_0x0fc5('0x12')]('JscriptyQuestionReport,\x20%s,\x20%s',_0x5e19d4,_0x5a9210[_0x0fc5('0x12')]['message']);return _0x4eafaa(_0x5a9210[_0x0fc5('0x12')]['message']);}else{logger['info'](_0x0fc5('0xe'),_0x5e19d4,_0x0fc5('0xf'));_0x4eafaa(_0x5a9210[_0x0fc5('0x14')][_0x0fc5('0x13')]);}})[_0x0fc5('0x15')](function(_0x564ec1){logger[_0x0fc5('0x12')]('JscriptyQuestionReport,\x20%s,\x20%s',_0x5e19d4,_0x564ec1);_0x12b8b6(_0x564ec1);});});} \ No newline at end of file diff --git a/server/api/jscriptySessionReport/index.js b/server/api/jscriptySessionReport/index.js index bc8a206..9455b4f 100644 --- a/server/api/jscriptySessionReport/index.js +++ b/server/api/jscriptySessionReport/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x4a13=['destroy','exports','multer','path','Router','fs-extra','../../components/auth/service','../../config/environment','./jscriptySessionReport.controller','get','index','/describe','isAuthenticated','describe','/:id','/:id/questions','post','put','update'];(function(_0x2eb484,_0x7d7b55){var _0x195fcb=function(_0x261031){while(--_0x261031){_0x2eb484['push'](_0x2eb484['shift']());}};_0x195fcb(++_0x7d7b55);}(_0x4a13,0xe6));var _0x34a1=function(_0x369a78,_0xd8f88c){_0x369a78=_0x369a78-0x0;var _0x11e8e2=_0x4a13[_0x369a78];return _0x11e8e2;};'use strict';var multer=require(_0x34a1('0x0'));var util=require('util');var path=require(_0x34a1('0x1'));var timeout=require('connect-timeout');var express=require('express');var router=express[_0x34a1('0x2')]();var fs_extra=require(_0x34a1('0x3'));var auth=require(_0x34a1('0x4'));var interaction=require('../../components/interaction/service');var config=require(_0x34a1('0x5'));var controller=require(_0x34a1('0x6'));router[_0x34a1('0x7')]('/',auth['isAuthenticated'](),controller[_0x34a1('0x8')]);router[_0x34a1('0x7')](_0x34a1('0x9'),auth[_0x34a1('0xa')](),controller[_0x34a1('0xb')]);router[_0x34a1('0x7')](_0x34a1('0xc'),auth['isAuthenticated'](),controller['show']);router['get'](_0x34a1('0xd'),auth[_0x34a1('0xa')](),controller['getQuestions']);router[_0x34a1('0xe')]('/',auth[_0x34a1('0xa')](),controller['create']);router[_0x34a1('0xf')](_0x34a1('0xc'),auth[_0x34a1('0xa')](),controller[_0x34a1('0x10')]);router['delete'](_0x34a1('0xc'),auth[_0x34a1('0xa')](),controller[_0x34a1('0x11')]);module[_0x34a1('0x12')]=router; \ No newline at end of file +var _0xf364=['put','destroy','exports','multer','util','path','connect-timeout','express','fs-extra','../../components/auth/service','get','isAuthenticated','index','/describe','/:id','show','/:id/questions','getQuestions','post','create'];(function(_0x13e2e3,_0x21d65c){var _0x34078f=function(_0xae1d71){while(--_0xae1d71){_0x13e2e3['push'](_0x13e2e3['shift']());}};_0x34078f(++_0x21d65c);}(_0xf364,0x11b));var _0x4f36=function(_0x411add,_0x1aed38){_0x411add=_0x411add-0x0;var _0x238242=_0xf364[_0x411add];return _0x238242;};'use strict';var multer=require(_0x4f36('0x0'));var util=require(_0x4f36('0x1'));var path=require(_0x4f36('0x2'));var timeout=require(_0x4f36('0x3'));var express=require(_0x4f36('0x4'));var router=express['Router']();var fs_extra=require(_0x4f36('0x5'));var auth=require(_0x4f36('0x6'));var interaction=require('../../components/interaction/service');var config=require('../../config/environment');var controller=require('./jscriptySessionReport.controller');router[_0x4f36('0x7')]('/',auth[_0x4f36('0x8')](),controller[_0x4f36('0x9')]);router['get'](_0x4f36('0xa'),auth[_0x4f36('0x8')](),controller['describe']);router['get'](_0x4f36('0xb'),auth[_0x4f36('0x8')](),controller[_0x4f36('0xc')]);router['get'](_0x4f36('0xd'),auth[_0x4f36('0x8')](),controller[_0x4f36('0xe')]);router[_0x4f36('0xf')]('/',auth[_0x4f36('0x8')](),controller[_0x4f36('0x10')]);router[_0x4f36('0x11')]('/:id',auth['isAuthenticated'](),controller['update']);router['delete'](_0x4f36('0xb'),auth['isAuthenticated'](),controller[_0x4f36('0x12')]);module[_0x4f36('0x13')]=router; \ No newline at end of file diff --git a/server/api/jscriptySessionReport/jscriptySessionReport.attributes.js b/server/api/jscriptySessionReport/jscriptySessionReport.attributes.js index c8f5ede..802785a 100644 --- a/server/api/jscriptySessionReport/jscriptySessionReport.attributes.js +++ b/server/api/jscriptySessionReport/jscriptySessionReport.attributes.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x2af8=['YYYY-MM-DD\x20HH:mm:ss','STRING','BOOLEAN','moment','exports','DATE','setDataValue','starttime','endtime'];(function(_0x3cb277,_0x477e09){var _0x23c781=function(_0x1615ca){while(--_0x1615ca){_0x3cb277['push'](_0x3cb277['shift']());}};_0x23c781(++_0x477e09);}(_0x2af8,0xf6));var _0x82af=function(_0x3fc3af,_0xd1fe0c){_0x3fc3af=_0x3fc3af-0x0;var _0x2f8d47=_0x2af8[_0x3fc3af];return _0x2f8d47;};'use strict';var moment=require(_0x82af('0x0'));var Sequelize=require('sequelize');module[_0x82af('0x1')]={'starttime':{'type':Sequelize[_0x82af('0x2')],'set':function(_0x4fb4ff){this[_0x82af('0x3')](_0x82af('0x4'),_0x4fb4ff);this['setDataValue'](_0x82af('0x5'),moment()['format'](_0x82af('0x6')));}},'endtime':{'type':Sequelize[_0x82af('0x2')]},'membername':{'type':Sequelize['STRING']},'projectname':{'type':Sequelize[_0x82af('0x7')]},'queue':{'type':Sequelize[_0x82af('0x7')]},'uniqueid':{'type':Sequelize['STRING']},'calleridname':{'type':Sequelize[_0x82af('0x7')]},'calleridnum':{'type':Sequelize[_0x82af('0x7')]},'completed':{'type':Sequelize[_0x82af('0x8')],'defaultValue':![]}}; \ No newline at end of file +var _0x0f32=['STRING','moment','exports','starttime','endtime','YYYY-MM-DD\x20HH:mm:ss'];(function(_0x19691f,_0x159737){var _0x5677b6=function(_0x41a9b2){while(--_0x41a9b2){_0x19691f['push'](_0x19691f['shift']());}};_0x5677b6(++_0x159737);}(_0x0f32,0x73));var _0x20f3=function(_0x28cc13,_0x4be0c5){_0x28cc13=_0x28cc13-0x0;var _0x49b130=_0x0f32[_0x28cc13];return _0x49b130;};'use strict';var moment=require(_0x20f3('0x0'));var Sequelize=require('sequelize');module[_0x20f3('0x1')]={'starttime':{'type':Sequelize['DATE'],'set':function(_0x5af270){this['setDataValue'](_0x20f3('0x2'),_0x5af270);this['setDataValue'](_0x20f3('0x3'),moment()['format'](_0x20f3('0x4')));}},'endtime':{'type':Sequelize['DATE']},'membername':{'type':Sequelize[_0x20f3('0x5')]},'projectname':{'type':Sequelize['STRING']},'queue':{'type':Sequelize[_0x20f3('0x5')]},'uniqueid':{'type':Sequelize[_0x20f3('0x5')]},'calleridname':{'type':Sequelize[_0x20f3('0x5')]},'calleridnum':{'type':Sequelize[_0x20f3('0x5')]},'completed':{'type':Sequelize['BOOLEAN'],'defaultValue':![]}}; \ No newline at end of file diff --git a/server/api/jscriptySessionReport/jscriptySessionReport.controller.js b/server/api/jscriptySessionReport/jscriptySessionReport.controller.js index 9061a33..d60fcbe 100644 --- a/server/api/jscriptySessionReport/jscriptySessionReport.controller.js +++ b/server/api/jscriptySessionReport/jscriptySessionReport.controller.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x24b2=['jsforce','desk.js','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','sendStatus','status','end','json','undefined','count','offset','set','Content-Range','save','update','then','error','stack','name','send','index','rawAttributes','fieldName','type','key','model','query','filters','intersection','attributes','fields','length','hasOwnProperty','nolimit','limit','sort','where','filter','merge','VIRTUAL','JscriptySessionReport','include','findAll','rows','catch','keys','find','create','body','params','destroy','describe','getQuestions','order','map','options','JscriptyQuestionReport','includeAll','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','path','sox','to-csv','fs-extra','lodash','squel','crypto'];(function(_0x5ce34a,_0x57887e){var _0x309350=function(_0x52a947){while(--_0x52a947){_0x5ce34a['push'](_0x5ce34a['shift']());}};_0x309350(++_0x57887e);}(_0x24b2,0xe7));var _0x224b=function(_0x11cc3c,_0x3d7dcf){_0x11cc3c=_0x11cc3c-0x0;var _0x4b3627=_0x24b2[_0x11cc3c];return _0x4b3627;};'use strict';var emlformat=require(_0x224b('0x0'));var rimraf=require(_0x224b('0x1'));var zipdir=require(_0x224b('0x2'));var jsonpatch=require(_0x224b('0x3'));var rp=require(_0x224b('0x4'));var moment=require(_0x224b('0x5'));var BPromise=require(_0x224b('0x6'));var Mustache=require(_0x224b('0x7'));var util=require('util');var path=require(_0x224b('0x8'));var sox=require(_0x224b('0x9'));var csv=require(_0x224b('0xa'));var ejs=require('ejs');var fs=require('fs');var fs_extra=require(_0x224b('0xb'));var _=require(_0x224b('0xc'));var squel=require(_0x224b('0xd'));var crypto=require(_0x224b('0xe'));var jsforce=require(_0x224b('0xf'));var deskjs=require(_0x224b('0x10'));var toCsv=require(_0x224b('0xa'));var querystring=require('querystring');var Papa=require('papaparse');var Redis=require(_0x224b('0x11'));var authService=require(_0x224b('0x12'));var qs=require(_0x224b('0x13'));var as=require(_0x224b('0x14'));var hardwareService=require(_0x224b('0x15'));var logger=require(_0x224b('0x16'))(_0x224b('0x17'));var utils=require(_0x224b('0x18'));var config=require(_0x224b('0x19'));var licenseUtil=require(_0x224b('0x1a'));var db=require(_0x224b('0x1b'))['db'];function respondWithStatusCode(_0x3f2831,_0x374e94){_0x374e94=_0x374e94||0xcc;return function(_0x8d1b2a){if(_0x8d1b2a){return _0x3f2831[_0x224b('0x1c')](_0x374e94);}return _0x3f2831[_0x224b('0x1d')](_0x374e94)[_0x224b('0x1e')]();};}function respondWithResult(_0x499fed,_0x22f1ba){_0x22f1ba=_0x22f1ba||0xc8;return function(_0x501268){if(_0x501268){return _0x499fed[_0x224b('0x1d')](_0x22f1ba)[_0x224b('0x1f')](_0x501268);}};}function respondWithFilteredResult(_0x3efe69,_0x2e5e7f){return function(_0x4e44a1){if(_0x4e44a1){var _0x42b8bb=typeof _0x2e5e7f['offset']===_0x224b('0x20')&&typeof _0x2e5e7f['limit']===_0x224b('0x20');var _0x30b3b7=_0x4e44a1[_0x224b('0x21')];var _0x55c400=_0x42b8bb?0x0:_0x2e5e7f[_0x224b('0x22')];var _0x153e19=_0x42b8bb?_0x4e44a1[_0x224b('0x21')]:_0x2e5e7f[_0x224b('0x22')]+_0x2e5e7f['limit'];var _0x3dc957;if(_0x153e19>=_0x30b3b7){_0x153e19=_0x30b3b7;_0x3dc957=0xc8;}else{_0x3dc957=0xce;}_0x3efe69['status'](_0x3dc957);return _0x3efe69[_0x224b('0x23')](_0x224b('0x24'),_0x55c400+'-'+_0x153e19+'/'+_0x30b3b7)['json'](_0x4e44a1);}return null;};}function patchUpdates(_0x3c1b16){return function(_0x544b73){try{jsonpatch['apply'](_0x544b73,_0x3c1b16,!![]);}catch(_0x5d5d61){return BPromise['reject'](_0x5d5d61);}return _0x544b73[_0x224b('0x25')]();};}function saveUpdates(_0xbfc851,_0x162b1d){return function(_0x272693){if(_0x272693){return _0x272693[_0x224b('0x26')](_0xbfc851)[_0x224b('0x27')](function(_0x44c8ae){return _0x44c8ae;});}return null;};}function removeEntity(_0x5a8811,_0x56baf3){return function(_0x34c93e){if(_0x34c93e){return _0x34c93e['destroy']()[_0x224b('0x27')](function(){_0x5a8811['status'](0xcc)[_0x224b('0x1e')]();});}};}function handleEntityNotFound(_0x11ce3e,_0xa8d871){return function(_0x3354a4){if(!_0x3354a4){_0x11ce3e[_0x224b('0x1c')](0x194);}return _0x3354a4;};}function handleError(_0x1bddbd,_0x13a1cf){_0x13a1cf=_0x13a1cf||0x1f4;return function(_0x33082c){logger[_0x224b('0x28')](_0x33082c[_0x224b('0x29')]);if(_0x33082c[_0x224b('0x2a')]){delete _0x33082c[_0x224b('0x2a')];}_0x1bddbd[_0x224b('0x1d')](_0x13a1cf)[_0x224b('0x2b')](_0x33082c);};}exports[_0x224b('0x2c')]=function(_0x508d98,_0x2e35b1){var _0x50734f={},_0x53aea2={},_0x113cb6={'count':0x0,'rows':[]};var _0x459b31=_['map'](db['JscriptySessionReport'][_0x224b('0x2d')],function(_0x6388b3){return{'name':_0x6388b3[_0x224b('0x2e')],'type':_0x6388b3[_0x224b('0x2f')][_0x224b('0x30')]};});_0x53aea2[_0x224b('0x31')]=_['map'](_0x459b31,'name');_0x53aea2[_0x224b('0x32')]=_['keys'](_0x508d98[_0x224b('0x32')]);_0x53aea2[_0x224b('0x33')]=_[_0x224b('0x34')](_0x53aea2['model'],_0x53aea2[_0x224b('0x32')]);_0x50734f[_0x224b('0x35')]=_['intersection'](_0x53aea2[_0x224b('0x31')],qs[_0x224b('0x36')](_0x508d98['query'][_0x224b('0x36')]));_0x50734f[_0x224b('0x35')]=_0x50734f[_0x224b('0x35')][_0x224b('0x37')]?_0x50734f[_0x224b('0x35')]:_0x53aea2[_0x224b('0x31')];if(!_0x508d98[_0x224b('0x32')][_0x224b('0x38')](_0x224b('0x39'))){_0x50734f[_0x224b('0x3a')]=qs['limit'](_0x508d98['query'][_0x224b('0x3a')]);_0x50734f[_0x224b('0x22')]=qs[_0x224b('0x22')](_0x508d98['query'][_0x224b('0x22')]);}_0x50734f['order']=qs[_0x224b('0x3b')](_0x508d98[_0x224b('0x32')]['sort']);_0x50734f[_0x224b('0x3c')]=qs['filters'](_['pick'](_0x508d98[_0x224b('0x32')],_0x53aea2[_0x224b('0x33')]),_0x459b31);if(_0x508d98[_0x224b('0x32')][_0x224b('0x3d')]){_0x50734f[_0x224b('0x3c')]=_[_0x224b('0x3e')](_0x50734f[_0x224b('0x3c')],{'$or':_['map'](_0x459b31,function(_0x1d1cab){if(_0x1d1cab[_0x224b('0x2f')]!==_0x224b('0x3f')){var _0x4bb5d9={};_0x4bb5d9[_0x1d1cab['name']]={'$like':'%'+_0x508d98[_0x224b('0x32')][_0x224b('0x3d')]+'%'};return _0x4bb5d9;}})});}_0x50734f=_[_0x224b('0x3e')]({},_0x50734f,_0x508d98['options']);var _0x4f81fe={'where':_0x50734f['where']};return db[_0x224b('0x40')][_0x224b('0x21')](_0x4f81fe)[_0x224b('0x27')](function(_0x3436f8){_0x113cb6[_0x224b('0x21')]=_0x3436f8;if(_0x508d98['query']['includeAll']){_0x50734f[_0x224b('0x41')]=[{'all':!![]}];}return db[_0x224b('0x40')][_0x224b('0x42')](_0x50734f);})[_0x224b('0x27')](function(_0x3c3de2){_0x113cb6[_0x224b('0x43')]=_0x3c3de2;return _0x113cb6;})[_0x224b('0x27')](respondWithFilteredResult(_0x2e35b1,_0x50734f))[_0x224b('0x44')](handleError(_0x2e35b1,null));};exports['show']=function(_0x27a2cd,_0x501db1){var _0x192dd6={'raw':!![],'where':{'id':_0x27a2cd['params']['id']}},_0x29ab6f={};_0x29ab6f['model']=_[_0x224b('0x45')](db['JscriptySessionReport'][_0x224b('0x2d')]);_0x29ab6f[_0x224b('0x32')]=_['keys'](_0x27a2cd['query']);_0x29ab6f[_0x224b('0x33')]=_[_0x224b('0x34')](_0x29ab6f[_0x224b('0x31')],_0x29ab6f['query']);_0x192dd6[_0x224b('0x35')]=_[_0x224b('0x34')](_0x29ab6f['model'],qs[_0x224b('0x36')](_0x27a2cd[_0x224b('0x32')]['fields']));_0x192dd6['attributes']=_0x192dd6[_0x224b('0x35')][_0x224b('0x37')]?_0x192dd6[_0x224b('0x35')]:_0x29ab6f[_0x224b('0x31')];if(_0x27a2cd['query']['includeAll']){_0x192dd6['include']=[{'all':!![]}];}_0x192dd6=_[_0x224b('0x3e')]({},_0x192dd6,_0x27a2cd['options']);return db[_0x224b('0x40')][_0x224b('0x46')](_0x192dd6)[_0x224b('0x27')](handleEntityNotFound(_0x501db1,null))['then'](respondWithResult(_0x501db1,null))[_0x224b('0x44')](handleError(_0x501db1,null));};exports[_0x224b('0x47')]=function(_0x49e8c7,_0x34c206){return db['JscriptySessionReport'][_0x224b('0x47')](_0x49e8c7['body'],{})['then'](respondWithResult(_0x34c206,0xc9))[_0x224b('0x44')](handleError(_0x34c206,null));};exports[_0x224b('0x26')]=function(_0x51fb69,_0x401a35){if(_0x51fb69[_0x224b('0x48')]['id']){delete _0x51fb69[_0x224b('0x48')]['id'];}return db['JscriptySessionReport'][_0x224b('0x46')]({'where':{'id':_0x51fb69[_0x224b('0x49')]['id']}})['then'](handleEntityNotFound(_0x401a35,null))[_0x224b('0x27')](saveUpdates(_0x51fb69[_0x224b('0x48')],null))['then'](respondWithResult(_0x401a35,null))['catch'](handleError(_0x401a35,null));};exports[_0x224b('0x4a')]=function(_0x12a4e7,_0x5a813c){return db[_0x224b('0x40')][_0x224b('0x46')]({'where':{'id':_0x12a4e7['params']['id']}})[_0x224b('0x27')](handleEntityNotFound(_0x5a813c,null))['then'](removeEntity(_0x5a813c,null))[_0x224b('0x44')](handleError(_0x5a813c,null));};exports[_0x224b('0x4b')]=function(_0x2b3684,_0x35752b){return db[_0x224b('0x40')][_0x224b('0x4b')]()['then'](respondWithResult(_0x35752b,null))['catch'](handleError(_0x35752b,null));};exports[_0x224b('0x4c')]=function(_0x316a76,_0xc945c3,_0x3f567e){var _0x4823e4={'raw':!![],'where':{}};var _0x113e82={};var _0x39d2c0={'count':0x0,'rows':[]};return db['JscriptySessionReport']['findOne']({'where':{'id':_0x316a76[_0x224b('0x49')]['id']}})[_0x224b('0x27')](handleEntityNotFound(_0xc945c3,null))[_0x224b('0x27')](function(_0x531531){if(_0x531531){_0x113e82[_0x224b('0x31')]=_[_0x224b('0x45')](db['JscriptyQuestionReport'][_0x224b('0x2d')]);_0x113e82[_0x224b('0x32')]=_[_0x224b('0x45')](_0x316a76[_0x224b('0x32')]);_0x113e82[_0x224b('0x33')]=_[_0x224b('0x34')](_0x113e82[_0x224b('0x31')],_0x113e82[_0x224b('0x32')]);_0x4823e4['attributes']=_[_0x224b('0x34')](_0x113e82[_0x224b('0x31')],qs[_0x224b('0x36')](_0x316a76[_0x224b('0x32')][_0x224b('0x36')]));_0x4823e4[_0x224b('0x35')]=_0x4823e4['attributes'][_0x224b('0x37')]?_0x4823e4[_0x224b('0x35')]:_0x113e82[_0x224b('0x31')];if(!_0x316a76[_0x224b('0x32')][_0x224b('0x38')](_0x224b('0x39'))){_0x4823e4[_0x224b('0x3a')]=qs[_0x224b('0x3a')](_0x316a76['query']['limit']);_0x4823e4['offset']=qs['offset'](_0x316a76['query'][_0x224b('0x22')]);}_0x4823e4[_0x224b('0x4d')]=qs[_0x224b('0x3b')](_0x316a76['query']['sort']);_0x4823e4['where']=qs[_0x224b('0x33')](_['pick'](_0x316a76[_0x224b('0x32')],_0x113e82['filters']));_0x4823e4[_0x224b('0x3c')]['SessionId']=_0x531531['id'];if(_0x316a76[_0x224b('0x32')][_0x224b('0x3d')]){_0x4823e4[_0x224b('0x3c')]=_[_0x224b('0x3e')](_0x4823e4['where'],{'$or':_[_0x224b('0x4e')](_0x4823e4['attributes'],function(_0x24f99d){var _0x55cb2f={};_0x55cb2f[_0x24f99d]={'$like':'%'+_0x316a76[_0x224b('0x32')][_0x224b('0x3d')]+'%'};return _0x55cb2f;})});}_0x4823e4=_[_0x224b('0x3e')]({},_0x4823e4,_0x316a76[_0x224b('0x4f')]);return db[_0x224b('0x50')][_0x224b('0x21')]({'where':_0x4823e4[_0x224b('0x3c')]})[_0x224b('0x27')](function(_0x28cba3){_0x39d2c0[_0x224b('0x21')]=_0x28cba3;if(_0x316a76[_0x224b('0x32')][_0x224b('0x51')]){_0x4823e4[_0x224b('0x41')]=[{'all':!![]}];}return db[_0x224b('0x50')]['findAll'](_0x4823e4);})[_0x224b('0x27')](function(_0x1ecab4){_0x39d2c0[_0x224b('0x43')]=_0x1ecab4;return _0x39d2c0;});}})[_0x224b('0x27')](respondWithFilteredResult(_0xc945c3,_0x4823e4))[_0x224b('0x44')](handleError(_0xc945c3,null));}; \ No newline at end of file +var _0x62c8=['where','pick','filter','merge','VIRTUAL','options','includeAll','findAll','show','params','rawAttributes','fields','length','include','find','create','body','catch','describe','findOne','JscriptyQuestionReport','order','SessionId','rows','rimraf','zip-dir','fast-json-patch','moment','bluebird','mustache','util','path','sox','fs-extra','lodash','crypto','jsforce','desk.js','ioredis','../../components/auth/service','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../config/license/util','sendStatus','end','json','offset','undefined','limit','count','Content-Range','apply','reject','save','update','then','destroy','status','error','stack','name','index','map','JscriptySessionReport','fieldName','type','key','query','keys','filters','intersection','attributes','model','hasOwnProperty','nolimit','sort'];(function(_0xbe200f,_0x4b50eb){var _0x192597=function(_0x106cfd){while(--_0x106cfd){_0xbe200f['push'](_0xbe200f['shift']());}};_0x192597(++_0x4b50eb);}(_0x62c8,0x1a8));var _0x862c=function(_0x2b5c3e,_0x3994f6){_0x2b5c3e=_0x2b5c3e-0x0;var _0x561bed=_0x62c8[_0x2b5c3e];return _0x561bed;};'use strict';var emlformat=require('eml-format');var rimraf=require(_0x862c('0x0'));var zipdir=require(_0x862c('0x1'));var jsonpatch=require(_0x862c('0x2'));var rp=require('request-promise');var moment=require(_0x862c('0x3'));var BPromise=require(_0x862c('0x4'));var Mustache=require(_0x862c('0x5'));var util=require(_0x862c('0x6'));var path=require(_0x862c('0x7'));var sox=require(_0x862c('0x8'));var csv=require('to-csv');var ejs=require('ejs');var fs=require('fs');var fs_extra=require(_0x862c('0x9'));var _=require(_0x862c('0xa'));var squel=require('squel');var crypto=require(_0x862c('0xb'));var jsforce=require(_0x862c('0xc'));var deskjs=require(_0x862c('0xd'));var toCsv=require('to-csv');var querystring=require('querystring');var Papa=require('papaparse');var Redis=require(_0x862c('0xe'));var authService=require(_0x862c('0xf'));var qs=require('../../components/parsers/qs');var as=require(_0x862c('0x10'));var hardwareService=require(_0x862c('0x11'));var logger=require(_0x862c('0x12'))(_0x862c('0x13'));var utils=require(_0x862c('0x14'));var config=require(_0x862c('0x15'));var licenseUtil=require(_0x862c('0x16'));var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0xadeee0,_0x58c8a4){_0x58c8a4=_0x58c8a4||0xcc;return function(_0x31dc7e){if(_0x31dc7e){return _0xadeee0[_0x862c('0x17')](_0x58c8a4);}return _0xadeee0['status'](_0x58c8a4)[_0x862c('0x18')]();};}function respondWithResult(_0x3a5be7,_0x397ba5){_0x397ba5=_0x397ba5||0xc8;return function(_0x391ee1){if(_0x391ee1){return _0x3a5be7['status'](_0x397ba5)[_0x862c('0x19')](_0x391ee1);}};}function respondWithFilteredResult(_0x2f75e0,_0x5de703){return function(_0x115b46){if(_0x115b46){var _0x30beb9=typeof _0x5de703[_0x862c('0x1a')]===_0x862c('0x1b')&&typeof _0x5de703[_0x862c('0x1c')]===_0x862c('0x1b');var _0x5e91b8=_0x115b46[_0x862c('0x1d')];var _0x486403=_0x30beb9?0x0:_0x5de703[_0x862c('0x1a')];var _0x39b9b0=_0x30beb9?_0x115b46[_0x862c('0x1d')]:_0x5de703[_0x862c('0x1a')]+_0x5de703[_0x862c('0x1c')];var _0x239b68;if(_0x39b9b0>=_0x5e91b8){_0x39b9b0=_0x5e91b8;_0x239b68=0xc8;}else{_0x239b68=0xce;}_0x2f75e0['status'](_0x239b68);return _0x2f75e0['set'](_0x862c('0x1e'),_0x486403+'-'+_0x39b9b0+'/'+_0x5e91b8)['json'](_0x115b46);}return null;};}function patchUpdates(_0xa61eb4){return function(_0x1a8dfd){try{jsonpatch[_0x862c('0x1f')](_0x1a8dfd,_0xa61eb4,!![]);}catch(_0x14bc8a){return BPromise[_0x862c('0x20')](_0x14bc8a);}return _0x1a8dfd[_0x862c('0x21')]();};}function saveUpdates(_0x4cf5a4,_0x5e5f1d){return function(_0x118e5a){if(_0x118e5a){return _0x118e5a[_0x862c('0x22')](_0x4cf5a4)[_0x862c('0x23')](function(_0x4c8e88){return _0x4c8e88;});}return null;};}function removeEntity(_0x45c7a0,_0xddaa49){return function(_0x323fe4){if(_0x323fe4){return _0x323fe4[_0x862c('0x24')]()[_0x862c('0x23')](function(){_0x45c7a0[_0x862c('0x25')](0xcc)['end']();});}};}function handleEntityNotFound(_0x41b9e8,_0x8c9a85){return function(_0x30ff87){if(!_0x30ff87){_0x41b9e8[_0x862c('0x17')](0x194);}return _0x30ff87;};}function handleError(_0x14e358,_0x43ed70){_0x43ed70=_0x43ed70||0x1f4;return function(_0x560251){logger[_0x862c('0x26')](_0x560251[_0x862c('0x27')]);if(_0x560251[_0x862c('0x28')]){delete _0x560251['name'];}_0x14e358['status'](_0x43ed70)['send'](_0x560251);};}exports[_0x862c('0x29')]=function(_0x5e72f0,_0x128e65){var _0x14cf4a={},_0x5da7f1={},_0x4adc92={'count':0x0,'rows':[]};var _0x571a20=_[_0x862c('0x2a')](db[_0x862c('0x2b')]['rawAttributes'],function(_0x2f362e){return{'name':_0x2f362e[_0x862c('0x2c')],'type':_0x2f362e[_0x862c('0x2d')][_0x862c('0x2e')]};});_0x5da7f1['model']=_[_0x862c('0x2a')](_0x571a20,_0x862c('0x28'));_0x5da7f1[_0x862c('0x2f')]=_[_0x862c('0x30')](_0x5e72f0['query']);_0x5da7f1[_0x862c('0x31')]=_[_0x862c('0x32')](_0x5da7f1['model'],_0x5da7f1[_0x862c('0x2f')]);_0x14cf4a[_0x862c('0x33')]=_[_0x862c('0x32')](_0x5da7f1[_0x862c('0x34')],qs['fields'](_0x5e72f0[_0x862c('0x2f')]['fields']));_0x14cf4a[_0x862c('0x33')]=_0x14cf4a['attributes']['length']?_0x14cf4a[_0x862c('0x33')]:_0x5da7f1['model'];if(!_0x5e72f0['query'][_0x862c('0x35')](_0x862c('0x36'))){_0x14cf4a[_0x862c('0x1c')]=qs[_0x862c('0x1c')](_0x5e72f0[_0x862c('0x2f')]['limit']);_0x14cf4a[_0x862c('0x1a')]=qs[_0x862c('0x1a')](_0x5e72f0[_0x862c('0x2f')][_0x862c('0x1a')]);}_0x14cf4a['order']=qs[_0x862c('0x37')](_0x5e72f0[_0x862c('0x2f')][_0x862c('0x37')]);_0x14cf4a[_0x862c('0x38')]=qs['filters'](_[_0x862c('0x39')](_0x5e72f0[_0x862c('0x2f')],_0x5da7f1['filters']),_0x571a20);if(_0x5e72f0[_0x862c('0x2f')][_0x862c('0x3a')]){_0x14cf4a[_0x862c('0x38')]=_[_0x862c('0x3b')](_0x14cf4a[_0x862c('0x38')],{'$or':_[_0x862c('0x2a')](_0x571a20,function(_0x2a79c5){if(_0x2a79c5[_0x862c('0x2d')]!==_0x862c('0x3c')){var _0x450d5c={};_0x450d5c[_0x2a79c5[_0x862c('0x28')]]={'$like':'%'+_0x5e72f0['query']['filter']+'%'};return _0x450d5c;}})});}_0x14cf4a=_[_0x862c('0x3b')]({},_0x14cf4a,_0x5e72f0[_0x862c('0x3d')]);var _0x392572={'where':_0x14cf4a['where']};return db[_0x862c('0x2b')][_0x862c('0x1d')](_0x392572)[_0x862c('0x23')](function(_0x26b091){_0x4adc92[_0x862c('0x1d')]=_0x26b091;if(_0x5e72f0[_0x862c('0x2f')][_0x862c('0x3e')]){_0x14cf4a['include']=[{'all':!![]}];}return db['JscriptySessionReport'][_0x862c('0x3f')](_0x14cf4a);})[_0x862c('0x23')](function(_0x2c6350){_0x4adc92['rows']=_0x2c6350;return _0x4adc92;})['then'](respondWithFilteredResult(_0x128e65,_0x14cf4a))['catch'](handleError(_0x128e65,null));};exports[_0x862c('0x40')]=function(_0x4c41b8,_0x1bafe4){var _0x3cf4d3={'raw':!![],'where':{'id':_0x4c41b8[_0x862c('0x41')]['id']}},_0x15a931={};_0x15a931['model']=_[_0x862c('0x30')](db[_0x862c('0x2b')][_0x862c('0x42')]);_0x15a931[_0x862c('0x2f')]=_[_0x862c('0x30')](_0x4c41b8['query']);_0x15a931[_0x862c('0x31')]=_[_0x862c('0x32')](_0x15a931['model'],_0x15a931[_0x862c('0x2f')]);_0x3cf4d3['attributes']=_['intersection'](_0x15a931[_0x862c('0x34')],qs[_0x862c('0x43')](_0x4c41b8['query'][_0x862c('0x43')]));_0x3cf4d3['attributes']=_0x3cf4d3[_0x862c('0x33')][_0x862c('0x44')]?_0x3cf4d3[_0x862c('0x33')]:_0x15a931[_0x862c('0x34')];if(_0x4c41b8['query'][_0x862c('0x3e')]){_0x3cf4d3[_0x862c('0x45')]=[{'all':!![]}];}_0x3cf4d3=_[_0x862c('0x3b')]({},_0x3cf4d3,_0x4c41b8[_0x862c('0x3d')]);return db['JscriptySessionReport'][_0x862c('0x46')](_0x3cf4d3)['then'](handleEntityNotFound(_0x1bafe4,null))[_0x862c('0x23')](respondWithResult(_0x1bafe4,null))['catch'](handleError(_0x1bafe4,null));};exports[_0x862c('0x47')]=function(_0x93e884,_0x19a993){return db[_0x862c('0x2b')]['create'](_0x93e884[_0x862c('0x48')],{})[_0x862c('0x23')](respondWithResult(_0x19a993,0xc9))[_0x862c('0x49')](handleError(_0x19a993,null));};exports[_0x862c('0x22')]=function(_0x58c07e,_0x19083c){if(_0x58c07e[_0x862c('0x48')]['id']){delete _0x58c07e[_0x862c('0x48')]['id'];}return db[_0x862c('0x2b')][_0x862c('0x46')]({'where':{'id':_0x58c07e[_0x862c('0x41')]['id']}})[_0x862c('0x23')](handleEntityNotFound(_0x19083c,null))[_0x862c('0x23')](saveUpdates(_0x58c07e[_0x862c('0x48')],null))[_0x862c('0x23')](respondWithResult(_0x19083c,null))[_0x862c('0x49')](handleError(_0x19083c,null));};exports[_0x862c('0x24')]=function(_0x285b5d,_0x442d32){return db[_0x862c('0x2b')][_0x862c('0x46')]({'where':{'id':_0x285b5d[_0x862c('0x41')]['id']}})[_0x862c('0x23')](handleEntityNotFound(_0x442d32,null))[_0x862c('0x23')](removeEntity(_0x442d32,null))[_0x862c('0x49')](handleError(_0x442d32,null));};exports[_0x862c('0x4a')]=function(_0x24a3ea,_0x59fb78){return db[_0x862c('0x2b')][_0x862c('0x4a')]()[_0x862c('0x23')](respondWithResult(_0x59fb78,null))[_0x862c('0x49')](handleError(_0x59fb78,null));};exports['getQuestions']=function(_0x42ac8e,_0x32c94c,_0x217958){var _0x3f24fe={'raw':!![],'where':{}};var _0x3dc251={};var _0x4b68dd={'count':0x0,'rows':[]};return db['JscriptySessionReport'][_0x862c('0x4b')]({'where':{'id':_0x42ac8e[_0x862c('0x41')]['id']}})[_0x862c('0x23')](handleEntityNotFound(_0x32c94c,null))['then'](function(_0x3c930e){if(_0x3c930e){_0x3dc251[_0x862c('0x34')]=_[_0x862c('0x30')](db[_0x862c('0x4c')]['rawAttributes']);_0x3dc251[_0x862c('0x2f')]=_[_0x862c('0x30')](_0x42ac8e['query']);_0x3dc251[_0x862c('0x31')]=_[_0x862c('0x32')](_0x3dc251[_0x862c('0x34')],_0x3dc251['query']);_0x3f24fe['attributes']=_[_0x862c('0x32')](_0x3dc251['model'],qs[_0x862c('0x43')](_0x42ac8e[_0x862c('0x2f')][_0x862c('0x43')]));_0x3f24fe[_0x862c('0x33')]=_0x3f24fe['attributes'][_0x862c('0x44')]?_0x3f24fe[_0x862c('0x33')]:_0x3dc251[_0x862c('0x34')];if(!_0x42ac8e[_0x862c('0x2f')]['hasOwnProperty'](_0x862c('0x36'))){_0x3f24fe['limit']=qs[_0x862c('0x1c')](_0x42ac8e['query'][_0x862c('0x1c')]);_0x3f24fe[_0x862c('0x1a')]=qs[_0x862c('0x1a')](_0x42ac8e[_0x862c('0x2f')]['offset']);}_0x3f24fe[_0x862c('0x4d')]=qs[_0x862c('0x37')](_0x42ac8e[_0x862c('0x2f')][_0x862c('0x37')]);_0x3f24fe['where']=qs[_0x862c('0x31')](_[_0x862c('0x39')](_0x42ac8e[_0x862c('0x2f')],_0x3dc251['filters']));_0x3f24fe[_0x862c('0x38')][_0x862c('0x4e')]=_0x3c930e['id'];if(_0x42ac8e[_0x862c('0x2f')][_0x862c('0x3a')]){_0x3f24fe['where']=_[_0x862c('0x3b')](_0x3f24fe[_0x862c('0x38')],{'$or':_[_0x862c('0x2a')](_0x3f24fe[_0x862c('0x33')],function(_0x4c73d0){var _0x5d070f={};_0x5d070f[_0x4c73d0]={'$like':'%'+_0x42ac8e[_0x862c('0x2f')][_0x862c('0x3a')]+'%'};return _0x5d070f;})});}_0x3f24fe=_['merge']({},_0x3f24fe,_0x42ac8e[_0x862c('0x3d')]);return db[_0x862c('0x4c')]['count']({'where':_0x3f24fe[_0x862c('0x38')]})['then'](function(_0x554430){_0x4b68dd['count']=_0x554430;if(_0x42ac8e[_0x862c('0x2f')]['includeAll']){_0x3f24fe[_0x862c('0x45')]=[{'all':!![]}];}return db[_0x862c('0x4c')][_0x862c('0x3f')](_0x3f24fe);})[_0x862c('0x23')](function(_0xf4b94){_0x4b68dd[_0x862c('0x4f')]=_0xf4b94;return _0x4b68dd;});}})[_0x862c('0x23')](respondWithFilteredResult(_0x32c94c,_0x3f24fe))[_0x862c('0x49')](handleError(_0x32c94c,null));}; \ No newline at end of file diff --git a/server/api/jscriptySessionReport/jscriptySessionReport.model.js b/server/api/jscriptySessionReport/jscriptySessionReport.model.js index e6e65c6..27f350b 100644 --- a/server/api/jscriptySessionReport/jscriptySessionReport.model.js +++ b/server/api/jscriptySessionReport/jscriptySessionReport.model.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xb4c7=['../../config/logger','api','moment','request-promise','path','rimraf','../../config/environment','./jscriptySessionReport.attributes','define','report_jscripty_sessions','lodash','util'];(function(_0x14add3,_0x13ce8d){var _0x4a174f=function(_0x2b3ed7){while(--_0x2b3ed7){_0x14add3['push'](_0x14add3['shift']());}};_0x4a174f(++_0x13ce8d);}(_0xb4c7,0x1ea));var _0x7b4c=function(_0x4448c9,_0x499432){_0x4448c9=_0x4448c9-0x0;var _0x3fe8db=_0xb4c7[_0x4448c9];return _0x3fe8db;};'use strict';var _=require(_0x7b4c('0x0'));var util=require(_0x7b4c('0x1'));var logger=require(_0x7b4c('0x2'))(_0x7b4c('0x3'));var moment=require(_0x7b4c('0x4'));var BPromise=require('bluebird');var rp=require(_0x7b4c('0x5'));var fs=require('fs');var path=require(_0x7b4c('0x6'));var rimraf=require(_0x7b4c('0x7'));var config=require(_0x7b4c('0x8'));var attributes=require(_0x7b4c('0x9'));module['exports']=function(_0x1b0f57,_0x10e197){return _0x1b0f57[_0x7b4c('0xa')]('JscriptySessionReport',attributes,{'tableName':_0x7b4c('0xb'),'paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file +var _0x8ca9=['lodash','util','../../config/logger','api','moment','bluebird','request-promise','../../config/environment','exports','define','JscriptySessionReport','report_jscripty_sessions'];(function(_0x2d2a9b,_0x5870ff){var _0x3d2d49=function(_0x13884d){while(--_0x13884d){_0x2d2a9b['push'](_0x2d2a9b['shift']());}};_0x3d2d49(++_0x5870ff);}(_0x8ca9,0x9c));var _0x98ca=function(_0x182ba6,_0x4e11b1){_0x182ba6=_0x182ba6-0x0;var _0x3f4068=_0x8ca9[_0x182ba6];return _0x3f4068;};'use strict';var _=require(_0x98ca('0x0'));var util=require(_0x98ca('0x1'));var logger=require(_0x98ca('0x2'))(_0x98ca('0x3'));var moment=require(_0x98ca('0x4'));var BPromise=require(_0x98ca('0x5'));var rp=require(_0x98ca('0x6'));var fs=require('fs');var path=require('path');var rimraf=require('rimraf');var config=require(_0x98ca('0x7'));var attributes=require('./jscriptySessionReport.attributes');module[_0x98ca('0x8')]=function(_0x48415d,_0x219619){return _0x48415d[_0x98ca('0x9')](_0x98ca('0xa'),attributes,{'tableName':_0x98ca('0xb'),'paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file diff --git a/server/api/jscriptySessionReport/jscriptySessionReport.rpc.js b/server/api/jscriptySessionReport/jscriptySessionReport.rpc.js index 648f66c..b502fea 100644 --- a/server/api/jscriptySessionReport/jscriptySessionReport.rpc.js +++ b/server/api/jscriptySessionReport/jscriptySessionReport.rpc.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x7880=['../../config/logger','rpc','../../config/environment','jayson/promise','client','http','request','JscriptySessionReport,\x20%s,\x20%s','request\x20sent','debug','JscriptySessionReport,\x20%s,\x20%s,\x20%s','error','code','message','info','result','catch','util','moment','bluebird','randomstring','ioredis','../../mysqldb'];(function(_0x5def7e,_0x48d094){var _0x2403aa=function(_0x1ae916){while(--_0x1ae916){_0x5def7e['push'](_0x5def7e['shift']());}};_0x2403aa(++_0x48d094);}(_0x7880,0x1f4));var _0x0788=function(_0x89ee68,_0x18ca4d){_0x89ee68=_0x89ee68-0x0;var _0x1dfd3b=_0x7880[_0x89ee68];return _0x1dfd3b;};'use strict';var _=require('lodash');var util=require(_0x0788('0x0'));var moment=require(_0x0788('0x1'));var BPromise=require(_0x0788('0x2'));var rs=require(_0x0788('0x3'));var fs=require('fs');var Redis=require(_0x0788('0x4'));var db=require(_0x0788('0x5'))['db'];var utils=require('../../config/utils');var logger=require(_0x0788('0x6'))(_0x0788('0x7'));var config=require(_0x0788('0x8'));var jayson=require(_0x0788('0x9'));var client=jayson[_0x0788('0xa')][_0x0788('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x3f9cb8,_0x44bbb5,_0x3c29f3){return new BPromise(function(_0x422f8b,_0x55e48a){return client[_0x0788('0xc')](_0x3f9cb8,_0x3c29f3)['then'](function(_0xabaf81){logger['info'](_0x0788('0xd'),_0x44bbb5,_0x0788('0xe'));logger[_0x0788('0xf')](_0x0788('0x10'),_0x44bbb5,_0x0788('0xe'),JSON['stringify'](_0xabaf81));if(_0xabaf81[_0x0788('0x11')]){if(_0xabaf81[_0x0788('0x11')][_0x0788('0x12')]===0x1f4){logger[_0x0788('0x11')](_0x0788('0xd'),_0x44bbb5,_0xabaf81[_0x0788('0x11')][_0x0788('0x13')]);return _0x55e48a(_0xabaf81['error'][_0x0788('0x13')]);}logger[_0x0788('0x11')](_0x0788('0xd'),_0x44bbb5,_0xabaf81[_0x0788('0x11')]['message']);return _0x422f8b(_0xabaf81[_0x0788('0x11')]['message']);}else{logger[_0x0788('0x14')](_0x0788('0xd'),_0x44bbb5,_0x0788('0xe'));_0x422f8b(_0xabaf81[_0x0788('0x15')][_0x0788('0x13')]);}})[_0x0788('0x16')](function(_0x5e1a29){logger['error'](_0x0788('0xd'),_0x44bbb5,_0x5e1a29);_0x55e48a(_0x5e1a29);});});} \ No newline at end of file +var _0x32b6=['JscriptySessionReport,\x20%s,\x20%s','message','info','lodash','util','bluebird','randomstring','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','request','then','debug','request\x20sent','stringify','error','code'];(function(_0x151e77,_0x395874){var _0x53314d=function(_0x48184){while(--_0x48184){_0x151e77['push'](_0x151e77['shift']());}};_0x53314d(++_0x395874);}(_0x32b6,0x1d1));var _0x632b=function(_0x140c40,_0x244f09){_0x140c40=_0x140c40-0x0;var _0x34ca3f=_0x32b6[_0x140c40];return _0x34ca3f;};'use strict';var _=require(_0x632b('0x0'));var util=require(_0x632b('0x1'));var moment=require('moment');var BPromise=require(_0x632b('0x2'));var rs=require(_0x632b('0x3'));var fs=require('fs');var Redis=require('ioredis');var db=require('../../mysqldb')['db'];var utils=require(_0x632b('0x4'));var logger=require(_0x632b('0x5'))(_0x632b('0x6'));var config=require(_0x632b('0x7'));var jayson=require(_0x632b('0x8'));var client=jayson[_0x632b('0x9')][_0x632b('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x10458a,_0x3bbf43,_0x43d6c7){return new BPromise(function(_0x5128f5,_0x33d711){return client[_0x632b('0xb')](_0x10458a,_0x43d6c7)[_0x632b('0xc')](function(_0x174201){logger['info']('JscriptySessionReport,\x20%s,\x20%s',_0x3bbf43,'request\x20sent');logger[_0x632b('0xd')]('JscriptySessionReport,\x20%s,\x20%s,\x20%s',_0x3bbf43,_0x632b('0xe'),JSON[_0x632b('0xf')](_0x174201));if(_0x174201[_0x632b('0x10')]){if(_0x174201[_0x632b('0x10')][_0x632b('0x11')]===0x1f4){logger[_0x632b('0x10')](_0x632b('0x12'),_0x3bbf43,_0x174201[_0x632b('0x10')][_0x632b('0x13')]);return _0x33d711(_0x174201['error'][_0x632b('0x13')]);}logger[_0x632b('0x10')](_0x632b('0x12'),_0x3bbf43,_0x174201['error'][_0x632b('0x13')]);return _0x5128f5(_0x174201[_0x632b('0x10')][_0x632b('0x13')]);}else{logger[_0x632b('0x14')](_0x632b('0x12'),_0x3bbf43,_0x632b('0xe'));_0x5128f5(_0x174201['result'][_0x632b('0x13')]);}})['catch'](function(_0x4fdef2){logger[_0x632b('0x10')]('JscriptySessionReport,\x20%s,\x20%s',_0x3bbf43,_0x4fdef2);_0x33d711(_0x4fdef2);});});} \ No newline at end of file diff --git a/server/api/license/index.js b/server/api/license/index.js index 9562c7d..83489b7 100644 --- a/server/api/license/index.js +++ b/server/api/license/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xcad9=['../../config/environment','get','put','/:id','isAuthenticated','update','/download_log_file','util','path','connect-timeout','express','Router','../../components/auth/service','../../components/interaction/service'];(function(_0x545e48,_0x10ee8a){var _0x21b08b=function(_0x128931){while(--_0x128931){_0x545e48['push'](_0x545e48['shift']());}};_0x21b08b(++_0x10ee8a);}(_0xcad9,0x1f1));var _0x9cad=function(_0x1b21d3,_0x26e200){_0x1b21d3=_0x1b21d3-0x0;var _0x44e919=_0xcad9[_0x1b21d3];return _0x44e919;};'use strict';var multer=require('multer');var util=require(_0x9cad('0x0'));var path=require(_0x9cad('0x1'));var timeout=require(_0x9cad('0x2'));var express=require(_0x9cad('0x3'));var router=express[_0x9cad('0x4')]();var fs_extra=require('fs-extra');var auth=require(_0x9cad('0x5'));var interaction=require(_0x9cad('0x6'));var config=require(_0x9cad('0x7'));var controller=require('./license.controller');router[_0x9cad('0x8')]('/',controller['index']);router[_0x9cad('0x9')](_0x9cad('0xa'),auth[_0x9cad('0xb')](),controller[_0x9cad('0xc')]);router['get'](_0x9cad('0xd'),auth[_0x9cad('0xb')](),controller['downloadLogFile']);module['exports']=router; \ No newline at end of file +var _0x0670=['/:id','isAuthenticated','/download_log_file','downloadLogFile','exports','multer','util','path','connect-timeout','Router','../../components/auth/service','../../components/interaction/service','./license.controller','get','index','put'];(function(_0xb553ad,_0x5cd296){var _0x51f3db=function(_0x56f1af){while(--_0x56f1af){_0xb553ad['push'](_0xb553ad['shift']());}};_0x51f3db(++_0x5cd296);}(_0x0670,0x1c5));var _0x0067=function(_0x2575eb,_0x456f3f){_0x2575eb=_0x2575eb-0x0;var _0x1c49da=_0x0670[_0x2575eb];return _0x1c49da;};'use strict';var multer=require(_0x0067('0x0'));var util=require(_0x0067('0x1'));var path=require(_0x0067('0x2'));var timeout=require(_0x0067('0x3'));var express=require('express');var router=express[_0x0067('0x4')]();var fs_extra=require('fs-extra');var auth=require(_0x0067('0x5'));var interaction=require(_0x0067('0x6'));var config=require('../../config/environment');var controller=require(_0x0067('0x7'));router[_0x0067('0x8')]('/',controller[_0x0067('0x9')]);router[_0x0067('0xa')](_0x0067('0xb'),auth[_0x0067('0xc')](),controller['update']);router[_0x0067('0x8')](_0x0067('0xd'),auth[_0x0067('0xc')](),controller[_0x0067('0xe')]);module[_0x0067('0xf')]=router; \ No newline at end of file diff --git a/server/api/license/license.attributes.js b/server/api/license/license.attributes.js index 85a660a..7d5701a 100644 --- a/server/api/license/license.attributes.js +++ b/server/api/license/license.attributes.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xa48c=['STRING','INTEGER','TEXT'];(function(_0x1e6659,_0x1f860c){var _0x4d16e4=function(_0x21c05a){while(--_0x21c05a){_0x1e6659['push'](_0x1e6659['shift']());}};_0x4d16e4(++_0x1f860c);}(_0xa48c,0x11c));var _0xca48=function(_0xfb8f31,_0x2d3880){_0xfb8f31=_0xfb8f31-0x0;var _0x28b6e0=_0xa48c[_0xfb8f31];return _0x28b6e0;};'use strict';var Sequelize=require('sequelize');module['exports']={'license':{'type':Sequelize[_0xca48('0x0')]},'data1':{'type':Sequelize[_0xca48('0x1')]},'data2':{'type':Sequelize[_0xca48('0x1')]},'chatLicenseExceeded':{'type':Sequelize[_0xca48('0x2')],'defaultValue':0x0}}; \ No newline at end of file +var _0xe5b9=['STRING','INTEGER','exports'];(function(_0x736c40,_0x34651a){var _0xe59d21=function(_0x246df9){while(--_0x246df9){_0x736c40['push'](_0x736c40['shift']());}};_0xe59d21(++_0x34651a);}(_0xe5b9,0x1a6));var _0x9e5b=function(_0x9e7ecd,_0x4eb8b4){_0x9e7ecd=_0x9e7ecd-0x0;var _0x29572b=_0xe5b9[_0x9e7ecd];return _0x29572b;};'use strict';var Sequelize=require('sequelize');module[_0x9e5b('0x0')]={'license':{'type':Sequelize['TEXT']},'data1':{'type':Sequelize[_0x9e5b('0x1')]},'data2':{'type':Sequelize[_0x9e5b('0x1')]},'chatLicenseExceeded':{'type':Sequelize[_0x9e5b('0x2')],'defaultValue':0x0}}; \ No newline at end of file diff --git a/server/api/license/license.controller.js b/server/api/license/license.controller.js index dca55c9..9b5b500 100644 --- a/server/api/license/license.controller.js +++ b/server/api/license/license.controller.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xdd70=['papaparse','../../components/auth/service','../../components/parsers/qs','../../config/license/hardware','../../config/logger','api','../../config/utils','../../mysqldb','status','end','json','offset','undefined','count','limit','set','Content-Range','save','update','then','destroy','stack','name','send','../../config/license/util','index','model','keys','License','rawAttributes','query','filters','intersection','attributes','fields','merge','options','catch','body','find','params','get','checkLicense','key','/var','log','xcally','setHeader','Content-disposition','attachment;\x20filename=','Content-Type','text/plain','download','eml-format','rimraf','fast-json-patch','moment','mustache','util','path','sox','to-csv','ejs','fs-extra','lodash','squel','crypto','desk.js','querystring'];(function(_0x21d88d,_0x4ff19c){var _0x30a579=function(_0x24cf7a){while(--_0x24cf7a){_0x21d88d['push'](_0x21d88d['shift']());}};_0x30a579(++_0x4ff19c);}(_0xdd70,0x7a));var _0x0dd7=function(_0x3d7f9a,_0x3c0d93){_0x3d7f9a=_0x3d7f9a-0x0;var _0x40f6d0=_0xdd70[_0x3d7f9a];return _0x40f6d0;};'use strict';var emlformat=require(_0x0dd7('0x0'));var rimraf=require(_0x0dd7('0x1'));var zipdir=require('zip-dir');var jsonpatch=require(_0x0dd7('0x2'));var rp=require('request-promise');var moment=require(_0x0dd7('0x3'));var BPromise=require('bluebird');var Mustache=require(_0x0dd7('0x4'));var util=require(_0x0dd7('0x5'));var path=require(_0x0dd7('0x6'));var sox=require(_0x0dd7('0x7'));var csv=require(_0x0dd7('0x8'));var ejs=require(_0x0dd7('0x9'));var fs=require('fs');var fs_extra=require(_0x0dd7('0xa'));var _=require(_0x0dd7('0xb'));var squel=require(_0x0dd7('0xc'));var crypto=require(_0x0dd7('0xd'));var jsforce=require('jsforce');var deskjs=require(_0x0dd7('0xe'));var toCsv=require(_0x0dd7('0x8'));var querystring=require(_0x0dd7('0xf'));var Papa=require(_0x0dd7('0x10'));var Redis=require('ioredis');var authService=require(_0x0dd7('0x11'));var qs=require(_0x0dd7('0x12'));var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0x0dd7('0x13'));var logger=require(_0x0dd7('0x14'))(_0x0dd7('0x15'));var utils=require(_0x0dd7('0x16'));var config=require('../../config/environment');var licenseUtil=require('../../config/license/util');var db=require(_0x0dd7('0x17'))['db'];function respondWithStatusCode(_0x34a2e8,_0x261784){_0x261784=_0x261784||0xcc;return function(_0x366bd8){if(_0x366bd8){return _0x34a2e8['sendStatus'](_0x261784);}return _0x34a2e8[_0x0dd7('0x18')](_0x261784)[_0x0dd7('0x19')]();};}function respondWithResult(_0x4c6542,_0xa64891){_0xa64891=_0xa64891||0xc8;return function(_0xe37c63){if(_0xe37c63){return _0x4c6542[_0x0dd7('0x18')](_0xa64891)[_0x0dd7('0x1a')](_0xe37c63);}};}function respondWithFilteredResult(_0x5d1fe8,_0x280cb2){return function(_0x4c63b9){if(_0x4c63b9){var _0x3684ca=typeof _0x280cb2[_0x0dd7('0x1b')]===_0x0dd7('0x1c')&&typeof _0x280cb2['limit']===_0x0dd7('0x1c');var _0x2cae3d=_0x4c63b9[_0x0dd7('0x1d')];var _0x4af8dc=_0x3684ca?0x0:_0x280cb2['offset'];var _0x32dc6e=_0x3684ca?_0x4c63b9['count']:_0x280cb2[_0x0dd7('0x1b')]+_0x280cb2[_0x0dd7('0x1e')];var _0x28f5f7;if(_0x32dc6e>=_0x2cae3d){_0x32dc6e=_0x2cae3d;_0x28f5f7=0xc8;}else{_0x28f5f7=0xce;}_0x5d1fe8[_0x0dd7('0x18')](_0x28f5f7);return _0x5d1fe8[_0x0dd7('0x1f')](_0x0dd7('0x20'),_0x4af8dc+'-'+_0x32dc6e+'/'+_0x2cae3d)['json'](_0x4c63b9);}return null;};}function patchUpdates(_0x34d846){return function(_0x5d7950){try{jsonpatch['apply'](_0x5d7950,_0x34d846,!![]);}catch(_0x2ea8c2){return BPromise['reject'](_0x2ea8c2);}return _0x5d7950[_0x0dd7('0x21')]();};}function saveUpdates(_0x173115,_0xcdbe02){return function(_0x4905c5){if(_0x4905c5){return _0x4905c5[_0x0dd7('0x22')](_0x173115)[_0x0dd7('0x23')](function(_0x53c1a2){return _0x53c1a2;});}return null;};}function removeEntity(_0x6937ab,_0x29f300){return function(_0x857070){if(_0x857070){return _0x857070[_0x0dd7('0x24')]()[_0x0dd7('0x23')](function(){_0x6937ab[_0x0dd7('0x18')](0xcc)[_0x0dd7('0x19')]();});}};}function handleEntityNotFound(_0x538529,_0x1ea58e){return function(_0x3edc7f){if(!_0x3edc7f){_0x538529['sendStatus'](0x194);}return _0x3edc7f;};}function handleError(_0x217e09,_0x375464){_0x375464=_0x375464||0x1f4;return function(_0x568535){logger['error'](_0x568535[_0x0dd7('0x25')]);if(_0x568535[_0x0dd7('0x26')]){delete _0x568535[_0x0dd7('0x26')];}_0x217e09[_0x0dd7('0x18')](_0x375464)[_0x0dd7('0x27')](_0x568535);};}var utilLicense=require(_0x0dd7('0x28'));exports[_0x0dd7('0x29')]=function(_0x217d12,_0x40651b){var _0x191299={'raw':!![],'where':{'id':0x1}},_0x473ccd={};_0x473ccd[_0x0dd7('0x2a')]=_[_0x0dd7('0x2b')](db[_0x0dd7('0x2c')][_0x0dd7('0x2d')]);_0x473ccd[_0x0dd7('0x2e')]=_[_0x0dd7('0x2b')](_0x217d12[_0x0dd7('0x2e')]);_0x473ccd[_0x0dd7('0x2f')]=_[_0x0dd7('0x30')](_0x473ccd['model'],_0x473ccd[_0x0dd7('0x2e')]);_0x191299[_0x0dd7('0x31')]=_['intersection'](_0x473ccd[_0x0dd7('0x2a')],qs[_0x0dd7('0x32')](_0x217d12['query'][_0x0dd7('0x32')]));_0x191299[_0x0dd7('0x31')]=_0x191299['attributes']['length']?_0x191299[_0x0dd7('0x31')]:_0x473ccd['model'];_0x191299=_[_0x0dd7('0x33')]({},_0x191299,_0x217d12[_0x0dd7('0x34')]);return utilLicense['getLicense'](_0x191299)[_0x0dd7('0x23')](respondWithResult(_0x40651b,null))[_0x0dd7('0x35')](handleError(_0x40651b,null));};exports[_0x0dd7('0x22')]=function(_0x424956,_0x411b5f){if(_0x424956[_0x0dd7('0x36')]['id']){delete _0x424956[_0x0dd7('0x36')]['id'];}return db[_0x0dd7('0x2c')][_0x0dd7('0x37')]({'where':{'id':_0x424956[_0x0dd7('0x38')]['id']}})[_0x0dd7('0x23')](handleEntityNotFound(_0x411b5f,null))[_0x0dd7('0x23')](function(_0x1268da){var _0x6668f8=_0x1268da[_0x0dd7('0x39')]({'plain':!![]});return utilLicense[_0x0dd7('0x3a')](_0x6668f8,_0x424956[_0x0dd7('0x36')][_0x0dd7('0x3b')]);})['then'](function(_0x492246){if(!_0x492246['demo']){return saveUpdates(_0x424956[_0x0dd7('0x36')],null);}return _0x492246;})['then'](respondWithResult(_0x411b5f,null))[_0x0dd7('0x35')](handleError(_0x411b5f,null));};exports['downloadLogFile']=function(_0x39b483,_0x24bfd0){var _0x422fba='license-info.log';var _0x32261c=path['join'](_0x0dd7('0x3c'),_0x0dd7('0x3d'),_0x0dd7('0x3e'),_0x422fba);_0x24bfd0[_0x0dd7('0x3f')](_0x0dd7('0x40'),_0x0dd7('0x41')+_0x422fba);_0x24bfd0[_0x0dd7('0x1f')](_0x0dd7('0x42'),_0x0dd7('0x43'));_0x24bfd0[_0x0dd7('0x44')](_0x32261c);}; \ No newline at end of file +var _0x866a=['../../config/logger','api','../../config/utils','../../config/license/util','../../mysqldb','sendStatus','status','end','json','undefined','limit','count','offset','apply','save','update','then','error','stack','name','send','model','keys','query','filters','intersection','attributes','fields','length','merge','options','getLicense','catch','body','find','params','get','checkLicense','demo','downloadLogFile','license-info.log','/var','log','xcally','setHeader','Content-disposition','attachment;\x20filename=','set','Content-Type','text/plain','download','eml-format','rimraf','zip-dir','fast-json-patch','moment','path','sox','to-csv','ejs','fs-extra','squel','crypto','jsforce','desk.js','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch'];(function(_0x4abe25,_0x3d2379){var _0x472ebf=function(_0x592f0d){while(--_0x592f0d){_0x4abe25['push'](_0x4abe25['shift']());}};_0x472ebf(++_0x3d2379);}(_0x866a,0x1dd));var _0xa866=function(_0x406d39,_0xd3c8f1){_0x406d39=_0x406d39-0x0;var _0x2eb792=_0x866a[_0x406d39];return _0x2eb792;};'use strict';var emlformat=require(_0xa866('0x0'));var rimraf=require(_0xa866('0x1'));var zipdir=require(_0xa866('0x2'));var jsonpatch=require(_0xa866('0x3'));var rp=require('request-promise');var moment=require(_0xa866('0x4'));var BPromise=require('bluebird');var Mustache=require('mustache');var util=require('util');var path=require(_0xa866('0x5'));var sox=require(_0xa866('0x6'));var csv=require(_0xa866('0x7'));var ejs=require(_0xa866('0x8'));var fs=require('fs');var fs_extra=require(_0xa866('0x9'));var _=require('lodash');var squel=require(_0xa866('0xa'));var crypto=require(_0xa866('0xb'));var jsforce=require(_0xa866('0xc'));var deskjs=require(_0xa866('0xd'));var toCsv=require(_0xa866('0x7'));var querystring=require(_0xa866('0xe'));var Papa=require(_0xa866('0xf'));var Redis=require(_0xa866('0x10'));var authService=require(_0xa866('0x11'));var qs=require(_0xa866('0x12'));var as=require(_0xa866('0x13'));var hardwareService=require('../../config/license/hardware');var logger=require(_0xa866('0x14'))(_0xa866('0x15'));var utils=require(_0xa866('0x16'));var config=require('../../config/environment');var licenseUtil=require(_0xa866('0x17'));var db=require(_0xa866('0x18'))['db'];function respondWithStatusCode(_0x1495f4,_0x5bf175){_0x5bf175=_0x5bf175||0xcc;return function(_0x124b1f){if(_0x124b1f){return _0x1495f4[_0xa866('0x19')](_0x5bf175);}return _0x1495f4[_0xa866('0x1a')](_0x5bf175)[_0xa866('0x1b')]();};}function respondWithResult(_0x3fd752,_0xb66966){_0xb66966=_0xb66966||0xc8;return function(_0xca8d82){if(_0xca8d82){return _0x3fd752['status'](_0xb66966)[_0xa866('0x1c')](_0xca8d82);}};}function respondWithFilteredResult(_0x122b62,_0x2108ec){return function(_0x3d6fc6){if(_0x3d6fc6){var _0x5133d8=typeof _0x2108ec['offset']===_0xa866('0x1d')&&typeof _0x2108ec[_0xa866('0x1e')]==='undefined';var _0x92964b=_0x3d6fc6[_0xa866('0x1f')];var _0x35b92a=_0x5133d8?0x0:_0x2108ec[_0xa866('0x20')];var _0x371847=_0x5133d8?_0x3d6fc6['count']:_0x2108ec[_0xa866('0x20')]+_0x2108ec[_0xa866('0x1e')];var _0x28e95b;if(_0x371847>=_0x92964b){_0x371847=_0x92964b;_0x28e95b=0xc8;}else{_0x28e95b=0xce;}_0x122b62[_0xa866('0x1a')](_0x28e95b);return _0x122b62['set']('Content-Range',_0x35b92a+'-'+_0x371847+'/'+_0x92964b)[_0xa866('0x1c')](_0x3d6fc6);}return null;};}function patchUpdates(_0x5d4ace){return function(_0x2a9cf6){try{jsonpatch[_0xa866('0x21')](_0x2a9cf6,_0x5d4ace,!![]);}catch(_0x5d915f){return BPromise['reject'](_0x5d915f);}return _0x2a9cf6[_0xa866('0x22')]();};}function saveUpdates(_0x2315d3,_0x173295){return function(_0x572ab){if(_0x572ab){return _0x572ab[_0xa866('0x23')](_0x2315d3)[_0xa866('0x24')](function(_0x427a63){return _0x427a63;});}return null;};}function removeEntity(_0x225fce,_0xf88422){return function(_0x176bba){if(_0x176bba){return _0x176bba['destroy']()[_0xa866('0x24')](function(){_0x225fce['status'](0xcc)[_0xa866('0x1b')]();});}};}function handleEntityNotFound(_0x4989f6,_0x10affa){return function(_0x2876af){if(!_0x2876af){_0x4989f6['sendStatus'](0x194);}return _0x2876af;};}function handleError(_0x4c7db1,_0x5d208a){_0x5d208a=_0x5d208a||0x1f4;return function(_0x46345b){logger[_0xa866('0x25')](_0x46345b[_0xa866('0x26')]);if(_0x46345b[_0xa866('0x27')]){delete _0x46345b['name'];}_0x4c7db1[_0xa866('0x1a')](_0x5d208a)[_0xa866('0x28')](_0x46345b);};}var utilLicense=require(_0xa866('0x17'));exports['index']=function(_0x217ad0,_0x3bbcd6){var _0x45106a={'raw':!![],'where':{'id':0x1}},_0x2fd75d={};_0x2fd75d[_0xa866('0x29')]=_[_0xa866('0x2a')](db['License']['rawAttributes']);_0x2fd75d['query']=_[_0xa866('0x2a')](_0x217ad0[_0xa866('0x2b')]);_0x2fd75d[_0xa866('0x2c')]=_[_0xa866('0x2d')](_0x2fd75d['model'],_0x2fd75d[_0xa866('0x2b')]);_0x45106a[_0xa866('0x2e')]=_['intersection'](_0x2fd75d[_0xa866('0x29')],qs[_0xa866('0x2f')](_0x217ad0[_0xa866('0x2b')]['fields']));_0x45106a[_0xa866('0x2e')]=_0x45106a[_0xa866('0x2e')][_0xa866('0x30')]?_0x45106a['attributes']:_0x2fd75d['model'];_0x45106a=_[_0xa866('0x31')]({},_0x45106a,_0x217ad0[_0xa866('0x32')]);return utilLicense[_0xa866('0x33')](_0x45106a)[_0xa866('0x24')](respondWithResult(_0x3bbcd6,null))[_0xa866('0x34')](handleError(_0x3bbcd6,null));};exports[_0xa866('0x23')]=function(_0x2b1517,_0x40218b){if(_0x2b1517[_0xa866('0x35')]['id']){delete _0x2b1517[_0xa866('0x35')]['id'];}return db['License'][_0xa866('0x36')]({'where':{'id':_0x2b1517[_0xa866('0x37')]['id']}})['then'](handleEntityNotFound(_0x40218b,null))[_0xa866('0x24')](function(_0x5d3983){var _0x3998c1=_0x5d3983[_0xa866('0x38')]({'plain':!![]});return utilLicense[_0xa866('0x39')](_0x3998c1,_0x2b1517[_0xa866('0x35')]['key']);})['then'](function(_0x4e63a3){if(!_0x4e63a3[_0xa866('0x3a')]){return saveUpdates(_0x2b1517[_0xa866('0x35')],null);}return _0x4e63a3;})['then'](respondWithResult(_0x40218b,null))['catch'](handleError(_0x40218b,null));};exports[_0xa866('0x3b')]=function(_0x427523,_0x3175b9){var _0x15cd70=_0xa866('0x3c');var _0x2e1c0e=path['join'](_0xa866('0x3d'),_0xa866('0x3e'),_0xa866('0x3f'),_0x15cd70);_0x3175b9[_0xa866('0x40')](_0xa866('0x41'),_0xa866('0x42')+_0x15cd70);_0x3175b9[_0xa866('0x43')](_0xa866('0x44'),_0xa866('0x45'));_0x3175b9[_0xa866('0x46')](_0x2e1c0e);}; \ No newline at end of file diff --git a/server/api/license/license.model.js b/server/api/license/license.model.js index f136fb3..c145891 100644 --- a/server/api/license/license.model.js +++ b/server/api/license/license.model.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x320c=['util','../../config/logger','api','moment','bluebird','request-promise','path','rimraf','../../config/environment','./license.attributes','exports','License','lodash'];(function(_0x265519,_0x116ebb){var _0x4c14cb=function(_0x377406){while(--_0x377406){_0x265519['push'](_0x265519['shift']());}};_0x4c14cb(++_0x116ebb);}(_0x320c,0x1ac));var _0xc320=function(_0x2097ee,_0x288800){_0x2097ee=_0x2097ee-0x0;var _0x38c84c=_0x320c[_0x2097ee];return _0x38c84c;};'use strict';var _=require(_0xc320('0x0'));var util=require(_0xc320('0x1'));var logger=require(_0xc320('0x2'))(_0xc320('0x3'));var moment=require(_0xc320('0x4'));var BPromise=require(_0xc320('0x5'));var rp=require(_0xc320('0x6'));var fs=require('fs');var path=require(_0xc320('0x7'));var rimraf=require(_0xc320('0x8'));var config=require(_0xc320('0x9'));var attributes=require(_0xc320('0xa'));module[_0xc320('0xb')]=function(_0x4fb372,_0x11a23a){return _0x4fb372['define'](_0xc320('0xc'),attributes,{'tableName':'license','paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file +var _0xa68b=['define','util','api','bluebird','request-promise','path','rimraf','../../config/environment','exports'];(function(_0x4f9b18,_0x2cb5ca){var _0x29f20c=function(_0x268b3d){while(--_0x268b3d){_0x4f9b18['push'](_0x4f9b18['shift']());}};_0x29f20c(++_0x2cb5ca);}(_0xa68b,0xd9));var _0xba68=function(_0x292f93,_0x2c6e8e){_0x292f93=_0x292f93-0x0;var _0x5a94b1=_0xa68b[_0x292f93];return _0x5a94b1;};'use strict';var _=require('lodash');var util=require(_0xba68('0x0'));var logger=require('../../config/logger')(_0xba68('0x1'));var moment=require('moment');var BPromise=require(_0xba68('0x2'));var rp=require(_0xba68('0x3'));var fs=require('fs');var path=require(_0xba68('0x4'));var rimraf=require(_0xba68('0x5'));var config=require(_0xba68('0x6'));var attributes=require('./license.attributes');module[_0xba68('0x7')]=function(_0x219358,_0xd589b9){return _0x219358[_0xba68('0x8')]('License',attributes,{'tableName':'license','paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file diff --git a/server/api/license/license.rpc.js b/server/api/license/license.rpc.js index 20cb395..5bad2a5 100644 --- a/server/api/license/license.rpc.js +++ b/server/api/license/license.rpc.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x8b14=['../../config/environment','jayson/promise','client','then','info','request\x20sent','debug','License,\x20%s,\x20%s,\x20%s','stringify','error','code','License,\x20%s,\x20%s','message','catch','lodash','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','rpc'];(function(_0x586f15,_0xb57cfc){var _0x452531=function(_0x1970d9){while(--_0x1970d9){_0x586f15['push'](_0x586f15['shift']());}};_0x452531(++_0xb57cfc);}(_0x8b14,0x1b0));var _0x48b1=function(_0x20a584,_0xe384a5){_0x20a584=_0x20a584-0x0;var _0x4b41a8=_0x8b14[_0x20a584];return _0x4b41a8;};'use strict';var _=require(_0x48b1('0x0'));var util=require('util');var moment=require(_0x48b1('0x1'));var BPromise=require(_0x48b1('0x2'));var rs=require(_0x48b1('0x3'));var fs=require('fs');var Redis=require(_0x48b1('0x4'));var db=require(_0x48b1('0x5'))['db'];var utils=require(_0x48b1('0x6'));var logger=require('../../config/logger')(_0x48b1('0x7'));var config=require(_0x48b1('0x8'));var jayson=require(_0x48b1('0x9'));var client=jayson[_0x48b1('0xa')]['http']({'port':0x232a});function respondWithRpcPromise(_0x125362,_0x2be685,_0x5b3d94){return new BPromise(function(_0x3c1674,_0xac10e1){return client['request'](_0x125362,_0x5b3d94)[_0x48b1('0xb')](function(_0x4f9a61){logger[_0x48b1('0xc')]('License,\x20%s,\x20%s',_0x2be685,_0x48b1('0xd'));logger[_0x48b1('0xe')](_0x48b1('0xf'),_0x2be685,_0x48b1('0xd'),JSON[_0x48b1('0x10')](_0x4f9a61));if(_0x4f9a61[_0x48b1('0x11')]){if(_0x4f9a61[_0x48b1('0x11')][_0x48b1('0x12')]===0x1f4){logger['error'](_0x48b1('0x13'),_0x2be685,_0x4f9a61['error'][_0x48b1('0x14')]);return _0xac10e1(_0x4f9a61[_0x48b1('0x11')]['message']);}logger[_0x48b1('0x11')](_0x48b1('0x13'),_0x2be685,_0x4f9a61[_0x48b1('0x11')][_0x48b1('0x14')]);return _0x3c1674(_0x4f9a61[_0x48b1('0x11')]['message']);}else{logger[_0x48b1('0xc')](_0x48b1('0x13'),_0x2be685,_0x48b1('0xd'));_0x3c1674(_0x4f9a61['result'][_0x48b1('0x14')]);}})[_0x48b1('0x15')](function(_0xe539c7){logger[_0x48b1('0x11')]('License,\x20%s,\x20%s',_0x2be685,_0xe539c7);_0xac10e1(_0xe539c7);});});} \ No newline at end of file +var _0x1a86=['util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/logger','rpc','jayson/promise','client','http','request','then','info','License,\x20%s,\x20%s','request\x20sent','License,\x20%s,\x20%s,\x20%s','stringify','error','message','result','catch','lodash'];(function(_0x590649,_0x28f93d){var _0x4e1806=function(_0x145c9a){while(--_0x145c9a){_0x590649['push'](_0x590649['shift']());}};_0x4e1806(++_0x28f93d);}(_0x1a86,0x1e2));var _0x61a8=function(_0x10852e,_0x5d1a81){_0x10852e=_0x10852e-0x0;var _0x38cfd8=_0x1a86[_0x10852e];return _0x38cfd8;};'use strict';var _=require(_0x61a8('0x0'));var util=require(_0x61a8('0x1'));var moment=require(_0x61a8('0x2'));var BPromise=require(_0x61a8('0x3'));var rs=require(_0x61a8('0x4'));var fs=require('fs');var Redis=require(_0x61a8('0x5'));var db=require(_0x61a8('0x6'))['db'];var utils=require('../../config/utils');var logger=require(_0x61a8('0x7'))(_0x61a8('0x8'));var config=require('../../config/environment');var jayson=require(_0x61a8('0x9'));var client=jayson[_0x61a8('0xa')][_0x61a8('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x5e7fa6,_0xba844c,_0x56d906){return new BPromise(function(_0x4a8ecc,_0x33b404){return client[_0x61a8('0xc')](_0x5e7fa6,_0x56d906)[_0x61a8('0xd')](function(_0x4e2489){logger[_0x61a8('0xe')](_0x61a8('0xf'),_0xba844c,_0x61a8('0x10'));logger['debug'](_0x61a8('0x11'),_0xba844c,_0x61a8('0x10'),JSON[_0x61a8('0x12')](_0x4e2489));if(_0x4e2489[_0x61a8('0x13')]){if(_0x4e2489[_0x61a8('0x13')]['code']===0x1f4){logger[_0x61a8('0x13')](_0x61a8('0xf'),_0xba844c,_0x4e2489[_0x61a8('0x13')][_0x61a8('0x14')]);return _0x33b404(_0x4e2489[_0x61a8('0x13')][_0x61a8('0x14')]);}logger[_0x61a8('0x13')](_0x61a8('0xf'),_0xba844c,_0x4e2489[_0x61a8('0x13')][_0x61a8('0x14')]);return _0x4a8ecc(_0x4e2489[_0x61a8('0x13')][_0x61a8('0x14')]);}else{logger[_0x61a8('0xe')](_0x61a8('0xf'),_0xba844c,_0x61a8('0x10'));_0x4a8ecc(_0x4e2489[_0x61a8('0x15')][_0x61a8('0x14')]);}})[_0x61a8('0x16')](function(_0x4686c4){logger[_0x61a8('0x13')](_0x61a8('0xf'),_0xba844c,_0x4686c4);_0x33b404(_0x4686c4);});});} \ No newline at end of file diff --git a/server/api/mailAccount/index.js b/server/api/mailAccount/index.js index 208bbbb..d9aeea6 100644 --- a/server/api/mailAccount/index.js +++ b/server/api/mailAccount/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x0b6b=['getSmtp','/:id/interactions','getInteractions','/:id/applications','getApplications','/:id/messages','getMessages','/:id/verify','/:id/users','getAgents','post','addAnswer','create','addSmtp','addInteraction','addApplications','/:id/send','send','addAgents','put','/:id','update','delete','removeDispositions','removeAnswers','removeSmtp','destroy','removeAgents','exports','multer','connect-timeout','express','fs-extra','../../components/auth/service','../../config/environment','./mailAccount.controller','isAuthenticated','/describe','get','/:id/dispositions','getDispositions','/:id/canned_answers','getAnswers','/:id/in_servers','getImap','/:id/out_servers'];(function(_0x5adba0,_0x4a8dfa){var _0x281ae6=function(_0x2cac49){while(--_0x2cac49){_0x5adba0['push'](_0x5adba0['shift']());}};_0x281ae6(++_0x4a8dfa);}(_0x0b6b,0xd5));var _0xb0b6=function(_0x44946b,_0xf874ec){_0x44946b=_0x44946b-0x0;var _0x249bc4=_0x0b6b[_0x44946b];return _0x249bc4;};'use strict';var multer=require(_0xb0b6('0x0'));var util=require('util');var path=require('path');var timeout=require(_0xb0b6('0x1'));var express=require(_0xb0b6('0x2'));var router=express['Router']();var fs_extra=require(_0xb0b6('0x3'));var auth=require(_0xb0b6('0x4'));var interaction=require('../../components/interaction/service');var config=require(_0xb0b6('0x5'));var controller=require(_0xb0b6('0x6'));router['get']('/',auth[_0xb0b6('0x7')](),controller['index']);router['get'](_0xb0b6('0x8'),auth[_0xb0b6('0x7')](),controller['describe']);router[_0xb0b6('0x9')]('/:id',auth[_0xb0b6('0x7')](),controller['show']);router[_0xb0b6('0x9')](_0xb0b6('0xa'),auth[_0xb0b6('0x7')](),controller[_0xb0b6('0xb')]);router[_0xb0b6('0x9')](_0xb0b6('0xc'),auth[_0xb0b6('0x7')](),controller[_0xb0b6('0xd')]);router[_0xb0b6('0x9')](_0xb0b6('0xe'),auth[_0xb0b6('0x7')](),controller[_0xb0b6('0xf')]);router[_0xb0b6('0x9')](_0xb0b6('0x10'),auth[_0xb0b6('0x7')](),controller[_0xb0b6('0x11')]);router[_0xb0b6('0x9')](_0xb0b6('0x12'),auth[_0xb0b6('0x7')](),controller[_0xb0b6('0x13')]);router[_0xb0b6('0x9')](_0xb0b6('0x14'),auth['isAuthenticated'](),controller[_0xb0b6('0x15')]);router[_0xb0b6('0x9')](_0xb0b6('0x16'),auth[_0xb0b6('0x7')](),controller[_0xb0b6('0x17')]);router[_0xb0b6('0x9')](_0xb0b6('0x18'),auth[_0xb0b6('0x7')](),controller['verifySmtp']);router['get'](_0xb0b6('0x19'),auth[_0xb0b6('0x7')](),controller[_0xb0b6('0x1a')]);router[_0xb0b6('0x1b')](_0xb0b6('0xa'),auth[_0xb0b6('0x7')](),controller['addDisposition']);router['post'](_0xb0b6('0xc'),auth[_0xb0b6('0x7')](),controller[_0xb0b6('0x1c')]);router['post']('/',auth[_0xb0b6('0x7')](),controller[_0xb0b6('0x1d')]);router[_0xb0b6('0x1b')](_0xb0b6('0xe'),auth['isAuthenticated'](),controller['addImap']);router[_0xb0b6('0x1b')]('/:id/out_servers',auth[_0xb0b6('0x7')](),controller[_0xb0b6('0x1e')]);router['post'](_0xb0b6('0x12'),auth[_0xb0b6('0x7')](),controller[_0xb0b6('0x1f')]);router[_0xb0b6('0x1b')]('/:id/applications',auth['isAuthenticated'](),controller[_0xb0b6('0x20')]);router[_0xb0b6('0x1b')](_0xb0b6('0x21'),auth[_0xb0b6('0x7')](),controller[_0xb0b6('0x22')]);router[_0xb0b6('0x1b')](_0xb0b6('0x19'),auth[_0xb0b6('0x7')](),controller[_0xb0b6('0x23')]);router[_0xb0b6('0x24')](_0xb0b6('0x25'),auth[_0xb0b6('0x7')](),controller[_0xb0b6('0x26')]);router[_0xb0b6('0x27')](_0xb0b6('0xa'),auth['isAuthenticated'](),controller[_0xb0b6('0x28')]);router[_0xb0b6('0x27')](_0xb0b6('0xc'),auth[_0xb0b6('0x7')](),controller[_0xb0b6('0x29')]);router['delete'](_0xb0b6('0xe'),auth[_0xb0b6('0x7')](),controller['removeImap']);router[_0xb0b6('0x27')](_0xb0b6('0x10'),auth[_0xb0b6('0x7')](),controller[_0xb0b6('0x2a')]);router[_0xb0b6('0x27')](_0xb0b6('0x25'),auth[_0xb0b6('0x7')](),controller[_0xb0b6('0x2b')]);router[_0xb0b6('0x27')](_0xb0b6('0x19'),auth[_0xb0b6('0x7')](),controller[_0xb0b6('0x2c')]);module[_0xb0b6('0x2d')]=router; \ No newline at end of file +var _0x3c00=['/:id/messages','getMessages','/:id/verify','/:id/users','getAgents','post','/:id/dispositions','/:id/canned_answers','addImap','addInteraction','/:id/applications','addApplications','send','addAgents','put','delete','removeDispositions','removeAnswers','removeImap','destroy','multer','util','connect-timeout','express','Router','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','./mailAccount.controller','get','isAuthenticated','index','/describe','/:id','show','getDispositions','/:id/in_servers','/:id/out_servers','getSmtp','/:id/interactions','getInteractions','getApplications'];(function(_0x2a97c1,_0x5ce154){var _0x106b47=function(_0x8c8390){while(--_0x8c8390){_0x2a97c1['push'](_0x2a97c1['shift']());}};_0x106b47(++_0x5ce154);}(_0x3c00,0x116));var _0x03c0=function(_0x423be3,_0x5b8952){_0x423be3=_0x423be3-0x0;var _0x10f24e=_0x3c00[_0x423be3];return _0x10f24e;};'use strict';var multer=require(_0x03c0('0x0'));var util=require(_0x03c0('0x1'));var path=require('path');var timeout=require(_0x03c0('0x2'));var express=require(_0x03c0('0x3'));var router=express[_0x03c0('0x4')]();var fs_extra=require(_0x03c0('0x5'));var auth=require(_0x03c0('0x6'));var interaction=require(_0x03c0('0x7'));var config=require(_0x03c0('0x8'));var controller=require(_0x03c0('0x9'));router[_0x03c0('0xa')]('/',auth[_0x03c0('0xb')](),controller[_0x03c0('0xc')]);router[_0x03c0('0xa')](_0x03c0('0xd'),auth['isAuthenticated'](),controller['describe']);router[_0x03c0('0xa')](_0x03c0('0xe'),auth[_0x03c0('0xb')](),controller[_0x03c0('0xf')]);router[_0x03c0('0xa')]('/:id/dispositions',auth[_0x03c0('0xb')](),controller[_0x03c0('0x10')]);router[_0x03c0('0xa')]('/:id/canned_answers',auth['isAuthenticated'](),controller['getAnswers']);router['get'](_0x03c0('0x11'),auth[_0x03c0('0xb')](),controller['getImap']);router['get'](_0x03c0('0x12'),auth[_0x03c0('0xb')](),controller[_0x03c0('0x13')]);router[_0x03c0('0xa')](_0x03c0('0x14'),auth[_0x03c0('0xb')](),controller[_0x03c0('0x15')]);router['get']('/:id/applications',auth[_0x03c0('0xb')](),controller[_0x03c0('0x16')]);router[_0x03c0('0xa')](_0x03c0('0x17'),auth[_0x03c0('0xb')](),controller[_0x03c0('0x18')]);router[_0x03c0('0xa')](_0x03c0('0x19'),auth[_0x03c0('0xb')](),controller['verifySmtp']);router[_0x03c0('0xa')](_0x03c0('0x1a'),auth[_0x03c0('0xb')](),controller[_0x03c0('0x1b')]);router[_0x03c0('0x1c')](_0x03c0('0x1d'),auth[_0x03c0('0xb')](),controller['addDisposition']);router[_0x03c0('0x1c')](_0x03c0('0x1e'),auth['isAuthenticated'](),controller['addAnswer']);router['post']('/',auth[_0x03c0('0xb')](),controller['create']);router[_0x03c0('0x1c')]('/:id/in_servers',auth[_0x03c0('0xb')](),controller[_0x03c0('0x1f')]);router['post'](_0x03c0('0x12'),auth[_0x03c0('0xb')](),controller['addSmtp']);router[_0x03c0('0x1c')](_0x03c0('0x14'),auth[_0x03c0('0xb')](),controller[_0x03c0('0x20')]);router[_0x03c0('0x1c')](_0x03c0('0x21'),auth[_0x03c0('0xb')](),controller[_0x03c0('0x22')]);router['post']('/:id/send',auth[_0x03c0('0xb')](),controller[_0x03c0('0x23')]);router['post']('/:id/users',auth['isAuthenticated'](),controller[_0x03c0('0x24')]);router[_0x03c0('0x25')](_0x03c0('0xe'),auth['isAuthenticated'](),controller['update']);router[_0x03c0('0x26')]('/:id/dispositions',auth['isAuthenticated'](),controller[_0x03c0('0x27')]);router[_0x03c0('0x26')](_0x03c0('0x1e'),auth['isAuthenticated'](),controller[_0x03c0('0x28')]);router[_0x03c0('0x26')](_0x03c0('0x11'),auth[_0x03c0('0xb')](),controller[_0x03c0('0x29')]);router[_0x03c0('0x26')](_0x03c0('0x12'),auth[_0x03c0('0xb')](),controller['removeSmtp']);router[_0x03c0('0x26')]('/:id',auth[_0x03c0('0xb')](),controller[_0x03c0('0x2a')]);router[_0x03c0('0x26')]('/:id/users',auth['isAuthenticated'](),controller['removeAgents']);module['exports']=router; \ No newline at end of file diff --git a/server/api/mailAccount/mailAccount.attributes.js b/server/api/mailAccount/mailAccount.attributes.js index fcbf1ac..03fd20c 100644 --- a/server/api/mailAccount/mailAccount.attributes.js +++ b/server/api/mailAccount/mailAccount.attributes.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x3084=['TEXT','Arial,Helvetica,sans-serif','INTEGER','UNSIGNED','Status\x20to\x20put\x20when\x20mandatory\x20disposition\x20is\x20enabled','Enabled/disables\x20mandatory\x20dispo\x20on\x20a\x20queue','setDataValue','mandatoryDispositionPauseId','ENUM','gmail','hotmail','yahoo','getDataValue','provider','custom','sequelize','exports','STRING','BOOLEAN'];(function(_0x40947e,_0x342739){var _0xadba3f=function(_0x5e788b){while(--_0x5e788b){_0x40947e['push'](_0x40947e['shift']());}};_0xadba3f(++_0x342739);}(_0x3084,0x13f));var _0x4308=function(_0x3a061d,_0xd83186){_0x3a061d=_0x3a061d-0x0;var _0x5c2dc1=_0x3084[_0x3a061d];return _0x5c2dc1;};'use strict';var Sequelize=require(_0x4308('0x0'));module[_0x4308('0x1')]={'description':{'type':Sequelize[_0x4308('0x2')]},'name':{'type':Sequelize[_0x4308('0x2')],'allowNull':![]},'service':{'type':Sequelize[_0x4308('0x3')],'defaultValue':![]},'email':{'type':Sequelize[_0x4308('0x2')],'validate':{'isEmail':!![]}},'active':{'type':Sequelize[_0x4308('0x3')],'defaultValue':!![]},'key':{'type':Sequelize['STRING'],'allowNull':![]},'template':{'type':Sequelize[_0x4308('0x4')]},'markAsUnread':{'type':Sequelize[_0x4308('0x3')],'defaultValue':![]},'fontFamily':{'type':Sequelize[_0x4308('0x2')],'allowNull':![],'defaultValue':_0x4308('0x5')},'fontSize':{'type':Sequelize[_0x4308('0x6')](0x2)[_0x4308('0x7')],'defaultValue':0xd,'validate':{'min':0x8,'max':0x48}},'notificationTemplate':{'type':Sequelize[_0x4308('0x4')],'defaultValue':function(){return'Account:\x20{{account.name}}
{{#queue}}Queue:\x20{{queue.name}}
{{/queue}}From\x20:\x20{{from}}
Subject\x20:\x20{{message.subject}}';}},'notificationSound':{'type':Sequelize[_0x4308('0x3')],'defaultValue':!![]},'notificationShake':{'type':Sequelize[_0x4308('0x3')],'defaultValue':![]},'waitForTheAssignedAgent':{'type':Sequelize['INTEGER'],'validate':{'min':0x1,'max':0x20c49b},'defaultValue':0xa},'queueTransfer':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'queueTransferTimeout':{'type':Sequelize[_0x4308('0x6')],'validate':{'min':0x1,'max':0x20c49b},'defaultValue':0x12c},'agentTransfer':{'type':Sequelize[_0x4308('0x3')],'defaultValue':![]},'agentTransferTimeout':{'type':Sequelize[_0x4308('0x6')],'validate':{'min':0x1,'max':0x20c49b},'defaultValue':0x12c},'mandatoryDispositionPauseId':{'type':Sequelize['INTEGER'],'allowNull':!![],'defaultValue':null,'comment':_0x4308('0x8')},'mandatoryDisposition':{'type':Sequelize[_0x4308('0x3')],'defaultValue':![],'comment':_0x4308('0x9'),'set':function(_0x22a730){if(!_0x22a730)this[_0x4308('0xa')](_0x4308('0xb'),null);this['setDataValue']('mandatoryDisposition',_0x22a730);}},'provider':{'type':Sequelize[_0x4308('0xc')](_0x4308('0xd'),_0x4308('0xe'),_0x4308('0xf'),'outlook365'),'defaultValue':null,'get':function(){if(!this[_0x4308('0x10')]('provider'))return'custom';return this[_0x4308('0x10')](_0x4308('0x11'));},'set':function(_0x37dca3){if(_0x37dca3===_0x4308('0x12'))_0x37dca3=null;return this[_0x4308('0xa')]('provider',_0x37dca3);}}}; \ No newline at end of file +var _0x1491=['exports','STRING','BOOLEAN','TEXT','INTEGER','UNSIGNED','Account:\x20{{account.name}}
{{#queue}}Queue:\x20{{queue.name}}
{{/queue}}From\x20:\x20{{from}}
Subject\x20:\x20{{message.subject}}','setDataValue','mandatoryDisposition','ENUM','gmail','hotmail','yahoo','outlook365','getDataValue','provider','custom','sequelize'];(function(_0x2ce6c4,_0x1493e0){var _0x3fa5ef=function(_0x462a6a){while(--_0x462a6a){_0x2ce6c4['push'](_0x2ce6c4['shift']());}};_0x3fa5ef(++_0x1493e0);}(_0x1491,0x1d3));var _0x1149=function(_0x498775,_0x2a995f){_0x498775=_0x498775-0x0;var _0x302c50=_0x1491[_0x498775];return _0x302c50;};'use strict';var Sequelize=require(_0x1149('0x0'));module[_0x1149('0x1')]={'description':{'type':Sequelize[_0x1149('0x2')]},'name':{'type':Sequelize['STRING'],'allowNull':![]},'service':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'email':{'type':Sequelize['STRING'],'validate':{'isEmail':!![]}},'active':{'type':Sequelize[_0x1149('0x3')],'defaultValue':!![]},'key':{'type':Sequelize['STRING'],'allowNull':![]},'template':{'type':Sequelize[_0x1149('0x4')]},'markAsUnread':{'type':Sequelize[_0x1149('0x3')],'defaultValue':![]},'fontFamily':{'type':Sequelize['STRING'],'allowNull':![],'defaultValue':'Arial,Helvetica,sans-serif'},'fontSize':{'type':Sequelize[_0x1149('0x5')](0x2)[_0x1149('0x6')],'defaultValue':0xd,'validate':{'min':0x8,'max':0x48}},'notificationTemplate':{'type':Sequelize[_0x1149('0x4')],'defaultValue':function(){return _0x1149('0x7');}},'notificationSound':{'type':Sequelize[_0x1149('0x3')],'defaultValue':!![]},'notificationShake':{'type':Sequelize[_0x1149('0x3')],'defaultValue':![]},'waitForTheAssignedAgent':{'type':Sequelize[_0x1149('0x5')],'validate':{'min':0x1,'max':0x20c49b},'defaultValue':0xa},'queueTransfer':{'type':Sequelize[_0x1149('0x3')],'defaultValue':![]},'queueTransferTimeout':{'type':Sequelize[_0x1149('0x5')],'validate':{'min':0x1,'max':0x20c49b},'defaultValue':0x12c},'agentTransfer':{'type':Sequelize[_0x1149('0x3')],'defaultValue':![]},'agentTransferTimeout':{'type':Sequelize[_0x1149('0x5')],'validate':{'min':0x1,'max':0x20c49b},'defaultValue':0x12c},'mandatoryDispositionPauseId':{'type':Sequelize[_0x1149('0x5')],'allowNull':!![],'defaultValue':null,'comment':'Status\x20to\x20put\x20when\x20mandatory\x20disposition\x20is\x20enabled'},'mandatoryDisposition':{'type':Sequelize['BOOLEAN'],'defaultValue':![],'comment':'Enabled/disables\x20mandatory\x20dispo\x20on\x20a\x20queue','set':function(_0x3edd86){if(!_0x3edd86)this[_0x1149('0x8')]('mandatoryDispositionPauseId',null);this[_0x1149('0x8')](_0x1149('0x9'),_0x3edd86);}},'provider':{'type':Sequelize[_0x1149('0xa')](_0x1149('0xb'),_0x1149('0xc'),_0x1149('0xd'),_0x1149('0xe')),'defaultValue':null,'get':function(){if(!this[_0x1149('0xf')](_0x1149('0x10')))return _0x1149('0x11');return this['getDataValue'](_0x1149('0x10'));},'set':function(_0xf31282){if(_0xf31282===_0x1149('0x11'))_0xf31282=null;return this[_0x1149('0x8')](_0x1149('0x10'),_0xf31282);}}}; \ No newline at end of file diff --git a/server/api/mailAccount/mailAccount.controller.js b/server/api/mailAccount/mailAccount.controller.js index 0880f0b..3c22a2f 100644 --- a/server/api/mailAccount/mailAccount.controller.js +++ b/server/api/mailAccount/mailAccount.controller.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x6ffc=['request','then','info','MailAccount,\x20%s,\x20%s','request\x20sent','stringify','error','code','message','result','catch','sendStatus','status','json','offset','undefined','limit','count','Content-Range','update','UserProfileResource','destroy','end','stack','name','send','imap.gmail.com','yahoo','imap.mail.yahoo.com','hotmail','outlook365','outlook.office365.com','Unknown\x20email\x20service\x20provider','gmail','smtp.gmail.com','smtp.mail.yahoo.com','smtp-mail.outlook.com','user','username','password','pass','modernAuthentication','CloudProviderId','host','port','secure','service','authentication','Imap','Smtp','MailServerIn','Pause','map','MailAccount','rawAttributes','fieldName','type','query','keys','filters','model','attributes','intersection','fields','hasOwnProperty','nolimit','sort','pick','filter','where','merge','VIRTUAL','options','includeAll','include','rows','show','params','mandatoryDispositionPause','length','find','body','provider','MailServerOut','Mail\x20Account\x20not\x20found','describe','addDisposition','create','getDispositions','findOne','Disposition','order','MailAccountId','findAll','removeDispositions','ids','addAnswer','CannedAnswer','email','ListId','active','description','role','get','UserProfileSection','userProfileId','autoAssociation','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','getImap','addImap','removeImap','getSmtp','addSmtp','removeSmtp','addInteraction','MailInteraction','getInteractions','CmContact','Contact','User','fullname','internal','Tag','Tags','color','tag','addApplications','sequelize','transaction','Transaction','ISOLATION_LEVELS','READ_COMMITTED','MailApplication','bulkCreate','priority','finally','getApplications','getMessages','MailMessage','$gte','split','format','YYYY-MM-DD\x20HH:mm:ss','inlineCss','true','CmList','List','updatedAt','DESC','CloudProvider','Smtp\x20configuration\x20not\x20found','from','%s\x20<%s>','attachments','root','basename','getSmtpOptions','SendMail','sendMail','List\x20not\x20found','Contacts','messageId','attach','out','Interaction','Messages','verifySmtp','VerifySmtp','Sequelize','ValidationError','You\x20can\x27t\x20remove\x20the\x20mail\x20service\x20account','omit','spread','emit','userMailAccount:save','removeAgents','isArray','userMailAccount:remove','getAgents','moment','bluebird','util','juice','ioredis','../../components/parsers/qs','../../config/logger','api','../../mysqldb','redis','defaults','localhost','socket.io-emitter','./mailAccount.socket','register','jayson/promise','client','http'];(function(_0x5a7e05,_0x5c8b1a){var _0x4b322e=function(_0x28cf1c){while(--_0x28cf1c){_0x5a7e05['push'](_0x5a7e05['shift']());}};_0x4b322e(++_0x5c8b1a);}(_0x6ffc,0xb3));var _0xc6ff=function(_0x4effab,_0x27025c){_0x4effab=_0x4effab-0x0;var _0xeb9eda=_0x6ffc[_0x4effab];return _0xeb9eda;};'use strict';var moment=require(_0xc6ff('0x0'));var BPromise=require(_0xc6ff('0x1'));var util=require(_0xc6ff('0x2'));var path=require('path');var _=require('lodash');var juice=require(_0xc6ff('0x3'));var Redis=require(_0xc6ff('0x4'));var qs=require(_0xc6ff('0x5'));var logger=require(_0xc6ff('0x6'))(_0xc6ff('0x7'));var config=require('../../config/environment');var db=require(_0xc6ff('0x8'))['db'];config[_0xc6ff('0x9')]=_[_0xc6ff('0xa')](config[_0xc6ff('0x9')],{'host':_0xc6ff('0xb'),'port':0x18eb});var socket=require(_0xc6ff('0xc'))(new Redis(config['redis']));require(_0xc6ff('0xd'))[_0xc6ff('0xe')](socket);var jayson=require(_0xc6ff('0xf'));var client=jayson[_0xc6ff('0x10')][_0xc6ff('0x11')]({'port':0x232b});function respondWithRpcPromise(_0x226ae6,_0x1f29d9,_0x39ab28,_0x14af2f){return new BPromise(function(_0x58a227,_0xc47fc5){var _0x46a38c=_0x14af2f||client;return _0x46a38c[_0xc6ff('0x12')](_0x226ae6,_0x39ab28)[_0xc6ff('0x13')](function(_0x3a0f3f){logger[_0xc6ff('0x14')](_0xc6ff('0x15'),_0x1f29d9,_0xc6ff('0x16'));logger['debug']('MailAccount,\x20%s,\x20%s,\x20%s',_0x1f29d9,'request\x20sent',JSON[_0xc6ff('0x17')](_0x3a0f3f));if(_0x3a0f3f[_0xc6ff('0x18')]){if(_0x3a0f3f[_0xc6ff('0x18')][_0xc6ff('0x19')]===0x1f4){logger[_0xc6ff('0x18')](_0xc6ff('0x15'),_0x1f29d9,_0x3a0f3f[_0xc6ff('0x18')][_0xc6ff('0x1a')]);return _0xc47fc5(_0x3a0f3f[_0xc6ff('0x18')][_0xc6ff('0x1a')]);}logger[_0xc6ff('0x18')](_0xc6ff('0x15'),_0x1f29d9,_0x3a0f3f[_0xc6ff('0x18')][_0xc6ff('0x1a')]);return _0x58a227(_0x3a0f3f[_0xc6ff('0x18')]['message']);}else{logger[_0xc6ff('0x14')]('MailAccount,\x20%s,\x20%s',_0x1f29d9,_0xc6ff('0x16'));_0x58a227(_0x3a0f3f[_0xc6ff('0x1b')][_0xc6ff('0x1a')]);}})[_0xc6ff('0x1c')](function(_0x17dcec){logger[_0xc6ff('0x18')]('MailAccount,\x20%s,\x20%s',_0x1f29d9,_0x17dcec);_0xc47fc5(_0x17dcec);});});}function respondWithStatusCode(_0xe919f2,_0xaec660){_0xaec660=_0xaec660||0xcc;return function(_0x13a12b){if(_0x13a12b){return _0xe919f2[_0xc6ff('0x1d')](_0xaec660);}return _0xe919f2['status'](_0xaec660)['end']();};}function respondWithResult(_0x2290a5,_0x34b1c9){_0x34b1c9=_0x34b1c9||0xc8;return function(_0x2672f7){if(_0x2672f7){return _0x2290a5[_0xc6ff('0x1e')](_0x34b1c9)[_0xc6ff('0x1f')](_0x2672f7);}};}function respondWithFilteredResult(_0x5943a6,_0x41397b){return function(_0x220bfa){if(_0x220bfa){var _0x1d6bcb=typeof _0x41397b[_0xc6ff('0x20')]===_0xc6ff('0x21')&&typeof _0x41397b[_0xc6ff('0x22')]===_0xc6ff('0x21');var _0x2d5e7a=_0x220bfa[_0xc6ff('0x23')];var _0x26ebeb=_0x1d6bcb?0x0:_0x41397b[_0xc6ff('0x20')];var _0x742f17=_0x1d6bcb?_0x220bfa[_0xc6ff('0x23')]:_0x41397b[_0xc6ff('0x20')]+_0x41397b[_0xc6ff('0x22')];var _0x391875;if(_0x742f17>=_0x2d5e7a){_0x742f17=_0x2d5e7a;_0x391875=0xc8;}else{_0x391875=0xce;}_0x5943a6[_0xc6ff('0x1e')](_0x391875);return _0x5943a6['set'](_0xc6ff('0x24'),_0x26ebeb+'-'+_0x742f17+'/'+_0x2d5e7a)[_0xc6ff('0x1f')](_0x220bfa);}return null;};}function saveUpdates(_0x264748){return function(_0x3cf059){if(_0x3cf059){return _0x3cf059[_0xc6ff('0x25')](_0x264748)[_0xc6ff('0x13')](function(_0x529e3a){return _0x529e3a;});}return null;};}function removeEntity(_0x3c20e2){return function(_0x5ed48d){if(_0x5ed48d){return _0x5ed48d['destroy']()[_0xc6ff('0x13')](function(){var _0x20eb05=_0x5ed48d['get']({'plain':!![]});var _0x3108ac='MailAccounts';return db[_0xc6ff('0x26')][_0xc6ff('0x27')]({'where':{'type':_0x3108ac,'resourceId':_0x20eb05['id']}})['then'](function(){return _0x5ed48d;});})[_0xc6ff('0x13')](function(){_0x3c20e2[_0xc6ff('0x1e')](0xcc)[_0xc6ff('0x28')]();});}};}function handleEntityNotFound(_0x2d163f){return function(_0x2a45a0){if(!_0x2a45a0){_0x2d163f['sendStatus'](0x194);}return _0x2a45a0;};}function handleError(_0x10d317,_0x367583){_0x367583=_0x367583||0x1f4;return function(_0x588386){logger[_0xc6ff('0x18')](_0x588386[_0xc6ff('0x29')]);if(_0x588386[_0xc6ff('0x2a')]){delete _0x588386[_0xc6ff('0x2a')];}_0x10d317[_0xc6ff('0x1e')](_0x367583)[_0xc6ff('0x2b')](_0x588386);};}function getImapHost(_0x57e5f6){switch(_0x57e5f6){case'gmail':return _0xc6ff('0x2c');case _0xc6ff('0x2d'):return _0xc6ff('0x2e');case _0xc6ff('0x2f'):return'imap-mail.outlook.com';case _0xc6ff('0x30'):return _0xc6ff('0x31');}throw new Error(_0xc6ff('0x32'),_0x57e5f6);}function getSmtpHost(_0x1bb916){switch(_0x1bb916){case _0xc6ff('0x33'):return _0xc6ff('0x34');case'yahoo':return _0xc6ff('0x35');case _0xc6ff('0x2f'):return _0xc6ff('0x36');case'outlook365':return'smtp.office365.com';}throw new Error(_0xc6ff('0x32'),_0x1bb916);}function getAuthenticationOptions(_0x40504a,_0x550621){var _0x139a08={};var _0x137be0={};if(_0x40504a){_0x139a08[_0xc6ff('0x37')]=_0x137be0[_0xc6ff('0x37')]=_0x550621[_0xc6ff('0x38')];_0x139a08[_0xc6ff('0x39')]=_0x137be0[_0xc6ff('0x3a')]=_0x550621['password'];if(_0x550621[_0xc6ff('0x3b')]){_0x139a08[_0xc6ff('0x3b')]=_0x137be0[_0xc6ff('0x3b')]=!![];_0x139a08[_0xc6ff('0x3c')]=_0x137be0[_0xc6ff('0x3c')]=_0x550621[_0xc6ff('0x3c')];_0x139a08[_0xc6ff('0x39')]=_0x137be0['pass']=null;}else{_0x139a08[_0xc6ff('0x3c')]=_0x137be0[_0xc6ff('0x3c')]=null;}_0x139a08[_0xc6ff('0x3d')]=getImapHost(_0x40504a);_0x139a08['port']=0x3e1;_0x137be0[_0xc6ff('0x3d')]=getSmtpHost(_0x40504a);_0x137be0[_0xc6ff('0x3e')]=0x24b;_0x137be0[_0xc6ff('0x3f')]=![];_0x139a08[_0xc6ff('0x40')]=_0x137be0[_0xc6ff('0x40')]=null;}else{if(_0x550621[_0xc6ff('0x41')]){_0x139a08[_0xc6ff('0x37')]=_0x137be0['user']=_0x550621[_0xc6ff('0x38')];_0x139a08[_0xc6ff('0x39')]=_0x137be0['pass']=_0x550621[_0xc6ff('0x39')];}else{_0x139a08[_0xc6ff('0x41')]=_0x137be0[_0xc6ff('0x41')]=![];_0x139a08[_0xc6ff('0x37')]=_0x137be0[_0xc6ff('0x37')]=null;_0x139a08['password']=_0x137be0['pass']=null;}_0x139a08[_0xc6ff('0x3d')]=_0x550621[_0xc6ff('0x42')]['host'];_0x139a08[_0xc6ff('0x3e')]=_0x550621[_0xc6ff('0x42')][_0xc6ff('0x3e')];_0x137be0[_0xc6ff('0x3d')]=_0x550621[_0xc6ff('0x43')][_0xc6ff('0x3d')];_0x137be0['port']=_0x550621[_0xc6ff('0x43')][_0xc6ff('0x3e')];}return{'Imap':_0x139a08,'Smtp':_0x137be0};}exports['index']=function(_0x4dbf7e,_0x7484eb){var _0x1d7bae={'include':[{'model':db[_0xc6ff('0x44')],'as':_0xc6ff('0x42')},{'model':db['MailServerOut'],'as':_0xc6ff('0x43')},{'model':db[_0xc6ff('0x45')],'as':'mandatoryDispositionPause'}]},_0x37e41b={},_0x36f32b={'count':0x0,'rows':[]};var _0x182351=_[_0xc6ff('0x46')](db[_0xc6ff('0x47')][_0xc6ff('0x48')],function(_0x456f0c){return{'name':_0x456f0c[_0xc6ff('0x49')],'type':_0x456f0c[_0xc6ff('0x4a')]['key']};});_0x37e41b['model']=_[_0xc6ff('0x46')](_0x182351,_0xc6ff('0x2a'));_0x37e41b[_0xc6ff('0x4b')]=_[_0xc6ff('0x4c')](_0x4dbf7e['query']);_0x37e41b[_0xc6ff('0x4d')]=_['intersection'](_0x37e41b[_0xc6ff('0x4e')],_0x37e41b[_0xc6ff('0x4b')]);_0x1d7bae[_0xc6ff('0x4f')]=_[_0xc6ff('0x50')](_0x37e41b[_0xc6ff('0x4e')],qs['fields'](_0x4dbf7e[_0xc6ff('0x4b')][_0xc6ff('0x51')]));_0x1d7bae[_0xc6ff('0x4f')]=_0x1d7bae['attributes']['length']?_0x1d7bae[_0xc6ff('0x4f')]:_0x37e41b[_0xc6ff('0x4e')];if(!_0x4dbf7e[_0xc6ff('0x4b')][_0xc6ff('0x52')](_0xc6ff('0x53'))){_0x1d7bae[_0xc6ff('0x22')]=qs[_0xc6ff('0x22')](_0x4dbf7e[_0xc6ff('0x4b')]['limit']);_0x1d7bae['offset']=qs[_0xc6ff('0x20')](_0x4dbf7e[_0xc6ff('0x4b')][_0xc6ff('0x20')]);}_0x1d7bae['order']=qs['sort'](_0x4dbf7e[_0xc6ff('0x4b')][_0xc6ff('0x54')]);_0x1d7bae['where']=qs['filters'](_[_0xc6ff('0x55')](_0x4dbf7e[_0xc6ff('0x4b')],_0x37e41b[_0xc6ff('0x4d')]),_0x182351);if(_0x4dbf7e[_0xc6ff('0x4b')][_0xc6ff('0x56')]){_0x1d7bae[_0xc6ff('0x57')]=_[_0xc6ff('0x58')](_0x1d7bae[_0xc6ff('0x57')],{'$or':_[_0xc6ff('0x46')](_0x182351,function(_0xdc5c12){if(_0xdc5c12[_0xc6ff('0x4a')]!==_0xc6ff('0x59')){var _0x2b3a4d={};_0x2b3a4d[_0xdc5c12[_0xc6ff('0x2a')]]={'$like':'%'+_0x4dbf7e[_0xc6ff('0x4b')]['filter']+'%'};return _0x2b3a4d;}})});}_0x1d7bae=_[_0xc6ff('0x58')]({},_0x1d7bae,_0x4dbf7e[_0xc6ff('0x5a')]);var _0x1bfc4d={'where':_0x1d7bae['where']};return db[_0xc6ff('0x47')][_0xc6ff('0x23')](_0x1bfc4d)['then'](function(_0xb68b1f){_0x36f32b['count']=_0xb68b1f;if(_0x4dbf7e[_0xc6ff('0x4b')][_0xc6ff('0x5b')]){_0x1d7bae[_0xc6ff('0x5c')]=[{'all':!![]}];}return db[_0xc6ff('0x47')]['findAll'](_0x1d7bae);})['then'](function(_0x3f74cb){_0x36f32b[_0xc6ff('0x5d')]=_0x3f74cb;return _0x36f32b;})[_0xc6ff('0x13')](respondWithFilteredResult(_0x7484eb,_0x1d7bae))[_0xc6ff('0x1c')](handleError(_0x7484eb,null));};exports[_0xc6ff('0x5e')]=function(_0x196210,_0x318f05){var _0x2993f8={'raw':![],'where':{'id':_0x196210[_0xc6ff('0x5f')]['id']},'include':[{'model':db['MailServerIn'],'as':_0xc6ff('0x42')},{'model':db['MailServerOut'],'as':_0xc6ff('0x43')},{'model':db[_0xc6ff('0x45')],'as':_0xc6ff('0x60')}]},_0x124d93={};_0x124d93[_0xc6ff('0x4e')]=_[_0xc6ff('0x4c')](db['MailAccount'][_0xc6ff('0x48')]);_0x124d93[_0xc6ff('0x4b')]=_[_0xc6ff('0x4c')](_0x196210[_0xc6ff('0x4b')]);_0x124d93[_0xc6ff('0x4d')]=_[_0xc6ff('0x50')](_0x124d93[_0xc6ff('0x4e')],_0x124d93[_0xc6ff('0x4b')]);_0x2993f8['attributes']=_[_0xc6ff('0x50')](_0x124d93['model'],qs[_0xc6ff('0x51')](_0x196210['query'][_0xc6ff('0x51')]));_0x2993f8['attributes']=_0x2993f8['attributes'][_0xc6ff('0x61')]?_0x2993f8[_0xc6ff('0x4f')]:_0x124d93[_0xc6ff('0x4e')];if(_0x196210[_0xc6ff('0x4b')][_0xc6ff('0x5b')]){_0x2993f8[_0xc6ff('0x5c')]=[{'all':!![]}];}_0x2993f8=_[_0xc6ff('0x58')]({},_0x2993f8,_0x196210[_0xc6ff('0x5a')]);return db[_0xc6ff('0x47')][_0xc6ff('0x62')](_0x2993f8)[_0xc6ff('0x13')](handleEntityNotFound(_0x318f05,null))['then'](respondWithResult(_0x318f05,null))[_0xc6ff('0x1c')](handleError(_0x318f05,null));};exports[_0xc6ff('0x25')]=function(_0x1ad47a,_0x13bcc2){if(_0x1ad47a[_0xc6ff('0x63')]['id']){delete _0x1ad47a[_0xc6ff('0x63')]['id'];}var _0x33b979=_0x1ad47a[_0xc6ff('0x63')][_0xc6ff('0x64')]==='custom'?null:_0x1ad47a['body']['provider'];var _0x20b602=_0x1ad47a[_0xc6ff('0x63')][_0xc6ff('0x42')]||{};var _0x3ed98b=_0x1ad47a[_0xc6ff('0x63')][_0xc6ff('0x43')]||{};if(_0x33b979){_0x20b602[_0xc6ff('0x3d')]=getImapHost(_0x33b979);_0x20b602['port']=0x3e1;_0x3ed98b[_0xc6ff('0x3d')]=getSmtpHost(_0x33b979);_0x3ed98b['port']=0x24b;_0x3ed98b['secure']=![];}if(_0x3ed98b[_0xc6ff('0x3b')]){_0x3ed98b[_0xc6ff('0x3f')]=![];}else{_0x3ed98b[_0xc6ff('0x3c')]=null;}if(!_0x20b602['modernAuthentication'])_0x20b602[_0xc6ff('0x3c')]=null;_0x1ad47a[_0xc6ff('0x63')][_0xc6ff('0x42')]=_0x20b602;_0x1ad47a[_0xc6ff('0x63')][_0xc6ff('0x43')]=_0x3ed98b;return db[_0xc6ff('0x47')]['find']({'where':{'id':_0x1ad47a[_0xc6ff('0x5f')]['id']},'include':[{'model':db['MailServerIn'],'as':_0xc6ff('0x42')},{'model':db[_0xc6ff('0x65')],'as':_0xc6ff('0x43')},{'model':db['Pause'],'as':_0xc6ff('0x60')}]})['then'](handleEntityNotFound(_0x13bcc2,null))['then'](function(_0x58c517){if(!_0x58c517)throw new Error(_0xc6ff('0x66'));if(_0x58c517[_0xc6ff('0x40')])delete _0x1ad47a[_0xc6ff('0x63')]['Imap'];return _0x58c517;})['then'](saveUpdates(_0x1ad47a[_0xc6ff('0x63')],null))[_0xc6ff('0x13')](function(_0x335422){if(!_0x1ad47a[_0xc6ff('0x63')]['Imap'])return _0x335422;return db[_0xc6ff('0x44')]['update'](_0x1ad47a[_0xc6ff('0x63')][_0xc6ff('0x42')],{'where':{'MailAccountId':_0x335422['id']}})[_0xc6ff('0x13')](function(){return _0x335422;});})['then'](function(_0x2da2d2){if(!_0x1ad47a[_0xc6ff('0x63')][_0xc6ff('0x43')])return _0x2da2d2;return db[_0xc6ff('0x65')][_0xc6ff('0x25')](_0x1ad47a[_0xc6ff('0x63')]['Smtp'],{'where':{'MailAccountId':_0x2da2d2['id']}})['then'](function(){return _0x2da2d2;});})['then'](respondWithResult(_0x13bcc2,null))[_0xc6ff('0x1c')](handleError(_0x13bcc2,null));};exports['describe']=function(_0x93c1fb,_0x3bb5de){return db[_0xc6ff('0x47')][_0xc6ff('0x67')]()[_0xc6ff('0x13')](respondWithResult(_0x3bb5de,null))['catch'](handleError(_0x3bb5de,null));};exports[_0xc6ff('0x68')]=function(_0x5c0d32,_0x25e9b2){if(_0x5c0d32[_0xc6ff('0x63')]['id']){delete _0x5c0d32[_0xc6ff('0x63')]['id'];}return db[_0xc6ff('0x47')]['find']({'where':{'id':_0x5c0d32[_0xc6ff('0x5f')]['id']}})[_0xc6ff('0x13')](handleEntityNotFound(_0x25e9b2,null))[_0xc6ff('0x13')](function(_0x597847){if(_0x597847){_0x5c0d32[_0xc6ff('0x63')]['MailAccountId']=_0x597847['id'];return db['Disposition'][_0xc6ff('0x69')](_0x5c0d32[_0xc6ff('0x63')]);}})[_0xc6ff('0x13')](respondWithResult(_0x25e9b2,null))[_0xc6ff('0x1c')](handleError(_0x25e9b2,null));};exports[_0xc6ff('0x6a')]=function(_0x55b0dd,_0x278407){var _0x418aa1={'raw':![],'where':{}};var _0x16940c={};var _0x36b2b3={'count':0x0,'rows':[]};return db[_0xc6ff('0x47')][_0xc6ff('0x6b')]({'where':{'id':_0x55b0dd[_0xc6ff('0x5f')]['id']}})[_0xc6ff('0x13')](handleEntityNotFound(_0x278407,null))['then'](function(_0x4f30bf){if(_0x4f30bf){_0x16940c[_0xc6ff('0x4e')]=_[_0xc6ff('0x4c')](db[_0xc6ff('0x6c')][_0xc6ff('0x48')]);_0x16940c[_0xc6ff('0x4b')]=_[_0xc6ff('0x4c')](_0x55b0dd['query']);_0x16940c['filters']=_[_0xc6ff('0x50')](_0x16940c['model'],_0x16940c[_0xc6ff('0x4b')]);_0x418aa1['attributes']=_[_0xc6ff('0x50')](_0x16940c[_0xc6ff('0x4e')],qs['fields'](_0x55b0dd[_0xc6ff('0x4b')]['fields']));_0x418aa1[_0xc6ff('0x4f')]=_0x418aa1[_0xc6ff('0x4f')][_0xc6ff('0x61')]?_0x418aa1['attributes']:_0x16940c[_0xc6ff('0x4e')];if(!_0x55b0dd['query'][_0xc6ff('0x52')]('nolimit')){_0x418aa1[_0xc6ff('0x22')]=qs['limit'](_0x55b0dd[_0xc6ff('0x4b')][_0xc6ff('0x22')]);_0x418aa1['offset']=qs[_0xc6ff('0x20')](_0x55b0dd['query'][_0xc6ff('0x20')]);}_0x418aa1[_0xc6ff('0x6d')]=qs[_0xc6ff('0x54')](_0x55b0dd[_0xc6ff('0x4b')][_0xc6ff('0x54')]);_0x418aa1[_0xc6ff('0x57')]=qs[_0xc6ff('0x4d')](_[_0xc6ff('0x55')](_0x55b0dd[_0xc6ff('0x4b')],_0x16940c[_0xc6ff('0x4d')]));_0x418aa1[_0xc6ff('0x57')][_0xc6ff('0x6e')]=_0x4f30bf['id'];if(_0x55b0dd[_0xc6ff('0x4b')]['filter']){_0x418aa1[_0xc6ff('0x57')]=_['merge'](_0x418aa1[_0xc6ff('0x57')],{'$or':_[_0xc6ff('0x46')](_0x418aa1[_0xc6ff('0x4f')],function(_0xe8192f){var _0x33aacb={};_0x33aacb[_0xe8192f]={'$like':'%'+_0x55b0dd[_0xc6ff('0x4b')][_0xc6ff('0x56')]+'%'};return _0x33aacb;})});}_0x418aa1=_['merge']({},_0x418aa1,_0x55b0dd[_0xc6ff('0x5a')]);return db[_0xc6ff('0x6c')][_0xc6ff('0x23')]({'where':_0x418aa1[_0xc6ff('0x57')]})['then'](function(_0x48d668){_0x36b2b3[_0xc6ff('0x23')]=_0x48d668;if(_0x55b0dd[_0xc6ff('0x4b')]['includeAll']){_0x418aa1[_0xc6ff('0x5c')]=[{'all':!![]}];}return db[_0xc6ff('0x6c')][_0xc6ff('0x6f')](_0x418aa1);})['then'](function(_0x39998e){_0x36b2b3[_0xc6ff('0x5d')]=_0x39998e;return _0x36b2b3;});}})[_0xc6ff('0x13')](respondWithFilteredResult(_0x278407,_0x418aa1))[_0xc6ff('0x1c')](handleError(_0x278407,null));};exports[_0xc6ff('0x70')]=function(_0x45e0d3,_0x693297){return db[_0xc6ff('0x47')][_0xc6ff('0x62')]({'where':{'id':_0x45e0d3['params']['id']}})['then'](handleEntityNotFound(_0x693297,null))[_0xc6ff('0x13')](function(_0x476777){if(_0x476777){return _0x476777[_0xc6ff('0x70')](_0x45e0d3[_0xc6ff('0x4b')][_0xc6ff('0x71')]);}})['then'](respondWithStatusCode(_0x693297,null))['catch'](handleError(_0x693297,null));};exports[_0xc6ff('0x72')]=function(_0x2621cc,_0x3ce3f9){if(_0x2621cc[_0xc6ff('0x63')]['id']){delete _0x2621cc[_0xc6ff('0x63')]['id'];}return db[_0xc6ff('0x47')]['find']({'where':{'id':_0x2621cc[_0xc6ff('0x5f')]['id']}})[_0xc6ff('0x13')](handleEntityNotFound(_0x3ce3f9,null))['then'](function(_0x49d4de){if(_0x49d4de){_0x2621cc[_0xc6ff('0x63')][_0xc6ff('0x6e')]=_0x49d4de['id'];return db['CannedAnswer']['create'](_0x2621cc['body']);}})['then'](respondWithResult(_0x3ce3f9,null))[_0xc6ff('0x1c')](handleError(_0x3ce3f9,null));};exports['getAnswers']=function(_0x1fc350,_0x15a9d4){var _0x5181d6={'raw':![],'where':{}};var _0x3178ae={};var _0x32fd8d={'count':0x0,'rows':[]};return db['MailAccount'][_0xc6ff('0x6b')]({'where':{'id':_0x1fc350[_0xc6ff('0x5f')]['id']}})['then'](handleEntityNotFound(_0x15a9d4,null))[_0xc6ff('0x13')](function(_0x2d8786){if(_0x2d8786){_0x3178ae['model']=_[_0xc6ff('0x4c')](db[_0xc6ff('0x73')][_0xc6ff('0x48')]);_0x3178ae[_0xc6ff('0x4b')]=_[_0xc6ff('0x4c')](_0x1fc350[_0xc6ff('0x4b')]);_0x3178ae[_0xc6ff('0x4d')]=_[_0xc6ff('0x50')](_0x3178ae[_0xc6ff('0x4e')],_0x3178ae[_0xc6ff('0x4b')]);_0x5181d6[_0xc6ff('0x4f')]=_[_0xc6ff('0x50')](_0x3178ae[_0xc6ff('0x4e')],qs[_0xc6ff('0x51')](_0x1fc350[_0xc6ff('0x4b')]['fields']));_0x5181d6[_0xc6ff('0x4f')]=_0x5181d6[_0xc6ff('0x4f')]['length']?_0x5181d6['attributes']:_0x3178ae[_0xc6ff('0x4e')];if(!_0x1fc350['query'][_0xc6ff('0x52')](_0xc6ff('0x53'))){_0x5181d6['limit']=qs[_0xc6ff('0x22')](_0x1fc350['query'][_0xc6ff('0x22')]);_0x5181d6['offset']=qs[_0xc6ff('0x20')](_0x1fc350[_0xc6ff('0x4b')][_0xc6ff('0x20')]);}_0x5181d6[_0xc6ff('0x6d')]=qs[_0xc6ff('0x54')](_0x1fc350['query'][_0xc6ff('0x54')]);_0x5181d6[_0xc6ff('0x57')]=qs[_0xc6ff('0x4d')](_[_0xc6ff('0x55')](_0x1fc350['query'],_0x3178ae[_0xc6ff('0x4d')]));_0x5181d6[_0xc6ff('0x57')][_0xc6ff('0x6e')]=_0x2d8786['id'];if(_0x1fc350[_0xc6ff('0x4b')]['filter']){_0x5181d6[_0xc6ff('0x57')]=_[_0xc6ff('0x58')](_0x5181d6[_0xc6ff('0x57')],{'$or':_[_0xc6ff('0x46')](_0x5181d6[_0xc6ff('0x4f')],function(_0x5426c6){var _0x2faadb={};_0x2faadb[_0x5426c6]={'$like':'%'+_0x1fc350[_0xc6ff('0x4b')][_0xc6ff('0x56')]+'%'};return _0x2faadb;})});}_0x5181d6=_[_0xc6ff('0x58')]({},_0x5181d6,_0x1fc350['options']);return db['CannedAnswer']['count']({'where':_0x5181d6['where']})[_0xc6ff('0x13')](function(_0x8db94e){_0x32fd8d['count']=_0x8db94e;if(_0x1fc350[_0xc6ff('0x4b')][_0xc6ff('0x5b')]){_0x5181d6[_0xc6ff('0x5c')]=[{'all':!![]}];}return db[_0xc6ff('0x73')]['findAll'](_0x5181d6);})[_0xc6ff('0x13')](function(_0x455cef){_0x32fd8d['rows']=_0x455cef;return _0x32fd8d;});}})[_0xc6ff('0x13')](respondWithFilteredResult(_0x15a9d4,_0x5181d6))[_0xc6ff('0x1c')](handleError(_0x15a9d4,null));};exports['removeAnswers']=function(_0x5a6bfa,_0x35f6e6){return db[_0xc6ff('0x47')][_0xc6ff('0x62')]({'where':{'id':_0x5a6bfa[_0xc6ff('0x5f')]['id']}})['then'](handleEntityNotFound(_0x35f6e6,null))[_0xc6ff('0x13')](function(_0xf3f833){if(_0xf3f833){return _0xf3f833['removeAnswers'](_0x5a6bfa[_0xc6ff('0x4b')]['ids']);}})[_0xc6ff('0x13')](respondWithStatusCode(_0x35f6e6,null))[_0xc6ff('0x1c')](handleError(_0x35f6e6,null));};exports[_0xc6ff('0x69')]=function(_0x3c0470,_0x33cdfd){var _0x18f478={'name':_0x3c0470['body'][_0xc6ff('0x2a')],'key':_0x3c0470['body']['key'],'provider':_0x3c0470[_0xc6ff('0x63')][_0xc6ff('0x64')]==='custom'?null:_0x3c0470[_0xc6ff('0x63')][_0xc6ff('0x64')],'email':_0x3c0470[_0xc6ff('0x63')][_0xc6ff('0x74')],'ListId':_0x3c0470['body'][_0xc6ff('0x75')],'active':!_['isNil'](_0x3c0470['body'][_0xc6ff('0x76')])?_0x3c0470[_0xc6ff('0x63')][_0xc6ff('0x76')]:!![],'description':_0x3c0470['body'][_0xc6ff('0x77')]||null};var _0x341e26=getAuthenticationOptions(_0x18f478[_0xc6ff('0x64')],_0x3c0470[_0xc6ff('0x63')]);_0x18f478[_0xc6ff('0x42')]=_0x341e26[_0xc6ff('0x42')];_0x18f478[_0xc6ff('0x43')]=_0x341e26[_0xc6ff('0x43')];return db[_0xc6ff('0x47')][_0xc6ff('0x69')](_0x18f478,{'include':[{'model':db['MailServerOut'],'as':_0xc6ff('0x43')},{'model':db[_0xc6ff('0x44')],'as':_0xc6ff('0x42')}]})[_0xc6ff('0x13')](function(_0x1137c5){var _0x314abd=_0x3c0470[_0xc6ff('0x37')]['get']({'plain':!![]});if(!_0x314abd)throw new Error('Unable\x20to\x20retrieve\x20the\x20current\x20user');if(_0x314abd[_0xc6ff('0x78')]==='user'){var _0x55704c=_0x1137c5[_0xc6ff('0x79')]({'plain':!![]});return db[_0xc6ff('0x7a')][_0xc6ff('0x62')]({'where':{'name':'MailAccounts','userProfileId':_0x314abd[_0xc6ff('0x7b')]},'raw':!![]})['then'](function(_0x5ec543){if(_0x5ec543&&_0x5ec543[_0xc6ff('0x7c')]===0x0){return db['UserProfileResource'][_0xc6ff('0x69')]({'name':_0x55704c[_0xc6ff('0x2a')],'resourceId':_0x55704c['id'],'type':_0x5ec543[_0xc6ff('0x2a')],'sectionId':_0x5ec543['id']},{})[_0xc6ff('0x13')](function(){return _0x1137c5;});}else{return _0x1137c5;}})[_0xc6ff('0x1c')](function(_0x3550b8){logger[_0xc6ff('0x18')](_0xc6ff('0x7d'),_0x3550b8);throw _0x3550b8;});}return _0x1137c5;})[_0xc6ff('0x13')](respondWithResult(_0x33cdfd,0xc9))[_0xc6ff('0x1c')](handleError(_0x33cdfd,null));};exports[_0xc6ff('0x7e')]=function(_0x8bce21,_0x209df5){return db['MailAccount'][_0xc6ff('0x6b')]({'where':{'id':_0x8bce21[_0xc6ff('0x5f')]['id']}})[_0xc6ff('0x13')](handleEntityNotFound(_0x209df5,null))[_0xc6ff('0x13')](function(_0x3474c9){if(_0x3474c9){return _0x3474c9[_0xc6ff('0x7e')]();}return null;})[_0xc6ff('0x13')](respondWithResult(_0x209df5,null))['catch'](handleError(_0x209df5,null));};exports[_0xc6ff('0x7f')]=function(_0x5bd65a,_0x2dfa26){if(_0x5bd65a[_0xc6ff('0x63')]['id']){delete _0x5bd65a[_0xc6ff('0x63')]['id'];}return db[_0xc6ff('0x47')][_0xc6ff('0x62')]({'where':{'id':_0x5bd65a[_0xc6ff('0x5f')]['id']}})['then'](handleEntityNotFound(_0x2dfa26,null))[_0xc6ff('0x13')](function(_0xe3d08c){if(_0xe3d08c){_0x5bd65a[_0xc6ff('0x63')][_0xc6ff('0x6e')]=_0xe3d08c['id'];return db[_0xc6ff('0x44')][_0xc6ff('0x69')](_0x5bd65a[_0xc6ff('0x63')]);}})[_0xc6ff('0x13')](respondWithResult(_0x2dfa26,null))[_0xc6ff('0x1c')](handleError(_0x2dfa26,null));};exports[_0xc6ff('0x80')]=function(_0x4e5517,_0xeb46f3){return db[_0xc6ff('0x47')][_0xc6ff('0x6b')]({'where':{'id':_0x4e5517[_0xc6ff('0x5f')]['id']}})[_0xc6ff('0x13')](handleEntityNotFound(_0xeb46f3,null))[_0xc6ff('0x13')](function(_0x4ef2a1){if(_0x4ef2a1){return _0x4ef2a1['setImap'](null);}return null;})[_0xc6ff('0x13')](respondWithStatusCode(_0xeb46f3,null))['catch'](handleError(_0xeb46f3,null));};exports['getSmtp']=function(_0x33432d,_0x31e2e3){return db['MailAccount']['findOne']({'where':{'id':_0x33432d['params']['id']}})['then'](handleEntityNotFound(_0x31e2e3,null))[_0xc6ff('0x13')](function(_0x3c08a5){if(_0x3c08a5){return _0x3c08a5[_0xc6ff('0x81')]();}return null;})['then'](respondWithResult(_0x31e2e3,null))[_0xc6ff('0x1c')](handleError(_0x31e2e3,null));};exports[_0xc6ff('0x82')]=function(_0x1d549d,_0x290048){if(_0x1d549d[_0xc6ff('0x63')]['id']){delete _0x1d549d[_0xc6ff('0x63')]['id'];}return db['MailAccount'][_0xc6ff('0x62')]({'where':{'id':_0x1d549d[_0xc6ff('0x5f')]['id']}})[_0xc6ff('0x13')](handleEntityNotFound(_0x290048,null))[_0xc6ff('0x13')](function(_0x567357){if(_0x567357){_0x1d549d[_0xc6ff('0x63')][_0xc6ff('0x6e')]=_0x567357['id'];return db[_0xc6ff('0x65')][_0xc6ff('0x69')](_0x1d549d[_0xc6ff('0x63')]);}})[_0xc6ff('0x13')](respondWithResult(_0x290048,null))[_0xc6ff('0x1c')](handleError(_0x290048,null));};exports[_0xc6ff('0x83')]=function(_0x1c1059,_0x18b76c){return db[_0xc6ff('0x47')][_0xc6ff('0x6b')]({'where':{'id':_0x1c1059['params']['id']}})[_0xc6ff('0x13')](handleEntityNotFound(_0x18b76c,null))[_0xc6ff('0x13')](function(_0x78cfef){if(_0x78cfef){return _0x78cfef['setSmtp'](null);}return null;})[_0xc6ff('0x13')](respondWithStatusCode(_0x18b76c,null))[_0xc6ff('0x1c')](handleError(_0x18b76c,null));};exports[_0xc6ff('0x84')]=function(_0x1dc4cf,_0xadb21b){return db[_0xc6ff('0x85')]['find']({'where':{'id':_0x1dc4cf[_0xc6ff('0x5f')]['id']}})[_0xc6ff('0x13')](handleEntityNotFound(_0xadb21b,null))[_0xc6ff('0x13')](function(_0x239df8){if(_0x239df8){return _0x239df8[_0xc6ff('0x84')](_0x1dc4cf[_0xc6ff('0x63')][_0xc6ff('0x71')],_['omit'](_0x1dc4cf['body'],[_0xc6ff('0x71'),'id'])||{});}})[_0xc6ff('0x13')](respondWithResult(_0xadb21b,null))[_0xc6ff('0x1c')](handleError(_0xadb21b,null));};exports[_0xc6ff('0x86')]=function(_0xadc91c,_0x1a9de6){var _0x5aabb1={'raw':![],'where':{}};var _0x552403={};var _0x5d96f6={'count':0x0,'rows':[]};return db[_0xc6ff('0x47')][_0xc6ff('0x6b')]({'where':{'id':_0xadc91c[_0xc6ff('0x5f')]['id']}})['then'](handleEntityNotFound(_0x1a9de6,null))[_0xc6ff('0x13')](function(_0x4d853d){if(_0x4d853d){_0x552403[_0xc6ff('0x4e')]=_[_0xc6ff('0x4c')](db['MailInteraction'][_0xc6ff('0x48')]);_0x552403[_0xc6ff('0x4b')]=_['keys'](_0xadc91c['query']);_0x552403[_0xc6ff('0x4d')]=_[_0xc6ff('0x50')](_0x552403[_0xc6ff('0x4e')],_0x552403[_0xc6ff('0x4b')]);_0x5aabb1[_0xc6ff('0x4f')]=_['intersection'](_0x552403['model'],qs[_0xc6ff('0x51')](_0xadc91c[_0xc6ff('0x4b')][_0xc6ff('0x51')]));_0x5aabb1['attributes']=_0x5aabb1[_0xc6ff('0x4f')][_0xc6ff('0x61')]?_0x5aabb1['attributes']:_0x552403['model'];if(!_0xadc91c[_0xc6ff('0x4b')]['hasOwnProperty']('nolimit')){_0x5aabb1['limit']=qs[_0xc6ff('0x22')](_0xadc91c['query']['limit']);_0x5aabb1[_0xc6ff('0x20')]=qs[_0xc6ff('0x20')](_0xadc91c['query']['offset']);}_0x5aabb1['order']=qs[_0xc6ff('0x54')](_0xadc91c[_0xc6ff('0x4b')][_0xc6ff('0x54')]);_0x5aabb1['where']=qs[_0xc6ff('0x4d')](_[_0xc6ff('0x55')](_0xadc91c['query'],_0x552403[_0xc6ff('0x4d')]));_0x5aabb1[_0xc6ff('0x57')][_0xc6ff('0x6e')]=_0x4d853d['id'];if(_0xadc91c[_0xc6ff('0x4b')]['filter']){_0x5aabb1['where']=_[_0xc6ff('0x58')](_0x5aabb1[_0xc6ff('0x57')],{'$or':_['map'](_0x5aabb1[_0xc6ff('0x4f')],function(_0x4e82e4){var _0x2a20e1={};_0x2a20e1[_0x4e82e4]={'$like':'%'+_0xadc91c[_0xc6ff('0x4b')]['filter']+'%'};return _0x2a20e1;})});}_0x5aabb1=_[_0xc6ff('0x58')]({},_0x5aabb1,_0xadc91c['options']);return db['MailInteraction']['count']({'where':_0x5aabb1[_0xc6ff('0x57')]})['then'](function(_0x35dd46){_0x5d96f6['count']=_0x35dd46;if(_0xadc91c['query'][_0xc6ff('0x5b')]){_0x5aabb1[_0xc6ff('0x5c')]=[{'model':db[_0xc6ff('0x87')],'as':_0xc6ff('0x88'),'required':![]},{'model':db[_0xc6ff('0x89')],'as':'Owner','attributes':[_0xc6ff('0x2a'),_0xc6ff('0x8a'),_0xc6ff('0x8b')],'required':![]},{'model':db[_0xc6ff('0x8c')],'as':_0xc6ff('0x8d'),'attributes':['id','name',_0xc6ff('0x8e')],'where':_0xadc91c[_0xc6ff('0x4b')][_0xc6ff('0x8f')]?{'id':_0xadc91c[_0xc6ff('0x4b')][_0xc6ff('0x8f')]}:undefined,'required':_0xadc91c[_0xc6ff('0x4b')]['tag']?!![]:![]}];}return db[_0xc6ff('0x85')][_0xc6ff('0x6f')](_0x5aabb1);})[_0xc6ff('0x13')](function(_0x39d562){_0x5d96f6[_0xc6ff('0x5d')]=_0x39d562;return _0x5d96f6;});}})['then'](respondWithFilteredResult(_0x1a9de6,_0x5aabb1))[_0xc6ff('0x1c')](handleError(_0x1a9de6,null));};exports[_0xc6ff('0x90')]=function addApplications(_0x1eed71,_0x3f3faa){var _0x40072e=_0x1eed71[_0xc6ff('0x5f')]['id'];var _0x593013=_0x1eed71['body'];var _0x2338a4=0xc8;var _0x4ffdd3=null;return db[_0xc6ff('0x91')][_0xc6ff('0x92')]({'isolationLevel':db[_0xc6ff('0x91')][_0xc6ff('0x93')][_0xc6ff('0x94')][_0xc6ff('0x95')]},function(_0x2ea4f3){return db[_0xc6ff('0x47')][_0xc6ff('0x6b')]({'where':{'id':_0x40072e},'transaction':_0x2ea4f3})[_0xc6ff('0x13')](function(_0x5ef367){if(_0x5ef367){return db['MailApplication'][_0xc6ff('0x27')]({'where':{'MailAccountId':_0x40072e},'transaction':_0x2ea4f3})[_0xc6ff('0x13')](function(){var _0x121554=_[_0xc6ff('0x46')](_0x593013,function(_0x197b3b){_0x197b3b['MailAccountId']=_0x40072e;return _0x197b3b;});return db[_0xc6ff('0x96')][_0xc6ff('0x97')](_0x121554,{'transaction':_0x2ea4f3});});}else{_0x2338a4=0x194;_0x4ffdd3=[];}});})['then'](function(){if(_0x2338a4!==0x194){return db[_0xc6ff('0x96')]['findAndCountAll']({'where':{'MailAccountId':_0x40072e},'order':_0xc6ff('0x98')})[_0xc6ff('0x13')](function(_0x4e4a0a){_0x4ffdd3=_0x4e4a0a;});}})['catch'](function(_0x4a7cbb){_0x2338a4=0x1f4;logger['error'](_0x4a7cbb['stack']);if(_0x4a7cbb[_0xc6ff('0x2a')]){delete _0x4a7cbb[_0xc6ff('0x2a')];}_0x4ffdd3=_0x4a7cbb;})[_0xc6ff('0x99')](function(){if(_0x4ffdd3===null){_0x3f3faa['sendStatus'](_0x2338a4);}else{if(_0x2338a4===0x1f4){_0x3f3faa[_0xc6ff('0x1e')](_0x2338a4)['send'](_0x4ffdd3);}else{_0x3f3faa[_0xc6ff('0x1e')](_0x2338a4)['json'](_0x4ffdd3);}}});};exports[_0xc6ff('0x9a')]=function(_0x586dd5,_0x473b41){var _0x2ede6d={};var _0x1e4be8={};var _0x37a60c;var _0x4d3650;return db['MailAccount']['findOne']({'where':{'id':_0x586dd5[_0xc6ff('0x5f')]['id']}})[_0xc6ff('0x13')](handleEntityNotFound(_0x473b41,null))[_0xc6ff('0x13')](function(_0x31721c){if(_0x31721c){_0x37a60c=_0x31721c;_0x1e4be8['model']=_['keys'](db[_0xc6ff('0x96')][_0xc6ff('0x48')]);_0x1e4be8['query']=_[_0xc6ff('0x4c')](_0x586dd5[_0xc6ff('0x4b')]);_0x1e4be8[_0xc6ff('0x4d')]=_[_0xc6ff('0x50')](_0x1e4be8[_0xc6ff('0x4e')],_0x1e4be8[_0xc6ff('0x4b')]);_0x2ede6d['attributes']=_[_0xc6ff('0x50')](_0x1e4be8[_0xc6ff('0x4e')],qs[_0xc6ff('0x51')](_0x586dd5[_0xc6ff('0x4b')][_0xc6ff('0x51')]));_0x2ede6d[_0xc6ff('0x4f')]=_0x2ede6d[_0xc6ff('0x4f')]['length']?_0x2ede6d['attributes']:_0x1e4be8['model'];_0x2ede6d[_0xc6ff('0x6d')]=qs['sort'](_0x586dd5[_0xc6ff('0x4b')][_0xc6ff('0x54')]);_0x2ede6d['where']=qs[_0xc6ff('0x4d')](_['pick'](_0x586dd5[_0xc6ff('0x4b')],_0x1e4be8[_0xc6ff('0x4d')]));if(_0x586dd5[_0xc6ff('0x4b')][_0xc6ff('0x56')]){_0x2ede6d[_0xc6ff('0x57')]=_[_0xc6ff('0x58')](_0x2ede6d[_0xc6ff('0x57')],{'$or':_[_0xc6ff('0x46')](_0x2ede6d['attributes'],function(_0x2e2e22){var _0x4c43f5={};_0x4c43f5[_0x2e2e22]={'$like':'%'+_0x586dd5['query']['filter']+'%'};return _0x4c43f5;})});}_0x2ede6d=_['merge']({},_0x2ede6d,_0x586dd5[_0xc6ff('0x5a')]);return _0x37a60c[_0xc6ff('0x9a')](_0x2ede6d);}})[_0xc6ff('0x13')](function(_0x4952a1){if(_0x4952a1){_0x4d3650=_0x4952a1[_0xc6ff('0x61')];if(!_0x586dd5[_0xc6ff('0x4b')][_0xc6ff('0x52')](_0xc6ff('0x53'))){_0x2ede6d[_0xc6ff('0x22')]=qs[_0xc6ff('0x22')](_0x586dd5[_0xc6ff('0x4b')][_0xc6ff('0x22')]);_0x2ede6d['offset']=qs[_0xc6ff('0x20')](_0x586dd5['query']['offset']);}return _0x37a60c[_0xc6ff('0x9a')](_0x2ede6d);}})[_0xc6ff('0x13')](function(_0x34ecd4){if(_0x34ecd4){return _0x34ecd4?{'count':_0x4d3650,'rows':_0x34ecd4}:null;}})['then'](respondWithResult(_0x473b41,null))[_0xc6ff('0x1c')](handleError(_0x473b41,null));};exports[_0xc6ff('0x9b')]=function(_0x5434d1,_0x49089e){var _0x3b4b77={'raw':!![],'where':{}};var _0x2c9ed6={};var _0x29237d={'count':0x0,'rows':[]};return db['MailAccount'][_0xc6ff('0x6b')]({'where':{'id':_0x5434d1['params']['id']}})[_0xc6ff('0x13')](handleEntityNotFound(_0x49089e,null))[_0xc6ff('0x13')](function(_0x2d9dac){if(_0x2d9dac){_0x2c9ed6['model']=_[_0xc6ff('0x4c')](db[_0xc6ff('0x9c')][_0xc6ff('0x48')]);_0x2c9ed6[_0xc6ff('0x4b')]=_[_0xc6ff('0x4c')](_0x5434d1[_0xc6ff('0x4b')]);_0x2c9ed6[_0xc6ff('0x4d')]=_['intersection'](_0x2c9ed6[_0xc6ff('0x4e')],_0x2c9ed6[_0xc6ff('0x4b')]);_0x3b4b77[_0xc6ff('0x4f')]=_[_0xc6ff('0x50')](_0x2c9ed6[_0xc6ff('0x4e')],qs['fields'](_0x5434d1['query'][_0xc6ff('0x51')]));_0x3b4b77[_0xc6ff('0x4f')]=_0x3b4b77[_0xc6ff('0x4f')][_0xc6ff('0x61')]?_0x3b4b77[_0xc6ff('0x4f')]:_0x2c9ed6[_0xc6ff('0x4e')];if(!_0x5434d1[_0xc6ff('0x4b')][_0xc6ff('0x52')](_0xc6ff('0x53'))){_0x3b4b77[_0xc6ff('0x22')]=qs[_0xc6ff('0x22')](_0x5434d1[_0xc6ff('0x4b')][_0xc6ff('0x22')]);_0x3b4b77[_0xc6ff('0x20')]=qs[_0xc6ff('0x20')](_0x5434d1[_0xc6ff('0x4b')][_0xc6ff('0x20')]);}_0x3b4b77[_0xc6ff('0x6d')]=qs[_0xc6ff('0x54')](_0x5434d1[_0xc6ff('0x4b')][_0xc6ff('0x54')]);_0x3b4b77[_0xc6ff('0x57')]=qs['filters'](_[_0xc6ff('0x55')](_0x5434d1['query'],_0x2c9ed6[_0xc6ff('0x4d')]));_0x3b4b77['where'][_0xc6ff('0x6e')]=_0x2d9dac['id'];if(_0x5434d1[_0xc6ff('0x4b')][_0xc6ff('0x56')]){_0x3b4b77[_0xc6ff('0x57')]=_[_0xc6ff('0x58')](_0x3b4b77[_0xc6ff('0x57')],{'$or':_[_0xc6ff('0x46')](_0x3b4b77[_0xc6ff('0x4f')],function(_0x2ce3a6){var _0x3eca57={};_0x3eca57[_0x2ce3a6]={'$like':'%'+_0x5434d1[_0xc6ff('0x4b')][_0xc6ff('0x56')]+'%'};return _0x3eca57;})});}if(_0x5434d1['query'][_0xc6ff('0x9d')]){var _0x38ecad=_0x5434d1[_0xc6ff('0x4b')]['$gte'][_0xc6ff('0x9e')](',');var _0x3ab31b={};_0x3ab31b[_0x38ecad[0x0]]={'$gte':moment(_0x38ecad[0x1])[_0xc6ff('0x9f')](_0xc6ff('0xa0'))};_0x3b4b77[_0xc6ff('0x57')]=_[_0xc6ff('0x58')](_0x3b4b77[_0xc6ff('0x57')],_0x3ab31b);}_0x3b4b77=_['merge']({},_0x3b4b77,_0x5434d1[_0xc6ff('0x5a')]);return db[_0xc6ff('0x9c')][_0xc6ff('0x23')]({'where':_0x3b4b77[_0xc6ff('0x57')]})[_0xc6ff('0x13')](function(_0x54592d){_0x29237d[_0xc6ff('0x23')]=_0x54592d;if(_0x5434d1['query'][_0xc6ff('0x5b')]){_0x3b4b77[_0xc6ff('0x5c')]=[{'all':!![]}];}return db[_0xc6ff('0x9c')][_0xc6ff('0x6f')](_0x3b4b77);})[_0xc6ff('0x13')](function(_0x433525){if(_0x5434d1[_0xc6ff('0x4b')][_0xc6ff('0xa1')]===_0xc6ff('0xa2')){for(var _0x1ee825=0x0;_0x1ee825<_0x433525[_0xc6ff('0x61')];_0x1ee825++){_0x433525[_0x1ee825][_0xc6ff('0x63')]=juice(_0x433525[_0x1ee825][_0xc6ff('0x63')]);}}_0x29237d[_0xc6ff('0x5d')]=_0x433525;return _0x29237d;});}})['then'](respondWithFilteredResult(_0x49089e,_0x3b4b77))[_0xc6ff('0x1c')](handleError(_0x49089e,null));};exports[_0xc6ff('0x2b')]=function(_0x182204,_0x15069e){var _0xe2badd,_0x148ea6={},_0x25ef5e;if(_0x182204[_0xc6ff('0x63')]['to']){_0x25ef5e=_0x182204[_0xc6ff('0x63')]['to']['split'](',')[0x0];}return db[_0xc6ff('0x47')][_0xc6ff('0x62')]({'where':{'id':_0x182204['params']['id']},'include':[{'model':db[_0xc6ff('0xa3')],'as':_0xc6ff('0xa4'),'include':[{'model':db[_0xc6ff('0x87')],'as':'Contacts','where':{'email':_0x25ef5e},'limit':0x1,'order':[[_0xc6ff('0xa5'),_0xc6ff('0xa6')]]}]},{'model':db[_0xc6ff('0x65')],'as':_0xc6ff('0x43'),'raw':!![],'include':[{'model':db[_0xc6ff('0xa7')],'as':_0xc6ff('0xa7'),'raw':!![]}]}]})['then'](handleEntityNotFound(_0x15069e,null))[_0xc6ff('0x13')](function(_0x1f3e76){if(!_0x1f3e76)return;_0xe2badd=_0x1f3e76;if(!_0x1f3e76[_0xc6ff('0x43')])throw new Error(_0xc6ff('0xa8'));if(_['isNil'](_0x182204[_0xc6ff('0x63')][_0xc6ff('0xa9')])){_0x182204[_0xc6ff('0x63')][_0xc6ff('0xa9')]=util[_0xc6ff('0x9f')](_0xc6ff('0xaa'),_0x1f3e76['name'],_0x1f3e76[_0xc6ff('0x74')]||_0x1f3e76[_0xc6ff('0x43')][_0xc6ff('0x37')]);}if(_0x182204[_0xc6ff('0x63')]['attachments']&&_0x182204['body'][_0xc6ff('0xab')][_0xc6ff('0x61')]){for(var _0x3f0dfa=0x0;_0x3f0dfa<_0x182204['body'][_0xc6ff('0xab')]['length'];_0x3f0dfa+=0x1){_0x182204[_0xc6ff('0x63')]['attachments'][_0x3f0dfa]={'filename':_0x182204['body']['attachments'][_0x3f0dfa]['name'],'path':path['join'](config[_0xc6ff('0xac')],'server/files/attachments',_0x182204[_0xc6ff('0x63')][_0xc6ff('0xab')][_0x3f0dfa][_0xc6ff('0xad')])};}}var _0x25d42a=_0x1f3e76[_0xc6ff('0xae')]();return respondWithRpcPromise(_0xc6ff('0xaf'),_0xc6ff('0xb0'),{'account':_0x25d42a,'message':_0x182204['body']});})[_0xc6ff('0x13')](function(_0x19b3f2){if(!_0x19b3f2)return;_0x148ea6=_0x19b3f2;if(!_0xe2badd['List'])throw new Error(_0xc6ff('0xb1'));if(_0xe2badd[_0xc6ff('0xa4')]['Contacts'][_0xc6ff('0x61')])return _0xe2badd[_0xc6ff('0xa4')][_0xc6ff('0xb2')][0x0];return db[_0xc6ff('0x87')][_0xc6ff('0x69')](_[_0xc6ff('0xa')](_0x182204[_0xc6ff('0x63')],{'firstName':_0x182204[_0xc6ff('0x63')]['to'],'email':_0x182204[_0xc6ff('0x63')]['to'],'phone':_0x182204[_0xc6ff('0x63')]['to'],'ListId':_0xe2badd[_0xc6ff('0x75')]}));})['then'](function(_0x23cd34){if(!_0x23cd34)return;var _0x490a52={'UserId':_0x182204[_0xc6ff('0x37')]['id'],'ContactId':_0x23cd34['id'],'MailAccountId':_0xe2badd['id'],'inReplyTo':_0x148ea6[_0xc6ff('0xb3')],'to':_0x182204[_0xc6ff('0x63')]['from'],'cc':_0x182204['body']['cc'],'subject':_0x182204[_0xc6ff('0x63')]['subject'],'attach':_0x182204['body'][_0xc6ff('0xb4')],'firstMsgDirection':_0xc6ff('0xb5'),'lastMsgAt':moment()[_0xc6ff('0x9f')](_0xc6ff('0xa0')),'lastMsgDirection':_0xc6ff('0xb5'),'Messages':[_[_0xc6ff('0x58')](_0x182204[_0xc6ff('0x63')],{'messageId':_0x148ea6['messageId'],'sentAt':moment()[_0xc6ff('0x9f')]('YYYY-MM-DD\x20HH:mm:ss'),'read':!![],'MailAccountId':_0xe2badd['id'],'UserId':_0x182204[_0xc6ff('0x37')]['id'],'ContactId':_0x23cd34['id']})]};if(_0x182204['body'][_0xc6ff('0xb6')]){_0x490a52=_[_0xc6ff('0x58')](_0x490a52,_0x182204['body'][_0xc6ff('0xb6')]);}return db[_0xc6ff('0x85')][_0xc6ff('0x69')](_0x490a52,{'include':[{'model':db[_0xc6ff('0x9c')],'as':_0xc6ff('0xb7')}]});})[_0xc6ff('0x13')](respondWithResult(_0x15069e,null))[_0xc6ff('0x1c')](handleError(_0x15069e,null));};exports[_0xc6ff('0xb8')]=function(_0x5eb7d2,_0x207767){return db[_0xc6ff('0x47')][_0xc6ff('0x62')]({'where':{'id':_0x5eb7d2[_0xc6ff('0x5f')]['id']},'include':[{'model':db[_0xc6ff('0x65')],'as':_0xc6ff('0x43'),'raw':!![],'include':[{'model':db[_0xc6ff('0xa7')],'as':_0xc6ff('0xa7'),'raw':!![]}]}]})[_0xc6ff('0x13')](handleEntityNotFound(_0x207767,null))['then'](function(_0x540b84){if(!_0x540b84[_0xc6ff('0x43')])return;var _0x2633f4=_0x540b84[_0xc6ff('0xae')]();return respondWithRpcPromise(_0xc6ff('0xb9'),'verifySmtp',{'account':_0x2633f4});})['then'](respondWithResult(_0x207767,null))[_0xc6ff('0x1c')](handleError(_0x207767,null));};exports['destroy']=function(_0x35a76b,_0x17a6d3){return db[_0xc6ff('0x47')]['find']({'where':{'id':_0x35a76b['params']['id']}})['then'](handleEntityNotFound(_0x17a6d3,null))[_0xc6ff('0x13')](function(_0x49359e){if(_0x49359e&&_0x49359e[_0xc6ff('0x40')]){throw new db[(_0xc6ff('0xba'))][(_0xc6ff('0xbb'))](_0xc6ff('0xbc'));}return _0x49359e;})[_0xc6ff('0x13')](removeEntity(_0x17a6d3,null))['catch'](handleError(_0x17a6d3,null));};exports['addAgents']=function(_0x5c2af6,_0x192826){return db[_0xc6ff('0x47')][_0xc6ff('0x62')]({'where':{'id':_0x5c2af6['params']['id']}})[_0xc6ff('0x13')](handleEntityNotFound(_0x192826,null))[_0xc6ff('0x13')](function(_0xee10c){if(_0xee10c){return _0xee10c['addAgents'](_0x5c2af6['body']['ids'],_[_0xc6ff('0xbd')](_0x5c2af6[_0xc6ff('0x63')],[_0xc6ff('0x71'),'id'])||{})[_0xc6ff('0xbe')](function(_0x31a732){for(var _0x5a36e1=0x0;_0x5a36e1<_0x5c2af6[_0xc6ff('0x63')]['ids'][_0xc6ff('0x61')];_0x5a36e1+=0x1){socket[_0xc6ff('0xbf')](_0xc6ff('0xc0'),{'UserId':Number(_0x5c2af6[_0xc6ff('0x63')]['ids'][_0x5a36e1]),'MailAccountId':Number(_0x5c2af6[_0xc6ff('0x5f')]['id'])});}return _0x31a732;});}})[_0xc6ff('0x13')](respondWithResult(_0x192826,null))[_0xc6ff('0x1c')](handleError(_0x192826,null));};exports[_0xc6ff('0xc1')]=function(_0x45f660,_0x10121f){return db['MailAccount'][_0xc6ff('0x62')]({'where':{'id':_0x45f660[_0xc6ff('0x5f')]['id']}})[_0xc6ff('0x13')](handleEntityNotFound(_0x10121f,null))['then'](function(_0x3f1447){if(_0x3f1447){return _0x3f1447['removeAgents'](_0x45f660[_0xc6ff('0x4b')][_0xc6ff('0x71')])[_0xc6ff('0x13')](function(){if(_[_0xc6ff('0xc2')](_0x45f660[_0xc6ff('0x4b')][_0xc6ff('0x71')])){for(var _0x97ab02=0x0;_0x97ab02<_0x45f660[_0xc6ff('0x4b')][_0xc6ff('0x71')][_0xc6ff('0x61')];_0x97ab02+=0x1){socket['emit'](_0xc6ff('0xc3'),{'UserId':Number(_0x45f660['query'][_0xc6ff('0x71')][_0x97ab02]),'MailAccountId':Number(_0x45f660[_0xc6ff('0x5f')]['id'])});}}else{socket[_0xc6ff('0xbf')](_0xc6ff('0xc3'),{'UserId':Number(_0x45f660['query']['ids']),'MailAccountId':Number(_0x45f660['params']['id'])});}});}})['then'](respondWithStatusCode(_0x10121f,null))[_0xc6ff('0x1c')](handleError(_0x10121f,null));};exports[_0xc6ff('0xc4')]=function(_0x5a661a,_0x43f5fc){var _0x1dec87={};var _0x38a9df={};var _0x3e7ef1;var _0x37d28c;return db['MailAccount'][_0xc6ff('0x6b')]({'where':{'id':_0x5a661a[_0xc6ff('0x5f')]['id']}})['then'](handleEntityNotFound(_0x43f5fc,null))[_0xc6ff('0x13')](function(_0x1a639b){if(_0x1a639b){_0x3e7ef1=_0x1a639b;_0x38a9df['model']=_['keys'](db[_0xc6ff('0x89')][_0xc6ff('0x48')]);_0x38a9df['query']=_[_0xc6ff('0x4c')](_0x5a661a[_0xc6ff('0x4b')]);_0x38a9df[_0xc6ff('0x4d')]=_[_0xc6ff('0x50')](_0x38a9df[_0xc6ff('0x4e')],_0x38a9df[_0xc6ff('0x4b')]);_0x1dec87[_0xc6ff('0x4f')]=_[_0xc6ff('0x50')](_0x38a9df[_0xc6ff('0x4e')],qs[_0xc6ff('0x51')](_0x5a661a[_0xc6ff('0x4b')][_0xc6ff('0x51')]));_0x1dec87[_0xc6ff('0x4f')]=_0x1dec87[_0xc6ff('0x4f')][_0xc6ff('0x61')]?_0x1dec87[_0xc6ff('0x4f')]:_0x38a9df[_0xc6ff('0x4e')];_0x1dec87[_0xc6ff('0x6d')]=qs[_0xc6ff('0x54')](_0x5a661a[_0xc6ff('0x4b')][_0xc6ff('0x54')]);_0x1dec87[_0xc6ff('0x57')]=qs[_0xc6ff('0x4d')](_[_0xc6ff('0x55')](_0x5a661a[_0xc6ff('0x4b')],_0x38a9df[_0xc6ff('0x4d')]));if(_0x5a661a['query'][_0xc6ff('0x56')]){_0x1dec87[_0xc6ff('0x57')]=_['merge'](_0x1dec87[_0xc6ff('0x57')],{'$or':_[_0xc6ff('0x46')](_0x1dec87[_0xc6ff('0x4f')],function(_0x46aa8e){var _0x4deca6={};_0x4deca6[_0x46aa8e]={'$like':'%'+_0x5a661a[_0xc6ff('0x4b')][_0xc6ff('0x56')]+'%'};return _0x4deca6;})});}_0x1dec87=_['merge']({},_0x1dec87,_0x5a661a['options']);return _0x3e7ef1[_0xc6ff('0xc4')](_0x1dec87);}})[_0xc6ff('0x13')](function(_0x2726f5){if(_0x2726f5){_0x37d28c=_0x2726f5['length'];if(!_0x5a661a[_0xc6ff('0x4b')]['hasOwnProperty'](_0xc6ff('0x53'))){_0x1dec87['limit']=qs[_0xc6ff('0x22')](_0x5a661a[_0xc6ff('0x4b')]['limit']);_0x1dec87[_0xc6ff('0x20')]=qs[_0xc6ff('0x20')](_0x5a661a[_0xc6ff('0x4b')][_0xc6ff('0x20')]);}return _0x3e7ef1[_0xc6ff('0xc4')](_0x1dec87);}})[_0xc6ff('0x13')](function(_0x29f6a0){if(_0x29f6a0){return _0x29f6a0?{'count':_0x37d28c,'rows':_0x29f6a0}:null;}})['then'](respondWithResult(_0x43f5fc,null))[_0xc6ff('0x1c')](handleError(_0x43f5fc,null));}; \ No newline at end of file +var _0x147a=['tag','sequelize','Transaction','READ_COMMITTED','MailApplication','bulkCreate','findAndCountAll','priority','getApplications','getMessages','$gte','split','format','YYYY-MM-DD\x20HH:mm:ss','MailMessage','CmList','List','Contacts','DESC','CloudProvider','Smtp\x20configuration\x20not\x20found','from','%s\x20<%s>','attachments','join','root','server/files/attachments','basename','getSmtpOptions','SendMail','List\x20not\x20found','ListId','messageId','subject','attach','out','Interaction','verifySmtp','VerifySmtp','Sequelize','ValidationError','You\x20can\x27t\x20remove\x20the\x20mail\x20service\x20account','addAgents','emit','removeAgents','userMailAccount:remove','getAgents','moment','bluebird','path','lodash','ioredis','../../config/logger','api','../../config/environment','../../mysqldb','defaults','localhost','socket.io-emitter','redis','./mailAccount.socket','register','jayson/promise','client','http','request','then','MailAccount,\x20%s,\x20%s','request\x20sent','debug','MailAccount,\x20%s,\x20%s,\x20%s','stringify','error','code','message','info','result','catch','sendStatus','status','offset','limit','undefined','count','set','json','update','destroy','get','MailAccounts','UserProfileResource','end','stack','name','send','yahoo','imap.mail.yahoo.com','imap-mail.outlook.com','outlook365','outlook.office365.com','Unknown\x20email\x20service\x20provider','gmail','smtp.gmail.com','smtp.mail.yahoo.com','smtp-mail.outlook.com','smtp.office365.com','user','username','password','pass','modernAuthentication','CloudProviderId','host','service','authentication','Imap','Smtp','port','MailServerIn','MailServerOut','Pause','mandatoryDispositionPause','rawAttributes','type','key','model','map','query','intersection','attributes','fields','hasOwnProperty','nolimit','order','sort','where','filters','merge','filter','options','includeAll','MailAccount','show','params','keys','length','include','find','body','custom','provider','secure','describe','addDisposition','MailAccountId','Disposition','create','getDispositions','pick','findAll','rows','ids','addAnswer','getAnswers','findOne','CannedAnswer','removeAnswers','email','isNil','active','UserProfileSection','autoAssociation','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','getImap','removeImap','setImap','getSmtp','addSmtp','removeSmtp','setSmtp','addInteraction','MailInteraction','omit','getInteractions','CmContact','Contact','User','Owner','fullname','internal','Tag','Tags','color'];(function(_0x4bc78e,_0x4f6f3a){var _0x50fbdb=function(_0x209891){while(--_0x209891){_0x4bc78e['push'](_0x4bc78e['shift']());}};_0x50fbdb(++_0x4f6f3a);}(_0x147a,0xf0));var _0xa147=function(_0x23c6f2,_0x4e033c){_0x23c6f2=_0x23c6f2-0x0;var _0x4c270b=_0x147a[_0x23c6f2];return _0x4c270b;};'use strict';var moment=require(_0xa147('0x0'));var BPromise=require(_0xa147('0x1'));var util=require('util');var path=require(_0xa147('0x2'));var _=require(_0xa147('0x3'));var juice=require('juice');var Redis=require(_0xa147('0x4'));var qs=require('../../components/parsers/qs');var logger=require(_0xa147('0x5'))(_0xa147('0x6'));var config=require(_0xa147('0x7'));var db=require(_0xa147('0x8'))['db'];config['redis']=_[_0xa147('0x9')](config['redis'],{'host':_0xa147('0xa'),'port':0x18eb});var socket=require(_0xa147('0xb'))(new Redis(config[_0xa147('0xc')]));require(_0xa147('0xd'))[_0xa147('0xe')](socket);var jayson=require(_0xa147('0xf'));var client=jayson[_0xa147('0x10')][_0xa147('0x11')]({'port':0x232b});function respondWithRpcPromise(_0xa2bdbd,_0x54ab0d,_0x5374ba,_0x5f0241){return new BPromise(function(_0x109482,_0x38494c){var _0x28b821=_0x5f0241||client;return _0x28b821[_0xa147('0x12')](_0xa2bdbd,_0x5374ba)[_0xa147('0x13')](function(_0x4e2acb){logger['info'](_0xa147('0x14'),_0x54ab0d,_0xa147('0x15'));logger[_0xa147('0x16')](_0xa147('0x17'),_0x54ab0d,_0xa147('0x15'),JSON[_0xa147('0x18')](_0x4e2acb));if(_0x4e2acb[_0xa147('0x19')]){if(_0x4e2acb[_0xa147('0x19')][_0xa147('0x1a')]===0x1f4){logger[_0xa147('0x19')](_0xa147('0x14'),_0x54ab0d,_0x4e2acb[_0xa147('0x19')][_0xa147('0x1b')]);return _0x38494c(_0x4e2acb['error'][_0xa147('0x1b')]);}logger[_0xa147('0x19')]('MailAccount,\x20%s,\x20%s',_0x54ab0d,_0x4e2acb[_0xa147('0x19')][_0xa147('0x1b')]);return _0x109482(_0x4e2acb[_0xa147('0x19')][_0xa147('0x1b')]);}else{logger[_0xa147('0x1c')](_0xa147('0x14'),_0x54ab0d,_0xa147('0x15'));_0x109482(_0x4e2acb[_0xa147('0x1d')]['message']);}})[_0xa147('0x1e')](function(_0x160ab6){logger[_0xa147('0x19')](_0xa147('0x14'),_0x54ab0d,_0x160ab6);_0x38494c(_0x160ab6);});});}function respondWithStatusCode(_0x300601,_0x300981){_0x300981=_0x300981||0xcc;return function(_0x307828){if(_0x307828){return _0x300601[_0xa147('0x1f')](_0x300981);}return _0x300601['status'](_0x300981)['end']();};}function respondWithResult(_0xe4c654,_0x52e888){_0x52e888=_0x52e888||0xc8;return function(_0xc6f84d){if(_0xc6f84d){return _0xe4c654[_0xa147('0x20')](_0x52e888)['json'](_0xc6f84d);}};}function respondWithFilteredResult(_0x18163e,_0x48629a){return function(_0x38e34a){if(_0x38e34a){var _0x22180a=typeof _0x48629a[_0xa147('0x21')]==='undefined'&&typeof _0x48629a[_0xa147('0x22')]===_0xa147('0x23');var _0x1f4a13=_0x38e34a[_0xa147('0x24')];var _0x2a6b2f=_0x22180a?0x0:_0x48629a[_0xa147('0x21')];var _0x5c25ff=_0x22180a?_0x38e34a[_0xa147('0x24')]:_0x48629a[_0xa147('0x21')]+_0x48629a[_0xa147('0x22')];var _0x13a625;if(_0x5c25ff>=_0x1f4a13){_0x5c25ff=_0x1f4a13;_0x13a625=0xc8;}else{_0x13a625=0xce;}_0x18163e[_0xa147('0x20')](_0x13a625);return _0x18163e[_0xa147('0x25')]('Content-Range',_0x2a6b2f+'-'+_0x5c25ff+'/'+_0x1f4a13)[_0xa147('0x26')](_0x38e34a);}return null;};}function saveUpdates(_0x202237){return function(_0x257ab2){if(_0x257ab2){return _0x257ab2[_0xa147('0x27')](_0x202237)[_0xa147('0x13')](function(_0xc32728){return _0xc32728;});}return null;};}function removeEntity(_0x544208){return function(_0x535fe3){if(_0x535fe3){return _0x535fe3[_0xa147('0x28')]()[_0xa147('0x13')](function(){var _0x1cc25d=_0x535fe3[_0xa147('0x29')]({'plain':!![]});var _0x1925e0=_0xa147('0x2a');return db[_0xa147('0x2b')][_0xa147('0x28')]({'where':{'type':_0x1925e0,'resourceId':_0x1cc25d['id']}})[_0xa147('0x13')](function(){return _0x535fe3;});})[_0xa147('0x13')](function(){_0x544208[_0xa147('0x20')](0xcc)[_0xa147('0x2c')]();});}};}function handleEntityNotFound(_0x1f29d3){return function(_0x45fc39){if(!_0x45fc39){_0x1f29d3['sendStatus'](0x194);}return _0x45fc39;};}function handleError(_0x49ac39,_0x499b2a){_0x499b2a=_0x499b2a||0x1f4;return function(_0x535b16){logger[_0xa147('0x19')](_0x535b16[_0xa147('0x2d')]);if(_0x535b16[_0xa147('0x2e')]){delete _0x535b16[_0xa147('0x2e')];}_0x49ac39[_0xa147('0x20')](_0x499b2a)[_0xa147('0x2f')](_0x535b16);};}function getImapHost(_0x18dfd2){switch(_0x18dfd2){case'gmail':return'imap.gmail.com';case _0xa147('0x30'):return _0xa147('0x31');case'hotmail':return _0xa147('0x32');case _0xa147('0x33'):return _0xa147('0x34');}throw new Error(_0xa147('0x35'),_0x18dfd2);}function getSmtpHost(_0x42d957){switch(_0x42d957){case _0xa147('0x36'):return _0xa147('0x37');case _0xa147('0x30'):return _0xa147('0x38');case'hotmail':return _0xa147('0x39');case _0xa147('0x33'):return _0xa147('0x3a');}throw new Error(_0xa147('0x35'),_0x42d957);}function getAuthenticationOptions(_0x8078de,_0x431b6d){var _0x2b91e3={};var _0x3e5d9e={};if(_0x8078de){_0x2b91e3[_0xa147('0x3b')]=_0x3e5d9e[_0xa147('0x3b')]=_0x431b6d[_0xa147('0x3c')];_0x2b91e3[_0xa147('0x3d')]=_0x3e5d9e[_0xa147('0x3e')]=_0x431b6d[_0xa147('0x3d')];if(_0x431b6d[_0xa147('0x3f')]){_0x2b91e3[_0xa147('0x3f')]=_0x3e5d9e[_0xa147('0x3f')]=!![];_0x2b91e3['CloudProviderId']=_0x3e5d9e[_0xa147('0x40')]=_0x431b6d[_0xa147('0x40')];_0x2b91e3['password']=_0x3e5d9e[_0xa147('0x3e')]=null;}else{_0x2b91e3[_0xa147('0x40')]=_0x3e5d9e['CloudProviderId']=null;}_0x2b91e3[_0xa147('0x41')]=getImapHost(_0x8078de);_0x2b91e3['port']=0x3e1;_0x3e5d9e[_0xa147('0x41')]=getSmtpHost(_0x8078de);_0x3e5d9e['port']=0x24b;_0x3e5d9e['secure']=![];_0x2b91e3['service']=_0x3e5d9e[_0xa147('0x42')]=null;}else{if(_0x431b6d[_0xa147('0x43')]){_0x2b91e3[_0xa147('0x3b')]=_0x3e5d9e[_0xa147('0x3b')]=_0x431b6d[_0xa147('0x3c')];_0x2b91e3[_0xa147('0x3d')]=_0x3e5d9e['pass']=_0x431b6d[_0xa147('0x3d')];}else{_0x2b91e3[_0xa147('0x43')]=_0x3e5d9e[_0xa147('0x43')]=![];_0x2b91e3[_0xa147('0x3b')]=_0x3e5d9e[_0xa147('0x3b')]=null;_0x2b91e3[_0xa147('0x3d')]=_0x3e5d9e[_0xa147('0x3e')]=null;}_0x2b91e3[_0xa147('0x41')]=_0x431b6d['Imap'][_0xa147('0x41')];_0x2b91e3['port']=_0x431b6d[_0xa147('0x44')]['port'];_0x3e5d9e[_0xa147('0x41')]=_0x431b6d[_0xa147('0x45')]['host'];_0x3e5d9e[_0xa147('0x46')]=_0x431b6d[_0xa147('0x45')]['port'];}return{'Imap':_0x2b91e3,'Smtp':_0x3e5d9e};}exports['index']=function(_0x1b29b5,_0x39042f){var _0x3f4d51={'include':[{'model':db[_0xa147('0x47')],'as':_0xa147('0x44')},{'model':db[_0xa147('0x48')],'as':_0xa147('0x45')},{'model':db[_0xa147('0x49')],'as':_0xa147('0x4a')}]},_0x38396c={},_0x508d37={'count':0x0,'rows':[]};var _0x5c4e6c=_['map'](db['MailAccount'][_0xa147('0x4b')],function(_0x5074c0){return{'name':_0x5074c0['fieldName'],'type':_0x5074c0[_0xa147('0x4c')][_0xa147('0x4d')]};});_0x38396c[_0xa147('0x4e')]=_[_0xa147('0x4f')](_0x5c4e6c,_0xa147('0x2e'));_0x38396c[_0xa147('0x50')]=_['keys'](_0x1b29b5[_0xa147('0x50')]);_0x38396c['filters']=_[_0xa147('0x51')](_0x38396c[_0xa147('0x4e')],_0x38396c[_0xa147('0x50')]);_0x3f4d51[_0xa147('0x52')]=_[_0xa147('0x51')](_0x38396c[_0xa147('0x4e')],qs[_0xa147('0x53')](_0x1b29b5['query']['fields']));_0x3f4d51['attributes']=_0x3f4d51[_0xa147('0x52')]['length']?_0x3f4d51[_0xa147('0x52')]:_0x38396c['model'];if(!_0x1b29b5[_0xa147('0x50')][_0xa147('0x54')](_0xa147('0x55'))){_0x3f4d51[_0xa147('0x22')]=qs[_0xa147('0x22')](_0x1b29b5[_0xa147('0x50')][_0xa147('0x22')]);_0x3f4d51[_0xa147('0x21')]=qs['offset'](_0x1b29b5[_0xa147('0x50')][_0xa147('0x21')]);}_0x3f4d51[_0xa147('0x56')]=qs[_0xa147('0x57')](_0x1b29b5['query'][_0xa147('0x57')]);_0x3f4d51[_0xa147('0x58')]=qs['filters'](_['pick'](_0x1b29b5['query'],_0x38396c[_0xa147('0x59')]),_0x5c4e6c);if(_0x1b29b5[_0xa147('0x50')]['filter']){_0x3f4d51[_0xa147('0x58')]=_[_0xa147('0x5a')](_0x3f4d51[_0xa147('0x58')],{'$or':_['map'](_0x5c4e6c,function(_0x528fd0){if(_0x528fd0['type']!=='VIRTUAL'){var _0x228161={};_0x228161[_0x528fd0[_0xa147('0x2e')]]={'$like':'%'+_0x1b29b5[_0xa147('0x50')][_0xa147('0x5b')]+'%'};return _0x228161;}})});}_0x3f4d51=_[_0xa147('0x5a')]({},_0x3f4d51,_0x1b29b5[_0xa147('0x5c')]);var _0x2861e3={'where':_0x3f4d51[_0xa147('0x58')]};return db['MailAccount']['count'](_0x2861e3)[_0xa147('0x13')](function(_0x5739f5){_0x508d37[_0xa147('0x24')]=_0x5739f5;if(_0x1b29b5[_0xa147('0x50')][_0xa147('0x5d')]){_0x3f4d51['include']=[{'all':!![]}];}return db[_0xa147('0x5e')]['findAll'](_0x3f4d51);})[_0xa147('0x13')](function(_0x827800){_0x508d37['rows']=_0x827800;return _0x508d37;})['then'](respondWithFilteredResult(_0x39042f,_0x3f4d51))[_0xa147('0x1e')](handleError(_0x39042f,null));};exports[_0xa147('0x5f')]=function(_0xae230c,_0x6f101){var _0x86f20a={'raw':![],'where':{'id':_0xae230c[_0xa147('0x60')]['id']},'include':[{'model':db[_0xa147('0x47')],'as':_0xa147('0x44')},{'model':db[_0xa147('0x48')],'as':_0xa147('0x45')},{'model':db[_0xa147('0x49')],'as':_0xa147('0x4a')}]},_0x552cdd={};_0x552cdd['model']=_['keys'](db[_0xa147('0x5e')][_0xa147('0x4b')]);_0x552cdd['query']=_[_0xa147('0x61')](_0xae230c[_0xa147('0x50')]);_0x552cdd['filters']=_[_0xa147('0x51')](_0x552cdd[_0xa147('0x4e')],_0x552cdd[_0xa147('0x50')]);_0x86f20a[_0xa147('0x52')]=_[_0xa147('0x51')](_0x552cdd['model'],qs[_0xa147('0x53')](_0xae230c['query'][_0xa147('0x53')]));_0x86f20a[_0xa147('0x52')]=_0x86f20a[_0xa147('0x52')][_0xa147('0x62')]?_0x86f20a[_0xa147('0x52')]:_0x552cdd[_0xa147('0x4e')];if(_0xae230c['query'][_0xa147('0x5d')]){_0x86f20a[_0xa147('0x63')]=[{'all':!![]}];}_0x86f20a=_[_0xa147('0x5a')]({},_0x86f20a,_0xae230c[_0xa147('0x5c')]);return db[_0xa147('0x5e')][_0xa147('0x64')](_0x86f20a)[_0xa147('0x13')](handleEntityNotFound(_0x6f101,null))['then'](respondWithResult(_0x6f101,null))['catch'](handleError(_0x6f101,null));};exports[_0xa147('0x27')]=function(_0x2891c0,_0x3b898b){if(_0x2891c0['body']['id']){delete _0x2891c0[_0xa147('0x65')]['id'];}var _0x542006=_0x2891c0[_0xa147('0x65')]['provider']===_0xa147('0x66')?null:_0x2891c0[_0xa147('0x65')][_0xa147('0x67')];var _0x10eb70=_0x2891c0['body'][_0xa147('0x44')]||{};var _0x39228e=_0x2891c0['body'][_0xa147('0x45')]||{};if(_0x542006){_0x10eb70[_0xa147('0x41')]=getImapHost(_0x542006);_0x10eb70[_0xa147('0x46')]=0x3e1;_0x39228e[_0xa147('0x41')]=getSmtpHost(_0x542006);_0x39228e[_0xa147('0x46')]=0x24b;_0x39228e[_0xa147('0x68')]=![];}if(_0x39228e[_0xa147('0x3f')]){_0x39228e[_0xa147('0x68')]=![];}else{_0x39228e[_0xa147('0x40')]=null;}if(!_0x10eb70['modernAuthentication'])_0x10eb70['CloudProviderId']=null;_0x2891c0[_0xa147('0x65')][_0xa147('0x44')]=_0x10eb70;_0x2891c0[_0xa147('0x65')][_0xa147('0x45')]=_0x39228e;return db[_0xa147('0x5e')][_0xa147('0x64')]({'where':{'id':_0x2891c0[_0xa147('0x60')]['id']},'include':[{'model':db[_0xa147('0x47')],'as':_0xa147('0x44')},{'model':db[_0xa147('0x48')],'as':_0xa147('0x45')},{'model':db[_0xa147('0x49')],'as':_0xa147('0x4a')}]})['then'](handleEntityNotFound(_0x3b898b,null))[_0xa147('0x13')](function(_0x4c09f5){if(!_0x4c09f5)throw new Error('Mail\x20Account\x20not\x20found');if(_0x4c09f5[_0xa147('0x42')])delete _0x2891c0[_0xa147('0x65')][_0xa147('0x44')];return _0x4c09f5;})[_0xa147('0x13')](saveUpdates(_0x2891c0['body'],null))[_0xa147('0x13')](function(_0x331946){if(!_0x2891c0[_0xa147('0x65')][_0xa147('0x44')])return _0x331946;return db[_0xa147('0x47')]['update'](_0x2891c0[_0xa147('0x65')]['Imap'],{'where':{'MailAccountId':_0x331946['id']}})[_0xa147('0x13')](function(){return _0x331946;});})[_0xa147('0x13')](function(_0x543649){if(!_0x2891c0[_0xa147('0x65')][_0xa147('0x45')])return _0x543649;return db['MailServerOut'][_0xa147('0x27')](_0x2891c0[_0xa147('0x65')]['Smtp'],{'where':{'MailAccountId':_0x543649['id']}})[_0xa147('0x13')](function(){return _0x543649;});})[_0xa147('0x13')](respondWithResult(_0x3b898b,null))[_0xa147('0x1e')](handleError(_0x3b898b,null));};exports[_0xa147('0x69')]=function(_0xd13422,_0x445de0){return db[_0xa147('0x5e')]['describe']()['then'](respondWithResult(_0x445de0,null))[_0xa147('0x1e')](handleError(_0x445de0,null));};exports[_0xa147('0x6a')]=function(_0x393529,_0x4fb94c){if(_0x393529[_0xa147('0x65')]['id']){delete _0x393529[_0xa147('0x65')]['id'];}return db['MailAccount'][_0xa147('0x64')]({'where':{'id':_0x393529[_0xa147('0x60')]['id']}})['then'](handleEntityNotFound(_0x4fb94c,null))[_0xa147('0x13')](function(_0x15cb6b){if(_0x15cb6b){_0x393529[_0xa147('0x65')][_0xa147('0x6b')]=_0x15cb6b['id'];return db[_0xa147('0x6c')][_0xa147('0x6d')](_0x393529[_0xa147('0x65')]);}})['then'](respondWithResult(_0x4fb94c,null))['catch'](handleError(_0x4fb94c,null));};exports[_0xa147('0x6e')]=function(_0x2e2329,_0x2607dc){var _0x48db6b={'raw':![],'where':{}};var _0x15634f={};var _0x376dc5={'count':0x0,'rows':[]};return db['MailAccount']['findOne']({'where':{'id':_0x2e2329[_0xa147('0x60')]['id']}})[_0xa147('0x13')](handleEntityNotFound(_0x2607dc,null))[_0xa147('0x13')](function(_0x2c8b7c){if(_0x2c8b7c){_0x15634f[_0xa147('0x4e')]=_[_0xa147('0x61')](db[_0xa147('0x6c')][_0xa147('0x4b')]);_0x15634f[_0xa147('0x50')]=_['keys'](_0x2e2329[_0xa147('0x50')]);_0x15634f[_0xa147('0x59')]=_[_0xa147('0x51')](_0x15634f[_0xa147('0x4e')],_0x15634f[_0xa147('0x50')]);_0x48db6b['attributes']=_[_0xa147('0x51')](_0x15634f[_0xa147('0x4e')],qs[_0xa147('0x53')](_0x2e2329[_0xa147('0x50')][_0xa147('0x53')]));_0x48db6b[_0xa147('0x52')]=_0x48db6b[_0xa147('0x52')]['length']?_0x48db6b['attributes']:_0x15634f[_0xa147('0x4e')];if(!_0x2e2329[_0xa147('0x50')][_0xa147('0x54')](_0xa147('0x55'))){_0x48db6b[_0xa147('0x22')]=qs[_0xa147('0x22')](_0x2e2329['query']['limit']);_0x48db6b[_0xa147('0x21')]=qs[_0xa147('0x21')](_0x2e2329[_0xa147('0x50')][_0xa147('0x21')]);}_0x48db6b[_0xa147('0x56')]=qs[_0xa147('0x57')](_0x2e2329[_0xa147('0x50')][_0xa147('0x57')]);_0x48db6b[_0xa147('0x58')]=qs['filters'](_[_0xa147('0x6f')](_0x2e2329[_0xa147('0x50')],_0x15634f[_0xa147('0x59')]));_0x48db6b[_0xa147('0x58')][_0xa147('0x6b')]=_0x2c8b7c['id'];if(_0x2e2329['query'][_0xa147('0x5b')]){_0x48db6b[_0xa147('0x58')]=_[_0xa147('0x5a')](_0x48db6b['where'],{'$or':_[_0xa147('0x4f')](_0x48db6b[_0xa147('0x52')],function(_0x44a995){var _0x1795a8={};_0x1795a8[_0x44a995]={'$like':'%'+_0x2e2329['query'][_0xa147('0x5b')]+'%'};return _0x1795a8;})});}_0x48db6b=_[_0xa147('0x5a')]({},_0x48db6b,_0x2e2329[_0xa147('0x5c')]);return db[_0xa147('0x6c')][_0xa147('0x24')]({'where':_0x48db6b[_0xa147('0x58')]})[_0xa147('0x13')](function(_0x28adcf){_0x376dc5[_0xa147('0x24')]=_0x28adcf;if(_0x2e2329['query'][_0xa147('0x5d')]){_0x48db6b[_0xa147('0x63')]=[{'all':!![]}];}return db[_0xa147('0x6c')][_0xa147('0x70')](_0x48db6b);})[_0xa147('0x13')](function(_0x8ae493){_0x376dc5[_0xa147('0x71')]=_0x8ae493;return _0x376dc5;});}})[_0xa147('0x13')](respondWithFilteredResult(_0x2607dc,_0x48db6b))[_0xa147('0x1e')](handleError(_0x2607dc,null));};exports['removeDispositions']=function(_0x4aed8a,_0x484837){return db[_0xa147('0x5e')][_0xa147('0x64')]({'where':{'id':_0x4aed8a[_0xa147('0x60')]['id']}})['then'](handleEntityNotFound(_0x484837,null))[_0xa147('0x13')](function(_0x80eddd){if(_0x80eddd){return _0x80eddd['removeDispositions'](_0x4aed8a['query'][_0xa147('0x72')]);}})[_0xa147('0x13')](respondWithStatusCode(_0x484837,null))[_0xa147('0x1e')](handleError(_0x484837,null));};exports[_0xa147('0x73')]=function(_0x2a3c67,_0x43a796){if(_0x2a3c67[_0xa147('0x65')]['id']){delete _0x2a3c67['body']['id'];}return db['MailAccount'][_0xa147('0x64')]({'where':{'id':_0x2a3c67[_0xa147('0x60')]['id']}})['then'](handleEntityNotFound(_0x43a796,null))['then'](function(_0x148099){if(_0x148099){_0x2a3c67[_0xa147('0x65')]['MailAccountId']=_0x148099['id'];return db['CannedAnswer'][_0xa147('0x6d')](_0x2a3c67[_0xa147('0x65')]);}})[_0xa147('0x13')](respondWithResult(_0x43a796,null))[_0xa147('0x1e')](handleError(_0x43a796,null));};exports[_0xa147('0x74')]=function(_0x3b8ba3,_0x44eb95){var _0x487220={'raw':![],'where':{}};var _0x5b10ed={};var _0x1ba9ec={'count':0x0,'rows':[]};return db['MailAccount'][_0xa147('0x75')]({'where':{'id':_0x3b8ba3[_0xa147('0x60')]['id']}})[_0xa147('0x13')](handleEntityNotFound(_0x44eb95,null))[_0xa147('0x13')](function(_0x5218a5){if(_0x5218a5){_0x5b10ed[_0xa147('0x4e')]=_[_0xa147('0x61')](db[_0xa147('0x76')][_0xa147('0x4b')]);_0x5b10ed[_0xa147('0x50')]=_[_0xa147('0x61')](_0x3b8ba3[_0xa147('0x50')]);_0x5b10ed[_0xa147('0x59')]=_[_0xa147('0x51')](_0x5b10ed[_0xa147('0x4e')],_0x5b10ed[_0xa147('0x50')]);_0x487220[_0xa147('0x52')]=_[_0xa147('0x51')](_0x5b10ed['model'],qs[_0xa147('0x53')](_0x3b8ba3['query'][_0xa147('0x53')]));_0x487220[_0xa147('0x52')]=_0x487220[_0xa147('0x52')][_0xa147('0x62')]?_0x487220[_0xa147('0x52')]:_0x5b10ed['model'];if(!_0x3b8ba3[_0xa147('0x50')][_0xa147('0x54')]('nolimit')){_0x487220[_0xa147('0x22')]=qs[_0xa147('0x22')](_0x3b8ba3[_0xa147('0x50')]['limit']);_0x487220[_0xa147('0x21')]=qs[_0xa147('0x21')](_0x3b8ba3['query'][_0xa147('0x21')]);}_0x487220[_0xa147('0x56')]=qs[_0xa147('0x57')](_0x3b8ba3['query'][_0xa147('0x57')]);_0x487220['where']=qs['filters'](_['pick'](_0x3b8ba3[_0xa147('0x50')],_0x5b10ed[_0xa147('0x59')]));_0x487220['where'][_0xa147('0x6b')]=_0x5218a5['id'];if(_0x3b8ba3['query'][_0xa147('0x5b')]){_0x487220[_0xa147('0x58')]=_[_0xa147('0x5a')](_0x487220[_0xa147('0x58')],{'$or':_[_0xa147('0x4f')](_0x487220[_0xa147('0x52')],function(_0x359eab){var _0x3ec7e7={};_0x3ec7e7[_0x359eab]={'$like':'%'+_0x3b8ba3[_0xa147('0x50')][_0xa147('0x5b')]+'%'};return _0x3ec7e7;})});}_0x487220=_[_0xa147('0x5a')]({},_0x487220,_0x3b8ba3['options']);return db[_0xa147('0x76')][_0xa147('0x24')]({'where':_0x487220[_0xa147('0x58')]})[_0xa147('0x13')](function(_0x5228c4){_0x1ba9ec[_0xa147('0x24')]=_0x5228c4;if(_0x3b8ba3[_0xa147('0x50')]['includeAll']){_0x487220['include']=[{'all':!![]}];}return db[_0xa147('0x76')][_0xa147('0x70')](_0x487220);})[_0xa147('0x13')](function(_0x1be898){_0x1ba9ec[_0xa147('0x71')]=_0x1be898;return _0x1ba9ec;});}})['then'](respondWithFilteredResult(_0x44eb95,_0x487220))[_0xa147('0x1e')](handleError(_0x44eb95,null));};exports[_0xa147('0x77')]=function(_0x45fd2e,_0x277436){return db[_0xa147('0x5e')][_0xa147('0x64')]({'where':{'id':_0x45fd2e['params']['id']}})[_0xa147('0x13')](handleEntityNotFound(_0x277436,null))[_0xa147('0x13')](function(_0x18a9ce){if(_0x18a9ce){return _0x18a9ce[_0xa147('0x77')](_0x45fd2e['query']['ids']);}})['then'](respondWithStatusCode(_0x277436,null))[_0xa147('0x1e')](handleError(_0x277436,null));};exports[_0xa147('0x6d')]=function(_0x21ca9d,_0x5f47eb){var _0x4ad333={'name':_0x21ca9d[_0xa147('0x65')][_0xa147('0x2e')],'key':_0x21ca9d['body']['key'],'provider':_0x21ca9d['body'][_0xa147('0x67')]==='custom'?null:_0x21ca9d[_0xa147('0x65')][_0xa147('0x67')],'email':_0x21ca9d[_0xa147('0x65')][_0xa147('0x78')],'ListId':_0x21ca9d[_0xa147('0x65')]['ListId'],'active':!_[_0xa147('0x79')](_0x21ca9d[_0xa147('0x65')]['active'])?_0x21ca9d['body'][_0xa147('0x7a')]:!![],'description':_0x21ca9d[_0xa147('0x65')]['description']||null};var _0xdbefd7=getAuthenticationOptions(_0x4ad333[_0xa147('0x67')],_0x21ca9d[_0xa147('0x65')]);_0x4ad333['Imap']=_0xdbefd7['Imap'];_0x4ad333[_0xa147('0x45')]=_0xdbefd7[_0xa147('0x45')];return db[_0xa147('0x5e')]['create'](_0x4ad333,{'include':[{'model':db[_0xa147('0x48')],'as':_0xa147('0x45')},{'model':db[_0xa147('0x47')],'as':_0xa147('0x44')}]})['then'](function(_0x5c8845){var _0x41244f=_0x21ca9d[_0xa147('0x3b')][_0xa147('0x29')]({'plain':!![]});if(!_0x41244f)throw new Error('Unable\x20to\x20retrieve\x20the\x20current\x20user');if(_0x41244f['role']===_0xa147('0x3b')){var _0x152a96=_0x5c8845[_0xa147('0x29')]({'plain':!![]});return db[_0xa147('0x7b')][_0xa147('0x64')]({'where':{'name':_0xa147('0x2a'),'userProfileId':_0x41244f['userProfileId']},'raw':!![]})[_0xa147('0x13')](function(_0x7f1c77){if(_0x7f1c77&&_0x7f1c77[_0xa147('0x7c')]===0x0){return db[_0xa147('0x2b')][_0xa147('0x6d')]({'name':_0x152a96[_0xa147('0x2e')],'resourceId':_0x152a96['id'],'type':_0x7f1c77[_0xa147('0x2e')],'sectionId':_0x7f1c77['id']},{})[_0xa147('0x13')](function(){return _0x5c8845;});}else{return _0x5c8845;}})[_0xa147('0x1e')](function(_0x170bd4){logger['error'](_0xa147('0x7d'),_0x170bd4);throw _0x170bd4;});}return _0x5c8845;})[_0xa147('0x13')](respondWithResult(_0x5f47eb,0xc9))[_0xa147('0x1e')](handleError(_0x5f47eb,null));};exports[_0xa147('0x7e')]=function(_0x2cd1ff,_0x132217){return db[_0xa147('0x5e')][_0xa147('0x75')]({'where':{'id':_0x2cd1ff[_0xa147('0x60')]['id']}})['then'](handleEntityNotFound(_0x132217,null))[_0xa147('0x13')](function(_0x9933c9){if(_0x9933c9){return _0x9933c9[_0xa147('0x7e')]();}return null;})[_0xa147('0x13')](respondWithResult(_0x132217,null))[_0xa147('0x1e')](handleError(_0x132217,null));};exports['addImap']=function(_0x5344be,_0x4c5d61){if(_0x5344be[_0xa147('0x65')]['id']){delete _0x5344be[_0xa147('0x65')]['id'];}return db[_0xa147('0x5e')][_0xa147('0x64')]({'where':{'id':_0x5344be[_0xa147('0x60')]['id']}})[_0xa147('0x13')](handleEntityNotFound(_0x4c5d61,null))[_0xa147('0x13')](function(_0x9c8993){if(_0x9c8993){_0x5344be[_0xa147('0x65')][_0xa147('0x6b')]=_0x9c8993['id'];return db[_0xa147('0x47')]['create'](_0x5344be[_0xa147('0x65')]);}})[_0xa147('0x13')](respondWithResult(_0x4c5d61,null))['catch'](handleError(_0x4c5d61,null));};exports[_0xa147('0x7f')]=function(_0x1f917c,_0x3a0d57){return db[_0xa147('0x5e')][_0xa147('0x75')]({'where':{'id':_0x1f917c[_0xa147('0x60')]['id']}})[_0xa147('0x13')](handleEntityNotFound(_0x3a0d57,null))[_0xa147('0x13')](function(_0x22bea5){if(_0x22bea5){return _0x22bea5[_0xa147('0x80')](null);}return null;})[_0xa147('0x13')](respondWithStatusCode(_0x3a0d57,null))['catch'](handleError(_0x3a0d57,null));};exports[_0xa147('0x81')]=function(_0x4e8853,_0x110e93){return db[_0xa147('0x5e')][_0xa147('0x75')]({'where':{'id':_0x4e8853[_0xa147('0x60')]['id']}})['then'](handleEntityNotFound(_0x110e93,null))['then'](function(_0x10d2d5){if(_0x10d2d5){return _0x10d2d5[_0xa147('0x81')]();}return null;})[_0xa147('0x13')](respondWithResult(_0x110e93,null))[_0xa147('0x1e')](handleError(_0x110e93,null));};exports[_0xa147('0x82')]=function(_0x16b222,_0x57517c){if(_0x16b222['body']['id']){delete _0x16b222[_0xa147('0x65')]['id'];}return db[_0xa147('0x5e')][_0xa147('0x64')]({'where':{'id':_0x16b222['params']['id']}})['then'](handleEntityNotFound(_0x57517c,null))[_0xa147('0x13')](function(_0x494df4){if(_0x494df4){_0x16b222[_0xa147('0x65')][_0xa147('0x6b')]=_0x494df4['id'];return db[_0xa147('0x48')][_0xa147('0x6d')](_0x16b222[_0xa147('0x65')]);}})[_0xa147('0x13')](respondWithResult(_0x57517c,null))[_0xa147('0x1e')](handleError(_0x57517c,null));};exports[_0xa147('0x83')]=function(_0xebf484,_0x2398a0){return db['MailAccount']['findOne']({'where':{'id':_0xebf484[_0xa147('0x60')]['id']}})[_0xa147('0x13')](handleEntityNotFound(_0x2398a0,null))[_0xa147('0x13')](function(_0x3ee0fe){if(_0x3ee0fe){return _0x3ee0fe[_0xa147('0x84')](null);}return null;})['then'](respondWithStatusCode(_0x2398a0,null))[_0xa147('0x1e')](handleError(_0x2398a0,null));};exports[_0xa147('0x85')]=function(_0xc45d42,_0x24114d){return db[_0xa147('0x86')]['find']({'where':{'id':_0xc45d42[_0xa147('0x60')]['id']}})[_0xa147('0x13')](handleEntityNotFound(_0x24114d,null))['then'](function(_0x362db7){if(_0x362db7){return _0x362db7[_0xa147('0x85')](_0xc45d42[_0xa147('0x65')][_0xa147('0x72')],_[_0xa147('0x87')](_0xc45d42[_0xa147('0x65')],[_0xa147('0x72'),'id'])||{});}})[_0xa147('0x13')](respondWithResult(_0x24114d,null))['catch'](handleError(_0x24114d,null));};exports[_0xa147('0x88')]=function(_0x3ebc34,_0x206810){var _0x318d85={'raw':![],'where':{}};var _0x3c590d={};var _0x4c2240={'count':0x0,'rows':[]};return db[_0xa147('0x5e')][_0xa147('0x75')]({'where':{'id':_0x3ebc34[_0xa147('0x60')]['id']}})['then'](handleEntityNotFound(_0x206810,null))['then'](function(_0x3285a9){if(_0x3285a9){_0x3c590d[_0xa147('0x4e')]=_[_0xa147('0x61')](db[_0xa147('0x86')]['rawAttributes']);_0x3c590d['query']=_['keys'](_0x3ebc34[_0xa147('0x50')]);_0x3c590d[_0xa147('0x59')]=_[_0xa147('0x51')](_0x3c590d[_0xa147('0x4e')],_0x3c590d[_0xa147('0x50')]);_0x318d85[_0xa147('0x52')]=_[_0xa147('0x51')](_0x3c590d[_0xa147('0x4e')],qs[_0xa147('0x53')](_0x3ebc34[_0xa147('0x50')]['fields']));_0x318d85['attributes']=_0x318d85[_0xa147('0x52')][_0xa147('0x62')]?_0x318d85['attributes']:_0x3c590d[_0xa147('0x4e')];if(!_0x3ebc34['query'][_0xa147('0x54')](_0xa147('0x55'))){_0x318d85[_0xa147('0x22')]=qs[_0xa147('0x22')](_0x3ebc34['query'][_0xa147('0x22')]);_0x318d85[_0xa147('0x21')]=qs[_0xa147('0x21')](_0x3ebc34['query']['offset']);}_0x318d85[_0xa147('0x56')]=qs[_0xa147('0x57')](_0x3ebc34[_0xa147('0x50')][_0xa147('0x57')]);_0x318d85[_0xa147('0x58')]=qs[_0xa147('0x59')](_[_0xa147('0x6f')](_0x3ebc34[_0xa147('0x50')],_0x3c590d[_0xa147('0x59')]));_0x318d85['where']['MailAccountId']=_0x3285a9['id'];if(_0x3ebc34[_0xa147('0x50')][_0xa147('0x5b')]){_0x318d85[_0xa147('0x58')]=_[_0xa147('0x5a')](_0x318d85['where'],{'$or':_['map'](_0x318d85[_0xa147('0x52')],function(_0x3b4126){var _0x42f2ce={};_0x42f2ce[_0x3b4126]={'$like':'%'+_0x3ebc34[_0xa147('0x50')]['filter']+'%'};return _0x42f2ce;})});}_0x318d85=_['merge']({},_0x318d85,_0x3ebc34[_0xa147('0x5c')]);return db[_0xa147('0x86')][_0xa147('0x24')]({'where':_0x318d85[_0xa147('0x58')]})[_0xa147('0x13')](function(_0x149053){_0x4c2240['count']=_0x149053;if(_0x3ebc34['query'][_0xa147('0x5d')]){_0x318d85[_0xa147('0x63')]=[{'model':db[_0xa147('0x89')],'as':_0xa147('0x8a'),'required':![]},{'model':db[_0xa147('0x8b')],'as':_0xa147('0x8c'),'attributes':[_0xa147('0x2e'),_0xa147('0x8d'),_0xa147('0x8e')],'required':![]},{'model':db[_0xa147('0x8f')],'as':_0xa147('0x90'),'attributes':['id',_0xa147('0x2e'),_0xa147('0x91')],'where':_0x3ebc34[_0xa147('0x50')]['tag']?{'id':_0x3ebc34[_0xa147('0x50')][_0xa147('0x92')]}:undefined,'required':_0x3ebc34['query'][_0xa147('0x92')]?!![]:![]}];}return db[_0xa147('0x86')][_0xa147('0x70')](_0x318d85);})[_0xa147('0x13')](function(_0x5e0c9f){_0x4c2240[_0xa147('0x71')]=_0x5e0c9f;return _0x4c2240;});}})[_0xa147('0x13')](respondWithFilteredResult(_0x206810,_0x318d85))[_0xa147('0x1e')](handleError(_0x206810,null));};exports['addApplications']=function addApplications(_0x2dcac4,_0x191206){var _0x2be5d5=_0x2dcac4[_0xa147('0x60')]['id'];var _0x915fdf=_0x2dcac4[_0xa147('0x65')];var _0x2562ed=0xc8;var _0x3a68aa=null;return db[_0xa147('0x93')]['transaction']({'isolationLevel':db[_0xa147('0x93')][_0xa147('0x94')]['ISOLATION_LEVELS'][_0xa147('0x95')]},function(_0x3a856d){return db['MailAccount'][_0xa147('0x75')]({'where':{'id':_0x2be5d5},'transaction':_0x3a856d})[_0xa147('0x13')](function(_0x2d8413){if(_0x2d8413){return db[_0xa147('0x96')][_0xa147('0x28')]({'where':{'MailAccountId':_0x2be5d5},'transaction':_0x3a856d})['then'](function(){var _0x385ede=_[_0xa147('0x4f')](_0x915fdf,function(_0x1edfdb){_0x1edfdb[_0xa147('0x6b')]=_0x2be5d5;return _0x1edfdb;});return db[_0xa147('0x96')][_0xa147('0x97')](_0x385ede,{'transaction':_0x3a856d});});}else{_0x2562ed=0x194;_0x3a68aa=[];}});})[_0xa147('0x13')](function(){if(_0x2562ed!==0x194){return db[_0xa147('0x96')][_0xa147('0x98')]({'where':{'MailAccountId':_0x2be5d5},'order':_0xa147('0x99')})[_0xa147('0x13')](function(_0xf08e2b){_0x3a68aa=_0xf08e2b;});}})['catch'](function(_0x23228b){_0x2562ed=0x1f4;logger['error'](_0x23228b[_0xa147('0x2d')]);if(_0x23228b[_0xa147('0x2e')]){delete _0x23228b['name'];}_0x3a68aa=_0x23228b;})['finally'](function(){if(_0x3a68aa===null){_0x191206['sendStatus'](_0x2562ed);}else{if(_0x2562ed===0x1f4){_0x191206[_0xa147('0x20')](_0x2562ed)[_0xa147('0x2f')](_0x3a68aa);}else{_0x191206[_0xa147('0x20')](_0x2562ed)[_0xa147('0x26')](_0x3a68aa);}}});};exports[_0xa147('0x9a')]=function(_0x4afe4a,_0xa34c20){var _0x1d9ea3={};var _0x4b747d={};var _0x33a83c;var _0x5a464;return db[_0xa147('0x5e')][_0xa147('0x75')]({'where':{'id':_0x4afe4a['params']['id']}})[_0xa147('0x13')](handleEntityNotFound(_0xa34c20,null))[_0xa147('0x13')](function(_0x18d78b){if(_0x18d78b){_0x33a83c=_0x18d78b;_0x4b747d[_0xa147('0x4e')]=_[_0xa147('0x61')](db[_0xa147('0x96')][_0xa147('0x4b')]);_0x4b747d[_0xa147('0x50')]=_[_0xa147('0x61')](_0x4afe4a[_0xa147('0x50')]);_0x4b747d[_0xa147('0x59')]=_[_0xa147('0x51')](_0x4b747d[_0xa147('0x4e')],_0x4b747d[_0xa147('0x50')]);_0x1d9ea3[_0xa147('0x52')]=_['intersection'](_0x4b747d[_0xa147('0x4e')],qs[_0xa147('0x53')](_0x4afe4a[_0xa147('0x50')][_0xa147('0x53')]));_0x1d9ea3[_0xa147('0x52')]=_0x1d9ea3[_0xa147('0x52')][_0xa147('0x62')]?_0x1d9ea3['attributes']:_0x4b747d[_0xa147('0x4e')];_0x1d9ea3[_0xa147('0x56')]=qs[_0xa147('0x57')](_0x4afe4a[_0xa147('0x50')][_0xa147('0x57')]);_0x1d9ea3['where']=qs[_0xa147('0x59')](_[_0xa147('0x6f')](_0x4afe4a[_0xa147('0x50')],_0x4b747d[_0xa147('0x59')]));if(_0x4afe4a['query'][_0xa147('0x5b')]){_0x1d9ea3[_0xa147('0x58')]=_[_0xa147('0x5a')](_0x1d9ea3[_0xa147('0x58')],{'$or':_[_0xa147('0x4f')](_0x1d9ea3['attributes'],function(_0x494478){var _0xb1d5b7={};_0xb1d5b7[_0x494478]={'$like':'%'+_0x4afe4a[_0xa147('0x50')]['filter']+'%'};return _0xb1d5b7;})});}_0x1d9ea3=_[_0xa147('0x5a')]({},_0x1d9ea3,_0x4afe4a[_0xa147('0x5c')]);return _0x33a83c[_0xa147('0x9a')](_0x1d9ea3);}})['then'](function(_0x380f5e){if(_0x380f5e){_0x5a464=_0x380f5e['length'];if(!_0x4afe4a['query']['hasOwnProperty'](_0xa147('0x55'))){_0x1d9ea3['limit']=qs[_0xa147('0x22')](_0x4afe4a[_0xa147('0x50')][_0xa147('0x22')]);_0x1d9ea3[_0xa147('0x21')]=qs[_0xa147('0x21')](_0x4afe4a[_0xa147('0x50')][_0xa147('0x21')]);}return _0x33a83c['getApplications'](_0x1d9ea3);}})[_0xa147('0x13')](function(_0xe0151d){if(_0xe0151d){return _0xe0151d?{'count':_0x5a464,'rows':_0xe0151d}:null;}})[_0xa147('0x13')](respondWithResult(_0xa34c20,null))[_0xa147('0x1e')](handleError(_0xa34c20,null));};exports[_0xa147('0x9b')]=function(_0x398b9a,_0x50a5b5){var _0x1dcb58={'raw':!![],'where':{}};var _0x46c21a={};var _0x532af3={'count':0x0,'rows':[]};return db[_0xa147('0x5e')]['findOne']({'where':{'id':_0x398b9a['params']['id']}})[_0xa147('0x13')](handleEntityNotFound(_0x50a5b5,null))[_0xa147('0x13')](function(_0xe7dedf){if(_0xe7dedf){_0x46c21a[_0xa147('0x4e')]=_['keys'](db['MailMessage'][_0xa147('0x4b')]);_0x46c21a[_0xa147('0x50')]=_[_0xa147('0x61')](_0x398b9a['query']);_0x46c21a['filters']=_[_0xa147('0x51')](_0x46c21a[_0xa147('0x4e')],_0x46c21a[_0xa147('0x50')]);_0x1dcb58['attributes']=_[_0xa147('0x51')](_0x46c21a[_0xa147('0x4e')],qs[_0xa147('0x53')](_0x398b9a['query'][_0xa147('0x53')]));_0x1dcb58[_0xa147('0x52')]=_0x1dcb58[_0xa147('0x52')][_0xa147('0x62')]?_0x1dcb58[_0xa147('0x52')]:_0x46c21a[_0xa147('0x4e')];if(!_0x398b9a[_0xa147('0x50')]['hasOwnProperty'](_0xa147('0x55'))){_0x1dcb58['limit']=qs[_0xa147('0x22')](_0x398b9a['query'][_0xa147('0x22')]);_0x1dcb58[_0xa147('0x21')]=qs[_0xa147('0x21')](_0x398b9a[_0xa147('0x50')][_0xa147('0x21')]);}_0x1dcb58[_0xa147('0x56')]=qs[_0xa147('0x57')](_0x398b9a['query'][_0xa147('0x57')]);_0x1dcb58['where']=qs['filters'](_['pick'](_0x398b9a[_0xa147('0x50')],_0x46c21a[_0xa147('0x59')]));_0x1dcb58[_0xa147('0x58')][_0xa147('0x6b')]=_0xe7dedf['id'];if(_0x398b9a['query'][_0xa147('0x5b')]){_0x1dcb58[_0xa147('0x58')]=_['merge'](_0x1dcb58[_0xa147('0x58')],{'$or':_['map'](_0x1dcb58[_0xa147('0x52')],function(_0x59ca97){var _0x232be0={};_0x232be0[_0x59ca97]={'$like':'%'+_0x398b9a[_0xa147('0x50')][_0xa147('0x5b')]+'%'};return _0x232be0;})});}if(_0x398b9a[_0xa147('0x50')][_0xa147('0x9c')]){var _0x5d1523=_0x398b9a['query'][_0xa147('0x9c')][_0xa147('0x9d')](',');var _0x1b02e3={};_0x1b02e3[_0x5d1523[0x0]]={'$gte':moment(_0x5d1523[0x1])[_0xa147('0x9e')](_0xa147('0x9f'))};_0x1dcb58[_0xa147('0x58')]=_[_0xa147('0x5a')](_0x1dcb58['where'],_0x1b02e3);}_0x1dcb58=_[_0xa147('0x5a')]({},_0x1dcb58,_0x398b9a[_0xa147('0x5c')]);return db[_0xa147('0xa0')]['count']({'where':_0x1dcb58['where']})[_0xa147('0x13')](function(_0x1c3a03){_0x532af3['count']=_0x1c3a03;if(_0x398b9a['query'][_0xa147('0x5d')]){_0x1dcb58[_0xa147('0x63')]=[{'all':!![]}];}return db[_0xa147('0xa0')][_0xa147('0x70')](_0x1dcb58);})['then'](function(_0x5ed4d1){if(_0x398b9a['query']['inlineCss']==='true'){for(var _0x933513=0x0;_0x933513<_0x5ed4d1['length'];_0x933513++){_0x5ed4d1[_0x933513][_0xa147('0x65')]=juice(_0x5ed4d1[_0x933513][_0xa147('0x65')]);}}_0x532af3[_0xa147('0x71')]=_0x5ed4d1;return _0x532af3;});}})[_0xa147('0x13')](respondWithFilteredResult(_0x50a5b5,_0x1dcb58))[_0xa147('0x1e')](handleError(_0x50a5b5,null));};exports[_0xa147('0x2f')]=function(_0x5b52fa,_0x186beb){var _0x37d975,_0x152a4a={},_0x486cf8;if(_0x5b52fa[_0xa147('0x65')]['to']){_0x486cf8=_0x5b52fa['body']['to'][_0xa147('0x9d')](',')[0x0];}return db[_0xa147('0x5e')]['find']({'where':{'id':_0x5b52fa[_0xa147('0x60')]['id']},'include':[{'model':db[_0xa147('0xa1')],'as':_0xa147('0xa2'),'include':[{'model':db[_0xa147('0x89')],'as':_0xa147('0xa3'),'where':{'email':_0x486cf8},'limit':0x1,'order':[['updatedAt',_0xa147('0xa4')]]}]},{'model':db[_0xa147('0x48')],'as':_0xa147('0x45'),'raw':!![],'include':[{'model':db[_0xa147('0xa5')],'as':_0xa147('0xa5'),'raw':!![]}]}]})[_0xa147('0x13')](handleEntityNotFound(_0x186beb,null))[_0xa147('0x13')](function(_0xb270d2){if(!_0xb270d2)return;_0x37d975=_0xb270d2;if(!_0xb270d2[_0xa147('0x45')])throw new Error(_0xa147('0xa6'));if(_[_0xa147('0x79')](_0x5b52fa[_0xa147('0x65')]['from'])){_0x5b52fa[_0xa147('0x65')][_0xa147('0xa7')]=util[_0xa147('0x9e')](_0xa147('0xa8'),_0xb270d2[_0xa147('0x2e')],_0xb270d2['email']||_0xb270d2[_0xa147('0x45')][_0xa147('0x3b')]);}if(_0x5b52fa[_0xa147('0x65')]['attachments']&&_0x5b52fa[_0xa147('0x65')]['attachments'][_0xa147('0x62')]){for(var _0x14c9d2=0x0;_0x14c9d2<_0x5b52fa[_0xa147('0x65')][_0xa147('0xa9')][_0xa147('0x62')];_0x14c9d2+=0x1){_0x5b52fa[_0xa147('0x65')][_0xa147('0xa9')][_0x14c9d2]={'filename':_0x5b52fa[_0xa147('0x65')][_0xa147('0xa9')][_0x14c9d2][_0xa147('0x2e')],'path':path[_0xa147('0xaa')](config[_0xa147('0xab')],_0xa147('0xac'),_0x5b52fa[_0xa147('0x65')][_0xa147('0xa9')][_0x14c9d2][_0xa147('0xad')])};}}var _0x49499b=_0xb270d2[_0xa147('0xae')]();return respondWithRpcPromise(_0xa147('0xaf'),'sendMail',{'account':_0x49499b,'message':_0x5b52fa[_0xa147('0x65')]});})['then'](function(_0x571578){if(!_0x571578)return;_0x152a4a=_0x571578;if(!_0x37d975['List'])throw new Error(_0xa147('0xb0'));if(_0x37d975[_0xa147('0xa2')][_0xa147('0xa3')][_0xa147('0x62')])return _0x37d975[_0xa147('0xa2')][_0xa147('0xa3')][0x0];return db[_0xa147('0x89')][_0xa147('0x6d')](_[_0xa147('0x9')](_0x5b52fa[_0xa147('0x65')],{'firstName':_0x5b52fa['body']['to'],'email':_0x5b52fa[_0xa147('0x65')]['to'],'phone':_0x5b52fa[_0xa147('0x65')]['to'],'ListId':_0x37d975[_0xa147('0xb1')]}));})[_0xa147('0x13')](function(_0x3af4c7){if(!_0x3af4c7)return;var _0x4c1743={'UserId':_0x5b52fa['user']['id'],'ContactId':_0x3af4c7['id'],'MailAccountId':_0x37d975['id'],'inReplyTo':_0x152a4a[_0xa147('0xb2')],'to':_0x5b52fa[_0xa147('0x65')]['from'],'cc':_0x5b52fa[_0xa147('0x65')]['cc'],'subject':_0x5b52fa[_0xa147('0x65')][_0xa147('0xb3')],'attach':_0x5b52fa[_0xa147('0x65')][_0xa147('0xb4')],'firstMsgDirection':'out','lastMsgAt':moment()['format'](_0xa147('0x9f')),'lastMsgDirection':_0xa147('0xb5'),'Messages':[_[_0xa147('0x5a')](_0x5b52fa['body'],{'messageId':_0x152a4a[_0xa147('0xb2')],'sentAt':moment()[_0xa147('0x9e')](_0xa147('0x9f')),'read':!![],'MailAccountId':_0x37d975['id'],'UserId':_0x5b52fa['user']['id'],'ContactId':_0x3af4c7['id']})]};if(_0x5b52fa[_0xa147('0x65')][_0xa147('0xb6')]){_0x4c1743=_[_0xa147('0x5a')](_0x4c1743,_0x5b52fa[_0xa147('0x65')]['Interaction']);}return db['MailInteraction'][_0xa147('0x6d')](_0x4c1743,{'include':[{'model':db['MailMessage'],'as':'Messages'}]});})[_0xa147('0x13')](respondWithResult(_0x186beb,null))[_0xa147('0x1e')](handleError(_0x186beb,null));};exports[_0xa147('0xb7')]=function(_0x160c77,_0x1c67e9){return db['MailAccount'][_0xa147('0x64')]({'where':{'id':_0x160c77['params']['id']},'include':[{'model':db[_0xa147('0x48')],'as':_0xa147('0x45'),'raw':!![],'include':[{'model':db[_0xa147('0xa5')],'as':'CloudProvider','raw':!![]}]}]})['then'](handleEntityNotFound(_0x1c67e9,null))[_0xa147('0x13')](function(_0x46d1db){if(!_0x46d1db[_0xa147('0x45')])return;var _0x265826=_0x46d1db[_0xa147('0xae')]();return respondWithRpcPromise(_0xa147('0xb8'),_0xa147('0xb7'),{'account':_0x265826});})['then'](respondWithResult(_0x1c67e9,null))[_0xa147('0x1e')](handleError(_0x1c67e9,null));};exports['destroy']=function(_0x1d5d3b,_0x4a8073){return db[_0xa147('0x5e')][_0xa147('0x64')]({'where':{'id':_0x1d5d3b['params']['id']}})['then'](handleEntityNotFound(_0x4a8073,null))['then'](function(_0x2cf601){if(_0x2cf601&&_0x2cf601[_0xa147('0x42')]){throw new db[(_0xa147('0xb9'))][(_0xa147('0xba'))](_0xa147('0xbb'));}return _0x2cf601;})[_0xa147('0x13')](removeEntity(_0x4a8073,null))[_0xa147('0x1e')](handleError(_0x4a8073,null));};exports[_0xa147('0xbc')]=function(_0x32833d,_0x42addc){return db[_0xa147('0x5e')][_0xa147('0x64')]({'where':{'id':_0x32833d[_0xa147('0x60')]['id']}})['then'](handleEntityNotFound(_0x42addc,null))[_0xa147('0x13')](function(_0xf95b73){if(_0xf95b73){return _0xf95b73[_0xa147('0xbc')](_0x32833d[_0xa147('0x65')]['ids'],_['omit'](_0x32833d[_0xa147('0x65')],['ids','id'])||{})['spread'](function(_0x125c06){for(var _0x129af3=0x0;_0x129af3<_0x32833d[_0xa147('0x65')][_0xa147('0x72')][_0xa147('0x62')];_0x129af3+=0x1){socket[_0xa147('0xbd')]('userMailAccount:save',{'UserId':Number(_0x32833d[_0xa147('0x65')][_0xa147('0x72')][_0x129af3]),'MailAccountId':Number(_0x32833d[_0xa147('0x60')]['id'])});}return _0x125c06;});}})[_0xa147('0x13')](respondWithResult(_0x42addc,null))[_0xa147('0x1e')](handleError(_0x42addc,null));};exports[_0xa147('0xbe')]=function(_0x40da1f,_0x3780dc){return db[_0xa147('0x5e')][_0xa147('0x64')]({'where':{'id':_0x40da1f[_0xa147('0x60')]['id']}})[_0xa147('0x13')](handleEntityNotFound(_0x3780dc,null))[_0xa147('0x13')](function(_0x1bc3ba){if(_0x1bc3ba){return _0x1bc3ba[_0xa147('0xbe')](_0x40da1f['query'][_0xa147('0x72')])[_0xa147('0x13')](function(){if(_['isArray'](_0x40da1f['query'][_0xa147('0x72')])){for(var _0x3dd1a0=0x0;_0x3dd1a0<_0x40da1f[_0xa147('0x50')][_0xa147('0x72')]['length'];_0x3dd1a0+=0x1){socket[_0xa147('0xbd')]('userMailAccount:remove',{'UserId':Number(_0x40da1f['query'][_0xa147('0x72')][_0x3dd1a0]),'MailAccountId':Number(_0x40da1f[_0xa147('0x60')]['id'])});}}else{socket[_0xa147('0xbd')](_0xa147('0xbf'),{'UserId':Number(_0x40da1f['query']['ids']),'MailAccountId':Number(_0x40da1f['params']['id'])});}});}})[_0xa147('0x13')](respondWithStatusCode(_0x3780dc,null))[_0xa147('0x1e')](handleError(_0x3780dc,null));};exports[_0xa147('0xc0')]=function(_0x5bc0d5,_0x24b4d0){var _0x48ee0b={};var _0x22ef2f={};var _0x2d749e;var _0x5440e6;return db['MailAccount'][_0xa147('0x75')]({'where':{'id':_0x5bc0d5[_0xa147('0x60')]['id']}})['then'](handleEntityNotFound(_0x24b4d0,null))[_0xa147('0x13')](function(_0x2144d5){if(_0x2144d5){_0x2d749e=_0x2144d5;_0x22ef2f['model']=_['keys'](db[_0xa147('0x8b')][_0xa147('0x4b')]);_0x22ef2f[_0xa147('0x50')]=_[_0xa147('0x61')](_0x5bc0d5[_0xa147('0x50')]);_0x22ef2f['filters']=_[_0xa147('0x51')](_0x22ef2f[_0xa147('0x4e')],_0x22ef2f['query']);_0x48ee0b['attributes']=_[_0xa147('0x51')](_0x22ef2f[_0xa147('0x4e')],qs[_0xa147('0x53')](_0x5bc0d5['query'][_0xa147('0x53')]));_0x48ee0b['attributes']=_0x48ee0b[_0xa147('0x52')]['length']?_0x48ee0b[_0xa147('0x52')]:_0x22ef2f[_0xa147('0x4e')];_0x48ee0b[_0xa147('0x56')]=qs[_0xa147('0x57')](_0x5bc0d5[_0xa147('0x50')][_0xa147('0x57')]);_0x48ee0b[_0xa147('0x58')]=qs[_0xa147('0x59')](_[_0xa147('0x6f')](_0x5bc0d5[_0xa147('0x50')],_0x22ef2f['filters']));if(_0x5bc0d5['query'][_0xa147('0x5b')]){_0x48ee0b[_0xa147('0x58')]=_['merge'](_0x48ee0b[_0xa147('0x58')],{'$or':_[_0xa147('0x4f')](_0x48ee0b[_0xa147('0x52')],function(_0x2fd4a6){var _0x2b926f={};_0x2b926f[_0x2fd4a6]={'$like':'%'+_0x5bc0d5[_0xa147('0x50')][_0xa147('0x5b')]+'%'};return _0x2b926f;})});}_0x48ee0b=_['merge']({},_0x48ee0b,_0x5bc0d5[_0xa147('0x5c')]);return _0x2d749e['getAgents'](_0x48ee0b);}})[_0xa147('0x13')](function(_0x53178a){if(_0x53178a){_0x5440e6=_0x53178a[_0xa147('0x62')];if(!_0x5bc0d5[_0xa147('0x50')]['hasOwnProperty'](_0xa147('0x55'))){_0x48ee0b[_0xa147('0x22')]=qs[_0xa147('0x22')](_0x5bc0d5[_0xa147('0x50')][_0xa147('0x22')]);_0x48ee0b[_0xa147('0x21')]=qs['offset'](_0x5bc0d5[_0xa147('0x50')][_0xa147('0x21')]);}return _0x2d749e['getAgents'](_0x48ee0b);}})[_0xa147('0x13')](function(_0x568a7e){if(_0x568a7e){return _0x568a7e?{'count':_0x5440e6,'rows':_0x568a7e}:null;}})[_0xa147('0x13')](respondWithResult(_0x24b4d0,null))['catch'](handleError(_0x24b4d0,null));}; \ No newline at end of file diff --git a/server/api/mailAccount/mailAccount.events.js b/server/api/mailAccount/mailAccount.events.js index fc9a38f..46b5909 100644 --- a/server/api/mailAccount/mailAccount.events.js +++ b/server/api/mailAccount/mailAccount.events.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x9d5c=['MailAccount','setMaxListeners','update','remove','emit','hasOwnProperty','hook','exports','events'];(function(_0xb8235b,_0xcf2632){var _0x3cbba1=function(_0x105a4a){while(--_0x105a4a){_0xb8235b['push'](_0xb8235b['shift']());}};_0x3cbba1(++_0xcf2632);}(_0x9d5c,0x98));var _0xc9d5=function(_0x43f3af,_0x1a2ff9){_0x43f3af=_0x43f3af-0x0;var _0x1e5599=_0x9d5c[_0x43f3af];return _0x1e5599;};'use strict';var EventEmitter=require(_0xc9d5('0x0'));var MailAccount=require('../../mysqldb')['db'][_0xc9d5('0x1')];var MailAccountEvents=new EventEmitter();MailAccountEvents[_0xc9d5('0x2')](0x0);var events={'afterCreate':'save','afterUpdate':_0xc9d5('0x3'),'afterDestroy':_0xc9d5('0x4')};function emitEvent(_0x41e0e4){return function(_0x5535d9,_0x44a6eb,_0x33b626){MailAccountEvents['emit'](_0x41e0e4+':'+_0x5535d9['id'],_0x5535d9);MailAccountEvents[_0xc9d5('0x5')](_0x41e0e4,_0x5535d9);_0x33b626(null);};}for(var e in events){if(events[_0xc9d5('0x6')](e)){var event=events[e];MailAccount[_0xc9d5('0x7')](e,emitEvent(event));}}module[_0xc9d5('0x8')]=MailAccountEvents; \ No newline at end of file +var _0x7097=['MailAccount','update','remove','emit','hasOwnProperty','exports','events','../../mysqldb'];(function(_0x1b944d,_0x14ac0f){var _0x1caddc=function(_0x3290b3){while(--_0x3290b3){_0x1b944d['push'](_0x1b944d['shift']());}};_0x1caddc(++_0x14ac0f);}(_0x7097,0x1be));var _0x7709=function(_0x3a515c,_0x14709a){_0x3a515c=_0x3a515c-0x0;var _0x5be4a5=_0x7097[_0x3a515c];return _0x5be4a5;};'use strict';var EventEmitter=require(_0x7709('0x0'));var MailAccount=require(_0x7709('0x1'))['db'][_0x7709('0x2')];var MailAccountEvents=new EventEmitter();MailAccountEvents['setMaxListeners'](0x0);var events={'afterCreate':'save','afterUpdate':_0x7709('0x3'),'afterDestroy':_0x7709('0x4')};function emitEvent(_0x1f3e60){return function(_0x48396f,_0x335a2c,_0x4f076c){MailAccountEvents[_0x7709('0x5')](_0x1f3e60+':'+_0x48396f['id'],_0x48396f);MailAccountEvents['emit'](_0x1f3e60,_0x48396f);_0x4f076c(null);};}for(var e in events){if(events[_0x7709('0x6')](e)){var event=events[e];MailAccount['hook'](e,emitEvent(event));}}module[_0x7709('0x7')]=MailAccountEvents; \ No newline at end of file diff --git a/server/api/mailAccount/mailAccount.model.js b/server/api/mailAccount/mailAccount.model.js index 3fa41c9..6541efb 100644 --- a/server/api/mailAccount/mailAccount.model.js +++ b/server/api/mailAccount/mailAccount.model.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x300b=['service','host','Smtp','port','secure','authentication','modernAuthentication','OAuth2','user','CloudProvider','data5','auth','define','MailAccount','mail_accounts','provider'];(function(_0x3758aa,_0x4d62f1){var _0x3b0b88=function(_0x48ad30){while(--_0x48ad30){_0x3758aa['push'](_0x3758aa['shift']());}};_0x3b0b88(++_0x4d62f1);}(_0x300b,0xac));var _0xb300=function(_0x4af0c6,_0x39838a){_0x4af0c6=_0x4af0c6-0x0;var _0x27799=_0x300b[_0x4af0c6];return _0x27799;};'use strict';var attributes=require('./mailAccount.attributes');module['exports']=function(_0x3af39e){return _0x3af39e[_0xb300('0x0')](_0xb300('0x1'),attributes,{'tableName':_0xb300('0x2'),'paranoid':![],'indexes':[],'timestamps':!![],'instanceMethods':{'getSmtpOptions':function(){var _0x3aa638=this;var _0x1be1ee={'id':_0x3aa638['id'],'tls':{'rejectUnauthorized':![]}};if(_0x3aa638[_0xb300('0x3')]!=='custom'){_0x1be1ee[_0xb300('0x4')]=_0x3aa638[_0xb300('0x3')];}else{_0x1be1ee[_0xb300('0x5')]=_0x3aa638[_0xb300('0x6')][_0xb300('0x5')];_0x1be1ee[_0xb300('0x7')]=_0x3aa638[_0xb300('0x6')][_0xb300('0x7')];_0x1be1ee[_0xb300('0x8')]=_0x3aa638['Smtp'][_0xb300('0x8')];}if(_0x3aa638[_0xb300('0x6')][_0xb300('0x9')]){if(_0x3aa638[_0xb300('0x6')][_0xb300('0xa')]){if(!_0x3aa638[_0xb300('0x6')]['CloudProvider'])throw new Error('Cloud\x20Provider\x20configuration\x20not\x20found');_0x1be1ee['auth']={'type':_0xb300('0xb'),'user':_0x3aa638[_0xb300('0x6')][_0xb300('0xc')],'accessToken':_0x3aa638['Smtp'][_0xb300('0xd')][_0xb300('0xe')]};}else{_0x1be1ee[_0xb300('0xf')]={'user':_0x3aa638[_0xb300('0x6')][_0xb300('0xc')],'pass':_0x3aa638['Smtp']['pass']};}}return _0x1be1ee;}}});}; \ No newline at end of file +var _0x1ca2=['Smtp','port','secure','authentication','modernAuthentication','CloudProvider','Cloud\x20Provider\x20configuration\x20not\x20found','auth','user','data5','pass','./mailAccount.attributes','define','mail_accounts','provider','custom','service','host'];(function(_0x1e2eb5,_0x2846bd){var _0x19408b=function(_0x4fd183){while(--_0x4fd183){_0x1e2eb5['push'](_0x1e2eb5['shift']());}};_0x19408b(++_0x2846bd);}(_0x1ca2,0x1df));var _0x21ca=function(_0x240700,_0x13e7d9){_0x240700=_0x240700-0x0;var _0x51530c=_0x1ca2[_0x240700];return _0x51530c;};'use strict';var attributes=require(_0x21ca('0x0'));module['exports']=function(_0x3d11c5){return _0x3d11c5[_0x21ca('0x1')]('MailAccount',attributes,{'tableName':_0x21ca('0x2'),'paranoid':![],'indexes':[],'timestamps':!![],'instanceMethods':{'getSmtpOptions':function(){var _0x256d6d=this;var _0x17a529={'id':_0x256d6d['id'],'tls':{'rejectUnauthorized':![]}};if(_0x256d6d[_0x21ca('0x3')]!==_0x21ca('0x4')){_0x17a529[_0x21ca('0x5')]=_0x256d6d[_0x21ca('0x3')];}else{_0x17a529[_0x21ca('0x6')]=_0x256d6d[_0x21ca('0x7')][_0x21ca('0x6')];_0x17a529[_0x21ca('0x8')]=_0x256d6d[_0x21ca('0x7')][_0x21ca('0x8')];_0x17a529['secure']=_0x256d6d[_0x21ca('0x7')][_0x21ca('0x9')];}if(_0x256d6d[_0x21ca('0x7')][_0x21ca('0xa')]){if(_0x256d6d['Smtp'][_0x21ca('0xb')]){if(!_0x256d6d[_0x21ca('0x7')][_0x21ca('0xc')])throw new Error(_0x21ca('0xd'));_0x17a529[_0x21ca('0xe')]={'type':'OAuth2','user':_0x256d6d['Smtp'][_0x21ca('0xf')],'accessToken':_0x256d6d[_0x21ca('0x7')][_0x21ca('0xc')][_0x21ca('0x10')]};}else{_0x17a529[_0x21ca('0xe')]={'user':_0x256d6d[_0x21ca('0x7')][_0x21ca('0xf')],'pass':_0x256d6d['Smtp'][_0x21ca('0x11')]};}}return _0x17a529;}}});}; \ No newline at end of file diff --git a/server/api/mailAccount/mailAccount.rpc.js b/server/api/mailAccount/mailAccount.rpc.js index f50a4f9..0622be1 100644 --- a/server/api/mailAccount/mailAccount.rpc.js +++ b/server/api/mailAccount/mailAccount.rpc.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x2ef3=['result','catch','MailAccount','findAll','options','attributes','limit','model','include','map','GetMailAccount','find','raw','smtp','setDataValue','smtpOptions','ShowMailAccount','stringify','NotifyMailAccount','body','mail','difference','keys','CmContact','updatedAt','CompanyId','ListId','isNil','from','from\x20is\x20mandatory','body\x20is\x20mandatory\x20and\x20not\x20empty','includes','mapKey','mapKey\x20invalid,\x20please\x20use\x20one\x20of\x20these:\x20','CmList','List','Contacts','DESC','MailApplication','Applications','MailServerOut','Smtp','CloudProvider','get','account','omit','getSmtpOptions','applications','list','orderBy','priority','autoclose','push','length','close','*,*,*,*','defaults','create','List\x20not\x20found','messageId','generate','attach','MailInteraction','update','subject','format','YYYY-MM-DD\x20HH:mm:ss','interaction','created','attachments','originTo','ChatWebsiteId','Email','ChatOfflineMessageId','UserId','User','unshift','agent','name','waitForTheAssignedAgent','Start','startRouting','lodash','moment','bluebird','randomstring','ioredis','../../mysqldb','rpc','../../config/environment','client','http','redis','localhost','socket.io-emitter','./mailAccount.socket','register','then','info','MailAccount,\x20%s,\x20%s','debug','request\x20sent','error','message'];(function(_0x38a1f7,_0x503714){var _0x58f485=function(_0x541a78){while(--_0x541a78){_0x38a1f7['push'](_0x38a1f7['shift']());}};_0x58f485(++_0x503714);}(_0x2ef3,0xba));var _0x32ef=function(_0x21c975,_0x19a3fe){_0x21c975=_0x21c975-0x0;var _0x3754f3=_0x2ef3[_0x21c975];return _0x3754f3;};'use strict';var _=require(_0x32ef('0x0'));var moment=require(_0x32ef('0x1'));var BPromise=require(_0x32ef('0x2'));var rs=require(_0x32ef('0x3'));var Redis=require(_0x32ef('0x4'));var db=require(_0x32ef('0x5'))['db'];var logger=require('../../config/logger')(_0x32ef('0x6'));var config=require(_0x32ef('0x7'));var jayson=require('jayson/promise');var client=jayson[_0x32ef('0x8')][_0x32ef('0x9')]({'port':0x232c});config['redis']=_['defaults'](config[_0x32ef('0xa')],{'host':_0x32ef('0xb'),'port':0x18eb});var socket=require(_0x32ef('0xc'))(new Redis(config[_0x32ef('0xa')]));require(_0x32ef('0xd'))[_0x32ef('0xe')](socket);function respondWithRpcPromise(_0x2484a0,_0x2bbb50,_0x28275c){return new BPromise(function(_0x77df79,_0x56eb42){return client['request'](_0x2484a0,_0x28275c)[_0x32ef('0xf')](function(_0x33281d){logger[_0x32ef('0x10')](_0x32ef('0x11'),_0x2bbb50,'request\x20sent');logger[_0x32ef('0x12')]('MailAccount,\x20%s,\x20%s,\x20%s',_0x2bbb50,_0x32ef('0x13'),JSON['stringify'](_0x33281d));if(_0x33281d[_0x32ef('0x14')]){if(_0x33281d[_0x32ef('0x14')]['code']===0x1f4){logger['error'](_0x32ef('0x11'),_0x2bbb50,_0x33281d['error'][_0x32ef('0x15')]);return _0x56eb42(_0x33281d[_0x32ef('0x14')][_0x32ef('0x15')]);}logger[_0x32ef('0x14')]('MailAccount,\x20%s,\x20%s',_0x2bbb50,_0x33281d['error']['message']);return _0x77df79(_0x33281d[_0x32ef('0x14')][_0x32ef('0x15')]);}else{logger[_0x32ef('0x10')]('MailAccount,\x20%s,\x20%s',_0x2bbb50,'request\x20sent');_0x77df79(_0x33281d[_0x32ef('0x16')][_0x32ef('0x15')]);}})[_0x32ef('0x17')](function(_0x57863c){logger[_0x32ef('0x14')](_0x32ef('0x11'),_0x2bbb50,_0x57863c);_0x56eb42(_0x57863c);});});}exports['GetMailAccount']=function(_0x304505){var _0x314ef1=this;return new Promise(function(_0x26aff3,_0x251084){return db[_0x32ef('0x18')][_0x32ef('0x19')]({'raw':_0x304505['options']?_0x304505[_0x32ef('0x1a')]['raw']===undefined?!![]:![]:!![],'where':_0x304505[_0x32ef('0x1a')]?_0x304505[_0x32ef('0x1a')]['where']||null:null,'attributes':_0x304505[_0x32ef('0x1a')]?_0x304505[_0x32ef('0x1a')][_0x32ef('0x1b')]||null:null,'limit':_0x304505['options']?_0x304505['options'][_0x32ef('0x1c')]||null:null,'include':_0x304505[_0x32ef('0x1a')]?_0x304505[_0x32ef('0x1a')]['include']?_['map'](_0x304505[_0x32ef('0x1a')]['include'],function(_0x51a412){return{'model':db[_0x51a412[_0x32ef('0x1d')]],'as':_0x51a412['as'],'attributes':_0x51a412[_0x32ef('0x1b')],'include':_0x51a412[_0x32ef('0x1e')]?_[_0x32ef('0x1f')](_0x51a412[_0x32ef('0x1e')],function(_0x234175){return{'model':db[_0x234175[_0x32ef('0x1d')]],'as':_0x234175['as'],'attributes':_0x234175[_0x32ef('0x1b')],'include':_0x234175[_0x32ef('0x1e')]?_[_0x32ef('0x1f')](_0x234175[_0x32ef('0x1e')],function(_0xba4b3f){return{'model':db[_0xba4b3f['model']],'as':_0xba4b3f['as'],'attributes':_0xba4b3f[_0x32ef('0x1b')]};}):[]};}):[]};}):[]:[]})[_0x32ef('0xf')](function(_0x5a04cd){logger[_0x32ef('0x10')](_0x32ef('0x20'),_0x304505);logger[_0x32ef('0x12')](_0x32ef('0x20'),_0x304505,JSON['stringify'](_0x5a04cd));_0x26aff3(_0x5a04cd);})[_0x32ef('0x17')](function(_0x22bf86){logger[_0x32ef('0x14')](_0x32ef('0x20'),_0x22bf86[_0x32ef('0x15')],_0x304505);_0x251084(_0x314ef1[_0x32ef('0x14')](0x1f4,_0x22bf86[_0x32ef('0x15')]));});});};exports['ShowMailAccount']=function(_0x36ac37){var _0x537214=this;return new Promise(function(_0x38bf73,_0x2b6c6a){return db['MailAccount'][_0x32ef('0x21')]({'raw':_0x36ac37[_0x32ef('0x1a')]?_0x36ac37[_0x32ef('0x1a')][_0x32ef('0x22')]===undefined?!![]:![]:!![],'where':_0x36ac37[_0x32ef('0x1a')]?_0x36ac37['options']['where']||null:null,'attributes':_0x36ac37[_0x32ef('0x1a')]?_0x36ac37['options'][_0x32ef('0x1b')]||null:null,'include':_0x36ac37[_0x32ef('0x1a')]?_0x36ac37[_0x32ef('0x1a')][_0x32ef('0x1e')]?_[_0x32ef('0x1f')](_0x36ac37[_0x32ef('0x1a')]['include'],function(_0x482d3a){return{'model':db[_0x482d3a['model']],'as':_0x482d3a['as'],'attributes':_0x482d3a[_0x32ef('0x1b')],'include':_0x482d3a[_0x32ef('0x1e')]?_[_0x32ef('0x1f')](_0x482d3a['include'],function(_0x4fb402){return{'model':db[_0x4fb402[_0x32ef('0x1d')]],'as':_0x4fb402['as'],'attributes':_0x4fb402[_0x32ef('0x1b')],'include':_0x4fb402[_0x32ef('0x1e')]?_['map'](_0x4fb402['include'],function(_0xcbdec8){return{'model':db[_0xcbdec8[_0x32ef('0x1d')]],'as':_0xcbdec8['as'],'attributes':_0xcbdec8[_0x32ef('0x1b')]};}):[]};}):[]};}):[]:[]})[_0x32ef('0xf')](function(_0x3a7c49){if(_0x36ac37[_0x32ef('0x1a')][_0x32ef('0x23')]===!![])_0x3a7c49[_0x32ef('0x24')](_0x32ef('0x25'),_0x3a7c49['getSmtpOptions']());logger[_0x32ef('0x10')](_0x32ef('0x26'),_0x36ac37);logger[_0x32ef('0x12')]('ShowMailAccount',_0x36ac37,JSON[_0x32ef('0x27')](_0x3a7c49));_0x38bf73(_0x3a7c49);})[_0x32ef('0x17')](function(_0x879e33){logger[_0x32ef('0x14')](_0x32ef('0x26'),_0x879e33[_0x32ef('0x15')],_0x36ac37);_0x2b6c6a(_0x537214[_0x32ef('0x14')](0x1f4,_0x879e33[_0x32ef('0x15')]));});});};exports[_0x32ef('0x28')]=function(_0x57a3c0){var _0xb4db74=this;return new Promise(function(_0x4615b4,_0x48e071){var _0x3cac2e={'body':_0x57a3c0[_0x32ef('0x29')],'channel':_0x32ef('0x2a')};var _0x1733e3=_[_0x32ef('0x2b')](_[_0x32ef('0x2c')](db[_0x32ef('0x2d')]['rawAttributes']),['createdAt',_0x32ef('0x2e'),_0x32ef('0x2f'),_0x32ef('0x30')]);var _0x765c63=![];if(_0x57a3c0['body']['id']){delete _0x57a3c0[_0x32ef('0x29')]['id'];}if(_[_0x32ef('0x31')](_0x57a3c0['body'][_0x32ef('0x32')])){return _0x48e071(_0xb4db74['error'](0x1f4,_0x32ef('0x33')));}if(_[_0x32ef('0x31')](_0x57a3c0[_0x32ef('0x29')][_0x32ef('0x29')])||_0x57a3c0[_0x32ef('0x29')][_0x32ef('0x29')]===''){return _0x48e071(_0xb4db74[_0x32ef('0x14')](0x1f4,_0x32ef('0x34')));}if(_[_0x32ef('0x31')](_0x57a3c0[_0x32ef('0x29')]['mapKey'])){return _0x48e071(_0xb4db74[_0x32ef('0x14')](0x1f4,'mapKey\x20is\x20mandatory,\x20please\x20use\x20one\x20of\x20these:\x20'+_0x1733e3));}if(!_[_0x32ef('0x35')](_0x1733e3,_0x57a3c0[_0x32ef('0x29')][_0x32ef('0x36')])){return _0x48e071(_0xb4db74['error'](0x1f4,_0x32ef('0x37')+_0x1733e3));}var _0x230ac9={};_0x230ac9[_0x57a3c0[_0x32ef('0x29')][_0x32ef('0x36')]]=_0x57a3c0[_0x32ef('0x29')][_0x32ef('0x32')];return db[_0x32ef('0x18')]['find']({'where':{'id':_0x57a3c0['account']['id']},'include':[{'model':db[_0x32ef('0x38')],'as':_0x32ef('0x39'),'include':[{'model':db[_0x32ef('0x2d')],'as':_0x32ef('0x3a'),'where':_0x230ac9,'limit':0x1,'order':[[_0x32ef('0x2e'),_0x32ef('0x3b')]]}]},{'model':db[_0x32ef('0x3c')],'as':_0x32ef('0x3d')},{'model':db[_0x32ef('0x3e')],'as':_0x32ef('0x3f'),'include':[{'model':db[_0x32ef('0x40')],'as':_0x32ef('0x40')}]}]})[_0x32ef('0xf')](function(_0x4c2534){if(_0x4c2534&&_0x4c2534[_0x32ef('0x39')]){var _0x12fbd7=_0x4c2534[_0x32ef('0x41')]({'plain':!![]});_0x3cac2e[_0x32ef('0x42')]=_[_0x32ef('0x43')](_0x12fbd7,[_0x32ef('0x3d'),_0x32ef('0x39')]);_0x3cac2e[_0x32ef('0x42')][_0x32ef('0x25')]=_0x4c2534[_0x32ef('0x44')]();_0x3cac2e[_0x32ef('0x45')]=_0x12fbd7[_0x32ef('0x3d')];_0x3cac2e[_0x32ef('0x46')]=_0x12fbd7[_0x32ef('0x39')];_0x3cac2e[_0x32ef('0x45')]=_[_0x32ef('0x47')](_0x3cac2e[_0x32ef('0x45')],[_0x32ef('0x48')],['asc']);if(_0x3cac2e['account']&&_0x3cac2e[_0x32ef('0x42')][_0x32ef('0x49')]){_0x3cac2e[_0x32ef('0x45')][_0x32ef('0x4a')]({'id':0x0,'priority':_0x3cac2e[_0x32ef('0x45')][_0x32ef('0x4b')]+0x1,'app':_0x32ef('0x4c'),'appdata':_0x32ef('0x49'),'interval':_0x32ef('0x4d')});}if(_0x3cac2e[_0x32ef('0x42')][_0x32ef('0x3d')]){delete _0x3cac2e['account'][_0x32ef('0x3d')];}if(_0x3cac2e[_0x32ef('0x42')][_0x32ef('0x39')]){delete _0x3cac2e[_0x32ef('0x42')][_0x32ef('0x39')];}if(_0x12fbd7[_0x32ef('0x39')]['Contacts'][_0x32ef('0x4b')]){return _0x12fbd7[_0x32ef('0x39')][_0x32ef('0x3a')][0x0];}var _0x56b7ce=_[_0x32ef('0x4e')](_0x57a3c0['body'],{'firstName':_0x57a3c0[_0x32ef('0x29')][_0x32ef('0x32')],'ListId':_0x12fbd7['ListId']});_0x56b7ce[_0x57a3c0[_0x32ef('0x29')]['mapKey']]=_0x57a3c0[_0x32ef('0x29')][_0x32ef('0x32')];return db[_0x32ef('0x2d')][_0x32ef('0x4f')](_0x56b7ce);}else{throw new Error(_0x32ef('0x50'));}})[_0x32ef('0xf')](function(_0x42c7f4){_0x3cac2e['contact']=_0x42c7f4;if(_0x42c7f4){if(!_0x57a3c0['body'][_0x32ef('0x15')]['messageId']){_0x57a3c0['body'][_0x32ef('0x15')][_0x32ef('0x51')]=rs[_0x32ef('0x52')]()+'\x20'+_0x57a3c0[_0x32ef('0x29')][_0x32ef('0x15')][_0x32ef('0x32')];}var _0x316547={'ContactId':_0x42c7f4['id'],'MailAccountId':_0x57a3c0[_0x32ef('0x42')]['id'],'inReplyTo':_0x57a3c0[_0x32ef('0x29')][_0x32ef('0x15')]['messageId'],'to':_0x57a3c0['body'][_0x32ef('0x15')][_0x32ef('0x32')],'cc':_0x57a3c0['body'][_0x32ef('0x15')]['cc'],'subject':_0x57a3c0[_0x32ef('0x29')][_0x32ef('0x15')]['subject'],'attach':_0x57a3c0[_0x32ef('0x29')][_0x32ef('0x15')][_0x32ef('0x53')],'lastMsgAt':moment()['format']('YYYY-MM-DD\x20HH:mm:ss'),'lastMsgDirection':'in'};return db[_0x32ef('0x54')]['find']({'where':{'closed':![],'MailAccountId':_0x57a3c0[_0x32ef('0x42')]['id']},'include':[{'model':db['MailMessage'],'as':'Messages','attributes':[_0x32ef('0x51')],'where':{'messageId':_0x57a3c0[_0x32ef('0x29')][_0x32ef('0x15')]['inReplyTo']}}]})[_0x32ef('0xf')](function(_0x222b24){if(_0x222b24){return[_0x222b24,![]];}return db[_0x32ef('0x54')]['create'](_0x316547)[_0x32ef('0xf')](function(_0x12b7f8){return[_0x12b7f8,!![]];});});}else{throw new Error('Contact\x20not\x20found');}})['spread'](function(_0x2e20dc,_0x3a6697){if(_0x2e20dc){_0x765c63=_0x3a6697;if(!_0x3a6697){return _0x2e20dc[_0x32ef('0x55')]({'inReplyTo':_0x57a3c0[_0x32ef('0x29')][_0x32ef('0x15')][_0x32ef('0x51')],'to':_0x57a3c0['body'][_0x32ef('0x15')][_0x32ef('0x32')],'cc':_0x57a3c0[_0x32ef('0x29')][_0x32ef('0x15')]['cc'],'subject':_0x57a3c0[_0x32ef('0x29')][_0x32ef('0x15')][_0x32ef('0x56')],'attach':_0x2e20dc[_0x32ef('0x53')]?_0x2e20dc[_0x32ef('0x53')]:_0x57a3c0['body'][_0x32ef('0x15')][_0x32ef('0x53')],'substatus':null,'substatusAt':moment()[_0x32ef('0x57')](_0x32ef('0x58')),'lastMsgAt':moment()[_0x32ef('0x57')]('YYYY-MM-DD\x20HH:mm:ss'),'lastMsgDirection':'in'});}else{return _0x2e20dc;}}})['then'](function(_0x2125de){_0x3cac2e[_0x32ef('0x59')]=_0x2125de[_0x32ef('0x41')]({'plain':!![]});_0x3cac2e[_0x32ef('0x59')][_0x32ef('0x5a')]=_0x765c63;return db['MailMessage'][_0x32ef('0x4f')]({'body':_0x57a3c0['body'][_0x32ef('0x29')],'MailAccountId':_0x57a3c0[_0x32ef('0x42')]['id'],'MailInteractionId':_0x2125de['id'],'direction':'in','ContactId':_0x3cac2e['contact']['id'],'messageId':_0x57a3c0['body'][_0x32ef('0x15')][_0x32ef('0x51')],'from':_0x57a3c0[_0x32ef('0x29')]['message']['from'],'to':_0x57a3c0[_0x32ef('0x29')][_0x32ef('0x15')]['to'],'cc':_0x57a3c0[_0x32ef('0x29')][_0x32ef('0x15')]['cc'],'subject':_0x57a3c0['body'][_0x32ef('0x15')][_0x32ef('0x56')],'attach':_0x57a3c0[_0x32ef('0x29')][_0x32ef('0x15')][_0x32ef('0x53')],'Attachments':_0x57a3c0[_0x32ef('0x29')][_0x32ef('0x15')][_0x32ef('0x5b')],'originTo':_0x57a3c0[_0x32ef('0x29')][_0x32ef('0x15')][_0x32ef('0x5c')],'originCc':_0x57a3c0[_0x32ef('0x29')]['message']['originCc'],'bcc':_0x57a3c0[_0x32ef('0x29')][_0x32ef('0x15')]['bcc'],'ChatWebsiteId':_0x57a3c0[_0x32ef('0x29')]['message'][_0x32ef('0x5d')]||null,'originChannel':_0x57a3c0[_0x32ef('0x29')][_0x32ef('0x15')]['originChannel']||_0x32ef('0x5e'),'ChatOfflineMessageId':_0x57a3c0['body'][_0x32ef('0x15')][_0x32ef('0x5f')]||null},{'include':[{'model':db['Attachment'],'as':'Attachments'}]});})[_0x32ef('0xf')](function(_0x5970db){_0x3cac2e[_0x32ef('0x15')]=_0x5970db;if(_0x3cac2e['interaction'][_0x32ef('0x60')]){return db[_0x32ef('0x61')][_0x32ef('0x21')]({'attributes':['id','name'],'where':{'id':_0x3cac2e['interaction']['UserId']}})[_0x32ef('0xf')](function(_0x5e5766){if(_0x5e5766){_0x3cac2e[_0x32ef('0x45')][_0x32ef('0x62')]({'id':0x0,'priority':0x0,'app':_0x32ef('0x63'),'appdata':_0x5e5766[_0x32ef('0x64')]+','+(_0x3cac2e[_0x32ef('0x42')][_0x32ef('0x65')]||0xa),'interval':'*,*,*,*'});}return respondWithRpcPromise(_0x32ef('0x66'),'startRouting',_0x3cac2e);});}return respondWithRpcPromise('Start',_0x32ef('0x67'),_0x3cac2e);})['then'](function(_0x145e27){_0x4615b4(_0x145e27);})[_0x32ef('0x17')](function(_0x4d64ec){_0x48e071(_0xb4db74[_0x32ef('0x14')](0x1f4,_0x4d64ec[_0x32ef('0x15')]));});});}; \ No newline at end of file +var _0x7880=['info','ShowMailAccount','find','where','smtp','smtpOptions','NotifyMailAccount','mail','difference','keys','CmContact','rawAttributes','createdAt','updatedAt','CompanyId','body','isNil','from\x20is\x20mandatory','body\x20is\x20mandatory\x20and\x20not\x20empty','mapKey','mapKey\x20is\x20mandatory,\x20please\x20use\x20one\x20of\x20these:\x20','from','account','CmList','List','DESC','MailApplication','Applications','Smtp','CloudProvider','get','getSmtpOptions','applications','list','priority','asc','autoclose','push','length','close','*,*,*,*','Contacts','ListId','contact','messageId','generate','subject','attach','YYYY-MM-DD\x20HH:mm:ss','MailInteraction','MailMessage','inReplyTo','create','Contact\x20not\x20found','update','format','interaction','created','attachments','originTo','originCc','bcc','originChannel','Attachment','Attachments','UserId','User','unshift','agent','waitForTheAssignedAgent','Start','startRouting','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/logger','../../config/environment','jayson/promise','client','http','redis','defaults','localhost','socket.io-emitter','register','request','then','MailAccount,\x20%s,\x20%s','request\x20sent','debug','MailAccount,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','catch','GetMailAccount','MailAccount','options','raw','attributes','include','map','model'];(function(_0x3e19da,_0x5797a7){var _0x369c1c=function(_0x3d6820){while(--_0x3d6820){_0x3e19da['push'](_0x3e19da['shift']());}};_0x369c1c(++_0x5797a7);}(_0x7880,0x1f4));var _0x0788=function(_0x3be2e2,_0x5c166d){_0x3be2e2=_0x3be2e2-0x0;var _0x53b9c5=_0x7880[_0x3be2e2];return _0x53b9c5;};'use strict';var _=require('lodash');var moment=require(_0x0788('0x0'));var BPromise=require(_0x0788('0x1'));var rs=require(_0x0788('0x2'));var Redis=require(_0x0788('0x3'));var db=require(_0x0788('0x4'))['db'];var logger=require(_0x0788('0x5'))('rpc');var config=require(_0x0788('0x6'));var jayson=require(_0x0788('0x7'));var client=jayson[_0x0788('0x8')][_0x0788('0x9')]({'port':0x232c});config[_0x0788('0xa')]=_[_0x0788('0xb')](config[_0x0788('0xa')],{'host':_0x0788('0xc'),'port':0x18eb});var socket=require(_0x0788('0xd'))(new Redis(config[_0x0788('0xa')]));require('./mailAccount.socket')[_0x0788('0xe')](socket);function respondWithRpcPromise(_0x49f53b,_0xabaf81,_0x53b2f2){return new BPromise(function(_0x433c26,_0x3c6d18){return client[_0x0788('0xf')](_0x49f53b,_0x53b2f2)[_0x0788('0x10')](function(_0x469ebe){logger['info'](_0x0788('0x11'),_0xabaf81,_0x0788('0x12'));logger[_0x0788('0x13')](_0x0788('0x14'),_0xabaf81,_0x0788('0x12'),JSON[_0x0788('0x15')](_0x469ebe));if(_0x469ebe[_0x0788('0x16')]){if(_0x469ebe['error'][_0x0788('0x17')]===0x1f4){logger[_0x0788('0x16')](_0x0788('0x11'),_0xabaf81,_0x469ebe[_0x0788('0x16')]['message']);return _0x3c6d18(_0x469ebe[_0x0788('0x16')]['message']);}logger[_0x0788('0x16')](_0x0788('0x11'),_0xabaf81,_0x469ebe[_0x0788('0x16')][_0x0788('0x18')]);return _0x433c26(_0x469ebe[_0x0788('0x16')][_0x0788('0x18')]);}else{logger['info']('MailAccount,\x20%s,\x20%s',_0xabaf81,_0x0788('0x12'));_0x433c26(_0x469ebe[_0x0788('0x19')]['message']);}})[_0x0788('0x1a')](function(_0x415f19){logger[_0x0788('0x16')]('MailAccount,\x20%s,\x20%s',_0xabaf81,_0x415f19);_0x3c6d18(_0x415f19);});});}exports[_0x0788('0x1b')]=function(_0x3fb723){var _0x492c2c=this;return new Promise(function(_0x11ea01,_0x5173d6){return db[_0x0788('0x1c')]['findAll']({'raw':_0x3fb723[_0x0788('0x1d')]?_0x3fb723[_0x0788('0x1d')][_0x0788('0x1e')]===undefined?!![]:![]:!![],'where':_0x3fb723[_0x0788('0x1d')]?_0x3fb723[_0x0788('0x1d')]['where']||null:null,'attributes':_0x3fb723['options']?_0x3fb723[_0x0788('0x1d')][_0x0788('0x1f')]||null:null,'limit':_0x3fb723[_0x0788('0x1d')]?_0x3fb723[_0x0788('0x1d')]['limit']||null:null,'include':_0x3fb723['options']?_0x3fb723[_0x0788('0x1d')][_0x0788('0x20')]?_[_0x0788('0x21')](_0x3fb723['options']['include'],function(_0x240459){return{'model':db[_0x240459[_0x0788('0x22')]],'as':_0x240459['as'],'attributes':_0x240459['attributes'],'include':_0x240459['include']?_[_0x0788('0x21')](_0x240459[_0x0788('0x20')],function(_0x57fda1){return{'model':db[_0x57fda1[_0x0788('0x22')]],'as':_0x57fda1['as'],'attributes':_0x57fda1[_0x0788('0x1f')],'include':_0x57fda1[_0x0788('0x20')]?_[_0x0788('0x21')](_0x57fda1[_0x0788('0x20')],function(_0xb2f4a5){return{'model':db[_0xb2f4a5[_0x0788('0x22')]],'as':_0xb2f4a5['as'],'attributes':_0xb2f4a5[_0x0788('0x1f')]};}):[]};}):[]};}):[]:[]})['then'](function(_0x5a5178){logger[_0x0788('0x23')](_0x0788('0x1b'),_0x3fb723);logger['debug']('GetMailAccount',_0x3fb723,JSON[_0x0788('0x15')](_0x5a5178));_0x11ea01(_0x5a5178);})[_0x0788('0x1a')](function(_0x20fcd8){logger[_0x0788('0x16')](_0x0788('0x1b'),_0x20fcd8[_0x0788('0x18')],_0x3fb723);_0x5173d6(_0x492c2c[_0x0788('0x16')](0x1f4,_0x20fcd8[_0x0788('0x18')]));});});};exports[_0x0788('0x24')]=function(_0x85e579){var _0x5ec0ed=this;return new Promise(function(_0x2a08b7,_0x1aab6a){return db[_0x0788('0x1c')][_0x0788('0x25')]({'raw':_0x85e579[_0x0788('0x1d')]?_0x85e579[_0x0788('0x1d')][_0x0788('0x1e')]===undefined?!![]:![]:!![],'where':_0x85e579[_0x0788('0x1d')]?_0x85e579[_0x0788('0x1d')][_0x0788('0x26')]||null:null,'attributes':_0x85e579['options']?_0x85e579['options']['attributes']||null:null,'include':_0x85e579['options']?_0x85e579['options']['include']?_[_0x0788('0x21')](_0x85e579[_0x0788('0x1d')][_0x0788('0x20')],function(_0x574576){return{'model':db[_0x574576[_0x0788('0x22')]],'as':_0x574576['as'],'attributes':_0x574576[_0x0788('0x1f')],'include':_0x574576[_0x0788('0x20')]?_[_0x0788('0x21')](_0x574576['include'],function(_0x2ed940){return{'model':db[_0x2ed940['model']],'as':_0x2ed940['as'],'attributes':_0x2ed940[_0x0788('0x1f')],'include':_0x2ed940['include']?_[_0x0788('0x21')](_0x2ed940[_0x0788('0x20')],function(_0x498e16){return{'model':db[_0x498e16[_0x0788('0x22')]],'as':_0x498e16['as'],'attributes':_0x498e16[_0x0788('0x1f')]};}):[]};}):[]};}):[]:[]})['then'](function(_0x17240e){if(_0x85e579['options'][_0x0788('0x27')]===!![])_0x17240e['setDataValue'](_0x0788('0x28'),_0x17240e['getSmtpOptions']());logger[_0x0788('0x23')]('ShowMailAccount',_0x85e579);logger['debug'](_0x0788('0x24'),_0x85e579,JSON[_0x0788('0x15')](_0x17240e));_0x2a08b7(_0x17240e);})[_0x0788('0x1a')](function(_0x2d17b0){logger[_0x0788('0x16')]('ShowMailAccount',_0x2d17b0['message'],_0x85e579);_0x1aab6a(_0x5ec0ed['error'](0x1f4,_0x2d17b0['message']));});});};exports[_0x0788('0x29')]=function(_0x1202c4){var _0x45b247=this;return new Promise(function(_0x358a22,_0x362c49){var _0x5993ad={'body':_0x1202c4['body'],'channel':_0x0788('0x2a')};var _0x6770a8=_[_0x0788('0x2b')](_[_0x0788('0x2c')](db[_0x0788('0x2d')][_0x0788('0x2e')]),[_0x0788('0x2f'),_0x0788('0x30'),_0x0788('0x31'),'ListId']);var _0x5581e6=![];if(_0x1202c4[_0x0788('0x32')]['id']){delete _0x1202c4[_0x0788('0x32')]['id'];}if(_[_0x0788('0x33')](_0x1202c4['body']['from'])){return _0x362c49(_0x45b247['error'](0x1f4,_0x0788('0x34')));}if(_[_0x0788('0x33')](_0x1202c4[_0x0788('0x32')][_0x0788('0x32')])||_0x1202c4[_0x0788('0x32')][_0x0788('0x32')]===''){return _0x362c49(_0x45b247[_0x0788('0x16')](0x1f4,_0x0788('0x35')));}if(_['isNil'](_0x1202c4[_0x0788('0x32')][_0x0788('0x36')])){return _0x362c49(_0x45b247[_0x0788('0x16')](0x1f4,_0x0788('0x37')+_0x6770a8));}if(!_['includes'](_0x6770a8,_0x1202c4[_0x0788('0x32')][_0x0788('0x36')])){return _0x362c49(_0x45b247['error'](0x1f4,'mapKey\x20invalid,\x20please\x20use\x20one\x20of\x20these:\x20'+_0x6770a8));}var _0x524b43={};_0x524b43[_0x1202c4[_0x0788('0x32')]['mapKey']]=_0x1202c4[_0x0788('0x32')][_0x0788('0x38')];return db[_0x0788('0x1c')][_0x0788('0x25')]({'where':{'id':_0x1202c4[_0x0788('0x39')]['id']},'include':[{'model':db[_0x0788('0x3a')],'as':_0x0788('0x3b'),'include':[{'model':db[_0x0788('0x2d')],'as':'Contacts','where':_0x524b43,'limit':0x1,'order':[['updatedAt',_0x0788('0x3c')]]}]},{'model':db[_0x0788('0x3d')],'as':_0x0788('0x3e')},{'model':db['MailServerOut'],'as':_0x0788('0x3f'),'include':[{'model':db[_0x0788('0x40')],'as':_0x0788('0x40')}]}]})[_0x0788('0x10')](function(_0x2395ad){if(_0x2395ad&&_0x2395ad['List']){var _0x5c436a=_0x2395ad[_0x0788('0x41')]({'plain':!![]});_0x5993ad[_0x0788('0x39')]=_['omit'](_0x5c436a,[_0x0788('0x3e'),'List']);_0x5993ad[_0x0788('0x39')][_0x0788('0x28')]=_0x2395ad[_0x0788('0x42')]();_0x5993ad[_0x0788('0x43')]=_0x5c436a[_0x0788('0x3e')];_0x5993ad[_0x0788('0x44')]=_0x5c436a[_0x0788('0x3b')];_0x5993ad[_0x0788('0x43')]=_['orderBy'](_0x5993ad[_0x0788('0x43')],[_0x0788('0x45')],[_0x0788('0x46')]);if(_0x5993ad['account']&&_0x5993ad[_0x0788('0x39')][_0x0788('0x47')]){_0x5993ad['applications'][_0x0788('0x48')]({'id':0x0,'priority':_0x5993ad[_0x0788('0x43')][_0x0788('0x49')]+0x1,'app':_0x0788('0x4a'),'appdata':_0x0788('0x47'),'interval':_0x0788('0x4b')});}if(_0x5993ad['account']['Applications']){delete _0x5993ad[_0x0788('0x39')][_0x0788('0x3e')];}if(_0x5993ad['account'][_0x0788('0x3b')]){delete _0x5993ad[_0x0788('0x39')][_0x0788('0x3b')];}if(_0x5c436a[_0x0788('0x3b')][_0x0788('0x4c')][_0x0788('0x49')]){return _0x5c436a[_0x0788('0x3b')][_0x0788('0x4c')][0x0];}var _0x35f290=_[_0x0788('0xb')](_0x1202c4[_0x0788('0x32')],{'firstName':_0x1202c4[_0x0788('0x32')]['from'],'ListId':_0x5c436a[_0x0788('0x4d')]});_0x35f290[_0x1202c4[_0x0788('0x32')][_0x0788('0x36')]]=_0x1202c4['body'][_0x0788('0x38')];return db[_0x0788('0x2d')]['create'](_0x35f290);}else{throw new Error('List\x20not\x20found');}})[_0x0788('0x10')](function(_0x26826a){_0x5993ad[_0x0788('0x4e')]=_0x26826a;if(_0x26826a){if(!_0x1202c4[_0x0788('0x32')][_0x0788('0x18')][_0x0788('0x4f')]){_0x1202c4['body'][_0x0788('0x18')][_0x0788('0x4f')]=rs[_0x0788('0x50')]()+'\x20'+_0x1202c4['body']['message'][_0x0788('0x38')];}var _0x5419d9={'ContactId':_0x26826a['id'],'MailAccountId':_0x1202c4[_0x0788('0x39')]['id'],'inReplyTo':_0x1202c4[_0x0788('0x32')][_0x0788('0x18')][_0x0788('0x4f')],'to':_0x1202c4[_0x0788('0x32')][_0x0788('0x18')][_0x0788('0x38')],'cc':_0x1202c4[_0x0788('0x32')][_0x0788('0x18')]['cc'],'subject':_0x1202c4[_0x0788('0x32')]['message'][_0x0788('0x51')],'attach':_0x1202c4[_0x0788('0x32')][_0x0788('0x18')][_0x0788('0x52')],'lastMsgAt':moment()['format'](_0x0788('0x53')),'lastMsgDirection':'in'};return db[_0x0788('0x54')][_0x0788('0x25')]({'where':{'closed':![],'MailAccountId':_0x1202c4[_0x0788('0x39')]['id']},'include':[{'model':db[_0x0788('0x55')],'as':'Messages','attributes':[_0x0788('0x4f')],'where':{'messageId':_0x1202c4['body'][_0x0788('0x18')][_0x0788('0x56')]}}]})[_0x0788('0x10')](function(_0x47f22c){if(_0x47f22c){return[_0x47f22c,![]];}return db[_0x0788('0x54')][_0x0788('0x57')](_0x5419d9)[_0x0788('0x10')](function(_0x150403){return[_0x150403,!![]];});});}else{throw new Error(_0x0788('0x58'));}})['spread'](function(_0x25201f,_0x2dea6c){if(_0x25201f){_0x5581e6=_0x2dea6c;if(!_0x2dea6c){return _0x25201f[_0x0788('0x59')]({'inReplyTo':_0x1202c4['body']['message'][_0x0788('0x4f')],'to':_0x1202c4[_0x0788('0x32')][_0x0788('0x18')]['from'],'cc':_0x1202c4[_0x0788('0x32')][_0x0788('0x18')]['cc'],'subject':_0x1202c4[_0x0788('0x32')][_0x0788('0x18')]['subject'],'attach':_0x25201f['attach']?_0x25201f['attach']:_0x1202c4[_0x0788('0x32')][_0x0788('0x18')][_0x0788('0x52')],'substatus':null,'substatusAt':moment()['format']('YYYY-MM-DD\x20HH:mm:ss'),'lastMsgAt':moment()[_0x0788('0x5a')]('YYYY-MM-DD\x20HH:mm:ss'),'lastMsgDirection':'in'});}else{return _0x25201f;}}})[_0x0788('0x10')](function(_0x3d1181){_0x5993ad[_0x0788('0x5b')]=_0x3d1181[_0x0788('0x41')]({'plain':!![]});_0x5993ad[_0x0788('0x5b')][_0x0788('0x5c')]=_0x5581e6;return db[_0x0788('0x55')][_0x0788('0x57')]({'body':_0x1202c4[_0x0788('0x32')][_0x0788('0x32')],'MailAccountId':_0x1202c4['account']['id'],'MailInteractionId':_0x3d1181['id'],'direction':'in','ContactId':_0x5993ad[_0x0788('0x4e')]['id'],'messageId':_0x1202c4[_0x0788('0x32')]['message']['messageId'],'from':_0x1202c4[_0x0788('0x32')][_0x0788('0x18')][_0x0788('0x38')],'to':_0x1202c4[_0x0788('0x32')][_0x0788('0x18')]['to'],'cc':_0x1202c4[_0x0788('0x32')]['message']['cc'],'subject':_0x1202c4[_0x0788('0x32')][_0x0788('0x18')][_0x0788('0x51')],'attach':_0x1202c4[_0x0788('0x32')]['message'][_0x0788('0x52')],'Attachments':_0x1202c4[_0x0788('0x32')][_0x0788('0x18')][_0x0788('0x5d')],'originTo':_0x1202c4['body']['message'][_0x0788('0x5e')],'originCc':_0x1202c4[_0x0788('0x32')][_0x0788('0x18')][_0x0788('0x5f')],'bcc':_0x1202c4[_0x0788('0x32')][_0x0788('0x18')][_0x0788('0x60')],'ChatWebsiteId':_0x1202c4[_0x0788('0x32')][_0x0788('0x18')]['ChatWebsiteId']||null,'originChannel':_0x1202c4[_0x0788('0x32')][_0x0788('0x18')][_0x0788('0x61')]||'Email','ChatOfflineMessageId':_0x1202c4['body'][_0x0788('0x18')]['ChatOfflineMessageId']||null},{'include':[{'model':db[_0x0788('0x62')],'as':_0x0788('0x63')}]});})[_0x0788('0x10')](function(_0xa4b3f8){_0x5993ad[_0x0788('0x18')]=_0xa4b3f8;if(_0x5993ad[_0x0788('0x5b')][_0x0788('0x64')]){return db[_0x0788('0x65')][_0x0788('0x25')]({'attributes':['id','name'],'where':{'id':_0x5993ad[_0x0788('0x5b')][_0x0788('0x64')]}})[_0x0788('0x10')](function(_0x54fd89){if(_0x54fd89){_0x5993ad[_0x0788('0x43')][_0x0788('0x66')]({'id':0x0,'priority':0x0,'app':_0x0788('0x67'),'appdata':_0x54fd89['name']+','+(_0x5993ad[_0x0788('0x39')][_0x0788('0x68')]||0xa),'interval':_0x0788('0x4b')});}return respondWithRpcPromise(_0x0788('0x69'),_0x0788('0x6a'),_0x5993ad);});}return respondWithRpcPromise(_0x0788('0x69'),_0x0788('0x6a'),_0x5993ad);})[_0x0788('0x10')](function(_0x25058b){_0x358a22(_0x25058b);})['catch'](function(_0x471b3a){_0x362c49(_0x45b247[_0x0788('0x16')](0x1f4,_0x471b3a[_0x0788('0x18')]));});});}; \ No newline at end of file diff --git a/server/api/mailAccount/mailAccount.socket.js b/server/api/mailAccount/mailAccount.socket.js index 51ed55f..937f6be 100644 --- a/server/api/mailAccount/mailAccount.socket.js +++ b/server/api/mailAccount/mailAccount.socket.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xde4d=['register','length','mailAccount:','./mailAccount.events','save','remove','update'];(function(_0x3b9b1a,_0x1ad4fa){var _0x1c5c1e=function(_0x31fe34){while(--_0x31fe34){_0x3b9b1a['push'](_0x3b9b1a['shift']());}};_0x1c5c1e(++_0x1ad4fa);}(_0xde4d,0xf1));var _0xdde4=function(_0x62e7bc,_0x4057ae){_0x62e7bc=_0x62e7bc-0x0;var _0x147b35=_0xde4d[_0x62e7bc];return _0x147b35;};'use strict';var MailAccountEvents=require(_0xdde4('0x0'));var events=[_0xdde4('0x1'),_0xdde4('0x2'),_0xdde4('0x3')];function createListener(_0x2eb974,_0x1bcdca){return function(_0x51839f){_0x1bcdca['emit'](_0x2eb974,_0x51839f);};}function removeListener(_0x55ac7f,_0x570662){return function(){MailAccountEvents['removeListener'](_0x55ac7f,_0x570662);};}exports[_0xdde4('0x4')]=function(_0x4b8cbd){for(var _0x3d7216=0x0,_0x4aaec3=events[_0xdde4('0x5')];_0x3d7216<_0x4aaec3;_0x3d7216++){var _0x130f05=events[_0x3d7216];var _0x3b998e=createListener(_0xdde4('0x6')+_0x130f05,_0x4b8cbd);MailAccountEvents['on'](_0x130f05,_0x3b998e);}}; \ No newline at end of file +var _0xe19e=['register','length','mailAccount:','./mailAccount.events','save','remove','update','emit','removeListener'];(function(_0x1c8ebb,_0x54515c){var _0x33a55f=function(_0x354db6){while(--_0x354db6){_0x1c8ebb['push'](_0x1c8ebb['shift']());}};_0x33a55f(++_0x54515c);}(_0xe19e,0x93));var _0xee19=function(_0x518d1b,_0x1bd9f6){_0x518d1b=_0x518d1b-0x0;var _0x567a51=_0xe19e[_0x518d1b];return _0x567a51;};'use strict';var MailAccountEvents=require(_0xee19('0x0'));var events=[_0xee19('0x1'),_0xee19('0x2'),_0xee19('0x3')];function createListener(_0x244546,_0x49d80e){return function(_0x144537){_0x49d80e[_0xee19('0x4')](_0x244546,_0x144537);};}function removeListener(_0x56313e,_0x3bcf2c){return function(){MailAccountEvents[_0xee19('0x5')](_0x56313e,_0x3bcf2c);};}exports[_0xee19('0x6')]=function(_0x1cbde0){for(var _0x3529da=0x0,_0x855f38=events[_0xee19('0x7')];_0x3529da<_0x855f38;_0x3529da++){var _0x3fcf9d=events[_0x3529da];var _0x145f2=createListener(_0xee19('0x8')+_0x3fcf9d,_0x1cbde0);MailAccountEvents['on'](_0x3fcf9d,_0x145f2);}}; \ No newline at end of file diff --git a/server/api/mailApplication/index.js b/server/api/mailApplication/index.js index 18746ef..04c693c 100644 --- a/server/api/mailApplication/index.js +++ b/server/api/mailApplication/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xfe10=['show','delete','destroy','exports','multer','util','path','express','Router','../../components/auth/service','../../components/interaction/service','../../config/environment','get','/:id','isAuthenticated'];(function(_0x15291,_0x95ec05){var _0x2c0938=function(_0x17fc38){while(--_0x17fc38){_0x15291['push'](_0x15291['shift']());}};_0x2c0938(++_0x95ec05);}(_0xfe10,0x7c));var _0x0fe1=function(_0x2e4e08,_0x378833){_0x2e4e08=_0x2e4e08-0x0;var _0x1d772f=_0xfe10[_0x2e4e08];return _0x1d772f;};'use strict';var multer=require(_0x0fe1('0x0'));var util=require(_0x0fe1('0x1'));var path=require(_0x0fe1('0x2'));var timeout=require('connect-timeout');var express=require(_0x0fe1('0x3'));var router=express[_0x0fe1('0x4')]();var fs_extra=require('fs-extra');var auth=require(_0x0fe1('0x5'));var interaction=require(_0x0fe1('0x6'));var config=require(_0x0fe1('0x7'));var controller=require('./mailApplication.controller');router[_0x0fe1('0x8')](_0x0fe1('0x9'),auth[_0x0fe1('0xa')](),controller[_0x0fe1('0xb')]);router['put'](_0x0fe1('0x9'),auth['isAuthenticated'](),controller['update']);router[_0x0fe1('0xc')]('/:id',auth[_0x0fe1('0xa')](),controller[_0x0fe1('0xd')]);module[_0x0fe1('0xe')]=router; \ No newline at end of file +var _0x6172=['multer','util','path','Router','fs-extra','../../components/auth/service','../../components/interaction/service','./mailApplication.controller','get','/:id','isAuthenticated','show','update','delete','destroy','exports'];(function(_0x1dec69,_0x36180e){var _0x326a53=function(_0x3dc226){while(--_0x3dc226){_0x1dec69['push'](_0x1dec69['shift']());}};_0x326a53(++_0x36180e);}(_0x6172,0x1f0));var _0x2617=function(_0x321bb2,_0x202794){_0x321bb2=_0x321bb2-0x0;var _0x9c12ed=_0x6172[_0x321bb2];return _0x9c12ed;};'use strict';var multer=require(_0x2617('0x0'));var util=require(_0x2617('0x1'));var path=require(_0x2617('0x2'));var timeout=require('connect-timeout');var express=require('express');var router=express[_0x2617('0x3')]();var fs_extra=require(_0x2617('0x4'));var auth=require(_0x2617('0x5'));var interaction=require(_0x2617('0x6'));var config=require('../../config/environment');var controller=require(_0x2617('0x7'));router[_0x2617('0x8')](_0x2617('0x9'),auth[_0x2617('0xa')](),controller[_0x2617('0xb')]);router['put'](_0x2617('0x9'),auth['isAuthenticated'](),controller[_0x2617('0xc')]);router[_0x2617('0xd')](_0x2617('0x9'),auth['isAuthenticated'](),controller[_0x2617('0xe')]);module[_0x2617('0xf')]=router; \ No newline at end of file diff --git a/server/api/mailApplication/mailApplication.attributes.js b/server/api/mailApplication/mailApplication.attributes.js index 710e9e3..d73250b 100644 --- a/server/api/mailApplication/mailApplication.attributes.js +++ b/server/api/mailApplication/mailApplication.attributes.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xf586=['TEXT','*,*,*,*','sequelize','exports','INTEGER','STRING','noop'];(function(_0x7971bd,_0x1d2627){var _0x44a885=function(_0x107a4b){while(--_0x107a4b){_0x7971bd['push'](_0x7971bd['shift']());}};_0x44a885(++_0x1d2627);}(_0xf586,0x79));var _0x6f58=function(_0x2fdf82,_0x322e7c){_0x2fdf82=_0x2fdf82-0x0;var _0x2382f5=_0xf586[_0x2fdf82];return _0x2382f5;};'use strict';var Sequelize=require(_0x6f58('0x0'));module[_0x6f58('0x1')]={'priority':{'type':Sequelize[_0x6f58('0x2')],'allowNull':![]},'app':{'type':Sequelize[_0x6f58('0x3')],'allowNull':![],'defaultValue':_0x6f58('0x4')},'appdata':{'type':Sequelize[_0x6f58('0x5')]()},'description':{'type':Sequelize['STRING']},'interval':{'type':Sequelize[_0x6f58('0x3')],'defaultValue':_0x6f58('0x6')}}; \ No newline at end of file +var _0x1329=['TEXT','STRING','*,*,*,*','sequelize','exports','INTEGER','noop'];(function(_0x3dc203,_0x272419){var _0x28ad47=function(_0x4e354e){while(--_0x4e354e){_0x3dc203['push'](_0x3dc203['shift']());}};_0x28ad47(++_0x272419);}(_0x1329,0x10d));var _0x9132=function(_0x738858,_0x264a91){_0x738858=_0x738858-0x0;var _0x336686=_0x1329[_0x738858];return _0x336686;};'use strict';var Sequelize=require(_0x9132('0x0'));module[_0x9132('0x1')]={'priority':{'type':Sequelize[_0x9132('0x2')],'allowNull':![]},'app':{'type':Sequelize['STRING'],'allowNull':![],'defaultValue':_0x9132('0x3')},'appdata':{'type':Sequelize[_0x9132('0x4')]()},'description':{'type':Sequelize[_0x9132('0x5')]},'interval':{'type':Sequelize['STRING'],'defaultValue':_0x9132('0x6')}}; \ No newline at end of file diff --git a/server/api/mailApplication/mailApplication.controller.js b/server/api/mailApplication/mailApplication.controller.js index 87fe026..1d55660 100644 --- a/server/api/mailApplication/mailApplication.controller.js +++ b/server/api/mailApplication/mailApplication.controller.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xedd9=['query','filters','intersection','model','attributes','fields','length','includeAll','include','merge','options','find','catch','update','body','destroy','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','util','sox','to-csv','ejs','fs-extra','squel','jsforce','desk.js','querystring','ioredis','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/logger','api','../../config/environment','../../config/license/util','../../mysqldb','sendStatus','status','json','offset','undefined','limit','count','set','apply','then','end','error','stack','send','show','params','keys','MailApplication','rawAttributes'];(function(_0x62c958,_0x2bfdbc){var _0x57ec61=function(_0x5c0094){while(--_0x5c0094){_0x62c958['push'](_0x62c958['shift']());}};_0x57ec61(++_0x2bfdbc);}(_0xedd9,0xfc));var _0x9edd=function(_0x51f84a,_0x445f17){_0x51f84a=_0x51f84a-0x0;var _0x4ba63d=_0xedd9[_0x51f84a];return _0x4ba63d;};'use strict';var emlformat=require('eml-format');var rimraf=require(_0x9edd('0x0'));var zipdir=require(_0x9edd('0x1'));var jsonpatch=require(_0x9edd('0x2'));var rp=require(_0x9edd('0x3'));var moment=require(_0x9edd('0x4'));var BPromise=require(_0x9edd('0x5'));var Mustache=require(_0x9edd('0x6'));var util=require(_0x9edd('0x7'));var path=require('path');var sox=require(_0x9edd('0x8'));var csv=require(_0x9edd('0x9'));var ejs=require(_0x9edd('0xa'));var fs=require('fs');var fs_extra=require(_0x9edd('0xb'));var _=require('lodash');var squel=require(_0x9edd('0xc'));var crypto=require('crypto');var jsforce=require(_0x9edd('0xd'));var deskjs=require(_0x9edd('0xe'));var toCsv=require(_0x9edd('0x9'));var querystring=require(_0x9edd('0xf'));var Papa=require('papaparse');var Redis=require(_0x9edd('0x10'));var authService=require('../../components/auth/service');var qs=require(_0x9edd('0x11'));var as=require(_0x9edd('0x12'));var hardwareService=require('../../config/license/hardware');var logger=require(_0x9edd('0x13'))(_0x9edd('0x14'));var utils=require('../../config/utils');var config=require(_0x9edd('0x15'));var licenseUtil=require(_0x9edd('0x16'));var db=require(_0x9edd('0x17'))['db'];function respondWithStatusCode(_0xfd544a,_0x287ddd){_0x287ddd=_0x287ddd||0xcc;return function(_0x3a7b84){if(_0x3a7b84){return _0xfd544a[_0x9edd('0x18')](_0x287ddd);}return _0xfd544a[_0x9edd('0x19')](_0x287ddd)['end']();};}function respondWithResult(_0x176bfa,_0x44fc7c){_0x44fc7c=_0x44fc7c||0xc8;return function(_0x891832){if(_0x891832){return _0x176bfa[_0x9edd('0x19')](_0x44fc7c)[_0x9edd('0x1a')](_0x891832);}};}function respondWithFilteredResult(_0x338f3c,_0x1042aa){return function(_0x75a4ab){if(_0x75a4ab){var _0x4ea60f=typeof _0x1042aa[_0x9edd('0x1b')]===_0x9edd('0x1c')&&typeof _0x1042aa[_0x9edd('0x1d')]==='undefined';var _0x1b54c0=_0x75a4ab[_0x9edd('0x1e')];var _0x40ba32=_0x4ea60f?0x0:_0x1042aa['offset'];var _0x43dc70=_0x4ea60f?_0x75a4ab['count']:_0x1042aa[_0x9edd('0x1b')]+_0x1042aa[_0x9edd('0x1d')];var _0x4bdb88;if(_0x43dc70>=_0x1b54c0){_0x43dc70=_0x1b54c0;_0x4bdb88=0xc8;}else{_0x4bdb88=0xce;}_0x338f3c['status'](_0x4bdb88);return _0x338f3c[_0x9edd('0x1f')]('Content-Range',_0x40ba32+'-'+_0x43dc70+'/'+_0x1b54c0)[_0x9edd('0x1a')](_0x75a4ab);}return null;};}function patchUpdates(_0x54a03f){return function(_0x535f37){try{jsonpatch[_0x9edd('0x20')](_0x535f37,_0x54a03f,!![]);}catch(_0x1c46a8){return BPromise['reject'](_0x1c46a8);}return _0x535f37['save']();};}function saveUpdates(_0x341d67,_0x186186){return function(_0x477878){if(_0x477878){return _0x477878['update'](_0x341d67)[_0x9edd('0x21')](function(_0x1dca43){return _0x1dca43;});}return null;};}function removeEntity(_0x44a6c1,_0x2ca65f){return function(_0x339a0d){if(_0x339a0d){return _0x339a0d['destroy']()[_0x9edd('0x21')](function(){_0x44a6c1[_0x9edd('0x19')](0xcc)[_0x9edd('0x22')]();});}};}function handleEntityNotFound(_0x2f9f86,_0x310a4d){return function(_0x4d507f){if(!_0x4d507f){_0x2f9f86['sendStatus'](0x194);}return _0x4d507f;};}function handleError(_0x3276ee,_0xfeca7b){_0xfeca7b=_0xfeca7b||0x1f4;return function(_0x8d67aa){logger[_0x9edd('0x23')](_0x8d67aa[_0x9edd('0x24')]);if(_0x8d67aa['name']){delete _0x8d67aa['name'];}_0x3276ee[_0x9edd('0x19')](_0xfeca7b)[_0x9edd('0x25')](_0x8d67aa);};}exports[_0x9edd('0x26')]=function(_0x52746a,_0x238b22){var _0x28cfae={'raw':!![],'where':{'id':_0x52746a[_0x9edd('0x27')]['id']}},_0x2ae8dd={};_0x2ae8dd['model']=_[_0x9edd('0x28')](db[_0x9edd('0x29')][_0x9edd('0x2a')]);_0x2ae8dd[_0x9edd('0x2b')]=_[_0x9edd('0x28')](_0x52746a[_0x9edd('0x2b')]);_0x2ae8dd[_0x9edd('0x2c')]=_[_0x9edd('0x2d')](_0x2ae8dd[_0x9edd('0x2e')],_0x2ae8dd[_0x9edd('0x2b')]);_0x28cfae[_0x9edd('0x2f')]=_[_0x9edd('0x2d')](_0x2ae8dd[_0x9edd('0x2e')],qs[_0x9edd('0x30')](_0x52746a[_0x9edd('0x2b')]['fields']));_0x28cfae[_0x9edd('0x2f')]=_0x28cfae[_0x9edd('0x2f')][_0x9edd('0x31')]?_0x28cfae['attributes']:_0x2ae8dd[_0x9edd('0x2e')];if(_0x52746a[_0x9edd('0x2b')][_0x9edd('0x32')]){_0x28cfae[_0x9edd('0x33')]=[{'all':!![]}];}_0x28cfae=_[_0x9edd('0x34')]({},_0x28cfae,_0x52746a[_0x9edd('0x35')]);return db[_0x9edd('0x29')][_0x9edd('0x36')](_0x28cfae)[_0x9edd('0x21')](handleEntityNotFound(_0x238b22,null))[_0x9edd('0x21')](respondWithResult(_0x238b22,null))[_0x9edd('0x37')](handleError(_0x238b22,null));};exports[_0x9edd('0x38')]=function(_0x27eb7e,_0x14f780){if(_0x27eb7e['body']['id']){delete _0x27eb7e[_0x9edd('0x39')]['id'];}return db['MailApplication'][_0x9edd('0x36')]({'where':{'id':_0x27eb7e[_0x9edd('0x27')]['id']}})[_0x9edd('0x21')](handleEntityNotFound(_0x14f780,null))[_0x9edd('0x21')](saveUpdates(_0x27eb7e[_0x9edd('0x39')],null))['then'](respondWithResult(_0x14f780,null))[_0x9edd('0x37')](handleError(_0x14f780,null));};exports[_0x9edd('0x3a')]=function(_0x2b3469,_0x38e9be){return db[_0x9edd('0x29')][_0x9edd('0x36')]({'where':{'id':_0x2b3469[_0x9edd('0x27')]['id']}})[_0x9edd('0x21')](handleEntityNotFound(_0x38e9be,null))[_0x9edd('0x21')](removeEntity(_0x38e9be,null))[_0x9edd('0x37')](handleError(_0x38e9be,null));}; \ No newline at end of file +var _0xa9e0=['includeAll','merge','options','find','catch','body','eml-format','rimraf','zip-dir','moment','mustache','util','path','sox','to-csv','fs-extra','lodash','squel','desk.js','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/license/util','../../mysqldb','sendStatus','end','status','json','undefined','limit','offset','count','set','Content-Range','apply','save','update','then','destroy','stack','name','send','show','params','model','MailApplication','rawAttributes','query','keys','filters','intersection','attributes','fields','length'];(function(_0x44b23a,_0x3d7311){var _0x5922cf=function(_0x52c388){while(--_0x52c388){_0x44b23a['push'](_0x44b23a['shift']());}};_0x5922cf(++_0x3d7311);}(_0xa9e0,0x123));var _0x0a9e=function(_0x5447fd,_0x52a6b5){_0x5447fd=_0x5447fd-0x0;var _0x15b28a=_0xa9e0[_0x5447fd];return _0x15b28a;};'use strict';var emlformat=require(_0x0a9e('0x0'));var rimraf=require(_0x0a9e('0x1'));var zipdir=require(_0x0a9e('0x2'));var jsonpatch=require('fast-json-patch');var rp=require('request-promise');var moment=require(_0x0a9e('0x3'));var BPromise=require('bluebird');var Mustache=require(_0x0a9e('0x4'));var util=require(_0x0a9e('0x5'));var path=require(_0x0a9e('0x6'));var sox=require(_0x0a9e('0x7'));var csv=require(_0x0a9e('0x8'));var ejs=require('ejs');var fs=require('fs');var fs_extra=require(_0x0a9e('0x9'));var _=require(_0x0a9e('0xa'));var squel=require(_0x0a9e('0xb'));var crypto=require('crypto');var jsforce=require('jsforce');var deskjs=require(_0x0a9e('0xc'));var toCsv=require('to-csv');var querystring=require('querystring');var Papa=require(_0x0a9e('0xd'));var Redis=require(_0x0a9e('0xe'));var authService=require(_0x0a9e('0xf'));var qs=require(_0x0a9e('0x10'));var as=require(_0x0a9e('0x11'));var hardwareService=require(_0x0a9e('0x12'));var logger=require('../../config/logger')('api');var utils=require('../../config/utils');var config=require('../../config/environment');var licenseUtil=require(_0x0a9e('0x13'));var db=require(_0x0a9e('0x14'))['db'];function respondWithStatusCode(_0xd5b662,_0x26d672){_0x26d672=_0x26d672||0xcc;return function(_0x32d742){if(_0x32d742){return _0xd5b662[_0x0a9e('0x15')](_0x26d672);}return _0xd5b662['status'](_0x26d672)[_0x0a9e('0x16')]();};}function respondWithResult(_0x239b12,_0x2b4227){_0x2b4227=_0x2b4227||0xc8;return function(_0x281129){if(_0x281129){return _0x239b12[_0x0a9e('0x17')](_0x2b4227)[_0x0a9e('0x18')](_0x281129);}};}function respondWithFilteredResult(_0x52a03d,_0x22dccb){return function(_0x5d0880){if(_0x5d0880){var _0x1985b6=typeof _0x22dccb['offset']===_0x0a9e('0x19')&&typeof _0x22dccb[_0x0a9e('0x1a')]==='undefined';var _0x225616=_0x5d0880['count'];var _0x459eb1=_0x1985b6?0x0:_0x22dccb[_0x0a9e('0x1b')];var _0x106033=_0x1985b6?_0x5d0880[_0x0a9e('0x1c')]:_0x22dccb[_0x0a9e('0x1b')]+_0x22dccb[_0x0a9e('0x1a')];var _0x530eb7;if(_0x106033>=_0x225616){_0x106033=_0x225616;_0x530eb7=0xc8;}else{_0x530eb7=0xce;}_0x52a03d[_0x0a9e('0x17')](_0x530eb7);return _0x52a03d[_0x0a9e('0x1d')](_0x0a9e('0x1e'),_0x459eb1+'-'+_0x106033+'/'+_0x225616)[_0x0a9e('0x18')](_0x5d0880);}return null;};}function patchUpdates(_0x105080){return function(_0x4bb1e3){try{jsonpatch[_0x0a9e('0x1f')](_0x4bb1e3,_0x105080,!![]);}catch(_0x155cce){return BPromise['reject'](_0x155cce);}return _0x4bb1e3[_0x0a9e('0x20')]();};}function saveUpdates(_0x5a09ef,_0x588269){return function(_0x3a02e1){if(_0x3a02e1){return _0x3a02e1[_0x0a9e('0x21')](_0x5a09ef)[_0x0a9e('0x22')](function(_0x30bae6){return _0x30bae6;});}return null;};}function removeEntity(_0x4abc77,_0xfb6e48){return function(_0x2fb0e4){if(_0x2fb0e4){return _0x2fb0e4[_0x0a9e('0x23')]()[_0x0a9e('0x22')](function(){_0x4abc77[_0x0a9e('0x17')](0xcc)[_0x0a9e('0x16')]();});}};}function handleEntityNotFound(_0x16b1ca,_0x5ea472){return function(_0x59181e){if(!_0x59181e){_0x16b1ca[_0x0a9e('0x15')](0x194);}return _0x59181e;};}function handleError(_0x3a8e58,_0x40c424){_0x40c424=_0x40c424||0x1f4;return function(_0x33161b){logger['error'](_0x33161b[_0x0a9e('0x24')]);if(_0x33161b['name']){delete _0x33161b[_0x0a9e('0x25')];}_0x3a8e58['status'](_0x40c424)[_0x0a9e('0x26')](_0x33161b);};}exports[_0x0a9e('0x27')]=function(_0x25fba9,_0x14433c){var _0x140511={'raw':!![],'where':{'id':_0x25fba9[_0x0a9e('0x28')]['id']}},_0x1538a4={};_0x1538a4[_0x0a9e('0x29')]=_['keys'](db[_0x0a9e('0x2a')][_0x0a9e('0x2b')]);_0x1538a4[_0x0a9e('0x2c')]=_[_0x0a9e('0x2d')](_0x25fba9['query']);_0x1538a4[_0x0a9e('0x2e')]=_[_0x0a9e('0x2f')](_0x1538a4[_0x0a9e('0x29')],_0x1538a4[_0x0a9e('0x2c')]);_0x140511[_0x0a9e('0x30')]=_[_0x0a9e('0x2f')](_0x1538a4[_0x0a9e('0x29')],qs[_0x0a9e('0x31')](_0x25fba9[_0x0a9e('0x2c')]['fields']));_0x140511[_0x0a9e('0x30')]=_0x140511['attributes'][_0x0a9e('0x32')]?_0x140511[_0x0a9e('0x30')]:_0x1538a4[_0x0a9e('0x29')];if(_0x25fba9[_0x0a9e('0x2c')][_0x0a9e('0x33')]){_0x140511['include']=[{'all':!![]}];}_0x140511=_[_0x0a9e('0x34')]({},_0x140511,_0x25fba9[_0x0a9e('0x35')]);return db[_0x0a9e('0x2a')][_0x0a9e('0x36')](_0x140511)[_0x0a9e('0x22')](handleEntityNotFound(_0x14433c,null))[_0x0a9e('0x22')](respondWithResult(_0x14433c,null))[_0x0a9e('0x37')](handleError(_0x14433c,null));};exports[_0x0a9e('0x21')]=function(_0x5583a4,_0x44295a){if(_0x5583a4['body']['id']){delete _0x5583a4[_0x0a9e('0x38')]['id'];}return db[_0x0a9e('0x2a')][_0x0a9e('0x36')]({'where':{'id':_0x5583a4[_0x0a9e('0x28')]['id']}})['then'](handleEntityNotFound(_0x44295a,null))[_0x0a9e('0x22')](saveUpdates(_0x5583a4[_0x0a9e('0x38')],null))[_0x0a9e('0x22')](respondWithResult(_0x44295a,null))[_0x0a9e('0x37')](handleError(_0x44295a,null));};exports['destroy']=function(_0x54135e,_0x1e8694){return db['MailApplication'][_0x0a9e('0x36')]({'where':{'id':_0x54135e[_0x0a9e('0x28')]['id']}})[_0x0a9e('0x22')](handleEntityNotFound(_0x1e8694,null))[_0x0a9e('0x22')](removeEntity(_0x1e8694,null))['catch'](handleError(_0x1e8694,null));}; \ No newline at end of file diff --git a/server/api/mailApplication/mailApplication.model.js b/server/api/mailApplication/mailApplication.model.js index 9af6afc..65e0c76 100644 --- a/server/api/mailApplication/mailApplication.model.js +++ b/server/api/mailApplication/mailApplication.model.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xc430=['bluebird','request-promise','path','rimraf','../../config/environment','MailApplication','mail_applications','lodash','util','../../config/logger','api'];(function(_0x40f9a0,_0x3458cc){var _0x3e3144=function(_0x1f8fce){while(--_0x1f8fce){_0x40f9a0['push'](_0x40f9a0['shift']());}};_0x3e3144(++_0x3458cc);}(_0xc430,0x1e0));var _0x0c43=function(_0x459b52,_0x5e9a2d){_0x459b52=_0x459b52-0x0;var _0x382e12=_0xc430[_0x459b52];return _0x382e12;};'use strict';var _=require(_0x0c43('0x0'));var util=require(_0x0c43('0x1'));var logger=require(_0x0c43('0x2'))(_0x0c43('0x3'));var moment=require('moment');var BPromise=require(_0x0c43('0x4'));var rp=require(_0x0c43('0x5'));var fs=require('fs');var path=require(_0x0c43('0x6'));var rimraf=require(_0x0c43('0x7'));var config=require(_0x0c43('0x8'));var attributes=require('./mailApplication.attributes');module['exports']=function(_0x381132,_0xf2cc69){return _0x381132['define'](_0x0c43('0x9'),attributes,{'tableName':_0x0c43('0xa'),'paranoid':![],'indexes':[],'timestamps':!![],'charset':'utf8mb4','collate':'utf8mb4_unicode_ci'});}; \ No newline at end of file +var _0xee0f=['bluebird','../../config/environment','./mailApplication.attributes','exports','MailApplication','utf8mb4_unicode_ci','lodash','util','../../config/logger','api'];(function(_0x5cd69c,_0x17d939){var _0x3e066f=function(_0x9a54b){while(--_0x9a54b){_0x5cd69c['push'](_0x5cd69c['shift']());}};_0x3e066f(++_0x17d939);}(_0xee0f,0x1be));var _0xfee0=function(_0x1e2321,_0x3ae1c5){_0x1e2321=_0x1e2321-0x0;var _0x1d346d=_0xee0f[_0x1e2321];return _0x1d346d;};'use strict';var _=require(_0xfee0('0x0'));var util=require(_0xfee0('0x1'));var logger=require(_0xfee0('0x2'))(_0xfee0('0x3'));var moment=require('moment');var BPromise=require(_0xfee0('0x4'));var rp=require('request-promise');var fs=require('fs');var path=require('path');var rimraf=require('rimraf');var config=require(_0xfee0('0x5'));var attributes=require(_0xfee0('0x6'));module[_0xfee0('0x7')]=function(_0x5bd201,_0x140a4c){return _0x5bd201['define'](_0xfee0('0x8'),attributes,{'tableName':'mail_applications','paranoid':![],'indexes':[],'timestamps':!![],'charset':'utf8mb4','collate':_0xfee0('0x9')});}; \ No newline at end of file diff --git a/server/api/mailApplication/mailApplication.rpc.js b/server/api/mailApplication/mailApplication.rpc.js index f558a6b..95b442d 100644 --- a/server/api/mailApplication/mailApplication.rpc.js +++ b/server/api/mailApplication/mailApplication.rpc.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xac9b=['client','http','request','info','MailApplication,\x20%s,\x20%s','request\x20sent','MailApplication,\x20%s,\x20%s,\x20%s','error','code','message','result','catch','UpdateMailApplication','update','body','options','raw','where','attributes','limit','then','util','moment','bluebird','randomstring','ioredis','../../config/utils','../../config/logger','rpc','../../config/environment'];(function(_0x241424,_0x25eb5d){var _0x3da798=function(_0x415153){while(--_0x415153){_0x241424['push'](_0x241424['shift']());}};_0x3da798(++_0x25eb5d);}(_0xac9b,0x8d));var _0xbac9=function(_0x4ed32d,_0x327695){_0x4ed32d=_0x4ed32d-0x0;var _0xf624df=_0xac9b[_0x4ed32d];return _0xf624df;};'use strict';var _=require('lodash');var util=require(_0xbac9('0x0'));var moment=require(_0xbac9('0x1'));var BPromise=require(_0xbac9('0x2'));var rs=require(_0xbac9('0x3'));var fs=require('fs');var Redis=require(_0xbac9('0x4'));var db=require('../../mysqldb')['db'];var utils=require(_0xbac9('0x5'));var logger=require(_0xbac9('0x6'))(_0xbac9('0x7'));var config=require(_0xbac9('0x8'));var jayson=require('jayson/promise');var client=jayson[_0xbac9('0x9')][_0xbac9('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x5dd813,_0xcd1adf,_0x54dc30){return new BPromise(function(_0x5b6f5a,_0x50ba80){return client[_0xbac9('0xb')](_0x5dd813,_0x54dc30)['then'](function(_0x4be305){logger[_0xbac9('0xc')](_0xbac9('0xd'),_0xcd1adf,_0xbac9('0xe'));logger['debug'](_0xbac9('0xf'),_0xcd1adf,_0xbac9('0xe'),JSON['stringify'](_0x4be305));if(_0x4be305[_0xbac9('0x10')]){if(_0x4be305[_0xbac9('0x10')][_0xbac9('0x11')]===0x1f4){logger[_0xbac9('0x10')](_0xbac9('0xd'),_0xcd1adf,_0x4be305['error'][_0xbac9('0x12')]);return _0x50ba80(_0x4be305[_0xbac9('0x10')][_0xbac9('0x12')]);}logger[_0xbac9('0x10')](_0xbac9('0xd'),_0xcd1adf,_0x4be305[_0xbac9('0x10')]['message']);return _0x5b6f5a(_0x4be305[_0xbac9('0x10')][_0xbac9('0x12')]);}else{logger[_0xbac9('0xc')](_0xbac9('0xd'),_0xcd1adf,_0xbac9('0xe'));_0x5b6f5a(_0x4be305[_0xbac9('0x13')][_0xbac9('0x12')]);}})[_0xbac9('0x14')](function(_0x1e731e){logger[_0xbac9('0x10')](_0xbac9('0xd'),_0xcd1adf,_0x1e731e);_0x50ba80(_0x1e731e);});});}exports[_0xbac9('0x15')]=function(_0x1afc3d){var _0x16fe4e=this;return new Promise(function(_0x4b6bac,_0x2981aa){return db['MailApplication'][_0xbac9('0x16')](_0x1afc3d[_0xbac9('0x17')],{'raw':_0x1afc3d['options']?_0x1afc3d[_0xbac9('0x18')][_0xbac9('0x19')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x1afc3d[_0xbac9('0x18')]?_0x1afc3d[_0xbac9('0x18')][_0xbac9('0x1a')]||null:null,'attributes':_0x1afc3d[_0xbac9('0x18')]?_0x1afc3d[_0xbac9('0x18')][_0xbac9('0x1b')]||null:null,'limit':_0x1afc3d[_0xbac9('0x18')]?_0x1afc3d[_0xbac9('0x18')][_0xbac9('0x1c')]||null:null})[_0xbac9('0x1d')](function(_0x189d98){logger[_0xbac9('0xc')](_0xbac9('0x15'),_0x1afc3d);logger['debug'](_0xbac9('0x15'),_0x1afc3d,JSON['stringify'](_0x189d98));_0x4b6bac(_0x189d98);})[_0xbac9('0x14')](function(_0x3e02c6){logger[_0xbac9('0x10')](_0xbac9('0x15'),_0x3e02c6[_0xbac9('0x12')],_0x1afc3d);_0x2981aa(_0x16fe4e['error'](0x1f4,_0x3e02c6['message']));});});}; \ No newline at end of file +var _0xbc38=['../../config/environment','jayson/promise','http','request','then','info','MailApplication,\x20%s,\x20%s','debug','MailApplication,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','code','message','result','catch','update','options','attributes','UpdateMailApplication','lodash','util','moment','bluebird','../../config/utils','rpc'];(function(_0x50e246,_0x240a92){var _0x524643=function(_0x4edf8b){while(--_0x4edf8b){_0x50e246['push'](_0x50e246['shift']());}};_0x524643(++_0x240a92);}(_0xbc38,0xb0));var _0x8bc3=function(_0x5ae4a3,_0x3cc4e9){_0x5ae4a3=_0x5ae4a3-0x0;var _0x24938b=_0xbc38[_0x5ae4a3];return _0x24938b;};'use strict';var _=require(_0x8bc3('0x0'));var util=require(_0x8bc3('0x1'));var moment=require(_0x8bc3('0x2'));var BPromise=require(_0x8bc3('0x3'));var rs=require('randomstring');var fs=require('fs');var Redis=require('ioredis');var db=require('../../mysqldb')['db'];var utils=require(_0x8bc3('0x4'));var logger=require('../../config/logger')(_0x8bc3('0x5'));var config=require(_0x8bc3('0x6'));var jayson=require(_0x8bc3('0x7'));var client=jayson['client'][_0x8bc3('0x8')]({'port':0x232a});function respondWithRpcPromise(_0x5db19d,_0x33a88b,_0x18f6a4){return new BPromise(function(_0x3e55e8,_0x1ad2e3){return client[_0x8bc3('0x9')](_0x5db19d,_0x18f6a4)[_0x8bc3('0xa')](function(_0x42a5b9){logger[_0x8bc3('0xb')](_0x8bc3('0xc'),_0x33a88b,'request\x20sent');logger[_0x8bc3('0xd')](_0x8bc3('0xe'),_0x33a88b,_0x8bc3('0xf'),JSON[_0x8bc3('0x10')](_0x42a5b9));if(_0x42a5b9[_0x8bc3('0x11')]){if(_0x42a5b9[_0x8bc3('0x11')][_0x8bc3('0x12')]===0x1f4){logger[_0x8bc3('0x11')](_0x8bc3('0xc'),_0x33a88b,_0x42a5b9[_0x8bc3('0x11')][_0x8bc3('0x13')]);return _0x1ad2e3(_0x42a5b9[_0x8bc3('0x11')][_0x8bc3('0x13')]);}logger[_0x8bc3('0x11')](_0x8bc3('0xc'),_0x33a88b,_0x42a5b9[_0x8bc3('0x11')][_0x8bc3('0x13')]);return _0x3e55e8(_0x42a5b9['error']['message']);}else{logger[_0x8bc3('0xb')](_0x8bc3('0xc'),_0x33a88b,'request\x20sent');_0x3e55e8(_0x42a5b9[_0x8bc3('0x14')][_0x8bc3('0x13')]);}})[_0x8bc3('0x15')](function(_0x84a40b){logger[_0x8bc3('0x11')]('MailApplication,\x20%s,\x20%s',_0x33a88b,_0x84a40b);_0x1ad2e3(_0x84a40b);});});}exports['UpdateMailApplication']=function(_0x38f2e8){var _0x2d3178=this;return new Promise(function(_0xd36dbb,_0x2e3ace){return db['MailApplication'][_0x8bc3('0x16')](_0x38f2e8['body'],{'raw':_0x38f2e8['options']?_0x38f2e8[_0x8bc3('0x17')]['raw']===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x38f2e8[_0x8bc3('0x17')]?_0x38f2e8[_0x8bc3('0x17')]['where']||null:null,'attributes':_0x38f2e8[_0x8bc3('0x17')]?_0x38f2e8['options'][_0x8bc3('0x18')]||null:null,'limit':_0x38f2e8[_0x8bc3('0x17')]?_0x38f2e8['options']['limit']||null:null})[_0x8bc3('0xa')](function(_0xa2a62c){logger[_0x8bc3('0xb')]('UpdateMailApplication',_0x38f2e8);logger[_0x8bc3('0xd')](_0x8bc3('0x19'),_0x38f2e8,JSON['stringify'](_0xa2a62c));_0xd36dbb(_0xa2a62c);})['catch'](function(_0x33ffd8){logger[_0x8bc3('0x11')](_0x8bc3('0x19'),_0x33ffd8[_0x8bc3('0x13')],_0x38f2e8);_0x2e3ace(_0x2d3178[_0x8bc3('0x11')](0x1f4,_0x33ffd8[_0x8bc3('0x13')]));});});}; \ No newline at end of file diff --git a/server/api/mailInteraction/index.js b/server/api/mailInteraction/index.js index 5b3f499..05654c2 100644 --- a/server/api/mailInteraction/index.js +++ b/server/api/mailInteraction/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x876b=['tracked','mail','mailinteraction:addtags','addTags','put','mailinteraction:update','update','mailinteraction:destroy','destroy','/:id/tags','../../components/auth/service','../../components/interaction/service','isAuthenticated','index','/describe','describe','/:id','get','/:id/messages','getMessages','/:id/download','download','post','addMessage'];(function(_0x35f7f5,_0x4e2ee1){var _0x5567a4=function(_0x3e5df0){while(--_0x3e5df0){_0x35f7f5['push'](_0x35f7f5['shift']());}};_0x5567a4(++_0x4e2ee1);}(_0x876b,0x1ba));var _0xb876=function(_0x2a49ea,_0x4b5173){_0x2a49ea=_0x2a49ea-0x0;var _0x4e4845=_0x876b[_0x2a49ea];return _0x4e4845;};'use strict';var express=require('express');var router=express['Router']();var auth=require(_0xb876('0x0'));var interaction=require(_0xb876('0x1'));var controller=require('./mailInteraction.controller');router['get']('/',auth[_0xb876('0x2')](),controller[_0xb876('0x3')]);router['get'](_0xb876('0x4'),auth[_0xb876('0x2')](),controller[_0xb876('0x5')]);router['get'](_0xb876('0x6'),auth[_0xb876('0x2')](),controller['show']);router[_0xb876('0x7')](_0xb876('0x8'),auth[_0xb876('0x2')](),controller[_0xb876('0x9')]);router['get'](_0xb876('0xa'),auth['isAuthenticated'](),controller[_0xb876('0xb')]);router[_0xb876('0xc')]('/',auth['isAuthenticated'](),controller['create']);router['post'](_0xb876('0x8'),auth['isAuthenticated'](),controller[_0xb876('0xd')]);router[_0xb876('0xc')]('/:id/tags',auth[_0xb876('0x2')](),interaction[_0xb876('0xe')](_0xb876('0xf'),_0xb876('0x10')),controller[_0xb876('0x11')]);router[_0xb876('0x12')](_0xb876('0x6'),auth[_0xb876('0x2')](),interaction[_0xb876('0xe')](_0xb876('0xf'),_0xb876('0x13')),controller[_0xb876('0x14')]);router['delete'](_0xb876('0x6'),auth[_0xb876('0x2')](),interaction[_0xb876('0xe')](_0xb876('0xf'),_0xb876('0x15')),controller[_0xb876('0x16')]);router['delete'](_0xb876('0x17'),auth[_0xb876('0x2')](),controller['removeTags']);module['exports']=router; \ No newline at end of file +var _0x13d8=['get','isAuthenticated','index','/describe','describe','/:id','show','/:id/messages','getMessages','/:id/download','download','post','create','addMessage','/:id/tags','tracked','mail','mailinteraction:addtags','addTags','put','mailinteraction:update','update','delete','mailinteraction:destroy','destroy','removeTags','exports','express','Router','../../components/interaction/service'];(function(_0x1ea750,_0x1eef90){var _0x4e2baf=function(_0x3866b1){while(--_0x3866b1){_0x1ea750['push'](_0x1ea750['shift']());}};_0x4e2baf(++_0x1eef90);}(_0x13d8,0x1bf));var _0x813d=function(_0x23461d,_0x3dea91){_0x23461d=_0x23461d-0x0;var _0x215cce=_0x13d8[_0x23461d];return _0x215cce;};'use strict';var express=require(_0x813d('0x0'));var router=express[_0x813d('0x1')]();var auth=require('../../components/auth/service');var interaction=require(_0x813d('0x2'));var controller=require('./mailInteraction.controller');router[_0x813d('0x3')]('/',auth[_0x813d('0x4')](),controller[_0x813d('0x5')]);router[_0x813d('0x3')](_0x813d('0x6'),auth[_0x813d('0x4')](),controller[_0x813d('0x7')]);router[_0x813d('0x3')](_0x813d('0x8'),auth[_0x813d('0x4')](),controller[_0x813d('0x9')]);router[_0x813d('0x3')](_0x813d('0xa'),auth[_0x813d('0x4')](),controller[_0x813d('0xb')]);router[_0x813d('0x3')](_0x813d('0xc'),auth[_0x813d('0x4')](),controller[_0x813d('0xd')]);router[_0x813d('0xe')]('/',auth['isAuthenticated'](),controller[_0x813d('0xf')]);router['post'](_0x813d('0xa'),auth[_0x813d('0x4')](),controller[_0x813d('0x10')]);router[_0x813d('0xe')](_0x813d('0x11'),auth['isAuthenticated'](),interaction[_0x813d('0x12')](_0x813d('0x13'),_0x813d('0x14')),controller[_0x813d('0x15')]);router[_0x813d('0x16')](_0x813d('0x8'),auth[_0x813d('0x4')](),interaction['tracked'](_0x813d('0x13'),_0x813d('0x17')),controller[_0x813d('0x18')]);router[_0x813d('0x19')](_0x813d('0x8'),auth[_0x813d('0x4')](),interaction[_0x813d('0x12')](_0x813d('0x13'),_0x813d('0x1a')),controller[_0x813d('0x1b')]);router[_0x813d('0x19')]('/:id/tags',auth['isAuthenticated'](),controller[_0x813d('0x1c')]);module[_0x813d('0x1d')]=router; \ No newline at end of file diff --git a/server/api/mailInteraction/mailInteraction.attributes.js b/server/api/mailInteraction/mailInteraction.attributes.js index aca99d6..6c59ed6 100644 --- a/server/api/mailInteraction/mailInteraction.attributes.js +++ b/server/api/mailInteraction/mailInteraction.attributes.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xe970=['long','ENUM','out','iconv','exports','BOOLEAN','DATE','STRING','TEXT'];(function(_0x2aa9fa,_0x572d5c){var _0x352f92=function(_0x3defad){while(--_0x3defad){_0x2aa9fa['push'](_0x2aa9fa['shift']());}};_0x352f92(++_0x572d5c);}(_0xe970,0xc9));var _0x0e97=function(_0x41699f,_0x4c33e9){_0x41699f=_0x41699f-0x0;var _0x36d05e=_0xe970[_0x41699f];return _0x36d05e;};'use strict';var Sequelize=require('sequelize');var iconv=require(_0x0e97('0x0'));module[_0x0e97('0x1')]={'closed':{'type':Sequelize[_0x0e97('0x2')],'defaultValue':![]},'closedAt':{'type':Sequelize[_0x0e97('0x3')]},'disposition':{'type':Sequelize['STRING']},'secondDisposition':{'type':Sequelize[_0x0e97('0x4')]},'thirdDisposition':{'type':Sequelize[_0x0e97('0x4')]},'note':{'type':Sequelize['STRING']},'inReplyTo':{'type':Sequelize[_0x0e97('0x4')](0x1fe)},'to':{'type':Sequelize['STRING']},'cc':{'type':Sequelize[_0x0e97('0x5')](_0x0e97('0x6'))},'subject':{'type':Sequelize[_0x0e97('0x5')]()},'attach':{'type':Sequelize[_0x0e97('0x2')],'defaultValue':![]},'read1stAt':{'type':Sequelize[_0x0e97('0x3')]},'substatus':{'type':Sequelize[_0x0e97('0x4')](0x3c)},'substatusAt':{'type':Sequelize[_0x0e97('0x3')]},'firstMsgDirection':{'type':Sequelize[_0x0e97('0x7')]('in',_0x0e97('0x8')),'defaultValue':'in','allowNull':![]},'lastMsgAt':{'type':Sequelize['DATE']},'lastMsgDirection':{'type':Sequelize[_0x0e97('0x7')]('in',_0x0e97('0x8')),'defaultValue':'in','allowNull':![]},'autoreplyExecuted':{'type':Sequelize['BOOLEAN'],'defaultValue':![]}}; \ No newline at end of file +var _0xa74d=['DATE','STRING','TEXT','long','BOOLEAN','ENUM','out','sequelize','iconv','exports'];(function(_0x1d2342,_0x13d9dd){var _0x701d8c=function(_0x2a2da7){while(--_0x2a2da7){_0x1d2342['push'](_0x1d2342['shift']());}};_0x701d8c(++_0x13d9dd);}(_0xa74d,0xcf));var _0xda74=function(_0xcd3753,_0x5f170f){_0xcd3753=_0xcd3753-0x0;var _0x4831f1=_0xa74d[_0xcd3753];return _0x4831f1;};'use strict';var Sequelize=require(_0xda74('0x0'));var iconv=require(_0xda74('0x1'));module[_0xda74('0x2')]={'closed':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'closedAt':{'type':Sequelize[_0xda74('0x3')]},'disposition':{'type':Sequelize[_0xda74('0x4')]},'secondDisposition':{'type':Sequelize['STRING']},'thirdDisposition':{'type':Sequelize['STRING']},'note':{'type':Sequelize[_0xda74('0x4')]},'inReplyTo':{'type':Sequelize[_0xda74('0x4')](0x1fe)},'to':{'type':Sequelize[_0xda74('0x4')]},'cc':{'type':Sequelize[_0xda74('0x5')](_0xda74('0x6'))},'subject':{'type':Sequelize[_0xda74('0x5')]()},'attach':{'type':Sequelize[_0xda74('0x7')],'defaultValue':![]},'read1stAt':{'type':Sequelize[_0xda74('0x3')]},'substatus':{'type':Sequelize['STRING'](0x3c)},'substatusAt':{'type':Sequelize[_0xda74('0x3')]},'firstMsgDirection':{'type':Sequelize[_0xda74('0x8')]('in',_0xda74('0x9')),'defaultValue':'in','allowNull':![]},'lastMsgAt':{'type':Sequelize[_0xda74('0x3')]},'lastMsgDirection':{'type':Sequelize[_0xda74('0x8')]('in','out'),'defaultValue':'in','allowNull':![]},'autoreplyExecuted':{'type':Sequelize[_0xda74('0x7')],'defaultValue':![]}}; \ No newline at end of file diff --git a/server/api/mailInteraction/mailInteraction.controller.js b/server/api/mailInteraction/mailInteraction.controller.js index 5e66c5b..91a4d01 100644 --- a/server/api/mailInteraction/mailInteraction.controller.js +++ b/server/api/mailInteraction/mailInteraction.controller.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x6645=['rawAttributes','filters','intersection','attributes','fields','length','includeAll','include','merge','options','find','create','body','describe','addMessage','MailMessage','omit','ids','getMessages','findOne','order','sort','where','map','filter','$gte','split','format','YYYY-MM-DD\x20HH:mm:ss','findAll','inlineCss','true','rows','addTags','setTags','spread','Tag','color','mailInteractionTags:save','removeTags','download','unix','join','root','server','files','tmp','transcript-%d-%s.zip','push','Attachment','from','bcc','subject','createdAt','get','mkdirSync','each','Messages','missing.recipient@your.company.com','decode','ddd,\x20DD\x20MMM\x20YYYY\x20HH:mm:ss\x20ZZ','headers','Bcc','Attachments','basename','existsSync','attachments','message%d.eml','eml-format','moment','bluebird','util','path','lodash','ioredis','../../components/parsers/qs','api','html-entities','defaults','localhost','redis','sendStatus','status','end','offset','limit','count','set','Content-Range','json','update','destroy','then','error','name','send','MailInteraction','type','key','getOptions','mail','query','user','catch','params','model','keys'];(function(_0x626133,_0x143def){var _0x1e5646=function(_0xb71520){while(--_0xb71520){_0x626133['push'](_0x626133['shift']());}};_0x1e5646(++_0x143def);}(_0x6645,0xaf));var _0x5664=function(_0x1718ab,_0x27f48f){_0x1718ab=_0x1718ab-0x0;var _0x2d0948=_0x6645[_0x1718ab];return _0x2d0948;};'use strict';var emlformat=require(_0x5664('0x0'));var rimraf=require('rimraf');var zipdir=require('zip-dir');var moment=require(_0x5664('0x1'));var BPromise=require(_0x5664('0x2'));var util=require(_0x5664('0x3'));var path=require(_0x5664('0x4'));var fs=require('fs');var _=require(_0x5664('0x5'));var juice=require('juice');var Redis=require(_0x5664('0x6'));var interaction=require('../../components/interaction/service');var qs=require(_0x5664('0x7'));var logger=require('../../config/logger')(_0x5664('0x8'));var config=require('../../config/environment');var db=require('../../mysqldb')['db'];var htmlEntities=require(_0x5664('0x9'));config['redis']=_[_0x5664('0xa')](config['redis'],{'host':_0x5664('0xb'),'port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config[_0x5664('0xc')]));require('./mailInteraction.socket')['register'](socket);function respondWithStatusCode(_0x1741e6,_0x909c1e){_0x909c1e=_0x909c1e||0xcc;return function(_0xf94e8){if(_0xf94e8){return _0x1741e6[_0x5664('0xd')](_0x909c1e);}return _0x1741e6[_0x5664('0xe')](_0x909c1e)[_0x5664('0xf')]();};}function respondWithResult(_0x452e2d,_0x12865a){_0x12865a=_0x12865a||0xc8;return function(_0x3e2fc2){if(_0x3e2fc2){return _0x452e2d[_0x5664('0xe')](_0x12865a)['json'](_0x3e2fc2);}};}function respondWithFilteredResult(_0x40d659,_0x15204a){return function(_0x9f8202){if(_0x9f8202){var _0x3f8a53=typeof _0x15204a[_0x5664('0x10')]==='undefined'&&typeof _0x15204a[_0x5664('0x11')]==='undefined';var _0x5e3b67=_0x9f8202['count'];var _0x3f49e5=_0x3f8a53?0x0:_0x15204a[_0x5664('0x10')];var _0x23bd2b=_0x3f8a53?_0x9f8202[_0x5664('0x12')]:_0x15204a[_0x5664('0x10')]+_0x15204a[_0x5664('0x11')];var _0x2b14cd;if(_0x23bd2b>=_0x5e3b67){_0x23bd2b=_0x5e3b67;_0x2b14cd=0xc8;}else{_0x2b14cd=0xce;}_0x40d659[_0x5664('0xe')](_0x2b14cd);return _0x40d659[_0x5664('0x13')](_0x5664('0x14'),_0x3f49e5+'-'+_0x23bd2b+'/'+_0x5e3b67)[_0x5664('0x15')](_0x9f8202);}return null;};}function saveUpdates(_0x28d4c9){return function(_0x4a44c6){if(_0x4a44c6){return _0x4a44c6[_0x5664('0x16')](_0x28d4c9)['then'](function(_0xe0e6a){return _0xe0e6a;});}return null;};}function removeEntity(_0x20fd4f){return function(_0x530e73){if(_0x530e73){return _0x530e73[_0x5664('0x17')]()[_0x5664('0x18')](function(){_0x20fd4f[_0x5664('0xe')](0xcc)[_0x5664('0xf')]();});}};}function handleEntityNotFound(_0x17476b){return function(_0x5b1569){if(!_0x5b1569){_0x17476b[_0x5664('0xd')](0x194);}return _0x5b1569;};}function handleError(_0x53daef,_0x154312){_0x154312=_0x154312||0x1f4;return function(_0x1e2a89){logger[_0x5664('0x19')](_0x1e2a89['stack']);if(_0x1e2a89[_0x5664('0x1a')]){delete _0x1e2a89[_0x5664('0x1a')];}_0x53daef[_0x5664('0xe')](_0x154312)[_0x5664('0x1b')](_0x1e2a89);};}exports['index']=function(_0x189ead,_0x4c89cf){var _0x15e8e5={};var _0x4a4362=_['map'](db[_0x5664('0x1c')]['rawAttributes'],function(_0x1131e5){return{'name':_0x1131e5['fieldName'],'type':_0x1131e5[_0x5664('0x1d')][_0x5664('0x1e')]};});_0x15e8e5=qs[_0x5664('0x1f')](_0x4a4362,_0x189ead);return interaction['findAll'](_0x5664('0x20'),_0x189ead[_0x5664('0x21')],_0x189ead[_0x5664('0x22')],_0x15e8e5,_0x4a4362)[_0x5664('0x18')](respondWithFilteredResult(_0x4c89cf,_0x15e8e5))[_0x5664('0x23')](handleError(_0x4c89cf,null));};exports['show']=function(_0x1d458d,_0x1725e7){var _0x1b4641={'raw':![],'where':{'id':_0x1d458d[_0x5664('0x24')]['id']}},_0x497ba2={};_0x497ba2[_0x5664('0x25')]=_[_0x5664('0x26')](db[_0x5664('0x1c')][_0x5664('0x27')]);_0x497ba2[_0x5664('0x21')]=_[_0x5664('0x26')](_0x1d458d[_0x5664('0x21')]);_0x497ba2[_0x5664('0x28')]=_[_0x5664('0x29')](_0x497ba2[_0x5664('0x25')],_0x497ba2[_0x5664('0x21')]);_0x1b4641[_0x5664('0x2a')]=_[_0x5664('0x29')](_0x497ba2[_0x5664('0x25')],qs[_0x5664('0x2b')](_0x1d458d[_0x5664('0x21')][_0x5664('0x2b')]));_0x1b4641[_0x5664('0x2a')]=_0x1b4641[_0x5664('0x2a')][_0x5664('0x2c')]?_0x1b4641[_0x5664('0x2a')]:_0x497ba2[_0x5664('0x25')];if(_0x1d458d[_0x5664('0x21')][_0x5664('0x2d')]){_0x1b4641[_0x5664('0x2e')]=[{'all':!![]}];}_0x1b4641=_[_0x5664('0x2f')]({},_0x1b4641,_0x1d458d[_0x5664('0x30')]);return db[_0x5664('0x1c')][_0x5664('0x31')](_0x1b4641)[_0x5664('0x18')](handleEntityNotFound(_0x1725e7,null))[_0x5664('0x18')](respondWithResult(_0x1725e7,null))[_0x5664('0x23')](handleError(_0x1725e7,null));};exports[_0x5664('0x32')]=function(_0x4b1714,_0xecbf4a){return db['MailInteraction'][_0x5664('0x32')](_0x4b1714[_0x5664('0x33')],{})[_0x5664('0x18')](respondWithResult(_0xecbf4a,0xc9))[_0x5664('0x23')](handleError(_0xecbf4a,null));};exports['update']=function(_0x2695b5,_0xe855b5){if(_0x2695b5[_0x5664('0x33')]['id']){delete _0x2695b5[_0x5664('0x33')]['id'];}return db[_0x5664('0x1c')][_0x5664('0x31')]({'where':{'id':_0x2695b5[_0x5664('0x24')]['id']}})[_0x5664('0x18')](handleEntityNotFound(_0xe855b5,null))[_0x5664('0x18')](saveUpdates(_0x2695b5[_0x5664('0x33')],null))[_0x5664('0x18')](respondWithResult(_0xe855b5,null))[_0x5664('0x23')](handleError(_0xe855b5,null));};exports[_0x5664('0x17')]=function(_0xf4df50,_0x8fbebf){return db[_0x5664('0x1c')][_0x5664('0x31')]({'where':{'id':_0xf4df50[_0x5664('0x24')]['id']}})[_0x5664('0x18')](handleEntityNotFound(_0x8fbebf,null))[_0x5664('0x18')](removeEntity(_0x8fbebf,null))[_0x5664('0x23')](handleError(_0x8fbebf,null));};exports['describe']=function(_0x29024a,_0x42ca58){return db['MailInteraction'][_0x5664('0x34')]()[_0x5664('0x18')](respondWithResult(_0x42ca58,null))[_0x5664('0x23')](handleError(_0x42ca58,null));};exports[_0x5664('0x35')]=function(_0x5e642e,_0x47c82a){return db[_0x5664('0x36')][_0x5664('0x31')]({'where':{'id':_0x5e642e['params']['id']}})['then'](handleEntityNotFound(_0x47c82a,null))['then'](function(_0x4e075f){if(_0x4e075f){return _0x4e075f[_0x5664('0x35')](_0x5e642e[_0x5664('0x33')]['ids'],_[_0x5664('0x37')](_0x5e642e[_0x5664('0x33')],[_0x5664('0x38'),'id'])||{});}})[_0x5664('0x18')](respondWithResult(_0x47c82a,null))[_0x5664('0x23')](handleError(_0x47c82a,null));};exports[_0x5664('0x39')]=function(_0x4cdb0a,_0x164430){var _0x6bbd9b={'raw':![],'where':{}};var _0x564896={};var _0x57a37e={'count':0x0,'rows':[]};return db[_0x5664('0x1c')][_0x5664('0x3a')]({'where':{'id':_0x4cdb0a[_0x5664('0x24')]['id']}})['then'](handleEntityNotFound(_0x164430,null))['then'](function(_0x5debfb){if(_0x5debfb){_0x564896[_0x5664('0x25')]=_['keys'](db[_0x5664('0x36')][_0x5664('0x27')]);_0x564896['query']=_[_0x5664('0x26')](_0x4cdb0a[_0x5664('0x21')]);_0x564896[_0x5664('0x28')]=_[_0x5664('0x29')](_0x564896[_0x5664('0x25')],_0x564896[_0x5664('0x21')]);_0x6bbd9b[_0x5664('0x2a')]=_['intersection'](_0x564896[_0x5664('0x25')],qs[_0x5664('0x2b')](_0x4cdb0a['query'][_0x5664('0x2b')]));_0x6bbd9b['attributes']=_0x6bbd9b[_0x5664('0x2a')]['length']?_0x6bbd9b['attributes']:_0x564896[_0x5664('0x25')];if(!_0x4cdb0a['query']['hasOwnProperty']('nolimit')){_0x6bbd9b[_0x5664('0x11')]=qs[_0x5664('0x11')](_0x4cdb0a[_0x5664('0x21')]['limit']);_0x6bbd9b['offset']=qs['offset'](_0x4cdb0a[_0x5664('0x21')][_0x5664('0x10')]);}_0x6bbd9b[_0x5664('0x3b')]=qs['sort'](_0x4cdb0a[_0x5664('0x21')][_0x5664('0x3c')]);_0x6bbd9b['where']=qs[_0x5664('0x28')](_['pick'](_0x4cdb0a[_0x5664('0x21')],_0x564896[_0x5664('0x28')]));_0x6bbd9b[_0x5664('0x3d')]['MailInteractionId']=_0x5debfb['id'];if(_0x4cdb0a[_0x5664('0x21')]['filter']){_0x6bbd9b[_0x5664('0x3d')]=_['merge'](_0x6bbd9b['where'],{'$or':_[_0x5664('0x3e')](_0x6bbd9b['attributes'],function(_0x365365){var _0x3e7e25={};_0x3e7e25[_0x365365]={'$like':'%'+_0x4cdb0a[_0x5664('0x21')][_0x5664('0x3f')]+'%'};return _0x3e7e25;})});}if(_0x4cdb0a[_0x5664('0x21')][_0x5664('0x40')]){var _0x3cfc2f=_0x4cdb0a[_0x5664('0x21')]['$gte'][_0x5664('0x41')](',');var _0x230b7c={};_0x230b7c[_0x3cfc2f[0x0]]={'$gte':moment(_0x3cfc2f[0x1])[_0x5664('0x42')](_0x5664('0x43'))};_0x6bbd9b[_0x5664('0x3d')]=_[_0x5664('0x2f')](_0x6bbd9b['where'],_0x230b7c);}_0x6bbd9b=_[_0x5664('0x2f')]({},_0x6bbd9b,_0x4cdb0a[_0x5664('0x30')]);return db['MailMessage']['count']({'where':_0x6bbd9b[_0x5664('0x3d')]})[_0x5664('0x18')](function(_0x248612){_0x57a37e[_0x5664('0x12')]=_0x248612;if(_0x4cdb0a[_0x5664('0x21')][_0x5664('0x2d')]){_0x6bbd9b[_0x5664('0x2e')]=[{'all':!![]}];}return db['MailMessage'][_0x5664('0x44')](_0x6bbd9b);})[_0x5664('0x18')](function(_0x38ff3c){if(_0x4cdb0a[_0x5664('0x21')][_0x5664('0x45')]===_0x5664('0x46')){for(var _0x32d9a3=0x0;_0x32d9a3<_0x38ff3c[_0x5664('0x2c')];_0x32d9a3++){_0x38ff3c[_0x32d9a3]['body']=juice(_0x38ff3c[_0x32d9a3][_0x5664('0x33')]);}}_0x57a37e[_0x5664('0x47')]=_0x38ff3c;return _0x57a37e;});}})[_0x5664('0x18')](respondWithFilteredResult(_0x164430,_0x6bbd9b))[_0x5664('0x23')](handleError(_0x164430,null));};exports[_0x5664('0x48')]=function(_0x27bbd8,_0x488874){return db[_0x5664('0x1c')]['find']({'where':{'id':_0x27bbd8[_0x5664('0x24')]['id']}})[_0x5664('0x18')](handleEntityNotFound(_0x488874,null))[_0x5664('0x18')](function(_0x513209){if(_0x513209){return _0x513209[_0x5664('0x49')](_0x27bbd8[_0x5664('0x33')][_0x5664('0x38')],_['omit'](_0x27bbd8[_0x5664('0x33')],['ids','id'])||{})[_0x5664('0x4a')](function(){return db[_0x5664('0x4b')][_0x5664('0x44')]({'attributes':['id',_0x5664('0x1a'),_0x5664('0x4c')],'where':{'id':_0x27bbd8[_0x5664('0x33')][_0x5664('0x38')]}});})[_0x5664('0x18')](function(_0xf24ece){socket['emit'](_0x5664('0x4d'),{'id':Number(_0x27bbd8[_0x5664('0x24')]['id']),'tags':_0xf24ece||[]});return{'id':Number(_0x27bbd8[_0x5664('0x24')]['id']),'tags':_0xf24ece||[]};});}})[_0x5664('0x18')](respondWithResult(_0x488874,null))[_0x5664('0x23')](handleError(_0x488874,null));};exports[_0x5664('0x4e')]=function(_0x5fe753,_0x134781){return db[_0x5664('0x1c')][_0x5664('0x31')]({'where':{'id':_0x5fe753[_0x5664('0x24')]['id']}})[_0x5664('0x18')](handleEntityNotFound(_0x134781,null))[_0x5664('0x18')](function(_0x1761ab){if(_0x1761ab){return _0x1761ab[_0x5664('0x4e')](_0x5fe753[_0x5664('0x21')][_0x5664('0x38')]);}})[_0x5664('0x18')](respondWithStatusCode(_0x134781,null))[_0x5664('0x23')](handleError(_0x134781,null));};exports[_0x5664('0x4f')]=function(_0x42a6d0,_0x5b56a8){var _0x3bd80d=moment()[_0x5664('0x50')]()['toString']();var _0x3a4e87=path[_0x5664('0x51')](config[_0x5664('0x52')],_0x5664('0x53'),_0x5664('0x54'),_0x5664('0x55'));var _0x286f91=path['join'](config[_0x5664('0x52')],_0x5664('0x53'),_0x5664('0x54'),'attachments');var _0x5c2736=path[_0x5664('0x51')](_0x3a4e87,_0x3bd80d);var _0x5994c2=util[_0x5664('0x42')](_0x5664('0x56'),_0x42a6d0[_0x5664('0x24')]['id'],_0x3bd80d);var _0x38c15=path[_0x5664('0x51')](_0x3a4e87,_0x5994c2);var _0x250da5=[];if(_0x42a6d0[_0x5664('0x21')]['attachments']){_0x250da5[_0x5664('0x57')]({'model':db[_0x5664('0x58')],'as':'Attachments','raw':!![]});}var _0x3e58e9=[{'model':db[_0x5664('0x36')],'as':'Messages','attributes':['id',_0x5664('0x33'),_0x5664('0x59'),'to','cc',_0x5664('0x5a'),_0x5664('0x5b'),_0x5664('0x5c')],'where':{'secret':![]},'order':qs[_0x5664('0x3c')]('id'),'include':_0x250da5}];return db[_0x5664('0x1c')][_0x5664('0x31')]({'where':{'id':_0x42a6d0['params']['id']},'include':_0x3e58e9})[_0x5664('0x18')](handleEntityNotFound(_0x5b56a8,null))[_0x5664('0x18')](function(_0x14e97f){if(_0x14e97f&&_0x14e97f['Messages']){var _0xa32a48=_0x14e97f[_0x5664('0x5d')]({'plain':!![]});fs[_0x5664('0x5e')](_0x5c2736);return BPromise[_0x5664('0x5f')](_0xa32a48[_0x5664('0x60')],function(_0x2dc4cf,_0x102a9a){var _0x4d664f={'from':_0x2dc4cf[_0x5664('0x59')],'to':_0x2dc4cf['to']||_0x5664('0x61'),'subject':_0x2dc4cf[_0x5664('0x5b')],'html':htmlEntities[_0x5664('0x62')](_0x2dc4cf[_0x5664('0x33')]),'headers':{'Date':moment(_0x2dc4cf[_0x5664('0x5c')])[_0x5664('0x42')](_0x5664('0x63'))},'attachments':[]};if(_0x2dc4cf['cc']){_0x4d664f[_0x5664('0x64')]['Cc']=_0x2dc4cf['cc'];}if(_0x2dc4cf[_0x5664('0x5a')]){_0x4d664f[_0x5664('0x64')][_0x5664('0x65')]=_0x2dc4cf[_0x5664('0x5a')];}return new BPromise(function(_0x3209c,_0x2f89b7){if(_0x2dc4cf[_0x5664('0x66')]){for(var _0x177a88=0x0;_0x177a88<_0x2dc4cf[_0x5664('0x66')]['length'];_0x177a88++){var _0xb7e7c7=_0x2dc4cf[_0x5664('0x66')][_0x177a88];var _0x299afa=path[_0x5664('0x51')](_0x286f91,_0xb7e7c7[_0x5664('0x67')]);if(fs[_0x5664('0x68')](_0x299afa)){_0x4d664f[_0x5664('0x69')][_0x5664('0x57')]({'name':_0xb7e7c7['name'],'contentType':_0xb7e7c7[_0x5664('0x1d')],'data':fs['readFileSync'](_0x299afa)});}}}emlformat['build'](_0x4d664f,function(_0x1a4229,_0x245248){if(_0x1a4229)return _0x2f89b7(_0x1a4229);fs['writeFileSync'](path[_0x5664('0x51')](_0x5c2736,util[_0x5664('0x42')](_0x5664('0x6a'),_0x102a9a)),_0x245248);return _0x3209c(_0x245248);});});})[_0x5664('0x18')](function(){return new BPromise(function(_0x483193,_0x31c190){zipdir(_0x5c2736,{'saveTo':_0x38c15},function(_0x54c3ff,_0x42f14c){if(_0x54c3ff)return _0x31c190(_0x54c3ff);return _0x483193(_0x42f14c);});})[_0x5664('0x18')](function(){return new BPromise(function(_0x46cce6,_0x22e14a){rimraf(_0x5c2736,function(_0x9d49c3){if(_0x9d49c3)_0x22e14a(_0x9d49c3);return _0x46cce6();});});})['then'](function(){return _0x5b56a8[_0x5664('0x4f')](_0x38c15,_0x5994c2,function(_0x5210f7){if(!_0x5210f7)fs['unlinkSync'](_0x38c15);});});});}else{return _0x5b56a8[_0x5664('0xd')](0xc8);}})[_0x5664('0x23')](handleError(_0x5b56a8,null));}; \ No newline at end of file +var _0x7394=['pick','filter','$gte','split','format','YYYY-MM-DD\x20HH:mm:ss','count','findAll','inlineCss','true','rows','addTags','setTags','spread','color','emit','mailInteractionTags:save','removeTags','download','unix','join','files','tmp','root','server','attachments','transcript-%d-%s.zip','Attachment','Attachments','Messages','from','bcc','subject','get','each','missing.recipient@your.company.com','decode','createdAt','ddd,\x20DD\x20MMM\x20YYYY\x20HH:mm:ss\x20ZZ','headers','existsSync','push','name','readFileSync','writeFileSync','message%d.eml','unlinkSync','zip-dir','moment','bluebird','util','juice','ioredis','../../components/interaction/service','../../config/logger','../../config/environment','../../mysqldb','html-entities','redis','defaults','localhost','./mailInteraction.socket','register','sendStatus','status','end','json','offset','undefined','limit','Content-Range','update','then','destroy','stack','send','map','MailInteraction','rawAttributes','type','getOptions','mail','query','show','params','keys','filters','intersection','model','attributes','fields','length','includeAll','include','merge','options','find','catch','body','describe','addMessage','MailMessage','ids','omit','getMessages','findOne','hasOwnProperty','nolimit','order','sort','where'];(function(_0x524610,_0x5e14d0){var _0x2aa0d3=function(_0x4b1491){while(--_0x4b1491){_0x524610['push'](_0x524610['shift']());}};_0x2aa0d3(++_0x5e14d0);}(_0x7394,0x17c));var _0x4739=function(_0x2a3c22,_0x2d359a){_0x2a3c22=_0x2a3c22-0x0;var _0x1b34e7=_0x7394[_0x2a3c22];return _0x1b34e7;};'use strict';var emlformat=require('eml-format');var rimraf=require('rimraf');var zipdir=require(_0x4739('0x0'));var moment=require(_0x4739('0x1'));var BPromise=require(_0x4739('0x2'));var util=require(_0x4739('0x3'));var path=require('path');var fs=require('fs');var _=require('lodash');var juice=require(_0x4739('0x4'));var Redis=require(_0x4739('0x5'));var interaction=require(_0x4739('0x6'));var qs=require('../../components/parsers/qs');var logger=require(_0x4739('0x7'))('api');var config=require(_0x4739('0x8'));var db=require(_0x4739('0x9'))['db'];var htmlEntities=require(_0x4739('0xa'));config[_0x4739('0xb')]=_[_0x4739('0xc')](config['redis'],{'host':_0x4739('0xd'),'port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config[_0x4739('0xb')]));require(_0x4739('0xe'))[_0x4739('0xf')](socket);function respondWithStatusCode(_0x27b3a3,_0x4346d9){_0x4346d9=_0x4346d9||0xcc;return function(_0x3932bb){if(_0x3932bb){return _0x27b3a3[_0x4739('0x10')](_0x4346d9);}return _0x27b3a3[_0x4739('0x11')](_0x4346d9)[_0x4739('0x12')]();};}function respondWithResult(_0x195704,_0x116eed){_0x116eed=_0x116eed||0xc8;return function(_0x4b03ca){if(_0x4b03ca){return _0x195704[_0x4739('0x11')](_0x116eed)[_0x4739('0x13')](_0x4b03ca);}};}function respondWithFilteredResult(_0x56f15f,_0x3e90ac){return function(_0x5092f5){if(_0x5092f5){var _0x3c4750=typeof _0x3e90ac[_0x4739('0x14')]===_0x4739('0x15')&&typeof _0x3e90ac[_0x4739('0x16')]==='undefined';var _0x4dc6f7=_0x5092f5['count'];var _0x718da0=_0x3c4750?0x0:_0x3e90ac['offset'];var _0x55c81b=_0x3c4750?_0x5092f5['count']:_0x3e90ac['offset']+_0x3e90ac[_0x4739('0x16')];var _0x384021;if(_0x55c81b>=_0x4dc6f7){_0x55c81b=_0x4dc6f7;_0x384021=0xc8;}else{_0x384021=0xce;}_0x56f15f['status'](_0x384021);return _0x56f15f['set'](_0x4739('0x17'),_0x718da0+'-'+_0x55c81b+'/'+_0x4dc6f7)['json'](_0x5092f5);}return null;};}function saveUpdates(_0x973316){return function(_0x5769b1){if(_0x5769b1){return _0x5769b1[_0x4739('0x18')](_0x973316)[_0x4739('0x19')](function(_0x15dae7){return _0x15dae7;});}return null;};}function removeEntity(_0x32a2c4){return function(_0x3dd76e){if(_0x3dd76e){return _0x3dd76e[_0x4739('0x1a')]()[_0x4739('0x19')](function(){_0x32a2c4[_0x4739('0x11')](0xcc)[_0x4739('0x12')]();});}};}function handleEntityNotFound(_0x397d26){return function(_0x4ffb4a){if(!_0x4ffb4a){_0x397d26['sendStatus'](0x194);}return _0x4ffb4a;};}function handleError(_0x4fd448,_0x13d3de){_0x13d3de=_0x13d3de||0x1f4;return function(_0x1668fc){logger['error'](_0x1668fc[_0x4739('0x1b')]);if(_0x1668fc['name']){delete _0x1668fc['name'];}_0x4fd448[_0x4739('0x11')](_0x13d3de)[_0x4739('0x1c')](_0x1668fc);};}exports['index']=function(_0x1470cc,_0x39365c){var _0x365b70={};var _0x4c825e=_[_0x4739('0x1d')](db[_0x4739('0x1e')][_0x4739('0x1f')],function(_0x3c1c7e){return{'name':_0x3c1c7e['fieldName'],'type':_0x3c1c7e[_0x4739('0x20')]['key']};});_0x365b70=qs[_0x4739('0x21')](_0x4c825e,_0x1470cc);return interaction['findAll'](_0x4739('0x22'),_0x1470cc[_0x4739('0x23')],_0x1470cc['user'],_0x365b70,_0x4c825e)[_0x4739('0x19')](respondWithFilteredResult(_0x39365c,_0x365b70))['catch'](handleError(_0x39365c,null));};exports[_0x4739('0x24')]=function(_0x5e053a,_0x14760e){var _0x4cd8f3={'raw':![],'where':{'id':_0x5e053a[_0x4739('0x25')]['id']}},_0x3f8f2e={};_0x3f8f2e['model']=_[_0x4739('0x26')](db[_0x4739('0x1e')][_0x4739('0x1f')]);_0x3f8f2e[_0x4739('0x23')]=_['keys'](_0x5e053a[_0x4739('0x23')]);_0x3f8f2e[_0x4739('0x27')]=_[_0x4739('0x28')](_0x3f8f2e[_0x4739('0x29')],_0x3f8f2e[_0x4739('0x23')]);_0x4cd8f3[_0x4739('0x2a')]=_[_0x4739('0x28')](_0x3f8f2e['model'],qs[_0x4739('0x2b')](_0x5e053a[_0x4739('0x23')]['fields']));_0x4cd8f3[_0x4739('0x2a')]=_0x4cd8f3[_0x4739('0x2a')][_0x4739('0x2c')]?_0x4cd8f3[_0x4739('0x2a')]:_0x3f8f2e[_0x4739('0x29')];if(_0x5e053a[_0x4739('0x23')][_0x4739('0x2d')]){_0x4cd8f3[_0x4739('0x2e')]=[{'all':!![]}];}_0x4cd8f3=_[_0x4739('0x2f')]({},_0x4cd8f3,_0x5e053a[_0x4739('0x30')]);return db[_0x4739('0x1e')][_0x4739('0x31')](_0x4cd8f3)[_0x4739('0x19')](handleEntityNotFound(_0x14760e,null))[_0x4739('0x19')](respondWithResult(_0x14760e,null))[_0x4739('0x32')](handleError(_0x14760e,null));};exports['create']=function(_0x33c5a8,_0x5bd2c6){return db[_0x4739('0x1e')]['create'](_0x33c5a8[_0x4739('0x33')],{})[_0x4739('0x19')](respondWithResult(_0x5bd2c6,0xc9))[_0x4739('0x32')](handleError(_0x5bd2c6,null));};exports[_0x4739('0x18')]=function(_0x3812a3,_0x2cbb1b){if(_0x3812a3[_0x4739('0x33')]['id']){delete _0x3812a3['body']['id'];}return db[_0x4739('0x1e')][_0x4739('0x31')]({'where':{'id':_0x3812a3[_0x4739('0x25')]['id']}})[_0x4739('0x19')](handleEntityNotFound(_0x2cbb1b,null))[_0x4739('0x19')](saveUpdates(_0x3812a3[_0x4739('0x33')],null))[_0x4739('0x19')](respondWithResult(_0x2cbb1b,null))[_0x4739('0x32')](handleError(_0x2cbb1b,null));};exports[_0x4739('0x1a')]=function(_0x230573,_0x4172f5){return db[_0x4739('0x1e')][_0x4739('0x31')]({'where':{'id':_0x230573[_0x4739('0x25')]['id']}})[_0x4739('0x19')](handleEntityNotFound(_0x4172f5,null))[_0x4739('0x19')](removeEntity(_0x4172f5,null))[_0x4739('0x32')](handleError(_0x4172f5,null));};exports[_0x4739('0x34')]=function(_0x205bcf,_0x2c094b){return db[_0x4739('0x1e')][_0x4739('0x34')]()[_0x4739('0x19')](respondWithResult(_0x2c094b,null))['catch'](handleError(_0x2c094b,null));};exports[_0x4739('0x35')]=function(_0x5b456b,_0x5543aa){return db[_0x4739('0x36')][_0x4739('0x31')]({'where':{'id':_0x5b456b[_0x4739('0x25')]['id']}})['then'](handleEntityNotFound(_0x5543aa,null))['then'](function(_0x5ccaa8){if(_0x5ccaa8){return _0x5ccaa8[_0x4739('0x35')](_0x5b456b[_0x4739('0x33')][_0x4739('0x37')],_[_0x4739('0x38')](_0x5b456b[_0x4739('0x33')],['ids','id'])||{});}})['then'](respondWithResult(_0x5543aa,null))['catch'](handleError(_0x5543aa,null));};exports[_0x4739('0x39')]=function(_0x45229c,_0x436040){var _0x4b2aa9={'raw':![],'where':{}};var _0x3c99af={};var _0x260d84={'count':0x0,'rows':[]};return db['MailInteraction'][_0x4739('0x3a')]({'where':{'id':_0x45229c[_0x4739('0x25')]['id']}})[_0x4739('0x19')](handleEntityNotFound(_0x436040,null))[_0x4739('0x19')](function(_0x583b9f){if(_0x583b9f){_0x3c99af['model']=_['keys'](db[_0x4739('0x36')][_0x4739('0x1f')]);_0x3c99af[_0x4739('0x23')]=_['keys'](_0x45229c[_0x4739('0x23')]);_0x3c99af['filters']=_[_0x4739('0x28')](_0x3c99af['model'],_0x3c99af[_0x4739('0x23')]);_0x4b2aa9[_0x4739('0x2a')]=_[_0x4739('0x28')](_0x3c99af[_0x4739('0x29')],qs[_0x4739('0x2b')](_0x45229c['query'][_0x4739('0x2b')]));_0x4b2aa9[_0x4739('0x2a')]=_0x4b2aa9['attributes']['length']?_0x4b2aa9[_0x4739('0x2a')]:_0x3c99af['model'];if(!_0x45229c[_0x4739('0x23')][_0x4739('0x3b')](_0x4739('0x3c'))){_0x4b2aa9[_0x4739('0x16')]=qs[_0x4739('0x16')](_0x45229c[_0x4739('0x23')][_0x4739('0x16')]);_0x4b2aa9[_0x4739('0x14')]=qs[_0x4739('0x14')](_0x45229c['query']['offset']);}_0x4b2aa9[_0x4739('0x3d')]=qs[_0x4739('0x3e')](_0x45229c['query'][_0x4739('0x3e')]);_0x4b2aa9[_0x4739('0x3f')]=qs['filters'](_[_0x4739('0x40')](_0x45229c[_0x4739('0x23')],_0x3c99af[_0x4739('0x27')]));_0x4b2aa9[_0x4739('0x3f')]['MailInteractionId']=_0x583b9f['id'];if(_0x45229c[_0x4739('0x23')][_0x4739('0x41')]){_0x4b2aa9[_0x4739('0x3f')]=_[_0x4739('0x2f')](_0x4b2aa9[_0x4739('0x3f')],{'$or':_[_0x4739('0x1d')](_0x4b2aa9[_0x4739('0x2a')],function(_0x4e9778){var _0x500daf={};_0x500daf[_0x4e9778]={'$like':'%'+_0x45229c[_0x4739('0x23')][_0x4739('0x41')]+'%'};return _0x500daf;})});}if(_0x45229c[_0x4739('0x23')]['$gte']){var _0x32dce5=_0x45229c['query'][_0x4739('0x42')][_0x4739('0x43')](',');var _0x297eb5={};_0x297eb5[_0x32dce5[0x0]]={'$gte':moment(_0x32dce5[0x1])[_0x4739('0x44')](_0x4739('0x45'))};_0x4b2aa9['where']=_[_0x4739('0x2f')](_0x4b2aa9[_0x4739('0x3f')],_0x297eb5);}_0x4b2aa9=_[_0x4739('0x2f')]({},_0x4b2aa9,_0x45229c['options']);return db[_0x4739('0x36')][_0x4739('0x46')]({'where':_0x4b2aa9[_0x4739('0x3f')]})['then'](function(_0xca75f5){_0x260d84[_0x4739('0x46')]=_0xca75f5;if(_0x45229c[_0x4739('0x23')][_0x4739('0x2d')]){_0x4b2aa9[_0x4739('0x2e')]=[{'all':!![]}];}return db['MailMessage'][_0x4739('0x47')](_0x4b2aa9);})[_0x4739('0x19')](function(_0x46de2){if(_0x45229c[_0x4739('0x23')][_0x4739('0x48')]===_0x4739('0x49')){for(var _0x14abda=0x0;_0x14abda<_0x46de2[_0x4739('0x2c')];_0x14abda++){_0x46de2[_0x14abda][_0x4739('0x33')]=juice(_0x46de2[_0x14abda]['body']);}}_0x260d84[_0x4739('0x4a')]=_0x46de2;return _0x260d84;});}})[_0x4739('0x19')](respondWithFilteredResult(_0x436040,_0x4b2aa9))[_0x4739('0x32')](handleError(_0x436040,null));};exports[_0x4739('0x4b')]=function(_0x2277b5,_0x38bb24){return db[_0x4739('0x1e')][_0x4739('0x31')]({'where':{'id':_0x2277b5[_0x4739('0x25')]['id']}})[_0x4739('0x19')](handleEntityNotFound(_0x38bb24,null))[_0x4739('0x19')](function(_0x27eb2e){if(_0x27eb2e){return _0x27eb2e[_0x4739('0x4c')](_0x2277b5['body'][_0x4739('0x37')],_[_0x4739('0x38')](_0x2277b5[_0x4739('0x33')],[_0x4739('0x37'),'id'])||{})[_0x4739('0x4d')](function(){return db['Tag']['findAll']({'attributes':['id','name',_0x4739('0x4e')],'where':{'id':_0x2277b5['body'][_0x4739('0x37')]}});})[_0x4739('0x19')](function(_0x7b7b6d){socket[_0x4739('0x4f')](_0x4739('0x50'),{'id':Number(_0x2277b5[_0x4739('0x25')]['id']),'tags':_0x7b7b6d||[]});return{'id':Number(_0x2277b5['params']['id']),'tags':_0x7b7b6d||[]};});}})[_0x4739('0x19')](respondWithResult(_0x38bb24,null))[_0x4739('0x32')](handleError(_0x38bb24,null));};exports[_0x4739('0x51')]=function(_0x3b029e,_0x1e240f){return db[_0x4739('0x1e')][_0x4739('0x31')]({'where':{'id':_0x3b029e[_0x4739('0x25')]['id']}})['then'](handleEntityNotFound(_0x1e240f,null))[_0x4739('0x19')](function(_0x262e86){if(_0x262e86){return _0x262e86[_0x4739('0x51')](_0x3b029e[_0x4739('0x23')][_0x4739('0x37')]);}})[_0x4739('0x19')](respondWithStatusCode(_0x1e240f,null))[_0x4739('0x32')](handleError(_0x1e240f,null));};exports[_0x4739('0x52')]=function(_0x5cbdcf,_0x40694a){var _0x3c75ef=moment()[_0x4739('0x53')]()['toString']();var _0x3bf109=path[_0x4739('0x54')](config['root'],'server',_0x4739('0x55'),_0x4739('0x56'));var _0x2694db=path[_0x4739('0x54')](config[_0x4739('0x57')],_0x4739('0x58'),'files',_0x4739('0x59'));var _0x573d16=path[_0x4739('0x54')](_0x3bf109,_0x3c75ef);var _0x3f4620=util[_0x4739('0x44')](_0x4739('0x5a'),_0x5cbdcf[_0x4739('0x25')]['id'],_0x3c75ef);var _0x36579d=path['join'](_0x3bf109,_0x3f4620);var _0x442d81=[];if(_0x5cbdcf[_0x4739('0x23')][_0x4739('0x59')]){_0x442d81['push']({'model':db[_0x4739('0x5b')],'as':_0x4739('0x5c'),'raw':!![]});}var _0x18286c=[{'model':db[_0x4739('0x36')],'as':_0x4739('0x5d'),'attributes':['id',_0x4739('0x33'),_0x4739('0x5e'),'to','cc',_0x4739('0x5f'),_0x4739('0x60'),'createdAt'],'where':{'secret':![]},'order':qs[_0x4739('0x3e')]('id'),'include':_0x442d81}];return db[_0x4739('0x1e')][_0x4739('0x31')]({'where':{'id':_0x5cbdcf[_0x4739('0x25')]['id']},'include':_0x18286c})['then'](handleEntityNotFound(_0x40694a,null))[_0x4739('0x19')](function(_0x551914){if(_0x551914&&_0x551914[_0x4739('0x5d')]){var _0x6e7e1f=_0x551914[_0x4739('0x61')]({'plain':!![]});fs['mkdirSync'](_0x573d16);return BPromise[_0x4739('0x62')](_0x6e7e1f[_0x4739('0x5d')],function(_0x5a3d4e,_0x3d8710){var _0x4d08f3={'from':_0x5a3d4e['from'],'to':_0x5a3d4e['to']||_0x4739('0x63'),'subject':_0x5a3d4e[_0x4739('0x60')],'html':htmlEntities[_0x4739('0x64')](_0x5a3d4e[_0x4739('0x33')]),'headers':{'Date':moment(_0x5a3d4e[_0x4739('0x65')])['format'](_0x4739('0x66'))},'attachments':[]};if(_0x5a3d4e['cc']){_0x4d08f3['headers']['Cc']=_0x5a3d4e['cc'];}if(_0x5a3d4e['bcc']){_0x4d08f3[_0x4739('0x67')]['Bcc']=_0x5a3d4e['bcc'];}return new BPromise(function(_0x1a941b,_0x5b54c4){if(_0x5a3d4e[_0x4739('0x5c')]){for(var _0x2c0e49=0x0;_0x2c0e49<_0x5a3d4e[_0x4739('0x5c')]['length'];_0x2c0e49++){var _0x50b014=_0x5a3d4e[_0x4739('0x5c')][_0x2c0e49];var _0x27b78c=path['join'](_0x2694db,_0x50b014['basename']);if(fs[_0x4739('0x68')](_0x27b78c)){_0x4d08f3[_0x4739('0x59')][_0x4739('0x69')]({'name':_0x50b014[_0x4739('0x6a')],'contentType':_0x50b014[_0x4739('0x20')],'data':fs[_0x4739('0x6b')](_0x27b78c)});}}}emlformat['build'](_0x4d08f3,function(_0x19f026,_0x56520d){if(_0x19f026)return _0x5b54c4(_0x19f026);fs[_0x4739('0x6c')](path['join'](_0x573d16,util[_0x4739('0x44')](_0x4739('0x6d'),_0x3d8710)),_0x56520d);return _0x1a941b(_0x56520d);});});})['then'](function(){return new BPromise(function(_0x28d382,_0x19dc04){zipdir(_0x573d16,{'saveTo':_0x36579d},function(_0x455b48,_0x3f51b5){if(_0x455b48)return _0x19dc04(_0x455b48);return _0x28d382(_0x3f51b5);});})[_0x4739('0x19')](function(){return new BPromise(function(_0x199031,_0x46dafe){rimraf(_0x573d16,function(_0x1d390e){if(_0x1d390e)_0x46dafe(_0x1d390e);return _0x199031();});});})[_0x4739('0x19')](function(){return _0x40694a[_0x4739('0x52')](_0x36579d,_0x3f4620,function(_0x52fc8e){if(!_0x52fc8e)fs[_0x4739('0x6e')](_0x36579d);});});});}else{return _0x40694a[_0x4739('0x10')](0xc8);}})[_0x4739('0x32')](handleError(_0x40694a,null));}; \ No newline at end of file diff --git a/server/api/mailInteraction/mailInteraction.events.js b/server/api/mailInteraction/mailInteraction.events.js index 0b3c902..6e192d9 100644 --- a/server/api/mailInteraction/mailInteraction.events.js +++ b/server/api/mailInteraction/mailInteraction.events.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x2ed2=['map','findAll','emit','catch','hasOwnProperty','hook','exports','../../mysqldb','MailInteraction','MailMessage','setMaxListeners','remove','getUsers'];(function(_0x3e36fa,_0x56653f){var _0x528ac5=function(_0x3f14a9){while(--_0x3f14a9){_0x3e36fa['push'](_0x3e36fa['shift']());}};_0x528ac5(++_0x56653f);}(_0x2ed2,0x166));var _0x22ed=function(_0x258175,_0x55aac3){_0x258175=_0x258175-0x0;var _0x2a02fd=_0x2ed2[_0x258175];return _0x2a02fd;};'use strict';var EventEmitter=require('events');var MailInteraction=require(_0x22ed('0x0'))['db'][_0x22ed('0x1')];var MailMessage=require(_0x22ed('0x0'))['db'][_0x22ed('0x2')];var MailInteractionEvents=new EventEmitter();MailInteractionEvents[_0x22ed('0x3')](0x0);var events={'afterCreate':'save','afterUpdate':'update','afterDestroy':_0x22ed('0x4')};function emitEvent(_0x599c5f){return function(_0x575b03,_0x288fad,_0x2bd68e){_0x575b03[_0x22ed('0x5')]({'attributes':['id'],'raw':!![]})['then'](function(_0x370e0c){_0x575b03['setDataValue']('Users',_0x370e0c[_0x22ed('0x6')](function(_0x5f3b4b){return{'id':_0x5f3b4b['id']};}));return MailMessage[_0x22ed('0x7')]({'where':{'MailInteractionId':_0x575b03['id'],'direction':'in','read':![]},'raw':!![]});})['then'](function(_0x59157a){_0x575b03['setDataValue']('unreadMessages',_0x59157a['length']);MailInteractionEvents[_0x22ed('0x8')](_0x599c5f+':'+_0x575b03['id'],_0x575b03);MailInteractionEvents['emit'](_0x599c5f,_0x575b03);_0x2bd68e(null);})[_0x22ed('0x9')](_0x2bd68e(null));};}for(var e in events){if(events[_0x22ed('0xa')](e)){var event=events[e];MailInteraction[_0x22ed('0xb')](e,emitEvent(event));}}module[_0x22ed('0xc')]=MailInteractionEvents; \ No newline at end of file +var _0x06c8=['setDataValue','Users','map','then','unreadMessages','length','emit','hasOwnProperty','exports','../../mysqldb','MailMessage','setMaxListeners','update','remove','getUsers'];(function(_0x4d94f8,_0x28ba5b){var _0x450985=function(_0x50d515){while(--_0x50d515){_0x4d94f8['push'](_0x4d94f8['shift']());}};_0x450985(++_0x28ba5b);}(_0x06c8,0x90));var _0x806c=function(_0x4dbfa0,_0x22f00f){_0x4dbfa0=_0x4dbfa0-0x0;var _0x662629=_0x06c8[_0x4dbfa0];return _0x662629;};'use strict';var EventEmitter=require('events');var MailInteraction=require('../../mysqldb')['db']['MailInteraction'];var MailMessage=require(_0x806c('0x0'))['db'][_0x806c('0x1')];var MailInteractionEvents=new EventEmitter();MailInteractionEvents[_0x806c('0x2')](0x0);var events={'afterCreate':'save','afterUpdate':_0x806c('0x3'),'afterDestroy':_0x806c('0x4')};function emitEvent(_0x3eec0e){return function(_0x2ebb74,_0x38ec4a,_0x2f406b){_0x2ebb74[_0x806c('0x5')]({'attributes':['id'],'raw':!![]})['then'](function(_0x5a0087){_0x2ebb74[_0x806c('0x6')](_0x806c('0x7'),_0x5a0087[_0x806c('0x8')](function(_0x3b9fd7){return{'id':_0x3b9fd7['id']};}));return MailMessage['findAll']({'where':{'MailInteractionId':_0x2ebb74['id'],'direction':'in','read':![]},'raw':!![]});})[_0x806c('0x9')](function(_0x6510e1){_0x2ebb74[_0x806c('0x6')](_0x806c('0xa'),_0x6510e1[_0x806c('0xb')]);MailInteractionEvents[_0x806c('0xc')](_0x3eec0e+':'+_0x2ebb74['id'],_0x2ebb74);MailInteractionEvents['emit'](_0x3eec0e,_0x2ebb74);_0x2f406b(null);})['catch'](_0x2f406b(null));};}for(var e in events){if(events[_0x806c('0xd')](e)){var event=events[e];MailInteraction['hook'](e,emitEvent(event));}}module[_0x806c('0xe')]=MailInteractionEvents; \ No newline at end of file diff --git a/server/api/mailInteraction/mailInteraction.model.js b/server/api/mailInteraction/mailInteraction.model.js index 877c98d..4da9549 100644 --- a/server/api/mailInteraction/mailInteraction.model.js +++ b/server/api/mailInteraction/mailInteraction.model.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x2732=['substatus','YYYY-MM-DD\x20HH:mm:ss','closed','substatusAt','format','changed','closedAt','models','get','MailMessage','update','then','catch','utf8mb4','utf8mb4_unicode_ci','lodash','util','../../config/logger','api','moment','bluebird','request-promise','path','rimraf','../../config/environment','./mailInteraction.attributes','exports','define','mail_interactions','fti_mail_interactions','subject','FULLTEXT'];(function(_0x3dbc2a,_0x5ab934){var _0x92ddf7=function(_0x12a9f2){while(--_0x12a9f2){_0x3dbc2a['push'](_0x3dbc2a['shift']());}};_0x92ddf7(++_0x5ab934);}(_0x2732,0xaf));var _0x2273=function(_0x536470,_0xd07b76){_0x536470=_0x536470-0x0;var _0x581c09=_0x2732[_0x536470];return _0x581c09;};'use strict';var _=require(_0x2273('0x0'));var util=require(_0x2273('0x1'));var logger=require(_0x2273('0x2'))(_0x2273('0x3'));var moment=require(_0x2273('0x4'));var BPromise=require(_0x2273('0x5'));var rp=require(_0x2273('0x6'));var fs=require('fs');var path=require(_0x2273('0x7'));var rimraf=require(_0x2273('0x8'));var config=require(_0x2273('0x9'));var attributes=require(_0x2273('0xa'));module[_0x2273('0xb')]=function(_0x6d60b6,_0x4bb906){return _0x6d60b6[_0x2273('0xc')]('MailInteraction',attributes,{'tableName':_0x2273('0xd'),'paranoid':![],'indexes':[{'name':_0x2273('0xe'),'fields':[_0x2273('0xf'),'to'],'type':_0x2273('0x10')}],'timestamps':!![],'hooks':{'beforeCreate':function(_0x4638da,_0x3e1356,_0x2d9722){if(_0x4638da[_0x2273('0x11')]){_0x4638da['substatusAt']=moment()['format'](_0x2273('0x12'));}if(_0x4638da[_0x2273('0x13')]){_0x4638da['closedAt']=moment()['format'](_0x2273('0x12'));}_0x2d9722(null,_0x3e1356);},'beforeUpdate':function(_0x25a3d6,_0x579597,_0x4e52d2){if(_0x25a3d6['changed'](_0x2273('0x11'))){_0x25a3d6[_0x2273('0x14')]=_0x25a3d6[_0x2273('0x11')]?moment()[_0x2273('0x15')](_0x2273('0x12')):null;}if(_0x25a3d6[_0x2273('0x16')](_0x2273('0x13'))){_0x25a3d6[_0x2273('0x17')]=moment()[_0x2273('0x15')](_0x2273('0x12'));_0x25a3d6[_0x2273('0x11')]=null;_0x25a3d6['substatusAt']=null;}_0x4e52d2(null,_0x25a3d6);},'afterUpdate':function(_0x4d71eb,_0x57cecc,_0x41421a){var _0x419247=_0x6d60b6[_0x2273('0x18')];var _0x396683=_0x4d71eb[_0x2273('0x19')]({'plain':!![]});if(_0x396683[_0x2273('0x13')]){return _0x419247[_0x2273('0x1a')][_0x2273('0x1b')]({'read':!![]},{'where':{'MailInteractionId':_0x396683['id']}})[_0x2273('0x1c')](function(){_0x41421a();})[_0x2273('0x1d')](function(_0x49057d){_0x41421a(_0x49057d);});}else{_0x41421a();}}},'charset':_0x2273('0x1e'),'collate':_0x2273('0x1f')});}; \ No newline at end of file +var _0x1868=['format','YYYY-MM-DD\x20HH:mm:ss','changed','substatus','closedAt','models','get','closed','update','then','catch','utf8mb4','utf8mb4_unicode_ci','lodash','util','../../config/logger','moment','bluebird','request-promise','path','rimraf','../../config/environment','./mailInteraction.attributes','define','MailInteraction','fti_mail_interactions','subject','FULLTEXT','substatusAt'];(function(_0x33ab35,_0x297cdd){var _0x59bac6=function(_0x48ff16){while(--_0x48ff16){_0x33ab35['push'](_0x33ab35['shift']());}};_0x59bac6(++_0x297cdd);}(_0x1868,0x9e));var _0x8186=function(_0x18dda6,_0x40ecf4){_0x18dda6=_0x18dda6-0x0;var _0x59dbd0=_0x1868[_0x18dda6];return _0x59dbd0;};'use strict';var _=require(_0x8186('0x0'));var util=require(_0x8186('0x1'));var logger=require(_0x8186('0x2'))('api');var moment=require(_0x8186('0x3'));var BPromise=require(_0x8186('0x4'));var rp=require(_0x8186('0x5'));var fs=require('fs');var path=require(_0x8186('0x6'));var rimraf=require(_0x8186('0x7'));var config=require(_0x8186('0x8'));var attributes=require(_0x8186('0x9'));module['exports']=function(_0x29ac0f,_0x1cdcd8){return _0x29ac0f[_0x8186('0xa')](_0x8186('0xb'),attributes,{'tableName':'mail_interactions','paranoid':![],'indexes':[{'name':_0x8186('0xc'),'fields':[_0x8186('0xd'),'to'],'type':_0x8186('0xe')}],'timestamps':!![],'hooks':{'beforeCreate':function(_0x256e99,_0x263f72,_0x4106d0){if(_0x256e99['substatus']){_0x256e99[_0x8186('0xf')]=moment()[_0x8186('0x10')](_0x8186('0x11'));}if(_0x256e99['closed']){_0x256e99['closedAt']=moment()[_0x8186('0x10')](_0x8186('0x11'));}_0x4106d0(null,_0x263f72);},'beforeUpdate':function(_0x2440b6,_0xfb8781,_0x564f1b){if(_0x2440b6[_0x8186('0x12')](_0x8186('0x13'))){_0x2440b6[_0x8186('0xf')]=_0x2440b6['substatus']?moment()[_0x8186('0x10')](_0x8186('0x11')):null;}if(_0x2440b6['changed']('closed')){_0x2440b6[_0x8186('0x14')]=moment()['format']('YYYY-MM-DD\x20HH:mm:ss');_0x2440b6[_0x8186('0x13')]=null;_0x2440b6['substatusAt']=null;}_0x564f1b(null,_0x2440b6);},'afterUpdate':function(_0x43d4f7,_0x373e38,_0x182d91){var _0xe352d6=_0x29ac0f[_0x8186('0x15')];var _0x315852=_0x43d4f7[_0x8186('0x16')]({'plain':!![]});if(_0x315852[_0x8186('0x17')]){return _0xe352d6['MailMessage'][_0x8186('0x18')]({'read':!![]},{'where':{'MailInteractionId':_0x315852['id']}})[_0x8186('0x19')](function(){_0x182d91();})[_0x8186('0x1a')](function(_0x2c95a2){_0x182d91(_0x2c95a2);});}else{_0x182d91();}}},'charset':_0x8186('0x1b'),'collate':_0x8186('0x1c')});}; \ No newline at end of file diff --git a/server/api/mailInteraction/mailInteraction.rpc.js b/server/api/mailInteraction/mailInteraction.rpc.js index 5cd7f99..3cf1da2 100644 --- a/server/api/mailInteraction/mailInteraction.rpc.js +++ b/server/api/mailInteraction/mailInteraction.rpc.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xc3d5=['catch','UpdateMailInteraction','MailInteraction','update','options','raw','where','attributes','limit','debug','AddTagsToMailInteraction','body','ids','omit','spread','info','AddTags','util','../../mysqldb','../../config/utils','rpc','../../config/environment','jayson/promise','redis','defaults','./mailInteraction.socket','request','then','request\x20sent','MailInteraction,\x20%s,\x20%s,\x20%s','stringify','error','message','MailInteraction,\x20%s,\x20%s','result'];(function(_0x551029,_0x48001b){var _0x2c5333=function(_0x128ef0){while(--_0x128ef0){_0x551029['push'](_0x551029['shift']());}};_0x2c5333(++_0x48001b);}(_0xc3d5,0x16f));var _0x5c3d=function(_0x21bea9,_0x40d301){_0x21bea9=_0x21bea9-0x0;var _0x487aa3=_0xc3d5[_0x21bea9];return _0x487aa3;};'use strict';var _=require('lodash');var util=require(_0x5c3d('0x0'));var moment=require('moment');var BPromise=require('bluebird');var rs=require('randomstring');var fs=require('fs');var Redis=require('ioredis');var db=require(_0x5c3d('0x1'))['db'];var utils=require(_0x5c3d('0x2'));var logger=require('../../config/logger')(_0x5c3d('0x3'));var config=require(_0x5c3d('0x4'));var jayson=require(_0x5c3d('0x5'));var client=jayson['client']['http']({'port':0x232a});config[_0x5c3d('0x6')]=_[_0x5c3d('0x7')](config['redis'],{'host':'localhost','port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config[_0x5c3d('0x6')]));require(_0x5c3d('0x8'))['register'](socket);function respondWithRpcPromise(_0x59e390,_0x2bdb1f,_0x5a2064){return new BPromise(function(_0x2ada72,_0x16ea0f){return client[_0x5c3d('0x9')](_0x59e390,_0x5a2064)[_0x5c3d('0xa')](function(_0x549b14){logger['info']('MailInteraction,\x20%s,\x20%s',_0x2bdb1f,_0x5c3d('0xb'));logger['debug'](_0x5c3d('0xc'),_0x2bdb1f,_0x5c3d('0xb'),JSON[_0x5c3d('0xd')](_0x549b14));if(_0x549b14[_0x5c3d('0xe')]){if(_0x549b14[_0x5c3d('0xe')]['code']===0x1f4){logger['error']('MailInteraction,\x20%s,\x20%s',_0x2bdb1f,_0x549b14[_0x5c3d('0xe')][_0x5c3d('0xf')]);return _0x16ea0f(_0x549b14['error'][_0x5c3d('0xf')]);}logger[_0x5c3d('0xe')](_0x5c3d('0x10'),_0x2bdb1f,_0x549b14[_0x5c3d('0xe')][_0x5c3d('0xf')]);return _0x2ada72(_0x549b14[_0x5c3d('0xe')]['message']);}else{logger['info'](_0x5c3d('0x10'),_0x2bdb1f,_0x5c3d('0xb'));_0x2ada72(_0x549b14[_0x5c3d('0x11')][_0x5c3d('0xf')]);}})[_0x5c3d('0x12')](function(_0x363707){logger[_0x5c3d('0xe')](_0x5c3d('0x10'),_0x2bdb1f,_0x363707);_0x16ea0f(_0x363707);});});}exports[_0x5c3d('0x13')]=function(_0x1bc6a2){var _0x8d7626=this;return new Promise(function(_0x3162e2,_0x59803c){return db[_0x5c3d('0x14')][_0x5c3d('0x15')](_0x1bc6a2['body'],{'raw':_0x1bc6a2['options']?_0x1bc6a2[_0x5c3d('0x16')][_0x5c3d('0x17')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x1bc6a2['options']?_0x1bc6a2[_0x5c3d('0x16')][_0x5c3d('0x18')]||null:null,'attributes':_0x1bc6a2[_0x5c3d('0x16')]?_0x1bc6a2[_0x5c3d('0x16')][_0x5c3d('0x19')]||null:null,'limit':_0x1bc6a2['options']?_0x1bc6a2[_0x5c3d('0x16')][_0x5c3d('0x1a')]||null:null})[_0x5c3d('0xa')](function(_0x4cd192){logger['info'](_0x5c3d('0x13'),_0x1bc6a2);logger[_0x5c3d('0x1b')]('UpdateMailInteraction',_0x1bc6a2,JSON[_0x5c3d('0xd')](_0x4cd192));_0x3162e2(_0x4cd192);})[_0x5c3d('0x12')](function(_0x3f400e){logger[_0x5c3d('0xe')]('UpdateMailInteraction',_0x3f400e[_0x5c3d('0xf')],_0x1bc6a2);_0x59803c(_0x8d7626[_0x5c3d('0xe')](0x1f4,_0x3f400e[_0x5c3d('0xf')]));});});};exports[_0x5c3d('0x1c')]=function(_0xe21c55){return new Promise(function(_0x566c8f,_0x29b430){return db['MailInteraction']['find']({'where':_0xe21c55[_0x5c3d('0x16')]?_0xe21c55[_0x5c3d('0x16')][_0x5c3d('0x18')]||null:null})['then'](function(_0x2af95a){if(_0x2af95a){return _0x2af95a['addTags'](_0xe21c55[_0x5c3d('0x1d')][_0x5c3d('0x1e')],_[_0x5c3d('0x1f')](_0xe21c55[_0x5c3d('0x1d')],[_0x5c3d('0x1e'),'id'])||{});}})[_0x5c3d('0x20')](function(_0x4f59c8){logger[_0x5c3d('0x21')](_0x5c3d('0x22'),_0xe21c55);logger[_0x5c3d('0x1b')](_0x5c3d('0x22'),_0xe21c55,JSON['stringify'](_0x4f59c8));_0x566c8f(_0x4f59c8);})[_0x5c3d('0x12')](function(_0x6069c5){logger[_0x5c3d('0xe')](_0x5c3d('0x22'),_0x6069c5[_0x5c3d('0xf')],_0xe21c55);_0x29b430(_this[_0x5c3d('0xe')](0x1f4,_0x6069c5[_0x5c3d('0xf')]));});});}; \ No newline at end of file +var _0x705e=['ids','omit','spread','AddTags','util','moment','bluebird','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','redis','defaults','localhost','socket.io-emitter','MailInteraction,\x20%s,\x20%s','request\x20sent','MailInteraction,\x20%s,\x20%s,\x20%s','stringify','error','message','info','catch','MailInteraction','update','body','raw','options','limit','then','UpdateMailInteraction','debug','AddTagsToMailInteraction','find'];(function(_0x3b8c98,_0x9e6a9c){var _0x25a11d=function(_0x63e852){while(--_0x63e852){_0x3b8c98['push'](_0x3b8c98['shift']());}};_0x25a11d(++_0x9e6a9c);}(_0x705e,0x107));var _0xe705=function(_0x470212,_0x1387de){_0x470212=_0x470212-0x0;var _0x5083cb=_0x705e[_0x470212];return _0x5083cb;};'use strict';var _=require('lodash');var util=require(_0xe705('0x0'));var moment=require(_0xe705('0x1'));var BPromise=require(_0xe705('0x2'));var rs=require('randomstring');var fs=require('fs');var Redis=require('ioredis');var db=require('../../mysqldb')['db'];var utils=require(_0xe705('0x3'));var logger=require(_0xe705('0x4'))(_0xe705('0x5'));var config=require(_0xe705('0x6'));var jayson=require(_0xe705('0x7'));var client=jayson[_0xe705('0x8')][_0xe705('0x9')]({'port':0x232a});config[_0xe705('0xa')]=_[_0xe705('0xb')](config[_0xe705('0xa')],{'host':_0xe705('0xc'),'port':0x18eb});var socket=require(_0xe705('0xd'))(new Redis(config[_0xe705('0xa')]));require('./mailInteraction.socket')['register'](socket);function respondWithRpcPromise(_0x192eb3,_0x1ebbe1,_0x3a9ce0){return new BPromise(function(_0x317e85,_0x334c67){return client['request'](_0x192eb3,_0x3a9ce0)['then'](function(_0x481231){logger['info'](_0xe705('0xe'),_0x1ebbe1,_0xe705('0xf'));logger['debug'](_0xe705('0x10'),_0x1ebbe1,_0xe705('0xf'),JSON[_0xe705('0x11')](_0x481231));if(_0x481231[_0xe705('0x12')]){if(_0x481231[_0xe705('0x12')]['code']===0x1f4){logger[_0xe705('0x12')](_0xe705('0xe'),_0x1ebbe1,_0x481231[_0xe705('0x12')]['message']);return _0x334c67(_0x481231[_0xe705('0x12')][_0xe705('0x13')]);}logger['error'](_0xe705('0xe'),_0x1ebbe1,_0x481231[_0xe705('0x12')][_0xe705('0x13')]);return _0x317e85(_0x481231['error'][_0xe705('0x13')]);}else{logger[_0xe705('0x14')](_0xe705('0xe'),_0x1ebbe1,_0xe705('0xf'));_0x317e85(_0x481231['result'][_0xe705('0x13')]);}})[_0xe705('0x15')](function(_0x445536){logger[_0xe705('0x12')](_0xe705('0xe'),_0x1ebbe1,_0x445536);_0x334c67(_0x445536);});});}exports['UpdateMailInteraction']=function(_0xbbeb7a){var _0x3d8f61=this;return new Promise(function(_0x1e295a,_0x452592){return db[_0xe705('0x16')][_0xe705('0x17')](_0xbbeb7a[_0xe705('0x18')],{'raw':_0xbbeb7a['options']?_0xbbeb7a['options'][_0xe705('0x19')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0xbbeb7a[_0xe705('0x1a')]?_0xbbeb7a['options']['where']||null:null,'attributes':_0xbbeb7a[_0xe705('0x1a')]?_0xbbeb7a[_0xe705('0x1a')]['attributes']||null:null,'limit':_0xbbeb7a[_0xe705('0x1a')]?_0xbbeb7a[_0xe705('0x1a')][_0xe705('0x1b')]||null:null})[_0xe705('0x1c')](function(_0x1c9565){logger[_0xe705('0x14')](_0xe705('0x1d'),_0xbbeb7a);logger[_0xe705('0x1e')]('UpdateMailInteraction',_0xbbeb7a,JSON[_0xe705('0x11')](_0x1c9565));_0x1e295a(_0x1c9565);})[_0xe705('0x15')](function(_0xce046c){logger[_0xe705('0x12')](_0xe705('0x1d'),_0xce046c[_0xe705('0x13')],_0xbbeb7a);_0x452592(_0x3d8f61[_0xe705('0x12')](0x1f4,_0xce046c[_0xe705('0x13')]));});});};exports[_0xe705('0x1f')]=function(_0x23b27a){return new Promise(function(_0x4273dd,_0x307bbf){return db['MailInteraction'][_0xe705('0x20')]({'where':_0x23b27a[_0xe705('0x1a')]?_0x23b27a['options']['where']||null:null})[_0xe705('0x1c')](function(_0x3d036f){if(_0x3d036f){return _0x3d036f['addTags'](_0x23b27a['body'][_0xe705('0x21')],_[_0xe705('0x22')](_0x23b27a[_0xe705('0x18')],[_0xe705('0x21'),'id'])||{});}})[_0xe705('0x23')](function(_0x5ea6b7){logger[_0xe705('0x14')]('AddTags',_0x23b27a);logger[_0xe705('0x1e')](_0xe705('0x24'),_0x23b27a,JSON[_0xe705('0x11')](_0x5ea6b7));_0x4273dd(_0x5ea6b7);})[_0xe705('0x15')](function(_0x16e29d){logger[_0xe705('0x12')](_0xe705('0x24'),_0x16e29d[_0xe705('0x13')],_0x23b27a);_0x307bbf(_this['error'](0x1f4,_0x16e29d['message']));});});}; \ No newline at end of file diff --git a/server/api/mailInteraction/mailInteraction.socket.js b/server/api/mailInteraction/mailInteraction.socket.js index 1afa616..01df1b2 100644 --- a/server/api/mailInteraction/mailInteraction.socket.js +++ b/server/api/mailInteraction/mailInteraction.socket.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xb2cb=['mailInteraction:','./mailInteraction.events','save','update','emit','removeListener','register','length'];(function(_0xa464c9,_0x7c86d8){var _0x3d73c4=function(_0x5c2056){while(--_0x5c2056){_0xa464c9['push'](_0xa464c9['shift']());}};_0x3d73c4(++_0x7c86d8);}(_0xb2cb,0x139));var _0xbb2c=function(_0x3ec1da,_0x1e36f5){_0x3ec1da=_0x3ec1da-0x0;var _0x472358=_0xb2cb[_0x3ec1da];return _0x472358;};'use strict';var MailInteractionEvents=require(_0xbb2c('0x0'));var events=[_0xbb2c('0x1'),'remove',_0xbb2c('0x2')];function createListener(_0x53e6f5,_0x66e269){return function(_0x7ffead){_0x66e269[_0xbb2c('0x3')](_0x53e6f5,_0x7ffead);};}function removeListener(_0xff49de,_0x4790b5){return function(){MailInteractionEvents[_0xbb2c('0x4')](_0xff49de,_0x4790b5);};}exports[_0xbb2c('0x5')]=function(_0x211442){for(var _0x3263f9=0x0,_0x19bf1f=events[_0xbb2c('0x6')];_0x3263f9<_0x19bf1f;_0x3263f9++){var _0x236093=events[_0x3263f9];var _0x2fa969=createListener(_0xbb2c('0x7')+_0x236093,_0x211442);MailInteractionEvents['on'](_0x236093,_0x2fa969);}}; \ No newline at end of file +var _0xbb0f=['mailInteraction:','save','remove','removeListener','register','length'];(function(_0xd3f0ae,_0x5563bf){var _0x34671d=function(_0x2033f9){while(--_0x2033f9){_0xd3f0ae['push'](_0xd3f0ae['shift']());}};_0x34671d(++_0x5563bf);}(_0xbb0f,0x16f));var _0xfbb0=function(_0x5ef309,_0x421458){_0x5ef309=_0x5ef309-0x0;var _0x54546a=_0xbb0f[_0x5ef309];return _0x54546a;};'use strict';var MailInteractionEvents=require('./mailInteraction.events');var events=[_0xfbb0('0x0'),_0xfbb0('0x1'),'update'];function createListener(_0x456bd5,_0x4826f4){return function(_0x21602c){_0x4826f4['emit'](_0x456bd5,_0x21602c);};}function removeListener(_0x90373f,_0xf637e1){return function(){MailInteractionEvents[_0xfbb0('0x2')](_0x90373f,_0xf637e1);};}exports[_0xfbb0('0x3')]=function(_0x2252fc){for(var _0x496d80=0x0,_0x1f9d96=events[_0xfbb0('0x4')];_0x496d80<_0x1f9d96;_0x496d80++){var _0x41dfaa=events[_0x496d80];var _0x5804f9=createListener(_0xfbb0('0x5')+_0x41dfaa,_0x2252fc);MailInteractionEvents['on'](_0x41dfaa,_0x5804f9);}}; \ No newline at end of file diff --git a/server/api/mailMessage/index.js b/server/api/mailMessage/index.js index a3b25cd..72f6c4c 100644 --- a/server/api/mailMessage/index.js +++ b/server/api/mailMessage/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xf0e8=['reject','delete','destroy','exports','multer','util','connect-timeout','Router','fs-extra','../../components/interaction/service','../../config/environment','./mailMessage.controller','get','isAuthenticated','/describe','/:id','/:id/download','post','tracked','mail','create','put','update','/:id/accept','/:id/reject'];(function(_0x264f53,_0x33db5f){var _0x490668=function(_0xc3a7d4){while(--_0xc3a7d4){_0x264f53['push'](_0x264f53['shift']());}};_0x490668(++_0x33db5f);}(_0xf0e8,0x81));var _0x8f0e=function(_0x59ee6f,_0x450239){_0x59ee6f=_0x59ee6f-0x0;var _0x4c0979=_0xf0e8[_0x59ee6f];return _0x4c0979;};'use strict';var multer=require(_0x8f0e('0x0'));var util=require(_0x8f0e('0x1'));var path=require('path');var timeout=require(_0x8f0e('0x2'));var express=require('express');var router=express[_0x8f0e('0x3')]();var fs_extra=require(_0x8f0e('0x4'));var auth=require('../../components/auth/service');var interaction=require(_0x8f0e('0x5'));var config=require(_0x8f0e('0x6'));var controller=require(_0x8f0e('0x7'));router[_0x8f0e('0x8')]('/',auth[_0x8f0e('0x9')](),controller['index']);router['get'](_0x8f0e('0xa'),auth[_0x8f0e('0x9')](),controller['describe']);router[_0x8f0e('0x8')](_0x8f0e('0xb'),auth[_0x8f0e('0x9')](),controller['show']);router['get'](_0x8f0e('0xc'),auth[_0x8f0e('0x9')](),controller['download']);router[_0x8f0e('0xd')]('/',auth[_0x8f0e('0x9')](),interaction[_0x8f0e('0xe')](_0x8f0e('0xf'),'mailmessage:create'),controller[_0x8f0e('0x10')]);router[_0x8f0e('0x11')](_0x8f0e('0xb'),auth['isAuthenticated'](),controller[_0x8f0e('0x12')]);router['put'](_0x8f0e('0x13'),auth[_0x8f0e('0x9')](),controller['accept']);router[_0x8f0e('0x11')](_0x8f0e('0x14'),auth[_0x8f0e('0x9')](),controller[_0x8f0e('0x15')]);router[_0x8f0e('0x16')](_0x8f0e('0xb'),auth['isAuthenticated'](),controller[_0x8f0e('0x17')]);module[_0x8f0e('0x18')]=router; \ No newline at end of file +var _0xb74d=['update','/:id/accept','accept','/:id/reject','delete','destroy','multer','path','express','fs-extra','../../components/auth/service','../../components/interaction/service','./mailMessage.controller','get','isAuthenticated','/describe','describe','/:id/download','download','post','mailmessage:create','create','put','/:id'];(function(_0x74784d,_0x380276){var _0x7fbca9=function(_0x5ef105){while(--_0x5ef105){_0x74784d['push'](_0x74784d['shift']());}};_0x7fbca9(++_0x380276);}(_0xb74d,0x16e));var _0xdb74=function(_0x3c0dcc,_0x18c419){_0x3c0dcc=_0x3c0dcc-0x0;var _0x1a224c=_0xb74d[_0x3c0dcc];return _0x1a224c;};'use strict';var multer=require(_0xdb74('0x0'));var util=require('util');var path=require(_0xdb74('0x1'));var timeout=require('connect-timeout');var express=require(_0xdb74('0x2'));var router=express['Router']();var fs_extra=require(_0xdb74('0x3'));var auth=require(_0xdb74('0x4'));var interaction=require(_0xdb74('0x5'));var config=require('../../config/environment');var controller=require(_0xdb74('0x6'));router[_0xdb74('0x7')]('/',auth[_0xdb74('0x8')](),controller['index']);router['get'](_0xdb74('0x9'),auth['isAuthenticated'](),controller[_0xdb74('0xa')]);router[_0xdb74('0x7')]('/:id',auth[_0xdb74('0x8')](),controller['show']);router[_0xdb74('0x7')](_0xdb74('0xb'),auth['isAuthenticated'](),controller[_0xdb74('0xc')]);router[_0xdb74('0xd')]('/',auth[_0xdb74('0x8')](),interaction['tracked']('mail',_0xdb74('0xe')),controller[_0xdb74('0xf')]);router[_0xdb74('0x10')](_0xdb74('0x11'),auth[_0xdb74('0x8')](),controller[_0xdb74('0x12')]);router[_0xdb74('0x10')](_0xdb74('0x13'),auth[_0xdb74('0x8')](),controller[_0xdb74('0x14')]);router[_0xdb74('0x10')](_0xdb74('0x15'),auth[_0xdb74('0x8')](),controller['reject']);router[_0xdb74('0x16')](_0xdb74('0x11'),auth[_0xdb74('0x8')](),controller[_0xdb74('0x17')]);module['exports']=router; \ No newline at end of file diff --git a/server/api/mailMessage/mailMessage.attributes.js b/server/api/mailMessage/mailMessage.attributes.js index 8cdb8d2..78a334e 100644 --- a/server/api/mailMessage/mailMessage.attributes.js +++ b/server/api/mailMessage/mailMessage.attributes.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x6b74=['DATE','INTEGER','Email','Chat','sequelize','lodash','exports','TEXT','BOOLEAN','ENUM','out','STRING','long'];(function(_0x54b200,_0x4de933){var _0x48d81b=function(_0x141fd2){while(--_0x141fd2){_0x54b200['push'](_0x54b200['shift']());}};_0x48d81b(++_0x4de933);}(_0x6b74,0x1d8));var _0x46b7=function(_0x2eac4f,_0x5173f9){_0x2eac4f=_0x2eac4f-0x0;var _0x58f73b=_0x6b74[_0x2eac4f];return _0x58f73b;};'use strict';var Sequelize=require(_0x46b7('0x0'));var _=require(_0x46b7('0x1'));module[_0x46b7('0x2')]={'body':{'type':Sequelize[_0x46b7('0x3')]('long'),'allowNull':![]},'plainBody':{'type':Sequelize[_0x46b7('0x3')]('medium')},'read':{'type':Sequelize[_0x46b7('0x4')],'defaultValue':![]},'direction':{'type':Sequelize[_0x46b7('0x5')]('in',_0x46b7('0x6')),'defaultValue':_0x46b7('0x6'),'allowNull':![]},'messageId':{'type':Sequelize['STRING'](0x1fe)},'from':{'type':Sequelize[_0x46b7('0x7')]},'to':{'type':Sequelize[_0x46b7('0x3')](_0x46b7('0x8'))},'cc':{'type':Sequelize['TEXT'](_0x46b7('0x8'))},'bcc':{'type':Sequelize[_0x46b7('0x3')](_0x46b7('0x8'))},'subject':{'type':Sequelize[_0x46b7('0x3')]},'sentAt':{'type':Sequelize[_0x46b7('0x9')]},'attach':{'type':Sequelize[_0x46b7('0xa')],'defaultValue':0x0},'secret':{'type':Sequelize[_0x46b7('0x4')],'defaultValue':![]},'readAt':{'type':Sequelize[_0x46b7('0x9')]},'originTo':{'type':Sequelize['TEXT'](_0x46b7('0x8'))},'originCc':{'type':Sequelize[_0x46b7('0x3')](_0x46b7('0x8'))},'originChannel':{'type':Sequelize[_0x46b7('0x5')](_0x46b7('0xb'),_0x46b7('0xc')),'defaultValue':_0x46b7('0xb'),'allowNull':![]}}; \ No newline at end of file +var _0xa32b=['STRING','long','DATE','Email','sequelize','exports','TEXT','medium','BOOLEAN','out'];(function(_0x2067c1,_0x4ad413){var _0x4c2968=function(_0x51df02){while(--_0x51df02){_0x2067c1['push'](_0x2067c1['shift']());}};_0x4c2968(++_0x4ad413);}(_0xa32b,0x68));var _0xba32=function(_0x82129b,_0x484ae9){_0x82129b=_0x82129b-0x0;var _0x2ae5dc=_0xa32b[_0x82129b];return _0x2ae5dc;};'use strict';var Sequelize=require(_0xba32('0x0'));var _=require('lodash');module[_0xba32('0x1')]={'body':{'type':Sequelize['TEXT']('long'),'allowNull':![]},'plainBody':{'type':Sequelize[_0xba32('0x2')](_0xba32('0x3'))},'read':{'type':Sequelize[_0xba32('0x4')],'defaultValue':![]},'direction':{'type':Sequelize['ENUM']('in',_0xba32('0x5')),'defaultValue':_0xba32('0x5'),'allowNull':![]},'messageId':{'type':Sequelize[_0xba32('0x6')](0x1fe)},'from':{'type':Sequelize[_0xba32('0x6')]},'to':{'type':Sequelize[_0xba32('0x2')]('long')},'cc':{'type':Sequelize[_0xba32('0x2')]('long')},'bcc':{'type':Sequelize[_0xba32('0x2')](_0xba32('0x7'))},'subject':{'type':Sequelize[_0xba32('0x2')]},'sentAt':{'type':Sequelize[_0xba32('0x8')]},'attach':{'type':Sequelize['INTEGER'],'defaultValue':0x0},'secret':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'readAt':{'type':Sequelize['DATE']},'originTo':{'type':Sequelize['TEXT'](_0xba32('0x7'))},'originCc':{'type':Sequelize['TEXT'](_0xba32('0x7'))},'originChannel':{'type':Sequelize['ENUM'](_0xba32('0x9'),'Chat'),'defaultValue':'Email','allowNull':![]}}; \ No newline at end of file diff --git a/server/api/mailMessage/mailMessage.controller.js b/server/api/mailMessage/mailMessage.controller.js index 8b91127..6840071 100644 --- a/server/api/mailMessage/mailMessage.controller.js +++ b/server/api/mailMessage/mailMessage.controller.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x78b7=['json','offset','limit','undefined','count','set','Content-Range','update','then','sendStatus','stack','name','send','MailMessage','rawAttributes','fieldName','model','map','query','keys','filters','intersection','attributes','length','hasOwnProperty','nolimit','order','sort','where','pick','filter','merge','type','VIRTUAL','options','includeAll','rows','show','params','fields','include','find','body','destroy','describe','create','direction','out','secret','split','MailAccount','findOne','MailAccountId','CmContact','MailServerOut','CloudProvider','getSmtpOptions','attachments','server/files/attachments','List','Contacts','ListId','List\x20not\x20found','SendMail','format','YYYY-MM-DD\x20HH:mm:ss','accept','readAt','UserId','user','agent','MailInteraction','interaction','get','[MAILMESSAGE:ACCEPT]\x20id=%s\x20name=%s\x20role=%s\x20interaction=%s\x20body=%s','role','AcceptMessage','SELECT\x20*\x20FROM\x20cm_contacts\x20WHERE\x20id\x20=\x20','ContactId','sequelize','Sequelize','User','fullname','internal','interface','SIP/%s','channel','motionChannel','fromString','EventManager','reject','mail','MailInteractionId','RejectMessage','rejectMessage','QueryTypes','contact','email','event','rejectmessage','download','unix','root','server','files','tmp','from','bcc','subject','createdAt','Attachment','Attachments','decode','ddd,\x20DD\x20MMM\x20YYYY\x20HH:mm:ss\x20ZZ','headers','Bcc','join','basename','existsSync','push','readFileSync','writeFileSync','unlinkSync','eml-format','moment','bluebird','util','path','lodash','html-to-text','../../components/parsers/qs','../../config/logger','api','mail-interactions','../../config/environment','../../mysqldb','redis','defaults','localhost','socket.io-emitter','html-entities','./mailMessage.socket','register','jayson/promise','client','http','request','info','MailMessage,\x20%s,\x20%s','request\x20sent','debug','MailMessage,\x20%s,\x20%s,\x20%s','stringify','error','message','result','catch','status'];(function(_0x38af80,_0x22c3ed){var _0x106ae5=function(_0x3f2d6e){while(--_0x3f2d6e){_0x38af80['push'](_0x38af80['shift']());}};_0x106ae5(++_0x22c3ed);}(_0x78b7,0x7b));var _0x778b=function(_0x2b14a4,_0x412175){_0x2b14a4=_0x2b14a4-0x0;var _0x4f87ca=_0x78b7[_0x2b14a4];return _0x4f87ca;};'use strict';var emlformat=require(_0x778b('0x0'));var moment=require(_0x778b('0x1'));var BPromise=require(_0x778b('0x2'));var util=require(_0x778b('0x3'));var path=require(_0x778b('0x4'));var fs=require('fs');var _=require(_0x778b('0x5'));var Redis=require('ioredis');var htmlToText=require(_0x778b('0x6'));var qs=require(_0x778b('0x7'));var logger=require(_0x778b('0x8'))(_0x778b('0x9'));var interaction_log=require(_0x778b('0x8'))(_0x778b('0xa'));var config=require(_0x778b('0xb'));var db=require(_0x778b('0xc'))['db'];config[_0x778b('0xd')]=_[_0x778b('0xe')](config[_0x778b('0xd')],{'host':_0x778b('0xf'),'port':0x18eb});var socket=require(_0x778b('0x10'))(new Redis(config['redis']));var htmlEntities=require(_0x778b('0x11'));require(_0x778b('0x12'))[_0x778b('0x13')](socket);var jayson=require(_0x778b('0x14'));var client=jayson[_0x778b('0x15')][_0x778b('0x16')]({'port':0x232c});var client9003=jayson[_0x778b('0x15')][_0x778b('0x16')]({'port':0x232b});var client9002=jayson['client'][_0x778b('0x16')]({'port':0x232a});function respondWithRpcPromise(_0x557130,_0x22521c,_0x55832f,_0x698345){return new BPromise(function(_0x19515a,_0x190a5e){var _0x1003fd=_0x698345||client;return _0x1003fd[_0x778b('0x17')](_0x557130,_0x55832f)['then'](function(_0x2cee02){logger[_0x778b('0x18')](_0x778b('0x19'),_0x22521c,_0x778b('0x1a'));logger[_0x778b('0x1b')](_0x778b('0x1c'),_0x22521c,'request\x20sent',JSON[_0x778b('0x1d')](_0x2cee02));if(_0x2cee02[_0x778b('0x1e')]){if(_0x2cee02[_0x778b('0x1e')]['code']===0x1f4){logger[_0x778b('0x1e')](_0x778b('0x19'),_0x22521c,_0x2cee02['error'][_0x778b('0x1f')]);return _0x190a5e(_0x2cee02['error'][_0x778b('0x1f')]);}logger[_0x778b('0x1e')]('MailMessage,\x20%s,\x20%s',_0x22521c,_0x2cee02[_0x778b('0x1e')][_0x778b('0x1f')]);return _0x19515a(_0x2cee02['error']['message']);}else{logger[_0x778b('0x18')](_0x778b('0x19'),_0x22521c,_0x778b('0x1a'));_0x19515a(_0x2cee02[_0x778b('0x20')][_0x778b('0x1f')]);}})[_0x778b('0x21')](function(_0x2a405e){logger[_0x778b('0x1e')]('MailMessage,\x20%s,\x20%s',_0x22521c,_0x2a405e);_0x190a5e(_0x2a405e);});});}function respondWithResult(_0x441d5f,_0x432afa){_0x432afa=_0x432afa||0xc8;return function(_0x380a4c){if(_0x380a4c){return _0x441d5f[_0x778b('0x22')](_0x432afa)[_0x778b('0x23')](_0x380a4c);}};}function respondWithFilteredResult(_0x135c74,_0x55deaa){return function(_0x2078de){if(_0x2078de){var _0x48e506=typeof _0x55deaa[_0x778b('0x24')]==='undefined'&&typeof _0x55deaa[_0x778b('0x25')]===_0x778b('0x26');var _0x3da57b=_0x2078de[_0x778b('0x27')];var _0x299f83=_0x48e506?0x0:_0x55deaa['offset'];var _0x299b81=_0x48e506?_0x2078de[_0x778b('0x27')]:_0x55deaa[_0x778b('0x24')]+_0x55deaa[_0x778b('0x25')];var _0x34f630;if(_0x299b81>=_0x3da57b){_0x299b81=_0x3da57b;_0x34f630=0xc8;}else{_0x34f630=0xce;}_0x135c74['status'](_0x34f630);return _0x135c74[_0x778b('0x28')](_0x778b('0x29'),_0x299f83+'-'+_0x299b81+'/'+_0x3da57b)['json'](_0x2078de);}return null;};}function saveUpdates(_0x151f48){return function(_0x3a76b6){if(_0x3a76b6){return _0x3a76b6[_0x778b('0x2a')](_0x151f48)[_0x778b('0x2b')](function(_0x5785af){return _0x5785af;});}return null;};}function removeEntity(_0x398746){return function(_0x540ed2){if(_0x540ed2){return _0x540ed2['destroy']()['then'](function(){_0x398746[_0x778b('0x22')](0xcc)['end']();});}};}function handleEntityNotFound(_0x3b3ca5){return function(_0x5ae672){if(!_0x5ae672){_0x3b3ca5[_0x778b('0x2c')](0x194);}return _0x5ae672;};}function handleError(_0x1d7c8e,_0x53044d){_0x53044d=_0x53044d||0x1f4;return function(_0x46fe38){logger[_0x778b('0x1e')](_0x46fe38[_0x778b('0x2d')]);if(_0x46fe38[_0x778b('0x2e')]){delete _0x46fe38[_0x778b('0x2e')];}_0x1d7c8e[_0x778b('0x22')](_0x53044d)[_0x778b('0x2f')](_0x46fe38);};}exports['index']=function(_0x59302c,_0x176cfd){var _0x51e816={},_0x152ee7={},_0x3bbb69={'count':0x0,'rows':[]};var _0x436e58=_['map'](db[_0x778b('0x30')][_0x778b('0x31')],function(_0x58f00e){return{'name':_0x58f00e[_0x778b('0x32')],'type':_0x58f00e['type']['key']};});_0x152ee7[_0x778b('0x33')]=_[_0x778b('0x34')](_0x436e58,_0x778b('0x2e'));_0x152ee7[_0x778b('0x35')]=_[_0x778b('0x36')](_0x59302c['query']);_0x152ee7[_0x778b('0x37')]=_[_0x778b('0x38')](_0x152ee7[_0x778b('0x33')],_0x152ee7['query']);_0x51e816['attributes']=_['intersection'](_0x152ee7[_0x778b('0x33')],qs['fields'](_0x59302c[_0x778b('0x35')]['fields']));_0x51e816[_0x778b('0x39')]=_0x51e816[_0x778b('0x39')][_0x778b('0x3a')]?_0x51e816[_0x778b('0x39')]:_0x152ee7[_0x778b('0x33')];if(!_0x59302c['query'][_0x778b('0x3b')](_0x778b('0x3c'))){_0x51e816['limit']=qs['limit'](_0x59302c[_0x778b('0x35')][_0x778b('0x25')]);_0x51e816[_0x778b('0x24')]=qs[_0x778b('0x24')](_0x59302c[_0x778b('0x35')][_0x778b('0x24')]);}_0x51e816[_0x778b('0x3d')]=qs[_0x778b('0x3e')](_0x59302c['query']['sort']);_0x51e816[_0x778b('0x3f')]=qs[_0x778b('0x37')](_[_0x778b('0x40')](_0x59302c[_0x778b('0x35')],_0x152ee7[_0x778b('0x37')]),_0x436e58);if(_0x59302c[_0x778b('0x35')][_0x778b('0x41')]){_0x51e816[_0x778b('0x3f')]=_[_0x778b('0x42')](_0x51e816['where'],{'$or':_['map'](_0x436e58,function(_0x2ea1bd){if(_0x2ea1bd[_0x778b('0x43')]!==_0x778b('0x44')){var _0x142a6c={};_0x142a6c[_0x2ea1bd[_0x778b('0x2e')]]={'$like':'%'+_0x59302c[_0x778b('0x35')][_0x778b('0x41')]+'%'};return _0x142a6c;}})});}_0x51e816=_[_0x778b('0x42')]({},_0x51e816,_0x59302c[_0x778b('0x45')]);var _0x1786d9={'where':_0x51e816[_0x778b('0x3f')]};return db[_0x778b('0x30')]['count'](_0x1786d9)['then'](function(_0x4aa751){_0x3bbb69['count']=_0x4aa751;if(_0x59302c['query'][_0x778b('0x46')]){_0x51e816['include']=[{'all':!![]}];}return db[_0x778b('0x30')]['findAll'](_0x51e816);})[_0x778b('0x2b')](function(_0x5516d0){_0x3bbb69[_0x778b('0x47')]=_0x5516d0;return _0x3bbb69;})['then'](respondWithFilteredResult(_0x176cfd,_0x51e816))[_0x778b('0x21')](handleError(_0x176cfd,null));};exports[_0x778b('0x48')]=function(_0x25ea31,_0x3e562f){var _0x35f6fe={'raw':!![],'where':{'id':_0x25ea31[_0x778b('0x49')]['id']}},_0x491e08={};_0x491e08[_0x778b('0x33')]=_[_0x778b('0x36')](db[_0x778b('0x30')][_0x778b('0x31')]);_0x491e08[_0x778b('0x35')]=_[_0x778b('0x36')](_0x25ea31[_0x778b('0x35')]);_0x491e08[_0x778b('0x37')]=_['intersection'](_0x491e08[_0x778b('0x33')],_0x491e08[_0x778b('0x35')]);_0x35f6fe[_0x778b('0x39')]=_[_0x778b('0x38')](_0x491e08[_0x778b('0x33')],qs[_0x778b('0x4a')](_0x25ea31[_0x778b('0x35')][_0x778b('0x4a')]));_0x35f6fe[_0x778b('0x39')]=_0x35f6fe[_0x778b('0x39')]['length']?_0x35f6fe[_0x778b('0x39')]:_0x491e08[_0x778b('0x33')];if(_0x25ea31['query'][_0x778b('0x46')]){_0x35f6fe[_0x778b('0x4b')]=[{'all':!![]}];}_0x35f6fe=_[_0x778b('0x42')]({},_0x35f6fe,_0x25ea31[_0x778b('0x45')]);return db[_0x778b('0x30')][_0x778b('0x4c')](_0x35f6fe)[_0x778b('0x2b')](handleEntityNotFound(_0x3e562f,null))['then'](respondWithResult(_0x3e562f,null))['catch'](handleError(_0x3e562f,null));};exports[_0x778b('0x2a')]=function(_0x325504,_0x58121e){if(_0x325504[_0x778b('0x4d')]['id']){delete _0x325504[_0x778b('0x4d')]['id'];}return db[_0x778b('0x30')][_0x778b('0x4c')]({'where':{'id':_0x325504['params']['id']}})[_0x778b('0x2b')](handleEntityNotFound(_0x58121e,null))[_0x778b('0x2b')](saveUpdates(_0x325504[_0x778b('0x4d')],null))[_0x778b('0x2b')](respondWithResult(_0x58121e,null))[_0x778b('0x21')](handleError(_0x58121e,null));};exports[_0x778b('0x4e')]=function(_0x2acb87,_0x28dd69){return db[_0x778b('0x30')][_0x778b('0x4c')]({'where':{'id':_0x2acb87[_0x778b('0x49')]['id']}})[_0x778b('0x2b')](handleEntityNotFound(_0x28dd69,null))[_0x778b('0x2b')](removeEntity(_0x28dd69,null))['catch'](handleError(_0x28dd69,null));};exports[_0x778b('0x4f')]=function(_0x14a769,_0x298daf){return db[_0x778b('0x30')][_0x778b('0x4f')]()['then'](respondWithResult(_0x298daf,null))[_0x778b('0x21')](handleError(_0x298daf,null));};exports[_0x778b('0x50')]=function(_0x5ba9c3,_0x1032f0){return db[_0x778b('0x30')][_0x778b('0x50')](_0x5ba9c3['body'])[_0x778b('0x2b')](function(_0x3a5ad8){if(_0x3a5ad8){if(_0x3a5ad8[_0x778b('0x51')]===_0x778b('0x52')&&!_0x3a5ad8[_0x778b('0x53')]){var _0x3b2206,_0x54b2b9,_0x4c69e4;if(_0x5ba9c3['body']['to']){_0x54b2b9=_0x5ba9c3['body']['to'][_0x778b('0x54')](',')[0x0];}return db[_0x778b('0x55')][_0x778b('0x56')]({'where':{'id':_0x3a5ad8[_0x778b('0x57')]},'include':[{'model':db['CmList'],'as':'List','include':[{'model':db[_0x778b('0x58')],'as':'Contacts','where':{'email':_0x54b2b9},'limit':0x1,'order':[['updatedAt','DESC']]}]},{'model':db[_0x778b('0x59')],'as':'Smtp','raw':!![],'include':[{'model':db[_0x778b('0x5a')],'as':'CloudProvider','raw':!![]}]}]})[_0x778b('0x2b')](function(_0x26067d){_0x3b2206=_0x26067d;if(!_0x3b2206||!_0x3b2206['Smtp'])return;var _0x3a4739=_0x3b2206[_0x778b('0x5b')]();if(_0x5ba9c3['body']['attachments']&&_0x5ba9c3[_0x778b('0x4d')][_0x778b('0x5c')]['length']){for(var _0x5a74f1=0x0;_0x5a74f1<_0x5ba9c3[_0x778b('0x4d')]['attachments'][_0x778b('0x3a')];_0x5a74f1+=0x1){_0x5ba9c3[_0x778b('0x4d')][_0x778b('0x5c')][_0x5a74f1]={'filename':_0x5ba9c3[_0x778b('0x4d')][_0x778b('0x5c')][_0x5a74f1][_0x778b('0x2e')],'path':path['join'](config['root'],_0x778b('0x5d'),_0x5ba9c3[_0x778b('0x4d')]['attachments'][_0x5a74f1]['basename'])};}}_0x4c69e4={'account':_0x3a4739,'message':_0x5ba9c3[_0x778b('0x4d')]};return;})[_0x778b('0x2b')](function(){if(_0x3b2206['List']){if(_0x3b2206[_0x778b('0x5e')][_0x778b('0x5f')]['length']){return _0x3b2206[_0x778b('0x5e')][_0x778b('0x5f')][0x0];}else{return db[_0x778b('0x58')][_0x778b('0x50')](_[_0x778b('0xe')](_0x5ba9c3['body'],{'firstName':_0x5ba9c3['body']['to'],'email':_0x5ba9c3[_0x778b('0x4d')]['to'],'phone':_0x5ba9c3[_0x778b('0x4d')]['to'],'ListId':_0x3b2206[_0x778b('0x60')]}));}}else{throw new Error(_0x778b('0x61'));}})[_0x778b('0x2b')](function(){if(_0x4c69e4){return respondWithRpcPromise(_0x778b('0x62'),'sendMail',_0x4c69e4,client9003)[_0x778b('0x2b')](function(_0x1cc9f9){return _0x3a5ad8['update']({'read':!![],'messageId':_0x1cc9f9['messageId'],'sentAt':moment()[_0x778b('0x63')](_0x778b('0x64'))});})[_0x778b('0x21')](function(_0x446367){logger[_0x778b('0x1e')]('%s',JSON['stringify'](_0x446367));return _0x3a5ad8;});}return _0x3a5ad8;});}return _0x3a5ad8;}})[_0x778b('0x2b')](respondWithResult(_0x1032f0,0xc9))[_0x778b('0x21')](handleError(_0x1032f0,null));};exports[_0x778b('0x65')]=function(_0x15ab4c,_0x178166){var _0x5a77c9={'agent':{},'channel':'mail'};if(_0x15ab4c[_0x778b('0x4d')]['id']){delete _0x15ab4c[_0x778b('0x4d')]['id'];}_0x15ab4c['body']['read']=!![];_0x15ab4c[_0x778b('0x4d')][_0x778b('0x66')]=moment()[_0x778b('0x63')](_0x778b('0x64'));_0x15ab4c[_0x778b('0x4d')][_0x778b('0x67')]=_0x15ab4c[_0x778b('0x4d')][_0x778b('0x67')]||_0x15ab4c[_0x778b('0x68')]['id'];_0x5a77c9[_0x778b('0x69')]['id']=_0x15ab4c[_0x778b('0x4d')][_0x778b('0x67')];return db[_0x778b('0x30')][_0x778b('0x4c')]({'where':{'id':_0x15ab4c[_0x778b('0x49')]['id'],'UserId':null}})[_0x778b('0x2b')](handleEntityNotFound(_0x178166,null))[_0x778b('0x2b')](saveUpdates(_0x15ab4c[_0x778b('0x4d')],null))[_0x778b('0x2b')](function(_0x10fe4f){if(_0x10fe4f){_0x5a77c9[_0x778b('0x1f')]=_0x10fe4f['get']({'plain':!![]});return db[_0x778b('0x6a')][_0x778b('0x4c')]({'where':{'id':_0x10fe4f['MailInteractionId']}});}return null;})[_0x778b('0x2b')](handleEntityNotFound(_0x178166,null))[_0x778b('0x2b')](function(_0x4447e7){if(_0x4447e7){return _0x4447e7[_0x778b('0x2a')]({'UserId':_0x15ab4c[_0x778b('0x4d')][_0x778b('0x67')],'read1stAt':_['isNil'](_0x4447e7['read1stAt'])?moment()[_0x778b('0x63')](_0x778b('0x64')):undefined});}return null;})[_0x778b('0x2b')](function(_0x1451e5){if(_0x1451e5){_0x5a77c9[_0x778b('0x6b')]=_0x1451e5[_0x778b('0x6c')]({'plain':!![]});interaction_log[_0x778b('0x18')](_0x778b('0x6d'),_0x15ab4c[_0x778b('0x68')]['id'],_0x15ab4c[_0x778b('0x68')][_0x778b('0x2e')],_0x15ab4c['user'][_0x778b('0x6e')],_0x5a77c9[_0x778b('0x6b')]['id'],_0x15ab4c['body']?JSON[_0x778b('0x1d')](_0x15ab4c[_0x778b('0x4d')]):'null');return respondWithRpcPromise(_0x778b('0x6f'),'acceptMessage',_0x5a77c9);}return null;})['then'](function(_0x3351a5){var _0x2459e6=_0x778b('0x70')+_0x3351a5['message'][_0x778b('0x71')];return db[_0x778b('0x72')][_0x778b('0x35')](_0x2459e6,{'type':db[_0x778b('0x73')]['QueryTypes']['SELECT'],'raw':!![]})[_0x778b('0x2b')](function(_0x4c4140){return _0x4c4140;});})[_0x778b('0x2b')](function(_0x52dd23){if(_0x52dd23){_0x5a77c9[_0x778b('0x1f')]['contact']=_0x52dd23[0x0];if(!_0x15ab4c[_0x778b('0x4d')][_0x778b('0x67')])return;return db[_0x778b('0x74')]['find']({'where':{'id':_0x15ab4c[_0x778b('0x4d')][_0x778b('0x67')],'role':_0x778b('0x69')},'attributes':['id',_0x778b('0x2e'),_0x778b('0x75'),'email',_0x778b('0x76')],'raw':!![]});}return null;})[_0x778b('0x2b')](function(_0x1a78cc){if(!_0x1a78cc)return null;_0x5a77c9['message'][_0x778b('0x69')]=_0x1a78cc;return _0x5a77c9;})['then'](function(_0x2ec1fe){if(_0x2ec1fe){if(_0x15ab4c[_0x778b('0x4d')]['manual']){_0x5a77c9[_0x778b('0x1f')][_0x778b('0x77')]=util[_0x778b('0x63')](_0x778b('0x78'),_0x15ab4c[_0x778b('0x68')]['name']);_0x5a77c9['message']['channel']=_0x5a77c9[_0x778b('0x79')];_0x5a77c9[_0x778b('0x1f')][_0x778b('0x7a')]=_0x5a77c9[_0x778b('0x79')];_0x5a77c9[_0x778b('0x1f')]['event']=_0x778b('0x65');_0x5a77c9[_0x778b('0x1f')][_0x778b('0x4d')]=htmlToText[_0x778b('0x7b')](_0x5a77c9[_0x778b('0x1f')][_0x778b('0x4d')]);return respondWithRpcPromise(_0x778b('0x7c'),_0x778b('0x7c'),{'event':'acceptmessage','message':_0x5a77c9['message']},client9002)[_0x778b('0x2b')](function(){return _0x5a77c9;});}return _0x5a77c9;}return null;})[_0x778b('0x2b')](respondWithResult(_0x178166,null))[_0x778b('0x21')](handleError(_0x178166,null));};exports[_0x778b('0x7d')]=function(_0x3926ad,_0x4aa376){var _0xd06436={'agent':{},'channel':_0x778b('0x7e')};if(_0x3926ad[_0x778b('0x4d')]['id']){delete _0x3926ad[_0x778b('0x4d')]['id'];}_0x3926ad[_0x778b('0x4d')][_0x778b('0x67')]=_0x3926ad['body'][_0x778b('0x67')]||_0x3926ad['user']['id'];_0xd06436[_0x778b('0x69')]['id']=_0x3926ad[_0x778b('0x4d')][_0x778b('0x67')];return db[_0x778b('0x30')]['find']({'where':{'id':_0x3926ad[_0x778b('0x49')]['id'],'UserId':null}})[_0x778b('0x2b')](handleEntityNotFound(_0x4aa376,null))['then'](function(_0x1da3e7){if(_0x1da3e7){_0xd06436[_0x778b('0x1f')]=_0x1da3e7[_0x778b('0x6c')]({'plain':!![]});return db[_0x778b('0x6a')][_0x778b('0x4c')]({'where':{'id':_0x1da3e7[_0x778b('0x7f')]}});}return null;})[_0x778b('0x2b')](handleEntityNotFound(_0x4aa376,null))[_0x778b('0x2b')](function(_0x35a699){if(_0x35a699){_0xd06436[_0x778b('0x6b')]=_0x35a699[_0x778b('0x6c')]({'plain':!![]});interaction_log['info']('[MAILMESSAGE:REJECT]\x20id=%s\x20name=%s\x20role=%s\x20interaction=%s\x20body=%s',_0x3926ad[_0x778b('0x68')]['id'],_0x3926ad['user'][_0x778b('0x2e')],_0x3926ad[_0x778b('0x68')][_0x778b('0x6e')],_0xd06436[_0x778b('0x6b')]['id'],_0x3926ad['body']?JSON[_0x778b('0x1d')](_0x3926ad[_0x778b('0x4d')]):'null');return respondWithRpcPromise(_0x778b('0x80'),_0x778b('0x81'),_0xd06436);}return null;})[_0x778b('0x2b')](function(_0x199020){var _0x6b308b=_0x778b('0x70')+_0x199020[_0x778b('0x1f')][_0x778b('0x71')];return db[_0x778b('0x72')]['query'](_0x6b308b,{'type':db[_0x778b('0x73')][_0x778b('0x82')]['SELECT'],'raw':!![]})[_0x778b('0x2b')](function(_0x3d3484){return _0x3d3484;});})['then'](function(_0x3a24c1){if(_0x3a24c1){_0xd06436['message'][_0x778b('0x83')]=_0x3a24c1[0x0];if(!_0x3926ad[_0x778b('0x4d')]['UserId'])return;return db[_0x778b('0x74')][_0x778b('0x4c')]({'where':{'id':_0x3926ad[_0x778b('0x4d')][_0x778b('0x67')],'role':_0x778b('0x69')},'attributes':['id','name',_0x778b('0x75'),_0x778b('0x84'),'internal'],'raw':!![]});}return null;})[_0x778b('0x2b')](function(_0x31c739){if(!_0x31c739)return null;_0xd06436[_0x778b('0x1f')][_0x778b('0x69')]=_0x31c739;return _0xd06436;})[_0x778b('0x2b')](function(_0x119955){if(_0x119955){_0x119955[_0x778b('0x1f')][_0x778b('0x77')]=util[_0x778b('0x63')](_0x778b('0x78'),_0x3926ad['user'][_0x778b('0x2e')]);_0x119955['message'][_0x778b('0x79')]=_0xd06436[_0x778b('0x79')];_0x119955[_0x778b('0x1f')][_0x778b('0x7a')]=_0xd06436['channel'];_0x119955[_0x778b('0x1f')][_0x778b('0x85')]=_0x778b('0x7d');_0x119955[_0x778b('0x1f')][_0x778b('0x4d')]=htmlToText['fromString'](_0xd06436[_0x778b('0x1f')][_0x778b('0x4d')]);respondWithRpcPromise(_0x778b('0x7c'),_0x778b('0x7c'),{'event':_0x778b('0x86'),'message':_0x119955[_0x778b('0x1f')]},client9002);return _0xd06436;}return null;})[_0x778b('0x2b')](respondWithResult(_0x4aa376,null))[_0x778b('0x21')](handleError(_0x4aa376,null));};exports[_0x778b('0x87')]=function(_0x26b719,_0x24bad9){var _0x1ea1de=moment()[_0x778b('0x88')]()['toString']();var _0x4fb19b=path['join'](config[_0x778b('0x89')],_0x778b('0x8a'),_0x778b('0x8b'),_0x778b('0x8c'));var _0x4941ee=path['join'](config[_0x778b('0x89')],_0x778b('0x8a'),_0x778b('0x8b'),_0x778b('0x5c'));var _0x3b63c8=util[_0x778b('0x63')]('message-%s.eml',_0x1ea1de);return db[_0x778b('0x30')][_0x778b('0x4c')]({'where':{'id':_0x26b719[_0x778b('0x49')]['id']},'attributes':['id',_0x778b('0x4d'),_0x778b('0x8d'),'to','cc',_0x778b('0x8e'),_0x778b('0x8f'),_0x778b('0x90')],'include':_0x26b719[_0x778b('0x35')][_0x778b('0x5c')]?[{'model':db[_0x778b('0x91')],'as':_0x778b('0x92')}]:undefined})[_0x778b('0x2b')](handleEntityNotFound(_0x24bad9,null))[_0x778b('0x2b')](function(_0x105fe1){if(_0x105fe1){var _0x5e3d28=_0x105fe1;var _0x4b5c7b={'from':_0x5e3d28[_0x778b('0x8d')],'to':_0x5e3d28['to'],'subject':_0x5e3d28[_0x778b('0x8f')],'html':htmlEntities[_0x778b('0x93')](_0x5e3d28['body']),'headers':{'Date':moment(_0x5e3d28[_0x778b('0x90')])[_0x778b('0x63')](_0x778b('0x94'))},'attachments':[]};if(_0x105fe1['cc']){_0x4b5c7b[_0x778b('0x95')]['Cc']=_0x105fe1['cc'];}if(_0x105fe1[_0x778b('0x8e')]){_0x4b5c7b[_0x778b('0x95')][_0x778b('0x96')]=_0x105fe1['bcc'];}return new BPromise(function(_0x3d9907,_0x55fbe6){if(_0x105fe1['Attachments']){for(var _0x3e656d=0x0;_0x3e656d<_0x105fe1[_0x778b('0x92')][_0x778b('0x3a')];_0x3e656d++){var _0x51c128=_0x105fe1[_0x778b('0x92')][_0x3e656d];var _0x58dd12=path[_0x778b('0x97')](_0x4941ee,_0x51c128[_0x778b('0x98')]);if(fs[_0x778b('0x99')](_0x58dd12)){_0x4b5c7b[_0x778b('0x5c')][_0x778b('0x9a')]({'name':_0x51c128[_0x778b('0x2e')],'contentType':_0x51c128[_0x778b('0x43')],'data':fs[_0x778b('0x9b')](_0x58dd12)});}}}emlformat['build'](_0x4b5c7b,function(_0x52288a,_0x76dcb0){if(_0x52288a)return _0x55fbe6(_0x52288a);fs[_0x778b('0x9c')](path['join'](_0x4fb19b,_0x3b63c8),_0x76dcb0);return _0x3d9907(_0x76dcb0);});});}})[_0x778b('0x2b')](function(_0x49f8d5){if(_0x49f8d5){return _0x24bad9[_0x778b('0x87')](path[_0x778b('0x97')](_0x4fb19b,_0x3b63c8),_0x3b63c8,function(_0x4e75cb){if(!_0x4e75cb)fs[_0x778b('0x9d')](path['join'](_0x4fb19b,_0x3b63c8));});}})[_0x778b('0x21')](handleError(_0x24bad9,null));}; \ No newline at end of file +var _0x5357=['http','client','request','MailMessage,\x20%s,\x20%s','request\x20sent','debug','MailMessage,\x20%s,\x20%s,\x20%s','stringify','error','code','message','info','result','offset','limit','undefined','count','status','set','Content-Range','update','then','destroy','stack','name','send','map','MailMessage','rawAttributes','fieldName','key','model','query','filters','intersection','attributes','fields','hasOwnProperty','nolimit','sort','filter','where','merge','type','VIRTUAL','options','includeAll','include','findAll','rows','params','keys','body','find','catch','describe','create','direction','out','secret','MailAccount','findOne','MailAccountId','List','CmContact','updatedAt','MailServerOut','Smtp','CloudProvider','attachments','length','root','basename','Contacts','ListId','List\x20not\x20found','SendMail','sendMail','messageId','format','YYYY-MM-DD\x20HH:mm:ss','mail','read','UserId','user','agent','MailInteractionId','isNil','get','[MAILMESSAGE:ACCEPT]\x20id=%s\x20name=%s\x20role=%s\x20interaction=%s\x20body=%s','role','interaction','null','SELECT\x20*\x20FROM\x20cm_contacts\x20WHERE\x20id\x20=\x20','sequelize','Sequelize','QueryTypes','SELECT','contact','User','fullname','email','internal','interface','SIP/%s','channel','motionChannel','accept','EventManager','acceptmessage','[MAILMESSAGE:REJECT]\x20id=%s\x20name=%s\x20role=%s\x20interaction=%s\x20body=%s','RejectMessage','rejectMessage','event','reject','fromString','rejectmessage','unix','toString','join','server','files','message-%s.eml','bcc','createdAt','Attachment','from','decode','ddd,\x20DD\x20MMM\x20YYYY\x20HH:mm:ss\x20ZZ','headers','Bcc','Attachments','push','readFileSync','build','download','unlinkSync','eml-format','util','path','lodash','html-to-text','../../config/logger','api','mail-interactions','../../config/environment','../../mysqldb','redis','socket.io-emitter','html-entities','register','jayson/promise'];(function(_0x6c993a,_0x5ea3ab){var _0x27f547=function(_0x22df20){while(--_0x22df20){_0x6c993a['push'](_0x6c993a['shift']());}};_0x27f547(++_0x5ea3ab);}(_0x5357,0x1b9));var _0x7535=function(_0x29b609,_0x19d388){_0x29b609=_0x29b609-0x0;var _0x54c952=_0x5357[_0x29b609];return _0x54c952;};'use strict';var emlformat=require(_0x7535('0x0'));var moment=require('moment');var BPromise=require('bluebird');var util=require(_0x7535('0x1'));var path=require(_0x7535('0x2'));var fs=require('fs');var _=require(_0x7535('0x3'));var Redis=require('ioredis');var htmlToText=require(_0x7535('0x4'));var qs=require('../../components/parsers/qs');var logger=require(_0x7535('0x5'))(_0x7535('0x6'));var interaction_log=require(_0x7535('0x5'))(_0x7535('0x7'));var config=require(_0x7535('0x8'));var db=require(_0x7535('0x9'))['db'];config['redis']=_['defaults'](config[_0x7535('0xa')],{'host':'localhost','port':0x18eb});var socket=require(_0x7535('0xb'))(new Redis(config[_0x7535('0xa')]));var htmlEntities=require(_0x7535('0xc'));require('./mailMessage.socket')[_0x7535('0xd')](socket);var jayson=require(_0x7535('0xe'));var client=jayson['client'][_0x7535('0xf')]({'port':0x232c});var client9003=jayson[_0x7535('0x10')]['http']({'port':0x232b});var client9002=jayson['client']['http']({'port':0x232a});function respondWithRpcPromise(_0x3523d1,_0x5088c7,_0x20d687,_0x3ea1d6){return new BPromise(function(_0x364f7e,_0x48823d){var _0x3bb2a2=_0x3ea1d6||client;return _0x3bb2a2[_0x7535('0x11')](_0x3523d1,_0x20d687)['then'](function(_0x103f49){logger['info'](_0x7535('0x12'),_0x5088c7,_0x7535('0x13'));logger[_0x7535('0x14')](_0x7535('0x15'),_0x5088c7,_0x7535('0x13'),JSON[_0x7535('0x16')](_0x103f49));if(_0x103f49[_0x7535('0x17')]){if(_0x103f49[_0x7535('0x17')][_0x7535('0x18')]===0x1f4){logger['error'](_0x7535('0x12'),_0x5088c7,_0x103f49[_0x7535('0x17')]['message']);return _0x48823d(_0x103f49['error'][_0x7535('0x19')]);}logger[_0x7535('0x17')]('MailMessage,\x20%s,\x20%s',_0x5088c7,_0x103f49['error']['message']);return _0x364f7e(_0x103f49['error'][_0x7535('0x19')]);}else{logger[_0x7535('0x1a')](_0x7535('0x12'),_0x5088c7,_0x7535('0x13'));_0x364f7e(_0x103f49[_0x7535('0x1b')][_0x7535('0x19')]);}})['catch'](function(_0x54ddea){logger[_0x7535('0x17')](_0x7535('0x12'),_0x5088c7,_0x54ddea);_0x48823d(_0x54ddea);});});}function respondWithResult(_0x55a99d,_0x4820ac){_0x4820ac=_0x4820ac||0xc8;return function(_0x386693){if(_0x386693){return _0x55a99d['status'](_0x4820ac)['json'](_0x386693);}};}function respondWithFilteredResult(_0x35051d,_0x569736){return function(_0x36fa21){if(_0x36fa21){var _0x4850d9=typeof _0x569736[_0x7535('0x1c')]==='undefined'&&typeof _0x569736[_0x7535('0x1d')]===_0x7535('0x1e');var _0x1b48fe=_0x36fa21[_0x7535('0x1f')];var _0x3fdaab=_0x4850d9?0x0:_0x569736[_0x7535('0x1c')];var _0x3959e7=_0x4850d9?_0x36fa21[_0x7535('0x1f')]:_0x569736[_0x7535('0x1c')]+_0x569736[_0x7535('0x1d')];var _0x52898a;if(_0x3959e7>=_0x1b48fe){_0x3959e7=_0x1b48fe;_0x52898a=0xc8;}else{_0x52898a=0xce;}_0x35051d[_0x7535('0x20')](_0x52898a);return _0x35051d[_0x7535('0x21')](_0x7535('0x22'),_0x3fdaab+'-'+_0x3959e7+'/'+_0x1b48fe)['json'](_0x36fa21);}return null;};}function saveUpdates(_0x2ff4c2){return function(_0x23ab88){if(_0x23ab88){return _0x23ab88[_0x7535('0x23')](_0x2ff4c2)[_0x7535('0x24')](function(_0x14db7e){return _0x14db7e;});}return null;};}function removeEntity(_0x4aee84){return function(_0x3d5e33){if(_0x3d5e33){return _0x3d5e33[_0x7535('0x25')]()['then'](function(){_0x4aee84[_0x7535('0x20')](0xcc)['end']();});}};}function handleEntityNotFound(_0x48c811){return function(_0x570690){if(!_0x570690){_0x48c811['sendStatus'](0x194);}return _0x570690;};}function handleError(_0x330ee4,_0x25398b){_0x25398b=_0x25398b||0x1f4;return function(_0xe5281f){logger['error'](_0xe5281f[_0x7535('0x26')]);if(_0xe5281f['name']){delete _0xe5281f[_0x7535('0x27')];}_0x330ee4[_0x7535('0x20')](_0x25398b)[_0x7535('0x28')](_0xe5281f);};}exports['index']=function(_0x11fbc4,_0x5b9daa){var _0xbbf707={},_0x1045d7={},_0x1fb0b1={'count':0x0,'rows':[]};var _0x2921cf=_[_0x7535('0x29')](db[_0x7535('0x2a')][_0x7535('0x2b')],function(_0x28a1bd){return{'name':_0x28a1bd[_0x7535('0x2c')],'type':_0x28a1bd['type'][_0x7535('0x2d')]};});_0x1045d7[_0x7535('0x2e')]=_['map'](_0x2921cf,'name');_0x1045d7[_0x7535('0x2f')]=_['keys'](_0x11fbc4[_0x7535('0x2f')]);_0x1045d7[_0x7535('0x30')]=_[_0x7535('0x31')](_0x1045d7[_0x7535('0x2e')],_0x1045d7[_0x7535('0x2f')]);_0xbbf707[_0x7535('0x32')]=_[_0x7535('0x31')](_0x1045d7[_0x7535('0x2e')],qs[_0x7535('0x33')](_0x11fbc4[_0x7535('0x2f')][_0x7535('0x33')]));_0xbbf707[_0x7535('0x32')]=_0xbbf707[_0x7535('0x32')]['length']?_0xbbf707[_0x7535('0x32')]:_0x1045d7[_0x7535('0x2e')];if(!_0x11fbc4[_0x7535('0x2f')][_0x7535('0x34')](_0x7535('0x35'))){_0xbbf707[_0x7535('0x1d')]=qs[_0x7535('0x1d')](_0x11fbc4['query'][_0x7535('0x1d')]);_0xbbf707[_0x7535('0x1c')]=qs[_0x7535('0x1c')](_0x11fbc4[_0x7535('0x2f')][_0x7535('0x1c')]);}_0xbbf707['order']=qs[_0x7535('0x36')](_0x11fbc4[_0x7535('0x2f')][_0x7535('0x36')]);_0xbbf707['where']=qs[_0x7535('0x30')](_['pick'](_0x11fbc4['query'],_0x1045d7['filters']),_0x2921cf);if(_0x11fbc4[_0x7535('0x2f')][_0x7535('0x37')]){_0xbbf707[_0x7535('0x38')]=_[_0x7535('0x39')](_0xbbf707['where'],{'$or':_[_0x7535('0x29')](_0x2921cf,function(_0x372a84){if(_0x372a84[_0x7535('0x3a')]!==_0x7535('0x3b')){var _0x5e805c={};_0x5e805c[_0x372a84[_0x7535('0x27')]]={'$like':'%'+_0x11fbc4[_0x7535('0x2f')][_0x7535('0x37')]+'%'};return _0x5e805c;}})});}_0xbbf707=_[_0x7535('0x39')]({},_0xbbf707,_0x11fbc4[_0x7535('0x3c')]);var _0x3a82fa={'where':_0xbbf707[_0x7535('0x38')]};return db[_0x7535('0x2a')][_0x7535('0x1f')](_0x3a82fa)[_0x7535('0x24')](function(_0x4e53dd){_0x1fb0b1[_0x7535('0x1f')]=_0x4e53dd;if(_0x11fbc4[_0x7535('0x2f')][_0x7535('0x3d')]){_0xbbf707[_0x7535('0x3e')]=[{'all':!![]}];}return db['MailMessage'][_0x7535('0x3f')](_0xbbf707);})['then'](function(_0x2a2b31){_0x1fb0b1[_0x7535('0x40')]=_0x2a2b31;return _0x1fb0b1;})[_0x7535('0x24')](respondWithFilteredResult(_0x5b9daa,_0xbbf707))['catch'](handleError(_0x5b9daa,null));};exports['show']=function(_0x1bac7c,_0x39b960){var _0x44b063={'raw':!![],'where':{'id':_0x1bac7c[_0x7535('0x41')]['id']}},_0x4039cf={};_0x4039cf[_0x7535('0x2e')]=_[_0x7535('0x42')](db['MailMessage'][_0x7535('0x2b')]);_0x4039cf[_0x7535('0x2f')]=_[_0x7535('0x42')](_0x1bac7c[_0x7535('0x2f')]);_0x4039cf[_0x7535('0x30')]=_[_0x7535('0x31')](_0x4039cf[_0x7535('0x2e')],_0x4039cf[_0x7535('0x2f')]);_0x44b063[_0x7535('0x32')]=_[_0x7535('0x31')](_0x4039cf[_0x7535('0x2e')],qs[_0x7535('0x33')](_0x1bac7c['query']['fields']));_0x44b063[_0x7535('0x32')]=_0x44b063[_0x7535('0x32')]['length']?_0x44b063[_0x7535('0x32')]:_0x4039cf[_0x7535('0x2e')];if(_0x1bac7c[_0x7535('0x2f')][_0x7535('0x3d')]){_0x44b063[_0x7535('0x3e')]=[{'all':!![]}];}_0x44b063=_[_0x7535('0x39')]({},_0x44b063,_0x1bac7c[_0x7535('0x3c')]);return db[_0x7535('0x2a')]['find'](_0x44b063)[_0x7535('0x24')](handleEntityNotFound(_0x39b960,null))['then'](respondWithResult(_0x39b960,null))['catch'](handleError(_0x39b960,null));};exports[_0x7535('0x23')]=function(_0x3030b3,_0x34fde5){if(_0x3030b3['body']['id']){delete _0x3030b3[_0x7535('0x43')]['id'];}return db[_0x7535('0x2a')][_0x7535('0x44')]({'where':{'id':_0x3030b3[_0x7535('0x41')]['id']}})[_0x7535('0x24')](handleEntityNotFound(_0x34fde5,null))[_0x7535('0x24')](saveUpdates(_0x3030b3[_0x7535('0x43')],null))[_0x7535('0x24')](respondWithResult(_0x34fde5,null))[_0x7535('0x45')](handleError(_0x34fde5,null));};exports[_0x7535('0x25')]=function(_0x3e1e7a,_0xffd411){return db['MailMessage'][_0x7535('0x44')]({'where':{'id':_0x3e1e7a['params']['id']}})[_0x7535('0x24')](handleEntityNotFound(_0xffd411,null))[_0x7535('0x24')](removeEntity(_0xffd411,null))[_0x7535('0x45')](handleError(_0xffd411,null));};exports[_0x7535('0x46')]=function(_0x566288,_0x18edb1){return db[_0x7535('0x2a')][_0x7535('0x46')]()[_0x7535('0x24')](respondWithResult(_0x18edb1,null))[_0x7535('0x45')](handleError(_0x18edb1,null));};exports['create']=function(_0x4b2595,_0x73cd59){return db[_0x7535('0x2a')][_0x7535('0x47')](_0x4b2595[_0x7535('0x43')])[_0x7535('0x24')](function(_0x20c50a){if(_0x20c50a){if(_0x20c50a[_0x7535('0x48')]===_0x7535('0x49')&&!_0x20c50a[_0x7535('0x4a')]){var _0x1be07f,_0x4f9c50,_0x1c316a;if(_0x4b2595[_0x7535('0x43')]['to']){_0x4f9c50=_0x4b2595[_0x7535('0x43')]['to']['split'](',')[0x0];}return db[_0x7535('0x4b')][_0x7535('0x4c')]({'where':{'id':_0x20c50a[_0x7535('0x4d')]},'include':[{'model':db['CmList'],'as':_0x7535('0x4e'),'include':[{'model':db[_0x7535('0x4f')],'as':'Contacts','where':{'email':_0x4f9c50},'limit':0x1,'order':[[_0x7535('0x50'),'DESC']]}]},{'model':db[_0x7535('0x51')],'as':_0x7535('0x52'),'raw':!![],'include':[{'model':db[_0x7535('0x53')],'as':_0x7535('0x53'),'raw':!![]}]}]})[_0x7535('0x24')](function(_0x27050b){_0x1be07f=_0x27050b;if(!_0x1be07f||!_0x1be07f[_0x7535('0x52')])return;var _0x2b64db=_0x1be07f['getSmtpOptions']();if(_0x4b2595['body'][_0x7535('0x54')]&&_0x4b2595['body'][_0x7535('0x54')][_0x7535('0x55')]){for(var _0x309ba2=0x0;_0x309ba2<_0x4b2595[_0x7535('0x43')]['attachments'][_0x7535('0x55')];_0x309ba2+=0x1){_0x4b2595[_0x7535('0x43')]['attachments'][_0x309ba2]={'filename':_0x4b2595['body']['attachments'][_0x309ba2][_0x7535('0x27')],'path':path['join'](config[_0x7535('0x56')],'server/files/attachments',_0x4b2595[_0x7535('0x43')][_0x7535('0x54')][_0x309ba2][_0x7535('0x57')])};}}_0x1c316a={'account':_0x2b64db,'message':_0x4b2595['body']};return;})[_0x7535('0x24')](function(){if(_0x1be07f[_0x7535('0x4e')]){if(_0x1be07f['List'][_0x7535('0x58')][_0x7535('0x55')]){return _0x1be07f[_0x7535('0x4e')][_0x7535('0x58')][0x0];}else{return db['CmContact'][_0x7535('0x47')](_['defaults'](_0x4b2595[_0x7535('0x43')],{'firstName':_0x4b2595[_0x7535('0x43')]['to'],'email':_0x4b2595[_0x7535('0x43')]['to'],'phone':_0x4b2595[_0x7535('0x43')]['to'],'ListId':_0x1be07f[_0x7535('0x59')]}));}}else{throw new Error(_0x7535('0x5a'));}})['then'](function(){if(_0x1c316a){return respondWithRpcPromise(_0x7535('0x5b'),_0x7535('0x5c'),_0x1c316a,client9003)[_0x7535('0x24')](function(_0x59ac49){return _0x20c50a[_0x7535('0x23')]({'read':!![],'messageId':_0x59ac49[_0x7535('0x5d')],'sentAt':moment()[_0x7535('0x5e')](_0x7535('0x5f'))});})['catch'](function(_0x3bd594){logger[_0x7535('0x17')]('%s',JSON[_0x7535('0x16')](_0x3bd594));return _0x20c50a;});}return _0x20c50a;});}return _0x20c50a;}})['then'](respondWithResult(_0x73cd59,0xc9))['catch'](handleError(_0x73cd59,null));};exports['accept']=function(_0x384f86,_0x78fdf){var _0x470ad7={'agent':{},'channel':_0x7535('0x60')};if(_0x384f86['body']['id']){delete _0x384f86[_0x7535('0x43')]['id'];}_0x384f86[_0x7535('0x43')][_0x7535('0x61')]=!![];_0x384f86['body']['readAt']=moment()[_0x7535('0x5e')](_0x7535('0x5f'));_0x384f86['body'][_0x7535('0x62')]=_0x384f86['body'][_0x7535('0x62')]||_0x384f86[_0x7535('0x63')]['id'];_0x470ad7[_0x7535('0x64')]['id']=_0x384f86[_0x7535('0x43')][_0x7535('0x62')];return db[_0x7535('0x2a')][_0x7535('0x44')]({'where':{'id':_0x384f86[_0x7535('0x41')]['id'],'UserId':null}})[_0x7535('0x24')](handleEntityNotFound(_0x78fdf,null))[_0x7535('0x24')](saveUpdates(_0x384f86[_0x7535('0x43')],null))['then'](function(_0x1b06b4){if(_0x1b06b4){_0x470ad7[_0x7535('0x19')]=_0x1b06b4['get']({'plain':!![]});return db['MailInteraction'][_0x7535('0x44')]({'where':{'id':_0x1b06b4[_0x7535('0x65')]}});}return null;})[_0x7535('0x24')](handleEntityNotFound(_0x78fdf,null))[_0x7535('0x24')](function(_0x5273d5){if(_0x5273d5){return _0x5273d5[_0x7535('0x23')]({'UserId':_0x384f86[_0x7535('0x43')][_0x7535('0x62')],'read1stAt':_[_0x7535('0x66')](_0x5273d5['read1stAt'])?moment()['format'](_0x7535('0x5f')):undefined});}return null;})['then'](function(_0x44bc95){if(_0x44bc95){_0x470ad7['interaction']=_0x44bc95[_0x7535('0x67')]({'plain':!![]});interaction_log[_0x7535('0x1a')](_0x7535('0x68'),_0x384f86[_0x7535('0x63')]['id'],_0x384f86[_0x7535('0x63')][_0x7535('0x27')],_0x384f86[_0x7535('0x63')][_0x7535('0x69')],_0x470ad7[_0x7535('0x6a')]['id'],_0x384f86[_0x7535('0x43')]?JSON[_0x7535('0x16')](_0x384f86[_0x7535('0x43')]):_0x7535('0x6b'));return respondWithRpcPromise('AcceptMessage','acceptMessage',_0x470ad7);}return null;})[_0x7535('0x24')](function(_0x125ed5){var _0x1d8fc1=_0x7535('0x6c')+_0x125ed5['message']['ContactId'];return db[_0x7535('0x6d')]['query'](_0x1d8fc1,{'type':db[_0x7535('0x6e')][_0x7535('0x6f')][_0x7535('0x70')],'raw':!![]})[_0x7535('0x24')](function(_0x5107d0){return _0x5107d0;});})[_0x7535('0x24')](function(_0x3ca6ea){if(_0x3ca6ea){_0x470ad7[_0x7535('0x19')][_0x7535('0x71')]=_0x3ca6ea[0x0];if(!_0x384f86[_0x7535('0x43')][_0x7535('0x62')])return;return db[_0x7535('0x72')][_0x7535('0x44')]({'where':{'id':_0x384f86['body'][_0x7535('0x62')],'role':_0x7535('0x64')},'attributes':['id',_0x7535('0x27'),_0x7535('0x73'),_0x7535('0x74'),_0x7535('0x75')],'raw':!![]});}return null;})[_0x7535('0x24')](function(_0x219de2){if(!_0x219de2)return null;_0x470ad7['message'][_0x7535('0x64')]=_0x219de2;return _0x470ad7;})[_0x7535('0x24')](function(_0x53e4cc){if(_0x53e4cc){if(_0x384f86['body']['manual']){_0x470ad7[_0x7535('0x19')][_0x7535('0x76')]=util['format'](_0x7535('0x77'),_0x384f86['user'][_0x7535('0x27')]);_0x470ad7[_0x7535('0x19')][_0x7535('0x78')]=_0x470ad7[_0x7535('0x78')];_0x470ad7[_0x7535('0x19')][_0x7535('0x79')]=_0x470ad7['channel'];_0x470ad7[_0x7535('0x19')]['event']=_0x7535('0x7a');_0x470ad7[_0x7535('0x19')][_0x7535('0x43')]=htmlToText['fromString'](_0x470ad7[_0x7535('0x19')][_0x7535('0x43')]);return respondWithRpcPromise('EventManager',_0x7535('0x7b'),{'event':_0x7535('0x7c'),'message':_0x470ad7[_0x7535('0x19')]},client9002)[_0x7535('0x24')](function(){return _0x470ad7;});}return _0x470ad7;}return null;})['then'](respondWithResult(_0x78fdf,null))['catch'](handleError(_0x78fdf,null));};exports['reject']=function(_0x31f216,_0x15c7a8){var _0x1336a2={'agent':{},'channel':_0x7535('0x60')};if(_0x31f216['body']['id']){delete _0x31f216[_0x7535('0x43')]['id'];}_0x31f216[_0x7535('0x43')][_0x7535('0x62')]=_0x31f216[_0x7535('0x43')][_0x7535('0x62')]||_0x31f216[_0x7535('0x63')]['id'];_0x1336a2['agent']['id']=_0x31f216[_0x7535('0x43')]['UserId'];return db[_0x7535('0x2a')][_0x7535('0x44')]({'where':{'id':_0x31f216[_0x7535('0x41')]['id'],'UserId':null}})[_0x7535('0x24')](handleEntityNotFound(_0x15c7a8,null))[_0x7535('0x24')](function(_0x33ff04){if(_0x33ff04){_0x1336a2[_0x7535('0x19')]=_0x33ff04[_0x7535('0x67')]({'plain':!![]});return db['MailInteraction'][_0x7535('0x44')]({'where':{'id':_0x33ff04[_0x7535('0x65')]}});}return null;})['then'](handleEntityNotFound(_0x15c7a8,null))[_0x7535('0x24')](function(_0x2f8fcd){if(_0x2f8fcd){_0x1336a2[_0x7535('0x6a')]=_0x2f8fcd[_0x7535('0x67')]({'plain':!![]});interaction_log[_0x7535('0x1a')](_0x7535('0x7d'),_0x31f216[_0x7535('0x63')]['id'],_0x31f216[_0x7535('0x63')][_0x7535('0x27')],_0x31f216['user']['role'],_0x1336a2[_0x7535('0x6a')]['id'],_0x31f216[_0x7535('0x43')]?JSON[_0x7535('0x16')](_0x31f216['body']):'null');return respondWithRpcPromise(_0x7535('0x7e'),_0x7535('0x7f'),_0x1336a2);}return null;})[_0x7535('0x24')](function(_0x283168){var _0x3d9a10=_0x7535('0x6c')+_0x283168['message']['ContactId'];return db[_0x7535('0x6d')][_0x7535('0x2f')](_0x3d9a10,{'type':db['Sequelize']['QueryTypes'][_0x7535('0x70')],'raw':!![]})[_0x7535('0x24')](function(_0x1f57fd){return _0x1f57fd;});})[_0x7535('0x24')](function(_0x3b6c50){if(_0x3b6c50){_0x1336a2[_0x7535('0x19')][_0x7535('0x71')]=_0x3b6c50[0x0];if(!_0x31f216[_0x7535('0x43')][_0x7535('0x62')])return;return db['User']['find']({'where':{'id':_0x31f216['body']['UserId'],'role':'agent'},'attributes':['id',_0x7535('0x27'),_0x7535('0x73'),_0x7535('0x74'),_0x7535('0x75')],'raw':!![]});}return null;})[_0x7535('0x24')](function(_0x65700b){if(!_0x65700b)return null;_0x1336a2[_0x7535('0x19')]['agent']=_0x65700b;return _0x1336a2;})['then'](function(_0x2d0222){if(_0x2d0222){_0x2d0222['message'][_0x7535('0x76')]=util['format'](_0x7535('0x77'),_0x31f216[_0x7535('0x63')][_0x7535('0x27')]);_0x2d0222[_0x7535('0x19')][_0x7535('0x78')]=_0x1336a2[_0x7535('0x78')];_0x2d0222[_0x7535('0x19')][_0x7535('0x79')]=_0x1336a2[_0x7535('0x78')];_0x2d0222[_0x7535('0x19')][_0x7535('0x80')]=_0x7535('0x81');_0x2d0222['message']['body']=htmlToText[_0x7535('0x82')](_0x1336a2[_0x7535('0x19')][_0x7535('0x43')]);respondWithRpcPromise(_0x7535('0x7b'),'EventManager',{'event':_0x7535('0x83'),'message':_0x2d0222['message']},client9002);return _0x1336a2;}return null;})[_0x7535('0x24')](respondWithResult(_0x15c7a8,null))['catch'](handleError(_0x15c7a8,null));};exports['download']=function(_0x550837,_0x4d2edc){var _0x509924=moment()[_0x7535('0x84')]()[_0x7535('0x85')]();var _0x18856b=path[_0x7535('0x86')](config['root'],_0x7535('0x87'),_0x7535('0x88'),'tmp');var _0x4855d8=path[_0x7535('0x86')](config[_0x7535('0x56')],_0x7535('0x87'),'files',_0x7535('0x54'));var _0x5cfe93=util[_0x7535('0x5e')](_0x7535('0x89'),_0x509924);return db[_0x7535('0x2a')][_0x7535('0x44')]({'where':{'id':_0x550837['params']['id']},'attributes':['id',_0x7535('0x43'),'from','to','cc',_0x7535('0x8a'),'subject',_0x7535('0x8b')],'include':_0x550837[_0x7535('0x2f')]['attachments']?[{'model':db[_0x7535('0x8c')],'as':'Attachments'}]:undefined})[_0x7535('0x24')](handleEntityNotFound(_0x4d2edc,null))[_0x7535('0x24')](function(_0x2231ba){if(_0x2231ba){var _0x5dd9fb=_0x2231ba;var _0x288f25={'from':_0x5dd9fb[_0x7535('0x8d')],'to':_0x5dd9fb['to'],'subject':_0x5dd9fb['subject'],'html':htmlEntities[_0x7535('0x8e')](_0x5dd9fb[_0x7535('0x43')]),'headers':{'Date':moment(_0x5dd9fb[_0x7535('0x8b')])[_0x7535('0x5e')](_0x7535('0x8f'))},'attachments':[]};if(_0x2231ba['cc']){_0x288f25[_0x7535('0x90')]['Cc']=_0x2231ba['cc'];}if(_0x2231ba['bcc']){_0x288f25['headers'][_0x7535('0x91')]=_0x2231ba[_0x7535('0x8a')];}return new BPromise(function(_0x3d1018,_0x166da3){if(_0x2231ba['Attachments']){for(var _0x21f40e=0x0;_0x21f40e<_0x2231ba[_0x7535('0x92')]['length'];_0x21f40e++){var _0x27e41b=_0x2231ba['Attachments'][_0x21f40e];var _0x508068=path[_0x7535('0x86')](_0x4855d8,_0x27e41b[_0x7535('0x57')]);if(fs['existsSync'](_0x508068)){_0x288f25[_0x7535('0x54')][_0x7535('0x93')]({'name':_0x27e41b[_0x7535('0x27')],'contentType':_0x27e41b[_0x7535('0x3a')],'data':fs[_0x7535('0x94')](_0x508068)});}}}emlformat[_0x7535('0x95')](_0x288f25,function(_0x4c42fa,_0x58c596){if(_0x4c42fa)return _0x166da3(_0x4c42fa);fs['writeFileSync'](path[_0x7535('0x86')](_0x18856b,_0x5cfe93),_0x58c596);return _0x3d1018(_0x58c596);});});}})[_0x7535('0x24')](function(_0x325db2){if(_0x325db2){return _0x4d2edc[_0x7535('0x96')](path['join'](_0x18856b,_0x5cfe93),_0x5cfe93,function(_0x59e2aa){if(!_0x59e2aa)fs[_0x7535('0x97')](path[_0x7535('0x86')](_0x18856b,_0x5cfe93));});}})[_0x7535('0x45')](handleError(_0x4d2edc,null));}; \ No newline at end of file diff --git a/server/api/mailMessage/mailMessage.events.js b/server/api/mailMessage/mailMessage.events.js index 77cce09..1e3eb04 100644 --- a/server/api/mailMessage/mailMessage.events.js +++ b/server/api/mailMessage/mailMessage.events.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xa883=['update','remove','emit','hook','events','../../mysqldb','MailMessage','save'];(function(_0x22c5da,_0x4e65b5){var _0x1d0aff=function(_0x4bbca0){while(--_0x4bbca0){_0x22c5da['push'](_0x22c5da['shift']());}};_0x1d0aff(++_0x4e65b5);}(_0xa883,0x12c));var _0x3a88=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0xa883[_0x3dd15e];return _0x231fd0;};'use strict';var EventEmitter=require(_0x3a88('0x0'));var MailMessage=require(_0x3a88('0x1'))['db'][_0x3a88('0x2')];var MailMessageEvents=new EventEmitter();MailMessageEvents['setMaxListeners'](0x0);var events={'afterCreate':_0x3a88('0x3'),'afterUpdate':_0x3a88('0x4'),'afterDestroy':_0x3a88('0x5')};function emitEvent(_0x126646){return function(_0x473c19,_0x2c6039,_0x66c01b){MailMessageEvents[_0x3a88('0x6')](_0x126646+':'+_0x473c19['id'],_0x473c19);MailMessageEvents['emit'](_0x126646,_0x473c19);_0x66c01b(null);};}for(var e in events){if(events['hasOwnProperty'](e)){var event=events[e];MailMessage[_0x3a88('0x7')](e,emitEvent(event));}}module['exports']=MailMessageEvents; \ No newline at end of file +var _0x711f=['emit','hasOwnProperty','hook','exports','events','../../mysqldb','MailMessage','setMaxListeners','update'];(function(_0xaa1b3e,_0x47d976){var _0x454d7d=function(_0x575b32){while(--_0x575b32){_0xaa1b3e['push'](_0xaa1b3e['shift']());}};_0x454d7d(++_0x47d976);}(_0x711f,0x1ea));var _0xf711=function(_0x236487,_0x39046f){_0x236487=_0x236487-0x0;var _0x1c64cc=_0x711f[_0x236487];return _0x1c64cc;};'use strict';var EventEmitter=require(_0xf711('0x0'));var MailMessage=require(_0xf711('0x1'))['db'][_0xf711('0x2')];var MailMessageEvents=new EventEmitter();MailMessageEvents[_0xf711('0x3')](0x0);var events={'afterCreate':'save','afterUpdate':_0xf711('0x4'),'afterDestroy':'remove'};function emitEvent(_0x1e2e8f){return function(_0x338510,_0x482a2d,_0x3ad496){MailMessageEvents[_0xf711('0x5')](_0x1e2e8f+':'+_0x338510['id'],_0x338510);MailMessageEvents['emit'](_0x1e2e8f,_0x338510);_0x3ad496(null);};}for(var e in events){if(events[_0xf711('0x6')](e)){var event=events[e];MailMessage[_0xf711('0x7')](e,emitEvent(event));}}module[_0xf711('0x8')]=MailMessageEvents; \ No newline at end of file diff --git a/server/api/mailMessage/mailMessage.model.js b/server/api/mailMessage/mailMessage.model.js index bcd6924..9159ef2 100644 --- a/server/api/mailMessage/mailMessage.model.js +++ b/server/api/mailMessage/mailMessage.model.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xe6af=['messageId','subject','FULLTEXT','body','plainBody','fromString','models','get','direction','toLowerCase','secret','isNil','UserId','MailInteraction','findOne','update','createdAt','error','utf8mb4','utf8mb4_unicode_ci','lodash','util','api','moment','bluebird','html-to-text','path','rimraf','./mailMessage.attributes','exports','define','MailMessage','mail_messages'];(function(_0x1a71ef,_0x31ed01){var _0x1899f7=function(_0x466507){while(--_0x466507){_0x1a71ef['push'](_0x1a71ef['shift']());}};_0x1899f7(++_0x31ed01);}(_0xe6af,0xb9));var _0xfe6a=function(_0x3a5542,_0x340fb9){_0x3a5542=_0x3a5542-0x0;var _0x2d238d=_0xe6af[_0x3a5542];return _0x2d238d;};'use strict';var _=require(_0xfe6a('0x0'));var util=require(_0xfe6a('0x1'));var logger=require('../../config/logger')(_0xfe6a('0x2'));var moment=require(_0xfe6a('0x3'));var BPromise=require(_0xfe6a('0x4'));var rp=require('request-promise');var htmlToText=require(_0xfe6a('0x5'));var fs=require('fs');var path=require(_0xfe6a('0x6'));var rimraf=require(_0xfe6a('0x7'));var config=require('../../config/environment');var attributes=require(_0xfe6a('0x8'));module[_0xfe6a('0x9')]=function(_0x42baa5,_0x5d3beb){return _0x42baa5[_0xfe6a('0xa')](_0xfe6a('0xb'),attributes,{'tableName':_0xfe6a('0xc'),'paranoid':![],'indexes':[{'name':_0xfe6a('0xd'),'fields':[_0xfe6a('0xd')]},{'name':'fti_mail_messages','fields':['plainBody',_0xfe6a('0xe')],'type':_0xfe6a('0xf')}],'timestamps':!![],'hooks':{'beforeCreate':function(_0x3cfaa4,_0x559501,_0xd63cc2){if(_0x3cfaa4[_0xfe6a('0x10')]){_0x3cfaa4[_0xfe6a('0x11')]=htmlToText[_0xfe6a('0x12')](_0x3cfaa4['body'],{'preserveNewlines':!![],'singleNewLineParagraphs':!![],'uppercaseHeadings':![],'noLinkBrackets':!![],'ignoreImage':!![]});}_0xd63cc2(null,_0x559501);},'afterCreate':function(_0x20fa04,_0x10b190,_0x117d39){var _0x64fe9f=_0x42baa5[_0xfe6a('0x13')];var _0x299dc3=_0x20fa04[_0xfe6a('0x14')]({'plain':!![]});if(_0x299dc3[_0xfe6a('0x15')][_0xfe6a('0x16')]()==='in'||_0x299dc3[_0xfe6a('0x15')][_0xfe6a('0x16')]()==='out'&&!_0x299dc3[_0xfe6a('0x17')]&&!_[_0xfe6a('0x18')](_0x299dc3[_0xfe6a('0x19')])){_0x64fe9f[_0xfe6a('0x1a')][_0xfe6a('0x1b')]({'where':{'id':_0x299dc3['MailInteractionId']}})['then'](function(_0x34a31a){if(_0x34a31a){_0x34a31a[_0xfe6a('0x1c')]({'lastMsgAt':_0x299dc3[_0xfe6a('0x1d')],'lastMsgDirection':_0x299dc3[_0xfe6a('0x15')][_0xfe6a('0x16')]()});}})['catch'](function(_0x152423){console[_0xfe6a('0x1e')](_0x152423);});}_0x117d39();}},'charset':_0xfe6a('0x1f'),'collate':_0xfe6a('0x20')});}; \ No newline at end of file +var _0xedb6=['MailInteraction','findOne','update','createdAt','catch','error','utf8mb4','utf8mb4_unicode_ci','lodash','util','../../config/logger','moment','request-promise','html-to-text','../../config/environment','./mailMessage.attributes','exports','define','MailMessage','fti_mail_messages','plainBody','FULLTEXT','body','models','get','direction','toLowerCase','out','secret','isNil','UserId'];(function(_0x8c43de,_0x90ff31){var _0xa6591b=function(_0x469716){while(--_0x469716){_0x8c43de['push'](_0x8c43de['shift']());}};_0xa6591b(++_0x90ff31);}(_0xedb6,0x1ba));var _0x6edb=function(_0x37a9d7,_0x2b6fde){_0x37a9d7=_0x37a9d7-0x0;var _0x1343d3=_0xedb6[_0x37a9d7];return _0x1343d3;};'use strict';var _=require(_0x6edb('0x0'));var util=require(_0x6edb('0x1'));var logger=require(_0x6edb('0x2'))('api');var moment=require(_0x6edb('0x3'));var BPromise=require('bluebird');var rp=require(_0x6edb('0x4'));var htmlToText=require(_0x6edb('0x5'));var fs=require('fs');var path=require('path');var rimraf=require('rimraf');var config=require(_0x6edb('0x6'));var attributes=require(_0x6edb('0x7'));module[_0x6edb('0x8')]=function(_0xf3eaa7,_0x487ebd){return _0xf3eaa7[_0x6edb('0x9')](_0x6edb('0xa'),attributes,{'tableName':'mail_messages','paranoid':![],'indexes':[{'name':'messageId','fields':['messageId']},{'name':_0x6edb('0xb'),'fields':[_0x6edb('0xc'),'subject'],'type':_0x6edb('0xd')}],'timestamps':!![],'hooks':{'beforeCreate':function(_0x439b70,_0x1287e4,_0x1cb8f5){if(_0x439b70[_0x6edb('0xe')]){_0x439b70[_0x6edb('0xc')]=htmlToText['fromString'](_0x439b70['body'],{'preserveNewlines':!![],'singleNewLineParagraphs':!![],'uppercaseHeadings':![],'noLinkBrackets':!![],'ignoreImage':!![]});}_0x1cb8f5(null,_0x1287e4);},'afterCreate':function(_0x1dbf76,_0x4e5891,_0x2eb9fe){var _0x2a5b8c=_0xf3eaa7[_0x6edb('0xf')];var _0x40622e=_0x1dbf76[_0x6edb('0x10')]({'plain':!![]});if(_0x40622e[_0x6edb('0x11')][_0x6edb('0x12')]()==='in'||_0x40622e['direction'][_0x6edb('0x12')]()===_0x6edb('0x13')&&!_0x40622e[_0x6edb('0x14')]&&!_[_0x6edb('0x15')](_0x40622e[_0x6edb('0x16')])){_0x2a5b8c[_0x6edb('0x17')][_0x6edb('0x18')]({'where':{'id':_0x40622e['MailInteractionId']}})['then'](function(_0x106165){if(_0x106165){_0x106165[_0x6edb('0x19')]({'lastMsgAt':_0x40622e[_0x6edb('0x1a')],'lastMsgDirection':_0x40622e[_0x6edb('0x11')]['toLowerCase']()});}})[_0x6edb('0x1b')](function(_0x4f0921){console[_0x6edb('0x1c')](_0x4f0921);});}_0x2eb9fe();}},'charset':_0x6edb('0x1d'),'collate':_0x6edb('0x1e')});}; \ No newline at end of file diff --git a/server/api/mailMessage/mailMessage.rpc.js b/server/api/mailMessage/mailMessage.rpc.js index 6d40c37..e43c8f8 100644 --- a/server/api/mailMessage/mailMessage.rpc.js +++ b/server/api/mailMessage/mailMessage.rpc.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x8e3f=['redis','localhost','socket.io-emitter','./mailMessage.socket','register','request','info','MailMessage,\x20%s,\x20%s','debug','MailMessage,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','code','message','result','catch','CreateMailMessage','MailMessage','create','options','raw','then','lodash','util','moment','randomstring','ioredis','../../mysqldb','../../config/logger','rpc','jayson/promise','client','http'];(function(_0x4e21ba,_0x18097f){var _0x55b94b=function(_0x3b9add){while(--_0x3b9add){_0x4e21ba['push'](_0x4e21ba['shift']());}};_0x55b94b(++_0x18097f);}(_0x8e3f,0xc1));var _0xf8e3=function(_0x2c91e9,_0x2fb965){_0x2c91e9=_0x2c91e9-0x0;var _0x13f0ff=_0x8e3f[_0x2c91e9];return _0x13f0ff;};'use strict';var _=require(_0xf8e3('0x0'));var util=require(_0xf8e3('0x1'));var moment=require(_0xf8e3('0x2'));var BPromise=require('bluebird');var rs=require(_0xf8e3('0x3'));var fs=require('fs');var Redis=require(_0xf8e3('0x4'));var db=require(_0xf8e3('0x5'))['db'];var utils=require('../../config/utils');var logger=require(_0xf8e3('0x6'))(_0xf8e3('0x7'));var config=require('../../config/environment');var jayson=require(_0xf8e3('0x8'));var client=jayson[_0xf8e3('0x9')][_0xf8e3('0xa')]({'port':0x232a});config[_0xf8e3('0xb')]=_['defaults'](config[_0xf8e3('0xb')],{'host':_0xf8e3('0xc'),'port':0x18eb});var socket=require(_0xf8e3('0xd'))(new Redis(config[_0xf8e3('0xb')]));require(_0xf8e3('0xe'))[_0xf8e3('0xf')](socket);function respondWithRpcPromise(_0x299a7e,_0x2a3b59,_0x2d914d){return new BPromise(function(_0x2bc3cd,_0x28f5f0){return client[_0xf8e3('0x10')](_0x299a7e,_0x2d914d)['then'](function(_0xb7d14f){logger[_0xf8e3('0x11')](_0xf8e3('0x12'),_0x2a3b59,'request\x20sent');logger[_0xf8e3('0x13')](_0xf8e3('0x14'),_0x2a3b59,_0xf8e3('0x15'),JSON[_0xf8e3('0x16')](_0xb7d14f));if(_0xb7d14f['error']){if(_0xb7d14f[_0xf8e3('0x17')][_0xf8e3('0x18')]===0x1f4){logger[_0xf8e3('0x17')]('MailMessage,\x20%s,\x20%s',_0x2a3b59,_0xb7d14f[_0xf8e3('0x17')]['message']);return _0x28f5f0(_0xb7d14f[_0xf8e3('0x17')][_0xf8e3('0x19')]);}logger[_0xf8e3('0x17')]('MailMessage,\x20%s,\x20%s',_0x2a3b59,_0xb7d14f['error'][_0xf8e3('0x19')]);return _0x2bc3cd(_0xb7d14f[_0xf8e3('0x17')][_0xf8e3('0x19')]);}else{logger[_0xf8e3('0x11')](_0xf8e3('0x12'),_0x2a3b59,_0xf8e3('0x15'));_0x2bc3cd(_0xb7d14f[_0xf8e3('0x1a')][_0xf8e3('0x19')]);}})[_0xf8e3('0x1b')](function(_0x13fb31){logger['error'](_0xf8e3('0x12'),_0x2a3b59,_0x13fb31);_0x28f5f0(_0x13fb31);});});}exports[_0xf8e3('0x1c')]=function(_0x24e8d6){var _0x31f55d=this;return new Promise(function(_0x3128ad,_0x11c58e){return db[_0xf8e3('0x1d')][_0xf8e3('0x1e')](_0x24e8d6['body'],{'raw':_0x24e8d6[_0xf8e3('0x1f')]?_0x24e8d6[_0xf8e3('0x1f')][_0xf8e3('0x20')]===undefined?!![]:![]:!![]})[_0xf8e3('0x21')](function(_0x4a1e5f){logger[_0xf8e3('0x11')]('CreateMailMessage',_0x24e8d6);logger[_0xf8e3('0x13')](_0xf8e3('0x1c'),_0x24e8d6,JSON[_0xf8e3('0x16')](_0x4a1e5f));_0x3128ad(_0x4a1e5f);})[_0xf8e3('0x1b')](function(_0x1f4b68){logger[_0xf8e3('0x17')]('CreateMailMessage',_0x1f4b68[_0xf8e3('0x19')],_0x24e8d6);_0x11c58e(_0x31f55d[_0xf8e3('0x17')](0x1f4,_0x1f4b68[_0xf8e3('0x19')]));});});}; \ No newline at end of file +var _0x8952=['error','message','MailMessage,\x20%s,\x20%s','result','catch','create','body','options','raw','CreateMailMessage','util','moment','bluebird','randomstring','ioredis','../../config/utils','../../config/logger','rpc','jayson/promise','client','http','redis','localhost','socket.io-emitter','./mailMessage.socket','then','info','request\x20sent','debug','stringify','code'];(function(_0x122ef9,_0x451d2a){var _0x42fba0=function(_0x17c9d3){while(--_0x17c9d3){_0x122ef9['push'](_0x122ef9['shift']());}};_0x42fba0(++_0x451d2a);}(_0x8952,0x17e));var _0x2895=function(_0x546ac1,_0x370ff0){_0x546ac1=_0x546ac1-0x0;var _0xc37b33=_0x8952[_0x546ac1];return _0xc37b33;};'use strict';var _=require('lodash');var util=require(_0x2895('0x0'));var moment=require(_0x2895('0x1'));var BPromise=require(_0x2895('0x2'));var rs=require(_0x2895('0x3'));var fs=require('fs');var Redis=require(_0x2895('0x4'));var db=require('../../mysqldb')['db'];var utils=require(_0x2895('0x5'));var logger=require(_0x2895('0x6'))(_0x2895('0x7'));var config=require('../../config/environment');var jayson=require(_0x2895('0x8'));var client=jayson[_0x2895('0x9')][_0x2895('0xa')]({'port':0x232a});config['redis']=_['defaults'](config[_0x2895('0xb')],{'host':_0x2895('0xc'),'port':0x18eb});var socket=require(_0x2895('0xd'))(new Redis(config[_0x2895('0xb')]));require(_0x2895('0xe'))['register'](socket);function respondWithRpcPromise(_0x14fb67,_0x5f2632,_0x428772){return new BPromise(function(_0x5af454,_0x5e66fc){return client['request'](_0x14fb67,_0x428772)[_0x2895('0xf')](function(_0x1829a2){logger[_0x2895('0x10')]('MailMessage,\x20%s,\x20%s',_0x5f2632,_0x2895('0x11'));logger[_0x2895('0x12')]('MailMessage,\x20%s,\x20%s,\x20%s',_0x5f2632,_0x2895('0x11'),JSON[_0x2895('0x13')](_0x1829a2));if(_0x1829a2['error']){if(_0x1829a2['error'][_0x2895('0x14')]===0x1f4){logger[_0x2895('0x15')]('MailMessage,\x20%s,\x20%s',_0x5f2632,_0x1829a2[_0x2895('0x15')][_0x2895('0x16')]);return _0x5e66fc(_0x1829a2[_0x2895('0x15')][_0x2895('0x16')]);}logger[_0x2895('0x15')](_0x2895('0x17'),_0x5f2632,_0x1829a2[_0x2895('0x15')][_0x2895('0x16')]);return _0x5af454(_0x1829a2[_0x2895('0x15')][_0x2895('0x16')]);}else{logger[_0x2895('0x10')](_0x2895('0x17'),_0x5f2632,_0x2895('0x11'));_0x5af454(_0x1829a2[_0x2895('0x18')][_0x2895('0x16')]);}})[_0x2895('0x19')](function(_0x2fe8fe){logger[_0x2895('0x15')]('MailMessage,\x20%s,\x20%s',_0x5f2632,_0x2fe8fe);_0x5e66fc(_0x2fe8fe);});});}exports['CreateMailMessage']=function(_0x493851){var _0x442cfa=this;return new Promise(function(_0x12c2fb,_0x3ec4da){return db['MailMessage'][_0x2895('0x1a')](_0x493851[_0x2895('0x1b')],{'raw':_0x493851[_0x2895('0x1c')]?_0x493851[_0x2895('0x1c')][_0x2895('0x1d')]===undefined?!![]:![]:!![]})['then'](function(_0x30c6c3){logger[_0x2895('0x10')]('CreateMailMessage',_0x493851);logger[_0x2895('0x12')](_0x2895('0x1e'),_0x493851,JSON[_0x2895('0x13')](_0x30c6c3));_0x12c2fb(_0x30c6c3);})['catch'](function(_0x4e884f){logger[_0x2895('0x15')](_0x2895('0x1e'),_0x4e884f[_0x2895('0x16')],_0x493851);_0x3ec4da(_0x442cfa['error'](0x1f4,_0x4e884f[_0x2895('0x16')]));});});}; \ No newline at end of file diff --git a/server/api/mailMessage/mailMessage.socket.js b/server/api/mailMessage/mailMessage.socket.js index f750490..6e0d0b5 100644 --- a/server/api/mailMessage/mailMessage.socket.js +++ b/server/api/mailMessage/mailMessage.socket.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xabc0=['update','emit','register','length','mailMessage:','./mailMessage.events','save','remove'];(function(_0x36b101,_0xc631cc){var _0x16b01d=function(_0x349d3a){while(--_0x349d3a){_0x36b101['push'](_0x36b101['shift']());}};_0x16b01d(++_0xc631cc);}(_0xabc0,0x16d));var _0x0abc=function(_0x2818cd,_0x5b975b){_0x2818cd=_0x2818cd-0x0;var _0x51d957=_0xabc0[_0x2818cd];return _0x51d957;};'use strict';var MailMessageEvents=require(_0x0abc('0x0'));var events=[_0x0abc('0x1'),_0x0abc('0x2'),_0x0abc('0x3')];function createListener(_0xa938ec,_0x566e19){return function(_0x7a7860){_0x566e19[_0x0abc('0x4')](_0xa938ec,_0x7a7860);};}function removeListener(_0x35c256,_0x34dce9){return function(){MailMessageEvents['removeListener'](_0x35c256,_0x34dce9);};}exports[_0x0abc('0x5')]=function(_0x214f2f){for(var _0x3336ee=0x0,_0x4908b7=events[_0x0abc('0x6')];_0x3336ee<_0x4908b7;_0x3336ee++){var _0x2a9a52=events[_0x3336ee];var _0x268dc3=createListener(_0x0abc('0x7')+_0x2a9a52,_0x214f2f);MailMessageEvents['on'](_0x2a9a52,_0x268dc3);}}; \ No newline at end of file +var _0xa44a=['emit','register','./mailMessage.events','update'];(function(_0x20edd4,_0x7c30f2){var _0xc4a1e4=function(_0x32f2f6){while(--_0x32f2f6){_0x20edd4['push'](_0x20edd4['shift']());}};_0xc4a1e4(++_0x7c30f2);}(_0xa44a,0x9a));var _0xaa44=function(_0x2cd832,_0x6a0705){_0x2cd832=_0x2cd832-0x0;var _0x4f052e=_0xa44a[_0x2cd832];return _0x4f052e;};'use strict';var MailMessageEvents=require(_0xaa44('0x0'));var events=['save','remove',_0xaa44('0x1')];function createListener(_0x1962a1,_0x4bceaa){return function(_0x1ae2e3){_0x4bceaa[_0xaa44('0x2')](_0x1962a1,_0x1ae2e3);};}function removeListener(_0x3427a1,_0x479854){return function(){MailMessageEvents['removeListener'](_0x3427a1,_0x479854);};}exports[_0xaa44('0x3')]=function(_0x39a3f6){for(var _0x4979e3=0x0,_0x247589=events['length'];_0x4979e3<_0x247589;_0x4979e3++){var _0x3459c5=events[_0x4979e3];var _0x37cdeb=createListener('mailMessage:'+_0x3459c5,_0x39a3f6);MailMessageEvents['on'](_0x3459c5,_0x37cdeb);}}; \ No newline at end of file diff --git a/server/api/mailQueue/index.js b/server/api/mailQueue/index.js index bde1413..c71523f 100644 --- a/server/api/mailQueue/index.js +++ b/server/api/mailQueue/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xaf82=['../../components/interaction/service','./mailQueue.controller','get','isAuthenticated','index','/describe','describe','show','/:id/members','getMembers','getTeams','/:id/users','getAgents','post','create','/:id/teams','addTeams','addAgents','put','/:id','update','delete','removeTeams','exports','multer','util','path','fs-extra','../../components/auth/service'];(function(_0x4b9c09,_0xfd409f){var _0x186cd5=function(_0x5cc76a){while(--_0x5cc76a){_0x4b9c09['push'](_0x4b9c09['shift']());}};_0x186cd5(++_0xfd409f);}(_0xaf82,0xc6));var _0x2af8=function(_0x603ced,_0x5dc35a){_0x603ced=_0x603ced-0x0;var _0x21b948=_0xaf82[_0x603ced];return _0x21b948;};'use strict';var multer=require(_0x2af8('0x0'));var util=require(_0x2af8('0x1'));var path=require(_0x2af8('0x2'));var timeout=require('connect-timeout');var express=require('express');var router=express['Router']();var fs_extra=require(_0x2af8('0x3'));var auth=require(_0x2af8('0x4'));var interaction=require(_0x2af8('0x5'));var config=require('../../config/environment');var controller=require(_0x2af8('0x6'));router[_0x2af8('0x7')]('/',auth[_0x2af8('0x8')](),controller[_0x2af8('0x9')]);router[_0x2af8('0x7')](_0x2af8('0xa'),auth[_0x2af8('0x8')](),controller[_0x2af8('0xb')]);router[_0x2af8('0x7')]('/:id',auth[_0x2af8('0x8')](),controller[_0x2af8('0xc')]);router['get'](_0x2af8('0xd'),auth[_0x2af8('0x8')](),controller[_0x2af8('0xe')]);router[_0x2af8('0x7')]('/:id/teams',auth[_0x2af8('0x8')](),controller[_0x2af8('0xf')]);router['get'](_0x2af8('0x10'),auth[_0x2af8('0x8')](),controller[_0x2af8('0x11')]);router[_0x2af8('0x12')]('/',auth[_0x2af8('0x8')](),controller[_0x2af8('0x13')]);router['post'](_0x2af8('0x14'),auth[_0x2af8('0x8')](),controller[_0x2af8('0x15')]);router[_0x2af8('0x12')](_0x2af8('0x10'),auth['isAuthenticated'](),controller[_0x2af8('0x16')]);router[_0x2af8('0x17')](_0x2af8('0x18'),auth[_0x2af8('0x8')](),controller[_0x2af8('0x19')]);router[_0x2af8('0x1a')](_0x2af8('0x18'),auth[_0x2af8('0x8')](),controller['destroy']);router[_0x2af8('0x1a')](_0x2af8('0x14'),auth[_0x2af8('0x8')](),controller[_0x2af8('0x1b')]);router[_0x2af8('0x1a')](_0x2af8('0x10'),auth[_0x2af8('0x8')](),controller['removeAgents']);module[_0x2af8('0x1c')]=router; \ No newline at end of file +var _0x1c37=['post','addTeams','addAgents','put','/:id','update','delete','destroy','removeTeams','removeAgents','multer','util','connect-timeout','express','Router','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','./mailQueue.controller','isAuthenticated','index','get','/describe','describe','getMembers','/:id/teams','getTeams','/:id/users','getAgents','create'];(function(_0x321bb2,_0x202794){var _0x9c12ed=function(_0x263dd3){while(--_0x263dd3){_0x321bb2['push'](_0x321bb2['shift']());}};_0x9c12ed(++_0x202794);}(_0x1c37,0x19d));var _0x71c3=function(_0x585517,_0x305e82){_0x585517=_0x585517-0x0;var _0x34f7c3=_0x1c37[_0x585517];return _0x34f7c3;};'use strict';var multer=require(_0x71c3('0x0'));var util=require(_0x71c3('0x1'));var path=require('path');var timeout=require(_0x71c3('0x2'));var express=require(_0x71c3('0x3'));var router=express[_0x71c3('0x4')]();var fs_extra=require(_0x71c3('0x5'));var auth=require(_0x71c3('0x6'));var interaction=require(_0x71c3('0x7'));var config=require(_0x71c3('0x8'));var controller=require(_0x71c3('0x9'));router['get']('/',auth[_0x71c3('0xa')](),controller[_0x71c3('0xb')]);router[_0x71c3('0xc')](_0x71c3('0xd'),auth[_0x71c3('0xa')](),controller[_0x71c3('0xe')]);router[_0x71c3('0xc')]('/:id',auth[_0x71c3('0xa')](),controller['show']);router[_0x71c3('0xc')]('/:id/members',auth['isAuthenticated'](),controller[_0x71c3('0xf')]);router[_0x71c3('0xc')](_0x71c3('0x10'),auth['isAuthenticated'](),controller[_0x71c3('0x11')]);router['get'](_0x71c3('0x12'),auth[_0x71c3('0xa')](),controller[_0x71c3('0x13')]);router['post']('/',auth[_0x71c3('0xa')](),controller[_0x71c3('0x14')]);router[_0x71c3('0x15')]('/:id/teams',auth[_0x71c3('0xa')](),controller[_0x71c3('0x16')]);router[_0x71c3('0x15')](_0x71c3('0x12'),auth['isAuthenticated'](),controller[_0x71c3('0x17')]);router[_0x71c3('0x18')](_0x71c3('0x19'),auth[_0x71c3('0xa')](),controller[_0x71c3('0x1a')]);router[_0x71c3('0x1b')](_0x71c3('0x19'),auth[_0x71c3('0xa')](),controller[_0x71c3('0x1c')]);router['delete'](_0x71c3('0x10'),auth[_0x71c3('0xa')](),controller[_0x71c3('0x1d')]);router[_0x71c3('0x1b')]('/:id/users',auth['isAuthenticated'](),controller[_0x71c3('0x1e')]);module['exports']=router; \ No newline at end of file diff --git a/server/api/mailQueue/mailQueue.attributes.js b/server/api/mailQueue/mailQueue.attributes.js index 4eab8b1..9b4a305 100644 --- a/server/api/mailQueue/mailQueue.attributes.js +++ b/server/api/mailQueue/mailQueue.attributes.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x7b47=['name','INTEGER','rrmemory','beepall','sequelize','STRING'];(function(_0x31ced5,_0x5d5415){var _0x10d9e5=function(_0x2e51a5){while(--_0x2e51a5){_0x31ced5['push'](_0x31ced5['shift']());}};_0x10d9e5(++_0x5d5415);}(_0x7b47,0x19c));var _0x77b4=function(_0x4aca06,_0x5d9a25){_0x4aca06=_0x4aca06-0x0;var _0x3f59f3=_0x7b47[_0x4aca06];return _0x3f59f3;};'use strict';var Sequelize=require(_0x77b4('0x0'));module['exports']={'name':{'type':Sequelize[_0x77b4('0x1')],'unique':_0x77b4('0x2'),'validate':{'notEmpty':!![],'is':/^[A-Za-z0-9\.\_]+$/i}},'description':{'type':Sequelize[_0x77b4('0x1')]},'timeout':{'type':Sequelize[_0x77b4('0x3')],'validate':{'min':0x1,'max':0x20c49b}},'strategy':{'type':Sequelize['ENUM'](_0x77b4('0x4'),_0x77b4('0x5'),'roundrobin')}}; \ No newline at end of file +var _0xf12f=['INTEGER','ENUM','beepall','roundrobin','sequelize','exports','STRING','name'];(function(_0x5f2728,_0x4f1ea5){var _0x4f8691=function(_0x295817){while(--_0x295817){_0x5f2728['push'](_0x5f2728['shift']());}};_0x4f8691(++_0x4f1ea5);}(_0xf12f,0xcc));var _0xff12=function(_0xe36b2,_0x588b96){_0xe36b2=_0xe36b2-0x0;var _0x8055f9=_0xf12f[_0xe36b2];return _0x8055f9;};'use strict';var Sequelize=require(_0xff12('0x0'));module[_0xff12('0x1')]={'name':{'type':Sequelize[_0xff12('0x2')],'unique':_0xff12('0x3'),'validate':{'notEmpty':!![],'is':/^[A-Za-z0-9\.\_]+$/i}},'description':{'type':Sequelize[_0xff12('0x2')]},'timeout':{'type':Sequelize[_0xff12('0x4')],'validate':{'min':0x1,'max':0x20c49b}},'strategy':{'type':Sequelize[_0xff12('0x5')]('rrmemory',_0xff12('0x6'),_0xff12('0x7'))}}; \ No newline at end of file diff --git a/server/api/mailQueue/mailQueue.controller.js b/server/api/mailQueue/mailQueue.controller.js index 5890c32..ba7836f 100644 --- a/server/api/mailQueue/mailQueue.controller.js +++ b/server/api/mailQueue/mailQueue.controller.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x43e4=['team_has_mail_queues','MailQueueId\x20=\x20?','clone','ut.UserId\x20=\x20?','push','toString','QueryTypes','SELECT','TeamId','includes','union','compact','removeTeams','ids','isEmpty','addAgents','omit','spread','removeAgents','isArray','userMailQueue:remove','getAgents','eml-format','rimraf','zip-dir','request-promise','moment','mustache','util','path','sox','to-csv','ejs','fs-extra','lodash','squel','crypto','jsforce','desk.js','querystring','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','api','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','redis','defaults','socket.io-emitter','./mailQueue.socket','register','sendStatus','end','status','limit','undefined','count','offset','set','Content-Range','apply','reject','save','update','then','destroy','get','MailQueues','UserProfileResource','error','stack','name','send','index','map','MailQueue','rawAttributes','type','key','model','query','filters','intersection','fields','attributes','hasOwnProperty','nolimit','sort','where','merge','VIRTUAL','filter','options','includeAll','include','catch','show','keys','create','user','UserProfileSection','find','userProfileId','autoAssociation','body','params','describe','getMembers','findOne','length','order','pick','UserMailQueue','findAll','User','findAndCountAll','UserId','agent','mailPause','updatedAt','rows','format','%s/%s','SIP','createdAt','getTeams','Team','addTeams','Agents','online','voicePause','flatMap','sequelize','transaction','each','findOrCreate','forEach','emit','userMailQueue:save','select','field','tq.TeamId','from'];(function(_0xad7e4f,_0x2a7cd3){var _0x19d8f5=function(_0x18e19e){while(--_0x18e19e){_0xad7e4f['push'](_0xad7e4f['shift']());}};_0x19d8f5(++_0x2a7cd3);}(_0x43e4,0x1cf));var _0x443e=function(_0x36eaaa,_0x326732){_0x36eaaa=_0x36eaaa-0x0;var _0x461349=_0x43e4[_0x36eaaa];return _0x461349;};'use strict';var emlformat=require(_0x443e('0x0'));var rimraf=require(_0x443e('0x1'));var zipdir=require(_0x443e('0x2'));var jsonpatch=require('fast-json-patch');var rp=require(_0x443e('0x3'));var moment=require(_0x443e('0x4'));var BPromise=require('bluebird');var Mustache=require(_0x443e('0x5'));var util=require(_0x443e('0x6'));var path=require(_0x443e('0x7'));var sox=require(_0x443e('0x8'));var csv=require(_0x443e('0x9'));var ejs=require(_0x443e('0xa'));var fs=require('fs');var fs_extra=require(_0x443e('0xb'));var _=require(_0x443e('0xc'));var squel=require(_0x443e('0xd'));var crypto=require(_0x443e('0xe'));var jsforce=require(_0x443e('0xf'));var deskjs=require(_0x443e('0x10'));var toCsv=require(_0x443e('0x9'));var querystring=require(_0x443e('0x11'));var Papa=require('papaparse');var Redis=require(_0x443e('0x12'));var authService=require(_0x443e('0x13'));var qs=require(_0x443e('0x14'));var as=require(_0x443e('0x15'));var hardwareService=require(_0x443e('0x16'));var logger=require('../../config/logger')(_0x443e('0x17'));var utils=require(_0x443e('0x18'));var config=require(_0x443e('0x19'));var licenseUtil=require(_0x443e('0x1a'));var db=require(_0x443e('0x1b'))['db'];config[_0x443e('0x1c')]=_[_0x443e('0x1d')](config[_0x443e('0x1c')],{'host':'localhost','port':0x18eb});var socket=require(_0x443e('0x1e'))(new Redis(config[_0x443e('0x1c')]));require(_0x443e('0x1f'))[_0x443e('0x20')](socket);function respondWithStatusCode(_0x50d42a,_0x37686a){_0x37686a=_0x37686a||0xcc;return function(_0x5250dd){if(_0x5250dd){return _0x50d42a[_0x443e('0x21')](_0x37686a);}return _0x50d42a['status'](_0x37686a)[_0x443e('0x22')]();};}function respondWithResult(_0xb622ed,_0x27bea3){_0x27bea3=_0x27bea3||0xc8;return function(_0x203249){if(_0x203249){return _0xb622ed[_0x443e('0x23')](_0x27bea3)['json'](_0x203249);}};}function respondWithFilteredResult(_0x203c17,_0x2f48fc){return function(_0x3dc4c6){if(_0x3dc4c6){var _0x36f495=typeof _0x2f48fc['offset']==='undefined'&&typeof _0x2f48fc[_0x443e('0x24')]===_0x443e('0x25');var _0x1fc46d=_0x3dc4c6[_0x443e('0x26')];var _0x2fad7c=_0x36f495?0x0:_0x2f48fc[_0x443e('0x27')];var _0x27303a=_0x36f495?_0x3dc4c6[_0x443e('0x26')]:_0x2f48fc[_0x443e('0x27')]+_0x2f48fc[_0x443e('0x24')];var _0x2feb53;if(_0x27303a>=_0x1fc46d){_0x27303a=_0x1fc46d;_0x2feb53=0xc8;}else{_0x2feb53=0xce;}_0x203c17[_0x443e('0x23')](_0x2feb53);return _0x203c17[_0x443e('0x28')](_0x443e('0x29'),_0x2fad7c+'-'+_0x27303a+'/'+_0x1fc46d)['json'](_0x3dc4c6);}return null;};}function patchUpdates(_0xd1edaa){return function(_0x185bc1){try{jsonpatch[_0x443e('0x2a')](_0x185bc1,_0xd1edaa,!![]);}catch(_0x57eb32){return BPromise[_0x443e('0x2b')](_0x57eb32);}return _0x185bc1[_0x443e('0x2c')]();};}function saveUpdates(_0x596dbb,_0x29c8cd){return function(_0x4cd86a){if(_0x4cd86a){return _0x4cd86a[_0x443e('0x2d')](_0x596dbb)[_0x443e('0x2e')](function(_0x4f7bac){return _0x4f7bac;});}return null;};}function removeEntity(_0x15fa23,_0x443dc3){return function(_0x1e6222){if(_0x1e6222){return _0x1e6222[_0x443e('0x2f')]()['then'](function(){var _0x202ec5=_0x1e6222[_0x443e('0x30')]({'plain':!![]});var _0x4839fc=_0x443e('0x31');return db[_0x443e('0x32')][_0x443e('0x2f')]({'where':{'type':_0x4839fc,'resourceId':_0x202ec5['id']}})[_0x443e('0x2e')](function(){return _0x1e6222;});})['then'](function(){_0x15fa23[_0x443e('0x23')](0xcc)['end']();});}};}function handleEntityNotFound(_0x47780c,_0x2ce437){return function(_0x1779db){if(!_0x1779db){_0x47780c[_0x443e('0x21')](0x194);}return _0x1779db;};}function handleError(_0x4a2912,_0x5ac87e){_0x5ac87e=_0x5ac87e||0x1f4;return function(_0x4d6e5f){logger[_0x443e('0x33')](_0x4d6e5f[_0x443e('0x34')]);if(_0x4d6e5f[_0x443e('0x35')]){delete _0x4d6e5f[_0x443e('0x35')];}_0x4a2912[_0x443e('0x23')](_0x5ac87e)[_0x443e('0x36')](_0x4d6e5f);};}exports[_0x443e('0x37')]=function(_0x5cf057,_0x58fc92){var _0x4e0e74={},_0x47db6f={},_0xe7ce4f={'count':0x0,'rows':[]};var _0x2f8fda=_[_0x443e('0x38')](db[_0x443e('0x39')][_0x443e('0x3a')],function(_0x3c5127){return{'name':_0x3c5127['fieldName'],'type':_0x3c5127[_0x443e('0x3b')][_0x443e('0x3c')]};});_0x47db6f[_0x443e('0x3d')]=_[_0x443e('0x38')](_0x2f8fda,_0x443e('0x35'));_0x47db6f[_0x443e('0x3e')]=_['keys'](_0x5cf057[_0x443e('0x3e')]);_0x47db6f[_0x443e('0x3f')]=_[_0x443e('0x40')](_0x47db6f[_0x443e('0x3d')],_0x47db6f[_0x443e('0x3e')]);_0x4e0e74['attributes']=_[_0x443e('0x40')](_0x47db6f[_0x443e('0x3d')],qs[_0x443e('0x41')](_0x5cf057[_0x443e('0x3e')]['fields']));_0x4e0e74[_0x443e('0x42')]=_0x4e0e74[_0x443e('0x42')]['length']?_0x4e0e74[_0x443e('0x42')]:_0x47db6f[_0x443e('0x3d')];if(!_0x5cf057['query'][_0x443e('0x43')](_0x443e('0x44'))){_0x4e0e74[_0x443e('0x24')]=qs['limit'](_0x5cf057[_0x443e('0x3e')]['limit']);_0x4e0e74[_0x443e('0x27')]=qs[_0x443e('0x27')](_0x5cf057[_0x443e('0x3e')][_0x443e('0x27')]);}_0x4e0e74['order']=qs[_0x443e('0x45')](_0x5cf057['query']['sort']);_0x4e0e74[_0x443e('0x46')]=qs[_0x443e('0x3f')](_['pick'](_0x5cf057[_0x443e('0x3e')],_0x47db6f[_0x443e('0x3f')]),_0x2f8fda);if(_0x5cf057[_0x443e('0x3e')]['filter']){_0x4e0e74['where']=_[_0x443e('0x47')](_0x4e0e74[_0x443e('0x46')],{'$or':_[_0x443e('0x38')](_0x2f8fda,function(_0x152c2c){if(_0x152c2c[_0x443e('0x3b')]!==_0x443e('0x48')){var _0x5eb028={};_0x5eb028[_0x152c2c[_0x443e('0x35')]]={'$like':'%'+_0x5cf057[_0x443e('0x3e')][_0x443e('0x49')]+'%'};return _0x5eb028;}})});}_0x4e0e74=_[_0x443e('0x47')]({},_0x4e0e74,_0x5cf057[_0x443e('0x4a')]);var _0x34215e={'where':_0x4e0e74[_0x443e('0x46')]};return db[_0x443e('0x39')][_0x443e('0x26')](_0x34215e)['then'](function(_0x30c25c){_0xe7ce4f[_0x443e('0x26')]=_0x30c25c;if(_0x5cf057[_0x443e('0x3e')][_0x443e('0x4b')]){_0x4e0e74[_0x443e('0x4c')]=[{'all':!![]}];}return db[_0x443e('0x39')]['findAll'](_0x4e0e74);})[_0x443e('0x2e')](function(_0x334119){_0xe7ce4f['rows']=_0x334119;return _0xe7ce4f;})[_0x443e('0x2e')](respondWithFilteredResult(_0x58fc92,_0x4e0e74))[_0x443e('0x4d')](handleError(_0x58fc92,null));};exports[_0x443e('0x4e')]=function(_0x8d9431,_0x3895ab){var _0x2a8690={'raw':!![],'where':{'id':_0x8d9431['params']['id']}},_0x57346e={};_0x57346e[_0x443e('0x3d')]=_[_0x443e('0x4f')](db[_0x443e('0x39')][_0x443e('0x3a')]);_0x57346e[_0x443e('0x3e')]=_['keys'](_0x8d9431[_0x443e('0x3e')]);_0x57346e[_0x443e('0x3f')]=_[_0x443e('0x40')](_0x57346e['model'],_0x57346e[_0x443e('0x3e')]);_0x2a8690[_0x443e('0x42')]=_[_0x443e('0x40')](_0x57346e[_0x443e('0x3d')],qs[_0x443e('0x41')](_0x8d9431[_0x443e('0x3e')][_0x443e('0x41')]));_0x2a8690['attributes']=_0x2a8690[_0x443e('0x42')]['length']?_0x2a8690[_0x443e('0x42')]:_0x57346e[_0x443e('0x3d')];if(_0x8d9431[_0x443e('0x3e')][_0x443e('0x4b')]){_0x2a8690['include']=[{'all':!![]}];}_0x2a8690=_[_0x443e('0x47')]({},_0x2a8690,_0x8d9431[_0x443e('0x4a')]);return db['MailQueue']['find'](_0x2a8690)[_0x443e('0x2e')](handleEntityNotFound(_0x3895ab,null))['then'](respondWithResult(_0x3895ab,null))[_0x443e('0x4d')](handleError(_0x3895ab,null));};exports['create']=function(_0x245f70,_0x3f56c6){return db[_0x443e('0x39')][_0x443e('0x50')](_0x245f70['body'],{})[_0x443e('0x2e')](function(_0x4da1d6){var _0x3bac96=_0x245f70[_0x443e('0x51')][_0x443e('0x30')]({'plain':!![]});if(!_0x3bac96)throw new Error('Unable\x20to\x20retrieve\x20the\x20current\x20user');if(_0x3bac96['role']===_0x443e('0x51')){var _0x13c83d=_0x4da1d6['get']({'plain':!![]});var _0x4af79c=_0x443e('0x31');return db[_0x443e('0x52')][_0x443e('0x53')]({'where':{'name':_0x4af79c,'userProfileId':_0x3bac96[_0x443e('0x54')]},'raw':!![]})[_0x443e('0x2e')](function(_0x169c35){if(_0x169c35&&_0x169c35[_0x443e('0x55')]===0x0){return db[_0x443e('0x32')]['create']({'name':_0x13c83d['name'],'resourceId':_0x13c83d['id'],'type':_0x169c35[_0x443e('0x35')],'sectionId':_0x169c35['id']},{})[_0x443e('0x2e')](function(){return _0x4da1d6;});}else{return _0x4da1d6;}})['catch'](function(_0x2ff3f1){logger[_0x443e('0x33')]('Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s',_0x2ff3f1);throw _0x2ff3f1;});}return _0x4da1d6;})[_0x443e('0x2e')](respondWithResult(_0x3f56c6,0xc9))[_0x443e('0x4d')](handleError(_0x3f56c6,null));};exports[_0x443e('0x2d')]=function(_0x46f416,_0x731eb0){if(_0x46f416['body']['id']){delete _0x46f416[_0x443e('0x56')]['id'];}return db[_0x443e('0x39')][_0x443e('0x53')]({'where':{'id':_0x46f416[_0x443e('0x57')]['id']}})[_0x443e('0x2e')](handleEntityNotFound(_0x731eb0,null))['then'](saveUpdates(_0x46f416[_0x443e('0x56')],null))[_0x443e('0x2e')](respondWithResult(_0x731eb0,null))['catch'](handleError(_0x731eb0,null));};exports[_0x443e('0x2f')]=function(_0x496c48,_0x4452c1){return db[_0x443e('0x39')][_0x443e('0x53')]({'where':{'id':_0x496c48[_0x443e('0x57')]['id']}})[_0x443e('0x2e')](handleEntityNotFound(_0x4452c1,null))[_0x443e('0x2e')](removeEntity(_0x4452c1,null))[_0x443e('0x4d')](handleError(_0x4452c1,null));};exports[_0x443e('0x58')]=function(_0x5136ef,_0x272df4){return db[_0x443e('0x39')]['describe']()[_0x443e('0x2e')](respondWithResult(_0x272df4,null))['catch'](handleError(_0x272df4,null));};exports[_0x443e('0x59')]=function(_0x522fe8,_0x548731,_0x10521b){var _0x4ac50c={'raw':!![],'where':{}},_0x192229={},_0x544b9b;return db[_0x443e('0x39')][_0x443e('0x5a')]({'where':{'id':_0x522fe8[_0x443e('0x57')]['id']}})[_0x443e('0x2e')](handleEntityNotFound(_0x548731,null))['then'](function(_0x5aa12a){if(_0x5aa12a){_0x544b9b=_0x5aa12a[_0x443e('0x30')]({'plain':!![]});_0x192229['model']=_[_0x443e('0x4f')](db['UserMailQueue']['rawAttributes']);_0x192229[_0x443e('0x3e')]=_[_0x443e('0x4f')](_0x522fe8['query']);_0x192229[_0x443e('0x3f')]=_[_0x443e('0x40')](_0x192229['model'],_0x192229[_0x443e('0x3e')]);_0x4ac50c['attributes']=_[_0x443e('0x40')](_0x192229['model'],qs[_0x443e('0x41')](_0x522fe8[_0x443e('0x3e')][_0x443e('0x41')]));_0x4ac50c['attributes']=_0x4ac50c['attributes'][_0x443e('0x5b')]?_0x4ac50c[_0x443e('0x42')]:_0x192229['model'];if(!_0x522fe8[_0x443e('0x3e')]['hasOwnProperty'](_0x443e('0x44'))){_0x4ac50c['limit']=qs[_0x443e('0x24')](_0x522fe8['query'][_0x443e('0x24')]);_0x4ac50c[_0x443e('0x27')]=qs[_0x443e('0x27')](_0x522fe8[_0x443e('0x3e')][_0x443e('0x27')]);}_0x4ac50c[_0x443e('0x5c')]=qs[_0x443e('0x45')](_0x522fe8[_0x443e('0x3e')][_0x443e('0x45')]);_0x4ac50c[_0x443e('0x46')]=qs['filters'](_[_0x443e('0x5d')](_0x522fe8[_0x443e('0x3e')],_0x192229[_0x443e('0x3f')]));_0x4ac50c[_0x443e('0x46')]['MailQueueId']=_0x5aa12a['id'];if(_0x522fe8[_0x443e('0x3e')]['filter']){_0x4ac50c[_0x443e('0x46')]=_[_0x443e('0x47')](_0x4ac50c[_0x443e('0x46')],{'$or':_[_0x443e('0x38')](_0x4ac50c['attributes'],function(_0x1fc415){var _0x143bbf={};_0x143bbf[_0x1fc415]={'$like':'%'+_0x522fe8[_0x443e('0x3e')]['filter']+'%'};return _0x143bbf;})});}_0x4ac50c=_[_0x443e('0x47')]({},_0x4ac50c,_0x522fe8[_0x443e('0x4a')]);return db[_0x443e('0x5e')][_0x443e('0x5f')](_0x4ac50c);}})[_0x443e('0x2e')](function(_0x4d0b9f){if(_0x4d0b9f){return db[_0x443e('0x60')][_0x443e('0x61')]({'where':{'id':_['map'](_0x4d0b9f,_0x443e('0x62')),'role':_0x443e('0x63')},'attributes':['id',_0x443e('0x35'),_0x443e('0x64'),_0x443e('0x65'),'createdAt']});}})[_0x443e('0x2e')](function(_0x367a6f){if(_0x367a6f){return{'count':_0x367a6f['count'],'rows':_['map'](_0x367a6f[_0x443e('0x66')],function(_0x3f5204){return{'membername':_0x3f5204[_0x443e('0x35')],'UserId':_0x3f5204['id'],'queue_name':_0x544b9b[_0x443e('0x35')],'MailQueueId':_0x544b9b['id'],'interface':util[_0x443e('0x67')](_0x443e('0x68'),_0x443e('0x69'),_0x3f5204[_0x443e('0x35')]),'penalty':0x0,'paused':_0x3f5204[_0x443e('0x64')],'createdAt':_0x3f5204[_0x443e('0x6a')],'updatedAt':_0x3f5204['updatedAt']};})};}else{return{'count':0x0,'rows':[]};}})[_0x443e('0x2e')](respondWithFilteredResult(_0x548731,_0x4ac50c))[_0x443e('0x4d')](handleError(_0x548731,null));};exports[_0x443e('0x6b')]=function(_0x286cd5,_0x43e8aa,_0x46e13c){var _0x5dd285={};var _0x1149dc={};var _0x366f75;var _0xa17781;return db[_0x443e('0x39')]['findOne']({'where':{'id':_0x286cd5[_0x443e('0x57')]['id']}})['then'](handleEntityNotFound(_0x43e8aa,null))[_0x443e('0x2e')](function(_0x551237){if(_0x551237){_0x366f75=_0x551237;_0x1149dc[_0x443e('0x3d')]=_[_0x443e('0x4f')](db[_0x443e('0x6c')][_0x443e('0x3a')]);_0x1149dc['query']=_[_0x443e('0x4f')](_0x286cd5[_0x443e('0x3e')]);_0x1149dc[_0x443e('0x3f')]=_[_0x443e('0x40')](_0x1149dc['model'],_0x1149dc[_0x443e('0x3e')]);_0x5dd285[_0x443e('0x42')]=_[_0x443e('0x40')](_0x1149dc[_0x443e('0x3d')],qs[_0x443e('0x41')](_0x286cd5[_0x443e('0x3e')][_0x443e('0x41')]));_0x5dd285[_0x443e('0x42')]=_0x5dd285[_0x443e('0x42')][_0x443e('0x5b')]?_0x5dd285[_0x443e('0x42')]:_0x1149dc['model'];_0x5dd285[_0x443e('0x5c')]=qs[_0x443e('0x45')](_0x286cd5[_0x443e('0x3e')][_0x443e('0x45')]);_0x5dd285[_0x443e('0x46')]=qs['filters'](_[_0x443e('0x5d')](_0x286cd5[_0x443e('0x3e')],_0x1149dc['filters']));if(_0x286cd5['query'][_0x443e('0x49')]){_0x5dd285[_0x443e('0x46')]=_[_0x443e('0x47')](_0x5dd285[_0x443e('0x46')],{'$or':_['map'](_0x5dd285[_0x443e('0x42')],function(_0xdd5286){var _0xec2d7f={};_0xec2d7f[_0xdd5286]={'$like':'%'+_0x286cd5[_0x443e('0x3e')][_0x443e('0x49')]+'%'};return _0xec2d7f;})});}_0x5dd285=_['merge']({},_0x5dd285,_0x286cd5['options']);return _0x366f75[_0x443e('0x6b')](_0x5dd285);}})[_0x443e('0x2e')](function(_0x9e7cd4){if(_0x9e7cd4){_0xa17781=_0x9e7cd4[_0x443e('0x5b')];if(!_0x286cd5[_0x443e('0x3e')][_0x443e('0x43')](_0x443e('0x44'))){_0x5dd285[_0x443e('0x24')]=qs[_0x443e('0x24')](_0x286cd5[_0x443e('0x3e')][_0x443e('0x24')]);_0x5dd285[_0x443e('0x27')]=qs['offset'](_0x286cd5['query'][_0x443e('0x27')]);}return _0x366f75[_0x443e('0x6b')](_0x5dd285);}})['then'](function(_0x3c76f3){if(_0x3c76f3){return _0x3c76f3?{'count':_0xa17781,'rows':_0x3c76f3}:null;}})[_0x443e('0x2e')](respondWithResult(_0x43e8aa,null))['catch'](handleError(_0x43e8aa,null));};exports[_0x443e('0x6d')]=function(_0x1bc240,_0x177493,_0x14b201){var _0x5a51fd=_0x1bc240[_0x443e('0x56')]['ids'];return db[_0x443e('0x6c')][_0x443e('0x5f')]({'where':{'id':_0x5a51fd},'attributes':['id'],'include':[{'model':db[_0x443e('0x60')],'as':_0x443e('0x6e'),'attributes':['id',_0x443e('0x35'),_0x443e('0x6f'),_0x443e('0x70'),'interface'],'raw':!![]}]})[_0x443e('0x2e')](function(_0x18cc4d){if(_0x18cc4d){var _0x55abc8=_[_0x443e('0x71')](_0x18cc4d,function(_0x41d2b9){var _0x5f1b51=_0x41d2b9[_0x443e('0x30')]({'plain':!![]});return _0x5f1b51[_0x443e('0x6e')];});return db[_0x443e('0x39')][_0x443e('0x53')]({'where':{'id':_0x1bc240[_0x443e('0x57')]['id']}})[_0x443e('0x2e')](function(_0x112f12){return db[_0x443e('0x72')][_0x443e('0x73')](function(_0x8d072f){return _0x112f12['addTeams'](_0x5a51fd,{'transaction':_0x8d072f})[_0x443e('0x2e')](function(){return BPromise[_0x443e('0x74')](_0x55abc8,function(_0x15c656){return db[_0x443e('0x5e')][_0x443e('0x75')]({'where':{'UserId':_0x15c656['id'],'MailQueueId':_0x1bc240[_0x443e('0x57')]['id']},'transaction':_0x8d072f});});})[_0x443e('0x2e')](function(){_0x55abc8[_0x443e('0x76')](function(_0xb9ed98){socket[_0x443e('0x77')](_0x443e('0x78'),{'UserId':_0xb9ed98['id'],'MailQueueId':_0x112f12['id']});});});});});}})[_0x443e('0x2e')](respondWithStatusCode(_0x177493,null))[_0x443e('0x4d')](handleError(_0x177493,null));};exports['removeTeams']=function(_0x2882d3,_0x158641,_0x7b4563){return db[_0x443e('0x6c')][_0x443e('0x5f')]({'where':{'id':_0x2882d3[_0x443e('0x3e')]['ids']},'attributes':['id'],'include':[{'model':db[_0x443e('0x60')],'as':_0x443e('0x6e'),'attributes':['id'],'raw':!![]}]})[_0x443e('0x2e')](handleEntityNotFound(_0x158641,null))[_0x443e('0x2e')](function(_0x2c1f2d){var _0x57658e=_['map'](_0x2c1f2d,'id');var _0x39ce8b=[];var _0x109d26=[];var _0x247760=squel[_0x443e('0x79')]();_0x247760[_0x443e('0x7a')](_0x443e('0x7b'))[_0x443e('0x7c')](_0x443e('0x7d'),'tq')['join']('user_has_teams','ut','ut.TeamId\x20=\x20tq.TeamId')[_0x443e('0x46')](_0x443e('0x7e'),_0x2882d3[_0x443e('0x57')]['id']);for(var _0x4a4270=0x0;_0x4a4270<_0x2c1f2d[_0x443e('0x5b')];_0x4a4270+=0x1){let _0x377a15=_0x2c1f2d[_0x4a4270];for(var _0x3c377f=0x0;_0x3c377f<_0x377a15[_0x443e('0x6e')][_0x443e('0x5b')];_0x3c377f+=0x1){let _0x3dc990=_0x377a15[_0x443e('0x6e')][_0x3c377f];var _0x172f44=_0x247760[_0x443e('0x7f')]();_0x172f44['where'](_0x443e('0x80'),_0x3dc990['id']);_0x109d26[_0x443e('0x81')](db['sequelize'][_0x443e('0x3e')](_0x172f44[_0x443e('0x82')](),{'type':db['sequelize'][_0x443e('0x83')][_0x443e('0x84')]})['then'](function(_0x12feb2){if(_0x12feb2['length']===0x1){return _0x3dc990['id'];}else{var _0x321e60=_['every'](_[_0x443e('0x38')](_0x12feb2,_0x443e('0x85')),function(_0x3bc237){return _[_0x443e('0x86')](_0x57658e,_0x3bc237);});if(_0x321e60){return _0x3dc990['id'];}}}));}}return BPromise['all'](_0x109d26)[_0x443e('0x2e')](function(_0x25fd07){_0x39ce8b=_(_0x39ce8b)[_0x443e('0x87')](_0x25fd07)[_0x443e('0x88')]()['value']();return db[_0x443e('0x39')]['find']({'where':{'id':_0x2882d3[_0x443e('0x57')]['id']}})[_0x443e('0x2e')](function(_0x54f955){return db[_0x443e('0x72')]['transaction'](function(_0x12b293){return _0x54f955[_0x443e('0x89')](_0x2882d3[_0x443e('0x3e')][_0x443e('0x8a')],{'transaction':_0x12b293})[_0x443e('0x2e')](function(){if(!_[_0x443e('0x8b')](_0x39ce8b)){return _0x54f955['removeAgents'](_0x39ce8b,{'transaction':_0x12b293});}})[_0x443e('0x2e')](function(){_0x39ce8b[_0x443e('0x76')](function(_0x2ed33f){socket[_0x443e('0x77')]('userMailQueue:remove',{'UserId':_0x2ed33f,'MailQueueId':_0x54f955['id']});});});});});});})[_0x443e('0x2e')](respondWithStatusCode(_0x158641,null))[_0x443e('0x4d')](handleError(_0x158641,null));};exports[_0x443e('0x8c')]=function(_0x169373,_0xebd831,_0x58515e){return db[_0x443e('0x39')]['find']({'where':{'id':_0x169373[_0x443e('0x57')]['id']}})['then'](handleEntityNotFound(_0xebd831,null))[_0x443e('0x2e')](function(_0x442a61){if(_0x442a61){return _0x442a61[_0x443e('0x8c')](_0x169373[_0x443e('0x56')]['ids'],_[_0x443e('0x8d')](_0x169373[_0x443e('0x56')],['ids','id'])||{})[_0x443e('0x8e')](function(_0x408d98){for(var _0x5a2b0a=0x0;_0x5a2b0a<_0x169373['body'][_0x443e('0x8a')][_0x443e('0x5b')];_0x5a2b0a+=0x1){socket['emit'](_0x443e('0x78'),{'UserId':Number(_0x169373[_0x443e('0x56')][_0x443e('0x8a')][_0x5a2b0a]),'MailQueueId':Number(_0x169373[_0x443e('0x57')]['id'])});}return _0x408d98;});}})[_0x443e('0x2e')](respondWithResult(_0xebd831,null))[_0x443e('0x4d')](handleError(_0xebd831,null));};exports[_0x443e('0x8f')]=function(_0x48e068,_0x368573,_0x7a434e){return db[_0x443e('0x39')][_0x443e('0x53')]({'where':{'id':_0x48e068['params']['id']}})[_0x443e('0x2e')](handleEntityNotFound(_0x368573,null))[_0x443e('0x2e')](function(_0x2391cf){if(_0x2391cf){return _0x2391cf[_0x443e('0x8f')](_0x48e068['query'][_0x443e('0x8a')])[_0x443e('0x2e')](function(){if(_[_0x443e('0x90')](_0x48e068['query']['ids'])){for(var _0x412f81=0x0;_0x412f81<_0x48e068[_0x443e('0x3e')][_0x443e('0x8a')][_0x443e('0x5b')];_0x412f81+=0x1){socket[_0x443e('0x77')](_0x443e('0x91'),{'UserId':Number(_0x48e068[_0x443e('0x3e')][_0x443e('0x8a')][_0x412f81]),'MailQueueId':Number(_0x48e068[_0x443e('0x57')]['id'])});}}else{socket[_0x443e('0x77')](_0x443e('0x91'),{'UserId':Number(_0x48e068[_0x443e('0x3e')]['ids']),'MailQueueId':Number(_0x48e068[_0x443e('0x57')]['id'])});}});}})[_0x443e('0x2e')](respondWithStatusCode(_0x368573,null))[_0x443e('0x4d')](handleError(_0x368573,null));};exports[_0x443e('0x92')]=function(_0x173cf4,_0x2847b6,_0x5dfa1c){var _0xa033f={};var _0x28d5dd={};var _0x2fdf10;var _0xf001bf;return db[_0x443e('0x39')]['findOne']({'where':{'id':_0x173cf4['params']['id']}})[_0x443e('0x2e')](handleEntityNotFound(_0x2847b6,null))[_0x443e('0x2e')](function(_0x39f757){if(_0x39f757){_0x2fdf10=_0x39f757;_0x28d5dd[_0x443e('0x3d')]=_[_0x443e('0x4f')](db['User']['rawAttributes']);_0x28d5dd[_0x443e('0x3e')]=_['keys'](_0x173cf4[_0x443e('0x3e')]);_0x28d5dd[_0x443e('0x3f')]=_[_0x443e('0x40')](_0x28d5dd[_0x443e('0x3d')],_0x28d5dd[_0x443e('0x3e')]);_0xa033f[_0x443e('0x42')]=_[_0x443e('0x40')](_0x28d5dd[_0x443e('0x3d')],qs['fields'](_0x173cf4[_0x443e('0x3e')][_0x443e('0x41')]));_0xa033f[_0x443e('0x42')]=_0xa033f[_0x443e('0x42')][_0x443e('0x5b')]?_0xa033f[_0x443e('0x42')]:_0x28d5dd[_0x443e('0x3d')];_0xa033f[_0x443e('0x5c')]=qs[_0x443e('0x45')](_0x173cf4['query'][_0x443e('0x45')]);_0xa033f[_0x443e('0x46')]=qs[_0x443e('0x3f')](_[_0x443e('0x5d')](_0x173cf4[_0x443e('0x3e')],_0x28d5dd[_0x443e('0x3f')]));if(_0x173cf4[_0x443e('0x3e')][_0x443e('0x49')]){_0xa033f[_0x443e('0x46')]=_[_0x443e('0x47')](_0xa033f['where'],{'$or':_['map'](_0xa033f['attributes'],function(_0x33f88f){var _0x2d15d9={};_0x2d15d9[_0x33f88f]={'$like':'%'+_0x173cf4[_0x443e('0x3e')]['filter']+'%'};return _0x2d15d9;})});}_0xa033f=_[_0x443e('0x47')]({},_0xa033f,_0x173cf4[_0x443e('0x4a')]);return _0x2fdf10[_0x443e('0x92')](_0xa033f);}})[_0x443e('0x2e')](function(_0x20ec60){if(_0x20ec60){_0xf001bf=_0x20ec60[_0x443e('0x5b')];if(!_0x173cf4[_0x443e('0x3e')]['hasOwnProperty']('nolimit')){_0xa033f['limit']=qs[_0x443e('0x24')](_0x173cf4[_0x443e('0x3e')][_0x443e('0x24')]);_0xa033f['offset']=qs[_0x443e('0x27')](_0x173cf4[_0x443e('0x3e')][_0x443e('0x27')]);}return _0x2fdf10[_0x443e('0x92')](_0xa033f);}})[_0x443e('0x2e')](function(_0x356fdd){if(_0x356fdd){return _0x356fdd?{'count':_0xf001bf,'rows':_0x356fdd}:null;}})['then'](respondWithResult(_0x2847b6,null))['catch'](handleError(_0x2847b6,null));}; \ No newline at end of file +var _0xfb58=['format','%s/%s','SIP','getTeams','findOne','addTeams','Team','Agents','online','voicePause','interface','flatMap','sequelize','transaction','each','findOrCreate','forEach','emit','userMailQueue:save','removeTeams','field','tq.TeamId','from','team_has_mail_queues','user_has_teams','ut.TeamId\x20=\x20tq.TeamId','MailQueueId\x20=\x20?','ut.UserId\x20=\x20?','push','toString','QueryTypes','every','TeamId','includes','union','value','ids','isEmpty','removeAgents','addAgents','omit','spread','isArray','userMailQueue:remove','getAgents','eml-format','rimraf','zip-dir','fast-json-patch','moment','mustache','path','to-csv','fs-extra','squel','jsforce','desk.js','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','redis','localhost','socket.io-emitter','register','sendStatus','status','end','json','offset','limit','count','set','Content-Range','save','update','then','destroy','get','error','stack','name','index','map','MailQueue','rawAttributes','fieldName','key','model','query','keys','filters','intersection','attributes','fields','length','hasOwnProperty','nolimit','order','sort','pick','where','type','VIRTUAL','filter','options','includeAll','include','findAll','rows','show','params','catch','create','body','user','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','UserProfileSection','find','userProfileId','autoAssociation','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','describe','UserMailQueue','merge','User','findAndCountAll','UserId','agent','mailPause','createdAt'];(function(_0x22b6aa,_0x1ea80b){var _0x1b2349=function(_0x248343){while(--_0x248343){_0x22b6aa['push'](_0x22b6aa['shift']());}};_0x1b2349(++_0x1ea80b);}(_0xfb58,0x143));var _0x8fb5=function(_0x5e3aa3,_0x59d0cc){_0x5e3aa3=_0x5e3aa3-0x0;var _0x11e60a=_0xfb58[_0x5e3aa3];return _0x11e60a;};'use strict';var emlformat=require(_0x8fb5('0x0'));var rimraf=require(_0x8fb5('0x1'));var zipdir=require(_0x8fb5('0x2'));var jsonpatch=require(_0x8fb5('0x3'));var rp=require('request-promise');var moment=require(_0x8fb5('0x4'));var BPromise=require('bluebird');var Mustache=require(_0x8fb5('0x5'));var util=require('util');var path=require(_0x8fb5('0x6'));var sox=require('sox');var csv=require(_0x8fb5('0x7'));var ejs=require('ejs');var fs=require('fs');var fs_extra=require(_0x8fb5('0x8'));var _=require('lodash');var squel=require(_0x8fb5('0x9'));var crypto=require('crypto');var jsforce=require(_0x8fb5('0xa'));var deskjs=require(_0x8fb5('0xb'));var toCsv=require(_0x8fb5('0x7'));var querystring=require('querystring');var Papa=require(_0x8fb5('0xc'));var Redis=require(_0x8fb5('0xd'));var authService=require(_0x8fb5('0xe'));var qs=require(_0x8fb5('0xf'));var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0x8fb5('0x10'));var logger=require(_0x8fb5('0x11'))(_0x8fb5('0x12'));var utils=require(_0x8fb5('0x13'));var config=require(_0x8fb5('0x14'));var licenseUtil=require(_0x8fb5('0x15'));var db=require(_0x8fb5('0x16'))['db'];config[_0x8fb5('0x17')]=_['defaults'](config['redis'],{'host':_0x8fb5('0x18'),'port':0x18eb});var socket=require(_0x8fb5('0x19'))(new Redis(config['redis']));require('./mailQueue.socket')[_0x8fb5('0x1a')](socket);function respondWithStatusCode(_0x55cea1,_0x4e9878){_0x4e9878=_0x4e9878||0xcc;return function(_0xad51e3){if(_0xad51e3){return _0x55cea1[_0x8fb5('0x1b')](_0x4e9878);}return _0x55cea1[_0x8fb5('0x1c')](_0x4e9878)[_0x8fb5('0x1d')]();};}function respondWithResult(_0x542d55,_0x392ddb){_0x392ddb=_0x392ddb||0xc8;return function(_0xe8e196){if(_0xe8e196){return _0x542d55['status'](_0x392ddb)[_0x8fb5('0x1e')](_0xe8e196);}};}function respondWithFilteredResult(_0xa3b585,_0x599db6){return function(_0x5b04ee){if(_0x5b04ee){var _0x4b846d=typeof _0x599db6[_0x8fb5('0x1f')]==='undefined'&&typeof _0x599db6[_0x8fb5('0x20')]==='undefined';var _0x48e1b5=_0x5b04ee[_0x8fb5('0x21')];var _0x27443f=_0x4b846d?0x0:_0x599db6[_0x8fb5('0x1f')];var _0x14ab03=_0x4b846d?_0x5b04ee[_0x8fb5('0x21')]:_0x599db6[_0x8fb5('0x1f')]+_0x599db6['limit'];var _0x337610;if(_0x14ab03>=_0x48e1b5){_0x14ab03=_0x48e1b5;_0x337610=0xc8;}else{_0x337610=0xce;}_0xa3b585['status'](_0x337610);return _0xa3b585[_0x8fb5('0x22')](_0x8fb5('0x23'),_0x27443f+'-'+_0x14ab03+'/'+_0x48e1b5)[_0x8fb5('0x1e')](_0x5b04ee);}return null;};}function patchUpdates(_0x514327){return function(_0x3ff4a9){try{jsonpatch['apply'](_0x3ff4a9,_0x514327,!![]);}catch(_0x492c4e){return BPromise['reject'](_0x492c4e);}return _0x3ff4a9[_0x8fb5('0x24')]();};}function saveUpdates(_0x28348f,_0x31639d){return function(_0x2b300b){if(_0x2b300b){return _0x2b300b[_0x8fb5('0x25')](_0x28348f)[_0x8fb5('0x26')](function(_0x292fad){return _0x292fad;});}return null;};}function removeEntity(_0x40ac62,_0x55bf33){return function(_0x3d4c18){if(_0x3d4c18){return _0x3d4c18[_0x8fb5('0x27')]()[_0x8fb5('0x26')](function(){var _0x55b4ed=_0x3d4c18[_0x8fb5('0x28')]({'plain':!![]});var _0xbbef8a='MailQueues';return db['UserProfileResource']['destroy']({'where':{'type':_0xbbef8a,'resourceId':_0x55b4ed['id']}})['then'](function(){return _0x3d4c18;});})[_0x8fb5('0x26')](function(){_0x40ac62[_0x8fb5('0x1c')](0xcc)[_0x8fb5('0x1d')]();});}};}function handleEntityNotFound(_0x16ebb5,_0x3dc27e){return function(_0xa94434){if(!_0xa94434){_0x16ebb5[_0x8fb5('0x1b')](0x194);}return _0xa94434;};}function handleError(_0x16a2ff,_0x1503f8){_0x1503f8=_0x1503f8||0x1f4;return function(_0x44e89a){logger[_0x8fb5('0x29')](_0x44e89a[_0x8fb5('0x2a')]);if(_0x44e89a[_0x8fb5('0x2b')]){delete _0x44e89a[_0x8fb5('0x2b')];}_0x16a2ff[_0x8fb5('0x1c')](_0x1503f8)['send'](_0x44e89a);};}exports[_0x8fb5('0x2c')]=function(_0x4b11b2,_0x3f3375){var _0x404fcc={},_0x4fda2f={},_0x1bbc6b={'count':0x0,'rows':[]};var _0x212f5c=_[_0x8fb5('0x2d')](db[_0x8fb5('0x2e')][_0x8fb5('0x2f')],function(_0x2b136a){return{'name':_0x2b136a[_0x8fb5('0x30')],'type':_0x2b136a['type'][_0x8fb5('0x31')]};});_0x4fda2f[_0x8fb5('0x32')]=_['map'](_0x212f5c,_0x8fb5('0x2b'));_0x4fda2f[_0x8fb5('0x33')]=_[_0x8fb5('0x34')](_0x4b11b2[_0x8fb5('0x33')]);_0x4fda2f[_0x8fb5('0x35')]=_[_0x8fb5('0x36')](_0x4fda2f[_0x8fb5('0x32')],_0x4fda2f[_0x8fb5('0x33')]);_0x404fcc[_0x8fb5('0x37')]=_[_0x8fb5('0x36')](_0x4fda2f[_0x8fb5('0x32')],qs['fields'](_0x4b11b2['query'][_0x8fb5('0x38')]));_0x404fcc[_0x8fb5('0x37')]=_0x404fcc[_0x8fb5('0x37')][_0x8fb5('0x39')]?_0x404fcc['attributes']:_0x4fda2f['model'];if(!_0x4b11b2[_0x8fb5('0x33')][_0x8fb5('0x3a')](_0x8fb5('0x3b'))){_0x404fcc['limit']=qs[_0x8fb5('0x20')](_0x4b11b2[_0x8fb5('0x33')][_0x8fb5('0x20')]);_0x404fcc[_0x8fb5('0x1f')]=qs['offset'](_0x4b11b2[_0x8fb5('0x33')][_0x8fb5('0x1f')]);}_0x404fcc[_0x8fb5('0x3c')]=qs[_0x8fb5('0x3d')](_0x4b11b2['query'][_0x8fb5('0x3d')]);_0x404fcc['where']=qs[_0x8fb5('0x35')](_[_0x8fb5('0x3e')](_0x4b11b2[_0x8fb5('0x33')],_0x4fda2f[_0x8fb5('0x35')]),_0x212f5c);if(_0x4b11b2['query']['filter']){_0x404fcc[_0x8fb5('0x3f')]=_['merge'](_0x404fcc['where'],{'$or':_['map'](_0x212f5c,function(_0x336edb){if(_0x336edb[_0x8fb5('0x40')]!==_0x8fb5('0x41')){var _0x4f877f={};_0x4f877f[_0x336edb[_0x8fb5('0x2b')]]={'$like':'%'+_0x4b11b2[_0x8fb5('0x33')][_0x8fb5('0x42')]+'%'};return _0x4f877f;}})});}_0x404fcc=_['merge']({},_0x404fcc,_0x4b11b2[_0x8fb5('0x43')]);var _0xfea239={'where':_0x404fcc[_0x8fb5('0x3f')]};return db[_0x8fb5('0x2e')]['count'](_0xfea239)[_0x8fb5('0x26')](function(_0x159a4c){_0x1bbc6b[_0x8fb5('0x21')]=_0x159a4c;if(_0x4b11b2[_0x8fb5('0x33')][_0x8fb5('0x44')]){_0x404fcc[_0x8fb5('0x45')]=[{'all':!![]}];}return db[_0x8fb5('0x2e')][_0x8fb5('0x46')](_0x404fcc);})['then'](function(_0x2b1aed){_0x1bbc6b[_0x8fb5('0x47')]=_0x2b1aed;return _0x1bbc6b;})[_0x8fb5('0x26')](respondWithFilteredResult(_0x3f3375,_0x404fcc))['catch'](handleError(_0x3f3375,null));};exports[_0x8fb5('0x48')]=function(_0x4f31ac,_0x48ba26){var _0x31162e={'raw':!![],'where':{'id':_0x4f31ac[_0x8fb5('0x49')]['id']}},_0x2606b8={};_0x2606b8[_0x8fb5('0x32')]=_[_0x8fb5('0x34')](db['MailQueue'][_0x8fb5('0x2f')]);_0x2606b8[_0x8fb5('0x33')]=_[_0x8fb5('0x34')](_0x4f31ac[_0x8fb5('0x33')]);_0x2606b8[_0x8fb5('0x35')]=_[_0x8fb5('0x36')](_0x2606b8['model'],_0x2606b8[_0x8fb5('0x33')]);_0x31162e['attributes']=_['intersection'](_0x2606b8['model'],qs[_0x8fb5('0x38')](_0x4f31ac[_0x8fb5('0x33')][_0x8fb5('0x38')]));_0x31162e[_0x8fb5('0x37')]=_0x31162e[_0x8fb5('0x37')][_0x8fb5('0x39')]?_0x31162e[_0x8fb5('0x37')]:_0x2606b8['model'];if(_0x4f31ac[_0x8fb5('0x33')]['includeAll']){_0x31162e['include']=[{'all':!![]}];}_0x31162e=_['merge']({},_0x31162e,_0x4f31ac[_0x8fb5('0x43')]);return db[_0x8fb5('0x2e')]['find'](_0x31162e)[_0x8fb5('0x26')](handleEntityNotFound(_0x48ba26,null))[_0x8fb5('0x26')](respondWithResult(_0x48ba26,null))[_0x8fb5('0x4a')](handleError(_0x48ba26,null));};exports[_0x8fb5('0x4b')]=function(_0x49da0a,_0x942543){return db[_0x8fb5('0x2e')]['create'](_0x49da0a[_0x8fb5('0x4c')],{})[_0x8fb5('0x26')](function(_0x18b080){var _0x4481b3=_0x49da0a[_0x8fb5('0x4d')][_0x8fb5('0x28')]({'plain':!![]});if(!_0x4481b3)throw new Error(_0x8fb5('0x4e'));if(_0x4481b3[_0x8fb5('0x4f')]===_0x8fb5('0x4d')){var _0x37223f=_0x18b080[_0x8fb5('0x28')]({'plain':!![]});var _0x2d13a3='MailQueues';return db[_0x8fb5('0x50')][_0x8fb5('0x51')]({'where':{'name':_0x2d13a3,'userProfileId':_0x4481b3[_0x8fb5('0x52')]},'raw':!![]})[_0x8fb5('0x26')](function(_0x2d8fdd){if(_0x2d8fdd&&_0x2d8fdd[_0x8fb5('0x53')]===0x0){return db['UserProfileResource'][_0x8fb5('0x4b')]({'name':_0x37223f[_0x8fb5('0x2b')],'resourceId':_0x37223f['id'],'type':_0x2d8fdd[_0x8fb5('0x2b')],'sectionId':_0x2d8fdd['id']},{})[_0x8fb5('0x26')](function(){return _0x18b080;});}else{return _0x18b080;}})[_0x8fb5('0x4a')](function(_0x32d7aa){logger[_0x8fb5('0x29')](_0x8fb5('0x54'),_0x32d7aa);throw _0x32d7aa;});}return _0x18b080;})[_0x8fb5('0x26')](respondWithResult(_0x942543,0xc9))[_0x8fb5('0x4a')](handleError(_0x942543,null));};exports[_0x8fb5('0x25')]=function(_0x31dab3,_0x400b10){if(_0x31dab3[_0x8fb5('0x4c')]['id']){delete _0x31dab3['body']['id'];}return db['MailQueue'][_0x8fb5('0x51')]({'where':{'id':_0x31dab3[_0x8fb5('0x49')]['id']}})['then'](handleEntityNotFound(_0x400b10,null))['then'](saveUpdates(_0x31dab3[_0x8fb5('0x4c')],null))['then'](respondWithResult(_0x400b10,null))['catch'](handleError(_0x400b10,null));};exports[_0x8fb5('0x27')]=function(_0x52b05d,_0x42c40e){return db[_0x8fb5('0x2e')]['find']({'where':{'id':_0x52b05d[_0x8fb5('0x49')]['id']}})['then'](handleEntityNotFound(_0x42c40e,null))[_0x8fb5('0x26')](removeEntity(_0x42c40e,null))['catch'](handleError(_0x42c40e,null));};exports[_0x8fb5('0x55')]=function(_0x1c1668,_0x45dad1){return db[_0x8fb5('0x2e')][_0x8fb5('0x55')]()[_0x8fb5('0x26')](respondWithResult(_0x45dad1,null))[_0x8fb5('0x4a')](handleError(_0x45dad1,null));};exports['getMembers']=function(_0xb79486,_0x45a162,_0x3c6e4b){var _0x1deb5b={'raw':!![],'where':{}},_0x4ef5a7={},_0x1aab91;return db[_0x8fb5('0x2e')]['findOne']({'where':{'id':_0xb79486[_0x8fb5('0x49')]['id']}})['then'](handleEntityNotFound(_0x45a162,null))[_0x8fb5('0x26')](function(_0x326e97){if(_0x326e97){_0x1aab91=_0x326e97[_0x8fb5('0x28')]({'plain':!![]});_0x4ef5a7[_0x8fb5('0x32')]=_[_0x8fb5('0x34')](db[_0x8fb5('0x56')]['rawAttributes']);_0x4ef5a7[_0x8fb5('0x33')]=_[_0x8fb5('0x34')](_0xb79486[_0x8fb5('0x33')]);_0x4ef5a7[_0x8fb5('0x35')]=_[_0x8fb5('0x36')](_0x4ef5a7[_0x8fb5('0x32')],_0x4ef5a7[_0x8fb5('0x33')]);_0x1deb5b[_0x8fb5('0x37')]=_[_0x8fb5('0x36')](_0x4ef5a7[_0x8fb5('0x32')],qs['fields'](_0xb79486[_0x8fb5('0x33')]['fields']));_0x1deb5b[_0x8fb5('0x37')]=_0x1deb5b[_0x8fb5('0x37')][_0x8fb5('0x39')]?_0x1deb5b['attributes']:_0x4ef5a7[_0x8fb5('0x32')];if(!_0xb79486[_0x8fb5('0x33')]['hasOwnProperty'](_0x8fb5('0x3b'))){_0x1deb5b[_0x8fb5('0x20')]=qs[_0x8fb5('0x20')](_0xb79486['query'][_0x8fb5('0x20')]);_0x1deb5b['offset']=qs[_0x8fb5('0x1f')](_0xb79486['query'][_0x8fb5('0x1f')]);}_0x1deb5b['order']=qs[_0x8fb5('0x3d')](_0xb79486['query'][_0x8fb5('0x3d')]);_0x1deb5b[_0x8fb5('0x3f')]=qs['filters'](_[_0x8fb5('0x3e')](_0xb79486[_0x8fb5('0x33')],_0x4ef5a7[_0x8fb5('0x35')]));_0x1deb5b[_0x8fb5('0x3f')]['MailQueueId']=_0x326e97['id'];if(_0xb79486[_0x8fb5('0x33')][_0x8fb5('0x42')]){_0x1deb5b[_0x8fb5('0x3f')]=_['merge'](_0x1deb5b[_0x8fb5('0x3f')],{'$or':_[_0x8fb5('0x2d')](_0x1deb5b[_0x8fb5('0x37')],function(_0x3f8c34){var _0x43ca69={};_0x43ca69[_0x3f8c34]={'$like':'%'+_0xb79486['query'][_0x8fb5('0x42')]+'%'};return _0x43ca69;})});}_0x1deb5b=_[_0x8fb5('0x57')]({},_0x1deb5b,_0xb79486['options']);return db[_0x8fb5('0x56')][_0x8fb5('0x46')](_0x1deb5b);}})[_0x8fb5('0x26')](function(_0x297de4){if(_0x297de4){return db[_0x8fb5('0x58')][_0x8fb5('0x59')]({'where':{'id':_[_0x8fb5('0x2d')](_0x297de4,_0x8fb5('0x5a')),'role':_0x8fb5('0x5b')},'attributes':['id',_0x8fb5('0x2b'),_0x8fb5('0x5c'),'updatedAt',_0x8fb5('0x5d')]});}})[_0x8fb5('0x26')](function(_0x24b9bd){if(_0x24b9bd){return{'count':_0x24b9bd[_0x8fb5('0x21')],'rows':_[_0x8fb5('0x2d')](_0x24b9bd[_0x8fb5('0x47')],function(_0x4c9fa2){return{'membername':_0x4c9fa2['name'],'UserId':_0x4c9fa2['id'],'queue_name':_0x1aab91[_0x8fb5('0x2b')],'MailQueueId':_0x1aab91['id'],'interface':util[_0x8fb5('0x5e')](_0x8fb5('0x5f'),_0x8fb5('0x60'),_0x4c9fa2['name']),'penalty':0x0,'paused':_0x4c9fa2[_0x8fb5('0x5c')],'createdAt':_0x4c9fa2[_0x8fb5('0x5d')],'updatedAt':_0x4c9fa2['updatedAt']};})};}else{return{'count':0x0,'rows':[]};}})[_0x8fb5('0x26')](respondWithFilteredResult(_0x45a162,_0x1deb5b))[_0x8fb5('0x4a')](handleError(_0x45a162,null));};exports[_0x8fb5('0x61')]=function(_0x308c86,_0x40a4a2,_0x55ea16){var _0x1a0090={};var _0x36bce6={};var _0x376b55;var _0x4c0cfd;return db['MailQueue'][_0x8fb5('0x62')]({'where':{'id':_0x308c86[_0x8fb5('0x49')]['id']}})[_0x8fb5('0x26')](handleEntityNotFound(_0x40a4a2,null))['then'](function(_0x305ae8){if(_0x305ae8){_0x376b55=_0x305ae8;_0x36bce6[_0x8fb5('0x32')]=_[_0x8fb5('0x34')](db['Team']['rawAttributes']);_0x36bce6[_0x8fb5('0x33')]=_[_0x8fb5('0x34')](_0x308c86['query']);_0x36bce6[_0x8fb5('0x35')]=_['intersection'](_0x36bce6[_0x8fb5('0x32')],_0x36bce6[_0x8fb5('0x33')]);_0x1a0090['attributes']=_[_0x8fb5('0x36')](_0x36bce6[_0x8fb5('0x32')],qs[_0x8fb5('0x38')](_0x308c86['query']['fields']));_0x1a0090[_0x8fb5('0x37')]=_0x1a0090[_0x8fb5('0x37')][_0x8fb5('0x39')]?_0x1a0090[_0x8fb5('0x37')]:_0x36bce6['model'];_0x1a0090[_0x8fb5('0x3c')]=qs['sort'](_0x308c86[_0x8fb5('0x33')][_0x8fb5('0x3d')]);_0x1a0090[_0x8fb5('0x3f')]=qs[_0x8fb5('0x35')](_['pick'](_0x308c86[_0x8fb5('0x33')],_0x36bce6[_0x8fb5('0x35')]));if(_0x308c86['query'][_0x8fb5('0x42')]){_0x1a0090[_0x8fb5('0x3f')]=_[_0x8fb5('0x57')](_0x1a0090[_0x8fb5('0x3f')],{'$or':_[_0x8fb5('0x2d')](_0x1a0090[_0x8fb5('0x37')],function(_0x421cc5){var _0xa931e2={};_0xa931e2[_0x421cc5]={'$like':'%'+_0x308c86[_0x8fb5('0x33')]['filter']+'%'};return _0xa931e2;})});}_0x1a0090=_[_0x8fb5('0x57')]({},_0x1a0090,_0x308c86[_0x8fb5('0x43')]);return _0x376b55['getTeams'](_0x1a0090);}})[_0x8fb5('0x26')](function(_0x28072a){if(_0x28072a){_0x4c0cfd=_0x28072a[_0x8fb5('0x39')];if(!_0x308c86['query'][_0x8fb5('0x3a')](_0x8fb5('0x3b'))){_0x1a0090[_0x8fb5('0x20')]=qs['limit'](_0x308c86[_0x8fb5('0x33')]['limit']);_0x1a0090[_0x8fb5('0x1f')]=qs['offset'](_0x308c86[_0x8fb5('0x33')][_0x8fb5('0x1f')]);}return _0x376b55[_0x8fb5('0x61')](_0x1a0090);}})['then'](function(_0x301525){if(_0x301525){return _0x301525?{'count':_0x4c0cfd,'rows':_0x301525}:null;}})[_0x8fb5('0x26')](respondWithResult(_0x40a4a2,null))[_0x8fb5('0x4a')](handleError(_0x40a4a2,null));};exports[_0x8fb5('0x63')]=function(_0x276e5c,_0x38d869,_0x3fff32){var _0x7870ff=_0x276e5c['body']['ids'];return db[_0x8fb5('0x64')][_0x8fb5('0x46')]({'where':{'id':_0x7870ff},'attributes':['id'],'include':[{'model':db['User'],'as':_0x8fb5('0x65'),'attributes':['id',_0x8fb5('0x2b'),_0x8fb5('0x66'),_0x8fb5('0x67'),_0x8fb5('0x68')],'raw':!![]}]})['then'](function(_0x2c2be3){if(_0x2c2be3){var _0x226c7d=_[_0x8fb5('0x69')](_0x2c2be3,function(_0x5d8bca){var _0x2ce84f=_0x5d8bca[_0x8fb5('0x28')]({'plain':!![]});return _0x2ce84f[_0x8fb5('0x65')];});return db[_0x8fb5('0x2e')][_0x8fb5('0x51')]({'where':{'id':_0x276e5c[_0x8fb5('0x49')]['id']}})[_0x8fb5('0x26')](function(_0x50ab61){return db[_0x8fb5('0x6a')][_0x8fb5('0x6b')](function(_0x1ae364){return _0x50ab61[_0x8fb5('0x63')](_0x7870ff,{'transaction':_0x1ae364})['then'](function(){return BPromise[_0x8fb5('0x6c')](_0x226c7d,function(_0x426091){return db[_0x8fb5('0x56')][_0x8fb5('0x6d')]({'where':{'UserId':_0x426091['id'],'MailQueueId':_0x276e5c[_0x8fb5('0x49')]['id']},'transaction':_0x1ae364});});})[_0x8fb5('0x26')](function(){_0x226c7d[_0x8fb5('0x6e')](function(_0x38f92c){socket[_0x8fb5('0x6f')](_0x8fb5('0x70'),{'UserId':_0x38f92c['id'],'MailQueueId':_0x50ab61['id']});});});});});}})[_0x8fb5('0x26')](respondWithStatusCode(_0x38d869,null))[_0x8fb5('0x4a')](handleError(_0x38d869,null));};exports[_0x8fb5('0x71')]=function(_0x2c07a4,_0x18bebd,_0xcd893){return db[_0x8fb5('0x64')][_0x8fb5('0x46')]({'where':{'id':_0x2c07a4[_0x8fb5('0x33')]['ids']},'attributes':['id'],'include':[{'model':db[_0x8fb5('0x58')],'as':_0x8fb5('0x65'),'attributes':['id'],'raw':!![]}]})[_0x8fb5('0x26')](handleEntityNotFound(_0x18bebd,null))[_0x8fb5('0x26')](function(_0x4fb316){var _0x2eaa49=_[_0x8fb5('0x2d')](_0x4fb316,'id');var _0xf5263f=[];var _0x5edbac=[];var _0x36a868=squel['select']();_0x36a868[_0x8fb5('0x72')](_0x8fb5('0x73'))[_0x8fb5('0x74')](_0x8fb5('0x75'),'tq')['join'](_0x8fb5('0x76'),'ut',_0x8fb5('0x77'))[_0x8fb5('0x3f')](_0x8fb5('0x78'),_0x2c07a4[_0x8fb5('0x49')]['id']);for(var _0x387d28=0x0;_0x387d28<_0x4fb316[_0x8fb5('0x39')];_0x387d28+=0x1){let _0x4788a4=_0x4fb316[_0x387d28];for(var _0x176188=0x0;_0x176188<_0x4788a4[_0x8fb5('0x65')][_0x8fb5('0x39')];_0x176188+=0x1){let _0x216e5d=_0x4788a4[_0x8fb5('0x65')][_0x176188];var _0x31f3e3=_0x36a868['clone']();_0x31f3e3[_0x8fb5('0x3f')](_0x8fb5('0x79'),_0x216e5d['id']);_0x5edbac[_0x8fb5('0x7a')](db[_0x8fb5('0x6a')][_0x8fb5('0x33')](_0x31f3e3[_0x8fb5('0x7b')](),{'type':db[_0x8fb5('0x6a')][_0x8fb5('0x7c')]['SELECT']})[_0x8fb5('0x26')](function(_0x3646a0){if(_0x3646a0['length']===0x1){return _0x216e5d['id'];}else{var _0x44fb11=_[_0x8fb5('0x7d')](_['map'](_0x3646a0,_0x8fb5('0x7e')),function(_0x27b869){return _[_0x8fb5('0x7f')](_0x2eaa49,_0x27b869);});if(_0x44fb11){return _0x216e5d['id'];}}}));}}return BPromise['all'](_0x5edbac)['then'](function(_0x415f23){_0xf5263f=_(_0xf5263f)[_0x8fb5('0x80')](_0x415f23)['compact']()[_0x8fb5('0x81')]();return db['MailQueue']['find']({'where':{'id':_0x2c07a4[_0x8fb5('0x49')]['id']}})[_0x8fb5('0x26')](function(_0x182469){return db[_0x8fb5('0x6a')]['transaction'](function(_0x4d1ec7){return _0x182469[_0x8fb5('0x71')](_0x2c07a4[_0x8fb5('0x33')][_0x8fb5('0x82')],{'transaction':_0x4d1ec7})[_0x8fb5('0x26')](function(){if(!_[_0x8fb5('0x83')](_0xf5263f)){return _0x182469[_0x8fb5('0x84')](_0xf5263f,{'transaction':_0x4d1ec7});}})[_0x8fb5('0x26')](function(){_0xf5263f[_0x8fb5('0x6e')](function(_0xe3ae74){socket[_0x8fb5('0x6f')]('userMailQueue:remove',{'UserId':_0xe3ae74,'MailQueueId':_0x182469['id']});});});});});});})['then'](respondWithStatusCode(_0x18bebd,null))[_0x8fb5('0x4a')](handleError(_0x18bebd,null));};exports[_0x8fb5('0x85')]=function(_0x583225,_0x719fe8,_0x1c651c){return db[_0x8fb5('0x2e')][_0x8fb5('0x51')]({'where':{'id':_0x583225[_0x8fb5('0x49')]['id']}})[_0x8fb5('0x26')](handleEntityNotFound(_0x719fe8,null))[_0x8fb5('0x26')](function(_0x683f6e){if(_0x683f6e){return _0x683f6e[_0x8fb5('0x85')](_0x583225['body'][_0x8fb5('0x82')],_[_0x8fb5('0x86')](_0x583225['body'],[_0x8fb5('0x82'),'id'])||{})[_0x8fb5('0x87')](function(_0xc8bc5c){for(var _0x2a4630=0x0;_0x2a4630<_0x583225[_0x8fb5('0x4c')]['ids'][_0x8fb5('0x39')];_0x2a4630+=0x1){socket[_0x8fb5('0x6f')]('userMailQueue:save',{'UserId':Number(_0x583225['body'][_0x8fb5('0x82')][_0x2a4630]),'MailQueueId':Number(_0x583225['params']['id'])});}return _0xc8bc5c;});}})[_0x8fb5('0x26')](respondWithResult(_0x719fe8,null))['catch'](handleError(_0x719fe8,null));};exports[_0x8fb5('0x84')]=function(_0x17bf93,_0x57d579,_0x44440b){return db[_0x8fb5('0x2e')]['find']({'where':{'id':_0x17bf93[_0x8fb5('0x49')]['id']}})[_0x8fb5('0x26')](handleEntityNotFound(_0x57d579,null))[_0x8fb5('0x26')](function(_0x20a984){if(_0x20a984){return _0x20a984[_0x8fb5('0x84')](_0x17bf93[_0x8fb5('0x33')][_0x8fb5('0x82')])['then'](function(){if(_[_0x8fb5('0x88')](_0x17bf93[_0x8fb5('0x33')][_0x8fb5('0x82')])){for(var _0xc819dd=0x0;_0xc819dd<_0x17bf93[_0x8fb5('0x33')][_0x8fb5('0x82')][_0x8fb5('0x39')];_0xc819dd+=0x1){socket[_0x8fb5('0x6f')](_0x8fb5('0x89'),{'UserId':Number(_0x17bf93[_0x8fb5('0x33')]['ids'][_0xc819dd]),'MailQueueId':Number(_0x17bf93[_0x8fb5('0x49')]['id'])});}}else{socket['emit'](_0x8fb5('0x89'),{'UserId':Number(_0x17bf93[_0x8fb5('0x33')][_0x8fb5('0x82')]),'MailQueueId':Number(_0x17bf93['params']['id'])});}});}})[_0x8fb5('0x26')](respondWithStatusCode(_0x57d579,null))[_0x8fb5('0x4a')](handleError(_0x57d579,null));};exports[_0x8fb5('0x8a')]=function(_0x3e0994,_0x1cb96d,_0x267b00){var _0x33f37a={};var _0x5d14bc={};var _0x2ee0bb;var _0x139b31;return db['MailQueue']['findOne']({'where':{'id':_0x3e0994[_0x8fb5('0x49')]['id']}})['then'](handleEntityNotFound(_0x1cb96d,null))[_0x8fb5('0x26')](function(_0x31d05b){if(_0x31d05b){_0x2ee0bb=_0x31d05b;_0x5d14bc[_0x8fb5('0x32')]=_[_0x8fb5('0x34')](db[_0x8fb5('0x58')]['rawAttributes']);_0x5d14bc[_0x8fb5('0x33')]=_[_0x8fb5('0x34')](_0x3e0994[_0x8fb5('0x33')]);_0x5d14bc[_0x8fb5('0x35')]=_[_0x8fb5('0x36')](_0x5d14bc['model'],_0x5d14bc[_0x8fb5('0x33')]);_0x33f37a[_0x8fb5('0x37')]=_[_0x8fb5('0x36')](_0x5d14bc[_0x8fb5('0x32')],qs[_0x8fb5('0x38')](_0x3e0994[_0x8fb5('0x33')]['fields']));_0x33f37a['attributes']=_0x33f37a[_0x8fb5('0x37')]['length']?_0x33f37a[_0x8fb5('0x37')]:_0x5d14bc[_0x8fb5('0x32')];_0x33f37a['order']=qs['sort'](_0x3e0994[_0x8fb5('0x33')][_0x8fb5('0x3d')]);_0x33f37a[_0x8fb5('0x3f')]=qs[_0x8fb5('0x35')](_[_0x8fb5('0x3e')](_0x3e0994['query'],_0x5d14bc[_0x8fb5('0x35')]));if(_0x3e0994['query'][_0x8fb5('0x42')]){_0x33f37a[_0x8fb5('0x3f')]=_[_0x8fb5('0x57')](_0x33f37a['where'],{'$or':_[_0x8fb5('0x2d')](_0x33f37a[_0x8fb5('0x37')],function(_0x3870f2){var _0x579351={};_0x579351[_0x3870f2]={'$like':'%'+_0x3e0994[_0x8fb5('0x33')][_0x8fb5('0x42')]+'%'};return _0x579351;})});}_0x33f37a=_[_0x8fb5('0x57')]({},_0x33f37a,_0x3e0994[_0x8fb5('0x43')]);return _0x2ee0bb[_0x8fb5('0x8a')](_0x33f37a);}})['then'](function(_0x39908a){if(_0x39908a){_0x139b31=_0x39908a['length'];if(!_0x3e0994[_0x8fb5('0x33')][_0x8fb5('0x3a')](_0x8fb5('0x3b'))){_0x33f37a['limit']=qs[_0x8fb5('0x20')](_0x3e0994['query'][_0x8fb5('0x20')]);_0x33f37a[_0x8fb5('0x1f')]=qs[_0x8fb5('0x1f')](_0x3e0994['query'][_0x8fb5('0x1f')]);}return _0x2ee0bb['getAgents'](_0x33f37a);}})[_0x8fb5('0x26')](function(_0x349cba){if(_0x349cba){return _0x349cba?{'count':_0x139b31,'rows':_0x349cba}:null;}})[_0x8fb5('0x26')](respondWithResult(_0x1cb96d,null))[_0x8fb5('0x4a')](handleError(_0x1cb96d,null));}; \ No newline at end of file diff --git a/server/api/mailQueue/mailQueue.events.js b/server/api/mailQueue/mailQueue.events.js index d400b74..9255bf6 100644 --- a/server/api/mailQueue/mailQueue.events.js +++ b/server/api/mailQueue/mailQueue.events.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x7f5d=['update','remove','emit','hasOwnProperty','hook','exports','events','../../mysqldb'];(function(_0x4c3c4e,_0x2623b0){var _0x1f3ee6=function(_0x1737f8){while(--_0x1737f8){_0x4c3c4e['push'](_0x4c3c4e['shift']());}};_0x1f3ee6(++_0x2623b0);}(_0x7f5d,0xd6));var _0xd7f5=function(_0x423d1c,_0x63747f){_0x423d1c=_0x423d1c-0x0;var _0xe7d0a2=_0x7f5d[_0x423d1c];return _0xe7d0a2;};'use strict';var EventEmitter=require(_0xd7f5('0x0'));var MailQueue=require(_0xd7f5('0x1'))['db']['MailQueue'];var MailQueueEvents=new EventEmitter();MailQueueEvents['setMaxListeners'](0x0);var events={'afterCreate':'save','afterUpdate':_0xd7f5('0x2'),'afterDestroy':_0xd7f5('0x3')};function emitEvent(_0x5b7202){return function(_0x418614,_0x510f7f,_0x5a0b82){MailQueueEvents[_0xd7f5('0x4')](_0x5b7202+':'+_0x418614['id'],_0x418614);MailQueueEvents[_0xd7f5('0x4')](_0x5b7202,_0x418614);_0x5a0b82(null);};}for(var e in events){if(events[_0xd7f5('0x5')](e)){var event=events[e];MailQueue[_0xd7f5('0x6')](e,emitEvent(event));}}module[_0xd7f5('0x7')]=MailQueueEvents; \ No newline at end of file +var _0x2dfe=['save','update','remove','emit','hasOwnProperty','hook','exports','events','../../mysqldb','MailQueue','setMaxListeners'];(function(_0x1cda61,_0x34c664){var _0x20e7d0=function(_0x7b5a79){while(--_0x7b5a79){_0x1cda61['push'](_0x1cda61['shift']());}};_0x20e7d0(++_0x34c664);}(_0x2dfe,0x151));var _0xe2df=function(_0x38300c,_0x4618b9){_0x38300c=_0x38300c-0x0;var _0x591bf6=_0x2dfe[_0x38300c];return _0x591bf6;};'use strict';var EventEmitter=require(_0xe2df('0x0'));var MailQueue=require(_0xe2df('0x1'))['db'][_0xe2df('0x2')];var MailQueueEvents=new EventEmitter();MailQueueEvents[_0xe2df('0x3')](0x0);var events={'afterCreate':_0xe2df('0x4'),'afterUpdate':_0xe2df('0x5'),'afterDestroy':_0xe2df('0x6')};function emitEvent(_0x10c0bd){return function(_0x1fb532,_0x47757e,_0x1e21c5){MailQueueEvents['emit'](_0x10c0bd+':'+_0x1fb532['id'],_0x1fb532);MailQueueEvents[_0xe2df('0x7')](_0x10c0bd,_0x1fb532);_0x1e21c5(null);};}for(var e in events){if(events[_0xe2df('0x8')](e)){var event=events[e];MailQueue[_0xe2df('0x9')](e,emitEvent(event));}}module[_0xe2df('0xa')]=MailQueueEvents; \ No newline at end of file diff --git a/server/api/mailQueue/mailQueue.model.js b/server/api/mailQueue/mailQueue.model.js index 56cc637..cbfc84e 100644 --- a/server/api/mailQueue/mailQueue.model.js +++ b/server/api/mailQueue/mailQueue.model.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xb135=['MailQueue','mail_queues','lodash','util','../../config/logger','api','moment','bluebird','request-promise','path','rimraf','../../config/environment','./mailQueue.attributes','exports','define'];(function(_0x129c46,_0x58f8f5){var _0x534925=function(_0x14c788){while(--_0x14c788){_0x129c46['push'](_0x129c46['shift']());}};_0x534925(++_0x58f8f5);}(_0xb135,0x1b5));var _0x5b13=function(_0x336a9f,_0x232328){_0x336a9f=_0x336a9f-0x0;var _0x40831a=_0xb135[_0x336a9f];return _0x40831a;};'use strict';var _=require(_0x5b13('0x0'));var util=require(_0x5b13('0x1'));var logger=require(_0x5b13('0x2'))(_0x5b13('0x3'));var moment=require(_0x5b13('0x4'));var BPromise=require(_0x5b13('0x5'));var rp=require(_0x5b13('0x6'));var fs=require('fs');var path=require(_0x5b13('0x7'));var rimraf=require(_0x5b13('0x8'));var config=require(_0x5b13('0x9'));var attributes=require(_0x5b13('0xa'));module[_0x5b13('0xb')]=function(_0x903923,_0x50309d){return _0x903923[_0x5b13('0xc')](_0x5b13('0xd'),attributes,{'tableName':_0x5b13('0xe'),'paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file +var _0xd5af=['mail_queues','util','../../config/logger','api','moment','bluebird','request-promise','path','rimraf','../../config/environment','./mailQueue.attributes','exports','define','MailQueue'];(function(_0x4f2540,_0x10e19b){var _0x151dd6=function(_0x57c8ec){while(--_0x57c8ec){_0x4f2540['push'](_0x4f2540['shift']());}};_0x151dd6(++_0x10e19b);}(_0xd5af,0x135));var _0xfd5a=function(_0x57204f,_0x33039d){_0x57204f=_0x57204f-0x0;var _0xf7e51d=_0xd5af[_0x57204f];return _0xf7e51d;};'use strict';var _=require('lodash');var util=require(_0xfd5a('0x0'));var logger=require(_0xfd5a('0x1'))(_0xfd5a('0x2'));var moment=require(_0xfd5a('0x3'));var BPromise=require(_0xfd5a('0x4'));var rp=require(_0xfd5a('0x5'));var fs=require('fs');var path=require(_0xfd5a('0x6'));var rimraf=require(_0xfd5a('0x7'));var config=require(_0xfd5a('0x8'));var attributes=require(_0xfd5a('0x9'));module[_0xfd5a('0xa')]=function(_0xc596a5,_0x10a698){return _0xc596a5[_0xfd5a('0xb')](_0xfd5a('0xc'),attributes,{'tableName':_0xfd5a('0xd'),'paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file diff --git a/server/api/mailQueue/mailQueue.rpc.js b/server/api/mailQueue/mailQueue.rpc.js index 94d52ed..b861115 100644 --- a/server/api/mailQueue/mailQueue.rpc.js +++ b/server/api/mailQueue/mailQueue.rpc.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x12c9=['MailQueue','findAll','options','raw','where','include','map','model','attributes','then','info','GetMailQueue','ShowMailQueue','find','lodash','util','moment','bluebird','../../mysqldb','../../config/logger','rpc','jayson/promise','client','http','redis','defaults','socket.io-emitter','./mailQueue.socket','register','request','MailQueue,\x20%s,\x20%s','request\x20sent','debug','stringify','error','code','message','result','catch'];(function(_0x240261,_0x4fe66c){var _0x45c332=function(_0x4f367a){while(--_0x4f367a){_0x240261['push'](_0x240261['shift']());}};_0x45c332(++_0x4fe66c);}(_0x12c9,0x16d));var _0x912c=function(_0x1ccb49,_0x5ccb57){_0x1ccb49=_0x1ccb49-0x0;var _0x21732e=_0x12c9[_0x1ccb49];return _0x21732e;};'use strict';var _=require(_0x912c('0x0'));var util=require(_0x912c('0x1'));var moment=require(_0x912c('0x2'));var BPromise=require(_0x912c('0x3'));var rs=require('randomstring');var fs=require('fs');var Redis=require('ioredis');var db=require(_0x912c('0x4'))['db'];var utils=require('../../config/utils');var logger=require(_0x912c('0x5'))(_0x912c('0x6'));var config=require('../../config/environment');var jayson=require(_0x912c('0x7'));var client=jayson[_0x912c('0x8')][_0x912c('0x9')]({'port':0x232a});config[_0x912c('0xa')]=_[_0x912c('0xb')](config[_0x912c('0xa')],{'host':'localhost','port':0x18eb});var socket=require(_0x912c('0xc'))(new Redis(config[_0x912c('0xa')]));require(_0x912c('0xd'))[_0x912c('0xe')](socket);function respondWithRpcPromise(_0x337be9,_0x3caff9,_0x18c0e2){return new BPromise(function(_0x3a287b,_0x5a7942){return client[_0x912c('0xf')](_0x337be9,_0x18c0e2)['then'](function(_0x97f1ad){logger['info'](_0x912c('0x10'),_0x3caff9,_0x912c('0x11'));logger[_0x912c('0x12')]('MailQueue,\x20%s,\x20%s,\x20%s',_0x3caff9,'request\x20sent',JSON[_0x912c('0x13')](_0x97f1ad));if(_0x97f1ad[_0x912c('0x14')]){if(_0x97f1ad[_0x912c('0x14')][_0x912c('0x15')]===0x1f4){logger['error'](_0x912c('0x10'),_0x3caff9,_0x97f1ad[_0x912c('0x14')]['message']);return _0x5a7942(_0x97f1ad[_0x912c('0x14')][_0x912c('0x16')]);}logger['error'](_0x912c('0x10'),_0x3caff9,_0x97f1ad[_0x912c('0x14')][_0x912c('0x16')]);return _0x3a287b(_0x97f1ad[_0x912c('0x14')][_0x912c('0x16')]);}else{logger['info'](_0x912c('0x10'),_0x3caff9,_0x912c('0x11'));_0x3a287b(_0x97f1ad[_0x912c('0x17')][_0x912c('0x16')]);}})[_0x912c('0x18')](function(_0x5d56d0){logger[_0x912c('0x14')]('MailQueue,\x20%s,\x20%s',_0x3caff9,_0x5d56d0);_0x5a7942(_0x5d56d0);});});}exports['GetMailQueue']=function(_0x2f8b04){var _0x40172e=this;return new Promise(function(_0x3fa2d1,_0x10d001){return db[_0x912c('0x19')][_0x912c('0x1a')]({'raw':_0x2f8b04[_0x912c('0x1b')]?_0x2f8b04[_0x912c('0x1b')][_0x912c('0x1c')]===undefined?!![]:![]:!![],'where':_0x2f8b04['options']?_0x2f8b04['options'][_0x912c('0x1d')]||null:null,'attributes':_0x2f8b04[_0x912c('0x1b')]?_0x2f8b04['options']['attributes']||null:null,'limit':_0x2f8b04['options']?_0x2f8b04[_0x912c('0x1b')]['limit']||null:null,'include':_0x2f8b04[_0x912c('0x1b')]?_0x2f8b04[_0x912c('0x1b')][_0x912c('0x1e')]?_[_0x912c('0x1f')](_0x2f8b04['options']['include'],function(_0x30ef4c){return{'model':db[_0x30ef4c[_0x912c('0x20')]],'as':_0x30ef4c['as'],'attributes':_0x30ef4c[_0x912c('0x21')],'include':_0x30ef4c[_0x912c('0x1e')]?_[_0x912c('0x1f')](_0x30ef4c[_0x912c('0x1e')],function(_0x35de22){return{'model':db[_0x35de22[_0x912c('0x20')]],'as':_0x35de22['as'],'attributes':_0x35de22[_0x912c('0x21')],'include':_0x35de22[_0x912c('0x1e')]?_[_0x912c('0x1f')](_0x35de22[_0x912c('0x1e')],function(_0x560e73){return{'model':db[_0x560e73['model']],'as':_0x560e73['as'],'attributes':_0x560e73[_0x912c('0x21')]};}):[]};}):[]};}):[]:[]})[_0x912c('0x22')](function(_0xa37b34){logger[_0x912c('0x23')]('GetMailQueue',_0x2f8b04);logger[_0x912c('0x12')](_0x912c('0x24'),_0x2f8b04,JSON[_0x912c('0x13')](_0xa37b34));_0x3fa2d1(_0xa37b34);})['catch'](function(_0x368c6c){logger[_0x912c('0x14')](_0x912c('0x24'),_0x368c6c[_0x912c('0x16')],_0x2f8b04);_0x10d001(_0x40172e[_0x912c('0x14')](0x1f4,_0x368c6c[_0x912c('0x16')]));});});};exports[_0x912c('0x25')]=function(_0x42110c){var _0x3a1e0b=this;return new Promise(function(_0x59ce08,_0x481219){return db[_0x912c('0x19')][_0x912c('0x26')]({'raw':_0x42110c['options']?_0x42110c['options'][_0x912c('0x1c')]===undefined?!![]:![]:!![],'where':_0x42110c[_0x912c('0x1b')]?_0x42110c[_0x912c('0x1b')][_0x912c('0x1d')]||null:null,'attributes':_0x42110c[_0x912c('0x1b')]?_0x42110c[_0x912c('0x1b')][_0x912c('0x21')]||null:null,'include':_0x42110c['options']?_0x42110c[_0x912c('0x1b')][_0x912c('0x1e')]?_[_0x912c('0x1f')](_0x42110c['options']['include'],function(_0xd51e73){return{'model':db[_0xd51e73[_0x912c('0x20')]],'as':_0xd51e73['as'],'attributes':_0xd51e73['attributes'],'include':_0xd51e73[_0x912c('0x1e')]?_['map'](_0xd51e73['include'],function(_0x53c45b){return{'model':db[_0x53c45b[_0x912c('0x20')]],'as':_0x53c45b['as'],'attributes':_0x53c45b['attributes'],'include':_0x53c45b[_0x912c('0x1e')]?_[_0x912c('0x1f')](_0x53c45b[_0x912c('0x1e')],function(_0x464b35){return{'model':db[_0x464b35[_0x912c('0x20')]],'as':_0x464b35['as'],'attributes':_0x464b35['attributes']};}):[]};}):[]};}):[]:[]})[_0x912c('0x22')](function(_0x1994c9){logger[_0x912c('0x23')](_0x912c('0x25'),_0x42110c);logger[_0x912c('0x12')](_0x912c('0x25'),_0x42110c,JSON[_0x912c('0x13')](_0x1994c9));_0x59ce08(_0x1994c9);})[_0x912c('0x18')](function(_0x4ab736){logger[_0x912c('0x14')]('ShowMailQueue',_0x4ab736[_0x912c('0x16')],_0x42110c);_0x481219(_0x3a1e0b[_0x912c('0x14')](0x1f4,_0x4ab736['message']));});});}; \ No newline at end of file +var _0x1601=['model','catch','ShowMailQueue','find','util','bluebird','ioredis','../../config/logger','rpc','../../config/environment','http','redis','defaults','localhost','./mailQueue.socket','register','request','then','info','request\x20sent','debug','MailQueue,\x20%s,\x20%s,\x20%s','stringify','error','code','MailQueue,\x20%s,\x20%s','message','result','GetMailQueue','MailQueue','options','raw','where','limit','include','map','attributes'];(function(_0x3bf83f,_0x181cac){var _0x22c4a9=function(_0xb3ff0d){while(--_0xb3ff0d){_0x3bf83f['push'](_0x3bf83f['shift']());}};_0x22c4a9(++_0x181cac);}(_0x1601,0x151));var _0x1160=function(_0x280587,_0x4e9971){_0x280587=_0x280587-0x0;var _0x3b7543=_0x1601[_0x280587];return _0x3b7543;};'use strict';var _=require('lodash');var util=require(_0x1160('0x0'));var moment=require('moment');var BPromise=require(_0x1160('0x1'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x1160('0x2'));var db=require('../../mysqldb')['db'];var utils=require('../../config/utils');var logger=require(_0x1160('0x3'))(_0x1160('0x4'));var config=require(_0x1160('0x5'));var jayson=require('jayson/promise');var client=jayson['client'][_0x1160('0x6')]({'port':0x232a});config[_0x1160('0x7')]=_[_0x1160('0x8')](config['redis'],{'host':_0x1160('0x9'),'port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config[_0x1160('0x7')]));require(_0x1160('0xa'))[_0x1160('0xb')](socket);function respondWithRpcPromise(_0x35fbfe,_0x536fbe,_0x39da44){return new BPromise(function(_0x14d24f,_0x9872a5){return client[_0x1160('0xc')](_0x35fbfe,_0x39da44)[_0x1160('0xd')](function(_0x4f41bf){logger[_0x1160('0xe')]('MailQueue,\x20%s,\x20%s',_0x536fbe,_0x1160('0xf'));logger[_0x1160('0x10')](_0x1160('0x11'),_0x536fbe,_0x1160('0xf'),JSON[_0x1160('0x12')](_0x4f41bf));if(_0x4f41bf['error']){if(_0x4f41bf[_0x1160('0x13')][_0x1160('0x14')]===0x1f4){logger[_0x1160('0x13')](_0x1160('0x15'),_0x536fbe,_0x4f41bf[_0x1160('0x13')][_0x1160('0x16')]);return _0x9872a5(_0x4f41bf[_0x1160('0x13')][_0x1160('0x16')]);}logger[_0x1160('0x13')](_0x1160('0x15'),_0x536fbe,_0x4f41bf[_0x1160('0x13')][_0x1160('0x16')]);return _0x14d24f(_0x4f41bf[_0x1160('0x13')][_0x1160('0x16')]);}else{logger[_0x1160('0xe')](_0x1160('0x15'),_0x536fbe,_0x1160('0xf'));_0x14d24f(_0x4f41bf[_0x1160('0x17')]['message']);}})['catch'](function(_0x221b5d){logger['error']('MailQueue,\x20%s,\x20%s',_0x536fbe,_0x221b5d);_0x9872a5(_0x221b5d);});});}exports[_0x1160('0x18')]=function(_0x7efc43){var _0xe7bfcb=this;return new Promise(function(_0x3c1ce9,_0x4abddd){return db[_0x1160('0x19')]['findAll']({'raw':_0x7efc43[_0x1160('0x1a')]?_0x7efc43[_0x1160('0x1a')][_0x1160('0x1b')]===undefined?!![]:![]:!![],'where':_0x7efc43[_0x1160('0x1a')]?_0x7efc43[_0x1160('0x1a')][_0x1160('0x1c')]||null:null,'attributes':_0x7efc43['options']?_0x7efc43[_0x1160('0x1a')]['attributes']||null:null,'limit':_0x7efc43[_0x1160('0x1a')]?_0x7efc43[_0x1160('0x1a')][_0x1160('0x1d')]||null:null,'include':_0x7efc43[_0x1160('0x1a')]?_0x7efc43[_0x1160('0x1a')][_0x1160('0x1e')]?_[_0x1160('0x1f')](_0x7efc43[_0x1160('0x1a')][_0x1160('0x1e')],function(_0x52d053){return{'model':db[_0x52d053['model']],'as':_0x52d053['as'],'attributes':_0x52d053[_0x1160('0x20')],'include':_0x52d053[_0x1160('0x1e')]?_[_0x1160('0x1f')](_0x52d053[_0x1160('0x1e')],function(_0x532a43){return{'model':db[_0x532a43[_0x1160('0x21')]],'as':_0x532a43['as'],'attributes':_0x532a43[_0x1160('0x20')],'include':_0x532a43['include']?_[_0x1160('0x1f')](_0x532a43[_0x1160('0x1e')],function(_0x1d45b1){return{'model':db[_0x1d45b1[_0x1160('0x21')]],'as':_0x1d45b1['as'],'attributes':_0x1d45b1[_0x1160('0x20')]};}):[]};}):[]};}):[]:[]})['then'](function(_0x3cde09){logger[_0x1160('0xe')](_0x1160('0x18'),_0x7efc43);logger[_0x1160('0x10')]('GetMailQueue',_0x7efc43,JSON[_0x1160('0x12')](_0x3cde09));_0x3c1ce9(_0x3cde09);})[_0x1160('0x22')](function(_0x5609d0){logger[_0x1160('0x13')]('GetMailQueue',_0x5609d0['message'],_0x7efc43);_0x4abddd(_0xe7bfcb[_0x1160('0x13')](0x1f4,_0x5609d0[_0x1160('0x16')]));});});};exports[_0x1160('0x23')]=function(_0x319196){var _0x4ab8e4=this;return new Promise(function(_0x44d8c8,_0xdff5a3){return db['MailQueue'][_0x1160('0x24')]({'raw':_0x319196[_0x1160('0x1a')]?_0x319196[_0x1160('0x1a')][_0x1160('0x1b')]===undefined?!![]:![]:!![],'where':_0x319196[_0x1160('0x1a')]?_0x319196[_0x1160('0x1a')][_0x1160('0x1c')]||null:null,'attributes':_0x319196[_0x1160('0x1a')]?_0x319196[_0x1160('0x1a')]['attributes']||null:null,'include':_0x319196[_0x1160('0x1a')]?_0x319196[_0x1160('0x1a')][_0x1160('0x1e')]?_['map'](_0x319196[_0x1160('0x1a')][_0x1160('0x1e')],function(_0x595015){return{'model':db[_0x595015[_0x1160('0x21')]],'as':_0x595015['as'],'attributes':_0x595015['attributes'],'include':_0x595015[_0x1160('0x1e')]?_[_0x1160('0x1f')](_0x595015['include'],function(_0x36fc9c){return{'model':db[_0x36fc9c[_0x1160('0x21')]],'as':_0x36fc9c['as'],'attributes':_0x36fc9c[_0x1160('0x20')],'include':_0x36fc9c[_0x1160('0x1e')]?_[_0x1160('0x1f')](_0x36fc9c[_0x1160('0x1e')],function(_0x203531){return{'model':db[_0x203531['model']],'as':_0x203531['as'],'attributes':_0x203531[_0x1160('0x20')]};}):[]};}):[]};}):[]:[]})[_0x1160('0xd')](function(_0x1a05f9){logger[_0x1160('0xe')](_0x1160('0x23'),_0x319196);logger[_0x1160('0x10')](_0x1160('0x23'),_0x319196,JSON[_0x1160('0x12')](_0x1a05f9));_0x44d8c8(_0x1a05f9);})['catch'](function(_0xaafdbe){logger['error']('ShowMailQueue',_0xaafdbe[_0x1160('0x16')],_0x319196);_0xdff5a3(_0x4ab8e4[_0x1160('0x13')](0x1f4,_0xaafdbe[_0x1160('0x16')]));});});}; \ No newline at end of file diff --git a/server/api/mailQueue/mailQueue.socket.js b/server/api/mailQueue/mailQueue.socket.js index 758c556..72ea28b 100644 --- a/server/api/mailQueue/mailQueue.socket.js +++ b/server/api/mailQueue/mailQueue.socket.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x4df6=['update','removeListener','register','length','save','remove'];(function(_0x15ddc9,_0x209223){var _0x2fc9e8=function(_0x2d5e5f){while(--_0x2d5e5f){_0x15ddc9['push'](_0x15ddc9['shift']());}};_0x2fc9e8(++_0x209223);}(_0x4df6,0xdc));var _0x64df=function(_0x4b65fc,_0x194119){_0x4b65fc=_0x4b65fc-0x0;var _0x2263cf=_0x4df6[_0x4b65fc];return _0x2263cf;};'use strict';var MailQueueEvents=require('./mailQueue.events');var events=[_0x64df('0x0'),_0x64df('0x1'),_0x64df('0x2')];function createListener(_0x3dc0d9,_0x5a8bee){return function(_0x1a0238){_0x5a8bee['emit'](_0x3dc0d9,_0x1a0238);};}function removeListener(_0x1134c5,_0x17c22a){return function(){MailQueueEvents[_0x64df('0x3')](_0x1134c5,_0x17c22a);};}exports[_0x64df('0x4')]=function(_0x552175){for(var _0x26120b=0x0,_0x2d3161=events[_0x64df('0x5')];_0x26120b<_0x2d3161;_0x26120b++){var _0xbe8f32=events[_0x26120b];var _0x5964b0=createListener('mailQueue:'+_0xbe8f32,_0x552175);MailQueueEvents['on'](_0xbe8f32,_0x5964b0);}}; \ No newline at end of file +var _0x0e89=['./mailQueue.events','remove','emit','removeListener','register','length','mailQueue:'];(function(_0x43df12,_0xef698){var _0x44f2a9=function(_0x77f02a){while(--_0x77f02a){_0x43df12['push'](_0x43df12['shift']());}};_0x44f2a9(++_0xef698);}(_0x0e89,0x69));var _0x90e8=function(_0x40220a,_0x22feb1){_0x40220a=_0x40220a-0x0;var _0x3903cc=_0x0e89[_0x40220a];return _0x3903cc;};'use strict';var MailQueueEvents=require(_0x90e8('0x0'));var events=['save',_0x90e8('0x1'),'update'];function createListener(_0x15851,_0x203797){return function(_0x15c6d8){_0x203797[_0x90e8('0x2')](_0x15851,_0x15c6d8);};}function removeListener(_0x51330c,_0x4809af){return function(){MailQueueEvents[_0x90e8('0x3')](_0x51330c,_0x4809af);};}exports[_0x90e8('0x4')]=function(_0x5e609d){for(var _0x55cb57=0x0,_0x2c0813=events[_0x90e8('0x5')];_0x55cb57<_0x2c0813;_0x55cb57++){var _0x47a2e7=events[_0x55cb57];var _0x165d7e=createListener(_0x90e8('0x6')+_0x47a2e7,_0x5e609d);MailQueueEvents['on'](_0x47a2e7,_0x165d7e);}}; \ No newline at end of file diff --git a/server/api/mailQueueReport/index.js b/server/api/mailQueueReport/index.js index bd3979f..ba07525 100644 --- a/server/api/mailQueueReport/index.js +++ b/server/api/mailQueueReport/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x4e03=['Router','fs-extra','../../components/auth/service','../../components/interaction/service','./mailQueueReport.controller','get','isAuthenticated','index','/describe','describe','show','post','create','put','update','delete','/:id','destroy','multer','util','connect-timeout','express'];(function(_0x1233d2,_0x5416f4){var _0x22759e=function(_0xb516aa){while(--_0xb516aa){_0x1233d2['push'](_0x1233d2['shift']());}};_0x22759e(++_0x5416f4);}(_0x4e03,0x1b4));var _0x34e0=function(_0x1c575f,_0x2808eb){_0x1c575f=_0x1c575f-0x0;var _0x3211e8=_0x4e03[_0x1c575f];return _0x3211e8;};'use strict';var multer=require(_0x34e0('0x0'));var util=require(_0x34e0('0x1'));var path=require('path');var timeout=require(_0x34e0('0x2'));var express=require(_0x34e0('0x3'));var router=express[_0x34e0('0x4')]();var fs_extra=require(_0x34e0('0x5'));var auth=require(_0x34e0('0x6'));var interaction=require(_0x34e0('0x7'));var config=require('../../config/environment');var controller=require(_0x34e0('0x8'));router[_0x34e0('0x9')]('/',auth[_0x34e0('0xa')](),controller[_0x34e0('0xb')]);router[_0x34e0('0x9')](_0x34e0('0xc'),auth[_0x34e0('0xa')](),controller[_0x34e0('0xd')]);router[_0x34e0('0x9')]('/:id',auth[_0x34e0('0xa')](),controller[_0x34e0('0xe')]);router[_0x34e0('0xf')]('/',auth[_0x34e0('0xa')](),controller[_0x34e0('0x10')]);router[_0x34e0('0x11')]('/:id',auth[_0x34e0('0xa')](),controller[_0x34e0('0x12')]);router[_0x34e0('0x13')](_0x34e0('0x14'),auth['isAuthenticated'](),controller[_0x34e0('0x15')]);module['exports']=router; \ No newline at end of file +var _0x1146=['../../components/interaction/service','../../config/environment','get','isAuthenticated','index','show','post','put','/:id','update','delete','destroy','multer','util','path','connect-timeout','express','Router'];(function(_0x27055c,_0x180848){var _0x46723f=function(_0x17aa27){while(--_0x17aa27){_0x27055c['push'](_0x27055c['shift']());}};_0x46723f(++_0x180848);}(_0x1146,0xc0));var _0x6114=function(_0x2c45d7,_0x5ce0f5){_0x2c45d7=_0x2c45d7-0x0;var _0x8c322c=_0x1146[_0x2c45d7];return _0x8c322c;};'use strict';var multer=require(_0x6114('0x0'));var util=require(_0x6114('0x1'));var path=require(_0x6114('0x2'));var timeout=require(_0x6114('0x3'));var express=require(_0x6114('0x4'));var router=express[_0x6114('0x5')]();var fs_extra=require('fs-extra');var auth=require('../../components/auth/service');var interaction=require(_0x6114('0x6'));var config=require(_0x6114('0x7'));var controller=require('./mailQueueReport.controller');router[_0x6114('0x8')]('/',auth[_0x6114('0x9')](),controller[_0x6114('0xa')]);router[_0x6114('0x8')]('/describe',auth[_0x6114('0x9')](),controller['describe']);router['get']('/:id',auth[_0x6114('0x9')](),controller[_0x6114('0xb')]);router[_0x6114('0xc')]('/',auth['isAuthenticated'](),controller['create']);router[_0x6114('0xd')](_0x6114('0xe'),auth[_0x6114('0x9')](),controller[_0x6114('0xf')]);router[_0x6114('0x10')](_0x6114('0xe'),auth['isAuthenticated'](),controller[_0x6114('0x11')]);module['exports']=router; \ No newline at end of file diff --git a/server/api/mailQueueReport/mailQueueReport.attributes.js b/server/api/mailQueueReport/mailQueueReport.attributes.js index 2788072..f1ed489 100644 --- a/server/api/mailQueueReport/mailQueueReport.attributes.js +++ b/server/api/mailQueueReport/mailQueueReport.attributes.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x793c=['exports','STRING','DATE'];(function(_0x22c684,_0x753309){var _0x39fcbb=function(_0x38b631){while(--_0x38b631){_0x22c684['push'](_0x22c684['shift']());}};_0x39fcbb(++_0x753309);}(_0x793c,0x99));var _0xc793=function(_0x5f3f88,_0x562baf){_0x5f3f88=_0x5f3f88-0x0;var _0xd08119=_0x793c[_0x5f3f88];return _0xd08119;};'use strict';var moment=require('moment');var Sequelize=require('sequelize');module[_0xc793('0x0')]={'uniqueid':{'type':Sequelize[_0xc793('0x1')],'allowNull':![]},'from':{'type':Sequelize[_0xc793('0x1')]},'joinAt':{'type':Sequelize[_0xc793('0x2')]},'leaveAt':{'type':Sequelize[_0xc793('0x2')]},'acceptAt':{'type':Sequelize[_0xc793('0x2')]},'exitAt':{'type':Sequelize[_0xc793('0x2')]},'reason':{'type':Sequelize['STRING']}}; \ No newline at end of file +var _0xc2e1=['DATE','exports','STRING'];(function(_0x5e877c,_0x3dbeaa){var _0xf35faa=function(_0x552c7f){while(--_0x552c7f){_0x5e877c['push'](_0x5e877c['shift']());}};_0xf35faa(++_0x3dbeaa);}(_0xc2e1,0x1f3));var _0x1c2e=function(_0x205eca,_0x138c20){_0x205eca=_0x205eca-0x0;var _0x193e81=_0xc2e1[_0x205eca];return _0x193e81;};'use strict';var moment=require('moment');var Sequelize=require('sequelize');module[_0x1c2e('0x0')]={'uniqueid':{'type':Sequelize[_0x1c2e('0x1')],'allowNull':![]},'from':{'type':Sequelize['STRING']},'joinAt':{'type':Sequelize[_0x1c2e('0x2')]},'leaveAt':{'type':Sequelize[_0x1c2e('0x2')]},'acceptAt':{'type':Sequelize[_0x1c2e('0x2')]},'exitAt':{'type':Sequelize[_0x1c2e('0x2')]},'reason':{'type':Sequelize[_0x1c2e('0x1')]}}; \ No newline at end of file diff --git a/server/api/mailQueueReport/mailQueueReport.controller.js b/server/api/mailQueueReport/mailQueueReport.controller.js index fc329c9..cb83851 100644 --- a/server/api/mailQueueReport/mailQueueReport.controller.js +++ b/server/api/mailQueueReport/mailQueueReport.controller.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x3d04=['Content-Range','apply','reject','save','update','then','destroy','error','stack','name','send','index','map','fieldName','type','key','model','keys','query','filters','intersection','attributes','fields','length','nolimit','order','sort','where','pick','filter','merge','VIRTUAL','options','MailQueueReport','rows','catch','show','params','rawAttributes','includeAll','create','body','find','describe','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','path','sox','to-csv','ejs','jsforce','desk.js','querystring','papaparse','../../components/parsers/qs','../../config/logger','api','../../config/utils','../../config/environment','../../mysqldb','sendStatus','status','json','limit','undefined','count','offset'];(function(_0x4051df,_0x5beae8){var _0x52a63f=function(_0xaf84e1){while(--_0xaf84e1){_0x4051df['push'](_0x4051df['shift']());}};_0x52a63f(++_0x5beae8);}(_0x3d04,0xbe));var _0x43d0=function(_0x501510,_0x61caa9){_0x501510=_0x501510-0x0;var _0x1e6ee5=_0x3d04[_0x501510];return _0x1e6ee5;};'use strict';var emlformat=require(_0x43d0('0x0'));var rimraf=require(_0x43d0('0x1'));var zipdir=require(_0x43d0('0x2'));var jsonpatch=require(_0x43d0('0x3'));var rp=require(_0x43d0('0x4'));var moment=require(_0x43d0('0x5'));var BPromise=require(_0x43d0('0x6'));var Mustache=require(_0x43d0('0x7'));var util=require('util');var path=require(_0x43d0('0x8'));var sox=require(_0x43d0('0x9'));var csv=require(_0x43d0('0xa'));var ejs=require(_0x43d0('0xb'));var fs=require('fs');var fs_extra=require('fs-extra');var _=require('lodash');var squel=require('squel');var crypto=require('crypto');var jsforce=require(_0x43d0('0xc'));var deskjs=require(_0x43d0('0xd'));var toCsv=require(_0x43d0('0xa'));var querystring=require(_0x43d0('0xe'));var Papa=require(_0x43d0('0xf'));var Redis=require('ioredis');var authService=require('../../components/auth/service');var qs=require(_0x43d0('0x10'));var as=require('../../components/parsers/advancedSearch');var hardwareService=require('../../config/license/hardware');var logger=require(_0x43d0('0x11'))(_0x43d0('0x12'));var utils=require(_0x43d0('0x13'));var config=require(_0x43d0('0x14'));var licenseUtil=require('../../config/license/util');var db=require(_0x43d0('0x15'))['db'];function respondWithStatusCode(_0x23daaa,_0x546b23){_0x546b23=_0x546b23||0xcc;return function(_0x29773b){if(_0x29773b){return _0x23daaa[_0x43d0('0x16')](_0x546b23);}return _0x23daaa[_0x43d0('0x17')](_0x546b23)['end']();};}function respondWithResult(_0xd262a8,_0x2454fa){_0x2454fa=_0x2454fa||0xc8;return function(_0x436130){if(_0x436130){return _0xd262a8['status'](_0x2454fa)[_0x43d0('0x18')](_0x436130);}};}function respondWithFilteredResult(_0x357f87,_0x44e6ec){return function(_0x1218b5){if(_0x1218b5){var _0x91b4a1=typeof _0x44e6ec['offset']==='undefined'&&typeof _0x44e6ec[_0x43d0('0x19')]===_0x43d0('0x1a');var _0x35decf=_0x1218b5['count'];var _0x2c641e=_0x91b4a1?0x0:_0x44e6ec['offset'];var _0x2c9d06=_0x91b4a1?_0x1218b5[_0x43d0('0x1b')]:_0x44e6ec[_0x43d0('0x1c')]+_0x44e6ec['limit'];var _0x3d7dcc;if(_0x2c9d06>=_0x35decf){_0x2c9d06=_0x35decf;_0x3d7dcc=0xc8;}else{_0x3d7dcc=0xce;}_0x357f87[_0x43d0('0x17')](_0x3d7dcc);return _0x357f87['set'](_0x43d0('0x1d'),_0x2c641e+'-'+_0x2c9d06+'/'+_0x35decf)[_0x43d0('0x18')](_0x1218b5);}return null;};}function patchUpdates(_0x348429){return function(_0x248622){try{jsonpatch[_0x43d0('0x1e')](_0x248622,_0x348429,!![]);}catch(_0x28381b){return BPromise[_0x43d0('0x1f')](_0x28381b);}return _0x248622[_0x43d0('0x20')]();};}function saveUpdates(_0x30febc,_0xc8a644){return function(_0xec5f07){if(_0xec5f07){return _0xec5f07[_0x43d0('0x21')](_0x30febc)[_0x43d0('0x22')](function(_0xbc72e6){return _0xbc72e6;});}return null;};}function removeEntity(_0x2efd77,_0x48aa18){return function(_0x2c7b24){if(_0x2c7b24){return _0x2c7b24[_0x43d0('0x23')]()['then'](function(){_0x2efd77[_0x43d0('0x17')](0xcc)['end']();});}};}function handleEntityNotFound(_0x29c111,_0x44497b){return function(_0x5dd310){if(!_0x5dd310){_0x29c111[_0x43d0('0x16')](0x194);}return _0x5dd310;};}function handleError(_0x238c64,_0x5ac4c0){_0x5ac4c0=_0x5ac4c0||0x1f4;return function(_0x12df30){logger[_0x43d0('0x24')](_0x12df30[_0x43d0('0x25')]);if(_0x12df30['name']){delete _0x12df30[_0x43d0('0x26')];}_0x238c64[_0x43d0('0x17')](_0x5ac4c0)[_0x43d0('0x27')](_0x12df30);};}exports[_0x43d0('0x28')]=function(_0x37d78f,_0x440ecb){var _0x31a057={},_0x4a3cd4={},_0x2b0784={'count':0x0,'rows':[]};var _0x2f5bc5=_[_0x43d0('0x29')](db['MailQueueReport']['rawAttributes'],function(_0x52c37b){return{'name':_0x52c37b[_0x43d0('0x2a')],'type':_0x52c37b[_0x43d0('0x2b')][_0x43d0('0x2c')]};});_0x4a3cd4[_0x43d0('0x2d')]=_[_0x43d0('0x29')](_0x2f5bc5,_0x43d0('0x26'));_0x4a3cd4['query']=_[_0x43d0('0x2e')](_0x37d78f[_0x43d0('0x2f')]);_0x4a3cd4[_0x43d0('0x30')]=_[_0x43d0('0x31')](_0x4a3cd4[_0x43d0('0x2d')],_0x4a3cd4[_0x43d0('0x2f')]);_0x31a057[_0x43d0('0x32')]=_[_0x43d0('0x31')](_0x4a3cd4[_0x43d0('0x2d')],qs[_0x43d0('0x33')](_0x37d78f[_0x43d0('0x2f')]['fields']));_0x31a057[_0x43d0('0x32')]=_0x31a057[_0x43d0('0x32')][_0x43d0('0x34')]?_0x31a057[_0x43d0('0x32')]:_0x4a3cd4['model'];if(!_0x37d78f[_0x43d0('0x2f')]['hasOwnProperty'](_0x43d0('0x35'))){_0x31a057[_0x43d0('0x19')]=qs['limit'](_0x37d78f[_0x43d0('0x2f')][_0x43d0('0x19')]);_0x31a057[_0x43d0('0x1c')]=qs[_0x43d0('0x1c')](_0x37d78f[_0x43d0('0x2f')][_0x43d0('0x1c')]);}_0x31a057[_0x43d0('0x36')]=qs[_0x43d0('0x37')](_0x37d78f[_0x43d0('0x2f')][_0x43d0('0x37')]);_0x31a057[_0x43d0('0x38')]=qs['filters'](_[_0x43d0('0x39')](_0x37d78f[_0x43d0('0x2f')],_0x4a3cd4[_0x43d0('0x30')]),_0x2f5bc5);if(_0x37d78f[_0x43d0('0x2f')][_0x43d0('0x3a')]){_0x31a057[_0x43d0('0x38')]=_[_0x43d0('0x3b')](_0x31a057[_0x43d0('0x38')],{'$or':_[_0x43d0('0x29')](_0x2f5bc5,function(_0x43bcc5){if(_0x43bcc5[_0x43d0('0x2b')]!==_0x43d0('0x3c')){var _0x19843c={};_0x19843c[_0x43bcc5[_0x43d0('0x26')]]={'$like':'%'+_0x37d78f['query'][_0x43d0('0x3a')]+'%'};return _0x19843c;}})});}_0x31a057=_[_0x43d0('0x3b')]({},_0x31a057,_0x37d78f[_0x43d0('0x3d')]);var _0xc3f9c7={'where':_0x31a057[_0x43d0('0x38')]};return db[_0x43d0('0x3e')][_0x43d0('0x1b')](_0xc3f9c7)[_0x43d0('0x22')](function(_0x4ae965){_0x2b0784['count']=_0x4ae965;if(_0x37d78f[_0x43d0('0x2f')]['includeAll']){_0x31a057['include']=[{'all':!![]}];}return db[_0x43d0('0x3e')]['findAll'](_0x31a057);})[_0x43d0('0x22')](function(_0x5027d0){_0x2b0784[_0x43d0('0x3f')]=_0x5027d0;return _0x2b0784;})['then'](respondWithFilteredResult(_0x440ecb,_0x31a057))[_0x43d0('0x40')](handleError(_0x440ecb,null));};exports[_0x43d0('0x41')]=function(_0x468b32,_0x4e817e){var _0x3eb2e9={'raw':!![],'where':{'id':_0x468b32[_0x43d0('0x42')]['id']}},_0x520406={};_0x520406['model']=_['keys'](db[_0x43d0('0x3e')][_0x43d0('0x43')]);_0x520406['query']=_[_0x43d0('0x2e')](_0x468b32[_0x43d0('0x2f')]);_0x520406[_0x43d0('0x30')]=_[_0x43d0('0x31')](_0x520406[_0x43d0('0x2d')],_0x520406['query']);_0x3eb2e9[_0x43d0('0x32')]=_[_0x43d0('0x31')](_0x520406[_0x43d0('0x2d')],qs[_0x43d0('0x33')](_0x468b32['query'][_0x43d0('0x33')]));_0x3eb2e9[_0x43d0('0x32')]=_0x3eb2e9[_0x43d0('0x32')][_0x43d0('0x34')]?_0x3eb2e9[_0x43d0('0x32')]:_0x520406['model'];if(_0x468b32[_0x43d0('0x2f')][_0x43d0('0x44')]){_0x3eb2e9['include']=[{'all':!![]}];}_0x3eb2e9=_[_0x43d0('0x3b')]({},_0x3eb2e9,_0x468b32[_0x43d0('0x3d')]);return db[_0x43d0('0x3e')]['find'](_0x3eb2e9)[_0x43d0('0x22')](handleEntityNotFound(_0x4e817e,null))['then'](respondWithResult(_0x4e817e,null))[_0x43d0('0x40')](handleError(_0x4e817e,null));};exports['create']=function(_0x1f55e9,_0x269d99){return db[_0x43d0('0x3e')][_0x43d0('0x45')](_0x1f55e9[_0x43d0('0x46')],{})['then'](respondWithResult(_0x269d99,0xc9))[_0x43d0('0x40')](handleError(_0x269d99,null));};exports['update']=function(_0x5a6364,_0x3e7392){if(_0x5a6364[_0x43d0('0x46')]['id']){delete _0x5a6364[_0x43d0('0x46')]['id'];}return db[_0x43d0('0x3e')][_0x43d0('0x47')]({'where':{'id':_0x5a6364[_0x43d0('0x42')]['id']}})[_0x43d0('0x22')](handleEntityNotFound(_0x3e7392,null))[_0x43d0('0x22')](saveUpdates(_0x5a6364[_0x43d0('0x46')],null))[_0x43d0('0x22')](respondWithResult(_0x3e7392,null))[_0x43d0('0x40')](handleError(_0x3e7392,null));};exports['destroy']=function(_0x338203,_0xd78af1){return db[_0x43d0('0x3e')]['find']({'where':{'id':_0x338203[_0x43d0('0x42')]['id']}})['then'](handleEntityNotFound(_0xd78af1,null))['then'](removeEntity(_0xd78af1,null))[_0x43d0('0x40')](handleError(_0xd78af1,null));};exports[_0x43d0('0x48')]=function(_0x234571,_0x127815){return db[_0x43d0('0x3e')]['describe']()['then'](respondWithResult(_0x127815,null))[_0x43d0('0x40')](handleError(_0x127815,null));}; \ No newline at end of file +var _0x627e=['limit','count','set','reject','save','then','destroy','error','stack','name','index','MailQueueReport','fieldName','key','map','query','keys','filters','intersection','model','attributes','hasOwnProperty','nolimit','sort','where','pick','type','VIRTUAL','filter','merge','options','rows','catch','params','fields','length','includeAll','include','find','body','update','describe','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','bluebird','mustache','util','ejs','fs-extra','lodash','squel','crypto','jsforce','to-csv','ioredis','../../components/auth/service','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','sendStatus','status','end','json','offset','undefined'];(function(_0x46da23,_0x134106){var _0x23f887=function(_0x3d5e17){while(--_0x3d5e17){_0x46da23['push'](_0x46da23['shift']());}};_0x23f887(++_0x134106);}(_0x627e,0x14a));var _0xe627=function(_0x22c320,_0xe5aa59){_0x22c320=_0x22c320-0x0;var _0xe36876=_0x627e[_0x22c320];return _0xe36876;};'use strict';var emlformat=require(_0xe627('0x0'));var rimraf=require(_0xe627('0x1'));var zipdir=require(_0xe627('0x2'));var jsonpatch=require(_0xe627('0x3'));var rp=require(_0xe627('0x4'));var moment=require('moment');var BPromise=require(_0xe627('0x5'));var Mustache=require(_0xe627('0x6'));var util=require(_0xe627('0x7'));var path=require('path');var sox=require('sox');var csv=require('to-csv');var ejs=require(_0xe627('0x8'));var fs=require('fs');var fs_extra=require(_0xe627('0x9'));var _=require(_0xe627('0xa'));var squel=require(_0xe627('0xb'));var crypto=require(_0xe627('0xc'));var jsforce=require(_0xe627('0xd'));var deskjs=require('desk.js');var toCsv=require(_0xe627('0xe'));var querystring=require('querystring');var Papa=require('papaparse');var Redis=require(_0xe627('0xf'));var authService=require(_0xe627('0x10'));var qs=require('../../components/parsers/qs');var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0xe627('0x11'));var logger=require(_0xe627('0x12'))(_0xe627('0x13'));var utils=require(_0xe627('0x14'));var config=require(_0xe627('0x15'));var licenseUtil=require(_0xe627('0x16'));var db=require(_0xe627('0x17'))['db'];function respondWithStatusCode(_0x3919be,_0x1922f5){_0x1922f5=_0x1922f5||0xcc;return function(_0x582190){if(_0x582190){return _0x3919be[_0xe627('0x18')](_0x1922f5);}return _0x3919be[_0xe627('0x19')](_0x1922f5)[_0xe627('0x1a')]();};}function respondWithResult(_0x4be370,_0x42dd1c){_0x42dd1c=_0x42dd1c||0xc8;return function(_0x1e2e62){if(_0x1e2e62){return _0x4be370[_0xe627('0x19')](_0x42dd1c)[_0xe627('0x1b')](_0x1e2e62);}};}function respondWithFilteredResult(_0x62896f,_0x6a9a15){return function(_0x271325){if(_0x271325){var _0x54720a=typeof _0x6a9a15[_0xe627('0x1c')]===_0xe627('0x1d')&&typeof _0x6a9a15[_0xe627('0x1e')]===_0xe627('0x1d');var _0x403982=_0x271325[_0xe627('0x1f')];var _0x56559b=_0x54720a?0x0:_0x6a9a15[_0xe627('0x1c')];var _0x538b22=_0x54720a?_0x271325[_0xe627('0x1f')]:_0x6a9a15['offset']+_0x6a9a15[_0xe627('0x1e')];var _0x565213;if(_0x538b22>=_0x403982){_0x538b22=_0x403982;_0x565213=0xc8;}else{_0x565213=0xce;}_0x62896f['status'](_0x565213);return _0x62896f[_0xe627('0x20')]('Content-Range',_0x56559b+'-'+_0x538b22+'/'+_0x403982)[_0xe627('0x1b')](_0x271325);}return null;};}function patchUpdates(_0x3391ce){return function(_0x4adde7){try{jsonpatch['apply'](_0x4adde7,_0x3391ce,!![]);}catch(_0x4ecfa6){return BPromise[_0xe627('0x21')](_0x4ecfa6);}return _0x4adde7[_0xe627('0x22')]();};}function saveUpdates(_0x4e3338,_0x708a8a){return function(_0x33cb27){if(_0x33cb27){return _0x33cb27['update'](_0x4e3338)[_0xe627('0x23')](function(_0x29221b){return _0x29221b;});}return null;};}function removeEntity(_0x52d492,_0x42f3d1){return function(_0x19adbc){if(_0x19adbc){return _0x19adbc[_0xe627('0x24')]()['then'](function(){_0x52d492[_0xe627('0x19')](0xcc)[_0xe627('0x1a')]();});}};}function handleEntityNotFound(_0x1a5081,_0x3ddd8d){return function(_0x4b9ff9){if(!_0x4b9ff9){_0x1a5081[_0xe627('0x18')](0x194);}return _0x4b9ff9;};}function handleError(_0x1fe192,_0x1635a0){_0x1635a0=_0x1635a0||0x1f4;return function(_0x29eb8e){logger[_0xe627('0x25')](_0x29eb8e[_0xe627('0x26')]);if(_0x29eb8e[_0xe627('0x27')]){delete _0x29eb8e[_0xe627('0x27')];}_0x1fe192[_0xe627('0x19')](_0x1635a0)['send'](_0x29eb8e);};}exports[_0xe627('0x28')]=function(_0x5aeba1,_0x5cd7c8){var _0x1e0bd7={},_0xdf63c8={},_0x5799a3={'count':0x0,'rows':[]};var _0x39c23f=_['map'](db[_0xe627('0x29')]['rawAttributes'],function(_0x262253){return{'name':_0x262253[_0xe627('0x2a')],'type':_0x262253['type'][_0xe627('0x2b')]};});_0xdf63c8['model']=_[_0xe627('0x2c')](_0x39c23f,_0xe627('0x27'));_0xdf63c8[_0xe627('0x2d')]=_[_0xe627('0x2e')](_0x5aeba1[_0xe627('0x2d')]);_0xdf63c8[_0xe627('0x2f')]=_[_0xe627('0x30')](_0xdf63c8[_0xe627('0x31')],_0xdf63c8[_0xe627('0x2d')]);_0x1e0bd7[_0xe627('0x32')]=_[_0xe627('0x30')](_0xdf63c8['model'],qs['fields'](_0x5aeba1[_0xe627('0x2d')]['fields']));_0x1e0bd7[_0xe627('0x32')]=_0x1e0bd7['attributes']['length']?_0x1e0bd7[_0xe627('0x32')]:_0xdf63c8['model'];if(!_0x5aeba1['query'][_0xe627('0x33')](_0xe627('0x34'))){_0x1e0bd7[_0xe627('0x1e')]=qs['limit'](_0x5aeba1['query']['limit']);_0x1e0bd7[_0xe627('0x1c')]=qs['offset'](_0x5aeba1[_0xe627('0x2d')][_0xe627('0x1c')]);}_0x1e0bd7['order']=qs[_0xe627('0x35')](_0x5aeba1[_0xe627('0x2d')]['sort']);_0x1e0bd7[_0xe627('0x36')]=qs[_0xe627('0x2f')](_[_0xe627('0x37')](_0x5aeba1[_0xe627('0x2d')],_0xdf63c8[_0xe627('0x2f')]),_0x39c23f);if(_0x5aeba1[_0xe627('0x2d')]['filter']){_0x1e0bd7[_0xe627('0x36')]=_['merge'](_0x1e0bd7[_0xe627('0x36')],{'$or':_['map'](_0x39c23f,function(_0xe90eda){if(_0xe90eda[_0xe627('0x38')]!==_0xe627('0x39')){var _0x21a533={};_0x21a533[_0xe90eda[_0xe627('0x27')]]={'$like':'%'+_0x5aeba1[_0xe627('0x2d')][_0xe627('0x3a')]+'%'};return _0x21a533;}})});}_0x1e0bd7=_[_0xe627('0x3b')]({},_0x1e0bd7,_0x5aeba1[_0xe627('0x3c')]);var _0x415a25={'where':_0x1e0bd7[_0xe627('0x36')]};return db[_0xe627('0x29')][_0xe627('0x1f')](_0x415a25)['then'](function(_0x4ddff5){_0x5799a3['count']=_0x4ddff5;if(_0x5aeba1['query']['includeAll']){_0x1e0bd7['include']=[{'all':!![]}];}return db[_0xe627('0x29')]['findAll'](_0x1e0bd7);})[_0xe627('0x23')](function(_0x59cd6a){_0x5799a3[_0xe627('0x3d')]=_0x59cd6a;return _0x5799a3;})[_0xe627('0x23')](respondWithFilteredResult(_0x5cd7c8,_0x1e0bd7))[_0xe627('0x3e')](handleError(_0x5cd7c8,null));};exports['show']=function(_0x58e110,_0x26064c){var _0x5f3374={'raw':!![],'where':{'id':_0x58e110[_0xe627('0x3f')]['id']}},_0x5e352e={};_0x5e352e['model']=_[_0xe627('0x2e')](db['MailQueueReport']['rawAttributes']);_0x5e352e[_0xe627('0x2d')]=_[_0xe627('0x2e')](_0x58e110[_0xe627('0x2d')]);_0x5e352e['filters']=_['intersection'](_0x5e352e[_0xe627('0x31')],_0x5e352e['query']);_0x5f3374['attributes']=_[_0xe627('0x30')](_0x5e352e[_0xe627('0x31')],qs[_0xe627('0x40')](_0x58e110[_0xe627('0x2d')][_0xe627('0x40')]));_0x5f3374[_0xe627('0x32')]=_0x5f3374['attributes'][_0xe627('0x41')]?_0x5f3374[_0xe627('0x32')]:_0x5e352e['model'];if(_0x58e110['query'][_0xe627('0x42')]){_0x5f3374[_0xe627('0x43')]=[{'all':!![]}];}_0x5f3374=_[_0xe627('0x3b')]({},_0x5f3374,_0x58e110[_0xe627('0x3c')]);return db[_0xe627('0x29')][_0xe627('0x44')](_0x5f3374)[_0xe627('0x23')](handleEntityNotFound(_0x26064c,null))['then'](respondWithResult(_0x26064c,null))[_0xe627('0x3e')](handleError(_0x26064c,null));};exports['create']=function(_0x648456,_0xcd19f5){return db[_0xe627('0x29')]['create'](_0x648456[_0xe627('0x45')],{})['then'](respondWithResult(_0xcd19f5,0xc9))[_0xe627('0x3e')](handleError(_0xcd19f5,null));};exports[_0xe627('0x46')]=function(_0x375e05,_0x30e057){if(_0x375e05[_0xe627('0x45')]['id']){delete _0x375e05['body']['id'];}return db[_0xe627('0x29')][_0xe627('0x44')]({'where':{'id':_0x375e05[_0xe627('0x3f')]['id']}})[_0xe627('0x23')](handleEntityNotFound(_0x30e057,null))[_0xe627('0x23')](saveUpdates(_0x375e05[_0xe627('0x45')],null))[_0xe627('0x23')](respondWithResult(_0x30e057,null))[_0xe627('0x3e')](handleError(_0x30e057,null));};exports[_0xe627('0x24')]=function(_0x3824da,_0x550b74){return db[_0xe627('0x29')][_0xe627('0x44')]({'where':{'id':_0x3824da['params']['id']}})[_0xe627('0x23')](handleEntityNotFound(_0x550b74,null))[_0xe627('0x23')](removeEntity(_0x550b74,null))['catch'](handleError(_0x550b74,null));};exports[_0xe627('0x47')]=function(_0x3a827e,_0x542a4c){return db[_0xe627('0x29')][_0xe627('0x47')]()['then'](respondWithResult(_0x542a4c,null))[_0xe627('0x3e')](handleError(_0x542a4c,null));}; \ No newline at end of file diff --git a/server/api/mailQueueReport/mailQueueReport.model.js b/server/api/mailQueueReport/mailQueueReport.model.js index ec1a9cf..00f598d 100644 --- a/server/api/mailQueueReport/mailQueueReport.model.js +++ b/server/api/mailQueueReport/mailQueueReport.model.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x0eb1=['util','api','moment','bluebird','request-promise','rimraf','../../config/environment','exports','define','MailQueueReport','uniqueid'];(function(_0x1417c6,_0x194309){var _0x44db97=function(_0xa2a293){while(--_0xa2a293){_0x1417c6['push'](_0x1417c6['shift']());}};_0x44db97(++_0x194309);}(_0x0eb1,0xf2));var _0x10eb=function(_0x265092,_0x304868){_0x265092=_0x265092-0x0;var _0x19f769=_0x0eb1[_0x265092];return _0x19f769;};'use strict';var _=require('lodash');var util=require(_0x10eb('0x0'));var logger=require('../../config/logger')(_0x10eb('0x1'));var moment=require(_0x10eb('0x2'));var BPromise=require(_0x10eb('0x3'));var rp=require(_0x10eb('0x4'));var fs=require('fs');var path=require('path');var rimraf=require(_0x10eb('0x5'));var config=require(_0x10eb('0x6'));var attributes=require('./mailQueueReport.attributes');module[_0x10eb('0x7')]=function(_0x564ee,_0x459d8b){return _0x564ee[_0x10eb('0x8')](_0x10eb('0x9'),attributes,{'tableName':'report_mail_queue','paranoid':![],'indexes':[{'name':'uniqueid','fields':[_0x10eb('0xa')]}],'timestamps':!![]});}; \ No newline at end of file +var _0x5f8e=['rimraf','../../config/environment','./mailQueueReport.attributes','MailQueueReport','report_mail_queue','uniqueid','util','../../config/logger','api','moment','bluebird','path'];(function(_0x46e363,_0x45d7e2){var _0x3fb059=function(_0x5e6274){while(--_0x5e6274){_0x46e363['push'](_0x46e363['shift']());}};_0x3fb059(++_0x45d7e2);}(_0x5f8e,0x1aa));var _0xe5f8=function(_0x5a9c0c,_0x4ec485){_0x5a9c0c=_0x5a9c0c-0x0;var _0x53c77d=_0x5f8e[_0x5a9c0c];return _0x53c77d;};'use strict';var _=require('lodash');var util=require(_0xe5f8('0x0'));var logger=require(_0xe5f8('0x1'))(_0xe5f8('0x2'));var moment=require(_0xe5f8('0x3'));var BPromise=require(_0xe5f8('0x4'));var rp=require('request-promise');var fs=require('fs');var path=require(_0xe5f8('0x5'));var rimraf=require(_0xe5f8('0x6'));var config=require(_0xe5f8('0x7'));var attributes=require(_0xe5f8('0x8'));module['exports']=function(_0x494236,_0x2baa65){return _0x494236['define'](_0xe5f8('0x9'),attributes,{'tableName':_0xe5f8('0xa'),'paranoid':![],'indexes':[{'name':_0xe5f8('0xb'),'fields':[_0xe5f8('0xb')]}],'timestamps':!![]});}; \ No newline at end of file diff --git a/server/api/mailQueueReport/mailQueueReport.rpc.js b/server/api/mailQueueReport/mailQueueReport.rpc.js index f9b205c..b98d58d 100644 --- a/server/api/mailQueueReport/mailQueueReport.rpc.js +++ b/server/api/mailQueueReport/mailQueueReport.rpc.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x7a54=['moment','randomstring','ioredis','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','http','info','MailQueueReport,\x20%s,\x20%s','debug','stringify','error','code','message','request\x20sent','result','catch','MailQueueReport','create','body','options','raw','CreateMailQueueReport','UpdateMailQueueReport','update','where','attributes','limit','then','lodash','util'];(function(_0x4e173c,_0x43c1c7){var _0x52ddbe=function(_0x37c5cf){while(--_0x37c5cf){_0x4e173c['push'](_0x4e173c['shift']());}};_0x52ddbe(++_0x43c1c7);}(_0x7a54,0x106));var _0x47a5=function(_0xac87ea,_0x1ad2ea){_0xac87ea=_0xac87ea-0x0;var _0x1d8dd0=_0x7a54[_0xac87ea];return _0x1d8dd0;};'use strict';var _=require(_0x47a5('0x0'));var util=require(_0x47a5('0x1'));var moment=require(_0x47a5('0x2'));var BPromise=require('bluebird');var rs=require(_0x47a5('0x3'));var fs=require('fs');var Redis=require(_0x47a5('0x4'));var db=require('../../mysqldb')['db'];var utils=require(_0x47a5('0x5'));var logger=require(_0x47a5('0x6'))(_0x47a5('0x7'));var config=require(_0x47a5('0x8'));var jayson=require(_0x47a5('0x9'));var client=jayson['client'][_0x47a5('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x59199c,_0x343372,_0x30e405){return new BPromise(function(_0x506eda,_0x194fb0){return client['request'](_0x59199c,_0x30e405)['then'](function(_0x582352){logger[_0x47a5('0xb')](_0x47a5('0xc'),_0x343372,'request\x20sent');logger[_0x47a5('0xd')]('MailQueueReport,\x20%s,\x20%s,\x20%s',_0x343372,'request\x20sent',JSON[_0x47a5('0xe')](_0x582352));if(_0x582352[_0x47a5('0xf')]){if(_0x582352[_0x47a5('0xf')][_0x47a5('0x10')]===0x1f4){logger[_0x47a5('0xf')](_0x47a5('0xc'),_0x343372,_0x582352[_0x47a5('0xf')]['message']);return _0x194fb0(_0x582352[_0x47a5('0xf')][_0x47a5('0x11')]);}logger[_0x47a5('0xf')](_0x47a5('0xc'),_0x343372,_0x582352[_0x47a5('0xf')][_0x47a5('0x11')]);return _0x506eda(_0x582352[_0x47a5('0xf')][_0x47a5('0x11')]);}else{logger['info'](_0x47a5('0xc'),_0x343372,_0x47a5('0x12'));_0x506eda(_0x582352[_0x47a5('0x13')][_0x47a5('0x11')]);}})[_0x47a5('0x14')](function(_0x574af6){logger['error'](_0x47a5('0xc'),_0x343372,_0x574af6);_0x194fb0(_0x574af6);});});}exports['CreateMailQueueReport']=function(_0x5247fd){var _0x423a81=this;return new Promise(function(_0xaf70a6,_0x2ce454){return db[_0x47a5('0x15')][_0x47a5('0x16')](_0x5247fd[_0x47a5('0x17')],{'raw':_0x5247fd[_0x47a5('0x18')]?_0x5247fd[_0x47a5('0x18')][_0x47a5('0x19')]===undefined?!![]:![]:!![]})['then'](function(_0x1570bc){logger[_0x47a5('0xb')]('CreateMailQueueReport',_0x5247fd);logger[_0x47a5('0xd')](_0x47a5('0x1a'),_0x5247fd,JSON[_0x47a5('0xe')](_0x1570bc));_0xaf70a6(_0x1570bc);})['catch'](function(_0xb8ae6c){logger[_0x47a5('0xf')](_0x47a5('0x1a'),_0xb8ae6c[_0x47a5('0x11')],_0x5247fd);_0x2ce454(_0x423a81['error'](0x1f4,_0xb8ae6c[_0x47a5('0x11')]));});});};exports[_0x47a5('0x1b')]=function(_0x513981){var _0x28747d=this;return new Promise(function(_0xc4cd63,_0x4437f1){return db[_0x47a5('0x15')][_0x47a5('0x1c')](_0x513981['body'],{'raw':_0x513981['options']?_0x513981[_0x47a5('0x18')]['raw']===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x513981[_0x47a5('0x18')]?_0x513981['options'][_0x47a5('0x1d')]||null:null,'attributes':_0x513981[_0x47a5('0x18')]?_0x513981[_0x47a5('0x18')][_0x47a5('0x1e')]||null:null,'limit':_0x513981[_0x47a5('0x18')]?_0x513981[_0x47a5('0x18')][_0x47a5('0x1f')]||null:null})[_0x47a5('0x20')](function(_0x16631f){logger[_0x47a5('0xb')](_0x47a5('0x1b'),_0x513981);logger[_0x47a5('0xd')](_0x47a5('0x1b'),_0x513981,JSON['stringify'](_0x16631f));_0xc4cd63(_0x16631f);})[_0x47a5('0x14')](function(_0x51833b){logger[_0x47a5('0xf')](_0x47a5('0x1b'),_0x51833b[_0x47a5('0x11')],_0x513981);_0x4437f1(_0x28747d['error'](0x1f4,_0x51833b[_0x47a5('0x11')]));});});}; \ No newline at end of file +var _0x326f=['error','code','message','result','catch','CreateMailQueueReport','MailQueueReport','options','raw','stringify','UpdateMailQueueReport','body','attributes','lodash','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','info','MailQueueReport,\x20%s,\x20%s','request\x20sent','debug'];(function(_0x1975b6,_0x55025c){var _0x404cb6=function(_0xfa3613){while(--_0xfa3613){_0x1975b6['push'](_0x1975b6['shift']());}};_0x404cb6(++_0x55025c);}(_0x326f,0xd1));var _0xf326=function(_0x10861a,_0x38ee31){_0x10861a=_0x10861a-0x0;var _0x550e41=_0x326f[_0x10861a];return _0x550e41;};'use strict';var _=require(_0xf326('0x0'));var util=require('util');var moment=require('moment');var BPromise=require(_0xf326('0x1'));var rs=require(_0xf326('0x2'));var fs=require('fs');var Redis=require(_0xf326('0x3'));var db=require(_0xf326('0x4'))['db'];var utils=require(_0xf326('0x5'));var logger=require(_0xf326('0x6'))(_0xf326('0x7'));var config=require(_0xf326('0x8'));var jayson=require(_0xf326('0x9'));var client=jayson[_0xf326('0xa')]['http']({'port':0x232a});function respondWithRpcPromise(_0x3c254d,_0x3851eb,_0x165f95){return new BPromise(function(_0x1e7b8a,_0x515bfa){return client['request'](_0x3c254d,_0x165f95)['then'](function(_0x3bacf2){logger[_0xf326('0xb')](_0xf326('0xc'),_0x3851eb,_0xf326('0xd'));logger[_0xf326('0xe')]('MailQueueReport,\x20%s,\x20%s,\x20%s',_0x3851eb,_0xf326('0xd'),JSON['stringify'](_0x3bacf2));if(_0x3bacf2[_0xf326('0xf')]){if(_0x3bacf2['error'][_0xf326('0x10')]===0x1f4){logger['error'](_0xf326('0xc'),_0x3851eb,_0x3bacf2[_0xf326('0xf')]['message']);return _0x515bfa(_0x3bacf2[_0xf326('0xf')][_0xf326('0x11')]);}logger[_0xf326('0xf')](_0xf326('0xc'),_0x3851eb,_0x3bacf2['error'][_0xf326('0x11')]);return _0x1e7b8a(_0x3bacf2['error']['message']);}else{logger[_0xf326('0xb')](_0xf326('0xc'),_0x3851eb,_0xf326('0xd'));_0x1e7b8a(_0x3bacf2[_0xf326('0x12')][_0xf326('0x11')]);}})[_0xf326('0x13')](function(_0x34128e){logger[_0xf326('0xf')]('MailQueueReport,\x20%s,\x20%s',_0x3851eb,_0x34128e);_0x515bfa(_0x34128e);});});}exports[_0xf326('0x14')]=function(_0x453100){var _0x18bee3=this;return new Promise(function(_0x31ffb9,_0xcef2b5){return db[_0xf326('0x15')]['create'](_0x453100['body'],{'raw':_0x453100['options']?_0x453100[_0xf326('0x16')][_0xf326('0x17')]===undefined?!![]:![]:!![]})['then'](function(_0x4cabce){logger[_0xf326('0xb')]('CreateMailQueueReport',_0x453100);logger['debug'](_0xf326('0x14'),_0x453100,JSON[_0xf326('0x18')](_0x4cabce));_0x31ffb9(_0x4cabce);})['catch'](function(_0x5aa184){logger[_0xf326('0xf')](_0xf326('0x14'),_0x5aa184['message'],_0x453100);_0xcef2b5(_0x18bee3[_0xf326('0xf')](0x1f4,_0x5aa184[_0xf326('0x11')]));});});};exports[_0xf326('0x19')]=function(_0x295752){var _0x17c157=this;return new Promise(function(_0x2049ec,_0x5ce532){return db['MailQueueReport']['update'](_0x295752[_0xf326('0x1a')],{'raw':_0x295752[_0xf326('0x16')]?_0x295752[_0xf326('0x16')][_0xf326('0x17')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x295752[_0xf326('0x16')]?_0x295752[_0xf326('0x16')]['where']||null:null,'attributes':_0x295752[_0xf326('0x16')]?_0x295752[_0xf326('0x16')][_0xf326('0x1b')]||null:null,'limit':_0x295752['options']?_0x295752[_0xf326('0x16')]['limit']||null:null})['then'](function(_0x6a8e89){logger[_0xf326('0xb')](_0xf326('0x19'),_0x295752);logger['debug'](_0xf326('0x19'),_0x295752,JSON[_0xf326('0x18')](_0x6a8e89));_0x2049ec(_0x6a8e89);})['catch'](function(_0x225776){logger[_0xf326('0xf')](_0xf326('0x19'),_0x225776[_0xf326('0x11')],_0x295752);_0x5ce532(_0x17c157[_0xf326('0xf')](0x1f4,_0x225776[_0xf326('0x11')]));});});}; \ No newline at end of file diff --git a/server/api/mailServerIn/index.js b/server/api/mailServerIn/index.js index 45cc7e5..88f68e2 100644 --- a/server/api/mailServerIn/index.js +++ b/server/api/mailServerIn/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x9c44=['express','Router','fs-extra','../../components/auth/service','exports','path','connect-timeout'];(function(_0x1d4bdb,_0x58f77b){var _0x288bea=function(_0x4a1630){while(--_0x4a1630){_0x1d4bdb['push'](_0x1d4bdb['shift']());}};_0x288bea(++_0x58f77b);}(_0x9c44,0x178));var _0x49c4=function(_0x1969a7,_0x5a133a){_0x1969a7=_0x1969a7-0x0;var _0x3d665f=_0x9c44[_0x1969a7];return _0x3d665f;};'use strict';var multer=require('multer');var util=require('util');var path=require(_0x49c4('0x0'));var timeout=require(_0x49c4('0x1'));var express=require(_0x49c4('0x2'));var router=express[_0x49c4('0x3')]();var fs_extra=require(_0x49c4('0x4'));var auth=require(_0x49c4('0x5'));var interaction=require('../../components/interaction/service');var config=require('../../config/environment');module[_0x49c4('0x6')]=router; \ No newline at end of file +var _0xd8b0=['Router','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','multer','util'];(function(_0x33ac6b,_0x1ed895){var _0x34cffe=function(_0x17d762){while(--_0x17d762){_0x33ac6b['push'](_0x33ac6b['shift']());}};_0x34cffe(++_0x1ed895);}(_0xd8b0,0xad));var _0x0d8b=function(_0xa464c9,_0x7c86d8){_0xa464c9=_0xa464c9-0x0;var _0x3d73c4=_0xd8b0[_0xa464c9];return _0x3d73c4;};'use strict';var multer=require(_0x0d8b('0x0'));var util=require(_0x0d8b('0x1'));var path=require('path');var timeout=require('connect-timeout');var express=require('express');var router=express[_0x0d8b('0x2')]();var fs_extra=require(_0x0d8b('0x3'));var auth=require(_0x0d8b('0x4'));var interaction=require(_0x0d8b('0x5'));var config=require(_0x0d8b('0x6'));module['exports']=router; \ No newline at end of file diff --git a/server/api/mailServerIn/mailServerIn.attributes.js b/server/api/mailServerIn/mailServerIn.attributes.js index 257b772..b0707e2 100644 --- a/server/api/mailServerIn/mailServerIn.attributes.js +++ b/server/api/mailServerIn/mailServerIn.attributes.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x7f94=['sequelize','STRING','BOOLEAN','INTEGER'];(function(_0x3c9c2e,_0x1e7d40){var _0x269196=function(_0x1cb3c7){while(--_0x1cb3c7){_0x3c9c2e['push'](_0x3c9c2e['shift']());}};_0x269196(++_0x1e7d40);}(_0x7f94,0xd0));var _0x47f9=function(_0x320f2a,_0x567e87){_0x320f2a=_0x320f2a-0x0;var _0x3d48c4=_0x7f94[_0x320f2a];return _0x3d48c4;};'use strict';var Sequelize=require(_0x47f9('0x0'));module['exports']={'description':{'type':Sequelize[_0x47f9('0x1')]},'host':{'type':Sequelize[_0x47f9('0x1')]},'authentication':{'type':Sequelize[_0x47f9('0x2')],'defaultValue':!![]},'user':{'type':Sequelize[_0x47f9('0x1')]},'password':{'type':Sequelize[_0x47f9('0x1')]},'port':{'type':Sequelize[_0x47f9('0x3')]},'tls':{'type':Sequelize[_0x47f9('0x2')],'defaultValue':!![]},'mailbox':{'type':Sequelize[_0x47f9('0x1')],'defaultValue':'INBOX'},'connTimeout':{'type':Sequelize[_0x47f9('0x3')],'defaultValue':0xa},'authTimeout':{'type':Sequelize[_0x47f9('0x3')],'defaultValue':0x5},'service':{'type':Sequelize[_0x47f9('0x1')]},'modernAuthentication':{'type':Sequelize[_0x47f9('0x2')],'defaultValue':![]}}; \ No newline at end of file +var _0x6d48=['INTEGER','INBOX','BOOLEAN','sequelize','exports','STRING'];(function(_0x251ab0,_0x46e532){var _0x11848c=function(_0x78e3a2){while(--_0x78e3a2){_0x251ab0['push'](_0x251ab0['shift']());}};_0x11848c(++_0x46e532);}(_0x6d48,0x135));var _0x86d4=function(_0x3ddf16,_0x76f985){_0x3ddf16=_0x3ddf16-0x0;var _0x353de4=_0x6d48[_0x3ddf16];return _0x353de4;};'use strict';var Sequelize=require(_0x86d4('0x0'));module[_0x86d4('0x1')]={'description':{'type':Sequelize['STRING']},'host':{'type':Sequelize[_0x86d4('0x2')]},'authentication':{'type':Sequelize['BOOLEAN'],'defaultValue':!![]},'user':{'type':Sequelize[_0x86d4('0x2')]},'password':{'type':Sequelize[_0x86d4('0x2')]},'port':{'type':Sequelize[_0x86d4('0x3')]},'tls':{'type':Sequelize['BOOLEAN'],'defaultValue':!![]},'mailbox':{'type':Sequelize['STRING'],'defaultValue':_0x86d4('0x4')},'connTimeout':{'type':Sequelize[_0x86d4('0x3')],'defaultValue':0xa},'authTimeout':{'type':Sequelize[_0x86d4('0x3')],'defaultValue':0x5},'service':{'type':Sequelize[_0x86d4('0x2')]},'modernAuthentication':{'type':Sequelize[_0x86d4('0x5')],'defaultValue':![]}}; \ No newline at end of file diff --git a/server/api/mailServerIn/mailServerIn.model.js b/server/api/mailServerIn/mailServerIn.model.js index 19997ca..4818c10 100644 --- a/server/api/mailServerIn/mailServerIn.model.js +++ b/server/api/mailServerIn/mailServerIn.model.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x1469=['request-promise','rimraf','./mailServerIn.attributes','exports','define','mail_servers_in','lodash','util','../../config/logger','api','moment','bluebird'];(function(_0x2f5ac5,_0x1ee939){var _0x37c9a8=function(_0x15031f){while(--_0x15031f){_0x2f5ac5['push'](_0x2f5ac5['shift']());}};_0x37c9a8(++_0x1ee939);}(_0x1469,0x8a));var _0x9146=function(_0x18242c,_0x17ef5f){_0x18242c=_0x18242c-0x0;var _0x47f808=_0x1469[_0x18242c];return _0x47f808;};'use strict';var _=require(_0x9146('0x0'));var util=require(_0x9146('0x1'));var logger=require(_0x9146('0x2'))(_0x9146('0x3'));var moment=require(_0x9146('0x4'));var BPromise=require(_0x9146('0x5'));var rp=require(_0x9146('0x6'));var fs=require('fs');var path=require('path');var rimraf=require(_0x9146('0x7'));var config=require('../../config/environment');var attributes=require(_0x9146('0x8'));module[_0x9146('0x9')]=function(_0x13aa20,_0x4c4af4){return _0x13aa20[_0x9146('0xa')]('MailServerIn',attributes,{'tableName':_0x9146('0xb'),'paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file +var _0x8664=['path','../../config/environment','./mailServerIn.attributes','exports','define','mail_servers_in','util','../../config/logger','api','bluebird'];(function(_0x1f7fe4,_0x886c47){var _0x4ea97e=function(_0x1d5474){while(--_0x1d5474){_0x1f7fe4['push'](_0x1f7fe4['shift']());}};_0x4ea97e(++_0x886c47);}(_0x8664,0x15a));var _0x4866=function(_0x64b865,_0x2470da){_0x64b865=_0x64b865-0x0;var _0x1e0433=_0x8664[_0x64b865];return _0x1e0433;};'use strict';var _=require('lodash');var util=require(_0x4866('0x0'));var logger=require(_0x4866('0x1'))(_0x4866('0x2'));var moment=require('moment');var BPromise=require(_0x4866('0x3'));var rp=require('request-promise');var fs=require('fs');var path=require(_0x4866('0x4'));var rimraf=require('rimraf');var config=require(_0x4866('0x5'));var attributes=require(_0x4866('0x6'));module[_0x4866('0x7')]=function(_0x126448,_0x54cb29){return _0x126448[_0x4866('0x8')]('MailServerIn',attributes,{'tableName':_0x4866('0x9'),'paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file diff --git a/server/api/mailServerIn/mailServerIn.rpc.js b/server/api/mailServerIn/mailServerIn.rpc.js index 9eedbeb..daf8f7c 100644 --- a/server/api/mailServerIn/mailServerIn.rpc.js +++ b/server/api/mailServerIn/mailServerIn.rpc.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x6de8=['../../config/logger','rpc','../../config/environment','jayson/promise','client','http','request','then','MailServerIn,\x20%s,\x20%s','request\x20sent','debug','MailServerIn,\x20%s,\x20%s,\x20%s','stringify','error','message','catch','GetMailServerIn','MailServerIn','options','attributes','map','include','model','lodash','moment','bluebird','randomstring','../../config/utils'];(function(_0x177e66,_0x1db8ff){var _0x21db8c=function(_0x5df93c){while(--_0x5df93c){_0x177e66['push'](_0x177e66['shift']());}};_0x21db8c(++_0x1db8ff);}(_0x6de8,0x183));var _0x86de=function(_0x5f42f1,_0x956be5){_0x5f42f1=_0x5f42f1-0x0;var _0x5534ee=_0x6de8[_0x5f42f1];return _0x5534ee;};'use strict';var _=require(_0x86de('0x0'));var util=require('util');var moment=require(_0x86de('0x1'));var BPromise=require(_0x86de('0x2'));var rs=require(_0x86de('0x3'));var fs=require('fs');var Redis=require('ioredis');var db=require('../../mysqldb')['db'];var utils=require(_0x86de('0x4'));var logger=require(_0x86de('0x5'))(_0x86de('0x6'));var config=require(_0x86de('0x7'));var jayson=require(_0x86de('0x8'));var client=jayson[_0x86de('0x9')][_0x86de('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x1c0b62,_0x4b3fca,_0x49abd4){return new BPromise(function(_0x2613fd,_0x6d2331){return client[_0x86de('0xb')](_0x1c0b62,_0x49abd4)[_0x86de('0xc')](function(_0xdf7986){logger['info'](_0x86de('0xd'),_0x4b3fca,_0x86de('0xe'));logger[_0x86de('0xf')](_0x86de('0x10'),_0x4b3fca,_0x86de('0xe'),JSON[_0x86de('0x11')](_0xdf7986));if(_0xdf7986[_0x86de('0x12')]){if(_0xdf7986[_0x86de('0x12')]['code']===0x1f4){logger[_0x86de('0x12')](_0x86de('0xd'),_0x4b3fca,_0xdf7986[_0x86de('0x12')][_0x86de('0x13')]);return _0x6d2331(_0xdf7986[_0x86de('0x12')]['message']);}logger[_0x86de('0x12')]('MailServerIn,\x20%s,\x20%s',_0x4b3fca,_0xdf7986['error'][_0x86de('0x13')]);return _0x2613fd(_0xdf7986['error'][_0x86de('0x13')]);}else{logger['info']('MailServerIn,\x20%s,\x20%s',_0x4b3fca,_0x86de('0xe'));_0x2613fd(_0xdf7986['result']['message']);}})[_0x86de('0x14')](function(_0x43b087){logger[_0x86de('0x12')](_0x86de('0xd'),_0x4b3fca,_0x43b087);_0x6d2331(_0x43b087);});});}exports[_0x86de('0x15')]=function(_0x5bf8a9){var _0x365303=this;return new Promise(function(_0x1538ce,_0x424aee){return db[_0x86de('0x16')]['findAll']({'raw':_0x5bf8a9[_0x86de('0x17')]?_0x5bf8a9['options']['raw']===undefined?!![]:![]:!![],'where':_0x5bf8a9[_0x86de('0x17')]?_0x5bf8a9['options']['where']||null:null,'attributes':_0x5bf8a9[_0x86de('0x17')]?_0x5bf8a9['options'][_0x86de('0x18')]||null:null,'limit':_0x5bf8a9[_0x86de('0x17')]?_0x5bf8a9[_0x86de('0x17')]['limit']||null:null,'include':_0x5bf8a9[_0x86de('0x17')]?_0x5bf8a9[_0x86de('0x17')]['include']?_[_0x86de('0x19')](_0x5bf8a9[_0x86de('0x17')][_0x86de('0x1a')],function(_0x5bd661){return{'model':db[_0x5bd661[_0x86de('0x1b')]],'as':_0x5bd661['as'],'attributes':_0x5bd661[_0x86de('0x18')],'include':_0x5bd661['include']?_[_0x86de('0x19')](_0x5bd661['include'],function(_0x34526b){return{'model':db[_0x34526b['model']],'as':_0x34526b['as'],'attributes':_0x34526b[_0x86de('0x18')],'include':_0x34526b[_0x86de('0x1a')]?_[_0x86de('0x19')](_0x34526b[_0x86de('0x1a')],function(_0x22dba3){return{'model':db[_0x22dba3['model']],'as':_0x22dba3['as'],'attributes':_0x22dba3[_0x86de('0x18')]};}):[]};}):[]};}):[]:[]})[_0x86de('0xc')](function(_0x92223c){logger['info']('GetMailServerIn',_0x5bf8a9);logger[_0x86de('0xf')]('GetMailServerIn',_0x5bf8a9,JSON[_0x86de('0x11')](_0x92223c));_0x1538ce(_0x92223c);})[_0x86de('0x14')](function(_0x4a924f){logger['error'](_0x86de('0x15'),_0x4a924f[_0x86de('0x13')],_0x5bf8a9);_0x424aee(_0x365303[_0x86de('0x12')](0x1f4,_0x4a924f[_0x86de('0x13')]));});});}; \ No newline at end of file +var _0xbca8=['request\x20sent','result','GetMailServerIn','MailServerIn','options','where','attributes','limit','map','include','model','stringify','lodash','util','moment','bluebird','randomstring','../../mysqldb','../../config/utils','../../config/logger','jayson/promise','client','http','request','then','info','debug','MailServerIn,\x20%s,\x20%s,\x20%s','error','code','message','MailServerIn,\x20%s,\x20%s'];(function(_0x538c9e,_0x3e01c4){var _0x3698fd=function(_0xb3a07e){while(--_0xb3a07e){_0x538c9e['push'](_0x538c9e['shift']());}};_0x3698fd(++_0x3e01c4);}(_0xbca8,0xcc));var _0x8bca=function(_0x4ad85a,_0x106bd1){_0x4ad85a=_0x4ad85a-0x0;var _0x3518b5=_0xbca8[_0x4ad85a];return _0x3518b5;};'use strict';var _=require(_0x8bca('0x0'));var util=require(_0x8bca('0x1'));var moment=require(_0x8bca('0x2'));var BPromise=require(_0x8bca('0x3'));var rs=require(_0x8bca('0x4'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0x8bca('0x5'))['db'];var utils=require(_0x8bca('0x6'));var logger=require(_0x8bca('0x7'))('rpc');var config=require('../../config/environment');var jayson=require(_0x8bca('0x8'));var client=jayson[_0x8bca('0x9')][_0x8bca('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x348ddd,_0x4b3267,_0x3fdccf){return new BPromise(function(_0x38e241,_0x278c99){return client[_0x8bca('0xb')](_0x348ddd,_0x3fdccf)[_0x8bca('0xc')](function(_0xe266ca){logger[_0x8bca('0xd')]('MailServerIn,\x20%s,\x20%s',_0x4b3267,'request\x20sent');logger[_0x8bca('0xe')](_0x8bca('0xf'),_0x4b3267,'request\x20sent',JSON['stringify'](_0xe266ca));if(_0xe266ca[_0x8bca('0x10')]){if(_0xe266ca['error'][_0x8bca('0x11')]===0x1f4){logger[_0x8bca('0x10')]('MailServerIn,\x20%s,\x20%s',_0x4b3267,_0xe266ca[_0x8bca('0x10')][_0x8bca('0x12')]);return _0x278c99(_0xe266ca[_0x8bca('0x10')][_0x8bca('0x12')]);}logger['error']('MailServerIn,\x20%s,\x20%s',_0x4b3267,_0xe266ca[_0x8bca('0x10')]['message']);return _0x38e241(_0xe266ca[_0x8bca('0x10')][_0x8bca('0x12')]);}else{logger[_0x8bca('0xd')](_0x8bca('0x13'),_0x4b3267,_0x8bca('0x14'));_0x38e241(_0xe266ca[_0x8bca('0x15')]['message']);}})['catch'](function(_0x11037e){logger['error'](_0x8bca('0x13'),_0x4b3267,_0x11037e);_0x278c99(_0x11037e);});});}exports[_0x8bca('0x16')]=function(_0x4e24c8){var _0x5e735b=this;return new Promise(function(_0x5622ba,_0x1963c0){return db[_0x8bca('0x17')]['findAll']({'raw':_0x4e24c8[_0x8bca('0x18')]?_0x4e24c8['options']['raw']===undefined?!![]:![]:!![],'where':_0x4e24c8['options']?_0x4e24c8[_0x8bca('0x18')][_0x8bca('0x19')]||null:null,'attributes':_0x4e24c8[_0x8bca('0x18')]?_0x4e24c8[_0x8bca('0x18')][_0x8bca('0x1a')]||null:null,'limit':_0x4e24c8[_0x8bca('0x18')]?_0x4e24c8['options'][_0x8bca('0x1b')]||null:null,'include':_0x4e24c8[_0x8bca('0x18')]?_0x4e24c8[_0x8bca('0x18')]['include']?_[_0x8bca('0x1c')](_0x4e24c8['options'][_0x8bca('0x1d')],function(_0x4e4bff){return{'model':db[_0x4e4bff[_0x8bca('0x1e')]],'as':_0x4e4bff['as'],'attributes':_0x4e4bff[_0x8bca('0x1a')],'include':_0x4e4bff[_0x8bca('0x1d')]?_[_0x8bca('0x1c')](_0x4e4bff[_0x8bca('0x1d')],function(_0x3a7498){return{'model':db[_0x3a7498[_0x8bca('0x1e')]],'as':_0x3a7498['as'],'attributes':_0x3a7498['attributes'],'include':_0x3a7498['include']?_[_0x8bca('0x1c')](_0x3a7498[_0x8bca('0x1d')],function(_0x4c10db){return{'model':db[_0x4c10db[_0x8bca('0x1e')]],'as':_0x4c10db['as'],'attributes':_0x4c10db[_0x8bca('0x1a')]};}):[]};}):[]};}):[]:[]})[_0x8bca('0xc')](function(_0x344eae){logger[_0x8bca('0xd')]('GetMailServerIn',_0x4e24c8);logger[_0x8bca('0xe')]('GetMailServerIn',_0x4e24c8,JSON[_0x8bca('0x1f')](_0x344eae));_0x5622ba(_0x344eae);})['catch'](function(_0x18ff94){logger[_0x8bca('0x10')](_0x8bca('0x16'),_0x18ff94[_0x8bca('0x12')],_0x4e24c8);_0x1963c0(_0x5e735b['error'](0x1f4,_0x18ff94[_0x8bca('0x12')]));});});}; \ No newline at end of file diff --git a/server/api/mailServerOut/index.js b/server/api/mailServerOut/index.js index 867d273..d6665e2 100644 --- a/server/api/mailServerOut/index.js +++ b/server/api/mailServerOut/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x7a54=['index','/:id','isAuthenticated','post','delete','destroy','exports','multer','util','path','express','Router','../../components/auth/service','../../components/interaction/service','../../config/environment','./mailServerOut.controller','get'];(function(_0x187ee1,_0x3fd1e6){var _0x388160=function(_0x542dd2){while(--_0x542dd2){_0x187ee1['push'](_0x187ee1['shift']());}};_0x388160(++_0x3fd1e6);}(_0x7a54,0x106));var _0x47a5=function(_0x4ab33d,_0x4b90ce){_0x4ab33d=_0x4ab33d-0x0;var _0x3ba6be=_0x7a54[_0x4ab33d];return _0x3ba6be;};'use strict';var multer=require(_0x47a5('0x0'));var util=require(_0x47a5('0x1'));var path=require(_0x47a5('0x2'));var timeout=require('connect-timeout');var express=require(_0x47a5('0x3'));var router=express[_0x47a5('0x4')]();var fs_extra=require('fs-extra');var auth=require(_0x47a5('0x5'));var interaction=require(_0x47a5('0x6'));var config=require(_0x47a5('0x7'));var controller=require(_0x47a5('0x8'));router[_0x47a5('0x9')]('/',auth['isAuthenticated'](),controller[_0x47a5('0xa')]);router['get'](_0x47a5('0xb'),auth[_0x47a5('0xc')](),controller['show']);router[_0x47a5('0xd')]('/',auth['isAuthenticated'](),controller['create']);router['put'](_0x47a5('0xb'),auth[_0x47a5('0xc')](),controller['update']);router[_0x47a5('0xe')]('/:id',auth['isAuthenticated'](),controller[_0x47a5('0xf')]);module[_0x47a5('0x10')]=router; \ No newline at end of file +var _0x9957=['multer','util','path','connect-timeout','Router','fs-extra','../../components/auth/service','../../components/interaction/service','./mailServerOut.controller','get','isAuthenticated','index','/:id','show','post','create','put','update','delete','destroy','exports'];(function(_0x14add3,_0x13ce8d){var _0x4a174f=function(_0x2b3ed7){while(--_0x2b3ed7){_0x14add3['push'](_0x14add3['shift']());}};_0x4a174f(++_0x13ce8d);}(_0x9957,0x93));var _0x7995=function(_0x14add3,_0x13ce8d){_0x14add3=_0x14add3-0x0;var _0x4a174f=_0x9957[_0x14add3];return _0x4a174f;};'use strict';var multer=require(_0x7995('0x0'));var util=require(_0x7995('0x1'));var path=require(_0x7995('0x2'));var timeout=require(_0x7995('0x3'));var express=require('express');var router=express[_0x7995('0x4')]();var fs_extra=require(_0x7995('0x5'));var auth=require(_0x7995('0x6'));var interaction=require(_0x7995('0x7'));var config=require('../../config/environment');var controller=require(_0x7995('0x8'));router[_0x7995('0x9')]('/',auth[_0x7995('0xa')](),controller[_0x7995('0xb')]);router[_0x7995('0x9')](_0x7995('0xc'),auth['isAuthenticated'](),controller[_0x7995('0xd')]);router[_0x7995('0xe')]('/',auth['isAuthenticated'](),controller[_0x7995('0xf')]);router[_0x7995('0x10')](_0x7995('0xc'),auth[_0x7995('0xa')](),controller[_0x7995('0x11')]);router[_0x7995('0x12')](_0x7995('0xc'),auth['isAuthenticated'](),controller[_0x7995('0x13')]);module[_0x7995('0x14')]=router; \ No newline at end of file diff --git a/server/api/mailServerOut/mailServerOut.attributes.js b/server/api/mailServerOut/mailServerOut.attributes.js index 0cac78b..5b23824 100644 --- a/server/api/mailServerOut/mailServerOut.attributes.js +++ b/server/api/mailServerOut/mailServerOut.attributes.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xb78e=['INTEGER','BOOLEAN','sequelize','exports','STRING'];(function(_0x321bb2,_0x202794){var _0x9c12ed=function(_0x263dd3){while(--_0x263dd3){_0x321bb2['push'](_0x321bb2['shift']());}};_0x9c12ed(++_0x202794);}(_0xb78e,0x1c9));var _0xeb78=function(_0x3b4c8d,_0x55fa78){_0x3b4c8d=_0x3b4c8d-0x0;var _0x24afef=_0xb78e[_0x3b4c8d];return _0x24afef;};'use strict';var Sequelize=require(_0xeb78('0x0'));module[_0xeb78('0x1')]={'description':{'type':Sequelize['STRING']},'host':{'type':Sequelize[_0xeb78('0x2')]},'user':{'type':Sequelize[_0xeb78('0x2')]},'pass':{'type':Sequelize[_0xeb78('0x2')]},'port':{'type':Sequelize[_0xeb78('0x3')]},'secure':{'type':Sequelize[_0xeb78('0x4')],'defaultValue':![]},'service':{'type':Sequelize[_0xeb78('0x2')]},'authentication':{'type':Sequelize[_0xeb78('0x4')],'defaultValue':!![]},'modernAuthentication':{'type':Sequelize[_0xeb78('0x4')],'defaultValue':![]}}; \ No newline at end of file +var _0x4cf8=['BOOLEAN','sequelize','exports','STRING','INTEGER'];(function(_0x1f2578,_0x34c050){var _0x6439c4=function(_0x5b9a35){while(--_0x5b9a35){_0x1f2578['push'](_0x1f2578['shift']());}};_0x6439c4(++_0x34c050);}(_0x4cf8,0x1e1));var _0x84cf=function(_0x1a9c75,_0xa83750){_0x1a9c75=_0x1a9c75-0x0;var _0xb2f37e=_0x4cf8[_0x1a9c75];return _0xb2f37e;};'use strict';var Sequelize=require(_0x84cf('0x0'));module[_0x84cf('0x1')]={'description':{'type':Sequelize[_0x84cf('0x2')]},'host':{'type':Sequelize[_0x84cf('0x2')]},'user':{'type':Sequelize[_0x84cf('0x2')]},'pass':{'type':Sequelize[_0x84cf('0x2')]},'port':{'type':Sequelize[_0x84cf('0x3')]},'secure':{'type':Sequelize[_0x84cf('0x4')],'defaultValue':![]},'service':{'type':Sequelize[_0x84cf('0x2')]},'authentication':{'type':Sequelize[_0x84cf('0x4')],'defaultValue':!![]},'modernAuthentication':{'type':Sequelize[_0x84cf('0x4')],'defaultValue':![]}}; \ No newline at end of file diff --git a/server/api/mailServerOut/mailServerOut.controller.js b/server/api/mailServerOut/mailServerOut.controller.js index 69e120f..f404a43 100644 --- a/server/api/mailServerOut/mailServerOut.controller.js +++ b/server/api/mailServerOut/mailServerOut.controller.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x5d7e=['VIRTUAL','options','then','includeAll','include','findAll','catch','params','rawAttributes','merge','find','create','body','update','eml-format','rimraf','fast-json-patch','request-promise','moment','util','path','sox','ejs','lodash','crypto','jsforce','desk.js','to-csv','querystring','papaparse','ioredis','../../components/parsers/qs','../../config/license/hardware','../../config/logger','../../config/utils','../../config/license/util','../../mysqldb','sendStatus','status','end','json','offset','undefined','limit','count','Content-Range','apply','reject','save','destroy','error','name','send','index','map','MailServerOut','fieldName','type','query','keys','filters','intersection','attributes','model','fields','length','hasOwnProperty','sort','where','pick','filter'];(function(_0x151418,_0x2cbffa){var _0x40e29a=function(_0xec4d7){while(--_0xec4d7){_0x151418['push'](_0x151418['shift']());}};_0x40e29a(++_0x2cbffa);}(_0x5d7e,0x171));var _0xe5d7=function(_0x2a5b3b,_0x4ebe31){_0x2a5b3b=_0x2a5b3b-0x0;var _0xae665a=_0x5d7e[_0x2a5b3b];return _0xae665a;};'use strict';var emlformat=require(_0xe5d7('0x0'));var rimraf=require(_0xe5d7('0x1'));var zipdir=require('zip-dir');var jsonpatch=require(_0xe5d7('0x2'));var rp=require(_0xe5d7('0x3'));var moment=require(_0xe5d7('0x4'));var BPromise=require('bluebird');var Mustache=require('mustache');var util=require(_0xe5d7('0x5'));var path=require(_0xe5d7('0x6'));var sox=require(_0xe5d7('0x7'));var csv=require('to-csv');var ejs=require(_0xe5d7('0x8'));var fs=require('fs');var fs_extra=require('fs-extra');var _=require(_0xe5d7('0x9'));var squel=require('squel');var crypto=require(_0xe5d7('0xa'));var jsforce=require(_0xe5d7('0xb'));var deskjs=require(_0xe5d7('0xc'));var toCsv=require(_0xe5d7('0xd'));var querystring=require(_0xe5d7('0xe'));var Papa=require(_0xe5d7('0xf'));var Redis=require(_0xe5d7('0x10'));var authService=require('../../components/auth/service');var qs=require(_0xe5d7('0x11'));var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0xe5d7('0x12'));var logger=require(_0xe5d7('0x13'))('api');var utils=require(_0xe5d7('0x14'));var config=require('../../config/environment');var licenseUtil=require(_0xe5d7('0x15'));var db=require(_0xe5d7('0x16'))['db'];function respondWithStatusCode(_0x1a253c,_0x9d8dcd){_0x9d8dcd=_0x9d8dcd||0xcc;return function(_0x23e1da){if(_0x23e1da){return _0x1a253c[_0xe5d7('0x17')](_0x9d8dcd);}return _0x1a253c[_0xe5d7('0x18')](_0x9d8dcd)[_0xe5d7('0x19')]();};}function respondWithResult(_0x57d769,_0x2b6079){_0x2b6079=_0x2b6079||0xc8;return function(_0x1126d3){if(_0x1126d3){return _0x57d769[_0xe5d7('0x18')](_0x2b6079)[_0xe5d7('0x1a')](_0x1126d3);}};}function respondWithFilteredResult(_0x5395dc,_0x5e7ae9){return function(_0x177a37){if(_0x177a37){var _0x1175b0=typeof _0x5e7ae9[_0xe5d7('0x1b')]===_0xe5d7('0x1c')&&typeof _0x5e7ae9[_0xe5d7('0x1d')]===_0xe5d7('0x1c');var _0xad60e7=_0x177a37[_0xe5d7('0x1e')];var _0x528b36=_0x1175b0?0x0:_0x5e7ae9[_0xe5d7('0x1b')];var _0x271928=_0x1175b0?_0x177a37['count']:_0x5e7ae9[_0xe5d7('0x1b')]+_0x5e7ae9[_0xe5d7('0x1d')];var _0x3101e0;if(_0x271928>=_0xad60e7){_0x271928=_0xad60e7;_0x3101e0=0xc8;}else{_0x3101e0=0xce;}_0x5395dc[_0xe5d7('0x18')](_0x3101e0);return _0x5395dc['set'](_0xe5d7('0x1f'),_0x528b36+'-'+_0x271928+'/'+_0xad60e7)[_0xe5d7('0x1a')](_0x177a37);}return null;};}function patchUpdates(_0x4ae32b){return function(_0x145b44){try{jsonpatch[_0xe5d7('0x20')](_0x145b44,_0x4ae32b,!![]);}catch(_0x2795e9){return BPromise[_0xe5d7('0x21')](_0x2795e9);}return _0x145b44[_0xe5d7('0x22')]();};}function saveUpdates(_0x48f2aa,_0x157e17){return function(_0x5f187f){if(_0x5f187f){return _0x5f187f['update'](_0x48f2aa)['then'](function(_0x4ad3e6){return _0x4ad3e6;});}return null;};}function removeEntity(_0x28af21,_0x5d6d62){return function(_0x51566a){if(_0x51566a){return _0x51566a[_0xe5d7('0x23')]()['then'](function(){_0x28af21[_0xe5d7('0x18')](0xcc)['end']();});}};}function handleEntityNotFound(_0x40ae3c,_0x5b4c83){return function(_0x6d1e24){if(!_0x6d1e24){_0x40ae3c[_0xe5d7('0x17')](0x194);}return _0x6d1e24;};}function handleError(_0x5f033c,_0x544eeb){_0x544eeb=_0x544eeb||0x1f4;return function(_0xcf952a){logger[_0xe5d7('0x24')](_0xcf952a['stack']);if(_0xcf952a[_0xe5d7('0x25')]){delete _0xcf952a[_0xe5d7('0x25')];}_0x5f033c[_0xe5d7('0x18')](_0x544eeb)[_0xe5d7('0x26')](_0xcf952a);};}exports[_0xe5d7('0x27')]=function(_0x136dad,_0x11a7d1){var _0x4aa6b0={},_0x5940cb={},_0x4deb28={'count':0x0,'rows':[]};var _0x3bb5d2=_[_0xe5d7('0x28')](db[_0xe5d7('0x29')]['rawAttributes'],function(_0x3d506a){return{'name':_0x3d506a[_0xe5d7('0x2a')],'type':_0x3d506a[_0xe5d7('0x2b')]['key']};});_0x5940cb['model']=_[_0xe5d7('0x28')](_0x3bb5d2,'name');_0x5940cb[_0xe5d7('0x2c')]=_[_0xe5d7('0x2d')](_0x136dad[_0xe5d7('0x2c')]);_0x5940cb[_0xe5d7('0x2e')]=_[_0xe5d7('0x2f')](_0x5940cb['model'],_0x5940cb[_0xe5d7('0x2c')]);_0x4aa6b0[_0xe5d7('0x30')]=_[_0xe5d7('0x2f')](_0x5940cb[_0xe5d7('0x31')],qs[_0xe5d7('0x32')](_0x136dad[_0xe5d7('0x2c')][_0xe5d7('0x32')]));_0x4aa6b0['attributes']=_0x4aa6b0[_0xe5d7('0x30')][_0xe5d7('0x33')]?_0x4aa6b0[_0xe5d7('0x30')]:_0x5940cb[_0xe5d7('0x31')];if(!_0x136dad[_0xe5d7('0x2c')][_0xe5d7('0x34')]('nolimit')){_0x4aa6b0[_0xe5d7('0x1d')]=qs[_0xe5d7('0x1d')](_0x136dad[_0xe5d7('0x2c')][_0xe5d7('0x1d')]);_0x4aa6b0['offset']=qs[_0xe5d7('0x1b')](_0x136dad[_0xe5d7('0x2c')][_0xe5d7('0x1b')]);}_0x4aa6b0['order']=qs[_0xe5d7('0x35')](_0x136dad[_0xe5d7('0x2c')][_0xe5d7('0x35')]);_0x4aa6b0[_0xe5d7('0x36')]=qs['filters'](_[_0xe5d7('0x37')](_0x136dad[_0xe5d7('0x2c')],_0x5940cb['filters']),_0x3bb5d2);if(_0x136dad[_0xe5d7('0x2c')][_0xe5d7('0x38')]){_0x4aa6b0[_0xe5d7('0x36')]=_['merge'](_0x4aa6b0['where'],{'$or':_[_0xe5d7('0x28')](_0x3bb5d2,function(_0x18c2bf){if(_0x18c2bf[_0xe5d7('0x2b')]!==_0xe5d7('0x39')){var _0x2fb490={};_0x2fb490[_0x18c2bf[_0xe5d7('0x25')]]={'$like':'%'+_0x136dad[_0xe5d7('0x2c')][_0xe5d7('0x38')]+'%'};return _0x2fb490;}})});}_0x4aa6b0=_['merge']({},_0x4aa6b0,_0x136dad[_0xe5d7('0x3a')]);var _0x3cce0f={'where':_0x4aa6b0['where']};return db[_0xe5d7('0x29')][_0xe5d7('0x1e')](_0x3cce0f)[_0xe5d7('0x3b')](function(_0x1e8003){_0x4deb28['count']=_0x1e8003;if(_0x136dad[_0xe5d7('0x2c')][_0xe5d7('0x3c')]){_0x4aa6b0[_0xe5d7('0x3d')]=[{'all':!![]}];}return db[_0xe5d7('0x29')][_0xe5d7('0x3e')](_0x4aa6b0);})[_0xe5d7('0x3b')](function(_0x272d95){_0x4deb28['rows']=_0x272d95;return _0x4deb28;})[_0xe5d7('0x3b')](respondWithFilteredResult(_0x11a7d1,_0x4aa6b0))[_0xe5d7('0x3f')](handleError(_0x11a7d1,null));};exports['show']=function(_0x3e6c20,_0x5a3556){var _0x37ce56={'raw':!![],'where':{'id':_0x3e6c20[_0xe5d7('0x40')]['id']}},_0x6b4ef1={};_0x6b4ef1[_0xe5d7('0x31')]=_['keys'](db[_0xe5d7('0x29')][_0xe5d7('0x41')]);_0x6b4ef1['query']=_['keys'](_0x3e6c20[_0xe5d7('0x2c')]);_0x6b4ef1[_0xe5d7('0x2e')]=_[_0xe5d7('0x2f')](_0x6b4ef1[_0xe5d7('0x31')],_0x6b4ef1['query']);_0x37ce56[_0xe5d7('0x30')]=_[_0xe5d7('0x2f')](_0x6b4ef1[_0xe5d7('0x31')],qs[_0xe5d7('0x32')](_0x3e6c20[_0xe5d7('0x2c')][_0xe5d7('0x32')]));_0x37ce56[_0xe5d7('0x30')]=_0x37ce56[_0xe5d7('0x30')]['length']?_0x37ce56[_0xe5d7('0x30')]:_0x6b4ef1[_0xe5d7('0x31')];if(_0x3e6c20[_0xe5d7('0x2c')][_0xe5d7('0x3c')]){_0x37ce56[_0xe5d7('0x3d')]=[{'all':!![]}];}_0x37ce56=_[_0xe5d7('0x42')]({},_0x37ce56,_0x3e6c20['options']);return db[_0xe5d7('0x29')][_0xe5d7('0x43')](_0x37ce56)[_0xe5d7('0x3b')](handleEntityNotFound(_0x5a3556,null))[_0xe5d7('0x3b')](respondWithResult(_0x5a3556,null))[_0xe5d7('0x3f')](handleError(_0x5a3556,null));};exports[_0xe5d7('0x44')]=function(_0x1de74e,_0x22ae19){return db[_0xe5d7('0x29')][_0xe5d7('0x44')](_0x1de74e[_0xe5d7('0x45')],{})[_0xe5d7('0x3b')](respondWithResult(_0x22ae19,0xc9))['catch'](handleError(_0x22ae19,null));};exports[_0xe5d7('0x46')]=function(_0x461efc,_0xbbb11a){if(_0x461efc['body']['id']){delete _0x461efc['body']['id'];}return db[_0xe5d7('0x29')][_0xe5d7('0x43')]({'where':{'id':_0x461efc['params']['id']}})[_0xe5d7('0x3b')](handleEntityNotFound(_0xbbb11a,null))['then'](saveUpdates(_0x461efc[_0xe5d7('0x45')],null))[_0xe5d7('0x3b')](respondWithResult(_0xbbb11a,null))[_0xe5d7('0x3f')](handleError(_0xbbb11a,null));};exports[_0xe5d7('0x23')]=function(_0x30fd32,_0x2fca56){return db[_0xe5d7('0x29')]['find']({'where':{'id':_0x30fd32['params']['id']}})['then'](handleEntityNotFound(_0x2fca56,null))[_0xe5d7('0x3b')](removeEntity(_0x2fca56,null))[_0xe5d7('0x3f')](handleError(_0x2fca56,null));}; \ No newline at end of file +var _0x863b=['then','error','stack','name','send','index','map','MailServerOut','rawAttributes','fieldName','type','model','query','keys','intersection','attributes','fields','length','hasOwnProperty','limit','order','sort','where','filters','filter','merge','VIRTUAL','options','includeAll','include','findAll','rows','catch','show','find','create','body','params','destroy','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','util','path','to-csv','ejs','lodash','squel','crypto','jsforce','desk.js','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../config/license/util','sendStatus','status','end','json','undefined','count','offset','set','Content-Range','apply','reject','save','update'];(function(_0xbe200f,_0x4b50eb){var _0x192597=function(_0x106cfd){while(--_0x106cfd){_0xbe200f['push'](_0xbe200f['shift']());}};_0x192597(++_0x4b50eb);}(_0x863b,0x77));var _0xb863=function(_0x4d07cc,_0x587613){_0x4d07cc=_0x4d07cc-0x0;var _0x42de3b=_0x863b[_0x4d07cc];return _0x42de3b;};'use strict';var emlformat=require('eml-format');var rimraf=require(_0xb863('0x0'));var zipdir=require(_0xb863('0x1'));var jsonpatch=require(_0xb863('0x2'));var rp=require(_0xb863('0x3'));var moment=require(_0xb863('0x4'));var BPromise=require(_0xb863('0x5'));var Mustache=require(_0xb863('0x6'));var util=require(_0xb863('0x7'));var path=require(_0xb863('0x8'));var sox=require('sox');var csv=require(_0xb863('0x9'));var ejs=require(_0xb863('0xa'));var fs=require('fs');var fs_extra=require('fs-extra');var _=require(_0xb863('0xb'));var squel=require(_0xb863('0xc'));var crypto=require(_0xb863('0xd'));var jsforce=require(_0xb863('0xe'));var deskjs=require(_0xb863('0xf'));var toCsv=require(_0xb863('0x9'));var querystring=require(_0xb863('0x10'));var Papa=require(_0xb863('0x11'));var Redis=require(_0xb863('0x12'));var authService=require(_0xb863('0x13'));var qs=require(_0xb863('0x14'));var as=require(_0xb863('0x15'));var hardwareService=require(_0xb863('0x16'));var logger=require(_0xb863('0x17'))(_0xb863('0x18'));var utils=require(_0xb863('0x19'));var config=require(_0xb863('0x1a'));var licenseUtil=require(_0xb863('0x1b'));var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0x302073,_0x5abd76){_0x5abd76=_0x5abd76||0xcc;return function(_0x5f1260){if(_0x5f1260){return _0x302073[_0xb863('0x1c')](_0x5abd76);}return _0x302073[_0xb863('0x1d')](_0x5abd76)[_0xb863('0x1e')]();};}function respondWithResult(_0x373d5c,_0x146c14){_0x146c14=_0x146c14||0xc8;return function(_0x1a99b7){if(_0x1a99b7){return _0x373d5c[_0xb863('0x1d')](_0x146c14)[_0xb863('0x1f')](_0x1a99b7);}};}function respondWithFilteredResult(_0x2e590a,_0x4763c8){return function(_0x1e50c0){if(_0x1e50c0){var _0x2657fc=typeof _0x4763c8['offset']===_0xb863('0x20')&&typeof _0x4763c8['limit']===_0xb863('0x20');var _0x2902dc=_0x1e50c0[_0xb863('0x21')];var _0x560785=_0x2657fc?0x0:_0x4763c8['offset'];var _0x10eaca=_0x2657fc?_0x1e50c0[_0xb863('0x21')]:_0x4763c8[_0xb863('0x22')]+_0x4763c8['limit'];var _0x33aebd;if(_0x10eaca>=_0x2902dc){_0x10eaca=_0x2902dc;_0x33aebd=0xc8;}else{_0x33aebd=0xce;}_0x2e590a[_0xb863('0x1d')](_0x33aebd);return _0x2e590a[_0xb863('0x23')](_0xb863('0x24'),_0x560785+'-'+_0x10eaca+'/'+_0x2902dc)['json'](_0x1e50c0);}return null;};}function patchUpdates(_0x5bbcc2){return function(_0x1c05ba){try{jsonpatch[_0xb863('0x25')](_0x1c05ba,_0x5bbcc2,!![]);}catch(_0x317068){return BPromise[_0xb863('0x26')](_0x317068);}return _0x1c05ba[_0xb863('0x27')]();};}function saveUpdates(_0x17cf8c,_0x466df4){return function(_0x19eece){if(_0x19eece){return _0x19eece[_0xb863('0x28')](_0x17cf8c)[_0xb863('0x29')](function(_0x5c51bf){return _0x5c51bf;});}return null;};}function removeEntity(_0x167453,_0xb5a169){return function(_0x584b9b){if(_0x584b9b){return _0x584b9b['destroy']()[_0xb863('0x29')](function(){_0x167453[_0xb863('0x1d')](0xcc)['end']();});}};}function handleEntityNotFound(_0x2c8c92,_0x22dbe5){return function(_0x50c26c){if(!_0x50c26c){_0x2c8c92[_0xb863('0x1c')](0x194);}return _0x50c26c;};}function handleError(_0x1c9e73,_0x13c913){_0x13c913=_0x13c913||0x1f4;return function(_0x28c025){logger[_0xb863('0x2a')](_0x28c025[_0xb863('0x2b')]);if(_0x28c025['name']){delete _0x28c025[_0xb863('0x2c')];}_0x1c9e73[_0xb863('0x1d')](_0x13c913)[_0xb863('0x2d')](_0x28c025);};}exports[_0xb863('0x2e')]=function(_0x37d329,_0x129408){var _0x47cf51={},_0x2aae9a={},_0x5f2377={'count':0x0,'rows':[]};var _0x1f72a8=_[_0xb863('0x2f')](db[_0xb863('0x30')][_0xb863('0x31')],function(_0x246971){return{'name':_0x246971[_0xb863('0x32')],'type':_0x246971[_0xb863('0x33')]['key']};});_0x2aae9a[_0xb863('0x34')]=_[_0xb863('0x2f')](_0x1f72a8,'name');_0x2aae9a[_0xb863('0x35')]=_[_0xb863('0x36')](_0x37d329['query']);_0x2aae9a['filters']=_[_0xb863('0x37')](_0x2aae9a[_0xb863('0x34')],_0x2aae9a[_0xb863('0x35')]);_0x47cf51[_0xb863('0x38')]=_['intersection'](_0x2aae9a['model'],qs[_0xb863('0x39')](_0x37d329[_0xb863('0x35')]['fields']));_0x47cf51[_0xb863('0x38')]=_0x47cf51['attributes'][_0xb863('0x3a')]?_0x47cf51[_0xb863('0x38')]:_0x2aae9a[_0xb863('0x34')];if(!_0x37d329[_0xb863('0x35')][_0xb863('0x3b')]('nolimit')){_0x47cf51[_0xb863('0x3c')]=qs[_0xb863('0x3c')](_0x37d329[_0xb863('0x35')][_0xb863('0x3c')]);_0x47cf51[_0xb863('0x22')]=qs['offset'](_0x37d329[_0xb863('0x35')][_0xb863('0x22')]);}_0x47cf51[_0xb863('0x3d')]=qs[_0xb863('0x3e')](_0x37d329[_0xb863('0x35')]['sort']);_0x47cf51[_0xb863('0x3f')]=qs[_0xb863('0x40')](_['pick'](_0x37d329[_0xb863('0x35')],_0x2aae9a[_0xb863('0x40')]),_0x1f72a8);if(_0x37d329[_0xb863('0x35')][_0xb863('0x41')]){_0x47cf51[_0xb863('0x3f')]=_[_0xb863('0x42')](_0x47cf51[_0xb863('0x3f')],{'$or':_['map'](_0x1f72a8,function(_0x41dd4e){if(_0x41dd4e[_0xb863('0x33')]!==_0xb863('0x43')){var _0x10f10b={};_0x10f10b[_0x41dd4e[_0xb863('0x2c')]]={'$like':'%'+_0x37d329[_0xb863('0x35')]['filter']+'%'};return _0x10f10b;}})});}_0x47cf51=_[_0xb863('0x42')]({},_0x47cf51,_0x37d329[_0xb863('0x44')]);var _0x5660e8={'where':_0x47cf51[_0xb863('0x3f')]};return db[_0xb863('0x30')][_0xb863('0x21')](_0x5660e8)[_0xb863('0x29')](function(_0x5300cc){_0x5f2377[_0xb863('0x21')]=_0x5300cc;if(_0x37d329['query'][_0xb863('0x45')]){_0x47cf51[_0xb863('0x46')]=[{'all':!![]}];}return db['MailServerOut'][_0xb863('0x47')](_0x47cf51);})[_0xb863('0x29')](function(_0x1fa300){_0x5f2377[_0xb863('0x48')]=_0x1fa300;return _0x5f2377;})[_0xb863('0x29')](respondWithFilteredResult(_0x129408,_0x47cf51))[_0xb863('0x49')](handleError(_0x129408,null));};exports[_0xb863('0x4a')]=function(_0x337029,_0x5a268c){var _0x3960d4={'raw':!![],'where':{'id':_0x337029['params']['id']}},_0x5a998d={};_0x5a998d[_0xb863('0x34')]=_[_0xb863('0x36')](db[_0xb863('0x30')][_0xb863('0x31')]);_0x5a998d[_0xb863('0x35')]=_[_0xb863('0x36')](_0x337029[_0xb863('0x35')]);_0x5a998d['filters']=_[_0xb863('0x37')](_0x5a998d[_0xb863('0x34')],_0x5a998d[_0xb863('0x35')]);_0x3960d4['attributes']=_[_0xb863('0x37')](_0x5a998d['model'],qs[_0xb863('0x39')](_0x337029[_0xb863('0x35')][_0xb863('0x39')]));_0x3960d4[_0xb863('0x38')]=_0x3960d4[_0xb863('0x38')][_0xb863('0x3a')]?_0x3960d4[_0xb863('0x38')]:_0x5a998d['model'];if(_0x337029[_0xb863('0x35')][_0xb863('0x45')]){_0x3960d4[_0xb863('0x46')]=[{'all':!![]}];}_0x3960d4=_['merge']({},_0x3960d4,_0x337029[_0xb863('0x44')]);return db[_0xb863('0x30')][_0xb863('0x4b')](_0x3960d4)['then'](handleEntityNotFound(_0x5a268c,null))[_0xb863('0x29')](respondWithResult(_0x5a268c,null))['catch'](handleError(_0x5a268c,null));};exports[_0xb863('0x4c')]=function(_0x33d613,_0x53fdf3){return db[_0xb863('0x30')][_0xb863('0x4c')](_0x33d613[_0xb863('0x4d')],{})[_0xb863('0x29')](respondWithResult(_0x53fdf3,0xc9))['catch'](handleError(_0x53fdf3,null));};exports[_0xb863('0x28')]=function(_0x553237,_0xe54691){if(_0x553237[_0xb863('0x4d')]['id']){delete _0x553237[_0xb863('0x4d')]['id'];}return db['MailServerOut'][_0xb863('0x4b')]({'where':{'id':_0x553237[_0xb863('0x4e')]['id']}})[_0xb863('0x29')](handleEntityNotFound(_0xe54691,null))[_0xb863('0x29')](saveUpdates(_0x553237[_0xb863('0x4d')],null))[_0xb863('0x29')](respondWithResult(_0xe54691,null))[_0xb863('0x49')](handleError(_0xe54691,null));};exports[_0xb863('0x4f')]=function(_0x1edd8b,_0x74016f){return db[_0xb863('0x30')][_0xb863('0x4b')]({'where':{'id':_0x1edd8b[_0xb863('0x4e')]['id']}})[_0xb863('0x29')](handleEntityNotFound(_0x74016f,null))['then'](removeEntity(_0x74016f,null))['catch'](handleError(_0x74016f,null));}; \ No newline at end of file diff --git a/server/api/mailServerOut/mailServerOut.model.js b/server/api/mailServerOut/mailServerOut.model.js index 9e067b7..aae487d 100644 --- a/server/api/mailServerOut/mailServerOut.model.js +++ b/server/api/mailServerOut/mailServerOut.model.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xd2d3=['define','MailServerOut','mail_servers_out','lodash','util','../../config/logger','api','moment','bluebird','request-promise','path','rimraf','../../config/environment','./mailServerOut.attributes','exports'];(function(_0x14cd78,_0x4b000c){var _0x5d02c1=function(_0x45c11a){while(--_0x45c11a){_0x14cd78['push'](_0x14cd78['shift']());}};_0x5d02c1(++_0x4b000c);}(_0xd2d3,0x102));var _0x3d2d=function(_0x2f6702,_0x38e6f1){_0x2f6702=_0x2f6702-0x0;var _0x14d6fb=_0xd2d3[_0x2f6702];return _0x14d6fb;};'use strict';var _=require(_0x3d2d('0x0'));var util=require(_0x3d2d('0x1'));var logger=require(_0x3d2d('0x2'))(_0x3d2d('0x3'));var moment=require(_0x3d2d('0x4'));var BPromise=require(_0x3d2d('0x5'));var rp=require(_0x3d2d('0x6'));var fs=require('fs');var path=require(_0x3d2d('0x7'));var rimraf=require(_0x3d2d('0x8'));var config=require(_0x3d2d('0x9'));var attributes=require(_0x3d2d('0xa'));module[_0x3d2d('0xb')]=function(_0x1c61fa,_0x11b2af){return _0x1c61fa[_0x3d2d('0xc')](_0x3d2d('0xd'),attributes,{'tableName':_0x3d2d('0xe'),'paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file +var _0x26cf=['bluebird','path','rimraf','../../config/environment','define','MailServerOut','mail_servers_out','lodash'];(function(_0x243990,_0x59d23d){var _0x58848f=function(_0x30e60e){while(--_0x30e60e){_0x243990['push'](_0x243990['shift']());}};_0x58848f(++_0x59d23d);}(_0x26cf,0x187));var _0xf26c=function(_0x4627bb,_0x4c8412){_0x4627bb=_0x4627bb-0x0;var _0x3ab7a0=_0x26cf[_0x4627bb];return _0x3ab7a0;};'use strict';var _=require(_0xf26c('0x0'));var util=require('util');var logger=require('../../config/logger')('api');var moment=require('moment');var BPromise=require(_0xf26c('0x1'));var rp=require('request-promise');var fs=require('fs');var path=require(_0xf26c('0x2'));var rimraf=require(_0xf26c('0x3'));var config=require(_0xf26c('0x4'));var attributes=require('./mailServerOut.attributes');module['exports']=function(_0x26ba43,_0xc8e684){return _0x26ba43[_0xf26c('0x5')](_0xf26c('0x6'),attributes,{'tableName':_0xf26c('0x7'),'paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file diff --git a/server/api/mailServerOut/mailServerOut.rpc.js b/server/api/mailServerOut/mailServerOut.rpc.js index 1a68bbf..5f3a3a9 100644 --- a/server/api/mailServerOut/mailServerOut.rpc.js +++ b/server/api/mailServerOut/mailServerOut.rpc.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x5f2f=['lodash','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/environment','jayson/promise','client','http','request','info','MailServerOut,\x20%s,\x20%s','debug','stringify','error','code','message','request\x20sent','result','catch'];(function(_0x30e8ce,_0xc873a0){var _0x595633=function(_0x47ce52){while(--_0x47ce52){_0x30e8ce['push'](_0x30e8ce['shift']());}};_0x595633(++_0xc873a0);}(_0x5f2f,0x73));var _0xf5f2=function(_0x2259e5,_0x577841){_0x2259e5=_0x2259e5-0x0;var _0x3add64=_0x5f2f[_0x2259e5];return _0x3add64;};'use strict';var _=require(_0xf5f2('0x0'));var util=require(_0xf5f2('0x1'));var moment=require(_0xf5f2('0x2'));var BPromise=require(_0xf5f2('0x3'));var rs=require(_0xf5f2('0x4'));var fs=require('fs');var Redis=require(_0xf5f2('0x5'));var db=require(_0xf5f2('0x6'))['db'];var utils=require(_0xf5f2('0x7'));var logger=require('../../config/logger')('rpc');var config=require(_0xf5f2('0x8'));var jayson=require(_0xf5f2('0x9'));var client=jayson[_0xf5f2('0xa')][_0xf5f2('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x3133bc,_0x473100,_0x5907aa){return new BPromise(function(_0x466882,_0x46cd9c){return client[_0xf5f2('0xc')](_0x3133bc,_0x5907aa)['then'](function(_0x375da4){logger[_0xf5f2('0xd')](_0xf5f2('0xe'),_0x473100,'request\x20sent');logger[_0xf5f2('0xf')]('MailServerOut,\x20%s,\x20%s,\x20%s',_0x473100,'request\x20sent',JSON[_0xf5f2('0x10')](_0x375da4));if(_0x375da4[_0xf5f2('0x11')]){if(_0x375da4['error'][_0xf5f2('0x12')]===0x1f4){logger[_0xf5f2('0x11')](_0xf5f2('0xe'),_0x473100,_0x375da4[_0xf5f2('0x11')][_0xf5f2('0x13')]);return _0x46cd9c(_0x375da4[_0xf5f2('0x11')]['message']);}logger[_0xf5f2('0x11')](_0xf5f2('0xe'),_0x473100,_0x375da4[_0xf5f2('0x11')][_0xf5f2('0x13')]);return _0x466882(_0x375da4[_0xf5f2('0x11')]['message']);}else{logger[_0xf5f2('0xd')](_0xf5f2('0xe'),_0x473100,_0xf5f2('0x14'));_0x466882(_0x375da4[_0xf5f2('0x15')][_0xf5f2('0x13')]);}})[_0xf5f2('0x16')](function(_0xdb61b3){logger[_0xf5f2('0x11')](_0xf5f2('0xe'),_0x473100,_0xdb61b3);_0x46cd9c(_0xdb61b3);});});} \ No newline at end of file +var _0x2ef3=['bluebird','randomstring','ioredis','../../config/utils','../../config/logger','../../config/environment','jayson/promise','request','then','info','MailServerOut,\x20%s,\x20%s','MailServerOut,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','code','message','catch','lodash','util','moment'];(function(_0x1719e4,_0x4278fe){var _0x236bac=function(_0x12e8a3){while(--_0x12e8a3){_0x1719e4['push'](_0x1719e4['shift']());}};_0x236bac(++_0x4278fe);}(_0x2ef3,0xba));var _0x32ef=function(_0x3e88d2,_0x529266){_0x3e88d2=_0x3e88d2-0x0;var _0x17761a=_0x2ef3[_0x3e88d2];return _0x17761a;};'use strict';var _=require(_0x32ef('0x0'));var util=require(_0x32ef('0x1'));var moment=require(_0x32ef('0x2'));var BPromise=require(_0x32ef('0x3'));var rs=require(_0x32ef('0x4'));var fs=require('fs');var Redis=require(_0x32ef('0x5'));var db=require('../../mysqldb')['db'];var utils=require(_0x32ef('0x6'));var logger=require(_0x32ef('0x7'))('rpc');var config=require(_0x32ef('0x8'));var jayson=require(_0x32ef('0x9'));var client=jayson['client']['http']({'port':0x232a});function respondWithRpcPromise(_0x2c0089,_0x4bfcf8,_0x367c39){return new BPromise(function(_0x2fb8eb,_0x234863){return client[_0x32ef('0xa')](_0x2c0089,_0x367c39)[_0x32ef('0xb')](function(_0x2bbb50){logger[_0x32ef('0xc')](_0x32ef('0xd'),_0x4bfcf8,'request\x20sent');logger['debug'](_0x32ef('0xe'),_0x4bfcf8,_0x32ef('0xf'),JSON[_0x32ef('0x10')](_0x2bbb50));if(_0x2bbb50[_0x32ef('0x11')]){if(_0x2bbb50['error'][_0x32ef('0x12')]===0x1f4){logger['error'](_0x32ef('0xd'),_0x4bfcf8,_0x2bbb50['error'][_0x32ef('0x13')]);return _0x234863(_0x2bbb50[_0x32ef('0x11')]['message']);}logger['error'](_0x32ef('0xd'),_0x4bfcf8,_0x2bbb50['error'][_0x32ef('0x13')]);return _0x2fb8eb(_0x2bbb50[_0x32ef('0x11')][_0x32ef('0x13')]);}else{logger[_0x32ef('0xc')]('MailServerOut,\x20%s,\x20%s',_0x4bfcf8,'request\x20sent');_0x2fb8eb(_0x2bbb50['result'][_0x32ef('0x13')]);}})[_0x32ef('0x14')](function(_0xb5aed2){logger['error']('MailServerOut,\x20%s,\x20%s',_0x4bfcf8,_0xb5aed2);_0x234863(_0xb5aed2);});});} \ No newline at end of file diff --git a/server/api/mailSubstatus/index.js b/server/api/mailSubstatus/index.js index dd8f139..986a2c6 100644 --- a/server/api/mailSubstatus/index.js +++ b/server/api/mailSubstatus/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x1671=['index','/describe','describe','get','/:id','show','post','create','put','update','delete','destroy','exports','multer','connect-timeout','express','../../components/auth/service','../../components/interaction/service','./mailSubstatus.controller','isAuthenticated'];(function(_0x3faaef,_0x546d1d){var _0x3c36bf=function(_0x1e6314){while(--_0x1e6314){_0x3faaef['push'](_0x3faaef['shift']());}};_0x3c36bf(++_0x546d1d);}(_0x1671,0x99));var _0x1167=function(_0x404a22,_0xb275c0){_0x404a22=_0x404a22-0x0;var _0xad2391=_0x1671[_0x404a22];return _0xad2391;};'use strict';var multer=require(_0x1167('0x0'));var util=require('util');var path=require('path');var timeout=require(_0x1167('0x1'));var express=require(_0x1167('0x2'));var router=express['Router']();var fs_extra=require('fs-extra');var auth=require(_0x1167('0x3'));var interaction=require(_0x1167('0x4'));var config=require('../../config/environment');var controller=require(_0x1167('0x5'));router['get']('/',auth[_0x1167('0x6')](),controller[_0x1167('0x7')]);router['get'](_0x1167('0x8'),auth[_0x1167('0x6')](),controller[_0x1167('0x9')]);router[_0x1167('0xa')](_0x1167('0xb'),auth['isAuthenticated'](),controller[_0x1167('0xc')]);router[_0x1167('0xd')]('/',auth[_0x1167('0x6')](),controller[_0x1167('0xe')]);router[_0x1167('0xf')](_0x1167('0xb'),auth['isAuthenticated'](),controller[_0x1167('0x10')]);router[_0x1167('0x11')]('/:id',auth[_0x1167('0x6')](),controller[_0x1167('0x12')]);module[_0x1167('0x13')]=router; \ No newline at end of file +var _0xe7b3=['show','post','create','put','update','delete','multer','util','path','express','Router','fs-extra','./mailSubstatus.controller','isAuthenticated','index','get','/describe','/:id'];(function(_0x3b75f4,_0x3653d6){var _0x3851b5=function(_0x4d0d85){while(--_0x4d0d85){_0x3b75f4['push'](_0x3b75f4['shift']());}};_0x3851b5(++_0x3653d6);}(_0xe7b3,0x15c));var _0x3e7b=function(_0x3a26dc,_0x2b849f){_0x3a26dc=_0x3a26dc-0x0;var _0x420d69=_0xe7b3[_0x3a26dc];return _0x420d69;};'use strict';var multer=require(_0x3e7b('0x0'));var util=require(_0x3e7b('0x1'));var path=require(_0x3e7b('0x2'));var timeout=require('connect-timeout');var express=require(_0x3e7b('0x3'));var router=express[_0x3e7b('0x4')]();var fs_extra=require(_0x3e7b('0x5'));var auth=require('../../components/auth/service');var interaction=require('../../components/interaction/service');var config=require('../../config/environment');var controller=require(_0x3e7b('0x6'));router['get']('/',auth[_0x3e7b('0x7')](),controller[_0x3e7b('0x8')]);router[_0x3e7b('0x9')](_0x3e7b('0xa'),auth[_0x3e7b('0x7')](),controller['describe']);router[_0x3e7b('0x9')](_0x3e7b('0xb'),auth['isAuthenticated'](),controller[_0x3e7b('0xc')]);router[_0x3e7b('0xd')]('/',auth[_0x3e7b('0x7')](),controller[_0x3e7b('0xe')]);router[_0x3e7b('0xf')]('/:id',auth['isAuthenticated'](),controller[_0x3e7b('0x10')]);router[_0x3e7b('0x11')](_0x3e7b('0xb'),auth[_0x3e7b('0x7')](),controller['destroy']);module['exports']=router; \ No newline at end of file diff --git a/server/api/mailSubstatus/mailSubstatus.attributes.js b/server/api/mailSubstatus/mailSubstatus.attributes.js index f013890..7120309 100644 --- a/server/api/mailSubstatus/mailSubstatus.attributes.js +++ b/server/api/mailSubstatus/mailSubstatus.attributes.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x9206=['STRING','name','sequelize','exports'];(function(_0x1b5a05,_0x2c80de){var _0x347931=function(_0xd39454){while(--_0xd39454){_0x1b5a05['push'](_0x1b5a05['shift']());}};_0x347931(++_0x2c80de);}(_0x9206,0x176));var _0x6920=function(_0x5103dc,_0x332483){_0x5103dc=_0x5103dc-0x0;var _0x1db53d=_0x9206[_0x5103dc];return _0x1db53d;};'use strict';var Sequelize=require(_0x6920('0x0'));module[_0x6920('0x1')]={'name':{'type':Sequelize[_0x6920('0x2')],'unique':_0x6920('0x3'),'allowNull':![],'validate':{'notEmpty':!![]}},'description':{'type':Sequelize[_0x6920('0x2')]}}; \ No newline at end of file +var _0x31af=['sequelize','exports','STRING'];(function(_0x57cc7a,_0x1e738d){var _0x5d6159=function(_0xb455d5){while(--_0xb455d5){_0x57cc7a['push'](_0x57cc7a['shift']());}};_0x5d6159(++_0x1e738d);}(_0x31af,0xde));var _0xf31a=function(_0x514089,_0xc4e3c4){_0x514089=_0x514089-0x0;var _0x376500=_0x31af[_0x514089];return _0x376500;};'use strict';var Sequelize=require(_0xf31a('0x0'));module[_0xf31a('0x1')]={'name':{'type':Sequelize[_0xf31a('0x2')],'unique':'name','allowNull':![],'validate':{'notEmpty':!![]}},'description':{'type':Sequelize['STRING']}}; \ No newline at end of file diff --git a/server/api/mailSubstatus/mailSubstatus.controller.js b/server/api/mailSubstatus/mailSubstatus.controller.js index 8bde075..61f4c5e 100644 --- a/server/api/mailSubstatus/mailSubstatus.controller.js +++ b/server/api/mailSubstatus/mailSubstatus.controller.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xfd4e=['save','update','then','stack','name','send','index','MailSubstatus','fieldName','type','model','map','query','keys','filters','intersection','attributes','fields','length','hasOwnProperty','nolimit','where','filter','merge','VIRTUAL','options','includeAll','include','rows','catch','show','params','rawAttributes','body','destroy','describe','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','mustache','path','sox','ejs','crypto','desk.js','to-csv','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','api','../../config/utils','../../config/environment','../../mysqldb','sendStatus','status','end','json','offset','undefined','limit','count','set','Content-Range','apply','reject'];(function(_0x48bc6b,_0x1a97e3){var _0x33f47f=function(_0x1ee71e){while(--_0x1ee71e){_0x48bc6b['push'](_0x48bc6b['shift']());}};_0x33f47f(++_0x1a97e3);}(_0xfd4e,0xb4));var _0xefd4=function(_0x460d90,_0x44039f){_0x460d90=_0x460d90-0x0;var _0x55d881=_0xfd4e[_0x460d90];return _0x55d881;};'use strict';var emlformat=require(_0xefd4('0x0'));var rimraf=require(_0xefd4('0x1'));var zipdir=require(_0xefd4('0x2'));var jsonpatch=require(_0xefd4('0x3'));var rp=require(_0xefd4('0x4'));var moment=require(_0xefd4('0x5'));var BPromise=require('bluebird');var Mustache=require(_0xefd4('0x6'));var util=require('util');var path=require(_0xefd4('0x7'));var sox=require(_0xefd4('0x8'));var csv=require('to-csv');var ejs=require(_0xefd4('0x9'));var fs=require('fs');var fs_extra=require('fs-extra');var _=require('lodash');var squel=require('squel');var crypto=require(_0xefd4('0xa'));var jsforce=require('jsforce');var deskjs=require(_0xefd4('0xb'));var toCsv=require(_0xefd4('0xc'));var querystring=require(_0xefd4('0xd'));var Papa=require(_0xefd4('0xe'));var Redis=require(_0xefd4('0xf'));var authService=require(_0xefd4('0x10'));var qs=require(_0xefd4('0x11'));var as=require(_0xefd4('0x12'));var hardwareService=require(_0xefd4('0x13'));var logger=require('../../config/logger')(_0xefd4('0x14'));var utils=require(_0xefd4('0x15'));var config=require(_0xefd4('0x16'));var licenseUtil=require('../../config/license/util');var db=require(_0xefd4('0x17'))['db'];function respondWithStatusCode(_0x2493b2,_0x4fbb29){_0x4fbb29=_0x4fbb29||0xcc;return function(_0x3a2c1a){if(_0x3a2c1a){return _0x2493b2[_0xefd4('0x18')](_0x4fbb29);}return _0x2493b2[_0xefd4('0x19')](_0x4fbb29)[_0xefd4('0x1a')]();};}function respondWithResult(_0x255c47,_0x460ed4){_0x460ed4=_0x460ed4||0xc8;return function(_0xde603d){if(_0xde603d){return _0x255c47['status'](_0x460ed4)[_0xefd4('0x1b')](_0xde603d);}};}function respondWithFilteredResult(_0x3eb4a6,_0x2b1bfb){return function(_0xc462b1){if(_0xc462b1){var _0x35497b=typeof _0x2b1bfb[_0xefd4('0x1c')]===_0xefd4('0x1d')&&typeof _0x2b1bfb[_0xefd4('0x1e')]===_0xefd4('0x1d');var _0x43edaf=_0xc462b1[_0xefd4('0x1f')];var _0xc3f10a=_0x35497b?0x0:_0x2b1bfb[_0xefd4('0x1c')];var _0x264ec8=_0x35497b?_0xc462b1[_0xefd4('0x1f')]:_0x2b1bfb[_0xefd4('0x1c')]+_0x2b1bfb[_0xefd4('0x1e')];var _0xca90fe;if(_0x264ec8>=_0x43edaf){_0x264ec8=_0x43edaf;_0xca90fe=0xc8;}else{_0xca90fe=0xce;}_0x3eb4a6[_0xefd4('0x19')](_0xca90fe);return _0x3eb4a6[_0xefd4('0x20')](_0xefd4('0x21'),_0xc3f10a+'-'+_0x264ec8+'/'+_0x43edaf)[_0xefd4('0x1b')](_0xc462b1);}return null;};}function patchUpdates(_0x45f0c1){return function(_0x1a74c3){try{jsonpatch[_0xefd4('0x22')](_0x1a74c3,_0x45f0c1,!![]);}catch(_0x19bc43){return BPromise[_0xefd4('0x23')](_0x19bc43);}return _0x1a74c3[_0xefd4('0x24')]();};}function saveUpdates(_0x20ca03,_0x2d1e3e){return function(_0x5f1b37){if(_0x5f1b37){return _0x5f1b37[_0xefd4('0x25')](_0x20ca03)['then'](function(_0x8e30e1){return _0x8e30e1;});}return null;};}function removeEntity(_0x3fa3c1,_0x53577a){return function(_0x166289){if(_0x166289){return _0x166289['destroy']()[_0xefd4('0x26')](function(){_0x3fa3c1[_0xefd4('0x19')](0xcc)[_0xefd4('0x1a')]();});}};}function handleEntityNotFound(_0x35a2e1,_0x58511a){return function(_0x1e56b9){if(!_0x1e56b9){_0x35a2e1[_0xefd4('0x18')](0x194);}return _0x1e56b9;};}function handleError(_0x7eaac6,_0x2b4cdf){_0x2b4cdf=_0x2b4cdf||0x1f4;return function(_0x5ccd14){logger['error'](_0x5ccd14[_0xefd4('0x27')]);if(_0x5ccd14[_0xefd4('0x28')]){delete _0x5ccd14[_0xefd4('0x28')];}_0x7eaac6['status'](_0x2b4cdf)[_0xefd4('0x29')](_0x5ccd14);};}exports[_0xefd4('0x2a')]=function(_0x580523,_0x2afb1d){var _0x2a0565={},_0x3dd620={},_0x56c69b={'count':0x0,'rows':[]};var _0x402c7d=_['map'](db[_0xefd4('0x2b')]['rawAttributes'],function(_0x3e905e){return{'name':_0x3e905e[_0xefd4('0x2c')],'type':_0x3e905e[_0xefd4('0x2d')]['key']};});_0x3dd620[_0xefd4('0x2e')]=_[_0xefd4('0x2f')](_0x402c7d,_0xefd4('0x28'));_0x3dd620[_0xefd4('0x30')]=_[_0xefd4('0x31')](_0x580523[_0xefd4('0x30')]);_0x3dd620[_0xefd4('0x32')]=_[_0xefd4('0x33')](_0x3dd620['model'],_0x3dd620[_0xefd4('0x30')]);_0x2a0565[_0xefd4('0x34')]=_['intersection'](_0x3dd620['model'],qs[_0xefd4('0x35')](_0x580523[_0xefd4('0x30')][_0xefd4('0x35')]));_0x2a0565[_0xefd4('0x34')]=_0x2a0565[_0xefd4('0x34')][_0xefd4('0x36')]?_0x2a0565[_0xefd4('0x34')]:_0x3dd620[_0xefd4('0x2e')];if(!_0x580523[_0xefd4('0x30')][_0xefd4('0x37')](_0xefd4('0x38'))){_0x2a0565[_0xefd4('0x1e')]=qs['limit'](_0x580523[_0xefd4('0x30')][_0xefd4('0x1e')]);_0x2a0565[_0xefd4('0x1c')]=qs[_0xefd4('0x1c')](_0x580523['query'][_0xefd4('0x1c')]);}_0x2a0565['order']=qs['sort'](_0x580523['query']['sort']);_0x2a0565[_0xefd4('0x39')]=qs[_0xefd4('0x32')](_['pick'](_0x580523[_0xefd4('0x30')],_0x3dd620[_0xefd4('0x32')]),_0x402c7d);if(_0x580523[_0xefd4('0x30')][_0xefd4('0x3a')]){_0x2a0565[_0xefd4('0x39')]=_[_0xefd4('0x3b')](_0x2a0565['where'],{'$or':_[_0xefd4('0x2f')](_0x402c7d,function(_0x4b25f1){if(_0x4b25f1['type']!==_0xefd4('0x3c')){var _0x583201={};_0x583201[_0x4b25f1[_0xefd4('0x28')]]={'$like':'%'+_0x580523[_0xefd4('0x30')]['filter']+'%'};return _0x583201;}})});}_0x2a0565=_[_0xefd4('0x3b')]({},_0x2a0565,_0x580523[_0xefd4('0x3d')]);var _0xbb6b13={'where':_0x2a0565[_0xefd4('0x39')]};return db['MailSubstatus'][_0xefd4('0x1f')](_0xbb6b13)[_0xefd4('0x26')](function(_0x81a139){_0x56c69b[_0xefd4('0x1f')]=_0x81a139;if(_0x580523[_0xefd4('0x30')][_0xefd4('0x3e')]){_0x2a0565[_0xefd4('0x3f')]=[{'all':!![]}];}return db[_0xefd4('0x2b')]['findAll'](_0x2a0565);})[_0xefd4('0x26')](function(_0x3ab2a4){_0x56c69b[_0xefd4('0x40')]=_0x3ab2a4;return _0x56c69b;})['then'](respondWithFilteredResult(_0x2afb1d,_0x2a0565))[_0xefd4('0x41')](handleError(_0x2afb1d,null));};exports[_0xefd4('0x42')]=function(_0x55604a,_0xc32c32){var _0x425a5f={'raw':!![],'where':{'id':_0x55604a[_0xefd4('0x43')]['id']}},_0x26fef6={};_0x26fef6[_0xefd4('0x2e')]=_[_0xefd4('0x31')](db[_0xefd4('0x2b')][_0xefd4('0x44')]);_0x26fef6['query']=_[_0xefd4('0x31')](_0x55604a[_0xefd4('0x30')]);_0x26fef6[_0xefd4('0x32')]=_[_0xefd4('0x33')](_0x26fef6[_0xefd4('0x2e')],_0x26fef6[_0xefd4('0x30')]);_0x425a5f[_0xefd4('0x34')]=_[_0xefd4('0x33')](_0x26fef6[_0xefd4('0x2e')],qs[_0xefd4('0x35')](_0x55604a[_0xefd4('0x30')][_0xefd4('0x35')]));_0x425a5f['attributes']=_0x425a5f[_0xefd4('0x34')]['length']?_0x425a5f[_0xefd4('0x34')]:_0x26fef6['model'];if(_0x55604a[_0xefd4('0x30')][_0xefd4('0x3e')]){_0x425a5f[_0xefd4('0x3f')]=[{'all':!![]}];}_0x425a5f=_[_0xefd4('0x3b')]({},_0x425a5f,_0x55604a['options']);return db[_0xefd4('0x2b')]['find'](_0x425a5f)[_0xefd4('0x26')](handleEntityNotFound(_0xc32c32,null))[_0xefd4('0x26')](respondWithResult(_0xc32c32,null))['catch'](handleError(_0xc32c32,null));};exports['create']=function(_0x210438,_0x2edef9){return db[_0xefd4('0x2b')]['create'](_0x210438[_0xefd4('0x45')],{})[_0xefd4('0x26')](respondWithResult(_0x2edef9,0xc9))[_0xefd4('0x41')](handleError(_0x2edef9,null));};exports[_0xefd4('0x25')]=function(_0x5872af,_0x5029f2){if(_0x5872af[_0xefd4('0x45')]['id']){delete _0x5872af[_0xefd4('0x45')]['id'];}return db[_0xefd4('0x2b')]['find']({'where':{'id':_0x5872af[_0xefd4('0x43')]['id']}})[_0xefd4('0x26')](handleEntityNotFound(_0x5029f2,null))[_0xefd4('0x26')](saveUpdates(_0x5872af[_0xefd4('0x45')],null))[_0xefd4('0x26')](respondWithResult(_0x5029f2,null))[_0xefd4('0x41')](handleError(_0x5029f2,null));};exports[_0xefd4('0x46')]=function(_0x1682fc,_0x553c13){return db[_0xefd4('0x2b')]['find']({'where':{'id':_0x1682fc[_0xefd4('0x43')]['id']}})[_0xefd4('0x26')](handleEntityNotFound(_0x553c13,null))[_0xefd4('0x26')](removeEntity(_0x553c13,null))[_0xefd4('0x41')](handleError(_0x553c13,null));};exports[_0xefd4('0x47')]=function(_0x699de,_0x5274ca){return db[_0xefd4('0x2b')]['describe']()[_0xefd4('0x26')](respondWithResult(_0x5274ca,null))[_0xefd4('0x41')](handleError(_0x5274ca,null));}; \ No newline at end of file +var _0x8656=['end','json','offset','undefined','limit','count','set','Content-Range','apply','update','then','error','stack','name','send','MailSubstatus','fieldName','key','map','query','keys','filters','attributes','intersection','model','fields','length','nolimit','sort','where','pick','filter','merge','type','options','includeAll','findAll','rows','catch','rawAttributes','find','create','body','params','destroy','describe','rimraf','zip-dir','fast-json-patch','moment','bluebird','mustache','util','path','sox','to-csv','ejs','lodash','squel','desk.js','querystring','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/environment','../../config/license/util','../../mysqldb','sendStatus','status'];(function(_0x4e0c31,_0x208e9f){var _0x3fd7df=function(_0x5ee817){while(--_0x5ee817){_0x4e0c31['push'](_0x4e0c31['shift']());}};_0x3fd7df(++_0x208e9f);}(_0x8656,0x1e4));var _0x6865=function(_0x35d483,_0x28b4a0){_0x35d483=_0x35d483-0x0;var _0x99edb7=_0x8656[_0x35d483];return _0x99edb7;};'use strict';var emlformat=require('eml-format');var rimraf=require(_0x6865('0x0'));var zipdir=require(_0x6865('0x1'));var jsonpatch=require(_0x6865('0x2'));var rp=require('request-promise');var moment=require(_0x6865('0x3'));var BPromise=require(_0x6865('0x4'));var Mustache=require(_0x6865('0x5'));var util=require(_0x6865('0x6'));var path=require(_0x6865('0x7'));var sox=require(_0x6865('0x8'));var csv=require(_0x6865('0x9'));var ejs=require(_0x6865('0xa'));var fs=require('fs');var fs_extra=require('fs-extra');var _=require(_0x6865('0xb'));var squel=require(_0x6865('0xc'));var crypto=require('crypto');var jsforce=require('jsforce');var deskjs=require(_0x6865('0xd'));var toCsv=require(_0x6865('0x9'));var querystring=require(_0x6865('0xe'));var Papa=require('papaparse');var Redis=require(_0x6865('0xf'));var authService=require(_0x6865('0x10'));var qs=require(_0x6865('0x11'));var as=require(_0x6865('0x12'));var hardwareService=require(_0x6865('0x13'));var logger=require(_0x6865('0x14'))(_0x6865('0x15'));var utils=require('../../config/utils');var config=require(_0x6865('0x16'));var licenseUtil=require(_0x6865('0x17'));var db=require(_0x6865('0x18'))['db'];function respondWithStatusCode(_0x59e48b,_0x305b30){_0x305b30=_0x305b30||0xcc;return function(_0x1652e0){if(_0x1652e0){return _0x59e48b[_0x6865('0x19')](_0x305b30);}return _0x59e48b[_0x6865('0x1a')](_0x305b30)[_0x6865('0x1b')]();};}function respondWithResult(_0x1aca53,_0x368454){_0x368454=_0x368454||0xc8;return function(_0x192258){if(_0x192258){return _0x1aca53['status'](_0x368454)[_0x6865('0x1c')](_0x192258);}};}function respondWithFilteredResult(_0x456a19,_0x363b65){return function(_0x3d45e5){if(_0x3d45e5){var _0x138a5c=typeof _0x363b65[_0x6865('0x1d')]===_0x6865('0x1e')&&typeof _0x363b65[_0x6865('0x1f')]===_0x6865('0x1e');var _0x5d83ec=_0x3d45e5[_0x6865('0x20')];var _0x4d5a74=_0x138a5c?0x0:_0x363b65[_0x6865('0x1d')];var _0x3dc666=_0x138a5c?_0x3d45e5[_0x6865('0x20')]:_0x363b65[_0x6865('0x1d')]+_0x363b65['limit'];var _0x200660;if(_0x3dc666>=_0x5d83ec){_0x3dc666=_0x5d83ec;_0x200660=0xc8;}else{_0x200660=0xce;}_0x456a19['status'](_0x200660);return _0x456a19[_0x6865('0x21')](_0x6865('0x22'),_0x4d5a74+'-'+_0x3dc666+'/'+_0x5d83ec)[_0x6865('0x1c')](_0x3d45e5);}return null;};}function patchUpdates(_0x21d019){return function(_0x515cb4){try{jsonpatch[_0x6865('0x23')](_0x515cb4,_0x21d019,!![]);}catch(_0xac7240){return BPromise['reject'](_0xac7240);}return _0x515cb4['save']();};}function saveUpdates(_0x59aeac,_0x100a3d){return function(_0x4fefc3){if(_0x4fefc3){return _0x4fefc3[_0x6865('0x24')](_0x59aeac)[_0x6865('0x25')](function(_0x1cdcf0){return _0x1cdcf0;});}return null;};}function removeEntity(_0x31e9d1,_0x5e526a){return function(_0x2cccf0){if(_0x2cccf0){return _0x2cccf0['destroy']()[_0x6865('0x25')](function(){_0x31e9d1[_0x6865('0x1a')](0xcc)[_0x6865('0x1b')]();});}};}function handleEntityNotFound(_0x178b42,_0x1af812){return function(_0xfc7948){if(!_0xfc7948){_0x178b42[_0x6865('0x19')](0x194);}return _0xfc7948;};}function handleError(_0x1030b9,_0x272b1d){_0x272b1d=_0x272b1d||0x1f4;return function(_0x4a1894){logger[_0x6865('0x26')](_0x4a1894[_0x6865('0x27')]);if(_0x4a1894[_0x6865('0x28')]){delete _0x4a1894['name'];}_0x1030b9[_0x6865('0x1a')](_0x272b1d)[_0x6865('0x29')](_0x4a1894);};}exports['index']=function(_0x3278d0,_0x1e8dd4){var _0x365dde={},_0x291ada={},_0x265601={'count':0x0,'rows':[]};var _0x5eee89=_['map'](db[_0x6865('0x2a')]['rawAttributes'],function(_0x3b30e9){return{'name':_0x3b30e9[_0x6865('0x2b')],'type':_0x3b30e9['type'][_0x6865('0x2c')]};});_0x291ada['model']=_[_0x6865('0x2d')](_0x5eee89,_0x6865('0x28'));_0x291ada[_0x6865('0x2e')]=_[_0x6865('0x2f')](_0x3278d0[_0x6865('0x2e')]);_0x291ada[_0x6865('0x30')]=_['intersection'](_0x291ada['model'],_0x291ada[_0x6865('0x2e')]);_0x365dde[_0x6865('0x31')]=_[_0x6865('0x32')](_0x291ada[_0x6865('0x33')],qs[_0x6865('0x34')](_0x3278d0[_0x6865('0x2e')]['fields']));_0x365dde[_0x6865('0x31')]=_0x365dde[_0x6865('0x31')][_0x6865('0x35')]?_0x365dde[_0x6865('0x31')]:_0x291ada[_0x6865('0x33')];if(!_0x3278d0[_0x6865('0x2e')]['hasOwnProperty'](_0x6865('0x36'))){_0x365dde[_0x6865('0x1f')]=qs['limit'](_0x3278d0['query'][_0x6865('0x1f')]);_0x365dde[_0x6865('0x1d')]=qs[_0x6865('0x1d')](_0x3278d0[_0x6865('0x2e')][_0x6865('0x1d')]);}_0x365dde['order']=qs[_0x6865('0x37')](_0x3278d0[_0x6865('0x2e')][_0x6865('0x37')]);_0x365dde[_0x6865('0x38')]=qs['filters'](_[_0x6865('0x39')](_0x3278d0[_0x6865('0x2e')],_0x291ada[_0x6865('0x30')]),_0x5eee89);if(_0x3278d0[_0x6865('0x2e')][_0x6865('0x3a')]){_0x365dde[_0x6865('0x38')]=_[_0x6865('0x3b')](_0x365dde['where'],{'$or':_[_0x6865('0x2d')](_0x5eee89,function(_0x34dda1){if(_0x34dda1[_0x6865('0x3c')]!=='VIRTUAL'){var _0xfe47e0={};_0xfe47e0[_0x34dda1['name']]={'$like':'%'+_0x3278d0[_0x6865('0x2e')]['filter']+'%'};return _0xfe47e0;}})});}_0x365dde=_[_0x6865('0x3b')]({},_0x365dde,_0x3278d0[_0x6865('0x3d')]);var _0x3c7ab4={'where':_0x365dde[_0x6865('0x38')]};return db['MailSubstatus'][_0x6865('0x20')](_0x3c7ab4)[_0x6865('0x25')](function(_0x2e734c){_0x265601[_0x6865('0x20')]=_0x2e734c;if(_0x3278d0[_0x6865('0x2e')][_0x6865('0x3e')]){_0x365dde['include']=[{'all':!![]}];}return db[_0x6865('0x2a')][_0x6865('0x3f')](_0x365dde);})['then'](function(_0x368b58){_0x265601[_0x6865('0x40')]=_0x368b58;return _0x265601;})[_0x6865('0x25')](respondWithFilteredResult(_0x1e8dd4,_0x365dde))[_0x6865('0x41')](handleError(_0x1e8dd4,null));};exports['show']=function(_0x3497f1,_0x24ab03){var _0x1b41d9={'raw':!![],'where':{'id':_0x3497f1['params']['id']}},_0x217140={};_0x217140[_0x6865('0x33')]=_[_0x6865('0x2f')](db[_0x6865('0x2a')][_0x6865('0x42')]);_0x217140[_0x6865('0x2e')]=_[_0x6865('0x2f')](_0x3497f1[_0x6865('0x2e')]);_0x217140[_0x6865('0x30')]=_[_0x6865('0x32')](_0x217140['model'],_0x217140[_0x6865('0x2e')]);_0x1b41d9[_0x6865('0x31')]=_[_0x6865('0x32')](_0x217140[_0x6865('0x33')],qs[_0x6865('0x34')](_0x3497f1[_0x6865('0x2e')][_0x6865('0x34')]));_0x1b41d9[_0x6865('0x31')]=_0x1b41d9[_0x6865('0x31')][_0x6865('0x35')]?_0x1b41d9[_0x6865('0x31')]:_0x217140[_0x6865('0x33')];if(_0x3497f1[_0x6865('0x2e')]['includeAll']){_0x1b41d9['include']=[{'all':!![]}];}_0x1b41d9=_['merge']({},_0x1b41d9,_0x3497f1['options']);return db[_0x6865('0x2a')][_0x6865('0x43')](_0x1b41d9)[_0x6865('0x25')](handleEntityNotFound(_0x24ab03,null))['then'](respondWithResult(_0x24ab03,null))['catch'](handleError(_0x24ab03,null));};exports[_0x6865('0x44')]=function(_0x5ae508,_0x30db9f){return db[_0x6865('0x2a')][_0x6865('0x44')](_0x5ae508[_0x6865('0x45')],{})[_0x6865('0x25')](respondWithResult(_0x30db9f,0xc9))[_0x6865('0x41')](handleError(_0x30db9f,null));};exports['update']=function(_0x58aec5,_0x4de6e2){if(_0x58aec5[_0x6865('0x45')]['id']){delete _0x58aec5[_0x6865('0x45')]['id'];}return db[_0x6865('0x2a')][_0x6865('0x43')]({'where':{'id':_0x58aec5[_0x6865('0x46')]['id']}})[_0x6865('0x25')](handleEntityNotFound(_0x4de6e2,null))[_0x6865('0x25')](saveUpdates(_0x58aec5[_0x6865('0x45')],null))[_0x6865('0x25')](respondWithResult(_0x4de6e2,null))[_0x6865('0x41')](handleError(_0x4de6e2,null));};exports[_0x6865('0x47')]=function(_0x4006c4,_0x19bb18){return db[_0x6865('0x2a')][_0x6865('0x43')]({'where':{'id':_0x4006c4[_0x6865('0x46')]['id']}})['then'](handleEntityNotFound(_0x19bb18,null))[_0x6865('0x25')](removeEntity(_0x19bb18,null))[_0x6865('0x41')](handleError(_0x19bb18,null));};exports[_0x6865('0x48')]=function(_0x39f04d,_0x382b81){return db[_0x6865('0x2a')][_0x6865('0x48')]()[_0x6865('0x25')](respondWithResult(_0x382b81,null))['catch'](handleError(_0x382b81,null));}; \ No newline at end of file diff --git a/server/api/mailSubstatus/mailSubstatus.events.js b/server/api/mailSubstatus/mailSubstatus.events.js index c64bd7a..2cdcc19 100644 --- a/server/api/mailSubstatus/mailSubstatus.events.js +++ b/server/api/mailSubstatus/mailSubstatus.events.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x2575=['hook','exports','events','MailSubstatus','setMaxListeners','update','emit'];(function(_0x1a6bda,_0x168b5d){var _0x4e1e9d=function(_0x4dfb76){while(--_0x4dfb76){_0x1a6bda['push'](_0x1a6bda['shift']());}};_0x4e1e9d(++_0x168b5d);}(_0x2575,0x11a));var _0x5257=function(_0x47ddaa,_0x1ecf54){_0x47ddaa=_0x47ddaa-0x0;var _0x1e6542=_0x2575[_0x47ddaa];return _0x1e6542;};'use strict';var EventEmitter=require(_0x5257('0x0'));var MailSubstatus=require('../../mysqldb')['db'][_0x5257('0x1')];var MailSubstatusEvents=new EventEmitter();MailSubstatusEvents[_0x5257('0x2')](0x0);var events={'afterUpdate':_0x5257('0x3')};function emitEvent(_0x12063b){return function(_0x428918,_0x2f08b1,_0x26fd44){MailSubstatusEvents[_0x5257('0x4')](_0x12063b+':'+_0x428918['id'],_0x428918);MailSubstatusEvents['emit'](_0x12063b,_0x428918);_0x26fd44(null);};}for(var e in events){if(events['hasOwnProperty'](e)){var event=events[e];MailSubstatus[_0x5257('0x5')](e,emitEvent(event));}}module[_0x5257('0x6')]=MailSubstatusEvents; \ No newline at end of file +var _0x4588=['update','emit','hasOwnProperty','hook','exports','events','MailSubstatus','setMaxListeners'];(function(_0x58965a,_0x2e71db){var _0x254efc=function(_0xf14fb4){while(--_0xf14fb4){_0x58965a['push'](_0x58965a['shift']());}};_0x254efc(++_0x2e71db);}(_0x4588,0x14d));var _0x8458=function(_0x48ec91,_0x212edc){_0x48ec91=_0x48ec91-0x0;var _0x22766c=_0x4588[_0x48ec91];return _0x22766c;};'use strict';var EventEmitter=require(_0x8458('0x0'));var MailSubstatus=require('../../mysqldb')['db'][_0x8458('0x1')];var MailSubstatusEvents=new EventEmitter();MailSubstatusEvents[_0x8458('0x2')](0x0);var events={'afterUpdate':_0x8458('0x3')};function emitEvent(_0x23fe7b){return function(_0x290098,_0x2b6860,_0x544aea){MailSubstatusEvents[_0x8458('0x4')](_0x23fe7b+':'+_0x290098['id'],_0x290098);MailSubstatusEvents[_0x8458('0x4')](_0x23fe7b,_0x290098);_0x544aea(null);};}for(var e in events){if(events[_0x8458('0x5')](e)){var event=events[e];MailSubstatus[_0x8458('0x6')](e,emitEvent(event));}}module[_0x8458('0x7')]=MailSubstatusEvents; \ No newline at end of file diff --git a/server/api/mailSubstatus/mailSubstatus.model.js b/server/api/mailSubstatus/mailSubstatus.model.js index 0d858ba..9a7dff5 100644 --- a/server/api/mailSubstatus/mailSubstatus.model.js +++ b/server/api/mailSubstatus/mailSubstatus.model.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x2d03=['define','MailSubstatus','mail_substatuses','Condition','mailSubstatus','_previousDataValues','name','then','./mailSubstatus.attributes','models'];(function(_0x176845,_0x58f338){var _0x289308=function(_0x18b547){while(--_0x18b547){_0x176845['push'](_0x176845['shift']());}};_0x289308(++_0x58f338);}(_0x2d03,0x17a));var _0x32d0=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0x2d03[_0x3dd15e];return _0x231fd0;};'use strict';var attributes=require(_0x32d0('0x0'));module['exports']=function(_0x27b614){var _0x584141=_0x27b614[_0x32d0('0x1')];return _0x27b614[_0x32d0('0x2')](_0x32d0('0x3'),attributes,{'tableName':_0x32d0('0x4'),'paranoid':![],'indexes':[],'timestamps':!![],'hooks':{'afterUpdate':function(_0x5d5ceb,_0xb5c8a1,_0x29f5c1){return _0x584141[_0x32d0('0x5')]['update']({'value':_0x5d5ceb['name']},{'where':{'field':_0x32d0('0x6'),'value':_0x5d5ceb[_0x32d0('0x7')][_0x32d0('0x8')]}})[_0x32d0('0x9')](function(){_0x29f5c1();})['catch'](function(_0x1bf21b){_0x29f5c1(_0x1bf21b);});}}});}; \ No newline at end of file +var _0x5ff5=['_previousDataValues','name','then','catch','./mailSubstatus.attributes','exports','models','define','MailSubstatus','mail_substatuses','Condition','update','mailSubstatus'];(function(_0x3db887,_0x59f92d){var _0x59d5c3=function(_0x56df25){while(--_0x56df25){_0x3db887['push'](_0x3db887['shift']());}};_0x59d5c3(++_0x59f92d);}(_0x5ff5,0xfb));var _0x55ff=function(_0x374f4c,_0x1e3de6){_0x374f4c=_0x374f4c-0x0;var _0x4af8d5=_0x5ff5[_0x374f4c];return _0x4af8d5;};'use strict';var attributes=require(_0x55ff('0x0'));module[_0x55ff('0x1')]=function(_0x5ccaa8){var _0x1f73af=_0x5ccaa8[_0x55ff('0x2')];return _0x5ccaa8[_0x55ff('0x3')](_0x55ff('0x4'),attributes,{'tableName':_0x55ff('0x5'),'paranoid':![],'indexes':[],'timestamps':!![],'hooks':{'afterUpdate':function(_0x558d55,_0x5c2424,_0x3e50ee){return _0x1f73af[_0x55ff('0x6')][_0x55ff('0x7')]({'value':_0x558d55['name']},{'where':{'field':_0x55ff('0x8'),'value':_0x558d55[_0x55ff('0x9')][_0x55ff('0xa')]}})[_0x55ff('0xb')](function(){_0x3e50ee();})[_0x55ff('0xc')](function(_0x3cef42){_0x3e50ee(_0x3cef42);});}}});}; \ No newline at end of file diff --git a/server/api/mailSubstatus/mailSubstatus.rpc.js b/server/api/mailSubstatus/mailSubstatus.rpc.js index 9add4c9..fc19756 100644 --- a/server/api/mailSubstatus/mailSubstatus.rpc.js +++ b/server/api/mailSubstatus/mailSubstatus.rpc.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x77e0=['ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','jayson/promise','http','request','info','MailSubstatus,\x20%s,\x20%s','request\x20sent','debug','MailSubstatus,\x20%s,\x20%s,\x20%s','stringify','error','code','message','catch','lodash','util','moment','bluebird','randomstring'];(function(_0x754ab4,_0x56daa7){var _0x34079a=function(_0x295ec1){while(--_0x295ec1){_0x754ab4['push'](_0x754ab4['shift']());}};_0x34079a(++_0x56daa7);}(_0x77e0,0x13d));var _0x077e=function(_0x25c200,_0x887235){_0x25c200=_0x25c200-0x0;var _0x41abd2=_0x77e0[_0x25c200];return _0x41abd2;};'use strict';var _=require(_0x077e('0x0'));var util=require(_0x077e('0x1'));var moment=require(_0x077e('0x2'));var BPromise=require(_0x077e('0x3'));var rs=require(_0x077e('0x4'));var fs=require('fs');var Redis=require(_0x077e('0x5'));var db=require(_0x077e('0x6'))['db'];var utils=require(_0x077e('0x7'));var logger=require(_0x077e('0x8'))(_0x077e('0x9'));var config=require('../../config/environment');var jayson=require(_0x077e('0xa'));var client=jayson['client'][_0x077e('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x3a717a,_0x50eef3,_0x57e617){return new BPromise(function(_0x50113b,_0x222afd){return client[_0x077e('0xc')](_0x3a717a,_0x57e617)['then'](function(_0x407728){logger[_0x077e('0xd')](_0x077e('0xe'),_0x50eef3,_0x077e('0xf'));logger[_0x077e('0x10')](_0x077e('0x11'),_0x50eef3,'request\x20sent',JSON[_0x077e('0x12')](_0x407728));if(_0x407728[_0x077e('0x13')]){if(_0x407728[_0x077e('0x13')][_0x077e('0x14')]===0x1f4){logger[_0x077e('0x13')](_0x077e('0xe'),_0x50eef3,_0x407728[_0x077e('0x13')]['message']);return _0x222afd(_0x407728[_0x077e('0x13')][_0x077e('0x15')]);}logger['error']('MailSubstatus,\x20%s,\x20%s',_0x50eef3,_0x407728[_0x077e('0x13')]['message']);return _0x50113b(_0x407728['error'][_0x077e('0x15')]);}else{logger[_0x077e('0xd')]('MailSubstatus,\x20%s,\x20%s',_0x50eef3,'request\x20sent');_0x50113b(_0x407728['result'][_0x077e('0x15')]);}})[_0x077e('0x16')](function(_0x2d8bda){logger[_0x077e('0x13')]('MailSubstatus,\x20%s,\x20%s',_0x50eef3,_0x2d8bda);_0x222afd(_0x2d8bda);});});} \ No newline at end of file +var _0xb0bc=['MailSubstatus,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','lodash','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/logger','jayson/promise','client','request','then','info','MailSubstatus,\x20%s,\x20%s','request\x20sent'];(function(_0x232cb8,_0x201667){var _0x20d3a2=function(_0x1013dc){while(--_0x1013dc){_0x232cb8['push'](_0x232cb8['shift']());}};_0x20d3a2(++_0x201667);}(_0xb0bc,0x156));var _0xcb0b=function(_0x14add3,_0x13ce8d){_0x14add3=_0x14add3-0x0;var _0x4a174f=_0xb0bc[_0x14add3];return _0x4a174f;};'use strict';var _=require(_0xcb0b('0x0'));var util=require(_0xcb0b('0x1'));var moment=require(_0xcb0b('0x2'));var BPromise=require(_0xcb0b('0x3'));var rs=require(_0xcb0b('0x4'));var fs=require('fs');var Redis=require(_0xcb0b('0x5'));var db=require(_0xcb0b('0x6'))['db'];var utils=require('../../config/utils');var logger=require(_0xcb0b('0x7'))('rpc');var config=require('../../config/environment');var jayson=require(_0xcb0b('0x8'));var client=jayson[_0xcb0b('0x9')]['http']({'port':0x232a});function respondWithRpcPromise(_0x227533,_0x1a0fa3,_0x35a726){return new BPromise(function(_0x3875d6,_0x39cb70){return client[_0xcb0b('0xa')](_0x227533,_0x35a726)[_0xcb0b('0xb')](function(_0x24e5dd){logger[_0xcb0b('0xc')](_0xcb0b('0xd'),_0x1a0fa3,_0xcb0b('0xe'));logger['debug'](_0xcb0b('0xf'),_0x1a0fa3,_0xcb0b('0xe'),JSON[_0xcb0b('0x10')](_0x24e5dd));if(_0x24e5dd[_0xcb0b('0x11')]){if(_0x24e5dd[_0xcb0b('0x11')][_0xcb0b('0x12')]===0x1f4){logger[_0xcb0b('0x11')](_0xcb0b('0xd'),_0x1a0fa3,_0x24e5dd[_0xcb0b('0x11')][_0xcb0b('0x13')]);return _0x39cb70(_0x24e5dd[_0xcb0b('0x11')]['message']);}logger[_0xcb0b('0x11')](_0xcb0b('0xd'),_0x1a0fa3,_0x24e5dd[_0xcb0b('0x11')][_0xcb0b('0x13')]);return _0x3875d6(_0x24e5dd[_0xcb0b('0x11')][_0xcb0b('0x13')]);}else{logger['info'](_0xcb0b('0xd'),_0x1a0fa3,_0xcb0b('0xe'));_0x3875d6(_0x24e5dd[_0xcb0b('0x14')][_0xcb0b('0x13')]);}})['catch'](function(_0x46adc1){logger[_0xcb0b('0x11')]('MailSubstatus,\x20%s,\x20%s',_0x1a0fa3,_0x46adc1);_0x39cb70(_0x46adc1);});});} \ No newline at end of file diff --git a/server/api/mailTransferReport/index.js b/server/api/mailTransferReport/index.js index f335d18..b73db5c 100644 --- a/server/api/mailTransferReport/index.js +++ b/server/api/mailTransferReport/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x7143=['show','post','create','put','/:id','destroy','exports','util','connect-timeout','express','Router','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','./mailTransferReport.controller','get','isAuthenticated','index','/describe'];(function(_0x19e35c,_0x29cd1e){var _0x3e1fe8=function(_0x17258b){while(--_0x17258b){_0x19e35c['push'](_0x19e35c['shift']());}};_0x3e1fe8(++_0x29cd1e);}(_0x7143,0x147));var _0x3714=function(_0xcbe0ad,_0x3b7a0d){_0xcbe0ad=_0xcbe0ad-0x0;var _0x380956=_0x7143[_0xcbe0ad];return _0x380956;};'use strict';var multer=require('multer');var util=require(_0x3714('0x0'));var path=require('path');var timeout=require(_0x3714('0x1'));var express=require(_0x3714('0x2'));var router=express[_0x3714('0x3')]();var fs_extra=require(_0x3714('0x4'));var auth=require(_0x3714('0x5'));var interaction=require(_0x3714('0x6'));var config=require(_0x3714('0x7'));var controller=require(_0x3714('0x8'));router[_0x3714('0x9')]('/',auth[_0x3714('0xa')](),controller[_0x3714('0xb')]);router['get'](_0x3714('0xc'),auth[_0x3714('0xa')](),controller['describe']);router['get']('/:id',auth['isAuthenticated'](),controller[_0x3714('0xd')]);router[_0x3714('0xe')]('/',auth[_0x3714('0xa')](),controller[_0x3714('0xf')]);router[_0x3714('0x10')](_0x3714('0x11'),auth[_0x3714('0xa')](),controller['update']);router['delete'](_0x3714('0x11'),auth[_0x3714('0xa')](),controller[_0x3714('0x12')]);module[_0x3714('0x13')]=router; \ No newline at end of file +var _0x5129=['../../config/environment','./mailTransferReport.controller','isAuthenticated','index','/describe','describe','get','/:id','show','create','delete','destroy','exports','multer','connect-timeout','Router','../../components/auth/service'];(function(_0x349248,_0x5eded1){var _0x39687f=function(_0x5426e6){while(--_0x5426e6){_0x349248['push'](_0x349248['shift']());}};_0x39687f(++_0x5eded1);}(_0x5129,0x10c));var _0x9512=function(_0xed045e,_0xcd67c1){_0xed045e=_0xed045e-0x0;var _0x35862a=_0x5129[_0xed045e];return _0x35862a;};'use strict';var multer=require(_0x9512('0x0'));var util=require('util');var path=require('path');var timeout=require(_0x9512('0x1'));var express=require('express');var router=express[_0x9512('0x2')]();var fs_extra=require('fs-extra');var auth=require(_0x9512('0x3'));var interaction=require('../../components/interaction/service');var config=require(_0x9512('0x4'));var controller=require(_0x9512('0x5'));router['get']('/',auth[_0x9512('0x6')](),controller[_0x9512('0x7')]);router['get'](_0x9512('0x8'),auth['isAuthenticated'](),controller[_0x9512('0x9')]);router[_0x9512('0xa')](_0x9512('0xb'),auth[_0x9512('0x6')](),controller[_0x9512('0xc')]);router['post']('/',auth[_0x9512('0x6')](),controller[_0x9512('0xd')]);router['put'](_0x9512('0xb'),auth[_0x9512('0x6')](),controller['update']);router[_0x9512('0xe')](_0x9512('0xb'),auth[_0x9512('0x6')](),controller[_0x9512('0xf')]);module[_0x9512('0x10')]=router; \ No newline at end of file diff --git a/server/api/mailTransferReport/mailTransferReport.attributes.js b/server/api/mailTransferReport/mailTransferReport.attributes.js index 586f842..8c734c9 100644 --- a/server/api/mailTransferReport/mailTransferReport.attributes.js +++ b/server/api/mailTransferReport/mailTransferReport.attributes.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x34e8=['queue','DATE','NOW','moment','sequelize','exports','STRING','account','agent'];(function(_0x110cbb,_0x186ee7){var _0x145f91=function(_0x3d2195){while(--_0x3d2195){_0x110cbb['push'](_0x110cbb['shift']());}};_0x145f91(++_0x186ee7);}(_0x34e8,0x12c));var _0x834e=function(_0x555737,_0x394ded){_0x555737=_0x555737-0x0;var _0x257c50=_0x34e8[_0x555737];return _0x257c50;};'use strict';var moment=require(_0x834e('0x0'));var Sequelize=require(_0x834e('0x1'));module[_0x834e('0x2')]={'uniqueid':{'type':Sequelize[_0x834e('0x3')],'allowNull':![]},'type':{'type':Sequelize['ENUM'](_0x834e('0x4'),_0x834e('0x5'),_0x834e('0x6')),'allowNull':![],'defaultValue':_0x834e('0x6')},'transferredAt':{'type':Sequelize[_0x834e('0x7')],'allowNull':![],'defaultValue':Sequelize[_0x834e('0x8')]}}; \ No newline at end of file +var _0xcb91=['STRING','ENUM','account','queue','NOW','exports'];(function(_0x482e9b,_0x20951d){var _0x2a3a07=function(_0x2f55ce){while(--_0x2f55ce){_0x482e9b['push'](_0x482e9b['shift']());}};_0x2a3a07(++_0x20951d);}(_0xcb91,0x1a9));var _0x1cb9=function(_0x136a0d,_0x476fe2){_0x136a0d=_0x136a0d-0x0;var _0x212ea5=_0xcb91[_0x136a0d];return _0x212ea5;};'use strict';var moment=require('moment');var Sequelize=require('sequelize');module[_0x1cb9('0x0')]={'uniqueid':{'type':Sequelize[_0x1cb9('0x1')],'allowNull':![]},'type':{'type':Sequelize[_0x1cb9('0x2')](_0x1cb9('0x3'),'agent',_0x1cb9('0x4')),'allowNull':![],'defaultValue':_0x1cb9('0x4')},'transferredAt':{'type':Sequelize['DATE'],'allowNull':![],'defaultValue':Sequelize[_0x1cb9('0x5')]}}; \ No newline at end of file diff --git a/server/api/mailTransferReport/mailTransferReport.controller.js b/server/api/mailTransferReport/mailTransferReport.controller.js index 118d649..5a19651 100644 --- a/server/api/mailTransferReport/mailTransferReport.controller.js +++ b/server/api/mailTransferReport/mailTransferReport.controller.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xa410=['querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../config/environment','sendStatus','status','json','offset','limit','count','apply','save','update','then','destroy','error','stack','name','send','MailTransferReport','type','key','model','map','keys','filters','attributes','intersection','fields','length','query','hasOwnProperty','nolimit','order','sort','pick','where','merge','VIRTUAL','options','includeAll','include','catch','show','create','body','find','params','describe','eml-format','rimraf','zip-dir','request-promise','moment','bluebird','mustache','util','path','sox','to-csv','ejs','fs-extra','lodash','squel','crypto','jsforce'];(function(_0x39e86b,_0x4d2359){var _0x514ded=function(_0x255b89){while(--_0x255b89){_0x39e86b['push'](_0x39e86b['shift']());}};_0x514ded(++_0x4d2359);}(_0xa410,0x77));var _0x0a41=function(_0x3ace7b,_0x41aeac){_0x3ace7b=_0x3ace7b-0x0;var _0x2cd7ed=_0xa410[_0x3ace7b];return _0x2cd7ed;};'use strict';var emlformat=require(_0x0a41('0x0'));var rimraf=require(_0x0a41('0x1'));var zipdir=require(_0x0a41('0x2'));var jsonpatch=require('fast-json-patch');var rp=require(_0x0a41('0x3'));var moment=require(_0x0a41('0x4'));var BPromise=require(_0x0a41('0x5'));var Mustache=require(_0x0a41('0x6'));var util=require(_0x0a41('0x7'));var path=require(_0x0a41('0x8'));var sox=require(_0x0a41('0x9'));var csv=require(_0x0a41('0xa'));var ejs=require(_0x0a41('0xb'));var fs=require('fs');var fs_extra=require(_0x0a41('0xc'));var _=require(_0x0a41('0xd'));var squel=require(_0x0a41('0xe'));var crypto=require(_0x0a41('0xf'));var jsforce=require(_0x0a41('0x10'));var deskjs=require('desk.js');var toCsv=require(_0x0a41('0xa'));var querystring=require(_0x0a41('0x11'));var Papa=require(_0x0a41('0x12'));var Redis=require(_0x0a41('0x13'));var authService=require(_0x0a41('0x14'));var qs=require(_0x0a41('0x15'));var as=require('../../components/parsers/advancedSearch');var hardwareService=require('../../config/license/hardware');var logger=require('../../config/logger')('api');var utils=require('../../config/utils');var config=require(_0x0a41('0x16'));var licenseUtil=require('../../config/license/util');var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0x517bd7,_0x140369){_0x140369=_0x140369||0xcc;return function(_0xc65c7a){if(_0xc65c7a){return _0x517bd7[_0x0a41('0x17')](_0x140369);}return _0x517bd7[_0x0a41('0x18')](_0x140369)['end']();};}function respondWithResult(_0x36ad1b,_0x3506c5){_0x3506c5=_0x3506c5||0xc8;return function(_0x86cf05){if(_0x86cf05){return _0x36ad1b['status'](_0x3506c5)[_0x0a41('0x19')](_0x86cf05);}};}function respondWithFilteredResult(_0x1345c6,_0x406f61){return function(_0x574655){if(_0x574655){var _0x12b05d=typeof _0x406f61[_0x0a41('0x1a')]==='undefined'&&typeof _0x406f61[_0x0a41('0x1b')]==='undefined';var _0x5f2b19=_0x574655[_0x0a41('0x1c')];var _0x5e5227=_0x12b05d?0x0:_0x406f61[_0x0a41('0x1a')];var _0x185d4e=_0x12b05d?_0x574655['count']:_0x406f61['offset']+_0x406f61[_0x0a41('0x1b')];var _0x494f4a;if(_0x185d4e>=_0x5f2b19){_0x185d4e=_0x5f2b19;_0x494f4a=0xc8;}else{_0x494f4a=0xce;}_0x1345c6['status'](_0x494f4a);return _0x1345c6['set']('Content-Range',_0x5e5227+'-'+_0x185d4e+'/'+_0x5f2b19)[_0x0a41('0x19')](_0x574655);}return null;};}function patchUpdates(_0x398003){return function(_0x4d3ebd){try{jsonpatch[_0x0a41('0x1d')](_0x4d3ebd,_0x398003,!![]);}catch(_0x17cac9){return BPromise['reject'](_0x17cac9);}return _0x4d3ebd[_0x0a41('0x1e')]();};}function saveUpdates(_0x1d0b0d,_0x5da8a4){return function(_0x5b9d44){if(_0x5b9d44){return _0x5b9d44[_0x0a41('0x1f')](_0x1d0b0d)[_0x0a41('0x20')](function(_0x493908){return _0x493908;});}return null;};}function removeEntity(_0x25f8a8,_0xf5ce60){return function(_0x274d67){if(_0x274d67){return _0x274d67[_0x0a41('0x21')]()['then'](function(){_0x25f8a8[_0x0a41('0x18')](0xcc)['end']();});}};}function handleEntityNotFound(_0xa54d9e,_0x58f67d){return function(_0x21e9b3){if(!_0x21e9b3){_0xa54d9e[_0x0a41('0x17')](0x194);}return _0x21e9b3;};}function handleError(_0x27e4c2,_0x5a896a){_0x5a896a=_0x5a896a||0x1f4;return function(_0x243094){logger[_0x0a41('0x22')](_0x243094[_0x0a41('0x23')]);if(_0x243094[_0x0a41('0x24')]){delete _0x243094['name'];}_0x27e4c2[_0x0a41('0x18')](_0x5a896a)[_0x0a41('0x25')](_0x243094);};}exports['index']=function(_0x53fc9c,_0xcc81a){var _0x318b70={},_0x521b92={},_0x241fc5={'count':0x0,'rows':[]};var _0x167200=_['map'](db[_0x0a41('0x26')]['rawAttributes'],function(_0x972ad9){return{'name':_0x972ad9['fieldName'],'type':_0x972ad9[_0x0a41('0x27')][_0x0a41('0x28')]};});_0x521b92[_0x0a41('0x29')]=_[_0x0a41('0x2a')](_0x167200,_0x0a41('0x24'));_0x521b92['query']=_[_0x0a41('0x2b')](_0x53fc9c['query']);_0x521b92[_0x0a41('0x2c')]=_['intersection'](_0x521b92[_0x0a41('0x29')],_0x521b92['query']);_0x318b70[_0x0a41('0x2d')]=_[_0x0a41('0x2e')](_0x521b92['model'],qs[_0x0a41('0x2f')](_0x53fc9c['query']['fields']));_0x318b70[_0x0a41('0x2d')]=_0x318b70['attributes'][_0x0a41('0x30')]?_0x318b70[_0x0a41('0x2d')]:_0x521b92[_0x0a41('0x29')];if(!_0x53fc9c[_0x0a41('0x31')][_0x0a41('0x32')](_0x0a41('0x33'))){_0x318b70['limit']=qs[_0x0a41('0x1b')](_0x53fc9c[_0x0a41('0x31')]['limit']);_0x318b70[_0x0a41('0x1a')]=qs['offset'](_0x53fc9c[_0x0a41('0x31')][_0x0a41('0x1a')]);}_0x318b70[_0x0a41('0x34')]=qs['sort'](_0x53fc9c['query'][_0x0a41('0x35')]);_0x318b70['where']=qs[_0x0a41('0x2c')](_[_0x0a41('0x36')](_0x53fc9c['query'],_0x521b92[_0x0a41('0x2c')]),_0x167200);if(_0x53fc9c[_0x0a41('0x31')]['filter']){_0x318b70[_0x0a41('0x37')]=_[_0x0a41('0x38')](_0x318b70[_0x0a41('0x37')],{'$or':_['map'](_0x167200,function(_0x3fb352){if(_0x3fb352['type']!==_0x0a41('0x39')){var _0xd14484={};_0xd14484[_0x3fb352[_0x0a41('0x24')]]={'$like':'%'+_0x53fc9c[_0x0a41('0x31')]['filter']+'%'};return _0xd14484;}})});}_0x318b70=_[_0x0a41('0x38')]({},_0x318b70,_0x53fc9c[_0x0a41('0x3a')]);var _0x47396c={'where':_0x318b70['where']};return db['MailTransferReport'][_0x0a41('0x1c')](_0x47396c)[_0x0a41('0x20')](function(_0x634e81){_0x241fc5[_0x0a41('0x1c')]=_0x634e81;if(_0x53fc9c[_0x0a41('0x31')][_0x0a41('0x3b')]){_0x318b70[_0x0a41('0x3c')]=[{'all':!![]}];}return db[_0x0a41('0x26')]['findAll'](_0x318b70);})[_0x0a41('0x20')](function(_0x213f5e){_0x241fc5['rows']=_0x213f5e;return _0x241fc5;})[_0x0a41('0x20')](respondWithFilteredResult(_0xcc81a,_0x318b70))[_0x0a41('0x3d')](handleError(_0xcc81a,null));};exports[_0x0a41('0x3e')]=function(_0x1b7a51,_0x5d58fc){var _0x54493d={'raw':!![],'where':{'id':_0x1b7a51['params']['id']}},_0x4afa6e={};_0x4afa6e[_0x0a41('0x29')]=_[_0x0a41('0x2b')](db[_0x0a41('0x26')]['rawAttributes']);_0x4afa6e[_0x0a41('0x31')]=_[_0x0a41('0x2b')](_0x1b7a51[_0x0a41('0x31')]);_0x4afa6e[_0x0a41('0x2c')]=_['intersection'](_0x4afa6e[_0x0a41('0x29')],_0x4afa6e[_0x0a41('0x31')]);_0x54493d['attributes']=_[_0x0a41('0x2e')](_0x4afa6e[_0x0a41('0x29')],qs[_0x0a41('0x2f')](_0x1b7a51[_0x0a41('0x31')][_0x0a41('0x2f')]));_0x54493d['attributes']=_0x54493d[_0x0a41('0x2d')][_0x0a41('0x30')]?_0x54493d['attributes']:_0x4afa6e[_0x0a41('0x29')];if(_0x1b7a51[_0x0a41('0x31')][_0x0a41('0x3b')]){_0x54493d[_0x0a41('0x3c')]=[{'all':!![]}];}_0x54493d=_['merge']({},_0x54493d,_0x1b7a51['options']);return db[_0x0a41('0x26')]['find'](_0x54493d)[_0x0a41('0x20')](handleEntityNotFound(_0x5d58fc,null))[_0x0a41('0x20')](respondWithResult(_0x5d58fc,null))[_0x0a41('0x3d')](handleError(_0x5d58fc,null));};exports['create']=function(_0x35b131,_0x5df07a){return db['MailTransferReport'][_0x0a41('0x3f')](_0x35b131['body'],{})[_0x0a41('0x20')](respondWithResult(_0x5df07a,0xc9))[_0x0a41('0x3d')](handleError(_0x5df07a,null));};exports[_0x0a41('0x1f')]=function(_0x4390e7,_0x43df2e){if(_0x4390e7[_0x0a41('0x40')]['id']){delete _0x4390e7['body']['id'];}return db['MailTransferReport'][_0x0a41('0x41')]({'where':{'id':_0x4390e7[_0x0a41('0x42')]['id']}})[_0x0a41('0x20')](handleEntityNotFound(_0x43df2e,null))['then'](saveUpdates(_0x4390e7['body'],null))[_0x0a41('0x20')](respondWithResult(_0x43df2e,null))[_0x0a41('0x3d')](handleError(_0x43df2e,null));};exports[_0x0a41('0x21')]=function(_0x4e668a,_0x50a35f){return db[_0x0a41('0x26')][_0x0a41('0x41')]({'where':{'id':_0x4e668a[_0x0a41('0x42')]['id']}})['then'](handleEntityNotFound(_0x50a35f,null))[_0x0a41('0x20')](removeEntity(_0x50a35f,null))[_0x0a41('0x3d')](handleError(_0x50a35f,null));};exports[_0x0a41('0x43')]=function(_0x3d95df,_0x3760c8){return db[_0x0a41('0x26')]['describe']()[_0x0a41('0x20')](respondWithResult(_0x3760c8,null))[_0x0a41('0x3d')](handleError(_0x3760c8,null));}; \ No newline at end of file +var _0xc68e=['path','sox','ejs','fs-extra','lodash','crypto','jsforce','desk.js','to-csv','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/logger','api','../../config/utils','../../config/license/util','../../mysqldb','sendStatus','status','end','json','offset','limit','count','set','Content-Range','apply','reject','save','then','error','name','send','index','rawAttributes','fieldName','key','map','query','filters','intersection','model','attributes','fields','length','hasOwnProperty','nolimit','order','sort','where','pick','filter','merge','type','VIRTUAL','options','MailTransferReport','includeAll','findAll','rows','catch','show','params','keys','find','create','body','update','destroy','describe','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','util'];(function(_0x558e5a,_0x5e9a85){var _0x717a46=function(_0x786d8){while(--_0x786d8){_0x558e5a['push'](_0x558e5a['shift']());}};_0x717a46(++_0x5e9a85);}(_0xc68e,0x9b));var _0xec68=function(_0x3a0fc0,_0x2a63b7){_0x3a0fc0=_0x3a0fc0-0x0;var _0x544b5a=_0xc68e[_0x3a0fc0];return _0x544b5a;};'use strict';var emlformat=require(_0xec68('0x0'));var rimraf=require(_0xec68('0x1'));var zipdir=require(_0xec68('0x2'));var jsonpatch=require(_0xec68('0x3'));var rp=require(_0xec68('0x4'));var moment=require(_0xec68('0x5'));var BPromise=require(_0xec68('0x6'));var Mustache=require(_0xec68('0x7'));var util=require(_0xec68('0x8'));var path=require(_0xec68('0x9'));var sox=require(_0xec68('0xa'));var csv=require('to-csv');var ejs=require(_0xec68('0xb'));var fs=require('fs');var fs_extra=require(_0xec68('0xc'));var _=require(_0xec68('0xd'));var squel=require('squel');var crypto=require(_0xec68('0xe'));var jsforce=require(_0xec68('0xf'));var deskjs=require(_0xec68('0x10'));var toCsv=require(_0xec68('0x11'));var querystring=require(_0xec68('0x12'));var Papa=require(_0xec68('0x13'));var Redis=require(_0xec68('0x14'));var authService=require(_0xec68('0x15'));var qs=require(_0xec68('0x16'));var as=require(_0xec68('0x17'));var hardwareService=require('../../config/license/hardware');var logger=require(_0xec68('0x18'))(_0xec68('0x19'));var utils=require(_0xec68('0x1a'));var config=require('../../config/environment');var licenseUtil=require(_0xec68('0x1b'));var db=require(_0xec68('0x1c'))['db'];function respondWithStatusCode(_0x40e6b4,_0x4456a2){_0x4456a2=_0x4456a2||0xcc;return function(_0x535c26){if(_0x535c26){return _0x40e6b4[_0xec68('0x1d')](_0x4456a2);}return _0x40e6b4[_0xec68('0x1e')](_0x4456a2)[_0xec68('0x1f')]();};}function respondWithResult(_0x4b375b,_0x205e4a){_0x205e4a=_0x205e4a||0xc8;return function(_0x5da32a){if(_0x5da32a){return _0x4b375b[_0xec68('0x1e')](_0x205e4a)[_0xec68('0x20')](_0x5da32a);}};}function respondWithFilteredResult(_0x2a8f9b,_0xe6d32b){return function(_0x306075){if(_0x306075){var _0x1a2978=typeof _0xe6d32b[_0xec68('0x21')]==='undefined'&&typeof _0xe6d32b[_0xec68('0x22')]==='undefined';var _0x13e9fd=_0x306075[_0xec68('0x23')];var _0x1aa227=_0x1a2978?0x0:_0xe6d32b['offset'];var _0x3b631d=_0x1a2978?_0x306075[_0xec68('0x23')]:_0xe6d32b[_0xec68('0x21')]+_0xe6d32b[_0xec68('0x22')];var _0x55516e;if(_0x3b631d>=_0x13e9fd){_0x3b631d=_0x13e9fd;_0x55516e=0xc8;}else{_0x55516e=0xce;}_0x2a8f9b[_0xec68('0x1e')](_0x55516e);return _0x2a8f9b[_0xec68('0x24')](_0xec68('0x25'),_0x1aa227+'-'+_0x3b631d+'/'+_0x13e9fd)['json'](_0x306075);}return null;};}function patchUpdates(_0x46ca3e){return function(_0x4ce677){try{jsonpatch[_0xec68('0x26')](_0x4ce677,_0x46ca3e,!![]);}catch(_0x4f3196){return BPromise[_0xec68('0x27')](_0x4f3196);}return _0x4ce677[_0xec68('0x28')]();};}function saveUpdates(_0x78c121,_0x3d90f8){return function(_0x100632){if(_0x100632){return _0x100632['update'](_0x78c121)['then'](function(_0x1f3599){return _0x1f3599;});}return null;};}function removeEntity(_0x241af1,_0x339298){return function(_0x1896a0){if(_0x1896a0){return _0x1896a0['destroy']()[_0xec68('0x29')](function(){_0x241af1[_0xec68('0x1e')](0xcc)[_0xec68('0x1f')]();});}};}function handleEntityNotFound(_0x2f43c0,_0x1c4fc6){return function(_0x2e7f07){if(!_0x2e7f07){_0x2f43c0[_0xec68('0x1d')](0x194);}return _0x2e7f07;};}function handleError(_0x2d5265,_0x27a28b){_0x27a28b=_0x27a28b||0x1f4;return function(_0x2c1a88){logger[_0xec68('0x2a')](_0x2c1a88['stack']);if(_0x2c1a88[_0xec68('0x2b')]){delete _0x2c1a88[_0xec68('0x2b')];}_0x2d5265['status'](_0x27a28b)[_0xec68('0x2c')](_0x2c1a88);};}exports[_0xec68('0x2d')]=function(_0x22cecc,_0x45866d){var _0x2e2456={},_0x4e9847={},_0x2666a1={'count':0x0,'rows':[]};var _0x2b03c9=_['map'](db['MailTransferReport'][_0xec68('0x2e')],function(_0x424dc4){return{'name':_0x424dc4[_0xec68('0x2f')],'type':_0x424dc4['type'][_0xec68('0x30')]};});_0x4e9847['model']=_[_0xec68('0x31')](_0x2b03c9,_0xec68('0x2b'));_0x4e9847[_0xec68('0x32')]=_['keys'](_0x22cecc['query']);_0x4e9847[_0xec68('0x33')]=_[_0xec68('0x34')](_0x4e9847[_0xec68('0x35')],_0x4e9847[_0xec68('0x32')]);_0x2e2456[_0xec68('0x36')]=_[_0xec68('0x34')](_0x4e9847[_0xec68('0x35')],qs[_0xec68('0x37')](_0x22cecc[_0xec68('0x32')][_0xec68('0x37')]));_0x2e2456[_0xec68('0x36')]=_0x2e2456[_0xec68('0x36')][_0xec68('0x38')]?_0x2e2456[_0xec68('0x36')]:_0x4e9847[_0xec68('0x35')];if(!_0x22cecc[_0xec68('0x32')][_0xec68('0x39')](_0xec68('0x3a'))){_0x2e2456['limit']=qs[_0xec68('0x22')](_0x22cecc['query'][_0xec68('0x22')]);_0x2e2456['offset']=qs[_0xec68('0x21')](_0x22cecc[_0xec68('0x32')]['offset']);}_0x2e2456[_0xec68('0x3b')]=qs['sort'](_0x22cecc['query'][_0xec68('0x3c')]);_0x2e2456[_0xec68('0x3d')]=qs['filters'](_[_0xec68('0x3e')](_0x22cecc[_0xec68('0x32')],_0x4e9847[_0xec68('0x33')]),_0x2b03c9);if(_0x22cecc[_0xec68('0x32')][_0xec68('0x3f')]){_0x2e2456['where']=_[_0xec68('0x40')](_0x2e2456[_0xec68('0x3d')],{'$or':_[_0xec68('0x31')](_0x2b03c9,function(_0x7b8570){if(_0x7b8570[_0xec68('0x41')]!==_0xec68('0x42')){var _0x5a4d56={};_0x5a4d56[_0x7b8570[_0xec68('0x2b')]]={'$like':'%'+_0x22cecc[_0xec68('0x32')][_0xec68('0x3f')]+'%'};return _0x5a4d56;}})});}_0x2e2456=_[_0xec68('0x40')]({},_0x2e2456,_0x22cecc[_0xec68('0x43')]);var _0x3e966f={'where':_0x2e2456[_0xec68('0x3d')]};return db[_0xec68('0x44')][_0xec68('0x23')](_0x3e966f)[_0xec68('0x29')](function(_0x4ecd0a){_0x2666a1[_0xec68('0x23')]=_0x4ecd0a;if(_0x22cecc[_0xec68('0x32')][_0xec68('0x45')]){_0x2e2456['include']=[{'all':!![]}];}return db[_0xec68('0x44')][_0xec68('0x46')](_0x2e2456);})[_0xec68('0x29')](function(_0x14a196){_0x2666a1[_0xec68('0x47')]=_0x14a196;return _0x2666a1;})[_0xec68('0x29')](respondWithFilteredResult(_0x45866d,_0x2e2456))[_0xec68('0x48')](handleError(_0x45866d,null));};exports[_0xec68('0x49')]=function(_0x17fe5c,_0x12de20){var _0x2f812e={'raw':!![],'where':{'id':_0x17fe5c[_0xec68('0x4a')]['id']}},_0x998de4={};_0x998de4[_0xec68('0x35')]=_[_0xec68('0x4b')](db[_0xec68('0x44')]['rawAttributes']);_0x998de4[_0xec68('0x32')]=_['keys'](_0x17fe5c[_0xec68('0x32')]);_0x998de4[_0xec68('0x33')]=_[_0xec68('0x34')](_0x998de4[_0xec68('0x35')],_0x998de4[_0xec68('0x32')]);_0x2f812e['attributes']=_[_0xec68('0x34')](_0x998de4[_0xec68('0x35')],qs[_0xec68('0x37')](_0x17fe5c[_0xec68('0x32')][_0xec68('0x37')]));_0x2f812e[_0xec68('0x36')]=_0x2f812e[_0xec68('0x36')][_0xec68('0x38')]?_0x2f812e[_0xec68('0x36')]:_0x998de4['model'];if(_0x17fe5c[_0xec68('0x32')][_0xec68('0x45')]){_0x2f812e['include']=[{'all':!![]}];}_0x2f812e=_['merge']({},_0x2f812e,_0x17fe5c[_0xec68('0x43')]);return db['MailTransferReport'][_0xec68('0x4c')](_0x2f812e)[_0xec68('0x29')](handleEntityNotFound(_0x12de20,null))[_0xec68('0x29')](respondWithResult(_0x12de20,null))[_0xec68('0x48')](handleError(_0x12de20,null));};exports[_0xec68('0x4d')]=function(_0x4844a2,_0x3a9045){return db[_0xec68('0x44')]['create'](_0x4844a2[_0xec68('0x4e')],{})[_0xec68('0x29')](respondWithResult(_0x3a9045,0xc9))['catch'](handleError(_0x3a9045,null));};exports[_0xec68('0x4f')]=function(_0x292d4c,_0x9b16cc){if(_0x292d4c[_0xec68('0x4e')]['id']){delete _0x292d4c[_0xec68('0x4e')]['id'];}return db[_0xec68('0x44')]['find']({'where':{'id':_0x292d4c['params']['id']}})[_0xec68('0x29')](handleEntityNotFound(_0x9b16cc,null))[_0xec68('0x29')](saveUpdates(_0x292d4c[_0xec68('0x4e')],null))['then'](respondWithResult(_0x9b16cc,null))[_0xec68('0x48')](handleError(_0x9b16cc,null));};exports[_0xec68('0x50')]=function(_0x5f1b82,_0x5bdded){return db[_0xec68('0x44')][_0xec68('0x4c')]({'where':{'id':_0x5f1b82[_0xec68('0x4a')]['id']}})['then'](handleEntityNotFound(_0x5bdded,null))[_0xec68('0x29')](removeEntity(_0x5bdded,null))['catch'](handleError(_0x5bdded,null));};exports[_0xec68('0x51')]=function(_0x21ea2c,_0x5770f3){return db[_0xec68('0x44')]['describe']()[_0xec68('0x29')](respondWithResult(_0x5770f3,null))['catch'](handleError(_0x5770f3,null));}; \ No newline at end of file diff --git a/server/api/mailTransferReport/mailTransferReport.model.js b/server/api/mailTransferReport/mailTransferReport.model.js index 3cc9ca9..e0f2536 100644 --- a/server/api/mailTransferReport/mailTransferReport.model.js +++ b/server/api/mailTransferReport/mailTransferReport.model.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x04de=['api','moment','bluebird','request-promise','path','rimraf','../../config/environment','./mailTransferReport.attributes','MailTransferReport','report_mail_transfer','uniqueid','lodash','util','../../config/logger'];(function(_0x543084,_0x4337f5){var _0x306a57=function(_0x2769ed){while(--_0x2769ed){_0x543084['push'](_0x543084['shift']());}};_0x306a57(++_0x4337f5);}(_0x04de,0x107));var _0xe04d=function(_0x1a1809,_0x4dd954){_0x1a1809=_0x1a1809-0x0;var _0x8e4860=_0x04de[_0x1a1809];return _0x8e4860;};'use strict';var _=require(_0xe04d('0x0'));var util=require(_0xe04d('0x1'));var logger=require(_0xe04d('0x2'))(_0xe04d('0x3'));var moment=require(_0xe04d('0x4'));var BPromise=require(_0xe04d('0x5'));var rp=require(_0xe04d('0x6'));var fs=require('fs');var path=require(_0xe04d('0x7'));var rimraf=require(_0xe04d('0x8'));var config=require(_0xe04d('0x9'));var attributes=require(_0xe04d('0xa'));module['exports']=function(_0x4bb925,_0x4f7637){return _0x4bb925['define'](_0xe04d('0xb'),attributes,{'tableName':_0xe04d('0xc'),'paranoid':![],'indexes':[{'name':_0xe04d('0xd'),'fields':[_0xe04d('0xd')]}],'timestamps':!![]});}; \ No newline at end of file +var _0xb13b=['api','moment','request-promise','path','../../config/environment','./mailTransferReport.attributes','exports','define','MailTransferReport','report_mail_transfer','lodash','util','../../config/logger'];(function(_0x24b073,_0x428400){var _0x149618=function(_0x2cd0d8){while(--_0x2cd0d8){_0x24b073['push'](_0x24b073['shift']());}};_0x149618(++_0x428400);}(_0xb13b,0x1de));var _0xbb13=function(_0x1203f,_0x554bbc){_0x1203f=_0x1203f-0x0;var _0x365f0a=_0xb13b[_0x1203f];return _0x365f0a;};'use strict';var _=require(_0xbb13('0x0'));var util=require(_0xbb13('0x1'));var logger=require(_0xbb13('0x2'))(_0xbb13('0x3'));var moment=require(_0xbb13('0x4'));var BPromise=require('bluebird');var rp=require(_0xbb13('0x5'));var fs=require('fs');var path=require(_0xbb13('0x6'));var rimraf=require('rimraf');var config=require(_0xbb13('0x7'));var attributes=require(_0xbb13('0x8'));module[_0xbb13('0x9')]=function(_0x464c50,_0x296632){return _0x464c50[_0xbb13('0xa')](_0xbb13('0xb'),attributes,{'tableName':_0xbb13('0xc'),'paranoid':![],'indexes':[{'name':'uniqueid','fields':['uniqueid']}],'timestamps':!![]});}; \ No newline at end of file diff --git a/server/api/mailTransferReport/mailTransferReport.rpc.js b/server/api/mailTransferReport/mailTransferReport.rpc.js index 05b63eb..984cc82 100644 --- a/server/api/mailTransferReport/mailTransferReport.rpc.js +++ b/server/api/mailTransferReport/mailTransferReport.rpc.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x3d19=['message','result','catch','lodash','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','../../config/environment','jayson/promise','client','http','request','then','info','MailTransferReport,\x20%s,\x20%s','request\x20sent','debug','MailTransferReport,\x20%s,\x20%s,\x20%s','stringify','error'];(function(_0x513047,_0x2199c5){var _0x15b779=function(_0x412fd5){while(--_0x412fd5){_0x513047['push'](_0x513047['shift']());}};_0x15b779(++_0x2199c5);}(_0x3d19,0x161));var _0x93d1=function(_0x397cfb,_0xb8f317){_0x397cfb=_0x397cfb-0x0;var _0x15fed9=_0x3d19[_0x397cfb];return _0x15fed9;};'use strict';var _=require(_0x93d1('0x0'));var util=require(_0x93d1('0x1'));var moment=require(_0x93d1('0x2'));var BPromise=require(_0x93d1('0x3'));var rs=require(_0x93d1('0x4'));var fs=require('fs');var Redis=require(_0x93d1('0x5'));var db=require(_0x93d1('0x6'))['db'];var utils=require(_0x93d1('0x7'));var logger=require(_0x93d1('0x8'))('rpc');var config=require(_0x93d1('0x9'));var jayson=require(_0x93d1('0xa'));var client=jayson[_0x93d1('0xb')][_0x93d1('0xc')]({'port':0x232a});function respondWithRpcPromise(_0x5848ec,_0x151d08,_0x1adaa6){return new BPromise(function(_0x217bd6,_0x137948){return client[_0x93d1('0xd')](_0x5848ec,_0x1adaa6)[_0x93d1('0xe')](function(_0x2f04d7){logger[_0x93d1('0xf')](_0x93d1('0x10'),_0x151d08,_0x93d1('0x11'));logger[_0x93d1('0x12')](_0x93d1('0x13'),_0x151d08,'request\x20sent',JSON[_0x93d1('0x14')](_0x2f04d7));if(_0x2f04d7['error']){if(_0x2f04d7[_0x93d1('0x15')]['code']===0x1f4){logger[_0x93d1('0x15')]('MailTransferReport,\x20%s,\x20%s',_0x151d08,_0x2f04d7[_0x93d1('0x15')][_0x93d1('0x16')]);return _0x137948(_0x2f04d7[_0x93d1('0x15')]['message']);}logger[_0x93d1('0x15')]('MailTransferReport,\x20%s,\x20%s',_0x151d08,_0x2f04d7[_0x93d1('0x15')][_0x93d1('0x16')]);return _0x217bd6(_0x2f04d7[_0x93d1('0x15')][_0x93d1('0x16')]);}else{logger['info'](_0x93d1('0x10'),_0x151d08,_0x93d1('0x11'));_0x217bd6(_0x2f04d7[_0x93d1('0x17')][_0x93d1('0x16')]);}})[_0x93d1('0x18')](function(_0x19e034){logger[_0x93d1('0x15')]('MailTransferReport,\x20%s,\x20%s',_0x151d08,_0x19e034);_0x137948(_0x19e034);});});} \ No newline at end of file +var _0xafb7=['then','MailTransferReport,\x20%s,\x20%s','request\x20sent','debug','MailTransferReport,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','catch','lodash','util','randomstring','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','request'];(function(_0x2e6bab,_0x208883){var _0x2ad467=function(_0x1e7bc0){while(--_0x1e7bc0){_0x2e6bab['push'](_0x2e6bab['shift']());}};_0x2ad467(++_0x208883);}(_0xafb7,0x19a));var _0x7afb=function(_0x1a8d4e,_0x259dcc){_0x1a8d4e=_0x1a8d4e-0x0;var _0x541bd5=_0xafb7[_0x1a8d4e];return _0x541bd5;};'use strict';var _=require(_0x7afb('0x0'));var util=require(_0x7afb('0x1'));var moment=require('moment');var BPromise=require('bluebird');var rs=require(_0x7afb('0x2'));var fs=require('fs');var Redis=require('ioredis');var db=require('../../mysqldb')['db'];var utils=require(_0x7afb('0x3'));var logger=require(_0x7afb('0x4'))(_0x7afb('0x5'));var config=require(_0x7afb('0x6'));var jayson=require(_0x7afb('0x7'));var client=jayson[_0x7afb('0x8')]['http']({'port':0x232a});function respondWithRpcPromise(_0x18e484,_0x5c2328,_0x1e8094){return new BPromise(function(_0x36ec3,_0x46f1b0){return client[_0x7afb('0x9')](_0x18e484,_0x1e8094)[_0x7afb('0xa')](function(_0x801e9e){logger['info'](_0x7afb('0xb'),_0x5c2328,_0x7afb('0xc'));logger[_0x7afb('0xd')](_0x7afb('0xe'),_0x5c2328,'request\x20sent',JSON[_0x7afb('0xf')](_0x801e9e));if(_0x801e9e[_0x7afb('0x10')]){if(_0x801e9e['error'][_0x7afb('0x11')]===0x1f4){logger['error'](_0x7afb('0xb'),_0x5c2328,_0x801e9e[_0x7afb('0x10')][_0x7afb('0x12')]);return _0x46f1b0(_0x801e9e['error'][_0x7afb('0x12')]);}logger[_0x7afb('0x10')](_0x7afb('0xb'),_0x5c2328,_0x801e9e[_0x7afb('0x10')][_0x7afb('0x12')]);return _0x36ec3(_0x801e9e[_0x7afb('0x10')]['message']);}else{logger['info'](_0x7afb('0xb'),_0x5c2328,_0x7afb('0xc'));_0x36ec3(_0x801e9e[_0x7afb('0x13')]['message']);}})[_0x7afb('0x14')](function(_0x1f9019){logger[_0x7afb('0x10')](_0x7afb('0xb'),_0x5c2328,_0x1f9019);_0x46f1b0(_0x1f9019);});});} \ No newline at end of file diff --git a/server/api/memberReport/index.js b/server/api/memberReport/index.js index a8b7fe6..f81db90 100644 --- a/server/api/memberReport/index.js +++ b/server/api/memberReport/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x00df=['destroy','exports','multer','util','path','connect-timeout','express','Router','../../components/interaction/service','../../config/environment','./memberReport.controller','get','isAuthenticated','/describe','describe','/:id','show','post','create','put','update','delete'];(function(_0x618414,_0x1a7a60){var _0x21c19a=function(_0x507b17){while(--_0x507b17){_0x618414['push'](_0x618414['shift']());}};_0x21c19a(++_0x1a7a60);}(_0x00df,0x86));var _0xf00d=function(_0x5b4fff,_0x3840c1){_0x5b4fff=_0x5b4fff-0x0;var _0x1802da=_0x00df[_0x5b4fff];return _0x1802da;};'use strict';var multer=require(_0xf00d('0x0'));var util=require(_0xf00d('0x1'));var path=require(_0xf00d('0x2'));var timeout=require(_0xf00d('0x3'));var express=require(_0xf00d('0x4'));var router=express[_0xf00d('0x5')]();var fs_extra=require('fs-extra');var auth=require('../../components/auth/service');var interaction=require(_0xf00d('0x6'));var config=require(_0xf00d('0x7'));var controller=require(_0xf00d('0x8'));router[_0xf00d('0x9')]('/',auth[_0xf00d('0xa')](),controller['index']);router[_0xf00d('0x9')](_0xf00d('0xb'),auth[_0xf00d('0xa')](),controller[_0xf00d('0xc')]);router['get'](_0xf00d('0xd'),auth['isAuthenticated'](),controller[_0xf00d('0xe')]);router[_0xf00d('0xf')]('/',auth[_0xf00d('0xa')](),controller[_0xf00d('0x10')]);router[_0xf00d('0x11')]('/:id',auth['isAuthenticated'](),controller[_0xf00d('0x12')]);router[_0xf00d('0x13')](_0xf00d('0xd'),auth[_0xf00d('0xa')](),controller[_0xf00d('0x14')]);module[_0xf00d('0x15')]=router; \ No newline at end of file +var _0x2634=['../../components/interaction/service','../../config/environment','get','isAuthenticated','index','show','post','create','/:id','update','delete','destroy','path','express','Router','fs-extra','../../components/auth/service'];(function(_0x3ab9ee,_0x4a74b8){var _0x82ee88=function(_0x6ccc7e){while(--_0x6ccc7e){_0x3ab9ee['push'](_0x3ab9ee['shift']());}};_0x82ee88(++_0x4a74b8);}(_0x2634,0xd8));var _0x4263=function(_0x14add3,_0x13ce8d){_0x14add3=_0x14add3-0x0;var _0x4a174f=_0x2634[_0x14add3];return _0x4a174f;};'use strict';var multer=require('multer');var util=require('util');var path=require(_0x4263('0x0'));var timeout=require('connect-timeout');var express=require(_0x4263('0x1'));var router=express[_0x4263('0x2')]();var fs_extra=require(_0x4263('0x3'));var auth=require(_0x4263('0x4'));var interaction=require(_0x4263('0x5'));var config=require(_0x4263('0x6'));var controller=require('./memberReport.controller');router[_0x4263('0x7')]('/',auth[_0x4263('0x8')](),controller[_0x4263('0x9')]);router['get']('/describe',auth[_0x4263('0x8')](),controller['describe']);router[_0x4263('0x7')]('/:id',auth['isAuthenticated'](),controller[_0x4263('0xa')]);router[_0x4263('0xb')]('/',auth['isAuthenticated'](),controller[_0x4263('0xc')]);router['put'](_0x4263('0xd'),auth[_0x4263('0x8')](),controller[_0x4263('0xe')]);router[_0x4263('0xf')]('/:id',auth[_0x4263('0x8')](),controller[_0x4263('0x10')]);module['exports']=router; \ No newline at end of file diff --git a/server/api/memberReport/memberReport.attributes.js b/server/api/memberReport/memberReport.attributes.js index cfd9b9f..23247b1 100644 --- a/server/api/memberReport/memberReport.attributes.js +++ b/server/api/memberReport/memberReport.attributes.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xe244=['enterAt','diff','seconds','setDataValue','exitAt','talk:[inbound,\x20outbound],\x20pause:[reason]','talk:[start]','talk:[dial\x20string]','talk:[queue]','moment','exports','STRING','DEFAULT\x20PAUSE','LOGIN,\x20PAUSE,\x20TALKING','INTEGER','DATE','getDataValue'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0xe244,0x16e));var _0x4e24=function(_0x397e5f,_0x454c8f){_0x397e5f=_0x397e5f-0x0;var _0x5302b8=_0xe244[_0x397e5f];return _0x5302b8;};'use strict';var Sequelize=require('sequelize');var moment=require(_0x4e24('0x0'));module[_0x4e24('0x1')]={'channel':{'type':Sequelize[_0x4e24('0x2')]},'membername':{'type':Sequelize[_0x4e24('0x2')]},'interface':{'type':Sequelize[_0x4e24('0x2')]},'type':{'type':Sequelize['STRING'],'defaultValue':_0x4e24('0x3'),'comment':_0x4e24('0x4')},'duration':{'type':Sequelize[_0x4e24('0x5')]},'enterAt':{'type':Sequelize[_0x4e24('0x6')]},'exitAt':{'type':Sequelize['DATE'],'set':function(_0x3377c8){var _0x4931d1=moment(_0x3377c8);var _0x3172b0=moment(this[_0x4e24('0x7')](_0x4e24('0x8')));var _0x3f59d7=_0x4931d1[_0x4e24('0x9')](_0x3172b0,_0x4e24('0xa'));this[_0x4e24('0xb')](_0x4e24('0xc'),_0x3377c8);this[_0x4e24('0xb')]('duration',_0x3f59d7>=0x0?_0x3f59d7:null);}},'data1':{'type':Sequelize[_0x4e24('0x2')],'comment':_0x4e24('0xd')},'data2':{'type':Sequelize['STRING'],'comment':_0x4e24('0xe')},'data3':{'type':Sequelize[_0x4e24('0x2')],'comment':'talk:[destination]'},'data4':{'type':Sequelize[_0x4e24('0x2')],'comment':_0x4e24('0xf')},'data5':{'type':Sequelize[_0x4e24('0x2')],'comment':_0x4e24('0x10')},'role':{'type':Sequelize[_0x4e24('0x2')]},'internal':{'type':Sequelize[_0x4e24('0x5')]},'uniqueid':{'type':Sequelize[_0x4e24('0x2')]}}; \ No newline at end of file +var _0x0618=['INTEGER','DATE','getDataValue','diff','seconds','setDataValue','exitAt','talk:[inbound,\x20outbound],\x20pause:[reason]','talk:[queue]','sequelize','STRING','DEFAULT\x20PAUSE','LOGIN,\x20PAUSE,\x20TALKING'];(function(_0xec034,_0x16c358){var _0x2c5a19=function(_0xec401c){while(--_0xec401c){_0xec034['push'](_0xec034['shift']());}};_0x2c5a19(++_0x16c358);}(_0x0618,0x64));var _0x8061=function(_0x340d9f,_0x26c7b1){_0x340d9f=_0x340d9f-0x0;var _0x33bc66=_0x0618[_0x340d9f];return _0x33bc66;};'use strict';var Sequelize=require(_0x8061('0x0'));var moment=require('moment');module['exports']={'channel':{'type':Sequelize[_0x8061('0x1')]},'membername':{'type':Sequelize['STRING']},'interface':{'type':Sequelize['STRING']},'type':{'type':Sequelize[_0x8061('0x1')],'defaultValue':_0x8061('0x2'),'comment':_0x8061('0x3')},'duration':{'type':Sequelize[_0x8061('0x4')]},'enterAt':{'type':Sequelize[_0x8061('0x5')]},'exitAt':{'type':Sequelize[_0x8061('0x5')],'set':function(_0x346075){var _0x4e0211=moment(_0x346075);var _0x27c61f=moment(this[_0x8061('0x6')]('enterAt'));var _0x58b92c=_0x4e0211[_0x8061('0x7')](_0x27c61f,_0x8061('0x8'));this[_0x8061('0x9')](_0x8061('0xa'),_0x346075);this[_0x8061('0x9')]('duration',_0x58b92c>=0x0?_0x58b92c:null);}},'data1':{'type':Sequelize[_0x8061('0x1')],'comment':_0x8061('0xb')},'data2':{'type':Sequelize[_0x8061('0x1')],'comment':'talk:[start]'},'data3':{'type':Sequelize[_0x8061('0x1')],'comment':'talk:[destination]'},'data4':{'type':Sequelize[_0x8061('0x1')],'comment':'talk:[dial\x20string]'},'data5':{'type':Sequelize[_0x8061('0x1')],'comment':_0x8061('0xc')},'role':{'type':Sequelize[_0x8061('0x1')]},'internal':{'type':Sequelize[_0x8061('0x4')]},'uniqueid':{'type':Sequelize[_0x8061('0x1')]}}; \ No newline at end of file diff --git a/server/api/memberReport/memberReport.controller.js b/server/api/memberReport/memberReport.controller.js index bd09b5b..629e19f 100644 --- a/server/api/memberReport/memberReport.controller.js +++ b/server/api/memberReport/memberReport.controller.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x34e8=['path','sox','to-csv','fs-extra','squel','crypto','jsforce','desk.js','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../config/license/util','sendStatus','status','end','undefined','limit','count','offset','set','Content-Range','json','apply','reject','save','update','then','destroy','error','stack','name','map','MemberReport','rawAttributes','fieldName','type','key','model','query','filters','intersection','attributes','fields','length','hasOwnProperty','sort','where','pick','filter','merge','options','includeAll','catch','show','params','keys','include','find','create','body','describe','eml-format','rimraf','zip-dir','fast-json-patch','moment','bluebird','mustache','util'];(function(_0x40bffc,_0x3a45d7){var _0x3007e9=function(_0x4c8fda){while(--_0x4c8fda){_0x40bffc['push'](_0x40bffc['shift']());}};_0x3007e9(++_0x3a45d7);}(_0x34e8,0x12c));var _0x834e=function(_0x3bdd35,_0x89103d){_0x3bdd35=_0x3bdd35-0x0;var _0x2b3034=_0x34e8[_0x3bdd35];return _0x2b3034;};'use strict';var emlformat=require(_0x834e('0x0'));var rimraf=require(_0x834e('0x1'));var zipdir=require(_0x834e('0x2'));var jsonpatch=require(_0x834e('0x3'));var rp=require('request-promise');var moment=require(_0x834e('0x4'));var BPromise=require(_0x834e('0x5'));var Mustache=require(_0x834e('0x6'));var util=require(_0x834e('0x7'));var path=require(_0x834e('0x8'));var sox=require(_0x834e('0x9'));var csv=require(_0x834e('0xa'));var ejs=require('ejs');var fs=require('fs');var fs_extra=require(_0x834e('0xb'));var _=require('lodash');var squel=require(_0x834e('0xc'));var crypto=require(_0x834e('0xd'));var jsforce=require(_0x834e('0xe'));var deskjs=require(_0x834e('0xf'));var toCsv=require(_0x834e('0xa'));var querystring=require(_0x834e('0x10'));var Papa=require(_0x834e('0x11'));var Redis=require(_0x834e('0x12'));var authService=require(_0x834e('0x13'));var qs=require(_0x834e('0x14'));var as=require(_0x834e('0x15'));var hardwareService=require(_0x834e('0x16'));var logger=require(_0x834e('0x17'))(_0x834e('0x18'));var utils=require(_0x834e('0x19'));var config=require(_0x834e('0x1a'));var licenseUtil=require(_0x834e('0x1b'));var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0x5e5b6d,_0x6cd9b9){_0x6cd9b9=_0x6cd9b9||0xcc;return function(_0x58a27e){if(_0x58a27e){return _0x5e5b6d[_0x834e('0x1c')](_0x6cd9b9);}return _0x5e5b6d[_0x834e('0x1d')](_0x6cd9b9)[_0x834e('0x1e')]();};}function respondWithResult(_0x21cc0a,_0x50e860){_0x50e860=_0x50e860||0xc8;return function(_0x43156c){if(_0x43156c){return _0x21cc0a[_0x834e('0x1d')](_0x50e860)['json'](_0x43156c);}};}function respondWithFilteredResult(_0x316205,_0x4a9cdc){return function(_0x38a8cd){if(_0x38a8cd){var _0x36d443=typeof _0x4a9cdc['offset']===_0x834e('0x1f')&&typeof _0x4a9cdc[_0x834e('0x20')]===_0x834e('0x1f');var _0x50b3f6=_0x38a8cd[_0x834e('0x21')];var _0x211e9a=_0x36d443?0x0:_0x4a9cdc[_0x834e('0x22')];var _0xb993a1=_0x36d443?_0x38a8cd[_0x834e('0x21')]:_0x4a9cdc[_0x834e('0x22')]+_0x4a9cdc[_0x834e('0x20')];var _0x595515;if(_0xb993a1>=_0x50b3f6){_0xb993a1=_0x50b3f6;_0x595515=0xc8;}else{_0x595515=0xce;}_0x316205[_0x834e('0x1d')](_0x595515);return _0x316205[_0x834e('0x23')](_0x834e('0x24'),_0x211e9a+'-'+_0xb993a1+'/'+_0x50b3f6)[_0x834e('0x25')](_0x38a8cd);}return null;};}function patchUpdates(_0x4ab05d){return function(_0x45a630){try{jsonpatch[_0x834e('0x26')](_0x45a630,_0x4ab05d,!![]);}catch(_0x5a05c0){return BPromise[_0x834e('0x27')](_0x5a05c0);}return _0x45a630[_0x834e('0x28')]();};}function saveUpdates(_0x8d406e,_0x5c55ca){return function(_0x4e3f48){if(_0x4e3f48){return _0x4e3f48[_0x834e('0x29')](_0x8d406e)[_0x834e('0x2a')](function(_0x589dde){return _0x589dde;});}return null;};}function removeEntity(_0x25ee1d,_0x1dc1e0){return function(_0x58f4fd){if(_0x58f4fd){return _0x58f4fd[_0x834e('0x2b')]()[_0x834e('0x2a')](function(){_0x25ee1d[_0x834e('0x1d')](0xcc)['end']();});}};}function handleEntityNotFound(_0x24fcf7,_0x3e310f){return function(_0x5e1cc5){if(!_0x5e1cc5){_0x24fcf7['sendStatus'](0x194);}return _0x5e1cc5;};}function handleError(_0x1e713a,_0x508a1d){_0x508a1d=_0x508a1d||0x1f4;return function(_0x2826ec){logger[_0x834e('0x2c')](_0x2826ec[_0x834e('0x2d')]);if(_0x2826ec[_0x834e('0x2e')]){delete _0x2826ec[_0x834e('0x2e')];}_0x1e713a[_0x834e('0x1d')](_0x508a1d)['send'](_0x2826ec);};}exports['index']=function(_0x4dc64a,_0x58c1d7){var _0x2c7a8d={},_0x567cea={},_0x106d6a={'count':0x0,'rows':[]};var _0x5dacc1=_[_0x834e('0x2f')](db[_0x834e('0x30')][_0x834e('0x31')],function(_0x1e026a){return{'name':_0x1e026a[_0x834e('0x32')],'type':_0x1e026a[_0x834e('0x33')][_0x834e('0x34')]};});_0x567cea[_0x834e('0x35')]=_[_0x834e('0x2f')](_0x5dacc1,'name');_0x567cea[_0x834e('0x36')]=_['keys'](_0x4dc64a[_0x834e('0x36')]);_0x567cea[_0x834e('0x37')]=_[_0x834e('0x38')](_0x567cea[_0x834e('0x35')],_0x567cea[_0x834e('0x36')]);_0x2c7a8d[_0x834e('0x39')]=_[_0x834e('0x38')](_0x567cea[_0x834e('0x35')],qs[_0x834e('0x3a')](_0x4dc64a[_0x834e('0x36')]['fields']));_0x2c7a8d[_0x834e('0x39')]=_0x2c7a8d[_0x834e('0x39')][_0x834e('0x3b')]?_0x2c7a8d[_0x834e('0x39')]:_0x567cea['model'];if(!_0x4dc64a[_0x834e('0x36')][_0x834e('0x3c')]('nolimit')){_0x2c7a8d['limit']=qs['limit'](_0x4dc64a[_0x834e('0x36')][_0x834e('0x20')]);_0x2c7a8d[_0x834e('0x22')]=qs[_0x834e('0x22')](_0x4dc64a[_0x834e('0x36')][_0x834e('0x22')]);}_0x2c7a8d['order']=qs[_0x834e('0x3d')](_0x4dc64a['query'][_0x834e('0x3d')]);_0x2c7a8d[_0x834e('0x3e')]=qs['filters'](_[_0x834e('0x3f')](_0x4dc64a[_0x834e('0x36')],_0x567cea['filters']),_0x5dacc1);if(_0x4dc64a['query'][_0x834e('0x40')]){_0x2c7a8d[_0x834e('0x3e')]=_[_0x834e('0x41')](_0x2c7a8d[_0x834e('0x3e')],{'$or':_[_0x834e('0x2f')](_0x5dacc1,function(_0x4ca43c){if(_0x4ca43c[_0x834e('0x33')]!=='VIRTUAL'){var _0x50c243={};_0x50c243[_0x4ca43c[_0x834e('0x2e')]]={'$like':'%'+_0x4dc64a['query'][_0x834e('0x40')]+'%'};return _0x50c243;}})});}_0x2c7a8d=_[_0x834e('0x41')]({},_0x2c7a8d,_0x4dc64a[_0x834e('0x42')]);var _0x3c59af={'where':_0x2c7a8d[_0x834e('0x3e')]};return db['MemberReport'][_0x834e('0x21')](_0x3c59af)[_0x834e('0x2a')](function(_0x38f266){_0x106d6a['count']=_0x38f266;if(_0x4dc64a[_0x834e('0x36')][_0x834e('0x43')]){_0x2c7a8d['include']=[{'all':!![]}];}return db[_0x834e('0x30')]['findAll'](_0x2c7a8d);})[_0x834e('0x2a')](function(_0x585335){_0x106d6a['rows']=_0x585335;return _0x106d6a;})['then'](respondWithFilteredResult(_0x58c1d7,_0x2c7a8d))[_0x834e('0x44')](handleError(_0x58c1d7,null));};exports[_0x834e('0x45')]=function(_0x3bcbf4,_0xbc1571){var _0x8ad264={'raw':!![],'where':{'id':_0x3bcbf4[_0x834e('0x46')]['id']}},_0x23feea={};_0x23feea['model']=_[_0x834e('0x47')](db['MemberReport'][_0x834e('0x31')]);_0x23feea['query']=_[_0x834e('0x47')](_0x3bcbf4['query']);_0x23feea[_0x834e('0x37')]=_[_0x834e('0x38')](_0x23feea['model'],_0x23feea[_0x834e('0x36')]);_0x8ad264[_0x834e('0x39')]=_[_0x834e('0x38')](_0x23feea[_0x834e('0x35')],qs[_0x834e('0x3a')](_0x3bcbf4[_0x834e('0x36')][_0x834e('0x3a')]));_0x8ad264[_0x834e('0x39')]=_0x8ad264[_0x834e('0x39')][_0x834e('0x3b')]?_0x8ad264['attributes']:_0x23feea[_0x834e('0x35')];if(_0x3bcbf4[_0x834e('0x36')]['includeAll']){_0x8ad264[_0x834e('0x48')]=[{'all':!![]}];}_0x8ad264=_[_0x834e('0x41')]({},_0x8ad264,_0x3bcbf4[_0x834e('0x42')]);return db[_0x834e('0x30')][_0x834e('0x49')](_0x8ad264)[_0x834e('0x2a')](handleEntityNotFound(_0xbc1571,null))['then'](respondWithResult(_0xbc1571,null))['catch'](handleError(_0xbc1571,null));};exports[_0x834e('0x4a')]=function(_0x1a5444,_0x30568e){return db[_0x834e('0x30')][_0x834e('0x4a')](_0x1a5444[_0x834e('0x4b')],{})[_0x834e('0x2a')](respondWithResult(_0x30568e,0xc9))[_0x834e('0x44')](handleError(_0x30568e,null));};exports[_0x834e('0x29')]=function(_0x390c45,_0xf02f0d){if(_0x390c45[_0x834e('0x4b')]['id']){delete _0x390c45[_0x834e('0x4b')]['id'];}return db[_0x834e('0x30')][_0x834e('0x49')]({'where':{'id':_0x390c45[_0x834e('0x46')]['id']}})[_0x834e('0x2a')](handleEntityNotFound(_0xf02f0d,null))[_0x834e('0x2a')](saveUpdates(_0x390c45[_0x834e('0x4b')],null))[_0x834e('0x2a')](respondWithResult(_0xf02f0d,null))['catch'](handleError(_0xf02f0d,null));};exports[_0x834e('0x2b')]=function(_0x1f08b9,_0x4e73e0){return db[_0x834e('0x30')][_0x834e('0x49')]({'where':{'id':_0x1f08b9['params']['id']}})[_0x834e('0x2a')](handleEntityNotFound(_0x4e73e0,null))[_0x834e('0x2a')](removeEntity(_0x4e73e0,null))[_0x834e('0x44')](handleError(_0x4e73e0,null));};exports[_0x834e('0x4c')]=function(_0x4288e4,_0xb77aab){return db[_0x834e('0x30')]['describe']()[_0x834e('0x2a')](respondWithResult(_0xb77aab,null))[_0x834e('0x44')](handleError(_0xb77aab,null));}; \ No newline at end of file +var _0x34e8=['path','sox','to-csv','fs-extra','squel','crypto','jsforce','desk.js','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../config/license/util','sendStatus','status','end','undefined','limit','count','offset','set','Content-Range','json','apply','reject','save','update','then','destroy','error','stack','name','map','MemberReport','rawAttributes','fieldName','type','key','model','query','filters','intersection','attributes','fields','length','hasOwnProperty','sort','where','pick','filter','merge','options','includeAll','catch','show','params','keys','include','find','create','body','describe','eml-format','rimraf','zip-dir','fast-json-patch','moment','bluebird','mustache','util'];(function(_0x2cf2e9,_0xd58ea1){var _0xd3670d=function(_0x272868){while(--_0x272868){_0x2cf2e9['push'](_0x2cf2e9['shift']());}};_0xd3670d(++_0xd58ea1);}(_0x34e8,0x12c));var _0x834e=function(_0x4fc085,_0x1df493){_0x4fc085=_0x4fc085-0x0;var _0x22d539=_0x34e8[_0x4fc085];return _0x22d539;};'use strict';var emlformat=require(_0x834e('0x0'));var rimraf=require(_0x834e('0x1'));var zipdir=require(_0x834e('0x2'));var jsonpatch=require(_0x834e('0x3'));var rp=require('request-promise');var moment=require(_0x834e('0x4'));var BPromise=require(_0x834e('0x5'));var Mustache=require(_0x834e('0x6'));var util=require(_0x834e('0x7'));var path=require(_0x834e('0x8'));var sox=require(_0x834e('0x9'));var csv=require(_0x834e('0xa'));var ejs=require('ejs');var fs=require('fs');var fs_extra=require(_0x834e('0xb'));var _=require('lodash');var squel=require(_0x834e('0xc'));var crypto=require(_0x834e('0xd'));var jsforce=require(_0x834e('0xe'));var deskjs=require(_0x834e('0xf'));var toCsv=require(_0x834e('0xa'));var querystring=require(_0x834e('0x10'));var Papa=require(_0x834e('0x11'));var Redis=require(_0x834e('0x12'));var authService=require(_0x834e('0x13'));var qs=require(_0x834e('0x14'));var as=require(_0x834e('0x15'));var hardwareService=require(_0x834e('0x16'));var logger=require(_0x834e('0x17'))(_0x834e('0x18'));var utils=require(_0x834e('0x19'));var config=require(_0x834e('0x1a'));var licenseUtil=require(_0x834e('0x1b'));var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0x5e5b6d,_0x6cd9b9){_0x6cd9b9=_0x6cd9b9||0xcc;return function(_0x58a27e){if(_0x58a27e){return _0x5e5b6d[_0x834e('0x1c')](_0x6cd9b9);}return _0x5e5b6d[_0x834e('0x1d')](_0x6cd9b9)[_0x834e('0x1e')]();};}function respondWithResult(_0x21cc0a,_0x50e860){_0x50e860=_0x50e860||0xc8;return function(_0x43156c){if(_0x43156c){return _0x21cc0a[_0x834e('0x1d')](_0x50e860)['json'](_0x43156c);}};}function respondWithFilteredResult(_0x316205,_0x4a9cdc){return function(_0x38a8cd){if(_0x38a8cd){var _0x36d443=typeof _0x4a9cdc['offset']===_0x834e('0x1f')&&typeof _0x4a9cdc[_0x834e('0x20')]===_0x834e('0x1f');var _0x50b3f6=_0x38a8cd[_0x834e('0x21')];var _0x211e9a=_0x36d443?0x0:_0x4a9cdc[_0x834e('0x22')];var _0xb993a1=_0x36d443?_0x38a8cd[_0x834e('0x21')]:_0x4a9cdc[_0x834e('0x22')]+_0x4a9cdc[_0x834e('0x20')];var _0x595515;if(_0xb993a1>=_0x50b3f6){_0xb993a1=_0x50b3f6;_0x595515=0xc8;}else{_0x595515=0xce;}_0x316205[_0x834e('0x1d')](_0x595515);return _0x316205[_0x834e('0x23')](_0x834e('0x24'),_0x211e9a+'-'+_0xb993a1+'/'+_0x50b3f6)[_0x834e('0x25')](_0x38a8cd);}return null;};}function patchUpdates(_0x4ab05d){return function(_0x45a630){try{jsonpatch[_0x834e('0x26')](_0x45a630,_0x4ab05d,!![]);}catch(_0x5a05c0){return BPromise[_0x834e('0x27')](_0x5a05c0);}return _0x45a630[_0x834e('0x28')]();};}function saveUpdates(_0x8d406e,_0x5c55ca){return function(_0x4e3f48){if(_0x4e3f48){return _0x4e3f48[_0x834e('0x29')](_0x8d406e)[_0x834e('0x2a')](function(_0x589dde){return _0x589dde;});}return null;};}function removeEntity(_0x25ee1d,_0x1dc1e0){return function(_0x58f4fd){if(_0x58f4fd){return _0x58f4fd[_0x834e('0x2b')]()[_0x834e('0x2a')](function(){_0x25ee1d[_0x834e('0x1d')](0xcc)['end']();});}};}function handleEntityNotFound(_0x24fcf7,_0x3e310f){return function(_0x5e1cc5){if(!_0x5e1cc5){_0x24fcf7['sendStatus'](0x194);}return _0x5e1cc5;};}function handleError(_0x1e713a,_0x508a1d){_0x508a1d=_0x508a1d||0x1f4;return function(_0x2826ec){logger[_0x834e('0x2c')](_0x2826ec[_0x834e('0x2d')]);if(_0x2826ec[_0x834e('0x2e')]){delete _0x2826ec[_0x834e('0x2e')];}_0x1e713a[_0x834e('0x1d')](_0x508a1d)['send'](_0x2826ec);};}exports['index']=function(_0x4dc64a,_0x58c1d7){var _0x2c7a8d={},_0x567cea={},_0x106d6a={'count':0x0,'rows':[]};var _0x5dacc1=_[_0x834e('0x2f')](db[_0x834e('0x30')][_0x834e('0x31')],function(_0x1e026a){return{'name':_0x1e026a[_0x834e('0x32')],'type':_0x1e026a[_0x834e('0x33')][_0x834e('0x34')]};});_0x567cea[_0x834e('0x35')]=_[_0x834e('0x2f')](_0x5dacc1,'name');_0x567cea[_0x834e('0x36')]=_['keys'](_0x4dc64a[_0x834e('0x36')]);_0x567cea[_0x834e('0x37')]=_[_0x834e('0x38')](_0x567cea[_0x834e('0x35')],_0x567cea[_0x834e('0x36')]);_0x2c7a8d[_0x834e('0x39')]=_[_0x834e('0x38')](_0x567cea[_0x834e('0x35')],qs[_0x834e('0x3a')](_0x4dc64a[_0x834e('0x36')]['fields']));_0x2c7a8d[_0x834e('0x39')]=_0x2c7a8d[_0x834e('0x39')][_0x834e('0x3b')]?_0x2c7a8d[_0x834e('0x39')]:_0x567cea['model'];if(!_0x4dc64a[_0x834e('0x36')][_0x834e('0x3c')]('nolimit')){_0x2c7a8d['limit']=qs['limit'](_0x4dc64a[_0x834e('0x36')][_0x834e('0x20')]);_0x2c7a8d[_0x834e('0x22')]=qs[_0x834e('0x22')](_0x4dc64a[_0x834e('0x36')][_0x834e('0x22')]);}_0x2c7a8d['order']=qs[_0x834e('0x3d')](_0x4dc64a['query'][_0x834e('0x3d')]);_0x2c7a8d[_0x834e('0x3e')]=qs['filters'](_[_0x834e('0x3f')](_0x4dc64a[_0x834e('0x36')],_0x567cea['filters']),_0x5dacc1);if(_0x4dc64a['query'][_0x834e('0x40')]){_0x2c7a8d[_0x834e('0x3e')]=_[_0x834e('0x41')](_0x2c7a8d[_0x834e('0x3e')],{'$or':_[_0x834e('0x2f')](_0x5dacc1,function(_0x4ca43c){if(_0x4ca43c[_0x834e('0x33')]!=='VIRTUAL'){var _0x50c243={};_0x50c243[_0x4ca43c[_0x834e('0x2e')]]={'$like':'%'+_0x4dc64a['query'][_0x834e('0x40')]+'%'};return _0x50c243;}})});}_0x2c7a8d=_[_0x834e('0x41')]({},_0x2c7a8d,_0x4dc64a[_0x834e('0x42')]);var _0x3c59af={'where':_0x2c7a8d[_0x834e('0x3e')]};return db['MemberReport'][_0x834e('0x21')](_0x3c59af)[_0x834e('0x2a')](function(_0x38f266){_0x106d6a['count']=_0x38f266;if(_0x4dc64a[_0x834e('0x36')][_0x834e('0x43')]){_0x2c7a8d['include']=[{'all':!![]}];}return db[_0x834e('0x30')]['findAll'](_0x2c7a8d);})[_0x834e('0x2a')](function(_0x585335){_0x106d6a['rows']=_0x585335;return _0x106d6a;})['then'](respondWithFilteredResult(_0x58c1d7,_0x2c7a8d))[_0x834e('0x44')](handleError(_0x58c1d7,null));};exports[_0x834e('0x45')]=function(_0x3bcbf4,_0xbc1571){var _0x8ad264={'raw':!![],'where':{'id':_0x3bcbf4[_0x834e('0x46')]['id']}},_0x23feea={};_0x23feea['model']=_[_0x834e('0x47')](db['MemberReport'][_0x834e('0x31')]);_0x23feea['query']=_[_0x834e('0x47')](_0x3bcbf4['query']);_0x23feea[_0x834e('0x37')]=_[_0x834e('0x38')](_0x23feea['model'],_0x23feea[_0x834e('0x36')]);_0x8ad264[_0x834e('0x39')]=_[_0x834e('0x38')](_0x23feea[_0x834e('0x35')],qs[_0x834e('0x3a')](_0x3bcbf4[_0x834e('0x36')][_0x834e('0x3a')]));_0x8ad264[_0x834e('0x39')]=_0x8ad264[_0x834e('0x39')][_0x834e('0x3b')]?_0x8ad264['attributes']:_0x23feea[_0x834e('0x35')];if(_0x3bcbf4[_0x834e('0x36')]['includeAll']){_0x8ad264[_0x834e('0x48')]=[{'all':!![]}];}_0x8ad264=_[_0x834e('0x41')]({},_0x8ad264,_0x3bcbf4[_0x834e('0x42')]);return db[_0x834e('0x30')][_0x834e('0x49')](_0x8ad264)[_0x834e('0x2a')](handleEntityNotFound(_0xbc1571,null))['then'](respondWithResult(_0xbc1571,null))['catch'](handleError(_0xbc1571,null));};exports[_0x834e('0x4a')]=function(_0x1a5444,_0x30568e){return db[_0x834e('0x30')][_0x834e('0x4a')](_0x1a5444[_0x834e('0x4b')],{})[_0x834e('0x2a')](respondWithResult(_0x30568e,0xc9))[_0x834e('0x44')](handleError(_0x30568e,null));};exports[_0x834e('0x29')]=function(_0x390c45,_0xf02f0d){if(_0x390c45[_0x834e('0x4b')]['id']){delete _0x390c45[_0x834e('0x4b')]['id'];}return db[_0x834e('0x30')][_0x834e('0x49')]({'where':{'id':_0x390c45[_0x834e('0x46')]['id']}})[_0x834e('0x2a')](handleEntityNotFound(_0xf02f0d,null))[_0x834e('0x2a')](saveUpdates(_0x390c45[_0x834e('0x4b')],null))[_0x834e('0x2a')](respondWithResult(_0xf02f0d,null))['catch'](handleError(_0xf02f0d,null));};exports[_0x834e('0x2b')]=function(_0x1f08b9,_0x4e73e0){return db[_0x834e('0x30')][_0x834e('0x49')]({'where':{'id':_0x1f08b9['params']['id']}})[_0x834e('0x2a')](handleEntityNotFound(_0x4e73e0,null))[_0x834e('0x2a')](removeEntity(_0x4e73e0,null))[_0x834e('0x44')](handleError(_0x4e73e0,null));};exports[_0x834e('0x4c')]=function(_0x4288e4,_0xb77aab){return db[_0x834e('0x30')]['describe']()[_0x834e('0x2a')](respondWithResult(_0xb77aab,null))[_0x834e('0x44')](handleError(_0xb77aab,null));}; \ No newline at end of file diff --git a/server/api/memberReport/memberReport.model.js b/server/api/memberReport/memberReport.model.js index 164621e..3b38dca 100644 --- a/server/api/memberReport/memberReport.model.js +++ b/server/api/memberReport/memberReport.model.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x631c=['api','moment','request-promise','path','rimraf','./memberReport.attributes','exports','MemberReport','report_member','lodash','util'];(function(_0x42c340,_0x14d8e1){var _0x5db232=function(_0x3e08b9){while(--_0x3e08b9){_0x42c340['push'](_0x42c340['shift']());}};_0x5db232(++_0x14d8e1);}(_0x631c,0x1b6));var _0xc631=function(_0x4eef74,_0x10f40b){_0x4eef74=_0x4eef74-0x0;var _0x5494ae=_0x631c[_0x4eef74];return _0x5494ae;};'use strict';var _=require(_0xc631('0x0'));var util=require(_0xc631('0x1'));var logger=require('../../config/logger')(_0xc631('0x2'));var moment=require(_0xc631('0x3'));var BPromise=require('bluebird');var rp=require(_0xc631('0x4'));var fs=require('fs');var path=require(_0xc631('0x5'));var rimraf=require(_0xc631('0x6'));var config=require('../../config/environment');var attributes=require(_0xc631('0x7'));module[_0xc631('0x8')]=function(_0x5221e6,_0x278ad2){return _0x5221e6['define'](_0xc631('0x9'),attributes,{'tableName':_0xc631('0xa'),'paranoid':![],'indexes':[{'name':'membername_interface','fields':['membername','interface']}],'timestamps':!![]});}; \ No newline at end of file +var _0x2d72=['rimraf','../../config/environment','./memberReport.attributes','exports','MemberReport','report_member','membername','interface','lodash','util','../../config/logger','api','moment','bluebird','request-promise','path'];(function(_0x495b3d,_0x4d3da4){var _0x4cb329=function(_0xdef9f0){while(--_0xdef9f0){_0x495b3d['push'](_0x495b3d['shift']());}};_0x4cb329(++_0x4d3da4);}(_0x2d72,0xa8));var _0x22d7=function(_0x6d34d7,_0xc0f2ec){_0x6d34d7=_0x6d34d7-0x0;var _0x2e6abb=_0x2d72[_0x6d34d7];return _0x2e6abb;};'use strict';var _=require(_0x22d7('0x0'));var util=require(_0x22d7('0x1'));var logger=require(_0x22d7('0x2'))(_0x22d7('0x3'));var moment=require(_0x22d7('0x4'));var BPromise=require(_0x22d7('0x5'));var rp=require(_0x22d7('0x6'));var fs=require('fs');var path=require(_0x22d7('0x7'));var rimraf=require(_0x22d7('0x8'));var config=require(_0x22d7('0x9'));var attributes=require(_0x22d7('0xa'));module[_0x22d7('0xb')]=function(_0x208b5b,_0x100426){return _0x208b5b['define'](_0x22d7('0xc'),attributes,{'tableName':_0x22d7('0xd'),'paranoid':![],'indexes':[{'name':'membername_interface','fields':[_0x22d7('0xe'),_0x22d7('0xf')]}],'timestamps':!![]});}; \ No newline at end of file diff --git a/server/api/memberReport/memberReport.rpc.js b/server/api/memberReport/memberReport.rpc.js index b65a981..20fccab 100644 --- a/server/api/memberReport/memberReport.rpc.js +++ b/server/api/memberReport/memberReport.rpc.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x27a0=['map','model','then','catch','CreateMemberReport','create','body','raw','UpdateMemberReport','update','where','util','moment','bluebird','randomstring','ioredis','../../config/environment','jayson/promise','client','http','request','info','MemberReport,\x20%s,\x20%s','debug','MemberReport,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','code','message','GetMemberReport','MemberReport','options','attributes','limit','include'];(function(_0x3daeb2,_0x1d0f2e){var _0x5ceda0=function(_0x34f555){while(--_0x34f555){_0x3daeb2['push'](_0x3daeb2['shift']());}};_0x5ceda0(++_0x1d0f2e);}(_0x27a0,0xbf));var _0x027a=function(_0x403e8d,_0x5de99b){_0x403e8d=_0x403e8d-0x0;var _0x24667c=_0x27a0[_0x403e8d];return _0x24667c;};'use strict';var _=require('lodash');var util=require(_0x027a('0x0'));var moment=require(_0x027a('0x1'));var BPromise=require(_0x027a('0x2'));var rs=require(_0x027a('0x3'));var fs=require('fs');var Redis=require(_0x027a('0x4'));var db=require('../../mysqldb')['db'];var utils=require('../../config/utils');var logger=require('../../config/logger')('rpc');var config=require(_0x027a('0x5'));var jayson=require(_0x027a('0x6'));var client=jayson[_0x027a('0x7')][_0x027a('0x8')]({'port':0x232a});function respondWithRpcPromise(_0xe233ed,_0x3c7d67,_0x550fbb){return new BPromise(function(_0x3d1429,_0x271dfe){return client[_0x027a('0x9')](_0xe233ed,_0x550fbb)['then'](function(_0x44c56a){logger[_0x027a('0xa')](_0x027a('0xb'),_0x3c7d67,'request\x20sent');logger[_0x027a('0xc')](_0x027a('0xd'),_0x3c7d67,_0x027a('0xe'),JSON[_0x027a('0xf')](_0x44c56a));if(_0x44c56a[_0x027a('0x10')]){if(_0x44c56a[_0x027a('0x10')][_0x027a('0x11')]===0x1f4){logger[_0x027a('0x10')](_0x027a('0xb'),_0x3c7d67,_0x44c56a[_0x027a('0x10')][_0x027a('0x12')]);return _0x271dfe(_0x44c56a['error'][_0x027a('0x12')]);}logger[_0x027a('0x10')](_0x027a('0xb'),_0x3c7d67,_0x44c56a[_0x027a('0x10')][_0x027a('0x12')]);return _0x3d1429(_0x44c56a['error']['message']);}else{logger[_0x027a('0xa')]('MemberReport,\x20%s,\x20%s',_0x3c7d67,_0x027a('0xe'));_0x3d1429(_0x44c56a['result'][_0x027a('0x12')]);}})['catch'](function(_0x4dc3ab){logger['error'](_0x027a('0xb'),_0x3c7d67,_0x4dc3ab);_0x271dfe(_0x4dc3ab);});});}exports[_0x027a('0x13')]=function(_0x826d19){var _0x1fb40b=this;return new Promise(function(_0x52125e,_0x282e70){return db[_0x027a('0x14')]['findAll']({'raw':_0x826d19['options']?_0x826d19[_0x027a('0x15')]['raw']===undefined?!![]:![]:!![],'where':_0x826d19[_0x027a('0x15')]?_0x826d19['options']['where']||null:null,'attributes':_0x826d19['options']?_0x826d19['options'][_0x027a('0x16')]||null:null,'limit':_0x826d19[_0x027a('0x15')]?_0x826d19[_0x027a('0x15')][_0x027a('0x17')]||null:null,'include':_0x826d19['options']?_0x826d19[_0x027a('0x15')][_0x027a('0x18')]?_[_0x027a('0x19')](_0x826d19[_0x027a('0x15')][_0x027a('0x18')],function(_0x3bbd46){return{'model':db[_0x3bbd46['model']],'as':_0x3bbd46['as'],'attributes':_0x3bbd46[_0x027a('0x16')],'include':_0x3bbd46['include']?_[_0x027a('0x19')](_0x3bbd46[_0x027a('0x18')],function(_0x1b1a13){return{'model':db[_0x1b1a13[_0x027a('0x1a')]],'as':_0x1b1a13['as'],'attributes':_0x1b1a13['attributes'],'include':_0x1b1a13['include']?_[_0x027a('0x19')](_0x1b1a13[_0x027a('0x18')],function(_0x338141){return{'model':db[_0x338141[_0x027a('0x1a')]],'as':_0x338141['as'],'attributes':_0x338141['attributes']};}):[]};}):[]};}):[]:[]})[_0x027a('0x1b')](function(_0x55a8cd){logger[_0x027a('0xa')]('GetMemberReport',_0x826d19);logger[_0x027a('0xc')]('GetMemberReport',_0x826d19,JSON['stringify'](_0x55a8cd));_0x52125e(_0x55a8cd);})[_0x027a('0x1c')](function(_0x5782ac){logger['error'](_0x027a('0x13'),_0x5782ac['message'],_0x826d19);_0x282e70(_0x1fb40b[_0x027a('0x10')](0x1f4,_0x5782ac['message']));});});};exports[_0x027a('0x1d')]=function(_0xc99acc){var _0x4d9a29=this;return new Promise(function(_0xe4ea7d,_0x4b4ac4){return db[_0x027a('0x14')][_0x027a('0x1e')](_0xc99acc[_0x027a('0x1f')],{'raw':_0xc99acc[_0x027a('0x15')]?_0xc99acc[_0x027a('0x15')][_0x027a('0x20')]===undefined?!![]:![]:!![]})['then'](function(_0x3926e8){logger['info'](_0x027a('0x1d'),_0xc99acc);logger['debug'](_0x027a('0x1d'),_0xc99acc,JSON[_0x027a('0xf')](_0x3926e8));_0xe4ea7d(_0x3926e8);})[_0x027a('0x1c')](function(_0x307e3c){logger[_0x027a('0x10')]('CreateMemberReport',_0x307e3c[_0x027a('0x12')],_0xc99acc);_0x4b4ac4(_0x4d9a29[_0x027a('0x10')](0x1f4,_0x307e3c[_0x027a('0x12')]));});});};exports[_0x027a('0x21')]=function(_0x14cb87){var _0x476ab8=this;return new Promise(function(_0x1bc29f,_0xd09e6){return db[_0x027a('0x14')][_0x027a('0x22')](_0x14cb87[_0x027a('0x1f')],{'raw':_0x14cb87['options']?_0x14cb87[_0x027a('0x15')][_0x027a('0x20')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x14cb87[_0x027a('0x15')]?_0x14cb87[_0x027a('0x15')][_0x027a('0x23')]||null:null,'attributes':_0x14cb87[_0x027a('0x15')]?_0x14cb87[_0x027a('0x15')]['attributes']||null:null,'limit':_0x14cb87[_0x027a('0x15')]?_0x14cb87[_0x027a('0x15')][_0x027a('0x17')]||null:null})['then'](function(_0x22f96b){logger['info'](_0x027a('0x21'),_0x14cb87);logger[_0x027a('0xc')](_0x027a('0x21'),_0x14cb87,JSON['stringify'](_0x22f96b));_0x1bc29f(_0x22f96b);})['catch'](function(_0x32a44e){logger[_0x027a('0x10')]('UpdateMemberReport',_0x32a44e[_0x027a('0x12')],_0x14cb87);_0xd09e6(_0x476ab8[_0x027a('0x10')](0x1f4,_0x32a44e[_0x027a('0x12')]));});});}; \ No newline at end of file +var _0x41ec=['raw','attributes','limit','include','map','model','create','body','CreateMemberReport','UpdateMemberReport','where','util','bluebird','randomstring','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','request','then','info','MemberReport,\x20%s,\x20%s','request\x20sent','debug','MemberReport,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','catch','GetMemberReport','MemberReport','findAll','options'];(function(_0x234785,_0x15d7ec){var _0x38f40a=function(_0x1de89c){while(--_0x1de89c){_0x234785['push'](_0x234785['shift']());}};_0x38f40a(++_0x15d7ec);}(_0x41ec,0x143));var _0xc41e=function(_0x34c983,_0x138a97){_0x34c983=_0x34c983-0x0;var _0x163621=_0x41ec[_0x34c983];return _0x163621;};'use strict';var _=require('lodash');var util=require(_0xc41e('0x0'));var moment=require('moment');var BPromise=require(_0xc41e('0x1'));var rs=require(_0xc41e('0x2'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0xc41e('0x3'))['db'];var utils=require(_0xc41e('0x4'));var logger=require(_0xc41e('0x5'))(_0xc41e('0x6'));var config=require(_0xc41e('0x7'));var jayson=require(_0xc41e('0x8'));var client=jayson[_0xc41e('0x9')][_0xc41e('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x27ce38,_0x3655bf,_0x9a951a){return new BPromise(function(_0x4d941e,_0x2b8cf6){return client[_0xc41e('0xb')](_0x27ce38,_0x9a951a)[_0xc41e('0xc')](function(_0x2a7ed8){logger[_0xc41e('0xd')](_0xc41e('0xe'),_0x3655bf,_0xc41e('0xf'));logger[_0xc41e('0x10')](_0xc41e('0x11'),_0x3655bf,_0xc41e('0xf'),JSON[_0xc41e('0x12')](_0x2a7ed8));if(_0x2a7ed8['error']){if(_0x2a7ed8[_0xc41e('0x13')][_0xc41e('0x14')]===0x1f4){logger[_0xc41e('0x13')](_0xc41e('0xe'),_0x3655bf,_0x2a7ed8[_0xc41e('0x13')][_0xc41e('0x15')]);return _0x2b8cf6(_0x2a7ed8[_0xc41e('0x13')][_0xc41e('0x15')]);}logger['error'](_0xc41e('0xe'),_0x3655bf,_0x2a7ed8[_0xc41e('0x13')][_0xc41e('0x15')]);return _0x4d941e(_0x2a7ed8[_0xc41e('0x13')]['message']);}else{logger['info'](_0xc41e('0xe'),_0x3655bf,_0xc41e('0xf'));_0x4d941e(_0x2a7ed8[_0xc41e('0x16')]['message']);}})[_0xc41e('0x17')](function(_0x2ef2ca){logger['error']('MemberReport,\x20%s,\x20%s',_0x3655bf,_0x2ef2ca);_0x2b8cf6(_0x2ef2ca);});});}exports[_0xc41e('0x18')]=function(_0x5c0517){var _0x37d0d6=this;return new Promise(function(_0x23c9b6,_0x5d630f){return db[_0xc41e('0x19')][_0xc41e('0x1a')]({'raw':_0x5c0517[_0xc41e('0x1b')]?_0x5c0517[_0xc41e('0x1b')][_0xc41e('0x1c')]===undefined?!![]:![]:!![],'where':_0x5c0517[_0xc41e('0x1b')]?_0x5c0517[_0xc41e('0x1b')]['where']||null:null,'attributes':_0x5c0517[_0xc41e('0x1b')]?_0x5c0517[_0xc41e('0x1b')][_0xc41e('0x1d')]||null:null,'limit':_0x5c0517['options']?_0x5c0517[_0xc41e('0x1b')][_0xc41e('0x1e')]||null:null,'include':_0x5c0517[_0xc41e('0x1b')]?_0x5c0517['options'][_0xc41e('0x1f')]?_[_0xc41e('0x20')](_0x5c0517[_0xc41e('0x1b')]['include'],function(_0x5a06dd){return{'model':db[_0x5a06dd['model']],'as':_0x5a06dd['as'],'attributes':_0x5a06dd[_0xc41e('0x1d')],'include':_0x5a06dd[_0xc41e('0x1f')]?_['map'](_0x5a06dd['include'],function(_0x5a3e0d){return{'model':db[_0x5a3e0d[_0xc41e('0x21')]],'as':_0x5a3e0d['as'],'attributes':_0x5a3e0d[_0xc41e('0x1d')],'include':_0x5a3e0d[_0xc41e('0x1f')]?_[_0xc41e('0x20')](_0x5a3e0d[_0xc41e('0x1f')],function(_0x580b9e){return{'model':db[_0x580b9e[_0xc41e('0x21')]],'as':_0x580b9e['as'],'attributes':_0x580b9e[_0xc41e('0x1d')]};}):[]};}):[]};}):[]:[]})[_0xc41e('0xc')](function(_0x5bd682){logger[_0xc41e('0xd')](_0xc41e('0x18'),_0x5c0517);logger['debug'](_0xc41e('0x18'),_0x5c0517,JSON[_0xc41e('0x12')](_0x5bd682));_0x23c9b6(_0x5bd682);})[_0xc41e('0x17')](function(_0xcb3a15){logger[_0xc41e('0x13')](_0xc41e('0x18'),_0xcb3a15[_0xc41e('0x15')],_0x5c0517);_0x5d630f(_0x37d0d6['error'](0x1f4,_0xcb3a15['message']));});});};exports['CreateMemberReport']=function(_0x3cd142){var _0x1fc6e2=this;return new Promise(function(_0x24b7ac,_0x3334f8){return db[_0xc41e('0x19')][_0xc41e('0x22')](_0x3cd142[_0xc41e('0x23')],{'raw':_0x3cd142['options']?_0x3cd142[_0xc41e('0x1b')][_0xc41e('0x1c')]===undefined?!![]:![]:!![]})[_0xc41e('0xc')](function(_0x5ca527){logger[_0xc41e('0xd')]('CreateMemberReport',_0x3cd142);logger[_0xc41e('0x10')](_0xc41e('0x24'),_0x3cd142,JSON[_0xc41e('0x12')](_0x5ca527));_0x24b7ac(_0x5ca527);})[_0xc41e('0x17')](function(_0x4df6e6){logger['error'](_0xc41e('0x24'),_0x4df6e6[_0xc41e('0x15')],_0x3cd142);_0x3334f8(_0x1fc6e2[_0xc41e('0x13')](0x1f4,_0x4df6e6[_0xc41e('0x15')]));});});};exports[_0xc41e('0x25')]=function(_0x3ce21a){var _0x53861a=this;return new Promise(function(_0x42badc,_0x3416b5){return db[_0xc41e('0x19')]['update'](_0x3ce21a[_0xc41e('0x23')],{'raw':_0x3ce21a[_0xc41e('0x1b')]?_0x3ce21a['options'][_0xc41e('0x1c')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x3ce21a[_0xc41e('0x1b')]?_0x3ce21a[_0xc41e('0x1b')][_0xc41e('0x26')]||null:null,'attributes':_0x3ce21a[_0xc41e('0x1b')]?_0x3ce21a['options']['attributes']||null:null,'limit':_0x3ce21a[_0xc41e('0x1b')]?_0x3ce21a[_0xc41e('0x1b')][_0xc41e('0x1e')]||null:null})[_0xc41e('0xc')](function(_0x29fbec){logger[_0xc41e('0xd')](_0xc41e('0x25'),_0x3ce21a);logger[_0xc41e('0x10')](_0xc41e('0x25'),_0x3ce21a,JSON['stringify'](_0x29fbec));_0x42badc(_0x29fbec);})['catch'](function(_0x465280){logger[_0xc41e('0x13')](_0xc41e('0x25'),_0x465280[_0xc41e('0x15')],_0x3ce21a);_0x3416b5(_0x53861a[_0xc41e('0x13')](0x1f4,_0x465280[_0xc41e('0x15')]));});});}; \ No newline at end of file diff --git a/server/api/migration/index.js b/server/api/migration/index.js index 9f1c37b..c260cfa 100644 --- a/server/api/migration/index.js +++ b/server/api/migration/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xb8bc=['../../config/environment','./migration.controller','get','index','express','Router','fs-extra','../../components/auth/service','../../components/interaction/service'];(function(_0x46e363,_0x45d7e2){var _0x3fb059=function(_0x5e6274){while(--_0x5e6274){_0x46e363['push'](_0x46e363['shift']());}};_0x3fb059(++_0x45d7e2);}(_0xb8bc,0x1d8));var _0xcb8b=function(_0x49ad4b,_0x4da677){_0x49ad4b=_0x49ad4b-0x0;var _0x6bc6c6=_0xb8bc[_0x49ad4b];return _0x6bc6c6;};'use strict';var multer=require('multer');var util=require('util');var path=require('path');var timeout=require('connect-timeout');var express=require(_0xcb8b('0x0'));var router=express[_0xcb8b('0x1')]();var fs_extra=require(_0xcb8b('0x2'));var auth=require(_0xcb8b('0x3'));var interaction=require(_0xcb8b('0x4'));var config=require(_0xcb8b('0x5'));var controller=require(_0xcb8b('0x6'));router[_0xcb8b('0x7')]('/',controller[_0xcb8b('0x8')]);module['exports']=router; \ No newline at end of file +var _0xa7e6=['express','Router','../../components/auth/service','../../components/interaction/service','../../config/environment','./migration.controller','get','exports','multer','util','path','connect-timeout'];(function(_0x4a599b,_0x1d2125){var _0x2d53d3=function(_0x5e7982){while(--_0x5e7982){_0x4a599b['push'](_0x4a599b['shift']());}};_0x2d53d3(++_0x1d2125);}(_0xa7e6,0x74));var _0x6a7e=function(_0x35faa8,_0x18c8b7){_0x35faa8=_0x35faa8-0x0;var _0x3227b0=_0xa7e6[_0x35faa8];return _0x3227b0;};'use strict';var multer=require(_0x6a7e('0x0'));var util=require(_0x6a7e('0x1'));var path=require(_0x6a7e('0x2'));var timeout=require(_0x6a7e('0x3'));var express=require(_0x6a7e('0x4'));var router=express[_0x6a7e('0x5')]();var fs_extra=require('fs-extra');var auth=require(_0x6a7e('0x6'));var interaction=require(_0x6a7e('0x7'));var config=require(_0x6a7e('0x8'));var controller=require(_0x6a7e('0x9'));router[_0x6a7e('0xa')]('/',controller['index']);module[_0x6a7e('0xb')]=router; \ No newline at end of file diff --git a/server/api/migration/migration.attributes.js b/server/api/migration/migration.attributes.js index 0d896d9..53dc56f 100644 --- a/server/api/migration/migration.attributes.js +++ b/server/api/migration/migration.attributes.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xf6d9=['exports','version','sequelize'];(function(_0x12cdfd,_0x3a920b){var _0x2b9be8=function(_0x1585ca){while(--_0x1585ca){_0x12cdfd['push'](_0x12cdfd['shift']());}};_0x2b9be8(++_0x3a920b);}(_0xf6d9,0x15b));var _0x9f6d=function(_0x4dc4db,_0x3011aa){_0x4dc4db=_0x4dc4db-0x0;var _0x3b5e88=_0xf6d9[_0x4dc4db];return _0x3b5e88;};'use strict';var Sequelize=require(_0x9f6d('0x0'));module[_0x9f6d('0x1')]={'version':{'type':Sequelize['STRING'],'unique':_0x9f6d('0x2')}}; \ No newline at end of file +var _0xaf85=['exports','STRING','version'];(function(_0x21cffc,_0x386d53){var _0x5818f3=function(_0x475471){while(--_0x475471){_0x21cffc['push'](_0x21cffc['shift']());}};_0x5818f3(++_0x386d53);}(_0xaf85,0x81));var _0x5af8=function(_0x41d902,_0x29d0b){_0x41d902=_0x41d902-0x0;var _0x360fb1=_0xaf85[_0x41d902];return _0x360fb1;};'use strict';var Sequelize=require('sequelize');module[_0x5af8('0x0')]={'version':{'type':Sequelize[_0x5af8('0x1')],'unique':_0x5af8('0x2')}}; \ No newline at end of file diff --git a/server/api/migration/migration.controller.js b/server/api/migration/migration.controller.js index 4dc2d0a..0b02e11 100644 --- a/server/api/migration/migration.controller.js +++ b/server/api/migration/migration.controller.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xdcd4=['squel','crypto','jsforce','desk.js','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../config/license/hardware','../../config/logger','../../config/environment','../../config/license/util','sendStatus','status','end','offset','undefined','limit','count','set','Content-Range','json','apply','reject','update','then','stack','map','fieldName','model','keys','query','intersection','attributes','fields','hasOwnProperty','order','sort','filters','pick','filter','where','merge','name','options','Migration','findAll','rows','catch','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','util','path','sox','to-csv','fs-extra'];(function(_0x214da9,_0x1d39e2){var _0x58388b=function(_0x363726){while(--_0x363726){_0x214da9['push'](_0x214da9['shift']());}};_0x58388b(++_0x1d39e2);}(_0xdcd4,0x16d));var _0x4dcd=function(_0x1facfa,_0x1acf7d){_0x1facfa=_0x1facfa-0x0;var _0x9ec701=_0xdcd4[_0x1facfa];return _0x9ec701;};'use strict';var emlformat=require(_0x4dcd('0x0'));var rimraf=require(_0x4dcd('0x1'));var zipdir=require(_0x4dcd('0x2'));var jsonpatch=require(_0x4dcd('0x3'));var rp=require(_0x4dcd('0x4'));var moment=require(_0x4dcd('0x5'));var BPromise=require(_0x4dcd('0x6'));var Mustache=require(_0x4dcd('0x7'));var util=require(_0x4dcd('0x8'));var path=require(_0x4dcd('0x9'));var sox=require(_0x4dcd('0xa'));var csv=require(_0x4dcd('0xb'));var ejs=require('ejs');var fs=require('fs');var fs_extra=require(_0x4dcd('0xc'));var _=require('lodash');var squel=require(_0x4dcd('0xd'));var crypto=require(_0x4dcd('0xe'));var jsforce=require(_0x4dcd('0xf'));var deskjs=require(_0x4dcd('0x10'));var toCsv=require(_0x4dcd('0xb'));var querystring=require(_0x4dcd('0x11'));var Papa=require(_0x4dcd('0x12'));var Redis=require(_0x4dcd('0x13'));var authService=require(_0x4dcd('0x14'));var qs=require(_0x4dcd('0x15'));var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0x4dcd('0x16'));var logger=require(_0x4dcd('0x17'))('api');var utils=require('../../config/utils');var config=require(_0x4dcd('0x18'));var licenseUtil=require(_0x4dcd('0x19'));var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0x3ae7e6,_0x2551e4){_0x2551e4=_0x2551e4||0xcc;return function(_0x39a7a2){if(_0x39a7a2){return _0x3ae7e6[_0x4dcd('0x1a')](_0x2551e4);}return _0x3ae7e6[_0x4dcd('0x1b')](_0x2551e4)[_0x4dcd('0x1c')]();};}function respondWithResult(_0x22b454,_0x41d3f9){_0x41d3f9=_0x41d3f9||0xc8;return function(_0x38d7b5){if(_0x38d7b5){return _0x22b454[_0x4dcd('0x1b')](_0x41d3f9)['json'](_0x38d7b5);}};}function respondWithFilteredResult(_0x490a97,_0x1edebb){return function(_0x5089d2){if(_0x5089d2){var _0x6e2e13=typeof _0x1edebb[_0x4dcd('0x1d')]===_0x4dcd('0x1e')&&typeof _0x1edebb[_0x4dcd('0x1f')]==='undefined';var _0xaf4b3a=_0x5089d2['count'];var _0x554935=_0x6e2e13?0x0:_0x1edebb[_0x4dcd('0x1d')];var _0x16f93d=_0x6e2e13?_0x5089d2[_0x4dcd('0x20')]:_0x1edebb[_0x4dcd('0x1d')]+_0x1edebb[_0x4dcd('0x1f')];var _0x5abfc8;if(_0x16f93d>=_0xaf4b3a){_0x16f93d=_0xaf4b3a;_0x5abfc8=0xc8;}else{_0x5abfc8=0xce;}_0x490a97[_0x4dcd('0x1b')](_0x5abfc8);return _0x490a97[_0x4dcd('0x21')](_0x4dcd('0x22'),_0x554935+'-'+_0x16f93d+'/'+_0xaf4b3a)[_0x4dcd('0x23')](_0x5089d2);}return null;};}function patchUpdates(_0x2f18b6){return function(_0x2ff3c5){try{jsonpatch[_0x4dcd('0x24')](_0x2ff3c5,_0x2f18b6,!![]);}catch(_0x5117e9){return BPromise[_0x4dcd('0x25')](_0x5117e9);}return _0x2ff3c5['save']();};}function saveUpdates(_0x158938,_0x1a2ea8){return function(_0x1ee5cb){if(_0x1ee5cb){return _0x1ee5cb[_0x4dcd('0x26')](_0x158938)[_0x4dcd('0x27')](function(_0x57d30d){return _0x57d30d;});}return null;};}function removeEntity(_0x2da0c7,_0x80ab4f){return function(_0x3573fc){if(_0x3573fc){return _0x3573fc['destroy']()['then'](function(){_0x2da0c7[_0x4dcd('0x1b')](0xcc)[_0x4dcd('0x1c')]();});}};}function handleEntityNotFound(_0x4f0c2d,_0x4a4543){return function(_0x164a85){if(!_0x164a85){_0x4f0c2d[_0x4dcd('0x1a')](0x194);}return _0x164a85;};}function handleError(_0x40d972,_0xabf2c5){_0xabf2c5=_0xabf2c5||0x1f4;return function(_0x1d97ad){logger['error'](_0x1d97ad[_0x4dcd('0x28')]);if(_0x1d97ad['name']){delete _0x1d97ad['name'];}_0x40d972[_0x4dcd('0x1b')](_0xabf2c5)['send'](_0x1d97ad);};}exports['index']=function(_0x3b52db,_0x18dd75){var _0x55df10={},_0x44ab63={},_0xacd02a={'count':0x0,'rows':[]};var _0x151f6b=_[_0x4dcd('0x29')](db['Migration']['rawAttributes'],function(_0x1feea8){return{'name':_0x1feea8[_0x4dcd('0x2a')],'type':_0x1feea8['type']['key']};});_0x44ab63[_0x4dcd('0x2b')]=_['map'](_0x151f6b,'name');_0x44ab63['query']=_[_0x4dcd('0x2c')](_0x3b52db[_0x4dcd('0x2d')]);_0x44ab63['filters']=_[_0x4dcd('0x2e')](_0x44ab63[_0x4dcd('0x2b')],_0x44ab63[_0x4dcd('0x2d')]);_0x55df10[_0x4dcd('0x2f')]=_[_0x4dcd('0x2e')](_0x44ab63[_0x4dcd('0x2b')],qs[_0x4dcd('0x30')](_0x3b52db[_0x4dcd('0x2d')][_0x4dcd('0x30')]));_0x55df10[_0x4dcd('0x2f')]=_0x55df10[_0x4dcd('0x2f')]['length']?_0x55df10['attributes']:_0x44ab63['model'];if(!_0x3b52db[_0x4dcd('0x2d')][_0x4dcd('0x31')]('nolimit')){_0x55df10[_0x4dcd('0x1f')]=qs['limit'](_0x3b52db['query'][_0x4dcd('0x1f')]);_0x55df10[_0x4dcd('0x1d')]=qs[_0x4dcd('0x1d')](_0x3b52db[_0x4dcd('0x2d')][_0x4dcd('0x1d')]);}_0x55df10[_0x4dcd('0x32')]=qs[_0x4dcd('0x33')](_0x3b52db[_0x4dcd('0x2d')][_0x4dcd('0x33')]);_0x55df10['where']=qs[_0x4dcd('0x34')](_[_0x4dcd('0x35')](_0x3b52db[_0x4dcd('0x2d')],_0x44ab63[_0x4dcd('0x34')]),_0x151f6b);if(_0x3b52db['query'][_0x4dcd('0x36')]){_0x55df10[_0x4dcd('0x37')]=_[_0x4dcd('0x38')](_0x55df10[_0x4dcd('0x37')],{'$or':_[_0x4dcd('0x29')](_0x151f6b,function(_0xfce27c){if(_0xfce27c['type']!=='VIRTUAL'){var _0x484ad8={};_0x484ad8[_0xfce27c[_0x4dcd('0x39')]]={'$like':'%'+_0x3b52db[_0x4dcd('0x2d')][_0x4dcd('0x36')]+'%'};return _0x484ad8;}})});}_0x55df10=_['merge']({},_0x55df10,_0x3b52db[_0x4dcd('0x3a')]);var _0x11966e={'where':_0x55df10[_0x4dcd('0x37')]};return db['Migration'][_0x4dcd('0x20')](_0x11966e)[_0x4dcd('0x27')](function(_0x1123aa){_0xacd02a[_0x4dcd('0x20')]=_0x1123aa;if(_0x3b52db['query']['includeAll']){_0x55df10['include']=[{'all':!![]}];}return db[_0x4dcd('0x3b')][_0x4dcd('0x3c')](_0x55df10);})[_0x4dcd('0x27')](function(_0x130db7){_0xacd02a[_0x4dcd('0x3d')]=_0x130db7;return _0xacd02a;})[_0x4dcd('0x27')](respondWithFilteredResult(_0x18dd75,_0x55df10))[_0x4dcd('0x3e')](handleError(_0x18dd75,null));}; \ No newline at end of file +var _0xe787=['ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','status','end','json','undefined','limit','count','offset','set','Content-Range','apply','reject','save','then','destroy','sendStatus','error','stack','name','index','map','rawAttributes','key','model','query','keys','filters','intersection','attributes','fields','hasOwnProperty','order','sort','where','pick','merge','VIRTUAL','filter','options','Migration','include','findAll','catch','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','mustache','util','path','sox','to-csv','ejs','fs-extra','lodash','squel','crypto','jsforce','papaparse'];(function(_0x8fba1a,_0x274189){var _0x2f5c2d=function(_0x5f46e4){while(--_0x5f46e4){_0x8fba1a['push'](_0x8fba1a['shift']());}};_0x2f5c2d(++_0x274189);}(_0xe787,0x14d));var _0x7e78=function(_0x3fe042,_0x1106f7){_0x3fe042=_0x3fe042-0x0;var _0x7d4a1f=_0xe787[_0x3fe042];return _0x7d4a1f;};'use strict';var emlformat=require(_0x7e78('0x0'));var rimraf=require(_0x7e78('0x1'));var zipdir=require(_0x7e78('0x2'));var jsonpatch=require(_0x7e78('0x3'));var rp=require(_0x7e78('0x4'));var moment=require('moment');var BPromise=require('bluebird');var Mustache=require(_0x7e78('0x5'));var util=require(_0x7e78('0x6'));var path=require(_0x7e78('0x7'));var sox=require(_0x7e78('0x8'));var csv=require(_0x7e78('0x9'));var ejs=require(_0x7e78('0xa'));var fs=require('fs');var fs_extra=require(_0x7e78('0xb'));var _=require(_0x7e78('0xc'));var squel=require(_0x7e78('0xd'));var crypto=require(_0x7e78('0xe'));var jsforce=require(_0x7e78('0xf'));var deskjs=require('desk.js');var toCsv=require(_0x7e78('0x9'));var querystring=require('querystring');var Papa=require(_0x7e78('0x10'));var Redis=require(_0x7e78('0x11'));var authService=require(_0x7e78('0x12'));var qs=require(_0x7e78('0x13'));var as=require(_0x7e78('0x14'));var hardwareService=require(_0x7e78('0x15'));var logger=require(_0x7e78('0x16'))(_0x7e78('0x17'));var utils=require(_0x7e78('0x18'));var config=require(_0x7e78('0x19'));var licenseUtil=require(_0x7e78('0x1a'));var db=require(_0x7e78('0x1b'))['db'];function respondWithStatusCode(_0x3758ce,_0x2cae6b){_0x2cae6b=_0x2cae6b||0xcc;return function(_0x32c605){if(_0x32c605){return _0x3758ce['sendStatus'](_0x2cae6b);}return _0x3758ce[_0x7e78('0x1c')](_0x2cae6b)[_0x7e78('0x1d')]();};}function respondWithResult(_0x42c664,_0x51415a){_0x51415a=_0x51415a||0xc8;return function(_0x399b79){if(_0x399b79){return _0x42c664[_0x7e78('0x1c')](_0x51415a)[_0x7e78('0x1e')](_0x399b79);}};}function respondWithFilteredResult(_0x295665,_0x18fae3){return function(_0x3a30b3){if(_0x3a30b3){var _0x2cc50f=typeof _0x18fae3['offset']===_0x7e78('0x1f')&&typeof _0x18fae3[_0x7e78('0x20')]==='undefined';var _0xcc45ad=_0x3a30b3[_0x7e78('0x21')];var _0x48eddb=_0x2cc50f?0x0:_0x18fae3[_0x7e78('0x22')];var _0x449a51=_0x2cc50f?_0x3a30b3['count']:_0x18fae3[_0x7e78('0x22')]+_0x18fae3[_0x7e78('0x20')];var _0x2f65d4;if(_0x449a51>=_0xcc45ad){_0x449a51=_0xcc45ad;_0x2f65d4=0xc8;}else{_0x2f65d4=0xce;}_0x295665[_0x7e78('0x1c')](_0x2f65d4);return _0x295665[_0x7e78('0x23')](_0x7e78('0x24'),_0x48eddb+'-'+_0x449a51+'/'+_0xcc45ad)[_0x7e78('0x1e')](_0x3a30b3);}return null;};}function patchUpdates(_0x5dd440){return function(_0x25c556){try{jsonpatch[_0x7e78('0x25')](_0x25c556,_0x5dd440,!![]);}catch(_0x208d6a){return BPromise[_0x7e78('0x26')](_0x208d6a);}return _0x25c556[_0x7e78('0x27')]();};}function saveUpdates(_0x445e56,_0xb8eb07){return function(_0x32e3fc){if(_0x32e3fc){return _0x32e3fc['update'](_0x445e56)[_0x7e78('0x28')](function(_0x1d9609){return _0x1d9609;});}return null;};}function removeEntity(_0x4da4e0,_0x36cb04){return function(_0x22ff5a){if(_0x22ff5a){return _0x22ff5a[_0x7e78('0x29')]()['then'](function(){_0x4da4e0[_0x7e78('0x1c')](0xcc)[_0x7e78('0x1d')]();});}};}function handleEntityNotFound(_0x4569cb,_0x80cd18){return function(_0x1622c4){if(!_0x1622c4){_0x4569cb[_0x7e78('0x2a')](0x194);}return _0x1622c4;};}function handleError(_0x19063b,_0x6e5481){_0x6e5481=_0x6e5481||0x1f4;return function(_0x4368af){logger[_0x7e78('0x2b')](_0x4368af[_0x7e78('0x2c')]);if(_0x4368af['name']){delete _0x4368af[_0x7e78('0x2d')];}_0x19063b['status'](_0x6e5481)['send'](_0x4368af);};}exports[_0x7e78('0x2e')]=function(_0x427284,_0x311b63){var _0x8c0807={},_0x5cfd36={},_0x4117a7={'count':0x0,'rows':[]};var _0x203eda=_[_0x7e78('0x2f')](db['Migration'][_0x7e78('0x30')],function(_0x40afa4){return{'name':_0x40afa4['fieldName'],'type':_0x40afa4['type'][_0x7e78('0x31')]};});_0x5cfd36[_0x7e78('0x32')]=_['map'](_0x203eda,_0x7e78('0x2d'));_0x5cfd36[_0x7e78('0x33')]=_[_0x7e78('0x34')](_0x427284[_0x7e78('0x33')]);_0x5cfd36[_0x7e78('0x35')]=_[_0x7e78('0x36')](_0x5cfd36['model'],_0x5cfd36['query']);_0x8c0807[_0x7e78('0x37')]=_[_0x7e78('0x36')](_0x5cfd36['model'],qs['fields'](_0x427284[_0x7e78('0x33')][_0x7e78('0x38')]));_0x8c0807[_0x7e78('0x37')]=_0x8c0807[_0x7e78('0x37')]['length']?_0x8c0807['attributes']:_0x5cfd36[_0x7e78('0x32')];if(!_0x427284['query'][_0x7e78('0x39')]('nolimit')){_0x8c0807[_0x7e78('0x20')]=qs[_0x7e78('0x20')](_0x427284['query'][_0x7e78('0x20')]);_0x8c0807[_0x7e78('0x22')]=qs['offset'](_0x427284[_0x7e78('0x33')][_0x7e78('0x22')]);}_0x8c0807[_0x7e78('0x3a')]=qs[_0x7e78('0x3b')](_0x427284[_0x7e78('0x33')][_0x7e78('0x3b')]);_0x8c0807[_0x7e78('0x3c')]=qs['filters'](_[_0x7e78('0x3d')](_0x427284['query'],_0x5cfd36['filters']),_0x203eda);if(_0x427284[_0x7e78('0x33')]['filter']){_0x8c0807[_0x7e78('0x3c')]=_[_0x7e78('0x3e')](_0x8c0807[_0x7e78('0x3c')],{'$or':_[_0x7e78('0x2f')](_0x203eda,function(_0x45ca67){if(_0x45ca67['type']!==_0x7e78('0x3f')){var _0x7e4786={};_0x7e4786[_0x45ca67[_0x7e78('0x2d')]]={'$like':'%'+_0x427284[_0x7e78('0x33')][_0x7e78('0x40')]+'%'};return _0x7e4786;}})});}_0x8c0807=_[_0x7e78('0x3e')]({},_0x8c0807,_0x427284[_0x7e78('0x41')]);var _0x5a896f={'where':_0x8c0807[_0x7e78('0x3c')]};return db[_0x7e78('0x42')][_0x7e78('0x21')](_0x5a896f)['then'](function(_0x459909){_0x4117a7[_0x7e78('0x21')]=_0x459909;if(_0x427284[_0x7e78('0x33')]['includeAll']){_0x8c0807[_0x7e78('0x43')]=[{'all':!![]}];}return db['Migration'][_0x7e78('0x44')](_0x8c0807);})['then'](function(_0x2f7087){_0x4117a7['rows']=_0x2f7087;return _0x4117a7;})['then'](respondWithFilteredResult(_0x311b63,_0x8c0807))[_0x7e78('0x45')](handleError(_0x311b63,null));}; \ No newline at end of file diff --git a/server/api/migration/migration.model.js b/server/api/migration/migration.model.js index da34dfb..fa8245e 100644 --- a/server/api/migration/migration.model.js +++ b/server/api/migration/migration.model.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xc300=['util','api','moment','bluebird','request-promise','path','rimraf','../../config/environment','./migration.attributes','define','Migration','migrations'];(function(_0x342baa,_0x4a110f){var _0x1208f3=function(_0x56a645){while(--_0x56a645){_0x342baa['push'](_0x342baa['shift']());}};_0x1208f3(++_0x4a110f);}(_0xc300,0xc0));var _0x0c30=function(_0x4323a2,_0x37f41b){_0x4323a2=_0x4323a2-0x0;var _0x27df24=_0xc300[_0x4323a2];return _0x27df24;};'use strict';var _=require('lodash');var util=require(_0x0c30('0x0'));var logger=require('../../config/logger')(_0x0c30('0x1'));var moment=require(_0x0c30('0x2'));var BPromise=require(_0x0c30('0x3'));var rp=require(_0x0c30('0x4'));var fs=require('fs');var path=require(_0x0c30('0x5'));var rimraf=require(_0x0c30('0x6'));var config=require(_0x0c30('0x7'));var attributes=require(_0x0c30('0x8'));module['exports']=function(_0x56270f,_0x45a551){return _0x56270f[_0x0c30('0x9')](_0x0c30('0xa'),attributes,{'tableName':_0x0c30('0xb'),'paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file +var _0xbcf2=['../../config/logger','api','moment','bluebird','rimraf','./migration.attributes','exports','define','Migration','migrations','lodash'];(function(_0x8a30cf,_0x40f19b){var _0x20f439=function(_0x157a5d){while(--_0x157a5d){_0x8a30cf['push'](_0x8a30cf['shift']());}};_0x20f439(++_0x40f19b);}(_0xbcf2,0x1b7));var _0x2bcf=function(_0x5b6375,_0x563718){_0x5b6375=_0x5b6375-0x0;var _0x4045b4=_0xbcf2[_0x5b6375];return _0x4045b4;};'use strict';var _=require(_0x2bcf('0x0'));var util=require('util');var logger=require(_0x2bcf('0x1'))(_0x2bcf('0x2'));var moment=require(_0x2bcf('0x3'));var BPromise=require(_0x2bcf('0x4'));var rp=require('request-promise');var fs=require('fs');var path=require('path');var rimraf=require(_0x2bcf('0x5'));var config=require('../../config/environment');var attributes=require(_0x2bcf('0x6'));module[_0x2bcf('0x7')]=function(_0x5a375a,_0x11008a){return _0x5a375a[_0x2bcf('0x8')](_0x2bcf('0x9'),attributes,{'tableName':_0x2bcf('0xa'),'paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file diff --git a/server/api/migration/migration.rpc.js b/server/api/migration/migration.rpc.js index 9e30caf..2977604 100644 --- a/server/api/migration/migration.rpc.js +++ b/server/api/migration/migration.rpc.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x3f49=['Migration,\x20%s,\x20%s','request\x20sent','stringify','error','code','message','catch','lodash','util','bluebird','randomstring','ioredis','../../config/utils','../../config/logger','jayson/promise','client','http','request','then','info'];(function(_0x5aa373,_0x54c7f4){var _0x590e8e=function(_0x505e62){while(--_0x505e62){_0x5aa373['push'](_0x5aa373['shift']());}};_0x590e8e(++_0x54c7f4);}(_0x3f49,0x11f));var _0x93f4=function(_0x42910a,_0x36cc19){_0x42910a=_0x42910a-0x0;var _0x2cca81=_0x3f49[_0x42910a];return _0x2cca81;};'use strict';var _=require(_0x93f4('0x0'));var util=require(_0x93f4('0x1'));var moment=require('moment');var BPromise=require(_0x93f4('0x2'));var rs=require(_0x93f4('0x3'));var fs=require('fs');var Redis=require(_0x93f4('0x4'));var db=require('../../mysqldb')['db'];var utils=require(_0x93f4('0x5'));var logger=require(_0x93f4('0x6'))('rpc');var config=require('../../config/environment');var jayson=require(_0x93f4('0x7'));var client=jayson[_0x93f4('0x8')][_0x93f4('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x5a86ad,_0x956b50,_0x5d22d9){return new BPromise(function(_0x144f31,_0x5e5b4d){return client[_0x93f4('0xa')](_0x5a86ad,_0x5d22d9)[_0x93f4('0xb')](function(_0x325984){logger[_0x93f4('0xc')](_0x93f4('0xd'),_0x956b50,_0x93f4('0xe'));logger['debug']('Migration,\x20%s,\x20%s,\x20%s',_0x956b50,_0x93f4('0xe'),JSON[_0x93f4('0xf')](_0x325984));if(_0x325984[_0x93f4('0x10')]){if(_0x325984[_0x93f4('0x10')][_0x93f4('0x11')]===0x1f4){logger[_0x93f4('0x10')](_0x93f4('0xd'),_0x956b50,_0x325984[_0x93f4('0x10')]['message']);return _0x5e5b4d(_0x325984[_0x93f4('0x10')]['message']);}logger['error'](_0x93f4('0xd'),_0x956b50,_0x325984[_0x93f4('0x10')][_0x93f4('0x12')]);return _0x144f31(_0x325984['error']['message']);}else{logger[_0x93f4('0xc')](_0x93f4('0xd'),_0x956b50,_0x93f4('0xe'));_0x144f31(_0x325984['result'][_0x93f4('0x12')]);}})[_0x93f4('0x13')](function(_0x53151e){logger[_0x93f4('0x10')]('Migration,\x20%s,\x20%s',_0x956b50,_0x53151e);_0x5e5b4d(_0x53151e);});});} \ No newline at end of file +var _0x7d5a=['request','then','info','request\x20sent','debug','Migration,\x20%s,\x20%s,\x20%s','stringify','error','Migration,\x20%s,\x20%s','message','catch','lodash','util','moment','bluebird','randomstring','ioredis','../../mysqldb','rpc','../../config/environment','jayson/promise','client','http'];(function(_0x552b53,_0x146a29){var _0x458599=function(_0x172939){while(--_0x172939){_0x552b53['push'](_0x552b53['shift']());}};_0x458599(++_0x146a29);}(_0x7d5a,0x17b));var _0xa7d5=function(_0x3bf8e0,_0x5de8a2){_0x3bf8e0=_0x3bf8e0-0x0;var _0x1df07f=_0x7d5a[_0x3bf8e0];return _0x1df07f;};'use strict';var _=require(_0xa7d5('0x0'));var util=require(_0xa7d5('0x1'));var moment=require(_0xa7d5('0x2'));var BPromise=require(_0xa7d5('0x3'));var rs=require(_0xa7d5('0x4'));var fs=require('fs');var Redis=require(_0xa7d5('0x5'));var db=require(_0xa7d5('0x6'))['db'];var utils=require('../../config/utils');var logger=require('../../config/logger')(_0xa7d5('0x7'));var config=require(_0xa7d5('0x8'));var jayson=require(_0xa7d5('0x9'));var client=jayson[_0xa7d5('0xa')][_0xa7d5('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x80431a,_0x5a8f8a,_0x21ccfa){return new BPromise(function(_0xb5bcd2,_0x2c2c25){return client[_0xa7d5('0xc')](_0x80431a,_0x21ccfa)[_0xa7d5('0xd')](function(_0xf40c67){logger[_0xa7d5('0xe')]('Migration,\x20%s,\x20%s',_0x5a8f8a,_0xa7d5('0xf'));logger[_0xa7d5('0x10')](_0xa7d5('0x11'),_0x5a8f8a,'request\x20sent',JSON[_0xa7d5('0x12')](_0xf40c67));if(_0xf40c67[_0xa7d5('0x13')]){if(_0xf40c67[_0xa7d5('0x13')]['code']===0x1f4){logger[_0xa7d5('0x13')](_0xa7d5('0x14'),_0x5a8f8a,_0xf40c67[_0xa7d5('0x13')][_0xa7d5('0x15')]);return _0x2c2c25(_0xf40c67[_0xa7d5('0x13')]['message']);}logger[_0xa7d5('0x13')](_0xa7d5('0x14'),_0x5a8f8a,_0xf40c67[_0xa7d5('0x13')][_0xa7d5('0x15')]);return _0xb5bcd2(_0xf40c67[_0xa7d5('0x13')]['message']);}else{logger[_0xa7d5('0xe')](_0xa7d5('0x14'),_0x5a8f8a,_0xa7d5('0xf'));_0xb5bcd2(_0xf40c67['result']['message']);}})[_0xa7d5('0x16')](function(_0x53d884){logger[_0xa7d5('0x13')](_0xa7d5('0x14'),_0x5a8f8a,_0x53d884);_0x2c2c25(_0x53d884);});});} \ No newline at end of file diff --git a/server/api/network/index.js b/server/api/network/index.js index 404e311..6333b6b 100644 --- a/server/api/network/index.js +++ b/server/api/network/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x078a=['exports','multer','util','path','connect-timeout','express','Router','../../components/auth/service','../../components/interaction/service','../../config/environment','get','index','/:id','isAuthenticated','show','post','create','update','delete','destroy'];(function(_0x38e9fb,_0x294aec){var _0x4c85af=function(_0x45df76){while(--_0x45df76){_0x38e9fb['push'](_0x38e9fb['shift']());}};_0x4c85af(++_0x294aec);}(_0x078a,0x12d));var _0xa078=function(_0x8bdbc4,_0x27da96){_0x8bdbc4=_0x8bdbc4-0x0;var _0x387e0e=_0x078a[_0x8bdbc4];return _0x387e0e;};'use strict';var multer=require(_0xa078('0x0'));var util=require(_0xa078('0x1'));var path=require(_0xa078('0x2'));var timeout=require(_0xa078('0x3'));var express=require(_0xa078('0x4'));var router=express[_0xa078('0x5')]();var fs_extra=require('fs-extra');var auth=require(_0xa078('0x6'));var interaction=require(_0xa078('0x7'));var config=require(_0xa078('0x8'));var controller=require('./network.controller');router[_0xa078('0x9')]('/',auth['isAuthenticated'](),controller[_0xa078('0xa')]);router[_0xa078('0x9')](_0xa078('0xb'),auth[_0xa078('0xc')](),controller[_0xa078('0xd')]);router[_0xa078('0xe')]('/',auth[_0xa078('0xc')](),controller[_0xa078('0xf')]);router['put'](_0xa078('0xb'),auth[_0xa078('0xc')](),controller[_0xa078('0x10')]);router[_0xa078('0x11')]('/:id',auth[_0xa078('0xc')](),controller[_0xa078('0x12')]);module[_0xa078('0x13')]=router; \ No newline at end of file +var _0xe61c=['put','delete','destroy','exports','multer','path','connect-timeout','express','../../components/auth/service','../../config/environment','./network.controller','get','isAuthenticated','index','/:id','show','post','create'];(function(_0x2c91e9,_0x2fb965){var _0x13f0ff=function(_0xb39edf){while(--_0xb39edf){_0x2c91e9['push'](_0x2c91e9['shift']());}};_0x13f0ff(++_0x2fb965);}(_0xe61c,0xee));var _0xce61=function(_0x118139,_0x7ce965){_0x118139=_0x118139-0x0;var _0x2fece9=_0xe61c[_0x118139];return _0x2fece9;};'use strict';var multer=require(_0xce61('0x0'));var util=require('util');var path=require(_0xce61('0x1'));var timeout=require(_0xce61('0x2'));var express=require(_0xce61('0x3'));var router=express['Router']();var fs_extra=require('fs-extra');var auth=require(_0xce61('0x4'));var interaction=require('../../components/interaction/service');var config=require(_0xce61('0x5'));var controller=require(_0xce61('0x6'));router[_0xce61('0x7')]('/',auth[_0xce61('0x8')](),controller[_0xce61('0x9')]);router[_0xce61('0x7')](_0xce61('0xa'),auth['isAuthenticated'](),controller[_0xce61('0xb')]);router[_0xce61('0xc')]('/',auth[_0xce61('0x8')](),controller[_0xce61('0xd')]);router[_0xce61('0xe')](_0xce61('0xa'),auth[_0xce61('0x8')](),controller['update']);router[_0xce61('0xf')](_0xce61('0xa'),auth['isAuthenticated'](),controller[_0xce61('0x10')]);module[_0xce61('0x11')]=router; \ No newline at end of file diff --git a/server/api/network/network.attributes.js b/server/api/network/network.attributes.js index 948595e..b30a192 100644 --- a/server/api/network/network.attributes.js +++ b/server/api/network/network.attributes.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xe13b=['ENUM','externip','turn','STRING'];(function(_0x436b17,_0x415fc2){var _0x5cdd19=function(_0x41b25c){while(--_0x41b25c){_0x436b17['push'](_0x436b17['shift']());}};_0x5cdd19(++_0x415fc2);}(_0xe13b,0xbc));var _0xbe13=function(_0x5622fb,_0x2ab439){_0x5622fb=_0x5622fb-0x0;var _0x11729a=_0xe13b[_0x5622fb];return _0x11729a;};'use strict';var Sequelize=require('sequelize');module['exports']={'type':{'type':Sequelize[_0xbe13('0x0')]('localnet',_0xbe13('0x1'),'stun',_0xbe13('0x2'))},'value':{'type':Sequelize[_0xbe13('0x3')]},'username':{'type':Sequelize['STRING']},'password':{'type':Sequelize[_0xbe13('0x3')]}}; \ No newline at end of file +var _0x1842=['exports','ENUM','localnet','externip','stun','STRING','sequelize'];(function(_0x1eb6f9,_0x48e25d){var _0x4943ad=function(_0x20e364){while(--_0x20e364){_0x1eb6f9['push'](_0x1eb6f9['shift']());}};_0x4943ad(++_0x48e25d);}(_0x1842,0x172));var _0x2184=function(_0x2940ae,_0x37e966){_0x2940ae=_0x2940ae-0x0;var _0x4b92d1=_0x1842[_0x2940ae];return _0x4b92d1;};'use strict';var Sequelize=require(_0x2184('0x0'));module[_0x2184('0x1')]={'type':{'type':Sequelize[_0x2184('0x2')](_0x2184('0x3'),_0x2184('0x4'),_0x2184('0x5'),'turn')},'value':{'type':Sequelize[_0x2184('0x6')]},'username':{'type':Sequelize[_0x2184('0x6')]},'password':{'type':Sequelize[_0x2184('0x6')]}}; \ No newline at end of file diff --git a/server/api/network/network.controller.js b/server/api/network/network.controller.js index e31d691..7529086 100644 --- a/server/api/network/network.controller.js +++ b/server/api/network/network.controller.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xade4=['debug','Network,\x20%s,\x20%s,\x20%s','stringify','error','message','result','status','json','undefined','limit','count','set','update','destroy','end','sendStatus','stack','name','index','map','fieldName','type','key','model','query','keys','intersection','attributes','fields','length','hasOwnProperty','nolimit','offset','order','sort','where','filters','filter','merge','VIRTUAL','options','Network','includeAll','include','findAll','rows','catch','show','params','rawAttributes','find','create','body','STUN','readFileSync','join','root','server/files/templates/stun_multiple.ejs','utf8','render','writeFileSync','/etc/asterisk/stun_xcally.conf','Reload','res_stun_monitor.so','toUpperCase','TURN','/etc/asterisk/turn_xcally.conf','server/files/templates/network.ejs','format','toLowerCase','chan_sip.so','server/files/templates/turn_multiple.ejs','/etc/asterisk/sip_xcally_%s.conf','util','path','ejs','lodash','../../config/logger','../../config/environment','jayson/promise','request','then','info','Network,\x20%s,\x20%s','request\x20sent'];(function(_0x47c824,_0x8917f8){var _0x57a2e9=function(_0x16c8ac){while(--_0x16c8ac){_0x47c824['push'](_0x47c824['shift']());}};_0x57a2e9(++_0x8917f8);}(_0xade4,0x1f2));var _0x4ade=function(_0x25fea1,_0x8257e4){_0x25fea1=_0x25fea1-0x0;var _0x5d609b=_0xade4[_0x25fea1];return _0x5d609b;};'use strict';var util=require(_0x4ade('0x0'));var path=require(_0x4ade('0x1'));var ejs=require(_0x4ade('0x2'));var fs=require('fs');var _=require(_0x4ade('0x3'));var qs=require('../../components/parsers/qs');var logger=require(_0x4ade('0x4'))('api');var config=require(_0x4ade('0x5'));var db=require('../../mysqldb')['db'];var jayson=require(_0x4ade('0x6'));var client=jayson['client']['http']({'port':0x232a});function respondWithRpcPromise(_0x12cb70,_0x15d5a0,_0x5527a4,_0x3596ce){return new Promise(function(_0x50fede,_0x232ad3){var _0x4d5069=_0x3596ce||client;return _0x4d5069[_0x4ade('0x7')](_0x12cb70,_0x5527a4)[_0x4ade('0x8')](function(_0x2acf32){logger[_0x4ade('0x9')](_0x4ade('0xa'),_0x15d5a0,_0x4ade('0xb'));logger[_0x4ade('0xc')](_0x4ade('0xd'),_0x15d5a0,'request\x20sent',JSON[_0x4ade('0xe')](_0x2acf32));if(_0x2acf32[_0x4ade('0xf')]){if(_0x2acf32['error']['code']===0x1f4){logger[_0x4ade('0xf')](_0x4ade('0xa'),_0x15d5a0,_0x2acf32[_0x4ade('0xf')]['message']);return _0x232ad3(_0x2acf32['error'][_0x4ade('0x10')]);}logger[_0x4ade('0xf')]('Network,\x20%s,\x20%s',_0x15d5a0,_0x2acf32['error'][_0x4ade('0x10')]);return _0x50fede(_0x2acf32[_0x4ade('0xf')][_0x4ade('0x10')]);}else{logger[_0x4ade('0x9')](_0x4ade('0xa'),_0x15d5a0,'request\x20sent');_0x50fede(_0x2acf32[_0x4ade('0x11')][_0x4ade('0x10')]);}})['catch'](function(_0x581438){logger[_0x4ade('0xf')](_0x4ade('0xa'),_0x15d5a0,_0x581438);_0x232ad3(_0x581438);});});}function respondWithResult(_0x37e61f,_0x3ff5b8){_0x3ff5b8=_0x3ff5b8||0xc8;return function(_0x262bc0){if(_0x262bc0){return _0x37e61f[_0x4ade('0x12')](_0x3ff5b8)[_0x4ade('0x13')](_0x262bc0);}};}function respondWithFilteredResult(_0x4a0a74,_0x3e78be){return function(_0x2e8f86){if(_0x2e8f86){var _0x4554ae=typeof _0x3e78be['offset']===_0x4ade('0x14')&&typeof _0x3e78be[_0x4ade('0x15')]==='undefined';var _0x5aa5df=_0x2e8f86[_0x4ade('0x16')];var _0x2eeefa=_0x4554ae?0x0:_0x3e78be['offset'];var _0x4033de=_0x4554ae?_0x2e8f86[_0x4ade('0x16')]:_0x3e78be['offset']+_0x3e78be[_0x4ade('0x15')];var _0x4417e4;if(_0x4033de>=_0x5aa5df){_0x4033de=_0x5aa5df;_0x4417e4=0xc8;}else{_0x4417e4=0xce;}_0x4a0a74['status'](_0x4417e4);return _0x4a0a74[_0x4ade('0x17')]('Content-Range',_0x2eeefa+'-'+_0x4033de+'/'+_0x5aa5df)[_0x4ade('0x13')](_0x2e8f86);}return null;};}function saveUpdates(_0x2313ba){return function(_0x1330fd){if(_0x1330fd){return _0x1330fd[_0x4ade('0x18')](_0x2313ba)[_0x4ade('0x8')](function(_0x16f474){return _0x16f474;});}return null;};}function removeEntity(_0x3542d4){return function(_0x18dc9a){if(_0x18dc9a){return _0x18dc9a[_0x4ade('0x19')]()[_0x4ade('0x8')](function(){_0x3542d4['status'](0xcc)[_0x4ade('0x1a')]();});}};}function handleEntityNotFound(_0x5022df){return function(_0x2360fb){if(!_0x2360fb){_0x5022df[_0x4ade('0x1b')](0x194);}return _0x2360fb;};}function handleError(_0x49fbb9,_0x368eb2){_0x368eb2=_0x368eb2||0x1f4;return function(_0xb8065d){logger[_0x4ade('0xf')](_0xb8065d[_0x4ade('0x1c')]);if(_0xb8065d['name']){delete _0xb8065d[_0x4ade('0x1d')];}_0x49fbb9[_0x4ade('0x12')](_0x368eb2)['send'](_0xb8065d);};}exports[_0x4ade('0x1e')]=function(_0x1645ce,_0xeadad7){var _0x3d3711={},_0x298fa6={},_0x3b1db6={'count':0x0,'rows':[]};var _0x25cb5d=_[_0x4ade('0x1f')](db['Network']['rawAttributes'],function(_0x520c67){return{'name':_0x520c67[_0x4ade('0x20')],'type':_0x520c67[_0x4ade('0x21')][_0x4ade('0x22')]};});_0x298fa6[_0x4ade('0x23')]=_[_0x4ade('0x1f')](_0x25cb5d,'name');_0x298fa6[_0x4ade('0x24')]=_[_0x4ade('0x25')](_0x1645ce['query']);_0x298fa6['filters']=_[_0x4ade('0x26')](_0x298fa6[_0x4ade('0x23')],_0x298fa6[_0x4ade('0x24')]);_0x3d3711[_0x4ade('0x27')]=_['intersection'](_0x298fa6[_0x4ade('0x23')],qs[_0x4ade('0x28')](_0x1645ce['query']['fields']));_0x3d3711[_0x4ade('0x27')]=_0x3d3711[_0x4ade('0x27')][_0x4ade('0x29')]?_0x3d3711[_0x4ade('0x27')]:_0x298fa6['model'];if(!_0x1645ce['query'][_0x4ade('0x2a')](_0x4ade('0x2b'))){_0x3d3711[_0x4ade('0x15')]=qs[_0x4ade('0x15')](_0x1645ce['query'][_0x4ade('0x15')]);_0x3d3711[_0x4ade('0x2c')]=qs[_0x4ade('0x2c')](_0x1645ce[_0x4ade('0x24')][_0x4ade('0x2c')]);}_0x3d3711[_0x4ade('0x2d')]=qs[_0x4ade('0x2e')](_0x1645ce[_0x4ade('0x24')][_0x4ade('0x2e')]);_0x3d3711[_0x4ade('0x2f')]=qs['filters'](_['pick'](_0x1645ce[_0x4ade('0x24')],_0x298fa6[_0x4ade('0x30')]),_0x25cb5d);if(_0x1645ce[_0x4ade('0x24')][_0x4ade('0x31')]){_0x3d3711[_0x4ade('0x2f')]=_[_0x4ade('0x32')](_0x3d3711[_0x4ade('0x2f')],{'$or':_[_0x4ade('0x1f')](_0x25cb5d,function(_0x487b2b){if(_0x487b2b[_0x4ade('0x21')]!==_0x4ade('0x33')){var _0x3b5e5b={};_0x3b5e5b[_0x487b2b['name']]={'$like':'%'+_0x1645ce[_0x4ade('0x24')][_0x4ade('0x31')]+'%'};return _0x3b5e5b;}})});}_0x3d3711=_['merge']({},_0x3d3711,_0x1645ce[_0x4ade('0x34')]);var _0x13a583={'where':_0x3d3711[_0x4ade('0x2f')]};return db[_0x4ade('0x35')][_0x4ade('0x16')](_0x13a583)[_0x4ade('0x8')](function(_0x46bde9){_0x3b1db6['count']=_0x46bde9;if(_0x1645ce[_0x4ade('0x24')][_0x4ade('0x36')]){_0x3d3711[_0x4ade('0x37')]=[{'all':!![]}];}return db['Network'][_0x4ade('0x38')](_0x3d3711);})[_0x4ade('0x8')](function(_0x2d41e3){_0x3b1db6[_0x4ade('0x39')]=_0x2d41e3;return _0x3b1db6;})[_0x4ade('0x8')](respondWithFilteredResult(_0xeadad7,_0x3d3711))[_0x4ade('0x3a')](handleError(_0xeadad7,null));};exports[_0x4ade('0x3b')]=function(_0x5e4c67,_0x2744c8){var _0x43a4b6={'raw':!![],'where':{'id':_0x5e4c67[_0x4ade('0x3c')]['id']}},_0x5c6087={};_0x5c6087[_0x4ade('0x23')]=_[_0x4ade('0x25')](db[_0x4ade('0x35')][_0x4ade('0x3d')]);_0x5c6087[_0x4ade('0x24')]=_['keys'](_0x5e4c67[_0x4ade('0x24')]);_0x5c6087[_0x4ade('0x30')]=_['intersection'](_0x5c6087[_0x4ade('0x23')],_0x5c6087[_0x4ade('0x24')]);_0x43a4b6[_0x4ade('0x27')]=_['intersection'](_0x5c6087[_0x4ade('0x23')],qs[_0x4ade('0x28')](_0x5e4c67[_0x4ade('0x24')][_0x4ade('0x28')]));_0x43a4b6[_0x4ade('0x27')]=_0x43a4b6[_0x4ade('0x27')][_0x4ade('0x29')]?_0x43a4b6[_0x4ade('0x27')]:_0x5c6087[_0x4ade('0x23')];if(_0x5e4c67['query']['includeAll']){_0x43a4b6[_0x4ade('0x37')]=[{'all':!![]}];}_0x43a4b6=_[_0x4ade('0x32')]({},_0x43a4b6,_0x5e4c67[_0x4ade('0x34')]);return db['Network'][_0x4ade('0x3e')](_0x43a4b6)['then'](handleEntityNotFound(_0x2744c8,null))[_0x4ade('0x8')](respondWithResult(_0x2744c8,null))[_0x4ade('0x3a')](handleError(_0x2744c8,null));};exports[_0x4ade('0x3f')]=function(_0x18f36b,_0x6a75d9){var _0x504ccc;return db[_0x4ade('0x35')][_0x4ade('0x3f')](_0x18f36b[_0x4ade('0x40')],{'raw':!![]})[_0x4ade('0x8')](function(_0x7f27b){_0x504ccc=_0x7f27b;return db[_0x4ade('0x35')][_0x4ade('0x38')]({'where':{'type':_0x18f36b['body']['type']},'raw':!![]});})['then'](function(_0x93a6c){if(_0x504ccc[_0x4ade('0x21')]['toUpperCase']()==_0x4ade('0x41')){var _0x5c1d6c=fs[_0x4ade('0x42')](path[_0x4ade('0x43')](config[_0x4ade('0x44')],_0x4ade('0x45')),_0x4ade('0x46'));var _0x3c5497=ejs[_0x4ade('0x47')](_0x5c1d6c,{'networks':_0x93a6c||[]});fs[_0x4ade('0x48')](_0x4ade('0x49'),_0x3c5497);return respondWithRpcPromise(_0x4ade('0x4a'),_0x4ade('0x3f'),{'module':_0x4ade('0x4b')});}else if(_0x504ccc[_0x4ade('0x21')][_0x4ade('0x4c')]()==_0x4ade('0x4d')){var _0x531eb5=fs[_0x4ade('0x42')](path['join'](config[_0x4ade('0x44')],'server/files/templates/turn_multiple.ejs'),_0x4ade('0x46'));var _0x13678c=ejs[_0x4ade('0x47')](_0x531eb5,{'networks':_0x93a6c||[]});fs[_0x4ade('0x48')](_0x4ade('0x4e'),_0x13678c);return respondWithRpcPromise(_0x4ade('0x4a'),'create',{'module':'res_stun_monitor.so'});}else{var _0x132e0=fs[_0x4ade('0x42')](path['join'](config[_0x4ade('0x44')],_0x4ade('0x4f')),_0x4ade('0x46'));var _0x2658e7=ejs[_0x4ade('0x47')](_0x132e0,{'networks':_0x93a6c||[]});fs[_0x4ade('0x48')](util[_0x4ade('0x50')]('/etc/asterisk/sip_xcally_%s.conf',_0x18f36b[_0x4ade('0x40')]['type'][_0x4ade('0x51')]()),_0x2658e7);return respondWithRpcPromise(_0x4ade('0x4a'),_0x4ade('0x3f'),{'module':_0x4ade('0x52')});}})[_0x4ade('0x8')](function(){return _0x504ccc;})[_0x4ade('0x8')](respondWithResult(_0x6a75d9,0xc9))[_0x4ade('0x3a')](handleError(_0x6a75d9,null));};exports['update']=function(_0x21abd8,_0x1baebe){var _0x2d0341;return db[_0x4ade('0x35')][_0x4ade('0x3e')]({'where':{'id':_0x21abd8['params']['id']}})[_0x4ade('0x8')](handleEntityNotFound(_0x1baebe,null))[_0x4ade('0x8')](saveUpdates(_0x21abd8[_0x4ade('0x40')],null))['then'](function(_0x22afd0){if(_0x22afd0){_0x2d0341=_0x22afd0;return db['Network'][_0x4ade('0x38')]({'where':{'type':_0x2d0341[_0x4ade('0x21')]},'raw':!![]});}return null;})[_0x4ade('0x8')](function(_0xf5c35c){if(_0x2d0341['type']['toUpperCase']()=='STUN'){var _0x4f8b33=fs[_0x4ade('0x42')](path[_0x4ade('0x43')](config[_0x4ade('0x44')],'server/files/templates/stun_multiple.ejs'),_0x4ade('0x46'));var _0x4c0e1b=ejs[_0x4ade('0x47')](_0x4f8b33,{'networks':_0xf5c35c||[]});fs[_0x4ade('0x48')]('/etc/asterisk/stun_xcally.conf',_0x4c0e1b);return respondWithRpcPromise('Reload','update',{'module':_0x4ade('0x4b')});}else if(_0x2d0341[_0x4ade('0x21')]['toUpperCase']()=='TURN'){var _0x2a32bb=fs[_0x4ade('0x42')](path['join'](config[_0x4ade('0x44')],_0x4ade('0x53')),_0x4ade('0x46'));var _0xaeeb0d=ejs[_0x4ade('0x47')](_0x2a32bb,{'networks':_0xf5c35c||[]});fs['writeFileSync'](_0x4ade('0x4e'),_0xaeeb0d);return respondWithRpcPromise(_0x4ade('0x4a'),_0x4ade('0x18'),{'module':_0x4ade('0x4b')});}else{var _0x426892=fs['readFileSync'](path['join'](config[_0x4ade('0x44')],'server/files/templates/network.ejs'),_0x4ade('0x46'));var _0x4be062=ejs[_0x4ade('0x47')](_0x426892,{'networks':_0xf5c35c||[]});fs['writeFileSync'](util[_0x4ade('0x50')](_0x4ade('0x54'),_0x21abd8[_0x4ade('0x40')]['type'][_0x4ade('0x51')]()),_0x4be062);return respondWithRpcPromise(_0x4ade('0x4a'),_0x4ade('0x18'),{'module':_0x4ade('0x52')});}})[_0x4ade('0x8')](function(_0x2f77ee){if(_0x2f77ee){return _0x2d0341;}return null;})['then'](respondWithResult(_0x1baebe,null))['catch'](handleError(_0x1baebe,null));};exports[_0x4ade('0x19')]=function(_0x4155ac,_0x457d7d){var _0x489e70;return db[_0x4ade('0x35')][_0x4ade('0x3e')]({'where':{'id':_0x4155ac[_0x4ade('0x3c')]['id']}})[_0x4ade('0x8')](function(_0x3c6a7b){_0x489e70=_0x3c6a7b;return _0x3c6a7b;})[_0x4ade('0x8')](handleEntityNotFound(_0x457d7d,null))[_0x4ade('0x8')](removeEntity(_0x457d7d,null))['then'](function(){if(_0x489e70){return db[_0x4ade('0x35')]['findAll']({'where':{'type':_0x489e70[_0x4ade('0x21')]},'raw':!![]});}})[_0x4ade('0x8')](function(_0x1e768d){if(_0x489e70[_0x4ade('0x21')][_0x4ade('0x4c')]()=='STUN'){var _0x46fc4e=fs[_0x4ade('0x42')](path[_0x4ade('0x43')](config[_0x4ade('0x44')],'server/files/templates/stun_multiple.ejs'),_0x4ade('0x46'));var _0x35c307=ejs[_0x4ade('0x47')](_0x46fc4e,{'networks':_0x1e768d||[]});fs['writeFileSync'](_0x4ade('0x49'),_0x35c307);return respondWithRpcPromise('Reload',_0x4ade('0x19'),{'module':_0x4ade('0x4b')});}else if(_0x489e70['type'][_0x4ade('0x4c')]()==_0x4ade('0x4d')){var _0x29a6ae=fs['readFileSync'](path[_0x4ade('0x43')](config[_0x4ade('0x44')],_0x4ade('0x53')),_0x4ade('0x46'));var _0x31e692=ejs['render'](_0x29a6ae,{'networks':_0x1e768d||[]});fs[_0x4ade('0x48')](_0x4ade('0x4e'),_0x31e692);return respondWithRpcPromise(_0x4ade('0x4a'),_0x4ade('0x19'),{'module':'res_stun_monitor.so'});}else{var _0x2f6b77=fs['readFileSync'](path['join'](config[_0x4ade('0x44')],'server/files/templates/network.ejs'),_0x4ade('0x46'));var _0x8d72be=ejs['render'](_0x2f6b77,{'networks':_0x1e768d||[]});fs[_0x4ade('0x48')](util[_0x4ade('0x50')](_0x4ade('0x54'),_0x489e70[_0x4ade('0x21')][_0x4ade('0x51')]()),_0x8d72be);return respondWithRpcPromise(_0x4ade('0x4a'),_0x4ade('0x19'),{'module':'chan_sip.so'});}})['catch'](handleError(_0x457d7d,null));}; \ No newline at end of file +var _0x3bd3=['where','pick','filter','merge','VIRTUAL','options','findAll','rows','show','params','include','find','create','body','STUN','readFileSync','join','server/files/templates/stun_multiple.ejs','utf8','render','writeFileSync','/etc/asterisk/stun_xcally.conf','res_stun_monitor.so','TURN','root','server/files/templates/turn_multiple.ejs','/etc/asterisk/turn_xcally.conf','Reload','/etc/asterisk/sip_xcally_%s.conf','chan_sip.so','update','toUpperCase','server/files/templates/network.ejs','toLowerCase','destroy','format','util','path','ejs','lodash','../../components/parsers/qs','../../config/logger','api','../../mysqldb','client','request','then','info','Network,\x20%s,\x20%s','request\x20sent','debug','Network,\x20%s,\x20%s,\x20%s','code','error','message','catch','status','offset','undefined','limit','count','set','Content-Range','json','end','sendStatus','stack','name','send','index','map','Network','rawAttributes','type','key','model','query','keys','filters','intersection','attributes','fields','length','hasOwnProperty','nolimit','order','sort'];(function(_0x352d35,_0xb9100){var _0x3708b8=function(_0x38454b){while(--_0x38454b){_0x352d35['push'](_0x352d35['shift']());}};_0x3708b8(++_0xb9100);}(_0x3bd3,0x180));var _0x33bd=function(_0x5d57c7,_0x3547be){_0x5d57c7=_0x5d57c7-0x0;var _0x2ee0ee=_0x3bd3[_0x5d57c7];return _0x2ee0ee;};'use strict';var util=require(_0x33bd('0x0'));var path=require(_0x33bd('0x1'));var ejs=require(_0x33bd('0x2'));var fs=require('fs');var _=require(_0x33bd('0x3'));var qs=require(_0x33bd('0x4'));var logger=require(_0x33bd('0x5'))(_0x33bd('0x6'));var config=require('../../config/environment');var db=require(_0x33bd('0x7'))['db'];var jayson=require('jayson/promise');var client=jayson[_0x33bd('0x8')]['http']({'port':0x232a});function respondWithRpcPromise(_0x13dcac,_0x58797f,_0xdf5fae,_0x4dfa9f){return new Promise(function(_0x56c4d1,_0x143926){var _0x2c8aca=_0x4dfa9f||client;return _0x2c8aca[_0x33bd('0x9')](_0x13dcac,_0xdf5fae)[_0x33bd('0xa')](function(_0x4884f3){logger[_0x33bd('0xb')](_0x33bd('0xc'),_0x58797f,_0x33bd('0xd'));logger[_0x33bd('0xe')](_0x33bd('0xf'),_0x58797f,'request\x20sent',JSON['stringify'](_0x4884f3));if(_0x4884f3['error']){if(_0x4884f3['error'][_0x33bd('0x10')]===0x1f4){logger['error']('Network,\x20%s,\x20%s',_0x58797f,_0x4884f3[_0x33bd('0x11')]['message']);return _0x143926(_0x4884f3['error']['message']);}logger[_0x33bd('0x11')](_0x33bd('0xc'),_0x58797f,_0x4884f3['error'][_0x33bd('0x12')]);return _0x56c4d1(_0x4884f3['error'][_0x33bd('0x12')]);}else{logger[_0x33bd('0xb')]('Network,\x20%s,\x20%s',_0x58797f,_0x33bd('0xd'));_0x56c4d1(_0x4884f3['result'][_0x33bd('0x12')]);}})[_0x33bd('0x13')](function(_0xf282f7){logger['error'](_0x33bd('0xc'),_0x58797f,_0xf282f7);_0x143926(_0xf282f7);});});}function respondWithResult(_0x26383d,_0x2460cc){_0x2460cc=_0x2460cc||0xc8;return function(_0x33d6e5){if(_0x33d6e5){return _0x26383d[_0x33bd('0x14')](_0x2460cc)['json'](_0x33d6e5);}};}function respondWithFilteredResult(_0x1a1a85,_0x238eed){return function(_0x148fde){if(_0x148fde){var _0x1a0144=typeof _0x238eed[_0x33bd('0x15')]===_0x33bd('0x16')&&typeof _0x238eed[_0x33bd('0x17')]===_0x33bd('0x16');var _0x2e17a5=_0x148fde[_0x33bd('0x18')];var _0x2b5a83=_0x1a0144?0x0:_0x238eed[_0x33bd('0x15')];var _0x47d1a2=_0x1a0144?_0x148fde['count']:_0x238eed[_0x33bd('0x15')]+_0x238eed['limit'];var _0x472ec5;if(_0x47d1a2>=_0x2e17a5){_0x47d1a2=_0x2e17a5;_0x472ec5=0xc8;}else{_0x472ec5=0xce;}_0x1a1a85[_0x33bd('0x14')](_0x472ec5);return _0x1a1a85[_0x33bd('0x19')](_0x33bd('0x1a'),_0x2b5a83+'-'+_0x47d1a2+'/'+_0x2e17a5)[_0x33bd('0x1b')](_0x148fde);}return null;};}function saveUpdates(_0x4ef349){return function(_0x39c5b5){if(_0x39c5b5){return _0x39c5b5['update'](_0x4ef349)[_0x33bd('0xa')](function(_0x1b9ad0){return _0x1b9ad0;});}return null;};}function removeEntity(_0x5c6dce){return function(_0x19098f){if(_0x19098f){return _0x19098f['destroy']()[_0x33bd('0xa')](function(){_0x5c6dce[_0x33bd('0x14')](0xcc)[_0x33bd('0x1c')]();});}};}function handleEntityNotFound(_0x41d8b0){return function(_0x30541d){if(!_0x30541d){_0x41d8b0[_0x33bd('0x1d')](0x194);}return _0x30541d;};}function handleError(_0x21c068,_0x988f44){_0x988f44=_0x988f44||0x1f4;return function(_0x2f553d){logger[_0x33bd('0x11')](_0x2f553d[_0x33bd('0x1e')]);if(_0x2f553d[_0x33bd('0x1f')]){delete _0x2f553d[_0x33bd('0x1f')];}_0x21c068[_0x33bd('0x14')](_0x988f44)[_0x33bd('0x20')](_0x2f553d);};}exports[_0x33bd('0x21')]=function(_0x2cb7ba,_0x3fa635){var _0x46b46c={},_0x5802ee={},_0x5d910b={'count':0x0,'rows':[]};var _0x1394d2=_[_0x33bd('0x22')](db[_0x33bd('0x23')][_0x33bd('0x24')],function(_0x349297){return{'name':_0x349297['fieldName'],'type':_0x349297[_0x33bd('0x25')][_0x33bd('0x26')]};});_0x5802ee[_0x33bd('0x27')]=_[_0x33bd('0x22')](_0x1394d2,'name');_0x5802ee[_0x33bd('0x28')]=_[_0x33bd('0x29')](_0x2cb7ba['query']);_0x5802ee[_0x33bd('0x2a')]=_[_0x33bd('0x2b')](_0x5802ee[_0x33bd('0x27')],_0x5802ee[_0x33bd('0x28')]);_0x46b46c[_0x33bd('0x2c')]=_[_0x33bd('0x2b')](_0x5802ee[_0x33bd('0x27')],qs['fields'](_0x2cb7ba['query'][_0x33bd('0x2d')]));_0x46b46c['attributes']=_0x46b46c['attributes'][_0x33bd('0x2e')]?_0x46b46c[_0x33bd('0x2c')]:_0x5802ee['model'];if(!_0x2cb7ba[_0x33bd('0x28')][_0x33bd('0x2f')](_0x33bd('0x30'))){_0x46b46c['limit']=qs['limit'](_0x2cb7ba['query']['limit']);_0x46b46c[_0x33bd('0x15')]=qs[_0x33bd('0x15')](_0x2cb7ba[_0x33bd('0x28')][_0x33bd('0x15')]);}_0x46b46c[_0x33bd('0x31')]=qs[_0x33bd('0x32')](_0x2cb7ba[_0x33bd('0x28')][_0x33bd('0x32')]);_0x46b46c[_0x33bd('0x33')]=qs['filters'](_[_0x33bd('0x34')](_0x2cb7ba[_0x33bd('0x28')],_0x5802ee['filters']),_0x1394d2);if(_0x2cb7ba[_0x33bd('0x28')][_0x33bd('0x35')]){_0x46b46c[_0x33bd('0x33')]=_[_0x33bd('0x36')](_0x46b46c[_0x33bd('0x33')],{'$or':_[_0x33bd('0x22')](_0x1394d2,function(_0x65f063){if(_0x65f063[_0x33bd('0x25')]!==_0x33bd('0x37')){var _0x2b129d={};_0x2b129d[_0x65f063[_0x33bd('0x1f')]]={'$like':'%'+_0x2cb7ba[_0x33bd('0x28')]['filter']+'%'};return _0x2b129d;}})});}_0x46b46c=_[_0x33bd('0x36')]({},_0x46b46c,_0x2cb7ba[_0x33bd('0x38')]);var _0x472ab4={'where':_0x46b46c['where']};return db[_0x33bd('0x23')][_0x33bd('0x18')](_0x472ab4)['then'](function(_0x50b1ca){_0x5d910b['count']=_0x50b1ca;if(_0x2cb7ba[_0x33bd('0x28')]['includeAll']){_0x46b46c['include']=[{'all':!![]}];}return db[_0x33bd('0x23')][_0x33bd('0x39')](_0x46b46c);})[_0x33bd('0xa')](function(_0x5a9b78){_0x5d910b[_0x33bd('0x3a')]=_0x5a9b78;return _0x5d910b;})[_0x33bd('0xa')](respondWithFilteredResult(_0x3fa635,_0x46b46c))[_0x33bd('0x13')](handleError(_0x3fa635,null));};exports[_0x33bd('0x3b')]=function(_0x158ba4,_0x38fb5b){var _0x36debc={'raw':!![],'where':{'id':_0x158ba4[_0x33bd('0x3c')]['id']}},_0x452d57={};_0x452d57['model']=_[_0x33bd('0x29')](db['Network'][_0x33bd('0x24')]);_0x452d57[_0x33bd('0x28')]=_[_0x33bd('0x29')](_0x158ba4[_0x33bd('0x28')]);_0x452d57['filters']=_[_0x33bd('0x2b')](_0x452d57[_0x33bd('0x27')],_0x452d57['query']);_0x36debc[_0x33bd('0x2c')]=_[_0x33bd('0x2b')](_0x452d57[_0x33bd('0x27')],qs['fields'](_0x158ba4[_0x33bd('0x28')]['fields']));_0x36debc[_0x33bd('0x2c')]=_0x36debc[_0x33bd('0x2c')][_0x33bd('0x2e')]?_0x36debc[_0x33bd('0x2c')]:_0x452d57[_0x33bd('0x27')];if(_0x158ba4[_0x33bd('0x28')]['includeAll']){_0x36debc[_0x33bd('0x3d')]=[{'all':!![]}];}_0x36debc=_[_0x33bd('0x36')]({},_0x36debc,_0x158ba4[_0x33bd('0x38')]);return db[_0x33bd('0x23')][_0x33bd('0x3e')](_0x36debc)[_0x33bd('0xa')](handleEntityNotFound(_0x38fb5b,null))[_0x33bd('0xa')](respondWithResult(_0x38fb5b,null))[_0x33bd('0x13')](handleError(_0x38fb5b,null));};exports[_0x33bd('0x3f')]=function(_0x139dca,_0x2b9707){var _0x33167e;return db['Network']['create'](_0x139dca[_0x33bd('0x40')],{'raw':!![]})[_0x33bd('0xa')](function(_0x40bfc8){_0x33167e=_0x40bfc8;return db[_0x33bd('0x23')][_0x33bd('0x39')]({'where':{'type':_0x139dca[_0x33bd('0x40')][_0x33bd('0x25')]},'raw':!![]});})[_0x33bd('0xa')](function(_0x3fe806){if(_0x33167e['type']['toUpperCase']()==_0x33bd('0x41')){var _0x4ddd2f=fs[_0x33bd('0x42')](path[_0x33bd('0x43')](config['root'],_0x33bd('0x44')),_0x33bd('0x45'));var _0x624a55=ejs[_0x33bd('0x46')](_0x4ddd2f,{'networks':_0x3fe806||[]});fs[_0x33bd('0x47')](_0x33bd('0x48'),_0x624a55);return respondWithRpcPromise('Reload',_0x33bd('0x3f'),{'module':_0x33bd('0x49')});}else if(_0x33167e['type']['toUpperCase']()==_0x33bd('0x4a')){var _0x2d7c4c=fs[_0x33bd('0x42')](path[_0x33bd('0x43')](config[_0x33bd('0x4b')],_0x33bd('0x4c')),_0x33bd('0x45'));var _0x5dfc0a=ejs['render'](_0x2d7c4c,{'networks':_0x3fe806||[]});fs[_0x33bd('0x47')](_0x33bd('0x4d'),_0x5dfc0a);return respondWithRpcPromise(_0x33bd('0x4e'),_0x33bd('0x3f'),{'module':'res_stun_monitor.so'});}else{var _0x4d3d8d=fs['readFileSync'](path[_0x33bd('0x43')](config[_0x33bd('0x4b')],'server/files/templates/network.ejs'),_0x33bd('0x45'));var _0x1ecdb8=ejs[_0x33bd('0x46')](_0x4d3d8d,{'networks':_0x3fe806||[]});fs[_0x33bd('0x47')](util['format'](_0x33bd('0x4f'),_0x139dca['body']['type']['toLowerCase']()),_0x1ecdb8);return respondWithRpcPromise(_0x33bd('0x4e'),_0x33bd('0x3f'),{'module':_0x33bd('0x50')});}})['then'](function(){return _0x33167e;})[_0x33bd('0xa')](respondWithResult(_0x2b9707,0xc9))[_0x33bd('0x13')](handleError(_0x2b9707,null));};exports[_0x33bd('0x51')]=function(_0x11cae4,_0x17d002){var _0x4ed90f;return db['Network'][_0x33bd('0x3e')]({'where':{'id':_0x11cae4[_0x33bd('0x3c')]['id']}})[_0x33bd('0xa')](handleEntityNotFound(_0x17d002,null))['then'](saveUpdates(_0x11cae4[_0x33bd('0x40')],null))[_0x33bd('0xa')](function(_0x59eff0){if(_0x59eff0){_0x4ed90f=_0x59eff0;return db['Network'][_0x33bd('0x39')]({'where':{'type':_0x4ed90f[_0x33bd('0x25')]},'raw':!![]});}return null;})[_0x33bd('0xa')](function(_0x5a5398){if(_0x4ed90f[_0x33bd('0x25')][_0x33bd('0x52')]()==_0x33bd('0x41')){var _0x2d5d12=fs[_0x33bd('0x42')](path[_0x33bd('0x43')](config[_0x33bd('0x4b')],_0x33bd('0x44')),_0x33bd('0x45'));var _0x50f420=ejs[_0x33bd('0x46')](_0x2d5d12,{'networks':_0x5a5398||[]});fs[_0x33bd('0x47')](_0x33bd('0x48'),_0x50f420);return respondWithRpcPromise(_0x33bd('0x4e'),'update',{'module':_0x33bd('0x49')});}else if(_0x4ed90f['type'][_0x33bd('0x52')]()=='TURN'){var _0x7a7527=fs[_0x33bd('0x42')](path['join'](config['root'],_0x33bd('0x4c')),'utf8');var _0x2df47a=ejs['render'](_0x7a7527,{'networks':_0x5a5398||[]});fs[_0x33bd('0x47')](_0x33bd('0x4d'),_0x2df47a);return respondWithRpcPromise(_0x33bd('0x4e'),_0x33bd('0x51'),{'module':_0x33bd('0x49')});}else{var _0x2b057d=fs[_0x33bd('0x42')](path[_0x33bd('0x43')](config[_0x33bd('0x4b')],_0x33bd('0x53')),_0x33bd('0x45'));var _0x4a254a=ejs['render'](_0x2b057d,{'networks':_0x5a5398||[]});fs['writeFileSync'](util['format'](_0x33bd('0x4f'),_0x11cae4[_0x33bd('0x40')][_0x33bd('0x25')][_0x33bd('0x54')]()),_0x4a254a);return respondWithRpcPromise('Reload','update',{'module':_0x33bd('0x50')});}})['then'](function(_0x1fbfa5){if(_0x1fbfa5){return _0x4ed90f;}return null;})['then'](respondWithResult(_0x17d002,null))['catch'](handleError(_0x17d002,null));};exports[_0x33bd('0x55')]=function(_0x28f79f,_0x181e1d){var _0x4c131d;return db[_0x33bd('0x23')]['find']({'where':{'id':_0x28f79f['params']['id']}})[_0x33bd('0xa')](function(_0x36443a){_0x4c131d=_0x36443a;return _0x36443a;})['then'](handleEntityNotFound(_0x181e1d,null))[_0x33bd('0xa')](removeEntity(_0x181e1d,null))[_0x33bd('0xa')](function(){if(_0x4c131d){return db[_0x33bd('0x23')]['findAll']({'where':{'type':_0x4c131d['type']},'raw':!![]});}})[_0x33bd('0xa')](function(_0x5c2fea){if(_0x4c131d[_0x33bd('0x25')]['toUpperCase']()==_0x33bd('0x41')){var _0x3456be=fs['readFileSync'](path[_0x33bd('0x43')](config[_0x33bd('0x4b')],_0x33bd('0x44')),'utf8');var _0x3727a4=ejs['render'](_0x3456be,{'networks':_0x5c2fea||[]});fs[_0x33bd('0x47')](_0x33bd('0x48'),_0x3727a4);return respondWithRpcPromise('Reload',_0x33bd('0x55'),{'module':'res_stun_monitor.so'});}else if(_0x4c131d[_0x33bd('0x25')]['toUpperCase']()==_0x33bd('0x4a')){var _0x500566=fs[_0x33bd('0x42')](path[_0x33bd('0x43')](config[_0x33bd('0x4b')],_0x33bd('0x4c')),_0x33bd('0x45'));var _0x2303c4=ejs[_0x33bd('0x46')](_0x500566,{'networks':_0x5c2fea||[]});fs[_0x33bd('0x47')](_0x33bd('0x4d'),_0x2303c4);return respondWithRpcPromise(_0x33bd('0x4e'),_0x33bd('0x55'),{'module':'res_stun_monitor.so'});}else{var _0x576d43=fs['readFileSync'](path[_0x33bd('0x43')](config['root'],'server/files/templates/network.ejs'),_0x33bd('0x45'));var _0x2d63cc=ejs[_0x33bd('0x46')](_0x576d43,{'networks':_0x5c2fea||[]});fs[_0x33bd('0x47')](util[_0x33bd('0x56')](_0x33bd('0x4f'),_0x4c131d[_0x33bd('0x25')][_0x33bd('0x54')]()),_0x2d63cc);return respondWithRpcPromise(_0x33bd('0x4e'),_0x33bd('0x55'),{'module':_0x33bd('0x50')});}})[_0x33bd('0x13')](handleError(_0x181e1d,null));}; \ No newline at end of file diff --git a/server/api/network/network.model.js b/server/api/network/network.model.js index 2bcedda..eb4ae46 100644 --- a/server/api/network/network.model.js +++ b/server/api/network/network.model.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xd52a=['define','network','util','api','moment','bluebird','path','rimraf','../../config/environment','./network.attributes'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0xd52a,0xca));var _0xad52=function(_0x219f5d,_0x4bab4c){_0x219f5d=_0x219f5d-0x0;var _0x2cb309=_0xd52a[_0x219f5d];return _0x2cb309;};'use strict';var _=require('lodash');var util=require(_0xad52('0x0'));var logger=require('../../config/logger')(_0xad52('0x1'));var moment=require(_0xad52('0x2'));var BPromise=require(_0xad52('0x3'));var rp=require('request-promise');var fs=require('fs');var path=require(_0xad52('0x4'));var rimraf=require(_0xad52('0x5'));var config=require(_0xad52('0x6'));var attributes=require(_0xad52('0x7'));module['exports']=function(_0x525806,_0x51bdaa){return _0x525806[_0xad52('0x8')]('Network',attributes,{'tableName':_0xad52('0x9'),'paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file +var _0x6ae2=['define','Network','network','lodash','util','../../config/logger','api','moment','bluebird','request-promise','path','rimraf','./network.attributes','exports'];(function(_0x1ac595,_0x5d2081){var _0x455fff=function(_0x3043ee){while(--_0x3043ee){_0x1ac595['push'](_0x1ac595['shift']());}};_0x455fff(++_0x5d2081);}(_0x6ae2,0x1ed));var _0x26ae=function(_0x343d5d,_0x5b0c5a){_0x343d5d=_0x343d5d-0x0;var _0x40a5eb=_0x6ae2[_0x343d5d];return _0x40a5eb;};'use strict';var _=require(_0x26ae('0x0'));var util=require(_0x26ae('0x1'));var logger=require(_0x26ae('0x2'))(_0x26ae('0x3'));var moment=require(_0x26ae('0x4'));var BPromise=require(_0x26ae('0x5'));var rp=require(_0x26ae('0x6'));var fs=require('fs');var path=require(_0x26ae('0x7'));var rimraf=require(_0x26ae('0x8'));var config=require('../../config/environment');var attributes=require(_0x26ae('0x9'));module[_0x26ae('0xa')]=function(_0x595da8,_0x5609b0){return _0x595da8[_0x26ae('0xb')](_0x26ae('0xc'),attributes,{'tableName':_0x26ae('0xd'),'paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file diff --git a/server/api/network/network.rpc.js b/server/api/network/network.rpc.js index d701d2d..d8f8074 100644 --- a/server/api/network/network.rpc.js +++ b/server/api/network/network.rpc.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x7a54=['info','Network,\x20%s,\x20%s','debug','stringify','error','code','message','request\x20sent','result','catch','lodash','util','moment','randomstring','ioredis','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','http'];(function(_0x2dafbe,_0x5d04de){var _0x58a45a=function(_0x50ac96){while(--_0x50ac96){_0x2dafbe['push'](_0x2dafbe['shift']());}};_0x58a45a(++_0x5d04de);}(_0x7a54,0x106));var _0x47a5=function(_0x15c7e2,_0x5cc2d0){_0x15c7e2=_0x15c7e2-0x0;var _0x5b4af3=_0x7a54[_0x15c7e2];return _0x5b4af3;};'use strict';var _=require(_0x47a5('0x0'));var util=require(_0x47a5('0x1'));var moment=require(_0x47a5('0x2'));var BPromise=require('bluebird');var rs=require(_0x47a5('0x3'));var fs=require('fs');var Redis=require(_0x47a5('0x4'));var db=require('../../mysqldb')['db'];var utils=require(_0x47a5('0x5'));var logger=require(_0x47a5('0x6'))(_0x47a5('0x7'));var config=require(_0x47a5('0x8'));var jayson=require(_0x47a5('0x9'));var client=jayson['client'][_0x47a5('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x59199c,_0x343372,_0x30e405){return new BPromise(function(_0x506eda,_0x194fb0){return client['request'](_0x59199c,_0x30e405)['then'](function(_0x582352){logger[_0x47a5('0xb')](_0x47a5('0xc'),_0x343372,'request\x20sent');logger[_0x47a5('0xd')]('Network,\x20%s,\x20%s,\x20%s',_0x343372,'request\x20sent',JSON[_0x47a5('0xe')](_0x582352));if(_0x582352[_0x47a5('0xf')]){if(_0x582352[_0x47a5('0xf')][_0x47a5('0x10')]===0x1f4){logger[_0x47a5('0xf')](_0x47a5('0xc'),_0x343372,_0x582352[_0x47a5('0xf')]['message']);return _0x194fb0(_0x582352[_0x47a5('0xf')][_0x47a5('0x11')]);}logger[_0x47a5('0xf')](_0x47a5('0xc'),_0x343372,_0x582352[_0x47a5('0xf')][_0x47a5('0x11')]);return _0x506eda(_0x582352[_0x47a5('0xf')][_0x47a5('0x11')]);}else{logger['info'](_0x47a5('0xc'),_0x343372,_0x47a5('0x12'));_0x506eda(_0x582352[_0x47a5('0x13')][_0x47a5('0x11')]);}})[_0x47a5('0x14')](function(_0x574af6){logger['error'](_0x47a5('0xc'),_0x343372,_0x574af6);_0x194fb0(_0x574af6);});});} \ No newline at end of file +var _0x7a54=['info','Network,\x20%s,\x20%s','debug','stringify','error','code','message','request\x20sent','result','catch','lodash','util','moment','randomstring','ioredis','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','http'];(function(_0x4b369d,_0x265eb8){var _0x571a98=function(_0x56341a){while(--_0x56341a){_0x4b369d['push'](_0x4b369d['shift']());}};_0x571a98(++_0x265eb8);}(_0x7a54,0x106));var _0x47a5=function(_0x15dfeb,_0x57637c){_0x15dfeb=_0x15dfeb-0x0;var _0xc2d4dd=_0x7a54[_0x15dfeb];return _0xc2d4dd;};'use strict';var _=require(_0x47a5('0x0'));var util=require(_0x47a5('0x1'));var moment=require(_0x47a5('0x2'));var BPromise=require('bluebird');var rs=require(_0x47a5('0x3'));var fs=require('fs');var Redis=require(_0x47a5('0x4'));var db=require('../../mysqldb')['db'];var utils=require(_0x47a5('0x5'));var logger=require(_0x47a5('0x6'))(_0x47a5('0x7'));var config=require(_0x47a5('0x8'));var jayson=require(_0x47a5('0x9'));var client=jayson['client'][_0x47a5('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x59199c,_0x343372,_0x30e405){return new BPromise(function(_0x506eda,_0x194fb0){return client['request'](_0x59199c,_0x30e405)['then'](function(_0x582352){logger[_0x47a5('0xb')](_0x47a5('0xc'),_0x343372,'request\x20sent');logger[_0x47a5('0xd')]('Network,\x20%s,\x20%s,\x20%s',_0x343372,'request\x20sent',JSON[_0x47a5('0xe')](_0x582352));if(_0x582352[_0x47a5('0xf')]){if(_0x582352[_0x47a5('0xf')][_0x47a5('0x10')]===0x1f4){logger[_0x47a5('0xf')](_0x47a5('0xc'),_0x343372,_0x582352[_0x47a5('0xf')]['message']);return _0x194fb0(_0x582352[_0x47a5('0xf')][_0x47a5('0x11')]);}logger[_0x47a5('0xf')](_0x47a5('0xc'),_0x343372,_0x582352[_0x47a5('0xf')][_0x47a5('0x11')]);return _0x506eda(_0x582352[_0x47a5('0xf')][_0x47a5('0x11')]);}else{logger['info'](_0x47a5('0xc'),_0x343372,_0x47a5('0x12'));_0x506eda(_0x582352[_0x47a5('0x13')][_0x47a5('0x11')]);}})[_0x47a5('0x14')](function(_0x574af6){logger['error'](_0x47a5('0xc'),_0x343372,_0x574af6);_0x194fb0(_0x574af6);});});} \ No newline at end of file diff --git a/server/api/openchannelAccount/index.js b/server/api/openchannelAccount/index.js index ea924ac..04c2313 100644 --- a/server/api/openchannelAccount/index.js +++ b/server/api/openchannelAccount/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x21c0=['get','isAuthenticated','index','describe','/:id','show','getDispositions','/:id/canned_answers','getAnswers','/:id/interactions','getInteractions','getAgents','post','create','/:id/dispositions','addAnswer','/:id/notify','notify','addApplications','/:id/users','addAgents','/:id/send','send','update','delete','destroy','removeDispositions','removeAnswers','removeAgents','exports','multer','util','path','connect-timeout','Router','../../components/auth/service','../../components/interaction/service','../../config/environment','./openchannelAccount.controller'];(function(_0x1ca46c,_0x542ad7){var _0x40db47=function(_0x424cce){while(--_0x424cce){_0x1ca46c['push'](_0x1ca46c['shift']());}};_0x40db47(++_0x542ad7);}(_0x21c0,0xe1));var _0x021c=function(_0x34df8f,_0x4e0ced){_0x34df8f=_0x34df8f-0x0;var _0x4db6da=_0x21c0[_0x34df8f];return _0x4db6da;};'use strict';var multer=require(_0x021c('0x0'));var util=require(_0x021c('0x1'));var path=require(_0x021c('0x2'));var timeout=require(_0x021c('0x3'));var express=require('express');var router=express[_0x021c('0x4')]();var fs_extra=require('fs-extra');var auth=require(_0x021c('0x5'));var interaction=require(_0x021c('0x6'));var config=require(_0x021c('0x7'));var controller=require(_0x021c('0x8'));router[_0x021c('0x9')]('/',auth[_0x021c('0xa')](),controller[_0x021c('0xb')]);router['get']('/describe',auth[_0x021c('0xa')](),controller[_0x021c('0xc')]);router[_0x021c('0x9')](_0x021c('0xd'),auth[_0x021c('0xa')](),controller[_0x021c('0xe')]);router[_0x021c('0x9')]('/:id/dispositions',auth[_0x021c('0xa')](),controller[_0x021c('0xf')]);router['get'](_0x021c('0x10'),auth[_0x021c('0xa')](),controller[_0x021c('0x11')]);router['get']('/:id/applications',auth[_0x021c('0xa')](),controller['getApplications']);router[_0x021c('0x9')](_0x021c('0x12'),auth[_0x021c('0xa')](),controller[_0x021c('0x13')]);router['get']('/:id/users',auth[_0x021c('0xa')](),controller[_0x021c('0x14')]);router[_0x021c('0x15')]('/',auth[_0x021c('0xa')](),controller[_0x021c('0x16')]);router[_0x021c('0x15')](_0x021c('0x17'),auth['isAuthenticated'](),controller['addDisposition']);router[_0x021c('0x15')](_0x021c('0x10'),auth[_0x021c('0xa')](),controller[_0x021c('0x18')]);router[_0x021c('0x15')](_0x021c('0x19'),controller[_0x021c('0x1a')]);router[_0x021c('0x15')]('/:id/applications',auth[_0x021c('0xa')](),controller[_0x021c('0x1b')]);router[_0x021c('0x15')](_0x021c('0x1c'),auth[_0x021c('0xa')](),controller[_0x021c('0x1d')]);router[_0x021c('0x15')](_0x021c('0x1e'),auth['isAuthenticated'](),controller[_0x021c('0x1f')]);router['put'](_0x021c('0xd'),auth[_0x021c('0xa')](),controller[_0x021c('0x20')]);router[_0x021c('0x21')]('/:id',auth['isAuthenticated'](),controller[_0x021c('0x22')]);router[_0x021c('0x21')](_0x021c('0x17'),auth['isAuthenticated'](),controller[_0x021c('0x23')]);router[_0x021c('0x21')](_0x021c('0x10'),auth[_0x021c('0xa')](),controller[_0x021c('0x24')]);router[_0x021c('0x21')](_0x021c('0x1c'),auth['isAuthenticated'](),controller[_0x021c('0x25')]);module[_0x021c('0x26')]=router; \ No newline at end of file +var _0x8850=['update','delete','destroy','removeDispositions','removeAnswers','exports','multer','util','path','connect-timeout','express','Router','../../components/interaction/service','../../config/environment','./openchannelAccount.controller','get','index','/describe','isAuthenticated','describe','/:id','show','/:id/dispositions','getDispositions','getAnswers','/:id/applications','getInteractions','/:id/users','post','create','/:id/notify','notify','addApplications','/:id/send'];(function(_0x4c3070,_0xc2fb4c){var _0x536a44=function(_0x1412a5){while(--_0x1412a5){_0x4c3070['push'](_0x4c3070['shift']());}};_0x536a44(++_0xc2fb4c);}(_0x8850,0x138));var _0x0885=function(_0x57b54c,_0x54ce0d){_0x57b54c=_0x57b54c-0x0;var _0x59cc19=_0x8850[_0x57b54c];return _0x59cc19;};'use strict';var multer=require(_0x0885('0x0'));var util=require(_0x0885('0x1'));var path=require(_0x0885('0x2'));var timeout=require(_0x0885('0x3'));var express=require(_0x0885('0x4'));var router=express[_0x0885('0x5')]();var fs_extra=require('fs-extra');var auth=require('../../components/auth/service');var interaction=require(_0x0885('0x6'));var config=require(_0x0885('0x7'));var controller=require(_0x0885('0x8'));router[_0x0885('0x9')]('/',auth['isAuthenticated'](),controller[_0x0885('0xa')]);router[_0x0885('0x9')](_0x0885('0xb'),auth[_0x0885('0xc')](),controller[_0x0885('0xd')]);router[_0x0885('0x9')](_0x0885('0xe'),auth['isAuthenticated'](),controller[_0x0885('0xf')]);router[_0x0885('0x9')](_0x0885('0x10'),auth[_0x0885('0xc')](),controller[_0x0885('0x11')]);router[_0x0885('0x9')]('/:id/canned_answers',auth[_0x0885('0xc')](),controller[_0x0885('0x12')]);router['get'](_0x0885('0x13'),auth['isAuthenticated'](),controller['getApplications']);router['get']('/:id/interactions',auth[_0x0885('0xc')](),controller[_0x0885('0x14')]);router[_0x0885('0x9')](_0x0885('0x15'),auth[_0x0885('0xc')](),controller['getAgents']);router[_0x0885('0x16')]('/',auth['isAuthenticated'](),controller[_0x0885('0x17')]);router['post'](_0x0885('0x10'),auth[_0x0885('0xc')](),controller['addDisposition']);router[_0x0885('0x16')]('/:id/canned_answers',auth['isAuthenticated'](),controller['addAnswer']);router[_0x0885('0x16')](_0x0885('0x18'),controller[_0x0885('0x19')]);router[_0x0885('0x16')](_0x0885('0x13'),auth['isAuthenticated'](),controller[_0x0885('0x1a')]);router[_0x0885('0x16')](_0x0885('0x15'),auth['isAuthenticated'](),controller['addAgents']);router[_0x0885('0x16')](_0x0885('0x1b'),auth[_0x0885('0xc')](),controller['send']);router['put']('/:id',auth[_0x0885('0xc')](),controller[_0x0885('0x1c')]);router[_0x0885('0x1d')](_0x0885('0xe'),auth['isAuthenticated'](),controller[_0x0885('0x1e')]);router[_0x0885('0x1d')](_0x0885('0x10'),auth[_0x0885('0xc')](),controller[_0x0885('0x1f')]);router['delete']('/:id/canned_answers',auth[_0x0885('0xc')](),controller[_0x0885('0x20')]);router[_0x0885('0x1d')](_0x0885('0x15'),auth[_0x0885('0xc')](),controller['removeAgents']);module[_0x0885('0x21')]=router; \ No newline at end of file diff --git a/server/api/openchannelAccount/openchannelAccount.attributes.js b/server/api/openchannelAccount/openchannelAccount.attributes.js index be7c23a..f7c6a8a 100644 --- a/server/api/openchannelAccount/openchannelAccount.attributes.js +++ b/server/api/openchannelAccount/openchannelAccount.attributes.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x4cc6=['sequelize','randomstring','exports','STRING','TEXT','BOOLEAN','INTEGER','setDataValue','mandatoryDispositionPauseId','mandatoryDisposition'];(function(_0x3dbc72,_0x4c9a7b){var _0xb6a492=function(_0xf0cecf){while(--_0xf0cecf){_0x3dbc72['push'](_0x3dbc72['shift']());}};_0xb6a492(++_0x4c9a7b);}(_0x4cc6,0x12c));var _0x64cc=function(_0x1a0ef3,_0x535bbf){_0x1a0ef3=_0x1a0ef3-0x0;var _0x2b86da=_0x4cc6[_0x1a0ef3];return _0x2b86da;};'use strict';var Sequelize=require(_0x64cc('0x0'));var rs=require(_0x64cc('0x1'));module[_0x64cc('0x2')]={'name':{'type':Sequelize[_0x64cc('0x3')],'unique':'name','allowNull':![]},'description':{'type':Sequelize[_0x64cc('0x3')]},'token':{'type':Sequelize[_0x64cc('0x3')],'defaultValue':function(){return rs['generate']();}},'replyUri':{'type':Sequelize[_0x64cc('0x3')],'validate':{'isUrl':!![]}},'key':{'type':Sequelize[_0x64cc('0x3')],'allowNull':![]},'notificationTemplate':{'type':Sequelize[_0x64cc('0x4')],'defaultValue':function(){return'Account:\x20{{account.name}}
{{#queue}}Queue:\x20{{queue.name}}
{{/queue}}From\x20:\x20{{from}}';}},'notificationSound':{'type':Sequelize[_0x64cc('0x5')],'defaultValue':!![]},'notificationShake':{'type':Sequelize[_0x64cc('0x5')],'defaultValue':![]},'waitForTheAssignedAgent':{'type':Sequelize[_0x64cc('0x6')],'validate':{'min':0x1,'max':0x20c49b},'defaultValue':0xa},'mapKey':{'type':Sequelize[_0x64cc('0x3')]},'queueTransfer':{'type':Sequelize[_0x64cc('0x5')],'defaultValue':![]},'queueTransferTimeout':{'type':Sequelize[_0x64cc('0x6')],'validate':{'min':0x1,'max':0x20c49b},'defaultValue':0x12c},'agentTransfer':{'type':Sequelize[_0x64cc('0x5')],'defaultValue':![]},'agentTransferTimeout':{'type':Sequelize['INTEGER'],'validate':{'min':0x1,'max':0x20c49b},'defaultValue':0x12c},'mandatoryDispositionPauseId':{'type':Sequelize[_0x64cc('0x6')],'allowNull':!![],'defaultValue':null,'comment':'Status\x20to\x20put\x20when\x20mandatory\x20disposition\x20is\x20enabled'},'mandatoryDisposition':{'type':Sequelize[_0x64cc('0x5')],'defaultValue':![],'comment':'Enabled/disables\x20mandatory\x20dispo\x20on\x20a\x20queue','set':function(_0x4b5d99){if(!_0x4b5d99)this[_0x64cc('0x7')](_0x64cc('0x8'),null);this[_0x64cc('0x7')](_0x64cc('0x9'),_0x4b5d99);}}}; \ No newline at end of file +var _0x1742=['INTEGER','Status\x20to\x20put\x20when\x20mandatory\x20disposition\x20is\x20enabled','Enabled/disables\x20mandatory\x20dispo\x20on\x20a\x20queue','setDataValue','mandatoryDispositionPauseId','mandatoryDisposition','sequelize','randomstring','exports','STRING','name','generate','TEXT','Account:\x20{{account.name}}
{{#queue}}Queue:\x20{{queue.name}}
{{/queue}}From\x20:\x20{{from}}','BOOLEAN'];(function(_0x652978,_0x250907){var _0x33c7f9=function(_0x4597fc){while(--_0x4597fc){_0x652978['push'](_0x652978['shift']());}};_0x33c7f9(++_0x250907);}(_0x1742,0xab));var _0x2174=function(_0x53e74e,_0x39a29f){_0x53e74e=_0x53e74e-0x0;var _0xd3994d=_0x1742[_0x53e74e];return _0xd3994d;};'use strict';var Sequelize=require(_0x2174('0x0'));var rs=require(_0x2174('0x1'));module[_0x2174('0x2')]={'name':{'type':Sequelize[_0x2174('0x3')],'unique':_0x2174('0x4'),'allowNull':![]},'description':{'type':Sequelize[_0x2174('0x3')]},'token':{'type':Sequelize['STRING'],'defaultValue':function(){return rs[_0x2174('0x5')]();}},'replyUri':{'type':Sequelize[_0x2174('0x3')],'validate':{'isUrl':!![]}},'key':{'type':Sequelize[_0x2174('0x3')],'allowNull':![]},'notificationTemplate':{'type':Sequelize[_0x2174('0x6')],'defaultValue':function(){return _0x2174('0x7');}},'notificationSound':{'type':Sequelize[_0x2174('0x8')],'defaultValue':!![]},'notificationShake':{'type':Sequelize[_0x2174('0x8')],'defaultValue':![]},'waitForTheAssignedAgent':{'type':Sequelize[_0x2174('0x9')],'validate':{'min':0x1,'max':0x20c49b},'defaultValue':0xa},'mapKey':{'type':Sequelize[_0x2174('0x3')]},'queueTransfer':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'queueTransferTimeout':{'type':Sequelize[_0x2174('0x9')],'validate':{'min':0x1,'max':0x20c49b},'defaultValue':0x12c},'agentTransfer':{'type':Sequelize[_0x2174('0x8')],'defaultValue':![]},'agentTransferTimeout':{'type':Sequelize['INTEGER'],'validate':{'min':0x1,'max':0x20c49b},'defaultValue':0x12c},'mandatoryDispositionPauseId':{'type':Sequelize['INTEGER'],'allowNull':!![],'defaultValue':null,'comment':_0x2174('0xa')},'mandatoryDisposition':{'type':Sequelize[_0x2174('0x8')],'defaultValue':![],'comment':_0x2174('0xb'),'set':function(_0x4d763c){if(!_0x4d763c)this[_0x2174('0xc')](_0x2174('0xd'),null);this[_0x2174('0xc')](_0x2174('0xe'),_0x4d763c);}}}; \ No newline at end of file diff --git a/server/api/openchannelAccount/openchannelAccount.controller.js b/server/api/openchannelAccount/openchannelAccount.controller.js index 40f3b2d..b4eda18 100644 --- a/server/api/openchannelAccount/openchannelAccount.controller.js +++ b/server/api/openchannelAccount/openchannelAccount.controller.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xe189=['bulkCreate','findAndCountAll','finally','getApplications','order','getInteractions','Contact','Owner','fullname','internal','Tag','Tags','color','tag','addAgents','omit','userOpenchannelAccount:save','removeAgents','emit','getAgents','CmList','out','Messages','dataValues','eml-format','fast-json-patch','request-promise','moment','bluebird','path','sox','to-csv','ejs','fs-extra','squel','crypto','jsforce','querystring','papaparse','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../config/license/util','redis','localhost','./openchannelAccount.socket','register','jayson/promise','http','then','OpenchannelAccount,\x20%s,\x20%s','debug','request\x20sent','stringify','error','code','message','result','status','end','json','offset','undefined','limit','count','set','Content-Range','apply','reject','save','update','destroy','UserProfileResource','sendStatus','stack','name','send','index','Pause','map','OpenchannelAccount','fieldName','type','key','model','query','keys','fields','attributes','length','hasOwnProperty','nolimit','sort','where','filters','filter','merge','VIRTUAL','options','includeAll','include','findAll','rows','catch','show','mandatoryDispositionPause','intersection','find','create','body','user','get','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','UserProfileSection','autoAssociation','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','params','describe','addDisposition','OpenchannelAccountId','findOne','Disposition','pick','removeDispositions','ids','addAnswer','CannedAnswer','getAnswers','rawAttributes','notify','openchannel','CmContact','Sequelize','ValidationError','no\x20available\x20attributes','difference','createdAt','updatedAt','CompanyId','isNil','from','from\x20is\x20mandatory','body\x20is\x20mandatory\x20and\x20not\x20empty','mapKey','mapKey\x20invalid,\x20please\x20use\x20one\x20of\x20these:\x20','Contacts','DESC','OpenchannelApplication','Applications','applications','orderBy','priority','asc','account','List','defaults','ListId','contact','firstName','threadId','externalUrl','OpenchannelInteraction','ContactId','spread','messageId','created','autoclose','push','unmanaged','*,*,*,*','OpenchannelMessage','AttachmentId','UserId','User','agent','waitForTheAssignedAgent','forcedOwnership','Start','startRouting','EventManager','addApplications','sequelize','Transaction','ISOLATION_LEVELS'];(function(_0x4d613c,_0x55f220){var _0x301fe3=function(_0x5eec0b){while(--_0x5eec0b){_0x4d613c['push'](_0x4d613c['shift']());}};_0x301fe3(++_0x55f220);}(_0xe189,0x194));var _0x9e18=function(_0x42e6fd,_0x245974){_0x42e6fd=_0x42e6fd-0x0;var _0x1e2e2d=_0xe189[_0x42e6fd];return _0x1e2e2d;};'use strict';var emlformat=require(_0x9e18('0x0'));var rimraf=require('rimraf');var zipdir=require('zip-dir');var jsonpatch=require(_0x9e18('0x1'));var rp=require(_0x9e18('0x2'));var moment=require(_0x9e18('0x3'));var BPromise=require(_0x9e18('0x4'));var Mustache=require('mustache');var util=require('util');var path=require(_0x9e18('0x5'));var sox=require(_0x9e18('0x6'));var csv=require(_0x9e18('0x7'));var ejs=require(_0x9e18('0x8'));var fs=require('fs');var fs_extra=require(_0x9e18('0x9'));var _=require('lodash');var squel=require(_0x9e18('0xa'));var crypto=require(_0x9e18('0xb'));var jsforce=require(_0x9e18('0xc'));var deskjs=require('desk.js');var toCsv=require(_0x9e18('0x7'));var querystring=require(_0x9e18('0xd'));var Papa=require(_0x9e18('0xe'));var Redis=require('ioredis');var authService=require(_0x9e18('0xf'));var qs=require(_0x9e18('0x10'));var as=require(_0x9e18('0x11'));var hardwareService=require(_0x9e18('0x12'));var logger=require(_0x9e18('0x13'))(_0x9e18('0x14'));var utils=require(_0x9e18('0x15'));var config=require(_0x9e18('0x16'));var licenseUtil=require(_0x9e18('0x17'));var db=require('../../mysqldb')['db'];config[_0x9e18('0x18')]=_['defaults'](config[_0x9e18('0x18')],{'host':_0x9e18('0x19'),'port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config[_0x9e18('0x18')]));require(_0x9e18('0x1a'))[_0x9e18('0x1b')](socket);var jayson=require(_0x9e18('0x1c'));var client=jayson['client'][_0x9e18('0x1d')]({'port':0x232c});var client9002=jayson['client']['http']({'port':0x232a});function respondWithRpcPromise(_0xb10405,_0x4e7bcb,_0x691a51,_0x3a2ad9){return new BPromise(function(_0x1f71fc,_0x35416b){var _0x576e6e=_0x3a2ad9||client;return _0x576e6e['request'](_0xb10405,_0x691a51)[_0x9e18('0x1e')](function(_0x446098){logger['info'](_0x9e18('0x1f'),_0x4e7bcb,'request\x20sent');logger[_0x9e18('0x20')]('OpenchannelAccount,\x20%s,\x20%s,\x20%s',_0x4e7bcb,_0x9e18('0x21'),JSON[_0x9e18('0x22')](_0x446098));if(_0x446098[_0x9e18('0x23')]){if(_0x446098[_0x9e18('0x23')][_0x9e18('0x24')]===0x1f4){logger[_0x9e18('0x23')](_0x9e18('0x1f'),_0x4e7bcb,_0x446098[_0x9e18('0x23')][_0x9e18('0x25')]);return _0x35416b(_0x446098['error'][_0x9e18('0x25')]);}logger[_0x9e18('0x23')](_0x9e18('0x1f'),_0x4e7bcb,_0x446098['error'][_0x9e18('0x25')]);return _0x1f71fc(_0x446098['error'][_0x9e18('0x25')]);}else{logger['info'](_0x9e18('0x1f'),_0x4e7bcb,'request\x20sent');_0x1f71fc(_0x446098[_0x9e18('0x26')][_0x9e18('0x25')]);}})['catch'](function(_0x12f90d){logger['error']('OpenchannelAccount,\x20%s,\x20%s',_0x4e7bcb,_0x12f90d);_0x35416b(_0x12f90d);});});}function respondWithStatusCode(_0x445f10,_0x5efbde){_0x5efbde=_0x5efbde||0xcc;return function(_0x4513e7){if(_0x4513e7){return _0x445f10['sendStatus'](_0x5efbde);}return _0x445f10[_0x9e18('0x27')](_0x5efbde)[_0x9e18('0x28')]();};}function respondWithResult(_0x2cee0f,_0xd115f3){_0xd115f3=_0xd115f3||0xc8;return function(_0x33fbd5){if(_0x33fbd5){return _0x2cee0f[_0x9e18('0x27')](_0xd115f3)[_0x9e18('0x29')](_0x33fbd5);}};}function respondWithFilteredResult(_0x3917fb,_0xc75df0){return function(_0x5e1eb2){if(_0x5e1eb2){var _0x2ee4da=typeof _0xc75df0[_0x9e18('0x2a')]===_0x9e18('0x2b')&&typeof _0xc75df0[_0x9e18('0x2c')]==='undefined';var _0x56cb83=_0x5e1eb2[_0x9e18('0x2d')];var _0x1bb217=_0x2ee4da?0x0:_0xc75df0[_0x9e18('0x2a')];var _0x3d4da3=_0x2ee4da?_0x5e1eb2[_0x9e18('0x2d')]:_0xc75df0['offset']+_0xc75df0[_0x9e18('0x2c')];var _0x3862d9;if(_0x3d4da3>=_0x56cb83){_0x3d4da3=_0x56cb83;_0x3862d9=0xc8;}else{_0x3862d9=0xce;}_0x3917fb[_0x9e18('0x27')](_0x3862d9);return _0x3917fb[_0x9e18('0x2e')](_0x9e18('0x2f'),_0x1bb217+'-'+_0x3d4da3+'/'+_0x56cb83)[_0x9e18('0x29')](_0x5e1eb2);}return null;};}function patchUpdates(_0x5e2917){return function(_0x1d0ca4){try{jsonpatch[_0x9e18('0x30')](_0x1d0ca4,_0x5e2917,!![]);}catch(_0x153627){return BPromise[_0x9e18('0x31')](_0x153627);}return _0x1d0ca4[_0x9e18('0x32')]();};}function saveUpdates(_0x56f1e2,_0x5b830c){return function(_0x3dba8c){if(_0x3dba8c){return _0x3dba8c[_0x9e18('0x33')](_0x56f1e2)[_0x9e18('0x1e')](function(_0xe49a38){return _0xe49a38;});}return null;};}function removeEntity(_0x4b489a,_0x3cb118){return function(_0x1779a1){if(_0x1779a1){return _0x1779a1[_0x9e18('0x34')]()['then'](function(){var _0xf1d492=_0x1779a1['get']({'plain':!![]});var _0x26c457='OpenchannelAccounts';return db[_0x9e18('0x35')][_0x9e18('0x34')]({'where':{'type':_0x26c457,'resourceId':_0xf1d492['id']}})[_0x9e18('0x1e')](function(){return _0x1779a1;});})[_0x9e18('0x1e')](function(){_0x4b489a[_0x9e18('0x27')](0xcc)[_0x9e18('0x28')]();});}};}function handleEntityNotFound(_0x90019f,_0x22b590){return function(_0x267230){if(!_0x267230){_0x90019f[_0x9e18('0x36')](0x194);}return _0x267230;};}function handleError(_0x24712f,_0x55e3bc){_0x55e3bc=_0x55e3bc||0x1f4;return function(_0x370bfa){logger[_0x9e18('0x23')](_0x370bfa[_0x9e18('0x37')]);if(_0x370bfa[_0x9e18('0x38')]){delete _0x370bfa[_0x9e18('0x38')];}_0x24712f[_0x9e18('0x27')](_0x55e3bc)[_0x9e18('0x39')](_0x370bfa);};}exports[_0x9e18('0x3a')]=function(_0xb9b589,_0x41cf02){var _0x258969={'include':[{'model':db[_0x9e18('0x3b')],'as':'mandatoryDispositionPause'}]},_0x251376={},_0x3d727d={'count':0x0,'rows':[]};var _0x236ab1=_[_0x9e18('0x3c')](db[_0x9e18('0x3d')]['rawAttributes'],function(_0x155695){return{'name':_0x155695[_0x9e18('0x3e')],'type':_0x155695[_0x9e18('0x3f')][_0x9e18('0x40')]};});_0x251376[_0x9e18('0x41')]=_[_0x9e18('0x3c')](_0x236ab1,_0x9e18('0x38'));_0x251376[_0x9e18('0x42')]=_[_0x9e18('0x43')](_0xb9b589[_0x9e18('0x42')]);_0x251376['filters']=_['intersection'](_0x251376['model'],_0x251376[_0x9e18('0x42')]);_0x258969['attributes']=_['intersection'](_0x251376[_0x9e18('0x41')],qs[_0x9e18('0x44')](_0xb9b589[_0x9e18('0x42')]['fields']));_0x258969[_0x9e18('0x45')]=_0x258969[_0x9e18('0x45')][_0x9e18('0x46')]?_0x258969[_0x9e18('0x45')]:_0x251376[_0x9e18('0x41')];if(!_0xb9b589['query'][_0x9e18('0x47')](_0x9e18('0x48'))){_0x258969[_0x9e18('0x2c')]=qs[_0x9e18('0x2c')](_0xb9b589['query'][_0x9e18('0x2c')]);_0x258969[_0x9e18('0x2a')]=qs[_0x9e18('0x2a')](_0xb9b589[_0x9e18('0x42')][_0x9e18('0x2a')]);}_0x258969['order']=qs[_0x9e18('0x49')](_0xb9b589[_0x9e18('0x42')][_0x9e18('0x49')]);_0x258969[_0x9e18('0x4a')]=qs[_0x9e18('0x4b')](_['pick'](_0xb9b589['query'],_0x251376['filters']),_0x236ab1);if(_0xb9b589['query'][_0x9e18('0x4c')]){_0x258969[_0x9e18('0x4a')]=_[_0x9e18('0x4d')](_0x258969[_0x9e18('0x4a')],{'$or':_[_0x9e18('0x3c')](_0x236ab1,function(_0x4ce590){if(_0x4ce590[_0x9e18('0x3f')]!==_0x9e18('0x4e')){var _0x375f11={};_0x375f11[_0x4ce590[_0x9e18('0x38')]]={'$like':'%'+_0xb9b589['query']['filter']+'%'};return _0x375f11;}})});}_0x258969=_[_0x9e18('0x4d')]({},_0x258969,_0xb9b589[_0x9e18('0x4f')]);var _0x1887ca={'where':_0x258969[_0x9e18('0x4a')]};return db[_0x9e18('0x3d')][_0x9e18('0x2d')](_0x1887ca)['then'](function(_0x37e035){_0x3d727d['count']=_0x37e035;if(_0xb9b589[_0x9e18('0x42')][_0x9e18('0x50')]){_0x258969[_0x9e18('0x51')]=[{'all':!![]}];}return db[_0x9e18('0x3d')][_0x9e18('0x52')](_0x258969);})[_0x9e18('0x1e')](function(_0x2ae645){_0x3d727d[_0x9e18('0x53')]=_0x2ae645;return _0x3d727d;})[_0x9e18('0x1e')](respondWithFilteredResult(_0x41cf02,_0x258969))[_0x9e18('0x54')](handleError(_0x41cf02,null));};exports[_0x9e18('0x55')]=function(_0x3a0926,_0x1fb423){var _0x3f76b5={'raw':![],'where':{'id':_0x3a0926['params']['id']},'include':[{'model':db[_0x9e18('0x3b')],'as':_0x9e18('0x56')}]},_0x25eb32={};_0x25eb32[_0x9e18('0x41')]=_[_0x9e18('0x43')](db[_0x9e18('0x3d')]['rawAttributes']);_0x25eb32[_0x9e18('0x42')]=_[_0x9e18('0x43')](_0x3a0926[_0x9e18('0x42')]);_0x25eb32[_0x9e18('0x4b')]=_[_0x9e18('0x57')](_0x25eb32[_0x9e18('0x41')],_0x25eb32[_0x9e18('0x42')]);_0x3f76b5[_0x9e18('0x45')]=_[_0x9e18('0x57')](_0x25eb32[_0x9e18('0x41')],qs[_0x9e18('0x44')](_0x3a0926[_0x9e18('0x42')][_0x9e18('0x44')]));_0x3f76b5[_0x9e18('0x45')]=_0x3f76b5[_0x9e18('0x45')][_0x9e18('0x46')]?_0x3f76b5[_0x9e18('0x45')]:_0x25eb32[_0x9e18('0x41')];if(_0x3a0926[_0x9e18('0x42')][_0x9e18('0x50')]){_0x3f76b5[_0x9e18('0x51')]=[{'all':!![]}];}_0x3f76b5=_[_0x9e18('0x4d')]({},_0x3f76b5,_0x3a0926[_0x9e18('0x4f')]);return db[_0x9e18('0x3d')][_0x9e18('0x58')](_0x3f76b5)[_0x9e18('0x1e')](handleEntityNotFound(_0x1fb423,null))[_0x9e18('0x1e')](respondWithResult(_0x1fb423,null))['catch'](handleError(_0x1fb423,null));};exports[_0x9e18('0x59')]=function(_0x363f59,_0x40cd5c){return db[_0x9e18('0x3d')][_0x9e18('0x59')](_0x363f59[_0x9e18('0x5a')],{})[_0x9e18('0x1e')](function(_0x4b3a50){var _0x16aad5=_0x363f59[_0x9e18('0x5b')][_0x9e18('0x5c')]({'plain':!![]});if(!_0x16aad5)throw new Error(_0x9e18('0x5d'));if(_0x16aad5[_0x9e18('0x5e')]===_0x9e18('0x5b')){var _0x283ceb=_0x4b3a50[_0x9e18('0x5c')]({'plain':!![]});var _0x2c2081='OpenchannelAccounts';return db[_0x9e18('0x5f')][_0x9e18('0x58')]({'where':{'name':_0x2c2081,'userProfileId':_0x16aad5['userProfileId']},'raw':!![]})[_0x9e18('0x1e')](function(_0x450e4b){if(_0x450e4b&&_0x450e4b[_0x9e18('0x60')]===0x0){return db[_0x9e18('0x35')][_0x9e18('0x59')]({'name':_0x283ceb[_0x9e18('0x38')],'resourceId':_0x283ceb['id'],'type':_0x450e4b[_0x9e18('0x38')],'sectionId':_0x450e4b['id']},{})[_0x9e18('0x1e')](function(){return _0x4b3a50;});}else{return _0x4b3a50;}})[_0x9e18('0x54')](function(_0x4c6545){logger[_0x9e18('0x23')](_0x9e18('0x61'),_0x4c6545);throw _0x4c6545;});}return _0x4b3a50;})[_0x9e18('0x1e')](respondWithResult(_0x40cd5c,0xc9))[_0x9e18('0x54')](handleError(_0x40cd5c,null));};exports['update']=function(_0x1480f1,_0x4eb9d7){if(_0x1480f1[_0x9e18('0x5a')]['id']){delete _0x1480f1[_0x9e18('0x5a')]['id'];}return db[_0x9e18('0x3d')][_0x9e18('0x58')]({'where':{'id':_0x1480f1[_0x9e18('0x62')]['id']},'include':[{'model':db[_0x9e18('0x3b')],'as':_0x9e18('0x56')}]})[_0x9e18('0x1e')](handleEntityNotFound(_0x4eb9d7,null))['then'](saveUpdates(_0x1480f1[_0x9e18('0x5a')],null))[_0x9e18('0x1e')](respondWithResult(_0x4eb9d7,null))[_0x9e18('0x54')](handleError(_0x4eb9d7,null));};exports[_0x9e18('0x34')]=function(_0x540259,_0x4abb78){return db[_0x9e18('0x3d')][_0x9e18('0x58')]({'where':{'id':_0x540259[_0x9e18('0x62')]['id']}})[_0x9e18('0x1e')](handleEntityNotFound(_0x4abb78,null))[_0x9e18('0x1e')](removeEntity(_0x4abb78,null))[_0x9e18('0x54')](handleError(_0x4abb78,null));};exports['describe']=function(_0x58bdae,_0x2c341a){return db[_0x9e18('0x3d')][_0x9e18('0x63')]()[_0x9e18('0x1e')](respondWithResult(_0x2c341a,null))[_0x9e18('0x54')](handleError(_0x2c341a,null));};exports[_0x9e18('0x64')]=function(_0x5e2fe7,_0x5d012,_0x5202e2){if(_0x5e2fe7['body']['id']){delete _0x5e2fe7['body']['id'];}return db['OpenchannelAccount'][_0x9e18('0x58')]({'where':{'id':_0x5e2fe7[_0x9e18('0x62')]['id']}})[_0x9e18('0x1e')](handleEntityNotFound(_0x5d012,null))[_0x9e18('0x1e')](function(_0x2592da){if(_0x2592da){_0x5e2fe7[_0x9e18('0x5a')][_0x9e18('0x65')]=_0x2592da['id'];return db['Disposition'][_0x9e18('0x59')](_0x5e2fe7[_0x9e18('0x5a')]);}})['then'](respondWithResult(_0x5d012,null))['catch'](handleError(_0x5d012,null));};exports['getDispositions']=function(_0x563994,_0x17c422,_0xaf891d){var _0x1fffbe={'raw':![],'where':{}};var _0x1e5312={};var _0x5cbdac={'count':0x0,'rows':[]};return db['OpenchannelAccount'][_0x9e18('0x66')]({'where':{'id':_0x563994[_0x9e18('0x62')]['id']}})[_0x9e18('0x1e')](handleEntityNotFound(_0x17c422,null))[_0x9e18('0x1e')](function(_0x551ae7){if(_0x551ae7){_0x1e5312['model']=_['keys'](db[_0x9e18('0x67')]['rawAttributes']);_0x1e5312[_0x9e18('0x42')]=_[_0x9e18('0x43')](_0x563994[_0x9e18('0x42')]);_0x1e5312[_0x9e18('0x4b')]=_[_0x9e18('0x57')](_0x1e5312[_0x9e18('0x41')],_0x1e5312[_0x9e18('0x42')]);_0x1fffbe[_0x9e18('0x45')]=_[_0x9e18('0x57')](_0x1e5312['model'],qs[_0x9e18('0x44')](_0x563994['query']['fields']));_0x1fffbe[_0x9e18('0x45')]=_0x1fffbe[_0x9e18('0x45')][_0x9e18('0x46')]?_0x1fffbe[_0x9e18('0x45')]:_0x1e5312[_0x9e18('0x41')];if(!_0x563994['query'][_0x9e18('0x47')](_0x9e18('0x48'))){_0x1fffbe[_0x9e18('0x2c')]=qs['limit'](_0x563994[_0x9e18('0x42')][_0x9e18('0x2c')]);_0x1fffbe['offset']=qs[_0x9e18('0x2a')](_0x563994['query']['offset']);}_0x1fffbe['order']=qs[_0x9e18('0x49')](_0x563994[_0x9e18('0x42')]['sort']);_0x1fffbe[_0x9e18('0x4a')]=qs[_0x9e18('0x4b')](_[_0x9e18('0x68')](_0x563994['query'],_0x1e5312['filters']));_0x1fffbe[_0x9e18('0x4a')]['OpenchannelAccountId']=_0x551ae7['id'];if(_0x563994[_0x9e18('0x42')][_0x9e18('0x4c')]){_0x1fffbe['where']=_[_0x9e18('0x4d')](_0x1fffbe['where'],{'$or':_[_0x9e18('0x3c')](_0x1fffbe[_0x9e18('0x45')],function(_0x547a65){var _0xace322={};_0xace322[_0x547a65]={'$like':'%'+_0x563994[_0x9e18('0x42')]['filter']+'%'};return _0xace322;})});}_0x1fffbe=_[_0x9e18('0x4d')]({},_0x1fffbe,_0x563994[_0x9e18('0x4f')]);return db[_0x9e18('0x67')][_0x9e18('0x2d')]({'where':_0x1fffbe[_0x9e18('0x4a')]})[_0x9e18('0x1e')](function(_0x393e5f){_0x5cbdac[_0x9e18('0x2d')]=_0x393e5f;if(_0x563994[_0x9e18('0x42')][_0x9e18('0x50')]){_0x1fffbe[_0x9e18('0x51')]=[{'all':!![]}];}return db[_0x9e18('0x67')][_0x9e18('0x52')](_0x1fffbe);})['then'](function(_0x5d5919){_0x5cbdac[_0x9e18('0x53')]=_0x5d5919;return _0x5cbdac;});}})[_0x9e18('0x1e')](respondWithFilteredResult(_0x17c422,_0x1fffbe))['catch'](handleError(_0x17c422,null));};exports[_0x9e18('0x69')]=function(_0x8cb02b,_0x1bc44c,_0x21bc20){return db[_0x9e18('0x3d')]['find']({'where':{'id':_0x8cb02b['params']['id']}})[_0x9e18('0x1e')](handleEntityNotFound(_0x1bc44c,null))[_0x9e18('0x1e')](function(_0x513578){if(_0x513578){return _0x513578[_0x9e18('0x69')](_0x8cb02b[_0x9e18('0x42')][_0x9e18('0x6a')]);}})[_0x9e18('0x1e')](respondWithStatusCode(_0x1bc44c,null))['catch'](handleError(_0x1bc44c,null));};exports[_0x9e18('0x6b')]=function(_0x5d3d15,_0x263a69,_0x22ab65){if(_0x5d3d15[_0x9e18('0x5a')]['id']){delete _0x5d3d15[_0x9e18('0x5a')]['id'];}return db[_0x9e18('0x3d')][_0x9e18('0x58')]({'where':{'id':_0x5d3d15[_0x9e18('0x62')]['id']}})[_0x9e18('0x1e')](handleEntityNotFound(_0x263a69,null))['then'](function(_0x239057){if(_0x239057){_0x5d3d15[_0x9e18('0x5a')][_0x9e18('0x65')]=_0x239057['id'];return db[_0x9e18('0x6c')]['create'](_0x5d3d15['body']);}})[_0x9e18('0x1e')](respondWithResult(_0x263a69,null))[_0x9e18('0x54')](handleError(_0x263a69,null));};exports[_0x9e18('0x6d')]=function(_0x267ef2,_0x39826f,_0x46edce){var _0x456d27={'raw':![],'where':{}};var _0x19339c={};var _0x1561a0={'count':0x0,'rows':[]};return db[_0x9e18('0x3d')][_0x9e18('0x66')]({'where':{'id':_0x267ef2[_0x9e18('0x62')]['id']}})[_0x9e18('0x1e')](handleEntityNotFound(_0x39826f,null))['then'](function(_0x202f4d){if(_0x202f4d){_0x19339c[_0x9e18('0x41')]=_['keys'](db[_0x9e18('0x6c')][_0x9e18('0x6e')]);_0x19339c[_0x9e18('0x42')]=_[_0x9e18('0x43')](_0x267ef2[_0x9e18('0x42')]);_0x19339c[_0x9e18('0x4b')]=_[_0x9e18('0x57')](_0x19339c['model'],_0x19339c[_0x9e18('0x42')]);_0x456d27['attributes']=_[_0x9e18('0x57')](_0x19339c[_0x9e18('0x41')],qs[_0x9e18('0x44')](_0x267ef2[_0x9e18('0x42')][_0x9e18('0x44')]));_0x456d27[_0x9e18('0x45')]=_0x456d27['attributes']['length']?_0x456d27['attributes']:_0x19339c[_0x9e18('0x41')];if(!_0x267ef2[_0x9e18('0x42')]['hasOwnProperty'](_0x9e18('0x48'))){_0x456d27['limit']=qs[_0x9e18('0x2c')](_0x267ef2['query'][_0x9e18('0x2c')]);_0x456d27[_0x9e18('0x2a')]=qs[_0x9e18('0x2a')](_0x267ef2[_0x9e18('0x42')][_0x9e18('0x2a')]);}_0x456d27['order']=qs['sort'](_0x267ef2[_0x9e18('0x42')]['sort']);_0x456d27['where']=qs[_0x9e18('0x4b')](_[_0x9e18('0x68')](_0x267ef2[_0x9e18('0x42')],_0x19339c[_0x9e18('0x4b')]));_0x456d27[_0x9e18('0x4a')][_0x9e18('0x65')]=_0x202f4d['id'];if(_0x267ef2['query'][_0x9e18('0x4c')]){_0x456d27[_0x9e18('0x4a')]=_['merge'](_0x456d27[_0x9e18('0x4a')],{'$or':_['map'](_0x456d27[_0x9e18('0x45')],function(_0x1ebe11){var _0x326687={};_0x326687[_0x1ebe11]={'$like':'%'+_0x267ef2[_0x9e18('0x42')]['filter']+'%'};return _0x326687;})});}_0x456d27=_['merge']({},_0x456d27,_0x267ef2[_0x9e18('0x4f')]);return db['CannedAnswer']['count']({'where':_0x456d27[_0x9e18('0x4a')]})[_0x9e18('0x1e')](function(_0x56f3bf){_0x1561a0['count']=_0x56f3bf;if(_0x267ef2[_0x9e18('0x42')][_0x9e18('0x50')]){_0x456d27['include']=[{'all':!![]}];}return db['CannedAnswer'][_0x9e18('0x52')](_0x456d27);})['then'](function(_0x1c9e8a){_0x1561a0['rows']=_0x1c9e8a;return _0x1561a0;});}})[_0x9e18('0x1e')](respondWithFilteredResult(_0x39826f,_0x456d27))[_0x9e18('0x54')](handleError(_0x39826f,null));};exports['removeAnswers']=function(_0x1aefc5,_0x50d3e8,_0x5678e6){return db[_0x9e18('0x3d')][_0x9e18('0x58')]({'where':{'id':_0x1aefc5[_0x9e18('0x62')]['id']}})['then'](handleEntityNotFound(_0x50d3e8,null))['then'](function(_0x581b1e){if(_0x581b1e){return _0x581b1e['removeAnswers'](_0x1aefc5[_0x9e18('0x42')]['ids']);}})[_0x9e18('0x1e')](respondWithStatusCode(_0x50d3e8,null))[_0x9e18('0x54')](handleError(_0x50d3e8,null));};exports[_0x9e18('0x6f')]=function(_0x4e5ca9,_0x129a82,_0x5c57e1){var _0x5f1b7f={'body':_0x4e5ca9['body'],'channel':_0x9e18('0x70')};var _0x411f30=[];var _0x2f6bc6=[];var _0x1cad6f={};var _0x325196=![];return db[_0x9e18('0x71')]['describe']()['then'](function(_0xd1aa02){if(!_0xd1aa02){throw new db[(_0x9e18('0x72'))][(_0x9e18('0x73'))](_0x9e18('0x74'));}_0x411f30=_[_0x9e18('0x75')](_[_0x9e18('0x43')](_0xd1aa02),[_0x9e18('0x76'),_0x9e18('0x77')]);_0x2f6bc6=_[_0x9e18('0x75')](_[_0x9e18('0x43')](_0xd1aa02),[_0x9e18('0x76'),'updatedAt',_0x9e18('0x78'),'ListId']);if(_0x4e5ca9[_0x9e18('0x5a')]['id']){delete _0x4e5ca9[_0x9e18('0x5a')]['id'];}if(_[_0x9e18('0x79')](_0x4e5ca9[_0x9e18('0x5a')][_0x9e18('0x7a')])){throw new db[(_0x9e18('0x72'))]['ValidationError'](_0x9e18('0x7b'));}if(_['isNil'](_0x4e5ca9[_0x9e18('0x5a')][_0x9e18('0x5a')])||_0x4e5ca9[_0x9e18('0x5a')][_0x9e18('0x5a')]===''){throw new db[(_0x9e18('0x72'))]['ValidationError'](_0x9e18('0x7c'));}if(_[_0x9e18('0x79')](_0x4e5ca9[_0x9e18('0x5a')]['mapKey'])){throw new db[(_0x9e18('0x72'))]['ValidationError']('mapKey\x20is\x20mandatory,\x20please\x20use\x20one\x20of\x20these:\x20'+_0x2f6bc6);}if(!_['includes'](_0x2f6bc6,_0x4e5ca9[_0x9e18('0x5a')][_0x9e18('0x7d')])){throw new db[(_0x9e18('0x72'))][(_0x9e18('0x73'))](_0x9e18('0x7e')+_0x2f6bc6);}_0x1cad6f[_0x4e5ca9['body'][_0x9e18('0x7d')]]=_0x4e5ca9[_0x9e18('0x5a')]['from'];})[_0x9e18('0x1e')](function(){return db[_0x9e18('0x3d')][_0x9e18('0x58')]({'where':{'id':_0x4e5ca9[_0x9e18('0x62')]['id']},'include':[{'model':db['CmList'],'as':'List','include':[{'model':db[_0x9e18('0x71')],'as':_0x9e18('0x7f'),'where':_0x1cad6f,'limit':0x1,'order':[[_0x9e18('0x77'),_0x9e18('0x80')]]}]},{'model':db[_0x9e18('0x81')],'as':_0x9e18('0x82')}]});})['then'](handleEntityNotFound(_0x129a82,null))[_0x9e18('0x1e')](function(_0x3129bb){if(_0x3129bb&&_0x3129bb['List']){_0x5f1b7f['account']=_0x3129bb;_0x5f1b7f[_0x9e18('0x83')]=_0x3129bb['Applications'];_0x5f1b7f['list']=_0x3129bb['List'];_0x5f1b7f[_0x9e18('0x83')]=_[_0x9e18('0x84')](_0x5f1b7f['applications'],[_0x9e18('0x85')],[_0x9e18('0x86')]);if(_0x5f1b7f['account'][_0x9e18('0x82')]){delete _0x5f1b7f[_0x9e18('0x87')]['Applications'];}if(_0x5f1b7f[_0x9e18('0x87')][_0x9e18('0x88')]&&_0x5f1b7f[_0x9e18('0x87')][_0x9e18('0x88')][_0x9e18('0x7f')][_0x9e18('0x46')]){return _0x5f1b7f[_0x9e18('0x87')][_0x9e18('0x88')][_0x9e18('0x7f')][0x0];}var _0xf24544=_[_0x9e18('0x89')](_0x4e5ca9[_0x9e18('0x5a')],{'firstName':_0x4e5ca9[_0x9e18('0x5a')]['from'],'ListId':_0x3129bb[_0x9e18('0x8a')]});_0xf24544[_0x4e5ca9[_0x9e18('0x5a')][_0x9e18('0x7d')]]=_0x4e5ca9[_0x9e18('0x5a')][_0x9e18('0x7a')];return db[_0x9e18('0x71')][_0x9e18('0x59')](_0xf24544,{'fields':_0x411f30,'raw':!![]});}})[_0x9e18('0x1e')](handleEntityNotFound(_0x129a82,null))[_0x9e18('0x1e')](function(_0x345542){_0x5f1b7f[_0x9e18('0x8b')]=_0x345542;if(_0x345542){var _0x13a44a={'ContactId':_0x345542['id'],'OpenchannelAccountId':_0x4e5ca9[_0x9e18('0x62')]['id'],'from':(_0x345542[_0x9e18('0x8c')]||'')+'\x20'+(_0x345542['lastName']||'')};var _0x3938d4={'OpenchannelAccountId':_0x4e5ca9['params']['id'],'closed':![]};if(_0x4e5ca9[_0x9e18('0x5a')]['threadId']){_0x3938d4[_0x9e18('0x8d')]=_0x4e5ca9[_0x9e18('0x5a')]['threadId'];return db['OpenchannelInteraction'][_0x9e18('0x58')]({'where':_0x3938d4})[_0x9e18('0x1e')](function(_0x432d08){if(_0x432d08){return[_0x432d08,![]];}_0x13a44a['threadId']=_0x4e5ca9['body']['threadId'];_0x13a44a[_0x9e18('0x8e')]=_0x4e5ca9[_0x9e18('0x5a')][_0x9e18('0x8e')];return db[_0x9e18('0x8f')][_0x9e18('0x59')](_0x13a44a)['then'](function(_0x8096cc){return[_0x8096cc,!![]];});});}else{_0x3938d4[_0x9e18('0x8d')]=null;}_0x3938d4[_0x9e18('0x90')]=_0x345542['id'];return db[_0x9e18('0x8f')]['find']({'where':_0x3938d4})[_0x9e18('0x1e')](function(_0x44df24){if(_0x44df24){return[_0x44df24,![]];}return db[_0x9e18('0x8f')][_0x9e18('0x59')](_0x13a44a)[_0x9e18('0x1e')](function(_0x5412ae){return[_0x5412ae,!![]];});});}})[_0x9e18('0x91')](function(_0x29e13b,_0xb330bd){if(_0x29e13b){_0x325196=_0xb330bd;if(!_0xb330bd){var _0x570fa4={'from':(_0x5f1b7f[_0x9e18('0x8b')][_0x9e18('0x8c')]||'')+'\x20'+(_0x5f1b7f[_0x9e18('0x8b')]['lastName']||'')};if(_0x4e5ca9[_0x9e18('0x5a')][_0x9e18('0x8d')]&&_0x4e5ca9[_0x9e18('0x5a')][_0x9e18('0x92')]&&_0x4e5ca9[_0x9e18('0x5a')][_0x9e18('0x8d')]!=_0x4e5ca9[_0x9e18('0x5a')]['messageId']){_0x570fa4['threadId']=_0x4e5ca9['body'][_0x9e18('0x92')];}return _0x29e13b['update'](_0x570fa4);}else{return _0x29e13b;}}})['then'](function(_0xd35969){_0x5f1b7f['interaction']=_0xd35969[_0x9e18('0x5c')]({'plain':!![]});_0x5f1b7f['interaction'][_0x9e18('0x93')]=_0x325196;if(_0x5f1b7f['interaction']['created']){if(_0x5f1b7f['account'][_0x9e18('0x94')]){_0x5f1b7f[_0x9e18('0x83')][_0x9e18('0x95')]({'id':0x0,'priority':_0x5f1b7f[_0x9e18('0x83')]['length']+0x1,'app':'close','appdata':_0x9e18('0x96'),'interval':_0x9e18('0x97')});}}return db[_0x9e18('0x98')][_0x9e18('0x59')]({'body':_0x4e5ca9[_0x9e18('0x5a')][_0x9e18('0x5a')],'OpenchannelAccountId':_0x4e5ca9[_0x9e18('0x62')]['id'],'OpenchannelInteractionId':_0xd35969['id'],'direction':'in','ContactId':_0x5f1b7f[_0x9e18('0x8b')]['id'],'AttachmentId':_0x4e5ca9[_0x9e18('0x5a')][_0x9e18('0x99')]});})[_0x9e18('0x1e')](function(_0x51ad98){_0x5f1b7f['message']=_0x51ad98;if(_0x5f1b7f['interaction'][_0x9e18('0x9a')]){return db[_0x9e18('0x9b')][_0x9e18('0x58')]({'attributes':['id',_0x9e18('0x38')],'where':{'id':_0x5f1b7f['interaction'][_0x9e18('0x9a')]}})[_0x9e18('0x1e')](function(_0x245278){if(_0x245278){_0x5f1b7f[_0x9e18('0x83')]['unshift']({'id':0x0,'priority':0x0,'app':_0x9e18('0x9c'),'appdata':_0x245278[_0x9e18('0x38')]+','+(_0x5f1b7f[_0x9e18('0x87')][_0x9e18('0x9d')]||0xa),'interval':_0x9e18('0x97')});_0x5f1b7f[_0x9e18('0x9e')]=![];}return respondWithRpcPromise(_0x9e18('0x9f'),_0x9e18('0xa0'),_0x5f1b7f);});}return respondWithRpcPromise(_0x9e18('0x9f'),_0x9e18('0xa0'),_0x5f1b7f);})['then'](function(_0x2f1231){respondWithRpcPromise(_0x9e18('0xa1'),_0x9e18('0xa1'),{'event':_0x9e18('0x6f'),'message':_0x2f1231},client9002);return _0x2f1231;})[_0x9e18('0x1e')](respondWithResult(_0x129a82,null))[_0x9e18('0x54')](handleError(_0x129a82,null));};exports[_0x9e18('0xa2')]=function(_0x3c2816,_0x3b7269){var _0x433140=_0x3c2816['params']['id'];var _0x598bca=_0x3c2816[_0x9e18('0x5a')];var _0x467ee7=0xc8;var _0x46536e=null;return db[_0x9e18('0xa3')]['transaction']({'isolationLevel':db[_0x9e18('0xa3')][_0x9e18('0xa4')][_0x9e18('0xa5')]['READ_COMMITTED']},function(_0xb3645e){return db['OpenchannelAccount'][_0x9e18('0x66')]({'where':{'id':_0x433140},'transaction':_0xb3645e})[_0x9e18('0x1e')](function(_0x37585a){if(_0x37585a){return db[_0x9e18('0x81')][_0x9e18('0x34')]({'where':{'OpenchannelAccountId':_0x433140},'transaction':_0xb3645e})[_0x9e18('0x1e')](function(){var _0x1eb79d=_['map'](_0x598bca,function(_0x4c991a){_0x4c991a[_0x9e18('0x65')]=_0x433140;return _0x4c991a;});return db[_0x9e18('0x81')][_0x9e18('0xa6')](_0x1eb79d,{'transaction':_0xb3645e});});}else{_0x467ee7=0x194;_0x46536e=[];}});})[_0x9e18('0x1e')](function(){if(_0x467ee7!==0x194){return db[_0x9e18('0x81')][_0x9e18('0xa7')]({'where':{'OpenchannelAccountId':_0x433140},'order':_0x9e18('0x85')})['then'](function(_0x700047){_0x46536e=_0x700047;});}})[_0x9e18('0x54')](function(_0x405ed7){_0x467ee7=0x1f4;logger[_0x9e18('0x23')](_0x405ed7[_0x9e18('0x37')]);if(_0x405ed7[_0x9e18('0x38')]){delete _0x405ed7[_0x9e18('0x38')];}_0x46536e=_0x405ed7;})[_0x9e18('0xa8')](function(){if(_0x46536e===null){_0x3b7269[_0x9e18('0x36')](_0x467ee7);}else{if(_0x467ee7===0x1f4){_0x3b7269[_0x9e18('0x27')](_0x467ee7)[_0x9e18('0x39')](_0x46536e);}else{_0x3b7269[_0x9e18('0x27')](_0x467ee7)[_0x9e18('0x29')](_0x46536e);}}});};exports[_0x9e18('0xa9')]=function(_0x37a362,_0x3c63fc,_0x1e2f42){var _0x5b21ce={};var _0x381c42={};var _0x1b5f4c;var _0x53626b;return db['OpenchannelAccount'][_0x9e18('0x66')]({'where':{'id':_0x37a362[_0x9e18('0x62')]['id']}})[_0x9e18('0x1e')](handleEntityNotFound(_0x3c63fc,null))[_0x9e18('0x1e')](function(_0x2f384f){if(_0x2f384f){_0x1b5f4c=_0x2f384f;_0x381c42[_0x9e18('0x41')]=_[_0x9e18('0x43')](db[_0x9e18('0x81')][_0x9e18('0x6e')]);_0x381c42['query']=_[_0x9e18('0x43')](_0x37a362['query']);_0x381c42[_0x9e18('0x4b')]=_['intersection'](_0x381c42[_0x9e18('0x41')],_0x381c42[_0x9e18('0x42')]);_0x5b21ce[_0x9e18('0x45')]=_[_0x9e18('0x57')](_0x381c42['model'],qs[_0x9e18('0x44')](_0x37a362[_0x9e18('0x42')][_0x9e18('0x44')]));_0x5b21ce[_0x9e18('0x45')]=_0x5b21ce[_0x9e18('0x45')][_0x9e18('0x46')]?_0x5b21ce[_0x9e18('0x45')]:_0x381c42[_0x9e18('0x41')];_0x5b21ce[_0x9e18('0xaa')]=qs[_0x9e18('0x49')](_0x37a362['query']['sort']);_0x5b21ce[_0x9e18('0x4a')]=qs[_0x9e18('0x4b')](_['pick'](_0x37a362['query'],_0x381c42[_0x9e18('0x4b')]));if(_0x37a362[_0x9e18('0x42')][_0x9e18('0x4c')]){_0x5b21ce[_0x9e18('0x4a')]=_[_0x9e18('0x4d')](_0x5b21ce[_0x9e18('0x4a')],{'$or':_[_0x9e18('0x3c')](_0x5b21ce['attributes'],function(_0x3a62e2){var _0x30deb0={};_0x30deb0[_0x3a62e2]={'$like':'%'+_0x37a362['query'][_0x9e18('0x4c')]+'%'};return _0x30deb0;})});}_0x5b21ce=_[_0x9e18('0x4d')]({},_0x5b21ce,_0x37a362[_0x9e18('0x4f')]);return _0x1b5f4c[_0x9e18('0xa9')](_0x5b21ce);}})[_0x9e18('0x1e')](function(_0x1140d8){if(_0x1140d8){_0x53626b=_0x1140d8[_0x9e18('0x46')];if(!_0x37a362['query'][_0x9e18('0x47')](_0x9e18('0x48'))){_0x5b21ce['limit']=qs[_0x9e18('0x2c')](_0x37a362['query'][_0x9e18('0x2c')]);_0x5b21ce['offset']=qs[_0x9e18('0x2a')](_0x37a362[_0x9e18('0x42')][_0x9e18('0x2a')]);}return _0x1b5f4c[_0x9e18('0xa9')](_0x5b21ce);}})[_0x9e18('0x1e')](function(_0x104589){if(_0x104589){return _0x104589?{'count':_0x53626b,'rows':_0x104589}:null;}})[_0x9e18('0x1e')](respondWithResult(_0x3c63fc,null))[_0x9e18('0x54')](handleError(_0x3c63fc,null));};exports[_0x9e18('0xab')]=function(_0x518891,_0x4460bc,_0x1fe2b7){var _0x20f271={'raw':![],'where':{}};var _0x28d451={};var _0x52c5fb={'count':0x0,'rows':[]};return db[_0x9e18('0x3d')]['findOne']({'where':{'id':_0x518891[_0x9e18('0x62')]['id']}})[_0x9e18('0x1e')](handleEntityNotFound(_0x4460bc,null))[_0x9e18('0x1e')](function(_0x1ab55e){if(_0x1ab55e){_0x28d451[_0x9e18('0x41')]=_[_0x9e18('0x43')](db[_0x9e18('0x8f')][_0x9e18('0x6e')]);_0x28d451['query']=_[_0x9e18('0x43')](_0x518891[_0x9e18('0x42')]);_0x28d451[_0x9e18('0x4b')]=_[_0x9e18('0x57')](_0x28d451[_0x9e18('0x41')],_0x28d451[_0x9e18('0x42')]);_0x20f271[_0x9e18('0x45')]=_[_0x9e18('0x57')](_0x28d451[_0x9e18('0x41')],qs[_0x9e18('0x44')](_0x518891['query'][_0x9e18('0x44')]));_0x20f271['attributes']=_0x20f271['attributes'][_0x9e18('0x46')]?_0x20f271[_0x9e18('0x45')]:_0x28d451['model'];if(!_0x518891[_0x9e18('0x42')][_0x9e18('0x47')](_0x9e18('0x48'))){_0x20f271[_0x9e18('0x2c')]=qs[_0x9e18('0x2c')](_0x518891['query'][_0x9e18('0x2c')]);_0x20f271[_0x9e18('0x2a')]=qs['offset'](_0x518891[_0x9e18('0x42')][_0x9e18('0x2a')]);}_0x20f271[_0x9e18('0xaa')]=qs[_0x9e18('0x49')](_0x518891[_0x9e18('0x42')]['sort']);_0x20f271[_0x9e18('0x4a')]=qs[_0x9e18('0x4b')](_['pick'](_0x518891[_0x9e18('0x42')],_0x28d451[_0x9e18('0x4b')]));_0x20f271['where'][_0x9e18('0x65')]=_0x1ab55e['id'];if(_0x518891['query'][_0x9e18('0x4c')]){_0x20f271['where']=_[_0x9e18('0x4d')](_0x20f271[_0x9e18('0x4a')],{'$or':_[_0x9e18('0x3c')](_0x20f271[_0x9e18('0x45')],function(_0x48f50e){var _0x55c986={};_0x55c986[_0x48f50e]={'$like':'%'+_0x518891['query'][_0x9e18('0x4c')]+'%'};return _0x55c986;})});}_0x20f271=_[_0x9e18('0x4d')]({},_0x20f271,_0x518891[_0x9e18('0x4f')]);return db[_0x9e18('0x8f')][_0x9e18('0x2d')]({'where':_0x20f271[_0x9e18('0x4a')]})[_0x9e18('0x1e')](function(_0x4de2fa){_0x52c5fb['count']=_0x4de2fa;if(_0x518891[_0x9e18('0x42')][_0x9e18('0x50')]){_0x20f271[_0x9e18('0x51')]=[{'model':db[_0x9e18('0x71')],'as':_0x9e18('0xac'),'required':![]},{'model':db[_0x9e18('0x9b')],'as':_0x9e18('0xad'),'attributes':[_0x9e18('0x38'),_0x9e18('0xae'),_0x9e18('0xaf')],'required':![]},{'model':db[_0x9e18('0xb0')],'as':_0x9e18('0xb1'),'attributes':['id','name',_0x9e18('0xb2')],'where':_0x518891[_0x9e18('0x42')][_0x9e18('0xb3')]?{'id':_0x518891[_0x9e18('0x42')]['tag']}:undefined,'required':_0x518891[_0x9e18('0x42')][_0x9e18('0xb3')]?!![]:![]}];}return db[_0x9e18('0x8f')]['findAll'](_0x20f271);})[_0x9e18('0x1e')](function(_0x120465){_0x52c5fb[_0x9e18('0x53')]=_0x120465;return _0x52c5fb;});}})[_0x9e18('0x1e')](respondWithFilteredResult(_0x4460bc,_0x20f271))[_0x9e18('0x54')](handleError(_0x4460bc,null));};exports[_0x9e18('0xb4')]=function(_0x1bacd1,_0x457aff,_0x6269c3){return db[_0x9e18('0x3d')][_0x9e18('0x58')]({'where':{'id':_0x1bacd1[_0x9e18('0x62')]['id']}})[_0x9e18('0x1e')](handleEntityNotFound(_0x457aff,null))['then'](function(_0x42d334){if(_0x42d334){return _0x42d334[_0x9e18('0xb4')](_0x1bacd1[_0x9e18('0x5a')][_0x9e18('0x6a')],_[_0x9e18('0xb5')](_0x1bacd1[_0x9e18('0x5a')],[_0x9e18('0x6a'),'id'])||{})['spread'](function(_0x2253b8){for(var _0x30d0ca=0x0;_0x30d0ca<_0x1bacd1[_0x9e18('0x5a')][_0x9e18('0x6a')][_0x9e18('0x46')];_0x30d0ca+=0x1){socket['emit'](_0x9e18('0xb6'),{'UserId':Number(_0x1bacd1[_0x9e18('0x5a')][_0x9e18('0x6a')][_0x30d0ca]),'OpenchannelAccountId':Number(_0x1bacd1[_0x9e18('0x62')]['id'])});}return _0x2253b8;});}})[_0x9e18('0x1e')](respondWithResult(_0x457aff,null))[_0x9e18('0x54')](handleError(_0x457aff,null));};exports[_0x9e18('0xb7')]=function(_0x5db31a,_0x2848fe,_0x13d0ca){return db['OpenchannelAccount'][_0x9e18('0x58')]({'where':{'id':_0x5db31a[_0x9e18('0x62')]['id']}})[_0x9e18('0x1e')](handleEntityNotFound(_0x2848fe,null))[_0x9e18('0x1e')](function(_0x3a3c83){if(_0x3a3c83){return _0x3a3c83['removeAgents'](_0x5db31a[_0x9e18('0x42')][_0x9e18('0x6a')])[_0x9e18('0x1e')](function(){if(_['isArray'](_0x5db31a[_0x9e18('0x42')][_0x9e18('0x6a')])){for(var _0x5375bb=0x0;_0x5375bb<_0x5db31a[_0x9e18('0x42')][_0x9e18('0x6a')][_0x9e18('0x46')];_0x5375bb+=0x1){socket[_0x9e18('0xb8')]('userOpenchannelAccount:remove',{'UserId':Number(_0x5db31a[_0x9e18('0x42')]['ids'][_0x5375bb]),'OpenchannelAccountId':Number(_0x5db31a[_0x9e18('0x62')]['id'])});}}else{socket[_0x9e18('0xb8')]('userOpenchannelAccount:remove',{'UserId':Number(_0x5db31a[_0x9e18('0x42')]['ids']),'OpenchannelAccountId':Number(_0x5db31a[_0x9e18('0x62')]['id'])});}});}})[_0x9e18('0x1e')](respondWithStatusCode(_0x2848fe,null))[_0x9e18('0x54')](handleError(_0x2848fe,null));};exports['getAgents']=function(_0x4ad89d,_0x556d24,_0x30eb01){var _0x17226b={};var _0x4b1c7e={};var _0x22ed48;var _0x3ca1a5;return db['OpenchannelAccount']['findOne']({'where':{'id':_0x4ad89d[_0x9e18('0x62')]['id']}})[_0x9e18('0x1e')](handleEntityNotFound(_0x556d24,null))['then'](function(_0x1225f5){if(_0x1225f5){_0x22ed48=_0x1225f5;_0x4b1c7e[_0x9e18('0x41')]=_[_0x9e18('0x43')](db[_0x9e18('0x9b')][_0x9e18('0x6e')]);_0x4b1c7e[_0x9e18('0x42')]=_[_0x9e18('0x43')](_0x4ad89d[_0x9e18('0x42')]);_0x4b1c7e[_0x9e18('0x4b')]=_[_0x9e18('0x57')](_0x4b1c7e[_0x9e18('0x41')],_0x4b1c7e[_0x9e18('0x42')]);_0x17226b['attributes']=_['intersection'](_0x4b1c7e[_0x9e18('0x41')],qs['fields'](_0x4ad89d[_0x9e18('0x42')][_0x9e18('0x44')]));_0x17226b[_0x9e18('0x45')]=_0x17226b[_0x9e18('0x45')]['length']?_0x17226b[_0x9e18('0x45')]:_0x4b1c7e[_0x9e18('0x41')];_0x17226b['order']=qs[_0x9e18('0x49')](_0x4ad89d[_0x9e18('0x42')]['sort']);_0x17226b['where']=qs['filters'](_[_0x9e18('0x68')](_0x4ad89d['query'],_0x4b1c7e[_0x9e18('0x4b')]));if(_0x4ad89d[_0x9e18('0x42')]['filter']){_0x17226b[_0x9e18('0x4a')]=_[_0x9e18('0x4d')](_0x17226b[_0x9e18('0x4a')],{'$or':_['map'](_0x17226b[_0x9e18('0x45')],function(_0x539894){var _0x1f0a84={};_0x1f0a84[_0x539894]={'$like':'%'+_0x4ad89d[_0x9e18('0x42')][_0x9e18('0x4c')]+'%'};return _0x1f0a84;})});}_0x17226b=_[_0x9e18('0x4d')]({},_0x17226b,_0x4ad89d['options']);return _0x22ed48[_0x9e18('0xb9')](_0x17226b);}})[_0x9e18('0x1e')](function(_0xbbfda4){if(_0xbbfda4){_0x3ca1a5=_0xbbfda4[_0x9e18('0x46')];if(!_0x4ad89d['query'][_0x9e18('0x47')](_0x9e18('0x48'))){_0x17226b['limit']=qs['limit'](_0x4ad89d[_0x9e18('0x42')][_0x9e18('0x2c')]);_0x17226b['offset']=qs[_0x9e18('0x2a')](_0x4ad89d[_0x9e18('0x42')][_0x9e18('0x2a')]);}return _0x22ed48['getAgents'](_0x17226b);}})['then'](function(_0x1ae226){if(_0x1ae226){return _0x1ae226?{'count':_0x3ca1a5,'rows':_0x1ae226}:null;}})[_0x9e18('0x1e')](respondWithResult(_0x556d24,null))['catch'](handleError(_0x556d24,null));};exports['send']=function(_0x10497f,_0x329b85,_0x5f4666){var _0x59c91c,_0x5f10d9,_0x570fe0;if(_[_0x9e18('0x79')](_0x10497f['body'][_0x9e18('0x5a')])||_0x10497f[_0x9e18('0x5a')][_0x9e18('0x5a')]===''){throw new db[(_0x9e18('0x72'))][(_0x9e18('0x73'))](_0x9e18('0x7c'));}if(_[_0x9e18('0x79')](_0x10497f[_0x9e18('0x5a')]['to'])){}_0x59c91c=_0x10497f[_0x9e18('0x5a')]['to'];return db[_0x9e18('0x3d')][_0x9e18('0x66')]({'where':{'id':_0x10497f['params']['id']}})[_0x9e18('0x1e')](handleEntityNotFound(_0x329b85,null))['then'](function(_0x491a0b){if(_0x491a0b){return db['OpenchannelAccount'][_0x9e18('0x58')]({'where':{'id':_0x491a0b['id']},'include':[{'model':db[_0x9e18('0xba')],'as':_0x9e18('0x88'),'include':[{'model':db[_0x9e18('0x71')],'as':'Contacts','where':{[_0x491a0b[_0x9e18('0x7d')]]:_0x59c91c},'limit':0x1,'order':[[_0x9e18('0x77'),_0x9e18('0x80')]]}]}]})[_0x9e18('0x1e')](handleEntityNotFound(_0x329b85,null))[_0x9e18('0x1e')](function(_0x51a538){if(_0x51a538&&_0x51a538[_0x9e18('0x88')]){_0x5f10d9=_0x51a538['get']({'plain':!![]});if(_0x5f10d9[_0x9e18('0x88')]&&_0x5f10d9['List']['Contacts'][_0x9e18('0x46')]){return _0x5f10d9[_0x9e18('0x88')][_0x9e18('0x7f')][0x0];}return db[_0x9e18('0x71')][_0x9e18('0x59')](_['defaults'](_0x10497f[_0x9e18('0x5a')],{'firstName':_0x59c91c,[_0x51a538['mapKey']]:_0x59c91c,'phone':_0x59c91c,'ListId':_0x5f10d9[_0x9e18('0x8a')]}));}})[_0x9e18('0x1e')](handleEntityNotFound(_0x329b85,null))[_0x9e18('0x1e')](function(_0x56e1a8){if(_0x56e1a8){_0x570fe0=_0x56e1a8;return db[_0x9e18('0x8f')][_0x9e18('0x58')]({'where':{'ContactId':_0x570fe0['id'],'closed':![],'OpenchannelAccountId':_0x5f10d9['id']}})['then'](function(_0x5737fb){if(_0x5737fb){return[_0x5737fb,![]];}return db[_0x9e18('0x8f')][_0x9e18('0x59')]({'UserId':_0x10497f['user']['id'],'ContactId':_0x570fe0['id'],'OpenchannelAccountId':_0x5f10d9['id'],'lastMsgDirection':_0x9e18('0xbb'),'firstMsgDirection':_0x9e18('0xbb'),'Messages':[_[_0x9e18('0x4d')](_0x10497f['body'],{'read':![],'body':_0x10497f[_0x9e18('0x5a')][_0x9e18('0x5a')],'OpenchannelAccountId':_0x5f10d9['id'],'UserId':_0x10497f[_0x9e18('0x5b')]['id'],'ContactId':_0x570fe0['id']})]},{'include':[{'model':db[_0x9e18('0x98')],'as':_0x9e18('0xbc')}]})[_0x9e18('0x1e')](function(_0x36203b){return[_0x36203b,!![]];});});}})[_0x9e18('0x91')](function(_0x29aa81,_0x24160a){if(_0x24160a){return _0x29aa81;}return db['OpenchannelMessage'][_0x9e18('0x59')](_[_0x9e18('0x4d')](_0x10497f[_0x9e18('0x5a')],{'read':![],'body':_0x10497f[_0x9e18('0x5a')][_0x9e18('0x5a')],'OpenchannelAccountId':_0x5f10d9['id'],'OpenchannelInteractionId':_0x29aa81['id'],'UserId':_0x10497f[_0x9e18('0x5b')]['id'],'ContactId':_0x570fe0['id']}))[_0x9e18('0x1e')](function(_0x1ecb92){_0x29aa81[_0x9e18('0xbd')][_0x9e18('0xbc')]=[];_0x29aa81['dataValues']['Messages'][_0x9e18('0x95')](_0x1ecb92[_0x9e18('0xbd')]);return _0x29aa81;});});}})['then'](respondWithResult(_0x329b85,null))[_0x9e18('0x54')](handleError(_0x329b85,null));}; \ No newline at end of file +var _0xb2b3=['sort','where','pick','merge','filter','options','includeAll','include','findAll','rows','show','params','find','create','user','get','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','UserProfileSection','userProfileId','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','body','describe','addDisposition','Disposition','findOne','OpenchannelAccountId','removeDispositions','ids','addAnswer','CannedAnswer','getAnswers','removeAnswers','notify','openchannel','CmContact','Sequelize','ValidationError','no\x20available\x20attributes','updatedAt','difference','createdAt','CompanyId','ListId','isNil','from','from\x20is\x20mandatory','body\x20is\x20mandatory\x20and\x20not\x20empty','mapKey','mapKey\x20is\x20mandatory,\x20please\x20use\x20one\x20of\x20these:\x20','includes','mapKey\x20invalid,\x20please\x20use\x20one\x20of\x20these:\x20','CmList','Contacts','DESC','OpenchannelApplication','Applications','List','list','applications','orderBy','priority','asc','account','contact','firstName','lastName','threadId','externalUrl','OpenchannelInteraction','messageId','interaction','created','autoclose','push','close','*,*,*,*','OpenchannelMessage','UserId','unshift','waitForTheAssignedAgent','forcedOwnership','Start','startRouting','EventManager','addApplications','sequelize','transaction','Transaction','READ_COMMITTED','bulkCreate','findAndCountAll','getApplications','getInteractions','Contact','Owner','fullname','internal','Tag','color','tag','addAgents','omit','spread','emit','userOpenchannelAccount:save','removeAgents','userOpenchannelAccount:remove','getAgents','User','out','Messages','dataValues','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','util','path','sox','to-csv','ejs','fs-extra','lodash','squel','crypto','jsforce','desk.js','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','defaults','redis','localhost','socket.io-emitter','./openchannelAccount.socket','jayson/promise','client','http','then','info','OpenchannelAccount,\x20%s,\x20%s','debug','request\x20sent','stringify','code','error','message','result','catch','sendStatus','status','end','offset','undefined','limit','count','json','apply','save','update','OpenchannelAccounts','UserProfileResource','destroy','stack','name','send','index','Pause','mandatoryDispositionPause','map','OpenchannelAccount','rawAttributes','type','model','query','keys','filters','intersection','fields','attributes','length','hasOwnProperty','nolimit','order'];(function(_0x101dfb,_0x5c638c){var _0x223949=function(_0x4fc907){while(--_0x4fc907){_0x101dfb['push'](_0x101dfb['shift']());}};_0x223949(++_0x5c638c);}(_0xb2b3,0x71));var _0x3b2b=function(_0x9fcd73,_0x105c17){_0x9fcd73=_0x9fcd73-0x0;var _0x364d3a=_0xb2b3[_0x9fcd73];return _0x364d3a;};'use strict';var emlformat=require(_0x3b2b('0x0'));var rimraf=require(_0x3b2b('0x1'));var zipdir=require(_0x3b2b('0x2'));var jsonpatch=require(_0x3b2b('0x3'));var rp=require(_0x3b2b('0x4'));var moment=require(_0x3b2b('0x5'));var BPromise=require(_0x3b2b('0x6'));var Mustache=require('mustache');var util=require(_0x3b2b('0x7'));var path=require(_0x3b2b('0x8'));var sox=require(_0x3b2b('0x9'));var csv=require(_0x3b2b('0xa'));var ejs=require(_0x3b2b('0xb'));var fs=require('fs');var fs_extra=require(_0x3b2b('0xc'));var _=require(_0x3b2b('0xd'));var squel=require(_0x3b2b('0xe'));var crypto=require(_0x3b2b('0xf'));var jsforce=require(_0x3b2b('0x10'));var deskjs=require(_0x3b2b('0x11'));var toCsv=require(_0x3b2b('0xa'));var querystring=require('querystring');var Papa=require(_0x3b2b('0x12'));var Redis=require(_0x3b2b('0x13'));var authService=require(_0x3b2b('0x14'));var qs=require(_0x3b2b('0x15'));var as=require(_0x3b2b('0x16'));var hardwareService=require(_0x3b2b('0x17'));var logger=require('../../config/logger')('api');var utils=require(_0x3b2b('0x18'));var config=require(_0x3b2b('0x19'));var licenseUtil=require(_0x3b2b('0x1a'));var db=require(_0x3b2b('0x1b'))['db'];config['redis']=_[_0x3b2b('0x1c')](config[_0x3b2b('0x1d')],{'host':_0x3b2b('0x1e'),'port':0x18eb});var socket=require(_0x3b2b('0x1f'))(new Redis(config[_0x3b2b('0x1d')]));require(_0x3b2b('0x20'))['register'](socket);var jayson=require(_0x3b2b('0x21'));var client=jayson[_0x3b2b('0x22')]['http']({'port':0x232c});var client9002=jayson[_0x3b2b('0x22')][_0x3b2b('0x23')]({'port':0x232a});function respondWithRpcPromise(_0x9f0aa,_0x5593e4,_0x2ab175,_0x4d17c5){return new BPromise(function(_0x21743d,_0xd45d5f){var _0x57a2b4=_0x4d17c5||client;return _0x57a2b4['request'](_0x9f0aa,_0x2ab175)[_0x3b2b('0x24')](function(_0x52bba5){logger[_0x3b2b('0x25')](_0x3b2b('0x26'),_0x5593e4,'request\x20sent');logger[_0x3b2b('0x27')]('OpenchannelAccount,\x20%s,\x20%s,\x20%s',_0x5593e4,_0x3b2b('0x28'),JSON[_0x3b2b('0x29')](_0x52bba5));if(_0x52bba5['error']){if(_0x52bba5['error'][_0x3b2b('0x2a')]===0x1f4){logger[_0x3b2b('0x2b')](_0x3b2b('0x26'),_0x5593e4,_0x52bba5[_0x3b2b('0x2b')][_0x3b2b('0x2c')]);return _0xd45d5f(_0x52bba5[_0x3b2b('0x2b')][_0x3b2b('0x2c')]);}logger[_0x3b2b('0x2b')](_0x3b2b('0x26'),_0x5593e4,_0x52bba5[_0x3b2b('0x2b')][_0x3b2b('0x2c')]);return _0x21743d(_0x52bba5['error'][_0x3b2b('0x2c')]);}else{logger[_0x3b2b('0x25')](_0x3b2b('0x26'),_0x5593e4,'request\x20sent');_0x21743d(_0x52bba5[_0x3b2b('0x2d')]['message']);}})[_0x3b2b('0x2e')](function(_0x50d2e5){logger[_0x3b2b('0x2b')]('OpenchannelAccount,\x20%s,\x20%s',_0x5593e4,_0x50d2e5);_0xd45d5f(_0x50d2e5);});});}function respondWithStatusCode(_0x52da06,_0x399d72){_0x399d72=_0x399d72||0xcc;return function(_0x1aab2e){if(_0x1aab2e){return _0x52da06[_0x3b2b('0x2f')](_0x399d72);}return _0x52da06[_0x3b2b('0x30')](_0x399d72)[_0x3b2b('0x31')]();};}function respondWithResult(_0x156a3c,_0x30574a){_0x30574a=_0x30574a||0xc8;return function(_0x185830){if(_0x185830){return _0x156a3c[_0x3b2b('0x30')](_0x30574a)['json'](_0x185830);}};}function respondWithFilteredResult(_0x4ed952,_0x4fc420){return function(_0x5ca78b){if(_0x5ca78b){var _0x3e2177=typeof _0x4fc420[_0x3b2b('0x32')]===_0x3b2b('0x33')&&typeof _0x4fc420[_0x3b2b('0x34')]===_0x3b2b('0x33');var _0x34fc22=_0x5ca78b[_0x3b2b('0x35')];var _0x4fe900=_0x3e2177?0x0:_0x4fc420[_0x3b2b('0x32')];var _0x54f942=_0x3e2177?_0x5ca78b['count']:_0x4fc420[_0x3b2b('0x32')]+_0x4fc420[_0x3b2b('0x34')];var _0x281f1a;if(_0x54f942>=_0x34fc22){_0x54f942=_0x34fc22;_0x281f1a=0xc8;}else{_0x281f1a=0xce;}_0x4ed952[_0x3b2b('0x30')](_0x281f1a);return _0x4ed952['set']('Content-Range',_0x4fe900+'-'+_0x54f942+'/'+_0x34fc22)[_0x3b2b('0x36')](_0x5ca78b);}return null;};}function patchUpdates(_0x3a7b4b){return function(_0xeb5af4){try{jsonpatch[_0x3b2b('0x37')](_0xeb5af4,_0x3a7b4b,!![]);}catch(_0x2b745e){return BPromise['reject'](_0x2b745e);}return _0xeb5af4[_0x3b2b('0x38')]();};}function saveUpdates(_0x5dde72,_0x2e4311){return function(_0x156748){if(_0x156748){return _0x156748[_0x3b2b('0x39')](_0x5dde72)[_0x3b2b('0x24')](function(_0xca0678){return _0xca0678;});}return null;};}function removeEntity(_0x3fd26f,_0x340f97){return function(_0x2a9db0){if(_0x2a9db0){return _0x2a9db0['destroy']()['then'](function(){var _0x41ef7f=_0x2a9db0['get']({'plain':!![]});var _0x186e39=_0x3b2b('0x3a');return db[_0x3b2b('0x3b')][_0x3b2b('0x3c')]({'where':{'type':_0x186e39,'resourceId':_0x41ef7f['id']}})[_0x3b2b('0x24')](function(){return _0x2a9db0;});})[_0x3b2b('0x24')](function(){_0x3fd26f[_0x3b2b('0x30')](0xcc)[_0x3b2b('0x31')]();});}};}function handleEntityNotFound(_0x41b2af,_0x43ae3a){return function(_0x517eb3){if(!_0x517eb3){_0x41b2af[_0x3b2b('0x2f')](0x194);}return _0x517eb3;};}function handleError(_0x26c013,_0x423421){_0x423421=_0x423421||0x1f4;return function(_0x41a6f1){logger[_0x3b2b('0x2b')](_0x41a6f1[_0x3b2b('0x3d')]);if(_0x41a6f1[_0x3b2b('0x3e')]){delete _0x41a6f1[_0x3b2b('0x3e')];}_0x26c013[_0x3b2b('0x30')](_0x423421)[_0x3b2b('0x3f')](_0x41a6f1);};}exports[_0x3b2b('0x40')]=function(_0x392597,_0x8adb5f){var _0x2a06c4={'include':[{'model':db[_0x3b2b('0x41')],'as':_0x3b2b('0x42')}]},_0x4823bf={},_0x304ca5={'count':0x0,'rows':[]};var _0x27e415=_[_0x3b2b('0x43')](db[_0x3b2b('0x44')][_0x3b2b('0x45')],function(_0x52a867){return{'name':_0x52a867['fieldName'],'type':_0x52a867[_0x3b2b('0x46')]['key']};});_0x4823bf[_0x3b2b('0x47')]=_[_0x3b2b('0x43')](_0x27e415,_0x3b2b('0x3e'));_0x4823bf[_0x3b2b('0x48')]=_[_0x3b2b('0x49')](_0x392597[_0x3b2b('0x48')]);_0x4823bf[_0x3b2b('0x4a')]=_[_0x3b2b('0x4b')](_0x4823bf['model'],_0x4823bf['query']);_0x2a06c4['attributes']=_[_0x3b2b('0x4b')](_0x4823bf[_0x3b2b('0x47')],qs[_0x3b2b('0x4c')](_0x392597[_0x3b2b('0x48')][_0x3b2b('0x4c')]));_0x2a06c4[_0x3b2b('0x4d')]=_0x2a06c4['attributes'][_0x3b2b('0x4e')]?_0x2a06c4['attributes']:_0x4823bf[_0x3b2b('0x47')];if(!_0x392597[_0x3b2b('0x48')][_0x3b2b('0x4f')](_0x3b2b('0x50'))){_0x2a06c4[_0x3b2b('0x34')]=qs['limit'](_0x392597[_0x3b2b('0x48')]['limit']);_0x2a06c4[_0x3b2b('0x32')]=qs['offset'](_0x392597[_0x3b2b('0x48')][_0x3b2b('0x32')]);}_0x2a06c4[_0x3b2b('0x51')]=qs[_0x3b2b('0x52')](_0x392597['query']['sort']);_0x2a06c4[_0x3b2b('0x53')]=qs['filters'](_[_0x3b2b('0x54')](_0x392597[_0x3b2b('0x48')],_0x4823bf['filters']),_0x27e415);if(_0x392597[_0x3b2b('0x48')]['filter']){_0x2a06c4[_0x3b2b('0x53')]=_[_0x3b2b('0x55')](_0x2a06c4[_0x3b2b('0x53')],{'$or':_[_0x3b2b('0x43')](_0x27e415,function(_0x11bfb2){if(_0x11bfb2['type']!=='VIRTUAL'){var _0x3b020a={};_0x3b020a[_0x11bfb2[_0x3b2b('0x3e')]]={'$like':'%'+_0x392597['query'][_0x3b2b('0x56')]+'%'};return _0x3b020a;}})});}_0x2a06c4=_[_0x3b2b('0x55')]({},_0x2a06c4,_0x392597[_0x3b2b('0x57')]);var _0x25a6d1={'where':_0x2a06c4[_0x3b2b('0x53')]};return db[_0x3b2b('0x44')][_0x3b2b('0x35')](_0x25a6d1)[_0x3b2b('0x24')](function(_0x1e722b){_0x304ca5[_0x3b2b('0x35')]=_0x1e722b;if(_0x392597[_0x3b2b('0x48')][_0x3b2b('0x58')]){_0x2a06c4[_0x3b2b('0x59')]=[{'all':!![]}];}return db['OpenchannelAccount'][_0x3b2b('0x5a')](_0x2a06c4);})[_0x3b2b('0x24')](function(_0x4c46db){_0x304ca5[_0x3b2b('0x5b')]=_0x4c46db;return _0x304ca5;})[_0x3b2b('0x24')](respondWithFilteredResult(_0x8adb5f,_0x2a06c4))[_0x3b2b('0x2e')](handleError(_0x8adb5f,null));};exports[_0x3b2b('0x5c')]=function(_0x595b5b,_0x369d9d){var _0x32c5e2={'raw':![],'where':{'id':_0x595b5b[_0x3b2b('0x5d')]['id']},'include':[{'model':db[_0x3b2b('0x41')],'as':_0x3b2b('0x42')}]},_0x413654={};_0x413654[_0x3b2b('0x47')]=_[_0x3b2b('0x49')](db[_0x3b2b('0x44')][_0x3b2b('0x45')]);_0x413654[_0x3b2b('0x48')]=_[_0x3b2b('0x49')](_0x595b5b[_0x3b2b('0x48')]);_0x413654['filters']=_[_0x3b2b('0x4b')](_0x413654[_0x3b2b('0x47')],_0x413654['query']);_0x32c5e2[_0x3b2b('0x4d')]=_[_0x3b2b('0x4b')](_0x413654[_0x3b2b('0x47')],qs[_0x3b2b('0x4c')](_0x595b5b[_0x3b2b('0x48')][_0x3b2b('0x4c')]));_0x32c5e2['attributes']=_0x32c5e2['attributes'][_0x3b2b('0x4e')]?_0x32c5e2[_0x3b2b('0x4d')]:_0x413654[_0x3b2b('0x47')];if(_0x595b5b['query'][_0x3b2b('0x58')]){_0x32c5e2[_0x3b2b('0x59')]=[{'all':!![]}];}_0x32c5e2=_[_0x3b2b('0x55')]({},_0x32c5e2,_0x595b5b[_0x3b2b('0x57')]);return db['OpenchannelAccount'][_0x3b2b('0x5e')](_0x32c5e2)[_0x3b2b('0x24')](handleEntityNotFound(_0x369d9d,null))[_0x3b2b('0x24')](respondWithResult(_0x369d9d,null))[_0x3b2b('0x2e')](handleError(_0x369d9d,null));};exports[_0x3b2b('0x5f')]=function(_0x3de4ad,_0x484f95){return db[_0x3b2b('0x44')][_0x3b2b('0x5f')](_0x3de4ad['body'],{})['then'](function(_0x45d910){var _0x5d5dce=_0x3de4ad[_0x3b2b('0x60')][_0x3b2b('0x61')]({'plain':!![]});if(!_0x5d5dce)throw new Error(_0x3b2b('0x62'));if(_0x5d5dce[_0x3b2b('0x63')]===_0x3b2b('0x60')){var _0x71c544=_0x45d910[_0x3b2b('0x61')]({'plain':!![]});var _0x1ca7c2='OpenchannelAccounts';return db[_0x3b2b('0x64')]['find']({'where':{'name':_0x1ca7c2,'userProfileId':_0x5d5dce[_0x3b2b('0x65')]},'raw':!![]})[_0x3b2b('0x24')](function(_0x4c6dd2){if(_0x4c6dd2&&_0x4c6dd2['autoAssociation']===0x0){return db[_0x3b2b('0x3b')]['create']({'name':_0x71c544['name'],'resourceId':_0x71c544['id'],'type':_0x4c6dd2[_0x3b2b('0x3e')],'sectionId':_0x4c6dd2['id']},{})['then'](function(){return _0x45d910;});}else{return _0x45d910;}})[_0x3b2b('0x2e')](function(_0x583b52){logger[_0x3b2b('0x2b')](_0x3b2b('0x66'),_0x583b52);throw _0x583b52;});}return _0x45d910;})[_0x3b2b('0x24')](respondWithResult(_0x484f95,0xc9))[_0x3b2b('0x2e')](handleError(_0x484f95,null));};exports['update']=function(_0x4adb01,_0x157a9e){if(_0x4adb01[_0x3b2b('0x67')]['id']){delete _0x4adb01['body']['id'];}return db[_0x3b2b('0x44')][_0x3b2b('0x5e')]({'where':{'id':_0x4adb01['params']['id']},'include':[{'model':db[_0x3b2b('0x41')],'as':_0x3b2b('0x42')}]})['then'](handleEntityNotFound(_0x157a9e,null))[_0x3b2b('0x24')](saveUpdates(_0x4adb01[_0x3b2b('0x67')],null))[_0x3b2b('0x24')](respondWithResult(_0x157a9e,null))[_0x3b2b('0x2e')](handleError(_0x157a9e,null));};exports[_0x3b2b('0x3c')]=function(_0x21ab0e,_0x380a78){return db['OpenchannelAccount'][_0x3b2b('0x5e')]({'where':{'id':_0x21ab0e[_0x3b2b('0x5d')]['id']}})['then'](handleEntityNotFound(_0x380a78,null))['then'](removeEntity(_0x380a78,null))[_0x3b2b('0x2e')](handleError(_0x380a78,null));};exports['describe']=function(_0x21d6bd,_0x191c6c){return db[_0x3b2b('0x44')][_0x3b2b('0x68')]()[_0x3b2b('0x24')](respondWithResult(_0x191c6c,null))[_0x3b2b('0x2e')](handleError(_0x191c6c,null));};exports[_0x3b2b('0x69')]=function(_0xe27f38,_0x427a16,_0x1b05bf){if(_0xe27f38[_0x3b2b('0x67')]['id']){delete _0xe27f38['body']['id'];}return db[_0x3b2b('0x44')][_0x3b2b('0x5e')]({'where':{'id':_0xe27f38[_0x3b2b('0x5d')]['id']}})[_0x3b2b('0x24')](handleEntityNotFound(_0x427a16,null))[_0x3b2b('0x24')](function(_0x16d11f){if(_0x16d11f){_0xe27f38[_0x3b2b('0x67')]['OpenchannelAccountId']=_0x16d11f['id'];return db[_0x3b2b('0x6a')][_0x3b2b('0x5f')](_0xe27f38['body']);}})[_0x3b2b('0x24')](respondWithResult(_0x427a16,null))[_0x3b2b('0x2e')](handleError(_0x427a16,null));};exports['getDispositions']=function(_0x21dfbe,_0x3d2d67,_0xa2659b){var _0x4ee068={'raw':![],'where':{}};var _0x2e87a4={};var _0x5c6f4b={'count':0x0,'rows':[]};return db[_0x3b2b('0x44')][_0x3b2b('0x6b')]({'where':{'id':_0x21dfbe[_0x3b2b('0x5d')]['id']}})[_0x3b2b('0x24')](handleEntityNotFound(_0x3d2d67,null))['then'](function(_0x11ee3c){if(_0x11ee3c){_0x2e87a4[_0x3b2b('0x47')]=_['keys'](db[_0x3b2b('0x6a')][_0x3b2b('0x45')]);_0x2e87a4[_0x3b2b('0x48')]=_[_0x3b2b('0x49')](_0x21dfbe[_0x3b2b('0x48')]);_0x2e87a4[_0x3b2b('0x4a')]=_[_0x3b2b('0x4b')](_0x2e87a4[_0x3b2b('0x47')],_0x2e87a4[_0x3b2b('0x48')]);_0x4ee068['attributes']=_[_0x3b2b('0x4b')](_0x2e87a4[_0x3b2b('0x47')],qs['fields'](_0x21dfbe['query'][_0x3b2b('0x4c')]));_0x4ee068['attributes']=_0x4ee068[_0x3b2b('0x4d')][_0x3b2b('0x4e')]?_0x4ee068['attributes']:_0x2e87a4[_0x3b2b('0x47')];if(!_0x21dfbe[_0x3b2b('0x48')]['hasOwnProperty'](_0x3b2b('0x50'))){_0x4ee068[_0x3b2b('0x34')]=qs[_0x3b2b('0x34')](_0x21dfbe['query']['limit']);_0x4ee068[_0x3b2b('0x32')]=qs[_0x3b2b('0x32')](_0x21dfbe[_0x3b2b('0x48')][_0x3b2b('0x32')]);}_0x4ee068[_0x3b2b('0x51')]=qs['sort'](_0x21dfbe[_0x3b2b('0x48')]['sort']);_0x4ee068[_0x3b2b('0x53')]=qs[_0x3b2b('0x4a')](_['pick'](_0x21dfbe[_0x3b2b('0x48')],_0x2e87a4['filters']));_0x4ee068[_0x3b2b('0x53')][_0x3b2b('0x6c')]=_0x11ee3c['id'];if(_0x21dfbe[_0x3b2b('0x48')][_0x3b2b('0x56')]){_0x4ee068[_0x3b2b('0x53')]=_[_0x3b2b('0x55')](_0x4ee068[_0x3b2b('0x53')],{'$or':_[_0x3b2b('0x43')](_0x4ee068[_0x3b2b('0x4d')],function(_0x110ad6){var _0xd2150d={};_0xd2150d[_0x110ad6]={'$like':'%'+_0x21dfbe[_0x3b2b('0x48')]['filter']+'%'};return _0xd2150d;})});}_0x4ee068=_[_0x3b2b('0x55')]({},_0x4ee068,_0x21dfbe['options']);return db[_0x3b2b('0x6a')][_0x3b2b('0x35')]({'where':_0x4ee068[_0x3b2b('0x53')]})[_0x3b2b('0x24')](function(_0x2ea6cd){_0x5c6f4b[_0x3b2b('0x35')]=_0x2ea6cd;if(_0x21dfbe[_0x3b2b('0x48')][_0x3b2b('0x58')]){_0x4ee068[_0x3b2b('0x59')]=[{'all':!![]}];}return db[_0x3b2b('0x6a')][_0x3b2b('0x5a')](_0x4ee068);})[_0x3b2b('0x24')](function(_0x57e161){_0x5c6f4b[_0x3b2b('0x5b')]=_0x57e161;return _0x5c6f4b;});}})[_0x3b2b('0x24')](respondWithFilteredResult(_0x3d2d67,_0x4ee068))[_0x3b2b('0x2e')](handleError(_0x3d2d67,null));};exports[_0x3b2b('0x6d')]=function(_0x4d54d4,_0x428bad,_0x1cbc66){return db[_0x3b2b('0x44')][_0x3b2b('0x5e')]({'where':{'id':_0x4d54d4[_0x3b2b('0x5d')]['id']}})[_0x3b2b('0x24')](handleEntityNotFound(_0x428bad,null))['then'](function(_0x432c3e){if(_0x432c3e){return _0x432c3e['removeDispositions'](_0x4d54d4[_0x3b2b('0x48')][_0x3b2b('0x6e')]);}})[_0x3b2b('0x24')](respondWithStatusCode(_0x428bad,null))[_0x3b2b('0x2e')](handleError(_0x428bad,null));};exports[_0x3b2b('0x6f')]=function(_0x2baa18,_0x18b995,_0x53aa68){if(_0x2baa18[_0x3b2b('0x67')]['id']){delete _0x2baa18[_0x3b2b('0x67')]['id'];}return db[_0x3b2b('0x44')][_0x3b2b('0x5e')]({'where':{'id':_0x2baa18['params']['id']}})[_0x3b2b('0x24')](handleEntityNotFound(_0x18b995,null))[_0x3b2b('0x24')](function(_0x254631){if(_0x254631){_0x2baa18[_0x3b2b('0x67')][_0x3b2b('0x6c')]=_0x254631['id'];return db[_0x3b2b('0x70')][_0x3b2b('0x5f')](_0x2baa18[_0x3b2b('0x67')]);}})['then'](respondWithResult(_0x18b995,null))[_0x3b2b('0x2e')](handleError(_0x18b995,null));};exports[_0x3b2b('0x71')]=function(_0x11ebe3,_0x3c7640,_0x52b1a8){var _0x53a134={'raw':![],'where':{}};var _0x3ce401={};var _0xdbb0d4={'count':0x0,'rows':[]};return db[_0x3b2b('0x44')][_0x3b2b('0x6b')]({'where':{'id':_0x11ebe3['params']['id']}})[_0x3b2b('0x24')](handleEntityNotFound(_0x3c7640,null))[_0x3b2b('0x24')](function(_0x2e00ee){if(_0x2e00ee){_0x3ce401['model']=_[_0x3b2b('0x49')](db[_0x3b2b('0x70')][_0x3b2b('0x45')]);_0x3ce401[_0x3b2b('0x48')]=_[_0x3b2b('0x49')](_0x11ebe3[_0x3b2b('0x48')]);_0x3ce401['filters']=_[_0x3b2b('0x4b')](_0x3ce401[_0x3b2b('0x47')],_0x3ce401[_0x3b2b('0x48')]);_0x53a134[_0x3b2b('0x4d')]=_['intersection'](_0x3ce401['model'],qs[_0x3b2b('0x4c')](_0x11ebe3[_0x3b2b('0x48')][_0x3b2b('0x4c')]));_0x53a134[_0x3b2b('0x4d')]=_0x53a134['attributes'][_0x3b2b('0x4e')]?_0x53a134['attributes']:_0x3ce401['model'];if(!_0x11ebe3[_0x3b2b('0x48')][_0x3b2b('0x4f')](_0x3b2b('0x50'))){_0x53a134['limit']=qs['limit'](_0x11ebe3[_0x3b2b('0x48')]['limit']);_0x53a134['offset']=qs['offset'](_0x11ebe3[_0x3b2b('0x48')]['offset']);}_0x53a134[_0x3b2b('0x51')]=qs['sort'](_0x11ebe3[_0x3b2b('0x48')][_0x3b2b('0x52')]);_0x53a134[_0x3b2b('0x53')]=qs[_0x3b2b('0x4a')](_['pick'](_0x11ebe3[_0x3b2b('0x48')],_0x3ce401[_0x3b2b('0x4a')]));_0x53a134[_0x3b2b('0x53')][_0x3b2b('0x6c')]=_0x2e00ee['id'];if(_0x11ebe3[_0x3b2b('0x48')]['filter']){_0x53a134['where']=_[_0x3b2b('0x55')](_0x53a134['where'],{'$or':_[_0x3b2b('0x43')](_0x53a134[_0x3b2b('0x4d')],function(_0x8fa31c){var _0xb163d2={};_0xb163d2[_0x8fa31c]={'$like':'%'+_0x11ebe3[_0x3b2b('0x48')][_0x3b2b('0x56')]+'%'};return _0xb163d2;})});}_0x53a134=_[_0x3b2b('0x55')]({},_0x53a134,_0x11ebe3['options']);return db[_0x3b2b('0x70')][_0x3b2b('0x35')]({'where':_0x53a134['where']})['then'](function(_0x166ca0){_0xdbb0d4[_0x3b2b('0x35')]=_0x166ca0;if(_0x11ebe3[_0x3b2b('0x48')]['includeAll']){_0x53a134[_0x3b2b('0x59')]=[{'all':!![]}];}return db[_0x3b2b('0x70')][_0x3b2b('0x5a')](_0x53a134);})[_0x3b2b('0x24')](function(_0x1a07f2){_0xdbb0d4[_0x3b2b('0x5b')]=_0x1a07f2;return _0xdbb0d4;});}})[_0x3b2b('0x24')](respondWithFilteredResult(_0x3c7640,_0x53a134))[_0x3b2b('0x2e')](handleError(_0x3c7640,null));};exports['removeAnswers']=function(_0x5a1106,_0x595789,_0x9afebb){return db['OpenchannelAccount'][_0x3b2b('0x5e')]({'where':{'id':_0x5a1106['params']['id']}})[_0x3b2b('0x24')](handleEntityNotFound(_0x595789,null))[_0x3b2b('0x24')](function(_0x7813a1){if(_0x7813a1){return _0x7813a1[_0x3b2b('0x72')](_0x5a1106[_0x3b2b('0x48')][_0x3b2b('0x6e')]);}})['then'](respondWithStatusCode(_0x595789,null))['catch'](handleError(_0x595789,null));};exports[_0x3b2b('0x73')]=function(_0x5bb3f7,_0x3d3901,_0x1fa371){var _0x4edfbb={'body':_0x5bb3f7['body'],'channel':_0x3b2b('0x74')};var _0xab0ecd=[];var _0x53d978=[];var _0x14c6c8={};var _0xd222e2=![];return db[_0x3b2b('0x75')]['describe']()[_0x3b2b('0x24')](function(_0x495003){if(!_0x495003){throw new db[(_0x3b2b('0x76'))][(_0x3b2b('0x77'))](_0x3b2b('0x78'));}_0xab0ecd=_['difference'](_['keys'](_0x495003),['createdAt',_0x3b2b('0x79')]);_0x53d978=_[_0x3b2b('0x7a')](_['keys'](_0x495003),[_0x3b2b('0x7b'),_0x3b2b('0x79'),_0x3b2b('0x7c'),_0x3b2b('0x7d')]);if(_0x5bb3f7['body']['id']){delete _0x5bb3f7[_0x3b2b('0x67')]['id'];}if(_[_0x3b2b('0x7e')](_0x5bb3f7[_0x3b2b('0x67')][_0x3b2b('0x7f')])){throw new db[(_0x3b2b('0x76'))][(_0x3b2b('0x77'))](_0x3b2b('0x80'));}if(_[_0x3b2b('0x7e')](_0x5bb3f7[_0x3b2b('0x67')][_0x3b2b('0x67')])||_0x5bb3f7[_0x3b2b('0x67')][_0x3b2b('0x67')]===''){throw new db[(_0x3b2b('0x76'))][(_0x3b2b('0x77'))](_0x3b2b('0x81'));}if(_[_0x3b2b('0x7e')](_0x5bb3f7[_0x3b2b('0x67')][_0x3b2b('0x82')])){throw new db['Sequelize'][(_0x3b2b('0x77'))](_0x3b2b('0x83')+_0x53d978);}if(!_[_0x3b2b('0x84')](_0x53d978,_0x5bb3f7[_0x3b2b('0x67')][_0x3b2b('0x82')])){throw new db[(_0x3b2b('0x76'))][(_0x3b2b('0x77'))](_0x3b2b('0x85')+_0x53d978);}_0x14c6c8[_0x5bb3f7[_0x3b2b('0x67')][_0x3b2b('0x82')]]=_0x5bb3f7[_0x3b2b('0x67')][_0x3b2b('0x7f')];})[_0x3b2b('0x24')](function(){return db[_0x3b2b('0x44')][_0x3b2b('0x5e')]({'where':{'id':_0x5bb3f7[_0x3b2b('0x5d')]['id']},'include':[{'model':db[_0x3b2b('0x86')],'as':'List','include':[{'model':db[_0x3b2b('0x75')],'as':_0x3b2b('0x87'),'where':_0x14c6c8,'limit':0x1,'order':[['updatedAt',_0x3b2b('0x88')]]}]},{'model':db[_0x3b2b('0x89')],'as':_0x3b2b('0x8a')}]});})[_0x3b2b('0x24')](handleEntityNotFound(_0x3d3901,null))[_0x3b2b('0x24')](function(_0x4d1ca5){if(_0x4d1ca5&&_0x4d1ca5[_0x3b2b('0x8b')]){_0x4edfbb['account']=_0x4d1ca5;_0x4edfbb['applications']=_0x4d1ca5['Applications'];_0x4edfbb[_0x3b2b('0x8c')]=_0x4d1ca5[_0x3b2b('0x8b')];_0x4edfbb[_0x3b2b('0x8d')]=_[_0x3b2b('0x8e')](_0x4edfbb[_0x3b2b('0x8d')],[_0x3b2b('0x8f')],[_0x3b2b('0x90')]);if(_0x4edfbb[_0x3b2b('0x91')][_0x3b2b('0x8a')]){delete _0x4edfbb[_0x3b2b('0x91')][_0x3b2b('0x8a')];}if(_0x4edfbb[_0x3b2b('0x91')]['List']&&_0x4edfbb[_0x3b2b('0x91')][_0x3b2b('0x8b')][_0x3b2b('0x87')][_0x3b2b('0x4e')]){return _0x4edfbb[_0x3b2b('0x91')][_0x3b2b('0x8b')][_0x3b2b('0x87')][0x0];}var _0x578f0b=_[_0x3b2b('0x1c')](_0x5bb3f7['body'],{'firstName':_0x5bb3f7[_0x3b2b('0x67')][_0x3b2b('0x7f')],'ListId':_0x4d1ca5['ListId']});_0x578f0b[_0x5bb3f7[_0x3b2b('0x67')][_0x3b2b('0x82')]]=_0x5bb3f7[_0x3b2b('0x67')][_0x3b2b('0x7f')];return db[_0x3b2b('0x75')]['create'](_0x578f0b,{'fields':_0xab0ecd,'raw':!![]});}})['then'](handleEntityNotFound(_0x3d3901,null))['then'](function(_0x4af269){_0x4edfbb[_0x3b2b('0x92')]=_0x4af269;if(_0x4af269){var _0x26dd5e={'ContactId':_0x4af269['id'],'OpenchannelAccountId':_0x5bb3f7[_0x3b2b('0x5d')]['id'],'from':(_0x4af269[_0x3b2b('0x93')]||'')+'\x20'+(_0x4af269[_0x3b2b('0x94')]||'')};var _0x132d54={'OpenchannelAccountId':_0x5bb3f7['params']['id'],'closed':![]};if(_0x5bb3f7['body'][_0x3b2b('0x95')]){_0x132d54['threadId']=_0x5bb3f7[_0x3b2b('0x67')][_0x3b2b('0x95')];return db['OpenchannelInteraction'][_0x3b2b('0x5e')]({'where':_0x132d54})[_0x3b2b('0x24')](function(_0xe0ce62){if(_0xe0ce62){return[_0xe0ce62,![]];}_0x26dd5e['threadId']=_0x5bb3f7[_0x3b2b('0x67')][_0x3b2b('0x95')];_0x26dd5e[_0x3b2b('0x96')]=_0x5bb3f7[_0x3b2b('0x67')][_0x3b2b('0x96')];return db['OpenchannelInteraction'][_0x3b2b('0x5f')](_0x26dd5e)['then'](function(_0x58d12f){return[_0x58d12f,!![]];});});}else{_0x132d54[_0x3b2b('0x95')]=null;}_0x132d54['ContactId']=_0x4af269['id'];return db[_0x3b2b('0x97')][_0x3b2b('0x5e')]({'where':_0x132d54})[_0x3b2b('0x24')](function(_0x350a78){if(_0x350a78){return[_0x350a78,![]];}return db[_0x3b2b('0x97')][_0x3b2b('0x5f')](_0x26dd5e)[_0x3b2b('0x24')](function(_0x1d872d){return[_0x1d872d,!![]];});});}})['spread'](function(_0x59b124,_0x4514cc){if(_0x59b124){_0xd222e2=_0x4514cc;if(!_0x4514cc){var _0x346a0f={'from':(_0x4edfbb[_0x3b2b('0x92')][_0x3b2b('0x93')]||'')+'\x20'+(_0x4edfbb[_0x3b2b('0x92')][_0x3b2b('0x94')]||'')};if(_0x5bb3f7[_0x3b2b('0x67')][_0x3b2b('0x95')]&&_0x5bb3f7[_0x3b2b('0x67')]['messageId']&&_0x5bb3f7[_0x3b2b('0x67')]['threadId']!=_0x5bb3f7['body'][_0x3b2b('0x98')]){_0x346a0f[_0x3b2b('0x95')]=_0x5bb3f7['body'][_0x3b2b('0x98')];}return _0x59b124[_0x3b2b('0x39')](_0x346a0f);}else{return _0x59b124;}}})[_0x3b2b('0x24')](function(_0x4bc222){_0x4edfbb[_0x3b2b('0x99')]=_0x4bc222[_0x3b2b('0x61')]({'plain':!![]});_0x4edfbb[_0x3b2b('0x99')][_0x3b2b('0x9a')]=_0xd222e2;if(_0x4edfbb[_0x3b2b('0x99')][_0x3b2b('0x9a')]){if(_0x4edfbb[_0x3b2b('0x91')][_0x3b2b('0x9b')]){_0x4edfbb[_0x3b2b('0x8d')][_0x3b2b('0x9c')]({'id':0x0,'priority':_0x4edfbb[_0x3b2b('0x8d')]['length']+0x1,'app':_0x3b2b('0x9d'),'appdata':'unmanaged','interval':_0x3b2b('0x9e')});}}return db[_0x3b2b('0x9f')][_0x3b2b('0x5f')]({'body':_0x5bb3f7[_0x3b2b('0x67')][_0x3b2b('0x67')],'OpenchannelAccountId':_0x5bb3f7['params']['id'],'OpenchannelInteractionId':_0x4bc222['id'],'direction':'in','ContactId':_0x4edfbb[_0x3b2b('0x92')]['id'],'AttachmentId':_0x5bb3f7['body']['AttachmentId']});})[_0x3b2b('0x24')](function(_0x260fab){_0x4edfbb[_0x3b2b('0x2c')]=_0x260fab;if(_0x4edfbb[_0x3b2b('0x99')][_0x3b2b('0xa0')]){return db['User']['find']({'attributes':['id',_0x3b2b('0x3e')],'where':{'id':_0x4edfbb['interaction'][_0x3b2b('0xa0')]}})['then'](function(_0x57100b){if(_0x57100b){_0x4edfbb[_0x3b2b('0x8d')][_0x3b2b('0xa1')]({'id':0x0,'priority':0x0,'app':'agent','appdata':_0x57100b[_0x3b2b('0x3e')]+','+(_0x4edfbb['account'][_0x3b2b('0xa2')]||0xa),'interval':_0x3b2b('0x9e')});_0x4edfbb[_0x3b2b('0xa3')]=![];}return respondWithRpcPromise(_0x3b2b('0xa4'),_0x3b2b('0xa5'),_0x4edfbb);});}return respondWithRpcPromise(_0x3b2b('0xa4'),_0x3b2b('0xa5'),_0x4edfbb);})[_0x3b2b('0x24')](function(_0x398bf9){respondWithRpcPromise(_0x3b2b('0xa6'),'EventManager',{'event':_0x3b2b('0x73'),'message':_0x398bf9},client9002);return _0x398bf9;})['then'](respondWithResult(_0x3d3901,null))['catch'](handleError(_0x3d3901,null));};exports[_0x3b2b('0xa7')]=function(_0x21f583,_0x3456c1){var _0x436b14=_0x21f583[_0x3b2b('0x5d')]['id'];var _0x29539f=_0x21f583[_0x3b2b('0x67')];var _0x40df71=0xc8;var _0x3a3a14=null;return db[_0x3b2b('0xa8')][_0x3b2b('0xa9')]({'isolationLevel':db[_0x3b2b('0xa8')][_0x3b2b('0xaa')]['ISOLATION_LEVELS'][_0x3b2b('0xab')]},function(_0x2c13b1){return db[_0x3b2b('0x44')][_0x3b2b('0x6b')]({'where':{'id':_0x436b14},'transaction':_0x2c13b1})[_0x3b2b('0x24')](function(_0x1c5d88){if(_0x1c5d88){return db[_0x3b2b('0x89')][_0x3b2b('0x3c')]({'where':{'OpenchannelAccountId':_0x436b14},'transaction':_0x2c13b1})['then'](function(){var _0x4ca69b=_[_0x3b2b('0x43')](_0x29539f,function(_0x2ffbbe){_0x2ffbbe['OpenchannelAccountId']=_0x436b14;return _0x2ffbbe;});return db[_0x3b2b('0x89')][_0x3b2b('0xac')](_0x4ca69b,{'transaction':_0x2c13b1});});}else{_0x40df71=0x194;_0x3a3a14=[];}});})[_0x3b2b('0x24')](function(){if(_0x40df71!==0x194){return db['OpenchannelApplication'][_0x3b2b('0xad')]({'where':{'OpenchannelAccountId':_0x436b14},'order':'priority'})[_0x3b2b('0x24')](function(_0x5d8723){_0x3a3a14=_0x5d8723;});}})[_0x3b2b('0x2e')](function(_0x53b8d6){_0x40df71=0x1f4;logger[_0x3b2b('0x2b')](_0x53b8d6[_0x3b2b('0x3d')]);if(_0x53b8d6[_0x3b2b('0x3e')]){delete _0x53b8d6[_0x3b2b('0x3e')];}_0x3a3a14=_0x53b8d6;})['finally'](function(){if(_0x3a3a14===null){_0x3456c1['sendStatus'](_0x40df71);}else{if(_0x40df71===0x1f4){_0x3456c1[_0x3b2b('0x30')](_0x40df71)[_0x3b2b('0x3f')](_0x3a3a14);}else{_0x3456c1[_0x3b2b('0x30')](_0x40df71)[_0x3b2b('0x36')](_0x3a3a14);}}});};exports[_0x3b2b('0xae')]=function(_0x11c340,_0x17d388,_0x33448c){var _0x228147={};var _0x514395={};var _0x829180;var _0x19d659;return db[_0x3b2b('0x44')][_0x3b2b('0x6b')]({'where':{'id':_0x11c340[_0x3b2b('0x5d')]['id']}})[_0x3b2b('0x24')](handleEntityNotFound(_0x17d388,null))[_0x3b2b('0x24')](function(_0x273860){if(_0x273860){_0x829180=_0x273860;_0x514395[_0x3b2b('0x47')]=_['keys'](db['OpenchannelApplication'][_0x3b2b('0x45')]);_0x514395[_0x3b2b('0x48')]=_[_0x3b2b('0x49')](_0x11c340[_0x3b2b('0x48')]);_0x514395['filters']=_[_0x3b2b('0x4b')](_0x514395[_0x3b2b('0x47')],_0x514395['query']);_0x228147[_0x3b2b('0x4d')]=_[_0x3b2b('0x4b')](_0x514395[_0x3b2b('0x47')],qs['fields'](_0x11c340[_0x3b2b('0x48')][_0x3b2b('0x4c')]));_0x228147[_0x3b2b('0x4d')]=_0x228147[_0x3b2b('0x4d')][_0x3b2b('0x4e')]?_0x228147[_0x3b2b('0x4d')]:_0x514395[_0x3b2b('0x47')];_0x228147[_0x3b2b('0x51')]=qs[_0x3b2b('0x52')](_0x11c340[_0x3b2b('0x48')][_0x3b2b('0x52')]);_0x228147['where']=qs[_0x3b2b('0x4a')](_[_0x3b2b('0x54')](_0x11c340[_0x3b2b('0x48')],_0x514395['filters']));if(_0x11c340[_0x3b2b('0x48')]['filter']){_0x228147['where']=_['merge'](_0x228147[_0x3b2b('0x53')],{'$or':_[_0x3b2b('0x43')](_0x228147[_0x3b2b('0x4d')],function(_0x3a6e0d){var _0x5d3313={};_0x5d3313[_0x3a6e0d]={'$like':'%'+_0x11c340[_0x3b2b('0x48')]['filter']+'%'};return _0x5d3313;})});}_0x228147=_['merge']({},_0x228147,_0x11c340[_0x3b2b('0x57')]);return _0x829180[_0x3b2b('0xae')](_0x228147);}})[_0x3b2b('0x24')](function(_0xd65ae2){if(_0xd65ae2){_0x19d659=_0xd65ae2[_0x3b2b('0x4e')];if(!_0x11c340['query'][_0x3b2b('0x4f')](_0x3b2b('0x50'))){_0x228147['limit']=qs[_0x3b2b('0x34')](_0x11c340[_0x3b2b('0x48')][_0x3b2b('0x34')]);_0x228147[_0x3b2b('0x32')]=qs['offset'](_0x11c340[_0x3b2b('0x48')][_0x3b2b('0x32')]);}return _0x829180[_0x3b2b('0xae')](_0x228147);}})[_0x3b2b('0x24')](function(_0xda69a8){if(_0xda69a8){return _0xda69a8?{'count':_0x19d659,'rows':_0xda69a8}:null;}})[_0x3b2b('0x24')](respondWithResult(_0x17d388,null))[_0x3b2b('0x2e')](handleError(_0x17d388,null));};exports[_0x3b2b('0xaf')]=function(_0x75e4ff,_0x21f733,_0x27b8cd){var _0x37af0c={'raw':![],'where':{}};var _0x541862={};var _0xfb4fdf={'count':0x0,'rows':[]};return db[_0x3b2b('0x44')][_0x3b2b('0x6b')]({'where':{'id':_0x75e4ff[_0x3b2b('0x5d')]['id']}})[_0x3b2b('0x24')](handleEntityNotFound(_0x21f733,null))[_0x3b2b('0x24')](function(_0x1e0ab1){if(_0x1e0ab1){_0x541862[_0x3b2b('0x47')]=_[_0x3b2b('0x49')](db['OpenchannelInteraction'][_0x3b2b('0x45')]);_0x541862['query']=_[_0x3b2b('0x49')](_0x75e4ff['query']);_0x541862[_0x3b2b('0x4a')]=_['intersection'](_0x541862[_0x3b2b('0x47')],_0x541862[_0x3b2b('0x48')]);_0x37af0c['attributes']=_[_0x3b2b('0x4b')](_0x541862[_0x3b2b('0x47')],qs[_0x3b2b('0x4c')](_0x75e4ff[_0x3b2b('0x48')][_0x3b2b('0x4c')]));_0x37af0c[_0x3b2b('0x4d')]=_0x37af0c[_0x3b2b('0x4d')]['length']?_0x37af0c['attributes']:_0x541862[_0x3b2b('0x47')];if(!_0x75e4ff[_0x3b2b('0x48')][_0x3b2b('0x4f')](_0x3b2b('0x50'))){_0x37af0c['limit']=qs[_0x3b2b('0x34')](_0x75e4ff['query'][_0x3b2b('0x34')]);_0x37af0c['offset']=qs[_0x3b2b('0x32')](_0x75e4ff[_0x3b2b('0x48')]['offset']);}_0x37af0c[_0x3b2b('0x51')]=qs['sort'](_0x75e4ff[_0x3b2b('0x48')][_0x3b2b('0x52')]);_0x37af0c[_0x3b2b('0x53')]=qs[_0x3b2b('0x4a')](_[_0x3b2b('0x54')](_0x75e4ff[_0x3b2b('0x48')],_0x541862[_0x3b2b('0x4a')]));_0x37af0c['where'][_0x3b2b('0x6c')]=_0x1e0ab1['id'];if(_0x75e4ff[_0x3b2b('0x48')][_0x3b2b('0x56')]){_0x37af0c[_0x3b2b('0x53')]=_['merge'](_0x37af0c['where'],{'$or':_['map'](_0x37af0c['attributes'],function(_0x48a5c2){var _0x358322={};_0x358322[_0x48a5c2]={'$like':'%'+_0x75e4ff['query'][_0x3b2b('0x56')]+'%'};return _0x358322;})});}_0x37af0c=_[_0x3b2b('0x55')]({},_0x37af0c,_0x75e4ff['options']);return db[_0x3b2b('0x97')][_0x3b2b('0x35')]({'where':_0x37af0c[_0x3b2b('0x53')]})[_0x3b2b('0x24')](function(_0xdc29d){_0xfb4fdf[_0x3b2b('0x35')]=_0xdc29d;if(_0x75e4ff[_0x3b2b('0x48')][_0x3b2b('0x58')]){_0x37af0c['include']=[{'model':db[_0x3b2b('0x75')],'as':_0x3b2b('0xb0'),'required':![]},{'model':db['User'],'as':_0x3b2b('0xb1'),'attributes':[_0x3b2b('0x3e'),_0x3b2b('0xb2'),_0x3b2b('0xb3')],'required':![]},{'model':db[_0x3b2b('0xb4')],'as':'Tags','attributes':['id',_0x3b2b('0x3e'),_0x3b2b('0xb5')],'where':_0x75e4ff[_0x3b2b('0x48')]['tag']?{'id':_0x75e4ff[_0x3b2b('0x48')][_0x3b2b('0xb6')]}:undefined,'required':_0x75e4ff[_0x3b2b('0x48')][_0x3b2b('0xb6')]?!![]:![]}];}return db['OpenchannelInteraction'][_0x3b2b('0x5a')](_0x37af0c);})[_0x3b2b('0x24')](function(_0x5ed560){_0xfb4fdf['rows']=_0x5ed560;return _0xfb4fdf;});}})['then'](respondWithFilteredResult(_0x21f733,_0x37af0c))[_0x3b2b('0x2e')](handleError(_0x21f733,null));};exports['addAgents']=function(_0x2db924,_0x45e87a,_0x4ba32e){return db['OpenchannelAccount'][_0x3b2b('0x5e')]({'where':{'id':_0x2db924[_0x3b2b('0x5d')]['id']}})[_0x3b2b('0x24')](handleEntityNotFound(_0x45e87a,null))[_0x3b2b('0x24')](function(_0x20eb84){if(_0x20eb84){return _0x20eb84[_0x3b2b('0xb7')](_0x2db924[_0x3b2b('0x67')][_0x3b2b('0x6e')],_[_0x3b2b('0xb8')](_0x2db924[_0x3b2b('0x67')],['ids','id'])||{})[_0x3b2b('0xb9')](function(_0x496d4c){for(var _0x570885=0x0;_0x570885<_0x2db924[_0x3b2b('0x67')]['ids'][_0x3b2b('0x4e')];_0x570885+=0x1){socket[_0x3b2b('0xba')](_0x3b2b('0xbb'),{'UserId':Number(_0x2db924['body']['ids'][_0x570885]),'OpenchannelAccountId':Number(_0x2db924[_0x3b2b('0x5d')]['id'])});}return _0x496d4c;});}})[_0x3b2b('0x24')](respondWithResult(_0x45e87a,null))[_0x3b2b('0x2e')](handleError(_0x45e87a,null));};exports[_0x3b2b('0xbc')]=function(_0x24b1bf,_0x127a88,_0x5b9150){return db[_0x3b2b('0x44')][_0x3b2b('0x5e')]({'where':{'id':_0x24b1bf[_0x3b2b('0x5d')]['id']}})[_0x3b2b('0x24')](handleEntityNotFound(_0x127a88,null))[_0x3b2b('0x24')](function(_0x138fde){if(_0x138fde){return _0x138fde['removeAgents'](_0x24b1bf[_0x3b2b('0x48')][_0x3b2b('0x6e')])[_0x3b2b('0x24')](function(){if(_['isArray'](_0x24b1bf[_0x3b2b('0x48')][_0x3b2b('0x6e')])){for(var _0x3fb752=0x0;_0x3fb752<_0x24b1bf[_0x3b2b('0x48')][_0x3b2b('0x6e')]['length'];_0x3fb752+=0x1){socket['emit'](_0x3b2b('0xbd'),{'UserId':Number(_0x24b1bf[_0x3b2b('0x48')]['ids'][_0x3fb752]),'OpenchannelAccountId':Number(_0x24b1bf['params']['id'])});}}else{socket[_0x3b2b('0xba')](_0x3b2b('0xbd'),{'UserId':Number(_0x24b1bf[_0x3b2b('0x48')][_0x3b2b('0x6e')]),'OpenchannelAccountId':Number(_0x24b1bf[_0x3b2b('0x5d')]['id'])});}});}})[_0x3b2b('0x24')](respondWithStatusCode(_0x127a88,null))['catch'](handleError(_0x127a88,null));};exports[_0x3b2b('0xbe')]=function(_0x46c9cc,_0x50e7cf,_0x24401c){var _0x102ce2={};var _0x250900={};var _0x3f5f7b;var _0x22bfd0;return db['OpenchannelAccount'][_0x3b2b('0x6b')]({'where':{'id':_0x46c9cc[_0x3b2b('0x5d')]['id']}})[_0x3b2b('0x24')](handleEntityNotFound(_0x50e7cf,null))['then'](function(_0x48f831){if(_0x48f831){_0x3f5f7b=_0x48f831;_0x250900['model']=_[_0x3b2b('0x49')](db[_0x3b2b('0xbf')][_0x3b2b('0x45')]);_0x250900[_0x3b2b('0x48')]=_[_0x3b2b('0x49')](_0x46c9cc[_0x3b2b('0x48')]);_0x250900['filters']=_['intersection'](_0x250900[_0x3b2b('0x47')],_0x250900[_0x3b2b('0x48')]);_0x102ce2[_0x3b2b('0x4d')]=_['intersection'](_0x250900[_0x3b2b('0x47')],qs[_0x3b2b('0x4c')](_0x46c9cc[_0x3b2b('0x48')][_0x3b2b('0x4c')]));_0x102ce2['attributes']=_0x102ce2[_0x3b2b('0x4d')][_0x3b2b('0x4e')]?_0x102ce2[_0x3b2b('0x4d')]:_0x250900[_0x3b2b('0x47')];_0x102ce2[_0x3b2b('0x51')]=qs[_0x3b2b('0x52')](_0x46c9cc[_0x3b2b('0x48')][_0x3b2b('0x52')]);_0x102ce2[_0x3b2b('0x53')]=qs[_0x3b2b('0x4a')](_[_0x3b2b('0x54')](_0x46c9cc[_0x3b2b('0x48')],_0x250900[_0x3b2b('0x4a')]));if(_0x46c9cc[_0x3b2b('0x48')][_0x3b2b('0x56')]){_0x102ce2[_0x3b2b('0x53')]=_[_0x3b2b('0x55')](_0x102ce2[_0x3b2b('0x53')],{'$or':_[_0x3b2b('0x43')](_0x102ce2[_0x3b2b('0x4d')],function(_0x3c3a0d){var _0x3419e6={};_0x3419e6[_0x3c3a0d]={'$like':'%'+_0x46c9cc[_0x3b2b('0x48')][_0x3b2b('0x56')]+'%'};return _0x3419e6;})});}_0x102ce2=_['merge']({},_0x102ce2,_0x46c9cc[_0x3b2b('0x57')]);return _0x3f5f7b[_0x3b2b('0xbe')](_0x102ce2);}})[_0x3b2b('0x24')](function(_0x3a6fb1){if(_0x3a6fb1){_0x22bfd0=_0x3a6fb1['length'];if(!_0x46c9cc[_0x3b2b('0x48')]['hasOwnProperty'](_0x3b2b('0x50'))){_0x102ce2[_0x3b2b('0x34')]=qs[_0x3b2b('0x34')](_0x46c9cc[_0x3b2b('0x48')][_0x3b2b('0x34')]);_0x102ce2[_0x3b2b('0x32')]=qs[_0x3b2b('0x32')](_0x46c9cc[_0x3b2b('0x48')][_0x3b2b('0x32')]);}return _0x3f5f7b[_0x3b2b('0xbe')](_0x102ce2);}})[_0x3b2b('0x24')](function(_0x361473){if(_0x361473){return _0x361473?{'count':_0x22bfd0,'rows':_0x361473}:null;}})['then'](respondWithResult(_0x50e7cf,null))[_0x3b2b('0x2e')](handleError(_0x50e7cf,null));};exports[_0x3b2b('0x3f')]=function(_0x1d53e4,_0x9f07eb,_0x4d11c2){var _0x6b2e6,_0x273e57,_0x51984c;if(_[_0x3b2b('0x7e')](_0x1d53e4[_0x3b2b('0x67')][_0x3b2b('0x67')])||_0x1d53e4['body'][_0x3b2b('0x67')]===''){throw new db[(_0x3b2b('0x76'))][(_0x3b2b('0x77'))](_0x3b2b('0x81'));}if(_[_0x3b2b('0x7e')](_0x1d53e4[_0x3b2b('0x67')]['to'])){}_0x6b2e6=_0x1d53e4[_0x3b2b('0x67')]['to'];return db[_0x3b2b('0x44')]['findOne']({'where':{'id':_0x1d53e4[_0x3b2b('0x5d')]['id']}})['then'](handleEntityNotFound(_0x9f07eb,null))[_0x3b2b('0x24')](function(_0x1ce7c1){if(_0x1ce7c1){return db[_0x3b2b('0x44')][_0x3b2b('0x5e')]({'where':{'id':_0x1ce7c1['id']},'include':[{'model':db['CmList'],'as':_0x3b2b('0x8b'),'include':[{'model':db[_0x3b2b('0x75')],'as':_0x3b2b('0x87'),'where':{[_0x1ce7c1[_0x3b2b('0x82')]]:_0x6b2e6},'limit':0x1,'order':[[_0x3b2b('0x79'),_0x3b2b('0x88')]]}]}]})[_0x3b2b('0x24')](handleEntityNotFound(_0x9f07eb,null))[_0x3b2b('0x24')](function(_0x2d531b){if(_0x2d531b&&_0x2d531b[_0x3b2b('0x8b')]){_0x273e57=_0x2d531b[_0x3b2b('0x61')]({'plain':!![]});if(_0x273e57[_0x3b2b('0x8b')]&&_0x273e57[_0x3b2b('0x8b')][_0x3b2b('0x87')][_0x3b2b('0x4e')]){return _0x273e57['List'][_0x3b2b('0x87')][0x0];}return db[_0x3b2b('0x75')]['create'](_[_0x3b2b('0x1c')](_0x1d53e4[_0x3b2b('0x67')],{'firstName':_0x6b2e6,[_0x2d531b[_0x3b2b('0x82')]]:_0x6b2e6,'phone':_0x6b2e6,'ListId':_0x273e57['ListId']}));}})[_0x3b2b('0x24')](handleEntityNotFound(_0x9f07eb,null))[_0x3b2b('0x24')](function(_0x4b9319){if(_0x4b9319){_0x51984c=_0x4b9319;return db['OpenchannelInteraction'][_0x3b2b('0x5e')]({'where':{'ContactId':_0x51984c['id'],'closed':![],'OpenchannelAccountId':_0x273e57['id']}})['then'](function(_0x3aebcd){if(_0x3aebcd){return[_0x3aebcd,![]];}return db[_0x3b2b('0x97')]['create']({'UserId':_0x1d53e4[_0x3b2b('0x60')]['id'],'ContactId':_0x51984c['id'],'OpenchannelAccountId':_0x273e57['id'],'lastMsgDirection':_0x3b2b('0xc0'),'firstMsgDirection':'out','Messages':[_['merge'](_0x1d53e4[_0x3b2b('0x67')],{'read':![],'body':_0x1d53e4[_0x3b2b('0x67')][_0x3b2b('0x67')],'OpenchannelAccountId':_0x273e57['id'],'UserId':_0x1d53e4[_0x3b2b('0x60')]['id'],'ContactId':_0x51984c['id']})]},{'include':[{'model':db['OpenchannelMessage'],'as':'Messages'}]})[_0x3b2b('0x24')](function(_0x18f2f1){return[_0x18f2f1,!![]];});});}})[_0x3b2b('0xb9')](function(_0x4754b2,_0x2b992b){if(_0x2b992b){return _0x4754b2;}return db['OpenchannelMessage'][_0x3b2b('0x5f')](_['merge'](_0x1d53e4[_0x3b2b('0x67')],{'read':![],'body':_0x1d53e4[_0x3b2b('0x67')][_0x3b2b('0x67')],'OpenchannelAccountId':_0x273e57['id'],'OpenchannelInteractionId':_0x4754b2['id'],'UserId':_0x1d53e4['user']['id'],'ContactId':_0x51984c['id']}))[_0x3b2b('0x24')](function(_0x54cabb){_0x4754b2['dataValues'][_0x3b2b('0xc1')]=[];_0x4754b2[_0x3b2b('0xc2')][_0x3b2b('0xc1')][_0x3b2b('0x9c')](_0x54cabb['dataValues']);return _0x4754b2;});});}})['then'](respondWithResult(_0x9f07eb,null))[_0x3b2b('0x2e')](handleError(_0x9f07eb,null));}; \ No newline at end of file diff --git a/server/api/openchannelAccount/openchannelAccount.events.js b/server/api/openchannelAccount/openchannelAccount.events.js index 8254997..2e57940 100644 --- a/server/api/openchannelAccount/openchannelAccount.events.js +++ b/server/api/openchannelAccount/openchannelAccount.events.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x4ea3=['emit','hasOwnProperty','hook','exports','events','../../mysqldb','OpenchannelAccount','setMaxListeners','update'];(function(_0x2513e3,_0x357ad9){var _0x25c552=function(_0x3cb486){while(--_0x3cb486){_0x2513e3['push'](_0x2513e3['shift']());}};_0x25c552(++_0x357ad9);}(_0x4ea3,0x70));var _0x34ea=function(_0x3947c9,_0x4d6c97){_0x3947c9=_0x3947c9-0x0;var _0x2e7871=_0x4ea3[_0x3947c9];return _0x2e7871;};'use strict';var EventEmitter=require(_0x34ea('0x0'));var OpenchannelAccount=require(_0x34ea('0x1'))['db'][_0x34ea('0x2')];var OpenchannelAccountEvents=new EventEmitter();OpenchannelAccountEvents[_0x34ea('0x3')](0x0);var events={'afterCreate':'save','afterUpdate':_0x34ea('0x4'),'afterDestroy':'remove'};function emitEvent(_0x269d4c){return function(_0x571f1b,_0x5e5a84,_0x2ce955){OpenchannelAccountEvents[_0x34ea('0x5')](_0x269d4c+':'+_0x571f1b['id'],_0x571f1b);OpenchannelAccountEvents[_0x34ea('0x5')](_0x269d4c,_0x571f1b);_0x2ce955(null);};}for(var e in events){if(events[_0x34ea('0x6')](e)){var event=events[e];OpenchannelAccount[_0x34ea('0x7')](e,emitEvent(event));}}module[_0x34ea('0x8')]=OpenchannelAccountEvents; \ No newline at end of file +var _0x702d=['setMaxListeners','save','remove','emit','hasOwnProperty','hook','exports','events','../../mysqldb','OpenchannelAccount'];(function(_0x424b2b,_0x5b2dae){var _0x1b193e=function(_0x53a3d4){while(--_0x53a3d4){_0x424b2b['push'](_0x424b2b['shift']());}};_0x1b193e(++_0x5b2dae);}(_0x702d,0x147));var _0xd702=function(_0x14275e,_0x47798a){_0x14275e=_0x14275e-0x0;var _0x25ca9e=_0x702d[_0x14275e];return _0x25ca9e;};'use strict';var EventEmitter=require(_0xd702('0x0'));var OpenchannelAccount=require(_0xd702('0x1'))['db'][_0xd702('0x2')];var OpenchannelAccountEvents=new EventEmitter();OpenchannelAccountEvents[_0xd702('0x3')](0x0);var events={'afterCreate':_0xd702('0x4'),'afterUpdate':'update','afterDestroy':_0xd702('0x5')};function emitEvent(_0xebbd7c){return function(_0x27b260,_0x1c5a32,_0x481ee0){OpenchannelAccountEvents[_0xd702('0x6')](_0xebbd7c+':'+_0x27b260['id'],_0x27b260);OpenchannelAccountEvents['emit'](_0xebbd7c,_0x27b260);_0x481ee0(null);};}for(var e in events){if(events[_0xd702('0x7')](e)){var event=events[e];OpenchannelAccount[_0xd702('0x8')](e,emitEvent(event));}}module[_0xd702('0x9')]=OpenchannelAccountEvents; \ No newline at end of file diff --git a/server/api/openchannelAccount/openchannelAccount.model.js b/server/api/openchannelAccount/openchannelAccount.model.js index 72888c2..39d5321 100644 --- a/server/api/openchannelAccount/openchannelAccount.model.js +++ b/server/api/openchannelAccount/openchannelAccount.model.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xa9e0=['../../config/environment','./openchannelAccount.attributes','exports','define','OpenchannelAccount','lodash','util','../../config/logger','bluebird','path','rimraf'];(function(_0x3acabd,_0x37c3d7){var _0xa67f3b=function(_0x1de8af){while(--_0x1de8af){_0x3acabd['push'](_0x3acabd['shift']());}};_0xa67f3b(++_0x37c3d7);}(_0xa9e0,0x123));var _0x0a9e=function(_0xf0bcac,_0x531755){_0xf0bcac=_0xf0bcac-0x0;var _0x4e4c65=_0xa9e0[_0xf0bcac];return _0x4e4c65;};'use strict';var _=require(_0x0a9e('0x0'));var util=require(_0x0a9e('0x1'));var logger=require(_0x0a9e('0x2'))('api');var moment=require('moment');var BPromise=require(_0x0a9e('0x3'));var rp=require('request-promise');var fs=require('fs');var path=require(_0x0a9e('0x4'));var rimraf=require(_0x0a9e('0x5'));var config=require(_0x0a9e('0x6'));var attributes=require(_0x0a9e('0x7'));module[_0x0a9e('0x8')]=function(_0x57b080,_0x219af0){return _0x57b080[_0x0a9e('0x9')](_0x0a9e('0xa'),attributes,{'tableName':'openchannel_accounts','paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file +var _0xa9e0=['../../config/environment','./openchannelAccount.attributes','exports','define','OpenchannelAccount','lodash','util','../../config/logger','bluebird','path','rimraf'];(function(_0x70f096,_0x3d5ec7){var _0x417647=function(_0x1599a9){while(--_0x1599a9){_0x70f096['push'](_0x70f096['shift']());}};_0x417647(++_0x3d5ec7);}(_0xa9e0,0x123));var _0x0a9e=function(_0x2a6809,_0x44edde){_0x2a6809=_0x2a6809-0x0;var _0x11c371=_0xa9e0[_0x2a6809];return _0x11c371;};'use strict';var _=require(_0x0a9e('0x0'));var util=require(_0x0a9e('0x1'));var logger=require(_0x0a9e('0x2'))('api');var moment=require('moment');var BPromise=require(_0x0a9e('0x3'));var rp=require('request-promise');var fs=require('fs');var path=require(_0x0a9e('0x4'));var rimraf=require(_0x0a9e('0x5'));var config=require(_0x0a9e('0x6'));var attributes=require(_0x0a9e('0x7'));module[_0x0a9e('0x8')]=function(_0x57b080,_0x219af0){return _0x57b080[_0x0a9e('0x9')](_0x0a9e('0xa'),attributes,{'tableName':'openchannel_accounts','paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file diff --git a/server/api/openchannelAccount/openchannelAccount.rpc.js b/server/api/openchannelAccount/openchannelAccount.rpc.js index 47c959d..12e4b4c 100644 --- a/server/api/openchannelAccount/openchannelAccount.rpc.js +++ b/server/api/openchannelAccount/openchannelAccount.rpc.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x593e=['lodash','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','rpc','../../config/environment','jayson/promise','client','http','redis','defaults','localhost','socket.io-emitter','./openchannelAccount.socket','register','request','info','OpenchannelAccount,\x20%s,\x20%s','request\x20sent','debug','OpenchannelAccount,\x20%s,\x20%s,\x20%s','stringify','error','message','catch'];(function(_0x599827,_0x6d11c5){var _0x2428b7=function(_0xaa34de){while(--_0xaa34de){_0x599827['push'](_0x599827['shift']());}};_0x2428b7(++_0x6d11c5);}(_0x593e,0xcb));var _0xe593=function(_0x9b640e,_0x43c6c7){_0x9b640e=_0x9b640e-0x0;var _0x96cfbf=_0x593e[_0x9b640e];return _0x96cfbf;};'use strict';var _=require(_0xe593('0x0'));var util=require(_0xe593('0x1'));var moment=require(_0xe593('0x2'));var BPromise=require(_0xe593('0x3'));var rs=require(_0xe593('0x4'));var fs=require('fs');var Redis=require(_0xe593('0x5'));var db=require(_0xe593('0x6'))['db'];var utils=require(_0xe593('0x7'));var logger=require('../../config/logger')(_0xe593('0x8'));var config=require(_0xe593('0x9'));var jayson=require(_0xe593('0xa'));var client=jayson[_0xe593('0xb')][_0xe593('0xc')]({'port':0x232a});config[_0xe593('0xd')]=_[_0xe593('0xe')](config[_0xe593('0xd')],{'host':_0xe593('0xf'),'port':0x18eb});var socket=require(_0xe593('0x10'))(new Redis(config['redis']));require(_0xe593('0x11'))[_0xe593('0x12')](socket);function respondWithRpcPromise(_0x38d977,_0x5ba75c,_0x5f1222){return new BPromise(function(_0x3032ee,_0xeefe30){return client[_0xe593('0x13')](_0x38d977,_0x5f1222)['then'](function(_0x6a5d4f){logger[_0xe593('0x14')](_0xe593('0x15'),_0x5ba75c,_0xe593('0x16'));logger[_0xe593('0x17')](_0xe593('0x18'),_0x5ba75c,_0xe593('0x16'),JSON[_0xe593('0x19')](_0x6a5d4f));if(_0x6a5d4f[_0xe593('0x1a')]){if(_0x6a5d4f[_0xe593('0x1a')]['code']===0x1f4){logger[_0xe593('0x1a')](_0xe593('0x15'),_0x5ba75c,_0x6a5d4f['error'][_0xe593('0x1b')]);return _0xeefe30(_0x6a5d4f[_0xe593('0x1a')]['message']);}logger[_0xe593('0x1a')](_0xe593('0x15'),_0x5ba75c,_0x6a5d4f[_0xe593('0x1a')][_0xe593('0x1b')]);return _0x3032ee(_0x6a5d4f[_0xe593('0x1a')][_0xe593('0x1b')]);}else{logger['info'](_0xe593('0x15'),_0x5ba75c,_0xe593('0x16'));_0x3032ee(_0x6a5d4f['result'][_0xe593('0x1b')]);}})[_0xe593('0x1c')](function(_0x56b4ff){logger[_0xe593('0x1a')](_0xe593('0x15'),_0x5ba75c,_0x56b4ff);_0xeefe30(_0x56b4ff);});});} \ No newline at end of file +var _0x1339=['OpenchannelAccount,\x20%s,\x20%s','debug','OpenchannelAccount,\x20%s,\x20%s,\x20%s','error','code','message','request\x20sent','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','jayson/promise','client','http','defaults','redis','localhost','socket.io-emitter','./openchannelAccount.socket','register','request','then','info'];(function(_0x3c40f4,_0x500b8a){var _0x1209d=function(_0x46b429){while(--_0x46b429){_0x3c40f4['push'](_0x3c40f4['shift']());}};_0x1209d(++_0x500b8a);}(_0x1339,0x1ed));var _0x9133=function(_0x36c80c,_0x5f1d7f){_0x36c80c=_0x36c80c-0x0;var _0x15e446=_0x1339[_0x36c80c];return _0x15e446;};'use strict';var _=require('lodash');var util=require('util');var moment=require(_0x9133('0x0'));var BPromise=require(_0x9133('0x1'));var rs=require(_0x9133('0x2'));var fs=require('fs');var Redis=require(_0x9133('0x3'));var db=require(_0x9133('0x4'))['db'];var utils=require(_0x9133('0x5'));var logger=require(_0x9133('0x6'))(_0x9133('0x7'));var config=require('../../config/environment');var jayson=require(_0x9133('0x8'));var client=jayson[_0x9133('0x9')][_0x9133('0xa')]({'port':0x232a});config['redis']=_[_0x9133('0xb')](config[_0x9133('0xc')],{'host':_0x9133('0xd'),'port':0x18eb});var socket=require(_0x9133('0xe'))(new Redis(config[_0x9133('0xc')]));require(_0x9133('0xf'))[_0x9133('0x10')](socket);function respondWithRpcPromise(_0x245134,_0x10a9e4,_0xd588c){return new BPromise(function(_0x4c4517,_0x3f9650){return client[_0x9133('0x11')](_0x245134,_0xd588c)[_0x9133('0x12')](function(_0x452481){logger[_0x9133('0x13')](_0x9133('0x14'),_0x10a9e4,'request\x20sent');logger[_0x9133('0x15')](_0x9133('0x16'),_0x10a9e4,'request\x20sent',JSON['stringify'](_0x452481));if(_0x452481[_0x9133('0x17')]){if(_0x452481['error'][_0x9133('0x18')]===0x1f4){logger[_0x9133('0x17')](_0x9133('0x14'),_0x10a9e4,_0x452481[_0x9133('0x17')][_0x9133('0x19')]);return _0x3f9650(_0x452481[_0x9133('0x17')]['message']);}logger[_0x9133('0x17')](_0x9133('0x14'),_0x10a9e4,_0x452481['error'][_0x9133('0x19')]);return _0x4c4517(_0x452481[_0x9133('0x17')][_0x9133('0x19')]);}else{logger[_0x9133('0x13')]('OpenchannelAccount,\x20%s,\x20%s',_0x10a9e4,_0x9133('0x1a'));_0x4c4517(_0x452481['result'][_0x9133('0x19')]);}})['catch'](function(_0x115ee8){logger[_0x9133('0x17')]('OpenchannelAccount,\x20%s,\x20%s',_0x10a9e4,_0x115ee8);_0x3f9650(_0x115ee8);});});} \ No newline at end of file diff --git a/server/api/openchannelAccount/openchannelAccount.socket.js b/server/api/openchannelAccount/openchannelAccount.socket.js index f303d45..c65d887 100644 --- a/server/api/openchannelAccount/openchannelAccount.socket.js +++ b/server/api/openchannelAccount/openchannelAccount.socket.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xb910=['length','openchannelAccount:','./openchannelAccount.events','save','remove','update','emit','removeListener','register'];(function(_0x10f68e,_0xf198ea){var _0x4c8372=function(_0x38517){while(--_0x38517){_0x10f68e['push'](_0x10f68e['shift']());}};_0x4c8372(++_0xf198ea);}(_0xb910,0x12b));var _0x0b91=function(_0xa6cc5c,_0x239c99){_0xa6cc5c=_0xa6cc5c-0x0;var _0x44803d=_0xb910[_0xa6cc5c];return _0x44803d;};'use strict';var OpenchannelAccountEvents=require(_0x0b91('0x0'));var events=[_0x0b91('0x1'),_0x0b91('0x2'),_0x0b91('0x3')];function createListener(_0x3e7a8b,_0x1a7acd){return function(_0x25927f){_0x1a7acd[_0x0b91('0x4')](_0x3e7a8b,_0x25927f);};}function removeListener(_0x16ba05,_0x1bfbc7){return function(){OpenchannelAccountEvents[_0x0b91('0x5')](_0x16ba05,_0x1bfbc7);};}exports[_0x0b91('0x6')]=function(_0x295749){for(var _0x1800dc=0x0,_0x5a22b6=events[_0x0b91('0x7')];_0x1800dc<_0x5a22b6;_0x1800dc++){var _0xc65d86=events[_0x1800dc];var _0x3e8800=createListener(_0x0b91('0x8')+_0xc65d86,_0x295749);OpenchannelAccountEvents['on'](_0xc65d86,_0x3e8800);}}; \ No newline at end of file +var _0x6898=['register','length','openchannelAccount:','./openchannelAccount.events','remove','update','emit','removeListener'];(function(_0x22d7a3,_0x23b517){var _0x1ef757=function(_0x1b8340){while(--_0x1b8340){_0x22d7a3['push'](_0x22d7a3['shift']());}};_0x1ef757(++_0x23b517);}(_0x6898,0x11b));var _0x8689=function(_0x3f5d9c,_0x4c2d34){_0x3f5d9c=_0x3f5d9c-0x0;var _0x118131=_0x6898[_0x3f5d9c];return _0x118131;};'use strict';var OpenchannelAccountEvents=require(_0x8689('0x0'));var events=['save',_0x8689('0x1'),_0x8689('0x2')];function createListener(_0x472b9d,_0x13fbdb){return function(_0x3ae917){_0x13fbdb[_0x8689('0x3')](_0x472b9d,_0x3ae917);};}function removeListener(_0x524f81,_0x5038aa){return function(){OpenchannelAccountEvents[_0x8689('0x4')](_0x524f81,_0x5038aa);};}exports[_0x8689('0x5')]=function(_0x2c723e){for(var _0x4e776d=0x0,_0xbc1b52=events[_0x8689('0x6')];_0x4e776d<_0xbc1b52;_0x4e776d++){var _0x9ab197=events[_0x4e776d];var _0x4e5261=createListener(_0x8689('0x7')+_0x9ab197,_0x2c723e);OpenchannelAccountEvents['on'](_0x9ab197,_0x4e5261);}}; \ No newline at end of file diff --git a/server/api/openchannelApplication/index.js b/server/api/openchannelApplication/index.js index 345dd06..8d5913a 100644 --- a/server/api/openchannelApplication/index.js +++ b/server/api/openchannelApplication/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xbf3e=['index','/:id','post','put','update','delete','destroy','multer','util','path','connect-timeout','Router','fs-extra','../../components/auth/service','../../components/interaction/service','get','isAuthenticated'];(function(_0x47f0b6,_0x3daf1a){var _0x53c469=function(_0x3aa790){while(--_0x3aa790){_0x47f0b6['push'](_0x47f0b6['shift']());}};_0x53c469(++_0x3daf1a);}(_0xbf3e,0x1b0));var _0xebf3=function(_0x49c0f6,_0x44386d){_0x49c0f6=_0x49c0f6-0x0;var _0x4075b7=_0xbf3e[_0x49c0f6];return _0x4075b7;};'use strict';var multer=require(_0xebf3('0x0'));var util=require(_0xebf3('0x1'));var path=require(_0xebf3('0x2'));var timeout=require(_0xebf3('0x3'));var express=require('express');var router=express[_0xebf3('0x4')]();var fs_extra=require(_0xebf3('0x5'));var auth=require(_0xebf3('0x6'));var interaction=require(_0xebf3('0x7'));var config=require('../../config/environment');var controller=require('./openchannelApplication.controller');router[_0xebf3('0x8')]('/',auth[_0xebf3('0x9')](),controller[_0xebf3('0xa')]);router[_0xebf3('0x8')](_0xebf3('0xb'),auth[_0xebf3('0x9')](),controller['show']);router[_0xebf3('0xc')]('/',auth['isAuthenticated'](),controller['create']);router[_0xebf3('0xd')](_0xebf3('0xb'),auth[_0xebf3('0x9')](),controller[_0xebf3('0xe')]);router[_0xebf3('0xf')]('/:id',auth[_0xebf3('0x9')](),controller[_0xebf3('0x10')]);module['exports']=router; \ No newline at end of file +var _0x307f=['path','connect-timeout','express','Router','fs-extra','../../components/interaction/service','../../config/environment','get','isAuthenticated','index','/:id','show','post','create','put','update','delete','exports','multer','util'];(function(_0x1f83a5,_0x59843f){var _0x45edf0=function(_0x431e25){while(--_0x431e25){_0x1f83a5['push'](_0x1f83a5['shift']());}};_0x45edf0(++_0x59843f);}(_0x307f,0x9e));var _0xf307=function(_0x4ed929,_0x1728cd){_0x4ed929=_0x4ed929-0x0;var _0x196013=_0x307f[_0x4ed929];return _0x196013;};'use strict';var multer=require(_0xf307('0x0'));var util=require(_0xf307('0x1'));var path=require(_0xf307('0x2'));var timeout=require(_0xf307('0x3'));var express=require(_0xf307('0x4'));var router=express[_0xf307('0x5')]();var fs_extra=require(_0xf307('0x6'));var auth=require('../../components/auth/service');var interaction=require(_0xf307('0x7'));var config=require(_0xf307('0x8'));var controller=require('./openchannelApplication.controller');router[_0xf307('0x9')]('/',auth[_0xf307('0xa')](),controller[_0xf307('0xb')]);router[_0xf307('0x9')](_0xf307('0xc'),auth[_0xf307('0xa')](),controller[_0xf307('0xd')]);router[_0xf307('0xe')]('/',auth[_0xf307('0xa')](),controller[_0xf307('0xf')]);router[_0xf307('0x10')]('/:id',auth[_0xf307('0xa')](),controller[_0xf307('0x11')]);router[_0xf307('0x12')](_0xf307('0xc'),auth[_0xf307('0xa')](),controller['destroy']);module[_0xf307('0x13')]=router; \ No newline at end of file diff --git a/server/api/openchannelApplication/openchannelApplication.attributes.js b/server/api/openchannelApplication/openchannelApplication.attributes.js index 0c596a7..535df2e 100644 --- a/server/api/openchannelApplication/openchannelApplication.attributes.js +++ b/server/api/openchannelApplication/openchannelApplication.attributes.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x2133=['exports','INTEGER','STRING','TEXT','*,*,*,*','sequelize'];(function(_0x455c66,_0x406ad5){var _0x37e2ac=function(_0x55575f){while(--_0x55575f){_0x455c66['push'](_0x455c66['shift']());}};_0x37e2ac(++_0x406ad5);}(_0x2133,0x137));var _0x3213=function(_0x32adc0,_0x55dd08){_0x32adc0=_0x32adc0-0x0;var _0x2b29e0=_0x2133[_0x32adc0];return _0x2b29e0;};'use strict';var Sequelize=require(_0x3213('0x0'));module[_0x3213('0x1')]={'priority':{'type':Sequelize[_0x3213('0x2')],'allowNull':![]},'app':{'type':Sequelize[_0x3213('0x3')],'allowNull':![],'defaultValue':'noop'},'appdata':{'type':Sequelize[_0x3213('0x4')]()},'description':{'type':Sequelize['STRING']},'interval':{'type':Sequelize['STRING'],'defaultValue':_0x3213('0x5')}}; \ No newline at end of file +var _0x5569=['INTEGER','noop','TEXT','STRING','*,*,*,*','sequelize','exports'];(function(_0x3d2e92,_0x1c24b1){var _0x1097c1=function(_0x421498){while(--_0x421498){_0x3d2e92['push'](_0x3d2e92['shift']());}};_0x1097c1(++_0x1c24b1);}(_0x5569,0x6e));var _0x9556=function(_0x326f81,_0x57c9d8){_0x326f81=_0x326f81-0x0;var _0x8a3c6e=_0x5569[_0x326f81];return _0x8a3c6e;};'use strict';var Sequelize=require(_0x9556('0x0'));module[_0x9556('0x1')]={'priority':{'type':Sequelize[_0x9556('0x2')],'allowNull':![]},'app':{'type':Sequelize['STRING'],'allowNull':![],'defaultValue':_0x9556('0x3')},'appdata':{'type':Sequelize[_0x9556('0x4')]()},'description':{'type':Sequelize[_0x9556('0x5')]},'interval':{'type':Sequelize[_0x9556('0x5')],'defaultValue':_0x9556('0x6')}}; \ No newline at end of file diff --git a/server/api/openchannelApplication/openchannelApplication.controller.js b/server/api/openchannelApplication/openchannelApplication.controller.js index c853a88..7aebc17 100644 --- a/server/api/openchannelApplication/openchannelApplication.controller.js +++ b/server/api/openchannelApplication/openchannelApplication.controller.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xf465=['status','json','undefined','limit','count','offset','set','Content-Range','apply','reject','save','update','then','destroy','stack','name','map','rawAttributes','fieldName','type','key','keys','query','filters','intersection','model','attributes','fields','length','hasOwnProperty','order','sort','pick','filter','where','merge','VIRTUAL','options','OpenchannelApplication','includeAll','findAll','rows','catch','params','include','create','body','find','zip-dir','moment','bluebird','mustache','path','to-csv','ejs','lodash','squel','crypto','jsforce','desk.js','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../mysqldb','sendStatus'];(function(_0xa841aa,_0x3fe74f){var _0x469e3d=function(_0x604a12){while(--_0x604a12){_0xa841aa['push'](_0xa841aa['shift']());}};_0x469e3d(++_0x3fe74f);}(_0xf465,0x19d));var _0x5f46=function(_0x1ce631,_0x36a3ec){_0x1ce631=_0x1ce631-0x0;var _0x5120a8=_0xf465[_0x1ce631];return _0x5120a8;};'use strict';var emlformat=require('eml-format');var rimraf=require('rimraf');var zipdir=require(_0x5f46('0x0'));var jsonpatch=require('fast-json-patch');var rp=require('request-promise');var moment=require(_0x5f46('0x1'));var BPromise=require(_0x5f46('0x2'));var Mustache=require(_0x5f46('0x3'));var util=require('util');var path=require(_0x5f46('0x4'));var sox=require('sox');var csv=require(_0x5f46('0x5'));var ejs=require(_0x5f46('0x6'));var fs=require('fs');var fs_extra=require('fs-extra');var _=require(_0x5f46('0x7'));var squel=require(_0x5f46('0x8'));var crypto=require(_0x5f46('0x9'));var jsforce=require(_0x5f46('0xa'));var deskjs=require(_0x5f46('0xb'));var toCsv=require('to-csv');var querystring=require(_0x5f46('0xc'));var Papa=require(_0x5f46('0xd'));var Redis=require(_0x5f46('0xe'));var authService=require(_0x5f46('0xf'));var qs=require(_0x5f46('0x10'));var as=require(_0x5f46('0x11'));var hardwareService=require(_0x5f46('0x12'));var logger=require(_0x5f46('0x13'))(_0x5f46('0x14'));var utils=require(_0x5f46('0x15'));var config=require(_0x5f46('0x16'));var licenseUtil=require('../../config/license/util');var db=require(_0x5f46('0x17'))['db'];function respondWithStatusCode(_0x539fc6,_0x1217c3){_0x1217c3=_0x1217c3||0xcc;return function(_0x144d60){if(_0x144d60){return _0x539fc6[_0x5f46('0x18')](_0x1217c3);}return _0x539fc6['status'](_0x1217c3)['end']();};}function respondWithResult(_0x1bd219,_0x58dbde){_0x58dbde=_0x58dbde||0xc8;return function(_0x19004e){if(_0x19004e){return _0x1bd219[_0x5f46('0x19')](_0x58dbde)[_0x5f46('0x1a')](_0x19004e);}};}function respondWithFilteredResult(_0x2d6457,_0x4f3b2a){return function(_0x30f419){if(_0x30f419){var _0x55b6ae=typeof _0x4f3b2a['offset']===_0x5f46('0x1b')&&typeof _0x4f3b2a[_0x5f46('0x1c')]===_0x5f46('0x1b');var _0x4295da=_0x30f419[_0x5f46('0x1d')];var _0x5792c6=_0x55b6ae?0x0:_0x4f3b2a[_0x5f46('0x1e')];var _0x30be28=_0x55b6ae?_0x30f419[_0x5f46('0x1d')]:_0x4f3b2a['offset']+_0x4f3b2a['limit'];var _0x24e170;if(_0x30be28>=_0x4295da){_0x30be28=_0x4295da;_0x24e170=0xc8;}else{_0x24e170=0xce;}_0x2d6457[_0x5f46('0x19')](_0x24e170);return _0x2d6457[_0x5f46('0x1f')](_0x5f46('0x20'),_0x5792c6+'-'+_0x30be28+'/'+_0x4295da)[_0x5f46('0x1a')](_0x30f419);}return null;};}function patchUpdates(_0x3ab084){return function(_0x3c3b07){try{jsonpatch[_0x5f46('0x21')](_0x3c3b07,_0x3ab084,!![]);}catch(_0x418133){return BPromise[_0x5f46('0x22')](_0x418133);}return _0x3c3b07[_0x5f46('0x23')]();};}function saveUpdates(_0x147184,_0x2fa224){return function(_0x250304){if(_0x250304){return _0x250304[_0x5f46('0x24')](_0x147184)[_0x5f46('0x25')](function(_0xf0364f){return _0xf0364f;});}return null;};}function removeEntity(_0x491ffe,_0x271e05){return function(_0x5721bb){if(_0x5721bb){return _0x5721bb[_0x5f46('0x26')]()[_0x5f46('0x25')](function(){_0x491ffe[_0x5f46('0x19')](0xcc)['end']();});}};}function handleEntityNotFound(_0x4e96c0,_0x516f2c){return function(_0x1dadbf){if(!_0x1dadbf){_0x4e96c0[_0x5f46('0x18')](0x194);}return _0x1dadbf;};}function handleError(_0x213b5b,_0x3fa1dc){_0x3fa1dc=_0x3fa1dc||0x1f4;return function(_0x488613){logger['error'](_0x488613[_0x5f46('0x27')]);if(_0x488613[_0x5f46('0x28')]){delete _0x488613['name'];}_0x213b5b[_0x5f46('0x19')](_0x3fa1dc)['send'](_0x488613);};}exports['index']=function(_0x19a7a5,_0x42c4c8){var _0x27a8c8={},_0x212448={},_0x18d9cf={'count':0x0,'rows':[]};var _0x4f0bc1=_[_0x5f46('0x29')](db['OpenchannelApplication'][_0x5f46('0x2a')],function(_0x1fe21a){return{'name':_0x1fe21a[_0x5f46('0x2b')],'type':_0x1fe21a[_0x5f46('0x2c')][_0x5f46('0x2d')]};});_0x212448['model']=_[_0x5f46('0x29')](_0x4f0bc1,_0x5f46('0x28'));_0x212448['query']=_[_0x5f46('0x2e')](_0x19a7a5[_0x5f46('0x2f')]);_0x212448[_0x5f46('0x30')]=_[_0x5f46('0x31')](_0x212448[_0x5f46('0x32')],_0x212448[_0x5f46('0x2f')]);_0x27a8c8[_0x5f46('0x33')]=_[_0x5f46('0x31')](_0x212448[_0x5f46('0x32')],qs[_0x5f46('0x34')](_0x19a7a5[_0x5f46('0x2f')][_0x5f46('0x34')]));_0x27a8c8['attributes']=_0x27a8c8[_0x5f46('0x33')][_0x5f46('0x35')]?_0x27a8c8[_0x5f46('0x33')]:_0x212448['model'];if(!_0x19a7a5[_0x5f46('0x2f')][_0x5f46('0x36')]('nolimit')){_0x27a8c8[_0x5f46('0x1c')]=qs[_0x5f46('0x1c')](_0x19a7a5[_0x5f46('0x2f')]['limit']);_0x27a8c8[_0x5f46('0x1e')]=qs[_0x5f46('0x1e')](_0x19a7a5['query'][_0x5f46('0x1e')]);}_0x27a8c8[_0x5f46('0x37')]=qs[_0x5f46('0x38')](_0x19a7a5[_0x5f46('0x2f')][_0x5f46('0x38')]);_0x27a8c8['where']=qs[_0x5f46('0x30')](_[_0x5f46('0x39')](_0x19a7a5[_0x5f46('0x2f')],_0x212448[_0x5f46('0x30')]),_0x4f0bc1);if(_0x19a7a5[_0x5f46('0x2f')][_0x5f46('0x3a')]){_0x27a8c8[_0x5f46('0x3b')]=_[_0x5f46('0x3c')](_0x27a8c8['where'],{'$or':_[_0x5f46('0x29')](_0x4f0bc1,function(_0x58e600){if(_0x58e600['type']!==_0x5f46('0x3d')){var _0x4e79bb={};_0x4e79bb[_0x58e600['name']]={'$like':'%'+_0x19a7a5[_0x5f46('0x2f')]['filter']+'%'};return _0x4e79bb;}})});}_0x27a8c8=_[_0x5f46('0x3c')]({},_0x27a8c8,_0x19a7a5[_0x5f46('0x3e')]);var _0x1a325d={'where':_0x27a8c8[_0x5f46('0x3b')]};return db[_0x5f46('0x3f')][_0x5f46('0x1d')](_0x1a325d)[_0x5f46('0x25')](function(_0x411b8c){_0x18d9cf['count']=_0x411b8c;if(_0x19a7a5['query'][_0x5f46('0x40')]){_0x27a8c8['include']=[{'all':!![]}];}return db[_0x5f46('0x3f')][_0x5f46('0x41')](_0x27a8c8);})[_0x5f46('0x25')](function(_0x35f0a7){_0x18d9cf[_0x5f46('0x42')]=_0x35f0a7;return _0x18d9cf;})[_0x5f46('0x25')](respondWithFilteredResult(_0x42c4c8,_0x27a8c8))[_0x5f46('0x43')](handleError(_0x42c4c8,null));};exports['show']=function(_0x5c4675,_0x8705b2){var _0x1255e6={'raw':!![],'where':{'id':_0x5c4675[_0x5f46('0x44')]['id']}},_0x4564b0={};_0x4564b0[_0x5f46('0x32')]=_['keys'](db[_0x5f46('0x3f')]['rawAttributes']);_0x4564b0[_0x5f46('0x2f')]=_[_0x5f46('0x2e')](_0x5c4675[_0x5f46('0x2f')]);_0x4564b0['filters']=_[_0x5f46('0x31')](_0x4564b0[_0x5f46('0x32')],_0x4564b0[_0x5f46('0x2f')]);_0x1255e6[_0x5f46('0x33')]=_['intersection'](_0x4564b0[_0x5f46('0x32')],qs[_0x5f46('0x34')](_0x5c4675['query'][_0x5f46('0x34')]));_0x1255e6[_0x5f46('0x33')]=_0x1255e6[_0x5f46('0x33')][_0x5f46('0x35')]?_0x1255e6[_0x5f46('0x33')]:_0x4564b0[_0x5f46('0x32')];if(_0x5c4675[_0x5f46('0x2f')][_0x5f46('0x40')]){_0x1255e6[_0x5f46('0x45')]=[{'all':!![]}];}_0x1255e6=_[_0x5f46('0x3c')]({},_0x1255e6,_0x5c4675[_0x5f46('0x3e')]);return db[_0x5f46('0x3f')]['find'](_0x1255e6)[_0x5f46('0x25')](handleEntityNotFound(_0x8705b2,null))['then'](respondWithResult(_0x8705b2,null))['catch'](handleError(_0x8705b2,null));};exports[_0x5f46('0x46')]=function(_0x172078,_0x184ca1){return db[_0x5f46('0x3f')][_0x5f46('0x46')](_0x172078[_0x5f46('0x47')],{})['then'](respondWithResult(_0x184ca1,0xc9))[_0x5f46('0x43')](handleError(_0x184ca1,null));};exports[_0x5f46('0x24')]=function(_0x450c63,_0x2af4c5){if(_0x450c63[_0x5f46('0x47')]['id']){delete _0x450c63['body']['id'];}return db['OpenchannelApplication'][_0x5f46('0x48')]({'where':{'id':_0x450c63['params']['id']}})[_0x5f46('0x25')](handleEntityNotFound(_0x2af4c5,null))[_0x5f46('0x25')](saveUpdates(_0x450c63[_0x5f46('0x47')],null))[_0x5f46('0x25')](respondWithResult(_0x2af4c5,null))[_0x5f46('0x43')](handleError(_0x2af4c5,null));};exports['destroy']=function(_0x251d74,_0x4168c1){return db['OpenchannelApplication'][_0x5f46('0x48')]({'where':{'id':_0x251d74['params']['id']}})[_0x5f46('0x25')](handleEntityNotFound(_0x4168c1,null))['then'](removeEntity(_0x4168c1,null))[_0x5f46('0x43')](handleError(_0x4168c1,null));}; \ No newline at end of file +var _0x7a8e=['destroy','then','status','stack','name','send','index','map','OpenchannelApplication','fieldName','type','key','model','query','keys','filters','intersection','attributes','length','hasOwnProperty','nolimit','order','sort','where','filter','merge','options','findAll','rows','catch','show','rawAttributes','fields','includeAll','find','create','body','params','rimraf','zip-dir','request-promise','bluebird','mustache','util','path','sox','to-csv','squel','jsforce','desk.js','querystring','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','../../mysqldb','sendStatus','end','json','offset','undefined','limit','count','Content-Range','apply'];(function(_0x12210d,_0x455796){var _0x346ca6=function(_0x3daaac){while(--_0x3daaac){_0x12210d['push'](_0x12210d['shift']());}};_0x346ca6(++_0x455796);}(_0x7a8e,0xb0));var _0xe7a8=function(_0x3d5351,_0x27bc80){_0x3d5351=_0x3d5351-0x0;var _0x1db4db=_0x7a8e[_0x3d5351];return _0x1db4db;};'use strict';var emlformat=require('eml-format');var rimraf=require(_0xe7a8('0x0'));var zipdir=require(_0xe7a8('0x1'));var jsonpatch=require('fast-json-patch');var rp=require(_0xe7a8('0x2'));var moment=require('moment');var BPromise=require(_0xe7a8('0x3'));var Mustache=require(_0xe7a8('0x4'));var util=require(_0xe7a8('0x5'));var path=require(_0xe7a8('0x6'));var sox=require(_0xe7a8('0x7'));var csv=require(_0xe7a8('0x8'));var ejs=require('ejs');var fs=require('fs');var fs_extra=require('fs-extra');var _=require('lodash');var squel=require(_0xe7a8('0x9'));var crypto=require('crypto');var jsforce=require(_0xe7a8('0xa'));var deskjs=require(_0xe7a8('0xb'));var toCsv=require(_0xe7a8('0x8'));var querystring=require(_0xe7a8('0xc'));var Papa=require('papaparse');var Redis=require(_0xe7a8('0xd'));var authService=require(_0xe7a8('0xe'));var qs=require(_0xe7a8('0xf'));var as=require(_0xe7a8('0x10'));var hardwareService=require(_0xe7a8('0x11'));var logger=require(_0xe7a8('0x12'))(_0xe7a8('0x13'));var utils=require(_0xe7a8('0x14'));var config=require('../../config/environment');var licenseUtil=require('../../config/license/util');var db=require(_0xe7a8('0x15'))['db'];function respondWithStatusCode(_0x5f2321,_0x926b93){_0x926b93=_0x926b93||0xcc;return function(_0x1cfd05){if(_0x1cfd05){return _0x5f2321[_0xe7a8('0x16')](_0x926b93);}return _0x5f2321['status'](_0x926b93)[_0xe7a8('0x17')]();};}function respondWithResult(_0x91443a,_0x1bffbe){_0x1bffbe=_0x1bffbe||0xc8;return function(_0x8db53a){if(_0x8db53a){return _0x91443a['status'](_0x1bffbe)[_0xe7a8('0x18')](_0x8db53a);}};}function respondWithFilteredResult(_0x2c3119,_0x47d229){return function(_0x15710a){if(_0x15710a){var _0x1221b1=typeof _0x47d229[_0xe7a8('0x19')]===_0xe7a8('0x1a')&&typeof _0x47d229[_0xe7a8('0x1b')]==='undefined';var _0x2b5022=_0x15710a['count'];var _0x494b1e=_0x1221b1?0x0:_0x47d229['offset'];var _0x459535=_0x1221b1?_0x15710a[_0xe7a8('0x1c')]:_0x47d229[_0xe7a8('0x19')]+_0x47d229[_0xe7a8('0x1b')];var _0x51f88e;if(_0x459535>=_0x2b5022){_0x459535=_0x2b5022;_0x51f88e=0xc8;}else{_0x51f88e=0xce;}_0x2c3119['status'](_0x51f88e);return _0x2c3119['set'](_0xe7a8('0x1d'),_0x494b1e+'-'+_0x459535+'/'+_0x2b5022)[_0xe7a8('0x18')](_0x15710a);}return null;};}function patchUpdates(_0x1d0225){return function(_0x33fbdd){try{jsonpatch[_0xe7a8('0x1e')](_0x33fbdd,_0x1d0225,!![]);}catch(_0x642bde){return BPromise['reject'](_0x642bde);}return _0x33fbdd['save']();};}function saveUpdates(_0xf4a9ef,_0x414511){return function(_0x170568){if(_0x170568){return _0x170568['update'](_0xf4a9ef)['then'](function(_0x10a77c){return _0x10a77c;});}return null;};}function removeEntity(_0x4545c3,_0x37c498){return function(_0x4aef32){if(_0x4aef32){return _0x4aef32[_0xe7a8('0x1f')]()[_0xe7a8('0x20')](function(){_0x4545c3[_0xe7a8('0x21')](0xcc)['end']();});}};}function handleEntityNotFound(_0x39fd9f,_0x3af51d){return function(_0x38c5dd){if(!_0x38c5dd){_0x39fd9f[_0xe7a8('0x16')](0x194);}return _0x38c5dd;};}function handleError(_0x285573,_0x32b04d){_0x32b04d=_0x32b04d||0x1f4;return function(_0x3f62c2){logger['error'](_0x3f62c2[_0xe7a8('0x22')]);if(_0x3f62c2[_0xe7a8('0x23')]){delete _0x3f62c2['name'];}_0x285573[_0xe7a8('0x21')](_0x32b04d)[_0xe7a8('0x24')](_0x3f62c2);};}exports[_0xe7a8('0x25')]=function(_0x15d86b,_0x44d427){var _0x514cf0={},_0x35ffb3={},_0x2707f2={'count':0x0,'rows':[]};var _0x2cc34f=_[_0xe7a8('0x26')](db[_0xe7a8('0x27')]['rawAttributes'],function(_0x4ed5ed){return{'name':_0x4ed5ed[_0xe7a8('0x28')],'type':_0x4ed5ed[_0xe7a8('0x29')][_0xe7a8('0x2a')]};});_0x35ffb3[_0xe7a8('0x2b')]=_[_0xe7a8('0x26')](_0x2cc34f,_0xe7a8('0x23'));_0x35ffb3[_0xe7a8('0x2c')]=_[_0xe7a8('0x2d')](_0x15d86b['query']);_0x35ffb3[_0xe7a8('0x2e')]=_[_0xe7a8('0x2f')](_0x35ffb3[_0xe7a8('0x2b')],_0x35ffb3[_0xe7a8('0x2c')]);_0x514cf0[_0xe7a8('0x30')]=_[_0xe7a8('0x2f')](_0x35ffb3[_0xe7a8('0x2b')],qs['fields'](_0x15d86b[_0xe7a8('0x2c')]['fields']));_0x514cf0['attributes']=_0x514cf0['attributes'][_0xe7a8('0x31')]?_0x514cf0[_0xe7a8('0x30')]:_0x35ffb3['model'];if(!_0x15d86b[_0xe7a8('0x2c')][_0xe7a8('0x32')](_0xe7a8('0x33'))){_0x514cf0[_0xe7a8('0x1b')]=qs[_0xe7a8('0x1b')](_0x15d86b[_0xe7a8('0x2c')][_0xe7a8('0x1b')]);_0x514cf0[_0xe7a8('0x19')]=qs[_0xe7a8('0x19')](_0x15d86b['query'][_0xe7a8('0x19')]);}_0x514cf0[_0xe7a8('0x34')]=qs[_0xe7a8('0x35')](_0x15d86b[_0xe7a8('0x2c')][_0xe7a8('0x35')]);_0x514cf0[_0xe7a8('0x36')]=qs[_0xe7a8('0x2e')](_['pick'](_0x15d86b[_0xe7a8('0x2c')],_0x35ffb3[_0xe7a8('0x2e')]),_0x2cc34f);if(_0x15d86b['query'][_0xe7a8('0x37')]){_0x514cf0[_0xe7a8('0x36')]=_['merge'](_0x514cf0['where'],{'$or':_[_0xe7a8('0x26')](_0x2cc34f,function(_0x2160cd){if(_0x2160cd[_0xe7a8('0x29')]!=='VIRTUAL'){var _0x289634={};_0x289634[_0x2160cd['name']]={'$like':'%'+_0x15d86b[_0xe7a8('0x2c')][_0xe7a8('0x37')]+'%'};return _0x289634;}})});}_0x514cf0=_[_0xe7a8('0x38')]({},_0x514cf0,_0x15d86b[_0xe7a8('0x39')]);var _0xab695c={'where':_0x514cf0[_0xe7a8('0x36')]};return db[_0xe7a8('0x27')][_0xe7a8('0x1c')](_0xab695c)[_0xe7a8('0x20')](function(_0x58f3cd){_0x2707f2['count']=_0x58f3cd;if(_0x15d86b['query']['includeAll']){_0x514cf0['include']=[{'all':!![]}];}return db[_0xe7a8('0x27')][_0xe7a8('0x3a')](_0x514cf0);})[_0xe7a8('0x20')](function(_0x1b9597){_0x2707f2[_0xe7a8('0x3b')]=_0x1b9597;return _0x2707f2;})['then'](respondWithFilteredResult(_0x44d427,_0x514cf0))[_0xe7a8('0x3c')](handleError(_0x44d427,null));};exports[_0xe7a8('0x3d')]=function(_0x38e4cd,_0x5a6e48){var _0x3cd4cc={'raw':!![],'where':{'id':_0x38e4cd['params']['id']}},_0x4bd3d9={};_0x4bd3d9[_0xe7a8('0x2b')]=_['keys'](db['OpenchannelApplication'][_0xe7a8('0x3e')]);_0x4bd3d9[_0xe7a8('0x2c')]=_[_0xe7a8('0x2d')](_0x38e4cd['query']);_0x4bd3d9[_0xe7a8('0x2e')]=_['intersection'](_0x4bd3d9[_0xe7a8('0x2b')],_0x4bd3d9['query']);_0x3cd4cc[_0xe7a8('0x30')]=_[_0xe7a8('0x2f')](_0x4bd3d9['model'],qs['fields'](_0x38e4cd['query'][_0xe7a8('0x3f')]));_0x3cd4cc['attributes']=_0x3cd4cc[_0xe7a8('0x30')]['length']?_0x3cd4cc[_0xe7a8('0x30')]:_0x4bd3d9[_0xe7a8('0x2b')];if(_0x38e4cd[_0xe7a8('0x2c')][_0xe7a8('0x40')]){_0x3cd4cc['include']=[{'all':!![]}];}_0x3cd4cc=_[_0xe7a8('0x38')]({},_0x3cd4cc,_0x38e4cd['options']);return db[_0xe7a8('0x27')][_0xe7a8('0x41')](_0x3cd4cc)[_0xe7a8('0x20')](handleEntityNotFound(_0x5a6e48,null))[_0xe7a8('0x20')](respondWithResult(_0x5a6e48,null))[_0xe7a8('0x3c')](handleError(_0x5a6e48,null));};exports['create']=function(_0x143e3d,_0x153ffe){return db[_0xe7a8('0x27')][_0xe7a8('0x42')](_0x143e3d[_0xe7a8('0x43')],{})[_0xe7a8('0x20')](respondWithResult(_0x153ffe,0xc9))[_0xe7a8('0x3c')](handleError(_0x153ffe,null));};exports['update']=function(_0x1f6e03,_0x556466){if(_0x1f6e03[_0xe7a8('0x43')]['id']){delete _0x1f6e03[_0xe7a8('0x43')]['id'];}return db[_0xe7a8('0x27')][_0xe7a8('0x41')]({'where':{'id':_0x1f6e03[_0xe7a8('0x44')]['id']}})[_0xe7a8('0x20')](handleEntityNotFound(_0x556466,null))['then'](saveUpdates(_0x1f6e03[_0xe7a8('0x43')],null))[_0xe7a8('0x20')](respondWithResult(_0x556466,null))[_0xe7a8('0x3c')](handleError(_0x556466,null));};exports['destroy']=function(_0xde955b,_0x118f47){return db[_0xe7a8('0x27')][_0xe7a8('0x41')]({'where':{'id':_0xde955b[_0xe7a8('0x44')]['id']}})[_0xe7a8('0x20')](handleEntityNotFound(_0x118f47,null))[_0xe7a8('0x20')](removeEntity(_0x118f47,null))[_0xe7a8('0x3c')](handleError(_0x118f47,null));}; \ No newline at end of file diff --git a/server/api/openchannelApplication/openchannelApplication.model.js b/server/api/openchannelApplication/openchannelApplication.model.js index 768940f..1ed23be 100644 --- a/server/api/openchannelApplication/openchannelApplication.model.js +++ b/server/api/openchannelApplication/openchannelApplication.model.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x243d=['../../config/logger','api','bluebird','request-promise','rimraf','../../config/environment','exports','define','openchannel_applications','utf8mb4','utf8mb4_unicode_ci','util'];(function(_0x485c9f,_0x399a20){var _0x2ba76e=function(_0x3598d4){while(--_0x3598d4){_0x485c9f['push'](_0x485c9f['shift']());}};_0x2ba76e(++_0x399a20);}(_0x243d,0x1c7));var _0xd243=function(_0x4baae2,_0x487ab6){_0x4baae2=_0x4baae2-0x0;var _0x1a2285=_0x243d[_0x4baae2];return _0x1a2285;};'use strict';var _=require('lodash');var util=require(_0xd243('0x0'));var logger=require(_0xd243('0x1'))(_0xd243('0x2'));var moment=require('moment');var BPromise=require(_0xd243('0x3'));var rp=require(_0xd243('0x4'));var fs=require('fs');var path=require('path');var rimraf=require(_0xd243('0x5'));var config=require(_0xd243('0x6'));var attributes=require('./openchannelApplication.attributes');module[_0xd243('0x7')]=function(_0x4baa2a,_0x44fc36){return _0x4baa2a[_0xd243('0x8')]('OpenchannelApplication',attributes,{'tableName':_0xd243('0x9'),'paranoid':![],'indexes':[],'timestamps':!![],'charset':_0xd243('0xa'),'collate':_0xd243('0xb')});}; \ No newline at end of file +var _0xaf25=['utf8mb4','lodash','util','../../config/logger','moment','bluebird','request-promise','rimraf','../../config/environment','./openchannelApplication.attributes','exports','OpenchannelApplication','openchannel_applications'];(function(_0x4ef880,_0x3148a7){var _0x28ddca=function(_0x342dc9){while(--_0x342dc9){_0x4ef880['push'](_0x4ef880['shift']());}};_0x28ddca(++_0x3148a7);}(_0xaf25,0x1d5));var _0x5af2=function(_0x488de9,_0x5d5052){_0x488de9=_0x488de9-0x0;var _0x30a6f9=_0xaf25[_0x488de9];return _0x30a6f9;};'use strict';var _=require(_0x5af2('0x0'));var util=require(_0x5af2('0x1'));var logger=require(_0x5af2('0x2'))('api');var moment=require(_0x5af2('0x3'));var BPromise=require(_0x5af2('0x4'));var rp=require(_0x5af2('0x5'));var fs=require('fs');var path=require('path');var rimraf=require(_0x5af2('0x6'));var config=require(_0x5af2('0x7'));var attributes=require(_0x5af2('0x8'));module[_0x5af2('0x9')]=function(_0x524917,_0x13dfb1){return _0x524917['define'](_0x5af2('0xa'),attributes,{'tableName':_0x5af2('0xb'),'paranoid':![],'indexes':[],'timestamps':!![],'charset':_0x5af2('0xc'),'collate':'utf8mb4_unicode_ci'});}; \ No newline at end of file diff --git a/server/api/openchannelApplication/openchannelApplication.rpc.js b/server/api/openchannelApplication/openchannelApplication.rpc.js index bf13a74..9b96162 100644 --- a/server/api/openchannelApplication/openchannelApplication.rpc.js +++ b/server/api/openchannelApplication/openchannelApplication.rpc.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xf17d=['rpc','../../config/environment','jayson/promise','client','http','then','info','OpenchannelApplication,\x20%s,\x20%s','debug','request\x20sent','stringify','code','error','message','catch','UpdateOpenchannelApplication','OpenchannelApplication','update','body','options','raw','where','limit','lodash','ioredis','../../mysqldb','../../config/utils','../../config/logger'];(function(_0x35cb7b,_0x5a5d77){var _0x4e8438=function(_0x10319){while(--_0x10319){_0x35cb7b['push'](_0x35cb7b['shift']());}};_0x4e8438(++_0x5a5d77);}(_0xf17d,0xbf));var _0xdf17=function(_0x3bf83f,_0x181cac){_0x3bf83f=_0x3bf83f-0x0;var _0x22c4a9=_0xf17d[_0x3bf83f];return _0x22c4a9;};'use strict';var _=require(_0xdf17('0x0'));var util=require('util');var moment=require('moment');var BPromise=require('bluebird');var rs=require('randomstring');var fs=require('fs');var Redis=require(_0xdf17('0x1'));var db=require(_0xdf17('0x2'))['db'];var utils=require(_0xdf17('0x3'));var logger=require(_0xdf17('0x4'))(_0xdf17('0x5'));var config=require(_0xdf17('0x6'));var jayson=require(_0xdf17('0x7'));var client=jayson[_0xdf17('0x8')][_0xdf17('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x5cddbb,_0x453e7e,_0x9d1013){return new BPromise(function(_0x4abfa8,_0x452691){return client['request'](_0x5cddbb,_0x9d1013)[_0xdf17('0xa')](function(_0x457757){logger[_0xdf17('0xb')](_0xdf17('0xc'),_0x453e7e,'request\x20sent');logger[_0xdf17('0xd')]('OpenchannelApplication,\x20%s,\x20%s,\x20%s',_0x453e7e,_0xdf17('0xe'),JSON[_0xdf17('0xf')](_0x457757));if(_0x457757['error']){if(_0x457757['error'][_0xdf17('0x10')]===0x1f4){logger[_0xdf17('0x11')](_0xdf17('0xc'),_0x453e7e,_0x457757['error'][_0xdf17('0x12')]);return _0x452691(_0x457757[_0xdf17('0x11')][_0xdf17('0x12')]);}logger['error'](_0xdf17('0xc'),_0x453e7e,_0x457757['error']['message']);return _0x4abfa8(_0x457757[_0xdf17('0x11')]['message']);}else{logger[_0xdf17('0xb')]('OpenchannelApplication,\x20%s,\x20%s',_0x453e7e,'request\x20sent');_0x4abfa8(_0x457757['result']['message']);}})[_0xdf17('0x13')](function(_0x929575){logger[_0xdf17('0x11')](_0xdf17('0xc'),_0x453e7e,_0x929575);_0x452691(_0x929575);});});}exports[_0xdf17('0x14')]=function(_0xac1330){var _0x2e129d=this;return new Promise(function(_0x2c500e,_0x4991d0){return db[_0xdf17('0x15')][_0xdf17('0x16')](_0xac1330[_0xdf17('0x17')],{'raw':_0xac1330[_0xdf17('0x18')]?_0xac1330[_0xdf17('0x18')][_0xdf17('0x19')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0xac1330[_0xdf17('0x18')]?_0xac1330[_0xdf17('0x18')][_0xdf17('0x1a')]||null:null,'attributes':_0xac1330[_0xdf17('0x18')]?_0xac1330[_0xdf17('0x18')]['attributes']||null:null,'limit':_0xac1330['options']?_0xac1330[_0xdf17('0x18')][_0xdf17('0x1b')]||null:null})[_0xdf17('0xa')](function(_0x4448d0){logger[_0xdf17('0xb')](_0xdf17('0x14'),_0xac1330);logger[_0xdf17('0xd')](_0xdf17('0x14'),_0xac1330,JSON[_0xdf17('0xf')](_0x4448d0));_0x2c500e(_0x4448d0);})[_0xdf17('0x13')](function(_0x473445){logger[_0xdf17('0x11')](_0xdf17('0x14'),_0x473445[_0xdf17('0x12')],_0xac1330);_0x4991d0(_0x2e129d[_0xdf17('0x11')](0x1f4,_0x473445[_0xdf17('0x12')]));});});}; \ No newline at end of file +var _0xa28c=['message','result','catch','UpdateOpenchannelApplication','OpenchannelApplication','body','options','raw','where','limit','lodash','util','moment','bluebird','ioredis','../../mysqldb','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','request','then','info','OpenchannelApplication,\x20%s,\x20%s','request\x20sent','OpenchannelApplication,\x20%s,\x20%s,\x20%s','stringify','error','code'];(function(_0x2d0ec5,_0x2ec2d1){var _0x2e4811=function(_0x5c3754){while(--_0x5c3754){_0x2d0ec5['push'](_0x2d0ec5['shift']());}};_0x2e4811(++_0x2ec2d1);}(_0xa28c,0xc4));var _0xca28=function(_0x550d12,_0x5384bd){_0x550d12=_0x550d12-0x0;var _0x12103d=_0xa28c[_0x550d12];return _0x12103d;};'use strict';var _=require(_0xca28('0x0'));var util=require(_0xca28('0x1'));var moment=require(_0xca28('0x2'));var BPromise=require(_0xca28('0x3'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0xca28('0x4'));var db=require(_0xca28('0x5'))['db'];var utils=require('../../config/utils');var logger=require(_0xca28('0x6'))(_0xca28('0x7'));var config=require(_0xca28('0x8'));var jayson=require(_0xca28('0x9'));var client=jayson[_0xca28('0xa')][_0xca28('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x375cd7,_0x445b40,_0x8f7aa9){return new BPromise(function(_0x4f1f42,_0x251b22){return client[_0xca28('0xc')](_0x375cd7,_0x8f7aa9)[_0xca28('0xd')](function(_0x3077a1){logger[_0xca28('0xe')](_0xca28('0xf'),_0x445b40,_0xca28('0x10'));logger['debug'](_0xca28('0x11'),_0x445b40,_0xca28('0x10'),JSON[_0xca28('0x12')](_0x3077a1));if(_0x3077a1[_0xca28('0x13')]){if(_0x3077a1['error'][_0xca28('0x14')]===0x1f4){logger[_0xca28('0x13')](_0xca28('0xf'),_0x445b40,_0x3077a1['error'][_0xca28('0x15')]);return _0x251b22(_0x3077a1[_0xca28('0x13')]['message']);}logger['error'](_0xca28('0xf'),_0x445b40,_0x3077a1[_0xca28('0x13')][_0xca28('0x15')]);return _0x4f1f42(_0x3077a1[_0xca28('0x13')][_0xca28('0x15')]);}else{logger[_0xca28('0xe')](_0xca28('0xf'),_0x445b40,'request\x20sent');_0x4f1f42(_0x3077a1[_0xca28('0x16')][_0xca28('0x15')]);}})[_0xca28('0x17')](function(_0x3ec8a2){logger[_0xca28('0x13')](_0xca28('0xf'),_0x445b40,_0x3ec8a2);_0x251b22(_0x3ec8a2);});});}exports[_0xca28('0x18')]=function(_0x4cf7f7){var _0x156645=this;return new Promise(function(_0x59d7f1,_0x40747d){return db[_0xca28('0x19')]['update'](_0x4cf7f7[_0xca28('0x1a')],{'raw':_0x4cf7f7[_0xca28('0x1b')]?_0x4cf7f7[_0xca28('0x1b')][_0xca28('0x1c')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x4cf7f7['options']?_0x4cf7f7[_0xca28('0x1b')][_0xca28('0x1d')]||null:null,'attributes':_0x4cf7f7['options']?_0x4cf7f7[_0xca28('0x1b')]['attributes']||null:null,'limit':_0x4cf7f7[_0xca28('0x1b')]?_0x4cf7f7['options'][_0xca28('0x1e')]||null:null})['then'](function(_0x180d10){logger['info']('UpdateOpenchannelApplication',_0x4cf7f7);logger['debug'](_0xca28('0x18'),_0x4cf7f7,JSON[_0xca28('0x12')](_0x180d10));_0x59d7f1(_0x180d10);})[_0xca28('0x17')](function(_0x54e745){logger[_0xca28('0x13')](_0xca28('0x18'),_0x54e745[_0xca28('0x15')],_0x4cf7f7);_0x40747d(_0x156645[_0xca28('0x13')](0x1f4,_0x54e745[_0xca28('0x15')]));});});}; \ No newline at end of file diff --git a/server/api/openchannelInteraction/index.js b/server/api/openchannelInteraction/index.js index f73817a..238a626 100644 --- a/server/api/openchannelInteraction/index.js +++ b/server/api/openchannelInteraction/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x5a48=['tracked','openchannelinteraction:update','update','delete','openchannelinteraction:destroy','/:id/tags','exports','multer','express','Router','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','./openchannelInteraction.controller','get','isAuthenticated','index','/describe','describe','/:id','show','/:id/messages','/:id/download','download','post','addMessage','openchannel','openchannelinteraction:addtags','addTags','put'];(function(_0x1a87b3,_0x45ba68){var _0x37e84d=function(_0x39f49e){while(--_0x39f49e){_0x1a87b3['push'](_0x1a87b3['shift']());}};_0x37e84d(++_0x45ba68);}(_0x5a48,0x17b));var _0x85a4=function(_0xbd08b4,_0x4790ed){_0xbd08b4=_0xbd08b4-0x0;var _0x314f1e=_0x5a48[_0xbd08b4];return _0x314f1e;};'use strict';var multer=require(_0x85a4('0x0'));var util=require('util');var path=require('path');var timeout=require('connect-timeout');var express=require(_0x85a4('0x1'));var router=express[_0x85a4('0x2')]();var fs_extra=require(_0x85a4('0x3'));var auth=require(_0x85a4('0x4'));var interaction=require(_0x85a4('0x5'));var config=require(_0x85a4('0x6'));var controller=require(_0x85a4('0x7'));router[_0x85a4('0x8')]('/',auth[_0x85a4('0x9')](),controller[_0x85a4('0xa')]);router[_0x85a4('0x8')](_0x85a4('0xb'),auth[_0x85a4('0x9')](),controller[_0x85a4('0xc')]);router[_0x85a4('0x8')](_0x85a4('0xd'),auth[_0x85a4('0x9')](),controller[_0x85a4('0xe')]);router[_0x85a4('0x8')](_0x85a4('0xf'),auth[_0x85a4('0x9')](),controller['getMessages']);router[_0x85a4('0x8')](_0x85a4('0x10'),auth[_0x85a4('0x9')](),controller[_0x85a4('0x11')]);router['post']('/',auth[_0x85a4('0x9')](),controller['create']);router[_0x85a4('0x12')](_0x85a4('0xf'),auth[_0x85a4('0x9')](),controller[_0x85a4('0x13')]);router['post']('/:id/tags',auth[_0x85a4('0x9')](),interaction['tracked'](_0x85a4('0x14'),_0x85a4('0x15')),controller[_0x85a4('0x16')]);router[_0x85a4('0x17')](_0x85a4('0xd'),auth[_0x85a4('0x9')](),interaction[_0x85a4('0x18')](_0x85a4('0x14'),_0x85a4('0x19')),controller[_0x85a4('0x1a')]);router[_0x85a4('0x1b')]('/:id',auth[_0x85a4('0x9')](),interaction[_0x85a4('0x18')]('openchannel',_0x85a4('0x1c')),controller['destroy']);router[_0x85a4('0x1b')](_0x85a4('0x1d'),auth[_0x85a4('0x9')](),controller['removeTags']);module[_0x85a4('0x1e')]=router; \ No newline at end of file +var _0xd5a9=['fs-extra','../../components/interaction/service','../../config/environment','./openchannelInteraction.controller','isAuthenticated','index','get','/describe','describe','show','/:id/messages','/:id/download','download','post','create','addMessage','/:id/tags','tracked','openchannel','addTags','put','/:id','openchannelinteraction:update','update','delete','openchannelinteraction:destroy','destroy','exports','multer','path','connect-timeout','express','Router'];(function(_0x5a3c67,_0x2da13c){var _0x3d46bd=function(_0x1c15be){while(--_0x1c15be){_0x5a3c67['push'](_0x5a3c67['shift']());}};_0x3d46bd(++_0x2da13c);}(_0xd5a9,0xa0));var _0x9d5a=function(_0x284a44,_0x3bfc79){_0x284a44=_0x284a44-0x0;var _0x4974b4=_0xd5a9[_0x284a44];return _0x4974b4;};'use strict';var multer=require(_0x9d5a('0x0'));var util=require('util');var path=require(_0x9d5a('0x1'));var timeout=require(_0x9d5a('0x2'));var express=require(_0x9d5a('0x3'));var router=express[_0x9d5a('0x4')]();var fs_extra=require(_0x9d5a('0x5'));var auth=require('../../components/auth/service');var interaction=require(_0x9d5a('0x6'));var config=require(_0x9d5a('0x7'));var controller=require(_0x9d5a('0x8'));router['get']('/',auth[_0x9d5a('0x9')](),controller[_0x9d5a('0xa')]);router[_0x9d5a('0xb')](_0x9d5a('0xc'),auth[_0x9d5a('0x9')](),controller[_0x9d5a('0xd')]);router[_0x9d5a('0xb')]('/:id',auth[_0x9d5a('0x9')](),controller[_0x9d5a('0xe')]);router[_0x9d5a('0xb')](_0x9d5a('0xf'),auth['isAuthenticated'](),controller['getMessages']);router[_0x9d5a('0xb')](_0x9d5a('0x10'),auth[_0x9d5a('0x9')](),controller[_0x9d5a('0x11')]);router[_0x9d5a('0x12')]('/',auth[_0x9d5a('0x9')](),controller[_0x9d5a('0x13')]);router[_0x9d5a('0x12')]('/:id/messages',auth['isAuthenticated'](),controller[_0x9d5a('0x14')]);router[_0x9d5a('0x12')](_0x9d5a('0x15'),auth[_0x9d5a('0x9')](),interaction[_0x9d5a('0x16')](_0x9d5a('0x17'),'openchannelinteraction:addtags'),controller[_0x9d5a('0x18')]);router[_0x9d5a('0x19')](_0x9d5a('0x1a'),auth[_0x9d5a('0x9')](),interaction[_0x9d5a('0x16')](_0x9d5a('0x17'),_0x9d5a('0x1b')),controller[_0x9d5a('0x1c')]);router[_0x9d5a('0x1d')](_0x9d5a('0x1a'),auth[_0x9d5a('0x9')](),interaction['tracked']('openchannel',_0x9d5a('0x1e')),controller[_0x9d5a('0x1f')]);router[_0x9d5a('0x1d')](_0x9d5a('0x15'),auth[_0x9d5a('0x9')](),controller['removeTags']);module[_0x9d5a('0x20')]=router; \ No newline at end of file diff --git a/server/api/openchannelInteraction/openchannelInteraction.attributes.js b/server/api/openchannelInteraction/openchannelInteraction.attributes.js index cb93620..cc89f8f 100644 --- a/server/api/openchannelInteraction/openchannelInteraction.attributes.js +++ b/server/api/openchannelInteraction/openchannelInteraction.attributes.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x280f=['DATE','STRING','ENUM','out','sequelize','BOOLEAN'];(function(_0x31fb16,_0x3a4f55){var _0x50f4b7=function(_0x42f60f){while(--_0x42f60f){_0x31fb16['push'](_0x31fb16['shift']());}};_0x50f4b7(++_0x3a4f55);}(_0x280f,0xe2));var _0xf280=function(_0x5e6ea3,_0x9addd2){_0x5e6ea3=_0x5e6ea3-0x0;var _0x4048b5=_0x280f[_0x5e6ea3];return _0x4048b5;};'use strict';var Sequelize=require(_0xf280('0x0'));module['exports']={'closed':{'type':Sequelize[_0xf280('0x1')],'defaultValue':![]},'closedAt':{'type':Sequelize[_0xf280('0x2')]},'disposition':{'type':Sequelize[_0xf280('0x3')]},'secondDisposition':{'type':Sequelize[_0xf280('0x3')]},'thirdDisposition':{'type':Sequelize[_0xf280('0x3')]},'note':{'type':Sequelize[_0xf280('0x3')]},'read1stAt':{'type':Sequelize[_0xf280('0x2')]},'threadId':{'type':Sequelize['STRING']},'externalUrl':{'type':Sequelize[_0xf280('0x3')]},'lastMsgAt':{'type':Sequelize[_0xf280('0x2')]},'firstMsgDirection':{'type':Sequelize[_0xf280('0x4')]('in',_0xf280('0x5')),'defaultValue':'in','allowNull':![]},'lastMsgDirection':{'type':Sequelize[_0xf280('0x4')]('in','out'),'defaultValue':'in','allowNull':![]},'from':{'type':Sequelize[_0xf280('0x3')]},'autoreplyExecuted':{'type':Sequelize[_0xf280('0x1')],'defaultValue':![]}}; \ No newline at end of file +var _0x80c7=['out','sequelize','exports','BOOLEAN','DATE','STRING','ENUM'];(function(_0x1be514,_0x46451e){var _0x5d7e10=function(_0x124593){while(--_0x124593){_0x1be514['push'](_0x1be514['shift']());}};_0x5d7e10(++_0x46451e);}(_0x80c7,0x8d));var _0x780c=function(_0x41da16,_0x1e4fd9){_0x41da16=_0x41da16-0x0;var _0x8b9e24=_0x80c7[_0x41da16];return _0x8b9e24;};'use strict';var Sequelize=require(_0x780c('0x0'));module[_0x780c('0x1')]={'closed':{'type':Sequelize[_0x780c('0x2')],'defaultValue':![]},'closedAt':{'type':Sequelize[_0x780c('0x3')]},'disposition':{'type':Sequelize['STRING']},'secondDisposition':{'type':Sequelize['STRING']},'thirdDisposition':{'type':Sequelize[_0x780c('0x4')]},'note':{'type':Sequelize['STRING']},'read1stAt':{'type':Sequelize[_0x780c('0x3')]},'threadId':{'type':Sequelize[_0x780c('0x4')]},'externalUrl':{'type':Sequelize[_0x780c('0x4')]},'lastMsgAt':{'type':Sequelize[_0x780c('0x3')]},'firstMsgDirection':{'type':Sequelize[_0x780c('0x5')]('in',_0x780c('0x6')),'defaultValue':'in','allowNull':![]},'lastMsgDirection':{'type':Sequelize[_0x780c('0x5')]('in',_0x780c('0x6')),'defaultValue':'in','allowNull':![]},'from':{'type':Sequelize[_0x780c('0x4')]},'autoreplyExecuted':{'type':Sequelize[_0x780c('0x2')],'defaultValue':![]}}; \ No newline at end of file diff --git a/server/api/openchannelInteraction/openchannelInteraction.controller.js b/server/api/openchannelInteraction/openchannelInteraction.controller.js index f8d1a57..16aa2f8 100644 --- a/server/api/openchannelInteraction/openchannelInteraction.controller.js +++ b/server/api/openchannelInteraction/openchannelInteraction.controller.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x2daf=['createWriteStream','out','System','secret','renderFile','downloadInteraction.ejs','transcript-','.pdf','Openchannel','createPdfFromHTML','Unable\x20to\x20delete\x20zip\x20file','unlinkSync','moment','path','ioredis','../../components/interaction/service','../../components/parsers/qs','../../components/export/pdf','../../config/logger','api','../../config/environment','../../mysqldb','redis','defaults','localhost','socket.io-emitter','./openchannelInteraction.socket','register','sendStatus','status','end','json','offset','limit','undefined','count','Content-Range','then','destroy','error','stack','name','send','OpenchannelInteraction','rawAttributes','fieldName','type','getOptions','findAll','query','show','from','params','model','filters','attributes','fields','length','includeAll','include','options','find','catch','create','body','update','describe','addMessage','OpenchannelMessage','ids','omit','getMessages','findOne','intersection','hasOwnProperty','nolimit','sort','where','pick','filter','map','$gte','split','merge','rows','setTags','spread','Tag','color','emit','removeTags','download','unix','toString','join','root','server','files','tmp','attachments','format','transcript-%d-%s.zip','push','User','CmContact','Contact','firstName','lastName','Attachment','Messages','createdAt','direction','read','OpenchannelAccount','Owner','fullname','get','mkdirSync','Account','N.A.','closedAt','YYYY-MM-DD\x20HH:mm:ss','disposition','Private','basename','existsSync','createReadStream','pipe'];(function(_0x15d986,_0x3eda6b){var _0x192859=function(_0x1ac502){while(--_0x1ac502){_0x15d986['push'](_0x15d986['shift']());}};_0x192859(++_0x3eda6b);}(_0x2daf,0x8c));var _0xf2da=function(_0xac2edb,_0x7ee06d){_0xac2edb=_0xac2edb-0x0;var _0x5eb36e=_0x2daf[_0xac2edb];return _0x5eb36e;};'use strict';var rimraf=require('rimraf');var zipdir=require('zip-dir');var moment=require(_0xf2da('0x0'));var util=require('util');var path=require(_0xf2da('0x1'));var ejs=require('ejs');var fs=require('fs');var _=require('lodash');var Redis=require(_0xf2da('0x2'));var interaction=require(_0xf2da('0x3'));var qs=require(_0xf2da('0x4'));var pdf=require(_0xf2da('0x5'));var logger=require(_0xf2da('0x6'))(_0xf2da('0x7'));var config=require(_0xf2da('0x8'));var db=require(_0xf2da('0x9'))['db'];config[_0xf2da('0xa')]=_[_0xf2da('0xb')](config[_0xf2da('0xa')],{'host':_0xf2da('0xc'),'port':0x18eb});var socket=require(_0xf2da('0xd'))(new Redis(config[_0xf2da('0xa')]));require(_0xf2da('0xe'))[_0xf2da('0xf')](socket);function respondWithStatusCode(_0x3aa42a,_0x2deabd){_0x2deabd=_0x2deabd||0xcc;return function(_0x52c04b){if(_0x52c04b){return _0x3aa42a[_0xf2da('0x10')](_0x2deabd);}return _0x3aa42a[_0xf2da('0x11')](_0x2deabd)[_0xf2da('0x12')]();};}function respondWithResult(_0x53c919,_0x790f3a){_0x790f3a=_0x790f3a||0xc8;return function(_0x3d4b3f){if(_0x3d4b3f){return _0x53c919[_0xf2da('0x11')](_0x790f3a)[_0xf2da('0x13')](_0x3d4b3f);}};}function respondWithFilteredResult(_0x30c812,_0x53dbe4){return function(_0x522b1c){if(_0x522b1c){var _0x4b7927=typeof _0x53dbe4[_0xf2da('0x14')]==='undefined'&&typeof _0x53dbe4[_0xf2da('0x15')]===_0xf2da('0x16');var _0x41573f=_0x522b1c[_0xf2da('0x17')];var _0x5be02b=_0x4b7927?0x0:_0x53dbe4[_0xf2da('0x14')];var _0x17b5fc=_0x4b7927?_0x522b1c[_0xf2da('0x17')]:_0x53dbe4[_0xf2da('0x14')]+_0x53dbe4[_0xf2da('0x15')];var _0x967da0;if(_0x17b5fc>=_0x41573f){_0x17b5fc=_0x41573f;_0x967da0=0xc8;}else{_0x967da0=0xce;}_0x30c812['status'](_0x967da0);return _0x30c812['set'](_0xf2da('0x18'),_0x5be02b+'-'+_0x17b5fc+'/'+_0x41573f)[_0xf2da('0x13')](_0x522b1c);}return null;};}function saveUpdates(_0x16753d){return function(_0x2382be){if(_0x2382be){return _0x2382be['update'](_0x16753d)[_0xf2da('0x19')](function(_0x41fc73){return _0x41fc73;});}return null;};}function removeEntity(_0x228645){return function(_0x6ae293){if(_0x6ae293){return _0x6ae293[_0xf2da('0x1a')]()[_0xf2da('0x19')](function(){_0x228645[_0xf2da('0x11')](0xcc)[_0xf2da('0x12')]();});}};}function handleEntityNotFound(_0xba8be0){return function(_0x1b7ed2){if(!_0x1b7ed2){_0xba8be0['sendStatus'](0x194);}return _0x1b7ed2;};}function handleError(_0x16bcb6,_0x3c7da9){_0x3c7da9=_0x3c7da9||0x1f4;return function(_0x28fffd){logger[_0xf2da('0x1b')](_0x28fffd[_0xf2da('0x1c')]);if(_0x28fffd[_0xf2da('0x1d')]){delete _0x28fffd[_0xf2da('0x1d')];}_0x16bcb6[_0xf2da('0x11')](_0x3c7da9)[_0xf2da('0x1e')](_0x28fffd);};}exports['index']=function(_0x30e01a,_0x4ce17f){var _0x46f433={};var _0xd6a554=_['map'](db[_0xf2da('0x1f')][_0xf2da('0x20')],function(_0x3584f9){return{'name':_0x3584f9[_0xf2da('0x21')],'type':_0x3584f9[_0xf2da('0x22')]['key']};});_0x46f433=qs[_0xf2da('0x23')](_0xd6a554,_0x30e01a);return interaction[_0xf2da('0x24')]('openchannel',_0x30e01a[_0xf2da('0x25')],_0x30e01a['user'],_0x46f433,_0xd6a554)[_0xf2da('0x19')](respondWithFilteredResult(_0x4ce17f,_0x46f433))['catch'](handleError(_0x4ce17f,null));};exports[_0xf2da('0x26')]=function(_0x42df6e,_0x1ee587){var _0x33e0af={};if(_0x42df6e[_0xf2da('0x25')][_0xf2da('0x22')]&&_0x42df6e[_0xf2da('0x25')][_0xf2da('0x22')]===_0xf2da('0x27')){_0x33e0af[_0xf2da('0x27')]=_0x42df6e[_0xf2da('0x28')]['id'];}else{_0x33e0af['id']=_0x42df6e['params']['id'];}var _0x1771ff={'raw':![],'where':_0x33e0af},_0x2c0bc8={};_0x2c0bc8[_0xf2da('0x29')]=_['keys'](db[_0xf2da('0x1f')][_0xf2da('0x20')]);_0x2c0bc8[_0xf2da('0x25')]=_['keys'](_0x42df6e[_0xf2da('0x25')]);_0x2c0bc8[_0xf2da('0x2a')]=_['intersection'](_0x2c0bc8['model'],_0x2c0bc8[_0xf2da('0x25')]);_0x1771ff[_0xf2da('0x2b')]=_['intersection'](_0x2c0bc8['model'],qs[_0xf2da('0x2c')](_0x42df6e[_0xf2da('0x25')][_0xf2da('0x2c')]));_0x1771ff[_0xf2da('0x2b')]=_0x1771ff['attributes'][_0xf2da('0x2d')]?_0x1771ff['attributes']:_0x2c0bc8[_0xf2da('0x29')];if(_0x42df6e[_0xf2da('0x25')][_0xf2da('0x2e')]){_0x1771ff[_0xf2da('0x2f')]=[{'all':!![]}];}_0x1771ff=_['merge']({},_0x1771ff,_0x42df6e[_0xf2da('0x30')]);return db['OpenchannelInteraction'][_0xf2da('0x31')](_0x1771ff)[_0xf2da('0x19')](handleEntityNotFound(_0x1ee587,null))['then'](respondWithResult(_0x1ee587,null))[_0xf2da('0x32')](handleError(_0x1ee587,null));};exports[_0xf2da('0x33')]=function(_0x28debf,_0x5e2fa9){return db['OpenchannelInteraction'][_0xf2da('0x33')](_0x28debf[_0xf2da('0x34')],{})[_0xf2da('0x19')](respondWithResult(_0x5e2fa9,0xc9))[_0xf2da('0x32')](handleError(_0x5e2fa9,null));};exports[_0xf2da('0x35')]=function(_0x378228,_0x67a64c){if(_0x378228[_0xf2da('0x34')]['id']){delete _0x378228[_0xf2da('0x34')]['id'];}return db[_0xf2da('0x1f')][_0xf2da('0x31')]({'where':{'id':_0x378228[_0xf2da('0x28')]['id']}})['then'](handleEntityNotFound(_0x67a64c,null))[_0xf2da('0x19')](saveUpdates(_0x378228[_0xf2da('0x34')],null))[_0xf2da('0x19')](respondWithResult(_0x67a64c,null))['catch'](handleError(_0x67a64c,null));};exports[_0xf2da('0x1a')]=function(_0x353ce1,_0x99c71e){return db['OpenchannelInteraction'][_0xf2da('0x31')]({'where':{'id':_0x353ce1[_0xf2da('0x28')]['id']}})[_0xf2da('0x19')](handleEntityNotFound(_0x99c71e,null))[_0xf2da('0x19')](removeEntity(_0x99c71e,null))[_0xf2da('0x32')](handleError(_0x99c71e,null));};exports[_0xf2da('0x36')]=function(_0x128083,_0x25565a){return db[_0xf2da('0x1f')][_0xf2da('0x36')]()[_0xf2da('0x19')](respondWithResult(_0x25565a,null))[_0xf2da('0x32')](handleError(_0x25565a,null));};exports[_0xf2da('0x37')]=function(_0x2f1082,_0x2a2c25){return db[_0xf2da('0x38')][_0xf2da('0x31')]({'where':{'id':_0x2f1082['params']['id']}})[_0xf2da('0x19')](handleEntityNotFound(_0x2a2c25,null))[_0xf2da('0x19')](function(_0xe83952){if(_0xe83952){return _0xe83952[_0xf2da('0x37')](_0x2f1082[_0xf2da('0x34')][_0xf2da('0x39')],_[_0xf2da('0x3a')](_0x2f1082[_0xf2da('0x34')],[_0xf2da('0x39'),'id'])||{});}})[_0xf2da('0x19')](respondWithResult(_0x2a2c25,null))['catch'](handleError(_0x2a2c25,null));};exports[_0xf2da('0x3b')]=function(_0x33f83d,_0x456dad){var _0x244c00={'raw':![],'where':{}};var _0x7cf8c9={};var _0x3fa816={'count':0x0,'rows':[]};return db[_0xf2da('0x1f')][_0xf2da('0x3c')]({'where':{'id':_0x33f83d['params']['id']}})[_0xf2da('0x19')](handleEntityNotFound(_0x456dad,null))[_0xf2da('0x19')](function(_0x31d1de){if(_0x31d1de){_0x7cf8c9['model']=_['keys'](db['OpenchannelMessage'][_0xf2da('0x20')]);_0x7cf8c9['query']=_['keys'](_0x33f83d['query']);_0x7cf8c9[_0xf2da('0x2a')]=_[_0xf2da('0x3d')](_0x7cf8c9[_0xf2da('0x29')],_0x7cf8c9[_0xf2da('0x25')]);_0x244c00['attributes']=_['intersection'](_0x7cf8c9[_0xf2da('0x29')],qs[_0xf2da('0x2c')](_0x33f83d[_0xf2da('0x25')]['fields']));_0x244c00[_0xf2da('0x2b')]=_0x244c00[_0xf2da('0x2b')][_0xf2da('0x2d')]?_0x244c00[_0xf2da('0x2b')]:_0x7cf8c9['model'];if(!_0x33f83d[_0xf2da('0x25')][_0xf2da('0x3e')](_0xf2da('0x3f'))){_0x244c00[_0xf2da('0x15')]=qs[_0xf2da('0x15')](_0x33f83d[_0xf2da('0x25')][_0xf2da('0x15')]);_0x244c00[_0xf2da('0x14')]=qs[_0xf2da('0x14')](_0x33f83d['query']['offset']);}_0x244c00['order']=qs[_0xf2da('0x40')](_0x33f83d['query'][_0xf2da('0x40')]);_0x244c00[_0xf2da('0x41')]=qs[_0xf2da('0x2a')](_[_0xf2da('0x42')](_0x33f83d[_0xf2da('0x25')],_0x7cf8c9[_0xf2da('0x2a')]));_0x244c00[_0xf2da('0x41')]['OpenchannelInteractionId']=_0x31d1de['id'];if(_0x33f83d[_0xf2da('0x25')][_0xf2da('0x43')]){_0x244c00['where']=_['merge'](_0x244c00[_0xf2da('0x41')],{'$or':_[_0xf2da('0x44')](_0x244c00[_0xf2da('0x2b')],function(_0x1aa166){var _0x163333={};_0x163333[_0x1aa166]={'$like':'%'+_0x33f83d[_0xf2da('0x25')][_0xf2da('0x43')]+'%'};return _0x163333;})});}if(_0x33f83d[_0xf2da('0x25')][_0xf2da('0x45')]){var _0x5a2ac2=_0x33f83d[_0xf2da('0x25')]['$gte'][_0xf2da('0x46')](',');var _0x50834e={};_0x50834e[_0x5a2ac2[0x0]]={'$gte':moment(_0x5a2ac2[0x1])['format']('YYYY-MM-DD\x20HH:mm:ss')};_0x244c00[_0xf2da('0x41')]=_[_0xf2da('0x47')](_0x244c00['where'],_0x50834e);}_0x244c00=_[_0xf2da('0x47')]({},_0x244c00,_0x33f83d[_0xf2da('0x30')]);return db[_0xf2da('0x38')][_0xf2da('0x17')]({'where':_0x244c00[_0xf2da('0x41')]})[_0xf2da('0x19')](function(_0x25a2bd){_0x3fa816[_0xf2da('0x17')]=_0x25a2bd;if(_0x33f83d['query'][_0xf2da('0x2e')]){_0x244c00[_0xf2da('0x2f')]=[{'all':!![]}];}return db[_0xf2da('0x38')]['findAll'](_0x244c00);})[_0xf2da('0x19')](function(_0x337cef){_0x3fa816[_0xf2da('0x48')]=_0x337cef;return _0x3fa816;});}})['then'](respondWithFilteredResult(_0x456dad,_0x244c00))[_0xf2da('0x32')](handleError(_0x456dad,null));};exports['addTags']=function(_0x92e6f4,_0x57c4bc){return db[_0xf2da('0x1f')][_0xf2da('0x31')]({'where':{'id':_0x92e6f4[_0xf2da('0x28')]['id']}})[_0xf2da('0x19')](handleEntityNotFound(_0x57c4bc,null))[_0xf2da('0x19')](function(_0x38577f){if(_0x38577f){return _0x38577f[_0xf2da('0x49')](_0x92e6f4['body'][_0xf2da('0x39')],_[_0xf2da('0x3a')](_0x92e6f4[_0xf2da('0x34')],[_0xf2da('0x39'),'id'])||{})[_0xf2da('0x4a')](function(){return db[_0xf2da('0x4b')]['findAll']({'attributes':['id','name',_0xf2da('0x4c')],'where':{'id':_0x92e6f4[_0xf2da('0x34')][_0xf2da('0x39')]}});})[_0xf2da('0x19')](function(_0x15ee66){socket[_0xf2da('0x4d')]('openchannelInteractionTags:save',{'id':Number(_0x92e6f4[_0xf2da('0x28')]['id']),'tags':_0x15ee66||[]});return{'id':Number(_0x92e6f4[_0xf2da('0x28')]['id']),'tags':_0x15ee66||[]};});}})[_0xf2da('0x19')](respondWithResult(_0x57c4bc,null))[_0xf2da('0x32')](handleError(_0x57c4bc,null));};exports[_0xf2da('0x4e')]=function(_0x4f6af5,_0x412cb1){return db[_0xf2da('0x1f')][_0xf2da('0x31')]({'where':{'id':_0x4f6af5[_0xf2da('0x28')]['id']}})[_0xf2da('0x19')](handleEntityNotFound(_0x412cb1,null))[_0xf2da('0x19')](function(_0x26e7d6){if(_0x26e7d6){return _0x26e7d6['removeTags'](_0x4f6af5['query'][_0xf2da('0x39')]);}})[_0xf2da('0x19')](respondWithStatusCode(_0x412cb1,null))['catch'](handleError(_0x412cb1,null));};exports[_0xf2da('0x4f')]=function(_0x110e20,_0xc28fe2){var _0x374f7e=moment()[_0xf2da('0x50')]()[_0xf2da('0x51')]();var _0x534041=path[_0xf2da('0x52')](config[_0xf2da('0x53')],_0xf2da('0x54'),_0xf2da('0x55'),_0xf2da('0x56'));var _0x346128=path[_0xf2da('0x52')](config[_0xf2da('0x53')],_0xf2da('0x54'),_0xf2da('0x55'),_0xf2da('0x57'));var _0x155e90=path[_0xf2da('0x52')](_0x534041,_0x374f7e);var _0xd9c8be=util[_0xf2da('0x58')](_0xf2da('0x59'),_0x110e20['params']['id'],_0x374f7e);var _0x54dc82=path['join'](_0x534041,_0xd9c8be);var _0x167559=[];_0x167559[_0xf2da('0x5a')]({'model':db['User'],'as':_0xf2da('0x5b'),'attributes':['id','fullname'],'raw':!![]});_0x167559[_0xf2da('0x5a')]({'model':db[_0xf2da('0x5c')],'as':_0xf2da('0x5d'),'attributes':['id',_0xf2da('0x5e'),_0xf2da('0x5f')],'raw':!![]});if(_0x110e20[_0xf2da('0x25')][_0xf2da('0x57')]){_0x167559[_0xf2da('0x5a')]({'model':db['Attachment'],'as':_0xf2da('0x60'),'raw':!![]});}var _0x24fc76=[{'model':db[_0xf2da('0x38')],'as':_0xf2da('0x61'),'attributes':['id',_0xf2da('0x34'),_0xf2da('0x62'),_0xf2da('0x63'),'secret',_0xf2da('0x64')],'include':_0x167559}];_0x24fc76['push']({'model':db[_0xf2da('0x65')],'as':'Account','attributes':['id',_0xf2da('0x1d')]});_0x24fc76[_0xf2da('0x5a')]({'model':db['User'],'as':_0xf2da('0x66'),'attributes':['id',_0xf2da('0x67')]});return db['OpenchannelInteraction'][_0xf2da('0x31')]({'where':{'id':_0x110e20['params']['id']},'include':_0x24fc76})[_0xf2da('0x19')](handleEntityNotFound(_0xc28fe2,null))['then'](function(_0x4f99b6){if(_0x4f99b6){var _0x2d39c0=_0x4f99b6[_0xf2da('0x68')]({'plain':!![]});fs[_0xf2da('0x69')](_0x155e90);var _0x23b0c7={'channel':'Openchannel','account':_0x2d39c0[_0xf2da('0x6a')][_0xf2da('0x1d')],'agent':_0x2d39c0[_0xf2da('0x66')]?_0x2d39c0[_0xf2da('0x66')][_0xf2da('0x67')]:_0xf2da('0x6b'),'createdAt':moment(_0x2d39c0[_0xf2da('0x62')])['format']('YYYY-MM-DD\x20HH:mm:ss')[_0xf2da('0x51')](),'closedAt':_0x2d39c0['closed']?moment(_0x2d39c0[_0xf2da('0x6c')])[_0xf2da('0x58')](_0xf2da('0x6d'))[_0xf2da('0x51')]():'','disposition':_0x2d39c0[_0xf2da('0x6e')],'visibility':_0x2d39c0['threadId']?'Public':_0xf2da('0x6f'),'messages':_(_0x2d39c0[_0xf2da('0x61')])['filter']({'secret':![]})[_0xf2da('0x44')](function(_0x14bf6b){if(_0x14bf6b[_0xf2da('0x60')]){var _0x157e3b=path['join'](_0x346128,_0x14bf6b[_0xf2da('0x60')][_0xf2da('0x70')]);if(fs[_0xf2da('0x71')](_0x157e3b)){fs[_0xf2da('0x72')](_0x157e3b)[_0xf2da('0x73')](fs[_0xf2da('0x74')](path[_0xf2da('0x52')](_0x155e90,_0x14bf6b['Attachment']['basename'])));}}return{'date':moment(_0x14bf6b[_0xf2da('0x62')])['format'](_0xf2da('0x6d'))[_0xf2da('0x51')](),'sender':_0x14bf6b[_0xf2da('0x63')]===_0xf2da('0x75')?_0x14bf6b[_0xf2da('0x5b')]?_0x14bf6b[_0xf2da('0x5b')]['fullname']:_0xf2da('0x76'):_0x14bf6b[_0xf2da('0x5d')][_0xf2da('0x5e')]+(_0x14bf6b[_0xf2da('0x5d')]['lastName']?'\x20'+_0x14bf6b[_0xf2da('0x5d')][_0xf2da('0x5f')]:''),'body':_0x14bf6b['Attachment']?_0x14bf6b[_0xf2da('0x60')][_0xf2da('0x70')]:_0x14bf6b[_0xf2da('0x34')],'direction':_0x14bf6b[_0xf2da('0x63')]===_0xf2da('0x75')?'A':'C','secret':_0x14bf6b[_0xf2da('0x77')],'read':_0x14bf6b['read'],'attachment':_0x14bf6b[_0xf2da('0x60')]};})['value']()};return ejs[_0xf2da('0x78')](path[_0xf2da('0x52')](config['root'],'server','views',_0xf2da('0x79')),{'interaction':_0x23b0c7})[_0xf2da('0x19')](function(_0x3e0c16){var _0x21bd6f=path[_0xf2da('0x52')](_0x155e90,_0xf2da('0x7a')+_0x2d39c0['id']+'-'+_0x374f7e+_0xf2da('0x7b'));var _0x27bb33={'path':_0x21bd6f,'channel':_0xf2da('0x7c'),'interactionId':_0x2d39c0['id']};return pdf[_0xf2da('0x7d')](_0x3e0c16,_0x27bb33);})['then'](function(){return new Promise(function(_0xda7de8,_0x4ce580){zipdir(_0x155e90,{'saveTo':_0x54dc82},function(_0x157ca9,_0x36c731){if(_0x157ca9)return _0x4ce580(_0x157ca9);return _0xda7de8(_0x36c731);});})[_0xf2da('0x19')](function(){return new Promise(function(_0x500270,_0x1d9c46){rimraf(_0x155e90,function(_0x3b871a){if(_0x3b871a)_0x1d9c46(_0x3b871a);return _0x500270();});});})[_0xf2da('0x19')](function(){return _0xc28fe2[_0xf2da('0x4f')](_0x54dc82,_0xd9c8be,function(_0x3569f3){if(_0x3569f3){logger['error'](_0xf2da('0x7e'),_0x3569f3);}else{fs[_0xf2da('0x7f')](_0x54dc82);}});});});}else{return _0xc28fe2[_0xf2da('0x10')](0xc8);}})[_0xf2da('0x32')](handleError(_0xc28fe2,null));}; \ No newline at end of file +var _0xc3c2=['rimraf','util','path','ioredis','../../components/parsers/qs','api','../../config/environment','../../mysqldb','redis','defaults','localhost','./openchannelInteraction.socket','register','sendStatus','status','end','json','offset','undefined','count','limit','set','Content-Range','update','destroy','error','stack','name','send','map','OpenchannelInteraction','rawAttributes','fieldName','type','key','openchannel','query','user','then','catch','show','from','params','model','keys','filters','intersection','attributes','fields','includeAll','include','merge','create','body','find','describe','OpenchannelMessage','ids','omit','getMessages','findOne','hasOwnProperty','order','sort','pick','where','OpenchannelInteractionId','$gte','split','YYYY-MM-DD\x20HH:mm:ss','options','findAll','rows','setTags','spread','Tag','color','emit','openchannelInteractionTags:save','removeTags','download','unix','toString','root','server','files','join','attachments','format','transcript-%d-%s.zip','push','User','fullname','Contact','firstName','Attachment','Messages','createdAt','secret','OpenchannelAccount','Account','Owner','get','mkdirSync','Openchannel','N.A.','closed','closedAt','disposition','threadId','Public','Private','filter','existsSync','createReadStream','createWriteStream','basename','direction','out','System','lastName','read','value','renderFile','views','downloadInteraction.ejs','transcript-','createPdfFromHTML','Unable\x20to\x20delete\x20zip\x20file','unlinkSync'];(function(_0x14add3,_0x13ce8d){var _0x4a174f=function(_0x2b3ed7){while(--_0x2b3ed7){_0x14add3['push'](_0x14add3['shift']());}};_0x4a174f(++_0x13ce8d);}(_0xc3c2,0x186));var _0x2c3c=function(_0x409f1e,_0x495a48){_0x409f1e=_0x409f1e-0x0;var _0x2112a5=_0xc3c2[_0x409f1e];return _0x2112a5;};'use strict';var rimraf=require(_0x2c3c('0x0'));var zipdir=require('zip-dir');var moment=require('moment');var util=require(_0x2c3c('0x1'));var path=require(_0x2c3c('0x2'));var ejs=require('ejs');var fs=require('fs');var _=require('lodash');var Redis=require(_0x2c3c('0x3'));var interaction=require('../../components/interaction/service');var qs=require(_0x2c3c('0x4'));var pdf=require('../../components/export/pdf');var logger=require('../../config/logger')(_0x2c3c('0x5'));var config=require(_0x2c3c('0x6'));var db=require(_0x2c3c('0x7'))['db'];config[_0x2c3c('0x8')]=_[_0x2c3c('0x9')](config[_0x2c3c('0x8')],{'host':_0x2c3c('0xa'),'port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config['redis']));require(_0x2c3c('0xb'))[_0x2c3c('0xc')](socket);function respondWithStatusCode(_0x1ec3af,_0x564097){_0x564097=_0x564097||0xcc;return function(_0x4528a3){if(_0x4528a3){return _0x1ec3af[_0x2c3c('0xd')](_0x564097);}return _0x1ec3af[_0x2c3c('0xe')](_0x564097)[_0x2c3c('0xf')]();};}function respondWithResult(_0x2fcfd5,_0x34234e){_0x34234e=_0x34234e||0xc8;return function(_0x16d02a){if(_0x16d02a){return _0x2fcfd5[_0x2c3c('0xe')](_0x34234e)[_0x2c3c('0x10')](_0x16d02a);}};}function respondWithFilteredResult(_0x3eb9f2,_0x5e4f03){return function(_0x1c70a0){if(_0x1c70a0){var _0x3a0167=typeof _0x5e4f03[_0x2c3c('0x11')]===_0x2c3c('0x12')&&typeof _0x5e4f03['limit']==='undefined';var _0x313860=_0x1c70a0[_0x2c3c('0x13')];var _0x2bbc19=_0x3a0167?0x0:_0x5e4f03['offset'];var _0x3aa918=_0x3a0167?_0x1c70a0[_0x2c3c('0x13')]:_0x5e4f03[_0x2c3c('0x11')]+_0x5e4f03[_0x2c3c('0x14')];var _0x1cfc7e;if(_0x3aa918>=_0x313860){_0x3aa918=_0x313860;_0x1cfc7e=0xc8;}else{_0x1cfc7e=0xce;}_0x3eb9f2['status'](_0x1cfc7e);return _0x3eb9f2[_0x2c3c('0x15')](_0x2c3c('0x16'),_0x2bbc19+'-'+_0x3aa918+'/'+_0x313860)['json'](_0x1c70a0);}return null;};}function saveUpdates(_0x3bdd63){return function(_0x38eef2){if(_0x38eef2){return _0x38eef2[_0x2c3c('0x17')](_0x3bdd63)['then'](function(_0x14f26a){return _0x14f26a;});}return null;};}function removeEntity(_0x33fdad){return function(_0x3e1d6d){if(_0x3e1d6d){return _0x3e1d6d[_0x2c3c('0x18')]()['then'](function(){_0x33fdad[_0x2c3c('0xe')](0xcc)['end']();});}};}function handleEntityNotFound(_0x213db1){return function(_0x4daccb){if(!_0x4daccb){_0x213db1['sendStatus'](0x194);}return _0x4daccb;};}function handleError(_0x3e57e7,_0x14840b){_0x14840b=_0x14840b||0x1f4;return function(_0x19900a){logger[_0x2c3c('0x19')](_0x19900a[_0x2c3c('0x1a')]);if(_0x19900a['name']){delete _0x19900a[_0x2c3c('0x1b')];}_0x3e57e7[_0x2c3c('0xe')](_0x14840b)[_0x2c3c('0x1c')](_0x19900a);};}exports['index']=function(_0x5edb9c,_0x352792){var _0x40a558={};var _0x595fd2=_[_0x2c3c('0x1d')](db[_0x2c3c('0x1e')][_0x2c3c('0x1f')],function(_0x414ded){return{'name':_0x414ded[_0x2c3c('0x20')],'type':_0x414ded[_0x2c3c('0x21')][_0x2c3c('0x22')]};});_0x40a558=qs['getOptions'](_0x595fd2,_0x5edb9c);return interaction['findAll'](_0x2c3c('0x23'),_0x5edb9c[_0x2c3c('0x24')],_0x5edb9c[_0x2c3c('0x25')],_0x40a558,_0x595fd2)[_0x2c3c('0x26')](respondWithFilteredResult(_0x352792,_0x40a558))[_0x2c3c('0x27')](handleError(_0x352792,null));};exports[_0x2c3c('0x28')]=function(_0x38d835,_0x4e849c){var _0x2989c7={};if(_0x38d835[_0x2c3c('0x24')]['type']&&_0x38d835[_0x2c3c('0x24')][_0x2c3c('0x21')]===_0x2c3c('0x29')){_0x2989c7[_0x2c3c('0x29')]=_0x38d835[_0x2c3c('0x2a')]['id'];}else{_0x2989c7['id']=_0x38d835['params']['id'];}var _0x3a948f={'raw':![],'where':_0x2989c7},_0x89482a={};_0x89482a[_0x2c3c('0x2b')]=_[_0x2c3c('0x2c')](db[_0x2c3c('0x1e')][_0x2c3c('0x1f')]);_0x89482a[_0x2c3c('0x24')]=_[_0x2c3c('0x2c')](_0x38d835[_0x2c3c('0x24')]);_0x89482a[_0x2c3c('0x2d')]=_[_0x2c3c('0x2e')](_0x89482a['model'],_0x89482a[_0x2c3c('0x24')]);_0x3a948f[_0x2c3c('0x2f')]=_[_0x2c3c('0x2e')](_0x89482a['model'],qs[_0x2c3c('0x30')](_0x38d835[_0x2c3c('0x24')][_0x2c3c('0x30')]));_0x3a948f[_0x2c3c('0x2f')]=_0x3a948f[_0x2c3c('0x2f')]['length']?_0x3a948f[_0x2c3c('0x2f')]:_0x89482a['model'];if(_0x38d835['query'][_0x2c3c('0x31')]){_0x3a948f[_0x2c3c('0x32')]=[{'all':!![]}];}_0x3a948f=_[_0x2c3c('0x33')]({},_0x3a948f,_0x38d835['options']);return db['OpenchannelInteraction']['find'](_0x3a948f)['then'](handleEntityNotFound(_0x4e849c,null))['then'](respondWithResult(_0x4e849c,null))[_0x2c3c('0x27')](handleError(_0x4e849c,null));};exports['create']=function(_0x3c7526,_0x5d77bf){return db[_0x2c3c('0x1e')][_0x2c3c('0x34')](_0x3c7526[_0x2c3c('0x35')],{})[_0x2c3c('0x26')](respondWithResult(_0x5d77bf,0xc9))[_0x2c3c('0x27')](handleError(_0x5d77bf,null));};exports[_0x2c3c('0x17')]=function(_0x525fbf,_0x57c8a8){if(_0x525fbf[_0x2c3c('0x35')]['id']){delete _0x525fbf['body']['id'];}return db[_0x2c3c('0x1e')][_0x2c3c('0x36')]({'where':{'id':_0x525fbf[_0x2c3c('0x2a')]['id']}})[_0x2c3c('0x26')](handleEntityNotFound(_0x57c8a8,null))['then'](saveUpdates(_0x525fbf[_0x2c3c('0x35')],null))[_0x2c3c('0x26')](respondWithResult(_0x57c8a8,null))[_0x2c3c('0x27')](handleError(_0x57c8a8,null));};exports['destroy']=function(_0x7932d4,_0x5c483b){return db[_0x2c3c('0x1e')][_0x2c3c('0x36')]({'where':{'id':_0x7932d4[_0x2c3c('0x2a')]['id']}})[_0x2c3c('0x26')](handleEntityNotFound(_0x5c483b,null))['then'](removeEntity(_0x5c483b,null))[_0x2c3c('0x27')](handleError(_0x5c483b,null));};exports[_0x2c3c('0x37')]=function(_0x5413fc,_0x1ca0c0){return db[_0x2c3c('0x1e')][_0x2c3c('0x37')]()[_0x2c3c('0x26')](respondWithResult(_0x1ca0c0,null))[_0x2c3c('0x27')](handleError(_0x1ca0c0,null));};exports['addMessage']=function(_0x467808,_0x21d83f){return db[_0x2c3c('0x38')][_0x2c3c('0x36')]({'where':{'id':_0x467808[_0x2c3c('0x2a')]['id']}})[_0x2c3c('0x26')](handleEntityNotFound(_0x21d83f,null))[_0x2c3c('0x26')](function(_0x25b372){if(_0x25b372){return _0x25b372['addMessage'](_0x467808[_0x2c3c('0x35')][_0x2c3c('0x39')],_[_0x2c3c('0x3a')](_0x467808[_0x2c3c('0x35')],['ids','id'])||{});}})['then'](respondWithResult(_0x21d83f,null))['catch'](handleError(_0x21d83f,null));};exports[_0x2c3c('0x3b')]=function(_0x2c474c,_0x11e83d){var _0xc3d7e4={'raw':![],'where':{}};var _0x4c6cb9={};var _0x40059e={'count':0x0,'rows':[]};return db[_0x2c3c('0x1e')][_0x2c3c('0x3c')]({'where':{'id':_0x2c474c['params']['id']}})[_0x2c3c('0x26')](handleEntityNotFound(_0x11e83d,null))[_0x2c3c('0x26')](function(_0x348d46){if(_0x348d46){_0x4c6cb9[_0x2c3c('0x2b')]=_[_0x2c3c('0x2c')](db[_0x2c3c('0x38')][_0x2c3c('0x1f')]);_0x4c6cb9['query']=_[_0x2c3c('0x2c')](_0x2c474c[_0x2c3c('0x24')]);_0x4c6cb9[_0x2c3c('0x2d')]=_[_0x2c3c('0x2e')](_0x4c6cb9[_0x2c3c('0x2b')],_0x4c6cb9[_0x2c3c('0x24')]);_0xc3d7e4[_0x2c3c('0x2f')]=_['intersection'](_0x4c6cb9[_0x2c3c('0x2b')],qs[_0x2c3c('0x30')](_0x2c474c[_0x2c3c('0x24')]['fields']));_0xc3d7e4[_0x2c3c('0x2f')]=_0xc3d7e4[_0x2c3c('0x2f')]['length']?_0xc3d7e4[_0x2c3c('0x2f')]:_0x4c6cb9[_0x2c3c('0x2b')];if(!_0x2c474c[_0x2c3c('0x24')][_0x2c3c('0x3d')]('nolimit')){_0xc3d7e4[_0x2c3c('0x14')]=qs[_0x2c3c('0x14')](_0x2c474c['query']['limit']);_0xc3d7e4[_0x2c3c('0x11')]=qs[_0x2c3c('0x11')](_0x2c474c['query']['offset']);}_0xc3d7e4[_0x2c3c('0x3e')]=qs[_0x2c3c('0x3f')](_0x2c474c['query'][_0x2c3c('0x3f')]);_0xc3d7e4['where']=qs[_0x2c3c('0x2d')](_[_0x2c3c('0x40')](_0x2c474c['query'],_0x4c6cb9[_0x2c3c('0x2d')]));_0xc3d7e4[_0x2c3c('0x41')][_0x2c3c('0x42')]=_0x348d46['id'];if(_0x2c474c[_0x2c3c('0x24')]['filter']){_0xc3d7e4[_0x2c3c('0x41')]=_[_0x2c3c('0x33')](_0xc3d7e4[_0x2c3c('0x41')],{'$or':_[_0x2c3c('0x1d')](_0xc3d7e4[_0x2c3c('0x2f')],function(_0x36408b){var _0x3aff5a={};_0x3aff5a[_0x36408b]={'$like':'%'+_0x2c474c[_0x2c3c('0x24')]['filter']+'%'};return _0x3aff5a;})});}if(_0x2c474c[_0x2c3c('0x24')]['$gte']){var _0x2ef1ba=_0x2c474c[_0x2c3c('0x24')][_0x2c3c('0x43')][_0x2c3c('0x44')](',');var _0x3a3908={};_0x3a3908[_0x2ef1ba[0x0]]={'$gte':moment(_0x2ef1ba[0x1])['format'](_0x2c3c('0x45'))};_0xc3d7e4[_0x2c3c('0x41')]=_[_0x2c3c('0x33')](_0xc3d7e4[_0x2c3c('0x41')],_0x3a3908);}_0xc3d7e4=_[_0x2c3c('0x33')]({},_0xc3d7e4,_0x2c474c[_0x2c3c('0x46')]);return db[_0x2c3c('0x38')][_0x2c3c('0x13')]({'where':_0xc3d7e4[_0x2c3c('0x41')]})[_0x2c3c('0x26')](function(_0x5cb772){_0x40059e[_0x2c3c('0x13')]=_0x5cb772;if(_0x2c474c[_0x2c3c('0x24')][_0x2c3c('0x31')]){_0xc3d7e4['include']=[{'all':!![]}];}return db[_0x2c3c('0x38')][_0x2c3c('0x47')](_0xc3d7e4);})[_0x2c3c('0x26')](function(_0x85f6c0){_0x40059e[_0x2c3c('0x48')]=_0x85f6c0;return _0x40059e;});}})[_0x2c3c('0x26')](respondWithFilteredResult(_0x11e83d,_0xc3d7e4))[_0x2c3c('0x27')](handleError(_0x11e83d,null));};exports['addTags']=function(_0x2580ff,_0x4d6000){return db[_0x2c3c('0x1e')]['find']({'where':{'id':_0x2580ff['params']['id']}})[_0x2c3c('0x26')](handleEntityNotFound(_0x4d6000,null))[_0x2c3c('0x26')](function(_0x5a3277){if(_0x5a3277){return _0x5a3277[_0x2c3c('0x49')](_0x2580ff[_0x2c3c('0x35')]['ids'],_[_0x2c3c('0x3a')](_0x2580ff[_0x2c3c('0x35')],['ids','id'])||{})[_0x2c3c('0x4a')](function(){return db[_0x2c3c('0x4b')][_0x2c3c('0x47')]({'attributes':['id',_0x2c3c('0x1b'),_0x2c3c('0x4c')],'where':{'id':_0x2580ff[_0x2c3c('0x35')][_0x2c3c('0x39')]}});})['then'](function(_0x46e73c){socket[_0x2c3c('0x4d')](_0x2c3c('0x4e'),{'id':Number(_0x2580ff[_0x2c3c('0x2a')]['id']),'tags':_0x46e73c||[]});return{'id':Number(_0x2580ff[_0x2c3c('0x2a')]['id']),'tags':_0x46e73c||[]};});}})[_0x2c3c('0x26')](respondWithResult(_0x4d6000,null))[_0x2c3c('0x27')](handleError(_0x4d6000,null));};exports[_0x2c3c('0x4f')]=function(_0x3e9bfd,_0x5e5278){return db[_0x2c3c('0x1e')][_0x2c3c('0x36')]({'where':{'id':_0x3e9bfd[_0x2c3c('0x2a')]['id']}})[_0x2c3c('0x26')](handleEntityNotFound(_0x5e5278,null))[_0x2c3c('0x26')](function(_0x1fd6e1){if(_0x1fd6e1){return _0x1fd6e1[_0x2c3c('0x4f')](_0x3e9bfd['query'][_0x2c3c('0x39')]);}})[_0x2c3c('0x26')](respondWithStatusCode(_0x5e5278,null))[_0x2c3c('0x27')](handleError(_0x5e5278,null));};exports[_0x2c3c('0x50')]=function(_0xdb9fd6,_0x4519a5){var _0x197f7e=moment()[_0x2c3c('0x51')]()[_0x2c3c('0x52')]();var _0x53cfb5=path['join'](config[_0x2c3c('0x53')],_0x2c3c('0x54'),_0x2c3c('0x55'),'tmp');var _0x1e15ed=path[_0x2c3c('0x56')](config[_0x2c3c('0x53')],_0x2c3c('0x54'),'files',_0x2c3c('0x57'));var _0x1d8e0e=path[_0x2c3c('0x56')](_0x53cfb5,_0x197f7e);var _0x3326ba=util[_0x2c3c('0x58')](_0x2c3c('0x59'),_0xdb9fd6[_0x2c3c('0x2a')]['id'],_0x197f7e);var _0x502f82=path[_0x2c3c('0x56')](_0x53cfb5,_0x3326ba);var _0xf10581=[];_0xf10581[_0x2c3c('0x5a')]({'model':db[_0x2c3c('0x5b')],'as':_0x2c3c('0x5b'),'attributes':['id',_0x2c3c('0x5c')],'raw':!![]});_0xf10581[_0x2c3c('0x5a')]({'model':db['CmContact'],'as':_0x2c3c('0x5d'),'attributes':['id',_0x2c3c('0x5e'),'lastName'],'raw':!![]});if(_0xdb9fd6['query']['attachments']){_0xf10581['push']({'model':db[_0x2c3c('0x5f')],'as':_0x2c3c('0x5f'),'raw':!![]});}var _0x2c4cd4=[{'model':db[_0x2c3c('0x38')],'as':_0x2c3c('0x60'),'attributes':['id',_0x2c3c('0x35'),_0x2c3c('0x61'),'direction',_0x2c3c('0x62'),'read'],'include':_0xf10581}];_0x2c4cd4[_0x2c3c('0x5a')]({'model':db[_0x2c3c('0x63')],'as':_0x2c3c('0x64'),'attributes':['id',_0x2c3c('0x1b')]});_0x2c4cd4[_0x2c3c('0x5a')]({'model':db[_0x2c3c('0x5b')],'as':_0x2c3c('0x65'),'attributes':['id',_0x2c3c('0x5c')]});return db[_0x2c3c('0x1e')][_0x2c3c('0x36')]({'where':{'id':_0xdb9fd6['params']['id']},'include':_0x2c4cd4})[_0x2c3c('0x26')](handleEntityNotFound(_0x4519a5,null))[_0x2c3c('0x26')](function(_0x454e1f){if(_0x454e1f){var _0x5de35c=_0x454e1f[_0x2c3c('0x66')]({'plain':!![]});fs[_0x2c3c('0x67')](_0x1d8e0e);var _0x509bf4={'channel':_0x2c3c('0x68'),'account':_0x5de35c['Account'][_0x2c3c('0x1b')],'agent':_0x5de35c['Owner']?_0x5de35c[_0x2c3c('0x65')][_0x2c3c('0x5c')]:_0x2c3c('0x69'),'createdAt':moment(_0x5de35c[_0x2c3c('0x61')])[_0x2c3c('0x58')](_0x2c3c('0x45'))[_0x2c3c('0x52')](),'closedAt':_0x5de35c[_0x2c3c('0x6a')]?moment(_0x5de35c[_0x2c3c('0x6b')])[_0x2c3c('0x58')](_0x2c3c('0x45'))[_0x2c3c('0x52')]():'','disposition':_0x5de35c[_0x2c3c('0x6c')],'visibility':_0x5de35c[_0x2c3c('0x6d')]?_0x2c3c('0x6e'):_0x2c3c('0x6f'),'messages':_(_0x5de35c[_0x2c3c('0x60')])[_0x2c3c('0x70')]({'secret':![]})[_0x2c3c('0x1d')](function(_0x5a0e0f){if(_0x5a0e0f['Attachment']){var _0x1bc4a3=path['join'](_0x1e15ed,_0x5a0e0f[_0x2c3c('0x5f')]['basename']);if(fs[_0x2c3c('0x71')](_0x1bc4a3)){fs[_0x2c3c('0x72')](_0x1bc4a3)['pipe'](fs[_0x2c3c('0x73')](path[_0x2c3c('0x56')](_0x1d8e0e,_0x5a0e0f['Attachment'][_0x2c3c('0x74')])));}}return{'date':moment(_0x5a0e0f[_0x2c3c('0x61')])[_0x2c3c('0x58')](_0x2c3c('0x45'))[_0x2c3c('0x52')](),'sender':_0x5a0e0f[_0x2c3c('0x75')]===_0x2c3c('0x76')?_0x5a0e0f[_0x2c3c('0x5b')]?_0x5a0e0f[_0x2c3c('0x5b')][_0x2c3c('0x5c')]:_0x2c3c('0x77'):_0x5a0e0f[_0x2c3c('0x5d')][_0x2c3c('0x5e')]+(_0x5a0e0f[_0x2c3c('0x5d')]['lastName']?'\x20'+_0x5a0e0f['Contact'][_0x2c3c('0x78')]:''),'body':_0x5a0e0f[_0x2c3c('0x5f')]?_0x5a0e0f['Attachment'][_0x2c3c('0x74')]:_0x5a0e0f['body'],'direction':_0x5a0e0f['direction']===_0x2c3c('0x76')?'A':'C','secret':_0x5a0e0f['secret'],'read':_0x5a0e0f[_0x2c3c('0x79')],'attachment':_0x5a0e0f[_0x2c3c('0x5f')]};})[_0x2c3c('0x7a')]()};return ejs[_0x2c3c('0x7b')](path['join'](config[_0x2c3c('0x53')],_0x2c3c('0x54'),_0x2c3c('0x7c'),_0x2c3c('0x7d')),{'interaction':_0x509bf4})['then'](function(_0x3cc80a){var _0x47f81e=path[_0x2c3c('0x56')](_0x1d8e0e,_0x2c3c('0x7e')+_0x5de35c['id']+'-'+_0x197f7e+'.pdf');var _0x157011={'path':_0x47f81e,'channel':_0x2c3c('0x68'),'interactionId':_0x5de35c['id']};return pdf[_0x2c3c('0x7f')](_0x3cc80a,_0x157011);})[_0x2c3c('0x26')](function(){return new Promise(function(_0x29fe54,_0x1d57cf){zipdir(_0x1d8e0e,{'saveTo':_0x502f82},function(_0x218bdf,_0x1624e2){if(_0x218bdf)return _0x1d57cf(_0x218bdf);return _0x29fe54(_0x1624e2);});})[_0x2c3c('0x26')](function(){return new Promise(function(_0x31914c,_0x4c10cc){rimraf(_0x1d8e0e,function(_0x8e6d1f){if(_0x8e6d1f)_0x4c10cc(_0x8e6d1f);return _0x31914c();});});})[_0x2c3c('0x26')](function(){return _0x4519a5[_0x2c3c('0x50')](_0x502f82,_0x3326ba,function(_0x20b0d5){if(_0x20b0d5){logger['error'](_0x2c3c('0x80'),_0x20b0d5);}else{fs[_0x2c3c('0x81')](_0x502f82);}});});});}else{return _0x4519a5[_0x2c3c('0xd')](0xc8);}})[_0x2c3c('0x27')](handleError(_0x4519a5,null));}; \ No newline at end of file diff --git a/server/api/openchannelInteraction/openchannelInteraction.events.js b/server/api/openchannelInteraction/openchannelInteraction.events.js index a5f9dc5..baf1a02 100644 --- a/server/api/openchannelInteraction/openchannelInteraction.events.js +++ b/server/api/openchannelInteraction/openchannelInteraction.events.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x64ad=['setDataValue','Users','unreadMessages','emit','catch','hook','events','../../mysqldb','OpenchannelMessage','save','update','remove','then'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0x64ad,0x165));var _0xd64a=function(_0x46a3ff,_0x470b9a){_0x46a3ff=_0x46a3ff-0x0;var _0x404bc2=_0x64ad[_0x46a3ff];return _0x404bc2;};'use strict';var EventEmitter=require(_0xd64a('0x0'));var OpenchannelInteraction=require(_0xd64a('0x1'))['db']['OpenchannelInteraction'];var OpenchannelMessage=require(_0xd64a('0x1'))['db'][_0xd64a('0x2')];var OpenchannelInteractionEvents=new EventEmitter();OpenchannelInteractionEvents['setMaxListeners'](0x0);var events={'afterCreate':_0xd64a('0x3'),'afterUpdate':_0xd64a('0x4'),'afterDestroy':_0xd64a('0x5')};function emitEvent(_0x3a85cc){return function(_0x5780b7,_0x343489,_0x5bd5bc){_0x5780b7['getUsers']({'attributes':['id'],'raw':!![]})[_0xd64a('0x6')](function(_0x198f6a){_0x5780b7[_0xd64a('0x7')](_0xd64a('0x8'),_0x198f6a['map'](function(_0x224938){return{'id':_0x224938['id']};}));return OpenchannelMessage['findAll']({'where':{'OpenchannelInteractionId':_0x5780b7['id'],'direction':'in','read':![]},'raw':!![]});})[_0xd64a('0x6')](function(_0x305489){_0x5780b7[_0xd64a('0x7')](_0xd64a('0x9'),_0x305489['length']);OpenchannelInteractionEvents[_0xd64a('0xa')](_0x3a85cc+':'+_0x5780b7['id'],_0x5780b7);OpenchannelInteractionEvents[_0xd64a('0xa')](_0x3a85cc,_0x5780b7);_0x5bd5bc(null);})[_0xd64a('0xb')](_0x5bd5bc(null));};}for(var e in events){if(events['hasOwnProperty'](e)){var event=events[e];OpenchannelInteraction[_0xd64a('0xc')](e,emitEvent(event));}}module['exports']=OpenchannelInteractionEvents; \ No newline at end of file +var _0xecf1=['unreadMessages','catch','hasOwnProperty','exports','events','../../mysqldb','OpenchannelInteraction','OpenchannelMessage','setMaxListeners','save','update','then','Users','map','findAll','setDataValue'];(function(_0x20ca00,_0x2bfe9b){var _0x2c1037=function(_0x4f5993){while(--_0x4f5993){_0x20ca00['push'](_0x20ca00['shift']());}};_0x2c1037(++_0x2bfe9b);}(_0xecf1,0x174));var _0x1ecf=function(_0x4d40dd,_0x39592b){_0x4d40dd=_0x4d40dd-0x0;var _0x1c51f2=_0xecf1[_0x4d40dd];return _0x1c51f2;};'use strict';var EventEmitter=require(_0x1ecf('0x0'));var OpenchannelInteraction=require(_0x1ecf('0x1'))['db'][_0x1ecf('0x2')];var OpenchannelMessage=require('../../mysqldb')['db'][_0x1ecf('0x3')];var OpenchannelInteractionEvents=new EventEmitter();OpenchannelInteractionEvents[_0x1ecf('0x4')](0x0);var events={'afterCreate':_0x1ecf('0x5'),'afterUpdate':_0x1ecf('0x6'),'afterDestroy':'remove'};function emitEvent(_0x15b5f9){return function(_0x267cc8,_0x58fa41,_0x4574e2){_0x267cc8['getUsers']({'attributes':['id'],'raw':!![]})[_0x1ecf('0x7')](function(_0x129eab){_0x267cc8['setDataValue'](_0x1ecf('0x8'),_0x129eab[_0x1ecf('0x9')](function(_0x4747ce){return{'id':_0x4747ce['id']};}));return OpenchannelMessage[_0x1ecf('0xa')]({'where':{'OpenchannelInteractionId':_0x267cc8['id'],'direction':'in','read':![]},'raw':!![]});})['then'](function(_0x430212){_0x267cc8[_0x1ecf('0xb')](_0x1ecf('0xc'),_0x430212['length']);OpenchannelInteractionEvents['emit'](_0x15b5f9+':'+_0x267cc8['id'],_0x267cc8);OpenchannelInteractionEvents['emit'](_0x15b5f9,_0x267cc8);_0x4574e2(null);})[_0x1ecf('0xd')](_0x4574e2(null));};}for(var e in events){if(events[_0x1ecf('0xe')](e)){var event=events[e];OpenchannelInteraction['hook'](e,emitEvent(event));}}module[_0x1ecf('0xf')]=OpenchannelInteractionEvents; \ No newline at end of file diff --git a/server/api/openchannelInteraction/openchannelInteraction.model.js b/server/api/openchannelInteraction/openchannelInteraction.model.js index de5cc30..ec9f8bb 100644 --- a/server/api/openchannelInteraction/openchannelInteraction.model.js +++ b/server/api/openchannelInteraction/openchannelInteraction.model.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x7bb9=['OpenchannelInteraction','openchannel_interactions','utf8mb4','utf8mb4_unicode_ci','changed','closed','format','YYYY-MM-DD\x20HH:mm:ss','lodash','../../config/logger','api','bluebird','path','./openchannelInteraction.attributes','exports','define'];(function(_0x41d10b,_0x2a447a){var _0x484760=function(_0x3e8047){while(--_0x3e8047){_0x41d10b['push'](_0x41d10b['shift']());}};_0x484760(++_0x2a447a);}(_0x7bb9,0x158));var _0x97bb=function(_0x2be8c2,_0x14a4b5){_0x2be8c2=_0x2be8c2-0x0;var _0x97f531=_0x7bb9[_0x2be8c2];return _0x97f531;};'use strict';var _=require(_0x97bb('0x0'));var util=require('util');var logger=require(_0x97bb('0x1'))(_0x97bb('0x2'));var moment=require('moment');var BPromise=require(_0x97bb('0x3'));var rp=require('request-promise');var fs=require('fs');var path=require(_0x97bb('0x4'));var rimraf=require('rimraf');var config=require('../../config/environment');var attributes=require(_0x97bb('0x5'));module[_0x97bb('0x6')]=function(_0xee1968,_0x4b71f4){return _0xee1968[_0x97bb('0x7')](_0x97bb('0x8'),attributes,{'tableName':_0x97bb('0x9'),'paranoid':![],'indexes':[],'timestamps':!![],'charset':_0x97bb('0xa'),'collate':_0x97bb('0xb'),'hooks':{'beforeUpdate':function(_0x1ba081,_0x417e5e,_0x3285ff){if(_0x1ba081[_0x97bb('0xc')](_0x97bb('0xd'))){_0x1ba081['closedAt']=moment()[_0x97bb('0xe')](_0x97bb('0xf'));}_0x3285ff(null,_0x1ba081);}}});}; \ No newline at end of file +var _0xc6c0=['format','YYYY-MM-DD\x20HH:mm:ss','lodash','util','api','moment','bluebird','request-promise','path','../../config/environment','exports','openchannel_interactions','utf8mb4','changed','closed','closedAt'];(function(_0x20d93a,_0x422a10){var _0x4e5cec=function(_0x56089c){while(--_0x56089c){_0x20d93a['push'](_0x20d93a['shift']());}};_0x4e5cec(++_0x422a10);}(_0xc6c0,0x142));var _0x0c6c=function(_0x34f545,_0x2bd2ee){_0x34f545=_0x34f545-0x0;var _0x1ff6b8=_0xc6c0[_0x34f545];return _0x1ff6b8;};'use strict';var _=require(_0x0c6c('0x0'));var util=require(_0x0c6c('0x1'));var logger=require('../../config/logger')(_0x0c6c('0x2'));var moment=require(_0x0c6c('0x3'));var BPromise=require(_0x0c6c('0x4'));var rp=require(_0x0c6c('0x5'));var fs=require('fs');var path=require(_0x0c6c('0x6'));var rimraf=require('rimraf');var config=require(_0x0c6c('0x7'));var attributes=require('./openchannelInteraction.attributes');module[_0x0c6c('0x8')]=function(_0x4ad14c,_0x9078a7){return _0x4ad14c['define']('OpenchannelInteraction',attributes,{'tableName':_0x0c6c('0x9'),'paranoid':![],'indexes':[],'timestamps':!![],'charset':_0x0c6c('0xa'),'collate':'utf8mb4_unicode_ci','hooks':{'beforeUpdate':function(_0x220439,_0x38b556,_0x198ff0){if(_0x220439[_0x0c6c('0xb')](_0x0c6c('0xc'))){_0x220439[_0x0c6c('0xd')]=moment()[_0x0c6c('0xe')](_0x0c6c('0xf'));}_0x198ff0(null,_0x220439);}}});}; \ No newline at end of file diff --git a/server/api/openchannelInteraction/openchannelInteraction.rpc.js b/server/api/openchannelInteraction/openchannelInteraction.rpc.js index fd35a0f..4c82d9d 100644 --- a/server/api/openchannelInteraction/openchannelInteraction.rpc.js +++ b/server/api/openchannelInteraction/openchannelInteraction.rpc.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x1b7a=['request\x20sent','stringify','error','code','message','result','catch','UpdateOpenchannelInteraction','OpenchannelInteraction','update','body','options','where','attributes','limit','AddTagsToOpenchannelInteraction','find','ids','spread','AddTags','lodash','util','moment','randomstring','ioredis','../../mysqldb','rpc','../../config/environment','defaults','localhost','redis','./openchannelInteraction.socket','register','request','then','info','OpenchannelInteraction,\x20%s,\x20%s','debug'];(function(_0x1769a8,_0x328d23){var _0x217eb8=function(_0xd82868){while(--_0xd82868){_0x1769a8['push'](_0x1769a8['shift']());}};_0x217eb8(++_0x328d23);}(_0x1b7a,0x86));var _0xa1b7=function(_0x56afd5,_0x4ee91a){_0x56afd5=_0x56afd5-0x0;var _0x23418f=_0x1b7a[_0x56afd5];return _0x23418f;};'use strict';var _=require(_0xa1b7('0x0'));var util=require(_0xa1b7('0x1'));var moment=require(_0xa1b7('0x2'));var BPromise=require('bluebird');var rs=require(_0xa1b7('0x3'));var fs=require('fs');var Redis=require(_0xa1b7('0x4'));var db=require(_0xa1b7('0x5'))['db'];var utils=require('../../config/utils');var logger=require('../../config/logger')(_0xa1b7('0x6'));var config=require(_0xa1b7('0x7'));var jayson=require('jayson/promise');var client=jayson['client']['http']({'port':0x232a});config['redis']=_[_0xa1b7('0x8')](config['redis'],{'host':_0xa1b7('0x9'),'port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config[_0xa1b7('0xa')]));require(_0xa1b7('0xb'))[_0xa1b7('0xc')](socket);function respondWithRpcPromise(_0x44404f,_0x15bd98,_0x5d1a46){return new BPromise(function(_0x45101e,_0x583b14){return client[_0xa1b7('0xd')](_0x44404f,_0x5d1a46)[_0xa1b7('0xe')](function(_0x1c060e){logger[_0xa1b7('0xf')](_0xa1b7('0x10'),_0x15bd98,'request\x20sent');logger[_0xa1b7('0x11')]('OpenchannelInteraction,\x20%s,\x20%s,\x20%s',_0x15bd98,_0xa1b7('0x12'),JSON[_0xa1b7('0x13')](_0x1c060e));if(_0x1c060e['error']){if(_0x1c060e[_0xa1b7('0x14')][_0xa1b7('0x15')]===0x1f4){logger[_0xa1b7('0x14')]('OpenchannelInteraction,\x20%s,\x20%s',_0x15bd98,_0x1c060e[_0xa1b7('0x14')]['message']);return _0x583b14(_0x1c060e[_0xa1b7('0x14')][_0xa1b7('0x16')]);}logger['error'](_0xa1b7('0x10'),_0x15bd98,_0x1c060e[_0xa1b7('0x14')]['message']);return _0x45101e(_0x1c060e[_0xa1b7('0x14')][_0xa1b7('0x16')]);}else{logger[_0xa1b7('0xf')]('OpenchannelInteraction,\x20%s,\x20%s',_0x15bd98,'request\x20sent');_0x45101e(_0x1c060e[_0xa1b7('0x17')][_0xa1b7('0x16')]);}})[_0xa1b7('0x18')](function(_0x5690a2){logger[_0xa1b7('0x14')](_0xa1b7('0x10'),_0x15bd98,_0x5690a2);_0x583b14(_0x5690a2);});});}exports[_0xa1b7('0x19')]=function(_0x59b0b3){var _0x7d41f8=this;return new Promise(function(_0x1512ca,_0x63ae2b){return db[_0xa1b7('0x1a')][_0xa1b7('0x1b')](_0x59b0b3[_0xa1b7('0x1c')],{'raw':_0x59b0b3[_0xa1b7('0x1d')]?_0x59b0b3[_0xa1b7('0x1d')]['raw']===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x59b0b3['options']?_0x59b0b3['options'][_0xa1b7('0x1e')]||null:null,'attributes':_0x59b0b3['options']?_0x59b0b3[_0xa1b7('0x1d')][_0xa1b7('0x1f')]||null:null,'limit':_0x59b0b3[_0xa1b7('0x1d')]?_0x59b0b3[_0xa1b7('0x1d')][_0xa1b7('0x20')]||null:null})['then'](function(_0x53f79e){logger['info'](_0xa1b7('0x19'),_0x59b0b3);logger[_0xa1b7('0x11')]('UpdateOpenchannelInteraction',_0x59b0b3,JSON[_0xa1b7('0x13')](_0x53f79e));_0x1512ca(_0x53f79e);})['catch'](function(_0x1e7bb9){logger['error'](_0xa1b7('0x19'),_0x1e7bb9[_0xa1b7('0x16')],_0x59b0b3);_0x63ae2b(_0x7d41f8[_0xa1b7('0x14')](0x1f4,_0x1e7bb9['message']));});});};exports[_0xa1b7('0x21')]=function(_0x416df7){return new Promise(function(_0x10faee,_0xa602ac){return db[_0xa1b7('0x1a')][_0xa1b7('0x22')]({'where':_0x416df7[_0xa1b7('0x1d')]?_0x416df7[_0xa1b7('0x1d')][_0xa1b7('0x1e')]||null:null})[_0xa1b7('0xe')](function(_0x24afdd){if(_0x24afdd){return _0x24afdd['addTags'](_0x416df7[_0xa1b7('0x1c')][_0xa1b7('0x23')],_['omit'](_0x416df7[_0xa1b7('0x1c')],['ids','id'])||{});}})[_0xa1b7('0x24')](function(_0x1c4c06){logger[_0xa1b7('0xf')]('AddTags',_0x416df7);logger['debug']('AddTags',_0x416df7,JSON[_0xa1b7('0x13')](_0x1c4c06));_0x10faee(_0x1c4c06);})['catch'](function(_0x3b4794){logger[_0xa1b7('0x14')](_0xa1b7('0x25'),_0x3b4794['message'],_0x416df7);_0xa602ac(_this[_0xa1b7('0x14')](0x1f4,_0x3b4794['message']));});});}; \ No newline at end of file +var _0x3310=['result','catch','UpdateOpenchannelInteraction','OpenchannelInteraction','update','options','raw','attributes','limit','where','addTags','body','ids','AddTags','util','bluebird','randomstring','../../mysqldb','../../config/utils','../../config/logger','rpc','http','redis','defaults','localhost','register','request','then','OpenchannelInteraction,\x20%s,\x20%s','request\x20sent','debug','stringify','error','code','message','info'];(function(_0x21a9d9,_0x4d5ac8){var _0x46adce=function(_0xfdd336){while(--_0xfdd336){_0x21a9d9['push'](_0x21a9d9['shift']());}};_0x46adce(++_0x4d5ac8);}(_0x3310,0x7a));var _0x0331=function(_0x141f63,_0x37b790){_0x141f63=_0x141f63-0x0;var _0x2c7ebd=_0x3310[_0x141f63];return _0x2c7ebd;};'use strict';var _=require('lodash');var util=require(_0x0331('0x0'));var moment=require('moment');var BPromise=require(_0x0331('0x1'));var rs=require(_0x0331('0x2'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0x0331('0x3'))['db'];var utils=require(_0x0331('0x4'));var logger=require(_0x0331('0x5'))(_0x0331('0x6'));var config=require('../../config/environment');var jayson=require('jayson/promise');var client=jayson['client'][_0x0331('0x7')]({'port':0x232a});config[_0x0331('0x8')]=_[_0x0331('0x9')](config[_0x0331('0x8')],{'host':_0x0331('0xa'),'port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config[_0x0331('0x8')]));require('./openchannelInteraction.socket')[_0x0331('0xb')](socket);function respondWithRpcPromise(_0x2c50a1,_0x30bd7f,_0x5267d8){return new BPromise(function(_0x5184ed,_0x519cb2){return client[_0x0331('0xc')](_0x2c50a1,_0x5267d8)[_0x0331('0xd')](function(_0x5f5381){logger['info'](_0x0331('0xe'),_0x30bd7f,_0x0331('0xf'));logger[_0x0331('0x10')]('OpenchannelInteraction,\x20%s,\x20%s,\x20%s',_0x30bd7f,_0x0331('0xf'),JSON[_0x0331('0x11')](_0x5f5381));if(_0x5f5381['error']){if(_0x5f5381[_0x0331('0x12')][_0x0331('0x13')]===0x1f4){logger['error']('OpenchannelInteraction,\x20%s,\x20%s',_0x30bd7f,_0x5f5381[_0x0331('0x12')][_0x0331('0x14')]);return _0x519cb2(_0x5f5381['error'][_0x0331('0x14')]);}logger[_0x0331('0x12')](_0x0331('0xe'),_0x30bd7f,_0x5f5381[_0x0331('0x12')]['message']);return _0x5184ed(_0x5f5381[_0x0331('0x12')]['message']);}else{logger[_0x0331('0x15')]('OpenchannelInteraction,\x20%s,\x20%s',_0x30bd7f,'request\x20sent');_0x5184ed(_0x5f5381[_0x0331('0x16')][_0x0331('0x14')]);}})[_0x0331('0x17')](function(_0x3d7afa){logger[_0x0331('0x12')](_0x0331('0xe'),_0x30bd7f,_0x3d7afa);_0x519cb2(_0x3d7afa);});});}exports[_0x0331('0x18')]=function(_0x56dc91){var _0x402b46=this;return new Promise(function(_0x3d6b56,_0x312489){return db[_0x0331('0x19')][_0x0331('0x1a')](_0x56dc91['body'],{'raw':_0x56dc91['options']?_0x56dc91[_0x0331('0x1b')][_0x0331('0x1c')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x56dc91[_0x0331('0x1b')]?_0x56dc91['options']['where']||null:null,'attributes':_0x56dc91[_0x0331('0x1b')]?_0x56dc91[_0x0331('0x1b')][_0x0331('0x1d')]||null:null,'limit':_0x56dc91[_0x0331('0x1b')]?_0x56dc91[_0x0331('0x1b')][_0x0331('0x1e')]||null:null})[_0x0331('0xd')](function(_0x14c6ea){logger[_0x0331('0x15')]('UpdateOpenchannelInteraction',_0x56dc91);logger[_0x0331('0x10')](_0x0331('0x18'),_0x56dc91,JSON[_0x0331('0x11')](_0x14c6ea));_0x3d6b56(_0x14c6ea);})[_0x0331('0x17')](function(_0x302ab5){logger['error'](_0x0331('0x18'),_0x302ab5['message'],_0x56dc91);_0x312489(_0x402b46['error'](0x1f4,_0x302ab5[_0x0331('0x14')]));});});};exports['AddTagsToOpenchannelInteraction']=function(_0x53ca07){return new Promise(function(_0x2fadf1,_0xd09de2){return db[_0x0331('0x19')]['find']({'where':_0x53ca07[_0x0331('0x1b')]?_0x53ca07['options'][_0x0331('0x1f')]||null:null})[_0x0331('0xd')](function(_0x272700){if(_0x272700){return _0x272700[_0x0331('0x20')](_0x53ca07[_0x0331('0x21')][_0x0331('0x22')],_['omit'](_0x53ca07[_0x0331('0x21')],[_0x0331('0x22'),'id'])||{});}})['spread'](function(_0x464b24){logger[_0x0331('0x15')](_0x0331('0x23'),_0x53ca07);logger[_0x0331('0x10')](_0x0331('0x23'),_0x53ca07,JSON[_0x0331('0x11')](_0x464b24));_0x2fadf1(_0x464b24);})['catch'](function(_0x5af170){logger['error'](_0x0331('0x23'),_0x5af170['message'],_0x53ca07);_0xd09de2(_this[_0x0331('0x12')](0x1f4,_0x5af170[_0x0331('0x14')]));});});}; \ No newline at end of file diff --git a/server/api/openchannelInteraction/openchannelInteraction.socket.js b/server/api/openchannelInteraction/openchannelInteraction.socket.js index 18f7a8a..5cd0f77 100644 --- a/server/api/openchannelInteraction/openchannelInteraction.socket.js +++ b/server/api/openchannelInteraction/openchannelInteraction.socket.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xb1e1=['./openchannelInteraction.events','save','removeListener','register','openchannelInteraction:'];(function(_0x12c076,_0x5bef17){var _0x2ddd18=function(_0x436336){while(--_0x436336){_0x12c076['push'](_0x12c076['shift']());}};_0x2ddd18(++_0x5bef17);}(_0xb1e1,0xd2));var _0x1b1e=function(_0x1ad60c,_0x191d6b){_0x1ad60c=_0x1ad60c-0x0;var _0x29ee31=_0xb1e1[_0x1ad60c];return _0x29ee31;};'use strict';var OpenchannelInteractionEvents=require(_0x1b1e('0x0'));var events=[_0x1b1e('0x1'),'remove','update'];function createListener(_0x5e460e,_0x1aeea3){return function(_0x11c695){_0x1aeea3['emit'](_0x5e460e,_0x11c695);};}function removeListener(_0x4427da,_0x23e738){return function(){OpenchannelInteractionEvents[_0x1b1e('0x2')](_0x4427da,_0x23e738);};}exports[_0x1b1e('0x3')]=function(_0x1cadb1){for(var _0x2d711e=0x0,_0x32b546=events['length'];_0x2d711e<_0x32b546;_0x2d711e++){var _0x499f76=events[_0x2d711e];var _0x2e0488=createListener(_0x1b1e('0x4')+_0x499f76,_0x1cadb1);OpenchannelInteractionEvents['on'](_0x499f76,_0x2e0488);}}; \ No newline at end of file +var _0x2b84=['length','./openchannelInteraction.events','save','remove','update','emit','removeListener','register'];(function(_0x55d434,_0x1709cb){var _0x8bdba9=function(_0x244d6a){while(--_0x244d6a){_0x55d434['push'](_0x55d434['shift']());}};_0x8bdba9(++_0x1709cb);}(_0x2b84,0x151));var _0x42b8=function(_0x5ddb1c,_0x5ea4df){_0x5ddb1c=_0x5ddb1c-0x0;var _0x354adc=_0x2b84[_0x5ddb1c];return _0x354adc;};'use strict';var OpenchannelInteractionEvents=require(_0x42b8('0x0'));var events=[_0x42b8('0x1'),_0x42b8('0x2'),_0x42b8('0x3')];function createListener(_0x18ca9c,_0x159d48){return function(_0x23b51f){_0x159d48[_0x42b8('0x4')](_0x18ca9c,_0x23b51f);};}function removeListener(_0x2ad510,_0x41e319){return function(){OpenchannelInteractionEvents[_0x42b8('0x5')](_0x2ad510,_0x41e319);};}exports[_0x42b8('0x6')]=function(_0x335ece){for(var _0x32cbe1=0x0,_0x3fc2b6=events[_0x42b8('0x7')];_0x32cbe1<_0x3fc2b6;_0x32cbe1++){var _0x1f565e=events[_0x32cbe1];var _0x28f523=createListener('openchannelInteraction:'+_0x1f565e,_0x335ece);OpenchannelInteractionEvents['on'](_0x1f565e,_0x28f523);}}; \ No newline at end of file diff --git a/server/api/openchannelMessage/index.js b/server/api/openchannelMessage/index.js index 79901de..a3766f8 100644 --- a/server/api/openchannelMessage/index.js +++ b/server/api/openchannelMessage/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x0713=['get','isAuthenticated','index','/describe','describe','/:id','post','tracked','openchannel','openchannelmessage:create','put','update','accept','/:id/reject','delete','destroy','exports','path','connect-timeout','express','Router','fs-extra','../../components/interaction/service','../../config/environment','./openchannelMessage.controller'];(function(_0x53ccf2,_0x13cb67){var _0x5a2964=function(_0x3b0514){while(--_0x3b0514){_0x53ccf2['push'](_0x53ccf2['shift']());}};_0x5a2964(++_0x13cb67);}(_0x0713,0x1ba));var _0x3071=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0x0713[_0x3dd15e];return _0x231fd0;};'use strict';var multer=require('multer');var util=require('util');var path=require(_0x3071('0x0'));var timeout=require(_0x3071('0x1'));var express=require(_0x3071('0x2'));var router=express[_0x3071('0x3')]();var fs_extra=require(_0x3071('0x4'));var auth=require('../../components/auth/service');var interaction=require(_0x3071('0x5'));var config=require(_0x3071('0x6'));var controller=require(_0x3071('0x7'));router[_0x3071('0x8')]('/',auth[_0x3071('0x9')](),controller[_0x3071('0xa')]);router[_0x3071('0x8')](_0x3071('0xb'),auth[_0x3071('0x9')](),controller[_0x3071('0xc')]);router[_0x3071('0x8')](_0x3071('0xd'),auth[_0x3071('0x9')](),controller['show']);router[_0x3071('0xe')]('/',auth[_0x3071('0x9')](),interaction[_0x3071('0xf')](_0x3071('0x10'),_0x3071('0x11')),controller['create']);router[_0x3071('0x12')](_0x3071('0xd'),auth[_0x3071('0x9')](),controller[_0x3071('0x13')]);router[_0x3071('0x12')]('/:id/accept',auth['isAuthenticated'](),controller[_0x3071('0x14')]);router['put'](_0x3071('0x15'),auth[_0x3071('0x9')](),controller['reject']);router[_0x3071('0x16')]('/:id',auth[_0x3071('0x9')](),controller[_0x3071('0x17')]);module[_0x3071('0x18')]=router; \ No newline at end of file +var _0xd8b0=['Router','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','isAuthenticated','index','get','describe','/:id','show','post','tracked','openchannel','openchannelmessage:create','put','update','/:id/accept','accept','/:id/reject','reject','delete','destroy','multer','util'];(function(_0x1fa007,_0x5d3503){var _0x24a0c2=function(_0x261ea0){while(--_0x261ea0){_0x1fa007['push'](_0x1fa007['shift']());}};_0x24a0c2(++_0x5d3503);}(_0xd8b0,0xad));var _0x0d8b=function(_0x20a584,_0xe384a5){_0x20a584=_0x20a584-0x0;var _0x4b41a8=_0xd8b0[_0x20a584];return _0x4b41a8;};'use strict';var multer=require(_0x0d8b('0x0'));var util=require(_0x0d8b('0x1'));var path=require('path');var timeout=require('connect-timeout');var express=require('express');var router=express[_0x0d8b('0x2')]();var fs_extra=require(_0x0d8b('0x3'));var auth=require(_0x0d8b('0x4'));var interaction=require(_0x0d8b('0x5'));var config=require(_0x0d8b('0x6'));var controller=require('./openchannelMessage.controller');router['get']('/',auth[_0x0d8b('0x7')](),controller[_0x0d8b('0x8')]);router[_0x0d8b('0x9')]('/describe',auth[_0x0d8b('0x7')](),controller[_0x0d8b('0xa')]);router['get'](_0x0d8b('0xb'),auth[_0x0d8b('0x7')](),controller[_0x0d8b('0xc')]);router[_0x0d8b('0xd')]('/',auth[_0x0d8b('0x7')](),interaction[_0x0d8b('0xe')](_0x0d8b('0xf'),_0x0d8b('0x10')),controller['create']);router[_0x0d8b('0x11')]('/:id',auth[_0x0d8b('0x7')](),controller[_0x0d8b('0x12')]);router[_0x0d8b('0x11')](_0x0d8b('0x13'),auth[_0x0d8b('0x7')](),controller[_0x0d8b('0x14')]);router[_0x0d8b('0x11')](_0x0d8b('0x15'),auth[_0x0d8b('0x7')](),controller[_0x0d8b('0x16')]);router[_0x0d8b('0x17')](_0x0d8b('0xb'),auth[_0x0d8b('0x7')](),controller[_0x0d8b('0x18')]);module['exports']=router; \ No newline at end of file diff --git a/server/api/openchannelMessage/openchannelMessage.attributes.js b/server/api/openchannelMessage/openchannelMessage.attributes.js index 0c14050..f3d0018 100644 --- a/server/api/openchannelMessage/openchannelMessage.attributes.js +++ b/server/api/openchannelMessage/openchannelMessage.attributes.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x2b65=['exports','TEXT','medium','BOOLEAN','ENUM','out','DATE','STRING','sequelize'];(function(_0x4afac5,_0x1ab4ed){var _0x2404b3=function(_0x5c700b){while(--_0x5c700b){_0x4afac5['push'](_0x4afac5['shift']());}};_0x2404b3(++_0x1ab4ed);}(_0x2b65,0x131));var _0x52b6=function(_0x1da04e,_0x31024b){_0x1da04e=_0x1da04e-0x0;var _0xdd8c41=_0x2b65[_0x1da04e];return _0xdd8c41;};'use strict';var Sequelize=require(_0x52b6('0x0'));module[_0x52b6('0x1')]={'body':{'type':Sequelize[_0x52b6('0x2')](_0x52b6('0x3')),'allowNull':![]},'read':{'type':Sequelize[_0x52b6('0x4')],'defaultValue':![]},'secret':{'type':Sequelize[_0x52b6('0x4')],'defaultValue':![]},'direction':{'type':Sequelize[_0x52b6('0x5')]('in',_0x52b6('0x6')),'defaultValue':'out','allowNull':![]},'readAt':{'type':Sequelize[_0x52b6('0x7')]},'providerName':{'type':Sequelize[_0x52b6('0x8')]},'providerResponse':{'type':Sequelize[_0x52b6('0x2')]}}; \ No newline at end of file +var _0xe493=['TEXT','medium','BOOLEAN','ENUM','out','DATE','sequelize','exports'];(function(_0x1cd674,_0x8d3638){var _0x27928f=function(_0x5e3c70){while(--_0x5e3c70){_0x1cd674['push'](_0x1cd674['shift']());}};_0x27928f(++_0x8d3638);}(_0xe493,0x7e));var _0x3e49=function(_0x3e2b4b,_0x55e2c1){_0x3e2b4b=_0x3e2b4b-0x0;var _0x4c3813=_0xe493[_0x3e2b4b];return _0x4c3813;};'use strict';var Sequelize=require(_0x3e49('0x0'));module[_0x3e49('0x1')]={'body':{'type':Sequelize[_0x3e49('0x2')](_0x3e49('0x3')),'allowNull':![]},'read':{'type':Sequelize[_0x3e49('0x4')],'defaultValue':![]},'secret':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'direction':{'type':Sequelize[_0x3e49('0x5')]('in',_0x3e49('0x6')),'defaultValue':'out','allowNull':![]},'readAt':{'type':Sequelize[_0x3e49('0x7')]},'providerName':{'type':Sequelize['STRING']},'providerResponse':{'type':Sequelize[_0x3e49('0x2')]}}; \ No newline at end of file diff --git a/server/api/openchannelMessage/openchannelMessage.controller.js b/server/api/openchannelMessage/openchannelMessage.controller.js index a3d0085..e9f2709 100644 --- a/server/api/openchannelMessage/openchannelMessage.controller.js +++ b/server/api/openchannelMessage/openchannelMessage.controller.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xe277=['info','request\x20sent','debug','OpenchannelMessage,\x20%s,\x20%s,\x20%s','stringify','error','OpenchannelMessage,\x20%s,\x20%s','message','result','catch','sendStatus','status','json','offset','undefined','count','limit','set','Content-Range','apply','reject','save','destroy','end','name','send','index','OpenchannelMessage','rawAttributes','fieldName','type','key','map','query','intersection','model','attributes','fields','length','nolimit','sort','where','filters','pick','filter','merge','VIRTUAL','options','includeAll','include','findAll','rows','show','params','keys','find','create','body','update','describe','openchannel-interactions','readAt','format','YYYY-MM-DD\x20HH:mm:ss','UserId','agent','OpenchannelInteractionId','interaction','get','[OPENCHANNELMESSAGE:ACCEPT]\x20id=%s\x20name=%s\x20role=%s\x20interaction=%s\x20body=%s','user','role','null','AcceptMessage','acceptMessage','SELECT\x20*\x20FROM\x20cm_contacts\x20WHERE\x20id\x20=\x20','ContactId','QueryTypes','contact','fullname','email','internal','manual','interface','channel','motionChannel','event','accept','EventManager','acceptmessage','openchannel','RejectMessage','rejectMessage','sequelize','Sequelize','User','SIP/%s','rejectmessage','rimraf','fast-json-patch','request-promise','bluebird','util','path','to-csv','ejs','fs-extra','lodash','squel','crypto','jsforce','querystring','papaparse','ioredis','../../components/auth/service','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','redis','defaults','localhost','./openchannelMessage.socket','register','jayson/promise','client','http','request','then'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0xe277,0xe6));var _0x7e27=function(_0x54d4bd,_0x48a316){_0x54d4bd=_0x54d4bd-0x0;var _0x1904c4=_0xe277[_0x54d4bd];return _0x1904c4;};'use strict';var emlformat=require('eml-format');var rimraf=require(_0x7e27('0x0'));var zipdir=require('zip-dir');var jsonpatch=require(_0x7e27('0x1'));var rp=require(_0x7e27('0x2'));var moment=require('moment');var BPromise=require(_0x7e27('0x3'));var Mustache=require('mustache');var util=require(_0x7e27('0x4'));var path=require(_0x7e27('0x5'));var sox=require('sox');var csv=require(_0x7e27('0x6'));var ejs=require(_0x7e27('0x7'));var fs=require('fs');var fs_extra=require(_0x7e27('0x8'));var _=require(_0x7e27('0x9'));var squel=require(_0x7e27('0xa'));var crypto=require(_0x7e27('0xb'));var jsforce=require(_0x7e27('0xc'));var deskjs=require('desk.js');var toCsv=require(_0x7e27('0x6'));var querystring=require(_0x7e27('0xd'));var Papa=require(_0x7e27('0xe'));var Redis=require(_0x7e27('0xf'));var authService=require(_0x7e27('0x10'));var qs=require('../../components/parsers/qs');var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0x7e27('0x11'));var logger=require(_0x7e27('0x12'))(_0x7e27('0x13'));var utils=require(_0x7e27('0x14'));var config=require(_0x7e27('0x15'));var licenseUtil=require(_0x7e27('0x16'));var db=require(_0x7e27('0x17'))['db'];config[_0x7e27('0x18')]=_[_0x7e27('0x19')](config[_0x7e27('0x18')],{'host':_0x7e27('0x1a'),'port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config[_0x7e27('0x18')]));require(_0x7e27('0x1b'))[_0x7e27('0x1c')](socket);var jayson=require(_0x7e27('0x1d'));var client=jayson['client']['http']({'port':0x232c});var client9002=jayson[_0x7e27('0x1e')][_0x7e27('0x1f')]({'port':0x232a});function respondWithRpcPromise(_0x2ede42,_0x1011d5,_0x228d7e,_0x57acc2){return new BPromise(function(_0x32f275,_0x217789){var _0x5efc3a=_0x57acc2||client;return _0x5efc3a[_0x7e27('0x20')](_0x2ede42,_0x228d7e)[_0x7e27('0x21')](function(_0x56ad2e){logger[_0x7e27('0x22')]('OpenchannelMessage,\x20%s,\x20%s',_0x1011d5,_0x7e27('0x23'));logger[_0x7e27('0x24')](_0x7e27('0x25'),_0x1011d5,_0x7e27('0x23'),JSON[_0x7e27('0x26')](_0x56ad2e));if(_0x56ad2e[_0x7e27('0x27')]){if(_0x56ad2e[_0x7e27('0x27')]['code']===0x1f4){logger[_0x7e27('0x27')](_0x7e27('0x28'),_0x1011d5,_0x56ad2e['error'][_0x7e27('0x29')]);return _0x217789(_0x56ad2e['error'][_0x7e27('0x29')]);}logger[_0x7e27('0x27')](_0x7e27('0x28'),_0x1011d5,_0x56ad2e[_0x7e27('0x27')]['message']);return _0x32f275(_0x56ad2e[_0x7e27('0x27')][_0x7e27('0x29')]);}else{logger['info'](_0x7e27('0x28'),_0x1011d5,_0x7e27('0x23'));_0x32f275(_0x56ad2e[_0x7e27('0x2a')]['message']);}})[_0x7e27('0x2b')](function(_0x4dd8ad){logger[_0x7e27('0x27')]('OpenchannelMessage,\x20%s,\x20%s',_0x1011d5,_0x4dd8ad);_0x217789(_0x4dd8ad);});});}function respondWithStatusCode(_0x895da0,_0x568042){_0x568042=_0x568042||0xcc;return function(_0x346532){if(_0x346532){return _0x895da0[_0x7e27('0x2c')](_0x568042);}return _0x895da0['status'](_0x568042)['end']();};}function respondWithResult(_0x8d141b,_0x13e71b){_0x13e71b=_0x13e71b||0xc8;return function(_0xf6fdfa){if(_0xf6fdfa){return _0x8d141b[_0x7e27('0x2d')](_0x13e71b)[_0x7e27('0x2e')](_0xf6fdfa);}};}function respondWithFilteredResult(_0x2919c7,_0x10783b){return function(_0xc70c1a){if(_0xc70c1a){var _0x165e7c=typeof _0x10783b[_0x7e27('0x2f')]===_0x7e27('0x30')&&typeof _0x10783b['limit']===_0x7e27('0x30');var _0x4875f9=_0xc70c1a[_0x7e27('0x31')];var _0x911ee=_0x165e7c?0x0:_0x10783b['offset'];var _0x11293f=_0x165e7c?_0xc70c1a[_0x7e27('0x31')]:_0x10783b[_0x7e27('0x2f')]+_0x10783b[_0x7e27('0x32')];var _0x4b76a0;if(_0x11293f>=_0x4875f9){_0x11293f=_0x4875f9;_0x4b76a0=0xc8;}else{_0x4b76a0=0xce;}_0x2919c7[_0x7e27('0x2d')](_0x4b76a0);return _0x2919c7[_0x7e27('0x33')](_0x7e27('0x34'),_0x911ee+'-'+_0x11293f+'/'+_0x4875f9)[_0x7e27('0x2e')](_0xc70c1a);}return null;};}function patchUpdates(_0x2845ce){return function(_0x434629){try{jsonpatch[_0x7e27('0x35')](_0x434629,_0x2845ce,!![]);}catch(_0x1c49e6){return BPromise[_0x7e27('0x36')](_0x1c49e6);}return _0x434629[_0x7e27('0x37')]();};}function saveUpdates(_0x1f4274,_0x15d97b){return function(_0x4a5f94){if(_0x4a5f94){return _0x4a5f94['update'](_0x1f4274)[_0x7e27('0x21')](function(_0x146fe9){return _0x146fe9;});}return null;};}function removeEntity(_0x40ac79,_0x24612f){return function(_0x189bd0){if(_0x189bd0){return _0x189bd0[_0x7e27('0x38')]()[_0x7e27('0x21')](function(){_0x40ac79[_0x7e27('0x2d')](0xcc)[_0x7e27('0x39')]();});}};}function handleEntityNotFound(_0x3ab697,_0x10d5c8){return function(_0x309f5c){if(!_0x309f5c){_0x3ab697[_0x7e27('0x2c')](0x194);}return _0x309f5c;};}function handleError(_0x3b8016,_0x3b47e1){_0x3b47e1=_0x3b47e1||0x1f4;return function(_0x1fa10d){logger[_0x7e27('0x27')](_0x1fa10d['stack']);if(_0x1fa10d[_0x7e27('0x3a')]){delete _0x1fa10d[_0x7e27('0x3a')];}_0x3b8016['status'](_0x3b47e1)[_0x7e27('0x3b')](_0x1fa10d);};}exports[_0x7e27('0x3c')]=function(_0x1ffe28,_0x3f13a4){var _0x409779={},_0x46f9d1={},_0x3bf442={'count':0x0,'rows':[]};var _0x2de54=_['map'](db[_0x7e27('0x3d')][_0x7e27('0x3e')],function(_0x393e74){return{'name':_0x393e74[_0x7e27('0x3f')],'type':_0x393e74[_0x7e27('0x40')][_0x7e27('0x41')]};});_0x46f9d1['model']=_[_0x7e27('0x42')](_0x2de54,_0x7e27('0x3a'));_0x46f9d1[_0x7e27('0x43')]=_['keys'](_0x1ffe28[_0x7e27('0x43')]);_0x46f9d1['filters']=_[_0x7e27('0x44')](_0x46f9d1[_0x7e27('0x45')],_0x46f9d1[_0x7e27('0x43')]);_0x409779[_0x7e27('0x46')]=_[_0x7e27('0x44')](_0x46f9d1[_0x7e27('0x45')],qs['fields'](_0x1ffe28[_0x7e27('0x43')][_0x7e27('0x47')]));_0x409779[_0x7e27('0x46')]=_0x409779[_0x7e27('0x46')][_0x7e27('0x48')]?_0x409779['attributes']:_0x46f9d1[_0x7e27('0x45')];if(!_0x1ffe28[_0x7e27('0x43')]['hasOwnProperty'](_0x7e27('0x49'))){_0x409779[_0x7e27('0x32')]=qs[_0x7e27('0x32')](_0x1ffe28['query'][_0x7e27('0x32')]);_0x409779['offset']=qs[_0x7e27('0x2f')](_0x1ffe28[_0x7e27('0x43')][_0x7e27('0x2f')]);}_0x409779['order']=qs[_0x7e27('0x4a')](_0x1ffe28[_0x7e27('0x43')]['sort']);_0x409779[_0x7e27('0x4b')]=qs[_0x7e27('0x4c')](_[_0x7e27('0x4d')](_0x1ffe28[_0x7e27('0x43')],_0x46f9d1[_0x7e27('0x4c')]),_0x2de54);if(_0x1ffe28[_0x7e27('0x43')][_0x7e27('0x4e')]){_0x409779[_0x7e27('0x4b')]=_[_0x7e27('0x4f')](_0x409779[_0x7e27('0x4b')],{'$or':_[_0x7e27('0x42')](_0x2de54,function(_0x333b85){if(_0x333b85[_0x7e27('0x40')]!==_0x7e27('0x50')){var _0x41a9f9={};_0x41a9f9[_0x333b85['name']]={'$like':'%'+_0x1ffe28['query'][_0x7e27('0x4e')]+'%'};return _0x41a9f9;}})});}_0x409779=_[_0x7e27('0x4f')]({},_0x409779,_0x1ffe28[_0x7e27('0x51')]);var _0x2592e1={'where':_0x409779['where']};return db[_0x7e27('0x3d')][_0x7e27('0x31')](_0x2592e1)[_0x7e27('0x21')](function(_0x330545){_0x3bf442[_0x7e27('0x31')]=_0x330545;if(_0x1ffe28[_0x7e27('0x43')][_0x7e27('0x52')]){_0x409779[_0x7e27('0x53')]=[{'all':!![]}];}return db[_0x7e27('0x3d')][_0x7e27('0x54')](_0x409779);})[_0x7e27('0x21')](function(_0x37af64){_0x3bf442[_0x7e27('0x55')]=_0x37af64;return _0x3bf442;})[_0x7e27('0x21')](respondWithFilteredResult(_0x3f13a4,_0x409779))[_0x7e27('0x2b')](handleError(_0x3f13a4,null));};exports[_0x7e27('0x56')]=function(_0x3aa6d9,_0x5afbda){var _0x57d183={'raw':!![],'where':{'id':_0x3aa6d9[_0x7e27('0x57')]['id']}},_0x3dec4c={};_0x3dec4c[_0x7e27('0x45')]=_[_0x7e27('0x58')](db[_0x7e27('0x3d')]['rawAttributes']);_0x3dec4c[_0x7e27('0x43')]=_['keys'](_0x3aa6d9[_0x7e27('0x43')]);_0x3dec4c[_0x7e27('0x4c')]=_[_0x7e27('0x44')](_0x3dec4c[_0x7e27('0x45')],_0x3dec4c[_0x7e27('0x43')]);_0x57d183[_0x7e27('0x46')]=_[_0x7e27('0x44')](_0x3dec4c[_0x7e27('0x45')],qs[_0x7e27('0x47')](_0x3aa6d9[_0x7e27('0x43')]['fields']));_0x57d183[_0x7e27('0x46')]=_0x57d183[_0x7e27('0x46')][_0x7e27('0x48')]?_0x57d183['attributes']:_0x3dec4c[_0x7e27('0x45')];if(_0x3aa6d9[_0x7e27('0x43')][_0x7e27('0x52')]){_0x57d183[_0x7e27('0x53')]=[{'all':!![]}];}_0x57d183=_[_0x7e27('0x4f')]({},_0x57d183,_0x3aa6d9[_0x7e27('0x51')]);return db[_0x7e27('0x3d')][_0x7e27('0x59')](_0x57d183)[_0x7e27('0x21')](handleEntityNotFound(_0x5afbda,null))[_0x7e27('0x21')](respondWithResult(_0x5afbda,null))['catch'](handleError(_0x5afbda,null));};exports['create']=function(_0x3a081f,_0x447bcb){return db[_0x7e27('0x3d')][_0x7e27('0x5a')](_0x3a081f[_0x7e27('0x5b')],{})[_0x7e27('0x21')](respondWithResult(_0x447bcb,0xc9))['catch'](handleError(_0x447bcb,null));};exports[_0x7e27('0x5c')]=function(_0x46fc21,_0x2a2980){if(_0x46fc21['body']['id']){delete _0x46fc21[_0x7e27('0x5b')]['id'];}return db[_0x7e27('0x3d')][_0x7e27('0x59')]({'where':{'id':_0x46fc21[_0x7e27('0x57')]['id']}})['then'](handleEntityNotFound(_0x2a2980,null))[_0x7e27('0x21')](saveUpdates(_0x46fc21[_0x7e27('0x5b')],null))[_0x7e27('0x21')](respondWithResult(_0x2a2980,null))[_0x7e27('0x2b')](handleError(_0x2a2980,null));};exports['destroy']=function(_0x4b885f,_0x497952){return db['OpenchannelMessage']['find']({'where':{'id':_0x4b885f[_0x7e27('0x57')]['id']}})[_0x7e27('0x21')](handleEntityNotFound(_0x497952,null))[_0x7e27('0x21')](removeEntity(_0x497952,null))['catch'](handleError(_0x497952,null));};exports[_0x7e27('0x5d')]=function(_0x1e29be,_0x1fd46a){return db[_0x7e27('0x3d')][_0x7e27('0x5d')]()[_0x7e27('0x21')](respondWithResult(_0x1fd46a,null))[_0x7e27('0x2b')](handleError(_0x1fd46a,null));};var interaction_log=require('../../config/logger')(_0x7e27('0x5e'));exports['accept']=function(_0x534fd9,_0x48c4e7,_0x5c4ac3){var _0x46efec={'agent':{},'channel':'openchannel'};if(_0x534fd9[_0x7e27('0x5b')]['id']){delete _0x534fd9[_0x7e27('0x5b')]['id'];}_0x534fd9[_0x7e27('0x5b')]['read']=!![];_0x534fd9[_0x7e27('0x5b')][_0x7e27('0x5f')]=moment()[_0x7e27('0x60')](_0x7e27('0x61'));_0x534fd9[_0x7e27('0x5b')][_0x7e27('0x62')]=_0x534fd9[_0x7e27('0x5b')][_0x7e27('0x62')]||_0x534fd9['user']['id'];_0x46efec[_0x7e27('0x63')]['id']=_0x534fd9['body'][_0x7e27('0x62')];return db[_0x7e27('0x3d')]['find']({'where':{'id':_0x534fd9[_0x7e27('0x57')]['id'],'UserId':null}})[_0x7e27('0x21')](handleEntityNotFound(_0x48c4e7,null))[_0x7e27('0x21')](saveUpdates(_0x534fd9[_0x7e27('0x5b')],null))[_0x7e27('0x21')](function(_0x376bdf){if(_0x376bdf){_0x46efec[_0x7e27('0x29')]=_0x376bdf['get']({'plain':!![]});return db['OpenchannelInteraction']['find']({'where':{'id':_0x376bdf[_0x7e27('0x64')]}});}return null;})[_0x7e27('0x21')](handleEntityNotFound(_0x48c4e7,null))['then'](function(_0x5906c7){if(_0x5906c7){return _0x5906c7[_0x7e27('0x5c')]({'UserId':_0x534fd9['body'][_0x7e27('0x62')],'read1stAt':_['isNil'](_0x5906c7['read1stAt'])?moment()[_0x7e27('0x60')]('YYYY-MM-DD\x20HH:mm:ss'):undefined});}return null;})[_0x7e27('0x21')](function(_0x4e0fd6){if(_0x4e0fd6){_0x46efec[_0x7e27('0x65')]=_0x4e0fd6[_0x7e27('0x66')]({'plain':!![]});interaction_log[_0x7e27('0x22')](_0x7e27('0x67'),_0x534fd9[_0x7e27('0x68')]['id'],_0x534fd9[_0x7e27('0x68')][_0x7e27('0x3a')],_0x534fd9[_0x7e27('0x68')][_0x7e27('0x69')],_0x46efec[_0x7e27('0x65')]['id'],_0x534fd9[_0x7e27('0x5b')]?JSON[_0x7e27('0x26')](_0x534fd9[_0x7e27('0x5b')]):_0x7e27('0x6a'));return respondWithRpcPromise(_0x7e27('0x6b'),_0x7e27('0x6c'),_0x46efec);}return null;})['then'](function(_0x464df7){var _0x3482a9=_0x7e27('0x6d')+_0x464df7[_0x7e27('0x29')][_0x7e27('0x6e')];return db['sequelize'][_0x7e27('0x43')](_0x3482a9,{'type':db['Sequelize'][_0x7e27('0x6f')]['SELECT'],'raw':!![]})[_0x7e27('0x21')](function(_0x5a86ee){return _0x5a86ee;});})[_0x7e27('0x21')](function(_0x3f8600){if(_0x3f8600){_0x46efec[_0x7e27('0x29')][_0x7e27('0x70')]=_0x3f8600[0x0];if(!_0x534fd9[_0x7e27('0x5b')][_0x7e27('0x62')])return;return db['User'][_0x7e27('0x59')]({'where':{'id':_0x534fd9[_0x7e27('0x5b')][_0x7e27('0x62')],'role':_0x7e27('0x63')},'attributes':['id',_0x7e27('0x3a'),_0x7e27('0x71'),_0x7e27('0x72'),_0x7e27('0x73')],'raw':!![]});}return null;})[_0x7e27('0x21')](function(_0x4537f6){if(!_0x4537f6)return null;_0x46efec[_0x7e27('0x29')]['agent']=_0x4537f6;return _0x46efec;})[_0x7e27('0x21')](function(_0x5b1865){if(_0x5b1865){if(_0x534fd9[_0x7e27('0x5b')][_0x7e27('0x74')]){_0x46efec[_0x7e27('0x29')][_0x7e27('0x75')]=util['format']('SIP/%s',_0x534fd9[_0x7e27('0x68')][_0x7e27('0x3a')]);_0x46efec['message'][_0x7e27('0x76')]=_0x46efec[_0x7e27('0x76')];_0x46efec[_0x7e27('0x29')][_0x7e27('0x77')]=_0x46efec[_0x7e27('0x76')];_0x46efec[_0x7e27('0x29')][_0x7e27('0x78')]=_0x7e27('0x79');return respondWithRpcPromise('EventManager',_0x7e27('0x7a'),{'event':_0x7e27('0x7b'),'message':_0x46efec['message']},client9002)[_0x7e27('0x21')](function(){return _0x46efec;});}return _0x46efec;}return null;})[_0x7e27('0x21')](respondWithResult(_0x48c4e7,null))['catch'](handleError(_0x48c4e7,null));};var interaction_log=require(_0x7e27('0x12'))(_0x7e27('0x5e'));exports[_0x7e27('0x36')]=function(_0x18110e,_0x5a5ac5,_0x5e2a7c){var _0x5492ff={'agent':{},'channel':_0x7e27('0x7c')};if(_0x18110e[_0x7e27('0x5b')]['id']){delete _0x18110e[_0x7e27('0x5b')]['id'];}_0x18110e[_0x7e27('0x5b')][_0x7e27('0x62')]=_0x18110e['body'][_0x7e27('0x62')]||_0x18110e[_0x7e27('0x68')]['id'];_0x5492ff[_0x7e27('0x63')]['id']=_0x18110e[_0x7e27('0x5b')][_0x7e27('0x62')];return db[_0x7e27('0x3d')][_0x7e27('0x59')]({'where':{'id':_0x18110e[_0x7e27('0x57')]['id'],'UserId':null}})[_0x7e27('0x21')](handleEntityNotFound(_0x5a5ac5,null))[_0x7e27('0x21')](function(_0x41b157){if(_0x41b157){_0x5492ff[_0x7e27('0x29')]=_0x41b157[_0x7e27('0x66')]({'plain':!![]});return db['OpenchannelInteraction'][_0x7e27('0x59')]({'where':{'id':_0x41b157[_0x7e27('0x64')]}});}return null;})['then'](handleEntityNotFound(_0x5a5ac5,null))[_0x7e27('0x21')](function(_0x84fefc){if(_0x84fefc){_0x5492ff[_0x7e27('0x65')]=_0x84fefc['get']({'plain':!![]});interaction_log['info']('[OPENCHANNELMESSAGE:REJECT]\x20id=%s\x20name=%s\x20role=%s\x20interaction=%s\x20body=%s',_0x18110e[_0x7e27('0x68')]['id'],_0x18110e[_0x7e27('0x68')][_0x7e27('0x3a')],_0x18110e[_0x7e27('0x68')][_0x7e27('0x69')],_0x5492ff['interaction']['id'],_0x18110e[_0x7e27('0x5b')]?JSON['stringify'](_0x18110e[_0x7e27('0x5b')]):_0x7e27('0x6a'));return respondWithRpcPromise(_0x7e27('0x7d'),_0x7e27('0x7e'),_0x5492ff);}return null;})[_0x7e27('0x21')](function(_0x19ef31){var _0x3d0e87=_0x7e27('0x6d')+_0x19ef31[_0x7e27('0x29')]['ContactId'];return db[_0x7e27('0x7f')][_0x7e27('0x43')](_0x3d0e87,{'type':db[_0x7e27('0x80')][_0x7e27('0x6f')]['SELECT'],'raw':!![]})[_0x7e27('0x21')](function(_0x2fde43){return _0x2fde43;});})[_0x7e27('0x21')](function(_0x316889){if(_0x316889){_0x5492ff[_0x7e27('0x29')][_0x7e27('0x70')]=_0x316889[0x0];if(!_0x18110e[_0x7e27('0x5b')]['UserId'])return;return db[_0x7e27('0x81')][_0x7e27('0x59')]({'where':{'id':_0x18110e[_0x7e27('0x5b')][_0x7e27('0x62')],'role':'agent'},'attributes':['id','name',_0x7e27('0x71'),_0x7e27('0x72'),_0x7e27('0x73')],'raw':!![]});}return null;})['then'](function(_0x28b469){if(!_0x28b469)return null;_0x5492ff[_0x7e27('0x29')]['agent']=_0x28b469;return _0x5492ff;})['then'](function(_0x15ff94){if(_0x15ff94){_0x15ff94[_0x7e27('0x29')][_0x7e27('0x75')]=util[_0x7e27('0x60')](_0x7e27('0x82'),_0x18110e[_0x7e27('0x68')]['name']);_0x15ff94['message']['channel']=_0x5492ff[_0x7e27('0x76')];_0x15ff94['message']['motionChannel']=_0x5492ff[_0x7e27('0x76')];_0x15ff94['message']['event']=_0x7e27('0x36');respondWithRpcPromise(_0x7e27('0x7a'),'EventManager',{'event':_0x7e27('0x83'),'message':_0x15ff94['message']},client9002);return _0x5492ff;}return null;})['then'](respondWithResult(_0x5a5ac5,null))[_0x7e27('0x2b')](handleError(_0x5a5ac5,null));}; \ No newline at end of file +var _0x3bf5=['fast-json-patch','request-promise','bluebird','path','sox','to-csv','lodash','squel','crypto','jsforce','querystring','papaparse','../../components/auth/service','../../components/parsers/qs','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/license/util','redis','defaults','localhost','./openchannelMessage.socket','register','client','http','info','request\x20sent','debug','OpenchannelMessage,\x20%s,\x20%s,\x20%s','error','code','OpenchannelMessage,\x20%s,\x20%s','message','result','catch','sendStatus','status','offset','undefined','limit','set','Content-Range','json','reject','save','update','then','destroy','stack','name','send','index','map','OpenchannelMessage','rawAttributes','fieldName','type','key','query','filters','intersection','model','attributes','fields','hasOwnProperty','order','sort','where','filter','merge','options','count','include','findAll','rows','show','params','keys','length','includeAll','find','create','body','describe','openchannel-interactions','openchannel','readAt','format','YYYY-MM-DD\x20HH:mm:ss','UserId','user','agent','get','OpenchannelInteraction','isNil','read1stAt','[OPENCHANNELMESSAGE:ACCEPT]\x20id=%s\x20name=%s\x20role=%s\x20interaction=%s\x20body=%s','interaction','stringify','null','acceptMessage','SELECT\x20*\x20FROM\x20cm_contacts\x20WHERE\x20id\x20=\x20','ContactId','QueryTypes','SELECT','contact','User','fullname','email','internal','manual','interface','SIP/%s','motionChannel','channel','accept','EventManager','acceptmessage','OpenchannelInteractionId','[OPENCHANNELMESSAGE:REJECT]\x20id=%s\x20name=%s\x20role=%s\x20interaction=%s\x20body=%s','role','RejectMessage','rejectMessage','sequelize','event','eml-format','rimraf'];(function(_0x206816,_0x39799d){var _0x303418=function(_0x4dacce){while(--_0x4dacce){_0x206816['push'](_0x206816['shift']());}};_0x303418(++_0x39799d);}(_0x3bf5,0x17e));var _0x53bf=function(_0x46428c,_0x20ab75){_0x46428c=_0x46428c-0x0;var _0x16a677=_0x3bf5[_0x46428c];return _0x16a677;};'use strict';var emlformat=require(_0x53bf('0x0'));var rimraf=require(_0x53bf('0x1'));var zipdir=require('zip-dir');var jsonpatch=require(_0x53bf('0x2'));var rp=require(_0x53bf('0x3'));var moment=require('moment');var BPromise=require(_0x53bf('0x4'));var Mustache=require('mustache');var util=require('util');var path=require(_0x53bf('0x5'));var sox=require(_0x53bf('0x6'));var csv=require(_0x53bf('0x7'));var ejs=require('ejs');var fs=require('fs');var fs_extra=require('fs-extra');var _=require(_0x53bf('0x8'));var squel=require(_0x53bf('0x9'));var crypto=require(_0x53bf('0xa'));var jsforce=require(_0x53bf('0xb'));var deskjs=require('desk.js');var toCsv=require(_0x53bf('0x7'));var querystring=require(_0x53bf('0xc'));var Papa=require(_0x53bf('0xd'));var Redis=require('ioredis');var authService=require(_0x53bf('0xe'));var qs=require(_0x53bf('0xf'));var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0x53bf('0x10'));var logger=require(_0x53bf('0x11'))(_0x53bf('0x12'));var utils=require(_0x53bf('0x13'));var config=require('../../config/environment');var licenseUtil=require(_0x53bf('0x14'));var db=require('../../mysqldb')['db'];config[_0x53bf('0x15')]=_[_0x53bf('0x16')](config[_0x53bf('0x15')],{'host':_0x53bf('0x17'),'port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config[_0x53bf('0x15')]));require(_0x53bf('0x18'))[_0x53bf('0x19')](socket);var jayson=require('jayson/promise');var client=jayson[_0x53bf('0x1a')][_0x53bf('0x1b')]({'port':0x232c});var client9002=jayson[_0x53bf('0x1a')]['http']({'port':0x232a});function respondWithRpcPromise(_0x19dd62,_0x5b7fbe,_0x2804b1,_0x46c7a5){return new BPromise(function(_0x1c7787,_0x2fc977){var _0x382570=_0x46c7a5||client;return _0x382570['request'](_0x19dd62,_0x2804b1)['then'](function(_0x383bfd){logger[_0x53bf('0x1c')]('OpenchannelMessage,\x20%s,\x20%s',_0x5b7fbe,_0x53bf('0x1d'));logger[_0x53bf('0x1e')](_0x53bf('0x1f'),_0x5b7fbe,'request\x20sent',JSON['stringify'](_0x383bfd));if(_0x383bfd[_0x53bf('0x20')]){if(_0x383bfd[_0x53bf('0x20')][_0x53bf('0x21')]===0x1f4){logger[_0x53bf('0x20')](_0x53bf('0x22'),_0x5b7fbe,_0x383bfd[_0x53bf('0x20')]['message']);return _0x2fc977(_0x383bfd[_0x53bf('0x20')][_0x53bf('0x23')]);}logger['error'](_0x53bf('0x22'),_0x5b7fbe,_0x383bfd['error'][_0x53bf('0x23')]);return _0x1c7787(_0x383bfd[_0x53bf('0x20')][_0x53bf('0x23')]);}else{logger[_0x53bf('0x1c')](_0x53bf('0x22'),_0x5b7fbe,_0x53bf('0x1d'));_0x1c7787(_0x383bfd[_0x53bf('0x24')][_0x53bf('0x23')]);}})[_0x53bf('0x25')](function(_0x23807d){logger[_0x53bf('0x20')]('OpenchannelMessage,\x20%s,\x20%s',_0x5b7fbe,_0x23807d);_0x2fc977(_0x23807d);});});}function respondWithStatusCode(_0x380451,_0x20b5ed){_0x20b5ed=_0x20b5ed||0xcc;return function(_0x58005c){if(_0x58005c){return _0x380451[_0x53bf('0x26')](_0x20b5ed);}return _0x380451[_0x53bf('0x27')](_0x20b5ed)['end']();};}function respondWithResult(_0x35eccb,_0x2b5a6e){_0x2b5a6e=_0x2b5a6e||0xc8;return function(_0x428ec1){if(_0x428ec1){return _0x35eccb[_0x53bf('0x27')](_0x2b5a6e)['json'](_0x428ec1);}};}function respondWithFilteredResult(_0x2b643e,_0xf18bd5){return function(_0x53de98){if(_0x53de98){var _0x46555b=typeof _0xf18bd5[_0x53bf('0x28')]===_0x53bf('0x29')&&typeof _0xf18bd5[_0x53bf('0x2a')]===_0x53bf('0x29');var _0x44d9dd=_0x53de98['count'];var _0x10c41f=_0x46555b?0x0:_0xf18bd5[_0x53bf('0x28')];var _0x111ce0=_0x46555b?_0x53de98['count']:_0xf18bd5[_0x53bf('0x28')]+_0xf18bd5['limit'];var _0x583830;if(_0x111ce0>=_0x44d9dd){_0x111ce0=_0x44d9dd;_0x583830=0xc8;}else{_0x583830=0xce;}_0x2b643e[_0x53bf('0x27')](_0x583830);return _0x2b643e[_0x53bf('0x2b')](_0x53bf('0x2c'),_0x10c41f+'-'+_0x111ce0+'/'+_0x44d9dd)[_0x53bf('0x2d')](_0x53de98);}return null;};}function patchUpdates(_0x308eb1){return function(_0x5f61d7){try{jsonpatch['apply'](_0x5f61d7,_0x308eb1,!![]);}catch(_0x268809){return BPromise[_0x53bf('0x2e')](_0x268809);}return _0x5f61d7[_0x53bf('0x2f')]();};}function saveUpdates(_0x4b9bfc,_0x1fbcac){return function(_0x415777){if(_0x415777){return _0x415777[_0x53bf('0x30')](_0x4b9bfc)[_0x53bf('0x31')](function(_0x51746f){return _0x51746f;});}return null;};}function removeEntity(_0x39a2a0,_0xd0f0f8){return function(_0x4017c4){if(_0x4017c4){return _0x4017c4[_0x53bf('0x32')]()[_0x53bf('0x31')](function(){_0x39a2a0[_0x53bf('0x27')](0xcc)['end']();});}};}function handleEntityNotFound(_0x4109ad,_0xcb2dd5){return function(_0x140893){if(!_0x140893){_0x4109ad[_0x53bf('0x26')](0x194);}return _0x140893;};}function handleError(_0x1d40fa,_0x580e01){_0x580e01=_0x580e01||0x1f4;return function(_0xbd1b95){logger['error'](_0xbd1b95[_0x53bf('0x33')]);if(_0xbd1b95['name']){delete _0xbd1b95[_0x53bf('0x34')];}_0x1d40fa['status'](_0x580e01)[_0x53bf('0x35')](_0xbd1b95);};}exports[_0x53bf('0x36')]=function(_0x1971a2,_0x487d2b){var _0x378c64={},_0x2675a8={},_0x51f551={'count':0x0,'rows':[]};var _0x33ca38=_[_0x53bf('0x37')](db[_0x53bf('0x38')][_0x53bf('0x39')],function(_0x30887a){return{'name':_0x30887a[_0x53bf('0x3a')],'type':_0x30887a[_0x53bf('0x3b')][_0x53bf('0x3c')]};});_0x2675a8['model']=_[_0x53bf('0x37')](_0x33ca38,_0x53bf('0x34'));_0x2675a8[_0x53bf('0x3d')]=_['keys'](_0x1971a2['query']);_0x2675a8[_0x53bf('0x3e')]=_[_0x53bf('0x3f')](_0x2675a8[_0x53bf('0x40')],_0x2675a8[_0x53bf('0x3d')]);_0x378c64[_0x53bf('0x41')]=_['intersection'](_0x2675a8[_0x53bf('0x40')],qs[_0x53bf('0x42')](_0x1971a2[_0x53bf('0x3d')][_0x53bf('0x42')]));_0x378c64[_0x53bf('0x41')]=_0x378c64['attributes']['length']?_0x378c64[_0x53bf('0x41')]:_0x2675a8[_0x53bf('0x40')];if(!_0x1971a2['query'][_0x53bf('0x43')]('nolimit')){_0x378c64['limit']=qs['limit'](_0x1971a2[_0x53bf('0x3d')][_0x53bf('0x2a')]);_0x378c64['offset']=qs[_0x53bf('0x28')](_0x1971a2['query']['offset']);}_0x378c64[_0x53bf('0x44')]=qs[_0x53bf('0x45')](_0x1971a2[_0x53bf('0x3d')]['sort']);_0x378c64[_0x53bf('0x46')]=qs['filters'](_['pick'](_0x1971a2[_0x53bf('0x3d')],_0x2675a8['filters']),_0x33ca38);if(_0x1971a2[_0x53bf('0x3d')][_0x53bf('0x47')]){_0x378c64[_0x53bf('0x46')]=_[_0x53bf('0x48')](_0x378c64[_0x53bf('0x46')],{'$or':_[_0x53bf('0x37')](_0x33ca38,function(_0x4f1495){if(_0x4f1495['type']!=='VIRTUAL'){var _0x27deb1={};_0x27deb1[_0x4f1495['name']]={'$like':'%'+_0x1971a2[_0x53bf('0x3d')][_0x53bf('0x47')]+'%'};return _0x27deb1;}})});}_0x378c64=_['merge']({},_0x378c64,_0x1971a2[_0x53bf('0x49')]);var _0xb9fea8={'where':_0x378c64['where']};return db[_0x53bf('0x38')]['count'](_0xb9fea8)[_0x53bf('0x31')](function(_0x4bb5ee){_0x51f551[_0x53bf('0x4a')]=_0x4bb5ee;if(_0x1971a2[_0x53bf('0x3d')]['includeAll']){_0x378c64[_0x53bf('0x4b')]=[{'all':!![]}];}return db[_0x53bf('0x38')][_0x53bf('0x4c')](_0x378c64);})[_0x53bf('0x31')](function(_0x39f22b){_0x51f551[_0x53bf('0x4d')]=_0x39f22b;return _0x51f551;})[_0x53bf('0x31')](respondWithFilteredResult(_0x487d2b,_0x378c64))[_0x53bf('0x25')](handleError(_0x487d2b,null));};exports[_0x53bf('0x4e')]=function(_0x2ef765,_0x38c9f8){var _0x570d03={'raw':!![],'where':{'id':_0x2ef765[_0x53bf('0x4f')]['id']}},_0x401382={};_0x401382['model']=_[_0x53bf('0x50')](db[_0x53bf('0x38')][_0x53bf('0x39')]);_0x401382['query']=_[_0x53bf('0x50')](_0x2ef765[_0x53bf('0x3d')]);_0x401382[_0x53bf('0x3e')]=_[_0x53bf('0x3f')](_0x401382[_0x53bf('0x40')],_0x401382[_0x53bf('0x3d')]);_0x570d03[_0x53bf('0x41')]=_[_0x53bf('0x3f')](_0x401382['model'],qs['fields'](_0x2ef765[_0x53bf('0x3d')][_0x53bf('0x42')]));_0x570d03[_0x53bf('0x41')]=_0x570d03[_0x53bf('0x41')][_0x53bf('0x51')]?_0x570d03[_0x53bf('0x41')]:_0x401382['model'];if(_0x2ef765[_0x53bf('0x3d')][_0x53bf('0x52')]){_0x570d03['include']=[{'all':!![]}];}_0x570d03=_[_0x53bf('0x48')]({},_0x570d03,_0x2ef765['options']);return db[_0x53bf('0x38')][_0x53bf('0x53')](_0x570d03)[_0x53bf('0x31')](handleEntityNotFound(_0x38c9f8,null))[_0x53bf('0x31')](respondWithResult(_0x38c9f8,null))[_0x53bf('0x25')](handleError(_0x38c9f8,null));};exports[_0x53bf('0x54')]=function(_0x36b36e,_0xc75d72){return db[_0x53bf('0x38')][_0x53bf('0x54')](_0x36b36e['body'],{})[_0x53bf('0x31')](respondWithResult(_0xc75d72,0xc9))[_0x53bf('0x25')](handleError(_0xc75d72,null));};exports[_0x53bf('0x30')]=function(_0x450a08,_0x34957c){if(_0x450a08[_0x53bf('0x55')]['id']){delete _0x450a08['body']['id'];}return db['OpenchannelMessage'][_0x53bf('0x53')]({'where':{'id':_0x450a08[_0x53bf('0x4f')]['id']}})[_0x53bf('0x31')](handleEntityNotFound(_0x34957c,null))[_0x53bf('0x31')](saveUpdates(_0x450a08[_0x53bf('0x55')],null))[_0x53bf('0x31')](respondWithResult(_0x34957c,null))['catch'](handleError(_0x34957c,null));};exports[_0x53bf('0x32')]=function(_0x1ee1d5,_0x1e003e){return db[_0x53bf('0x38')][_0x53bf('0x53')]({'where':{'id':_0x1ee1d5[_0x53bf('0x4f')]['id']}})[_0x53bf('0x31')](handleEntityNotFound(_0x1e003e,null))['then'](removeEntity(_0x1e003e,null))['catch'](handleError(_0x1e003e,null));};exports[_0x53bf('0x56')]=function(_0x1ff5ef,_0x162502){return db[_0x53bf('0x38')]['describe']()[_0x53bf('0x31')](respondWithResult(_0x162502,null))[_0x53bf('0x25')](handleError(_0x162502,null));};var interaction_log=require(_0x53bf('0x11'))(_0x53bf('0x57'));exports['accept']=function(_0x542ddb,_0x57be5e,_0x50aafc){var _0x7bb73={'agent':{},'channel':_0x53bf('0x58')};if(_0x542ddb[_0x53bf('0x55')]['id']){delete _0x542ddb[_0x53bf('0x55')]['id'];}_0x542ddb[_0x53bf('0x55')]['read']=!![];_0x542ddb[_0x53bf('0x55')][_0x53bf('0x59')]=moment()[_0x53bf('0x5a')](_0x53bf('0x5b'));_0x542ddb[_0x53bf('0x55')][_0x53bf('0x5c')]=_0x542ddb[_0x53bf('0x55')][_0x53bf('0x5c')]||_0x542ddb[_0x53bf('0x5d')]['id'];_0x7bb73[_0x53bf('0x5e')]['id']=_0x542ddb[_0x53bf('0x55')][_0x53bf('0x5c')];return db[_0x53bf('0x38')][_0x53bf('0x53')]({'where':{'id':_0x542ddb[_0x53bf('0x4f')]['id'],'UserId':null}})['then'](handleEntityNotFound(_0x57be5e,null))[_0x53bf('0x31')](saveUpdates(_0x542ddb['body'],null))[_0x53bf('0x31')](function(_0x4be4de){if(_0x4be4de){_0x7bb73[_0x53bf('0x23')]=_0x4be4de[_0x53bf('0x5f')]({'plain':!![]});return db[_0x53bf('0x60')][_0x53bf('0x53')]({'where':{'id':_0x4be4de['OpenchannelInteractionId']}});}return null;})[_0x53bf('0x31')](handleEntityNotFound(_0x57be5e,null))[_0x53bf('0x31')](function(_0x30e192){if(_0x30e192){return _0x30e192[_0x53bf('0x30')]({'UserId':_0x542ddb[_0x53bf('0x55')]['UserId'],'read1stAt':_[_0x53bf('0x61')](_0x30e192[_0x53bf('0x62')])?moment()[_0x53bf('0x5a')](_0x53bf('0x5b')):undefined});}return null;})[_0x53bf('0x31')](function(_0xbdc28e){if(_0xbdc28e){_0x7bb73['interaction']=_0xbdc28e['get']({'plain':!![]});interaction_log[_0x53bf('0x1c')](_0x53bf('0x63'),_0x542ddb[_0x53bf('0x5d')]['id'],_0x542ddb[_0x53bf('0x5d')][_0x53bf('0x34')],_0x542ddb[_0x53bf('0x5d')]['role'],_0x7bb73[_0x53bf('0x64')]['id'],_0x542ddb[_0x53bf('0x55')]?JSON[_0x53bf('0x65')](_0x542ddb[_0x53bf('0x55')]):_0x53bf('0x66'));return respondWithRpcPromise('AcceptMessage',_0x53bf('0x67'),_0x7bb73);}return null;})[_0x53bf('0x31')](function(_0xd246ec){var _0x106249=_0x53bf('0x68')+_0xd246ec['message'][_0x53bf('0x69')];return db['sequelize'][_0x53bf('0x3d')](_0x106249,{'type':db['Sequelize'][_0x53bf('0x6a')][_0x53bf('0x6b')],'raw':!![]})['then'](function(_0x25b228){return _0x25b228;});})[_0x53bf('0x31')](function(_0x561e55){if(_0x561e55){_0x7bb73[_0x53bf('0x23')][_0x53bf('0x6c')]=_0x561e55[0x0];if(!_0x542ddb[_0x53bf('0x55')][_0x53bf('0x5c')])return;return db[_0x53bf('0x6d')][_0x53bf('0x53')]({'where':{'id':_0x542ddb['body'][_0x53bf('0x5c')],'role':_0x53bf('0x5e')},'attributes':['id',_0x53bf('0x34'),_0x53bf('0x6e'),_0x53bf('0x6f'),_0x53bf('0x70')],'raw':!![]});}return null;})['then'](function(_0x2cb640){if(!_0x2cb640)return null;_0x7bb73[_0x53bf('0x23')][_0x53bf('0x5e')]=_0x2cb640;return _0x7bb73;})['then'](function(_0x5b19b2){if(_0x5b19b2){if(_0x542ddb[_0x53bf('0x55')][_0x53bf('0x71')]){_0x7bb73[_0x53bf('0x23')][_0x53bf('0x72')]=util['format'](_0x53bf('0x73'),_0x542ddb[_0x53bf('0x5d')][_0x53bf('0x34')]);_0x7bb73['message']['channel']=_0x7bb73['channel'];_0x7bb73[_0x53bf('0x23')][_0x53bf('0x74')]=_0x7bb73[_0x53bf('0x75')];_0x7bb73['message']['event']=_0x53bf('0x76');return respondWithRpcPromise(_0x53bf('0x77'),_0x53bf('0x77'),{'event':_0x53bf('0x78'),'message':_0x7bb73[_0x53bf('0x23')]},client9002)['then'](function(){return _0x7bb73;});}return _0x7bb73;}return null;})[_0x53bf('0x31')](respondWithResult(_0x57be5e,null))[_0x53bf('0x25')](handleError(_0x57be5e,null));};var interaction_log=require(_0x53bf('0x11'))(_0x53bf('0x57'));exports['reject']=function(_0x572d31,_0x32f3fc,_0x1d746d){var _0x52616b={'agent':{},'channel':_0x53bf('0x58')};if(_0x572d31[_0x53bf('0x55')]['id']){delete _0x572d31[_0x53bf('0x55')]['id'];}_0x572d31[_0x53bf('0x55')][_0x53bf('0x5c')]=_0x572d31[_0x53bf('0x55')][_0x53bf('0x5c')]||_0x572d31[_0x53bf('0x5d')]['id'];_0x52616b['agent']['id']=_0x572d31['body'][_0x53bf('0x5c')];return db[_0x53bf('0x38')][_0x53bf('0x53')]({'where':{'id':_0x572d31['params']['id'],'UserId':null}})[_0x53bf('0x31')](handleEntityNotFound(_0x32f3fc,null))[_0x53bf('0x31')](function(_0x365a67){if(_0x365a67){_0x52616b['message']=_0x365a67[_0x53bf('0x5f')]({'plain':!![]});return db[_0x53bf('0x60')][_0x53bf('0x53')]({'where':{'id':_0x365a67[_0x53bf('0x79')]}});}return null;})[_0x53bf('0x31')](handleEntityNotFound(_0x32f3fc,null))['then'](function(_0xbb6f14){if(_0xbb6f14){_0x52616b[_0x53bf('0x64')]=_0xbb6f14[_0x53bf('0x5f')]({'plain':!![]});interaction_log['info'](_0x53bf('0x7a'),_0x572d31[_0x53bf('0x5d')]['id'],_0x572d31[_0x53bf('0x5d')][_0x53bf('0x34')],_0x572d31[_0x53bf('0x5d')][_0x53bf('0x7b')],_0x52616b[_0x53bf('0x64')]['id'],_0x572d31['body']?JSON[_0x53bf('0x65')](_0x572d31[_0x53bf('0x55')]):_0x53bf('0x66'));return respondWithRpcPromise(_0x53bf('0x7c'),_0x53bf('0x7d'),_0x52616b);}return null;})[_0x53bf('0x31')](function(_0x59256e){var _0x2ff7e7=_0x53bf('0x68')+_0x59256e[_0x53bf('0x23')]['ContactId'];return db[_0x53bf('0x7e')][_0x53bf('0x3d')](_0x2ff7e7,{'type':db['Sequelize'][_0x53bf('0x6a')][_0x53bf('0x6b')],'raw':!![]})[_0x53bf('0x31')](function(_0x11cd40){return _0x11cd40;});})['then'](function(_0x4f8c0a){if(_0x4f8c0a){_0x52616b['message'][_0x53bf('0x6c')]=_0x4f8c0a[0x0];if(!_0x572d31['body'][_0x53bf('0x5c')])return;return db[_0x53bf('0x6d')][_0x53bf('0x53')]({'where':{'id':_0x572d31[_0x53bf('0x55')][_0x53bf('0x5c')],'role':_0x53bf('0x5e')},'attributes':['id',_0x53bf('0x34'),_0x53bf('0x6e'),_0x53bf('0x6f'),_0x53bf('0x70')],'raw':!![]});}return null;})[_0x53bf('0x31')](function(_0x1a74d8){if(!_0x1a74d8)return null;_0x52616b[_0x53bf('0x23')][_0x53bf('0x5e')]=_0x1a74d8;return _0x52616b;})[_0x53bf('0x31')](function(_0x6a788a){if(_0x6a788a){_0x6a788a['message'][_0x53bf('0x72')]=util[_0x53bf('0x5a')](_0x53bf('0x73'),_0x572d31[_0x53bf('0x5d')][_0x53bf('0x34')]);_0x6a788a[_0x53bf('0x23')][_0x53bf('0x75')]=_0x52616b[_0x53bf('0x75')];_0x6a788a[_0x53bf('0x23')][_0x53bf('0x74')]=_0x52616b[_0x53bf('0x75')];_0x6a788a[_0x53bf('0x23')][_0x53bf('0x7f')]='reject';respondWithRpcPromise(_0x53bf('0x77'),_0x53bf('0x77'),{'event':'rejectmessage','message':_0x6a788a[_0x53bf('0x23')]},client9002);return _0x52616b;}return null;})[_0x53bf('0x31')](respondWithResult(_0x32f3fc,null))[_0x53bf('0x25')](handleError(_0x32f3fc,null));}; \ No newline at end of file diff --git a/server/api/openchannelMessage/openchannelMessage.events.js b/server/api/openchannelMessage/openchannelMessage.events.js index 581c298..df90d42 100644 --- a/server/api/openchannelMessage/openchannelMessage.events.js +++ b/server/api/openchannelMessage/openchannelMessage.events.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x2c94=['update','remove','emit','hook','exports','../../mysqldb','OpenchannelMessage','setMaxListeners'];(function(_0x409908,_0x4e336a){var _0x4aa217=function(_0x2d809c){while(--_0x2d809c){_0x409908['push'](_0x409908['shift']());}};_0x4aa217(++_0x4e336a);}(_0x2c94,0x19d));var _0x42c9=function(_0x4c5013,_0x4198a1){_0x4c5013=_0x4c5013-0x0;var _0x2d1a74=_0x2c94[_0x4c5013];return _0x2d1a74;};'use strict';var EventEmitter=require('events');var OpenchannelMessage=require(_0x42c9('0x0'))['db'][_0x42c9('0x1')];var OpenchannelMessageEvents=new EventEmitter();OpenchannelMessageEvents[_0x42c9('0x2')](0x0);var events={'afterCreate':'save','afterUpdate':_0x42c9('0x3'),'afterDestroy':_0x42c9('0x4')};function emitEvent(_0x1d9a27){return function(_0x5b5262,_0x4fd0c2,_0x4a6542){OpenchannelMessageEvents[_0x42c9('0x5')](_0x1d9a27+':'+_0x5b5262['id'],_0x5b5262);OpenchannelMessageEvents[_0x42c9('0x5')](_0x1d9a27,_0x5b5262);_0x4a6542(null);};}for(var e in events){if(events['hasOwnProperty'](e)){var event=events[e];OpenchannelMessage[_0x42c9('0x6')](e,emitEvent(event));}}module[_0x42c9('0x7')]=OpenchannelMessageEvents; \ No newline at end of file +var _0xbe41=['emit','hasOwnProperty','hook','exports','events','OpenchannelMessage','setMaxListeners','save','update'];(function(_0x593ee6,_0xded7e1){var _0x546d47=function(_0x3ce2f5){while(--_0x3ce2f5){_0x593ee6['push'](_0x593ee6['shift']());}};_0x546d47(++_0xded7e1);}(_0xbe41,0x199));var _0x1be4=function(_0x31aeb7,_0xec1fda){_0x31aeb7=_0x31aeb7-0x0;var _0x7cc086=_0xbe41[_0x31aeb7];return _0x7cc086;};'use strict';var EventEmitter=require(_0x1be4('0x0'));var OpenchannelMessage=require('../../mysqldb')['db'][_0x1be4('0x1')];var OpenchannelMessageEvents=new EventEmitter();OpenchannelMessageEvents[_0x1be4('0x2')](0x0);var events={'afterCreate':_0x1be4('0x3'),'afterUpdate':_0x1be4('0x4'),'afterDestroy':'remove'};function emitEvent(_0x2a1c1c){return function(_0x597f66,_0x53b70b,_0x3e7dde){OpenchannelMessageEvents[_0x1be4('0x5')](_0x2a1c1c+':'+_0x597f66['id'],_0x597f66);OpenchannelMessageEvents[_0x1be4('0x5')](_0x2a1c1c,_0x597f66);_0x3e7dde(null);};}for(var e in events){if(events[_0x1be4('0x6')](e)){var event=events[e];OpenchannelMessage[_0x1be4('0x7')](e,emitEvent(event));}}module[_0x1be4('0x8')]=OpenchannelMessageEvents; \ No newline at end of file diff --git a/server/api/openchannelMessage/openchannelMessage.model.js b/server/api/openchannelMessage/openchannelMessage.model.js index 2c42d29..a57fd60 100644 --- a/server/api/openchannelMessage/openchannelMessage.model.js +++ b/server/api/openchannelMessage/openchannelMessage.model.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xe97d=['api','moment','path','../../config/environment','OpenchannelMessage','fti_openchannel_messages','body','FULLTEXT','get','direction','toLowerCase','out','secret','isNil','OpenchannelInteraction','then','update','catch','error','CmContact','describe','OpenchannelAccount','find','OpenchannelAccountId','Interactions','OpenchannelInteractionId','Contact','replyUri','info','OpenchannelMessage,\x20%s,\x20%s','afterCreate','omit','POST','format','Message\x20%d\x20forwarded\x20to\x20%s','threadId','inspect','finally','utf8mb4','utf8mb4_unicode_ci','util','../../config/logger'];(function(_0x4d6a87,_0x172c3d){var _0x5b09ac=function(_0x402705){while(--_0x402705){_0x4d6a87['push'](_0x4d6a87['shift']());}};_0x5b09ac(++_0x172c3d);}(_0xe97d,0x1cc));var _0xde97=function(_0x6a621a,_0xf273aa){_0x6a621a=_0x6a621a-0x0;var _0x50bba5=_0xe97d[_0x6a621a];return _0x50bba5;};'use strict';var _=require('lodash');var util=require(_0xde97('0x0'));var logger=require(_0xde97('0x1'))(_0xde97('0x2'));var moment=require(_0xde97('0x3'));var BPromise=require('bluebird');var rp=require('request-promise');var fs=require('fs');var path=require(_0xde97('0x4'));var rimraf=require('rimraf');var config=require(_0xde97('0x5'));var attributes=require('./openchannelMessage.attributes');module['exports']=function(_0x2b1fa7,_0x1c29c1){return _0x2b1fa7['define'](_0xde97('0x6'),attributes,{'tableName':'openchannel_messages','paranoid':![],'indexes':[{'name':_0xde97('0x7'),'fields':[_0xde97('0x8')],'type':_0xde97('0x9')}],'timestamps':!![],'hooks':{'afterCreate':function(_0x2e83c5,_0x1ca7da,_0x211165){var _0x1470c9=_0x2b1fa7['models'];var _0x1426c9=_0x2e83c5[_0xde97('0xa')]({'plain':!![]});if(_0x1426c9[_0xde97('0xb')][_0xde97('0xc')]()==='in'||_0x1426c9[_0xde97('0xb')]['toLowerCase']()===_0xde97('0xd')&&!_0x1426c9[_0xde97('0xe')]&&!_[_0xde97('0xf')](_0x1426c9['UserId'])){_0x1470c9[_0xde97('0x10')]['findOne']({'where':{'id':_0x1426c9['OpenchannelInteractionId']}})[_0xde97('0x11')](function(_0x4d5768){if(_0x4d5768){_0x4d5768[_0xde97('0x12')]({'lastMsgAt':_0x1426c9['createdAt'],'lastMsgDirection':_0x1426c9[_0xde97('0xb')][_0xde97('0xc')]()});}})[_0xde97('0x13')](function(_0x3f7230){console[_0xde97('0x14')](_0x3f7230);});}if(_0x1426c9[_0xde97('0xb')]===_0xde97('0xd')&&!_0x1426c9[_0xde97('0xe')]){var _0x577e6d;_0x1470c9[_0xde97('0x15')][_0xde97('0x16')]()[_0xde97('0x11')](function(_0x541393){return _0x1470c9[_0xde97('0x17')][_0xde97('0x18')]({'where':{'id':_0x1426c9[_0xde97('0x19')]},'include':[{'model':_0x1470c9[_0xde97('0x10')],'as':_0xde97('0x1a'),'where':{'id':_0x1426c9[_0xde97('0x1b')]},'limit':0x1,'include':[{'model':_0x1470c9[_0xde97('0x15')],'as':_0xde97('0x1c'),'attributes':_['keys'](_0x541393)}]}]});})[_0xde97('0x11')](function(_0x47b18b){_0x577e6d=_0x47b18b[_0xde97('0xa')]({'plain':!![]});if(_0x577e6d&&_0x577e6d[_0xde97('0x1d')]){logger[_0xde97('0x1e')](_0xde97('0x1f'),_0xde97('0x20'),util['format']('Forwarding\x20message\x20%d\x20to\x20%s',_0x1426c9['id'],_0x577e6d[_0xde97('0x1d')]));if(_0x577e6d[_0xde97('0x1a')]&&_0x577e6d[_0xde97('0x1a')]['length']){_0x1426c9['Interaction']=_[_0xde97('0x21')](_0x577e6d['Interactions'][0x0],_0xde97('0x1c'));_0x1426c9[_0xde97('0x1c')]=_0x577e6d[_0xde97('0x1a')][0x0][_0xde97('0x1c')];}var _0x1ca7da={'method':_0xde97('0x22'),'uri':encodeURI(_0x577e6d[_0xde97('0x1d')]),'json':!![],'resolveWithFullResponse':!![]};switch(_0x1ca7da['method']){case'GET':_0x1ca7da['qs']=_0x1426c9;break;case _0xde97('0x22'):_0x1ca7da['body']=_0x1426c9;break;}return rp(_0x1ca7da)[_0xde97('0x11')](function(_0x467939){logger[_0xde97('0x1e')](_0xde97('0x1f'),_0xde97('0x20'),util[_0xde97('0x23')](_0xde97('0x24'),_0x1426c9['id'],_0x577e6d['replyUri']));if(_0x467939[_0xde97('0x8')]['threadId']&&_0x467939[_0xde97('0x8')][_0xde97('0x25')]!=_0x1426c9['Interaction'][_0xde97('0x25')]){return _0x1470c9[_0xde97('0x10')][_0xde97('0x12')]({'threadId':_0x467939[_0xde97('0x8')][_0xde97('0x25')]},{'where':{'id':_0x1426c9['Interaction']['id']}});}else{return;}})['then'](function(){return _0x2e83c5[_0xde97('0x12')]({'read':!![]});})['catch'](function(_0x277ba7){logger['error']('OpenchannelMessage,\x20%s,\x20%s',_0xde97('0x20'),util[_0xde97('0x26')](_0x277ba7,{'showHidden':![],'depth':null}));_0x211165();});}else{_0x211165();}})[_0xde97('0x27')](function(){_0x211165();});}else{_0x211165();}}},'charset':_0xde97('0x28'),'collate':_0xde97('0x29')});}; \ No newline at end of file +var _0x5708=['util','moment','bluebird','request-promise','path','rimraf','../../config/environment','./openchannelMessage.attributes','define','OpenchannelMessage','openchannel_messages','fti_openchannel_messages','body','FULLTEXT','models','get','direction','secret','isNil','UserId','OpenchannelInteraction','findOne','OpenchannelInteractionId','update','createdAt','toLowerCase','catch','error','out','CmContact','OpenchannelAccount','find','keys','then','OpenchannelMessage,\x20%s,\x20%s','afterCreate','format','Forwarding\x20message\x20%d\x20to\x20%s','replyUri','Interactions','length','Interaction','omit','Contact','POST','method','GET','info','Message\x20%d\x20forwarded\x20to\x20%s','threadId','inspect','utf8mb4','utf8mb4_unicode_ci','lodash'];(function(_0x2e030a,_0x8e4c48){var _0x597df6=function(_0x3da9ce){while(--_0x3da9ce){_0x2e030a['push'](_0x2e030a['shift']());}};_0x597df6(++_0x8e4c48);}(_0x5708,0x6b));var _0x8570=function(_0x28c6cf,_0x32cee2){_0x28c6cf=_0x28c6cf-0x0;var _0x5e090e=_0x5708[_0x28c6cf];return _0x5e090e;};'use strict';var _=require(_0x8570('0x0'));var util=require(_0x8570('0x1'));var logger=require('../../config/logger')('api');var moment=require(_0x8570('0x2'));var BPromise=require(_0x8570('0x3'));var rp=require(_0x8570('0x4'));var fs=require('fs');var path=require(_0x8570('0x5'));var rimraf=require(_0x8570('0x6'));var config=require(_0x8570('0x7'));var attributes=require(_0x8570('0x8'));module['exports']=function(_0x5d3471,_0x22f06a){return _0x5d3471[_0x8570('0x9')](_0x8570('0xa'),attributes,{'tableName':_0x8570('0xb'),'paranoid':![],'indexes':[{'name':_0x8570('0xc'),'fields':[_0x8570('0xd')],'type':_0x8570('0xe')}],'timestamps':!![],'hooks':{'afterCreate':function(_0x3a624f,_0x24d483,_0x14d2ff){var _0x25dec6=_0x5d3471[_0x8570('0xf')];var _0x5121de=_0x3a624f[_0x8570('0x10')]({'plain':!![]});if(_0x5121de[_0x8570('0x11')]['toLowerCase']()==='in'||_0x5121de[_0x8570('0x11')]['toLowerCase']()==='out'&&!_0x5121de[_0x8570('0x12')]&&!_[_0x8570('0x13')](_0x5121de[_0x8570('0x14')])){_0x25dec6[_0x8570('0x15')][_0x8570('0x16')]({'where':{'id':_0x5121de[_0x8570('0x17')]}})['then'](function(_0x102182){if(_0x102182){_0x102182[_0x8570('0x18')]({'lastMsgAt':_0x5121de[_0x8570('0x19')],'lastMsgDirection':_0x5121de[_0x8570('0x11')][_0x8570('0x1a')]()});}})[_0x8570('0x1b')](function(_0x294673){console[_0x8570('0x1c')](_0x294673);});}if(_0x5121de[_0x8570('0x11')]===_0x8570('0x1d')&&!_0x5121de['secret']){var _0x4d6fb1;_0x25dec6[_0x8570('0x1e')]['describe']()['then'](function(_0x46c3da){return _0x25dec6[_0x8570('0x1f')][_0x8570('0x20')]({'where':{'id':_0x5121de['OpenchannelAccountId']},'include':[{'model':_0x25dec6[_0x8570('0x15')],'as':'Interactions','where':{'id':_0x5121de['OpenchannelInteractionId']},'limit':0x1,'include':[{'model':_0x25dec6['CmContact'],'as':'Contact','attributes':_[_0x8570('0x21')](_0x46c3da)}]}]});})[_0x8570('0x22')](function(_0x5df4cc){_0x4d6fb1=_0x5df4cc[_0x8570('0x10')]({'plain':!![]});if(_0x4d6fb1&&_0x4d6fb1['replyUri']){logger['info'](_0x8570('0x23'),_0x8570('0x24'),util[_0x8570('0x25')](_0x8570('0x26'),_0x5121de['id'],_0x4d6fb1[_0x8570('0x27')]));if(_0x4d6fb1['Interactions']&&_0x4d6fb1[_0x8570('0x28')][_0x8570('0x29')]){_0x5121de[_0x8570('0x2a')]=_[_0x8570('0x2b')](_0x4d6fb1['Interactions'][0x0],_0x8570('0x2c'));_0x5121de[_0x8570('0x2c')]=_0x4d6fb1[_0x8570('0x28')][0x0][_0x8570('0x2c')];}var _0x24d483={'method':_0x8570('0x2d'),'uri':encodeURI(_0x4d6fb1[_0x8570('0x27')]),'json':!![],'resolveWithFullResponse':!![]};switch(_0x24d483[_0x8570('0x2e')]){case _0x8570('0x2f'):_0x24d483['qs']=_0x5121de;break;case _0x8570('0x2d'):_0x24d483[_0x8570('0xd')]=_0x5121de;break;}return rp(_0x24d483)[_0x8570('0x22')](function(_0x5be647){logger[_0x8570('0x30')](_0x8570('0x23'),'afterCreate',util[_0x8570('0x25')](_0x8570('0x31'),_0x5121de['id'],_0x4d6fb1[_0x8570('0x27')]));if(_0x5be647[_0x8570('0xd')][_0x8570('0x32')]&&_0x5be647[_0x8570('0xd')][_0x8570('0x32')]!=_0x5121de[_0x8570('0x2a')][_0x8570('0x32')]){return _0x25dec6[_0x8570('0x15')][_0x8570('0x18')]({'threadId':_0x5be647[_0x8570('0xd')][_0x8570('0x32')]},{'where':{'id':_0x5121de[_0x8570('0x2a')]['id']}});}else{return;}})[_0x8570('0x22')](function(){return _0x3a624f[_0x8570('0x18')]({'read':!![]});})[_0x8570('0x1b')](function(_0x466280){logger[_0x8570('0x1c')](_0x8570('0x23'),_0x8570('0x24'),util[_0x8570('0x33')](_0x466280,{'showHidden':![],'depth':null}));_0x14d2ff();});}else{_0x14d2ff();}})['finally'](function(){_0x14d2ff();});}else{_0x14d2ff();}}},'charset':_0x8570('0x34'),'collate':_0x8570('0x35')});}; \ No newline at end of file diff --git a/server/api/openchannelMessage/openchannelMessage.rpc.js b/server/api/openchannelMessage/openchannelMessage.rpc.js index b1e4f71..6209130 100644 --- a/server/api/openchannelMessage/openchannelMessage.rpc.js +++ b/server/api/openchannelMessage/openchannelMessage.rpc.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x1261=['../../config/utils','../../config/logger','rpc','../../config/environment','http','redis','localhost','socket.io-emitter','./openchannelMessage.socket','OpenchannelMessage,\x20%s,\x20%s','request\x20sent','debug','OpenchannelMessage,\x20%s,\x20%s,\x20%s','stringify','error','code','message','info','catch','OpenchannelMessage','options','raw','then','CreateOpenchannelMessage','util','moment','bluebird','randomstring','ioredis','../../mysqldb'];(function(_0x51b9a2,_0x5307d1){var _0x335b8d=function(_0x5ed190){while(--_0x5ed190){_0x51b9a2['push'](_0x51b9a2['shift']());}};_0x335b8d(++_0x5307d1);}(_0x1261,0x144));var _0x1126=function(_0x24487f,_0x9b3ea0){_0x24487f=_0x24487f-0x0;var _0x456456=_0x1261[_0x24487f];return _0x456456;};'use strict';var _=require('lodash');var util=require(_0x1126('0x0'));var moment=require(_0x1126('0x1'));var BPromise=require(_0x1126('0x2'));var rs=require(_0x1126('0x3'));var fs=require('fs');var Redis=require(_0x1126('0x4'));var db=require(_0x1126('0x5'))['db'];var utils=require(_0x1126('0x6'));var logger=require(_0x1126('0x7'))(_0x1126('0x8'));var config=require(_0x1126('0x9'));var jayson=require('jayson/promise');var client=jayson['client'][_0x1126('0xa')]({'port':0x232a});config[_0x1126('0xb')]=_['defaults'](config[_0x1126('0xb')],{'host':_0x1126('0xc'),'port':0x18eb});var socket=require(_0x1126('0xd'))(new Redis(config[_0x1126('0xb')]));require(_0x1126('0xe'))['register'](socket);function respondWithRpcPromise(_0x3f09ac,_0x18dbe6,_0x167ef1){return new BPromise(function(_0x5e72e2,_0x34571c){return client['request'](_0x3f09ac,_0x167ef1)['then'](function(_0x15c071){logger['info'](_0x1126('0xf'),_0x18dbe6,_0x1126('0x10'));logger[_0x1126('0x11')](_0x1126('0x12'),_0x18dbe6,_0x1126('0x10'),JSON[_0x1126('0x13')](_0x15c071));if(_0x15c071[_0x1126('0x14')]){if(_0x15c071[_0x1126('0x14')][_0x1126('0x15')]===0x1f4){logger['error']('OpenchannelMessage,\x20%s,\x20%s',_0x18dbe6,_0x15c071[_0x1126('0x14')][_0x1126('0x16')]);return _0x34571c(_0x15c071[_0x1126('0x14')]['message']);}logger[_0x1126('0x14')]('OpenchannelMessage,\x20%s,\x20%s',_0x18dbe6,_0x15c071[_0x1126('0x14')][_0x1126('0x16')]);return _0x5e72e2(_0x15c071[_0x1126('0x14')]['message']);}else{logger[_0x1126('0x17')](_0x1126('0xf'),_0x18dbe6,'request\x20sent');_0x5e72e2(_0x15c071['result'][_0x1126('0x16')]);}})[_0x1126('0x18')](function(_0x58d11a){logger['error'](_0x1126('0xf'),_0x18dbe6,_0x58d11a);_0x34571c(_0x58d11a);});});}exports['CreateOpenchannelMessage']=function(_0x22ed37){var _0x1d6d19=this;return new Promise(function(_0x2f70ac,_0x54400a){return db[_0x1126('0x19')]['create'](_0x22ed37['body'],{'raw':_0x22ed37[_0x1126('0x1a')]?_0x22ed37[_0x1126('0x1a')][_0x1126('0x1b')]===undefined?!![]:![]:!![]})[_0x1126('0x1c')](function(_0x526ca1){logger[_0x1126('0x17')](_0x1126('0x1d'),_0x22ed37);logger['debug'](_0x1126('0x1d'),_0x22ed37,JSON['stringify'](_0x526ca1));_0x2f70ac(_0x526ca1);})['catch'](function(_0x4b57ab){logger[_0x1126('0x14')](_0x1126('0x1d'),_0x4b57ab[_0x1126('0x16')],_0x22ed37);_0x54400a(_0x1d6d19[_0x1126('0x14')](0x1f4,_0x4b57ab[_0x1126('0x16')]));});});}; \ No newline at end of file +var _0x5f66=['stringify','error','code','message','info','result','OpenchannelMessage','create','body','options','raw','CreateOpenchannelMessage','catch','util','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','rpc','jayson/promise','client','defaults','redis','localhost','socket.io-emitter','./openchannelMessage.socket','then','OpenchannelMessage,\x20%s,\x20%s','debug','request\x20sent'];(function(_0x2aca9a,_0x478d6d){var _0x586274=function(_0x4016df){while(--_0x4016df){_0x2aca9a['push'](_0x2aca9a['shift']());}};_0x586274(++_0x478d6d);}(_0x5f66,0x1a0));var _0x65f6=function(_0x278e3c,_0x1c9cfd){_0x278e3c=_0x278e3c-0x0;var _0x3e2d9b=_0x5f66[_0x278e3c];return _0x3e2d9b;};'use strict';var _=require('lodash');var util=require(_0x65f6('0x0'));var moment=require('moment');var BPromise=require(_0x65f6('0x1'));var rs=require(_0x65f6('0x2'));var fs=require('fs');var Redis=require(_0x65f6('0x3'));var db=require(_0x65f6('0x4'))['db'];var utils=require(_0x65f6('0x5'));var logger=require('../../config/logger')(_0x65f6('0x6'));var config=require('../../config/environment');var jayson=require(_0x65f6('0x7'));var client=jayson[_0x65f6('0x8')]['http']({'port':0x232a});config['redis']=_[_0x65f6('0x9')](config[_0x65f6('0xa')],{'host':_0x65f6('0xb'),'port':0x18eb});var socket=require(_0x65f6('0xc'))(new Redis(config[_0x65f6('0xa')]));require(_0x65f6('0xd'))['register'](socket);function respondWithRpcPromise(_0x5123ee,_0x18fea1,_0x2f6d5b){return new BPromise(function(_0x264647,_0x25c416){return client['request'](_0x5123ee,_0x2f6d5b)[_0x65f6('0xe')](function(_0x571436){logger['info'](_0x65f6('0xf'),_0x18fea1,'request\x20sent');logger[_0x65f6('0x10')]('OpenchannelMessage,\x20%s,\x20%s,\x20%s',_0x18fea1,_0x65f6('0x11'),JSON[_0x65f6('0x12')](_0x571436));if(_0x571436[_0x65f6('0x13')]){if(_0x571436[_0x65f6('0x13')][_0x65f6('0x14')]===0x1f4){logger[_0x65f6('0x13')](_0x65f6('0xf'),_0x18fea1,_0x571436[_0x65f6('0x13')][_0x65f6('0x15')]);return _0x25c416(_0x571436[_0x65f6('0x13')]['message']);}logger[_0x65f6('0x13')]('OpenchannelMessage,\x20%s,\x20%s',_0x18fea1,_0x571436['error'][_0x65f6('0x15')]);return _0x264647(_0x571436[_0x65f6('0x13')][_0x65f6('0x15')]);}else{logger[_0x65f6('0x16')](_0x65f6('0xf'),_0x18fea1,_0x65f6('0x11'));_0x264647(_0x571436[_0x65f6('0x17')][_0x65f6('0x15')]);}})['catch'](function(_0x4d79a1){logger[_0x65f6('0x13')]('OpenchannelMessage,\x20%s,\x20%s',_0x18fea1,_0x4d79a1);_0x25c416(_0x4d79a1);});});}exports['CreateOpenchannelMessage']=function(_0x5c5b91){var _0x365159=this;return new Promise(function(_0x21ea88,_0x5114a4){return db[_0x65f6('0x18')][_0x65f6('0x19')](_0x5c5b91[_0x65f6('0x1a')],{'raw':_0x5c5b91[_0x65f6('0x1b')]?_0x5c5b91[_0x65f6('0x1b')][_0x65f6('0x1c')]===undefined?!![]:![]:!![]})['then'](function(_0x197a49){logger['info']('CreateOpenchannelMessage',_0x5c5b91);logger[_0x65f6('0x10')](_0x65f6('0x1d'),_0x5c5b91,JSON['stringify'](_0x197a49));_0x21ea88(_0x197a49);})[_0x65f6('0x1e')](function(_0x471a33){logger[_0x65f6('0x13')](_0x65f6('0x1d'),_0x471a33['message'],_0x5c5b91);_0x5114a4(_0x365159[_0x65f6('0x13')](0x1f4,_0x471a33[_0x65f6('0x15')]));});});}; \ No newline at end of file diff --git a/server/api/openchannelMessage/openchannelMessage.socket.js b/server/api/openchannelMessage/openchannelMessage.socket.js index 2e1d82f..a9861fb 100644 --- a/server/api/openchannelMessage/openchannelMessage.socket.js +++ b/server/api/openchannelMessage/openchannelMessage.socket.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x07d7=['remove','update','emit','removeListener','register','length','openchannelMessage:','./openchannelMessage.events','save'];(function(_0x5ee892,_0x37e8ec){var _0x4cd8c5=function(_0x2f781e){while(--_0x2f781e){_0x5ee892['push'](_0x5ee892['shift']());}};_0x4cd8c5(++_0x37e8ec);}(_0x07d7,0x85));var _0x707d=function(_0x7dbd65,_0x18da49){_0x7dbd65=_0x7dbd65-0x0;var _0x33d551=_0x07d7[_0x7dbd65];return _0x33d551;};'use strict';var OpenchannelMessageEvents=require(_0x707d('0x0'));var events=[_0x707d('0x1'),_0x707d('0x2'),_0x707d('0x3')];function createListener(_0x11ffb9,_0x38a92e){return function(_0x100f39){_0x38a92e[_0x707d('0x4')](_0x11ffb9,_0x100f39);};}function removeListener(_0x38c520,_0x2a5ddd){return function(){OpenchannelMessageEvents[_0x707d('0x5')](_0x38c520,_0x2a5ddd);};}exports[_0x707d('0x6')]=function(_0x1808da){for(var _0x1456bd=0x0,_0x1bdf46=events[_0x707d('0x7')];_0x1456bd<_0x1bdf46;_0x1456bd++){var _0x50de20=events[_0x1456bd];var _0x4c9e57=createListener(_0x707d('0x8')+_0x50de20,_0x1808da);OpenchannelMessageEvents['on'](_0x50de20,_0x4c9e57);}}; \ No newline at end of file +var _0xdded=['register','length','./openchannelMessage.events','save','remove','update','emit','removeListener'];(function(_0x38937e,_0x2553b8){var _0x5e109e=function(_0x33d2fe){while(--_0x33d2fe){_0x38937e['push'](_0x38937e['shift']());}};_0x5e109e(++_0x2553b8);}(_0xdded,0x17a));var _0xddde=function(_0x44744b,_0x4e3398){_0x44744b=_0x44744b-0x0;var _0x5075de=_0xdded[_0x44744b];return _0x5075de;};'use strict';var OpenchannelMessageEvents=require(_0xddde('0x0'));var events=[_0xddde('0x1'),_0xddde('0x2'),_0xddde('0x3')];function createListener(_0x3f2b75,_0x9b8506){return function(_0x5cc90a){_0x9b8506[_0xddde('0x4')](_0x3f2b75,_0x5cc90a);};}function removeListener(_0x276cc6,_0x44468e){return function(){OpenchannelMessageEvents[_0xddde('0x5')](_0x276cc6,_0x44468e);};}exports[_0xddde('0x6')]=function(_0x39fd85){for(var _0x3c3021=0x0,_0x3cea18=events[_0xddde('0x7')];_0x3c3021<_0x3cea18;_0x3c3021++){var _0x18d8b8=events[_0x3c3021];var _0x3a5e8a=createListener('openchannelMessage:'+_0x18d8b8,_0x39fd85);OpenchannelMessageEvents['on'](_0x18d8b8,_0x3a5e8a);}}; \ No newline at end of file diff --git a/server/api/openchannelQueue/index.js b/server/api/openchannelQueue/index.js index 336a6a3..f638314 100644 --- a/server/api/openchannelQueue/index.js +++ b/server/api/openchannelQueue/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x7555=['/describe','describe','/:id/members','getMembers','getTeams','/:id/users','getAgents','post','/:id/teams','addTeams','addAgents','put','/:id','update','destroy','delete','removeTeams','removeAgents','exports','util','connect-timeout','Router','../../components/auth/service','../../components/interaction/service','../../config/environment','./openchannelQueue.controller','get','isAuthenticated','index'];(function(_0x2d2e51,_0x1a5640){var _0x388f92=function(_0x1c8229){while(--_0x1c8229){_0x2d2e51['push'](_0x2d2e51['shift']());}};_0x388f92(++_0x1a5640);}(_0x7555,0xfb));var _0x5755=function(_0x4760a6,_0x50801b){_0x4760a6=_0x4760a6-0x0;var _0x48a868=_0x7555[_0x4760a6];return _0x48a868;};'use strict';var multer=require('multer');var util=require(_0x5755('0x0'));var path=require('path');var timeout=require(_0x5755('0x1'));var express=require('express');var router=express[_0x5755('0x2')]();var fs_extra=require('fs-extra');var auth=require(_0x5755('0x3'));var interaction=require(_0x5755('0x4'));var config=require(_0x5755('0x5'));var controller=require(_0x5755('0x6'));router[_0x5755('0x7')]('/',auth[_0x5755('0x8')](),controller[_0x5755('0x9')]);router[_0x5755('0x7')](_0x5755('0xa'),auth['isAuthenticated'](),controller[_0x5755('0xb')]);router['get']('/:id',auth[_0x5755('0x8')](),controller['show']);router[_0x5755('0x7')](_0x5755('0xc'),auth[_0x5755('0x8')](),controller[_0x5755('0xd')]);router[_0x5755('0x7')]('/:id/teams',auth['isAuthenticated'](),controller[_0x5755('0xe')]);router[_0x5755('0x7')](_0x5755('0xf'),auth['isAuthenticated'](),controller[_0x5755('0x10')]);router[_0x5755('0x11')]('/',auth[_0x5755('0x8')](),controller['create']);router[_0x5755('0x11')](_0x5755('0x12'),auth['isAuthenticated'](),controller[_0x5755('0x13')]);router[_0x5755('0x11')](_0x5755('0xf'),auth['isAuthenticated'](),controller[_0x5755('0x14')]);router[_0x5755('0x15')](_0x5755('0x16'),auth[_0x5755('0x8')](),controller[_0x5755('0x17')]);router['delete']('/:id',auth['isAuthenticated'](),controller[_0x5755('0x18')]);router[_0x5755('0x19')]('/:id/teams',auth['isAuthenticated'](),controller[_0x5755('0x1a')]);router[_0x5755('0x19')]('/:id/users',auth[_0x5755('0x8')](),controller[_0x5755('0x1b')]);module[_0x5755('0x1c')]=router; \ No newline at end of file +var _0x8fe1=['create','post','addTeams','put','update','delete','removeTeams','removeAgents','exports','multer','util','path','connect-timeout','express','Router','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','./openchannelQueue.controller','get','isAuthenticated','index','/describe','describe','/:id','show','/:id/members','getMembers','/:id/teams','getTeams','/:id/users','getAgents'];(function(_0x2dafbe,_0x5d04de){var _0x58a45a=function(_0x50ac96){while(--_0x50ac96){_0x2dafbe['push'](_0x2dafbe['shift']());}};_0x58a45a(++_0x5d04de);}(_0x8fe1,0x195));var _0x18fe=function(_0x4017b0,_0x4347db){_0x4017b0=_0x4017b0-0x0;var _0x5ed4f7=_0x8fe1[_0x4017b0];return _0x5ed4f7;};'use strict';var multer=require(_0x18fe('0x0'));var util=require(_0x18fe('0x1'));var path=require(_0x18fe('0x2'));var timeout=require(_0x18fe('0x3'));var express=require(_0x18fe('0x4'));var router=express[_0x18fe('0x5')]();var fs_extra=require(_0x18fe('0x6'));var auth=require(_0x18fe('0x7'));var interaction=require(_0x18fe('0x8'));var config=require(_0x18fe('0x9'));var controller=require(_0x18fe('0xa'));router[_0x18fe('0xb')]('/',auth[_0x18fe('0xc')](),controller[_0x18fe('0xd')]);router[_0x18fe('0xb')](_0x18fe('0xe'),auth[_0x18fe('0xc')](),controller[_0x18fe('0xf')]);router[_0x18fe('0xb')](_0x18fe('0x10'),auth[_0x18fe('0xc')](),controller[_0x18fe('0x11')]);router[_0x18fe('0xb')](_0x18fe('0x12'),auth[_0x18fe('0xc')](),controller[_0x18fe('0x13')]);router[_0x18fe('0xb')](_0x18fe('0x14'),auth[_0x18fe('0xc')](),controller[_0x18fe('0x15')]);router[_0x18fe('0xb')](_0x18fe('0x16'),auth[_0x18fe('0xc')](),controller[_0x18fe('0x17')]);router['post']('/',auth[_0x18fe('0xc')](),controller[_0x18fe('0x18')]);router[_0x18fe('0x19')](_0x18fe('0x14'),auth['isAuthenticated'](),controller[_0x18fe('0x1a')]);router['post'](_0x18fe('0x16'),auth[_0x18fe('0xc')](),controller['addAgents']);router[_0x18fe('0x1b')](_0x18fe('0x10'),auth[_0x18fe('0xc')](),controller[_0x18fe('0x1c')]);router[_0x18fe('0x1d')](_0x18fe('0x10'),auth[_0x18fe('0xc')](),controller['destroy']);router[_0x18fe('0x1d')]('/:id/teams',auth[_0x18fe('0xc')](),controller[_0x18fe('0x1e')]);router[_0x18fe('0x1d')]('/:id/users',auth['isAuthenticated'](),controller[_0x18fe('0x1f')]);module[_0x18fe('0x20')]=router; \ No newline at end of file diff --git a/server/api/openchannelQueue/openchannelQueue.attributes.js b/server/api/openchannelQueue/openchannelQueue.attributes.js index 82055e3..7263904 100644 --- a/server/api/openchannelQueue/openchannelQueue.attributes.js +++ b/server/api/openchannelQueue/openchannelQueue.attributes.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xc760=['exports','STRING','name','ENUM','roundrobin','sequelize'];(function(_0x5dcda2,_0x5851e9){var _0x4de9d1=function(_0x3da93a){while(--_0x3da93a){_0x5dcda2['push'](_0x5dcda2['shift']());}};_0x4de9d1(++_0x5851e9);}(_0xc760,0x11f));var _0x0c76=function(_0x378d6e,_0x199218){_0x378d6e=_0x378d6e-0x0;var _0x412180=_0xc760[_0x378d6e];return _0x412180;};'use strict';var Sequelize=require(_0x0c76('0x0'));module[_0x0c76('0x1')]={'name':{'type':Sequelize[_0x0c76('0x2')],'unique':_0x0c76('0x3'),'validate':{'notEmpty':!![],'is':/^[A-Za-z0-9\.\_]+$/i}},'description':{'type':Sequelize[_0x0c76('0x2')]},'timeout':{'type':Sequelize['INTEGER'],'validate':{'min':0x1,'max':0x20c49b}},'strategy':{'type':Sequelize[_0x0c76('0x4')]('rrmemory','beepall',_0x0c76('0x5'))}}; \ No newline at end of file +var _0x64f9=['INTEGER','rrmemory','roundrobin','sequelize','exports','STRING'];(function(_0x1deab3,_0x1fc9ef){var _0x604d7b=function(_0x5bb575){while(--_0x5bb575){_0x1deab3['push'](_0x1deab3['shift']());}};_0x604d7b(++_0x1fc9ef);}(_0x64f9,0x93));var _0x964f=function(_0x2dea24,_0x2fc021){_0x2dea24=_0x2dea24-0x0;var _0x309d58=_0x64f9[_0x2dea24];return _0x309d58;};'use strict';var Sequelize=require(_0x964f('0x0'));module[_0x964f('0x1')]={'name':{'type':Sequelize[_0x964f('0x2')],'unique':'name','validate':{'notEmpty':!![],'is':/^[A-Za-z0-9\.\_]+$/i}},'description':{'type':Sequelize[_0x964f('0x2')]},'timeout':{'type':Sequelize[_0x964f('0x3')],'validate':{'min':0x1,'max':0x20c49b}},'strategy':{'type':Sequelize['ENUM'](_0x964f('0x4'),'beepall',_0x964f('0x5'))}}; \ No newline at end of file diff --git a/server/api/openchannelQueue/openchannelQueue.controller.js b/server/api/openchannelQueue/openchannelQueue.controller.js index 489bbc0..9326b3a 100644 --- a/server/api/openchannelQueue/openchannelQueue.controller.js +++ b/server/api/openchannelQueue/openchannelQueue.controller.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xa3c9=['attributes','fields','length','hasOwnProperty','sort','where','filters','pick','filter','VIRTUAL','merge','options','includeAll','include','findAll','rows','show','params','rawAttributes','find','catch','create','body','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','user','OpenchannelQueues','UserProfileSection','userProfileId','autoAssociation','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','describe','getMembers','findOne','UserOpenchannelQueue','nolimit','order','OpenchannelQueueId','User','findAndCountAll','UserId','agent','openchannelPause','updatedAt','createdAt','SIP','getTeams','Team','ids','online','voicePause','interface','flatMap','Agents','sequelize','each','findOrCreate','forEach','emit','userOpenchannelQueue:save','removeTeams','select','field','tq.TeamId','from','team_has_openchannel_queues','join','user_has_teams','ut.TeamId\x20=\x20tq.TeamId','OpenchannelQueueId\x20=\x20?','clone','ut.UserId\x20=\x20?','toString','QueryTypes','every','TeamId','includes','all','union','compact','value','transaction','isEmpty','removeAgents','addAgents','omit','spread','isArray','userOpenchannelQueue:remove','getAgents','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','util','path','to-csv','ejs','fs-extra','lodash','squel','crypto','jsforce','desk.js','querystring','papaparse','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/logger','api','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','redis','socket.io-emitter','./openchannelQueue.socket','register','status','end','json','offset','limit','undefined','count','set','Content-Range','apply','reject','save','update','then','destroy','get','sendStatus','error','stack','name','send','map','OpenchannelQueue','fieldName','type','model','query','keys','intersection'];(function(_0x28aeb2,_0x319b38){var _0x1d33e1=function(_0x651b59){while(--_0x651b59){_0x28aeb2['push'](_0x28aeb2['shift']());}};_0x1d33e1(++_0x319b38);}(_0xa3c9,0xf2));var _0x9a3c=function(_0x5bd4f6,_0xf4e45c){_0x5bd4f6=_0x5bd4f6-0x0;var _0x33a165=_0xa3c9[_0x5bd4f6];return _0x33a165;};'use strict';var emlformat=require(_0x9a3c('0x0'));var rimraf=require(_0x9a3c('0x1'));var zipdir=require(_0x9a3c('0x2'));var jsonpatch=require(_0x9a3c('0x3'));var rp=require(_0x9a3c('0x4'));var moment=require(_0x9a3c('0x5'));var BPromise=require(_0x9a3c('0x6'));var Mustache=require(_0x9a3c('0x7'));var util=require(_0x9a3c('0x8'));var path=require(_0x9a3c('0x9'));var sox=require('sox');var csv=require(_0x9a3c('0xa'));var ejs=require(_0x9a3c('0xb'));var fs=require('fs');var fs_extra=require(_0x9a3c('0xc'));var _=require(_0x9a3c('0xd'));var squel=require(_0x9a3c('0xe'));var crypto=require(_0x9a3c('0xf'));var jsforce=require(_0x9a3c('0x10'));var deskjs=require(_0x9a3c('0x11'));var toCsv=require(_0x9a3c('0xa'));var querystring=require(_0x9a3c('0x12'));var Papa=require(_0x9a3c('0x13'));var Redis=require('ioredis');var authService=require(_0x9a3c('0x14'));var qs=require(_0x9a3c('0x15'));var as=require(_0x9a3c('0x16'));var hardwareService=require('../../config/license/hardware');var logger=require(_0x9a3c('0x17'))(_0x9a3c('0x18'));var utils=require(_0x9a3c('0x19'));var config=require(_0x9a3c('0x1a'));var licenseUtil=require(_0x9a3c('0x1b'));var db=require(_0x9a3c('0x1c'))['db'];config[_0x9a3c('0x1d')]=_['defaults'](config[_0x9a3c('0x1d')],{'host':'localhost','port':0x18eb});var socket=require(_0x9a3c('0x1e'))(new Redis(config[_0x9a3c('0x1d')]));require(_0x9a3c('0x1f'))[_0x9a3c('0x20')](socket);function respondWithStatusCode(_0x21f639,_0x3bbd4b){_0x3bbd4b=_0x3bbd4b||0xcc;return function(_0x20b628){if(_0x20b628){return _0x21f639['sendStatus'](_0x3bbd4b);}return _0x21f639[_0x9a3c('0x21')](_0x3bbd4b)[_0x9a3c('0x22')]();};}function respondWithResult(_0x2a5c57,_0x599529){_0x599529=_0x599529||0xc8;return function(_0x252d55){if(_0x252d55){return _0x2a5c57['status'](_0x599529)[_0x9a3c('0x23')](_0x252d55);}};}function respondWithFilteredResult(_0x3ff7be,_0x321422){return function(_0x11ed8c){if(_0x11ed8c){var _0x3e54a2=typeof _0x321422[_0x9a3c('0x24')]==='undefined'&&typeof _0x321422[_0x9a3c('0x25')]===_0x9a3c('0x26');var _0x373816=_0x11ed8c[_0x9a3c('0x27')];var _0x2f4efc=_0x3e54a2?0x0:_0x321422[_0x9a3c('0x24')];var _0x19d230=_0x3e54a2?_0x11ed8c[_0x9a3c('0x27')]:_0x321422[_0x9a3c('0x24')]+_0x321422[_0x9a3c('0x25')];var _0x18661a;if(_0x19d230>=_0x373816){_0x19d230=_0x373816;_0x18661a=0xc8;}else{_0x18661a=0xce;}_0x3ff7be['status'](_0x18661a);return _0x3ff7be[_0x9a3c('0x28')](_0x9a3c('0x29'),_0x2f4efc+'-'+_0x19d230+'/'+_0x373816)[_0x9a3c('0x23')](_0x11ed8c);}return null;};}function patchUpdates(_0x5e06bc){return function(_0x4ebd36){try{jsonpatch[_0x9a3c('0x2a')](_0x4ebd36,_0x5e06bc,!![]);}catch(_0x4f9759){return BPromise[_0x9a3c('0x2b')](_0x4f9759);}return _0x4ebd36[_0x9a3c('0x2c')]();};}function saveUpdates(_0x40a848,_0x269b89){return function(_0x1954e3){if(_0x1954e3){return _0x1954e3[_0x9a3c('0x2d')](_0x40a848)[_0x9a3c('0x2e')](function(_0xb4513c){return _0xb4513c;});}return null;};}function removeEntity(_0x54759b,_0x122598){return function(_0x52ad19){if(_0x52ad19){return _0x52ad19[_0x9a3c('0x2f')]()['then'](function(){var _0x9f6ca8=_0x52ad19[_0x9a3c('0x30')]({'plain':!![]});var _0x914b9b='OpenchannelQueues';return db['UserProfileResource'][_0x9a3c('0x2f')]({'where':{'type':_0x914b9b,'resourceId':_0x9f6ca8['id']}})['then'](function(){return _0x52ad19;});})[_0x9a3c('0x2e')](function(){_0x54759b[_0x9a3c('0x21')](0xcc)[_0x9a3c('0x22')]();});}};}function handleEntityNotFound(_0xdb2e77,_0x352f75){return function(_0x15e20a){if(!_0x15e20a){_0xdb2e77[_0x9a3c('0x31')](0x194);}return _0x15e20a;};}function handleError(_0x48aa73,_0x45de00){_0x45de00=_0x45de00||0x1f4;return function(_0x16c094){logger[_0x9a3c('0x32')](_0x16c094[_0x9a3c('0x33')]);if(_0x16c094[_0x9a3c('0x34')]){delete _0x16c094[_0x9a3c('0x34')];}_0x48aa73[_0x9a3c('0x21')](_0x45de00)[_0x9a3c('0x35')](_0x16c094);};}exports['index']=function(_0x18f95d,_0x285c93){var _0x492b76={},_0x498640={},_0x11a29f={'count':0x0,'rows':[]};var _0xb777=_[_0x9a3c('0x36')](db[_0x9a3c('0x37')]['rawAttributes'],function(_0x4c3d6b){return{'name':_0x4c3d6b[_0x9a3c('0x38')],'type':_0x4c3d6b[_0x9a3c('0x39')]['key']};});_0x498640[_0x9a3c('0x3a')]=_['map'](_0xb777,_0x9a3c('0x34'));_0x498640[_0x9a3c('0x3b')]=_[_0x9a3c('0x3c')](_0x18f95d['query']);_0x498640['filters']=_[_0x9a3c('0x3d')](_0x498640[_0x9a3c('0x3a')],_0x498640[_0x9a3c('0x3b')]);_0x492b76[_0x9a3c('0x3e')]=_[_0x9a3c('0x3d')](_0x498640[_0x9a3c('0x3a')],qs[_0x9a3c('0x3f')](_0x18f95d['query'][_0x9a3c('0x3f')]));_0x492b76[_0x9a3c('0x3e')]=_0x492b76[_0x9a3c('0x3e')][_0x9a3c('0x40')]?_0x492b76[_0x9a3c('0x3e')]:_0x498640[_0x9a3c('0x3a')];if(!_0x18f95d[_0x9a3c('0x3b')][_0x9a3c('0x41')]('nolimit')){_0x492b76['limit']=qs[_0x9a3c('0x25')](_0x18f95d[_0x9a3c('0x3b')][_0x9a3c('0x25')]);_0x492b76[_0x9a3c('0x24')]=qs[_0x9a3c('0x24')](_0x18f95d[_0x9a3c('0x3b')]['offset']);}_0x492b76['order']=qs[_0x9a3c('0x42')](_0x18f95d[_0x9a3c('0x3b')][_0x9a3c('0x42')]);_0x492b76[_0x9a3c('0x43')]=qs[_0x9a3c('0x44')](_[_0x9a3c('0x45')](_0x18f95d[_0x9a3c('0x3b')],_0x498640['filters']),_0xb777);if(_0x18f95d[_0x9a3c('0x3b')][_0x9a3c('0x46')]){_0x492b76[_0x9a3c('0x43')]=_['merge'](_0x492b76[_0x9a3c('0x43')],{'$or':_['map'](_0xb777,function(_0x118342){if(_0x118342[_0x9a3c('0x39')]!==_0x9a3c('0x47')){var _0x12480a={};_0x12480a[_0x118342[_0x9a3c('0x34')]]={'$like':'%'+_0x18f95d[_0x9a3c('0x3b')][_0x9a3c('0x46')]+'%'};return _0x12480a;}})});}_0x492b76=_[_0x9a3c('0x48')]({},_0x492b76,_0x18f95d[_0x9a3c('0x49')]);var _0x50d0aa={'where':_0x492b76['where']};return db['OpenchannelQueue'][_0x9a3c('0x27')](_0x50d0aa)[_0x9a3c('0x2e')](function(_0x18e563){_0x11a29f[_0x9a3c('0x27')]=_0x18e563;if(_0x18f95d[_0x9a3c('0x3b')][_0x9a3c('0x4a')]){_0x492b76[_0x9a3c('0x4b')]=[{'all':!![]}];}return db['OpenchannelQueue'][_0x9a3c('0x4c')](_0x492b76);})[_0x9a3c('0x2e')](function(_0x385df0){_0x11a29f[_0x9a3c('0x4d')]=_0x385df0;return _0x11a29f;})[_0x9a3c('0x2e')](respondWithFilteredResult(_0x285c93,_0x492b76))['catch'](handleError(_0x285c93,null));};exports[_0x9a3c('0x4e')]=function(_0x3ee24a,_0x51bef1){var _0x260c24={'raw':!![],'where':{'id':_0x3ee24a[_0x9a3c('0x4f')]['id']}},_0x236034={};_0x236034[_0x9a3c('0x3a')]=_[_0x9a3c('0x3c')](db[_0x9a3c('0x37')][_0x9a3c('0x50')]);_0x236034[_0x9a3c('0x3b')]=_[_0x9a3c('0x3c')](_0x3ee24a[_0x9a3c('0x3b')]);_0x236034['filters']=_['intersection'](_0x236034['model'],_0x236034[_0x9a3c('0x3b')]);_0x260c24[_0x9a3c('0x3e')]=_[_0x9a3c('0x3d')](_0x236034[_0x9a3c('0x3a')],qs[_0x9a3c('0x3f')](_0x3ee24a[_0x9a3c('0x3b')][_0x9a3c('0x3f')]));_0x260c24[_0x9a3c('0x3e')]=_0x260c24[_0x9a3c('0x3e')][_0x9a3c('0x40')]?_0x260c24[_0x9a3c('0x3e')]:_0x236034[_0x9a3c('0x3a')];if(_0x3ee24a[_0x9a3c('0x3b')][_0x9a3c('0x4a')]){_0x260c24[_0x9a3c('0x4b')]=[{'all':!![]}];}_0x260c24=_[_0x9a3c('0x48')]({},_0x260c24,_0x3ee24a['options']);return db[_0x9a3c('0x37')][_0x9a3c('0x51')](_0x260c24)[_0x9a3c('0x2e')](handleEntityNotFound(_0x51bef1,null))[_0x9a3c('0x2e')](respondWithResult(_0x51bef1,null))[_0x9a3c('0x52')](handleError(_0x51bef1,null));};exports[_0x9a3c('0x53')]=function(_0x2efe14,_0x52d13f){return db[_0x9a3c('0x37')][_0x9a3c('0x53')](_0x2efe14[_0x9a3c('0x54')],{})[_0x9a3c('0x2e')](function(_0x29616d){var _0x11c9ee=_0x2efe14['user'][_0x9a3c('0x30')]({'plain':!![]});if(!_0x11c9ee)throw new Error(_0x9a3c('0x55'));if(_0x11c9ee[_0x9a3c('0x56')]===_0x9a3c('0x57')){var _0x5de394=_0x29616d[_0x9a3c('0x30')]({'plain':!![]});var _0x1a290c=_0x9a3c('0x58');return db[_0x9a3c('0x59')][_0x9a3c('0x51')]({'where':{'name':_0x1a290c,'userProfileId':_0x11c9ee[_0x9a3c('0x5a')]},'raw':!![]})[_0x9a3c('0x2e')](function(_0x51ac23){if(_0x51ac23&&_0x51ac23[_0x9a3c('0x5b')]===0x0){return db['UserProfileResource']['create']({'name':_0x5de394['name'],'resourceId':_0x5de394['id'],'type':_0x51ac23['name'],'sectionId':_0x51ac23['id']},{})['then'](function(){return _0x29616d;});}else{return _0x29616d;}})[_0x9a3c('0x52')](function(_0x51da81){logger['error'](_0x9a3c('0x5c'),_0x51da81);throw _0x51da81;});}return _0x29616d;})[_0x9a3c('0x2e')](respondWithResult(_0x52d13f,0xc9))[_0x9a3c('0x52')](handleError(_0x52d13f,null));};exports[_0x9a3c('0x2d')]=function(_0x3da275,_0x4f78e4){if(_0x3da275['body']['id']){delete _0x3da275[_0x9a3c('0x54')]['id'];}return db[_0x9a3c('0x37')][_0x9a3c('0x51')]({'where':{'id':_0x3da275[_0x9a3c('0x4f')]['id']}})[_0x9a3c('0x2e')](handleEntityNotFound(_0x4f78e4,null))[_0x9a3c('0x2e')](saveUpdates(_0x3da275[_0x9a3c('0x54')],null))[_0x9a3c('0x2e')](respondWithResult(_0x4f78e4,null))[_0x9a3c('0x52')](handleError(_0x4f78e4,null));};exports[_0x9a3c('0x2f')]=function(_0x52cacb,_0x3663cf){return db['OpenchannelQueue'][_0x9a3c('0x51')]({'where':{'id':_0x52cacb[_0x9a3c('0x4f')]['id']}})[_0x9a3c('0x2e')](handleEntityNotFound(_0x3663cf,null))[_0x9a3c('0x2e')](removeEntity(_0x3663cf,null))[_0x9a3c('0x52')](handleError(_0x3663cf,null));};exports[_0x9a3c('0x5d')]=function(_0x31dc03,_0x1aff92){return db[_0x9a3c('0x37')][_0x9a3c('0x5d')]()[_0x9a3c('0x2e')](respondWithResult(_0x1aff92,null))[_0x9a3c('0x52')](handleError(_0x1aff92,null));};exports[_0x9a3c('0x5e')]=function(_0x46db9d,_0x2f8b7d,_0x3df702){var _0x2a02e9={'raw':!![],'where':{}},_0x628905={},_0x3b51d9;return db[_0x9a3c('0x37')][_0x9a3c('0x5f')]({'where':{'id':_0x46db9d['params']['id']}})[_0x9a3c('0x2e')](handleEntityNotFound(_0x2f8b7d,null))['then'](function(_0x3706d6){if(_0x3706d6){_0x3b51d9=_0x3706d6[_0x9a3c('0x30')]({'plain':!![]});_0x628905['model']=_[_0x9a3c('0x3c')](db[_0x9a3c('0x60')][_0x9a3c('0x50')]);_0x628905['query']=_[_0x9a3c('0x3c')](_0x46db9d[_0x9a3c('0x3b')]);_0x628905['filters']=_['intersection'](_0x628905['model'],_0x628905['query']);_0x2a02e9[_0x9a3c('0x3e')]=_[_0x9a3c('0x3d')](_0x628905[_0x9a3c('0x3a')],qs[_0x9a3c('0x3f')](_0x46db9d[_0x9a3c('0x3b')]['fields']));_0x2a02e9[_0x9a3c('0x3e')]=_0x2a02e9[_0x9a3c('0x3e')]['length']?_0x2a02e9[_0x9a3c('0x3e')]:_0x628905[_0x9a3c('0x3a')];if(!_0x46db9d['query']['hasOwnProperty'](_0x9a3c('0x61'))){_0x2a02e9[_0x9a3c('0x25')]=qs['limit'](_0x46db9d[_0x9a3c('0x3b')][_0x9a3c('0x25')]);_0x2a02e9['offset']=qs[_0x9a3c('0x24')](_0x46db9d[_0x9a3c('0x3b')][_0x9a3c('0x24')]);}_0x2a02e9[_0x9a3c('0x62')]=qs[_0x9a3c('0x42')](_0x46db9d['query']['sort']);_0x2a02e9[_0x9a3c('0x43')]=qs[_0x9a3c('0x44')](_[_0x9a3c('0x45')](_0x46db9d[_0x9a3c('0x3b')],_0x628905[_0x9a3c('0x44')]));_0x2a02e9[_0x9a3c('0x43')][_0x9a3c('0x63')]=_0x3706d6['id'];if(_0x46db9d[_0x9a3c('0x3b')][_0x9a3c('0x46')]){_0x2a02e9[_0x9a3c('0x43')]=_[_0x9a3c('0x48')](_0x2a02e9[_0x9a3c('0x43')],{'$or':_[_0x9a3c('0x36')](_0x2a02e9[_0x9a3c('0x3e')],function(_0x1efda6){var _0x2547a2={};_0x2547a2[_0x1efda6]={'$like':'%'+_0x46db9d[_0x9a3c('0x3b')][_0x9a3c('0x46')]+'%'};return _0x2547a2;})});}_0x2a02e9=_[_0x9a3c('0x48')]({},_0x2a02e9,_0x46db9d[_0x9a3c('0x49')]);return db[_0x9a3c('0x60')][_0x9a3c('0x4c')](_0x2a02e9);}})['then'](function(_0x2d29fe){if(_0x2d29fe){return db[_0x9a3c('0x64')][_0x9a3c('0x65')]({'where':{'id':_['map'](_0x2d29fe,_0x9a3c('0x66')),'role':_0x9a3c('0x67')},'attributes':['id',_0x9a3c('0x34'),_0x9a3c('0x68'),_0x9a3c('0x69'),_0x9a3c('0x6a')]});}})[_0x9a3c('0x2e')](function(_0x39eeeb){if(_0x39eeeb){return{'count':_0x39eeeb[_0x9a3c('0x27')],'rows':_[_0x9a3c('0x36')](_0x39eeeb['rows'],function(_0x27ba53){return{'membername':_0x27ba53[_0x9a3c('0x34')],'UserId':_0x27ba53['id'],'queue_name':_0x3b51d9[_0x9a3c('0x34')],'OpenchannelQueueId':_0x3b51d9['id'],'interface':util['format']('%s/%s',_0x9a3c('0x6b'),_0x27ba53[_0x9a3c('0x34')]),'penalty':0x0,'paused':_0x27ba53[_0x9a3c('0x68')],'createdAt':_0x27ba53[_0x9a3c('0x6a')],'updatedAt':_0x27ba53[_0x9a3c('0x69')]};})};}else{return{'count':0x0,'rows':[]};}})[_0x9a3c('0x2e')](respondWithFilteredResult(_0x2f8b7d,_0x2a02e9))[_0x9a3c('0x52')](handleError(_0x2f8b7d,null));};exports[_0x9a3c('0x6c')]=function(_0x2603c8,_0x141281,_0x5ee512){var _0x29f051={};var _0x2e8843={};var _0x4b1fff;var _0x15fbd4;return db[_0x9a3c('0x37')][_0x9a3c('0x5f')]({'where':{'id':_0x2603c8[_0x9a3c('0x4f')]['id']}})[_0x9a3c('0x2e')](handleEntityNotFound(_0x141281,null))['then'](function(_0x5b55a0){if(_0x5b55a0){_0x4b1fff=_0x5b55a0;_0x2e8843[_0x9a3c('0x3a')]=_['keys'](db[_0x9a3c('0x6d')][_0x9a3c('0x50')]);_0x2e8843[_0x9a3c('0x3b')]=_[_0x9a3c('0x3c')](_0x2603c8[_0x9a3c('0x3b')]);_0x2e8843[_0x9a3c('0x44')]=_[_0x9a3c('0x3d')](_0x2e8843[_0x9a3c('0x3a')],_0x2e8843['query']);_0x29f051[_0x9a3c('0x3e')]=_['intersection'](_0x2e8843['model'],qs[_0x9a3c('0x3f')](_0x2603c8[_0x9a3c('0x3b')][_0x9a3c('0x3f')]));_0x29f051[_0x9a3c('0x3e')]=_0x29f051['attributes'][_0x9a3c('0x40')]?_0x29f051[_0x9a3c('0x3e')]:_0x2e8843[_0x9a3c('0x3a')];_0x29f051['order']=qs[_0x9a3c('0x42')](_0x2603c8['query'][_0x9a3c('0x42')]);_0x29f051[_0x9a3c('0x43')]=qs['filters'](_[_0x9a3c('0x45')](_0x2603c8[_0x9a3c('0x3b')],_0x2e8843['filters']));if(_0x2603c8[_0x9a3c('0x3b')][_0x9a3c('0x46')]){_0x29f051['where']=_[_0x9a3c('0x48')](_0x29f051['where'],{'$or':_[_0x9a3c('0x36')](_0x29f051[_0x9a3c('0x3e')],function(_0x26a6f1){var _0x257200={};_0x257200[_0x26a6f1]={'$like':'%'+_0x2603c8[_0x9a3c('0x3b')]['filter']+'%'};return _0x257200;})});}_0x29f051=_['merge']({},_0x29f051,_0x2603c8['options']);return _0x4b1fff[_0x9a3c('0x6c')](_0x29f051);}})[_0x9a3c('0x2e')](function(_0x332690){if(_0x332690){_0x15fbd4=_0x332690[_0x9a3c('0x40')];if(!_0x2603c8[_0x9a3c('0x3b')][_0x9a3c('0x41')](_0x9a3c('0x61'))){_0x29f051[_0x9a3c('0x25')]=qs[_0x9a3c('0x25')](_0x2603c8[_0x9a3c('0x3b')][_0x9a3c('0x25')]);_0x29f051[_0x9a3c('0x24')]=qs[_0x9a3c('0x24')](_0x2603c8[_0x9a3c('0x3b')][_0x9a3c('0x24')]);}return _0x4b1fff[_0x9a3c('0x6c')](_0x29f051);}})[_0x9a3c('0x2e')](function(_0xb06911){if(_0xb06911){return _0xb06911?{'count':_0x15fbd4,'rows':_0xb06911}:null;}})[_0x9a3c('0x2e')](respondWithResult(_0x141281,null))[_0x9a3c('0x52')](handleError(_0x141281,null));};exports['addTeams']=function(_0xf9cfe,_0x387619,_0x244d6f){var _0x10237c=_0xf9cfe[_0x9a3c('0x54')][_0x9a3c('0x6e')];return db['Team'][_0x9a3c('0x4c')]({'where':{'id':_0x10237c},'attributes':['id'],'include':[{'model':db[_0x9a3c('0x64')],'as':'Agents','attributes':['id',_0x9a3c('0x34'),_0x9a3c('0x6f'),_0x9a3c('0x70'),_0x9a3c('0x71')],'raw':!![]}]})[_0x9a3c('0x2e')](function(_0x500c13){if(_0x500c13){var _0x93aa1d=_[_0x9a3c('0x72')](_0x500c13,function(_0x409fcc){var _0x1da5b3=_0x409fcc[_0x9a3c('0x30')]({'plain':!![]});return _0x1da5b3[_0x9a3c('0x73')];});return db[_0x9a3c('0x37')][_0x9a3c('0x51')]({'where':{'id':_0xf9cfe[_0x9a3c('0x4f')]['id']}})[_0x9a3c('0x2e')](function(_0x18cff2){return db[_0x9a3c('0x74')]['transaction'](function(_0x4cc6bf){return _0x18cff2['addTeams'](_0x10237c,{'transaction':_0x4cc6bf})[_0x9a3c('0x2e')](function(){return BPromise[_0x9a3c('0x75')](_0x93aa1d,function(_0x2acdc1){return db[_0x9a3c('0x60')][_0x9a3c('0x76')]({'where':{'UserId':_0x2acdc1['id'],'OpenchannelQueueId':_0xf9cfe[_0x9a3c('0x4f')]['id']},'transaction':_0x4cc6bf});});})['then'](function(){_0x93aa1d[_0x9a3c('0x77')](function(_0x39df5d){socket[_0x9a3c('0x78')](_0x9a3c('0x79'),{'UserId':_0x39df5d['id'],'OpenchannelQueueId':_0x18cff2['id']});});});});});}})[_0x9a3c('0x2e')](respondWithStatusCode(_0x387619,null))[_0x9a3c('0x52')](handleError(_0x387619,null));};exports[_0x9a3c('0x7a')]=function(_0x1d727d,_0x5d2d9d,_0x2f146f){return db['Team'][_0x9a3c('0x4c')]({'where':{'id':_0x1d727d[_0x9a3c('0x3b')]['ids']},'attributes':['id'],'include':[{'model':db[_0x9a3c('0x64')],'as':_0x9a3c('0x73'),'attributes':['id'],'raw':!![]}]})[_0x9a3c('0x2e')](handleEntityNotFound(_0x5d2d9d,null))[_0x9a3c('0x2e')](function(_0x5e9aa1){var _0x3c5093=_[_0x9a3c('0x36')](_0x5e9aa1,'id');var _0x526ca3=[];var _0xb6d7f3=[];var _0x121a09=squel[_0x9a3c('0x7b')]();_0x121a09[_0x9a3c('0x7c')](_0x9a3c('0x7d'))[_0x9a3c('0x7e')](_0x9a3c('0x7f'),'tq')[_0x9a3c('0x80')](_0x9a3c('0x81'),'ut',_0x9a3c('0x82'))[_0x9a3c('0x43')](_0x9a3c('0x83'),_0x1d727d['params']['id']);for(var _0x399fba=0x0;_0x399fba<_0x5e9aa1[_0x9a3c('0x40')];_0x399fba+=0x1){let _0x48882f=_0x5e9aa1[_0x399fba];for(var _0x3ec9b0=0x0;_0x3ec9b0<_0x48882f['Agents']['length'];_0x3ec9b0+=0x1){let _0x2c6ed5=_0x48882f[_0x9a3c('0x73')][_0x3ec9b0];var _0x37cb4d=_0x121a09[_0x9a3c('0x84')]();_0x37cb4d[_0x9a3c('0x43')](_0x9a3c('0x85'),_0x2c6ed5['id']);_0xb6d7f3['push'](db[_0x9a3c('0x74')]['query'](_0x37cb4d[_0x9a3c('0x86')](),{'type':db[_0x9a3c('0x74')][_0x9a3c('0x87')]['SELECT']})[_0x9a3c('0x2e')](function(_0x39c061){if(_0x39c061[_0x9a3c('0x40')]===0x1){return _0x2c6ed5['id'];}else{var _0x1bce25=_[_0x9a3c('0x88')](_[_0x9a3c('0x36')](_0x39c061,_0x9a3c('0x89')),function(_0x26a482){return _[_0x9a3c('0x8a')](_0x3c5093,_0x26a482);});if(_0x1bce25){return _0x2c6ed5['id'];}}}));}}return BPromise[_0x9a3c('0x8b')](_0xb6d7f3)[_0x9a3c('0x2e')](function(_0x36b503){_0x526ca3=_(_0x526ca3)[_0x9a3c('0x8c')](_0x36b503)[_0x9a3c('0x8d')]()[_0x9a3c('0x8e')]();return db[_0x9a3c('0x37')][_0x9a3c('0x51')]({'where':{'id':_0x1d727d['params']['id']}})[_0x9a3c('0x2e')](function(_0x39b4f9){return db[_0x9a3c('0x74')][_0x9a3c('0x8f')](function(_0x5e52b5){return _0x39b4f9[_0x9a3c('0x7a')](_0x1d727d['query'][_0x9a3c('0x6e')],{'transaction':_0x5e52b5})['then'](function(){if(!_[_0x9a3c('0x90')](_0x526ca3)){return _0x39b4f9[_0x9a3c('0x91')](_0x526ca3,{'transaction':_0x5e52b5});}})[_0x9a3c('0x2e')](function(){_0x526ca3[_0x9a3c('0x77')](function(_0x5826a4){socket[_0x9a3c('0x78')]('userOpenchannelQueue:remove',{'UserId':_0x5826a4,'OpenchannelQueueId':_0x39b4f9['id']});});});});});});})[_0x9a3c('0x2e')](respondWithStatusCode(_0x5d2d9d,null))[_0x9a3c('0x52')](handleError(_0x5d2d9d,null));};exports['addAgents']=function(_0x31673a,_0x416082,_0x3f6f3f){return db[_0x9a3c('0x37')][_0x9a3c('0x51')]({'where':{'id':_0x31673a[_0x9a3c('0x4f')]['id']}})[_0x9a3c('0x2e')](handleEntityNotFound(_0x416082,null))[_0x9a3c('0x2e')](function(_0x26bacc){if(_0x26bacc){return _0x26bacc[_0x9a3c('0x92')](_0x31673a[_0x9a3c('0x54')][_0x9a3c('0x6e')],_[_0x9a3c('0x93')](_0x31673a[_0x9a3c('0x54')],[_0x9a3c('0x6e'),'id'])||{})[_0x9a3c('0x94')](function(_0x2d22b8){for(var _0x170956=0x0;_0x170956<_0x31673a[_0x9a3c('0x54')][_0x9a3c('0x6e')][_0x9a3c('0x40')];_0x170956+=0x1){socket[_0x9a3c('0x78')](_0x9a3c('0x79'),{'UserId':Number(_0x31673a[_0x9a3c('0x54')]['ids'][_0x170956]),'OpenchannelQueueId':Number(_0x31673a[_0x9a3c('0x4f')]['id'])});}return _0x2d22b8;});}})[_0x9a3c('0x2e')](respondWithResult(_0x416082,null))[_0x9a3c('0x52')](handleError(_0x416082,null));};exports[_0x9a3c('0x91')]=function(_0x28944b,_0x50240c,_0x4d6717){return db['OpenchannelQueue'][_0x9a3c('0x51')]({'where':{'id':_0x28944b[_0x9a3c('0x4f')]['id']}})[_0x9a3c('0x2e')](handleEntityNotFound(_0x50240c,null))[_0x9a3c('0x2e')](function(_0x4c33e5){if(_0x4c33e5){return _0x4c33e5[_0x9a3c('0x91')](_0x28944b[_0x9a3c('0x3b')][_0x9a3c('0x6e')])[_0x9a3c('0x2e')](function(){if(_[_0x9a3c('0x95')](_0x28944b['query']['ids'])){for(var _0x5aba47=0x0;_0x5aba47<_0x28944b[_0x9a3c('0x3b')][_0x9a3c('0x6e')][_0x9a3c('0x40')];_0x5aba47+=0x1){socket[_0x9a3c('0x78')](_0x9a3c('0x96'),{'UserId':Number(_0x28944b[_0x9a3c('0x3b')][_0x9a3c('0x6e')][_0x5aba47]),'OpenchannelQueueId':Number(_0x28944b['params']['id'])});}}else{socket['emit'](_0x9a3c('0x96'),{'UserId':Number(_0x28944b[_0x9a3c('0x3b')][_0x9a3c('0x6e')]),'OpenchannelQueueId':Number(_0x28944b['params']['id'])});}});}})[_0x9a3c('0x2e')](respondWithStatusCode(_0x50240c,null))[_0x9a3c('0x52')](handleError(_0x50240c,null));};exports['getAgents']=function(_0xe36e6f,_0x113c49,_0x4c7eb9){var _0x2396a4={};var _0x4ecef0={};var _0x3f8864;var _0x45517b;return db['OpenchannelQueue']['findOne']({'where':{'id':_0xe36e6f['params']['id']}})['then'](handleEntityNotFound(_0x113c49,null))[_0x9a3c('0x2e')](function(_0x51ccd3){if(_0x51ccd3){_0x3f8864=_0x51ccd3;_0x4ecef0[_0x9a3c('0x3a')]=_['keys'](db[_0x9a3c('0x64')][_0x9a3c('0x50')]);_0x4ecef0[_0x9a3c('0x3b')]=_[_0x9a3c('0x3c')](_0xe36e6f['query']);_0x4ecef0['filters']=_[_0x9a3c('0x3d')](_0x4ecef0[_0x9a3c('0x3a')],_0x4ecef0[_0x9a3c('0x3b')]);_0x2396a4[_0x9a3c('0x3e')]=_[_0x9a3c('0x3d')](_0x4ecef0[_0x9a3c('0x3a')],qs[_0x9a3c('0x3f')](_0xe36e6f[_0x9a3c('0x3b')][_0x9a3c('0x3f')]));_0x2396a4['attributes']=_0x2396a4[_0x9a3c('0x3e')]['length']?_0x2396a4[_0x9a3c('0x3e')]:_0x4ecef0[_0x9a3c('0x3a')];_0x2396a4[_0x9a3c('0x62')]=qs[_0x9a3c('0x42')](_0xe36e6f[_0x9a3c('0x3b')]['sort']);_0x2396a4[_0x9a3c('0x43')]=qs[_0x9a3c('0x44')](_[_0x9a3c('0x45')](_0xe36e6f[_0x9a3c('0x3b')],_0x4ecef0['filters']));if(_0xe36e6f['query'][_0x9a3c('0x46')]){_0x2396a4['where']=_['merge'](_0x2396a4[_0x9a3c('0x43')],{'$or':_[_0x9a3c('0x36')](_0x2396a4[_0x9a3c('0x3e')],function(_0x2b6ff6){var _0x5a6431={};_0x5a6431[_0x2b6ff6]={'$like':'%'+_0xe36e6f[_0x9a3c('0x3b')][_0x9a3c('0x46')]+'%'};return _0x5a6431;})});}_0x2396a4=_[_0x9a3c('0x48')]({},_0x2396a4,_0xe36e6f['options']);return _0x3f8864['getAgents'](_0x2396a4);}})[_0x9a3c('0x2e')](function(_0x49a19b){if(_0x49a19b){_0x45517b=_0x49a19b[_0x9a3c('0x40')];if(!_0xe36e6f['query'][_0x9a3c('0x41')](_0x9a3c('0x61'))){_0x2396a4[_0x9a3c('0x25')]=qs[_0x9a3c('0x25')](_0xe36e6f[_0x9a3c('0x3b')][_0x9a3c('0x25')]);_0x2396a4[_0x9a3c('0x24')]=qs[_0x9a3c('0x24')](_0xe36e6f['query']['offset']);}return _0x3f8864[_0x9a3c('0x97')](_0x2396a4);}})[_0x9a3c('0x2e')](function(_0x141977){if(_0x141977){return _0x141977?{'count':_0x45517b,'rows':_0x141977}:null;}})['then'](respondWithResult(_0x113c49,null))[_0x9a3c('0x52')](handleError(_0x113c49,null));}; \ No newline at end of file +var _0x5e66=['Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','update','UserOpenchannelQueue','hasOwnProperty','OpenchannelQueueId','findAll','User','findAndCountAll','UserId','agent','openchannelPause','updatedAt','createdAt','rows','%s/%s','SIP','getTeams','findOne','Team','ids','Agents','online','voicePause','flatMap','sequelize','transaction','addTeams','findOrCreate','forEach','emit','removeTeams','field','tq.TeamId','from','join','ut.TeamId\x20=\x20tq.TeamId','OpenchannelQueueId\x20=\x20?','clone','ut.UserId\x20=\x20?','push','toString','QueryTypes','SELECT','includes','all','union','value','removeAgents','userOpenchannelQueue:remove','addAgents','spread','userOpenchannelQueue:save','isArray','getAgents','rimraf','fast-json-patch','request-promise','moment','bluebird','mustache','util','path','sox','ejs','fs-extra','lodash','squel','crypto','jsforce','desk.js','to-csv','querystring','papaparse','ioredis','../../components/parsers/qs','api','../../config/utils','../../config/environment','../../mysqldb','defaults','redis','localhost','socket.io-emitter','register','sendStatus','status','json','offset','undefined','count','limit','Content-Range','apply','reject','save','then','destroy','UserProfileResource','end','error','stack','index','map','OpenchannelQueue','rawAttributes','fieldName','type','key','model','name','query','filters','intersection','attributes','fields','length','nolimit','order','sort','where','pick','filter','merge','VIRTUAL','options','includeAll','include','catch','show','params','keys','find','create','body','user','get','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','OpenchannelQueues','userProfileId','autoAssociation'];(function(_0x5f382f,_0x3f1432){var _0x3bb11b=function(_0x4daf9b){while(--_0x4daf9b){_0x5f382f['push'](_0x5f382f['shift']());}};_0x3bb11b(++_0x3f1432);}(_0x5e66,0x150));var _0x65e6=function(_0x7b73ce,_0x13b3fe){_0x7b73ce=_0x7b73ce-0x0;var _0x31a748=_0x5e66[_0x7b73ce];return _0x31a748;};'use strict';var emlformat=require('eml-format');var rimraf=require(_0x65e6('0x0'));var zipdir=require('zip-dir');var jsonpatch=require(_0x65e6('0x1'));var rp=require(_0x65e6('0x2'));var moment=require(_0x65e6('0x3'));var BPromise=require(_0x65e6('0x4'));var Mustache=require(_0x65e6('0x5'));var util=require(_0x65e6('0x6'));var path=require(_0x65e6('0x7'));var sox=require(_0x65e6('0x8'));var csv=require('to-csv');var ejs=require(_0x65e6('0x9'));var fs=require('fs');var fs_extra=require(_0x65e6('0xa'));var _=require(_0x65e6('0xb'));var squel=require(_0x65e6('0xc'));var crypto=require(_0x65e6('0xd'));var jsforce=require(_0x65e6('0xe'));var deskjs=require(_0x65e6('0xf'));var toCsv=require(_0x65e6('0x10'));var querystring=require(_0x65e6('0x11'));var Papa=require(_0x65e6('0x12'));var Redis=require(_0x65e6('0x13'));var authService=require('../../components/auth/service');var qs=require(_0x65e6('0x14'));var as=require('../../components/parsers/advancedSearch');var hardwareService=require('../../config/license/hardware');var logger=require('../../config/logger')(_0x65e6('0x15'));var utils=require(_0x65e6('0x16'));var config=require(_0x65e6('0x17'));var licenseUtil=require('../../config/license/util');var db=require(_0x65e6('0x18'))['db'];config['redis']=_[_0x65e6('0x19')](config[_0x65e6('0x1a')],{'host':_0x65e6('0x1b'),'port':0x18eb});var socket=require(_0x65e6('0x1c'))(new Redis(config[_0x65e6('0x1a')]));require('./openchannelQueue.socket')[_0x65e6('0x1d')](socket);function respondWithStatusCode(_0x3ecc30,_0x577492){_0x577492=_0x577492||0xcc;return function(_0x3fe508){if(_0x3fe508){return _0x3ecc30[_0x65e6('0x1e')](_0x577492);}return _0x3ecc30[_0x65e6('0x1f')](_0x577492)['end']();};}function respondWithResult(_0x4a2f61,_0x4cd5b0){_0x4cd5b0=_0x4cd5b0||0xc8;return function(_0x20a20a){if(_0x20a20a){return _0x4a2f61[_0x65e6('0x1f')](_0x4cd5b0)[_0x65e6('0x20')](_0x20a20a);}};}function respondWithFilteredResult(_0x458894,_0x44f3e2){return function(_0x5713cb){if(_0x5713cb){var _0x2c795e=typeof _0x44f3e2[_0x65e6('0x21')]==='undefined'&&typeof _0x44f3e2['limit']===_0x65e6('0x22');var _0x3b9afe=_0x5713cb['count'];var _0x5d43e0=_0x2c795e?0x0:_0x44f3e2[_0x65e6('0x21')];var _0x52d8cd=_0x2c795e?_0x5713cb[_0x65e6('0x23')]:_0x44f3e2[_0x65e6('0x21')]+_0x44f3e2[_0x65e6('0x24')];var _0x525f64;if(_0x52d8cd>=_0x3b9afe){_0x52d8cd=_0x3b9afe;_0x525f64=0xc8;}else{_0x525f64=0xce;}_0x458894[_0x65e6('0x1f')](_0x525f64);return _0x458894['set'](_0x65e6('0x25'),_0x5d43e0+'-'+_0x52d8cd+'/'+_0x3b9afe)[_0x65e6('0x20')](_0x5713cb);}return null;};}function patchUpdates(_0x21f89b){return function(_0xa1e54c){try{jsonpatch[_0x65e6('0x26')](_0xa1e54c,_0x21f89b,!![]);}catch(_0xe29383){return BPromise[_0x65e6('0x27')](_0xe29383);}return _0xa1e54c[_0x65e6('0x28')]();};}function saveUpdates(_0x3ac3cb,_0x1bc26c){return function(_0xbe64ae){if(_0xbe64ae){return _0xbe64ae['update'](_0x3ac3cb)[_0x65e6('0x29')](function(_0xf68a90){return _0xf68a90;});}return null;};}function removeEntity(_0x1bedf4,_0x4cab38){return function(_0x4b0f3a){if(_0x4b0f3a){return _0x4b0f3a[_0x65e6('0x2a')]()[_0x65e6('0x29')](function(){var _0x503141=_0x4b0f3a['get']({'plain':!![]});var _0x95430e='OpenchannelQueues';return db[_0x65e6('0x2b')][_0x65e6('0x2a')]({'where':{'type':_0x95430e,'resourceId':_0x503141['id']}})[_0x65e6('0x29')](function(){return _0x4b0f3a;});})[_0x65e6('0x29')](function(){_0x1bedf4[_0x65e6('0x1f')](0xcc)[_0x65e6('0x2c')]();});}};}function handleEntityNotFound(_0x26ac41,_0x42650a){return function(_0xfa3757){if(!_0xfa3757){_0x26ac41['sendStatus'](0x194);}return _0xfa3757;};}function handleError(_0x29521e,_0x597625){_0x597625=_0x597625||0x1f4;return function(_0x639bcf){logger[_0x65e6('0x2d')](_0x639bcf[_0x65e6('0x2e')]);if(_0x639bcf['name']){delete _0x639bcf['name'];}_0x29521e[_0x65e6('0x1f')](_0x597625)['send'](_0x639bcf);};}exports[_0x65e6('0x2f')]=function(_0x5811e1,_0x19a0ab){var _0x15a40c={},_0xce5e83={},_0x49b778={'count':0x0,'rows':[]};var _0x1b81eb=_[_0x65e6('0x30')](db[_0x65e6('0x31')][_0x65e6('0x32')],function(_0x35c606){return{'name':_0x35c606[_0x65e6('0x33')],'type':_0x35c606[_0x65e6('0x34')][_0x65e6('0x35')]};});_0xce5e83[_0x65e6('0x36')]=_[_0x65e6('0x30')](_0x1b81eb,_0x65e6('0x37'));_0xce5e83['query']=_['keys'](_0x5811e1[_0x65e6('0x38')]);_0xce5e83[_0x65e6('0x39')]=_[_0x65e6('0x3a')](_0xce5e83[_0x65e6('0x36')],_0xce5e83[_0x65e6('0x38')]);_0x15a40c[_0x65e6('0x3b')]=_['intersection'](_0xce5e83[_0x65e6('0x36')],qs[_0x65e6('0x3c')](_0x5811e1[_0x65e6('0x38')][_0x65e6('0x3c')]));_0x15a40c[_0x65e6('0x3b')]=_0x15a40c[_0x65e6('0x3b')][_0x65e6('0x3d')]?_0x15a40c[_0x65e6('0x3b')]:_0xce5e83[_0x65e6('0x36')];if(!_0x5811e1[_0x65e6('0x38')]['hasOwnProperty'](_0x65e6('0x3e'))){_0x15a40c[_0x65e6('0x24')]=qs[_0x65e6('0x24')](_0x5811e1[_0x65e6('0x38')][_0x65e6('0x24')]);_0x15a40c['offset']=qs[_0x65e6('0x21')](_0x5811e1['query'][_0x65e6('0x21')]);}_0x15a40c[_0x65e6('0x3f')]=qs[_0x65e6('0x40')](_0x5811e1[_0x65e6('0x38')][_0x65e6('0x40')]);_0x15a40c[_0x65e6('0x41')]=qs[_0x65e6('0x39')](_[_0x65e6('0x42')](_0x5811e1[_0x65e6('0x38')],_0xce5e83[_0x65e6('0x39')]),_0x1b81eb);if(_0x5811e1[_0x65e6('0x38')][_0x65e6('0x43')]){_0x15a40c[_0x65e6('0x41')]=_[_0x65e6('0x44')](_0x15a40c[_0x65e6('0x41')],{'$or':_[_0x65e6('0x30')](_0x1b81eb,function(_0x2b37b0){if(_0x2b37b0['type']!==_0x65e6('0x45')){var _0x336c96={};_0x336c96[_0x2b37b0[_0x65e6('0x37')]]={'$like':'%'+_0x5811e1[_0x65e6('0x38')][_0x65e6('0x43')]+'%'};return _0x336c96;}})});}_0x15a40c=_[_0x65e6('0x44')]({},_0x15a40c,_0x5811e1[_0x65e6('0x46')]);var _0x41ef72={'where':_0x15a40c['where']};return db[_0x65e6('0x31')][_0x65e6('0x23')](_0x41ef72)['then'](function(_0x329dbc){_0x49b778['count']=_0x329dbc;if(_0x5811e1[_0x65e6('0x38')][_0x65e6('0x47')]){_0x15a40c[_0x65e6('0x48')]=[{'all':!![]}];}return db[_0x65e6('0x31')]['findAll'](_0x15a40c);})[_0x65e6('0x29')](function(_0x37bb54){_0x49b778['rows']=_0x37bb54;return _0x49b778;})[_0x65e6('0x29')](respondWithFilteredResult(_0x19a0ab,_0x15a40c))[_0x65e6('0x49')](handleError(_0x19a0ab,null));};exports[_0x65e6('0x4a')]=function(_0x1f9323,_0x414e21){var _0x4f1175={'raw':!![],'where':{'id':_0x1f9323[_0x65e6('0x4b')]['id']}},_0x55981a={};_0x55981a[_0x65e6('0x36')]=_[_0x65e6('0x4c')](db[_0x65e6('0x31')]['rawAttributes']);_0x55981a[_0x65e6('0x38')]=_['keys'](_0x1f9323['query']);_0x55981a[_0x65e6('0x39')]=_['intersection'](_0x55981a[_0x65e6('0x36')],_0x55981a[_0x65e6('0x38')]);_0x4f1175[_0x65e6('0x3b')]=_['intersection'](_0x55981a[_0x65e6('0x36')],qs['fields'](_0x1f9323[_0x65e6('0x38')][_0x65e6('0x3c')]));_0x4f1175[_0x65e6('0x3b')]=_0x4f1175[_0x65e6('0x3b')]['length']?_0x4f1175[_0x65e6('0x3b')]:_0x55981a[_0x65e6('0x36')];if(_0x1f9323[_0x65e6('0x38')][_0x65e6('0x47')]){_0x4f1175[_0x65e6('0x48')]=[{'all':!![]}];}_0x4f1175=_[_0x65e6('0x44')]({},_0x4f1175,_0x1f9323[_0x65e6('0x46')]);return db['OpenchannelQueue'][_0x65e6('0x4d')](_0x4f1175)[_0x65e6('0x29')](handleEntityNotFound(_0x414e21,null))[_0x65e6('0x29')](respondWithResult(_0x414e21,null))['catch'](handleError(_0x414e21,null));};exports[_0x65e6('0x4e')]=function(_0x208d14,_0x1cbe47){return db[_0x65e6('0x31')][_0x65e6('0x4e')](_0x208d14[_0x65e6('0x4f')],{})['then'](function(_0x22b8a3){var _0x1defd1=_0x208d14[_0x65e6('0x50')][_0x65e6('0x51')]({'plain':!![]});if(!_0x1defd1)throw new Error(_0x65e6('0x52'));if(_0x1defd1[_0x65e6('0x53')]===_0x65e6('0x50')){var _0x428afc=_0x22b8a3[_0x65e6('0x51')]({'plain':!![]});var _0x500deb=_0x65e6('0x54');return db['UserProfileSection'][_0x65e6('0x4d')]({'where':{'name':_0x500deb,'userProfileId':_0x1defd1[_0x65e6('0x55')]},'raw':!![]})[_0x65e6('0x29')](function(_0xbfa22){if(_0xbfa22&&_0xbfa22[_0x65e6('0x56')]===0x0){return db[_0x65e6('0x2b')]['create']({'name':_0x428afc['name'],'resourceId':_0x428afc['id'],'type':_0xbfa22[_0x65e6('0x37')],'sectionId':_0xbfa22['id']},{})[_0x65e6('0x29')](function(){return _0x22b8a3;});}else{return _0x22b8a3;}})[_0x65e6('0x49')](function(_0x2db813){logger[_0x65e6('0x2d')](_0x65e6('0x57'),_0x2db813);throw _0x2db813;});}return _0x22b8a3;})[_0x65e6('0x29')](respondWithResult(_0x1cbe47,0xc9))[_0x65e6('0x49')](handleError(_0x1cbe47,null));};exports[_0x65e6('0x58')]=function(_0x3326f0,_0x506f6c){if(_0x3326f0[_0x65e6('0x4f')]['id']){delete _0x3326f0[_0x65e6('0x4f')]['id'];}return db['OpenchannelQueue']['find']({'where':{'id':_0x3326f0[_0x65e6('0x4b')]['id']}})['then'](handleEntityNotFound(_0x506f6c,null))[_0x65e6('0x29')](saveUpdates(_0x3326f0[_0x65e6('0x4f')],null))['then'](respondWithResult(_0x506f6c,null))['catch'](handleError(_0x506f6c,null));};exports['destroy']=function(_0x48cfcf,_0x33dd9b){return db['OpenchannelQueue'][_0x65e6('0x4d')]({'where':{'id':_0x48cfcf[_0x65e6('0x4b')]['id']}})['then'](handleEntityNotFound(_0x33dd9b,null))[_0x65e6('0x29')](removeEntity(_0x33dd9b,null))[_0x65e6('0x49')](handleError(_0x33dd9b,null));};exports['describe']=function(_0x3f23d,_0x1b2bc2){return db[_0x65e6('0x31')]['describe']()[_0x65e6('0x29')](respondWithResult(_0x1b2bc2,null))[_0x65e6('0x49')](handleError(_0x1b2bc2,null));};exports['getMembers']=function(_0x5601f9,_0x318743,_0x578e1f){var _0x31a6c1={'raw':!![],'where':{}},_0x50d484={},_0x5c5797;return db['OpenchannelQueue']['findOne']({'where':{'id':_0x5601f9[_0x65e6('0x4b')]['id']}})[_0x65e6('0x29')](handleEntityNotFound(_0x318743,null))[_0x65e6('0x29')](function(_0x4c13a8){if(_0x4c13a8){_0x5c5797=_0x4c13a8['get']({'plain':!![]});_0x50d484['model']=_[_0x65e6('0x4c')](db[_0x65e6('0x59')][_0x65e6('0x32')]);_0x50d484['query']=_[_0x65e6('0x4c')](_0x5601f9[_0x65e6('0x38')]);_0x50d484[_0x65e6('0x39')]=_[_0x65e6('0x3a')](_0x50d484[_0x65e6('0x36')],_0x50d484[_0x65e6('0x38')]);_0x31a6c1[_0x65e6('0x3b')]=_['intersection'](_0x50d484[_0x65e6('0x36')],qs[_0x65e6('0x3c')](_0x5601f9[_0x65e6('0x38')][_0x65e6('0x3c')]));_0x31a6c1[_0x65e6('0x3b')]=_0x31a6c1['attributes']['length']?_0x31a6c1['attributes']:_0x50d484[_0x65e6('0x36')];if(!_0x5601f9['query'][_0x65e6('0x5a')](_0x65e6('0x3e'))){_0x31a6c1[_0x65e6('0x24')]=qs[_0x65e6('0x24')](_0x5601f9[_0x65e6('0x38')]['limit']);_0x31a6c1[_0x65e6('0x21')]=qs[_0x65e6('0x21')](_0x5601f9[_0x65e6('0x38')]['offset']);}_0x31a6c1['order']=qs[_0x65e6('0x40')](_0x5601f9[_0x65e6('0x38')][_0x65e6('0x40')]);_0x31a6c1[_0x65e6('0x41')]=qs[_0x65e6('0x39')](_[_0x65e6('0x42')](_0x5601f9[_0x65e6('0x38')],_0x50d484[_0x65e6('0x39')]));_0x31a6c1[_0x65e6('0x41')][_0x65e6('0x5b')]=_0x4c13a8['id'];if(_0x5601f9[_0x65e6('0x38')][_0x65e6('0x43')]){_0x31a6c1[_0x65e6('0x41')]=_[_0x65e6('0x44')](_0x31a6c1[_0x65e6('0x41')],{'$or':_[_0x65e6('0x30')](_0x31a6c1[_0x65e6('0x3b')],function(_0xa86980){var _0x416b77={};_0x416b77[_0xa86980]={'$like':'%'+_0x5601f9[_0x65e6('0x38')]['filter']+'%'};return _0x416b77;})});}_0x31a6c1=_[_0x65e6('0x44')]({},_0x31a6c1,_0x5601f9[_0x65e6('0x46')]);return db[_0x65e6('0x59')][_0x65e6('0x5c')](_0x31a6c1);}})[_0x65e6('0x29')](function(_0x4f05cd){if(_0x4f05cd){return db[_0x65e6('0x5d')][_0x65e6('0x5e')]({'where':{'id':_['map'](_0x4f05cd,_0x65e6('0x5f')),'role':_0x65e6('0x60')},'attributes':['id',_0x65e6('0x37'),_0x65e6('0x61'),_0x65e6('0x62'),_0x65e6('0x63')]});}})['then'](function(_0xe43e1d){if(_0xe43e1d){return{'count':_0xe43e1d[_0x65e6('0x23')],'rows':_['map'](_0xe43e1d[_0x65e6('0x64')],function(_0xcd975a){return{'membername':_0xcd975a[_0x65e6('0x37')],'UserId':_0xcd975a['id'],'queue_name':_0x5c5797[_0x65e6('0x37')],'OpenchannelQueueId':_0x5c5797['id'],'interface':util['format'](_0x65e6('0x65'),_0x65e6('0x66'),_0xcd975a[_0x65e6('0x37')]),'penalty':0x0,'paused':_0xcd975a[_0x65e6('0x61')],'createdAt':_0xcd975a[_0x65e6('0x63')],'updatedAt':_0xcd975a['updatedAt']};})};}else{return{'count':0x0,'rows':[]};}})[_0x65e6('0x29')](respondWithFilteredResult(_0x318743,_0x31a6c1))[_0x65e6('0x49')](handleError(_0x318743,null));};exports[_0x65e6('0x67')]=function(_0x3c46e2,_0x40f473,_0x352a92){var _0x23f332={};var _0x80069d={};var _0x3ead4e;var _0x4a881b;return db[_0x65e6('0x31')][_0x65e6('0x68')]({'where':{'id':_0x3c46e2[_0x65e6('0x4b')]['id']}})[_0x65e6('0x29')](handleEntityNotFound(_0x40f473,null))[_0x65e6('0x29')](function(_0x5e25b6){if(_0x5e25b6){_0x3ead4e=_0x5e25b6;_0x80069d[_0x65e6('0x36')]=_['keys'](db[_0x65e6('0x69')][_0x65e6('0x32')]);_0x80069d[_0x65e6('0x38')]=_[_0x65e6('0x4c')](_0x3c46e2[_0x65e6('0x38')]);_0x80069d[_0x65e6('0x39')]=_[_0x65e6('0x3a')](_0x80069d[_0x65e6('0x36')],_0x80069d[_0x65e6('0x38')]);_0x23f332[_0x65e6('0x3b')]=_[_0x65e6('0x3a')](_0x80069d[_0x65e6('0x36')],qs[_0x65e6('0x3c')](_0x3c46e2[_0x65e6('0x38')]['fields']));_0x23f332[_0x65e6('0x3b')]=_0x23f332['attributes'][_0x65e6('0x3d')]?_0x23f332['attributes']:_0x80069d[_0x65e6('0x36')];_0x23f332['order']=qs['sort'](_0x3c46e2[_0x65e6('0x38')][_0x65e6('0x40')]);_0x23f332[_0x65e6('0x41')]=qs['filters'](_['pick'](_0x3c46e2[_0x65e6('0x38')],_0x80069d[_0x65e6('0x39')]));if(_0x3c46e2[_0x65e6('0x38')][_0x65e6('0x43')]){_0x23f332[_0x65e6('0x41')]=_[_0x65e6('0x44')](_0x23f332[_0x65e6('0x41')],{'$or':_[_0x65e6('0x30')](_0x23f332['attributes'],function(_0x49d673){var _0x4ef7d0={};_0x4ef7d0[_0x49d673]={'$like':'%'+_0x3c46e2['query'][_0x65e6('0x43')]+'%'};return _0x4ef7d0;})});}_0x23f332=_[_0x65e6('0x44')]({},_0x23f332,_0x3c46e2[_0x65e6('0x46')]);return _0x3ead4e[_0x65e6('0x67')](_0x23f332);}})[_0x65e6('0x29')](function(_0x56034f){if(_0x56034f){_0x4a881b=_0x56034f[_0x65e6('0x3d')];if(!_0x3c46e2['query']['hasOwnProperty'](_0x65e6('0x3e'))){_0x23f332[_0x65e6('0x24')]=qs[_0x65e6('0x24')](_0x3c46e2[_0x65e6('0x38')][_0x65e6('0x24')]);_0x23f332[_0x65e6('0x21')]=qs[_0x65e6('0x21')](_0x3c46e2[_0x65e6('0x38')][_0x65e6('0x21')]);}return _0x3ead4e['getTeams'](_0x23f332);}})[_0x65e6('0x29')](function(_0x32fd46){if(_0x32fd46){return _0x32fd46?{'count':_0x4a881b,'rows':_0x32fd46}:null;}})[_0x65e6('0x29')](respondWithResult(_0x40f473,null))['catch'](handleError(_0x40f473,null));};exports['addTeams']=function(_0x101195,_0x38b915,_0x16621e){var _0x37bbf9=_0x101195[_0x65e6('0x4f')][_0x65e6('0x6a')];return db[_0x65e6('0x69')][_0x65e6('0x5c')]({'where':{'id':_0x37bbf9},'attributes':['id'],'include':[{'model':db[_0x65e6('0x5d')],'as':_0x65e6('0x6b'),'attributes':['id',_0x65e6('0x37'),_0x65e6('0x6c'),_0x65e6('0x6d'),'interface'],'raw':!![]}]})[_0x65e6('0x29')](function(_0x367de3){if(_0x367de3){var _0x2d8062=_[_0x65e6('0x6e')](_0x367de3,function(_0x105c61){var _0x3bebed=_0x105c61[_0x65e6('0x51')]({'plain':!![]});return _0x3bebed[_0x65e6('0x6b')];});return db[_0x65e6('0x31')][_0x65e6('0x4d')]({'where':{'id':_0x101195[_0x65e6('0x4b')]['id']}})[_0x65e6('0x29')](function(_0x2ab430){return db[_0x65e6('0x6f')][_0x65e6('0x70')](function(_0x3b7ee4){return _0x2ab430[_0x65e6('0x71')](_0x37bbf9,{'transaction':_0x3b7ee4})[_0x65e6('0x29')](function(){return BPromise['each'](_0x2d8062,function(_0x53583c){return db[_0x65e6('0x59')][_0x65e6('0x72')]({'where':{'UserId':_0x53583c['id'],'OpenchannelQueueId':_0x101195[_0x65e6('0x4b')]['id']},'transaction':_0x3b7ee4});});})[_0x65e6('0x29')](function(){_0x2d8062[_0x65e6('0x73')](function(_0x32c5fe){socket[_0x65e6('0x74')]('userOpenchannelQueue:save',{'UserId':_0x32c5fe['id'],'OpenchannelQueueId':_0x2ab430['id']});});});});});}})[_0x65e6('0x29')](respondWithStatusCode(_0x38b915,null))[_0x65e6('0x49')](handleError(_0x38b915,null));};exports[_0x65e6('0x75')]=function(_0x364332,_0x5504c2,_0x3de9ec){return db[_0x65e6('0x69')][_0x65e6('0x5c')]({'where':{'id':_0x364332[_0x65e6('0x38')][_0x65e6('0x6a')]},'attributes':['id'],'include':[{'model':db['User'],'as':_0x65e6('0x6b'),'attributes':['id'],'raw':!![]}]})[_0x65e6('0x29')](handleEntityNotFound(_0x5504c2,null))[_0x65e6('0x29')](function(_0x287cd3){var _0x3dc841=_[_0x65e6('0x30')](_0x287cd3,'id');var _0x7f6315=[];var _0x34066d=[];var _0x2a443f=squel['select']();_0x2a443f[_0x65e6('0x76')](_0x65e6('0x77'))[_0x65e6('0x78')]('team_has_openchannel_queues','tq')[_0x65e6('0x79')]('user_has_teams','ut',_0x65e6('0x7a'))[_0x65e6('0x41')](_0x65e6('0x7b'),_0x364332[_0x65e6('0x4b')]['id']);for(var _0x2569e1=0x0;_0x2569e1<_0x287cd3[_0x65e6('0x3d')];_0x2569e1+=0x1){let _0x148189=_0x287cd3[_0x2569e1];for(var _0x357591=0x0;_0x357591<_0x148189[_0x65e6('0x6b')][_0x65e6('0x3d')];_0x357591+=0x1){let _0x4a5fd=_0x148189[_0x65e6('0x6b')][_0x357591];var _0x2d197b=_0x2a443f[_0x65e6('0x7c')]();_0x2d197b[_0x65e6('0x41')](_0x65e6('0x7d'),_0x4a5fd['id']);_0x34066d[_0x65e6('0x7e')](db[_0x65e6('0x6f')]['query'](_0x2d197b[_0x65e6('0x7f')](),{'type':db[_0x65e6('0x6f')][_0x65e6('0x80')][_0x65e6('0x81')]})[_0x65e6('0x29')](function(_0x3dc3cd){if(_0x3dc3cd[_0x65e6('0x3d')]===0x1){return _0x4a5fd['id'];}else{var _0x3b5d10=_['every'](_[_0x65e6('0x30')](_0x3dc3cd,'TeamId'),function(_0x3e6210){return _[_0x65e6('0x82')](_0x3dc841,_0x3e6210);});if(_0x3b5d10){return _0x4a5fd['id'];}}}));}}return BPromise[_0x65e6('0x83')](_0x34066d)[_0x65e6('0x29')](function(_0x37f9b4){_0x7f6315=_(_0x7f6315)[_0x65e6('0x84')](_0x37f9b4)['compact']()[_0x65e6('0x85')]();return db['OpenchannelQueue'][_0x65e6('0x4d')]({'where':{'id':_0x364332[_0x65e6('0x4b')]['id']}})[_0x65e6('0x29')](function(_0x3b5b3d){return db[_0x65e6('0x6f')]['transaction'](function(_0x2b7ee2){return _0x3b5b3d['removeTeams'](_0x364332[_0x65e6('0x38')][_0x65e6('0x6a')],{'transaction':_0x2b7ee2})[_0x65e6('0x29')](function(){if(!_['isEmpty'](_0x7f6315)){return _0x3b5b3d[_0x65e6('0x86')](_0x7f6315,{'transaction':_0x2b7ee2});}})[_0x65e6('0x29')](function(){_0x7f6315['forEach'](function(_0x463584){socket[_0x65e6('0x74')](_0x65e6('0x87'),{'UserId':_0x463584,'OpenchannelQueueId':_0x3b5b3d['id']});});});});});});})[_0x65e6('0x29')](respondWithStatusCode(_0x5504c2,null))[_0x65e6('0x49')](handleError(_0x5504c2,null));};exports[_0x65e6('0x88')]=function(_0x41bad3,_0x20c701,_0x4e638d){return db[_0x65e6('0x31')][_0x65e6('0x4d')]({'where':{'id':_0x41bad3[_0x65e6('0x4b')]['id']}})[_0x65e6('0x29')](handleEntityNotFound(_0x20c701,null))[_0x65e6('0x29')](function(_0x730594){if(_0x730594){return _0x730594[_0x65e6('0x88')](_0x41bad3[_0x65e6('0x4f')][_0x65e6('0x6a')],_['omit'](_0x41bad3[_0x65e6('0x4f')],[_0x65e6('0x6a'),'id'])||{})[_0x65e6('0x89')](function(_0x41f13f){for(var _0x2375ca=0x0;_0x2375ca<_0x41bad3['body'][_0x65e6('0x6a')][_0x65e6('0x3d')];_0x2375ca+=0x1){socket[_0x65e6('0x74')](_0x65e6('0x8a'),{'UserId':Number(_0x41bad3[_0x65e6('0x4f')][_0x65e6('0x6a')][_0x2375ca]),'OpenchannelQueueId':Number(_0x41bad3['params']['id'])});}return _0x41f13f;});}})[_0x65e6('0x29')](respondWithResult(_0x20c701,null))[_0x65e6('0x49')](handleError(_0x20c701,null));};exports[_0x65e6('0x86')]=function(_0x2a109a,_0x4f4d7d,_0x37ad39){return db[_0x65e6('0x31')]['find']({'where':{'id':_0x2a109a[_0x65e6('0x4b')]['id']}})[_0x65e6('0x29')](handleEntityNotFound(_0x4f4d7d,null))[_0x65e6('0x29')](function(_0x5c4e46){if(_0x5c4e46){return _0x5c4e46[_0x65e6('0x86')](_0x2a109a['query']['ids'])[_0x65e6('0x29')](function(){if(_[_0x65e6('0x8b')](_0x2a109a[_0x65e6('0x38')][_0x65e6('0x6a')])){for(var _0x84941=0x0;_0x84941<_0x2a109a[_0x65e6('0x38')][_0x65e6('0x6a')][_0x65e6('0x3d')];_0x84941+=0x1){socket['emit']('userOpenchannelQueue:remove',{'UserId':Number(_0x2a109a[_0x65e6('0x38')][_0x65e6('0x6a')][_0x84941]),'OpenchannelQueueId':Number(_0x2a109a['params']['id'])});}}else{socket['emit']('userOpenchannelQueue:remove',{'UserId':Number(_0x2a109a[_0x65e6('0x38')][_0x65e6('0x6a')]),'OpenchannelQueueId':Number(_0x2a109a[_0x65e6('0x4b')]['id'])});}});}})[_0x65e6('0x29')](respondWithStatusCode(_0x4f4d7d,null))['catch'](handleError(_0x4f4d7d,null));};exports['getAgents']=function(_0x51b76a,_0x197d64,_0x5dd455){var _0x13632b={};var _0x56d4f2={};var _0x25d12a;var _0x197360;return db[_0x65e6('0x31')][_0x65e6('0x68')]({'where':{'id':_0x51b76a['params']['id']}})['then'](handleEntityNotFound(_0x197d64,null))[_0x65e6('0x29')](function(_0x5251e9){if(_0x5251e9){_0x25d12a=_0x5251e9;_0x56d4f2[_0x65e6('0x36')]=_[_0x65e6('0x4c')](db['User'][_0x65e6('0x32')]);_0x56d4f2[_0x65e6('0x38')]=_[_0x65e6('0x4c')](_0x51b76a[_0x65e6('0x38')]);_0x56d4f2[_0x65e6('0x39')]=_['intersection'](_0x56d4f2[_0x65e6('0x36')],_0x56d4f2[_0x65e6('0x38')]);_0x13632b[_0x65e6('0x3b')]=_[_0x65e6('0x3a')](_0x56d4f2[_0x65e6('0x36')],qs[_0x65e6('0x3c')](_0x51b76a[_0x65e6('0x38')]['fields']));_0x13632b['attributes']=_0x13632b[_0x65e6('0x3b')][_0x65e6('0x3d')]?_0x13632b[_0x65e6('0x3b')]:_0x56d4f2['model'];_0x13632b[_0x65e6('0x3f')]=qs[_0x65e6('0x40')](_0x51b76a[_0x65e6('0x38')][_0x65e6('0x40')]);_0x13632b['where']=qs[_0x65e6('0x39')](_[_0x65e6('0x42')](_0x51b76a[_0x65e6('0x38')],_0x56d4f2[_0x65e6('0x39')]));if(_0x51b76a[_0x65e6('0x38')][_0x65e6('0x43')]){_0x13632b[_0x65e6('0x41')]=_['merge'](_0x13632b[_0x65e6('0x41')],{'$or':_['map'](_0x13632b[_0x65e6('0x3b')],function(_0x3d5f7f){var _0x3a66f6={};_0x3a66f6[_0x3d5f7f]={'$like':'%'+_0x51b76a[_0x65e6('0x38')][_0x65e6('0x43')]+'%'};return _0x3a66f6;})});}_0x13632b=_['merge']({},_0x13632b,_0x51b76a['options']);return _0x25d12a[_0x65e6('0x8c')](_0x13632b);}})[_0x65e6('0x29')](function(_0x2c2cb5){if(_0x2c2cb5){_0x197360=_0x2c2cb5[_0x65e6('0x3d')];if(!_0x51b76a[_0x65e6('0x38')][_0x65e6('0x5a')](_0x65e6('0x3e'))){_0x13632b[_0x65e6('0x24')]=qs[_0x65e6('0x24')](_0x51b76a['query'][_0x65e6('0x24')]);_0x13632b[_0x65e6('0x21')]=qs[_0x65e6('0x21')](_0x51b76a['query']['offset']);}return _0x25d12a['getAgents'](_0x13632b);}})[_0x65e6('0x29')](function(_0x17118d){if(_0x17118d){return _0x17118d?{'count':_0x197360,'rows':_0x17118d}:null;}})[_0x65e6('0x29')](respondWithResult(_0x197d64,null))[_0x65e6('0x49')](handleError(_0x197d64,null));}; \ No newline at end of file diff --git a/server/api/openchannelQueue/openchannelQueue.events.js b/server/api/openchannelQueue/openchannelQueue.events.js index f92ac23..e7ed3d9 100644 --- a/server/api/openchannelQueue/openchannelQueue.events.js +++ b/server/api/openchannelQueue/openchannelQueue.events.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x5625=['events','../../mysqldb','OpenchannelQueue','setMaxListeners','save','update','emit','exports'];(function(_0x15459a,_0x21f8ae){var _0x4a979a=function(_0x1afe55){while(--_0x1afe55){_0x15459a['push'](_0x15459a['shift']());}};_0x4a979a(++_0x21f8ae);}(_0x5625,0x1f0));var _0x5562=function(_0x3f484e,_0xc57601){_0x3f484e=_0x3f484e-0x0;var _0x4a5478=_0x5625[_0x3f484e];return _0x4a5478;};'use strict';var EventEmitter=require(_0x5562('0x0'));var OpenchannelQueue=require(_0x5562('0x1'))['db'][_0x5562('0x2')];var OpenchannelQueueEvents=new EventEmitter();OpenchannelQueueEvents[_0x5562('0x3')](0x0);var events={'afterCreate':_0x5562('0x4'),'afterUpdate':_0x5562('0x5'),'afterDestroy':'remove'};function emitEvent(_0x559e00){return function(_0x5e6270,_0x55019e,_0xeb03c4){OpenchannelQueueEvents[_0x5562('0x6')](_0x559e00+':'+_0x5e6270['id'],_0x5e6270);OpenchannelQueueEvents[_0x5562('0x6')](_0x559e00,_0x5e6270);_0xeb03c4(null);};}for(var e in events){if(events['hasOwnProperty'](e)){var event=events[e];OpenchannelQueue['hook'](e,emitEvent(event));}}module[_0x5562('0x7')]=OpenchannelQueueEvents; \ No newline at end of file +var _0xd583=['update','remove','emit','hasOwnProperty','hook','events','../../mysqldb','OpenchannelQueue','setMaxListeners'];(function(_0x51042b,_0x12cca8){var _0x450779=function(_0x394dbc){while(--_0x394dbc){_0x51042b['push'](_0x51042b['shift']());}};_0x450779(++_0x12cca8);}(_0xd583,0x1c7));var _0x3d58=function(_0x533110,_0x20937f){_0x533110=_0x533110-0x0;var _0xc3c866=_0xd583[_0x533110];return _0xc3c866;};'use strict';var EventEmitter=require(_0x3d58('0x0'));var OpenchannelQueue=require(_0x3d58('0x1'))['db'][_0x3d58('0x2')];var OpenchannelQueueEvents=new EventEmitter();OpenchannelQueueEvents[_0x3d58('0x3')](0x0);var events={'afterCreate':'save','afterUpdate':_0x3d58('0x4'),'afterDestroy':_0x3d58('0x5')};function emitEvent(_0x48a28b){return function(_0x4dac22,_0x40a372,_0x2ff515){OpenchannelQueueEvents[_0x3d58('0x6')](_0x48a28b+':'+_0x4dac22['id'],_0x4dac22);OpenchannelQueueEvents[_0x3d58('0x6')](_0x48a28b,_0x4dac22);_0x2ff515(null);};}for(var e in events){if(events[_0x3d58('0x7')](e)){var event=events[e];OpenchannelQueue[_0x3d58('0x8')](e,emitEvent(event));}}module['exports']=OpenchannelQueueEvents; \ No newline at end of file diff --git a/server/api/openchannelQueue/openchannelQueue.model.js b/server/api/openchannelQueue/openchannelQueue.model.js index d072830..49f313f 100644 --- a/server/api/openchannelQueue/openchannelQueue.model.js +++ b/server/api/openchannelQueue/openchannelQueue.model.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x5f62=['../../config/environment','./openchannelQueue.attributes','define','OpenchannelQueue','openchannel_queues','lodash','util','../../config/logger','api','moment','bluebird','request-promise','path'];(function(_0xa8883,_0x1f107f){var _0x479426=function(_0x4e56b9){while(--_0x4e56b9){_0xa8883['push'](_0xa8883['shift']());}};_0x479426(++_0x1f107f);}(_0x5f62,0x130));var _0x25f6=function(_0x1581bc,_0x23b9de){_0x1581bc=_0x1581bc-0x0;var _0x5e7936=_0x5f62[_0x1581bc];return _0x5e7936;};'use strict';var _=require(_0x25f6('0x0'));var util=require(_0x25f6('0x1'));var logger=require(_0x25f6('0x2'))(_0x25f6('0x3'));var moment=require(_0x25f6('0x4'));var BPromise=require(_0x25f6('0x5'));var rp=require(_0x25f6('0x6'));var fs=require('fs');var path=require(_0x25f6('0x7'));var rimraf=require('rimraf');var config=require(_0x25f6('0x8'));var attributes=require(_0x25f6('0x9'));module['exports']=function(_0x2830b5,_0x340a30){return _0x2830b5[_0x25f6('0xa')](_0x25f6('0xb'),attributes,{'tableName':_0x25f6('0xc'),'paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file +var _0x0df7=['lodash','../../config/logger','api','moment','request-promise','path','rimraf','../../config/environment','./openchannelQueue.attributes','define','OpenchannelQueue','openchannel_queues'];(function(_0x4b0e17,_0x115014){var _0x1a9a90=function(_0x2dbbc4){while(--_0x2dbbc4){_0x4b0e17['push'](_0x4b0e17['shift']());}};_0x1a9a90(++_0x115014);}(_0x0df7,0x1bc));var _0x70df=function(_0x57d553,_0x11df2){_0x57d553=_0x57d553-0x0;var _0x45bdd4=_0x0df7[_0x57d553];return _0x45bdd4;};'use strict';var _=require(_0x70df('0x0'));var util=require('util');var logger=require(_0x70df('0x1'))(_0x70df('0x2'));var moment=require(_0x70df('0x3'));var BPromise=require('bluebird');var rp=require(_0x70df('0x4'));var fs=require('fs');var path=require(_0x70df('0x5'));var rimraf=require(_0x70df('0x6'));var config=require(_0x70df('0x7'));var attributes=require(_0x70df('0x8'));module['exports']=function(_0x32c33d,_0x330ecd){return _0x32c33d[_0x70df('0x9')](_0x70df('0xa'),attributes,{'tableName':_0x70df('0xb'),'paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file diff --git a/server/api/openchannelQueue/openchannelQueue.rpc.js b/server/api/openchannelQueue/openchannelQueue.rpc.js index abbcc9b..42fe94f 100644 --- a/server/api/openchannelQueue/openchannelQueue.rpc.js +++ b/server/api/openchannelQueue/openchannelQueue.rpc.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xe5c9=['ShowOpenchannelQueue','OpenchannelQueue','find','debug','lodash','util','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','jayson/promise','client','http','defaults','redis','localhost','socket.io-emitter','./openchannelQueue.socket','OpenchannelQueue,\x20%s,\x20%s','request\x20sent','OpenchannelQueue,\x20%s,\x20%s,\x20%s','stringify','error','message','info','result','catch','findAll','options','raw','where','limit','include','map','model','attributes','then','GetOpenchannelQueue'];(function(_0x323818,_0x433d1a){var _0x591b4d=function(_0x345856){while(--_0x345856){_0x323818['push'](_0x323818['shift']());}};_0x591b4d(++_0x433d1a);}(_0xe5c9,0x11c));var _0x9e5c=function(_0x26543f,_0x31791a){_0x26543f=_0x26543f-0x0;var _0x55c0da=_0xe5c9[_0x26543f];return _0x55c0da;};'use strict';var _=require(_0x9e5c('0x0'));var util=require(_0x9e5c('0x1'));var moment=require('moment');var BPromise=require('bluebird');var rs=require(_0x9e5c('0x2'));var fs=require('fs');var Redis=require(_0x9e5c('0x3'));var db=require(_0x9e5c('0x4'))['db'];var utils=require(_0x9e5c('0x5'));var logger=require(_0x9e5c('0x6'))(_0x9e5c('0x7'));var config=require('../../config/environment');var jayson=require(_0x9e5c('0x8'));var client=jayson[_0x9e5c('0x9')][_0x9e5c('0xa')]({'port':0x232a});config['redis']=_[_0x9e5c('0xb')](config[_0x9e5c('0xc')],{'host':_0x9e5c('0xd'),'port':0x18eb});var socket=require(_0x9e5c('0xe'))(new Redis(config[_0x9e5c('0xc')]));require(_0x9e5c('0xf'))['register'](socket);function respondWithRpcPromise(_0x403001,_0x2941fe,_0x4220cb){return new BPromise(function(_0x487ded,_0x66ed0b){return client['request'](_0x403001,_0x4220cb)['then'](function(_0x4828ef){logger['info'](_0x9e5c('0x10'),_0x2941fe,_0x9e5c('0x11'));logger['debug'](_0x9e5c('0x12'),_0x2941fe,_0x9e5c('0x11'),JSON[_0x9e5c('0x13')](_0x4828ef));if(_0x4828ef[_0x9e5c('0x14')]){if(_0x4828ef[_0x9e5c('0x14')]['code']===0x1f4){logger[_0x9e5c('0x14')](_0x9e5c('0x10'),_0x2941fe,_0x4828ef[_0x9e5c('0x14')][_0x9e5c('0x15')]);return _0x66ed0b(_0x4828ef[_0x9e5c('0x14')][_0x9e5c('0x15')]);}logger[_0x9e5c('0x14')]('OpenchannelQueue,\x20%s,\x20%s',_0x2941fe,_0x4828ef[_0x9e5c('0x14')][_0x9e5c('0x15')]);return _0x487ded(_0x4828ef[_0x9e5c('0x14')]['message']);}else{logger[_0x9e5c('0x16')](_0x9e5c('0x10'),_0x2941fe,_0x9e5c('0x11'));_0x487ded(_0x4828ef[_0x9e5c('0x17')][_0x9e5c('0x15')]);}})[_0x9e5c('0x18')](function(_0x4a8e24){logger[_0x9e5c('0x14')](_0x9e5c('0x10'),_0x2941fe,_0x4a8e24);_0x66ed0b(_0x4a8e24);});});}exports['GetOpenchannelQueue']=function(_0xa569ad){var _0x443998=this;return new Promise(function(_0x684d39,_0x40a6ec){return db['OpenchannelQueue'][_0x9e5c('0x19')]({'raw':_0xa569ad[_0x9e5c('0x1a')]?_0xa569ad[_0x9e5c('0x1a')][_0x9e5c('0x1b')]===undefined?!![]:![]:!![],'where':_0xa569ad['options']?_0xa569ad[_0x9e5c('0x1a')][_0x9e5c('0x1c')]||null:null,'attributes':_0xa569ad[_0x9e5c('0x1a')]?_0xa569ad[_0x9e5c('0x1a')]['attributes']||null:null,'limit':_0xa569ad[_0x9e5c('0x1a')]?_0xa569ad['options'][_0x9e5c('0x1d')]||null:null,'include':_0xa569ad[_0x9e5c('0x1a')]?_0xa569ad['options'][_0x9e5c('0x1e')]?_[_0x9e5c('0x1f')](_0xa569ad[_0x9e5c('0x1a')]['include'],function(_0x351d63){return{'model':db[_0x351d63[_0x9e5c('0x20')]],'as':_0x351d63['as'],'attributes':_0x351d63[_0x9e5c('0x21')],'include':_0x351d63[_0x9e5c('0x1e')]?_['map'](_0x351d63[_0x9e5c('0x1e')],function(_0x54aa47){return{'model':db[_0x54aa47[_0x9e5c('0x20')]],'as':_0x54aa47['as'],'attributes':_0x54aa47[_0x9e5c('0x21')],'include':_0x54aa47['include']?_[_0x9e5c('0x1f')](_0x54aa47[_0x9e5c('0x1e')],function(_0x4144eb){return{'model':db[_0x4144eb[_0x9e5c('0x20')]],'as':_0x4144eb['as'],'attributes':_0x4144eb['attributes']};}):[]};}):[]};}):[]:[]})[_0x9e5c('0x22')](function(_0x24ef22){logger[_0x9e5c('0x16')](_0x9e5c('0x23'),_0xa569ad);logger['debug']('GetOpenchannelQueue',_0xa569ad,JSON[_0x9e5c('0x13')](_0x24ef22));_0x684d39(_0x24ef22);})[_0x9e5c('0x18')](function(_0x46b2f5){logger['error'](_0x9e5c('0x23'),_0x46b2f5[_0x9e5c('0x15')],_0xa569ad);_0x40a6ec(_0x443998[_0x9e5c('0x14')](0x1f4,_0x46b2f5[_0x9e5c('0x15')]));});});};exports[_0x9e5c('0x24')]=function(_0xf79e9a){var _0x367047=this;return new Promise(function(_0x555f52,_0x2531f0){return db[_0x9e5c('0x25')][_0x9e5c('0x26')]({'raw':_0xf79e9a['options']?_0xf79e9a[_0x9e5c('0x1a')][_0x9e5c('0x1b')]===undefined?!![]:![]:!![],'where':_0xf79e9a[_0x9e5c('0x1a')]?_0xf79e9a[_0x9e5c('0x1a')][_0x9e5c('0x1c')]||null:null,'attributes':_0xf79e9a[_0x9e5c('0x1a')]?_0xf79e9a[_0x9e5c('0x1a')][_0x9e5c('0x21')]||null:null,'include':_0xf79e9a[_0x9e5c('0x1a')]?_0xf79e9a[_0x9e5c('0x1a')][_0x9e5c('0x1e')]?_[_0x9e5c('0x1f')](_0xf79e9a['options'][_0x9e5c('0x1e')],function(_0x31fce4){return{'model':db[_0x31fce4[_0x9e5c('0x20')]],'as':_0x31fce4['as'],'attributes':_0x31fce4[_0x9e5c('0x21')],'include':_0x31fce4[_0x9e5c('0x1e')]?_['map'](_0x31fce4[_0x9e5c('0x1e')],function(_0x55b79b){return{'model':db[_0x55b79b[_0x9e5c('0x20')]],'as':_0x55b79b['as'],'attributes':_0x55b79b['attributes'],'include':_0x55b79b[_0x9e5c('0x1e')]?_[_0x9e5c('0x1f')](_0x55b79b[_0x9e5c('0x1e')],function(_0x5a99e0){return{'model':db[_0x5a99e0[_0x9e5c('0x20')]],'as':_0x5a99e0['as'],'attributes':_0x5a99e0[_0x9e5c('0x21')]};}):[]};}):[]};}):[]:[]})['then'](function(_0x5e3255){logger['info']('ShowOpenchannelQueue',_0xf79e9a);logger[_0x9e5c('0x27')]('ShowOpenchannelQueue',_0xf79e9a,JSON[_0x9e5c('0x13')](_0x5e3255));_0x555f52(_0x5e3255);})[_0x9e5c('0x18')](function(_0xb67132){logger['error'](_0x9e5c('0x24'),_0xb67132[_0x9e5c('0x15')],_0xf79e9a);_0x2531f0(_0x367047[_0x9e5c('0x14')](0x1f4,_0xb67132[_0x9e5c('0x15')]));});});}; \ No newline at end of file +var _0x492f=['model','map','ShowOpenchannelQueue','find','raw','stringify','lodash','util','moment','bluebird','randomstring','ioredis','../../config/utils','../../config/logger','rpc','../../config/environment','client','http','redis','defaults','localhost','socket.io-emitter','./openchannelQueue.socket','request','then','info','OpenchannelQueue,\x20%s,\x20%s','request\x20sent','debug','error','code','message','catch','GetOpenchannelQueue','OpenchannelQueue','findAll','options','where','attributes','include'];(function(_0xaaea17,_0x41dab2){var _0x29a24b=function(_0x179848){while(--_0x179848){_0xaaea17['push'](_0xaaea17['shift']());}};_0x29a24b(++_0x41dab2);}(_0x492f,0x146));var _0xf492=function(_0x8b2d2e,_0x50ed7b){_0x8b2d2e=_0x8b2d2e-0x0;var _0x1c05b4=_0x492f[_0x8b2d2e];return _0x1c05b4;};'use strict';var _=require(_0xf492('0x0'));var util=require(_0xf492('0x1'));var moment=require(_0xf492('0x2'));var BPromise=require(_0xf492('0x3'));var rs=require(_0xf492('0x4'));var fs=require('fs');var Redis=require(_0xf492('0x5'));var db=require('../../mysqldb')['db'];var utils=require(_0xf492('0x6'));var logger=require(_0xf492('0x7'))(_0xf492('0x8'));var config=require(_0xf492('0x9'));var jayson=require('jayson/promise');var client=jayson[_0xf492('0xa')][_0xf492('0xb')]({'port':0x232a});config[_0xf492('0xc')]=_[_0xf492('0xd')](config[_0xf492('0xc')],{'host':_0xf492('0xe'),'port':0x18eb});var socket=require(_0xf492('0xf'))(new Redis(config[_0xf492('0xc')]));require(_0xf492('0x10'))['register'](socket);function respondWithRpcPromise(_0x8f6dfe,_0x16536a,_0x40a152){return new BPromise(function(_0x27b3e2,_0x294241){return client[_0xf492('0x11')](_0x8f6dfe,_0x40a152)[_0xf492('0x12')](function(_0x40db57){logger[_0xf492('0x13')](_0xf492('0x14'),_0x16536a,_0xf492('0x15'));logger[_0xf492('0x16')]('OpenchannelQueue,\x20%s,\x20%s,\x20%s',_0x16536a,_0xf492('0x15'),JSON['stringify'](_0x40db57));if(_0x40db57[_0xf492('0x17')]){if(_0x40db57[_0xf492('0x17')][_0xf492('0x18')]===0x1f4){logger[_0xf492('0x17')]('OpenchannelQueue,\x20%s,\x20%s',_0x16536a,_0x40db57[_0xf492('0x17')][_0xf492('0x19')]);return _0x294241(_0x40db57['error'][_0xf492('0x19')]);}logger[_0xf492('0x17')](_0xf492('0x14'),_0x16536a,_0x40db57[_0xf492('0x17')]['message']);return _0x27b3e2(_0x40db57[_0xf492('0x17')]['message']);}else{logger['info'](_0xf492('0x14'),_0x16536a,'request\x20sent');_0x27b3e2(_0x40db57['result'][_0xf492('0x19')]);}})[_0xf492('0x1a')](function(_0xa2f7ca){logger['error'](_0xf492('0x14'),_0x16536a,_0xa2f7ca);_0x294241(_0xa2f7ca);});});}exports[_0xf492('0x1b')]=function(_0x505317){var _0x4fe691=this;return new Promise(function(_0x834c23,_0x468fe0){return db[_0xf492('0x1c')][_0xf492('0x1d')]({'raw':_0x505317[_0xf492('0x1e')]?_0x505317[_0xf492('0x1e')]['raw']===undefined?!![]:![]:!![],'where':_0x505317[_0xf492('0x1e')]?_0x505317[_0xf492('0x1e')][_0xf492('0x1f')]||null:null,'attributes':_0x505317[_0xf492('0x1e')]?_0x505317[_0xf492('0x1e')][_0xf492('0x20')]||null:null,'limit':_0x505317[_0xf492('0x1e')]?_0x505317['options']['limit']||null:null,'include':_0x505317['options']?_0x505317[_0xf492('0x1e')][_0xf492('0x21')]?_['map'](_0x505317[_0xf492('0x1e')][_0xf492('0x21')],function(_0x3e1aa2){return{'model':db[_0x3e1aa2[_0xf492('0x22')]],'as':_0x3e1aa2['as'],'attributes':_0x3e1aa2[_0xf492('0x20')],'include':_0x3e1aa2[_0xf492('0x21')]?_['map'](_0x3e1aa2[_0xf492('0x21')],function(_0x345981){return{'model':db[_0x345981['model']],'as':_0x345981['as'],'attributes':_0x345981[_0xf492('0x20')],'include':_0x345981[_0xf492('0x21')]?_[_0xf492('0x23')](_0x345981[_0xf492('0x21')],function(_0x92db73){return{'model':db[_0x92db73[_0xf492('0x22')]],'as':_0x92db73['as'],'attributes':_0x92db73['attributes']};}):[]};}):[]};}):[]:[]})[_0xf492('0x12')](function(_0x513cfc){logger['info'](_0xf492('0x1b'),_0x505317);logger[_0xf492('0x16')](_0xf492('0x1b'),_0x505317,JSON['stringify'](_0x513cfc));_0x834c23(_0x513cfc);})['catch'](function(_0x55e963){logger[_0xf492('0x17')](_0xf492('0x1b'),_0x55e963[_0xf492('0x19')],_0x505317);_0x468fe0(_0x4fe691['error'](0x1f4,_0x55e963[_0xf492('0x19')]));});});};exports[_0xf492('0x24')]=function(_0x541ad6){var _0x2c7d1a=this;return new Promise(function(_0x178b4c,_0x27a9f6){return db[_0xf492('0x1c')][_0xf492('0x25')]({'raw':_0x541ad6[_0xf492('0x1e')]?_0x541ad6[_0xf492('0x1e')][_0xf492('0x26')]===undefined?!![]:![]:!![],'where':_0x541ad6[_0xf492('0x1e')]?_0x541ad6['options']['where']||null:null,'attributes':_0x541ad6[_0xf492('0x1e')]?_0x541ad6[_0xf492('0x1e')][_0xf492('0x20')]||null:null,'include':_0x541ad6[_0xf492('0x1e')]?_0x541ad6[_0xf492('0x1e')][_0xf492('0x21')]?_[_0xf492('0x23')](_0x541ad6['options'][_0xf492('0x21')],function(_0xb06b48){return{'model':db[_0xb06b48[_0xf492('0x22')]],'as':_0xb06b48['as'],'attributes':_0xb06b48[_0xf492('0x20')],'include':_0xb06b48[_0xf492('0x21')]?_[_0xf492('0x23')](_0xb06b48[_0xf492('0x21')],function(_0xf8361){return{'model':db[_0xf8361[_0xf492('0x22')]],'as':_0xf8361['as'],'attributes':_0xf8361[_0xf492('0x20')],'include':_0xf8361[_0xf492('0x21')]?_[_0xf492('0x23')](_0xf8361['include'],function(_0x8cb971){return{'model':db[_0x8cb971[_0xf492('0x22')]],'as':_0x8cb971['as'],'attributes':_0x8cb971[_0xf492('0x20')]};}):[]};}):[]};}):[]:[]})['then'](function(_0x5164c1){logger[_0xf492('0x13')](_0xf492('0x24'),_0x541ad6);logger['debug'](_0xf492('0x24'),_0x541ad6,JSON[_0xf492('0x27')](_0x5164c1));_0x178b4c(_0x5164c1);})[_0xf492('0x1a')](function(_0x16c2f5){logger[_0xf492('0x17')](_0xf492('0x24'),_0x16c2f5[_0xf492('0x19')],_0x541ad6);_0x27a9f6(_0x2c7d1a[_0xf492('0x17')](0x1f4,_0x16c2f5[_0xf492('0x19')]));});});}; \ No newline at end of file diff --git a/server/api/openchannelQueue/openchannelQueue.socket.js b/server/api/openchannelQueue/openchannelQueue.socket.js index 8625737..d32f1b8 100644 --- a/server/api/openchannelQueue/openchannelQueue.socket.js +++ b/server/api/openchannelQueue/openchannelQueue.socket.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xb220=['update','emit','removeListener','register','length','save','remove'];(function(_0x2353fe,_0x4b0bca){var _0x4d43f6=function(_0x5d0bd9){while(--_0x5d0bd9){_0x2353fe['push'](_0x2353fe['shift']());}};_0x4d43f6(++_0x4b0bca);}(_0xb220,0x1a2));var _0x0b22=function(_0x21f19f,_0x5a0e67){_0x21f19f=_0x21f19f-0x0;var _0x2ccf9d=_0xb220[_0x21f19f];return _0x2ccf9d;};'use strict';var OpenchannelQueueEvents=require('./openchannelQueue.events');var events=[_0x0b22('0x0'),_0x0b22('0x1'),_0x0b22('0x2')];function createListener(_0x4da7e6,_0x21f310){return function(_0x7123b){_0x21f310[_0x0b22('0x3')](_0x4da7e6,_0x7123b);};}function removeListener(_0x332c52,_0x4a3d21){return function(){OpenchannelQueueEvents[_0x0b22('0x4')](_0x332c52,_0x4a3d21);};}exports[_0x0b22('0x5')]=function(_0x54d39f){for(var _0x274142=0x0,_0x403e3e=events[_0x0b22('0x6')];_0x274142<_0x403e3e;_0x274142++){var _0x34d612=events[_0x274142];var _0x3b13f1=createListener('openchannelQueue:'+_0x34d612,_0x54d39f);OpenchannelQueueEvents['on'](_0x34d612,_0x3b13f1);}}; \ No newline at end of file +var _0xc81e=['register','length','openchannelQueue:','./openchannelQueue.events','save','remove','update','emit','removeListener'];(function(_0x2e24c5,_0x14f847){var _0x2b8936=function(_0x2fd397){while(--_0x2fd397){_0x2e24c5['push'](_0x2e24c5['shift']());}};_0x2b8936(++_0x14f847);}(_0xc81e,0x78));var _0xec81=function(_0x46aff0,_0x122890){_0x46aff0=_0x46aff0-0x0;var _0x9d78cf=_0xc81e[_0x46aff0];return _0x9d78cf;};'use strict';var OpenchannelQueueEvents=require(_0xec81('0x0'));var events=[_0xec81('0x1'),_0xec81('0x2'),_0xec81('0x3')];function createListener(_0x19b701,_0x47b0f1){return function(_0x5abf55){_0x47b0f1[_0xec81('0x4')](_0x19b701,_0x5abf55);};}function removeListener(_0x44a68d,_0x48becb){return function(){OpenchannelQueueEvents[_0xec81('0x5')](_0x44a68d,_0x48becb);};}exports[_0xec81('0x6')]=function(_0x36576e){for(var _0x120bb1=0x0,_0x1ce0b7=events[_0xec81('0x7')];_0x120bb1<_0x1ce0b7;_0x120bb1++){var _0x529c36=events[_0x120bb1];var _0x4b2b5c=createListener(_0xec81('0x8')+_0x529c36,_0x36576e);OpenchannelQueueEvents['on'](_0x529c36,_0x4b2b5c);}}; \ No newline at end of file diff --git a/server/api/openchannelQueueReport/index.js b/server/api/openchannelQueueReport/index.js index a08a9e2..93cbf36 100644 --- a/server/api/openchannelQueueReport/index.js +++ b/server/api/openchannelQueueReport/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x47b7=['post','create','put','update','delete','destroy','exports','multer','util','path','express','Router','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','get','isAuthenticated','index','describe','/:id','show'];(function(_0xc3cd14,_0x1aea34){var _0x46ff60=function(_0x2a2c5e){while(--_0x2a2c5e){_0xc3cd14['push'](_0xc3cd14['shift']());}};_0x46ff60(++_0x1aea34);}(_0x47b7,0xb7));var _0x747b=function(_0x4b10e0,_0x38bbce){_0x4b10e0=_0x4b10e0-0x0;var _0x260f95=_0x47b7[_0x4b10e0];return _0x260f95;};'use strict';var multer=require(_0x747b('0x0'));var util=require(_0x747b('0x1'));var path=require(_0x747b('0x2'));var timeout=require('connect-timeout');var express=require(_0x747b('0x3'));var router=express[_0x747b('0x4')]();var fs_extra=require(_0x747b('0x5'));var auth=require(_0x747b('0x6'));var interaction=require(_0x747b('0x7'));var config=require(_0x747b('0x8'));var controller=require('./openchannelQueueReport.controller');router[_0x747b('0x9')]('/',auth[_0x747b('0xa')](),controller[_0x747b('0xb')]);router['get']('/describe',auth['isAuthenticated'](),controller[_0x747b('0xc')]);router['get'](_0x747b('0xd'),auth[_0x747b('0xa')](),controller[_0x747b('0xe')]);router[_0x747b('0xf')]('/',auth[_0x747b('0xa')](),controller[_0x747b('0x10')]);router[_0x747b('0x11')](_0x747b('0xd'),auth[_0x747b('0xa')](),controller[_0x747b('0x12')]);router[_0x747b('0x13')](_0x747b('0xd'),auth[_0x747b('0xa')](),controller[_0x747b('0x14')]);module[_0x747b('0x15')]=router; \ No newline at end of file +var _0x2a75=['isAuthenticated','index','/describe','describe','/:id','show','create','put','delete','exports','multer','util','path','Router','fs-extra','../../components/auth/service','../../components/interaction/service','get'];(function(_0x4e9b1f,_0x305d28){var _0x5aad4c=function(_0x2ee5e9){while(--_0x2ee5e9){_0x4e9b1f['push'](_0x4e9b1f['shift']());}};_0x5aad4c(++_0x305d28);}(_0x2a75,0x196));var _0x52a7=function(_0x2de540,_0x4a69da){_0x2de540=_0x2de540-0x0;var _0xd0f2d8=_0x2a75[_0x2de540];return _0xd0f2d8;};'use strict';var multer=require(_0x52a7('0x0'));var util=require(_0x52a7('0x1'));var path=require(_0x52a7('0x2'));var timeout=require('connect-timeout');var express=require('express');var router=express[_0x52a7('0x3')]();var fs_extra=require(_0x52a7('0x4'));var auth=require(_0x52a7('0x5'));var interaction=require(_0x52a7('0x6'));var config=require('../../config/environment');var controller=require('./openchannelQueueReport.controller');router[_0x52a7('0x7')]('/',auth[_0x52a7('0x8')](),controller[_0x52a7('0x9')]);router[_0x52a7('0x7')](_0x52a7('0xa'),auth[_0x52a7('0x8')](),controller[_0x52a7('0xb')]);router[_0x52a7('0x7')](_0x52a7('0xc'),auth[_0x52a7('0x8')](),controller[_0x52a7('0xd')]);router['post']('/',auth[_0x52a7('0x8')](),controller[_0x52a7('0xe')]);router[_0x52a7('0xf')](_0x52a7('0xc'),auth[_0x52a7('0x8')](),controller['update']);router[_0x52a7('0x10')](_0x52a7('0xc'),auth[_0x52a7('0x8')](),controller['destroy']);module[_0x52a7('0x11')]=router; \ No newline at end of file diff --git a/server/api/openchannelQueueReport/openchannelQueueReport.attributes.js b/server/api/openchannelQueueReport/openchannelQueueReport.attributes.js index 0639a37..fdd9777 100644 --- a/server/api/openchannelQueueReport/openchannelQueueReport.attributes.js +++ b/server/api/openchannelQueueReport/openchannelQueueReport.attributes.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xa973=['moment','sequelize','exports','STRING','DATE'];(function(_0x1d1963,_0x32cc0e){var _0x3f58bb=function(_0x514823){while(--_0x514823){_0x1d1963['push'](_0x1d1963['shift']());}};_0x3f58bb(++_0x32cc0e);}(_0xa973,0x73));var _0x3a97=function(_0x122e42,_0x222609){_0x122e42=_0x122e42-0x0;var _0x4c019e=_0xa973[_0x122e42];return _0x4c019e;};'use strict';var moment=require(_0x3a97('0x0'));var Sequelize=require(_0x3a97('0x1'));module[_0x3a97('0x2')]={'uniqueid':{'type':Sequelize[_0x3a97('0x3')],'allowNull':![]},'from':{'type':Sequelize['STRING']},'joinAt':{'type':Sequelize['DATE']},'leaveAt':{'type':Sequelize['DATE']},'acceptAt':{'type':Sequelize[_0x3a97('0x4')]},'exitAt':{'type':Sequelize['DATE']},'reason':{'type':Sequelize[_0x3a97('0x3')]}}; \ No newline at end of file +var _0x8f13=['STRING','DATE','moment','sequelize','exports'];(function(_0x11f0e3,_0x5170bc){var _0x2892e8=function(_0x3292b2){while(--_0x3292b2){_0x11f0e3['push'](_0x11f0e3['shift']());}};_0x2892e8(++_0x5170bc);}(_0x8f13,0x1b0));var _0x38f1=function(_0x5ca5bc,_0x5b8a9d){_0x5ca5bc=_0x5ca5bc-0x0;var _0x26ca86=_0x8f13[_0x5ca5bc];return _0x26ca86;};'use strict';var moment=require(_0x38f1('0x0'));var Sequelize=require(_0x38f1('0x1'));module[_0x38f1('0x2')]={'uniqueid':{'type':Sequelize[_0x38f1('0x3')],'allowNull':![]},'from':{'type':Sequelize['STRING']},'joinAt':{'type':Sequelize[_0x38f1('0x4')]},'leaveAt':{'type':Sequelize[_0x38f1('0x4')]},'acceptAt':{'type':Sequelize[_0x38f1('0x4')]},'exitAt':{'type':Sequelize['DATE']},'reason':{'type':Sequelize[_0x38f1('0x3')]}}; \ No newline at end of file diff --git a/server/api/openchannelQueueReport/openchannelQueueReport.controller.js b/server/api/openchannelQueueReport/openchannelQueueReport.controller.js index f5f8a3c..1ce0d3b 100644 --- a/server/api/openchannelQueueReport/openchannelQueueReport.controller.js +++ b/server/api/openchannelQueueReport/openchannelQueueReport.controller.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xc3c2=['papaparse','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','sendStatus','end','status','json','offset','limit','undefined','count','set','Content-Range','apply','save','update','then','destroy','error','stack','name','send','map','OpenchannelQueueReport','rawAttributes','fieldName','type','key','query','keys','intersection','model','attributes','fields','length','hasOwnProperty','order','sort','where','filters','pick','filter','merge','VIRTUAL','options','includeAll','include','findAll','rows','catch','show','params','create','body','find','describe','eml-format','rimraf','fast-json-patch','request-promise','mustache','util','path','sox','to-csv','ejs','lodash','squel','crypto','jsforce','desk.js','querystring'];(function(_0x3e0c4e,_0x9b6b80){var _0x1f0370=function(_0x37e61c){while(--_0x37e61c){_0x3e0c4e['push'](_0x3e0c4e['shift']());}};_0x1f0370(++_0x9b6b80);}(_0xc3c2,0x1d0));var _0x2c3c=function(_0x78aab9,_0x519b59){_0x78aab9=_0x78aab9-0x0;var _0x263259=_0xc3c2[_0x78aab9];return _0x263259;};'use strict';var emlformat=require(_0x2c3c('0x0'));var rimraf=require(_0x2c3c('0x1'));var zipdir=require('zip-dir');var jsonpatch=require(_0x2c3c('0x2'));var rp=require(_0x2c3c('0x3'));var moment=require('moment');var BPromise=require('bluebird');var Mustache=require(_0x2c3c('0x4'));var util=require(_0x2c3c('0x5'));var path=require(_0x2c3c('0x6'));var sox=require(_0x2c3c('0x7'));var csv=require(_0x2c3c('0x8'));var ejs=require(_0x2c3c('0x9'));var fs=require('fs');var fs_extra=require('fs-extra');var _=require(_0x2c3c('0xa'));var squel=require(_0x2c3c('0xb'));var crypto=require(_0x2c3c('0xc'));var jsforce=require(_0x2c3c('0xd'));var deskjs=require(_0x2c3c('0xe'));var toCsv=require(_0x2c3c('0x8'));var querystring=require(_0x2c3c('0xf'));var Papa=require(_0x2c3c('0x10'));var Redis=require('ioredis');var authService=require(_0x2c3c('0x11'));var qs=require(_0x2c3c('0x12'));var as=require(_0x2c3c('0x13'));var hardwareService=require(_0x2c3c('0x14'));var logger=require(_0x2c3c('0x15'))(_0x2c3c('0x16'));var utils=require(_0x2c3c('0x17'));var config=require(_0x2c3c('0x18'));var licenseUtil=require(_0x2c3c('0x19'));var db=require(_0x2c3c('0x1a'))['db'];function respondWithStatusCode(_0x3db654,_0x213b49){_0x213b49=_0x213b49||0xcc;return function(_0x4fe2a0){if(_0x4fe2a0){return _0x3db654[_0x2c3c('0x1b')](_0x213b49);}return _0x3db654['status'](_0x213b49)[_0x2c3c('0x1c')]();};}function respondWithResult(_0x4db7c4,_0x31f701){_0x31f701=_0x31f701||0xc8;return function(_0x5631cd){if(_0x5631cd){return _0x4db7c4[_0x2c3c('0x1d')](_0x31f701)[_0x2c3c('0x1e')](_0x5631cd);}};}function respondWithFilteredResult(_0x2a1c23,_0x4fe35e){return function(_0x5d717e){if(_0x5d717e){var _0x57a582=typeof _0x4fe35e[_0x2c3c('0x1f')]==='undefined'&&typeof _0x4fe35e[_0x2c3c('0x20')]===_0x2c3c('0x21');var _0x27add8=_0x5d717e[_0x2c3c('0x22')];var _0x402775=_0x57a582?0x0:_0x4fe35e[_0x2c3c('0x1f')];var _0x569851=_0x57a582?_0x5d717e[_0x2c3c('0x22')]:_0x4fe35e[_0x2c3c('0x1f')]+_0x4fe35e['limit'];var _0x49736;if(_0x569851>=_0x27add8){_0x569851=_0x27add8;_0x49736=0xc8;}else{_0x49736=0xce;}_0x2a1c23[_0x2c3c('0x1d')](_0x49736);return _0x2a1c23[_0x2c3c('0x23')](_0x2c3c('0x24'),_0x402775+'-'+_0x569851+'/'+_0x27add8)[_0x2c3c('0x1e')](_0x5d717e);}return null;};}function patchUpdates(_0xb66e6d){return function(_0x43d0bc){try{jsonpatch[_0x2c3c('0x25')](_0x43d0bc,_0xb66e6d,!![]);}catch(_0x567020){return BPromise['reject'](_0x567020);}return _0x43d0bc[_0x2c3c('0x26')]();};}function saveUpdates(_0x361429,_0x2c039f){return function(_0x3d48f3){if(_0x3d48f3){return _0x3d48f3[_0x2c3c('0x27')](_0x361429)[_0x2c3c('0x28')](function(_0x164fb7){return _0x164fb7;});}return null;};}function removeEntity(_0x4fd127,_0x106655){return function(_0xe94dcd){if(_0xe94dcd){return _0xe94dcd[_0x2c3c('0x29')]()[_0x2c3c('0x28')](function(){_0x4fd127[_0x2c3c('0x1d')](0xcc)['end']();});}};}function handleEntityNotFound(_0x2d3fec,_0xecc8c1){return function(_0x16cf9a){if(!_0x16cf9a){_0x2d3fec[_0x2c3c('0x1b')](0x194);}return _0x16cf9a;};}function handleError(_0x3b77a6,_0x361c49){_0x361c49=_0x361c49||0x1f4;return function(_0x1302b1){logger[_0x2c3c('0x2a')](_0x1302b1[_0x2c3c('0x2b')]);if(_0x1302b1[_0x2c3c('0x2c')]){delete _0x1302b1[_0x2c3c('0x2c')];}_0x3b77a6[_0x2c3c('0x1d')](_0x361c49)[_0x2c3c('0x2d')](_0x1302b1);};}exports['index']=function(_0x239e41,_0x1a4857){var _0xaede0f={},_0x4bcc64={},_0x3fb372={'count':0x0,'rows':[]};var _0x1bb462=_[_0x2c3c('0x2e')](db[_0x2c3c('0x2f')][_0x2c3c('0x30')],function(_0x13665f){return{'name':_0x13665f[_0x2c3c('0x31')],'type':_0x13665f[_0x2c3c('0x32')][_0x2c3c('0x33')]};});_0x4bcc64['model']=_[_0x2c3c('0x2e')](_0x1bb462,_0x2c3c('0x2c'));_0x4bcc64[_0x2c3c('0x34')]=_[_0x2c3c('0x35')](_0x239e41[_0x2c3c('0x34')]);_0x4bcc64['filters']=_[_0x2c3c('0x36')](_0x4bcc64[_0x2c3c('0x37')],_0x4bcc64[_0x2c3c('0x34')]);_0xaede0f[_0x2c3c('0x38')]=_[_0x2c3c('0x36')](_0x4bcc64[_0x2c3c('0x37')],qs[_0x2c3c('0x39')](_0x239e41[_0x2c3c('0x34')][_0x2c3c('0x39')]));_0xaede0f[_0x2c3c('0x38')]=_0xaede0f[_0x2c3c('0x38')][_0x2c3c('0x3a')]?_0xaede0f['attributes']:_0x4bcc64[_0x2c3c('0x37')];if(!_0x239e41[_0x2c3c('0x34')][_0x2c3c('0x3b')]('nolimit')){_0xaede0f[_0x2c3c('0x20')]=qs[_0x2c3c('0x20')](_0x239e41[_0x2c3c('0x34')]['limit']);_0xaede0f[_0x2c3c('0x1f')]=qs[_0x2c3c('0x1f')](_0x239e41['query'][_0x2c3c('0x1f')]);}_0xaede0f[_0x2c3c('0x3c')]=qs['sort'](_0x239e41['query'][_0x2c3c('0x3d')]);_0xaede0f[_0x2c3c('0x3e')]=qs[_0x2c3c('0x3f')](_[_0x2c3c('0x40')](_0x239e41['query'],_0x4bcc64[_0x2c3c('0x3f')]),_0x1bb462);if(_0x239e41[_0x2c3c('0x34')][_0x2c3c('0x41')]){_0xaede0f[_0x2c3c('0x3e')]=_[_0x2c3c('0x42')](_0xaede0f[_0x2c3c('0x3e')],{'$or':_['map'](_0x1bb462,function(_0x1aea99){if(_0x1aea99[_0x2c3c('0x32')]!==_0x2c3c('0x43')){var _0x2066aa={};_0x2066aa[_0x1aea99[_0x2c3c('0x2c')]]={'$like':'%'+_0x239e41[_0x2c3c('0x34')][_0x2c3c('0x41')]+'%'};return _0x2066aa;}})});}_0xaede0f=_['merge']({},_0xaede0f,_0x239e41[_0x2c3c('0x44')]);var _0x2bfa47={'where':_0xaede0f[_0x2c3c('0x3e')]};return db[_0x2c3c('0x2f')][_0x2c3c('0x22')](_0x2bfa47)[_0x2c3c('0x28')](function(_0x105ceb){_0x3fb372['count']=_0x105ceb;if(_0x239e41[_0x2c3c('0x34')][_0x2c3c('0x45')]){_0xaede0f[_0x2c3c('0x46')]=[{'all':!![]}];}return db[_0x2c3c('0x2f')][_0x2c3c('0x47')](_0xaede0f);})['then'](function(_0x4bfdb1){_0x3fb372[_0x2c3c('0x48')]=_0x4bfdb1;return _0x3fb372;})[_0x2c3c('0x28')](respondWithFilteredResult(_0x1a4857,_0xaede0f))[_0x2c3c('0x49')](handleError(_0x1a4857,null));};exports[_0x2c3c('0x4a')]=function(_0x26dbbb,_0x1d2baf){var _0x42974f={'raw':!![],'where':{'id':_0x26dbbb[_0x2c3c('0x4b')]['id']}},_0x54e470={};_0x54e470[_0x2c3c('0x37')]=_[_0x2c3c('0x35')](db[_0x2c3c('0x2f')]['rawAttributes']);_0x54e470[_0x2c3c('0x34')]=_[_0x2c3c('0x35')](_0x26dbbb[_0x2c3c('0x34')]);_0x54e470['filters']=_['intersection'](_0x54e470[_0x2c3c('0x37')],_0x54e470['query']);_0x42974f['attributes']=_['intersection'](_0x54e470[_0x2c3c('0x37')],qs['fields'](_0x26dbbb[_0x2c3c('0x34')]['fields']));_0x42974f[_0x2c3c('0x38')]=_0x42974f['attributes'][_0x2c3c('0x3a')]?_0x42974f[_0x2c3c('0x38')]:_0x54e470['model'];if(_0x26dbbb[_0x2c3c('0x34')][_0x2c3c('0x45')]){_0x42974f[_0x2c3c('0x46')]=[{'all':!![]}];}_0x42974f=_[_0x2c3c('0x42')]({},_0x42974f,_0x26dbbb[_0x2c3c('0x44')]);return db[_0x2c3c('0x2f')]['find'](_0x42974f)[_0x2c3c('0x28')](handleEntityNotFound(_0x1d2baf,null))[_0x2c3c('0x28')](respondWithResult(_0x1d2baf,null))[_0x2c3c('0x49')](handleError(_0x1d2baf,null));};exports[_0x2c3c('0x4c')]=function(_0x57204d,_0x4214a3){return db['OpenchannelQueueReport']['create'](_0x57204d['body'],{})['then'](respondWithResult(_0x4214a3,0xc9))[_0x2c3c('0x49')](handleError(_0x4214a3,null));};exports[_0x2c3c('0x27')]=function(_0x2dc3e5,_0x42a024){if(_0x2dc3e5[_0x2c3c('0x4d')]['id']){delete _0x2dc3e5['body']['id'];}return db[_0x2c3c('0x2f')]['find']({'where':{'id':_0x2dc3e5[_0x2c3c('0x4b')]['id']}})['then'](handleEntityNotFound(_0x42a024,null))[_0x2c3c('0x28')](saveUpdates(_0x2dc3e5['body'],null))[_0x2c3c('0x28')](respondWithResult(_0x42a024,null))[_0x2c3c('0x49')](handleError(_0x42a024,null));};exports[_0x2c3c('0x29')]=function(_0x436245,_0x2c91d4){return db[_0x2c3c('0x2f')][_0x2c3c('0x4e')]({'where':{'id':_0x436245['params']['id']}})[_0x2c3c('0x28')](handleEntityNotFound(_0x2c91d4,null))[_0x2c3c('0x28')](removeEntity(_0x2c91d4,null))[_0x2c3c('0x49')](handleError(_0x2c91d4,null));};exports[_0x2c3c('0x4f')]=function(_0x11b192,_0x1fa49d){return db[_0x2c3c('0x2f')][_0x2c3c('0x4f')]()[_0x2c3c('0x28')](respondWithResult(_0x1fa49d,null))[_0x2c3c('0x49')](handleError(_0x1fa49d,null));}; \ No newline at end of file +var _0xb734=['mustache','util','to-csv','ejs','squel','crypto','desk.js','papaparse','ioredis','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/license/util','../../mysqldb','status','end','json','offset','undefined','limit','count','apply','reject','save','update','destroy','then','sendStatus','error','stack','name','send','index','map','OpenchannelQueueReport','fieldName','type','model','query','attributes','intersection','fields','length','hasOwnProperty','order','sort','where','filters','filter','merge','VIRTUAL','options','includeAll','include','findAll','rows','catch','show','keys','rawAttributes','find','create','body','params','describe','eml-format','rimraf','zip-dir','fast-json-patch','request-promise'];(function(_0x2dbe14,_0x4358a7){var _0x58d3a0=function(_0x441c64){while(--_0x441c64){_0x2dbe14['push'](_0x2dbe14['shift']());}};_0x58d3a0(++_0x4358a7);}(_0xb734,0x1ec));var _0x4b73=function(_0x3d18af,_0x5b4fa0){_0x3d18af=_0x3d18af-0x0;var _0x2ef919=_0xb734[_0x3d18af];return _0x2ef919;};'use strict';var emlformat=require(_0x4b73('0x0'));var rimraf=require(_0x4b73('0x1'));var zipdir=require(_0x4b73('0x2'));var jsonpatch=require(_0x4b73('0x3'));var rp=require(_0x4b73('0x4'));var moment=require('moment');var BPromise=require('bluebird');var Mustache=require(_0x4b73('0x5'));var util=require(_0x4b73('0x6'));var path=require('path');var sox=require('sox');var csv=require(_0x4b73('0x7'));var ejs=require(_0x4b73('0x8'));var fs=require('fs');var fs_extra=require('fs-extra');var _=require('lodash');var squel=require(_0x4b73('0x9'));var crypto=require(_0x4b73('0xa'));var jsforce=require('jsforce');var deskjs=require(_0x4b73('0xb'));var toCsv=require(_0x4b73('0x7'));var querystring=require('querystring');var Papa=require(_0x4b73('0xc'));var Redis=require(_0x4b73('0xd'));var authService=require('../../components/auth/service');var qs=require('../../components/parsers/qs');var as=require(_0x4b73('0xe'));var hardwareService=require(_0x4b73('0xf'));var logger=require(_0x4b73('0x10'))(_0x4b73('0x11'));var utils=require('../../config/utils');var config=require('../../config/environment');var licenseUtil=require(_0x4b73('0x12'));var db=require(_0x4b73('0x13'))['db'];function respondWithStatusCode(_0x4e7dab,_0x27b97a){_0x27b97a=_0x27b97a||0xcc;return function(_0x69e6f4){if(_0x69e6f4){return _0x4e7dab['sendStatus'](_0x27b97a);}return _0x4e7dab[_0x4b73('0x14')](_0x27b97a)[_0x4b73('0x15')]();};}function respondWithResult(_0x2ae7c5,_0x17a185){_0x17a185=_0x17a185||0xc8;return function(_0x134133){if(_0x134133){return _0x2ae7c5[_0x4b73('0x14')](_0x17a185)[_0x4b73('0x16')](_0x134133);}};}function respondWithFilteredResult(_0x104acb,_0x2f6750){return function(_0x5a288f){if(_0x5a288f){var _0x26d4cd=typeof _0x2f6750[_0x4b73('0x17')]===_0x4b73('0x18')&&typeof _0x2f6750[_0x4b73('0x19')]===_0x4b73('0x18');var _0x138c98=_0x5a288f[_0x4b73('0x1a')];var _0x1659c4=_0x26d4cd?0x0:_0x2f6750[_0x4b73('0x17')];var _0x1b1db1=_0x26d4cd?_0x5a288f[_0x4b73('0x1a')]:_0x2f6750[_0x4b73('0x17')]+_0x2f6750[_0x4b73('0x19')];var _0x9cded2;if(_0x1b1db1>=_0x138c98){_0x1b1db1=_0x138c98;_0x9cded2=0xc8;}else{_0x9cded2=0xce;}_0x104acb['status'](_0x9cded2);return _0x104acb['set']('Content-Range',_0x1659c4+'-'+_0x1b1db1+'/'+_0x138c98)[_0x4b73('0x16')](_0x5a288f);}return null;};}function patchUpdates(_0x471f16){return function(_0x250fa6){try{jsonpatch[_0x4b73('0x1b')](_0x250fa6,_0x471f16,!![]);}catch(_0x370b60){return BPromise[_0x4b73('0x1c')](_0x370b60);}return _0x250fa6[_0x4b73('0x1d')]();};}function saveUpdates(_0x4d3cb7,_0x2ba27d){return function(_0x5517f9){if(_0x5517f9){return _0x5517f9[_0x4b73('0x1e')](_0x4d3cb7)['then'](function(_0x4e1739){return _0x4e1739;});}return null;};}function removeEntity(_0x4cfe72,_0x1c15ee){return function(_0x47699e){if(_0x47699e){return _0x47699e[_0x4b73('0x1f')]()[_0x4b73('0x20')](function(){_0x4cfe72[_0x4b73('0x14')](0xcc)['end']();});}};}function handleEntityNotFound(_0xcf45e4,_0x2878d6){return function(_0x1d6777){if(!_0x1d6777){_0xcf45e4[_0x4b73('0x21')](0x194);}return _0x1d6777;};}function handleError(_0x30ffdf,_0x588c49){_0x588c49=_0x588c49||0x1f4;return function(_0x241111){logger[_0x4b73('0x22')](_0x241111[_0x4b73('0x23')]);if(_0x241111[_0x4b73('0x24')]){delete _0x241111[_0x4b73('0x24')];}_0x30ffdf[_0x4b73('0x14')](_0x588c49)[_0x4b73('0x25')](_0x241111);};}exports[_0x4b73('0x26')]=function(_0x5aaf31,_0x25a3cf){var _0x322920={},_0x472a4d={},_0x50e5ac={'count':0x0,'rows':[]};var _0x1f4a78=_[_0x4b73('0x27')](db[_0x4b73('0x28')]['rawAttributes'],function(_0x4911dd){return{'name':_0x4911dd[_0x4b73('0x29')],'type':_0x4911dd[_0x4b73('0x2a')]['key']};});_0x472a4d[_0x4b73('0x2b')]=_[_0x4b73('0x27')](_0x1f4a78,_0x4b73('0x24'));_0x472a4d[_0x4b73('0x2c')]=_['keys'](_0x5aaf31[_0x4b73('0x2c')]);_0x472a4d['filters']=_['intersection'](_0x472a4d[_0x4b73('0x2b')],_0x472a4d[_0x4b73('0x2c')]);_0x322920[_0x4b73('0x2d')]=_[_0x4b73('0x2e')](_0x472a4d[_0x4b73('0x2b')],qs[_0x4b73('0x2f')](_0x5aaf31[_0x4b73('0x2c')]['fields']));_0x322920[_0x4b73('0x2d')]=_0x322920['attributes'][_0x4b73('0x30')]?_0x322920['attributes']:_0x472a4d[_0x4b73('0x2b')];if(!_0x5aaf31['query'][_0x4b73('0x31')]('nolimit')){_0x322920[_0x4b73('0x19')]=qs[_0x4b73('0x19')](_0x5aaf31[_0x4b73('0x2c')][_0x4b73('0x19')]);_0x322920['offset']=qs['offset'](_0x5aaf31[_0x4b73('0x2c')][_0x4b73('0x17')]);}_0x322920[_0x4b73('0x32')]=qs[_0x4b73('0x33')](_0x5aaf31[_0x4b73('0x2c')][_0x4b73('0x33')]);_0x322920[_0x4b73('0x34')]=qs['filters'](_['pick'](_0x5aaf31[_0x4b73('0x2c')],_0x472a4d[_0x4b73('0x35')]),_0x1f4a78);if(_0x5aaf31[_0x4b73('0x2c')][_0x4b73('0x36')]){_0x322920[_0x4b73('0x34')]=_[_0x4b73('0x37')](_0x322920[_0x4b73('0x34')],{'$or':_[_0x4b73('0x27')](_0x1f4a78,function(_0x104b34){if(_0x104b34[_0x4b73('0x2a')]!==_0x4b73('0x38')){var _0x20e840={};_0x20e840[_0x104b34[_0x4b73('0x24')]]={'$like':'%'+_0x5aaf31[_0x4b73('0x2c')][_0x4b73('0x36')]+'%'};return _0x20e840;}})});}_0x322920=_[_0x4b73('0x37')]({},_0x322920,_0x5aaf31[_0x4b73('0x39')]);var _0x37d841={'where':_0x322920[_0x4b73('0x34')]};return db[_0x4b73('0x28')][_0x4b73('0x1a')](_0x37d841)[_0x4b73('0x20')](function(_0x2edb3f){_0x50e5ac['count']=_0x2edb3f;if(_0x5aaf31['query'][_0x4b73('0x3a')]){_0x322920[_0x4b73('0x3b')]=[{'all':!![]}];}return db['OpenchannelQueueReport'][_0x4b73('0x3c')](_0x322920);})['then'](function(_0x3cce8a){_0x50e5ac[_0x4b73('0x3d')]=_0x3cce8a;return _0x50e5ac;})[_0x4b73('0x20')](respondWithFilteredResult(_0x25a3cf,_0x322920))[_0x4b73('0x3e')](handleError(_0x25a3cf,null));};exports[_0x4b73('0x3f')]=function(_0x2cfdec,_0xfae527){var _0x51b1bc={'raw':!![],'where':{'id':_0x2cfdec['params']['id']}},_0x2b347b={};_0x2b347b['model']=_[_0x4b73('0x40')](db[_0x4b73('0x28')][_0x4b73('0x41')]);_0x2b347b[_0x4b73('0x2c')]=_[_0x4b73('0x40')](_0x2cfdec[_0x4b73('0x2c')]);_0x2b347b['filters']=_['intersection'](_0x2b347b[_0x4b73('0x2b')],_0x2b347b['query']);_0x51b1bc[_0x4b73('0x2d')]=_[_0x4b73('0x2e')](_0x2b347b['model'],qs['fields'](_0x2cfdec[_0x4b73('0x2c')][_0x4b73('0x2f')]));_0x51b1bc[_0x4b73('0x2d')]=_0x51b1bc[_0x4b73('0x2d')][_0x4b73('0x30')]?_0x51b1bc['attributes']:_0x2b347b['model'];if(_0x2cfdec[_0x4b73('0x2c')][_0x4b73('0x3a')]){_0x51b1bc['include']=[{'all':!![]}];}_0x51b1bc=_[_0x4b73('0x37')]({},_0x51b1bc,_0x2cfdec['options']);return db[_0x4b73('0x28')][_0x4b73('0x42')](_0x51b1bc)['then'](handleEntityNotFound(_0xfae527,null))['then'](respondWithResult(_0xfae527,null))['catch'](handleError(_0xfae527,null));};exports[_0x4b73('0x43')]=function(_0x3c5222,_0x1069ec){return db[_0x4b73('0x28')]['create'](_0x3c5222[_0x4b73('0x44')],{})[_0x4b73('0x20')](respondWithResult(_0x1069ec,0xc9))[_0x4b73('0x3e')](handleError(_0x1069ec,null));};exports['update']=function(_0x28f2e1,_0x3e1ad4){if(_0x28f2e1[_0x4b73('0x44')]['id']){delete _0x28f2e1[_0x4b73('0x44')]['id'];}return db['OpenchannelQueueReport']['find']({'where':{'id':_0x28f2e1[_0x4b73('0x45')]['id']}})[_0x4b73('0x20')](handleEntityNotFound(_0x3e1ad4,null))['then'](saveUpdates(_0x28f2e1[_0x4b73('0x44')],null))['then'](respondWithResult(_0x3e1ad4,null))['catch'](handleError(_0x3e1ad4,null));};exports[_0x4b73('0x1f')]=function(_0x5dc331,_0xf74380){return db[_0x4b73('0x28')][_0x4b73('0x42')]({'where':{'id':_0x5dc331[_0x4b73('0x45')]['id']}})[_0x4b73('0x20')](handleEntityNotFound(_0xf74380,null))[_0x4b73('0x20')](removeEntity(_0xf74380,null))[_0x4b73('0x3e')](handleError(_0xf74380,null));};exports[_0x4b73('0x46')]=function(_0x41350b,_0x36b788){return db[_0x4b73('0x28')]['describe']()[_0x4b73('0x20')](respondWithResult(_0x36b788,null))[_0x4b73('0x3e')](handleError(_0x36b788,null));}; \ No newline at end of file diff --git a/server/api/openchannelQueueReport/openchannelQueueReport.model.js b/server/api/openchannelQueueReport/openchannelQueueReport.model.js index 22d7e7f..8a1eebc 100644 --- a/server/api/openchannelQueueReport/openchannelQueueReport.model.js +++ b/server/api/openchannelQueueReport/openchannelQueueReport.model.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x814b=['../../config/logger','api','moment','bluebird','path','rimraf','../../config/environment','./openchannelQueueReport.attributes','exports','define','OpenchannelQueueReport','uniqueid','lodash','util'];(function(_0x43b08,_0x15f967){var _0x5e05f4=function(_0x4bb0cb){while(--_0x4bb0cb){_0x43b08['push'](_0x43b08['shift']());}};_0x5e05f4(++_0x15f967);}(_0x814b,0x1a2));var _0xb814=function(_0x3c1ca2,_0x3428ae){_0x3c1ca2=_0x3c1ca2-0x0;var _0x310c01=_0x814b[_0x3c1ca2];return _0x310c01;};'use strict';var _=require(_0xb814('0x0'));var util=require(_0xb814('0x1'));var logger=require(_0xb814('0x2'))(_0xb814('0x3'));var moment=require(_0xb814('0x4'));var BPromise=require(_0xb814('0x5'));var rp=require('request-promise');var fs=require('fs');var path=require(_0xb814('0x6'));var rimraf=require(_0xb814('0x7'));var config=require(_0xb814('0x8'));var attributes=require(_0xb814('0x9'));module[_0xb814('0xa')]=function(_0x322a70,_0x53e507){return _0x322a70[_0xb814('0xb')](_0xb814('0xc'),attributes,{'tableName':'report_openchannel_queue','paranoid':![],'indexes':[{'name':_0xb814('0xd'),'fields':[_0xb814('0xd')]}],'timestamps':!![]});}; \ No newline at end of file +var _0x814b=['../../config/logger','api','moment','bluebird','path','rimraf','../../config/environment','./openchannelQueueReport.attributes','exports','define','OpenchannelQueueReport','uniqueid','lodash','util'];(function(_0x3d8ca8,_0x1a9764){var _0x517e45=function(_0x641ad9){while(--_0x641ad9){_0x3d8ca8['push'](_0x3d8ca8['shift']());}};_0x517e45(++_0x1a9764);}(_0x814b,0x1a2));var _0xb814=function(_0x59eefb,_0x2151ce){_0x59eefb=_0x59eefb-0x0;var _0x1a49e8=_0x814b[_0x59eefb];return _0x1a49e8;};'use strict';var _=require(_0xb814('0x0'));var util=require(_0xb814('0x1'));var logger=require(_0xb814('0x2'))(_0xb814('0x3'));var moment=require(_0xb814('0x4'));var BPromise=require(_0xb814('0x5'));var rp=require('request-promise');var fs=require('fs');var path=require(_0xb814('0x6'));var rimraf=require(_0xb814('0x7'));var config=require(_0xb814('0x8'));var attributes=require(_0xb814('0x9'));module[_0xb814('0xa')]=function(_0x322a70,_0x53e507){return _0x322a70[_0xb814('0xb')](_0xb814('0xc'),attributes,{'tableName':'report_openchannel_queue','paranoid':![],'indexes':[{'name':_0xb814('0xd'),'fields':[_0xb814('0xd')]}],'timestamps':!![]});}; \ No newline at end of file diff --git a/server/api/openchannelQueueReport/openchannelQueueReport.rpc.js b/server/api/openchannelQueueReport/openchannelQueueReport.rpc.js index ada67c4..a3d86e7 100644 --- a/server/api/openchannelQueueReport/openchannelQueueReport.rpc.js +++ b/server/api/openchannelQueueReport/openchannelQueueReport.rpc.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x4af8=['catch','CreateOpenchannelQueueReport','OpenchannelQueueReport','create','body','options','raw','stringify','UpdateOpenchannelQueueReport','update','where','attributes','limit','randomstring','ioredis','../../mysqldb','../../config/utils','rpc','../../config/environment','client','http','request','then','info','request\x20sent','debug','OpenchannelQueueReport,\x20%s,\x20%s,\x20%s','error','code','message','OpenchannelQueueReport,\x20%s,\x20%s','result'];(function(_0x57b54c,_0x54ce0d){var _0x59cc19=function(_0xa33bc6){while(--_0xa33bc6){_0x57b54c['push'](_0x57b54c['shift']());}};_0x59cc19(++_0x54ce0d);}(_0x4af8,0x1ad));var _0x84af=function(_0x5e3b04,_0xbb6795){_0x5e3b04=_0x5e3b04-0x0;var _0x1fc44d=_0x4af8[_0x5e3b04];return _0x1fc44d;};'use strict';var _=require('lodash');var util=require('util');var moment=require('moment');var BPromise=require('bluebird');var rs=require(_0x84af('0x0'));var fs=require('fs');var Redis=require(_0x84af('0x1'));var db=require(_0x84af('0x2'))['db'];var utils=require(_0x84af('0x3'));var logger=require('../../config/logger')(_0x84af('0x4'));var config=require(_0x84af('0x5'));var jayson=require('jayson/promise');var client=jayson[_0x84af('0x6')][_0x84af('0x7')]({'port':0x232a});function respondWithRpcPromise(_0x550ee6,_0x422c5b,_0x294bc8){return new BPromise(function(_0x483ecc,_0x5b5e45){return client[_0x84af('0x8')](_0x550ee6,_0x294bc8)[_0x84af('0x9')](function(_0x479e1b){logger[_0x84af('0xa')]('OpenchannelQueueReport,\x20%s,\x20%s',_0x422c5b,_0x84af('0xb'));logger[_0x84af('0xc')](_0x84af('0xd'),_0x422c5b,_0x84af('0xb'),JSON['stringify'](_0x479e1b));if(_0x479e1b[_0x84af('0xe')]){if(_0x479e1b['error'][_0x84af('0xf')]===0x1f4){logger[_0x84af('0xe')]('OpenchannelQueueReport,\x20%s,\x20%s',_0x422c5b,_0x479e1b[_0x84af('0xe')][_0x84af('0x10')]);return _0x5b5e45(_0x479e1b[_0x84af('0xe')][_0x84af('0x10')]);}logger['error'](_0x84af('0x11'),_0x422c5b,_0x479e1b['error'][_0x84af('0x10')]);return _0x483ecc(_0x479e1b[_0x84af('0xe')]['message']);}else{logger[_0x84af('0xa')](_0x84af('0x11'),_0x422c5b,'request\x20sent');_0x483ecc(_0x479e1b[_0x84af('0x12')]['message']);}})[_0x84af('0x13')](function(_0x33baf1){logger['error']('OpenchannelQueueReport,\x20%s,\x20%s',_0x422c5b,_0x33baf1);_0x5b5e45(_0x33baf1);});});}exports[_0x84af('0x14')]=function(_0xd8120b){var _0x38a120=this;return new Promise(function(_0x4cf5b4,_0x4d0cf0){return db[_0x84af('0x15')][_0x84af('0x16')](_0xd8120b[_0x84af('0x17')],{'raw':_0xd8120b[_0x84af('0x18')]?_0xd8120b[_0x84af('0x18')][_0x84af('0x19')]===undefined?!![]:![]:!![]})[_0x84af('0x9')](function(_0x334875){logger[_0x84af('0xa')]('CreateOpenchannelQueueReport',_0xd8120b);logger[_0x84af('0xc')](_0x84af('0x14'),_0xd8120b,JSON[_0x84af('0x1a')](_0x334875));_0x4cf5b4(_0x334875);})['catch'](function(_0x2f40d6){logger[_0x84af('0xe')](_0x84af('0x14'),_0x2f40d6['message'],_0xd8120b);_0x4d0cf0(_0x38a120['error'](0x1f4,_0x2f40d6[_0x84af('0x10')]));});});};exports[_0x84af('0x1b')]=function(_0xf72093){var _0x24aa07=this;return new Promise(function(_0x21823e,_0x1b23fb){return db[_0x84af('0x15')][_0x84af('0x1c')](_0xf72093[_0x84af('0x17')],{'raw':_0xf72093[_0x84af('0x18')]?_0xf72093[_0x84af('0x18')]['raw']===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0xf72093[_0x84af('0x18')]?_0xf72093[_0x84af('0x18')][_0x84af('0x1d')]||null:null,'attributes':_0xf72093[_0x84af('0x18')]?_0xf72093[_0x84af('0x18')][_0x84af('0x1e')]||null:null,'limit':_0xf72093[_0x84af('0x18')]?_0xf72093['options'][_0x84af('0x1f')]||null:null})[_0x84af('0x9')](function(_0x59417e){logger[_0x84af('0xa')](_0x84af('0x1b'),_0xf72093);logger[_0x84af('0xc')](_0x84af('0x1b'),_0xf72093,JSON['stringify'](_0x59417e));_0x21823e(_0x59417e);})['catch'](function(_0x3f37a0){logger[_0x84af('0xe')](_0x84af('0x1b'),_0x3f37a0[_0x84af('0x10')],_0xf72093);_0x1b23fb(_0x24aa07[_0x84af('0xe')](0x1f4,_0x3f37a0[_0x84af('0x10')]));});});}; \ No newline at end of file +var _0x958a=['http','then','info','OpenchannelQueueReport,\x20%s,\x20%s','request\x20sent','debug','OpenchannelQueueReport,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','catch','CreateOpenchannelQueueReport','OpenchannelQueueReport','create','body','options','raw','UpdateOpenchannelQueueReport','update','where','attributes','limit','lodash','util','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','rpc','jayson/promise','client'];(function(_0x12c97e,_0x31864e){var _0x4f7e3b=function(_0x433099){while(--_0x433099){_0x12c97e['push'](_0x12c97e['shift']());}};_0x4f7e3b(++_0x31864e);}(_0x958a,0x128));var _0xa958=function(_0x1ab2e7,_0x17687f){_0x1ab2e7=_0x1ab2e7-0x0;var _0x59fe74=_0x958a[_0x1ab2e7];return _0x59fe74;};'use strict';var _=require(_0xa958('0x0'));var util=require(_0xa958('0x1'));var moment=require('moment');var BPromise=require(_0xa958('0x2'));var rs=require(_0xa958('0x3'));var fs=require('fs');var Redis=require(_0xa958('0x4'));var db=require(_0xa958('0x5'))['db'];var utils=require(_0xa958('0x6'));var logger=require('../../config/logger')(_0xa958('0x7'));var config=require('../../config/environment');var jayson=require(_0xa958('0x8'));var client=jayson[_0xa958('0x9')][_0xa958('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x3ddaa9,_0x3ca01f,_0x3b2693){return new BPromise(function(_0x1895da,_0x54c0e0){return client['request'](_0x3ddaa9,_0x3b2693)[_0xa958('0xb')](function(_0x249764){logger[_0xa958('0xc')](_0xa958('0xd'),_0x3ca01f,_0xa958('0xe'));logger[_0xa958('0xf')](_0xa958('0x10'),_0x3ca01f,_0xa958('0xe'),JSON[_0xa958('0x11')](_0x249764));if(_0x249764[_0xa958('0x12')]){if(_0x249764[_0xa958('0x12')][_0xa958('0x13')]===0x1f4){logger[_0xa958('0x12')]('OpenchannelQueueReport,\x20%s,\x20%s',_0x3ca01f,_0x249764['error']['message']);return _0x54c0e0(_0x249764[_0xa958('0x12')][_0xa958('0x14')]);}logger[_0xa958('0x12')]('OpenchannelQueueReport,\x20%s,\x20%s',_0x3ca01f,_0x249764[_0xa958('0x12')]['message']);return _0x1895da(_0x249764['error']['message']);}else{logger[_0xa958('0xc')](_0xa958('0xd'),_0x3ca01f,_0xa958('0xe'));_0x1895da(_0x249764[_0xa958('0x15')][_0xa958('0x14')]);}})[_0xa958('0x16')](function(_0x23736f){logger[_0xa958('0x12')]('OpenchannelQueueReport,\x20%s,\x20%s',_0x3ca01f,_0x23736f);_0x54c0e0(_0x23736f);});});}exports[_0xa958('0x17')]=function(_0x4eadc9){var _0x3a053f=this;return new Promise(function(_0x70d13e,_0x52a184){return db[_0xa958('0x18')][_0xa958('0x19')](_0x4eadc9[_0xa958('0x1a')],{'raw':_0x4eadc9[_0xa958('0x1b')]?_0x4eadc9[_0xa958('0x1b')][_0xa958('0x1c')]===undefined?!![]:![]:!![]})['then'](function(_0x4a90c2){logger[_0xa958('0xc')](_0xa958('0x17'),_0x4eadc9);logger[_0xa958('0xf')]('CreateOpenchannelQueueReport',_0x4eadc9,JSON[_0xa958('0x11')](_0x4a90c2));_0x70d13e(_0x4a90c2);})[_0xa958('0x16')](function(_0x5c091a){logger[_0xa958('0x12')](_0xa958('0x17'),_0x5c091a['message'],_0x4eadc9);_0x52a184(_0x3a053f['error'](0x1f4,_0x5c091a[_0xa958('0x14')]));});});};exports[_0xa958('0x1d')]=function(_0x50b3c3){var _0x25f461=this;return new Promise(function(_0x27097a,_0x2f03df){return db[_0xa958('0x18')][_0xa958('0x1e')](_0x50b3c3[_0xa958('0x1a')],{'raw':_0x50b3c3['options']?_0x50b3c3[_0xa958('0x1b')]['raw']===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x50b3c3[_0xa958('0x1b')]?_0x50b3c3[_0xa958('0x1b')][_0xa958('0x1f')]||null:null,'attributes':_0x50b3c3[_0xa958('0x1b')]?_0x50b3c3[_0xa958('0x1b')][_0xa958('0x20')]||null:null,'limit':_0x50b3c3[_0xa958('0x1b')]?_0x50b3c3[_0xa958('0x1b')][_0xa958('0x21')]||null:null})[_0xa958('0xb')](function(_0x4c4c37){logger['info'](_0xa958('0x1d'),_0x50b3c3);logger['debug'](_0xa958('0x1d'),_0x50b3c3,JSON[_0xa958('0x11')](_0x4c4c37));_0x27097a(_0x4c4c37);})['catch'](function(_0x23bdbf){logger[_0xa958('0x12')](_0xa958('0x1d'),_0x23bdbf[_0xa958('0x14')],_0x50b3c3);_0x2f03df(_0x25f461[_0xa958('0x12')](0x1f4,_0x23bdbf['message']));});});}; \ No newline at end of file diff --git a/server/api/openchannelTransferReport/index.js b/server/api/openchannelTransferReport/index.js index d95a9c6..1fee3cd 100644 --- a/server/api/openchannelTransferReport/index.js +++ b/server/api/openchannelTransferReport/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x3f33=['path','connect-timeout','express','../../components/auth/service','../../config/environment','./openchannelTransferReport.controller','get','index','/describe','isAuthenticated','describe','/:id','show','post','create','update','delete','exports','util'];(function(_0x3680e3,_0x3a5972){var _0xc37bc7=function(_0x4cba95){while(--_0x4cba95){_0x3680e3['push'](_0x3680e3['shift']());}};_0xc37bc7(++_0x3a5972);}(_0x3f33,0x142));var _0x33f3=function(_0x113e32,_0x5339f0){_0x113e32=_0x113e32-0x0;var _0x4ff939=_0x3f33[_0x113e32];return _0x4ff939;};'use strict';var multer=require('multer');var util=require(_0x33f3('0x0'));var path=require(_0x33f3('0x1'));var timeout=require(_0x33f3('0x2'));var express=require(_0x33f3('0x3'));var router=express['Router']();var fs_extra=require('fs-extra');var auth=require(_0x33f3('0x4'));var interaction=require('../../components/interaction/service');var config=require(_0x33f3('0x5'));var controller=require(_0x33f3('0x6'));router[_0x33f3('0x7')]('/',auth['isAuthenticated'](),controller[_0x33f3('0x8')]);router[_0x33f3('0x7')](_0x33f3('0x9'),auth[_0x33f3('0xa')](),controller[_0x33f3('0xb')]);router[_0x33f3('0x7')](_0x33f3('0xc'),auth[_0x33f3('0xa')](),controller[_0x33f3('0xd')]);router[_0x33f3('0xe')]('/',auth[_0x33f3('0xa')](),controller[_0x33f3('0xf')]);router['put'](_0x33f3('0xc'),auth[_0x33f3('0xa')](),controller[_0x33f3('0x10')]);router[_0x33f3('0x11')]('/:id',auth[_0x33f3('0xa')](),controller['destroy']);module[_0x33f3('0x12')]=router; \ No newline at end of file +var _0x8139=['fs-extra','../../config/environment','get','isAuthenticated','/describe','describe','/:id','show','post','create','put','update','destroy','exports','multer','util','path','express','Router'];(function(_0x3328bd,_0x34b6cc){var _0xf2012a=function(_0x35a4e5){while(--_0x35a4e5){_0x3328bd['push'](_0x3328bd['shift']());}};_0xf2012a(++_0x34b6cc);}(_0x8139,0x93));var _0x9813=function(_0x1b1e85,_0x3822b5){_0x1b1e85=_0x1b1e85-0x0;var _0x4c3c41=_0x8139[_0x1b1e85];return _0x4c3c41;};'use strict';var multer=require(_0x9813('0x0'));var util=require(_0x9813('0x1'));var path=require(_0x9813('0x2'));var timeout=require('connect-timeout');var express=require(_0x9813('0x3'));var router=express[_0x9813('0x4')]();var fs_extra=require(_0x9813('0x5'));var auth=require('../../components/auth/service');var interaction=require('../../components/interaction/service');var config=require(_0x9813('0x6'));var controller=require('./openchannelTransferReport.controller');router[_0x9813('0x7')]('/',auth[_0x9813('0x8')](),controller['index']);router[_0x9813('0x7')](_0x9813('0x9'),auth[_0x9813('0x8')](),controller[_0x9813('0xa')]);router[_0x9813('0x7')](_0x9813('0xb'),auth[_0x9813('0x8')](),controller[_0x9813('0xc')]);router[_0x9813('0xd')]('/',auth[_0x9813('0x8')](),controller[_0x9813('0xe')]);router[_0x9813('0xf')]('/:id',auth[_0x9813('0x8')](),controller[_0x9813('0x10')]);router['delete'](_0x9813('0xb'),auth[_0x9813('0x8')](),controller[_0x9813('0x11')]);module[_0x9813('0x12')]=router; \ No newline at end of file diff --git a/server/api/openchannelTransferReport/openchannelTransferReport.attributes.js b/server/api/openchannelTransferReport/openchannelTransferReport.attributes.js index b27f871..dad7599 100644 --- a/server/api/openchannelTransferReport/openchannelTransferReport.attributes.js +++ b/server/api/openchannelTransferReport/openchannelTransferReport.attributes.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xf4eb=['NOW','moment','account','queue','DATE'];(function(_0x2f2d7d,_0x52b0ea){var _0x439b19=function(_0x5db701){while(--_0x5db701){_0x2f2d7d['push'](_0x2f2d7d['shift']());}};_0x439b19(++_0x52b0ea);}(_0xf4eb,0xec));var _0xbf4e=function(_0x301e9a,_0xda1cb9){_0x301e9a=_0x301e9a-0x0;var _0x3e11d8=_0xf4eb[_0x301e9a];return _0x3e11d8;};'use strict';var moment=require(_0xbf4e('0x0'));var Sequelize=require('sequelize');module['exports']={'uniqueid':{'type':Sequelize['STRING'],'allowNull':![]},'type':{'type':Sequelize['ENUM'](_0xbf4e('0x1'),'agent','queue'),'allowNull':![],'defaultValue':_0xbf4e('0x2')},'transferredAt':{'type':Sequelize[_0xbf4e('0x3')],'allowNull':![],'defaultValue':Sequelize[_0xbf4e('0x4')]}}; \ No newline at end of file +var _0x008c=['ENUM','agent','queue','DATE','NOW','moment','sequelize','exports','STRING'];(function(_0x117a06,_0x3860e4){var _0x53bfc2=function(_0xe0458c){while(--_0xe0458c){_0x117a06['push'](_0x117a06['shift']());}};_0x53bfc2(++_0x3860e4);}(_0x008c,0x188));var _0xc008=function(_0x5219aa,_0x357da6){_0x5219aa=_0x5219aa-0x0;var _0x479261=_0x008c[_0x5219aa];return _0x479261;};'use strict';var moment=require(_0xc008('0x0'));var Sequelize=require(_0xc008('0x1'));module[_0xc008('0x2')]={'uniqueid':{'type':Sequelize[_0xc008('0x3')],'allowNull':![]},'type':{'type':Sequelize[_0xc008('0x4')]('account',_0xc008('0x5'),_0xc008('0x6')),'allowNull':![],'defaultValue':_0xc008('0x6')},'transferredAt':{'type':Sequelize[_0xc008('0x7')],'allowNull':![],'defaultValue':Sequelize[_0xc008('0x8')]}}; \ No newline at end of file diff --git a/server/api/openchannelTransferReport/openchannelTransferReport.controller.js b/server/api/openchannelTransferReport/openchannelTransferReport.controller.js index f7e9768..57b7a5d 100644 --- a/server/api/openchannelTransferReport/openchannelTransferReport.controller.js +++ b/server/api/openchannelTransferReport/openchannelTransferReport.controller.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xbc50=['type','key','model','query','keys','filters','attributes','fields','hasOwnProperty','order','sort','where','pick','filter','merge','VIRTUAL','options','includeAll','findAll','rows','catch','show','params','rawAttributes','intersection','length','include','create','body','find','describe','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','util','path','sox','ejs','fs-extra','lodash','squel','crypto','jsforce','desk.js','querystring','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','end','status','offset','undefined','limit','count','set','Content-Range','json','apply','reject','save','update','then','error','stack','name','map','OpenchannelTransferReport','fieldName'];(function(_0x10a7cb,_0x2797fd){var _0x32a088=function(_0x2ccff3){while(--_0x2ccff3){_0x10a7cb['push'](_0x10a7cb['shift']());}};_0x32a088(++_0x2797fd);}(_0xbc50,0x112));var _0x0bc5=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0xbc50[_0x3dd15e];return _0x231fd0;};'use strict';var emlformat=require(_0x0bc5('0x0'));var rimraf=require(_0x0bc5('0x1'));var zipdir=require(_0x0bc5('0x2'));var jsonpatch=require(_0x0bc5('0x3'));var rp=require(_0x0bc5('0x4'));var moment=require(_0x0bc5('0x5'));var BPromise=require(_0x0bc5('0x6'));var Mustache=require(_0x0bc5('0x7'));var util=require(_0x0bc5('0x8'));var path=require(_0x0bc5('0x9'));var sox=require(_0x0bc5('0xa'));var csv=require('to-csv');var ejs=require(_0x0bc5('0xb'));var fs=require('fs');var fs_extra=require(_0x0bc5('0xc'));var _=require(_0x0bc5('0xd'));var squel=require(_0x0bc5('0xe'));var crypto=require(_0x0bc5('0xf'));var jsforce=require(_0x0bc5('0x10'));var deskjs=require(_0x0bc5('0x11'));var toCsv=require('to-csv');var querystring=require(_0x0bc5('0x12'));var Papa=require('papaparse');var Redis=require(_0x0bc5('0x13'));var authService=require(_0x0bc5('0x14'));var qs=require(_0x0bc5('0x15'));var as=require(_0x0bc5('0x16'));var hardwareService=require(_0x0bc5('0x17'));var logger=require(_0x0bc5('0x18'))(_0x0bc5('0x19'));var utils=require(_0x0bc5('0x1a'));var config=require(_0x0bc5('0x1b'));var licenseUtil=require(_0x0bc5('0x1c'));var db=require(_0x0bc5('0x1d'))['db'];function respondWithStatusCode(_0x14200b,_0xee3bb){_0xee3bb=_0xee3bb||0xcc;return function(_0x8ab98d){if(_0x8ab98d){return _0x14200b['sendStatus'](_0xee3bb);}return _0x14200b['status'](_0xee3bb)[_0x0bc5('0x1e')]();};}function respondWithResult(_0x4261c1,_0x467dcf){_0x467dcf=_0x467dcf||0xc8;return function(_0x5e5abb){if(_0x5e5abb){return _0x4261c1[_0x0bc5('0x1f')](_0x467dcf)['json'](_0x5e5abb);}};}function respondWithFilteredResult(_0x383ddc,_0x4698d6){return function(_0x22b6ae){if(_0x22b6ae){var _0x5abbb8=typeof _0x4698d6[_0x0bc5('0x20')]===_0x0bc5('0x21')&&typeof _0x4698d6[_0x0bc5('0x22')]===_0x0bc5('0x21');var _0x4f53fc=_0x22b6ae['count'];var _0x4185a6=_0x5abbb8?0x0:_0x4698d6[_0x0bc5('0x20')];var _0x2334c0=_0x5abbb8?_0x22b6ae[_0x0bc5('0x23')]:_0x4698d6[_0x0bc5('0x20')]+_0x4698d6[_0x0bc5('0x22')];var _0x297fdb;if(_0x2334c0>=_0x4f53fc){_0x2334c0=_0x4f53fc;_0x297fdb=0xc8;}else{_0x297fdb=0xce;}_0x383ddc[_0x0bc5('0x1f')](_0x297fdb);return _0x383ddc[_0x0bc5('0x24')](_0x0bc5('0x25'),_0x4185a6+'-'+_0x2334c0+'/'+_0x4f53fc)[_0x0bc5('0x26')](_0x22b6ae);}return null;};}function patchUpdates(_0x13b508){return function(_0x38d230){try{jsonpatch[_0x0bc5('0x27')](_0x38d230,_0x13b508,!![]);}catch(_0x1a819a){return BPromise[_0x0bc5('0x28')](_0x1a819a);}return _0x38d230[_0x0bc5('0x29')]();};}function saveUpdates(_0x3353bf,_0x34febe){return function(_0x25cee8){if(_0x25cee8){return _0x25cee8[_0x0bc5('0x2a')](_0x3353bf)[_0x0bc5('0x2b')](function(_0x1980cd){return _0x1980cd;});}return null;};}function removeEntity(_0x1bb4e2,_0x3a831f){return function(_0x1bbeb6){if(_0x1bbeb6){return _0x1bbeb6['destroy']()['then'](function(){_0x1bb4e2['status'](0xcc)['end']();});}};}function handleEntityNotFound(_0x50bbef,_0x2b3fe7){return function(_0x5b87dc){if(!_0x5b87dc){_0x50bbef['sendStatus'](0x194);}return _0x5b87dc;};}function handleError(_0x11b68a,_0x27f08e){_0x27f08e=_0x27f08e||0x1f4;return function(_0x4a7cd8){logger[_0x0bc5('0x2c')](_0x4a7cd8[_0x0bc5('0x2d')]);if(_0x4a7cd8['name']){delete _0x4a7cd8[_0x0bc5('0x2e')];}_0x11b68a[_0x0bc5('0x1f')](_0x27f08e)['send'](_0x4a7cd8);};}exports['index']=function(_0x16d491,_0x569ec8){var _0x49787b={},_0x45f52b={},_0xc74eae={'count':0x0,'rows':[]};var _0x5b6333=_[_0x0bc5('0x2f')](db[_0x0bc5('0x30')]['rawAttributes'],function(_0x1b91e){return{'name':_0x1b91e[_0x0bc5('0x31')],'type':_0x1b91e[_0x0bc5('0x32')][_0x0bc5('0x33')]};});_0x45f52b[_0x0bc5('0x34')]=_[_0x0bc5('0x2f')](_0x5b6333,_0x0bc5('0x2e'));_0x45f52b[_0x0bc5('0x35')]=_[_0x0bc5('0x36')](_0x16d491['query']);_0x45f52b[_0x0bc5('0x37')]=_['intersection'](_0x45f52b[_0x0bc5('0x34')],_0x45f52b[_0x0bc5('0x35')]);_0x49787b[_0x0bc5('0x38')]=_['intersection'](_0x45f52b[_0x0bc5('0x34')],qs[_0x0bc5('0x39')](_0x16d491[_0x0bc5('0x35')][_0x0bc5('0x39')]));_0x49787b[_0x0bc5('0x38')]=_0x49787b[_0x0bc5('0x38')]['length']?_0x49787b[_0x0bc5('0x38')]:_0x45f52b[_0x0bc5('0x34')];if(!_0x16d491[_0x0bc5('0x35')][_0x0bc5('0x3a')]('nolimit')){_0x49787b[_0x0bc5('0x22')]=qs['limit'](_0x16d491['query'][_0x0bc5('0x22')]);_0x49787b[_0x0bc5('0x20')]=qs[_0x0bc5('0x20')](_0x16d491[_0x0bc5('0x35')][_0x0bc5('0x20')]);}_0x49787b[_0x0bc5('0x3b')]=qs[_0x0bc5('0x3c')](_0x16d491['query'][_0x0bc5('0x3c')]);_0x49787b[_0x0bc5('0x3d')]=qs[_0x0bc5('0x37')](_[_0x0bc5('0x3e')](_0x16d491[_0x0bc5('0x35')],_0x45f52b['filters']),_0x5b6333);if(_0x16d491['query'][_0x0bc5('0x3f')]){_0x49787b[_0x0bc5('0x3d')]=_[_0x0bc5('0x40')](_0x49787b[_0x0bc5('0x3d')],{'$or':_[_0x0bc5('0x2f')](_0x5b6333,function(_0x4c7625){if(_0x4c7625['type']!==_0x0bc5('0x41')){var _0x4ed1d8={};_0x4ed1d8[_0x4c7625[_0x0bc5('0x2e')]]={'$like':'%'+_0x16d491['query'][_0x0bc5('0x3f')]+'%'};return _0x4ed1d8;}})});}_0x49787b=_[_0x0bc5('0x40')]({},_0x49787b,_0x16d491[_0x0bc5('0x42')]);var _0x4bc60c={'where':_0x49787b[_0x0bc5('0x3d')]};return db['OpenchannelTransferReport']['count'](_0x4bc60c)[_0x0bc5('0x2b')](function(_0x4cf781){_0xc74eae[_0x0bc5('0x23')]=_0x4cf781;if(_0x16d491['query'][_0x0bc5('0x43')]){_0x49787b['include']=[{'all':!![]}];}return db[_0x0bc5('0x30')][_0x0bc5('0x44')](_0x49787b);})[_0x0bc5('0x2b')](function(_0x1bf6ab){_0xc74eae[_0x0bc5('0x45')]=_0x1bf6ab;return _0xc74eae;})[_0x0bc5('0x2b')](respondWithFilteredResult(_0x569ec8,_0x49787b))[_0x0bc5('0x46')](handleError(_0x569ec8,null));};exports[_0x0bc5('0x47')]=function(_0x7efb1f,_0x5d864d){var _0x58fe58={'raw':!![],'where':{'id':_0x7efb1f[_0x0bc5('0x48')]['id']}},_0x4155c3={};_0x4155c3[_0x0bc5('0x34')]=_['keys'](db['OpenchannelTransferReport'][_0x0bc5('0x49')]);_0x4155c3['query']=_[_0x0bc5('0x36')](_0x7efb1f['query']);_0x4155c3[_0x0bc5('0x37')]=_[_0x0bc5('0x4a')](_0x4155c3[_0x0bc5('0x34')],_0x4155c3[_0x0bc5('0x35')]);_0x58fe58[_0x0bc5('0x38')]=_['intersection'](_0x4155c3[_0x0bc5('0x34')],qs['fields'](_0x7efb1f[_0x0bc5('0x35')][_0x0bc5('0x39')]));_0x58fe58['attributes']=_0x58fe58['attributes'][_0x0bc5('0x4b')]?_0x58fe58['attributes']:_0x4155c3[_0x0bc5('0x34')];if(_0x7efb1f[_0x0bc5('0x35')][_0x0bc5('0x43')]){_0x58fe58[_0x0bc5('0x4c')]=[{'all':!![]}];}_0x58fe58=_[_0x0bc5('0x40')]({},_0x58fe58,_0x7efb1f[_0x0bc5('0x42')]);return db[_0x0bc5('0x30')]['find'](_0x58fe58)[_0x0bc5('0x2b')](handleEntityNotFound(_0x5d864d,null))[_0x0bc5('0x2b')](respondWithResult(_0x5d864d,null))[_0x0bc5('0x46')](handleError(_0x5d864d,null));};exports[_0x0bc5('0x4d')]=function(_0x4a808b,_0x11792b){return db[_0x0bc5('0x30')][_0x0bc5('0x4d')](_0x4a808b[_0x0bc5('0x4e')],{})['then'](respondWithResult(_0x11792b,0xc9))['catch'](handleError(_0x11792b,null));};exports[_0x0bc5('0x2a')]=function(_0x271284,_0x45f6e5){if(_0x271284[_0x0bc5('0x4e')]['id']){delete _0x271284['body']['id'];}return db[_0x0bc5('0x30')][_0x0bc5('0x4f')]({'where':{'id':_0x271284[_0x0bc5('0x48')]['id']}})[_0x0bc5('0x2b')](handleEntityNotFound(_0x45f6e5,null))[_0x0bc5('0x2b')](saveUpdates(_0x271284[_0x0bc5('0x4e')],null))[_0x0bc5('0x2b')](respondWithResult(_0x45f6e5,null))[_0x0bc5('0x46')](handleError(_0x45f6e5,null));};exports['destroy']=function(_0x382aed,_0x52c2a5){return db['OpenchannelTransferReport'][_0x0bc5('0x4f')]({'where':{'id':_0x382aed['params']['id']}})['then'](handleEntityNotFound(_0x52c2a5,null))['then'](removeEntity(_0x52c2a5,null))['catch'](handleError(_0x52c2a5,null));};exports['describe']=function(_0xefac19,_0x51f148){return db[_0x0bc5('0x30')][_0x0bc5('0x50')]()[_0x0bc5('0x2b')](respondWithResult(_0x51f148,null))[_0x0bc5('0x46')](handleError(_0x51f148,null));}; \ No newline at end of file +var _0xe833=['apply','save','then','destroy','stack','name','send','index','map','rawAttributes','fieldName','type','model','query','intersection','fields','attributes','length','nolimit','order','sort','pick','filters','filter','where','merge','VIRTUAL','OpenchannelTransferReport','includeAll','include','findAll','rows','catch','show','params','keys','find','create','body','update','describe','eml-format','rimraf','fast-json-patch','bluebird','mustache','util','sox','squel','desk.js','to-csv','../../components/parsers/advancedSearch','api','../../mysqldb','sendStatus','status','end','json','offset','undefined','limit','count','set','Content-Range'];(function(_0x46c124,_0x136ec3){var _0x1baae0=function(_0x1c8424){while(--_0x1c8424){_0x46c124['push'](_0x46c124['shift']());}};_0x1baae0(++_0x136ec3);}(_0xe833,0x129));var _0x3e83=function(_0x338df7,_0x129ade){_0x338df7=_0x338df7-0x0;var _0x940933=_0xe833[_0x338df7];return _0x940933;};'use strict';var emlformat=require(_0x3e83('0x0'));var rimraf=require(_0x3e83('0x1'));var zipdir=require('zip-dir');var jsonpatch=require(_0x3e83('0x2'));var rp=require('request-promise');var moment=require('moment');var BPromise=require(_0x3e83('0x3'));var Mustache=require(_0x3e83('0x4'));var util=require(_0x3e83('0x5'));var path=require('path');var sox=require(_0x3e83('0x6'));var csv=require('to-csv');var ejs=require('ejs');var fs=require('fs');var fs_extra=require('fs-extra');var _=require('lodash');var squel=require(_0x3e83('0x7'));var crypto=require('crypto');var jsforce=require('jsforce');var deskjs=require(_0x3e83('0x8'));var toCsv=require(_0x3e83('0x9'));var querystring=require('querystring');var Papa=require('papaparse');var Redis=require('ioredis');var authService=require('../../components/auth/service');var qs=require('../../components/parsers/qs');var as=require(_0x3e83('0xa'));var hardwareService=require('../../config/license/hardware');var logger=require('../../config/logger')(_0x3e83('0xb'));var utils=require('../../config/utils');var config=require('../../config/environment');var licenseUtil=require('../../config/license/util');var db=require(_0x3e83('0xc'))['db'];function respondWithStatusCode(_0x36d486,_0x3a14a1){_0x3a14a1=_0x3a14a1||0xcc;return function(_0x23824a){if(_0x23824a){return _0x36d486[_0x3e83('0xd')](_0x3a14a1);}return _0x36d486[_0x3e83('0xe')](_0x3a14a1)[_0x3e83('0xf')]();};}function respondWithResult(_0x42295b,_0x334d6e){_0x334d6e=_0x334d6e||0xc8;return function(_0x3a007b){if(_0x3a007b){return _0x42295b[_0x3e83('0xe')](_0x334d6e)[_0x3e83('0x10')](_0x3a007b);}};}function respondWithFilteredResult(_0x188edc,_0x5974bf){return function(_0x4ffe3e){if(_0x4ffe3e){var _0x17cbb0=typeof _0x5974bf[_0x3e83('0x11')]===_0x3e83('0x12')&&typeof _0x5974bf[_0x3e83('0x13')]===_0x3e83('0x12');var _0x56eb29=_0x4ffe3e['count'];var _0x490b28=_0x17cbb0?0x0:_0x5974bf[_0x3e83('0x11')];var _0x5ce2d5=_0x17cbb0?_0x4ffe3e[_0x3e83('0x14')]:_0x5974bf[_0x3e83('0x11')]+_0x5974bf[_0x3e83('0x13')];var _0x1e7cfb;if(_0x5ce2d5>=_0x56eb29){_0x5ce2d5=_0x56eb29;_0x1e7cfb=0xc8;}else{_0x1e7cfb=0xce;}_0x188edc[_0x3e83('0xe')](_0x1e7cfb);return _0x188edc[_0x3e83('0x15')](_0x3e83('0x16'),_0x490b28+'-'+_0x5ce2d5+'/'+_0x56eb29)[_0x3e83('0x10')](_0x4ffe3e);}return null;};}function patchUpdates(_0x408a57){return function(_0x28d156){try{jsonpatch[_0x3e83('0x17')](_0x28d156,_0x408a57,!![]);}catch(_0xaa8871){return BPromise['reject'](_0xaa8871);}return _0x28d156[_0x3e83('0x18')]();};}function saveUpdates(_0x200800,_0x33b52b){return function(_0x568f53){if(_0x568f53){return _0x568f53['update'](_0x200800)[_0x3e83('0x19')](function(_0x51b947){return _0x51b947;});}return null;};}function removeEntity(_0x589f1f,_0x579cfc){return function(_0x4dfa71){if(_0x4dfa71){return _0x4dfa71[_0x3e83('0x1a')]()[_0x3e83('0x19')](function(){_0x589f1f[_0x3e83('0xe')](0xcc)[_0x3e83('0xf')]();});}};}function handleEntityNotFound(_0x435cbb,_0x120420){return function(_0x9a2429){if(!_0x9a2429){_0x435cbb['sendStatus'](0x194);}return _0x9a2429;};}function handleError(_0x4e01f8,_0x992daf){_0x992daf=_0x992daf||0x1f4;return function(_0x3daef0){logger['error'](_0x3daef0[_0x3e83('0x1b')]);if(_0x3daef0[_0x3e83('0x1c')]){delete _0x3daef0[_0x3e83('0x1c')];}_0x4e01f8['status'](_0x992daf)[_0x3e83('0x1d')](_0x3daef0);};}exports[_0x3e83('0x1e')]=function(_0x354c19,_0x5f3d85){var _0x5350e3={},_0x2ccd07={},_0x492449={'count':0x0,'rows':[]};var _0x310772=_[_0x3e83('0x1f')](db['OpenchannelTransferReport'][_0x3e83('0x20')],function(_0x3e8fb1){return{'name':_0x3e8fb1[_0x3e83('0x21')],'type':_0x3e8fb1[_0x3e83('0x22')]['key']};});_0x2ccd07[_0x3e83('0x23')]=_[_0x3e83('0x1f')](_0x310772,'name');_0x2ccd07[_0x3e83('0x24')]=_['keys'](_0x354c19[_0x3e83('0x24')]);_0x2ccd07['filters']=_[_0x3e83('0x25')](_0x2ccd07[_0x3e83('0x23')],_0x2ccd07[_0x3e83('0x24')]);_0x5350e3['attributes']=_['intersection'](_0x2ccd07[_0x3e83('0x23')],qs[_0x3e83('0x26')](_0x354c19[_0x3e83('0x24')]['fields']));_0x5350e3['attributes']=_0x5350e3[_0x3e83('0x27')][_0x3e83('0x28')]?_0x5350e3[_0x3e83('0x27')]:_0x2ccd07['model'];if(!_0x354c19['query']['hasOwnProperty'](_0x3e83('0x29'))){_0x5350e3['limit']=qs[_0x3e83('0x13')](_0x354c19[_0x3e83('0x24')][_0x3e83('0x13')]);_0x5350e3[_0x3e83('0x11')]=qs[_0x3e83('0x11')](_0x354c19[_0x3e83('0x24')]['offset']);}_0x5350e3[_0x3e83('0x2a')]=qs[_0x3e83('0x2b')](_0x354c19[_0x3e83('0x24')][_0x3e83('0x2b')]);_0x5350e3['where']=qs['filters'](_[_0x3e83('0x2c')](_0x354c19[_0x3e83('0x24')],_0x2ccd07[_0x3e83('0x2d')]),_0x310772);if(_0x354c19['query'][_0x3e83('0x2e')]){_0x5350e3[_0x3e83('0x2f')]=_[_0x3e83('0x30')](_0x5350e3['where'],{'$or':_[_0x3e83('0x1f')](_0x310772,function(_0x146f85){if(_0x146f85[_0x3e83('0x22')]!==_0x3e83('0x31')){var _0x31e93a={};_0x31e93a[_0x146f85[_0x3e83('0x1c')]]={'$like':'%'+_0x354c19[_0x3e83('0x24')][_0x3e83('0x2e')]+'%'};return _0x31e93a;}})});}_0x5350e3=_[_0x3e83('0x30')]({},_0x5350e3,_0x354c19['options']);var _0x538180={'where':_0x5350e3[_0x3e83('0x2f')]};return db[_0x3e83('0x32')][_0x3e83('0x14')](_0x538180)[_0x3e83('0x19')](function(_0x3c21e0){_0x492449[_0x3e83('0x14')]=_0x3c21e0;if(_0x354c19['query'][_0x3e83('0x33')]){_0x5350e3[_0x3e83('0x34')]=[{'all':!![]}];}return db[_0x3e83('0x32')][_0x3e83('0x35')](_0x5350e3);})['then'](function(_0x5209ef){_0x492449[_0x3e83('0x36')]=_0x5209ef;return _0x492449;})['then'](respondWithFilteredResult(_0x5f3d85,_0x5350e3))[_0x3e83('0x37')](handleError(_0x5f3d85,null));};exports[_0x3e83('0x38')]=function(_0xa24a07,_0x2cf1c6){var _0x130c9e={'raw':!![],'where':{'id':_0xa24a07[_0x3e83('0x39')]['id']}},_0x5a624d={};_0x5a624d[_0x3e83('0x23')]=_[_0x3e83('0x3a')](db[_0x3e83('0x32')][_0x3e83('0x20')]);_0x5a624d['query']=_['keys'](_0xa24a07[_0x3e83('0x24')]);_0x5a624d[_0x3e83('0x2d')]=_[_0x3e83('0x25')](_0x5a624d['model'],_0x5a624d[_0x3e83('0x24')]);_0x130c9e[_0x3e83('0x27')]=_[_0x3e83('0x25')](_0x5a624d[_0x3e83('0x23')],qs[_0x3e83('0x26')](_0xa24a07[_0x3e83('0x24')]['fields']));_0x130c9e[_0x3e83('0x27')]=_0x130c9e[_0x3e83('0x27')]['length']?_0x130c9e[_0x3e83('0x27')]:_0x5a624d[_0x3e83('0x23')];if(_0xa24a07[_0x3e83('0x24')][_0x3e83('0x33')]){_0x130c9e[_0x3e83('0x34')]=[{'all':!![]}];}_0x130c9e=_[_0x3e83('0x30')]({},_0x130c9e,_0xa24a07['options']);return db[_0x3e83('0x32')][_0x3e83('0x3b')](_0x130c9e)[_0x3e83('0x19')](handleEntityNotFound(_0x2cf1c6,null))['then'](respondWithResult(_0x2cf1c6,null))[_0x3e83('0x37')](handleError(_0x2cf1c6,null));};exports['create']=function(_0x2e4d36,_0x519fd9){return db[_0x3e83('0x32')][_0x3e83('0x3c')](_0x2e4d36[_0x3e83('0x3d')],{})['then'](respondWithResult(_0x519fd9,0xc9))[_0x3e83('0x37')](handleError(_0x519fd9,null));};exports[_0x3e83('0x3e')]=function(_0x3c2c25,_0x1b74fd){if(_0x3c2c25[_0x3e83('0x3d')]['id']){delete _0x3c2c25[_0x3e83('0x3d')]['id'];}return db[_0x3e83('0x32')][_0x3e83('0x3b')]({'where':{'id':_0x3c2c25['params']['id']}})[_0x3e83('0x19')](handleEntityNotFound(_0x1b74fd,null))[_0x3e83('0x19')](saveUpdates(_0x3c2c25[_0x3e83('0x3d')],null))[_0x3e83('0x19')](respondWithResult(_0x1b74fd,null))[_0x3e83('0x37')](handleError(_0x1b74fd,null));};exports['destroy']=function(_0x2bcc40,_0xf4ebc2){return db[_0x3e83('0x32')][_0x3e83('0x3b')]({'where':{'id':_0x2bcc40[_0x3e83('0x39')]['id']}})['then'](handleEntityNotFound(_0xf4ebc2,null))[_0x3e83('0x19')](removeEntity(_0xf4ebc2,null))[_0x3e83('0x37')](handleError(_0xf4ebc2,null));};exports[_0x3e83('0x3f')]=function(_0x46bfc5,_0x1a3efd){return db[_0x3e83('0x32')][_0x3e83('0x3f')]()[_0x3e83('0x19')](respondWithResult(_0x1a3efd,null))[_0x3e83('0x37')](handleError(_0x1a3efd,null));}; \ No newline at end of file diff --git a/server/api/openchannelTransferReport/openchannelTransferReport.model.js b/server/api/openchannelTransferReport/openchannelTransferReport.model.js index ec14f4b..a931b4a 100644 --- a/server/api/openchannelTransferReport/openchannelTransferReport.model.js +++ b/server/api/openchannelTransferReport/openchannelTransferReport.model.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x118c=['bluebird','request-promise','../../config/environment','./openchannelTransferReport.attributes','exports','define','OpenchannelTransferReport','report_openchannel_transfer','uniqueid','lodash'];(function(_0x2c91e9,_0x2fb965){var _0x13f0ff=function(_0xb39edf){while(--_0xb39edf){_0x2c91e9['push'](_0x2c91e9['shift']());}};_0x13f0ff(++_0x2fb965);}(_0x118c,0x9f));var _0xc118=function(_0x345482,_0x32d1c8){_0x345482=_0x345482-0x0;var _0x4d5ae1=_0x118c[_0x345482];return _0x4d5ae1;};'use strict';var _=require(_0xc118('0x0'));var util=require('util');var logger=require('../../config/logger')('api');var moment=require('moment');var BPromise=require(_0xc118('0x1'));var rp=require(_0xc118('0x2'));var fs=require('fs');var path=require('path');var rimraf=require('rimraf');var config=require(_0xc118('0x3'));var attributes=require(_0xc118('0x4'));module[_0xc118('0x5')]=function(_0x144d97,_0x2a74a0){return _0x144d97[_0xc118('0x6')](_0xc118('0x7'),attributes,{'tableName':_0xc118('0x8'),'paranoid':![],'indexes':[{'name':_0xc118('0x9'),'fields':[_0xc118('0x9')]}],'timestamps':!![]});}; \ No newline at end of file +var _0x9a53=['path','rimraf','../../config/environment','./openchannelTransferReport.attributes','uniqueid','lodash','util','../../config/logger','api','bluebird','request-promise'];(function(_0x1f047e,_0x23b312){var _0x206db5=function(_0xe06955){while(--_0xe06955){_0x1f047e['push'](_0x1f047e['shift']());}};_0x206db5(++_0x23b312);}(_0x9a53,0x1e9));var _0x39a5=function(_0x13b2ea,_0xe3707f){_0x13b2ea=_0x13b2ea-0x0;var _0x411f3d=_0x9a53[_0x13b2ea];return _0x411f3d;};'use strict';var _=require(_0x39a5('0x0'));var util=require(_0x39a5('0x1'));var logger=require(_0x39a5('0x2'))(_0x39a5('0x3'));var moment=require('moment');var BPromise=require(_0x39a5('0x4'));var rp=require(_0x39a5('0x5'));var fs=require('fs');var path=require(_0x39a5('0x6'));var rimraf=require(_0x39a5('0x7'));var config=require(_0x39a5('0x8'));var attributes=require(_0x39a5('0x9'));module['exports']=function(_0x41c64a,_0x4850c9){return _0x41c64a['define']('OpenchannelTransferReport',attributes,{'tableName':'report_openchannel_transfer','paranoid':![],'indexes':[{'name':_0x39a5('0xa'),'fields':['uniqueid']}],'timestamps':!![]});}; \ No newline at end of file diff --git a/server/api/openchannelTransferReport/openchannelTransferReport.rpc.js b/server/api/openchannelTransferReport/openchannelTransferReport.rpc.js index b89dd3d..f547ffc 100644 --- a/server/api/openchannelTransferReport/openchannelTransferReport.rpc.js +++ b/server/api/openchannelTransferReport/openchannelTransferReport.rpc.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x7c1f=['code','message','result','catch','lodash','util','moment','bluebird','randomstring','../../mysqldb','../../config/utils','../../config/logger','../../config/environment','jayson/promise','client','http','request','then','info','OpenchannelTransferReport,\x20%s,\x20%s','request\x20sent','debug','OpenchannelTransferReport,\x20%s,\x20%s,\x20%s','stringify','error'];(function(_0x5afa42,_0x30a006){var _0x10e567=function(_0x1d58f8){while(--_0x1d58f8){_0x5afa42['push'](_0x5afa42['shift']());}};_0x10e567(++_0x30a006);}(_0x7c1f,0x194));var _0xf7c1=function(_0x52414b,_0x5257bc){_0x52414b=_0x52414b-0x0;var _0x485980=_0x7c1f[_0x52414b];return _0x485980;};'use strict';var _=require(_0xf7c1('0x0'));var util=require(_0xf7c1('0x1'));var moment=require(_0xf7c1('0x2'));var BPromise=require(_0xf7c1('0x3'));var rs=require(_0xf7c1('0x4'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0xf7c1('0x5'))['db'];var utils=require(_0xf7c1('0x6'));var logger=require(_0xf7c1('0x7'))('rpc');var config=require(_0xf7c1('0x8'));var jayson=require(_0xf7c1('0x9'));var client=jayson[_0xf7c1('0xa')][_0xf7c1('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x5423bf,_0x1ad808,_0x1a342b){return new BPromise(function(_0x329050,_0x418f9a){return client[_0xf7c1('0xc')](_0x5423bf,_0x1a342b)[_0xf7c1('0xd')](function(_0x4279ea){logger[_0xf7c1('0xe')](_0xf7c1('0xf'),_0x1ad808,_0xf7c1('0x10'));logger[_0xf7c1('0x11')](_0xf7c1('0x12'),_0x1ad808,'request\x20sent',JSON[_0xf7c1('0x13')](_0x4279ea));if(_0x4279ea[_0xf7c1('0x14')]){if(_0x4279ea[_0xf7c1('0x14')][_0xf7c1('0x15')]===0x1f4){logger[_0xf7c1('0x14')](_0xf7c1('0xf'),_0x1ad808,_0x4279ea['error']['message']);return _0x418f9a(_0x4279ea[_0xf7c1('0x14')]['message']);}logger[_0xf7c1('0x14')](_0xf7c1('0xf'),_0x1ad808,_0x4279ea['error'][_0xf7c1('0x16')]);return _0x329050(_0x4279ea['error'][_0xf7c1('0x16')]);}else{logger[_0xf7c1('0xe')](_0xf7c1('0xf'),_0x1ad808,_0xf7c1('0x10'));_0x329050(_0x4279ea[_0xf7c1('0x17')]['message']);}})[_0xf7c1('0x18')](function(_0x5b5786){logger[_0xf7c1('0x14')]('OpenchannelTransferReport,\x20%s,\x20%s',_0x1ad808,_0x5b5786);_0x418f9a(_0x5b5786);});});} \ No newline at end of file +var _0x27c5=['message','result','catch','moment','bluebird','randomstring','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','request','then','info','OpenchannelTransferReport,\x20%s,\x20%s','request\x20sent','debug','OpenchannelTransferReport,\x20%s,\x20%s,\x20%s','stringify','error','code'];(function(_0x161681,_0x166f68){var _0x49837f=function(_0x19f39b){while(--_0x19f39b){_0x161681['push'](_0x161681['shift']());}};_0x49837f(++_0x166f68);}(_0x27c5,0x173));var _0x527c=function(_0xe1f858,_0xb86c44){_0xe1f858=_0xe1f858-0x0;var _0x367af6=_0x27c5[_0xe1f858];return _0x367af6;};'use strict';var _=require('lodash');var util=require('util');var moment=require(_0x527c('0x0'));var BPromise=require(_0x527c('0x1'));var rs=require(_0x527c('0x2'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0x527c('0x3'))['db'];var utils=require(_0x527c('0x4'));var logger=require(_0x527c('0x5'))(_0x527c('0x6'));var config=require(_0x527c('0x7'));var jayson=require(_0x527c('0x8'));var client=jayson[_0x527c('0x9')]['http']({'port':0x232a});function respondWithRpcPromise(_0x18c413,_0x5a68e8,_0x2db820){return new BPromise(function(_0x5e07ba,_0x1071f5){return client[_0x527c('0xa')](_0x18c413,_0x2db820)[_0x527c('0xb')](function(_0x49465c){logger[_0x527c('0xc')](_0x527c('0xd'),_0x5a68e8,_0x527c('0xe'));logger[_0x527c('0xf')](_0x527c('0x10'),_0x5a68e8,_0x527c('0xe'),JSON[_0x527c('0x11')](_0x49465c));if(_0x49465c[_0x527c('0x12')]){if(_0x49465c[_0x527c('0x12')][_0x527c('0x13')]===0x1f4){logger[_0x527c('0x12')]('OpenchannelTransferReport,\x20%s,\x20%s',_0x5a68e8,_0x49465c['error'][_0x527c('0x14')]);return _0x1071f5(_0x49465c[_0x527c('0x12')][_0x527c('0x14')]);}logger[_0x527c('0x12')]('OpenchannelTransferReport,\x20%s,\x20%s',_0x5a68e8,_0x49465c[_0x527c('0x12')][_0x527c('0x14')]);return _0x5e07ba(_0x49465c['error']['message']);}else{logger[_0x527c('0xc')]('OpenchannelTransferReport,\x20%s,\x20%s',_0x5a68e8,'request\x20sent');_0x5e07ba(_0x49465c[_0x527c('0x15')][_0x527c('0x14')]);}})[_0x527c('0x16')](function(_0x5e987c){logger[_0x527c('0x12')](_0x527c('0xd'),_0x5a68e8,_0x5e987c);_0x1071f5(_0x5e987c);});});} \ No newline at end of file diff --git a/server/api/pause/index.js b/server/api/pause/index.js index 0748586..e784c3f 100644 --- a/server/api/pause/index.js +++ b/server/api/pause/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xf3f2=['multer','util','path','connect-timeout','express','Router','fs-extra','../../components/interaction/service','../../config/environment','./pause.controller','get','isAuthenticated','/:id','show','post','create','put','update','delete','exports'];(function(_0x2f50db,_0x29205b){var _0x345e51=function(_0x511551){while(--_0x511551){_0x2f50db['push'](_0x2f50db['shift']());}};_0x345e51(++_0x29205b);}(_0xf3f2,0x140));var _0x2f3f=function(_0x358698,_0x41cbf5){_0x358698=_0x358698-0x0;var _0x5e837b=_0xf3f2[_0x358698];return _0x5e837b;};'use strict';var multer=require(_0x2f3f('0x0'));var util=require(_0x2f3f('0x1'));var path=require(_0x2f3f('0x2'));var timeout=require(_0x2f3f('0x3'));var express=require(_0x2f3f('0x4'));var router=express[_0x2f3f('0x5')]();var fs_extra=require(_0x2f3f('0x6'));var auth=require('../../components/auth/service');var interaction=require(_0x2f3f('0x7'));var config=require(_0x2f3f('0x8'));var controller=require(_0x2f3f('0x9'));router[_0x2f3f('0xa')]('/',auth[_0x2f3f('0xb')](),controller['index']);router['get'](_0x2f3f('0xc'),auth[_0x2f3f('0xb')](),controller[_0x2f3f('0xd')]);router[_0x2f3f('0xe')]('/',auth[_0x2f3f('0xb')](),controller[_0x2f3f('0xf')]);router[_0x2f3f('0x10')](_0x2f3f('0xc'),auth[_0x2f3f('0xb')](),controller[_0x2f3f('0x11')]);router[_0x2f3f('0x12')](_0x2f3f('0xc'),auth[_0x2f3f('0xb')](),controller['destroy']);module[_0x2f3f('0x13')]=router; \ No newline at end of file +var _0x3157=['get','isAuthenticated','/:id','show','post','create','put','update','delete','destroy','exports','multer','path','connect-timeout','express','Router','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment'];(function(_0x167cc1,_0x56ef5a){var _0x10bc4b=function(_0xd6a255){while(--_0xd6a255){_0x167cc1['push'](_0x167cc1['shift']());}};_0x10bc4b(++_0x56ef5a);}(_0x3157,0x1eb));var _0x7315=function(_0x1e8e56,_0x252b7d){_0x1e8e56=_0x1e8e56-0x0;var _0x168c38=_0x3157[_0x1e8e56];return _0x168c38;};'use strict';var multer=require(_0x7315('0x0'));var util=require('util');var path=require(_0x7315('0x1'));var timeout=require(_0x7315('0x2'));var express=require(_0x7315('0x3'));var router=express[_0x7315('0x4')]();var fs_extra=require(_0x7315('0x5'));var auth=require(_0x7315('0x6'));var interaction=require(_0x7315('0x7'));var config=require(_0x7315('0x8'));var controller=require('./pause.controller');router[_0x7315('0x9')]('/',auth[_0x7315('0xa')](),controller['index']);router[_0x7315('0x9')](_0x7315('0xb'),auth['isAuthenticated'](),controller[_0x7315('0xc')]);router[_0x7315('0xd')]('/',auth['isAuthenticated'](),controller[_0x7315('0xe')]);router[_0x7315('0xf')]('/:id',auth[_0x7315('0xa')](),controller[_0x7315('0x10')]);router[_0x7315('0x11')]('/:id',auth[_0x7315('0xa')](),controller[_0x7315('0x12')]);module[_0x7315('0x13')]=router; \ No newline at end of file diff --git a/server/api/pause/pause.attributes.js b/server/api/pause/pause.attributes.js index 47cd39f..dd460ad 100644 --- a/server/api/pause/pause.attributes.js +++ b/server/api/pause/pause.attributes.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x1708=['STRING','name','sequelize','exports'];(function(_0x56e4c4,_0x18da67){var _0x1136d1=function(_0x3f7bbe){while(--_0x3f7bbe){_0x56e4c4['push'](_0x56e4c4['shift']());}};_0x1136d1(++_0x18da67);}(_0x1708,0x7a));var _0x8170=function(_0x3e2040,_0x660381){_0x3e2040=_0x3e2040-0x0;var _0x38e3ec=_0x1708[_0x3e2040];return _0x38e3ec;};'use strict';var Sequelize=require(_0x8170('0x0'));module[_0x8170('0x1')]={'name':{'type':Sequelize[_0x8170('0x2')],'unique':_0x8170('0x3'),'allowNull':![]},'description':{'type':Sequelize[_0x8170('0x2')]}}; \ No newline at end of file +var _0xeae8=['name','STRING','sequelize','exports'];(function(_0x3c222b,_0x5d2eb7){var _0xd9fdbb=function(_0x3aa0d2){while(--_0x3aa0d2){_0x3c222b['push'](_0x3c222b['shift']());}};_0xd9fdbb(++_0x5d2eb7);}(_0xeae8,0x172));var _0x8eae=function(_0x5b69a7,_0x2761e2){_0x5b69a7=_0x5b69a7-0x0;var _0x8821f5=_0xeae8[_0x5b69a7];return _0x8821f5;};'use strict';var Sequelize=require(_0x8eae('0x0'));module[_0x8eae('0x1')]={'name':{'type':Sequelize['STRING'],'unique':_0x8eae('0x2'),'allowNull':![]},'description':{'type':Sequelize[_0x8eae('0x3')]}}; \ No newline at end of file diff --git a/server/api/pause/pause.controller.js b/server/api/pause/pause.controller.js index 427e9f2..3eaa92c 100644 --- a/server/api/pause/pause.controller.js +++ b/server/api/pause/pause.controller.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x1f3d=['body','user','UserProfileSection','error','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','eml-format','fast-json-patch','request-promise','moment','bluebird','mustache','util','sox','to-csv','ejs','fs-extra','lodash','squel','crypto','desk.js','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','sendStatus','status','end','offset','undefined','limit','count','set','Content-Range','update','then','destroy','get','Pauses','stack','name','send','map','Pause','rawAttributes','fieldName','key','model','keys','query','filters','attributes','intersection','fields','length','hasOwnProperty','nolimit','order','sort','where','filter','merge','type','VIRTUAL','options','includeAll','include','findAll','rows','catch','show','params','find','create'];(function(_0x2806ac,_0x2f38e3){var _0x5be013=function(_0x3d9d7e){while(--_0x3d9d7e){_0x2806ac['push'](_0x2806ac['shift']());}};_0x5be013(++_0x2f38e3);}(_0x1f3d,0xa7));var _0xd1f3=function(_0x270557,_0x4823d9){_0x270557=_0x270557-0x0;var _0x58c33c=_0x1f3d[_0x270557];return _0x58c33c;};'use strict';var emlformat=require(_0xd1f3('0x0'));var rimraf=require('rimraf');var zipdir=require('zip-dir');var jsonpatch=require(_0xd1f3('0x1'));var rp=require(_0xd1f3('0x2'));var moment=require(_0xd1f3('0x3'));var BPromise=require(_0xd1f3('0x4'));var Mustache=require(_0xd1f3('0x5'));var util=require(_0xd1f3('0x6'));var path=require('path');var sox=require(_0xd1f3('0x7'));var csv=require(_0xd1f3('0x8'));var ejs=require(_0xd1f3('0x9'));var fs=require('fs');var fs_extra=require(_0xd1f3('0xa'));var _=require(_0xd1f3('0xb'));var squel=require(_0xd1f3('0xc'));var crypto=require(_0xd1f3('0xd'));var jsforce=require('jsforce');var deskjs=require(_0xd1f3('0xe'));var toCsv=require('to-csv');var querystring=require('querystring');var Papa=require(_0xd1f3('0xf'));var Redis=require(_0xd1f3('0x10'));var authService=require(_0xd1f3('0x11'));var qs=require(_0xd1f3('0x12'));var as=require(_0xd1f3('0x13'));var hardwareService=require(_0xd1f3('0x14'));var logger=require(_0xd1f3('0x15'))(_0xd1f3('0x16'));var utils=require(_0xd1f3('0x17'));var config=require(_0xd1f3('0x18'));var licenseUtil=require(_0xd1f3('0x19'));var db=require(_0xd1f3('0x1a'))['db'];function respondWithStatusCode(_0x2f2771,_0x46fd40){_0x46fd40=_0x46fd40||0xcc;return function(_0x1f2b28){if(_0x1f2b28){return _0x2f2771[_0xd1f3('0x1b')](_0x46fd40);}return _0x2f2771[_0xd1f3('0x1c')](_0x46fd40)[_0xd1f3('0x1d')]();};}function respondWithResult(_0x524e8c,_0x21c402){_0x21c402=_0x21c402||0xc8;return function(_0x2b8975){if(_0x2b8975){return _0x524e8c[_0xd1f3('0x1c')](_0x21c402)['json'](_0x2b8975);}};}function respondWithFilteredResult(_0x412549,_0x36cb95){return function(_0x4f4212){if(_0x4f4212){var _0x5e13e4=typeof _0x36cb95[_0xd1f3('0x1e')]===_0xd1f3('0x1f')&&typeof _0x36cb95[_0xd1f3('0x20')]===_0xd1f3('0x1f');var _0x106305=_0x4f4212[_0xd1f3('0x21')];var _0x22f3a1=_0x5e13e4?0x0:_0x36cb95[_0xd1f3('0x1e')];var _0x2b2fc2=_0x5e13e4?_0x4f4212[_0xd1f3('0x21')]:_0x36cb95['offset']+_0x36cb95['limit'];var _0x324d28;if(_0x2b2fc2>=_0x106305){_0x2b2fc2=_0x106305;_0x324d28=0xc8;}else{_0x324d28=0xce;}_0x412549['status'](_0x324d28);return _0x412549[_0xd1f3('0x22')](_0xd1f3('0x23'),_0x22f3a1+'-'+_0x2b2fc2+'/'+_0x106305)['json'](_0x4f4212);}return null;};}function patchUpdates(_0x34b96e){return function(_0x18ab61){try{jsonpatch['apply'](_0x18ab61,_0x34b96e,!![]);}catch(_0x1a3cab){return BPromise['reject'](_0x1a3cab);}return _0x18ab61['save']();};}function saveUpdates(_0x3b8ba1,_0x5a8bf0){return function(_0x2a585c){if(_0x2a585c){return _0x2a585c[_0xd1f3('0x24')](_0x3b8ba1)[_0xd1f3('0x25')](function(_0x4d266e){return _0x4d266e;});}return null;};}function removeEntity(_0x166030,_0x35a907){return function(_0x4ccef2){if(_0x4ccef2){return _0x4ccef2[_0xd1f3('0x26')]()[_0xd1f3('0x25')](function(){var _0x5ac9a2=_0x4ccef2[_0xd1f3('0x27')]({'plain':!![]});var _0x4f0240=_0xd1f3('0x28');return db['UserProfileResource']['destroy']({'where':{'type':_0x4f0240,'resourceId':_0x5ac9a2['id']}})[_0xd1f3('0x25')](function(){return _0x4ccef2;});})[_0xd1f3('0x25')](function(){_0x166030[_0xd1f3('0x1c')](0xcc)['end']();});}};}function handleEntityNotFound(_0x4cf728,_0x2e9857){return function(_0x456dcf){if(!_0x456dcf){_0x4cf728['sendStatus'](0x194);}return _0x456dcf;};}function handleError(_0x3c7845,_0x5d0272){_0x5d0272=_0x5d0272||0x1f4;return function(_0x50f510){logger['error'](_0x50f510[_0xd1f3('0x29')]);if(_0x50f510['name']){delete _0x50f510[_0xd1f3('0x2a')];}_0x3c7845[_0xd1f3('0x1c')](_0x5d0272)[_0xd1f3('0x2b')](_0x50f510);};}exports['index']=function(_0x4ee444,_0x593c7a){var _0xf26c24={},_0x9a146d={},_0x65bc9f={'count':0x0,'rows':[]};var _0x326b4d=_[_0xd1f3('0x2c')](db[_0xd1f3('0x2d')][_0xd1f3('0x2e')],function(_0x5838fc){return{'name':_0x5838fc[_0xd1f3('0x2f')],'type':_0x5838fc['type'][_0xd1f3('0x30')]};});_0x9a146d[_0xd1f3('0x31')]=_[_0xd1f3('0x2c')](_0x326b4d,_0xd1f3('0x2a'));_0x9a146d['query']=_[_0xd1f3('0x32')](_0x4ee444[_0xd1f3('0x33')]);_0x9a146d[_0xd1f3('0x34')]=_['intersection'](_0x9a146d[_0xd1f3('0x31')],_0x9a146d[_0xd1f3('0x33')]);_0xf26c24[_0xd1f3('0x35')]=_[_0xd1f3('0x36')](_0x9a146d[_0xd1f3('0x31')],qs[_0xd1f3('0x37')](_0x4ee444['query']['fields']));_0xf26c24[_0xd1f3('0x35')]=_0xf26c24[_0xd1f3('0x35')][_0xd1f3('0x38')]?_0xf26c24[_0xd1f3('0x35')]:_0x9a146d['model'];if(!_0x4ee444[_0xd1f3('0x33')][_0xd1f3('0x39')](_0xd1f3('0x3a'))){_0xf26c24[_0xd1f3('0x20')]=qs['limit'](_0x4ee444['query'][_0xd1f3('0x20')]);_0xf26c24[_0xd1f3('0x1e')]=qs['offset'](_0x4ee444[_0xd1f3('0x33')][_0xd1f3('0x1e')]);}_0xf26c24[_0xd1f3('0x3b')]=qs[_0xd1f3('0x3c')](_0x4ee444[_0xd1f3('0x33')][_0xd1f3('0x3c')]);_0xf26c24[_0xd1f3('0x3d')]=qs[_0xd1f3('0x34')](_['pick'](_0x4ee444[_0xd1f3('0x33')],_0x9a146d[_0xd1f3('0x34')]),_0x326b4d);if(_0x4ee444['query'][_0xd1f3('0x3e')]){_0xf26c24[_0xd1f3('0x3d')]=_[_0xd1f3('0x3f')](_0xf26c24['where'],{'$or':_[_0xd1f3('0x2c')](_0x326b4d,function(_0x265185){if(_0x265185[_0xd1f3('0x40')]!==_0xd1f3('0x41')){var _0x443190={};_0x443190[_0x265185[_0xd1f3('0x2a')]]={'$like':'%'+_0x4ee444[_0xd1f3('0x33')][_0xd1f3('0x3e')]+'%'};return _0x443190;}})});}_0xf26c24=_['merge']({},_0xf26c24,_0x4ee444[_0xd1f3('0x42')]);var _0x3a27b3={'where':_0xf26c24[_0xd1f3('0x3d')]};return db[_0xd1f3('0x2d')][_0xd1f3('0x21')](_0x3a27b3)[_0xd1f3('0x25')](function(_0x3faa68){_0x65bc9f[_0xd1f3('0x21')]=_0x3faa68;if(_0x4ee444[_0xd1f3('0x33')][_0xd1f3('0x43')]){_0xf26c24[_0xd1f3('0x44')]=[{'all':!![]}];}return db[_0xd1f3('0x2d')][_0xd1f3('0x45')](_0xf26c24);})['then'](function(_0x4aa7c5){_0x65bc9f[_0xd1f3('0x46')]=_0x4aa7c5;return _0x65bc9f;})[_0xd1f3('0x25')](respondWithFilteredResult(_0x593c7a,_0xf26c24))[_0xd1f3('0x47')](handleError(_0x593c7a,null));};exports[_0xd1f3('0x48')]=function(_0x35c568,_0x2e0294){var _0x46430b={'raw':!![],'where':{'id':_0x35c568[_0xd1f3('0x49')]['id']}},_0x27cbc5={};_0x27cbc5[_0xd1f3('0x31')]=_[_0xd1f3('0x32')](db[_0xd1f3('0x2d')][_0xd1f3('0x2e')]);_0x27cbc5[_0xd1f3('0x33')]=_[_0xd1f3('0x32')](_0x35c568[_0xd1f3('0x33')]);_0x27cbc5[_0xd1f3('0x34')]=_[_0xd1f3('0x36')](_0x27cbc5[_0xd1f3('0x31')],_0x27cbc5[_0xd1f3('0x33')]);_0x46430b[_0xd1f3('0x35')]=_[_0xd1f3('0x36')](_0x27cbc5[_0xd1f3('0x31')],qs[_0xd1f3('0x37')](_0x35c568[_0xd1f3('0x33')][_0xd1f3('0x37')]));_0x46430b[_0xd1f3('0x35')]=_0x46430b[_0xd1f3('0x35')]['length']?_0x46430b[_0xd1f3('0x35')]:_0x27cbc5['model'];if(_0x35c568[_0xd1f3('0x33')][_0xd1f3('0x43')]){_0x46430b[_0xd1f3('0x44')]=[{'all':!![]}];}_0x46430b=_[_0xd1f3('0x3f')]({},_0x46430b,_0x35c568[_0xd1f3('0x42')]);return db[_0xd1f3('0x2d')][_0xd1f3('0x4a')](_0x46430b)[_0xd1f3('0x25')](handleEntityNotFound(_0x2e0294,null))['then'](respondWithResult(_0x2e0294,null))[_0xd1f3('0x47')](handleError(_0x2e0294,null));};exports[_0xd1f3('0x4b')]=function(_0x3ed64f,_0x3875f5){return db[_0xd1f3('0x2d')][_0xd1f3('0x4b')](_0x3ed64f[_0xd1f3('0x4c')],{})[_0xd1f3('0x25')](function(_0x2d0541){var _0x5c4a48=_0x3ed64f[_0xd1f3('0x4d')]['get']({'plain':!![]});if(!_0x5c4a48)throw new Error('Unable\x20to\x20retrieve\x20the\x20current\x20user');if(_0x5c4a48['role']===_0xd1f3('0x4d')){var _0x300e70=_0x2d0541['get']({'plain':!![]});var _0x3a6f8c=_0xd1f3('0x28');return db[_0xd1f3('0x4e')][_0xd1f3('0x4a')]({'where':{'name':_0x3a6f8c,'userProfileId':_0x5c4a48['userProfileId']},'raw':!![]})[_0xd1f3('0x25')](function(_0xfab752){if(_0xfab752&&_0xfab752['autoAssociation']===0x0){return db['UserProfileResource'][_0xd1f3('0x4b')]({'name':_0x300e70[_0xd1f3('0x2a')],'resourceId':_0x300e70['id'],'type':_0xfab752[_0xd1f3('0x2a')],'sectionId':_0xfab752['id']},{})[_0xd1f3('0x25')](function(){return _0x2d0541;});}else{return _0x2d0541;}})[_0xd1f3('0x47')](function(_0x2bfb5c){logger[_0xd1f3('0x4f')](_0xd1f3('0x50'),_0x2bfb5c);throw _0x2bfb5c;});}return _0x2d0541;})['then'](respondWithResult(_0x3875f5,0xc9))[_0xd1f3('0x47')](handleError(_0x3875f5,null));};exports[_0xd1f3('0x24')]=function(_0x2633f2,_0x63fcd1){if(_0x2633f2[_0xd1f3('0x4c')]['id']){delete _0x2633f2['body']['id'];}return db[_0xd1f3('0x2d')][_0xd1f3('0x4a')]({'where':{'id':_0x2633f2['params']['id']}})['then'](handleEntityNotFound(_0x63fcd1,null))[_0xd1f3('0x25')](saveUpdates(_0x2633f2['body'],null))[_0xd1f3('0x25')](respondWithResult(_0x63fcd1,null))[_0xd1f3('0x47')](handleError(_0x63fcd1,null));};exports[_0xd1f3('0x26')]=function(_0x56cfd8,_0x279b12){return db[_0xd1f3('0x2d')][_0xd1f3('0x4a')]({'where':{'id':_0x56cfd8['params']['id']}})[_0xd1f3('0x25')](handleEntityNotFound(_0x279b12,null))[_0xd1f3('0x25')](removeEntity(_0x279b12,null))[_0xd1f3('0x47')](handleError(_0x279b12,null));}; \ No newline at end of file +var _0x498c=['api','../../config/utils','../../config/license/util','../../mysqldb','sendStatus','end','status','json','offset','undefined','limit','count','set','apply','reject','save','then','destroy','get','Pauses','UserProfileResource','name','index','Pause','rawAttributes','fieldName','key','model','map','query','intersection','attributes','fields','length','hasOwnProperty','nolimit','order','sort','filters','pick','filter','where','merge','type','options','includeAll','include','findAll','catch','show','params','keys','find','create','body','Unable\x20to\x20retrieve\x20the\x20current\x20user','user','UserProfileSection','userProfileId','autoAssociation','error','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','update','eml-format','rimraf','zip-dir','fast-json-patch','moment','bluebird','mustache','path','ejs','fs-extra','squel','crypto','to-csv','querystring','ioredis','../../components/parsers/qs','../../config/license/hardware','../../config/logger'];(function(_0x4cc511,_0x2426cf){var _0x1a55ca=function(_0x533922){while(--_0x533922){_0x4cc511['push'](_0x4cc511['shift']());}};_0x1a55ca(++_0x2426cf);}(_0x498c,0x183));var _0xc498=function(_0x28f9c7,_0x12c915){_0x28f9c7=_0x28f9c7-0x0;var _0x1fa7c1=_0x498c[_0x28f9c7];return _0x1fa7c1;};'use strict';var emlformat=require(_0xc498('0x0'));var rimraf=require(_0xc498('0x1'));var zipdir=require(_0xc498('0x2'));var jsonpatch=require(_0xc498('0x3'));var rp=require('request-promise');var moment=require(_0xc498('0x4'));var BPromise=require(_0xc498('0x5'));var Mustache=require(_0xc498('0x6'));var util=require('util');var path=require(_0xc498('0x7'));var sox=require('sox');var csv=require('to-csv');var ejs=require(_0xc498('0x8'));var fs=require('fs');var fs_extra=require(_0xc498('0x9'));var _=require('lodash');var squel=require(_0xc498('0xa'));var crypto=require(_0xc498('0xb'));var jsforce=require('jsforce');var deskjs=require('desk.js');var toCsv=require(_0xc498('0xc'));var querystring=require(_0xc498('0xd'));var Papa=require('papaparse');var Redis=require(_0xc498('0xe'));var authService=require('../../components/auth/service');var qs=require(_0xc498('0xf'));var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0xc498('0x10'));var logger=require(_0xc498('0x11'))(_0xc498('0x12'));var utils=require(_0xc498('0x13'));var config=require('../../config/environment');var licenseUtil=require(_0xc498('0x14'));var db=require(_0xc498('0x15'))['db'];function respondWithStatusCode(_0x53d0d7,_0x34e9b9){_0x34e9b9=_0x34e9b9||0xcc;return function(_0x494756){if(_0x494756){return _0x53d0d7[_0xc498('0x16')](_0x34e9b9);}return _0x53d0d7['status'](_0x34e9b9)[_0xc498('0x17')]();};}function respondWithResult(_0x1ea1ef,_0x71c23b){_0x71c23b=_0x71c23b||0xc8;return function(_0xd6a3db){if(_0xd6a3db){return _0x1ea1ef[_0xc498('0x18')](_0x71c23b)[_0xc498('0x19')](_0xd6a3db);}};}function respondWithFilteredResult(_0x4547da,_0x26ff6d){return function(_0x4d58e9){if(_0x4d58e9){var _0x98e53a=typeof _0x26ff6d[_0xc498('0x1a')]===_0xc498('0x1b')&&typeof _0x26ff6d[_0xc498('0x1c')]===_0xc498('0x1b');var _0x102d0a=_0x4d58e9['count'];var _0xde8d33=_0x98e53a?0x0:_0x26ff6d[_0xc498('0x1a')];var _0x281e65=_0x98e53a?_0x4d58e9[_0xc498('0x1d')]:_0x26ff6d[_0xc498('0x1a')]+_0x26ff6d[_0xc498('0x1c')];var _0x217c33;if(_0x281e65>=_0x102d0a){_0x281e65=_0x102d0a;_0x217c33=0xc8;}else{_0x217c33=0xce;}_0x4547da['status'](_0x217c33);return _0x4547da[_0xc498('0x1e')]('Content-Range',_0xde8d33+'-'+_0x281e65+'/'+_0x102d0a)['json'](_0x4d58e9);}return null;};}function patchUpdates(_0x3a09f6){return function(_0x2cdae3){try{jsonpatch[_0xc498('0x1f')](_0x2cdae3,_0x3a09f6,!![]);}catch(_0x34ce1e){return BPromise[_0xc498('0x20')](_0x34ce1e);}return _0x2cdae3[_0xc498('0x21')]();};}function saveUpdates(_0xe0d841,_0x2bcbbc){return function(_0x52733e){if(_0x52733e){return _0x52733e['update'](_0xe0d841)[_0xc498('0x22')](function(_0x266136){return _0x266136;});}return null;};}function removeEntity(_0x4e39e4,_0x191642){return function(_0x35fbc6){if(_0x35fbc6){return _0x35fbc6[_0xc498('0x23')]()[_0xc498('0x22')](function(){var _0x4eb492=_0x35fbc6[_0xc498('0x24')]({'plain':!![]});var _0x5cd627=_0xc498('0x25');return db[_0xc498('0x26')][_0xc498('0x23')]({'where':{'type':_0x5cd627,'resourceId':_0x4eb492['id']}})[_0xc498('0x22')](function(){return _0x35fbc6;});})['then'](function(){_0x4e39e4['status'](0xcc)[_0xc498('0x17')]();});}};}function handleEntityNotFound(_0x1c6f2a,_0x46c82a){return function(_0x66f77a){if(!_0x66f77a){_0x1c6f2a[_0xc498('0x16')](0x194);}return _0x66f77a;};}function handleError(_0x244108,_0x35150c){_0x35150c=_0x35150c||0x1f4;return function(_0x4ac8d8){logger['error'](_0x4ac8d8['stack']);if(_0x4ac8d8['name']){delete _0x4ac8d8[_0xc498('0x27')];}_0x244108['status'](_0x35150c)['send'](_0x4ac8d8);};}exports[_0xc498('0x28')]=function(_0x3c3466,_0x461300){var _0x3bb9a4={},_0x14c9ba={},_0x11f4c2={'count':0x0,'rows':[]};var _0x1d2dcd=_['map'](db[_0xc498('0x29')][_0xc498('0x2a')],function(_0x2a466f){return{'name':_0x2a466f[_0xc498('0x2b')],'type':_0x2a466f['type'][_0xc498('0x2c')]};});_0x14c9ba[_0xc498('0x2d')]=_[_0xc498('0x2e')](_0x1d2dcd,_0xc498('0x27'));_0x14c9ba[_0xc498('0x2f')]=_['keys'](_0x3c3466['query']);_0x14c9ba['filters']=_[_0xc498('0x30')](_0x14c9ba[_0xc498('0x2d')],_0x14c9ba[_0xc498('0x2f')]);_0x3bb9a4[_0xc498('0x31')]=_[_0xc498('0x30')](_0x14c9ba['model'],qs[_0xc498('0x32')](_0x3c3466['query'][_0xc498('0x32')]));_0x3bb9a4[_0xc498('0x31')]=_0x3bb9a4[_0xc498('0x31')][_0xc498('0x33')]?_0x3bb9a4['attributes']:_0x14c9ba['model'];if(!_0x3c3466[_0xc498('0x2f')][_0xc498('0x34')](_0xc498('0x35'))){_0x3bb9a4[_0xc498('0x1c')]=qs[_0xc498('0x1c')](_0x3c3466[_0xc498('0x2f')]['limit']);_0x3bb9a4[_0xc498('0x1a')]=qs[_0xc498('0x1a')](_0x3c3466['query']['offset']);}_0x3bb9a4[_0xc498('0x36')]=qs[_0xc498('0x37')](_0x3c3466['query']['sort']);_0x3bb9a4['where']=qs[_0xc498('0x38')](_[_0xc498('0x39')](_0x3c3466[_0xc498('0x2f')],_0x14c9ba[_0xc498('0x38')]),_0x1d2dcd);if(_0x3c3466[_0xc498('0x2f')][_0xc498('0x3a')]){_0x3bb9a4[_0xc498('0x3b')]=_[_0xc498('0x3c')](_0x3bb9a4[_0xc498('0x3b')],{'$or':_[_0xc498('0x2e')](_0x1d2dcd,function(_0x1b5fb6){if(_0x1b5fb6[_0xc498('0x3d')]!=='VIRTUAL'){var _0x3f6308={};_0x3f6308[_0x1b5fb6[_0xc498('0x27')]]={'$like':'%'+_0x3c3466['query'][_0xc498('0x3a')]+'%'};return _0x3f6308;}})});}_0x3bb9a4=_[_0xc498('0x3c')]({},_0x3bb9a4,_0x3c3466[_0xc498('0x3e')]);var _0x41d499={'where':_0x3bb9a4[_0xc498('0x3b')]};return db[_0xc498('0x29')][_0xc498('0x1d')](_0x41d499)[_0xc498('0x22')](function(_0x1d72f5){_0x11f4c2[_0xc498('0x1d')]=_0x1d72f5;if(_0x3c3466[_0xc498('0x2f')][_0xc498('0x3f')]){_0x3bb9a4[_0xc498('0x40')]=[{'all':!![]}];}return db[_0xc498('0x29')][_0xc498('0x41')](_0x3bb9a4);})[_0xc498('0x22')](function(_0x14a278){_0x11f4c2['rows']=_0x14a278;return _0x11f4c2;})[_0xc498('0x22')](respondWithFilteredResult(_0x461300,_0x3bb9a4))[_0xc498('0x42')](handleError(_0x461300,null));};exports[_0xc498('0x43')]=function(_0x1134c8,_0x57e964){var _0x2f94fb={'raw':!![],'where':{'id':_0x1134c8[_0xc498('0x44')]['id']}},_0x5f09d5={};_0x5f09d5[_0xc498('0x2d')]=_[_0xc498('0x45')](db[_0xc498('0x29')][_0xc498('0x2a')]);_0x5f09d5['query']=_['keys'](_0x1134c8[_0xc498('0x2f')]);_0x5f09d5[_0xc498('0x38')]=_[_0xc498('0x30')](_0x5f09d5[_0xc498('0x2d')],_0x5f09d5['query']);_0x2f94fb[_0xc498('0x31')]=_['intersection'](_0x5f09d5['model'],qs[_0xc498('0x32')](_0x1134c8['query']['fields']));_0x2f94fb['attributes']=_0x2f94fb['attributes'][_0xc498('0x33')]?_0x2f94fb[_0xc498('0x31')]:_0x5f09d5[_0xc498('0x2d')];if(_0x1134c8[_0xc498('0x2f')][_0xc498('0x3f')]){_0x2f94fb[_0xc498('0x40')]=[{'all':!![]}];}_0x2f94fb=_[_0xc498('0x3c')]({},_0x2f94fb,_0x1134c8[_0xc498('0x3e')]);return db['Pause'][_0xc498('0x46')](_0x2f94fb)[_0xc498('0x22')](handleEntityNotFound(_0x57e964,null))['then'](respondWithResult(_0x57e964,null))[_0xc498('0x42')](handleError(_0x57e964,null));};exports[_0xc498('0x47')]=function(_0xf2623d,_0x3bdc61){return db[_0xc498('0x29')][_0xc498('0x47')](_0xf2623d[_0xc498('0x48')],{})[_0xc498('0x22')](function(_0x6c9ce3){var _0x32a2e0=_0xf2623d['user'][_0xc498('0x24')]({'plain':!![]});if(!_0x32a2e0)throw new Error(_0xc498('0x49'));if(_0x32a2e0['role']===_0xc498('0x4a')){var _0x11f4db=_0x6c9ce3[_0xc498('0x24')]({'plain':!![]});var _0x585710='Pauses';return db[_0xc498('0x4b')]['find']({'where':{'name':_0x585710,'userProfileId':_0x32a2e0[_0xc498('0x4c')]},'raw':!![]})[_0xc498('0x22')](function(_0x30d515){if(_0x30d515&&_0x30d515[_0xc498('0x4d')]===0x0){return db[_0xc498('0x26')][_0xc498('0x47')]({'name':_0x11f4db[_0xc498('0x27')],'resourceId':_0x11f4db['id'],'type':_0x30d515['name'],'sectionId':_0x30d515['id']},{})['then'](function(){return _0x6c9ce3;});}else{return _0x6c9ce3;}})['catch'](function(_0x45ea8b){logger[_0xc498('0x4e')](_0xc498('0x4f'),_0x45ea8b);throw _0x45ea8b;});}return _0x6c9ce3;})['then'](respondWithResult(_0x3bdc61,0xc9))[_0xc498('0x42')](handleError(_0x3bdc61,null));};exports[_0xc498('0x50')]=function(_0x34019f,_0x160c11){if(_0x34019f[_0xc498('0x48')]['id']){delete _0x34019f[_0xc498('0x48')]['id'];}return db[_0xc498('0x29')][_0xc498('0x46')]({'where':{'id':_0x34019f['params']['id']}})[_0xc498('0x22')](handleEntityNotFound(_0x160c11,null))[_0xc498('0x22')](saveUpdates(_0x34019f[_0xc498('0x48')],null))[_0xc498('0x22')](respondWithResult(_0x160c11,null))[_0xc498('0x42')](handleError(_0x160c11,null));};exports[_0xc498('0x23')]=function(_0x2c633c,_0x573511){return db[_0xc498('0x29')][_0xc498('0x46')]({'where':{'id':_0x2c633c['params']['id']}})[_0xc498('0x22')](handleEntityNotFound(_0x573511,null))['then'](removeEntity(_0x573511,null))['catch'](handleError(_0x573511,null));}; \ No newline at end of file diff --git a/server/api/pause/pause.model.js b/server/api/pause/pause.model.js index 684c77a..66d8b4d 100644 --- a/server/api/pause/pause.model.js +++ b/server/api/pause/pause.model.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x5fc3=['lodash','util','api','moment','bluebird','request-promise','path','../../config/environment','./pause.attributes','exports','define','tools_pauses'];(function(_0x5a5790,_0x362f87){var _0x40b812=function(_0x5aa61c){while(--_0x5aa61c){_0x5a5790['push'](_0x5a5790['shift']());}};_0x40b812(++_0x362f87);}(_0x5fc3,0xa8));var _0x35fc=function(_0x4ce028,_0x526d4b){_0x4ce028=_0x4ce028-0x0;var _0x583d0c=_0x5fc3[_0x4ce028];return _0x583d0c;};'use strict';var _=require(_0x35fc('0x0'));var util=require(_0x35fc('0x1'));var logger=require('../../config/logger')(_0x35fc('0x2'));var moment=require(_0x35fc('0x3'));var BPromise=require(_0x35fc('0x4'));var rp=require(_0x35fc('0x5'));var fs=require('fs');var path=require(_0x35fc('0x6'));var rimraf=require('rimraf');var config=require(_0x35fc('0x7'));var attributes=require(_0x35fc('0x8'));module[_0x35fc('0x9')]=function(_0x5b85ad,_0x5754be){return _0x5b85ad[_0x35fc('0xa')]('Pause',attributes,{'tableName':_0x35fc('0xb'),'paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file +var _0x7217=['../../config/environment','./pause.attributes','exports','define','Pause','tools_pauses','lodash','../../config/logger','api','moment','bluebird','request-promise'];(function(_0x3d8ca8,_0x1a9764){var _0x517e45=function(_0x641ad9){while(--_0x641ad9){_0x3d8ca8['push'](_0x3d8ca8['shift']());}};_0x517e45(++_0x1a9764);}(_0x7217,0x19e));var _0x7721=function(_0x1c546c,_0x5c57cb){_0x1c546c=_0x1c546c-0x0;var _0x2cc384=_0x7217[_0x1c546c];return _0x2cc384;};'use strict';var _=require(_0x7721('0x0'));var util=require('util');var logger=require(_0x7721('0x1'))(_0x7721('0x2'));var moment=require(_0x7721('0x3'));var BPromise=require(_0x7721('0x4'));var rp=require(_0x7721('0x5'));var fs=require('fs');var path=require('path');var rimraf=require('rimraf');var config=require(_0x7721('0x6'));var attributes=require(_0x7721('0x7'));module[_0x7721('0x8')]=function(_0x3fe47c,_0xb239e0){return _0x3fe47c[_0x7721('0x9')](_0x7721('0xa'),attributes,{'tableName':_0x7721('0xb'),'paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file diff --git a/server/api/pause/pause.rpc.js b/server/api/pause/pause.rpc.js index 0495bec..db68ad0 100644 --- a/server/api/pause/pause.rpc.js +++ b/server/api/pause/pause.rpc.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x7a54=['message','request\x20sent','result','catch','Pause','find','options','raw','where','attributes','map','include','model','ShowPause','lodash','util','moment','randomstring','ioredis','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','http','info','Pause,\x20%s,\x20%s','debug','stringify','error','code'];(function(_0x35f4a1,_0x4160bf){var _0x3b2175=function(_0x5d7718){while(--_0x5d7718){_0x35f4a1['push'](_0x35f4a1['shift']());}};_0x3b2175(++_0x4160bf);}(_0x7a54,0x106));var _0x47a5=function(_0x8bc7ac,_0x2a9986){_0x8bc7ac=_0x8bc7ac-0x0;var _0x2cfd2e=_0x7a54[_0x8bc7ac];return _0x2cfd2e;};'use strict';var _=require(_0x47a5('0x0'));var util=require(_0x47a5('0x1'));var moment=require(_0x47a5('0x2'));var BPromise=require('bluebird');var rs=require(_0x47a5('0x3'));var fs=require('fs');var Redis=require(_0x47a5('0x4'));var db=require('../../mysqldb')['db'];var utils=require(_0x47a5('0x5'));var logger=require(_0x47a5('0x6'))(_0x47a5('0x7'));var config=require(_0x47a5('0x8'));var jayson=require(_0x47a5('0x9'));var client=jayson['client'][_0x47a5('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x59199c,_0x343372,_0x30e405){return new BPromise(function(_0x506eda,_0x194fb0){return client['request'](_0x59199c,_0x30e405)['then'](function(_0x582352){logger[_0x47a5('0xb')](_0x47a5('0xc'),_0x343372,'request\x20sent');logger[_0x47a5('0xd')]('Pause,\x20%s,\x20%s,\x20%s',_0x343372,'request\x20sent',JSON[_0x47a5('0xe')](_0x582352));if(_0x582352[_0x47a5('0xf')]){if(_0x582352[_0x47a5('0xf')][_0x47a5('0x10')]===0x1f4){logger[_0x47a5('0xf')](_0x47a5('0xc'),_0x343372,_0x582352[_0x47a5('0xf')]['message']);return _0x194fb0(_0x582352[_0x47a5('0xf')][_0x47a5('0x11')]);}logger[_0x47a5('0xf')](_0x47a5('0xc'),_0x343372,_0x582352[_0x47a5('0xf')][_0x47a5('0x11')]);return _0x506eda(_0x582352[_0x47a5('0xf')][_0x47a5('0x11')]);}else{logger['info'](_0x47a5('0xc'),_0x343372,_0x47a5('0x12'));_0x506eda(_0x582352[_0x47a5('0x13')][_0x47a5('0x11')]);}})[_0x47a5('0x14')](function(_0x574af6){logger['error'](_0x47a5('0xc'),_0x343372,_0x574af6);_0x194fb0(_0x574af6);});});}exports['ShowPause']=function(_0x5247fd){var _0x423a81=this;return new Promise(function(_0xaf70a6,_0x2ce454){return db[_0x47a5('0x15')][_0x47a5('0x16')]({'raw':_0x5247fd[_0x47a5('0x17')]?_0x5247fd[_0x47a5('0x17')][_0x47a5('0x18')]===undefined?!![]:![]:!![],'where':_0x5247fd[_0x47a5('0x17')]?_0x5247fd['options'][_0x47a5('0x19')]||null:null,'attributes':_0x5247fd[_0x47a5('0x17')]?_0x5247fd['options'][_0x47a5('0x1a')]||null:null,'include':_0x5247fd[_0x47a5('0x17')]?_0x5247fd[_0x47a5('0x17')]['include']?_[_0x47a5('0x1b')](_0x5247fd[_0x47a5('0x17')][_0x47a5('0x1c')],function(_0x7a9f9e){return{'model':db[_0x7a9f9e['model']],'as':_0x7a9f9e['as'],'attributes':_0x7a9f9e[_0x47a5('0x1a')],'include':_0x7a9f9e[_0x47a5('0x1c')]?_['map'](_0x7a9f9e[_0x47a5('0x1c')],function(_0xc4cd63){return{'model':db[_0xc4cd63[_0x47a5('0x1d')]],'as':_0xc4cd63['as'],'attributes':_0xc4cd63[_0x47a5('0x1a')],'include':_0xc4cd63[_0x47a5('0x1c')]?_['map'](_0xc4cd63['include'],function(_0x136745){return{'model':db[_0x136745['model']],'as':_0x136745['as'],'attributes':_0x136745[_0x47a5('0x1a')]};}):[]};}):[]};}):[]:[]})['then'](function(_0x23cb77){logger[_0x47a5('0xb')](_0x47a5('0x1e'),_0x5247fd);logger[_0x47a5('0xd')](_0x47a5('0x1e'),_0x5247fd,JSON[_0x47a5('0xe')](_0x23cb77));_0xaf70a6(_0x23cb77);})[_0x47a5('0x14')](function(_0x136b14){logger[_0x47a5('0xf')](_0x47a5('0x1e'),_0x136b14[_0x47a5('0x11')],_0x5247fd);_0x2ce454(_0x423a81[_0x47a5('0xf')](0x1f4,_0x136b14[_0x47a5('0x11')]));});});}; \ No newline at end of file +var _0x7a54=['message','request\x20sent','result','catch','Pause','find','options','raw','where','attributes','map','include','model','ShowPause','lodash','util','moment','randomstring','ioredis','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','http','info','Pause,\x20%s,\x20%s','debug','stringify','error','code'];(function(_0x11b56e,_0x5495d1){var _0x33a148=function(_0x4f7104){while(--_0x4f7104){_0x11b56e['push'](_0x11b56e['shift']());}};_0x33a148(++_0x5495d1);}(_0x7a54,0x106));var _0x47a5=function(_0x5e50c5,_0x237e62){_0x5e50c5=_0x5e50c5-0x0;var _0x2c9a21=_0x7a54[_0x5e50c5];return _0x2c9a21;};'use strict';var _=require(_0x47a5('0x0'));var util=require(_0x47a5('0x1'));var moment=require(_0x47a5('0x2'));var BPromise=require('bluebird');var rs=require(_0x47a5('0x3'));var fs=require('fs');var Redis=require(_0x47a5('0x4'));var db=require('../../mysqldb')['db'];var utils=require(_0x47a5('0x5'));var logger=require(_0x47a5('0x6'))(_0x47a5('0x7'));var config=require(_0x47a5('0x8'));var jayson=require(_0x47a5('0x9'));var client=jayson['client'][_0x47a5('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x59199c,_0x343372,_0x30e405){return new BPromise(function(_0x506eda,_0x194fb0){return client['request'](_0x59199c,_0x30e405)['then'](function(_0x582352){logger[_0x47a5('0xb')](_0x47a5('0xc'),_0x343372,'request\x20sent');logger[_0x47a5('0xd')]('Pause,\x20%s,\x20%s,\x20%s',_0x343372,'request\x20sent',JSON[_0x47a5('0xe')](_0x582352));if(_0x582352[_0x47a5('0xf')]){if(_0x582352[_0x47a5('0xf')][_0x47a5('0x10')]===0x1f4){logger[_0x47a5('0xf')](_0x47a5('0xc'),_0x343372,_0x582352[_0x47a5('0xf')]['message']);return _0x194fb0(_0x582352[_0x47a5('0xf')][_0x47a5('0x11')]);}logger[_0x47a5('0xf')](_0x47a5('0xc'),_0x343372,_0x582352[_0x47a5('0xf')][_0x47a5('0x11')]);return _0x506eda(_0x582352[_0x47a5('0xf')][_0x47a5('0x11')]);}else{logger['info'](_0x47a5('0xc'),_0x343372,_0x47a5('0x12'));_0x506eda(_0x582352[_0x47a5('0x13')][_0x47a5('0x11')]);}})[_0x47a5('0x14')](function(_0x574af6){logger['error'](_0x47a5('0xc'),_0x343372,_0x574af6);_0x194fb0(_0x574af6);});});}exports['ShowPause']=function(_0x5247fd){var _0x423a81=this;return new Promise(function(_0xaf70a6,_0x2ce454){return db[_0x47a5('0x15')][_0x47a5('0x16')]({'raw':_0x5247fd[_0x47a5('0x17')]?_0x5247fd[_0x47a5('0x17')][_0x47a5('0x18')]===undefined?!![]:![]:!![],'where':_0x5247fd[_0x47a5('0x17')]?_0x5247fd['options'][_0x47a5('0x19')]||null:null,'attributes':_0x5247fd[_0x47a5('0x17')]?_0x5247fd['options'][_0x47a5('0x1a')]||null:null,'include':_0x5247fd[_0x47a5('0x17')]?_0x5247fd[_0x47a5('0x17')]['include']?_[_0x47a5('0x1b')](_0x5247fd[_0x47a5('0x17')][_0x47a5('0x1c')],function(_0x7a9f9e){return{'model':db[_0x7a9f9e['model']],'as':_0x7a9f9e['as'],'attributes':_0x7a9f9e[_0x47a5('0x1a')],'include':_0x7a9f9e[_0x47a5('0x1c')]?_['map'](_0x7a9f9e[_0x47a5('0x1c')],function(_0xc4cd63){return{'model':db[_0xc4cd63[_0x47a5('0x1d')]],'as':_0xc4cd63['as'],'attributes':_0xc4cd63[_0x47a5('0x1a')],'include':_0xc4cd63[_0x47a5('0x1c')]?_['map'](_0xc4cd63['include'],function(_0x136745){return{'model':db[_0x136745['model']],'as':_0x136745['as'],'attributes':_0x136745[_0x47a5('0x1a')]};}):[]};}):[]};}):[]:[]})['then'](function(_0x23cb77){logger[_0x47a5('0xb')](_0x47a5('0x1e'),_0x5247fd);logger[_0x47a5('0xd')](_0x47a5('0x1e'),_0x5247fd,JSON[_0x47a5('0xe')](_0x23cb77));_0xaf70a6(_0x23cb77);})[_0x47a5('0x14')](function(_0x136b14){logger[_0x47a5('0xf')](_0x47a5('0x1e'),_0x136b14[_0x47a5('0x11')],_0x5247fd);_0x2ce454(_0x423a81[_0x47a5('0xf')](0x1f4,_0x136b14[_0x47a5('0x11')]));});});}; \ No newline at end of file diff --git a/server/api/plugin/index.js b/server/api/plugin/index.js index 1937831..35b99fb 100644 --- a/server/api/plugin/index.js +++ b/server/api/plugin/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xb4e6=['put','/:id','update','delete','exports','multer','path','connect-timeout','express','Router','fs-extra','../../components/auth/service','../../components/interaction/service','./plugin.controller','get','isAuthenticated','show','/:id/download','download','diskStorage','join','server/files/plugins','originalname','replace','%s-%s%s','basename','extname','now','post','single','file','/webhook','webhookPost'];(function(_0x3ea6e8,_0x660e04){var _0x4638fb=function(_0x4b196c){while(--_0x4b196c){_0x3ea6e8['push'](_0x3ea6e8['shift']());}};_0x4638fb(++_0x660e04);}(_0xb4e6,0x1f4));var _0x6b4e=function(_0x136a0d,_0x476fe2){_0x136a0d=_0x136a0d-0x0;var _0x212ea5=_0xb4e6[_0x136a0d];return _0x212ea5;};'use strict';var multer=require(_0x6b4e('0x0'));var util=require('util');var path=require(_0x6b4e('0x1'));var timeout=require(_0x6b4e('0x2'));var express=require(_0x6b4e('0x3'));var router=express[_0x6b4e('0x4')]();var fs_extra=require(_0x6b4e('0x5'));var auth=require(_0x6b4e('0x6'));var interaction=require(_0x6b4e('0x7'));var config=require('../../config/environment');var controller=require(_0x6b4e('0x8'));router[_0x6b4e('0x9')]('/',auth[_0x6b4e('0xa')](),controller['index']);router[_0x6b4e('0x9')]('/webhook',controller['webhookGet']);router[_0x6b4e('0x9')]('/:id',auth['isAuthenticated'](),controller[_0x6b4e('0xb')]);router[_0x6b4e('0x9')](_0x6b4e('0xc'),auth[_0x6b4e('0xa')](),controller[_0x6b4e('0xd')]);var upload=multer({'storage':multer[_0x6b4e('0xe')]({'destination':function(_0x323487,_0x49c734,_0x39b4ec){_0x39b4ec(null,path[_0x6b4e('0xf')](config['root'],_0x6b4e('0x10')));},'filename':function(_0x9cd7da,_0x432399,_0x2b2ce0){_0x432399[_0x6b4e('0x11')]=_0x432399[_0x6b4e('0x11')][_0x6b4e('0x12')](/[+@&\/\\#,+()$~%'":*?<>{}\s\\|]/g,'-');_0x2b2ce0(null,util['format'](_0x6b4e('0x13'),path[_0x6b4e('0x14')](_0x432399['originalname'],path[_0x6b4e('0x15')](_0x432399['originalname'])),Date[_0x6b4e('0x16')](),path[_0x6b4e('0x15')](_0x432399[_0x6b4e('0x11')])));}})});router[_0x6b4e('0x17')]('/',upload[_0x6b4e('0x18')](_0x6b4e('0x19')),controller['upload']);router['post'](_0x6b4e('0x1a'),controller[_0x6b4e('0x1b')]);router[_0x6b4e('0x1c')](_0x6b4e('0x1d'),auth[_0x6b4e('0xa')](),controller[_0x6b4e('0x1e')]);router[_0x6b4e('0x1f')](_0x6b4e('0x1d'),auth[_0x6b4e('0xa')](),controller[_0x6b4e('0x1f')]);module[_0x6b4e('0x20')]=router; \ No newline at end of file +var _0x2dae=['put','update','delete','multer','path','connect-timeout','express','Router','fs-extra','../../components/interaction/service','../../config/environment','./plugin.controller','get','index','/webhook','webhookGet','/:id','isAuthenticated','show','download','diskStorage','join','root','originalname','replace','format','%s-%s%s','basename','extname','post','file','upload'];(function(_0x5d01d3,_0x51dc49){var _0x3764a5=function(_0x4752d2){while(--_0x4752d2){_0x5d01d3['push'](_0x5d01d3['shift']());}};_0x3764a5(++_0x51dc49);}(_0x2dae,0xc3));var _0xe2da=function(_0x593d89,_0x45145f){_0x593d89=_0x593d89-0x0;var _0x4aa403=_0x2dae[_0x593d89];return _0x4aa403;};'use strict';var multer=require(_0xe2da('0x0'));var util=require('util');var path=require(_0xe2da('0x1'));var timeout=require(_0xe2da('0x2'));var express=require(_0xe2da('0x3'));var router=express[_0xe2da('0x4')]();var fs_extra=require(_0xe2da('0x5'));var auth=require('../../components/auth/service');var interaction=require(_0xe2da('0x6'));var config=require(_0xe2da('0x7'));var controller=require(_0xe2da('0x8'));router[_0xe2da('0x9')]('/',auth['isAuthenticated'](),controller[_0xe2da('0xa')]);router[_0xe2da('0x9')](_0xe2da('0xb'),controller[_0xe2da('0xc')]);router[_0xe2da('0x9')](_0xe2da('0xd'),auth[_0xe2da('0xe')](),controller[_0xe2da('0xf')]);router[_0xe2da('0x9')]('/:id/download',auth[_0xe2da('0xe')](),controller[_0xe2da('0x10')]);var upload=multer({'storage':multer[_0xe2da('0x11')]({'destination':function(_0x17086c,_0x3c1309,_0x44ec3e){_0x44ec3e(null,path[_0xe2da('0x12')](config[_0xe2da('0x13')],'server/files/plugins'));},'filename':function(_0xb98909,_0x5200b1,_0x4377c6){_0x5200b1[_0xe2da('0x14')]=_0x5200b1[_0xe2da('0x14')][_0xe2da('0x15')](/[+@&\/\\#,+()$~%'":*?<>{}\s\\|]/g,'-');_0x4377c6(null,util[_0xe2da('0x16')](_0xe2da('0x17'),path[_0xe2da('0x18')](_0x5200b1['originalname'],path[_0xe2da('0x19')](_0x5200b1['originalname'])),Date['now'](),path[_0xe2da('0x19')](_0x5200b1[_0xe2da('0x14')])));}})});router[_0xe2da('0x1a')]('/',upload['single'](_0xe2da('0x1b')),controller[_0xe2da('0x1c')]);router[_0xe2da('0x1a')](_0xe2da('0xb'),controller['webhookPost']);router[_0xe2da('0x1d')](_0xe2da('0xd'),auth[_0xe2da('0xe')](),controller[_0xe2da('0x1e')]);router[_0xe2da('0x1f')]('/:id',auth[_0xe2da('0xe')](),controller[_0xe2da('0x1f')]);module['exports']=router; \ No newline at end of file diff --git a/server/api/plugin/plugin.attributes.js b/server/api/plugin/plugin.attributes.js index 4e16d44..c08b1fd 100644 --- a/server/api/plugin/plugin.attributes.js +++ b/server/api/plugin/plugin.attributes.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xd3a0=['ENUM','html','script','TEXT','STRING','The\x20physical\x20path\x20where\x20the\x20plugin\x20is\x20stored.','BOOLEAN','adminOnly','agentOnly','always','never','Indicates\x20whether\x20to\x20display\x20the\x20plugin\x20in\x20the\x20sidebar.','sequelize','exports'];(function(_0x431258,_0x2073b3){var _0x37d65c=function(_0x3b2241){while(--_0x3b2241){_0x431258['push'](_0x431258['shift']());}};_0x37d65c(++_0x2073b3);}(_0xd3a0,0x7c));var _0x0d3a=function(_0x2417af,_0x24011d){_0x2417af=_0x2417af-0x0;var _0x3736bb=_0xd3a0[_0x2417af];return _0x3736bb;};'use strict';var Sequelize=require(_0x0d3a('0x0'));module[_0x0d3a('0x1')]={'name':{'type':Sequelize['STRING']},'type':{'type':Sequelize[_0x0d3a('0x2')](_0x0d3a('0x3'),_0x0d3a('0x4'))},'description':{'type':Sequelize[_0x0d3a('0x5')]},'version':{'type':Sequelize['TEXT']},'path':{'type':Sequelize[_0x0d3a('0x6')],'comment':_0x0d3a('0x7')},'active':{'type':Sequelize[_0x0d3a('0x8')],'defaultValue':0x0,'comment':'Indicates\x20whether\x20the\x20plugin\x20is\x20installed.\x20Updated\x20when\x20the\x20plugin\x20is\x20installed/uninstalled.'},'sidebar':{'type':Sequelize[_0x0d3a('0x2')](_0x0d3a('0x9'),_0x0d3a('0xa'),_0x0d3a('0xb'),_0x0d3a('0xc')),'defaultValue':'always','comment':_0x0d3a('0xd')},'icon':{'type':Sequelize['STRING']},'adminUrl':{'type':Sequelize[_0x0d3a('0x6')]},'agentUrl':{'type':Sequelize['STRING']},'scriptName':{'type':Sequelize[_0x0d3a('0x6')]},'scriptPath':{'type':Sequelize['STRING']}}; \ No newline at end of file +var _0xf5cc=['always','Indicates\x20whether\x20to\x20display\x20the\x20plugin\x20in\x20the\x20sidebar.','sequelize','exports','ENUM','TEXT','STRING','The\x20physical\x20path\x20where\x20the\x20plugin\x20is\x20stored.','BOOLEAN','Indicates\x20whether\x20the\x20plugin\x20is\x20installed.\x20Updated\x20when\x20the\x20plugin\x20is\x20installed/uninstalled.','adminOnly','agentOnly','never'];(function(_0x1030ce,_0xbe3f74){var _0x3367fd=function(_0x387153){while(--_0x387153){_0x1030ce['push'](_0x1030ce['shift']());}};_0x3367fd(++_0xbe3f74);}(_0xf5cc,0x1af));var _0xcf5c=function(_0x36ed3c,_0x44a00a){_0x36ed3c=_0x36ed3c-0x0;var _0x52a2e0=_0xf5cc[_0x36ed3c];return _0x52a2e0;};'use strict';var Sequelize=require(_0xcf5c('0x0'));module[_0xcf5c('0x1')]={'name':{'type':Sequelize['STRING']},'type':{'type':Sequelize[_0xcf5c('0x2')]('html','script')},'description':{'type':Sequelize[_0xcf5c('0x3')]},'version':{'type':Sequelize[_0xcf5c('0x3')]},'path':{'type':Sequelize[_0xcf5c('0x4')],'comment':_0xcf5c('0x5')},'active':{'type':Sequelize[_0xcf5c('0x6')],'defaultValue':0x0,'comment':_0xcf5c('0x7')},'sidebar':{'type':Sequelize['ENUM'](_0xcf5c('0x8'),_0xcf5c('0x9'),'always',_0xcf5c('0xa')),'defaultValue':_0xcf5c('0xb'),'comment':_0xcf5c('0xc')},'icon':{'type':Sequelize[_0xcf5c('0x4')]},'adminUrl':{'type':Sequelize[_0xcf5c('0x4')]},'agentUrl':{'type':Sequelize[_0xcf5c('0x4')]},'scriptName':{'type':Sequelize[_0xcf5c('0x4')]},'scriptPath':{'type':Sequelize[_0xcf5c('0x4')]}}; \ No newline at end of file diff --git a/server/api/plugin/plugin.controller.js b/server/api/plugin/plugin.controller.js index 0684ee9..5c7e4aa 100644 --- a/server/api/plugin/plugin.controller.js +++ b/server/api/plugin/plugin.controller.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x33e0=['Temporary\x20file\x20removed','upload','file','filename','extname','Plugin\x20upload\x20filepath:\x20%s','0777','readdirSync','lstatSync','isFile','Invalid\x20plugin\x20structure','isDirectory','some','manifest.json','readFileSync','Invalid\x20manifest:\x20name\x20missing','Invalid\x20manifest:\x20version\x20not\x20specified','html','parameters','Invalid\x20manifest:\x20views\x20missing','views','admin','scriptName','Invalid\x20manifest:\x20script\x20name\x20missing','scriptPath','Invalid\x20manifest:\x20script\x20path\x20missing','Invalid\x20manifest:\x20invalid\x20type','description','sidebar','always','icon','icon-apps','version','test','Warning:\x20admin\x20view\x20not\x20specified','agent','plugins','Warning:\x20agent\x20view\x20not\x20specified','script','create','body','role','userProfileId','Unable\x20to\x20retrieve\x20the\x20current\x20user','user','UserProfileSection','autoAssociation','UserProfileResource','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','Zip\x20archive\x20removed','Extracted\x20folder\x20removed','delete','webhookGet','resolve','\x27PATH\x27\x20parameter\x20not\x20specified','port','hostname','http://localhost:','encoding','%s%s','headers','content-length','content-type','endsWith','statusCode','webhookPost','\x27PORT\x27\x20parameter\x20not\x20specified','method','eml-format','rimraf','zip-dir','fast-json-patch','moment','bluebird','mustache','util','path','sox','ejs','fs-extra','lodash','squel','crypto','jsforce','to-csv','querystring','papaparse','archiver','ioredis','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','redis','defaults','socket.io-emitter','./plugin.socket','register','status','json','offset','undefined','count','set','Content-Range','reject','update','destroy','then','get','end','sendStatus','error','name','send','index','map','Plugin','fieldName','type','key','model','query','keys','filters','intersection','attributes','fields','length','hasOwnProperty','nolimit','limit','order','sort','pick','filter','where','merge','include','findAll','rows','catch','show','rawAttributes','options','find','download','params','join','root','server/files/plugins','format','basename','createWriteStream','zip','warning','code','ENOENT','Sequelize','Error','Error\x20while\x20generating\x20the\x20zip\x20archive','pipe','glob','**/*','dirname','node_modules/**/*','attachments/**/*','finalize','close','existsSync','Plugin\x20not\x20found','%s.zip','unlinkSync','info','Download\x20completed'];(function(_0x13c673,_0x73db44){var _0x27dd05=function(_0x3b1506){while(--_0x3b1506){_0x13c673['push'](_0x13c673['shift']());}};_0x27dd05(++_0x73db44);}(_0x33e0,0x1ac));var _0x033e=function(_0x925f0c,_0x2d66c8){_0x925f0c=_0x925f0c-0x0;var _0x1bcf50=_0x33e0[_0x925f0c];return _0x1bcf50;};'use strict';var emlformat=require(_0x033e('0x0'));var rimraf=require(_0x033e('0x1'));var zipdir=require(_0x033e('0x2'));var jsonpatch=require(_0x033e('0x3'));var rp=require('request-promise');var moment=require(_0x033e('0x4'));var BPromise=require(_0x033e('0x5'));var Mustache=require(_0x033e('0x6'));var util=require(_0x033e('0x7'));var path=require(_0x033e('0x8'));var sox=require(_0x033e('0x9'));var csv=require('to-csv');var ejs=require(_0x033e('0xa'));var fs=require('fs');var fs_extra=require(_0x033e('0xb'));var _=require(_0x033e('0xc'));var squel=require(_0x033e('0xd'));var crypto=require(_0x033e('0xe'));var jsforce=require(_0x033e('0xf'));var deskjs=require('desk.js');var toCsv=require(_0x033e('0x10'));var querystring=require(_0x033e('0x11'));var Papa=require(_0x033e('0x12'));var extract=require('extract-zip');var rimraf=require(_0x033e('0x1'));var archiver=require(_0x033e('0x13'));var Redis=require(_0x033e('0x14'));var authService=require('../../components/auth/service');var qs=require(_0x033e('0x15'));var as=require(_0x033e('0x16'));var hardwareService=require(_0x033e('0x17'));var logger=require(_0x033e('0x18'))(_0x033e('0x19'));var utils=require(_0x033e('0x1a'));var config=require(_0x033e('0x1b'));var licenseUtil=require(_0x033e('0x1c'));var db=require(_0x033e('0x1d'))['db'];config[_0x033e('0x1e')]=_[_0x033e('0x1f')](config[_0x033e('0x1e')],{'host':'localhost','port':0x18eb});var socket=require(_0x033e('0x20'))(new Redis(config['redis']));require(_0x033e('0x21'))[_0x033e('0x22')](socket);function respondWithStatusCode(_0x39f94f,_0x26b6f3){_0x26b6f3=_0x26b6f3||0xcc;return function(_0x247043){if(_0x247043){return _0x39f94f['sendStatus'](_0x26b6f3);}return _0x39f94f[_0x033e('0x23')](_0x26b6f3)['end']();};}function respondWithResult(_0x5efdd5,_0x409ef2){_0x409ef2=_0x409ef2||0xc8;return function(_0x370c42){if(_0x370c42){return _0x5efdd5[_0x033e('0x23')](_0x409ef2)[_0x033e('0x24')](_0x370c42);}};}function respondWithFilteredResult(_0x226db2,_0x19c6a7){return function(_0x449ed5){if(_0x449ed5){var _0x2b9381=typeof _0x19c6a7[_0x033e('0x25')]===_0x033e('0x26')&&typeof _0x19c6a7['limit']==='undefined';var _0x41b781=_0x449ed5['count'];var _0x5ec4bc=_0x2b9381?0x0:_0x19c6a7['offset'];var _0xe7e81a=_0x2b9381?_0x449ed5[_0x033e('0x27')]:_0x19c6a7[_0x033e('0x25')]+_0x19c6a7['limit'];var _0x47dfed;if(_0xe7e81a>=_0x41b781){_0xe7e81a=_0x41b781;_0x47dfed=0xc8;}else{_0x47dfed=0xce;}_0x226db2['status'](_0x47dfed);return _0x226db2[_0x033e('0x28')](_0x033e('0x29'),_0x5ec4bc+'-'+_0xe7e81a+'/'+_0x41b781)[_0x033e('0x24')](_0x449ed5);}return null;};}function patchUpdates(_0x2ad3b9){return function(_0x31fad8){try{jsonpatch['apply'](_0x31fad8,_0x2ad3b9,!![]);}catch(_0x4505e3){return BPromise[_0x033e('0x2a')](_0x4505e3);}return _0x31fad8['save']();};}function saveUpdates(_0x22f3f7,_0x48adc3){return function(_0x2fa15f){if(_0x2fa15f){return _0x2fa15f[_0x033e('0x2b')](_0x22f3f7)['then'](function(_0x157339){return _0x157339;});}return null;};}function removeEntity(_0xa1bfc7,_0x3ab546){return function(_0x4418ae){if(_0x4418ae){return _0x4418ae[_0x033e('0x2c')]()[_0x033e('0x2d')](function(){var _0x8a1d9f=_0x4418ae[_0x033e('0x2e')]({'plain':!![]});var _0x1678e9='Plugins';return db['UserProfileResource'][_0x033e('0x2c')]({'where':{'type':_0x1678e9,'resourceId':_0x8a1d9f['id']}})[_0x033e('0x2d')](function(){return _0x4418ae;});})[_0x033e('0x2d')](function(){_0xa1bfc7[_0x033e('0x23')](0xcc)[_0x033e('0x2f')]();});}};}function handleEntityNotFound(_0x1cdcdf,_0x7d3365){return function(_0x505ba8){if(!_0x505ba8){_0x1cdcdf[_0x033e('0x30')](0x194);}return _0x505ba8;};}function handleError(_0x5cc3c9,_0x1bc266){_0x1bc266=_0x1bc266||0x1f4;return function(_0x42b782){logger[_0x033e('0x31')](_0x42b782['stack']);if(_0x42b782[_0x033e('0x32')]){delete _0x42b782[_0x033e('0x32')];}_0x5cc3c9[_0x033e('0x23')](_0x1bc266)[_0x033e('0x33')](_0x42b782);};}exports[_0x033e('0x34')]=function(_0x4b1726,_0x1bc5a9){var _0xf4a7ab={},_0x6d6217={},_0x4ca288={'count':0x0,'rows':[]};var _0x2eaddb=_[_0x033e('0x35')](db[_0x033e('0x36')]['rawAttributes'],function(_0x294409){return{'name':_0x294409[_0x033e('0x37')],'type':_0x294409[_0x033e('0x38')][_0x033e('0x39')]};});_0x6d6217[_0x033e('0x3a')]=_[_0x033e('0x35')](_0x2eaddb,'name');_0x6d6217[_0x033e('0x3b')]=_[_0x033e('0x3c')](_0x4b1726[_0x033e('0x3b')]);_0x6d6217[_0x033e('0x3d')]=_[_0x033e('0x3e')](_0x6d6217['model'],_0x6d6217[_0x033e('0x3b')]);_0xf4a7ab[_0x033e('0x3f')]=_[_0x033e('0x3e')](_0x6d6217[_0x033e('0x3a')],qs[_0x033e('0x40')](_0x4b1726[_0x033e('0x3b')][_0x033e('0x40')]));_0xf4a7ab[_0x033e('0x3f')]=_0xf4a7ab[_0x033e('0x3f')][_0x033e('0x41')]?_0xf4a7ab[_0x033e('0x3f')]:_0x6d6217[_0x033e('0x3a')];if(!_0x4b1726[_0x033e('0x3b')][_0x033e('0x42')](_0x033e('0x43'))){_0xf4a7ab[_0x033e('0x44')]=qs[_0x033e('0x44')](_0x4b1726['query'][_0x033e('0x44')]);_0xf4a7ab[_0x033e('0x25')]=qs['offset'](_0x4b1726[_0x033e('0x3b')]['offset']);}_0xf4a7ab[_0x033e('0x45')]=qs['sort'](_0x4b1726[_0x033e('0x3b')][_0x033e('0x46')]);_0xf4a7ab['where']=qs[_0x033e('0x3d')](_[_0x033e('0x47')](_0x4b1726[_0x033e('0x3b')],_0x6d6217[_0x033e('0x3d')]),_0x2eaddb);if(_0x4b1726[_0x033e('0x3b')][_0x033e('0x48')]){_0xf4a7ab[_0x033e('0x49')]=_['merge'](_0xf4a7ab[_0x033e('0x49')],{'$or':_[_0x033e('0x35')](_0x2eaddb,function(_0x4a5ebe){if(_0x4a5ebe[_0x033e('0x38')]!=='VIRTUAL'){var _0x170d45={};_0x170d45[_0x4a5ebe[_0x033e('0x32')]]={'$like':'%'+_0x4b1726[_0x033e('0x3b')][_0x033e('0x48')]+'%'};return _0x170d45;}})});}_0xf4a7ab=_[_0x033e('0x4a')]({},_0xf4a7ab,_0x4b1726['options']);var _0x42ce53={'where':_0xf4a7ab[_0x033e('0x49')]};return db['Plugin'][_0x033e('0x27')](_0x42ce53)[_0x033e('0x2d')](function(_0x48bc02){_0x4ca288[_0x033e('0x27')]=_0x48bc02;if(_0x4b1726['query']['includeAll']){_0xf4a7ab[_0x033e('0x4b')]=[{'all':!![]}];}return db[_0x033e('0x36')][_0x033e('0x4c')](_0xf4a7ab);})[_0x033e('0x2d')](function(_0x50bc38){_0x4ca288[_0x033e('0x4d')]=_0x50bc38;return _0x4ca288;})['then'](respondWithFilteredResult(_0x1bc5a9,_0xf4a7ab))[_0x033e('0x4e')](handleError(_0x1bc5a9,null));};exports[_0x033e('0x4f')]=function(_0x483e28,_0x294298){var _0xe0d8ef={'raw':!![],'where':{'id':_0x483e28['params']['id']}},_0x4208eb={};_0x4208eb[_0x033e('0x3a')]=_[_0x033e('0x3c')](db[_0x033e('0x36')][_0x033e('0x50')]);_0x4208eb[_0x033e('0x3b')]=_[_0x033e('0x3c')](_0x483e28[_0x033e('0x3b')]);_0x4208eb[_0x033e('0x3d')]=_[_0x033e('0x3e')](_0x4208eb[_0x033e('0x3a')],_0x4208eb[_0x033e('0x3b')]);_0xe0d8ef[_0x033e('0x3f')]=_[_0x033e('0x3e')](_0x4208eb[_0x033e('0x3a')],qs[_0x033e('0x40')](_0x483e28[_0x033e('0x3b')][_0x033e('0x40')]));_0xe0d8ef[_0x033e('0x3f')]=_0xe0d8ef[_0x033e('0x3f')][_0x033e('0x41')]?_0xe0d8ef[_0x033e('0x3f')]:_0x4208eb[_0x033e('0x3a')];if(_0x483e28[_0x033e('0x3b')]['includeAll']){_0xe0d8ef[_0x033e('0x4b')]=[{'all':!![]}];}_0xe0d8ef=_[_0x033e('0x4a')]({},_0xe0d8ef,_0x483e28[_0x033e('0x51')]);return db[_0x033e('0x36')][_0x033e('0x52')](_0xe0d8ef)[_0x033e('0x2d')](handleEntityNotFound(_0x294298,null))[_0x033e('0x2d')](respondWithResult(_0x294298,null))[_0x033e('0x4e')](handleError(_0x294298,null));};exports[_0x033e('0x53')]=function(_0x3fb3d3,_0x595d90,_0x3e70f2){return db['Plugin'][_0x033e('0x52')]({'where':{'id':_0x3fb3d3[_0x033e('0x54')]['id']},'attributes':[_0x033e('0x32'),_0x033e('0x8')],'raw':!![]})['then'](handleEntityNotFound(_0x595d90,null))[_0x033e('0x2d')](function(_0x95b2fd){if(_0x95b2fd){var _0x388a59=path[_0x033e('0x55')](config[_0x033e('0x56')],_0x033e('0x57'),util[_0x033e('0x58')]('%s.zip',path[_0x033e('0x59')](_0x95b2fd[_0x033e('0x8')])));var _0x246e0d=fs[_0x033e('0x5a')](_0x388a59);var _0x487a76=archiver(_0x033e('0x5b'),{'zlib':{'level':0x9}});_0x487a76['on'](_0x033e('0x5c'),function(_0x37705a){if(_0x37705a[_0x033e('0x5d')]===_0x033e('0x5e')){logger['error'](_0x37705a);}else{throw new db[(_0x033e('0x5f'))][(_0x033e('0x60'))](_0x033e('0x61'));}});_0x487a76['on'](_0x033e('0x31'),function(_0x446c42){throw new db[(_0x033e('0x5f'))][(_0x033e('0x60'))](_0x033e('0x61'));});_0x487a76[_0x033e('0x62')](_0x246e0d);_0x487a76[_0x033e('0x63')](_0x033e('0x64'),{'cwd':path[_0x033e('0x55')](config['root'],_0x033e('0x57'),path[_0x033e('0x65')](_0x95b2fd[_0x033e('0x8')])),'ignore':[path[_0x033e('0x55')](path[_0x033e('0x59')](_0x95b2fd[_0x033e('0x8')]),_0x033e('0x66')),path[_0x033e('0x55')](path['basename'](_0x95b2fd[_0x033e('0x8')]),_0x033e('0x67'))],'nodir':!![]})[_0x033e('0x68')]();_0x246e0d['on'](_0x033e('0x69'),function(){if(!fs[_0x033e('0x6a')](_0x388a59)){throw new db[(_0x033e('0x5f'))][(_0x033e('0x60'))](_0x033e('0x6b'));}return _0x595d90[_0x033e('0x53')](_0x388a59,util[_0x033e('0x58')](_0x033e('0x6c'),path['basename'](_0x95b2fd[_0x033e('0x8')])),function(_0xe91503){if(_0xe91503){throw new db['Sequelize'][(_0x033e('0x60'))]('Error\x20while\x20downloading\x20the\x20plugin');}fs[_0x033e('0x6d')](_0x388a59);logger[_0x033e('0x6e')](_0x033e('0x6f'));logger[_0x033e('0x6e')](_0x033e('0x70'));});});}return null;})[_0x033e('0x4e')](handleError(_0x595d90,null));};exports[_0x033e('0x71')]=function(_0x5529bc,_0x37ed34,_0x1ca669){var _0x1e1dfe=path['basename'](_0x5529bc[_0x033e('0x72')][_0x033e('0x73')],path[_0x033e('0x74')](_0x5529bc[_0x033e('0x72')][_0x033e('0x73')]));var _0x11a368=path[_0x033e('0x55')](config[_0x033e('0x56')],_0x033e('0x57'),_0x5529bc[_0x033e('0x72')][_0x033e('0x73')]);var _0x38e66b=path['join'](config[_0x033e('0x56')],'server/files/plugins',_0x1e1dfe);logger[_0x033e('0x6e')](_0x033e('0x75'),_0x11a368);logger[_0x033e('0x6e')]('Plugin\x20upload\x20destination:\x20%s',_0x38e66b);try{fs['chmodSync'](_0x11a368,parseInt(_0x033e('0x76'),0x8));extract(_0x11a368,{'dir':_0x38e66b},function(_0x515267){if(_0x515267){logger['error'](_0x515267);handleError(_0x515267,!![]);};var _0xaebee3=fs[_0x033e('0x77')](_0x38e66b);if(_0xaebee3[_0x033e('0x41')]>0x1){removeReferences(_0x11a368,_0x38e66b);logger[_0x033e('0x31')]('Invalid\x20plugin\x20structure');return _0x1ca669(new Error('Invalid\x20plugin\x20structure'));}var _0x235225=fs[_0x033e('0x78')](path['join'](_0x38e66b,_0xaebee3[0x0]));if(_0x235225[_0x033e('0x79')]()){removeReferences(_0x11a368,_0x38e66b);logger[_0x033e('0x31')]('Invalid\x20plugin\x20structure');return _0x1ca669(new Error(_0x033e('0x7a')));}if(_0x235225[_0x033e('0x7b')]()){var _0x1af01a=fs[_0x033e('0x77')](path[_0x033e('0x55')](_0x38e66b,_0xaebee3[0x0]));if(_0x1af01a[_0x033e('0x41')]===0x0){removeReferences(_0x11a368,_0x38e66b);logger[_0x033e('0x31')](_0x033e('0x7a'));return _0x1ca669(new Error('Invalid\x20plugin\x20structure'));}var _0x315f51=_0x1af01a[_0x033e('0x7c')](function(_0x4cf48f){return _0x4cf48f===_0x033e('0x7d');});if(!_0x315f51){return _0x1ca669(new Error('Plugin\x20manifest\x20missing'));}var _0x231873=fs[_0x033e('0x7e')](path[_0x033e('0x55')](_0x38e66b,_0xaebee3[0x0],'manifest.json'));var _0x36f7f6=JSON['parse'](_0x231873);if(_0x033e('0x26')==typeof _0x36f7f6[_0x033e('0x32')]){return _0x1ca669(new Error(_0x033e('0x7f')));}if(_0x033e('0x26')==typeof _0x36f7f6[_0x033e('0x38')]){return _0x1ca669(new Error('Invalid\x20manifest:\x20type\x20missing'));}if(_0x033e('0x26')==typeof _0x36f7f6['version']){return _0x1ca669(new Error(_0x033e('0x80')));}if(_0x033e('0x26')==typeof _0x36f7f6['parameters']){return _0x1ca669(new Error('Invalid\x20manifest:\x20parameters\x20missing'));}if(_0x36f7f6['type']===_0x033e('0x81')){if(_0x033e('0x26')==typeof _0x36f7f6[_0x033e('0x82')]['views']){return _0x1ca669(new Error(_0x033e('0x83')));}if('undefined'==typeof _0x36f7f6[_0x033e('0x82')][_0x033e('0x84')][_0x033e('0x85')]&&_0x033e('0x26')==typeof _0x36f7f6[_0x033e('0x82')][_0x033e('0x84')]['agent']){return _0x1ca669(new Error('Invalid\x20manifest:\x20no\x20view\x20specified'));}}else if(_0x36f7f6[_0x033e('0x38')]==='script'){if(_0x033e('0x26')==typeof _0x36f7f6[_0x033e('0x82')][_0x033e('0x86')]){return _0x1ca669(new Error(_0x033e('0x87')));}if(_0x033e('0x26')==typeof _0x36f7f6[_0x033e('0x82')][_0x033e('0x88')]){return _0x1ca669(new Error(_0x033e('0x89')));}}else{return _0x1ca669(new Error(_0x033e('0x8a')));}var _0x256281=_0x36f7f6[_0x033e('0x32')];var _0x5bd6e1=_0x36f7f6[_0x033e('0x8b')];var _0x2b4afb=_0x36f7f6[_0x033e('0x38')];var _0x23164f=_0x36f7f6[_0x033e('0x8c')]?_0x36f7f6['sidebar']:_0x033e('0x8d');var _0x48bf1e=_0x36f7f6[_0x033e('0x8e')]?_0x36f7f6['icon']:_0x033e('0x8f');var _0x261fe8='';var _0x1cceef='';var _0x5b1e4d='';var _0x3af4d2='';var _0x3fd5fd=_0x36f7f6[_0x033e('0x90')];if(_0x2b4afb===_0x033e('0x81')){if(_0x033e('0x26')!=typeof _0x36f7f6[_0x033e('0x82')][_0x033e('0x84')][_0x033e('0x85')]){var _0x44d542=_0x36f7f6[_0x033e('0x82')][_0x033e('0x84')][_0x033e('0x85')];if(!/^(f|ht)tps?:\/\//i[_0x033e('0x91')](_0x44d542)){_0x261fe8=path[_0x033e('0x55')]('plugins',_0x1e1dfe,_0xaebee3[0x0],_0x44d542);}else{_0x261fe8=_0x44d542;}}else{logger[_0x033e('0x6e')](_0x033e('0x92'));}if('undefined'!=typeof _0x36f7f6[_0x033e('0x82')]['views'][_0x033e('0x93')]){var _0x32a7c6=_0x36f7f6[_0x033e('0x82')][_0x033e('0x84')][_0x033e('0x93')];if(!/^(f|ht)tps?:\/\//i[_0x033e('0x91')](_0x32a7c6)){_0x1cceef=path[_0x033e('0x55')](_0x033e('0x94'),_0x1e1dfe,_0xaebee3[0x0],_0x32a7c6);}else{_0x1cceef=_0x32a7c6;}}else{logger[_0x033e('0x6e')](_0x033e('0x95'));}}else if(_0x2b4afb===_0x033e('0x96')){_0x5b1e4d=_0x36f7f6[_0x033e('0x82')][_0x033e('0x86')];_0x3af4d2=_0x36f7f6[_0x033e('0x82')]['scriptPath'];if(_0x033e('0x26')!=typeof _0x36f7f6['parameters'][_0x033e('0x84')]){if(_0x033e('0x26')!=typeof _0x36f7f6[_0x033e('0x82')][_0x033e('0x84')][_0x033e('0x85')]){var _0x44d542=_0x36f7f6[_0x033e('0x82')]['views'][_0x033e('0x85')];if(!/^(f|ht)tps?:\/\//i[_0x033e('0x91')](_0x44d542)){_0x261fe8=path[_0x033e('0x55')](_0x033e('0x94'),_0x1e1dfe,_0xaebee3[0x0],_0x44d542);}else{_0x261fe8=_0x44d542;}}if(_0x033e('0x26')!=typeof _0x36f7f6[_0x033e('0x82')][_0x033e('0x84')][_0x033e('0x93')]){var _0x32a7c6=_0x36f7f6['parameters'][_0x033e('0x84')][_0x033e('0x93')];if(!/^(f|ht)tps?:\/\//i[_0x033e('0x91')](_0x32a7c6)){_0x1cceef=path[_0x033e('0x55')](_0x033e('0x94'),_0x1e1dfe,_0xaebee3[0x0],_0x32a7c6);}else{_0x1cceef=_0x32a7c6;}}}}var _0x2eefb6={'name':_0x256281,'description':_0x5bd6e1,'path':path[_0x033e('0x55')](_0x1e1dfe,_0xaebee3[0x0]),'type':_0x2b4afb,'sidebar':_0x23164f,'icon':_0x48bf1e,'adminUrl':_0x261fe8,'agentUrl':_0x1cceef,'scriptName':_0x5b1e4d,'scriptPath':_0x3af4d2,'version':_0x3fd5fd};removeReferences(_0x11a368,null);return db[_0x033e('0x36')][_0x033e('0x97')](_0x2eefb6)[_0x033e('0x2d')](function(_0x4f1944){var _0x3bac30={'role':_0x5529bc[_0x033e('0x98')][_0x033e('0x99')],'userProfileId':_0x5529bc['body'][_0x033e('0x9a')]};if(!_0x3bac30)throw new Error(_0x033e('0x9b'));if(_0x3bac30[_0x033e('0x99')]===_0x033e('0x9c')){var _0x37912b=_0x4f1944['get']({'plain':!![]});return db[_0x033e('0x9d')]['find']({'where':{'name':'Plugins','userProfileId':_0x3bac30[_0x033e('0x9a')]},'raw':!![]})['then'](function(_0x3429aa){if(_0x3429aa&&_0x3429aa[_0x033e('0x9e')]===0x0){return db[_0x033e('0x9f')]['create']({'name':_0x37912b[_0x033e('0x32')],'resourceId':_0x37912b['id'],'type':_0x3429aa[_0x033e('0x32')],'sectionId':_0x3429aa['id']},{})[_0x033e('0x2d')](function(){return _0x4f1944;});}else{return _0x4f1944;}})['catch'](function(_0x4c324c){logger[_0x033e('0x31')](_0x033e('0xa0'),_0x4c324c);throw _0x4c324c;});}return _0x4f1944;})[_0x033e('0x2d')](respondWithResult(_0x37ed34,null))['catch'](handleError(_0x37ed34,null));}});}catch(_0x5618d6){_0x37ed34['status'](0x1f4)[_0x033e('0x33')](_0x5618d6);}};function removeReferences(_0x3c349f,_0x457fbf){try{if(_0x3c349f){fs[_0x033e('0x6d')](_0x3c349f);logger[_0x033e('0x6e')](_0x033e('0xa1'));}if(_0x457fbf){rimraf(_0x457fbf,function(){});logger[_0x033e('0x6e')](_0x033e('0xa2'));}}catch(_0x21d85e){logger[_0x033e('0x31')](_0x21d85e);}}exports[_0x033e('0x2b')]=function(_0x28e349,_0x5b1e3c,_0x3ed54d){return db[_0x033e('0x36')][_0x033e('0x52')]({'where':{'id':_0x28e349['params']['id']}})['then'](handleEntityNotFound(_0x5b1e3c,null))[_0x033e('0x2d')](saveUpdates(_0x28e349[_0x033e('0x98')],null))[_0x033e('0x2d')](respondWithResult(_0x5b1e3c,null))[_0x033e('0x4e')](handleError(_0x5b1e3c,null));};exports[_0x033e('0xa3')]=function(_0xb52dc1,_0xecba3d,_0x2932dd){return db[_0x033e('0x36')][_0x033e('0x52')]({'where':{'id':_0xb52dc1[_0x033e('0x54')]['id']}})[_0x033e('0x2d')](function(_0x1e5eb4){if(_0x1e5eb4){return _0x1e5eb4['destroy']();}})['then'](function(_0x5525e1){rimraf(path['join'](config['root'],_0x033e('0x57'),path[_0x033e('0x65')](_0x5525e1['path'])),function(){});return _0x5525e1;})[_0x033e('0x2d')](handleEntityNotFound(_0xecba3d,null))['then'](respondWithStatusCode(_0xecba3d,null))[_0x033e('0x4e')](handleError(_0xecba3d,null));};exports[_0x033e('0xa4')]=function(_0x3588db,_0x3ea0dc,_0x1b9f38){return BPromise[_0x033e('0xa5')]()[_0x033e('0x2d')](function(){if(!_0x3588db[_0x033e('0x3b')][_0x033e('0x8')]){throw new Error(_0x033e('0xa6'));}if(!_0x3588db[_0x033e('0x3b')][_0x033e('0xa7')]){throw new Error('\x27PORT\x27\x20parameter\x20not\x20specified');}var _0x41b64d=_0x3588db[_0x033e('0x3b')][_0x033e('0xa8')]?_0x3588db[_0x033e('0x3b')][_0x033e('0xa8')]+':'+_0x3588db['query'][_0x033e('0xa7')]:_0x033e('0xa9')+_0x3588db[_0x033e('0x3b')][_0x033e('0xa7')];var _0x353a2b=_0x3588db['query']['json']?_0x3588db[_0x033e('0x3b')]['json']:!![];var _0x1054b2=_0x3588db[_0x033e('0x3b')][_0x033e('0xaa')]?_0x3588db[_0x033e('0x3b')][_0x033e('0xaa')]:null;var _0x1414de={'method':_0x3588db['method'],'uri':util[_0x033e('0x58')](_0x033e('0xab'),_0x41b64d,_0x3588db[_0x033e('0x3b')]['path']),'json':_0x353a2b,'resolveWithFullResponse':!![],'encoding':_0x1054b2,'qs':_0x3588db[_0x033e('0x3b')]};if(_0x3588db[_0x033e('0xac')]){_0x1414de['headers']=_0x3588db[_0x033e('0xac')];if(_0x1414de[_0x033e('0xac')][_0x033e('0xad')]){delete _0x1414de[_0x033e('0xac')][_0x033e('0xad')];}}if(_0x1414de[_0x033e('0xac')][_0x033e('0xae')]){delete _0x1414de[_0x033e('0xac')][_0x033e('0xae')];}return rp(_0x1414de);})[_0x033e('0x2d')](function(_0x2f3aa9){if(_0x2f3aa9){_0x3ea0dc[_0x033e('0x28')](_0x2f3aa9[_0x033e('0xac')]);logger[_0x033e('0x6e')](_0x2f3aa9[_0x033e('0x98')]);if(_[_0x033e('0xaf')](_0x3588db['query'][_0x033e('0x8')],_0x033e('0x53'))&&_0x2f3aa9[_0x033e('0xb0')]==0x1f4){return _0x3ea0dc[_0x033e('0x30')](_0x2f3aa9[_0x033e('0xb0')]);}else{return _0x3ea0dc[_0x033e('0x23')](_0x2f3aa9[_0x033e('0xb0')])[_0x033e('0x33')](_0x2f3aa9['body']);}}else{return _0x3ea0dc[_0x033e('0x30')](0xc8);}})['catch'](handleError(_0x3ea0dc,null));};exports[_0x033e('0xb1')]=function(_0x2a05a5,_0xcd934,_0x493f9b){return BPromise[_0x033e('0xa5')]()[_0x033e('0x2d')](function(){if(!_0x2a05a5[_0x033e('0x3b')][_0x033e('0x8')]){throw new Error(_0x033e('0xa6'));}if(!_0x2a05a5[_0x033e('0x3b')][_0x033e('0xa7')]){throw new Error(_0x033e('0xb2'));}var _0x2ec4b8=_0x2a05a5[_0x033e('0x3b')]['hostname']?_0x2a05a5[_0x033e('0x3b')]['hostname']+':'+_0x2a05a5['query'][_0x033e('0xa7')]:'http://localhost:'+_0x2a05a5[_0x033e('0x3b')][_0x033e('0xa7')];var _0x2c84fd=_0x2a05a5['query'][_0x033e('0x24')]?_0x2a05a5['query']['json']:!![];var _0x16d9a2=_0x2a05a5[_0x033e('0x3b')][_0x033e('0xaa')]?_0x2a05a5[_0x033e('0x3b')][_0x033e('0xaa')]:null;var _0x269385={'method':_0x2a05a5[_0x033e('0xb3')],'uri':util[_0x033e('0x58')](_0x033e('0xab'),_0x2ec4b8,_0x2a05a5['query'][_0x033e('0x8')]),'json':_0x2c84fd,'resolveWithFullResponse':!![],'encoding':_0x16d9a2,'body':_0x2a05a5['body']};if(_0x2a05a5['headers']){_0x269385[_0x033e('0xac')]=_0x2a05a5['headers'];if(_0x269385[_0x033e('0xac')][_0x033e('0xad')]){delete _0x269385['headers'][_0x033e('0xad')];}}if(_0x269385[_0x033e('0xac')][_0x033e('0xae')]){delete _0x269385[_0x033e('0xac')][_0x033e('0xae')];}return rp(_0x269385);})[_0x033e('0x2d')](function(_0x34c2c9){if(_0x34c2c9){_0xcd934[_0x033e('0x28')](_0x34c2c9['headers']);logger[_0x033e('0x6e')](_0x34c2c9[_0x033e('0x98')]);return _0xcd934['status'](_0x34c2c9[_0x033e('0xb0')])[_0x033e('0x33')](_0x34c2c9['body']);}else{return _0xcd934[_0x033e('0x30')](0xc8);}})[_0x033e('0x4e')](handleError(_0xcd934,null));}; \ No newline at end of file +var _0x1244=['where','pick','filter','merge','VIRTUAL','options','count','includeAll','include','findAll','catch','find','download','join','root','server/files/plugins','format','%s.zip','basename','createWriteStream','zip','code','ENOENT','Sequelize','Error','Error\x20while\x20generating\x20the\x20zip\x20archive','pipe','**/*','node_modules/**/*','finalize','close','existsSync','Plugin\x20not\x20found','Error\x20while\x20downloading\x20the\x20plugin','unlinkSync','info','Download\x20completed','Temporary\x20file\x20removed','upload','file','filename','extname','Plugin\x20upload\x20filepath:\x20%s','Plugin\x20upload\x20destination:\x20%s','0777','readdirSync','Invalid\x20plugin\x20structure','lstatSync','isFile','isDirectory','some','manifest.json','Plugin\x20manifest\x20missing','readFileSync','parse','Invalid\x20manifest:\x20name\x20missing','Invalid\x20manifest:\x20type\x20missing','version','Invalid\x20manifest:\x20version\x20not\x20specified','parameters','Invalid\x20manifest:\x20parameters\x20missing','html','views','admin','agent','script','scriptName','scriptPath','description','sidebar','icon','icon-apps','test','plugins','Warning:\x20admin\x20view\x20not\x20specified','Warning:\x20agent\x20view\x20not\x20specified','create','body','role','userProfileId','user','UserProfileSection','Plugins','autoAssociation','params','delete','dirname','resolve','\x27PATH\x27\x20parameter\x20not\x20specified','port','\x27PORT\x27\x20parameter\x20not\x20specified','hostname','encoding','method','%s%s','headers','content-type','endsWith','statusCode','http://localhost:','content-length','zip-dir','fast-json-patch','request-promise','moment','bluebird','util','path','sox','to-csv','ejs','lodash','squel','jsforce','desk.js','querystring','papaparse','rimraf','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/logger','api','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','redis','localhost','socket.io-emitter','./plugin.socket','register','sendStatus','status','end','json','offset','undefined','limit','set','Content-Range','apply','reject','save','update','then','destroy','get','UserProfileResource','error','stack','name','send','index','map','Plugin','rawAttributes','fieldName','type','key','model','query','keys','filters','intersection','attributes','fields','length','nolimit','order','sort'];(function(_0x58ae8a,_0x3c619e){var _0x2f0b6b=function(_0x6db940){while(--_0x6db940){_0x58ae8a['push'](_0x58ae8a['shift']());}};_0x2f0b6b(++_0x3c619e);}(_0x1244,0x65));var _0x4124=function(_0x92c450,_0x41f1e3){_0x92c450=_0x92c450-0x0;var _0x2a9599=_0x1244[_0x92c450];return _0x2a9599;};'use strict';var emlformat=require('eml-format');var rimraf=require('rimraf');var zipdir=require(_0x4124('0x0'));var jsonpatch=require(_0x4124('0x1'));var rp=require(_0x4124('0x2'));var moment=require(_0x4124('0x3'));var BPromise=require(_0x4124('0x4'));var Mustache=require('mustache');var util=require(_0x4124('0x5'));var path=require(_0x4124('0x6'));var sox=require(_0x4124('0x7'));var csv=require(_0x4124('0x8'));var ejs=require(_0x4124('0x9'));var fs=require('fs');var fs_extra=require('fs-extra');var _=require(_0x4124('0xa'));var squel=require(_0x4124('0xb'));var crypto=require('crypto');var jsforce=require(_0x4124('0xc'));var deskjs=require(_0x4124('0xd'));var toCsv=require(_0x4124('0x8'));var querystring=require(_0x4124('0xe'));var Papa=require(_0x4124('0xf'));var extract=require('extract-zip');var rimraf=require(_0x4124('0x10'));var archiver=require('archiver');var Redis=require(_0x4124('0x11'));var authService=require(_0x4124('0x12'));var qs=require(_0x4124('0x13'));var as=require(_0x4124('0x14'));var hardwareService=require('../../config/license/hardware');var logger=require(_0x4124('0x15'))(_0x4124('0x16'));var utils=require(_0x4124('0x17'));var config=require(_0x4124('0x18'));var licenseUtil=require(_0x4124('0x19'));var db=require(_0x4124('0x1a'))['db'];config[_0x4124('0x1b')]=_['defaults'](config[_0x4124('0x1b')],{'host':_0x4124('0x1c'),'port':0x18eb});var socket=require(_0x4124('0x1d'))(new Redis(config[_0x4124('0x1b')]));require(_0x4124('0x1e'))[_0x4124('0x1f')](socket);function respondWithStatusCode(_0x3bbe1b,_0xc8091){_0xc8091=_0xc8091||0xcc;return function(_0x20fb6e){if(_0x20fb6e){return _0x3bbe1b[_0x4124('0x20')](_0xc8091);}return _0x3bbe1b[_0x4124('0x21')](_0xc8091)[_0x4124('0x22')]();};}function respondWithResult(_0x17e831,_0x5a7787){_0x5a7787=_0x5a7787||0xc8;return function(_0xce2373){if(_0xce2373){return _0x17e831[_0x4124('0x21')](_0x5a7787)[_0x4124('0x23')](_0xce2373);}};}function respondWithFilteredResult(_0x4e5d07,_0x4d23a8){return function(_0x54722d){if(_0x54722d){var _0x290b8c=typeof _0x4d23a8[_0x4124('0x24')]===_0x4124('0x25')&&typeof _0x4d23a8['limit']===_0x4124('0x25');var _0x5b0166=_0x54722d['count'];var _0x4e7e78=_0x290b8c?0x0:_0x4d23a8[_0x4124('0x24')];var _0x5552b1=_0x290b8c?_0x54722d['count']:_0x4d23a8[_0x4124('0x24')]+_0x4d23a8[_0x4124('0x26')];var _0x3b2f44;if(_0x5552b1>=_0x5b0166){_0x5552b1=_0x5b0166;_0x3b2f44=0xc8;}else{_0x3b2f44=0xce;}_0x4e5d07['status'](_0x3b2f44);return _0x4e5d07[_0x4124('0x27')](_0x4124('0x28'),_0x4e7e78+'-'+_0x5552b1+'/'+_0x5b0166)['json'](_0x54722d);}return null;};}function patchUpdates(_0x581928){return function(_0xe931b7){try{jsonpatch[_0x4124('0x29')](_0xe931b7,_0x581928,!![]);}catch(_0x12c179){return BPromise[_0x4124('0x2a')](_0x12c179);}return _0xe931b7[_0x4124('0x2b')]();};}function saveUpdates(_0x3753d9,_0x1478ae){return function(_0x2659c5){if(_0x2659c5){return _0x2659c5[_0x4124('0x2c')](_0x3753d9)[_0x4124('0x2d')](function(_0xf6eeee){return _0xf6eeee;});}return null;};}function removeEntity(_0x252296,_0x39eee6){return function(_0x2d4764){if(_0x2d4764){return _0x2d4764[_0x4124('0x2e')]()[_0x4124('0x2d')](function(){var _0x270350=_0x2d4764[_0x4124('0x2f')]({'plain':!![]});var _0x109384='Plugins';return db[_0x4124('0x30')][_0x4124('0x2e')]({'where':{'type':_0x109384,'resourceId':_0x270350['id']}})['then'](function(){return _0x2d4764;});})['then'](function(){_0x252296[_0x4124('0x21')](0xcc)['end']();});}};}function handleEntityNotFound(_0x552c52,_0x5eef0b){return function(_0x428a21){if(!_0x428a21){_0x552c52[_0x4124('0x20')](0x194);}return _0x428a21;};}function handleError(_0x5efcbe,_0x58212c){_0x58212c=_0x58212c||0x1f4;return function(_0x43e5a2){logger[_0x4124('0x31')](_0x43e5a2[_0x4124('0x32')]);if(_0x43e5a2[_0x4124('0x33')]){delete _0x43e5a2['name'];}_0x5efcbe[_0x4124('0x21')](_0x58212c)[_0x4124('0x34')](_0x43e5a2);};}exports[_0x4124('0x35')]=function(_0x3baaa0,_0x4bf09f){var _0x37c36f={},_0x166abc={},_0x52cad0={'count':0x0,'rows':[]};var _0x10f187=_[_0x4124('0x36')](db[_0x4124('0x37')][_0x4124('0x38')],function(_0x49fc0b){return{'name':_0x49fc0b[_0x4124('0x39')],'type':_0x49fc0b[_0x4124('0x3a')][_0x4124('0x3b')]};});_0x166abc[_0x4124('0x3c')]=_[_0x4124('0x36')](_0x10f187,_0x4124('0x33'));_0x166abc[_0x4124('0x3d')]=_[_0x4124('0x3e')](_0x3baaa0[_0x4124('0x3d')]);_0x166abc[_0x4124('0x3f')]=_[_0x4124('0x40')](_0x166abc['model'],_0x166abc[_0x4124('0x3d')]);_0x37c36f[_0x4124('0x41')]=_[_0x4124('0x40')](_0x166abc[_0x4124('0x3c')],qs[_0x4124('0x42')](_0x3baaa0['query'][_0x4124('0x42')]));_0x37c36f[_0x4124('0x41')]=_0x37c36f['attributes'][_0x4124('0x43')]?_0x37c36f['attributes']:_0x166abc[_0x4124('0x3c')];if(!_0x3baaa0['query']['hasOwnProperty'](_0x4124('0x44'))){_0x37c36f[_0x4124('0x26')]=qs['limit'](_0x3baaa0['query'][_0x4124('0x26')]);_0x37c36f[_0x4124('0x24')]=qs[_0x4124('0x24')](_0x3baaa0[_0x4124('0x3d')][_0x4124('0x24')]);}_0x37c36f[_0x4124('0x45')]=qs['sort'](_0x3baaa0[_0x4124('0x3d')][_0x4124('0x46')]);_0x37c36f[_0x4124('0x47')]=qs[_0x4124('0x3f')](_[_0x4124('0x48')](_0x3baaa0[_0x4124('0x3d')],_0x166abc[_0x4124('0x3f')]),_0x10f187);if(_0x3baaa0['query'][_0x4124('0x49')]){_0x37c36f[_0x4124('0x47')]=_[_0x4124('0x4a')](_0x37c36f['where'],{'$or':_[_0x4124('0x36')](_0x10f187,function(_0x3c77da){if(_0x3c77da[_0x4124('0x3a')]!==_0x4124('0x4b')){var _0xc0f58a={};_0xc0f58a[_0x3c77da['name']]={'$like':'%'+_0x3baaa0[_0x4124('0x3d')][_0x4124('0x49')]+'%'};return _0xc0f58a;}})});}_0x37c36f=_[_0x4124('0x4a')]({},_0x37c36f,_0x3baaa0[_0x4124('0x4c')]);var _0x4dd575={'where':_0x37c36f[_0x4124('0x47')]};return db[_0x4124('0x37')][_0x4124('0x4d')](_0x4dd575)[_0x4124('0x2d')](function(_0x3d9193){_0x52cad0['count']=_0x3d9193;if(_0x3baaa0[_0x4124('0x3d')][_0x4124('0x4e')]){_0x37c36f[_0x4124('0x4f')]=[{'all':!![]}];}return db[_0x4124('0x37')][_0x4124('0x50')](_0x37c36f);})[_0x4124('0x2d')](function(_0x5bb5c9){_0x52cad0['rows']=_0x5bb5c9;return _0x52cad0;})['then'](respondWithFilteredResult(_0x4bf09f,_0x37c36f))[_0x4124('0x51')](handleError(_0x4bf09f,null));};exports['show']=function(_0x36193a,_0x56788b){var _0x54447c={'raw':!![],'where':{'id':_0x36193a['params']['id']}},_0x33fec5={};_0x33fec5[_0x4124('0x3c')]=_[_0x4124('0x3e')](db[_0x4124('0x37')]['rawAttributes']);_0x33fec5['query']=_[_0x4124('0x3e')](_0x36193a[_0x4124('0x3d')]);_0x33fec5[_0x4124('0x3f')]=_[_0x4124('0x40')](_0x33fec5[_0x4124('0x3c')],_0x33fec5[_0x4124('0x3d')]);_0x54447c[_0x4124('0x41')]=_[_0x4124('0x40')](_0x33fec5[_0x4124('0x3c')],qs[_0x4124('0x42')](_0x36193a['query'][_0x4124('0x42')]));_0x54447c[_0x4124('0x41')]=_0x54447c[_0x4124('0x41')][_0x4124('0x43')]?_0x54447c[_0x4124('0x41')]:_0x33fec5[_0x4124('0x3c')];if(_0x36193a[_0x4124('0x3d')]['includeAll']){_0x54447c[_0x4124('0x4f')]=[{'all':!![]}];}_0x54447c=_[_0x4124('0x4a')]({},_0x54447c,_0x36193a[_0x4124('0x4c')]);return db[_0x4124('0x37')][_0x4124('0x52')](_0x54447c)[_0x4124('0x2d')](handleEntityNotFound(_0x56788b,null))['then'](respondWithResult(_0x56788b,null))[_0x4124('0x51')](handleError(_0x56788b,null));};exports[_0x4124('0x53')]=function(_0x13152f,_0x4ed0d3,_0x5dff2b){return db['Plugin'][_0x4124('0x52')]({'where':{'id':_0x13152f['params']['id']},'attributes':[_0x4124('0x33'),'path'],'raw':!![]})[_0x4124('0x2d')](handleEntityNotFound(_0x4ed0d3,null))['then'](function(_0x1dad11){if(_0x1dad11){var _0x42bbca=path[_0x4124('0x54')](config[_0x4124('0x55')],_0x4124('0x56'),util[_0x4124('0x57')](_0x4124('0x58'),path[_0x4124('0x59')](_0x1dad11[_0x4124('0x6')])));var _0x1c2f7e=fs[_0x4124('0x5a')](_0x42bbca);var _0x2d2d4b=archiver(_0x4124('0x5b'),{'zlib':{'level':0x9}});_0x2d2d4b['on']('warning',function(_0x28924d){if(_0x28924d[_0x4124('0x5c')]===_0x4124('0x5d')){logger[_0x4124('0x31')](_0x28924d);}else{throw new db[(_0x4124('0x5e'))][(_0x4124('0x5f'))](_0x4124('0x60'));}});_0x2d2d4b['on'](_0x4124('0x31'),function(_0x5ecbec){throw new db[(_0x4124('0x5e'))][(_0x4124('0x5f'))](_0x4124('0x60'));});_0x2d2d4b[_0x4124('0x61')](_0x1c2f7e);_0x2d2d4b['glob'](_0x4124('0x62'),{'cwd':path[_0x4124('0x54')](config[_0x4124('0x55')],_0x4124('0x56'),path['dirname'](_0x1dad11[_0x4124('0x6')])),'ignore':[path[_0x4124('0x54')](path[_0x4124('0x59')](_0x1dad11[_0x4124('0x6')]),_0x4124('0x63')),path[_0x4124('0x54')](path[_0x4124('0x59')](_0x1dad11['path']),'attachments/**/*')],'nodir':!![]})[_0x4124('0x64')]();_0x1c2f7e['on'](_0x4124('0x65'),function(){if(!fs[_0x4124('0x66')](_0x42bbca)){throw new db[(_0x4124('0x5e'))][(_0x4124('0x5f'))](_0x4124('0x67'));}return _0x4ed0d3['download'](_0x42bbca,util['format'](_0x4124('0x58'),path[_0x4124('0x59')](_0x1dad11[_0x4124('0x6')])),function(_0x124807){if(_0x124807){throw new db[(_0x4124('0x5e'))][(_0x4124('0x5f'))](_0x4124('0x68'));}fs[_0x4124('0x69')](_0x42bbca);logger[_0x4124('0x6a')](_0x4124('0x6b'));logger['info'](_0x4124('0x6c'));});});}return null;})['catch'](handleError(_0x4ed0d3,null));};exports[_0x4124('0x6d')]=function(_0x5067da,_0x5b96a8,_0x5b842f){var _0x54ae31=path[_0x4124('0x59')](_0x5067da[_0x4124('0x6e')][_0x4124('0x6f')],path[_0x4124('0x70')](_0x5067da[_0x4124('0x6e')][_0x4124('0x6f')]));var _0xdbeadc=path['join'](config[_0x4124('0x55')],_0x4124('0x56'),_0x5067da['file']['filename']);var _0xc4eb17=path[_0x4124('0x54')](config[_0x4124('0x55')],_0x4124('0x56'),_0x54ae31);logger[_0x4124('0x6a')](_0x4124('0x71'),_0xdbeadc);logger[_0x4124('0x6a')](_0x4124('0x72'),_0xc4eb17);try{fs['chmodSync'](_0xdbeadc,parseInt(_0x4124('0x73'),0x8));extract(_0xdbeadc,{'dir':_0xc4eb17},function(_0x125e24){if(_0x125e24){logger[_0x4124('0x31')](_0x125e24);handleError(_0x125e24,!![]);};var _0x4fd41a=fs[_0x4124('0x74')](_0xc4eb17);if(_0x4fd41a['length']>0x1){removeReferences(_0xdbeadc,_0xc4eb17);logger[_0x4124('0x31')](_0x4124('0x75'));return _0x5b842f(new Error('Invalid\x20plugin\x20structure'));}var _0x26238f=fs[_0x4124('0x76')](path['join'](_0xc4eb17,_0x4fd41a[0x0]));if(_0x26238f[_0x4124('0x77')]()){removeReferences(_0xdbeadc,_0xc4eb17);logger['error'](_0x4124('0x75'));return _0x5b842f(new Error('Invalid\x20plugin\x20structure'));}if(_0x26238f[_0x4124('0x78')]()){var _0x23f238=fs[_0x4124('0x74')](path[_0x4124('0x54')](_0xc4eb17,_0x4fd41a[0x0]));if(_0x23f238['length']===0x0){removeReferences(_0xdbeadc,_0xc4eb17);logger[_0x4124('0x31')](_0x4124('0x75'));return _0x5b842f(new Error(_0x4124('0x75')));}var _0x2aed7c=_0x23f238[_0x4124('0x79')](function(_0x4b4448){return _0x4b4448===_0x4124('0x7a');});if(!_0x2aed7c){return _0x5b842f(new Error(_0x4124('0x7b')));}var _0x25c674=fs[_0x4124('0x7c')](path['join'](_0xc4eb17,_0x4fd41a[0x0],_0x4124('0x7a')));var _0x1b8f41=JSON[_0x4124('0x7d')](_0x25c674);if('undefined'==typeof _0x1b8f41['name']){return _0x5b842f(new Error(_0x4124('0x7e')));}if(_0x4124('0x25')==typeof _0x1b8f41[_0x4124('0x3a')]){return _0x5b842f(new Error(_0x4124('0x7f')));}if(_0x4124('0x25')==typeof _0x1b8f41[_0x4124('0x80')]){return _0x5b842f(new Error(_0x4124('0x81')));}if(_0x4124('0x25')==typeof _0x1b8f41[_0x4124('0x82')]){return _0x5b842f(new Error(_0x4124('0x83')));}if(_0x1b8f41[_0x4124('0x3a')]===_0x4124('0x84')){if(_0x4124('0x25')==typeof _0x1b8f41[_0x4124('0x82')][_0x4124('0x85')]){return _0x5b842f(new Error('Invalid\x20manifest:\x20views\x20missing'));}if(_0x4124('0x25')==typeof _0x1b8f41[_0x4124('0x82')][_0x4124('0x85')][_0x4124('0x86')]&&'undefined'==typeof _0x1b8f41[_0x4124('0x82')]['views'][_0x4124('0x87')]){return _0x5b842f(new Error('Invalid\x20manifest:\x20no\x20view\x20specified'));}}else if(_0x1b8f41[_0x4124('0x3a')]===_0x4124('0x88')){if(_0x4124('0x25')==typeof _0x1b8f41['parameters'][_0x4124('0x89')]){return _0x5b842f(new Error('Invalid\x20manifest:\x20script\x20name\x20missing'));}if(_0x4124('0x25')==typeof _0x1b8f41[_0x4124('0x82')][_0x4124('0x8a')]){return _0x5b842f(new Error('Invalid\x20manifest:\x20script\x20path\x20missing'));}}else{return _0x5b842f(new Error('Invalid\x20manifest:\x20invalid\x20type'));}var _0x42a876=_0x1b8f41['name'];var _0x46d09b=_0x1b8f41[_0x4124('0x8b')];var _0x100660=_0x1b8f41['type'];var _0x27b4c3=_0x1b8f41[_0x4124('0x8c')]?_0x1b8f41['sidebar']:'always';var _0x35a19b=_0x1b8f41[_0x4124('0x8d')]?_0x1b8f41[_0x4124('0x8d')]:_0x4124('0x8e');var _0x152433='';var _0x106ad0='';var _0x30a4ba='';var _0x7662ee='';var _0x42bfba=_0x1b8f41[_0x4124('0x80')];if(_0x100660===_0x4124('0x84')){if(_0x4124('0x25')!=typeof _0x1b8f41[_0x4124('0x82')]['views']['admin']){var _0x293bd4=_0x1b8f41[_0x4124('0x82')][_0x4124('0x85')][_0x4124('0x86')];if(!/^(f|ht)tps?:\/\//i[_0x4124('0x8f')](_0x293bd4)){_0x152433=path['join'](_0x4124('0x90'),_0x54ae31,_0x4fd41a[0x0],_0x293bd4);}else{_0x152433=_0x293bd4;}}else{logger[_0x4124('0x6a')](_0x4124('0x91'));}if(_0x4124('0x25')!=typeof _0x1b8f41[_0x4124('0x82')][_0x4124('0x85')][_0x4124('0x87')]){var _0x5cc795=_0x1b8f41[_0x4124('0x82')][_0x4124('0x85')][_0x4124('0x87')];if(!/^(f|ht)tps?:\/\//i[_0x4124('0x8f')](_0x5cc795)){_0x106ad0=path[_0x4124('0x54')](_0x4124('0x90'),_0x54ae31,_0x4fd41a[0x0],_0x5cc795);}else{_0x106ad0=_0x5cc795;}}else{logger[_0x4124('0x6a')](_0x4124('0x92'));}}else if(_0x100660==='script'){_0x30a4ba=_0x1b8f41[_0x4124('0x82')][_0x4124('0x89')];_0x7662ee=_0x1b8f41[_0x4124('0x82')][_0x4124('0x8a')];if(_0x4124('0x25')!=typeof _0x1b8f41[_0x4124('0x82')][_0x4124('0x85')]){if(_0x4124('0x25')!=typeof _0x1b8f41[_0x4124('0x82')][_0x4124('0x85')][_0x4124('0x86')]){var _0x293bd4=_0x1b8f41[_0x4124('0x82')][_0x4124('0x85')][_0x4124('0x86')];if(!/^(f|ht)tps?:\/\//i[_0x4124('0x8f')](_0x293bd4)){_0x152433=path[_0x4124('0x54')](_0x4124('0x90'),_0x54ae31,_0x4fd41a[0x0],_0x293bd4);}else{_0x152433=_0x293bd4;}}if('undefined'!=typeof _0x1b8f41[_0x4124('0x82')][_0x4124('0x85')][_0x4124('0x87')]){var _0x5cc795=_0x1b8f41[_0x4124('0x82')][_0x4124('0x85')][_0x4124('0x87')];if(!/^(f|ht)tps?:\/\//i[_0x4124('0x8f')](_0x5cc795)){_0x106ad0=path['join'](_0x4124('0x90'),_0x54ae31,_0x4fd41a[0x0],_0x5cc795);}else{_0x106ad0=_0x5cc795;}}}}var _0x581899={'name':_0x42a876,'description':_0x46d09b,'path':path[_0x4124('0x54')](_0x54ae31,_0x4fd41a[0x0]),'type':_0x100660,'sidebar':_0x27b4c3,'icon':_0x35a19b,'adminUrl':_0x152433,'agentUrl':_0x106ad0,'scriptName':_0x30a4ba,'scriptPath':_0x7662ee,'version':_0x42bfba};removeReferences(_0xdbeadc,null);return db[_0x4124('0x37')][_0x4124('0x93')](_0x581899)['then'](function(_0x235537){var _0x3dbc4d={'role':_0x5067da[_0x4124('0x94')][_0x4124('0x95')],'userProfileId':_0x5067da[_0x4124('0x94')][_0x4124('0x96')]};if(!_0x3dbc4d)throw new Error('Unable\x20to\x20retrieve\x20the\x20current\x20user');if(_0x3dbc4d[_0x4124('0x95')]===_0x4124('0x97')){var _0x460688=_0x235537['get']({'plain':!![]});return db[_0x4124('0x98')]['find']({'where':{'name':_0x4124('0x99'),'userProfileId':_0x3dbc4d[_0x4124('0x96')]},'raw':!![]})[_0x4124('0x2d')](function(_0x16a935){if(_0x16a935&&_0x16a935[_0x4124('0x9a')]===0x0){return db[_0x4124('0x30')][_0x4124('0x93')]({'name':_0x460688['name'],'resourceId':_0x460688['id'],'type':_0x16a935[_0x4124('0x33')],'sectionId':_0x16a935['id']},{})[_0x4124('0x2d')](function(){return _0x235537;});}else{return _0x235537;}})[_0x4124('0x51')](function(_0x3a0ed9){logger['error']('Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s',_0x3a0ed9);throw _0x3a0ed9;});}return _0x235537;})[_0x4124('0x2d')](respondWithResult(_0x5b96a8,null))[_0x4124('0x51')](handleError(_0x5b96a8,null));}});}catch(_0x1d0168){_0x5b96a8[_0x4124('0x21')](0x1f4)['send'](_0x1d0168);}};function removeReferences(_0x49f5ce,_0xb54a45){try{if(_0x49f5ce){fs['unlinkSync'](_0x49f5ce);logger[_0x4124('0x6a')]('Zip\x20archive\x20removed');}if(_0xb54a45){rimraf(_0xb54a45,function(){});logger[_0x4124('0x6a')]('Extracted\x20folder\x20removed');}}catch(_0x4d1166){logger['error'](_0x4d1166);}}exports['update']=function(_0x2c524f,_0xaf12a,_0x465e44){return db['Plugin'][_0x4124('0x52')]({'where':{'id':_0x2c524f[_0x4124('0x9b')]['id']}})[_0x4124('0x2d')](handleEntityNotFound(_0xaf12a,null))['then'](saveUpdates(_0x2c524f['body'],null))[_0x4124('0x2d')](respondWithResult(_0xaf12a,null))['catch'](handleError(_0xaf12a,null));};exports[_0x4124('0x9c')]=function(_0x129ba8,_0x4c4d83,_0x206523){return db[_0x4124('0x37')]['find']({'where':{'id':_0x129ba8[_0x4124('0x9b')]['id']}})['then'](function(_0x550165){if(_0x550165){return _0x550165['destroy']();}})[_0x4124('0x2d')](function(_0x47f6f0){rimraf(path['join'](config[_0x4124('0x55')],_0x4124('0x56'),path[_0x4124('0x9d')](_0x47f6f0['path'])),function(){});return _0x47f6f0;})[_0x4124('0x2d')](handleEntityNotFound(_0x4c4d83,null))[_0x4124('0x2d')](respondWithStatusCode(_0x4c4d83,null))['catch'](handleError(_0x4c4d83,null));};exports['webhookGet']=function(_0x4623fa,_0x2df324,_0x11325b){return BPromise[_0x4124('0x9e')]()['then'](function(){if(!_0x4623fa[_0x4124('0x3d')][_0x4124('0x6')]){throw new Error(_0x4124('0x9f'));}if(!_0x4623fa[_0x4124('0x3d')][_0x4124('0xa0')]){throw new Error(_0x4124('0xa1'));}var _0x1d4fbe=_0x4623fa[_0x4124('0x3d')][_0x4124('0xa2')]?_0x4623fa['query'][_0x4124('0xa2')]+':'+_0x4623fa[_0x4124('0x3d')]['port']:'http://localhost:'+_0x4623fa['query'][_0x4124('0xa0')];var _0x555ada=_0x4623fa[_0x4124('0x3d')][_0x4124('0x23')]?_0x4623fa[_0x4124('0x3d')]['json']:!![];var _0x18c4ef=_0x4623fa[_0x4124('0x3d')][_0x4124('0xa3')]?_0x4623fa[_0x4124('0x3d')][_0x4124('0xa3')]:null;var _0xce5d12={'method':_0x4623fa[_0x4124('0xa4')],'uri':util['format'](_0x4124('0xa5'),_0x1d4fbe,_0x4623fa[_0x4124('0x3d')][_0x4124('0x6')]),'json':_0x555ada,'resolveWithFullResponse':!![],'encoding':_0x18c4ef,'qs':_0x4623fa[_0x4124('0x3d')]};if(_0x4623fa[_0x4124('0xa6')]){_0xce5d12['headers']=_0x4623fa[_0x4124('0xa6')];if(_0xce5d12[_0x4124('0xa6')]['content-length']){delete _0xce5d12['headers']['content-length'];}}if(_0xce5d12[_0x4124('0xa6')][_0x4124('0xa7')]){delete _0xce5d12[_0x4124('0xa6')]['content-type'];}return rp(_0xce5d12);})[_0x4124('0x2d')](function(_0x3ae8ea){if(_0x3ae8ea){_0x2df324['set'](_0x3ae8ea[_0x4124('0xa6')]);logger[_0x4124('0x6a')](_0x3ae8ea[_0x4124('0x94')]);if(_[_0x4124('0xa8')](_0x4623fa[_0x4124('0x3d')]['path'],_0x4124('0x53'))&&_0x3ae8ea['statusCode']==0x1f4){return _0x2df324[_0x4124('0x20')](_0x3ae8ea[_0x4124('0xa9')]);}else{return _0x2df324['status'](_0x3ae8ea[_0x4124('0xa9')])['send'](_0x3ae8ea[_0x4124('0x94')]);}}else{return _0x2df324['sendStatus'](0xc8);}})[_0x4124('0x51')](handleError(_0x2df324,null));};exports['webhookPost']=function(_0xee22f8,_0x2b0c20,_0x209672){return BPromise[_0x4124('0x9e')]()[_0x4124('0x2d')](function(){if(!_0xee22f8[_0x4124('0x3d')][_0x4124('0x6')]){throw new Error(_0x4124('0x9f'));}if(!_0xee22f8[_0x4124('0x3d')][_0x4124('0xa0')]){throw new Error(_0x4124('0xa1'));}var _0x29e180=_0xee22f8[_0x4124('0x3d')][_0x4124('0xa2')]?_0xee22f8[_0x4124('0x3d')][_0x4124('0xa2')]+':'+_0xee22f8['query'][_0x4124('0xa0')]:_0x4124('0xaa')+_0xee22f8[_0x4124('0x3d')][_0x4124('0xa0')];var _0x3375b2=_0xee22f8[_0x4124('0x3d')][_0x4124('0x23')]?_0xee22f8[_0x4124('0x3d')]['json']:!![];var _0x42abd0=_0xee22f8['query']['encoding']?_0xee22f8[_0x4124('0x3d')][_0x4124('0xa3')]:null;var _0x96aa82={'method':_0xee22f8['method'],'uri':util[_0x4124('0x57')]('%s%s',_0x29e180,_0xee22f8[_0x4124('0x3d')][_0x4124('0x6')]),'json':_0x3375b2,'resolveWithFullResponse':!![],'encoding':_0x42abd0,'body':_0xee22f8['body']};if(_0xee22f8[_0x4124('0xa6')]){_0x96aa82[_0x4124('0xa6')]=_0xee22f8[_0x4124('0xa6')];if(_0x96aa82[_0x4124('0xa6')][_0x4124('0xab')]){delete _0x96aa82['headers']['content-length'];}}if(_0x96aa82['headers'][_0x4124('0xa7')]){delete _0x96aa82[_0x4124('0xa6')][_0x4124('0xa7')];}return rp(_0x96aa82);})[_0x4124('0x2d')](function(_0x510b4f){if(_0x510b4f){_0x2b0c20[_0x4124('0x27')](_0x510b4f[_0x4124('0xa6')]);logger[_0x4124('0x6a')](_0x510b4f[_0x4124('0x94')]);return _0x2b0c20['status'](_0x510b4f[_0x4124('0xa9')])['send'](_0x510b4f[_0x4124('0x94')]);}else{return _0x2b0c20[_0x4124('0x20')](0xc8);}})[_0x4124('0x51')](handleError(_0x2b0c20,null));}; \ No newline at end of file diff --git a/server/api/plugin/plugin.events.js b/server/api/plugin/plugin.events.js index a174d39..e965286 100644 --- a/server/api/plugin/plugin.events.js +++ b/server/api/plugin/plugin.events.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x444e=['exports','events','Plugin','save','remove','emit','hasOwnProperty'];(function(_0x4c8c51,_0x41cf01){var _0x1053a6=function(_0x1ba62e){while(--_0x1ba62e){_0x4c8c51['push'](_0x4c8c51['shift']());}};_0x1053a6(++_0x41cf01);}(_0x444e,0xe8));var _0xe444=function(_0x211529,_0xef3259){_0x211529=_0x211529-0x0;var _0x3ccccf=_0x444e[_0x211529];return _0x3ccccf;};'use strict';var EventEmitter=require(_0xe444('0x0'));var Plugin=require('../../mysqldb')['db'][_0xe444('0x1')];var PluginEvents=new EventEmitter();PluginEvents['setMaxListeners'](0x0);var events={'afterCreate':_0xe444('0x2'),'afterUpdate':'update','afterDestroy':_0xe444('0x3')};function emitEvent(_0x4e248d){return function(_0xd7b634,_0x389c5b,_0x91763c){PluginEvents[_0xe444('0x4')](_0x4e248d+':'+_0xd7b634['id'],_0xd7b634);PluginEvents[_0xe444('0x4')](_0x4e248d,_0xd7b634);_0x91763c(null);};}for(var e in events){if(events[_0xe444('0x5')](e)){var event=events[e];Plugin['hook'](e,emitEvent(event));}}module[_0xe444('0x6')]=PluginEvents; \ No newline at end of file +var _0x044a=['hook','events','../../mysqldb','Plugin','setMaxListeners','save','update','remove','emit','hasOwnProperty'];(function(_0x5d17d3,_0x5b664e){var _0x3456df=function(_0x337eaf){while(--_0x337eaf){_0x5d17d3['push'](_0x5d17d3['shift']());}};_0x3456df(++_0x5b664e);}(_0x044a,0x173));var _0xa044=function(_0x435975,_0x1680ff){_0x435975=_0x435975-0x0;var _0x54ad2a=_0x044a[_0x435975];return _0x54ad2a;};'use strict';var EventEmitter=require(_0xa044('0x0'));var Plugin=require(_0xa044('0x1'))['db'][_0xa044('0x2')];var PluginEvents=new EventEmitter();PluginEvents[_0xa044('0x3')](0x0);var events={'afterCreate':_0xa044('0x4'),'afterUpdate':_0xa044('0x5'),'afterDestroy':_0xa044('0x6')};function emitEvent(_0x30b0c9){return function(_0x25ed77,_0x116358,_0x566ddf){PluginEvents[_0xa044('0x7')](_0x30b0c9+':'+_0x25ed77['id'],_0x25ed77);PluginEvents[_0xa044('0x7')](_0x30b0c9,_0x25ed77);_0x566ddf(null);};}for(var e in events){if(events[_0xa044('0x8')](e)){var event=events[e];Plugin[_0xa044('0x9')](e,emitEvent(event));}}module['exports']=PluginEvents; \ No newline at end of file diff --git a/server/api/plugin/plugin.model.js b/server/api/plugin/plugin.model.js index d678e10..e80d3b9 100644 --- a/server/api/plugin/plugin.model.js +++ b/server/api/plugin/plugin.model.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x8a54=['../../config/logger','api','request-promise','path','rimraf','./plugin.attributes','exports','define','Plugin','plugins','lodash','util'];(function(_0x14579e,_0x5852e2){var _0x9efaea=function(_0x3bf056){while(--_0x3bf056){_0x14579e['push'](_0x14579e['shift']());}};_0x9efaea(++_0x5852e2);}(_0x8a54,0xca));var _0x48a5=function(_0x4778e1,_0x1d70bb){_0x4778e1=_0x4778e1-0x0;var _0xc9d140=_0x8a54[_0x4778e1];return _0xc9d140;};'use strict';var _=require(_0x48a5('0x0'));var util=require(_0x48a5('0x1'));var logger=require(_0x48a5('0x2'))(_0x48a5('0x3'));var moment=require('moment');var BPromise=require('bluebird');var rp=require(_0x48a5('0x4'));var fs=require('fs');var path=require(_0x48a5('0x5'));var rimraf=require(_0x48a5('0x6'));var config=require('../../config/environment');var attributes=require(_0x48a5('0x7'));module[_0x48a5('0x8')]=function(_0x4a681a,_0x4f67d4){return _0x4a681a[_0x48a5('0x9')](_0x48a5('0xa'),attributes,{'tableName':_0x48a5('0xb'),'paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file +var _0xa969=['define','Plugin','plugins','lodash','util','../../config/logger','api','moment','bluebird','path','rimraf','../../config/environment','./plugin.attributes'];(function(_0x1fcf36,_0x3f2539){var _0x44491f=function(_0x206816){while(--_0x206816){_0x1fcf36['push'](_0x1fcf36['shift']());}};_0x44491f(++_0x3f2539);}(_0xa969,0x114));var _0x9a96=function(_0x515afd,_0x1a1e91){_0x515afd=_0x515afd-0x0;var _0x536d53=_0xa969[_0x515afd];return _0x536d53;};'use strict';var _=require(_0x9a96('0x0'));var util=require(_0x9a96('0x1'));var logger=require(_0x9a96('0x2'))(_0x9a96('0x3'));var moment=require(_0x9a96('0x4'));var BPromise=require(_0x9a96('0x5'));var rp=require('request-promise');var fs=require('fs');var path=require(_0x9a96('0x6'));var rimraf=require(_0x9a96('0x7'));var config=require(_0x9a96('0x8'));var attributes=require(_0x9a96('0x9'));module['exports']=function(_0x23e3a9,_0x1c43a3){return _0x23e3a9[_0x9a96('0xa')](_0x9a96('0xb'),attributes,{'tableName':_0x9a96('0xc'),'paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file diff --git a/server/api/plugin/plugin.rpc.js b/server/api/plugin/plugin.rpc.js index 6c8f258..d9f0cb9 100644 --- a/server/api/plugin/plugin.rpc.js +++ b/server/api/plugin/plugin.rpc.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x9ac6=['lodash','util','moment','bluebird','randomstring','../../mysqldb','../../config/logger','rpc','../../config/environment','client','http','redis','defaults','localhost','socket.io-emitter','./plugin.socket','register','then','info','Plugin,\x20%s,\x20%s','request\x20sent','Plugin,\x20%s,\x20%s,\x20%s','error','code','message','CreatePlugin','Plugin','create','body','options','debug','stringify'];(function(_0x265335,_0x5b0310){var _0x15a7bc=function(_0x19ec55){while(--_0x19ec55){_0x265335['push'](_0x265335['shift']());}};_0x15a7bc(++_0x5b0310);}(_0x9ac6,0x120));var _0x69ac=function(_0x230505,_0x4786b5){_0x230505=_0x230505-0x0;var _0x1fa13a=_0x9ac6[_0x230505];return _0x1fa13a;};'use strict';var _=require(_0x69ac('0x0'));var util=require(_0x69ac('0x1'));var moment=require(_0x69ac('0x2'));var BPromise=require(_0x69ac('0x3'));var rs=require(_0x69ac('0x4'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0x69ac('0x5'))['db'];var utils=require('../../config/utils');var logger=require(_0x69ac('0x6'))(_0x69ac('0x7'));var config=require(_0x69ac('0x8'));var jayson=require('jayson/promise');var client=jayson[_0x69ac('0x9')][_0x69ac('0xa')]({'port':0x232a});config[_0x69ac('0xb')]=_[_0x69ac('0xc')](config['redis'],{'host':_0x69ac('0xd'),'port':0x18eb});var socket=require(_0x69ac('0xe'))(new Redis(config[_0x69ac('0xb')]));require(_0x69ac('0xf'))[_0x69ac('0x10')](socket);function respondWithRpcPromise(_0x96ebbd,_0x21b0e5,_0x33559a){return new BPromise(function(_0x15b413,_0x314e10){return client['request'](_0x96ebbd,_0x33559a)[_0x69ac('0x11')](function(_0x152656){logger[_0x69ac('0x12')](_0x69ac('0x13'),_0x21b0e5,_0x69ac('0x14'));logger['debug'](_0x69ac('0x15'),_0x21b0e5,_0x69ac('0x14'),JSON['stringify'](_0x152656));if(_0x152656[_0x69ac('0x16')]){if(_0x152656[_0x69ac('0x16')][_0x69ac('0x17')]===0x1f4){logger[_0x69ac('0x16')](_0x69ac('0x13'),_0x21b0e5,_0x152656[_0x69ac('0x16')]['message']);return _0x314e10(_0x152656[_0x69ac('0x16')][_0x69ac('0x18')]);}logger[_0x69ac('0x16')](_0x69ac('0x13'),_0x21b0e5,_0x152656[_0x69ac('0x16')][_0x69ac('0x18')]);return _0x15b413(_0x152656['error'][_0x69ac('0x18')]);}else{logger[_0x69ac('0x12')](_0x69ac('0x13'),_0x21b0e5,'request\x20sent');_0x15b413(_0x152656['result']['message']);}})['catch'](function(_0x47b1c8){logger[_0x69ac('0x16')](_0x69ac('0x13'),_0x21b0e5,_0x47b1c8);_0x314e10(_0x47b1c8);});});}exports[_0x69ac('0x19')]=function(_0x2478a8){var _0x2d1a3d=this;return new Promise(function(_0x54d509,_0x802c5e){return db[_0x69ac('0x1a')][_0x69ac('0x1b')](_0x2478a8[_0x69ac('0x1c')],{'raw':_0x2478a8['options']?_0x2478a8[_0x69ac('0x1d')]['raw']===undefined?!![]:![]:!![]})['then'](function(_0x57410a){logger['info']('CreatePlugin',_0x2478a8);logger[_0x69ac('0x1e')]('CreatePlugin',_0x2478a8,JSON[_0x69ac('0x1f')](_0x57410a));_0x54d509(_0x57410a);})['catch'](function(_0x4d4c17){logger[_0x69ac('0x16')](_0x69ac('0x19'),_0x4d4c17[_0x69ac('0x18')],_0x2478a8);_0x802c5e(_0x2d1a3d[_0x69ac('0x16')](0x1f4,_0x4d4c17[_0x69ac('0x18')]));});});}; \ No newline at end of file +var _0xf2ba=['defaults','localhost','socket.io-emitter','register','request','then','info','Plugin,\x20%s,\x20%s','request\x20sent','debug','error','code','message','result','catch','CreatePlugin','Plugin','body','options','raw','stringify','lodash','util','randomstring','ioredis','../../config/logger','rpc','../../config/environment','http','redis'];(function(_0x253bf7,_0x2cbcc4){var _0x13dbcb=function(_0x16c93e){while(--_0x16c93e){_0x253bf7['push'](_0x253bf7['shift']());}};_0x13dbcb(++_0x2cbcc4);}(_0xf2ba,0xab));var _0xaf2b=function(_0x3391fe,_0x5c24d9){_0x3391fe=_0x3391fe-0x0;var _0x1ae383=_0xf2ba[_0x3391fe];return _0x1ae383;};'use strict';var _=require(_0xaf2b('0x0'));var util=require(_0xaf2b('0x1'));var moment=require('moment');var BPromise=require('bluebird');var rs=require(_0xaf2b('0x2'));var fs=require('fs');var Redis=require(_0xaf2b('0x3'));var db=require('../../mysqldb')['db'];var utils=require('../../config/utils');var logger=require(_0xaf2b('0x4'))(_0xaf2b('0x5'));var config=require(_0xaf2b('0x6'));var jayson=require('jayson/promise');var client=jayson['client'][_0xaf2b('0x7')]({'port':0x232a});config[_0xaf2b('0x8')]=_[_0xaf2b('0x9')](config['redis'],{'host':_0xaf2b('0xa'),'port':0x18eb});var socket=require(_0xaf2b('0xb'))(new Redis(config['redis']));require('./plugin.socket')[_0xaf2b('0xc')](socket);function respondWithRpcPromise(_0x6cd595,_0x247656,_0x42bb7a){return new BPromise(function(_0x574715,_0x4f5ef8){return client[_0xaf2b('0xd')](_0x6cd595,_0x42bb7a)[_0xaf2b('0xe')](function(_0x55cd90){logger[_0xaf2b('0xf')](_0xaf2b('0x10'),_0x247656,_0xaf2b('0x11'));logger[_0xaf2b('0x12')]('Plugin,\x20%s,\x20%s,\x20%s',_0x247656,'request\x20sent',JSON['stringify'](_0x55cd90));if(_0x55cd90['error']){if(_0x55cd90[_0xaf2b('0x13')][_0xaf2b('0x14')]===0x1f4){logger['error'](_0xaf2b('0x10'),_0x247656,_0x55cd90['error']['message']);return _0x4f5ef8(_0x55cd90[_0xaf2b('0x13')][_0xaf2b('0x15')]);}logger[_0xaf2b('0x13')](_0xaf2b('0x10'),_0x247656,_0x55cd90['error'][_0xaf2b('0x15')]);return _0x574715(_0x55cd90[_0xaf2b('0x13')][_0xaf2b('0x15')]);}else{logger[_0xaf2b('0xf')](_0xaf2b('0x10'),_0x247656,_0xaf2b('0x11'));_0x574715(_0x55cd90[_0xaf2b('0x16')][_0xaf2b('0x15')]);}})[_0xaf2b('0x17')](function(_0xde70f9){logger[_0xaf2b('0x13')]('Plugin,\x20%s,\x20%s',_0x247656,_0xde70f9);_0x4f5ef8(_0xde70f9);});});}exports[_0xaf2b('0x18')]=function(_0x1c25d3){var _0x46eb75=this;return new Promise(function(_0x150a5a,_0xc1f62d){return db[_0xaf2b('0x19')]['create'](_0x1c25d3[_0xaf2b('0x1a')],{'raw':_0x1c25d3['options']?_0x1c25d3[_0xaf2b('0x1b')][_0xaf2b('0x1c')]===undefined?!![]:![]:!![]})[_0xaf2b('0xe')](function(_0x12b8f3){logger[_0xaf2b('0xf')]('CreatePlugin',_0x1c25d3);logger[_0xaf2b('0x12')]('CreatePlugin',_0x1c25d3,JSON[_0xaf2b('0x1d')](_0x12b8f3));_0x150a5a(_0x12b8f3);})[_0xaf2b('0x17')](function(_0x4bf923){logger[_0xaf2b('0x13')]('CreatePlugin',_0x4bf923['message'],_0x1c25d3);_0xc1f62d(_0x46eb75['error'](0x1f4,_0x4bf923[_0xaf2b('0x15')]));});});}; \ No newline at end of file diff --git a/server/api/plugin/plugin.socket.js b/server/api/plugin/plugin.socket.js index d13f87b..ffce931 100644 --- a/server/api/plugin/plugin.socket.js +++ b/server/api/plugin/plugin.socket.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xc981=['update','emit','removeListener','register','plugin:','./plugin.events','save','remove'];(function(_0xd50a9e,_0x383424){var _0x2a1015=function(_0x19c6aa){while(--_0x19c6aa){_0xd50a9e['push'](_0xd50a9e['shift']());}};_0x2a1015(++_0x383424);}(_0xc981,0x1bd));var _0x1c98=function(_0x1193c4,_0x168122){_0x1193c4=_0x1193c4-0x0;var _0x3af679=_0xc981[_0x1193c4];return _0x3af679;};'use strict';var PluginEvents=require(_0x1c98('0x0'));var events=[_0x1c98('0x1'),_0x1c98('0x2'),_0x1c98('0x3')];function createListener(_0x4af177,_0x2bbf41){return function(_0x2b396e){_0x2bbf41[_0x1c98('0x4')](_0x4af177,_0x2b396e);};}function removeListener(_0x475a9f,_0x30bd1f){return function(){PluginEvents[_0x1c98('0x5')](_0x475a9f,_0x30bd1f);};}exports[_0x1c98('0x6')]=function(_0x1c30b8){for(var _0x51129f=0x0,_0x27f2bd=events['length'];_0x51129f<_0x27f2bd;_0x51129f++){var _0x132276=events[_0x51129f];var _0x8990c3=createListener(_0x1c98('0x7')+_0x132276,_0x1c30b8);PluginEvents['on'](_0x132276,_0x8990c3);}}; \ No newline at end of file +var _0x4541=['length','plugin:','save','emit','removeListener','register'];(function(_0x16e1d5,_0x26b53b){var _0x534f2c=function(_0x324736){while(--_0x324736){_0x16e1d5['push'](_0x16e1d5['shift']());}};_0x534f2c(++_0x26b53b);}(_0x4541,0xfe));var _0x1454=function(_0x5eda4c,_0x3c8fec){_0x5eda4c=_0x5eda4c-0x0;var _0x56c3fe=_0x4541[_0x5eda4c];return _0x56c3fe;};'use strict';var PluginEvents=require('./plugin.events');var events=[_0x1454('0x0'),'remove','update'];function createListener(_0x5b8c13,_0x3a88c2){return function(_0x246ea5){_0x3a88c2[_0x1454('0x1')](_0x5b8c13,_0x246ea5);};}function removeListener(_0x57100d,_0x51dd88){return function(){PluginEvents[_0x1454('0x2')](_0x57100d,_0x51dd88);};}exports[_0x1454('0x3')]=function(_0x594f6f){for(var _0x5e52ab=0x0,_0x50caa2=events[_0x1454('0x4')];_0x5e52ab<_0x50caa2;_0x5e52ab++){var _0x240ff0=events[_0x5e52ab];var _0x163b15=createListener(_0x1454('0x5')+_0x240ff0,_0x594f6f);PluginEvents['on'](_0x240ff0,_0x163b15);}}; \ No newline at end of file diff --git a/server/api/pm2/index.js b/server/api/pm2/index.js index 2cec259..175a5b5 100644 --- a/server/api/pm2/index.js +++ b/server/api/pm2/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xa9e0=['create','put','delete','destroy','exports','express','Router','../../components/auth/service','isAuthenticated','get','/:id','show','post'];(function(_0x1dc76f,_0x3f410f){var _0x257fec=function(_0x844877){while(--_0x844877){_0x1dc76f['push'](_0x1dc76f['shift']());}};_0x257fec(++_0x3f410f);}(_0xa9e0,0x123));var _0x0a9e=function(_0x2d8fc2,_0x1c461d){_0x2d8fc2=_0x2d8fc2-0x0;var _0x3a9e53=_0xa9e0[_0x2d8fc2];return _0x3a9e53;};'use strict';var express=require(_0x0a9e('0x0'));var router=express[_0x0a9e('0x1')]();var auth=require(_0x0a9e('0x2'));var controller=require('./pm2.controller');router['get']('/',auth[_0x0a9e('0x3')](),controller['index']);router[_0x0a9e('0x4')](_0x0a9e('0x5'),auth[_0x0a9e('0x3')](),controller[_0x0a9e('0x6')]);router[_0x0a9e('0x7')]('/',auth['isAuthenticated'](),controller[_0x0a9e('0x8')]);router[_0x0a9e('0x9')](_0x0a9e('0x5'),auth['isAuthenticated'](),controller['update']);router[_0x0a9e('0xa')]('/:id',auth['isAuthenticated'](),controller[_0x0a9e('0xb')]);module[_0x0a9e('0xc')]=router; \ No newline at end of file +var _0xa9e0=['create','put','delete','destroy','exports','express','Router','../../components/auth/service','isAuthenticated','get','/:id','show','post'];(function(_0x5085d1,_0x40244f){var _0x332dd3=function(_0x3a118c){while(--_0x3a118c){_0x5085d1['push'](_0x5085d1['shift']());}};_0x332dd3(++_0x40244f);}(_0xa9e0,0x123));var _0x0a9e=function(_0x3635ce,_0x33a6f9){_0x3635ce=_0x3635ce-0x0;var _0x97ecd0=_0xa9e0[_0x3635ce];return _0x97ecd0;};'use strict';var express=require(_0x0a9e('0x0'));var router=express[_0x0a9e('0x1')]();var auth=require(_0x0a9e('0x2'));var controller=require('./pm2.controller');router['get']('/',auth[_0x0a9e('0x3')](),controller['index']);router[_0x0a9e('0x4')](_0x0a9e('0x5'),auth[_0x0a9e('0x3')](),controller[_0x0a9e('0x6')]);router[_0x0a9e('0x7')]('/',auth['isAuthenticated'](),controller[_0x0a9e('0x8')]);router[_0x0a9e('0x9')](_0x0a9e('0x5'),auth['isAuthenticated'](),controller['update']);router[_0x0a9e('0xa')]('/:id',auth['isAuthenticated'](),controller[_0x0a9e('0xb')]);module[_0x0a9e('0xc')]=router; \ No newline at end of file diff --git a/server/api/pm2/pm2.controller.js b/server/api/pm2/pm2.controller.js index b5a1dd3..1ed8cf4 100644 --- a/server/api/pm2/pm2.controller.js +++ b/server/api/pm2/pm2.controller.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xb821=['params','then','create','body','script','join','../../files/plugins','cwd','chdir','start','Missing\x20name\x20and/or\x20path','update','restart','stop','hasOwnProperty','Unknown\x20status','destroy','delete','dump','../../config/pm2','../../config/logger','child_process','sendStatus','status','json','error','stack','name','send','npm\x20install','info','index','reject','express','length','catch','show'];(function(_0x2ee125,_0x1cacb5){var _0x57dab4=function(_0x1fb3e4){while(--_0x1fb3e4){_0x2ee125['push'](_0x2ee125['shift']());}};_0x57dab4(++_0x1cacb5);}(_0xb821,0xa7));var _0x1b82=function(_0x3a59fe,_0x2ee9cb){_0x3a59fe=_0x3a59fe-0x0;var _0xde2784=_0xb821[_0x3a59fe];return _0xde2784;};'use strict';var _=require('lodash');var pm2=require(_0x1b82('0x0'));var logger=require(_0x1b82('0x1'))('api');var path=require('path');var exec=require(_0x1b82('0x2'))['exec'];var BPromise=require('bluebird');function handleEntityNotFound(_0x3b1d14,_0x1403ab){return function(_0x3fadf0){if(!_0x3fadf0){_0x3b1d14[_0x1b82('0x3')](0x194);;}return _0x3fadf0;};}function respondWithResult(_0x597ca7,_0x3e27c4){_0x3e27c4=_0x3e27c4||0xc8;return function(_0x192434){if(_0x192434){return _0x597ca7[_0x1b82('0x4')](_0x3e27c4)[_0x1b82('0x5')](_0x192434);}return null;};}function handleError(_0x18f45f,_0x7b87e8){_0x7b87e8=_0x7b87e8||0x1f4;return function(_0x161155){logger[_0x1b82('0x6')](_0x161155[_0x1b82('0x7')]);if(_0x161155['name']){delete _0x161155[_0x1b82('0x8')];}_0x18f45f[_0x1b82('0x4')](_0x7b87e8)[_0x1b82('0x9')](_0x161155);};}function execChildProcess(){return new BPromise(function(_0x14c57a,_0xcffb87){exec(_0x1b82('0xa'),function(_0x739f99,_0x1ce719,_0x5f521f){logger[_0x1b82('0xb')](_0x1ce719);logger[_0x1b82('0xb')](_0x5f521f);if(_0x739f99){logger[_0x1b82('0x6')](_0x739f99);return _0xcffb87(_0x739f99);}return _0x14c57a(_0x1ce719);});});}exports[_0x1b82('0xc')]=function(_0x50aed7,_0x1a6285){return pm2['list']()['then'](function(_0x1e553a){if(_0x1e553a){var _0x4bf75b=_[_0x1b82('0xd')](_0x1e553a,function(_0xe1d608){return _0xe1d608['name']===_0x1b82('0xe')||_0xe1d608['name']==='motion2';});return{'rows':_0x4bf75b,'count':_0x4bf75b[_0x1b82('0xf')]};}return null;})['then'](respondWithResult(_0x1a6285,null))[_0x1b82('0x10')](handleError(_0x1a6285,null));};exports[_0x1b82('0x11')]=function(_0xf42818,_0x4a09a2){return pm2['describe'](_0xf42818[_0x1b82('0x12')]['id'])['then'](respondWithResult(_0x4a09a2,null))[_0x1b82('0x13')](handleEntityNotFound(_0x4a09a2,null))[_0x1b82('0x10')](handleError(_0x4a09a2,null));};exports[_0x1b82('0x14')]=function(_0x594a63,_0x352426){if(_0x594a63[_0x1b82('0x15')][_0x1b82('0x8')]&&_0x594a63[_0x1b82('0x15')][_0x1b82('0x16')]){var _0x47e99b=path[_0x1b82('0x17')](__dirname,_0x1b82('0x18'),_0x594a63[_0x1b82('0x15')][_0x1b82('0x16')]);var _0x26e481=process[_0x1b82('0x19')]();process[_0x1b82('0x1a')](path['dirname'](_0x47e99b));return execChildProcess()[_0x1b82('0x13')](function(_0x233740){process['chdir'](_0x26e481);return pm2[_0x1b82('0x1b')]({'name':_0x594a63[_0x1b82('0x15')][_0x1b82('0x8')],'script':_0x47e99b});})['then'](function(_0x3a1226){pm2['dump']();return _0x3a1226[0x0];})['then'](respondWithResult(_0x352426,0xc9))['catch'](handleError(_0x352426,null));}else{return _0x352426[_0x1b82('0x4')](0x1f4)[_0x1b82('0x9')]({'message':_0x1b82('0x1c')});}};exports[_0x1b82('0x1d')]=function(_0x548a3b,_0x222483){if(_0x548a3b[_0x1b82('0x15')]['id']){delete _0x548a3b[_0x1b82('0x15')]['id'];}var _0x7455e8={'online':_0x1b82('0x1e'),'stopped':_0x1b82('0x1f')};if(_0x7455e8[_0x1b82('0x20')](_0x548a3b[_0x1b82('0x15')][_0x1b82('0x4')])){return pm2[_0x7455e8[_0x548a3b[_0x1b82('0x15')][_0x1b82('0x4')]]](_0x548a3b[_0x1b82('0x12')]['id'])[_0x1b82('0x13')](respondWithResult(_0x222483,0xc8))['catch'](handleError(_0x222483,null));}else{return _0x222483[_0x1b82('0x4')](0x1f4)[_0x1b82('0x9')]({'message':_0x1b82('0x21')});}};exports[_0x1b82('0x22')]=function(_0x18e4ff,_0x115ce7){if(_0x18e4ff[_0x1b82('0x15')]['id']){delete _0x18e4ff[_0x1b82('0x15')]['id'];}if(_0x18e4ff[_0x1b82('0x12')]['id']){return pm2[_0x1b82('0x23')](_0x18e4ff['params']['id'])[_0x1b82('0x13')](function(_0x29a31e){pm2[_0x1b82('0x24')]();return _0x29a31e[0x0];})[_0x1b82('0x13')](respondWithResult(_0x115ce7,null))['catch'](handleError(_0x115ce7,null));}else{return _0x115ce7[_0x1b82('0x4')](0x1f4)[_0x1b82('0x9')]({'message':'Unknown\x20id'});}}; \ No newline at end of file +var _0x1339=['body','params','delete','../../config/logger','api','path','child_process','exec','bluebird','sendStatus','status','json','error','stack','name','npm\x20install','info','then','reject','motion2','catch','show','describe','create','../../files/plugins','cwd','chdir','start','dump','send','Missing\x20name\x20and/or\x20path','update','restart','stop','hasOwnProperty'];(function(_0x525864,_0x1bb3ea){var _0x4f9964=function(_0x5e2c0c){while(--_0x5e2c0c){_0x525864['push'](_0x525864['shift']());}};_0x4f9964(++_0x1bb3ea);}(_0x1339,0x1ed));var _0x9133=function(_0x563140,_0x9260b4){_0x563140=_0x563140-0x0;var _0x3522a9=_0x1339[_0x563140];return _0x3522a9;};'use strict';var _=require('lodash');var pm2=require('../../config/pm2');var logger=require(_0x9133('0x0'))(_0x9133('0x1'));var path=require(_0x9133('0x2'));var exec=require(_0x9133('0x3'))[_0x9133('0x4')];var BPromise=require(_0x9133('0x5'));function handleEntityNotFound(_0x176e80,_0x110c51){return function(_0x558345){if(!_0x558345){_0x176e80[_0x9133('0x6')](0x194);;}return _0x558345;};}function respondWithResult(_0x855473,_0x379915){_0x379915=_0x379915||0xc8;return function(_0x539af6){if(_0x539af6){return _0x855473[_0x9133('0x7')](_0x379915)[_0x9133('0x8')](_0x539af6);}return null;};}function handleError(_0x3059c4,_0x431a55){_0x431a55=_0x431a55||0x1f4;return function(_0x261698){logger[_0x9133('0x9')](_0x261698[_0x9133('0xa')]);if(_0x261698[_0x9133('0xb')]){delete _0x261698[_0x9133('0xb')];}_0x3059c4[_0x9133('0x7')](_0x431a55)['send'](_0x261698);};}function execChildProcess(){return new BPromise(function(_0x3f9650,_0x3533fa){exec(_0x9133('0xc'),function(_0x452481,_0x3b8f89,_0x244ced){logger['info'](_0x3b8f89);logger[_0x9133('0xd')](_0x244ced);if(_0x452481){logger[_0x9133('0x9')](_0x452481);return _0x3533fa(_0x452481);}return _0x3f9650(_0x3b8f89);});});}exports['index']=function(_0x5283a3,_0x10475c){return pm2['list']()[_0x9133('0xe')](function(_0x439e1a){if(_0x439e1a){var _0x17dfd1=_[_0x9133('0xf')](_0x439e1a,function(_0x31847a){return _0x31847a[_0x9133('0xb')]==='express'||_0x31847a[_0x9133('0xb')]===_0x9133('0x10');});return{'rows':_0x17dfd1,'count':_0x17dfd1['length']};}return null;})[_0x9133('0xe')](respondWithResult(_0x10475c,null))[_0x9133('0x11')](handleError(_0x10475c,null));};exports[_0x9133('0x12')]=function(_0x427663,_0x4a2c4f){return pm2[_0x9133('0x13')](_0x427663['params']['id'])[_0x9133('0xe')](respondWithResult(_0x4a2c4f,null))['then'](handleEntityNotFound(_0x4a2c4f,null))[_0x9133('0x11')](handleError(_0x4a2c4f,null));};exports[_0x9133('0x14')]=function(_0x5e8620,_0x38dd60){if(_0x5e8620['body'][_0x9133('0xb')]&&_0x5e8620['body']['script']){var _0x2f7354=path['join'](__dirname,_0x9133('0x15'),_0x5e8620['body']['script']);var _0x4c846e=process[_0x9133('0x16')]();process[_0x9133('0x17')](path['dirname'](_0x2f7354));return execChildProcess()[_0x9133('0xe')](function(_0x3f5d0e){process[_0x9133('0x17')](_0x4c846e);return pm2[_0x9133('0x18')]({'name':_0x5e8620['body'][_0x9133('0xb')],'script':_0x2f7354});})['then'](function(_0x187e32){pm2[_0x9133('0x19')]();return _0x187e32[0x0];})[_0x9133('0xe')](respondWithResult(_0x38dd60,0xc9))[_0x9133('0x11')](handleError(_0x38dd60,null));}else{return _0x38dd60[_0x9133('0x7')](0x1f4)[_0x9133('0x1a')]({'message':_0x9133('0x1b')});}};exports[_0x9133('0x1c')]=function(_0x1b6b3e,_0x46050b){if(_0x1b6b3e['body']['id']){delete _0x1b6b3e['body']['id'];}var _0x477bf1={'online':_0x9133('0x1d'),'stopped':_0x9133('0x1e')};if(_0x477bf1[_0x9133('0x1f')](_0x1b6b3e['body']['status'])){return pm2[_0x477bf1[_0x1b6b3e[_0x9133('0x20')][_0x9133('0x7')]]](_0x1b6b3e[_0x9133('0x21')]['id'])[_0x9133('0xe')](respondWithResult(_0x46050b,0xc8))[_0x9133('0x11')](handleError(_0x46050b,null));}else{return _0x46050b[_0x9133('0x7')](0x1f4)['send']({'message':'Unknown\x20status'});}};exports['destroy']=function(_0x1ad222,_0x4a4a8e){if(_0x1ad222[_0x9133('0x20')]['id']){delete _0x1ad222[_0x9133('0x20')]['id'];}if(_0x1ad222['params']['id']){return pm2[_0x9133('0x22')](_0x1ad222['params']['id'])[_0x9133('0xe')](function(_0x26ca56){pm2[_0x9133('0x19')]();return _0x26ca56[0x0];})['then'](respondWithResult(_0x4a4a8e,null))[_0x9133('0x11')](handleError(_0x4a4a8e,null));}else{return _0x4a4a8e[_0x9133('0x7')](0x1f4)[_0x9133('0x1a')]({'message':'Unknown\x20id'});}}; \ No newline at end of file diff --git a/server/api/realtime/index.js b/server/api/realtime/index.js index b0c4f6a..0e09572 100644 --- a/server/api/realtime/index.js +++ b/server/api/realtime/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x4724=['getQueues','exports','express','Router','../../components/auth/service','./realtime.controller','get','/agents','isAuthenticated','/queues'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0x4724,0x7a));var _0x4472=function(_0x117473,_0x485375){_0x117473=_0x117473-0x0;var _0x38711a=_0x4724[_0x117473];return _0x38711a;};'use strict';var express=require(_0x4472('0x0'));var router=express[_0x4472('0x1')]();var auth=require(_0x4472('0x2'));var controller=require(_0x4472('0x3'));router[_0x4472('0x4')](_0x4472('0x5'),auth[_0x4472('0x6')](),controller['getAgents']);router[_0x4472('0x4')](_0x4472('0x7'),auth['isAuthenticated'](),controller[_0x4472('0x8')]);module[_0x4472('0x9')]=router; \ No newline at end of file +var _0x5b71=['/agents','isAuthenticated','getAgents','get','/queues','getQueues','exports','express','Router','../../components/auth/service','./realtime.controller'];(function(_0x18e9b9,_0xb8b130){var _0xf30a71=function(_0x58bcdc){while(--_0x58bcdc){_0x18e9b9['push'](_0x18e9b9['shift']());}};_0xf30a71(++_0xb8b130);}(_0x5b71,0x1eb));var _0x15b7=function(_0x229c80,_0x572117){_0x229c80=_0x229c80-0x0;var _0x356219=_0x5b71[_0x229c80];return _0x356219;};'use strict';var express=require(_0x15b7('0x0'));var router=express[_0x15b7('0x1')]();var auth=require(_0x15b7('0x2'));var controller=require(_0x15b7('0x3'));router['get'](_0x15b7('0x4'),auth[_0x15b7('0x5')](),controller[_0x15b7('0x6')]);router[_0x15b7('0x7')](_0x15b7('0x8'),auth[_0x15b7('0x5')](),controller[_0x15b7('0x9')]);module[_0x15b7('0xa')]=router; \ No newline at end of file diff --git a/server/api/realtime/realtime.controller.js b/server/api/realtime/realtime.controller.js index da78edc..05f7bdb 100644 --- a/server/api/realtime/realtime.controller.js +++ b/server/api/realtime/realtime.controller.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x28e6=['find','getAgentStatus','voice','voiceStatus','talking','Status','sortAgentsByStatus','pick','getQueues','rawAttributes','name','outbound','QueueCampaigns','startCase','Queues','getRealtimeQueues','initializeQueues','catch','lodash','util','../../components/realtime/agents','../../components/realtime/queues','../../config/utils','../../mysqldb','../../errors/api','handleError','offset','undefined','count','limit','status','set','Content-Range','json','getAgents','query','globalStatusFilter','pause','*pause','resolve','then','channel','isValidChannel','Channel\x20parameter\x20%s\x20is\x20invalid','toLowerCase','sort','includes','globalStatus','getUpdatedSortOptions','fields','join','order','getAgentIdsByQueues','getRealtimeAgents','rows','getAgentIdsByStatus','length','User','fieldName','type','key','role','online','getOptions','raw','sequelize','FIELD(id,','forEach','push','Pause','where','merge','user','userProfileId','Agents','agent','extraQueryConditions','assign','UserProfile','getResources','findAndCountAll','map'];(function(_0x3bf25c,_0x1aa0f8){var _0x4c03b7=function(_0x1f65e9){while(--_0x1f65e9){_0x3bf25c['push'](_0x3bf25c['shift']());}};_0x4c03b7(++_0x1aa0f8);}(_0x28e6,0x64));var _0x628e=function(_0x15f417,_0x405d42){_0x15f417=_0x15f417-0x0;var _0x1f8229=_0x28e6[_0x15f417];return _0x1f8229;};'use strict';var _=require(_0x628e('0x0'));var util=require(_0x628e('0x1'));var rta=require(_0x628e('0x2'));var rtq=require(_0x628e('0x3'));var qs=require('../../components/parsers/qs');var utils=require(_0x628e('0x4'));var db=require(_0x628e('0x5'))['db'];var APIBadRequestError=require('../../errors/api')['APIBadRequestError'];var APIHandleError=require(_0x628e('0x6'))[_0x628e('0x7')];function respondWithFilteredResult(_0x2da8c2,_0x370615){return function(_0x1539e3){if(_0x1539e3){var _0x498d7c=typeof _0x370615[_0x628e('0x8')]==='undefined'&&typeof _0x370615['limit']===_0x628e('0x9');var _0x1fe493=_0x1539e3[_0x628e('0xa')];var _0x70613b=_0x498d7c?0x0:_0x370615[_0x628e('0x8')];var _0x415ad3=_0x498d7c?_0x1539e3[_0x628e('0xa')]:_0x370615[_0x628e('0x8')]+_0x370615[_0x628e('0xb')];var _0x52bfa5;if(_0x415ad3>=_0x1fe493){_0x415ad3=_0x1fe493;_0x52bfa5=0xc8;}else{_0x52bfa5=0xce;}_0x2da8c2[_0x628e('0xc')](_0x52bfa5);return _0x2da8c2[_0x628e('0xd')](_0x628e('0xe'),_0x70613b+'-'+_0x415ad3+'/'+_0x1fe493)[_0x628e('0xf')](_0x1539e3);}return null;};}exports[_0x628e('0x10')]=function(_0x597fbb,_0x3aaed3){var _0x42ef80={'count':0x0,'rows':[]};var _0x431ec3={};var _0x4f45cd;var _0x58fb57=utils['getChannels']();var _0x5df318;var _0x2e68ce;var _0x1cd4d9=_0x597fbb['query']['globalQueueFilter'];var _0x11336a=_0x597fbb[_0x628e('0x11')][_0x628e('0x12')];var _0x1089f1=_0x597fbb[_0x628e('0x11')]['pauseTypeFilter'];var _0x56fb99=_0x11336a===_0x628e('0x13')||_0x11336a===_0x628e('0x14')?!![]:![];var _0x55b588=[];var _0x33890e;var _0x35e95f;Promise[_0x628e('0x15')]()[_0x628e('0x16')](function(){if(_0x597fbb[_0x628e('0x11')][_0x628e('0x17')]){if(!utils[_0x628e('0x18')](_0x597fbb['query'][_0x628e('0x17')])){throw new APIBadRequestError(util['format'](_0x628e('0x19'),_0x597fbb[_0x628e('0x11')]['channel']));}_0x4f45cd=_0x597fbb[_0x628e('0x11')][_0x628e('0x17')][_0x628e('0x1a')]();}if(!_0x597fbb['query'][_0x628e('0x1b')]||!_0x597fbb['query'][_0x628e('0x1b')][_0x628e('0x1c')](_0x628e('0x1d'))){_0x597fbb['query']['sort']=rta['validateSortParameter'](_0x597fbb[_0x628e('0x11')]['sort']);return;}var _0x370562=rta[_0x628e('0x1e')](_0x597fbb['query'][_0x628e('0x1b')]);_0x597fbb[_0x628e('0x11')][_0x628e('0x1b')]=_0x370562[_0x628e('0x1f')][_0x628e('0x20')](',');_0x33890e=_0x370562[_0x628e('0x21')];})['then'](function(){if(!_0x1cd4d9){return[];}return rta[_0x628e('0x22')](_0x1cd4d9,_0x4f45cd);})[_0x628e('0x16')](function(_0x37faaf){_0x55b588=_0x37faaf;return rta[_0x628e('0x23')]();})[_0x628e('0x16')](function(_0x1891be){_0x2e68ce=_0x1891be[_0x628e('0x24')];if((!_0x11336a||_0x56fb99)&&!_0x33890e){return _0x55b588;}if(_0x33890e&&!_0x11336a){return rta['getSortedAgentsIdsByStatus'](_0x2e68ce,_0x55b588,_0x33890e);}else{return rta[_0x628e('0x25')](_0x2e68ce,_0x55b588,_0x11336a);}})['then'](function(_0xa1128b){_0x55b588=_0xa1128b;var _0x25025a=![];if(_0x55b588[_0x628e('0x26')]===0x0){if(_0x1cd4d9||_0x11336a){_0x25025a=!![];}if(_0x56fb99){_0x25025a=![];}}if(_0x25025a){return _0x42ef80;}var _0x2b1ba6=_['map'](db[_0x628e('0x27')]['rawAttributes'],function(_0x3bcb54){return{'name':_0x3bcb54[_0x628e('0x28')],'type':_0x3bcb54[_0x628e('0x29')][_0x628e('0x2a')]};});_0x597fbb[_0x628e('0x11')][_0x628e('0x2b')]='agent';_0x597fbb['query'][_0x628e('0x2c')]=!![];_0x431ec3=qs[_0x628e('0x2d')](_0x2b1ba6,_0x597fbb);_0x431ec3[_0x628e('0x2e')]=!![];var _0x59c73a=[];if(_0x55b588[_0x628e('0x26')]>0x0){_0x59c73a['push']({'id':{'$in':_0x55b588}});if(_0x33890e&&!_0x11336a){_0x35e95f=[db[_0x628e('0x2f')]['literal'](_0x628e('0x30')+_0x55b588+')')];_0x431ec3['order']=_0x35e95f;}}if(_0x56fb99){_0x58fb57[_0x628e('0x31')](function(_0x53895b){var _0x33aae6=!![];if(_0x11336a===_0x628e('0x14')&&_0x4f45cd!==_0x53895b){_0x33aae6=![];}_0x59c73a[_0x628e('0x32')]({[_0x53895b+_0x628e('0x33')]:_0x33aae6});});if(_0x1089f1){_0x59c73a['push']({'pauseType':_0x1089f1});}}else if(_0x11336a){_0x58fb57[_0x628e('0x31')](function(_0x58055a){_0x59c73a[_0x628e('0x32')]({[_0x58055a+_0x628e('0x33')]:![]});});}_0x431ec3[_0x628e('0x34')]=_[_0x628e('0x35')](_0x431ec3['where'],{'$and':_0x59c73a});if(_0x597fbb[_0x628e('0x36')]['role']===_0x628e('0x36')){var _0x3e9d71={'params':{'id':_0x597fbb[_0x628e('0x36')][_0x628e('0x37')]},'query':{'section':_0x628e('0x38'),'role':_0x628e('0x39'),'online':!![],'raw':!![],'ids':_0x55b588,'customSorting':_0x35e95f}};if(_0x56fb99){_0x3e9d71[_0x628e('0x11')][_0x628e('0x3a')]=_0x59c73a;}_0x3e9d71['query']=Object[_0x628e('0x3b')](_0x3e9d71[_0x628e('0x11')],_0x597fbb['query']);delete _0x3e9d71[_0x628e('0x11')]['id'];return db[_0x628e('0x3c')][_0x628e('0x3d')](_0x3e9d71);}return db[_0x628e('0x27')][_0x628e('0x3e')](_0x431ec3);})[_0x628e('0x16')](function(_0x16ac6b){_0x42ef80[_0x628e('0xa')]=_0x16ac6b['count'];_0x5df318=_0x16ac6b[_0x628e('0x24')];return _0x5df318[_0x628e('0x3f')](function(_0x23041f){var _0x1bafc0=_[_0x628e('0x40')](_0x2e68ce,['id',_0x23041f['id']]);if(_0x1bafc0){var _0x201db3=rta['filterAgentAttributes'](_0x1bafc0);_[_0x628e('0x35')](_0x23041f,_0x201db3);}_0x23041f[_0x628e('0x1d')]=rta[_0x628e('0x41')](_0x23041f);if(_0x23041f[_0x628e('0x1d')][_0x628e('0x1c')]('pause')){_0x58fb57[_0x628e('0x31')](function(_0x62c4a1){if(_0x23041f[_0x62c4a1+_0x628e('0x33')]){if(_0x62c4a1===_0x628e('0x42')){if(_0x23041f[_0x628e('0x43')]!==_0x628e('0x44')){_0x23041f[_0x628e('0x43')]='pause';}}else{_0x23041f[_0x62c4a1+_0x628e('0x45')]='pause';}}});}return _0x23041f;});})[_0x628e('0x16')](function(_0x87e4a){if(!_0x33890e||_0x35e95f){return _0x87e4a;}return rta[_0x628e('0x46')](_0x87e4a,_0x33890e);})[_0x628e('0x16')](function(_0x1e2cce){var _0x226e98=null;if(_0x597fbb['query']['fields']){var _0x49613c=_0x597fbb[_0x628e('0x11')][_0x628e('0x1f')]['split'](',');_0x226e98=_0x1e2cce['map'](function(_0x47ea0f){return _[_0x628e('0x47')](_0x47ea0f,_0x49613c);});}_0x42ef80[_0x628e('0x24')]=_0x226e98||_0x1e2cce;return _0x42ef80;})[_0x628e('0x16')](respondWithFilteredResult(_0x3aaed3,_0x431ec3))['catch'](APIHandleError(_0x3aaed3));};exports[_0x628e('0x48')]=function(_0x6e7de,_0x318f30){var _0x2aebb1={'count':0x0,'rows':[]};var _0x3b97c7={};var _0x5c720e;var _0x1c65e4;var _0x5b6038;Promise[_0x628e('0x15')]()[_0x628e('0x16')](function(){if(_0x6e7de['query'][_0x628e('0x17')]){if(!utils[_0x628e('0x18')](_0x6e7de['query'][_0x628e('0x17')])){throw new APIBadRequestError(util['format'](_0x628e('0x19'),_0x6e7de['query'][_0x628e('0x17')]));}_0x5c720e=_0x6e7de[_0x628e('0x11')][_0x628e('0x17')]['toLowerCase']();}var _0x26f9db=_['startCase'](_0x5c720e)+'Queue';var _0x3bb53f=_['map'](db[_0x26f9db][_0x628e('0x49')],function(_0x378ce1){return{'name':_0x378ce1[_0x628e('0x28')],'type':_0x378ce1[_0x628e('0x29')][_0x628e('0x2a')]};});if(!_0x6e7de[_0x628e('0x11')]['fields']){var _0x44578c=['id',_0x628e('0x4a')];if(_0x5c720e===_0x628e('0x42')){_0x44578c[_0x628e('0x32')](_0x628e('0x29'));if(_0x6e7de[_0x628e('0x11')][_0x628e('0x29')]===_0x628e('0x4b')){_0x44578c[_0x628e('0x32')](['dialActive','dialMethod']);}}_0x6e7de[_0x628e('0x11')][_0x628e('0x1f')]=_0x44578c[_0x628e('0x20')](',');}_0x3b97c7=qs[_0x628e('0x2d')](_0x3bb53f,_0x6e7de);if(_0x6e7de['user'][_0x628e('0x2b')]===_0x628e('0x36')){var _0x378cd2={'params':{'id':_0x6e7de[_0x628e('0x36')]['userProfileId']},'query':{'section':_0x5c720e===_0x628e('0x42')&&_0x6e7de[_0x628e('0x11')][_0x628e('0x29')]===_0x628e('0x4b')?_0x628e('0x4c'):_[_0x628e('0x4d')](_0x5c720e)+_0x628e('0x4e'),'type':_0x6e7de['query'][_0x628e('0x29')],'nolimit':!![],'sort':_0x628e('0x4a'),'filter':_0x6e7de['query']['filter']}};_0x378cd2['query']=Object[_0x628e('0x3b')](_0x378cd2[_0x628e('0x11')],_0x6e7de[_0x628e('0x11')]);delete _0x378cd2[_0x628e('0x11')]['id'];return db[_0x628e('0x3c')][_0x628e('0x3d')](_0x378cd2);}return db[_0x26f9db]['findAndCountAll'](_0x3b97c7);})[_0x628e('0x16')](function(_0x5f46ef){_0x2aebb1[_0x628e('0xa')]=_0x5f46ef['count'];_0x1c65e4=_0x5f46ef['rows'];return rtq[_0x628e('0x4f')](_0x6e7de,_0x5c720e);})[_0x628e('0x16')](function(_0x444548){_0x5b6038=_0x444548['rows'];return rtq[_0x628e('0x50')](_0x1c65e4,_0x5b6038,_0x5c720e,_0x6e7de['query'][_0x628e('0x29')]);})[_0x628e('0x16')](function(_0x1fe0af){_0x2aebb1['rows']=_0x1fe0af;return _0x2aebb1;})[_0x628e('0x16')](respondWithFilteredResult(_0x318f30,_0x3b97c7))[_0x628e('0x51')](APIHandleError(_0x318f30));}; \ No newline at end of file +var _0x35fa=['../../mysqldb','../../errors/api','APIBadRequestError','offset','limit','undefined','count','status','set','json','getChannels','query','pauseTypeFilter','*pause','resolve','channel','isValidChannel','format','sort','includes','globalStatus','validateSortParameter','getUpdatedSortOptions','join','order','then','getAgentIdsByQueues','rows','getAgentIdsByStatus','length','map','User','rawAttributes','fieldName','type','key','role','online','getOptions','raw','push','sequelize','literal','FIELD(id,','forEach','Pause','where','user','agent','extraQueryConditions','assign','UserProfile','getResources','findAndCountAll','filterAgentAttributes','getAgentStatus','pause','voice','voiceStatus','sortAgentsByStatus','fields','split','pick','catch','getQueues','toLowerCase','name','outbound','dialActive','dialMethod','userProfileId','QueueCampaigns','Queues','getRealtimeQueues','lodash','util','../../components/realtime/queues','../../components/parsers/qs','../../config/utils'];(function(_0x4536a4,_0x55af7b){var _0x4fd1c1=function(_0x4c68cd){while(--_0x4c68cd){_0x4536a4['push'](_0x4536a4['shift']());}};_0x4fd1c1(++_0x55af7b);}(_0x35fa,0x99));var _0xa35f=function(_0x496296,_0x2127b0){_0x496296=_0x496296-0x0;var _0x3f6ea7=_0x35fa[_0x496296];return _0x3f6ea7;};'use strict';var _=require(_0xa35f('0x0'));var util=require(_0xa35f('0x1'));var rta=require('../../components/realtime/agents');var rtq=require(_0xa35f('0x2'));var qs=require(_0xa35f('0x3'));var utils=require(_0xa35f('0x4'));var db=require(_0xa35f('0x5'))['db'];var APIBadRequestError=require(_0xa35f('0x6'))[_0xa35f('0x7')];var APIHandleError=require(_0xa35f('0x6'))['handleError'];function respondWithFilteredResult(_0x16beed,_0x18b505){return function(_0x294425){if(_0x294425){var _0x3b3169=typeof _0x18b505[_0xa35f('0x8')]==='undefined'&&typeof _0x18b505[_0xa35f('0x9')]===_0xa35f('0xa');var _0x91bc49=_0x294425[_0xa35f('0xb')];var _0xe89dbc=_0x3b3169?0x0:_0x18b505['offset'];var _0x5814aa=_0x3b3169?_0x294425[_0xa35f('0xb')]:_0x18b505['offset']+_0x18b505[_0xa35f('0x9')];var _0x84b6e5;if(_0x5814aa>=_0x91bc49){_0x5814aa=_0x91bc49;_0x84b6e5=0xc8;}else{_0x84b6e5=0xce;}_0x16beed[_0xa35f('0xc')](_0x84b6e5);return _0x16beed[_0xa35f('0xd')]('Content-Range',_0xe89dbc+'-'+_0x5814aa+'/'+_0x91bc49)[_0xa35f('0xe')](_0x294425);}return null;};}exports['getAgents']=function(_0x1a3fa8,_0x420e5e){var _0xc6ae05={'count':0x0,'rows':[]};var _0x55f207={};var _0x4bbf97;var _0x4e7fb6=utils[_0xa35f('0xf')]();var _0x1fb1e2;var _0x4f1c22;var _0x1d865a=_0x1a3fa8['query']['globalQueueFilter'];var _0x4ae987=_0x1a3fa8[_0xa35f('0x10')]['globalStatusFilter'];var _0x1f3e61=_0x1a3fa8[_0xa35f('0x10')][_0xa35f('0x11')];var _0x368cd3=_0x4ae987==='pause'||_0x4ae987===_0xa35f('0x12')?!![]:![];var _0x591a10=[];var _0x3f040f;var _0x3693fc;Promise[_0xa35f('0x13')]()['then'](function(){if(_0x1a3fa8['query'][_0xa35f('0x14')]){if(!utils[_0xa35f('0x15')](_0x1a3fa8['query'][_0xa35f('0x14')])){throw new APIBadRequestError(util[_0xa35f('0x16')]('Channel\x20parameter\x20%s\x20is\x20invalid',_0x1a3fa8[_0xa35f('0x10')][_0xa35f('0x14')]));}_0x4bbf97=_0x1a3fa8['query']['channel']['toLowerCase']();}if(!_0x1a3fa8[_0xa35f('0x10')][_0xa35f('0x17')]||!_0x1a3fa8[_0xa35f('0x10')][_0xa35f('0x17')][_0xa35f('0x18')](_0xa35f('0x19'))){_0x1a3fa8[_0xa35f('0x10')][_0xa35f('0x17')]=rta[_0xa35f('0x1a')](_0x1a3fa8[_0xa35f('0x10')][_0xa35f('0x17')]);return;}var _0x11e503=rta[_0xa35f('0x1b')](_0x1a3fa8[_0xa35f('0x10')][_0xa35f('0x17')]);_0x1a3fa8['query'][_0xa35f('0x17')]=_0x11e503['fields'][_0xa35f('0x1c')](',');_0x3f040f=_0x11e503[_0xa35f('0x1d')];})[_0xa35f('0x1e')](function(){if(!_0x1d865a){return[];}return rta[_0xa35f('0x1f')](_0x1d865a,_0x4bbf97);})[_0xa35f('0x1e')](function(_0x505eca){_0x591a10=_0x505eca;return rta['getRealtimeAgents']();})[_0xa35f('0x1e')](function(_0x176602){_0x4f1c22=_0x176602[_0xa35f('0x20')];if((!_0x4ae987||_0x368cd3)&&!_0x3f040f){return _0x591a10;}if(_0x3f040f&&!_0x4ae987){return rta['getSortedAgentsIdsByStatus'](_0x4f1c22,_0x591a10,_0x3f040f);}else{return rta[_0xa35f('0x21')](_0x4f1c22,_0x591a10,_0x4ae987);}})['then'](function(_0x1f14de){_0x591a10=_0x1f14de;var _0x5efc8d=![];if(_0x591a10[_0xa35f('0x22')]===0x0){if(_0x1d865a||_0x4ae987){_0x5efc8d=!![];}if(_0x368cd3){_0x5efc8d=![];}}if(_0x5efc8d){return _0xc6ae05;}var _0x29c06b=_[_0xa35f('0x23')](db[_0xa35f('0x24')][_0xa35f('0x25')],function(_0x401b68){return{'name':_0x401b68[_0xa35f('0x26')],'type':_0x401b68[_0xa35f('0x27')][_0xa35f('0x28')]};});_0x1a3fa8[_0xa35f('0x10')][_0xa35f('0x29')]='agent';_0x1a3fa8[_0xa35f('0x10')][_0xa35f('0x2a')]=!![];_0x55f207=qs[_0xa35f('0x2b')](_0x29c06b,_0x1a3fa8);_0x55f207[_0xa35f('0x2c')]=!![];var _0x164813=[];if(_0x591a10['length']>0x0){_0x164813[_0xa35f('0x2d')]({'id':{'$in':_0x591a10}});if(_0x3f040f&&!_0x4ae987){_0x3693fc=[db[_0xa35f('0x2e')][_0xa35f('0x2f')](_0xa35f('0x30')+_0x591a10+')')];_0x55f207[_0xa35f('0x1d')]=_0x3693fc;}}if(_0x368cd3){_0x4e7fb6[_0xa35f('0x31')](function(_0x37cf12){var _0x5d2b48=!![];if(_0x4ae987==='*pause'&&_0x4bbf97!==_0x37cf12){_0x5d2b48=![];}_0x164813[_0xa35f('0x2d')]({[_0x37cf12+'Pause']:_0x5d2b48});});if(_0x1f3e61){_0x164813[_0xa35f('0x2d')]({'pauseType':_0x1f3e61});}}else if(_0x4ae987){_0x4e7fb6[_0xa35f('0x31')](function(_0x268d55){_0x164813[_0xa35f('0x2d')]({[_0x268d55+_0xa35f('0x32')]:![]});});}_0x55f207['where']=_['merge'](_0x55f207[_0xa35f('0x33')],{'$and':_0x164813});if(_0x1a3fa8['user'][_0xa35f('0x29')]==='user'){var _0x18b612={'params':{'id':_0x1a3fa8[_0xa35f('0x34')]['userProfileId']},'query':{'section':'Agents','role':_0xa35f('0x35'),'online':!![],'raw':!![],'ids':_0x591a10,'customSorting':_0x3693fc}};if(_0x368cd3){_0x18b612[_0xa35f('0x10')][_0xa35f('0x36')]=_0x164813;}_0x18b612['query']=Object[_0xa35f('0x37')](_0x18b612[_0xa35f('0x10')],_0x1a3fa8[_0xa35f('0x10')]);delete _0x18b612[_0xa35f('0x10')]['id'];return db[_0xa35f('0x38')][_0xa35f('0x39')](_0x18b612);}return db[_0xa35f('0x24')][_0xa35f('0x3a')](_0x55f207);})['then'](function(_0x4dd36b){_0xc6ae05[_0xa35f('0xb')]=_0x4dd36b['count'];_0x1fb1e2=_0x4dd36b['rows'];return _0x1fb1e2[_0xa35f('0x23')](function(_0x483978){var _0x2ddb56=_['find'](_0x4f1c22,['id',_0x483978['id']]);if(_0x2ddb56){var _0x103eef=rta[_0xa35f('0x3b')](_0x2ddb56);_['merge'](_0x483978,_0x103eef);}_0x483978['globalStatus']=rta[_0xa35f('0x3c')](_0x483978);if(_0x483978[_0xa35f('0x19')][_0xa35f('0x18')](_0xa35f('0x3d'))){_0x4e7fb6['forEach'](function(_0x193bf3){if(_0x483978[_0x193bf3+_0xa35f('0x32')]){if(_0x193bf3===_0xa35f('0x3e')){if(_0x483978[_0xa35f('0x3f')]!=='talking'){_0x483978['voiceStatus']='pause';}}else{_0x483978[_0x193bf3+'Status']=_0xa35f('0x3d');}}});}return _0x483978;});})[_0xa35f('0x1e')](function(_0x482b10){if(!_0x3f040f||_0x3693fc){return _0x482b10;}return rta[_0xa35f('0x40')](_0x482b10,_0x3f040f);})[_0xa35f('0x1e')](function(_0x331a72){var _0x54f211=null;if(_0x1a3fa8[_0xa35f('0x10')][_0xa35f('0x41')]){var _0x14da36=_0x1a3fa8['query'][_0xa35f('0x41')][_0xa35f('0x42')](',');_0x54f211=_0x331a72[_0xa35f('0x23')](function(_0x351d91){return _[_0xa35f('0x43')](_0x351d91,_0x14da36);});}_0xc6ae05[_0xa35f('0x20')]=_0x54f211||_0x331a72;return _0xc6ae05;})[_0xa35f('0x1e')](respondWithFilteredResult(_0x420e5e,_0x55f207))[_0xa35f('0x44')](APIHandleError(_0x420e5e));};exports[_0xa35f('0x45')]=function(_0x3c04eb,_0xd30174){var _0x257674={'count':0x0,'rows':[]};var _0x3395de={};var _0x18f590;var _0x6e21a;var _0x4333ed;Promise[_0xa35f('0x13')]()[_0xa35f('0x1e')](function(){if(_0x3c04eb['query']['channel']){if(!utils['isValidChannel'](_0x3c04eb['query'][_0xa35f('0x14')])){throw new APIBadRequestError(util[_0xa35f('0x16')]('Channel\x20parameter\x20%s\x20is\x20invalid',_0x3c04eb[_0xa35f('0x10')][_0xa35f('0x14')]));}_0x18f590=_0x3c04eb[_0xa35f('0x10')][_0xa35f('0x14')][_0xa35f('0x46')]();}var _0x308387=_['startCase'](_0x18f590)+'Queue';var _0x2f0fd4=_[_0xa35f('0x23')](db[_0x308387]['rawAttributes'],function(_0x536f4f){return{'name':_0x536f4f[_0xa35f('0x26')],'type':_0x536f4f[_0xa35f('0x27')][_0xa35f('0x28')]};});if(!_0x3c04eb[_0xa35f('0x10')]['fields']){var _0x350cc4=['id',_0xa35f('0x47')];if(_0x18f590===_0xa35f('0x3e')){_0x350cc4[_0xa35f('0x2d')](_0xa35f('0x27'));if(_0x3c04eb[_0xa35f('0x10')][_0xa35f('0x27')]===_0xa35f('0x48')){_0x350cc4[_0xa35f('0x2d')]([_0xa35f('0x49'),_0xa35f('0x4a')]);}}_0x3c04eb[_0xa35f('0x10')][_0xa35f('0x41')]=_0x350cc4[_0xa35f('0x1c')](',');}_0x3395de=qs[_0xa35f('0x2b')](_0x2f0fd4,_0x3c04eb);if(_0x3c04eb[_0xa35f('0x34')][_0xa35f('0x29')]===_0xa35f('0x34')){var _0x1f4c5e={'params':{'id':_0x3c04eb[_0xa35f('0x34')][_0xa35f('0x4b')]},'query':{'section':_0x18f590==='voice'&&_0x3c04eb['query'][_0xa35f('0x27')]===_0xa35f('0x48')?_0xa35f('0x4c'):_['startCase'](_0x18f590)+_0xa35f('0x4d'),'type':_0x3c04eb[_0xa35f('0x10')][_0xa35f('0x27')],'nolimit':!![],'sort':_0xa35f('0x47'),'filter':_0x3c04eb[_0xa35f('0x10')]['filter']}};_0x1f4c5e[_0xa35f('0x10')]=Object[_0xa35f('0x37')](_0x1f4c5e[_0xa35f('0x10')],_0x3c04eb[_0xa35f('0x10')]);delete _0x1f4c5e[_0xa35f('0x10')]['id'];return db[_0xa35f('0x38')]['getResources'](_0x1f4c5e);}return db[_0x308387][_0xa35f('0x3a')](_0x3395de);})[_0xa35f('0x1e')](function(_0x25d46e){_0x257674[_0xa35f('0xb')]=_0x25d46e[_0xa35f('0xb')];_0x6e21a=_0x25d46e[_0xa35f('0x20')];return rtq[_0xa35f('0x4e')](_0x3c04eb,_0x18f590);})[_0xa35f('0x1e')](function(_0x45556b){_0x4333ed=_0x45556b[_0xa35f('0x20')];return rtq['initializeQueues'](_0x6e21a,_0x4333ed,_0x18f590,_0x3c04eb['query'][_0xa35f('0x27')]);})[_0xa35f('0x1e')](function(_0x1fe3ed){_0x257674['rows']=_0x1fe3ed;return _0x257674;})['then'](respondWithFilteredResult(_0xd30174,_0x3395de))[_0xa35f('0x44')](APIHandleError(_0xd30174));}; \ No newline at end of file diff --git a/server/api/reportAgentPreview/index.js b/server/api/reportAgentPreview/index.js index 75a9a40..6b1463c 100644 --- a/server/api/reportAgentPreview/index.js +++ b/server/api/reportAgentPreview/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xcb91=['express','Router','../../components/auth/service','../../components/interaction/service','exports','path','connect-timeout'];(function(_0x49f293,_0x554637){var _0x33b320=function(_0x4ec022){while(--_0x4ec022){_0x49f293['push'](_0x49f293['shift']());}};_0x33b320(++_0x554637);}(_0xcb91,0x1a9));var _0x1cb9=function(_0x31c19c,_0xbe4b70){_0x31c19c=_0x31c19c-0x0;var _0x1a87f7=_0xcb91[_0x31c19c];return _0x1a87f7;};'use strict';var multer=require('multer');var util=require('util');var path=require(_0x1cb9('0x0'));var timeout=require(_0x1cb9('0x1'));var express=require(_0x1cb9('0x2'));var router=express[_0x1cb9('0x3')]();var fs_extra=require('fs-extra');var auth=require(_0x1cb9('0x4'));var interaction=require(_0x1cb9('0x5'));var config=require('../../config/environment');module[_0x1cb9('0x6')]=router; \ No newline at end of file +var _0xe706=['../../components/interaction/service','../../config/environment','exports','multer','util','path','express','Router','fs-extra','../../components/auth/service'];(function(_0x41c2d7,_0x452fff){var _0x33640b=function(_0x18b81a){while(--_0x18b81a){_0x41c2d7['push'](_0x41c2d7['shift']());}};_0x33640b(++_0x452fff);}(_0xe706,0xa3));var _0x6e70=function(_0x7a3247,_0x15cb12){_0x7a3247=_0x7a3247-0x0;var _0x1bfde5=_0xe706[_0x7a3247];return _0x1bfde5;};'use strict';var multer=require(_0x6e70('0x0'));var util=require(_0x6e70('0x1'));var path=require(_0x6e70('0x2'));var timeout=require('connect-timeout');var express=require(_0x6e70('0x3'));var router=express[_0x6e70('0x4')]();var fs_extra=require(_0x6e70('0x5'));var auth=require(_0x6e70('0x6'));var interaction=require(_0x6e70('0x7'));var config=require(_0x6e70('0x8'));module[_0x6e70('0x9')]=router; \ No newline at end of file diff --git a/server/api/reportAgentPreview/reportAgentPreview.attributes.js b/server/api/reportAgentPreview/reportAgentPreview.attributes.js index f42de84..4b21b5d 100644 --- a/server/api/reportAgentPreview/reportAgentPreview.attributes.js +++ b/server/api/reportAgentPreview/reportAgentPreview.attributes.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xf611=['INTEGER','STRING','DATE','exports'];(function(_0x3b7cc9,_0x18cd9b){var _0x5751ea=function(_0x141c47){while(--_0x141c47){_0x3b7cc9['push'](_0x3b7cc9['shift']());}};_0x5751ea(++_0x18cd9b);}(_0xf611,0x7b));var _0x1f61=function(_0x545fe3,_0x3b191f){_0x545fe3=_0x545fe3-0x0;var _0x480702=_0xf611[_0x545fe3];return _0x480702;};'use strict';var Sequelize=require('sequelize');module[_0x1f61('0x0')]={'state':{'type':Sequelize[_0x1f61('0x1')](0x2)},'statedesc':{'type':Sequelize[_0x1f61('0x2')]},'scheduledat':{'type':Sequelize['DATE']},'uniqueid':{'type':Sequelize['STRING']},'starttime':{'type':Sequelize['DATE']},'responsetime':{'type':Sequelize[_0x1f61('0x3')]},'ringtime':{'type':Sequelize['INTEGER'],'defaultValue':0x0},'campaign':{'type':Sequelize[_0x1f61('0x2')]},'campaigntype':{'type':Sequelize[_0x1f61('0x2')]},'membername':{'type':Sequelize['STRING']}}; \ No newline at end of file +var _0x79bf=['STRING','DATE','INTEGER','exports'];(function(_0x14add3,_0x13ce8d){var _0x4a174f=function(_0x2b3ed7){while(--_0x2b3ed7){_0x14add3['push'](_0x14add3['shift']());}};_0x4a174f(++_0x13ce8d);}(_0x79bf,0x1df));var _0xf79b=function(_0x1118eb,_0x476f0a){_0x1118eb=_0x1118eb-0x0;var _0x2dbcd0=_0x79bf[_0x1118eb];return _0x2dbcd0;};'use strict';var Sequelize=require('sequelize');module[_0xf79b('0x0')]={'state':{'type':Sequelize['INTEGER'](0x2)},'statedesc':{'type':Sequelize[_0xf79b('0x1')]},'scheduledat':{'type':Sequelize['DATE']},'uniqueid':{'type':Sequelize[_0xf79b('0x1')]},'starttime':{'type':Sequelize[_0xf79b('0x2')]},'responsetime':{'type':Sequelize[_0xf79b('0x2')]},'ringtime':{'type':Sequelize[_0xf79b('0x3')],'defaultValue':0x0},'campaign':{'type':Sequelize[_0xf79b('0x1')]},'campaigntype':{'type':Sequelize[_0xf79b('0x1')]},'membername':{'type':Sequelize[_0xf79b('0x1')]}}; \ No newline at end of file diff --git a/server/api/reportAgentPreview/reportAgentPreview.model.js b/server/api/reportAgentPreview/reportAgentPreview.model.js index 083355e..8c37259 100644 --- a/server/api/reportAgentPreview/reportAgentPreview.model.js +++ b/server/api/reportAgentPreview/reportAgentPreview.model.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xc89e=['util','api','moment','bluebird','rimraf','../../config/environment','exports','define','ReportAgentPreview','lodash'];(function(_0x248ecd,_0xa6164d){var _0x8dd45d=function(_0x277635){while(--_0x277635){_0x248ecd['push'](_0x248ecd['shift']());}};_0x8dd45d(++_0xa6164d);}(_0xc89e,0x149));var _0xec89=function(_0x23e053,_0x37e439){_0x23e053=_0x23e053-0x0;var _0x179a7a=_0xc89e[_0x23e053];return _0x179a7a;};'use strict';var _=require(_0xec89('0x0'));var util=require(_0xec89('0x1'));var logger=require('../../config/logger')(_0xec89('0x2'));var moment=require(_0xec89('0x3'));var BPromise=require(_0xec89('0x4'));var rp=require('request-promise');var fs=require('fs');var path=require('path');var rimraf=require(_0xec89('0x5'));var config=require(_0xec89('0x6'));var attributes=require('./reportAgentPreview.attributes');module[_0xec89('0x7')]=function(_0x321e4a,_0x148a3b){return _0x321e4a[_0xec89('0x8')](_0xec89('0x9'),attributes,{'tableName':'report_agent_preview','paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file +var _0x8947=['report_agent_preview','api','moment','request-promise','path','rimraf','../../config/environment','exports','ReportAgentPreview'];(function(_0x5a3ec5,_0x71ae0f){var _0x5749de=function(_0x149768){while(--_0x149768){_0x5a3ec5['push'](_0x5a3ec5['shift']());}};_0x5749de(++_0x71ae0f);}(_0x8947,0x76));var _0x7894=function(_0x53ec76,_0x394d0d){_0x53ec76=_0x53ec76-0x0;var _0x3919e4=_0x8947[_0x53ec76];return _0x3919e4;};'use strict';var _=require('lodash');var util=require('util');var logger=require('../../config/logger')(_0x7894('0x0'));var moment=require(_0x7894('0x1'));var BPromise=require('bluebird');var rp=require(_0x7894('0x2'));var fs=require('fs');var path=require(_0x7894('0x3'));var rimraf=require(_0x7894('0x4'));var config=require(_0x7894('0x5'));var attributes=require('./reportAgentPreview.attributes');module[_0x7894('0x6')]=function(_0x48f358,_0x45ac38){return _0x48f358['define'](_0x7894('0x7'),attributes,{'tableName':_0x7894('0x8'),'paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file diff --git a/server/api/reportAgentPreview/reportAgentPreview.rpc.js b/server/api/reportAgentPreview/reportAgentPreview.rpc.js index 54ccb8e..c01433c 100644 --- a/server/api/reportAgentPreview/reportAgentPreview.rpc.js +++ b/server/api/reportAgentPreview/reportAgentPreview.rpc.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xe14d=['debug','ReportAgentPreview,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','code','message','result','catch','CreateReportAgentPreview','ReportAgentPreview','create','body','options','lodash','util','moment','bluebird','ioredis','../../mysqldb','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','request','then','info','ReportAgentPreview,\x20%s,\x20%s'];(function(_0x503855,_0x37ccc2){var _0x239a9c=function(_0x36b0e8){while(--_0x36b0e8){_0x503855['push'](_0x503855['shift']());}};_0x239a9c(++_0x37ccc2);}(_0xe14d,0x1ee));var _0xde14=function(_0xc6be3a,_0x540e05){_0xc6be3a=_0xc6be3a-0x0;var _0x56a310=_0xe14d[_0xc6be3a];return _0x56a310;};'use strict';var _=require(_0xde14('0x0'));var util=require(_0xde14('0x1'));var moment=require(_0xde14('0x2'));var BPromise=require(_0xde14('0x3'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0xde14('0x4'));var db=require(_0xde14('0x5'))['db'];var utils=require('../../config/utils');var logger=require(_0xde14('0x6'))(_0xde14('0x7'));var config=require(_0xde14('0x8'));var jayson=require(_0xde14('0x9'));var client=jayson[_0xde14('0xa')][_0xde14('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x4b1f6b,_0x5a1344,_0x1bd49d){return new BPromise(function(_0x115b7d,_0x2b0e7c){return client[_0xde14('0xc')](_0x4b1f6b,_0x1bd49d)[_0xde14('0xd')](function(_0x176909){logger[_0xde14('0xe')](_0xde14('0xf'),_0x5a1344,'request\x20sent');logger[_0xde14('0x10')](_0xde14('0x11'),_0x5a1344,_0xde14('0x12'),JSON[_0xde14('0x13')](_0x176909));if(_0x176909[_0xde14('0x14')]){if(_0x176909[_0xde14('0x14')][_0xde14('0x15')]===0x1f4){logger[_0xde14('0x14')](_0xde14('0xf'),_0x5a1344,_0x176909[_0xde14('0x14')][_0xde14('0x16')]);return _0x2b0e7c(_0x176909[_0xde14('0x14')][_0xde14('0x16')]);}logger[_0xde14('0x14')](_0xde14('0xf'),_0x5a1344,_0x176909['error']['message']);return _0x115b7d(_0x176909[_0xde14('0x14')][_0xde14('0x16')]);}else{logger[_0xde14('0xe')]('ReportAgentPreview,\x20%s,\x20%s',_0x5a1344,_0xde14('0x12'));_0x115b7d(_0x176909[_0xde14('0x17')][_0xde14('0x16')]);}})[_0xde14('0x18')](function(_0x3de959){logger[_0xde14('0x14')](_0xde14('0xf'),_0x5a1344,_0x3de959);_0x2b0e7c(_0x3de959);});});}exports[_0xde14('0x19')]=function(_0x3cc317){var _0x10c4ab=this;return new Promise(function(_0x590a8b,_0x3f5fcf){return db[_0xde14('0x1a')][_0xde14('0x1b')](_0x3cc317[_0xde14('0x1c')],{'raw':_0x3cc317['options']?_0x3cc317[_0xde14('0x1d')]['raw']===undefined?!![]:![]:!![]})[_0xde14('0xd')](function(_0x4c24a8){logger[_0xde14('0xe')](_0xde14('0x19'),_0x3cc317);logger[_0xde14('0x10')](_0xde14('0x19'),_0x3cc317,JSON[_0xde14('0x13')](_0x4c24a8));_0x590a8b(_0x4c24a8);})[_0xde14('0x18')](function(_0x40b648){logger[_0xde14('0x14')](_0xde14('0x19'),_0x40b648[_0xde14('0x16')],_0x3cc317);_0x3f5fcf(_0x10c4ab[_0xde14('0x14')](0x1f4,_0x40b648[_0xde14('0x16')]));});});}; \ No newline at end of file +var _0x7ff7=['jayson/promise','http','then','info','ReportAgentPreview,\x20%s,\x20%s','ReportAgentPreview,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','code','message','result','catch','CreateReportAgentPreview','ReportAgentPreview','body','options','debug','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/logger','rpc'];(function(_0x2419d3,_0x51a230){var _0x559022=function(_0x5600c2){while(--_0x5600c2){_0x2419d3['push'](_0x2419d3['shift']());}};_0x559022(++_0x51a230);}(_0x7ff7,0x17e));var _0x77ff=function(_0x3ca83c,_0x83a924){_0x3ca83c=_0x3ca83c-0x0;var _0x58098b=_0x7ff7[_0x3ca83c];return _0x58098b;};'use strict';var _=require('lodash');var util=require(_0x77ff('0x0'));var moment=require(_0x77ff('0x1'));var BPromise=require(_0x77ff('0x2'));var rs=require(_0x77ff('0x3'));var fs=require('fs');var Redis=require(_0x77ff('0x4'));var db=require(_0x77ff('0x5'))['db'];var utils=require('../../config/utils');var logger=require(_0x77ff('0x6'))(_0x77ff('0x7'));var config=require('../../config/environment');var jayson=require(_0x77ff('0x8'));var client=jayson['client'][_0x77ff('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x485ee7,_0x1f6f13,_0x5259d0){return new BPromise(function(_0x1fcdb2,_0x58c6cb){return client['request'](_0x485ee7,_0x5259d0)[_0x77ff('0xa')](function(_0x100832){logger[_0x77ff('0xb')](_0x77ff('0xc'),_0x1f6f13,'request\x20sent');logger['debug'](_0x77ff('0xd'),_0x1f6f13,_0x77ff('0xe'),JSON[_0x77ff('0xf')](_0x100832));if(_0x100832[_0x77ff('0x10')]){if(_0x100832['error'][_0x77ff('0x11')]===0x1f4){logger[_0x77ff('0x10')](_0x77ff('0xc'),_0x1f6f13,_0x100832['error']['message']);return _0x58c6cb(_0x100832[_0x77ff('0x10')][_0x77ff('0x12')]);}logger[_0x77ff('0x10')](_0x77ff('0xc'),_0x1f6f13,_0x100832[_0x77ff('0x10')][_0x77ff('0x12')]);return _0x1fcdb2(_0x100832[_0x77ff('0x10')][_0x77ff('0x12')]);}else{logger[_0x77ff('0xb')](_0x77ff('0xc'),_0x1f6f13,'request\x20sent');_0x1fcdb2(_0x100832[_0x77ff('0x13')][_0x77ff('0x12')]);}})[_0x77ff('0x14')](function(_0x2a1b0a){logger['error'](_0x77ff('0xc'),_0x1f6f13,_0x2a1b0a);_0x58c6cb(_0x2a1b0a);});});}exports[_0x77ff('0x15')]=function(_0x1a52e2){var _0x1b43d6=this;return new Promise(function(_0x4010f8,_0x30d23b){return db[_0x77ff('0x16')]['create'](_0x1a52e2[_0x77ff('0x17')],{'raw':_0x1a52e2[_0x77ff('0x18')]?_0x1a52e2[_0x77ff('0x18')]['raw']===undefined?!![]:![]:!![]})['then'](function(_0x1b105c){logger[_0x77ff('0xb')]('CreateReportAgentPreview',_0x1a52e2);logger[_0x77ff('0x19')](_0x77ff('0x15'),_0x1a52e2,JSON['stringify'](_0x1b105c));_0x4010f8(_0x1b105c);})['catch'](function(_0x36bcea){logger[_0x77ff('0x10')](_0x77ff('0x15'),_0x36bcea[_0x77ff('0x12')],_0x1a52e2);_0x30d23b(_0x1b43d6['error'](0x1f4,_0x36bcea[_0x77ff('0x12')]));});});}; \ No newline at end of file diff --git a/server/api/rpc/index.js b/server/api/rpc/index.js index 36d4c2d..659cbd3 100644 --- a/server/api/rpc/index.js +++ b/server/api/rpc/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x3396=['voiceQueuesChannelHangup','/voice/queues/channels/:uniqueid/redirect/:exten','voiceQueuesChannelRedirect','showVoiceQueues','put','updateVoiceQueue','/outbound','outbound','outboundChannels','/agents','agents','/agents/:id/capacity','agentCapacity','/telephones','telephones','trunks','/campaigns','campaigns','/fax/accounts','chatQueuesWaitingInteractions','/mail/queues/waitinginteractions','/openchannel/queues/:id/waitinginteractions','/sms/queues/waitinginteractions','smsQueuesWaitingInteractions','/whatsapp/queues/waitinginteractions','whatsappQueuesWaitingInteractions','faxQueuesWaitingInteractions','post','/mail/queues/:id/notify','queueNotify','mail','/mail/queues/:id','showMailQueues','/chat/queues/:id/notify','chat','/chat/queues/:id','showChatQueues','fax','/fax/queues/:id','openchannel','showOpenchannelQueues','sms','/whatsapp/queues/:id/notify','whatsapp','showSmsQueues','showWhatsappQueues','/agents/:id/notify','exports','multer','path','express','../../components/auth/service','./rpc.controller','get','/voice/channels','isAuthenticated','voiceChannels','/voice/channels/:uniqueid/mixmonitor','voiceChannelMixMonitor','voiceChannelStopMixMonitor','/chat/queues','chatQueues','/mail/queues','mailQueues','/mail/accounts','mailAccounts','/openchannel/queues','openchannelQueues','/sms/queues','smsQueues','/whatsapp/queues','whatsappQueues','/fax/queues','faxQueues','/voice/queues/preview/:id','voiceQueuesPreview','/voice/queues/channels','/voice/queues/channels/:uniqueid','voiceQueuesChannel','/voice/queues/channels/:uniqueid/hangup'];(function(_0x32f7d7,_0x54231b){var _0x133d09=function(_0x41a7ab){while(--_0x41a7ab){_0x32f7d7['push'](_0x32f7d7['shift']());}};_0x133d09(++_0x54231b);}(_0x3396,0x1c0));var _0x6339=function(_0x3ab51d,_0x2fa01d){_0x3ab51d=_0x3ab51d-0x0;var _0x29a04e=_0x3396[_0x3ab51d];return _0x29a04e;};'use strict';var multer=require(_0x6339('0x0'));var util=require('util');var path=require(_0x6339('0x1'));var express=require(_0x6339('0x2'));var router=express['Router']();var auth=require(_0x6339('0x3'));var controller=require(_0x6339('0x4'));router[_0x6339('0x5')](_0x6339('0x6'),auth[_0x6339('0x7')](),controller[_0x6339('0x8')]);router[_0x6339('0x5')](_0x6339('0x9'),auth[_0x6339('0x7')](),controller[_0x6339('0xa')]);router[_0x6339('0x5')]('/voice/channels/:uniqueid/stopmixmonitor',auth['isAuthenticated'](),controller[_0x6339('0xb')]);router[_0x6339('0x5')]('/voice/queues',auth[_0x6339('0x7')](),controller['voiceQueues']);router[_0x6339('0x5')](_0x6339('0xc'),auth[_0x6339('0x7')](),controller[_0x6339('0xd')]);router[_0x6339('0x5')](_0x6339('0xe'),auth[_0x6339('0x7')](),controller[_0x6339('0xf')]);router[_0x6339('0x5')](_0x6339('0x10'),auth['isAuthenticated'](),controller[_0x6339('0x11')]);router[_0x6339('0x5')](_0x6339('0x12'),auth[_0x6339('0x7')](),controller[_0x6339('0x13')]);router['get'](_0x6339('0x14'),auth[_0x6339('0x7')](),controller[_0x6339('0x15')]);router[_0x6339('0x5')](_0x6339('0x16'),auth[_0x6339('0x7')](),controller[_0x6339('0x17')]);router['get'](_0x6339('0x18'),auth[_0x6339('0x7')](),controller[_0x6339('0x19')]);router[_0x6339('0x5')](_0x6339('0x1a'),auth[_0x6339('0x7')](),controller[_0x6339('0x1b')]);router[_0x6339('0x5')](_0x6339('0x1c'),auth[_0x6339('0x7')](),controller['voiceQueuesChannels']);router[_0x6339('0x5')](_0x6339('0x1d'),auth[_0x6339('0x7')](),controller[_0x6339('0x1e')]);router['get'](_0x6339('0x1f'),auth['isAuthenticated'](),controller[_0x6339('0x20')]);router[_0x6339('0x5')](_0x6339('0x21'),auth['isAuthenticated'](),controller[_0x6339('0x22')]);router[_0x6339('0x5')]('/voice/queues/:id',auth['isAuthenticated'](),controller[_0x6339('0x23')]);router[_0x6339('0x24')]('/voice/queues/:id',auth[_0x6339('0x7')](),controller[_0x6339('0x25')]);router[_0x6339('0x5')](_0x6339('0x26'),auth['isAuthenticated'](),controller[_0x6339('0x27')]);router[_0x6339('0x5')]('/outbound/channels',auth['isAuthenticated'](),controller[_0x6339('0x28')]);router[_0x6339('0x5')](_0x6339('0x29'),auth[_0x6339('0x7')](),controller[_0x6339('0x2a')]);router[_0x6339('0x24')](_0x6339('0x2b'),auth[_0x6339('0x7')](),controller[_0x6339('0x2c')]);router['get'](_0x6339('0x2d'),auth[_0x6339('0x7')](),controller[_0x6339('0x2e')]);router[_0x6339('0x5')]('/trunks',auth[_0x6339('0x7')](),controller[_0x6339('0x2f')]);router[_0x6339('0x5')](_0x6339('0x30'),auth[_0x6339('0x7')](),controller[_0x6339('0x31')]);router[_0x6339('0x5')](_0x6339('0x32'),auth[_0x6339('0x7')](),controller['faxAccounts']);router[_0x6339('0x5')]('/chat/queues/waitinginteractions',auth['isAuthenticated'](),controller[_0x6339('0x33')]);router['get'](_0x6339('0x34'),auth[_0x6339('0x7')](),controller['mailQueuesWaitingInteractions']);router['get']('/openchannel/queues/waitinginteractions',auth[_0x6339('0x7')](),controller['openchannelQueuesWaitingInteractions']);router[_0x6339('0x5')](_0x6339('0x35'),auth[_0x6339('0x7')](),controller['openchannelQueuesIdWaitingInteractions']);router[_0x6339('0x5')](_0x6339('0x36'),auth[_0x6339('0x7')](),controller[_0x6339('0x37')]);router[_0x6339('0x5')](_0x6339('0x38'),auth[_0x6339('0x7')](),controller[_0x6339('0x39')]);router[_0x6339('0x5')]('/fax/queues/waitinginteractions',auth[_0x6339('0x7')](),controller[_0x6339('0x3a')]);router[_0x6339('0x3b')](_0x6339('0x3c'),auth[_0x6339('0x7')](),controller[_0x6339('0x3d')](_0x6339('0x3e')));router[_0x6339('0x5')](_0x6339('0x3f'),auth[_0x6339('0x7')](),controller[_0x6339('0x40')]);router['post'](_0x6339('0x41'),auth[_0x6339('0x7')](),controller['queueNotify'](_0x6339('0x42')));router[_0x6339('0x5')](_0x6339('0x43'),auth['isAuthenticated'](),controller[_0x6339('0x44')]);router[_0x6339('0x3b')]('/fax/queues/:id/notify',auth[_0x6339('0x7')](),controller[_0x6339('0x3d')](_0x6339('0x45')));router['get'](_0x6339('0x46'),auth['isAuthenticated'](),controller['showFaxQueues']);router[_0x6339('0x3b')]('/openchannel/queues/:id/notify',auth[_0x6339('0x7')](),controller[_0x6339('0x3d')](_0x6339('0x47')));router[_0x6339('0x5')]('/openchannel/queues/:id',auth['isAuthenticated'](),controller[_0x6339('0x48')]);router[_0x6339('0x3b')]('/sms/queues/:id/notify',auth[_0x6339('0x7')](),controller[_0x6339('0x3d')](_0x6339('0x49')));router['post'](_0x6339('0x4a'),auth['isAuthenticated'](),controller['queueNotify'](_0x6339('0x4b')));router[_0x6339('0x5')]('/sms/queues/:id',auth[_0x6339('0x7')](),controller[_0x6339('0x4c')]);router[_0x6339('0x5')]('/whatsapp/queues/:id',auth[_0x6339('0x7')](),controller[_0x6339('0x4d')]);router[_0x6339('0x3b')](_0x6339('0x4e'),auth[_0x6339('0x7')](),controller['agentNotify']);module[_0x6339('0x4f')]=router; \ No newline at end of file +var _0xe2fa=['agents','/agents/:id/capacity','/telephones','telephones','/trunks','trunks','/campaigns','campaigns','/fax/accounts','/chat/queues/waitinginteractions','chatQueuesWaitingInteractions','/mail/queues/waitinginteractions','/openchannel/queues/waitinginteractions','openchannelQueuesWaitingInteractions','/openchannel/queues/:id/waitinginteractions','openchannelQueuesIdWaitingInteractions','/sms/queues/waitinginteractions','smsQueuesWaitingInteractions','/whatsapp/queues/waitinginteractions','whatsappQueuesWaitingInteractions','/fax/queues/waitinginteractions','/mail/queues/:id/notify','queueNotify','mail','showMailQueues','post','/chat/queues/:id/notify','chat','showChatQueues','/fax/queues/:id/notify','fax','/fax/queues/:id','showFaxQueues','/openchannel/queues/:id/notify','openchannel','/openchannel/queues/:id','sms','/whatsapp/queues/:id/notify','showSmsQueues','/whatsapp/queues/:id','/agents/:id/notify','exports','path','Router','../../components/auth/service','./rpc.controller','get','isAuthenticated','voiceChannels','/voice/channels/:uniqueid/mixmonitor','voiceChannelMixMonitor','voiceChannelStopMixMonitor','/voice/queues','voiceQueues','/chat/queues','/mail/queues','mailQueues','mailAccounts','/openchannel/queues','/sms/queues','smsQueues','/fax/queues','voiceQueuesPreview','/voice/queues/channels','/voice/queues/channels/:uniqueid','voiceQueuesChannel','/voice/queues/channels/:uniqueid/hangup','voiceQueuesChannelHangup','voiceQueuesChannelRedirect','/voice/queues/:id','put','/outbound','/outbound/channels'];(function(_0x192f98,_0x2653fb){var _0x523409=function(_0x583bab){while(--_0x583bab){_0x192f98['push'](_0x192f98['shift']());}};_0x523409(++_0x2653fb);}(_0xe2fa,0x1e0));var _0xae2f=function(_0x288dd0,_0x54536c){_0x288dd0=_0x288dd0-0x0;var _0xe2ae50=_0xe2fa[_0x288dd0];return _0xe2ae50;};'use strict';var multer=require('multer');var util=require('util');var path=require(_0xae2f('0x0'));var express=require('express');var router=express[_0xae2f('0x1')]();var auth=require(_0xae2f('0x2'));var controller=require(_0xae2f('0x3'));router[_0xae2f('0x4')]('/voice/channels',auth[_0xae2f('0x5')](),controller[_0xae2f('0x6')]);router[_0xae2f('0x4')](_0xae2f('0x7'),auth['isAuthenticated'](),controller[_0xae2f('0x8')]);router[_0xae2f('0x4')]('/voice/channels/:uniqueid/stopmixmonitor',auth['isAuthenticated'](),controller[_0xae2f('0x9')]);router[_0xae2f('0x4')](_0xae2f('0xa'),auth[_0xae2f('0x5')](),controller[_0xae2f('0xb')]);router[_0xae2f('0x4')](_0xae2f('0xc'),auth[_0xae2f('0x5')](),controller['chatQueues']);router[_0xae2f('0x4')](_0xae2f('0xd'),auth[_0xae2f('0x5')](),controller[_0xae2f('0xe')]);router[_0xae2f('0x4')]('/mail/accounts',auth[_0xae2f('0x5')](),controller[_0xae2f('0xf')]);router['get'](_0xae2f('0x10'),auth[_0xae2f('0x5')](),controller['openchannelQueues']);router[_0xae2f('0x4')](_0xae2f('0x11'),auth['isAuthenticated'](),controller[_0xae2f('0x12')]);router[_0xae2f('0x4')]('/whatsapp/queues',auth[_0xae2f('0x5')](),controller['whatsappQueues']);router[_0xae2f('0x4')](_0xae2f('0x13'),auth['isAuthenticated'](),controller['faxQueues']);router['get']('/voice/queues/preview/:id',auth['isAuthenticated'](),controller[_0xae2f('0x14')]);router['get'](_0xae2f('0x15'),auth[_0xae2f('0x5')](),controller['voiceQueuesChannels']);router['get'](_0xae2f('0x16'),auth[_0xae2f('0x5')](),controller[_0xae2f('0x17')]);router[_0xae2f('0x4')](_0xae2f('0x18'),auth[_0xae2f('0x5')](),controller[_0xae2f('0x19')]);router[_0xae2f('0x4')]('/voice/queues/channels/:uniqueid/redirect/:exten',auth[_0xae2f('0x5')](),controller[_0xae2f('0x1a')]);router['get'](_0xae2f('0x1b'),auth['isAuthenticated'](),controller['showVoiceQueues']);router[_0xae2f('0x1c')]('/voice/queues/:id',auth[_0xae2f('0x5')](),controller['updateVoiceQueue']);router[_0xae2f('0x4')](_0xae2f('0x1d'),auth[_0xae2f('0x5')](),controller['outbound']);router[_0xae2f('0x4')](_0xae2f('0x1e'),auth[_0xae2f('0x5')](),controller['outboundChannels']);router[_0xae2f('0x4')]('/agents',auth[_0xae2f('0x5')](),controller[_0xae2f('0x1f')]);router[_0xae2f('0x1c')](_0xae2f('0x20'),auth['isAuthenticated'](),controller['agentCapacity']);router[_0xae2f('0x4')](_0xae2f('0x21'),auth['isAuthenticated'](),controller[_0xae2f('0x22')]);router[_0xae2f('0x4')](_0xae2f('0x23'),auth['isAuthenticated'](),controller[_0xae2f('0x24')]);router[_0xae2f('0x4')](_0xae2f('0x25'),auth[_0xae2f('0x5')](),controller[_0xae2f('0x26')]);router['get'](_0xae2f('0x27'),auth['isAuthenticated'](),controller['faxAccounts']);router[_0xae2f('0x4')](_0xae2f('0x28'),auth[_0xae2f('0x5')](),controller[_0xae2f('0x29')]);router[_0xae2f('0x4')](_0xae2f('0x2a'),auth[_0xae2f('0x5')](),controller['mailQueuesWaitingInteractions']);router['get'](_0xae2f('0x2b'),auth[_0xae2f('0x5')](),controller[_0xae2f('0x2c')]);router[_0xae2f('0x4')](_0xae2f('0x2d'),auth[_0xae2f('0x5')](),controller[_0xae2f('0x2e')]);router[_0xae2f('0x4')](_0xae2f('0x2f'),auth[_0xae2f('0x5')](),controller[_0xae2f('0x30')]);router[_0xae2f('0x4')](_0xae2f('0x31'),auth['isAuthenticated'](),controller[_0xae2f('0x32')]);router[_0xae2f('0x4')](_0xae2f('0x33'),auth['isAuthenticated'](),controller['faxQueuesWaitingInteractions']);router['post'](_0xae2f('0x34'),auth[_0xae2f('0x5')](),controller[_0xae2f('0x35')](_0xae2f('0x36')));router[_0xae2f('0x4')]('/mail/queues/:id',auth[_0xae2f('0x5')](),controller[_0xae2f('0x37')]);router[_0xae2f('0x38')](_0xae2f('0x39'),auth[_0xae2f('0x5')](),controller[_0xae2f('0x35')](_0xae2f('0x3a')));router[_0xae2f('0x4')]('/chat/queues/:id',auth[_0xae2f('0x5')](),controller[_0xae2f('0x3b')]);router[_0xae2f('0x38')](_0xae2f('0x3c'),auth[_0xae2f('0x5')](),controller[_0xae2f('0x35')](_0xae2f('0x3d')));router[_0xae2f('0x4')](_0xae2f('0x3e'),auth['isAuthenticated'](),controller[_0xae2f('0x3f')]);router[_0xae2f('0x38')](_0xae2f('0x40'),auth[_0xae2f('0x5')](),controller[_0xae2f('0x35')](_0xae2f('0x41')));router[_0xae2f('0x4')](_0xae2f('0x42'),auth[_0xae2f('0x5')](),controller['showOpenchannelQueues']);router[_0xae2f('0x38')]('/sms/queues/:id/notify',auth[_0xae2f('0x5')](),controller[_0xae2f('0x35')](_0xae2f('0x43')));router[_0xae2f('0x38')](_0xae2f('0x44'),auth['isAuthenticated'](),controller[_0xae2f('0x35')]('whatsapp'));router['get']('/sms/queues/:id',auth[_0xae2f('0x5')](),controller[_0xae2f('0x45')]);router[_0xae2f('0x4')](_0xae2f('0x46'),auth[_0xae2f('0x5')](),controller['showWhatsappQueues']);router[_0xae2f('0x38')](_0xae2f('0x47'),auth[_0xae2f('0x5')](),controller['agentNotify']);module[_0xae2f('0x48')]=router; \ No newline at end of file diff --git a/server/api/rpc/rpc.controller.js b/server/api/rpc/rpc.controller.js index 9d01f53..5775579 100644 --- a/server/api/rpc/rpc.controller.js +++ b/server/api/rpc/rpc.controller.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x23a0=['VoiceQueues','showVoiceQueues','UpdateVoiceQueue','voiceQueuesPreview','VoiceQueuesPreview','voiceQueuesChannels','VoiceQueuesChannels','voiceQueuesChannel','voiceQueuesChannelHangup','VoiceQueuesChannelHangup','voiceQueuesChannelRedirect','outbound','Outbound','outboundChannels','OutboundChannels','Agents','agentCapacity','body','user','interaction','hasOwnProperty','MemberReport','findAll','INTERACTION','length','format','YYYY-MM-DD\x20HH:mm:ss','updateAttributes','findOrCreate','interface','AgentCapacity','telephones','Telephones','Trunks','campaigns','Campaigns','chatQueues','showChatQueues','ChatQueues','MailQueues','showMailQueues','mailAccounts','openchannelQueues','showOpenchannelQueues','OpenchannelQueues','smsQueues','showSmsQueues','SmsQueues','whatsappQueues','WhatsappQueues','showWhatsappQueues','faxQueues','FaxQueues','FaxAccounts','chatQueuesWaitingInteractions','mailQueuesWaitingInteractions','MailQueuesWaitingInteractions','OpenchannelQueuesWaitingInteractions','openchannelQueuesIdWaitingInteractions','type','map','queue_id','value','filter','indexOf','smsQueuesWaitingInteractions','whatsappQueuesWaitingInteractions','WhatsappQueuesWaitingInteractions','FaxQueuesWaitingInteractions','capitalize','chat','Account','Queue','findOne','\x20Queue\x20not\x20found','Message','messageId','Interaction','\x20Message\x20not\x20found','update','queue','MessageId','From','QueueId','TransferReport','create','queueTransferTimeout','*,*,*,*','agentNotify','channel','Channel\x20field\x20is\x20mandatory','Website','InteractionId','Start','agent','agentTransferTimeout','bluebird','lodash','util','../../mysqldb','../../config/logger','api','client','http','request','then','error','code','message','result','status','json','sendStatus','name','isNil','rows','find','VoiceChannels','query','catch','voiceChannelMixMonitor','merge','params','voiceChannelStopMixMonitor','VoiceChannelStopMixMonitor','voiceQueues'];(function(_0x2ec461,_0x5f588a){var _0x28603d=function(_0x21114b){while(--_0x21114b){_0x2ec461['push'](_0x2ec461['shift']());}};_0x28603d(++_0x5f588a);}(_0x23a0,0x15c));var _0x023a=function(_0x19ac6e,_0x435862){_0x19ac6e=_0x19ac6e-0x0;var _0x1cdcf3=_0x23a0[_0x19ac6e];return _0x1cdcf3;};'use strict';var BPromise=require(_0x023a('0x0'));var moment=require('moment');var _=require(_0x023a('0x1'));var util=require(_0x023a('0x2'));var db=require(_0x023a('0x3'))['db'];var logger=require(_0x023a('0x4'))(_0x023a('0x5'));var jayson=require('jayson/promise');var amiClient=jayson['client']['http']({'port':0x232a});var mailClient=jayson[_0x023a('0x6')][_0x023a('0x7')]({'port':0x232b});var routingClient=jayson[_0x023a('0x6')][_0x023a('0x7')]({'port':0x232c});function respondWithRpcPromise(_0x4f32f4,_0x3e8cca,_0x39bbad){return new BPromise(function(_0x2f5153,_0xbdadd8){var _0x2073db=_0x39bbad?_0x39bbad:amiClient;return _0x2073db[_0x023a('0x8')](_0x4f32f4,_0x3e8cca)[_0x023a('0x9')](function(_0x3ef50f){if(_0x3ef50f['error']){if(_0x3ef50f[_0x023a('0xa')][_0x023a('0xb')]===0x1f4){return _0xbdadd8(_0x3ef50f['error']['message']);}return _0x2f5153(_0x3ef50f['error'][_0x023a('0xc')]);}else{_0x2f5153(_0x3ef50f[_0x023a('0xd')]);}})['catch'](function(_0x6991bb){_0xbdadd8(_0x6991bb);});});}function respondWithResult(_0x839009,_0xca3d63){_0xca3d63=_0xca3d63||0xc8;return function(_0xce485){if(_0xce485){return _0x839009[_0x023a('0xe')](_0xca3d63)[_0x023a('0xf')](_0xce485);}return _0x839009[_0x023a('0x10')](0x194);};}function handleError(_0x48dca4,_0x51a64e){_0x51a64e=_0x51a64e||0x1f4;return function(_0x5154d9){logger[_0x023a('0xa')](_0x5154d9['stack']);if(_0x5154d9[_0x023a('0x11')]){delete _0x5154d9[_0x023a('0x11')];}_0x48dca4[_0x023a('0xe')](_0x51a64e)['send'](_0x5154d9);};}function findById(_0x38d369){return function(_0x3714e3){if(!_['isNil'](_0x38d369)&&!_[_0x023a('0x12')](_0x3714e3)&&!_[_0x023a('0x12')](_0x3714e3[_0x023a('0x13')])){return _[_0x023a('0x14')](_0x3714e3[_0x023a('0x13')],function(_0x3971da){return _0x3971da['id']==_0x38d369;});}return null;};}exports['voiceChannels']=function(_0x3f34c5,_0x30f626){return respondWithRpcPromise(_0x023a('0x15'),_0x3f34c5[_0x023a('0x16')])[_0x023a('0x9')](respondWithResult(_0x30f626,null))[_0x023a('0x17')](handleError(_0x30f626,null));};exports[_0x023a('0x18')]=function(_0xe06785,_0x32b260){return respondWithRpcPromise('VoiceChannelMixMonitor',_[_0x023a('0x19')](_0xe06785[_0x023a('0x16')],_0xe06785[_0x023a('0x1a')]))[_0x023a('0x9')](respondWithResult(_0x32b260,null))[_0x023a('0x17')](handleError(_0x32b260,null));};exports[_0x023a('0x1b')]=function(_0xaa9767,_0x493b82){return respondWithRpcPromise(_0x023a('0x1c'),_[_0x023a('0x19')](_0xaa9767[_0x023a('0x16')],_0xaa9767[_0x023a('0x1a')]))[_0x023a('0x9')](respondWithResult(_0x493b82,null))[_0x023a('0x17')](handleError(_0x493b82,null));};exports[_0x023a('0x1d')]=function(_0x4dc6bc,_0x58ea49){return respondWithRpcPromise(_0x023a('0x1e'),_0x4dc6bc[_0x023a('0x16')])[_0x023a('0x9')](respondWithResult(_0x58ea49,null))['catch'](handleError(_0x58ea49,null));};exports[_0x023a('0x1f')]=function(_0x2d96e6,_0x24bf41){return respondWithRpcPromise(_0x023a('0x1e'),_0x2d96e6[_0x023a('0x16')])[_0x023a('0x9')](findById(_0x2d96e6['params']['id']))['then'](respondWithResult(_0x24bf41,null))[_0x023a('0x17')](handleError(_0x24bf41,null));};exports['updateVoiceQueue']=function(_0x454a48,_0x290516){return respondWithRpcPromise(_0x023a('0x20'),_[_0x023a('0x19')](_0x454a48['body'],_0x454a48[_0x023a('0x1a')]))[_0x023a('0x9')](respondWithResult(_0x290516,null))[_0x023a('0x17')](handleError(_0x290516,null));};exports[_0x023a('0x21')]=function(_0x2fb490,_0x4206f6){return respondWithRpcPromise(_0x023a('0x22'),_['merge'](_0x2fb490['query'],_0x2fb490[_0x023a('0x1a')]))[_0x023a('0x9')](respondWithResult(_0x4206f6,null))['catch'](handleError(_0x4206f6,null));};exports[_0x023a('0x23')]=function(_0x1023a7,_0x4d9f05){return respondWithRpcPromise(_0x023a('0x24'),_0x1023a7[_0x023a('0x16')])['then'](respondWithResult(_0x4d9f05,null))[_0x023a('0x17')](handleError(_0x4d9f05,null));};exports[_0x023a('0x25')]=function(_0x2a05a4,_0x542462){return respondWithRpcPromise('VoiceQueuesChannel',_[_0x023a('0x19')](_0x2a05a4['query'],_0x2a05a4[_0x023a('0x1a')]))[_0x023a('0x9')](respondWithResult(_0x542462,null))[_0x023a('0x17')](handleError(_0x542462,null));};exports[_0x023a('0x26')]=function(_0x49fabe,_0x437162){return respondWithRpcPromise(_0x023a('0x27'),_[_0x023a('0x19')](_0x49fabe[_0x023a('0x16')],_0x49fabe[_0x023a('0x1a')]))[_0x023a('0x9')](respondWithResult(_0x437162,null))[_0x023a('0x17')](handleError(_0x437162,null));};exports[_0x023a('0x28')]=function(_0x465b31,_0x3aaf3b){return respondWithRpcPromise('VoiceQueuesChannelRedirect',_[_0x023a('0x19')](_0x465b31[_0x023a('0x16')],_0x465b31[_0x023a('0x1a')]))['then'](respondWithResult(_0x3aaf3b,null))['catch'](handleError(_0x3aaf3b,null));};exports[_0x023a('0x29')]=function(_0x34e95c,_0x57d3de){return respondWithRpcPromise(_0x023a('0x2a'),_0x34e95c[_0x023a('0x16')])[_0x023a('0x9')](respondWithResult(_0x57d3de,null))[_0x023a('0x17')](handleError(_0x57d3de,null));};exports[_0x023a('0x2b')]=function(_0x5892d0,_0x1ead70){return respondWithRpcPromise(_0x023a('0x2c'),_0x5892d0[_0x023a('0x16')])[_0x023a('0x9')](respondWithResult(_0x1ead70,null))['catch'](handleError(_0x1ead70,null));};exports['agents']=function(_0x34c159,_0x2bec9f){var _0x2e5b84;return respondWithRpcPromise(_0x023a('0x2d'),_0x34c159[_0x023a('0x16')])[_0x023a('0x9')](function(_0x283574){_0x2e5b84=_0x283574;return respondWithRpcPromise(_0x023a('0x2d'),_0x34c159['query'],routingClient);})['then'](function(_0x51d7aa){return _['merge']({},_0x51d7aa,_0x2e5b84);})[_0x023a('0x9')](respondWithResult(_0x2bec9f,null))[_0x023a('0x17')](handleError(_0x2bec9f,null));};exports[_0x023a('0x2e')]=function(_0x3562bf,_0x4bda45){if(_0x3562bf[_0x023a('0x2f')]&&_0x3562bf[_0x023a('0x2f')]['interaction']&&_0x3562bf['user']&&_0x3562bf[_0x023a('0x30')]['name']){for(var _0x32284c in _0x3562bf[_0x023a('0x2f')]['interaction']){if(_0x3562bf[_0x023a('0x2f')][_0x023a('0x31')][_0x023a('0x32')](_0x32284c)){db[_0x023a('0x33')][_0x023a('0x34')]({'where':{'channel':_0x32284c,'membername':_0x3562bf['user'][_0x023a('0x11')],'type':_0x023a('0x35'),'exitAt':null,'uniqueid':_0x3562bf[_0x023a('0x2f')][_0x023a('0x31')][_0x32284c]&&_0x3562bf[_0x023a('0x2f')]['interaction'][_0x32284c][_0x023a('0x36')]?{'$notIn':_0x3562bf[_0x023a('0x2f')][_0x023a('0x31')][_0x32284c]}:{'$ne':null}}})[_0x023a('0x9')](function(_0x2a2859){var _0x1adf20=moment()[_0x023a('0x37')](_0x023a('0x38'));for(var _0x5a4c41=0x0,_0x53c3f8=_0x2a2859[_0x023a('0x36')];_0x5a4c41<_0x53c3f8;_0x5a4c41+=0x1){_0x2a2859[_0x5a4c41][_0x023a('0x39')]({'exitAt':_0x1adf20});}});for(var _0x5db3e5=0x0;_0x5db3e5<_0x3562bf[_0x023a('0x2f')][_0x023a('0x31')][_0x32284c][_0x023a('0x36')];_0x5db3e5+=0x1){db[_0x023a('0x33')][_0x023a('0x3a')]({'where':{'channel':_0x32284c,'membername':_0x3562bf['user'][_0x023a('0x11')],'type':'INTERACTION','uniqueid':_0x3562bf['body']['interaction'][_0x32284c][_0x5db3e5],'exitAt':null},'defaults':{'channel':_0x32284c,'membername':_0x3562bf[_0x023a('0x30')]['name'],'interface':_[_0x023a('0x12')](_0x3562bf['user']['interface'])?util[_0x023a('0x37')]('SIP/%s',_0x3562bf[_0x023a('0x30')]['name']):_0x3562bf[_0x023a('0x30')][_0x023a('0x3b')],'type':'INTERACTION','enterAt':moment()[_0x023a('0x37')]('YYYY-MM-DD\x20HH:mm:ss'),'role':'agent','internal':_0x3562bf['user']['internal'],'uniqueid':_0x3562bf[_0x023a('0x2f')]['interaction'][_0x32284c][_0x5db3e5]}});}}}}return respondWithRpcPromise(_0x023a('0x3c'),{'id':_0x3562bf[_0x023a('0x1a')]['id'],'capacity':_0x3562bf[_0x023a('0x2f')]['capacity']},routingClient)[_0x023a('0x9')](respondWithResult(_0x4bda45,null))['catch'](handleError(_0x4bda45,null));};exports[_0x023a('0x3d')]=function(_0x4a2135,_0x1b8cf8){return respondWithRpcPromise(_0x023a('0x3e'),_0x4a2135[_0x023a('0x16')])['then'](respondWithResult(_0x1b8cf8,null))[_0x023a('0x17')](handleError(_0x1b8cf8,null));};exports['trunks']=function(_0xfe249,_0x5127f4){return respondWithRpcPromise(_0x023a('0x3f'),_0xfe249[_0x023a('0x16')])['then'](respondWithResult(_0x5127f4,null))[_0x023a('0x17')](handleError(_0x5127f4,null));};exports[_0x023a('0x40')]=function(_0x3e704b,_0x381fb6){return respondWithRpcPromise(_0x023a('0x41'),_0x3e704b[_0x023a('0x16')])[_0x023a('0x9')](respondWithResult(_0x381fb6,null))[_0x023a('0x17')](handleError(_0x381fb6,null));};exports[_0x023a('0x42')]=function(_0x569975,_0x1ca5d7){return respondWithRpcPromise('ChatQueues',_0x569975[_0x023a('0x16')],routingClient)[_0x023a('0x9')](respondWithResult(_0x1ca5d7,null))[_0x023a('0x17')](handleError(_0x1ca5d7,null));};exports[_0x023a('0x43')]=function(_0x193ae4,_0x1a422d){return respondWithRpcPromise(_0x023a('0x44'),_0x193ae4[_0x023a('0x16')],routingClient)[_0x023a('0x9')](findById(_0x193ae4['params']['id']))['then'](respondWithResult(_0x1a422d,null))[_0x023a('0x17')](handleError(_0x1a422d,null));};exports['mailQueues']=function(_0x204902,_0x3206ce){return respondWithRpcPromise(_0x023a('0x45'),_0x204902[_0x023a('0x16')],routingClient)['then'](respondWithResult(_0x3206ce,null))['catch'](handleError(_0x3206ce,null));};exports[_0x023a('0x46')]=function(_0x338af2,_0xaa32b3){return respondWithRpcPromise('MailQueues',_0x338af2[_0x023a('0x16')],routingClient)[_0x023a('0x9')](findById(_0x338af2['params']['id']))[_0x023a('0x9')](respondWithResult(_0xaa32b3,null))['catch'](handleError(_0xaa32b3,null));};exports[_0x023a('0x47')]=function(_0x21fcb2,_0x2d02c0){return respondWithRpcPromise('MailAccounts',_0x21fcb2[_0x023a('0x16')],mailClient)[_0x023a('0x9')](respondWithResult(_0x2d02c0,null))[_0x023a('0x17')](handleError(_0x2d02c0,null));};exports[_0x023a('0x48')]=function(_0x509a97,_0x36da07){return respondWithRpcPromise('OpenchannelQueues',_0x509a97[_0x023a('0x16')],routingClient)[_0x023a('0x9')](respondWithResult(_0x36da07,null))[_0x023a('0x17')](handleError(_0x36da07,null));};exports[_0x023a('0x49')]=function(_0x303196,_0x28ef8e){return respondWithRpcPromise(_0x023a('0x4a'),_0x303196['query'],routingClient)[_0x023a('0x9')](findById(_0x303196[_0x023a('0x1a')]['id']))[_0x023a('0x9')](respondWithResult(_0x28ef8e,null))[_0x023a('0x17')](handleError(_0x28ef8e,null));};exports[_0x023a('0x4b')]=function(_0x823d34,_0x19bf46){return respondWithRpcPromise('SmsQueues',_0x823d34[_0x023a('0x16')],routingClient)['then'](respondWithResult(_0x19bf46,null))['catch'](handleError(_0x19bf46,null));};exports[_0x023a('0x4c')]=function(_0x1f0f9f,_0x906ed1){return respondWithRpcPromise(_0x023a('0x4d'),_0x1f0f9f[_0x023a('0x16')],routingClient)['then'](findById(_0x1f0f9f[_0x023a('0x1a')]['id']))[_0x023a('0x9')](respondWithResult(_0x906ed1,null))[_0x023a('0x17')](handleError(_0x906ed1,null));};exports[_0x023a('0x4e')]=function(_0x3ee089,_0x664ccf){return respondWithRpcPromise(_0x023a('0x4f'),_0x3ee089['query'],routingClient)[_0x023a('0x9')](respondWithResult(_0x664ccf,null))[_0x023a('0x17')](handleError(_0x664ccf,null));};exports[_0x023a('0x50')]=function(_0x1a4c68,_0x338143){return respondWithRpcPromise('WhatsappQueues',_0x1a4c68[_0x023a('0x16')],routingClient)[_0x023a('0x9')](findById(_0x1a4c68[_0x023a('0x1a')]['id']))[_0x023a('0x9')](respondWithResult(_0x338143,null))['catch'](handleError(_0x338143,null));};exports[_0x023a('0x51')]=function(_0x4b8f4f,_0x338012){return respondWithRpcPromise('FaxQueues',_0x4b8f4f[_0x023a('0x16')],routingClient)[_0x023a('0x9')](respondWithResult(_0x338012,null))[_0x023a('0x17')](handleError(_0x338012,null));};exports['showFaxQueues']=function(_0x459eda,_0x4ffa3d){return respondWithRpcPromise(_0x023a('0x52'),_0x459eda[_0x023a('0x16')],routingClient)[_0x023a('0x9')](findById(_0x459eda[_0x023a('0x1a')]['id']))[_0x023a('0x9')](respondWithResult(_0x4ffa3d,null))[_0x023a('0x17')](handleError(_0x4ffa3d,null));};exports['faxAccounts']=function(_0x1b9904,_0x4626ff){return respondWithRpcPromise(_0x023a('0x53'),_0x1b9904[_0x023a('0x16')])[_0x023a('0x9')](respondWithResult(_0x4626ff,null))[_0x023a('0x17')](handleError(_0x4626ff,null));};exports[_0x023a('0x54')]=function(_0x3c8adc,_0x50c720){return respondWithRpcPromise('ChatQueuesWaitingInteractions',_0x3c8adc['query'],routingClient)['then'](respondWithResult(_0x50c720,null))[_0x023a('0x17')](handleError(_0x50c720,null));};exports[_0x023a('0x55')]=function(_0x5c0d23,_0x4e8645){return respondWithRpcPromise(_0x023a('0x56'),_0x5c0d23[_0x023a('0x16')],routingClient)[_0x023a('0x9')](respondWithResult(_0x4e8645,null))['catch'](handleError(_0x4e8645,null));};exports['openchannelQueuesWaitingInteractions']=function(_0x285da9,_0xb06270){return respondWithRpcPromise(_0x023a('0x57'),_0x285da9['query'],routingClient)[_0x023a('0x9')](respondWithResult(_0xb06270,null))[_0x023a('0x17')](handleError(_0xb06270,null));};exports[_0x023a('0x58')]=function(_0x56423e,_0x6332d3){return respondWithRpcPromise('OpenchannelQueuesWaitingInteractions',_0x56423e[_0x023a('0x16')],routingClient)[_0x023a('0x9')](function(_0x21b5a4){if(_0x56423e[_0x023a('0x16')][_0x023a('0x59')]!==undefined){var _0x3c849b=_(_0x21b5a4[_0x023a('0x13')])['filter']([_0x56423e[_0x023a('0x16')][_0x023a('0x59')],_0x56423e[_0x023a('0x1a')]['id']])[_0x023a('0x5a')](_0x023a('0x5b'))['uniq']()[_0x023a('0x5c')]();return _0x21b5a4[_0x023a('0x13')][_0x023a('0x5d')](function(_0x18e27c){return _0x3c849b[_0x023a('0x5e')](_0x18e27c[_0x023a('0x5b')])>-0x1;});}else{return _0x21b5a4[_0x023a('0x13')][_0x023a('0x5d')](function(_0x56cf5c){return _0x56cf5c[_0x023a('0x5b')]===parseInt(_0x56423e[_0x023a('0x1a')]['id']);});}})[_0x023a('0x9')](respondWithResult(_0x6332d3,null))[_0x023a('0x17')](handleError(_0x6332d3,null));};exports[_0x023a('0x5f')]=function(_0x1dd6a4,_0x5c9cd3){return respondWithRpcPromise('SmsQueuesWaitingInteractions',_0x1dd6a4[_0x023a('0x16')],routingClient)[_0x023a('0x9')](respondWithResult(_0x5c9cd3,null))['catch'](handleError(_0x5c9cd3,null));};exports[_0x023a('0x60')]=function(_0x2e90ba,_0x4cc209){return respondWithRpcPromise(_0x023a('0x61'),_0x2e90ba[_0x023a('0x16')],routingClient)[_0x023a('0x9')](respondWithResult(_0x4cc209,null))[_0x023a('0x17')](handleError(_0x4cc209,null));};exports['faxQueuesWaitingInteractions']=function(_0x58ce14,_0x58bc34){return respondWithRpcPromise(_0x023a('0x62'),_0x58ce14[_0x023a('0x16')],routingClient)[_0x023a('0x9')](respondWithResult(_0x58bc34,null))['catch'](handleError(_0x58bc34,null));};exports['queueNotify']=function(_0x245dd4){return function(_0x5e58d9,_0x159437){var _0x5c5677,_0x3d3628;var _0x35eba6=_[_0x023a('0x63')](_0x245dd4);var _0x4a59fe=_0x245dd4===_0x023a('0x64')?'Website':_0x023a('0x65');return db[_0x35eba6+_0x023a('0x66')][_0x023a('0x67')]({'raw':!![],'where':{'id':_0x5e58d9[_0x023a('0x1a')]['id']}})[_0x023a('0x9')](function(_0x3b0e16){if(_['isNil'](_0x3b0e16)){throw new Error(_0x35eba6+_0x023a('0x68'));}_0x5c5677=_0x3b0e16;return db[_0x35eba6+_0x023a('0x69')]['findOne']({'where':{'id':_0x5e58d9[_0x023a('0x2f')][_0x023a('0x6a')]},'include':[{'model':db[_0x35eba6+_0x023a('0x6b')],'as':'Interaction'},{'model':db[_0x35eba6+_0x4a59fe],'as':'Account'}]});})[_0x023a('0x9')](function(_0x15ce81){if(_[_0x023a('0x12')](_0x15ce81)){throw new Error(_0x35eba6+_0x023a('0x6c'));}_0x3d3628=_0x15ce81;return _0x15ce81[_0x023a('0x6d')]({'read':0x0,'readAt':null,'UserId':null});})[_0x023a('0x9')](function(){var _0x539ac2={'uniqueid':_0x245dd4+'.'+_0x3d3628['id']+'.'+_0x3d3628['Interaction']['id'],'FromUserId':_0x5e58d9[_0x023a('0x30')]['id'],'type':_0x023a('0x6e')};_0x539ac2[_0x35eba6+_0x023a('0x6f')]=_0x3d3628['id'];_0x539ac2[_0x35eba6+'InteractionId']=_0x3d3628[_0x023a('0x6b')]['id'];_0x539ac2[_0x023a('0x70')+_0x35eba6+_0x4a59fe+'Id']=_0x3d3628[_0x023a('0x65')]['id'];_0x539ac2['To'+_0x35eba6+_0x023a('0x71')]=_0x5c5677['id'];return db[_0x35eba6+_0x023a('0x72')][_0x023a('0x73')](_0x539ac2);})[_0x023a('0x9')](function(){return respondWithRpcPromise('Start',{'channel':_0x245dd4,'interaction':_0x3d3628[_0x023a('0x6b')],'message':_0x3d3628,'account':_0x3d3628['Account'],'applications':[{'id':0x0,'priority':0x1,'app':'queue','appdata':_0x5c5677[_0x023a('0x11')]+','+(_0x3d3628[_0x023a('0x65')][_0x023a('0x74')]||0x12c),'interval':_0x023a('0x75')}]},routingClient);})[_0x023a('0x9')](respondWithResult(_0x159437,null))[_0x023a('0x17')](handleError(_0x159437,null));};};exports[_0x023a('0x76')]=function(_0x232f44,_0x1b36ec){var _0x29be17,_0x3264fc;if(_[_0x023a('0x12')](_0x232f44[_0x023a('0x2f')][_0x023a('0x77')])){throw new Error(_0x023a('0x78'));}var _0x2a1771=_0x232f44['body'][_0x023a('0x77')];var _0x338a57=_[_0x023a('0x63')](_0x2a1771);var _0x57b0e5=_0x2a1771===_0x023a('0x64')?_0x023a('0x79'):_0x023a('0x65');return db['User']['findOne']({'raw':!![],'where':{'id':_0x232f44[_0x023a('0x1a')]['id'],'role':'agent'}})[_0x023a('0x9')](function(_0x2056c2){if(_[_0x023a('0x12')](_0x2056c2)){throw new Error('Agent\x20not\x20found');}_0x29be17=_0x2056c2;return db[_0x338a57+_0x023a('0x69')][_0x023a('0x67')]({'where':{'id':_0x232f44[_0x023a('0x2f')]['messageId']},'include':[{'model':db[_0x338a57+_0x023a('0x6b')],'as':'Interaction'},{'model':db[_0x338a57+_0x57b0e5],'as':'Account'}]});})[_0x023a('0x9')](function(_0x1ac694){if(_[_0x023a('0x12')](_0x1ac694)){throw new Error(_0x338a57+'\x20Message\x20not\x20found');}_0x3264fc=_0x1ac694;return _0x1ac694[_0x023a('0x6d')]({'read':0x0,'readAt':null,'UserId':null});})[_0x023a('0x9')](function(){var _0x3128f0={'uniqueid':_0x2a1771+'.'+_0x3264fc['id']+'.'+_0x3264fc[_0x023a('0x6b')]['id'],'FromUserId':_0x232f44[_0x023a('0x30')]['id'],'type':'agent','ToUserId':_0x29be17['id']};_0x3128f0[_0x338a57+_0x023a('0x6f')]=_0x3264fc['id'];_0x3128f0[_0x338a57+_0x023a('0x7a')]=_0x3264fc[_0x023a('0x6b')]['id'];_0x3128f0['From'+_0x338a57+_0x57b0e5+'Id']=_0x3264fc[_0x023a('0x65')]['id'];return db[_0x338a57+_0x023a('0x72')][_0x023a('0x73')](_0x3128f0);})['then'](function(){return respondWithRpcPromise(_0x023a('0x7b'),{'channel':_0x2a1771,'interaction':_0x3264fc['Interaction'],'message':_0x3264fc,'account':_0x3264fc[_0x023a('0x65')],'applications':[{'id':0x0,'priority':0x1,'app':_0x023a('0x7c'),'appdata':_0x29be17['name']+','+(_0x3264fc[_0x023a('0x65')][_0x023a('0x7d')]||0x12c),'interval':_0x023a('0x75')}]},routingClient);})[_0x023a('0x9')](respondWithResult(_0x1b36ec,null))['catch'](handleError(_0x1b36ec,null));}; \ No newline at end of file +var _0x7910=['Website','Queue','findOne','messageId','Interaction','Account','\x20Message\x20not\x20found','update','queue','InteractionId','QueueId','TransferReport','create','Start','*,*,*,*','agentNotify','channel','Channel\x20field\x20is\x20mandatory','User','Message','MessageId','From','agentTransferTimeout','bluebird','moment','lodash','util','../../mysqldb','../../config/logger','api','jayson/promise','client','http','request','then','error','message','result','catch','sendStatus','stack','name','status','send','isNil','rows','voiceChannels','VoiceChannels','VoiceChannelMixMonitor','merge','query','params','voiceChannelStopMixMonitor','VoiceChannelStopMixMonitor','voiceQueues','showVoiceQueues','VoiceQueues','updateVoiceQueue','UpdateVoiceQueue','body','voiceQueuesPreview','voiceQueuesChannels','voiceQueuesChannel','VoiceQueuesChannel','voiceQueuesChannelHangup','VoiceQueuesChannelHangup','voiceQueuesChannelRedirect','VoiceQueuesChannelRedirect','Outbound','OutboundChannels','agents','Agents','agentCapacity','interaction','hasOwnProperty','MemberReport','findAll','user','INTERACTION','length','updateAttributes','findOrCreate','interface','SIP/%s','format','YYYY-MM-DD\x20HH:mm:ss','agent','AgentCapacity','telephones','Telephones','Trunks','campaigns','chatQueues','ChatQueues','showChatQueues','showMailQueues','MailAccounts','OpenchannelQueues','showOpenchannelQueues','smsQueues','SmsQueues','showSmsQueues','whatsappQueues','WhatsappQueues','showWhatsappQueues','faxQueues','FaxQueues','faxAccounts','FaxAccounts','chatQueuesWaitingInteractions','ChatQueuesWaitingInteractions','mailQueuesWaitingInteractions','MailQueuesWaitingInteractions','openchannelQueuesWaitingInteractions','OpenchannelQueuesWaitingInteractions','openchannelQueuesIdWaitingInteractions','type','filter','map','queue_id','uniq','value','indexOf','smsQueuesWaitingInteractions','SmsQueuesWaitingInteractions','whatsappQueuesWaitingInteractions','WhatsappQueuesWaitingInteractions','FaxQueuesWaitingInteractions','queueNotify','capitalize','chat'];(function(_0x10ead3,_0x25966e){var _0x5257d9=function(_0x31ee2c){while(--_0x31ee2c){_0x10ead3['push'](_0x10ead3['shift']());}};_0x5257d9(++_0x25966e);}(_0x7910,0x1a0));var _0x0791=function(_0x254abd,_0x1ab7f0){_0x254abd=_0x254abd-0x0;var _0x31bf1b=_0x7910[_0x254abd];return _0x31bf1b;};'use strict';var BPromise=require(_0x0791('0x0'));var moment=require(_0x0791('0x1'));var _=require(_0x0791('0x2'));var util=require(_0x0791('0x3'));var db=require(_0x0791('0x4'))['db'];var logger=require(_0x0791('0x5'))(_0x0791('0x6'));var jayson=require(_0x0791('0x7'));var amiClient=jayson[_0x0791('0x8')]['http']({'port':0x232a});var mailClient=jayson[_0x0791('0x8')]['http']({'port':0x232b});var routingClient=jayson[_0x0791('0x8')][_0x0791('0x9')]({'port':0x232c});function respondWithRpcPromise(_0x4b9d82,_0x2bea38,_0x32ffbf){return new BPromise(function(_0x5af324,_0x1eb6e5){var _0x2f13eb=_0x32ffbf?_0x32ffbf:amiClient;return _0x2f13eb[_0x0791('0xa')](_0x4b9d82,_0x2bea38)[_0x0791('0xb')](function(_0x5dc3e6){if(_0x5dc3e6[_0x0791('0xc')]){if(_0x5dc3e6[_0x0791('0xc')]['code']===0x1f4){return _0x1eb6e5(_0x5dc3e6['error'][_0x0791('0xd')]);}return _0x5af324(_0x5dc3e6['error'][_0x0791('0xd')]);}else{_0x5af324(_0x5dc3e6[_0x0791('0xe')]);}})[_0x0791('0xf')](function(_0x13b997){_0x1eb6e5(_0x13b997);});});}function respondWithResult(_0x54f20c,_0x3ea86a){_0x3ea86a=_0x3ea86a||0xc8;return function(_0x40cb66){if(_0x40cb66){return _0x54f20c['status'](_0x3ea86a)['json'](_0x40cb66);}return _0x54f20c[_0x0791('0x10')](0x194);};}function handleError(_0x7c4113,_0x34ea19){_0x34ea19=_0x34ea19||0x1f4;return function(_0x3f66da){logger[_0x0791('0xc')](_0x3f66da[_0x0791('0x11')]);if(_0x3f66da[_0x0791('0x12')]){delete _0x3f66da[_0x0791('0x12')];}_0x7c4113[_0x0791('0x13')](_0x34ea19)[_0x0791('0x14')](_0x3f66da);};}function findById(_0x5657d5){return function(_0x39d2b9){if(!_['isNil'](_0x5657d5)&&!_[_0x0791('0x15')](_0x39d2b9)&&!_[_0x0791('0x15')](_0x39d2b9[_0x0791('0x16')])){return _['find'](_0x39d2b9[_0x0791('0x16')],function(_0x1b42e1){return _0x1b42e1['id']==_0x5657d5;});}return null;};}exports[_0x0791('0x17')]=function(_0x26ff40,_0x211d90){return respondWithRpcPromise(_0x0791('0x18'),_0x26ff40['query'])[_0x0791('0xb')](respondWithResult(_0x211d90,null))[_0x0791('0xf')](handleError(_0x211d90,null));};exports['voiceChannelMixMonitor']=function(_0x3e3708,_0xd922d3){return respondWithRpcPromise(_0x0791('0x19'),_[_0x0791('0x1a')](_0x3e3708[_0x0791('0x1b')],_0x3e3708[_0x0791('0x1c')]))[_0x0791('0xb')](respondWithResult(_0xd922d3,null))[_0x0791('0xf')](handleError(_0xd922d3,null));};exports[_0x0791('0x1d')]=function(_0x281f61,_0x41135e){return respondWithRpcPromise(_0x0791('0x1e'),_[_0x0791('0x1a')](_0x281f61['query'],_0x281f61[_0x0791('0x1c')]))[_0x0791('0xb')](respondWithResult(_0x41135e,null))[_0x0791('0xf')](handleError(_0x41135e,null));};exports[_0x0791('0x1f')]=function(_0x5116b5,_0xe4bb55){return respondWithRpcPromise('VoiceQueues',_0x5116b5['query'])[_0x0791('0xb')](respondWithResult(_0xe4bb55,null))[_0x0791('0xf')](handleError(_0xe4bb55,null));};exports[_0x0791('0x20')]=function(_0x35a48f,_0x308c7a){return respondWithRpcPromise(_0x0791('0x21'),_0x35a48f[_0x0791('0x1b')])[_0x0791('0xb')](findById(_0x35a48f[_0x0791('0x1c')]['id']))[_0x0791('0xb')](respondWithResult(_0x308c7a,null))[_0x0791('0xf')](handleError(_0x308c7a,null));};exports[_0x0791('0x22')]=function(_0x503309,_0x163a6d){return respondWithRpcPromise(_0x0791('0x23'),_[_0x0791('0x1a')](_0x503309[_0x0791('0x24')],_0x503309[_0x0791('0x1c')]))[_0x0791('0xb')](respondWithResult(_0x163a6d,null))['catch'](handleError(_0x163a6d,null));};exports[_0x0791('0x25')]=function(_0x2aad42,_0x411d63){return respondWithRpcPromise('VoiceQueuesPreview',_['merge'](_0x2aad42[_0x0791('0x1b')],_0x2aad42[_0x0791('0x1c')]))[_0x0791('0xb')](respondWithResult(_0x411d63,null))[_0x0791('0xf')](handleError(_0x411d63,null));};exports[_0x0791('0x26')]=function(_0x2763c3,_0x22dbf6){return respondWithRpcPromise('VoiceQueuesChannels',_0x2763c3[_0x0791('0x1b')])['then'](respondWithResult(_0x22dbf6,null))['catch'](handleError(_0x22dbf6,null));};exports[_0x0791('0x27')]=function(_0x779d43,_0x5cffbe){return respondWithRpcPromise(_0x0791('0x28'),_[_0x0791('0x1a')](_0x779d43[_0x0791('0x1b')],_0x779d43[_0x0791('0x1c')]))[_0x0791('0xb')](respondWithResult(_0x5cffbe,null))[_0x0791('0xf')](handleError(_0x5cffbe,null));};exports[_0x0791('0x29')]=function(_0xd0615e,_0x280e9d){return respondWithRpcPromise(_0x0791('0x2a'),_['merge'](_0xd0615e['query'],_0xd0615e[_0x0791('0x1c')]))[_0x0791('0xb')](respondWithResult(_0x280e9d,null))[_0x0791('0xf')](handleError(_0x280e9d,null));};exports[_0x0791('0x2b')]=function(_0x3162d8,_0x20009f){return respondWithRpcPromise(_0x0791('0x2c'),_['merge'](_0x3162d8[_0x0791('0x1b')],_0x3162d8['params']))[_0x0791('0xb')](respondWithResult(_0x20009f,null))['catch'](handleError(_0x20009f,null));};exports['outbound']=function(_0x494639,_0x1a7e09){return respondWithRpcPromise(_0x0791('0x2d'),_0x494639[_0x0791('0x1b')])[_0x0791('0xb')](respondWithResult(_0x1a7e09,null))[_0x0791('0xf')](handleError(_0x1a7e09,null));};exports['outboundChannels']=function(_0x481b0b,_0x1f670b){return respondWithRpcPromise(_0x0791('0x2e'),_0x481b0b[_0x0791('0x1b')])['then'](respondWithResult(_0x1f670b,null))[_0x0791('0xf')](handleError(_0x1f670b,null));};exports[_0x0791('0x2f')]=function(_0x5a833e,_0x28bcf4){var _0x2fcc7b;return respondWithRpcPromise(_0x0791('0x30'),_0x5a833e[_0x0791('0x1b')])[_0x0791('0xb')](function(_0x3f38a5){_0x2fcc7b=_0x3f38a5;return respondWithRpcPromise(_0x0791('0x30'),_0x5a833e[_0x0791('0x1b')],routingClient);})[_0x0791('0xb')](function(_0x95a8aa){return _['merge']({},_0x95a8aa,_0x2fcc7b);})[_0x0791('0xb')](respondWithResult(_0x28bcf4,null))[_0x0791('0xf')](handleError(_0x28bcf4,null));};exports[_0x0791('0x31')]=function(_0x580fc0,_0x16f9e8){if(_0x580fc0[_0x0791('0x24')]&&_0x580fc0[_0x0791('0x24')]['interaction']&&_0x580fc0['user']&&_0x580fc0['user'][_0x0791('0x12')]){for(var _0x4eee80 in _0x580fc0[_0x0791('0x24')]['interaction']){if(_0x580fc0[_0x0791('0x24')][_0x0791('0x32')][_0x0791('0x33')](_0x4eee80)){db[_0x0791('0x34')][_0x0791('0x35')]({'where':{'channel':_0x4eee80,'membername':_0x580fc0[_0x0791('0x36')][_0x0791('0x12')],'type':_0x0791('0x37'),'exitAt':null,'uniqueid':_0x580fc0[_0x0791('0x24')]['interaction'][_0x4eee80]&&_0x580fc0['body'][_0x0791('0x32')][_0x4eee80][_0x0791('0x38')]?{'$notIn':_0x580fc0[_0x0791('0x24')][_0x0791('0x32')][_0x4eee80]}:{'$ne':null}}})[_0x0791('0xb')](function(_0x14b610){var _0x26c3e0=moment()['format']('YYYY-MM-DD\x20HH:mm:ss');for(var _0xa6a4ee=0x0,_0x7c4f9b=_0x14b610[_0x0791('0x38')];_0xa6a4ee<_0x7c4f9b;_0xa6a4ee+=0x1){_0x14b610[_0xa6a4ee][_0x0791('0x39')]({'exitAt':_0x26c3e0});}});for(var _0x55c177=0x0;_0x55c177<_0x580fc0[_0x0791('0x24')]['interaction'][_0x4eee80][_0x0791('0x38')];_0x55c177+=0x1){db[_0x0791('0x34')][_0x0791('0x3a')]({'where':{'channel':_0x4eee80,'membername':_0x580fc0[_0x0791('0x36')][_0x0791('0x12')],'type':_0x0791('0x37'),'uniqueid':_0x580fc0['body'][_0x0791('0x32')][_0x4eee80][_0x55c177],'exitAt':null},'defaults':{'channel':_0x4eee80,'membername':_0x580fc0[_0x0791('0x36')][_0x0791('0x12')],'interface':_[_0x0791('0x15')](_0x580fc0[_0x0791('0x36')][_0x0791('0x3b')])?util['format'](_0x0791('0x3c'),_0x580fc0[_0x0791('0x36')][_0x0791('0x12')]):_0x580fc0[_0x0791('0x36')][_0x0791('0x3b')],'type':_0x0791('0x37'),'enterAt':moment()[_0x0791('0x3d')](_0x0791('0x3e')),'role':_0x0791('0x3f'),'internal':_0x580fc0[_0x0791('0x36')]['internal'],'uniqueid':_0x580fc0[_0x0791('0x24')][_0x0791('0x32')][_0x4eee80][_0x55c177]}});}}}}return respondWithRpcPromise(_0x0791('0x40'),{'id':_0x580fc0[_0x0791('0x1c')]['id'],'capacity':_0x580fc0[_0x0791('0x24')]['capacity']},routingClient)[_0x0791('0xb')](respondWithResult(_0x16f9e8,null))[_0x0791('0xf')](handleError(_0x16f9e8,null));};exports[_0x0791('0x41')]=function(_0x4b287b,_0x298288){return respondWithRpcPromise(_0x0791('0x42'),_0x4b287b[_0x0791('0x1b')])['then'](respondWithResult(_0x298288,null))[_0x0791('0xf')](handleError(_0x298288,null));};exports['trunks']=function(_0x366d14,_0x242825){return respondWithRpcPromise(_0x0791('0x43'),_0x366d14[_0x0791('0x1b')])['then'](respondWithResult(_0x242825,null))[_0x0791('0xf')](handleError(_0x242825,null));};exports[_0x0791('0x44')]=function(_0x5842ce,_0x19a36c){return respondWithRpcPromise('Campaigns',_0x5842ce[_0x0791('0x1b')])['then'](respondWithResult(_0x19a36c,null))[_0x0791('0xf')](handleError(_0x19a36c,null));};exports[_0x0791('0x45')]=function(_0x3b0a2b,_0xd2fb66){return respondWithRpcPromise(_0x0791('0x46'),_0x3b0a2b[_0x0791('0x1b')],routingClient)['then'](respondWithResult(_0xd2fb66,null))[_0x0791('0xf')](handleError(_0xd2fb66,null));};exports[_0x0791('0x47')]=function(_0x593db3,_0x577b1e){return respondWithRpcPromise('ChatQueues',_0x593db3[_0x0791('0x1b')],routingClient)[_0x0791('0xb')](findById(_0x593db3['params']['id']))['then'](respondWithResult(_0x577b1e,null))[_0x0791('0xf')](handleError(_0x577b1e,null));};exports['mailQueues']=function(_0x56f461,_0x16677c){return respondWithRpcPromise('MailQueues',_0x56f461['query'],routingClient)[_0x0791('0xb')](respondWithResult(_0x16677c,null))[_0x0791('0xf')](handleError(_0x16677c,null));};exports[_0x0791('0x48')]=function(_0x2c0bdd,_0x2a71bb){return respondWithRpcPromise('MailQueues',_0x2c0bdd[_0x0791('0x1b')],routingClient)['then'](findById(_0x2c0bdd[_0x0791('0x1c')]['id']))[_0x0791('0xb')](respondWithResult(_0x2a71bb,null))['catch'](handleError(_0x2a71bb,null));};exports['mailAccounts']=function(_0x1811aa,_0x31a14b){return respondWithRpcPromise(_0x0791('0x49'),_0x1811aa[_0x0791('0x1b')],mailClient)[_0x0791('0xb')](respondWithResult(_0x31a14b,null))[_0x0791('0xf')](handleError(_0x31a14b,null));};exports['openchannelQueues']=function(_0x37448f,_0x58a4c1){return respondWithRpcPromise(_0x0791('0x4a'),_0x37448f['query'],routingClient)[_0x0791('0xb')](respondWithResult(_0x58a4c1,null))[_0x0791('0xf')](handleError(_0x58a4c1,null));};exports[_0x0791('0x4b')]=function(_0x17dc4f,_0x23f2a5){return respondWithRpcPromise(_0x0791('0x4a'),_0x17dc4f['query'],routingClient)[_0x0791('0xb')](findById(_0x17dc4f[_0x0791('0x1c')]['id']))[_0x0791('0xb')](respondWithResult(_0x23f2a5,null))[_0x0791('0xf')](handleError(_0x23f2a5,null));};exports[_0x0791('0x4c')]=function(_0x326c8c,_0x5131bc){return respondWithRpcPromise(_0x0791('0x4d'),_0x326c8c[_0x0791('0x1b')],routingClient)[_0x0791('0xb')](respondWithResult(_0x5131bc,null))[_0x0791('0xf')](handleError(_0x5131bc,null));};exports[_0x0791('0x4e')]=function(_0x55397d,_0x5f2c76){return respondWithRpcPromise(_0x0791('0x4d'),_0x55397d[_0x0791('0x1b')],routingClient)[_0x0791('0xb')](findById(_0x55397d[_0x0791('0x1c')]['id']))[_0x0791('0xb')](respondWithResult(_0x5f2c76,null))[_0x0791('0xf')](handleError(_0x5f2c76,null));};exports[_0x0791('0x4f')]=function(_0x21b9b3,_0x1b58d7){return respondWithRpcPromise(_0x0791('0x50'),_0x21b9b3['query'],routingClient)['then'](respondWithResult(_0x1b58d7,null))[_0x0791('0xf')](handleError(_0x1b58d7,null));};exports[_0x0791('0x51')]=function(_0x4cf721,_0x15e625){return respondWithRpcPromise(_0x0791('0x50'),_0x4cf721[_0x0791('0x1b')],routingClient)[_0x0791('0xb')](findById(_0x4cf721[_0x0791('0x1c')]['id']))[_0x0791('0xb')](respondWithResult(_0x15e625,null))[_0x0791('0xf')](handleError(_0x15e625,null));};exports[_0x0791('0x52')]=function(_0x1ecf35,_0x178202){return respondWithRpcPromise(_0x0791('0x53'),_0x1ecf35['query'],routingClient)[_0x0791('0xb')](respondWithResult(_0x178202,null))[_0x0791('0xf')](handleError(_0x178202,null));};exports['showFaxQueues']=function(_0x4c918f,_0x3c4d7d){return respondWithRpcPromise(_0x0791('0x53'),_0x4c918f[_0x0791('0x1b')],routingClient)['then'](findById(_0x4c918f[_0x0791('0x1c')]['id']))[_0x0791('0xb')](respondWithResult(_0x3c4d7d,null))[_0x0791('0xf')](handleError(_0x3c4d7d,null));};exports[_0x0791('0x54')]=function(_0x16cb00,_0x366d8e){return respondWithRpcPromise(_0x0791('0x55'),_0x16cb00[_0x0791('0x1b')])[_0x0791('0xb')](respondWithResult(_0x366d8e,null))[_0x0791('0xf')](handleError(_0x366d8e,null));};exports[_0x0791('0x56')]=function(_0x42579f,_0x506085){return respondWithRpcPromise(_0x0791('0x57'),_0x42579f[_0x0791('0x1b')],routingClient)[_0x0791('0xb')](respondWithResult(_0x506085,null))[_0x0791('0xf')](handleError(_0x506085,null));};exports[_0x0791('0x58')]=function(_0x3f56a1,_0x4b535f){return respondWithRpcPromise(_0x0791('0x59'),_0x3f56a1[_0x0791('0x1b')],routingClient)[_0x0791('0xb')](respondWithResult(_0x4b535f,null))[_0x0791('0xf')](handleError(_0x4b535f,null));};exports[_0x0791('0x5a')]=function(_0x363d72,_0x2dc66c){return respondWithRpcPromise(_0x0791('0x5b'),_0x363d72[_0x0791('0x1b')],routingClient)[_0x0791('0xb')](respondWithResult(_0x2dc66c,null))[_0x0791('0xf')](handleError(_0x2dc66c,null));};exports[_0x0791('0x5c')]=function(_0x25c2c0,_0x14fd9e){return respondWithRpcPromise(_0x0791('0x5b'),_0x25c2c0[_0x0791('0x1b')],routingClient)[_0x0791('0xb')](function(_0xdd26e9){if(_0x25c2c0[_0x0791('0x1b')][_0x0791('0x5d')]!==undefined){var _0x3f33b7=_(_0xdd26e9[_0x0791('0x16')])[_0x0791('0x5e')]([_0x25c2c0[_0x0791('0x1b')][_0x0791('0x5d')],_0x25c2c0[_0x0791('0x1c')]['id']])[_0x0791('0x5f')](_0x0791('0x60'))[_0x0791('0x61')]()[_0x0791('0x62')]();return _0xdd26e9['rows'][_0x0791('0x5e')](function(_0x2097ed){return _0x3f33b7[_0x0791('0x63')](_0x2097ed[_0x0791('0x60')])>-0x1;});}else{return _0xdd26e9['rows'][_0x0791('0x5e')](function(_0x7fc6b2){return _0x7fc6b2[_0x0791('0x60')]===parseInt(_0x25c2c0[_0x0791('0x1c')]['id']);});}})['then'](respondWithResult(_0x14fd9e,null))[_0x0791('0xf')](handleError(_0x14fd9e,null));};exports[_0x0791('0x64')]=function(_0x2e333e,_0x5e64a3){return respondWithRpcPromise(_0x0791('0x65'),_0x2e333e['query'],routingClient)['then'](respondWithResult(_0x5e64a3,null))[_0x0791('0xf')](handleError(_0x5e64a3,null));};exports[_0x0791('0x66')]=function(_0x3a1c8e,_0x2ef4c3){return respondWithRpcPromise(_0x0791('0x67'),_0x3a1c8e[_0x0791('0x1b')],routingClient)[_0x0791('0xb')](respondWithResult(_0x2ef4c3,null))[_0x0791('0xf')](handleError(_0x2ef4c3,null));};exports['faxQueuesWaitingInteractions']=function(_0x560beb,_0x3cbeba){return respondWithRpcPromise(_0x0791('0x68'),_0x560beb[_0x0791('0x1b')],routingClient)[_0x0791('0xb')](respondWithResult(_0x3cbeba,null))[_0x0791('0xf')](handleError(_0x3cbeba,null));};exports[_0x0791('0x69')]=function(_0x3ad09a){return function(_0x44627e,_0x1ee09b){var _0x37de6b,_0x28a14a;var _0x1b4ffe=_[_0x0791('0x6a')](_0x3ad09a);var _0x37cac7=_0x3ad09a===_0x0791('0x6b')?_0x0791('0x6c'):'Account';return db[_0x1b4ffe+_0x0791('0x6d')]['findOne']({'raw':!![],'where':{'id':_0x44627e[_0x0791('0x1c')]['id']}})['then'](function(_0x1738c9){if(_[_0x0791('0x15')](_0x1738c9)){throw new Error(_0x1b4ffe+'\x20Queue\x20not\x20found');}_0x37de6b=_0x1738c9;return db[_0x1b4ffe+'Message'][_0x0791('0x6e')]({'where':{'id':_0x44627e[_0x0791('0x24')][_0x0791('0x6f')]},'include':[{'model':db[_0x1b4ffe+_0x0791('0x70')],'as':'Interaction'},{'model':db[_0x1b4ffe+_0x37cac7],'as':_0x0791('0x71')}]});})[_0x0791('0xb')](function(_0x2db8b2){if(_[_0x0791('0x15')](_0x2db8b2)){throw new Error(_0x1b4ffe+_0x0791('0x72'));}_0x28a14a=_0x2db8b2;return _0x2db8b2[_0x0791('0x73')]({'read':0x0,'readAt':null,'UserId':null});})[_0x0791('0xb')](function(){var _0x421511={'uniqueid':_0x3ad09a+'.'+_0x28a14a['id']+'.'+_0x28a14a[_0x0791('0x70')]['id'],'FromUserId':_0x44627e['user']['id'],'type':_0x0791('0x74')};_0x421511[_0x1b4ffe+'MessageId']=_0x28a14a['id'];_0x421511[_0x1b4ffe+_0x0791('0x75')]=_0x28a14a[_0x0791('0x70')]['id'];_0x421511['From'+_0x1b4ffe+_0x37cac7+'Id']=_0x28a14a[_0x0791('0x71')]['id'];_0x421511['To'+_0x1b4ffe+_0x0791('0x76')]=_0x37de6b['id'];return db[_0x1b4ffe+_0x0791('0x77')][_0x0791('0x78')](_0x421511);})['then'](function(){return respondWithRpcPromise(_0x0791('0x79'),{'channel':_0x3ad09a,'interaction':_0x28a14a[_0x0791('0x70')],'message':_0x28a14a,'account':_0x28a14a[_0x0791('0x71')],'applications':[{'id':0x0,'priority':0x1,'app':_0x0791('0x74'),'appdata':_0x37de6b[_0x0791('0x12')]+','+(_0x28a14a[_0x0791('0x71')]['queueTransferTimeout']||0x12c),'interval':_0x0791('0x7a')}]},routingClient);})[_0x0791('0xb')](respondWithResult(_0x1ee09b,null))[_0x0791('0xf')](handleError(_0x1ee09b,null));};};exports[_0x0791('0x7b')]=function(_0xfad8d8,_0x22db67){var _0x17d32e,_0x56427d;if(_[_0x0791('0x15')](_0xfad8d8['body'][_0x0791('0x7c')])){throw new Error(_0x0791('0x7d'));}var _0x29d2a7=_0xfad8d8[_0x0791('0x24')][_0x0791('0x7c')];var _0x316d47=_[_0x0791('0x6a')](_0x29d2a7);var _0x5067ee=_0x29d2a7===_0x0791('0x6b')?_0x0791('0x6c'):_0x0791('0x71');return db[_0x0791('0x7e')]['findOne']({'raw':!![],'where':{'id':_0xfad8d8['params']['id'],'role':_0x0791('0x3f')}})[_0x0791('0xb')](function(_0x3f98ef){if(_[_0x0791('0x15')](_0x3f98ef)){throw new Error('Agent\x20not\x20found');}_0x17d32e=_0x3f98ef;return db[_0x316d47+_0x0791('0x7f')][_0x0791('0x6e')]({'where':{'id':_0xfad8d8[_0x0791('0x24')][_0x0791('0x6f')]},'include':[{'model':db[_0x316d47+_0x0791('0x70')],'as':_0x0791('0x70')},{'model':db[_0x316d47+_0x5067ee],'as':_0x0791('0x71')}]});})[_0x0791('0xb')](function(_0x5e1d9f){if(_['isNil'](_0x5e1d9f)){throw new Error(_0x316d47+_0x0791('0x72'));}_0x56427d=_0x5e1d9f;return _0x5e1d9f[_0x0791('0x73')]({'read':0x0,'readAt':null,'UserId':null});})['then'](function(){var _0x38a811={'uniqueid':_0x29d2a7+'.'+_0x56427d['id']+'.'+_0x56427d[_0x0791('0x70')]['id'],'FromUserId':_0xfad8d8[_0x0791('0x36')]['id'],'type':'agent','ToUserId':_0x17d32e['id']};_0x38a811[_0x316d47+_0x0791('0x80')]=_0x56427d['id'];_0x38a811[_0x316d47+_0x0791('0x75')]=_0x56427d[_0x0791('0x70')]['id'];_0x38a811[_0x0791('0x81')+_0x316d47+_0x5067ee+'Id']=_0x56427d[_0x0791('0x71')]['id'];return db[_0x316d47+_0x0791('0x77')][_0x0791('0x78')](_0x38a811);})['then'](function(){return respondWithRpcPromise(_0x0791('0x79'),{'channel':_0x29d2a7,'interaction':_0x56427d[_0x0791('0x70')],'message':_0x56427d,'account':_0x56427d[_0x0791('0x71')],'applications':[{'id':0x0,'priority':0x1,'app':_0x0791('0x3f'),'appdata':_0x17d32e[_0x0791('0x12')]+','+(_0x56427d['Account'][_0x0791('0x82')]||0x12c),'interval':_0x0791('0x7a')}]},routingClient);})[_0x0791('0xb')](respondWithResult(_0x22db67,null))['catch'](handleError(_0x22db67,null));}; \ No newline at end of file diff --git a/server/api/schedule/index.js b/server/api/schedule/index.js index 84914b4..652fce7 100644 --- a/server/api/schedule/index.js +++ b/server/api/schedule/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x541a=['put','/:id','update','delete','destroy','exports','connect-timeout','express','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','./schedule.controller','get','index','show','/:id/run','isAuthenticated','run','post'];(function(_0x5925c2,_0x5597a7){var _0x3abdae=function(_0xf220f5){while(--_0xf220f5){_0x5925c2['push'](_0x5925c2['shift']());}};_0x3abdae(++_0x5597a7);}(_0x541a,0x1d2));var _0xa541=function(_0xab5f15,_0x5c1860){_0xab5f15=_0xab5f15-0x0;var _0x56290a=_0x541a[_0xab5f15];return _0x56290a;};'use strict';var multer=require('multer');var util=require('util');var path=require('path');var timeout=require(_0xa541('0x0'));var express=require(_0xa541('0x1'));var router=express['Router']();var fs_extra=require(_0xa541('0x2'));var auth=require(_0xa541('0x3'));var interaction=require(_0xa541('0x4'));var config=require(_0xa541('0x5'));var controller=require(_0xa541('0x6'));router[_0xa541('0x7')]('/',auth['isAuthenticated'](),controller[_0xa541('0x8')]);router[_0xa541('0x7')]('/:id',auth['isAuthenticated'](),controller[_0xa541('0x9')]);router[_0xa541('0x7')](_0xa541('0xa'),auth[_0xa541('0xb')](),controller[_0xa541('0xc')]);router[_0xa541('0xd')]('/',auth[_0xa541('0xb')](),controller['create']);router[_0xa541('0xe')](_0xa541('0xf'),auth[_0xa541('0xb')](),controller[_0xa541('0x10')]);router[_0xa541('0x11')]('/:id',auth[_0xa541('0xb')](),controller[_0xa541('0x12')]);module[_0xa541('0x13')]=router; \ No newline at end of file +var _0xa84d=['create','put','update','destroy','exports','multer','util','path','connect-timeout','express','Router','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','./schedule.controller','get','/:id','isAuthenticated','show','run','post'];(function(_0x5b674f,_0x4beb57){var _0x357c43=function(_0x49f4c0){while(--_0x49f4c0){_0x5b674f['push'](_0x5b674f['shift']());}};_0x357c43(++_0x4beb57);}(_0xa84d,0xb5));var _0xda84=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0xa84d[_0x3dd15e];return _0x231fd0;};'use strict';var multer=require(_0xda84('0x0'));var util=require(_0xda84('0x1'));var path=require(_0xda84('0x2'));var timeout=require(_0xda84('0x3'));var express=require(_0xda84('0x4'));var router=express[_0xda84('0x5')]();var fs_extra=require(_0xda84('0x6'));var auth=require(_0xda84('0x7'));var interaction=require(_0xda84('0x8'));var config=require(_0xda84('0x9'));var controller=require(_0xda84('0xa'));router['get']('/',auth['isAuthenticated'](),controller['index']);router[_0xda84('0xb')](_0xda84('0xc'),auth[_0xda84('0xd')](),controller[_0xda84('0xe')]);router['get']('/:id/run',auth[_0xda84('0xd')](),controller[_0xda84('0xf')]);router[_0xda84('0x10')]('/',auth[_0xda84('0xd')](),controller[_0xda84('0x11')]);router[_0xda84('0x12')]('/:id',auth[_0xda84('0xd')](),controller[_0xda84('0x13')]);router['delete']('/:id',auth['isAuthenticated'](),controller[_0xda84('0x14')]);module[_0xda84('0x15')]=router; \ No newline at end of file diff --git a/server/api/schedule/schedule.attributes.js b/server/api/schedule/schedule.attributes.js index 8efdc9d..a30fd12 100644 --- a/server/api/schedule/schedule.attributes.js +++ b/server/api/schedule/schedule.attributes.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xecf7=['DATE','ENUM','quarters','months','weeks','days','hours','minutes','csv','pdf','xlsx','custom','default','TEXT','sequelize','exports','STRING','BOOLEAN','0\x200\x20*\x20*\x20*'];(function(_0x5eadd2,_0x4ee391){var _0xb80d47=function(_0x332410){while(--_0x332410){_0x5eadd2['push'](_0x5eadd2['shift']());}};_0xb80d47(++_0x4ee391);}(_0xecf7,0x13e));var _0x7ecf=function(_0x45d3f0,_0x4be53f){_0x45d3f0=_0x45d3f0-0x0;var _0x314b79=_0xecf7[_0x45d3f0];return _0x314b79;};'use strict';var Sequelize=require(_0x7ecf('0x0'));module[_0x7ecf('0x1')]={'name':{'type':Sequelize[_0x7ecf('0x2')],'allowNull':![]},'description':{'type':Sequelize['STRING']},'active':{'type':Sequelize[_0x7ecf('0x3')],'allowNull':![],'defaultValue':![]},'cron':{'type':Sequelize['STRING'],'allowNull':![],'defaultValue':_0x7ecf('0x4')},'startAt':{'type':Sequelize[_0x7ecf('0x5')],'allowNull':![]},'endAt':{'type':Sequelize[_0x7ecf('0x5')],'allowNull':![]},'subtractNumber':{'type':Sequelize['INTEGER'],'allowNull':![],'defaultValue':0x1,'validate':{'min':0x1}},'subtractUnit':{'type':Sequelize[_0x7ecf('0x6')]('years',_0x7ecf('0x7'),_0x7ecf('0x8'),_0x7ecf('0x9'),_0x7ecf('0xa'),_0x7ecf('0xb'),_0x7ecf('0xc')),'allowNull':![],'defaultValue':_0x7ecf('0xa')},'output':{'type':Sequelize[_0x7ecf('0x6')](_0x7ecf('0xd'),_0x7ecf('0xe'),_0x7ecf('0xf')),'allowNull':![],'defaultValue':_0x7ecf('0xd')},'type':{'type':Sequelize[_0x7ecf('0x6')](_0x7ecf('0x10'),_0x7ecf('0x11')),'allowNull':![],'defaultValue':'custom'},'sendMail':{'type':Sequelize[_0x7ecf('0x3')],'defaultValue':![]},'email':{'type':Sequelize[_0x7ecf('0x2')]},'cc':{'type':Sequelize[_0x7ecf('0x12')]},'bcc':{'type':Sequelize[_0x7ecf('0x12')]},'sendIfEmpty':{'type':Sequelize[_0x7ecf('0x3')],'defaultValue':!![]}}; \ No newline at end of file +var _0x2b14=['months','weeks','days','hours','minutes','csv','pdf','default','custom','TEXT','sequelize','exports','STRING','BOOLEAN','DATE','INTEGER','ENUM','years','quarters'];(function(_0x38537f,_0x252124){var _0x141e23=function(_0x2809b5){while(--_0x2809b5){_0x38537f['push'](_0x38537f['shift']());}};_0x141e23(++_0x252124);}(_0x2b14,0x114));var _0x42b1=function(_0x2f620e,_0x29a447){_0x2f620e=_0x2f620e-0x0;var _0x35c6cc=_0x2b14[_0x2f620e];return _0x35c6cc;};'use strict';var Sequelize=require(_0x42b1('0x0'));module[_0x42b1('0x1')]={'name':{'type':Sequelize[_0x42b1('0x2')],'allowNull':![]},'description':{'type':Sequelize[_0x42b1('0x2')]},'active':{'type':Sequelize[_0x42b1('0x3')],'allowNull':![],'defaultValue':![]},'cron':{'type':Sequelize[_0x42b1('0x2')],'allowNull':![],'defaultValue':'0\x200\x20*\x20*\x20*'},'startAt':{'type':Sequelize[_0x42b1('0x4')],'allowNull':![]},'endAt':{'type':Sequelize['DATE'],'allowNull':![]},'subtractNumber':{'type':Sequelize[_0x42b1('0x5')],'allowNull':![],'defaultValue':0x1,'validate':{'min':0x1}},'subtractUnit':{'type':Sequelize[_0x42b1('0x6')](_0x42b1('0x7'),_0x42b1('0x8'),_0x42b1('0x9'),_0x42b1('0xa'),_0x42b1('0xb'),_0x42b1('0xc'),_0x42b1('0xd')),'allowNull':![],'defaultValue':_0x42b1('0xb')},'output':{'type':Sequelize['ENUM'](_0x42b1('0xe'),_0x42b1('0xf'),'xlsx'),'allowNull':![],'defaultValue':_0x42b1('0xe')},'type':{'type':Sequelize[_0x42b1('0x6')]('custom',_0x42b1('0x10')),'allowNull':![],'defaultValue':_0x42b1('0x11')},'sendMail':{'type':Sequelize[_0x42b1('0x3')],'defaultValue':![]},'email':{'type':Sequelize[_0x42b1('0x2')]},'cc':{'type':Sequelize[_0x42b1('0x12')]},'bcc':{'type':Sequelize[_0x42b1('0x12')]},'sendIfEmpty':{'type':Sequelize[_0x42b1('0x3')],'defaultValue':!![]}}; \ No newline at end of file diff --git a/server/api/schedule/schedule.controller.js b/server/api/schedule/schedule.controller.js index cc220fe..aa814a3 100644 --- a/server/api/schedule/schedule.controller.js +++ b/server/api/schedule/schedule.controller.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x2efb=['length','nolimit','order','sort','where','pick','filter','merge','VIRTUAL','options','includeAll','include','findAll','rows','catch','show','keys','rawAttributes','find','create','user','UserProfileSection','userProfileId','autoAssociation','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','body','params','run','../../config/schedule','eml-format','rimraf','zip-dir','request-promise','moment','bluebird','mustache','util','sox','to-csv','ejs','fs-extra','lodash','jsforce','desk.js','papaparse','ioredis','../../components/parsers/qs','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../config/license/util','status','end','json','offset','undefined','limit','count','set','apply','reject','save','update','then','get','Scheduler','UserProfileResource','destroy','stack','name','send','index','map','Schedule','fieldName','type','key','model','query','filters','intersection','attributes','fields'];(function(_0x321bb2,_0x202794){var _0x9c12ed=function(_0x263dd3){while(--_0x263dd3){_0x321bb2['push'](_0x321bb2['shift']());}};_0x9c12ed(++_0x202794);}(_0x2efb,0x1c6));var _0xb2ef=function(_0xfafae6,_0x89be47){_0xfafae6=_0xfafae6-0x0;var _0x94ac93=_0x2efb[_0xfafae6];return _0x94ac93;};'use strict';var emlformat=require(_0xb2ef('0x0'));var rimraf=require(_0xb2ef('0x1'));var zipdir=require(_0xb2ef('0x2'));var jsonpatch=require('fast-json-patch');var rp=require(_0xb2ef('0x3'));var moment=require(_0xb2ef('0x4'));var BPromise=require(_0xb2ef('0x5'));var Mustache=require(_0xb2ef('0x6'));var util=require(_0xb2ef('0x7'));var path=require('path');var sox=require(_0xb2ef('0x8'));var csv=require(_0xb2ef('0x9'));var ejs=require(_0xb2ef('0xa'));var fs=require('fs');var fs_extra=require(_0xb2ef('0xb'));var _=require(_0xb2ef('0xc'));var squel=require('squel');var crypto=require('crypto');var jsforce=require(_0xb2ef('0xd'));var deskjs=require(_0xb2ef('0xe'));var toCsv=require(_0xb2ef('0x9'));var querystring=require('querystring');var Papa=require(_0xb2ef('0xf'));var Redis=require(_0xb2ef('0x10'));var authService=require('../../components/auth/service');var qs=require(_0xb2ef('0x11'));var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0xb2ef('0x12'));var logger=require(_0xb2ef('0x13'))(_0xb2ef('0x14'));var utils=require(_0xb2ef('0x15'));var config=require(_0xb2ef('0x16'));var licenseUtil=require(_0xb2ef('0x17'));var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0x456425,_0x32b779){_0x32b779=_0x32b779||0xcc;return function(_0x2bf731){if(_0x2bf731){return _0x456425['sendStatus'](_0x32b779);}return _0x456425[_0xb2ef('0x18')](_0x32b779)[_0xb2ef('0x19')]();};}function respondWithResult(_0x4a9cc3,_0x43e654){_0x43e654=_0x43e654||0xc8;return function(_0x3d94d6){if(_0x3d94d6){return _0x4a9cc3['status'](_0x43e654)[_0xb2ef('0x1a')](_0x3d94d6);}};}function respondWithFilteredResult(_0x594a7e,_0x5b75a2){return function(_0x15750b){if(_0x15750b){var _0x2778b6=typeof _0x5b75a2[_0xb2ef('0x1b')]===_0xb2ef('0x1c')&&typeof _0x5b75a2[_0xb2ef('0x1d')]==='undefined';var _0x54bf4a=_0x15750b[_0xb2ef('0x1e')];var _0x18c4a9=_0x2778b6?0x0:_0x5b75a2['offset'];var _0x1f15ac=_0x2778b6?_0x15750b['count']:_0x5b75a2[_0xb2ef('0x1b')]+_0x5b75a2['limit'];var _0x485852;if(_0x1f15ac>=_0x54bf4a){_0x1f15ac=_0x54bf4a;_0x485852=0xc8;}else{_0x485852=0xce;}_0x594a7e[_0xb2ef('0x18')](_0x485852);return _0x594a7e[_0xb2ef('0x1f')]('Content-Range',_0x18c4a9+'-'+_0x1f15ac+'/'+_0x54bf4a)[_0xb2ef('0x1a')](_0x15750b);}return null;};}function patchUpdates(_0x475eba){return function(_0x209f83){try{jsonpatch[_0xb2ef('0x20')](_0x209f83,_0x475eba,!![]);}catch(_0x7de3f6){return BPromise[_0xb2ef('0x21')](_0x7de3f6);}return _0x209f83[_0xb2ef('0x22')]();};}function saveUpdates(_0x2f4fb7,_0x115e13){return function(_0x49d709){if(_0x49d709){return _0x49d709[_0xb2ef('0x23')](_0x2f4fb7)[_0xb2ef('0x24')](function(_0x451ff0){return _0x451ff0;});}return null;};}function removeEntity(_0x3d31f1,_0x1296c5){return function(_0x25ce36){if(_0x25ce36){return _0x25ce36['destroy']()[_0xb2ef('0x24')](function(){var _0x268d8a=_0x25ce36[_0xb2ef('0x25')]({'plain':!![]});var _0x320bd3=_0xb2ef('0x26');return db[_0xb2ef('0x27')][_0xb2ef('0x28')]({'where':{'type':_0x320bd3,'resourceId':_0x268d8a['id']}})[_0xb2ef('0x24')](function(){return _0x25ce36;});})[_0xb2ef('0x24')](function(){_0x3d31f1['status'](0xcc)['end']();});}};}function handleEntityNotFound(_0x549d8a,_0x579514){return function(_0x3f1376){if(!_0x3f1376){_0x549d8a['sendStatus'](0x194);}return _0x3f1376;};}function handleError(_0x364f6d,_0x833fe3){_0x833fe3=_0x833fe3||0x1f4;return function(_0x136096){logger['error'](_0x136096[_0xb2ef('0x29')]);if(_0x136096[_0xb2ef('0x2a')]){delete _0x136096['name'];}_0x364f6d[_0xb2ef('0x18')](_0x833fe3)[_0xb2ef('0x2b')](_0x136096);};}exports[_0xb2ef('0x2c')]=function(_0x53cbe5,_0x4d0f16){var _0x1c8d6b={},_0x88990c={},_0x46a284={'count':0x0,'rows':[]};var _0x2d3bb6=_[_0xb2ef('0x2d')](db[_0xb2ef('0x2e')]['rawAttributes'],function(_0x485ea8){return{'name':_0x485ea8[_0xb2ef('0x2f')],'type':_0x485ea8[_0xb2ef('0x30')][_0xb2ef('0x31')]};});_0x88990c[_0xb2ef('0x32')]=_['map'](_0x2d3bb6,_0xb2ef('0x2a'));_0x88990c[_0xb2ef('0x33')]=_['keys'](_0x53cbe5[_0xb2ef('0x33')]);_0x88990c[_0xb2ef('0x34')]=_[_0xb2ef('0x35')](_0x88990c[_0xb2ef('0x32')],_0x88990c[_0xb2ef('0x33')]);_0x1c8d6b[_0xb2ef('0x36')]=_[_0xb2ef('0x35')](_0x88990c[_0xb2ef('0x32')],qs[_0xb2ef('0x37')](_0x53cbe5[_0xb2ef('0x33')][_0xb2ef('0x37')]));_0x1c8d6b[_0xb2ef('0x36')]=_0x1c8d6b[_0xb2ef('0x36')][_0xb2ef('0x38')]?_0x1c8d6b['attributes']:_0x88990c[_0xb2ef('0x32')];if(!_0x53cbe5[_0xb2ef('0x33')]['hasOwnProperty'](_0xb2ef('0x39'))){_0x1c8d6b['limit']=qs[_0xb2ef('0x1d')](_0x53cbe5['query'][_0xb2ef('0x1d')]);_0x1c8d6b[_0xb2ef('0x1b')]=qs[_0xb2ef('0x1b')](_0x53cbe5['query'][_0xb2ef('0x1b')]);}_0x1c8d6b[_0xb2ef('0x3a')]=qs['sort'](_0x53cbe5[_0xb2ef('0x33')][_0xb2ef('0x3b')]);_0x1c8d6b[_0xb2ef('0x3c')]=qs[_0xb2ef('0x34')](_[_0xb2ef('0x3d')](_0x53cbe5['query'],_0x88990c[_0xb2ef('0x34')]),_0x2d3bb6);if(_0x53cbe5['query'][_0xb2ef('0x3e')]){_0x1c8d6b[_0xb2ef('0x3c')]=_[_0xb2ef('0x3f')](_0x1c8d6b[_0xb2ef('0x3c')],{'$or':_[_0xb2ef('0x2d')](_0x2d3bb6,function(_0x271ac7){if(_0x271ac7['type']!==_0xb2ef('0x40')){var _0x27ad40={};_0x27ad40[_0x271ac7[_0xb2ef('0x2a')]]={'$like':'%'+_0x53cbe5[_0xb2ef('0x33')][_0xb2ef('0x3e')]+'%'};return _0x27ad40;}})});}_0x1c8d6b=_['merge']({},_0x1c8d6b,_0x53cbe5[_0xb2ef('0x41')]);var _0x1003c2={'where':_0x1c8d6b[_0xb2ef('0x3c')]};return db[_0xb2ef('0x2e')][_0xb2ef('0x1e')](_0x1003c2)[_0xb2ef('0x24')](function(_0x283d08){_0x46a284[_0xb2ef('0x1e')]=_0x283d08;if(_0x53cbe5[_0xb2ef('0x33')][_0xb2ef('0x42')]){_0x1c8d6b[_0xb2ef('0x43')]=[{'all':!![]}];}return db[_0xb2ef('0x2e')][_0xb2ef('0x44')](_0x1c8d6b);})[_0xb2ef('0x24')](function(_0x48a635){_0x46a284[_0xb2ef('0x45')]=_0x48a635;return _0x46a284;})[_0xb2ef('0x24')](respondWithFilteredResult(_0x4d0f16,_0x1c8d6b))[_0xb2ef('0x46')](handleError(_0x4d0f16,null));};exports[_0xb2ef('0x47')]=function(_0x4fcd73,_0x4e9d3c){var _0x3d69ca={'raw':![],'where':{'id':_0x4fcd73['params']['id']}},_0x146187={};_0x146187[_0xb2ef('0x32')]=_[_0xb2ef('0x48')](db[_0xb2ef('0x2e')][_0xb2ef('0x49')]);_0x146187[_0xb2ef('0x33')]=_[_0xb2ef('0x48')](_0x4fcd73['query']);_0x146187['filters']=_[_0xb2ef('0x35')](_0x146187[_0xb2ef('0x32')],_0x146187['query']);_0x3d69ca[_0xb2ef('0x36')]=_[_0xb2ef('0x35')](_0x146187[_0xb2ef('0x32')],qs[_0xb2ef('0x37')](_0x4fcd73[_0xb2ef('0x33')][_0xb2ef('0x37')]));_0x3d69ca[_0xb2ef('0x36')]=_0x3d69ca['attributes'][_0xb2ef('0x38')]?_0x3d69ca['attributes']:_0x146187['model'];if(_0x4fcd73['query']['includeAll']){_0x3d69ca[_0xb2ef('0x43')]=[{'all':!![]}];}_0x3d69ca=_[_0xb2ef('0x3f')]({},_0x3d69ca,_0x4fcd73['options']);return db['Schedule'][_0xb2ef('0x4a')](_0x3d69ca)[_0xb2ef('0x24')](handleEntityNotFound(_0x4e9d3c,null))[_0xb2ef('0x24')](respondWithResult(_0x4e9d3c,null))[_0xb2ef('0x46')](handleError(_0x4e9d3c,null));};exports['create']=function(_0x2a65da,_0x2a19a4){return db[_0xb2ef('0x2e')][_0xb2ef('0x4b')](_0x2a65da['body'],{})[_0xb2ef('0x24')](function(_0xd6b7b){var _0x272d57=_0x2a65da[_0xb2ef('0x4c')][_0xb2ef('0x25')]({'plain':!![]});if(!_0x272d57)throw new Error('Unable\x20to\x20retrieve\x20the\x20current\x20user');if(_0x272d57['role']===_0xb2ef('0x4c')){var _0x5c1b59=_0xd6b7b['get']({'plain':!![]});var _0x5576da=_0xb2ef('0x26');return db[_0xb2ef('0x4d')]['find']({'where':{'name':_0x5576da,'userProfileId':_0x272d57[_0xb2ef('0x4e')]},'raw':!![]})[_0xb2ef('0x24')](function(_0xc749f){if(_0xc749f&&_0xc749f[_0xb2ef('0x4f')]===0x0){return db[_0xb2ef('0x27')][_0xb2ef('0x4b')]({'name':_0x5c1b59[_0xb2ef('0x2a')],'resourceId':_0x5c1b59['id'],'type':_0xc749f['name'],'sectionId':_0xc749f['id']},{})[_0xb2ef('0x24')](function(){return _0xd6b7b;});}else{return _0xd6b7b;}})[_0xb2ef('0x46')](function(_0xa2517d){logger['error'](_0xb2ef('0x50'),_0xa2517d);throw _0xa2517d;});}return _0xd6b7b;})[_0xb2ef('0x24')](respondWithResult(_0x2a19a4,0xc9))[_0xb2ef('0x46')](handleError(_0x2a19a4,null));};exports[_0xb2ef('0x23')]=function(_0x1c15a7,_0x35ef37){if(_0x1c15a7[_0xb2ef('0x51')]['id']){delete _0x1c15a7['body']['id'];}return db[_0xb2ef('0x2e')][_0xb2ef('0x4a')]({'where':{'id':_0x1c15a7['params']['id']}})[_0xb2ef('0x24')](handleEntityNotFound(_0x35ef37,null))[_0xb2ef('0x24')](saveUpdates(_0x1c15a7[_0xb2ef('0x51')],null))[_0xb2ef('0x24')](respondWithResult(_0x35ef37,null))[_0xb2ef('0x46')](handleError(_0x35ef37,null));};exports[_0xb2ef('0x28')]=function(_0x4169af,_0x4637de){return db[_0xb2ef('0x2e')]['find']({'where':{'id':_0x4169af[_0xb2ef('0x52')]['id']}})[_0xb2ef('0x24')](handleEntityNotFound(_0x4637de,null))[_0xb2ef('0x24')](removeEntity(_0x4637de,null))[_0xb2ef('0x46')](handleError(_0x4637de,null));};exports[_0xb2ef('0x53')]=function(_0x511cf2,_0x41cbe2,_0x43ea5f){var _0x49b616=require(_0xb2ef('0x54'));return db[_0xb2ef('0x2e')]['find']({'where':{'id':_0x511cf2[_0xb2ef('0x52')]['id']},'raw':!![]})[_0xb2ef('0x24')](handleEntityNotFound(_0x41cbe2,null))[_0xb2ef('0x24')](function(){_0x49b616[_0xb2ef('0x53')](_0x511cf2[_0xb2ef('0x52')]['id']);})[_0xb2ef('0x24')](respondWithStatusCode(_0x41cbe2,null))[_0xb2ef('0x46')](handleError(_0x41cbe2,null));}; \ No newline at end of file +var _0xfeec=['../../config/schedule','eml-format','rimraf','request-promise','bluebird','mustache','util','path','to-csv','ejs','fs-extra','lodash','squel','crypto','jsforce','desk.js','papaparse','ioredis','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','sendStatus','status','json','offset','undefined','limit','count','set','reject','then','destroy','get','UserProfileResource','error','stack','name','send','index','map','Schedule','rawAttributes','fieldName','type','key','model','keys','intersection','query','attributes','length','hasOwnProperty','nolimit','order','sort','filters','pick','where','merge','VIRTUAL','filter','options','include','catch','show','params','fields','includeAll','find','create','user','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','Scheduler','userProfileId','autoAssociation','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','update','body','run'];(function(_0x5fc3d8,_0x18933f){var _0x421e14=function(_0x8c36d2){while(--_0x8c36d2){_0x5fc3d8['push'](_0x5fc3d8['shift']());}};_0x421e14(++_0x18933f);}(_0xfeec,0x155));var _0xcfee=function(_0x152692,_0x1458b0){_0x152692=_0x152692-0x0;var _0x1581ac=_0xfeec[_0x152692];return _0x1581ac;};'use strict';var emlformat=require(_0xcfee('0x0'));var rimraf=require(_0xcfee('0x1'));var zipdir=require('zip-dir');var jsonpatch=require('fast-json-patch');var rp=require(_0xcfee('0x2'));var moment=require('moment');var BPromise=require(_0xcfee('0x3'));var Mustache=require(_0xcfee('0x4'));var util=require(_0xcfee('0x5'));var path=require(_0xcfee('0x6'));var sox=require('sox');var csv=require(_0xcfee('0x7'));var ejs=require(_0xcfee('0x8'));var fs=require('fs');var fs_extra=require(_0xcfee('0x9'));var _=require(_0xcfee('0xa'));var squel=require(_0xcfee('0xb'));var crypto=require(_0xcfee('0xc'));var jsforce=require(_0xcfee('0xd'));var deskjs=require(_0xcfee('0xe'));var toCsv=require(_0xcfee('0x7'));var querystring=require('querystring');var Papa=require(_0xcfee('0xf'));var Redis=require(_0xcfee('0x10'));var authService=require('../../components/auth/service');var qs=require('../../components/parsers/qs');var as=require(_0xcfee('0x11'));var hardwareService=require(_0xcfee('0x12'));var logger=require(_0xcfee('0x13'))(_0xcfee('0x14'));var utils=require(_0xcfee('0x15'));var config=require(_0xcfee('0x16'));var licenseUtil=require(_0xcfee('0x17'));var db=require(_0xcfee('0x18'))['db'];function respondWithStatusCode(_0xf0f730,_0x2d7ea6){_0x2d7ea6=_0x2d7ea6||0xcc;return function(_0x684c46){if(_0x684c46){return _0xf0f730[_0xcfee('0x19')](_0x2d7ea6);}return _0xf0f730['status'](_0x2d7ea6)['end']();};}function respondWithResult(_0x181c0b,_0x2aad0e){_0x2aad0e=_0x2aad0e||0xc8;return function(_0x5aafaa){if(_0x5aafaa){return _0x181c0b[_0xcfee('0x1a')](_0x2aad0e)[_0xcfee('0x1b')](_0x5aafaa);}};}function respondWithFilteredResult(_0xb00244,_0x3cc257){return function(_0x1e4257){if(_0x1e4257){var _0x165ee9=typeof _0x3cc257[_0xcfee('0x1c')]===_0xcfee('0x1d')&&typeof _0x3cc257[_0xcfee('0x1e')]===_0xcfee('0x1d');var _0x520857=_0x1e4257['count'];var _0xdcbe89=_0x165ee9?0x0:_0x3cc257['offset'];var _0x5b1396=_0x165ee9?_0x1e4257[_0xcfee('0x1f')]:_0x3cc257['offset']+_0x3cc257[_0xcfee('0x1e')];var _0x2f5254;if(_0x5b1396>=_0x520857){_0x5b1396=_0x520857;_0x2f5254=0xc8;}else{_0x2f5254=0xce;}_0xb00244[_0xcfee('0x1a')](_0x2f5254);return _0xb00244[_0xcfee('0x20')]('Content-Range',_0xdcbe89+'-'+_0x5b1396+'/'+_0x520857)[_0xcfee('0x1b')](_0x1e4257);}return null;};}function patchUpdates(_0x472522){return function(_0x1f0336){try{jsonpatch['apply'](_0x1f0336,_0x472522,!![]);}catch(_0x318bcc){return BPromise[_0xcfee('0x21')](_0x318bcc);}return _0x1f0336['save']();};}function saveUpdates(_0x334d43,_0xe63067){return function(_0x5e1978){if(_0x5e1978){return _0x5e1978['update'](_0x334d43)[_0xcfee('0x22')](function(_0x328523){return _0x328523;});}return null;};}function removeEntity(_0x246652,_0x1f256f){return function(_0x486794){if(_0x486794){return _0x486794[_0xcfee('0x23')]()[_0xcfee('0x22')](function(){var _0x434b03=_0x486794[_0xcfee('0x24')]({'plain':!![]});var _0x3ddff3='Scheduler';return db[_0xcfee('0x25')]['destroy']({'where':{'type':_0x3ddff3,'resourceId':_0x434b03['id']}})[_0xcfee('0x22')](function(){return _0x486794;});})[_0xcfee('0x22')](function(){_0x246652['status'](0xcc)['end']();});}};}function handleEntityNotFound(_0xfa7c2c,_0x32365f){return function(_0xeb2cd0){if(!_0xeb2cd0){_0xfa7c2c[_0xcfee('0x19')](0x194);}return _0xeb2cd0;};}function handleError(_0x30281f,_0x5f1259){_0x5f1259=_0x5f1259||0x1f4;return function(_0x4f68fd){logger[_0xcfee('0x26')](_0x4f68fd[_0xcfee('0x27')]);if(_0x4f68fd[_0xcfee('0x28')]){delete _0x4f68fd[_0xcfee('0x28')];}_0x30281f[_0xcfee('0x1a')](_0x5f1259)[_0xcfee('0x29')](_0x4f68fd);};}exports[_0xcfee('0x2a')]=function(_0x11828b,_0x565ace){var _0xd81cac={},_0x2c0400={},_0x389366={'count':0x0,'rows':[]};var _0x47dec5=_[_0xcfee('0x2b')](db[_0xcfee('0x2c')][_0xcfee('0x2d')],function(_0x400b4c){return{'name':_0x400b4c[_0xcfee('0x2e')],'type':_0x400b4c[_0xcfee('0x2f')][_0xcfee('0x30')]};});_0x2c0400[_0xcfee('0x31')]=_['map'](_0x47dec5,_0xcfee('0x28'));_0x2c0400['query']=_[_0xcfee('0x32')](_0x11828b['query']);_0x2c0400['filters']=_[_0xcfee('0x33')](_0x2c0400[_0xcfee('0x31')],_0x2c0400[_0xcfee('0x34')]);_0xd81cac[_0xcfee('0x35')]=_[_0xcfee('0x33')](_0x2c0400[_0xcfee('0x31')],qs['fields'](_0x11828b[_0xcfee('0x34')]['fields']));_0xd81cac[_0xcfee('0x35')]=_0xd81cac[_0xcfee('0x35')][_0xcfee('0x36')]?_0xd81cac['attributes']:_0x2c0400['model'];if(!_0x11828b[_0xcfee('0x34')][_0xcfee('0x37')](_0xcfee('0x38'))){_0xd81cac[_0xcfee('0x1e')]=qs['limit'](_0x11828b[_0xcfee('0x34')][_0xcfee('0x1e')]);_0xd81cac[_0xcfee('0x1c')]=qs[_0xcfee('0x1c')](_0x11828b[_0xcfee('0x34')][_0xcfee('0x1c')]);}_0xd81cac[_0xcfee('0x39')]=qs[_0xcfee('0x3a')](_0x11828b[_0xcfee('0x34')]['sort']);_0xd81cac['where']=qs[_0xcfee('0x3b')](_[_0xcfee('0x3c')](_0x11828b[_0xcfee('0x34')],_0x2c0400[_0xcfee('0x3b')]),_0x47dec5);if(_0x11828b[_0xcfee('0x34')]['filter']){_0xd81cac[_0xcfee('0x3d')]=_[_0xcfee('0x3e')](_0xd81cac[_0xcfee('0x3d')],{'$or':_[_0xcfee('0x2b')](_0x47dec5,function(_0xe9f707){if(_0xe9f707['type']!==_0xcfee('0x3f')){var _0x41357a={};_0x41357a[_0xe9f707[_0xcfee('0x28')]]={'$like':'%'+_0x11828b[_0xcfee('0x34')][_0xcfee('0x40')]+'%'};return _0x41357a;}})});}_0xd81cac=_[_0xcfee('0x3e')]({},_0xd81cac,_0x11828b[_0xcfee('0x41')]);var _0x35f181={'where':_0xd81cac['where']};return db[_0xcfee('0x2c')][_0xcfee('0x1f')](_0x35f181)[_0xcfee('0x22')](function(_0x56a263){_0x389366[_0xcfee('0x1f')]=_0x56a263;if(_0x11828b[_0xcfee('0x34')]['includeAll']){_0xd81cac[_0xcfee('0x42')]=[{'all':!![]}];}return db[_0xcfee('0x2c')]['findAll'](_0xd81cac);})[_0xcfee('0x22')](function(_0x409805){_0x389366['rows']=_0x409805;return _0x389366;})[_0xcfee('0x22')](respondWithFilteredResult(_0x565ace,_0xd81cac))[_0xcfee('0x43')](handleError(_0x565ace,null));};exports[_0xcfee('0x44')]=function(_0x382077,_0x3abde8){var _0x4ce2c9={'raw':![],'where':{'id':_0x382077[_0xcfee('0x45')]['id']}},_0x40d406={};_0x40d406['model']=_['keys'](db['Schedule'][_0xcfee('0x2d')]);_0x40d406['query']=_[_0xcfee('0x32')](_0x382077[_0xcfee('0x34')]);_0x40d406[_0xcfee('0x3b')]=_[_0xcfee('0x33')](_0x40d406['model'],_0x40d406[_0xcfee('0x34')]);_0x4ce2c9[_0xcfee('0x35')]=_['intersection'](_0x40d406[_0xcfee('0x31')],qs[_0xcfee('0x46')](_0x382077['query'][_0xcfee('0x46')]));_0x4ce2c9[_0xcfee('0x35')]=_0x4ce2c9[_0xcfee('0x35')][_0xcfee('0x36')]?_0x4ce2c9[_0xcfee('0x35')]:_0x40d406['model'];if(_0x382077[_0xcfee('0x34')][_0xcfee('0x47')]){_0x4ce2c9[_0xcfee('0x42')]=[{'all':!![]}];}_0x4ce2c9=_['merge']({},_0x4ce2c9,_0x382077['options']);return db[_0xcfee('0x2c')][_0xcfee('0x48')](_0x4ce2c9)[_0xcfee('0x22')](handleEntityNotFound(_0x3abde8,null))[_0xcfee('0x22')](respondWithResult(_0x3abde8,null))[_0xcfee('0x43')](handleError(_0x3abde8,null));};exports[_0xcfee('0x49')]=function(_0x244b98,_0x4c3a78){return db[_0xcfee('0x2c')]['create'](_0x244b98['body'],{})[_0xcfee('0x22')](function(_0x95b662){var _0x134ccb=_0x244b98[_0xcfee('0x4a')][_0xcfee('0x24')]({'plain':!![]});if(!_0x134ccb)throw new Error(_0xcfee('0x4b'));if(_0x134ccb[_0xcfee('0x4c')]===_0xcfee('0x4a')){var _0x22e45f=_0x95b662[_0xcfee('0x24')]({'plain':!![]});var _0x36e3cf=_0xcfee('0x4d');return db['UserProfileSection']['find']({'where':{'name':_0x36e3cf,'userProfileId':_0x134ccb[_0xcfee('0x4e')]},'raw':!![]})['then'](function(_0x5dddfd){if(_0x5dddfd&&_0x5dddfd[_0xcfee('0x4f')]===0x0){return db['UserProfileResource'][_0xcfee('0x49')]({'name':_0x22e45f[_0xcfee('0x28')],'resourceId':_0x22e45f['id'],'type':_0x5dddfd['name'],'sectionId':_0x5dddfd['id']},{})[_0xcfee('0x22')](function(){return _0x95b662;});}else{return _0x95b662;}})[_0xcfee('0x43')](function(_0x1cc94){logger[_0xcfee('0x26')](_0xcfee('0x50'),_0x1cc94);throw _0x1cc94;});}return _0x95b662;})['then'](respondWithResult(_0x4c3a78,0xc9))['catch'](handleError(_0x4c3a78,null));};exports[_0xcfee('0x51')]=function(_0x1454c0,_0x3fca9f){if(_0x1454c0[_0xcfee('0x52')]['id']){delete _0x1454c0[_0xcfee('0x52')]['id'];}return db[_0xcfee('0x2c')]['find']({'where':{'id':_0x1454c0['params']['id']}})['then'](handleEntityNotFound(_0x3fca9f,null))[_0xcfee('0x22')](saveUpdates(_0x1454c0[_0xcfee('0x52')],null))['then'](respondWithResult(_0x3fca9f,null))['catch'](handleError(_0x3fca9f,null));};exports['destroy']=function(_0x2dddcc,_0x1a93a9){return db[_0xcfee('0x2c')]['find']({'where':{'id':_0x2dddcc[_0xcfee('0x45')]['id']}})[_0xcfee('0x22')](handleEntityNotFound(_0x1a93a9,null))['then'](removeEntity(_0x1a93a9,null))[_0xcfee('0x43')](handleError(_0x1a93a9,null));};exports[_0xcfee('0x53')]=function(_0x31bacd,_0x30f852,_0x256298){var _0x2d6c20=require(_0xcfee('0x54'));return db[_0xcfee('0x2c')]['find']({'where':{'id':_0x31bacd['params']['id']},'raw':!![]})[_0xcfee('0x22')](handleEntityNotFound(_0x30f852,null))[_0xcfee('0x22')](function(){_0x2d6c20[_0xcfee('0x53')](_0x31bacd[_0xcfee('0x45')]['id']);})[_0xcfee('0x22')](respondWithStatusCode(_0x30f852,null))['catch'](handleError(_0x30f852,null));}; \ No newline at end of file diff --git a/server/api/schedule/schedule.model.js b/server/api/schedule/schedule.model.js index 867276e..56e4b55 100644 --- a/server/api/schedule/schedule.model.js +++ b/server/api/schedule/schedule.model.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x17b1=['define','Schedule','tools_schedules','lodash','util','../../config/logger','api','bluebird','request-promise','rimraf','../../config/environment','exports'];(function(_0x3597e2,_0x5ad608){var _0x3b597c=function(_0x5294bd){while(--_0x5294bd){_0x3597e2['push'](_0x3597e2['shift']());}};_0x3b597c(++_0x5ad608);}(_0x17b1,0x13b));var _0x117b=function(_0x5f0501,_0x19196e){_0x5f0501=_0x5f0501-0x0;var _0x3c2c45=_0x17b1[_0x5f0501];return _0x3c2c45;};'use strict';var _=require(_0x117b('0x0'));var util=require(_0x117b('0x1'));var logger=require(_0x117b('0x2'))(_0x117b('0x3'));var moment=require('moment');var BPromise=require(_0x117b('0x4'));var rp=require(_0x117b('0x5'));var fs=require('fs');var path=require('path');var rimraf=require(_0x117b('0x6'));var config=require(_0x117b('0x7'));var attributes=require('./schedule.attributes');module[_0x117b('0x8')]=function(_0x21a2be,_0x583646){return _0x21a2be[_0x117b('0x9')](_0x117b('0xa'),attributes,{'tableName':_0x117b('0xb'),'paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file +var _0xbe7b=['bluebird','request-promise','rimraf','../../config/environment','./schedule.attributes','exports','define','Schedule','tools_schedules','util','moment'];(function(_0x1a979a,_0x4d8d8c){var _0x99a8f2=function(_0x1ea72f){while(--_0x1ea72f){_0x1a979a['push'](_0x1a979a['shift']());}};_0x99a8f2(++_0x4d8d8c);}(_0xbe7b,0x1d7));var _0xbbe7=function(_0x3486b0,_0x248021){_0x3486b0=_0x3486b0-0x0;var _0x2c8a3f=_0xbe7b[_0x3486b0];return _0x2c8a3f;};'use strict';var _=require('lodash');var util=require(_0xbbe7('0x0'));var logger=require('../../config/logger')('api');var moment=require(_0xbbe7('0x1'));var BPromise=require(_0xbbe7('0x2'));var rp=require(_0xbbe7('0x3'));var fs=require('fs');var path=require('path');var rimraf=require(_0xbbe7('0x4'));var config=require(_0xbbe7('0x5'));var attributes=require(_0xbbe7('0x6'));module[_0xbbe7('0x7')]=function(_0x5518ba,_0x107a4b){return _0x5518ba[_0xbbe7('0x8')](_0xbbe7('0x9'),attributes,{'tableName':_0xbbe7('0xa'),'paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file diff --git a/server/api/schedule/schedule.rpc.js b/server/api/schedule/schedule.rpc.js index a555dc8..239934a 100644 --- a/server/api/schedule/schedule.rpc.js +++ b/server/api/schedule/schedule.rpc.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xc694=['message','catch','lodash','util','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','request','info','Schedule,\x20%s,\x20%s','request\x20sent','debug','Schedule,\x20%s,\x20%s,\x20%s','stringify','error','code'];(function(_0x3f7ee7,_0x52cd3c){var _0x5bee62=function(_0x42ad39){while(--_0x42ad39){_0x3f7ee7['push'](_0x3f7ee7['shift']());}};_0x5bee62(++_0x52cd3c);}(_0xc694,0x9c));var _0x4c69=function(_0x54b4a8,_0x3abef0){_0x54b4a8=_0x54b4a8-0x0;var _0x4c7a5f=_0xc694[_0x54b4a8];return _0x4c7a5f;};'use strict';var _=require(_0x4c69('0x0'));var util=require(_0x4c69('0x1'));var moment=require('moment');var BPromise=require('bluebird');var rs=require(_0x4c69('0x2'));var fs=require('fs');var Redis=require(_0x4c69('0x3'));var db=require(_0x4c69('0x4'))['db'];var utils=require(_0x4c69('0x5'));var logger=require(_0x4c69('0x6'))(_0x4c69('0x7'));var config=require(_0x4c69('0x8'));var jayson=require(_0x4c69('0x9'));var client=jayson[_0x4c69('0xa')]['http']({'port':0x232a});function respondWithRpcPromise(_0xa4a5fd,_0x56a179,_0x1f9771){return new BPromise(function(_0x430a5a,_0x48ece9){return client[_0x4c69('0xb')](_0xa4a5fd,_0x1f9771)['then'](function(_0x3321e9){logger[_0x4c69('0xc')](_0x4c69('0xd'),_0x56a179,_0x4c69('0xe'));logger[_0x4c69('0xf')](_0x4c69('0x10'),_0x56a179,_0x4c69('0xe'),JSON[_0x4c69('0x11')](_0x3321e9));if(_0x3321e9['error']){if(_0x3321e9[_0x4c69('0x12')][_0x4c69('0x13')]===0x1f4){logger[_0x4c69('0x12')](_0x4c69('0xd'),_0x56a179,_0x3321e9[_0x4c69('0x12')]['message']);return _0x48ece9(_0x3321e9['error'][_0x4c69('0x14')]);}logger[_0x4c69('0x12')]('Schedule,\x20%s,\x20%s',_0x56a179,_0x3321e9[_0x4c69('0x12')][_0x4c69('0x14')]);return _0x430a5a(_0x3321e9['error'][_0x4c69('0x14')]);}else{logger[_0x4c69('0xc')](_0x4c69('0xd'),_0x56a179,_0x4c69('0xe'));_0x430a5a(_0x3321e9['result']['message']);}})[_0x4c69('0x15')](function(_0x4c818d){logger['error'](_0x4c69('0xd'),_0x56a179,_0x4c818d);_0x48ece9(_0x4c818d);});});} \ No newline at end of file +var _0x112b=['then','info','Schedule,\x20%s,\x20%s','request\x20sent','Schedule,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','catch','lodash','util','moment','bluebird','randomstring','../../mysqldb','../../config/logger','rpc','../../config/environment','jayson/promise','client','request'];(function(_0x4b2b03,_0xbf34ee){var _0x1bf0ed=function(_0x562785){while(--_0x562785){_0x4b2b03['push'](_0x4b2b03['shift']());}};_0x1bf0ed(++_0xbf34ee);}(_0x112b,0x192));var _0xb112=function(_0x3dda0f,_0x5b9902){_0x3dda0f=_0x3dda0f-0x0;var _0x1b0488=_0x112b[_0x3dda0f];return _0x1b0488;};'use strict';var _=require(_0xb112('0x0'));var util=require(_0xb112('0x1'));var moment=require(_0xb112('0x2'));var BPromise=require(_0xb112('0x3'));var rs=require(_0xb112('0x4'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0xb112('0x5'))['db'];var utils=require('../../config/utils');var logger=require(_0xb112('0x6'))(_0xb112('0x7'));var config=require(_0xb112('0x8'));var jayson=require(_0xb112('0x9'));var client=jayson[_0xb112('0xa')]['http']({'port':0x232a});function respondWithRpcPromise(_0x3a84ec,_0x5d3453,_0x57facb){return new BPromise(function(_0x540686,_0x8210e5){return client[_0xb112('0xb')](_0x3a84ec,_0x57facb)[_0xb112('0xc')](function(_0x5e233b){logger[_0xb112('0xd')](_0xb112('0xe'),_0x5d3453,_0xb112('0xf'));logger['debug'](_0xb112('0x10'),_0x5d3453,'request\x20sent',JSON[_0xb112('0x11')](_0x5e233b));if(_0x5e233b[_0xb112('0x12')]){if(_0x5e233b[_0xb112('0x12')][_0xb112('0x13')]===0x1f4){logger[_0xb112('0x12')](_0xb112('0xe'),_0x5d3453,_0x5e233b['error']['message']);return _0x8210e5(_0x5e233b[_0xb112('0x12')][_0xb112('0x14')]);}logger['error'](_0xb112('0xe'),_0x5d3453,_0x5e233b[_0xb112('0x12')]['message']);return _0x540686(_0x5e233b[_0xb112('0x12')][_0xb112('0x14')]);}else{logger[_0xb112('0xd')](_0xb112('0xe'),_0x5d3453,'request\x20sent');_0x540686(_0x5e233b[_0xb112('0x15')][_0xb112('0x14')]);}})[_0xb112('0x16')](function(_0x392cae){logger['error'](_0xb112('0xe'),_0x5d3453,_0x392cae);_0x8210e5(_0x392cae);});});} \ No newline at end of file diff --git a/server/api/screenRecording/index.js b/server/api/screenRecording/index.js index 7ab3e98..c3fb90b 100644 --- a/server/api/screenRecording/index.js +++ b/server/api/screenRecording/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x49cf=['../../config/environment','./screenRecording.controller','isAuthenticated','index','/describe','/:id','show','get','/:id/download','download','post','create','put','update','delete','destroy','exports','multer','path','connect-timeout','express','Router','fs-extra','../../components/auth/service','../../components/interaction/service'];(function(_0x51bda1,_0x44f80d){var _0x1ce08c=function(_0x5b788e){while(--_0x5b788e){_0x51bda1['push'](_0x51bda1['shift']());}};_0x1ce08c(++_0x44f80d);}(_0x49cf,0xa7));var _0xf49c=function(_0x584303,_0x499b21){_0x584303=_0x584303-0x0;var _0x3de671=_0x49cf[_0x584303];return _0x3de671;};'use strict';var multer=require(_0xf49c('0x0'));var util=require('util');var path=require(_0xf49c('0x1'));var timeout=require(_0xf49c('0x2'));var express=require(_0xf49c('0x3'));var router=express[_0xf49c('0x4')]();var fs_extra=require(_0xf49c('0x5'));var auth=require(_0xf49c('0x6'));var interaction=require(_0xf49c('0x7'));var config=require(_0xf49c('0x8'));var controller=require(_0xf49c('0x9'));router['get']('/',auth[_0xf49c('0xa')](),controller[_0xf49c('0xb')]);router['get'](_0xf49c('0xc'),auth[_0xf49c('0xa')](),controller['describe']);router['get'](_0xf49c('0xd'),auth[_0xf49c('0xa')](),controller[_0xf49c('0xe')]);router[_0xf49c('0xf')](_0xf49c('0x10'),auth[_0xf49c('0xa')](),controller[_0xf49c('0x11')]);router[_0xf49c('0x12')]('/',auth[_0xf49c('0xa')](),controller[_0xf49c('0x13')]);router[_0xf49c('0x14')](_0xf49c('0xd'),auth[_0xf49c('0xa')](),controller[_0xf49c('0x15')]);router[_0xf49c('0x16')](_0xf49c('0xd'),auth['isAuthenticated'](),controller[_0xf49c('0x17')]);module[_0xf49c('0x18')]=router; \ No newline at end of file +var _0xefa9=['exports','multer','path','connect-timeout','fs-extra','../../components/interaction/service','../../config/environment','./screenRecording.controller','get','isAuthenticated','index','/describe','describe','show','/:id/download','download','post','put','/:id','delete','destroy'];(function(_0x2e766b,_0x51957f){var _0x308db5=function(_0x1ac822){while(--_0x1ac822){_0x2e766b['push'](_0x2e766b['shift']());}};_0x308db5(++_0x51957f);}(_0xefa9,0x7f));var _0x9efa=function(_0x4c07eb,_0x268d0e){_0x4c07eb=_0x4c07eb-0x0;var _0x3981ae=_0xefa9[_0x4c07eb];return _0x3981ae;};'use strict';var multer=require(_0x9efa('0x0'));var util=require('util');var path=require(_0x9efa('0x1'));var timeout=require(_0x9efa('0x2'));var express=require('express');var router=express['Router']();var fs_extra=require(_0x9efa('0x3'));var auth=require('../../components/auth/service');var interaction=require(_0x9efa('0x4'));var config=require(_0x9efa('0x5'));var controller=require(_0x9efa('0x6'));router[_0x9efa('0x7')]('/',auth[_0x9efa('0x8')](),controller[_0x9efa('0x9')]);router[_0x9efa('0x7')](_0x9efa('0xa'),auth['isAuthenticated'](),controller[_0x9efa('0xb')]);router[_0x9efa('0x7')]('/:id',auth[_0x9efa('0x8')](),controller[_0x9efa('0xc')]);router[_0x9efa('0x7')](_0x9efa('0xd'),auth[_0x9efa('0x8')](),controller[_0x9efa('0xe')]);router[_0x9efa('0xf')]('/',auth[_0x9efa('0x8')](),controller['create']);router[_0x9efa('0x10')](_0x9efa('0x11'),auth[_0x9efa('0x8')](),controller['update']);router[_0x9efa('0x12')](_0x9efa('0x11'),auth[_0x9efa('0x8')](),controller[_0x9efa('0x13')]);module[_0x9efa('0x14')]=router; \ No newline at end of file diff --git a/server/api/screenRecording/screenRecording.attributes.js b/server/api/screenRecording/screenRecording.attributes.js index c315df2..1158f68 100644 --- a/server/api/screenRecording/screenRecording.attributes.js +++ b/server/api/screenRecording/screenRecording.attributes.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xd301=['MM-DD-YYYY\x20HH:mm','toString','DATE','createdAt','updatedAt','sequelize','exports','VIRTUAL','getDataValue','value','extname','STRING','replace','INTEGER','setDataValue','startedAt','subtract','closedAt','duration','format'];(function(_0x20a584,_0xe384a5){var _0x4b41a8=function(_0x2127c6){while(--_0x2127c6){_0x20a584['push'](_0x20a584['shift']());}};_0x4b41a8(++_0xe384a5);}(_0xd301,0x145));var _0x1d30=function(_0x26a810,_0x247776){_0x26a810=_0x26a810-0x0;var _0x4758a3=_0xd301[_0x26a810];return _0x4758a3;};'use strict';var Sequelize=require(_0x1d30('0x0'));var moment=require('moment');var path=require('path');var config=require('../../config/environment');module[_0x1d30('0x1')]={'format':{'type':Sequelize[_0x1d30('0x2')],'get':function(){return this[_0x1d30('0x3')](_0x1d30('0x4'))?path[_0x1d30('0x5')](this[_0x1d30('0x3')](_0x1d30('0x4'))):undefined;}},'interactionid':{'type':Sequelize[_0x1d30('0x6')]},'channel':{'type':Sequelize[_0x1d30('0x6')]},'value':{'type':Sequelize['STRING'],'set':function(_0x2fe945){var _0x375cee=_0x2fe945[_0x1d30('0x7')](/\\/g,'/');this['setDataValue'](_0x1d30('0x4'),_0x375cee);}},'rating':{'type':Sequelize[_0x1d30('0x8')],'validate':{'max':0x5,'min':0x0}},'duration':{'type':Sequelize[_0x1d30('0x8')],'set':function(_0x18d077){this[_0x1d30('0x9')](_0x1d30('0xa'),moment()[_0x1d30('0xb')](_0x18d077,'ms'));this['setDataValue'](_0x1d30('0xc'),moment());this[_0x1d30('0x9')](_0x1d30('0xd'),_0x18d077);}},'startedAt':{'type':Sequelize['DATE'],'get':function(){return moment(this[_0x1d30('0x3')](_0x1d30('0xa')))[_0x1d30('0xe')](_0x1d30('0xf'))[_0x1d30('0x10')]();}},'closedAt':{'type':Sequelize[_0x1d30('0x11')],'get':function(){return moment(this[_0x1d30('0x3')](_0x1d30('0xc')))[_0x1d30('0xe')](_0x1d30('0xf'))[_0x1d30('0x10')]();}},'createdAt':{'type':Sequelize[_0x1d30('0x11')],'get':function(){return moment(this[_0x1d30('0x3')](_0x1d30('0x12')))[_0x1d30('0xe')]('MM-DD-YYYY\x20HH:mm')[_0x1d30('0x10')]();}},'updatedAt':{'type':Sequelize[_0x1d30('0x11')],'get':function(){return moment(this[_0x1d30('0x3')](_0x1d30('0x13')))[_0x1d30('0xe')]('MM-DD-YYYY\x20HH:mm')['toString']();}}}; \ No newline at end of file +var _0x6d5e=['extname','STRING','INTEGER','setDataValue','startedAt','closedAt','format','MM-DD-YYYY\x20HH:mm','toString','DATE','createdAt','updatedAt','sequelize','moment','path','../../config/environment','VIRTUAL','getDataValue','value'];(function(_0x42100b,_0x5e5488){var _0x200ad6=function(_0x55012d){while(--_0x55012d){_0x42100b['push'](_0x42100b['shift']());}};_0x200ad6(++_0x5e5488);}(_0x6d5e,0x103));var _0xe6d5=function(_0x75f8ea,_0x4be6b1){_0x75f8ea=_0x75f8ea-0x0;var _0x3860cd=_0x6d5e[_0x75f8ea];return _0x3860cd;};'use strict';var Sequelize=require(_0xe6d5('0x0'));var moment=require(_0xe6d5('0x1'));var path=require(_0xe6d5('0x2'));var config=require(_0xe6d5('0x3'));module['exports']={'format':{'type':Sequelize[_0xe6d5('0x4')],'get':function(){return this[_0xe6d5('0x5')](_0xe6d5('0x6'))?path[_0xe6d5('0x7')](this[_0xe6d5('0x5')](_0xe6d5('0x6'))):undefined;}},'interactionid':{'type':Sequelize[_0xe6d5('0x8')]},'channel':{'type':Sequelize['STRING']},'value':{'type':Sequelize[_0xe6d5('0x8')],'set':function(_0x4c0f87){var _0x162375=_0x4c0f87['replace'](/\\/g,'/');this['setDataValue']('value',_0x162375);}},'rating':{'type':Sequelize['INTEGER'],'validate':{'max':0x5,'min':0x0}},'duration':{'type':Sequelize[_0xe6d5('0x9')],'set':function(_0x65a619){this[_0xe6d5('0xa')](_0xe6d5('0xb'),moment()['subtract'](_0x65a619,'ms'));this[_0xe6d5('0xa')](_0xe6d5('0xc'),moment());this[_0xe6d5('0xa')]('duration',_0x65a619);}},'startedAt':{'type':Sequelize['DATE'],'get':function(){return moment(this[_0xe6d5('0x5')](_0xe6d5('0xb')))[_0xe6d5('0xd')](_0xe6d5('0xe'))[_0xe6d5('0xf')]();}},'closedAt':{'type':Sequelize[_0xe6d5('0x10')],'get':function(){return moment(this[_0xe6d5('0x5')]('closedAt'))[_0xe6d5('0xd')](_0xe6d5('0xe'))[_0xe6d5('0xf')]();}},'createdAt':{'type':Sequelize[_0xe6d5('0x10')],'get':function(){return moment(this[_0xe6d5('0x5')](_0xe6d5('0x11')))[_0xe6d5('0xd')](_0xe6d5('0xe'))[_0xe6d5('0xf')]();}},'updatedAt':{'type':Sequelize['DATE'],'get':function(){return moment(this[_0xe6d5('0x5')](_0xe6d5('0x12')))[_0xe6d5('0xd')]('MM-DD-YYYY\x20HH:mm')[_0xe6d5('0xf')]();}}}; \ No newline at end of file diff --git a/server/api/screenRecording/screenRecording.controller.js b/server/api/screenRecording/screenRecording.controller.js index fd121c0..521096a 100644 --- a/server/api/screenRecording/screenRecording.controller.js +++ b/server/api/screenRecording/screenRecording.controller.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xdc97=['join','root','%s.cypher','existsSync','decryptFile','Sequelize','ValidationError','ScreenRecording\x20not\x20found','filename','extname','unlink','message','Not\x20found','destroy','isNil','info','cancellazione\x20fisica\x20documento\x20%s','File:\x20\x22','\x22\x20trovato\x20eseguo\x20la\x20cancellazione','unlinkSync','.cypher','eml-format','rimraf','zip-dir','request-promise','bluebird','mustache','path','sox','to-csv','ejs','lodash','jsforce','desk.js','querystring','papaparse','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','status','end','offset','undefined','limit','count','set','Content-Range','json','apply','update','then','sendStatus','error','name','send','index','map','format','query','keys','intersection','model','fields','attributes','length','hasOwnProperty','nolimit','order','sort','filters','pick','filter','where','merge','type','options','ScreenRecording','includeAll','rows','catch','show','params','include','find','create','body','duration','createdAt','closedAt','value','describe','download','../../components/encryptor','uniqueid'];(function(_0x280bb6,_0x1d36e4){var _0x581042=function(_0x4d1b43){while(--_0x4d1b43){_0x280bb6['push'](_0x280bb6['shift']());}};_0x581042(++_0x1d36e4);}(_0xdc97,0x13b));var _0x7dc9=function(_0x48f2ec,_0x2c827c){_0x48f2ec=_0x48f2ec-0x0;var _0x1ec393=_0xdc97[_0x48f2ec];return _0x1ec393;};'use strict';var emlformat=require(_0x7dc9('0x0'));var rimraf=require(_0x7dc9('0x1'));var zipdir=require(_0x7dc9('0x2'));var jsonpatch=require('fast-json-patch');var rp=require(_0x7dc9('0x3'));var moment=require('moment');var BPromise=require(_0x7dc9('0x4'));var Mustache=require(_0x7dc9('0x5'));var util=require('util');var path=require(_0x7dc9('0x6'));var sox=require(_0x7dc9('0x7'));var csv=require(_0x7dc9('0x8'));var ejs=require(_0x7dc9('0x9'));var fs=require('fs');var fs_extra=require('fs-extra');var _=require(_0x7dc9('0xa'));var squel=require('squel');var crypto=require('crypto');var jsforce=require(_0x7dc9('0xb'));var deskjs=require(_0x7dc9('0xc'));var toCsv=require(_0x7dc9('0x8'));var querystring=require(_0x7dc9('0xd'));var Papa=require(_0x7dc9('0xe'));var Redis=require('ioredis');var authService=require(_0x7dc9('0xf'));var qs=require(_0x7dc9('0x10'));var as=require(_0x7dc9('0x11'));var hardwareService=require(_0x7dc9('0x12'));var logger=require(_0x7dc9('0x13'))(_0x7dc9('0x14'));var utils=require(_0x7dc9('0x15'));var config=require('../../config/environment');var licenseUtil=require('../../config/license/util');var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0x599ef1,_0x94c75a){_0x94c75a=_0x94c75a||0xcc;return function(_0x14e5db){if(_0x14e5db){return _0x599ef1['sendStatus'](_0x94c75a);}return _0x599ef1[_0x7dc9('0x16')](_0x94c75a)[_0x7dc9('0x17')]();};}function respondWithResult(_0xaadf2,_0xf37bc7){_0xf37bc7=_0xf37bc7||0xc8;return function(_0x31d43d){if(_0x31d43d){return _0xaadf2[_0x7dc9('0x16')](_0xf37bc7)['json'](_0x31d43d);}};}function respondWithFilteredResult(_0x3a54f2,_0x278191){return function(_0x1b0aa1){if(_0x1b0aa1){var _0x442819=typeof _0x278191[_0x7dc9('0x18')]===_0x7dc9('0x19')&&typeof _0x278191[_0x7dc9('0x1a')]===_0x7dc9('0x19');var _0x4778d5=_0x1b0aa1['count'];var _0x22577e=_0x442819?0x0:_0x278191['offset'];var _0x1f5906=_0x442819?_0x1b0aa1[_0x7dc9('0x1b')]:_0x278191['offset']+_0x278191[_0x7dc9('0x1a')];var _0x3b738a;if(_0x1f5906>=_0x4778d5){_0x1f5906=_0x4778d5;_0x3b738a=0xc8;}else{_0x3b738a=0xce;}_0x3a54f2[_0x7dc9('0x16')](_0x3b738a);return _0x3a54f2[_0x7dc9('0x1c')](_0x7dc9('0x1d'),_0x22577e+'-'+_0x1f5906+'/'+_0x4778d5)[_0x7dc9('0x1e')](_0x1b0aa1);}return null;};}function patchUpdates(_0x2dad65){return function(_0x2895f5){try{jsonpatch[_0x7dc9('0x1f')](_0x2895f5,_0x2dad65,!![]);}catch(_0x2b38d6){return BPromise['reject'](_0x2b38d6);}return _0x2895f5['save']();};}function saveUpdates(_0x12954f,_0x5981e2){return function(_0x596e0f){if(_0x596e0f){return _0x596e0f[_0x7dc9('0x20')](_0x12954f)[_0x7dc9('0x21')](function(_0x5e9525){return _0x5e9525;});}return null;};}function removeEntity(_0xffc080,_0x43d31f){return function(_0x41110a){if(_0x41110a){return _0x41110a['destroy']()[_0x7dc9('0x21')](function(){_0xffc080[_0x7dc9('0x16')](0xcc)[_0x7dc9('0x17')]();});}};}function handleEntityNotFound(_0x55a482,_0x48c6bc){return function(_0x4b9ba6){if(!_0x4b9ba6){_0x55a482[_0x7dc9('0x22')](0x194);}return _0x4b9ba6;};}function handleError(_0x32d032,_0x5843bf){_0x5843bf=_0x5843bf||0x1f4;return function(_0x585eef){logger[_0x7dc9('0x23')](_0x585eef['stack']);if(_0x585eef[_0x7dc9('0x24')]){delete _0x585eef[_0x7dc9('0x24')];}_0x32d032[_0x7dc9('0x16')](_0x5843bf)[_0x7dc9('0x25')](_0x585eef);};}exports[_0x7dc9('0x26')]=function(_0x450124,_0x236d42){var _0x229f8e={},_0x1fcf0e={},_0x3c4379={'count':0x0,'rows':[]};var _0x14083d=_[_0x7dc9('0x27')](db['ScreenRecording']['rawAttributes'],function(_0x513dd6){return{'name':_0x513dd6['fieldName'],'type':_0x513dd6['type']['key']};});_0x1fcf0e['model']=_['differenceBy'](_[_0x7dc9('0x27')](_0x14083d,_0x7dc9('0x24')),[_0x7dc9('0x28')]);_0x1fcf0e[_0x7dc9('0x29')]=_[_0x7dc9('0x2a')](_0x450124[_0x7dc9('0x29')]);_0x1fcf0e['filters']=_['intersection'](_0x1fcf0e['model'],_0x1fcf0e[_0x7dc9('0x29')]);_0x229f8e['attributes']=_[_0x7dc9('0x2b')](_0x1fcf0e[_0x7dc9('0x2c')],qs[_0x7dc9('0x2d')](_0x450124[_0x7dc9('0x29')][_0x7dc9('0x2d')]));_0x229f8e[_0x7dc9('0x2e')]=_0x229f8e[_0x7dc9('0x2e')][_0x7dc9('0x2f')]?_0x229f8e['attributes']:_0x1fcf0e[_0x7dc9('0x2c')];if(!_0x450124['query'][_0x7dc9('0x30')](_0x7dc9('0x31'))){_0x229f8e[_0x7dc9('0x1a')]=qs[_0x7dc9('0x1a')](_0x450124['query'][_0x7dc9('0x1a')]);_0x229f8e['offset']=qs[_0x7dc9('0x18')](_0x450124['query']['offset']);}_0x229f8e[_0x7dc9('0x32')]=qs[_0x7dc9('0x33')](_0x450124[_0x7dc9('0x29')][_0x7dc9('0x33')]);_0x229f8e['where']=qs[_0x7dc9('0x34')](_[_0x7dc9('0x35')](_0x450124[_0x7dc9('0x29')],_0x1fcf0e[_0x7dc9('0x34')]),_0x14083d);if(_0x450124[_0x7dc9('0x29')][_0x7dc9('0x36')]){_0x229f8e[_0x7dc9('0x37')]=_[_0x7dc9('0x38')](_0x229f8e[_0x7dc9('0x37')],{'$or':_[_0x7dc9('0x27')](_0x14083d,function(_0x452aed){if(_0x452aed[_0x7dc9('0x39')]!=='VIRTUAL'){var _0x34b5c9={};_0x34b5c9[_0x452aed[_0x7dc9('0x24')]]={'$like':'%'+_0x450124[_0x7dc9('0x29')][_0x7dc9('0x36')]+'%'};return _0x34b5c9;}})});}_0x229f8e=_['merge']({},_0x229f8e,_0x450124[_0x7dc9('0x3a')]);var _0x89db0e={'where':_0x229f8e[_0x7dc9('0x37')]};return db[_0x7dc9('0x3b')][_0x7dc9('0x1b')](_0x89db0e)[_0x7dc9('0x21')](function(_0x5a1201){_0x3c4379['count']=_0x5a1201;if(_0x450124[_0x7dc9('0x29')][_0x7dc9('0x3c')]){_0x229f8e['include']=[{'all':!![]}];}return db[_0x7dc9('0x3b')]['findAll'](_0x229f8e);})[_0x7dc9('0x21')](function(_0x2a91fe){_0x3c4379[_0x7dc9('0x3d')]=_0x2a91fe;return _0x3c4379;})['then'](respondWithFilteredResult(_0x236d42,_0x229f8e))[_0x7dc9('0x3e')](handleError(_0x236d42,null));};exports[_0x7dc9('0x3f')]=function(_0x1929b6,_0x95513c){var _0x28ffc0={'raw':![],'where':{'id':_0x1929b6[_0x7dc9('0x40')]['id']}},_0x23499a={};_0x23499a['model']=_[_0x7dc9('0x2a')](db['ScreenRecording']['rawAttributes']);_0x23499a[_0x7dc9('0x29')]=_[_0x7dc9('0x2a')](_0x1929b6[_0x7dc9('0x29')]);_0x23499a[_0x7dc9('0x34')]=_[_0x7dc9('0x2b')](_0x23499a[_0x7dc9('0x2c')],_0x23499a[_0x7dc9('0x29')]);_0x28ffc0[_0x7dc9('0x2e')]=_[_0x7dc9('0x2b')](_0x23499a['model'],qs[_0x7dc9('0x2d')](_0x1929b6[_0x7dc9('0x29')][_0x7dc9('0x2d')]));_0x28ffc0[_0x7dc9('0x2e')]=_0x28ffc0[_0x7dc9('0x2e')][_0x7dc9('0x2f')]?_0x28ffc0['attributes']:_0x23499a[_0x7dc9('0x2c')];if(_0x1929b6[_0x7dc9('0x29')]['includeAll']){_0x28ffc0[_0x7dc9('0x41')]=[{'all':!![]}];}_0x28ffc0=_[_0x7dc9('0x38')]({},_0x28ffc0,_0x1929b6[_0x7dc9('0x3a')]);return db['ScreenRecording'][_0x7dc9('0x42')](_0x28ffc0)['then'](handleEntityNotFound(_0x95513c,null))['then'](respondWithResult(_0x95513c,null))[_0x7dc9('0x3e')](handleError(_0x95513c,null));};exports[_0x7dc9('0x43')]=function(_0x36d591,_0x5e0dc5){return db['ScreenRecording'][_0x7dc9('0x43')](_0x36d591['body'],{})[_0x7dc9('0x21')](respondWithResult(_0x5e0dc5,0xc9))[_0x7dc9('0x3e')](handleError(_0x5e0dc5,null));};exports['update']=function(_0x24ccce,_0x1d6c0a){if(_0x24ccce[_0x7dc9('0x44')]['id']){delete _0x24ccce[_0x7dc9('0x44')]['id'];}delete _0x24ccce[_0x7dc9('0x44')][_0x7dc9('0x45')];delete _0x24ccce[_0x7dc9('0x44')][_0x7dc9('0x46')];delete _0x24ccce[_0x7dc9('0x44')][_0x7dc9('0x47')];delete _0x24ccce[_0x7dc9('0x44')][_0x7dc9('0x48')];return db[_0x7dc9('0x3b')]['find']({'where':{'id':_0x24ccce[_0x7dc9('0x40')]['id']}})['then'](handleEntityNotFound(_0x1d6c0a,null))['then'](saveUpdates(_0x24ccce[_0x7dc9('0x44')],null))[_0x7dc9('0x21')](respondWithResult(_0x1d6c0a,null))[_0x7dc9('0x3e')](handleError(_0x1d6c0a,null));};exports[_0x7dc9('0x49')]=function(_0x346d27,_0x510e2a){return db[_0x7dc9('0x3b')][_0x7dc9('0x49')]()[_0x7dc9('0x21')](respondWithResult(_0x510e2a,null))['catch'](handleError(_0x510e2a,null));};exports[_0x7dc9('0x4a')]=function(_0x3fc164,_0x2cf133,_0x32bc31){var _0xf41b8c=require(_0x7dc9('0x4b'));var _0x593132=![];var _0x366b8b={};if(_0x3fc164[_0x7dc9('0x29')][_0x7dc9('0x39')]&&_0x3fc164[_0x7dc9('0x29')][_0x7dc9('0x39')]===_0x7dc9('0x4c')){_0x366b8b[_0x7dc9('0x4c')]=_0x3fc164[_0x7dc9('0x40')]['id'];}else{_0x366b8b['id']=_0x3fc164[_0x7dc9('0x40')]['id'];}return db[_0x7dc9('0x3b')][_0x7dc9('0x42')]({'where':_0x366b8b,'attributes':['id',_0x7dc9('0x48')],'raw':!![]})['then'](handleEntityNotFound(_0x2cf133,null))[_0x7dc9('0x21')](function(_0x39be46){if(_0x39be46){var _0x38df9a=path[_0x7dc9('0x4d')](config[_0x7dc9('0x4e')],'server/files/screen_recordings',_0x39be46[_0x7dc9('0x48')]);var _0xd8d327=util[_0x7dc9('0x28')](_0x7dc9('0x4f'),_0x38df9a);if(fs[_0x7dc9('0x50')](_0xd8d327)){_0x593132=!![];return _0xf41b8c[_0x7dc9('0x51')](_0xd8d327,_0x38df9a,config['secrets']['recording'])['then'](function(){return _0x39be46;});}return _0x39be46;}})[_0x7dc9('0x21')](function(_0x3daf33){if(_0x3daf33){var _0x32a64f=path[_0x7dc9('0x4d')](config['root'],'server/files/screen_recordings',_0x3daf33[_0x7dc9('0x48')]);if(!fs[_0x7dc9('0x50')](_0x32a64f)){throw new db[(_0x7dc9('0x52'))][(_0x7dc9('0x53'))](_0x7dc9('0x54'));}if(_0x3daf33[_0x7dc9('0x55')]){return _0x2cf133[_0x7dc9('0x4a')](_0x32a64f,_0x3daf33['filename']+path[_0x7dc9('0x56')](_0x32a64f),function(){if(_0x593132){fs[_0x7dc9('0x57')](_0x32a64f);}});}else{return _0x2cf133[_0x7dc9('0x4a')](_0x32a64f,function(_0x1dad95){if(_0x593132){fs[_0x7dc9('0x57')](_0x32a64f);}});}}})['catch'](function(_0x175858){if(_0x175858[_0x7dc9('0x58')]===_0x7dc9('0x54')){_0x2cf133[_0x7dc9('0x16')](0x194)[_0x7dc9('0x25')](_0x7dc9('0x59'));}else{return handleError(_0x2cf133,null);}});};exports[_0x7dc9('0x5a')]=function(_0x2a02ed,_0x3463e4){return db[_0x7dc9('0x3b')][_0x7dc9('0x42')]({'where':{'id':_0x2a02ed[_0x7dc9('0x40')]['id']}})[_0x7dc9('0x21')](function(_0x5eee27){if(_[_0x7dc9('0x5b')](_0x5eee27)){throw new ReferenceError('Entity\x20not\x20found');}return _0x5eee27;})[_0x7dc9('0x21')](function(_0x15cf19){var _0x48ea37=path[_0x7dc9('0x4d')](config[_0x7dc9('0x4e')],'server/files/screen_recordings',_0x15cf19[_0x7dc9('0x48')]);logger[_0x7dc9('0x5c')](_0x7dc9('0x5d'),_0x48ea37);if(!_['isNil'](_0x15cf19['value'])&&fs[_0x7dc9('0x50')](_0x48ea37)){logger[_0x7dc9('0x5c')](_0x7dc9('0x5e')+_0x48ea37+_0x7dc9('0x5f'));fs[_0x7dc9('0x60')](_0x48ea37);}_0x48ea37=_0x48ea37+_0x7dc9('0x61');if(!_[_0x7dc9('0x5b')](_0x15cf19[_0x7dc9('0x48')])&&fs[_0x7dc9('0x50')](_0x48ea37)){logger['info'](_0x7dc9('0x5e')+_0x48ea37+_0x7dc9('0x5f'));fs[_0x7dc9('0x60')](_0x48ea37);}return _0x15cf19;})['then'](function(_0x4f80bd){if(!_0x4f80bd)throw new InternalError();return _0x4f80bd[_0x7dc9('0x5a')]();})[_0x7dc9('0x21')](function(){_0x3463e4[_0x7dc9('0x16')](0xcc)[_0x7dc9('0x17')]();})['catch'](handleError(_0x3463e4,null));}; \ No newline at end of file +var _0xabce=['sendStatus','error','name','send','index','map','ScreenRecording','rawAttributes','type','model','differenceBy','format','query','keys','filters','intersection','attributes','fields','length','hasOwnProperty','nolimit','sort','pick','where','merge','options','include','rows','includeAll','find','catch','create','body','createdAt','closedAt','value','params','describe','download','../../components/encryptor','uniqueid','%s.cypher','existsSync','decryptFile','recording','join','root','server/files/screen_recordings','Sequelize','ValidationError','ScreenRecording\x20not\x20found','unlink','Not\x20found','destroy','isNil','Entity\x20not\x20found','info','cancellazione\x20fisica\x20documento\x20%s','File:\x20\x22','\x22\x20trovato\x20eseguo\x20la\x20cancellazione','.cypher','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','mustache','util','path','ejs','lodash','crypto','jsforce','desk.js','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','status','end','json','limit','count','offset','Content-Range','apply','reject','save','update','then'];(function(_0x3590ed,_0x3a4587){var _0x21f72f=function(_0x45be21){while(--_0x45be21){_0x3590ed['push'](_0x3590ed['shift']());}};_0x21f72f(++_0x3a4587);}(_0xabce,0x103));var _0xeabc=function(_0x173d7e,_0x3242fd){_0x173d7e=_0x173d7e-0x0;var _0x2220d6=_0xabce[_0x173d7e];return _0x2220d6;};'use strict';var emlformat=require(_0xeabc('0x0'));var rimraf=require(_0xeabc('0x1'));var zipdir=require(_0xeabc('0x2'));var jsonpatch=require(_0xeabc('0x3'));var rp=require(_0xeabc('0x4'));var moment=require('moment');var BPromise=require('bluebird');var Mustache=require(_0xeabc('0x5'));var util=require(_0xeabc('0x6'));var path=require(_0xeabc('0x7'));var sox=require('sox');var csv=require('to-csv');var ejs=require(_0xeabc('0x8'));var fs=require('fs');var fs_extra=require('fs-extra');var _=require(_0xeabc('0x9'));var squel=require('squel');var crypto=require(_0xeabc('0xa'));var jsforce=require(_0xeabc('0xb'));var deskjs=require(_0xeabc('0xc'));var toCsv=require('to-csv');var querystring=require(_0xeabc('0xd'));var Papa=require(_0xeabc('0xe'));var Redis=require(_0xeabc('0xf'));var authService=require(_0xeabc('0x10'));var qs=require(_0xeabc('0x11'));var as=require(_0xeabc('0x12'));var hardwareService=require(_0xeabc('0x13'));var logger=require(_0xeabc('0x14'))(_0xeabc('0x15'));var utils=require(_0xeabc('0x16'));var config=require(_0xeabc('0x17'));var licenseUtil=require(_0xeabc('0x18'));var db=require(_0xeabc('0x19'))['db'];function respondWithStatusCode(_0x3fd0b5,_0x36a92e){_0x36a92e=_0x36a92e||0xcc;return function(_0xcfbf06){if(_0xcfbf06){return _0x3fd0b5['sendStatus'](_0x36a92e);}return _0x3fd0b5[_0xeabc('0x1a')](_0x36a92e)[_0xeabc('0x1b')]();};}function respondWithResult(_0x3251c6,_0x55f0de){_0x55f0de=_0x55f0de||0xc8;return function(_0x5f4ee8){if(_0x5f4ee8){return _0x3251c6[_0xeabc('0x1a')](_0x55f0de)[_0xeabc('0x1c')](_0x5f4ee8);}};}function respondWithFilteredResult(_0x326bac,_0x53d5cb){return function(_0xf913d7){if(_0xf913d7){var _0x638976=typeof _0x53d5cb['offset']==='undefined'&&typeof _0x53d5cb[_0xeabc('0x1d')]==='undefined';var _0x3d0e21=_0xf913d7[_0xeabc('0x1e')];var _0x58a3c0=_0x638976?0x0:_0x53d5cb[_0xeabc('0x1f')];var _0x31dd53=_0x638976?_0xf913d7[_0xeabc('0x1e')]:_0x53d5cb[_0xeabc('0x1f')]+_0x53d5cb[_0xeabc('0x1d')];var _0x5d92e5;if(_0x31dd53>=_0x3d0e21){_0x31dd53=_0x3d0e21;_0x5d92e5=0xc8;}else{_0x5d92e5=0xce;}_0x326bac[_0xeabc('0x1a')](_0x5d92e5);return _0x326bac['set'](_0xeabc('0x20'),_0x58a3c0+'-'+_0x31dd53+'/'+_0x3d0e21)[_0xeabc('0x1c')](_0xf913d7);}return null;};}function patchUpdates(_0x502947){return function(_0x28063a){try{jsonpatch[_0xeabc('0x21')](_0x28063a,_0x502947,!![]);}catch(_0x254590){return BPromise[_0xeabc('0x22')](_0x254590);}return _0x28063a[_0xeabc('0x23')]();};}function saveUpdates(_0x4e99a4,_0xecdbf){return function(_0x10c675){if(_0x10c675){return _0x10c675[_0xeabc('0x24')](_0x4e99a4)['then'](function(_0x457f27){return _0x457f27;});}return null;};}function removeEntity(_0x3854d2,_0x214953){return function(_0x319119){if(_0x319119){return _0x319119['destroy']()[_0xeabc('0x25')](function(){_0x3854d2['status'](0xcc)[_0xeabc('0x1b')]();});}};}function handleEntityNotFound(_0x4d4e29,_0x811f0d){return function(_0x12acbd){if(!_0x12acbd){_0x4d4e29[_0xeabc('0x26')](0x194);}return _0x12acbd;};}function handleError(_0x3f194e,_0x3a1a04){_0x3a1a04=_0x3a1a04||0x1f4;return function(_0x137293){logger[_0xeabc('0x27')](_0x137293['stack']);if(_0x137293['name']){delete _0x137293[_0xeabc('0x28')];}_0x3f194e['status'](_0x3a1a04)[_0xeabc('0x29')](_0x137293);};}exports[_0xeabc('0x2a')]=function(_0x48fb52,_0x2163e6){var _0x38572d={},_0x2b568f={},_0x2f8633={'count':0x0,'rows':[]};var _0x149170=_[_0xeabc('0x2b')](db[_0xeabc('0x2c')][_0xeabc('0x2d')],function(_0x2915c1){return{'name':_0x2915c1['fieldName'],'type':_0x2915c1[_0xeabc('0x2e')]['key']};});_0x2b568f[_0xeabc('0x2f')]=_[_0xeabc('0x30')](_[_0xeabc('0x2b')](_0x149170,_0xeabc('0x28')),[_0xeabc('0x31')]);_0x2b568f[_0xeabc('0x32')]=_[_0xeabc('0x33')](_0x48fb52['query']);_0x2b568f[_0xeabc('0x34')]=_[_0xeabc('0x35')](_0x2b568f[_0xeabc('0x2f')],_0x2b568f['query']);_0x38572d[_0xeabc('0x36')]=_[_0xeabc('0x35')](_0x2b568f[_0xeabc('0x2f')],qs['fields'](_0x48fb52[_0xeabc('0x32')][_0xeabc('0x37')]));_0x38572d[_0xeabc('0x36')]=_0x38572d['attributes'][_0xeabc('0x38')]?_0x38572d[_0xeabc('0x36')]:_0x2b568f['model'];if(!_0x48fb52['query'][_0xeabc('0x39')](_0xeabc('0x3a'))){_0x38572d['limit']=qs[_0xeabc('0x1d')](_0x48fb52[_0xeabc('0x32')][_0xeabc('0x1d')]);_0x38572d[_0xeabc('0x1f')]=qs[_0xeabc('0x1f')](_0x48fb52['query'][_0xeabc('0x1f')]);}_0x38572d['order']=qs[_0xeabc('0x3b')](_0x48fb52[_0xeabc('0x32')][_0xeabc('0x3b')]);_0x38572d['where']=qs['filters'](_[_0xeabc('0x3c')](_0x48fb52['query'],_0x2b568f[_0xeabc('0x34')]),_0x149170);if(_0x48fb52['query']['filter']){_0x38572d['where']=_['merge'](_0x38572d[_0xeabc('0x3d')],{'$or':_['map'](_0x149170,function(_0x257fe8){if(_0x257fe8[_0xeabc('0x2e')]!=='VIRTUAL'){var _0xe8fa6e={};_0xe8fa6e[_0x257fe8['name']]={'$like':'%'+_0x48fb52[_0xeabc('0x32')]['filter']+'%'};return _0xe8fa6e;}})});}_0x38572d=_[_0xeabc('0x3e')]({},_0x38572d,_0x48fb52[_0xeabc('0x3f')]);var _0xeeef02={'where':_0x38572d['where']};return db['ScreenRecording']['count'](_0xeeef02)[_0xeabc('0x25')](function(_0x23fb33){_0x2f8633[_0xeabc('0x1e')]=_0x23fb33;if(_0x48fb52['query']['includeAll']){_0x38572d[_0xeabc('0x40')]=[{'all':!![]}];}return db[_0xeabc('0x2c')]['findAll'](_0x38572d);})[_0xeabc('0x25')](function(_0x5e0b78){_0x2f8633[_0xeabc('0x41')]=_0x5e0b78;return _0x2f8633;})['then'](respondWithFilteredResult(_0x2163e6,_0x38572d))['catch'](handleError(_0x2163e6,null));};exports['show']=function(_0x25958b,_0x37c926){var _0xd03226={'raw':![],'where':{'id':_0x25958b['params']['id']}},_0x3eeeb5={};_0x3eeeb5[_0xeabc('0x2f')]=_['keys'](db[_0xeabc('0x2c')][_0xeabc('0x2d')]);_0x3eeeb5[_0xeabc('0x32')]=_[_0xeabc('0x33')](_0x25958b[_0xeabc('0x32')]);_0x3eeeb5['filters']=_['intersection'](_0x3eeeb5[_0xeabc('0x2f')],_0x3eeeb5['query']);_0xd03226[_0xeabc('0x36')]=_[_0xeabc('0x35')](_0x3eeeb5['model'],qs[_0xeabc('0x37')](_0x25958b[_0xeabc('0x32')][_0xeabc('0x37')]));_0xd03226[_0xeabc('0x36')]=_0xd03226[_0xeabc('0x36')][_0xeabc('0x38')]?_0xd03226[_0xeabc('0x36')]:_0x3eeeb5['model'];if(_0x25958b[_0xeabc('0x32')][_0xeabc('0x42')]){_0xd03226[_0xeabc('0x40')]=[{'all':!![]}];}_0xd03226=_[_0xeabc('0x3e')]({},_0xd03226,_0x25958b[_0xeabc('0x3f')]);return db[_0xeabc('0x2c')][_0xeabc('0x43')](_0xd03226)[_0xeabc('0x25')](handleEntityNotFound(_0x37c926,null))[_0xeabc('0x25')](respondWithResult(_0x37c926,null))[_0xeabc('0x44')](handleError(_0x37c926,null));};exports['create']=function(_0x38356c,_0x2e6efb){return db[_0xeabc('0x2c')][_0xeabc('0x45')](_0x38356c[_0xeabc('0x46')],{})[_0xeabc('0x25')](respondWithResult(_0x2e6efb,0xc9))[_0xeabc('0x44')](handleError(_0x2e6efb,null));};exports['update']=function(_0x766743,_0x32e09b){if(_0x766743[_0xeabc('0x46')]['id']){delete _0x766743[_0xeabc('0x46')]['id'];}delete _0x766743[_0xeabc('0x46')]['duration'];delete _0x766743[_0xeabc('0x46')][_0xeabc('0x47')];delete _0x766743[_0xeabc('0x46')][_0xeabc('0x48')];delete _0x766743['body'][_0xeabc('0x49')];return db[_0xeabc('0x2c')]['find']({'where':{'id':_0x766743[_0xeabc('0x4a')]['id']}})['then'](handleEntityNotFound(_0x32e09b,null))[_0xeabc('0x25')](saveUpdates(_0x766743['body'],null))[_0xeabc('0x25')](respondWithResult(_0x32e09b,null))[_0xeabc('0x44')](handleError(_0x32e09b,null));};exports[_0xeabc('0x4b')]=function(_0x1524c3,_0x1ee837){return db[_0xeabc('0x2c')][_0xeabc('0x4b')]()[_0xeabc('0x25')](respondWithResult(_0x1ee837,null))[_0xeabc('0x44')](handleError(_0x1ee837,null));};exports[_0xeabc('0x4c')]=function(_0x48a13f,_0x180a14,_0x2537ab){var _0x4072cb=require(_0xeabc('0x4d'));var _0x555d6b=![];var _0x1cef45={};if(_0x48a13f[_0xeabc('0x32')][_0xeabc('0x2e')]&&_0x48a13f[_0xeabc('0x32')]['type']===_0xeabc('0x4e')){_0x1cef45[_0xeabc('0x4e')]=_0x48a13f[_0xeabc('0x4a')]['id'];}else{_0x1cef45['id']=_0x48a13f[_0xeabc('0x4a')]['id'];}return db[_0xeabc('0x2c')][_0xeabc('0x43')]({'where':_0x1cef45,'attributes':['id',_0xeabc('0x49')],'raw':!![]})[_0xeabc('0x25')](handleEntityNotFound(_0x180a14,null))[_0xeabc('0x25')](function(_0x58ab08){if(_0x58ab08){var _0x4546c4=path['join'](config['root'],'server/files/screen_recordings',_0x58ab08[_0xeabc('0x49')]);var _0x8d4cca=util[_0xeabc('0x31')](_0xeabc('0x4f'),_0x4546c4);if(fs[_0xeabc('0x50')](_0x8d4cca)){_0x555d6b=!![];return _0x4072cb[_0xeabc('0x51')](_0x8d4cca,_0x4546c4,config['secrets'][_0xeabc('0x52')])[_0xeabc('0x25')](function(){return _0x58ab08;});}return _0x58ab08;}})[_0xeabc('0x25')](function(_0x104c1e){if(_0x104c1e){var _0x2ddc53=path[_0xeabc('0x53')](config[_0xeabc('0x54')],_0xeabc('0x55'),_0x104c1e['value']);if(!fs['existsSync'](_0x2ddc53)){throw new db[(_0xeabc('0x56'))][(_0xeabc('0x57'))](_0xeabc('0x58'));}if(_0x104c1e['filename']){return _0x180a14[_0xeabc('0x4c')](_0x2ddc53,_0x104c1e['filename']+path['extname'](_0x2ddc53),function(){if(_0x555d6b){fs[_0xeabc('0x59')](_0x2ddc53);}});}else{return _0x180a14[_0xeabc('0x4c')](_0x2ddc53,function(_0x13f04f){if(_0x555d6b){fs[_0xeabc('0x59')](_0x2ddc53);}});}}})[_0xeabc('0x44')](function(_0xc2ef0c){if(_0xc2ef0c['message']===_0xeabc('0x58')){_0x180a14[_0xeabc('0x1a')](0x194)[_0xeabc('0x29')](_0xeabc('0x5a'));}else{return handleError(_0x180a14,null);}});};exports[_0xeabc('0x5b')]=function(_0x514787,_0x5c61b4){return db[_0xeabc('0x2c')][_0xeabc('0x43')]({'where':{'id':_0x514787[_0xeabc('0x4a')]['id']}})[_0xeabc('0x25')](function(_0x1b61a8){if(_[_0xeabc('0x5c')](_0x1b61a8)){throw new ReferenceError(_0xeabc('0x5d'));}return _0x1b61a8;})[_0xeabc('0x25')](function(_0x3f829b){var _0x54d2b3=path[_0xeabc('0x53')](config['root'],_0xeabc('0x55'),_0x3f829b[_0xeabc('0x49')]);logger[_0xeabc('0x5e')](_0xeabc('0x5f'),_0x54d2b3);if(!_[_0xeabc('0x5c')](_0x3f829b[_0xeabc('0x49')])&&fs[_0xeabc('0x50')](_0x54d2b3)){logger[_0xeabc('0x5e')](_0xeabc('0x60')+_0x54d2b3+_0xeabc('0x61'));fs['unlinkSync'](_0x54d2b3);}_0x54d2b3=_0x54d2b3+_0xeabc('0x62');if(!_[_0xeabc('0x5c')](_0x3f829b[_0xeabc('0x49')])&&fs[_0xeabc('0x50')](_0x54d2b3)){logger['info'](_0xeabc('0x60')+_0x54d2b3+'\x22\x20trovato\x20eseguo\x20la\x20cancellazione');fs['unlinkSync'](_0x54d2b3);}return _0x3f829b;})[_0xeabc('0x25')](function(_0x11bc62){if(!_0x11bc62)throw new InternalError();return _0x11bc62[_0xeabc('0x5b')]();})[_0xeabc('0x25')](function(){_0x5c61b4['status'](0xcc)['end']();})[_0xeabc('0x44')](handleError(_0x5c61b4,null));}; \ No newline at end of file diff --git a/server/api/screenRecording/screenRecording.model.js b/server/api/screenRecording/screenRecording.model.js index 7d9a616..5d596dd 100644 --- a/server/api/screenRecording/screenRecording.model.js +++ b/server/api/screenRecording/screenRecording.model.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x4ef8=['util','../../config/logger','api','moment','bluebird','request-promise','rimraf','./screenRecording.attributes','exports','define','ScreenRecording','screen_recordings','interactionid','lodash'];(function(_0x56649c,_0x123f15){var _0x59114c=function(_0x3a52e6){while(--_0x3a52e6){_0x56649c['push'](_0x56649c['shift']());}};_0x59114c(++_0x123f15);}(_0x4ef8,0xdf));var _0x84ef=function(_0x948065,_0x402299){_0x948065=_0x948065-0x0;var _0x8bacf4=_0x4ef8[_0x948065];return _0x8bacf4;};'use strict';var _=require(_0x84ef('0x0'));var util=require(_0x84ef('0x1'));var logger=require(_0x84ef('0x2'))(_0x84ef('0x3'));var moment=require(_0x84ef('0x4'));var BPromise=require(_0x84ef('0x5'));var rp=require(_0x84ef('0x6'));var fs=require('fs');var path=require('path');var rimraf=require(_0x84ef('0x7'));var config=require('../../config/environment');var attributes=require(_0x84ef('0x8'));module[_0x84ef('0x9')]=function(_0x11eaea,_0x39a0b4){return _0x11eaea[_0x84ef('0xa')](_0x84ef('0xb'),attributes,{'tableName':_0x84ef('0xc'),'paranoid':![],'indexes':[{'name':_0x84ef('0xd'),'fields':[_0x84ef('0xd')]}],'timestamps':!![]});}; \ No newline at end of file +var _0xd6f2=['interactionid','util','api','moment','request-promise','path','../../config/environment','exports','ScreenRecording'];(function(_0x4b4b0e,_0x6c674){var _0x4c2d91=function(_0x4d440d){while(--_0x4d440d){_0x4b4b0e['push'](_0x4b4b0e['shift']());}};_0x4c2d91(++_0x6c674);}(_0xd6f2,0x1b1));var _0x2d6f=function(_0x1e81d2,_0x25dbda){_0x1e81d2=_0x1e81d2-0x0;var _0x1ea265=_0xd6f2[_0x1e81d2];return _0x1ea265;};'use strict';var _=require('lodash');var util=require(_0x2d6f('0x0'));var logger=require('../../config/logger')(_0x2d6f('0x1'));var moment=require(_0x2d6f('0x2'));var BPromise=require('bluebird');var rp=require(_0x2d6f('0x3'));var fs=require('fs');var path=require(_0x2d6f('0x4'));var rimraf=require('rimraf');var config=require(_0x2d6f('0x5'));var attributes=require('./screenRecording.attributes');module[_0x2d6f('0x6')]=function(_0x2ba25a,_0x2628cb){return _0x2ba25a['define'](_0x2d6f('0x7'),attributes,{'tableName':'screen_recordings','paranoid':![],'indexes':[{'name':'interactionid','fields':[_0x2d6f('0x8')]}],'timestamps':!![]});}; \ No newline at end of file diff --git a/server/api/screenRecording/screenRecording.rpc.js b/server/api/screenRecording/screenRecording.rpc.js index be8e3a4..a7772e3 100644 --- a/server/api/screenRecording/screenRecording.rpc.js +++ b/server/api/screenRecording/screenRecording.rpc.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x3c33=['request\x20sent','stringify','error','code','message','result','moment','bluebird','randomstring','ioredis','../../config/utils','../../config/logger','rpc','jayson/promise','client','http','info','ScreenRecording,\x20%s,\x20%s','debug'];(function(_0x382e89,_0x4768c0){var _0x3a1318=function(_0x79e1ce){while(--_0x79e1ce){_0x382e89['push'](_0x382e89['shift']());}};_0x3a1318(++_0x4768c0);}(_0x3c33,0x149));var _0x33c3=function(_0x2ac7a8,_0x3d83f0){_0x2ac7a8=_0x2ac7a8-0x0;var _0x2d4509=_0x3c33[_0x2ac7a8];return _0x2d4509;};'use strict';var _=require('lodash');var util=require('util');var moment=require(_0x33c3('0x0'));var BPromise=require(_0x33c3('0x1'));var rs=require(_0x33c3('0x2'));var fs=require('fs');var Redis=require(_0x33c3('0x3'));var db=require('../../mysqldb')['db'];var utils=require(_0x33c3('0x4'));var logger=require(_0x33c3('0x5'))(_0x33c3('0x6'));var config=require('../../config/environment');var jayson=require(_0x33c3('0x7'));var client=jayson[_0x33c3('0x8')][_0x33c3('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x195ae3,_0x2e4d6c,_0x4353d5){return new BPromise(function(_0x385588,_0x11de0b){return client['request'](_0x195ae3,_0x4353d5)['then'](function(_0x31871d){logger[_0x33c3('0xa')](_0x33c3('0xb'),_0x2e4d6c,'request\x20sent');logger[_0x33c3('0xc')]('ScreenRecording,\x20%s,\x20%s,\x20%s',_0x2e4d6c,_0x33c3('0xd'),JSON[_0x33c3('0xe')](_0x31871d));if(_0x31871d['error']){if(_0x31871d[_0x33c3('0xf')][_0x33c3('0x10')]===0x1f4){logger['error'](_0x33c3('0xb'),_0x2e4d6c,_0x31871d[_0x33c3('0xf')][_0x33c3('0x11')]);return _0x11de0b(_0x31871d['error'][_0x33c3('0x11')]);}logger[_0x33c3('0xf')](_0x33c3('0xb'),_0x2e4d6c,_0x31871d[_0x33c3('0xf')][_0x33c3('0x11')]);return _0x385588(_0x31871d['error'][_0x33c3('0x11')]);}else{logger[_0x33c3('0xa')](_0x33c3('0xb'),_0x2e4d6c,_0x33c3('0xd'));_0x385588(_0x31871d[_0x33c3('0x12')][_0x33c3('0x11')]);}})['catch'](function(_0x1653b2){logger[_0x33c3('0xf')](_0x33c3('0xb'),_0x2e4d6c,_0x1653b2);_0x11de0b(_0x1653b2);});});} \ No newline at end of file +var _0xb978=['http','request','then','info','ScreenRecording,\x20%s,\x20%s','debug','request\x20sent','stringify','error','code','message','lodash','util','bluebird','ioredis','../../mysqldb','../../config/utils','rpc','jayson/promise','client'];(function(_0x59dccc,_0x184c1c){var _0xc97bcb=function(_0x1ddbcb){while(--_0x1ddbcb){_0x59dccc['push'](_0x59dccc['shift']());}};_0xc97bcb(++_0x184c1c);}(_0xb978,0x123));var _0x8b97=function(_0x2b7be3,_0x354e7a){_0x2b7be3=_0x2b7be3-0x0;var _0x162e27=_0xb978[_0x2b7be3];return _0x162e27;};'use strict';var _=require(_0x8b97('0x0'));var util=require(_0x8b97('0x1'));var moment=require('moment');var BPromise=require(_0x8b97('0x2'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x8b97('0x3'));var db=require(_0x8b97('0x4'))['db'];var utils=require(_0x8b97('0x5'));var logger=require('../../config/logger')(_0x8b97('0x6'));var config=require('../../config/environment');var jayson=require(_0x8b97('0x7'));var client=jayson[_0x8b97('0x8')][_0x8b97('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x3a247d,_0x430b62,_0x475c91){return new BPromise(function(_0x1afd1a,_0x3703eb){return client[_0x8b97('0xa')](_0x3a247d,_0x475c91)[_0x8b97('0xb')](function(_0x104ca1){logger[_0x8b97('0xc')](_0x8b97('0xd'),_0x430b62,'request\x20sent');logger[_0x8b97('0xe')]('ScreenRecording,\x20%s,\x20%s,\x20%s',_0x430b62,_0x8b97('0xf'),JSON[_0x8b97('0x10')](_0x104ca1));if(_0x104ca1[_0x8b97('0x11')]){if(_0x104ca1[_0x8b97('0x11')][_0x8b97('0x12')]===0x1f4){logger[_0x8b97('0x11')](_0x8b97('0xd'),_0x430b62,_0x104ca1[_0x8b97('0x11')][_0x8b97('0x13')]);return _0x3703eb(_0x104ca1['error']['message']);}logger[_0x8b97('0x11')](_0x8b97('0xd'),_0x430b62,_0x104ca1['error']['message']);return _0x1afd1a(_0x104ca1[_0x8b97('0x11')][_0x8b97('0x13')]);}else{logger[_0x8b97('0xc')](_0x8b97('0xd'),_0x430b62,'request\x20sent');_0x1afd1a(_0x104ca1['result']['message']);}})['catch'](function(_0x308578){logger['error'](_0x8b97('0xd'),_0x430b62,_0x308578);_0x3703eb(_0x308578);});});} \ No newline at end of file diff --git a/server/api/setting/index.js b/server/api/setting/index.js index 815650a..30234c5 100644 --- a/server/api/setting/index.js +++ b/server/api/setting/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x43f9=['../../components/interaction/service','../../config/environment','./setting.controller','get','isAuthenticated','getDate','/:id/logo','getLogo','getLogoLogin','/:id/gdpr','getPreferred','/:id/favicon','diskStorage','join','root','server/files/images/logos/','format','logo','extname','originalname','post','single','file','%s%s','logologin','/:id/logo_login','preferred','addPreferred','addFavicon','put','/:id','exports','util','path','connect-timeout','fs-extra','../../components/auth/service'];(function(_0x10969f,_0x1c9c9f){var _0x29c528=function(_0x48777b){while(--_0x48777b){_0x10969f['push'](_0x10969f['shift']());}};_0x29c528(++_0x1c9c9f);}(_0x43f9,0x6a));var _0x943f=function(_0x382948,_0x59f7ec){_0x382948=_0x382948-0x0;var _0xf4bbf2=_0x43f9[_0x382948];return _0xf4bbf2;};'use strict';var multer=require('multer');var util=require(_0x943f('0x0'));var path=require(_0x943f('0x1'));var timeout=require(_0x943f('0x2'));var express=require('express');var router=express['Router']();var fs_extra=require(_0x943f('0x3'));var auth=require(_0x943f('0x4'));var interaction=require(_0x943f('0x5'));var config=require(_0x943f('0x6'));var controller=require(_0x943f('0x7'));router[_0x943f('0x8')]('/',auth[_0x943f('0x9')](),controller['index']);router['get']('/now',controller[_0x943f('0xa')]);router[_0x943f('0x8')]('/:id',controller['show']);router['get'](_0x943f('0xb'),controller[_0x943f('0xc')]);router['get']('/:id/logo_login',controller[_0x943f('0xd')]);router['get'](_0x943f('0xe'),controller['gdpr']);router[_0x943f('0x8')]('/:id/preferred',controller[_0x943f('0xf')]);router[_0x943f('0x8')](_0x943f('0x10'),controller['getFavicon']);var upload=multer({'storage':multer[_0x943f('0x11')]({'destination':function(_0x35a8fa,_0x8ffa60,_0x5154d1){_0x5154d1(null,path[_0x943f('0x12')](config[_0x943f('0x13')],_0x943f('0x14')));},'filename':function(_0x1c9cd4,_0x1dda20,_0x56d907){_0x56d907(null,util[_0x943f('0x15')]('%s%s',_0x943f('0x16'),path[_0x943f('0x17')](_0x1dda20[_0x943f('0x18')])));}})});router[_0x943f('0x19')](_0x943f('0xb'),upload[_0x943f('0x1a')](_0x943f('0x1b')),controller['addLogo']);var upload=multer({'storage':multer['diskStorage']({'destination':function(_0x4e4b95,_0x437af4,_0x497dd8){_0x497dd8(null,path[_0x943f('0x12')](config[_0x943f('0x13')],_0x943f('0x14')));},'filename':function(_0x2eb907,_0x318805,_0x123d3b){_0x123d3b(null,util[_0x943f('0x15')](_0x943f('0x1c'),_0x943f('0x1d'),path[_0x943f('0x17')](_0x318805[_0x943f('0x18')])));}})});router[_0x943f('0x19')](_0x943f('0x1e'),upload[_0x943f('0x1a')](_0x943f('0x1b')),controller['addLogoLogin']);var upload=multer({'storage':multer[_0x943f('0x11')]({'destination':function(_0x3899bb,_0x431544,_0x4b0108){_0x4b0108(null,path[_0x943f('0x12')](config[_0x943f('0x13')],_0x943f('0x14')));},'filename':function(_0x2dfe19,_0x141cd2,_0x233db7){_0x233db7(null,util['format'](_0x943f('0x1c'),_0x943f('0x1f'),path['extname'](_0x141cd2[_0x943f('0x18')])));}})});router[_0x943f('0x19')]('/:id/preferred',upload[_0x943f('0x1a')](_0x943f('0x1b')),controller[_0x943f('0x20')]);var upload=multer({'storage':multer[_0x943f('0x11')]({'destination':function(_0xd8081c,_0x512011,_0x4e0394){_0x4e0394(null,path[_0x943f('0x12')](config[_0x943f('0x13')],'server/files/images/logos/'));},'filename':function(_0x361638,_0x981748,_0x1e1c1a){_0x1e1c1a(null,util[_0x943f('0x15')](_0x943f('0x1c'),'favicon',path[_0x943f('0x17')](_0x981748[_0x943f('0x18')])));}})});router['post'](_0x943f('0x10'),upload[_0x943f('0x1a')](_0x943f('0x1b')),controller[_0x943f('0x21')]);router[_0x943f('0x22')](_0x943f('0x23'),auth[_0x943f('0x9')](),controller['update']);module[_0x943f('0x24')]=router; \ No newline at end of file +var _0xf111=['server/files/images/logos/','%s%s','logologin','file','addLogoLogin','preferred','addPreferred','favicon','addFavicon','put','update','exports','connect-timeout','express','Router','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','./setting.controller','isAuthenticated','index','get','/now','getDate','/:id','/:id/logo','getLogo','/:id/logo_login','getLogoLogin','/:id/gdpr','gdpr','/:id/preferred','getPreferred','getFavicon','diskStorage','join','format','logo','extname','originalname','post','single','root'];(function(_0x500d15,_0x5d0dde){var _0x45a955=function(_0xe025aa){while(--_0xe025aa){_0x500d15['push'](_0x500d15['shift']());}};_0x45a955(++_0x5d0dde);}(_0xf111,0x198));var _0x1f11=function(_0x1196b0,_0x36c47a){_0x1196b0=_0x1196b0-0x0;var _0x111c52=_0xf111[_0x1196b0];return _0x111c52;};'use strict';var multer=require('multer');var util=require('util');var path=require('path');var timeout=require(_0x1f11('0x0'));var express=require(_0x1f11('0x1'));var router=express[_0x1f11('0x2')]();var fs_extra=require(_0x1f11('0x3'));var auth=require(_0x1f11('0x4'));var interaction=require(_0x1f11('0x5'));var config=require(_0x1f11('0x6'));var controller=require(_0x1f11('0x7'));router['get']('/',auth[_0x1f11('0x8')](),controller[_0x1f11('0x9')]);router[_0x1f11('0xa')](_0x1f11('0xb'),controller[_0x1f11('0xc')]);router[_0x1f11('0xa')](_0x1f11('0xd'),controller['show']);router[_0x1f11('0xa')](_0x1f11('0xe'),controller[_0x1f11('0xf')]);router['get'](_0x1f11('0x10'),controller[_0x1f11('0x11')]);router[_0x1f11('0xa')](_0x1f11('0x12'),controller[_0x1f11('0x13')]);router['get'](_0x1f11('0x14'),controller[_0x1f11('0x15')]);router['get']('/:id/favicon',controller[_0x1f11('0x16')]);var upload=multer({'storage':multer[_0x1f11('0x17')]({'destination':function(_0x2550eb,_0x872de5,_0x42fede){_0x42fede(null,path[_0x1f11('0x18')](config['root'],'server/files/images/logos/'));},'filename':function(_0x32c342,_0x501317,_0x3edf12){_0x3edf12(null,util[_0x1f11('0x19')]('%s%s',_0x1f11('0x1a'),path[_0x1f11('0x1b')](_0x501317[_0x1f11('0x1c')])));}})});router[_0x1f11('0x1d')](_0x1f11('0xe'),upload[_0x1f11('0x1e')]('file'),controller['addLogo']);var upload=multer({'storage':multer[_0x1f11('0x17')]({'destination':function(_0x4ebaec,_0x3c4865,_0x11bcf0){_0x11bcf0(null,path[_0x1f11('0x18')](config[_0x1f11('0x1f')],_0x1f11('0x20')));},'filename':function(_0x1c660b,_0xb10384,_0x4b43bb){_0x4b43bb(null,util[_0x1f11('0x19')](_0x1f11('0x21'),_0x1f11('0x22'),path[_0x1f11('0x1b')](_0xb10384[_0x1f11('0x1c')])));}})});router[_0x1f11('0x1d')]('/:id/logo_login',upload[_0x1f11('0x1e')](_0x1f11('0x23')),controller[_0x1f11('0x24')]);var upload=multer({'storage':multer[_0x1f11('0x17')]({'destination':function(_0x159dec,_0x5df54b,_0x231705){_0x231705(null,path[_0x1f11('0x18')](config[_0x1f11('0x1f')],_0x1f11('0x20')));},'filename':function(_0x193ad7,_0x2e5c6d,_0x894519){_0x894519(null,util['format']('%s%s',_0x1f11('0x25'),path[_0x1f11('0x1b')](_0x2e5c6d['originalname'])));}})});router['post'](_0x1f11('0x14'),upload[_0x1f11('0x1e')]('file'),controller[_0x1f11('0x26')]);var upload=multer({'storage':multer[_0x1f11('0x17')]({'destination':function(_0x2dd41f,_0x5b0957,_0x2b998c){_0x2b998c(null,path[_0x1f11('0x18')](config[_0x1f11('0x1f')],'server/files/images/logos/'));},'filename':function(_0x35ebdf,_0x1c9f05,_0x21583d){_0x21583d(null,util[_0x1f11('0x19')](_0x1f11('0x21'),_0x1f11('0x27'),path[_0x1f11('0x1b')](_0x1c9f05[_0x1f11('0x1c')])));}})});router[_0x1f11('0x1d')]('/:id/favicon',upload[_0x1f11('0x1e')](_0x1f11('0x23')),controller[_0x1f11('0x28')]);router[_0x1f11('0x29')]('/:id',auth[_0x1f11('0x8')](),controller[_0x1f11('0x2a')]);module[_0x1f11('0x2b')]=router; \ No newline at end of file diff --git a/server/api/setting/setting.attributes.js b/server/api/setting/setting.attributes.js index 0fa59ed..3b4b181 100644 --- a/server/api/setting/setting.attributes.js +++ b/server/api/setting/setting.attributes.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xa9e0=['BOOLEAN','alternate','UNSIGNED','sequelize','exports','INTEGER','min_mailbox','STRING','/var/opt/motion2/server/files/sounds/converted'];(function(_0x4a083d,_0x1b7372){var _0x52e21d=function(_0x217e82){while(--_0x217e82){_0x4a083d['push'](_0x4a083d['shift']());}};_0x52e21d(++_0x1b7372);}(_0xa9e0,0x123));var _0x0a9e=function(_0x139a3c,_0x4fc883){_0x139a3c=_0x139a3c-0x0;var _0x2b375b=_0xa9e0[_0x139a3c];return _0x2b375b;};'use strict';var Sequelize=require(_0x0a9e('0x0'));module[_0x0a9e('0x1')]={'min_internal':{'type':Sequelize[_0x0a9e('0x2')](0xb),'unique':'min_internal','defaultValue':0x3e8},'min_mailbox':{'type':Sequelize['INTEGER'](0xb),'unique':_0x0a9e('0x3'),'defaultValue':0x3e8},'agi_port':{'type':Sequelize['INTEGER'](0xb),'defaultValue':0x11dd},'soundPath':{'type':Sequelize[_0x0a9e('0x4')],'defaultValue':_0x0a9e('0x5')},'logo':{'type':Sequelize[_0x0a9e('0x4')]},'defaultLogo':{'type':Sequelize[_0x0a9e('0x6')],'defaultValue':!![]},'loginLogo':{'type':Sequelize[_0x0a9e('0x4')]},'defaultLoginLogo':{'type':Sequelize['BOOLEAN'],'defaultValue':!![]},'headerWhiteLabel':{'type':Sequelize[_0x0a9e('0x4')]},'defaultHeaderWhiteLabel':{'type':Sequelize[_0x0a9e('0x6')],'defaultValue':!![]},'securePassword':{'type':Sequelize[_0x0a9e('0x6')],'defaultValue':!![]},'firstSetup':{'type':Sequelize['BOOLEAN'],'defaultValue':!![]},'stunaddr':{'type':Sequelize['STRING']},'turnaddr':{'type':Sequelize[_0x0a9e('0x4')]},'turnusername':{'type':Sequelize['STRING']},'turnpassword':{'type':Sequelize['STRING']},'pageTitle':{'type':Sequelize[_0x0a9e('0x4')]},'defaultPageTitle':{'type':Sequelize[_0x0a9e('0x6')],'defaultValue':!![]},'callRecordingEncryption':{'type':Sequelize[_0x0a9e('0x6')],'defaultValue':![]},'passwordExpiresDays':{'type':Sequelize[_0x0a9e('0x2')](0xb),'defaultValue':0x5a},'phoneBarAutoUpdater':{'type':Sequelize[_0x0a9e('0x6')],'defaultValue':!![]},'phoneBarAutoUpdaterUrl':{'type':Sequelize[_0x0a9e('0x4')],'defaultValue':'https://www.xcally.com/bar/phonebar/autoupdater.xml'},'enableEmailPreview':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'split':{'type':Sequelize['BOOLEAN'],'defaultValue':!![]},'splitSizeCsv':{'type':Sequelize['INTEGER'],'defaultValue':0x1388},'splitSizePdf':{'type':Sequelize[_0x0a9e('0x2')],'defaultValue':0x1388},'splitSizeXlsx':{'type':Sequelize[_0x0a9e('0x2')],'defaultValue':0x1388},'messagesAlignment':{'type':Sequelize[_0x0a9e('0x4')],'defaultValue':_0x0a9e('0x7')},'chatTimeout':{'type':Sequelize[_0x0a9e('0x2')],'defaultValue':0x1e},'phoneBarRememberMeEnabled':{'type':Sequelize[_0x0a9e('0x6')],'defaultValue':!![]},'preferred':{'type':Sequelize['STRING']},'defaultPreferred':{'type':Sequelize[_0x0a9e('0x6')],'defaultValue':!![]},'rtlSupport':{'type':Sequelize[_0x0a9e('0x6')],'defaultValue':![]},'defaultScreenRecordingPath':{'type':Sequelize[_0x0a9e('0x4')]},'allowedLoginAttempts':{'type':Sequelize[_0x0a9e('0x2')],'defaultValue':0x5},'blockDuration':{'type':Sequelize[_0x0a9e('0x2')],'defaultValue':0xa},'favicon':{'type':Sequelize[_0x0a9e('0x4')]},'defaultFavicon':{'type':Sequelize['BOOLEAN'],'defaultValue':!![]},'loginMailFrequency':{'type':Sequelize[_0x0a9e('0x2')],'defaultValue':0xa,'validate':{'min':0xa}},'transcribe':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'automaticTranscribe':{'type':Sequelize[_0x0a9e('0x6')],'defaultValue':![]},'transcribeAccountId':{'type':Sequelize['INTEGER']},'transcribeRegion':{'type':Sequelize[_0x0a9e('0x4')]},'sentiment':{'type':Sequelize[_0x0a9e('0x6')],'defaultValue':![]},'automaticSentiment':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'sentimentAccountId':{'type':Sequelize[_0x0a9e('0x2')]},'sentimentRegion':{'type':Sequelize['STRING']},'language':{'type':Sequelize[_0x0a9e('0x4')]},'bucket':{'type':Sequelize[_0x0a9e('0x4')]},'googleSsoEnabled':{'type':Sequelize[_0x0a9e('0x6')],'defaultValue':![]},'adSsoEnabled':{'type':Sequelize[_0x0a9e('0x6')],'defaultValue':![]},'enforcePasswordHistory':{'type':Sequelize[_0x0a9e('0x6')],'defaultValue':!![]},'passwordHistoryLimit':{'type':Sequelize[_0x0a9e('0x2')](0x2)[_0x0a9e('0x8')],'defaultValue':0x3,'validate':{'min':0x1,'max':0x5}},'privacyPolicyEmail':{'type':Sequelize[_0x0a9e('0x2')](0x2)[_0x0a9e('0x8')],'defaultValue':0x0},'privacyPolicyName':{'type':Sequelize[_0x0a9e('0x2')](0x2)[_0x0a9e('0x8')],'defaultValue':0x0},'privacyPolicyNumber':{'type':Sequelize[_0x0a9e('0x2')](0x2)['UNSIGNED'],'defaultValue':0x0},'searchOnEnterKey':{'type':Sequelize[_0x0a9e('0x6')],'defaultValue':!![]},'chatInteractionsReloadTimeout':{'type':Sequelize[_0x0a9e('0x2')],'defaultValue':0x0},'mailInteractionsReloadTimeout':{'type':Sequelize['INTEGER'],'defaultValue':0x0},'openchannelInteractionsReloadTimeout':{'type':Sequelize[_0x0a9e('0x2')],'defaultValue':0x0},'smsInteractionsReloadTimeout':{'type':Sequelize['INTEGER'],'defaultValue':0x0},'whatsappInteractionsReloadTimeout':{'type':Sequelize['INTEGER'],'defaultValue':0x0},'stopRecordingOnTransfer':{'type':Sequelize[_0x0a9e('0x6')],'defaultValue':![]},'secureCookieEnabled':{'type':Sequelize[_0x0a9e('0x6')],'defaultValue':!![]},'viewHelpSection':{'type':Sequelize[_0x0a9e('0x6')],'defaultValue':!![]},'previewRecallmeReminderInterval':{'type':Sequelize[_0x0a9e('0x2')],'defaultValue':0x5,'validate':{'min':0x1}},'disabledCookie':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'limitTabs':{'type':Sequelize[_0x0a9e('0x2')],'defaultValue':0x14}}; \ No newline at end of file +var _0xa9e0=['BOOLEAN','alternate','UNSIGNED','sequelize','exports','INTEGER','min_mailbox','STRING','/var/opt/motion2/server/files/sounds/converted'];(function(_0x593c49,_0x385ade){var _0x2926fb=function(_0x4c7ed0){while(--_0x4c7ed0){_0x593c49['push'](_0x593c49['shift']());}};_0x2926fb(++_0x385ade);}(_0xa9e0,0x123));var _0x0a9e=function(_0x5447fd,_0x52a6b5){_0x5447fd=_0x5447fd-0x0;var _0x15b28a=_0xa9e0[_0x5447fd];return _0x15b28a;};'use strict';var Sequelize=require(_0x0a9e('0x0'));module[_0x0a9e('0x1')]={'min_internal':{'type':Sequelize[_0x0a9e('0x2')](0xb),'unique':'min_internal','defaultValue':0x3e8},'min_mailbox':{'type':Sequelize['INTEGER'](0xb),'unique':_0x0a9e('0x3'),'defaultValue':0x3e8},'agi_port':{'type':Sequelize['INTEGER'](0xb),'defaultValue':0x11dd},'soundPath':{'type':Sequelize[_0x0a9e('0x4')],'defaultValue':_0x0a9e('0x5')},'logo':{'type':Sequelize[_0x0a9e('0x4')]},'defaultLogo':{'type':Sequelize[_0x0a9e('0x6')],'defaultValue':!![]},'loginLogo':{'type':Sequelize[_0x0a9e('0x4')]},'defaultLoginLogo':{'type':Sequelize['BOOLEAN'],'defaultValue':!![]},'headerWhiteLabel':{'type':Sequelize[_0x0a9e('0x4')]},'defaultHeaderWhiteLabel':{'type':Sequelize[_0x0a9e('0x6')],'defaultValue':!![]},'securePassword':{'type':Sequelize[_0x0a9e('0x6')],'defaultValue':!![]},'firstSetup':{'type':Sequelize['BOOLEAN'],'defaultValue':!![]},'stunaddr':{'type':Sequelize['STRING']},'turnaddr':{'type':Sequelize[_0x0a9e('0x4')]},'turnusername':{'type':Sequelize['STRING']},'turnpassword':{'type':Sequelize['STRING']},'pageTitle':{'type':Sequelize[_0x0a9e('0x4')]},'defaultPageTitle':{'type':Sequelize[_0x0a9e('0x6')],'defaultValue':!![]},'callRecordingEncryption':{'type':Sequelize[_0x0a9e('0x6')],'defaultValue':![]},'passwordExpiresDays':{'type':Sequelize[_0x0a9e('0x2')](0xb),'defaultValue':0x5a},'phoneBarAutoUpdater':{'type':Sequelize[_0x0a9e('0x6')],'defaultValue':!![]},'phoneBarAutoUpdaterUrl':{'type':Sequelize[_0x0a9e('0x4')],'defaultValue':'https://www.xcally.com/bar/phonebar/autoupdater.xml'},'enableEmailPreview':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'split':{'type':Sequelize['BOOLEAN'],'defaultValue':!![]},'splitSizeCsv':{'type':Sequelize['INTEGER'],'defaultValue':0x1388},'splitSizePdf':{'type':Sequelize[_0x0a9e('0x2')],'defaultValue':0x1388},'splitSizeXlsx':{'type':Sequelize[_0x0a9e('0x2')],'defaultValue':0x1388},'messagesAlignment':{'type':Sequelize[_0x0a9e('0x4')],'defaultValue':_0x0a9e('0x7')},'chatTimeout':{'type':Sequelize[_0x0a9e('0x2')],'defaultValue':0x1e},'phoneBarRememberMeEnabled':{'type':Sequelize[_0x0a9e('0x6')],'defaultValue':!![]},'preferred':{'type':Sequelize['STRING']},'defaultPreferred':{'type':Sequelize[_0x0a9e('0x6')],'defaultValue':!![]},'rtlSupport':{'type':Sequelize[_0x0a9e('0x6')],'defaultValue':![]},'defaultScreenRecordingPath':{'type':Sequelize[_0x0a9e('0x4')]},'allowedLoginAttempts':{'type':Sequelize[_0x0a9e('0x2')],'defaultValue':0x5},'blockDuration':{'type':Sequelize[_0x0a9e('0x2')],'defaultValue':0xa},'favicon':{'type':Sequelize[_0x0a9e('0x4')]},'defaultFavicon':{'type':Sequelize['BOOLEAN'],'defaultValue':!![]},'loginMailFrequency':{'type':Sequelize[_0x0a9e('0x2')],'defaultValue':0xa,'validate':{'min':0xa}},'transcribe':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'automaticTranscribe':{'type':Sequelize[_0x0a9e('0x6')],'defaultValue':![]},'transcribeAccountId':{'type':Sequelize['INTEGER']},'transcribeRegion':{'type':Sequelize[_0x0a9e('0x4')]},'sentiment':{'type':Sequelize[_0x0a9e('0x6')],'defaultValue':![]},'automaticSentiment':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'sentimentAccountId':{'type':Sequelize[_0x0a9e('0x2')]},'sentimentRegion':{'type':Sequelize['STRING']},'language':{'type':Sequelize[_0x0a9e('0x4')]},'bucket':{'type':Sequelize[_0x0a9e('0x4')]},'googleSsoEnabled':{'type':Sequelize[_0x0a9e('0x6')],'defaultValue':![]},'adSsoEnabled':{'type':Sequelize[_0x0a9e('0x6')],'defaultValue':![]},'enforcePasswordHistory':{'type':Sequelize[_0x0a9e('0x6')],'defaultValue':!![]},'passwordHistoryLimit':{'type':Sequelize[_0x0a9e('0x2')](0x2)[_0x0a9e('0x8')],'defaultValue':0x3,'validate':{'min':0x1,'max':0x5}},'privacyPolicyEmail':{'type':Sequelize[_0x0a9e('0x2')](0x2)[_0x0a9e('0x8')],'defaultValue':0x0},'privacyPolicyName':{'type':Sequelize[_0x0a9e('0x2')](0x2)[_0x0a9e('0x8')],'defaultValue':0x0},'privacyPolicyNumber':{'type':Sequelize[_0x0a9e('0x2')](0x2)['UNSIGNED'],'defaultValue':0x0},'searchOnEnterKey':{'type':Sequelize[_0x0a9e('0x6')],'defaultValue':!![]},'chatInteractionsReloadTimeout':{'type':Sequelize[_0x0a9e('0x2')],'defaultValue':0x0},'mailInteractionsReloadTimeout':{'type':Sequelize['INTEGER'],'defaultValue':0x0},'openchannelInteractionsReloadTimeout':{'type':Sequelize[_0x0a9e('0x2')],'defaultValue':0x0},'smsInteractionsReloadTimeout':{'type':Sequelize['INTEGER'],'defaultValue':0x0},'whatsappInteractionsReloadTimeout':{'type':Sequelize['INTEGER'],'defaultValue':0x0},'stopRecordingOnTransfer':{'type':Sequelize[_0x0a9e('0x6')],'defaultValue':![]},'secureCookieEnabled':{'type':Sequelize[_0x0a9e('0x6')],'defaultValue':!![]},'viewHelpSection':{'type':Sequelize[_0x0a9e('0x6')],'defaultValue':!![]},'previewRecallmeReminderInterval':{'type':Sequelize[_0x0a9e('0x2')],'defaultValue':0x5,'validate':{'min':0x1}},'disabledCookie':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'limitTabs':{'type':Sequelize[_0x0a9e('0x2')],'defaultValue':0x14}}; \ No newline at end of file diff --git a/server/api/setting/setting.controller.js b/server/api/setting/setting.controller.js index d65366a..62f672d 100644 --- a/server/api/setting/setting.controller.js +++ b/server/api/setting/setting.controller.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xc090=['toLower','default_logo.svg','default','upperFirst','existsSync','Sequelize','ValidationError','\x20not\x20found','download','getLogoLogin','getLicense','favicon','default_loginLogo.svg','gdpr','securePassword','getPreferred','custom','default_preferred.png','addFavicon','default_favicon.ico','getDate','utcOffset','format','YYYY-MM-DD\x20HH:mm:ss:SSS','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','util','sox','to-csv','lodash','crypto','jsforce','desk.js','querystring','papaparse','../../components/auth/service','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../mysqldb','http','request','then','info','request\x20sent','debug','Setting,\x20%s,\x20%s,\x20%s','stringify','error','code','Setting,\x20%s,\x20%s','message','result','catch','sendStatus','status','end','json','limit','undefined','count','offset','set','Content-Range','apply','reject','save','update','destroy','name','send','index','map','Setting','rawAttributes','fieldName','type','key','model','query','keys','filters','intersection','attributes','fields','length','hasOwnProperty','nolimit','order','sort','pick','filter','where','merge','options','includeAll','include','findAll','rows','show','params','find','body','addLogo','file','filename','logo','../../config/license/util','getLogo','server/files/images/logos','loginLogo','preferred','defaultLogo','defaultLoginLogo','defaultPreferred','defaultFavicon','join','root'];(function(_0x3e87cd,_0x4613c0){var _0xc0cd3a=function(_0x3043c2){while(--_0x3043c2){_0x3e87cd['push'](_0x3e87cd['shift']());}};_0xc0cd3a(++_0x4613c0);}(_0xc090,0x112));var _0x0c09=function(_0x412bee,_0x1afcc7){_0x412bee=_0x412bee-0x0;var _0x276701=_0xc090[_0x412bee];return _0x276701;};'use strict';var emlformat=require(_0x0c09('0x0'));var rimraf=require(_0x0c09('0x1'));var zipdir=require(_0x0c09('0x2'));var jsonpatch=require(_0x0c09('0x3'));var rp=require(_0x0c09('0x4'));var moment=require(_0x0c09('0x5'));var BPromise=require(_0x0c09('0x6'));var Mustache=require(_0x0c09('0x7'));var util=require(_0x0c09('0x8'));var path=require('path');var sox=require(_0x0c09('0x9'));var csv=require(_0x0c09('0xa'));var ejs=require('ejs');var fs=require('fs');var fs_extra=require('fs-extra');var _=require(_0x0c09('0xb'));var squel=require('squel');var crypto=require(_0x0c09('0xc'));var jsforce=require(_0x0c09('0xd'));var deskjs=require(_0x0c09('0xe'));var toCsv=require('to-csv');var querystring=require(_0x0c09('0xf'));var Papa=require(_0x0c09('0x10'));var Redis=require('ioredis');var authService=require(_0x0c09('0x11'));var qs=require('../../components/parsers/qs');var as=require(_0x0c09('0x12'));var hardwareService=require(_0x0c09('0x13'));var logger=require(_0x0c09('0x14'))(_0x0c09('0x15'));var utils=require('../../config/utils');var config=require('../../config/environment');var licenseUtil=require('../../config/license/util');var db=require(_0x0c09('0x16'))['db'];var jayson=require('jayson/promise');var client=jayson['client'][_0x0c09('0x17')]({'port':0x232a});function respondWithRpcPromise(_0x4cc121,_0x341974,_0x877018,_0x21c45b){return new BPromise(function(_0xeb18fb,_0x388b2e){var _0x342daa=_0x21c45b||client;return _0x342daa[_0x0c09('0x18')](_0x4cc121,_0x877018)[_0x0c09('0x19')](function(_0x367c86){logger[_0x0c09('0x1a')]('Setting,\x20%s,\x20%s',_0x341974,_0x0c09('0x1b'));logger[_0x0c09('0x1c')](_0x0c09('0x1d'),_0x341974,_0x0c09('0x1b'),JSON[_0x0c09('0x1e')](_0x367c86));if(_0x367c86[_0x0c09('0x1f')]){if(_0x367c86[_0x0c09('0x1f')][_0x0c09('0x20')]===0x1f4){logger[_0x0c09('0x1f')](_0x0c09('0x21'),_0x341974,_0x367c86[_0x0c09('0x1f')][_0x0c09('0x22')]);return _0x388b2e(_0x367c86['error'][_0x0c09('0x22')]);}logger[_0x0c09('0x1f')]('Setting,\x20%s,\x20%s',_0x341974,_0x367c86['error'][_0x0c09('0x22')]);return _0xeb18fb(_0x367c86[_0x0c09('0x1f')][_0x0c09('0x22')]);}else{logger['info'](_0x0c09('0x21'),_0x341974,_0x0c09('0x1b'));_0xeb18fb(_0x367c86[_0x0c09('0x23')]['message']);}})[_0x0c09('0x24')](function(_0x4b9477){logger[_0x0c09('0x1f')](_0x0c09('0x21'),_0x341974,_0x4b9477);_0x388b2e(_0x4b9477);});});}function respondWithStatusCode(_0x3aaabf,_0x1dc995){_0x1dc995=_0x1dc995||0xcc;return function(_0xad7cf9){if(_0xad7cf9){return _0x3aaabf[_0x0c09('0x25')](_0x1dc995);}return _0x3aaabf[_0x0c09('0x26')](_0x1dc995)[_0x0c09('0x27')]();};}function respondWithResult(_0x4c7f0b,_0x544ac4){_0x544ac4=_0x544ac4||0xc8;return function(_0xcf0257){if(_0xcf0257){return _0x4c7f0b[_0x0c09('0x26')](_0x544ac4)[_0x0c09('0x28')](_0xcf0257);}};}function respondWithFilteredResult(_0x63bd83,_0x36e0c0){return function(_0x449262){if(_0x449262){var _0x3cfa4a=typeof _0x36e0c0['offset']==='undefined'&&typeof _0x36e0c0[_0x0c09('0x29')]===_0x0c09('0x2a');var _0x147627=_0x449262[_0x0c09('0x2b')];var _0x2ce4e9=_0x3cfa4a?0x0:_0x36e0c0[_0x0c09('0x2c')];var _0x1dee90=_0x3cfa4a?_0x449262[_0x0c09('0x2b')]:_0x36e0c0[_0x0c09('0x2c')]+_0x36e0c0[_0x0c09('0x29')];var _0x4a82bc;if(_0x1dee90>=_0x147627){_0x1dee90=_0x147627;_0x4a82bc=0xc8;}else{_0x4a82bc=0xce;}_0x63bd83['status'](_0x4a82bc);return _0x63bd83[_0x0c09('0x2d')](_0x0c09('0x2e'),_0x2ce4e9+'-'+_0x1dee90+'/'+_0x147627)['json'](_0x449262);}return null;};}function patchUpdates(_0x1070b7){return function(_0x252f4c){try{jsonpatch[_0x0c09('0x2f')](_0x252f4c,_0x1070b7,!![]);}catch(_0x2076d5){return BPromise[_0x0c09('0x30')](_0x2076d5);}return _0x252f4c[_0x0c09('0x31')]();};}function saveUpdates(_0x548e1a,_0x30407a){return function(_0x3e4ed3){if(_0x3e4ed3){return _0x3e4ed3[_0x0c09('0x32')](_0x548e1a)['then'](function(_0x39acd6){return _0x39acd6;});}return null;};}function removeEntity(_0x55bd60,_0x575677){return function(_0x55a886){if(_0x55a886){return _0x55a886[_0x0c09('0x33')]()[_0x0c09('0x19')](function(){_0x55bd60[_0x0c09('0x26')](0xcc)[_0x0c09('0x27')]();});}};}function handleEntityNotFound(_0xa4536c,_0x1f241b){return function(_0x59636d){if(!_0x59636d){_0xa4536c[_0x0c09('0x25')](0x194);}return _0x59636d;};}function handleError(_0x1e1fe9,_0x56aef1){_0x56aef1=_0x56aef1||0x1f4;return function(_0x1a72a2){logger['error'](_0x1a72a2['stack']);if(_0x1a72a2[_0x0c09('0x34')]){delete _0x1a72a2['name'];}_0x1e1fe9['status'](_0x56aef1)[_0x0c09('0x35')](_0x1a72a2);};}exports[_0x0c09('0x36')]=function(_0x2ff36c,_0x1fef88){var _0x39cd87={},_0x1b602c={},_0x10d06f={'count':0x0,'rows':[]};var _0x4beaa4=_[_0x0c09('0x37')](db[_0x0c09('0x38')][_0x0c09('0x39')],function(_0x472ef7){return{'name':_0x472ef7[_0x0c09('0x3a')],'type':_0x472ef7[_0x0c09('0x3b')][_0x0c09('0x3c')]};});_0x1b602c[_0x0c09('0x3d')]=_[_0x0c09('0x37')](_0x4beaa4,_0x0c09('0x34'));_0x1b602c[_0x0c09('0x3e')]=_[_0x0c09('0x3f')](_0x2ff36c[_0x0c09('0x3e')]);_0x1b602c[_0x0c09('0x40')]=_[_0x0c09('0x41')](_0x1b602c[_0x0c09('0x3d')],_0x1b602c[_0x0c09('0x3e')]);_0x39cd87[_0x0c09('0x42')]=_[_0x0c09('0x41')](_0x1b602c[_0x0c09('0x3d')],qs[_0x0c09('0x43')](_0x2ff36c[_0x0c09('0x3e')]['fields']));_0x39cd87['attributes']=_0x39cd87['attributes'][_0x0c09('0x44')]?_0x39cd87[_0x0c09('0x42')]:_0x1b602c[_0x0c09('0x3d')];if(!_0x2ff36c[_0x0c09('0x3e')][_0x0c09('0x45')](_0x0c09('0x46'))){_0x39cd87['limit']=qs[_0x0c09('0x29')](_0x2ff36c[_0x0c09('0x3e')]['limit']);_0x39cd87[_0x0c09('0x2c')]=qs[_0x0c09('0x2c')](_0x2ff36c['query'][_0x0c09('0x2c')]);}_0x39cd87[_0x0c09('0x47')]=qs['sort'](_0x2ff36c[_0x0c09('0x3e')][_0x0c09('0x48')]);_0x39cd87['where']=qs[_0x0c09('0x40')](_[_0x0c09('0x49')](_0x2ff36c[_0x0c09('0x3e')],_0x1b602c[_0x0c09('0x40')]),_0x4beaa4);if(_0x2ff36c[_0x0c09('0x3e')][_0x0c09('0x4a')]){_0x39cd87[_0x0c09('0x4b')]=_[_0x0c09('0x4c')](_0x39cd87['where'],{'$or':_[_0x0c09('0x37')](_0x4beaa4,function(_0x2983fc){if(_0x2983fc[_0x0c09('0x3b')]!=='VIRTUAL'){var _0xc705be={};_0xc705be[_0x2983fc[_0x0c09('0x34')]]={'$like':'%'+_0x2ff36c[_0x0c09('0x3e')][_0x0c09('0x4a')]+'%'};return _0xc705be;}})});}_0x39cd87=_[_0x0c09('0x4c')]({},_0x39cd87,_0x2ff36c[_0x0c09('0x4d')]);var _0x2b0b86={'where':_0x39cd87[_0x0c09('0x4b')]};return db['Setting'][_0x0c09('0x2b')](_0x2b0b86)[_0x0c09('0x19')](function(_0xce30ea){_0x10d06f[_0x0c09('0x2b')]=_0xce30ea;if(_0x2ff36c['query'][_0x0c09('0x4e')]){_0x39cd87[_0x0c09('0x4f')]=[{'all':!![]}];}return db[_0x0c09('0x38')][_0x0c09('0x50')](_0x39cd87);})[_0x0c09('0x19')](function(_0x2a852b){_0x10d06f[_0x0c09('0x51')]=_0x2a852b;return _0x10d06f;})[_0x0c09('0x19')](respondWithFilteredResult(_0x1fef88,_0x39cd87))[_0x0c09('0x24')](handleError(_0x1fef88,null));};exports[_0x0c09('0x52')]=function(_0x59e3e3,_0x5cba3d){var _0x1279d2={'raw':![],'where':{'id':_0x59e3e3[_0x0c09('0x53')]['id']}},_0x587522={};_0x587522[_0x0c09('0x3d')]=_[_0x0c09('0x3f')](db[_0x0c09('0x38')][_0x0c09('0x39')]);_0x587522['query']=_[_0x0c09('0x3f')](_0x59e3e3[_0x0c09('0x3e')]);_0x587522['filters']=_[_0x0c09('0x41')](_0x587522[_0x0c09('0x3d')],_0x587522[_0x0c09('0x3e')]);_0x1279d2['attributes']=_['intersection'](_0x587522[_0x0c09('0x3d')],qs[_0x0c09('0x43')](_0x59e3e3[_0x0c09('0x3e')][_0x0c09('0x43')]));_0x1279d2[_0x0c09('0x42')]=_0x1279d2['attributes'][_0x0c09('0x44')]?_0x1279d2[_0x0c09('0x42')]:_0x587522[_0x0c09('0x3d')];if(_0x59e3e3[_0x0c09('0x3e')][_0x0c09('0x4e')]){_0x1279d2[_0x0c09('0x4f')]=[{'all':!![]}];}_0x1279d2=_[_0x0c09('0x4c')]({},_0x1279d2,_0x59e3e3[_0x0c09('0x4d')]);return db['Setting'][_0x0c09('0x54')](_0x1279d2)[_0x0c09('0x19')](handleEntityNotFound(_0x5cba3d,null))['then'](respondWithResult(_0x5cba3d,null))[_0x0c09('0x24')](handleError(_0x5cba3d,null));};exports[_0x0c09('0x32')]=function(_0xdfb9b0,_0x511c8b){if(_0xdfb9b0[_0x0c09('0x55')]['id']){delete _0xdfb9b0[_0x0c09('0x55')]['id'];}return db[_0x0c09('0x38')][_0x0c09('0x54')]({'where':{'id':_0xdfb9b0[_0x0c09('0x53')]['id']}})[_0x0c09('0x19')](handleEntityNotFound(_0x511c8b,null))[_0x0c09('0x19')](saveUpdates(_0xdfb9b0[_0x0c09('0x55')],null))[_0x0c09('0x19')](respondWithResult(_0x511c8b,null))[_0x0c09('0x24')](handleError(_0x511c8b,null));};exports[_0x0c09('0x56')]=function(_0x469e4f,_0x18c66c,_0x2e990b){if(_0x469e4f[_0x0c09('0x57')]&&_0x469e4f[_0x0c09('0x57')][_0x0c09('0x58')]){_0x469e4f[_0x0c09('0x55')][_0x0c09('0x59')]=_0x469e4f[_0x0c09('0x57')]['filename'];}return db[_0x0c09('0x38')][_0x0c09('0x54')]({'where':{'id':_0x469e4f[_0x0c09('0x53')]['id']}})[_0x0c09('0x19')](handleEntityNotFound(_0x18c66c,null))[_0x0c09('0x19')](saveUpdates(_0x469e4f['body'],null))['then'](respondWithResult(_0x18c66c,null))[_0x0c09('0x24')](handleError(_0x18c66c,null));};exports['addLogoLogin']=function(_0x434825,_0x35b4e1,_0x5b4ae6){if(_0x434825[_0x0c09('0x57')]&&_0x434825[_0x0c09('0x57')][_0x0c09('0x58')]){_0x434825[_0x0c09('0x55')]['loginLogo']=_0x434825[_0x0c09('0x57')][_0x0c09('0x58')];}return db[_0x0c09('0x38')][_0x0c09('0x54')]({'where':{'id':_0x434825[_0x0c09('0x53')]['id']}})['then'](handleEntityNotFound(_0x35b4e1,null))[_0x0c09('0x19')](saveUpdates(_0x434825[_0x0c09('0x55')],null))[_0x0c09('0x19')](respondWithResult(_0x35b4e1,null))[_0x0c09('0x24')](handleError(_0x35b4e1,null));};var utilLicense=require(_0x0c09('0x5a'));exports[_0x0c09('0x5b')]=function(_0x4e588a,_0x12ffb9,_0x12af5b){var _0x322ff7=_0x0c09('0x5c');var _0x3cfceb={'custom':![]};return utilLicense['getLicense']()[_0x0c09('0x19')](function(_0x2e2101){if(_0x2e2101){_0x3cfceb=_0x2e2101;}return db['Setting'][_0x0c09('0x54')]({'where':{'id':_0x4e588a['params']['id']},'attributes':[_0x0c09('0x59'),_0x0c09('0x5d'),_0x0c09('0x5e'),'favicon',_0x0c09('0x5f'),_0x0c09('0x60'),_0x0c09('0x61'),_0x0c09('0x62')],'raw':!![]});})[_0x0c09('0x19')](handleEntityNotFound(_0x12ffb9,null))[_0x0c09('0x19')](function(_0x4f5587){if(_0x4f5587){var _0x22f93c=_0x4f5587[_0x0c09('0x59')]&&fs['existsSync'](path[_0x0c09('0x63')](config[_0x0c09('0x64')],_0x322ff7,_[_0x0c09('0x65')](_0x4f5587['logo'])))?path[_0x0c09('0x63')](config[_0x0c09('0x64')],_0x322ff7,_[_0x0c09('0x65')](_0x4f5587[_0x0c09('0x59')])):path[_0x0c09('0x63')](config[_0x0c09('0x64')],_0x322ff7,_[_0x0c09('0x65')](_0x0c09('0x66')));var _0x1d023a=_0x0c09('0x67')+_[_0x0c09('0x68')]('logo');if(_0x4f5587[_0x1d023a]||!_0x3cfceb['custom']){_0x22f93c=path[_0x0c09('0x63')](config[_0x0c09('0x64')],_0x322ff7,_[_0x0c09('0x65')](_0x0c09('0x66')));}if(!fs[_0x0c09('0x69')](_0x22f93c)){throw new db[(_0x0c09('0x6a'))][(_0x0c09('0x6b'))](_[_0x0c09('0x68')](_0x0c09('0x59'))+_0x0c09('0x6c'));}return _0x12ffb9[_0x0c09('0x6d')](_0x22f93c);}})['catch'](handleError(_0x12ffb9,null));};var utilLicense=require(_0x0c09('0x5a'));exports[_0x0c09('0x6e')]=function(_0x573d7c,_0x293ebc,_0x354cad){var _0xbb25d5=_0x0c09('0x5c');var _0x1cd59d={'custom':![]};return utilLicense[_0x0c09('0x6f')]()[_0x0c09('0x19')](function(_0x1f18d3){if(_0x1f18d3){_0x1cd59d=_0x1f18d3;}return db['Setting']['find']({'where':{'id':_0x573d7c[_0x0c09('0x53')]['id']},'attributes':[_0x0c09('0x59'),_0x0c09('0x5d'),'preferred',_0x0c09('0x70'),_0x0c09('0x5f'),_0x0c09('0x60'),_0x0c09('0x61'),_0x0c09('0x62')],'raw':!![]});})[_0x0c09('0x19')](handleEntityNotFound(_0x293ebc,null))[_0x0c09('0x19')](function(_0x308cdd){if(_0x308cdd){var _0x259a84=_0x308cdd[_0x0c09('0x5d')]&&fs[_0x0c09('0x69')](path['join'](config[_0x0c09('0x64')],_0xbb25d5,_['toLower'](_0x308cdd['loginLogo'])))?path[_0x0c09('0x63')](config['root'],_0xbb25d5,_['toLower'](_0x308cdd[_0x0c09('0x5d')])):path[_0x0c09('0x63')](config['root'],_0xbb25d5,_[_0x0c09('0x65')](_0x0c09('0x71')));var _0x3d599d=_0x0c09('0x67')+_[_0x0c09('0x68')](_0x0c09('0x5d'));if(_0x308cdd[_0x3d599d]||!_0x1cd59d['custom']){_0x259a84=path[_0x0c09('0x63')](config[_0x0c09('0x64')],_0xbb25d5,_[_0x0c09('0x65')](_0x0c09('0x71')));}if(!fs[_0x0c09('0x69')](_0x259a84)){throw new db['Sequelize']['ValidationError'](_[_0x0c09('0x68')](_0x0c09('0x5d'))+_0x0c09('0x6c'));}return _0x293ebc[_0x0c09('0x6d')](_0x259a84);}})[_0x0c09('0x24')](handleError(_0x293ebc,null));};exports[_0x0c09('0x72')]=function(_0x59b038,_0x218b3d){return db['Setting'][_0x0c09('0x54')]({'where':{'id':_0x59b038[_0x0c09('0x53')]['id']},'attributes':[_0x0c09('0x73')]})[_0x0c09('0x19')](respondWithResult(_0x218b3d,null))[_0x0c09('0x24')](handleError(_0x218b3d,null));};exports['addPreferred']=function(_0x3eff92,_0x369cf1,_0x2dfc92){if(_0x3eff92[_0x0c09('0x57')]&&_0x3eff92[_0x0c09('0x57')][_0x0c09('0x58')]){_0x3eff92[_0x0c09('0x55')][_0x0c09('0x5e')]=_0x3eff92[_0x0c09('0x57')]['filename'];}return db['Setting'][_0x0c09('0x54')]({'where':{'id':_0x3eff92[_0x0c09('0x53')]['id']}})['then'](handleEntityNotFound(_0x369cf1,null))[_0x0c09('0x19')](saveUpdates(_0x3eff92[_0x0c09('0x55')],null))[_0x0c09('0x19')](respondWithResult(_0x369cf1,null))[_0x0c09('0x24')](handleError(_0x369cf1,null));};var utilLicense=require(_0x0c09('0x5a'));exports[_0x0c09('0x74')]=function(_0x51279f,_0x2aa23d,_0xf93164){var _0x157aa6=_0x0c09('0x5c');var _0x13c0d2={'custom':![]};return utilLicense[_0x0c09('0x6f')]()[_0x0c09('0x19')](function(_0x576577){if(_0x576577){_0x13c0d2=_0x576577;}return db[_0x0c09('0x38')]['find']({'where':{'id':_0x51279f['params']['id']},'attributes':[_0x0c09('0x59'),'loginLogo','preferred','favicon',_0x0c09('0x5f'),_0x0c09('0x60'),_0x0c09('0x61'),_0x0c09('0x62')],'raw':!![]});})[_0x0c09('0x19')](handleEntityNotFound(_0x2aa23d,null))[_0x0c09('0x19')](function(_0x538e3f){if(_0x538e3f){var _0x5de2a5=_0x538e3f[_0x0c09('0x5e')]&&fs[_0x0c09('0x69')](path['join'](config[_0x0c09('0x64')],_0x157aa6,_[_0x0c09('0x65')](_0x538e3f[_0x0c09('0x5e')])))?path[_0x0c09('0x63')](config['root'],_0x157aa6,_['toLower'](_0x538e3f[_0x0c09('0x5e')])):path[_0x0c09('0x63')](config[_0x0c09('0x64')],_0x157aa6,_['toLower']('default_preferred.png'));var _0xf3294=_0x0c09('0x67')+_['upperFirst'](_0x0c09('0x5e'));if(_0x538e3f[_0xf3294]||!_0x13c0d2[_0x0c09('0x75')]||!_0x13c0d2[_0x0c09('0x5e')]){_0x5de2a5=path[_0x0c09('0x63')](config[_0x0c09('0x64')],_0x157aa6,_['toLower'](_0x0c09('0x76')));}if(!fs['existsSync'](_0x5de2a5)){throw new db[(_0x0c09('0x6a'))]['ValidationError'](_[_0x0c09('0x68')](_0x0c09('0x5e'))+'\x20not\x20found');}return _0x2aa23d[_0x0c09('0x6d')](_0x5de2a5);}})[_0x0c09('0x24')](handleError(_0x2aa23d,null));};exports[_0x0c09('0x77')]=function(_0x37619f,_0x518be9,_0x25cd5f){if(_0x37619f[_0x0c09('0x57')]&&_0x37619f['file']['filename']){_0x37619f[_0x0c09('0x55')][_0x0c09('0x70')]=_0x37619f[_0x0c09('0x57')][_0x0c09('0x58')];}return db['Setting'][_0x0c09('0x54')]({'where':{'id':_0x37619f[_0x0c09('0x53')]['id']}})[_0x0c09('0x19')](handleEntityNotFound(_0x518be9,null))[_0x0c09('0x19')](saveUpdates(_0x37619f['body'],null))[_0x0c09('0x19')](respondWithResult(_0x518be9,null))[_0x0c09('0x24')](handleError(_0x518be9,null));};var utilLicense=require(_0x0c09('0x5a'));exports['getFavicon']=function(_0x40572d,_0x3846d1,_0x16fe99){var _0x385abf='server/files/images/logos';var _0x297409={'custom':![]};return utilLicense[_0x0c09('0x6f')]()['then'](function(_0x3d6ae7){if(_0x3d6ae7){_0x297409=_0x3d6ae7;}return db[_0x0c09('0x38')][_0x0c09('0x54')]({'where':{'id':_0x40572d['params']['id']},'attributes':[_0x0c09('0x59'),_0x0c09('0x5d'),_0x0c09('0x5e'),'favicon','defaultLogo',_0x0c09('0x60'),_0x0c09('0x61'),_0x0c09('0x62')],'raw':!![]});})[_0x0c09('0x19')](handleEntityNotFound(_0x3846d1,null))[_0x0c09('0x19')](function(_0x3e0733){if(_0x3e0733){var _0x3f9604=_0x3e0733[_0x0c09('0x70')]&&fs[_0x0c09('0x69')](path[_0x0c09('0x63')](config[_0x0c09('0x64')],_0x385abf,_[_0x0c09('0x65')](_0x3e0733[_0x0c09('0x70')])))?path['join'](config['root'],_0x385abf,_['toLower'](_0x3e0733['favicon'])):path[_0x0c09('0x63')](config['root'],_0x385abf,_['toLower']('default_favicon.ico'));var _0x366ac1='default'+_['upperFirst'](_0x0c09('0x70'));if(_0x3e0733[_0x366ac1]||!_0x297409[_0x0c09('0x75')]){_0x3f9604=path[_0x0c09('0x63')](config['root'],_0x385abf,_['toLower'](_0x0c09('0x78')));}if(!fs[_0x0c09('0x69')](_0x3f9604)){throw new db[(_0x0c09('0x6a'))][(_0x0c09('0x6b'))](_[_0x0c09('0x68')](_0x0c09('0x70'))+_0x0c09('0x6c'));}return _0x3846d1['download'](_0x3f9604);}})[_0x0c09('0x24')](handleError(_0x3846d1,null));};exports[_0x0c09('0x79')]=function(_0xb202df,_0x7993a6){var _0x599978={'offset':moment()[_0x0c09('0x7a')]()};_0x599978['now']=moment()[_0x0c09('0x7a')](_0x599978[_0x0c09('0x2c')])[_0x0c09('0x7b')](_0x0c09('0x7c'));return _0x7993a6['status'](0xc8)[_0x0c09('0x35')](_0x599978);}; \ No newline at end of file +var _0x7047=['defaultFavicon','existsSync','root','toLower','join','default_logo.svg','default','upperFirst','Sequelize','ValidationError','\x20not\x20found','download','defaultLoginLogo','defaultPreferred','default_loginLogo.svg','gdpr','securePassword','addPreferred','getPreferred','default_preferred.png','custom','getDate','utcOffset','now','format','eml-format','rimraf','request-promise','moment','bluebird','mustache','util','path','sox','to-csv','ejs','fs-extra','lodash','jsforce','desk.js','querystring','papaparse','ioredis','../../components/auth/service','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','client','request','Setting,\x20%s,\x20%s','request\x20sent','debug','Setting,\x20%s,\x20%s,\x20%s','stringify','error','code','message','info','catch','sendStatus','status','json','offset','undefined','limit','count','set','Content-Range','apply','reject','save','update','then','destroy','end','name','send','index','map','Setting','rawAttributes','fieldName','type','key','model','query','keys','filters','attributes','intersection','fields','hasOwnProperty','order','sort','where','merge','VIRTUAL','filter','options','includeAll','include','findAll','rows','show','params','body','find','file','logo','filename','addLogoLogin','loginLogo','getLogo','server/files/images/logos','getLicense','preferred','favicon','defaultLogo'];(function(_0x47a7d0,_0x4e182d){var _0xb9bd08=function(_0x588ee2){while(--_0x588ee2){_0x47a7d0['push'](_0x47a7d0['shift']());}};_0xb9bd08(++_0x4e182d);}(_0x7047,0x10d));var _0x7704=function(_0x26a57d,_0x32a6d6){_0x26a57d=_0x26a57d-0x0;var _0x51edf9=_0x7047[_0x26a57d];return _0x51edf9;};'use strict';var emlformat=require(_0x7704('0x0'));var rimraf=require(_0x7704('0x1'));var zipdir=require('zip-dir');var jsonpatch=require('fast-json-patch');var rp=require(_0x7704('0x2'));var moment=require(_0x7704('0x3'));var BPromise=require(_0x7704('0x4'));var Mustache=require(_0x7704('0x5'));var util=require(_0x7704('0x6'));var path=require(_0x7704('0x7'));var sox=require(_0x7704('0x8'));var csv=require(_0x7704('0x9'));var ejs=require(_0x7704('0xa'));var fs=require('fs');var fs_extra=require(_0x7704('0xb'));var _=require(_0x7704('0xc'));var squel=require('squel');var crypto=require('crypto');var jsforce=require(_0x7704('0xd'));var deskjs=require(_0x7704('0xe'));var toCsv=require('to-csv');var querystring=require(_0x7704('0xf'));var Papa=require(_0x7704('0x10'));var Redis=require(_0x7704('0x11'));var authService=require(_0x7704('0x12'));var qs=require('../../components/parsers/qs');var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0x7704('0x13'));var logger=require(_0x7704('0x14'))(_0x7704('0x15'));var utils=require(_0x7704('0x16'));var config=require(_0x7704('0x17'));var licenseUtil=require(_0x7704('0x18'));var db=require(_0x7704('0x19'))['db'];var jayson=require('jayson/promise');var client=jayson[_0x7704('0x1a')]['http']({'port':0x232a});function respondWithRpcPromise(_0xbda615,_0x76e495,_0x4fdcb3,_0x4006d9){return new BPromise(function(_0x48f49d,_0x278842){var _0x41dc1d=_0x4006d9||client;return _0x41dc1d[_0x7704('0x1b')](_0xbda615,_0x4fdcb3)['then'](function(_0x5d9d06){logger['info'](_0x7704('0x1c'),_0x76e495,_0x7704('0x1d'));logger[_0x7704('0x1e')](_0x7704('0x1f'),_0x76e495,_0x7704('0x1d'),JSON[_0x7704('0x20')](_0x5d9d06));if(_0x5d9d06[_0x7704('0x21')]){if(_0x5d9d06[_0x7704('0x21')][_0x7704('0x22')]===0x1f4){logger[_0x7704('0x21')]('Setting,\x20%s,\x20%s',_0x76e495,_0x5d9d06['error'][_0x7704('0x23')]);return _0x278842(_0x5d9d06[_0x7704('0x21')][_0x7704('0x23')]);}logger[_0x7704('0x21')](_0x7704('0x1c'),_0x76e495,_0x5d9d06[_0x7704('0x21')][_0x7704('0x23')]);return _0x48f49d(_0x5d9d06[_0x7704('0x21')][_0x7704('0x23')]);}else{logger[_0x7704('0x24')](_0x7704('0x1c'),_0x76e495,_0x7704('0x1d'));_0x48f49d(_0x5d9d06['result'][_0x7704('0x23')]);}})[_0x7704('0x25')](function(_0x37f267){logger[_0x7704('0x21')](_0x7704('0x1c'),_0x76e495,_0x37f267);_0x278842(_0x37f267);});});}function respondWithStatusCode(_0x2d8eb5,_0x373ba5){_0x373ba5=_0x373ba5||0xcc;return function(_0x37b4b3){if(_0x37b4b3){return _0x2d8eb5[_0x7704('0x26')](_0x373ba5);}return _0x2d8eb5[_0x7704('0x27')](_0x373ba5)['end']();};}function respondWithResult(_0x1f5ca9,_0x29e4a6){_0x29e4a6=_0x29e4a6||0xc8;return function(_0x2da532){if(_0x2da532){return _0x1f5ca9[_0x7704('0x27')](_0x29e4a6)[_0x7704('0x28')](_0x2da532);}};}function respondWithFilteredResult(_0x38bd57,_0x45ea79){return function(_0x3e0a18){if(_0x3e0a18){var _0x30c39a=typeof _0x45ea79[_0x7704('0x29')]===_0x7704('0x2a')&&typeof _0x45ea79[_0x7704('0x2b')]==='undefined';var _0x46ce71=_0x3e0a18['count'];var _0x55e9ae=_0x30c39a?0x0:_0x45ea79[_0x7704('0x29')];var _0x28e513=_0x30c39a?_0x3e0a18[_0x7704('0x2c')]:_0x45ea79[_0x7704('0x29')]+_0x45ea79['limit'];var _0x710093;if(_0x28e513>=_0x46ce71){_0x28e513=_0x46ce71;_0x710093=0xc8;}else{_0x710093=0xce;}_0x38bd57[_0x7704('0x27')](_0x710093);return _0x38bd57[_0x7704('0x2d')](_0x7704('0x2e'),_0x55e9ae+'-'+_0x28e513+'/'+_0x46ce71)[_0x7704('0x28')](_0x3e0a18);}return null;};}function patchUpdates(_0x5d9a8a){return function(_0x137647){try{jsonpatch[_0x7704('0x2f')](_0x137647,_0x5d9a8a,!![]);}catch(_0x20f96){return BPromise[_0x7704('0x30')](_0x20f96);}return _0x137647[_0x7704('0x31')]();};}function saveUpdates(_0x52f691,_0x4820e7){return function(_0x5e8747){if(_0x5e8747){return _0x5e8747[_0x7704('0x32')](_0x52f691)[_0x7704('0x33')](function(_0xd12ac1){return _0xd12ac1;});}return null;};}function removeEntity(_0x2ff55c,_0x1596a4){return function(_0x53762f){if(_0x53762f){return _0x53762f[_0x7704('0x34')]()['then'](function(){_0x2ff55c[_0x7704('0x27')](0xcc)[_0x7704('0x35')]();});}};}function handleEntityNotFound(_0x58b88e,_0x3f2cff){return function(_0x3fddd9){if(!_0x3fddd9){_0x58b88e[_0x7704('0x26')](0x194);}return _0x3fddd9;};}function handleError(_0x6bc000,_0x2ce65f){_0x2ce65f=_0x2ce65f||0x1f4;return function(_0x438317){logger[_0x7704('0x21')](_0x438317['stack']);if(_0x438317[_0x7704('0x36')]){delete _0x438317[_0x7704('0x36')];}_0x6bc000[_0x7704('0x27')](_0x2ce65f)[_0x7704('0x37')](_0x438317);};}exports[_0x7704('0x38')]=function(_0x27a882,_0x3f62c9){var _0x3199d={},_0x2a02ca={},_0xe51f3a={'count':0x0,'rows':[]};var _0x227714=_[_0x7704('0x39')](db[_0x7704('0x3a')][_0x7704('0x3b')],function(_0x50c17c){return{'name':_0x50c17c[_0x7704('0x3c')],'type':_0x50c17c[_0x7704('0x3d')][_0x7704('0x3e')]};});_0x2a02ca[_0x7704('0x3f')]=_[_0x7704('0x39')](_0x227714,_0x7704('0x36'));_0x2a02ca[_0x7704('0x40')]=_[_0x7704('0x41')](_0x27a882[_0x7704('0x40')]);_0x2a02ca[_0x7704('0x42')]=_['intersection'](_0x2a02ca[_0x7704('0x3f')],_0x2a02ca['query']);_0x3199d[_0x7704('0x43')]=_[_0x7704('0x44')](_0x2a02ca['model'],qs[_0x7704('0x45')](_0x27a882[_0x7704('0x40')][_0x7704('0x45')]));_0x3199d[_0x7704('0x43')]=_0x3199d[_0x7704('0x43')]['length']?_0x3199d[_0x7704('0x43')]:_0x2a02ca[_0x7704('0x3f')];if(!_0x27a882[_0x7704('0x40')][_0x7704('0x46')]('nolimit')){_0x3199d[_0x7704('0x2b')]=qs['limit'](_0x27a882[_0x7704('0x40')][_0x7704('0x2b')]);_0x3199d[_0x7704('0x29')]=qs['offset'](_0x27a882['query'][_0x7704('0x29')]);}_0x3199d[_0x7704('0x47')]=qs[_0x7704('0x48')](_0x27a882[_0x7704('0x40')][_0x7704('0x48')]);_0x3199d[_0x7704('0x49')]=qs[_0x7704('0x42')](_['pick'](_0x27a882[_0x7704('0x40')],_0x2a02ca[_0x7704('0x42')]),_0x227714);if(_0x27a882[_0x7704('0x40')]['filter']){_0x3199d[_0x7704('0x49')]=_[_0x7704('0x4a')](_0x3199d['where'],{'$or':_['map'](_0x227714,function(_0x367e3d){if(_0x367e3d['type']!==_0x7704('0x4b')){var _0x4994d0={};_0x4994d0[_0x367e3d['name']]={'$like':'%'+_0x27a882[_0x7704('0x40')][_0x7704('0x4c')]+'%'};return _0x4994d0;}})});}_0x3199d=_[_0x7704('0x4a')]({},_0x3199d,_0x27a882[_0x7704('0x4d')]);var _0x3914f8={'where':_0x3199d[_0x7704('0x49')]};return db['Setting']['count'](_0x3914f8)[_0x7704('0x33')](function(_0x31d58e){_0xe51f3a[_0x7704('0x2c')]=_0x31d58e;if(_0x27a882[_0x7704('0x40')][_0x7704('0x4e')]){_0x3199d[_0x7704('0x4f')]=[{'all':!![]}];}return db['Setting'][_0x7704('0x50')](_0x3199d);})['then'](function(_0xcd7450){_0xe51f3a[_0x7704('0x51')]=_0xcd7450;return _0xe51f3a;})[_0x7704('0x33')](respondWithFilteredResult(_0x3f62c9,_0x3199d))[_0x7704('0x25')](handleError(_0x3f62c9,null));};exports[_0x7704('0x52')]=function(_0x27a66c,_0x228c45){var _0xc12756={'raw':![],'where':{'id':_0x27a66c[_0x7704('0x53')]['id']}},_0x4611e3={};_0x4611e3['model']=_[_0x7704('0x41')](db['Setting']['rawAttributes']);_0x4611e3[_0x7704('0x40')]=_[_0x7704('0x41')](_0x27a66c['query']);_0x4611e3[_0x7704('0x42')]=_[_0x7704('0x44')](_0x4611e3[_0x7704('0x3f')],_0x4611e3[_0x7704('0x40')]);_0xc12756['attributes']=_[_0x7704('0x44')](_0x4611e3['model'],qs[_0x7704('0x45')](_0x27a66c[_0x7704('0x40')][_0x7704('0x45')]));_0xc12756['attributes']=_0xc12756['attributes']['length']?_0xc12756['attributes']:_0x4611e3[_0x7704('0x3f')];if(_0x27a66c[_0x7704('0x40')][_0x7704('0x4e')]){_0xc12756[_0x7704('0x4f')]=[{'all':!![]}];}_0xc12756=_[_0x7704('0x4a')]({},_0xc12756,_0x27a66c[_0x7704('0x4d')]);return db['Setting']['find'](_0xc12756)[_0x7704('0x33')](handleEntityNotFound(_0x228c45,null))['then'](respondWithResult(_0x228c45,null))[_0x7704('0x25')](handleError(_0x228c45,null));};exports[_0x7704('0x32')]=function(_0x48ed4f,_0x5c17cb){if(_0x48ed4f[_0x7704('0x54')]['id']){delete _0x48ed4f[_0x7704('0x54')]['id'];}return db[_0x7704('0x3a')][_0x7704('0x55')]({'where':{'id':_0x48ed4f[_0x7704('0x53')]['id']}})[_0x7704('0x33')](handleEntityNotFound(_0x5c17cb,null))['then'](saveUpdates(_0x48ed4f[_0x7704('0x54')],null))[_0x7704('0x33')](respondWithResult(_0x5c17cb,null))[_0x7704('0x25')](handleError(_0x5c17cb,null));};exports['addLogo']=function(_0x29d95e,_0x187de3,_0x24e13c){if(_0x29d95e[_0x7704('0x56')]&&_0x29d95e['file']['filename']){_0x29d95e[_0x7704('0x54')][_0x7704('0x57')]=_0x29d95e[_0x7704('0x56')][_0x7704('0x58')];}return db['Setting']['find']({'where':{'id':_0x29d95e[_0x7704('0x53')]['id']}})[_0x7704('0x33')](handleEntityNotFound(_0x187de3,null))['then'](saveUpdates(_0x29d95e['body'],null))[_0x7704('0x33')](respondWithResult(_0x187de3,null))[_0x7704('0x25')](handleError(_0x187de3,null));};exports[_0x7704('0x59')]=function(_0x11a216,_0x274ce9,_0x85ae4b){if(_0x11a216[_0x7704('0x56')]&&_0x11a216['file'][_0x7704('0x58')]){_0x11a216[_0x7704('0x54')][_0x7704('0x5a')]=_0x11a216[_0x7704('0x56')][_0x7704('0x58')];}return db[_0x7704('0x3a')][_0x7704('0x55')]({'where':{'id':_0x11a216['params']['id']}})['then'](handleEntityNotFound(_0x274ce9,null))[_0x7704('0x33')](saveUpdates(_0x11a216[_0x7704('0x54')],null))[_0x7704('0x33')](respondWithResult(_0x274ce9,null))[_0x7704('0x25')](handleError(_0x274ce9,null));};var utilLicense=require(_0x7704('0x18'));exports[_0x7704('0x5b')]=function(_0x161f72,_0x4518ca,_0x290497){var _0x51e9c3=_0x7704('0x5c');var _0x21a8e3={'custom':![]};return utilLicense[_0x7704('0x5d')]()[_0x7704('0x33')](function(_0x10d99f){if(_0x10d99f){_0x21a8e3=_0x10d99f;}return db['Setting'][_0x7704('0x55')]({'where':{'id':_0x161f72[_0x7704('0x53')]['id']},'attributes':[_0x7704('0x57'),'loginLogo',_0x7704('0x5e'),_0x7704('0x5f'),_0x7704('0x60'),'defaultLoginLogo','defaultPreferred',_0x7704('0x61')],'raw':!![]});})[_0x7704('0x33')](handleEntityNotFound(_0x4518ca,null))[_0x7704('0x33')](function(_0x586b9f){if(_0x586b9f){var _0x1a72ba=_0x586b9f[_0x7704('0x57')]&&fs[_0x7704('0x62')](path['join'](config[_0x7704('0x63')],_0x51e9c3,_[_0x7704('0x64')](_0x586b9f['logo'])))?path[_0x7704('0x65')](config['root'],_0x51e9c3,_[_0x7704('0x64')](_0x586b9f[_0x7704('0x57')])):path[_0x7704('0x65')](config['root'],_0x51e9c3,_[_0x7704('0x64')](_0x7704('0x66')));var _0x3c1558=_0x7704('0x67')+_[_0x7704('0x68')](_0x7704('0x57'));if(_0x586b9f[_0x3c1558]||!_0x21a8e3['custom']){_0x1a72ba=path['join'](config[_0x7704('0x63')],_0x51e9c3,_[_0x7704('0x64')]('default_logo.svg'));}if(!fs[_0x7704('0x62')](_0x1a72ba)){throw new db[(_0x7704('0x69'))][(_0x7704('0x6a'))](_[_0x7704('0x68')](_0x7704('0x57'))+_0x7704('0x6b'));}return _0x4518ca[_0x7704('0x6c')](_0x1a72ba);}})['catch'](handleError(_0x4518ca,null));};var utilLicense=require('../../config/license/util');exports['getLogoLogin']=function(_0x4ad341,_0x954064,_0x3e06ff){var _0x29a1a9=_0x7704('0x5c');var _0x145162={'custom':![]};return utilLicense[_0x7704('0x5d')]()[_0x7704('0x33')](function(_0x21a8fb){if(_0x21a8fb){_0x145162=_0x21a8fb;}return db[_0x7704('0x3a')][_0x7704('0x55')]({'where':{'id':_0x4ad341[_0x7704('0x53')]['id']},'attributes':[_0x7704('0x57'),'loginLogo',_0x7704('0x5e'),'favicon',_0x7704('0x60'),_0x7704('0x6d'),_0x7704('0x6e'),_0x7704('0x61')],'raw':!![]});})[_0x7704('0x33')](handleEntityNotFound(_0x954064,null))[_0x7704('0x33')](function(_0x412960){if(_0x412960){var _0x28e807=_0x412960[_0x7704('0x5a')]&&fs['existsSync'](path[_0x7704('0x65')](config['root'],_0x29a1a9,_['toLower'](_0x412960[_0x7704('0x5a')])))?path[_0x7704('0x65')](config['root'],_0x29a1a9,_['toLower'](_0x412960[_0x7704('0x5a')])):path[_0x7704('0x65')](config[_0x7704('0x63')],_0x29a1a9,_[_0x7704('0x64')](_0x7704('0x6f')));var _0x11a018=_0x7704('0x67')+_[_0x7704('0x68')](_0x7704('0x5a'));if(_0x412960[_0x11a018]||!_0x145162['custom']){_0x28e807=path[_0x7704('0x65')](config[_0x7704('0x63')],_0x29a1a9,_[_0x7704('0x64')](_0x7704('0x6f')));}if(!fs[_0x7704('0x62')](_0x28e807)){throw new db[(_0x7704('0x69'))]['ValidationError'](_[_0x7704('0x68')](_0x7704('0x5a'))+'\x20not\x20found');}return _0x954064[_0x7704('0x6c')](_0x28e807);}})[_0x7704('0x25')](handleError(_0x954064,null));};exports[_0x7704('0x70')]=function(_0x8c85d7,_0x3f3e3e){return db[_0x7704('0x3a')][_0x7704('0x55')]({'where':{'id':_0x8c85d7[_0x7704('0x53')]['id']},'attributes':[_0x7704('0x71')]})[_0x7704('0x33')](respondWithResult(_0x3f3e3e,null))[_0x7704('0x25')](handleError(_0x3f3e3e,null));};exports[_0x7704('0x72')]=function(_0x5afbb2,_0x14d2f3,_0x174254){if(_0x5afbb2[_0x7704('0x56')]&&_0x5afbb2[_0x7704('0x56')][_0x7704('0x58')]){_0x5afbb2[_0x7704('0x54')]['preferred']=_0x5afbb2[_0x7704('0x56')][_0x7704('0x58')];}return db[_0x7704('0x3a')]['find']({'where':{'id':_0x5afbb2['params']['id']}})['then'](handleEntityNotFound(_0x14d2f3,null))['then'](saveUpdates(_0x5afbb2['body'],null))['then'](respondWithResult(_0x14d2f3,null))[_0x7704('0x25')](handleError(_0x14d2f3,null));};var utilLicense=require(_0x7704('0x18'));exports[_0x7704('0x73')]=function(_0x2df289,_0x402b41,_0x12a3d7){var _0x395d33=_0x7704('0x5c');var _0x47d926={'custom':![]};return utilLicense[_0x7704('0x5d')]()['then'](function(_0xaa9d90){if(_0xaa9d90){_0x47d926=_0xaa9d90;}return db[_0x7704('0x3a')][_0x7704('0x55')]({'where':{'id':_0x2df289[_0x7704('0x53')]['id']},'attributes':[_0x7704('0x57'),'loginLogo',_0x7704('0x5e'),'favicon',_0x7704('0x60'),_0x7704('0x6d'),_0x7704('0x6e'),_0x7704('0x61')],'raw':!![]});})[_0x7704('0x33')](handleEntityNotFound(_0x402b41,null))[_0x7704('0x33')](function(_0x30989e){if(_0x30989e){var _0x5e26d4=_0x30989e[_0x7704('0x5e')]&&fs[_0x7704('0x62')](path[_0x7704('0x65')](config[_0x7704('0x63')],_0x395d33,_['toLower'](_0x30989e[_0x7704('0x5e')])))?path[_0x7704('0x65')](config[_0x7704('0x63')],_0x395d33,_[_0x7704('0x64')](_0x30989e[_0x7704('0x5e')])):path[_0x7704('0x65')](config[_0x7704('0x63')],_0x395d33,_[_0x7704('0x64')](_0x7704('0x74')));var _0x4d49ef=_0x7704('0x67')+_['upperFirst']('preferred');if(_0x30989e[_0x4d49ef]||!_0x47d926[_0x7704('0x75')]||!_0x47d926[_0x7704('0x5e')]){_0x5e26d4=path[_0x7704('0x65')](config[_0x7704('0x63')],_0x395d33,_[_0x7704('0x64')](_0x7704('0x74')));}if(!fs[_0x7704('0x62')](_0x5e26d4)){throw new db['Sequelize'][(_0x7704('0x6a'))](_['upperFirst']('preferred')+_0x7704('0x6b'));}return _0x402b41[_0x7704('0x6c')](_0x5e26d4);}})[_0x7704('0x25')](handleError(_0x402b41,null));};exports['addFavicon']=function(_0x19a4a6,_0x3612dc,_0x52bbbf){if(_0x19a4a6[_0x7704('0x56')]&&_0x19a4a6[_0x7704('0x56')][_0x7704('0x58')]){_0x19a4a6[_0x7704('0x54')][_0x7704('0x5f')]=_0x19a4a6[_0x7704('0x56')][_0x7704('0x58')];}return db['Setting']['find']({'where':{'id':_0x19a4a6[_0x7704('0x53')]['id']}})['then'](handleEntityNotFound(_0x3612dc,null))[_0x7704('0x33')](saveUpdates(_0x19a4a6[_0x7704('0x54')],null))[_0x7704('0x33')](respondWithResult(_0x3612dc,null))[_0x7704('0x25')](handleError(_0x3612dc,null));};var utilLicense=require(_0x7704('0x18'));exports['getFavicon']=function(_0x555444,_0x12dce1,_0x30feb2){var _0x2ad5b7=_0x7704('0x5c');var _0x4142a5={'custom':![]};return utilLicense[_0x7704('0x5d')]()[_0x7704('0x33')](function(_0x187e80){if(_0x187e80){_0x4142a5=_0x187e80;}return db['Setting'][_0x7704('0x55')]({'where':{'id':_0x555444['params']['id']},'attributes':['logo',_0x7704('0x5a'),_0x7704('0x5e'),_0x7704('0x5f'),_0x7704('0x60'),'defaultLoginLogo',_0x7704('0x6e'),_0x7704('0x61')],'raw':!![]});})[_0x7704('0x33')](handleEntityNotFound(_0x12dce1,null))[_0x7704('0x33')](function(_0x348baf){if(_0x348baf){var _0x4e12a4=_0x348baf[_0x7704('0x5f')]&&fs[_0x7704('0x62')](path[_0x7704('0x65')](config[_0x7704('0x63')],_0x2ad5b7,_['toLower'](_0x348baf['favicon'])))?path['join'](config['root'],_0x2ad5b7,_[_0x7704('0x64')](_0x348baf[_0x7704('0x5f')])):path[_0x7704('0x65')](config[_0x7704('0x63')],_0x2ad5b7,_['toLower']('default_favicon.ico'));var _0x2a1bd8=_0x7704('0x67')+_['upperFirst']('favicon');if(_0x348baf[_0x2a1bd8]||!_0x4142a5[_0x7704('0x75')]){_0x4e12a4=path[_0x7704('0x65')](config['root'],_0x2ad5b7,_['toLower']('default_favicon.ico'));}if(!fs[_0x7704('0x62')](_0x4e12a4)){throw new db[(_0x7704('0x69'))][(_0x7704('0x6a'))](_[_0x7704('0x68')](_0x7704('0x5f'))+_0x7704('0x6b'));}return _0x12dce1[_0x7704('0x6c')](_0x4e12a4);}})[_0x7704('0x25')](handleError(_0x12dce1,null));};exports[_0x7704('0x76')]=function(_0x1ebbf2,_0x416209){var _0x158d8a={'offset':moment()[_0x7704('0x77')]()};_0x158d8a[_0x7704('0x78')]=moment()[_0x7704('0x77')](_0x158d8a[_0x7704('0x29')])[_0x7704('0x79')]('YYYY-MM-DD\x20HH:mm:ss:SSS');return _0x416209['status'](0xc8)[_0x7704('0x37')](_0x158d8a);}; \ No newline at end of file diff --git a/server/api/setting/setting.model.js b/server/api/setting/setting.model.js index 5be887c..1461b25 100644 --- a/server/api/setting/setting.model.js +++ b/server/api/setting/setting.model.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x008c=['define','settings','lodash','util','../../config/logger','api','moment','request-promise','path','rimraf','../../config/environment','./setting.attributes','exports'];(function(_0x219935,_0x5b7d02){var _0x130409=function(_0x56409e){while(--_0x56409e){_0x219935['push'](_0x219935['shift']());}};_0x130409(++_0x5b7d02);}(_0x008c,0x188));var _0xc008=function(_0x55df8d,_0x21225e){_0x55df8d=_0x55df8d-0x0;var _0x18cd9b=_0x008c[_0x55df8d];return _0x18cd9b;};'use strict';var _=require(_0xc008('0x0'));var util=require(_0xc008('0x1'));var logger=require(_0xc008('0x2'))(_0xc008('0x3'));var moment=require(_0xc008('0x4'));var BPromise=require('bluebird');var rp=require(_0xc008('0x5'));var fs=require('fs');var path=require(_0xc008('0x6'));var rimraf=require(_0xc008('0x7'));var config=require(_0xc008('0x8'));var attributes=require(_0xc008('0x9'));module[_0xc008('0xa')]=function(_0x13aa7,_0x39bb5e){return _0x13aa7[_0xc008('0xb')]('Setting',attributes,{'tableName':_0xc008('0xc'),'paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file +var _0x7217=['../../config/environment','./setting.attributes','exports','define','Setting','settings','lodash','../../config/logger','api','moment','bluebird','request-promise'];(function(_0x173441,_0x26b0d9){var _0x2423a8=function(_0x4d96c2){while(--_0x4d96c2){_0x173441['push'](_0x173441['shift']());}};_0x2423a8(++_0x26b0d9);}(_0x7217,0x19e));var _0x7721=function(_0x173d7e,_0x3242fd){_0x173d7e=_0x173d7e-0x0;var _0x2220d6=_0x7217[_0x173d7e];return _0x2220d6;};'use strict';var _=require(_0x7721('0x0'));var util=require('util');var logger=require(_0x7721('0x1'))(_0x7721('0x2'));var moment=require(_0x7721('0x3'));var BPromise=require(_0x7721('0x4'));var rp=require(_0x7721('0x5'));var fs=require('fs');var path=require('path');var rimraf=require('rimraf');var config=require(_0x7721('0x6'));var attributes=require(_0x7721('0x7'));module[_0x7721('0x8')]=function(_0x3fe47c,_0xb239e0){return _0x3fe47c[_0x7721('0x9')](_0x7721('0xa'),attributes,{'tableName':_0x7721('0xb'),'paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file diff --git a/server/api/setting/setting.rpc.js b/server/api/setting/setting.rpc.js index 0e35f3d..81d2b13 100644 --- a/server/api/setting/setting.rpc.js +++ b/server/api/setting/setting.rpc.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xb555=['Setting','find','options','where','attributes','include','map','model','lodash','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/logger','rpc','../../config/environment','jayson/promise','client','request','then','info','Setting,\x20%s,\x20%s','request\x20sent','debug','Setting,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','catch','ShowSetting'];(function(_0x311909,_0x414bf7){var _0x8d3163=function(_0x226f55){while(--_0x226f55){_0x311909['push'](_0x311909['shift']());}};_0x8d3163(++_0x414bf7);}(_0xb555,0x1d6));var _0x5b55=function(_0x5a8ae6,_0x55aaed){_0x5a8ae6=_0x5a8ae6-0x0;var _0x109628=_0xb555[_0x5a8ae6];return _0x109628;};'use strict';var _=require(_0x5b55('0x0'));var util=require('util');var moment=require(_0x5b55('0x1'));var BPromise=require(_0x5b55('0x2'));var rs=require(_0x5b55('0x3'));var fs=require('fs');var Redis=require(_0x5b55('0x4'));var db=require(_0x5b55('0x5'))['db'];var utils=require('../../config/utils');var logger=require(_0x5b55('0x6'))(_0x5b55('0x7'));var config=require(_0x5b55('0x8'));var jayson=require(_0x5b55('0x9'));var client=jayson[_0x5b55('0xa')]['http']({'port':0x232a});function respondWithRpcPromise(_0x4f9bdb,_0x5562ba,_0x6df696){return new BPromise(function(_0x2d1363,_0x4e7301){return client[_0x5b55('0xb')](_0x4f9bdb,_0x6df696)[_0x5b55('0xc')](function(_0x180f44){logger[_0x5b55('0xd')](_0x5b55('0xe'),_0x5562ba,_0x5b55('0xf'));logger[_0x5b55('0x10')](_0x5b55('0x11'),_0x5562ba,_0x5b55('0xf'),JSON[_0x5b55('0x12')](_0x180f44));if(_0x180f44[_0x5b55('0x13')]){if(_0x180f44[_0x5b55('0x13')][_0x5b55('0x14')]===0x1f4){logger['error'](_0x5b55('0xe'),_0x5562ba,_0x180f44['error'][_0x5b55('0x15')]);return _0x4e7301(_0x180f44[_0x5b55('0x13')][_0x5b55('0x15')]);}logger[_0x5b55('0x13')](_0x5b55('0xe'),_0x5562ba,_0x180f44[_0x5b55('0x13')]['message']);return _0x2d1363(_0x180f44[_0x5b55('0x13')]['message']);}else{logger[_0x5b55('0xd')](_0x5b55('0xe'),_0x5562ba,_0x5b55('0xf'));_0x2d1363(_0x180f44[_0x5b55('0x16')]['message']);}})[_0x5b55('0x17')](function(_0x4ce07e){logger[_0x5b55('0x13')](_0x5b55('0xe'),_0x5562ba,_0x4ce07e);_0x4e7301(_0x4ce07e);});});}exports[_0x5b55('0x18')]=function(_0x1b4c49){var _0x45384f=this;return new Promise(function(_0x1e853b,_0x9e8fac){return db[_0x5b55('0x19')][_0x5b55('0x1a')]({'raw':_0x1b4c49[_0x5b55('0x1b')]?_0x1b4c49['options']['raw']===undefined?!![]:![]:!![],'where':_0x1b4c49[_0x5b55('0x1b')]?_0x1b4c49[_0x5b55('0x1b')][_0x5b55('0x1c')]||null:null,'attributes':_0x1b4c49[_0x5b55('0x1b')]?_0x1b4c49[_0x5b55('0x1b')][_0x5b55('0x1d')]||null:null,'include':_0x1b4c49[_0x5b55('0x1b')]?_0x1b4c49[_0x5b55('0x1b')][_0x5b55('0x1e')]?_[_0x5b55('0x1f')](_0x1b4c49[_0x5b55('0x1b')]['include'],function(_0x5e4b71){return{'model':db[_0x5e4b71[_0x5b55('0x20')]],'as':_0x5e4b71['as'],'attributes':_0x5e4b71['attributes'],'include':_0x5e4b71[_0x5b55('0x1e')]?_['map'](_0x5e4b71[_0x5b55('0x1e')],function(_0x38f4de){return{'model':db[_0x38f4de['model']],'as':_0x38f4de['as'],'attributes':_0x38f4de[_0x5b55('0x1d')],'include':_0x38f4de[_0x5b55('0x1e')]?_[_0x5b55('0x1f')](_0x38f4de[_0x5b55('0x1e')],function(_0x5722f4){return{'model':db[_0x5722f4['model']],'as':_0x5722f4['as'],'attributes':_0x5722f4['attributes']};}):[]};}):[]};}):[]:[]})[_0x5b55('0xc')](function(_0x4fbd05){logger[_0x5b55('0xd')](_0x5b55('0x18'),_0x1b4c49);logger['debug']('ShowSetting',_0x1b4c49,JSON[_0x5b55('0x12')](_0x4fbd05));_0x1e853b(_0x4fbd05);})[_0x5b55('0x17')](function(_0x53eec4){logger[_0x5b55('0x13')]('ShowSetting',_0x53eec4[_0x5b55('0x15')],_0x1b4c49);_0x9e8fac(_0x45384f['error'](0x1f4,_0x53eec4[_0x5b55('0x15')]));});});}; \ No newline at end of file +var _0x6c4e=['request\x20sent','stringify','error','code','message','result','ShowSetting','Setting','find','options','raw','where','map','include','attributes','model','debug','catch','lodash','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','rpc','jayson/promise','http','then','info','Setting,\x20%s,\x20%s'];(function(_0x359af5,_0x19fd10){var _0x389a62=function(_0x32bd8f){while(--_0x32bd8f){_0x359af5['push'](_0x359af5['shift']());}};_0x389a62(++_0x19fd10);}(_0x6c4e,0x192));var _0xe6c4=function(_0x4551a5,_0x574589){_0x4551a5=_0x4551a5-0x0;var _0x13d7b9=_0x6c4e[_0x4551a5];return _0x13d7b9;};'use strict';var _=require(_0xe6c4('0x0'));var util=require(_0xe6c4('0x1'));var moment=require(_0xe6c4('0x2'));var BPromise=require(_0xe6c4('0x3'));var rs=require(_0xe6c4('0x4'));var fs=require('fs');var Redis=require(_0xe6c4('0x5'));var db=require(_0xe6c4('0x6'))['db'];var utils=require(_0xe6c4('0x7'));var logger=require('../../config/logger')(_0xe6c4('0x8'));var config=require('../../config/environment');var jayson=require(_0xe6c4('0x9'));var client=jayson['client'][_0xe6c4('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x3856e5,_0x1ec06a,_0x5be135){return new BPromise(function(_0x1bf97a,_0xe892da){return client['request'](_0x3856e5,_0x5be135)[_0xe6c4('0xb')](function(_0x4614e0){logger[_0xe6c4('0xc')](_0xe6c4('0xd'),_0x1ec06a,_0xe6c4('0xe'));logger['debug']('Setting,\x20%s,\x20%s,\x20%s',_0x1ec06a,'request\x20sent',JSON[_0xe6c4('0xf')](_0x4614e0));if(_0x4614e0['error']){if(_0x4614e0[_0xe6c4('0x10')][_0xe6c4('0x11')]===0x1f4){logger[_0xe6c4('0x10')](_0xe6c4('0xd'),_0x1ec06a,_0x4614e0[_0xe6c4('0x10')][_0xe6c4('0x12')]);return _0xe892da(_0x4614e0[_0xe6c4('0x10')]['message']);}logger[_0xe6c4('0x10')]('Setting,\x20%s,\x20%s',_0x1ec06a,_0x4614e0[_0xe6c4('0x10')][_0xe6c4('0x12')]);return _0x1bf97a(_0x4614e0[_0xe6c4('0x10')][_0xe6c4('0x12')]);}else{logger['info']('Setting,\x20%s,\x20%s',_0x1ec06a,_0xe6c4('0xe'));_0x1bf97a(_0x4614e0[_0xe6c4('0x13')][_0xe6c4('0x12')]);}})['catch'](function(_0x42070e){logger[_0xe6c4('0x10')](_0xe6c4('0xd'),_0x1ec06a,_0x42070e);_0xe892da(_0x42070e);});});}exports[_0xe6c4('0x14')]=function(_0x52d881){var _0x2cde74=this;return new Promise(function(_0x2e37e0,_0xaa35f2){return db[_0xe6c4('0x15')][_0xe6c4('0x16')]({'raw':_0x52d881['options']?_0x52d881[_0xe6c4('0x17')][_0xe6c4('0x18')]===undefined?!![]:![]:!![],'where':_0x52d881[_0xe6c4('0x17')]?_0x52d881[_0xe6c4('0x17')][_0xe6c4('0x19')]||null:null,'attributes':_0x52d881[_0xe6c4('0x17')]?_0x52d881[_0xe6c4('0x17')]['attributes']||null:null,'include':_0x52d881['options']?_0x52d881[_0xe6c4('0x17')]['include']?_[_0xe6c4('0x1a')](_0x52d881[_0xe6c4('0x17')][_0xe6c4('0x1b')],function(_0x1c1611){return{'model':db[_0x1c1611['model']],'as':_0x1c1611['as'],'attributes':_0x1c1611[_0xe6c4('0x1c')],'include':_0x1c1611['include']?_[_0xe6c4('0x1a')](_0x1c1611[_0xe6c4('0x1b')],function(_0x511a33){return{'model':db[_0x511a33[_0xe6c4('0x1d')]],'as':_0x511a33['as'],'attributes':_0x511a33['attributes'],'include':_0x511a33['include']?_['map'](_0x511a33[_0xe6c4('0x1b')],function(_0x29096f){return{'model':db[_0x29096f[_0xe6c4('0x1d')]],'as':_0x29096f['as'],'attributes':_0x29096f['attributes']};}):[]};}):[]};}):[]:[]})[_0xe6c4('0xb')](function(_0x469474){logger[_0xe6c4('0xc')]('ShowSetting',_0x52d881);logger[_0xe6c4('0x1e')]('ShowSetting',_0x52d881,JSON['stringify'](_0x469474));_0x2e37e0(_0x469474);})[_0xe6c4('0x1f')](function(_0x1e0657){logger[_0xe6c4('0x10')]('ShowSetting',_0x1e0657[_0xe6c4('0x12')],_0x52d881);_0xaa35f2(_0x2cde74['error'](0x1f4,_0x1e0657[_0xe6c4('0x12')]));});});}; \ No newline at end of file diff --git a/server/api/smsAccount/index.js b/server/api/smsAccount/index.js index 6b39f13..9eb9fcc 100644 --- a/server/api/smsAccount/index.js +++ b/server/api/smsAccount/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xabce=['/:id/users','getAgents','create','post','addAnswer','/:id/notify','notify','/:id/send','send','status','addAgents','put','update','delete','/:id','destroy','removeDispositions','removeAnswers','exports','multer','util','path','connect-timeout','express','../../components/auth/service','../../components/interaction/service','../../config/environment','isAuthenticated','get','describe','show','/:id/dispositions','getDispositions','/:id/canned_answers','getAnswers','/:id/applications','getApplications','/:id/interactions','getInteractions','/:id/status'];(function(_0x24ae33,_0x68eadf){var _0x1c7e8b=function(_0x1f377c){while(--_0x1f377c){_0x24ae33['push'](_0x24ae33['shift']());}};_0x1c7e8b(++_0x68eadf);}(_0xabce,0x103));var _0xeabc=function(_0x5447fd,_0x52a6b5){_0x5447fd=_0x5447fd-0x0;var _0x15b28a=_0xabce[_0x5447fd];return _0x15b28a;};'use strict';var multer=require(_0xeabc('0x0'));var util=require(_0xeabc('0x1'));var path=require(_0xeabc('0x2'));var timeout=require(_0xeabc('0x3'));var express=require(_0xeabc('0x4'));var router=express['Router']();var fs_extra=require('fs-extra');var auth=require(_0xeabc('0x5'));var interaction=require(_0xeabc('0x6'));var config=require(_0xeabc('0x7'));var controller=require('./smsAccount.controller');router['get']('/',auth[_0xeabc('0x8')](),controller['index']);router[_0xeabc('0x9')]('/describe',auth[_0xeabc('0x8')](),controller[_0xeabc('0xa')]);router[_0xeabc('0x9')]('/:id',auth[_0xeabc('0x8')](),controller[_0xeabc('0xb')]);router[_0xeabc('0x9')](_0xeabc('0xc'),auth[_0xeabc('0x8')](),controller[_0xeabc('0xd')]);router[_0xeabc('0x9')](_0xeabc('0xe'),auth[_0xeabc('0x8')](),controller[_0xeabc('0xf')]);router[_0xeabc('0x9')](_0xeabc('0x10'),auth[_0xeabc('0x8')](),controller[_0xeabc('0x11')]);router[_0xeabc('0x9')](_0xeabc('0x12'),auth['isAuthenticated'](),controller[_0xeabc('0x13')]);router[_0xeabc('0x9')](_0xeabc('0x14'),controller['statusGet']);router['get'](_0xeabc('0x15'),auth[_0xeabc('0x8')](),controller[_0xeabc('0x16')]);router['post']('/',auth[_0xeabc('0x8')](),controller[_0xeabc('0x17')]);router['post']('/:id/dispositions',auth[_0xeabc('0x8')](),controller['addDisposition']);router[_0xeabc('0x18')](_0xeabc('0xe'),auth[_0xeabc('0x8')](),controller[_0xeabc('0x19')]);router[_0xeabc('0x18')](_0xeabc('0x1a'),controller[_0xeabc('0x1b')]);router[_0xeabc('0x18')]('/:id/applications',auth[_0xeabc('0x8')](),controller['addApplications']);router[_0xeabc('0x18')](_0xeabc('0x1c'),auth['isAuthenticated'](),controller[_0xeabc('0x1d')]);router[_0xeabc('0x18')](_0xeabc('0x14'),controller[_0xeabc('0x1e')]);router[_0xeabc('0x18')]('/:id/users',auth[_0xeabc('0x8')](),controller[_0xeabc('0x1f')]);router[_0xeabc('0x20')]('/:id',auth[_0xeabc('0x8')](),controller[_0xeabc('0x21')]);router[_0xeabc('0x22')](_0xeabc('0x23'),auth['isAuthenticated'](),controller[_0xeabc('0x24')]);router['delete'](_0xeabc('0xc'),auth['isAuthenticated'](),controller[_0xeabc('0x25')]);router[_0xeabc('0x22')](_0xeabc('0xe'),auth[_0xeabc('0x8')](),controller[_0xeabc('0x26')]);router[_0xeabc('0x22')](_0xeabc('0x15'),auth['isAuthenticated'](),controller['removeAgents']);module[_0xeabc('0x27')]=router; \ No newline at end of file +var _0x8ef6=['addApplications','/:id/send','send','status','update','delete','destroy','removeAgents','multer','util','path','connect-timeout','express','Router','fs-extra','../../components/interaction/service','../../config/environment','./smsAccount.controller','get','/describe','isAuthenticated','/:id','show','/:id/dispositions','getDispositions','/:id/canned_answers','getAnswers','/:id/applications','getApplications','/:id/interactions','/:id/status','statusGet','/:id/users','getAgents','create','post','addDisposition','addAnswer','notify'];(function(_0x2a0353,_0x395d0b){var _0x246d32=function(_0x22faba){while(--_0x22faba){_0x2a0353['push'](_0x2a0353['shift']());}};_0x246d32(++_0x395d0b);}(_0x8ef6,0xf2));var _0x68ef=function(_0x44254f,_0x3f72a3){_0x44254f=_0x44254f-0x0;var _0x3112b7=_0x8ef6[_0x44254f];return _0x3112b7;};'use strict';var multer=require(_0x68ef('0x0'));var util=require(_0x68ef('0x1'));var path=require(_0x68ef('0x2'));var timeout=require(_0x68ef('0x3'));var express=require(_0x68ef('0x4'));var router=express[_0x68ef('0x5')]();var fs_extra=require(_0x68ef('0x6'));var auth=require('../../components/auth/service');var interaction=require(_0x68ef('0x7'));var config=require(_0x68ef('0x8'));var controller=require(_0x68ef('0x9'));router[_0x68ef('0xa')]('/',auth['isAuthenticated'](),controller['index']);router[_0x68ef('0xa')](_0x68ef('0xb'),auth[_0x68ef('0xc')](),controller['describe']);router[_0x68ef('0xa')](_0x68ef('0xd'),auth[_0x68ef('0xc')](),controller[_0x68ef('0xe')]);router[_0x68ef('0xa')](_0x68ef('0xf'),auth[_0x68ef('0xc')](),controller[_0x68ef('0x10')]);router[_0x68ef('0xa')](_0x68ef('0x11'),auth[_0x68ef('0xc')](),controller[_0x68ef('0x12')]);router['get'](_0x68ef('0x13'),auth[_0x68ef('0xc')](),controller[_0x68ef('0x14')]);router[_0x68ef('0xa')](_0x68ef('0x15'),auth[_0x68ef('0xc')](),controller['getInteractions']);router[_0x68ef('0xa')](_0x68ef('0x16'),controller[_0x68ef('0x17')]);router['get'](_0x68ef('0x18'),auth[_0x68ef('0xc')](),controller[_0x68ef('0x19')]);router['post']('/',auth[_0x68ef('0xc')](),controller[_0x68ef('0x1a')]);router[_0x68ef('0x1b')](_0x68ef('0xf'),auth['isAuthenticated'](),controller[_0x68ef('0x1c')]);router['post']('/:id/canned_answers',auth[_0x68ef('0xc')](),controller[_0x68ef('0x1d')]);router['post']('/:id/notify',controller[_0x68ef('0x1e')]);router[_0x68ef('0x1b')](_0x68ef('0x13'),auth['isAuthenticated'](),controller[_0x68ef('0x1f')]);router[_0x68ef('0x1b')](_0x68ef('0x20'),auth['isAuthenticated'](),controller[_0x68ef('0x21')]);router[_0x68ef('0x1b')]('/:id/status',controller[_0x68ef('0x22')]);router[_0x68ef('0x1b')](_0x68ef('0x18'),auth['isAuthenticated'](),controller['addAgents']);router['put'](_0x68ef('0xd'),auth[_0x68ef('0xc')](),controller[_0x68ef('0x23')]);router[_0x68ef('0x24')](_0x68ef('0xd'),auth[_0x68ef('0xc')](),controller[_0x68ef('0x25')]);router[_0x68ef('0x24')](_0x68ef('0xf'),auth[_0x68ef('0xc')](),controller['removeDispositions']);router[_0x68ef('0x24')]('/:id/canned_answers',auth['isAuthenticated'](),controller['removeAnswers']);router[_0x68ef('0x24')](_0x68ef('0x18'),auth[_0x68ef('0xc')](),controller[_0x68ef('0x26')]);module['exports']=router; \ No newline at end of file diff --git a/server/api/smsAccount/smsAccount.attributes.js b/server/api/smsAccount/smsAccount.attributes.js index 2c47786..2679df8 100644 --- a/server/api/smsAccount/smsAccount.attributes.js +++ b/server/api/smsAccount/smsAccount.attributes.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x92be=['intelepeer','BOOLEAN','TEXT','Account:\x20{{account.name}}
{{#queue}}Queue:\x20{{queue.name}}
{{/queue}}From\x20:\x20{{from}}','INTEGER','Enabled/disables\x20mandatory\x20dispo\x20on\x20a\x20queue','setDataValue','mandatoryDispositionPauseId','sequelize','exports','name','STRING','generate','ENUM','skebby','plivo','clickatell','bandwidth','csc'];(function(_0x4c394e,_0x215d64){var _0x181387=function(_0x25d194){while(--_0x25d194){_0x4c394e['push'](_0x4c394e['shift']());}};_0x181387(++_0x215d64);}(_0x92be,0x1d0));var _0xe92b=function(_0x4a9fb1,_0x273043){_0x4a9fb1=_0x4a9fb1-0x0;var _0x348672=_0x92be[_0x4a9fb1];return _0x348672;};'use strict';var Sequelize=require(_0xe92b('0x0'));var rs=require('randomstring');module[_0xe92b('0x1')]={'name':{'type':Sequelize['STRING'],'unique':_0xe92b('0x2'),'allowNull':![]},'key':{'type':Sequelize[_0xe92b('0x3')],'allowNull':![]},'remote':{'type':Sequelize[_0xe92b('0x3')],'allowNull':![]},'token':{'type':Sequelize[_0xe92b('0x3')],'defaultValue':function(){return rs[_0xe92b('0x4')]();}},'phone':{'type':Sequelize['STRING']},'type':{'type':Sequelize[_0xe92b('0x5')]('twilio',_0xe92b('0x6'),'connectel','clicksend',_0xe92b('0x7'),_0xe92b('0x8'),_0xe92b('0x9'),_0xe92b('0xa'),'infobip',_0xe92b('0xb'))},'accountSid':{'type':Sequelize[_0xe92b('0x3')]},'authId':{'type':Sequelize[_0xe92b('0x3')]},'authToken':{'type':Sequelize[_0xe92b('0x3')]},'smsMethod':{'type':Sequelize[_0xe92b('0x5')]('SI','TI','GP')},'username':{'type':Sequelize[_0xe92b('0x3')]},'password':{'type':Sequelize[_0xe92b('0x3')]},'apiKey':{'type':Sequelize[_0xe92b('0x3')]},'applicationId':{'type':Sequelize[_0xe92b('0x3')]},'accountId':{'type':Sequelize[_0xe92b('0x3')]},'senderString':{'type':Sequelize[_0xe92b('0x3')]},'deliveryReport':{'type':Sequelize[_0xe92b('0xc')],'defaultValue':![]},'description':{'type':Sequelize[_0xe92b('0x3')]},'notificationTemplate':{'type':Sequelize[_0xe92b('0xd')],'defaultValue':function(){return _0xe92b('0xe');}},'notificationSound':{'type':Sequelize['BOOLEAN'],'defaultValue':!![]},'notificationShake':{'type':Sequelize[_0xe92b('0xc')],'defaultValue':![]},'waitForTheAssignedAgent':{'type':Sequelize[_0xe92b('0xf')],'validate':{'min':0x1,'max':0x20c49b},'defaultValue':0xa},'queueTransfer':{'type':Sequelize[_0xe92b('0xc')],'defaultValue':![]},'queueTransferTimeout':{'type':Sequelize['INTEGER'],'validate':{'min':0x1,'max':0x20c49b},'defaultValue':0x12c},'agentTransfer':{'type':Sequelize[_0xe92b('0xc')],'defaultValue':![]},'agentTransferTimeout':{'type':Sequelize[_0xe92b('0xf')],'validate':{'min':0x1,'max':0x20c49b},'defaultValue':0x12c},'baseUrl':{'type':Sequelize[_0xe92b('0x3')]},'mandatoryDispositionPauseId':{'type':Sequelize[_0xe92b('0xf')],'comment':'Status\x20to\x20put\x20when\x20mandatory\x20disposition\x20is\x20enabled'},'mandatoryDisposition':{'type':Sequelize[_0xe92b('0xc')],'defaultValue':![],'comment':_0xe92b('0x10'),'set':function(_0x5bd317){if(!_0x5bd317)this[_0xe92b('0x11')](_0xe92b('0x12'),null);this[_0xe92b('0x11')]('mandatoryDisposition',_0x5bd317);}}}; \ No newline at end of file +var _0xf4cd=['Status\x20to\x20put\x20when\x20mandatory\x20disposition\x20is\x20enabled','Enabled/disables\x20mandatory\x20dispo\x20on\x20a\x20queue','setDataValue','mandatoryDispositionPauseId','sequelize','randomstring','exports','name','STRING','generate','ENUM','twilio','connectel','clicksend','plivo','clickatell','bandwidth','csc','infobip','intelepeer','BOOLEAN','TEXT','Account:\x20{{account.name}}
{{#queue}}Queue:\x20{{queue.name}}
{{/queue}}From\x20:\x20{{from}}','INTEGER'];(function(_0x42c404,_0x3797a7){var _0x35beaf=function(_0x4444c1){while(--_0x4444c1){_0x42c404['push'](_0x42c404['shift']());}};_0x35beaf(++_0x3797a7);}(_0xf4cd,0x16c));var _0xdf4c=function(_0x1b137c,_0x35aa6d){_0x1b137c=_0x1b137c-0x0;var _0x1bc1c8=_0xf4cd[_0x1b137c];return _0x1bc1c8;};'use strict';var Sequelize=require(_0xdf4c('0x0'));var rs=require(_0xdf4c('0x1'));module[_0xdf4c('0x2')]={'name':{'type':Sequelize['STRING'],'unique':_0xdf4c('0x3'),'allowNull':![]},'key':{'type':Sequelize[_0xdf4c('0x4')],'allowNull':![]},'remote':{'type':Sequelize[_0xdf4c('0x4')],'allowNull':![]},'token':{'type':Sequelize[_0xdf4c('0x4')],'defaultValue':function(){return rs[_0xdf4c('0x5')]();}},'phone':{'type':Sequelize[_0xdf4c('0x4')]},'type':{'type':Sequelize[_0xdf4c('0x6')](_0xdf4c('0x7'),'skebby',_0xdf4c('0x8'),_0xdf4c('0x9'),_0xdf4c('0xa'),_0xdf4c('0xb'),_0xdf4c('0xc'),_0xdf4c('0xd'),_0xdf4c('0xe'),_0xdf4c('0xf'))},'accountSid':{'type':Sequelize['STRING']},'authId':{'type':Sequelize[_0xdf4c('0x4')]},'authToken':{'type':Sequelize[_0xdf4c('0x4')]},'smsMethod':{'type':Sequelize['ENUM']('SI','TI','GP')},'username':{'type':Sequelize['STRING']},'password':{'type':Sequelize[_0xdf4c('0x4')]},'apiKey':{'type':Sequelize[_0xdf4c('0x4')]},'applicationId':{'type':Sequelize[_0xdf4c('0x4')]},'accountId':{'type':Sequelize[_0xdf4c('0x4')]},'senderString':{'type':Sequelize[_0xdf4c('0x4')]},'deliveryReport':{'type':Sequelize[_0xdf4c('0x10')],'defaultValue':![]},'description':{'type':Sequelize[_0xdf4c('0x4')]},'notificationTemplate':{'type':Sequelize[_0xdf4c('0x11')],'defaultValue':function(){return _0xdf4c('0x12');}},'notificationSound':{'type':Sequelize[_0xdf4c('0x10')],'defaultValue':!![]},'notificationShake':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'waitForTheAssignedAgent':{'type':Sequelize[_0xdf4c('0x13')],'validate':{'min':0x1,'max':0x20c49b},'defaultValue':0xa},'queueTransfer':{'type':Sequelize[_0xdf4c('0x10')],'defaultValue':![]},'queueTransferTimeout':{'type':Sequelize['INTEGER'],'validate':{'min':0x1,'max':0x20c49b},'defaultValue':0x12c},'agentTransfer':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'agentTransferTimeout':{'type':Sequelize[_0xdf4c('0x13')],'validate':{'min':0x1,'max':0x20c49b},'defaultValue':0x12c},'baseUrl':{'type':Sequelize['STRING']},'mandatoryDispositionPauseId':{'type':Sequelize[_0xdf4c('0x13')],'comment':_0xdf4c('0x14')},'mandatoryDisposition':{'type':Sequelize[_0xdf4c('0x10')],'defaultValue':![],'comment':_0xdf4c('0x15'),'set':function(_0xf6e7af){if(!_0xf6e7af)this[_0xdf4c('0x16')](_0xdf4c('0x17'),null);this[_0xdf4c('0x16')]('mandatoryDisposition',_0xf6e7af);}}}; \ No newline at end of file diff --git a/server/api/smsAccount/smsAccount.controller.js b/server/api/smsAccount/smsAccount.controller.js index c2f601e..a50a0bc 100644 --- a/server/api/smsAccount/smsAccount.controller.js +++ b/server/api/smsAccount/smsAccount.controller.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x8038=['user','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','UserProfileSection','find','autoAssociation','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','body','params','describe','addDisposition','SmsAccountId','getDispositions','hasOwnProperty','Disposition','rows','removeDispositions','ids','addAnswer','CannedAnswer','getAnswers','findOne','pick','removeAnswers','notify','sms','applications','orderBy','Applications','priority','asc','account','CmContact','Sequelize','ValidationError','no\x20available\x20attributes','difference','updatedAt','createdAt','CompanyId','ListId','mobile','twilio','from','messageId','connectel','clicksend','message_id','plivo','From','MessageUUID','infobip','results','csc','originatingAddress','segmentedMessage','clickatell','text','replyMessageId','bandwidth','intelepeer','refid','isNil','from\x20is\x20mandatory','mapKey\x20is\x20mandatory,\x20please\x20use\x20one\x20of\x20these:\x20','includes','mapKey','mapKey\x20invalid,\x20please\x20use\x20one\x20of\x20these:\x20','Contacts','omit','length','defaults','contact','SmsInteraction','spread','interaction','created','autoclose','push','close','unmanaged','*,*,*,*','SmsMessage','ContactId','AttachmentId','UserId','User','unshift','agent','waitForTheAssignedAgent','startRouting','Start','entity\x20found','SmsAccount,\x20%s,\x20%s,\x20%s,\x20%s','set','text/xml','\x0a','addApplications','sequelize','READ_COMMITTED','SmsApplication','findAndCountAll','finally','sendStatus','getApplications','getInteractions','Contact','Tag','tag','to\x20is\x20mandatory','DESC','List','out','Messages','dataValues','received\x20delivery\x20report\x20from','skebby_dispatch_id','requestid','statusInt','status_code','groupName','redif','skebby','DELIVERED','inspect','error_code','DELIVERED_TO_GATEWAY','RECEIVED_BY_RECIPIENT','DELIVRD','ACCEPTD','statusGet','message-id','state','addAgents','emit','userSmsAccount:save','removeAgents','isArray','userSmsAccount:remove','getAgents','eml-format','rimraf','request-promise','moment','bluebird','mustache','util','to-csv','ejs','lodash','squel','crypto','jsforce','desk.js','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/environment','../../config/license/util','../../mysqldb','redis','localhost','socket.io-emitter','./smsAccount.socket','register','jayson/promise','client','http','request','then','info','SmsAccount,\x20%s,\x20%s','debug','SmsAccount,\x20%s,\x20%s,\x20%s','stringify','error','code','message','request\x20sent','catch','end','status','json','offset','undefined','limit','count','reject','update','get','SmsAccounts','UserProfileResource','destroy','stack','name','send','index','mandatoryDispositionPause','SmsAccount','rawAttributes','fieldName','type','key','model','map','query','keys','filters','intersection','attributes','fields','nolimit','order','sort','where','filter','VIRTUAL','merge','options','findAll','show','Pause','includeAll','include','create'];(function(_0x2641f9,_0x26715f){var _0x585741=function(_0x2d1462){while(--_0x2d1462){_0x2641f9['push'](_0x2641f9['shift']());}};_0x585741(++_0x26715f);}(_0x8038,0x8c));var _0x8803=function(_0x1f81a4,_0x858c9c){_0x1f81a4=_0x1f81a4-0x0;var _0x47de96=_0x8038[_0x1f81a4];return _0x47de96;};'use strict';var emlformat=require(_0x8803('0x0'));var rimraf=require(_0x8803('0x1'));var zipdir=require('zip-dir');var jsonpatch=require('fast-json-patch');var rp=require(_0x8803('0x2'));var moment=require(_0x8803('0x3'));var BPromise=require(_0x8803('0x4'));var Mustache=require(_0x8803('0x5'));var util=require(_0x8803('0x6'));var path=require('path');var sox=require('sox');var csv=require(_0x8803('0x7'));var ejs=require(_0x8803('0x8'));var fs=require('fs');var fs_extra=require('fs-extra');var _=require(_0x8803('0x9'));var squel=require(_0x8803('0xa'));var crypto=require(_0x8803('0xb'));var jsforce=require(_0x8803('0xc'));var deskjs=require(_0x8803('0xd'));var toCsv=require(_0x8803('0x7'));var querystring=require(_0x8803('0xe'));var Papa=require(_0x8803('0xf'));var Redis=require(_0x8803('0x10'));var authService=require(_0x8803('0x11'));var qs=require(_0x8803('0x12'));var as=require(_0x8803('0x13'));var hardwareService=require(_0x8803('0x14'));var logger=require(_0x8803('0x15'))(_0x8803('0x16'));var utils=require('../../config/utils');var config=require(_0x8803('0x17'));var licenseUtil=require(_0x8803('0x18'));var db=require(_0x8803('0x19'))['db'];config['redis']=_['defaults'](config[_0x8803('0x1a')],{'host':_0x8803('0x1b'),'port':0x18eb});var socket=require(_0x8803('0x1c'))(new Redis(config[_0x8803('0x1a')]));require(_0x8803('0x1d'))[_0x8803('0x1e')](socket);var jayson=require(_0x8803('0x1f'));var client=jayson[_0x8803('0x20')][_0x8803('0x21')]({'port':0x232c});function respondWithRpcPromise(_0x2e2010,_0x29ddea,_0x4571e3,_0x8d84ae){return new BPromise(function(_0x36f909,_0x1a59de){var _0x394562=_0x8d84ae||client;return _0x394562[_0x8803('0x22')](_0x2e2010,_0x4571e3)[_0x8803('0x23')](function(_0x5bbb6a){logger[_0x8803('0x24')](_0x8803('0x25'),_0x29ddea,'request\x20sent');logger[_0x8803('0x26')](_0x8803('0x27'),_0x29ddea,'request\x20sent',JSON[_0x8803('0x28')](_0x5bbb6a));if(_0x5bbb6a[_0x8803('0x29')]){if(_0x5bbb6a[_0x8803('0x29')][_0x8803('0x2a')]===0x1f4){logger[_0x8803('0x29')]('SmsAccount,\x20%s,\x20%s',_0x29ddea,_0x5bbb6a['error'][_0x8803('0x2b')]);return _0x1a59de(_0x5bbb6a[_0x8803('0x29')][_0x8803('0x2b')]);}logger[_0x8803('0x29')](_0x8803('0x25'),_0x29ddea,_0x5bbb6a[_0x8803('0x29')][_0x8803('0x2b')]);return _0x36f909(_0x5bbb6a['error']['message']);}else{logger[_0x8803('0x24')](_0x8803('0x25'),_0x29ddea,_0x8803('0x2c'));_0x36f909(_0x5bbb6a['result'][_0x8803('0x2b')]);}})[_0x8803('0x2d')](function(_0x22d9cb){logger[_0x8803('0x29')](_0x8803('0x25'),_0x29ddea,_0x22d9cb);_0x1a59de(_0x22d9cb);});});}function respondWithStatusCode(_0x5bd5ca,_0x21fed4){_0x21fed4=_0x21fed4||0xcc;return function(_0x281831){if(_0x281831){return _0x5bd5ca['sendStatus'](_0x21fed4);}return _0x5bd5ca['status'](_0x21fed4)[_0x8803('0x2e')]();};}function respondWithResult(_0x190c5d,_0x9b05c2){_0x9b05c2=_0x9b05c2||0xc8;return function(_0x1ca3d9){if(_0x1ca3d9){return _0x190c5d[_0x8803('0x2f')](_0x9b05c2)[_0x8803('0x30')](_0x1ca3d9);}};}function respondWithFilteredResult(_0x82910c,_0xa70c87){return function(_0x18b4e7){if(_0x18b4e7){var _0x2ab4a0=typeof _0xa70c87[_0x8803('0x31')]===_0x8803('0x32')&&typeof _0xa70c87[_0x8803('0x33')]===_0x8803('0x32');var _0x15ad97=_0x18b4e7[_0x8803('0x34')];var _0x100c9f=_0x2ab4a0?0x0:_0xa70c87['offset'];var _0x77bc30=_0x2ab4a0?_0x18b4e7[_0x8803('0x34')]:_0xa70c87[_0x8803('0x31')]+_0xa70c87[_0x8803('0x33')];var _0x28ef12;if(_0x77bc30>=_0x15ad97){_0x77bc30=_0x15ad97;_0x28ef12=0xc8;}else{_0x28ef12=0xce;}_0x82910c[_0x8803('0x2f')](_0x28ef12);return _0x82910c['set']('Content-Range',_0x100c9f+'-'+_0x77bc30+'/'+_0x15ad97)['json'](_0x18b4e7);}return null;};}function patchUpdates(_0x5a1f50){return function(_0x5d6f50){try{jsonpatch['apply'](_0x5d6f50,_0x5a1f50,!![]);}catch(_0x5d66af){return BPromise[_0x8803('0x35')](_0x5d66af);}return _0x5d6f50['save']();};}function saveUpdates(_0x57c87e,_0x5d9b8f){return function(_0x4656c9){if(_0x4656c9){return _0x4656c9[_0x8803('0x36')](_0x57c87e)[_0x8803('0x23')](function(_0x43d4b8){return _0x43d4b8;});}return null;};}function removeEntity(_0x3d806e,_0x58fee0){return function(_0x2f8b9e){if(_0x2f8b9e){return _0x2f8b9e['destroy']()[_0x8803('0x23')](function(){var _0x1ec4d3=_0x2f8b9e[_0x8803('0x37')]({'plain':!![]});var _0x269e9b=_0x8803('0x38');return db[_0x8803('0x39')][_0x8803('0x3a')]({'where':{'type':_0x269e9b,'resourceId':_0x1ec4d3['id']}})[_0x8803('0x23')](function(){return _0x2f8b9e;});})[_0x8803('0x23')](function(){_0x3d806e[_0x8803('0x2f')](0xcc)[_0x8803('0x2e')]();});}};}function handleEntityNotFound(_0x34626a,_0x49203f){return function(_0x30f7b0){if(!_0x30f7b0){_0x34626a['sendStatus'](0x194);}return _0x30f7b0;};}function handleError(_0x74f6f1,_0x2388ab){_0x2388ab=_0x2388ab||0x1f4;return function(_0x42a026){logger[_0x8803('0x29')](_0x42a026[_0x8803('0x3b')]);if(_0x42a026[_0x8803('0x3c')]){delete _0x42a026[_0x8803('0x3c')];}_0x74f6f1[_0x8803('0x2f')](_0x2388ab)[_0x8803('0x3d')](_0x42a026);};}exports[_0x8803('0x3e')]=function(_0x368ad6,_0x33f017){var _0x42a39d={'include':[{'model':db['Pause'],'as':_0x8803('0x3f')}]},_0x5a9118={},_0x59fca8={'count':0x0,'rows':[]};var _0x240599=_['map'](db[_0x8803('0x40')][_0x8803('0x41')],function(_0x29d30f){return{'name':_0x29d30f[_0x8803('0x42')],'type':_0x29d30f[_0x8803('0x43')][_0x8803('0x44')]};});_0x5a9118[_0x8803('0x45')]=_[_0x8803('0x46')](_0x240599,_0x8803('0x3c'));_0x5a9118[_0x8803('0x47')]=_[_0x8803('0x48')](_0x368ad6['query']);_0x5a9118[_0x8803('0x49')]=_[_0x8803('0x4a')](_0x5a9118['model'],_0x5a9118['query']);_0x42a39d[_0x8803('0x4b')]=_[_0x8803('0x4a')](_0x5a9118['model'],qs['fields'](_0x368ad6[_0x8803('0x47')][_0x8803('0x4c')]));_0x42a39d[_0x8803('0x4b')]=_0x42a39d[_0x8803('0x4b')]['length']?_0x42a39d[_0x8803('0x4b')]:_0x5a9118[_0x8803('0x45')];if(!_0x368ad6[_0x8803('0x47')]['hasOwnProperty'](_0x8803('0x4d'))){_0x42a39d['limit']=qs[_0x8803('0x33')](_0x368ad6[_0x8803('0x47')]['limit']);_0x42a39d[_0x8803('0x31')]=qs[_0x8803('0x31')](_0x368ad6[_0x8803('0x47')]['offset']);}_0x42a39d[_0x8803('0x4e')]=qs['sort'](_0x368ad6[_0x8803('0x47')][_0x8803('0x4f')]);_0x42a39d[_0x8803('0x50')]=qs[_0x8803('0x49')](_['pick'](_0x368ad6[_0x8803('0x47')],_0x5a9118['filters']),_0x240599);if(_0x368ad6[_0x8803('0x47')][_0x8803('0x51')]){_0x42a39d[_0x8803('0x50')]=_['merge'](_0x42a39d[_0x8803('0x50')],{'$or':_[_0x8803('0x46')](_0x240599,function(_0x30fc9d){if(_0x30fc9d[_0x8803('0x43')]!==_0x8803('0x52')){var _0x507134={};_0x507134[_0x30fc9d[_0x8803('0x3c')]]={'$like':'%'+_0x368ad6[_0x8803('0x47')]['filter']+'%'};return _0x507134;}})});}_0x42a39d=_[_0x8803('0x53')]({},_0x42a39d,_0x368ad6[_0x8803('0x54')]);var _0x5b29d4={'where':_0x42a39d[_0x8803('0x50')]};return db[_0x8803('0x40')][_0x8803('0x34')](_0x5b29d4)[_0x8803('0x23')](function(_0x4e2b1f){_0x59fca8[_0x8803('0x34')]=_0x4e2b1f;if(_0x368ad6[_0x8803('0x47')]['includeAll']){_0x42a39d['include']=[{'all':!![]}];}return db[_0x8803('0x40')][_0x8803('0x55')](_0x42a39d);})[_0x8803('0x23')](function(_0x323808){_0x59fca8['rows']=_0x323808;return _0x59fca8;})[_0x8803('0x23')](respondWithFilteredResult(_0x33f017,_0x42a39d))[_0x8803('0x2d')](handleError(_0x33f017,null));};exports[_0x8803('0x56')]=function(_0x2325c7,_0x2dd7d9){var _0x4c72bc={'raw':![],'where':{'id':_0x2325c7['params']['id']},'include':[{'model':db[_0x8803('0x57')],'as':'mandatoryDispositionPause'}]},_0x1b6c50={};_0x1b6c50[_0x8803('0x45')]=_[_0x8803('0x48')](db['SmsAccount'][_0x8803('0x41')]);_0x1b6c50[_0x8803('0x47')]=_['keys'](_0x2325c7['query']);_0x1b6c50[_0x8803('0x49')]=_['intersection'](_0x1b6c50['model'],_0x1b6c50[_0x8803('0x47')]);_0x4c72bc['attributes']=_[_0x8803('0x4a')](_0x1b6c50[_0x8803('0x45')],qs[_0x8803('0x4c')](_0x2325c7[_0x8803('0x47')][_0x8803('0x4c')]));_0x4c72bc[_0x8803('0x4b')]=_0x4c72bc['attributes']['length']?_0x4c72bc[_0x8803('0x4b')]:_0x1b6c50['model'];if(_0x2325c7[_0x8803('0x47')][_0x8803('0x58')]){_0x4c72bc[_0x8803('0x59')]=[{'all':!![]}];}_0x4c72bc=_[_0x8803('0x53')]({},_0x4c72bc,_0x2325c7['options']);return db[_0x8803('0x40')]['find'](_0x4c72bc)[_0x8803('0x23')](handleEntityNotFound(_0x2dd7d9,null))[_0x8803('0x23')](respondWithResult(_0x2dd7d9,null))[_0x8803('0x2d')](handleError(_0x2dd7d9,null));};exports['create']=function(_0x23d78a,_0x3fb5f1){return db[_0x8803('0x40')][_0x8803('0x5a')](_0x23d78a['body'],{})[_0x8803('0x23')](function(_0xf90940){var _0x582dfb=_0x23d78a[_0x8803('0x5b')][_0x8803('0x37')]({'plain':!![]});if(!_0x582dfb)throw new Error(_0x8803('0x5c'));if(_0x582dfb[_0x8803('0x5d')]==='user'){var _0x21306e=_0xf90940[_0x8803('0x37')]({'plain':!![]});var _0x23957a=_0x8803('0x38');return db[_0x8803('0x5e')][_0x8803('0x5f')]({'where':{'name':_0x23957a,'userProfileId':_0x582dfb['userProfileId']},'raw':!![]})[_0x8803('0x23')](function(_0xb00362){if(_0xb00362&&_0xb00362[_0x8803('0x60')]===0x0){return db[_0x8803('0x39')][_0x8803('0x5a')]({'name':_0x21306e[_0x8803('0x3c')],'resourceId':_0x21306e['id'],'type':_0xb00362['name'],'sectionId':_0xb00362['id']},{})[_0x8803('0x23')](function(){return _0xf90940;});}else{return _0xf90940;}})[_0x8803('0x2d')](function(_0x3a60f6){logger[_0x8803('0x29')](_0x8803('0x61'),_0x3a60f6);throw _0x3a60f6;});}return _0xf90940;})[_0x8803('0x23')](respondWithResult(_0x3fb5f1,0xc9))[_0x8803('0x2d')](handleError(_0x3fb5f1,null));};exports[_0x8803('0x36')]=function(_0x1121e0,_0x1ee796){if(_0x1121e0[_0x8803('0x62')]['id']){delete _0x1121e0[_0x8803('0x62')]['id'];}return db['SmsAccount'][_0x8803('0x5f')]({'where':{'id':_0x1121e0['params']['id']},'include':[{'model':db[_0x8803('0x57')],'as':_0x8803('0x3f')}]})[_0x8803('0x23')](handleEntityNotFound(_0x1ee796,null))[_0x8803('0x23')](saveUpdates(_0x1121e0['body'],null))[_0x8803('0x23')](respondWithResult(_0x1ee796,null))['catch'](handleError(_0x1ee796,null));};exports[_0x8803('0x3a')]=function(_0x2991e6,_0x2c6863){return db[_0x8803('0x40')][_0x8803('0x5f')]({'where':{'id':_0x2991e6[_0x8803('0x63')]['id']}})[_0x8803('0x23')](handleEntityNotFound(_0x2c6863,null))['then'](removeEntity(_0x2c6863,null))[_0x8803('0x2d')](handleError(_0x2c6863,null));};exports[_0x8803('0x64')]=function(_0x52ddab,_0x1908f1){return db[_0x8803('0x40')][_0x8803('0x64')]()[_0x8803('0x23')](respondWithResult(_0x1908f1,null))[_0x8803('0x2d')](handleError(_0x1908f1,null));};exports[_0x8803('0x65')]=function(_0x52d34c,_0x4b288a,_0xaf5ea){if(_0x52d34c[_0x8803('0x62')]['id']){delete _0x52d34c['body']['id'];}return db[_0x8803('0x40')][_0x8803('0x5f')]({'where':{'id':_0x52d34c['params']['id']}})[_0x8803('0x23')](handleEntityNotFound(_0x4b288a,null))['then'](function(_0x854996){if(_0x854996){_0x52d34c[_0x8803('0x62')][_0x8803('0x66')]=_0x854996['id'];return db['Disposition'][_0x8803('0x5a')](_0x52d34c['body']);}})[_0x8803('0x23')](respondWithResult(_0x4b288a,null))[_0x8803('0x2d')](handleError(_0x4b288a,null));};exports[_0x8803('0x67')]=function(_0x4dce97,_0x1afb44,_0x5717eb){var _0x3c1a80={'raw':![],'where':{}};var _0x1b9c11={};var _0x48562e={'count':0x0,'rows':[]};return db[_0x8803('0x40')]['findOne']({'where':{'id':_0x4dce97[_0x8803('0x63')]['id']}})['then'](handleEntityNotFound(_0x1afb44,null))[_0x8803('0x23')](function(_0x4eda9d){if(_0x4eda9d){_0x1b9c11['model']=_[_0x8803('0x48')](db['Disposition'][_0x8803('0x41')]);_0x1b9c11[_0x8803('0x47')]=_['keys'](_0x4dce97[_0x8803('0x47')]);_0x1b9c11['filters']=_['intersection'](_0x1b9c11['model'],_0x1b9c11[_0x8803('0x47')]);_0x3c1a80[_0x8803('0x4b')]=_['intersection'](_0x1b9c11[_0x8803('0x45')],qs[_0x8803('0x4c')](_0x4dce97['query']['fields']));_0x3c1a80[_0x8803('0x4b')]=_0x3c1a80['attributes']['length']?_0x3c1a80[_0x8803('0x4b')]:_0x1b9c11[_0x8803('0x45')];if(!_0x4dce97[_0x8803('0x47')][_0x8803('0x68')](_0x8803('0x4d'))){_0x3c1a80[_0x8803('0x33')]=qs['limit'](_0x4dce97['query'][_0x8803('0x33')]);_0x3c1a80[_0x8803('0x31')]=qs[_0x8803('0x31')](_0x4dce97[_0x8803('0x47')][_0x8803('0x31')]);}_0x3c1a80[_0x8803('0x4e')]=qs[_0x8803('0x4f')](_0x4dce97['query'][_0x8803('0x4f')]);_0x3c1a80[_0x8803('0x50')]=qs[_0x8803('0x49')](_['pick'](_0x4dce97[_0x8803('0x47')],_0x1b9c11['filters']));_0x3c1a80[_0x8803('0x50')]['SmsAccountId']=_0x4eda9d['id'];if(_0x4dce97[_0x8803('0x47')][_0x8803('0x51')]){_0x3c1a80[_0x8803('0x50')]=_[_0x8803('0x53')](_0x3c1a80['where'],{'$or':_[_0x8803('0x46')](_0x3c1a80[_0x8803('0x4b')],function(_0x206136){var _0x24a3ea={};_0x24a3ea[_0x206136]={'$like':'%'+_0x4dce97['query'][_0x8803('0x51')]+'%'};return _0x24a3ea;})});}_0x3c1a80=_[_0x8803('0x53')]({},_0x3c1a80,_0x4dce97['options']);return db['Disposition'][_0x8803('0x34')]({'where':_0x3c1a80[_0x8803('0x50')]})[_0x8803('0x23')](function(_0x502eea){_0x48562e[_0x8803('0x34')]=_0x502eea;if(_0x4dce97[_0x8803('0x47')][_0x8803('0x58')]){_0x3c1a80[_0x8803('0x59')]=[{'all':!![]}];}return db[_0x8803('0x69')][_0x8803('0x55')](_0x3c1a80);})[_0x8803('0x23')](function(_0x4eca4b){_0x48562e[_0x8803('0x6a')]=_0x4eca4b;return _0x48562e;});}})[_0x8803('0x23')](respondWithFilteredResult(_0x1afb44,_0x3c1a80))[_0x8803('0x2d')](handleError(_0x1afb44,null));};exports[_0x8803('0x6b')]=function(_0x50926b,_0x360f6f,_0x4f224b){return db['SmsAccount']['find']({'where':{'id':_0x50926b['params']['id']}})[_0x8803('0x23')](handleEntityNotFound(_0x360f6f,null))[_0x8803('0x23')](function(_0x55088a){if(_0x55088a){return _0x55088a[_0x8803('0x6b')](_0x50926b['query'][_0x8803('0x6c')]);}})[_0x8803('0x23')](respondWithStatusCode(_0x360f6f,null))[_0x8803('0x2d')](handleError(_0x360f6f,null));};exports[_0x8803('0x6d')]=function(_0x1ea6d0,_0x217f2e,_0xf2aa10){if(_0x1ea6d0[_0x8803('0x62')]['id']){delete _0x1ea6d0[_0x8803('0x62')]['id'];}return db[_0x8803('0x40')][_0x8803('0x5f')]({'where':{'id':_0x1ea6d0[_0x8803('0x63')]['id']}})[_0x8803('0x23')](handleEntityNotFound(_0x217f2e,null))[_0x8803('0x23')](function(_0x49a25f){if(_0x49a25f){_0x1ea6d0[_0x8803('0x62')]['SmsAccountId']=_0x49a25f['id'];return db[_0x8803('0x6e')][_0x8803('0x5a')](_0x1ea6d0[_0x8803('0x62')]);}})[_0x8803('0x23')](respondWithResult(_0x217f2e,null))[_0x8803('0x2d')](handleError(_0x217f2e,null));};exports[_0x8803('0x6f')]=function(_0x308960,_0xfb03c5,_0x16801c){var _0xded761={'raw':![],'where':{}};var _0x4405f2={};var _0x474c84={'count':0x0,'rows':[]};return db['SmsAccount'][_0x8803('0x70')]({'where':{'id':_0x308960[_0x8803('0x63')]['id']}})[_0x8803('0x23')](handleEntityNotFound(_0xfb03c5,null))['then'](function(_0x5a2f1b){if(_0x5a2f1b){_0x4405f2[_0x8803('0x45')]=_[_0x8803('0x48')](db[_0x8803('0x6e')][_0x8803('0x41')]);_0x4405f2['query']=_[_0x8803('0x48')](_0x308960['query']);_0x4405f2[_0x8803('0x49')]=_[_0x8803('0x4a')](_0x4405f2[_0x8803('0x45')],_0x4405f2[_0x8803('0x47')]);_0xded761['attributes']=_['intersection'](_0x4405f2[_0x8803('0x45')],qs[_0x8803('0x4c')](_0x308960[_0x8803('0x47')]['fields']));_0xded761['attributes']=_0xded761['attributes']['length']?_0xded761['attributes']:_0x4405f2[_0x8803('0x45')];if(!_0x308960[_0x8803('0x47')][_0x8803('0x68')](_0x8803('0x4d'))){_0xded761[_0x8803('0x33')]=qs[_0x8803('0x33')](_0x308960['query']['limit']);_0xded761[_0x8803('0x31')]=qs[_0x8803('0x31')](_0x308960[_0x8803('0x47')][_0x8803('0x31')]);}_0xded761[_0x8803('0x4e')]=qs[_0x8803('0x4f')](_0x308960[_0x8803('0x47')][_0x8803('0x4f')]);_0xded761[_0x8803('0x50')]=qs[_0x8803('0x49')](_[_0x8803('0x71')](_0x308960[_0x8803('0x47')],_0x4405f2[_0x8803('0x49')]));_0xded761[_0x8803('0x50')][_0x8803('0x66')]=_0x5a2f1b['id'];if(_0x308960[_0x8803('0x47')][_0x8803('0x51')]){_0xded761[_0x8803('0x50')]=_[_0x8803('0x53')](_0xded761[_0x8803('0x50')],{'$or':_[_0x8803('0x46')](_0xded761[_0x8803('0x4b')],function(_0x2eaddd){var _0x24b0ce={};_0x24b0ce[_0x2eaddd]={'$like':'%'+_0x308960[_0x8803('0x47')]['filter']+'%'};return _0x24b0ce;})});}_0xded761=_['merge']({},_0xded761,_0x308960[_0x8803('0x54')]);return db[_0x8803('0x6e')]['count']({'where':_0xded761[_0x8803('0x50')]})[_0x8803('0x23')](function(_0x57e8af){_0x474c84[_0x8803('0x34')]=_0x57e8af;if(_0x308960[_0x8803('0x47')][_0x8803('0x58')]){_0xded761[_0x8803('0x59')]=[{'all':!![]}];}return db[_0x8803('0x6e')][_0x8803('0x55')](_0xded761);})[_0x8803('0x23')](function(_0x338d14){_0x474c84['rows']=_0x338d14;return _0x474c84;});}})[_0x8803('0x23')](respondWithFilteredResult(_0xfb03c5,_0xded761))[_0x8803('0x2d')](handleError(_0xfb03c5,null));};exports['removeAnswers']=function(_0x302a4c,_0xc48fd6,_0x236e14){return db['SmsAccount'][_0x8803('0x5f')]({'where':{'id':_0x302a4c['params']['id']}})[_0x8803('0x23')](handleEntityNotFound(_0xc48fd6,null))['then'](function(_0x4ead8c){if(_0x4ead8c){return _0x4ead8c[_0x8803('0x72')](_0x302a4c[_0x8803('0x47')]['ids']);}})['then'](respondWithStatusCode(_0xc48fd6,null))[_0x8803('0x2d')](handleError(_0xc48fd6,null));};exports[_0x8803('0x73')]=function(_0x203f75,_0x581b0a,_0x3ed550){var _0x493c52={'channel':_0x8803('0x74')};var _0xabb8bf=[];var _0x35190c=[];var _0x14574e={};return db[_0x8803('0x40')][_0x8803('0x5f')]({'where':{'id':_0x203f75[_0x8803('0x63')]['id']},'include':[{'model':db['SmsApplication'],'as':'Applications'}]})[_0x8803('0x23')](handleEntityNotFound(_0x581b0a,null))[_0x8803('0x23')](function(_0x1e863f){_0x493c52['account']=_0x1e863f;_0x493c52[_0x8803('0x75')]=_[_0x8803('0x76')](_0x1e863f[_0x8803('0x77')],[_0x8803('0x78')],[_0x8803('0x79')]);if(_0x493c52[_0x8803('0x7a')][_0x8803('0x77')]){delete _0x493c52[_0x8803('0x7a')][_0x8803('0x77')];}return db[_0x8803('0x7b')][_0x8803('0x64')]();})[_0x8803('0x23')](function(_0x3ece7c){if(!_0x3ece7c){throw new db[(_0x8803('0x7c'))][(_0x8803('0x7d'))](_0x8803('0x7e'));}_0xabb8bf=_[_0x8803('0x7f')](_['keys'](_0x3ece7c),['createdAt',_0x8803('0x80')]);_0x35190c=_[_0x8803('0x7f')](_['keys'](_0x3ece7c),[_0x8803('0x81'),_0x8803('0x80'),_0x8803('0x82'),_0x8803('0x83')]);_0x493c52[_0x8803('0x62')]={'mapKey':_0x8803('0x84')};if(_0x493c52[_0x8803('0x7a')][_0x8803('0x43')]){switch(_0x493c52[_0x8803('0x7a')]['type']){case _0x8803('0x85'):_0x493c52['body'][_0x8803('0x86')]=_0x203f75[_0x8803('0x62')]['From'];_0x493c52[_0x8803('0x62')]['body']=_0x203f75[_0x8803('0x62')]['Body'];_0x493c52[_0x8803('0x62')][_0x8803('0x87')]=_0x203f75[_0x8803('0x62')]['MessageSid'];break;case'skebby':_0x493c52[_0x8803('0x62')][_0x8803('0x86')]='+'+_0x203f75[_0x8803('0x62')]['sender'];_0x493c52['body']['body']=_0x203f75[_0x8803('0x62')]['text'];break;case _0x8803('0x88'):_0x493c52[_0x8803('0x62')][_0x8803('0x86')]=_0x203f75['body'][_0x8803('0x86')];_0x493c52[_0x8803('0x62')][_0x8803('0x62')]=_0x203f75['body'][_0x8803('0x2b')];break;case _0x8803('0x89'):_0x493c52[_0x8803('0x62')][_0x8803('0x86')]=_0x203f75[_0x8803('0x62')][_0x8803('0x86')];_0x493c52[_0x8803('0x62')]['body']=_0x203f75[_0x8803('0x62')][_0x8803('0x62')];_0x493c52['body'][_0x8803('0x87')]=_0x203f75[_0x8803('0x62')][_0x8803('0x8a')];break;case _0x8803('0x8b'):_0x493c52[_0x8803('0x62')][_0x8803('0x86')]=_0x203f75[_0x8803('0x62')][_0x8803('0x8c')];_0x493c52[_0x8803('0x62')][_0x8803('0x62')]=_0x203f75[_0x8803('0x62')]['Text'];_0x493c52['body'][_0x8803('0x87')]=_0x203f75[_0x8803('0x62')][_0x8803('0x8d')];break;case _0x8803('0x8e'):_0x493c52[_0x8803('0x62')][_0x8803('0x86')]='+'+_0x203f75[_0x8803('0x62')][_0x8803('0x8f')][0x0][_0x8803('0x86')];_0x493c52[_0x8803('0x62')][_0x8803('0x62')]=_0x203f75[_0x8803('0x62')]['results'][0x0]['text'];_0x493c52[_0x8803('0x62')][_0x8803('0x87')]=_0x203f75[_0x8803('0x62')]['results'][0x0][_0x8803('0x87')];break;case _0x8803('0x90'):_0x493c52['body'][_0x8803('0x86')]=_0x203f75[_0x8803('0x62')][_0x8803('0x91')];_0x493c52[_0x8803('0x62')][_0x8803('0x62')]=_0x203f75['body'][_0x8803('0x92')][_0x8803('0x2b')];break;case _0x8803('0x93'):_0x493c52[_0x8803('0x62')][_0x8803('0x86')]=_0x203f75['body']['fromNumber'];_0x493c52['body']['body']=_0x203f75[_0x8803('0x62')][_0x8803('0x94')];_0x493c52[_0x8803('0x62')]['messageId']=_0x203f75[_0x8803('0x62')][_0x8803('0x95')];break;case _0x8803('0x96'):_0x493c52[_0x8803('0x62')]['messageId']=_0x203f75[_0x8803('0x62')][0x0][_0x8803('0x2b')]['id'];_0x493c52[_0x8803('0x62')][_0x8803('0x86')]=_0x203f75[_0x8803('0x62')][0x0][_0x8803('0x2b')]['from'];_0x493c52[_0x8803('0x62')][_0x8803('0x62')]=_0x203f75[_0x8803('0x62')][0x0]['message']['text'];break;case _0x8803('0x97'):_0x493c52['body'][_0x8803('0x86')]=_0x203f75['body'][_0x8803('0x86')];_0x493c52[_0x8803('0x62')]['body']=_0x203f75['body']['message'];_0x493c52[_0x8803('0x62')]['messageId']=_0x203f75[_0x8803('0x62')][_0x8803('0x98')];break;}}if(_0x493c52['body']['id']){delete _0x493c52[_0x8803('0x62')]['id'];}if(_[_0x8803('0x99')](_0x493c52[_0x8803('0x62')]['from'])){throw new db[(_0x8803('0x7c'))][(_0x8803('0x7d'))](_0x8803('0x9a'));}if(_[_0x8803('0x99')](_0x493c52[_0x8803('0x62')]['body'])||_0x493c52[_0x8803('0x62')][_0x8803('0x62')]===''){throw new db['Sequelize'][(_0x8803('0x7d'))]('body\x20is\x20mandatory\x20and\x20not\x20empty');}if(_[_0x8803('0x99')](_0x493c52[_0x8803('0x62')]['mapKey'])){throw new db[(_0x8803('0x7c'))][(_0x8803('0x7d'))](_0x8803('0x9b')+_0x35190c);}if(!_[_0x8803('0x9c')](_0x35190c,_0x493c52['body'][_0x8803('0x9d')])){throw new db[(_0x8803('0x7c'))]['ValidationError'](_0x8803('0x9e')+_0x35190c);}_0x14574e[_0x493c52[_0x8803('0x62')][_0x8803('0x9d')]]=_0x493c52[_0x8803('0x62')][_0x8803('0x86')];return db['CmList'][_0x8803('0x5f')]({'where':{'id':_0x493c52['account']['ListId']},'include':[{'model':db[_0x8803('0x7b')],'as':_0x8803('0x9f'),'where':_0x14574e,'limit':0x1,'order':[[_0x8803('0x80'),'DESC']]}]});})[_0x8803('0x23')](handleEntityNotFound(_0x581b0a,null))[_0x8803('0x23')](function(_0x4db30c){if(_0x4db30c){_0x493c52['list']=_[_0x8803('0xa0')](_0x4db30c,[_0x8803('0x9f')]);if(_0x4db30c[_0x8803('0x9f')][_0x8803('0xa1')]){return _0x4db30c['Contacts'][0x0];}var _0x1c8306=_[_0x8803('0xa2')](_0x493c52[_0x8803('0x62')],{'firstName':_0x493c52['body']['from'],'ListId':_0x4db30c['id']});_0x1c8306[_0x493c52[_0x8803('0x62')]['mapKey']]=_0x493c52[_0x8803('0x62')][_0x8803('0x86')];return db[_0x8803('0x7b')][_0x8803('0x5a')](_0x1c8306,{'fields':_0xabb8bf,'raw':!![]});}})['then'](handleEntityNotFound(_0x581b0a,null))['then'](function(_0x2ab045){if(_0x2ab045){_0x493c52[_0x8803('0xa3')]=_0x2ab045;var _0x165976={'ContactId':_0x2ab045['id'],'phone':_0x493c52[_0x8803('0x62')][_0x8803('0x86')],'SmsAccountId':_0x203f75[_0x8803('0x63')]['id']};var _0x36740f={'ContactId':_0x2ab045['id'],'SmsAccountId':_0x203f75[_0x8803('0x63')]['id'],'closed':![]};return db[_0x8803('0xa4')][_0x8803('0x5f')]({'where':_0x36740f})[_0x8803('0x23')](function(_0x5a7dbd){if(_0x5a7dbd){return[_0x5a7dbd,![]];}return db['SmsInteraction'][_0x8803('0x5a')](_0x165976)[_0x8803('0x23')](function(_0x54cda8){return[_0x54cda8,!![]];});});}})[_0x8803('0xa5')](function(_0x4c2bbb,_0x599335){_0x493c52[_0x8803('0xa6')]=_0x4c2bbb['get']({'plain':!![]});_0x493c52['interaction'][_0x8803('0xa7')]=![];if(_0x599335){if(_0x493c52[_0x8803('0x7a')][_0x8803('0xa8')]){_0x493c52[_0x8803('0x75')][_0x8803('0xa9')]({'id':0x0,'priority':_0x493c52['applications'][_0x8803('0xa1')]+0x1,'app':_0x8803('0xaa'),'appdata':_0x8803('0xab'),'interval':_0x8803('0xac')});}_0x493c52[_0x8803('0xa6')][_0x8803('0xa7')]=!![];}return db[_0x8803('0xad')]['create']({'phone':_0x493c52[_0x8803('0x62')]['from'],'messageId':_0x493c52[_0x8803('0x62')][_0x8803('0x87')],'body':_0x493c52[_0x8803('0x62')][_0x8803('0x62')],'SmsAccountId':_0x203f75[_0x8803('0x63')]['id'],'SmsInteractionId':_0x4c2bbb['id'],'direction':'in','ContactId':_0x4c2bbb[_0x8803('0xae')],'AttachmentId':_0x493c52[_0x8803('0x62')][_0x8803('0xaf')]});})['then'](function(_0x5a0975){_0x493c52[_0x8803('0x2b')]=_0x5a0975;if(_0x493c52[_0x8803('0xa6')][_0x8803('0xb0')]){return db[_0x8803('0xb1')]['find']({'attributes':['id',_0x8803('0x3c')],'where':{'id':_0x493c52['interaction'][_0x8803('0xb0')]}})[_0x8803('0x23')](function(_0x430bc0){if(_0x430bc0){_0x493c52[_0x8803('0x75')][_0x8803('0xb2')]({'id':0x0,'priority':0x0,'app':_0x8803('0xb3'),'appdata':_0x430bc0[_0x8803('0x3c')]+','+(_0x493c52[_0x8803('0x7a')][_0x8803('0xb4')]||0xa),'interval':_0x8803('0xac')});}return respondWithRpcPromise('Start',_0x8803('0xb5'),_0x493c52);});}return respondWithRpcPromise(_0x8803('0xb6'),'startRouting',_0x493c52);})[_0x8803('0x23')](function(_0x1f6362){if(_0x1f6362){var _0x3d3bf1=0xc8;var _0x188c66='receiveMessage';logger[_0x8803('0x24')](_0x8803('0x27'),_0x188c66,_0x3d3bf1,_0x8803('0xb7'));logger[_0x8803('0x26')](_0x8803('0xb8'),_0x188c66,_0x3d3bf1,_0x8803('0xb7'),JSON[_0x8803('0x28')](_0x1f6362));if(_0x493c52['account'][_0x8803('0x43')]===_0x8803('0x85')){return _0x581b0a[_0x8803('0x2f')](_0x3d3bf1)[_0x8803('0xb9')]('Content-Type',_0x8803('0xba'))[_0x8803('0x3d')](_0x8803('0xbb'));}else{return _0x581b0a[_0x8803('0x2f')](_0x3d3bf1)[_0x8803('0x30')](_0x1f6362);}}})['catch'](handleError(_0x581b0a,null));};exports[_0x8803('0xbc')]=function(_0x7828bc,_0x28ae42){var _0x5a5d01=_0x7828bc[_0x8803('0x63')]['id'];var _0x4865ce=_0x7828bc['body'];var _0x53a040=0xc8;var _0x47afe=null;return db[_0x8803('0xbd')]['transaction']({'isolationLevel':db[_0x8803('0xbd')]['Transaction']['ISOLATION_LEVELS'][_0x8803('0xbe')]},function(_0x2e11d8){return db[_0x8803('0x40')][_0x8803('0x70')]({'where':{'id':_0x5a5d01},'transaction':_0x2e11d8})[_0x8803('0x23')](function(_0x1b9269){if(_0x1b9269){return db['SmsApplication']['destroy']({'where':{'SmsAccountId':_0x5a5d01},'transaction':_0x2e11d8})['then'](function(){var _0x29c39f=_['map'](_0x4865ce,function(_0x581a6d){_0x581a6d[_0x8803('0x66')]=_0x5a5d01;return _0x581a6d;});return db[_0x8803('0xbf')]['bulkCreate'](_0x29c39f,{'transaction':_0x2e11d8});});}else{_0x53a040=0x194;_0x47afe=[];}});})[_0x8803('0x23')](function(){if(_0x53a040!==0x194){return db[_0x8803('0xbf')][_0x8803('0xc0')]({'where':{'SmsAccountId':_0x5a5d01},'order':'priority'})['then'](function(_0x4eea7d){_0x47afe=_0x4eea7d;});}})[_0x8803('0x2d')](function(_0x3f8833){_0x53a040=0x1f4;logger['error'](_0x3f8833[_0x8803('0x3b')]);if(_0x3f8833[_0x8803('0x3c')]){delete _0x3f8833[_0x8803('0x3c')];}_0x47afe=_0x3f8833;})[_0x8803('0xc1')](function(){if(_0x47afe===null){_0x28ae42[_0x8803('0xc2')](_0x53a040);}else{if(_0x53a040===0x1f4){_0x28ae42[_0x8803('0x2f')](_0x53a040)[_0x8803('0x3d')](_0x47afe);}else{_0x28ae42[_0x8803('0x2f')](_0x53a040)[_0x8803('0x30')](_0x47afe);}}});};exports[_0x8803('0xc3')]=function(_0x694683,_0x2f6c17,_0x2d96de){var _0x580b58={};var _0x51177f={};var _0x1da6be;var _0x4d7710;return db[_0x8803('0x40')][_0x8803('0x70')]({'where':{'id':_0x694683['params']['id']}})[_0x8803('0x23')](handleEntityNotFound(_0x2f6c17,null))[_0x8803('0x23')](function(_0x556ec4){if(_0x556ec4){_0x1da6be=_0x556ec4;_0x51177f[_0x8803('0x45')]=_[_0x8803('0x48')](db[_0x8803('0xbf')][_0x8803('0x41')]);_0x51177f[_0x8803('0x47')]=_[_0x8803('0x48')](_0x694683[_0x8803('0x47')]);_0x51177f[_0x8803('0x49')]=_[_0x8803('0x4a')](_0x51177f[_0x8803('0x45')],_0x51177f[_0x8803('0x47')]);_0x580b58[_0x8803('0x4b')]=_['intersection'](_0x51177f['model'],qs[_0x8803('0x4c')](_0x694683['query']['fields']));_0x580b58[_0x8803('0x4b')]=_0x580b58[_0x8803('0x4b')]['length']?_0x580b58[_0x8803('0x4b')]:_0x51177f[_0x8803('0x45')];_0x580b58[_0x8803('0x4e')]=qs['sort'](_0x694683[_0x8803('0x47')]['sort']);_0x580b58[_0x8803('0x50')]=qs['filters'](_[_0x8803('0x71')](_0x694683['query'],_0x51177f[_0x8803('0x49')]));if(_0x694683[_0x8803('0x47')][_0x8803('0x51')]){_0x580b58[_0x8803('0x50')]=_[_0x8803('0x53')](_0x580b58['where'],{'$or':_[_0x8803('0x46')](_0x580b58['attributes'],function(_0x36cab9){var _0x379810={};_0x379810[_0x36cab9]={'$like':'%'+_0x694683[_0x8803('0x47')][_0x8803('0x51')]+'%'};return _0x379810;})});}_0x580b58=_[_0x8803('0x53')]({},_0x580b58,_0x694683[_0x8803('0x54')]);return _0x1da6be[_0x8803('0xc3')](_0x580b58);}})[_0x8803('0x23')](function(_0x152273){if(_0x152273){_0x4d7710=_0x152273['length'];if(!_0x694683[_0x8803('0x47')][_0x8803('0x68')]('nolimit')){_0x580b58['limit']=qs[_0x8803('0x33')](_0x694683[_0x8803('0x47')][_0x8803('0x33')]);_0x580b58[_0x8803('0x31')]=qs['offset'](_0x694683[_0x8803('0x47')][_0x8803('0x31')]);}return _0x1da6be[_0x8803('0xc3')](_0x580b58);}})[_0x8803('0x23')](function(_0x51610f){if(_0x51610f){return _0x51610f?{'count':_0x4d7710,'rows':_0x51610f}:null;}})[_0x8803('0x23')](respondWithResult(_0x2f6c17,null))[_0x8803('0x2d')](handleError(_0x2f6c17,null));};exports[_0x8803('0xc4')]=function(_0x44cc15,_0x27c801,_0xd0802e){var _0x54454e={'raw':![],'where':{}};var _0x1b51f0={};var _0x5a6df1={'count':0x0,'rows':[]};return db['SmsAccount'][_0x8803('0x70')]({'where':{'id':_0x44cc15['params']['id']}})[_0x8803('0x23')](handleEntityNotFound(_0x27c801,null))[_0x8803('0x23')](function(_0x33e830){if(_0x33e830){_0x1b51f0[_0x8803('0x45')]=_[_0x8803('0x48')](db[_0x8803('0xa4')][_0x8803('0x41')]);_0x1b51f0['query']=_[_0x8803('0x48')](_0x44cc15['query']);_0x1b51f0['filters']=_['intersection'](_0x1b51f0[_0x8803('0x45')],_0x1b51f0['query']);_0x54454e[_0x8803('0x4b')]=_[_0x8803('0x4a')](_0x1b51f0[_0x8803('0x45')],qs[_0x8803('0x4c')](_0x44cc15[_0x8803('0x47')][_0x8803('0x4c')]));_0x54454e[_0x8803('0x4b')]=_0x54454e[_0x8803('0x4b')][_0x8803('0xa1')]?_0x54454e['attributes']:_0x1b51f0['model'];if(!_0x44cc15[_0x8803('0x47')][_0x8803('0x68')](_0x8803('0x4d'))){_0x54454e[_0x8803('0x33')]=qs['limit'](_0x44cc15['query'][_0x8803('0x33')]);_0x54454e[_0x8803('0x31')]=qs[_0x8803('0x31')](_0x44cc15[_0x8803('0x47')]['offset']);}_0x54454e[_0x8803('0x4e')]=qs['sort'](_0x44cc15[_0x8803('0x47')][_0x8803('0x4f')]);_0x54454e[_0x8803('0x50')]=qs['filters'](_[_0x8803('0x71')](_0x44cc15[_0x8803('0x47')],_0x1b51f0[_0x8803('0x49')]));_0x54454e[_0x8803('0x50')][_0x8803('0x66')]=_0x33e830['id'];if(_0x44cc15[_0x8803('0x47')]['filter']){_0x54454e[_0x8803('0x50')]=_[_0x8803('0x53')](_0x54454e[_0x8803('0x50')],{'$or':_[_0x8803('0x46')](_0x54454e[_0x8803('0x4b')],function(_0x48b474){var _0x41081c={};_0x41081c[_0x48b474]={'$like':'%'+_0x44cc15[_0x8803('0x47')][_0x8803('0x51')]+'%'};return _0x41081c;})});}_0x54454e=_[_0x8803('0x53')]({},_0x54454e,_0x44cc15[_0x8803('0x54')]);return db[_0x8803('0xa4')][_0x8803('0x34')]({'where':_0x54454e[_0x8803('0x50')]})[_0x8803('0x23')](function(_0x2e2575){_0x5a6df1[_0x8803('0x34')]=_0x2e2575;if(_0x44cc15[_0x8803('0x47')][_0x8803('0x58')]){_0x54454e[_0x8803('0x59')]=[{'model':db[_0x8803('0x7b')],'as':_0x8803('0xc5'),'required':![]},{'model':db[_0x8803('0xb1')],'as':'Owner','attributes':['name','fullname','internal'],'required':![]},{'model':db[_0x8803('0xc6')],'as':'Tags','attributes':['id',_0x8803('0x3c'),'color'],'where':_0x44cc15[_0x8803('0x47')][_0x8803('0xc7')]?{'id':_0x44cc15['query'][_0x8803('0xc7')]}:undefined,'required':_0x44cc15['query']['tag']?!![]:![]}];}return db[_0x8803('0xa4')]['findAll'](_0x54454e);})[_0x8803('0x23')](function(_0x23519d){_0x5a6df1[_0x8803('0x6a')]=_0x23519d;return _0x5a6df1;});}})[_0x8803('0x23')](respondWithFilteredResult(_0x27c801,_0x54454e))[_0x8803('0x2d')](handleError(_0x27c801,null));};exports[_0x8803('0x3d')]=function(_0x5535f8,_0x5a2eb9,_0x5aa58e){var _0x4be9da,_0x22f419,_0x1bd233;if(_[_0x8803('0x99')](_0x5535f8['body'][_0x8803('0x62')])||_0x5535f8[_0x8803('0x62')][_0x8803('0x62')]===''){throw new db[(_0x8803('0x7c'))][(_0x8803('0x7d'))]('body\x20is\x20mandatory\x20and\x20not\x20empty');}if(_[_0x8803('0x99')](_0x5535f8['body']['to'])){throw new db[(_0x8803('0x7c'))][(_0x8803('0x7d'))](_0x8803('0xc8'));}_0x4be9da=_0x5535f8[_0x8803('0x62')]['to'];return db['SmsAccount']['find']({'where':{'id':_0x5535f8[_0x8803('0x63')]['id']},'include':[{'model':db['CmList'],'as':'List','include':[{'model':db[_0x8803('0x7b')],'as':_0x8803('0x9f'),'where':{'mobile':_0x4be9da},'limit':0x1,'order':[[_0x8803('0x80'),_0x8803('0xc9')]]}]}]})[_0x8803('0x23')](handleEntityNotFound(_0x5a2eb9,null))['then'](function(_0x146e8a){if(_0x146e8a&&_0x146e8a[_0x8803('0xca')]){_0x22f419=_0x146e8a[_0x8803('0x37')]({'plain':!![]});if(_0x22f419[_0x8803('0xca')]&&_0x22f419[_0x8803('0xca')][_0x8803('0x9f')][_0x8803('0xa1')]){return _0x22f419[_0x8803('0xca')][_0x8803('0x9f')][0x0];}return db[_0x8803('0x7b')]['create'](_[_0x8803('0xa2')](_0x5535f8['body'],{'firstName':_0x4be9da,'mobile':_0x4be9da,'phone':_0x4be9da,'ListId':_0x22f419[_0x8803('0x83')]}));}})[_0x8803('0x23')](handleEntityNotFound(_0x5a2eb9,null))[_0x8803('0x23')](function(_0x40e7a7){if(_0x40e7a7){_0x1bd233=_0x40e7a7;return db[_0x8803('0xa4')][_0x8803('0x5f')]({'where':{'ContactId':_0x1bd233['id'],'closed':![],'SmsAccountId':_0x22f419['id']}})[_0x8803('0x23')](function(_0x234dbc){if(_0x234dbc){return[_0x234dbc,![]];}return db[_0x8803('0xa4')][_0x8803('0x5a')]({'UserId':_0x5535f8[_0x8803('0x5b')]['id'],'ContactId':_0x1bd233['id'],'SmsAccountId':_0x22f419['id'],'phone':_0x4be9da,'firstMsgDirection':_0x8803('0xcb'),'Messages':[_[_0x8803('0x53')](_0x5535f8['body'],{'read':![],'body':_0x5535f8[_0x8803('0x62')]['body'],'phone':_0x4be9da,'SmsAccountId':_0x22f419['id'],'UserId':_0x5535f8[_0x8803('0x5b')]['id'],'ContactId':_0x1bd233['id']})]},{'include':[{'model':db['SmsMessage'],'as':_0x8803('0xcc')}]})['then'](function(_0x228343){return[_0x228343,!![]];});});}})[_0x8803('0xa5')](function(_0x4220d1,_0x35186c){if(_0x35186c){return _0x4220d1;}return db[_0x8803('0xad')][_0x8803('0x5a')](_[_0x8803('0x53')](_0x5535f8['body'],{'read':![],'body':_0x5535f8[_0x8803('0x62')][_0x8803('0x62')],'phone':_0x4be9da,'SmsAccountId':_0x22f419['id'],'SmsInteractionId':_0x4220d1['id'],'UserId':_0x5535f8['user']['id'],'ContactId':_0x1bd233['id']}))[_0x8803('0x23')](function(_0x12986c){_0x4220d1[_0x8803('0xcd')][_0x8803('0xcc')]=[];_0x4220d1[_0x8803('0xcd')]['Messages'][_0x8803('0xa9')](_0x12986c[_0x8803('0xcd')]);return _0x4220d1;});})['then'](respondWithResult(_0x5a2eb9,null))[_0x8803('0x2d')](handleError(_0x5a2eb9,null));};exports[_0x8803('0x2f')]=function(_0x4242cc,_0x517d2d,_0x20eb4e){if(_0x4242cc[_0x8803('0x62')]['id']){delete _0x4242cc['body']['id'];}var _0x4602da,_0x1864d2,_0x5b127a;return db[_0x8803('0x40')][_0x8803('0x5f')]({'where':{'id':_0x4242cc[_0x8803('0x63')]['id']}})[_0x8803('0x23')](handleEntityNotFound(_0x517d2d,null))[_0x8803('0x23')](function(_0x2b8aef){if(_0x2b8aef){_0x5b127a=_0x2b8aef;logger[_0x8803('0x26')](_0x8803('0x27'),_0x8803('0x2f'),_0x8803('0xce'),_0x2b8aef[_0x8803('0x43')],util['inspect'](_0x4242cc[_0x8803('0x62')],{'showHidden':![],'depth':null}));switch(_0x2b8aef[_0x8803('0x43')]){case'skebby':if(_0x4242cc['body'][_0x8803('0xcf')]&&_0x4242cc[_0x8803('0x62')][_0x8803('0x2f')]){_0x1864d2=_0x4242cc['body'][_0x8803('0x2f')];return db['SmsMessage'][_0x8803('0x5f')]({'where':{'messageId':_0x4242cc[_0x8803('0x62')][_0x8803('0xcf')]}});}break;case _0x8803('0x88'):if(_0x4242cc[_0x8803('0x62')][_0x8803('0xd0')]&&_0x4242cc[_0x8803('0x62')][_0x8803('0xd1')]){_0x1864d2=_0x4242cc[_0x8803('0x62')][_0x8803('0xd1')];return db[_0x8803('0xad')]['find']({'where':{'messageId':_0x4242cc[_0x8803('0x62')]['requestid']}});}break;case'clicksend':if(_0x4242cc[_0x8803('0x62')][_0x8803('0x8a')]&&_0x4242cc['body'][_0x8803('0xd2')]){_0x1864d2=_0x4242cc[_0x8803('0x62')][_0x8803('0xd2')];return db[_0x8803('0xad')][_0x8803('0x5f')]({'where':{'messageId':_0x4242cc[_0x8803('0x62')][_0x8803('0x8a')]}});}break;case _0x8803('0x8e'):var _0x19836c=_0x4242cc[_0x8803('0x62')]['results'][0x0];if(_0x19836c[_0x8803('0x87')]&&_0x19836c[_0x8803('0x2f')][_0x8803('0xd3')]==='DELIVERED'){_0x1864d2=_0x19836c[_0x8803('0x2f')][_0x8803('0xd3')];return db[_0x8803('0xad')]['find']({'where':{'messageId':_0x19836c[_0x8803('0x87')]}});}break;case _0x8803('0x93'):if(_0x4242cc[_0x8803('0x62')][_0x8803('0x87')]&&_0x4242cc[_0x8803('0x62')]['status']){_0x1864d2=_0x4242cc[_0x8803('0x62')][_0x8803('0x2f')];return db['SmsMessage'][_0x8803('0x5f')]({'where':{'messageId':_0x4242cc[_0x8803('0x62')][_0x8803('0x87')]}});}break;case _0x8803('0x96'):if(_0x4242cc[_0x8803('0x62')][0x0]['message']['id']){_0x1864d2=_0x4242cc[_0x8803('0x62')][0x0][_0x8803('0x43')];return db[_0x8803('0xad')][_0x8803('0x5f')]({'where':{'messageId':_0x4242cc[_0x8803('0x62')][0x0][_0x8803('0x2b')]['id']}});}break;case _0x8803('0x97'):if(_0x4242cc['body'][_0x8803('0xd4')]&&_0x4242cc[_0x8803('0x62')]['status']){_0x1864d2=_0x4242cc[_0x8803('0x62')][_0x8803('0x2f')];return db[_0x8803('0xad')]['find']({'where':{'messageId':_0x4242cc[_0x8803('0x62')][_0x8803('0xd4')]}});}break;}}})[_0x8803('0x23')](handleEntityNotFound(_0x517d2d,null))[_0x8803('0x23')](function(_0x3eb7a6){if(_0x3eb7a6){_0x4602da=_0x3eb7a6;switch(_0x5b127a[_0x8803('0x43')]){case _0x8803('0xd5'):if(_0x1864d2===_0x8803('0xd6')){return _0x4602da[_0x8803('0x36')]({'read':!![]});}else{logger[_0x8803('0x29')](_0x8803('0x27'),_0x8803('0x2f'),_0x8803('0xd5'),util['inspect'](_0x4242cc[_0x8803('0x62')],{'showHidden':![],'depth':null}));}break;case'connectel':if(_0x1864d2==='1'){return _0x4602da[_0x8803('0x36')]({'read':!![]});}else{logger[_0x8803('0x29')]('SmsAccount,\x20%s,\x20%s,\x20%s',_0x8803('0x2f'),_0x8803('0xd5'),util[_0x8803('0xd7')](_0x4242cc[_0x8803('0x62')],{'showHidden':![],'depth':null}));}break;case'clicksend':if(!_0x4242cc[_0x8803('0x62')][_0x8803('0xd8')]&&_0x1864d2>=0xc8&&_0x1864d2<=0xce){return _0x4602da['update']({'read':!![]});}else{logger[_0x8803('0x29')](_0x8803('0x27'),'status','clicksend',util['inspect'](_0x4242cc[_0x8803('0x62')],{'showHidden':![],'depth':null}));}break;case _0x8803('0x8e'):var _0x16978f=_0x4242cc[_0x8803('0x62')]['results'][0x0];if(_0x16978f[_0x8803('0x2f')][_0x8803('0xd3')]===_0x8803('0xd6')){return _0x4602da['update']({'read':!![]});}else{logger['error']('SmsAccount,\x20%s,\x20%s,\x20%s',_0x8803('0x2f'),_0x8803('0x8e'),util[_0x8803('0xd7')](_0x4242cc[_0x8803('0x62')],{'showHidden':![],'depth':null}));}break;case _0x8803('0x93'):if(_0x1864d2==_0x8803('0xd9')||_0x1864d2==_0x8803('0xda')){return _0x4602da[_0x8803('0x36')]({'read':!![]});}else{logger[_0x8803('0x29')](_0x8803('0x27'),_0x8803('0x2f'),_0x8803('0x93'),util[_0x8803('0xd7')](_0x4242cc[_0x8803('0x62')],{'showHidden':![],'depth':null}));}break;case _0x8803('0x96'):if(_0x1864d2=='message-delivered'){return _0x4602da[_0x8803('0x36')]({'read':!![]});}else{logger['error'](_0x8803('0x27'),_0x8803('0x2f'),_0x8803('0x96'),util[_0x8803('0xd7')](_0x4242cc['body'],{'showHidden':![],'depth':null}));}break;case _0x8803('0x97'):if(_0x1864d2===_0x8803('0xdb')||_0x1864d2===_0x8803('0xdc')){return _0x4602da[_0x8803('0x36')]({'read':!![]});}else{logger[_0x8803('0x29')](_0x8803('0x27'),_0x8803('0x2f'),_0x8803('0x97'),util[_0x8803('0xd7')](_0x4242cc[_0x8803('0x62')],{'showHidden':![],'depth':null}));}break;}return _0x4602da;}})['then'](respondWithResult(_0x517d2d,null))['catch'](handleError(_0x517d2d,null));};exports[_0x8803('0xdd')]=function(_0x3758f9,_0x4b32aa,_0x52c543){var _0x576c73,_0x4950e0,_0x4c1d3a;return db[_0x8803('0x40')][_0x8803('0x5f')]({'where':{'id':_0x3758f9[_0x8803('0x63')]['id']}})[_0x8803('0x23')](handleEntityNotFound(_0x4b32aa,null))[_0x8803('0x23')](function(_0x30670f){if(_0x30670f){_0x4c1d3a=_0x30670f;logger['debug'](_0x8803('0x27'),_0x8803('0x2f'),_0x8803('0xce'),_0x30670f[_0x8803('0x43')],util['inspect'](_0x3758f9[_0x8803('0x47')],{'showHidden':![],'depth':null}));switch(_0x30670f[_0x8803('0x43')]){case _0x8803('0x90'):if(_0x3758f9[_0x8803('0x47')][_0x8803('0xde')]&&_0x3758f9[_0x8803('0x47')][_0x8803('0xdf')]){_0x4950e0=_0x3758f9[_0x8803('0x47')][_0x8803('0xdf')];return db[_0x8803('0xad')][_0x8803('0x5f')]({'where':{'messageId':_0x3758f9[_0x8803('0x47')]['message-id']}});}break;}}})[_0x8803('0x23')](handleEntityNotFound(_0x4b32aa,null))[_0x8803('0x23')](function(_0x49fd98){if(_0x49fd98){_0x576c73=_0x49fd98;switch(_0x4c1d3a['type']){case _0x8803('0x90'):if(_0x4950e0==='2'||_0x4950e0==='6'){return _0x576c73[_0x8803('0x36')]({'read':!![]});}else{logger[_0x8803('0x29')](_0x8803('0x27'),'status',_0x8803('0x90'),util[_0x8803('0xd7')](_0x3758f9[_0x8803('0x47')],{'showHidden':![],'depth':null}));};break;}return _0x576c73;}})['then'](respondWithResult(_0x4b32aa,null))[_0x8803('0x2d')](handleError(_0x4b32aa,null));};exports[_0x8803('0xe0')]=function(_0x1bee2d,_0x260ab0,_0x45ecd3){return db[_0x8803('0x40')][_0x8803('0x5f')]({'where':{'id':_0x1bee2d[_0x8803('0x63')]['id']}})[_0x8803('0x23')](handleEntityNotFound(_0x260ab0,null))['then'](function(_0x57aeff){if(_0x57aeff){return _0x57aeff[_0x8803('0xe0')](_0x1bee2d['body'][_0x8803('0x6c')],_[_0x8803('0xa0')](_0x1bee2d[_0x8803('0x62')],['ids','id'])||{})['spread'](function(_0x374dec){for(var _0x15a851=0x0;_0x15a851<_0x1bee2d[_0x8803('0x62')]['ids']['length'];_0x15a851+=0x1){socket[_0x8803('0xe1')](_0x8803('0xe2'),{'UserId':Number(_0x1bee2d[_0x8803('0x62')][_0x8803('0x6c')][_0x15a851]),'SmsAccountId':Number(_0x1bee2d['params']['id'])});}return _0x374dec;});}})[_0x8803('0x23')](respondWithResult(_0x260ab0,null))[_0x8803('0x2d')](handleError(_0x260ab0,null));};exports['removeAgents']=function(_0x587928,_0x59a786,_0x2c11a8){return db['SmsAccount'][_0x8803('0x5f')]({'where':{'id':_0x587928[_0x8803('0x63')]['id']}})[_0x8803('0x23')](handleEntityNotFound(_0x59a786,null))['then'](function(_0x2f813c){if(_0x2f813c){return _0x2f813c[_0x8803('0xe3')](_0x587928['query'][_0x8803('0x6c')])[_0x8803('0x23')](function(){if(_[_0x8803('0xe4')](_0x587928[_0x8803('0x47')]['ids'])){for(var _0xd4cdd7=0x0;_0xd4cdd7<_0x587928['query']['ids'][_0x8803('0xa1')];_0xd4cdd7+=0x1){socket[_0x8803('0xe1')](_0x8803('0xe5'),{'UserId':Number(_0x587928[_0x8803('0x47')][_0x8803('0x6c')][_0xd4cdd7]),'SmsAccountId':Number(_0x587928[_0x8803('0x63')]['id'])});}}else{socket[_0x8803('0xe1')]('userSmsAccount:remove',{'UserId':Number(_0x587928[_0x8803('0x47')]['ids']),'SmsAccountId':Number(_0x587928[_0x8803('0x63')]['id'])});}});}})[_0x8803('0x23')](respondWithStatusCode(_0x59a786,null))[_0x8803('0x2d')](handleError(_0x59a786,null));};exports[_0x8803('0xe6')]=function(_0x648d14,_0x2e413b,_0x4942e3){var _0x574365={};var _0x50f95e={};var _0x50c1ed;var _0x54b634;return db[_0x8803('0x40')][_0x8803('0x70')]({'where':{'id':_0x648d14['params']['id']}})['then'](handleEntityNotFound(_0x2e413b,null))['then'](function(_0x46b3cb){if(_0x46b3cb){_0x50c1ed=_0x46b3cb;_0x50f95e[_0x8803('0x45')]=_[_0x8803('0x48')](db[_0x8803('0xb1')][_0x8803('0x41')]);_0x50f95e[_0x8803('0x47')]=_[_0x8803('0x48')](_0x648d14[_0x8803('0x47')]);_0x50f95e[_0x8803('0x49')]=_[_0x8803('0x4a')](_0x50f95e['model'],_0x50f95e[_0x8803('0x47')]);_0x574365['attributes']=_[_0x8803('0x4a')](_0x50f95e[_0x8803('0x45')],qs[_0x8803('0x4c')](_0x648d14['query']['fields']));_0x574365[_0x8803('0x4b')]=_0x574365[_0x8803('0x4b')]['length']?_0x574365[_0x8803('0x4b')]:_0x50f95e[_0x8803('0x45')];_0x574365['order']=qs[_0x8803('0x4f')](_0x648d14[_0x8803('0x47')][_0x8803('0x4f')]);_0x574365[_0x8803('0x50')]=qs[_0x8803('0x49')](_[_0x8803('0x71')](_0x648d14[_0x8803('0x47')],_0x50f95e[_0x8803('0x49')]));if(_0x648d14[_0x8803('0x47')][_0x8803('0x51')]){_0x574365[_0x8803('0x50')]=_[_0x8803('0x53')](_0x574365[_0x8803('0x50')],{'$or':_['map'](_0x574365[_0x8803('0x4b')],function(_0x36e15f){var _0x252b44={};_0x252b44[_0x36e15f]={'$like':'%'+_0x648d14[_0x8803('0x47')]['filter']+'%'};return _0x252b44;})});}_0x574365=_[_0x8803('0x53')]({},_0x574365,_0x648d14['options']);return _0x50c1ed['getAgents'](_0x574365);}})['then'](function(_0x26c312){if(_0x26c312){_0x54b634=_0x26c312[_0x8803('0xa1')];if(!_0x648d14[_0x8803('0x47')][_0x8803('0x68')](_0x8803('0x4d'))){_0x574365[_0x8803('0x33')]=qs[_0x8803('0x33')](_0x648d14[_0x8803('0x47')][_0x8803('0x33')]);_0x574365[_0x8803('0x31')]=qs[_0x8803('0x31')](_0x648d14[_0x8803('0x47')][_0x8803('0x31')]);}return _0x50c1ed[_0x8803('0xe6')](_0x574365);}})['then'](function(_0x2e2d97){if(_0x2e2d97){return _0x2e2d97?{'count':_0x54b634,'rows':_0x2e2d97}:null;}})[_0x8803('0x23')](respondWithResult(_0x2e413b,null))[_0x8803('0x2d')](handleError(_0x2e413b,null));}; \ No newline at end of file +var _0xcb8f=['filters','pick','filter','where','merge','map','VIRTUAL','options','SmsAccount','includeAll','include','params','length','create','body','user','Unable\x20to\x20retrieve\x20the\x20current\x20user','UserProfileSection','find','autoAssociation','UserProfileResource','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','update','mandatoryDispositionPause','describe','SmsAccountId','Disposition','getDispositions','rows','removeDispositions','ids','addAnswer','CannedAnswer','getAnswers','order','findAll','sms','SmsApplication','account','applications','orderBy','Applications','Sequelize','ValidationError','no\x20available\x20attributes','difference','createdAt','updatedAt','ListId','mobile','type','from','From','Body','messageId','MessageSid','skebby','sender','connectel','clicksend','message_id','Text','MessageUUID','infobip','results','text','originatingAddress','segmentedMessage','clickatell','fromNumber','replyMessageId','intelepeer','refid','isNil','body\x20is\x20mandatory\x20and\x20not\x20empty','mapKey','includes','mapKey\x20invalid,\x20please\x20use\x20one\x20of\x20these:\x20','CmList','CmContact','Contacts','list','contact','SmsInteraction','spread','interaction','created','autoclose','push','close','unmanaged','*,*,*,*','SmsMessage','ContactId','AttachmentId','UserId','User','waitForTheAssignedAgent','startRouting','Start','receiveMessage','entity\x20found','SmsAccount,\x20%s,\x20%s,\x20%s,\x20%s','Content-Type','text/xml','send','addApplications','transaction','sequelize','Transaction','ISOLATION_LEVELS','READ_COMMITTED','bulkCreate','findAndCountAll','priority','finally','getApplications','nolimit','findOne','Owner','internal','color','tag','to\x20is\x20mandatory','List','DESC','out','Messages','dataValues','inspect','skebby_dispatch_id','requestid','statusInt','groupName','DELIVERED','redif','DELIVERED_TO_GATEWAY','RECEIVED_BY_RECIPIENT','bandwidth','message-delivered','DELIVRD','message-id','csc','addAgents','omit','emit','userSmsAccount:save','removeAgents','isArray','userSmsAccount:remove','getAgents','eml-format','rimraf','fast-json-patch','moment','bluebird','mustache','util','path','ejs','fs-extra','lodash','jsforce','desk.js','papaparse','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','../../config/environment','../../mysqldb','redis','defaults','localhost','socket.io-emitter','./smsAccount.socket','jayson/promise','client','http','then','request\x20sent','debug','SmsAccount,\x20%s,\x20%s,\x20%s','stringify','error','code','SmsAccount,\x20%s,\x20%s','message','catch','end','status','json','offset','limit','undefined','count','set','save','destroy','get','SmsAccounts','stack','name','index','Pause','rawAttributes','fieldName','key','model','query','keys','intersection','attributes','fields','hasOwnProperty','sort'];(function(_0x563324,_0x6be59){var _0x492dfe=function(_0x54d037){while(--_0x54d037){_0x563324['push'](_0x563324['shift']());}};_0x492dfe(++_0x6be59);}(_0xcb8f,0x170));var _0xfcb8=function(_0x409981,_0x180e94){_0x409981=_0x409981-0x0;var _0x1533e6=_0xcb8f[_0x409981];return _0x1533e6;};'use strict';var emlformat=require(_0xfcb8('0x0'));var rimraf=require(_0xfcb8('0x1'));var zipdir=require('zip-dir');var jsonpatch=require(_0xfcb8('0x2'));var rp=require('request-promise');var moment=require(_0xfcb8('0x3'));var BPromise=require(_0xfcb8('0x4'));var Mustache=require(_0xfcb8('0x5'));var util=require(_0xfcb8('0x6'));var path=require(_0xfcb8('0x7'));var sox=require('sox');var csv=require('to-csv');var ejs=require(_0xfcb8('0x8'));var fs=require('fs');var fs_extra=require(_0xfcb8('0x9'));var _=require(_0xfcb8('0xa'));var squel=require('squel');var crypto=require('crypto');var jsforce=require(_0xfcb8('0xb'));var deskjs=require(_0xfcb8('0xc'));var toCsv=require('to-csv');var querystring=require('querystring');var Papa=require(_0xfcb8('0xd'));var Redis=require('ioredis');var authService=require(_0xfcb8('0xe'));var qs=require(_0xfcb8('0xf'));var as=require(_0xfcb8('0x10'));var hardwareService=require(_0xfcb8('0x11'));var logger=require(_0xfcb8('0x12'))('api');var utils=require('../../config/utils');var config=require(_0xfcb8('0x13'));var licenseUtil=require('../../config/license/util');var db=require(_0xfcb8('0x14'))['db'];config[_0xfcb8('0x15')]=_[_0xfcb8('0x16')](config['redis'],{'host':_0xfcb8('0x17'),'port':0x18eb});var socket=require(_0xfcb8('0x18'))(new Redis(config[_0xfcb8('0x15')]));require(_0xfcb8('0x19'))['register'](socket);var jayson=require(_0xfcb8('0x1a'));var client=jayson[_0xfcb8('0x1b')][_0xfcb8('0x1c')]({'port':0x232c});function respondWithRpcPromise(_0x571049,_0x3060be,_0x3e8299,_0x4fbce7){return new BPromise(function(_0x40c3cd,_0x52c3fe){var _0x4ac2f5=_0x4fbce7||client;return _0x4ac2f5['request'](_0x571049,_0x3e8299)[_0xfcb8('0x1d')](function(_0x4efe18){logger['info']('SmsAccount,\x20%s,\x20%s',_0x3060be,_0xfcb8('0x1e'));logger[_0xfcb8('0x1f')](_0xfcb8('0x20'),_0x3060be,'request\x20sent',JSON[_0xfcb8('0x21')](_0x4efe18));if(_0x4efe18['error']){if(_0x4efe18[_0xfcb8('0x22')][_0xfcb8('0x23')]===0x1f4){logger['error'](_0xfcb8('0x24'),_0x3060be,_0x4efe18['error'][_0xfcb8('0x25')]);return _0x52c3fe(_0x4efe18[_0xfcb8('0x22')]['message']);}logger[_0xfcb8('0x22')](_0xfcb8('0x24'),_0x3060be,_0x4efe18[_0xfcb8('0x22')][_0xfcb8('0x25')]);return _0x40c3cd(_0x4efe18[_0xfcb8('0x22')][_0xfcb8('0x25')]);}else{logger['info'](_0xfcb8('0x24'),_0x3060be,_0xfcb8('0x1e'));_0x40c3cd(_0x4efe18['result'][_0xfcb8('0x25')]);}})[_0xfcb8('0x26')](function(_0x1e9b96){logger[_0xfcb8('0x22')](_0xfcb8('0x24'),_0x3060be,_0x1e9b96);_0x52c3fe(_0x1e9b96);});});}function respondWithStatusCode(_0x531867,_0x4b41c2){_0x4b41c2=_0x4b41c2||0xcc;return function(_0x425e31){if(_0x425e31){return _0x531867['sendStatus'](_0x4b41c2);}return _0x531867['status'](_0x4b41c2)[_0xfcb8('0x27')]();};}function respondWithResult(_0x425e50,_0x3a357f){_0x3a357f=_0x3a357f||0xc8;return function(_0x1d4bd9){if(_0x1d4bd9){return _0x425e50[_0xfcb8('0x28')](_0x3a357f)[_0xfcb8('0x29')](_0x1d4bd9);}};}function respondWithFilteredResult(_0xc094fb,_0x331802){return function(_0x1a65b2){if(_0x1a65b2){var _0x58a7e2=typeof _0x331802[_0xfcb8('0x2a')]==='undefined'&&typeof _0x331802[_0xfcb8('0x2b')]===_0xfcb8('0x2c');var _0x411ab7=_0x1a65b2['count'];var _0x4cc3c9=_0x58a7e2?0x0:_0x331802[_0xfcb8('0x2a')];var _0xf745d4=_0x58a7e2?_0x1a65b2[_0xfcb8('0x2d')]:_0x331802['offset']+_0x331802[_0xfcb8('0x2b')];var _0xe0b7eb;if(_0xf745d4>=_0x411ab7){_0xf745d4=_0x411ab7;_0xe0b7eb=0xc8;}else{_0xe0b7eb=0xce;}_0xc094fb[_0xfcb8('0x28')](_0xe0b7eb);return _0xc094fb[_0xfcb8('0x2e')]('Content-Range',_0x4cc3c9+'-'+_0xf745d4+'/'+_0x411ab7)[_0xfcb8('0x29')](_0x1a65b2);}return null;};}function patchUpdates(_0x16e67c){return function(_0x34f5b8){try{jsonpatch['apply'](_0x34f5b8,_0x16e67c,!![]);}catch(_0x30c457){return BPromise['reject'](_0x30c457);}return _0x34f5b8[_0xfcb8('0x2f')]();};}function saveUpdates(_0x2d1c9f,_0x4e3c63){return function(_0x2d0372){if(_0x2d0372){return _0x2d0372['update'](_0x2d1c9f)[_0xfcb8('0x1d')](function(_0x5cf1d4){return _0x5cf1d4;});}return null;};}function removeEntity(_0x32dbe8,_0x1b644e){return function(_0x28a29e){if(_0x28a29e){return _0x28a29e[_0xfcb8('0x30')]()[_0xfcb8('0x1d')](function(){var _0x4e81f3=_0x28a29e[_0xfcb8('0x31')]({'plain':!![]});var _0x5edd07=_0xfcb8('0x32');return db['UserProfileResource'][_0xfcb8('0x30')]({'where':{'type':_0x5edd07,'resourceId':_0x4e81f3['id']}})[_0xfcb8('0x1d')](function(){return _0x28a29e;});})['then'](function(){_0x32dbe8[_0xfcb8('0x28')](0xcc)['end']();});}};}function handleEntityNotFound(_0x3a7ea1,_0x2dc9d1){return function(_0x4ae949){if(!_0x4ae949){_0x3a7ea1['sendStatus'](0x194);}return _0x4ae949;};}function handleError(_0x5d56a0,_0x2763d8){_0x2763d8=_0x2763d8||0x1f4;return function(_0x9368ed){logger[_0xfcb8('0x22')](_0x9368ed[_0xfcb8('0x33')]);if(_0x9368ed[_0xfcb8('0x34')]){delete _0x9368ed[_0xfcb8('0x34')];}_0x5d56a0['status'](_0x2763d8)['send'](_0x9368ed);};}exports[_0xfcb8('0x35')]=function(_0x464a02,_0x68a7c9){var _0x2f730e={'include':[{'model':db[_0xfcb8('0x36')],'as':'mandatoryDispositionPause'}]},_0x4ca59d={},_0x2842e2={'count':0x0,'rows':[]};var _0x227190=_['map'](db['SmsAccount'][_0xfcb8('0x37')],function(_0xb75c6c){return{'name':_0xb75c6c[_0xfcb8('0x38')],'type':_0xb75c6c['type'][_0xfcb8('0x39')]};});_0x4ca59d[_0xfcb8('0x3a')]=_['map'](_0x227190,_0xfcb8('0x34'));_0x4ca59d[_0xfcb8('0x3b')]=_[_0xfcb8('0x3c')](_0x464a02[_0xfcb8('0x3b')]);_0x4ca59d['filters']=_[_0xfcb8('0x3d')](_0x4ca59d[_0xfcb8('0x3a')],_0x4ca59d['query']);_0x2f730e[_0xfcb8('0x3e')]=_[_0xfcb8('0x3d')](_0x4ca59d[_0xfcb8('0x3a')],qs['fields'](_0x464a02[_0xfcb8('0x3b')][_0xfcb8('0x3f')]));_0x2f730e[_0xfcb8('0x3e')]=_0x2f730e[_0xfcb8('0x3e')]['length']?_0x2f730e[_0xfcb8('0x3e')]:_0x4ca59d[_0xfcb8('0x3a')];if(!_0x464a02[_0xfcb8('0x3b')][_0xfcb8('0x40')]('nolimit')){_0x2f730e[_0xfcb8('0x2b')]=qs[_0xfcb8('0x2b')](_0x464a02['query'][_0xfcb8('0x2b')]);_0x2f730e[_0xfcb8('0x2a')]=qs[_0xfcb8('0x2a')](_0x464a02[_0xfcb8('0x3b')][_0xfcb8('0x2a')]);}_0x2f730e['order']=qs[_0xfcb8('0x41')](_0x464a02[_0xfcb8('0x3b')][_0xfcb8('0x41')]);_0x2f730e['where']=qs[_0xfcb8('0x42')](_[_0xfcb8('0x43')](_0x464a02['query'],_0x4ca59d['filters']),_0x227190);if(_0x464a02['query'][_0xfcb8('0x44')]){_0x2f730e[_0xfcb8('0x45')]=_[_0xfcb8('0x46')](_0x2f730e[_0xfcb8('0x45')],{'$or':_[_0xfcb8('0x47')](_0x227190,function(_0x2ef78e){if(_0x2ef78e['type']!==_0xfcb8('0x48')){var _0x1de753={};_0x1de753[_0x2ef78e[_0xfcb8('0x34')]]={'$like':'%'+_0x464a02[_0xfcb8('0x3b')]['filter']+'%'};return _0x1de753;}})});}_0x2f730e=_['merge']({},_0x2f730e,_0x464a02[_0xfcb8('0x49')]);var _0x3d4233={'where':_0x2f730e[_0xfcb8('0x45')]};return db[_0xfcb8('0x4a')][_0xfcb8('0x2d')](_0x3d4233)[_0xfcb8('0x1d')](function(_0x38fb0b){_0x2842e2[_0xfcb8('0x2d')]=_0x38fb0b;if(_0x464a02['query'][_0xfcb8('0x4b')]){_0x2f730e[_0xfcb8('0x4c')]=[{'all':!![]}];}return db['SmsAccount']['findAll'](_0x2f730e);})['then'](function(_0x15d09f){_0x2842e2['rows']=_0x15d09f;return _0x2842e2;})[_0xfcb8('0x1d')](respondWithFilteredResult(_0x68a7c9,_0x2f730e))[_0xfcb8('0x26')](handleError(_0x68a7c9,null));};exports['show']=function(_0x3afd75,_0x4f6654){var _0x52d874={'raw':![],'where':{'id':_0x3afd75[_0xfcb8('0x4d')]['id']},'include':[{'model':db[_0xfcb8('0x36')],'as':'mandatoryDispositionPause'}]},_0x28b102={};_0x28b102[_0xfcb8('0x3a')]=_['keys'](db[_0xfcb8('0x4a')][_0xfcb8('0x37')]);_0x28b102[_0xfcb8('0x3b')]=_[_0xfcb8('0x3c')](_0x3afd75['query']);_0x28b102['filters']=_['intersection'](_0x28b102[_0xfcb8('0x3a')],_0x28b102[_0xfcb8('0x3b')]);_0x52d874['attributes']=_['intersection'](_0x28b102[_0xfcb8('0x3a')],qs[_0xfcb8('0x3f')](_0x3afd75['query'][_0xfcb8('0x3f')]));_0x52d874[_0xfcb8('0x3e')]=_0x52d874[_0xfcb8('0x3e')][_0xfcb8('0x4e')]?_0x52d874[_0xfcb8('0x3e')]:_0x28b102[_0xfcb8('0x3a')];if(_0x3afd75[_0xfcb8('0x3b')]['includeAll']){_0x52d874[_0xfcb8('0x4c')]=[{'all':!![]}];}_0x52d874=_[_0xfcb8('0x46')]({},_0x52d874,_0x3afd75['options']);return db[_0xfcb8('0x4a')]['find'](_0x52d874)['then'](handleEntityNotFound(_0x4f6654,null))['then'](respondWithResult(_0x4f6654,null))[_0xfcb8('0x26')](handleError(_0x4f6654,null));};exports[_0xfcb8('0x4f')]=function(_0x386f19,_0x4212f1){return db[_0xfcb8('0x4a')][_0xfcb8('0x4f')](_0x386f19[_0xfcb8('0x50')],{})[_0xfcb8('0x1d')](function(_0x3847f7){var _0x40f3bc=_0x386f19[_0xfcb8('0x51')][_0xfcb8('0x31')]({'plain':!![]});if(!_0x40f3bc)throw new Error(_0xfcb8('0x52'));if(_0x40f3bc['role']===_0xfcb8('0x51')){var _0x33b596=_0x3847f7[_0xfcb8('0x31')]({'plain':!![]});var _0x157b6d=_0xfcb8('0x32');return db[_0xfcb8('0x53')][_0xfcb8('0x54')]({'where':{'name':_0x157b6d,'userProfileId':_0x40f3bc['userProfileId']},'raw':!![]})[_0xfcb8('0x1d')](function(_0x2f27ac){if(_0x2f27ac&&_0x2f27ac[_0xfcb8('0x55')]===0x0){return db[_0xfcb8('0x56')][_0xfcb8('0x4f')]({'name':_0x33b596[_0xfcb8('0x34')],'resourceId':_0x33b596['id'],'type':_0x2f27ac['name'],'sectionId':_0x2f27ac['id']},{})[_0xfcb8('0x1d')](function(){return _0x3847f7;});}else{return _0x3847f7;}})[_0xfcb8('0x26')](function(_0x11a49e){logger['error'](_0xfcb8('0x57'),_0x11a49e);throw _0x11a49e;});}return _0x3847f7;})[_0xfcb8('0x1d')](respondWithResult(_0x4212f1,0xc9))[_0xfcb8('0x26')](handleError(_0x4212f1,null));};exports[_0xfcb8('0x58')]=function(_0x5eb43a,_0x30a93e){if(_0x5eb43a[_0xfcb8('0x50')]['id']){delete _0x5eb43a[_0xfcb8('0x50')]['id'];}return db[_0xfcb8('0x4a')][_0xfcb8('0x54')]({'where':{'id':_0x5eb43a[_0xfcb8('0x4d')]['id']},'include':[{'model':db['Pause'],'as':_0xfcb8('0x59')}]})[_0xfcb8('0x1d')](handleEntityNotFound(_0x30a93e,null))[_0xfcb8('0x1d')](saveUpdates(_0x5eb43a[_0xfcb8('0x50')],null))[_0xfcb8('0x1d')](respondWithResult(_0x30a93e,null))[_0xfcb8('0x26')](handleError(_0x30a93e,null));};exports[_0xfcb8('0x30')]=function(_0xd77b01,_0x2f7e62){return db[_0xfcb8('0x4a')][_0xfcb8('0x54')]({'where':{'id':_0xd77b01[_0xfcb8('0x4d')]['id']}})['then'](handleEntityNotFound(_0x2f7e62,null))[_0xfcb8('0x1d')](removeEntity(_0x2f7e62,null))['catch'](handleError(_0x2f7e62,null));};exports['describe']=function(_0x2e6caf,_0x16730e){return db[_0xfcb8('0x4a')][_0xfcb8('0x5a')]()[_0xfcb8('0x1d')](respondWithResult(_0x16730e,null))['catch'](handleError(_0x16730e,null));};exports['addDisposition']=function(_0x5167ad,_0x2cfa60,_0x23c71f){if(_0x5167ad[_0xfcb8('0x50')]['id']){delete _0x5167ad['body']['id'];}return db['SmsAccount']['find']({'where':{'id':_0x5167ad[_0xfcb8('0x4d')]['id']}})[_0xfcb8('0x1d')](handleEntityNotFound(_0x2cfa60,null))[_0xfcb8('0x1d')](function(_0x356a23){if(_0x356a23){_0x5167ad[_0xfcb8('0x50')][_0xfcb8('0x5b')]=_0x356a23['id'];return db[_0xfcb8('0x5c')][_0xfcb8('0x4f')](_0x5167ad[_0xfcb8('0x50')]);}})['then'](respondWithResult(_0x2cfa60,null))[_0xfcb8('0x26')](handleError(_0x2cfa60,null));};exports[_0xfcb8('0x5d')]=function(_0x176673,_0x47ee3c,_0x5ce363){var _0x12ecf3={'raw':![],'where':{}};var _0x40184a={};var _0x119b10={'count':0x0,'rows':[]};return db[_0xfcb8('0x4a')]['findOne']({'where':{'id':_0x176673[_0xfcb8('0x4d')]['id']}})['then'](handleEntityNotFound(_0x47ee3c,null))[_0xfcb8('0x1d')](function(_0x5a315b){if(_0x5a315b){_0x40184a[_0xfcb8('0x3a')]=_['keys'](db[_0xfcb8('0x5c')]['rawAttributes']);_0x40184a[_0xfcb8('0x3b')]=_[_0xfcb8('0x3c')](_0x176673[_0xfcb8('0x3b')]);_0x40184a['filters']=_['intersection'](_0x40184a[_0xfcb8('0x3a')],_0x40184a['query']);_0x12ecf3[_0xfcb8('0x3e')]=_[_0xfcb8('0x3d')](_0x40184a['model'],qs['fields'](_0x176673[_0xfcb8('0x3b')][_0xfcb8('0x3f')]));_0x12ecf3['attributes']=_0x12ecf3[_0xfcb8('0x3e')][_0xfcb8('0x4e')]?_0x12ecf3['attributes']:_0x40184a[_0xfcb8('0x3a')];if(!_0x176673[_0xfcb8('0x3b')][_0xfcb8('0x40')]('nolimit')){_0x12ecf3[_0xfcb8('0x2b')]=qs[_0xfcb8('0x2b')](_0x176673['query'][_0xfcb8('0x2b')]);_0x12ecf3[_0xfcb8('0x2a')]=qs[_0xfcb8('0x2a')](_0x176673[_0xfcb8('0x3b')][_0xfcb8('0x2a')]);}_0x12ecf3['order']=qs[_0xfcb8('0x41')](_0x176673['query'][_0xfcb8('0x41')]);_0x12ecf3[_0xfcb8('0x45')]=qs['filters'](_[_0xfcb8('0x43')](_0x176673[_0xfcb8('0x3b')],_0x40184a[_0xfcb8('0x42')]));_0x12ecf3[_0xfcb8('0x45')][_0xfcb8('0x5b')]=_0x5a315b['id'];if(_0x176673[_0xfcb8('0x3b')][_0xfcb8('0x44')]){_0x12ecf3[_0xfcb8('0x45')]=_[_0xfcb8('0x46')](_0x12ecf3[_0xfcb8('0x45')],{'$or':_[_0xfcb8('0x47')](_0x12ecf3[_0xfcb8('0x3e')],function(_0x4f2aae){var _0x48a3eb={};_0x48a3eb[_0x4f2aae]={'$like':'%'+_0x176673['query'][_0xfcb8('0x44')]+'%'};return _0x48a3eb;})});}_0x12ecf3=_[_0xfcb8('0x46')]({},_0x12ecf3,_0x176673['options']);return db['Disposition'][_0xfcb8('0x2d')]({'where':_0x12ecf3[_0xfcb8('0x45')]})['then'](function(_0x447c59){_0x119b10[_0xfcb8('0x2d')]=_0x447c59;if(_0x176673[_0xfcb8('0x3b')][_0xfcb8('0x4b')]){_0x12ecf3['include']=[{'all':!![]}];}return db[_0xfcb8('0x5c')]['findAll'](_0x12ecf3);})[_0xfcb8('0x1d')](function(_0x225033){_0x119b10[_0xfcb8('0x5e')]=_0x225033;return _0x119b10;});}})[_0xfcb8('0x1d')](respondWithFilteredResult(_0x47ee3c,_0x12ecf3))[_0xfcb8('0x26')](handleError(_0x47ee3c,null));};exports['removeDispositions']=function(_0x2a639b,_0x44f6bf,_0x1d18db){return db[_0xfcb8('0x4a')]['find']({'where':{'id':_0x2a639b['params']['id']}})[_0xfcb8('0x1d')](handleEntityNotFound(_0x44f6bf,null))[_0xfcb8('0x1d')](function(_0x3baf37){if(_0x3baf37){return _0x3baf37[_0xfcb8('0x5f')](_0x2a639b['query'][_0xfcb8('0x60')]);}})[_0xfcb8('0x1d')](respondWithStatusCode(_0x44f6bf,null))[_0xfcb8('0x26')](handleError(_0x44f6bf,null));};exports[_0xfcb8('0x61')]=function(_0x42dbe0,_0x119b84,_0x19aa21){if(_0x42dbe0[_0xfcb8('0x50')]['id']){delete _0x42dbe0[_0xfcb8('0x50')]['id'];}return db[_0xfcb8('0x4a')][_0xfcb8('0x54')]({'where':{'id':_0x42dbe0[_0xfcb8('0x4d')]['id']}})['then'](handleEntityNotFound(_0x119b84,null))['then'](function(_0x24c50a){if(_0x24c50a){_0x42dbe0[_0xfcb8('0x50')]['SmsAccountId']=_0x24c50a['id'];return db[_0xfcb8('0x62')][_0xfcb8('0x4f')](_0x42dbe0[_0xfcb8('0x50')]);}})['then'](respondWithResult(_0x119b84,null))[_0xfcb8('0x26')](handleError(_0x119b84,null));};exports[_0xfcb8('0x63')]=function(_0x101229,_0x45747d,_0x28a349){var _0x2ed5ed={'raw':![],'where':{}};var _0x2a5af4={};var _0x4e8092={'count':0x0,'rows':[]};return db[_0xfcb8('0x4a')]['findOne']({'where':{'id':_0x101229[_0xfcb8('0x4d')]['id']}})[_0xfcb8('0x1d')](handleEntityNotFound(_0x45747d,null))[_0xfcb8('0x1d')](function(_0x1cc41b){if(_0x1cc41b){_0x2a5af4[_0xfcb8('0x3a')]=_[_0xfcb8('0x3c')](db[_0xfcb8('0x62')][_0xfcb8('0x37')]);_0x2a5af4[_0xfcb8('0x3b')]=_[_0xfcb8('0x3c')](_0x101229['query']);_0x2a5af4['filters']=_['intersection'](_0x2a5af4[_0xfcb8('0x3a')],_0x2a5af4[_0xfcb8('0x3b')]);_0x2ed5ed[_0xfcb8('0x3e')]=_[_0xfcb8('0x3d')](_0x2a5af4[_0xfcb8('0x3a')],qs[_0xfcb8('0x3f')](_0x101229['query'][_0xfcb8('0x3f')]));_0x2ed5ed[_0xfcb8('0x3e')]=_0x2ed5ed['attributes'][_0xfcb8('0x4e')]?_0x2ed5ed[_0xfcb8('0x3e')]:_0x2a5af4[_0xfcb8('0x3a')];if(!_0x101229[_0xfcb8('0x3b')]['hasOwnProperty']('nolimit')){_0x2ed5ed[_0xfcb8('0x2b')]=qs[_0xfcb8('0x2b')](_0x101229[_0xfcb8('0x3b')][_0xfcb8('0x2b')]);_0x2ed5ed['offset']=qs['offset'](_0x101229[_0xfcb8('0x3b')][_0xfcb8('0x2a')]);}_0x2ed5ed[_0xfcb8('0x64')]=qs[_0xfcb8('0x41')](_0x101229[_0xfcb8('0x3b')][_0xfcb8('0x41')]);_0x2ed5ed[_0xfcb8('0x45')]=qs[_0xfcb8('0x42')](_[_0xfcb8('0x43')](_0x101229[_0xfcb8('0x3b')],_0x2a5af4['filters']));_0x2ed5ed[_0xfcb8('0x45')][_0xfcb8('0x5b')]=_0x1cc41b['id'];if(_0x101229[_0xfcb8('0x3b')][_0xfcb8('0x44')]){_0x2ed5ed[_0xfcb8('0x45')]=_[_0xfcb8('0x46')](_0x2ed5ed[_0xfcb8('0x45')],{'$or':_['map'](_0x2ed5ed[_0xfcb8('0x3e')],function(_0x4fadb5){var _0x2cf14b={};_0x2cf14b[_0x4fadb5]={'$like':'%'+_0x101229[_0xfcb8('0x3b')][_0xfcb8('0x44')]+'%'};return _0x2cf14b;})});}_0x2ed5ed=_[_0xfcb8('0x46')]({},_0x2ed5ed,_0x101229[_0xfcb8('0x49')]);return db[_0xfcb8('0x62')][_0xfcb8('0x2d')]({'where':_0x2ed5ed['where']})[_0xfcb8('0x1d')](function(_0x523b7f){_0x4e8092[_0xfcb8('0x2d')]=_0x523b7f;if(_0x101229[_0xfcb8('0x3b')][_0xfcb8('0x4b')]){_0x2ed5ed['include']=[{'all':!![]}];}return db['CannedAnswer'][_0xfcb8('0x65')](_0x2ed5ed);})[_0xfcb8('0x1d')](function(_0x24c46c){_0x4e8092[_0xfcb8('0x5e')]=_0x24c46c;return _0x4e8092;});}})[_0xfcb8('0x1d')](respondWithFilteredResult(_0x45747d,_0x2ed5ed))['catch'](handleError(_0x45747d,null));};exports['removeAnswers']=function(_0x4e6ebe,_0xb74a4b,_0x16a9ef){return db[_0xfcb8('0x4a')]['find']({'where':{'id':_0x4e6ebe[_0xfcb8('0x4d')]['id']}})[_0xfcb8('0x1d')](handleEntityNotFound(_0xb74a4b,null))[_0xfcb8('0x1d')](function(_0x9c7889){if(_0x9c7889){return _0x9c7889['removeAnswers'](_0x4e6ebe[_0xfcb8('0x3b')]['ids']);}})[_0xfcb8('0x1d')](respondWithStatusCode(_0xb74a4b,null))['catch'](handleError(_0xb74a4b,null));};exports['notify']=function(_0x3d59f5,_0x52c0ca,_0x3a5bc7){var _0x51553e={'channel':_0xfcb8('0x66')};var _0x72512d=[];var _0x16e821=[];var _0x334d39={};return db[_0xfcb8('0x4a')][_0xfcb8('0x54')]({'where':{'id':_0x3d59f5['params']['id']},'include':[{'model':db[_0xfcb8('0x67')],'as':'Applications'}]})[_0xfcb8('0x1d')](handleEntityNotFound(_0x52c0ca,null))[_0xfcb8('0x1d')](function(_0x26e817){_0x51553e[_0xfcb8('0x68')]=_0x26e817;_0x51553e[_0xfcb8('0x69')]=_[_0xfcb8('0x6a')](_0x26e817[_0xfcb8('0x6b')],['priority'],['asc']);if(_0x51553e[_0xfcb8('0x68')]['Applications']){delete _0x51553e[_0xfcb8('0x68')][_0xfcb8('0x6b')];}return db['CmContact']['describe']();})['then'](function(_0x1d2367){if(!_0x1d2367){throw new db[(_0xfcb8('0x6c'))][(_0xfcb8('0x6d'))](_0xfcb8('0x6e'));}_0x72512d=_[_0xfcb8('0x6f')](_[_0xfcb8('0x3c')](_0x1d2367),[_0xfcb8('0x70'),_0xfcb8('0x71')]);_0x16e821=_[_0xfcb8('0x6f')](_[_0xfcb8('0x3c')](_0x1d2367),['createdAt',_0xfcb8('0x71'),'CompanyId',_0xfcb8('0x72')]);_0x51553e[_0xfcb8('0x50')]={'mapKey':_0xfcb8('0x73')};if(_0x51553e[_0xfcb8('0x68')][_0xfcb8('0x74')]){switch(_0x51553e['account'][_0xfcb8('0x74')]){case'twilio':_0x51553e[_0xfcb8('0x50')][_0xfcb8('0x75')]=_0x3d59f5[_0xfcb8('0x50')][_0xfcb8('0x76')];_0x51553e['body'][_0xfcb8('0x50')]=_0x3d59f5[_0xfcb8('0x50')][_0xfcb8('0x77')];_0x51553e[_0xfcb8('0x50')][_0xfcb8('0x78')]=_0x3d59f5[_0xfcb8('0x50')][_0xfcb8('0x79')];break;case _0xfcb8('0x7a'):_0x51553e[_0xfcb8('0x50')][_0xfcb8('0x75')]='+'+_0x3d59f5[_0xfcb8('0x50')][_0xfcb8('0x7b')];_0x51553e['body'][_0xfcb8('0x50')]=_0x3d59f5[_0xfcb8('0x50')]['text'];break;case _0xfcb8('0x7c'):_0x51553e[_0xfcb8('0x50')][_0xfcb8('0x75')]=_0x3d59f5[_0xfcb8('0x50')][_0xfcb8('0x75')];_0x51553e[_0xfcb8('0x50')]['body']=_0x3d59f5[_0xfcb8('0x50')]['message'];break;case _0xfcb8('0x7d'):_0x51553e[_0xfcb8('0x50')][_0xfcb8('0x75')]=_0x3d59f5[_0xfcb8('0x50')][_0xfcb8('0x75')];_0x51553e['body'][_0xfcb8('0x50')]=_0x3d59f5[_0xfcb8('0x50')][_0xfcb8('0x50')];_0x51553e[_0xfcb8('0x50')][_0xfcb8('0x78')]=_0x3d59f5['body'][_0xfcb8('0x7e')];break;case'plivo':_0x51553e['body'][_0xfcb8('0x75')]=_0x3d59f5[_0xfcb8('0x50')][_0xfcb8('0x76')];_0x51553e['body'][_0xfcb8('0x50')]=_0x3d59f5[_0xfcb8('0x50')][_0xfcb8('0x7f')];_0x51553e[_0xfcb8('0x50')][_0xfcb8('0x78')]=_0x3d59f5[_0xfcb8('0x50')][_0xfcb8('0x80')];break;case _0xfcb8('0x81'):_0x51553e['body'][_0xfcb8('0x75')]='+'+_0x3d59f5[_0xfcb8('0x50')][_0xfcb8('0x82')][0x0][_0xfcb8('0x75')];_0x51553e[_0xfcb8('0x50')][_0xfcb8('0x50')]=_0x3d59f5['body'][_0xfcb8('0x82')][0x0][_0xfcb8('0x83')];_0x51553e[_0xfcb8('0x50')][_0xfcb8('0x78')]=_0x3d59f5[_0xfcb8('0x50')]['results'][0x0][_0xfcb8('0x78')];break;case'csc':_0x51553e[_0xfcb8('0x50')][_0xfcb8('0x75')]=_0x3d59f5[_0xfcb8('0x50')][_0xfcb8('0x84')];_0x51553e[_0xfcb8('0x50')]['body']=_0x3d59f5['body'][_0xfcb8('0x85')][_0xfcb8('0x25')];break;case _0xfcb8('0x86'):_0x51553e[_0xfcb8('0x50')][_0xfcb8('0x75')]=_0x3d59f5[_0xfcb8('0x50')][_0xfcb8('0x87')];_0x51553e[_0xfcb8('0x50')]['body']=_0x3d59f5[_0xfcb8('0x50')][_0xfcb8('0x83')];_0x51553e[_0xfcb8('0x50')][_0xfcb8('0x78')]=_0x3d59f5[_0xfcb8('0x50')][_0xfcb8('0x88')];break;case'bandwidth':_0x51553e[_0xfcb8('0x50')]['messageId']=_0x3d59f5[_0xfcb8('0x50')][0x0][_0xfcb8('0x25')]['id'];_0x51553e[_0xfcb8('0x50')][_0xfcb8('0x75')]=_0x3d59f5[_0xfcb8('0x50')][0x0]['message'][_0xfcb8('0x75')];_0x51553e[_0xfcb8('0x50')][_0xfcb8('0x50')]=_0x3d59f5['body'][0x0][_0xfcb8('0x25')][_0xfcb8('0x83')];break;case _0xfcb8('0x89'):_0x51553e['body'][_0xfcb8('0x75')]=_0x3d59f5[_0xfcb8('0x50')][_0xfcb8('0x75')];_0x51553e[_0xfcb8('0x50')][_0xfcb8('0x50')]=_0x3d59f5[_0xfcb8('0x50')][_0xfcb8('0x25')];_0x51553e[_0xfcb8('0x50')]['messageId']=_0x3d59f5[_0xfcb8('0x50')][_0xfcb8('0x8a')];break;}}if(_0x51553e[_0xfcb8('0x50')]['id']){delete _0x51553e[_0xfcb8('0x50')]['id'];}if(_[_0xfcb8('0x8b')](_0x51553e[_0xfcb8('0x50')][_0xfcb8('0x75')])){throw new db['Sequelize'][(_0xfcb8('0x6d'))]('from\x20is\x20mandatory');}if(_[_0xfcb8('0x8b')](_0x51553e[_0xfcb8('0x50')][_0xfcb8('0x50')])||_0x51553e[_0xfcb8('0x50')]['body']===''){throw new db[(_0xfcb8('0x6c'))][(_0xfcb8('0x6d'))](_0xfcb8('0x8c'));}if(_[_0xfcb8('0x8b')](_0x51553e[_0xfcb8('0x50')][_0xfcb8('0x8d')])){throw new db['Sequelize'][(_0xfcb8('0x6d'))]('mapKey\x20is\x20mandatory,\x20please\x20use\x20one\x20of\x20these:\x20'+_0x16e821);}if(!_[_0xfcb8('0x8e')](_0x16e821,_0x51553e[_0xfcb8('0x50')][_0xfcb8('0x8d')])){throw new db[(_0xfcb8('0x6c'))][(_0xfcb8('0x6d'))](_0xfcb8('0x8f')+_0x16e821);}_0x334d39[_0x51553e['body'][_0xfcb8('0x8d')]]=_0x51553e[_0xfcb8('0x50')][_0xfcb8('0x75')];return db[_0xfcb8('0x90')]['find']({'where':{'id':_0x51553e['account'][_0xfcb8('0x72')]},'include':[{'model':db[_0xfcb8('0x91')],'as':_0xfcb8('0x92'),'where':_0x334d39,'limit':0x1,'order':[['updatedAt','DESC']]}]});})[_0xfcb8('0x1d')](handleEntityNotFound(_0x52c0ca,null))[_0xfcb8('0x1d')](function(_0x9f89bd){if(_0x9f89bd){_0x51553e[_0xfcb8('0x93')]=_['omit'](_0x9f89bd,[_0xfcb8('0x92')]);if(_0x9f89bd['Contacts'][_0xfcb8('0x4e')]){return _0x9f89bd[_0xfcb8('0x92')][0x0];}var _0x4fe53b=_[_0xfcb8('0x16')](_0x51553e['body'],{'firstName':_0x51553e['body'][_0xfcb8('0x75')],'ListId':_0x9f89bd['id']});_0x4fe53b[_0x51553e[_0xfcb8('0x50')][_0xfcb8('0x8d')]]=_0x51553e[_0xfcb8('0x50')][_0xfcb8('0x75')];return db[_0xfcb8('0x91')]['create'](_0x4fe53b,{'fields':_0x72512d,'raw':!![]});}})['then'](handleEntityNotFound(_0x52c0ca,null))['then'](function(_0x4201ea){if(_0x4201ea){_0x51553e[_0xfcb8('0x94')]=_0x4201ea;var _0x13b1d8={'ContactId':_0x4201ea['id'],'phone':_0x51553e[_0xfcb8('0x50')][_0xfcb8('0x75')],'SmsAccountId':_0x3d59f5[_0xfcb8('0x4d')]['id']};var _0x557f44={'ContactId':_0x4201ea['id'],'SmsAccountId':_0x3d59f5[_0xfcb8('0x4d')]['id'],'closed':![]};return db[_0xfcb8('0x95')][_0xfcb8('0x54')]({'where':_0x557f44})[_0xfcb8('0x1d')](function(_0x4a4689){if(_0x4a4689){return[_0x4a4689,![]];}return db[_0xfcb8('0x95')]['create'](_0x13b1d8)[_0xfcb8('0x1d')](function(_0x21a78b){return[_0x21a78b,!![]];});});}})[_0xfcb8('0x96')](function(_0x108f4d,_0x4a5582){_0x51553e[_0xfcb8('0x97')]=_0x108f4d[_0xfcb8('0x31')]({'plain':!![]});_0x51553e[_0xfcb8('0x97')][_0xfcb8('0x98')]=![];if(_0x4a5582){if(_0x51553e[_0xfcb8('0x68')][_0xfcb8('0x99')]){_0x51553e[_0xfcb8('0x69')][_0xfcb8('0x9a')]({'id':0x0,'priority':_0x51553e[_0xfcb8('0x69')]['length']+0x1,'app':_0xfcb8('0x9b'),'appdata':_0xfcb8('0x9c'),'interval':_0xfcb8('0x9d')});}_0x51553e[_0xfcb8('0x97')][_0xfcb8('0x98')]=!![];}return db[_0xfcb8('0x9e')]['create']({'phone':_0x51553e[_0xfcb8('0x50')][_0xfcb8('0x75')],'messageId':_0x51553e[_0xfcb8('0x50')]['messageId'],'body':_0x51553e[_0xfcb8('0x50')]['body'],'SmsAccountId':_0x3d59f5[_0xfcb8('0x4d')]['id'],'SmsInteractionId':_0x108f4d['id'],'direction':'in','ContactId':_0x108f4d[_0xfcb8('0x9f')],'AttachmentId':_0x51553e['body'][_0xfcb8('0xa0')]});})[_0xfcb8('0x1d')](function(_0x2c9757){_0x51553e['message']=_0x2c9757;if(_0x51553e[_0xfcb8('0x97')][_0xfcb8('0xa1')]){return db[_0xfcb8('0xa2')][_0xfcb8('0x54')]({'attributes':['id',_0xfcb8('0x34')],'where':{'id':_0x51553e[_0xfcb8('0x97')][_0xfcb8('0xa1')]}})[_0xfcb8('0x1d')](function(_0x4a0665){if(_0x4a0665){_0x51553e['applications']['unshift']({'id':0x0,'priority':0x0,'app':'agent','appdata':_0x4a0665[_0xfcb8('0x34')]+','+(_0x51553e[_0xfcb8('0x68')][_0xfcb8('0xa3')]||0xa),'interval':_0xfcb8('0x9d')});}return respondWithRpcPromise('Start',_0xfcb8('0xa4'),_0x51553e);});}return respondWithRpcPromise(_0xfcb8('0xa5'),_0xfcb8('0xa4'),_0x51553e);})[_0xfcb8('0x1d')](function(_0x2dfc8d){if(_0x2dfc8d){var _0x180e82=0xc8;var _0x55372d=_0xfcb8('0xa6');logger['info'](_0xfcb8('0x20'),_0x55372d,_0x180e82,_0xfcb8('0xa7'));logger[_0xfcb8('0x1f')](_0xfcb8('0xa8'),_0x55372d,_0x180e82,_0xfcb8('0xa7'),JSON[_0xfcb8('0x21')](_0x2dfc8d));if(_0x51553e[_0xfcb8('0x68')][_0xfcb8('0x74')]==='twilio'){return _0x52c0ca[_0xfcb8('0x28')](_0x180e82)['set'](_0xfcb8('0xa9'),_0xfcb8('0xaa'))[_0xfcb8('0xab')]('\x0a');}else{return _0x52c0ca[_0xfcb8('0x28')](_0x180e82)[_0xfcb8('0x29')](_0x2dfc8d);}}})['catch'](handleError(_0x52c0ca,null));};exports[_0xfcb8('0xac')]=function(_0x15d9ab,_0x3bcf4f){var _0x54d135=_0x15d9ab[_0xfcb8('0x4d')]['id'];var _0x1edc3b=_0x15d9ab['body'];var _0x3419bd=0xc8;var _0xbea44f=null;return db['sequelize'][_0xfcb8('0xad')]({'isolationLevel':db[_0xfcb8('0xae')][_0xfcb8('0xaf')][_0xfcb8('0xb0')][_0xfcb8('0xb1')]},function(_0x9abb91){return db[_0xfcb8('0x4a')]['findOne']({'where':{'id':_0x54d135},'transaction':_0x9abb91})[_0xfcb8('0x1d')](function(_0x8b9537){if(_0x8b9537){return db[_0xfcb8('0x67')][_0xfcb8('0x30')]({'where':{'SmsAccountId':_0x54d135},'transaction':_0x9abb91})['then'](function(){var _0x9ec8c2=_[_0xfcb8('0x47')](_0x1edc3b,function(_0x4e2031){_0x4e2031[_0xfcb8('0x5b')]=_0x54d135;return _0x4e2031;});return db['SmsApplication'][_0xfcb8('0xb2')](_0x9ec8c2,{'transaction':_0x9abb91});});}else{_0x3419bd=0x194;_0xbea44f=[];}});})[_0xfcb8('0x1d')](function(){if(_0x3419bd!==0x194){return db[_0xfcb8('0x67')][_0xfcb8('0xb3')]({'where':{'SmsAccountId':_0x54d135},'order':_0xfcb8('0xb4')})['then'](function(_0x13f93f){_0xbea44f=_0x13f93f;});}})[_0xfcb8('0x26')](function(_0x5f022f){_0x3419bd=0x1f4;logger['error'](_0x5f022f[_0xfcb8('0x33')]);if(_0x5f022f[_0xfcb8('0x34')]){delete _0x5f022f[_0xfcb8('0x34')];}_0xbea44f=_0x5f022f;})[_0xfcb8('0xb5')](function(){if(_0xbea44f===null){_0x3bcf4f['sendStatus'](_0x3419bd);}else{if(_0x3419bd===0x1f4){_0x3bcf4f[_0xfcb8('0x28')](_0x3419bd)[_0xfcb8('0xab')](_0xbea44f);}else{_0x3bcf4f['status'](_0x3419bd)[_0xfcb8('0x29')](_0xbea44f);}}});};exports['getApplications']=function(_0x4d5de5,_0x46153c,_0x518b25){var _0x2aaf41={};var _0x58edf1={};var _0xb7eb49;var _0x5eeecb;return db[_0xfcb8('0x4a')]['findOne']({'where':{'id':_0x4d5de5[_0xfcb8('0x4d')]['id']}})[_0xfcb8('0x1d')](handleEntityNotFound(_0x46153c,null))[_0xfcb8('0x1d')](function(_0x32d743){if(_0x32d743){_0xb7eb49=_0x32d743;_0x58edf1['model']=_['keys'](db['SmsApplication'][_0xfcb8('0x37')]);_0x58edf1[_0xfcb8('0x3b')]=_[_0xfcb8('0x3c')](_0x4d5de5['query']);_0x58edf1[_0xfcb8('0x42')]=_[_0xfcb8('0x3d')](_0x58edf1[_0xfcb8('0x3a')],_0x58edf1[_0xfcb8('0x3b')]);_0x2aaf41[_0xfcb8('0x3e')]=_[_0xfcb8('0x3d')](_0x58edf1[_0xfcb8('0x3a')],qs[_0xfcb8('0x3f')](_0x4d5de5['query'][_0xfcb8('0x3f')]));_0x2aaf41[_0xfcb8('0x3e')]=_0x2aaf41[_0xfcb8('0x3e')][_0xfcb8('0x4e')]?_0x2aaf41[_0xfcb8('0x3e')]:_0x58edf1[_0xfcb8('0x3a')];_0x2aaf41[_0xfcb8('0x64')]=qs['sort'](_0x4d5de5[_0xfcb8('0x3b')][_0xfcb8('0x41')]);_0x2aaf41['where']=qs[_0xfcb8('0x42')](_[_0xfcb8('0x43')](_0x4d5de5[_0xfcb8('0x3b')],_0x58edf1[_0xfcb8('0x42')]));if(_0x4d5de5['query'][_0xfcb8('0x44')]){_0x2aaf41[_0xfcb8('0x45')]=_['merge'](_0x2aaf41[_0xfcb8('0x45')],{'$or':_[_0xfcb8('0x47')](_0x2aaf41[_0xfcb8('0x3e')],function(_0x5a2d0d){var _0x16ff66={};_0x16ff66[_0x5a2d0d]={'$like':'%'+_0x4d5de5[_0xfcb8('0x3b')][_0xfcb8('0x44')]+'%'};return _0x16ff66;})});}_0x2aaf41=_[_0xfcb8('0x46')]({},_0x2aaf41,_0x4d5de5[_0xfcb8('0x49')]);return _0xb7eb49[_0xfcb8('0xb6')](_0x2aaf41);}})[_0xfcb8('0x1d')](function(_0x80fc31){if(_0x80fc31){_0x5eeecb=_0x80fc31[_0xfcb8('0x4e')];if(!_0x4d5de5['query'][_0xfcb8('0x40')](_0xfcb8('0xb7'))){_0x2aaf41[_0xfcb8('0x2b')]=qs[_0xfcb8('0x2b')](_0x4d5de5[_0xfcb8('0x3b')][_0xfcb8('0x2b')]);_0x2aaf41[_0xfcb8('0x2a')]=qs[_0xfcb8('0x2a')](_0x4d5de5[_0xfcb8('0x3b')][_0xfcb8('0x2a')]);}return _0xb7eb49[_0xfcb8('0xb6')](_0x2aaf41);}})[_0xfcb8('0x1d')](function(_0xe48546){if(_0xe48546){return _0xe48546?{'count':_0x5eeecb,'rows':_0xe48546}:null;}})[_0xfcb8('0x1d')](respondWithResult(_0x46153c,null))[_0xfcb8('0x26')](handleError(_0x46153c,null));};exports['getInteractions']=function(_0x3df3f5,_0x303f6a,_0x504869){var _0x2f3667={'raw':![],'where':{}};var _0xf9c54a={};var _0x428ae7={'count':0x0,'rows':[]};return db['SmsAccount'][_0xfcb8('0xb8')]({'where':{'id':_0x3df3f5[_0xfcb8('0x4d')]['id']}})[_0xfcb8('0x1d')](handleEntityNotFound(_0x303f6a,null))[_0xfcb8('0x1d')](function(_0x1dc7e2){if(_0x1dc7e2){_0xf9c54a['model']=_[_0xfcb8('0x3c')](db['SmsInteraction'][_0xfcb8('0x37')]);_0xf9c54a[_0xfcb8('0x3b')]=_[_0xfcb8('0x3c')](_0x3df3f5[_0xfcb8('0x3b')]);_0xf9c54a[_0xfcb8('0x42')]=_[_0xfcb8('0x3d')](_0xf9c54a[_0xfcb8('0x3a')],_0xf9c54a[_0xfcb8('0x3b')]);_0x2f3667['attributes']=_[_0xfcb8('0x3d')](_0xf9c54a[_0xfcb8('0x3a')],qs['fields'](_0x3df3f5[_0xfcb8('0x3b')][_0xfcb8('0x3f')]));_0x2f3667[_0xfcb8('0x3e')]=_0x2f3667['attributes'][_0xfcb8('0x4e')]?_0x2f3667[_0xfcb8('0x3e')]:_0xf9c54a['model'];if(!_0x3df3f5[_0xfcb8('0x3b')][_0xfcb8('0x40')](_0xfcb8('0xb7'))){_0x2f3667[_0xfcb8('0x2b')]=qs[_0xfcb8('0x2b')](_0x3df3f5['query'][_0xfcb8('0x2b')]);_0x2f3667['offset']=qs[_0xfcb8('0x2a')](_0x3df3f5[_0xfcb8('0x3b')][_0xfcb8('0x2a')]);}_0x2f3667['order']=qs[_0xfcb8('0x41')](_0x3df3f5[_0xfcb8('0x3b')][_0xfcb8('0x41')]);_0x2f3667['where']=qs[_0xfcb8('0x42')](_[_0xfcb8('0x43')](_0x3df3f5[_0xfcb8('0x3b')],_0xf9c54a[_0xfcb8('0x42')]));_0x2f3667['where'][_0xfcb8('0x5b')]=_0x1dc7e2['id'];if(_0x3df3f5[_0xfcb8('0x3b')][_0xfcb8('0x44')]){_0x2f3667[_0xfcb8('0x45')]=_['merge'](_0x2f3667[_0xfcb8('0x45')],{'$or':_['map'](_0x2f3667[_0xfcb8('0x3e')],function(_0x5f5294){var _0x4691b6={};_0x4691b6[_0x5f5294]={'$like':'%'+_0x3df3f5[_0xfcb8('0x3b')][_0xfcb8('0x44')]+'%'};return _0x4691b6;})});}_0x2f3667=_[_0xfcb8('0x46')]({},_0x2f3667,_0x3df3f5[_0xfcb8('0x49')]);return db['SmsInteraction']['count']({'where':_0x2f3667[_0xfcb8('0x45')]})[_0xfcb8('0x1d')](function(_0x5cfdb7){_0x428ae7[_0xfcb8('0x2d')]=_0x5cfdb7;if(_0x3df3f5[_0xfcb8('0x3b')][_0xfcb8('0x4b')]){_0x2f3667[_0xfcb8('0x4c')]=[{'model':db[_0xfcb8('0x91')],'as':'Contact','required':![]},{'model':db[_0xfcb8('0xa2')],'as':_0xfcb8('0xb9'),'attributes':[_0xfcb8('0x34'),'fullname',_0xfcb8('0xba')],'required':![]},{'model':db['Tag'],'as':'Tags','attributes':['id',_0xfcb8('0x34'),_0xfcb8('0xbb')],'where':_0x3df3f5['query'][_0xfcb8('0xbc')]?{'id':_0x3df3f5[_0xfcb8('0x3b')][_0xfcb8('0xbc')]}:undefined,'required':_0x3df3f5['query'][_0xfcb8('0xbc')]?!![]:![]}];}return db[_0xfcb8('0x95')]['findAll'](_0x2f3667);})[_0xfcb8('0x1d')](function(_0x3b959d){_0x428ae7['rows']=_0x3b959d;return _0x428ae7;});}})[_0xfcb8('0x1d')](respondWithFilteredResult(_0x303f6a,_0x2f3667))[_0xfcb8('0x26')](handleError(_0x303f6a,null));};exports[_0xfcb8('0xab')]=function(_0x41185b,_0x1d2c77,_0xe1924e){var _0x53696b,_0x38859b,_0x26359f;if(_[_0xfcb8('0x8b')](_0x41185b['body']['body'])||_0x41185b[_0xfcb8('0x50')]['body']===''){throw new db[(_0xfcb8('0x6c'))][(_0xfcb8('0x6d'))]('body\x20is\x20mandatory\x20and\x20not\x20empty');}if(_[_0xfcb8('0x8b')](_0x41185b[_0xfcb8('0x50')]['to'])){throw new db[(_0xfcb8('0x6c'))][(_0xfcb8('0x6d'))](_0xfcb8('0xbd'));}_0x53696b=_0x41185b[_0xfcb8('0x50')]['to'];return db[_0xfcb8('0x4a')][_0xfcb8('0x54')]({'where':{'id':_0x41185b[_0xfcb8('0x4d')]['id']},'include':[{'model':db['CmList'],'as':_0xfcb8('0xbe'),'include':[{'model':db[_0xfcb8('0x91')],'as':_0xfcb8('0x92'),'where':{'mobile':_0x53696b},'limit':0x1,'order':[[_0xfcb8('0x71'),_0xfcb8('0xbf')]]}]}]})[_0xfcb8('0x1d')](handleEntityNotFound(_0x1d2c77,null))['then'](function(_0x255acc){if(_0x255acc&&_0x255acc[_0xfcb8('0xbe')]){_0x38859b=_0x255acc[_0xfcb8('0x31')]({'plain':!![]});if(_0x38859b[_0xfcb8('0xbe')]&&_0x38859b[_0xfcb8('0xbe')][_0xfcb8('0x92')][_0xfcb8('0x4e')]){return _0x38859b[_0xfcb8('0xbe')][_0xfcb8('0x92')][0x0];}return db[_0xfcb8('0x91')][_0xfcb8('0x4f')](_[_0xfcb8('0x16')](_0x41185b['body'],{'firstName':_0x53696b,'mobile':_0x53696b,'phone':_0x53696b,'ListId':_0x38859b[_0xfcb8('0x72')]}));}})[_0xfcb8('0x1d')](handleEntityNotFound(_0x1d2c77,null))[_0xfcb8('0x1d')](function(_0x2de1d3){if(_0x2de1d3){_0x26359f=_0x2de1d3;return db[_0xfcb8('0x95')][_0xfcb8('0x54')]({'where':{'ContactId':_0x26359f['id'],'closed':![],'SmsAccountId':_0x38859b['id']}})[_0xfcb8('0x1d')](function(_0x567cde){if(_0x567cde){return[_0x567cde,![]];}return db[_0xfcb8('0x95')][_0xfcb8('0x4f')]({'UserId':_0x41185b[_0xfcb8('0x51')]['id'],'ContactId':_0x26359f['id'],'SmsAccountId':_0x38859b['id'],'phone':_0x53696b,'firstMsgDirection':_0xfcb8('0xc0'),'Messages':[_[_0xfcb8('0x46')](_0x41185b['body'],{'read':![],'body':_0x41185b[_0xfcb8('0x50')]['body'],'phone':_0x53696b,'SmsAccountId':_0x38859b['id'],'UserId':_0x41185b[_0xfcb8('0x51')]['id'],'ContactId':_0x26359f['id']})]},{'include':[{'model':db[_0xfcb8('0x9e')],'as':_0xfcb8('0xc1')}]})[_0xfcb8('0x1d')](function(_0x56e2e5){return[_0x56e2e5,!![]];});});}})[_0xfcb8('0x96')](function(_0x847c38,_0x3cfd2e){if(_0x3cfd2e){return _0x847c38;}return db[_0xfcb8('0x9e')][_0xfcb8('0x4f')](_[_0xfcb8('0x46')](_0x41185b['body'],{'read':![],'body':_0x41185b[_0xfcb8('0x50')]['body'],'phone':_0x53696b,'SmsAccountId':_0x38859b['id'],'SmsInteractionId':_0x847c38['id'],'UserId':_0x41185b[_0xfcb8('0x51')]['id'],'ContactId':_0x26359f['id']}))[_0xfcb8('0x1d')](function(_0x35704a){_0x847c38[_0xfcb8('0xc2')]['Messages']=[];_0x847c38[_0xfcb8('0xc2')][_0xfcb8('0xc1')][_0xfcb8('0x9a')](_0x35704a[_0xfcb8('0xc2')]);return _0x847c38;});})[_0xfcb8('0x1d')](respondWithResult(_0x1d2c77,null))[_0xfcb8('0x26')](handleError(_0x1d2c77,null));};exports['status']=function(_0x45c8c9,_0x81e90b,_0x250004){if(_0x45c8c9[_0xfcb8('0x50')]['id']){delete _0x45c8c9['body']['id'];}var _0x2f9a6e,_0x30537a,_0x43d191;return db[_0xfcb8('0x4a')][_0xfcb8('0x54')]({'where':{'id':_0x45c8c9[_0xfcb8('0x4d')]['id']}})[_0xfcb8('0x1d')](handleEntityNotFound(_0x81e90b,null))[_0xfcb8('0x1d')](function(_0x282de5){if(_0x282de5){_0x43d191=_0x282de5;logger[_0xfcb8('0x1f')](_0xfcb8('0x20'),'status','received\x20delivery\x20report\x20from',_0x282de5['type'],util[_0xfcb8('0xc3')](_0x45c8c9[_0xfcb8('0x50')],{'showHidden':![],'depth':null}));switch(_0x282de5[_0xfcb8('0x74')]){case _0xfcb8('0x7a'):if(_0x45c8c9[_0xfcb8('0x50')][_0xfcb8('0xc4')]&&_0x45c8c9[_0xfcb8('0x50')][_0xfcb8('0x28')]){_0x30537a=_0x45c8c9[_0xfcb8('0x50')]['status'];return db[_0xfcb8('0x9e')][_0xfcb8('0x54')]({'where':{'messageId':_0x45c8c9[_0xfcb8('0x50')][_0xfcb8('0xc4')]}});}break;case _0xfcb8('0x7c'):if(_0x45c8c9[_0xfcb8('0x50')][_0xfcb8('0xc5')]&&_0x45c8c9['body'][_0xfcb8('0xc6')]){_0x30537a=_0x45c8c9[_0xfcb8('0x50')][_0xfcb8('0xc6')];return db[_0xfcb8('0x9e')][_0xfcb8('0x54')]({'where':{'messageId':_0x45c8c9[_0xfcb8('0x50')]['requestid']}});}break;case _0xfcb8('0x7d'):if(_0x45c8c9['body'][_0xfcb8('0x7e')]&&_0x45c8c9[_0xfcb8('0x50')]['status_code']){_0x30537a=_0x45c8c9[_0xfcb8('0x50')]['status_code'];return db[_0xfcb8('0x9e')][_0xfcb8('0x54')]({'where':{'messageId':_0x45c8c9['body']['message_id']}});}break;case _0xfcb8('0x81'):var _0x49c4fa=_0x45c8c9[_0xfcb8('0x50')][_0xfcb8('0x82')][0x0];if(_0x49c4fa[_0xfcb8('0x78')]&&_0x49c4fa[_0xfcb8('0x28')][_0xfcb8('0xc7')]===_0xfcb8('0xc8')){_0x30537a=_0x49c4fa[_0xfcb8('0x28')][_0xfcb8('0xc7')];return db[_0xfcb8('0x9e')][_0xfcb8('0x54')]({'where':{'messageId':_0x49c4fa[_0xfcb8('0x78')]}});}break;case _0xfcb8('0x86'):if(_0x45c8c9[_0xfcb8('0x50')]['messageId']&&_0x45c8c9[_0xfcb8('0x50')][_0xfcb8('0x28')]){_0x30537a=_0x45c8c9['body']['status'];return db[_0xfcb8('0x9e')]['find']({'where':{'messageId':_0x45c8c9['body']['messageId']}});}break;case'bandwidth':if(_0x45c8c9[_0xfcb8('0x50')][0x0][_0xfcb8('0x25')]['id']){_0x30537a=_0x45c8c9[_0xfcb8('0x50')][0x0][_0xfcb8('0x74')];return db['SmsMessage'][_0xfcb8('0x54')]({'where':{'messageId':_0x45c8c9[_0xfcb8('0x50')][0x0]['message']['id']}});}break;case _0xfcb8('0x89'):if(_0x45c8c9[_0xfcb8('0x50')][_0xfcb8('0xc9')]&&_0x45c8c9[_0xfcb8('0x50')][_0xfcb8('0x28')]){_0x30537a=_0x45c8c9[_0xfcb8('0x50')][_0xfcb8('0x28')];return db['SmsMessage'][_0xfcb8('0x54')]({'where':{'messageId':_0x45c8c9[_0xfcb8('0x50')][_0xfcb8('0xc9')]}});}break;}}})[_0xfcb8('0x1d')](handleEntityNotFound(_0x81e90b,null))[_0xfcb8('0x1d')](function(_0xd2d102){if(_0xd2d102){_0x2f9a6e=_0xd2d102;switch(_0x43d191[_0xfcb8('0x74')]){case _0xfcb8('0x7a'):if(_0x30537a===_0xfcb8('0xc8')){return _0x2f9a6e[_0xfcb8('0x58')]({'read':!![]});}else{logger[_0xfcb8('0x22')](_0xfcb8('0x20'),_0xfcb8('0x28'),'skebby',util[_0xfcb8('0xc3')](_0x45c8c9['body'],{'showHidden':![],'depth':null}));}break;case'connectel':if(_0x30537a==='1'){return _0x2f9a6e[_0xfcb8('0x58')]({'read':!![]});}else{logger[_0xfcb8('0x22')](_0xfcb8('0x20'),_0xfcb8('0x28'),_0xfcb8('0x7a'),util[_0xfcb8('0xc3')](_0x45c8c9['body'],{'showHidden':![],'depth':null}));}break;case _0xfcb8('0x7d'):if(!_0x45c8c9[_0xfcb8('0x50')]['error_code']&&_0x30537a>=0xc8&&_0x30537a<=0xce){return _0x2f9a6e['update']({'read':!![]});}else{logger[_0xfcb8('0x22')](_0xfcb8('0x20'),_0xfcb8('0x28'),'clicksend',util[_0xfcb8('0xc3')](_0x45c8c9[_0xfcb8('0x50')],{'showHidden':![],'depth':null}));}break;case _0xfcb8('0x81'):var _0x327298=_0x45c8c9['body'][_0xfcb8('0x82')][0x0];if(_0x327298[_0xfcb8('0x28')]['groupName']==='DELIVERED'){return _0x2f9a6e[_0xfcb8('0x58')]({'read':!![]});}else{logger['error'](_0xfcb8('0x20'),'status',_0xfcb8('0x81'),util[_0xfcb8('0xc3')](_0x45c8c9['body'],{'showHidden':![],'depth':null}));}break;case _0xfcb8('0x86'):if(_0x30537a==_0xfcb8('0xca')||_0x30537a==_0xfcb8('0xcb')){return _0x2f9a6e[_0xfcb8('0x58')]({'read':!![]});}else{logger[_0xfcb8('0x22')]('SmsAccount,\x20%s,\x20%s,\x20%s',_0xfcb8('0x28'),_0xfcb8('0x86'),util[_0xfcb8('0xc3')](_0x45c8c9[_0xfcb8('0x50')],{'showHidden':![],'depth':null}));}break;case _0xfcb8('0xcc'):if(_0x30537a==_0xfcb8('0xcd')){return _0x2f9a6e[_0xfcb8('0x58')]({'read':!![]});}else{logger['error'](_0xfcb8('0x20'),_0xfcb8('0x28'),'bandwidth',util[_0xfcb8('0xc3')](_0x45c8c9[_0xfcb8('0x50')],{'showHidden':![],'depth':null}));}break;case _0xfcb8('0x89'):if(_0x30537a===_0xfcb8('0xce')||_0x30537a==='ACCEPTD'){return _0x2f9a6e[_0xfcb8('0x58')]({'read':!![]});}else{logger[_0xfcb8('0x22')](_0xfcb8('0x20'),'status',_0xfcb8('0x89'),util[_0xfcb8('0xc3')](_0x45c8c9['body'],{'showHidden':![],'depth':null}));}break;}return _0x2f9a6e;}})['then'](respondWithResult(_0x81e90b,null))[_0xfcb8('0x26')](handleError(_0x81e90b,null));};exports['statusGet']=function(_0x523237,_0x2878d0,_0x233327){var _0x2dac6d,_0x15f500,_0x59d6ff;return db[_0xfcb8('0x4a')]['find']({'where':{'id':_0x523237[_0xfcb8('0x4d')]['id']}})['then'](handleEntityNotFound(_0x2878d0,null))[_0xfcb8('0x1d')](function(_0x374aae){if(_0x374aae){_0x59d6ff=_0x374aae;logger['debug'](_0xfcb8('0x20'),_0xfcb8('0x28'),'received\x20delivery\x20report\x20from',_0x374aae[_0xfcb8('0x74')],util[_0xfcb8('0xc3')](_0x523237[_0xfcb8('0x3b')],{'showHidden':![],'depth':null}));switch(_0x374aae['type']){case'csc':if(_0x523237[_0xfcb8('0x3b')]['message-id']&&_0x523237['query']['state']){_0x15f500=_0x523237['query']['state'];return db[_0xfcb8('0x9e')][_0xfcb8('0x54')]({'where':{'messageId':_0x523237[_0xfcb8('0x3b')][_0xfcb8('0xcf')]}});}break;}}})[_0xfcb8('0x1d')](handleEntityNotFound(_0x2878d0,null))[_0xfcb8('0x1d')](function(_0x3e68d5){if(_0x3e68d5){_0x2dac6d=_0x3e68d5;switch(_0x59d6ff[_0xfcb8('0x74')]){case _0xfcb8('0xd0'):if(_0x15f500==='2'||_0x15f500==='6'){return _0x2dac6d[_0xfcb8('0x58')]({'read':!![]});}else{logger[_0xfcb8('0x22')]('SmsAccount,\x20%s,\x20%s,\x20%s','status',_0xfcb8('0xd0'),util[_0xfcb8('0xc3')](_0x523237['query'],{'showHidden':![],'depth':null}));};break;}return _0x2dac6d;}})['then'](respondWithResult(_0x2878d0,null))[_0xfcb8('0x26')](handleError(_0x2878d0,null));};exports[_0xfcb8('0xd1')]=function(_0x4fe9b2,_0x366f45,_0x1f3b4b){return db['SmsAccount']['find']({'where':{'id':_0x4fe9b2[_0xfcb8('0x4d')]['id']}})['then'](handleEntityNotFound(_0x366f45,null))['then'](function(_0x310315){if(_0x310315){return _0x310315[_0xfcb8('0xd1')](_0x4fe9b2[_0xfcb8('0x50')][_0xfcb8('0x60')],_[_0xfcb8('0xd2')](_0x4fe9b2[_0xfcb8('0x50')],[_0xfcb8('0x60'),'id'])||{})['spread'](function(_0x4f232d){for(var _0x11e2e0=0x0;_0x11e2e0<_0x4fe9b2['body']['ids'][_0xfcb8('0x4e')];_0x11e2e0+=0x1){socket[_0xfcb8('0xd3')](_0xfcb8('0xd4'),{'UserId':Number(_0x4fe9b2[_0xfcb8('0x50')][_0xfcb8('0x60')][_0x11e2e0]),'SmsAccountId':Number(_0x4fe9b2[_0xfcb8('0x4d')]['id'])});}return _0x4f232d;});}})[_0xfcb8('0x1d')](respondWithResult(_0x366f45,null))[_0xfcb8('0x26')](handleError(_0x366f45,null));};exports[_0xfcb8('0xd5')]=function(_0x331711,_0x1a3571,_0x3ec732){return db[_0xfcb8('0x4a')][_0xfcb8('0x54')]({'where':{'id':_0x331711[_0xfcb8('0x4d')]['id']}})[_0xfcb8('0x1d')](handleEntityNotFound(_0x1a3571,null))[_0xfcb8('0x1d')](function(_0x36b711){if(_0x36b711){return _0x36b711[_0xfcb8('0xd5')](_0x331711[_0xfcb8('0x3b')]['ids'])[_0xfcb8('0x1d')](function(){if(_[_0xfcb8('0xd6')](_0x331711[_0xfcb8('0x3b')][_0xfcb8('0x60')])){for(var _0x1350dc=0x0;_0x1350dc<_0x331711['query']['ids'][_0xfcb8('0x4e')];_0x1350dc+=0x1){socket['emit']('userSmsAccount:remove',{'UserId':Number(_0x331711[_0xfcb8('0x3b')][_0xfcb8('0x60')][_0x1350dc]),'SmsAccountId':Number(_0x331711['params']['id'])});}}else{socket['emit'](_0xfcb8('0xd7'),{'UserId':Number(_0x331711[_0xfcb8('0x3b')]['ids']),'SmsAccountId':Number(_0x331711[_0xfcb8('0x4d')]['id'])});}});}})[_0xfcb8('0x1d')](respondWithStatusCode(_0x1a3571,null))[_0xfcb8('0x26')](handleError(_0x1a3571,null));};exports['getAgents']=function(_0x1ad67a,_0x37eb8b,_0x37e47c){var _0x197305={};var _0x867df4={};var _0x309fb4;var _0x59e3c5;return db[_0xfcb8('0x4a')][_0xfcb8('0xb8')]({'where':{'id':_0x1ad67a[_0xfcb8('0x4d')]['id']}})[_0xfcb8('0x1d')](handleEntityNotFound(_0x37eb8b,null))[_0xfcb8('0x1d')](function(_0x5a7b44){if(_0x5a7b44){_0x309fb4=_0x5a7b44;_0x867df4[_0xfcb8('0x3a')]=_[_0xfcb8('0x3c')](db[_0xfcb8('0xa2')][_0xfcb8('0x37')]);_0x867df4[_0xfcb8('0x3b')]=_[_0xfcb8('0x3c')](_0x1ad67a[_0xfcb8('0x3b')]);_0x867df4[_0xfcb8('0x42')]=_['intersection'](_0x867df4[_0xfcb8('0x3a')],_0x867df4[_0xfcb8('0x3b')]);_0x197305['attributes']=_['intersection'](_0x867df4[_0xfcb8('0x3a')],qs[_0xfcb8('0x3f')](_0x1ad67a[_0xfcb8('0x3b')][_0xfcb8('0x3f')]));_0x197305['attributes']=_0x197305[_0xfcb8('0x3e')]['length']?_0x197305[_0xfcb8('0x3e')]:_0x867df4[_0xfcb8('0x3a')];_0x197305[_0xfcb8('0x64')]=qs[_0xfcb8('0x41')](_0x1ad67a[_0xfcb8('0x3b')][_0xfcb8('0x41')]);_0x197305[_0xfcb8('0x45')]=qs[_0xfcb8('0x42')](_['pick'](_0x1ad67a[_0xfcb8('0x3b')],_0x867df4[_0xfcb8('0x42')]));if(_0x1ad67a[_0xfcb8('0x3b')]['filter']){_0x197305[_0xfcb8('0x45')]=_[_0xfcb8('0x46')](_0x197305[_0xfcb8('0x45')],{'$or':_['map'](_0x197305[_0xfcb8('0x3e')],function(_0x3676f6){var _0xcba341={};_0xcba341[_0x3676f6]={'$like':'%'+_0x1ad67a[_0xfcb8('0x3b')][_0xfcb8('0x44')]+'%'};return _0xcba341;})});}_0x197305=_[_0xfcb8('0x46')]({},_0x197305,_0x1ad67a[_0xfcb8('0x49')]);return _0x309fb4[_0xfcb8('0xd8')](_0x197305);}})[_0xfcb8('0x1d')](function(_0x4d9dc8){if(_0x4d9dc8){_0x59e3c5=_0x4d9dc8[_0xfcb8('0x4e')];if(!_0x1ad67a[_0xfcb8('0x3b')][_0xfcb8('0x40')]('nolimit')){_0x197305['limit']=qs[_0xfcb8('0x2b')](_0x1ad67a[_0xfcb8('0x3b')]['limit']);_0x197305[_0xfcb8('0x2a')]=qs[_0xfcb8('0x2a')](_0x1ad67a[_0xfcb8('0x3b')]['offset']);}return _0x309fb4[_0xfcb8('0xd8')](_0x197305);}})['then'](function(_0x102e18){if(_0x102e18){return _0x102e18?{'count':_0x59e3c5,'rows':_0x102e18}:null;}})[_0xfcb8('0x1d')](respondWithResult(_0x37eb8b,null))['catch'](handleError(_0x37eb8b,null));}; \ No newline at end of file diff --git a/server/api/smsAccount/smsAccount.events.js b/server/api/smsAccount/smsAccount.events.js index 0194adf..f1a79c9 100644 --- a/server/api/smsAccount/smsAccount.events.js +++ b/server/api/smsAccount/smsAccount.events.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x0fd7=['update','emit','hasOwnProperty','exports','events','../../mysqldb','SmsAccount','save'];(function(_0x53c772,_0xe3fd2d){var _0xf03789=function(_0x3534e7){while(--_0x3534e7){_0x53c772['push'](_0x53c772['shift']());}};_0xf03789(++_0xe3fd2d);}(_0x0fd7,0x16c));var _0x70fd=function(_0x4eae11,_0x3daa84){_0x4eae11=_0x4eae11-0x0;var _0x5199d8=_0x0fd7[_0x4eae11];return _0x5199d8;};'use strict';var EventEmitter=require(_0x70fd('0x0'));var SmsAccount=require(_0x70fd('0x1'))['db'][_0x70fd('0x2')];var SmsAccountEvents=new EventEmitter();SmsAccountEvents['setMaxListeners'](0x0);var events={'afterCreate':_0x70fd('0x3'),'afterUpdate':_0x70fd('0x4'),'afterDestroy':'remove'};function emitEvent(_0x153260){return function(_0x50061c,_0xbfc510,_0x36359e){SmsAccountEvents['emit'](_0x153260+':'+_0x50061c['id'],_0x50061c);SmsAccountEvents[_0x70fd('0x5')](_0x153260,_0x50061c);_0x36359e(null);};}for(var e in events){if(events[_0x70fd('0x6')](e)){var event=events[e];SmsAccount['hook'](e,emitEvent(event));}}module[_0x70fd('0x7')]=SmsAccountEvents; \ No newline at end of file +var _0x283c=['hook','exports','events','SmsAccount','setMaxListeners','save','update','remove','hasOwnProperty'];(function(_0x376db5,_0x2b8874){var _0x304c17=function(_0x2dd9ba){while(--_0x2dd9ba){_0x376db5['push'](_0x376db5['shift']());}};_0x304c17(++_0x2b8874);}(_0x283c,0x1cd));var _0xc283=function(_0x18b8ed,_0x56789e){_0x18b8ed=_0x18b8ed-0x0;var _0x8f4061=_0x283c[_0x18b8ed];return _0x8f4061;};'use strict';var EventEmitter=require(_0xc283('0x0'));var SmsAccount=require('../../mysqldb')['db'][_0xc283('0x1')];var SmsAccountEvents=new EventEmitter();SmsAccountEvents[_0xc283('0x2')](0x0);var events={'afterCreate':_0xc283('0x3'),'afterUpdate':_0xc283('0x4'),'afterDestroy':_0xc283('0x5')};function emitEvent(_0x2eff31){return function(_0xebc95c,_0x512306,_0x24755f){SmsAccountEvents['emit'](_0x2eff31+':'+_0xebc95c['id'],_0xebc95c);SmsAccountEvents['emit'](_0x2eff31,_0xebc95c);_0x24755f(null);};}for(var e in events){if(events[_0xc283('0x6')](e)){var event=events[e];SmsAccount[_0xc283('0x7')](e,emitEvent(event));}}module[_0xc283('0x8')]=SmsAccountEvents; \ No newline at end of file diff --git a/server/api/smsAccount/smsAccount.model.js b/server/api/smsAccount/smsAccount.model.js index ddded98..c308c47 100644 --- a/server/api/smsAccount/smsAccount.model.js +++ b/server/api/smsAccount/smsAccount.model.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x5dc3=['../../config/environment','./smsAccount.attributes','exports','SmsAccount','lodash','../../config/logger','moment','request-promise','path','rimraf'];(function(_0x12b95a,_0x38c1a2){var _0x52eb24=function(_0x135d40){while(--_0x135d40){_0x12b95a['push'](_0x12b95a['shift']());}};_0x52eb24(++_0x38c1a2);}(_0x5dc3,0x1c6));var _0x35dc=function(_0x47a756,_0xc38065){_0x47a756=_0x47a756-0x0;var _0x4db04c=_0x5dc3[_0x47a756];return _0x4db04c;};'use strict';var _=require(_0x35dc('0x0'));var util=require('util');var logger=require(_0x35dc('0x1'))('api');var moment=require(_0x35dc('0x2'));var BPromise=require('bluebird');var rp=require(_0x35dc('0x3'));var fs=require('fs');var path=require(_0x35dc('0x4'));var rimraf=require(_0x35dc('0x5'));var config=require(_0x35dc('0x6'));var attributes=require(_0x35dc('0x7'));module[_0x35dc('0x8')]=function(_0x3d243c,_0xa1750a){return _0x3d243c['define'](_0x35dc('0x9'),attributes,{'tableName':'sms_accounts','paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file +var _0x2c84=['../../config/environment','./smsAccount.attributes','exports','define','SmsAccount','sms_accounts','util','api','moment','request-promise','path','rimraf'];(function(_0x16b9ed,_0x56517a){var _0x66b1f8=function(_0x1c883){while(--_0x1c883){_0x16b9ed['push'](_0x16b9ed['shift']());}};_0x66b1f8(++_0x56517a);}(_0x2c84,0x132));var _0x42c8=function(_0x1facfa,_0x1acf7d){_0x1facfa=_0x1facfa-0x0;var _0x9ec701=_0x2c84[_0x1facfa];return _0x9ec701;};'use strict';var _=require('lodash');var util=require(_0x42c8('0x0'));var logger=require('../../config/logger')(_0x42c8('0x1'));var moment=require(_0x42c8('0x2'));var BPromise=require('bluebird');var rp=require(_0x42c8('0x3'));var fs=require('fs');var path=require(_0x42c8('0x4'));var rimraf=require(_0x42c8('0x5'));var config=require(_0x42c8('0x6'));var attributes=require(_0x42c8('0x7'));module[_0x42c8('0x8')]=function(_0x508b99,_0x1b2c17){return _0x508b99[_0x42c8('0x9')](_0x42c8('0xa'),attributes,{'tableName':_0x42c8('0xb'),'paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file diff --git a/server/api/smsAccount/smsAccount.rpc.js b/server/api/smsAccount/smsAccount.rpc.js index 294c825..2430f03 100644 --- a/server/api/smsAccount/smsAccount.rpc.js +++ b/server/api/smsAccount/smsAccount.rpc.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x6262=['stringify','error','code','message','result','catch','ShowSmsAccount','find','options','attributes','include','model','map','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','http','redis','localhost','socket.io-emitter','./smsAccount.socket','then','info','SmsAccount,\x20%s,\x20%s','debug','SmsAccount,\x20%s,\x20%s,\x20%s','request\x20sent'];(function(_0x197686,_0x448694){var _0x5f3a35=function(_0x4b74ca){while(--_0x4b74ca){_0x197686['push'](_0x197686['shift']());}};_0x5f3a35(++_0x448694);}(_0x6262,0x1a5));var _0x2626=function(_0x206487,_0x28eec1){_0x206487=_0x206487-0x0;var _0x2714c7=_0x6262[_0x206487];return _0x2714c7;};'use strict';var _=require('lodash');var util=require('util');var moment=require(_0x2626('0x0'));var BPromise=require(_0x2626('0x1'));var rs=require(_0x2626('0x2'));var fs=require('fs');var Redis=require(_0x2626('0x3'));var db=require(_0x2626('0x4'))['db'];var utils=require(_0x2626('0x5'));var logger=require(_0x2626('0x6'))(_0x2626('0x7'));var config=require(_0x2626('0x8'));var jayson=require(_0x2626('0x9'));var client=jayson['client'][_0x2626('0xa')]({'port':0x232a});config[_0x2626('0xb')]=_['defaults'](config[_0x2626('0xb')],{'host':_0x2626('0xc'),'port':0x18eb});var socket=require(_0x2626('0xd'))(new Redis(config[_0x2626('0xb')]));require(_0x2626('0xe'))['register'](socket);function respondWithRpcPromise(_0x2202cc,_0x17c6b2,_0x11842f){return new BPromise(function(_0x5061f1,_0x5ace67){return client['request'](_0x2202cc,_0x11842f)[_0x2626('0xf')](function(_0x1fc6e9){logger[_0x2626('0x10')](_0x2626('0x11'),_0x17c6b2,'request\x20sent');logger[_0x2626('0x12')](_0x2626('0x13'),_0x17c6b2,_0x2626('0x14'),JSON[_0x2626('0x15')](_0x1fc6e9));if(_0x1fc6e9[_0x2626('0x16')]){if(_0x1fc6e9[_0x2626('0x16')][_0x2626('0x17')]===0x1f4){logger[_0x2626('0x16')](_0x2626('0x11'),_0x17c6b2,_0x1fc6e9[_0x2626('0x16')][_0x2626('0x18')]);return _0x5ace67(_0x1fc6e9['error']['message']);}logger[_0x2626('0x16')]('SmsAccount,\x20%s,\x20%s',_0x17c6b2,_0x1fc6e9[_0x2626('0x16')][_0x2626('0x18')]);return _0x5061f1(_0x1fc6e9[_0x2626('0x16')][_0x2626('0x18')]);}else{logger[_0x2626('0x10')](_0x2626('0x11'),_0x17c6b2,_0x2626('0x14'));_0x5061f1(_0x1fc6e9[_0x2626('0x19')][_0x2626('0x18')]);}})[_0x2626('0x1a')](function(_0x2c6bd4){logger[_0x2626('0x16')](_0x2626('0x11'),_0x17c6b2,_0x2c6bd4);_0x5ace67(_0x2c6bd4);});});}exports[_0x2626('0x1b')]=function(_0x809e80){var _0x5437f8=this;return new Promise(function(_0x4f5eb6,_0x3c6af2){return db['SmsAccount'][_0x2626('0x1c')]({'raw':_0x809e80[_0x2626('0x1d')]?_0x809e80[_0x2626('0x1d')]['raw']===undefined?!![]:![]:!![],'where':_0x809e80[_0x2626('0x1d')]?_0x809e80[_0x2626('0x1d')]['where']||null:null,'attributes':_0x809e80[_0x2626('0x1d')]?_0x809e80[_0x2626('0x1d')][_0x2626('0x1e')]||null:null,'include':_0x809e80[_0x2626('0x1d')]?_0x809e80[_0x2626('0x1d')][_0x2626('0x1f')]?_['map'](_0x809e80[_0x2626('0x1d')][_0x2626('0x1f')],function(_0x3274e5){return{'model':db[_0x3274e5[_0x2626('0x20')]],'as':_0x3274e5['as'],'attributes':_0x3274e5['attributes'],'include':_0x3274e5[_0x2626('0x1f')]?_[_0x2626('0x21')](_0x3274e5[_0x2626('0x1f')],function(_0x4c486d){return{'model':db[_0x4c486d['model']],'as':_0x4c486d['as'],'attributes':_0x4c486d[_0x2626('0x1e')],'include':_0x4c486d[_0x2626('0x1f')]?_[_0x2626('0x21')](_0x4c486d[_0x2626('0x1f')],function(_0x7e6bef){return{'model':db[_0x7e6bef[_0x2626('0x20')]],'as':_0x7e6bef['as'],'attributes':_0x7e6bef[_0x2626('0x1e')]};}):[]};}):[]};}):[]:[]})[_0x2626('0xf')](function(_0x480bc5){logger[_0x2626('0x10')](_0x2626('0x1b'),_0x809e80);logger[_0x2626('0x12')]('ShowSmsAccount',_0x809e80,JSON['stringify'](_0x480bc5));_0x4f5eb6(_0x480bc5);})[_0x2626('0x1a')](function(_0x241061){logger[_0x2626('0x16')](_0x2626('0x1b'),_0x241061[_0x2626('0x18')],_0x809e80);_0x3c6af2(_0x5437f8[_0x2626('0x16')](0x1f4,_0x241061['message']));});});}; \ No newline at end of file +var _0x741a=['stringify','lodash','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','redis','defaults','localhost','./smsAccount.socket','register','then','info','SmsAccount,\x20%s,\x20%s','SmsAccount,\x20%s,\x20%s,\x20%s','request\x20sent','error','code','message','catch','SmsAccount','find','options','raw','where','attributes','include','map','model','ShowSmsAccount','debug'];(function(_0x3bc051,_0x3acfb6){var _0x1ce502=function(_0x4aad7c){while(--_0x4aad7c){_0x3bc051['push'](_0x3bc051['shift']());}};_0x1ce502(++_0x3acfb6);}(_0x741a,0x1ae));var _0xa741=function(_0x1865f3,_0x5154be){_0x1865f3=_0x1865f3-0x0;var _0xb69290=_0x741a[_0x1865f3];return _0xb69290;};'use strict';var _=require(_0xa741('0x0'));var util=require('util');var moment=require(_0xa741('0x1'));var BPromise=require(_0xa741('0x2'));var rs=require(_0xa741('0x3'));var fs=require('fs');var Redis=require(_0xa741('0x4'));var db=require(_0xa741('0x5'))['db'];var utils=require(_0xa741('0x6'));var logger=require(_0xa741('0x7'))(_0xa741('0x8'));var config=require(_0xa741('0x9'));var jayson=require(_0xa741('0xa'));var client=jayson[_0xa741('0xb')][_0xa741('0xc')]({'port':0x232a});config[_0xa741('0xd')]=_[_0xa741('0xe')](config[_0xa741('0xd')],{'host':_0xa741('0xf'),'port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config[_0xa741('0xd')]));require(_0xa741('0x10'))[_0xa741('0x11')](socket);function respondWithRpcPromise(_0x5d9269,_0x106628,_0x38456f){return new BPromise(function(_0x30b04e,_0x1e5b26){return client['request'](_0x5d9269,_0x38456f)[_0xa741('0x12')](function(_0x1c66e0){logger[_0xa741('0x13')](_0xa741('0x14'),_0x106628,'request\x20sent');logger['debug'](_0xa741('0x15'),_0x106628,_0xa741('0x16'),JSON['stringify'](_0x1c66e0));if(_0x1c66e0[_0xa741('0x17')]){if(_0x1c66e0[_0xa741('0x17')][_0xa741('0x18')]===0x1f4){logger[_0xa741('0x17')](_0xa741('0x14'),_0x106628,_0x1c66e0['error'][_0xa741('0x19')]);return _0x1e5b26(_0x1c66e0[_0xa741('0x17')][_0xa741('0x19')]);}logger[_0xa741('0x17')](_0xa741('0x14'),_0x106628,_0x1c66e0[_0xa741('0x17')][_0xa741('0x19')]);return _0x30b04e(_0x1c66e0[_0xa741('0x17')][_0xa741('0x19')]);}else{logger[_0xa741('0x13')](_0xa741('0x14'),_0x106628,_0xa741('0x16'));_0x30b04e(_0x1c66e0['result'][_0xa741('0x19')]);}})[_0xa741('0x1a')](function(_0x1d2dcb){logger['error']('SmsAccount,\x20%s,\x20%s',_0x106628,_0x1d2dcb);_0x1e5b26(_0x1d2dcb);});});}exports['ShowSmsAccount']=function(_0x53df2b){var _0x2e0496=this;return new Promise(function(_0x2d572d,_0x3bd739){return db[_0xa741('0x1b')][_0xa741('0x1c')]({'raw':_0x53df2b[_0xa741('0x1d')]?_0x53df2b[_0xa741('0x1d')][_0xa741('0x1e')]===undefined?!![]:![]:!![],'where':_0x53df2b[_0xa741('0x1d')]?_0x53df2b[_0xa741('0x1d')][_0xa741('0x1f')]||null:null,'attributes':_0x53df2b[_0xa741('0x1d')]?_0x53df2b['options'][_0xa741('0x20')]||null:null,'include':_0x53df2b['options']?_0x53df2b[_0xa741('0x1d')][_0xa741('0x21')]?_['map'](_0x53df2b[_0xa741('0x1d')]['include'],function(_0x4f8b77){return{'model':db[_0x4f8b77['model']],'as':_0x4f8b77['as'],'attributes':_0x4f8b77[_0xa741('0x20')],'include':_0x4f8b77['include']?_[_0xa741('0x22')](_0x4f8b77[_0xa741('0x21')],function(_0x1aa689){return{'model':db[_0x1aa689[_0xa741('0x23')]],'as':_0x1aa689['as'],'attributes':_0x1aa689[_0xa741('0x20')],'include':_0x1aa689[_0xa741('0x21')]?_[_0xa741('0x22')](_0x1aa689[_0xa741('0x21')],function(_0x5ac9b5){return{'model':db[_0x5ac9b5[_0xa741('0x23')]],'as':_0x5ac9b5['as'],'attributes':_0x5ac9b5[_0xa741('0x20')]};}):[]};}):[]};}):[]:[]})[_0xa741('0x12')](function(_0x1ad619){logger[_0xa741('0x13')](_0xa741('0x24'),_0x53df2b);logger[_0xa741('0x25')](_0xa741('0x24'),_0x53df2b,JSON[_0xa741('0x26')](_0x1ad619));_0x2d572d(_0x1ad619);})[_0xa741('0x1a')](function(_0x489b0c){logger['error'](_0xa741('0x24'),_0x489b0c[_0xa741('0x19')],_0x53df2b);_0x3bd739(_0x2e0496[_0xa741('0x17')](0x1f4,_0x489b0c[_0xa741('0x19')]));});});}; \ No newline at end of file diff --git a/server/api/smsAccount/smsAccount.socket.js b/server/api/smsAccount/smsAccount.socket.js index 850ecbe..43b6756 100644 --- a/server/api/smsAccount/smsAccount.socket.js +++ b/server/api/smsAccount/smsAccount.socket.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xa9e0=['register','length','smsAccount:','./smsAccount.events','save','remove','emit','removeListener'];(function(_0x42cae2,_0x284ef8){var _0x5f256f=function(_0x41abc8){while(--_0x41abc8){_0x42cae2['push'](_0x42cae2['shift']());}};_0x5f256f(++_0x284ef8);}(_0xa9e0,0x123));var _0x0a9e=function(_0x5b644e,_0x2e5e07){_0x5b644e=_0x5b644e-0x0;var _0x49c6bf=_0xa9e0[_0x5b644e];return _0x49c6bf;};'use strict';var SmsAccountEvents=require(_0x0a9e('0x0'));var events=[_0x0a9e('0x1'),_0x0a9e('0x2'),'update'];function createListener(_0x550fbc,_0x18d5c9){return function(_0x4ce2f1){_0x18d5c9[_0x0a9e('0x3')](_0x550fbc,_0x4ce2f1);};}function removeListener(_0x432180,_0x2ab90b){return function(){SmsAccountEvents[_0x0a9e('0x4')](_0x432180,_0x2ab90b);};}exports[_0x0a9e('0x5')]=function(_0x57b080){for(var _0x219af0=0x0,_0x441e3a=events[_0x0a9e('0x6')];_0x219af0<_0x441e3a;_0x219af0++){var _0x5f41ea=events[_0x219af0];var _0x503809=createListener(_0x0a9e('0x7')+_0x5f41ea,_0x57b080);SmsAccountEvents['on'](_0x5f41ea,_0x503809);}}; \ No newline at end of file +var _0xa9e0=['register','length','smsAccount:','./smsAccount.events','save','remove','emit','removeListener'];(function(_0x40a045,_0x516f0e){var _0x1a687c=function(_0x48c9fe){while(--_0x48c9fe){_0x40a045['push'](_0x40a045['shift']());}};_0x1a687c(++_0x516f0e);}(_0xa9e0,0x123));var _0x0a9e=function(_0x220dbb,_0x99328d){_0x220dbb=_0x220dbb-0x0;var _0x2b77de=_0xa9e0[_0x220dbb];return _0x2b77de;};'use strict';var SmsAccountEvents=require(_0x0a9e('0x0'));var events=[_0x0a9e('0x1'),_0x0a9e('0x2'),'update'];function createListener(_0x550fbc,_0x18d5c9){return function(_0x4ce2f1){_0x18d5c9[_0x0a9e('0x3')](_0x550fbc,_0x4ce2f1);};}function removeListener(_0x432180,_0x2ab90b){return function(){SmsAccountEvents[_0x0a9e('0x4')](_0x432180,_0x2ab90b);};}exports[_0x0a9e('0x5')]=function(_0x57b080){for(var _0x219af0=0x0,_0x441e3a=events[_0x0a9e('0x6')];_0x219af0<_0x441e3a;_0x219af0++){var _0x5f41ea=events[_0x219af0];var _0x503809=createListener(_0x0a9e('0x7')+_0x5f41ea,_0x57b080);SmsAccountEvents['on'](_0x5f41ea,_0x503809);}}; \ No newline at end of file diff --git a/server/api/smsApplication/index.js b/server/api/smsApplication/index.js index dceb398..9c582a3 100644 --- a/server/api/smsApplication/index.js +++ b/server/api/smsApplication/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x7217=['Router','fs-extra','../../config/environment','./smsApplication.controller','get','isAuthenticated','index','/:id','show','post','create','put','delete','destroy','exports','multer','path','connect-timeout','express'];(function(_0x45c1aa,_0x43c332){var _0x5653cd=function(_0x3a0ecc){while(--_0x3a0ecc){_0x45c1aa['push'](_0x45c1aa['shift']());}};_0x5653cd(++_0x43c332);}(_0x7217,0x19e));var _0x7721=function(_0x2b10c6,_0x185590){_0x2b10c6=_0x2b10c6-0x0;var _0x3789d2=_0x7217[_0x2b10c6];return _0x3789d2;};'use strict';var multer=require(_0x7721('0x0'));var util=require('util');var path=require(_0x7721('0x1'));var timeout=require(_0x7721('0x2'));var express=require(_0x7721('0x3'));var router=express[_0x7721('0x4')]();var fs_extra=require(_0x7721('0x5'));var auth=require('../../components/auth/service');var interaction=require('../../components/interaction/service');var config=require(_0x7721('0x6'));var controller=require(_0x7721('0x7'));router[_0x7721('0x8')]('/',auth[_0x7721('0x9')](),controller[_0x7721('0xa')]);router[_0x7721('0x8')](_0x7721('0xb'),auth[_0x7721('0x9')](),controller[_0x7721('0xc')]);router[_0x7721('0xd')]('/',auth[_0x7721('0x9')](),controller[_0x7721('0xe')]);router[_0x7721('0xf')](_0x7721('0xb'),auth[_0x7721('0x9')](),controller['update']);router[_0x7721('0x10')](_0x7721('0xb'),auth[_0x7721('0x9')](),controller[_0x7721('0x11')]);module[_0x7721('0x12')]=router; \ No newline at end of file +var _0x008c=['exports','multer','util','path','connect-timeout','express','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','./smsApplication.controller','get','isAuthenticated','index','post','put','/:id'];(function(_0x557f1d,_0x245ba5){var _0x56a7ef=function(_0x36b3a0){while(--_0x36b3a0){_0x557f1d['push'](_0x557f1d['shift']());}};_0x56a7ef(++_0x245ba5);}(_0x008c,0x188));var _0xc008=function(_0x176259,_0x30e46f){_0x176259=_0x176259-0x0;var _0x48dc40=_0x008c[_0x176259];return _0x48dc40;};'use strict';var multer=require(_0xc008('0x0'));var util=require(_0xc008('0x1'));var path=require(_0xc008('0x2'));var timeout=require(_0xc008('0x3'));var express=require(_0xc008('0x4'));var router=express['Router']();var fs_extra=require(_0xc008('0x5'));var auth=require(_0xc008('0x6'));var interaction=require(_0xc008('0x7'));var config=require(_0xc008('0x8'));var controller=require(_0xc008('0x9'));router[_0xc008('0xa')]('/',auth[_0xc008('0xb')](),controller[_0xc008('0xc')]);router[_0xc008('0xa')]('/:id',auth[_0xc008('0xb')](),controller['show']);router[_0xc008('0xd')]('/',auth['isAuthenticated'](),controller['create']);router[_0xc008('0xe')](_0xc008('0xf'),auth['isAuthenticated'](),controller['update']);router['delete'](_0xc008('0xf'),auth[_0xc008('0xb')](),controller['destroy']);module[_0xc008('0x10')]=router; \ No newline at end of file diff --git a/server/api/smsApplication/smsApplication.attributes.js b/server/api/smsApplication/smsApplication.attributes.js index 8adeadc..ff49a45 100644 --- a/server/api/smsApplication/smsApplication.attributes.js +++ b/server/api/smsApplication/smsApplication.attributes.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xaddc=['exports','INTEGER','STRING','noop','TEXT','*,*,*,*','sequelize'];(function(_0x321bb2,_0x202794){var _0x9c12ed=function(_0x263dd3){while(--_0x263dd3){_0x321bb2['push'](_0x321bb2['shift']());}};_0x9c12ed(++_0x202794);}(_0xaddc,0x125));var _0xcadd=function(_0x5ec776,_0x467739){_0x5ec776=_0x5ec776-0x0;var _0x2f21d0=_0xaddc[_0x5ec776];return _0x2f21d0;};'use strict';var Sequelize=require(_0xcadd('0x0'));module[_0xcadd('0x1')]={'priority':{'type':Sequelize[_0xcadd('0x2')],'allowNull':![]},'app':{'type':Sequelize[_0xcadd('0x3')],'allowNull':![],'defaultValue':_0xcadd('0x4')},'appdata':{'type':Sequelize[_0xcadd('0x5')]()},'description':{'type':Sequelize[_0xcadd('0x3')]},'interval':{'type':Sequelize[_0xcadd('0x3')],'defaultValue':_0xcadd('0x6')}}; \ No newline at end of file +var _0x396f=['noop','*,*,*,*','sequelize','INTEGER','STRING'];(function(_0x14a341,_0x83c18e){var _0x35ee1a=function(_0x1ec094){while(--_0x1ec094){_0x14a341['push'](_0x14a341['shift']());}};_0x35ee1a(++_0x83c18e);}(_0x396f,0x160));var _0xf396=function(_0x4dd645,_0x3719ec){_0x4dd645=_0x4dd645-0x0;var _0x446cf1=_0x396f[_0x4dd645];return _0x446cf1;};'use strict';var Sequelize=require(_0xf396('0x0'));module['exports']={'priority':{'type':Sequelize[_0xf396('0x1')],'allowNull':![]},'app':{'type':Sequelize[_0xf396('0x2')],'allowNull':![],'defaultValue':_0xf396('0x3')},'appdata':{'type':Sequelize['TEXT']()},'description':{'type':Sequelize['STRING']},'interval':{'type':Sequelize[_0xf396('0x2')],'defaultValue':_0xf396('0x4')}}; \ No newline at end of file diff --git a/server/api/smsApplication/smsApplication.controller.js b/server/api/smsApplication/smsApplication.controller.js index 9e6651c..7166bd0 100644 --- a/server/api/smsApplication/smsApplication.controller.js +++ b/server/api/smsApplication/smsApplication.controller.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x50dd=['filters','pick','filter','merge','type','VIRTUAL','count','includeAll','findAll','rows','show','params','rawAttributes','include','options','catch','create','body','find','eml-format','rimraf','zip-dir','fast-json-patch','moment','mustache','util','path','sox','to-csv','ejs','fs-extra','crypto','jsforce','querystring','papaparse','../../components/auth/service','../../components/parsers/qs','../../config/logger','api','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','sendStatus','status','end','offset','undefined','set','Content-Range','json','reject','save','update','then','destroy','error','name','send','index','SmsApplication','fieldName','key','model','map','query','keys','attributes','intersection','fields','length','hasOwnProperty','nolimit','limit','order','sort','where'];(function(_0xaa4135,_0x161e20){var _0x2a5577=function(_0xc48fc6){while(--_0xc48fc6){_0xaa4135['push'](_0xaa4135['shift']());}};_0x2a5577(++_0x161e20);}(_0x50dd,0xfa));var _0xd50d=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0x50dd[_0x3dd15e];return _0x231fd0;};'use strict';var emlformat=require(_0xd50d('0x0'));var rimraf=require(_0xd50d('0x1'));var zipdir=require(_0xd50d('0x2'));var jsonpatch=require(_0xd50d('0x3'));var rp=require('request-promise');var moment=require(_0xd50d('0x4'));var BPromise=require('bluebird');var Mustache=require(_0xd50d('0x5'));var util=require(_0xd50d('0x6'));var path=require(_0xd50d('0x7'));var sox=require(_0xd50d('0x8'));var csv=require(_0xd50d('0x9'));var ejs=require(_0xd50d('0xa'));var fs=require('fs');var fs_extra=require(_0xd50d('0xb'));var _=require('lodash');var squel=require('squel');var crypto=require(_0xd50d('0xc'));var jsforce=require(_0xd50d('0xd'));var deskjs=require('desk.js');var toCsv=require(_0xd50d('0x9'));var querystring=require(_0xd50d('0xe'));var Papa=require(_0xd50d('0xf'));var Redis=require('ioredis');var authService=require(_0xd50d('0x10'));var qs=require(_0xd50d('0x11'));var as=require('../../components/parsers/advancedSearch');var hardwareService=require('../../config/license/hardware');var logger=require(_0xd50d('0x12'))(_0xd50d('0x13'));var utils=require(_0xd50d('0x14'));var config=require(_0xd50d('0x15'));var licenseUtil=require(_0xd50d('0x16'));var db=require(_0xd50d('0x17'))['db'];function respondWithStatusCode(_0x268ce5,_0x24be97){_0x24be97=_0x24be97||0xcc;return function(_0x151d56){if(_0x151d56){return _0x268ce5[_0xd50d('0x18')](_0x24be97);}return _0x268ce5[_0xd50d('0x19')](_0x24be97)[_0xd50d('0x1a')]();};}function respondWithResult(_0x4a7d4f,_0x4cf53b){_0x4cf53b=_0x4cf53b||0xc8;return function(_0x3082a7){if(_0x3082a7){return _0x4a7d4f[_0xd50d('0x19')](_0x4cf53b)['json'](_0x3082a7);}};}function respondWithFilteredResult(_0x39cd2c,_0x335e53){return function(_0x41f5da){if(_0x41f5da){var _0x338435=typeof _0x335e53[_0xd50d('0x1b')]===_0xd50d('0x1c')&&typeof _0x335e53['limit']==='undefined';var _0x42aa9a=_0x41f5da['count'];var _0x138ab9=_0x338435?0x0:_0x335e53[_0xd50d('0x1b')];var _0x36be6b=_0x338435?_0x41f5da['count']:_0x335e53['offset']+_0x335e53['limit'];var _0x8b161;if(_0x36be6b>=_0x42aa9a){_0x36be6b=_0x42aa9a;_0x8b161=0xc8;}else{_0x8b161=0xce;}_0x39cd2c[_0xd50d('0x19')](_0x8b161);return _0x39cd2c[_0xd50d('0x1d')](_0xd50d('0x1e'),_0x138ab9+'-'+_0x36be6b+'/'+_0x42aa9a)[_0xd50d('0x1f')](_0x41f5da);}return null;};}function patchUpdates(_0x17f203){return function(_0x3e488e){try{jsonpatch['apply'](_0x3e488e,_0x17f203,!![]);}catch(_0x5d9d37){return BPromise[_0xd50d('0x20')](_0x5d9d37);}return _0x3e488e[_0xd50d('0x21')]();};}function saveUpdates(_0x938f91,_0x1628ff){return function(_0x52e36a){if(_0x52e36a){return _0x52e36a[_0xd50d('0x22')](_0x938f91)[_0xd50d('0x23')](function(_0x2fb4e6){return _0x2fb4e6;});}return null;};}function removeEntity(_0x384b7b,_0x572880){return function(_0x1964ac){if(_0x1964ac){return _0x1964ac[_0xd50d('0x24')]()[_0xd50d('0x23')](function(){_0x384b7b[_0xd50d('0x19')](0xcc)['end']();});}};}function handleEntityNotFound(_0x55bc5e,_0x268c46){return function(_0x5917c5){if(!_0x5917c5){_0x55bc5e[_0xd50d('0x18')](0x194);}return _0x5917c5;};}function handleError(_0x3731ef,_0x596415){_0x596415=_0x596415||0x1f4;return function(_0x11faf0){logger[_0xd50d('0x25')](_0x11faf0['stack']);if(_0x11faf0['name']){delete _0x11faf0[_0xd50d('0x26')];}_0x3731ef['status'](_0x596415)[_0xd50d('0x27')](_0x11faf0);};}exports[_0xd50d('0x28')]=function(_0x537e05,_0x418fff){var _0x1e3885={},_0x150d36={},_0x5a3c36={'count':0x0,'rows':[]};var _0x3cda04=_['map'](db[_0xd50d('0x29')]['rawAttributes'],function(_0x22bf7f){return{'name':_0x22bf7f[_0xd50d('0x2a')],'type':_0x22bf7f['type'][_0xd50d('0x2b')]};});_0x150d36[_0xd50d('0x2c')]=_[_0xd50d('0x2d')](_0x3cda04,_0xd50d('0x26'));_0x150d36[_0xd50d('0x2e')]=_[_0xd50d('0x2f')](_0x537e05[_0xd50d('0x2e')]);_0x150d36['filters']=_['intersection'](_0x150d36[_0xd50d('0x2c')],_0x150d36[_0xd50d('0x2e')]);_0x1e3885[_0xd50d('0x30')]=_[_0xd50d('0x31')](_0x150d36[_0xd50d('0x2c')],qs['fields'](_0x537e05[_0xd50d('0x2e')][_0xd50d('0x32')]));_0x1e3885[_0xd50d('0x30')]=_0x1e3885[_0xd50d('0x30')][_0xd50d('0x33')]?_0x1e3885['attributes']:_0x150d36[_0xd50d('0x2c')];if(!_0x537e05[_0xd50d('0x2e')][_0xd50d('0x34')](_0xd50d('0x35'))){_0x1e3885['limit']=qs[_0xd50d('0x36')](_0x537e05['query'][_0xd50d('0x36')]);_0x1e3885['offset']=qs[_0xd50d('0x1b')](_0x537e05['query'][_0xd50d('0x1b')]);}_0x1e3885[_0xd50d('0x37')]=qs[_0xd50d('0x38')](_0x537e05['query'][_0xd50d('0x38')]);_0x1e3885[_0xd50d('0x39')]=qs[_0xd50d('0x3a')](_[_0xd50d('0x3b')](_0x537e05['query'],_0x150d36[_0xd50d('0x3a')]),_0x3cda04);if(_0x537e05[_0xd50d('0x2e')][_0xd50d('0x3c')]){_0x1e3885[_0xd50d('0x39')]=_[_0xd50d('0x3d')](_0x1e3885[_0xd50d('0x39')],{'$or':_['map'](_0x3cda04,function(_0x204585){if(_0x204585[_0xd50d('0x3e')]!==_0xd50d('0x3f')){var _0x578d63={};_0x578d63[_0x204585[_0xd50d('0x26')]]={'$like':'%'+_0x537e05[_0xd50d('0x2e')][_0xd50d('0x3c')]+'%'};return _0x578d63;}})});}_0x1e3885=_['merge']({},_0x1e3885,_0x537e05['options']);var _0x182385={'where':_0x1e3885[_0xd50d('0x39')]};return db['SmsApplication'][_0xd50d('0x40')](_0x182385)[_0xd50d('0x23')](function(_0x229bdd){_0x5a3c36[_0xd50d('0x40')]=_0x229bdd;if(_0x537e05[_0xd50d('0x2e')][_0xd50d('0x41')]){_0x1e3885['include']=[{'all':!![]}];}return db[_0xd50d('0x29')][_0xd50d('0x42')](_0x1e3885);})['then'](function(_0x19ca76){_0x5a3c36[_0xd50d('0x43')]=_0x19ca76;return _0x5a3c36;})[_0xd50d('0x23')](respondWithFilteredResult(_0x418fff,_0x1e3885))['catch'](handleError(_0x418fff,null));};exports[_0xd50d('0x44')]=function(_0x4cfc13,_0x59aa84){var _0x339550={'raw':!![],'where':{'id':_0x4cfc13[_0xd50d('0x45')]['id']}},_0x302807={};_0x302807[_0xd50d('0x2c')]=_[_0xd50d('0x2f')](db[_0xd50d('0x29')][_0xd50d('0x46')]);_0x302807[_0xd50d('0x2e')]=_['keys'](_0x4cfc13['query']);_0x302807[_0xd50d('0x3a')]=_[_0xd50d('0x31')](_0x302807['model'],_0x302807[_0xd50d('0x2e')]);_0x339550[_0xd50d('0x30')]=_['intersection'](_0x302807[_0xd50d('0x2c')],qs[_0xd50d('0x32')](_0x4cfc13[_0xd50d('0x2e')][_0xd50d('0x32')]));_0x339550[_0xd50d('0x30')]=_0x339550['attributes']['length']?_0x339550[_0xd50d('0x30')]:_0x302807[_0xd50d('0x2c')];if(_0x4cfc13[_0xd50d('0x2e')][_0xd50d('0x41')]){_0x339550[_0xd50d('0x47')]=[{'all':!![]}];}_0x339550=_[_0xd50d('0x3d')]({},_0x339550,_0x4cfc13[_0xd50d('0x48')]);return db[_0xd50d('0x29')]['find'](_0x339550)[_0xd50d('0x23')](handleEntityNotFound(_0x59aa84,null))['then'](respondWithResult(_0x59aa84,null))[_0xd50d('0x49')](handleError(_0x59aa84,null));};exports['create']=function(_0x5ce9d8,_0x168cb3){return db[_0xd50d('0x29')][_0xd50d('0x4a')](_0x5ce9d8[_0xd50d('0x4b')],{})[_0xd50d('0x23')](respondWithResult(_0x168cb3,0xc9))[_0xd50d('0x49')](handleError(_0x168cb3,null));};exports[_0xd50d('0x22')]=function(_0x57d67b,_0x5a5f2f){if(_0x57d67b[_0xd50d('0x4b')]['id']){delete _0x57d67b[_0xd50d('0x4b')]['id'];}return db['SmsApplication'][_0xd50d('0x4c')]({'where':{'id':_0x57d67b[_0xd50d('0x45')]['id']}})[_0xd50d('0x23')](handleEntityNotFound(_0x5a5f2f,null))['then'](saveUpdates(_0x57d67b['body'],null))[_0xd50d('0x23')](respondWithResult(_0x5a5f2f,null))[_0xd50d('0x49')](handleError(_0x5a5f2f,null));};exports[_0xd50d('0x24')]=function(_0x12f77d,_0x56aadd){return db[_0xd50d('0x29')][_0xd50d('0x4c')]({'where':{'id':_0x12f77d[_0xd50d('0x45')]['id']}})[_0xd50d('0x23')](handleEntityNotFound(_0x56aadd,null))[_0xd50d('0x23')](removeEntity(_0x56aadd,null))[_0xd50d('0x49')](handleError(_0x56aadd,null));}; \ No newline at end of file +var _0x677e=['fast-json-patch','request-promise','moment','bluebird','path','to-csv','ejs','fs-extra','lodash','squel','crypto','jsforce','desk.js','papaparse','ioredis','../../components/auth/service','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','status','end','json','undefined','limit','count','offset','set','Content-Range','apply','save','then','destroy','sendStatus','error','stack','name','send','map','SmsApplication','rawAttributes','type','model','query','keys','filters','intersection','fields','attributes','length','hasOwnProperty','nolimit','order','sort','where','pick','filter','merge','VIRTUAL','options','findAll','catch','show','params','includeAll','include','find','create','body','update','eml-format','rimraf'];(function(_0x142c51,_0x4ee79b){var _0xe52038=function(_0x36fc9e){while(--_0x36fc9e){_0x142c51['push'](_0x142c51['shift']());}};_0xe52038(++_0x4ee79b);}(_0x677e,0xe2));var _0xe677=function(_0x4a7631,_0x2c85b9){_0x4a7631=_0x4a7631-0x0;var _0x1a5a6f=_0x677e[_0x4a7631];return _0x1a5a6f;};'use strict';var emlformat=require(_0xe677('0x0'));var rimraf=require(_0xe677('0x1'));var zipdir=require('zip-dir');var jsonpatch=require(_0xe677('0x2'));var rp=require(_0xe677('0x3'));var moment=require(_0xe677('0x4'));var BPromise=require(_0xe677('0x5'));var Mustache=require('mustache');var util=require('util');var path=require(_0xe677('0x6'));var sox=require('sox');var csv=require(_0xe677('0x7'));var ejs=require(_0xe677('0x8'));var fs=require('fs');var fs_extra=require(_0xe677('0x9'));var _=require(_0xe677('0xa'));var squel=require(_0xe677('0xb'));var crypto=require(_0xe677('0xc'));var jsforce=require(_0xe677('0xd'));var deskjs=require(_0xe677('0xe'));var toCsv=require('to-csv');var querystring=require('querystring');var Papa=require(_0xe677('0xf'));var Redis=require(_0xe677('0x10'));var authService=require(_0xe677('0x11'));var qs=require('../../components/parsers/qs');var as=require(_0xe677('0x12'));var hardwareService=require(_0xe677('0x13'));var logger=require(_0xe677('0x14'))(_0xe677('0x15'));var utils=require(_0xe677('0x16'));var config=require(_0xe677('0x17'));var licenseUtil=require(_0xe677('0x18'));var db=require(_0xe677('0x19'))['db'];function respondWithStatusCode(_0x722446,_0x3114fa){_0x3114fa=_0x3114fa||0xcc;return function(_0x5246e7){if(_0x5246e7){return _0x722446['sendStatus'](_0x3114fa);}return _0x722446[_0xe677('0x1a')](_0x3114fa)[_0xe677('0x1b')]();};}function respondWithResult(_0x20ba68,_0x37496a){_0x37496a=_0x37496a||0xc8;return function(_0x121391){if(_0x121391){return _0x20ba68[_0xe677('0x1a')](_0x37496a)[_0xe677('0x1c')](_0x121391);}};}function respondWithFilteredResult(_0x285f61,_0x3d0c87){return function(_0x55c0ff){if(_0x55c0ff){var _0x4843b0=typeof _0x3d0c87['offset']===_0xe677('0x1d')&&typeof _0x3d0c87[_0xe677('0x1e')]===_0xe677('0x1d');var _0x122648=_0x55c0ff[_0xe677('0x1f')];var _0x5dcf38=_0x4843b0?0x0:_0x3d0c87[_0xe677('0x20')];var _0x224cc0=_0x4843b0?_0x55c0ff[_0xe677('0x1f')]:_0x3d0c87[_0xe677('0x20')]+_0x3d0c87['limit'];var _0xac27bf;if(_0x224cc0>=_0x122648){_0x224cc0=_0x122648;_0xac27bf=0xc8;}else{_0xac27bf=0xce;}_0x285f61[_0xe677('0x1a')](_0xac27bf);return _0x285f61[_0xe677('0x21')](_0xe677('0x22'),_0x5dcf38+'-'+_0x224cc0+'/'+_0x122648)[_0xe677('0x1c')](_0x55c0ff);}return null;};}function patchUpdates(_0x8662b9){return function(_0x20818e){try{jsonpatch[_0xe677('0x23')](_0x20818e,_0x8662b9,!![]);}catch(_0x37c796){return BPromise['reject'](_0x37c796);}return _0x20818e[_0xe677('0x24')]();};}function saveUpdates(_0x98acf1,_0xd82bbc){return function(_0x3e75a1){if(_0x3e75a1){return _0x3e75a1['update'](_0x98acf1)[_0xe677('0x25')](function(_0x2010e5){return _0x2010e5;});}return null;};}function removeEntity(_0x4f9c7a,_0x4392ab){return function(_0x33d082){if(_0x33d082){return _0x33d082[_0xe677('0x26')]()[_0xe677('0x25')](function(){_0x4f9c7a['status'](0xcc)['end']();});}};}function handleEntityNotFound(_0x25c176,_0xa2d1b6){return function(_0x19f8e6){if(!_0x19f8e6){_0x25c176[_0xe677('0x27')](0x194);}return _0x19f8e6;};}function handleError(_0xda7e9a,_0x342e24){_0x342e24=_0x342e24||0x1f4;return function(_0x3692d2){logger[_0xe677('0x28')](_0x3692d2[_0xe677('0x29')]);if(_0x3692d2[_0xe677('0x2a')]){delete _0x3692d2[_0xe677('0x2a')];}_0xda7e9a[_0xe677('0x1a')](_0x342e24)[_0xe677('0x2b')](_0x3692d2);};}exports['index']=function(_0xe5d698,_0x3af1a9){var _0x4a9278={},_0x5171e6={},_0xf803b9={'count':0x0,'rows':[]};var _0x170104=_[_0xe677('0x2c')](db[_0xe677('0x2d')][_0xe677('0x2e')],function(_0x4f17f6){return{'name':_0x4f17f6['fieldName'],'type':_0x4f17f6[_0xe677('0x2f')]['key']};});_0x5171e6[_0xe677('0x30')]=_[_0xe677('0x2c')](_0x170104,_0xe677('0x2a'));_0x5171e6[_0xe677('0x31')]=_[_0xe677('0x32')](_0xe5d698[_0xe677('0x31')]);_0x5171e6[_0xe677('0x33')]=_[_0xe677('0x34')](_0x5171e6['model'],_0x5171e6['query']);_0x4a9278['attributes']=_[_0xe677('0x34')](_0x5171e6[_0xe677('0x30')],qs[_0xe677('0x35')](_0xe5d698[_0xe677('0x31')]['fields']));_0x4a9278[_0xe677('0x36')]=_0x4a9278[_0xe677('0x36')][_0xe677('0x37')]?_0x4a9278[_0xe677('0x36')]:_0x5171e6[_0xe677('0x30')];if(!_0xe5d698['query'][_0xe677('0x38')](_0xe677('0x39'))){_0x4a9278[_0xe677('0x1e')]=qs[_0xe677('0x1e')](_0xe5d698[_0xe677('0x31')]['limit']);_0x4a9278[_0xe677('0x20')]=qs[_0xe677('0x20')](_0xe5d698[_0xe677('0x31')][_0xe677('0x20')]);}_0x4a9278[_0xe677('0x3a')]=qs[_0xe677('0x3b')](_0xe5d698[_0xe677('0x31')][_0xe677('0x3b')]);_0x4a9278[_0xe677('0x3c')]=qs[_0xe677('0x33')](_[_0xe677('0x3d')](_0xe5d698[_0xe677('0x31')],_0x5171e6[_0xe677('0x33')]),_0x170104);if(_0xe5d698[_0xe677('0x31')][_0xe677('0x3e')]){_0x4a9278['where']=_[_0xe677('0x3f')](_0x4a9278[_0xe677('0x3c')],{'$or':_[_0xe677('0x2c')](_0x170104,function(_0x232875){if(_0x232875[_0xe677('0x2f')]!==_0xe677('0x40')){var _0x56d957={};_0x56d957[_0x232875[_0xe677('0x2a')]]={'$like':'%'+_0xe5d698[_0xe677('0x31')][_0xe677('0x3e')]+'%'};return _0x56d957;}})});}_0x4a9278=_[_0xe677('0x3f')]({},_0x4a9278,_0xe5d698[_0xe677('0x41')]);var _0x38efeb={'where':_0x4a9278[_0xe677('0x3c')]};return db[_0xe677('0x2d')][_0xe677('0x1f')](_0x38efeb)['then'](function(_0x243beb){_0xf803b9[_0xe677('0x1f')]=_0x243beb;if(_0xe5d698[_0xe677('0x31')]['includeAll']){_0x4a9278['include']=[{'all':!![]}];}return db[_0xe677('0x2d')][_0xe677('0x42')](_0x4a9278);})['then'](function(_0x58fde1){_0xf803b9['rows']=_0x58fde1;return _0xf803b9;})[_0xe677('0x25')](respondWithFilteredResult(_0x3af1a9,_0x4a9278))[_0xe677('0x43')](handleError(_0x3af1a9,null));};exports[_0xe677('0x44')]=function(_0x376fbe,_0x12f48e){var _0x3640e0={'raw':!![],'where':{'id':_0x376fbe[_0xe677('0x45')]['id']}},_0x261f19={};_0x261f19[_0xe677('0x30')]=_[_0xe677('0x32')](db[_0xe677('0x2d')][_0xe677('0x2e')]);_0x261f19['query']=_['keys'](_0x376fbe[_0xe677('0x31')]);_0x261f19['filters']=_['intersection'](_0x261f19['model'],_0x261f19[_0xe677('0x31')]);_0x3640e0[_0xe677('0x36')]=_[_0xe677('0x34')](_0x261f19[_0xe677('0x30')],qs[_0xe677('0x35')](_0x376fbe[_0xe677('0x31')]['fields']));_0x3640e0['attributes']=_0x3640e0[_0xe677('0x36')][_0xe677('0x37')]?_0x3640e0[_0xe677('0x36')]:_0x261f19[_0xe677('0x30')];if(_0x376fbe[_0xe677('0x31')][_0xe677('0x46')]){_0x3640e0[_0xe677('0x47')]=[{'all':!![]}];}_0x3640e0=_[_0xe677('0x3f')]({},_0x3640e0,_0x376fbe[_0xe677('0x41')]);return db[_0xe677('0x2d')][_0xe677('0x48')](_0x3640e0)[_0xe677('0x25')](handleEntityNotFound(_0x12f48e,null))['then'](respondWithResult(_0x12f48e,null))['catch'](handleError(_0x12f48e,null));};exports[_0xe677('0x49')]=function(_0x9b6b94,_0x4abd9c){return db[_0xe677('0x2d')]['create'](_0x9b6b94[_0xe677('0x4a')],{})['then'](respondWithResult(_0x4abd9c,0xc9))['catch'](handleError(_0x4abd9c,null));};exports[_0xe677('0x4b')]=function(_0x18e304,_0x5d64af){if(_0x18e304[_0xe677('0x4a')]['id']){delete _0x18e304[_0xe677('0x4a')]['id'];}return db['SmsApplication'][_0xe677('0x48')]({'where':{'id':_0x18e304[_0xe677('0x45')]['id']}})[_0xe677('0x25')](handleEntityNotFound(_0x5d64af,null))['then'](saveUpdates(_0x18e304[_0xe677('0x4a')],null))[_0xe677('0x25')](respondWithResult(_0x5d64af,null))[_0xe677('0x43')](handleError(_0x5d64af,null));};exports['destroy']=function(_0x32eab1,_0x58daaf){return db[_0xe677('0x2d')][_0xe677('0x48')]({'where':{'id':_0x32eab1['params']['id']}})[_0xe677('0x25')](handleEntityNotFound(_0x58daaf,null))[_0xe677('0x25')](removeEntity(_0x58daaf,null))['catch'](handleError(_0x58daaf,null));}; \ No newline at end of file diff --git a/server/api/smsApplication/smsApplication.model.js b/server/api/smsApplication/smsApplication.model.js index 57e42d6..b31b487 100644 --- a/server/api/smsApplication/smsApplication.model.js +++ b/server/api/smsApplication/smsApplication.model.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x782b=['bluebird','request-promise','rimraf','../../config/environment','./smsApplication.attributes','define','sms_applications','utf8mb4','utf8mb4_unicode_ci','lodash','util','../../config/logger','api','moment'];(function(_0x542d87,_0x3f1428){var _0x18f154=function(_0x44c012){while(--_0x44c012){_0x542d87['push'](_0x542d87['shift']());}};_0x18f154(++_0x3f1428);}(_0x782b,0xa3));var _0xb782=function(_0x1ff084,_0x35f3b8){_0x1ff084=_0x1ff084-0x0;var _0x5d5c6d=_0x782b[_0x1ff084];return _0x5d5c6d;};'use strict';var _=require(_0xb782('0x0'));var util=require(_0xb782('0x1'));var logger=require(_0xb782('0x2'))(_0xb782('0x3'));var moment=require(_0xb782('0x4'));var BPromise=require(_0xb782('0x5'));var rp=require(_0xb782('0x6'));var fs=require('fs');var path=require('path');var rimraf=require(_0xb782('0x7'));var config=require(_0xb782('0x8'));var attributes=require(_0xb782('0x9'));module['exports']=function(_0x3491e4,_0x2a6c07){return _0x3491e4[_0xb782('0xa')]('SmsApplication',attributes,{'tableName':_0xb782('0xb'),'paranoid':![],'indexes':[],'timestamps':!![],'charset':_0xb782('0xc'),'collate':_0xb782('0xd')});}; \ No newline at end of file +var _0xb7ed=['define','sms_applications','utf8mb4','lodash','../../config/logger','moment','bluebird','request-promise','path','../../config/environment','./smsApplication.attributes'];(function(_0x321bb2,_0x202794){var _0x9c12ed=function(_0x263dd3){while(--_0x263dd3){_0x321bb2['push'](_0x321bb2['shift']());}};_0x9c12ed(++_0x202794);}(_0xb7ed,0x1e7));var _0xdb7e=function(_0x542a4e,_0x23f7ef){_0x542a4e=_0x542a4e-0x0;var _0x11d75d=_0xb7ed[_0x542a4e];return _0x11d75d;};'use strict';var _=require(_0xdb7e('0x0'));var util=require('util');var logger=require(_0xdb7e('0x1'))('api');var moment=require(_0xdb7e('0x2'));var BPromise=require(_0xdb7e('0x3'));var rp=require(_0xdb7e('0x4'));var fs=require('fs');var path=require(_0xdb7e('0x5'));var rimraf=require('rimraf');var config=require(_0xdb7e('0x6'));var attributes=require(_0xdb7e('0x7'));module['exports']=function(_0x66774e,_0x1eb3a7){return _0x66774e[_0xdb7e('0x8')]('SmsApplication',attributes,{'tableName':_0xdb7e('0x9'),'paranoid':![],'indexes':[],'timestamps':!![],'charset':_0xdb7e('0xa'),'collate':'utf8mb4_unicode_ci'});}; \ No newline at end of file diff --git a/server/api/smsApplication/smsApplication.rpc.js b/server/api/smsApplication/smsApplication.rpc.js index 26966a7..6941fbc 100644 --- a/server/api/smsApplication/smsApplication.rpc.js +++ b/server/api/smsApplication/smsApplication.rpc.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x97db=['../../mysqldb','../../config/utils','../../config/logger','jayson/promise','client','then','info','SmsApplication,\x20%s,\x20%s','debug','SmsApplication,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','code','message','result','lodash','util','moment','ioredis'];(function(_0x2125fe,_0x45098e){var _0x512344=function(_0x1a006e){while(--_0x1a006e){_0x2125fe['push'](_0x2125fe['shift']());}};_0x512344(++_0x45098e);}(_0x97db,0x1b4));var _0xb97d=function(_0x402df2,_0x2d8a24){_0x402df2=_0x402df2-0x0;var _0x4c967e=_0x97db[_0x402df2];return _0x4c967e;};'use strict';var _=require(_0xb97d('0x0'));var util=require(_0xb97d('0x1'));var moment=require(_0xb97d('0x2'));var BPromise=require('bluebird');var rs=require('randomstring');var fs=require('fs');var Redis=require(_0xb97d('0x3'));var db=require(_0xb97d('0x4'))['db'];var utils=require(_0xb97d('0x5'));var logger=require(_0xb97d('0x6'))('rpc');var config=require('../../config/environment');var jayson=require(_0xb97d('0x7'));var client=jayson[_0xb97d('0x8')]['http']({'port':0x232a});function respondWithRpcPromise(_0x533149,_0x2ff80e,_0x57cbd4){return new BPromise(function(_0x20f1e1,_0x2e1230){return client['request'](_0x533149,_0x57cbd4)[_0xb97d('0x9')](function(_0xe9acff){logger[_0xb97d('0xa')](_0xb97d('0xb'),_0x2ff80e,'request\x20sent');logger[_0xb97d('0xc')](_0xb97d('0xd'),_0x2ff80e,_0xb97d('0xe'),JSON[_0xb97d('0xf')](_0xe9acff));if(_0xe9acff[_0xb97d('0x10')]){if(_0xe9acff[_0xb97d('0x10')][_0xb97d('0x11')]===0x1f4){logger[_0xb97d('0x10')](_0xb97d('0xb'),_0x2ff80e,_0xe9acff[_0xb97d('0x10')][_0xb97d('0x12')]);return _0x2e1230(_0xe9acff[_0xb97d('0x10')][_0xb97d('0x12')]);}logger[_0xb97d('0x10')](_0xb97d('0xb'),_0x2ff80e,_0xe9acff[_0xb97d('0x10')][_0xb97d('0x12')]);return _0x20f1e1(_0xe9acff[_0xb97d('0x10')]['message']);}else{logger[_0xb97d('0xa')](_0xb97d('0xb'),_0x2ff80e,_0xb97d('0xe'));_0x20f1e1(_0xe9acff[_0xb97d('0x13')][_0xb97d('0x12')]);}})['catch'](function(_0x416d6a){logger[_0xb97d('0x10')](_0xb97d('0xb'),_0x2ff80e,_0x416d6a);_0x2e1230(_0x416d6a);});});} \ No newline at end of file +var _0x04fa=['catch','util','moment','bluebird','randomstring','ioredis','../../config/utils','rpc','../../config/environment','jayson/promise','http','info','debug','SmsApplication,\x20%s,\x20%s,\x20%s','stringify','error','code','SmsApplication,\x20%s,\x20%s','message','request\x20sent'];(function(_0x41e175,_0x2660ec){var _0xddc288=function(_0x24c93){while(--_0x24c93){_0x41e175['push'](_0x41e175['shift']());}};_0xddc288(++_0x2660ec);}(_0x04fa,0x119));var _0xa04f=function(_0xa41436,_0x30e0a0){_0xa41436=_0xa41436-0x0;var _0x3d3665=_0x04fa[_0xa41436];return _0x3d3665;};'use strict';var _=require('lodash');var util=require(_0xa04f('0x0'));var moment=require(_0xa04f('0x1'));var BPromise=require(_0xa04f('0x2'));var rs=require(_0xa04f('0x3'));var fs=require('fs');var Redis=require(_0xa04f('0x4'));var db=require('../../mysqldb')['db'];var utils=require(_0xa04f('0x5'));var logger=require('../../config/logger')(_0xa04f('0x6'));var config=require(_0xa04f('0x7'));var jayson=require(_0xa04f('0x8'));var client=jayson['client'][_0xa04f('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x2c521c,_0x315771,_0x56f898){return new BPromise(function(_0x303e54,_0x4a2e03){return client['request'](_0x2c521c,_0x56f898)['then'](function(_0x5ea498){logger[_0xa04f('0xa')]('SmsApplication,\x20%s,\x20%s',_0x315771,'request\x20sent');logger[_0xa04f('0xb')](_0xa04f('0xc'),_0x315771,'request\x20sent',JSON[_0xa04f('0xd')](_0x5ea498));if(_0x5ea498['error']){if(_0x5ea498[_0xa04f('0xe')][_0xa04f('0xf')]===0x1f4){logger['error'](_0xa04f('0x10'),_0x315771,_0x5ea498[_0xa04f('0xe')]['message']);return _0x4a2e03(_0x5ea498['error']['message']);}logger[_0xa04f('0xe')](_0xa04f('0x10'),_0x315771,_0x5ea498[_0xa04f('0xe')][_0xa04f('0x11')]);return _0x303e54(_0x5ea498[_0xa04f('0xe')][_0xa04f('0x11')]);}else{logger['info'](_0xa04f('0x10'),_0x315771,_0xa04f('0x12'));_0x303e54(_0x5ea498['result'][_0xa04f('0x11')]);}})[_0xa04f('0x13')](function(_0x505abc){logger[_0xa04f('0xe')]('SmsApplication,\x20%s,\x20%s',_0x315771,_0x505abc);_0x4a2e03(_0x505abc);});});} \ No newline at end of file diff --git a/server/api/smsInteraction/index.js b/server/api/smsInteraction/index.js index a4063af..22f35e2 100644 --- a/server/api/smsInteraction/index.js +++ b/server/api/smsInteraction/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x13f6=['isAuthenticated','index','get','/:id','show','/:id/messages','getMessages','/:id/download','download','create','addMessage','post','/:id/tags','tracked','sms','smsinteraction:addtags','addTags','put','update','delete','smsinteraction:destroy','destroy','multer','util','express','Router','fs-extra','../../components/interaction/service','../../config/environment','./smsInteraction.controller'];(function(_0x5bcac5,_0x1882d7){var _0x13d3fd=function(_0x1d0911){while(--_0x1d0911){_0x5bcac5['push'](_0x5bcac5['shift']());}};_0x13d3fd(++_0x1882d7);}(_0x13f6,0x124));var _0x613f=function(_0x4daedb,_0x3dc403){_0x4daedb=_0x4daedb-0x0;var _0x4c5e82=_0x13f6[_0x4daedb];return _0x4c5e82;};'use strict';var multer=require(_0x613f('0x0'));var util=require(_0x613f('0x1'));var path=require('path');var timeout=require('connect-timeout');var express=require(_0x613f('0x2'));var router=express[_0x613f('0x3')]();var fs_extra=require(_0x613f('0x4'));var auth=require('../../components/auth/service');var interaction=require(_0x613f('0x5'));var config=require(_0x613f('0x6'));var controller=require(_0x613f('0x7'));router['get']('/',auth[_0x613f('0x8')](),controller[_0x613f('0x9')]);router['get']('/describe',auth['isAuthenticated'](),controller['describe']);router[_0x613f('0xa')](_0x613f('0xb'),auth[_0x613f('0x8')](),controller[_0x613f('0xc')]);router['get'](_0x613f('0xd'),auth[_0x613f('0x8')](),controller[_0x613f('0xe')]);router['get'](_0x613f('0xf'),auth[_0x613f('0x8')](),controller[_0x613f('0x10')]);router['post']('/',auth[_0x613f('0x8')](),controller[_0x613f('0x11')]);router['post']('/:id/messages',auth['isAuthenticated'](),controller[_0x613f('0x12')]);router[_0x613f('0x13')](_0x613f('0x14'),auth[_0x613f('0x8')](),interaction[_0x613f('0x15')](_0x613f('0x16'),_0x613f('0x17')),controller[_0x613f('0x18')]);router[_0x613f('0x19')](_0x613f('0xb'),auth['isAuthenticated'](),interaction[_0x613f('0x15')]('sms','smsinteraction:update'),controller[_0x613f('0x1a')]);router[_0x613f('0x1b')]('/:id',auth[_0x613f('0x8')](),interaction['tracked'](_0x613f('0x16'),_0x613f('0x1c')),controller[_0x613f('0x1d')]);router[_0x613f('0x1b')](_0x613f('0x14'),auth[_0x613f('0x8')](),controller['removeTags']);module['exports']=router; \ No newline at end of file +var _0x3c81=['express','../../config/environment','./smsInteraction.controller','get','isAuthenticated','index','/describe','describe','/:id','show','/:id/messages','getMessages','/:id/download','download','post','create','addMessage','addTags','tracked','sms','update','delete','smsinteraction:destroy','destroy','/:id/tags','exports','multer','util','connect-timeout'];(function(_0x303b46,_0x32949a){var _0x2ebdb2=function(_0x53f048){while(--_0x53f048){_0x303b46['push'](_0x303b46['shift']());}};_0x2ebdb2(++_0x32949a);}(_0x3c81,0x102));var _0x13c8=function(_0x126989,_0x59031d){_0x126989=_0x126989-0x0;var _0x3202f5=_0x3c81[_0x126989];return _0x3202f5;};'use strict';var multer=require(_0x13c8('0x0'));var util=require(_0x13c8('0x1'));var path=require('path');var timeout=require(_0x13c8('0x2'));var express=require(_0x13c8('0x3'));var router=express['Router']();var fs_extra=require('fs-extra');var auth=require('../../components/auth/service');var interaction=require('../../components/interaction/service');var config=require(_0x13c8('0x4'));var controller=require(_0x13c8('0x5'));router[_0x13c8('0x6')]('/',auth[_0x13c8('0x7')](),controller[_0x13c8('0x8')]);router[_0x13c8('0x6')](_0x13c8('0x9'),auth['isAuthenticated'](),controller[_0x13c8('0xa')]);router['get'](_0x13c8('0xb'),auth[_0x13c8('0x7')](),controller[_0x13c8('0xc')]);router[_0x13c8('0x6')](_0x13c8('0xd'),auth[_0x13c8('0x7')](),controller[_0x13c8('0xe')]);router[_0x13c8('0x6')](_0x13c8('0xf'),auth[_0x13c8('0x7')](),controller[_0x13c8('0x10')]);router[_0x13c8('0x11')]('/',auth[_0x13c8('0x7')](),controller[_0x13c8('0x12')]);router['post'](_0x13c8('0xd'),auth[_0x13c8('0x7')](),controller[_0x13c8('0x13')]);router[_0x13c8('0x11')]('/:id/tags',auth[_0x13c8('0x7')](),interaction['tracked']('sms','smsinteraction:addtags'),controller[_0x13c8('0x14')]);router['put'](_0x13c8('0xb'),auth[_0x13c8('0x7')](),interaction[_0x13c8('0x15')](_0x13c8('0x16'),'smsinteraction:update'),controller[_0x13c8('0x17')]);router[_0x13c8('0x18')](_0x13c8('0xb'),auth[_0x13c8('0x7')](),interaction[_0x13c8('0x15')](_0x13c8('0x16'),_0x13c8('0x19')),controller[_0x13c8('0x1a')]);router[_0x13c8('0x18')](_0x13c8('0x1b'),auth[_0x13c8('0x7')](),controller['removeTags']);module[_0x13c8('0x1c')]=router; \ No newline at end of file diff --git a/server/api/smsInteraction/smsInteraction.attributes.js b/server/api/smsInteraction/smsInteraction.attributes.js index 1a4556f..b8f6976 100644 --- a/server/api/smsInteraction/smsInteraction.attributes.js +++ b/server/api/smsInteraction/smsInteraction.attributes.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xf88f=['STRING','out','ENUM','sequelize','moment','exports','BOOLEAN','DATE'];(function(_0x1dbcd3,_0x2aa3bb){var _0x62ae3d=function(_0xa38e4f){while(--_0xa38e4f){_0x1dbcd3['push'](_0x1dbcd3['shift']());}};_0x62ae3d(++_0x2aa3bb);}(_0xf88f,0x1bb));var _0xff88=function(_0x5e0b0e,_0x3bb902){_0x5e0b0e=_0x5e0b0e-0x0;var _0x1db81f=_0xf88f[_0x5e0b0e];return _0x1db81f;};'use strict';var Sequelize=require(_0xff88('0x0'));var moment=require(_0xff88('0x1'));module[_0xff88('0x2')]={'closed':{'type':Sequelize[_0xff88('0x3')],'defaultValue':![]},'closedAt':{'type':Sequelize[_0xff88('0x4')]},'disposition':{'type':Sequelize[_0xff88('0x5')]},'secondDisposition':{'type':Sequelize[_0xff88('0x5')]},'thirdDisposition':{'type':Sequelize['STRING']},'note':{'type':Sequelize[_0xff88('0x5')]},'phone':{'type':Sequelize[_0xff88('0x5')]},'read1stAt':{'type':Sequelize[_0xff88('0x4')]},'firstMsgDirection':{'type':Sequelize['ENUM']('in',_0xff88('0x6')),'defaultValue':'in','allowNull':![]},'lastMsgAt':{'type':Sequelize[_0xff88('0x4')]},'lastMsgDirection':{'type':Sequelize[_0xff88('0x7')]('in',_0xff88('0x6')),'defaultValue':'in','allowNull':![]},'autoreplyExecuted':{'type':Sequelize[_0xff88('0x3')],'defaultValue':![]}}; \ No newline at end of file +var _0xef8b=['STRING','ENUM','out','moment','exports','BOOLEAN','DATE'];(function(_0x354ec4,_0x9f0ec5){var _0x8da532=function(_0x46a421){while(--_0x46a421){_0x354ec4['push'](_0x354ec4['shift']());}};_0x8da532(++_0x9f0ec5);}(_0xef8b,0x192));var _0xbef8=function(_0x3b0d98,_0x346f06){_0x3b0d98=_0x3b0d98-0x0;var _0x296885=_0xef8b[_0x3b0d98];return _0x296885;};'use strict';var Sequelize=require('sequelize');var moment=require(_0xbef8('0x0'));module[_0xbef8('0x1')]={'closed':{'type':Sequelize[_0xbef8('0x2')],'defaultValue':![]},'closedAt':{'type':Sequelize[_0xbef8('0x3')]},'disposition':{'type':Sequelize[_0xbef8('0x4')]},'secondDisposition':{'type':Sequelize[_0xbef8('0x4')]},'thirdDisposition':{'type':Sequelize[_0xbef8('0x4')]},'note':{'type':Sequelize[_0xbef8('0x4')]},'phone':{'type':Sequelize[_0xbef8('0x4')]},'read1stAt':{'type':Sequelize[_0xbef8('0x3')]},'firstMsgDirection':{'type':Sequelize[_0xbef8('0x5')]('in','out'),'defaultValue':'in','allowNull':![]},'lastMsgAt':{'type':Sequelize[_0xbef8('0x3')]},'lastMsgDirection':{'type':Sequelize[_0xbef8('0x5')]('in',_0xbef8('0x6')),'defaultValue':'in','allowNull':![]},'autoreplyExecuted':{'type':Sequelize['BOOLEAN'],'defaultValue':![]}}; \ No newline at end of file diff --git a/server/api/smsInteraction/smsInteraction.controller.js b/server/api/smsInteraction/smsInteraction.controller.js index 6e7da5f..12d391c 100644 --- a/server/api/smsInteraction/smsInteraction.controller.js +++ b/server/api/smsInteraction/smsInteraction.controller.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x9cfc=['show','params','keys','intersection','attributes','fields','length','model','includeAll','include','create','body','update','find','describe','SmsMessage','ids','findOne','filters','hasOwnProperty','nolimit','sort','where','SmsInteractionId','filter','$gte','split','format','merge','options','rows','addTags','setTags','omit','Tag','findAll','color','smsInteractionTags:save','removeTags','download','unix','toString','join','root','server','files','tmp','transcript-%d-%s.zip','push','User','fullname','CmContact','Contact','firstName','Messages','createdAt','direction','read','SmsAccount','Owner','get','Sms','Account','closed','closedAt','YYYY-MM-DD\x20HH:mm:ss','disposition','out','System','lastName','secret','value','renderFile','views','downloadInteraction.ejs','transcript-','log','unlinkSync','rimraf','zip-dir','moment','bluebird','path','ejs','lodash','../../components/parsers/qs','../../config/logger','api','../../mysqldb','redis','defaults','socket.io-emitter','register','sendStatus','status','end','offset','undefined','limit','count','set','Content-Range','then','destroy','error','stack','name','send','index','map','SmsInteraction','rawAttributes','type','key','getOptions','query','user','catch'];(function(_0x323177,_0x1fde54){var _0x142e23=function(_0x16657f){while(--_0x16657f){_0x323177['push'](_0x323177['shift']());}};_0x142e23(++_0x1fde54);}(_0x9cfc,0x1b0));var _0xc9cf=function(_0x4b2f49,_0x5cbc12){_0x4b2f49=_0x4b2f49-0x0;var _0x1a1c2=_0x9cfc[_0x4b2f49];return _0x1a1c2;};'use strict';var rimraf=require(_0xc9cf('0x0'));var zipdir=require(_0xc9cf('0x1'));var moment=require(_0xc9cf('0x2'));var BPromise=require(_0xc9cf('0x3'));var util=require('util');var path=require(_0xc9cf('0x4'));var ejs=require(_0xc9cf('0x5'));var fs=require('fs');var _=require(_0xc9cf('0x6'));var Redis=require('ioredis');var interaction=require('../../components/interaction/service');var qs=require(_0xc9cf('0x7'));var pdf=require('../../components/export/pdf');var logger=require(_0xc9cf('0x8'))(_0xc9cf('0x9'));var config=require('../../config/environment');var db=require(_0xc9cf('0xa'))['db'];config[_0xc9cf('0xb')]=_[_0xc9cf('0xc')](config[_0xc9cf('0xb')],{'host':'localhost','port':0x18eb});var socket=require(_0xc9cf('0xd'))(new Redis(config[_0xc9cf('0xb')]));require('./smsInteraction.socket')[_0xc9cf('0xe')](socket);function respondWithStatusCode(_0x33e334,_0x2f5df3){_0x2f5df3=_0x2f5df3||0xcc;return function(_0x3c2187){if(_0x3c2187){return _0x33e334[_0xc9cf('0xf')](_0x2f5df3);}return _0x33e334[_0xc9cf('0x10')](_0x2f5df3)[_0xc9cf('0x11')]();};}function respondWithResult(_0x291e9b,_0x5083e2){_0x5083e2=_0x5083e2||0xc8;return function(_0x2a0232){if(_0x2a0232){return _0x291e9b[_0xc9cf('0x10')](_0x5083e2)['json'](_0x2a0232);}};}function respondWithFilteredResult(_0x4099d7,_0x311890){return function(_0x4042d7){if(_0x4042d7){var _0x433e69=typeof _0x311890[_0xc9cf('0x12')]===_0xc9cf('0x13')&&typeof _0x311890[_0xc9cf('0x14')]===_0xc9cf('0x13');var _0x41bc69=_0x4042d7[_0xc9cf('0x15')];var _0xff6da3=_0x433e69?0x0:_0x311890[_0xc9cf('0x12')];var _0x309d8b=_0x433e69?_0x4042d7[_0xc9cf('0x15')]:_0x311890[_0xc9cf('0x12')]+_0x311890[_0xc9cf('0x14')];var _0x524d09;if(_0x309d8b>=_0x41bc69){_0x309d8b=_0x41bc69;_0x524d09=0xc8;}else{_0x524d09=0xce;}_0x4099d7[_0xc9cf('0x10')](_0x524d09);return _0x4099d7[_0xc9cf('0x16')](_0xc9cf('0x17'),_0xff6da3+'-'+_0x309d8b+'/'+_0x41bc69)['json'](_0x4042d7);}return null;};}function saveUpdates(_0x3855a1){return function(_0x14654a){if(_0x14654a){return _0x14654a['update'](_0x3855a1)[_0xc9cf('0x18')](function(_0x29ebe8){return _0x29ebe8;});}return null;};}function removeEntity(_0x1118cd){return function(_0x19341c){if(_0x19341c){return _0x19341c[_0xc9cf('0x19')]()[_0xc9cf('0x18')](function(){_0x1118cd[_0xc9cf('0x10')](0xcc)['end']();});}};}function handleEntityNotFound(_0x302f14){return function(_0x158861){if(!_0x158861){_0x302f14['sendStatus'](0x194);}return _0x158861;};}function handleError(_0x3be81c,_0x29bd6d){_0x29bd6d=_0x29bd6d||0x1f4;return function(_0xe6607c){logger[_0xc9cf('0x1a')](_0xe6607c[_0xc9cf('0x1b')]);if(_0xe6607c[_0xc9cf('0x1c')]){delete _0xe6607c['name'];}_0x3be81c[_0xc9cf('0x10')](_0x29bd6d)[_0xc9cf('0x1d')](_0xe6607c);};}exports[_0xc9cf('0x1e')]=function(_0x4acdc0,_0x4f1f6a){var _0x47dc97={};var _0x5f2e69=_[_0xc9cf('0x1f')](db[_0xc9cf('0x20')][_0xc9cf('0x21')],function(_0x591094){return{'name':_0x591094['fieldName'],'type':_0x591094[_0xc9cf('0x22')][_0xc9cf('0x23')]};});_0x47dc97=qs[_0xc9cf('0x24')](_0x5f2e69,_0x4acdc0);return interaction['findAll']('sms',_0x4acdc0[_0xc9cf('0x25')],_0x4acdc0[_0xc9cf('0x26')],_0x47dc97,_0x5f2e69)[_0xc9cf('0x18')](respondWithFilteredResult(_0x4f1f6a,_0x47dc97))[_0xc9cf('0x27')](handleError(_0x4f1f6a,null));};exports[_0xc9cf('0x28')]=function(_0x49c1df,_0x2025cc){var _0x2f74fb={'raw':![],'where':{'id':_0x49c1df[_0xc9cf('0x29')]['id']}},_0x21b082={};_0x21b082['model']=_[_0xc9cf('0x2a')](db[_0xc9cf('0x20')]['rawAttributes']);_0x21b082[_0xc9cf('0x25')]=_[_0xc9cf('0x2a')](_0x49c1df[_0xc9cf('0x25')]);_0x21b082['filters']=_[_0xc9cf('0x2b')](_0x21b082['model'],_0x21b082['query']);_0x2f74fb[_0xc9cf('0x2c')]=_['intersection'](_0x21b082['model'],qs[_0xc9cf('0x2d')](_0x49c1df[_0xc9cf('0x25')][_0xc9cf('0x2d')]));_0x2f74fb[_0xc9cf('0x2c')]=_0x2f74fb[_0xc9cf('0x2c')][_0xc9cf('0x2e')]?_0x2f74fb[_0xc9cf('0x2c')]:_0x21b082[_0xc9cf('0x2f')];if(_0x49c1df[_0xc9cf('0x25')][_0xc9cf('0x30')]){_0x2f74fb[_0xc9cf('0x31')]=[{'all':!![]}];}_0x2f74fb=_['merge']({},_0x2f74fb,_0x49c1df['options']);return db[_0xc9cf('0x20')]['find'](_0x2f74fb)[_0xc9cf('0x18')](handleEntityNotFound(_0x2025cc,null))[_0xc9cf('0x18')](respondWithResult(_0x2025cc,null))[_0xc9cf('0x27')](handleError(_0x2025cc,null));};exports[_0xc9cf('0x32')]=function(_0x12b577,_0x1e0183){return db[_0xc9cf('0x20')][_0xc9cf('0x32')](_0x12b577[_0xc9cf('0x33')],{})[_0xc9cf('0x18')](respondWithResult(_0x1e0183,0xc9))[_0xc9cf('0x27')](handleError(_0x1e0183,null));};exports[_0xc9cf('0x34')]=function(_0x56558b,_0xefbe70){if(_0x56558b[_0xc9cf('0x33')]['id']){delete _0x56558b[_0xc9cf('0x33')]['id'];}return db['SmsInteraction'][_0xc9cf('0x35')]({'where':{'id':_0x56558b[_0xc9cf('0x29')]['id']}})[_0xc9cf('0x18')](handleEntityNotFound(_0xefbe70,null))[_0xc9cf('0x18')](saveUpdates(_0x56558b[_0xc9cf('0x33')],null))[_0xc9cf('0x18')](respondWithResult(_0xefbe70,null))[_0xc9cf('0x27')](handleError(_0xefbe70,null));};exports[_0xc9cf('0x19')]=function(_0xa51caf,_0x2e9c8d){return db[_0xc9cf('0x20')]['find']({'where':{'id':_0xa51caf[_0xc9cf('0x29')]['id']}})[_0xc9cf('0x18')](handleEntityNotFound(_0x2e9c8d,null))[_0xc9cf('0x18')](removeEntity(_0x2e9c8d,null))[_0xc9cf('0x27')](handleError(_0x2e9c8d,null));};exports['describe']=function(_0x525efc,_0x4e8091){return db[_0xc9cf('0x20')][_0xc9cf('0x36')]()[_0xc9cf('0x18')](respondWithResult(_0x4e8091,null))['catch'](handleError(_0x4e8091,null));};exports['addMessage']=function(_0x5b5e78,_0xd8b73a){return db[_0xc9cf('0x37')][_0xc9cf('0x35')]({'where':{'id':_0x5b5e78[_0xc9cf('0x29')]['id']}})[_0xc9cf('0x18')](handleEntityNotFound(_0xd8b73a,null))['then'](function(_0x2bae65){if(_0x2bae65){return _0x2bae65['addMessage'](_0x5b5e78[_0xc9cf('0x33')][_0xc9cf('0x38')],_['omit'](_0x5b5e78[_0xc9cf('0x33')],[_0xc9cf('0x38'),'id'])||{});}})[_0xc9cf('0x18')](respondWithResult(_0xd8b73a,null))[_0xc9cf('0x27')](handleError(_0xd8b73a,null));};exports['getMessages']=function(_0x46590c,_0x2dcbc0){var _0x171510={'raw':![],'where':{}};var _0x5c95ab={};var _0x267212={'count':0x0,'rows':[]};return db[_0xc9cf('0x20')][_0xc9cf('0x39')]({'where':{'id':_0x46590c[_0xc9cf('0x29')]['id']}})[_0xc9cf('0x18')](handleEntityNotFound(_0x2dcbc0,null))[_0xc9cf('0x18')](function(_0x1fcda3){if(_0x1fcda3){_0x5c95ab[_0xc9cf('0x2f')]=_['keys'](db['SmsMessage'][_0xc9cf('0x21')]);_0x5c95ab[_0xc9cf('0x25')]=_[_0xc9cf('0x2a')](_0x46590c[_0xc9cf('0x25')]);_0x5c95ab[_0xc9cf('0x3a')]=_['intersection'](_0x5c95ab['model'],_0x5c95ab[_0xc9cf('0x25')]);_0x171510[_0xc9cf('0x2c')]=_[_0xc9cf('0x2b')](_0x5c95ab[_0xc9cf('0x2f')],qs[_0xc9cf('0x2d')](_0x46590c[_0xc9cf('0x25')][_0xc9cf('0x2d')]));_0x171510[_0xc9cf('0x2c')]=_0x171510[_0xc9cf('0x2c')][_0xc9cf('0x2e')]?_0x171510[_0xc9cf('0x2c')]:_0x5c95ab[_0xc9cf('0x2f')];if(!_0x46590c[_0xc9cf('0x25')][_0xc9cf('0x3b')](_0xc9cf('0x3c'))){_0x171510[_0xc9cf('0x14')]=qs[_0xc9cf('0x14')](_0x46590c['query'][_0xc9cf('0x14')]);_0x171510[_0xc9cf('0x12')]=qs[_0xc9cf('0x12')](_0x46590c[_0xc9cf('0x25')]['offset']);}_0x171510['order']=qs[_0xc9cf('0x3d')](_0x46590c[_0xc9cf('0x25')][_0xc9cf('0x3d')]);_0x171510[_0xc9cf('0x3e')]=qs[_0xc9cf('0x3a')](_['pick'](_0x46590c[_0xc9cf('0x25')],_0x5c95ab[_0xc9cf('0x3a')]));_0x171510[_0xc9cf('0x3e')][_0xc9cf('0x3f')]=_0x1fcda3['id'];if(_0x46590c[_0xc9cf('0x25')][_0xc9cf('0x40')]){_0x171510[_0xc9cf('0x3e')]=_['merge'](_0x171510['where'],{'$or':_[_0xc9cf('0x1f')](_0x171510[_0xc9cf('0x2c')],function(_0x9bd663){var _0x5dd552={};_0x5dd552[_0x9bd663]={'$like':'%'+_0x46590c[_0xc9cf('0x25')][_0xc9cf('0x40')]+'%'};return _0x5dd552;})});}if(_0x46590c[_0xc9cf('0x25')][_0xc9cf('0x41')]){var _0x4ca155=_0x46590c[_0xc9cf('0x25')][_0xc9cf('0x41')][_0xc9cf('0x42')](',');var _0x2b4f82={};_0x2b4f82[_0x4ca155[0x0]]={'$gte':moment(_0x4ca155[0x1])[_0xc9cf('0x43')]('YYYY-MM-DD\x20HH:mm:ss')};_0x171510[_0xc9cf('0x3e')]=_[_0xc9cf('0x44')](_0x171510[_0xc9cf('0x3e')],_0x2b4f82);}_0x171510=_[_0xc9cf('0x44')]({},_0x171510,_0x46590c[_0xc9cf('0x45')]);return db[_0xc9cf('0x37')][_0xc9cf('0x15')]({'where':_0x171510[_0xc9cf('0x3e')]})['then'](function(_0xbebd62){_0x267212[_0xc9cf('0x15')]=_0xbebd62;if(_0x46590c['query'][_0xc9cf('0x30')]){_0x171510[_0xc9cf('0x31')]=[{'all':!![]}];}return db[_0xc9cf('0x37')]['findAll'](_0x171510);})['then'](function(_0x3dcda9){_0x267212[_0xc9cf('0x46')]=_0x3dcda9;return _0x267212;});}})['then'](respondWithFilteredResult(_0x2dcbc0,_0x171510))[_0xc9cf('0x27')](handleError(_0x2dcbc0,null));};exports[_0xc9cf('0x47')]=function(_0x72140,_0x13da20){return db[_0xc9cf('0x20')][_0xc9cf('0x35')]({'where':{'id':_0x72140[_0xc9cf('0x29')]['id']}})[_0xc9cf('0x18')](handleEntityNotFound(_0x13da20,null))[_0xc9cf('0x18')](function(_0x55cb24){if(_0x55cb24){return _0x55cb24[_0xc9cf('0x48')](_0x72140[_0xc9cf('0x33')][_0xc9cf('0x38')],_[_0xc9cf('0x49')](_0x72140[_0xc9cf('0x33')],[_0xc9cf('0x38'),'id'])||{})['spread'](function(){return db[_0xc9cf('0x4a')][_0xc9cf('0x4b')]({'attributes':['id',_0xc9cf('0x1c'),_0xc9cf('0x4c')],'where':{'id':_0x72140[_0xc9cf('0x33')]['ids']}});})[_0xc9cf('0x18')](function(_0x27aad2){socket['emit'](_0xc9cf('0x4d'),{'id':Number(_0x72140['params']['id']),'tags':_0x27aad2||[]});return{'id':Number(_0x72140[_0xc9cf('0x29')]['id']),'tags':_0x27aad2||[]};});}})[_0xc9cf('0x18')](respondWithResult(_0x13da20,null))[_0xc9cf('0x27')](handleError(_0x13da20,null));};exports[_0xc9cf('0x4e')]=function(_0x4d9025,_0x424497){return db[_0xc9cf('0x20')][_0xc9cf('0x35')]({'where':{'id':_0x4d9025[_0xc9cf('0x29')]['id']}})['then'](handleEntityNotFound(_0x424497,null))[_0xc9cf('0x18')](function(_0x168080){if(_0x168080){return _0x168080[_0xc9cf('0x4e')](_0x4d9025[_0xc9cf('0x25')][_0xc9cf('0x38')]);}})['then'](respondWithStatusCode(_0x424497,null))['catch'](handleError(_0x424497,null));};exports[_0xc9cf('0x4f')]=function(_0x477015,_0x3f1f31){var _0x5a7d80=moment()[_0xc9cf('0x50')]()[_0xc9cf('0x51')]();var _0xcb583a=path[_0xc9cf('0x52')](config[_0xc9cf('0x53')],_0xc9cf('0x54'),_0xc9cf('0x55'),_0xc9cf('0x56'));var _0x466431=path[_0xc9cf('0x52')](_0xcb583a,_0x5a7d80);var _0x379e9b=util['format'](_0xc9cf('0x57'),_0x477015[_0xc9cf('0x29')]['id'],_0x5a7d80);var _0x2bcc77=path['join'](_0xcb583a,_0x379e9b);var _0x45b17d=[];_0x45b17d[_0xc9cf('0x58')]({'model':db['User'],'as':_0xc9cf('0x59'),'attributes':['id',_0xc9cf('0x5a')],'raw':!![]});_0x45b17d[_0xc9cf('0x58')]({'model':db[_0xc9cf('0x5b')],'as':_0xc9cf('0x5c'),'attributes':['id',_0xc9cf('0x5d'),'lastName'],'raw':!![]});var _0x399574=[{'model':db['SmsMessage'],'as':_0xc9cf('0x5e'),'attributes':['id','body',_0xc9cf('0x5f'),_0xc9cf('0x60'),'secret',_0xc9cf('0x61')],'include':_0x45b17d}];_0x399574[_0xc9cf('0x58')]({'model':db[_0xc9cf('0x62')],'as':'Account','attributes':['id','name']});_0x399574[_0xc9cf('0x58')]({'model':db[_0xc9cf('0x59')],'as':_0xc9cf('0x63'),'attributes':['id','fullname']});return db[_0xc9cf('0x20')][_0xc9cf('0x35')]({'where':{'id':_0x477015[_0xc9cf('0x29')]['id']},'include':_0x399574})[_0xc9cf('0x18')](handleEntityNotFound(_0x3f1f31,null))[_0xc9cf('0x18')](function(_0x284640){if(_0x284640){var _0x78bac4=_0x284640[_0xc9cf('0x64')]({'plain':!![]});fs['mkdirSync'](_0x466431);var _0x1c48d={'channel':_0xc9cf('0x65'),'account':_0x78bac4[_0xc9cf('0x66')][_0xc9cf('0x1c')],'agent':_0x78bac4['Owner']?_0x78bac4[_0xc9cf('0x63')]['fullname']:'N.A.','createdAt':moment(_0x78bac4['createdAt'])['format']('YYYY-MM-DD\x20HH:mm:ss')[_0xc9cf('0x51')](),'closedAt':_0x78bac4[_0xc9cf('0x67')]?moment(_0x78bac4[_0xc9cf('0x68')])[_0xc9cf('0x43')](_0xc9cf('0x69'))[_0xc9cf('0x51')]():'','disposition':_0x78bac4[_0xc9cf('0x6a')],'messages':_(_0x78bac4['Messages'])[_0xc9cf('0x40')]({'secret':![]})['map'](function(_0x839f37){return{'date':moment(_0x839f37['createdAt'])['format'](_0xc9cf('0x69'))[_0xc9cf('0x51')](),'sender':_0x839f37[_0xc9cf('0x60')]===_0xc9cf('0x6b')?_0x839f37[_0xc9cf('0x59')]?_0x839f37[_0xc9cf('0x59')]['fullname']:_0xc9cf('0x6c'):_0x839f37[_0xc9cf('0x5c')][_0xc9cf('0x5d')]+(_0x839f37[_0xc9cf('0x5c')][_0xc9cf('0x6d')]?'\x20'+_0x839f37[_0xc9cf('0x5c')][_0xc9cf('0x6d')]:''),'body':_0x839f37[_0xc9cf('0x33')],'direction':_0x839f37[_0xc9cf('0x60')]===_0xc9cf('0x6b')?'A':'C','secret':_0x839f37[_0xc9cf('0x6e')],'read':_0x839f37[_0xc9cf('0x61')]};})[_0xc9cf('0x6f')]()};return ejs[_0xc9cf('0x70')](path[_0xc9cf('0x52')](config[_0xc9cf('0x53')],_0xc9cf('0x54'),_0xc9cf('0x71'),_0xc9cf('0x72')),{'interaction':_0x1c48d})[_0xc9cf('0x18')](function(_0x34690c){var _0x350ea9=path[_0xc9cf('0x52')](_0x466431,_0xc9cf('0x73')+_0x78bac4['id']+'-'+_0x5a7d80+'.pdf');var _0x3e762d={'path':_0x350ea9,'channel':_0xc9cf('0x65'),'interactionId':_0x78bac4['id']};return pdf['createPdfFromHTML'](_0x34690c,_0x3e762d);})[_0xc9cf('0x18')](function(){return new BPromise(function(_0x55001b,_0x464004){zipdir(_0x466431,{'saveTo':_0x2bcc77},function(_0x5a9995,_0x5c268e){if(_0x5a9995)return _0x464004(_0x5a9995);return _0x55001b(_0x5c268e);});})[_0xc9cf('0x18')](function(){return new BPromise(function(_0x2c3113,_0x40ff17){rimraf(_0x466431,function(_0x1475e8){if(_0x1475e8)_0x40ff17(_0x1475e8);return _0x2c3113();});});})[_0xc9cf('0x18')](function(){return _0x3f1f31[_0xc9cf('0x4f')](_0x2bcc77,_0x379e9b,function(_0x28f5e3){if(_0x28f5e3){console[_0xc9cf('0x74')]('err',_0x28f5e3);}else{fs[_0xc9cf('0x75')](_0x2bcc77);}});});});}else{return _0x3f1f31['sendStatus'](0xc8);}})[_0xc9cf('0x27')](handleError(_0x3f1f31,null));}; \ No newline at end of file +var _0x79fc=['tmp','push','User','Contact','Messages','createdAt','direction','secret','SmsAccount','Account','fullname','get','mkdirSync','Owner','N.A.','out','System','firstName','lastName','read','root','.pdf','Sms','createPdfFromHTML','download','log','unlinkSync','zip-dir','moment','ejs','lodash','ioredis','../../components/export/pdf','../../config/logger','api','../../config/environment','../../mysqldb','redis','defaults','localhost','socket.io-emitter','./smsInteraction.socket','sendStatus','end','status','json','offset','limit','set','Content-Range','update','then','destroy','error','name','send','index','map','rawAttributes','fieldName','type','key','findAll','sms','query','catch','show','params','model','keys','SmsInteraction','fields','attributes','length','includeAll','include','merge','find','create','body','describe','SmsMessage','addMessage','omit','ids','getMessages','findOne','filters','hasOwnProperty','nolimit','order','sort','where','pick','SmsInteractionId','filter','$gte','format','YYYY-MM-DD\x20HH:mm:ss','options','count','rows','addTags','setTags','spread','Tag','smsInteractionTags:save','removeTags','toString','join','server','files'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0x79fc,0x1db));var _0xc79f=function(_0x34217f,_0x4954d9){_0x34217f=_0x34217f-0x0;var _0x533721=_0x79fc[_0x34217f];return _0x533721;};'use strict';var rimraf=require('rimraf');var zipdir=require(_0xc79f('0x0'));var moment=require(_0xc79f('0x1'));var BPromise=require('bluebird');var util=require('util');var path=require('path');var ejs=require(_0xc79f('0x2'));var fs=require('fs');var _=require(_0xc79f('0x3'));var Redis=require(_0xc79f('0x4'));var interaction=require('../../components/interaction/service');var qs=require('../../components/parsers/qs');var pdf=require(_0xc79f('0x5'));var logger=require(_0xc79f('0x6'))(_0xc79f('0x7'));var config=require(_0xc79f('0x8'));var db=require(_0xc79f('0x9'))['db'];config[_0xc79f('0xa')]=_[_0xc79f('0xb')](config[_0xc79f('0xa')],{'host':_0xc79f('0xc'),'port':0x18eb});var socket=require(_0xc79f('0xd'))(new Redis(config[_0xc79f('0xa')]));require(_0xc79f('0xe'))['register'](socket);function respondWithStatusCode(_0x24ddec,_0x6ee6c){_0x6ee6c=_0x6ee6c||0xcc;return function(_0x36422c){if(_0x36422c){return _0x24ddec[_0xc79f('0xf')](_0x6ee6c);}return _0x24ddec['status'](_0x6ee6c)[_0xc79f('0x10')]();};}function respondWithResult(_0x2cc6e7,_0x3e42e2){_0x3e42e2=_0x3e42e2||0xc8;return function(_0x235316){if(_0x235316){return _0x2cc6e7[_0xc79f('0x11')](_0x3e42e2)[_0xc79f('0x12')](_0x235316);}};}function respondWithFilteredResult(_0x7899b2,_0x508558){return function(_0x1ea13c){if(_0x1ea13c){var _0x2fa943=typeof _0x508558[_0xc79f('0x13')]==='undefined'&&typeof _0x508558[_0xc79f('0x14')]==='undefined';var _0x3e26fa=_0x1ea13c['count'];var _0x326cf5=_0x2fa943?0x0:_0x508558[_0xc79f('0x13')];var _0x23f38a=_0x2fa943?_0x1ea13c['count']:_0x508558[_0xc79f('0x13')]+_0x508558[_0xc79f('0x14')];var _0x4b68d9;if(_0x23f38a>=_0x3e26fa){_0x23f38a=_0x3e26fa;_0x4b68d9=0xc8;}else{_0x4b68d9=0xce;}_0x7899b2[_0xc79f('0x11')](_0x4b68d9);return _0x7899b2[_0xc79f('0x15')](_0xc79f('0x16'),_0x326cf5+'-'+_0x23f38a+'/'+_0x3e26fa)[_0xc79f('0x12')](_0x1ea13c);}return null;};}function saveUpdates(_0x1084c6){return function(_0x22f507){if(_0x22f507){return _0x22f507[_0xc79f('0x17')](_0x1084c6)[_0xc79f('0x18')](function(_0x17cbed){return _0x17cbed;});}return null;};}function removeEntity(_0x1e8c2a){return function(_0x39d3b9){if(_0x39d3b9){return _0x39d3b9[_0xc79f('0x19')]()[_0xc79f('0x18')](function(){_0x1e8c2a[_0xc79f('0x11')](0xcc)['end']();});}};}function handleEntityNotFound(_0x1c8aff){return function(_0x182c36){if(!_0x182c36){_0x1c8aff[_0xc79f('0xf')](0x194);}return _0x182c36;};}function handleError(_0x57e870,_0x4af534){_0x4af534=_0x4af534||0x1f4;return function(_0x4f522c){logger[_0xc79f('0x1a')](_0x4f522c['stack']);if(_0x4f522c['name']){delete _0x4f522c[_0xc79f('0x1b')];}_0x57e870['status'](_0x4af534)[_0xc79f('0x1c')](_0x4f522c);};}exports[_0xc79f('0x1d')]=function(_0x4ba23d,_0x15b9af){var _0x45007c={};var _0x47717e=_[_0xc79f('0x1e')](db['SmsInteraction'][_0xc79f('0x1f')],function(_0x39fd57){return{'name':_0x39fd57[_0xc79f('0x20')],'type':_0x39fd57[_0xc79f('0x21')][_0xc79f('0x22')]};});_0x45007c=qs['getOptions'](_0x47717e,_0x4ba23d);return interaction[_0xc79f('0x23')](_0xc79f('0x24'),_0x4ba23d[_0xc79f('0x25')],_0x4ba23d['user'],_0x45007c,_0x47717e)['then'](respondWithFilteredResult(_0x15b9af,_0x45007c))[_0xc79f('0x26')](handleError(_0x15b9af,null));};exports[_0xc79f('0x27')]=function(_0x2ef574,_0x23f1be){var _0x9bd278={'raw':![],'where':{'id':_0x2ef574[_0xc79f('0x28')]['id']}},_0x33796a={};_0x33796a[_0xc79f('0x29')]=_[_0xc79f('0x2a')](db[_0xc79f('0x2b')][_0xc79f('0x1f')]);_0x33796a['query']=_[_0xc79f('0x2a')](_0x2ef574[_0xc79f('0x25')]);_0x33796a['filters']=_['intersection'](_0x33796a[_0xc79f('0x29')],_0x33796a[_0xc79f('0x25')]);_0x9bd278['attributes']=_['intersection'](_0x33796a[_0xc79f('0x29')],qs[_0xc79f('0x2c')](_0x2ef574['query']['fields']));_0x9bd278[_0xc79f('0x2d')]=_0x9bd278['attributes'][_0xc79f('0x2e')]?_0x9bd278[_0xc79f('0x2d')]:_0x33796a['model'];if(_0x2ef574[_0xc79f('0x25')][_0xc79f('0x2f')]){_0x9bd278[_0xc79f('0x30')]=[{'all':!![]}];}_0x9bd278=_[_0xc79f('0x31')]({},_0x9bd278,_0x2ef574['options']);return db['SmsInteraction'][_0xc79f('0x32')](_0x9bd278)[_0xc79f('0x18')](handleEntityNotFound(_0x23f1be,null))['then'](respondWithResult(_0x23f1be,null))[_0xc79f('0x26')](handleError(_0x23f1be,null));};exports['create']=function(_0x339ad1,_0x259815){return db[_0xc79f('0x2b')][_0xc79f('0x33')](_0x339ad1[_0xc79f('0x34')],{})[_0xc79f('0x18')](respondWithResult(_0x259815,0xc9))[_0xc79f('0x26')](handleError(_0x259815,null));};exports['update']=function(_0x55fe85,_0x2613a8){if(_0x55fe85[_0xc79f('0x34')]['id']){delete _0x55fe85['body']['id'];}return db[_0xc79f('0x2b')][_0xc79f('0x32')]({'where':{'id':_0x55fe85[_0xc79f('0x28')]['id']}})['then'](handleEntityNotFound(_0x2613a8,null))[_0xc79f('0x18')](saveUpdates(_0x55fe85[_0xc79f('0x34')],null))[_0xc79f('0x18')](respondWithResult(_0x2613a8,null))['catch'](handleError(_0x2613a8,null));};exports[_0xc79f('0x19')]=function(_0x373a1e,_0x465647){return db[_0xc79f('0x2b')][_0xc79f('0x32')]({'where':{'id':_0x373a1e[_0xc79f('0x28')]['id']}})[_0xc79f('0x18')](handleEntityNotFound(_0x465647,null))[_0xc79f('0x18')](removeEntity(_0x465647,null))['catch'](handleError(_0x465647,null));};exports[_0xc79f('0x35')]=function(_0x5ae59d,_0x4e67e7){return db[_0xc79f('0x2b')][_0xc79f('0x35')]()[_0xc79f('0x18')](respondWithResult(_0x4e67e7,null))['catch'](handleError(_0x4e67e7,null));};exports['addMessage']=function(_0x2a4d2c,_0x3ca2be){return db[_0xc79f('0x36')][_0xc79f('0x32')]({'where':{'id':_0x2a4d2c[_0xc79f('0x28')]['id']}})[_0xc79f('0x18')](handleEntityNotFound(_0x3ca2be,null))[_0xc79f('0x18')](function(_0x3a94a5){if(_0x3a94a5){return _0x3a94a5[_0xc79f('0x37')](_0x2a4d2c[_0xc79f('0x34')]['ids'],_[_0xc79f('0x38')](_0x2a4d2c['body'],[_0xc79f('0x39'),'id'])||{});}})['then'](respondWithResult(_0x3ca2be,null))[_0xc79f('0x26')](handleError(_0x3ca2be,null));};exports[_0xc79f('0x3a')]=function(_0x3d2cc0,_0x3b9bd3){var _0x25c595={'raw':![],'where':{}};var _0x516a30={};var _0xdca12e={'count':0x0,'rows':[]};return db['SmsInteraction'][_0xc79f('0x3b')]({'where':{'id':_0x3d2cc0[_0xc79f('0x28')]['id']}})[_0xc79f('0x18')](handleEntityNotFound(_0x3b9bd3,null))[_0xc79f('0x18')](function(_0x45de38){if(_0x45de38){_0x516a30[_0xc79f('0x29')]=_['keys'](db[_0xc79f('0x36')][_0xc79f('0x1f')]);_0x516a30[_0xc79f('0x25')]=_[_0xc79f('0x2a')](_0x3d2cc0[_0xc79f('0x25')]);_0x516a30[_0xc79f('0x3c')]=_['intersection'](_0x516a30[_0xc79f('0x29')],_0x516a30[_0xc79f('0x25')]);_0x25c595[_0xc79f('0x2d')]=_['intersection'](_0x516a30[_0xc79f('0x29')],qs[_0xc79f('0x2c')](_0x3d2cc0[_0xc79f('0x25')][_0xc79f('0x2c')]));_0x25c595[_0xc79f('0x2d')]=_0x25c595['attributes'][_0xc79f('0x2e')]?_0x25c595[_0xc79f('0x2d')]:_0x516a30['model'];if(!_0x3d2cc0[_0xc79f('0x25')][_0xc79f('0x3d')](_0xc79f('0x3e'))){_0x25c595['limit']=qs[_0xc79f('0x14')](_0x3d2cc0[_0xc79f('0x25')]['limit']);_0x25c595[_0xc79f('0x13')]=qs[_0xc79f('0x13')](_0x3d2cc0[_0xc79f('0x25')][_0xc79f('0x13')]);}_0x25c595[_0xc79f('0x3f')]=qs[_0xc79f('0x40')](_0x3d2cc0[_0xc79f('0x25')][_0xc79f('0x40')]);_0x25c595[_0xc79f('0x41')]=qs[_0xc79f('0x3c')](_[_0xc79f('0x42')](_0x3d2cc0['query'],_0x516a30[_0xc79f('0x3c')]));_0x25c595[_0xc79f('0x41')][_0xc79f('0x43')]=_0x45de38['id'];if(_0x3d2cc0[_0xc79f('0x25')][_0xc79f('0x44')]){_0x25c595['where']=_[_0xc79f('0x31')](_0x25c595[_0xc79f('0x41')],{'$or':_['map'](_0x25c595['attributes'],function(_0x4cebe){var _0x197416={};_0x197416[_0x4cebe]={'$like':'%'+_0x3d2cc0[_0xc79f('0x25')]['filter']+'%'};return _0x197416;})});}if(_0x3d2cc0[_0xc79f('0x25')][_0xc79f('0x45')]){var _0xbb1ee3=_0x3d2cc0[_0xc79f('0x25')][_0xc79f('0x45')]['split'](',');var _0x46a0c0={};_0x46a0c0[_0xbb1ee3[0x0]]={'$gte':moment(_0xbb1ee3[0x1])[_0xc79f('0x46')](_0xc79f('0x47'))};_0x25c595[_0xc79f('0x41')]=_['merge'](_0x25c595[_0xc79f('0x41')],_0x46a0c0);}_0x25c595=_[_0xc79f('0x31')]({},_0x25c595,_0x3d2cc0[_0xc79f('0x48')]);return db['SmsMessage']['count']({'where':_0x25c595[_0xc79f('0x41')]})[_0xc79f('0x18')](function(_0x50f1fb){_0xdca12e[_0xc79f('0x49')]=_0x50f1fb;if(_0x3d2cc0['query'][_0xc79f('0x2f')]){_0x25c595[_0xc79f('0x30')]=[{'all':!![]}];}return db[_0xc79f('0x36')][_0xc79f('0x23')](_0x25c595);})[_0xc79f('0x18')](function(_0xd49ebc){_0xdca12e[_0xc79f('0x4a')]=_0xd49ebc;return _0xdca12e;});}})[_0xc79f('0x18')](respondWithFilteredResult(_0x3b9bd3,_0x25c595))['catch'](handleError(_0x3b9bd3,null));};exports[_0xc79f('0x4b')]=function(_0x307046,_0x36641d){return db[_0xc79f('0x2b')]['find']({'where':{'id':_0x307046['params']['id']}})[_0xc79f('0x18')](handleEntityNotFound(_0x36641d,null))[_0xc79f('0x18')](function(_0x46a882){if(_0x46a882){return _0x46a882[_0xc79f('0x4c')](_0x307046[_0xc79f('0x34')][_0xc79f('0x39')],_[_0xc79f('0x38')](_0x307046[_0xc79f('0x34')],[_0xc79f('0x39'),'id'])||{})[_0xc79f('0x4d')](function(){return db[_0xc79f('0x4e')]['findAll']({'attributes':['id',_0xc79f('0x1b'),'color'],'where':{'id':_0x307046[_0xc79f('0x34')][_0xc79f('0x39')]}});})[_0xc79f('0x18')](function(_0x5668e2){socket['emit'](_0xc79f('0x4f'),{'id':Number(_0x307046[_0xc79f('0x28')]['id']),'tags':_0x5668e2||[]});return{'id':Number(_0x307046[_0xc79f('0x28')]['id']),'tags':_0x5668e2||[]};});}})[_0xc79f('0x18')](respondWithResult(_0x36641d,null))[_0xc79f('0x26')](handleError(_0x36641d,null));};exports['removeTags']=function(_0x504b2c,_0x3f7d5e){return db[_0xc79f('0x2b')][_0xc79f('0x32')]({'where':{'id':_0x504b2c[_0xc79f('0x28')]['id']}})[_0xc79f('0x18')](handleEntityNotFound(_0x3f7d5e,null))['then'](function(_0x44685c){if(_0x44685c){return _0x44685c[_0xc79f('0x50')](_0x504b2c['query'][_0xc79f('0x39')]);}})['then'](respondWithStatusCode(_0x3f7d5e,null))[_0xc79f('0x26')](handleError(_0x3f7d5e,null));};exports['download']=function(_0x511bc2,_0x3f5a7e){var _0x113a08=moment()['unix']()[_0xc79f('0x51')]();var _0x4c26e4=path[_0xc79f('0x52')](config['root'],_0xc79f('0x53'),_0xc79f('0x54'),_0xc79f('0x55'));var _0x2521c0=path[_0xc79f('0x52')](_0x4c26e4,_0x113a08);var _0xa2c160=util['format']('transcript-%d-%s.zip',_0x511bc2[_0xc79f('0x28')]['id'],_0x113a08);var _0x2d2fad=path[_0xc79f('0x52')](_0x4c26e4,_0xa2c160);var _0x4664e0=[];_0x4664e0[_0xc79f('0x56')]({'model':db[_0xc79f('0x57')],'as':_0xc79f('0x57'),'attributes':['id','fullname'],'raw':!![]});_0x4664e0[_0xc79f('0x56')]({'model':db['CmContact'],'as':_0xc79f('0x58'),'attributes':['id','firstName','lastName'],'raw':!![]});var _0x1a7c29=[{'model':db[_0xc79f('0x36')],'as':_0xc79f('0x59'),'attributes':['id','body',_0xc79f('0x5a'),_0xc79f('0x5b'),_0xc79f('0x5c'),'read'],'include':_0x4664e0}];_0x1a7c29['push']({'model':db[_0xc79f('0x5d')],'as':_0xc79f('0x5e'),'attributes':['id',_0xc79f('0x1b')]});_0x1a7c29[_0xc79f('0x56')]({'model':db['User'],'as':'Owner','attributes':['id',_0xc79f('0x5f')]});return db[_0xc79f('0x2b')][_0xc79f('0x32')]({'where':{'id':_0x511bc2['params']['id']},'include':_0x1a7c29})[_0xc79f('0x18')](handleEntityNotFound(_0x3f5a7e,null))[_0xc79f('0x18')](function(_0x7336ff){if(_0x7336ff){var _0x43c690=_0x7336ff[_0xc79f('0x60')]({'plain':!![]});fs[_0xc79f('0x61')](_0x2521c0);var _0x1f928a={'channel':'Sms','account':_0x43c690['Account'][_0xc79f('0x1b')],'agent':_0x43c690[_0xc79f('0x62')]?_0x43c690['Owner'][_0xc79f('0x5f')]:_0xc79f('0x63'),'createdAt':moment(_0x43c690['createdAt'])['format']('YYYY-MM-DD\x20HH:mm:ss')[_0xc79f('0x51')](),'closedAt':_0x43c690['closed']?moment(_0x43c690['closedAt'])[_0xc79f('0x46')](_0xc79f('0x47'))[_0xc79f('0x51')]():'','disposition':_0x43c690['disposition'],'messages':_(_0x43c690[_0xc79f('0x59')])['filter']({'secret':![]})[_0xc79f('0x1e')](function(_0x5315d){return{'date':moment(_0x5315d[_0xc79f('0x5a')])['format'](_0xc79f('0x47'))[_0xc79f('0x51')](),'sender':_0x5315d['direction']===_0xc79f('0x64')?_0x5315d[_0xc79f('0x57')]?_0x5315d[_0xc79f('0x57')][_0xc79f('0x5f')]:_0xc79f('0x65'):_0x5315d[_0xc79f('0x58')][_0xc79f('0x66')]+(_0x5315d['Contact']['lastName']?'\x20'+_0x5315d[_0xc79f('0x58')][_0xc79f('0x67')]:''),'body':_0x5315d['body'],'direction':_0x5315d[_0xc79f('0x5b')]===_0xc79f('0x64')?'A':'C','secret':_0x5315d['secret'],'read':_0x5315d[_0xc79f('0x68')]};})['value']()};return ejs['renderFile'](path['join'](config[_0xc79f('0x69')],_0xc79f('0x53'),'views','downloadInteraction.ejs'),{'interaction':_0x1f928a})['then'](function(_0x20e4c6){var _0x3d4b76=path[_0xc79f('0x52')](_0x2521c0,'transcript-'+_0x43c690['id']+'-'+_0x113a08+_0xc79f('0x6a'));var _0x3a8ce7={'path':_0x3d4b76,'channel':_0xc79f('0x6b'),'interactionId':_0x43c690['id']};return pdf[_0xc79f('0x6c')](_0x20e4c6,_0x3a8ce7);})[_0xc79f('0x18')](function(){return new BPromise(function(_0x3aaddd,_0x2f4303){zipdir(_0x2521c0,{'saveTo':_0x2d2fad},function(_0x29dc27,_0x10c7ae){if(_0x29dc27)return _0x2f4303(_0x29dc27);return _0x3aaddd(_0x10c7ae);});})[_0xc79f('0x18')](function(){return new BPromise(function(_0x5c75e1,_0x4e42d4){rimraf(_0x2521c0,function(_0x37d5fe){if(_0x37d5fe)_0x4e42d4(_0x37d5fe);return _0x5c75e1();});});})['then'](function(){return _0x3f5a7e[_0xc79f('0x6d')](_0x2d2fad,_0xa2c160,function(_0x5d2454){if(_0x5d2454){console[_0xc79f('0x6e')]('err',_0x5d2454);}else{fs[_0xc79f('0x6f')](_0x2d2fad);}});});});}else{return _0x3f5a7e[_0xc79f('0xf')](0xc8);}})[_0xc79f('0x26')](handleError(_0x3f5a7e,null));}; \ No newline at end of file diff --git a/server/api/smsInteraction/smsInteraction.events.js b/server/api/smsInteraction/smsInteraction.events.js index 6db4e22..f428e84 100644 --- a/server/api/smsInteraction/smsInteraction.events.js +++ b/server/api/smsInteraction/smsInteraction.events.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xf4f4=['findAll','unreadMessages','length','emit','hook','exports','events','../../mysqldb','SmsMessage','setMaxListeners','save','update','getUsers','then','setDataValue','Users','map'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0xf4f4,0xe3));var _0x4f4f=function(_0x412458,_0x8db8d6){_0x412458=_0x412458-0x0;var _0x3be5f9=_0xf4f4[_0x412458];return _0x3be5f9;};'use strict';var EventEmitter=require(_0x4f4f('0x0'));var SmsInteraction=require(_0x4f4f('0x1'))['db']['SmsInteraction'];var SmsMessage=require(_0x4f4f('0x1'))['db'][_0x4f4f('0x2')];var SmsInteractionEvents=new EventEmitter();SmsInteractionEvents[_0x4f4f('0x3')](0x0);var events={'afterCreate':_0x4f4f('0x4'),'afterUpdate':_0x4f4f('0x5'),'afterDestroy':'remove'};function emitEvent(_0x5a752b){return function(_0x593952,_0x3f274d,_0x132d5c){_0x593952[_0x4f4f('0x6')]({'attributes':['id'],'raw':!![]})[_0x4f4f('0x7')](function(_0x3c4877){_0x593952[_0x4f4f('0x8')](_0x4f4f('0x9'),_0x3c4877[_0x4f4f('0xa')](function(_0x48f6b9){return{'id':_0x48f6b9['id']};}));return SmsMessage[_0x4f4f('0xb')]({'where':{'SmsInteractionId':_0x593952['id'],'direction':'in','read':![]},'raw':!![]});})[_0x4f4f('0x7')](function(_0x39e36b){_0x593952[_0x4f4f('0x8')](_0x4f4f('0xc'),_0x39e36b[_0x4f4f('0xd')]);SmsInteractionEvents[_0x4f4f('0xe')](_0x5a752b+':'+_0x593952['id'],_0x593952);SmsInteractionEvents[_0x4f4f('0xe')](_0x5a752b,_0x593952);_0x132d5c(null);})['catch'](_0x132d5c(null));};}for(var e in events){if(events['hasOwnProperty'](e)){var event=events[e];SmsInteraction[_0x4f4f('0xf')](e,emitEvent(event));}}module[_0x4f4f('0x10')]=SmsInteractionEvents; \ No newline at end of file +var _0x1a85=['then','unreadMessages','length','emit','catch','hasOwnProperty','hook','exports','SmsInteraction','../../mysqldb','SmsMessage','update','remove','getUsers','setDataValue','map'];(function(_0x44fbda,_0x15d0e8){var _0x4cd474=function(_0x307104){while(--_0x307104){_0x44fbda['push'](_0x44fbda['shift']());}};_0x4cd474(++_0x15d0e8);}(_0x1a85,0x178));var _0x51a8=function(_0x2b91c5,_0x3b6db5){_0x2b91c5=_0x2b91c5-0x0;var _0xbd5531=_0x1a85[_0x2b91c5];return _0xbd5531;};'use strict';var EventEmitter=require('events');var SmsInteraction=require('../../mysqldb')['db'][_0x51a8('0x0')];var SmsMessage=require(_0x51a8('0x1'))['db'][_0x51a8('0x2')];var SmsInteractionEvents=new EventEmitter();SmsInteractionEvents['setMaxListeners'](0x0);var events={'afterCreate':'save','afterUpdate':_0x51a8('0x3'),'afterDestroy':_0x51a8('0x4')};function emitEvent(_0x99e371){return function(_0x48a21b,_0xaac0bf,_0x4b76a8){_0x48a21b[_0x51a8('0x5')]({'attributes':['id'],'raw':!![]})['then'](function(_0x331117){_0x48a21b[_0x51a8('0x6')]('Users',_0x331117[_0x51a8('0x7')](function(_0x513685){return{'id':_0x513685['id']};}));return SmsMessage['findAll']({'where':{'SmsInteractionId':_0x48a21b['id'],'direction':'in','read':![]},'raw':!![]});})[_0x51a8('0x8')](function(_0x2f276b){_0x48a21b[_0x51a8('0x6')](_0x51a8('0x9'),_0x2f276b[_0x51a8('0xa')]);SmsInteractionEvents[_0x51a8('0xb')](_0x99e371+':'+_0x48a21b['id'],_0x48a21b);SmsInteractionEvents[_0x51a8('0xb')](_0x99e371,_0x48a21b);_0x4b76a8(null);})[_0x51a8('0xc')](_0x4b76a8(null));};}for(var e in events){if(events[_0x51a8('0xd')](e)){var event=events[e];SmsInteraction[_0x51a8('0xe')](e,emitEvent(event));}}module[_0x51a8('0xf')]=SmsInteractionEvents; \ No newline at end of file diff --git a/server/api/smsInteraction/smsInteraction.model.js b/server/api/smsInteraction/smsInteraction.model.js index c6e8295..8d6ed19 100644 --- a/server/api/smsInteraction/smsInteraction.model.js +++ b/server/api/smsInteraction/smsInteraction.model.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xc376=['../../config/environment','./smsInteraction.attributes','define','SmsInteraction','sms_interactions','changed','closed','format','YYYY-MM-DD\x20HH:mm:ss','lodash','util','../../config/logger','api','request-promise','rimraf'];(function(_0x4c95a1,_0x41e220){var _0x10e48b=function(_0x59f157){while(--_0x59f157){_0x4c95a1['push'](_0x4c95a1['shift']());}};_0x10e48b(++_0x41e220);}(_0xc376,0x1cb));var _0x6c37=function(_0x3333bb,_0x1df222){_0x3333bb=_0x3333bb-0x0;var _0x273d39=_0xc376[_0x3333bb];return _0x273d39;};'use strict';var _=require(_0x6c37('0x0'));var util=require(_0x6c37('0x1'));var logger=require(_0x6c37('0x2'))(_0x6c37('0x3'));var moment=require('moment');var BPromise=require('bluebird');var rp=require(_0x6c37('0x4'));var fs=require('fs');var path=require('path');var rimraf=require(_0x6c37('0x5'));var config=require(_0x6c37('0x6'));var attributes=require(_0x6c37('0x7'));module['exports']=function(_0x3981a5,_0x68eab5){return _0x3981a5[_0x6c37('0x8')](_0x6c37('0x9'),attributes,{'tableName':_0x6c37('0xa'),'paranoid':![],'indexes':[],'timestamps':!![],'hooks':{'beforeUpdate':function(_0x531c50,_0x56fde7,_0x2bf301){if(_0x531c50[_0x6c37('0xb')](_0x6c37('0xc'))){_0x531c50['closedAt']=moment()[_0x6c37('0xd')](_0x6c37('0xe'));}_0x2bf301(null,_0x531c50);}}});}; \ No newline at end of file +var _0x44d2=['format','lodash','api','bluebird','request-promise','rimraf','../../config/environment','./smsInteraction.attributes','define','SmsInteraction','closed','closedAt'];(function(_0x43a8da,_0x3773a0){var _0x4d5920=function(_0x33b01a){while(--_0x33b01a){_0x43a8da['push'](_0x43a8da['shift']());}};_0x4d5920(++_0x3773a0);}(_0x44d2,0x181));var _0x244d=function(_0x502c7d,_0x2f1285){_0x502c7d=_0x502c7d-0x0;var _0x30b7ed=_0x44d2[_0x502c7d];return _0x30b7ed;};'use strict';var _=require(_0x244d('0x0'));var util=require('util');var logger=require('../../config/logger')(_0x244d('0x1'));var moment=require('moment');var BPromise=require(_0x244d('0x2'));var rp=require(_0x244d('0x3'));var fs=require('fs');var path=require('path');var rimraf=require(_0x244d('0x4'));var config=require(_0x244d('0x5'));var attributes=require(_0x244d('0x6'));module['exports']=function(_0x23c8aa,_0x3272a2){return _0x23c8aa[_0x244d('0x7')](_0x244d('0x8'),attributes,{'tableName':'sms_interactions','paranoid':![],'indexes':[],'timestamps':!![],'hooks':{'beforeUpdate':function(_0x1dc3a3,_0x2be310,_0x41525d){if(_0x1dc3a3['changed'](_0x244d('0x9'))){_0x1dc3a3[_0x244d('0xa')]=moment()[_0x244d('0xb')]('YYYY-MM-DD\x20HH:mm:ss');}_0x41525d(null,_0x1dc3a3);}}});}; \ No newline at end of file diff --git a/server/api/smsInteraction/smsInteraction.rpc.js b/server/api/smsInteraction/smsInteraction.rpc.js index 4cfd891..9f717ff 100644 --- a/server/api/smsInteraction/smsInteraction.rpc.js +++ b/server/api/smsInteraction/smsInteraction.rpc.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xe8f0=['request','then','info','SmsInteraction,\x20%s,\x20%s','request\x20sent','SmsInteraction,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','UpdateSmsInteraction','SmsInteraction','update','body','options','where','attributes','limit','catch','find','ids','AddTags','debug','util','bluebird','randomstring','ioredis','../../config/utils','../../config/logger','rpc','jayson/promise','client','http','redis','defaults','localhost','./smsInteraction.socket','register'];(function(_0x13018f,_0x51852b){var _0x340d6b=function(_0x30b098){while(--_0x30b098){_0x13018f['push'](_0x13018f['shift']());}};_0x340d6b(++_0x51852b);}(_0xe8f0,0x66));var _0x0e8f=function(_0x688c7f,_0x559b4b){_0x688c7f=_0x688c7f-0x0;var _0x5cb4c7=_0xe8f0[_0x688c7f];return _0x5cb4c7;};'use strict';var _=require('lodash');var util=require(_0x0e8f('0x0'));var moment=require('moment');var BPromise=require(_0x0e8f('0x1'));var rs=require(_0x0e8f('0x2'));var fs=require('fs');var Redis=require(_0x0e8f('0x3'));var db=require('../../mysqldb')['db'];var utils=require(_0x0e8f('0x4'));var logger=require(_0x0e8f('0x5'))(_0x0e8f('0x6'));var config=require('../../config/environment');var jayson=require(_0x0e8f('0x7'));var client=jayson[_0x0e8f('0x8')][_0x0e8f('0x9')]({'port':0x232a});config[_0x0e8f('0xa')]=_[_0x0e8f('0xb')](config[_0x0e8f('0xa')],{'host':_0x0e8f('0xc'),'port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config[_0x0e8f('0xa')]));require(_0x0e8f('0xd'))[_0x0e8f('0xe')](socket);function respondWithRpcPromise(_0x4933c5,_0x3caeac,_0x533556){return new BPromise(function(_0x1ed0a3,_0x34d9e4){return client[_0x0e8f('0xf')](_0x4933c5,_0x533556)[_0x0e8f('0x10')](function(_0x46c3bf){logger[_0x0e8f('0x11')](_0x0e8f('0x12'),_0x3caeac,_0x0e8f('0x13'));logger['debug'](_0x0e8f('0x14'),_0x3caeac,_0x0e8f('0x13'),JSON[_0x0e8f('0x15')](_0x46c3bf));if(_0x46c3bf[_0x0e8f('0x16')]){if(_0x46c3bf[_0x0e8f('0x16')][_0x0e8f('0x17')]===0x1f4){logger[_0x0e8f('0x16')](_0x0e8f('0x12'),_0x3caeac,_0x46c3bf[_0x0e8f('0x16')]['message']);return _0x34d9e4(_0x46c3bf[_0x0e8f('0x16')][_0x0e8f('0x18')]);}logger[_0x0e8f('0x16')]('SmsInteraction,\x20%s,\x20%s',_0x3caeac,_0x46c3bf[_0x0e8f('0x16')]['message']);return _0x1ed0a3(_0x46c3bf[_0x0e8f('0x16')][_0x0e8f('0x18')]);}else{logger[_0x0e8f('0x11')](_0x0e8f('0x12'),_0x3caeac,_0x0e8f('0x13'));_0x1ed0a3(_0x46c3bf[_0x0e8f('0x19')][_0x0e8f('0x18')]);}})['catch'](function(_0x26dd15){logger[_0x0e8f('0x16')](_0x0e8f('0x12'),_0x3caeac,_0x26dd15);_0x34d9e4(_0x26dd15);});});}exports[_0x0e8f('0x1a')]=function(_0x50befb){var _0x3f0a72=this;return new Promise(function(_0x5bef17,_0xde29df){return db[_0x0e8f('0x1b')][_0x0e8f('0x1c')](_0x50befb[_0x0e8f('0x1d')],{'raw':_0x50befb[_0x0e8f('0x1e')]?_0x50befb[_0x0e8f('0x1e')]['raw']===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x50befb[_0x0e8f('0x1e')]?_0x50befb[_0x0e8f('0x1e')][_0x0e8f('0x1f')]||null:null,'attributes':_0x50befb[_0x0e8f('0x1e')]?_0x50befb['options'][_0x0e8f('0x20')]||null:null,'limit':_0x50befb[_0x0e8f('0x1e')]?_0x50befb[_0x0e8f('0x1e')][_0x0e8f('0x21')]||null:null})[_0x0e8f('0x10')](function(_0x469e3b){logger[_0x0e8f('0x11')](_0x0e8f('0x1a'),_0x50befb);logger['debug'](_0x0e8f('0x1a'),_0x50befb,JSON['stringify'](_0x469e3b));_0x5bef17(_0x469e3b);})[_0x0e8f('0x22')](function(_0x7e055d){logger['error'](_0x0e8f('0x1a'),_0x7e055d[_0x0e8f('0x18')],_0x50befb);_0xde29df(_0x3f0a72[_0x0e8f('0x16')](0x1f4,_0x7e055d[_0x0e8f('0x18')]));});});};exports['AddTagsToSmsInteraction']=function(_0x1279f0){return new Promise(function(_0x333533,_0x41b959){return db[_0x0e8f('0x1b')][_0x0e8f('0x23')]({'where':_0x1279f0['options']?_0x1279f0[_0x0e8f('0x1e')][_0x0e8f('0x1f')]||null:null})['then'](function(_0x2a588c){if(_0x2a588c){return _0x2a588c['addTags'](_0x1279f0[_0x0e8f('0x1d')][_0x0e8f('0x24')],_['omit'](_0x1279f0[_0x0e8f('0x1d')],[_0x0e8f('0x24'),'id'])||{});}})['spread'](function(_0x56fe34){logger[_0x0e8f('0x11')](_0x0e8f('0x25'),_0x1279f0);logger[_0x0e8f('0x26')](_0x0e8f('0x25'),_0x1279f0,JSON[_0x0e8f('0x15')](_0x56fe34));_0x333533(_0x56fe34);})[_0x0e8f('0x22')](function(_0x293623){logger[_0x0e8f('0x16')]('AddTags',_0x293623[_0x0e8f('0x18')],_0x1279f0);_0x41b959(_this[_0x0e8f('0x16')](0x1f4,_0x293623[_0x0e8f('0x18')]));});});}; \ No newline at end of file +var _0xd162=['jayson/promise','client','http','defaults','redis','./smsInteraction.socket','request','then','info','SmsInteraction,\x20%s,\x20%s','request\x20sent','debug','error','code','message','result','catch','update','body','options','raw','where','attributes','stringify','AddTagsToSmsInteraction','SmsInteraction','find','ids','omit','spread','AddTags','lodash','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment'];(function(_0x531117,_0x275d09){var _0xe2335d=function(_0x2eb842){while(--_0x2eb842){_0x531117['push'](_0x531117['shift']());}};_0xe2335d(++_0x275d09);}(_0xd162,0x16f));var _0x2d16=function(_0x115621,_0x341cde){_0x115621=_0x115621-0x0;var _0x5ef5ce=_0xd162[_0x115621];return _0x5ef5ce;};'use strict';var _=require(_0x2d16('0x0'));var util=require(_0x2d16('0x1'));var moment=require(_0x2d16('0x2'));var BPromise=require(_0x2d16('0x3'));var rs=require(_0x2d16('0x4'));var fs=require('fs');var Redis=require(_0x2d16('0x5'));var db=require(_0x2d16('0x6'))['db'];var utils=require(_0x2d16('0x7'));var logger=require(_0x2d16('0x8'))(_0x2d16('0x9'));var config=require(_0x2d16('0xa'));var jayson=require(_0x2d16('0xb'));var client=jayson[_0x2d16('0xc')][_0x2d16('0xd')]({'port':0x232a});config['redis']=_[_0x2d16('0xe')](config['redis'],{'host':'localhost','port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config[_0x2d16('0xf')]));require(_0x2d16('0x10'))['register'](socket);function respondWithRpcPromise(_0x5837f3,_0x5eba93,_0x48379b){return new BPromise(function(_0x2f674e,_0x1648bb){return client[_0x2d16('0x11')](_0x5837f3,_0x48379b)[_0x2d16('0x12')](function(_0x354677){logger[_0x2d16('0x13')](_0x2d16('0x14'),_0x5eba93,_0x2d16('0x15'));logger[_0x2d16('0x16')]('SmsInteraction,\x20%s,\x20%s,\x20%s',_0x5eba93,_0x2d16('0x15'),JSON['stringify'](_0x354677));if(_0x354677[_0x2d16('0x17')]){if(_0x354677[_0x2d16('0x17')][_0x2d16('0x18')]===0x1f4){logger[_0x2d16('0x17')](_0x2d16('0x14'),_0x5eba93,_0x354677[_0x2d16('0x17')][_0x2d16('0x19')]);return _0x1648bb(_0x354677['error']['message']);}logger[_0x2d16('0x17')](_0x2d16('0x14'),_0x5eba93,_0x354677[_0x2d16('0x17')][_0x2d16('0x19')]);return _0x2f674e(_0x354677[_0x2d16('0x17')][_0x2d16('0x19')]);}else{logger[_0x2d16('0x13')](_0x2d16('0x14'),_0x5eba93,_0x2d16('0x15'));_0x2f674e(_0x354677[_0x2d16('0x1a')][_0x2d16('0x19')]);}})[_0x2d16('0x1b')](function(_0x23764c){logger[_0x2d16('0x17')](_0x2d16('0x14'),_0x5eba93,_0x23764c);_0x1648bb(_0x23764c);});});}exports['UpdateSmsInteraction']=function(_0x28dcb7){var _0x1bc924=this;return new Promise(function(_0x1736d7,_0x547ee6){return db['SmsInteraction'][_0x2d16('0x1c')](_0x28dcb7[_0x2d16('0x1d')],{'raw':_0x28dcb7['options']?_0x28dcb7[_0x2d16('0x1e')][_0x2d16('0x1f')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x28dcb7[_0x2d16('0x1e')]?_0x28dcb7[_0x2d16('0x1e')][_0x2d16('0x20')]||null:null,'attributes':_0x28dcb7['options']?_0x28dcb7[_0x2d16('0x1e')][_0x2d16('0x21')]||null:null,'limit':_0x28dcb7['options']?_0x28dcb7[_0x2d16('0x1e')]['limit']||null:null})['then'](function(_0x182b63){logger[_0x2d16('0x13')]('UpdateSmsInteraction',_0x28dcb7);logger[_0x2d16('0x16')]('UpdateSmsInteraction',_0x28dcb7,JSON[_0x2d16('0x22')](_0x182b63));_0x1736d7(_0x182b63);})[_0x2d16('0x1b')](function(_0x541f4b){logger[_0x2d16('0x17')]('UpdateSmsInteraction',_0x541f4b[_0x2d16('0x19')],_0x28dcb7);_0x547ee6(_0x1bc924[_0x2d16('0x17')](0x1f4,_0x541f4b[_0x2d16('0x19')]));});});};exports[_0x2d16('0x23')]=function(_0x128b74){return new Promise(function(_0x338001,_0xbc640a){return db[_0x2d16('0x24')][_0x2d16('0x25')]({'where':_0x128b74[_0x2d16('0x1e')]?_0x128b74[_0x2d16('0x1e')][_0x2d16('0x20')]||null:null})[_0x2d16('0x12')](function(_0x34fce8){if(_0x34fce8){return _0x34fce8['addTags'](_0x128b74[_0x2d16('0x1d')][_0x2d16('0x26')],_[_0x2d16('0x27')](_0x128b74[_0x2d16('0x1d')],['ids','id'])||{});}})[_0x2d16('0x28')](function(_0x32ebb0){logger[_0x2d16('0x13')](_0x2d16('0x29'),_0x128b74);logger[_0x2d16('0x16')](_0x2d16('0x29'),_0x128b74,JSON[_0x2d16('0x22')](_0x32ebb0));_0x338001(_0x32ebb0);})[_0x2d16('0x1b')](function(_0x33e0dd){logger['error'](_0x2d16('0x29'),_0x33e0dd['message'],_0x128b74);_0xbc640a(_this[_0x2d16('0x17')](0x1f4,_0x33e0dd['message']));});});}; \ No newline at end of file diff --git a/server/api/smsInteraction/smsInteraction.socket.js b/server/api/smsInteraction/smsInteraction.socket.js index 58759f8..346d3ae 100644 --- a/server/api/smsInteraction/smsInteraction.socket.js +++ b/server/api/smsInteraction/smsInteraction.socket.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xc03a=['update','emit','removeListener','register','length','smsInteraction:','./smsInteraction.events','save'];(function(_0x3f6fe1,_0xb63339){var _0x5d40ff=function(_0xff1b95){while(--_0xff1b95){_0x3f6fe1['push'](_0x3f6fe1['shift']());}};_0x5d40ff(++_0xb63339);}(_0xc03a,0x1d6));var _0xac03=function(_0x25b61a,_0x1f0354){_0x25b61a=_0x25b61a-0x0;var _0x2da7ed=_0xc03a[_0x25b61a];return _0x2da7ed;};'use strict';var SmsInteractionEvents=require(_0xac03('0x0'));var events=[_0xac03('0x1'),'remove',_0xac03('0x2')];function createListener(_0x14d251,_0x2ba223){return function(_0x51e0bb){_0x2ba223[_0xac03('0x3')](_0x14d251,_0x51e0bb);};}function removeListener(_0x48e8a3,_0x3f5b91){return function(){SmsInteractionEvents[_0xac03('0x4')](_0x48e8a3,_0x3f5b91);};}exports[_0xac03('0x5')]=function(_0x285bc1){for(var _0x2e72d9=0x0,_0x2e4ccb=events[_0xac03('0x6')];_0x2e72d9<_0x2e4ccb;_0x2e72d9++){var _0x1cda3e=events[_0x2e72d9];var _0x485e19=createListener(_0xac03('0x7')+_0x1cda3e,_0x285bc1);SmsInteractionEvents['on'](_0x1cda3e,_0x485e19);}}; \ No newline at end of file +var _0xffbb=['register','smsInteraction:','./smsInteraction.events','save','remove','update','emit','removeListener'];(function(_0x472de9,_0x3fe492){var _0x105151=function(_0x11145e){while(--_0x11145e){_0x472de9['push'](_0x472de9['shift']());}};_0x105151(++_0x3fe492);}(_0xffbb,0x15a));var _0xbffb=function(_0x3eb95b,_0x244ade){_0x3eb95b=_0x3eb95b-0x0;var _0x4f11b2=_0xffbb[_0x3eb95b];return _0x4f11b2;};'use strict';var SmsInteractionEvents=require(_0xbffb('0x0'));var events=[_0xbffb('0x1'),_0xbffb('0x2'),_0xbffb('0x3')];function createListener(_0x150a16,_0x3aa2eb){return function(_0x11ccb2){_0x3aa2eb[_0xbffb('0x4')](_0x150a16,_0x11ccb2);};}function removeListener(_0x5b5bf2,_0x56c9a6){return function(){SmsInteractionEvents[_0xbffb('0x5')](_0x5b5bf2,_0x56c9a6);};}exports[_0xbffb('0x6')]=function(_0x203eb5){for(var _0x1df9b0=0x0,_0x40b6f6=events['length'];_0x1df9b0<_0x40b6f6;_0x1df9b0++){var _0x1bac9f=events[_0x1df9b0];var _0x447d4c=createListener(_0xbffb('0x7')+_0x1bac9f,_0x203eb5);SmsInteractionEvents['on'](_0x1bac9f,_0x447d4c);}}; \ No newline at end of file diff --git a/server/api/smsMessage/index.js b/server/api/smsMessage/index.js index 56b2187..ba08b11 100644 --- a/server/api/smsMessage/index.js +++ b/server/api/smsMessage/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x9715=['post','isAuthenticated','sms','smsmessage:create','create','/:id/status','status','put','/:id/accept','accept','reject','delete','destroy','multer','util','path','connect-timeout','express','Router','fs-extra','../../config/environment','get','index','/describe','describe','/:id'];(function(_0x117d25,_0xd6769f){var _0x50f8e8=function(_0x273b9a){while(--_0x273b9a){_0x117d25['push'](_0x117d25['shift']());}};_0x50f8e8(++_0xd6769f);}(_0x9715,0x15f));var _0x5971=function(_0x53d644,_0x13c262){_0x53d644=_0x53d644-0x0;var _0x3d7f8f=_0x9715[_0x53d644];return _0x3d7f8f;};'use strict';var multer=require(_0x5971('0x0'));var util=require(_0x5971('0x1'));var path=require(_0x5971('0x2'));var timeout=require(_0x5971('0x3'));var express=require(_0x5971('0x4'));var router=express[_0x5971('0x5')]();var fs_extra=require(_0x5971('0x6'));var auth=require('../../components/auth/service');var interaction=require('../../components/interaction/service');var config=require(_0x5971('0x7'));var controller=require('./smsMessage.controller');router[_0x5971('0x8')]('/',auth['isAuthenticated'](),controller[_0x5971('0x9')]);router['get'](_0x5971('0xa'),auth['isAuthenticated'](),controller[_0x5971('0xb')]);router[_0x5971('0x8')](_0x5971('0xc'),auth['isAuthenticated'](),controller['show']);router[_0x5971('0xd')]('/',auth[_0x5971('0xe')](),interaction['tracked'](_0x5971('0xf'),_0x5971('0x10')),controller[_0x5971('0x11')]);router['post'](_0x5971('0x12'),controller[_0x5971('0x13')]);router['put']('/:id',auth['isAuthenticated'](),controller['update']);router[_0x5971('0x14')](_0x5971('0x15'),auth[_0x5971('0xe')](),controller[_0x5971('0x16')]);router[_0x5971('0x14')]('/:id/reject',auth[_0x5971('0xe')](),controller[_0x5971('0x17')]);router[_0x5971('0x18')](_0x5971('0xc'),auth['isAuthenticated'](),controller[_0x5971('0x19')]);module['exports']=router; \ No newline at end of file +var _0x38d1=['util','path','connect-timeout','Router','fs-extra','../../components/interaction/service','index','get','/describe','isAuthenticated','describe','/:id','show','tracked','sms','smsmessage:create','create','post','/:id/status','/:id/accept','accept','put','/:id/reject','reject','destroy','exports','multer'];(function(_0x475d4a,_0x5d3524){var _0x2ab27a=function(_0x2db427){while(--_0x2db427){_0x475d4a['push'](_0x475d4a['shift']());}};_0x2ab27a(++_0x5d3524);}(_0x38d1,0xf2));var _0x138d=function(_0x6edcdb,_0x39496c){_0x6edcdb=_0x6edcdb-0x0;var _0x39f6ed=_0x38d1[_0x6edcdb];return _0x39f6ed;};'use strict';var multer=require(_0x138d('0x0'));var util=require(_0x138d('0x1'));var path=require(_0x138d('0x2'));var timeout=require(_0x138d('0x3'));var express=require('express');var router=express[_0x138d('0x4')]();var fs_extra=require(_0x138d('0x5'));var auth=require('../../components/auth/service');var interaction=require(_0x138d('0x6'));var config=require('../../config/environment');var controller=require('./smsMessage.controller');router['get']('/',auth['isAuthenticated'](),controller[_0x138d('0x7')]);router[_0x138d('0x8')](_0x138d('0x9'),auth[_0x138d('0xa')](),controller[_0x138d('0xb')]);router[_0x138d('0x8')](_0x138d('0xc'),auth['isAuthenticated'](),controller[_0x138d('0xd')]);router['post']('/',auth[_0x138d('0xa')](),interaction[_0x138d('0xe')](_0x138d('0xf'),_0x138d('0x10')),controller[_0x138d('0x11')]);router[_0x138d('0x12')](_0x138d('0x13'),controller['status']);router['put'](_0x138d('0xc'),auth[_0x138d('0xa')](),controller['update']);router['put'](_0x138d('0x14'),auth[_0x138d('0xa')](),controller[_0x138d('0x15')]);router[_0x138d('0x16')](_0x138d('0x17'),auth['isAuthenticated'](),controller[_0x138d('0x18')]);router['delete'](_0x138d('0xc'),auth['isAuthenticated'](),controller[_0x138d('0x19')]);module[_0x138d('0x1a')]=router; \ No newline at end of file diff --git a/server/api/smsMessage/smsMessage.attributes.js b/server/api/smsMessage/smsMessage.attributes.js index fd6aaab..07772d2 100644 --- a/server/api/smsMessage/smsMessage.attributes.js +++ b/server/api/smsMessage/smsMessage.attributes.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x54eb=['exports','TEXT','medium','ENUM','out','STRING','BOOLEAN','sequelize'];(function(_0x59b2f4,_0x2a3145){var _0x18a176=function(_0x5d2fba){while(--_0x5d2fba){_0x59b2f4['push'](_0x59b2f4['shift']());}};_0x18a176(++_0x2a3145);}(_0x54eb,0x6f));var _0xb54e=function(_0x1d1779,_0x284147){_0x1d1779=_0x1d1779-0x0;var _0x2377e9=_0x54eb[_0x1d1779];return _0x2377e9;};'use strict';var Sequelize=require(_0xb54e('0x0'));module[_0xb54e('0x1')]={'body':{'type':Sequelize[_0xb54e('0x2')](_0xb54e('0x3')),'allowNull':![]},'read':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'direction':{'type':Sequelize[_0xb54e('0x4')]('in','out'),'defaultValue':_0xb54e('0x5'),'allowNull':![]},'messageId':{'type':Sequelize['STRING'](0xbe)},'phone':{'type':Sequelize[_0xb54e('0x6')]},'readAt':{'type':Sequelize['DATE']},'secret':{'type':Sequelize[_0xb54e('0x7')],'defaultValue':![]},'providerName':{'type':Sequelize[_0xb54e('0x6')]},'providerResponse':{'type':Sequelize[_0xb54e('0x2')]}}; \ No newline at end of file +var _0xb8b4=['ENUM','out','STRING','DATE','sequelize','exports','TEXT','medium','BOOLEAN'];(function(_0xe4cd9,_0x1f6ba9){var _0x1eaad6=function(_0x235025){while(--_0x235025){_0xe4cd9['push'](_0xe4cd9['shift']());}};_0x1eaad6(++_0x1f6ba9);}(_0xb8b4,0x9d));var _0x4b8b=function(_0x26fc49,_0x4f94a2){_0x26fc49=_0x26fc49-0x0;var _0x3d4d60=_0xb8b4[_0x26fc49];return _0x3d4d60;};'use strict';var Sequelize=require(_0x4b8b('0x0'));module[_0x4b8b('0x1')]={'body':{'type':Sequelize[_0x4b8b('0x2')](_0x4b8b('0x3')),'allowNull':![]},'read':{'type':Sequelize[_0x4b8b('0x4')],'defaultValue':![]},'direction':{'type':Sequelize[_0x4b8b('0x5')]('in',_0x4b8b('0x6')),'defaultValue':_0x4b8b('0x6'),'allowNull':![]},'messageId':{'type':Sequelize[_0x4b8b('0x7')](0xbe)},'phone':{'type':Sequelize[_0x4b8b('0x7')]},'readAt':{'type':Sequelize[_0x4b8b('0x8')]},'secret':{'type':Sequelize[_0x4b8b('0x4')],'defaultValue':![]},'providerName':{'type':Sequelize[_0x4b8b('0x7')]},'providerResponse':{'type':Sequelize[_0x4b8b('0x2')]}}; \ No newline at end of file diff --git a/server/api/smsMessage/smsMessage.controller.js b/server/api/smsMessage/smsMessage.controller.js index b8fd90e..4f09968 100644 --- a/server/api/smsMessage/smsMessage.controller.js +++ b/server/api/smsMessage/smsMessage.controller.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xa3eb=['SIP/%s','channel','motionChannel','event','EventManager','acceptmessage','sms','[SMSMESSAGE:REJECT]\x20id=%s\x20name=%s\x20role=%s\x20interaction=%s\x20body=%s','RejectMessage','rejectMessage','Sequelize','User','rejectmessage','SmsAccount','SmsAccountId','SmsMessage,\x20%s,\x20%s,\x20%s','received\x20delivery\x20report\x20from','inspect','twilio','MessageSid','messageId','plivo','MessageUUID','indexOf','delivered','Status','SmsAccount,\x20%s,\x20%s,\x20%s','plivio','infobip','groupName','DELIVERED','eml-format','rimraf','zip-dir','request-promise','moment','bluebird','mustache','util','path','sox','to-csv','ejs','fs-extra','lodash','squel','crypto','jsforce','desk.js','querystring','papaparse','ioredis','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','api','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','redis','defaults','./smsMessage.socket','register','client','http','request','then','info','SmsMessage,\x20%s,\x20%s','request\x20sent','debug','stringify','error','code','message','result','catch','sendStatus','end','status','undefined','limit','count','offset','Content-Range','json','apply','reject','save','update','stack','name','index','SmsMessage','rawAttributes','type','key','model','map','query','filters','attributes','intersection','fields','hasOwnProperty','nolimit','sort','where','pick','merge','VIRTUAL','options','includeAll','include','show','params','keys','length','find','create','body','destroy','describe','../../config/logger','sms-interactions','accept','read','readAt','UserId','user','agent','get','SmsInteraction','SmsInteractionId','isNil','read1stAt','YYYY-MM-DD\x20HH:mm:ss','interaction','role','null','AcceptMessage','SELECT\x20*\x20FROM\x20cm_contacts\x20WHERE\x20id\x20=\x20','ContactId','sequelize','QueryTypes','SELECT','contact','fullname','email','internal','manual','interface','format'];(function(_0x32c752,_0x47c9ab){var _0x1335e8=function(_0x4cb0ed){while(--_0x4cb0ed){_0x32c752['push'](_0x32c752['shift']());}};_0x1335e8(++_0x47c9ab);}(_0xa3eb,0x1ed));var _0xba3e=function(_0x2dafbe,_0x5d04de){_0x2dafbe=_0x2dafbe-0x0;var _0x58a45a=_0xa3eb[_0x2dafbe];return _0x58a45a;};'use strict';var emlformat=require(_0xba3e('0x0'));var rimraf=require(_0xba3e('0x1'));var zipdir=require(_0xba3e('0x2'));var jsonpatch=require('fast-json-patch');var rp=require(_0xba3e('0x3'));var moment=require(_0xba3e('0x4'));var BPromise=require(_0xba3e('0x5'));var Mustache=require(_0xba3e('0x6'));var util=require(_0xba3e('0x7'));var path=require(_0xba3e('0x8'));var sox=require(_0xba3e('0x9'));var csv=require(_0xba3e('0xa'));var ejs=require(_0xba3e('0xb'));var fs=require('fs');var fs_extra=require(_0xba3e('0xc'));var _=require(_0xba3e('0xd'));var squel=require(_0xba3e('0xe'));var crypto=require(_0xba3e('0xf'));var jsforce=require(_0xba3e('0x10'));var deskjs=require(_0xba3e('0x11'));var toCsv=require(_0xba3e('0xa'));var querystring=require(_0xba3e('0x12'));var Papa=require(_0xba3e('0x13'));var Redis=require(_0xba3e('0x14'));var authService=require('../../components/auth/service');var qs=require(_0xba3e('0x15'));var as=require(_0xba3e('0x16'));var hardwareService=require(_0xba3e('0x17'));var logger=require('../../config/logger')(_0xba3e('0x18'));var utils=require(_0xba3e('0x19'));var config=require(_0xba3e('0x1a'));var licenseUtil=require(_0xba3e('0x1b'));var db=require(_0xba3e('0x1c'))['db'];config[_0xba3e('0x1d')]=_[_0xba3e('0x1e')](config[_0xba3e('0x1d')],{'host':'localhost','port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config[_0xba3e('0x1d')]));require(_0xba3e('0x1f'))[_0xba3e('0x20')](socket);var jayson=require('jayson/promise');var client=jayson[_0xba3e('0x21')][_0xba3e('0x22')]({'port':0x232c});var client9002=jayson['client'][_0xba3e('0x22')]({'port':0x232a});function respondWithRpcPromise(_0x395965,_0x1cb29c,_0x59afa4,_0x479c75){return new BPromise(function(_0x3e0b33,_0x4fe3b5){var _0x1cb884=_0x479c75||client;return _0x1cb884[_0xba3e('0x23')](_0x395965,_0x59afa4)[_0xba3e('0x24')](function(_0x37b74b){logger[_0xba3e('0x25')](_0xba3e('0x26'),_0x1cb29c,_0xba3e('0x27'));logger[_0xba3e('0x28')]('SmsMessage,\x20%s,\x20%s,\x20%s',_0x1cb29c,_0xba3e('0x27'),JSON[_0xba3e('0x29')](_0x37b74b));if(_0x37b74b[_0xba3e('0x2a')]){if(_0x37b74b[_0xba3e('0x2a')][_0xba3e('0x2b')]===0x1f4){logger[_0xba3e('0x2a')](_0xba3e('0x26'),_0x1cb29c,_0x37b74b['error'][_0xba3e('0x2c')]);return _0x4fe3b5(_0x37b74b[_0xba3e('0x2a')]['message']);}logger['error']('SmsMessage,\x20%s,\x20%s',_0x1cb29c,_0x37b74b[_0xba3e('0x2a')][_0xba3e('0x2c')]);return _0x3e0b33(_0x37b74b['error'][_0xba3e('0x2c')]);}else{logger[_0xba3e('0x25')](_0xba3e('0x26'),_0x1cb29c,_0xba3e('0x27'));_0x3e0b33(_0x37b74b[_0xba3e('0x2d')][_0xba3e('0x2c')]);}})[_0xba3e('0x2e')](function(_0x4190ab){logger[_0xba3e('0x2a')](_0xba3e('0x26'),_0x1cb29c,_0x4190ab);_0x4fe3b5(_0x4190ab);});});}function respondWithStatusCode(_0x25b0c5,_0x328aaf){_0x328aaf=_0x328aaf||0xcc;return function(_0x2df8e0){if(_0x2df8e0){return _0x25b0c5[_0xba3e('0x2f')](_0x328aaf);}return _0x25b0c5['status'](_0x328aaf)[_0xba3e('0x30')]();};}function respondWithResult(_0x2df332,_0x303e30){_0x303e30=_0x303e30||0xc8;return function(_0x5100e9){if(_0x5100e9){return _0x2df332[_0xba3e('0x31')](_0x303e30)['json'](_0x5100e9);}};}function respondWithFilteredResult(_0x4fb8a0,_0x11318e){return function(_0x4cd364){if(_0x4cd364){var _0x26a025=typeof _0x11318e['offset']===_0xba3e('0x32')&&typeof _0x11318e[_0xba3e('0x33')]===_0xba3e('0x32');var _0x1f1690=_0x4cd364[_0xba3e('0x34')];var _0x21055e=_0x26a025?0x0:_0x11318e[_0xba3e('0x35')];var _0x6f0abb=_0x26a025?_0x4cd364[_0xba3e('0x34')]:_0x11318e[_0xba3e('0x35')]+_0x11318e[_0xba3e('0x33')];var _0x1134f2;if(_0x6f0abb>=_0x1f1690){_0x6f0abb=_0x1f1690;_0x1134f2=0xc8;}else{_0x1134f2=0xce;}_0x4fb8a0[_0xba3e('0x31')](_0x1134f2);return _0x4fb8a0['set'](_0xba3e('0x36'),_0x21055e+'-'+_0x6f0abb+'/'+_0x1f1690)[_0xba3e('0x37')](_0x4cd364);}return null;};}function patchUpdates(_0x73e5e){return function(_0x4fc5c4){try{jsonpatch[_0xba3e('0x38')](_0x4fc5c4,_0x73e5e,!![]);}catch(_0x585a88){return BPromise[_0xba3e('0x39')](_0x585a88);}return _0x4fc5c4[_0xba3e('0x3a')]();};}function saveUpdates(_0x564709,_0x1d64fe){return function(_0xea65){if(_0xea65){return _0xea65[_0xba3e('0x3b')](_0x564709)[_0xba3e('0x24')](function(_0x5f4efc){return _0x5f4efc;});}return null;};}function removeEntity(_0x17c022,_0x5e4776){return function(_0x5d12f8){if(_0x5d12f8){return _0x5d12f8['destroy']()[_0xba3e('0x24')](function(){_0x17c022['status'](0xcc)[_0xba3e('0x30')]();});}};}function handleEntityNotFound(_0x4ab076,_0x534351){return function(_0x4a6fe4){if(!_0x4a6fe4){_0x4ab076[_0xba3e('0x2f')](0x194);}return _0x4a6fe4;};}function handleError(_0x58d61d,_0x4ef08f){_0x4ef08f=_0x4ef08f||0x1f4;return function(_0xc61022){logger[_0xba3e('0x2a')](_0xc61022[_0xba3e('0x3c')]);if(_0xc61022['name']){delete _0xc61022[_0xba3e('0x3d')];}_0x58d61d[_0xba3e('0x31')](_0x4ef08f)['send'](_0xc61022);};}exports[_0xba3e('0x3e')]=function(_0x32c49a,_0x28e24d){var _0x36f481={},_0x1f56e5={},_0x2e84e0={'count':0x0,'rows':[]};var _0x339235=_['map'](db[_0xba3e('0x3f')][_0xba3e('0x40')],function(_0x517176){return{'name':_0x517176['fieldName'],'type':_0x517176[_0xba3e('0x41')][_0xba3e('0x42')]};});_0x1f56e5[_0xba3e('0x43')]=_[_0xba3e('0x44')](_0x339235,_0xba3e('0x3d'));_0x1f56e5['query']=_['keys'](_0x32c49a[_0xba3e('0x45')]);_0x1f56e5[_0xba3e('0x46')]=_['intersection'](_0x1f56e5['model'],_0x1f56e5[_0xba3e('0x45')]);_0x36f481[_0xba3e('0x47')]=_[_0xba3e('0x48')](_0x1f56e5['model'],qs[_0xba3e('0x49')](_0x32c49a[_0xba3e('0x45')][_0xba3e('0x49')]));_0x36f481['attributes']=_0x36f481[_0xba3e('0x47')]['length']?_0x36f481[_0xba3e('0x47')]:_0x1f56e5[_0xba3e('0x43')];if(!_0x32c49a['query'][_0xba3e('0x4a')](_0xba3e('0x4b'))){_0x36f481[_0xba3e('0x33')]=qs[_0xba3e('0x33')](_0x32c49a['query'][_0xba3e('0x33')]);_0x36f481['offset']=qs['offset'](_0x32c49a[_0xba3e('0x45')][_0xba3e('0x35')]);}_0x36f481['order']=qs[_0xba3e('0x4c')](_0x32c49a['query'][_0xba3e('0x4c')]);_0x36f481[_0xba3e('0x4d')]=qs['filters'](_[_0xba3e('0x4e')](_0x32c49a[_0xba3e('0x45')],_0x1f56e5[_0xba3e('0x46')]),_0x339235);if(_0x32c49a[_0xba3e('0x45')]['filter']){_0x36f481[_0xba3e('0x4d')]=_[_0xba3e('0x4f')](_0x36f481[_0xba3e('0x4d')],{'$or':_[_0xba3e('0x44')](_0x339235,function(_0x21ad9d){if(_0x21ad9d[_0xba3e('0x41')]!==_0xba3e('0x50')){var _0x38316f={};_0x38316f[_0x21ad9d[_0xba3e('0x3d')]]={'$like':'%'+_0x32c49a[_0xba3e('0x45')]['filter']+'%'};return _0x38316f;}})});}_0x36f481=_[_0xba3e('0x4f')]({},_0x36f481,_0x32c49a[_0xba3e('0x51')]);var _0x753d6d={'where':_0x36f481['where']};return db['SmsMessage'][_0xba3e('0x34')](_0x753d6d)['then'](function(_0x4e4a2f){_0x2e84e0[_0xba3e('0x34')]=_0x4e4a2f;if(_0x32c49a[_0xba3e('0x45')][_0xba3e('0x52')]){_0x36f481[_0xba3e('0x53')]=[{'all':!![]}];}return db[_0xba3e('0x3f')]['findAll'](_0x36f481);})[_0xba3e('0x24')](function(_0x58c25e){_0x2e84e0['rows']=_0x58c25e;return _0x2e84e0;})[_0xba3e('0x24')](respondWithFilteredResult(_0x28e24d,_0x36f481))[_0xba3e('0x2e')](handleError(_0x28e24d,null));};exports[_0xba3e('0x54')]=function(_0x1b40fe,_0x26d4b6){var _0x4e5dfa={'raw':!![],'where':{'id':_0x1b40fe[_0xba3e('0x55')]['id']}},_0x35f192={};_0x35f192[_0xba3e('0x43')]=_[_0xba3e('0x56')](db[_0xba3e('0x3f')][_0xba3e('0x40')]);_0x35f192['query']=_[_0xba3e('0x56')](_0x1b40fe[_0xba3e('0x45')]);_0x35f192[_0xba3e('0x46')]=_['intersection'](_0x35f192['model'],_0x35f192['query']);_0x4e5dfa[_0xba3e('0x47')]=_[_0xba3e('0x48')](_0x35f192[_0xba3e('0x43')],qs[_0xba3e('0x49')](_0x1b40fe[_0xba3e('0x45')][_0xba3e('0x49')]));_0x4e5dfa[_0xba3e('0x47')]=_0x4e5dfa[_0xba3e('0x47')][_0xba3e('0x57')]?_0x4e5dfa['attributes']:_0x35f192['model'];if(_0x1b40fe[_0xba3e('0x45')]['includeAll']){_0x4e5dfa[_0xba3e('0x53')]=[{'all':!![]}];}_0x4e5dfa=_[_0xba3e('0x4f')]({},_0x4e5dfa,_0x1b40fe[_0xba3e('0x51')]);return db['SmsMessage'][_0xba3e('0x58')](_0x4e5dfa)[_0xba3e('0x24')](handleEntityNotFound(_0x26d4b6,null))[_0xba3e('0x24')](respondWithResult(_0x26d4b6,null))[_0xba3e('0x2e')](handleError(_0x26d4b6,null));};exports[_0xba3e('0x59')]=function(_0x4d8558,_0x2ad936){return db[_0xba3e('0x3f')][_0xba3e('0x59')](_0x4d8558['body'],{})[_0xba3e('0x24')](respondWithResult(_0x2ad936,0xc9))['catch'](handleError(_0x2ad936,null));};exports['update']=function(_0x317144,_0x523969){if(_0x317144[_0xba3e('0x5a')]['id']){delete _0x317144[_0xba3e('0x5a')]['id'];}return db['SmsMessage']['find']({'where':{'id':_0x317144[_0xba3e('0x55')]['id']}})[_0xba3e('0x24')](handleEntityNotFound(_0x523969,null))[_0xba3e('0x24')](saveUpdates(_0x317144[_0xba3e('0x5a')],null))[_0xba3e('0x24')](respondWithResult(_0x523969,null))[_0xba3e('0x2e')](handleError(_0x523969,null));};exports[_0xba3e('0x5b')]=function(_0xea1504,_0x383f9d){return db[_0xba3e('0x3f')][_0xba3e('0x58')]({'where':{'id':_0xea1504[_0xba3e('0x55')]['id']}})[_0xba3e('0x24')](handleEntityNotFound(_0x383f9d,null))['then'](removeEntity(_0x383f9d,null))['catch'](handleError(_0x383f9d,null));};exports[_0xba3e('0x5c')]=function(_0x1cb9d9,_0x503cf2){return db[_0xba3e('0x3f')][_0xba3e('0x5c')]()[_0xba3e('0x24')](respondWithResult(_0x503cf2,null))['catch'](handleError(_0x503cf2,null));};var interaction_log=require(_0xba3e('0x5d'))(_0xba3e('0x5e'));exports[_0xba3e('0x5f')]=function(_0x42eb63,_0x4c5d09,_0x36d0bb){var _0xa53621={'agent':{},'channel':'sms'};if(_0x42eb63[_0xba3e('0x5a')]['id']){delete _0x42eb63[_0xba3e('0x5a')]['id'];}_0x42eb63[_0xba3e('0x5a')][_0xba3e('0x60')]=!![];_0x42eb63['body'][_0xba3e('0x61')]=moment()['format']('YYYY-MM-DD\x20HH:mm:ss');_0x42eb63[_0xba3e('0x5a')][_0xba3e('0x62')]=_0x42eb63[_0xba3e('0x5a')][_0xba3e('0x62')]||_0x42eb63[_0xba3e('0x63')]['id'];_0xa53621[_0xba3e('0x64')]['id']=_0x42eb63[_0xba3e('0x5a')][_0xba3e('0x62')];return db[_0xba3e('0x3f')][_0xba3e('0x58')]({'where':{'id':_0x42eb63[_0xba3e('0x55')]['id'],'UserId':null}})[_0xba3e('0x24')](handleEntityNotFound(_0x4c5d09,null))['then'](saveUpdates(_0x42eb63[_0xba3e('0x5a')],null))[_0xba3e('0x24')](function(_0x17b320){if(_0x17b320){_0xa53621[_0xba3e('0x2c')]=_0x17b320[_0xba3e('0x65')]({'plain':!![]});return db[_0xba3e('0x66')][_0xba3e('0x58')]({'where':{'id':_0x17b320[_0xba3e('0x67')]}});}return null;})[_0xba3e('0x24')](handleEntityNotFound(_0x4c5d09,null))[_0xba3e('0x24')](function(_0x2b3009){if(_0x2b3009){return _0x2b3009['update']({'UserId':_0x42eb63[_0xba3e('0x5a')]['UserId'],'read1stAt':_[_0xba3e('0x68')](_0x2b3009[_0xba3e('0x69')])?moment()['format'](_0xba3e('0x6a')):undefined});}return null;})[_0xba3e('0x24')](function(_0x1a39e2){if(_0x1a39e2){_0xa53621[_0xba3e('0x6b')]=_0x1a39e2[_0xba3e('0x65')]({'plain':!![]});interaction_log['info']('[SMSMESSAGE:ACCEPT]\x20id=%s\x20name=%s\x20role=%s\x20interaction=%s\x20body=%s',_0x42eb63['user']['id'],_0x42eb63['user'][_0xba3e('0x3d')],_0x42eb63[_0xba3e('0x63')][_0xba3e('0x6c')],_0xa53621[_0xba3e('0x6b')]['id'],_0x42eb63[_0xba3e('0x5a')]?JSON[_0xba3e('0x29')](_0x42eb63[_0xba3e('0x5a')]):_0xba3e('0x6d'));return respondWithRpcPromise(_0xba3e('0x6e'),'acceptMessage',_0xa53621);}return null;})['then'](function(_0x3c1a9a){var _0x479287=_0xba3e('0x6f')+_0x3c1a9a[_0xba3e('0x2c')][_0xba3e('0x70')];return db[_0xba3e('0x71')]['query'](_0x479287,{'type':db['Sequelize'][_0xba3e('0x72')][_0xba3e('0x73')],'raw':!![]})['then'](function(_0x342c9c){return _0x342c9c;});})['then'](function(_0x50b9a4){if(_0x50b9a4){_0xa53621['message'][_0xba3e('0x74')]=_0x50b9a4[0x0];if(!_0x42eb63[_0xba3e('0x5a')][_0xba3e('0x62')])return;return db['User'][_0xba3e('0x58')]({'where':{'id':_0x42eb63[_0xba3e('0x5a')][_0xba3e('0x62')],'role':'agent'},'attributes':['id','name',_0xba3e('0x75'),_0xba3e('0x76'),_0xba3e('0x77')],'raw':!![]});}return null;})['then'](function(_0x135994){if(!_0x135994)return null;_0xa53621[_0xba3e('0x2c')]['agent']=_0x135994;return _0xa53621;})[_0xba3e('0x24')](function(_0x366428){if(_0x366428){if(_0x42eb63[_0xba3e('0x5a')][_0xba3e('0x78')]){_0xa53621['message'][_0xba3e('0x79')]=util[_0xba3e('0x7a')](_0xba3e('0x7b'),_0x42eb63['user']['name']);_0xa53621[_0xba3e('0x2c')][_0xba3e('0x7c')]=_0xa53621[_0xba3e('0x7c')];_0xa53621[_0xba3e('0x2c')][_0xba3e('0x7d')]=_0xa53621['channel'];_0xa53621[_0xba3e('0x2c')][_0xba3e('0x7e')]=_0xba3e('0x5f');return respondWithRpcPromise(_0xba3e('0x7f'),_0xba3e('0x7f'),{'event':_0xba3e('0x80'),'message':_0xa53621['message']},client9002)[_0xba3e('0x24')](function(){return _0xa53621;});}return _0xa53621;}return null;})[_0xba3e('0x24')](respondWithResult(_0x4c5d09,null))[_0xba3e('0x2e')](handleError(_0x4c5d09,null));};var interaction_log=require(_0xba3e('0x5d'))('sms-interactions');exports[_0xba3e('0x39')]=function(_0x1ff79a,_0x3d8653,_0x14acc7){var _0x17db6a={'agent':{},'channel':_0xba3e('0x81')};if(_0x1ff79a[_0xba3e('0x5a')]['id']){delete _0x1ff79a['body']['id'];}_0x1ff79a[_0xba3e('0x5a')][_0xba3e('0x62')]=_0x1ff79a[_0xba3e('0x5a')][_0xba3e('0x62')]||_0x1ff79a[_0xba3e('0x63')]['id'];_0x17db6a['agent']['id']=_0x1ff79a['body'][_0xba3e('0x62')];return db[_0xba3e('0x3f')][_0xba3e('0x58')]({'where':{'id':_0x1ff79a['params']['id'],'UserId':null}})[_0xba3e('0x24')](handleEntityNotFound(_0x3d8653,null))[_0xba3e('0x24')](function(_0x27a689){if(_0x27a689){_0x17db6a[_0xba3e('0x2c')]=_0x27a689[_0xba3e('0x65')]({'plain':!![]});return db['SmsInteraction'][_0xba3e('0x58')]({'where':{'id':_0x27a689[_0xba3e('0x67')]}});}return null;})[_0xba3e('0x24')](handleEntityNotFound(_0x3d8653,null))[_0xba3e('0x24')](function(_0xc5963c){if(_0xc5963c){_0x17db6a['interaction']=_0xc5963c['get']({'plain':!![]});interaction_log[_0xba3e('0x25')](_0xba3e('0x82'),_0x1ff79a[_0xba3e('0x63')]['id'],_0x1ff79a['user'][_0xba3e('0x3d')],_0x1ff79a[_0xba3e('0x63')]['role'],_0x17db6a[_0xba3e('0x6b')]['id'],_0x1ff79a[_0xba3e('0x5a')]?JSON[_0xba3e('0x29')](_0x1ff79a[_0xba3e('0x5a')]):_0xba3e('0x6d'));return respondWithRpcPromise(_0xba3e('0x83'),_0xba3e('0x84'),_0x17db6a);}return null;})[_0xba3e('0x24')](function(_0x1df294){var _0x8e79f4=_0xba3e('0x6f')+_0x1df294[_0xba3e('0x2c')]['ContactId'];return db[_0xba3e('0x71')][_0xba3e('0x45')](_0x8e79f4,{'type':db[_0xba3e('0x85')][_0xba3e('0x72')][_0xba3e('0x73')],'raw':!![]})['then'](function(_0x1f612f){return _0x1f612f;});})[_0xba3e('0x24')](function(_0x5920b8){if(_0x5920b8){_0x17db6a[_0xba3e('0x2c')][_0xba3e('0x74')]=_0x5920b8[0x0];if(!_0x1ff79a[_0xba3e('0x5a')]['UserId'])return;return db[_0xba3e('0x86')][_0xba3e('0x58')]({'where':{'id':_0x1ff79a['body'][_0xba3e('0x62')],'role':'agent'},'attributes':['id','name',_0xba3e('0x75'),'email',_0xba3e('0x77')],'raw':!![]});}return null;})['then'](function(_0x4b4df8){if(!_0x4b4df8)return null;_0x17db6a[_0xba3e('0x2c')][_0xba3e('0x64')]=_0x4b4df8;return _0x17db6a;})[_0xba3e('0x24')](function(_0xa51f02){if(_0xa51f02){_0xa51f02['message'][_0xba3e('0x79')]=util['format']('SIP/%s',_0x1ff79a[_0xba3e('0x63')][_0xba3e('0x3d')]);_0xa51f02[_0xba3e('0x2c')][_0xba3e('0x7c')]=_0x17db6a['channel'];_0xa51f02[_0xba3e('0x2c')][_0xba3e('0x7d')]=_0x17db6a[_0xba3e('0x7c')];_0xa51f02[_0xba3e('0x2c')]['event']='reject';respondWithRpcPromise(_0xba3e('0x7f'),_0xba3e('0x7f'),{'event':_0xba3e('0x87'),'message':_0xa51f02[_0xba3e('0x2c')]},client9002);return _0x17db6a;}return null;})[_0xba3e('0x24')](respondWithResult(_0x3d8653,null))[_0xba3e('0x2e')](handleError(_0x3d8653,null));};exports[_0xba3e('0x31')]=function(_0x4d6746,_0x2abbad,_0x29d57b){if(_0x4d6746[_0xba3e('0x5a')]['id']){delete _0x4d6746[_0xba3e('0x5a')]['id'];}var _0x3f7936;return db[_0xba3e('0x3f')][_0xba3e('0x58')]({'where':{'id':_0x4d6746['params']['id']}})['then'](handleEntityNotFound(_0x2abbad,null))['then'](function(_0x1a43fa){if(_0x1a43fa){_0x3f7936=_0x1a43fa;return db[_0xba3e('0x88')][_0xba3e('0x58')]({'where':{'id':_0x1a43fa[_0xba3e('0x89')]}});}})['then'](handleEntityNotFound(_0x2abbad,null))['then'](function(_0x337182){if(_0x337182){logger[_0xba3e('0x28')](_0xba3e('0x8a'),_0xba3e('0x31'),_0xba3e('0x8b'),_0x337182[_0xba3e('0x41')],util[_0xba3e('0x8c')](_0x4d6746[_0xba3e('0x5a')],{'showHidden':![],'depth':null}));switch(_0x337182[_0xba3e('0x41')]){case _0xba3e('0x8d'):if(_0x4d6746[_0xba3e('0x5a')][_0xba3e('0x8e')]&&_0x4d6746[_0xba3e('0x5a')][_0xba3e('0x8e')]===_0x3f7936[_0xba3e('0x8f')]){return _0x3f7936[_0xba3e('0x3b')]({'read':!![]});}else{logger[_0xba3e('0x2a')]('SmsAccount,\x20%s,\x20%s,\x20%s',_0xba3e('0x31'),'twilio',util['inspect'](_0x4d6746[_0xba3e('0x5a')],{'showHidden':![],'depth':null}));}break;case _0xba3e('0x90'):if(_0x4d6746[_0xba3e('0x5a')][_0xba3e('0x91')]&&_0x4d6746[_0xba3e('0x5a')][_0xba3e('0x91')]===_0x3f7936[_0xba3e('0x8f')]&&_[_0xba3e('0x92')](['sent',_0xba3e('0x93')],_0x4d6746[_0xba3e('0x5a')][_0xba3e('0x94')])>=0x0){return _0x3f7936['update']({'read':!![]});}else{logger['error'](_0xba3e('0x95'),_0xba3e('0x31'),_0xba3e('0x96'),util['inspect'](_0x4d6746['body'],{'showHidden':![],'depth':null}));}break;case _0xba3e('0x97'):var _0xd9e23a=_0x4d6746['body']['results'][0x0];if(_0xd9e23a['status'][_0xba3e('0x98')]===_0xba3e('0x99')){return _0x3f7936[_0xba3e('0x3b')]({'read':!![]});}else{logger[_0xba3e('0x2a')](_0xba3e('0x95'),_0xba3e('0x31'),_0xba3e('0x97'),util[_0xba3e('0x8c')](_0x4d6746[_0xba3e('0x5a')],{'showHidden':![],'depth':null}));}break;}return _0x3f7936;}})[_0xba3e('0x24')](respondWithResult(_0x2abbad,null))[_0xba3e('0x2e')](handleError(_0x2abbad,null));}; \ No newline at end of file +var _0xf269=['findAll','show','include','create','body','find','params','describe','sms-interactions','sms','read','format','YYYY-MM-DD\x20HH:mm:ss','UserId','user','agent','SmsInteraction','SmsInteractionId','read1stAt','interaction','get','[SMSMESSAGE:ACCEPT]\x20id=%s\x20name=%s\x20role=%s\x20interaction=%s\x20body=%s','role','null','AcceptMessage','acceptMessage','SELECT\x20*\x20FROM\x20cm_contacts\x20WHERE\x20id\x20=\x20','ContactId','sequelize','Sequelize','QueryTypes','SELECT','contact','User','fullname','email','manual','interface','channel','event','accept','EventManager','[SMSMESSAGE:REJECT]\x20id=%s\x20name=%s\x20role=%s\x20interaction=%s\x20body=%s','RejectMessage','internal','SIP/%s','motionChannel','rejectmessage','SmsAccountId','received\x20delivery\x20report\x20from','type','twilio','MessageSid','messageId','update','SmsAccount,\x20%s,\x20%s,\x20%s','plivo','MessageUUID','indexOf','sent','delivered','plivio','inspect','infobip','results','groupName','DELIVERED','rimraf','zip-dir','request-promise','moment','bluebird','util','sox','to-csv','ejs','fs-extra','lodash','squel','crypto','jsforce','papaparse','ioredis','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../mysqldb','redis','localhost','socket.io-emitter','./smsMessage.socket','jayson/promise','client','http','request','then','info','debug','request\x20sent','stringify','error','code','SmsMessage,\x20%s,\x20%s','message','catch','sendStatus','json','offset','undefined','limit','count','status','set','Content-Range','reject','save','destroy','end','stack','name','index','map','SmsMessage','rawAttributes','fieldName','key','model','keys','filters','query','attributes','intersection','fields','length','nolimit','sort','pick','filter','where','merge','options','includeAll'];(function(_0x206cb8,_0x52b4a2){var _0x250455=function(_0x5d1d23){while(--_0x5d1d23){_0x206cb8['push'](_0x206cb8['shift']());}};_0x250455(++_0x52b4a2);}(_0xf269,0xd2));var _0x9f26=function(_0x4db581,_0x4e492f){_0x4db581=_0x4db581-0x0;var _0xa7f427=_0xf269[_0x4db581];return _0xa7f427;};'use strict';var emlformat=require('eml-format');var rimraf=require(_0x9f26('0x0'));var zipdir=require(_0x9f26('0x1'));var jsonpatch=require('fast-json-patch');var rp=require(_0x9f26('0x2'));var moment=require(_0x9f26('0x3'));var BPromise=require(_0x9f26('0x4'));var Mustache=require('mustache');var util=require(_0x9f26('0x5'));var path=require('path');var sox=require(_0x9f26('0x6'));var csv=require(_0x9f26('0x7'));var ejs=require(_0x9f26('0x8'));var fs=require('fs');var fs_extra=require(_0x9f26('0x9'));var _=require(_0x9f26('0xa'));var squel=require(_0x9f26('0xb'));var crypto=require(_0x9f26('0xc'));var jsforce=require(_0x9f26('0xd'));var deskjs=require('desk.js');var toCsv=require('to-csv');var querystring=require('querystring');var Papa=require(_0x9f26('0xe'));var Redis=require(_0x9f26('0xf'));var authService=require('../../components/auth/service');var qs=require('../../components/parsers/qs');var as=require(_0x9f26('0x10'));var hardwareService=require(_0x9f26('0x11'));var logger=require(_0x9f26('0x12'))(_0x9f26('0x13'));var utils=require('../../config/utils');var config=require('../../config/environment');var licenseUtil=require('../../config/license/util');var db=require(_0x9f26('0x14'))['db'];config[_0x9f26('0x15')]=_['defaults'](config[_0x9f26('0x15')],{'host':_0x9f26('0x16'),'port':0x18eb});var socket=require(_0x9f26('0x17'))(new Redis(config[_0x9f26('0x15')]));require(_0x9f26('0x18'))['register'](socket);var jayson=require(_0x9f26('0x19'));var client=jayson[_0x9f26('0x1a')][_0x9f26('0x1b')]({'port':0x232c});var client9002=jayson['client'][_0x9f26('0x1b')]({'port':0x232a});function respondWithRpcPromise(_0x71944f,_0x212c4e,_0x382bfe,_0x1208e0){return new BPromise(function(_0x542567,_0x3ec83e){var _0x25c021=_0x1208e0||client;return _0x25c021[_0x9f26('0x1c')](_0x71944f,_0x382bfe)[_0x9f26('0x1d')](function(_0xb0d8e5){logger[_0x9f26('0x1e')]('SmsMessage,\x20%s,\x20%s',_0x212c4e,'request\x20sent');logger[_0x9f26('0x1f')]('SmsMessage,\x20%s,\x20%s,\x20%s',_0x212c4e,_0x9f26('0x20'),JSON[_0x9f26('0x21')](_0xb0d8e5));if(_0xb0d8e5[_0x9f26('0x22')]){if(_0xb0d8e5[_0x9f26('0x22')][_0x9f26('0x23')]===0x1f4){logger[_0x9f26('0x22')](_0x9f26('0x24'),_0x212c4e,_0xb0d8e5['error'][_0x9f26('0x25')]);return _0x3ec83e(_0xb0d8e5[_0x9f26('0x22')][_0x9f26('0x25')]);}logger[_0x9f26('0x22')](_0x9f26('0x24'),_0x212c4e,_0xb0d8e5[_0x9f26('0x22')][_0x9f26('0x25')]);return _0x542567(_0xb0d8e5[_0x9f26('0x22')][_0x9f26('0x25')]);}else{logger[_0x9f26('0x1e')](_0x9f26('0x24'),_0x212c4e,_0x9f26('0x20'));_0x542567(_0xb0d8e5['result'][_0x9f26('0x25')]);}})[_0x9f26('0x26')](function(_0x6da052){logger[_0x9f26('0x22')](_0x9f26('0x24'),_0x212c4e,_0x6da052);_0x3ec83e(_0x6da052);});});}function respondWithStatusCode(_0x1b972c,_0x4ee987){_0x4ee987=_0x4ee987||0xcc;return function(_0x401bd3){if(_0x401bd3){return _0x1b972c[_0x9f26('0x27')](_0x4ee987);}return _0x1b972c['status'](_0x4ee987)['end']();};}function respondWithResult(_0x100fb5,_0x53f00d){_0x53f00d=_0x53f00d||0xc8;return function(_0x308026){if(_0x308026){return _0x100fb5['status'](_0x53f00d)[_0x9f26('0x28')](_0x308026);}};}function respondWithFilteredResult(_0x25168b,_0x4728f2){return function(_0x32b59c){if(_0x32b59c){var _0xa49ce6=typeof _0x4728f2[_0x9f26('0x29')]===_0x9f26('0x2a')&&typeof _0x4728f2[_0x9f26('0x2b')]===_0x9f26('0x2a');var _0x2ad80b=_0x32b59c[_0x9f26('0x2c')];var _0x3844ab=_0xa49ce6?0x0:_0x4728f2[_0x9f26('0x29')];var _0x24fcec=_0xa49ce6?_0x32b59c[_0x9f26('0x2c')]:_0x4728f2[_0x9f26('0x29')]+_0x4728f2[_0x9f26('0x2b')];var _0x40a469;if(_0x24fcec>=_0x2ad80b){_0x24fcec=_0x2ad80b;_0x40a469=0xc8;}else{_0x40a469=0xce;}_0x25168b[_0x9f26('0x2d')](_0x40a469);return _0x25168b[_0x9f26('0x2e')](_0x9f26('0x2f'),_0x3844ab+'-'+_0x24fcec+'/'+_0x2ad80b)[_0x9f26('0x28')](_0x32b59c);}return null;};}function patchUpdates(_0x42b778){return function(_0x3324fa){try{jsonpatch['apply'](_0x3324fa,_0x42b778,!![]);}catch(_0x982915){return BPromise[_0x9f26('0x30')](_0x982915);}return _0x3324fa[_0x9f26('0x31')]();};}function saveUpdates(_0x37fc6b,_0x36039d){return function(_0x4250fc){if(_0x4250fc){return _0x4250fc['update'](_0x37fc6b)['then'](function(_0x58712c){return _0x58712c;});}return null;};}function removeEntity(_0xfd6a30,_0x39282e){return function(_0x5492f5){if(_0x5492f5){return _0x5492f5[_0x9f26('0x32')]()[_0x9f26('0x1d')](function(){_0xfd6a30[_0x9f26('0x2d')](0xcc)[_0x9f26('0x33')]();});}};}function handleEntityNotFound(_0x1d62fb,_0x10a08c){return function(_0x58037f){if(!_0x58037f){_0x1d62fb[_0x9f26('0x27')](0x194);}return _0x58037f;};}function handleError(_0x2680ff,_0x4bd7b0){_0x4bd7b0=_0x4bd7b0||0x1f4;return function(_0x253f1f){logger['error'](_0x253f1f[_0x9f26('0x34')]);if(_0x253f1f[_0x9f26('0x35')]){delete _0x253f1f[_0x9f26('0x35')];}_0x2680ff[_0x9f26('0x2d')](_0x4bd7b0)['send'](_0x253f1f);};}exports[_0x9f26('0x36')]=function(_0x328eb6,_0x299012){var _0x4f4447={},_0x430cc6={},_0x102432={'count':0x0,'rows':[]};var _0x2d3a20=_[_0x9f26('0x37')](db[_0x9f26('0x38')][_0x9f26('0x39')],function(_0x4a241d){return{'name':_0x4a241d[_0x9f26('0x3a')],'type':_0x4a241d['type'][_0x9f26('0x3b')]};});_0x430cc6[_0x9f26('0x3c')]=_['map'](_0x2d3a20,_0x9f26('0x35'));_0x430cc6['query']=_[_0x9f26('0x3d')](_0x328eb6['query']);_0x430cc6[_0x9f26('0x3e')]=_['intersection'](_0x430cc6[_0x9f26('0x3c')],_0x430cc6[_0x9f26('0x3f')]);_0x4f4447[_0x9f26('0x40')]=_[_0x9f26('0x41')](_0x430cc6[_0x9f26('0x3c')],qs['fields'](_0x328eb6[_0x9f26('0x3f')][_0x9f26('0x42')]));_0x4f4447['attributes']=_0x4f4447['attributes'][_0x9f26('0x43')]?_0x4f4447[_0x9f26('0x40')]:_0x430cc6[_0x9f26('0x3c')];if(!_0x328eb6[_0x9f26('0x3f')]['hasOwnProperty'](_0x9f26('0x44'))){_0x4f4447[_0x9f26('0x2b')]=qs[_0x9f26('0x2b')](_0x328eb6[_0x9f26('0x3f')]['limit']);_0x4f4447[_0x9f26('0x29')]=qs['offset'](_0x328eb6['query']['offset']);}_0x4f4447['order']=qs[_0x9f26('0x45')](_0x328eb6[_0x9f26('0x3f')][_0x9f26('0x45')]);_0x4f4447['where']=qs['filters'](_[_0x9f26('0x46')](_0x328eb6['query'],_0x430cc6['filters']),_0x2d3a20);if(_0x328eb6['query'][_0x9f26('0x47')]){_0x4f4447[_0x9f26('0x48')]=_[_0x9f26('0x49')](_0x4f4447[_0x9f26('0x48')],{'$or':_[_0x9f26('0x37')](_0x2d3a20,function(_0x447b48){if(_0x447b48['type']!=='VIRTUAL'){var _0x7a7b03={};_0x7a7b03[_0x447b48[_0x9f26('0x35')]]={'$like':'%'+_0x328eb6[_0x9f26('0x3f')][_0x9f26('0x47')]+'%'};return _0x7a7b03;}})});}_0x4f4447=_['merge']({},_0x4f4447,_0x328eb6[_0x9f26('0x4a')]);var _0x1fafc6={'where':_0x4f4447['where']};return db['SmsMessage'][_0x9f26('0x2c')](_0x1fafc6)[_0x9f26('0x1d')](function(_0x2ede08){_0x102432[_0x9f26('0x2c')]=_0x2ede08;if(_0x328eb6[_0x9f26('0x3f')][_0x9f26('0x4b')]){_0x4f4447['include']=[{'all':!![]}];}return db[_0x9f26('0x38')][_0x9f26('0x4c')](_0x4f4447);})[_0x9f26('0x1d')](function(_0x4f9f54){_0x102432['rows']=_0x4f9f54;return _0x102432;})[_0x9f26('0x1d')](respondWithFilteredResult(_0x299012,_0x4f4447))[_0x9f26('0x26')](handleError(_0x299012,null));};exports[_0x9f26('0x4d')]=function(_0x2b2089,_0x327a48){var _0x5cb532={'raw':!![],'where':{'id':_0x2b2089['params']['id']}},_0x13228a={};_0x13228a[_0x9f26('0x3c')]=_['keys'](db[_0x9f26('0x38')][_0x9f26('0x39')]);_0x13228a[_0x9f26('0x3f')]=_[_0x9f26('0x3d')](_0x2b2089[_0x9f26('0x3f')]);_0x13228a[_0x9f26('0x3e')]=_[_0x9f26('0x41')](_0x13228a[_0x9f26('0x3c')],_0x13228a[_0x9f26('0x3f')]);_0x5cb532[_0x9f26('0x40')]=_['intersection'](_0x13228a[_0x9f26('0x3c')],qs[_0x9f26('0x42')](_0x2b2089[_0x9f26('0x3f')][_0x9f26('0x42')]));_0x5cb532[_0x9f26('0x40')]=_0x5cb532[_0x9f26('0x40')]['length']?_0x5cb532[_0x9f26('0x40')]:_0x13228a[_0x9f26('0x3c')];if(_0x2b2089[_0x9f26('0x3f')][_0x9f26('0x4b')]){_0x5cb532[_0x9f26('0x4e')]=[{'all':!![]}];}_0x5cb532=_[_0x9f26('0x49')]({},_0x5cb532,_0x2b2089[_0x9f26('0x4a')]);return db[_0x9f26('0x38')]['find'](_0x5cb532)[_0x9f26('0x1d')](handleEntityNotFound(_0x327a48,null))[_0x9f26('0x1d')](respondWithResult(_0x327a48,null))['catch'](handleError(_0x327a48,null));};exports[_0x9f26('0x4f')]=function(_0x5f1cee,_0x6adc4a){return db['SmsMessage'][_0x9f26('0x4f')](_0x5f1cee[_0x9f26('0x50')],{})[_0x9f26('0x1d')](respondWithResult(_0x6adc4a,0xc9))[_0x9f26('0x26')](handleError(_0x6adc4a,null));};exports['update']=function(_0x4e0011,_0x32b0fe){if(_0x4e0011[_0x9f26('0x50')]['id']){delete _0x4e0011['body']['id'];}return db[_0x9f26('0x38')][_0x9f26('0x51')]({'where':{'id':_0x4e0011[_0x9f26('0x52')]['id']}})[_0x9f26('0x1d')](handleEntityNotFound(_0x32b0fe,null))[_0x9f26('0x1d')](saveUpdates(_0x4e0011['body'],null))[_0x9f26('0x1d')](respondWithResult(_0x32b0fe,null))[_0x9f26('0x26')](handleError(_0x32b0fe,null));};exports[_0x9f26('0x32')]=function(_0xec9b00,_0x6889b0){return db[_0x9f26('0x38')]['find']({'where':{'id':_0xec9b00[_0x9f26('0x52')]['id']}})[_0x9f26('0x1d')](handleEntityNotFound(_0x6889b0,null))[_0x9f26('0x1d')](removeEntity(_0x6889b0,null))[_0x9f26('0x26')](handleError(_0x6889b0,null));};exports['describe']=function(_0x3a1129,_0x2831b6){return db[_0x9f26('0x38')][_0x9f26('0x53')]()['then'](respondWithResult(_0x2831b6,null))['catch'](handleError(_0x2831b6,null));};var interaction_log=require(_0x9f26('0x12'))(_0x9f26('0x54'));exports['accept']=function(_0x223f2d,_0x35612b,_0x2a1b3e){var _0x814e0d={'agent':{},'channel':_0x9f26('0x55')};if(_0x223f2d['body']['id']){delete _0x223f2d[_0x9f26('0x50')]['id'];}_0x223f2d[_0x9f26('0x50')][_0x9f26('0x56')]=!![];_0x223f2d['body']['readAt']=moment()[_0x9f26('0x57')](_0x9f26('0x58'));_0x223f2d[_0x9f26('0x50')][_0x9f26('0x59')]=_0x223f2d['body'][_0x9f26('0x59')]||_0x223f2d[_0x9f26('0x5a')]['id'];_0x814e0d[_0x9f26('0x5b')]['id']=_0x223f2d[_0x9f26('0x50')][_0x9f26('0x59')];return db[_0x9f26('0x38')][_0x9f26('0x51')]({'where':{'id':_0x223f2d[_0x9f26('0x52')]['id'],'UserId':null}})[_0x9f26('0x1d')](handleEntityNotFound(_0x35612b,null))[_0x9f26('0x1d')](saveUpdates(_0x223f2d[_0x9f26('0x50')],null))[_0x9f26('0x1d')](function(_0x41b63){if(_0x41b63){_0x814e0d[_0x9f26('0x25')]=_0x41b63['get']({'plain':!![]});return db[_0x9f26('0x5c')][_0x9f26('0x51')]({'where':{'id':_0x41b63[_0x9f26('0x5d')]}});}return null;})[_0x9f26('0x1d')](handleEntityNotFound(_0x35612b,null))[_0x9f26('0x1d')](function(_0x2235ee){if(_0x2235ee){return _0x2235ee['update']({'UserId':_0x223f2d['body'][_0x9f26('0x59')],'read1stAt':_['isNil'](_0x2235ee[_0x9f26('0x5e')])?moment()[_0x9f26('0x57')](_0x9f26('0x58')):undefined});}return null;})['then'](function(_0x2bb161){if(_0x2bb161){_0x814e0d[_0x9f26('0x5f')]=_0x2bb161[_0x9f26('0x60')]({'plain':!![]});interaction_log['info'](_0x9f26('0x61'),_0x223f2d[_0x9f26('0x5a')]['id'],_0x223f2d[_0x9f26('0x5a')][_0x9f26('0x35')],_0x223f2d[_0x9f26('0x5a')][_0x9f26('0x62')],_0x814e0d['interaction']['id'],_0x223f2d[_0x9f26('0x50')]?JSON['stringify'](_0x223f2d['body']):_0x9f26('0x63'));return respondWithRpcPromise(_0x9f26('0x64'),_0x9f26('0x65'),_0x814e0d);}return null;})['then'](function(_0x17a210){var _0x14d0e3=_0x9f26('0x66')+_0x17a210[_0x9f26('0x25')][_0x9f26('0x67')];return db[_0x9f26('0x68')][_0x9f26('0x3f')](_0x14d0e3,{'type':db[_0x9f26('0x69')][_0x9f26('0x6a')][_0x9f26('0x6b')],'raw':!![]})['then'](function(_0x5b043b){return _0x5b043b;});})[_0x9f26('0x1d')](function(_0x189c60){if(_0x189c60){_0x814e0d[_0x9f26('0x25')][_0x9f26('0x6c')]=_0x189c60[0x0];if(!_0x223f2d[_0x9f26('0x50')]['UserId'])return;return db[_0x9f26('0x6d')][_0x9f26('0x51')]({'where':{'id':_0x223f2d[_0x9f26('0x50')]['UserId'],'role':_0x9f26('0x5b')},'attributes':['id','name',_0x9f26('0x6e'),_0x9f26('0x6f'),'internal'],'raw':!![]});}return null;})[_0x9f26('0x1d')](function(_0x30a4a4){if(!_0x30a4a4)return null;_0x814e0d['message'][_0x9f26('0x5b')]=_0x30a4a4;return _0x814e0d;})[_0x9f26('0x1d')](function(_0x1612c1){if(_0x1612c1){if(_0x223f2d['body'][_0x9f26('0x70')]){_0x814e0d[_0x9f26('0x25')][_0x9f26('0x71')]=util[_0x9f26('0x57')]('SIP/%s',_0x223f2d[_0x9f26('0x5a')][_0x9f26('0x35')]);_0x814e0d[_0x9f26('0x25')]['channel']=_0x814e0d[_0x9f26('0x72')];_0x814e0d['message']['motionChannel']=_0x814e0d[_0x9f26('0x72')];_0x814e0d['message'][_0x9f26('0x73')]=_0x9f26('0x74');return respondWithRpcPromise(_0x9f26('0x75'),'EventManager',{'event':'acceptmessage','message':_0x814e0d['message']},client9002)[_0x9f26('0x1d')](function(){return _0x814e0d;});}return _0x814e0d;}return null;})['then'](respondWithResult(_0x35612b,null))[_0x9f26('0x26')](handleError(_0x35612b,null));};var interaction_log=require(_0x9f26('0x12'))(_0x9f26('0x54'));exports['reject']=function(_0x5c8bf7,_0x30ea5e,_0x1a6623){var _0x86d6b6={'agent':{},'channel':'sms'};if(_0x5c8bf7[_0x9f26('0x50')]['id']){delete _0x5c8bf7['body']['id'];}_0x5c8bf7[_0x9f26('0x50')][_0x9f26('0x59')]=_0x5c8bf7[_0x9f26('0x50')]['UserId']||_0x5c8bf7[_0x9f26('0x5a')]['id'];_0x86d6b6[_0x9f26('0x5b')]['id']=_0x5c8bf7['body']['UserId'];return db[_0x9f26('0x38')][_0x9f26('0x51')]({'where':{'id':_0x5c8bf7['params']['id'],'UserId':null}})[_0x9f26('0x1d')](handleEntityNotFound(_0x30ea5e,null))['then'](function(_0x33b211){if(_0x33b211){_0x86d6b6[_0x9f26('0x25')]=_0x33b211['get']({'plain':!![]});return db[_0x9f26('0x5c')][_0x9f26('0x51')]({'where':{'id':_0x33b211[_0x9f26('0x5d')]}});}return null;})['then'](handleEntityNotFound(_0x30ea5e,null))[_0x9f26('0x1d')](function(_0x4dac83){if(_0x4dac83){_0x86d6b6[_0x9f26('0x5f')]=_0x4dac83[_0x9f26('0x60')]({'plain':!![]});interaction_log[_0x9f26('0x1e')](_0x9f26('0x76'),_0x5c8bf7[_0x9f26('0x5a')]['id'],_0x5c8bf7['user'][_0x9f26('0x35')],_0x5c8bf7[_0x9f26('0x5a')][_0x9f26('0x62')],_0x86d6b6[_0x9f26('0x5f')]['id'],_0x5c8bf7[_0x9f26('0x50')]?JSON['stringify'](_0x5c8bf7[_0x9f26('0x50')]):_0x9f26('0x63'));return respondWithRpcPromise(_0x9f26('0x77'),'rejectMessage',_0x86d6b6);}return null;})[_0x9f26('0x1d')](function(_0x1c0ac4){var _0x16f262=_0x9f26('0x66')+_0x1c0ac4[_0x9f26('0x25')][_0x9f26('0x67')];return db['sequelize'][_0x9f26('0x3f')](_0x16f262,{'type':db['Sequelize'][_0x9f26('0x6a')][_0x9f26('0x6b')],'raw':!![]})[_0x9f26('0x1d')](function(_0x150e4f){return _0x150e4f;});})[_0x9f26('0x1d')](function(_0x31e0b8){if(_0x31e0b8){_0x86d6b6[_0x9f26('0x25')][_0x9f26('0x6c')]=_0x31e0b8[0x0];if(!_0x5c8bf7[_0x9f26('0x50')][_0x9f26('0x59')])return;return db[_0x9f26('0x6d')]['find']({'where':{'id':_0x5c8bf7['body'][_0x9f26('0x59')],'role':_0x9f26('0x5b')},'attributes':['id',_0x9f26('0x35'),'fullname','email',_0x9f26('0x78')],'raw':!![]});}return null;})[_0x9f26('0x1d')](function(_0xe5f90){if(!_0xe5f90)return null;_0x86d6b6['message'][_0x9f26('0x5b')]=_0xe5f90;return _0x86d6b6;})['then'](function(_0x249041){if(_0x249041){_0x249041['message'][_0x9f26('0x71')]=util[_0x9f26('0x57')](_0x9f26('0x79'),_0x5c8bf7[_0x9f26('0x5a')][_0x9f26('0x35')]);_0x249041[_0x9f26('0x25')]['channel']=_0x86d6b6[_0x9f26('0x72')];_0x249041[_0x9f26('0x25')][_0x9f26('0x7a')]=_0x86d6b6['channel'];_0x249041[_0x9f26('0x25')][_0x9f26('0x73')]=_0x9f26('0x30');respondWithRpcPromise('EventManager',_0x9f26('0x75'),{'event':_0x9f26('0x7b'),'message':_0x249041[_0x9f26('0x25')]},client9002);return _0x86d6b6;}return null;})['then'](respondWithResult(_0x30ea5e,null))[_0x9f26('0x26')](handleError(_0x30ea5e,null));};exports[_0x9f26('0x2d')]=function(_0x362da3,_0x5b6383,_0x5733d6){if(_0x362da3['body']['id']){delete _0x362da3['body']['id'];}var _0x385e5e;return db[_0x9f26('0x38')][_0x9f26('0x51')]({'where':{'id':_0x362da3[_0x9f26('0x52')]['id']}})['then'](handleEntityNotFound(_0x5b6383,null))[_0x9f26('0x1d')](function(_0x303053){if(_0x303053){_0x385e5e=_0x303053;return db['SmsAccount'][_0x9f26('0x51')]({'where':{'id':_0x303053[_0x9f26('0x7c')]}});}})[_0x9f26('0x1d')](handleEntityNotFound(_0x5b6383,null))[_0x9f26('0x1d')](function(_0x3bee9f){if(_0x3bee9f){logger[_0x9f26('0x1f')]('SmsMessage,\x20%s,\x20%s,\x20%s',_0x9f26('0x2d'),_0x9f26('0x7d'),_0x3bee9f[_0x9f26('0x7e')],util['inspect'](_0x362da3[_0x9f26('0x50')],{'showHidden':![],'depth':null}));switch(_0x3bee9f['type']){case _0x9f26('0x7f'):if(_0x362da3['body'][_0x9f26('0x80')]&&_0x362da3[_0x9f26('0x50')][_0x9f26('0x80')]===_0x385e5e[_0x9f26('0x81')]){return _0x385e5e[_0x9f26('0x82')]({'read':!![]});}else{logger[_0x9f26('0x22')](_0x9f26('0x83'),_0x9f26('0x2d'),'twilio',util['inspect'](_0x362da3[_0x9f26('0x50')],{'showHidden':![],'depth':null}));}break;case _0x9f26('0x84'):if(_0x362da3['body'][_0x9f26('0x85')]&&_0x362da3[_0x9f26('0x50')][_0x9f26('0x85')]===_0x385e5e[_0x9f26('0x81')]&&_[_0x9f26('0x86')]([_0x9f26('0x87'),_0x9f26('0x88')],_0x362da3[_0x9f26('0x50')]['Status'])>=0x0){return _0x385e5e['update']({'read':!![]});}else{logger[_0x9f26('0x22')]('SmsAccount,\x20%s,\x20%s,\x20%s','status',_0x9f26('0x89'),util[_0x9f26('0x8a')](_0x362da3[_0x9f26('0x50')],{'showHidden':![],'depth':null}));}break;case _0x9f26('0x8b'):var _0xdff1ad=_0x362da3['body'][_0x9f26('0x8c')][0x0];if(_0xdff1ad['status'][_0x9f26('0x8d')]===_0x9f26('0x8e')){return _0x385e5e[_0x9f26('0x82')]({'read':!![]});}else{logger[_0x9f26('0x22')]('SmsAccount,\x20%s,\x20%s,\x20%s',_0x9f26('0x2d'),_0x9f26('0x8b'),util['inspect'](_0x362da3['body'],{'showHidden':![],'depth':null}));}break;}return _0x385e5e;}})[_0x9f26('0x1d')](respondWithResult(_0x5b6383,null))[_0x9f26('0x26')](handleError(_0x5b6383,null));}; \ No newline at end of file diff --git a/server/api/smsMessage/smsMessage.events.js b/server/api/smsMessage/smsMessage.events.js index da07fc1..f478ed8 100644 --- a/server/api/smsMessage/smsMessage.events.js +++ b/server/api/smsMessage/smsMessage.events.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xc46f=['events','../../mysqldb','SmsMessage','setMaxListeners','save','update','emit','hasOwnProperty','hook','exports'];(function(_0x215dc8,_0x52c245){var _0x583ea3=function(_0x32350d){while(--_0x32350d){_0x215dc8['push'](_0x215dc8['shift']());}};_0x583ea3(++_0x52c245);}(_0xc46f,0x168));var _0xfc46=function(_0x8c43de,_0x90ff31){_0x8c43de=_0x8c43de-0x0;var _0xa6591b=_0xc46f[_0x8c43de];return _0xa6591b;};'use strict';var EventEmitter=require(_0xfc46('0x0'));var SmsMessage=require(_0xfc46('0x1'))['db'][_0xfc46('0x2')];var SmsMessageEvents=new EventEmitter();SmsMessageEvents[_0xfc46('0x3')](0x0);var events={'afterCreate':_0xfc46('0x4'),'afterUpdate':_0xfc46('0x5'),'afterDestroy':'remove'};function emitEvent(_0x304203){return function(_0x16efd2,_0xa0570f,_0x4a4acb){SmsMessageEvents[_0xfc46('0x6')](_0x304203+':'+_0x16efd2['id'],_0x16efd2);SmsMessageEvents[_0xfc46('0x6')](_0x304203,_0x16efd2);_0x4a4acb(null);};}for(var e in events){if(events[_0xfc46('0x7')](e)){var event=events[e];SmsMessage[_0xfc46('0x8')](e,emitEvent(event));}}module[_0xfc46('0x9')]=SmsMessageEvents; \ No newline at end of file +var _0xe431=['../../mysqldb','setMaxListeners','remove','emit','hasOwnProperty','exports','events'];(function(_0x3e3064,_0x3dd6f5){var _0x4547e1=function(_0x785d07){while(--_0x785d07){_0x3e3064['push'](_0x3e3064['shift']());}};_0x4547e1(++_0x3dd6f5);}(_0xe431,0x14f));var _0x1e43=function(_0x25582d,_0x572da5){_0x25582d=_0x25582d-0x0;var _0x2b41cd=_0xe431[_0x25582d];return _0x2b41cd;};'use strict';var EventEmitter=require(_0x1e43('0x0'));var SmsMessage=require(_0x1e43('0x1'))['db']['SmsMessage'];var SmsMessageEvents=new EventEmitter();SmsMessageEvents[_0x1e43('0x2')](0x0);var events={'afterCreate':'save','afterUpdate':'update','afterDestroy':_0x1e43('0x3')};function emitEvent(_0x35978e){return function(_0x416c43,_0x1959c4,_0x22c01a){SmsMessageEvents[_0x1e43('0x4')](_0x35978e+':'+_0x416c43['id'],_0x416c43);SmsMessageEvents[_0x1e43('0x4')](_0x35978e,_0x416c43);_0x22c01a(null);};}for(var e in events){if(events[_0x1e43('0x5')](e)){var event=events[e];SmsMessage['hook'](e,emitEvent(event));}}module[_0x1e43('0x6')]=SmsMessageEvents; \ No newline at end of file diff --git a/server/api/smsMessage/smsMessage.model.js b/server/api/smsMessage/smsMessage.model.js index 1a41390..325c965 100644 --- a/server/api/smsMessage/smsMessage.model.js +++ b/server/api/smsMessage/smsMessage.model.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x2d95=['password','smsMethod','username','&password=','split','POST','user_key','session_key','internal_order_id','deliveryReport','read','skebby','Missing\x20parameters:\x20username,\x20password','connectel','authToken','senderString','Missing\x20parameters:\x20authToken','xCALLY\x20Motion','format','%s:%s','https://rest.clicksend.com/v3/sms/send','Basic\x20%s','toString','http_code','data','queued_count','messages','message_id','clickSend','plivo','authId','remote','/status?token=','message_uuid','Missing\x20parameters:\x20authId,\x20authToken','infobip','baseUrl','/auth/1/session','/sms/2/text/advanced','application/json','IBSSO\x20','Missing\x20parameters:\x20base_url','csc','crypto','apiKey','login','text','timestamp','keys','sort','length','md5','digest','hex','signature=','GET','id_sms','Missing\x20parameters:\x20apiKey','clickatell','https://platform.clickatell.com/messages','uuid','UTF-8','https://messaging.bandwidth.com/api/v2/users/','applicationId','bandwidth','intelepeer','Bearer\x20','code','https://api.intelepeer.com/_rest/v4/app/sms/mdr','refid','message','Token\x20not\x20received','finally','utf8mb4','utf8mb4_unicode_ci','lodash','util','../../config/logger','api','moment','bluebird','request-promise','path','rimraf','./smsMessage.attributes','sms_messages','messageId','fti_sms_messages','body','FULLTEXT','get','toLowerCase','direction','secret','isNil','UserId','SmsInteractionId','findOne','update','createdAt','catch','error','out','SmsAccount','find','SmsAccountId','then','type','phone','accountSid','create','/api/sms/messages/','token','sid','twilio','inspect','SmsMessage,\x20%s,\x20%s,\x20%s','afterCreate','Missing\x20parameters:\x20phone,\x20accountSid\x20or\x20authToken'];(function(_0x4b69ea,_0x2d1c6f){var _0x2f4945=function(_0x58c6ca){while(--_0x58c6ca){_0x4b69ea['push'](_0x4b69ea['shift']());}};_0x2f4945(++_0x2d1c6f);}(_0x2d95,0x139));var _0x52d9=function(_0x122624,_0x5ef7e0){_0x122624=_0x122624-0x0;var _0x29a959=_0x2d95[_0x122624];return _0x29a959;};'use strict';var _=require(_0x52d9('0x0'));var util=require(_0x52d9('0x1'));var logger=require(_0x52d9('0x2'))(_0x52d9('0x3'));var moment=require(_0x52d9('0x4'));var BPromise=require(_0x52d9('0x5'));var rp=require(_0x52d9('0x6'));var fs=require('fs');var path=require(_0x52d9('0x7'));var rimraf=require(_0x52d9('0x8'));var config=require('../../config/environment');var attributes=require(_0x52d9('0x9'));module['exports']=function(_0xc6c5b7,_0x4a9e57){return _0xc6c5b7['define']('SmsMessage',attributes,{'tableName':_0x52d9('0xa'),'paranoid':![],'indexes':[{'name':_0x52d9('0xb'),'fields':[_0x52d9('0xb')]},{'name':_0x52d9('0xc'),'fields':[_0x52d9('0xd')],'type':_0x52d9('0xe')}],'timestamps':!![],'hooks':{'afterCreate':function(_0x3f4636,_0x54c70e,_0x1dbb01){var _0xd6ec4f=_0xc6c5b7['models'];var _0x5671a5=_0x3f4636[_0x52d9('0xf')]({'plain':!![]});if(_0x5671a5['direction'][_0x52d9('0x10')]()==='in'||_0x5671a5[_0x52d9('0x11')]['toLowerCase']()==='out'&&!_0x5671a5[_0x52d9('0x12')]&&!_[_0x52d9('0x13')](_0x5671a5[_0x52d9('0x14')])&&!_['isNil'](_0x5671a5[_0x52d9('0x15')])){_0xd6ec4f['SmsInteraction'][_0x52d9('0x16')]({'where':{'id':_0x5671a5[_0x52d9('0x15')]}})['then'](function(_0x2c0560){if(_0x2c0560){_0x2c0560[_0x52d9('0x17')]({'lastMsgAt':_0x5671a5[_0x52d9('0x18')],'lastMsgDirection':_0x5671a5[_0x52d9('0x11')][_0x52d9('0x10')]()});}})[_0x52d9('0x19')](function(_0x28a289){console[_0x52d9('0x1a')](_0x28a289);});}if(_0x5671a5[_0x52d9('0x11')]===_0x52d9('0x1b')&&!_0x5671a5[_0x52d9('0x12')]){var _0xa779ef;_0xd6ec4f[_0x52d9('0x1c')][_0x52d9('0x1d')]({'where':{'id':_0x5671a5[_0x52d9('0x1e')]},'raw':!![]})[_0x52d9('0x1f')](function(_0x32d316){_0xa779ef=_0x32d316;if(_0xa779ef&&_0xa779ef['type']){switch(_0xa779ef[_0x52d9('0x20')]){case'twilio':var _0x690a37=require('twilio');if(_0xa779ef['accountSid']&&_0xa779ef['authToken']&&_0xa779ef[_0x52d9('0x21')]){var _0x186cdb=new _0x690a37(_0xa779ef[_0x52d9('0x22')],_0xa779ef['authToken']);_0x186cdb['messages'][_0x52d9('0x23')]({'body':_0x5671a5['body'],'to':_0x5671a5[_0x52d9('0x21')],'from':_0xa779ef[_0x52d9('0x21')],'statusCallback':_0xa779ef['remote']+_0x52d9('0x24')+_0x5671a5['id']+'/status?token='+_0xa779ef[_0x52d9('0x25')]})[_0x52d9('0x1f')](function(_0x59e69b){if(_0x59e69b[_0x52d9('0x26')]){return _0x3f4636[_0x52d9('0x17')]({'messageId':_0x59e69b[_0x52d9('0x26')]});}})['catch'](function(_0x584bb1){logger[_0x52d9('0x1a')]('SmsMessage,\x20%s,\x20%s,\x20%s','afterCreate',_0x52d9('0x27'),util[_0x52d9('0x28')](_0x584bb1,{'showHidden':![],'depth':null}));});}else{logger[_0x52d9('0x1a')](_0x52d9('0x29'),_0x52d9('0x2a'),_0x52d9('0x27'),_0x52d9('0x2b'));}break;case'skebby':var _0xb56d86='https://api.skebby.it/API/v1.0/REST/';if(_0xa779ef['username']&&_0xa779ef[_0x52d9('0x2c')]){var _0x4b924a={'recipient':[_0x5671a5[_0x52d9('0x21')]],'message':_0x5671a5['body'],'message_type':_0xa779ef[_0x52d9('0x2d')]};if(_0xa779ef[_0x52d9('0x2d')]&&_0xa779ef[_0x52d9('0x2d')]!=='SI'){_0x4b924a['sender']=_0xa779ef['phone'];}var _0x29bf78={'url':_0xb56d86+'login?username='+_0xa779ef[_0x52d9('0x2e')]+_0x52d9('0x2f')+_0xa779ef['password'],'method':'GET'};rp(_0x29bf78)['then'](function(_0x2a181e){var _0x484a28=_0x2a181e[_0x52d9('0x30')](';');var _0x319067={'user_key':_0x484a28[0x0],'session_key':_0x484a28[0x1]};_0x29bf78={'url':_0xb56d86+'sms','method':_0x52d9('0x31'),'headers':{'user_key':_0x319067[_0x52d9('0x32')],'Session_key':_0x319067[_0x52d9('0x33')]},'json':!![],'body':_0x4b924a};return rp(_0x29bf78);})[_0x52d9('0x1f')](function(_0x4e6d75){if(_0x4e6d75['total_sent']>=0x1){var _0x35a7eb={'messageId':_0x4e6d75[_0x52d9('0x34')]};if(_0xa779ef[_0x52d9('0x2d')]!=='GP'||!_0xa779ef[_0x52d9('0x35')]){_0x35a7eb[_0x52d9('0x36')]=!![];}return _0x3f4636[_0x52d9('0x17')](_0x35a7eb);}else{return logger[_0x52d9('0x1a')](_0x52d9('0x29'),'afterCreate',_0x52d9('0x37'),util[_0x52d9('0x28')](_0x4e6d75,{'showHidden':![],'depth':null}));}})[_0x52d9('0x19')](function(_0x50e728){return logger[_0x52d9('0x1a')](_0x52d9('0x29'),'afterCreate',_0x52d9('0x37'),util[_0x52d9('0x28')](_0x50e728,{'showHidden':![],'depth':null}));});}else{logger[_0x52d9('0x1a')](_0x52d9('0x29'),_0x52d9('0x2a'),_0x52d9('0x37'),_0x52d9('0x38'));}break;case _0x52d9('0x39'):if(_0xa779ef[_0x52d9('0x3a')]){var _0x332cef={'recipient':_0x5671a5['phone'],'message':_0x5671a5[_0x52d9('0xd')],'sender':_0xa779ef[_0x52d9('0x3b')]||_0xa779ef['phone'],'authorization':_0xa779ef['authToken']};var _0x54c70e={'method':_0x52d9('0x31'),'uri':'https://smsapi.connectel.se/api/v2/send/','body':_0x332cef,'json':!![]};rp(_0x54c70e)[_0x52d9('0x1f')](function(_0x5129fd){var _0x4e64d7={'messageId':_0x5129fd['requestid']};if(!_0xa779ef[_0x52d9('0x35')]){_0x4e64d7[_0x52d9('0x36')]=!![];}return _0x3f4636['update'](_0x4e64d7);})[_0x52d9('0x19')](function(_0x25481b){logger[_0x52d9('0x1a')](_0x52d9('0x29'),_0x52d9('0x2a'),'connectel',util[_0x52d9('0x28')](_0x25481b,{'showHidden':![],'depth':null}));});}else{logger[_0x52d9('0x1a')](_0x52d9('0x29'),_0x52d9('0x2a'),'connectel',_0x52d9('0x3c'));}break;case'clicksend':if(_0xa779ef['username']&&_0xa779ef[_0x52d9('0x2c')]){var _0x332cef={'messages':[{'source':_0x52d9('0x3d'),'to':_0x5671a5['phone'],'body':_0x5671a5[_0x52d9('0xd')],'from':_0xa779ef[_0x52d9('0x3b')]||_0xa779ef['phone']}]};var _0x1b20b0=util[_0x52d9('0x3e')](_0x52d9('0x3f'),_0xa779ef['username'],_0xa779ef[_0x52d9('0x2c')]);var _0x54c70e={'method':_0x52d9('0x31'),'uri':_0x52d9('0x40'),'body':_0x332cef,'headers':{'Authorization':util[_0x52d9('0x3e')](_0x52d9('0x41'),new Buffer(_0x1b20b0)[_0x52d9('0x42')]('base64'))},'json':!![]};rp(_0x54c70e)[_0x52d9('0x1f')](function(_0x28d3f4){if(_0x28d3f4[_0x52d9('0x43')]>=0xc8&&_0x28d3f4['http_code']<=0xce){if(_0x28d3f4[_0x52d9('0x44')]&&_0x28d3f4['data'][_0x52d9('0x45')]>0x0){var _0x291d6a=_['head'](_0x28d3f4[_0x52d9('0x44')][_0x52d9('0x46')]);var _0x2f92b4={'messageId':_0x291d6a[_0x52d9('0x47')]};if(!_0xa779ef[_0x52d9('0x35')]){_0x2f92b4[_0x52d9('0x36')]=!![];}return _0x3f4636['update'](_0x2f92b4);}else{logger['error'](_0x52d9('0x29'),_0x52d9('0x2a'),_0x52d9('0x48'),util[_0x52d9('0x28')](_0x28d3f4,{'showHidden':![],'depth':null}));}}else{logger[_0x52d9('0x1a')](_0x52d9('0x29'),'afterCreate',_0x52d9('0x48'),util['inspect'](_0x28d3f4,{'showHidden':![],'depth':null}));}})['catch'](function(_0x491966){logger[_0x52d9('0x1a')](_0x52d9('0x29'),'afterCreate',_0x52d9('0x48'),util[_0x52d9('0x28')](_0x491966,{'showHidden':![],'depth':null}));});}else{logger[_0x52d9('0x1a')](_0x52d9('0x29'),_0x52d9('0x2a'),_0x52d9('0x48'),_0x52d9('0x38'));}break;case _0x52d9('0x49'):if(_0xa779ef[_0x52d9('0x4a')]&&_0xa779ef['authToken']){var _0x332cef={'dst':_0x5671a5[_0x52d9('0x21')],'text':_0x5671a5['body'],'src':_0xa779ef[_0x52d9('0x3b')]||_0xa779ef[_0x52d9('0x21')],'url':_0xa779ef[_0x52d9('0x4b')]+_0x52d9('0x24')+_0x5671a5['id']+_0x52d9('0x4c')+_0xa779ef[_0x52d9('0x25')]};var _0x1b20b0=util[_0x52d9('0x3e')](_0x52d9('0x3f'),_0xa779ef['authId'],_0xa779ef['authToken']);var _0x54c70e={'method':_0x52d9('0x31'),'uri':util[_0x52d9('0x3e')]('https://api.plivo.com/v1/Account/%s/Message/',_0xa779ef[_0x52d9('0x4a')]),'body':_0x332cef,'headers':{'Authorization':util[_0x52d9('0x3e')](_0x52d9('0x41'),new Buffer(_0x1b20b0)['toString']('base64'))},'json':!![]};rp(_0x54c70e)[_0x52d9('0x1f')](function(_0x18dd13){var _0x39a0f4={'messageId':_0x18dd13[_0x52d9('0x4d')][0x0]};return _0x3f4636[_0x52d9('0x17')](_0x39a0f4);})[_0x52d9('0x19')](function(_0x9c53e1){logger[_0x52d9('0x1a')]('SmsMessage,\x20%s,\x20%s,\x20%s',_0x52d9('0x2a'),'plivo',util[_0x52d9('0x28')](_0x9c53e1,{'showHidden':![],'depth':null}));});}else{logger[_0x52d9('0x1a')](_0x52d9('0x29'),_0x52d9('0x2a'),_0x52d9('0x49'),_0x52d9('0x4e'));}break;case _0x52d9('0x4f'):if(_0xa779ef['username']&&_0xa779ef[_0x52d9('0x2c')]){if(_0xa779ef[_0x52d9('0x50')]){var _0x24abb1={'method':_0x52d9('0x31'),'uri':_0xa779ef[_0x52d9('0x50')]+_0x52d9('0x51'),'body':{'username':_0xa779ef[_0x52d9('0x2e')],'password':_0xa779ef[_0x52d9('0x2c')]},'json':!![]};return rp(_0x24abb1)[_0x52d9('0x1f')](function(_0x36c177){var _0x12345d={'method':'POST','uri':_0xa779ef[_0x52d9('0x50')]+_0x52d9('0x52'),'body':{'messages':[{'from':_0xa779ef[_0x52d9('0x21')],'destinations':[{'to':_0x5671a5[_0x52d9('0x21')]}],'text':_0x5671a5['body'],'notifyUrl':_0xa779ef['remote']+'/api/sms/messages/'+_0x5671a5['id']+'/status?token='+_0xa779ef['token'],'notifyContentType':_0x52d9('0x53'),'callbackData':_0xa779ef[_0x52d9('0x21')]+';'+_0x5671a5[_0x52d9('0xd')]}]},'headers':{'Authorization':_0x52d9('0x54')+_0x36c177['token']},'json':!![]};return rp(_0x12345d)[_0x52d9('0x1f')](function(_0xb746ca){if(_0xb746ca['messages']){var _0x1453db={'messageId':_0xb746ca[_0x52d9('0x46')][0x0][_0x52d9('0xb')]};if(!_0xa779ef[_0x52d9('0x35')]){_0x1453db[_0x52d9('0x36')]=!![];}return _0x3f4636[_0x52d9('0x17')](_0x1453db);}else{return logger[_0x52d9('0x1a')](_0x52d9('0x29'),_0x52d9('0x2a'),_0x52d9('0x4f'),util[_0x52d9('0x28')](_0xb746ca,{'showHidden':![],'depth':null}));}});})['catch'](function(_0x5afc0d){return logger[_0x52d9('0x1a')](_0x52d9('0x29'),_0x52d9('0x2a'),_0x52d9('0x4f'),util[_0x52d9('0x28')](_0x5afc0d,{'showHidden':![],'depth':null}));});}else{logger[_0x52d9('0x1a')](_0x52d9('0x29'),_0x52d9('0x2a'),'infobip',_0x52d9('0x55'));}}else{logger[_0x52d9('0x1a')](_0x52d9('0x29'),'afterCreate',_0x52d9('0x4f'),_0x52d9('0x38'));}break;case _0x52d9('0x56'):var _0x98a2bf=require(_0x52d9('0x57'));if(_0xa779ef[_0x52d9('0x58')]){var _0x488db6={};_0x488db6[_0x52d9('0x59')]=_0xa779ef['username'];_0x488db6['phone']=_0x5671a5[_0x52d9('0x21')];_0x488db6['sender']=_0xa779ef[_0x52d9('0x21')];_0x488db6[_0x52d9('0x5a')]=_0x5671a5['body'];_0x488db6[_0x52d9('0x5b')]=+new Date();var _0x4277ce='';var _0x1d4e8a='';var _0x362726=Object[_0x52d9('0x5c')](_0x488db6);_0x362726[_0x52d9('0x5d')]();for(var _0x3c1be6=0x0;_0x3c1be6<_0x362726[_0x52d9('0x5e')];_0x3c1be6++){if(_0x4277ce!=''){_0x4277ce+='&';}_0x4277ce+=_0x362726[_0x3c1be6]+'='+encodeURIComponent(_0x488db6[_0x362726[_0x3c1be6]]);_0x1d4e8a+=_0x488db6[_0x362726[_0x3c1be6]];}_0x1d4e8a+=_0xa779ef[_0x52d9('0x58')];_0x1d4e8a=_0x98a2bf['createHash'](_0x52d9('0x5f'))[_0x52d9('0x17')](_0x1d4e8a)[_0x52d9('0x60')](_0x52d9('0x61'));if(_0x4277ce!==''){_0x4277ce+='&';}_0x4277ce+=_0x52d9('0x62')+_0x1d4e8a;var _0x29bf78={'method':_0x52d9('0x63'),'uri':_0xa779ef[_0x52d9('0x50')]+'/external/get/send.php?'+_0x4277ce,'json':!![]};return rp(_0x29bf78)[_0x52d9('0x1f')](function(_0x39b068){var _0x1b6a90=Object[_0x52d9('0x5c')](_0x39b068);if(_0x39b068[_0x1b6a90[0x0]]['error']&&parseInt(_0x39b068[_0x1b6a90[0x0]][_0x52d9('0x1a')])===0x0){var _0x275f0a={'messageId':_0x39b068[_0x1b6a90[0x0]][_0x52d9('0x64')]};if(!_0xa779ef['deliveryReport']){_0x275f0a['read']=!![];}return _0x3f4636[_0x52d9('0x17')](_0x275f0a);}else{return logger[_0x52d9('0x1a')](_0x52d9('0x29'),_0x52d9('0x2a'),_0x52d9('0x56'),util['inspect'](_0x39b068[_0x52d9('0x1a')],{'showHidden':![],'depth':null}));}})[_0x52d9('0x19')](function(_0x373811){return logger[_0x52d9('0x1a')](_0x52d9('0x29'),_0x52d9('0x2a'),'csc',util['inspect'](_0x373811,{'showHidden':![],'depth':null}));});}else{logger[_0x52d9('0x1a')](_0x52d9('0x29'),_0x52d9('0x2a'),_0x52d9('0x56'),_0x52d9('0x65'));}break;case _0x52d9('0x66'):if(_0xa779ef[_0x52d9('0x58')]){var _0x29ea5c={'method':_0x52d9('0x31'),'uri':_0x52d9('0x67'),'headers':{'Authorization':_0xa779ef[_0x52d9('0x58')]},'body':{'content':_0x5671a5[_0x52d9('0xd')],'to':[_0x5671a5[_0x52d9('0x21')]],'from':_0xa779ef[_0x52d9('0x21')],'binary':![],'clientMessageId':_0x52d9('0x68'),'charset':_0x52d9('0x69')},'json':!![]};rp(_0x29ea5c)[_0x52d9('0x1f')](function(_0x420ed5){if(!_0x420ed5['error']){var _0x432c2c={'messageId':_0x420ed5[_0x52d9('0x46')][0x0]['apiMessageId']};if(!_0xa779ef['deliveryReport']){_0x432c2c[_0x52d9('0x36')]=!![];}return _0x3f4636[_0x52d9('0x17')](_0x432c2c);}else{return logger[_0x52d9('0x1a')](_0x52d9('0x29'),'afterCreate','clickatell',util[_0x52d9('0x28')](_0x420ed5['error'],{'showHidden':![],'depth':null}));}})['catch'](function(_0x42b0d5){return logger[_0x52d9('0x1a')](_0x52d9('0x29'),_0x52d9('0x2a'),_0x52d9('0x66'),util['inspect'](_0x42b0d5,{'showHidden':![],'depth':null}));});}else{logger[_0x52d9('0x1a')]('SmsMessage,\x20%s,\x20%s,\x20%s',_0x52d9('0x2a'),_0x52d9('0x66'),_0x52d9('0x65'));}break;case'bandwidth':if(_0xa779ef[_0x52d9('0x2e')]&&_0xa779ef[_0x52d9('0x2c')]){var _0x1b20b0=util[_0x52d9('0x3e')](_0x52d9('0x3f'),_0xa779ef[_0x52d9('0x2e')],_0xa779ef[_0x52d9('0x2c')]);var _0x54c70e={'method':_0x52d9('0x31'),'uri':_0x52d9('0x6a')+_0xa779ef['accountId']+'/messages','body':{'to':[_0x5671a5[_0x52d9('0x21')]],'text':_0x5671a5['body'],'from':_0xa779ef[_0x52d9('0x21')],'applicationId':_0xa779ef[_0x52d9('0x6b')]},'headers':{'Authorization':util[_0x52d9('0x3e')](_0x52d9('0x41'),new Buffer(_0x1b20b0)[_0x52d9('0x42')]('base64'))},'json':!![]};rp(_0x54c70e)[_0x52d9('0x1f')](function(_0x450866){if(_0x450866['id']){var _0x47cb78={'messageId':_0x450866['id']};return _0x3f4636[_0x52d9('0x17')](_0x47cb78);}else{logger['error'](_0x52d9('0x29'),_0x52d9('0x2a'),'bandwidth',util[_0x52d9('0x28')](_0x450866,{'showHidden':![],'depth':null}));}})[_0x52d9('0x19')](function(_0x2f5ed0){logger[_0x52d9('0x1a')](_0x52d9('0x29'),_0x52d9('0x2a'),_0x52d9('0x6c'),util[_0x52d9('0x28')](_0x2f5ed0,{'showHidden':![],'depth':null}));});}else{logger['error'](_0x52d9('0x29'),'afterCreate','bandwidth',_0x52d9('0x38'));}break;case _0x52d9('0x6d'):if(_0xa779ef[_0x52d9('0x58')]){var _0x1aa426={};var _0x29bf78={'method':_0x52d9('0x31'),'uri':'https://api.intelepeer.com/_rest/v4/app/sms/send','headers':{'Authorization':_0x52d9('0x6e')+_0xa779ef[_0x52d9('0x58')],'Content-Type':'application/json'},'body':{'from':_0xa779ef[_0x52d9('0x21')],'to':_0x5671a5[_0x52d9('0x21')],'text':_0x5671a5['body']},'json':!![]};return rp(_0x29bf78)[_0x52d9('0x1f')](function(_0x23c98b){if(_0x23c98b[_0x52d9('0x6f')]==0xca){_0x1aa426['message']=_0x23c98b;var _0x273e74={'method':_0x52d9('0x31'),'uri':_0x52d9('0x70'),'headers':{'Authorization':_0x52d9('0x6e')+_0xa779ef[_0x52d9('0x58')],'Content-Type':'application/json'},'body':{'refid':_0x1aa426['message'][_0x52d9('0x71')]},'json':!![]};return rp(_0x273e74)[_0x52d9('0x1f')](function(_0x53c0da){_0x1aa426['status']=_0x53c0da;var _0x21a1f5={'messageId':_0x1aa426[_0x52d9('0x72')][_0x52d9('0x71')],'read':!![]};return _0x3f4636['update'](_0x21a1f5);});}else{return logger[_0x52d9('0x1a')]('SmsMessage,\x20%s,\x20%s,\x20%s',_0x52d9('0x2a'),'intelepeer',util['inspect'](_0x23c98b,{'showHidden':![],'depth':null}));}})[_0x52d9('0x19')](function(_0x3ffb67){return logger[_0x52d9('0x1a')](_0x52d9('0x29'),_0x52d9('0x2a'),_0x52d9('0x6d'),util['inspect'](_0x3ffb67,{'showHidden':![],'depth':null}));});}else{return logger[_0x52d9('0x1a')](_0x52d9('0x29'),_0x52d9('0x2a'),_0x52d9('0x6d'),_0x52d9('0x73'));}break;}}})[_0x52d9('0x74')](function(){_0x1dbb01();});}else{_0x1dbb01();}}},'charset':_0x52d9('0x75'),'collate':_0x52d9('0x76')});}; \ No newline at end of file +var _0x22a0=['FULLTEXT','models','get','direction','toLowerCase','out','secret','SmsInteractionId','findOne','then','update','createdAt','error','SmsAccount','find','SmsAccountId','type','twilio','accountSid','phone','authToken','messages','create','body','remote','/api/sms/messages/','/status?token=','sid','catch','SmsMessage,\x20%s,\x20%s,\x20%s','afterCreate','inspect','skebby','https://api.skebby.it/API/v1.0/REST/','username','smsMethod','sender','&password=','password','GET','split','sms','POST','user_key','session_key','internal_order_id','deliveryReport','read','Missing\x20parameters:\x20username,\x20password','connectel','senderString','https://smsapi.connectel.se/api/v2/send/','requestid','xCALLY\x20Motion','format','%s:%s','https://rest.clicksend.com/v3/sms/send','Basic\x20%s','base64','http_code','data','queued_count','head','clickSend','plivo','authId','token','toString','message_uuid','Missing\x20parameters:\x20authId,\x20authToken','infobip','baseUrl','/auth/1/session','/sms/2/text/advanced','IBSSO\x20','csc','apiKey','login','text','timestamp','keys','sort','createHash','signature=','/external/get/send.php?','id_sms','Missing\x20parameters:\x20apiKey','clickatell','https://platform.clickatell.com/messages','uuid','UTF-8','bandwidth','https://messaging.bandwidth.com/api/v2/users/','accountId','/messages','applicationId','intelepeer','Bearer\x20','application/json','code','message','refid','status','finally','utf8mb4','utf8mb4_unicode_ci','lodash','util','moment','bluebird','request-promise','path','rimraf','../../config/environment','exports','define','SmsMessage','sms_messages','messageId','fti_sms_messages'];(function(_0x48e0ed,_0x2cf7c7){var _0x374418=function(_0x346a17){while(--_0x346a17){_0x48e0ed['push'](_0x48e0ed['shift']());}};_0x374418(++_0x2cf7c7);}(_0x22a0,0x15a));var _0x022a=function(_0x47cb56,_0x354741){_0x47cb56=_0x47cb56-0x0;var _0x19556a=_0x22a0[_0x47cb56];return _0x19556a;};'use strict';var _=require(_0x022a('0x0'));var util=require(_0x022a('0x1'));var logger=require('../../config/logger')('api');var moment=require(_0x022a('0x2'));var BPromise=require(_0x022a('0x3'));var rp=require(_0x022a('0x4'));var fs=require('fs');var path=require(_0x022a('0x5'));var rimraf=require(_0x022a('0x6'));var config=require(_0x022a('0x7'));var attributes=require('./smsMessage.attributes');module[_0x022a('0x8')]=function(_0x1bce20,_0x1b4f08){return _0x1bce20[_0x022a('0x9')](_0x022a('0xa'),attributes,{'tableName':_0x022a('0xb'),'paranoid':![],'indexes':[{'name':_0x022a('0xc'),'fields':[_0x022a('0xc')]},{'name':_0x022a('0xd'),'fields':['body'],'type':_0x022a('0xe')}],'timestamps':!![],'hooks':{'afterCreate':function(_0x5a8def,_0x56cccb,_0x5d5614){var _0x4b3dc8=_0x1bce20[_0x022a('0xf')];var _0xe3f2ce=_0x5a8def[_0x022a('0x10')]({'plain':!![]});if(_0xe3f2ce[_0x022a('0x11')]['toLowerCase']()==='in'||_0xe3f2ce[_0x022a('0x11')][_0x022a('0x12')]()===_0x022a('0x13')&&!_0xe3f2ce[_0x022a('0x14')]&&!_['isNil'](_0xe3f2ce['UserId'])&&!_['isNil'](_0xe3f2ce[_0x022a('0x15')])){_0x4b3dc8['SmsInteraction'][_0x022a('0x16')]({'where':{'id':_0xe3f2ce[_0x022a('0x15')]}})[_0x022a('0x17')](function(_0x1f8fb2){if(_0x1f8fb2){_0x1f8fb2[_0x022a('0x18')]({'lastMsgAt':_0xe3f2ce[_0x022a('0x19')],'lastMsgDirection':_0xe3f2ce[_0x022a('0x11')][_0x022a('0x12')]()});}})['catch'](function(_0xae9b86){console[_0x022a('0x1a')](_0xae9b86);});}if(_0xe3f2ce[_0x022a('0x11')]===_0x022a('0x13')&&!_0xe3f2ce[_0x022a('0x14')]){var _0x4ad375;_0x4b3dc8[_0x022a('0x1b')][_0x022a('0x1c')]({'where':{'id':_0xe3f2ce[_0x022a('0x1d')]},'raw':!![]})[_0x022a('0x17')](function(_0x2b2cf4){_0x4ad375=_0x2b2cf4;if(_0x4ad375&&_0x4ad375[_0x022a('0x1e')]){switch(_0x4ad375[_0x022a('0x1e')]){case _0x022a('0x1f'):var _0x2e5350=require('twilio');if(_0x4ad375[_0x022a('0x20')]&&_0x4ad375['authToken']&&_0x4ad375[_0x022a('0x21')]){var _0x261900=new _0x2e5350(_0x4ad375[_0x022a('0x20')],_0x4ad375[_0x022a('0x22')]);_0x261900[_0x022a('0x23')][_0x022a('0x24')]({'body':_0xe3f2ce[_0x022a('0x25')],'to':_0xe3f2ce[_0x022a('0x21')],'from':_0x4ad375[_0x022a('0x21')],'statusCallback':_0x4ad375[_0x022a('0x26')]+_0x022a('0x27')+_0xe3f2ce['id']+_0x022a('0x28')+_0x4ad375['token']})[_0x022a('0x17')](function(_0x14f31d){if(_0x14f31d['sid']){return _0x5a8def['update']({'messageId':_0x14f31d[_0x022a('0x29')]});}})[_0x022a('0x2a')](function(_0x5204e6){logger[_0x022a('0x1a')](_0x022a('0x2b'),_0x022a('0x2c'),_0x022a('0x1f'),util[_0x022a('0x2d')](_0x5204e6,{'showHidden':![],'depth':null}));});}else{logger['error']('SmsMessage,\x20%s,\x20%s,\x20%s',_0x022a('0x2c'),_0x022a('0x1f'),'Missing\x20parameters:\x20phone,\x20accountSid\x20or\x20authToken');}break;case _0x022a('0x2e'):var _0x3a5787=_0x022a('0x2f');if(_0x4ad375[_0x022a('0x30')]&&_0x4ad375['password']){var _0x18a5e7={'recipient':[_0xe3f2ce[_0x022a('0x21')]],'message':_0xe3f2ce[_0x022a('0x25')],'message_type':_0x4ad375[_0x022a('0x31')]};if(_0x4ad375[_0x022a('0x31')]&&_0x4ad375[_0x022a('0x31')]!=='SI'){_0x18a5e7[_0x022a('0x32')]=_0x4ad375[_0x022a('0x21')];}var _0x19624c={'url':_0x3a5787+'login?username='+_0x4ad375[_0x022a('0x30')]+_0x022a('0x33')+_0x4ad375[_0x022a('0x34')],'method':_0x022a('0x35')};rp(_0x19624c)['then'](function(_0x3ef15c){var _0x11f86c=_0x3ef15c[_0x022a('0x36')](';');var _0xf84aa1={'user_key':_0x11f86c[0x0],'session_key':_0x11f86c[0x1]};_0x19624c={'url':_0x3a5787+_0x022a('0x37'),'method':_0x022a('0x38'),'headers':{'user_key':_0xf84aa1[_0x022a('0x39')],'Session_key':_0xf84aa1[_0x022a('0x3a')]},'json':!![],'body':_0x18a5e7};return rp(_0x19624c);})[_0x022a('0x17')](function(_0x43f34e){if(_0x43f34e['total_sent']>=0x1){var _0x113230={'messageId':_0x43f34e[_0x022a('0x3b')]};if(_0x4ad375[_0x022a('0x31')]!=='GP'||!_0x4ad375[_0x022a('0x3c')]){_0x113230[_0x022a('0x3d')]=!![];}return _0x5a8def[_0x022a('0x18')](_0x113230);}else{return logger[_0x022a('0x1a')](_0x022a('0x2b'),_0x022a('0x2c'),_0x022a('0x2e'),util[_0x022a('0x2d')](_0x43f34e,{'showHidden':![],'depth':null}));}})[_0x022a('0x2a')](function(_0x3ea3ca){return logger['error']('SmsMessage,\x20%s,\x20%s,\x20%s',_0x022a('0x2c'),_0x022a('0x2e'),util[_0x022a('0x2d')](_0x3ea3ca,{'showHidden':![],'depth':null}));});}else{logger[_0x022a('0x1a')](_0x022a('0x2b'),_0x022a('0x2c'),'skebby',_0x022a('0x3e'));}break;case _0x022a('0x3f'):if(_0x4ad375[_0x022a('0x22')]){var _0x130de5={'recipient':_0xe3f2ce['phone'],'message':_0xe3f2ce[_0x022a('0x25')],'sender':_0x4ad375[_0x022a('0x40')]||_0x4ad375[_0x022a('0x21')],'authorization':_0x4ad375['authToken']};var _0x56cccb={'method':_0x022a('0x38'),'uri':_0x022a('0x41'),'body':_0x130de5,'json':!![]};rp(_0x56cccb)[_0x022a('0x17')](function(_0x2e3757){var _0x5b14bc={'messageId':_0x2e3757[_0x022a('0x42')]};if(!_0x4ad375[_0x022a('0x3c')]){_0x5b14bc[_0x022a('0x3d')]=!![];}return _0x5a8def[_0x022a('0x18')](_0x5b14bc);})[_0x022a('0x2a')](function(_0x510b7f){logger[_0x022a('0x1a')]('SmsMessage,\x20%s,\x20%s,\x20%s',_0x022a('0x2c'),'connectel',util['inspect'](_0x510b7f,{'showHidden':![],'depth':null}));});}else{logger[_0x022a('0x1a')](_0x022a('0x2b'),_0x022a('0x2c'),'connectel','Missing\x20parameters:\x20authToken');}break;case'clicksend':if(_0x4ad375[_0x022a('0x30')]&&_0x4ad375[_0x022a('0x34')]){var _0x130de5={'messages':[{'source':_0x022a('0x43'),'to':_0xe3f2ce[_0x022a('0x21')],'body':_0xe3f2ce[_0x022a('0x25')],'from':_0x4ad375[_0x022a('0x40')]||_0x4ad375[_0x022a('0x21')]}]};var _0x4647ca=util[_0x022a('0x44')](_0x022a('0x45'),_0x4ad375[_0x022a('0x30')],_0x4ad375[_0x022a('0x34')]);var _0x56cccb={'method':_0x022a('0x38'),'uri':_0x022a('0x46'),'body':_0x130de5,'headers':{'Authorization':util['format'](_0x022a('0x47'),new Buffer(_0x4647ca)['toString'](_0x022a('0x48')))},'json':!![]};rp(_0x56cccb)[_0x022a('0x17')](function(_0x122a36){if(_0x122a36[_0x022a('0x49')]>=0xc8&&_0x122a36[_0x022a('0x49')]<=0xce){if(_0x122a36['data']&&_0x122a36[_0x022a('0x4a')][_0x022a('0x4b')]>0x0){var _0x59d2a7=_[_0x022a('0x4c')](_0x122a36[_0x022a('0x4a')][_0x022a('0x23')]);var _0x46dcf8={'messageId':_0x59d2a7['message_id']};if(!_0x4ad375[_0x022a('0x3c')]){_0x46dcf8[_0x022a('0x3d')]=!![];}return _0x5a8def[_0x022a('0x18')](_0x46dcf8);}else{logger[_0x022a('0x1a')](_0x022a('0x2b'),'afterCreate',_0x022a('0x4d'),util[_0x022a('0x2d')](_0x122a36,{'showHidden':![],'depth':null}));}}else{logger[_0x022a('0x1a')]('SmsMessage,\x20%s,\x20%s,\x20%s',_0x022a('0x2c'),'clickSend',util[_0x022a('0x2d')](_0x122a36,{'showHidden':![],'depth':null}));}})[_0x022a('0x2a')](function(_0x4f4a61){logger[_0x022a('0x1a')](_0x022a('0x2b'),_0x022a('0x2c'),'clickSend',util[_0x022a('0x2d')](_0x4f4a61,{'showHidden':![],'depth':null}));});}else{logger[_0x022a('0x1a')]('SmsMessage,\x20%s,\x20%s,\x20%s',_0x022a('0x2c'),_0x022a('0x4d'),_0x022a('0x3e'));}break;case _0x022a('0x4e'):if(_0x4ad375[_0x022a('0x4f')]&&_0x4ad375[_0x022a('0x22')]){var _0x130de5={'dst':_0xe3f2ce[_0x022a('0x21')],'text':_0xe3f2ce['body'],'src':_0x4ad375['senderString']||_0x4ad375['phone'],'url':_0x4ad375[_0x022a('0x26')]+_0x022a('0x27')+_0xe3f2ce['id']+'/status?token='+_0x4ad375[_0x022a('0x50')]};var _0x4647ca=util[_0x022a('0x44')]('%s:%s',_0x4ad375[_0x022a('0x4f')],_0x4ad375['authToken']);var _0x56cccb={'method':_0x022a('0x38'),'uri':util[_0x022a('0x44')]('https://api.plivo.com/v1/Account/%s/Message/',_0x4ad375[_0x022a('0x4f')]),'body':_0x130de5,'headers':{'Authorization':util[_0x022a('0x44')]('Basic\x20%s',new Buffer(_0x4647ca)[_0x022a('0x51')](_0x022a('0x48')))},'json':!![]};rp(_0x56cccb)[_0x022a('0x17')](function(_0x278565){var _0x6ab307={'messageId':_0x278565[_0x022a('0x52')][0x0]};return _0x5a8def['update'](_0x6ab307);})[_0x022a('0x2a')](function(_0x21deed){logger[_0x022a('0x1a')](_0x022a('0x2b'),_0x022a('0x2c'),'plivo',util[_0x022a('0x2d')](_0x21deed,{'showHidden':![],'depth':null}));});}else{logger[_0x022a('0x1a')](_0x022a('0x2b'),_0x022a('0x2c'),_0x022a('0x4e'),_0x022a('0x53'));}break;case _0x022a('0x54'):if(_0x4ad375[_0x022a('0x30')]&&_0x4ad375[_0x022a('0x34')]){if(_0x4ad375[_0x022a('0x55')]){var _0x507cf7={'method':'POST','uri':_0x4ad375[_0x022a('0x55')]+_0x022a('0x56'),'body':{'username':_0x4ad375['username'],'password':_0x4ad375['password']},'json':!![]};return rp(_0x507cf7)[_0x022a('0x17')](function(_0x80c923){var _0x5c25ea={'method':_0x022a('0x38'),'uri':_0x4ad375[_0x022a('0x55')]+_0x022a('0x57'),'body':{'messages':[{'from':_0x4ad375[_0x022a('0x21')],'destinations':[{'to':_0xe3f2ce[_0x022a('0x21')]}],'text':_0xe3f2ce[_0x022a('0x25')],'notifyUrl':_0x4ad375[_0x022a('0x26')]+'/api/sms/messages/'+_0xe3f2ce['id']+_0x022a('0x28')+_0x4ad375['token'],'notifyContentType':'application/json','callbackData':_0x4ad375[_0x022a('0x21')]+';'+_0xe3f2ce['body']}]},'headers':{'Authorization':_0x022a('0x58')+_0x80c923[_0x022a('0x50')]},'json':!![]};return rp(_0x5c25ea)['then'](function(_0x2fa1b5){if(_0x2fa1b5['messages']){var _0x4d42a1={'messageId':_0x2fa1b5[_0x022a('0x23')][0x0][_0x022a('0xc')]};if(!_0x4ad375[_0x022a('0x3c')]){_0x4d42a1[_0x022a('0x3d')]=!![];}return _0x5a8def[_0x022a('0x18')](_0x4d42a1);}else{return logger[_0x022a('0x1a')](_0x022a('0x2b'),_0x022a('0x2c'),_0x022a('0x54'),util[_0x022a('0x2d')](_0x2fa1b5,{'showHidden':![],'depth':null}));}});})[_0x022a('0x2a')](function(_0x1b78c6){return logger[_0x022a('0x1a')]('SmsMessage,\x20%s,\x20%s,\x20%s','afterCreate','infobip',util[_0x022a('0x2d')](_0x1b78c6,{'showHidden':![],'depth':null}));});}else{logger[_0x022a('0x1a')](_0x022a('0x2b'),_0x022a('0x2c'),_0x022a('0x54'),'Missing\x20parameters:\x20base_url');}}else{logger[_0x022a('0x1a')](_0x022a('0x2b'),_0x022a('0x2c'),_0x022a('0x54'),_0x022a('0x3e'));}break;case _0x022a('0x59'):var _0x4224fe=require('crypto');if(_0x4ad375[_0x022a('0x5a')]){var _0x2947b4={};_0x2947b4[_0x022a('0x5b')]=_0x4ad375['username'];_0x2947b4[_0x022a('0x21')]=_0xe3f2ce['phone'];_0x2947b4[_0x022a('0x32')]=_0x4ad375[_0x022a('0x21')];_0x2947b4[_0x022a('0x5c')]=_0xe3f2ce[_0x022a('0x25')];_0x2947b4[_0x022a('0x5d')]=+new Date();var _0x304498='';var _0x8fff21='';var _0x3a7703=Object[_0x022a('0x5e')](_0x2947b4);_0x3a7703[_0x022a('0x5f')]();for(var _0x3133e=0x0;_0x3133e<_0x3a7703['length'];_0x3133e++){if(_0x304498!=''){_0x304498+='&';}_0x304498+=_0x3a7703[_0x3133e]+'='+encodeURIComponent(_0x2947b4[_0x3a7703[_0x3133e]]);_0x8fff21+=_0x2947b4[_0x3a7703[_0x3133e]];}_0x8fff21+=_0x4ad375[_0x022a('0x5a')];_0x8fff21=_0x4224fe[_0x022a('0x60')]('md5')[_0x022a('0x18')](_0x8fff21)['digest']('hex');if(_0x304498!==''){_0x304498+='&';}_0x304498+=_0x022a('0x61')+_0x8fff21;var _0x19624c={'method':'GET','uri':_0x4ad375['baseUrl']+_0x022a('0x62')+_0x304498,'json':!![]};return rp(_0x19624c)[_0x022a('0x17')](function(_0x1ea0b9){var _0x36efad=Object[_0x022a('0x5e')](_0x1ea0b9);if(_0x1ea0b9[_0x36efad[0x0]][_0x022a('0x1a')]&&parseInt(_0x1ea0b9[_0x36efad[0x0]][_0x022a('0x1a')])===0x0){var _0x2e0a7c={'messageId':_0x1ea0b9[_0x36efad[0x0]][_0x022a('0x63')]};if(!_0x4ad375[_0x022a('0x3c')]){_0x2e0a7c[_0x022a('0x3d')]=!![];}return _0x5a8def[_0x022a('0x18')](_0x2e0a7c);}else{return logger[_0x022a('0x1a')]('SmsMessage,\x20%s,\x20%s,\x20%s',_0x022a('0x2c'),_0x022a('0x59'),util['inspect'](_0x1ea0b9[_0x022a('0x1a')],{'showHidden':![],'depth':null}));}})[_0x022a('0x2a')](function(_0x11d754){return logger['error'](_0x022a('0x2b'),'afterCreate',_0x022a('0x59'),util[_0x022a('0x2d')](_0x11d754,{'showHidden':![],'depth':null}));});}else{logger[_0x022a('0x1a')](_0x022a('0x2b'),'afterCreate',_0x022a('0x59'),_0x022a('0x64'));}break;case _0x022a('0x65'):if(_0x4ad375['apiKey']){var _0x128ddc={'method':_0x022a('0x38'),'uri':_0x022a('0x66'),'headers':{'Authorization':_0x4ad375[_0x022a('0x5a')]},'body':{'content':_0xe3f2ce[_0x022a('0x25')],'to':[_0xe3f2ce[_0x022a('0x21')]],'from':_0x4ad375[_0x022a('0x21')],'binary':![],'clientMessageId':_0x022a('0x67'),'charset':_0x022a('0x68')},'json':!![]};rp(_0x128ddc)[_0x022a('0x17')](function(_0x2b375c){if(!_0x2b375c[_0x022a('0x1a')]){var _0x15698c={'messageId':_0x2b375c[_0x022a('0x23')][0x0]['apiMessageId']};if(!_0x4ad375[_0x022a('0x3c')]){_0x15698c[_0x022a('0x3d')]=!![];}return _0x5a8def[_0x022a('0x18')](_0x15698c);}else{return logger[_0x022a('0x1a')](_0x022a('0x2b'),_0x022a('0x2c'),'clickatell',util[_0x022a('0x2d')](_0x2b375c[_0x022a('0x1a')],{'showHidden':![],'depth':null}));}})[_0x022a('0x2a')](function(_0x2988a0){return logger[_0x022a('0x1a')](_0x022a('0x2b'),_0x022a('0x2c'),_0x022a('0x65'),util[_0x022a('0x2d')](_0x2988a0,{'showHidden':![],'depth':null}));});}else{logger[_0x022a('0x1a')]('SmsMessage,\x20%s,\x20%s,\x20%s',_0x022a('0x2c'),_0x022a('0x65'),_0x022a('0x64'));}break;case _0x022a('0x69'):if(_0x4ad375[_0x022a('0x30')]&&_0x4ad375[_0x022a('0x34')]){var _0x4647ca=util[_0x022a('0x44')]('%s:%s',_0x4ad375[_0x022a('0x30')],_0x4ad375[_0x022a('0x34')]);var _0x56cccb={'method':_0x022a('0x38'),'uri':_0x022a('0x6a')+_0x4ad375[_0x022a('0x6b')]+_0x022a('0x6c'),'body':{'to':[_0xe3f2ce[_0x022a('0x21')]],'text':_0xe3f2ce[_0x022a('0x25')],'from':_0x4ad375['phone'],'applicationId':_0x4ad375[_0x022a('0x6d')]},'headers':{'Authorization':util['format'](_0x022a('0x47'),new Buffer(_0x4647ca)['toString']('base64'))},'json':!![]};rp(_0x56cccb)[_0x022a('0x17')](function(_0x2a77bd){if(_0x2a77bd['id']){var _0x369825={'messageId':_0x2a77bd['id']};return _0x5a8def['update'](_0x369825);}else{logger[_0x022a('0x1a')]('SmsMessage,\x20%s,\x20%s,\x20%s',_0x022a('0x2c'),'bandwidth',util[_0x022a('0x2d')](_0x2a77bd,{'showHidden':![],'depth':null}));}})[_0x022a('0x2a')](function(_0x1af8a9){logger[_0x022a('0x1a')](_0x022a('0x2b'),_0x022a('0x2c'),_0x022a('0x69'),util['inspect'](_0x1af8a9,{'showHidden':![],'depth':null}));});}else{logger[_0x022a('0x1a')](_0x022a('0x2b'),_0x022a('0x2c'),_0x022a('0x69'),_0x022a('0x3e'));}break;case _0x022a('0x6e'):if(_0x4ad375[_0x022a('0x5a')]){var _0x236fa7={};var _0x19624c={'method':_0x022a('0x38'),'uri':'https://api.intelepeer.com/_rest/v4/app/sms/send','headers':{'Authorization':_0x022a('0x6f')+_0x4ad375['apiKey'],'Content-Type':_0x022a('0x70')},'body':{'from':_0x4ad375[_0x022a('0x21')],'to':_0xe3f2ce['phone'],'text':_0xe3f2ce[_0x022a('0x25')]},'json':!![]};return rp(_0x19624c)[_0x022a('0x17')](function(_0x41f0da){if(_0x41f0da[_0x022a('0x71')]==0xca){_0x236fa7[_0x022a('0x72')]=_0x41f0da;var _0x342c26={'method':_0x022a('0x38'),'uri':'https://api.intelepeer.com/_rest/v4/app/sms/mdr','headers':{'Authorization':_0x022a('0x6f')+_0x4ad375[_0x022a('0x5a')],'Content-Type':_0x022a('0x70')},'body':{'refid':_0x236fa7[_0x022a('0x72')][_0x022a('0x73')]},'json':!![]};return rp(_0x342c26)['then'](function(_0x6cb1ef){_0x236fa7[_0x022a('0x74')]=_0x6cb1ef;var _0x290fe4={'messageId':_0x236fa7[_0x022a('0x72')][_0x022a('0x73')],'read':!![]};return _0x5a8def[_0x022a('0x18')](_0x290fe4);});}else{return logger[_0x022a('0x1a')](_0x022a('0x2b'),'afterCreate','intelepeer',util[_0x022a('0x2d')](_0x41f0da,{'showHidden':![],'depth':null}));}})[_0x022a('0x2a')](function(_0x25ea1f){return logger['error'](_0x022a('0x2b'),_0x022a('0x2c'),_0x022a('0x6e'),util['inspect'](_0x25ea1f,{'showHidden':![],'depth':null}));});}else{return logger['error'](_0x022a('0x2b'),_0x022a('0x2c'),_0x022a('0x6e'),'Token\x20not\x20received');}break;}}})[_0x022a('0x75')](function(){_0x5d5614();});}else{_0x5d5614();}}},'charset':_0x022a('0x76'),'collate':_0x022a('0x77')});}; \ No newline at end of file diff --git a/server/api/smsMessage/smsMessage.rpc.js b/server/api/smsMessage/smsMessage.rpc.js index e79e501..f82a956 100644 --- a/server/api/smsMessage/smsMessage.rpc.js +++ b/server/api/smsMessage/smsMessage.rpc.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x5b55=['message','SmsMessage,\x20%s,\x20%s','result','catch','create','options','raw','CreateSmsMessage','lodash','util','moment','bluebird','randomstring','ioredis','../../config/utils','../../config/logger','rpc','../../config/environment','client','http','redis','defaults','localhost','socket.io-emitter','./smsMessage.socket','register','request','then','info','debug','SmsMessage,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','code'];(function(_0x1460f6,_0x59051a){var _0x46ce94=function(_0x1c3ddf){while(--_0x1c3ddf){_0x1460f6['push'](_0x1460f6['shift']());}};_0x46ce94(++_0x59051a);}(_0x5b55,0x94));var _0x55b5=function(_0x2b9e3c,_0x385f13){_0x2b9e3c=_0x2b9e3c-0x0;var _0x481485=_0x5b55[_0x2b9e3c];return _0x481485;};'use strict';var _=require(_0x55b5('0x0'));var util=require(_0x55b5('0x1'));var moment=require(_0x55b5('0x2'));var BPromise=require(_0x55b5('0x3'));var rs=require(_0x55b5('0x4'));var fs=require('fs');var Redis=require(_0x55b5('0x5'));var db=require('../../mysqldb')['db'];var utils=require(_0x55b5('0x6'));var logger=require(_0x55b5('0x7'))(_0x55b5('0x8'));var config=require(_0x55b5('0x9'));var jayson=require('jayson/promise');var client=jayson[_0x55b5('0xa')][_0x55b5('0xb')]({'port':0x232a});config[_0x55b5('0xc')]=_[_0x55b5('0xd')](config[_0x55b5('0xc')],{'host':_0x55b5('0xe'),'port':0x18eb});var socket=require(_0x55b5('0xf'))(new Redis(config['redis']));require(_0x55b5('0x10'))[_0x55b5('0x11')](socket);function respondWithRpcPromise(_0x3a20ef,_0x199f5c,_0x62318d){return new BPromise(function(_0x21d8a3,_0x47d8ba){return client[_0x55b5('0x12')](_0x3a20ef,_0x62318d)[_0x55b5('0x13')](function(_0x29cf3f){logger[_0x55b5('0x14')]('SmsMessage,\x20%s,\x20%s',_0x199f5c,'request\x20sent');logger[_0x55b5('0x15')](_0x55b5('0x16'),_0x199f5c,_0x55b5('0x17'),JSON[_0x55b5('0x18')](_0x29cf3f));if(_0x29cf3f[_0x55b5('0x19')]){if(_0x29cf3f['error'][_0x55b5('0x1a')]===0x1f4){logger['error']('SmsMessage,\x20%s,\x20%s',_0x199f5c,_0x29cf3f[_0x55b5('0x19')][_0x55b5('0x1b')]);return _0x47d8ba(_0x29cf3f[_0x55b5('0x19')][_0x55b5('0x1b')]);}logger['error']('SmsMessage,\x20%s,\x20%s',_0x199f5c,_0x29cf3f[_0x55b5('0x19')][_0x55b5('0x1b')]);return _0x21d8a3(_0x29cf3f[_0x55b5('0x19')][_0x55b5('0x1b')]);}else{logger[_0x55b5('0x14')](_0x55b5('0x1c'),_0x199f5c,_0x55b5('0x17'));_0x21d8a3(_0x29cf3f[_0x55b5('0x1d')]['message']);}})[_0x55b5('0x1e')](function(_0x408773){logger[_0x55b5('0x19')](_0x55b5('0x1c'),_0x199f5c,_0x408773);_0x47d8ba(_0x408773);});});}exports['CreateSmsMessage']=function(_0x2943ca){var _0x5a4562=this;return new Promise(function(_0x2ff08d,_0x3ee99e){return db['SmsMessage'][_0x55b5('0x1f')](_0x2943ca['body'],{'raw':_0x2943ca['options']?_0x2943ca[_0x55b5('0x20')][_0x55b5('0x21')]===undefined?!![]:![]:!![]})['then'](function(_0x5a3e87){logger['info'](_0x55b5('0x22'),_0x2943ca);logger[_0x55b5('0x15')]('CreateSmsMessage',_0x2943ca,JSON['stringify'](_0x5a3e87));_0x2ff08d(_0x5a3e87);})[_0x55b5('0x1e')](function(_0x9ff515){logger[_0x55b5('0x19')]('CreateSmsMessage',_0x9ff515[_0x55b5('0x1b')],_0x2943ca);_0x3ee99e(_0x5a4562[_0x55b5('0x19')](0x1f4,_0x9ff515['message']));});});}; \ No newline at end of file +var _0x5683=['../../config/logger','rpc','../../config/environment','jayson/promise','client','redis','localhost','socket.io-emitter','./smsMessage.socket','register','request','then','info','SmsMessage,\x20%s,\x20%s','request\x20sent','SmsMessage,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','catch','CreateSmsMessage','SmsMessage','create','body','options','raw','debug','lodash','util','moment','bluebird','randomstring','ioredis','../../mysqldb'];(function(_0x4e37e5,_0x37eddc){var _0x1bea9b=function(_0x1dc1e7){while(--_0x1dc1e7){_0x4e37e5['push'](_0x4e37e5['shift']());}};_0x1bea9b(++_0x37eddc);}(_0x5683,0x1f1));var _0x3568=function(_0x4d8ed9,_0x2ae284){_0x4d8ed9=_0x4d8ed9-0x0;var _0x1e2140=_0x5683[_0x4d8ed9];return _0x1e2140;};'use strict';var _=require(_0x3568('0x0'));var util=require(_0x3568('0x1'));var moment=require(_0x3568('0x2'));var BPromise=require(_0x3568('0x3'));var rs=require(_0x3568('0x4'));var fs=require('fs');var Redis=require(_0x3568('0x5'));var db=require(_0x3568('0x6'))['db'];var utils=require('../../config/utils');var logger=require(_0x3568('0x7'))(_0x3568('0x8'));var config=require(_0x3568('0x9'));var jayson=require(_0x3568('0xa'));var client=jayson[_0x3568('0xb')]['http']({'port':0x232a});config['redis']=_['defaults'](config[_0x3568('0xc')],{'host':_0x3568('0xd'),'port':0x18eb});var socket=require(_0x3568('0xe'))(new Redis(config['redis']));require(_0x3568('0xf'))[_0x3568('0x10')](socket);function respondWithRpcPromise(_0x170661,_0x98d70e,_0x4cde64){return new BPromise(function(_0x233442,_0x1e4794){return client[_0x3568('0x11')](_0x170661,_0x4cde64)[_0x3568('0x12')](function(_0x31c83b){logger[_0x3568('0x13')](_0x3568('0x14'),_0x98d70e,_0x3568('0x15'));logger['debug'](_0x3568('0x16'),_0x98d70e,'request\x20sent',JSON[_0x3568('0x17')](_0x31c83b));if(_0x31c83b[_0x3568('0x18')]){if(_0x31c83b[_0x3568('0x18')][_0x3568('0x19')]===0x1f4){logger[_0x3568('0x18')](_0x3568('0x14'),_0x98d70e,_0x31c83b[_0x3568('0x18')][_0x3568('0x1a')]);return _0x1e4794(_0x31c83b[_0x3568('0x18')][_0x3568('0x1a')]);}logger[_0x3568('0x18')]('SmsMessage,\x20%s,\x20%s',_0x98d70e,_0x31c83b[_0x3568('0x18')]['message']);return _0x233442(_0x31c83b[_0x3568('0x18')][_0x3568('0x1a')]);}else{logger['info'](_0x3568('0x14'),_0x98d70e,_0x3568('0x15'));_0x233442(_0x31c83b[_0x3568('0x1b')]['message']);}})[_0x3568('0x1c')](function(_0x3051a1){logger[_0x3568('0x18')]('SmsMessage,\x20%s,\x20%s',_0x98d70e,_0x3051a1);_0x1e4794(_0x3051a1);});});}exports[_0x3568('0x1d')]=function(_0x30084d){var _0xa20414=this;return new Promise(function(_0x33367d,_0x431cd6){return db[_0x3568('0x1e')][_0x3568('0x1f')](_0x30084d[_0x3568('0x20')],{'raw':_0x30084d['options']?_0x30084d[_0x3568('0x21')][_0x3568('0x22')]===undefined?!![]:![]:!![]})[_0x3568('0x12')](function(_0x1edc4){logger[_0x3568('0x13')](_0x3568('0x1d'),_0x30084d);logger[_0x3568('0x23')](_0x3568('0x1d'),_0x30084d,JSON[_0x3568('0x17')](_0x1edc4));_0x33367d(_0x1edc4);})['catch'](function(_0x2a88fd){logger['error']('CreateSmsMessage',_0x2a88fd[_0x3568('0x1a')],_0x30084d);_0x431cd6(_0xa20414[_0x3568('0x18')](0x1f4,_0x2a88fd[_0x3568('0x1a')]));});});}; \ No newline at end of file diff --git a/server/api/smsMessage/smsMessage.socket.js b/server/api/smsMessage/smsMessage.socket.js index 6833867..2bef5ae 100644 --- a/server/api/smsMessage/smsMessage.socket.js +++ b/server/api/smsMessage/smsMessage.socket.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xf8ad=['length','./smsMessage.events','save','emit','removeListener','register'];(function(_0x6970e9,_0x1d3698){var _0x268849=function(_0x357607){while(--_0x357607){_0x6970e9['push'](_0x6970e9['shift']());}};_0x268849(++_0x1d3698);}(_0xf8ad,0x157));var _0xdf8a=function(_0x283056,_0x50fcce){_0x283056=_0x283056-0x0;var _0x2c0de5=_0xf8ad[_0x283056];return _0x2c0de5;};'use strict';var SmsMessageEvents=require(_0xdf8a('0x0'));var events=[_0xdf8a('0x1'),'remove','update'];function createListener(_0x3f1de6,_0x162a27){return function(_0x4a961a){_0x162a27[_0xdf8a('0x2')](_0x3f1de6,_0x4a961a);};}function removeListener(_0x42c00c,_0x810dcf){return function(){SmsMessageEvents[_0xdf8a('0x3')](_0x42c00c,_0x810dcf);};}exports[_0xdf8a('0x4')]=function(_0x48fdfc){for(var _0xfae9b6=0x0,_0x3b2fe0=events[_0xdf8a('0x5')];_0xfae9b6<_0x3b2fe0;_0xfae9b6++){var _0x3366f9=events[_0xfae9b6];var _0x139024=createListener('smsMessage:'+_0x3366f9,_0x48fdfc);SmsMessageEvents['on'](_0x3366f9,_0x139024);}}; \ No newline at end of file +var _0x048f=['remove','update','emit','removeListener','register','save'];(function(_0x30ae5e,_0x391fc4){var _0x1f2e93=function(_0x60307d){while(--_0x60307d){_0x30ae5e['push'](_0x30ae5e['shift']());}};_0x1f2e93(++_0x391fc4);}(_0x048f,0x83));var _0xf048=function(_0x48e66b,_0x121508){_0x48e66b=_0x48e66b-0x0;var _0x43b55d=_0x048f[_0x48e66b];return _0x43b55d;};'use strict';var SmsMessageEvents=require('./smsMessage.events');var events=[_0xf048('0x0'),_0xf048('0x1'),_0xf048('0x2')];function createListener(_0x1af8d8,_0x3c903c){return function(_0x36c3c1){_0x3c903c[_0xf048('0x3')](_0x1af8d8,_0x36c3c1);};}function removeListener(_0x1bc3dc,_0xb6dd84){return function(){SmsMessageEvents[_0xf048('0x4')](_0x1bc3dc,_0xb6dd84);};}exports[_0xf048('0x5')]=function(_0x4b97aa){for(var _0x541aae=0x0,_0x309bad=events['length'];_0x541aae<_0x309bad;_0x541aae++){var _0x47fbcc=events[_0x541aae];var _0x52088d=createListener('smsMessage:'+_0x47fbcc,_0x4b97aa);SmsMessageEvents['on'](_0x47fbcc,_0x52088d);}}; \ No newline at end of file diff --git a/server/api/smsQueue/index.js b/server/api/smsQueue/index.js index 9e7abdc..0fdeaa4 100644 --- a/server/api/smsQueue/index.js +++ b/server/api/smsQueue/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xaa21=['get','index','/describe','isAuthenticated','/:id','show','/:id/members','getMembers','/:id/teams','getTeams','getAgents','post','create','addTeams','/:id/users','addAgents','update','removeTeams','removeAgents','exports','multer','path','connect-timeout','express','Router','fs-extra','../../components/auth/service','../../components/interaction/service','./smsQueue.controller'];(function(_0x4c12ec,_0x2e9103){var _0x3ae42c=function(_0x5a728f){while(--_0x5a728f){_0x4c12ec['push'](_0x4c12ec['shift']());}};_0x3ae42c(++_0x2e9103);}(_0xaa21,0xdf));var _0x1aa2=function(_0x5bbd40,_0x5b8e16){_0x5bbd40=_0x5bbd40-0x0;var _0x3e51a1=_0xaa21[_0x5bbd40];return _0x3e51a1;};'use strict';var multer=require(_0x1aa2('0x0'));var util=require('util');var path=require(_0x1aa2('0x1'));var timeout=require(_0x1aa2('0x2'));var express=require(_0x1aa2('0x3'));var router=express[_0x1aa2('0x4')]();var fs_extra=require(_0x1aa2('0x5'));var auth=require(_0x1aa2('0x6'));var interaction=require(_0x1aa2('0x7'));var config=require('../../config/environment');var controller=require(_0x1aa2('0x8'));router[_0x1aa2('0x9')]('/',auth['isAuthenticated'](),controller[_0x1aa2('0xa')]);router[_0x1aa2('0x9')](_0x1aa2('0xb'),auth[_0x1aa2('0xc')](),controller['describe']);router[_0x1aa2('0x9')](_0x1aa2('0xd'),auth[_0x1aa2('0xc')](),controller[_0x1aa2('0xe')]);router[_0x1aa2('0x9')](_0x1aa2('0xf'),auth['isAuthenticated'](),controller[_0x1aa2('0x10')]);router[_0x1aa2('0x9')](_0x1aa2('0x11'),auth[_0x1aa2('0xc')](),controller[_0x1aa2('0x12')]);router[_0x1aa2('0x9')]('/:id/users',auth[_0x1aa2('0xc')](),controller[_0x1aa2('0x13')]);router[_0x1aa2('0x14')]('/',auth[_0x1aa2('0xc')](),controller[_0x1aa2('0x15')]);router['post'](_0x1aa2('0x11'),auth[_0x1aa2('0xc')](),controller[_0x1aa2('0x16')]);router['post'](_0x1aa2('0x17'),auth[_0x1aa2('0xc')](),controller[_0x1aa2('0x18')]);router['put'](_0x1aa2('0xd'),auth[_0x1aa2('0xc')](),controller[_0x1aa2('0x19')]);router['delete']('/:id',auth[_0x1aa2('0xc')](),controller['destroy']);router['delete'](_0x1aa2('0x11'),auth[_0x1aa2('0xc')](),controller[_0x1aa2('0x1a')]);router['delete']('/:id/users',auth['isAuthenticated'](),controller[_0x1aa2('0x1b')]);module[_0x1aa2('0x1c')]=router; \ No newline at end of file +var _0xe505=['../../components/interaction/service','../../config/environment','isAuthenticated','index','get','/describe','describe','/:id','show','/:id/teams','getTeams','/:id/users','getAgents','post','create','addTeams','addAgents','put','delete','destroy','removeTeams','removeAgents','exports','multer','path','express','Router','fs-extra','../../components/auth/service'];(function(_0x1894e7,_0x1253e6){var _0x5e857f=function(_0x1b47c3){while(--_0x1b47c3){_0x1894e7['push'](_0x1894e7['shift']());}};_0x5e857f(++_0x1253e6);}(_0xe505,0xff));var _0x5e50=function(_0x29b2d0,_0x73bf4b){_0x29b2d0=_0x29b2d0-0x0;var _0x4af937=_0xe505[_0x29b2d0];return _0x4af937;};'use strict';var multer=require(_0x5e50('0x0'));var util=require('util');var path=require(_0x5e50('0x1'));var timeout=require('connect-timeout');var express=require(_0x5e50('0x2'));var router=express[_0x5e50('0x3')]();var fs_extra=require(_0x5e50('0x4'));var auth=require(_0x5e50('0x5'));var interaction=require(_0x5e50('0x6'));var config=require(_0x5e50('0x7'));var controller=require('./smsQueue.controller');router['get']('/',auth[_0x5e50('0x8')](),controller[_0x5e50('0x9')]);router[_0x5e50('0xa')](_0x5e50('0xb'),auth['isAuthenticated'](),controller[_0x5e50('0xc')]);router['get'](_0x5e50('0xd'),auth[_0x5e50('0x8')](),controller[_0x5e50('0xe')]);router[_0x5e50('0xa')]('/:id/members',auth[_0x5e50('0x8')](),controller['getMembers']);router['get'](_0x5e50('0xf'),auth['isAuthenticated'](),controller[_0x5e50('0x10')]);router[_0x5e50('0xa')](_0x5e50('0x11'),auth[_0x5e50('0x8')](),controller[_0x5e50('0x12')]);router[_0x5e50('0x13')]('/',auth[_0x5e50('0x8')](),controller[_0x5e50('0x14')]);router['post'](_0x5e50('0xf'),auth[_0x5e50('0x8')](),controller[_0x5e50('0x15')]);router[_0x5e50('0x13')]('/:id/users',auth[_0x5e50('0x8')](),controller[_0x5e50('0x16')]);router[_0x5e50('0x17')]('/:id',auth[_0x5e50('0x8')](),controller['update']);router[_0x5e50('0x18')](_0x5e50('0xd'),auth[_0x5e50('0x8')](),controller[_0x5e50('0x19')]);router[_0x5e50('0x18')](_0x5e50('0xf'),auth[_0x5e50('0x8')](),controller[_0x5e50('0x1a')]);router[_0x5e50('0x18')](_0x5e50('0x11'),auth['isAuthenticated'](),controller[_0x5e50('0x1b')]);module[_0x5e50('0x1c')]=router; \ No newline at end of file diff --git a/server/api/smsQueue/smsQueue.attributes.js b/server/api/smsQueue/smsQueue.attributes.js index 8764161..412479e 100644 --- a/server/api/smsQueue/smsQueue.attributes.js +++ b/server/api/smsQueue/smsQueue.attributes.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x58eb=['exports','STRING','ENUM','rrmemory','beepall','sequelize'];(function(_0x24ffef,_0x438cf7){var _0x143551=function(_0x5bd7aa){while(--_0x5bd7aa){_0x24ffef['push'](_0x24ffef['shift']());}};_0x143551(++_0x438cf7);}(_0x58eb,0x119));var _0xb58e=function(_0x243b2f,_0x30aa15){_0x243b2f=_0x243b2f-0x0;var _0xcb3c2d=_0x58eb[_0x243b2f];return _0xcb3c2d;};'use strict';var Sequelize=require(_0xb58e('0x0'));module[_0xb58e('0x1')]={'name':{'type':Sequelize[_0xb58e('0x2')],'unique':'name','validate':{'notEmpty':!![],'is':/^[A-Za-z0-9\.\_]+$/i}},'description':{'type':Sequelize['STRING']},'timeout':{'type':Sequelize['INTEGER'],'validate':{'min':0x1,'max':0x20c49b}},'strategy':{'type':Sequelize[_0xb58e('0x3')](_0xb58e('0x4'),_0xb58e('0x5'),'roundrobin')}}; \ No newline at end of file +var _0x6768=['ENUM','rrmemory','sequelize','exports','name','STRING','INTEGER'];(function(_0x10004e,_0xd701e6){var _0x5af990=function(_0x4bab6a){while(--_0x4bab6a){_0x10004e['push'](_0x10004e['shift']());}};_0x5af990(++_0xd701e6);}(_0x6768,0x1bb));var _0x8676=function(_0x1d4b04,_0x24d309){_0x1d4b04=_0x1d4b04-0x0;var _0x67d764=_0x6768[_0x1d4b04];return _0x67d764;};'use strict';var Sequelize=require(_0x8676('0x0'));module[_0x8676('0x1')]={'name':{'type':Sequelize['STRING'],'unique':_0x8676('0x2'),'validate':{'notEmpty':!![],'is':/^[A-Za-z0-9\.\_]+$/i}},'description':{'type':Sequelize[_0x8676('0x3')]},'timeout':{'type':Sequelize[_0x8676('0x4')],'validate':{'min':0x1,'max':0x20c49b}},'strategy':{'type':Sequelize[_0x8676('0x5')](_0x8676('0x6'),'beepall','roundrobin')}}; \ No newline at end of file diff --git a/server/api/smsQueue/smsQueue.controller.js b/server/api/smsQueue/smsQueue.controller.js index 6c44f74..70c530d 100644 --- a/server/api/smsQueue/smsQueue.controller.js +++ b/server/api/smsQueue/smsQueue.controller.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x2689=['limit','count','offset','set','Content-Range','apply','reject','update','destroy','then','get','UserProfileResource','end','error','send','index','map','SmsQueue','rawAttributes','fieldName','type','key','name','query','keys','filters','intersection','model','attributes','fields','length','hasOwnProperty','nolimit','order','sort','where','pick','merge','includeAll','findAll','rows','catch','params','options','find','create','user','Unable\x20to\x20retrieve\x20the\x20current\x20user','SmsQueues','userProfileId','autoAssociation','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','body','describe','getMembers','findOne','UserSmsQueue','SmsQueueId','filter','User','UserId','agent','smsPause','updatedAt','%s/%s','SIP','createdAt','getTeams','Team','addTeams','ids','voicePause','flatMap','sequelize','each','findOrCreate','emit','userSmsQueue:save','removeTeams','select','field','tq.TeamId','from','team_has_sms_queues','join','user_has_teams','Agents','ut.UserId\x20=\x20?','push','QueryTypes','SELECT','every','includes','all','union','compact','value','isEmpty','forEach','userSmsQueue:remove','addAgents','omit','spread','removeAgents','isArray','getAgents','eml-format','rimraf','zip-dir','request-promise','bluebird','mustache','util','path','sox','to-csv','ejs','fs-extra','crypto','jsforce','desk.js','querystring','papaparse','ioredis','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/environment','../../config/license/util','../../mysqldb','redis','localhost','./smsQueue.socket','sendStatus','status','json','undefined'];(function(_0x3775a3,_0x41ceb6){var _0x4f2e74=function(_0x1754c7){while(--_0x1754c7){_0x3775a3['push'](_0x3775a3['shift']());}};_0x4f2e74(++_0x41ceb6);}(_0x2689,0x6a));var _0x9268=function(_0x667102,_0x1d53e7){_0x667102=_0x667102-0x0;var _0x139ebc=_0x2689[_0x667102];return _0x139ebc;};'use strict';var emlformat=require(_0x9268('0x0'));var rimraf=require(_0x9268('0x1'));var zipdir=require(_0x9268('0x2'));var jsonpatch=require('fast-json-patch');var rp=require(_0x9268('0x3'));var moment=require('moment');var BPromise=require(_0x9268('0x4'));var Mustache=require(_0x9268('0x5'));var util=require(_0x9268('0x6'));var path=require(_0x9268('0x7'));var sox=require(_0x9268('0x8'));var csv=require(_0x9268('0x9'));var ejs=require(_0x9268('0xa'));var fs=require('fs');var fs_extra=require(_0x9268('0xb'));var _=require('lodash');var squel=require('squel');var crypto=require(_0x9268('0xc'));var jsforce=require(_0x9268('0xd'));var deskjs=require(_0x9268('0xe'));var toCsv=require(_0x9268('0x9'));var querystring=require(_0x9268('0xf'));var Papa=require(_0x9268('0x10'));var Redis=require(_0x9268('0x11'));var authService=require('../../components/auth/service');var qs=require(_0x9268('0x12'));var as=require(_0x9268('0x13'));var hardwareService=require(_0x9268('0x14'));var logger=require('../../config/logger')('api');var utils=require('../../config/utils');var config=require(_0x9268('0x15'));var licenseUtil=require(_0x9268('0x16'));var db=require(_0x9268('0x17'))['db'];config[_0x9268('0x18')]=_['defaults'](config[_0x9268('0x18')],{'host':_0x9268('0x19'),'port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config[_0x9268('0x18')]));require(_0x9268('0x1a'))['register'](socket);function respondWithStatusCode(_0x56a963,_0x104954){_0x104954=_0x104954||0xcc;return function(_0x1346ef){if(_0x1346ef){return _0x56a963[_0x9268('0x1b')](_0x104954);}return _0x56a963['status'](_0x104954)['end']();};}function respondWithResult(_0x174a3d,_0x111351){_0x111351=_0x111351||0xc8;return function(_0x4df836){if(_0x4df836){return _0x174a3d[_0x9268('0x1c')](_0x111351)[_0x9268('0x1d')](_0x4df836);}};}function respondWithFilteredResult(_0x38f2f5,_0x5739a1){return function(_0x119aad){if(_0x119aad){var _0x50ca21=typeof _0x5739a1['offset']===_0x9268('0x1e')&&typeof _0x5739a1[_0x9268('0x1f')]===_0x9268('0x1e');var _0x472c57=_0x119aad[_0x9268('0x20')];var _0xd450fb=_0x50ca21?0x0:_0x5739a1[_0x9268('0x21')];var _0x453602=_0x50ca21?_0x119aad[_0x9268('0x20')]:_0x5739a1[_0x9268('0x21')]+_0x5739a1[_0x9268('0x1f')];var _0x78a310;if(_0x453602>=_0x472c57){_0x453602=_0x472c57;_0x78a310=0xc8;}else{_0x78a310=0xce;}_0x38f2f5['status'](_0x78a310);return _0x38f2f5[_0x9268('0x22')](_0x9268('0x23'),_0xd450fb+'-'+_0x453602+'/'+_0x472c57)[_0x9268('0x1d')](_0x119aad);}return null;};}function patchUpdates(_0x269ba3){return function(_0x59c06a){try{jsonpatch[_0x9268('0x24')](_0x59c06a,_0x269ba3,!![]);}catch(_0xe8e2b8){return BPromise[_0x9268('0x25')](_0xe8e2b8);}return _0x59c06a['save']();};}function saveUpdates(_0x12838f,_0x21a05b){return function(_0x478bd0){if(_0x478bd0){return _0x478bd0[_0x9268('0x26')](_0x12838f)['then'](function(_0x45f256){return _0x45f256;});}return null;};}function removeEntity(_0x2f415b,_0x4ed559){return function(_0x2bc9bc){if(_0x2bc9bc){return _0x2bc9bc[_0x9268('0x27')]()[_0x9268('0x28')](function(){var _0x491009=_0x2bc9bc[_0x9268('0x29')]({'plain':!![]});var _0x340de5='SmsQueues';return db[_0x9268('0x2a')][_0x9268('0x27')]({'where':{'type':_0x340de5,'resourceId':_0x491009['id']}})[_0x9268('0x28')](function(){return _0x2bc9bc;});})[_0x9268('0x28')](function(){_0x2f415b['status'](0xcc)[_0x9268('0x2b')]();});}};}function handleEntityNotFound(_0x570bcb,_0x417226){return function(_0x4ba43b){if(!_0x4ba43b){_0x570bcb[_0x9268('0x1b')](0x194);}return _0x4ba43b;};}function handleError(_0x701ce6,_0x1fb30d){_0x1fb30d=_0x1fb30d||0x1f4;return function(_0x168f7a){logger[_0x9268('0x2c')](_0x168f7a['stack']);if(_0x168f7a['name']){delete _0x168f7a['name'];}_0x701ce6[_0x9268('0x1c')](_0x1fb30d)[_0x9268('0x2d')](_0x168f7a);};}exports[_0x9268('0x2e')]=function(_0x35ffbf,_0x4ffc9e){var _0x201b2e={},_0x1af78c={},_0x1f854f={'count':0x0,'rows':[]};var _0x223cd8=_[_0x9268('0x2f')](db[_0x9268('0x30')][_0x9268('0x31')],function(_0x3c8dbd){return{'name':_0x3c8dbd[_0x9268('0x32')],'type':_0x3c8dbd[_0x9268('0x33')][_0x9268('0x34')]};});_0x1af78c['model']=_[_0x9268('0x2f')](_0x223cd8,_0x9268('0x35'));_0x1af78c[_0x9268('0x36')]=_[_0x9268('0x37')](_0x35ffbf['query']);_0x1af78c[_0x9268('0x38')]=_[_0x9268('0x39')](_0x1af78c[_0x9268('0x3a')],_0x1af78c[_0x9268('0x36')]);_0x201b2e[_0x9268('0x3b')]=_[_0x9268('0x39')](_0x1af78c[_0x9268('0x3a')],qs[_0x9268('0x3c')](_0x35ffbf[_0x9268('0x36')][_0x9268('0x3c')]));_0x201b2e['attributes']=_0x201b2e[_0x9268('0x3b')][_0x9268('0x3d')]?_0x201b2e[_0x9268('0x3b')]:_0x1af78c[_0x9268('0x3a')];if(!_0x35ffbf[_0x9268('0x36')][_0x9268('0x3e')](_0x9268('0x3f'))){_0x201b2e['limit']=qs['limit'](_0x35ffbf[_0x9268('0x36')][_0x9268('0x1f')]);_0x201b2e[_0x9268('0x21')]=qs[_0x9268('0x21')](_0x35ffbf[_0x9268('0x36')][_0x9268('0x21')]);}_0x201b2e[_0x9268('0x40')]=qs[_0x9268('0x41')](_0x35ffbf['query'][_0x9268('0x41')]);_0x201b2e[_0x9268('0x42')]=qs[_0x9268('0x38')](_[_0x9268('0x43')](_0x35ffbf[_0x9268('0x36')],_0x1af78c[_0x9268('0x38')]),_0x223cd8);if(_0x35ffbf[_0x9268('0x36')]['filter']){_0x201b2e['where']=_[_0x9268('0x44')](_0x201b2e['where'],{'$or':_[_0x9268('0x2f')](_0x223cd8,function(_0x3e699c){if(_0x3e699c[_0x9268('0x33')]!=='VIRTUAL'){var _0x5b2290={};_0x5b2290[_0x3e699c[_0x9268('0x35')]]={'$like':'%'+_0x35ffbf['query']['filter']+'%'};return _0x5b2290;}})});}_0x201b2e=_[_0x9268('0x44')]({},_0x201b2e,_0x35ffbf['options']);var _0x37f2a8={'where':_0x201b2e[_0x9268('0x42')]};return db[_0x9268('0x30')][_0x9268('0x20')](_0x37f2a8)[_0x9268('0x28')](function(_0x1dab63){_0x1f854f[_0x9268('0x20')]=_0x1dab63;if(_0x35ffbf[_0x9268('0x36')][_0x9268('0x45')]){_0x201b2e['include']=[{'all':!![]}];}return db[_0x9268('0x30')][_0x9268('0x46')](_0x201b2e);})[_0x9268('0x28')](function(_0x1a4677){_0x1f854f[_0x9268('0x47')]=_0x1a4677;return _0x1f854f;})[_0x9268('0x28')](respondWithFilteredResult(_0x4ffc9e,_0x201b2e))[_0x9268('0x48')](handleError(_0x4ffc9e,null));};exports['show']=function(_0x3405db,_0x1d1340){var _0x196515={'raw':!![],'where':{'id':_0x3405db[_0x9268('0x49')]['id']}},_0x584238={};_0x584238[_0x9268('0x3a')]=_[_0x9268('0x37')](db[_0x9268('0x30')][_0x9268('0x31')]);_0x584238['query']=_[_0x9268('0x37')](_0x3405db[_0x9268('0x36')]);_0x584238[_0x9268('0x38')]=_[_0x9268('0x39')](_0x584238[_0x9268('0x3a')],_0x584238[_0x9268('0x36')]);_0x196515[_0x9268('0x3b')]=_[_0x9268('0x39')](_0x584238['model'],qs[_0x9268('0x3c')](_0x3405db[_0x9268('0x36')][_0x9268('0x3c')]));_0x196515[_0x9268('0x3b')]=_0x196515[_0x9268('0x3b')][_0x9268('0x3d')]?_0x196515['attributes']:_0x584238['model'];if(_0x3405db['query'][_0x9268('0x45')]){_0x196515['include']=[{'all':!![]}];}_0x196515=_[_0x9268('0x44')]({},_0x196515,_0x3405db[_0x9268('0x4a')]);return db[_0x9268('0x30')][_0x9268('0x4b')](_0x196515)[_0x9268('0x28')](handleEntityNotFound(_0x1d1340,null))[_0x9268('0x28')](respondWithResult(_0x1d1340,null))[_0x9268('0x48')](handleError(_0x1d1340,null));};exports[_0x9268('0x4c')]=function(_0x213a4f,_0x29696a){return db[_0x9268('0x30')]['create'](_0x213a4f['body'],{})[_0x9268('0x28')](function(_0x485388){var _0x298ea6=_0x213a4f[_0x9268('0x4d')][_0x9268('0x29')]({'plain':!![]});if(!_0x298ea6)throw new Error(_0x9268('0x4e'));if(_0x298ea6['role']==='user'){var _0x100541=_0x485388['get']({'plain':!![]});var _0x52b0a1=_0x9268('0x4f');return db['UserProfileSection'][_0x9268('0x4b')]({'where':{'name':_0x52b0a1,'userProfileId':_0x298ea6[_0x9268('0x50')]},'raw':!![]})[_0x9268('0x28')](function(_0x5cef0b){if(_0x5cef0b&&_0x5cef0b[_0x9268('0x51')]===0x0){return db[_0x9268('0x2a')]['create']({'name':_0x100541[_0x9268('0x35')],'resourceId':_0x100541['id'],'type':_0x5cef0b['name'],'sectionId':_0x5cef0b['id']},{})[_0x9268('0x28')](function(){return _0x485388;});}else{return _0x485388;}})[_0x9268('0x48')](function(_0x55c5dd){logger[_0x9268('0x2c')](_0x9268('0x52'),_0x55c5dd);throw _0x55c5dd;});}return _0x485388;})[_0x9268('0x28')](respondWithResult(_0x29696a,0xc9))[_0x9268('0x48')](handleError(_0x29696a,null));};exports[_0x9268('0x26')]=function(_0x4299b1,_0x25fe60){if(_0x4299b1[_0x9268('0x53')]['id']){delete _0x4299b1[_0x9268('0x53')]['id'];}return db['SmsQueue'][_0x9268('0x4b')]({'where':{'id':_0x4299b1[_0x9268('0x49')]['id']}})[_0x9268('0x28')](handleEntityNotFound(_0x25fe60,null))[_0x9268('0x28')](saveUpdates(_0x4299b1[_0x9268('0x53')],null))[_0x9268('0x28')](respondWithResult(_0x25fe60,null))['catch'](handleError(_0x25fe60,null));};exports['destroy']=function(_0x534634,_0x35e30a){return db[_0x9268('0x30')][_0x9268('0x4b')]({'where':{'id':_0x534634['params']['id']}})[_0x9268('0x28')](handleEntityNotFound(_0x35e30a,null))[_0x9268('0x28')](removeEntity(_0x35e30a,null))[_0x9268('0x48')](handleError(_0x35e30a,null));};exports[_0x9268('0x54')]=function(_0x35d145,_0x251349){return db[_0x9268('0x30')][_0x9268('0x54')]()[_0x9268('0x28')](respondWithResult(_0x251349,null))[_0x9268('0x48')](handleError(_0x251349,null));};exports[_0x9268('0x55')]=function(_0x30d191,_0x260ed0,_0x43dc76){var _0x4b6678={'raw':!![],'where':{}},_0x603813={},_0x4d33c4;return db[_0x9268('0x30')][_0x9268('0x56')]({'where':{'id':_0x30d191[_0x9268('0x49')]['id']}})[_0x9268('0x28')](handleEntityNotFound(_0x260ed0,null))[_0x9268('0x28')](function(_0x512110){if(_0x512110){_0x4d33c4=_0x512110[_0x9268('0x29')]({'plain':!![]});_0x603813['model']=_[_0x9268('0x37')](db[_0x9268('0x57')][_0x9268('0x31')]);_0x603813[_0x9268('0x36')]=_['keys'](_0x30d191[_0x9268('0x36')]);_0x603813[_0x9268('0x38')]=_[_0x9268('0x39')](_0x603813[_0x9268('0x3a')],_0x603813[_0x9268('0x36')]);_0x4b6678[_0x9268('0x3b')]=_[_0x9268('0x39')](_0x603813[_0x9268('0x3a')],qs[_0x9268('0x3c')](_0x30d191[_0x9268('0x36')]['fields']));_0x4b6678['attributes']=_0x4b6678[_0x9268('0x3b')][_0x9268('0x3d')]?_0x4b6678[_0x9268('0x3b')]:_0x603813[_0x9268('0x3a')];if(!_0x30d191[_0x9268('0x36')]['hasOwnProperty'](_0x9268('0x3f'))){_0x4b6678[_0x9268('0x1f')]=qs[_0x9268('0x1f')](_0x30d191[_0x9268('0x36')][_0x9268('0x1f')]);_0x4b6678[_0x9268('0x21')]=qs[_0x9268('0x21')](_0x30d191['query'][_0x9268('0x21')]);}_0x4b6678['order']=qs['sort'](_0x30d191[_0x9268('0x36')]['sort']);_0x4b6678[_0x9268('0x42')]=qs['filters'](_['pick'](_0x30d191[_0x9268('0x36')],_0x603813['filters']));_0x4b6678['where'][_0x9268('0x58')]=_0x512110['id'];if(_0x30d191[_0x9268('0x36')][_0x9268('0x59')]){_0x4b6678['where']=_['merge'](_0x4b6678[_0x9268('0x42')],{'$or':_[_0x9268('0x2f')](_0x4b6678[_0x9268('0x3b')],function(_0x230440){var _0x3d5c42={};_0x3d5c42[_0x230440]={'$like':'%'+_0x30d191[_0x9268('0x36')][_0x9268('0x59')]+'%'};return _0x3d5c42;})});}_0x4b6678=_[_0x9268('0x44')]({},_0x4b6678,_0x30d191[_0x9268('0x4a')]);return db['UserSmsQueue'][_0x9268('0x46')](_0x4b6678);}})['then'](function(_0x1aa65b){if(_0x1aa65b){return db[_0x9268('0x5a')]['findAndCountAll']({'where':{'id':_[_0x9268('0x2f')](_0x1aa65b,_0x9268('0x5b')),'role':_0x9268('0x5c')},'attributes':['id',_0x9268('0x35'),_0x9268('0x5d'),_0x9268('0x5e'),'createdAt']});}})[_0x9268('0x28')](function(_0x4dac55){if(_0x4dac55){return{'count':_0x4dac55[_0x9268('0x20')],'rows':_['map'](_0x4dac55[_0x9268('0x47')],function(_0xe99f96){return{'membername':_0xe99f96[_0x9268('0x35')],'UserId':_0xe99f96['id'],'queue_name':_0x4d33c4[_0x9268('0x35')],'SmsQueueId':_0x4d33c4['id'],'interface':util['format'](_0x9268('0x5f'),_0x9268('0x60'),_0xe99f96[_0x9268('0x35')]),'penalty':0x0,'paused':_0xe99f96[_0x9268('0x5d')],'createdAt':_0xe99f96[_0x9268('0x61')],'updatedAt':_0xe99f96[_0x9268('0x5e')]};})};}else{return{'count':0x0,'rows':[]};}})[_0x9268('0x28')](respondWithFilteredResult(_0x260ed0,_0x4b6678))[_0x9268('0x48')](handleError(_0x260ed0,null));};exports[_0x9268('0x62')]=function(_0x291a2b,_0x433d93,_0x3313cf){var _0x58fea2={};var _0x43557e={};var _0x4ea9c1;var _0xb7c53;return db['SmsQueue'][_0x9268('0x56')]({'where':{'id':_0x291a2b[_0x9268('0x49')]['id']}})[_0x9268('0x28')](handleEntityNotFound(_0x433d93,null))[_0x9268('0x28')](function(_0x224b97){if(_0x224b97){_0x4ea9c1=_0x224b97;_0x43557e[_0x9268('0x3a')]=_[_0x9268('0x37')](db[_0x9268('0x63')][_0x9268('0x31')]);_0x43557e[_0x9268('0x36')]=_[_0x9268('0x37')](_0x291a2b[_0x9268('0x36')]);_0x43557e['filters']=_[_0x9268('0x39')](_0x43557e[_0x9268('0x3a')],_0x43557e[_0x9268('0x36')]);_0x58fea2[_0x9268('0x3b')]=_[_0x9268('0x39')](_0x43557e[_0x9268('0x3a')],qs[_0x9268('0x3c')](_0x291a2b[_0x9268('0x36')][_0x9268('0x3c')]));_0x58fea2[_0x9268('0x3b')]=_0x58fea2[_0x9268('0x3b')]['length']?_0x58fea2[_0x9268('0x3b')]:_0x43557e[_0x9268('0x3a')];_0x58fea2[_0x9268('0x40')]=qs[_0x9268('0x41')](_0x291a2b['query'][_0x9268('0x41')]);_0x58fea2['where']=qs[_0x9268('0x38')](_[_0x9268('0x43')](_0x291a2b[_0x9268('0x36')],_0x43557e['filters']));if(_0x291a2b[_0x9268('0x36')]['filter']){_0x58fea2[_0x9268('0x42')]=_[_0x9268('0x44')](_0x58fea2[_0x9268('0x42')],{'$or':_[_0x9268('0x2f')](_0x58fea2[_0x9268('0x3b')],function(_0x15a0d7){var _0x23f2a1={};_0x23f2a1[_0x15a0d7]={'$like':'%'+_0x291a2b[_0x9268('0x36')][_0x9268('0x59')]+'%'};return _0x23f2a1;})});}_0x58fea2=_['merge']({},_0x58fea2,_0x291a2b['options']);return _0x4ea9c1[_0x9268('0x62')](_0x58fea2);}})['then'](function(_0x51dec0){if(_0x51dec0){_0xb7c53=_0x51dec0[_0x9268('0x3d')];if(!_0x291a2b[_0x9268('0x36')][_0x9268('0x3e')](_0x9268('0x3f'))){_0x58fea2[_0x9268('0x1f')]=qs[_0x9268('0x1f')](_0x291a2b[_0x9268('0x36')][_0x9268('0x1f')]);_0x58fea2[_0x9268('0x21')]=qs['offset'](_0x291a2b[_0x9268('0x36')][_0x9268('0x21')]);}return _0x4ea9c1['getTeams'](_0x58fea2);}})['then'](function(_0x2809eb){if(_0x2809eb){return _0x2809eb?{'count':_0xb7c53,'rows':_0x2809eb}:null;}})[_0x9268('0x28')](respondWithResult(_0x433d93,null))[_0x9268('0x48')](handleError(_0x433d93,null));};exports[_0x9268('0x64')]=function(_0x240b2d,_0xf56a08,_0x1b800d){var _0x492e9b=_0x240b2d[_0x9268('0x53')][_0x9268('0x65')];return db[_0x9268('0x63')][_0x9268('0x46')]({'where':{'id':_0x492e9b},'attributes':['id'],'include':[{'model':db[_0x9268('0x5a')],'as':'Agents','attributes':['id',_0x9268('0x35'),'online',_0x9268('0x66'),'interface'],'raw':!![]}]})[_0x9268('0x28')](function(_0x19c2f8){if(_0x19c2f8){var _0x200a84=_[_0x9268('0x67')](_0x19c2f8,function(_0x22edbf){var _0x9e868e=_0x22edbf['get']({'plain':!![]});return _0x9e868e['Agents'];});return db[_0x9268('0x30')][_0x9268('0x4b')]({'where':{'id':_0x240b2d[_0x9268('0x49')]['id']}})[_0x9268('0x28')](function(_0x25849a){return db[_0x9268('0x68')]['transaction'](function(_0x43743a){return _0x25849a[_0x9268('0x64')](_0x492e9b,{'transaction':_0x43743a})[_0x9268('0x28')](function(){return BPromise[_0x9268('0x69')](_0x200a84,function(_0x178d19){return db[_0x9268('0x57')][_0x9268('0x6a')]({'where':{'UserId':_0x178d19['id'],'SmsQueueId':_0x240b2d['params']['id']},'transaction':_0x43743a});});})[_0x9268('0x28')](function(){_0x200a84['forEach'](function(_0x49b1a5){socket[_0x9268('0x6b')](_0x9268('0x6c'),{'UserId':_0x49b1a5['id'],'SmsQueueId':_0x25849a['id']});});});});});}})[_0x9268('0x28')](respondWithStatusCode(_0xf56a08,null))[_0x9268('0x48')](handleError(_0xf56a08,null));};exports[_0x9268('0x6d')]=function(_0x3d2108,_0x49a2f8,_0x331262){return db[_0x9268('0x63')][_0x9268('0x46')]({'where':{'id':_0x3d2108[_0x9268('0x36')]['ids']},'attributes':['id'],'include':[{'model':db[_0x9268('0x5a')],'as':'Agents','attributes':['id'],'raw':!![]}]})[_0x9268('0x28')](handleEntityNotFound(_0x49a2f8,null))[_0x9268('0x28')](function(_0x5661d4){var _0x4622f4=_[_0x9268('0x2f')](_0x5661d4,'id');var _0x467136=[];var _0x37f3e0=[];var _0x53bd19=squel[_0x9268('0x6e')]();_0x53bd19[_0x9268('0x6f')](_0x9268('0x70'))[_0x9268('0x71')](_0x9268('0x72'),'tq')[_0x9268('0x73')](_0x9268('0x74'),'ut','ut.TeamId\x20=\x20tq.TeamId')[_0x9268('0x42')]('SmsQueueId\x20=\x20?',_0x3d2108[_0x9268('0x49')]['id']);for(var _0x382e48=0x0;_0x382e48<_0x5661d4[_0x9268('0x3d')];_0x382e48+=0x1){let _0xd20926=_0x5661d4[_0x382e48];for(var _0x1bca29=0x0;_0x1bca29<_0xd20926[_0x9268('0x75')][_0x9268('0x3d')];_0x1bca29+=0x1){let _0x3ae398=_0xd20926[_0x9268('0x75')][_0x1bca29];var _0x1873bb=_0x53bd19['clone']();_0x1873bb['where'](_0x9268('0x76'),_0x3ae398['id']);_0x37f3e0[_0x9268('0x77')](db[_0x9268('0x68')][_0x9268('0x36')](_0x1873bb['toString'](),{'type':db[_0x9268('0x68')][_0x9268('0x78')][_0x9268('0x79')]})[_0x9268('0x28')](function(_0x2496f9){if(_0x2496f9[_0x9268('0x3d')]===0x1){return _0x3ae398['id'];}else{var _0x3dd5ea=_[_0x9268('0x7a')](_[_0x9268('0x2f')](_0x2496f9,'TeamId'),function(_0x6f7f9e){return _[_0x9268('0x7b')](_0x4622f4,_0x6f7f9e);});if(_0x3dd5ea){return _0x3ae398['id'];}}}));}}return BPromise[_0x9268('0x7c')](_0x37f3e0)['then'](function(_0xa9eacd){_0x467136=_(_0x467136)[_0x9268('0x7d')](_0xa9eacd)[_0x9268('0x7e')]()[_0x9268('0x7f')]();return db[_0x9268('0x30')][_0x9268('0x4b')]({'where':{'id':_0x3d2108[_0x9268('0x49')]['id']}})[_0x9268('0x28')](function(_0x3cc0dc){return db[_0x9268('0x68')]['transaction'](function(_0x30ebd0){return _0x3cc0dc[_0x9268('0x6d')](_0x3d2108[_0x9268('0x36')]['ids'],{'transaction':_0x30ebd0})[_0x9268('0x28')](function(){if(!_[_0x9268('0x80')](_0x467136)){return _0x3cc0dc['removeAgents'](_0x467136,{'transaction':_0x30ebd0});}})[_0x9268('0x28')](function(){_0x467136[_0x9268('0x81')](function(_0x4a854f){socket[_0x9268('0x6b')](_0x9268('0x82'),{'UserId':_0x4a854f,'SmsQueueId':_0x3cc0dc['id']});});});});});});})[_0x9268('0x28')](respondWithStatusCode(_0x49a2f8,null))[_0x9268('0x48')](handleError(_0x49a2f8,null));};exports[_0x9268('0x83')]=function(_0x49ac13,_0x2f5896,_0x3b595c){return db[_0x9268('0x30')][_0x9268('0x4b')]({'where':{'id':_0x49ac13[_0x9268('0x49')]['id']}})[_0x9268('0x28')](handleEntityNotFound(_0x2f5896,null))[_0x9268('0x28')](function(_0x1a27e2){if(_0x1a27e2){return _0x1a27e2[_0x9268('0x83')](_0x49ac13[_0x9268('0x53')][_0x9268('0x65')],_[_0x9268('0x84')](_0x49ac13['body'],[_0x9268('0x65'),'id'])||{})[_0x9268('0x85')](function(_0x2e5f77){for(var _0xde8f4a=0x0;_0xde8f4a<_0x49ac13[_0x9268('0x53')][_0x9268('0x65')][_0x9268('0x3d')];_0xde8f4a+=0x1){socket[_0x9268('0x6b')](_0x9268('0x6c'),{'UserId':Number(_0x49ac13[_0x9268('0x53')]['ids'][_0xde8f4a]),'SmsQueueId':Number(_0x49ac13[_0x9268('0x49')]['id'])});}return _0x2e5f77;});}})['then'](respondWithResult(_0x2f5896,null))[_0x9268('0x48')](handleError(_0x2f5896,null));};exports['removeAgents']=function(_0x4eb8ea,_0x3c1830,_0x211e2b){return db['SmsQueue'][_0x9268('0x4b')]({'where':{'id':_0x4eb8ea['params']['id']}})[_0x9268('0x28')](handleEntityNotFound(_0x3c1830,null))[_0x9268('0x28')](function(_0x4aaae6){if(_0x4aaae6){return _0x4aaae6[_0x9268('0x86')](_0x4eb8ea[_0x9268('0x36')][_0x9268('0x65')])[_0x9268('0x28')](function(){if(_[_0x9268('0x87')](_0x4eb8ea[_0x9268('0x36')][_0x9268('0x65')])){for(var _0x474ee8=0x0;_0x474ee8<_0x4eb8ea[_0x9268('0x36')][_0x9268('0x65')][_0x9268('0x3d')];_0x474ee8+=0x1){socket['emit'](_0x9268('0x82'),{'UserId':Number(_0x4eb8ea[_0x9268('0x36')][_0x9268('0x65')][_0x474ee8]),'SmsQueueId':Number(_0x4eb8ea[_0x9268('0x49')]['id'])});}}else{socket[_0x9268('0x6b')](_0x9268('0x82'),{'UserId':Number(_0x4eb8ea['query'][_0x9268('0x65')]),'SmsQueueId':Number(_0x4eb8ea[_0x9268('0x49')]['id'])});}});}})[_0x9268('0x28')](respondWithStatusCode(_0x3c1830,null))[_0x9268('0x48')](handleError(_0x3c1830,null));};exports[_0x9268('0x88')]=function(_0x4042e4,_0x3fdc3d,_0x4535a3){var _0x167579={};var _0xb5a8e5={};var _0x7da32;var _0x5d1a47;return db[_0x9268('0x30')]['findOne']({'where':{'id':_0x4042e4['params']['id']}})['then'](handleEntityNotFound(_0x3fdc3d,null))[_0x9268('0x28')](function(_0x53b645){if(_0x53b645){_0x7da32=_0x53b645;_0xb5a8e5[_0x9268('0x3a')]=_['keys'](db[_0x9268('0x5a')][_0x9268('0x31')]);_0xb5a8e5[_0x9268('0x36')]=_[_0x9268('0x37')](_0x4042e4[_0x9268('0x36')]);_0xb5a8e5[_0x9268('0x38')]=_[_0x9268('0x39')](_0xb5a8e5[_0x9268('0x3a')],_0xb5a8e5[_0x9268('0x36')]);_0x167579[_0x9268('0x3b')]=_[_0x9268('0x39')](_0xb5a8e5['model'],qs[_0x9268('0x3c')](_0x4042e4[_0x9268('0x36')][_0x9268('0x3c')]));_0x167579['attributes']=_0x167579[_0x9268('0x3b')]['length']?_0x167579[_0x9268('0x3b')]:_0xb5a8e5[_0x9268('0x3a')];_0x167579['order']=qs['sort'](_0x4042e4[_0x9268('0x36')][_0x9268('0x41')]);_0x167579[_0x9268('0x42')]=qs['filters'](_[_0x9268('0x43')](_0x4042e4[_0x9268('0x36')],_0xb5a8e5[_0x9268('0x38')]));if(_0x4042e4[_0x9268('0x36')][_0x9268('0x59')]){_0x167579[_0x9268('0x42')]=_['merge'](_0x167579[_0x9268('0x42')],{'$or':_[_0x9268('0x2f')](_0x167579[_0x9268('0x3b')],function(_0x2f0c9a){var _0x547970={};_0x547970[_0x2f0c9a]={'$like':'%'+_0x4042e4[_0x9268('0x36')][_0x9268('0x59')]+'%'};return _0x547970;})});}_0x167579=_['merge']({},_0x167579,_0x4042e4[_0x9268('0x4a')]);return _0x7da32[_0x9268('0x88')](_0x167579);}})[_0x9268('0x28')](function(_0x1131f1){if(_0x1131f1){_0x5d1a47=_0x1131f1[_0x9268('0x3d')];if(!_0x4042e4['query'][_0x9268('0x3e')](_0x9268('0x3f'))){_0x167579['limit']=qs[_0x9268('0x1f')](_0x4042e4[_0x9268('0x36')][_0x9268('0x1f')]);_0x167579[_0x9268('0x21')]=qs['offset'](_0x4042e4[_0x9268('0x36')][_0x9268('0x21')]);}return _0x7da32[_0x9268('0x88')](_0x167579);}})[_0x9268('0x28')](function(_0x19aad9){if(_0x19aad9){return _0x19aad9?{'count':_0x5d1a47,'rows':_0x19aad9}:null;}})[_0x9268('0x28')](respondWithResult(_0x3fdc3d,null))[_0x9268('0x48')](handleError(_0x3fdc3d,null));}; \ No newline at end of file +var _0x30ad=['Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','update','describe','getMembers','UserSmsQueue','SmsQueueId','findAll','User','UserId','updatedAt','createdAt','rows','%s/%s','SIP','smsPause','getTeams','findOne','Team','ids','Agents','online','voicePause','interface','flatMap','sequelize','addTeams','forEach','emit','userSmsQueue:save','select','field','tq.TeamId','from','team_has_sms_queues','user_has_teams','ut.TeamId\x20=\x20tq.TeamId','ut.UserId\x20=\x20?','push','QueryTypes','every','TeamId','union','value','transaction','removeTeams','isEmpty','removeAgents','userSmsQueue:remove','addAgents','spread','getAgents','zip-dir','fast-json-patch','request-promise','bluebird','mustache','path','sox','to-csv','ejs','fs-extra','squel','crypto','jsforce','desk.js','ioredis','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/license/util','redis','defaults','socket.io-emitter','./smsQueue.socket','register','sendStatus','end','status','offset','undefined','limit','count','set','Content-Range','apply','reject','save','destroy','then','get','SmsQueues','UserProfileResource','error','name','send','map','rawAttributes','fieldName','type','key','model','query','filters','attributes','intersection','length','hasOwnProperty','nolimit','order','sort','where','pick','filter','merge','VIRTUAL','options','SmsQueue','includeAll','include','catch','params','keys','fields','find','create','body','role','user','UserProfileSection','autoAssociation'];(function(_0x31e29a,_0x349c9b){var _0x32d892=function(_0x41cc86){while(--_0x41cc86){_0x31e29a['push'](_0x31e29a['shift']());}};_0x32d892(++_0x349c9b);}(_0x30ad,0xb7));var _0xd30a=function(_0x3db495,_0x391f6b){_0x3db495=_0x3db495-0x0;var _0x5a1017=_0x30ad[_0x3db495];return _0x5a1017;};'use strict';var emlformat=require('eml-format');var rimraf=require('rimraf');var zipdir=require(_0xd30a('0x0'));var jsonpatch=require(_0xd30a('0x1'));var rp=require(_0xd30a('0x2'));var moment=require('moment');var BPromise=require(_0xd30a('0x3'));var Mustache=require(_0xd30a('0x4'));var util=require('util');var path=require(_0xd30a('0x5'));var sox=require(_0xd30a('0x6'));var csv=require(_0xd30a('0x7'));var ejs=require(_0xd30a('0x8'));var fs=require('fs');var fs_extra=require(_0xd30a('0x9'));var _=require('lodash');var squel=require(_0xd30a('0xa'));var crypto=require(_0xd30a('0xb'));var jsforce=require(_0xd30a('0xc'));var deskjs=require(_0xd30a('0xd'));var toCsv=require('to-csv');var querystring=require('querystring');var Papa=require('papaparse');var Redis=require(_0xd30a('0xe'));var authService=require('../../components/auth/service');var qs=require('../../components/parsers/qs');var as=require(_0xd30a('0xf'));var hardwareService=require(_0xd30a('0x10'));var logger=require(_0xd30a('0x11'))(_0xd30a('0x12'));var utils=require(_0xd30a('0x13'));var config=require('../../config/environment');var licenseUtil=require(_0xd30a('0x14'));var db=require('../../mysqldb')['db'];config[_0xd30a('0x15')]=_[_0xd30a('0x16')](config['redis'],{'host':'localhost','port':0x18eb});var socket=require(_0xd30a('0x17'))(new Redis(config['redis']));require(_0xd30a('0x18'))[_0xd30a('0x19')](socket);function respondWithStatusCode(_0x5b7020,_0x20c072){_0x20c072=_0x20c072||0xcc;return function(_0xc545aa){if(_0xc545aa){return _0x5b7020[_0xd30a('0x1a')](_0x20c072);}return _0x5b7020['status'](_0x20c072)[_0xd30a('0x1b')]();};}function respondWithResult(_0xdb4cda,_0x59e89d){_0x59e89d=_0x59e89d||0xc8;return function(_0xced212){if(_0xced212){return _0xdb4cda[_0xd30a('0x1c')](_0x59e89d)['json'](_0xced212);}};}function respondWithFilteredResult(_0x1f7231,_0x3bd89c){return function(_0x11cced){if(_0x11cced){var _0x3ff963=typeof _0x3bd89c[_0xd30a('0x1d')]===_0xd30a('0x1e')&&typeof _0x3bd89c[_0xd30a('0x1f')]===_0xd30a('0x1e');var _0x3933c9=_0x11cced[_0xd30a('0x20')];var _0x241e7c=_0x3ff963?0x0:_0x3bd89c[_0xd30a('0x1d')];var _0x2870c2=_0x3ff963?_0x11cced['count']:_0x3bd89c[_0xd30a('0x1d')]+_0x3bd89c[_0xd30a('0x1f')];var _0x3b5603;if(_0x2870c2>=_0x3933c9){_0x2870c2=_0x3933c9;_0x3b5603=0xc8;}else{_0x3b5603=0xce;}_0x1f7231[_0xd30a('0x1c')](_0x3b5603);return _0x1f7231[_0xd30a('0x21')](_0xd30a('0x22'),_0x241e7c+'-'+_0x2870c2+'/'+_0x3933c9)['json'](_0x11cced);}return null;};}function patchUpdates(_0x593cd1){return function(_0x87b97a){try{jsonpatch[_0xd30a('0x23')](_0x87b97a,_0x593cd1,!![]);}catch(_0x2eeadc){return BPromise[_0xd30a('0x24')](_0x2eeadc);}return _0x87b97a[_0xd30a('0x25')]();};}function saveUpdates(_0x300b86,_0x2fb43c){return function(_0x216109){if(_0x216109){return _0x216109['update'](_0x300b86)['then'](function(_0x3360cd){return _0x3360cd;});}return null;};}function removeEntity(_0xcb87be,_0xadd3a0){return function(_0x27c702){if(_0x27c702){return _0x27c702[_0xd30a('0x26')]()[_0xd30a('0x27')](function(){var _0x4cfcb7=_0x27c702[_0xd30a('0x28')]({'plain':!![]});var _0xf8512e=_0xd30a('0x29');return db[_0xd30a('0x2a')][_0xd30a('0x26')]({'where':{'type':_0xf8512e,'resourceId':_0x4cfcb7['id']}})['then'](function(){return _0x27c702;});})[_0xd30a('0x27')](function(){_0xcb87be[_0xd30a('0x1c')](0xcc)[_0xd30a('0x1b')]();});}};}function handleEntityNotFound(_0x1da005,_0x126ad7){return function(_0x4283c7){if(!_0x4283c7){_0x1da005[_0xd30a('0x1a')](0x194);}return _0x4283c7;};}function handleError(_0x4c7859,_0x4dfee7){_0x4dfee7=_0x4dfee7||0x1f4;return function(_0x3eb367){logger[_0xd30a('0x2b')](_0x3eb367['stack']);if(_0x3eb367[_0xd30a('0x2c')]){delete _0x3eb367['name'];}_0x4c7859['status'](_0x4dfee7)[_0xd30a('0x2d')](_0x3eb367);};}exports['index']=function(_0xe28979,_0xd8eff0){var _0x34d89f={},_0x5969b3={},_0x29891c={'count':0x0,'rows':[]};var _0x234a9b=_[_0xd30a('0x2e')](db['SmsQueue'][_0xd30a('0x2f')],function(_0x3e0c4c){return{'name':_0x3e0c4c[_0xd30a('0x30')],'type':_0x3e0c4c[_0xd30a('0x31')][_0xd30a('0x32')]};});_0x5969b3[_0xd30a('0x33')]=_[_0xd30a('0x2e')](_0x234a9b,'name');_0x5969b3[_0xd30a('0x34')]=_['keys'](_0xe28979['query']);_0x5969b3[_0xd30a('0x35')]=_['intersection'](_0x5969b3[_0xd30a('0x33')],_0x5969b3[_0xd30a('0x34')]);_0x34d89f[_0xd30a('0x36')]=_[_0xd30a('0x37')](_0x5969b3['model'],qs['fields'](_0xe28979['query']['fields']));_0x34d89f['attributes']=_0x34d89f['attributes'][_0xd30a('0x38')]?_0x34d89f[_0xd30a('0x36')]:_0x5969b3[_0xd30a('0x33')];if(!_0xe28979['query'][_0xd30a('0x39')](_0xd30a('0x3a'))){_0x34d89f[_0xd30a('0x1f')]=qs[_0xd30a('0x1f')](_0xe28979[_0xd30a('0x34')]['limit']);_0x34d89f[_0xd30a('0x1d')]=qs[_0xd30a('0x1d')](_0xe28979[_0xd30a('0x34')]['offset']);}_0x34d89f[_0xd30a('0x3b')]=qs['sort'](_0xe28979[_0xd30a('0x34')][_0xd30a('0x3c')]);_0x34d89f[_0xd30a('0x3d')]=qs[_0xd30a('0x35')](_[_0xd30a('0x3e')](_0xe28979[_0xd30a('0x34')],_0x5969b3['filters']),_0x234a9b);if(_0xe28979[_0xd30a('0x34')][_0xd30a('0x3f')]){_0x34d89f[_0xd30a('0x3d')]=_[_0xd30a('0x40')](_0x34d89f['where'],{'$or':_[_0xd30a('0x2e')](_0x234a9b,function(_0x1d2394){if(_0x1d2394[_0xd30a('0x31')]!==_0xd30a('0x41')){var _0x2b2d00={};_0x2b2d00[_0x1d2394[_0xd30a('0x2c')]]={'$like':'%'+_0xe28979[_0xd30a('0x34')][_0xd30a('0x3f')]+'%'};return _0x2b2d00;}})});}_0x34d89f=_[_0xd30a('0x40')]({},_0x34d89f,_0xe28979[_0xd30a('0x42')]);var _0x4b2bc1={'where':_0x34d89f[_0xd30a('0x3d')]};return db[_0xd30a('0x43')][_0xd30a('0x20')](_0x4b2bc1)[_0xd30a('0x27')](function(_0x543ca3){_0x29891c[_0xd30a('0x20')]=_0x543ca3;if(_0xe28979[_0xd30a('0x34')][_0xd30a('0x44')]){_0x34d89f[_0xd30a('0x45')]=[{'all':!![]}];}return db[_0xd30a('0x43')]['findAll'](_0x34d89f);})[_0xd30a('0x27')](function(_0x47d297){_0x29891c['rows']=_0x47d297;return _0x29891c;})[_0xd30a('0x27')](respondWithFilteredResult(_0xd8eff0,_0x34d89f))[_0xd30a('0x46')](handleError(_0xd8eff0,null));};exports['show']=function(_0xc68137,_0x430070){var _0x67a4c4={'raw':!![],'where':{'id':_0xc68137[_0xd30a('0x47')]['id']}},_0x259fa4={};_0x259fa4[_0xd30a('0x33')]=_[_0xd30a('0x48')](db[_0xd30a('0x43')][_0xd30a('0x2f')]);_0x259fa4[_0xd30a('0x34')]=_[_0xd30a('0x48')](_0xc68137[_0xd30a('0x34')]);_0x259fa4[_0xd30a('0x35')]=_['intersection'](_0x259fa4[_0xd30a('0x33')],_0x259fa4[_0xd30a('0x34')]);_0x67a4c4[_0xd30a('0x36')]=_['intersection'](_0x259fa4[_0xd30a('0x33')],qs[_0xd30a('0x49')](_0xc68137['query']['fields']));_0x67a4c4[_0xd30a('0x36')]=_0x67a4c4[_0xd30a('0x36')][_0xd30a('0x38')]?_0x67a4c4[_0xd30a('0x36')]:_0x259fa4[_0xd30a('0x33')];if(_0xc68137['query'][_0xd30a('0x44')]){_0x67a4c4[_0xd30a('0x45')]=[{'all':!![]}];}_0x67a4c4=_[_0xd30a('0x40')]({},_0x67a4c4,_0xc68137['options']);return db[_0xd30a('0x43')][_0xd30a('0x4a')](_0x67a4c4)[_0xd30a('0x27')](handleEntityNotFound(_0x430070,null))[_0xd30a('0x27')](respondWithResult(_0x430070,null))['catch'](handleError(_0x430070,null));};exports[_0xd30a('0x4b')]=function(_0x3d3035,_0x492d99){return db[_0xd30a('0x43')][_0xd30a('0x4b')](_0x3d3035[_0xd30a('0x4c')],{})[_0xd30a('0x27')](function(_0x3e5992){var _0xa3db4d=_0x3d3035['user'][_0xd30a('0x28')]({'plain':!![]});if(!_0xa3db4d)throw new Error('Unable\x20to\x20retrieve\x20the\x20current\x20user');if(_0xa3db4d[_0xd30a('0x4d')]===_0xd30a('0x4e')){var _0x94955f=_0x3e5992['get']({'plain':!![]});var _0x3274aa=_0xd30a('0x29');return db[_0xd30a('0x4f')][_0xd30a('0x4a')]({'where':{'name':_0x3274aa,'userProfileId':_0xa3db4d['userProfileId']},'raw':!![]})[_0xd30a('0x27')](function(_0x3d92cc){if(_0x3d92cc&&_0x3d92cc[_0xd30a('0x50')]===0x0){return db[_0xd30a('0x2a')]['create']({'name':_0x94955f[_0xd30a('0x2c')],'resourceId':_0x94955f['id'],'type':_0x3d92cc[_0xd30a('0x2c')],'sectionId':_0x3d92cc['id']},{})[_0xd30a('0x27')](function(){return _0x3e5992;});}else{return _0x3e5992;}})[_0xd30a('0x46')](function(_0x67ffec){logger['error'](_0xd30a('0x51'),_0x67ffec);throw _0x67ffec;});}return _0x3e5992;})[_0xd30a('0x27')](respondWithResult(_0x492d99,0xc9))['catch'](handleError(_0x492d99,null));};exports[_0xd30a('0x52')]=function(_0x1a6857,_0x127314){if(_0x1a6857[_0xd30a('0x4c')]['id']){delete _0x1a6857['body']['id'];}return db[_0xd30a('0x43')][_0xd30a('0x4a')]({'where':{'id':_0x1a6857[_0xd30a('0x47')]['id']}})['then'](handleEntityNotFound(_0x127314,null))[_0xd30a('0x27')](saveUpdates(_0x1a6857[_0xd30a('0x4c')],null))['then'](respondWithResult(_0x127314,null))[_0xd30a('0x46')](handleError(_0x127314,null));};exports[_0xd30a('0x26')]=function(_0x168c65,_0x5b2c05){return db[_0xd30a('0x43')]['find']({'where':{'id':_0x168c65[_0xd30a('0x47')]['id']}})['then'](handleEntityNotFound(_0x5b2c05,null))[_0xd30a('0x27')](removeEntity(_0x5b2c05,null))[_0xd30a('0x46')](handleError(_0x5b2c05,null));};exports[_0xd30a('0x53')]=function(_0x3980fa,_0x1e43ef){return db[_0xd30a('0x43')]['describe']()[_0xd30a('0x27')](respondWithResult(_0x1e43ef,null))[_0xd30a('0x46')](handleError(_0x1e43ef,null));};exports[_0xd30a('0x54')]=function(_0x498700,_0x17790b,_0x311882){var _0x22f378={'raw':!![],'where':{}},_0x25fde6={},_0x20ce78;return db[_0xd30a('0x43')]['findOne']({'where':{'id':_0x498700[_0xd30a('0x47')]['id']}})[_0xd30a('0x27')](handleEntityNotFound(_0x17790b,null))['then'](function(_0x1701e5){if(_0x1701e5){_0x20ce78=_0x1701e5[_0xd30a('0x28')]({'plain':!![]});_0x25fde6['model']=_[_0xd30a('0x48')](db[_0xd30a('0x55')]['rawAttributes']);_0x25fde6[_0xd30a('0x34')]=_[_0xd30a('0x48')](_0x498700['query']);_0x25fde6[_0xd30a('0x35')]=_[_0xd30a('0x37')](_0x25fde6['model'],_0x25fde6[_0xd30a('0x34')]);_0x22f378[_0xd30a('0x36')]=_['intersection'](_0x25fde6[_0xd30a('0x33')],qs[_0xd30a('0x49')](_0x498700[_0xd30a('0x34')][_0xd30a('0x49')]));_0x22f378[_0xd30a('0x36')]=_0x22f378['attributes']['length']?_0x22f378[_0xd30a('0x36')]:_0x25fde6[_0xd30a('0x33')];if(!_0x498700['query'][_0xd30a('0x39')]('nolimit')){_0x22f378[_0xd30a('0x1f')]=qs[_0xd30a('0x1f')](_0x498700[_0xd30a('0x34')][_0xd30a('0x1f')]);_0x22f378['offset']=qs['offset'](_0x498700[_0xd30a('0x34')]['offset']);}_0x22f378[_0xd30a('0x3b')]=qs[_0xd30a('0x3c')](_0x498700['query'][_0xd30a('0x3c')]);_0x22f378[_0xd30a('0x3d')]=qs['filters'](_[_0xd30a('0x3e')](_0x498700[_0xd30a('0x34')],_0x25fde6[_0xd30a('0x35')]));_0x22f378[_0xd30a('0x3d')][_0xd30a('0x56')]=_0x1701e5['id'];if(_0x498700['query']['filter']){_0x22f378['where']=_[_0xd30a('0x40')](_0x22f378['where'],{'$or':_[_0xd30a('0x2e')](_0x22f378[_0xd30a('0x36')],function(_0x369c2b){var _0x2695cc={};_0x2695cc[_0x369c2b]={'$like':'%'+_0x498700[_0xd30a('0x34')]['filter']+'%'};return _0x2695cc;})});}_0x22f378=_[_0xd30a('0x40')]({},_0x22f378,_0x498700[_0xd30a('0x42')]);return db['UserSmsQueue'][_0xd30a('0x57')](_0x22f378);}})[_0xd30a('0x27')](function(_0x27a2c8){if(_0x27a2c8){return db[_0xd30a('0x58')]['findAndCountAll']({'where':{'id':_[_0xd30a('0x2e')](_0x27a2c8,_0xd30a('0x59')),'role':'agent'},'attributes':['id',_0xd30a('0x2c'),'smsPause',_0xd30a('0x5a'),_0xd30a('0x5b')]});}})[_0xd30a('0x27')](function(_0x26181c){if(_0x26181c){return{'count':_0x26181c[_0xd30a('0x20')],'rows':_[_0xd30a('0x2e')](_0x26181c[_0xd30a('0x5c')],function(_0x462feb){return{'membername':_0x462feb[_0xd30a('0x2c')],'UserId':_0x462feb['id'],'queue_name':_0x20ce78[_0xd30a('0x2c')],'SmsQueueId':_0x20ce78['id'],'interface':util['format'](_0xd30a('0x5d'),_0xd30a('0x5e'),_0x462feb[_0xd30a('0x2c')]),'penalty':0x0,'paused':_0x462feb[_0xd30a('0x5f')],'createdAt':_0x462feb['createdAt'],'updatedAt':_0x462feb[_0xd30a('0x5a')]};})};}else{return{'count':0x0,'rows':[]};}})['then'](respondWithFilteredResult(_0x17790b,_0x22f378))['catch'](handleError(_0x17790b,null));};exports[_0xd30a('0x60')]=function(_0x4a1f41,_0x20bc9c,_0x1ec352){var _0x13fdc1={};var _0x26f9b2={};var _0x5da985;var _0xb3bacc;return db['SmsQueue'][_0xd30a('0x61')]({'where':{'id':_0x4a1f41[_0xd30a('0x47')]['id']}})['then'](handleEntityNotFound(_0x20bc9c,null))['then'](function(_0x4b648a){if(_0x4b648a){_0x5da985=_0x4b648a;_0x26f9b2[_0xd30a('0x33')]=_[_0xd30a('0x48')](db[_0xd30a('0x62')]['rawAttributes']);_0x26f9b2[_0xd30a('0x34')]=_[_0xd30a('0x48')](_0x4a1f41[_0xd30a('0x34')]);_0x26f9b2[_0xd30a('0x35')]=_[_0xd30a('0x37')](_0x26f9b2[_0xd30a('0x33')],_0x26f9b2[_0xd30a('0x34')]);_0x13fdc1[_0xd30a('0x36')]=_[_0xd30a('0x37')](_0x26f9b2[_0xd30a('0x33')],qs['fields'](_0x4a1f41['query']['fields']));_0x13fdc1[_0xd30a('0x36')]=_0x13fdc1[_0xd30a('0x36')][_0xd30a('0x38')]?_0x13fdc1[_0xd30a('0x36')]:_0x26f9b2['model'];_0x13fdc1['order']=qs[_0xd30a('0x3c')](_0x4a1f41[_0xd30a('0x34')][_0xd30a('0x3c')]);_0x13fdc1['where']=qs[_0xd30a('0x35')](_[_0xd30a('0x3e')](_0x4a1f41[_0xd30a('0x34')],_0x26f9b2[_0xd30a('0x35')]));if(_0x4a1f41['query'][_0xd30a('0x3f')]){_0x13fdc1['where']=_[_0xd30a('0x40')](_0x13fdc1['where'],{'$or':_['map'](_0x13fdc1[_0xd30a('0x36')],function(_0x170dab){var _0x5c553f={};_0x5c553f[_0x170dab]={'$like':'%'+_0x4a1f41[_0xd30a('0x34')][_0xd30a('0x3f')]+'%'};return _0x5c553f;})});}_0x13fdc1=_[_0xd30a('0x40')]({},_0x13fdc1,_0x4a1f41['options']);return _0x5da985['getTeams'](_0x13fdc1);}})['then'](function(_0x12c973){if(_0x12c973){_0xb3bacc=_0x12c973['length'];if(!_0x4a1f41[_0xd30a('0x34')][_0xd30a('0x39')](_0xd30a('0x3a'))){_0x13fdc1[_0xd30a('0x1f')]=qs[_0xd30a('0x1f')](_0x4a1f41[_0xd30a('0x34')]['limit']);_0x13fdc1[_0xd30a('0x1d')]=qs['offset'](_0x4a1f41[_0xd30a('0x34')][_0xd30a('0x1d')]);}return _0x5da985['getTeams'](_0x13fdc1);}})[_0xd30a('0x27')](function(_0x495e53){if(_0x495e53){return _0x495e53?{'count':_0xb3bacc,'rows':_0x495e53}:null;}})['then'](respondWithResult(_0x20bc9c,null))[_0xd30a('0x46')](handleError(_0x20bc9c,null));};exports['addTeams']=function(_0x1667a5,_0x8c2001,_0x596b26){var _0x36c477=_0x1667a5[_0xd30a('0x4c')][_0xd30a('0x63')];return db[_0xd30a('0x62')][_0xd30a('0x57')]({'where':{'id':_0x36c477},'attributes':['id'],'include':[{'model':db[_0xd30a('0x58')],'as':_0xd30a('0x64'),'attributes':['id',_0xd30a('0x2c'),_0xd30a('0x65'),_0xd30a('0x66'),_0xd30a('0x67')],'raw':!![]}]})[_0xd30a('0x27')](function(_0x36d152){if(_0x36d152){var _0x1ba070=_[_0xd30a('0x68')](_0x36d152,function(_0x1f02d6){var _0x428785=_0x1f02d6[_0xd30a('0x28')]({'plain':!![]});return _0x428785[_0xd30a('0x64')];});return db['SmsQueue'][_0xd30a('0x4a')]({'where':{'id':_0x1667a5[_0xd30a('0x47')]['id']}})[_0xd30a('0x27')](function(_0x4bc80c){return db[_0xd30a('0x69')]['transaction'](function(_0x4fccc1){return _0x4bc80c[_0xd30a('0x6a')](_0x36c477,{'transaction':_0x4fccc1})[_0xd30a('0x27')](function(){return BPromise['each'](_0x1ba070,function(_0x12bb13){return db[_0xd30a('0x55')]['findOrCreate']({'where':{'UserId':_0x12bb13['id'],'SmsQueueId':_0x1667a5['params']['id']},'transaction':_0x4fccc1});});})[_0xd30a('0x27')](function(){_0x1ba070[_0xd30a('0x6b')](function(_0x588274){socket[_0xd30a('0x6c')](_0xd30a('0x6d'),{'UserId':_0x588274['id'],'SmsQueueId':_0x4bc80c['id']});});});});});}})[_0xd30a('0x27')](respondWithStatusCode(_0x8c2001,null))[_0xd30a('0x46')](handleError(_0x8c2001,null));};exports['removeTeams']=function(_0x320202,_0x28c13d,_0x42ea13){return db[_0xd30a('0x62')][_0xd30a('0x57')]({'where':{'id':_0x320202[_0xd30a('0x34')][_0xd30a('0x63')]},'attributes':['id'],'include':[{'model':db[_0xd30a('0x58')],'as':_0xd30a('0x64'),'attributes':['id'],'raw':!![]}]})[_0xd30a('0x27')](handleEntityNotFound(_0x28c13d,null))[_0xd30a('0x27')](function(_0x51c6d2){var _0x34e962=_[_0xd30a('0x2e')](_0x51c6d2,'id');var _0x2fe564=[];var _0x36eac7=[];var _0x5887b5=squel[_0xd30a('0x6e')]();_0x5887b5[_0xd30a('0x6f')](_0xd30a('0x70'))[_0xd30a('0x71')](_0xd30a('0x72'),'tq')['join'](_0xd30a('0x73'),'ut',_0xd30a('0x74'))[_0xd30a('0x3d')]('SmsQueueId\x20=\x20?',_0x320202[_0xd30a('0x47')]['id']);for(var _0x33c497=0x0;_0x33c497<_0x51c6d2[_0xd30a('0x38')];_0x33c497+=0x1){let _0x246b81=_0x51c6d2[_0x33c497];for(var _0x189fd2=0x0;_0x189fd2<_0x246b81[_0xd30a('0x64')][_0xd30a('0x38')];_0x189fd2+=0x1){let _0x4bf1a1=_0x246b81[_0xd30a('0x64')][_0x189fd2];var _0x29f648=_0x5887b5['clone']();_0x29f648[_0xd30a('0x3d')](_0xd30a('0x75'),_0x4bf1a1['id']);_0x36eac7[_0xd30a('0x76')](db[_0xd30a('0x69')][_0xd30a('0x34')](_0x29f648['toString'](),{'type':db['sequelize'][_0xd30a('0x77')]['SELECT']})['then'](function(_0x213d01){if(_0x213d01['length']===0x1){return _0x4bf1a1['id'];}else{var _0x472d26=_[_0xd30a('0x78')](_[_0xd30a('0x2e')](_0x213d01,_0xd30a('0x79')),function(_0x5c53a0){return _['includes'](_0x34e962,_0x5c53a0);});if(_0x472d26){return _0x4bf1a1['id'];}}}));}}return BPromise['all'](_0x36eac7)[_0xd30a('0x27')](function(_0x4b18c8){_0x2fe564=_(_0x2fe564)[_0xd30a('0x7a')](_0x4b18c8)['compact']()[_0xd30a('0x7b')]();return db[_0xd30a('0x43')][_0xd30a('0x4a')]({'where':{'id':_0x320202[_0xd30a('0x47')]['id']}})[_0xd30a('0x27')](function(_0x5ed01c){return db[_0xd30a('0x69')][_0xd30a('0x7c')](function(_0x2089e1){return _0x5ed01c[_0xd30a('0x7d')](_0x320202[_0xd30a('0x34')][_0xd30a('0x63')],{'transaction':_0x2089e1})[_0xd30a('0x27')](function(){if(!_[_0xd30a('0x7e')](_0x2fe564)){return _0x5ed01c[_0xd30a('0x7f')](_0x2fe564,{'transaction':_0x2089e1});}})[_0xd30a('0x27')](function(){_0x2fe564[_0xd30a('0x6b')](function(_0x4797b5){socket[_0xd30a('0x6c')](_0xd30a('0x80'),{'UserId':_0x4797b5,'SmsQueueId':_0x5ed01c['id']});});});});});});})[_0xd30a('0x27')](respondWithStatusCode(_0x28c13d,null))['catch'](handleError(_0x28c13d,null));};exports[_0xd30a('0x81')]=function(_0x1030ab,_0x257879,_0x49adec){return db[_0xd30a('0x43')][_0xd30a('0x4a')]({'where':{'id':_0x1030ab[_0xd30a('0x47')]['id']}})[_0xd30a('0x27')](handleEntityNotFound(_0x257879,null))[_0xd30a('0x27')](function(_0x109ce1){if(_0x109ce1){return _0x109ce1[_0xd30a('0x81')](_0x1030ab[_0xd30a('0x4c')][_0xd30a('0x63')],_['omit'](_0x1030ab[_0xd30a('0x4c')],[_0xd30a('0x63'),'id'])||{})[_0xd30a('0x82')](function(_0x1e3bf9){for(var _0x23d050=0x0;_0x23d050<_0x1030ab['body'][_0xd30a('0x63')][_0xd30a('0x38')];_0x23d050+=0x1){socket[_0xd30a('0x6c')](_0xd30a('0x6d'),{'UserId':Number(_0x1030ab['body'][_0xd30a('0x63')][_0x23d050]),'SmsQueueId':Number(_0x1030ab[_0xd30a('0x47')]['id'])});}return _0x1e3bf9;});}})[_0xd30a('0x27')](respondWithResult(_0x257879,null))[_0xd30a('0x46')](handleError(_0x257879,null));};exports[_0xd30a('0x7f')]=function(_0x2e5030,_0x3b5768,_0x4d9e5d){return db[_0xd30a('0x43')][_0xd30a('0x4a')]({'where':{'id':_0x2e5030['params']['id']}})[_0xd30a('0x27')](handleEntityNotFound(_0x3b5768,null))[_0xd30a('0x27')](function(_0x5d3a62){if(_0x5d3a62){return _0x5d3a62[_0xd30a('0x7f')](_0x2e5030[_0xd30a('0x34')][_0xd30a('0x63')])[_0xd30a('0x27')](function(){if(_['isArray'](_0x2e5030[_0xd30a('0x34')][_0xd30a('0x63')])){for(var _0x340206=0x0;_0x340206<_0x2e5030[_0xd30a('0x34')][_0xd30a('0x63')][_0xd30a('0x38')];_0x340206+=0x1){socket['emit']('userSmsQueue:remove',{'UserId':Number(_0x2e5030[_0xd30a('0x34')]['ids'][_0x340206]),'SmsQueueId':Number(_0x2e5030[_0xd30a('0x47')]['id'])});}}else{socket[_0xd30a('0x6c')](_0xd30a('0x80'),{'UserId':Number(_0x2e5030[_0xd30a('0x34')]['ids']),'SmsQueueId':Number(_0x2e5030[_0xd30a('0x47')]['id'])});}});}})[_0xd30a('0x27')](respondWithStatusCode(_0x3b5768,null))['catch'](handleError(_0x3b5768,null));};exports['getAgents']=function(_0x5b75ff,_0x5e2d36,_0x7e67a1){var _0x557f06={};var _0x380e51={};var _0x5394fd;var _0x5bc441;return db[_0xd30a('0x43')][_0xd30a('0x61')]({'where':{'id':_0x5b75ff[_0xd30a('0x47')]['id']}})[_0xd30a('0x27')](handleEntityNotFound(_0x5e2d36,null))[_0xd30a('0x27')](function(_0x1991cb){if(_0x1991cb){_0x5394fd=_0x1991cb;_0x380e51[_0xd30a('0x33')]=_['keys'](db[_0xd30a('0x58')]['rawAttributes']);_0x380e51[_0xd30a('0x34')]=_['keys'](_0x5b75ff[_0xd30a('0x34')]);_0x380e51['filters']=_['intersection'](_0x380e51[_0xd30a('0x33')],_0x380e51['query']);_0x557f06[_0xd30a('0x36')]=_[_0xd30a('0x37')](_0x380e51[_0xd30a('0x33')],qs[_0xd30a('0x49')](_0x5b75ff[_0xd30a('0x34')][_0xd30a('0x49')]));_0x557f06[_0xd30a('0x36')]=_0x557f06['attributes']['length']?_0x557f06[_0xd30a('0x36')]:_0x380e51[_0xd30a('0x33')];_0x557f06[_0xd30a('0x3b')]=qs[_0xd30a('0x3c')](_0x5b75ff[_0xd30a('0x34')]['sort']);_0x557f06[_0xd30a('0x3d')]=qs[_0xd30a('0x35')](_['pick'](_0x5b75ff[_0xd30a('0x34')],_0x380e51[_0xd30a('0x35')]));if(_0x5b75ff['query'][_0xd30a('0x3f')]){_0x557f06[_0xd30a('0x3d')]=_[_0xd30a('0x40')](_0x557f06[_0xd30a('0x3d')],{'$or':_[_0xd30a('0x2e')](_0x557f06['attributes'],function(_0x27acb9){var _0x335df7={};_0x335df7[_0x27acb9]={'$like':'%'+_0x5b75ff['query'][_0xd30a('0x3f')]+'%'};return _0x335df7;})});}_0x557f06=_[_0xd30a('0x40')]({},_0x557f06,_0x5b75ff[_0xd30a('0x42')]);return _0x5394fd[_0xd30a('0x83')](_0x557f06);}})[_0xd30a('0x27')](function(_0x5ae0d3){if(_0x5ae0d3){_0x5bc441=_0x5ae0d3[_0xd30a('0x38')];if(!_0x5b75ff[_0xd30a('0x34')][_0xd30a('0x39')](_0xd30a('0x3a'))){_0x557f06['limit']=qs[_0xd30a('0x1f')](_0x5b75ff[_0xd30a('0x34')][_0xd30a('0x1f')]);_0x557f06[_0xd30a('0x1d')]=qs[_0xd30a('0x1d')](_0x5b75ff[_0xd30a('0x34')][_0xd30a('0x1d')]);}return _0x5394fd[_0xd30a('0x83')](_0x557f06);}})[_0xd30a('0x27')](function(_0x5bcc46){if(_0x5bcc46){return _0x5bcc46?{'count':_0x5bc441,'rows':_0x5bcc46}:null;}})[_0xd30a('0x27')](respondWithResult(_0x5e2d36,null))[_0xd30a('0x46')](handleError(_0x5e2d36,null));}; \ No newline at end of file diff --git a/server/api/smsQueue/smsQueue.events.js b/server/api/smsQueue/smsQueue.events.js index 564706b..bd5a9c6 100644 --- a/server/api/smsQueue/smsQueue.events.js +++ b/server/api/smsQueue/smsQueue.events.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x382b=['remove','hasOwnProperty','hook','../../mysqldb','setMaxListeners','save','update'];(function(_0x8530f,_0x85d308){var _0x280b35=function(_0x455e63){while(--_0x455e63){_0x8530f['push'](_0x8530f['shift']());}};_0x280b35(++_0x85d308);}(_0x382b,0x1ae));var _0xb382=function(_0x20a584,_0xe384a5){_0x20a584=_0x20a584-0x0;var _0x4b41a8=_0x382b[_0x20a584];return _0x4b41a8;};'use strict';var EventEmitter=require('events');var SmsQueue=require(_0xb382('0x0'))['db']['SmsQueue'];var SmsQueueEvents=new EventEmitter();SmsQueueEvents[_0xb382('0x1')](0x0);var events={'afterCreate':_0xb382('0x2'),'afterUpdate':_0xb382('0x3'),'afterDestroy':_0xb382('0x4')};function emitEvent(_0x55ba4c){return function(_0x43286e,_0xb5a9e6,_0x418911){SmsQueueEvents['emit'](_0x55ba4c+':'+_0x43286e['id'],_0x43286e);SmsQueueEvents['emit'](_0x55ba4c,_0x43286e);_0x418911(null);};}for(var e in events){if(events[_0xb382('0x5')](e)){var event=events[e];SmsQueue[_0xb382('0x6')](e,emitEvent(event));}}module['exports']=SmsQueueEvents; \ No newline at end of file +var _0x341b=['update','remove','emit','exports','../../mysqldb','setMaxListeners','save'];(function(_0x526b8b,_0x467a76){var _0x4e7cff=function(_0x5cdd95){while(--_0x5cdd95){_0x526b8b['push'](_0x526b8b['shift']());}};_0x4e7cff(++_0x467a76);}(_0x341b,0x100));var _0xb341=function(_0x3a11ce,_0x4b9250){_0x3a11ce=_0x3a11ce-0x0;var _0x210e95=_0x341b[_0x3a11ce];return _0x210e95;};'use strict';var EventEmitter=require('events');var SmsQueue=require(_0xb341('0x0'))['db']['SmsQueue'];var SmsQueueEvents=new EventEmitter();SmsQueueEvents[_0xb341('0x1')](0x0);var events={'afterCreate':_0xb341('0x2'),'afterUpdate':_0xb341('0x3'),'afterDestroy':_0xb341('0x4')};function emitEvent(_0x3d179d){return function(_0x33848e,_0x3df003,_0x55346a){SmsQueueEvents[_0xb341('0x5')](_0x3d179d+':'+_0x33848e['id'],_0x33848e);SmsQueueEvents['emit'](_0x3d179d,_0x33848e);_0x55346a(null);};}for(var e in events){if(events['hasOwnProperty'](e)){var event=events[e];SmsQueue['hook'](e,emitEvent(event));}}module[_0xb341('0x6')]=SmsQueueEvents; \ No newline at end of file diff --git a/server/api/smsQueue/smsQueue.model.js b/server/api/smsQueue/smsQueue.model.js index 4547d5b..152be01 100644 --- a/server/api/smsQueue/smsQueue.model.js +++ b/server/api/smsQueue/smsQueue.model.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x47d7=['SmsQueue','sms_queues','lodash','util','api','moment','rimraf','exports'];(function(_0x2dafbe,_0x5d04de){var _0x58a45a=function(_0x50ac96){while(--_0x50ac96){_0x2dafbe['push'](_0x2dafbe['shift']());}};_0x58a45a(++_0x5d04de);}(_0x47d7,0x9a));var _0x747d=function(_0xa75ae,_0x53be3d){_0xa75ae=_0xa75ae-0x0;var _0xc46565=_0x47d7[_0xa75ae];return _0xc46565;};'use strict';var _=require(_0x747d('0x0'));var util=require(_0x747d('0x1'));var logger=require('../../config/logger')(_0x747d('0x2'));var moment=require(_0x747d('0x3'));var BPromise=require('bluebird');var rp=require('request-promise');var fs=require('fs');var path=require('path');var rimraf=require(_0x747d('0x4'));var config=require('../../config/environment');var attributes=require('./smsQueue.attributes');module[_0x747d('0x5')]=function(_0xa034d6,_0x101370){return _0xa034d6['define'](_0x747d('0x6'),attributes,{'tableName':_0x747d('0x7'),'paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file +var _0xa5fe=['util','../../config/logger','api','moment','bluebird','request-promise','path','rimraf','../../config/environment','./smsQueue.attributes','exports','define','SmsQueue','lodash'];(function(_0x5df5c6,_0x39ca7c){var _0x14d8ed=function(_0x454823){while(--_0x454823){_0x5df5c6['push'](_0x5df5c6['shift']());}};_0x14d8ed(++_0x39ca7c);}(_0xa5fe,0x179));var _0xea5f=function(_0x3ab51d,_0x2fa01d){_0x3ab51d=_0x3ab51d-0x0;var _0x29a04e=_0xa5fe[_0x3ab51d];return _0x29a04e;};'use strict';var _=require(_0xea5f('0x0'));var util=require(_0xea5f('0x1'));var logger=require(_0xea5f('0x2'))(_0xea5f('0x3'));var moment=require(_0xea5f('0x4'));var BPromise=require(_0xea5f('0x5'));var rp=require(_0xea5f('0x6'));var fs=require('fs');var path=require(_0xea5f('0x7'));var rimraf=require(_0xea5f('0x8'));var config=require(_0xea5f('0x9'));var attributes=require(_0xea5f('0xa'));module[_0xea5f('0xb')]=function(_0x311bbd,_0x235b7a){return _0x311bbd[_0xea5f('0xc')](_0xea5f('0xd'),attributes,{'tableName':'sms_queues','paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file diff --git a/server/api/smsQueue/smsQueue.rpc.js b/server/api/smsQueue/smsQueue.rpc.js index 9dac62b..2b34d96 100644 --- a/server/api/smsQueue/smsQueue.rpc.js +++ b/server/api/smsQueue/smsQueue.rpc.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x55de=['message','result','catch','GetSmsQueue','findAll','options','attributes','limit','include','map','model','info','debug','SmsQueue','ShowSmsQueue','lodash','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','jayson/promise','client','http','redis','defaults','localhost','socket.io-emitter','./smsQueue.socket','request','then','SmsQueue,\x20%s,\x20%s','SmsQueue,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','code'];(function(_0x4914ec,_0x25b176){var _0x5bc890=function(_0x29a66e){while(--_0x29a66e){_0x4914ec['push'](_0x4914ec['shift']());}};_0x5bc890(++_0x25b176);}(_0x55de,0x1ef));var _0xe55d=function(_0x41031d,_0x17a3ee){_0x41031d=_0x41031d-0x0;var _0x2606c8=_0x55de[_0x41031d];return _0x2606c8;};'use strict';var _=require(_0xe55d('0x0'));var util=require(_0xe55d('0x1'));var moment=require(_0xe55d('0x2'));var BPromise=require(_0xe55d('0x3'));var rs=require(_0xe55d('0x4'));var fs=require('fs');var Redis=require(_0xe55d('0x5'));var db=require(_0xe55d('0x6'))['db'];var utils=require(_0xe55d('0x7'));var logger=require(_0xe55d('0x8'))('rpc');var config=require('../../config/environment');var jayson=require(_0xe55d('0x9'));var client=jayson[_0xe55d('0xa')][_0xe55d('0xb')]({'port':0x232a});config[_0xe55d('0xc')]=_[_0xe55d('0xd')](config['redis'],{'host':_0xe55d('0xe'),'port':0x18eb});var socket=require(_0xe55d('0xf'))(new Redis(config[_0xe55d('0xc')]));require(_0xe55d('0x10'))['register'](socket);function respondWithRpcPromise(_0x7a11ea,_0x67c6d9,_0x57b468){return new BPromise(function(_0x2af6a2,_0x5dedfc){return client[_0xe55d('0x11')](_0x7a11ea,_0x57b468)[_0xe55d('0x12')](function(_0x393f11){logger['info'](_0xe55d('0x13'),_0x67c6d9,'request\x20sent');logger['debug'](_0xe55d('0x14'),_0x67c6d9,_0xe55d('0x15'),JSON[_0xe55d('0x16')](_0x393f11));if(_0x393f11[_0xe55d('0x17')]){if(_0x393f11[_0xe55d('0x17')][_0xe55d('0x18')]===0x1f4){logger['error'](_0xe55d('0x13'),_0x67c6d9,_0x393f11[_0xe55d('0x17')]['message']);return _0x5dedfc(_0x393f11[_0xe55d('0x17')][_0xe55d('0x19')]);}logger[_0xe55d('0x17')](_0xe55d('0x13'),_0x67c6d9,_0x393f11[_0xe55d('0x17')]['message']);return _0x2af6a2(_0x393f11[_0xe55d('0x17')][_0xe55d('0x19')]);}else{logger['info'](_0xe55d('0x13'),_0x67c6d9,'request\x20sent');_0x2af6a2(_0x393f11[_0xe55d('0x1a')][_0xe55d('0x19')]);}})[_0xe55d('0x1b')](function(_0x222117){logger['error'](_0xe55d('0x13'),_0x67c6d9,_0x222117);_0x5dedfc(_0x222117);});});}exports[_0xe55d('0x1c')]=function(_0x427342){var _0x1c2b6f=this;return new Promise(function(_0x5333b7,_0x95bf1b){return db['SmsQueue'][_0xe55d('0x1d')]({'raw':_0x427342[_0xe55d('0x1e')]?_0x427342[_0xe55d('0x1e')]['raw']===undefined?!![]:![]:!![],'where':_0x427342[_0xe55d('0x1e')]?_0x427342[_0xe55d('0x1e')]['where']||null:null,'attributes':_0x427342[_0xe55d('0x1e')]?_0x427342[_0xe55d('0x1e')][_0xe55d('0x1f')]||null:null,'limit':_0x427342['options']?_0x427342[_0xe55d('0x1e')][_0xe55d('0x20')]||null:null,'include':_0x427342[_0xe55d('0x1e')]?_0x427342[_0xe55d('0x1e')][_0xe55d('0x21')]?_[_0xe55d('0x22')](_0x427342[_0xe55d('0x1e')]['include'],function(_0x3c73c8){return{'model':db[_0x3c73c8[_0xe55d('0x23')]],'as':_0x3c73c8['as'],'attributes':_0x3c73c8['attributes'],'include':_0x3c73c8[_0xe55d('0x21')]?_[_0xe55d('0x22')](_0x3c73c8[_0xe55d('0x21')],function(_0x5690b3){return{'model':db[_0x5690b3[_0xe55d('0x23')]],'as':_0x5690b3['as'],'attributes':_0x5690b3[_0xe55d('0x1f')],'include':_0x5690b3[_0xe55d('0x21')]?_[_0xe55d('0x22')](_0x5690b3[_0xe55d('0x21')],function(_0x12b385){return{'model':db[_0x12b385[_0xe55d('0x23')]],'as':_0x12b385['as'],'attributes':_0x12b385[_0xe55d('0x1f')]};}):[]};}):[]};}):[]:[]})[_0xe55d('0x12')](function(_0x4be3d9){logger[_0xe55d('0x24')]('GetSmsQueue',_0x427342);logger[_0xe55d('0x25')](_0xe55d('0x1c'),_0x427342,JSON[_0xe55d('0x16')](_0x4be3d9));_0x5333b7(_0x4be3d9);})['catch'](function(_0x75af78){logger[_0xe55d('0x17')]('GetSmsQueue',_0x75af78[_0xe55d('0x19')],_0x427342);_0x95bf1b(_0x1c2b6f['error'](0x1f4,_0x75af78['message']));});});};exports['ShowSmsQueue']=function(_0x467daa){var _0x4041ab=this;return new Promise(function(_0x55b602,_0x11b079){return db[_0xe55d('0x26')]['find']({'raw':_0x467daa[_0xe55d('0x1e')]?_0x467daa['options']['raw']===undefined?!![]:![]:!![],'where':_0x467daa[_0xe55d('0x1e')]?_0x467daa[_0xe55d('0x1e')]['where']||null:null,'attributes':_0x467daa[_0xe55d('0x1e')]?_0x467daa[_0xe55d('0x1e')]['attributes']||null:null,'include':_0x467daa[_0xe55d('0x1e')]?_0x467daa[_0xe55d('0x1e')][_0xe55d('0x21')]?_[_0xe55d('0x22')](_0x467daa['options'][_0xe55d('0x21')],function(_0x565982){return{'model':db[_0x565982[_0xe55d('0x23')]],'as':_0x565982['as'],'attributes':_0x565982[_0xe55d('0x1f')],'include':_0x565982[_0xe55d('0x21')]?_[_0xe55d('0x22')](_0x565982[_0xe55d('0x21')],function(_0x2dfb83){return{'model':db[_0x2dfb83[_0xe55d('0x23')]],'as':_0x2dfb83['as'],'attributes':_0x2dfb83['attributes'],'include':_0x2dfb83[_0xe55d('0x21')]?_[_0xe55d('0x22')](_0x2dfb83['include'],function(_0x1e7152){return{'model':db[_0x1e7152[_0xe55d('0x23')]],'as':_0x1e7152['as'],'attributes':_0x1e7152[_0xe55d('0x1f')]};}):[]};}):[]};}):[]:[]})[_0xe55d('0x12')](function(_0x5b9b88){logger[_0xe55d('0x24')](_0xe55d('0x27'),_0x467daa);logger[_0xe55d('0x25')](_0xe55d('0x27'),_0x467daa,JSON['stringify'](_0x5b9b88));_0x55b602(_0x5b9b88);})['catch'](function(_0x56c175){logger[_0xe55d('0x17')](_0xe55d('0x27'),_0x56c175[_0xe55d('0x19')],_0x467daa);_0x11b079(_0x4041ab[_0xe55d('0x17')](0x1f4,_0x56c175[_0xe55d('0x19')]));});});}; \ No newline at end of file +var _0xfbdd=['raw','attributes','limit','include','model','map','ShowSmsQueue','find','where','debug','lodash','moment','bluebird','randomstring','../../config/utils','../../config/logger','rpc','../../config/environment','client','http','redis','localhost','register','request','then','info','request\x20sent','SmsQueue,\x20%s,\x20%s,\x20%s','stringify','error','code','SmsQueue,\x20%s,\x20%s','message','catch','GetSmsQueue','SmsQueue','options'];(function(_0x321bb2,_0x202794){var _0x9c12ed=function(_0x263dd3){while(--_0x263dd3){_0x321bb2['push'](_0x321bb2['shift']());}};_0x9c12ed(++_0x202794);}(_0xfbdd,0x17c));var _0xdfbd=function(_0x4eb34c,_0xfbe9d4){_0x4eb34c=_0x4eb34c-0x0;var _0x2bc6c4=_0xfbdd[_0x4eb34c];return _0x2bc6c4;};'use strict';var _=require(_0xdfbd('0x0'));var util=require('util');var moment=require(_0xdfbd('0x1'));var BPromise=require(_0xdfbd('0x2'));var rs=require(_0xdfbd('0x3'));var fs=require('fs');var Redis=require('ioredis');var db=require('../../mysqldb')['db'];var utils=require(_0xdfbd('0x4'));var logger=require(_0xdfbd('0x5'))(_0xdfbd('0x6'));var config=require(_0xdfbd('0x7'));var jayson=require('jayson/promise');var client=jayson[_0xdfbd('0x8')][_0xdfbd('0x9')]({'port':0x232a});config[_0xdfbd('0xa')]=_['defaults'](config[_0xdfbd('0xa')],{'host':_0xdfbd('0xb'),'port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config[_0xdfbd('0xa')]));require('./smsQueue.socket')[_0xdfbd('0xc')](socket);function respondWithRpcPromise(_0x2417f0,_0x219576,_0x3c6cbf){return new BPromise(function(_0x2dd174,_0x3734b6){return client[_0xdfbd('0xd')](_0x2417f0,_0x3c6cbf)[_0xdfbd('0xe')](function(_0x489bd1){logger[_0xdfbd('0xf')]('SmsQueue,\x20%s,\x20%s',_0x219576,_0xdfbd('0x10'));logger['debug'](_0xdfbd('0x11'),_0x219576,_0xdfbd('0x10'),JSON[_0xdfbd('0x12')](_0x489bd1));if(_0x489bd1[_0xdfbd('0x13')]){if(_0x489bd1['error'][_0xdfbd('0x14')]===0x1f4){logger[_0xdfbd('0x13')](_0xdfbd('0x15'),_0x219576,_0x489bd1[_0xdfbd('0x13')]['message']);return _0x3734b6(_0x489bd1['error'][_0xdfbd('0x16')]);}logger['error'](_0xdfbd('0x15'),_0x219576,_0x489bd1[_0xdfbd('0x13')][_0xdfbd('0x16')]);return _0x2dd174(_0x489bd1['error']['message']);}else{logger[_0xdfbd('0xf')]('SmsQueue,\x20%s,\x20%s',_0x219576,_0xdfbd('0x10'));_0x2dd174(_0x489bd1['result'][_0xdfbd('0x16')]);}})[_0xdfbd('0x17')](function(_0xd9e188){logger[_0xdfbd('0x13')](_0xdfbd('0x15'),_0x219576,_0xd9e188);_0x3734b6(_0xd9e188);});});}exports[_0xdfbd('0x18')]=function(_0x409c04){var _0x4aee45=this;return new Promise(function(_0x4a7e4d,_0x466162){return db[_0xdfbd('0x19')]['findAll']({'raw':_0x409c04['options']?_0x409c04[_0xdfbd('0x1a')][_0xdfbd('0x1b')]===undefined?!![]:![]:!![],'where':_0x409c04[_0xdfbd('0x1a')]?_0x409c04['options']['where']||null:null,'attributes':_0x409c04['options']?_0x409c04[_0xdfbd('0x1a')][_0xdfbd('0x1c')]||null:null,'limit':_0x409c04[_0xdfbd('0x1a')]?_0x409c04['options'][_0xdfbd('0x1d')]||null:null,'include':_0x409c04[_0xdfbd('0x1a')]?_0x409c04[_0xdfbd('0x1a')]['include']?_['map'](_0x409c04[_0xdfbd('0x1a')][_0xdfbd('0x1e')],function(_0xf825b5){return{'model':db[_0xf825b5[_0xdfbd('0x1f')]],'as':_0xf825b5['as'],'attributes':_0xf825b5['attributes'],'include':_0xf825b5[_0xdfbd('0x1e')]?_[_0xdfbd('0x20')](_0xf825b5[_0xdfbd('0x1e')],function(_0x379d60){return{'model':db[_0x379d60[_0xdfbd('0x1f')]],'as':_0x379d60['as'],'attributes':_0x379d60[_0xdfbd('0x1c')],'include':_0x379d60['include']?_[_0xdfbd('0x20')](_0x379d60[_0xdfbd('0x1e')],function(_0x3322ec){return{'model':db[_0x3322ec['model']],'as':_0x3322ec['as'],'attributes':_0x3322ec[_0xdfbd('0x1c')]};}):[]};}):[]};}):[]:[]})[_0xdfbd('0xe')](function(_0x1309e3){logger['info'](_0xdfbd('0x18'),_0x409c04);logger['debug']('GetSmsQueue',_0x409c04,JSON[_0xdfbd('0x12')](_0x1309e3));_0x4a7e4d(_0x1309e3);})[_0xdfbd('0x17')](function(_0x336a93){logger['error'](_0xdfbd('0x18'),_0x336a93[_0xdfbd('0x16')],_0x409c04);_0x466162(_0x4aee45['error'](0x1f4,_0x336a93[_0xdfbd('0x16')]));});});};exports[_0xdfbd('0x21')]=function(_0x559150){var _0x5da149=this;return new Promise(function(_0x5f4d41,_0x36ec28){return db[_0xdfbd('0x19')][_0xdfbd('0x22')]({'raw':_0x559150[_0xdfbd('0x1a')]?_0x559150['options'][_0xdfbd('0x1b')]===undefined?!![]:![]:!![],'where':_0x559150[_0xdfbd('0x1a')]?_0x559150[_0xdfbd('0x1a')][_0xdfbd('0x23')]||null:null,'attributes':_0x559150['options']?_0x559150[_0xdfbd('0x1a')][_0xdfbd('0x1c')]||null:null,'include':_0x559150[_0xdfbd('0x1a')]?_0x559150['options']['include']?_['map'](_0x559150[_0xdfbd('0x1a')][_0xdfbd('0x1e')],function(_0x4695d8){return{'model':db[_0x4695d8['model']],'as':_0x4695d8['as'],'attributes':_0x4695d8[_0xdfbd('0x1c')],'include':_0x4695d8['include']?_[_0xdfbd('0x20')](_0x4695d8[_0xdfbd('0x1e')],function(_0x26986e){return{'model':db[_0x26986e['model']],'as':_0x26986e['as'],'attributes':_0x26986e['attributes'],'include':_0x26986e['include']?_['map'](_0x26986e['include'],function(_0x2d2295){return{'model':db[_0x2d2295['model']],'as':_0x2d2295['as'],'attributes':_0x2d2295[_0xdfbd('0x1c')]};}):[]};}):[]};}):[]:[]})[_0xdfbd('0xe')](function(_0x400892){logger[_0xdfbd('0xf')]('ShowSmsQueue',_0x559150);logger[_0xdfbd('0x24')](_0xdfbd('0x21'),_0x559150,JSON[_0xdfbd('0x12')](_0x400892));_0x5f4d41(_0x400892);})[_0xdfbd('0x17')](function(_0x560624){logger[_0xdfbd('0x13')]('ShowSmsQueue',_0x560624[_0xdfbd('0x16')],_0x559150);_0x36ec28(_0x5da149['error'](0x1f4,_0x560624[_0xdfbd('0x16')]));});});}; \ No newline at end of file diff --git a/server/api/smsQueue/smsQueue.socket.js b/server/api/smsQueue/smsQueue.socket.js index e67b8cf..5095026 100644 --- a/server/api/smsQueue/smsQueue.socket.js +++ b/server/api/smsQueue/smsQueue.socket.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x40f2=['save','remove','emit','removeListener','register','./smsQueue.events'];(function(_0x1255a3,_0x12091e){var _0x10d889=function(_0x466565){while(--_0x466565){_0x1255a3['push'](_0x1255a3['shift']());}};_0x10d889(++_0x12091e);}(_0x40f2,0xb9));var _0x240f=function(_0x14d8ff,_0x4faf7c){_0x14d8ff=_0x14d8ff-0x0;var _0xad0d7a=_0x40f2[_0x14d8ff];return _0xad0d7a;};'use strict';var SmsQueueEvents=require(_0x240f('0x0'));var events=[_0x240f('0x1'),_0x240f('0x2'),'update'];function createListener(_0x5eec35,_0x56bfdd){return function(_0x57af63){_0x56bfdd[_0x240f('0x3')](_0x5eec35,_0x57af63);};}function removeListener(_0x3c3bea,_0x11dde4){return function(){SmsQueueEvents[_0x240f('0x4')](_0x3c3bea,_0x11dde4);};}exports[_0x240f('0x5')]=function(_0x5f1552){for(var _0x3c66a9=0x0,_0x14a5b8=events['length'];_0x3c66a9<_0x14a5b8;_0x3c66a9++){var _0x577329=events[_0x3c66a9];var _0x5136ac=createListener('smsQueue:'+_0x577329,_0x5f1552);SmsQueueEvents['on'](_0x577329,_0x5136ac);}}; \ No newline at end of file +var _0x12d4=['smsQueue:','./smsQueue.events','update','emit','register','length'];(function(_0x1ac595,_0x5d2081){var _0x455fff=function(_0x3043ee){while(--_0x3043ee){_0x1ac595['push'](_0x1ac595['shift']());}};_0x455fff(++_0x5d2081);}(_0x12d4,0x16f));var _0x412d=function(_0x4a0e68,_0x45c08c){_0x4a0e68=_0x4a0e68-0x0;var _0x4fb274=_0x12d4[_0x4a0e68];return _0x4fb274;};'use strict';var SmsQueueEvents=require(_0x412d('0x0'));var events=['save','remove',_0x412d('0x1')];function createListener(_0x349a60,_0x69fdfc){return function(_0x103bc3){_0x69fdfc[_0x412d('0x2')](_0x349a60,_0x103bc3);};}function removeListener(_0x75e9f1,_0x9d14d3){return function(){SmsQueueEvents['removeListener'](_0x75e9f1,_0x9d14d3);};}exports[_0x412d('0x3')]=function(_0x290479){for(var _0x343f3d=0x0,_0x3f248f=events[_0x412d('0x4')];_0x343f3d<_0x3f248f;_0x343f3d++){var _0x2a5af6=events[_0x343f3d];var _0x593df4=createListener(_0x412d('0x5')+_0x2a5af6,_0x290479);SmsQueueEvents['on'](_0x2a5af6,_0x593df4);}}; \ No newline at end of file diff --git a/server/api/smsQueueReport/index.js b/server/api/smsQueueReport/index.js index 9ea5523..3658853 100644 --- a/server/api/smsQueueReport/index.js +++ b/server/api/smsQueueReport/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x2e35=['/describe','isAuthenticated','describe','/:id','post','create','put','update','destroy','exports','multer','path','express','Router','fs-extra','../../components/auth/service','../../config/environment','index','get'];(function(_0x4914af,_0x29a5f0){var _0x426f32=function(_0x5b6511){while(--_0x5b6511){_0x4914af['push'](_0x4914af['shift']());}};_0x426f32(++_0x29a5f0);}(_0x2e35,0x101));var _0x52e3=function(_0x541598,_0x39eee3){_0x541598=_0x541598-0x0;var _0x4aecb3=_0x2e35[_0x541598];return _0x4aecb3;};'use strict';var multer=require(_0x52e3('0x0'));var util=require('util');var path=require(_0x52e3('0x1'));var timeout=require('connect-timeout');var express=require(_0x52e3('0x2'));var router=express[_0x52e3('0x3')]();var fs_extra=require(_0x52e3('0x4'));var auth=require(_0x52e3('0x5'));var interaction=require('../../components/interaction/service');var config=require(_0x52e3('0x6'));var controller=require('./smsQueueReport.controller');router['get']('/',auth['isAuthenticated'](),controller[_0x52e3('0x7')]);router[_0x52e3('0x8')](_0x52e3('0x9'),auth[_0x52e3('0xa')](),controller[_0x52e3('0xb')]);router[_0x52e3('0x8')](_0x52e3('0xc'),auth[_0x52e3('0xa')](),controller['show']);router[_0x52e3('0xd')]('/',auth[_0x52e3('0xa')](),controller[_0x52e3('0xe')]);router[_0x52e3('0xf')](_0x52e3('0xc'),auth[_0x52e3('0xa')](),controller[_0x52e3('0x10')]);router['delete']('/:id',auth['isAuthenticated'](),controller[_0x52e3('0x11')]);module[_0x52e3('0x12')]=router; \ No newline at end of file +var _0x8c97=['connect-timeout','Router','fs-extra','../../components/auth/service','../../components/interaction/service','./smsQueueReport.controller','get','isAuthenticated','index','describe','/:id','show','post','create','put','exports','multer','util'];(function(_0x3565a4,_0x2d3d96){var _0x567bcc=function(_0x472562){while(--_0x472562){_0x3565a4['push'](_0x3565a4['shift']());}};_0x567bcc(++_0x2d3d96);}(_0x8c97,0x1ae));var _0x78c9=function(_0xfeaca7,_0x141199){_0xfeaca7=_0xfeaca7-0x0;var _0x4fe942=_0x8c97[_0xfeaca7];return _0x4fe942;};'use strict';var multer=require(_0x78c9('0x0'));var util=require(_0x78c9('0x1'));var path=require('path');var timeout=require(_0x78c9('0x2'));var express=require('express');var router=express[_0x78c9('0x3')]();var fs_extra=require(_0x78c9('0x4'));var auth=require(_0x78c9('0x5'));var interaction=require(_0x78c9('0x6'));var config=require('../../config/environment');var controller=require(_0x78c9('0x7'));router[_0x78c9('0x8')]('/',auth[_0x78c9('0x9')](),controller[_0x78c9('0xa')]);router[_0x78c9('0x8')]('/describe',auth[_0x78c9('0x9')](),controller[_0x78c9('0xb')]);router['get'](_0x78c9('0xc'),auth[_0x78c9('0x9')](),controller[_0x78c9('0xd')]);router[_0x78c9('0xe')]('/',auth[_0x78c9('0x9')](),controller[_0x78c9('0xf')]);router[_0x78c9('0x10')](_0x78c9('0xc'),auth[_0x78c9('0x9')](),controller['update']);router['delete'](_0x78c9('0xc'),auth[_0x78c9('0x9')](),controller['destroy']);module[_0x78c9('0x11')]=router; \ No newline at end of file diff --git a/server/api/smsQueueReport/smsQueueReport.attributes.js b/server/api/smsQueueReport/smsQueueReport.attributes.js index db22fc9..6928b41 100644 --- a/server/api/smsQueueReport/smsQueueReport.attributes.js +++ b/server/api/smsQueueReport/smsQueueReport.attributes.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xf812=['sequelize','exports','STRING','DATE','moment'];(function(_0x432a29,_0x129a14){var _0x541a3d=function(_0x29fc78){while(--_0x29fc78){_0x432a29['push'](_0x432a29['shift']());}};_0x541a3d(++_0x129a14);}(_0xf812,0x117));var _0x2f81=function(_0x2d12db,_0x48dde3){_0x2d12db=_0x2d12db-0x0;var _0x1a0354=_0xf812[_0x2d12db];return _0x1a0354;};'use strict';var moment=require(_0x2f81('0x0'));var Sequelize=require(_0x2f81('0x1'));module[_0x2f81('0x2')]={'uniqueid':{'type':Sequelize[_0x2f81('0x3')],'allowNull':![]},'from':{'type':Sequelize['STRING']},'joinAt':{'type':Sequelize[_0x2f81('0x4')]},'leaveAt':{'type':Sequelize[_0x2f81('0x4')]},'acceptAt':{'type':Sequelize[_0x2f81('0x4')]},'exitAt':{'type':Sequelize[_0x2f81('0x4')]},'reason':{'type':Sequelize[_0x2f81('0x3')]}}; \ No newline at end of file +var _0x3304=['STRING','DATE'];(function(_0x26fc81,_0x57fc19){var _0x9feece=function(_0x4344c3){while(--_0x4344c3){_0x26fc81['push'](_0x26fc81['shift']());}};_0x9feece(++_0x57fc19);}(_0x3304,0xc8));var _0x4330=function(_0x205a17,_0x5594ff){_0x205a17=_0x205a17-0x0;var _0x3010cf=_0x3304[_0x205a17];return _0x3010cf;};'use strict';var moment=require('moment');var Sequelize=require('sequelize');module['exports']={'uniqueid':{'type':Sequelize[_0x4330('0x0')],'allowNull':![]},'from':{'type':Sequelize[_0x4330('0x0')]},'joinAt':{'type':Sequelize[_0x4330('0x1')]},'leaveAt':{'type':Sequelize[_0x4330('0x1')]},'acceptAt':{'type':Sequelize['DATE']},'exitAt':{'type':Sequelize[_0x4330('0x1')]},'reason':{'type':Sequelize[_0x4330('0x0')]}}; \ No newline at end of file diff --git a/server/api/smsQueueReport/smsQueueReport.controller.js b/server/api/smsQueueReport/smsQueueReport.controller.js index 73f8e7f..641527a 100644 --- a/server/api/smsQueueReport/smsQueueReport.controller.js +++ b/server/api/smsQueueReport/smsQueueReport.controller.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xe94a=['offset','limit','count','status','set','json','apply','update','then','destroy','error','name','map','SmsQueueReport','rawAttributes','fieldName','model','query','filters','intersection','attributes','fields','length','hasOwnProperty','order','sort','where','filter','merge','type','VIRTUAL','options','includeAll','include','findAll','rows','catch','params','keys','find','create','body','describe','zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','util','sox','to-csv','ejs','crypto','jsforce','querystring','papaparse','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/logger','api','../../config/utils','../../mysqldb','sendStatus','end'];(function(_0x1c0c43,_0x40065d){var _0x3832df=function(_0x51a5f1){while(--_0x51a5f1){_0x1c0c43['push'](_0x1c0c43['shift']());}};_0x3832df(++_0x40065d);}(_0xe94a,0x1b7));var _0xae94=function(_0x44b7d6,_0x4a3f3f){_0x44b7d6=_0x44b7d6-0x0;var _0x5346f0=_0xe94a[_0x44b7d6];return _0x5346f0;};'use strict';var emlformat=require('eml-format');var rimraf=require('rimraf');var zipdir=require(_0xae94('0x0'));var jsonpatch=require(_0xae94('0x1'));var rp=require(_0xae94('0x2'));var moment=require(_0xae94('0x3'));var BPromise=require(_0xae94('0x4'));var Mustache=require(_0xae94('0x5'));var util=require(_0xae94('0x6'));var path=require('path');var sox=require(_0xae94('0x7'));var csv=require(_0xae94('0x8'));var ejs=require(_0xae94('0x9'));var fs=require('fs');var fs_extra=require('fs-extra');var _=require('lodash');var squel=require('squel');var crypto=require(_0xae94('0xa'));var jsforce=require(_0xae94('0xb'));var deskjs=require('desk.js');var toCsv=require('to-csv');var querystring=require(_0xae94('0xc'));var Papa=require(_0xae94('0xd'));var Redis=require('ioredis');var authService=require(_0xae94('0xe'));var qs=require(_0xae94('0xf'));var as=require(_0xae94('0x10'));var hardwareService=require('../../config/license/hardware');var logger=require(_0xae94('0x11'))(_0xae94('0x12'));var utils=require(_0xae94('0x13'));var config=require('../../config/environment');var licenseUtil=require('../../config/license/util');var db=require(_0xae94('0x14'))['db'];function respondWithStatusCode(_0x2b4c8b,_0x4e1b2b){_0x4e1b2b=_0x4e1b2b||0xcc;return function(_0x5ba623){if(_0x5ba623){return _0x2b4c8b[_0xae94('0x15')](_0x4e1b2b);}return _0x2b4c8b['status'](_0x4e1b2b)[_0xae94('0x16')]();};}function respondWithResult(_0x3073c2,_0x16a281){_0x16a281=_0x16a281||0xc8;return function(_0x5da175){if(_0x5da175){return _0x3073c2['status'](_0x16a281)['json'](_0x5da175);}};}function respondWithFilteredResult(_0x5080ef,_0x3eb8a4){return function(_0x219294){if(_0x219294){var _0x415908=typeof _0x3eb8a4[_0xae94('0x17')]==='undefined'&&typeof _0x3eb8a4[_0xae94('0x18')]==='undefined';var _0x147dae=_0x219294['count'];var _0x37f43d=_0x415908?0x0:_0x3eb8a4['offset'];var _0x63ce42=_0x415908?_0x219294[_0xae94('0x19')]:_0x3eb8a4['offset']+_0x3eb8a4[_0xae94('0x18')];var _0x468553;if(_0x63ce42>=_0x147dae){_0x63ce42=_0x147dae;_0x468553=0xc8;}else{_0x468553=0xce;}_0x5080ef[_0xae94('0x1a')](_0x468553);return _0x5080ef[_0xae94('0x1b')]('Content-Range',_0x37f43d+'-'+_0x63ce42+'/'+_0x147dae)[_0xae94('0x1c')](_0x219294);}return null;};}function patchUpdates(_0x43724f){return function(_0x44ed32){try{jsonpatch[_0xae94('0x1d')](_0x44ed32,_0x43724f,!![]);}catch(_0x107737){return BPromise['reject'](_0x107737);}return _0x44ed32['save']();};}function saveUpdates(_0x2ebf69,_0xa9ab25){return function(_0x2867c2){if(_0x2867c2){return _0x2867c2[_0xae94('0x1e')](_0x2ebf69)[_0xae94('0x1f')](function(_0x45e8ce){return _0x45e8ce;});}return null;};}function removeEntity(_0x2283b5,_0x4c4ab7){return function(_0x525691){if(_0x525691){return _0x525691[_0xae94('0x20')]()[_0xae94('0x1f')](function(){_0x2283b5['status'](0xcc)[_0xae94('0x16')]();});}};}function handleEntityNotFound(_0x10eb98,_0x4b7c40){return function(_0x4d1a73){if(!_0x4d1a73){_0x10eb98[_0xae94('0x15')](0x194);}return _0x4d1a73;};}function handleError(_0x23cc56,_0x5dfdad){_0x5dfdad=_0x5dfdad||0x1f4;return function(_0x522cd1){logger[_0xae94('0x21')](_0x522cd1['stack']);if(_0x522cd1[_0xae94('0x22')]){delete _0x522cd1[_0xae94('0x22')];}_0x23cc56[_0xae94('0x1a')](_0x5dfdad)['send'](_0x522cd1);};}exports['index']=function(_0x4325a4,_0x57babe){var _0x4d1841={},_0x10a5b1={},_0x35b299={'count':0x0,'rows':[]};var _0x3a9129=_[_0xae94('0x23')](db[_0xae94('0x24')][_0xae94('0x25')],function(_0x329701){return{'name':_0x329701[_0xae94('0x26')],'type':_0x329701['type']['key']};});_0x10a5b1[_0xae94('0x27')]=_[_0xae94('0x23')](_0x3a9129,_0xae94('0x22'));_0x10a5b1[_0xae94('0x28')]=_['keys'](_0x4325a4[_0xae94('0x28')]);_0x10a5b1[_0xae94('0x29')]=_[_0xae94('0x2a')](_0x10a5b1['model'],_0x10a5b1['query']);_0x4d1841[_0xae94('0x2b')]=_[_0xae94('0x2a')](_0x10a5b1['model'],qs[_0xae94('0x2c')](_0x4325a4['query']['fields']));_0x4d1841[_0xae94('0x2b')]=_0x4d1841[_0xae94('0x2b')][_0xae94('0x2d')]?_0x4d1841[_0xae94('0x2b')]:_0x10a5b1[_0xae94('0x27')];if(!_0x4325a4['query'][_0xae94('0x2e')]('nolimit')){_0x4d1841[_0xae94('0x18')]=qs[_0xae94('0x18')](_0x4325a4[_0xae94('0x28')][_0xae94('0x18')]);_0x4d1841['offset']=qs[_0xae94('0x17')](_0x4325a4[_0xae94('0x28')][_0xae94('0x17')]);}_0x4d1841[_0xae94('0x2f')]=qs['sort'](_0x4325a4['query'][_0xae94('0x30')]);_0x4d1841[_0xae94('0x31')]=qs[_0xae94('0x29')](_['pick'](_0x4325a4[_0xae94('0x28')],_0x10a5b1[_0xae94('0x29')]),_0x3a9129);if(_0x4325a4[_0xae94('0x28')][_0xae94('0x32')]){_0x4d1841[_0xae94('0x31')]=_[_0xae94('0x33')](_0x4d1841['where'],{'$or':_[_0xae94('0x23')](_0x3a9129,function(_0x18db9c){if(_0x18db9c[_0xae94('0x34')]!==_0xae94('0x35')){var _0x586b10={};_0x586b10[_0x18db9c[_0xae94('0x22')]]={'$like':'%'+_0x4325a4['query'][_0xae94('0x32')]+'%'};return _0x586b10;}})});}_0x4d1841=_['merge']({},_0x4d1841,_0x4325a4[_0xae94('0x36')]);var _0x126f76={'where':_0x4d1841[_0xae94('0x31')]};return db['SmsQueueReport'][_0xae94('0x19')](_0x126f76)[_0xae94('0x1f')](function(_0x4e6128){_0x35b299[_0xae94('0x19')]=_0x4e6128;if(_0x4325a4[_0xae94('0x28')][_0xae94('0x37')]){_0x4d1841[_0xae94('0x38')]=[{'all':!![]}];}return db[_0xae94('0x24')][_0xae94('0x39')](_0x4d1841);})[_0xae94('0x1f')](function(_0xc744ce){_0x35b299[_0xae94('0x3a')]=_0xc744ce;return _0x35b299;})[_0xae94('0x1f')](respondWithFilteredResult(_0x57babe,_0x4d1841))[_0xae94('0x3b')](handleError(_0x57babe,null));};exports['show']=function(_0x31e802,_0x4620fb){var _0x5292f3={'raw':!![],'where':{'id':_0x31e802[_0xae94('0x3c')]['id']}},_0x29570e={};_0x29570e['model']=_[_0xae94('0x3d')](db[_0xae94('0x24')][_0xae94('0x25')]);_0x29570e[_0xae94('0x28')]=_[_0xae94('0x3d')](_0x31e802['query']);_0x29570e[_0xae94('0x29')]=_['intersection'](_0x29570e[_0xae94('0x27')],_0x29570e[_0xae94('0x28')]);_0x5292f3['attributes']=_[_0xae94('0x2a')](_0x29570e[_0xae94('0x27')],qs[_0xae94('0x2c')](_0x31e802[_0xae94('0x28')][_0xae94('0x2c')]));_0x5292f3[_0xae94('0x2b')]=_0x5292f3[_0xae94('0x2b')][_0xae94('0x2d')]?_0x5292f3[_0xae94('0x2b')]:_0x29570e[_0xae94('0x27')];if(_0x31e802[_0xae94('0x28')][_0xae94('0x37')]){_0x5292f3[_0xae94('0x38')]=[{'all':!![]}];}_0x5292f3=_[_0xae94('0x33')]({},_0x5292f3,_0x31e802[_0xae94('0x36')]);return db[_0xae94('0x24')][_0xae94('0x3e')](_0x5292f3)[_0xae94('0x1f')](handleEntityNotFound(_0x4620fb,null))[_0xae94('0x1f')](respondWithResult(_0x4620fb,null))[_0xae94('0x3b')](handleError(_0x4620fb,null));};exports[_0xae94('0x3f')]=function(_0x1639b6,_0x503666){return db[_0xae94('0x24')]['create'](_0x1639b6[_0xae94('0x40')],{})[_0xae94('0x1f')](respondWithResult(_0x503666,0xc9))[_0xae94('0x3b')](handleError(_0x503666,null));};exports[_0xae94('0x1e')]=function(_0x11de9e,_0x5af1c3){if(_0x11de9e['body']['id']){delete _0x11de9e[_0xae94('0x40')]['id'];}return db[_0xae94('0x24')]['find']({'where':{'id':_0x11de9e[_0xae94('0x3c')]['id']}})['then'](handleEntityNotFound(_0x5af1c3,null))['then'](saveUpdates(_0x11de9e[_0xae94('0x40')],null))[_0xae94('0x1f')](respondWithResult(_0x5af1c3,null))['catch'](handleError(_0x5af1c3,null));};exports[_0xae94('0x20')]=function(_0x4dbf70,_0x32aa08){return db[_0xae94('0x24')][_0xae94('0x3e')]({'where':{'id':_0x4dbf70[_0xae94('0x3c')]['id']}})[_0xae94('0x1f')](handleEntityNotFound(_0x32aa08,null))[_0xae94('0x1f')](removeEntity(_0x32aa08,null))[_0xae94('0x3b')](handleError(_0x32aa08,null));};exports[_0xae94('0x41')]=function(_0x571660,_0x367b5f){return db[_0xae94('0x24')][_0xae94('0x41')]()[_0xae94('0x1f')](respondWithResult(_0x367b5f,null))['catch'](handleError(_0x367b5f,null));}; \ No newline at end of file +var _0x8d5a=['filter','merge','VIRTUAL','options','includeAll','include','rows','catch','show','params','create','body','find','describe','eml-format','rimraf','zip-dir','fast-json-patch','moment','mustache','util','to-csv','ejs','fs-extra','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/logger','api','../../config/utils','../../config/environment','../../config/license/util','status','end','json','offset','limit','undefined','count','set','Content-Range','apply','reject','save','update','then','destroy','sendStatus','error','name','index','map','SmsQueueReport','fieldName','type','key','model','query','keys','filters','intersection','attributes','fields','length','hasOwnProperty','nolimit','order','where','pick'];(function(_0xa148b7,_0x2f3eb2){var _0x51efd3=function(_0x34bcec){while(--_0x34bcec){_0xa148b7['push'](_0xa148b7['shift']());}};_0x51efd3(++_0x2f3eb2);}(_0x8d5a,0x1be));var _0xa8d5=function(_0x4243a3,_0x447337){_0x4243a3=_0x4243a3-0x0;var _0x1b2a33=_0x8d5a[_0x4243a3];return _0x1b2a33;};'use strict';var emlformat=require(_0xa8d5('0x0'));var rimraf=require(_0xa8d5('0x1'));var zipdir=require(_0xa8d5('0x2'));var jsonpatch=require(_0xa8d5('0x3'));var rp=require('request-promise');var moment=require(_0xa8d5('0x4'));var BPromise=require('bluebird');var Mustache=require(_0xa8d5('0x5'));var util=require(_0xa8d5('0x6'));var path=require('path');var sox=require('sox');var csv=require(_0xa8d5('0x7'));var ejs=require(_0xa8d5('0x8'));var fs=require('fs');var fs_extra=require(_0xa8d5('0x9'));var _=require('lodash');var squel=require('squel');var crypto=require('crypto');var jsforce=require('jsforce');var deskjs=require('desk.js');var toCsv=require(_0xa8d5('0x7'));var querystring=require(_0xa8d5('0xa'));var Papa=require(_0xa8d5('0xb'));var Redis=require(_0xa8d5('0xc'));var authService=require(_0xa8d5('0xd'));var qs=require(_0xa8d5('0xe'));var as=require(_0xa8d5('0xf'));var hardwareService=require('../../config/license/hardware');var logger=require(_0xa8d5('0x10'))(_0xa8d5('0x11'));var utils=require(_0xa8d5('0x12'));var config=require(_0xa8d5('0x13'));var licenseUtil=require(_0xa8d5('0x14'));var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0x51446a,_0x5f5cb7){_0x5f5cb7=_0x5f5cb7||0xcc;return function(_0x5ab037){if(_0x5ab037){return _0x51446a['sendStatus'](_0x5f5cb7);}return _0x51446a[_0xa8d5('0x15')](_0x5f5cb7)[_0xa8d5('0x16')]();};}function respondWithResult(_0x2d1785,_0x5739fa){_0x5739fa=_0x5739fa||0xc8;return function(_0x276217){if(_0x276217){return _0x2d1785[_0xa8d5('0x15')](_0x5739fa)[_0xa8d5('0x17')](_0x276217);}};}function respondWithFilteredResult(_0x3bf6a4,_0x1121ee){return function(_0x3d3661){if(_0x3d3661){var _0x55be32=typeof _0x1121ee[_0xa8d5('0x18')]==='undefined'&&typeof _0x1121ee[_0xa8d5('0x19')]===_0xa8d5('0x1a');var _0x7e23fc=_0x3d3661['count'];var _0x51c204=_0x55be32?0x0:_0x1121ee[_0xa8d5('0x18')];var _0x3c1235=_0x55be32?_0x3d3661[_0xa8d5('0x1b')]:_0x1121ee[_0xa8d5('0x18')]+_0x1121ee['limit'];var _0x1acbc6;if(_0x3c1235>=_0x7e23fc){_0x3c1235=_0x7e23fc;_0x1acbc6=0xc8;}else{_0x1acbc6=0xce;}_0x3bf6a4[_0xa8d5('0x15')](_0x1acbc6);return _0x3bf6a4[_0xa8d5('0x1c')](_0xa8d5('0x1d'),_0x51c204+'-'+_0x3c1235+'/'+_0x7e23fc)[_0xa8d5('0x17')](_0x3d3661);}return null;};}function patchUpdates(_0x4b2331){return function(_0x4f02c9){try{jsonpatch[_0xa8d5('0x1e')](_0x4f02c9,_0x4b2331,!![]);}catch(_0x2089c1){return BPromise[_0xa8d5('0x1f')](_0x2089c1);}return _0x4f02c9[_0xa8d5('0x20')]();};}function saveUpdates(_0x4459a4,_0x4f67fc){return function(_0x3fc651){if(_0x3fc651){return _0x3fc651[_0xa8d5('0x21')](_0x4459a4)[_0xa8d5('0x22')](function(_0x341827){return _0x341827;});}return null;};}function removeEntity(_0xe49838,_0x46dadd){return function(_0x44a20c){if(_0x44a20c){return _0x44a20c[_0xa8d5('0x23')]()[_0xa8d5('0x22')](function(){_0xe49838[_0xa8d5('0x15')](0xcc)[_0xa8d5('0x16')]();});}};}function handleEntityNotFound(_0x5ce878,_0x576012){return function(_0x4d7a7a){if(!_0x4d7a7a){_0x5ce878[_0xa8d5('0x24')](0x194);}return _0x4d7a7a;};}function handleError(_0x32a6f9,_0x2280e6){_0x2280e6=_0x2280e6||0x1f4;return function(_0x1899b6){logger[_0xa8d5('0x25')](_0x1899b6['stack']);if(_0x1899b6[_0xa8d5('0x26')]){delete _0x1899b6[_0xa8d5('0x26')];}_0x32a6f9[_0xa8d5('0x15')](_0x2280e6)['send'](_0x1899b6);};}exports[_0xa8d5('0x27')]=function(_0x19760e,_0x3dcefc){var _0x97927d={},_0x246641={},_0x45fdf0={'count':0x0,'rows':[]};var _0x57dca4=_[_0xa8d5('0x28')](db[_0xa8d5('0x29')]['rawAttributes'],function(_0x1161a7){return{'name':_0x1161a7[_0xa8d5('0x2a')],'type':_0x1161a7[_0xa8d5('0x2b')][_0xa8d5('0x2c')]};});_0x246641[_0xa8d5('0x2d')]=_['map'](_0x57dca4,_0xa8d5('0x26'));_0x246641[_0xa8d5('0x2e')]=_[_0xa8d5('0x2f')](_0x19760e[_0xa8d5('0x2e')]);_0x246641[_0xa8d5('0x30')]=_[_0xa8d5('0x31')](_0x246641[_0xa8d5('0x2d')],_0x246641['query']);_0x97927d[_0xa8d5('0x32')]=_[_0xa8d5('0x31')](_0x246641[_0xa8d5('0x2d')],qs[_0xa8d5('0x33')](_0x19760e[_0xa8d5('0x2e')][_0xa8d5('0x33')]));_0x97927d[_0xa8d5('0x32')]=_0x97927d[_0xa8d5('0x32')][_0xa8d5('0x34')]?_0x97927d[_0xa8d5('0x32')]:_0x246641[_0xa8d5('0x2d')];if(!_0x19760e[_0xa8d5('0x2e')][_0xa8d5('0x35')](_0xa8d5('0x36'))){_0x97927d[_0xa8d5('0x19')]=qs[_0xa8d5('0x19')](_0x19760e[_0xa8d5('0x2e')][_0xa8d5('0x19')]);_0x97927d[_0xa8d5('0x18')]=qs[_0xa8d5('0x18')](_0x19760e[_0xa8d5('0x2e')][_0xa8d5('0x18')]);}_0x97927d[_0xa8d5('0x37')]=qs['sort'](_0x19760e['query']['sort']);_0x97927d[_0xa8d5('0x38')]=qs['filters'](_[_0xa8d5('0x39')](_0x19760e[_0xa8d5('0x2e')],_0x246641[_0xa8d5('0x30')]),_0x57dca4);if(_0x19760e[_0xa8d5('0x2e')][_0xa8d5('0x3a')]){_0x97927d['where']=_[_0xa8d5('0x3b')](_0x97927d[_0xa8d5('0x38')],{'$or':_['map'](_0x57dca4,function(_0x30f68a){if(_0x30f68a[_0xa8d5('0x2b')]!==_0xa8d5('0x3c')){var _0x20e924={};_0x20e924[_0x30f68a['name']]={'$like':'%'+_0x19760e['query']['filter']+'%'};return _0x20e924;}})});}_0x97927d=_[_0xa8d5('0x3b')]({},_0x97927d,_0x19760e[_0xa8d5('0x3d')]);var _0x590164={'where':_0x97927d['where']};return db['SmsQueueReport'][_0xa8d5('0x1b')](_0x590164)['then'](function(_0x5aa210){_0x45fdf0['count']=_0x5aa210;if(_0x19760e[_0xa8d5('0x2e')][_0xa8d5('0x3e')]){_0x97927d[_0xa8d5('0x3f')]=[{'all':!![]}];}return db[_0xa8d5('0x29')]['findAll'](_0x97927d);})[_0xa8d5('0x22')](function(_0x17c05f){_0x45fdf0[_0xa8d5('0x40')]=_0x17c05f;return _0x45fdf0;})[_0xa8d5('0x22')](respondWithFilteredResult(_0x3dcefc,_0x97927d))[_0xa8d5('0x41')](handleError(_0x3dcefc,null));};exports[_0xa8d5('0x42')]=function(_0xbf31b4,_0x217221){var _0x546eaf={'raw':!![],'where':{'id':_0xbf31b4[_0xa8d5('0x43')]['id']}},_0x2ef934={};_0x2ef934[_0xa8d5('0x2d')]=_['keys'](db[_0xa8d5('0x29')]['rawAttributes']);_0x2ef934[_0xa8d5('0x2e')]=_[_0xa8d5('0x2f')](_0xbf31b4[_0xa8d5('0x2e')]);_0x2ef934[_0xa8d5('0x30')]=_[_0xa8d5('0x31')](_0x2ef934['model'],_0x2ef934[_0xa8d5('0x2e')]);_0x546eaf['attributes']=_[_0xa8d5('0x31')](_0x2ef934[_0xa8d5('0x2d')],qs[_0xa8d5('0x33')](_0xbf31b4['query'][_0xa8d5('0x33')]));_0x546eaf[_0xa8d5('0x32')]=_0x546eaf[_0xa8d5('0x32')][_0xa8d5('0x34')]?_0x546eaf[_0xa8d5('0x32')]:_0x2ef934['model'];if(_0xbf31b4[_0xa8d5('0x2e')]['includeAll']){_0x546eaf[_0xa8d5('0x3f')]=[{'all':!![]}];}_0x546eaf=_['merge']({},_0x546eaf,_0xbf31b4[_0xa8d5('0x3d')]);return db['SmsQueueReport']['find'](_0x546eaf)[_0xa8d5('0x22')](handleEntityNotFound(_0x217221,null))[_0xa8d5('0x22')](respondWithResult(_0x217221,null))['catch'](handleError(_0x217221,null));};exports[_0xa8d5('0x44')]=function(_0xd591d3,_0x1633e5){return db[_0xa8d5('0x29')][_0xa8d5('0x44')](_0xd591d3[_0xa8d5('0x45')],{})[_0xa8d5('0x22')](respondWithResult(_0x1633e5,0xc9))['catch'](handleError(_0x1633e5,null));};exports['update']=function(_0x24d69,_0x4eb427){if(_0x24d69[_0xa8d5('0x45')]['id']){delete _0x24d69[_0xa8d5('0x45')]['id'];}return db['SmsQueueReport']['find']({'where':{'id':_0x24d69['params']['id']}})[_0xa8d5('0x22')](handleEntityNotFound(_0x4eb427,null))['then'](saveUpdates(_0x24d69[_0xa8d5('0x45')],null))[_0xa8d5('0x22')](respondWithResult(_0x4eb427,null))[_0xa8d5('0x41')](handleError(_0x4eb427,null));};exports[_0xa8d5('0x23')]=function(_0xb674a,_0x573f86){return db[_0xa8d5('0x29')][_0xa8d5('0x46')]({'where':{'id':_0xb674a['params']['id']}})[_0xa8d5('0x22')](handleEntityNotFound(_0x573f86,null))[_0xa8d5('0x22')](removeEntity(_0x573f86,null))[_0xa8d5('0x41')](handleError(_0x573f86,null));};exports[_0xa8d5('0x47')]=function(_0x5c6a2c,_0x409181){return db['SmsQueueReport'][_0xa8d5('0x47')]()[_0xa8d5('0x22')](respondWithResult(_0x409181,null))[_0xa8d5('0x41')](handleError(_0x409181,null));}; \ No newline at end of file diff --git a/server/api/smsQueueReport/smsQueueReport.model.js b/server/api/smsQueueReport/smsQueueReport.model.js index cb9597b..0123319 100644 --- a/server/api/smsQueueReport/smsQueueReport.model.js +++ b/server/api/smsQueueReport/smsQueueReport.model.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xe706=['../../config/logger','moment','bluebird','request-promise','path','rimraf','../../config/environment','./smsQueueReport.attributes','exports','define','SmsQueueReport','report_sms_queue','uniqueid','lodash','util'];(function(_0x284d70,_0x4e5330){var _0x5a40f8=function(_0x5507e7){while(--_0x5507e7){_0x284d70['push'](_0x284d70['shift']());}};_0x5a40f8(++_0x4e5330);}(_0xe706,0xa3));var _0x6e70=function(_0x4864f0,_0x5da8c5){_0x4864f0=_0x4864f0-0x0;var _0x55445a=_0xe706[_0x4864f0];return _0x55445a;};'use strict';var _=require(_0x6e70('0x0'));var util=require(_0x6e70('0x1'));var logger=require(_0x6e70('0x2'))('api');var moment=require(_0x6e70('0x3'));var BPromise=require(_0x6e70('0x4'));var rp=require(_0x6e70('0x5'));var fs=require('fs');var path=require(_0x6e70('0x6'));var rimraf=require(_0x6e70('0x7'));var config=require(_0x6e70('0x8'));var attributes=require(_0x6e70('0x9'));module[_0x6e70('0xa')]=function(_0x1b0389,_0x4381d1){return _0x1b0389[_0x6e70('0xb')](_0x6e70('0xc'),attributes,{'tableName':_0x6e70('0xd'),'paranoid':![],'indexes':[{'name':_0x6e70('0xe'),'fields':[_0x6e70('0xe')]}],'timestamps':!![]});}; \ No newline at end of file +var _0x0713=['../../config/logger','api','moment','bluebird','request-promise','rimraf','../../config/environment','./smsQueueReport.attributes','exports','define','SmsQueueReport','report_sms_queue','uniqueid'];(function(_0x550e29,_0x4047f){var _0x3515b6=function(_0x303fe2){while(--_0x303fe2){_0x550e29['push'](_0x550e29['shift']());}};_0x3515b6(++_0x4047f);}(_0x0713,0x1ba));var _0x3071=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0x0713[_0x3dd15e];return _0x231fd0;};'use strict';var _=require('lodash');var util=require('util');var logger=require(_0x3071('0x0'))(_0x3071('0x1'));var moment=require(_0x3071('0x2'));var BPromise=require(_0x3071('0x3'));var rp=require(_0x3071('0x4'));var fs=require('fs');var path=require('path');var rimraf=require(_0x3071('0x5'));var config=require(_0x3071('0x6'));var attributes=require(_0x3071('0x7'));module[_0x3071('0x8')]=function(_0xabd7b6,_0x41cf76){return _0xabd7b6[_0x3071('0x9')](_0x3071('0xa'),attributes,{'tableName':_0x3071('0xb'),'paranoid':![],'indexes':[{'name':_0x3071('0xc'),'fields':[_0x3071('0xc')]}],'timestamps':!![]});}; \ No newline at end of file diff --git a/server/api/smsQueueReport/smsQueueReport.rpc.js b/server/api/smsQueueReport/smsQueueReport.rpc.js index b986042..d704a8f 100644 --- a/server/api/smsQueueReport/smsQueueReport.rpc.js +++ b/server/api/smsQueueReport/smsQueueReport.rpc.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x06e9=['SmsQueueReport,\x20%s,\x20%s,\x20%s','stringify','error','code','SmsQueueReport,\x20%s,\x20%s','message','result','catch','CreateSmsQueueReport','SmsQueueReport','create','body','options','then','UpdateSmsQueueReport','update','raw','where','attributes','limit','lodash','util','moment','../../mysqldb','../../config/utils','../../config/logger','rpc','jayson/promise','client','info','request\x20sent','debug'];(function(_0x501510,_0x61caa9){var _0x1e6ee5=function(_0x32845b){while(--_0x32845b){_0x501510['push'](_0x501510['shift']());}};_0x1e6ee5(++_0x61caa9);}(_0x06e9,0xb4));var _0x906e=function(_0x288f5e,_0x205edd){_0x288f5e=_0x288f5e-0x0;var _0x476cc9=_0x06e9[_0x288f5e];return _0x476cc9;};'use strict';var _=require(_0x906e('0x0'));var util=require(_0x906e('0x1'));var moment=require(_0x906e('0x2'));var BPromise=require('bluebird');var rs=require('randomstring');var fs=require('fs');var Redis=require('ioredis');var db=require(_0x906e('0x3'))['db'];var utils=require(_0x906e('0x4'));var logger=require(_0x906e('0x5'))(_0x906e('0x6'));var config=require('../../config/environment');var jayson=require(_0x906e('0x7'));var client=jayson[_0x906e('0x8')]['http']({'port':0x232a});function respondWithRpcPromise(_0x1a8f14,_0x3d1e60,_0x23ea54){return new BPromise(function(_0x4a6c00,_0x406836){return client['request'](_0x1a8f14,_0x23ea54)['then'](function(_0x1b8754){logger[_0x906e('0x9')]('SmsQueueReport,\x20%s,\x20%s',_0x3d1e60,_0x906e('0xa'));logger[_0x906e('0xb')](_0x906e('0xc'),_0x3d1e60,_0x906e('0xa'),JSON[_0x906e('0xd')](_0x1b8754));if(_0x1b8754[_0x906e('0xe')]){if(_0x1b8754['error'][_0x906e('0xf')]===0x1f4){logger[_0x906e('0xe')](_0x906e('0x10'),_0x3d1e60,_0x1b8754[_0x906e('0xe')][_0x906e('0x11')]);return _0x406836(_0x1b8754[_0x906e('0xe')][_0x906e('0x11')]);}logger[_0x906e('0xe')](_0x906e('0x10'),_0x3d1e60,_0x1b8754[_0x906e('0xe')][_0x906e('0x11')]);return _0x4a6c00(_0x1b8754[_0x906e('0xe')][_0x906e('0x11')]);}else{logger['info']('SmsQueueReport,\x20%s,\x20%s',_0x3d1e60,'request\x20sent');_0x4a6c00(_0x1b8754[_0x906e('0x12')][_0x906e('0x11')]);}})[_0x906e('0x13')](function(_0x140ad0){logger[_0x906e('0xe')](_0x906e('0x10'),_0x3d1e60,_0x140ad0);_0x406836(_0x140ad0);});});}exports[_0x906e('0x14')]=function(_0x32634a){var _0x5685da=this;return new Promise(function(_0x5467ac,_0x458312){return db[_0x906e('0x15')][_0x906e('0x16')](_0x32634a[_0x906e('0x17')],{'raw':_0x32634a[_0x906e('0x18')]?_0x32634a[_0x906e('0x18')]['raw']===undefined?!![]:![]:!![]})[_0x906e('0x19')](function(_0x2ce6de){logger[_0x906e('0x9')](_0x906e('0x14'),_0x32634a);logger[_0x906e('0xb')]('CreateSmsQueueReport',_0x32634a,JSON['stringify'](_0x2ce6de));_0x5467ac(_0x2ce6de);})[_0x906e('0x13')](function(_0x14e1e3){logger[_0x906e('0xe')](_0x906e('0x14'),_0x14e1e3['message'],_0x32634a);_0x458312(_0x5685da[_0x906e('0xe')](0x1f4,_0x14e1e3[_0x906e('0x11')]));});});};exports[_0x906e('0x1a')]=function(_0x346485){var _0x531495=this;return new Promise(function(_0x1368c6,_0x112d04){return db['SmsQueueReport'][_0x906e('0x1b')](_0x346485['body'],{'raw':_0x346485[_0x906e('0x18')]?_0x346485[_0x906e('0x18')][_0x906e('0x1c')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x346485['options']?_0x346485[_0x906e('0x18')][_0x906e('0x1d')]||null:null,'attributes':_0x346485[_0x906e('0x18')]?_0x346485[_0x906e('0x18')][_0x906e('0x1e')]||null:null,'limit':_0x346485[_0x906e('0x18')]?_0x346485[_0x906e('0x18')][_0x906e('0x1f')]||null:null})[_0x906e('0x19')](function(_0x15de63){logger['info']('UpdateSmsQueueReport',_0x346485);logger[_0x906e('0xb')](_0x906e('0x1a'),_0x346485,JSON[_0x906e('0xd')](_0x15de63));_0x1368c6(_0x15de63);})[_0x906e('0x13')](function(_0x3917f2){logger['error'](_0x906e('0x1a'),_0x3917f2[_0x906e('0x11')],_0x346485);_0x112d04(_0x531495[_0x906e('0xe')](0x1f4,_0x3917f2[_0x906e('0x11')]));});});}; \ No newline at end of file +var _0x547e=['moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','request','then','info','SmsQueueReport,\x20%s,\x20%s','request\x20sent','debug','stringify','error','code','message','result','catch','SmsQueueReport','body','options','CreateSmsQueueReport','UpdateSmsQueueReport','update','raw','where','attributes','lodash','util'];(function(_0x526676,_0x48c3e2){var _0x3638fa=function(_0x11c28a){while(--_0x11c28a){_0x526676['push'](_0x526676['shift']());}};_0x3638fa(++_0x48c3e2);}(_0x547e,0x1a2));var _0xe547=function(_0x34b880,_0x39fc3d){_0x34b880=_0x34b880-0x0;var _0x56a45e=_0x547e[_0x34b880];return _0x56a45e;};'use strict';var _=require(_0xe547('0x0'));var util=require(_0xe547('0x1'));var moment=require(_0xe547('0x2'));var BPromise=require(_0xe547('0x3'));var rs=require(_0xe547('0x4'));var fs=require('fs');var Redis=require(_0xe547('0x5'));var db=require(_0xe547('0x6'))['db'];var utils=require(_0xe547('0x7'));var logger=require(_0xe547('0x8'))(_0xe547('0x9'));var config=require(_0xe547('0xa'));var jayson=require(_0xe547('0xb'));var client=jayson[_0xe547('0xc')][_0xe547('0xd')]({'port':0x232a});function respondWithRpcPromise(_0x55cafb,_0x5b05a9,_0xd42e3){return new BPromise(function(_0xf66a0b,_0x3d3aa1){return client[_0xe547('0xe')](_0x55cafb,_0xd42e3)[_0xe547('0xf')](function(_0x33cb95){logger[_0xe547('0x10')](_0xe547('0x11'),_0x5b05a9,_0xe547('0x12'));logger[_0xe547('0x13')]('SmsQueueReport,\x20%s,\x20%s,\x20%s',_0x5b05a9,_0xe547('0x12'),JSON[_0xe547('0x14')](_0x33cb95));if(_0x33cb95[_0xe547('0x15')]){if(_0x33cb95[_0xe547('0x15')][_0xe547('0x16')]===0x1f4){logger[_0xe547('0x15')](_0xe547('0x11'),_0x5b05a9,_0x33cb95[_0xe547('0x15')][_0xe547('0x17')]);return _0x3d3aa1(_0x33cb95['error']['message']);}logger[_0xe547('0x15')](_0xe547('0x11'),_0x5b05a9,_0x33cb95[_0xe547('0x15')][_0xe547('0x17')]);return _0xf66a0b(_0x33cb95[_0xe547('0x15')][_0xe547('0x17')]);}else{logger[_0xe547('0x10')]('SmsQueueReport,\x20%s,\x20%s',_0x5b05a9,_0xe547('0x12'));_0xf66a0b(_0x33cb95[_0xe547('0x18')][_0xe547('0x17')]);}})[_0xe547('0x19')](function(_0xb23007){logger[_0xe547('0x15')](_0xe547('0x11'),_0x5b05a9,_0xb23007);_0x3d3aa1(_0xb23007);});});}exports['CreateSmsQueueReport']=function(_0x3b4a78){var _0xc9305e=this;return new Promise(function(_0x2cda5d,_0x1b3e0b){return db[_0xe547('0x1a')]['create'](_0x3b4a78[_0xe547('0x1b')],{'raw':_0x3b4a78[_0xe547('0x1c')]?_0x3b4a78[_0xe547('0x1c')]['raw']===undefined?!![]:![]:!![]})[_0xe547('0xf')](function(_0x562f35){logger[_0xe547('0x10')](_0xe547('0x1d'),_0x3b4a78);logger[_0xe547('0x13')]('CreateSmsQueueReport',_0x3b4a78,JSON[_0xe547('0x14')](_0x562f35));_0x2cda5d(_0x562f35);})[_0xe547('0x19')](function(_0x4c9dc5){logger[_0xe547('0x15')](_0xe547('0x1d'),_0x4c9dc5[_0xe547('0x17')],_0x3b4a78);_0x1b3e0b(_0xc9305e['error'](0x1f4,_0x4c9dc5[_0xe547('0x17')]));});});};exports[_0xe547('0x1e')]=function(_0x4bcd5d){var _0xea43d4=this;return new Promise(function(_0x477f7b,_0xcd16ed){return db['SmsQueueReport'][_0xe547('0x1f')](_0x4bcd5d['body'],{'raw':_0x4bcd5d[_0xe547('0x1c')]?_0x4bcd5d[_0xe547('0x1c')][_0xe547('0x20')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x4bcd5d[_0xe547('0x1c')]?_0x4bcd5d['options'][_0xe547('0x21')]||null:null,'attributes':_0x4bcd5d[_0xe547('0x1c')]?_0x4bcd5d['options'][_0xe547('0x22')]||null:null,'limit':_0x4bcd5d[_0xe547('0x1c')]?_0x4bcd5d[_0xe547('0x1c')]['limit']||null:null})['then'](function(_0x11ab05){logger['info'](_0xe547('0x1e'),_0x4bcd5d);logger[_0xe547('0x13')]('UpdateSmsQueueReport',_0x4bcd5d,JSON[_0xe547('0x14')](_0x11ab05));_0x477f7b(_0x11ab05);})[_0xe547('0x19')](function(_0x1560a9){logger[_0xe547('0x15')](_0xe547('0x1e'),_0x1560a9[_0xe547('0x17')],_0x4bcd5d);_0xcd16ed(_0xea43d4[_0xe547('0x15')](0x1f4,_0x1560a9['message']));});});}; \ No newline at end of file diff --git a/server/api/smsTransferReport/index.js b/server/api/smsTransferReport/index.js index a242ed8..0e6119a 100644 --- a/server/api/smsTransferReport/index.js +++ b/server/api/smsTransferReport/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x2123=['../../components/interaction/service','../../config/environment','./smsTransferReport.controller','get','index','/describe','describe','/:id','isAuthenticated','show','post','put','update','delete','destroy','exports','multer','util','path','connect-timeout','express','Router','fs-extra','../../components/auth/service'];(function(_0x5c1c7b,_0x2df4c2){var _0x17e650=function(_0x386d80){while(--_0x386d80){_0x5c1c7b['push'](_0x5c1c7b['shift']());}};_0x17e650(++_0x2df4c2);}(_0x2123,0x190));var _0x3212=function(_0x1a82ad,_0x28fc69){_0x1a82ad=_0x1a82ad-0x0;var _0x247f25=_0x2123[_0x1a82ad];return _0x247f25;};'use strict';var multer=require(_0x3212('0x0'));var util=require(_0x3212('0x1'));var path=require(_0x3212('0x2'));var timeout=require(_0x3212('0x3'));var express=require(_0x3212('0x4'));var router=express[_0x3212('0x5')]();var fs_extra=require(_0x3212('0x6'));var auth=require(_0x3212('0x7'));var interaction=require(_0x3212('0x8'));var config=require(_0x3212('0x9'));var controller=require(_0x3212('0xa'));router[_0x3212('0xb')]('/',auth['isAuthenticated'](),controller[_0x3212('0xc')]);router[_0x3212('0xb')](_0x3212('0xd'),auth['isAuthenticated'](),controller[_0x3212('0xe')]);router['get'](_0x3212('0xf'),auth[_0x3212('0x10')](),controller[_0x3212('0x11')]);router[_0x3212('0x12')]('/',auth['isAuthenticated'](),controller['create']);router[_0x3212('0x13')](_0x3212('0xf'),auth[_0x3212('0x10')](),controller[_0x3212('0x14')]);router[_0x3212('0x15')](_0x3212('0xf'),auth[_0x3212('0x10')](),controller[_0x3212('0x16')]);module[_0x3212('0x17')]=router; \ No newline at end of file +var _0x31c2=['connect-timeout','express','Router','fs-extra','../../components/auth/service','./smsTransferReport.controller','get','isAuthenticated','index','/describe','describe','/:id','show','post','create','put','delete','destroy','exports','multer','util','path'];(function(_0x42bc91,_0x41f40a){var _0x3f5507=function(_0x20cfaf){while(--_0x20cfaf){_0x42bc91['push'](_0x42bc91['shift']());}};_0x3f5507(++_0x41f40a);}(_0x31c2,0x1e1));var _0x231c=function(_0x29b29f,_0x93d8ae){_0x29b29f=_0x29b29f-0x0;var _0x763c39=_0x31c2[_0x29b29f];return _0x763c39;};'use strict';var multer=require(_0x231c('0x0'));var util=require(_0x231c('0x1'));var path=require(_0x231c('0x2'));var timeout=require(_0x231c('0x3'));var express=require(_0x231c('0x4'));var router=express[_0x231c('0x5')]();var fs_extra=require(_0x231c('0x6'));var auth=require(_0x231c('0x7'));var interaction=require('../../components/interaction/service');var config=require('../../config/environment');var controller=require(_0x231c('0x8'));router[_0x231c('0x9')]('/',auth[_0x231c('0xa')](),controller[_0x231c('0xb')]);router['get'](_0x231c('0xc'),auth['isAuthenticated'](),controller[_0x231c('0xd')]);router[_0x231c('0x9')](_0x231c('0xe'),auth['isAuthenticated'](),controller[_0x231c('0xf')]);router[_0x231c('0x10')]('/',auth[_0x231c('0xa')](),controller[_0x231c('0x11')]);router[_0x231c('0x12')](_0x231c('0xe'),auth[_0x231c('0xa')](),controller['update']);router[_0x231c('0x13')](_0x231c('0xe'),auth['isAuthenticated'](),controller[_0x231c('0x14')]);module[_0x231c('0x15')]=router; \ No newline at end of file diff --git a/server/api/smsTransferReport/smsTransferReport.attributes.js b/server/api/smsTransferReport/smsTransferReport.attributes.js index 7242a78..2f70dba 100644 --- a/server/api/smsTransferReport/smsTransferReport.attributes.js +++ b/server/api/smsTransferReport/smsTransferReport.attributes.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xedd9=['account','agent','queue','NOW','sequelize','exports','STRING','ENUM'];(function(_0x1d261c,_0x3bce30){var _0x423f36=function(_0x3fc0b0){while(--_0x3fc0b0){_0x1d261c['push'](_0x1d261c['shift']());}};_0x423f36(++_0x3bce30);}(_0xedd9,0xfc));var _0x9edd=function(_0x255c5c,_0x3f16d2){_0x255c5c=_0x255c5c-0x0;var _0x39d1c1=_0xedd9[_0x255c5c];return _0x39d1c1;};'use strict';var moment=require('moment');var Sequelize=require(_0x9edd('0x0'));module[_0x9edd('0x1')]={'uniqueid':{'type':Sequelize[_0x9edd('0x2')],'allowNull':![]},'type':{'type':Sequelize[_0x9edd('0x3')](_0x9edd('0x4'),_0x9edd('0x5'),_0x9edd('0x6')),'allowNull':![],'defaultValue':_0x9edd('0x6')},'transferredAt':{'type':Sequelize['DATE'],'allowNull':![],'defaultValue':Sequelize[_0x9edd('0x7')]}}; \ No newline at end of file +var _0xaa88=['account','agent','queue','DATE','NOW','moment','sequelize','exports','STRING'];(function(_0x8bada6,_0x5a4dd1){var _0x483b3b=function(_0x8d0a34){while(--_0x8d0a34){_0x8bada6['push'](_0x8bada6['shift']());}};_0x483b3b(++_0x5a4dd1);}(_0xaa88,0x137));var _0x8aa8=function(_0x365e54,_0x44be74){_0x365e54=_0x365e54-0x0;var _0x13317a=_0xaa88[_0x365e54];return _0x13317a;};'use strict';var moment=require(_0x8aa8('0x0'));var Sequelize=require(_0x8aa8('0x1'));module[_0x8aa8('0x2')]={'uniqueid':{'type':Sequelize[_0x8aa8('0x3')],'allowNull':![]},'type':{'type':Sequelize['ENUM'](_0x8aa8('0x4'),_0x8aa8('0x5'),_0x8aa8('0x6')),'allowNull':![],'defaultValue':_0x8aa8('0x6')},'transferredAt':{'type':Sequelize[_0x8aa8('0x7')],'allowNull':![],'defaultValue':Sequelize[_0x8aa8('0x8')]}}; \ No newline at end of file diff --git a/server/api/smsTransferReport/smsTransferReport.controller.js b/server/api/smsTransferReport/smsTransferReport.controller.js index 3a19810..945914b 100644 --- a/server/api/smsTransferReport/smsTransferReport.controller.js +++ b/server/api/smsTransferReport/smsTransferReport.controller.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x086a=['length','hasOwnProperty','nolimit','sort','where','filter','merge','VIRTUAL','options','then','SmsTransferReport','findAll','rows','catch','show','includeAll','create','body','find','params','describe','request-promise','moment','bluebird','mustache','util','path','sox','to-csv','ejs','fs-extra','lodash','squel','crypto','jsforce','desk.js','querystring','papaparse','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/utils','../../config/environment','../../config/license/util','sendStatus','end','status','json','undefined','limit','offset','count','set','Content-Range','apply','reject','update','destroy','error','stack','name','send','index','map','rawAttributes','fieldName','type','model','keys','query','filters','intersection','fields','attributes'];(function(_0x569716,_0x2d4086){var _0x377206=function(_0x39ac6a){while(--_0x39ac6a){_0x569716['push'](_0x569716['shift']());}};_0x377206(++_0x2d4086);}(_0x086a,0x182));var _0xa086=function(_0x5d415e,_0x5f3cc4){_0x5d415e=_0x5d415e-0x0;var _0x19b8e1=_0x086a[_0x5d415e];return _0x19b8e1;};'use strict';var emlformat=require('eml-format');var rimraf=require('rimraf');var zipdir=require('zip-dir');var jsonpatch=require('fast-json-patch');var rp=require(_0xa086('0x0'));var moment=require(_0xa086('0x1'));var BPromise=require(_0xa086('0x2'));var Mustache=require(_0xa086('0x3'));var util=require(_0xa086('0x4'));var path=require(_0xa086('0x5'));var sox=require(_0xa086('0x6'));var csv=require(_0xa086('0x7'));var ejs=require(_0xa086('0x8'));var fs=require('fs');var fs_extra=require(_0xa086('0x9'));var _=require(_0xa086('0xa'));var squel=require(_0xa086('0xb'));var crypto=require(_0xa086('0xc'));var jsforce=require(_0xa086('0xd'));var deskjs=require(_0xa086('0xe'));var toCsv=require(_0xa086('0x7'));var querystring=require(_0xa086('0xf'));var Papa=require(_0xa086('0x10'));var Redis=require('ioredis');var authService=require('../../components/auth/service');var qs=require(_0xa086('0x11'));var as=require(_0xa086('0x12'));var hardwareService=require('../../config/license/hardware');var logger=require('../../config/logger')('api');var utils=require(_0xa086('0x13'));var config=require(_0xa086('0x14'));var licenseUtil=require(_0xa086('0x15'));var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0x3ae2ce,_0x3a3d8a){_0x3a3d8a=_0x3a3d8a||0xcc;return function(_0x365891){if(_0x365891){return _0x3ae2ce[_0xa086('0x16')](_0x3a3d8a);}return _0x3ae2ce['status'](_0x3a3d8a)[_0xa086('0x17')]();};}function respondWithResult(_0x218089,_0x2cbdcf){_0x2cbdcf=_0x2cbdcf||0xc8;return function(_0xcf5720){if(_0xcf5720){return _0x218089[_0xa086('0x18')](_0x2cbdcf)[_0xa086('0x19')](_0xcf5720);}};}function respondWithFilteredResult(_0x4e99eb,_0x297b1a){return function(_0x5718dc){if(_0x5718dc){var _0x50a843=typeof _0x297b1a['offset']===_0xa086('0x1a')&&typeof _0x297b1a[_0xa086('0x1b')]===_0xa086('0x1a');var _0x186775=_0x5718dc['count'];var _0x2c826f=_0x50a843?0x0:_0x297b1a[_0xa086('0x1c')];var _0x5f5cc9=_0x50a843?_0x5718dc[_0xa086('0x1d')]:_0x297b1a['offset']+_0x297b1a['limit'];var _0x1d5d20;if(_0x5f5cc9>=_0x186775){_0x5f5cc9=_0x186775;_0x1d5d20=0xc8;}else{_0x1d5d20=0xce;}_0x4e99eb['status'](_0x1d5d20);return _0x4e99eb[_0xa086('0x1e')](_0xa086('0x1f'),_0x2c826f+'-'+_0x5f5cc9+'/'+_0x186775)['json'](_0x5718dc);}return null;};}function patchUpdates(_0x5dcd05){return function(_0x4d65d4){try{jsonpatch[_0xa086('0x20')](_0x4d65d4,_0x5dcd05,!![]);}catch(_0x1c49ab){return BPromise[_0xa086('0x21')](_0x1c49ab);}return _0x4d65d4['save']();};}function saveUpdates(_0x2b7e85,_0x2e1a0f){return function(_0x51ac47){if(_0x51ac47){return _0x51ac47[_0xa086('0x22')](_0x2b7e85)['then'](function(_0x1431ee){return _0x1431ee;});}return null;};}function removeEntity(_0x156183,_0x9e3f08){return function(_0x5334cf){if(_0x5334cf){return _0x5334cf[_0xa086('0x23')]()['then'](function(){_0x156183['status'](0xcc)[_0xa086('0x17')]();});}};}function handleEntityNotFound(_0x158d9e,_0x288adb){return function(_0x14549b){if(!_0x14549b){_0x158d9e['sendStatus'](0x194);}return _0x14549b;};}function handleError(_0x26de21,_0x1a45b0){_0x1a45b0=_0x1a45b0||0x1f4;return function(_0x1ade39){logger[_0xa086('0x24')](_0x1ade39[_0xa086('0x25')]);if(_0x1ade39[_0xa086('0x26')]){delete _0x1ade39['name'];}_0x26de21[_0xa086('0x18')](_0x1a45b0)[_0xa086('0x27')](_0x1ade39);};}exports[_0xa086('0x28')]=function(_0x58b951,_0x3aa924){var _0x5d8f3e={},_0x47818c={},_0x1be1c5={'count':0x0,'rows':[]};var _0x8d417=_[_0xa086('0x29')](db['SmsTransferReport'][_0xa086('0x2a')],function(_0x47f99f){return{'name':_0x47f99f[_0xa086('0x2b')],'type':_0x47f99f[_0xa086('0x2c')]['key']};});_0x47818c[_0xa086('0x2d')]=_[_0xa086('0x29')](_0x8d417,_0xa086('0x26'));_0x47818c['query']=_[_0xa086('0x2e')](_0x58b951[_0xa086('0x2f')]);_0x47818c[_0xa086('0x30')]=_[_0xa086('0x31')](_0x47818c[_0xa086('0x2d')],_0x47818c[_0xa086('0x2f')]);_0x5d8f3e['attributes']=_['intersection'](_0x47818c[_0xa086('0x2d')],qs[_0xa086('0x32')](_0x58b951['query'][_0xa086('0x32')]));_0x5d8f3e[_0xa086('0x33')]=_0x5d8f3e[_0xa086('0x33')][_0xa086('0x34')]?_0x5d8f3e[_0xa086('0x33')]:_0x47818c[_0xa086('0x2d')];if(!_0x58b951['query'][_0xa086('0x35')](_0xa086('0x36'))){_0x5d8f3e[_0xa086('0x1b')]=qs['limit'](_0x58b951[_0xa086('0x2f')][_0xa086('0x1b')]);_0x5d8f3e['offset']=qs[_0xa086('0x1c')](_0x58b951[_0xa086('0x2f')][_0xa086('0x1c')]);}_0x5d8f3e['order']=qs[_0xa086('0x37')](_0x58b951[_0xa086('0x2f')]['sort']);_0x5d8f3e[_0xa086('0x38')]=qs['filters'](_['pick'](_0x58b951[_0xa086('0x2f')],_0x47818c[_0xa086('0x30')]),_0x8d417);if(_0x58b951[_0xa086('0x2f')][_0xa086('0x39')]){_0x5d8f3e[_0xa086('0x38')]=_[_0xa086('0x3a')](_0x5d8f3e['where'],{'$or':_[_0xa086('0x29')](_0x8d417,function(_0x13b7d4){if(_0x13b7d4[_0xa086('0x2c')]!==_0xa086('0x3b')){var _0xc02f98={};_0xc02f98[_0x13b7d4[_0xa086('0x26')]]={'$like':'%'+_0x58b951[_0xa086('0x2f')]['filter']+'%'};return _0xc02f98;}})});}_0x5d8f3e=_['merge']({},_0x5d8f3e,_0x58b951[_0xa086('0x3c')]);var _0x577143={'where':_0x5d8f3e[_0xa086('0x38')]};return db['SmsTransferReport'][_0xa086('0x1d')](_0x577143)[_0xa086('0x3d')](function(_0x856c9e){_0x1be1c5[_0xa086('0x1d')]=_0x856c9e;if(_0x58b951[_0xa086('0x2f')]['includeAll']){_0x5d8f3e['include']=[{'all':!![]}];}return db[_0xa086('0x3e')][_0xa086('0x3f')](_0x5d8f3e);})[_0xa086('0x3d')](function(_0x4b964e){_0x1be1c5[_0xa086('0x40')]=_0x4b964e;return _0x1be1c5;})[_0xa086('0x3d')](respondWithFilteredResult(_0x3aa924,_0x5d8f3e))[_0xa086('0x41')](handleError(_0x3aa924,null));};exports[_0xa086('0x42')]=function(_0x411a20,_0x44d221){var _0x4cf2ad={'raw':!![],'where':{'id':_0x411a20['params']['id']}},_0x4e57bf={};_0x4e57bf[_0xa086('0x2d')]=_[_0xa086('0x2e')](db[_0xa086('0x3e')]['rawAttributes']);_0x4e57bf[_0xa086('0x2f')]=_[_0xa086('0x2e')](_0x411a20[_0xa086('0x2f')]);_0x4e57bf['filters']=_[_0xa086('0x31')](_0x4e57bf['model'],_0x4e57bf[_0xa086('0x2f')]);_0x4cf2ad['attributes']=_['intersection'](_0x4e57bf[_0xa086('0x2d')],qs['fields'](_0x411a20[_0xa086('0x2f')][_0xa086('0x32')]));_0x4cf2ad[_0xa086('0x33')]=_0x4cf2ad['attributes'][_0xa086('0x34')]?_0x4cf2ad[_0xa086('0x33')]:_0x4e57bf['model'];if(_0x411a20['query'][_0xa086('0x43')]){_0x4cf2ad['include']=[{'all':!![]}];}_0x4cf2ad=_[_0xa086('0x3a')]({},_0x4cf2ad,_0x411a20['options']);return db['SmsTransferReport']['find'](_0x4cf2ad)[_0xa086('0x3d')](handleEntityNotFound(_0x44d221,null))[_0xa086('0x3d')](respondWithResult(_0x44d221,null))[_0xa086('0x41')](handleError(_0x44d221,null));};exports['create']=function(_0x2d92d3,_0x14250){return db[_0xa086('0x3e')][_0xa086('0x44')](_0x2d92d3[_0xa086('0x45')],{})[_0xa086('0x3d')](respondWithResult(_0x14250,0xc9))[_0xa086('0x41')](handleError(_0x14250,null));};exports[_0xa086('0x22')]=function(_0x37faa6,_0x35e934){if(_0x37faa6[_0xa086('0x45')]['id']){delete _0x37faa6[_0xa086('0x45')]['id'];}return db[_0xa086('0x3e')][_0xa086('0x46')]({'where':{'id':_0x37faa6[_0xa086('0x47')]['id']}})[_0xa086('0x3d')](handleEntityNotFound(_0x35e934,null))[_0xa086('0x3d')](saveUpdates(_0x37faa6[_0xa086('0x45')],null))['then'](respondWithResult(_0x35e934,null))['catch'](handleError(_0x35e934,null));};exports['destroy']=function(_0x319001,_0x26dff7){return db[_0xa086('0x3e')][_0xa086('0x46')]({'where':{'id':_0x319001['params']['id']}})['then'](handleEntityNotFound(_0x26dff7,null))[_0xa086('0x3d')](removeEntity(_0x26dff7,null))[_0xa086('0x41')](handleError(_0x26dff7,null));};exports[_0xa086('0x48')]=function(_0x591cab,_0x4b3060){return db['SmsTransferReport'][_0xa086('0x48')]()['then'](respondWithResult(_0x4b3060,null))[_0xa086('0x41')](handleError(_0x4b3060,null));}; \ No newline at end of file +var _0x1020=['update','then','destroy','stack','name','send','index','map','rawAttributes','fieldName','type','key','query','keys','filters','intersection','attributes','fields','length','model','hasOwnProperty','nolimit','order','sort','where','pick','filter','merge','VIRTUAL','options','SmsTransferReport','includeAll','findAll','rows','catch','show','params','include','find','create','body','describe','zip-dir','request-promise','moment','mustache','util','path','sox','ejs','fs-extra','squel','crypto','jsforce','desk.js','to-csv','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','sendStatus','end','status','json','offset','undefined','limit','count','set','reject','save'];(function(_0x8a2e9d,_0xa7a01c){var _0xf64cdd=function(_0x491bd2){while(--_0x491bd2){_0x8a2e9d['push'](_0x8a2e9d['shift']());}};_0xf64cdd(++_0xa7a01c);}(_0x1020,0x78));var _0x0102=function(_0x1ebeea,_0x2f54f4){_0x1ebeea=_0x1ebeea-0x0;var _0x576465=_0x1020[_0x1ebeea];return _0x576465;};'use strict';var emlformat=require('eml-format');var rimraf=require('rimraf');var zipdir=require(_0x0102('0x0'));var jsonpatch=require('fast-json-patch');var rp=require(_0x0102('0x1'));var moment=require(_0x0102('0x2'));var BPromise=require('bluebird');var Mustache=require(_0x0102('0x3'));var util=require(_0x0102('0x4'));var path=require(_0x0102('0x5'));var sox=require(_0x0102('0x6'));var csv=require('to-csv');var ejs=require(_0x0102('0x7'));var fs=require('fs');var fs_extra=require(_0x0102('0x8'));var _=require('lodash');var squel=require(_0x0102('0x9'));var crypto=require(_0x0102('0xa'));var jsforce=require(_0x0102('0xb'));var deskjs=require(_0x0102('0xc'));var toCsv=require(_0x0102('0xd'));var querystring=require('querystring');var Papa=require(_0x0102('0xe'));var Redis=require(_0x0102('0xf'));var authService=require(_0x0102('0x10'));var qs=require(_0x0102('0x11'));var as=require(_0x0102('0x12'));var hardwareService=require(_0x0102('0x13'));var logger=require(_0x0102('0x14'))('api');var utils=require(_0x0102('0x15'));var config=require(_0x0102('0x16'));var licenseUtil=require(_0x0102('0x17'));var db=require(_0x0102('0x18'))['db'];function respondWithStatusCode(_0x306211,_0x9d4aab){_0x9d4aab=_0x9d4aab||0xcc;return function(_0x2a7516){if(_0x2a7516){return _0x306211[_0x0102('0x19')](_0x9d4aab);}return _0x306211['status'](_0x9d4aab)[_0x0102('0x1a')]();};}function respondWithResult(_0x7e4359,_0x57cb95){_0x57cb95=_0x57cb95||0xc8;return function(_0x2ede8b){if(_0x2ede8b){return _0x7e4359[_0x0102('0x1b')](_0x57cb95)[_0x0102('0x1c')](_0x2ede8b);}};}function respondWithFilteredResult(_0x936682,_0x26e707){return function(_0x5271e9){if(_0x5271e9){var _0x3f48ba=typeof _0x26e707[_0x0102('0x1d')]===_0x0102('0x1e')&&typeof _0x26e707[_0x0102('0x1f')]==='undefined';var _0x13f333=_0x5271e9[_0x0102('0x20')];var _0x247b74=_0x3f48ba?0x0:_0x26e707[_0x0102('0x1d')];var _0x1fc613=_0x3f48ba?_0x5271e9[_0x0102('0x20')]:_0x26e707[_0x0102('0x1d')]+_0x26e707['limit'];var _0x2f2434;if(_0x1fc613>=_0x13f333){_0x1fc613=_0x13f333;_0x2f2434=0xc8;}else{_0x2f2434=0xce;}_0x936682['status'](_0x2f2434);return _0x936682[_0x0102('0x21')]('Content-Range',_0x247b74+'-'+_0x1fc613+'/'+_0x13f333)['json'](_0x5271e9);}return null;};}function patchUpdates(_0x3d0090){return function(_0x2898fd){try{jsonpatch['apply'](_0x2898fd,_0x3d0090,!![]);}catch(_0x27e370){return BPromise[_0x0102('0x22')](_0x27e370);}return _0x2898fd[_0x0102('0x23')]();};}function saveUpdates(_0x119289,_0x2bf30f){return function(_0x447699){if(_0x447699){return _0x447699[_0x0102('0x24')](_0x119289)[_0x0102('0x25')](function(_0x411b09){return _0x411b09;});}return null;};}function removeEntity(_0x45567c,_0x5273ff){return function(_0x23f9bc){if(_0x23f9bc){return _0x23f9bc[_0x0102('0x26')]()[_0x0102('0x25')](function(){_0x45567c[_0x0102('0x1b')](0xcc)['end']();});}};}function handleEntityNotFound(_0x4d4862,_0xe8714){return function(_0x16e575){if(!_0x16e575){_0x4d4862['sendStatus'](0x194);}return _0x16e575;};}function handleError(_0x4b0cdb,_0x57607a){_0x57607a=_0x57607a||0x1f4;return function(_0xed3846){logger['error'](_0xed3846[_0x0102('0x27')]);if(_0xed3846['name']){delete _0xed3846[_0x0102('0x28')];}_0x4b0cdb[_0x0102('0x1b')](_0x57607a)[_0x0102('0x29')](_0xed3846);};}exports[_0x0102('0x2a')]=function(_0x2d2906,_0x591c78){var _0x11bc6f={},_0x13314c={},_0x384f87={'count':0x0,'rows':[]};var _0x466ea2=_[_0x0102('0x2b')](db['SmsTransferReport'][_0x0102('0x2c')],function(_0x30b0d6){return{'name':_0x30b0d6[_0x0102('0x2d')],'type':_0x30b0d6[_0x0102('0x2e')][_0x0102('0x2f')]};});_0x13314c['model']=_[_0x0102('0x2b')](_0x466ea2,_0x0102('0x28'));_0x13314c[_0x0102('0x30')]=_[_0x0102('0x31')](_0x2d2906[_0x0102('0x30')]);_0x13314c[_0x0102('0x32')]=_[_0x0102('0x33')](_0x13314c['model'],_0x13314c[_0x0102('0x30')]);_0x11bc6f[_0x0102('0x34')]=_[_0x0102('0x33')](_0x13314c['model'],qs['fields'](_0x2d2906[_0x0102('0x30')][_0x0102('0x35')]));_0x11bc6f[_0x0102('0x34')]=_0x11bc6f[_0x0102('0x34')][_0x0102('0x36')]?_0x11bc6f[_0x0102('0x34')]:_0x13314c[_0x0102('0x37')];if(!_0x2d2906[_0x0102('0x30')][_0x0102('0x38')](_0x0102('0x39'))){_0x11bc6f['limit']=qs[_0x0102('0x1f')](_0x2d2906[_0x0102('0x30')]['limit']);_0x11bc6f[_0x0102('0x1d')]=qs['offset'](_0x2d2906[_0x0102('0x30')][_0x0102('0x1d')]);}_0x11bc6f[_0x0102('0x3a')]=qs['sort'](_0x2d2906[_0x0102('0x30')][_0x0102('0x3b')]);_0x11bc6f[_0x0102('0x3c')]=qs[_0x0102('0x32')](_[_0x0102('0x3d')](_0x2d2906[_0x0102('0x30')],_0x13314c[_0x0102('0x32')]),_0x466ea2);if(_0x2d2906['query'][_0x0102('0x3e')]){_0x11bc6f['where']=_[_0x0102('0x3f')](_0x11bc6f[_0x0102('0x3c')],{'$or':_[_0x0102('0x2b')](_0x466ea2,function(_0x54134e){if(_0x54134e[_0x0102('0x2e')]!==_0x0102('0x40')){var _0x18f1a6={};_0x18f1a6[_0x54134e['name']]={'$like':'%'+_0x2d2906[_0x0102('0x30')][_0x0102('0x3e')]+'%'};return _0x18f1a6;}})});}_0x11bc6f=_[_0x0102('0x3f')]({},_0x11bc6f,_0x2d2906[_0x0102('0x41')]);var _0x580929={'where':_0x11bc6f[_0x0102('0x3c')]};return db[_0x0102('0x42')][_0x0102('0x20')](_0x580929)['then'](function(_0x52ea06){_0x384f87[_0x0102('0x20')]=_0x52ea06;if(_0x2d2906[_0x0102('0x30')][_0x0102('0x43')]){_0x11bc6f['include']=[{'all':!![]}];}return db['SmsTransferReport'][_0x0102('0x44')](_0x11bc6f);})[_0x0102('0x25')](function(_0x3aa64b){_0x384f87[_0x0102('0x45')]=_0x3aa64b;return _0x384f87;})['then'](respondWithFilteredResult(_0x591c78,_0x11bc6f))[_0x0102('0x46')](handleError(_0x591c78,null));};exports[_0x0102('0x47')]=function(_0x1f5e81,_0x5d3dee){var _0x3d8848={'raw':!![],'where':{'id':_0x1f5e81[_0x0102('0x48')]['id']}},_0x3db0e5={};_0x3db0e5[_0x0102('0x37')]=_[_0x0102('0x31')](db['SmsTransferReport']['rawAttributes']);_0x3db0e5['query']=_[_0x0102('0x31')](_0x1f5e81[_0x0102('0x30')]);_0x3db0e5['filters']=_[_0x0102('0x33')](_0x3db0e5['model'],_0x3db0e5[_0x0102('0x30')]);_0x3d8848[_0x0102('0x34')]=_[_0x0102('0x33')](_0x3db0e5[_0x0102('0x37')],qs[_0x0102('0x35')](_0x1f5e81['query'][_0x0102('0x35')]));_0x3d8848['attributes']=_0x3d8848[_0x0102('0x34')][_0x0102('0x36')]?_0x3d8848[_0x0102('0x34')]:_0x3db0e5['model'];if(_0x1f5e81[_0x0102('0x30')]['includeAll']){_0x3d8848[_0x0102('0x49')]=[{'all':!![]}];}_0x3d8848=_[_0x0102('0x3f')]({},_0x3d8848,_0x1f5e81[_0x0102('0x41')]);return db['SmsTransferReport'][_0x0102('0x4a')](_0x3d8848)['then'](handleEntityNotFound(_0x5d3dee,null))[_0x0102('0x25')](respondWithResult(_0x5d3dee,null))[_0x0102('0x46')](handleError(_0x5d3dee,null));};exports[_0x0102('0x4b')]=function(_0xc4da1d,_0x1dde9a){return db[_0x0102('0x42')][_0x0102('0x4b')](_0xc4da1d[_0x0102('0x4c')],{})[_0x0102('0x25')](respondWithResult(_0x1dde9a,0xc9))[_0x0102('0x46')](handleError(_0x1dde9a,null));};exports[_0x0102('0x24')]=function(_0x1ae4b5,_0x2e2342){if(_0x1ae4b5[_0x0102('0x4c')]['id']){delete _0x1ae4b5['body']['id'];}return db['SmsTransferReport'][_0x0102('0x4a')]({'where':{'id':_0x1ae4b5[_0x0102('0x48')]['id']}})['then'](handleEntityNotFound(_0x2e2342,null))['then'](saveUpdates(_0x1ae4b5['body'],null))[_0x0102('0x25')](respondWithResult(_0x2e2342,null))[_0x0102('0x46')](handleError(_0x2e2342,null));};exports['destroy']=function(_0x42b8ef,_0x1cd772){return db['SmsTransferReport'][_0x0102('0x4a')]({'where':{'id':_0x42b8ef[_0x0102('0x48')]['id']}})['then'](handleEntityNotFound(_0x1cd772,null))[_0x0102('0x25')](removeEntity(_0x1cd772,null))[_0x0102('0x46')](handleError(_0x1cd772,null));};exports[_0x0102('0x4d')]=function(_0x311667,_0x359487){return db[_0x0102('0x42')][_0x0102('0x4d')]()[_0x0102('0x25')](respondWithResult(_0x359487,null))['catch'](handleError(_0x359487,null));}; \ No newline at end of file diff --git a/server/api/smsTransferReport/smsTransferReport.model.js b/server/api/smsTransferReport/smsTransferReport.model.js index 9fc227c..33dd575 100644 --- a/server/api/smsTransferReport/smsTransferReport.model.js +++ b/server/api/smsTransferReport/smsTransferReport.model.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x46e0=['bluebird','request-promise','path','rimraf','../../config/environment','./smsTransferReport.attributes','exports','define','uniqueid','lodash','util','../../config/logger','api'];(function(_0x1e8b97,_0x38739a){var _0x358f11=function(_0x45d9c8){while(--_0x45d9c8){_0x1e8b97['push'](_0x1e8b97['shift']());}};_0x358f11(++_0x38739a);}(_0x46e0,0x1c3));var _0x046e=function(_0x5c7838,_0x5327a3){_0x5c7838=_0x5c7838-0x0;var _0x1d8966=_0x46e0[_0x5c7838];return _0x1d8966;};'use strict';var _=require(_0x046e('0x0'));var util=require(_0x046e('0x1'));var logger=require(_0x046e('0x2'))(_0x046e('0x3'));var moment=require('moment');var BPromise=require(_0x046e('0x4'));var rp=require(_0x046e('0x5'));var fs=require('fs');var path=require(_0x046e('0x6'));var rimraf=require(_0x046e('0x7'));var config=require(_0x046e('0x8'));var attributes=require(_0x046e('0x9'));module[_0x046e('0xa')]=function(_0x44fa8d,_0x27e01d){return _0x44fa8d[_0x046e('0xb')]('SmsTransferReport',attributes,{'tableName':'report_sms_transfer','paranoid':![],'indexes':[{'name':_0x046e('0xc'),'fields':['uniqueid']}],'timestamps':!![]});}; \ No newline at end of file +var _0x0970=['api','moment','bluebird','path','../../config/environment','./smsTransferReport.attributes','define','SmsTransferReport','report_sms_transfer','uniqueid','util','../../config/logger'];(function(_0x40a045,_0x516f0e){var _0x1a687c=function(_0x48c9fe){while(--_0x48c9fe){_0x40a045['push'](_0x40a045['shift']());}};_0x1a687c(++_0x516f0e);}(_0x0970,0x11e));var _0x0097=function(_0x122ef9,_0x451d2a){_0x122ef9=_0x122ef9-0x0;var _0x42fba0=_0x0970[_0x122ef9];return _0x42fba0;};'use strict';var _=require('lodash');var util=require(_0x0097('0x0'));var logger=require(_0x0097('0x1'))(_0x0097('0x2'));var moment=require(_0x0097('0x3'));var BPromise=require(_0x0097('0x4'));var rp=require('request-promise');var fs=require('fs');var path=require(_0x0097('0x5'));var rimraf=require('rimraf');var config=require(_0x0097('0x6'));var attributes=require(_0x0097('0x7'));module['exports']=function(_0x2293dc,_0x187da0){return _0x2293dc[_0x0097('0x8')](_0x0097('0x9'),attributes,{'tableName':_0x0097('0xa'),'paranoid':![],'indexes':[{'name':_0x0097('0xb'),'fields':['uniqueid']}],'timestamps':!![]});}; \ No newline at end of file diff --git a/server/api/smsTransferReport/smsTransferReport.rpc.js b/server/api/smsTransferReport/smsTransferReport.rpc.js index d928ede..6bfadfc 100644 --- a/server/api/smsTransferReport/smsTransferReport.rpc.js +++ b/server/api/smsTransferReport/smsTransferReport.rpc.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xac9d=['bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','rpc','jayson/promise','client','http','then','info','SmsTransferReport,\x20%s,\x20%s','request\x20sent','debug','SmsTransferReport,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','catch','lodash','util','moment'];(function(_0x28e823,_0xc06e9a){var _0x73ab45=function(_0x199bd2){while(--_0x199bd2){_0x28e823['push'](_0x28e823['shift']());}};_0x73ab45(++_0xc06e9a);}(_0xac9d,0x14d));var _0xdac9=function(_0x29bb0a,_0x4a49e6){_0x29bb0a=_0x29bb0a-0x0;var _0x1725e4=_0xac9d[_0x29bb0a];return _0x1725e4;};'use strict';var _=require(_0xdac9('0x0'));var util=require(_0xdac9('0x1'));var moment=require(_0xdac9('0x2'));var BPromise=require(_0xdac9('0x3'));var rs=require(_0xdac9('0x4'));var fs=require('fs');var Redis=require(_0xdac9('0x5'));var db=require(_0xdac9('0x6'))['db'];var utils=require(_0xdac9('0x7'));var logger=require('../../config/logger')(_0xdac9('0x8'));var config=require('../../config/environment');var jayson=require(_0xdac9('0x9'));var client=jayson[_0xdac9('0xa')][_0xdac9('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x776b6c,_0x1c78c5,_0x39f560){return new BPromise(function(_0x5531af,_0x2b1d6f){return client['request'](_0x776b6c,_0x39f560)[_0xdac9('0xc')](function(_0x3a013b){logger[_0xdac9('0xd')](_0xdac9('0xe'),_0x1c78c5,_0xdac9('0xf'));logger[_0xdac9('0x10')](_0xdac9('0x11'),_0x1c78c5,_0xdac9('0xf'),JSON[_0xdac9('0x12')](_0x3a013b));if(_0x3a013b['error']){if(_0x3a013b[_0xdac9('0x13')][_0xdac9('0x14')]===0x1f4){logger['error'](_0xdac9('0xe'),_0x1c78c5,_0x3a013b[_0xdac9('0x13')][_0xdac9('0x15')]);return _0x2b1d6f(_0x3a013b['error'][_0xdac9('0x15')]);}logger[_0xdac9('0x13')](_0xdac9('0xe'),_0x1c78c5,_0x3a013b['error']['message']);return _0x5531af(_0x3a013b[_0xdac9('0x13')][_0xdac9('0x15')]);}else{logger['info'](_0xdac9('0xe'),_0x1c78c5,_0xdac9('0xf'));_0x5531af(_0x3a013b[_0xdac9('0x16')][_0xdac9('0x15')]);}})[_0xdac9('0x17')](function(_0x393acc){logger[_0xdac9('0x13')](_0xdac9('0xe'),_0x1c78c5,_0x393acc);_0x2b1d6f(_0x393acc);});});} \ No newline at end of file +var _0xabe8=['result','catch','lodash','util','moment','randomstring','ioredis','../../config/utils','rpc','../../config/environment','jayson/promise','client','http','request','then','debug','SmsTransferReport,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','SmsTransferReport,\x20%s,\x20%s','message','info'];(function(_0xf1c752,_0x4c49eb){var _0x155ff1=function(_0x314017){while(--_0x314017){_0xf1c752['push'](_0xf1c752['shift']());}};_0x155ff1(++_0x4c49eb);}(_0xabe8,0x8c));var _0x8abe=function(_0x4a8359,_0x30ab0d){_0x4a8359=_0x4a8359-0x0;var _0x152188=_0xabe8[_0x4a8359];return _0x152188;};'use strict';var _=require(_0x8abe('0x0'));var util=require(_0x8abe('0x1'));var moment=require(_0x8abe('0x2'));var BPromise=require('bluebird');var rs=require(_0x8abe('0x3'));var fs=require('fs');var Redis=require(_0x8abe('0x4'));var db=require('../../mysqldb')['db'];var utils=require(_0x8abe('0x5'));var logger=require('../../config/logger')(_0x8abe('0x6'));var config=require(_0x8abe('0x7'));var jayson=require(_0x8abe('0x8'));var client=jayson[_0x8abe('0x9')][_0x8abe('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x4e49d7,_0x57355d,_0x27ebd9){return new BPromise(function(_0xd686ac,_0x45ea69){return client[_0x8abe('0xb')](_0x4e49d7,_0x27ebd9)[_0x8abe('0xc')](function(_0x16e5e9){logger['info']('SmsTransferReport,\x20%s,\x20%s',_0x57355d,'request\x20sent');logger[_0x8abe('0xd')](_0x8abe('0xe'),_0x57355d,_0x8abe('0xf'),JSON[_0x8abe('0x10')](_0x16e5e9));if(_0x16e5e9[_0x8abe('0x11')]){if(_0x16e5e9['error']['code']===0x1f4){logger[_0x8abe('0x11')](_0x8abe('0x12'),_0x57355d,_0x16e5e9[_0x8abe('0x11')][_0x8abe('0x13')]);return _0x45ea69(_0x16e5e9['error']['message']);}logger['error'](_0x8abe('0x12'),_0x57355d,_0x16e5e9['error'][_0x8abe('0x13')]);return _0xd686ac(_0x16e5e9['error'][_0x8abe('0x13')]);}else{logger[_0x8abe('0x14')]('SmsTransferReport,\x20%s,\x20%s',_0x57355d,_0x8abe('0xf'));_0xd686ac(_0x16e5e9[_0x8abe('0x15')][_0x8abe('0x13')]);}})[_0x8abe('0x16')](function(_0x34b2c7){logger[_0x8abe('0x11')](_0x8abe('0x12'),_0x57355d,_0x34b2c7);_0x45ea69(_0x34b2c7);});});} \ No newline at end of file diff --git a/server/api/sound/index.js b/server/api/sound/index.js index 30a10f3..249e6fe 100644 --- a/server/api/sound/index.js +++ b/server/api/sound/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x7f01=['format','basename','extname','now','post','file','create','put','delete','exports','multer','path','express','Router','../../components/auth/service','../../components/interaction/service','../../config/environment','./sound.controller','get','isAuthenticated','index','/:id','show','/:id/download','diskStorage','join','root','server/files/sounds/original/','originalname'];(function(_0x130d82,_0x25f49b){var _0x112070=function(_0x5795ee){while(--_0x5795ee){_0x130d82['push'](_0x130d82['shift']());}};_0x112070(++_0x25f49b);}(_0x7f01,0xd5));var _0x17f0=function(_0x552107,_0x465391){_0x552107=_0x552107-0x0;var _0x1a126a=_0x7f01[_0x552107];return _0x1a126a;};'use strict';var multer=require(_0x17f0('0x0'));var util=require('util');var path=require(_0x17f0('0x1'));var timeout=require('connect-timeout');var express=require(_0x17f0('0x2'));var router=express[_0x17f0('0x3')]();var fs_extra=require('fs-extra');var auth=require(_0x17f0('0x4'));var interaction=require(_0x17f0('0x5'));var config=require(_0x17f0('0x6'));var controller=require(_0x17f0('0x7'));router[_0x17f0('0x8')]('/',auth[_0x17f0('0x9')](),controller[_0x17f0('0xa')]);router['get'](_0x17f0('0xb'),auth[_0x17f0('0x9')](),controller[_0x17f0('0xc')]);router[_0x17f0('0x8')](_0x17f0('0xd'),auth[_0x17f0('0x9')](),controller['download']);var upload=multer({'storage':multer[_0x17f0('0xe')]({'destination':function(_0x523fbc,_0x14cfa5,_0x12fd23){_0x12fd23(null,path[_0x17f0('0xf')](config[_0x17f0('0x10')],_0x17f0('0x11')));},'filename':function(_0x9ac451,_0x2d21ed,_0x21cbe1){_0x2d21ed[_0x17f0('0x12')]=_0x2d21ed[_0x17f0('0x12')]['replace'](/[+@&\/\\#,+()$~%'":*?<>{}\s\\|]/g,'-');_0x21cbe1(null,util[_0x17f0('0x13')]('%s-%s%s',path[_0x17f0('0x14')](_0x2d21ed[_0x17f0('0x12')],path[_0x17f0('0x15')](_0x2d21ed[_0x17f0('0x12')])),Date[_0x17f0('0x16')](),path['extname'](_0x2d21ed['originalname'])));}})});router[_0x17f0('0x17')]('/',upload['single'](_0x17f0('0x18')),controller[_0x17f0('0x19')]);router[_0x17f0('0x1a')](_0x17f0('0xb'),auth[_0x17f0('0x9')](),controller['update']);router[_0x17f0('0x1b')](_0x17f0('0xb'),auth[_0x17f0('0x9')](),controller[_0x17f0('0x1b')]);module[_0x17f0('0x1c')]=router; \ No newline at end of file +var _0x09f1=['update','delete','exports','multer','util','path','connect-timeout','express','Router','../../components/auth/service','../../components/interaction/service','../../config/environment','./sound.controller','get','isAuthenticated','index','/:id','show','/:id/download','diskStorage','join','root','originalname','replace','format','%s-%s%s','basename','extname','post','single','put'];(function(_0x312acf,_0x427334){var _0x1c3f7b=function(_0x27c57a){while(--_0x27c57a){_0x312acf['push'](_0x312acf['shift']());}};_0x1c3f7b(++_0x427334);}(_0x09f1,0x177));var _0x109f=function(_0x3350fd,_0x4bbad4){_0x3350fd=_0x3350fd-0x0;var _0x1740f6=_0x09f1[_0x3350fd];return _0x1740f6;};'use strict';var multer=require(_0x109f('0x0'));var util=require(_0x109f('0x1'));var path=require(_0x109f('0x2'));var timeout=require(_0x109f('0x3'));var express=require(_0x109f('0x4'));var router=express[_0x109f('0x5')]();var fs_extra=require('fs-extra');var auth=require(_0x109f('0x6'));var interaction=require(_0x109f('0x7'));var config=require(_0x109f('0x8'));var controller=require(_0x109f('0x9'));router[_0x109f('0xa')]('/',auth[_0x109f('0xb')](),controller[_0x109f('0xc')]);router[_0x109f('0xa')](_0x109f('0xd'),auth[_0x109f('0xb')](),controller[_0x109f('0xe')]);router['get'](_0x109f('0xf'),auth[_0x109f('0xb')](),controller['download']);var upload=multer({'storage':multer[_0x109f('0x10')]({'destination':function(_0x3c5a65,_0xcab90d,_0x1074c2){_0x1074c2(null,path[_0x109f('0x11')](config[_0x109f('0x12')],'server/files/sounds/original/'));},'filename':function(_0x549e7f,_0x1524d3,_0x3d926c){_0x1524d3[_0x109f('0x13')]=_0x1524d3[_0x109f('0x13')][_0x109f('0x14')](/[+@&\/\\#,+()$~%'":*?<>{}\s\\|]/g,'-');_0x3d926c(null,util[_0x109f('0x15')](_0x109f('0x16'),path[_0x109f('0x17')](_0x1524d3['originalname'],path[_0x109f('0x18')](_0x1524d3[_0x109f('0x13')])),Date['now'](),path['extname'](_0x1524d3[_0x109f('0x13')])));}})});router[_0x109f('0x19')]('/',upload[_0x109f('0x1a')]('file'),controller['create']);router[_0x109f('0x1b')](_0x109f('0xd'),auth[_0x109f('0xb')](),controller[_0x109f('0x1c')]);router[_0x109f('0x1d')](_0x109f('0xd'),auth[_0x109f('0xb')](),controller[_0x109f('0x1d')]);module[_0x109f('0x1e')]=router; \ No newline at end of file diff --git a/server/api/sound/sound.attributes.js b/server/api/sound/sound.attributes.js index 6129592..e3bf183 100644 --- a/server/api/sound/sound.attributes.js +++ b/server/api/sound/sound.attributes.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xb0e1=['INTEGER','exports','STRING','FLOAT','BIGINT'];(function(_0x3616bb,_0x86fe00){var _0x1c0994=function(_0x46a1d4){while(--_0x46a1d4){_0x3616bb['push'](_0x3616bb['shift']());}};_0x1c0994(++_0x86fe00);}(_0xb0e1,0xfb));var _0x1b0e=function(_0x500087,_0x1be102){_0x500087=_0x500087-0x0;var _0x2c2017=_0xb0e1[_0x500087];return _0x2c2017;};'use strict';var Sequelize=require('sequelize');module[_0x1b0e('0x0')]={'name':{'type':Sequelize['STRING'],'unique':'name','allowNull':![]},'save_name':{'type':Sequelize[_0x1b0e('0x1')]},'display_name':{'type':Sequelize[_0x1b0e('0x1')],'defaultValue':''},'description':{'type':Sequelize[_0x1b0e('0x1')]},'original_format':{'type':Sequelize['STRING']},'original_duration':{'type':Sequelize[_0x1b0e('0x2')]},'original_sampleCount':{'type':Sequelize[_0x1b0e('0x3')]},'original_channelCount':{'type':Sequelize[_0x1b0e('0x4')]},'original_bitRate':{'type':Sequelize[_0x1b0e('0x3')]},'original_sampleRate':{'type':Sequelize[_0x1b0e('0x4')]},'converted_format':{'type':Sequelize[_0x1b0e('0x1')]},'converted_duration':{'type':Sequelize[_0x1b0e('0x2')]},'converted_sampleCount':{'type':Sequelize[_0x1b0e('0x3')]},'converted_channelCount':{'type':Sequelize['INTEGER']},'converted_bitRate':{'type':Sequelize[_0x1b0e('0x3')]},'converted_sampleRate':{'type':Sequelize['INTEGER']}}; \ No newline at end of file +var _0x1e26=['sequelize','exports','STRING','name','FLOAT','BIGINT','INTEGER'];(function(_0x2064d9,_0xb788eb){var _0x4d4e55=function(_0x5add5e){while(--_0x5add5e){_0x2064d9['push'](_0x2064d9['shift']());}};_0x4d4e55(++_0xb788eb);}(_0x1e26,0x18f));var _0x61e2=function(_0x5498c4,_0x24233e){_0x5498c4=_0x5498c4-0x0;var _0x2b26d7=_0x1e26[_0x5498c4];return _0x2b26d7;};'use strict';var Sequelize=require(_0x61e2('0x0'));module[_0x61e2('0x1')]={'name':{'type':Sequelize[_0x61e2('0x2')],'unique':_0x61e2('0x3'),'allowNull':![]},'save_name':{'type':Sequelize[_0x61e2('0x2')]},'display_name':{'type':Sequelize[_0x61e2('0x2')],'defaultValue':''},'description':{'type':Sequelize['STRING']},'original_format':{'type':Sequelize['STRING']},'original_duration':{'type':Sequelize[_0x61e2('0x4')]},'original_sampleCount':{'type':Sequelize[_0x61e2('0x5')]},'original_channelCount':{'type':Sequelize[_0x61e2('0x6')]},'original_bitRate':{'type':Sequelize[_0x61e2('0x5')]},'original_sampleRate':{'type':Sequelize['INTEGER']},'converted_format':{'type':Sequelize['STRING']},'converted_duration':{'type':Sequelize['FLOAT']},'converted_sampleCount':{'type':Sequelize[_0x61e2('0x5')]},'converted_channelCount':{'type':Sequelize[_0x61e2('0x6')]},'converted_bitRate':{'type':Sequelize[_0x61e2('0x5')]},'converted_sampleRate':{'type':Sequelize['INTEGER']}}; \ No newline at end of file diff --git a/server/api/sound/sound.controller.js b/server/api/sound/sound.controller.js index e7b76f7..531c3cc 100644 --- a/server/api/sound/sound.controller.js +++ b/server/api/sound/sound.controller.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x5a55=['start','body','delete','eml-format','rimraf','request-promise','moment','bluebird','mustache','util','sox','to-csv','ejs','fs-extra','lodash','squel','crypto','jsforce','desk.js','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../config/license/hardware','api','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','sendStatus','status','json','undefined','count','offset','limit','set','Content-Range','apply','reject','save','update','then','destroy','get','Sounds','error','stack','name','index','map','rawAttributes','fieldName','query','filters','intersection','attributes','model','fields','length','nolimit','order','sort','where','pick','filter','merge','type','options','Sound','includeAll','include','catch','params','keys','find','save_name','converted_format','existsSync','join','server/files/sounds/converted','Sequelize','ValidationError','Sound\x20not\x20found','format','%s.%s','create','file','originalname','extname','basename','filename','substring','wav','server/files/sounds/original','root','info','Sound\x20upload\x20filepath:\x20%s','Sound\x20upload\x20destination:\x20%s','chmodSync','0777','unlinkSync','duration','original_sampleCount','sampleCount','original_channelCount','channelCount','original_bitRate','bitRate','original_sampleRate','sampleRate','converted_duration','converted_sampleCount','converted_channelCount','converted_bitRate','converted_sampleRate','end','role','userProfileId','Unable\x20to\x20retrieve\x20the\x20current\x20user','UserProfileSection','autoAssociation','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s'];(function(_0x558e7a,_0x30a85b){var _0x2099ce=function(_0x95ca7){while(--_0x95ca7){_0x558e7a['push'](_0x558e7a['shift']());}};_0x2099ce(++_0x30a85b);}(_0x5a55,0x7f));var _0x55a5=function(_0x550d12,_0x5384bd){_0x550d12=_0x550d12-0x0;var _0x12103d=_0x5a55[_0x550d12];return _0x12103d;};'use strict';var emlformat=require(_0x55a5('0x0'));var rimraf=require(_0x55a5('0x1'));var zipdir=require('zip-dir');var jsonpatch=require('fast-json-patch');var rp=require(_0x55a5('0x2'));var moment=require(_0x55a5('0x3'));var BPromise=require(_0x55a5('0x4'));var Mustache=require(_0x55a5('0x5'));var util=require(_0x55a5('0x6'));var path=require('path');var sox=require(_0x55a5('0x7'));var csv=require(_0x55a5('0x8'));var ejs=require(_0x55a5('0x9'));var fs=require('fs');var fs_extra=require(_0x55a5('0xa'));var _=require(_0x55a5('0xb'));var squel=require(_0x55a5('0xc'));var crypto=require(_0x55a5('0xd'));var jsforce=require(_0x55a5('0xe'));var deskjs=require(_0x55a5('0xf'));var toCsv=require(_0x55a5('0x8'));var querystring=require(_0x55a5('0x10'));var Papa=require(_0x55a5('0x11'));var Redis=require(_0x55a5('0x12'));var authService=require(_0x55a5('0x13'));var qs=require(_0x55a5('0x14'));var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0x55a5('0x15'));var logger=require('../../config/logger')(_0x55a5('0x16'));var utils=require(_0x55a5('0x17'));var config=require(_0x55a5('0x18'));var licenseUtil=require(_0x55a5('0x19'));var db=require(_0x55a5('0x1a'))['db'];function respondWithStatusCode(_0x54489b,_0x5196c0){_0x5196c0=_0x5196c0||0xcc;return function(_0x1c06c1){if(_0x1c06c1){return _0x54489b[_0x55a5('0x1b')](_0x5196c0);}return _0x54489b[_0x55a5('0x1c')](_0x5196c0)['end']();};}function respondWithResult(_0x503d29,_0xe397e9){_0xe397e9=_0xe397e9||0xc8;return function(_0x26e2b1){if(_0x26e2b1){return _0x503d29[_0x55a5('0x1c')](_0xe397e9)[_0x55a5('0x1d')](_0x26e2b1);}};}function respondWithFilteredResult(_0x5b32e7,_0xa1000f){return function(_0x2a5261){if(_0x2a5261){var _0x28ea69=typeof _0xa1000f['offset']===_0x55a5('0x1e')&&typeof _0xa1000f['limit']===_0x55a5('0x1e');var _0x4fa87d=_0x2a5261[_0x55a5('0x1f')];var _0x170cca=_0x28ea69?0x0:_0xa1000f[_0x55a5('0x20')];var _0x1ee9d9=_0x28ea69?_0x2a5261[_0x55a5('0x1f')]:_0xa1000f[_0x55a5('0x20')]+_0xa1000f[_0x55a5('0x21')];var _0x5f3cee;if(_0x1ee9d9>=_0x4fa87d){_0x1ee9d9=_0x4fa87d;_0x5f3cee=0xc8;}else{_0x5f3cee=0xce;}_0x5b32e7[_0x55a5('0x1c')](_0x5f3cee);return _0x5b32e7[_0x55a5('0x22')](_0x55a5('0x23'),_0x170cca+'-'+_0x1ee9d9+'/'+_0x4fa87d)[_0x55a5('0x1d')](_0x2a5261);}return null;};}function patchUpdates(_0x20814f){return function(_0x16e38c){try{jsonpatch[_0x55a5('0x24')](_0x16e38c,_0x20814f,!![]);}catch(_0x15870e){return BPromise[_0x55a5('0x25')](_0x15870e);}return _0x16e38c[_0x55a5('0x26')]();};}function saveUpdates(_0x7dc35,_0x3a9b0a){return function(_0x5a1dc){if(_0x5a1dc){return _0x5a1dc[_0x55a5('0x27')](_0x7dc35)[_0x55a5('0x28')](function(_0x4fdc0f){return _0x4fdc0f;});}return null;};}function removeEntity(_0x2c11a9,_0x221d70){return function(_0xee6824){if(_0xee6824){return _0xee6824[_0x55a5('0x29')]()[_0x55a5('0x28')](function(){var _0x18e637=_0xee6824[_0x55a5('0x2a')]({'plain':!![]});var _0x1abb21=_0x55a5('0x2b');return db['UserProfileResource']['destroy']({'where':{'type':_0x1abb21,'resourceId':_0x18e637['id']}})[_0x55a5('0x28')](function(){return _0xee6824;});})[_0x55a5('0x28')](function(){_0x2c11a9['status'](0xcc)['end']();});}};}function handleEntityNotFound(_0x4d54af,_0x5c02ef){return function(_0xf48ac2){if(!_0xf48ac2){_0x4d54af[_0x55a5('0x1b')](0x194);}return _0xf48ac2;};}function handleError(_0x9d3e2a,_0xcd197e){_0xcd197e=_0xcd197e||0x1f4;return function(_0x4c1942){logger[_0x55a5('0x2c')](_0x4c1942[_0x55a5('0x2d')]);if(_0x4c1942[_0x55a5('0x2e')]){delete _0x4c1942[_0x55a5('0x2e')];}_0x9d3e2a[_0x55a5('0x1c')](_0xcd197e)['send'](_0x4c1942);};}exports[_0x55a5('0x2f')]=function(_0x4fe3fc,_0x52ceb0){var _0x4299ed={},_0x4e02e7={},_0x2f78fe={'count':0x0,'rows':[]};var _0x412fc7=_[_0x55a5('0x30')](db['Sound'][_0x55a5('0x31')],function(_0x54ddb5){return{'name':_0x54ddb5[_0x55a5('0x32')],'type':_0x54ddb5['type']['key']};});_0x4e02e7['model']=_[_0x55a5('0x30')](_0x412fc7,_0x55a5('0x2e'));_0x4e02e7[_0x55a5('0x33')]=_['keys'](_0x4fe3fc[_0x55a5('0x33')]);_0x4e02e7[_0x55a5('0x34')]=_[_0x55a5('0x35')](_0x4e02e7['model'],_0x4e02e7[_0x55a5('0x33')]);_0x4299ed[_0x55a5('0x36')]=_[_0x55a5('0x35')](_0x4e02e7[_0x55a5('0x37')],qs['fields'](_0x4fe3fc[_0x55a5('0x33')][_0x55a5('0x38')]));_0x4299ed[_0x55a5('0x36')]=_0x4299ed[_0x55a5('0x36')][_0x55a5('0x39')]?_0x4299ed['attributes']:_0x4e02e7[_0x55a5('0x37')];if(!_0x4fe3fc['query']['hasOwnProperty'](_0x55a5('0x3a'))){_0x4299ed[_0x55a5('0x21')]=qs[_0x55a5('0x21')](_0x4fe3fc[_0x55a5('0x33')][_0x55a5('0x21')]);_0x4299ed[_0x55a5('0x20')]=qs[_0x55a5('0x20')](_0x4fe3fc[_0x55a5('0x33')][_0x55a5('0x20')]);}_0x4299ed[_0x55a5('0x3b')]=qs[_0x55a5('0x3c')](_0x4fe3fc[_0x55a5('0x33')][_0x55a5('0x3c')]);_0x4299ed[_0x55a5('0x3d')]=qs[_0x55a5('0x34')](_[_0x55a5('0x3e')](_0x4fe3fc[_0x55a5('0x33')],_0x4e02e7['filters']),_0x412fc7);if(_0x4fe3fc[_0x55a5('0x33')][_0x55a5('0x3f')]){_0x4299ed[_0x55a5('0x3d')]=_[_0x55a5('0x40')](_0x4299ed[_0x55a5('0x3d')],{'$or':_[_0x55a5('0x30')](_0x412fc7,function(_0x4e125a){if(_0x4e125a[_0x55a5('0x41')]!=='VIRTUAL'){var _0x3fadfc={};_0x3fadfc[_0x4e125a[_0x55a5('0x2e')]]={'$like':'%'+_0x4fe3fc[_0x55a5('0x33')][_0x55a5('0x3f')]+'%'};return _0x3fadfc;}})});}_0x4299ed=_['merge']({},_0x4299ed,_0x4fe3fc[_0x55a5('0x42')]);var _0x449c45={'where':_0x4299ed['where']};return db[_0x55a5('0x43')][_0x55a5('0x1f')](_0x449c45)['then'](function(_0x327312){_0x2f78fe[_0x55a5('0x1f')]=_0x327312;if(_0x4fe3fc[_0x55a5('0x33')][_0x55a5('0x44')]){_0x4299ed[_0x55a5('0x45')]=[{'all':!![]}];}return db[_0x55a5('0x43')]['findAll'](_0x4299ed);})[_0x55a5('0x28')](function(_0x520ab4){_0x2f78fe['rows']=_0x520ab4;return _0x2f78fe;})[_0x55a5('0x28')](respondWithFilteredResult(_0x52ceb0,_0x4299ed))[_0x55a5('0x46')](handleError(_0x52ceb0,null));};exports['show']=function(_0x5264a3,_0x258051){var _0x51820e={'raw':!![],'where':{'id':_0x5264a3[_0x55a5('0x47')]['id']}},_0x5ce5a4={};_0x5ce5a4['model']=_[_0x55a5('0x48')](db[_0x55a5('0x43')][_0x55a5('0x31')]);_0x5ce5a4[_0x55a5('0x33')]=_[_0x55a5('0x48')](_0x5264a3[_0x55a5('0x33')]);_0x5ce5a4[_0x55a5('0x34')]=_['intersection'](_0x5ce5a4[_0x55a5('0x37')],_0x5ce5a4['query']);_0x51820e[_0x55a5('0x36')]=_[_0x55a5('0x35')](_0x5ce5a4['model'],qs[_0x55a5('0x38')](_0x5264a3[_0x55a5('0x33')][_0x55a5('0x38')]));_0x51820e[_0x55a5('0x36')]=_0x51820e['attributes'][_0x55a5('0x39')]?_0x51820e['attributes']:_0x5ce5a4[_0x55a5('0x37')];if(_0x5264a3['query']['includeAll']){_0x51820e['include']=[{'all':!![]}];}_0x51820e=_[_0x55a5('0x40')]({},_0x51820e,_0x5264a3[_0x55a5('0x42')]);return db['Sound'][_0x55a5('0x49')](_0x51820e)['then'](handleEntityNotFound(_0x258051,null))['then'](respondWithResult(_0x258051,null))['catch'](handleError(_0x258051,null));};exports['download']=function(_0x318d14,_0x5d8e31,_0x5bdbda){return db['Sound'][_0x55a5('0x49')]({'where':{'id':_0x318d14['params']['id']},'attributes':[_0x55a5('0x2e'),_0x55a5('0x4a'),_0x55a5('0x4b')],'raw':!![]})[_0x55a5('0x28')](handleEntityNotFound(_0x5d8e31,null))['then'](function(_0x5b7bed){if(_0x5b7bed){if(!fs[_0x55a5('0x4c')](path[_0x55a5('0x4d')](config['root'],_0x55a5('0x4e'),_0x5b7bed[_0x55a5('0x4a')]+'.'+_0x5b7bed[_0x55a5('0x4b')]))){throw new db[(_0x55a5('0x4f'))][(_0x55a5('0x50'))](_0x55a5('0x51'));}return _0x5d8e31['download'](path[_0x55a5('0x4d')](config['root'],_0x55a5('0x4e'),util[_0x55a5('0x52')](_0x55a5('0x53'),_0x5b7bed[_0x55a5('0x4a')],_0x5b7bed[_0x55a5('0x4b')])),util['format'](_0x55a5('0x53'),_0x5b7bed[_0x55a5('0x2e')],_0x5b7bed[_0x55a5('0x4b')]));}return null;})[_0x55a5('0x46')](handleError(_0x5d8e31,null));};exports[_0x55a5('0x54')]=function(_0x557469,_0x2ea502,_0x36cd35){var _0x345db1={'name':path['basename'](_0x557469[_0x55a5('0x55')][_0x55a5('0x56')],path[_0x55a5('0x57')](_0x557469['file']['originalname'])),'save_name':path[_0x55a5('0x58')](_0x557469['file'][_0x55a5('0x59')],path['extname'](_0x557469['file'][_0x55a5('0x59')])),'original_format':path[_0x55a5('0x57')](_0x557469[_0x55a5('0x55')][_0x55a5('0x56')])[_0x55a5('0x5a')](0x1),'converted_format':_0x55a5('0x5b')};var _0x41a351=path[_0x55a5('0x4d')](config['root'],_0x55a5('0x5c'),_0x557469[_0x55a5('0x55')][_0x55a5('0x59')]);var _0x270e69=path[_0x55a5('0x4d')](config[_0x55a5('0x5d')],_0x55a5('0x4e'),util[_0x55a5('0x52')](_0x55a5('0x53'),path[_0x55a5('0x58')](_0x557469[_0x55a5('0x55')][_0x55a5('0x59')],path[_0x55a5('0x57')](_0x557469['file']['filename'])),_0x345db1['converted_format']));logger[_0x55a5('0x5e')](_0x55a5('0x5f'),_0x41a351);logger[_0x55a5('0x5e')](_0x55a5('0x60'),_0x270e69);try{fs[_0x55a5('0x61')](_0x41a351,parseInt(_0x55a5('0x62'),0x8));var _0x6e3dd2=sox['transcode'](_0x41a351,_0x270e69,{'sampleRate':0x1f40,'format':_0x55a5('0x5b'),'channelCount':0x1,'bitRate':0xc0*0x400,'compressionQuality':0x5});_0x6e3dd2['on'](_0x55a5('0x2c'),function(_0x5a2a40){fs[_0x55a5('0x63')](_0x41a351);_0x2ea502[_0x55a5('0x1c')](0x1f4)['send'](_0x5a2a40);});_0x6e3dd2['on']('src',function(_0x28f905){_0x345db1['original_duration']=isNaN(_0x28f905[_0x55a5('0x64')])?null:_0x28f905[_0x55a5('0x64')]*0x3e8;_0x345db1[_0x55a5('0x65')]=isNaN(_0x28f905[_0x55a5('0x66')])?null:_0x28f905[_0x55a5('0x66')];_0x345db1[_0x55a5('0x67')]=isNaN(_0x28f905[_0x55a5('0x68')])?null:_0x28f905[_0x55a5('0x68')];_0x345db1[_0x55a5('0x69')]=isNaN(_0x28f905[_0x55a5('0x6a')])?null:_0x28f905['bitRate'];_0x345db1[_0x55a5('0x6b')]=isNaN(_0x28f905[_0x55a5('0x6c')])?null:_0x28f905[_0x55a5('0x6c')];});_0x6e3dd2['on']('dest',function(_0x15494f){_0x345db1[_0x55a5('0x6d')]=isNaN(_0x15494f[_0x55a5('0x64')])?null:_0x15494f['duration']*0x3e8;_0x345db1[_0x55a5('0x6e')]=isNaN(_0x15494f[_0x55a5('0x66')])?null:_0x15494f[_0x55a5('0x66')];_0x345db1[_0x55a5('0x6f')]=isNaN(_0x15494f[_0x55a5('0x68')])?null:_0x15494f[_0x55a5('0x68')];_0x345db1[_0x55a5('0x70')]=isNaN(_0x15494f[_0x55a5('0x6a')])?null:_0x15494f[_0x55a5('0x6a')];_0x345db1[_0x55a5('0x71')]=isNaN(_0x15494f[_0x55a5('0x6c')])?null:_0x15494f['sampleRate'];});_0x6e3dd2['on'](_0x55a5('0x72'),function(){fs[_0x55a5('0x61')](_0x270e69,parseInt(_0x55a5('0x62'),0x8));return db[_0x55a5('0x43')]['create'](_0x345db1)[_0x55a5('0x28')](function(_0x30e056){var _0x3382c5={'role':_0x557469['body'][_0x55a5('0x73')],'userProfileId':_0x557469['body'][_0x55a5('0x74')]};if(!_0x3382c5)throw new Error(_0x55a5('0x75'));if(_0x3382c5[_0x55a5('0x73')]==='user'){var _0x4e47c8=_0x30e056[_0x55a5('0x2a')]({'plain':!![]});return db[_0x55a5('0x76')][_0x55a5('0x49')]({'where':{'name':_0x55a5('0x2b'),'userProfileId':_0x3382c5[_0x55a5('0x74')]},'raw':!![]})[_0x55a5('0x28')](function(_0x2d11c1){if(_0x2d11c1&&_0x2d11c1[_0x55a5('0x77')]===0x0){return db['UserProfileResource'][_0x55a5('0x54')]({'name':_0x4e47c8['name'],'resourceId':_0x4e47c8['id'],'type':_0x2d11c1[_0x55a5('0x2e')],'sectionId':_0x2d11c1['id']},{})[_0x55a5('0x28')](function(){return _0x30e056;});}else{return _0x30e056;}})[_0x55a5('0x46')](function(_0x34be92){logger[_0x55a5('0x2c')](_0x55a5('0x78'),_0x34be92);throw _0x34be92;});}return _0x30e056;})[_0x55a5('0x28')](respondWithResult(_0x2ea502,null))[_0x55a5('0x46')](handleError(_0x2ea502,null));});_0x6e3dd2[_0x55a5('0x79')]();}catch(_0x33f2a4){_0x2ea502[_0x55a5('0x1c')](0x1f4)['send'](_0x33f2a4);}};exports[_0x55a5('0x27')]=function(_0x372e98,_0x1efe3c,_0x5e685b){return db['Sound'][_0x55a5('0x49')]({'where':{'id':_0x372e98['params']['id']}})[_0x55a5('0x28')](handleEntityNotFound(_0x1efe3c,null))[_0x55a5('0x28')](saveUpdates(_[_0x55a5('0x3e')](_0x372e98[_0x55a5('0x7a')],['name','description']),null))[_0x55a5('0x28')](respondWithResult(_0x1efe3c,null))[_0x55a5('0x46')](handleError(_0x1efe3c,null));};exports[_0x55a5('0x7b')]=function(_0x5e3cac,_0x5bc79d,_0x4e116c){return db[_0x55a5('0x43')]['find']({'where':{'id':_0x5e3cac['params']['id']}})['then'](function(_0x15782b){if(_0x15782b){return _0x15782b[_0x55a5('0x29')]();}})['then'](function(_0x203d18){var _0x286f2e=path['join'](config[_0x55a5('0x5d')],_0x55a5('0x5c'),util[_0x55a5('0x52')](_0x55a5('0x53'),_0x203d18['save_name'],_0x203d18['original_format']));var _0x593897=path[_0x55a5('0x4d')](config[_0x55a5('0x5d')],_0x55a5('0x4e'),util['format'](_0x55a5('0x53'),_0x203d18['save_name'],_0x203d18['converted_format']));fs[_0x55a5('0x63')](_0x286f2e);fs['unlinkSync'](_0x593897);return _0x203d18;})[_0x55a5('0x28')](function(_0x3cec6c){if(_0x3cec6c){return _0x5bc79d[_0x55a5('0x1c')](0xcc)[_0x55a5('0x72')]();}})[_0x55a5('0x28')](handleEntityNotFound(_0x5bc79d,null))[_0x55a5('0x46')](handleError(_0x5bc79d,null));}; \ No newline at end of file +var _0x80e3=['bluebird','mustache','util','path','to-csv','ejs','fs-extra','lodash','squel','crypto','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../config/logger','api','../../config/utils','../../config/environment','../../mysqldb','sendStatus','status','end','undefined','limit','count','offset','set','json','reject','save','update','then','destroy','get','UserProfileResource','stack','name','index','map','Sound','rawAttributes','fieldName','type','key','model','query','keys','filters','intersection','attributes','fields','length','nolimit','sort','where','pick','filter','merge','VIRTUAL','options','includeAll','include','findAll','rows','catch','params','download','save_name','converted_format','existsSync','root','Sequelize','ValidationError','Sound\x20not\x20found','join','server/files/sounds/converted','format','%s.%s','create','basename','file','originalname','extname','filename','substring','wav','server/files/sounds/original','info','Sound\x20upload\x20filepath:\x20%s','Sound\x20upload\x20destination:\x20%s','chmodSync','0777','transcode','error','unlinkSync','send','original_duration','duration','sampleCount','original_channelCount','channelCount','original_bitRate','bitRate','original_sampleRate','sampleRate','dest','converted_duration','converted_sampleCount','converted_channelCount','converted_sampleRate','body','userProfileId','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','user','find','Sounds','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','description','original_format','eml-format','rimraf','fast-json-patch'];(function(_0x43bf52,_0x445353){var _0x2dd589=function(_0x19729e){while(--_0x19729e){_0x43bf52['push'](_0x43bf52['shift']());}};_0x2dd589(++_0x445353);}(_0x80e3,0x1ed));var _0x380e=function(_0x2f842d,_0x4214aa){_0x2f842d=_0x2f842d-0x0;var _0x50c500=_0x80e3[_0x2f842d];return _0x50c500;};'use strict';var emlformat=require(_0x380e('0x0'));var rimraf=require(_0x380e('0x1'));var zipdir=require('zip-dir');var jsonpatch=require(_0x380e('0x2'));var rp=require('request-promise');var moment=require('moment');var BPromise=require(_0x380e('0x3'));var Mustache=require(_0x380e('0x4'));var util=require(_0x380e('0x5'));var path=require(_0x380e('0x6'));var sox=require('sox');var csv=require(_0x380e('0x7'));var ejs=require(_0x380e('0x8'));var fs=require('fs');var fs_extra=require(_0x380e('0x9'));var _=require(_0x380e('0xa'));var squel=require(_0x380e('0xb'));var crypto=require(_0x380e('0xc'));var jsforce=require('jsforce');var deskjs=require('desk.js');var toCsv=require('to-csv');var querystring=require(_0x380e('0xd'));var Papa=require(_0x380e('0xe'));var Redis=require(_0x380e('0xf'));var authService=require(_0x380e('0x10'));var qs=require(_0x380e('0x11'));var as=require('../../components/parsers/advancedSearch');var hardwareService=require('../../config/license/hardware');var logger=require(_0x380e('0x12'))(_0x380e('0x13'));var utils=require(_0x380e('0x14'));var config=require(_0x380e('0x15'));var licenseUtil=require('../../config/license/util');var db=require(_0x380e('0x16'))['db'];function respondWithStatusCode(_0x4583f5,_0x7bfacb){_0x7bfacb=_0x7bfacb||0xcc;return function(_0x203019){if(_0x203019){return _0x4583f5[_0x380e('0x17')](_0x7bfacb);}return _0x4583f5[_0x380e('0x18')](_0x7bfacb)[_0x380e('0x19')]();};}function respondWithResult(_0x186e8c,_0x5b30f3){_0x5b30f3=_0x5b30f3||0xc8;return function(_0x4f868a){if(_0x4f868a){return _0x186e8c[_0x380e('0x18')](_0x5b30f3)['json'](_0x4f868a);}};}function respondWithFilteredResult(_0x429440,_0x1824cd){return function(_0x3932ab){if(_0x3932ab){var _0x3560a2=typeof _0x1824cd['offset']===_0x380e('0x1a')&&typeof _0x1824cd[_0x380e('0x1b')]===_0x380e('0x1a');var _0x18cc57=_0x3932ab[_0x380e('0x1c')];var _0x5a814c=_0x3560a2?0x0:_0x1824cd[_0x380e('0x1d')];var _0x4aa0b4=_0x3560a2?_0x3932ab[_0x380e('0x1c')]:_0x1824cd[_0x380e('0x1d')]+_0x1824cd[_0x380e('0x1b')];var _0x213058;if(_0x4aa0b4>=_0x18cc57){_0x4aa0b4=_0x18cc57;_0x213058=0xc8;}else{_0x213058=0xce;}_0x429440[_0x380e('0x18')](_0x213058);return _0x429440[_0x380e('0x1e')]('Content-Range',_0x5a814c+'-'+_0x4aa0b4+'/'+_0x18cc57)[_0x380e('0x1f')](_0x3932ab);}return null;};}function patchUpdates(_0x9d4f28){return function(_0x47d385){try{jsonpatch['apply'](_0x47d385,_0x9d4f28,!![]);}catch(_0x1e12c7){return BPromise[_0x380e('0x20')](_0x1e12c7);}return _0x47d385[_0x380e('0x21')]();};}function saveUpdates(_0x29609e,_0x3e8f6d){return function(_0x277318){if(_0x277318){return _0x277318[_0x380e('0x22')](_0x29609e)[_0x380e('0x23')](function(_0x371777){return _0x371777;});}return null;};}function removeEntity(_0x83ca42,_0x288e94){return function(_0x544e01){if(_0x544e01){return _0x544e01[_0x380e('0x24')]()[_0x380e('0x23')](function(){var _0x2f5f61=_0x544e01[_0x380e('0x25')]({'plain':!![]});var _0x2517a4='Sounds';return db[_0x380e('0x26')][_0x380e('0x24')]({'where':{'type':_0x2517a4,'resourceId':_0x2f5f61['id']}})['then'](function(){return _0x544e01;});})[_0x380e('0x23')](function(){_0x83ca42[_0x380e('0x18')](0xcc)[_0x380e('0x19')]();});}};}function handleEntityNotFound(_0x28a1a9,_0x406c2a){return function(_0x195466){if(!_0x195466){_0x28a1a9[_0x380e('0x17')](0x194);}return _0x195466;};}function handleError(_0x1eaace,_0x54e203){_0x54e203=_0x54e203||0x1f4;return function(_0x541c18){logger['error'](_0x541c18[_0x380e('0x27')]);if(_0x541c18[_0x380e('0x28')]){delete _0x541c18[_0x380e('0x28')];}_0x1eaace[_0x380e('0x18')](_0x54e203)['send'](_0x541c18);};}exports[_0x380e('0x29')]=function(_0x474d4c,_0x28558c){var _0x21d6dc={},_0x4bd1d0={},_0x55fe54={'count':0x0,'rows':[]};var _0x5defb=_[_0x380e('0x2a')](db[_0x380e('0x2b')][_0x380e('0x2c')],function(_0x19a6de){return{'name':_0x19a6de[_0x380e('0x2d')],'type':_0x19a6de[_0x380e('0x2e')][_0x380e('0x2f')]};});_0x4bd1d0[_0x380e('0x30')]=_[_0x380e('0x2a')](_0x5defb,_0x380e('0x28'));_0x4bd1d0[_0x380e('0x31')]=_[_0x380e('0x32')](_0x474d4c['query']);_0x4bd1d0[_0x380e('0x33')]=_[_0x380e('0x34')](_0x4bd1d0['model'],_0x4bd1d0[_0x380e('0x31')]);_0x21d6dc[_0x380e('0x35')]=_[_0x380e('0x34')](_0x4bd1d0['model'],qs[_0x380e('0x36')](_0x474d4c[_0x380e('0x31')][_0x380e('0x36')]));_0x21d6dc[_0x380e('0x35')]=_0x21d6dc[_0x380e('0x35')][_0x380e('0x37')]?_0x21d6dc[_0x380e('0x35')]:_0x4bd1d0[_0x380e('0x30')];if(!_0x474d4c[_0x380e('0x31')]['hasOwnProperty'](_0x380e('0x38'))){_0x21d6dc[_0x380e('0x1b')]=qs[_0x380e('0x1b')](_0x474d4c[_0x380e('0x31')][_0x380e('0x1b')]);_0x21d6dc[_0x380e('0x1d')]=qs[_0x380e('0x1d')](_0x474d4c[_0x380e('0x31')][_0x380e('0x1d')]);}_0x21d6dc['order']=qs[_0x380e('0x39')](_0x474d4c[_0x380e('0x31')]['sort']);_0x21d6dc[_0x380e('0x3a')]=qs[_0x380e('0x33')](_[_0x380e('0x3b')](_0x474d4c[_0x380e('0x31')],_0x4bd1d0[_0x380e('0x33')]),_0x5defb);if(_0x474d4c[_0x380e('0x31')][_0x380e('0x3c')]){_0x21d6dc[_0x380e('0x3a')]=_[_0x380e('0x3d')](_0x21d6dc[_0x380e('0x3a')],{'$or':_[_0x380e('0x2a')](_0x5defb,function(_0x3b0c70){if(_0x3b0c70[_0x380e('0x2e')]!==_0x380e('0x3e')){var _0x521680={};_0x521680[_0x3b0c70[_0x380e('0x28')]]={'$like':'%'+_0x474d4c[_0x380e('0x31')][_0x380e('0x3c')]+'%'};return _0x521680;}})});}_0x21d6dc=_[_0x380e('0x3d')]({},_0x21d6dc,_0x474d4c[_0x380e('0x3f')]);var _0x246424={'where':_0x21d6dc[_0x380e('0x3a')]};return db['Sound']['count'](_0x246424)[_0x380e('0x23')](function(_0x1ef270){_0x55fe54[_0x380e('0x1c')]=_0x1ef270;if(_0x474d4c[_0x380e('0x31')][_0x380e('0x40')]){_0x21d6dc[_0x380e('0x41')]=[{'all':!![]}];}return db[_0x380e('0x2b')][_0x380e('0x42')](_0x21d6dc);})[_0x380e('0x23')](function(_0x5acacd){_0x55fe54[_0x380e('0x43')]=_0x5acacd;return _0x55fe54;})[_0x380e('0x23')](respondWithFilteredResult(_0x28558c,_0x21d6dc))[_0x380e('0x44')](handleError(_0x28558c,null));};exports['show']=function(_0x9656e4,_0x119a18){var _0x35acd5={'raw':!![],'where':{'id':_0x9656e4[_0x380e('0x45')]['id']}},_0x35e220={};_0x35e220[_0x380e('0x30')]=_['keys'](db[_0x380e('0x2b')][_0x380e('0x2c')]);_0x35e220[_0x380e('0x31')]=_[_0x380e('0x32')](_0x9656e4[_0x380e('0x31')]);_0x35e220[_0x380e('0x33')]=_[_0x380e('0x34')](_0x35e220[_0x380e('0x30')],_0x35e220[_0x380e('0x31')]);_0x35acd5['attributes']=_[_0x380e('0x34')](_0x35e220[_0x380e('0x30')],qs[_0x380e('0x36')](_0x9656e4[_0x380e('0x31')][_0x380e('0x36')]));_0x35acd5[_0x380e('0x35')]=_0x35acd5[_0x380e('0x35')][_0x380e('0x37')]?_0x35acd5['attributes']:_0x35e220[_0x380e('0x30')];if(_0x9656e4[_0x380e('0x31')][_0x380e('0x40')]){_0x35acd5['include']=[{'all':!![]}];}_0x35acd5=_[_0x380e('0x3d')]({},_0x35acd5,_0x9656e4['options']);return db[_0x380e('0x2b')]['find'](_0x35acd5)['then'](handleEntityNotFound(_0x119a18,null))[_0x380e('0x23')](respondWithResult(_0x119a18,null))[_0x380e('0x44')](handleError(_0x119a18,null));};exports[_0x380e('0x46')]=function(_0xd45017,_0x2300b3,_0x1ef164){return db[_0x380e('0x2b')]['find']({'where':{'id':_0xd45017[_0x380e('0x45')]['id']},'attributes':[_0x380e('0x28'),_0x380e('0x47'),_0x380e('0x48')],'raw':!![]})[_0x380e('0x23')](handleEntityNotFound(_0x2300b3,null))[_0x380e('0x23')](function(_0x49387b){if(_0x49387b){if(!fs[_0x380e('0x49')](path['join'](config[_0x380e('0x4a')],'server/files/sounds/converted',_0x49387b['save_name']+'.'+_0x49387b[_0x380e('0x48')]))){throw new db[(_0x380e('0x4b'))][(_0x380e('0x4c'))](_0x380e('0x4d'));}return _0x2300b3['download'](path[_0x380e('0x4e')](config[_0x380e('0x4a')],_0x380e('0x4f'),util[_0x380e('0x50')](_0x380e('0x51'),_0x49387b[_0x380e('0x47')],_0x49387b[_0x380e('0x48')])),util[_0x380e('0x50')](_0x380e('0x51'),_0x49387b[_0x380e('0x28')],_0x49387b['converted_format']));}return null;})[_0x380e('0x44')](handleError(_0x2300b3,null));};exports[_0x380e('0x52')]=function(_0x361e22,_0xd9bae5,_0x487653){var _0x317a84={'name':path[_0x380e('0x53')](_0x361e22[_0x380e('0x54')][_0x380e('0x55')],path[_0x380e('0x56')](_0x361e22[_0x380e('0x54')]['originalname'])),'save_name':path['basename'](_0x361e22[_0x380e('0x54')][_0x380e('0x57')],path[_0x380e('0x56')](_0x361e22[_0x380e('0x54')][_0x380e('0x57')])),'original_format':path[_0x380e('0x56')](_0x361e22[_0x380e('0x54')]['originalname'])[_0x380e('0x58')](0x1),'converted_format':_0x380e('0x59')};var _0x15fa28=path[_0x380e('0x4e')](config[_0x380e('0x4a')],_0x380e('0x5a'),_0x361e22['file']['filename']);var _0x18da88=path[_0x380e('0x4e')](config['root'],_0x380e('0x4f'),util[_0x380e('0x50')](_0x380e('0x51'),path['basename'](_0x361e22[_0x380e('0x54')]['filename'],path[_0x380e('0x56')](_0x361e22['file']['filename'])),_0x317a84['converted_format']));logger[_0x380e('0x5b')](_0x380e('0x5c'),_0x15fa28);logger['info'](_0x380e('0x5d'),_0x18da88);try{fs[_0x380e('0x5e')](_0x15fa28,parseInt(_0x380e('0x5f'),0x8));var _0x214d8b=sox[_0x380e('0x60')](_0x15fa28,_0x18da88,{'sampleRate':0x1f40,'format':_0x380e('0x59'),'channelCount':0x1,'bitRate':0xc0*0x400,'compressionQuality':0x5});_0x214d8b['on'](_0x380e('0x61'),function(_0x5ea8d7){fs[_0x380e('0x62')](_0x15fa28);_0xd9bae5[_0x380e('0x18')](0x1f4)[_0x380e('0x63')](_0x5ea8d7);});_0x214d8b['on']('src',function(_0x1af662){_0x317a84[_0x380e('0x64')]=isNaN(_0x1af662['duration'])?null:_0x1af662[_0x380e('0x65')]*0x3e8;_0x317a84['original_sampleCount']=isNaN(_0x1af662['sampleCount'])?null:_0x1af662[_0x380e('0x66')];_0x317a84[_0x380e('0x67')]=isNaN(_0x1af662[_0x380e('0x68')])?null:_0x1af662[_0x380e('0x68')];_0x317a84[_0x380e('0x69')]=isNaN(_0x1af662[_0x380e('0x6a')])?null:_0x1af662[_0x380e('0x6a')];_0x317a84[_0x380e('0x6b')]=isNaN(_0x1af662[_0x380e('0x6c')])?null:_0x1af662[_0x380e('0x6c')];});_0x214d8b['on'](_0x380e('0x6d'),function(_0x52c326){_0x317a84[_0x380e('0x6e')]=isNaN(_0x52c326[_0x380e('0x65')])?null:_0x52c326[_0x380e('0x65')]*0x3e8;_0x317a84[_0x380e('0x6f')]=isNaN(_0x52c326[_0x380e('0x66')])?null:_0x52c326[_0x380e('0x66')];_0x317a84[_0x380e('0x70')]=isNaN(_0x52c326[_0x380e('0x68')])?null:_0x52c326[_0x380e('0x68')];_0x317a84['converted_bitRate']=isNaN(_0x52c326[_0x380e('0x6a')])?null:_0x52c326[_0x380e('0x6a')];_0x317a84[_0x380e('0x71')]=isNaN(_0x52c326[_0x380e('0x6c')])?null:_0x52c326[_0x380e('0x6c')];});_0x214d8b['on']('end',function(){fs['chmodSync'](_0x18da88,parseInt(_0x380e('0x5f'),0x8));return db['Sound'][_0x380e('0x52')](_0x317a84)[_0x380e('0x23')](function(_0x21b578){var _0x249af6={'role':_0x361e22[_0x380e('0x72')]['role'],'userProfileId':_0x361e22[_0x380e('0x72')][_0x380e('0x73')]};if(!_0x249af6)throw new Error(_0x380e('0x74'));if(_0x249af6[_0x380e('0x75')]===_0x380e('0x76')){var _0x106bf0=_0x21b578[_0x380e('0x25')]({'plain':!![]});return db['UserProfileSection'][_0x380e('0x77')]({'where':{'name':_0x380e('0x78'),'userProfileId':_0x249af6[_0x380e('0x73')]},'raw':!![]})[_0x380e('0x23')](function(_0x1c05e8){if(_0x1c05e8&&_0x1c05e8['autoAssociation']===0x0){return db[_0x380e('0x26')][_0x380e('0x52')]({'name':_0x106bf0[_0x380e('0x28')],'resourceId':_0x106bf0['id'],'type':_0x1c05e8['name'],'sectionId':_0x1c05e8['id']},{})[_0x380e('0x23')](function(){return _0x21b578;});}else{return _0x21b578;}})[_0x380e('0x44')](function(_0x57ec50){logger[_0x380e('0x61')](_0x380e('0x79'),_0x57ec50);throw _0x57ec50;});}return _0x21b578;})[_0x380e('0x23')](respondWithResult(_0xd9bae5,null))['catch'](handleError(_0xd9bae5,null));});_0x214d8b['start']();}catch(_0x19828c){_0xd9bae5[_0x380e('0x18')](0x1f4)[_0x380e('0x63')](_0x19828c);}};exports[_0x380e('0x22')]=function(_0x5733a7,_0x2e2633,_0x36621d){return db[_0x380e('0x2b')]['find']({'where':{'id':_0x5733a7[_0x380e('0x45')]['id']}})[_0x380e('0x23')](handleEntityNotFound(_0x2e2633,null))[_0x380e('0x23')](saveUpdates(_[_0x380e('0x3b')](_0x5733a7[_0x380e('0x72')],[_0x380e('0x28'),_0x380e('0x7a')]),null))[_0x380e('0x23')](respondWithResult(_0x2e2633,null))['catch'](handleError(_0x2e2633,null));};exports['delete']=function(_0x902c26,_0x3df4ba,_0x1f4af9){return db[_0x380e('0x2b')][_0x380e('0x77')]({'where':{'id':_0x902c26[_0x380e('0x45')]['id']}})[_0x380e('0x23')](function(_0x58427b){if(_0x58427b){return _0x58427b['destroy']();}})[_0x380e('0x23')](function(_0xfa6db7){var _0x5c666b=path[_0x380e('0x4e')](config[_0x380e('0x4a')],_0x380e('0x5a'),util[_0x380e('0x50')]('%s.%s',_0xfa6db7['save_name'],_0xfa6db7[_0x380e('0x7b')]));var _0x362085=path['join'](config[_0x380e('0x4a')],_0x380e('0x4f'),util[_0x380e('0x50')](_0x380e('0x51'),_0xfa6db7[_0x380e('0x47')],_0xfa6db7[_0x380e('0x48')]));fs[_0x380e('0x62')](_0x5c666b);fs['unlinkSync'](_0x362085);return _0xfa6db7;})[_0x380e('0x23')](function(_0x1055b1){if(_0x1055b1){return _0x3df4ba[_0x380e('0x18')](0xcc)[_0x380e('0x19')]();}})[_0x380e('0x23')](handleEntityNotFound(_0x3df4ba,null))['catch'](handleError(_0x3df4ba,null));}; \ No newline at end of file diff --git a/server/api/sound/sound.model.js b/server/api/sound/sound.model.js index 8d57516..e581e6d 100644 --- a/server/api/sound/sound.model.js +++ b/server/api/sound/sound.model.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xbf72=['../../config/environment','./sound.attributes','exports','define','Sound','tools_sounds','util','api','moment','request-promise'];(function(_0x3d89ce,_0x5d5e4b){var _0x494a2e=function(_0x1222b8){while(--_0x1222b8){_0x3d89ce['push'](_0x3d89ce['shift']());}};_0x494a2e(++_0x5d5e4b);}(_0xbf72,0x1a0));var _0x2bf7=function(_0x420a55,_0x321fc3){_0x420a55=_0x420a55-0x0;var _0x4160f3=_0xbf72[_0x420a55];return _0x4160f3;};'use strict';var _=require('lodash');var util=require(_0x2bf7('0x0'));var logger=require('../../config/logger')(_0x2bf7('0x1'));var moment=require(_0x2bf7('0x2'));var BPromise=require('bluebird');var rp=require(_0x2bf7('0x3'));var fs=require('fs');var path=require('path');var rimraf=require('rimraf');var config=require(_0x2bf7('0x4'));var attributes=require(_0x2bf7('0x5'));module[_0x2bf7('0x6')]=function(_0x3a3264,_0x17721f){return _0x3a3264[_0x2bf7('0x7')](_0x2bf7('0x8'),attributes,{'tableName':_0x2bf7('0x9'),'paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file +var _0xca16=['request-promise','path','../../config/environment','exports','Sound','lodash','util','../../config/logger','moment'];(function(_0x3a7082,_0x231d09){var _0x5bdcd6=function(_0x25c781){while(--_0x25c781){_0x3a7082['push'](_0x3a7082['shift']());}};_0x5bdcd6(++_0x231d09);}(_0xca16,0xd4));var _0x6ca1=function(_0x9fcc92,_0x3120f8){_0x9fcc92=_0x9fcc92-0x0;var _0x52b7a3=_0xca16[_0x9fcc92];return _0x52b7a3;};'use strict';var _=require(_0x6ca1('0x0'));var util=require(_0x6ca1('0x1'));var logger=require(_0x6ca1('0x2'))('api');var moment=require(_0x6ca1('0x3'));var BPromise=require('bluebird');var rp=require(_0x6ca1('0x4'));var fs=require('fs');var path=require(_0x6ca1('0x5'));var rimraf=require('rimraf');var config=require(_0x6ca1('0x6'));var attributes=require('./sound.attributes');module[_0x6ca1('0x7')]=function(_0x40997a,_0x49ad19){return _0x40997a['define'](_0x6ca1('0x8'),attributes,{'tableName':'tools_sounds','paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file diff --git a/server/api/sound/sound.rpc.js b/server/api/sound/sound.rpc.js index 6d83f93..2c47262 100644 --- a/server/api/sound/sound.rpc.js +++ b/server/api/sound/sound.rpc.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x36a1=['options','attributes','include','model','map','lodash','util','moment','bluebird','randomstring','ioredis','../../config/utils','rpc','../../config/environment','jayson/promise','client','request','then','info','Sound,\x20%s,\x20%s','request\x20sent','debug','stringify','error','message','result','catch','ShowSound','find'];(function(_0xb0ed66,_0x424e5e){var _0x15de71=function(_0x3ec047){while(--_0x3ec047){_0xb0ed66['push'](_0xb0ed66['shift']());}};_0x15de71(++_0x424e5e);}(_0x36a1,0x1b8));var _0x136a=function(_0x133212,_0x378e80){_0x133212=_0x133212-0x0;var _0x3e60e0=_0x36a1[_0x133212];return _0x3e60e0;};'use strict';var _=require(_0x136a('0x0'));var util=require(_0x136a('0x1'));var moment=require(_0x136a('0x2'));var BPromise=require(_0x136a('0x3'));var rs=require(_0x136a('0x4'));var fs=require('fs');var Redis=require(_0x136a('0x5'));var db=require('../../mysqldb')['db'];var utils=require(_0x136a('0x6'));var logger=require('../../config/logger')(_0x136a('0x7'));var config=require(_0x136a('0x8'));var jayson=require(_0x136a('0x9'));var client=jayson[_0x136a('0xa')]['http']({'port':0x232a});function respondWithRpcPromise(_0x22386a,_0x37816e,_0x3c0caa){return new BPromise(function(_0x4ebbfb,_0xaedce1){return client[_0x136a('0xb')](_0x22386a,_0x3c0caa)[_0x136a('0xc')](function(_0x5379a1){logger[_0x136a('0xd')](_0x136a('0xe'),_0x37816e,_0x136a('0xf'));logger[_0x136a('0x10')]('Sound,\x20%s,\x20%s,\x20%s',_0x37816e,_0x136a('0xf'),JSON[_0x136a('0x11')](_0x5379a1));if(_0x5379a1[_0x136a('0x12')]){if(_0x5379a1['error']['code']===0x1f4){logger[_0x136a('0x12')](_0x136a('0xe'),_0x37816e,_0x5379a1['error'][_0x136a('0x13')]);return _0xaedce1(_0x5379a1[_0x136a('0x12')][_0x136a('0x13')]);}logger[_0x136a('0x12')](_0x136a('0xe'),_0x37816e,_0x5379a1['error'][_0x136a('0x13')]);return _0x4ebbfb(_0x5379a1[_0x136a('0x12')][_0x136a('0x13')]);}else{logger[_0x136a('0xd')](_0x136a('0xe'),_0x37816e,_0x136a('0xf'));_0x4ebbfb(_0x5379a1[_0x136a('0x14')]['message']);}})[_0x136a('0x15')](function(_0x5d4bfa){logger[_0x136a('0x12')](_0x136a('0xe'),_0x37816e,_0x5d4bfa);_0xaedce1(_0x5d4bfa);});});}exports[_0x136a('0x16')]=function(_0x3b5223){var _0x6ce152=this;return new Promise(function(_0x470bb0,_0x238ab8){return db['Sound'][_0x136a('0x17')]({'raw':_0x3b5223[_0x136a('0x18')]?_0x3b5223[_0x136a('0x18')]['raw']===undefined?!![]:![]:!![],'where':_0x3b5223[_0x136a('0x18')]?_0x3b5223[_0x136a('0x18')]['where']||null:null,'attributes':_0x3b5223[_0x136a('0x18')]?_0x3b5223[_0x136a('0x18')][_0x136a('0x19')]||null:null,'include':_0x3b5223[_0x136a('0x18')]?_0x3b5223['options'][_0x136a('0x1a')]?_['map'](_0x3b5223[_0x136a('0x18')][_0x136a('0x1a')],function(_0x3466c0){return{'model':db[_0x3466c0[_0x136a('0x1b')]],'as':_0x3466c0['as'],'attributes':_0x3466c0['attributes'],'include':_0x3466c0[_0x136a('0x1a')]?_[_0x136a('0x1c')](_0x3466c0[_0x136a('0x1a')],function(_0x5bf709){return{'model':db[_0x5bf709[_0x136a('0x1b')]],'as':_0x5bf709['as'],'attributes':_0x5bf709[_0x136a('0x19')],'include':_0x5bf709[_0x136a('0x1a')]?_[_0x136a('0x1c')](_0x5bf709[_0x136a('0x1a')],function(_0x452a4d){return{'model':db[_0x452a4d[_0x136a('0x1b')]],'as':_0x452a4d['as'],'attributes':_0x452a4d[_0x136a('0x19')]};}):[]};}):[]};}):[]:[]})['then'](function(_0x5090d1){logger[_0x136a('0xd')](_0x136a('0x16'),_0x3b5223);logger[_0x136a('0x10')](_0x136a('0x16'),_0x3b5223,JSON[_0x136a('0x11')](_0x5090d1));_0x470bb0(_0x5090d1);})[_0x136a('0x15')](function(_0x21a2df){logger[_0x136a('0x12')]('ShowSound',_0x21a2df[_0x136a('0x13')],_0x3b5223);_0x238ab8(_0x6ce152[_0x136a('0x12')](0x1f4,_0x21a2df[_0x136a('0x13')]));});});}; \ No newline at end of file +var _0x779c=['include','model','map','debug','lodash','util','moment','ioredis','../../mysqldb','../../config/utils','../../config/logger','jayson/promise','http','request','then','info','Sound,\x20%s,\x20%s','request\x20sent','Sound,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','catch','ShowSound','Sound','options','raw','attributes'];(function(_0x834bb6,_0x1c5e35){var _0xa35d00=function(_0x14aeb3){while(--_0x14aeb3){_0x834bb6['push'](_0x834bb6['shift']());}};_0xa35d00(++_0x1c5e35);}(_0x779c,0xb8));var _0xc779=function(_0x222fa1,_0x281603){_0x222fa1=_0x222fa1-0x0;var _0x460e27=_0x779c[_0x222fa1];return _0x460e27;};'use strict';var _=require(_0xc779('0x0'));var util=require(_0xc779('0x1'));var moment=require(_0xc779('0x2'));var BPromise=require('bluebird');var rs=require('randomstring');var fs=require('fs');var Redis=require(_0xc779('0x3'));var db=require(_0xc779('0x4'))['db'];var utils=require(_0xc779('0x5'));var logger=require(_0xc779('0x6'))('rpc');var config=require('../../config/environment');var jayson=require(_0xc779('0x7'));var client=jayson['client'][_0xc779('0x8')]({'port':0x232a});function respondWithRpcPromise(_0x38de5f,_0x265936,_0x34567f){return new BPromise(function(_0x1d14be,_0x57e0d7){return client[_0xc779('0x9')](_0x38de5f,_0x34567f)[_0xc779('0xa')](function(_0x3f8d14){logger[_0xc779('0xb')](_0xc779('0xc'),_0x265936,_0xc779('0xd'));logger['debug'](_0xc779('0xe'),_0x265936,_0xc779('0xd'),JSON[_0xc779('0xf')](_0x3f8d14));if(_0x3f8d14[_0xc779('0x10')]){if(_0x3f8d14[_0xc779('0x10')][_0xc779('0x11')]===0x1f4){logger[_0xc779('0x10')](_0xc779('0xc'),_0x265936,_0x3f8d14[_0xc779('0x10')][_0xc779('0x12')]);return _0x57e0d7(_0x3f8d14['error']['message']);}logger['error'](_0xc779('0xc'),_0x265936,_0x3f8d14['error'][_0xc779('0x12')]);return _0x1d14be(_0x3f8d14['error'][_0xc779('0x12')]);}else{logger[_0xc779('0xb')](_0xc779('0xc'),_0x265936,_0xc779('0xd'));_0x1d14be(_0x3f8d14[_0xc779('0x13')][_0xc779('0x12')]);}})[_0xc779('0x14')](function(_0x2155fa){logger[_0xc779('0x10')](_0xc779('0xc'),_0x265936,_0x2155fa);_0x57e0d7(_0x2155fa);});});}exports[_0xc779('0x15')]=function(_0x2d34a8){var _0x4c5afa=this;return new Promise(function(_0x59fda6,_0x4a7ff4){return db[_0xc779('0x16')]['find']({'raw':_0x2d34a8[_0xc779('0x17')]?_0x2d34a8['options'][_0xc779('0x18')]===undefined?!![]:![]:!![],'where':_0x2d34a8['options']?_0x2d34a8[_0xc779('0x17')]['where']||null:null,'attributes':_0x2d34a8[_0xc779('0x17')]?_0x2d34a8[_0xc779('0x17')][_0xc779('0x19')]||null:null,'include':_0x2d34a8[_0xc779('0x17')]?_0x2d34a8[_0xc779('0x17')][_0xc779('0x1a')]?_['map'](_0x2d34a8[_0xc779('0x17')][_0xc779('0x1a')],function(_0x9c401b){return{'model':db[_0x9c401b[_0xc779('0x1b')]],'as':_0x9c401b['as'],'attributes':_0x9c401b[_0xc779('0x19')],'include':_0x9c401b[_0xc779('0x1a')]?_[_0xc779('0x1c')](_0x9c401b[_0xc779('0x1a')],function(_0x567027){return{'model':db[_0x567027['model']],'as':_0x567027['as'],'attributes':_0x567027['attributes'],'include':_0x567027[_0xc779('0x1a')]?_['map'](_0x567027['include'],function(_0x1962cf){return{'model':db[_0x1962cf['model']],'as':_0x1962cf['as'],'attributes':_0x1962cf[_0xc779('0x19')]};}):[]};}):[]};}):[]:[]})[_0xc779('0xa')](function(_0x4fb43e){logger[_0xc779('0xb')](_0xc779('0x15'),_0x2d34a8);logger[_0xc779('0x1d')](_0xc779('0x15'),_0x2d34a8,JSON[_0xc779('0xf')](_0x4fb43e));_0x59fda6(_0x4fb43e);})[_0xc779('0x14')](function(_0x5b80e2){logger['error']('ShowSound',_0x5b80e2[_0xc779('0x12')],_0x2d34a8);_0x4a7ff4(_0x4c5afa['error'](0x1f4,_0x5b80e2[_0xc779('0x12')]));});});}; \ No newline at end of file diff --git a/server/api/squareMessage/index.js b/server/api/squareMessage/index.js index 3edea29..64079f0 100644 --- a/server/api/squareMessage/index.js +++ b/server/api/squareMessage/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xbaf0=['connect-timeout','express','Router','fs-extra','../../components/interaction/service','../../config/environment','./squareMessage.controller','get','isAuthenticated','index','/:id','post','create','put','update','delete','destroy','exports','util','path'];(function(_0xbd8dd8,_0x3a43a5){var _0x38b80b=function(_0x42306c){while(--_0x42306c){_0xbd8dd8['push'](_0xbd8dd8['shift']());}};_0x38b80b(++_0x3a43a5);}(_0xbaf0,0x12a));var _0x0baf=function(_0x19e35c,_0x29cd1e){_0x19e35c=_0x19e35c-0x0;var _0x3e1fe8=_0xbaf0[_0x19e35c];return _0x3e1fe8;};'use strict';var multer=require('multer');var util=require(_0x0baf('0x0'));var path=require(_0x0baf('0x1'));var timeout=require(_0x0baf('0x2'));var express=require(_0x0baf('0x3'));var router=express[_0x0baf('0x4')]();var fs_extra=require(_0x0baf('0x5'));var auth=require('../../components/auth/service');var interaction=require(_0x0baf('0x6'));var config=require(_0x0baf('0x7'));var controller=require(_0x0baf('0x8'));router[_0x0baf('0x9')]('/',auth[_0x0baf('0xa')](),controller[_0x0baf('0xb')]);router[_0x0baf('0x9')](_0x0baf('0xc'),auth[_0x0baf('0xa')](),controller['show']);router[_0x0baf('0xd')]('/',auth['isAuthenticated'](),controller[_0x0baf('0xe')]);router[_0x0baf('0xf')](_0x0baf('0xc'),auth[_0x0baf('0xa')](),controller[_0x0baf('0x10')]);router[_0x0baf('0x11')](_0x0baf('0xc'),auth[_0x0baf('0xa')](),controller[_0x0baf('0x12')]);module[_0x0baf('0x13')]=router; \ No newline at end of file +var _0x5eb8=['fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','./squareMessage.controller','get','isAuthenticated','index','/:id','show','put','update','delete','exports','path','connect-timeout','express','Router'];(function(_0x2dfe6c,_0x255709){var _0x52cb46=function(_0x353ee1){while(--_0x353ee1){_0x2dfe6c['push'](_0x2dfe6c['shift']());}};_0x52cb46(++_0x255709);}(_0x5eb8,0xb0));var _0x85eb=function(_0x1e500e,_0x2c9d74){_0x1e500e=_0x1e500e-0x0;var _0x10dc5e=_0x5eb8[_0x1e500e];return _0x10dc5e;};'use strict';var multer=require('multer');var util=require('util');var path=require(_0x85eb('0x0'));var timeout=require(_0x85eb('0x1'));var express=require(_0x85eb('0x2'));var router=express[_0x85eb('0x3')]();var fs_extra=require(_0x85eb('0x4'));var auth=require(_0x85eb('0x5'));var interaction=require(_0x85eb('0x6'));var config=require(_0x85eb('0x7'));var controller=require(_0x85eb('0x8'));router[_0x85eb('0x9')]('/',auth[_0x85eb('0xa')](),controller[_0x85eb('0xb')]);router['get'](_0x85eb('0xc'),auth[_0x85eb('0xa')](),controller[_0x85eb('0xd')]);router['post']('/',auth[_0x85eb('0xa')](),controller['create']);router[_0x85eb('0xe')](_0x85eb('0xc'),auth[_0x85eb('0xa')](),controller[_0x85eb('0xf')]);router[_0x85eb('0x10')](_0x85eb('0xc'),auth[_0x85eb('0xa')](),controller['destroy']);module[_0x85eb('0x11')]=router; \ No newline at end of file diff --git a/server/api/squareMessage/squareMessage.attributes.js b/server/api/squareMessage/squareMessage.attributes.js index e5da240..45d10d4 100644 --- a/server/api/squareMessage/squareMessage.attributes.js +++ b/server/api/squareMessage/squareMessage.attributes.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x2dc8=['TEXT','exports','STRING','medium','ENUM','out'];(function(_0x150a32,_0x15fdba){var _0x165775=function(_0x5624b9){while(--_0x5624b9){_0x150a32['push'](_0x150a32['shift']());}};_0x165775(++_0x15fdba);}(_0x2dc8,0xfd));var _0x82dc=function(_0x3c4e4c,_0x36ff70){_0x3c4e4c=_0x3c4e4c-0x0;var _0x144a87=_0x2dc8[_0x3c4e4c];return _0x144a87;};'use strict';var Sequelize=require('sequelize');module[_0x82dc('0x0')]={'uniqueid':{'type':Sequelize[_0x82dc('0x1')]},'body':{'type':Sequelize['TEXT'](_0x82dc('0x2')),'allowNull':![]},'direction':{'type':Sequelize[_0x82dc('0x3')]('in','out'),'defaultValue':_0x82dc('0x4'),'allowNull':![]},'providerName':{'type':Sequelize['STRING']},'providerResponse':{'type':Sequelize[_0x82dc('0x5')]}}; \ No newline at end of file +var _0xc281=['medium','ENUM','out','exports','STRING','TEXT'];(function(_0x3e5086,_0x48f4a2){var _0xfeb102=function(_0x5a945f){while(--_0x5a945f){_0x3e5086['push'](_0x3e5086['shift']());}};_0xfeb102(++_0x48f4a2);}(_0xc281,0x81));var _0x1c28=function(_0x545c11,_0x59dbf7){_0x545c11=_0x545c11-0x0;var _0x4b6de2=_0xc281[_0x545c11];return _0x4b6de2;};'use strict';var Sequelize=require('sequelize');module[_0x1c28('0x0')]={'uniqueid':{'type':Sequelize[_0x1c28('0x1')]},'body':{'type':Sequelize[_0x1c28('0x2')](_0x1c28('0x3')),'allowNull':![]},'direction':{'type':Sequelize[_0x1c28('0x4')]('in',_0x1c28('0x5')),'defaultValue':_0x1c28('0x5'),'allowNull':![]},'providerName':{'type':Sequelize[_0x1c28('0x1')]},'providerResponse':{'type':Sequelize[_0x1c28('0x2')]}}; \ No newline at end of file diff --git a/server/api/squareMessage/squareMessage.controller.js b/server/api/squareMessage/squareMessage.controller.js index 0fdab5e..0135436 100644 --- a/server/api/squareMessage/squareMessage.controller.js +++ b/server/api/squareMessage/squareMessage.controller.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x0764=['path','sox','ejs','lodash','squel','crypto','jsforce','desk.js','querystring','papaparse','../../components/auth/service','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../config/license/util','sendStatus','status','end','offset','undefined','limit','count','set','json','apply','reject','then','error','stack','name','send','index','map','fieldName','model','query','keys','intersection','fields','attributes','length','hasOwnProperty','order','sort','filters','pick','where','merge','type','VIRTUAL','filter','options','SquareMessage','include','findAll','rows','catch','params','rawAttributes','includeAll','find','create','body','update','destroy','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','bluebird','mustache','util'];(function(_0x452f70,_0x204445){var _0x44d233=function(_0x3be093){while(--_0x3be093){_0x452f70['push'](_0x452f70['shift']());}};_0x44d233(++_0x204445);}(_0x0764,0x174));var _0x4076=function(_0x5cb405,_0x6db567){_0x5cb405=_0x5cb405-0x0;var _0x177fc9=_0x0764[_0x5cb405];return _0x177fc9;};'use strict';var emlformat=require(_0x4076('0x0'));var rimraf=require(_0x4076('0x1'));var zipdir=require(_0x4076('0x2'));var jsonpatch=require(_0x4076('0x3'));var rp=require(_0x4076('0x4'));var moment=require('moment');var BPromise=require(_0x4076('0x5'));var Mustache=require(_0x4076('0x6'));var util=require(_0x4076('0x7'));var path=require(_0x4076('0x8'));var sox=require(_0x4076('0x9'));var csv=require('to-csv');var ejs=require(_0x4076('0xa'));var fs=require('fs');var fs_extra=require('fs-extra');var _=require(_0x4076('0xb'));var squel=require(_0x4076('0xc'));var crypto=require(_0x4076('0xd'));var jsforce=require(_0x4076('0xe'));var deskjs=require(_0x4076('0xf'));var toCsv=require('to-csv');var querystring=require(_0x4076('0x10'));var Papa=require(_0x4076('0x11'));var Redis=require('ioredis');var authService=require(_0x4076('0x12'));var qs=require('../../components/parsers/qs');var as=require(_0x4076('0x13'));var hardwareService=require(_0x4076('0x14'));var logger=require(_0x4076('0x15'))(_0x4076('0x16'));var utils=require(_0x4076('0x17'));var config=require(_0x4076('0x18'));var licenseUtil=require(_0x4076('0x19'));var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0x4f9969,_0x12345a){_0x12345a=_0x12345a||0xcc;return function(_0x269202){if(_0x269202){return _0x4f9969[_0x4076('0x1a')](_0x12345a);}return _0x4f9969[_0x4076('0x1b')](_0x12345a)[_0x4076('0x1c')]();};}function respondWithResult(_0x2c0e63,_0xfdd247){_0xfdd247=_0xfdd247||0xc8;return function(_0x595721){if(_0x595721){return _0x2c0e63[_0x4076('0x1b')](_0xfdd247)['json'](_0x595721);}};}function respondWithFilteredResult(_0x117e72,_0x26ea67){return function(_0x10e848){if(_0x10e848){var _0x2a12a3=typeof _0x26ea67[_0x4076('0x1d')]===_0x4076('0x1e')&&typeof _0x26ea67[_0x4076('0x1f')]===_0x4076('0x1e');var _0x1589ee=_0x10e848[_0x4076('0x20')];var _0x12a907=_0x2a12a3?0x0:_0x26ea67[_0x4076('0x1d')];var _0x41547a=_0x2a12a3?_0x10e848[_0x4076('0x20')]:_0x26ea67[_0x4076('0x1d')]+_0x26ea67['limit'];var _0x476424;if(_0x41547a>=_0x1589ee){_0x41547a=_0x1589ee;_0x476424=0xc8;}else{_0x476424=0xce;}_0x117e72[_0x4076('0x1b')](_0x476424);return _0x117e72[_0x4076('0x21')]('Content-Range',_0x12a907+'-'+_0x41547a+'/'+_0x1589ee)[_0x4076('0x22')](_0x10e848);}return null;};}function patchUpdates(_0x34781b){return function(_0x819248){try{jsonpatch[_0x4076('0x23')](_0x819248,_0x34781b,!![]);}catch(_0xd0f8f){return BPromise[_0x4076('0x24')](_0xd0f8f);}return _0x819248['save']();};}function saveUpdates(_0x7abbff,_0x2def0d){return function(_0xf1fe1b){if(_0xf1fe1b){return _0xf1fe1b['update'](_0x7abbff)[_0x4076('0x25')](function(_0x41ffdc){return _0x41ffdc;});}return null;};}function removeEntity(_0x5f250e,_0x7ee618){return function(_0x11ed88){if(_0x11ed88){return _0x11ed88['destroy']()[_0x4076('0x25')](function(){_0x5f250e[_0x4076('0x1b')](0xcc)[_0x4076('0x1c')]();});}};}function handleEntityNotFound(_0x2e6ad9,_0x394670){return function(_0x4b4911){if(!_0x4b4911){_0x2e6ad9['sendStatus'](0x194);}return _0x4b4911;};}function handleError(_0x2a3391,_0x1bc29b){_0x1bc29b=_0x1bc29b||0x1f4;return function(_0x1c9d45){logger[_0x4076('0x26')](_0x1c9d45[_0x4076('0x27')]);if(_0x1c9d45['name']){delete _0x1c9d45[_0x4076('0x28')];}_0x2a3391[_0x4076('0x1b')](_0x1bc29b)[_0x4076('0x29')](_0x1c9d45);};}exports[_0x4076('0x2a')]=function(_0x24f421,_0x4087d5){var _0x560fe7={},_0x5e704e={},_0x4c2fe9={'count':0x0,'rows':[]};var _0x42e421=_[_0x4076('0x2b')](db['SquareMessage']['rawAttributes'],function(_0x152156){return{'name':_0x152156[_0x4076('0x2c')],'type':_0x152156['type']['key']};});_0x5e704e[_0x4076('0x2d')]=_[_0x4076('0x2b')](_0x42e421,_0x4076('0x28'));_0x5e704e[_0x4076('0x2e')]=_[_0x4076('0x2f')](_0x24f421[_0x4076('0x2e')]);_0x5e704e['filters']=_[_0x4076('0x30')](_0x5e704e['model'],_0x5e704e[_0x4076('0x2e')]);_0x560fe7['attributes']=_['intersection'](_0x5e704e[_0x4076('0x2d')],qs['fields'](_0x24f421[_0x4076('0x2e')][_0x4076('0x31')]));_0x560fe7['attributes']=_0x560fe7[_0x4076('0x32')][_0x4076('0x33')]?_0x560fe7[_0x4076('0x32')]:_0x5e704e[_0x4076('0x2d')];if(!_0x24f421[_0x4076('0x2e')][_0x4076('0x34')]('nolimit')){_0x560fe7['limit']=qs['limit'](_0x24f421[_0x4076('0x2e')][_0x4076('0x1f')]);_0x560fe7[_0x4076('0x1d')]=qs['offset'](_0x24f421['query'][_0x4076('0x1d')]);}_0x560fe7[_0x4076('0x35')]=qs[_0x4076('0x36')](_0x24f421[_0x4076('0x2e')][_0x4076('0x36')]);_0x560fe7['where']=qs[_0x4076('0x37')](_[_0x4076('0x38')](_0x24f421[_0x4076('0x2e')],_0x5e704e['filters']),_0x42e421);if(_0x24f421[_0x4076('0x2e')]['filter']){_0x560fe7[_0x4076('0x39')]=_[_0x4076('0x3a')](_0x560fe7['where'],{'$or':_['map'](_0x42e421,function(_0x3c53e7){if(_0x3c53e7[_0x4076('0x3b')]!==_0x4076('0x3c')){var _0x188167={};_0x188167[_0x3c53e7[_0x4076('0x28')]]={'$like':'%'+_0x24f421[_0x4076('0x2e')][_0x4076('0x3d')]+'%'};return _0x188167;}})});}_0x560fe7=_[_0x4076('0x3a')]({},_0x560fe7,_0x24f421[_0x4076('0x3e')]);var _0x5548b1={'where':_0x560fe7[_0x4076('0x39')]};return db[_0x4076('0x3f')][_0x4076('0x20')](_0x5548b1)[_0x4076('0x25')](function(_0x49f608){_0x4c2fe9[_0x4076('0x20')]=_0x49f608;if(_0x24f421['query']['includeAll']){_0x560fe7[_0x4076('0x40')]=[{'all':!![]}];}return db[_0x4076('0x3f')][_0x4076('0x41')](_0x560fe7);})[_0x4076('0x25')](function(_0x3afeb9){_0x4c2fe9[_0x4076('0x42')]=_0x3afeb9;return _0x4c2fe9;})[_0x4076('0x25')](respondWithFilteredResult(_0x4087d5,_0x560fe7))[_0x4076('0x43')](handleError(_0x4087d5,null));};exports['show']=function(_0x1ecd19,_0x545ca0){var _0x5ad758={'raw':!![],'where':{'id':_0x1ecd19[_0x4076('0x44')]['id']}},_0x5a6e83={};_0x5a6e83[_0x4076('0x2d')]=_[_0x4076('0x2f')](db[_0x4076('0x3f')][_0x4076('0x45')]);_0x5a6e83['query']=_[_0x4076('0x2f')](_0x1ecd19[_0x4076('0x2e')]);_0x5a6e83['filters']=_[_0x4076('0x30')](_0x5a6e83[_0x4076('0x2d')],_0x5a6e83[_0x4076('0x2e')]);_0x5ad758['attributes']=_[_0x4076('0x30')](_0x5a6e83[_0x4076('0x2d')],qs[_0x4076('0x31')](_0x1ecd19[_0x4076('0x2e')]['fields']));_0x5ad758[_0x4076('0x32')]=_0x5ad758['attributes'][_0x4076('0x33')]?_0x5ad758[_0x4076('0x32')]:_0x5a6e83[_0x4076('0x2d')];if(_0x1ecd19[_0x4076('0x2e')][_0x4076('0x46')]){_0x5ad758[_0x4076('0x40')]=[{'all':!![]}];}_0x5ad758=_[_0x4076('0x3a')]({},_0x5ad758,_0x1ecd19[_0x4076('0x3e')]);return db[_0x4076('0x3f')][_0x4076('0x47')](_0x5ad758)[_0x4076('0x25')](handleEntityNotFound(_0x545ca0,null))[_0x4076('0x25')](respondWithResult(_0x545ca0,null))[_0x4076('0x43')](handleError(_0x545ca0,null));};exports[_0x4076('0x48')]=function(_0x163ade,_0x51eb12){return db[_0x4076('0x3f')][_0x4076('0x48')](_0x163ade[_0x4076('0x49')],{})[_0x4076('0x25')](respondWithResult(_0x51eb12,0xc9))[_0x4076('0x43')](handleError(_0x51eb12,null));};exports[_0x4076('0x4a')]=function(_0x42e1a7,_0x28de17){if(_0x42e1a7['body']['id']){delete _0x42e1a7['body']['id'];}return db[_0x4076('0x3f')][_0x4076('0x47')]({'where':{'id':_0x42e1a7['params']['id']}})['then'](handleEntityNotFound(_0x28de17,null))[_0x4076('0x25')](saveUpdates(_0x42e1a7[_0x4076('0x49')],null))[_0x4076('0x25')](respondWithResult(_0x28de17,null))[_0x4076('0x43')](handleError(_0x28de17,null));};exports[_0x4076('0x4b')]=function(_0x5512a8,_0x28cd72){return db[_0x4076('0x3f')][_0x4076('0x47')]({'where':{'id':_0x5512a8['params']['id']}})['then'](handleEntityNotFound(_0x28cd72,null))[_0x4076('0x25')](removeEntity(_0x28cd72,null))[_0x4076('0x43')](handleError(_0x28cd72,null));}; \ No newline at end of file +var _0x11ec=['rimraf','zip-dir','fast-json-patch','request-promise','moment','mustache','path','sox','to-csv','ejs','lodash','squel','jsforce','ioredis','../../components/auth/service','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','sendStatus','status','json','offset','undefined','limit','count','set','apply','save','update','then','destroy','end','error','stack','name','send','index','map','rawAttributes','fieldName','type','key','model','query','keys','filters','intersection','fields','attributes','length','hasOwnProperty','nolimit','order','where','filter','VIRTUAL','merge','options','includeAll','include','SquareMessage','findAll','rows','catch','show','params','create','body','eml-format'];(function(_0x3dd567,_0x276ca9){var _0x415024=function(_0x3ae159){while(--_0x3ae159){_0x3dd567['push'](_0x3dd567['shift']());}};_0x415024(++_0x276ca9);}(_0x11ec,0xda));var _0xc11e=function(_0x37756b,_0x24db76){_0x37756b=_0x37756b-0x0;var _0x46efec=_0x11ec[_0x37756b];return _0x46efec;};'use strict';var emlformat=require(_0xc11e('0x0'));var rimraf=require(_0xc11e('0x1'));var zipdir=require(_0xc11e('0x2'));var jsonpatch=require(_0xc11e('0x3'));var rp=require(_0xc11e('0x4'));var moment=require(_0xc11e('0x5'));var BPromise=require('bluebird');var Mustache=require(_0xc11e('0x6'));var util=require('util');var path=require(_0xc11e('0x7'));var sox=require(_0xc11e('0x8'));var csv=require(_0xc11e('0x9'));var ejs=require(_0xc11e('0xa'));var fs=require('fs');var fs_extra=require('fs-extra');var _=require(_0xc11e('0xb'));var squel=require(_0xc11e('0xc'));var crypto=require('crypto');var jsforce=require(_0xc11e('0xd'));var deskjs=require('desk.js');var toCsv=require(_0xc11e('0x9'));var querystring=require('querystring');var Papa=require('papaparse');var Redis=require(_0xc11e('0xe'));var authService=require(_0xc11e('0xf'));var qs=require('../../components/parsers/qs');var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0xc11e('0x10'));var logger=require(_0xc11e('0x11'))(_0xc11e('0x12'));var utils=require(_0xc11e('0x13'));var config=require(_0xc11e('0x14'));var licenseUtil=require(_0xc11e('0x15'));var db=require(_0xc11e('0x16'))['db'];function respondWithStatusCode(_0x4fb5c6,_0x6cd04d){_0x6cd04d=_0x6cd04d||0xcc;return function(_0x299f07){if(_0x299f07){return _0x4fb5c6[_0xc11e('0x17')](_0x6cd04d);}return _0x4fb5c6[_0xc11e('0x18')](_0x6cd04d)['end']();};}function respondWithResult(_0x101455,_0x476932){_0x476932=_0x476932||0xc8;return function(_0x28520d){if(_0x28520d){return _0x101455['status'](_0x476932)[_0xc11e('0x19')](_0x28520d);}};}function respondWithFilteredResult(_0x4b144f,_0x43520f){return function(_0xa670a9){if(_0xa670a9){var _0x11046f=typeof _0x43520f[_0xc11e('0x1a')]===_0xc11e('0x1b')&&typeof _0x43520f[_0xc11e('0x1c')]===_0xc11e('0x1b');var _0x502ea8=_0xa670a9[_0xc11e('0x1d')];var _0x2abb22=_0x11046f?0x0:_0x43520f[_0xc11e('0x1a')];var _0x26b62b=_0x11046f?_0xa670a9[_0xc11e('0x1d')]:_0x43520f[_0xc11e('0x1a')]+_0x43520f[_0xc11e('0x1c')];var _0x44b398;if(_0x26b62b>=_0x502ea8){_0x26b62b=_0x502ea8;_0x44b398=0xc8;}else{_0x44b398=0xce;}_0x4b144f['status'](_0x44b398);return _0x4b144f[_0xc11e('0x1e')]('Content-Range',_0x2abb22+'-'+_0x26b62b+'/'+_0x502ea8)[_0xc11e('0x19')](_0xa670a9);}return null;};}function patchUpdates(_0x423d99){return function(_0x43446b){try{jsonpatch[_0xc11e('0x1f')](_0x43446b,_0x423d99,!![]);}catch(_0x2bbb2){return BPromise['reject'](_0x2bbb2);}return _0x43446b[_0xc11e('0x20')]();};}function saveUpdates(_0x2067d,_0x5ef223){return function(_0x17b24c){if(_0x17b24c){return _0x17b24c[_0xc11e('0x21')](_0x2067d)[_0xc11e('0x22')](function(_0x2fd35e){return _0x2fd35e;});}return null;};}function removeEntity(_0x187b89,_0x3975cc){return function(_0x20cbb6){if(_0x20cbb6){return _0x20cbb6[_0xc11e('0x23')]()[_0xc11e('0x22')](function(){_0x187b89['status'](0xcc)[_0xc11e('0x24')]();});}};}function handleEntityNotFound(_0x33b418,_0x2b7b17){return function(_0x15963c){if(!_0x15963c){_0x33b418[_0xc11e('0x17')](0x194);}return _0x15963c;};}function handleError(_0x153bbf,_0x2efb81){_0x2efb81=_0x2efb81||0x1f4;return function(_0x548e4e){logger[_0xc11e('0x25')](_0x548e4e[_0xc11e('0x26')]);if(_0x548e4e[_0xc11e('0x27')]){delete _0x548e4e[_0xc11e('0x27')];}_0x153bbf[_0xc11e('0x18')](_0x2efb81)[_0xc11e('0x28')](_0x548e4e);};}exports[_0xc11e('0x29')]=function(_0x2cd53e,_0x536f80){var _0x30ef0d={},_0x2262d8={},_0x187af6={'count':0x0,'rows':[]};var _0x6bfe83=_[_0xc11e('0x2a')](db['SquareMessage'][_0xc11e('0x2b')],function(_0x492d08){return{'name':_0x492d08[_0xc11e('0x2c')],'type':_0x492d08[_0xc11e('0x2d')][_0xc11e('0x2e')]};});_0x2262d8[_0xc11e('0x2f')]=_[_0xc11e('0x2a')](_0x6bfe83,'name');_0x2262d8[_0xc11e('0x30')]=_[_0xc11e('0x31')](_0x2cd53e[_0xc11e('0x30')]);_0x2262d8[_0xc11e('0x32')]=_[_0xc11e('0x33')](_0x2262d8['model'],_0x2262d8[_0xc11e('0x30')]);_0x30ef0d['attributes']=_['intersection'](_0x2262d8[_0xc11e('0x2f')],qs[_0xc11e('0x34')](_0x2cd53e[_0xc11e('0x30')]['fields']));_0x30ef0d[_0xc11e('0x35')]=_0x30ef0d['attributes'][_0xc11e('0x36')]?_0x30ef0d[_0xc11e('0x35')]:_0x2262d8['model'];if(!_0x2cd53e[_0xc11e('0x30')][_0xc11e('0x37')](_0xc11e('0x38'))){_0x30ef0d['limit']=qs[_0xc11e('0x1c')](_0x2cd53e[_0xc11e('0x30')]['limit']);_0x30ef0d[_0xc11e('0x1a')]=qs[_0xc11e('0x1a')](_0x2cd53e[_0xc11e('0x30')][_0xc11e('0x1a')]);}_0x30ef0d[_0xc11e('0x39')]=qs['sort'](_0x2cd53e[_0xc11e('0x30')]['sort']);_0x30ef0d[_0xc11e('0x3a')]=qs[_0xc11e('0x32')](_['pick'](_0x2cd53e['query'],_0x2262d8['filters']),_0x6bfe83);if(_0x2cd53e[_0xc11e('0x30')][_0xc11e('0x3b')]){_0x30ef0d['where']=_['merge'](_0x30ef0d[_0xc11e('0x3a')],{'$or':_['map'](_0x6bfe83,function(_0x256561){if(_0x256561[_0xc11e('0x2d')]!==_0xc11e('0x3c')){var _0xdbcefc={};_0xdbcefc[_0x256561[_0xc11e('0x27')]]={'$like':'%'+_0x2cd53e[_0xc11e('0x30')][_0xc11e('0x3b')]+'%'};return _0xdbcefc;}})});}_0x30ef0d=_[_0xc11e('0x3d')]({},_0x30ef0d,_0x2cd53e[_0xc11e('0x3e')]);var _0x3eb7ce={'where':_0x30ef0d[_0xc11e('0x3a')]};return db['SquareMessage'][_0xc11e('0x1d')](_0x3eb7ce)[_0xc11e('0x22')](function(_0xe289f4){_0x187af6[_0xc11e('0x1d')]=_0xe289f4;if(_0x2cd53e[_0xc11e('0x30')][_0xc11e('0x3f')]){_0x30ef0d[_0xc11e('0x40')]=[{'all':!![]}];}return db[_0xc11e('0x41')][_0xc11e('0x42')](_0x30ef0d);})[_0xc11e('0x22')](function(_0x2e47be){_0x187af6[_0xc11e('0x43')]=_0x2e47be;return _0x187af6;})[_0xc11e('0x22')](respondWithFilteredResult(_0x536f80,_0x30ef0d))[_0xc11e('0x44')](handleError(_0x536f80,null));};exports[_0xc11e('0x45')]=function(_0xe29a6,_0x432a77){var _0xd98b26={'raw':!![],'where':{'id':_0xe29a6[_0xc11e('0x46')]['id']}},_0xd8ef83={};_0xd8ef83[_0xc11e('0x2f')]=_[_0xc11e('0x31')](db[_0xc11e('0x41')][_0xc11e('0x2b')]);_0xd8ef83[_0xc11e('0x30')]=_[_0xc11e('0x31')](_0xe29a6[_0xc11e('0x30')]);_0xd8ef83[_0xc11e('0x32')]=_[_0xc11e('0x33')](_0xd8ef83[_0xc11e('0x2f')],_0xd8ef83[_0xc11e('0x30')]);_0xd98b26['attributes']=_[_0xc11e('0x33')](_0xd8ef83[_0xc11e('0x2f')],qs[_0xc11e('0x34')](_0xe29a6[_0xc11e('0x30')][_0xc11e('0x34')]));_0xd98b26[_0xc11e('0x35')]=_0xd98b26[_0xc11e('0x35')][_0xc11e('0x36')]?_0xd98b26[_0xc11e('0x35')]:_0xd8ef83['model'];if(_0xe29a6[_0xc11e('0x30')][_0xc11e('0x3f')]){_0xd98b26[_0xc11e('0x40')]=[{'all':!![]}];}_0xd98b26=_[_0xc11e('0x3d')]({},_0xd98b26,_0xe29a6[_0xc11e('0x3e')]);return db[_0xc11e('0x41')]['find'](_0xd98b26)[_0xc11e('0x22')](handleEntityNotFound(_0x432a77,null))[_0xc11e('0x22')](respondWithResult(_0x432a77,null))['catch'](handleError(_0x432a77,null));};exports[_0xc11e('0x47')]=function(_0x539b42,_0x5ad42b){return db[_0xc11e('0x41')][_0xc11e('0x47')](_0x539b42[_0xc11e('0x48')],{})[_0xc11e('0x22')](respondWithResult(_0x5ad42b,0xc9))[_0xc11e('0x44')](handleError(_0x5ad42b,null));};exports[_0xc11e('0x21')]=function(_0x236381,_0x303062){if(_0x236381[_0xc11e('0x48')]['id']){delete _0x236381[_0xc11e('0x48')]['id'];}return db[_0xc11e('0x41')]['find']({'where':{'id':_0x236381[_0xc11e('0x46')]['id']}})[_0xc11e('0x22')](handleEntityNotFound(_0x303062,null))[_0xc11e('0x22')](saveUpdates(_0x236381['body'],null))[_0xc11e('0x22')](respondWithResult(_0x303062,null))[_0xc11e('0x44')](handleError(_0x303062,null));};exports[_0xc11e('0x23')]=function(_0x315b1d,_0x12283c){return db[_0xc11e('0x41')]['find']({'where':{'id':_0x315b1d[_0xc11e('0x46')]['id']}})[_0xc11e('0x22')](handleEntityNotFound(_0x12283c,null))[_0xc11e('0x22')](removeEntity(_0x12283c,null))[_0xc11e('0x44')](handleError(_0x12283c,null));}; \ No newline at end of file diff --git a/server/api/squareMessage/squareMessage.model.js b/server/api/squareMessage/squareMessage.model.js index 6bd1ed4..e928656 100644 --- a/server/api/squareMessage/squareMessage.model.js +++ b/server/api/squareMessage/squareMessage.model.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xaa91=['util','../../config/logger','moment','bluebird','request-promise','rimraf','../../config/environment','./squareMessage.attributes','square_messages'];(function(_0x258fb0,_0x5362dc){var _0x4d1afe=function(_0x1c8f24){while(--_0x1c8f24){_0x258fb0['push'](_0x258fb0['shift']());}};_0x4d1afe(++_0x5362dc);}(_0xaa91,0x87));var _0x1aa9=function(_0x52684c,_0x58684d){_0x52684c=_0x52684c-0x0;var _0x3d1410=_0xaa91[_0x52684c];return _0x3d1410;};'use strict';var _=require('lodash');var util=require(_0x1aa9('0x0'));var logger=require(_0x1aa9('0x1'))('api');var moment=require(_0x1aa9('0x2'));var BPromise=require(_0x1aa9('0x3'));var rp=require(_0x1aa9('0x4'));var fs=require('fs');var path=require('path');var rimraf=require(_0x1aa9('0x5'));var config=require(_0x1aa9('0x6'));var attributes=require(_0x1aa9('0x7'));module['exports']=function(_0x54193b,_0x3dda47){return _0x54193b['define']('SquareMessage',attributes,{'tableName':_0x1aa9('0x8'),'paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file +var _0x4418=['path','rimraf','../../config/environment','./squareMessage.attributes','exports','define','SquareMessage','square_messages','util','../../config/logger','api','moment','bluebird','request-promise'];(function(_0x5d6028,_0x1f514b){var _0xbd0db=function(_0x2f65cb){while(--_0x2f65cb){_0x5d6028['push'](_0x5d6028['shift']());}};_0xbd0db(++_0x1f514b);}(_0x4418,0x1f2));var _0x8441=function(_0x1477ef,_0x54a5d6){_0x1477ef=_0x1477ef-0x0;var _0x164acd=_0x4418[_0x1477ef];return _0x164acd;};'use strict';var _=require('lodash');var util=require(_0x8441('0x0'));var logger=require(_0x8441('0x1'))(_0x8441('0x2'));var moment=require(_0x8441('0x3'));var BPromise=require(_0x8441('0x4'));var rp=require(_0x8441('0x5'));var fs=require('fs');var path=require(_0x8441('0x6'));var rimraf=require(_0x8441('0x7'));var config=require(_0x8441('0x8'));var attributes=require(_0x8441('0x9'));module[_0x8441('0xa')]=function(_0x3ff23c,_0x4f75ed){return _0x3ff23c[_0x8441('0xb')](_0x8441('0xc'),attributes,{'tableName':_0x8441('0xd'),'paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file diff --git a/server/api/squareMessage/squareMessage.rpc.js b/server/api/squareMessage/squareMessage.rpc.js index 45e2ae6..8316a01 100644 --- a/server/api/squareMessage/squareMessage.rpc.js +++ b/server/api/squareMessage/squareMessage.rpc.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xc97c=['info','SquareMessage,\x20%s,\x20%s','request\x20sent','debug','SquareMessage,\x20%s,\x20%s,\x20%s','error','code','message','result','catch','SquareMessage','body','options','raw','CreateSquareMessage','lodash','moment','randomstring','../../mysqldb','../../config/utils','../../config/logger','../../config/environment','jayson/promise','client','request','then'];(function(_0x42ea65,_0x166150){var _0x51ac8a=function(_0x11e6a2){while(--_0x11e6a2){_0x42ea65['push'](_0x42ea65['shift']());}};_0x51ac8a(++_0x166150);}(_0xc97c,0x1c9));var _0xcc97=function(_0x520bd1,_0x3f1896){_0x520bd1=_0x520bd1-0x0;var _0x43fb23=_0xc97c[_0x520bd1];return _0x43fb23;};'use strict';var _=require(_0xcc97('0x0'));var util=require('util');var moment=require(_0xcc97('0x1'));var BPromise=require('bluebird');var rs=require(_0xcc97('0x2'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0xcc97('0x3'))['db'];var utils=require(_0xcc97('0x4'));var logger=require(_0xcc97('0x5'))('rpc');var config=require(_0xcc97('0x6'));var jayson=require(_0xcc97('0x7'));var client=jayson[_0xcc97('0x8')]['http']({'port':0x232a});function respondWithRpcPromise(_0x1eec82,_0x229559,_0x1f1df6){return new BPromise(function(_0x5d758a,_0x11ada3){return client[_0xcc97('0x9')](_0x1eec82,_0x1f1df6)[_0xcc97('0xa')](function(_0x374d45){logger[_0xcc97('0xb')](_0xcc97('0xc'),_0x229559,_0xcc97('0xd'));logger[_0xcc97('0xe')](_0xcc97('0xf'),_0x229559,'request\x20sent',JSON['stringify'](_0x374d45));if(_0x374d45[_0xcc97('0x10')]){if(_0x374d45['error'][_0xcc97('0x11')]===0x1f4){logger[_0xcc97('0x10')]('SquareMessage,\x20%s,\x20%s',_0x229559,_0x374d45[_0xcc97('0x10')][_0xcc97('0x12')]);return _0x11ada3(_0x374d45['error'][_0xcc97('0x12')]);}logger[_0xcc97('0x10')](_0xcc97('0xc'),_0x229559,_0x374d45[_0xcc97('0x10')][_0xcc97('0x12')]);return _0x5d758a(_0x374d45[_0xcc97('0x10')][_0xcc97('0x12')]);}else{logger['info'](_0xcc97('0xc'),_0x229559,_0xcc97('0xd'));_0x5d758a(_0x374d45[_0xcc97('0x13')][_0xcc97('0x12')]);}})[_0xcc97('0x14')](function(_0x24ac23){logger[_0xcc97('0x10')](_0xcc97('0xc'),_0x229559,_0x24ac23);_0x11ada3(_0x24ac23);});});}exports['CreateSquareMessage']=function(_0x37178f){var _0x5517a8=this;return new Promise(function(_0x59c8ab,_0x28caab){return db[_0xcc97('0x15')]['create'](_0x37178f[_0xcc97('0x16')],{'raw':_0x37178f[_0xcc97('0x17')]?_0x37178f[_0xcc97('0x17')][_0xcc97('0x18')]===undefined?!![]:![]:!![]})[_0xcc97('0xa')](function(_0x152ab9){logger[_0xcc97('0xb')](_0xcc97('0x19'),_0x37178f);logger[_0xcc97('0xe')](_0xcc97('0x19'),_0x37178f,JSON['stringify'](_0x152ab9));_0x59c8ab(_0x152ab9);})[_0xcc97('0x14')](function(_0x48df65){logger[_0xcc97('0x10')](_0xcc97('0x19'),_0x48df65[_0xcc97('0x12')],_0x37178f);_0x28caab(_0x5517a8[_0xcc97('0x10')](0x1f4,_0x48df65[_0xcc97('0x12')]));});});}; \ No newline at end of file +var _0x34d0=['util','randomstring','../../mysqldb','../../config/utils','../../config/logger','rpc','jayson/promise','client','http','request','then','info','SquareMessage,\x20%s,\x20%s','request\x20sent','SquareMessage,\x20%s,\x20%s,\x20%s','stringify','error','message','result','catch','SquareMessage','create','body','options','lodash'];(function(_0x321bb2,_0x202794){var _0x9c12ed=function(_0x263dd3){while(--_0x263dd3){_0x321bb2['push'](_0x321bb2['shift']());}};_0x9c12ed(++_0x202794);}(_0x34d0,0x7c));var _0x034d=function(_0x8ba152,_0x10ecc9){_0x8ba152=_0x8ba152-0x0;var _0x21534f=_0x34d0[_0x8ba152];return _0x21534f;};'use strict';var _=require(_0x034d('0x0'));var util=require(_0x034d('0x1'));var moment=require('moment');var BPromise=require('bluebird');var rs=require(_0x034d('0x2'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0x034d('0x3'))['db'];var utils=require(_0x034d('0x4'));var logger=require(_0x034d('0x5'))(_0x034d('0x6'));var config=require('../../config/environment');var jayson=require(_0x034d('0x7'));var client=jayson[_0x034d('0x8')][_0x034d('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x4a6833,_0x14daf8,_0x3a13da){return new BPromise(function(_0x5bade3,_0x5aaa37){return client[_0x034d('0xa')](_0x4a6833,_0x3a13da)[_0x034d('0xb')](function(_0x29a738){logger[_0x034d('0xc')](_0x034d('0xd'),_0x14daf8,_0x034d('0xe'));logger['debug'](_0x034d('0xf'),_0x14daf8,'request\x20sent',JSON[_0x034d('0x10')](_0x29a738));if(_0x29a738[_0x034d('0x11')]){if(_0x29a738[_0x034d('0x11')]['code']===0x1f4){logger['error'](_0x034d('0xd'),_0x14daf8,_0x29a738['error'][_0x034d('0x12')]);return _0x5aaa37(_0x29a738[_0x034d('0x11')][_0x034d('0x12')]);}logger[_0x034d('0x11')](_0x034d('0xd'),_0x14daf8,_0x29a738[_0x034d('0x11')]['message']);return _0x5bade3(_0x29a738[_0x034d('0x11')][_0x034d('0x12')]);}else{logger[_0x034d('0xc')]('SquareMessage,\x20%s,\x20%s',_0x14daf8,_0x034d('0xe'));_0x5bade3(_0x29a738[_0x034d('0x13')]['message']);}})[_0x034d('0x14')](function(_0x26892f){logger[_0x034d('0x11')](_0x034d('0xd'),_0x14daf8,_0x26892f);_0x5aaa37(_0x26892f);});});}exports['CreateSquareMessage']=function(_0x382486){var _0x426771=this;return new Promise(function(_0x565511,_0x49723c){return db[_0x034d('0x15')][_0x034d('0x16')](_0x382486[_0x034d('0x17')],{'raw':_0x382486['options']?_0x382486[_0x034d('0x18')]['raw']===undefined?!![]:![]:!![]})[_0x034d('0xb')](function(_0x26687a){logger[_0x034d('0xc')]('CreateSquareMessage',_0x382486);logger['debug']('CreateSquareMessage',_0x382486,JSON[_0x034d('0x10')](_0x26687a));_0x565511(_0x26687a);})['catch'](function(_0x25413a){logger[_0x034d('0x11')]('CreateSquareMessage',_0x25413a[_0x034d('0x12')],_0x382486);_0x49723c(_0x426771['error'](0x1f4,_0x25413a[_0x034d('0x12')]));});});}; \ No newline at end of file diff --git a/server/api/squareOdbc/index.js b/server/api/squareOdbc/index.js index 6b328a2..98dd045 100644 --- a/server/api/squareOdbc/index.js +++ b/server/api/squareOdbc/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x287c=['fs-extra','../../config/environment','./squareOdbc.controller','/:id','isAuthenticated','show','get','/:id/test','15s','test','post','update','delete','destroy','multer','path','connect-timeout'];(function(_0x4aa148,_0x4fcf37){var _0x21fcd5=function(_0x2bb231){while(--_0x2bb231){_0x4aa148['push'](_0x4aa148['shift']());}};_0x21fcd5(++_0x4fcf37);}(_0x287c,0x74));var _0xc287=function(_0x4f0301,_0x2795a7){_0x4f0301=_0x4f0301-0x0;var _0x19b4ea=_0x287c[_0x4f0301];return _0x19b4ea;};'use strict';var multer=require(_0xc287('0x0'));var util=require('util');var path=require(_0xc287('0x1'));var timeout=require(_0xc287('0x2'));var express=require('express');var router=express['Router']();var fs_extra=require(_0xc287('0x3'));var auth=require('../../components/auth/service');var interaction=require('../../components/interaction/service');var config=require(_0xc287('0x4'));var controller=require(_0xc287('0x5'));router['get']('/',auth['isAuthenticated'](),controller['index']);router['get'](_0xc287('0x6'),auth[_0xc287('0x7')](),controller[_0xc287('0x8')]);router[_0xc287('0x9')](_0xc287('0xa'),auth['isAuthenticated'](),timeout(_0xc287('0xb')),controller[_0xc287('0xc')]);router[_0xc287('0xd')]('/',auth[_0xc287('0x7')](),controller['create']);router['put'](_0xc287('0x6'),auth['isAuthenticated'](),controller[_0xc287('0xe')]);router[_0xc287('0xf')](_0xc287('0x6'),auth[_0xc287('0x7')](),controller[_0xc287('0x10')]);module['exports']=router; \ No newline at end of file +var _0x1c9a=['/:id/test','15s','test','post','put','update','delete','/:id','destroy','exports','multer','util','path','connect-timeout','express','Router','../../components/auth/service','../../components/interaction/service','../../config/environment','./squareOdbc.controller','get','isAuthenticated','index','show'];(function(_0x3faa16,_0x31b019){var _0xce5de0=function(_0x1f0038){while(--_0x1f0038){_0x3faa16['push'](_0x3faa16['shift']());}};_0xce5de0(++_0x31b019);}(_0x1c9a,0x1d2));var _0xa1c9=function(_0x21a506,_0x471d24){_0x21a506=_0x21a506-0x0;var _0x29e33e=_0x1c9a[_0x21a506];return _0x29e33e;};'use strict';var multer=require(_0xa1c9('0x0'));var util=require(_0xa1c9('0x1'));var path=require(_0xa1c9('0x2'));var timeout=require(_0xa1c9('0x3'));var express=require(_0xa1c9('0x4'));var router=express[_0xa1c9('0x5')]();var fs_extra=require('fs-extra');var auth=require(_0xa1c9('0x6'));var interaction=require(_0xa1c9('0x7'));var config=require(_0xa1c9('0x8'));var controller=require(_0xa1c9('0x9'));router[_0xa1c9('0xa')]('/',auth[_0xa1c9('0xb')](),controller[_0xa1c9('0xc')]);router[_0xa1c9('0xa')]('/:id',auth[_0xa1c9('0xb')](),controller[_0xa1c9('0xd')]);router[_0xa1c9('0xa')](_0xa1c9('0xe'),auth[_0xa1c9('0xb')](),timeout(_0xa1c9('0xf')),controller[_0xa1c9('0x10')]);router[_0xa1c9('0x11')]('/',auth[_0xa1c9('0xb')](),controller['create']);router[_0xa1c9('0x12')]('/:id',auth['isAuthenticated'](),controller[_0xa1c9('0x13')]);router[_0xa1c9('0x14')](_0xa1c9('0x15'),auth[_0xa1c9('0xb')](),controller[_0xa1c9('0x16')]);module[_0xa1c9('0x17')]=router; \ No newline at end of file diff --git a/server/api/squareOdbc/squareOdbc.attributes.js b/server/api/squareOdbc/squareOdbc.attributes.js index f24ed81..76e6904 100644 --- a/server/api/squareOdbc/squareOdbc.attributes.js +++ b/server/api/squareOdbc/squareOdbc.attributes.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xa0b7=['name','STRING','sequelize','exports'];(function(_0x233a13,_0x355a55){var _0x5ed596=function(_0x4872a0){while(--_0x4872a0){_0x233a13['push'](_0x233a13['shift']());}};_0x5ed596(++_0x355a55);}(_0xa0b7,0xd6));var _0x7a0b=function(_0x3511d3,_0x4107ae){_0x3511d3=_0x3511d3-0x0;var _0x5d6321=_0xa0b7[_0x3511d3];return _0x5d6321;};'use strict';var Sequelize=require(_0x7a0b('0x0'));module[_0x7a0b('0x1')]={'name':{'type':Sequelize['STRING'],'unique':_0x7a0b('0x2'),'allowNull':![]},'dsn':{'type':Sequelize[_0x7a0b('0x3')]},'description':{'type':Sequelize[_0x7a0b('0x3')]}}; \ No newline at end of file +var _0xa63a=['STRING','name','sequelize','exports'];(function(_0x17e16b,_0x4c5549){var _0x49da78=function(_0xeb0b66){while(--_0xeb0b66){_0x17e16b['push'](_0x17e16b['shift']());}};_0x49da78(++_0x4c5549);}(_0xa63a,0x11a));var _0xaa63=function(_0x52e68e,_0x309912){_0x52e68e=_0x52e68e-0x0;var _0x3211a4=_0xa63a[_0x52e68e];return _0x3211a4;};'use strict';var Sequelize=require(_0xaa63('0x0'));module[_0xaa63('0x1')]={'name':{'type':Sequelize[_0xaa63('0x2')],'unique':_0xaa63('0x3'),'allowNull':![]},'dsn':{'type':Sequelize['STRING']},'description':{'type':Sequelize[_0xaa63('0x2')]}}; \ No newline at end of file diff --git a/server/api/squareOdbc/squareOdbc.controller.js b/server/api/squareOdbc/squareOdbc.controller.js index e766c82..4bcaddf 100644 --- a/server/api/squareOdbc/squareOdbc.controller.js +++ b/server/api/squareOdbc/squareOdbc.controller.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xef98=['params','find','create','body','user','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','get','UserProfileSection','autoAssociation','UserProfileResource','error','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','test','odbc','openSync','dsn','closeSync','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','util','path','sox','fs-extra','lodash','crypto','jsforce','desk.js','to-csv','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','api','../../config/utils','sendStatus','status','end','json','offset','limit','count','set','save','update','then','destroy','ODBC','stack','name','send','index','rawAttributes','fieldName','model','map','keys','filters','attributes','intersection','fields','length','hasOwnProperty','query','sort','where','pick','filter','merge','type','VIRTUAL','options','includeAll','include','SquareOdbc','findAll','catch','show'];(function(_0x148f10,_0x4047d2){var _0x5a8bfb=function(_0x116f10){while(--_0x116f10){_0x148f10['push'](_0x148f10['shift']());}};_0x5a8bfb(++_0x4047d2);}(_0xef98,0x68));var _0x8ef9=function(_0x1252af,_0x422be8){_0x1252af=_0x1252af-0x0;var _0x35f7d7=_0xef98[_0x1252af];return _0x35f7d7;};'use strict';var emlformat=require(_0x8ef9('0x0'));var rimraf=require(_0x8ef9('0x1'));var zipdir=require(_0x8ef9('0x2'));var jsonpatch=require(_0x8ef9('0x3'));var rp=require(_0x8ef9('0x4'));var moment=require(_0x8ef9('0x5'));var BPromise=require(_0x8ef9('0x6'));var Mustache=require(_0x8ef9('0x7'));var util=require(_0x8ef9('0x8'));var path=require(_0x8ef9('0x9'));var sox=require(_0x8ef9('0xa'));var csv=require('to-csv');var ejs=require('ejs');var fs=require('fs');var fs_extra=require(_0x8ef9('0xb'));var _=require(_0x8ef9('0xc'));var squel=require('squel');var crypto=require(_0x8ef9('0xd'));var jsforce=require(_0x8ef9('0xe'));var deskjs=require(_0x8ef9('0xf'));var toCsv=require(_0x8ef9('0x10'));var querystring=require('querystring');var Papa=require(_0x8ef9('0x11'));var Redis=require(_0x8ef9('0x12'));var authService=require(_0x8ef9('0x13'));var qs=require(_0x8ef9('0x14'));var as=require(_0x8ef9('0x15'));var hardwareService=require(_0x8ef9('0x16'));var logger=require('../../config/logger')(_0x8ef9('0x17'));var utils=require(_0x8ef9('0x18'));var config=require('../../config/environment');var licenseUtil=require('../../config/license/util');var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0xd560f2,_0x2c91b7){_0x2c91b7=_0x2c91b7||0xcc;return function(_0x5efc2e){if(_0x5efc2e){return _0xd560f2[_0x8ef9('0x19')](_0x2c91b7);}return _0xd560f2[_0x8ef9('0x1a')](_0x2c91b7)[_0x8ef9('0x1b')]();};}function respondWithResult(_0x7d129c,_0x3e39d1){_0x3e39d1=_0x3e39d1||0xc8;return function(_0x308063){if(_0x308063){return _0x7d129c['status'](_0x3e39d1)[_0x8ef9('0x1c')](_0x308063);}};}function respondWithFilteredResult(_0x1af97d,_0xeed794){return function(_0xec962a){if(_0xec962a){var _0x890709=typeof _0xeed794[_0x8ef9('0x1d')]==='undefined'&&typeof _0xeed794[_0x8ef9('0x1e')]==='undefined';var _0x403b58=_0xec962a['count'];var _0x15ff55=_0x890709?0x0:_0xeed794[_0x8ef9('0x1d')];var _0x1ac478=_0x890709?_0xec962a[_0x8ef9('0x1f')]:_0xeed794[_0x8ef9('0x1d')]+_0xeed794[_0x8ef9('0x1e')];var _0xd4a9fc;if(_0x1ac478>=_0x403b58){_0x1ac478=_0x403b58;_0xd4a9fc=0xc8;}else{_0xd4a9fc=0xce;}_0x1af97d[_0x8ef9('0x1a')](_0xd4a9fc);return _0x1af97d[_0x8ef9('0x20')]('Content-Range',_0x15ff55+'-'+_0x1ac478+'/'+_0x403b58)[_0x8ef9('0x1c')](_0xec962a);}return null;};}function patchUpdates(_0x2ef27c){return function(_0x41881d){try{jsonpatch['apply'](_0x41881d,_0x2ef27c,!![]);}catch(_0x3b6a81){return BPromise['reject'](_0x3b6a81);}return _0x41881d[_0x8ef9('0x21')]();};}function saveUpdates(_0x1c0839,_0x3cd5c4){return function(_0x409b58){if(_0x409b58){return _0x409b58[_0x8ef9('0x22')](_0x1c0839)[_0x8ef9('0x23')](function(_0x2693b7){return _0x2693b7;});}return null;};}function removeEntity(_0x5e40cd,_0x41c002){return function(_0x13ba0e){if(_0x13ba0e){return _0x13ba0e[_0x8ef9('0x24')]()[_0x8ef9('0x23')](function(){var _0x2b7524=_0x13ba0e['get']({'plain':!![]});var _0x46c078=_0x8ef9('0x25');return db['UserProfileResource'][_0x8ef9('0x24')]({'where':{'type':_0x46c078,'resourceId':_0x2b7524['id']}})[_0x8ef9('0x23')](function(){return _0x13ba0e;});})['then'](function(){_0x5e40cd['status'](0xcc)[_0x8ef9('0x1b')]();});}};}function handleEntityNotFound(_0x573c60,_0x13743c){return function(_0x19a09f){if(!_0x19a09f){_0x573c60['sendStatus'](0x194);}return _0x19a09f;};}function handleError(_0x47a70a,_0x68b30){_0x68b30=_0x68b30||0x1f4;return function(_0x4108da){logger['error'](_0x4108da[_0x8ef9('0x26')]);if(_0x4108da[_0x8ef9('0x27')]){delete _0x4108da['name'];}_0x47a70a[_0x8ef9('0x1a')](_0x68b30)[_0x8ef9('0x28')](_0x4108da);};}exports[_0x8ef9('0x29')]=function(_0x2a88da,_0x176ace){var _0x518d50={},_0x3ec9b4={},_0x2ec7ac={'count':0x0,'rows':[]};var _0x3df3dd=_['map'](db['SquareOdbc'][_0x8ef9('0x2a')],function(_0x181de2){return{'name':_0x181de2[_0x8ef9('0x2b')],'type':_0x181de2['type']['key']};});_0x3ec9b4[_0x8ef9('0x2c')]=_[_0x8ef9('0x2d')](_0x3df3dd,_0x8ef9('0x27'));_0x3ec9b4['query']=_[_0x8ef9('0x2e')](_0x2a88da['query']);_0x3ec9b4[_0x8ef9('0x2f')]=_['intersection'](_0x3ec9b4[_0x8ef9('0x2c')],_0x3ec9b4['query']);_0x518d50[_0x8ef9('0x30')]=_[_0x8ef9('0x31')](_0x3ec9b4[_0x8ef9('0x2c')],qs[_0x8ef9('0x32')](_0x2a88da['query'][_0x8ef9('0x32')]));_0x518d50[_0x8ef9('0x30')]=_0x518d50['attributes'][_0x8ef9('0x33')]?_0x518d50['attributes']:_0x3ec9b4[_0x8ef9('0x2c')];if(!_0x2a88da['query'][_0x8ef9('0x34')]('nolimit')){_0x518d50[_0x8ef9('0x1e')]=qs[_0x8ef9('0x1e')](_0x2a88da[_0x8ef9('0x35')][_0x8ef9('0x1e')]);_0x518d50[_0x8ef9('0x1d')]=qs['offset'](_0x2a88da[_0x8ef9('0x35')]['offset']);}_0x518d50['order']=qs[_0x8ef9('0x36')](_0x2a88da['query'][_0x8ef9('0x36')]);_0x518d50[_0x8ef9('0x37')]=qs[_0x8ef9('0x2f')](_[_0x8ef9('0x38')](_0x2a88da[_0x8ef9('0x35')],_0x3ec9b4[_0x8ef9('0x2f')]),_0x3df3dd);if(_0x2a88da[_0x8ef9('0x35')][_0x8ef9('0x39')]){_0x518d50[_0x8ef9('0x37')]=_[_0x8ef9('0x3a')](_0x518d50[_0x8ef9('0x37')],{'$or':_[_0x8ef9('0x2d')](_0x3df3dd,function(_0x2b7252){if(_0x2b7252[_0x8ef9('0x3b')]!==_0x8ef9('0x3c')){var _0xf61ae3={};_0xf61ae3[_0x2b7252['name']]={'$like':'%'+_0x2a88da[_0x8ef9('0x35')][_0x8ef9('0x39')]+'%'};return _0xf61ae3;}})});}_0x518d50=_[_0x8ef9('0x3a')]({},_0x518d50,_0x2a88da[_0x8ef9('0x3d')]);var _0x4547cb={'where':_0x518d50['where']};return db['SquareOdbc'][_0x8ef9('0x1f')](_0x4547cb)[_0x8ef9('0x23')](function(_0x343fce){_0x2ec7ac[_0x8ef9('0x1f')]=_0x343fce;if(_0x2a88da[_0x8ef9('0x35')][_0x8ef9('0x3e')]){_0x518d50[_0x8ef9('0x3f')]=[{'all':!![]}];}return db[_0x8ef9('0x40')][_0x8ef9('0x41')](_0x518d50);})[_0x8ef9('0x23')](function(_0x20ec7f){_0x2ec7ac['rows']=_0x20ec7f;return _0x2ec7ac;})['then'](respondWithFilteredResult(_0x176ace,_0x518d50))[_0x8ef9('0x42')](handleError(_0x176ace,null));};exports[_0x8ef9('0x43')]=function(_0x4b7f8f,_0x2fd47a){var _0x56ef48={'raw':!![],'where':{'id':_0x4b7f8f[_0x8ef9('0x44')]['id']}},_0x4b7c46={};_0x4b7c46['model']=_['keys'](db[_0x8ef9('0x40')][_0x8ef9('0x2a')]);_0x4b7c46[_0x8ef9('0x35')]=_['keys'](_0x4b7f8f[_0x8ef9('0x35')]);_0x4b7c46[_0x8ef9('0x2f')]=_['intersection'](_0x4b7c46['model'],_0x4b7c46[_0x8ef9('0x35')]);_0x56ef48[_0x8ef9('0x30')]=_[_0x8ef9('0x31')](_0x4b7c46[_0x8ef9('0x2c')],qs[_0x8ef9('0x32')](_0x4b7f8f[_0x8ef9('0x35')][_0x8ef9('0x32')]));_0x56ef48[_0x8ef9('0x30')]=_0x56ef48[_0x8ef9('0x30')][_0x8ef9('0x33')]?_0x56ef48['attributes']:_0x4b7c46['model'];if(_0x4b7f8f[_0x8ef9('0x35')][_0x8ef9('0x3e')]){_0x56ef48[_0x8ef9('0x3f')]=[{'all':!![]}];}_0x56ef48=_[_0x8ef9('0x3a')]({},_0x56ef48,_0x4b7f8f[_0x8ef9('0x3d')]);return db[_0x8ef9('0x40')][_0x8ef9('0x45')](_0x56ef48)[_0x8ef9('0x23')](handleEntityNotFound(_0x2fd47a,null))['then'](respondWithResult(_0x2fd47a,null))[_0x8ef9('0x42')](handleError(_0x2fd47a,null));};exports[_0x8ef9('0x46')]=function(_0xa1d5d4,_0x106c0b){return db[_0x8ef9('0x40')][_0x8ef9('0x46')](_0xa1d5d4[_0x8ef9('0x47')],{})[_0x8ef9('0x23')](function(_0x55521c){var _0xfe4603=_0xa1d5d4[_0x8ef9('0x48')]['get']({'plain':!![]});if(!_0xfe4603)throw new Error(_0x8ef9('0x49'));if(_0xfe4603[_0x8ef9('0x4a')]===_0x8ef9('0x48')){var _0x390dac=_0x55521c[_0x8ef9('0x4b')]({'plain':!![]});var _0x107982=_0x8ef9('0x25');return db[_0x8ef9('0x4c')][_0x8ef9('0x45')]({'where':{'name':_0x107982,'userProfileId':_0xfe4603['userProfileId']},'raw':!![]})['then'](function(_0x3a664f){if(_0x3a664f&&_0x3a664f[_0x8ef9('0x4d')]===0x0){return db[_0x8ef9('0x4e')][_0x8ef9('0x46')]({'name':_0x390dac['name'],'resourceId':_0x390dac['id'],'type':_0x3a664f['name'],'sectionId':_0x3a664f['id']},{})[_0x8ef9('0x23')](function(){return _0x55521c;});}else{return _0x55521c;}})[_0x8ef9('0x42')](function(_0x180ad3){logger[_0x8ef9('0x4f')](_0x8ef9('0x50'),_0x180ad3);throw _0x180ad3;});}return _0x55521c;})[_0x8ef9('0x23')](respondWithResult(_0x106c0b,0xc9))[_0x8ef9('0x42')](handleError(_0x106c0b,null));};exports[_0x8ef9('0x22')]=function(_0x361bde,_0x3fc153){if(_0x361bde[_0x8ef9('0x47')]['id']){delete _0x361bde[_0x8ef9('0x47')]['id'];}return db[_0x8ef9('0x40')]['find']({'where':{'id':_0x361bde['params']['id']}})[_0x8ef9('0x23')](handleEntityNotFound(_0x3fc153,null))[_0x8ef9('0x23')](saveUpdates(_0x361bde[_0x8ef9('0x47')],null))[_0x8ef9('0x23')](respondWithResult(_0x3fc153,null))['catch'](handleError(_0x3fc153,null));};exports[_0x8ef9('0x24')]=function(_0x1b85f1,_0x4baa0d){return db['SquareOdbc']['find']({'where':{'id':_0x1b85f1[_0x8ef9('0x44')]['id']}})[_0x8ef9('0x23')](handleEntityNotFound(_0x4baa0d,null))['then'](removeEntity(_0x4baa0d,null))[_0x8ef9('0x42')](handleError(_0x4baa0d,null));};exports[_0x8ef9('0x51')]=function(_0xbf7f27,_0x12984b,_0x3c8781){var _0xd4b80f;return db[_0x8ef9('0x40')]['find']({'where':{'id':_0xbf7f27[_0x8ef9('0x44')]['id']},'attributes':['id','dsn']})[_0x8ef9('0x23')](handleEntityNotFound(_0x12984b,null))[_0x8ef9('0x23')](function(_0x44b488){if(_0x44b488){var _0x27ec1d=require(_0x8ef9('0x52'))();_0x27ec1d[_0x8ef9('0x53')](_0x44b488[_0x8ef9('0x54')]);_0x27ec1d[_0x8ef9('0x55')]();return _0x44b488;}})[_0x8ef9('0x23')](respondWithResult(_0x12984b,null))[_0x8ef9('0x42')](handleError(_0x12984b,null));}; \ No newline at end of file +var _0x94d3=['../../config/license/util','sendStatus','status','json','undefined','count','offset','limit','set','Content-Range','apply','reject','save','update','then','destroy','end','error','stack','name','SquareOdbc','rawAttributes','fieldName','type','key','model','map','query','keys','filters','intersection','attributes','fields','hasOwnProperty','order','sort','where','pick','merge','VIRTUAL','filter','options','include','findAll','rows','show','params','includeAll','catch','create','user','get','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','UserProfileSection','find','userProfileId','autoAssociation','UserProfileResource','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','body','test','dsn','openSync','closeSync','eml-format','zip-dir','fast-json-patch','bluebird','mustache','util','path','sox','to-csv','fs-extra','lodash','crypto','jsforce','desk.js','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../config/license/hardware','api','../../config/environment'];(function(_0xbf155b,_0x3090e6){var _0x92a4bb=function(_0x1e3947){while(--_0x1e3947){_0xbf155b['push'](_0xbf155b['shift']());}};_0x92a4bb(++_0x3090e6);}(_0x94d3,0x199));var _0x394d=function(_0x34f72b,_0x13913a){_0x34f72b=_0x34f72b-0x0;var _0x3b5482=_0x94d3[_0x34f72b];return _0x3b5482;};'use strict';var emlformat=require(_0x394d('0x0'));var rimraf=require('rimraf');var zipdir=require(_0x394d('0x1'));var jsonpatch=require(_0x394d('0x2'));var rp=require('request-promise');var moment=require('moment');var BPromise=require(_0x394d('0x3'));var Mustache=require(_0x394d('0x4'));var util=require(_0x394d('0x5'));var path=require(_0x394d('0x6'));var sox=require(_0x394d('0x7'));var csv=require(_0x394d('0x8'));var ejs=require('ejs');var fs=require('fs');var fs_extra=require(_0x394d('0x9'));var _=require(_0x394d('0xa'));var squel=require('squel');var crypto=require(_0x394d('0xb'));var jsforce=require(_0x394d('0xc'));var deskjs=require(_0x394d('0xd'));var toCsv=require(_0x394d('0x8'));var querystring=require('querystring');var Papa=require(_0x394d('0xe'));var Redis=require(_0x394d('0xf'));var authService=require(_0x394d('0x10'));var qs=require(_0x394d('0x11'));var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0x394d('0x12'));var logger=require('../../config/logger')(_0x394d('0x13'));var utils=require('../../config/utils');var config=require(_0x394d('0x14'));var licenseUtil=require(_0x394d('0x15'));var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0x4e378b,_0xe7967f){_0xe7967f=_0xe7967f||0xcc;return function(_0x4aed12){if(_0x4aed12){return _0x4e378b[_0x394d('0x16')](_0xe7967f);}return _0x4e378b[_0x394d('0x17')](_0xe7967f)['end']();};}function respondWithResult(_0x2700f9,_0x1bcbb4){_0x1bcbb4=_0x1bcbb4||0xc8;return function(_0x3402fd){if(_0x3402fd){return _0x2700f9[_0x394d('0x17')](_0x1bcbb4)[_0x394d('0x18')](_0x3402fd);}};}function respondWithFilteredResult(_0xac96c9,_0x392c7b){return function(_0x375624){if(_0x375624){var _0x28989b=typeof _0x392c7b['offset']==='undefined'&&typeof _0x392c7b['limit']===_0x394d('0x19');var _0x4ffe40=_0x375624[_0x394d('0x1a')];var _0x53d8c9=_0x28989b?0x0:_0x392c7b['offset'];var _0x319aff=_0x28989b?_0x375624[_0x394d('0x1a')]:_0x392c7b[_0x394d('0x1b')]+_0x392c7b[_0x394d('0x1c')];var _0x361bdd;if(_0x319aff>=_0x4ffe40){_0x319aff=_0x4ffe40;_0x361bdd=0xc8;}else{_0x361bdd=0xce;}_0xac96c9['status'](_0x361bdd);return _0xac96c9[_0x394d('0x1d')](_0x394d('0x1e'),_0x53d8c9+'-'+_0x319aff+'/'+_0x4ffe40)[_0x394d('0x18')](_0x375624);}return null;};}function patchUpdates(_0x1a21d4){return function(_0x5a99e3){try{jsonpatch[_0x394d('0x1f')](_0x5a99e3,_0x1a21d4,!![]);}catch(_0x1c982b){return BPromise[_0x394d('0x20')](_0x1c982b);}return _0x5a99e3[_0x394d('0x21')]();};}function saveUpdates(_0x120ee4,_0x26a4a5){return function(_0x267c4c){if(_0x267c4c){return _0x267c4c[_0x394d('0x22')](_0x120ee4)[_0x394d('0x23')](function(_0x412126){return _0x412126;});}return null;};}function removeEntity(_0x35087e,_0x4852f7){return function(_0x3314e9){if(_0x3314e9){return _0x3314e9[_0x394d('0x24')]()[_0x394d('0x23')](function(){var _0x49fdca=_0x3314e9['get']({'plain':!![]});var _0x42dcb7='ODBC';return db['UserProfileResource']['destroy']({'where':{'type':_0x42dcb7,'resourceId':_0x49fdca['id']}})['then'](function(){return _0x3314e9;});})['then'](function(){_0x35087e[_0x394d('0x17')](0xcc)[_0x394d('0x25')]();});}};}function handleEntityNotFound(_0x2201b5,_0x2cc060){return function(_0x312084){if(!_0x312084){_0x2201b5[_0x394d('0x16')](0x194);}return _0x312084;};}function handleError(_0x1f3696,_0x367f2e){_0x367f2e=_0x367f2e||0x1f4;return function(_0x356dea){logger[_0x394d('0x26')](_0x356dea[_0x394d('0x27')]);if(_0x356dea[_0x394d('0x28')]){delete _0x356dea['name'];}_0x1f3696[_0x394d('0x17')](_0x367f2e)['send'](_0x356dea);};}exports['index']=function(_0x4baa02,_0x8417f6){var _0xb77d79={},_0x55e2ec={},_0x11d6ad={'count':0x0,'rows':[]};var _0x1c4569=_['map'](db[_0x394d('0x29')][_0x394d('0x2a')],function(_0x27ad3a){return{'name':_0x27ad3a[_0x394d('0x2b')],'type':_0x27ad3a[_0x394d('0x2c')][_0x394d('0x2d')]};});_0x55e2ec[_0x394d('0x2e')]=_[_0x394d('0x2f')](_0x1c4569,'name');_0x55e2ec[_0x394d('0x30')]=_[_0x394d('0x31')](_0x4baa02[_0x394d('0x30')]);_0x55e2ec[_0x394d('0x32')]=_[_0x394d('0x33')](_0x55e2ec['model'],_0x55e2ec[_0x394d('0x30')]);_0xb77d79[_0x394d('0x34')]=_[_0x394d('0x33')](_0x55e2ec[_0x394d('0x2e')],qs[_0x394d('0x35')](_0x4baa02[_0x394d('0x30')]['fields']));_0xb77d79[_0x394d('0x34')]=_0xb77d79[_0x394d('0x34')]['length']?_0xb77d79[_0x394d('0x34')]:_0x55e2ec[_0x394d('0x2e')];if(!_0x4baa02['query'][_0x394d('0x36')]('nolimit')){_0xb77d79[_0x394d('0x1c')]=qs[_0x394d('0x1c')](_0x4baa02[_0x394d('0x30')]['limit']);_0xb77d79[_0x394d('0x1b')]=qs['offset'](_0x4baa02[_0x394d('0x30')][_0x394d('0x1b')]);}_0xb77d79[_0x394d('0x37')]=qs['sort'](_0x4baa02['query'][_0x394d('0x38')]);_0xb77d79[_0x394d('0x39')]=qs['filters'](_[_0x394d('0x3a')](_0x4baa02['query'],_0x55e2ec[_0x394d('0x32')]),_0x1c4569);if(_0x4baa02[_0x394d('0x30')]['filter']){_0xb77d79[_0x394d('0x39')]=_[_0x394d('0x3b')](_0xb77d79[_0x394d('0x39')],{'$or':_[_0x394d('0x2f')](_0x1c4569,function(_0xb600bc){if(_0xb600bc[_0x394d('0x2c')]!==_0x394d('0x3c')){var _0x6a2441={};_0x6a2441[_0xb600bc['name']]={'$like':'%'+_0x4baa02[_0x394d('0x30')][_0x394d('0x3d')]+'%'};return _0x6a2441;}})});}_0xb77d79=_[_0x394d('0x3b')]({},_0xb77d79,_0x4baa02[_0x394d('0x3e')]);var _0x313195={'where':_0xb77d79['where']};return db['SquareOdbc'][_0x394d('0x1a')](_0x313195)['then'](function(_0x3878de){_0x11d6ad['count']=_0x3878de;if(_0x4baa02[_0x394d('0x30')]['includeAll']){_0xb77d79[_0x394d('0x3f')]=[{'all':!![]}];}return db[_0x394d('0x29')][_0x394d('0x40')](_0xb77d79);})[_0x394d('0x23')](function(_0x21389c){_0x11d6ad[_0x394d('0x41')]=_0x21389c;return _0x11d6ad;})[_0x394d('0x23')](respondWithFilteredResult(_0x8417f6,_0xb77d79))['catch'](handleError(_0x8417f6,null));};exports[_0x394d('0x42')]=function(_0x2e4d39,_0x55bc01){var _0x1da390={'raw':!![],'where':{'id':_0x2e4d39[_0x394d('0x43')]['id']}},_0x136a2f={};_0x136a2f[_0x394d('0x2e')]=_[_0x394d('0x31')](db[_0x394d('0x29')]['rawAttributes']);_0x136a2f[_0x394d('0x30')]=_[_0x394d('0x31')](_0x2e4d39[_0x394d('0x30')]);_0x136a2f[_0x394d('0x32')]=_[_0x394d('0x33')](_0x136a2f[_0x394d('0x2e')],_0x136a2f[_0x394d('0x30')]);_0x1da390['attributes']=_[_0x394d('0x33')](_0x136a2f['model'],qs[_0x394d('0x35')](_0x2e4d39[_0x394d('0x30')][_0x394d('0x35')]));_0x1da390[_0x394d('0x34')]=_0x1da390[_0x394d('0x34')]['length']?_0x1da390[_0x394d('0x34')]:_0x136a2f[_0x394d('0x2e')];if(_0x2e4d39[_0x394d('0x30')][_0x394d('0x44')]){_0x1da390[_0x394d('0x3f')]=[{'all':!![]}];}_0x1da390=_[_0x394d('0x3b')]({},_0x1da390,_0x2e4d39[_0x394d('0x3e')]);return db[_0x394d('0x29')]['find'](_0x1da390)['then'](handleEntityNotFound(_0x55bc01,null))[_0x394d('0x23')](respondWithResult(_0x55bc01,null))[_0x394d('0x45')](handleError(_0x55bc01,null));};exports[_0x394d('0x46')]=function(_0x39fd76,_0x59ef0e){return db[_0x394d('0x29')][_0x394d('0x46')](_0x39fd76['body'],{})[_0x394d('0x23')](function(_0x252d18){var _0x3b6455=_0x39fd76[_0x394d('0x47')][_0x394d('0x48')]({'plain':!![]});if(!_0x3b6455)throw new Error(_0x394d('0x49'));if(_0x3b6455[_0x394d('0x4a')]===_0x394d('0x47')){var _0x5da4b4=_0x252d18[_0x394d('0x48')]({'plain':!![]});var _0x33aa7d='ODBC';return db[_0x394d('0x4b')][_0x394d('0x4c')]({'where':{'name':_0x33aa7d,'userProfileId':_0x3b6455[_0x394d('0x4d')]},'raw':!![]})[_0x394d('0x23')](function(_0x4256b9){if(_0x4256b9&&_0x4256b9[_0x394d('0x4e')]===0x0){return db[_0x394d('0x4f')]['create']({'name':_0x5da4b4[_0x394d('0x28')],'resourceId':_0x5da4b4['id'],'type':_0x4256b9[_0x394d('0x28')],'sectionId':_0x4256b9['id']},{})[_0x394d('0x23')](function(){return _0x252d18;});}else{return _0x252d18;}})[_0x394d('0x45')](function(_0x3bdb26){logger['error'](_0x394d('0x50'),_0x3bdb26);throw _0x3bdb26;});}return _0x252d18;})[_0x394d('0x23')](respondWithResult(_0x59ef0e,0xc9))[_0x394d('0x45')](handleError(_0x59ef0e,null));};exports[_0x394d('0x22')]=function(_0x54e56d,_0x26c5d6){if(_0x54e56d[_0x394d('0x51')]['id']){delete _0x54e56d[_0x394d('0x51')]['id'];}return db[_0x394d('0x29')][_0x394d('0x4c')]({'where':{'id':_0x54e56d[_0x394d('0x43')]['id']}})['then'](handleEntityNotFound(_0x26c5d6,null))[_0x394d('0x23')](saveUpdates(_0x54e56d['body'],null))[_0x394d('0x23')](respondWithResult(_0x26c5d6,null))[_0x394d('0x45')](handleError(_0x26c5d6,null));};exports[_0x394d('0x24')]=function(_0x5d5737,_0x75b820){return db[_0x394d('0x29')][_0x394d('0x4c')]({'where':{'id':_0x5d5737[_0x394d('0x43')]['id']}})[_0x394d('0x23')](handleEntityNotFound(_0x75b820,null))[_0x394d('0x23')](removeEntity(_0x75b820,null))['catch'](handleError(_0x75b820,null));};exports[_0x394d('0x52')]=function(_0x196dbc,_0x14d04c,_0x237e38){var _0x482944;return db[_0x394d('0x29')][_0x394d('0x4c')]({'where':{'id':_0x196dbc[_0x394d('0x43')]['id']},'attributes':['id',_0x394d('0x53')]})[_0x394d('0x23')](handleEntityNotFound(_0x14d04c,null))['then'](function(_0x1900cb){if(_0x1900cb){var _0x878403=require('odbc')();_0x878403[_0x394d('0x54')](_0x1900cb['dsn']);_0x878403[_0x394d('0x55')]();return _0x1900cb;}})['then'](respondWithResult(_0x14d04c,null))[_0x394d('0x45')](handleError(_0x14d04c,null));}; \ No newline at end of file diff --git a/server/api/squareOdbc/squareOdbc.model.js b/server/api/squareOdbc/squareOdbc.model.js index c0f917d..4f287c6 100644 --- a/server/api/squareOdbc/squareOdbc.model.js +++ b/server/api/squareOdbc/squareOdbc.model.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x3b6b=['square_odbc','../../config/logger','api','moment','bluebird','path','../../config/environment','./squareOdbc.attributes','define','SquareOdbc'];(function(_0x5e513f,_0x1c3eba){var _0x30ccfe=function(_0x3612a3){while(--_0x3612a3){_0x5e513f['push'](_0x5e513f['shift']());}};_0x30ccfe(++_0x1c3eba);}(_0x3b6b,0x79));var _0xb3b6=function(_0x321bb2,_0x202794){_0x321bb2=_0x321bb2-0x0;var _0x9c12ed=_0x3b6b[_0x321bb2];return _0x9c12ed;};'use strict';var _=require('lodash');var util=require('util');var logger=require(_0xb3b6('0x0'))(_0xb3b6('0x1'));var moment=require(_0xb3b6('0x2'));var BPromise=require(_0xb3b6('0x3'));var rp=require('request-promise');var fs=require('fs');var path=require(_0xb3b6('0x4'));var rimraf=require('rimraf');var config=require(_0xb3b6('0x5'));var attributes=require(_0xb3b6('0x6'));module['exports']=function(_0x3d400b,_0xcf0550){return _0x3d400b[_0xb3b6('0x7')](_0xb3b6('0x8'),attributes,{'tableName':_0xb3b6('0x9'),'paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file +var _0x654a=['./squareOdbc.attributes','exports','define','SquareOdbc','lodash','util','../../config/logger','api','moment','bluebird','request-promise','../../config/environment'];(function(_0x51be7f,_0xd159f3){var _0x58f88c=function(_0x29c5d7){while(--_0x29c5d7){_0x51be7f['push'](_0x51be7f['shift']());}};_0x58f88c(++_0xd159f3);}(_0x654a,0x7c));var _0xa654=function(_0xeb5ddc,_0x47cac9){_0xeb5ddc=_0xeb5ddc-0x0;var _0xfe6f47=_0x654a[_0xeb5ddc];return _0xfe6f47;};'use strict';var _=require(_0xa654('0x0'));var util=require(_0xa654('0x1'));var logger=require(_0xa654('0x2'))(_0xa654('0x3'));var moment=require(_0xa654('0x4'));var BPromise=require(_0xa654('0x5'));var rp=require(_0xa654('0x6'));var fs=require('fs');var path=require('path');var rimraf=require('rimraf');var config=require(_0xa654('0x7'));var attributes=require(_0xa654('0x8'));module[_0xa654('0x9')]=function(_0x162a28,_0x34e212){return _0x162a28[_0xa654('0xa')](_0xa654('0xb'),attributes,{'tableName':'square_odbc','paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file diff --git a/server/api/squareOdbc/squareOdbc.rpc.js b/server/api/squareOdbc/squareOdbc.rpc.js index 5644c40..1ae3fa0 100644 --- a/server/api/squareOdbc/squareOdbc.rpc.js +++ b/server/api/squareOdbc/squareOdbc.rpc.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x2ad1=['../../config/environment','jayson/promise','client','http','request','then','info','SquareOdbc,\x20%s,\x20%s','request\x20sent','debug','SquareOdbc,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','ShowSquareOdbc','options','raw','attributes','map','include','model','catch','lodash','util','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc'];(function(_0x256d12,_0x3f5735){var _0xc4ec66=function(_0x3c56c2){while(--_0x3c56c2){_0x256d12['push'](_0x256d12['shift']());}};_0xc4ec66(++_0x3f5735);}(_0x2ad1,0x183));var _0x12ad=function(_0x4517ea,_0x493697){_0x4517ea=_0x4517ea-0x0;var _0x5d0e60=_0x2ad1[_0x4517ea];return _0x5d0e60;};'use strict';var _=require(_0x12ad('0x0'));var util=require(_0x12ad('0x1'));var moment=require('moment');var BPromise=require(_0x12ad('0x2'));var rs=require(_0x12ad('0x3'));var fs=require('fs');var Redis=require(_0x12ad('0x4'));var db=require(_0x12ad('0x5'))['db'];var utils=require(_0x12ad('0x6'));var logger=require(_0x12ad('0x7'))(_0x12ad('0x8'));var config=require(_0x12ad('0x9'));var jayson=require(_0x12ad('0xa'));var client=jayson[_0x12ad('0xb')][_0x12ad('0xc')]({'port':0x232a});function respondWithRpcPromise(_0x3302df,_0xf19c2f,_0x5636cb){return new BPromise(function(_0x48be71,_0x5189cc){return client[_0x12ad('0xd')](_0x3302df,_0x5636cb)[_0x12ad('0xe')](function(_0x4dec88){logger[_0x12ad('0xf')](_0x12ad('0x10'),_0xf19c2f,_0x12ad('0x11'));logger[_0x12ad('0x12')](_0x12ad('0x13'),_0xf19c2f,'request\x20sent',JSON[_0x12ad('0x14')](_0x4dec88));if(_0x4dec88[_0x12ad('0x15')]){if(_0x4dec88[_0x12ad('0x15')][_0x12ad('0x16')]===0x1f4){logger[_0x12ad('0x15')]('SquareOdbc,\x20%s,\x20%s',_0xf19c2f,_0x4dec88['error'][_0x12ad('0x17')]);return _0x5189cc(_0x4dec88[_0x12ad('0x15')][_0x12ad('0x17')]);}logger['error'](_0x12ad('0x10'),_0xf19c2f,_0x4dec88[_0x12ad('0x15')][_0x12ad('0x17')]);return _0x48be71(_0x4dec88[_0x12ad('0x15')][_0x12ad('0x17')]);}else{logger[_0x12ad('0xf')](_0x12ad('0x10'),_0xf19c2f,_0x12ad('0x11'));_0x48be71(_0x4dec88[_0x12ad('0x18')][_0x12ad('0x17')]);}})['catch'](function(_0x5aa6de){logger[_0x12ad('0x15')](_0x12ad('0x10'),_0xf19c2f,_0x5aa6de);_0x5189cc(_0x5aa6de);});});}exports[_0x12ad('0x19')]=function(_0x1741b5){var _0x1e10ba=this;return new Promise(function(_0x401bb3,_0x37f71c){return db['SquareOdbc']['find']({'raw':_0x1741b5[_0x12ad('0x1a')]?_0x1741b5[_0x12ad('0x1a')][_0x12ad('0x1b')]===undefined?!![]:![]:!![],'where':_0x1741b5[_0x12ad('0x1a')]?_0x1741b5['options']['where']||null:null,'attributes':_0x1741b5[_0x12ad('0x1a')]?_0x1741b5[_0x12ad('0x1a')][_0x12ad('0x1c')]||null:null,'include':_0x1741b5['options']?_0x1741b5[_0x12ad('0x1a')]['include']?_[_0x12ad('0x1d')](_0x1741b5[_0x12ad('0x1a')][_0x12ad('0x1e')],function(_0x1414fb){return{'model':db[_0x1414fb[_0x12ad('0x1f')]],'as':_0x1414fb['as'],'attributes':_0x1414fb[_0x12ad('0x1c')],'include':_0x1414fb[_0x12ad('0x1e')]?_[_0x12ad('0x1d')](_0x1414fb['include'],function(_0x3e8796){return{'model':db[_0x3e8796[_0x12ad('0x1f')]],'as':_0x3e8796['as'],'attributes':_0x3e8796[_0x12ad('0x1c')],'include':_0x3e8796[_0x12ad('0x1e')]?_[_0x12ad('0x1d')](_0x3e8796[_0x12ad('0x1e')],function(_0x2dcba7){return{'model':db[_0x2dcba7[_0x12ad('0x1f')]],'as':_0x2dcba7['as'],'attributes':_0x2dcba7[_0x12ad('0x1c')]};}):[]};}):[]};}):[]:[]})['then'](function(_0x599aa0){logger['info'](_0x12ad('0x19'),_0x1741b5);logger[_0x12ad('0x12')]('ShowSquareOdbc',_0x1741b5,JSON[_0x12ad('0x14')](_0x599aa0));_0x401bb3(_0x599aa0);})[_0x12ad('0x20')](function(_0xd4efaa){logger[_0x12ad('0x15')](_0x12ad('0x19'),_0xd4efaa[_0x12ad('0x17')],_0x1741b5);_0x37f71c(_0x1e10ba[_0x12ad('0x15')](0x1f4,_0xd4efaa[_0x12ad('0x17')]));});});}; \ No newline at end of file +var _0x4f22=['include','map','model','lodash','bluebird','randomstring','../../mysqldb','../../config/utils','../../config/logger','rpc','jayson/promise','client','http','request','then','info','SquareOdbc,\x20%s,\x20%s','request\x20sent','debug','SquareOdbc,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','catch','ShowSquareOdbc','find','options','raw','attributes'];(function(_0x216d45,_0x4989fe){var _0xbaac0b=function(_0x308a41){while(--_0x308a41){_0x216d45['push'](_0x216d45['shift']());}};_0xbaac0b(++_0x4989fe);}(_0x4f22,0x139));var _0x24f2=function(_0x39112a,_0x1e3193){_0x39112a=_0x39112a-0x0;var _0x42cf84=_0x4f22[_0x39112a];return _0x42cf84;};'use strict';var _=require(_0x24f2('0x0'));var util=require('util');var moment=require('moment');var BPromise=require(_0x24f2('0x1'));var rs=require(_0x24f2('0x2'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0x24f2('0x3'))['db'];var utils=require(_0x24f2('0x4'));var logger=require(_0x24f2('0x5'))(_0x24f2('0x6'));var config=require('../../config/environment');var jayson=require(_0x24f2('0x7'));var client=jayson[_0x24f2('0x8')][_0x24f2('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x64ef5e,_0x2a77ab,_0x2e880b){return new BPromise(function(_0x21c4f5,_0x27dcab){return client[_0x24f2('0xa')](_0x64ef5e,_0x2e880b)[_0x24f2('0xb')](function(_0x519279){logger[_0x24f2('0xc')](_0x24f2('0xd'),_0x2a77ab,_0x24f2('0xe'));logger[_0x24f2('0xf')](_0x24f2('0x10'),_0x2a77ab,'request\x20sent',JSON[_0x24f2('0x11')](_0x519279));if(_0x519279[_0x24f2('0x12')]){if(_0x519279[_0x24f2('0x12')][_0x24f2('0x13')]===0x1f4){logger[_0x24f2('0x12')](_0x24f2('0xd'),_0x2a77ab,_0x519279[_0x24f2('0x12')][_0x24f2('0x14')]);return _0x27dcab(_0x519279[_0x24f2('0x12')][_0x24f2('0x14')]);}logger['error'](_0x24f2('0xd'),_0x2a77ab,_0x519279[_0x24f2('0x12')][_0x24f2('0x14')]);return _0x21c4f5(_0x519279[_0x24f2('0x12')]['message']);}else{logger[_0x24f2('0xc')](_0x24f2('0xd'),_0x2a77ab,_0x24f2('0xe'));_0x21c4f5(_0x519279[_0x24f2('0x15')][_0x24f2('0x14')]);}})[_0x24f2('0x16')](function(_0x45fe21){logger[_0x24f2('0x12')]('SquareOdbc,\x20%s,\x20%s',_0x2a77ab,_0x45fe21);_0x27dcab(_0x45fe21);});});}exports[_0x24f2('0x17')]=function(_0x2a8c63){var _0x564c40=this;return new Promise(function(_0x415552,_0x6b10b){return db['SquareOdbc'][_0x24f2('0x18')]({'raw':_0x2a8c63[_0x24f2('0x19')]?_0x2a8c63[_0x24f2('0x19')][_0x24f2('0x1a')]===undefined?!![]:![]:!![],'where':_0x2a8c63[_0x24f2('0x19')]?_0x2a8c63['options']['where']||null:null,'attributes':_0x2a8c63[_0x24f2('0x19')]?_0x2a8c63[_0x24f2('0x19')][_0x24f2('0x1b')]||null:null,'include':_0x2a8c63[_0x24f2('0x19')]?_0x2a8c63[_0x24f2('0x19')][_0x24f2('0x1c')]?_[_0x24f2('0x1d')](_0x2a8c63['options'][_0x24f2('0x1c')],function(_0x4e59d2){return{'model':db[_0x4e59d2[_0x24f2('0x1e')]],'as':_0x4e59d2['as'],'attributes':_0x4e59d2['attributes'],'include':_0x4e59d2[_0x24f2('0x1c')]?_[_0x24f2('0x1d')](_0x4e59d2[_0x24f2('0x1c')],function(_0x19daac){return{'model':db[_0x19daac[_0x24f2('0x1e')]],'as':_0x19daac['as'],'attributes':_0x19daac[_0x24f2('0x1b')],'include':_0x19daac[_0x24f2('0x1c')]?_['map'](_0x19daac[_0x24f2('0x1c')],function(_0x524c57){return{'model':db[_0x524c57[_0x24f2('0x1e')]],'as':_0x524c57['as'],'attributes':_0x524c57[_0x24f2('0x1b')]};}):[]};}):[]};}):[]:[]})['then'](function(_0x597621){logger[_0x24f2('0xc')]('ShowSquareOdbc',_0x2a8c63);logger[_0x24f2('0xf')](_0x24f2('0x17'),_0x2a8c63,JSON['stringify'](_0x597621));_0x415552(_0x597621);})['catch'](function(_0x10056c){logger['error']('ShowSquareOdbc',_0x10056c['message'],_0x2a8c63);_0x6b10b(_0x564c40[_0x24f2('0x12')](0x1f4,_0x10056c[_0x24f2('0x14')]));});});}; \ No newline at end of file diff --git a/server/api/squareProject/index.js b/server/api/squareProject/index.js index eb9ade3..f88ffdd 100644 --- a/server/api/squareProject/index.js +++ b/server/api/squareProject/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x330d=['../../components/interaction/service','../../config/environment','./squareProject.controller','get','isAuthenticated','/:id','show','post','create','put','delete','destroy','exports','multer','util','path','express','fs-extra'];(function(_0xf90c74,_0x1ea5ca){var _0x3e5b3a=function(_0x581d90){while(--_0x581d90){_0xf90c74['push'](_0xf90c74['shift']());}};_0x3e5b3a(++_0x1ea5ca);}(_0x330d,0x199));var _0xd330=function(_0x53f897,_0x539857){_0x53f897=_0x53f897-0x0;var _0x6879f8=_0x330d[_0x53f897];return _0x6879f8;};'use strict';var multer=require(_0xd330('0x0'));var util=require(_0xd330('0x1'));var path=require(_0xd330('0x2'));var timeout=require('connect-timeout');var express=require(_0xd330('0x3'));var router=express['Router']();var fs_extra=require(_0xd330('0x4'));var auth=require('../../components/auth/service');var interaction=require(_0xd330('0x5'));var config=require(_0xd330('0x6'));var controller=require(_0xd330('0x7'));router[_0xd330('0x8')]('/',auth[_0xd330('0x9')](),controller['index']);router[_0xd330('0x8')](_0xd330('0xa'),auth[_0xd330('0x9')](),controller[_0xd330('0xb')]);router[_0xd330('0xc')]('/',auth[_0xd330('0x9')](),controller[_0xd330('0xd')]);router[_0xd330('0xe')]('/:id',auth[_0xd330('0x9')](),controller['update']);router[_0xd330('0xf')]('/:id',auth['isAuthenticated'](),controller[_0xd330('0x10')]);module[_0xd330('0x11')]=router; \ No newline at end of file +var _0x146d=['delete','destroy','multer','util','express','Router','../../components/auth/service','../../components/interaction/service','get','isAuthenticated','index','/:id','show','create','put','update'];(function(_0xa8b138,_0x2fe213){var _0x1fb6c8=function(_0x47d68f){while(--_0x47d68f){_0xa8b138['push'](_0xa8b138['shift']());}};_0x1fb6c8(++_0x2fe213);}(_0x146d,0xf2));var _0xd146=function(_0x2722a8,_0x250e91){_0x2722a8=_0x2722a8-0x0;var _0x9bb634=_0x146d[_0x2722a8];return _0x9bb634;};'use strict';var multer=require(_0xd146('0x0'));var util=require(_0xd146('0x1'));var path=require('path');var timeout=require('connect-timeout');var express=require(_0xd146('0x2'));var router=express[_0xd146('0x3')]();var fs_extra=require('fs-extra');var auth=require(_0xd146('0x4'));var interaction=require(_0xd146('0x5'));var config=require('../../config/environment');var controller=require('./squareProject.controller');router[_0xd146('0x6')]('/',auth[_0xd146('0x7')](),controller[_0xd146('0x8')]);router[_0xd146('0x6')](_0xd146('0x9'),auth[_0xd146('0x7')](),controller[_0xd146('0xa')]);router['post']('/',auth[_0xd146('0x7')](),controller[_0xd146('0xb')]);router[_0xd146('0xc')]('/:id',auth[_0xd146('0x7')](),controller[_0xd146('0xd')]);router[_0xd146('0xe')](_0xd146('0x9'),auth[_0xd146('0x7')](),controller[_0xd146('0xf')]);module['exports']=router; \ No newline at end of file diff --git a/server/api/squareProject/squareProject.attributes.js b/server/api/squareProject/squareProject.attributes.js index 8377fb5..655542f 100644 --- a/server/api/squareProject/squareProject.attributes.js +++ b/server/api/squareProject/squareProject.attributes.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xa1b4=['exports','STRING','name','TEXT','getDataValue','preproduction','toString','BLOB','long','production','utf8','sequelize'];(function(_0x35027c,_0x4af623){var _0x4bba7d=function(_0x1d84f9){while(--_0x1d84f9){_0x35027c['push'](_0x35027c['shift']());}};_0x4bba7d(++_0x4af623);}(_0xa1b4,0x83));var _0x4a1b=function(_0x28394f,_0x5ebdd2){_0x28394f=_0x28394f-0x0;var _0x2618d2=_0xa1b4[_0x28394f];return _0x2618d2;};'use strict';var Sequelize=require(_0x4a1b('0x0'));module[_0x4a1b('0x1')]={'name':{'type':Sequelize[_0x4a1b('0x2')],'unique':_0x4a1b('0x3'),'allowNull':![]},'description':{'type':Sequelize[_0x4a1b('0x2')]},'notes':{'type':Sequelize[_0x4a1b('0x4')]},'preproduction':{'type':Sequelize['BLOB']('long'),'get':function(){if(this[_0x4a1b('0x5')](_0x4a1b('0x6'))){return this[_0x4a1b('0x5')](_0x4a1b('0x6'))[_0x4a1b('0x7')]('utf8');}}},'production':{'type':Sequelize[_0x4a1b('0x8')](_0x4a1b('0x9')),'get':function(){if(this['getDataValue'](_0x4a1b('0xa'))){return this[_0x4a1b('0x5')]('production')[_0x4a1b('0x7')](_0x4a1b('0xb'));}}},'savedAt':{'type':Sequelize['DATE']},'publishedAt':{'type':Sequelize['DATE']}}; \ No newline at end of file +var _0x199d=['toString','utf8','long','production','DATE','sequelize','exports','STRING','name','BLOB','getDataValue','preproduction'];(function(_0x47c5f8,_0x1d9959){var _0x3607bd=function(_0x5c789a){while(--_0x5c789a){_0x47c5f8['push'](_0x47c5f8['shift']());}};_0x3607bd(++_0x1d9959);}(_0x199d,0x13d));var _0xd199=function(_0x45ee03,_0x2f5319){_0x45ee03=_0x45ee03-0x0;var _0x13d535=_0x199d[_0x45ee03];return _0x13d535;};'use strict';var Sequelize=require(_0xd199('0x0'));module[_0xd199('0x1')]={'name':{'type':Sequelize[_0xd199('0x2')],'unique':_0xd199('0x3'),'allowNull':![]},'description':{'type':Sequelize[_0xd199('0x2')]},'notes':{'type':Sequelize['TEXT']},'preproduction':{'type':Sequelize[_0xd199('0x4')]('long'),'get':function(){if(this[_0xd199('0x5')](_0xd199('0x6'))){return this[_0xd199('0x5')]('preproduction')[_0xd199('0x7')](_0xd199('0x8'));}}},'production':{'type':Sequelize['BLOB'](_0xd199('0x9')),'get':function(){if(this[_0xd199('0x5')](_0xd199('0xa'))){return this['getDataValue'](_0xd199('0xa'))[_0xd199('0x7')](_0xd199('0x8'));}}},'savedAt':{'type':Sequelize['DATE']},'publishedAt':{'type':Sequelize[_0xd199('0xb')]}}; \ No newline at end of file diff --git a/server/api/squareProject/squareProject.controller.js b/server/api/squareProject/squareProject.controller.js index d80a197..0026c06 100644 --- a/server/api/squareProject/squareProject.controller.js +++ b/server/api/squareProject/squareProject.controller.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xa2c3=['length','find','create','body','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','user','SquareProjects','UserProfileSection','userProfileId','autoAssociation','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','publish','production','lodash','ioredis','../../components/parsers/qs','../../config/logger','../../config/environment','../../mysqldb','defaults','redis','localhost','socket.io-emitter','./squareProject.socket','register','json','offset','undefined','limit','count','status','set','Content-Range','update','destroy','then','get','UserProfileResource','agi','stringify','end','sendStatus','error','stack','name','send','index','map','SquareProject','fieldName','type','key','model','query','keys','intersection','fields','attributes','nolimit','order','sort','filters','pick','filter','where','VIRTUAL','merge','options','includeAll','include','findAll','rows','catch','show','params','rawAttributes'];(function(_0x187279,_0x26d152){var _0x3da59d=function(_0x41c808){while(--_0x41c808){_0x187279['push'](_0x187279['shift']());}};_0x3da59d(++_0x26d152);}(_0xa2c3,0x18f));var _0x3a2c=function(_0x3c7b9b,_0x3dedfd){_0x3c7b9b=_0x3c7b9b-0x0;var _0xb3c0c9=_0xa2c3[_0x3c7b9b];return _0xb3c0c9;};'use strict';var _=require(_0x3a2c('0x0'));var Redis=require(_0x3a2c('0x1'));var qs=require(_0x3a2c('0x2'));var logger=require(_0x3a2c('0x3'))('api');var config=require(_0x3a2c('0x4'));var db=require(_0x3a2c('0x5'))['db'];config['redis']=_[_0x3a2c('0x6')](config[_0x3a2c('0x7')],{'host':_0x3a2c('0x8'),'port':0x18eb});var socket=require(_0x3a2c('0x9'))(new Redis(config[_0x3a2c('0x7')]));require(_0x3a2c('0xa'))[_0x3a2c('0xb')](socket);function respondWithResult(_0x481d9d,_0x2ac221){_0x2ac221=_0x2ac221||0xc8;return function(_0xb1a7d9){if(_0xb1a7d9){return _0x481d9d['status'](_0x2ac221)[_0x3a2c('0xc')](_0xb1a7d9);}};}function respondWithFilteredResult(_0x52f9d9,_0x4f9e99){return function(_0x2bd1da){if(_0x2bd1da){var _0x313e72=typeof _0x4f9e99[_0x3a2c('0xd')]===_0x3a2c('0xe')&&typeof _0x4f9e99[_0x3a2c('0xf')]===_0x3a2c('0xe');var _0x532d3c=_0x2bd1da[_0x3a2c('0x10')];var _0x858637=_0x313e72?0x0:_0x4f9e99[_0x3a2c('0xd')];var _0x4b202c=_0x313e72?_0x2bd1da[_0x3a2c('0x10')]:_0x4f9e99[_0x3a2c('0xd')]+_0x4f9e99[_0x3a2c('0xf')];var _0x1a7986;if(_0x4b202c>=_0x532d3c){_0x4b202c=_0x532d3c;_0x1a7986=0xc8;}else{_0x1a7986=0xce;}_0x52f9d9[_0x3a2c('0x11')](_0x1a7986);return _0x52f9d9[_0x3a2c('0x12')](_0x3a2c('0x13'),_0x858637+'-'+_0x4b202c+'/'+_0x532d3c)[_0x3a2c('0xc')](_0x2bd1da);}return null;};}function saveUpdates(_0x2e7352){return function(_0xb82ac9){if(_0xb82ac9){return _0xb82ac9[_0x3a2c('0x14')](_0x2e7352)['then'](function(_0x41a635){return _0x41a635;});}return null;};}function removeEntity(_0x1cf556){return function(_0x4ada79){if(_0x4ada79){return _0x4ada79[_0x3a2c('0x15')]()[_0x3a2c('0x16')](function(){var _0x2eb013=_0x4ada79[_0x3a2c('0x17')]({'plain':!![]});var _0x50ceb8='SquareProjects';return db[_0x3a2c('0x18')]['destroy']({'where':{'type':_0x50ceb8,'resourceId':_0x2eb013['id']}})['then'](function(){return _0x4ada79;});})[_0x3a2c('0x16')](function(){var _0x4a5c64=new Redis(config[_0x3a2c('0x7')]);_0x4a5c64['publish'](_0x3a2c('0x19'),JSON[_0x3a2c('0x1a')]({'id':_0x4ada79['id'],'deleted':!![]}));})[_0x3a2c('0x16')](function(){_0x1cf556[_0x3a2c('0x11')](0xcc)[_0x3a2c('0x1b')]();});}};}function handleEntityNotFound(_0x1dbee6){return function(_0x43b9bf){if(!_0x43b9bf){_0x1dbee6[_0x3a2c('0x1c')](0x194);}return _0x43b9bf;};}function handleError(_0x3ebcc5,_0x8aa63a){_0x8aa63a=_0x8aa63a||0x1f4;return function(_0x11bc69){logger[_0x3a2c('0x1d')](_0x11bc69[_0x3a2c('0x1e')]);if(_0x11bc69[_0x3a2c('0x1f')]){delete _0x11bc69[_0x3a2c('0x1f')];}_0x3ebcc5[_0x3a2c('0x11')](_0x8aa63a)[_0x3a2c('0x20')](_0x11bc69);};}exports[_0x3a2c('0x21')]=function(_0x22ee4f,_0x376d48){var _0x428f8f={},_0x5123bc={},_0x3ef4ed={'count':0x0,'rows':[]};var _0x56f2d4=_[_0x3a2c('0x22')](db[_0x3a2c('0x23')]['rawAttributes'],function(_0x44a046){return{'name':_0x44a046[_0x3a2c('0x24')],'type':_0x44a046[_0x3a2c('0x25')][_0x3a2c('0x26')]};});_0x5123bc[_0x3a2c('0x27')]=_[_0x3a2c('0x22')](_0x56f2d4,'name');_0x5123bc[_0x3a2c('0x28')]=_[_0x3a2c('0x29')](_0x22ee4f['query']);_0x5123bc['filters']=_[_0x3a2c('0x2a')](_0x5123bc[_0x3a2c('0x27')],_0x5123bc['query']);_0x428f8f['attributes']=_[_0x3a2c('0x2a')](_0x5123bc['model'],qs[_0x3a2c('0x2b')](_0x22ee4f[_0x3a2c('0x28')]['fields']));_0x428f8f['attributes']=_0x428f8f[_0x3a2c('0x2c')]['length']?_0x428f8f['attributes']:_0x5123bc[_0x3a2c('0x27')];if(!_0x22ee4f[_0x3a2c('0x28')]['hasOwnProperty'](_0x3a2c('0x2d'))){_0x428f8f[_0x3a2c('0xf')]=qs[_0x3a2c('0xf')](_0x22ee4f[_0x3a2c('0x28')][_0x3a2c('0xf')]);_0x428f8f[_0x3a2c('0xd')]=qs[_0x3a2c('0xd')](_0x22ee4f[_0x3a2c('0x28')][_0x3a2c('0xd')]);}_0x428f8f[_0x3a2c('0x2e')]=qs[_0x3a2c('0x2f')](_0x22ee4f[_0x3a2c('0x28')][_0x3a2c('0x2f')]);_0x428f8f['where']=qs[_0x3a2c('0x30')](_[_0x3a2c('0x31')](_0x22ee4f['query'],_0x5123bc[_0x3a2c('0x30')]),_0x56f2d4);if(_0x22ee4f[_0x3a2c('0x28')][_0x3a2c('0x32')]){_0x428f8f[_0x3a2c('0x33')]=_['merge'](_0x428f8f[_0x3a2c('0x33')],{'$or':_[_0x3a2c('0x22')](_0x56f2d4,function(_0x128fea){if(_0x128fea[_0x3a2c('0x25')]!==_0x3a2c('0x34')){var _0x4c8599={};_0x4c8599[_0x128fea[_0x3a2c('0x1f')]]={'$like':'%'+_0x22ee4f[_0x3a2c('0x28')]['filter']+'%'};return _0x4c8599;}})});}_0x428f8f=_[_0x3a2c('0x35')]({},_0x428f8f,_0x22ee4f[_0x3a2c('0x36')]);var _0x55bbe8={'where':_0x428f8f[_0x3a2c('0x33')]};return db[_0x3a2c('0x23')][_0x3a2c('0x10')](_0x55bbe8)[_0x3a2c('0x16')](function(_0x5142d2){_0x3ef4ed[_0x3a2c('0x10')]=_0x5142d2;if(_0x22ee4f[_0x3a2c('0x28')][_0x3a2c('0x37')]){_0x428f8f[_0x3a2c('0x38')]=[{'all':!![]}];}return db[_0x3a2c('0x23')][_0x3a2c('0x39')](_0x428f8f);})[_0x3a2c('0x16')](function(_0x1024ec){_0x3ef4ed[_0x3a2c('0x3a')]=_0x1024ec;return _0x3ef4ed;})[_0x3a2c('0x16')](respondWithFilteredResult(_0x376d48,_0x428f8f))[_0x3a2c('0x3b')](handleError(_0x376d48,null));};exports[_0x3a2c('0x3c')]=function(_0x5cc2fe,_0x9c0ab6){var _0x8eee43={'raw':![],'where':{'id':_0x5cc2fe[_0x3a2c('0x3d')]['id']}},_0x271bac={};_0x271bac['model']=_[_0x3a2c('0x29')](db[_0x3a2c('0x23')][_0x3a2c('0x3e')]);_0x271bac[_0x3a2c('0x28')]=_['keys'](_0x5cc2fe['query']);_0x271bac[_0x3a2c('0x30')]=_[_0x3a2c('0x2a')](_0x271bac['model'],_0x271bac[_0x3a2c('0x28')]);_0x8eee43[_0x3a2c('0x2c')]=_[_0x3a2c('0x2a')](_0x271bac[_0x3a2c('0x27')],qs[_0x3a2c('0x2b')](_0x5cc2fe['query']['fields']));_0x8eee43['attributes']=_0x8eee43[_0x3a2c('0x2c')][_0x3a2c('0x3f')]?_0x8eee43[_0x3a2c('0x2c')]:_0x271bac['model'];if(_0x5cc2fe[_0x3a2c('0x28')][_0x3a2c('0x37')]){_0x8eee43[_0x3a2c('0x38')]=[{'all':!![]}];}_0x8eee43=_[_0x3a2c('0x35')]({},_0x8eee43,_0x5cc2fe[_0x3a2c('0x36')]);return db[_0x3a2c('0x23')][_0x3a2c('0x40')](_0x8eee43)[_0x3a2c('0x16')](handleEntityNotFound(_0x9c0ab6,null))[_0x3a2c('0x16')](respondWithResult(_0x9c0ab6,null))['catch'](handleError(_0x9c0ab6,null));};exports[_0x3a2c('0x41')]=function(_0x1dc696,_0x4a9ac4){return db[_0x3a2c('0x23')][_0x3a2c('0x41')](_0x1dc696[_0x3a2c('0x42')],{})['then'](function(_0xcfbb6b){var _0x222608=_0x1dc696['user']['get']({'plain':!![]});if(!_0x222608)throw new Error(_0x3a2c('0x43'));if(_0x222608[_0x3a2c('0x44')]===_0x3a2c('0x45')){var _0x1dc943=_0xcfbb6b[_0x3a2c('0x17')]({'plain':!![]});var _0x59e40d=_0x3a2c('0x46');return db[_0x3a2c('0x47')][_0x3a2c('0x40')]({'where':{'name':_0x59e40d,'userProfileId':_0x222608[_0x3a2c('0x48')]},'raw':!![]})[_0x3a2c('0x16')](function(_0x11d4a1){if(_0x11d4a1&&_0x11d4a1[_0x3a2c('0x49')]===0x0){return db[_0x3a2c('0x18')][_0x3a2c('0x41')]({'name':_0x1dc943[_0x3a2c('0x1f')],'resourceId':_0x1dc943['id'],'type':_0x11d4a1['name'],'sectionId':_0x11d4a1['id']},{})[_0x3a2c('0x16')](function(){return _0xcfbb6b;});}else{return _0xcfbb6b;}})[_0x3a2c('0x3b')](function(_0x19aab7){logger[_0x3a2c('0x1d')](_0x3a2c('0x4a'),_0x19aab7);throw _0x19aab7;});}return _0xcfbb6b;})[_0x3a2c('0x16')](respondWithResult(_0x4a9ac4,0xc9))[_0x3a2c('0x3b')](handleError(_0x4a9ac4,null));};exports[_0x3a2c('0x14')]=function(_0x43f72d,_0x55c696){if(_0x43f72d['body']['id']){delete _0x43f72d[_0x3a2c('0x42')]['id'];}return db['SquareProject'][_0x3a2c('0x40')]({'where':{'id':_0x43f72d[_0x3a2c('0x3d')]['id']}})[_0x3a2c('0x16')](handleEntityNotFound(_0x55c696,null))['then'](saveUpdates(_0x43f72d[_0x3a2c('0x42')],null))[_0x3a2c('0x16')](function(_0x3041d2){if(!_0x3041d2)return;var _0x17728d=_0x3041d2[_0x3a2c('0x17')]({'plain':!![]});return _0x17728d;})[_0x3a2c('0x16')](function(_0x271839){var _0x29d969=new Redis(config['redis']);_0x29d969[_0x3a2c('0x4b')](_0x3a2c('0x19'),JSON['stringify'](_['pick'](_0x271839,['id',_0x3a2c('0x1f'),_0x3a2c('0x4c')])));return _0x271839;})['then'](respondWithResult(_0x55c696,null))[_0x3a2c('0x3b')](handleError(_0x55c696,null));};exports['destroy']=function(_0x5da4e0,_0x3825b0){return db[_0x3a2c('0x23')][_0x3a2c('0x40')]({'where':{'id':_0x5da4e0[_0x3a2c('0x3d')]['id']}})['then'](handleEntityNotFound(_0x3825b0,null))['then'](removeEntity(_0x3825b0,null))[_0x3a2c('0x3b')](handleError(_0x3825b0,null));}; \ No newline at end of file +var _0xfeac=['Unable\x20to\x20retrieve\x20the\x20current\x20user','role','autoAssociation','catch','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','find','publish','agi','ioredis','../../components/parsers/qs','../../config/logger','api','../../config/environment','redis','defaults','socket.io-emitter','json','undefined','limit','offset','count','status','set','update','then','destroy','get','SquareProjects','UserProfileResource','stringify','sendStatus','error','name','send','index','map','rawAttributes','fieldName','type','model','query','keys','filters','intersection','fields','attributes','hasOwnProperty','nolimit','order','sort','where','filter','merge','VIRTUAL','options','SquareProject','includeAll','include','findAll','rows','params','length','create','body','user'];(function(_0x4beb08,_0x38a1e4){var _0x56a591=function(_0x26d077){while(--_0x26d077){_0x4beb08['push'](_0x4beb08['shift']());}};_0x56a591(++_0x38a1e4);}(_0xfeac,0x1cf));var _0xcfea=function(_0x544f46,_0x168b65){_0x544f46=_0x544f46-0x0;var _0x21e7f2=_0xfeac[_0x544f46];return _0x21e7f2;};'use strict';var _=require('lodash');var Redis=require(_0xcfea('0x0'));var qs=require(_0xcfea('0x1'));var logger=require(_0xcfea('0x2'))(_0xcfea('0x3'));var config=require(_0xcfea('0x4'));var db=require('../../mysqldb')['db'];config[_0xcfea('0x5')]=_[_0xcfea('0x6')](config[_0xcfea('0x5')],{'host':'localhost','port':0x18eb});var socket=require(_0xcfea('0x7'))(new Redis(config[_0xcfea('0x5')]));require('./squareProject.socket')['register'](socket);function respondWithResult(_0x513106,_0x4349b5){_0x4349b5=_0x4349b5||0xc8;return function(_0x547bcf){if(_0x547bcf){return _0x513106['status'](_0x4349b5)[_0xcfea('0x8')](_0x547bcf);}};}function respondWithFilteredResult(_0x27e75a,_0x31ae80){return function(_0x467a47){if(_0x467a47){var _0x199ab9=typeof _0x31ae80['offset']===_0xcfea('0x9')&&typeof _0x31ae80[_0xcfea('0xa')]===_0xcfea('0x9');var _0xabbdbb=_0x467a47['count'];var _0x5b5431=_0x199ab9?0x0:_0x31ae80[_0xcfea('0xb')];var _0x218b40=_0x199ab9?_0x467a47[_0xcfea('0xc')]:_0x31ae80[_0xcfea('0xb')]+_0x31ae80[_0xcfea('0xa')];var _0x457029;if(_0x218b40>=_0xabbdbb){_0x218b40=_0xabbdbb;_0x457029=0xc8;}else{_0x457029=0xce;}_0x27e75a[_0xcfea('0xd')](_0x457029);return _0x27e75a[_0xcfea('0xe')]('Content-Range',_0x5b5431+'-'+_0x218b40+'/'+_0xabbdbb)[_0xcfea('0x8')](_0x467a47);}return null;};}function saveUpdates(_0x44d23c){return function(_0xd871f1){if(_0xd871f1){return _0xd871f1[_0xcfea('0xf')](_0x44d23c)[_0xcfea('0x10')](function(_0x209047){return _0x209047;});}return null;};}function removeEntity(_0x4d1174){return function(_0x12ab4d){if(_0x12ab4d){return _0x12ab4d[_0xcfea('0x11')]()['then'](function(){var _0x509e81=_0x12ab4d[_0xcfea('0x12')]({'plain':!![]});var _0x26ef6e=_0xcfea('0x13');return db[_0xcfea('0x14')][_0xcfea('0x11')]({'where':{'type':_0x26ef6e,'resourceId':_0x509e81['id']}})[_0xcfea('0x10')](function(){return _0x12ab4d;});})['then'](function(){var _0x57f638=new Redis(config['redis']);_0x57f638['publish']('agi',JSON[_0xcfea('0x15')]({'id':_0x12ab4d['id'],'deleted':!![]}));})[_0xcfea('0x10')](function(){_0x4d1174[_0xcfea('0xd')](0xcc)['end']();});}};}function handleEntityNotFound(_0x497de3){return function(_0x67c05f){if(!_0x67c05f){_0x497de3[_0xcfea('0x16')](0x194);}return _0x67c05f;};}function handleError(_0x1ea77a,_0x4aed8d){_0x4aed8d=_0x4aed8d||0x1f4;return function(_0x243ef7){logger[_0xcfea('0x17')](_0x243ef7['stack']);if(_0x243ef7[_0xcfea('0x18')]){delete _0x243ef7[_0xcfea('0x18')];}_0x1ea77a[_0xcfea('0xd')](_0x4aed8d)[_0xcfea('0x19')](_0x243ef7);};}exports[_0xcfea('0x1a')]=function(_0x47f93c,_0x4c4e40){var _0x56db83={},_0x18dbb6={},_0x5562be={'count':0x0,'rows':[]};var _0x116025=_[_0xcfea('0x1b')](db['SquareProject'][_0xcfea('0x1c')],function(_0x24161f){return{'name':_0x24161f[_0xcfea('0x1d')],'type':_0x24161f[_0xcfea('0x1e')]['key']};});_0x18dbb6[_0xcfea('0x1f')]=_['map'](_0x116025,_0xcfea('0x18'));_0x18dbb6[_0xcfea('0x20')]=_[_0xcfea('0x21')](_0x47f93c[_0xcfea('0x20')]);_0x18dbb6[_0xcfea('0x22')]=_['intersection'](_0x18dbb6[_0xcfea('0x1f')],_0x18dbb6[_0xcfea('0x20')]);_0x56db83['attributes']=_[_0xcfea('0x23')](_0x18dbb6[_0xcfea('0x1f')],qs[_0xcfea('0x24')](_0x47f93c['query']['fields']));_0x56db83[_0xcfea('0x25')]=_0x56db83['attributes']['length']?_0x56db83['attributes']:_0x18dbb6[_0xcfea('0x1f')];if(!_0x47f93c['query'][_0xcfea('0x26')](_0xcfea('0x27'))){_0x56db83[_0xcfea('0xa')]=qs[_0xcfea('0xa')](_0x47f93c[_0xcfea('0x20')][_0xcfea('0xa')]);_0x56db83[_0xcfea('0xb')]=qs[_0xcfea('0xb')](_0x47f93c[_0xcfea('0x20')][_0xcfea('0xb')]);}_0x56db83[_0xcfea('0x28')]=qs[_0xcfea('0x29')](_0x47f93c['query'][_0xcfea('0x29')]);_0x56db83[_0xcfea('0x2a')]=qs[_0xcfea('0x22')](_['pick'](_0x47f93c['query'],_0x18dbb6[_0xcfea('0x22')]),_0x116025);if(_0x47f93c[_0xcfea('0x20')][_0xcfea('0x2b')]){_0x56db83[_0xcfea('0x2a')]=_[_0xcfea('0x2c')](_0x56db83[_0xcfea('0x2a')],{'$or':_[_0xcfea('0x1b')](_0x116025,function(_0x29cf87){if(_0x29cf87[_0xcfea('0x1e')]!==_0xcfea('0x2d')){var _0x3a897d={};_0x3a897d[_0x29cf87[_0xcfea('0x18')]]={'$like':'%'+_0x47f93c['query'][_0xcfea('0x2b')]+'%'};return _0x3a897d;}})});}_0x56db83=_[_0xcfea('0x2c')]({},_0x56db83,_0x47f93c[_0xcfea('0x2e')]);var _0x3c624f={'where':_0x56db83[_0xcfea('0x2a')]};return db[_0xcfea('0x2f')][_0xcfea('0xc')](_0x3c624f)[_0xcfea('0x10')](function(_0x9b1def){_0x5562be[_0xcfea('0xc')]=_0x9b1def;if(_0x47f93c[_0xcfea('0x20')][_0xcfea('0x30')]){_0x56db83[_0xcfea('0x31')]=[{'all':!![]}];}return db[_0xcfea('0x2f')][_0xcfea('0x32')](_0x56db83);})['then'](function(_0x3a1456){_0x5562be[_0xcfea('0x33')]=_0x3a1456;return _0x5562be;})['then'](respondWithFilteredResult(_0x4c4e40,_0x56db83))['catch'](handleError(_0x4c4e40,null));};exports['show']=function(_0xb4f948,_0x1ad50f){var _0x195926={'raw':![],'where':{'id':_0xb4f948[_0xcfea('0x34')]['id']}},_0x13c32a={};_0x13c32a['model']=_['keys'](db['SquareProject'][_0xcfea('0x1c')]);_0x13c32a[_0xcfea('0x20')]=_[_0xcfea('0x21')](_0xb4f948[_0xcfea('0x20')]);_0x13c32a['filters']=_[_0xcfea('0x23')](_0x13c32a['model'],_0x13c32a[_0xcfea('0x20')]);_0x195926[_0xcfea('0x25')]=_[_0xcfea('0x23')](_0x13c32a[_0xcfea('0x1f')],qs[_0xcfea('0x24')](_0xb4f948[_0xcfea('0x20')][_0xcfea('0x24')]));_0x195926['attributes']=_0x195926['attributes'][_0xcfea('0x35')]?_0x195926[_0xcfea('0x25')]:_0x13c32a['model'];if(_0xb4f948[_0xcfea('0x20')]['includeAll']){_0x195926[_0xcfea('0x31')]=[{'all':!![]}];}_0x195926=_[_0xcfea('0x2c')]({},_0x195926,_0xb4f948[_0xcfea('0x2e')]);return db[_0xcfea('0x2f')]['find'](_0x195926)[_0xcfea('0x10')](handleEntityNotFound(_0x1ad50f,null))[_0xcfea('0x10')](respondWithResult(_0x1ad50f,null))['catch'](handleError(_0x1ad50f,null));};exports[_0xcfea('0x36')]=function(_0x27b02a,_0x286cb2){return db[_0xcfea('0x2f')][_0xcfea('0x36')](_0x27b02a[_0xcfea('0x37')],{})[_0xcfea('0x10')](function(_0x5676ea){var _0x43cbc6=_0x27b02a[_0xcfea('0x38')][_0xcfea('0x12')]({'plain':!![]});if(!_0x43cbc6)throw new Error(_0xcfea('0x39'));if(_0x43cbc6[_0xcfea('0x3a')]===_0xcfea('0x38')){var _0x356fb9=_0x5676ea[_0xcfea('0x12')]({'plain':!![]});var _0x5cf254='SquareProjects';return db['UserProfileSection']['find']({'where':{'name':_0x5cf254,'userProfileId':_0x43cbc6['userProfileId']},'raw':!![]})[_0xcfea('0x10')](function(_0x15d559){if(_0x15d559&&_0x15d559[_0xcfea('0x3b')]===0x0){return db['UserProfileResource'][_0xcfea('0x36')]({'name':_0x356fb9['name'],'resourceId':_0x356fb9['id'],'type':_0x15d559['name'],'sectionId':_0x15d559['id']},{})[_0xcfea('0x10')](function(){return _0x5676ea;});}else{return _0x5676ea;}})[_0xcfea('0x3c')](function(_0x577f74){logger[_0xcfea('0x17')](_0xcfea('0x3d'),_0x577f74);throw _0x577f74;});}return _0x5676ea;})[_0xcfea('0x10')](respondWithResult(_0x286cb2,0xc9))[_0xcfea('0x3c')](handleError(_0x286cb2,null));};exports[_0xcfea('0xf')]=function(_0x5de710,_0x322b77){if(_0x5de710[_0xcfea('0x37')]['id']){delete _0x5de710[_0xcfea('0x37')]['id'];}return db[_0xcfea('0x2f')][_0xcfea('0x3e')]({'where':{'id':_0x5de710[_0xcfea('0x34')]['id']}})['then'](handleEntityNotFound(_0x322b77,null))[_0xcfea('0x10')](saveUpdates(_0x5de710[_0xcfea('0x37')],null))[_0xcfea('0x10')](function(_0x483658){if(!_0x483658)return;var _0x2375bf=_0x483658[_0xcfea('0x12')]({'plain':!![]});return _0x2375bf;})[_0xcfea('0x10')](function(_0x2e411a){var _0x310be0=new Redis(config[_0xcfea('0x5')]);_0x310be0[_0xcfea('0x3f')](_0xcfea('0x40'),JSON[_0xcfea('0x15')](_['pick'](_0x2e411a,['id','name','production'])));return _0x2e411a;})[_0xcfea('0x10')](respondWithResult(_0x322b77,null))[_0xcfea('0x3c')](handleError(_0x322b77,null));};exports[_0xcfea('0x11')]=function(_0x5c6f1f,_0x21557c){return db['SquareProject'][_0xcfea('0x3e')]({'where':{'id':_0x5c6f1f[_0xcfea('0x34')]['id']}})['then'](handleEntityNotFound(_0x21557c,null))['then'](removeEntity(_0x21557c,null))[_0xcfea('0x3c')](handleError(_0x21557c,null));}; \ No newline at end of file diff --git a/server/api/squareProject/squareProject.events.js b/server/api/squareProject/squareProject.events.js index 134c31e..d981810 100644 --- a/server/api/squareProject/squareProject.events.js +++ b/server/api/squareProject/squareProject.events.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xace9=['update','remove','emit','hasOwnProperty','hook','../../mysqldb','SquareProject','setMaxListeners','save'];(function(_0x472bcc,_0x2adca0){var _0x4fe499=function(_0x547c38){while(--_0x547c38){_0x472bcc['push'](_0x472bcc['shift']());}};_0x4fe499(++_0x2adca0);}(_0xace9,0x149));var _0x9ace=function(_0x4dbda8,_0xbce830){_0x4dbda8=_0x4dbda8-0x0;var _0x1149ed=_0xace9[_0x4dbda8];return _0x1149ed;};'use strict';var EventEmitter=require('events');var SquareProject=require(_0x9ace('0x0'))['db'][_0x9ace('0x1')];var SquareProjectEvents=new EventEmitter();SquareProjectEvents[_0x9ace('0x2')](0x0);var events={'afterCreate':_0x9ace('0x3'),'afterUpdate':_0x9ace('0x4'),'afterDestroy':_0x9ace('0x5')};function emitEvent(_0x180428){return function(_0x5eff1d,_0xb38516,_0x1d8fa6){SquareProjectEvents[_0x9ace('0x6')](_0x180428+':'+_0x5eff1d['id'],_0x5eff1d);SquareProjectEvents['emit'](_0x180428,_0x5eff1d);_0x1d8fa6(null);};}for(var e in events){if(events[_0x9ace('0x7')](e)){var event=events[e];SquareProject[_0x9ace('0x8')](e,emitEvent(event));}}module['exports']=SquareProjectEvents; \ No newline at end of file +var _0x60ee=['exports','events','../../mysqldb','SquareProject','setMaxListeners','save','update','emit','hasOwnProperty'];(function(_0x454022,_0x3f6ab9){var _0xf0ad1b=function(_0x1116af){while(--_0x1116af){_0x454022['push'](_0x454022['shift']());}};_0xf0ad1b(++_0x3f6ab9);}(_0x60ee,0xd0));var _0xe60e=function(_0x1e172a,_0x52102b){_0x1e172a=_0x1e172a-0x0;var _0x96338b=_0x60ee[_0x1e172a];return _0x96338b;};'use strict';var EventEmitter=require(_0xe60e('0x0'));var SquareProject=require(_0xe60e('0x1'))['db'][_0xe60e('0x2')];var SquareProjectEvents=new EventEmitter();SquareProjectEvents[_0xe60e('0x3')](0x0);var events={'afterCreate':_0xe60e('0x4'),'afterUpdate':_0xe60e('0x5'),'afterDestroy':'remove'};function emitEvent(_0x3bd2e9){return function(_0x53dd77,_0x278004,_0x497821){SquareProjectEvents[_0xe60e('0x6')](_0x3bd2e9+':'+_0x53dd77['id'],_0x53dd77);SquareProjectEvents[_0xe60e('0x6')](_0x3bd2e9,_0x53dd77);_0x497821(null);};}for(var e in events){if(events[_0xe60e('0x7')](e)){var event=events[e];SquareProject['hook'](e,emitEvent(event));}}module[_0xe60e('0x8')]=SquareProjectEvents; \ No newline at end of file diff --git a/server/api/squareProject/squareProject.model.js b/server/api/squareProject/squareProject.model.js index aac6ee1..a86b9e0 100644 --- a/server/api/squareProject/squareProject.model.js +++ b/server/api/squareProject/squareProject.model.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xae17=['format','YYYY-MM-DD\x20HH:mm:ss','publishedAt','lodash','../../config/logger','api','bluebird','request-promise','../../config/environment','./squareProject.attributes','exports','define','SquareProject','square_projects','changed','savedAt'];(function(_0x419b6a,_0x265b43){var _0x229232=function(_0x514a3e){while(--_0x514a3e){_0x419b6a['push'](_0x419b6a['shift']());}};_0x229232(++_0x265b43);}(_0xae17,0x113));var _0x7ae1=function(_0x367463,_0x588459){_0x367463=_0x367463-0x0;var _0x2c2298=_0xae17[_0x367463];return _0x2c2298;};'use strict';var _=require(_0x7ae1('0x0'));var util=require('util');var logger=require(_0x7ae1('0x1'))(_0x7ae1('0x2'));var moment=require('moment');var BPromise=require(_0x7ae1('0x3'));var rp=require(_0x7ae1('0x4'));var fs=require('fs');var path=require('path');var rimraf=require('rimraf');var config=require(_0x7ae1('0x5'));var attributes=require(_0x7ae1('0x6'));module[_0x7ae1('0x7')]=function(_0x36c408,_0xe27940){return _0x36c408[_0x7ae1('0x8')](_0x7ae1('0x9'),attributes,{'tableName':_0x7ae1('0xa'),'paranoid':![],'indexes':[],'timestamps':!![],'hooks':{'beforeUpdate':function(_0x55f9,_0x358029,_0x93e74f){if(_0x55f9[_0x7ae1('0xb')]('preproduction')){_0x55f9[_0x7ae1('0xc')]=moment()[_0x7ae1('0xd')](_0x7ae1('0xe'));}if(_0x55f9['changed']('production')){_0x55f9[_0x7ae1('0xf')]=moment()['format']('YYYY-MM-DD\x20HH:mm:ss');}_0x93e74f(null,_0x55f9);}}});}; \ No newline at end of file +var _0x671a=['format','production','publishedAt','YYYY-MM-DD\x20HH:mm:ss','util','../../config/logger','bluebird','rimraf','./squareProject.attributes','exports','define','SquareProject','square_projects','changed','savedAt'];(function(_0x20a584,_0xe384a5){var _0x4b41a8=function(_0x2127c6){while(--_0x2127c6){_0x20a584['push'](_0x20a584['shift']());}};_0x4b41a8(++_0xe384a5);}(_0x671a,0x15d));var _0xa671=function(_0x32146e,_0x2be230){_0x32146e=_0x32146e-0x0;var _0x375cc7=_0x671a[_0x32146e];return _0x375cc7;};'use strict';var _=require('lodash');var util=require(_0xa671('0x0'));var logger=require(_0xa671('0x1'))('api');var moment=require('moment');var BPromise=require(_0xa671('0x2'));var rp=require('request-promise');var fs=require('fs');var path=require('path');var rimraf=require(_0xa671('0x3'));var config=require('../../config/environment');var attributes=require(_0xa671('0x4'));module[_0xa671('0x5')]=function(_0x508516,_0x5e1efd){return _0x508516[_0xa671('0x6')](_0xa671('0x7'),attributes,{'tableName':_0xa671('0x8'),'paranoid':![],'indexes':[],'timestamps':!![],'hooks':{'beforeUpdate':function(_0xc7ccb5,_0x2d19d2,_0x57790c){if(_0xc7ccb5[_0xa671('0x9')]('preproduction')){_0xc7ccb5[_0xa671('0xa')]=moment()[_0xa671('0xb')]('YYYY-MM-DD\x20HH:mm:ss');}if(_0xc7ccb5[_0xa671('0x9')](_0xa671('0xc'))){_0xc7ccb5[_0xa671('0xd')]=moment()[_0xa671('0xb')](_0xa671('0xe'));}_0x57790c(null,_0xc7ccb5);}}});}; \ No newline at end of file diff --git a/server/api/squareProject/squareProject.rpc.js b/server/api/squareProject/squareProject.rpc.js index 75f7188..5928ab2 100644 --- a/server/api/squareProject/squareProject.rpc.js +++ b/server/api/squareProject/squareProject.rpc.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xec36=['debug','lodash','../../config/logger','../../config/environment','redis','defaults','localhost','socket.io-emitter','./squareProject.socket','SquareProject','findAll','options','raw','where','attributes','limit','include','map','model','then','info','GetSquareProjects','stringify','catch','error','message','ShowSquareProject'];(function(_0x57d745,_0xabddf1){var _0x2c6edc=function(_0x55fa54){while(--_0x55fa54){_0x57d745['push'](_0x57d745['shift']());}};_0x2c6edc(++_0xabddf1);}(_0xec36,0xa3));var _0x6ec3=function(_0x391c55,_0x168617){_0x391c55=_0x391c55-0x0;var _0xa434e0=_0xec36[_0x391c55];return _0xa434e0;};'use strict';var _=require(_0x6ec3('0x0'));var Redis=require('ioredis');var db=require('../../mysqldb')['db'];var logger=require(_0x6ec3('0x1'))('rpc');var config=require(_0x6ec3('0x2'));config[_0x6ec3('0x3')]=_[_0x6ec3('0x4')](config[_0x6ec3('0x3')],{'host':_0x6ec3('0x5'),'port':0x18eb});var socket=require(_0x6ec3('0x6'))(new Redis(config[_0x6ec3('0x3')]));require(_0x6ec3('0x7'))['register'](socket);exports['GetSquareProjects']=function(_0x25dffb){var _0x3c8db4=this;return new Promise(function(_0x6dd1a6,_0x72ff5d){return db[_0x6ec3('0x8')][_0x6ec3('0x9')]({'raw':_0x25dffb[_0x6ec3('0xa')]?_0x25dffb[_0x6ec3('0xa')][_0x6ec3('0xb')]===undefined?!![]:![]:!![],'where':_0x25dffb['options']?_0x25dffb[_0x6ec3('0xa')][_0x6ec3('0xc')]||null:null,'attributes':_0x25dffb[_0x6ec3('0xa')]?_0x25dffb[_0x6ec3('0xa')][_0x6ec3('0xd')]||null:null,'limit':_0x25dffb[_0x6ec3('0xa')]?_0x25dffb[_0x6ec3('0xa')][_0x6ec3('0xe')]||null:null,'include':_0x25dffb[_0x6ec3('0xa')]?_0x25dffb['options'][_0x6ec3('0xf')]?_[_0x6ec3('0x10')](_0x25dffb['options'][_0x6ec3('0xf')],function(_0x13ffb7){return{'model':db[_0x13ffb7[_0x6ec3('0x11')]],'as':_0x13ffb7['as'],'attributes':_0x13ffb7['attributes'],'include':_0x13ffb7[_0x6ec3('0xf')]?_[_0x6ec3('0x10')](_0x13ffb7['include'],function(_0x5460b1){return{'model':db[_0x5460b1['model']],'as':_0x5460b1['as'],'attributes':_0x5460b1[_0x6ec3('0xd')],'include':_0x5460b1[_0x6ec3('0xf')]?_[_0x6ec3('0x10')](_0x5460b1['include'],function(_0x5050cf){return{'model':db[_0x5050cf[_0x6ec3('0x11')]],'as':_0x5050cf['as'],'attributes':_0x5050cf[_0x6ec3('0xd')]};}):[]};}):[]};}):[]:[]})[_0x6ec3('0x12')](function(_0x20d7e2){logger[_0x6ec3('0x13')](_0x6ec3('0x14'),_0x25dffb);logger['debug'](_0x6ec3('0x14'),_0x25dffb,JSON[_0x6ec3('0x15')](_0x20d7e2));_0x6dd1a6(_0x20d7e2);})[_0x6ec3('0x16')](function(_0x1e1575){logger[_0x6ec3('0x17')]('GetSquareProjects',_0x1e1575[_0x6ec3('0x18')],_0x25dffb);_0x72ff5d(_0x3c8db4[_0x6ec3('0x17')](0x1f4,_0x1e1575['message']));});});};exports[_0x6ec3('0x19')]=function(_0xe33f52){var _0x86da2f=this;return new Promise(function(_0x5da46a,_0x35645a){return db[_0x6ec3('0x8')]['find']({'raw':_0xe33f52[_0x6ec3('0xa')]?_0xe33f52[_0x6ec3('0xa')][_0x6ec3('0xb')]===undefined?!![]:![]:!![],'where':_0xe33f52[_0x6ec3('0xa')]?_0xe33f52['options'][_0x6ec3('0xc')]||null:null,'attributes':_0xe33f52['options']?_0xe33f52[_0x6ec3('0xa')]['attributes']||null:null,'include':_0xe33f52[_0x6ec3('0xa')]?_0xe33f52[_0x6ec3('0xa')][_0x6ec3('0xf')]?_[_0x6ec3('0x10')](_0xe33f52['options'][_0x6ec3('0xf')],function(_0x106dc9){return{'model':db[_0x106dc9['model']],'as':_0x106dc9['as'],'attributes':_0x106dc9['attributes'],'include':_0x106dc9[_0x6ec3('0xf')]?_[_0x6ec3('0x10')](_0x106dc9[_0x6ec3('0xf')],function(_0x3528ee){return{'model':db[_0x3528ee[_0x6ec3('0x11')]],'as':_0x3528ee['as'],'attributes':_0x3528ee['attributes'],'include':_0x3528ee[_0x6ec3('0xf')]?_[_0x6ec3('0x10')](_0x3528ee[_0x6ec3('0xf')],function(_0x63ab7a){return{'model':db[_0x63ab7a['model']],'as':_0x63ab7a['as'],'attributes':_0x63ab7a[_0x6ec3('0xd')]};}):[]};}):[]};}):[]:[]})[_0x6ec3('0x12')](function(_0x5415fa){logger['info']('ShowSquareProject',_0xe33f52);logger[_0x6ec3('0x1a')](_0x6ec3('0x19'),_0xe33f52,JSON[_0x6ec3('0x15')](_0x5415fa));_0x5da46a(_0x5415fa);})[_0x6ec3('0x16')](function(_0xfb9283){logger[_0x6ec3('0x17')](_0x6ec3('0x19'),_0xfb9283[_0x6ec3('0x18')],_0xe33f52);_0x35645a(_0x86da2f[_0x6ec3('0x17')](0x1f4,_0xfb9283[_0x6ec3('0x18')]));});});}; \ No newline at end of file +var _0xdb4d=['limit','include','map','model','then','GetSquareProjects','catch','message','error','find','info','ShowSquareProject','debug','lodash','ioredis','../../mysqldb','rpc','redis','defaults','socket.io-emitter','register','SquareProject','findAll','options','raw','attributes'];(function(_0x12f451,_0x3b618f){var _0x5e9589=function(_0x3153d2){while(--_0x3153d2){_0x12f451['push'](_0x12f451['shift']());}};_0x5e9589(++_0x3b618f);}(_0xdb4d,0x1e1));var _0xddb4=function(_0x34f245,_0x25e9af){_0x34f245=_0x34f245-0x0;var _0x31ba8a=_0xdb4d[_0x34f245];return _0x31ba8a;};'use strict';var _=require(_0xddb4('0x0'));var Redis=require(_0xddb4('0x1'));var db=require(_0xddb4('0x2'))['db'];var logger=require('../../config/logger')(_0xddb4('0x3'));var config=require('../../config/environment');config[_0xddb4('0x4')]=_[_0xddb4('0x5')](config['redis'],{'host':'localhost','port':0x18eb});var socket=require(_0xddb4('0x6'))(new Redis(config[_0xddb4('0x4')]));require('./squareProject.socket')[_0xddb4('0x7')](socket);exports['GetSquareProjects']=function(_0x2b8d26){var _0x47d55e=this;return new Promise(function(_0x52b21b,_0x417db1){return db[_0xddb4('0x8')][_0xddb4('0x9')]({'raw':_0x2b8d26[_0xddb4('0xa')]?_0x2b8d26[_0xddb4('0xa')][_0xddb4('0xb')]===undefined?!![]:![]:!![],'where':_0x2b8d26[_0xddb4('0xa')]?_0x2b8d26[_0xddb4('0xa')]['where']||null:null,'attributes':_0x2b8d26[_0xddb4('0xa')]?_0x2b8d26['options'][_0xddb4('0xc')]||null:null,'limit':_0x2b8d26[_0xddb4('0xa')]?_0x2b8d26[_0xddb4('0xa')][_0xddb4('0xd')]||null:null,'include':_0x2b8d26[_0xddb4('0xa')]?_0x2b8d26[_0xddb4('0xa')][_0xddb4('0xe')]?_[_0xddb4('0xf')](_0x2b8d26[_0xddb4('0xa')]['include'],function(_0x3e6891){return{'model':db[_0x3e6891['model']],'as':_0x3e6891['as'],'attributes':_0x3e6891['attributes'],'include':_0x3e6891[_0xddb4('0xe')]?_[_0xddb4('0xf')](_0x3e6891['include'],function(_0x33d882){return{'model':db[_0x33d882[_0xddb4('0x10')]],'as':_0x33d882['as'],'attributes':_0x33d882['attributes'],'include':_0x33d882[_0xddb4('0xe')]?_['map'](_0x33d882['include'],function(_0x45f341){return{'model':db[_0x45f341[_0xddb4('0x10')]],'as':_0x45f341['as'],'attributes':_0x45f341[_0xddb4('0xc')]};}):[]};}):[]};}):[]:[]})[_0xddb4('0x11')](function(_0x2649a8){logger['info'](_0xddb4('0x12'),_0x2b8d26);logger['debug'](_0xddb4('0x12'),_0x2b8d26,JSON['stringify'](_0x2649a8));_0x52b21b(_0x2649a8);})[_0xddb4('0x13')](function(_0x5e7eb7){logger['error']('GetSquareProjects',_0x5e7eb7[_0xddb4('0x14')],_0x2b8d26);_0x417db1(_0x47d55e[_0xddb4('0x15')](0x1f4,_0x5e7eb7[_0xddb4('0x14')]));});});};exports['ShowSquareProject']=function(_0x5ef971){var _0x15d9cd=this;return new Promise(function(_0x3f2006,_0x44ea47){return db[_0xddb4('0x8')][_0xddb4('0x16')]({'raw':_0x5ef971[_0xddb4('0xa')]?_0x5ef971[_0xddb4('0xa')][_0xddb4('0xb')]===undefined?!![]:![]:!![],'where':_0x5ef971['options']?_0x5ef971['options']['where']||null:null,'attributes':_0x5ef971['options']?_0x5ef971['options'][_0xddb4('0xc')]||null:null,'include':_0x5ef971[_0xddb4('0xa')]?_0x5ef971[_0xddb4('0xa')][_0xddb4('0xe')]?_[_0xddb4('0xf')](_0x5ef971[_0xddb4('0xa')][_0xddb4('0xe')],function(_0x4ef15d){return{'model':db[_0x4ef15d[_0xddb4('0x10')]],'as':_0x4ef15d['as'],'attributes':_0x4ef15d[_0xddb4('0xc')],'include':_0x4ef15d[_0xddb4('0xe')]?_[_0xddb4('0xf')](_0x4ef15d[_0xddb4('0xe')],function(_0x48346c){return{'model':db[_0x48346c['model']],'as':_0x48346c['as'],'attributes':_0x48346c[_0xddb4('0xc')],'include':_0x48346c['include']?_[_0xddb4('0xf')](_0x48346c[_0xddb4('0xe')],function(_0x358f36){return{'model':db[_0x358f36[_0xddb4('0x10')]],'as':_0x358f36['as'],'attributes':_0x358f36[_0xddb4('0xc')]};}):[]};}):[]};}):[]:[]})[_0xddb4('0x11')](function(_0x29e271){logger[_0xddb4('0x17')](_0xddb4('0x18'),_0x5ef971);logger[_0xddb4('0x19')]('ShowSquareProject',_0x5ef971,JSON['stringify'](_0x29e271));_0x3f2006(_0x29e271);})['catch'](function(_0x5e287a){logger[_0xddb4('0x15')](_0xddb4('0x18'),_0x5e287a[_0xddb4('0x14')],_0x5ef971);_0x44ea47(_0x15d9cd['error'](0x1f4,_0x5e287a[_0xddb4('0x14')]));});});}; \ No newline at end of file diff --git a/server/api/squareProject/squareProject.socket.js b/server/api/squareProject/squareProject.socket.js index 3c0d815..b20b3e5 100644 --- a/server/api/squareProject/squareProject.socket.js +++ b/server/api/squareProject/squareProject.socket.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xcc1c=['update','removeListener','register','length','squareProject:','./squareProject.events','remove'];(function(_0x38f737,_0x54f685){var _0x7afda3=function(_0x1ac1d7){while(--_0x1ac1d7){_0x38f737['push'](_0x38f737['shift']());}};_0x7afda3(++_0x54f685);}(_0xcc1c,0x1e1));var _0xccc1=function(_0x158f01,_0x12af3e){_0x158f01=_0x158f01-0x0;var _0x5ef74e=_0xcc1c[_0x158f01];return _0x5ef74e;};'use strict';var SquareProjectEvents=require(_0xccc1('0x0'));var events=['save',_0xccc1('0x1'),_0xccc1('0x2')];function createListener(_0x538345,_0x2df7ec){return function(_0x2733f0){_0x2df7ec['emit'](_0x538345,_0x2733f0);};}function removeListener(_0x6783b9,_0x72bade){return function(){SquareProjectEvents[_0xccc1('0x3')](_0x6783b9,_0x72bade);};}exports[_0xccc1('0x4')]=function(_0x1f7840){for(var _0x11f935=0x0,_0x437e1c=events[_0xccc1('0x5')];_0x11f935<_0x437e1c;_0x11f935++){var _0x1c8a33=events[_0x11f935];var _0x109d61=createListener(_0xccc1('0x6')+_0x1c8a33,_0x1f7840);SquareProjectEvents['on'](_0x1c8a33,_0x109d61);}}; \ No newline at end of file +var _0x3378=['length','squareProject:','./squareProject.events','save','remove','update','emit','register'];(function(_0x21b7f3,_0x16e277){var _0x24d773=function(_0x4849a2){while(--_0x4849a2){_0x21b7f3['push'](_0x21b7f3['shift']());}};_0x24d773(++_0x16e277);}(_0x3378,0x7a));var _0x8337=function(_0x45ce08,_0x59dcc7){_0x45ce08=_0x45ce08-0x0;var _0x23dff2=_0x3378[_0x45ce08];return _0x23dff2;};'use strict';var SquareProjectEvents=require(_0x8337('0x0'));var events=[_0x8337('0x1'),_0x8337('0x2'),_0x8337('0x3')];function createListener(_0x5d6956,_0x570f43){return function(_0x21806f){_0x570f43[_0x8337('0x4')](_0x5d6956,_0x21806f);};}function removeListener(_0x3eb067,_0x3fd9ea){return function(){SquareProjectEvents['removeListener'](_0x3eb067,_0x3fd9ea);};}exports[_0x8337('0x5')]=function(_0xd7670a){for(var _0x3fb790=0x0,_0x54a0d4=events[_0x8337('0x6')];_0x3fb790<_0x54a0d4;_0x3fb790++){var _0x305048=events[_0x3fb790];var _0xdc935b=createListener(_0x8337('0x7')+_0x305048,_0xd7670a);SquareProjectEvents['on'](_0x305048,_0xdc935b);}}; \ No newline at end of file diff --git a/server/api/squareRecording/index.js b/server/api/squareRecording/index.js index ce5fac1..09aee4b 100644 --- a/server/api/squareRecording/index.js +++ b/server/api/squareRecording/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x1261=['isAuthenticated','show','/:id/download','post','create','/:id','delete','destroy','exports','util','path','connect-timeout','express','Router','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','./squareRecording.controller','index','get'];(function(_0x159265,_0x5d759f){var _0x139606=function(_0x390300){while(--_0x390300){_0x159265['push'](_0x159265['shift']());}};_0x139606(++_0x5d759f);}(_0x1261,0x144));var _0x1126=function(_0x101094,_0x5d3900){_0x101094=_0x101094-0x0;var _0x3d6d75=_0x1261[_0x101094];return _0x3d6d75;};'use strict';var multer=require('multer');var util=require(_0x1126('0x0'));var path=require(_0x1126('0x1'));var timeout=require(_0x1126('0x2'));var express=require(_0x1126('0x3'));var router=express[_0x1126('0x4')]();var fs_extra=require(_0x1126('0x5'));var auth=require(_0x1126('0x6'));var interaction=require(_0x1126('0x7'));var config=require(_0x1126('0x8'));var controller=require(_0x1126('0x9'));router['get']('/',auth['isAuthenticated'](),controller[_0x1126('0xa')]);router[_0x1126('0xb')]('/:id',auth[_0x1126('0xc')](),controller[_0x1126('0xd')]);router[_0x1126('0xb')](_0x1126('0xe'),auth[_0x1126('0xc')](),controller['download']);router[_0x1126('0xf')]('/',auth[_0x1126('0xc')](),controller[_0x1126('0x10')]);router['put'](_0x1126('0x11'),auth['isAuthenticated'](),controller['update']);router[_0x1126('0x12')]('/:id',auth[_0x1126('0xc')](),controller[_0x1126('0x13')]);module[_0x1126('0x14')]=router; \ No newline at end of file +var _0x326f=['multer','connect-timeout','express','Router','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','./squareRecording.controller','get','isAuthenticated','/:id','show','download','post','create','put','delete','exports'];(function(_0x233f43,_0x600ccb){var _0x3059d4=function(_0x3673e3){while(--_0x3673e3){_0x233f43['push'](_0x233f43['shift']());}};_0x3059d4(++_0x600ccb);}(_0x326f,0xd1));var _0xf326=function(_0x28e7e1,_0x4a0560){_0x28e7e1=_0x28e7e1-0x0;var _0x4aca5e=_0x326f[_0x28e7e1];return _0x4aca5e;};'use strict';var multer=require(_0xf326('0x0'));var util=require('util');var path=require('path');var timeout=require(_0xf326('0x1'));var express=require(_0xf326('0x2'));var router=express[_0xf326('0x3')]();var fs_extra=require(_0xf326('0x4'));var auth=require(_0xf326('0x5'));var interaction=require(_0xf326('0x6'));var config=require(_0xf326('0x7'));var controller=require(_0xf326('0x8'));router[_0xf326('0x9')]('/',auth[_0xf326('0xa')](),controller['index']);router[_0xf326('0x9')](_0xf326('0xb'),auth[_0xf326('0xa')](),controller[_0xf326('0xc')]);router['get']('/:id/download',auth['isAuthenticated'](),controller[_0xf326('0xd')]);router[_0xf326('0xe')]('/',auth[_0xf326('0xa')](),controller[_0xf326('0xf')]);router[_0xf326('0x10')]('/:id',auth[_0xf326('0xa')](),controller['update']);router[_0xf326('0x11')]('/:id',auth[_0xf326('0xa')](),controller['destroy']);module[_0xf326('0x12')]=router; \ No newline at end of file diff --git a/server/api/squareRecording/squareRecording.attributes.js b/server/api/squareRecording/squareRecording.attributes.js index 2b3baa5..7ebff6f 100644 --- a/server/api/squareRecording/squareRecording.attributes.js +++ b/server/api/squareRecording/squareRecording.attributes.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x425d=['getDataValue','savePath','substring','lastIndexOf','sequelize','STRING','VIRTUAL'];(function(_0x2bab3c,_0x2f598c){var _0x10f896=function(_0x397031){while(--_0x397031){_0x2bab3c['push'](_0x2bab3c['shift']());}};_0x10f896(++_0x2f598c);}(_0x425d,0x1e0));var _0xd425=function(_0x9b64b2,_0x28fbc7){_0x9b64b2=_0x9b64b2-0x0;var _0x1ca2ad=_0x425d[_0x9b64b2];return _0x1ca2ad;};'use strict';var Sequelize=require(_0xd425('0x0'));module['exports']={'uniqueid':{'type':Sequelize[_0xd425('0x1')]},'callerid':{'type':Sequelize[_0xd425('0x1')]},'calleridname':{'type':Sequelize[_0xd425('0x1')]},'context':{'type':Sequelize[_0xd425('0x1')]},'extension':{'type':Sequelize[_0xd425('0x1')]},'priority':{'type':Sequelize[_0xd425('0x1')]},'accountcode':{'type':Sequelize[_0xd425('0x1')]},'dnid':{'type':Sequelize['STRING']},'projectName':{'type':Sequelize[_0xd425('0x1')]},'saveName':{'type':Sequelize[_0xd425('0x1')]},'filename':{'type':Sequelize[_0xd425('0x1')]},'savePath':{'type':Sequelize[_0xd425('0x1')]},'format':{'type':Sequelize[_0xd425('0x2')],'get':function(){var _0x1d2ed0='';var _0x50b061=this[_0xd425('0x3')](_0xd425('0x4'));if(_0x50b061){_0x1d2ed0=_0x50b061[_0xd425('0x5')](_0x50b061[_0xd425('0x6')]('.'));}return _0x1d2ed0;}}}; \ No newline at end of file +var _0x814b=['substring','lastIndexOf','sequelize','exports','STRING','VIRTUAL','getDataValue','savePath'];(function(_0x3f88fc,_0x4f5b60){var _0x6fb940=function(_0x3d0755){while(--_0x3d0755){_0x3f88fc['push'](_0x3f88fc['shift']());}};_0x6fb940(++_0x4f5b60);}(_0x814b,0x1a2));var _0xb814=function(_0xa63ea3,_0x4367ff){_0xa63ea3=_0xa63ea3-0x0;var _0x2aa5ff=_0x814b[_0xa63ea3];return _0x2aa5ff;};'use strict';var Sequelize=require(_0xb814('0x0'));module[_0xb814('0x1')]={'uniqueid':{'type':Sequelize[_0xb814('0x2')]},'callerid':{'type':Sequelize[_0xb814('0x2')]},'calleridname':{'type':Sequelize[_0xb814('0x2')]},'context':{'type':Sequelize[_0xb814('0x2')]},'extension':{'type':Sequelize['STRING']},'priority':{'type':Sequelize[_0xb814('0x2')]},'accountcode':{'type':Sequelize[_0xb814('0x2')]},'dnid':{'type':Sequelize[_0xb814('0x2')]},'projectName':{'type':Sequelize[_0xb814('0x2')]},'saveName':{'type':Sequelize[_0xb814('0x2')]},'filename':{'type':Sequelize[_0xb814('0x2')]},'savePath':{'type':Sequelize['STRING']},'format':{'type':Sequelize[_0xb814('0x3')],'get':function(){var _0x2e6272='';var _0x5c8539=this[_0xb814('0x4')](_0xb814('0x5'));if(_0x5c8539){_0x2e6272=_0x5c8539[_0xb814('0x6')](_0x5c8539[_0xb814('0x7')]('.'));}return _0x2e6272;}}}; \ No newline at end of file diff --git a/server/api/squareRecording/squareRecording.controller.js b/server/api/squareRecording/squareRecording.controller.js index 05bb68b..9629fa3 100644 --- a/server/api/squareRecording/squareRecording.controller.js +++ b/server/api/squareRecording/squareRecording.controller.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xb91f=['path','sox','ejs','fs-extra','crypto','jsforce','to-csv','papaparse','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','sendStatus','status','end','offset','undefined','count','limit','set','Content-Range','apply','save','then','error','name','send','index','map','SquareRecording','fieldName','type','query','keys','filters','intersection','model','attributes','fields','length','hasOwnProperty','order','where','pick','filter','merge','VIRTUAL','include','rows','catch','show','params','rawAttributes','options','find','create','body','download','../../components/encryptor','savePath','filename','format','%s.cypher','existsSync','decryptFile','secrets','recording','Sequelize','ValidationError','SquareRecording\x20not\x20found','extname','unlink','Not\x20found','destroy','isNil','info','\x22\x20trovato\x20eseguo\x20la\x20cancellazione','unlinkSync','File:\x20\x22','eml-format','zip-dir','moment','bluebird','util'];(function(_0x4e29f1,_0x3da155){var _0x4bc72f=function(_0x443443){while(--_0x443443){_0x4e29f1['push'](_0x4e29f1['shift']());}};_0x4bc72f(++_0x3da155);}(_0xb91f,0x103));var _0xfb91=function(_0x74307a,_0x15cbb8){_0x74307a=_0x74307a-0x0;var _0x16e824=_0xb91f[_0x74307a];return _0x16e824;};'use strict';var emlformat=require(_0xfb91('0x0'));var rimraf=require('rimraf');var zipdir=require(_0xfb91('0x1'));var jsonpatch=require('fast-json-patch');var rp=require('request-promise');var moment=require(_0xfb91('0x2'));var BPromise=require(_0xfb91('0x3'));var Mustache=require('mustache');var util=require(_0xfb91('0x4'));var path=require(_0xfb91('0x5'));var sox=require(_0xfb91('0x6'));var csv=require('to-csv');var ejs=require(_0xfb91('0x7'));var fs=require('fs');var fs_extra=require(_0xfb91('0x8'));var _=require('lodash');var squel=require('squel');var crypto=require(_0xfb91('0x9'));var jsforce=require(_0xfb91('0xa'));var deskjs=require('desk.js');var toCsv=require(_0xfb91('0xb'));var querystring=require('querystring');var Papa=require(_0xfb91('0xc'));var Redis=require('ioredis');var authService=require(_0xfb91('0xd'));var qs=require(_0xfb91('0xe'));var as=require(_0xfb91('0xf'));var hardwareService=require(_0xfb91('0x10'));var logger=require(_0xfb91('0x11'))(_0xfb91('0x12'));var utils=require(_0xfb91('0x13'));var config=require(_0xfb91('0x14'));var licenseUtil=require('../../config/license/util');var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0xb13581,_0x5926db){_0x5926db=_0x5926db||0xcc;return function(_0x18f5a6){if(_0x18f5a6){return _0xb13581[_0xfb91('0x15')](_0x5926db);}return _0xb13581[_0xfb91('0x16')](_0x5926db)[_0xfb91('0x17')]();};}function respondWithResult(_0x2d6939,_0x382ff0){_0x382ff0=_0x382ff0||0xc8;return function(_0x54ff91){if(_0x54ff91){return _0x2d6939[_0xfb91('0x16')](_0x382ff0)['json'](_0x54ff91);}};}function respondWithFilteredResult(_0x317ab4,_0x65c891){return function(_0x5fb1a2){if(_0x5fb1a2){var _0x5defa7=typeof _0x65c891[_0xfb91('0x18')]==='undefined'&&typeof _0x65c891['limit']===_0xfb91('0x19');var _0x4ea3b2=_0x5fb1a2[_0xfb91('0x1a')];var _0x112763=_0x5defa7?0x0:_0x65c891[_0xfb91('0x18')];var _0x1a4c0f=_0x5defa7?_0x5fb1a2[_0xfb91('0x1a')]:_0x65c891[_0xfb91('0x18')]+_0x65c891[_0xfb91('0x1b')];var _0xf01d17;if(_0x1a4c0f>=_0x4ea3b2){_0x1a4c0f=_0x4ea3b2;_0xf01d17=0xc8;}else{_0xf01d17=0xce;}_0x317ab4[_0xfb91('0x16')](_0xf01d17);return _0x317ab4[_0xfb91('0x1c')](_0xfb91('0x1d'),_0x112763+'-'+_0x1a4c0f+'/'+_0x4ea3b2)['json'](_0x5fb1a2);}return null;};}function patchUpdates(_0x444680){return function(_0x4bdba1){try{jsonpatch[_0xfb91('0x1e')](_0x4bdba1,_0x444680,!![]);}catch(_0x6763dd){return BPromise['reject'](_0x6763dd);}return _0x4bdba1[_0xfb91('0x1f')]();};}function saveUpdates(_0x12a323,_0x3a90d2){return function(_0x561a2e){if(_0x561a2e){return _0x561a2e['update'](_0x12a323)['then'](function(_0x346080){return _0x346080;});}return null;};}function removeEntity(_0x5c4518,_0x233a10){return function(_0x11918c){if(_0x11918c){return _0x11918c['destroy']()[_0xfb91('0x20')](function(){_0x5c4518[_0xfb91('0x16')](0xcc)[_0xfb91('0x17')]();});}};}function handleEntityNotFound(_0x3b113f,_0x27e0e0){return function(_0x4f3c64){if(!_0x4f3c64){_0x3b113f[_0xfb91('0x15')](0x194);}return _0x4f3c64;};}function handleError(_0x181e06,_0x41437b){_0x41437b=_0x41437b||0x1f4;return function(_0x53d14f){logger[_0xfb91('0x21')](_0x53d14f['stack']);if(_0x53d14f[_0xfb91('0x22')]){delete _0x53d14f[_0xfb91('0x22')];}_0x181e06[_0xfb91('0x16')](_0x41437b)[_0xfb91('0x23')](_0x53d14f);};}exports[_0xfb91('0x24')]=function(_0x169215,_0x28f1ce){var _0x1c3fee={},_0x36eaa3={},_0x8d8528={'count':0x0,'rows':[]};var _0xd0736f=_[_0xfb91('0x25')](db[_0xfb91('0x26')]['rawAttributes'],function(_0x313fc9){return{'name':_0x313fc9[_0xfb91('0x27')],'type':_0x313fc9[_0xfb91('0x28')]['key']};});_0x36eaa3['model']=_[_0xfb91('0x25')](_0xd0736f,_0xfb91('0x22'));_0x36eaa3[_0xfb91('0x29')]=_[_0xfb91('0x2a')](_0x169215['query']);_0x36eaa3[_0xfb91('0x2b')]=_[_0xfb91('0x2c')](_0x36eaa3[_0xfb91('0x2d')],_0x36eaa3[_0xfb91('0x29')]);_0x1c3fee[_0xfb91('0x2e')]=_[_0xfb91('0x2c')](_0x36eaa3['model'],qs[_0xfb91('0x2f')](_0x169215[_0xfb91('0x29')][_0xfb91('0x2f')]));_0x1c3fee[_0xfb91('0x2e')]=_0x1c3fee['attributes'][_0xfb91('0x30')]?_0x1c3fee[_0xfb91('0x2e')]:_0x36eaa3['model'];if(!_0x169215[_0xfb91('0x29')][_0xfb91('0x31')]('nolimit')){_0x1c3fee[_0xfb91('0x1b')]=qs[_0xfb91('0x1b')](_0x169215[_0xfb91('0x29')]['limit']);_0x1c3fee['offset']=qs[_0xfb91('0x18')](_0x169215[_0xfb91('0x29')]['offset']);}_0x1c3fee[_0xfb91('0x32')]=qs['sort'](_0x169215[_0xfb91('0x29')]['sort']);_0x1c3fee[_0xfb91('0x33')]=qs[_0xfb91('0x2b')](_[_0xfb91('0x34')](_0x169215[_0xfb91('0x29')],_0x36eaa3['filters']),_0xd0736f);if(_0x169215['query'][_0xfb91('0x35')]){_0x1c3fee['where']=_[_0xfb91('0x36')](_0x1c3fee[_0xfb91('0x33')],{'$or':_[_0xfb91('0x25')](_0xd0736f,function(_0x29485d){if(_0x29485d[_0xfb91('0x28')]!==_0xfb91('0x37')){var _0x5d993b={};_0x5d993b[_0x29485d[_0xfb91('0x22')]]={'$like':'%'+_0x169215[_0xfb91('0x29')][_0xfb91('0x35')]+'%'};return _0x5d993b;}})});}_0x1c3fee=_[_0xfb91('0x36')]({},_0x1c3fee,_0x169215['options']);var _0x4910e2={'where':_0x1c3fee[_0xfb91('0x33')]};return db[_0xfb91('0x26')][_0xfb91('0x1a')](_0x4910e2)[_0xfb91('0x20')](function(_0x533e7c){_0x8d8528[_0xfb91('0x1a')]=_0x533e7c;if(_0x169215['query']['includeAll']){_0x1c3fee[_0xfb91('0x38')]=[{'all':!![]}];}return db['SquareRecording']['findAll'](_0x1c3fee);})[_0xfb91('0x20')](function(_0x3a709f){_0x8d8528[_0xfb91('0x39')]=_0x3a709f;return _0x8d8528;})[_0xfb91('0x20')](respondWithFilteredResult(_0x28f1ce,_0x1c3fee))[_0xfb91('0x3a')](handleError(_0x28f1ce,null));};exports[_0xfb91('0x3b')]=function(_0x297fa3,_0x950c47){var _0x570f94={'raw':!![],'where':{'id':_0x297fa3[_0xfb91('0x3c')]['id']}},_0x461106={};_0x461106[_0xfb91('0x2d')]=_[_0xfb91('0x2a')](db[_0xfb91('0x26')][_0xfb91('0x3d')]);_0x461106['query']=_[_0xfb91('0x2a')](_0x297fa3[_0xfb91('0x29')]);_0x461106[_0xfb91('0x2b')]=_[_0xfb91('0x2c')](_0x461106[_0xfb91('0x2d')],_0x461106[_0xfb91('0x29')]);_0x570f94['attributes']=_[_0xfb91('0x2c')](_0x461106[_0xfb91('0x2d')],qs[_0xfb91('0x2f')](_0x297fa3[_0xfb91('0x29')][_0xfb91('0x2f')]));_0x570f94['attributes']=_0x570f94[_0xfb91('0x2e')][_0xfb91('0x30')]?_0x570f94[_0xfb91('0x2e')]:_0x461106[_0xfb91('0x2d')];if(_0x297fa3[_0xfb91('0x29')]['includeAll']){_0x570f94[_0xfb91('0x38')]=[{'all':!![]}];}_0x570f94=_[_0xfb91('0x36')]({},_0x570f94,_0x297fa3[_0xfb91('0x3e')]);return db['SquareRecording'][_0xfb91('0x3f')](_0x570f94)['then'](handleEntityNotFound(_0x950c47,null))['then'](respondWithResult(_0x950c47,null))['catch'](handleError(_0x950c47,null));};exports[_0xfb91('0x40')]=function(_0x1ffbcd,_0x3ea4c5){return db['SquareRecording']['create'](_0x1ffbcd[_0xfb91('0x41')],{})[_0xfb91('0x20')](respondWithResult(_0x3ea4c5,0xc9))[_0xfb91('0x3a')](handleError(_0x3ea4c5,null));};exports['update']=function(_0x26c73e,_0x2efcb1){if(_0x26c73e['body']['id']){delete _0x26c73e['body']['id'];}return db[_0xfb91('0x26')][_0xfb91('0x3f')]({'where':{'id':_0x26c73e['params']['id']}})[_0xfb91('0x20')](handleEntityNotFound(_0x2efcb1,null))[_0xfb91('0x20')](saveUpdates(_0x26c73e[_0xfb91('0x41')],null))[_0xfb91('0x20')](respondWithResult(_0x2efcb1,null))[_0xfb91('0x3a')](handleError(_0x2efcb1,null));};exports[_0xfb91('0x42')]=function(_0x5ab7cc,_0x1809c3,_0x200ba9){var _0x339eb1=require(_0xfb91('0x43'));var _0x24f987=![];var _0x965b1e={};if(_0x5ab7cc[_0xfb91('0x29')][_0xfb91('0x28')]&&_0x5ab7cc[_0xfb91('0x29')]['type']==='uniqueid'){_0x965b1e['uniqueid']=_0x5ab7cc[_0xfb91('0x3c')]['id'];}else{_0x965b1e['id']=_0x5ab7cc[_0xfb91('0x3c')]['id'];}return db[_0xfb91('0x26')][_0xfb91('0x3f')]({'where':_0x965b1e,'attributes':['id',_0xfb91('0x44'),_0xfb91('0x45')],'raw':!![]})['then'](handleEntityNotFound(_0x1809c3,null))[_0xfb91('0x20')](function(_0x57ce17){if(_0x57ce17){var _0xdc83d3=_0x57ce17[_0xfb91('0x44')];var _0x5e3438=util[_0xfb91('0x46')](_0xfb91('0x47'),_0xdc83d3);if(fs[_0xfb91('0x48')](_0x5e3438)){_0x24f987=!![];return _0x339eb1[_0xfb91('0x49')](_0x5e3438,_0xdc83d3,config[_0xfb91('0x4a')][_0xfb91('0x4b')])[_0xfb91('0x20')](function(){return _0x57ce17;});}return _0x57ce17;}})['then'](function(_0xc0d9f5){if(_0xc0d9f5){var _0x436922=_0xc0d9f5[_0xfb91('0x44')];if(!fs[_0xfb91('0x48')](_0x436922)){throw new db[(_0xfb91('0x4c'))][(_0xfb91('0x4d'))](_0xfb91('0x4e'));}if(_0xc0d9f5['filename']){return _0x1809c3[_0xfb91('0x42')](_0x436922,_0xc0d9f5[_0xfb91('0x45')]+path[_0xfb91('0x4f')](_0x436922),function(){if(_0x24f987){fs['unlink'](_0x436922);}});}else{return _0x1809c3['download'](_0x436922,function(_0x5b6c85){if(_0x24f987){fs[_0xfb91('0x50')](_0x436922);}});}}})[_0xfb91('0x3a')](function(_0x4f4049){if(_0x4f4049['message']==='SquareRecording\x20not\x20found'){_0x1809c3[_0xfb91('0x16')](0x194)[_0xfb91('0x23')](_0xfb91('0x51'));}else{return handleError(_0x1809c3,null);}});};exports[_0xfb91('0x52')]=function(_0x339caf,_0x446438){return db['SquareRecording']['find']({'where':{'id':_0x339caf[_0xfb91('0x3c')]['id']}})[_0xfb91('0x20')](function(_0x3a3785){if(_[_0xfb91('0x53')](_0x3a3785)){throw new ReferenceError('Entity\x20not\x20found');}return _0x3a3785;})[_0xfb91('0x20')](function(_0x74d47f){var _0x3508ee=_0x74d47f[_0xfb91('0x44')];logger[_0xfb91('0x54')]('cancellazione\x20fisica\x20documento\x20%s',_0x3508ee);if(!_[_0xfb91('0x53')](_0x74d47f[_0xfb91('0x44')])&&fs['existsSync'](_0x3508ee)){logger[_0xfb91('0x54')]('File:\x20\x22'+_0x3508ee+_0xfb91('0x55'));fs[_0xfb91('0x56')](_0x3508ee);}_0x3508ee=_0x3508ee+'.cypher';if(!_[_0xfb91('0x53')](_0x74d47f[_0xfb91('0x44')])&&fs[_0xfb91('0x48')](_0x3508ee)){logger['info'](_0xfb91('0x57')+_0x3508ee+_0xfb91('0x55'));fs[_0xfb91('0x56')](_0x3508ee);}return _0x74d47f;})[_0xfb91('0x20')](function(_0x10ed35){if(!_0x10ed35)throw new InternalError();return _0x10ed35[_0xfb91('0x52')]();})['then'](function(){_0x446438[_0xfb91('0x16')](0xcc)[_0xfb91('0x17')]();})[_0xfb91('0x3a')](handleError(_0x446438,null));}; \ No newline at end of file +var _0xacb0=['keys','include','find','create','body','uniqueid','filename','savePath','format','%s.cypher','existsSync','decryptFile','recording','Sequelize','ValidationError','SquareRecording\x20not\x20found','download','extname','unlink','send','Not\x20found','Entity\x20not\x20found','info','isNil','File:\x20\x22','\x22\x20trovato\x20eseguo\x20la\x20cancellazione','unlinkSync','eml-format','rimraf','zip-dir','moment','mustache','sox','to-csv','ejs','lodash','squel','desk.js','papaparse','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/environment','sendStatus','status','end','offset','limit','count','json','apply','reject','update','then','destroy','error','name','map','SquareRecording','rawAttributes','fieldName','type','model','filters','query','intersection','fields','attributes','length','hasOwnProperty','nolimit','order','sort','where','pick','merge','filter','options','includeAll','findAll','rows','catch','params'];(function(_0x272402,_0x283488){var _0x4f8f2b=function(_0x55bc53){while(--_0x55bc53){_0x272402['push'](_0x272402['shift']());}};_0x4f8f2b(++_0x283488);}(_0xacb0,0x173));var _0x0acb=function(_0x321bb2,_0x202794){_0x321bb2=_0x321bb2-0x0;var _0x9c12ed=_0xacb0[_0x321bb2];return _0x9c12ed;};'use strict';var emlformat=require(_0x0acb('0x0'));var rimraf=require(_0x0acb('0x1'));var zipdir=require(_0x0acb('0x2'));var jsonpatch=require('fast-json-patch');var rp=require('request-promise');var moment=require(_0x0acb('0x3'));var BPromise=require('bluebird');var Mustache=require(_0x0acb('0x4'));var util=require('util');var path=require('path');var sox=require(_0x0acb('0x5'));var csv=require(_0x0acb('0x6'));var ejs=require(_0x0acb('0x7'));var fs=require('fs');var fs_extra=require('fs-extra');var _=require(_0x0acb('0x8'));var squel=require(_0x0acb('0x9'));var crypto=require('crypto');var jsforce=require('jsforce');var deskjs=require(_0x0acb('0xa'));var toCsv=require(_0x0acb('0x6'));var querystring=require('querystring');var Papa=require(_0x0acb('0xb'));var Redis=require('ioredis');var authService=require(_0x0acb('0xc'));var qs=require(_0x0acb('0xd'));var as=require(_0x0acb('0xe'));var hardwareService=require(_0x0acb('0xf'));var logger=require(_0x0acb('0x10'))(_0x0acb('0x11'));var utils=require('../../config/utils');var config=require(_0x0acb('0x12'));var licenseUtil=require('../../config/license/util');var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0x16ec78,_0x2e4617){_0x2e4617=_0x2e4617||0xcc;return function(_0x16146f){if(_0x16146f){return _0x16ec78[_0x0acb('0x13')](_0x2e4617);}return _0x16ec78[_0x0acb('0x14')](_0x2e4617)[_0x0acb('0x15')]();};}function respondWithResult(_0x462c4a,_0x5cb532){_0x5cb532=_0x5cb532||0xc8;return function(_0xb66150){if(_0xb66150){return _0x462c4a[_0x0acb('0x14')](_0x5cb532)['json'](_0xb66150);}};}function respondWithFilteredResult(_0x453026,_0x162dc3){return function(_0x90cafb){if(_0x90cafb){var _0x6e47c1=typeof _0x162dc3[_0x0acb('0x16')]==='undefined'&&typeof _0x162dc3[_0x0acb('0x17')]==='undefined';var _0x17fc61=_0x90cafb[_0x0acb('0x18')];var _0x7c46a3=_0x6e47c1?0x0:_0x162dc3[_0x0acb('0x16')];var _0xcac76c=_0x6e47c1?_0x90cafb['count']:_0x162dc3[_0x0acb('0x16')]+_0x162dc3[_0x0acb('0x17')];var _0x36d5ff;if(_0xcac76c>=_0x17fc61){_0xcac76c=_0x17fc61;_0x36d5ff=0xc8;}else{_0x36d5ff=0xce;}_0x453026['status'](_0x36d5ff);return _0x453026['set']('Content-Range',_0x7c46a3+'-'+_0xcac76c+'/'+_0x17fc61)[_0x0acb('0x19')](_0x90cafb);}return null;};}function patchUpdates(_0x1c3a0f){return function(_0x413cdf){try{jsonpatch[_0x0acb('0x1a')](_0x413cdf,_0x1c3a0f,!![]);}catch(_0x534167){return BPromise[_0x0acb('0x1b')](_0x534167);}return _0x413cdf['save']();};}function saveUpdates(_0x2e2b8d,_0x5a17a1){return function(_0x582fcf){if(_0x582fcf){return _0x582fcf[_0x0acb('0x1c')](_0x2e2b8d)[_0x0acb('0x1d')](function(_0x532ced){return _0x532ced;});}return null;};}function removeEntity(_0xcb51d3,_0x3f9e39){return function(_0x5db30f){if(_0x5db30f){return _0x5db30f[_0x0acb('0x1e')]()['then'](function(){_0xcb51d3[_0x0acb('0x14')](0xcc)['end']();});}};}function handleEntityNotFound(_0x20193b,_0x2db769){return function(_0x107071){if(!_0x107071){_0x20193b[_0x0acb('0x13')](0x194);}return _0x107071;};}function handleError(_0x352c95,_0x4fe213){_0x4fe213=_0x4fe213||0x1f4;return function(_0x13c2d7){logger[_0x0acb('0x1f')](_0x13c2d7['stack']);if(_0x13c2d7[_0x0acb('0x20')]){delete _0x13c2d7[_0x0acb('0x20')];}_0x352c95[_0x0acb('0x14')](_0x4fe213)['send'](_0x13c2d7);};}exports['index']=function(_0x20f862,_0x3a7f62){var _0x370fa9={},_0x868b8e={},_0x3c9daa={'count':0x0,'rows':[]};var _0x20a876=_[_0x0acb('0x21')](db[_0x0acb('0x22')][_0x0acb('0x23')],function(_0x4b68aa){return{'name':_0x4b68aa[_0x0acb('0x24')],'type':_0x4b68aa[_0x0acb('0x25')]['key']};});_0x868b8e[_0x0acb('0x26')]=_[_0x0acb('0x21')](_0x20a876,'name');_0x868b8e['query']=_['keys'](_0x20f862['query']);_0x868b8e[_0x0acb('0x27')]=_['intersection'](_0x868b8e['model'],_0x868b8e[_0x0acb('0x28')]);_0x370fa9['attributes']=_[_0x0acb('0x29')](_0x868b8e[_0x0acb('0x26')],qs[_0x0acb('0x2a')](_0x20f862[_0x0acb('0x28')][_0x0acb('0x2a')]));_0x370fa9[_0x0acb('0x2b')]=_0x370fa9[_0x0acb('0x2b')][_0x0acb('0x2c')]?_0x370fa9[_0x0acb('0x2b')]:_0x868b8e[_0x0acb('0x26')];if(!_0x20f862[_0x0acb('0x28')][_0x0acb('0x2d')](_0x0acb('0x2e'))){_0x370fa9['limit']=qs['limit'](_0x20f862[_0x0acb('0x28')][_0x0acb('0x17')]);_0x370fa9[_0x0acb('0x16')]=qs[_0x0acb('0x16')](_0x20f862[_0x0acb('0x28')][_0x0acb('0x16')]);}_0x370fa9[_0x0acb('0x2f')]=qs['sort'](_0x20f862[_0x0acb('0x28')][_0x0acb('0x30')]);_0x370fa9[_0x0acb('0x31')]=qs[_0x0acb('0x27')](_[_0x0acb('0x32')](_0x20f862['query'],_0x868b8e[_0x0acb('0x27')]),_0x20a876);if(_0x20f862['query']['filter']){_0x370fa9[_0x0acb('0x31')]=_[_0x0acb('0x33')](_0x370fa9[_0x0acb('0x31')],{'$or':_[_0x0acb('0x21')](_0x20a876,function(_0x5eb2a7){if(_0x5eb2a7[_0x0acb('0x25')]!=='VIRTUAL'){var _0x5277d7={};_0x5277d7[_0x5eb2a7[_0x0acb('0x20')]]={'$like':'%'+_0x20f862[_0x0acb('0x28')][_0x0acb('0x34')]+'%'};return _0x5277d7;}})});}_0x370fa9=_['merge']({},_0x370fa9,_0x20f862[_0x0acb('0x35')]);var _0x57b9e0={'where':_0x370fa9[_0x0acb('0x31')]};return db[_0x0acb('0x22')][_0x0acb('0x18')](_0x57b9e0)['then'](function(_0xad43c9){_0x3c9daa[_0x0acb('0x18')]=_0xad43c9;if(_0x20f862[_0x0acb('0x28')][_0x0acb('0x36')]){_0x370fa9['include']=[{'all':!![]}];}return db[_0x0acb('0x22')][_0x0acb('0x37')](_0x370fa9);})['then'](function(_0x7c5624){_0x3c9daa[_0x0acb('0x38')]=_0x7c5624;return _0x3c9daa;})[_0x0acb('0x1d')](respondWithFilteredResult(_0x3a7f62,_0x370fa9))[_0x0acb('0x39')](handleError(_0x3a7f62,null));};exports['show']=function(_0x234597,_0x348ec8){var _0x4a4d5a={'raw':!![],'where':{'id':_0x234597[_0x0acb('0x3a')]['id']}},_0x4603df={};_0x4603df['model']=_[_0x0acb('0x3b')](db[_0x0acb('0x22')]['rawAttributes']);_0x4603df[_0x0acb('0x28')]=_['keys'](_0x234597[_0x0acb('0x28')]);_0x4603df[_0x0acb('0x27')]=_['intersection'](_0x4603df[_0x0acb('0x26')],_0x4603df[_0x0acb('0x28')]);_0x4a4d5a[_0x0acb('0x2b')]=_[_0x0acb('0x29')](_0x4603df[_0x0acb('0x26')],qs[_0x0acb('0x2a')](_0x234597[_0x0acb('0x28')][_0x0acb('0x2a')]));_0x4a4d5a[_0x0acb('0x2b')]=_0x4a4d5a['attributes'][_0x0acb('0x2c')]?_0x4a4d5a[_0x0acb('0x2b')]:_0x4603df['model'];if(_0x234597[_0x0acb('0x28')][_0x0acb('0x36')]){_0x4a4d5a[_0x0acb('0x3c')]=[{'all':!![]}];}_0x4a4d5a=_[_0x0acb('0x33')]({},_0x4a4d5a,_0x234597[_0x0acb('0x35')]);return db[_0x0acb('0x22')][_0x0acb('0x3d')](_0x4a4d5a)['then'](handleEntityNotFound(_0x348ec8,null))[_0x0acb('0x1d')](respondWithResult(_0x348ec8,null))['catch'](handleError(_0x348ec8,null));};exports[_0x0acb('0x3e')]=function(_0x46b461,_0x26fdff){return db[_0x0acb('0x22')][_0x0acb('0x3e')](_0x46b461[_0x0acb('0x3f')],{})[_0x0acb('0x1d')](respondWithResult(_0x26fdff,0xc9))[_0x0acb('0x39')](handleError(_0x26fdff,null));};exports[_0x0acb('0x1c')]=function(_0x383eec,_0xae9c47){if(_0x383eec[_0x0acb('0x3f')]['id']){delete _0x383eec['body']['id'];}return db[_0x0acb('0x22')][_0x0acb('0x3d')]({'where':{'id':_0x383eec['params']['id']}})['then'](handleEntityNotFound(_0xae9c47,null))['then'](saveUpdates(_0x383eec['body'],null))['then'](respondWithResult(_0xae9c47,null))[_0x0acb('0x39')](handleError(_0xae9c47,null));};exports['download']=function(_0x45b540,_0x422979,_0x28e442){var _0x142648=require('../../components/encryptor');var _0x1cdcdf=![];var _0x1515aa={};if(_0x45b540[_0x0acb('0x28')][_0x0acb('0x25')]&&_0x45b540['query'][_0x0acb('0x25')]===_0x0acb('0x40')){_0x1515aa['uniqueid']=_0x45b540[_0x0acb('0x3a')]['id'];}else{_0x1515aa['id']=_0x45b540[_0x0acb('0x3a')]['id'];}return db[_0x0acb('0x22')][_0x0acb('0x3d')]({'where':_0x1515aa,'attributes':['id','savePath',_0x0acb('0x41')],'raw':!![]})[_0x0acb('0x1d')](handleEntityNotFound(_0x422979,null))[_0x0acb('0x1d')](function(_0x22755d){if(_0x22755d){var _0x236a1a=_0x22755d[_0x0acb('0x42')];var _0x350e81=util[_0x0acb('0x43')](_0x0acb('0x44'),_0x236a1a);if(fs[_0x0acb('0x45')](_0x350e81)){_0x1cdcdf=!![];return _0x142648[_0x0acb('0x46')](_0x350e81,_0x236a1a,config['secrets'][_0x0acb('0x47')])[_0x0acb('0x1d')](function(){return _0x22755d;});}return _0x22755d;}})[_0x0acb('0x1d')](function(_0x35bd91){if(_0x35bd91){var _0x91be8f=_0x35bd91[_0x0acb('0x42')];if(!fs[_0x0acb('0x45')](_0x91be8f)){throw new db[(_0x0acb('0x48'))][(_0x0acb('0x49'))](_0x0acb('0x4a'));}if(_0x35bd91[_0x0acb('0x41')]){return _0x422979[_0x0acb('0x4b')](_0x91be8f,_0x35bd91['filename']+path[_0x0acb('0x4c')](_0x91be8f),function(){if(_0x1cdcdf){fs[_0x0acb('0x4d')](_0x91be8f);}});}else{return _0x422979[_0x0acb('0x4b')](_0x91be8f,function(_0xcad0f7){if(_0x1cdcdf){fs[_0x0acb('0x4d')](_0x91be8f);}});}}})[_0x0acb('0x39')](function(_0x463df9){if(_0x463df9['message']===_0x0acb('0x4a')){_0x422979[_0x0acb('0x14')](0x194)[_0x0acb('0x4e')](_0x0acb('0x4f'));}else{return handleError(_0x422979,null);}});};exports[_0x0acb('0x1e')]=function(_0x3f52d5,_0x3ed409){return db['SquareRecording'][_0x0acb('0x3d')]({'where':{'id':_0x3f52d5[_0x0acb('0x3a')]['id']}})['then'](function(_0x266008){if(_['isNil'](_0x266008)){throw new ReferenceError(_0x0acb('0x50'));}return _0x266008;})[_0x0acb('0x1d')](function(_0x3cc92f){var _0x1a2d7e=_0x3cc92f[_0x0acb('0x42')];logger[_0x0acb('0x51')]('cancellazione\x20fisica\x20documento\x20%s',_0x1a2d7e);if(!_[_0x0acb('0x52')](_0x3cc92f[_0x0acb('0x42')])&&fs[_0x0acb('0x45')](_0x1a2d7e)){logger[_0x0acb('0x51')](_0x0acb('0x53')+_0x1a2d7e+_0x0acb('0x54'));fs[_0x0acb('0x55')](_0x1a2d7e);}_0x1a2d7e=_0x1a2d7e+'.cypher';if(!_[_0x0acb('0x52')](_0x3cc92f[_0x0acb('0x42')])&&fs[_0x0acb('0x45')](_0x1a2d7e)){logger[_0x0acb('0x51')](_0x0acb('0x53')+_0x1a2d7e+_0x0acb('0x54'));fs[_0x0acb('0x55')](_0x1a2d7e);}return _0x3cc92f;})[_0x0acb('0x1d')](function(_0x20e81a){if(!_0x20e81a)throw new InternalError();return _0x20e81a[_0x0acb('0x1e')]();})[_0x0acb('0x1d')](function(){_0x3ed409['status'](0xcc)[_0x0acb('0x15')]();})[_0x0acb('0x39')](handleError(_0x3ed409,null));}; \ No newline at end of file diff --git a/server/api/squareRecording/squareRecording.model.js b/server/api/squareRecording/squareRecording.model.js index 7e4b8cc..9ea2151 100644 --- a/server/api/squareRecording/squareRecording.model.js +++ b/server/api/squareRecording/squareRecording.model.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x81d4=['util','../../config/logger','moment','bluebird','request-promise','../../config/environment','./squareRecording.attributes','exports','define','SquareRecording','square_recordings'];(function(_0x239e92,_0x4110d5){var _0x1a7e6c=function(_0xc489df){while(--_0xc489df){_0x239e92['push'](_0x239e92['shift']());}};_0x1a7e6c(++_0x4110d5);}(_0x81d4,0x197));var _0x481d=function(_0x3f29c,_0x579aba){_0x3f29c=_0x3f29c-0x0;var _0x31584d=_0x81d4[_0x3f29c];return _0x31584d;};'use strict';var _=require('lodash');var util=require(_0x481d('0x0'));var logger=require(_0x481d('0x1'))('api');var moment=require(_0x481d('0x2'));var BPromise=require(_0x481d('0x3'));var rp=require(_0x481d('0x4'));var fs=require('fs');var path=require('path');var rimraf=require('rimraf');var config=require(_0x481d('0x5'));var attributes=require(_0x481d('0x6'));module[_0x481d('0x7')]=function(_0x5c0761,_0x1ef8ca){return _0x5c0761[_0x481d('0x8')](_0x481d('0x9'),attributes,{'tableName':_0x481d('0xa'),'paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file +var _0x1c75=['request-promise','path','rimraf','../../config/environment','./squareRecording.attributes','exports','define','square_recordings','lodash','moment','bluebird'];(function(_0x50e944,_0x13a411){var _0x9eb69=function(_0x5aa90f){while(--_0x5aa90f){_0x50e944['push'](_0x50e944['shift']());}};_0x9eb69(++_0x13a411);}(_0x1c75,0xce));var _0x51c7=function(_0x1ce71c,_0x1f2369){_0x1ce71c=_0x1ce71c-0x0;var _0x38c215=_0x1c75[_0x1ce71c];return _0x38c215;};'use strict';var _=require(_0x51c7('0x0'));var util=require('util');var logger=require('../../config/logger')('api');var moment=require(_0x51c7('0x1'));var BPromise=require(_0x51c7('0x2'));var rp=require(_0x51c7('0x3'));var fs=require('fs');var path=require(_0x51c7('0x4'));var rimraf=require(_0x51c7('0x5'));var config=require(_0x51c7('0x6'));var attributes=require(_0x51c7('0x7'));module[_0x51c7('0x8')]=function(_0x3209ef,_0x19f2d6){return _0x3209ef[_0x51c7('0x9')]('SquareRecording',attributes,{'tableName':_0x51c7('0xa'),'paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file diff --git a/server/api/squareRecording/squareRecording.rpc.js b/server/api/squareRecording/squareRecording.rpc.js index 2037298..3d3b511 100644 --- a/server/api/squareRecording/squareRecording.rpc.js +++ b/server/api/squareRecording/squareRecording.rpc.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xfb1e=['util','moment','bluebird','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','request','then','info','request\x20sent','SquareRecording,\x20%s,\x20%s,\x20%s','stringify','error','code','SquareRecording,\x20%s,\x20%s','message','catch','create','body','options','raw','debug','CreateSquareRecording'];(function(_0x4b416c,_0x53ef9e){var _0x2037fa=function(_0x5d9816){while(--_0x5d9816){_0x4b416c['push'](_0x4b416c['shift']());}};_0x2037fa(++_0x53ef9e);}(_0xfb1e,0x15c));var _0xefb1=function(_0x1a7c10,_0x2ab345){_0x1a7c10=_0x1a7c10-0x0;var _0x54d78d=_0xfb1e[_0x1a7c10];return _0x54d78d;};'use strict';var _=require('lodash');var util=require(_0xefb1('0x0'));var moment=require(_0xefb1('0x1'));var BPromise=require(_0xefb1('0x2'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0xefb1('0x3'));var db=require(_0xefb1('0x4'))['db'];var utils=require(_0xefb1('0x5'));var logger=require(_0xefb1('0x6'))(_0xefb1('0x7'));var config=require(_0xefb1('0x8'));var jayson=require(_0xefb1('0x9'));var client=jayson[_0xefb1('0xa')][_0xefb1('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x519b81,_0x221a08,_0x8318d2){return new BPromise(function(_0x247090,_0x113a23){return client[_0xefb1('0xc')](_0x519b81,_0x8318d2)[_0xefb1('0xd')](function(_0x3b156b){logger[_0xefb1('0xe')]('SquareRecording,\x20%s,\x20%s',_0x221a08,_0xefb1('0xf'));logger['debug'](_0xefb1('0x10'),_0x221a08,_0xefb1('0xf'),JSON[_0xefb1('0x11')](_0x3b156b));if(_0x3b156b[_0xefb1('0x12')]){if(_0x3b156b[_0xefb1('0x12')][_0xefb1('0x13')]===0x1f4){logger[_0xefb1('0x12')](_0xefb1('0x14'),_0x221a08,_0x3b156b[_0xefb1('0x12')]['message']);return _0x113a23(_0x3b156b['error'][_0xefb1('0x15')]);}logger[_0xefb1('0x12')](_0xefb1('0x14'),_0x221a08,_0x3b156b[_0xefb1('0x12')][_0xefb1('0x15')]);return _0x247090(_0x3b156b['error'][_0xefb1('0x15')]);}else{logger['info'](_0xefb1('0x14'),_0x221a08,_0xefb1('0xf'));_0x247090(_0x3b156b['result'][_0xefb1('0x15')]);}})[_0xefb1('0x16')](function(_0x1c2642){logger['error']('SquareRecording,\x20%s,\x20%s',_0x221a08,_0x1c2642);_0x113a23(_0x1c2642);});});}exports['CreateSquareRecording']=function(_0x5c41a9){var _0x2c0c0b=this;return new Promise(function(_0x50b9c0,_0x446ba8){return db['SquareRecording'][_0xefb1('0x17')](_0x5c41a9[_0xefb1('0x18')],{'raw':_0x5c41a9[_0xefb1('0x19')]?_0x5c41a9['options'][_0xefb1('0x1a')]===undefined?!![]:![]:!![]})['then'](function(_0x46d35f){logger[_0xefb1('0xe')]('CreateSquareRecording',_0x5c41a9);logger[_0xefb1('0x1b')]('CreateSquareRecording',_0x5c41a9,JSON[_0xefb1('0x11')](_0x46d35f));_0x50b9c0(_0x46d35f);})[_0xefb1('0x16')](function(_0x591037){logger[_0xefb1('0x12')](_0xefb1('0x1c'),_0x591037[_0xefb1('0x15')],_0x5c41a9);_0x446ba8(_0x2c0c0b[_0xefb1('0x12')](0x1f4,_0x591037[_0xefb1('0x15')]));});});}; \ No newline at end of file +var _0xdd86=['CreateSquareRecording','body','debug','stringify','lodash','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/logger','rpc','../../config/environment','jayson/promise','http','request','info','SquareRecording,\x20%s,\x20%s','request\x20sent','SquareRecording,\x20%s,\x20%s,\x20%s','error','code','message','result','catch'];(function(_0x4e0a01,_0x7d15ff){var _0x1aa533=function(_0x170e21){while(--_0x170e21){_0x4e0a01['push'](_0x4e0a01['shift']());}};_0x1aa533(++_0x7d15ff);}(_0xdd86,0x1a4));var _0x6dd8=function(_0x1641f0,_0x3122ed){_0x1641f0=_0x1641f0-0x0;var _0x9a9f08=_0xdd86[_0x1641f0];return _0x9a9f08;};'use strict';var _=require(_0x6dd8('0x0'));var util=require(_0x6dd8('0x1'));var moment=require(_0x6dd8('0x2'));var BPromise=require(_0x6dd8('0x3'));var rs=require(_0x6dd8('0x4'));var fs=require('fs');var Redis=require(_0x6dd8('0x5'));var db=require(_0x6dd8('0x6'))['db'];var utils=require('../../config/utils');var logger=require(_0x6dd8('0x7'))(_0x6dd8('0x8'));var config=require(_0x6dd8('0x9'));var jayson=require(_0x6dd8('0xa'));var client=jayson['client'][_0x6dd8('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x322e13,_0x2678e1,_0x27508f){return new BPromise(function(_0x451d96,_0x131d66){return client[_0x6dd8('0xc')](_0x322e13,_0x27508f)['then'](function(_0x4dc99c){logger[_0x6dd8('0xd')](_0x6dd8('0xe'),_0x2678e1,_0x6dd8('0xf'));logger['debug'](_0x6dd8('0x10'),_0x2678e1,'request\x20sent',JSON['stringify'](_0x4dc99c));if(_0x4dc99c[_0x6dd8('0x11')]){if(_0x4dc99c[_0x6dd8('0x11')][_0x6dd8('0x12')]===0x1f4){logger[_0x6dd8('0x11')](_0x6dd8('0xe'),_0x2678e1,_0x4dc99c[_0x6dd8('0x11')][_0x6dd8('0x13')]);return _0x131d66(_0x4dc99c[_0x6dd8('0x11')][_0x6dd8('0x13')]);}logger['error']('SquareRecording,\x20%s,\x20%s',_0x2678e1,_0x4dc99c['error']['message']);return _0x451d96(_0x4dc99c[_0x6dd8('0x11')][_0x6dd8('0x13')]);}else{logger[_0x6dd8('0xd')]('SquareRecording,\x20%s,\x20%s',_0x2678e1,_0x6dd8('0xf'));_0x451d96(_0x4dc99c[_0x6dd8('0x14')][_0x6dd8('0x13')]);}})[_0x6dd8('0x15')](function(_0xfabf08){logger[_0x6dd8('0x11')](_0x6dd8('0xe'),_0x2678e1,_0xfabf08);_0x131d66(_0xfabf08);});});}exports[_0x6dd8('0x16')]=function(_0x2c79cb){var _0x54b802=this;return new Promise(function(_0x2f4ea8,_0x94d022){return db['SquareRecording']['create'](_0x2c79cb[_0x6dd8('0x17')],{'raw':_0x2c79cb['options']?_0x2c79cb['options']['raw']===undefined?!![]:![]:!![]})['then'](function(_0x10be83){logger[_0x6dd8('0xd')](_0x6dd8('0x16'),_0x2c79cb);logger[_0x6dd8('0x18')]('CreateSquareRecording',_0x2c79cb,JSON[_0x6dd8('0x19')](_0x10be83));_0x2f4ea8(_0x10be83);})[_0x6dd8('0x15')](function(_0x22a389){logger[_0x6dd8('0x11')](_0x6dd8('0x16'),_0x22a389['message'],_0x2c79cb);_0x94d022(_0x54b802[_0x6dd8('0x11')](0x1f4,_0x22a389[_0x6dd8('0x13')]));});});}; \ No newline at end of file diff --git a/server/api/squareReport/index.js b/server/api/squareReport/index.js index 62c498d..597bb9b 100644 --- a/server/api/squareReport/index.js +++ b/server/api/squareReport/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xbaf0=['/:id','update','delete','exports','util','path','connect-timeout','express','Router','fs-extra','../../components/interaction/service','../../config/environment','./squareReport.controller','get','isAuthenticated','index','/describe','show','post','create','put'];(function(_0x34d0a0,_0x76a83d){var _0x4c82d8=function(_0x820830){while(--_0x820830){_0x34d0a0['push'](_0x34d0a0['shift']());}};_0x4c82d8(++_0x76a83d);}(_0xbaf0,0x12a));var _0x0baf=function(_0x14add3,_0x13ce8d){_0x14add3=_0x14add3-0x0;var _0x4a174f=_0xbaf0[_0x14add3];return _0x4a174f;};'use strict';var multer=require('multer');var util=require(_0x0baf('0x0'));var path=require(_0x0baf('0x1'));var timeout=require(_0x0baf('0x2'));var express=require(_0x0baf('0x3'));var router=express[_0x0baf('0x4')]();var fs_extra=require(_0x0baf('0x5'));var auth=require('../../components/auth/service');var interaction=require(_0x0baf('0x6'));var config=require(_0x0baf('0x7'));var controller=require(_0x0baf('0x8'));router[_0x0baf('0x9')]('/',auth[_0x0baf('0xa')](),controller[_0x0baf('0xb')]);router[_0x0baf('0x9')](_0x0baf('0xc'),auth[_0x0baf('0xa')](),controller['describe']);router[_0x0baf('0x9')]('/:id',auth[_0x0baf('0xa')](),controller[_0x0baf('0xd')]);router[_0x0baf('0xe')]('/',auth[_0x0baf('0xa')](),controller[_0x0baf('0xf')]);router[_0x0baf('0x10')](_0x0baf('0x11'),auth[_0x0baf('0xa')](),controller[_0x0baf('0x12')]);router[_0x0baf('0x13')](_0x0baf('0x11'),auth['isAuthenticated'](),controller['destroy']);module[_0x0baf('0x14')]=router; \ No newline at end of file +var _0xe706=['/describe','describe','/:id','show','post','create','put','destroy','exports','multer','util','path','express','Router','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','./squareReport.controller','get','isAuthenticated','index'];(function(_0x46ba4f,_0x1ed70b){var _0x133549=function(_0x4785c0){while(--_0x4785c0){_0x46ba4f['push'](_0x46ba4f['shift']());}};_0x133549(++_0x1ed70b);}(_0xe706,0xa3));var _0x6e70=function(_0x20c512,_0x36c198){_0x20c512=_0x20c512-0x0;var _0x25236e=_0xe706[_0x20c512];return _0x25236e;};'use strict';var multer=require(_0x6e70('0x0'));var util=require(_0x6e70('0x1'));var path=require(_0x6e70('0x2'));var timeout=require('connect-timeout');var express=require(_0x6e70('0x3'));var router=express[_0x6e70('0x4')]();var fs_extra=require(_0x6e70('0x5'));var auth=require(_0x6e70('0x6'));var interaction=require(_0x6e70('0x7'));var config=require(_0x6e70('0x8'));var controller=require(_0x6e70('0x9'));router[_0x6e70('0xa')]('/',auth[_0x6e70('0xb')](),controller[_0x6e70('0xc')]);router[_0x6e70('0xa')](_0x6e70('0xd'),auth[_0x6e70('0xb')](),controller[_0x6e70('0xe')]);router[_0x6e70('0xa')](_0x6e70('0xf'),auth[_0x6e70('0xb')](),controller[_0x6e70('0x10')]);router[_0x6e70('0x11')]('/',auth[_0x6e70('0xb')](),controller[_0x6e70('0x12')]);router[_0x6e70('0x13')](_0x6e70('0xf'),auth[_0x6e70('0xb')](),controller['update']);router['delete'](_0x6e70('0xf'),auth[_0x6e70('0xb')](),controller[_0x6e70('0x14')]);module[_0x6e70('0x15')]=router; \ No newline at end of file diff --git a/server/api/squareReport/squareReport.attributes.js b/server/api/squareReport/squareReport.attributes.js index ae2a65a..c868f18 100644 --- a/server/api/squareReport/squareReport.attributes.js +++ b/server/api/squareReport/squareReport.attributes.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x2ea1=['DATE','BOOLEAN','sequelize','exports','STRING'];(function(_0xa3db1c,_0x1cf524){var _0x362622=function(_0x4c6fa3){while(--_0x4c6fa3){_0xa3db1c['push'](_0xa3db1c['shift']());}};_0x362622(++_0x1cf524);}(_0x2ea1,0xca));var _0x12ea=function(_0x3f140c,_0x40ef7a){_0x3f140c=_0x3f140c-0x0;var _0x41b05d=_0x2ea1[_0x3f140c];return _0x41b05d;};'use strict';var Sequelize=require(_0x12ea('0x0'));module[_0x12ea('0x1')]={'network':{'type':Sequelize[_0x12ea('0x2')]},'network_script':{'type':Sequelize[_0x12ea('0x2')]},'request':{'type':Sequelize[_0x12ea('0x2')]},'channel':{'type':Sequelize[_0x12ea('0x2')]},'language':{'type':Sequelize[_0x12ea('0x2')]},'type':{'type':Sequelize[_0x12ea('0x2')]},'uniqueid':{'type':Sequelize['STRING']},'version':{'type':Sequelize[_0x12ea('0x2')]},'callerid':{'type':Sequelize[_0x12ea('0x2')]},'calleridname':{'type':Sequelize[_0x12ea('0x2')]},'callingpres':{'type':Sequelize['STRING']},'callingani2':{'type':Sequelize[_0x12ea('0x2')]},'callington':{'type':Sequelize[_0x12ea('0x2')]},'callingtns':{'type':Sequelize[_0x12ea('0x2')]},'dnid':{'type':Sequelize[_0x12ea('0x2')]},'rdnis':{'type':Sequelize[_0x12ea('0x2')]},'context':{'type':Sequelize[_0x12ea('0x2')]},'extension':{'type':Sequelize[_0x12ea('0x2')]},'priority':{'type':Sequelize['STRING']},'enhanced':{'type':Sequelize['STRING']},'accountcode':{'type':Sequelize[_0x12ea('0x2')]},'threadid':{'type':Sequelize['STRING']},'project_name':{'type':Sequelize[_0x12ea('0x2')]},'joinAt':{'type':Sequelize[_0x12ea('0x3')]},'leaveAt':{'type':Sequelize[_0x12ea('0x3')]},'bot':{'type':Sequelize[_0x12ea('0x4')],'defaultValue':![]}}; \ No newline at end of file +var _0x1de0=['exports','STRING','DATE','sequelize'];(function(_0x36565d,_0x37395c){var _0x2032ed=function(_0x52a9d3){while(--_0x52a9d3){_0x36565d['push'](_0x36565d['shift']());}};_0x2032ed(++_0x37395c);}(_0x1de0,0x1b3));var _0x01de=function(_0xd206ce,_0x3031d2){_0xd206ce=_0xd206ce-0x0;var _0x5b3ec6=_0x1de0[_0xd206ce];return _0x5b3ec6;};'use strict';var Sequelize=require(_0x01de('0x0'));module[_0x01de('0x1')]={'network':{'type':Sequelize[_0x01de('0x2')]},'network_script':{'type':Sequelize[_0x01de('0x2')]},'request':{'type':Sequelize[_0x01de('0x2')]},'channel':{'type':Sequelize['STRING']},'language':{'type':Sequelize[_0x01de('0x2')]},'type':{'type':Sequelize[_0x01de('0x2')]},'uniqueid':{'type':Sequelize[_0x01de('0x2')]},'version':{'type':Sequelize[_0x01de('0x2')]},'callerid':{'type':Sequelize[_0x01de('0x2')]},'calleridname':{'type':Sequelize[_0x01de('0x2')]},'callingpres':{'type':Sequelize[_0x01de('0x2')]},'callingani2':{'type':Sequelize['STRING']},'callington':{'type':Sequelize[_0x01de('0x2')]},'callingtns':{'type':Sequelize[_0x01de('0x2')]},'dnid':{'type':Sequelize[_0x01de('0x2')]},'rdnis':{'type':Sequelize[_0x01de('0x2')]},'context':{'type':Sequelize[_0x01de('0x2')]},'extension':{'type':Sequelize[_0x01de('0x2')]},'priority':{'type':Sequelize[_0x01de('0x2')]},'enhanced':{'type':Sequelize[_0x01de('0x2')]},'accountcode':{'type':Sequelize[_0x01de('0x2')]},'threadid':{'type':Sequelize[_0x01de('0x2')]},'project_name':{'type':Sequelize['STRING']},'joinAt':{'type':Sequelize[_0x01de('0x3')]},'leaveAt':{'type':Sequelize['DATE']},'bot':{'type':Sequelize['BOOLEAN'],'defaultValue':![]}}; \ No newline at end of file diff --git a/server/api/squareReport/squareReport.controller.js b/server/api/squareReport/squareReport.controller.js index 710581a..4644fff 100644 --- a/server/api/squareReport/squareReport.controller.js +++ b/server/api/squareReport/squareReport.controller.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x225c=['destroy','sendStatus','error','stack','name','send','index','map','SquareReport','rawAttributes','type','key','model','filters','intersection','attributes','fields','query','hasOwnProperty','nolimit','order','sort','where','pick','filter','merge','VIRTUAL','include','findAll','show','keys','length','options','find','catch','create','body','describe','zip-dir','fast-json-patch','request-promise','moment','mustache','path','sox','to-csv','ejs','fs-extra','squel','crypto','jsforce','desk.js','querystring','ioredis','../../components/auth/service','../../components/parsers/qs','../../config/license/hardware','api','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','status','end','json','offset','undefined','limit','count','set','Content-Range','apply','update','then'];(function(_0x4a2217,_0x9c653a){var _0x24cb1c=function(_0x35155e){while(--_0x35155e){_0x4a2217['push'](_0x4a2217['shift']());}};_0x24cb1c(++_0x9c653a);}(_0x225c,0x104));var _0xc225=function(_0xa464c9,_0x7c86d8){_0xa464c9=_0xa464c9-0x0;var _0x3d73c4=_0x225c[_0xa464c9];return _0x3d73c4;};'use strict';var emlformat=require('eml-format');var rimraf=require('rimraf');var zipdir=require(_0xc225('0x0'));var jsonpatch=require(_0xc225('0x1'));var rp=require(_0xc225('0x2'));var moment=require(_0xc225('0x3'));var BPromise=require('bluebird');var Mustache=require(_0xc225('0x4'));var util=require('util');var path=require(_0xc225('0x5'));var sox=require(_0xc225('0x6'));var csv=require(_0xc225('0x7'));var ejs=require(_0xc225('0x8'));var fs=require('fs');var fs_extra=require(_0xc225('0x9'));var _=require('lodash');var squel=require(_0xc225('0xa'));var crypto=require(_0xc225('0xb'));var jsforce=require(_0xc225('0xc'));var deskjs=require(_0xc225('0xd'));var toCsv=require(_0xc225('0x7'));var querystring=require(_0xc225('0xe'));var Papa=require('papaparse');var Redis=require(_0xc225('0xf'));var authService=require(_0xc225('0x10'));var qs=require(_0xc225('0x11'));var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0xc225('0x12'));var logger=require('../../config/logger')(_0xc225('0x13'));var utils=require(_0xc225('0x14'));var config=require(_0xc225('0x15'));var licenseUtil=require(_0xc225('0x16'));var db=require(_0xc225('0x17'))['db'];function respondWithStatusCode(_0x1c7322,_0x587395){_0x587395=_0x587395||0xcc;return function(_0xacbb3e){if(_0xacbb3e){return _0x1c7322['sendStatus'](_0x587395);}return _0x1c7322[_0xc225('0x18')](_0x587395)[_0xc225('0x19')]();};}function respondWithResult(_0x57d808,_0x35c656){_0x35c656=_0x35c656||0xc8;return function(_0x7633af){if(_0x7633af){return _0x57d808[_0xc225('0x18')](_0x35c656)[_0xc225('0x1a')](_0x7633af);}};}function respondWithFilteredResult(_0x3efb25,_0x3da0a2){return function(_0x798235){if(_0x798235){var _0x26e46b=typeof _0x3da0a2[_0xc225('0x1b')]===_0xc225('0x1c')&&typeof _0x3da0a2[_0xc225('0x1d')]===_0xc225('0x1c');var _0x318d35=_0x798235['count'];var _0x471510=_0x26e46b?0x0:_0x3da0a2[_0xc225('0x1b')];var _0x8e7036=_0x26e46b?_0x798235[_0xc225('0x1e')]:_0x3da0a2['offset']+_0x3da0a2[_0xc225('0x1d')];var _0x18c553;if(_0x8e7036>=_0x318d35){_0x8e7036=_0x318d35;_0x18c553=0xc8;}else{_0x18c553=0xce;}_0x3efb25['status'](_0x18c553);return _0x3efb25[_0xc225('0x1f')](_0xc225('0x20'),_0x471510+'-'+_0x8e7036+'/'+_0x318d35)[_0xc225('0x1a')](_0x798235);}return null;};}function patchUpdates(_0x1e08f6){return function(_0x4f3bf6){try{jsonpatch[_0xc225('0x21')](_0x4f3bf6,_0x1e08f6,!![]);}catch(_0x1a5d1e){return BPromise['reject'](_0x1a5d1e);}return _0x4f3bf6['save']();};}function saveUpdates(_0x5e11e2,_0x477b74){return function(_0x2dfe0e){if(_0x2dfe0e){return _0x2dfe0e[_0xc225('0x22')](_0x5e11e2)[_0xc225('0x23')](function(_0x51cdf9){return _0x51cdf9;});}return null;};}function removeEntity(_0x40b14e,_0x4e593f){return function(_0x5d6d31){if(_0x5d6d31){return _0x5d6d31[_0xc225('0x24')]()['then'](function(){_0x40b14e[_0xc225('0x18')](0xcc)['end']();});}};}function handleEntityNotFound(_0x5c3350,_0x4dd793){return function(_0x218937){if(!_0x218937){_0x5c3350[_0xc225('0x25')](0x194);}return _0x218937;};}function handleError(_0x4f77d7,_0x7035a8){_0x7035a8=_0x7035a8||0x1f4;return function(_0x2e17e0){logger[_0xc225('0x26')](_0x2e17e0[_0xc225('0x27')]);if(_0x2e17e0[_0xc225('0x28')]){delete _0x2e17e0[_0xc225('0x28')];}_0x4f77d7[_0xc225('0x18')](_0x7035a8)[_0xc225('0x29')](_0x2e17e0);};}exports[_0xc225('0x2a')]=function(_0x315da2,_0x56b38e){var _0x5a8789={},_0x50a3d9={},_0x56e5f4={'count':0x0,'rows':[]};var _0x166989=_[_0xc225('0x2b')](db[_0xc225('0x2c')][_0xc225('0x2d')],function(_0x1d03e1){return{'name':_0x1d03e1['fieldName'],'type':_0x1d03e1[_0xc225('0x2e')][_0xc225('0x2f')]};});_0x50a3d9[_0xc225('0x30')]=_[_0xc225('0x2b')](_0x166989,_0xc225('0x28'));_0x50a3d9['query']=_['keys'](_0x315da2['query']);_0x50a3d9[_0xc225('0x31')]=_[_0xc225('0x32')](_0x50a3d9[_0xc225('0x30')],_0x50a3d9['query']);_0x5a8789[_0xc225('0x33')]=_[_0xc225('0x32')](_0x50a3d9[_0xc225('0x30')],qs[_0xc225('0x34')](_0x315da2['query']['fields']));_0x5a8789[_0xc225('0x33')]=_0x5a8789[_0xc225('0x33')]['length']?_0x5a8789[_0xc225('0x33')]:_0x50a3d9[_0xc225('0x30')];if(!_0x315da2[_0xc225('0x35')][_0xc225('0x36')](_0xc225('0x37'))){_0x5a8789[_0xc225('0x1d')]=qs[_0xc225('0x1d')](_0x315da2[_0xc225('0x35')][_0xc225('0x1d')]);_0x5a8789['offset']=qs['offset'](_0x315da2[_0xc225('0x35')]['offset']);}_0x5a8789[_0xc225('0x38')]=qs[_0xc225('0x39')](_0x315da2[_0xc225('0x35')][_0xc225('0x39')]);_0x5a8789[_0xc225('0x3a')]=qs[_0xc225('0x31')](_[_0xc225('0x3b')](_0x315da2[_0xc225('0x35')],_0x50a3d9[_0xc225('0x31')]),_0x166989);if(_0x315da2[_0xc225('0x35')][_0xc225('0x3c')]){_0x5a8789[_0xc225('0x3a')]=_[_0xc225('0x3d')](_0x5a8789['where'],{'$or':_[_0xc225('0x2b')](_0x166989,function(_0x36563c){if(_0x36563c['type']!==_0xc225('0x3e')){var _0x52b305={};_0x52b305[_0x36563c['name']]={'$like':'%'+_0x315da2[_0xc225('0x35')]['filter']+'%'};return _0x52b305;}})});}_0x5a8789=_[_0xc225('0x3d')]({},_0x5a8789,_0x315da2['options']);var _0x3cc6e3={'where':_0x5a8789[_0xc225('0x3a')]};return db[_0xc225('0x2c')][_0xc225('0x1e')](_0x3cc6e3)[_0xc225('0x23')](function(_0x4f0ed1){_0x56e5f4[_0xc225('0x1e')]=_0x4f0ed1;if(_0x315da2[_0xc225('0x35')]['includeAll']){_0x5a8789[_0xc225('0x3f')]=[{'all':!![]}];}return db[_0xc225('0x2c')][_0xc225('0x40')](_0x5a8789);})[_0xc225('0x23')](function(_0x54a684){_0x56e5f4['rows']=_0x54a684;return _0x56e5f4;})['then'](respondWithFilteredResult(_0x56b38e,_0x5a8789))['catch'](handleError(_0x56b38e,null));};exports[_0xc225('0x41')]=function(_0x501950,_0x278599){var _0x521173={'raw':!![],'where':{'id':_0x501950['params']['id']}},_0x395223={};_0x395223[_0xc225('0x30')]=_[_0xc225('0x42')](db[_0xc225('0x2c')][_0xc225('0x2d')]);_0x395223[_0xc225('0x35')]=_[_0xc225('0x42')](_0x501950['query']);_0x395223[_0xc225('0x31')]=_[_0xc225('0x32')](_0x395223[_0xc225('0x30')],_0x395223[_0xc225('0x35')]);_0x521173[_0xc225('0x33')]=_['intersection'](_0x395223[_0xc225('0x30')],qs[_0xc225('0x34')](_0x501950[_0xc225('0x35')][_0xc225('0x34')]));_0x521173[_0xc225('0x33')]=_0x521173['attributes'][_0xc225('0x43')]?_0x521173[_0xc225('0x33')]:_0x395223[_0xc225('0x30')];if(_0x501950[_0xc225('0x35')]['includeAll']){_0x521173[_0xc225('0x3f')]=[{'all':!![]}];}_0x521173=_['merge']({},_0x521173,_0x501950[_0xc225('0x44')]);return db['SquareReport'][_0xc225('0x45')](_0x521173)[_0xc225('0x23')](handleEntityNotFound(_0x278599,null))[_0xc225('0x23')](respondWithResult(_0x278599,null))[_0xc225('0x46')](handleError(_0x278599,null));};exports[_0xc225('0x47')]=function(_0x286ee3,_0x541a46){return db[_0xc225('0x2c')][_0xc225('0x47')](_0x286ee3['body'],{})['then'](respondWithResult(_0x541a46,0xc9))[_0xc225('0x46')](handleError(_0x541a46,null));};exports[_0xc225('0x22')]=function(_0x26f041,_0x530830){if(_0x26f041[_0xc225('0x48')]['id']){delete _0x26f041['body']['id'];}return db['SquareReport'][_0xc225('0x45')]({'where':{'id':_0x26f041['params']['id']}})['then'](handleEntityNotFound(_0x530830,null))[_0xc225('0x23')](saveUpdates(_0x26f041[_0xc225('0x48')],null))[_0xc225('0x23')](respondWithResult(_0x530830,null))[_0xc225('0x46')](handleError(_0x530830,null));};exports['destroy']=function(_0x5c5488,_0x354549){return db[_0xc225('0x2c')][_0xc225('0x45')]({'where':{'id':_0x5c5488['params']['id']}})['then'](handleEntityNotFound(_0x354549,null))[_0xc225('0x23')](removeEntity(_0x354549,null))[_0xc225('0x46')](handleError(_0x354549,null));};exports['describe']=function(_0x90b006,_0x3250b4){return db[_0xc225('0x2c')][_0xc225('0x49')]()['then'](respondWithResult(_0x3250b4,null))['catch'](handleError(_0x3250b4,null));}; \ No newline at end of file +var _0x0404=['to-csv','ejs','fs-extra','squel','crypto','jsforce','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/logger','api','../../config/utils','../../config/environment','../../mysqldb','sendStatus','end','status','limit','undefined','count','offset','set','json','apply','reject','save','destroy','then','error','stack','name','send','index','map','SquareReport','fieldName','type','key','model','query','keys','filters','fields','attributes','hasOwnProperty','order','sort','where','pick','filter','merge','options','includeAll','include','findAll','catch','params','rawAttributes','intersection','length','find','create','update','body','describe','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','mustache','util','path','sox'];(function(_0x5b0991,_0x5ab093){var _0x244229=function(_0x111ccb){while(--_0x111ccb){_0x5b0991['push'](_0x5b0991['shift']());}};_0x244229(++_0x5ab093);}(_0x0404,0x173));var _0x4040=function(_0x2aefb6,_0x1bd384){_0x2aefb6=_0x2aefb6-0x0;var _0x202772=_0x0404[_0x2aefb6];return _0x202772;};'use strict';var emlformat=require(_0x4040('0x0'));var rimraf=require(_0x4040('0x1'));var zipdir=require(_0x4040('0x2'));var jsonpatch=require(_0x4040('0x3'));var rp=require(_0x4040('0x4'));var moment=require('moment');var BPromise=require('bluebird');var Mustache=require(_0x4040('0x5'));var util=require(_0x4040('0x6'));var path=require(_0x4040('0x7'));var sox=require(_0x4040('0x8'));var csv=require(_0x4040('0x9'));var ejs=require(_0x4040('0xa'));var fs=require('fs');var fs_extra=require(_0x4040('0xb'));var _=require('lodash');var squel=require(_0x4040('0xc'));var crypto=require(_0x4040('0xd'));var jsforce=require(_0x4040('0xe'));var deskjs=require('desk.js');var toCsv=require('to-csv');var querystring=require('querystring');var Papa=require(_0x4040('0xf'));var Redis=require(_0x4040('0x10'));var authService=require(_0x4040('0x11'));var qs=require(_0x4040('0x12'));var as=require(_0x4040('0x13'));var hardwareService=require('../../config/license/hardware');var logger=require(_0x4040('0x14'))(_0x4040('0x15'));var utils=require(_0x4040('0x16'));var config=require(_0x4040('0x17'));var licenseUtil=require('../../config/license/util');var db=require(_0x4040('0x18'))['db'];function respondWithStatusCode(_0x5bf4c7,_0x2e267b){_0x2e267b=_0x2e267b||0xcc;return function(_0x532dc3){if(_0x532dc3){return _0x5bf4c7[_0x4040('0x19')](_0x2e267b);}return _0x5bf4c7['status'](_0x2e267b)[_0x4040('0x1a')]();};}function respondWithResult(_0x4e5a41,_0x36b782){_0x36b782=_0x36b782||0xc8;return function(_0xab79a9){if(_0xab79a9){return _0x4e5a41[_0x4040('0x1b')](_0x36b782)['json'](_0xab79a9);}};}function respondWithFilteredResult(_0xf89d59,_0x6b926f){return function(_0x4a909f){if(_0x4a909f){var _0x5ff9f6=typeof _0x6b926f['offset']==='undefined'&&typeof _0x6b926f[_0x4040('0x1c')]===_0x4040('0x1d');var _0x1f5500=_0x4a909f[_0x4040('0x1e')];var _0x41d0a0=_0x5ff9f6?0x0:_0x6b926f[_0x4040('0x1f')];var _0x5a8489=_0x5ff9f6?_0x4a909f[_0x4040('0x1e')]:_0x6b926f['offset']+_0x6b926f[_0x4040('0x1c')];var _0x24a4aa;if(_0x5a8489>=_0x1f5500){_0x5a8489=_0x1f5500;_0x24a4aa=0xc8;}else{_0x24a4aa=0xce;}_0xf89d59['status'](_0x24a4aa);return _0xf89d59[_0x4040('0x20')]('Content-Range',_0x41d0a0+'-'+_0x5a8489+'/'+_0x1f5500)[_0x4040('0x21')](_0x4a909f);}return null;};}function patchUpdates(_0x46476e){return function(_0x30cbeb){try{jsonpatch[_0x4040('0x22')](_0x30cbeb,_0x46476e,!![]);}catch(_0x1e3300){return BPromise[_0x4040('0x23')](_0x1e3300);}return _0x30cbeb[_0x4040('0x24')]();};}function saveUpdates(_0x322c6a,_0x297d3d){return function(_0x1c3dc1){if(_0x1c3dc1){return _0x1c3dc1['update'](_0x322c6a)['then'](function(_0x450e3e){return _0x450e3e;});}return null;};}function removeEntity(_0xfdff01,_0x3cb866){return function(_0x4c23f3){if(_0x4c23f3){return _0x4c23f3[_0x4040('0x25')]()[_0x4040('0x26')](function(){_0xfdff01[_0x4040('0x1b')](0xcc)['end']();});}};}function handleEntityNotFound(_0x44f49f,_0x1a532e){return function(_0x2d6c55){if(!_0x2d6c55){_0x44f49f[_0x4040('0x19')](0x194);}return _0x2d6c55;};}function handleError(_0x2be8a2,_0x688c18){_0x688c18=_0x688c18||0x1f4;return function(_0x4dc0f0){logger[_0x4040('0x27')](_0x4dc0f0[_0x4040('0x28')]);if(_0x4dc0f0[_0x4040('0x29')]){delete _0x4dc0f0[_0x4040('0x29')];}_0x2be8a2[_0x4040('0x1b')](_0x688c18)[_0x4040('0x2a')](_0x4dc0f0);};}exports[_0x4040('0x2b')]=function(_0x17295f,_0x1f7a9d){var _0xcca383={},_0xe32d82={},_0x3eb7b3={'count':0x0,'rows':[]};var _0x4083ff=_[_0x4040('0x2c')](db[_0x4040('0x2d')]['rawAttributes'],function(_0x337ea8){return{'name':_0x337ea8[_0x4040('0x2e')],'type':_0x337ea8[_0x4040('0x2f')][_0x4040('0x30')]};});_0xe32d82[_0x4040('0x31')]=_['map'](_0x4083ff,_0x4040('0x29'));_0xe32d82[_0x4040('0x32')]=_[_0x4040('0x33')](_0x17295f['query']);_0xe32d82[_0x4040('0x34')]=_['intersection'](_0xe32d82[_0x4040('0x31')],_0xe32d82[_0x4040('0x32')]);_0xcca383['attributes']=_['intersection'](_0xe32d82[_0x4040('0x31')],qs[_0x4040('0x35')](_0x17295f[_0x4040('0x32')][_0x4040('0x35')]));_0xcca383[_0x4040('0x36')]=_0xcca383[_0x4040('0x36')]['length']?_0xcca383[_0x4040('0x36')]:_0xe32d82['model'];if(!_0x17295f['query'][_0x4040('0x37')]('nolimit')){_0xcca383['limit']=qs[_0x4040('0x1c')](_0x17295f[_0x4040('0x32')][_0x4040('0x1c')]);_0xcca383[_0x4040('0x1f')]=qs['offset'](_0x17295f['query']['offset']);}_0xcca383[_0x4040('0x38')]=qs['sort'](_0x17295f['query'][_0x4040('0x39')]);_0xcca383[_0x4040('0x3a')]=qs['filters'](_[_0x4040('0x3b')](_0x17295f[_0x4040('0x32')],_0xe32d82['filters']),_0x4083ff);if(_0x17295f[_0x4040('0x32')][_0x4040('0x3c')]){_0xcca383['where']=_[_0x4040('0x3d')](_0xcca383[_0x4040('0x3a')],{'$or':_[_0x4040('0x2c')](_0x4083ff,function(_0x2cbfc4){if(_0x2cbfc4[_0x4040('0x2f')]!=='VIRTUAL'){var _0xa65f50={};_0xa65f50[_0x2cbfc4[_0x4040('0x29')]]={'$like':'%'+_0x17295f[_0x4040('0x32')][_0x4040('0x3c')]+'%'};return _0xa65f50;}})});}_0xcca383=_[_0x4040('0x3d')]({},_0xcca383,_0x17295f[_0x4040('0x3e')]);var _0x5c739c={'where':_0xcca383[_0x4040('0x3a')]};return db[_0x4040('0x2d')][_0x4040('0x1e')](_0x5c739c)['then'](function(_0x579f24){_0x3eb7b3[_0x4040('0x1e')]=_0x579f24;if(_0x17295f[_0x4040('0x32')][_0x4040('0x3f')]){_0xcca383[_0x4040('0x40')]=[{'all':!![]}];}return db['SquareReport'][_0x4040('0x41')](_0xcca383);})[_0x4040('0x26')](function(_0x514f10){_0x3eb7b3['rows']=_0x514f10;return _0x3eb7b3;})[_0x4040('0x26')](respondWithFilteredResult(_0x1f7a9d,_0xcca383))[_0x4040('0x42')](handleError(_0x1f7a9d,null));};exports['show']=function(_0x574d21,_0x1af2f2){var _0x2ee0cd={'raw':!![],'where':{'id':_0x574d21[_0x4040('0x43')]['id']}},_0x4a1829={};_0x4a1829[_0x4040('0x31')]=_[_0x4040('0x33')](db['SquareReport'][_0x4040('0x44')]);_0x4a1829[_0x4040('0x32')]=_['keys'](_0x574d21[_0x4040('0x32')]);_0x4a1829[_0x4040('0x34')]=_['intersection'](_0x4a1829[_0x4040('0x31')],_0x4a1829[_0x4040('0x32')]);_0x2ee0cd[_0x4040('0x36')]=_[_0x4040('0x45')](_0x4a1829[_0x4040('0x31')],qs[_0x4040('0x35')](_0x574d21[_0x4040('0x32')][_0x4040('0x35')]));_0x2ee0cd[_0x4040('0x36')]=_0x2ee0cd[_0x4040('0x36')][_0x4040('0x46')]?_0x2ee0cd[_0x4040('0x36')]:_0x4a1829[_0x4040('0x31')];if(_0x574d21[_0x4040('0x32')][_0x4040('0x3f')]){_0x2ee0cd[_0x4040('0x40')]=[{'all':!![]}];}_0x2ee0cd=_[_0x4040('0x3d')]({},_0x2ee0cd,_0x574d21[_0x4040('0x3e')]);return db[_0x4040('0x2d')][_0x4040('0x47')](_0x2ee0cd)[_0x4040('0x26')](handleEntityNotFound(_0x1af2f2,null))[_0x4040('0x26')](respondWithResult(_0x1af2f2,null))['catch'](handleError(_0x1af2f2,null));};exports[_0x4040('0x48')]=function(_0x5dea5a,_0xd0feb5){return db[_0x4040('0x2d')]['create'](_0x5dea5a['body'],{})[_0x4040('0x26')](respondWithResult(_0xd0feb5,0xc9))['catch'](handleError(_0xd0feb5,null));};exports[_0x4040('0x49')]=function(_0x1d882d,_0x54fc43){if(_0x1d882d[_0x4040('0x4a')]['id']){delete _0x1d882d['body']['id'];}return db[_0x4040('0x2d')][_0x4040('0x47')]({'where':{'id':_0x1d882d[_0x4040('0x43')]['id']}})[_0x4040('0x26')](handleEntityNotFound(_0x54fc43,null))['then'](saveUpdates(_0x1d882d['body'],null))[_0x4040('0x26')](respondWithResult(_0x54fc43,null))[_0x4040('0x42')](handleError(_0x54fc43,null));};exports[_0x4040('0x25')]=function(_0x3580b6,_0x5372c0){return db[_0x4040('0x2d')][_0x4040('0x47')]({'where':{'id':_0x3580b6[_0x4040('0x43')]['id']}})[_0x4040('0x26')](handleEntityNotFound(_0x5372c0,null))[_0x4040('0x26')](removeEntity(_0x5372c0,null))['catch'](handleError(_0x5372c0,null));};exports[_0x4040('0x4b')]=function(_0x23f40d,_0x298cb2){return db[_0x4040('0x2d')]['describe']()['then'](respondWithResult(_0x298cb2,null))[_0x4040('0x42')](handleError(_0x298cb2,null));}; \ No newline at end of file diff --git a/server/api/squareReport/squareReport.model.js b/server/api/squareReport/squareReport.model.js index 4648b75..4f827d4 100644 --- a/server/api/squareReport/squareReport.model.js +++ b/server/api/squareReport/squareReport.model.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x77c4=['./squareReport.attributes','exports','report_square','uid_pname','project_name','leaveAt','lodash','util','../../config/logger','api','moment','bluebird','request-promise','path','rimraf','../../config/environment'];(function(_0x285344,_0x34d702){var _0x5b904b=function(_0x1819a6){while(--_0x1819a6){_0x285344['push'](_0x285344['shift']());}};_0x5b904b(++_0x34d702);}(_0x77c4,0x96));var _0x477c=function(_0x44866e,_0x599cf0){_0x44866e=_0x44866e-0x0;var _0x22daf8=_0x77c4[_0x44866e];return _0x22daf8;};'use strict';var _=require(_0x477c('0x0'));var util=require(_0x477c('0x1'));var logger=require(_0x477c('0x2'))(_0x477c('0x3'));var moment=require(_0x477c('0x4'));var BPromise=require(_0x477c('0x5'));var rp=require(_0x477c('0x6'));var fs=require('fs');var path=require(_0x477c('0x7'));var rimraf=require(_0x477c('0x8'));var config=require(_0x477c('0x9'));var attributes=require(_0x477c('0xa'));module[_0x477c('0xb')]=function(_0x497e80,_0x13ecd9){return _0x497e80['define']('SquareReport',attributes,{'tableName':_0x477c('0xc'),'paranoid':![],'indexes':[{'name':_0x477c('0xd'),'fields':['uniqueid',_0x477c('0xe')]},{'name':_0x477c('0xf'),'fields':['leaveAt']}],'timestamps':!![]});}; \ No newline at end of file +var _0x8524=['./squareReport.attributes','exports','define','report_square','leaveAt','lodash','../../config/logger','api','moment','bluebird','request-promise','path','rimraf','../../config/environment'];(function(_0x3826ad,_0x49a30d){var _0x17b900=function(_0x38474f){while(--_0x38474f){_0x3826ad['push'](_0x3826ad['shift']());}};_0x17b900(++_0x49a30d);}(_0x8524,0x1e1));var _0x4852=function(_0x1d7a75,_0x52b0fb){_0x1d7a75=_0x1d7a75-0x0;var _0x42306a=_0x8524[_0x1d7a75];return _0x42306a;};'use strict';var _=require(_0x4852('0x0'));var util=require('util');var logger=require(_0x4852('0x1'))(_0x4852('0x2'));var moment=require(_0x4852('0x3'));var BPromise=require(_0x4852('0x4'));var rp=require(_0x4852('0x5'));var fs=require('fs');var path=require(_0x4852('0x6'));var rimraf=require(_0x4852('0x7'));var config=require(_0x4852('0x8'));var attributes=require(_0x4852('0x9'));module[_0x4852('0xa')]=function(_0x2b6aa4,_0x29d071){return _0x2b6aa4[_0x4852('0xb')]('SquareReport',attributes,{'tableName':_0x4852('0xc'),'paranoid':![],'indexes':[{'name':'uid_pname','fields':['uniqueid','project_name']},{'name':'leaveAt','fields':[_0x4852('0xd')]}],'timestamps':!![]});}; \ No newline at end of file diff --git a/server/api/squareReport/squareReport.rpc.js b/server/api/squareReport/squareReport.rpc.js index d94b99e..0300117 100644 --- a/server/api/squareReport/squareReport.rpc.js +++ b/server/api/squareReport/squareReport.rpc.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x1f8a=['SquareReport','body','options','raw','UpdateSquareReport','update','where','attributes','limit','lodash','util','moment','bluebird','randomstring','../../mysqldb','../../config/logger','jayson/promise','client','then','info','SquareReport,\x20%s,\x20%s','debug','request\x20sent','stringify','error','code','message','result','catch','CreateSquareReport'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0x1f8a,0x135));var _0xa1f8=function(_0x49c476,_0x2d34b0){_0x49c476=_0x49c476-0x0;var _0x275755=_0x1f8a[_0x49c476];return _0x275755;};'use strict';var _=require(_0xa1f8('0x0'));var util=require(_0xa1f8('0x1'));var moment=require(_0xa1f8('0x2'));var BPromise=require(_0xa1f8('0x3'));var rs=require(_0xa1f8('0x4'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0xa1f8('0x5'))['db'];var utils=require('../../config/utils');var logger=require(_0xa1f8('0x6'))('rpc');var config=require('../../config/environment');var jayson=require(_0xa1f8('0x7'));var client=jayson[_0xa1f8('0x8')]['http']({'port':0x232a});function respondWithRpcPromise(_0x159177,_0x3f5bca,_0xf9b9bc){return new BPromise(function(_0x181c4d,_0x2ef496){return client['request'](_0x159177,_0xf9b9bc)[_0xa1f8('0x9')](function(_0x3f426b){logger[_0xa1f8('0xa')](_0xa1f8('0xb'),_0x3f5bca,'request\x20sent');logger[_0xa1f8('0xc')]('SquareReport,\x20%s,\x20%s,\x20%s',_0x3f5bca,_0xa1f8('0xd'),JSON[_0xa1f8('0xe')](_0x3f426b));if(_0x3f426b[_0xa1f8('0xf')]){if(_0x3f426b[_0xa1f8('0xf')][_0xa1f8('0x10')]===0x1f4){logger['error'](_0xa1f8('0xb'),_0x3f5bca,_0x3f426b['error'][_0xa1f8('0x11')]);return _0x2ef496(_0x3f426b[_0xa1f8('0xf')][_0xa1f8('0x11')]);}logger[_0xa1f8('0xf')](_0xa1f8('0xb'),_0x3f5bca,_0x3f426b[_0xa1f8('0xf')]['message']);return _0x181c4d(_0x3f426b[_0xa1f8('0xf')][_0xa1f8('0x11')]);}else{logger['info']('SquareReport,\x20%s,\x20%s',_0x3f5bca,_0xa1f8('0xd'));_0x181c4d(_0x3f426b[_0xa1f8('0x12')][_0xa1f8('0x11')]);}})[_0xa1f8('0x13')](function(_0x186be0){logger[_0xa1f8('0xf')](_0xa1f8('0xb'),_0x3f5bca,_0x186be0);_0x2ef496(_0x186be0);});});}exports[_0xa1f8('0x14')]=function(_0x414ce0){var _0x62dce5=this;return new Promise(function(_0x2a3dcb,_0x32bb25){return db[_0xa1f8('0x15')]['create'](_0x414ce0[_0xa1f8('0x16')],{'raw':_0x414ce0[_0xa1f8('0x17')]?_0x414ce0['options'][_0xa1f8('0x18')]===undefined?!![]:![]:!![]})[_0xa1f8('0x9')](function(_0x458539){logger[_0xa1f8('0xa')](_0xa1f8('0x14'),_0x414ce0);logger[_0xa1f8('0xc')](_0xa1f8('0x14'),_0x414ce0,JSON[_0xa1f8('0xe')](_0x458539));_0x2a3dcb(_0x458539);})['catch'](function(_0x367e8b){logger[_0xa1f8('0xf')](_0xa1f8('0x14'),_0x367e8b[_0xa1f8('0x11')],_0x414ce0);_0x32bb25(_0x62dce5[_0xa1f8('0xf')](0x1f4,_0x367e8b[_0xa1f8('0x11')]));});});};exports[_0xa1f8('0x19')]=function(_0x2f5e72){var _0x35f32c=this;return new Promise(function(_0x457923,_0x18aa36){return db[_0xa1f8('0x15')][_0xa1f8('0x1a')](_0x2f5e72['body'],{'raw':_0x2f5e72[_0xa1f8('0x17')]?_0x2f5e72[_0xa1f8('0x17')]['raw']===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x2f5e72[_0xa1f8('0x17')]?_0x2f5e72[_0xa1f8('0x17')][_0xa1f8('0x1b')]||null:null,'attributes':_0x2f5e72[_0xa1f8('0x17')]?_0x2f5e72[_0xa1f8('0x17')][_0xa1f8('0x1c')]||null:null,'limit':_0x2f5e72[_0xa1f8('0x17')]?_0x2f5e72[_0xa1f8('0x17')][_0xa1f8('0x1d')]||null:null})[_0xa1f8('0x9')](function(_0x25e7f3){logger['info'](_0xa1f8('0x19'),_0x2f5e72);logger[_0xa1f8('0xc')](_0xa1f8('0x19'),_0x2f5e72,JSON[_0xa1f8('0xe')](_0x25e7f3));_0x457923(_0x25e7f3);})[_0xa1f8('0x13')](function(_0x4a884d){logger[_0xa1f8('0xf')](_0xa1f8('0x19'),_0x4a884d['message'],_0x2f5e72);_0x18aa36(_0x35f32c[_0xa1f8('0xf')](0x1f4,_0x4a884d[_0xa1f8('0x11')]));});});}; \ No newline at end of file +var _0x4564=['client','http','then','info','SquareReport,\x20%s,\x20%s','debug','request\x20sent','stringify','error','code','message','result','CreateSquareReport','SquareReport','create','body','options','catch','UpdateSquareReport','update','raw','where','attributes','limit','moment','bluebird','randomstring','ioredis','../../config/utils','../../config/logger','rpc','jayson/promise'];(function(_0x5575ce,_0x232520){var _0x46e631=function(_0x5ad1f4){while(--_0x5ad1f4){_0x5575ce['push'](_0x5575ce['shift']());}};_0x46e631(++_0x232520);}(_0x4564,0x1b8));var _0x4456=function(_0x39e4bb,_0x202712){_0x39e4bb=_0x39e4bb-0x0;var _0x54e9b6=_0x4564[_0x39e4bb];return _0x54e9b6;};'use strict';var _=require('lodash');var util=require('util');var moment=require(_0x4456('0x0'));var BPromise=require(_0x4456('0x1'));var rs=require(_0x4456('0x2'));var fs=require('fs');var Redis=require(_0x4456('0x3'));var db=require('../../mysqldb')['db'];var utils=require(_0x4456('0x4'));var logger=require(_0x4456('0x5'))(_0x4456('0x6'));var config=require('../../config/environment');var jayson=require(_0x4456('0x7'));var client=jayson[_0x4456('0x8')][_0x4456('0x9')]({'port':0x232a});function respondWithRpcPromise(_0xb33cb6,_0x76a391,_0x2891e9){return new BPromise(function(_0x818576,_0x213f8e){return client['request'](_0xb33cb6,_0x2891e9)[_0x4456('0xa')](function(_0x374a8e){logger[_0x4456('0xb')](_0x4456('0xc'),_0x76a391,'request\x20sent');logger[_0x4456('0xd')]('SquareReport,\x20%s,\x20%s,\x20%s',_0x76a391,_0x4456('0xe'),JSON[_0x4456('0xf')](_0x374a8e));if(_0x374a8e[_0x4456('0x10')]){if(_0x374a8e[_0x4456('0x10')][_0x4456('0x11')]===0x1f4){logger['error'](_0x4456('0xc'),_0x76a391,_0x374a8e[_0x4456('0x10')][_0x4456('0x12')]);return _0x213f8e(_0x374a8e[_0x4456('0x10')][_0x4456('0x12')]);}logger[_0x4456('0x10')]('SquareReport,\x20%s,\x20%s',_0x76a391,_0x374a8e[_0x4456('0x10')][_0x4456('0x12')]);return _0x818576(_0x374a8e[_0x4456('0x10')][_0x4456('0x12')]);}else{logger[_0x4456('0xb')](_0x4456('0xc'),_0x76a391,'request\x20sent');_0x818576(_0x374a8e[_0x4456('0x13')][_0x4456('0x12')]);}})['catch'](function(_0x1126f0){logger['error']('SquareReport,\x20%s,\x20%s',_0x76a391,_0x1126f0);_0x213f8e(_0x1126f0);});});}exports[_0x4456('0x14')]=function(_0x5c7a00){var _0x3f39d9=this;return new Promise(function(_0x3a0163,_0x18708a){return db[_0x4456('0x15')][_0x4456('0x16')](_0x5c7a00[_0x4456('0x17')],{'raw':_0x5c7a00['options']?_0x5c7a00[_0x4456('0x18')]['raw']===undefined?!![]:![]:!![]})[_0x4456('0xa')](function(_0x301495){logger[_0x4456('0xb')](_0x4456('0x14'),_0x5c7a00);logger[_0x4456('0xd')](_0x4456('0x14'),_0x5c7a00,JSON['stringify'](_0x301495));_0x3a0163(_0x301495);})[_0x4456('0x19')](function(_0x323553){logger[_0x4456('0x10')]('CreateSquareReport',_0x323553[_0x4456('0x12')],_0x5c7a00);_0x18708a(_0x3f39d9['error'](0x1f4,_0x323553[_0x4456('0x12')]));});});};exports[_0x4456('0x1a')]=function(_0x297ba1){var _0x45d805=this;return new Promise(function(_0x342811,_0x32ba4b){return db[_0x4456('0x15')][_0x4456('0x1b')](_0x297ba1[_0x4456('0x17')],{'raw':_0x297ba1[_0x4456('0x18')]?_0x297ba1['options'][_0x4456('0x1c')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x297ba1[_0x4456('0x18')]?_0x297ba1['options'][_0x4456('0x1d')]||null:null,'attributes':_0x297ba1[_0x4456('0x18')]?_0x297ba1[_0x4456('0x18')][_0x4456('0x1e')]||null:null,'limit':_0x297ba1[_0x4456('0x18')]?_0x297ba1[_0x4456('0x18')][_0x4456('0x1f')]||null:null})[_0x4456('0xa')](function(_0x516a25){logger[_0x4456('0xb')]('UpdateSquareReport',_0x297ba1);logger[_0x4456('0xd')]('UpdateSquareReport',_0x297ba1,JSON[_0x4456('0xf')](_0x516a25));_0x342811(_0x516a25);})[_0x4456('0x19')](function(_0x4446b7){logger['error'](_0x4456('0x1a'),_0x4446b7['message'],_0x297ba1);_0x32ba4b(_0x45d805[_0x4456('0x10')](0x1f4,_0x4446b7['message']));});});}; \ No newline at end of file diff --git a/server/api/squareReportDetail/index.js b/server/api/squareReportDetail/index.js index 12f78c7..ed3ae62 100644 --- a/server/api/squareReportDetail/index.js +++ b/server/api/squareReportDetail/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xfde7=['delete','destroy','multer','util','path','connect-timeout','express','Router','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','./squareReportDetail.controller','isAuthenticated','index','get','/describe','describe','/:id','show','post','create','put','update'];(function(_0x477b5b,_0x57826a){var _0xd233ef=function(_0x55129a){while(--_0x55129a){_0x477b5b['push'](_0x477b5b['shift']());}};_0xd233ef(++_0x57826a);}(_0xfde7,0x152));var _0x7fde=function(_0x5e3b04,_0xbb6795){_0x5e3b04=_0x5e3b04-0x0;var _0x1fc44d=_0xfde7[_0x5e3b04];return _0x1fc44d;};'use strict';var multer=require(_0x7fde('0x0'));var util=require(_0x7fde('0x1'));var path=require(_0x7fde('0x2'));var timeout=require(_0x7fde('0x3'));var express=require(_0x7fde('0x4'));var router=express[_0x7fde('0x5')]();var fs_extra=require(_0x7fde('0x6'));var auth=require(_0x7fde('0x7'));var interaction=require(_0x7fde('0x8'));var config=require(_0x7fde('0x9'));var controller=require(_0x7fde('0xa'));router['get']('/',auth[_0x7fde('0xb')](),controller[_0x7fde('0xc')]);router[_0x7fde('0xd')](_0x7fde('0xe'),auth[_0x7fde('0xb')](),controller[_0x7fde('0xf')]);router[_0x7fde('0xd')](_0x7fde('0x10'),auth[_0x7fde('0xb')](),controller[_0x7fde('0x11')]);router[_0x7fde('0x12')]('/',auth[_0x7fde('0xb')](),controller[_0x7fde('0x13')]);router[_0x7fde('0x14')]('/:id',auth[_0x7fde('0xb')](),controller[_0x7fde('0x15')]);router[_0x7fde('0x16')](_0x7fde('0x10'),auth[_0x7fde('0xb')](),controller[_0x7fde('0x17')]);module['exports']=router; \ No newline at end of file +var _0xff7e=['create','put','update','delete','destroy','exports','util','path','express','Router','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','./squareReportDetail.controller','get','isAuthenticated','describe','/:id','post'];(function(_0x192de3,_0x15a264){var _0x53844f=function(_0x255b29){while(--_0x255b29){_0x192de3['push'](_0x192de3['shift']());}};_0x53844f(++_0x15a264);}(_0xff7e,0xba));var _0xeff7=function(_0x1df67c,_0x1fcf02){_0x1df67c=_0x1df67c-0x0;var _0x1b7241=_0xff7e[_0x1df67c];return _0x1b7241;};'use strict';var multer=require('multer');var util=require(_0xeff7('0x0'));var path=require(_0xeff7('0x1'));var timeout=require('connect-timeout');var express=require(_0xeff7('0x2'));var router=express[_0xeff7('0x3')]();var fs_extra=require(_0xeff7('0x4'));var auth=require(_0xeff7('0x5'));var interaction=require(_0xeff7('0x6'));var config=require(_0xeff7('0x7'));var controller=require(_0xeff7('0x8'));router[_0xeff7('0x9')]('/',auth[_0xeff7('0xa')](),controller['index']);router['get']('/describe',auth['isAuthenticated'](),controller[_0xeff7('0xb')]);router[_0xeff7('0x9')](_0xeff7('0xc'),auth[_0xeff7('0xa')](),controller['show']);router[_0xeff7('0xd')]('/',auth['isAuthenticated'](),controller[_0xeff7('0xe')]);router[_0xeff7('0xf')]('/:id',auth[_0xeff7('0xa')](),controller[_0xeff7('0x10')]);router[_0xeff7('0x11')](_0xeff7('0xc'),auth['isAuthenticated'](),controller[_0xeff7('0x12')]);module[_0xeff7('0x13')]=router; \ No newline at end of file diff --git a/server/api/squareReportDetail/squareReportDetail.attributes.js b/server/api/squareReportDetail/squareReportDetail.attributes.js index 6ffab7b..aba581f 100644 --- a/server/api/squareReportDetail/squareReportDetail.attributes.js +++ b/server/api/squareReportDetail/squareReportDetail.attributes.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x7df3=['STRING','sequelize'];(function(_0x7ec215,_0x4f6f25){var _0x45e08c=function(_0x1e8c02){while(--_0x1e8c02){_0x7ec215['push'](_0x7ec215['shift']());}};_0x45e08c(++_0x4f6f25);}(_0x7df3,0x1ab));var _0x37df=function(_0x297fd3,_0x115406){_0x297fd3=_0x297fd3-0x0;var _0x2af381=_0x7df3[_0x297fd3];return _0x2af381;};'use strict';var Sequelize=require(_0x37df('0x0'));module['exports']={'uniqueid':{'type':Sequelize['STRING']},'node':{'type':Sequelize[_0x37df('0x1')]},'application':{'type':Sequelize[_0x37df('0x1')]},'data':{'type':Sequelize['TEXT']},'project_name':{'type':Sequelize['STRING']},'callerid':{'type':Sequelize[_0x37df('0x1')]}}; \ No newline at end of file +var _0x373b=['STRING','TEXT','sequelize','exports'];(function(_0x1f7428,_0xedc78){var _0x1d6392=function(_0x3cd33d){while(--_0x3cd33d){_0x1f7428['push'](_0x1f7428['shift']());}};_0x1d6392(++_0xedc78);}(_0x373b,0xf6));var _0xb373=function(_0x297fd3,_0x115406){_0x297fd3=_0x297fd3-0x0;var _0x2af381=_0x373b[_0x297fd3];return _0x2af381;};'use strict';var Sequelize=require(_0xb373('0x0'));module[_0xb373('0x1')]={'uniqueid':{'type':Sequelize[_0xb373('0x2')]},'node':{'type':Sequelize[_0xb373('0x2')]},'application':{'type':Sequelize[_0xb373('0x2')]},'data':{'type':Sequelize[_0xb373('0x3')]},'project_name':{'type':Sequelize['STRING']},'callerid':{'type':Sequelize['STRING']}}; \ No newline at end of file diff --git a/server/api/squareReportDetail/squareReportDetail.controller.js b/server/api/squareReportDetail/squareReportDetail.controller.js index b719c69..c4ed605 100644 --- a/server/api/squareReportDetail/squareReportDetail.controller.js +++ b/server/api/squareReportDetail/squareReportDetail.controller.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x832a=['json','apply','reject','update','then','destroy','send','index','map','SquareDetailsReport','fieldName','type','key','model','query','filters','intersection','attributes','fields','length','hasOwnProperty','nolimit','order','sort','where','pick','filter','merge','VIRTUAL','includeAll','include','findAll','catch','show','params','keys','options','find','create','body','describe','zip-dir','fast-json-patch','request-promise','moment','bluebird','util','path','sox','to-csv','ejs','fs-extra','lodash','squel','jsforce','desk.js','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','sendStatus','status','end','offset','undefined','limit','count','set','Content-Range'];(function(_0xb54fc,_0x1e8b7d){var _0x5f0f2c=function(_0x25e048){while(--_0x25e048){_0xb54fc['push'](_0xb54fc['shift']());}};_0x5f0f2c(++_0x1e8b7d);}(_0x832a,0x10d));var _0xa832=function(_0x2d8f05,_0x3cfe31){_0x2d8f05=_0x2d8f05-0x0;var _0x25254c=_0x832a[_0x2d8f05];return _0x25254c;};'use strict';var emlformat=require('eml-format');var rimraf=require('rimraf');var zipdir=require(_0xa832('0x0'));var jsonpatch=require(_0xa832('0x1'));var rp=require(_0xa832('0x2'));var moment=require(_0xa832('0x3'));var BPromise=require(_0xa832('0x4'));var Mustache=require('mustache');var util=require(_0xa832('0x5'));var path=require(_0xa832('0x6'));var sox=require(_0xa832('0x7'));var csv=require(_0xa832('0x8'));var ejs=require(_0xa832('0x9'));var fs=require('fs');var fs_extra=require(_0xa832('0xa'));var _=require(_0xa832('0xb'));var squel=require(_0xa832('0xc'));var crypto=require('crypto');var jsforce=require(_0xa832('0xd'));var deskjs=require(_0xa832('0xe'));var toCsv=require(_0xa832('0x8'));var querystring=require(_0xa832('0xf'));var Papa=require(_0xa832('0x10'));var Redis=require(_0xa832('0x11'));var authService=require(_0xa832('0x12'));var qs=require('../../components/parsers/qs');var as=require(_0xa832('0x13'));var hardwareService=require(_0xa832('0x14'));var logger=require(_0xa832('0x15'))('api');var utils=require(_0xa832('0x16'));var config=require(_0xa832('0x17'));var licenseUtil=require(_0xa832('0x18'));var db=require(_0xa832('0x19'))['db'];function respondWithStatusCode(_0x4348c1,_0x27ec2d){_0x27ec2d=_0x27ec2d||0xcc;return function(_0x25a52e){if(_0x25a52e){return _0x4348c1[_0xa832('0x1a')](_0x27ec2d);}return _0x4348c1[_0xa832('0x1b')](_0x27ec2d)[_0xa832('0x1c')]();};}function respondWithResult(_0x5dfb7f,_0x2750be){_0x2750be=_0x2750be||0xc8;return function(_0x55fa37){if(_0x55fa37){return _0x5dfb7f[_0xa832('0x1b')](_0x2750be)['json'](_0x55fa37);}};}function respondWithFilteredResult(_0x46e91a,_0x170fba){return function(_0x200247){if(_0x200247){var _0x40518d=typeof _0x170fba[_0xa832('0x1d')]===_0xa832('0x1e')&&typeof _0x170fba[_0xa832('0x1f')]==='undefined';var _0x2b965e=_0x200247[_0xa832('0x20')];var _0x43b2d7=_0x40518d?0x0:_0x170fba['offset'];var _0x143074=_0x40518d?_0x200247['count']:_0x170fba[_0xa832('0x1d')]+_0x170fba[_0xa832('0x1f')];var _0x15e5be;if(_0x143074>=_0x2b965e){_0x143074=_0x2b965e;_0x15e5be=0xc8;}else{_0x15e5be=0xce;}_0x46e91a[_0xa832('0x1b')](_0x15e5be);return _0x46e91a[_0xa832('0x21')](_0xa832('0x22'),_0x43b2d7+'-'+_0x143074+'/'+_0x2b965e)[_0xa832('0x23')](_0x200247);}return null;};}function patchUpdates(_0x479b82){return function(_0x832314){try{jsonpatch[_0xa832('0x24')](_0x832314,_0x479b82,!![]);}catch(_0x2312db){return BPromise[_0xa832('0x25')](_0x2312db);}return _0x832314['save']();};}function saveUpdates(_0x418f1d,_0x495065){return function(_0x4a4237){if(_0x4a4237){return _0x4a4237[_0xa832('0x26')](_0x418f1d)[_0xa832('0x27')](function(_0x5ecbd0){return _0x5ecbd0;});}return null;};}function removeEntity(_0x386644,_0x1b763e){return function(_0x5c7232){if(_0x5c7232){return _0x5c7232[_0xa832('0x28')]()[_0xa832('0x27')](function(){_0x386644['status'](0xcc)[_0xa832('0x1c')]();});}};}function handleEntityNotFound(_0x30d3ea,_0x1dc445){return function(_0x2918cb){if(!_0x2918cb){_0x30d3ea[_0xa832('0x1a')](0x194);}return _0x2918cb;};}function handleError(_0x3e9f87,_0x1f350d){_0x1f350d=_0x1f350d||0x1f4;return function(_0x17b72f){logger['error'](_0x17b72f['stack']);if(_0x17b72f['name']){delete _0x17b72f['name'];}_0x3e9f87[_0xa832('0x1b')](_0x1f350d)[_0xa832('0x29')](_0x17b72f);};}exports[_0xa832('0x2a')]=function(_0x5a7ac6,_0x1760c7){var _0x4df1b8={},_0xa9d44d={},_0x265fd5={'count':0x0,'rows':[]};var _0x4e33b1=_[_0xa832('0x2b')](db[_0xa832('0x2c')]['rawAttributes'],function(_0x8fde2b){return{'name':_0x8fde2b[_0xa832('0x2d')],'type':_0x8fde2b[_0xa832('0x2e')][_0xa832('0x2f')]};});_0xa9d44d[_0xa832('0x30')]=_[_0xa832('0x2b')](_0x4e33b1,'name');_0xa9d44d[_0xa832('0x31')]=_['keys'](_0x5a7ac6[_0xa832('0x31')]);_0xa9d44d[_0xa832('0x32')]=_[_0xa832('0x33')](_0xa9d44d[_0xa832('0x30')],_0xa9d44d[_0xa832('0x31')]);_0x4df1b8[_0xa832('0x34')]=_[_0xa832('0x33')](_0xa9d44d[_0xa832('0x30')],qs[_0xa832('0x35')](_0x5a7ac6[_0xa832('0x31')]['fields']));_0x4df1b8[_0xa832('0x34')]=_0x4df1b8['attributes'][_0xa832('0x36')]?_0x4df1b8[_0xa832('0x34')]:_0xa9d44d[_0xa832('0x30')];if(!_0x5a7ac6[_0xa832('0x31')][_0xa832('0x37')](_0xa832('0x38'))){_0x4df1b8[_0xa832('0x1f')]=qs[_0xa832('0x1f')](_0x5a7ac6[_0xa832('0x31')][_0xa832('0x1f')]);_0x4df1b8[_0xa832('0x1d')]=qs[_0xa832('0x1d')](_0x5a7ac6['query']['offset']);}_0x4df1b8[_0xa832('0x39')]=qs[_0xa832('0x3a')](_0x5a7ac6[_0xa832('0x31')][_0xa832('0x3a')]);_0x4df1b8[_0xa832('0x3b')]=qs[_0xa832('0x32')](_[_0xa832('0x3c')](_0x5a7ac6['query'],_0xa9d44d[_0xa832('0x32')]),_0x4e33b1);if(_0x5a7ac6[_0xa832('0x31')][_0xa832('0x3d')]){_0x4df1b8[_0xa832('0x3b')]=_[_0xa832('0x3e')](_0x4df1b8['where'],{'$or':_[_0xa832('0x2b')](_0x4e33b1,function(_0x4844a5){if(_0x4844a5[_0xa832('0x2e')]!==_0xa832('0x3f')){var _0x19e96d={};_0x19e96d[_0x4844a5['name']]={'$like':'%'+_0x5a7ac6['query'][_0xa832('0x3d')]+'%'};return _0x19e96d;}})});}_0x4df1b8=_[_0xa832('0x3e')]({},_0x4df1b8,_0x5a7ac6['options']);var _0x13a21b={'where':_0x4df1b8['where']};return db[_0xa832('0x2c')][_0xa832('0x20')](_0x13a21b)['then'](function(_0x4ffd52){_0x265fd5[_0xa832('0x20')]=_0x4ffd52;if(_0x5a7ac6[_0xa832('0x31')][_0xa832('0x40')]){_0x4df1b8[_0xa832('0x41')]=[{'all':!![]}];}return db[_0xa832('0x2c')][_0xa832('0x42')](_0x4df1b8);})[_0xa832('0x27')](function(_0x1e3390){_0x265fd5['rows']=_0x1e3390;return _0x265fd5;})[_0xa832('0x27')](respondWithFilteredResult(_0x1760c7,_0x4df1b8))[_0xa832('0x43')](handleError(_0x1760c7,null));};exports[_0xa832('0x44')]=function(_0x2744da,_0x17a994){var _0x2f0ae8={'raw':!![],'where':{'id':_0x2744da[_0xa832('0x45')]['id']}},_0x1ae741={};_0x1ae741[_0xa832('0x30')]=_[_0xa832('0x46')](db['SquareDetailsReport']['rawAttributes']);_0x1ae741[_0xa832('0x31')]=_[_0xa832('0x46')](_0x2744da[_0xa832('0x31')]);_0x1ae741[_0xa832('0x32')]=_[_0xa832('0x33')](_0x1ae741['model'],_0x1ae741[_0xa832('0x31')]);_0x2f0ae8['attributes']=_[_0xa832('0x33')](_0x1ae741[_0xa832('0x30')],qs[_0xa832('0x35')](_0x2744da[_0xa832('0x31')][_0xa832('0x35')]));_0x2f0ae8[_0xa832('0x34')]=_0x2f0ae8['attributes']['length']?_0x2f0ae8['attributes']:_0x1ae741['model'];if(_0x2744da['query'][_0xa832('0x40')]){_0x2f0ae8[_0xa832('0x41')]=[{'all':!![]}];}_0x2f0ae8=_[_0xa832('0x3e')]({},_0x2f0ae8,_0x2744da[_0xa832('0x47')]);return db[_0xa832('0x2c')][_0xa832('0x48')](_0x2f0ae8)[_0xa832('0x27')](handleEntityNotFound(_0x17a994,null))[_0xa832('0x27')](respondWithResult(_0x17a994,null))['catch'](handleError(_0x17a994,null));};exports[_0xa832('0x49')]=function(_0x5007b7,_0x135f07){return db[_0xa832('0x2c')][_0xa832('0x49')](_0x5007b7[_0xa832('0x4a')],{})['then'](respondWithResult(_0x135f07,0xc9))['catch'](handleError(_0x135f07,null));};exports[_0xa832('0x26')]=function(_0x32a979,_0x45e0a1){if(_0x32a979[_0xa832('0x4a')]['id']){delete _0x32a979[_0xa832('0x4a')]['id'];}return db[_0xa832('0x2c')][_0xa832('0x48')]({'where':{'id':_0x32a979[_0xa832('0x45')]['id']}})[_0xa832('0x27')](handleEntityNotFound(_0x45e0a1,null))[_0xa832('0x27')](saveUpdates(_0x32a979[_0xa832('0x4a')],null))['then'](respondWithResult(_0x45e0a1,null))['catch'](handleError(_0x45e0a1,null));};exports['destroy']=function(_0x551989,_0x1660cd){return db[_0xa832('0x2c')][_0xa832('0x48')]({'where':{'id':_0x551989['params']['id']}})[_0xa832('0x27')](handleEntityNotFound(_0x1660cd,null))[_0xa832('0x27')](removeEntity(_0x1660cd,null))[_0xa832('0x43')](handleError(_0x1660cd,null));};exports[_0xa832('0x4b')]=function(_0x5e6c9b,_0x31beec){return db[_0xa832('0x2c')][_0xa832('0x4b')]()['then'](respondWithResult(_0x31beec,null))[_0xa832('0x43')](handleError(_0x31beec,null));}; \ No newline at end of file +var _0xed46=['reject','save','update','then','destroy','sendStatus','error','stack','name','send','map','SquareDetailsReport','rawAttributes','fieldName','type','query','keys','intersection','model','fields','attributes','nolimit','sort','pick','filters','filter','where','merge','options','includeAll','include','findAll','rows','catch','params','length','find','create','body','describe','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','bluebird','mustache','util','path','sox','to-csv','ejs','lodash','squel','desk.js','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../config/license/hardware','../../config/logger','api','../../mysqldb','status','end','json','limit','undefined','count','offset','Content-Range','apply'];(function(_0x39f698,_0x272eed){var _0x479e2c=function(_0x482a28){while(--_0x482a28){_0x39f698['push'](_0x39f698['shift']());}};_0x479e2c(++_0x272eed);}(_0xed46,0x1de));var _0x6ed4=function(_0x5a3c7b,_0x3fad44){_0x5a3c7b=_0x5a3c7b-0x0;var _0x5763f5=_0xed46[_0x5a3c7b];return _0x5763f5;};'use strict';var emlformat=require(_0x6ed4('0x0'));var rimraf=require(_0x6ed4('0x1'));var zipdir=require(_0x6ed4('0x2'));var jsonpatch=require(_0x6ed4('0x3'));var rp=require(_0x6ed4('0x4'));var moment=require('moment');var BPromise=require(_0x6ed4('0x5'));var Mustache=require(_0x6ed4('0x6'));var util=require(_0x6ed4('0x7'));var path=require(_0x6ed4('0x8'));var sox=require(_0x6ed4('0x9'));var csv=require(_0x6ed4('0xa'));var ejs=require(_0x6ed4('0xb'));var fs=require('fs');var fs_extra=require('fs-extra');var _=require(_0x6ed4('0xc'));var squel=require(_0x6ed4('0xd'));var crypto=require('crypto');var jsforce=require('jsforce');var deskjs=require(_0x6ed4('0xe'));var toCsv=require(_0x6ed4('0xa'));var querystring=require(_0x6ed4('0xf'));var Papa=require(_0x6ed4('0x10'));var Redis=require(_0x6ed4('0x11'));var authService=require(_0x6ed4('0x12'));var qs=require(_0x6ed4('0x13'));var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0x6ed4('0x14'));var logger=require(_0x6ed4('0x15'))(_0x6ed4('0x16'));var utils=require('../../config/utils');var config=require('../../config/environment');var licenseUtil=require('../../config/license/util');var db=require(_0x6ed4('0x17'))['db'];function respondWithStatusCode(_0xb801a0,_0x268193){_0x268193=_0x268193||0xcc;return function(_0x177b49){if(_0x177b49){return _0xb801a0['sendStatus'](_0x268193);}return _0xb801a0[_0x6ed4('0x18')](_0x268193)[_0x6ed4('0x19')]();};}function respondWithResult(_0x4240b8,_0x1eb84e){_0x1eb84e=_0x1eb84e||0xc8;return function(_0x48038d){if(_0x48038d){return _0x4240b8['status'](_0x1eb84e)[_0x6ed4('0x1a')](_0x48038d);}};}function respondWithFilteredResult(_0x3d7e41,_0x19d84b){return function(_0x191b18){if(_0x191b18){var _0x54c1f2=typeof _0x19d84b['offset']==='undefined'&&typeof _0x19d84b[_0x6ed4('0x1b')]===_0x6ed4('0x1c');var _0x3a6e75=_0x191b18[_0x6ed4('0x1d')];var _0x28114e=_0x54c1f2?0x0:_0x19d84b[_0x6ed4('0x1e')];var _0x51310a=_0x54c1f2?_0x191b18[_0x6ed4('0x1d')]:_0x19d84b[_0x6ed4('0x1e')]+_0x19d84b[_0x6ed4('0x1b')];var _0x4ba974;if(_0x51310a>=_0x3a6e75){_0x51310a=_0x3a6e75;_0x4ba974=0xc8;}else{_0x4ba974=0xce;}_0x3d7e41[_0x6ed4('0x18')](_0x4ba974);return _0x3d7e41['set'](_0x6ed4('0x1f'),_0x28114e+'-'+_0x51310a+'/'+_0x3a6e75)[_0x6ed4('0x1a')](_0x191b18);}return null;};}function patchUpdates(_0x5c1877){return function(_0x48234b){try{jsonpatch[_0x6ed4('0x20')](_0x48234b,_0x5c1877,!![]);}catch(_0x50ce1c){return BPromise[_0x6ed4('0x21')](_0x50ce1c);}return _0x48234b[_0x6ed4('0x22')]();};}function saveUpdates(_0x1fba4c,_0x512d81){return function(_0x3c52da){if(_0x3c52da){return _0x3c52da[_0x6ed4('0x23')](_0x1fba4c)[_0x6ed4('0x24')](function(_0x2adca1){return _0x2adca1;});}return null;};}function removeEntity(_0x29db73,_0x42eacc){return function(_0x26d6ff){if(_0x26d6ff){return _0x26d6ff[_0x6ed4('0x25')]()[_0x6ed4('0x24')](function(){_0x29db73[_0x6ed4('0x18')](0xcc)[_0x6ed4('0x19')]();});}};}function handleEntityNotFound(_0x204426,_0x5a2f62){return function(_0x1a2c48){if(!_0x1a2c48){_0x204426[_0x6ed4('0x26')](0x194);}return _0x1a2c48;};}function handleError(_0xb2d143,_0x4fe6b7){_0x4fe6b7=_0x4fe6b7||0x1f4;return function(_0x2975f0){logger[_0x6ed4('0x27')](_0x2975f0[_0x6ed4('0x28')]);if(_0x2975f0[_0x6ed4('0x29')]){delete _0x2975f0[_0x6ed4('0x29')];}_0xb2d143[_0x6ed4('0x18')](_0x4fe6b7)[_0x6ed4('0x2a')](_0x2975f0);};}exports['index']=function(_0x42b053,_0x57da80){var _0x5d2c53={},_0x3534e8={},_0x3f2b4f={'count':0x0,'rows':[]};var _0x3b423d=_[_0x6ed4('0x2b')](db[_0x6ed4('0x2c')][_0x6ed4('0x2d')],function(_0x3af61f){return{'name':_0x3af61f[_0x6ed4('0x2e')],'type':_0x3af61f[_0x6ed4('0x2f')]['key']};});_0x3534e8['model']=_[_0x6ed4('0x2b')](_0x3b423d,_0x6ed4('0x29'));_0x3534e8[_0x6ed4('0x30')]=_[_0x6ed4('0x31')](_0x42b053[_0x6ed4('0x30')]);_0x3534e8['filters']=_[_0x6ed4('0x32')](_0x3534e8[_0x6ed4('0x33')],_0x3534e8[_0x6ed4('0x30')]);_0x5d2c53['attributes']=_[_0x6ed4('0x32')](_0x3534e8[_0x6ed4('0x33')],qs[_0x6ed4('0x34')](_0x42b053['query'][_0x6ed4('0x34')]));_0x5d2c53['attributes']=_0x5d2c53[_0x6ed4('0x35')]['length']?_0x5d2c53[_0x6ed4('0x35')]:_0x3534e8['model'];if(!_0x42b053[_0x6ed4('0x30')]['hasOwnProperty'](_0x6ed4('0x36'))){_0x5d2c53[_0x6ed4('0x1b')]=qs[_0x6ed4('0x1b')](_0x42b053[_0x6ed4('0x30')][_0x6ed4('0x1b')]);_0x5d2c53[_0x6ed4('0x1e')]=qs[_0x6ed4('0x1e')](_0x42b053['query'][_0x6ed4('0x1e')]);}_0x5d2c53['order']=qs[_0x6ed4('0x37')](_0x42b053[_0x6ed4('0x30')][_0x6ed4('0x37')]);_0x5d2c53['where']=qs['filters'](_[_0x6ed4('0x38')](_0x42b053[_0x6ed4('0x30')],_0x3534e8[_0x6ed4('0x39')]),_0x3b423d);if(_0x42b053[_0x6ed4('0x30')][_0x6ed4('0x3a')]){_0x5d2c53[_0x6ed4('0x3b')]=_[_0x6ed4('0x3c')](_0x5d2c53[_0x6ed4('0x3b')],{'$or':_['map'](_0x3b423d,function(_0x1dc6d4){if(_0x1dc6d4[_0x6ed4('0x2f')]!=='VIRTUAL'){var _0x5f0779={};_0x5f0779[_0x1dc6d4[_0x6ed4('0x29')]]={'$like':'%'+_0x42b053[_0x6ed4('0x30')][_0x6ed4('0x3a')]+'%'};return _0x5f0779;}})});}_0x5d2c53=_[_0x6ed4('0x3c')]({},_0x5d2c53,_0x42b053[_0x6ed4('0x3d')]);var _0x1faa44={'where':_0x5d2c53[_0x6ed4('0x3b')]};return db['SquareDetailsReport'][_0x6ed4('0x1d')](_0x1faa44)['then'](function(_0x1c197b){_0x3f2b4f['count']=_0x1c197b;if(_0x42b053[_0x6ed4('0x30')][_0x6ed4('0x3e')]){_0x5d2c53[_0x6ed4('0x3f')]=[{'all':!![]}];}return db[_0x6ed4('0x2c')][_0x6ed4('0x40')](_0x5d2c53);})[_0x6ed4('0x24')](function(_0x315caa){_0x3f2b4f[_0x6ed4('0x41')]=_0x315caa;return _0x3f2b4f;})[_0x6ed4('0x24')](respondWithFilteredResult(_0x57da80,_0x5d2c53))[_0x6ed4('0x42')](handleError(_0x57da80,null));};exports['show']=function(_0x346b44,_0x480d79){var _0x3896f8={'raw':!![],'where':{'id':_0x346b44[_0x6ed4('0x43')]['id']}},_0x50e99d={};_0x50e99d['model']=_[_0x6ed4('0x31')](db['SquareDetailsReport'][_0x6ed4('0x2d')]);_0x50e99d[_0x6ed4('0x30')]=_['keys'](_0x346b44[_0x6ed4('0x30')]);_0x50e99d['filters']=_[_0x6ed4('0x32')](_0x50e99d[_0x6ed4('0x33')],_0x50e99d[_0x6ed4('0x30')]);_0x3896f8[_0x6ed4('0x35')]=_['intersection'](_0x50e99d[_0x6ed4('0x33')],qs[_0x6ed4('0x34')](_0x346b44[_0x6ed4('0x30')][_0x6ed4('0x34')]));_0x3896f8[_0x6ed4('0x35')]=_0x3896f8[_0x6ed4('0x35')][_0x6ed4('0x44')]?_0x3896f8[_0x6ed4('0x35')]:_0x50e99d['model'];if(_0x346b44[_0x6ed4('0x30')][_0x6ed4('0x3e')]){_0x3896f8[_0x6ed4('0x3f')]=[{'all':!![]}];}_0x3896f8=_[_0x6ed4('0x3c')]({},_0x3896f8,_0x346b44[_0x6ed4('0x3d')]);return db['SquareDetailsReport'][_0x6ed4('0x45')](_0x3896f8)[_0x6ed4('0x24')](handleEntityNotFound(_0x480d79,null))[_0x6ed4('0x24')](respondWithResult(_0x480d79,null))[_0x6ed4('0x42')](handleError(_0x480d79,null));};exports[_0x6ed4('0x46')]=function(_0x5c0791,_0x293609){return db[_0x6ed4('0x2c')]['create'](_0x5c0791[_0x6ed4('0x47')],{})[_0x6ed4('0x24')](respondWithResult(_0x293609,0xc9))['catch'](handleError(_0x293609,null));};exports['update']=function(_0x3ba45b,_0x48c14e){if(_0x3ba45b['body']['id']){delete _0x3ba45b[_0x6ed4('0x47')]['id'];}return db[_0x6ed4('0x2c')][_0x6ed4('0x45')]({'where':{'id':_0x3ba45b[_0x6ed4('0x43')]['id']}})[_0x6ed4('0x24')](handleEntityNotFound(_0x48c14e,null))['then'](saveUpdates(_0x3ba45b[_0x6ed4('0x47')],null))['then'](respondWithResult(_0x48c14e,null))['catch'](handleError(_0x48c14e,null));};exports[_0x6ed4('0x25')]=function(_0x43ffc0,_0x20c3e6){return db[_0x6ed4('0x2c')][_0x6ed4('0x45')]({'where':{'id':_0x43ffc0['params']['id']}})[_0x6ed4('0x24')](handleEntityNotFound(_0x20c3e6,null))[_0x6ed4('0x24')](removeEntity(_0x20c3e6,null))[_0x6ed4('0x42')](handleError(_0x20c3e6,null));};exports[_0x6ed4('0x48')]=function(_0x5139d,_0x41b349){return db[_0x6ed4('0x2c')][_0x6ed4('0x48')]()[_0x6ed4('0x24')](respondWithResult(_0x41b349,null))[_0x6ed4('0x42')](handleError(_0x41b349,null));}; \ No newline at end of file diff --git a/server/api/squareReportDetail/squareReportDetail.model.js b/server/api/squareReportDetail/squareReportDetail.model.js index bd54638..aae884b 100644 --- a/server/api/squareReportDetail/squareReportDetail.model.js +++ b/server/api/squareReportDetail/squareReportDetail.model.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x331d=['path','rimraf','../../config/environment','./squareReportDetail.attributes','define','SquareDetailsReport','report_square_details','lodash','../../config/logger','api','bluebird','request-promise'];(function(_0x17a6d6,_0x33195f){var _0xcdc24a=function(_0x5c8987){while(--_0x5c8987){_0x17a6d6['push'](_0x17a6d6['shift']());}};_0xcdc24a(++_0x33195f);}(_0x331d,0xeb));var _0xd331=function(_0x5836ac,_0x5e8f34){_0x5836ac=_0x5836ac-0x0;var _0x432e87=_0x331d[_0x5836ac];return _0x432e87;};'use strict';var _=require(_0xd331('0x0'));var util=require('util');var logger=require(_0xd331('0x1'))(_0xd331('0x2'));var moment=require('moment');var BPromise=require(_0xd331('0x3'));var rp=require(_0xd331('0x4'));var fs=require('fs');var path=require(_0xd331('0x5'));var rimraf=require(_0xd331('0x6'));var config=require(_0xd331('0x7'));var attributes=require(_0xd331('0x8'));module['exports']=function(_0x18fcc9,_0x540d52){return _0x18fcc9[_0xd331('0x9')](_0xd331('0xa'),attributes,{'tableName':_0xd331('0xb'),'paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file +var _0x7be4=['exports','define','SquareDetailsReport','report_square_details','lodash','api','moment','bluebird','request-promise','path','rimraf','../../config/environment','./squareReportDetail.attributes'];(function(_0x1f36bb,_0x8af718){var _0xaf97fa=function(_0xeca489){while(--_0xeca489){_0x1f36bb['push'](_0x1f36bb['shift']());}};_0xaf97fa(++_0x8af718);}(_0x7be4,0x1be));var _0x47be=function(_0x53bcd9,_0x3bac40){_0x53bcd9=_0x53bcd9-0x0;var _0x51aa59=_0x7be4[_0x53bcd9];return _0x51aa59;};'use strict';var _=require(_0x47be('0x0'));var util=require('util');var logger=require('../../config/logger')(_0x47be('0x1'));var moment=require(_0x47be('0x2'));var BPromise=require(_0x47be('0x3'));var rp=require(_0x47be('0x4'));var fs=require('fs');var path=require(_0x47be('0x5'));var rimraf=require(_0x47be('0x6'));var config=require(_0x47be('0x7'));var attributes=require(_0x47be('0x8'));module[_0x47be('0x9')]=function(_0x52c2ea,_0x341697){return _0x52c2ea[_0x47be('0xa')](_0x47be('0xb'),attributes,{'tableName':_0x47be('0xc'),'paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file diff --git a/server/api/squareReportDetail/squareReportDetail.rpc.js b/server/api/squareReportDetail/squareReportDetail.rpc.js index 999041b..3c65c42 100644 --- a/server/api/squareReportDetail/squareReportDetail.rpc.js +++ b/server/api/squareReportDetail/squareReportDetail.rpc.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xa7fa=['SquareDetailsReport,\x20%s,\x20%s','request\x20sent','SquareDetailsReport,\x20%s,\x20%s,\x20%s','stringify','error','message','info','catch','CreateSquareDetailsReport','SquareDetailsReport','create','options','lodash','bluebird','randomstring','ioredis','../../mysqldb','../../config/logger','rpc','../../config/environment','jayson/promise','http','request','then'];(function(_0x51d129,_0x175d7d){var _0x44c377=function(_0x5ee454){while(--_0x5ee454){_0x51d129['push'](_0x51d129['shift']());}};_0x44c377(++_0x175d7d);}(_0xa7fa,0xfc));var _0xaa7f=function(_0x20a584,_0xe384a5){_0x20a584=_0x20a584-0x0;var _0x4b41a8=_0xa7fa[_0x20a584];return _0x4b41a8;};'use strict';var _=require(_0xaa7f('0x0'));var util=require('util');var moment=require('moment');var BPromise=require(_0xaa7f('0x1'));var rs=require(_0xaa7f('0x2'));var fs=require('fs');var Redis=require(_0xaa7f('0x3'));var db=require(_0xaa7f('0x4'))['db'];var utils=require('../../config/utils');var logger=require(_0xaa7f('0x5'))(_0xaa7f('0x6'));var config=require(_0xaa7f('0x7'));var jayson=require(_0xaa7f('0x8'));var client=jayson['client'][_0xaa7f('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x48105b,_0x50bab6,_0x3898a3){return new BPromise(function(_0x506a91,_0x3ac236){return client[_0xaa7f('0xa')](_0x48105b,_0x3898a3)[_0xaa7f('0xb')](function(_0x2dbcb6){logger['info'](_0xaa7f('0xc'),_0x50bab6,_0xaa7f('0xd'));logger['debug'](_0xaa7f('0xe'),_0x50bab6,_0xaa7f('0xd'),JSON[_0xaa7f('0xf')](_0x2dbcb6));if(_0x2dbcb6[_0xaa7f('0x10')]){if(_0x2dbcb6['error']['code']===0x1f4){logger[_0xaa7f('0x10')](_0xaa7f('0xc'),_0x50bab6,_0x2dbcb6[_0xaa7f('0x10')][_0xaa7f('0x11')]);return _0x3ac236(_0x2dbcb6[_0xaa7f('0x10')][_0xaa7f('0x11')]);}logger[_0xaa7f('0x10')](_0xaa7f('0xc'),_0x50bab6,_0x2dbcb6[_0xaa7f('0x10')]['message']);return _0x506a91(_0x2dbcb6[_0xaa7f('0x10')]['message']);}else{logger[_0xaa7f('0x12')](_0xaa7f('0xc'),_0x50bab6,_0xaa7f('0xd'));_0x506a91(_0x2dbcb6['result'][_0xaa7f('0x11')]);}})[_0xaa7f('0x13')](function(_0x1bd3f9){logger[_0xaa7f('0x10')](_0xaa7f('0xc'),_0x50bab6,_0x1bd3f9);_0x3ac236(_0x1bd3f9);});});}exports[_0xaa7f('0x14')]=function(_0x2c17c4){var _0x4fbd09=this;return new Promise(function(_0x90863a,_0x1e18a6){return db[_0xaa7f('0x15')][_0xaa7f('0x16')](_0x2c17c4['body'],{'raw':_0x2c17c4['options']?_0x2c17c4[_0xaa7f('0x17')]['raw']===undefined?!![]:![]:!![]})[_0xaa7f('0xb')](function(_0x21e870){logger['info'](_0xaa7f('0x14'),_0x2c17c4);logger['debug'](_0xaa7f('0x14'),_0x2c17c4,JSON[_0xaa7f('0xf')](_0x21e870));_0x90863a(_0x21e870);})[_0xaa7f('0x13')](function(_0x516d7e){logger[_0xaa7f('0x10')](_0xaa7f('0x14'),_0x516d7e[_0xaa7f('0x11')],_0x2c17c4);_0x1e18a6(_0x4fbd09[_0xaa7f('0x10')](0x1f4,_0x516d7e['message']));});});}; \ No newline at end of file +var _0x065e=['ioredis','../../mysqldb','rpc','../../config/environment','client','http','request','then','info','request\x20sent','debug','SquareDetailsReport,\x20%s,\x20%s,\x20%s','stringify','error','SquareDetailsReport,\x20%s,\x20%s','message','result','CreateSquareDetailsReport','SquareDetailsReport','create','options','raw','catch','lodash','randomstring'];(function(_0x4b369d,_0x265eb8){var _0x571a98=function(_0x56341a){while(--_0x56341a){_0x4b369d['push'](_0x4b369d['shift']());}};_0x571a98(++_0x265eb8);}(_0x065e,0x1a7));var _0xe065=function(_0x2d0223,_0x5f1ce4){_0x2d0223=_0x2d0223-0x0;var _0x29779a=_0x065e[_0x2d0223];return _0x29779a;};'use strict';var _=require(_0xe065('0x0'));var util=require('util');var moment=require('moment');var BPromise=require('bluebird');var rs=require(_0xe065('0x1'));var fs=require('fs');var Redis=require(_0xe065('0x2'));var db=require(_0xe065('0x3'))['db'];var utils=require('../../config/utils');var logger=require('../../config/logger')(_0xe065('0x4'));var config=require(_0xe065('0x5'));var jayson=require('jayson/promise');var client=jayson[_0xe065('0x6')][_0xe065('0x7')]({'port':0x232a});function respondWithRpcPromise(_0x189d72,_0x52403a,_0x267122){return new BPromise(function(_0x5afbd4,_0x273e22){return client[_0xe065('0x8')](_0x189d72,_0x267122)[_0xe065('0x9')](function(_0x114497){logger[_0xe065('0xa')]('SquareDetailsReport,\x20%s,\x20%s',_0x52403a,_0xe065('0xb'));logger[_0xe065('0xc')](_0xe065('0xd'),_0x52403a,_0xe065('0xb'),JSON[_0xe065('0xe')](_0x114497));if(_0x114497[_0xe065('0xf')]){if(_0x114497['error']['code']===0x1f4){logger[_0xe065('0xf')](_0xe065('0x10'),_0x52403a,_0x114497[_0xe065('0xf')]['message']);return _0x273e22(_0x114497[_0xe065('0xf')][_0xe065('0x11')]);}logger[_0xe065('0xf')](_0xe065('0x10'),_0x52403a,_0x114497[_0xe065('0xf')]['message']);return _0x5afbd4(_0x114497[_0xe065('0xf')][_0xe065('0x11')]);}else{logger[_0xe065('0xa')](_0xe065('0x10'),_0x52403a,_0xe065('0xb'));_0x5afbd4(_0x114497[_0xe065('0x12')][_0xe065('0x11')]);}})['catch'](function(_0x1ba88d){logger[_0xe065('0xf')]('SquareDetailsReport,\x20%s,\x20%s',_0x52403a,_0x1ba88d);_0x273e22(_0x1ba88d);});});}exports[_0xe065('0x13')]=function(_0x1d2f7a){var _0x397f05=this;return new Promise(function(_0x14c97c,_0x1e7177){return db[_0xe065('0x14')][_0xe065('0x15')](_0x1d2f7a['body'],{'raw':_0x1d2f7a[_0xe065('0x16')]?_0x1d2f7a['options'][_0xe065('0x17')]===undefined?!![]:![]:!![]})[_0xe065('0x9')](function(_0x55f55c){logger[_0xe065('0xa')]('CreateSquareDetailsReport',_0x1d2f7a);logger[_0xe065('0xc')](_0xe065('0x13'),_0x1d2f7a,JSON[_0xe065('0xe')](_0x55f55c));_0x14c97c(_0x55f55c);})[_0xe065('0x18')](function(_0x3ecd13){logger[_0xe065('0xf')](_0xe065('0x13'),_0x3ecd13[_0xe065('0x11')],_0x1d2f7a);_0x1e7177(_0x397f05[_0xe065('0xf')](0x1f4,_0x3ecd13['message']));});});}; \ No newline at end of file diff --git a/server/api/system/index.js b/server/api/system/index.js index 58b20d1..3692fc5 100644 --- a/server/api/system/index.js +++ b/server/api/system/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xd1de=['killProcess','exports','express','Router','get','isAuthenticated','index','/process/:pid/kill'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0xd1de,0xfa));var _0xed1d=function(_0x23a830,_0x198f65){_0x23a830=_0x23a830-0x0;var _0x4cfb49=_0xd1de[_0x23a830];return _0x4cfb49;};'use strict';var express=require(_0xed1d('0x0'));var router=express[_0xed1d('0x1')]();var auth=require('../../components/auth/service');var controller=require('./system.controller');router[_0xed1d('0x2')]('/',auth[_0xed1d('0x3')](),controller[_0xed1d('0x4')]);router[_0xed1d('0x2')](_0xed1d('0x5'),auth[_0xed1d('0x3')](),controller[_0xed1d('0x6')]);module[_0xed1d('0x7')]=router; \ No newline at end of file +var _0xa664=['exports','Router','./system.controller','isAuthenticated','index','get','/process/:pid/kill','killProcess'];(function(_0x592cea,_0x4e72f1){var _0x1e9cc6=function(_0x166217){while(--_0x166217){_0x592cea['push'](_0x592cea['shift']());}};_0x1e9cc6(++_0x4e72f1);}(_0xa664,0x1b9));var _0x4a66=function(_0x360b1a,_0x6d4fb){_0x360b1a=_0x360b1a-0x0;var _0x47aa81=_0xa664[_0x360b1a];return _0x47aa81;};'use strict';var express=require('express');var router=express[_0x4a66('0x0')]();var auth=require('../../components/auth/service');var controller=require(_0x4a66('0x1'));router['get']('/',auth[_0x4a66('0x2')](),controller[_0x4a66('0x3')]);router[_0x4a66('0x4')](_0x4a66('0x5'),auth[_0x4a66('0x2')](),controller[_0x4a66('0x6')]);module[_0x4a66('0x7')]=router; \ No newline at end of file diff --git a/server/api/system/system.controller.js b/server/api/system/system.controller.js index 3a20352..5212a3b 100644 --- a/server/api/system/system.controller.js +++ b/server/api/system/system.controller.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x4b8e=['Process\x20with\x20pid\x20%s\x20killed\x20correctly','killProcess','exec','../../config/logger','api','util','bluebird','lodash','error','<%-\x20name\x20%>,\x20%s,\x20%s,\x20%s','inspect','name','send','index','getAllData','status','catch','json','components/import/cm','pid','then','length','indexOf','Process\x20with\x20pid\x20%s\x20not\x20found!','params','kill','SIGINT','format'];(function(_0x46698a,_0x8de1e4){var _0x356db0=function(_0x19e83c){while(--_0x19e83c){_0x46698a['push'](_0x46698a['shift']());}};_0x356db0(++_0x8de1e4);}(_0x4b8e,0x8e));var _0xe4b8=function(_0x855e25,_0x5cc86d){_0x855e25=_0x855e25-0x0;var _0x4c2b86=_0x4b8e[_0x855e25];return _0x4c2b86;};'use strict';var info=require('systeminformation');var exec=require('child_process')[_0xe4b8('0x0')];var logger=require(_0xe4b8('0x1'))(_0xe4b8('0x2'));var util=require(_0xe4b8('0x3'));var BPromise=require(_0xe4b8('0x4'));var _=require(_0xe4b8('0x5'));function handleError(_0x426c7b,_0x5d0e1f,_0x2c383b){_0x5d0e1f=_0x5d0e1f||0x1f4;return function(_0x30b48d){logger[_0xe4b8('0x6')](_0xe4b8('0x7'),_0x2c383b,_0x5d0e1f,util[_0xe4b8('0x8')](_0x30b48d,{'showHidden':![],'depth':null}));delete _0x30b48d[_0xe4b8('0x9')];_0x426c7b['status'](_0x5d0e1f)[_0xe4b8('0xa')](_0x30b48d);};}exports[_0xe4b8('0xb')]=function(_0x3cd40c,_0x5e9c39){return info[_0xe4b8('0xc')]()['then'](function(_0xe3eb6d){return _0x5e9c39[_0xe4b8('0xd')](0xc8)['json'](_0xe3eb6d);})[_0xe4b8('0xe')](function(_0x4308f2){return _0x5e9c39[_0xe4b8('0xd')](0x1f4)[_0xe4b8('0xf')](_0x4308f2);});};exports['killProcess']=function(_0x19ab53,_0x87d683){var _0x1d0dab=[_0xe4b8('0x10')];return new BPromise(function(_0x54bf12,_0x1c2b98){return exec(util['format']('ps\x20-p\x20%s\x20-ww\x20-o\x20args',_0x19ab53['params'][_0xe4b8('0x11')]),function(_0x4ffa51,_0x405bde,_0x2aac6e){if(_0x4ffa51){return _0x1c2b98(_0x4ffa51);}return _0x54bf12(_0x405bde);});})[_0xe4b8('0x12')](function(_0x1c9290){var _0x42669a=![];var _0x13c0fa=_0x1c9290['split'](/\n/);for(var _0x3cd9a0=0x0,_0x4fc106=_0x1d0dab[_0xe4b8('0x13')];_0x3cd9a0<_0x4fc106,_0x42669a===![];_0x3cd9a0+=0x1){if(_0x1c9290[_0xe4b8('0x14')](_0x1d0dab[_0x3cd9a0])>=0x0){_0x42669a=!![];}}if(!_0x42669a){throw new Error(util['format'](_0xe4b8('0x15'),_0x19ab53[_0xe4b8('0x16')][_0xe4b8('0x11')]));}process[_0xe4b8('0x17')](_0x19ab53[_0xe4b8('0x16')][_0xe4b8('0x11')],_0xe4b8('0x18'));return _0x87d683[_0xe4b8('0xd')](0xc8)[_0xe4b8('0xf')]({'message':util[_0xe4b8('0x19')](_0xe4b8('0x1a'),_0x19ab53['params'][_0xe4b8('0x11')])});})[_0xe4b8('0xe')](handleError(_0x87d683,null,_0xe4b8('0x1b')));}; \ No newline at end of file +var _0xd202=['killProcess','components/import/cm','format','ps\x20-p\x20%s\x20-ww\x20-o\x20args','params','pid','indexOf','Process\x20with\x20pid\x20%s\x20not\x20found!','kill','SIGINT','systeminformation','child_process','exec','../../config/logger','api','util','error','inspect','name','getAllData','then','status','json','catch'];(function(_0x3f0d04,_0x45a272){var _0x4b65b8=function(_0x394084){while(--_0x394084){_0x3f0d04['push'](_0x3f0d04['shift']());}};_0x4b65b8(++_0x45a272);}(_0xd202,0x15a));var _0x2d20=function(_0x7e2eb0,_0x17cd58){_0x7e2eb0=_0x7e2eb0-0x0;var _0xd92de4=_0xd202[_0x7e2eb0];return _0xd92de4;};'use strict';var info=require(_0x2d20('0x0'));var exec=require(_0x2d20('0x1'))[_0x2d20('0x2')];var logger=require(_0x2d20('0x3'))(_0x2d20('0x4'));var util=require(_0x2d20('0x5'));var BPromise=require('bluebird');var _=require('lodash');function handleError(_0x23a1d7,_0x271856,_0x414535){_0x271856=_0x271856||0x1f4;return function(_0x5df17f){logger[_0x2d20('0x6')]('<%-\x20name\x20%>,\x20%s,\x20%s,\x20%s',_0x414535,_0x271856,util[_0x2d20('0x7')](_0x5df17f,{'showHidden':![],'depth':null}));delete _0x5df17f[_0x2d20('0x8')];_0x23a1d7['status'](_0x271856)['send'](_0x5df17f);};}exports['index']=function(_0x3c228c,_0x33e016){return info[_0x2d20('0x9')]()[_0x2d20('0xa')](function(_0x556b9b){return _0x33e016[_0x2d20('0xb')](0xc8)[_0x2d20('0xc')](_0x556b9b);})[_0x2d20('0xd')](function(_0x21c07d){return _0x33e016[_0x2d20('0xb')](0x1f4)[_0x2d20('0xc')](_0x21c07d);});};exports[_0x2d20('0xe')]=function(_0x49fc03,_0x27bee0){var _0x5304db=[_0x2d20('0xf')];return new BPromise(function(_0x31d84d,_0x7c1fc9){return exec(util[_0x2d20('0x10')](_0x2d20('0x11'),_0x49fc03[_0x2d20('0x12')][_0x2d20('0x13')]),function(_0x30dd4c,_0x267a03,_0x3dad85){if(_0x30dd4c){return _0x7c1fc9(_0x30dd4c);}return _0x31d84d(_0x267a03);});})[_0x2d20('0xa')](function(_0x6029f7){var _0x124015=![];var _0x15098f=_0x6029f7['split'](/\n/);for(var _0x20a499=0x0,_0x3cc7ea=_0x5304db['length'];_0x20a499<_0x3cc7ea,_0x124015===![];_0x20a499+=0x1){if(_0x6029f7[_0x2d20('0x14')](_0x5304db[_0x20a499])>=0x0){_0x124015=!![];}}if(!_0x124015){throw new Error(util['format'](_0x2d20('0x15'),_0x49fc03['params'][_0x2d20('0x13')]));}process[_0x2d20('0x16')](_0x49fc03[_0x2d20('0x12')][_0x2d20('0x13')],_0x2d20('0x17'));return _0x27bee0[_0x2d20('0xb')](0xc8)[_0x2d20('0xc')]({'message':util[_0x2d20('0x10')]('Process\x20with\x20pid\x20%s\x20killed\x20correctly',_0x49fc03[_0x2d20('0x12')][_0x2d20('0x13')])});})[_0x2d20('0xd')](handleError(_0x27bee0,null,_0x2d20('0xe')));}; \ No newline at end of file diff --git a/server/api/tag/index.js b/server/api/tag/index.js index ea0be68..2f402bd 100644 --- a/server/api/tag/index.js +++ b/server/api/tag/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xe547=['exports','path','connect-timeout','express','Router','fs-extra','../../components/interaction/service','../../config/environment','./tag.controller','get','isAuthenticated','index','show','post','create','put','/:id','update','delete','destroy'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0xe547,0x191));var _0x7e54=function(_0x5636de,_0x26af5b){_0x5636de=_0x5636de-0x0;var _0x5933b8=_0xe547[_0x5636de];return _0x5933b8;};'use strict';var multer=require('multer');var util=require('util');var path=require(_0x7e54('0x0'));var timeout=require(_0x7e54('0x1'));var express=require(_0x7e54('0x2'));var router=express[_0x7e54('0x3')]();var fs_extra=require(_0x7e54('0x4'));var auth=require('../../components/auth/service');var interaction=require(_0x7e54('0x5'));var config=require(_0x7e54('0x6'));var controller=require(_0x7e54('0x7'));router[_0x7e54('0x8')]('/',auth[_0x7e54('0x9')](),controller[_0x7e54('0xa')]);router[_0x7e54('0x8')]('/:id',auth[_0x7e54('0x9')](),controller[_0x7e54('0xb')]);router[_0x7e54('0xc')]('/',auth[_0x7e54('0x9')](),controller[_0x7e54('0xd')]);router[_0x7e54('0xe')](_0x7e54('0xf'),auth[_0x7e54('0x9')](),controller[_0x7e54('0x10')]);router[_0x7e54('0x11')](_0x7e54('0xf'),auth[_0x7e54('0x9')](),controller[_0x7e54('0x12')]);module[_0x7e54('0x13')]=router; \ No newline at end of file +var _0x705f=['delete','destroy','util','path','connect-timeout','express','Router','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','./tag.controller','get','isAuthenticated','show','post','put','/:id','update'];(function(_0x81dcac,_0x8ff7db){var _0xc7803b=function(_0x499b29){while(--_0x499b29){_0x81dcac['push'](_0x81dcac['shift']());}};_0xc7803b(++_0x8ff7db);}(_0x705f,0x1f0));var _0xf705=function(_0x1155e6,_0x233e73){_0x1155e6=_0x1155e6-0x0;var _0x35dd79=_0x705f[_0x1155e6];return _0x35dd79;};'use strict';var multer=require('multer');var util=require(_0xf705('0x0'));var path=require(_0xf705('0x1'));var timeout=require(_0xf705('0x2'));var express=require(_0xf705('0x3'));var router=express[_0xf705('0x4')]();var fs_extra=require(_0xf705('0x5'));var auth=require(_0xf705('0x6'));var interaction=require(_0xf705('0x7'));var config=require(_0xf705('0x8'));var controller=require(_0xf705('0x9'));router[_0xf705('0xa')]('/',auth[_0xf705('0xb')](),controller['index']);router[_0xf705('0xa')]('/:id',auth[_0xf705('0xb')](),controller[_0xf705('0xc')]);router[_0xf705('0xd')]('/',auth[_0xf705('0xb')](),controller['create']);router[_0xf705('0xe')](_0xf705('0xf'),auth[_0xf705('0xb')](),controller[_0xf705('0x10')]);router[_0xf705('0x11')](_0xf705('0xf'),auth[_0xf705('0xb')](),controller[_0xf705('0x12')]);module['exports']=router; \ No newline at end of file diff --git a/server/api/tag/tag.attributes.js b/server/api/tag/tag.attributes.js index 511121f..03b7f17 100644 --- a/server/api/tag/tag.attributes.js +++ b/server/api/tag/tag.attributes.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x91b6=['exports','name','STRING','sequelize'];(function(_0x18a79d,_0x57bd2c){var _0x4f8848=function(_0x28af80){while(--_0x28af80){_0x18a79d['push'](_0x18a79d['shift']());}};_0x4f8848(++_0x57bd2c);}(_0x91b6,0x18b));var _0x691b=function(_0x41a5a0,_0x3bee12){_0x41a5a0=_0x41a5a0-0x0;var _0x2190f8=_0x91b6[_0x41a5a0];return _0x2190f8;};'use strict';var Sequelize=require(_0x691b('0x0'));module[_0x691b('0x1')]={'name':{'type':Sequelize['STRING'],'unique':_0x691b('0x2'),'allowNull':![],'validate':{'is':/[A-Za-z0-9._\\+*!-]+/,'notEmpty':!![]}},'color':{'type':Sequelize['STRING'],'defaultValue':'#0091EA'},'description':{'type':Sequelize[_0x691b('0x3')]}}; \ No newline at end of file +var _0x6c9c=['name','STRING','#0091EA','sequelize','exports'];(function(_0x36327c,_0x21f0dd){var _0x3a2681=function(_0x5c8461){while(--_0x5c8461){_0x36327c['push'](_0x36327c['shift']());}};_0x3a2681(++_0x21f0dd);}(_0x6c9c,0x12a));var _0xc6c9=function(_0x3abfb7,_0x38afa3){_0x3abfb7=_0x3abfb7-0x0;var _0x3f4ffd=_0x6c9c[_0x3abfb7];return _0x3f4ffd;};'use strict';var Sequelize=require(_0xc6c9('0x0'));module[_0xc6c9('0x1')]={'name':{'type':Sequelize['STRING'],'unique':_0xc6c9('0x2'),'allowNull':![],'validate':{'is':/[A-Za-z0-9._\\+*!-]+/,'notEmpty':!![]}},'color':{'type':Sequelize[_0xc6c9('0x3')],'defaultValue':_0xc6c9('0x4')},'description':{'type':Sequelize[_0xc6c9('0x3')]}}; \ No newline at end of file diff --git a/server/api/tag/tag.controller.js b/server/api/tag/tag.controller.js index d88b5ed..704d62b 100644 --- a/server/api/tag/tag.controller.js +++ b/server/api/tag/tag.controller.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xca66=['limit','count','set','Content-Range','json','apply','reject','save','update','destroy','then','get','Tags','UserProfileResource','sendStatus','error','name','index','map','Tag','fieldName','type','key','query','filters','intersection','attributes','model','fields','sort','pick','filter','where','merge','VIRTUAL','options','includeAll','findAll','rows','catch','show','keys','rawAttributes','length','include','find','create','user','role','UserProfileSection','userProfileId','autoAssociation','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','body','params','eml-format','fast-json-patch','request-promise','moment','mustache','path','to-csv','ejs','fs-extra','lodash','squel','crypto','jsforce','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/logger','api','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','status','end','offset','undefined'];(function(_0xb3b4b1,_0x11b2d8){var _0xdff458=function(_0xe6e421){while(--_0xe6e421){_0xb3b4b1['push'](_0xb3b4b1['shift']());}};_0xdff458(++_0x11b2d8);}(_0xca66,0x8b));var _0x6ca6=function(_0x561c53,_0x451432){_0x561c53=_0x561c53-0x0;var _0x4d5b94=_0xca66[_0x561c53];return _0x4d5b94;};'use strict';var emlformat=require(_0x6ca6('0x0'));var rimraf=require('rimraf');var zipdir=require('zip-dir');var jsonpatch=require(_0x6ca6('0x1'));var rp=require(_0x6ca6('0x2'));var moment=require(_0x6ca6('0x3'));var BPromise=require('bluebird');var Mustache=require(_0x6ca6('0x4'));var util=require('util');var path=require(_0x6ca6('0x5'));var sox=require('sox');var csv=require(_0x6ca6('0x6'));var ejs=require(_0x6ca6('0x7'));var fs=require('fs');var fs_extra=require(_0x6ca6('0x8'));var _=require(_0x6ca6('0x9'));var squel=require(_0x6ca6('0xa'));var crypto=require(_0x6ca6('0xb'));var jsforce=require(_0x6ca6('0xc'));var deskjs=require('desk.js');var toCsv=require(_0x6ca6('0x6'));var querystring=require(_0x6ca6('0xd'));var Papa=require(_0x6ca6('0xe'));var Redis=require(_0x6ca6('0xf'));var authService=require(_0x6ca6('0x10'));var qs=require(_0x6ca6('0x11'));var as=require(_0x6ca6('0x12'));var hardwareService=require('../../config/license/hardware');var logger=require(_0x6ca6('0x13'))(_0x6ca6('0x14'));var utils=require(_0x6ca6('0x15'));var config=require(_0x6ca6('0x16'));var licenseUtil=require(_0x6ca6('0x17'));var db=require(_0x6ca6('0x18'))['db'];function respondWithStatusCode(_0x4c05e9,_0x152e63){_0x152e63=_0x152e63||0xcc;return function(_0x38de67){if(_0x38de67){return _0x4c05e9['sendStatus'](_0x152e63);}return _0x4c05e9[_0x6ca6('0x19')](_0x152e63)[_0x6ca6('0x1a')]();};}function respondWithResult(_0x3f417f,_0x3570f1){_0x3570f1=_0x3570f1||0xc8;return function(_0xc774c){if(_0xc774c){return _0x3f417f[_0x6ca6('0x19')](_0x3570f1)['json'](_0xc774c);}};}function respondWithFilteredResult(_0x52c59a,_0x5785b1){return function(_0x36ff3e){if(_0x36ff3e){var _0x19e94f=typeof _0x5785b1[_0x6ca6('0x1b')]===_0x6ca6('0x1c')&&typeof _0x5785b1[_0x6ca6('0x1d')]===_0x6ca6('0x1c');var _0x25dc6c=_0x36ff3e['count'];var _0x2391ce=_0x19e94f?0x0:_0x5785b1[_0x6ca6('0x1b')];var _0xc97f0=_0x19e94f?_0x36ff3e[_0x6ca6('0x1e')]:_0x5785b1[_0x6ca6('0x1b')]+_0x5785b1[_0x6ca6('0x1d')];var _0x16a3d7;if(_0xc97f0>=_0x25dc6c){_0xc97f0=_0x25dc6c;_0x16a3d7=0xc8;}else{_0x16a3d7=0xce;}_0x52c59a[_0x6ca6('0x19')](_0x16a3d7);return _0x52c59a[_0x6ca6('0x1f')](_0x6ca6('0x20'),_0x2391ce+'-'+_0xc97f0+'/'+_0x25dc6c)[_0x6ca6('0x21')](_0x36ff3e);}return null;};}function patchUpdates(_0x4c3be9){return function(_0x28a982){try{jsonpatch[_0x6ca6('0x22')](_0x28a982,_0x4c3be9,!![]);}catch(_0x38cad4){return BPromise[_0x6ca6('0x23')](_0x38cad4);}return _0x28a982[_0x6ca6('0x24')]();};}function saveUpdates(_0x438694,_0x593f15){return function(_0xfb962d){if(_0xfb962d){return _0xfb962d[_0x6ca6('0x25')](_0x438694)['then'](function(_0x4927c1){return _0x4927c1;});}return null;};}function removeEntity(_0xfbf496,_0x216701){return function(_0xfe0760){if(_0xfe0760){return _0xfe0760[_0x6ca6('0x26')]()[_0x6ca6('0x27')](function(){var _0x541122=_0xfe0760[_0x6ca6('0x28')]({'plain':!![]});var _0x1d6caa=_0x6ca6('0x29');return db[_0x6ca6('0x2a')][_0x6ca6('0x26')]({'where':{'type':_0x1d6caa,'resourceId':_0x541122['id']}})[_0x6ca6('0x27')](function(){return _0xfe0760;});})[_0x6ca6('0x27')](function(){_0xfbf496[_0x6ca6('0x19')](0xcc)['end']();});}};}function handleEntityNotFound(_0x55b07f,_0x144ec5){return function(_0x9467bd){if(!_0x9467bd){_0x55b07f[_0x6ca6('0x2b')](0x194);}return _0x9467bd;};}function handleError(_0x141c0f,_0x552f3e){_0x552f3e=_0x552f3e||0x1f4;return function(_0x5ea6f7){logger[_0x6ca6('0x2c')](_0x5ea6f7['stack']);if(_0x5ea6f7['name']){delete _0x5ea6f7[_0x6ca6('0x2d')];}_0x141c0f[_0x6ca6('0x19')](_0x552f3e)['send'](_0x5ea6f7);};}exports[_0x6ca6('0x2e')]=function(_0xf829ee,_0xac50e8){var _0x566543={},_0x484411={},_0x28af50={'count':0x0,'rows':[]};var _0x23112a=_[_0x6ca6('0x2f')](db[_0x6ca6('0x30')]['rawAttributes'],function(_0x467a89){return{'name':_0x467a89[_0x6ca6('0x31')],'type':_0x467a89[_0x6ca6('0x32')][_0x6ca6('0x33')]};});_0x484411['model']=_['map'](_0x23112a,'name');_0x484411['query']=_['keys'](_0xf829ee[_0x6ca6('0x34')]);_0x484411[_0x6ca6('0x35')]=_[_0x6ca6('0x36')](_0x484411['model'],_0x484411[_0x6ca6('0x34')]);_0x566543[_0x6ca6('0x37')]=_[_0x6ca6('0x36')](_0x484411[_0x6ca6('0x38')],qs['fields'](_0xf829ee[_0x6ca6('0x34')][_0x6ca6('0x39')]));_0x566543[_0x6ca6('0x37')]=_0x566543[_0x6ca6('0x37')]['length']?_0x566543[_0x6ca6('0x37')]:_0x484411['model'];if(!_0xf829ee[_0x6ca6('0x34')]['hasOwnProperty']('nolimit')){_0x566543[_0x6ca6('0x1d')]=qs[_0x6ca6('0x1d')](_0xf829ee[_0x6ca6('0x34')][_0x6ca6('0x1d')]);_0x566543['offset']=qs['offset'](_0xf829ee[_0x6ca6('0x34')][_0x6ca6('0x1b')]);}_0x566543['order']=qs[_0x6ca6('0x3a')](_0xf829ee['query'][_0x6ca6('0x3a')]);_0x566543['where']=qs[_0x6ca6('0x35')](_[_0x6ca6('0x3b')](_0xf829ee[_0x6ca6('0x34')],_0x484411[_0x6ca6('0x35')]),_0x23112a);if(_0xf829ee[_0x6ca6('0x34')][_0x6ca6('0x3c')]){_0x566543[_0x6ca6('0x3d')]=_[_0x6ca6('0x3e')](_0x566543['where'],{'$or':_[_0x6ca6('0x2f')](_0x23112a,function(_0x4ac816){if(_0x4ac816['type']!==_0x6ca6('0x3f')){var _0x306eda={};_0x306eda[_0x4ac816['name']]={'$like':'%'+_0xf829ee[_0x6ca6('0x34')]['filter']+'%'};return _0x306eda;}})});}_0x566543=_[_0x6ca6('0x3e')]({},_0x566543,_0xf829ee[_0x6ca6('0x40')]);var _0x3f9e8f={'where':_0x566543[_0x6ca6('0x3d')]};return db['Tag']['count'](_0x3f9e8f)[_0x6ca6('0x27')](function(_0x3813d6){_0x28af50[_0x6ca6('0x1e')]=_0x3813d6;if(_0xf829ee[_0x6ca6('0x34')][_0x6ca6('0x41')]){_0x566543['include']=[{'all':!![]}];}return db[_0x6ca6('0x30')][_0x6ca6('0x42')](_0x566543);})['then'](function(_0x317b5e){_0x28af50[_0x6ca6('0x43')]=_0x317b5e;return _0x28af50;})[_0x6ca6('0x27')](respondWithFilteredResult(_0xac50e8,_0x566543))[_0x6ca6('0x44')](handleError(_0xac50e8,null));};exports[_0x6ca6('0x45')]=function(_0x3e658e,_0x258c76){var _0xe9bce9={'raw':!![],'where':{'id':_0x3e658e['params']['id']}},_0x1a8b7e={};_0x1a8b7e[_0x6ca6('0x38')]=_[_0x6ca6('0x46')](db[_0x6ca6('0x30')][_0x6ca6('0x47')]);_0x1a8b7e[_0x6ca6('0x34')]=_[_0x6ca6('0x46')](_0x3e658e[_0x6ca6('0x34')]);_0x1a8b7e[_0x6ca6('0x35')]=_['intersection'](_0x1a8b7e['model'],_0x1a8b7e[_0x6ca6('0x34')]);_0xe9bce9[_0x6ca6('0x37')]=_[_0x6ca6('0x36')](_0x1a8b7e[_0x6ca6('0x38')],qs[_0x6ca6('0x39')](_0x3e658e[_0x6ca6('0x34')][_0x6ca6('0x39')]));_0xe9bce9['attributes']=_0xe9bce9['attributes'][_0x6ca6('0x48')]?_0xe9bce9[_0x6ca6('0x37')]:_0x1a8b7e['model'];if(_0x3e658e[_0x6ca6('0x34')][_0x6ca6('0x41')]){_0xe9bce9[_0x6ca6('0x49')]=[{'all':!![]}];}_0xe9bce9=_[_0x6ca6('0x3e')]({},_0xe9bce9,_0x3e658e[_0x6ca6('0x40')]);return db[_0x6ca6('0x30')][_0x6ca6('0x4a')](_0xe9bce9)['then'](handleEntityNotFound(_0x258c76,null))[_0x6ca6('0x27')](respondWithResult(_0x258c76,null))[_0x6ca6('0x44')](handleError(_0x258c76,null));};exports[_0x6ca6('0x4b')]=function(_0x4fde51,_0x408df3){return db['Tag'][_0x6ca6('0x4b')](_0x4fde51['body'],{})['then'](function(_0x5da714){var _0x199489=_0x4fde51[_0x6ca6('0x4c')][_0x6ca6('0x28')]({'plain':!![]});if(!_0x199489)throw new Error('Unable\x20to\x20retrieve\x20the\x20current\x20user');if(_0x199489[_0x6ca6('0x4d')]==='user'){var _0x1f552d=_0x5da714[_0x6ca6('0x28')]({'plain':!![]});var _0xe0b775=_0x6ca6('0x29');return db[_0x6ca6('0x4e')][_0x6ca6('0x4a')]({'where':{'name':_0xe0b775,'userProfileId':_0x199489[_0x6ca6('0x4f')]},'raw':!![]})[_0x6ca6('0x27')](function(_0x2bd33e){if(_0x2bd33e&&_0x2bd33e[_0x6ca6('0x50')]===0x0){return db[_0x6ca6('0x2a')]['create']({'name':_0x1f552d[_0x6ca6('0x2d')],'resourceId':_0x1f552d['id'],'type':_0x2bd33e[_0x6ca6('0x2d')],'sectionId':_0x2bd33e['id']},{})[_0x6ca6('0x27')](function(){return _0x5da714;});}else{return _0x5da714;}})[_0x6ca6('0x44')](function(_0x11fda2){logger['error'](_0x6ca6('0x51'),_0x11fda2);throw _0x11fda2;});}return _0x5da714;})[_0x6ca6('0x27')](respondWithResult(_0x408df3,0xc9))[_0x6ca6('0x44')](handleError(_0x408df3,null));};exports['update']=function(_0x5490ce,_0x4fe7a9){if(_0x5490ce['body']['id']){delete _0x5490ce[_0x6ca6('0x52')]['id'];}return db[_0x6ca6('0x30')][_0x6ca6('0x4a')]({'where':{'id':_0x5490ce['params']['id']}})['then'](handleEntityNotFound(_0x4fe7a9,null))[_0x6ca6('0x27')](saveUpdates(_0x5490ce[_0x6ca6('0x52')],null))[_0x6ca6('0x27')](respondWithResult(_0x4fe7a9,null))['catch'](handleError(_0x4fe7a9,null));};exports[_0x6ca6('0x26')]=function(_0x57880d,_0x281759){return db[_0x6ca6('0x30')][_0x6ca6('0x4a')]({'where':{'id':_0x57880d[_0x6ca6('0x53')]['id']}})['then'](handleEntityNotFound(_0x281759,null))[_0x6ca6('0x27')](removeEntity(_0x281759,null))['catch'](handleError(_0x281759,null));}; \ No newline at end of file +var _0xe644=['type','options','includeAll','include','findAll','rows','show','params','keys','intersection','find','catch','create','body','user','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','UserProfileSection','userProfileId','UserProfileResource','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','mustache','util','path','sox','to-csv','ejs','lodash','squel','desk.js','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','api','../../config/utils','../../config/license/util','sendStatus','status','end','offset','undefined','limit','count','set','apply','reject','then','destroy','get','Tags','error','stack','name','send','index','map','Tag','rawAttributes','fieldName','key','model','query','filters','attributes','fields','length','hasOwnProperty','order','sort','filter','merge','where'];(function(_0x1928c9,_0x13a6d1){var _0x51b5fb=function(_0x24cf70){while(--_0x24cf70){_0x1928c9['push'](_0x1928c9['shift']());}};_0x51b5fb(++_0x13a6d1);}(_0xe644,0x159));var _0x4e64=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0xe644[_0x3dd15e];return _0x231fd0;};'use strict';var emlformat=require(_0x4e64('0x0'));var rimraf=require(_0x4e64('0x1'));var zipdir=require(_0x4e64('0x2'));var jsonpatch=require(_0x4e64('0x3'));var rp=require(_0x4e64('0x4'));var moment=require(_0x4e64('0x5'));var BPromise=require('bluebird');var Mustache=require(_0x4e64('0x6'));var util=require(_0x4e64('0x7'));var path=require(_0x4e64('0x8'));var sox=require(_0x4e64('0x9'));var csv=require(_0x4e64('0xa'));var ejs=require(_0x4e64('0xb'));var fs=require('fs');var fs_extra=require('fs-extra');var _=require(_0x4e64('0xc'));var squel=require(_0x4e64('0xd'));var crypto=require('crypto');var jsforce=require('jsforce');var deskjs=require(_0x4e64('0xe'));var toCsv=require('to-csv');var querystring=require('querystring');var Papa=require(_0x4e64('0xf'));var Redis=require(_0x4e64('0x10'));var authService=require(_0x4e64('0x11'));var qs=require(_0x4e64('0x12'));var as=require(_0x4e64('0x13'));var hardwareService=require(_0x4e64('0x14'));var logger=require('../../config/logger')(_0x4e64('0x15'));var utils=require(_0x4e64('0x16'));var config=require('../../config/environment');var licenseUtil=require(_0x4e64('0x17'));var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0x4c7ce0,_0x573e67){_0x573e67=_0x573e67||0xcc;return function(_0x4c1cf3){if(_0x4c1cf3){return _0x4c7ce0[_0x4e64('0x18')](_0x573e67);}return _0x4c7ce0[_0x4e64('0x19')](_0x573e67)[_0x4e64('0x1a')]();};}function respondWithResult(_0x2aa800,_0x352eca){_0x352eca=_0x352eca||0xc8;return function(_0xb36502){if(_0xb36502){return _0x2aa800[_0x4e64('0x19')](_0x352eca)['json'](_0xb36502);}};}function respondWithFilteredResult(_0x1d274c,_0x5573af){return function(_0x78cdc6){if(_0x78cdc6){var _0x5b35b0=typeof _0x5573af[_0x4e64('0x1b')]===_0x4e64('0x1c')&&typeof _0x5573af[_0x4e64('0x1d')]===_0x4e64('0x1c');var _0x2bbaaa=_0x78cdc6[_0x4e64('0x1e')];var _0x135ffb=_0x5b35b0?0x0:_0x5573af[_0x4e64('0x1b')];var _0x1be196=_0x5b35b0?_0x78cdc6[_0x4e64('0x1e')]:_0x5573af['offset']+_0x5573af[_0x4e64('0x1d')];var _0x112797;if(_0x1be196>=_0x2bbaaa){_0x1be196=_0x2bbaaa;_0x112797=0xc8;}else{_0x112797=0xce;}_0x1d274c['status'](_0x112797);return _0x1d274c[_0x4e64('0x1f')]('Content-Range',_0x135ffb+'-'+_0x1be196+'/'+_0x2bbaaa)['json'](_0x78cdc6);}return null;};}function patchUpdates(_0x18a1d3){return function(_0x120f14){try{jsonpatch[_0x4e64('0x20')](_0x120f14,_0x18a1d3,!![]);}catch(_0x4a97a4){return BPromise[_0x4e64('0x21')](_0x4a97a4);}return _0x120f14['save']();};}function saveUpdates(_0x30e356,_0x336c53){return function(_0x2df7a0){if(_0x2df7a0){return _0x2df7a0['update'](_0x30e356)[_0x4e64('0x22')](function(_0x58ea85){return _0x58ea85;});}return null;};}function removeEntity(_0x2431eb,_0x27d33e){return function(_0x445864){if(_0x445864){return _0x445864[_0x4e64('0x23')]()[_0x4e64('0x22')](function(){var _0x5abddb=_0x445864[_0x4e64('0x24')]({'plain':!![]});var _0x29b4f8=_0x4e64('0x25');return db['UserProfileResource'][_0x4e64('0x23')]({'where':{'type':_0x29b4f8,'resourceId':_0x5abddb['id']}})[_0x4e64('0x22')](function(){return _0x445864;});})[_0x4e64('0x22')](function(){_0x2431eb[_0x4e64('0x19')](0xcc)[_0x4e64('0x1a')]();});}};}function handleEntityNotFound(_0x5f0d42,_0x3185ba){return function(_0x2b1f2b){if(!_0x2b1f2b){_0x5f0d42[_0x4e64('0x18')](0x194);}return _0x2b1f2b;};}function handleError(_0x194f33,_0x39e5ed){_0x39e5ed=_0x39e5ed||0x1f4;return function(_0x1057d0){logger[_0x4e64('0x26')](_0x1057d0[_0x4e64('0x27')]);if(_0x1057d0['name']){delete _0x1057d0[_0x4e64('0x28')];}_0x194f33[_0x4e64('0x19')](_0x39e5ed)[_0x4e64('0x29')](_0x1057d0);};}exports[_0x4e64('0x2a')]=function(_0x3f00d5,_0x3b1f16){var _0x439b2f={},_0x4c4559={},_0x67698d={'count':0x0,'rows':[]};var _0x13c3e2=_[_0x4e64('0x2b')](db[_0x4e64('0x2c')][_0x4e64('0x2d')],function(_0x3d6cec){return{'name':_0x3d6cec[_0x4e64('0x2e')],'type':_0x3d6cec['type'][_0x4e64('0x2f')]};});_0x4c4559[_0x4e64('0x30')]=_[_0x4e64('0x2b')](_0x13c3e2,'name');_0x4c4559[_0x4e64('0x31')]=_['keys'](_0x3f00d5[_0x4e64('0x31')]);_0x4c4559[_0x4e64('0x32')]=_['intersection'](_0x4c4559['model'],_0x4c4559['query']);_0x439b2f[_0x4e64('0x33')]=_['intersection'](_0x4c4559[_0x4e64('0x30')],qs[_0x4e64('0x34')](_0x3f00d5[_0x4e64('0x31')][_0x4e64('0x34')]));_0x439b2f[_0x4e64('0x33')]=_0x439b2f[_0x4e64('0x33')][_0x4e64('0x35')]?_0x439b2f['attributes']:_0x4c4559[_0x4e64('0x30')];if(!_0x3f00d5['query'][_0x4e64('0x36')]('nolimit')){_0x439b2f['limit']=qs['limit'](_0x3f00d5[_0x4e64('0x31')]['limit']);_0x439b2f['offset']=qs[_0x4e64('0x1b')](_0x3f00d5[_0x4e64('0x31')][_0x4e64('0x1b')]);}_0x439b2f[_0x4e64('0x37')]=qs[_0x4e64('0x38')](_0x3f00d5[_0x4e64('0x31')][_0x4e64('0x38')]);_0x439b2f['where']=qs['filters'](_['pick'](_0x3f00d5[_0x4e64('0x31')],_0x4c4559[_0x4e64('0x32')]),_0x13c3e2);if(_0x3f00d5[_0x4e64('0x31')][_0x4e64('0x39')]){_0x439b2f['where']=_[_0x4e64('0x3a')](_0x439b2f[_0x4e64('0x3b')],{'$or':_[_0x4e64('0x2b')](_0x13c3e2,function(_0x2cea0f){if(_0x2cea0f[_0x4e64('0x3c')]!=='VIRTUAL'){var _0x4faf59={};_0x4faf59[_0x2cea0f[_0x4e64('0x28')]]={'$like':'%'+_0x3f00d5['query'][_0x4e64('0x39')]+'%'};return _0x4faf59;}})});}_0x439b2f=_[_0x4e64('0x3a')]({},_0x439b2f,_0x3f00d5[_0x4e64('0x3d')]);var _0x24e863={'where':_0x439b2f[_0x4e64('0x3b')]};return db[_0x4e64('0x2c')][_0x4e64('0x1e')](_0x24e863)['then'](function(_0x15ca67){_0x67698d[_0x4e64('0x1e')]=_0x15ca67;if(_0x3f00d5[_0x4e64('0x31')][_0x4e64('0x3e')]){_0x439b2f[_0x4e64('0x3f')]=[{'all':!![]}];}return db[_0x4e64('0x2c')][_0x4e64('0x40')](_0x439b2f);})[_0x4e64('0x22')](function(_0x496e6f){_0x67698d[_0x4e64('0x41')]=_0x496e6f;return _0x67698d;})[_0x4e64('0x22')](respondWithFilteredResult(_0x3b1f16,_0x439b2f))['catch'](handleError(_0x3b1f16,null));};exports[_0x4e64('0x42')]=function(_0x306b4d,_0x497f98){var _0xab75={'raw':!![],'where':{'id':_0x306b4d[_0x4e64('0x43')]['id']}},_0x1ddcf2={};_0x1ddcf2[_0x4e64('0x30')]=_[_0x4e64('0x44')](db['Tag'][_0x4e64('0x2d')]);_0x1ddcf2[_0x4e64('0x31')]=_[_0x4e64('0x44')](_0x306b4d[_0x4e64('0x31')]);_0x1ddcf2[_0x4e64('0x32')]=_[_0x4e64('0x45')](_0x1ddcf2[_0x4e64('0x30')],_0x1ddcf2[_0x4e64('0x31')]);_0xab75['attributes']=_['intersection'](_0x1ddcf2[_0x4e64('0x30')],qs[_0x4e64('0x34')](_0x306b4d[_0x4e64('0x31')]['fields']));_0xab75[_0x4e64('0x33')]=_0xab75[_0x4e64('0x33')][_0x4e64('0x35')]?_0xab75[_0x4e64('0x33')]:_0x1ddcf2[_0x4e64('0x30')];if(_0x306b4d['query'][_0x4e64('0x3e')]){_0xab75['include']=[{'all':!![]}];}_0xab75=_[_0x4e64('0x3a')]({},_0xab75,_0x306b4d[_0x4e64('0x3d')]);return db[_0x4e64('0x2c')][_0x4e64('0x46')](_0xab75)['then'](handleEntityNotFound(_0x497f98,null))[_0x4e64('0x22')](respondWithResult(_0x497f98,null))[_0x4e64('0x47')](handleError(_0x497f98,null));};exports[_0x4e64('0x48')]=function(_0x38a885,_0x32db0b){return db['Tag'][_0x4e64('0x48')](_0x38a885[_0x4e64('0x49')],{})[_0x4e64('0x22')](function(_0x1be224){var _0x2249fa=_0x38a885[_0x4e64('0x4a')]['get']({'plain':!![]});if(!_0x2249fa)throw new Error(_0x4e64('0x4b'));if(_0x2249fa[_0x4e64('0x4c')]===_0x4e64('0x4a')){var _0x4c2948=_0x1be224[_0x4e64('0x24')]({'plain':!![]});var _0x3cee8c='Tags';return db[_0x4e64('0x4d')]['find']({'where':{'name':_0x3cee8c,'userProfileId':_0x2249fa[_0x4e64('0x4e')]},'raw':!![]})['then'](function(_0x16d6fa){if(_0x16d6fa&&_0x16d6fa['autoAssociation']===0x0){return db[_0x4e64('0x4f')][_0x4e64('0x48')]({'name':_0x4c2948[_0x4e64('0x28')],'resourceId':_0x4c2948['id'],'type':_0x16d6fa[_0x4e64('0x28')],'sectionId':_0x16d6fa['id']},{})[_0x4e64('0x22')](function(){return _0x1be224;});}else{return _0x1be224;}})[_0x4e64('0x47')](function(_0x2d8682){logger['error'](_0x4e64('0x50'),_0x2d8682);throw _0x2d8682;});}return _0x1be224;})[_0x4e64('0x22')](respondWithResult(_0x32db0b,0xc9))[_0x4e64('0x47')](handleError(_0x32db0b,null));};exports['update']=function(_0x50cd6a,_0x9ddc22){if(_0x50cd6a['body']['id']){delete _0x50cd6a[_0x4e64('0x49')]['id'];}return db[_0x4e64('0x2c')][_0x4e64('0x46')]({'where':{'id':_0x50cd6a[_0x4e64('0x43')]['id']}})[_0x4e64('0x22')](handleEntityNotFound(_0x9ddc22,null))['then'](saveUpdates(_0x50cd6a['body'],null))[_0x4e64('0x22')](respondWithResult(_0x9ddc22,null))[_0x4e64('0x47')](handleError(_0x9ddc22,null));};exports[_0x4e64('0x23')]=function(_0x1a9dba,_0x3def87){return db[_0x4e64('0x2c')][_0x4e64('0x46')]({'where':{'id':_0x1a9dba[_0x4e64('0x43')]['id']}})['then'](handleEntityNotFound(_0x3def87,null))[_0x4e64('0x22')](removeEntity(_0x3def87,null))[_0x4e64('0x47')](handleError(_0x3def87,null));}; \ No newline at end of file diff --git a/server/api/tag/tag.model.js b/server/api/tag/tag.model.js index d3f089c..39952e9 100644 --- a/server/api/tag/tag.model.js +++ b/server/api/tag/tag.model.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xeaf3=['moment','bluebird','request-promise','path','rimraf','../../config/environment','./tag.attributes','exports','define','Tag','tools_tags','lodash','util','../../config/logger','api'];(function(_0x25e206,_0x1773c5){var _0x3208d4=function(_0x51b5d1){while(--_0x51b5d1){_0x25e206['push'](_0x25e206['shift']());}};_0x3208d4(++_0x1773c5);}(_0xeaf3,0x137));var _0x3eaf=function(_0x2a202c,_0x15f3ff){_0x2a202c=_0x2a202c-0x0;var _0x519e70=_0xeaf3[_0x2a202c];return _0x519e70;};'use strict';var _=require(_0x3eaf('0x0'));var util=require(_0x3eaf('0x1'));var logger=require(_0x3eaf('0x2'))(_0x3eaf('0x3'));var moment=require(_0x3eaf('0x4'));var BPromise=require(_0x3eaf('0x5'));var rp=require(_0x3eaf('0x6'));var fs=require('fs');var path=require(_0x3eaf('0x7'));var rimraf=require(_0x3eaf('0x8'));var config=require(_0x3eaf('0x9'));var attributes=require(_0x3eaf('0xa'));module[_0x3eaf('0xb')]=function(_0xbccd33,_0x1a1801){return _0xbccd33[_0x3eaf('0xc')](_0x3eaf('0xd'),attributes,{'tableName':_0x3eaf('0xe'),'paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file +var _0x2daf=['request-promise','path','rimraf','./tag.attributes','exports','define','Tag','tools_tags','../../config/logger','moment','bluebird'];(function(_0x47cfa0,_0x176b87){var _0x386b1d=function(_0x5785e5){while(--_0x5785e5){_0x47cfa0['push'](_0x47cfa0['shift']());}};_0x386b1d(++_0x176b87);}(_0x2daf,0xef));var _0xf2da=function(_0xa0ab99,_0x5496c1){_0xa0ab99=_0xa0ab99-0x0;var _0x3bf6b5=_0x2daf[_0xa0ab99];return _0x3bf6b5;};'use strict';var _=require('lodash');var util=require('util');var logger=require(_0xf2da('0x0'))('api');var moment=require(_0xf2da('0x1'));var BPromise=require(_0xf2da('0x2'));var rp=require(_0xf2da('0x3'));var fs=require('fs');var path=require(_0xf2da('0x4'));var rimraf=require(_0xf2da('0x5'));var config=require('../../config/environment');var attributes=require(_0xf2da('0x6'));module[_0xf2da('0x7')]=function(_0x349ec6,_0x464c15){return _0x349ec6[_0xf2da('0x8')](_0xf2da('0x9'),attributes,{'tableName':_0xf2da('0xa'),'paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file diff --git a/server/api/tag/tag.rpc.js b/server/api/tag/tag.rpc.js index 717a6b8..69c130c 100644 --- a/server/api/tag/tag.rpc.js +++ b/server/api/tag/tag.rpc.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x8d9b=['rpc','../../config/environment','request','then','info','Tag,\x20%s,\x20%s','request\x20sent','Tag,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','lodash','util','moment','bluebird','randomstring','../../config/utils'];(function(_0x14add3,_0x13ce8d){var _0x4a174f=function(_0x2b3ed7){while(--_0x2b3ed7){_0x14add3['push'](_0x14add3['shift']());}};_0x4a174f(++_0x13ce8d);}(_0x8d9b,0x104));var _0xb8d9=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0x8d9b[_0x3dd15e];return _0x231fd0;};'use strict';var _=require(_0xb8d9('0x0'));var util=require(_0xb8d9('0x1'));var moment=require(_0xb8d9('0x2'));var BPromise=require(_0xb8d9('0x3'));var rs=require(_0xb8d9('0x4'));var fs=require('fs');var Redis=require('ioredis');var db=require('../../mysqldb')['db'];var utils=require(_0xb8d9('0x5'));var logger=require('../../config/logger')(_0xb8d9('0x6'));var config=require(_0xb8d9('0x7'));var jayson=require('jayson/promise');var client=jayson['client']['http']({'port':0x232a});function respondWithRpcPromise(_0x21c87d,_0x537b18,_0x53339b){return new BPromise(function(_0x4c2b8f,_0x13352e){return client[_0xb8d9('0x8')](_0x21c87d,_0x53339b)[_0xb8d9('0x9')](function(_0x2189b1){logger[_0xb8d9('0xa')](_0xb8d9('0xb'),_0x537b18,_0xb8d9('0xc'));logger['debug'](_0xb8d9('0xd'),_0x537b18,'request\x20sent',JSON[_0xb8d9('0xe')](_0x2189b1));if(_0x2189b1[_0xb8d9('0xf')]){if(_0x2189b1[_0xb8d9('0xf')][_0xb8d9('0x10')]===0x1f4){logger[_0xb8d9('0xf')](_0xb8d9('0xb'),_0x537b18,_0x2189b1[_0xb8d9('0xf')][_0xb8d9('0x11')]);return _0x13352e(_0x2189b1[_0xb8d9('0xf')][_0xb8d9('0x11')]);}logger[_0xb8d9('0xf')](_0xb8d9('0xb'),_0x537b18,_0x2189b1[_0xb8d9('0xf')][_0xb8d9('0x11')]);return _0x4c2b8f(_0x2189b1['error'][_0xb8d9('0x11')]);}else{logger[_0xb8d9('0xa')](_0xb8d9('0xb'),_0x537b18,_0xb8d9('0xc'));_0x4c2b8f(_0x2189b1[_0xb8d9('0x12')]['message']);}})['catch'](function(_0x5b7d5a){logger[_0xb8d9('0xf')](_0xb8d9('0xb'),_0x537b18,_0x5b7d5a);_0x13352e(_0x5b7d5a);});});} \ No newline at end of file +var _0x2494=['../../config/utils','../../config/environment','client','http','info','Tag,\x20%s,\x20%s','request\x20sent','debug','Tag,\x20%s,\x20%s,\x20%s','error','message','lodash','moment','bluebird','randomstring','ioredis','../../mysqldb'];(function(_0x1a9fdd,_0x447a28){var _0x41e8e0=function(_0x11c53f){while(--_0x11c53f){_0x1a9fdd['push'](_0x1a9fdd['shift']());}};_0x41e8e0(++_0x447a28);}(_0x2494,0x82));var _0x4249=function(_0xed6d2b,_0x1cbc6e){_0xed6d2b=_0xed6d2b-0x0;var _0x4e2779=_0x2494[_0xed6d2b];return _0x4e2779;};'use strict';var _=require(_0x4249('0x0'));var util=require('util');var moment=require(_0x4249('0x1'));var BPromise=require(_0x4249('0x2'));var rs=require(_0x4249('0x3'));var fs=require('fs');var Redis=require(_0x4249('0x4'));var db=require(_0x4249('0x5'))['db'];var utils=require(_0x4249('0x6'));var logger=require('../../config/logger')('rpc');var config=require(_0x4249('0x7'));var jayson=require('jayson/promise');var client=jayson[_0x4249('0x8')][_0x4249('0x9')]({'port':0x232a});function respondWithRpcPromise(_0xed716a,_0x5b1b17,_0x326336){return new BPromise(function(_0x2b7934,_0x21060d){return client['request'](_0xed716a,_0x326336)['then'](function(_0x3efaa6){logger[_0x4249('0xa')](_0x4249('0xb'),_0x5b1b17,_0x4249('0xc'));logger[_0x4249('0xd')](_0x4249('0xe'),_0x5b1b17,_0x4249('0xc'),JSON['stringify'](_0x3efaa6));if(_0x3efaa6['error']){if(_0x3efaa6[_0x4249('0xf')]['code']===0x1f4){logger[_0x4249('0xf')](_0x4249('0xb'),_0x5b1b17,_0x3efaa6['error'][_0x4249('0x10')]);return _0x21060d(_0x3efaa6[_0x4249('0xf')]['message']);}logger[_0x4249('0xf')](_0x4249('0xb'),_0x5b1b17,_0x3efaa6[_0x4249('0xf')][_0x4249('0x10')]);return _0x2b7934(_0x3efaa6[_0x4249('0xf')][_0x4249('0x10')]);}else{logger['info'](_0x4249('0xb'),_0x5b1b17,_0x4249('0xc'));_0x2b7934(_0x3efaa6['result'][_0x4249('0x10')]);}})['catch'](function(_0x501e9c){logger['error'](_0x4249('0xb'),_0x5b1b17,_0x501e9c);_0x21060d(_0x501e9c);});});} \ No newline at end of file diff --git a/server/api/team/index.js b/server/api/team/index.js index d00e319..dca4630 100644 --- a/server/api/team/index.js +++ b/server/api/team/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xa9e0=['Router','../../components/auth/service','../../components/interaction/service','../../config/environment','./team.controller','get','index','/:id','getQueues','/:id/users','isAuthenticated','getAgents','post','addQueues','addAgents','update','delete','removeAgents','multer','util','path'];(function(_0x8c43de,_0x90ff31){var _0xa6591b=function(_0x469716){while(--_0x469716){_0x8c43de['push'](_0x8c43de['shift']());}};_0xa6591b(++_0x90ff31);}(_0xa9e0,0x123));var _0x0a9e=function(_0x5c351c,_0x2046d8){_0x5c351c=_0x5c351c-0x0;var _0x26f3b3=_0xa9e0[_0x5c351c];return _0x26f3b3;};'use strict';var multer=require(_0x0a9e('0x0'));var util=require(_0x0a9e('0x1'));var path=require(_0x0a9e('0x2'));var timeout=require('connect-timeout');var express=require('express');var router=express[_0x0a9e('0x3')]();var fs_extra=require('fs-extra');var auth=require(_0x0a9e('0x4'));var interaction=require(_0x0a9e('0x5'));var config=require(_0x0a9e('0x6'));var controller=require(_0x0a9e('0x7'));router[_0x0a9e('0x8')]('/',auth['isAuthenticated'](),controller[_0x0a9e('0x9')]);router[_0x0a9e('0x8')](_0x0a9e('0xa'),auth['isAuthenticated'](),controller['show']);router[_0x0a9e('0x8')]('/:id/queues',auth['isAuthenticated'](),controller[_0x0a9e('0xb')]);router[_0x0a9e('0x8')](_0x0a9e('0xc'),auth[_0x0a9e('0xd')](),controller[_0x0a9e('0xe')]);router[_0x0a9e('0xf')]('/',auth['isAuthenticated'](),controller['create']);router['post']('/:id/queues',auth[_0x0a9e('0xd')](),controller[_0x0a9e('0x10')]);router[_0x0a9e('0xf')](_0x0a9e('0xc'),auth[_0x0a9e('0xd')](),controller[_0x0a9e('0x11')]);router['put'](_0x0a9e('0xa'),auth[_0x0a9e('0xd')](),controller[_0x0a9e('0x12')]);router[_0x0a9e('0x13')](_0x0a9e('0xa'),auth[_0x0a9e('0xd')](),controller['destroy']);router[_0x0a9e('0x13')]('/:id/queues',auth[_0x0a9e('0xd')](),controller['removeQueues']);router[_0x0a9e('0x13')](_0x0a9e('0xc'),auth['isAuthenticated'](),controller[_0x0a9e('0x14')]);module['exports']=router; \ No newline at end of file +var _0xa9e0=['Router','../../components/auth/service','../../components/interaction/service','../../config/environment','./team.controller','get','index','/:id','getQueues','/:id/users','isAuthenticated','getAgents','post','addQueues','addAgents','update','delete','removeAgents','multer','util','path'];(function(_0x42cae2,_0x284ef8){var _0x5f256f=function(_0x41abc8){while(--_0x41abc8){_0x42cae2['push'](_0x42cae2['shift']());}};_0x5f256f(++_0x284ef8);}(_0xa9e0,0x123));var _0x0a9e=function(_0x56482c,_0x16118d){_0x56482c=_0x56482c-0x0;var _0x5aae7a=_0xa9e0[_0x56482c];return _0x5aae7a;};'use strict';var multer=require(_0x0a9e('0x0'));var util=require(_0x0a9e('0x1'));var path=require(_0x0a9e('0x2'));var timeout=require('connect-timeout');var express=require('express');var router=express[_0x0a9e('0x3')]();var fs_extra=require('fs-extra');var auth=require(_0x0a9e('0x4'));var interaction=require(_0x0a9e('0x5'));var config=require(_0x0a9e('0x6'));var controller=require(_0x0a9e('0x7'));router[_0x0a9e('0x8')]('/',auth['isAuthenticated'](),controller[_0x0a9e('0x9')]);router[_0x0a9e('0x8')](_0x0a9e('0xa'),auth['isAuthenticated'](),controller['show']);router[_0x0a9e('0x8')]('/:id/queues',auth['isAuthenticated'](),controller[_0x0a9e('0xb')]);router[_0x0a9e('0x8')](_0x0a9e('0xc'),auth[_0x0a9e('0xd')](),controller[_0x0a9e('0xe')]);router[_0x0a9e('0xf')]('/',auth['isAuthenticated'](),controller['create']);router['post']('/:id/queues',auth[_0x0a9e('0xd')](),controller[_0x0a9e('0x10')]);router[_0x0a9e('0xf')](_0x0a9e('0xc'),auth[_0x0a9e('0xd')](),controller[_0x0a9e('0x11')]);router['put'](_0x0a9e('0xa'),auth[_0x0a9e('0xd')](),controller[_0x0a9e('0x12')]);router[_0x0a9e('0x13')](_0x0a9e('0xa'),auth[_0x0a9e('0xd')](),controller['destroy']);router[_0x0a9e('0x13')]('/:id/queues',auth[_0x0a9e('0xd')](),controller['removeQueues']);router[_0x0a9e('0x13')](_0x0a9e('0xc'),auth['isAuthenticated'](),controller[_0x0a9e('0x14')]);module['exports']=router; \ No newline at end of file diff --git a/server/api/team/team.attributes.js b/server/api/team/team.attributes.js index 1c275e2..fcbdb22 100644 --- a/server/api/team/team.attributes.js +++ b/server/api/team/team.attributes.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xbaf0=['name','exports','STRING'];(function(_0xa30766,_0x6f613e){var _0x24e780=function(_0x3d58fb){while(--_0x3d58fb){_0xa30766['push'](_0xa30766['shift']());}};_0x24e780(++_0x6f613e);}(_0xbaf0,0x12a));var _0x0baf=function(_0x2f5ac5,_0x1ee939){_0x2f5ac5=_0x2f5ac5-0x0;var _0x37c9a8=_0xbaf0[_0x2f5ac5];return _0x37c9a8;};'use strict';var Sequelize=require('sequelize');module[_0x0baf('0x0')]={'name':{'type':Sequelize[_0x0baf('0x1')],'allowNull':![],'unique':_0x0baf('0x2')},'description':{'type':Sequelize[_0x0baf('0x1')]}}; \ No newline at end of file +var _0xb10b=['name','sequelize','STRING'];(function(_0x3c9c5a,_0x321c18){var _0x29b7e4=function(_0x8defc){while(--_0x8defc){_0x3c9c5a['push'](_0x3c9c5a['shift']());}};_0x29b7e4(++_0x321c18);}(_0xb10b,0x12a));var _0xbb10=function(_0x1c7502,_0x5d2c70){_0x1c7502=_0x1c7502-0x0;var _0x2165fa=_0xb10b[_0x1c7502];return _0x2165fa;};'use strict';var Sequelize=require(_0xbb10('0x0'));module['exports']={'name':{'type':Sequelize[_0xbb10('0x1')],'allowNull':![],'unique':_0xbb10('0x2')},'description':{'type':Sequelize[_0xbb10('0x1')]}}; \ No newline at end of file diff --git a/server/api/team/team.controller.js b/server/api/team/team.controller.js index 6dff5c0..e431d1a 100644 --- a/server/api/team/team.controller.js +++ b/server/api/team/team.controller.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x638e=['create','body','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','user','get','Teams','UserProfileSection','userProfileId','autoAssociation','UserProfileResource','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','update','params','sequelize','transaction','SELECT\x20UserId\x20FROM\x20user_has_teams\x20WHERE\x20TeamId\x20=\x20','Sequelize','QueryTypes','SELECT','UserId','SELECT\x20VoiceQueueId\x20FROM\x20team_has_voice_queues\x20WHERE\x20TeamId\x20=\x20','UserVoiceQueue','destroy','SELECT\x20MailQueueId\x20FROM\x20team_has_mail_queues\x20WHERE\x20TeamId\x20=\x20','MailQueueId','UserMailQueue','SELECT\x20SmsQueueId\x20FROM\x20team_has_sms_queues\x20WHERE\x20TeamId\x20=\x20','UserSmsQueue','SELECT\x20ChatQueueId\x20FROM\x20team_has_chat_queues\x20WHERE\x20TeamId\x20=\x20','ChatQueueId','UserChatQueue','FaxQueueId','UserFaxQueue','SELECT\x20OpenchannelQueueId\x20FROM\x20team_has_openchannel_queues\x20WHERE\x20TeamId\x20=\x20','OpenchannelQueueId','UserOpenchannelQueue','SELECT\x20WhatsappQueueId\x20FROM\x20team_has_whatsapp_queues\x20WHERE\x20TeamId\x20=\x20','UserWhatsappQueue','TeamVoicePrefix','UserVoicePrefix','VoicePrefixId','sendStatus','getQueues','findOne','isValidChannel','channel','ValidationError','Unknown\x20channel','capitalize','toLowerCase','Queue','sort','pick','Queues','addQueues','add','ids','removeQueues','remove','addAgents','isArray','Voice','Chat','Fax','Openchannel','Whatsapp','through','penalty','TeamVoiceQueue','User','findOrCreate','emit','Queue:save','QueueId','voicePause','interface','UserVoiceQueueRt','format','SIP/%s','all','upsert','removeAgents','Mail','Sms','getAgents','hasOwnProperty','rimraf','fast-json-patch','moment','bluebird','mustache','util','path','sox','to-csv','ejs','fs-extra','squel','crypto','jsforce','desk.js','querystring','papaparse','ioredis','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/logger','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','redis','defaults','socket.io-emitter','./team.socket','register','status','undefined','count','offset','limit','set','Content-Range','json','apply','reject','error','stack','send','index','map','rawAttributes','fieldName','type','model','name','query','attributes','fields','length','nolimit','order','where','filters','merge','VIRTUAL','filter','options','Team','then','includeAll','include','findAll','catch','show','keys','intersection','find'];(function(_0x4214e3,_0x5e08b0){var _0x590e68=function(_0x502b70){while(--_0x502b70){_0x4214e3['push'](_0x4214e3['shift']());}};_0x590e68(++_0x5e08b0);}(_0x638e,0x195));var _0xe638=function(_0x3d6137,_0x13d351){_0x3d6137=_0x3d6137-0x0;var _0x5daf34=_0x638e[_0x3d6137];return _0x5daf34;};'use strict';var emlformat=require('eml-format');var rimraf=require(_0xe638('0x0'));var zipdir=require('zip-dir');var jsonpatch=require(_0xe638('0x1'));var rp=require('request-promise');var moment=require(_0xe638('0x2'));var BPromise=require(_0xe638('0x3'));var Mustache=require(_0xe638('0x4'));var util=require(_0xe638('0x5'));var path=require(_0xe638('0x6'));var sox=require(_0xe638('0x7'));var csv=require(_0xe638('0x8'));var ejs=require(_0xe638('0x9'));var fs=require('fs');var fs_extra=require(_0xe638('0xa'));var _=require('lodash');var squel=require(_0xe638('0xb'));var crypto=require(_0xe638('0xc'));var jsforce=require(_0xe638('0xd'));var deskjs=require(_0xe638('0xe'));var toCsv=require(_0xe638('0x8'));var querystring=require(_0xe638('0xf'));var Papa=require(_0xe638('0x10'));var Redis=require(_0xe638('0x11'));var authService=require('../../components/auth/service');var qs=require(_0xe638('0x12'));var as=require(_0xe638('0x13'));var hardwareService=require('../../config/license/hardware');var logger=require(_0xe638('0x14'))('api');var utils=require(_0xe638('0x15'));var config=require(_0xe638('0x16'));var licenseUtil=require(_0xe638('0x17'));var db=require(_0xe638('0x18'))['db'];config[_0xe638('0x19')]=_[_0xe638('0x1a')](config['redis'],{'host':'localhost','port':0x18eb});var socket=require(_0xe638('0x1b'))(new Redis(config['redis']));require(_0xe638('0x1c'))[_0xe638('0x1d')](socket);function respondWithStatusCode(_0x317540,_0x51ac06){_0x51ac06=_0x51ac06||0xcc;return function(_0x13590e){if(_0x13590e){return _0x317540['sendStatus'](_0x51ac06);}return _0x317540['status'](_0x51ac06)['end']();};}function respondWithResult(_0x3e8575,_0x112766){_0x112766=_0x112766||0xc8;return function(_0xb781c2){if(_0xb781c2){return _0x3e8575[_0xe638('0x1e')](_0x112766)['json'](_0xb781c2);}};}function respondWithFilteredResult(_0x1dc9ee,_0x2bf25c){return function(_0x2a533b){if(_0x2a533b){var _0x2e5832=typeof _0x2bf25c['offset']===_0xe638('0x1f')&&typeof _0x2bf25c['limit']===_0xe638('0x1f');var _0x1e01f1=_0x2a533b[_0xe638('0x20')];var _0x477e86=_0x2e5832?0x0:_0x2bf25c[_0xe638('0x21')];var _0xe2a774=_0x2e5832?_0x2a533b[_0xe638('0x20')]:_0x2bf25c[_0xe638('0x21')]+_0x2bf25c[_0xe638('0x22')];var _0x54d289;if(_0xe2a774>=_0x1e01f1){_0xe2a774=_0x1e01f1;_0x54d289=0xc8;}else{_0x54d289=0xce;}_0x1dc9ee[_0xe638('0x1e')](_0x54d289);return _0x1dc9ee[_0xe638('0x23')](_0xe638('0x24'),_0x477e86+'-'+_0xe2a774+'/'+_0x1e01f1)[_0xe638('0x25')](_0x2a533b);}return null;};}function patchUpdates(_0x914486){return function(_0x3a043f){try{jsonpatch[_0xe638('0x26')](_0x3a043f,_0x914486,!![]);}catch(_0x5e35b6){return BPromise[_0xe638('0x27')](_0x5e35b6);}return _0x3a043f['save']();};}function saveUpdates(_0x5832b8,_0x47ff32){return function(_0x426d3b){if(_0x426d3b){return _0x426d3b['update'](_0x5832b8)['then'](function(_0x2e7699){return _0x2e7699;});}return null;};}function handleEntityNotFound(_0xcc5bb8,_0x3e9f97){return function(_0x241c76){if(!_0x241c76){_0xcc5bb8['sendStatus'](0x194);}return _0x241c76;};}function handleError(_0x27483d,_0x6e7381){_0x6e7381=_0x6e7381||0x1f4;return function(_0x3cef50){logger[_0xe638('0x28')](_0x3cef50[_0xe638('0x29')]);if(_0x3cef50['name']){delete _0x3cef50['name'];}_0x27483d['status'](_0x6e7381)[_0xe638('0x2a')](_0x3cef50);};}exports[_0xe638('0x2b')]=function(_0x27e793,_0xacd7be){var _0x4492bf={},_0x14b9e3={},_0x9f25cc={'count':0x0,'rows':[]};var _0x46386f=_[_0xe638('0x2c')](db['Team'][_0xe638('0x2d')],function(_0x1a5ab9){return{'name':_0x1a5ab9[_0xe638('0x2e')],'type':_0x1a5ab9[_0xe638('0x2f')]['key']};});_0x14b9e3[_0xe638('0x30')]=_[_0xe638('0x2c')](_0x46386f,_0xe638('0x31'));_0x14b9e3[_0xe638('0x32')]=_['keys'](_0x27e793[_0xe638('0x32')]);_0x14b9e3['filters']=_['intersection'](_0x14b9e3['model'],_0x14b9e3[_0xe638('0x32')]);_0x4492bf[_0xe638('0x33')]=_['intersection'](_0x14b9e3[_0xe638('0x30')],qs[_0xe638('0x34')](_0x27e793['query']['fields']));_0x4492bf['attributes']=_0x4492bf[_0xe638('0x33')][_0xe638('0x35')]?_0x4492bf[_0xe638('0x33')]:_0x14b9e3[_0xe638('0x30')];if(!_0x27e793[_0xe638('0x32')]['hasOwnProperty'](_0xe638('0x36'))){_0x4492bf[_0xe638('0x22')]=qs['limit'](_0x27e793['query'][_0xe638('0x22')]);_0x4492bf[_0xe638('0x21')]=qs['offset'](_0x27e793[_0xe638('0x32')][_0xe638('0x21')]);}_0x4492bf[_0xe638('0x37')]=qs['sort'](_0x27e793['query']['sort']);_0x4492bf[_0xe638('0x38')]=qs['filters'](_['pick'](_0x27e793[_0xe638('0x32')],_0x14b9e3[_0xe638('0x39')]),_0x46386f);if(_0x27e793[_0xe638('0x32')]['filter']){_0x4492bf[_0xe638('0x38')]=_[_0xe638('0x3a')](_0x4492bf['where'],{'$or':_[_0xe638('0x2c')](_0x46386f,function(_0xdc416e){if(_0xdc416e['type']!==_0xe638('0x3b')){var _0x566924={};_0x566924[_0xdc416e[_0xe638('0x31')]]={'$like':'%'+_0x27e793['query'][_0xe638('0x3c')]+'%'};return _0x566924;}})});}_0x4492bf=_[_0xe638('0x3a')]({},_0x4492bf,_0x27e793[_0xe638('0x3d')]);var _0x5e4c94={'where':_0x4492bf[_0xe638('0x38')]};return db[_0xe638('0x3e')]['count'](_0x5e4c94)[_0xe638('0x3f')](function(_0x2d2076){_0x9f25cc[_0xe638('0x20')]=_0x2d2076;if(_0x27e793[_0xe638('0x32')][_0xe638('0x40')]){_0x4492bf[_0xe638('0x41')]=[{'all':!![]}];}return db['Team'][_0xe638('0x42')](_0x4492bf);})[_0xe638('0x3f')](function(_0x50e828){_0x9f25cc['rows']=_0x50e828;return _0x9f25cc;})[_0xe638('0x3f')](respondWithFilteredResult(_0xacd7be,_0x4492bf))[_0xe638('0x43')](handleError(_0xacd7be,null));};exports[_0xe638('0x44')]=function(_0x470f00,_0x54f702){var _0x59fc75={'raw':![],'where':{'id':_0x470f00['params']['id']}},_0x3a3d41={};_0x3a3d41[_0xe638('0x30')]=_[_0xe638('0x45')](db['Team'][_0xe638('0x2d')]);_0x3a3d41[_0xe638('0x32')]=_[_0xe638('0x45')](_0x470f00[_0xe638('0x32')]);_0x3a3d41[_0xe638('0x39')]=_[_0xe638('0x46')](_0x3a3d41['model'],_0x3a3d41[_0xe638('0x32')]);_0x59fc75[_0xe638('0x33')]=_[_0xe638('0x46')](_0x3a3d41[_0xe638('0x30')],qs[_0xe638('0x34')](_0x470f00[_0xe638('0x32')][_0xe638('0x34')]));_0x59fc75[_0xe638('0x33')]=_0x59fc75['attributes'][_0xe638('0x35')]?_0x59fc75[_0xe638('0x33')]:_0x3a3d41[_0xe638('0x30')];if(_0x470f00[_0xe638('0x32')][_0xe638('0x40')]){_0x59fc75[_0xe638('0x41')]=[{'all':!![]}];}_0x59fc75=_[_0xe638('0x3a')]({},_0x59fc75,_0x470f00[_0xe638('0x3d')]);return db[_0xe638('0x3e')][_0xe638('0x47')](_0x59fc75)[_0xe638('0x3f')](handleEntityNotFound(_0x54f702,null))[_0xe638('0x3f')](respondWithResult(_0x54f702,null))[_0xe638('0x43')](handleError(_0x54f702,null));};exports[_0xe638('0x48')]=function(_0x1224e1,_0x42bac5){return db['Team'][_0xe638('0x48')](_0x1224e1[_0xe638('0x49')],{})[_0xe638('0x3f')](function(_0x2959bf){var _0x38f9c4=_0x1224e1['user']['get']({'plain':!![]});if(!_0x38f9c4)throw new Error(_0xe638('0x4a'));if(_0x38f9c4[_0xe638('0x4b')]===_0xe638('0x4c')){var _0x34e69e=_0x2959bf[_0xe638('0x4d')]({'plain':!![]});var _0x443866=_0xe638('0x4e');return db[_0xe638('0x4f')][_0xe638('0x47')]({'where':{'name':_0x443866,'userProfileId':_0x38f9c4[_0xe638('0x50')]},'raw':!![]})['then'](function(_0x30beaf){if(_0x30beaf&&_0x30beaf[_0xe638('0x51')]===0x0){return db[_0xe638('0x52')][_0xe638('0x48')]({'name':_0x34e69e['name'],'resourceId':_0x34e69e['id'],'type':_0x30beaf[_0xe638('0x31')],'sectionId':_0x30beaf['id']},{})[_0xe638('0x3f')](function(){return _0x2959bf;});}else{return _0x2959bf;}})[_0xe638('0x43')](function(_0x5b1c06){logger[_0xe638('0x28')](_0xe638('0x53'),_0x5b1c06);throw _0x5b1c06;});}return _0x2959bf;})[_0xe638('0x3f')](respondWithResult(_0x42bac5,0xc9))['catch'](handleError(_0x42bac5,null));};exports[_0xe638('0x54')]=function(_0x446867,_0x1d2bd9){if(_0x446867[_0xe638('0x49')]['id']){delete _0x446867[_0xe638('0x49')]['id'];}return db[_0xe638('0x3e')]['find']({'where':{'id':_0x446867[_0xe638('0x55')]['id']}})[_0xe638('0x3f')](handleEntityNotFound(_0x1d2bd9,null))['then'](saveUpdates(_0x446867[_0xe638('0x49')],null))['then'](respondWithResult(_0x1d2bd9,null))[_0xe638('0x43')](handleError(_0x1d2bd9,null));};exports['destroy']=function(_0x1a20ae,_0xeb0124){var _0x516b79=_0x1a20ae[_0xe638('0x55')]['id'];var _0x18b8f4=[];return db[_0xe638('0x56')][_0xe638('0x57')](function(_0x4cab55){var _0x44d5fe=_0xe638('0x58')+_0x516b79;return db[_0xe638('0x56')][_0xe638('0x32')](_0x44d5fe,{'type':db[_0xe638('0x59')][_0xe638('0x5a')][_0xe638('0x5b')],'raw':!![],'transaction':_0x4cab55})[_0xe638('0x3f')](function(_0x4e4453){_0x18b8f4=_[_0xe638('0x2c')](_0x4e4453,function(_0x337c3c){return Number(_0x337c3c[_0xe638('0x5c')]);});})[_0xe638('0x3f')](function(){var _0x12519d=_0xe638('0x5d')+_0x516b79;return db[_0xe638('0x56')]['query'](_0x12519d,{'type':db[_0xe638('0x59')][_0xe638('0x5a')]['SELECT'],'raw':!![],'transaction':_0x4cab55});})['then'](function(_0xd72159){var _0x2ec394=_[_0xe638('0x2c')](_0xd72159,function(_0x4c3ce7){return Number(_0x4c3ce7['VoiceQueueId']);});return db[_0xe638('0x5e')][_0xe638('0x5f')]({'where':{'UserId':{'$in':_0x18b8f4},'VoiceQueueId':{'$in':_0x2ec394}},'transaction':_0x4cab55});})[_0xe638('0x3f')](function(){var _0x5457b7=_0xe638('0x60')+_0x516b79;return db[_0xe638('0x56')][_0xe638('0x32')](_0x5457b7,{'type':db[_0xe638('0x59')][_0xe638('0x5a')][_0xe638('0x5b')],'raw':!![],'transaction':_0x4cab55});})[_0xe638('0x3f')](function(_0x23a55e){var _0x247cba=_[_0xe638('0x2c')](_0x23a55e,function(_0x4acfac){return Number(_0x4acfac[_0xe638('0x61')]);});return db[_0xe638('0x62')][_0xe638('0x5f')]({'where':{'UserId':{'$in':_0x18b8f4},'MailQueueId':{'$in':_0x247cba}},'transaction':_0x4cab55});})[_0xe638('0x3f')](function(){var _0x4ada5a=_0xe638('0x63')+_0x516b79;return db['sequelize']['query'](_0x4ada5a,{'type':db[_0xe638('0x59')]['QueryTypes'][_0xe638('0x5b')],'raw':!![],'transaction':_0x4cab55});})[_0xe638('0x3f')](function(_0x51a0dc){var _0x3b9c35=_[_0xe638('0x2c')](_0x51a0dc,function(_0x3aab61){return Number(_0x3aab61['SmsQueueId']);});return db[_0xe638('0x64')][_0xe638('0x5f')]({'where':{'UserId':{'$in':_0x18b8f4},'SmsQueueId':{'$in':_0x3b9c35}},'transaction':_0x4cab55});})[_0xe638('0x3f')](function(){var _0x330b79=_0xe638('0x65')+_0x516b79;return db[_0xe638('0x56')][_0xe638('0x32')](_0x330b79,{'type':db[_0xe638('0x59')][_0xe638('0x5a')][_0xe638('0x5b')],'raw':!![],'transaction':_0x4cab55});})['then'](function(_0x344cdb){var _0xe03259=_[_0xe638('0x2c')](_0x344cdb,function(_0x1015a6){return Number(_0x1015a6[_0xe638('0x66')]);});return db[_0xe638('0x67')][_0xe638('0x5f')]({'where':{'UserId':{'$in':_0x18b8f4},'ChatQueueId':{'$in':_0xe03259}},'transaction':_0x4cab55});})[_0xe638('0x3f')](function(){var _0x3dadca='SELECT\x20FaxQueueId\x20FROM\x20team_has_fax_queues\x20WHERE\x20TeamId\x20=\x20'+_0x516b79;return db[_0xe638('0x56')][_0xe638('0x32')](_0x3dadca,{'type':db[_0xe638('0x59')][_0xe638('0x5a')][_0xe638('0x5b')],'raw':!![],'transaction':_0x4cab55});})[_0xe638('0x3f')](function(_0x1620ae){var _0x28de76=_[_0xe638('0x2c')](_0x1620ae,function(_0x2846b7){return Number(_0x2846b7[_0xe638('0x68')]);});return db[_0xe638('0x69')]['destroy']({'where':{'UserId':{'$in':_0x18b8f4},'FaxQueueId':{'$in':_0x28de76}},'transaction':_0x4cab55});})[_0xe638('0x3f')](function(){var _0x48a587=_0xe638('0x6a')+_0x516b79;return db[_0xe638('0x56')][_0xe638('0x32')](_0x48a587,{'type':db['Sequelize'][_0xe638('0x5a')][_0xe638('0x5b')],'raw':!![],'transaction':_0x4cab55});})[_0xe638('0x3f')](function(_0x4d6e6a){var _0x36cf42=_[_0xe638('0x2c')](_0x4d6e6a,function(_0x436b95){return Number(_0x436b95[_0xe638('0x6b')]);});return db[_0xe638('0x6c')][_0xe638('0x5f')]({'where':{'UserId':{'$in':_0x18b8f4},'OpenchannelQueueId':{'$in':_0x36cf42}},'transaction':_0x4cab55});})['then'](function(){var _0x195965=_0xe638('0x6d')+_0x516b79;return db[_0xe638('0x56')]['query'](_0x195965,{'type':db[_0xe638('0x59')]['QueryTypes']['SELECT'],'raw':!![],'transaction':_0x4cab55});})[_0xe638('0x3f')](function(_0x5a48ad){var _0x3e3caa=_['map'](_0x5a48ad,function(_0x551dd9){return Number(_0x551dd9['WhatsappQueueId']);});return db[_0xe638('0x6e')][_0xe638('0x5f')]({'where':{'UserId':{'$in':_0x18b8f4},'WhatsappQueueId':{'$in':_0x3e3caa}},'transaction':_0x4cab55});})['then'](function(){return db[_0xe638('0x6f')]['find']({'where':{'TeamId':_0x516b79}});})['then'](function(_0x231f01){if(_0x231f01===null){return;}return db[_0xe638('0x70')][_0xe638('0x5f')]({'where':{'UserId':{'$in':_0x18b8f4},'VoicePrefixId':_0x231f01[_0xe638('0x71')]},'transaction':_0x4cab55});})[_0xe638('0x3f')](function(){return db[_0xe638('0x3e')][_0xe638('0x5f')]({'where':{'id':_0x516b79},'cascade':!![],'transaction':_0x4cab55});})[_0xe638('0x3f')](function(_0xea8283){if(_0xea8283===0x0){_0xeb0124[_0xe638('0x72')](0x194);}else{return db[_0xe638('0x52')][_0xe638('0x5f')]({'where':{'type':_0xe638('0x4e'),'resourceId':_0x516b79},'cascade':!![],'transaction':_0x4cab55})[_0xe638('0x3f')](function(){_0xeb0124[_0xe638('0x1e')](0xcc)['end']();});}})[_0xe638('0x43')](function(_0x3e72c6){_0xeb0124[_0xe638('0x1e')](0x1f4)[_0xe638('0x2a')](_0x3e72c6);});});};exports[_0xe638('0x73')]=function(_0x4e46ab,_0x5eac1e,_0x547392){return db[_0xe638('0x3e')][_0xe638('0x74')]({'where':{'id':_0x4e46ab[_0xe638('0x55')]['id']}})[_0xe638('0x3f')](handleEntityNotFound(_0x5eac1e,null))[_0xe638('0x3f')](function(_0x39a7cf){if(!_0x4e46ab[_0xe638('0x32')]['channel']||!utils[_0xe638('0x75')](_0x4e46ab[_0xe638('0x32')][_0xe638('0x76')])){throw new db[(_0xe638('0x59'))][(_0xe638('0x77'))](_0xe638('0x78'));}var _0x575f96={};var _0x388054={};_0x388054[_0xe638('0x30')]=_[_0xe638('0x45')](db[_[_0xe638('0x79')](_0x4e46ab[_0xe638('0x32')][_0xe638('0x76')][_0xe638('0x7a')]())+_0xe638('0x7b')][_0xe638('0x2d')]);_0x388054[_0xe638('0x32')]=_[_0xe638('0x45')](_0x4e46ab[_0xe638('0x32')]);_0x388054[_0xe638('0x39')]=_['intersection'](_0x388054[_0xe638('0x30')],_0x388054[_0xe638('0x32')]);_0x575f96['attributes']=_[_0xe638('0x46')](_0x388054[_0xe638('0x30')],qs[_0xe638('0x34')](_0x4e46ab['query']['fields']));_0x575f96[_0xe638('0x33')]=_0x575f96['attributes'][_0xe638('0x35')]?_0x575f96[_0xe638('0x33')]:_0x388054[_0xe638('0x30')];_0x575f96[_0xe638('0x22')]=qs[_0xe638('0x22')](_0x4e46ab[_0xe638('0x32')]['limit']);_0x575f96[_0xe638('0x21')]=qs[_0xe638('0x21')](_0x4e46ab['query'][_0xe638('0x21')]);_0x575f96[_0xe638('0x37')]=qs[_0xe638('0x7c')](_0x4e46ab[_0xe638('0x32')]['sort']);_0x575f96[_0xe638('0x38')]=qs[_0xe638('0x39')](_[_0xe638('0x7d')](_0x4e46ab[_0xe638('0x32')],_0x388054[_0xe638('0x39')]));_0x575f96=_['merge']({},_0x575f96,_0x4e46ab[_0xe638('0x3d')]);return _0x39a7cf[_0xe638('0x4d')+_['capitalize'](_0x4e46ab[_0xe638('0x32')][_0xe638('0x76')]['toLowerCase']())+_0xe638('0x7e')](_0x575f96);})['then'](respondWithResult(_0x5eac1e,null))['catch'](handleError(_0x5eac1e,null));};exports[_0xe638('0x7f')]=function(_0x90897a,_0x65c8c7,_0xe189ed){return db['Team'][_0xe638('0x74')]({'where':{'id':_0x90897a[_0xe638('0x55')]['id']}})['then'](function(_0x377ded){if(_0x377ded){if(!_0x90897a[_0xe638('0x49')][_0xe638('0x76')]||!utils['isValidChannel'](_0x90897a['body'][_0xe638('0x76')])){throw new db[(_0xe638('0x59'))][(_0xe638('0x77'))](_0xe638('0x78'));}return _0x377ded[_0xe638('0x80')+_['capitalize'](_0x90897a[_0xe638('0x49')]['channel']['toLowerCase']())+_0xe638('0x7e')](_0x90897a[_0xe638('0x49')][_0xe638('0x81')]);}return null;})['then'](handleEntityNotFound(_0x65c8c7,null))[_0xe638('0x3f')](respondWithStatusCode(_0x65c8c7,null))[_0xe638('0x43')](handleError(_0x65c8c7,null));};exports[_0xe638('0x82')]=function(_0x3e267d,_0x10c4c6,_0x2c18c3){return db[_0xe638('0x3e')][_0xe638('0x74')]({'where':{'id':_0x3e267d[_0xe638('0x55')]['id']}})[_0xe638('0x3f')](function(_0x2694d5){if(_0x2694d5){if(!_0x3e267d[_0xe638('0x32')][_0xe638('0x76')]||!utils[_0xe638('0x75')](_0x3e267d[_0xe638('0x32')][_0xe638('0x76')])){throw new db[(_0xe638('0x59'))][(_0xe638('0x77'))]('Unknown\x20channel');}return _0x2694d5[_0xe638('0x83')+_['capitalize'](_0x3e267d['query'][_0xe638('0x76')][_0xe638('0x7a')]())+_0xe638('0x7e')](_0x3e267d['query'][_0xe638('0x81')]);}return null;})[_0xe638('0x3f')](handleEntityNotFound(_0x10c4c6,null))[_0xe638('0x3f')](respondWithStatusCode(_0x10c4c6,null))[_0xe638('0x43')](handleError(_0x10c4c6,null));};exports[_0xe638('0x84')]=function(_0x12ce97,_0x38a031){var _0x596ac6=_[_0xe638('0x85')](_0x12ce97[_0xe638('0x49')][_0xe638('0x81')])?_0x12ce97['body'][_0xe638('0x81')]:[_0x12ce97['body'][_0xe638('0x81')]];var _0x34f160=_0x12ce97[_0xe638('0x55')]['id'];return db['Team'][_0xe638('0x47')]({'where':{'id':_0x34f160}})[_0xe638('0x3f')](handleEntityNotFound(_0x38a031,null))[_0xe638('0x3f')](function(_0x45f1f2){if(_0x45f1f2){var _0x2b0c47=[_0xe638('0x86'),_0xe638('0x87'),'Mail','Sms',_0xe638('0x88'),_0xe638('0x89'),_0xe638('0x8a')];return db[_0xe638('0x56')]['transaction'](function(_0x2a165d){var _0x59682b=_[_0xe638('0x2c')](_0x2b0c47,function(_0x2419e5){var _0x3be847={'attributes':['id',_0xe638('0x31')]};if(_0x2419e5===_0xe638('0x86')){_0x3be847[_0xe638('0x8b')]={'attributes':[_0xe638('0x8c')]};}return _0x45f1f2['get'+_0x2419e5+_0xe638('0x7e')](_0x3be847)[_0xe638('0x3f')](function(_0xc88f0){var _0x849a81=_[_0xe638('0x2c')](_0xc88f0,function(_0x4d55df){var _0x430dd8=_['map'](_0x596ac6,function(_0x2524ff){var _0x4fd916={'where':{'UserId':_0x2524ff,[_0x2419e5+'QueueId']:_0x4d55df['id']},'transaction':_0x2a165d};if(_0x2419e5===_0xe638('0x86')){_0x4fd916['defaults']={'penalty':_0x4d55df[_0xe638('0x8d')][_0xe638('0x8c')]};}return db[_0xe638('0x8e')+_0x2419e5+_0xe638('0x7b')][_0xe638('0x8f')](_0x4fd916)[_0xe638('0x3f')](function(){socket[_0xe638('0x90')](_0xe638('0x4c')+_0x2419e5+_0xe638('0x91'),{'UserId':_0x2524ff,[_0x2419e5+_0xe638('0x92')]:_0x4d55df['id']});if(_0x2419e5!=='Voice'){return;}return db['User'][_0xe638('0x42')]({'where':{'id':_0x596ac6,'online':0x1},'attributes':['id',_0xe638('0x31'),'online',_0xe638('0x93'),_0xe638('0x94')],'raw':!![]})[_0xe638('0x3f')](function(_0x57446a){var _0x20f622=_[_0xe638('0x2c')](_0x57446a,function(_0x36bb2c){return db[_0xe638('0x95')]['upsert']({'membername':_0x36bb2c[_0xe638('0x31')],'UserId':_0x36bb2c['id'],'queue_name':_0x4d55df[_0xe638('0x31')],'VoiceQueueId':_0x4d55df['id'],'interface':_['isNil'](_0x36bb2c[_0xe638('0x94')])?util[_0xe638('0x96')](_0xe638('0x97'),_0x36bb2c[_0xe638('0x31')]):_0x36bb2c[_0xe638('0x94')],'paused':_0x36bb2c['voicePause']||![],'penalty':_0x4d55df[_0xe638('0x8d')][_0xe638('0x8c')]},{'transaction':_0x2a165d});});return Promise[_0xe638('0x98')](_0x20f622);});});});return Promise[_0xe638('0x98')](_0x430dd8);});return Promise[_0xe638('0x98')](_0x849a81);})[_0xe638('0x3f')](function(){return db[_0xe638('0x6f')][_0xe638('0x74')]({'where':{'teamId':_0x34f160}})[_0xe638('0x3f')](function(_0x3b0845){if(_0x3b0845){var _0x972651=_[_0xe638('0x2c')](_0x596ac6,function(_0x262187){db[_0xe638('0x70')][_0xe638('0x99')]({'UserId':_0x262187,'VoicePrefixId':_0x3b0845[_0xe638('0x71')]});});return Promise[_0xe638('0x98')](_0x972651);}});});});return Promise[_0xe638('0x98')](_0x59682b)[_0xe638('0x3f')](function(){return _0x45f1f2[_0xe638('0x84')](_0x596ac6,{'transaction':_0x2a165d})['spread'](function(_0x11bd7d){return _0x11bd7d;});});});}})[_0xe638('0x3f')](respondWithResult(_0x38a031,null))['catch'](handleError(_0x38a031,null));};exports[_0xe638('0x9a')]=function(_0x478d20,_0x32a77d){var _0x4066c1=_[_0xe638('0x85')](_0x478d20['query'][_0xe638('0x81')])?_0x478d20[_0xe638('0x32')][_0xe638('0x81')]:[_0x478d20[_0xe638('0x32')][_0xe638('0x81')]];var _0x3ebc9d=_0x478d20[_0xe638('0x55')]['id'];return db[_0xe638('0x3e')][_0xe638('0x47')]({'where':{'id':_0x3ebc9d}})[_0xe638('0x3f')](handleEntityNotFound(_0x32a77d,null))['then'](function(_0x312e12){if(_0x312e12){var _0x5f2dfc=['Voice',_0xe638('0x87'),_0xe638('0x9b'),_0xe638('0x9c'),_0xe638('0x88'),_0xe638('0x89'),_0xe638('0x8a')];return db[_0xe638('0x56')][_0xe638('0x57')](function(_0x153b70){var _0x34727d=_[_0xe638('0x2c')](_0x5f2dfc,function(_0x1b58e0){var _0x728142={'attributes':['id',_0xe638('0x31')]};return _0x312e12[_0xe638('0x4d')+_0x1b58e0+_0xe638('0x7e')](_0x728142)[_0xe638('0x3f')](function(_0x4ff34c){var _0x2a4f63=_[_0xe638('0x2c')](_0x4ff34c,function(_0x458a5c){return _0x458a5c['removeAgents'](_0x4066c1,{'transaction':_0x153b70})[_0xe638('0x3f')](function(){var _0x1ef576=_[_0xe638('0x2c')](_0x4066c1,function(_0xacc596){socket['emit'](_0xe638('0x4c')+_0x1b58e0+'Queue:remove',{'UserId':Number(_0xacc596),[_0x1b58e0+'QueueId']:_0x458a5c['id']});if(_0x1b58e0!=='Voice'){return;}return db[_0xe638('0x95')][_0xe638('0x5f')]({'where':{'VoiceQueueId':_0x458a5c['id'],'UserId':_0xacc596},'transaction':_0x153b70});});return Promise[_0xe638('0x98')](_0x1ef576);});});return Promise[_0xe638('0x98')](_0x2a4f63);});});return Promise[_0xe638('0x98')](_0x34727d)['then'](function(){return _0x312e12['removeAgents'](_0x4066c1,{'transaction':_0x153b70});})[_0xe638('0x3f')](function(){return db[_0xe638('0x6f')]['findOne']({'where':{'teamId':_0x3ebc9d}})[_0xe638('0x3f')](function(_0x1ea4f6){if(_0x1ea4f6){var _0xd1b444=_[_0xe638('0x2c')](_0x4066c1,function(_0x1f5ca8){db[_0xe638('0x70')][_0xe638('0x5f')]({'where':{'UserId':_0x1f5ca8,'VoicePrefixId':_0x1ea4f6[_0xe638('0x71')]}});});return Promise['all'](_0xd1b444);}});});});}})[_0xe638('0x3f')](respondWithStatusCode(_0x32a77d,null))[_0xe638('0x43')](handleError(_0x32a77d,null));};exports['getAgents']=function(_0xfc4e2e,_0x121895,_0x1bf39e){var _0x888c32={};var _0x5d8980={};var _0xeeb46b;var _0x56ecf2;return db[_0xe638('0x3e')][_0xe638('0x74')]({'where':{'id':_0xfc4e2e[_0xe638('0x55')]['id']}})['then'](handleEntityNotFound(_0x121895,null))[_0xe638('0x3f')](function(_0x96fd14){if(_0x96fd14){_0xeeb46b=_0x96fd14;_0x5d8980[_0xe638('0x30')]=_[_0xe638('0x45')](db[_0xe638('0x8e')]['rawAttributes']);_0x5d8980[_0xe638('0x32')]=_['keys'](_0xfc4e2e[_0xe638('0x32')]);_0x5d8980[_0xe638('0x39')]=_[_0xe638('0x46')](_0x5d8980[_0xe638('0x30')],_0x5d8980[_0xe638('0x32')]);_0x888c32[_0xe638('0x33')]=_[_0xe638('0x46')](_0x5d8980[_0xe638('0x30')],qs[_0xe638('0x34')](_0xfc4e2e[_0xe638('0x32')][_0xe638('0x34')]));_0x888c32[_0xe638('0x33')]=_0x888c32[_0xe638('0x33')]['length']?_0x888c32[_0xe638('0x33')]:_0x5d8980['model'];_0x888c32[_0xe638('0x37')]=qs[_0xe638('0x7c')](_0xfc4e2e[_0xe638('0x32')][_0xe638('0x7c')]);_0x888c32[_0xe638('0x38')]=qs['filters'](_[_0xe638('0x7d')](_0xfc4e2e['query'],_0x5d8980[_0xe638('0x39')]));if(_0xfc4e2e[_0xe638('0x32')][_0xe638('0x3c')]){_0x888c32[_0xe638('0x38')]=_[_0xe638('0x3a')](_0x888c32[_0xe638('0x38')],{'$or':_[_0xe638('0x2c')](_0x888c32[_0xe638('0x33')],function(_0x4c84ec){var _0x1ec75d={};_0x1ec75d[_0x4c84ec]={'$like':'%'+_0xfc4e2e[_0xe638('0x32')][_0xe638('0x3c')]+'%'};return _0x1ec75d;})});}_0x888c32=_['merge']({},_0x888c32,_0xfc4e2e['options']);return _0xeeb46b[_0xe638('0x9d')](_0x888c32);}})[_0xe638('0x3f')](function(_0x346b0c){if(_0x346b0c){_0x56ecf2=_0x346b0c[_0xe638('0x35')];if(!_0xfc4e2e[_0xe638('0x32')][_0xe638('0x9e')](_0xe638('0x36'))){_0x888c32['limit']=qs['limit'](_0xfc4e2e[_0xe638('0x32')][_0xe638('0x22')]);_0x888c32['offset']=qs[_0xe638('0x21')](_0xfc4e2e[_0xe638('0x32')][_0xe638('0x21')]);}return _0xeeb46b['getAgents'](_0x888c32);}})['then'](function(_0x3691ec){if(_0x3691ec){return _0x3691ec?{'count':_0x56ecf2,'rows':_0x3691ec}:null;}})[_0xe638('0x3f')](respondWithResult(_0x121895,null))['catch'](handleError(_0x121895,null));}; \ No newline at end of file +var _0xa870=['undefined','count','offset','set','Content-Range','json','apply','update','then','error','stack','name','send','index','map','Team','rawAttributes','type','key','query','keys','filters','model','attributes','fields','length','hasOwnProperty','limit','sort','pick','filter','where','merge','VIRTUAL','options','includeAll','rows','show','params','intersection','include','create','body','get','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','user','Teams','UserProfileSection','find','userProfileId','UserProfileResource','catch','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','sequelize','transaction','SELECT\x20UserId\x20FROM\x20user_has_teams\x20WHERE\x20TeamId\x20=\x20','QueryTypes','SELECT','SELECT\x20VoiceQueueId\x20FROM\x20team_has_voice_queues\x20WHERE\x20TeamId\x20=\x20','Sequelize','VoiceQueueId','UserVoiceQueue','SELECT\x20MailQueueId\x20FROM\x20team_has_mail_queues\x20WHERE\x20TeamId\x20=\x20','MailQueueId','UserMailQueue','destroy','SELECT\x20SmsQueueId\x20FROM\x20team_has_sms_queues\x20WHERE\x20TeamId\x20=\x20','SmsQueueId','SELECT\x20ChatQueueId\x20FROM\x20team_has_chat_queues\x20WHERE\x20TeamId\x20=\x20','ChatQueueId','SELECT\x20FaxQueueId\x20FROM\x20team_has_fax_queues\x20WHERE\x20TeamId\x20=\x20','FaxQueueId','SELECT\x20OpenchannelQueueId\x20FROM\x20team_has_openchannel_queues\x20WHERE\x20TeamId\x20=\x20','UserOpenchannelQueue','SELECT\x20WhatsappQueueId\x20FROM\x20team_has_whatsapp_queues\x20WHERE\x20TeamId\x20=\x20','WhatsappQueueId','UserWhatsappQueue','TeamVoicePrefix','UserVoicePrefix','getQueues','channel','isValidChannel','ValidationError','Unknown\x20channel','toLowerCase','Queue','order','Queues','addQueues','findOne','add','capitalize','ids','removeQueues','addAgents','isArray','Voice','Chat','Mail','Sms','Fax','Openchannel','Whatsapp','through','penalty','QueueId','defaults','TeamVoiceQueue','User','emit','findAll','voicePause','upsert','isNil','interface','format','SIP/%s','all','VoicePrefixId','spread','removeAgents','Queue:remove','UserVoiceQueueRt','getAgents','nolimit','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','mustache','util','path','sox','to-csv','fs-extra','lodash','squel','jsforce','desk.js','querystring','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','redis','localhost','socket.io-emitter','register','sendStatus','status'];(function(_0x49e52e,_0x15f616){var _0x36a6e6=function(_0x2f7be2){while(--_0x2f7be2){_0x49e52e['push'](_0x49e52e['shift']());}};_0x36a6e6(++_0x15f616);}(_0xa870,0x11c));var _0x0a87=function(_0x51c02a,_0x3b7536){_0x51c02a=_0x51c02a-0x0;var _0x2fbaf5=_0xa870[_0x51c02a];return _0x2fbaf5;};'use strict';var emlformat=require(_0x0a87('0x0'));var rimraf=require(_0x0a87('0x1'));var zipdir=require(_0x0a87('0x2'));var jsonpatch=require(_0x0a87('0x3'));var rp=require(_0x0a87('0x4'));var moment=require(_0x0a87('0x5'));var BPromise=require('bluebird');var Mustache=require(_0x0a87('0x6'));var util=require(_0x0a87('0x7'));var path=require(_0x0a87('0x8'));var sox=require(_0x0a87('0x9'));var csv=require(_0x0a87('0xa'));var ejs=require('ejs');var fs=require('fs');var fs_extra=require(_0x0a87('0xb'));var _=require(_0x0a87('0xc'));var squel=require(_0x0a87('0xd'));var crypto=require('crypto');var jsforce=require(_0x0a87('0xe'));var deskjs=require(_0x0a87('0xf'));var toCsv=require(_0x0a87('0xa'));var querystring=require(_0x0a87('0x10'));var Papa=require('papaparse');var Redis=require(_0x0a87('0x11'));var authService=require(_0x0a87('0x12'));var qs=require(_0x0a87('0x13'));var as=require(_0x0a87('0x14'));var hardwareService=require(_0x0a87('0x15'));var logger=require(_0x0a87('0x16'))(_0x0a87('0x17'));var utils=require(_0x0a87('0x18'));var config=require(_0x0a87('0x19'));var licenseUtil=require('../../config/license/util');var db=require('../../mysqldb')['db'];config[_0x0a87('0x1a')]=_['defaults'](config[_0x0a87('0x1a')],{'host':_0x0a87('0x1b'),'port':0x18eb});var socket=require(_0x0a87('0x1c'))(new Redis(config['redis']));require('./team.socket')[_0x0a87('0x1d')](socket);function respondWithStatusCode(_0x517c30,_0x2f315d){_0x2f315d=_0x2f315d||0xcc;return function(_0x459f10){if(_0x459f10){return _0x517c30[_0x0a87('0x1e')](_0x2f315d);}return _0x517c30[_0x0a87('0x1f')](_0x2f315d)['end']();};}function respondWithResult(_0x42d1c2,_0x522c2e){_0x522c2e=_0x522c2e||0xc8;return function(_0x1de625){if(_0x1de625){return _0x42d1c2[_0x0a87('0x1f')](_0x522c2e)['json'](_0x1de625);}};}function respondWithFilteredResult(_0x46c454,_0x5308e6){return function(_0x490b84){if(_0x490b84){var _0x57e4fa=typeof _0x5308e6['offset']==='undefined'&&typeof _0x5308e6['limit']===_0x0a87('0x20');var _0x5204ad=_0x490b84[_0x0a87('0x21')];var _0x881b13=_0x57e4fa?0x0:_0x5308e6[_0x0a87('0x22')];var _0x365a31=_0x57e4fa?_0x490b84[_0x0a87('0x21')]:_0x5308e6[_0x0a87('0x22')]+_0x5308e6['limit'];var _0x49893f;if(_0x365a31>=_0x5204ad){_0x365a31=_0x5204ad;_0x49893f=0xc8;}else{_0x49893f=0xce;}_0x46c454['status'](_0x49893f);return _0x46c454[_0x0a87('0x23')](_0x0a87('0x24'),_0x881b13+'-'+_0x365a31+'/'+_0x5204ad)[_0x0a87('0x25')](_0x490b84);}return null;};}function patchUpdates(_0x44afec){return function(_0x9e5e){try{jsonpatch[_0x0a87('0x26')](_0x9e5e,_0x44afec,!![]);}catch(_0x4d9f56){return BPromise['reject'](_0x4d9f56);}return _0x9e5e['save']();};}function saveUpdates(_0x16c6e1,_0x2e060d){return function(_0x4c4243){if(_0x4c4243){return _0x4c4243[_0x0a87('0x27')](_0x16c6e1)[_0x0a87('0x28')](function(_0x191cc8){return _0x191cc8;});}return null;};}function handleEntityNotFound(_0x4bc73b,_0x219323){return function(_0x492f14){if(!_0x492f14){_0x4bc73b[_0x0a87('0x1e')](0x194);}return _0x492f14;};}function handleError(_0x5c51b0,_0x4f2697){_0x4f2697=_0x4f2697||0x1f4;return function(_0x35ad82){logger[_0x0a87('0x29')](_0x35ad82[_0x0a87('0x2a')]);if(_0x35ad82[_0x0a87('0x2b')]){delete _0x35ad82[_0x0a87('0x2b')];}_0x5c51b0[_0x0a87('0x1f')](_0x4f2697)[_0x0a87('0x2c')](_0x35ad82);};}exports[_0x0a87('0x2d')]=function(_0x28988b,_0x4e63c1){var _0x26f500={},_0x2d6bb7={},_0x2e6768={'count':0x0,'rows':[]};var _0x260664=_[_0x0a87('0x2e')](db[_0x0a87('0x2f')][_0x0a87('0x30')],function(_0x4a92d6){return{'name':_0x4a92d6['fieldName'],'type':_0x4a92d6[_0x0a87('0x31')][_0x0a87('0x32')]};});_0x2d6bb7['model']=_['map'](_0x260664,_0x0a87('0x2b'));_0x2d6bb7[_0x0a87('0x33')]=_[_0x0a87('0x34')](_0x28988b[_0x0a87('0x33')]);_0x2d6bb7[_0x0a87('0x35')]=_['intersection'](_0x2d6bb7[_0x0a87('0x36')],_0x2d6bb7[_0x0a87('0x33')]);_0x26f500[_0x0a87('0x37')]=_['intersection'](_0x2d6bb7[_0x0a87('0x36')],qs[_0x0a87('0x38')](_0x28988b[_0x0a87('0x33')][_0x0a87('0x38')]));_0x26f500[_0x0a87('0x37')]=_0x26f500[_0x0a87('0x37')][_0x0a87('0x39')]?_0x26f500[_0x0a87('0x37')]:_0x2d6bb7[_0x0a87('0x36')];if(!_0x28988b[_0x0a87('0x33')][_0x0a87('0x3a')]('nolimit')){_0x26f500[_0x0a87('0x3b')]=qs[_0x0a87('0x3b')](_0x28988b[_0x0a87('0x33')][_0x0a87('0x3b')]);_0x26f500['offset']=qs['offset'](_0x28988b[_0x0a87('0x33')][_0x0a87('0x22')]);}_0x26f500['order']=qs[_0x0a87('0x3c')](_0x28988b[_0x0a87('0x33')][_0x0a87('0x3c')]);_0x26f500['where']=qs[_0x0a87('0x35')](_[_0x0a87('0x3d')](_0x28988b['query'],_0x2d6bb7[_0x0a87('0x35')]),_0x260664);if(_0x28988b['query'][_0x0a87('0x3e')]){_0x26f500[_0x0a87('0x3f')]=_[_0x0a87('0x40')](_0x26f500[_0x0a87('0x3f')],{'$or':_[_0x0a87('0x2e')](_0x260664,function(_0x576ab0){if(_0x576ab0[_0x0a87('0x31')]!==_0x0a87('0x41')){var _0x20425d={};_0x20425d[_0x576ab0[_0x0a87('0x2b')]]={'$like':'%'+_0x28988b['query'][_0x0a87('0x3e')]+'%'};return _0x20425d;}})});}_0x26f500=_[_0x0a87('0x40')]({},_0x26f500,_0x28988b[_0x0a87('0x42')]);var _0x3fdb52={'where':_0x26f500[_0x0a87('0x3f')]};return db[_0x0a87('0x2f')][_0x0a87('0x21')](_0x3fdb52)['then'](function(_0x5c06a8){_0x2e6768[_0x0a87('0x21')]=_0x5c06a8;if(_0x28988b[_0x0a87('0x33')][_0x0a87('0x43')]){_0x26f500['include']=[{'all':!![]}];}return db[_0x0a87('0x2f')]['findAll'](_0x26f500);})[_0x0a87('0x28')](function(_0x52cb49){_0x2e6768[_0x0a87('0x44')]=_0x52cb49;return _0x2e6768;})['then'](respondWithFilteredResult(_0x4e63c1,_0x26f500))['catch'](handleError(_0x4e63c1,null));};exports[_0x0a87('0x45')]=function(_0x32e834,_0x4222d0){var _0x5cbbf2={'raw':![],'where':{'id':_0x32e834[_0x0a87('0x46')]['id']}},_0x31d5d6={};_0x31d5d6['model']=_[_0x0a87('0x34')](db[_0x0a87('0x2f')][_0x0a87('0x30')]);_0x31d5d6[_0x0a87('0x33')]=_[_0x0a87('0x34')](_0x32e834[_0x0a87('0x33')]);_0x31d5d6[_0x0a87('0x35')]=_[_0x0a87('0x47')](_0x31d5d6['model'],_0x31d5d6['query']);_0x5cbbf2[_0x0a87('0x37')]=_[_0x0a87('0x47')](_0x31d5d6['model'],qs[_0x0a87('0x38')](_0x32e834[_0x0a87('0x33')]['fields']));_0x5cbbf2[_0x0a87('0x37')]=_0x5cbbf2[_0x0a87('0x37')][_0x0a87('0x39')]?_0x5cbbf2[_0x0a87('0x37')]:_0x31d5d6['model'];if(_0x32e834[_0x0a87('0x33')]['includeAll']){_0x5cbbf2[_0x0a87('0x48')]=[{'all':!![]}];}_0x5cbbf2=_[_0x0a87('0x40')]({},_0x5cbbf2,_0x32e834[_0x0a87('0x42')]);return db[_0x0a87('0x2f')]['find'](_0x5cbbf2)['then'](handleEntityNotFound(_0x4222d0,null))[_0x0a87('0x28')](respondWithResult(_0x4222d0,null))['catch'](handleError(_0x4222d0,null));};exports[_0x0a87('0x49')]=function(_0x2cc77e,_0x92252){return db['Team']['create'](_0x2cc77e[_0x0a87('0x4a')],{})[_0x0a87('0x28')](function(_0x48cfb0){var _0x42da3c=_0x2cc77e['user'][_0x0a87('0x4b')]({'plain':!![]});if(!_0x42da3c)throw new Error(_0x0a87('0x4c'));if(_0x42da3c[_0x0a87('0x4d')]===_0x0a87('0x4e')){var _0x53c546=_0x48cfb0[_0x0a87('0x4b')]({'plain':!![]});var _0x27c0b7=_0x0a87('0x4f');return db[_0x0a87('0x50')][_0x0a87('0x51')]({'where':{'name':_0x27c0b7,'userProfileId':_0x42da3c[_0x0a87('0x52')]},'raw':!![]})[_0x0a87('0x28')](function(_0x4d5e14){if(_0x4d5e14&&_0x4d5e14['autoAssociation']===0x0){return db[_0x0a87('0x53')][_0x0a87('0x49')]({'name':_0x53c546[_0x0a87('0x2b')],'resourceId':_0x53c546['id'],'type':_0x4d5e14[_0x0a87('0x2b')],'sectionId':_0x4d5e14['id']},{})[_0x0a87('0x28')](function(){return _0x48cfb0;});}else{return _0x48cfb0;}})[_0x0a87('0x54')](function(_0x13a2ac){logger[_0x0a87('0x29')](_0x0a87('0x55'),_0x13a2ac);throw _0x13a2ac;});}return _0x48cfb0;})[_0x0a87('0x28')](respondWithResult(_0x92252,0xc9))['catch'](handleError(_0x92252,null));};exports[_0x0a87('0x27')]=function(_0x491375,_0x46e4a5){if(_0x491375[_0x0a87('0x4a')]['id']){delete _0x491375['body']['id'];}return db[_0x0a87('0x2f')][_0x0a87('0x51')]({'where':{'id':_0x491375[_0x0a87('0x46')]['id']}})[_0x0a87('0x28')](handleEntityNotFound(_0x46e4a5,null))[_0x0a87('0x28')](saveUpdates(_0x491375[_0x0a87('0x4a')],null))[_0x0a87('0x28')](respondWithResult(_0x46e4a5,null))[_0x0a87('0x54')](handleError(_0x46e4a5,null));};exports['destroy']=function(_0x573454,_0x43d629){var _0x404cda=_0x573454[_0x0a87('0x46')]['id'];var _0x5b28ca=[];return db[_0x0a87('0x56')][_0x0a87('0x57')](function(_0x282117){var _0xe5e75c=_0x0a87('0x58')+_0x404cda;return db['sequelize'][_0x0a87('0x33')](_0xe5e75c,{'type':db['Sequelize'][_0x0a87('0x59')][_0x0a87('0x5a')],'raw':!![],'transaction':_0x282117})[_0x0a87('0x28')](function(_0x457cec){_0x5b28ca=_['map'](_0x457cec,function(_0x14863d){return Number(_0x14863d['UserId']);});})[_0x0a87('0x28')](function(){var _0x450a2a=_0x0a87('0x5b')+_0x404cda;return db[_0x0a87('0x56')][_0x0a87('0x33')](_0x450a2a,{'type':db[_0x0a87('0x5c')][_0x0a87('0x59')][_0x0a87('0x5a')],'raw':!![],'transaction':_0x282117});})['then'](function(_0x178c74){var _0x18d2f6=_[_0x0a87('0x2e')](_0x178c74,function(_0x241858){return Number(_0x241858[_0x0a87('0x5d')]);});return db[_0x0a87('0x5e')]['destroy']({'where':{'UserId':{'$in':_0x5b28ca},'VoiceQueueId':{'$in':_0x18d2f6}},'transaction':_0x282117});})[_0x0a87('0x28')](function(){var _0x47c11f=_0x0a87('0x5f')+_0x404cda;return db[_0x0a87('0x56')][_0x0a87('0x33')](_0x47c11f,{'type':db[_0x0a87('0x5c')]['QueryTypes'][_0x0a87('0x5a')],'raw':!![],'transaction':_0x282117});})[_0x0a87('0x28')](function(_0x67d043){var _0x4adb46=_[_0x0a87('0x2e')](_0x67d043,function(_0x6c6034){return Number(_0x6c6034[_0x0a87('0x60')]);});return db[_0x0a87('0x61')][_0x0a87('0x62')]({'where':{'UserId':{'$in':_0x5b28ca},'MailQueueId':{'$in':_0x4adb46}},'transaction':_0x282117});})[_0x0a87('0x28')](function(){var _0x5b4201=_0x0a87('0x63')+_0x404cda;return db[_0x0a87('0x56')][_0x0a87('0x33')](_0x5b4201,{'type':db[_0x0a87('0x5c')][_0x0a87('0x59')][_0x0a87('0x5a')],'raw':!![],'transaction':_0x282117});})[_0x0a87('0x28')](function(_0xf7520b){var _0x306398=_[_0x0a87('0x2e')](_0xf7520b,function(_0x478926){return Number(_0x478926[_0x0a87('0x64')]);});return db['UserSmsQueue'][_0x0a87('0x62')]({'where':{'UserId':{'$in':_0x5b28ca},'SmsQueueId':{'$in':_0x306398}},'transaction':_0x282117});})['then'](function(){var _0x320d88=_0x0a87('0x65')+_0x404cda;return db['sequelize'][_0x0a87('0x33')](_0x320d88,{'type':db[_0x0a87('0x5c')][_0x0a87('0x59')][_0x0a87('0x5a')],'raw':!![],'transaction':_0x282117});})[_0x0a87('0x28')](function(_0x3fb61f){var _0x43eb4a=_[_0x0a87('0x2e')](_0x3fb61f,function(_0x11be86){return Number(_0x11be86[_0x0a87('0x66')]);});return db['UserChatQueue'][_0x0a87('0x62')]({'where':{'UserId':{'$in':_0x5b28ca},'ChatQueueId':{'$in':_0x43eb4a}},'transaction':_0x282117});})[_0x0a87('0x28')](function(){var _0x50946c=_0x0a87('0x67')+_0x404cda;return db[_0x0a87('0x56')][_0x0a87('0x33')](_0x50946c,{'type':db[_0x0a87('0x5c')][_0x0a87('0x59')][_0x0a87('0x5a')],'raw':!![],'transaction':_0x282117});})[_0x0a87('0x28')](function(_0x384fd6){var _0x4ff2d8=_['map'](_0x384fd6,function(_0xf20f7e){return Number(_0xf20f7e[_0x0a87('0x68')]);});return db['UserFaxQueue'][_0x0a87('0x62')]({'where':{'UserId':{'$in':_0x5b28ca},'FaxQueueId':{'$in':_0x4ff2d8}},'transaction':_0x282117});})[_0x0a87('0x28')](function(){var _0x34fe36=_0x0a87('0x69')+_0x404cda;return db[_0x0a87('0x56')]['query'](_0x34fe36,{'type':db[_0x0a87('0x5c')][_0x0a87('0x59')][_0x0a87('0x5a')],'raw':!![],'transaction':_0x282117});})['then'](function(_0x4bf328){var _0x1f23b2=_[_0x0a87('0x2e')](_0x4bf328,function(_0x2cf266){return Number(_0x2cf266['OpenchannelQueueId']);});return db[_0x0a87('0x6a')][_0x0a87('0x62')]({'where':{'UserId':{'$in':_0x5b28ca},'OpenchannelQueueId':{'$in':_0x1f23b2}},'transaction':_0x282117});})[_0x0a87('0x28')](function(){var _0x58689f=_0x0a87('0x6b')+_0x404cda;return db[_0x0a87('0x56')][_0x0a87('0x33')](_0x58689f,{'type':db[_0x0a87('0x5c')][_0x0a87('0x59')][_0x0a87('0x5a')],'raw':!![],'transaction':_0x282117});})[_0x0a87('0x28')](function(_0x13b237){var _0x434df6=_[_0x0a87('0x2e')](_0x13b237,function(_0x1b60f5){return Number(_0x1b60f5[_0x0a87('0x6c')]);});return db[_0x0a87('0x6d')][_0x0a87('0x62')]({'where':{'UserId':{'$in':_0x5b28ca},'WhatsappQueueId':{'$in':_0x434df6}},'transaction':_0x282117});})[_0x0a87('0x28')](function(){return db[_0x0a87('0x6e')][_0x0a87('0x51')]({'where':{'TeamId':_0x404cda}});})['then'](function(_0x1bc73e){if(_0x1bc73e===null){return;}return db[_0x0a87('0x6f')]['destroy']({'where':{'UserId':{'$in':_0x5b28ca},'VoicePrefixId':_0x1bc73e['VoicePrefixId']},'transaction':_0x282117});})[_0x0a87('0x28')](function(){return db['Team'][_0x0a87('0x62')]({'where':{'id':_0x404cda},'cascade':!![],'transaction':_0x282117});})[_0x0a87('0x28')](function(_0x188c55){if(_0x188c55===0x0){_0x43d629[_0x0a87('0x1e')](0x194);}else{return db[_0x0a87('0x53')]['destroy']({'where':{'type':_0x0a87('0x4f'),'resourceId':_0x404cda},'cascade':!![],'transaction':_0x282117})[_0x0a87('0x28')](function(){_0x43d629[_0x0a87('0x1f')](0xcc)['end']();});}})['catch'](function(_0x2bf3ca){_0x43d629[_0x0a87('0x1f')](0x1f4)[_0x0a87('0x2c')](_0x2bf3ca);});});};exports[_0x0a87('0x70')]=function(_0x5663b5,_0x2c0e2d,_0xbf61c8){return db[_0x0a87('0x2f')]['findOne']({'where':{'id':_0x5663b5[_0x0a87('0x46')]['id']}})[_0x0a87('0x28')](handleEntityNotFound(_0x2c0e2d,null))[_0x0a87('0x28')](function(_0x235009){if(!_0x5663b5[_0x0a87('0x33')][_0x0a87('0x71')]||!utils[_0x0a87('0x72')](_0x5663b5['query'][_0x0a87('0x71')])){throw new db[(_0x0a87('0x5c'))][(_0x0a87('0x73'))](_0x0a87('0x74'));}var _0x4453ac={};var _0x11e5f7={};_0x11e5f7[_0x0a87('0x36')]=_[_0x0a87('0x34')](db[_['capitalize'](_0x5663b5[_0x0a87('0x33')][_0x0a87('0x71')][_0x0a87('0x75')]())+_0x0a87('0x76')][_0x0a87('0x30')]);_0x11e5f7[_0x0a87('0x33')]=_[_0x0a87('0x34')](_0x5663b5['query']);_0x11e5f7[_0x0a87('0x35')]=_[_0x0a87('0x47')](_0x11e5f7['model'],_0x11e5f7[_0x0a87('0x33')]);_0x4453ac[_0x0a87('0x37')]=_[_0x0a87('0x47')](_0x11e5f7[_0x0a87('0x36')],qs[_0x0a87('0x38')](_0x5663b5[_0x0a87('0x33')][_0x0a87('0x38')]));_0x4453ac['attributes']=_0x4453ac[_0x0a87('0x37')]['length']?_0x4453ac[_0x0a87('0x37')]:_0x11e5f7[_0x0a87('0x36')];_0x4453ac['limit']=qs[_0x0a87('0x3b')](_0x5663b5[_0x0a87('0x33')][_0x0a87('0x3b')]);_0x4453ac['offset']=qs[_0x0a87('0x22')](_0x5663b5[_0x0a87('0x33')][_0x0a87('0x22')]);_0x4453ac[_0x0a87('0x77')]=qs[_0x0a87('0x3c')](_0x5663b5[_0x0a87('0x33')][_0x0a87('0x3c')]);_0x4453ac[_0x0a87('0x3f')]=qs['filters'](_[_0x0a87('0x3d')](_0x5663b5[_0x0a87('0x33')],_0x11e5f7['filters']));_0x4453ac=_['merge']({},_0x4453ac,_0x5663b5[_0x0a87('0x42')]);return _0x235009[_0x0a87('0x4b')+_['capitalize'](_0x5663b5['query']['channel']['toLowerCase']())+_0x0a87('0x78')](_0x4453ac);})[_0x0a87('0x28')](respondWithResult(_0x2c0e2d,null))[_0x0a87('0x54')](handleError(_0x2c0e2d,null));};exports[_0x0a87('0x79')]=function(_0x535628,_0x35901e,_0x5abae9){return db[_0x0a87('0x2f')][_0x0a87('0x7a')]({'where':{'id':_0x535628[_0x0a87('0x46')]['id']}})[_0x0a87('0x28')](function(_0x88da59){if(_0x88da59){if(!_0x535628[_0x0a87('0x4a')][_0x0a87('0x71')]||!utils[_0x0a87('0x72')](_0x535628[_0x0a87('0x4a')][_0x0a87('0x71')])){throw new db[(_0x0a87('0x5c'))][(_0x0a87('0x73'))](_0x0a87('0x74'));}return _0x88da59[_0x0a87('0x7b')+_[_0x0a87('0x7c')](_0x535628[_0x0a87('0x4a')]['channel']['toLowerCase']())+'Queues'](_0x535628[_0x0a87('0x4a')][_0x0a87('0x7d')]);}return null;})[_0x0a87('0x28')](handleEntityNotFound(_0x35901e,null))[_0x0a87('0x28')](respondWithStatusCode(_0x35901e,null))[_0x0a87('0x54')](handleError(_0x35901e,null));};exports[_0x0a87('0x7e')]=function(_0x54160e,_0x51801d,_0x268e33){return db[_0x0a87('0x2f')][_0x0a87('0x7a')]({'where':{'id':_0x54160e[_0x0a87('0x46')]['id']}})['then'](function(_0xec3a4d){if(_0xec3a4d){if(!_0x54160e[_0x0a87('0x33')][_0x0a87('0x71')]||!utils[_0x0a87('0x72')](_0x54160e[_0x0a87('0x33')][_0x0a87('0x71')])){throw new db[(_0x0a87('0x5c'))][(_0x0a87('0x73'))](_0x0a87('0x74'));}return _0xec3a4d['remove'+_[_0x0a87('0x7c')](_0x54160e['query'][_0x0a87('0x71')][_0x0a87('0x75')]())+'Queues'](_0x54160e[_0x0a87('0x33')]['ids']);}return null;})[_0x0a87('0x28')](handleEntityNotFound(_0x51801d,null))[_0x0a87('0x28')](respondWithStatusCode(_0x51801d,null))[_0x0a87('0x54')](handleError(_0x51801d,null));};exports[_0x0a87('0x7f')]=function(_0x163b2b,_0xa9483){var _0xd9763a=_[_0x0a87('0x80')](_0x163b2b[_0x0a87('0x4a')][_0x0a87('0x7d')])?_0x163b2b['body'][_0x0a87('0x7d')]:[_0x163b2b[_0x0a87('0x4a')][_0x0a87('0x7d')]];var _0x483510=_0x163b2b[_0x0a87('0x46')]['id'];return db[_0x0a87('0x2f')][_0x0a87('0x51')]({'where':{'id':_0x483510}})['then'](handleEntityNotFound(_0xa9483,null))[_0x0a87('0x28')](function(_0x48fa0d){if(_0x48fa0d){var _0x1ed3fc=[_0x0a87('0x81'),_0x0a87('0x82'),_0x0a87('0x83'),_0x0a87('0x84'),_0x0a87('0x85'),_0x0a87('0x86'),_0x0a87('0x87')];return db['sequelize']['transaction'](function(_0x3cd5ca){var _0x3fe644=_['map'](_0x1ed3fc,function(_0x15c466){var _0x175c49={'attributes':['id','name']};if(_0x15c466===_0x0a87('0x81')){_0x175c49[_0x0a87('0x88')]={'attributes':[_0x0a87('0x89')]};}return _0x48fa0d['get'+_0x15c466+_0x0a87('0x78')](_0x175c49)[_0x0a87('0x28')](function(_0x142ccc){var _0x5b9d4e=_[_0x0a87('0x2e')](_0x142ccc,function(_0x4397a6){var _0x174ca5=_[_0x0a87('0x2e')](_0xd9763a,function(_0x5dc5ea){var _0x2a2eca={'where':{'UserId':_0x5dc5ea,[_0x15c466+_0x0a87('0x8a')]:_0x4397a6['id']},'transaction':_0x3cd5ca};if(_0x15c466===_0x0a87('0x81')){_0x2a2eca[_0x0a87('0x8b')]={'penalty':_0x4397a6[_0x0a87('0x8c')][_0x0a87('0x89')]};}return db[_0x0a87('0x8d')+_0x15c466+'Queue']['findOrCreate'](_0x2a2eca)[_0x0a87('0x28')](function(){socket[_0x0a87('0x8e')]('user'+_0x15c466+'Queue:save',{'UserId':_0x5dc5ea,[_0x15c466+_0x0a87('0x8a')]:_0x4397a6['id']});if(_0x15c466!==_0x0a87('0x81')){return;}return db[_0x0a87('0x8d')][_0x0a87('0x8f')]({'where':{'id':_0xd9763a,'online':0x1},'attributes':['id',_0x0a87('0x2b'),'online',_0x0a87('0x90'),'interface'],'raw':!![]})[_0x0a87('0x28')](function(_0x366ef2){var _0xc42721=_['map'](_0x366ef2,function(_0x3e938f){return db['UserVoiceQueueRt'][_0x0a87('0x91')]({'membername':_0x3e938f[_0x0a87('0x2b')],'UserId':_0x3e938f['id'],'queue_name':_0x4397a6[_0x0a87('0x2b')],'VoiceQueueId':_0x4397a6['id'],'interface':_[_0x0a87('0x92')](_0x3e938f[_0x0a87('0x93')])?util[_0x0a87('0x94')](_0x0a87('0x95'),_0x3e938f[_0x0a87('0x2b')]):_0x3e938f[_0x0a87('0x93')],'paused':_0x3e938f[_0x0a87('0x90')]||![],'penalty':_0x4397a6[_0x0a87('0x8c')][_0x0a87('0x89')]},{'transaction':_0x3cd5ca});});return Promise[_0x0a87('0x96')](_0xc42721);});});});return Promise[_0x0a87('0x96')](_0x174ca5);});return Promise[_0x0a87('0x96')](_0x5b9d4e);})[_0x0a87('0x28')](function(){return db[_0x0a87('0x6e')]['findOne']({'where':{'teamId':_0x483510}})['then'](function(_0x2f741a){if(_0x2f741a){var _0x488d5a=_[_0x0a87('0x2e')](_0xd9763a,function(_0x5e8936){db[_0x0a87('0x6f')]['upsert']({'UserId':_0x5e8936,'VoicePrefixId':_0x2f741a[_0x0a87('0x97')]});});return Promise[_0x0a87('0x96')](_0x488d5a);}});});});return Promise[_0x0a87('0x96')](_0x3fe644)['then'](function(){return _0x48fa0d[_0x0a87('0x7f')](_0xd9763a,{'transaction':_0x3cd5ca})[_0x0a87('0x98')](function(_0x150fbd){return _0x150fbd;});});});}})[_0x0a87('0x28')](respondWithResult(_0xa9483,null))[_0x0a87('0x54')](handleError(_0xa9483,null));};exports[_0x0a87('0x99')]=function(_0x2418b5,_0x7125e5){var _0x2310bc=_[_0x0a87('0x80')](_0x2418b5[_0x0a87('0x33')][_0x0a87('0x7d')])?_0x2418b5[_0x0a87('0x33')][_0x0a87('0x7d')]:[_0x2418b5[_0x0a87('0x33')]['ids']];var _0x3bc0e4=_0x2418b5[_0x0a87('0x46')]['id'];return db[_0x0a87('0x2f')][_0x0a87('0x51')]({'where':{'id':_0x3bc0e4}})[_0x0a87('0x28')](handleEntityNotFound(_0x7125e5,null))[_0x0a87('0x28')](function(_0x3d6037){if(_0x3d6037){var _0x21984e=[_0x0a87('0x81'),_0x0a87('0x82'),_0x0a87('0x83'),_0x0a87('0x84'),_0x0a87('0x85'),_0x0a87('0x86'),_0x0a87('0x87')];return db[_0x0a87('0x56')][_0x0a87('0x57')](function(_0x3ba116){var _0x2b74b3=_['map'](_0x21984e,function(_0x27a2aa){var _0x1ce369={'attributes':['id',_0x0a87('0x2b')]};return _0x3d6037[_0x0a87('0x4b')+_0x27a2aa+_0x0a87('0x78')](_0x1ce369)[_0x0a87('0x28')](function(_0x1e1028){var _0x3d7b09=_[_0x0a87('0x2e')](_0x1e1028,function(_0x2be23b){return _0x2be23b[_0x0a87('0x99')](_0x2310bc,{'transaction':_0x3ba116})[_0x0a87('0x28')](function(){var _0x401a95=_[_0x0a87('0x2e')](_0x2310bc,function(_0x498b6b){socket[_0x0a87('0x8e')]('user'+_0x27a2aa+_0x0a87('0x9a'),{'UserId':Number(_0x498b6b),[_0x27a2aa+_0x0a87('0x8a')]:_0x2be23b['id']});if(_0x27a2aa!=='Voice'){return;}return db[_0x0a87('0x9b')]['destroy']({'where':{'VoiceQueueId':_0x2be23b['id'],'UserId':_0x498b6b},'transaction':_0x3ba116});});return Promise[_0x0a87('0x96')](_0x401a95);});});return Promise[_0x0a87('0x96')](_0x3d7b09);});});return Promise[_0x0a87('0x96')](_0x2b74b3)[_0x0a87('0x28')](function(){return _0x3d6037[_0x0a87('0x99')](_0x2310bc,{'transaction':_0x3ba116});})[_0x0a87('0x28')](function(){return db[_0x0a87('0x6e')][_0x0a87('0x7a')]({'where':{'teamId':_0x3bc0e4}})[_0x0a87('0x28')](function(_0x10c301){if(_0x10c301){var _0x11ff69=_[_0x0a87('0x2e')](_0x2310bc,function(_0x1dc663){db[_0x0a87('0x6f')]['destroy']({'where':{'UserId':_0x1dc663,'VoicePrefixId':_0x10c301['VoicePrefixId']}});});return Promise[_0x0a87('0x96')](_0x11ff69);}});});});}})[_0x0a87('0x28')](respondWithStatusCode(_0x7125e5,null))[_0x0a87('0x54')](handleError(_0x7125e5,null));};exports[_0x0a87('0x9c')]=function(_0x3bec1f,_0x1417a6,_0x495a6e){var _0x597892={};var _0xa30ef3={};var _0x10a5ed;var _0x1ca2fa;return db[_0x0a87('0x2f')]['findOne']({'where':{'id':_0x3bec1f[_0x0a87('0x46')]['id']}})[_0x0a87('0x28')](handleEntityNotFound(_0x1417a6,null))[_0x0a87('0x28')](function(_0x576f82){if(_0x576f82){_0x10a5ed=_0x576f82;_0xa30ef3[_0x0a87('0x36')]=_[_0x0a87('0x34')](db[_0x0a87('0x8d')][_0x0a87('0x30')]);_0xa30ef3['query']=_[_0x0a87('0x34')](_0x3bec1f[_0x0a87('0x33')]);_0xa30ef3[_0x0a87('0x35')]=_[_0x0a87('0x47')](_0xa30ef3['model'],_0xa30ef3['query']);_0x597892['attributes']=_[_0x0a87('0x47')](_0xa30ef3[_0x0a87('0x36')],qs[_0x0a87('0x38')](_0x3bec1f['query'][_0x0a87('0x38')]));_0x597892['attributes']=_0x597892[_0x0a87('0x37')][_0x0a87('0x39')]?_0x597892[_0x0a87('0x37')]:_0xa30ef3[_0x0a87('0x36')];_0x597892[_0x0a87('0x77')]=qs[_0x0a87('0x3c')](_0x3bec1f[_0x0a87('0x33')][_0x0a87('0x3c')]);_0x597892['where']=qs['filters'](_[_0x0a87('0x3d')](_0x3bec1f[_0x0a87('0x33')],_0xa30ef3[_0x0a87('0x35')]));if(_0x3bec1f[_0x0a87('0x33')][_0x0a87('0x3e')]){_0x597892[_0x0a87('0x3f')]=_[_0x0a87('0x40')](_0x597892[_0x0a87('0x3f')],{'$or':_['map'](_0x597892[_0x0a87('0x37')],function(_0x33f69a){var _0x3759b2={};_0x3759b2[_0x33f69a]={'$like':'%'+_0x3bec1f['query'][_0x0a87('0x3e')]+'%'};return _0x3759b2;})});}_0x597892=_[_0x0a87('0x40')]({},_0x597892,_0x3bec1f[_0x0a87('0x42')]);return _0x10a5ed[_0x0a87('0x9c')](_0x597892);}})[_0x0a87('0x28')](function(_0x50f6bc){if(_0x50f6bc){_0x1ca2fa=_0x50f6bc['length'];if(!_0x3bec1f[_0x0a87('0x33')][_0x0a87('0x3a')](_0x0a87('0x9d'))){_0x597892[_0x0a87('0x3b')]=qs[_0x0a87('0x3b')](_0x3bec1f[_0x0a87('0x33')][_0x0a87('0x3b')]);_0x597892['offset']=qs[_0x0a87('0x22')](_0x3bec1f[_0x0a87('0x33')]['offset']);}return _0x10a5ed['getAgents'](_0x597892);}})[_0x0a87('0x28')](function(_0xefe3b8){if(_0xefe3b8){return _0xefe3b8?{'count':_0x1ca2fa,'rows':_0xefe3b8}:null;}})[_0x0a87('0x28')](respondWithResult(_0x1417a6,null))[_0x0a87('0x54')](handleError(_0x1417a6,null));}; \ No newline at end of file diff --git a/server/api/team/team.events.js b/server/api/team/team.events.js index b6eeac5..7b567c0 100644 --- a/server/api/team/team.events.js +++ b/server/api/team/team.events.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x24d5=['events','Team','setMaxListeners','save','update','emit','hook','exports'];(function(_0x278948,_0x85b993){var _0x59fecb=function(_0x49141d){while(--_0x49141d){_0x278948['push'](_0x278948['shift']());}};_0x59fecb(++_0x85b993);}(_0x24d5,0x128));var _0x524d=function(_0x50c19d,_0x1668b7){_0x50c19d=_0x50c19d-0x0;var _0x2f8507=_0x24d5[_0x50c19d];return _0x2f8507;};'use strict';var EventEmitter=require(_0x524d('0x0'));var Team=require('../../mysqldb')['db'][_0x524d('0x1')];var TeamEvents=new EventEmitter();TeamEvents[_0x524d('0x2')](0x0);var events={'afterCreate':_0x524d('0x3'),'afterUpdate':_0x524d('0x4'),'afterDestroy':'remove'};function emitEvent(_0x31b2ad){return function(_0x4c6c0b,_0x9a8e9b,_0x2c5d2c){TeamEvents[_0x524d('0x5')](_0x31b2ad+':'+_0x4c6c0b['id'],_0x4c6c0b);TeamEvents[_0x524d('0x5')](_0x31b2ad,_0x4c6c0b);_0x2c5d2c(null);};}for(var e in events){if(events['hasOwnProperty'](e)){var event=events[e];Team[_0x524d('0x6')](e,emitEvent(event));}}module[_0x524d('0x7')]=TeamEvents; \ No newline at end of file +var _0xd61a=['hook','exports','events','Team','setMaxListeners','save','emit','hasOwnProperty'];(function(_0x47d582,_0x175d08){var _0x1683a2=function(_0x9b4413){while(--_0x9b4413){_0x47d582['push'](_0x47d582['shift']());}};_0x1683a2(++_0x175d08);}(_0xd61a,0x192));var _0xad61=function(_0x179d07,_0x29431a){_0x179d07=_0x179d07-0x0;var _0xbcbe0b=_0xd61a[_0x179d07];return _0xbcbe0b;};'use strict';var EventEmitter=require(_0xad61('0x0'));var Team=require('../../mysqldb')['db'][_0xad61('0x1')];var TeamEvents=new EventEmitter();TeamEvents[_0xad61('0x2')](0x0);var events={'afterCreate':_0xad61('0x3'),'afterUpdate':'update','afterDestroy':'remove'};function emitEvent(_0x526837){return function(_0x2090fc,_0x2e0f47,_0x46ed45){TeamEvents[_0xad61('0x4')](_0x526837+':'+_0x2090fc['id'],_0x2090fc);TeamEvents[_0xad61('0x4')](_0x526837,_0x2090fc);_0x46ed45(null);};}for(var e in events){if(events[_0xad61('0x5')](e)){var event=events[e];Team[_0xad61('0x6')](e,emitEvent(event));}}module[_0xad61('0x7')]=TeamEvents; \ No newline at end of file diff --git a/server/api/team/team.model.js b/server/api/team/team.model.js index cc65171..4b5dfbf 100644 --- a/server/api/team/team.model.js +++ b/server/api/team/team.model.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x265d=['channel','catch','exports','define','Team','teams','Chat','Fax','Mail','Openchannel','Whatsapp','resolve','map','all','lodash','get','Queues','then','setDataValue'];(function(_0x2d518d,_0x4e74a7){var _0x46da35=function(_0x31645a){while(--_0x31645a){_0x2d518d['push'](_0x2d518d['shift']());}};_0x46da35(++_0x4e74a7);}(_0x265d,0x151));var _0xd265=function(_0x59d89e,_0x55edf5){_0x59d89e=_0x59d89e-0x0;var _0x554e93=_0x265d[_0x59d89e];return _0x554e93;};'use strict';var _=require(_0xd265('0x0'));var attributes=require('./team.attributes');function getQueuesByChannel(_0x27d2bd,_0x551b48){var _0xccc57f=_0xd265('0x1')+_0x551b48+_0xd265('0x2');return _0x27d2bd[_0xccc57f]()[_0xd265('0x3')](function(_0x120956){return _['map'](_0x120956,function(_0x55e26f){_0x55e26f[_0xd265('0x4')](_0xd265('0x5'),_0x551b48);return _0x55e26f;});})[_0xd265('0x6')](function(_0x2d30b5){throw _0x2d30b5;});}module[_0xd265('0x7')]=function(_0x581e65){return _0x581e65[_0xd265('0x8')](_0xd265('0x9'),attributes,{'tableName':_0xd265('0xa'),'paranoid':![],'indexes':[],'timestamps':!![],'instanceMethods':{'getAssociatedQueues':function(){var _0x26c0e9=this;var _0xcf3175=[_0xd265('0xb'),_0xd265('0xc'),_0xd265('0xd'),_0xd265('0xe'),'Sms','Voice',_0xd265('0xf')];return Promise[_0xd265('0x10')]()['then'](function(){var _0x556cf7=_[_0xd265('0x11')](_0xcf3175,function(_0x24351d){return getQueuesByChannel(_0x26c0e9,_0x24351d);});return Promise[_0xd265('0x12')](_0x556cf7);})[_0xd265('0x6')](function(_0x3f2874){throw _0x3f2874;});}}});}; \ No newline at end of file +var _0xc0eb=['get','then','setDataValue','channel','catch','exports','define','Team','Chat','Mail','Openchannel','resolve','map','all','./team.attributes'];(function(_0x44d9ab,_0x76bc69){var _0x31485e=function(_0x1e44ce){while(--_0x1e44ce){_0x44d9ab['push'](_0x44d9ab['shift']());}};_0x31485e(++_0x76bc69);}(_0xc0eb,0x1a3));var _0xbc0e=function(_0x5b9029,_0x2f77f5){_0x5b9029=_0x5b9029-0x0;var _0x518754=_0xc0eb[_0x5b9029];return _0x518754;};'use strict';var _=require('lodash');var attributes=require(_0xbc0e('0x0'));function getQueuesByChannel(_0x60b5eb,_0x40dd99){var _0x4d54cc=_0xbc0e('0x1')+_0x40dd99+'Queues';return _0x60b5eb[_0x4d54cc]()[_0xbc0e('0x2')](function(_0x543143){return _['map'](_0x543143,function(_0x4673e5){_0x4673e5[_0xbc0e('0x3')](_0xbc0e('0x4'),_0x40dd99);return _0x4673e5;});})[_0xbc0e('0x5')](function(_0x3d3640){throw _0x3d3640;});}module[_0xbc0e('0x6')]=function(_0x485139){return _0x485139[_0xbc0e('0x7')](_0xbc0e('0x8'),attributes,{'tableName':'teams','paranoid':![],'indexes':[],'timestamps':!![],'instanceMethods':{'getAssociatedQueues':function(){var _0x1cb004=this;var _0x5e066c=[_0xbc0e('0x9'),'Fax',_0xbc0e('0xa'),_0xbc0e('0xb'),'Sms','Voice','Whatsapp'];return Promise[_0xbc0e('0xc')]()[_0xbc0e('0x2')](function(){var _0x355243=_[_0xbc0e('0xd')](_0x5e066c,function(_0x2ffacf){return getQueuesByChannel(_0x1cb004,_0x2ffacf);});return Promise[_0xbc0e('0xe')](_0x355243);})['catch'](function(_0x452cf7){throw _0x452cf7;});}}});}; \ No newline at end of file diff --git a/server/api/team/team.rpc.js b/server/api/team/team.rpc.js index 645186e..3248d8d 100644 --- a/server/api/team/team.rpc.js +++ b/server/api/team/team.rpc.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x227a=['lodash','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','client','http','redis','localhost','socket.io-emitter','./team.socket','register','request','then','info','Team,\x20%s,\x20%s','debug','Team,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','code','message','result','catch'];(function(_0x131cb0,_0x3e0f54){var _0x3785e5=function(_0x18a076){while(--_0x18a076){_0x131cb0['push'](_0x131cb0['shift']());}};_0x3785e5(++_0x3e0f54);}(_0x227a,0x1b2));var _0xa227=function(_0x901302,_0x32058a){_0x901302=_0x901302-0x0;var _0x181fc7=_0x227a[_0x901302];return _0x181fc7;};'use strict';var _=require(_0xa227('0x0'));var util=require(_0xa227('0x1'));var moment=require(_0xa227('0x2'));var BPromise=require(_0xa227('0x3'));var rs=require(_0xa227('0x4'));var fs=require('fs');var Redis=require(_0xa227('0x5'));var db=require(_0xa227('0x6'))['db'];var utils=require(_0xa227('0x7'));var logger=require(_0xa227('0x8'))(_0xa227('0x9'));var config=require(_0xa227('0xa'));var jayson=require('jayson/promise');var client=jayson[_0xa227('0xb')][_0xa227('0xc')]({'port':0x232a});config[_0xa227('0xd')]=_['defaults'](config[_0xa227('0xd')],{'host':_0xa227('0xe'),'port':0x18eb});var socket=require(_0xa227('0xf'))(new Redis(config[_0xa227('0xd')]));require(_0xa227('0x10'))[_0xa227('0x11')](socket);function respondWithRpcPromise(_0x4de283,_0x277383,_0x23ebe0){return new BPromise(function(_0x46761e,_0xb7ed52){return client[_0xa227('0x12')](_0x4de283,_0x23ebe0)[_0xa227('0x13')](function(_0x2d1e36){logger[_0xa227('0x14')](_0xa227('0x15'),_0x277383,'request\x20sent');logger[_0xa227('0x16')](_0xa227('0x17'),_0x277383,_0xa227('0x18'),JSON[_0xa227('0x19')](_0x2d1e36));if(_0x2d1e36[_0xa227('0x1a')]){if(_0x2d1e36[_0xa227('0x1a')][_0xa227('0x1b')]===0x1f4){logger['error'](_0xa227('0x15'),_0x277383,_0x2d1e36[_0xa227('0x1a')][_0xa227('0x1c')]);return _0xb7ed52(_0x2d1e36[_0xa227('0x1a')][_0xa227('0x1c')]);}logger[_0xa227('0x1a')](_0xa227('0x15'),_0x277383,_0x2d1e36[_0xa227('0x1a')][_0xa227('0x1c')]);return _0x46761e(_0x2d1e36[_0xa227('0x1a')][_0xa227('0x1c')]);}else{logger[_0xa227('0x14')](_0xa227('0x15'),_0x277383,_0xa227('0x18'));_0x46761e(_0x2d1e36[_0xa227('0x1d')][_0xa227('0x1c')]);}})[_0xa227('0x1e')](function(_0x5c3d4e){logger['error'](_0xa227('0x15'),_0x277383,_0x5c3d4e);_0xb7ed52(_0x5c3d4e);});});} \ No newline at end of file +var _0x2c6d=['register','request','then','info','Team,\x20%s,\x20%s','request\x20sent','debug','Team,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','lodash','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','../../config/environment','jayson/promise','http','redis','defaults','socket.io-emitter','./team.socket'];(function(_0x33975c,_0x50d085){var _0x1c15ab=function(_0x54e8bc){while(--_0x54e8bc){_0x33975c['push'](_0x33975c['shift']());}};_0x1c15ab(++_0x50d085);}(_0x2c6d,0x64));var _0xd2c6=function(_0xe72008,_0x585e49){_0xe72008=_0xe72008-0x0;var _0x3214e0=_0x2c6d[_0xe72008];return _0x3214e0;};'use strict';var _=require(_0xd2c6('0x0'));var util=require(_0xd2c6('0x1'));var moment=require(_0xd2c6('0x2'));var BPromise=require(_0xd2c6('0x3'));var rs=require(_0xd2c6('0x4'));var fs=require('fs');var Redis=require(_0xd2c6('0x5'));var db=require(_0xd2c6('0x6'))['db'];var utils=require(_0xd2c6('0x7'));var logger=require(_0xd2c6('0x8'))('rpc');var config=require(_0xd2c6('0x9'));var jayson=require(_0xd2c6('0xa'));var client=jayson['client'][_0xd2c6('0xb')]({'port':0x232a});config[_0xd2c6('0xc')]=_[_0xd2c6('0xd')](config[_0xd2c6('0xc')],{'host':'localhost','port':0x18eb});var socket=require(_0xd2c6('0xe'))(new Redis(config['redis']));require(_0xd2c6('0xf'))[_0xd2c6('0x10')](socket);function respondWithRpcPromise(_0x3fbe3f,_0x5b9f8d,_0x3285f3){return new BPromise(function(_0x4b8897,_0x5389b4){return client[_0xd2c6('0x11')](_0x3fbe3f,_0x3285f3)[_0xd2c6('0x12')](function(_0x10d4ef){logger[_0xd2c6('0x13')](_0xd2c6('0x14'),_0x5b9f8d,_0xd2c6('0x15'));logger[_0xd2c6('0x16')](_0xd2c6('0x17'),_0x5b9f8d,'request\x20sent',JSON[_0xd2c6('0x18')](_0x10d4ef));if(_0x10d4ef[_0xd2c6('0x19')]){if(_0x10d4ef[_0xd2c6('0x19')][_0xd2c6('0x1a')]===0x1f4){logger[_0xd2c6('0x19')]('Team,\x20%s,\x20%s',_0x5b9f8d,_0x10d4ef[_0xd2c6('0x19')]['message']);return _0x5389b4(_0x10d4ef[_0xd2c6('0x19')]['message']);}logger['error'](_0xd2c6('0x14'),_0x5b9f8d,_0x10d4ef['error'][_0xd2c6('0x1b')]);return _0x4b8897(_0x10d4ef[_0xd2c6('0x19')][_0xd2c6('0x1b')]);}else{logger['info'](_0xd2c6('0x14'),_0x5b9f8d,_0xd2c6('0x15'));_0x4b8897(_0x10d4ef[_0xd2c6('0x1c')]['message']);}})['catch'](function(_0x4b3f8f){logger[_0xd2c6('0x19')](_0xd2c6('0x14'),_0x5b9f8d,_0x4b3f8f);_0x5389b4(_0x4b3f8f);});});} \ No newline at end of file diff --git a/server/api/team/team.socket.js b/server/api/team/team.socket.js index 4f84643..a2c52e3 100644 --- a/server/api/team/team.socket.js +++ b/server/api/team/team.socket.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x6aa4=['length','team:','./team.events','save','remove','emit','removeListener','register'];(function(_0x4d578b,_0x3c57c7){var _0x269989=function(_0x33243c){while(--_0x33243c){_0x4d578b['push'](_0x4d578b['shift']());}};_0x269989(++_0x3c57c7);}(_0x6aa4,0xb2));var _0x46aa=function(_0x47071e,_0x1ef7bf){_0x47071e=_0x47071e-0x0;var _0x20b60a=_0x6aa4[_0x47071e];return _0x20b60a;};'use strict';var TeamEvents=require(_0x46aa('0x0'));var events=[_0x46aa('0x1'),_0x46aa('0x2'),'update'];function createListener(_0x25cf6a,_0x598ef0){return function(_0x1242ef){_0x598ef0[_0x46aa('0x3')](_0x25cf6a,_0x1242ef);};}function removeListener(_0x3d4a1e,_0x3b47ba){return function(){TeamEvents[_0x46aa('0x4')](_0x3d4a1e,_0x3b47ba);};}exports[_0x46aa('0x5')]=function(_0x290f7d){for(var _0x8d685c=0x0,_0x3a7d40=events[_0x46aa('0x6')];_0x8d685c<_0x3a7d40;_0x8d685c++){var _0x482dfb=events[_0x8d685c];var _0x12ad97=createListener(_0x46aa('0x7')+_0x482dfb,_0x290f7d);TeamEvents['on'](_0x482dfb,_0x12ad97);}}; \ No newline at end of file +var _0x4e94=['save','update','emit','length','team:','./team.events'];(function(_0x3b5250,_0x7a0b2c){var _0xc844a1=function(_0x2fbc98){while(--_0x2fbc98){_0x3b5250['push'](_0x3b5250['shift']());}};_0xc844a1(++_0x7a0b2c);}(_0x4e94,0x155));var _0x44e9=function(_0x3b6652,_0x32486d){_0x3b6652=_0x3b6652-0x0;var _0x14d39f=_0x4e94[_0x3b6652];return _0x14d39f;};'use strict';var TeamEvents=require(_0x44e9('0x0'));var events=[_0x44e9('0x1'),'remove',_0x44e9('0x2')];function createListener(_0xd34fab,_0x4819b9){return function(_0x588834){_0x4819b9[_0x44e9('0x3')](_0xd34fab,_0x588834);};}function removeListener(_0x589ab3,_0x3a7f9b){return function(){TeamEvents['removeListener'](_0x589ab3,_0x3a7f9b);};}exports['register']=function(_0x4ae4f4){for(var _0x3c2680=0x0,_0x1b9c32=events[_0x44e9('0x4')];_0x3c2680<_0x1b9c32;_0x3c2680++){var _0x55b18a=events[_0x3c2680];var _0xdc9afd=createListener(_0x44e9('0x5')+_0x55b18a,_0x4ae4f4);TeamEvents['on'](_0x55b18a,_0xdc9afd);}}; \ No newline at end of file diff --git a/server/api/teamVoicePrefix/teamVoicePrefix.attributes.js b/server/api/teamVoicePrefix/teamVoicePrefix.attributes.js index 53b1189..26f84df 100644 --- a/server/api/teamVoicePrefix/teamVoicePrefix.attributes.js +++ b/server/api/teamVoicePrefix/teamVoicePrefix.attributes.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xa641=['exports','INTEGER','sequelize'];(function(_0x1ad23b,_0x3b6a85){var _0x647258=function(_0x2b9ef6){while(--_0x2b9ef6){_0x1ad23b['push'](_0x1ad23b['shift']());}};_0x647258(++_0x3b6a85);}(_0xa641,0x188));var _0x1a64=function(_0x59ee6f,_0x450239){_0x59ee6f=_0x59ee6f-0x0;var _0x4c0979=_0xa641[_0x59ee6f];return _0x4c0979;};'use strict';var Sequelize=require(_0x1a64('0x0'));module[_0x1a64('0x1')]={'TeamId':{'type':Sequelize[_0x1a64('0x2')]},'VoicePrefixId':{'type':Sequelize[_0x1a64('0x2')]}}; \ No newline at end of file +var _0x44d4=['sequelize'];(function(_0x21a4e3,_0x1b2882){var _0x5ab977=function(_0x162fce){while(--_0x162fce){_0x21a4e3['push'](_0x21a4e3['shift']());}};_0x5ab977(++_0x1b2882);}(_0x44d4,0x161));var _0x444d=function(_0x373a1b,_0x5d97b6){_0x373a1b=_0x373a1b-0x0;var _0x2a754e=_0x44d4[_0x373a1b];return _0x2a754e;};'use strict';var Sequelize=require(_0x444d('0x0'));module['exports']={'TeamId':{'type':Sequelize['INTEGER']},'VoicePrefixId':{'type':Sequelize['INTEGER']}}; \ No newline at end of file diff --git a/server/api/teamVoicePrefix/teamVoicePrefix.model.js b/server/api/teamVoicePrefix/teamVoicePrefix.model.js index c4f9aa6..470cc83 100644 --- a/server/api/teamVoicePrefix/teamVoicePrefix.model.js +++ b/server/api/teamVoicePrefix/teamVoicePrefix.model.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x7fee=['rimraf','../../config/environment','exports','define','TeamVoicePrefix','team_has_voice_prefixes','lodash','util','../../config/logger','api','moment','bluebird','path'];(function(_0x30e9de,_0x44f22a){var _0x7526ec=function(_0x593b0d){while(--_0x593b0d){_0x30e9de['push'](_0x30e9de['shift']());}};_0x7526ec(++_0x44f22a);}(_0x7fee,0x1a6));var _0xe7fe=function(_0x45f951,_0x2750c8){_0x45f951=_0x45f951-0x0;var _0x24756c=_0x7fee[_0x45f951];return _0x24756c;};'use strict';var _=require(_0xe7fe('0x0'));var util=require(_0xe7fe('0x1'));var logger=require(_0xe7fe('0x2'))(_0xe7fe('0x3'));var moment=require(_0xe7fe('0x4'));var BPromise=require(_0xe7fe('0x5'));var rp=require('request-promise');var fs=require('fs');var path=require(_0xe7fe('0x6'));var rimraf=require(_0xe7fe('0x7'));var config=require(_0xe7fe('0x8'));var attributes=require('./teamVoicePrefix.attributes');module[_0xe7fe('0x9')]=function(_0x5b6d58,_0x183b0b){return _0x5b6d58[_0xe7fe('0xa')](_0xe7fe('0xb'),attributes,{'tableName':_0xe7fe('0xc'),'paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file +var _0xf3e2=['moment','bluebird','request-promise','path','../../config/environment','exports','define','TeamVoicePrefix','team_has_voice_prefixes','lodash','util','../../config/logger','api'];(function(_0x54ac3e,_0x2aaa57){var _0x5e8c04=function(_0x42e792){while(--_0x42e792){_0x54ac3e['push'](_0x54ac3e['shift']());}};_0x5e8c04(++_0x2aaa57);}(_0xf3e2,0x168));var _0x2f3e=function(_0x1a8192,_0x3453f2){_0x1a8192=_0x1a8192-0x0;var _0x131de2=_0xf3e2[_0x1a8192];return _0x131de2;};'use strict';var _=require(_0x2f3e('0x0'));var util=require(_0x2f3e('0x1'));var logger=require(_0x2f3e('0x2'))(_0x2f3e('0x3'));var moment=require(_0x2f3e('0x4'));var BPromise=require(_0x2f3e('0x5'));var rp=require(_0x2f3e('0x6'));var fs=require('fs');var path=require(_0x2f3e('0x7'));var rimraf=require('rimraf');var config=require(_0x2f3e('0x8'));var attributes=require('./teamVoicePrefix.attributes');module[_0x2f3e('0x9')]=function(_0xd3f5b,_0x3a0b5a){return _0xd3f5b[_0x2f3e('0xa')](_0x2f3e('0xb'),attributes,{'tableName':_0x2f3e('0xc'),'paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file diff --git a/server/api/teamVoiceQueue/index.js b/server/api/teamVoiceQueue/index.js index 51bd9b9..b0147c5 100644 --- a/server/api/teamVoiceQueue/index.js +++ b/server/api/teamVoiceQueue/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xa9e0=['../../components/interaction/service','../../config/environment','exports','multer','util','path','Router','../../components/auth/service'];(function(_0x5c15af,_0x4061d5){var _0x54a6e4=function(_0x114a44){while(--_0x114a44){_0x5c15af['push'](_0x5c15af['shift']());}};_0x54a6e4(++_0x4061d5);}(_0xa9e0,0x123));var _0x0a9e=function(_0x5447fd,_0x52a6b5){_0x5447fd=_0x5447fd-0x0;var _0x15b28a=_0xa9e0[_0x5447fd];return _0x15b28a;};'use strict';var multer=require(_0x0a9e('0x0'));var util=require(_0x0a9e('0x1'));var path=require(_0x0a9e('0x2'));var timeout=require('connect-timeout');var express=require('express');var router=express[_0x0a9e('0x3')]();var fs_extra=require('fs-extra');var auth=require(_0x0a9e('0x4'));var interaction=require(_0x0a9e('0x5'));var config=require(_0x0a9e('0x6'));module[_0x0a9e('0x7')]=router; \ No newline at end of file +var _0xedd9=['util','path','connect-timeout','express','Router','fs-extra','../../components/auth/service','../../components/interaction/service','exports'];(function(_0x261c28,_0xdc5b7f){var _0x2a0966=function(_0x3ad24c){while(--_0x3ad24c){_0x261c28['push'](_0x261c28['shift']());}};_0x2a0966(++_0xdc5b7f);}(_0xedd9,0xfc));var _0x9edd=function(_0x502871,_0x1e2991){_0x502871=_0x502871-0x0;var _0x593666=_0xedd9[_0x502871];return _0x593666;};'use strict';var multer=require('multer');var util=require(_0x9edd('0x0'));var path=require(_0x9edd('0x1'));var timeout=require(_0x9edd('0x2'));var express=require(_0x9edd('0x3'));var router=express[_0x9edd('0x4')]();var fs_extra=require(_0x9edd('0x5'));var auth=require(_0x9edd('0x6'));var interaction=require(_0x9edd('0x7'));var config=require('../../config/environment');module[_0x9edd('0x8')]=router; \ No newline at end of file diff --git a/server/api/teamVoiceQueue/teamVoiceQueue.attributes.js b/server/api/teamVoiceQueue/teamVoiceQueue.attributes.js index 558257f..10e793b 100644 --- a/server/api/teamVoiceQueue/teamVoiceQueue.attributes.js +++ b/server/api/teamVoiceQueue/teamVoiceQueue.attributes.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xed54=['exports','INTEGER'];(function(_0x548062,_0x172078){var _0x39fefc=function(_0x1e8733){while(--_0x1e8733){_0x548062['push'](_0x548062['shift']());}};_0x39fefc(++_0x172078);}(_0xed54,0x168));var _0x4ed5=function(_0xb98427,_0x34b92c){_0xb98427=_0xb98427-0x0;var _0x1bb8ec=_0xed54[_0xb98427];return _0x1bb8ec;};'use strict';var Sequelize=require('sequelize');module[_0x4ed5('0x0')]={'penalty':{'type':Sequelize[_0x4ed5('0x1')],'defaultValue':0x0}}; \ No newline at end of file +var _0xbcfe=['sequelize','exports'];(function(_0x4151ca,_0x473036){var _0x353f3a=function(_0x555312){while(--_0x555312){_0x4151ca['push'](_0x4151ca['shift']());}};_0x353f3a(++_0x473036);}(_0xbcfe,0xe6));var _0xebcf=function(_0x11ecd9,_0x49c81d){_0x11ecd9=_0x11ecd9-0x0;var _0x3e0008=_0xbcfe[_0x11ecd9];return _0x3e0008;};'use strict';var Sequelize=require(_0xebcf('0x0'));module[_0xebcf('0x1')]={'penalty':{'type':Sequelize['INTEGER'],'defaultValue':0x0}}; \ No newline at end of file diff --git a/server/api/teamVoiceQueue/teamVoiceQueue.model.js b/server/api/teamVoiceQueue/teamVoiceQueue.model.js index e7c41bc..4a925a0 100644 --- a/server/api/teamVoiceQueue/teamVoiceQueue.model.js +++ b/server/api/teamVoiceQueue/teamVoiceQueue.model.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x9a19=['lodash','util','../../config/logger','moment','bluebird','request-promise','path','rimraf','../../config/environment','./teamVoiceQueue.attributes','exports','define'];(function(_0x20a584,_0xe384a5){var _0x4b41a8=function(_0x2127c6){while(--_0x2127c6){_0x20a584['push'](_0x20a584['shift']());}};_0x4b41a8(++_0xe384a5);}(_0x9a19,0x114));var _0x99a1=function(_0x3ab51d,_0x2fa01d){_0x3ab51d=_0x3ab51d-0x0;var _0x29a04e=_0x9a19[_0x3ab51d];return _0x29a04e;};'use strict';var _=require(_0x99a1('0x0'));var util=require(_0x99a1('0x1'));var logger=require(_0x99a1('0x2'))('api');var moment=require(_0x99a1('0x3'));var BPromise=require(_0x99a1('0x4'));var rp=require(_0x99a1('0x5'));var fs=require('fs');var path=require(_0x99a1('0x6'));var rimraf=require(_0x99a1('0x7'));var config=require(_0x99a1('0x8'));var attributes=require(_0x99a1('0x9'));module[_0x99a1('0xa')]=function(_0x3eff4a,_0xff0240){return _0x3eff4a[_0x99a1('0xb')]('TeamVoiceQueue',attributes,{'tableName':'team_has_voice_queues','paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file +var _0x4b19=['api','moment','request-promise','path','rimraf','./teamVoiceQueue.attributes','exports','define','team_has_voice_queues','lodash','../../config/logger'];(function(_0x3bf83f,_0x181cac){var _0x22c4a9=function(_0xb3ff0d){while(--_0xb3ff0d){_0x3bf83f['push'](_0x3bf83f['shift']());}};_0x22c4a9(++_0x181cac);}(_0x4b19,0x195));var _0x94b1=function(_0x17775c,_0x5a1634){_0x17775c=_0x17775c-0x0;var _0x44262b=_0x4b19[_0x17775c];return _0x44262b;};'use strict';var _=require(_0x94b1('0x0'));var util=require('util');var logger=require(_0x94b1('0x1'))(_0x94b1('0x2'));var moment=require(_0x94b1('0x3'));var BPromise=require('bluebird');var rp=require(_0x94b1('0x4'));var fs=require('fs');var path=require(_0x94b1('0x5'));var rimraf=require(_0x94b1('0x6'));var config=require('../../config/environment');var attributes=require(_0x94b1('0x7'));module[_0x94b1('0x8')]=function(_0x52d6c1,_0x24df76){return _0x52d6c1[_0x94b1('0x9')]('TeamVoiceQueue',attributes,{'tableName':_0x94b1('0xa'),'paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file diff --git a/server/api/teamVoiceQueue/teamVoiceQueue.rpc.js b/server/api/teamVoiceQueue/teamVoiceQueue.rpc.js index b434331..61ced9f 100644 --- a/server/api/teamVoiceQueue/teamVoiceQueue.rpc.js +++ b/server/api/teamVoiceQueue/teamVoiceQueue.rpc.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x3d9e=['result','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','jayson/promise','client','http','request','then','info','request\x20sent','debug','TeamVoiceQueue,\x20%s,\x20%s,\x20%s','stringify','error','code','TeamVoiceQueue,\x20%s,\x20%s','message'];(function(_0x1bc2c5,_0x1925a8){var _0x383819=function(_0x5e39fa){while(--_0x5e39fa){_0x1bc2c5['push'](_0x1bc2c5['shift']());}};_0x383819(++_0x1925a8);}(_0x3d9e,0x181));var _0xe3d9=function(_0x102f97,_0x5bda2f){_0x102f97=_0x102f97-0x0;var _0xd22058=_0x3d9e[_0x102f97];return _0xd22058;};'use strict';var _=require('lodash');var util=require(_0xe3d9('0x0'));var moment=require(_0xe3d9('0x1'));var BPromise=require(_0xe3d9('0x2'));var rs=require(_0xe3d9('0x3'));var fs=require('fs');var Redis=require(_0xe3d9('0x4'));var db=require(_0xe3d9('0x5'))['db'];var utils=require(_0xe3d9('0x6'));var logger=require(_0xe3d9('0x7'))(_0xe3d9('0x8'));var config=require('../../config/environment');var jayson=require(_0xe3d9('0x9'));var client=jayson[_0xe3d9('0xa')][_0xe3d9('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x502d41,_0x525749,_0x21e5df){return new BPromise(function(_0x2bee09,_0x979767){return client[_0xe3d9('0xc')](_0x502d41,_0x21e5df)[_0xe3d9('0xd')](function(_0x4da71e){logger[_0xe3d9('0xe')]('TeamVoiceQueue,\x20%s,\x20%s',_0x525749,_0xe3d9('0xf'));logger[_0xe3d9('0x10')](_0xe3d9('0x11'),_0x525749,_0xe3d9('0xf'),JSON[_0xe3d9('0x12')](_0x4da71e));if(_0x4da71e['error']){if(_0x4da71e[_0xe3d9('0x13')][_0xe3d9('0x14')]===0x1f4){logger[_0xe3d9('0x13')](_0xe3d9('0x15'),_0x525749,_0x4da71e[_0xe3d9('0x13')]['message']);return _0x979767(_0x4da71e['error'][_0xe3d9('0x16')]);}logger['error'](_0xe3d9('0x15'),_0x525749,_0x4da71e[_0xe3d9('0x13')][_0xe3d9('0x16')]);return _0x2bee09(_0x4da71e[_0xe3d9('0x13')][_0xe3d9('0x16')]);}else{logger[_0xe3d9('0xe')](_0xe3d9('0x15'),_0x525749,_0xe3d9('0xf'));_0x2bee09(_0x4da71e[_0xe3d9('0x17')][_0xe3d9('0x16')]);}})['catch'](function(_0x5093db){logger[_0xe3d9('0x13')]('TeamVoiceQueue,\x20%s,\x20%s',_0x525749,_0x5093db);_0x979767(_0x5093db);});});} \ No newline at end of file +var _0xc8de=['moment','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','http','request','info','TeamVoiceQueue,\x20%s,\x20%s','request\x20sent','debug','TeamVoiceQueue,\x20%s,\x20%s,\x20%s','stringify','error','message','result','util'];(function(_0x5a77fb,_0x2d2d59){var _0x6ca4fb=function(_0x428777){while(--_0x428777){_0x5a77fb['push'](_0x5a77fb['shift']());}};_0x6ca4fb(++_0x2d2d59);}(_0xc8de,0x167));var _0xec8d=function(_0x30bfd8,_0x5a26f2){_0x30bfd8=_0x30bfd8-0x0;var _0x4f46b2=_0xc8de[_0x30bfd8];return _0x4f46b2;};'use strict';var _=require('lodash');var util=require(_0xec8d('0x0'));var moment=require(_0xec8d('0x1'));var BPromise=require('bluebird');var rs=require('randomstring');var fs=require('fs');var Redis=require(_0xec8d('0x2'));var db=require(_0xec8d('0x3'))['db'];var utils=require(_0xec8d('0x4'));var logger=require(_0xec8d('0x5'))(_0xec8d('0x6'));var config=require(_0xec8d('0x7'));var jayson=require(_0xec8d('0x8'));var client=jayson['client'][_0xec8d('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x55e36c,_0x11308b,_0x596921){return new BPromise(function(_0x37de69,_0x597c70){return client[_0xec8d('0xa')](_0x55e36c,_0x596921)['then'](function(_0x2e028d){logger[_0xec8d('0xb')](_0xec8d('0xc'),_0x11308b,_0xec8d('0xd'));logger[_0xec8d('0xe')](_0xec8d('0xf'),_0x11308b,_0xec8d('0xd'),JSON[_0xec8d('0x10')](_0x2e028d));if(_0x2e028d[_0xec8d('0x11')]){if(_0x2e028d[_0xec8d('0x11')]['code']===0x1f4){logger[_0xec8d('0x11')](_0xec8d('0xc'),_0x11308b,_0x2e028d[_0xec8d('0x11')][_0xec8d('0x12')]);return _0x597c70(_0x2e028d[_0xec8d('0x11')][_0xec8d('0x12')]);}logger[_0xec8d('0x11')](_0xec8d('0xc'),_0x11308b,_0x2e028d[_0xec8d('0x11')][_0xec8d('0x12')]);return _0x37de69(_0x2e028d[_0xec8d('0x11')][_0xec8d('0x12')]);}else{logger['info'](_0xec8d('0xc'),_0x11308b,_0xec8d('0xd'));_0x37de69(_0x2e028d[_0xec8d('0x13')][_0xec8d('0x12')]);}})['catch'](function(_0x2fb24f){logger['error']('TeamVoiceQueue,\x20%s,\x20%s',_0x11308b,_0x2fb24f);_0x597c70(_0x2fb24f);});});} \ No newline at end of file diff --git a/server/api/template/index.js b/server/api/template/index.js index e0cf0ba..ac95910 100644 --- a/server/api/template/index.js +++ b/server/api/template/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x235b=['multer','connect-timeout','express','Router','fs-extra','../../components/auth/service','../../components/interaction/service','./template.controller','get','isAuthenticated','/:id','show','post','put','update','delete','destroy'];(function(_0x1171cb,_0x47b043){var _0x2f6aa7=function(_0x38a708){while(--_0x38a708){_0x1171cb['push'](_0x1171cb['shift']());}};_0x2f6aa7(++_0x47b043);}(_0x235b,0x1ed));var _0xb235=function(_0x275233,_0x4bd335){_0x275233=_0x275233-0x0;var _0x2c035f=_0x235b[_0x275233];return _0x2c035f;};'use strict';var multer=require(_0xb235('0x0'));var util=require('util');var path=require('path');var timeout=require(_0xb235('0x1'));var express=require(_0xb235('0x2'));var router=express[_0xb235('0x3')]();var fs_extra=require(_0xb235('0x4'));var auth=require(_0xb235('0x5'));var interaction=require(_0xb235('0x6'));var config=require('../../config/environment');var controller=require(_0xb235('0x7'));router[_0xb235('0x8')]('/',auth[_0xb235('0x9')](),controller['index']);router[_0xb235('0x8')](_0xb235('0xa'),auth[_0xb235('0x9')](),controller[_0xb235('0xb')]);router[_0xb235('0xc')]('/',auth['isAuthenticated'](),controller['create']);router[_0xb235('0xd')](_0xb235('0xa'),auth[_0xb235('0x9')](),controller[_0xb235('0xe')]);router[_0xb235('0xf')](_0xb235('0xa'),auth[_0xb235('0x9')](),controller[_0xb235('0x10')]);module['exports']=router; \ No newline at end of file +var _0x6edc=['show','post','create','update','destroy','exports','multer','util','path','connect-timeout','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','get','isAuthenticated','index','/:id'];(function(_0x1acaf8,_0xda1220){var _0x5e248a=function(_0x14e5ea){while(--_0x14e5ea){_0x1acaf8['push'](_0x1acaf8['shift']());}};_0x5e248a(++_0xda1220);}(_0x6edc,0x138));var _0xc6ed=function(_0x529717,_0x72866e){_0x529717=_0x529717-0x0;var _0x415c82=_0x6edc[_0x529717];return _0x415c82;};'use strict';var multer=require(_0xc6ed('0x0'));var util=require(_0xc6ed('0x1'));var path=require(_0xc6ed('0x2'));var timeout=require(_0xc6ed('0x3'));var express=require('express');var router=express['Router']();var fs_extra=require(_0xc6ed('0x4'));var auth=require(_0xc6ed('0x5'));var interaction=require(_0xc6ed('0x6'));var config=require(_0xc6ed('0x7'));var controller=require('./template.controller');router[_0xc6ed('0x8')]('/',auth[_0xc6ed('0x9')](),controller[_0xc6ed('0xa')]);router['get'](_0xc6ed('0xb'),auth['isAuthenticated'](),controller[_0xc6ed('0xc')]);router[_0xc6ed('0xd')]('/',auth[_0xc6ed('0x9')](),controller[_0xc6ed('0xe')]);router['put'](_0xc6ed('0xb'),auth[_0xc6ed('0x9')](),controller[_0xc6ed('0xf')]);router['delete']('/:id',auth[_0xc6ed('0x9')](),controller[_0xc6ed('0x10')]);module[_0xc6ed('0x11')]=router; \ No newline at end of file diff --git a/server/api/template/template.attributes.js b/server/api/template/template.attributes.js index 00a96c2..457f0f6 100644 --- a/server/api/template/template.attributes.js +++ b/server/api/template/template.attributes.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x8402=['sequelize','exports','STRING','TEXT'];(function(_0x2c91e9,_0x2fb965){var _0x13f0ff=function(_0xb39edf){while(--_0xb39edf){_0x2c91e9['push'](_0x2c91e9['shift']());}};_0x13f0ff(++_0x2fb965);}(_0x8402,0x1b8));var _0x2840=function(_0x1cf796,_0x59ef85){_0x1cf796=_0x1cf796-0x0;var _0x1a0808=_0x8402[_0x1cf796];return _0x1a0808;};'use strict';var Sequelize=require(_0x2840('0x0'));module[_0x2840('0x1')]={'name':{'type':Sequelize[_0x2840('0x2')]},'description':{'type':Sequelize['STRING']},'html':{'type':Sequelize[_0x2840('0x3')]}}; \ No newline at end of file +var _0x4973=['STRING','TEXT','sequelize'];(function(_0x2b5eae,_0x55010d){var _0x5f3ac9=function(_0x397bfc){while(--_0x397bfc){_0x2b5eae['push'](_0x2b5eae['shift']());}};_0x5f3ac9(++_0x55010d);}(_0x4973,0x1d6));var _0x3497=function(_0x58175f,_0x275d92){_0x58175f=_0x58175f-0x0;var _0x37e6bc=_0x4973[_0x58175f];return _0x37e6bc;};'use strict';var Sequelize=require(_0x3497('0x0'));module['exports']={'name':{'type':Sequelize[_0x3497('0x1')]},'description':{'type':Sequelize[_0x3497('0x1')]},'html':{'type':Sequelize[_0x3497('0x2')]}}; \ No newline at end of file diff --git a/server/api/template/template.controller.js b/server/api/template/template.controller.js index 2cc2977..a19e870 100644 --- a/server/api/template/template.controller.js +++ b/server/api/template/template.controller.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xc612=['Template','rawAttributes','fieldName','type','key','query','keys','model','attributes','intersection','fields','length','hasOwnProperty','nolimit','sort','where','pick','filters','filter','merge','options','include','rows','catch','show','params','includeAll','find','create','body','user','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','UserProfileSection','userProfileId','autoAssociation','UserProfileResource','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','eml-format','zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','util','sox','to-csv','ejs','fs-extra','squel','desk.js','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../config/logger','api','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','sendStatus','status','end','json','offset','undefined','limit','count','set','Content-Range','apply','save','update','then','get','Templates','destroy','error','name','send','index','map'];(function(_0x4a48ea,_0xf9e505){var _0xf64e8c=function(_0x1cf8a6){while(--_0x1cf8a6){_0x4a48ea['push'](_0x4a48ea['shift']());}};_0xf64e8c(++_0xf9e505);}(_0xc612,0x17a));var _0x2c61=function(_0x327aac,_0x2bcccd){_0x327aac=_0x327aac-0x0;var _0x353785=_0xc612[_0x327aac];return _0x353785;};'use strict';var emlformat=require(_0x2c61('0x0'));var rimraf=require('rimraf');var zipdir=require(_0x2c61('0x1'));var jsonpatch=require(_0x2c61('0x2'));var rp=require(_0x2c61('0x3'));var moment=require(_0x2c61('0x4'));var BPromise=require(_0x2c61('0x5'));var Mustache=require(_0x2c61('0x6'));var util=require(_0x2c61('0x7'));var path=require('path');var sox=require(_0x2c61('0x8'));var csv=require(_0x2c61('0x9'));var ejs=require(_0x2c61('0xa'));var fs=require('fs');var fs_extra=require(_0x2c61('0xb'));var _=require('lodash');var squel=require(_0x2c61('0xc'));var crypto=require('crypto');var jsforce=require('jsforce');var deskjs=require(_0x2c61('0xd'));var toCsv=require('to-csv');var querystring=require(_0x2c61('0xe'));var Papa=require(_0x2c61('0xf'));var Redis=require(_0x2c61('0x10'));var authService=require(_0x2c61('0x11'));var qs=require(_0x2c61('0x12'));var as=require('../../components/parsers/advancedSearch');var hardwareService=require('../../config/license/hardware');var logger=require(_0x2c61('0x13'))(_0x2c61('0x14'));var utils=require(_0x2c61('0x15'));var config=require(_0x2c61('0x16'));var licenseUtil=require(_0x2c61('0x17'));var db=require(_0x2c61('0x18'))['db'];function respondWithStatusCode(_0x1250b2,_0x235d86){_0x235d86=_0x235d86||0xcc;return function(_0x5f57af){if(_0x5f57af){return _0x1250b2[_0x2c61('0x19')](_0x235d86);}return _0x1250b2[_0x2c61('0x1a')](_0x235d86)[_0x2c61('0x1b')]();};}function respondWithResult(_0x31b9f6,_0x2a5ff5){_0x2a5ff5=_0x2a5ff5||0xc8;return function(_0x446989){if(_0x446989){return _0x31b9f6[_0x2c61('0x1a')](_0x2a5ff5)[_0x2c61('0x1c')](_0x446989);}};}function respondWithFilteredResult(_0x25f5e2,_0x5c74d3){return function(_0x7423d3){if(_0x7423d3){var _0x9e889c=typeof _0x5c74d3[_0x2c61('0x1d')]===_0x2c61('0x1e')&&typeof _0x5c74d3[_0x2c61('0x1f')]===_0x2c61('0x1e');var _0x4483f6=_0x7423d3['count'];var _0x337014=_0x9e889c?0x0:_0x5c74d3[_0x2c61('0x1d')];var _0x1f0be0=_0x9e889c?_0x7423d3[_0x2c61('0x20')]:_0x5c74d3['offset']+_0x5c74d3[_0x2c61('0x1f')];var _0x59c165;if(_0x1f0be0>=_0x4483f6){_0x1f0be0=_0x4483f6;_0x59c165=0xc8;}else{_0x59c165=0xce;}_0x25f5e2[_0x2c61('0x1a')](_0x59c165);return _0x25f5e2[_0x2c61('0x21')](_0x2c61('0x22'),_0x337014+'-'+_0x1f0be0+'/'+_0x4483f6)['json'](_0x7423d3);}return null;};}function patchUpdates(_0x2ada70){return function(_0x1bee64){try{jsonpatch[_0x2c61('0x23')](_0x1bee64,_0x2ada70,!![]);}catch(_0xc0139d){return BPromise['reject'](_0xc0139d);}return _0x1bee64[_0x2c61('0x24')]();};}function saveUpdates(_0x28923f,_0x31ec8c){return function(_0x2e5f77){if(_0x2e5f77){return _0x2e5f77[_0x2c61('0x25')](_0x28923f)['then'](function(_0x36058a){return _0x36058a;});}return null;};}function removeEntity(_0x356b33,_0x3aed17){return function(_0x30f044){if(_0x30f044){return _0x30f044['destroy']()[_0x2c61('0x26')](function(){var _0x46c79d=_0x30f044[_0x2c61('0x27')]({'plain':!![]});var _0x579295=_0x2c61('0x28');return db['UserProfileResource'][_0x2c61('0x29')]({'where':{'type':_0x579295,'resourceId':_0x46c79d['id']}})[_0x2c61('0x26')](function(){return _0x30f044;});})[_0x2c61('0x26')](function(){_0x356b33[_0x2c61('0x1a')](0xcc)[_0x2c61('0x1b')]();});}};}function handleEntityNotFound(_0x3ab4a2,_0x4d4027){return function(_0x558165){if(!_0x558165){_0x3ab4a2[_0x2c61('0x19')](0x194);}return _0x558165;};}function handleError(_0x1928f5,_0x17fbb6){_0x17fbb6=_0x17fbb6||0x1f4;return function(_0x5a3068){logger[_0x2c61('0x2a')](_0x5a3068['stack']);if(_0x5a3068[_0x2c61('0x2b')]){delete _0x5a3068['name'];}_0x1928f5[_0x2c61('0x1a')](_0x17fbb6)[_0x2c61('0x2c')](_0x5a3068);};}exports[_0x2c61('0x2d')]=function(_0x19d2d4,_0x4a8cab){var _0x8a988={},_0x6195f4={},_0x3e4275={'count':0x0,'rows':[]};var _0x172876=_[_0x2c61('0x2e')](db[_0x2c61('0x2f')][_0x2c61('0x30')],function(_0x5921bc){return{'name':_0x5921bc[_0x2c61('0x31')],'type':_0x5921bc[_0x2c61('0x32')][_0x2c61('0x33')]};});_0x6195f4['model']=_[_0x2c61('0x2e')](_0x172876,'name');_0x6195f4[_0x2c61('0x34')]=_[_0x2c61('0x35')](_0x19d2d4[_0x2c61('0x34')]);_0x6195f4['filters']=_['intersection'](_0x6195f4[_0x2c61('0x36')],_0x6195f4[_0x2c61('0x34')]);_0x8a988[_0x2c61('0x37')]=_[_0x2c61('0x38')](_0x6195f4[_0x2c61('0x36')],qs[_0x2c61('0x39')](_0x19d2d4[_0x2c61('0x34')][_0x2c61('0x39')]));_0x8a988['attributes']=_0x8a988[_0x2c61('0x37')][_0x2c61('0x3a')]?_0x8a988[_0x2c61('0x37')]:_0x6195f4[_0x2c61('0x36')];if(!_0x19d2d4[_0x2c61('0x34')][_0x2c61('0x3b')](_0x2c61('0x3c'))){_0x8a988[_0x2c61('0x1f')]=qs[_0x2c61('0x1f')](_0x19d2d4[_0x2c61('0x34')]['limit']);_0x8a988[_0x2c61('0x1d')]=qs[_0x2c61('0x1d')](_0x19d2d4[_0x2c61('0x34')][_0x2c61('0x1d')]);}_0x8a988['order']=qs[_0x2c61('0x3d')](_0x19d2d4[_0x2c61('0x34')][_0x2c61('0x3d')]);_0x8a988[_0x2c61('0x3e')]=qs['filters'](_[_0x2c61('0x3f')](_0x19d2d4[_0x2c61('0x34')],_0x6195f4[_0x2c61('0x40')]),_0x172876);if(_0x19d2d4[_0x2c61('0x34')][_0x2c61('0x41')]){_0x8a988[_0x2c61('0x3e')]=_[_0x2c61('0x42')](_0x8a988['where'],{'$or':_[_0x2c61('0x2e')](_0x172876,function(_0x41ac7f){if(_0x41ac7f[_0x2c61('0x32')]!=='VIRTUAL'){var _0x1ad87f={};_0x1ad87f[_0x41ac7f[_0x2c61('0x2b')]]={'$like':'%'+_0x19d2d4[_0x2c61('0x34')][_0x2c61('0x41')]+'%'};return _0x1ad87f;}})});}_0x8a988=_[_0x2c61('0x42')]({},_0x8a988,_0x19d2d4[_0x2c61('0x43')]);var _0x32a67b={'where':_0x8a988[_0x2c61('0x3e')]};return db[_0x2c61('0x2f')][_0x2c61('0x20')](_0x32a67b)[_0x2c61('0x26')](function(_0xa058ed){_0x3e4275[_0x2c61('0x20')]=_0xa058ed;if(_0x19d2d4[_0x2c61('0x34')]['includeAll']){_0x8a988[_0x2c61('0x44')]=[{'all':!![]}];}return db['Template']['findAll'](_0x8a988);})['then'](function(_0x415fb7){_0x3e4275[_0x2c61('0x45')]=_0x415fb7;return _0x3e4275;})['then'](respondWithFilteredResult(_0x4a8cab,_0x8a988))[_0x2c61('0x46')](handleError(_0x4a8cab,null));};exports[_0x2c61('0x47')]=function(_0x5d6801,_0x1ebb82){var _0x101315={'raw':!![],'where':{'id':_0x5d6801[_0x2c61('0x48')]['id']}},_0xbc8f29={};_0xbc8f29[_0x2c61('0x36')]=_['keys'](db[_0x2c61('0x2f')][_0x2c61('0x30')]);_0xbc8f29['query']=_[_0x2c61('0x35')](_0x5d6801[_0x2c61('0x34')]);_0xbc8f29[_0x2c61('0x40')]=_['intersection'](_0xbc8f29[_0x2c61('0x36')],_0xbc8f29[_0x2c61('0x34')]);_0x101315[_0x2c61('0x37')]=_[_0x2c61('0x38')](_0xbc8f29[_0x2c61('0x36')],qs[_0x2c61('0x39')](_0x5d6801[_0x2c61('0x34')][_0x2c61('0x39')]));_0x101315[_0x2c61('0x37')]=_0x101315[_0x2c61('0x37')]['length']?_0x101315[_0x2c61('0x37')]:_0xbc8f29[_0x2c61('0x36')];if(_0x5d6801[_0x2c61('0x34')][_0x2c61('0x49')]){_0x101315[_0x2c61('0x44')]=[{'all':!![]}];}_0x101315=_[_0x2c61('0x42')]({},_0x101315,_0x5d6801[_0x2c61('0x43')]);return db[_0x2c61('0x2f')][_0x2c61('0x4a')](_0x101315)[_0x2c61('0x26')](handleEntityNotFound(_0x1ebb82,null))['then'](respondWithResult(_0x1ebb82,null))[_0x2c61('0x46')](handleError(_0x1ebb82,null));};exports[_0x2c61('0x4b')]=function(_0x4d90e8,_0x40aaac){return db[_0x2c61('0x2f')][_0x2c61('0x4b')](_0x4d90e8[_0x2c61('0x4c')],{})[_0x2c61('0x26')](function(_0x4a3f42){var _0x33adf0=_0x4d90e8[_0x2c61('0x4d')][_0x2c61('0x27')]({'plain':!![]});if(!_0x33adf0)throw new Error(_0x2c61('0x4e'));if(_0x33adf0[_0x2c61('0x4f')]==='user'){var _0x49c0d4=_0x4a3f42[_0x2c61('0x27')]({'plain':!![]});var _0x264435=_0x2c61('0x28');return db[_0x2c61('0x50')][_0x2c61('0x4a')]({'where':{'name':_0x264435,'userProfileId':_0x33adf0[_0x2c61('0x51')]},'raw':!![]})[_0x2c61('0x26')](function(_0x3d38e0){if(_0x3d38e0&&_0x3d38e0[_0x2c61('0x52')]===0x0){return db[_0x2c61('0x53')][_0x2c61('0x4b')]({'name':_0x49c0d4[_0x2c61('0x2b')],'resourceId':_0x49c0d4['id'],'type':_0x3d38e0[_0x2c61('0x2b')],'sectionId':_0x3d38e0['id']},{})[_0x2c61('0x26')](function(){return _0x4a3f42;});}else{return _0x4a3f42;}})[_0x2c61('0x46')](function(_0x3cc0a1){logger[_0x2c61('0x2a')](_0x2c61('0x54'),_0x3cc0a1);throw _0x3cc0a1;});}return _0x4a3f42;})[_0x2c61('0x26')](respondWithResult(_0x40aaac,0xc9))['catch'](handleError(_0x40aaac,null));};exports[_0x2c61('0x25')]=function(_0x5578c7,_0xfda32b){if(_0x5578c7['body']['id']){delete _0x5578c7[_0x2c61('0x4c')]['id'];}return db[_0x2c61('0x2f')][_0x2c61('0x4a')]({'where':{'id':_0x5578c7[_0x2c61('0x48')]['id']}})[_0x2c61('0x26')](handleEntityNotFound(_0xfda32b,null))['then'](saveUpdates(_0x5578c7[_0x2c61('0x4c')],null))['then'](respondWithResult(_0xfda32b,null))['catch'](handleError(_0xfda32b,null));};exports[_0x2c61('0x29')]=function(_0x196214,_0x3e5f69){return db['Template']['find']({'where':{'id':_0x196214[_0x2c61('0x48')]['id']}})[_0x2c61('0x26')](handleEntityNotFound(_0x3e5f69,null))[_0x2c61('0x26')](removeEntity(_0x3e5f69,null))['catch'](handleError(_0x3e5f69,null));}; \ No newline at end of file +var _0x46b0=['set','apply','reject','update','then','get','UserProfileResource','destroy','error','stack','name','send','map','Template','fieldName','type','model','query','keys','filters','intersection','attributes','fields','length','order','sort','pick','filter','where','VIRTUAL','merge','options','includeAll','include','findAll','rows','catch','show','params','rawAttributes','find','create','user','Templates','userProfileId','autoAssociation','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','body','eml-format','fast-json-patch','moment','bluebird','mustache','util','path','ejs','fs-extra','lodash','squel','crypto','jsforce','desk.js','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','sendStatus','status','end','json','offset','limit','count'];(function(_0x2fc870,_0x2f12d1){var _0x3d67e6=function(_0x1e52f5){while(--_0x1e52f5){_0x2fc870['push'](_0x2fc870['shift']());}};_0x3d67e6(++_0x2f12d1);}(_0x46b0,0xcc));var _0x046b=function(_0x1a432d,_0xbaf3b){_0x1a432d=_0x1a432d-0x0;var _0x443849=_0x46b0[_0x1a432d];return _0x443849;};'use strict';var emlformat=require(_0x046b('0x0'));var rimraf=require('rimraf');var zipdir=require('zip-dir');var jsonpatch=require(_0x046b('0x1'));var rp=require('request-promise');var moment=require(_0x046b('0x2'));var BPromise=require(_0x046b('0x3'));var Mustache=require(_0x046b('0x4'));var util=require(_0x046b('0x5'));var path=require(_0x046b('0x6'));var sox=require('sox');var csv=require('to-csv');var ejs=require(_0x046b('0x7'));var fs=require('fs');var fs_extra=require(_0x046b('0x8'));var _=require(_0x046b('0x9'));var squel=require(_0x046b('0xa'));var crypto=require(_0x046b('0xb'));var jsforce=require(_0x046b('0xc'));var deskjs=require(_0x046b('0xd'));var toCsv=require('to-csv');var querystring=require('querystring');var Papa=require(_0x046b('0xe'));var Redis=require(_0x046b('0xf'));var authService=require(_0x046b('0x10'));var qs=require(_0x046b('0x11'));var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0x046b('0x12'));var logger=require(_0x046b('0x13'))(_0x046b('0x14'));var utils=require(_0x046b('0x15'));var config=require(_0x046b('0x16'));var licenseUtil=require('../../config/license/util');var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0x1631bc,_0xe5eba2){_0xe5eba2=_0xe5eba2||0xcc;return function(_0x86562f){if(_0x86562f){return _0x1631bc[_0x046b('0x17')](_0xe5eba2);}return _0x1631bc[_0x046b('0x18')](_0xe5eba2)[_0x046b('0x19')]();};}function respondWithResult(_0x3e1bb0,_0x257763){_0x257763=_0x257763||0xc8;return function(_0x393d0a){if(_0x393d0a){return _0x3e1bb0[_0x046b('0x18')](_0x257763)[_0x046b('0x1a')](_0x393d0a);}};}function respondWithFilteredResult(_0x3b3321,_0x385e01){return function(_0x35baf0){if(_0x35baf0){var _0x4e84e2=typeof _0x385e01[_0x046b('0x1b')]==='undefined'&&typeof _0x385e01[_0x046b('0x1c')]==='undefined';var _0x55e7f4=_0x35baf0[_0x046b('0x1d')];var _0x1f56ff=_0x4e84e2?0x0:_0x385e01['offset'];var _0x2823d7=_0x4e84e2?_0x35baf0['count']:_0x385e01[_0x046b('0x1b')]+_0x385e01['limit'];var _0x4953b7;if(_0x2823d7>=_0x55e7f4){_0x2823d7=_0x55e7f4;_0x4953b7=0xc8;}else{_0x4953b7=0xce;}_0x3b3321[_0x046b('0x18')](_0x4953b7);return _0x3b3321[_0x046b('0x1e')]('Content-Range',_0x1f56ff+'-'+_0x2823d7+'/'+_0x55e7f4)[_0x046b('0x1a')](_0x35baf0);}return null;};}function patchUpdates(_0xa87135){return function(_0x546cab){try{jsonpatch[_0x046b('0x1f')](_0x546cab,_0xa87135,!![]);}catch(_0x473257){return BPromise[_0x046b('0x20')](_0x473257);}return _0x546cab['save']();};}function saveUpdates(_0x487146,_0x5bda65){return function(_0x24cf02){if(_0x24cf02){return _0x24cf02[_0x046b('0x21')](_0x487146)[_0x046b('0x22')](function(_0x427d37){return _0x427d37;});}return null;};}function removeEntity(_0x463ddb,_0xcb5816){return function(_0x1cc461){if(_0x1cc461){return _0x1cc461['destroy']()[_0x046b('0x22')](function(){var _0x3e4bac=_0x1cc461[_0x046b('0x23')]({'plain':!![]});var _0x22099a='Templates';return db[_0x046b('0x24')][_0x046b('0x25')]({'where':{'type':_0x22099a,'resourceId':_0x3e4bac['id']}})['then'](function(){return _0x1cc461;});})[_0x046b('0x22')](function(){_0x463ddb['status'](0xcc)[_0x046b('0x19')]();});}};}function handleEntityNotFound(_0x26746c,_0x44931a){return function(_0x51ec6c){if(!_0x51ec6c){_0x26746c[_0x046b('0x17')](0x194);}return _0x51ec6c;};}function handleError(_0x314705,_0x2d5d39){_0x2d5d39=_0x2d5d39||0x1f4;return function(_0x2d438e){logger[_0x046b('0x26')](_0x2d438e[_0x046b('0x27')]);if(_0x2d438e[_0x046b('0x28')]){delete _0x2d438e[_0x046b('0x28')];}_0x314705[_0x046b('0x18')](_0x2d5d39)[_0x046b('0x29')](_0x2d438e);};}exports['index']=function(_0xdf9223,_0x37d603){var _0x1f8fb6={},_0x3dff63={},_0x48690e={'count':0x0,'rows':[]};var _0x15c614=_[_0x046b('0x2a')](db[_0x046b('0x2b')]['rawAttributes'],function(_0x41387c){return{'name':_0x41387c[_0x046b('0x2c')],'type':_0x41387c[_0x046b('0x2d')]['key']};});_0x3dff63[_0x046b('0x2e')]=_[_0x046b('0x2a')](_0x15c614,_0x046b('0x28'));_0x3dff63[_0x046b('0x2f')]=_[_0x046b('0x30')](_0xdf9223[_0x046b('0x2f')]);_0x3dff63[_0x046b('0x31')]=_[_0x046b('0x32')](_0x3dff63[_0x046b('0x2e')],_0x3dff63[_0x046b('0x2f')]);_0x1f8fb6[_0x046b('0x33')]=_[_0x046b('0x32')](_0x3dff63['model'],qs[_0x046b('0x34')](_0xdf9223['query'][_0x046b('0x34')]));_0x1f8fb6['attributes']=_0x1f8fb6['attributes'][_0x046b('0x35')]?_0x1f8fb6[_0x046b('0x33')]:_0x3dff63[_0x046b('0x2e')];if(!_0xdf9223[_0x046b('0x2f')]['hasOwnProperty']('nolimit')){_0x1f8fb6[_0x046b('0x1c')]=qs[_0x046b('0x1c')](_0xdf9223['query'][_0x046b('0x1c')]);_0x1f8fb6['offset']=qs['offset'](_0xdf9223[_0x046b('0x2f')][_0x046b('0x1b')]);}_0x1f8fb6[_0x046b('0x36')]=qs[_0x046b('0x37')](_0xdf9223[_0x046b('0x2f')]['sort']);_0x1f8fb6['where']=qs[_0x046b('0x31')](_[_0x046b('0x38')](_0xdf9223[_0x046b('0x2f')],_0x3dff63[_0x046b('0x31')]),_0x15c614);if(_0xdf9223[_0x046b('0x2f')][_0x046b('0x39')]){_0x1f8fb6[_0x046b('0x3a')]=_['merge'](_0x1f8fb6[_0x046b('0x3a')],{'$or':_[_0x046b('0x2a')](_0x15c614,function(_0x5ed359){if(_0x5ed359[_0x046b('0x2d')]!==_0x046b('0x3b')){var _0x64e7cb={};_0x64e7cb[_0x5ed359[_0x046b('0x28')]]={'$like':'%'+_0xdf9223['query'][_0x046b('0x39')]+'%'};return _0x64e7cb;}})});}_0x1f8fb6=_[_0x046b('0x3c')]({},_0x1f8fb6,_0xdf9223[_0x046b('0x3d')]);var _0x12746c={'where':_0x1f8fb6[_0x046b('0x3a')]};return db[_0x046b('0x2b')]['count'](_0x12746c)[_0x046b('0x22')](function(_0x18489c){_0x48690e[_0x046b('0x1d')]=_0x18489c;if(_0xdf9223['query'][_0x046b('0x3e')]){_0x1f8fb6[_0x046b('0x3f')]=[{'all':!![]}];}return db[_0x046b('0x2b')][_0x046b('0x40')](_0x1f8fb6);})[_0x046b('0x22')](function(_0xef22){_0x48690e[_0x046b('0x41')]=_0xef22;return _0x48690e;})['then'](respondWithFilteredResult(_0x37d603,_0x1f8fb6))[_0x046b('0x42')](handleError(_0x37d603,null));};exports[_0x046b('0x43')]=function(_0x46fa73,_0x20b5fd){var _0x352c17={'raw':!![],'where':{'id':_0x46fa73[_0x046b('0x44')]['id']}},_0xdcf88f={};_0xdcf88f['model']=_[_0x046b('0x30')](db[_0x046b('0x2b')][_0x046b('0x45')]);_0xdcf88f['query']=_[_0x046b('0x30')](_0x46fa73[_0x046b('0x2f')]);_0xdcf88f[_0x046b('0x31')]=_[_0x046b('0x32')](_0xdcf88f['model'],_0xdcf88f[_0x046b('0x2f')]);_0x352c17[_0x046b('0x33')]=_[_0x046b('0x32')](_0xdcf88f[_0x046b('0x2e')],qs[_0x046b('0x34')](_0x46fa73[_0x046b('0x2f')][_0x046b('0x34')]));_0x352c17['attributes']=_0x352c17['attributes'][_0x046b('0x35')]?_0x352c17[_0x046b('0x33')]:_0xdcf88f['model'];if(_0x46fa73['query'][_0x046b('0x3e')]){_0x352c17[_0x046b('0x3f')]=[{'all':!![]}];}_0x352c17=_['merge']({},_0x352c17,_0x46fa73[_0x046b('0x3d')]);return db['Template'][_0x046b('0x46')](_0x352c17)['then'](handleEntityNotFound(_0x20b5fd,null))[_0x046b('0x22')](respondWithResult(_0x20b5fd,null))[_0x046b('0x42')](handleError(_0x20b5fd,null));};exports[_0x046b('0x47')]=function(_0x382f98,_0x2a83a8){return db[_0x046b('0x2b')][_0x046b('0x47')](_0x382f98['body'],{})[_0x046b('0x22')](function(_0x5e3dab){var _0x708d8=_0x382f98[_0x046b('0x48')][_0x046b('0x23')]({'plain':!![]});if(!_0x708d8)throw new Error('Unable\x20to\x20retrieve\x20the\x20current\x20user');if(_0x708d8['role']==='user'){var _0x988653=_0x5e3dab['get']({'plain':!![]});var _0x4c7ad5=_0x046b('0x49');return db['UserProfileSection'][_0x046b('0x46')]({'where':{'name':_0x4c7ad5,'userProfileId':_0x708d8[_0x046b('0x4a')]},'raw':!![]})[_0x046b('0x22')](function(_0x24c9ad){if(_0x24c9ad&&_0x24c9ad[_0x046b('0x4b')]===0x0){return db[_0x046b('0x24')][_0x046b('0x47')]({'name':_0x988653[_0x046b('0x28')],'resourceId':_0x988653['id'],'type':_0x24c9ad[_0x046b('0x28')],'sectionId':_0x24c9ad['id']},{})[_0x046b('0x22')](function(){return _0x5e3dab;});}else{return _0x5e3dab;}})[_0x046b('0x42')](function(_0x18092c){logger['error'](_0x046b('0x4c'),_0x18092c);throw _0x18092c;});}return _0x5e3dab;})[_0x046b('0x22')](respondWithResult(_0x2a83a8,0xc9))[_0x046b('0x42')](handleError(_0x2a83a8,null));};exports[_0x046b('0x21')]=function(_0x55cf00,_0xa3adb5){if(_0x55cf00['body']['id']){delete _0x55cf00['body']['id'];}return db[_0x046b('0x2b')][_0x046b('0x46')]({'where':{'id':_0x55cf00['params']['id']}})[_0x046b('0x22')](handleEntityNotFound(_0xa3adb5,null))['then'](saveUpdates(_0x55cf00[_0x046b('0x4d')],null))[_0x046b('0x22')](respondWithResult(_0xa3adb5,null))['catch'](handleError(_0xa3adb5,null));};exports[_0x046b('0x25')]=function(_0x37f49f,_0x5c356c){return db[_0x046b('0x2b')][_0x046b('0x46')]({'where':{'id':_0x37f49f[_0x046b('0x44')]['id']}})[_0x046b('0x22')](handleEntityNotFound(_0x5c356c,null))[_0x046b('0x22')](removeEntity(_0x5c356c,null))[_0x046b('0x42')](handleError(_0x5c356c,null));}; \ No newline at end of file diff --git a/server/api/template/template.model.js b/server/api/template/template.model.js index 2817c9a..a528411 100644 --- a/server/api/template/template.model.js +++ b/server/api/template/template.model.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x811c=['tools_templates','util','api','moment','bluebird','path','rimraf','../../config/environment','./template.attributes','exports'];(function(_0x5b34c0,_0x3ad403){var _0x242bd3=function(_0x51d0ce){while(--_0x51d0ce){_0x5b34c0['push'](_0x5b34c0['shift']());}};_0x242bd3(++_0x3ad403);}(_0x811c,0xab));var _0xc811=function(_0x5c76a4,_0x4157b8){_0x5c76a4=_0x5c76a4-0x0;var _0x44fbe3=_0x811c[_0x5c76a4];return _0x44fbe3;};'use strict';var _=require('lodash');var util=require(_0xc811('0x0'));var logger=require('../../config/logger')(_0xc811('0x1'));var moment=require(_0xc811('0x2'));var BPromise=require(_0xc811('0x3'));var rp=require('request-promise');var fs=require('fs');var path=require(_0xc811('0x4'));var rimraf=require(_0xc811('0x5'));var config=require(_0xc811('0x6'));var attributes=require(_0xc811('0x7'));module[_0xc811('0x8')]=function(_0xac452f,_0x59da86){return _0xac452f['define']('Template',attributes,{'tableName':_0xc811('0x9'),'paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file +var _0x7c5c=['util','api','moment','path','rimraf','./template.attributes','define','Template','lodash'];(function(_0x53ffbf,_0x1e36a5){var _0x5014cc=function(_0x3783f8){while(--_0x3783f8){_0x53ffbf['push'](_0x53ffbf['shift']());}};_0x5014cc(++_0x1e36a5);}(_0x7c5c,0xa1));var _0xc7c5=function(_0x121090,_0x303207){_0x121090=_0x121090-0x0;var _0x1a56a8=_0x7c5c[_0x121090];return _0x1a56a8;};'use strict';var _=require(_0xc7c5('0x0'));var util=require(_0xc7c5('0x1'));var logger=require('../../config/logger')(_0xc7c5('0x2'));var moment=require(_0xc7c5('0x3'));var BPromise=require('bluebird');var rp=require('request-promise');var fs=require('fs');var path=require(_0xc7c5('0x4'));var rimraf=require(_0xc7c5('0x5'));var config=require('../../config/environment');var attributes=require(_0xc7c5('0x6'));module['exports']=function(_0x475814,_0x217fca){return _0x475814[_0xc7c5('0x7')](_0xc7c5('0x8'),attributes,{'tableName':'tools_templates','paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file diff --git a/server/api/template/template.rpc.js b/server/api/template/template.rpc.js index 9455ca6..951859e 100644 --- a/server/api/template/template.rpc.js +++ b/server/api/template/template.rpc.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x09c8=['findAll','options','raw','where','attributes','limit','map','model','include','then','debug','lodash','util','moment','randomstring','../../mysqldb','../../config/utils','../../config/logger','jayson/promise','client','Template,\x20%s,\x20%s','request\x20sent','Template,\x20%s,\x20%s,\x20%s','stringify','error','message','catch','GetTemplate','Template'];(function(_0x30a913,_0x3cef42){var _0x191588=function(_0x4ba225){while(--_0x4ba225){_0x30a913['push'](_0x30a913['shift']());}};_0x191588(++_0x3cef42);}(_0x09c8,0x14a));var _0x809c=function(_0x58ad1d,_0xefa109){_0x58ad1d=_0x58ad1d-0x0;var _0x57c158=_0x09c8[_0x58ad1d];return _0x57c158;};'use strict';var _=require(_0x809c('0x0'));var util=require(_0x809c('0x1'));var moment=require(_0x809c('0x2'));var BPromise=require('bluebird');var rs=require(_0x809c('0x3'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0x809c('0x4'))['db'];var utils=require(_0x809c('0x5'));var logger=require(_0x809c('0x6'))('rpc');var config=require('../../config/environment');var jayson=require(_0x809c('0x7'));var client=jayson[_0x809c('0x8')]['http']({'port':0x232a});function respondWithRpcPromise(_0x220992,_0x3ef919,_0x4d8941){return new BPromise(function(_0x5ccdc2,_0x56a978){return client['request'](_0x220992,_0x4d8941)['then'](function(_0x289d82){logger['info'](_0x809c('0x9'),_0x3ef919,_0x809c('0xa'));logger['debug'](_0x809c('0xb'),_0x3ef919,_0x809c('0xa'),JSON[_0x809c('0xc')](_0x289d82));if(_0x289d82[_0x809c('0xd')]){if(_0x289d82[_0x809c('0xd')]['code']===0x1f4){logger['error'](_0x809c('0x9'),_0x3ef919,_0x289d82[_0x809c('0xd')][_0x809c('0xe')]);return _0x56a978(_0x289d82[_0x809c('0xd')][_0x809c('0xe')]);}logger[_0x809c('0xd')](_0x809c('0x9'),_0x3ef919,_0x289d82[_0x809c('0xd')]['message']);return _0x5ccdc2(_0x289d82[_0x809c('0xd')][_0x809c('0xe')]);}else{logger['info'](_0x809c('0x9'),_0x3ef919,_0x809c('0xa'));_0x5ccdc2(_0x289d82['result']['message']);}})[_0x809c('0xf')](function(_0xae4457){logger[_0x809c('0xd')]('Template,\x20%s,\x20%s',_0x3ef919,_0xae4457);_0x56a978(_0xae4457);});});}exports[_0x809c('0x10')]=function(_0x52d3cd){var _0x3676af=this;return new Promise(function(_0x86fc03,_0x50f730){return db[_0x809c('0x11')][_0x809c('0x12')]({'raw':_0x52d3cd['options']?_0x52d3cd[_0x809c('0x13')][_0x809c('0x14')]===undefined?!![]:![]:!![],'where':_0x52d3cd['options']?_0x52d3cd[_0x809c('0x13')][_0x809c('0x15')]||null:null,'attributes':_0x52d3cd[_0x809c('0x13')]?_0x52d3cd['options'][_0x809c('0x16')]||null:null,'limit':_0x52d3cd[_0x809c('0x13')]?_0x52d3cd[_0x809c('0x13')][_0x809c('0x17')]||null:null,'include':_0x52d3cd[_0x809c('0x13')]?_0x52d3cd[_0x809c('0x13')]['include']?_[_0x809c('0x18')](_0x52d3cd['options']['include'],function(_0x2a4b30){return{'model':db[_0x2a4b30[_0x809c('0x19')]],'as':_0x2a4b30['as'],'attributes':_0x2a4b30['attributes'],'include':_0x2a4b30[_0x809c('0x1a')]?_[_0x809c('0x18')](_0x2a4b30[_0x809c('0x1a')],function(_0xe0593c){return{'model':db[_0xe0593c[_0x809c('0x19')]],'as':_0xe0593c['as'],'attributes':_0xe0593c[_0x809c('0x16')],'include':_0xe0593c[_0x809c('0x1a')]?_['map'](_0xe0593c['include'],function(_0x490fc4){return{'model':db[_0x490fc4[_0x809c('0x19')]],'as':_0x490fc4['as'],'attributes':_0x490fc4[_0x809c('0x16')]};}):[]};}):[]};}):[]:[]})[_0x809c('0x1b')](function(_0x4c9699){logger['info'](_0x809c('0x10'),_0x52d3cd);logger[_0x809c('0x1c')]('GetTemplate',_0x52d3cd,JSON[_0x809c('0xc')](_0x4c9699));_0x86fc03(_0x4c9699);})[_0x809c('0xf')](function(_0x35aac7){logger[_0x809c('0xd')](_0x809c('0x10'),_0x35aac7[_0x809c('0xe')],_0x52d3cd);_0x50f730(_0x3676af[_0x809c('0xd')](0x1f4,_0x35aac7[_0x809c('0xe')]));});});}; \ No newline at end of file +var _0xc737=['result','catch','GetTemplate','Template','options','where','attributes','limit','include','map','model','info','lodash','util','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','request','then','Template,\x20%s,\x20%s','request\x20sent','debug','stringify','error','code','message'];(function(_0x42cae2,_0x284ef8){var _0x5f256f=function(_0x41abc8){while(--_0x41abc8){_0x42cae2['push'](_0x42cae2['shift']());}};_0x5f256f(++_0x284ef8);}(_0xc737,0xb6));var _0x7c73=function(_0x504072,_0x2b7160){_0x504072=_0x504072-0x0;var _0x545ba4=_0xc737[_0x504072];return _0x545ba4;};'use strict';var _=require(_0x7c73('0x0'));var util=require(_0x7c73('0x1'));var moment=require('moment');var BPromise=require(_0x7c73('0x2'));var rs=require(_0x7c73('0x3'));var fs=require('fs');var Redis=require(_0x7c73('0x4'));var db=require(_0x7c73('0x5'))['db'];var utils=require(_0x7c73('0x6'));var logger=require(_0x7c73('0x7'))(_0x7c73('0x8'));var config=require(_0x7c73('0x9'));var jayson=require(_0x7c73('0xa'));var client=jayson[_0x7c73('0xb')][_0x7c73('0xc')]({'port':0x232a});function respondWithRpcPromise(_0x40ca6e,_0x189c23,_0x34cc13){return new BPromise(function(_0x13f074,_0x4ff068){return client[_0x7c73('0xd')](_0x40ca6e,_0x34cc13)[_0x7c73('0xe')](function(_0x5bf831){logger['info'](_0x7c73('0xf'),_0x189c23,_0x7c73('0x10'));logger[_0x7c73('0x11')]('Template,\x20%s,\x20%s,\x20%s',_0x189c23,_0x7c73('0x10'),JSON[_0x7c73('0x12')](_0x5bf831));if(_0x5bf831[_0x7c73('0x13')]){if(_0x5bf831[_0x7c73('0x13')][_0x7c73('0x14')]===0x1f4){logger['error'](_0x7c73('0xf'),_0x189c23,_0x5bf831['error'][_0x7c73('0x15')]);return _0x4ff068(_0x5bf831[_0x7c73('0x13')][_0x7c73('0x15')]);}logger['error'](_0x7c73('0xf'),_0x189c23,_0x5bf831[_0x7c73('0x13')][_0x7c73('0x15')]);return _0x13f074(_0x5bf831['error'][_0x7c73('0x15')]);}else{logger['info'](_0x7c73('0xf'),_0x189c23,'request\x20sent');_0x13f074(_0x5bf831[_0x7c73('0x16')]['message']);}})[_0x7c73('0x17')](function(_0x29b816){logger[_0x7c73('0x13')](_0x7c73('0xf'),_0x189c23,_0x29b816);_0x4ff068(_0x29b816);});});}exports[_0x7c73('0x18')]=function(_0xb71f65){var _0x5e9154=this;return new Promise(function(_0xdef589,_0x1d0db2){return db[_0x7c73('0x19')]['findAll']({'raw':_0xb71f65[_0x7c73('0x1a')]?_0xb71f65[_0x7c73('0x1a')]['raw']===undefined?!![]:![]:!![],'where':_0xb71f65[_0x7c73('0x1a')]?_0xb71f65[_0x7c73('0x1a')][_0x7c73('0x1b')]||null:null,'attributes':_0xb71f65[_0x7c73('0x1a')]?_0xb71f65['options'][_0x7c73('0x1c')]||null:null,'limit':_0xb71f65[_0x7c73('0x1a')]?_0xb71f65[_0x7c73('0x1a')][_0x7c73('0x1d')]||null:null,'include':_0xb71f65['options']?_0xb71f65[_0x7c73('0x1a')][_0x7c73('0x1e')]?_[_0x7c73('0x1f')](_0xb71f65[_0x7c73('0x1a')][_0x7c73('0x1e')],function(_0x4b2f74){return{'model':db[_0x4b2f74[_0x7c73('0x20')]],'as':_0x4b2f74['as'],'attributes':_0x4b2f74[_0x7c73('0x1c')],'include':_0x4b2f74[_0x7c73('0x1e')]?_[_0x7c73('0x1f')](_0x4b2f74[_0x7c73('0x1e')],function(_0x50776e){return{'model':db[_0x50776e[_0x7c73('0x20')]],'as':_0x50776e['as'],'attributes':_0x50776e[_0x7c73('0x1c')],'include':_0x50776e['include']?_['map'](_0x50776e[_0x7c73('0x1e')],function(_0x20de12){return{'model':db[_0x20de12['model']],'as':_0x20de12['as'],'attributes':_0x20de12[_0x7c73('0x1c')]};}):[]};}):[]};}):[]:[]})[_0x7c73('0xe')](function(_0x295eab){logger[_0x7c73('0x21')]('GetTemplate',_0xb71f65);logger['debug'](_0x7c73('0x18'),_0xb71f65,JSON[_0x7c73('0x12')](_0x295eab));_0xdef589(_0x295eab);})[_0x7c73('0x17')](function(_0xb7bbaf){logger[_0x7c73('0x13')](_0x7c73('0x18'),_0xb7bbaf['message'],_0xb71f65);_0x1d0db2(_0x5e9154[_0x7c73('0x13')](0x1f4,_0xb7bbaf['message']));});});}; \ No newline at end of file diff --git a/server/api/trigger/index.js b/server/api/trigger/index.js index 9e5625d..be824c5 100644 --- a/server/api/trigger/index.js +++ b/server/api/trigger/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x6ea1=['isAuthenticated','index','get','/:id','/:id/all_conditions','/:id/any_conditions','getAnyConditions','/:id/actions','post','create','addAllCondition','addAnyCondition','addAction','put','update','delete','destroy','exports','multer','util','path','connect-timeout','express','Router','fs-extra','../../config/environment','./trigger.controller'];(function(_0x46698a,_0x8de1e4){var _0x356db0=function(_0x19e83c){while(--_0x19e83c){_0x46698a['push'](_0x46698a['shift']());}};_0x356db0(++_0x8de1e4);}(_0x6ea1,0x1c2));var _0x16ea=function(_0x294b60,_0x376780){_0x294b60=_0x294b60-0x0;var _0x59933c=_0x6ea1[_0x294b60];return _0x59933c;};'use strict';var multer=require(_0x16ea('0x0'));var util=require(_0x16ea('0x1'));var path=require(_0x16ea('0x2'));var timeout=require(_0x16ea('0x3'));var express=require(_0x16ea('0x4'));var router=express[_0x16ea('0x5')]();var fs_extra=require(_0x16ea('0x6'));var auth=require('../../components/auth/service');var interaction=require('../../components/interaction/service');var config=require(_0x16ea('0x7'));var controller=require(_0x16ea('0x8'));router['get']('/',auth[_0x16ea('0x9')](),controller[_0x16ea('0xa')]);router[_0x16ea('0xb')](_0x16ea('0xc'),auth[_0x16ea('0x9')](),controller['show']);router[_0x16ea('0xb')](_0x16ea('0xd'),auth['isAuthenticated'](),controller['getAllConditions']);router[_0x16ea('0xb')](_0x16ea('0xe'),auth[_0x16ea('0x9')](),controller[_0x16ea('0xf')]);router['get'](_0x16ea('0x10'),auth[_0x16ea('0x9')](),controller['getActions']);router[_0x16ea('0x11')]('/',auth['isAuthenticated'](),controller[_0x16ea('0x12')]);router[_0x16ea('0x11')](_0x16ea('0xd'),auth[_0x16ea('0x9')](),controller[_0x16ea('0x13')]);router[_0x16ea('0x11')](_0x16ea('0xe'),auth[_0x16ea('0x9')](),controller[_0x16ea('0x14')]);router[_0x16ea('0x11')]('/:id/actions',auth[_0x16ea('0x9')](),controller[_0x16ea('0x15')]);router[_0x16ea('0x16')]('/:id',auth['isAuthenticated'](),controller[_0x16ea('0x17')]);router[_0x16ea('0x18')]('/:id',auth[_0x16ea('0x9')](),controller[_0x16ea('0x19')]);module[_0x16ea('0x1a')]=router; \ No newline at end of file +var _0x00da=['update','delete','exports','multer','util','connect-timeout','express','../../components/auth/service','../../config/environment','./trigger.controller','index','/:id','show','/:id/all_conditions','getAllConditions','/:id/any_conditions','isAuthenticated','get','/:id/actions','create','post','addAction','put'];(function(_0x234fba,_0x56beb6){var _0x5d5ed7=function(_0x2fd4ca){while(--_0x2fd4ca){_0x234fba['push'](_0x234fba['shift']());}};_0x5d5ed7(++_0x56beb6);}(_0x00da,0x1cf));var _0xa00d=function(_0x12da8d,_0x34b1c4){_0x12da8d=_0x12da8d-0x0;var _0x26b1fb=_0x00da[_0x12da8d];return _0x26b1fb;};'use strict';var multer=require(_0xa00d('0x0'));var util=require(_0xa00d('0x1'));var path=require('path');var timeout=require(_0xa00d('0x2'));var express=require(_0xa00d('0x3'));var router=express['Router']();var fs_extra=require('fs-extra');var auth=require(_0xa00d('0x4'));var interaction=require('../../components/interaction/service');var config=require(_0xa00d('0x5'));var controller=require(_0xa00d('0x6'));router['get']('/',auth['isAuthenticated'](),controller[_0xa00d('0x7')]);router['get'](_0xa00d('0x8'),auth['isAuthenticated'](),controller[_0xa00d('0x9')]);router['get'](_0xa00d('0xa'),auth['isAuthenticated'](),controller[_0xa00d('0xb')]);router['get'](_0xa00d('0xc'),auth[_0xa00d('0xd')](),controller['getAnyConditions']);router[_0xa00d('0xe')](_0xa00d('0xf'),auth[_0xa00d('0xd')](),controller['getActions']);router['post']('/',auth[_0xa00d('0xd')](),controller[_0xa00d('0x10')]);router['post'](_0xa00d('0xa'),auth[_0xa00d('0xd')](),controller['addAllCondition']);router[_0xa00d('0x11')](_0xa00d('0xc'),auth[_0xa00d('0xd')](),controller['addAnyCondition']);router[_0xa00d('0x11')](_0xa00d('0xf'),auth[_0xa00d('0xd')](),controller[_0xa00d('0x12')]);router[_0xa00d('0x13')]('/:id',auth[_0xa00d('0xd')](),controller[_0xa00d('0x14')]);router[_0xa00d('0x15')](_0xa00d('0x8'),auth['isAuthenticated'](),controller['destroy']);module[_0xa00d('0x16')]=router; \ No newline at end of file diff --git a/server/api/trigger/trigger.attributes.js b/server/api/trigger/trigger.attributes.js index 83e7fd7..5d8567b 100644 --- a/server/api/trigger/trigger.attributes.js +++ b/server/api/trigger/trigger.attributes.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x78c8=['sequelize','exports','STRING'];(function(_0x3da02f,_0x2dc4ca){var _0x5a29ca=function(_0x5c52f8){while(--_0x5c52f8){_0x3da02f['push'](_0x3da02f['shift']());}};_0x5a29ca(++_0x2dc4ca);}(_0x78c8,0xe4));var _0x878c=function(_0x46f8d9,_0x43ecd2){_0x46f8d9=_0x46f8d9-0x0;var _0x5c793a=_0x78c8[_0x46f8d9];return _0x5c793a;};'use strict';var Sequelize=require(_0x878c('0x0'));module[_0x878c('0x1')]={'name':{'type':Sequelize[_0x878c('0x2')]},'channel':{'type':Sequelize[_0x878c('0x2')]},'description':{'type':Sequelize[_0x878c('0x2')]},'status':{'type':Sequelize['BOOLEAN'],'defaultValue':![]}}; \ No newline at end of file +var _0xf9ff=['BOOLEAN','sequelize','STRING'];(function(_0x589a6c,_0x544b28){var _0x4bb0c7=function(_0x483497){while(--_0x483497){_0x589a6c['push'](_0x589a6c['shift']());}};_0x4bb0c7(++_0x544b28);}(_0xf9ff,0x133));var _0xff9f=function(_0x32d457,_0x1a39c9){_0x32d457=_0x32d457-0x0;var _0x338386=_0xf9ff[_0x32d457];return _0x338386;};'use strict';var Sequelize=require(_0xff9f('0x0'));module['exports']={'name':{'type':Sequelize[_0xff9f('0x1')]},'channel':{'type':Sequelize[_0xff9f('0x1')]},'description':{'type':Sequelize[_0xff9f('0x1')]},'status':{'type':Sequelize[_0xff9f('0x2')],'defaultValue':![]}}; \ No newline at end of file diff --git a/server/api/trigger/trigger.controller.js b/server/api/trigger/trigger.controller.js index 9bfda6a..d572be0 100644 --- a/server/api/trigger/trigger.controller.js +++ b/server/api/trigger/trigger.controller.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x0d2f=['keys','filters','intersection','attributes','length','hasOwnProperty','nolimit','order','sort','where','pick','filter','merge','VIRTUAL','includeAll','Trigger','findAll','rows','catch','show','params','fields','include','options','create','role','user','userProfileId','autoAssociation','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','body','find','addAllCondition','TriggerAllId','Condition','addAnyCondition','getAllConditions','getAnyConditions','Action','getActions','findOne','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','util','path','sox','to-csv','fs-extra','lodash','squel','crypto','jsforce','desk.js','querystring','ioredis','../../components/auth/service','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','sendStatus','status','end','json','offset','undefined','limit','count','apply','update','then','get','Triggers','UserProfileResource','destroy','error','name','send','index','map','rawAttributes','type','model','query'];(function(_0x3fb030,_0x12aebe){var _0xd6899b=function(_0x327646){while(--_0x327646){_0x3fb030['push'](_0x3fb030['shift']());}};_0xd6899b(++_0x12aebe);}(_0x0d2f,0x86));var _0xf0d2=function(_0x10f316,_0x5822db){_0x10f316=_0x10f316-0x0;var _0x568d7e=_0x0d2f[_0x10f316];return _0x568d7e;};'use strict';var emlformat=require(_0xf0d2('0x0'));var rimraf=require(_0xf0d2('0x1'));var zipdir=require(_0xf0d2('0x2'));var jsonpatch=require(_0xf0d2('0x3'));var rp=require(_0xf0d2('0x4'));var moment=require(_0xf0d2('0x5'));var BPromise=require(_0xf0d2('0x6'));var Mustache=require('mustache');var util=require(_0xf0d2('0x7'));var path=require(_0xf0d2('0x8'));var sox=require(_0xf0d2('0x9'));var csv=require(_0xf0d2('0xa'));var ejs=require('ejs');var fs=require('fs');var fs_extra=require(_0xf0d2('0xb'));var _=require(_0xf0d2('0xc'));var squel=require(_0xf0d2('0xd'));var crypto=require(_0xf0d2('0xe'));var jsforce=require(_0xf0d2('0xf'));var deskjs=require(_0xf0d2('0x10'));var toCsv=require('to-csv');var querystring=require(_0xf0d2('0x11'));var Papa=require('papaparse');var Redis=require(_0xf0d2('0x12'));var authService=require(_0xf0d2('0x13'));var qs=require('../../components/parsers/qs');var as=require(_0xf0d2('0x14'));var hardwareService=require(_0xf0d2('0x15'));var logger=require(_0xf0d2('0x16'))(_0xf0d2('0x17'));var utils=require(_0xf0d2('0x18'));var config=require(_0xf0d2('0x19'));var licenseUtil=require(_0xf0d2('0x1a'));var db=require(_0xf0d2('0x1b'))['db'];function respondWithStatusCode(_0x2dfb54,_0x55bfbc){_0x55bfbc=_0x55bfbc||0xcc;return function(_0x1f04dd){if(_0x1f04dd){return _0x2dfb54[_0xf0d2('0x1c')](_0x55bfbc);}return _0x2dfb54[_0xf0d2('0x1d')](_0x55bfbc)[_0xf0d2('0x1e')]();};}function respondWithResult(_0x3c220d,_0x370d36){_0x370d36=_0x370d36||0xc8;return function(_0xdf1202){if(_0xdf1202){return _0x3c220d[_0xf0d2('0x1d')](_0x370d36)[_0xf0d2('0x1f')](_0xdf1202);}};}function respondWithFilteredResult(_0x2c5fe7,_0x5a5ad0){return function(_0x5ad673){if(_0x5ad673){var _0x2d8245=typeof _0x5a5ad0[_0xf0d2('0x20')]===_0xf0d2('0x21')&&typeof _0x5a5ad0[_0xf0d2('0x22')]===_0xf0d2('0x21');var _0x79d87a=_0x5ad673[_0xf0d2('0x23')];var _0x51d3dd=_0x2d8245?0x0:_0x5a5ad0[_0xf0d2('0x20')];var _0x5ea441=_0x2d8245?_0x5ad673[_0xf0d2('0x23')]:_0x5a5ad0[_0xf0d2('0x20')]+_0x5a5ad0['limit'];var _0x295d10;if(_0x5ea441>=_0x79d87a){_0x5ea441=_0x79d87a;_0x295d10=0xc8;}else{_0x295d10=0xce;}_0x2c5fe7[_0xf0d2('0x1d')](_0x295d10);return _0x2c5fe7['set']('Content-Range',_0x51d3dd+'-'+_0x5ea441+'/'+_0x79d87a)[_0xf0d2('0x1f')](_0x5ad673);}return null;};}function patchUpdates(_0x5df40a){return function(_0x4112c2){try{jsonpatch[_0xf0d2('0x24')](_0x4112c2,_0x5df40a,!![]);}catch(_0x1665e1){return BPromise['reject'](_0x1665e1);}return _0x4112c2['save']();};}function saveUpdates(_0x59a274,_0x24831b){return function(_0x3c8c7b){if(_0x3c8c7b){return _0x3c8c7b[_0xf0d2('0x25')](_0x59a274)[_0xf0d2('0x26')](function(_0x547755){return _0x547755;});}return null;};}function removeEntity(_0x5b9e4e,_0x10cbef){return function(_0x195e1e){if(_0x195e1e){return _0x195e1e['destroy']()[_0xf0d2('0x26')](function(){var _0x31de50=_0x195e1e[_0xf0d2('0x27')]({'plain':!![]});var _0x2d4d17=_0xf0d2('0x28');return db[_0xf0d2('0x29')][_0xf0d2('0x2a')]({'where':{'type':_0x2d4d17,'resourceId':_0x31de50['id']}})[_0xf0d2('0x26')](function(){return _0x195e1e;});})[_0xf0d2('0x26')](function(){_0x5b9e4e[_0xf0d2('0x1d')](0xcc)[_0xf0d2('0x1e')]();});}};}function handleEntityNotFound(_0x1f7ccd,_0x329757){return function(_0x5d0915){if(!_0x5d0915){_0x1f7ccd['sendStatus'](0x194);}return _0x5d0915;};}function handleError(_0x2cca2d,_0x468749){_0x468749=_0x468749||0x1f4;return function(_0x5f323a){logger[_0xf0d2('0x2b')](_0x5f323a['stack']);if(_0x5f323a[_0xf0d2('0x2c')]){delete _0x5f323a[_0xf0d2('0x2c')];}_0x2cca2d[_0xf0d2('0x1d')](_0x468749)[_0xf0d2('0x2d')](_0x5f323a);};}exports[_0xf0d2('0x2e')]=function(_0x56cec3,_0x4b91bf){var _0x58a128={},_0x4635bb={},_0x2991a2={'count':0x0,'rows':[]};var _0x549a66=_[_0xf0d2('0x2f')](db['Trigger'][_0xf0d2('0x30')],function(_0x27ae58){return{'name':_0x27ae58['fieldName'],'type':_0x27ae58[_0xf0d2('0x31')]['key']};});_0x4635bb[_0xf0d2('0x32')]=_[_0xf0d2('0x2f')](_0x549a66,_0xf0d2('0x2c'));_0x4635bb[_0xf0d2('0x33')]=_[_0xf0d2('0x34')](_0x56cec3[_0xf0d2('0x33')]);_0x4635bb[_0xf0d2('0x35')]=_[_0xf0d2('0x36')](_0x4635bb['model'],_0x4635bb[_0xf0d2('0x33')]);_0x58a128[_0xf0d2('0x37')]=_[_0xf0d2('0x36')](_0x4635bb['model'],qs['fields'](_0x56cec3[_0xf0d2('0x33')]['fields']));_0x58a128[_0xf0d2('0x37')]=_0x58a128['attributes'][_0xf0d2('0x38')]?_0x58a128[_0xf0d2('0x37')]:_0x4635bb[_0xf0d2('0x32')];if(!_0x56cec3[_0xf0d2('0x33')][_0xf0d2('0x39')](_0xf0d2('0x3a'))){_0x58a128[_0xf0d2('0x22')]=qs['limit'](_0x56cec3['query'][_0xf0d2('0x22')]);_0x58a128[_0xf0d2('0x20')]=qs[_0xf0d2('0x20')](_0x56cec3['query'][_0xf0d2('0x20')]);}_0x58a128[_0xf0d2('0x3b')]=qs[_0xf0d2('0x3c')](_0x56cec3[_0xf0d2('0x33')][_0xf0d2('0x3c')]);_0x58a128[_0xf0d2('0x3d')]=qs[_0xf0d2('0x35')](_[_0xf0d2('0x3e')](_0x56cec3[_0xf0d2('0x33')],_0x4635bb[_0xf0d2('0x35')]),_0x549a66);if(_0x56cec3[_0xf0d2('0x33')][_0xf0d2('0x3f')]){_0x58a128[_0xf0d2('0x3d')]=_[_0xf0d2('0x40')](_0x58a128['where'],{'$or':_[_0xf0d2('0x2f')](_0x549a66,function(_0x42a562){if(_0x42a562[_0xf0d2('0x31')]!==_0xf0d2('0x41')){var _0xd54495={};_0xd54495[_0x42a562[_0xf0d2('0x2c')]]={'$like':'%'+_0x56cec3[_0xf0d2('0x33')][_0xf0d2('0x3f')]+'%'};return _0xd54495;}})});}_0x58a128=_[_0xf0d2('0x40')]({},_0x58a128,_0x56cec3['options']);var _0x50c518={'where':_0x58a128[_0xf0d2('0x3d')]};return db['Trigger'][_0xf0d2('0x23')](_0x50c518)['then'](function(_0x4a221c){_0x2991a2['count']=_0x4a221c;if(_0x56cec3[_0xf0d2('0x33')][_0xf0d2('0x42')]){_0x58a128['include']=[{'all':!![]}];}return db[_0xf0d2('0x43')][_0xf0d2('0x44')](_0x58a128);})[_0xf0d2('0x26')](function(_0x51dfba){_0x2991a2[_0xf0d2('0x45')]=_0x51dfba;return _0x2991a2;})[_0xf0d2('0x26')](respondWithFilteredResult(_0x4b91bf,_0x58a128))[_0xf0d2('0x46')](handleError(_0x4b91bf,null));};exports[_0xf0d2('0x47')]=function(_0x2f6573,_0x1c60bd){var _0x5d6bc6={'raw':![],'where':{'id':_0x2f6573[_0xf0d2('0x48')]['id']}},_0x3dfe1={};_0x3dfe1[_0xf0d2('0x32')]=_[_0xf0d2('0x34')](db[_0xf0d2('0x43')][_0xf0d2('0x30')]);_0x3dfe1[_0xf0d2('0x33')]=_[_0xf0d2('0x34')](_0x2f6573[_0xf0d2('0x33')]);_0x3dfe1[_0xf0d2('0x35')]=_[_0xf0d2('0x36')](_0x3dfe1[_0xf0d2('0x32')],_0x3dfe1[_0xf0d2('0x33')]);_0x5d6bc6['attributes']=_[_0xf0d2('0x36')](_0x3dfe1['model'],qs[_0xf0d2('0x49')](_0x2f6573[_0xf0d2('0x33')][_0xf0d2('0x49')]));_0x5d6bc6[_0xf0d2('0x37')]=_0x5d6bc6[_0xf0d2('0x37')][_0xf0d2('0x38')]?_0x5d6bc6[_0xf0d2('0x37')]:_0x3dfe1['model'];if(_0x2f6573['query'][_0xf0d2('0x42')]){_0x5d6bc6[_0xf0d2('0x4a')]=[{'all':!![]}];}_0x5d6bc6=_[_0xf0d2('0x40')]({},_0x5d6bc6,_0x2f6573[_0xf0d2('0x4b')]);return db['Trigger']['find'](_0x5d6bc6)['then'](handleEntityNotFound(_0x1c60bd,null))[_0xf0d2('0x26')](respondWithResult(_0x1c60bd,null))[_0xf0d2('0x46')](handleError(_0x1c60bd,null));};exports[_0xf0d2('0x4c')]=function(_0x4a779d,_0x197ec8){return db[_0xf0d2('0x43')][_0xf0d2('0x4c')](_0x4a779d['body'],{})[_0xf0d2('0x26')](function(_0x41948c){var _0xdf0ef5=_0x4a779d['user'][_0xf0d2('0x27')]({'plain':!![]});if(!_0xdf0ef5)throw new Error('Unable\x20to\x20retrieve\x20the\x20current\x20user');if(_0xdf0ef5[_0xf0d2('0x4d')]===_0xf0d2('0x4e')){var _0x28b8d0=_0x41948c[_0xf0d2('0x27')]({'plain':!![]});var _0x4fca62='Triggers';return db['UserProfileSection']['find']({'where':{'name':_0x4fca62,'userProfileId':_0xdf0ef5[_0xf0d2('0x4f')]},'raw':!![]})[_0xf0d2('0x26')](function(_0x1233d7){if(_0x1233d7&&_0x1233d7[_0xf0d2('0x50')]===0x0){return db[_0xf0d2('0x29')]['create']({'name':_0x28b8d0[_0xf0d2('0x2c')],'resourceId':_0x28b8d0['id'],'type':_0x1233d7[_0xf0d2('0x2c')],'sectionId':_0x1233d7['id']},{})[_0xf0d2('0x26')](function(){return _0x41948c;});}else{return _0x41948c;}})[_0xf0d2('0x46')](function(_0x2fa04b){logger[_0xf0d2('0x2b')](_0xf0d2('0x51'),_0x2fa04b);throw _0x2fa04b;});}return _0x41948c;})[_0xf0d2('0x26')](respondWithResult(_0x197ec8,0xc9))[_0xf0d2('0x46')](handleError(_0x197ec8,null));};exports['update']=function(_0x150621,_0x1c750){if(_0x150621[_0xf0d2('0x52')]['id']){delete _0x150621[_0xf0d2('0x52')]['id'];}return db[_0xf0d2('0x43')]['find']({'where':{'id':_0x150621['params']['id']}})[_0xf0d2('0x26')](handleEntityNotFound(_0x1c750,null))['then'](saveUpdates(_0x150621['body'],null))['then'](respondWithResult(_0x1c750,null))[_0xf0d2('0x46')](handleError(_0x1c750,null));};exports[_0xf0d2('0x2a')]=function(_0x5ef21f,_0x5b2937){return db[_0xf0d2('0x43')][_0xf0d2('0x53')]({'where':{'id':_0x5ef21f[_0xf0d2('0x48')]['id']}})[_0xf0d2('0x26')](handleEntityNotFound(_0x5b2937,null))['then'](removeEntity(_0x5b2937,null))[_0xf0d2('0x46')](handleError(_0x5b2937,null));};exports[_0xf0d2('0x54')]=function(_0x2b6374,_0x21d5bd,_0x3fa449){if(_0x2b6374[_0xf0d2('0x52')]['id']){delete _0x2b6374[_0xf0d2('0x52')]['id'];}return db[_0xf0d2('0x43')][_0xf0d2('0x53')]({'where':{'id':_0x2b6374[_0xf0d2('0x48')]['id']}})[_0xf0d2('0x26')](handleEntityNotFound(_0x21d5bd,null))['then'](function(_0x4d6df8){if(_0x4d6df8){_0x2b6374[_0xf0d2('0x52')][_0xf0d2('0x55')]=_0x4d6df8['id'];return db[_0xf0d2('0x56')][_0xf0d2('0x4c')](_0x2b6374['body']);}})['then'](respondWithResult(_0x21d5bd,null))[_0xf0d2('0x46')](handleError(_0x21d5bd,null));};exports[_0xf0d2('0x57')]=function(_0x49dcb4,_0x4f0448,_0x3cba17){if(_0x49dcb4[_0xf0d2('0x52')]['id']){delete _0x49dcb4[_0xf0d2('0x52')]['id'];}return db[_0xf0d2('0x43')]['find']({'where':{'id':_0x49dcb4[_0xf0d2('0x48')]['id']}})[_0xf0d2('0x26')](handleEntityNotFound(_0x4f0448,null))[_0xf0d2('0x26')](function(_0x36add4){if(_0x36add4){_0x49dcb4[_0xf0d2('0x52')]['TriggerAnyId']=_0x36add4['id'];return db['Condition'][_0xf0d2('0x4c')](_0x49dcb4[_0xf0d2('0x52')]);}})['then'](respondWithResult(_0x4f0448,null))['catch'](handleError(_0x4f0448,null));};exports[_0xf0d2('0x58')]=function(_0x1b1c43,_0x2a48d7,_0x42b7c5){var _0x44fd2e={};var _0x3d778d={};var _0x524cf6;var _0x16df44;return db['Trigger']['findOne']({'where':{'id':_0x1b1c43['params']['id']}})[_0xf0d2('0x26')](handleEntityNotFound(_0x2a48d7,null))[_0xf0d2('0x26')](function(_0x3c2a09){if(_0x3c2a09){_0x524cf6=_0x3c2a09;_0x3d778d[_0xf0d2('0x32')]=_[_0xf0d2('0x34')](db[_0xf0d2('0x56')][_0xf0d2('0x30')]);_0x3d778d[_0xf0d2('0x33')]=_[_0xf0d2('0x34')](_0x1b1c43[_0xf0d2('0x33')]);_0x3d778d[_0xf0d2('0x35')]=_[_0xf0d2('0x36')](_0x3d778d[_0xf0d2('0x32')],_0x3d778d[_0xf0d2('0x33')]);_0x44fd2e[_0xf0d2('0x37')]=_[_0xf0d2('0x36')](_0x3d778d['model'],qs[_0xf0d2('0x49')](_0x1b1c43[_0xf0d2('0x33')]['fields']));_0x44fd2e['attributes']=_0x44fd2e['attributes'][_0xf0d2('0x38')]?_0x44fd2e[_0xf0d2('0x37')]:_0x3d778d[_0xf0d2('0x32')];_0x44fd2e[_0xf0d2('0x3b')]=qs[_0xf0d2('0x3c')](_0x1b1c43['query'][_0xf0d2('0x3c')]);_0x44fd2e[_0xf0d2('0x3d')]=qs['filters'](_['pick'](_0x1b1c43[_0xf0d2('0x33')],_0x3d778d['filters']));if(_0x1b1c43[_0xf0d2('0x33')][_0xf0d2('0x3f')]){_0x44fd2e[_0xf0d2('0x3d')]=_['merge'](_0x44fd2e[_0xf0d2('0x3d')],{'$or':_[_0xf0d2('0x2f')](_0x44fd2e[_0xf0d2('0x37')],function(_0x2145d9){var _0xab8ec6={};_0xab8ec6[_0x2145d9]={'$like':'%'+_0x1b1c43[_0xf0d2('0x33')]['filter']+'%'};return _0xab8ec6;})});}_0x44fd2e=_['merge']({},_0x44fd2e,_0x1b1c43[_0xf0d2('0x4b')]);return _0x524cf6[_0xf0d2('0x58')](_0x44fd2e);}})[_0xf0d2('0x26')](function(_0x219900){if(_0x219900){_0x16df44=_0x219900[_0xf0d2('0x38')];if(!_0x1b1c43['query'][_0xf0d2('0x39')](_0xf0d2('0x3a'))){_0x44fd2e['limit']=qs['limit'](_0x1b1c43[_0xf0d2('0x33')][_0xf0d2('0x22')]);_0x44fd2e['offset']=qs[_0xf0d2('0x20')](_0x1b1c43[_0xf0d2('0x33')][_0xf0d2('0x20')]);}return _0x524cf6['getAllConditions'](_0x44fd2e);}})[_0xf0d2('0x26')](function(_0x36a6ea){if(_0x36a6ea){return _0x36a6ea?{'count':_0x16df44,'rows':_0x36a6ea}:null;}})[_0xf0d2('0x26')](respondWithResult(_0x2a48d7,null))[_0xf0d2('0x46')](handleError(_0x2a48d7,null));};exports['getAnyConditions']=function(_0x57d497,_0x1b1f4e,_0xaaf911){var _0x4a35f9={};var _0x3bdfe8={};var _0x31c4fd;var _0x3fc7d6;return db[_0xf0d2('0x43')]['findOne']({'where':{'id':_0x57d497[_0xf0d2('0x48')]['id']}})[_0xf0d2('0x26')](handleEntityNotFound(_0x1b1f4e,null))[_0xf0d2('0x26')](function(_0x2311bb){if(_0x2311bb){_0x31c4fd=_0x2311bb;_0x3bdfe8['model']=_['keys'](db[_0xf0d2('0x56')][_0xf0d2('0x30')]);_0x3bdfe8[_0xf0d2('0x33')]=_[_0xf0d2('0x34')](_0x57d497[_0xf0d2('0x33')]);_0x3bdfe8[_0xf0d2('0x35')]=_[_0xf0d2('0x36')](_0x3bdfe8[_0xf0d2('0x32')],_0x3bdfe8['query']);_0x4a35f9[_0xf0d2('0x37')]=_[_0xf0d2('0x36')](_0x3bdfe8[_0xf0d2('0x32')],qs[_0xf0d2('0x49')](_0x57d497[_0xf0d2('0x33')][_0xf0d2('0x49')]));_0x4a35f9[_0xf0d2('0x37')]=_0x4a35f9['attributes']['length']?_0x4a35f9[_0xf0d2('0x37')]:_0x3bdfe8[_0xf0d2('0x32')];_0x4a35f9['order']=qs[_0xf0d2('0x3c')](_0x57d497[_0xf0d2('0x33')][_0xf0d2('0x3c')]);_0x4a35f9[_0xf0d2('0x3d')]=qs['filters'](_[_0xf0d2('0x3e')](_0x57d497['query'],_0x3bdfe8['filters']));if(_0x57d497[_0xf0d2('0x33')][_0xf0d2('0x3f')]){_0x4a35f9[_0xf0d2('0x3d')]=_[_0xf0d2('0x40')](_0x4a35f9[_0xf0d2('0x3d')],{'$or':_[_0xf0d2('0x2f')](_0x4a35f9[_0xf0d2('0x37')],function(_0x4a97b6){var _0x5a4805={};_0x5a4805[_0x4a97b6]={'$like':'%'+_0x57d497[_0xf0d2('0x33')]['filter']+'%'};return _0x5a4805;})});}_0x4a35f9=_['merge']({},_0x4a35f9,_0x57d497[_0xf0d2('0x4b')]);return _0x31c4fd[_0xf0d2('0x59')](_0x4a35f9);}})['then'](function(_0x40cf3e){if(_0x40cf3e){_0x3fc7d6=_0x40cf3e[_0xf0d2('0x38')];if(!_0x57d497[_0xf0d2('0x33')]['hasOwnProperty'](_0xf0d2('0x3a'))){_0x4a35f9[_0xf0d2('0x22')]=qs[_0xf0d2('0x22')](_0x57d497['query']['limit']);_0x4a35f9[_0xf0d2('0x20')]=qs[_0xf0d2('0x20')](_0x57d497[_0xf0d2('0x33')][_0xf0d2('0x20')]);}return _0x31c4fd[_0xf0d2('0x59')](_0x4a35f9);}})[_0xf0d2('0x26')](function(_0x184ca4){if(_0x184ca4){return _0x184ca4?{'count':_0x3fc7d6,'rows':_0x184ca4}:null;}})['then'](respondWithResult(_0x1b1f4e,null))['catch'](handleError(_0x1b1f4e,null));};exports['addAction']=function(_0x3e10dc,_0x31ed6c,_0x243db){if(_0x3e10dc[_0xf0d2('0x52')]['id']){delete _0x3e10dc[_0xf0d2('0x52')]['id'];}return db[_0xf0d2('0x43')]['find']({'where':{'id':_0x3e10dc['params']['id']}})[_0xf0d2('0x26')](handleEntityNotFound(_0x31ed6c,null))['then'](function(_0x382af8){if(_0x382af8){_0x3e10dc[_0xf0d2('0x52')]['TriggerId']=_0x382af8['id'];return db[_0xf0d2('0x5a')][_0xf0d2('0x4c')](_0x3e10dc[_0xf0d2('0x52')]);}})['then'](respondWithResult(_0x31ed6c,null))['catch'](handleError(_0x31ed6c,null));};exports[_0xf0d2('0x5b')]=function(_0x126dc8,_0x50ee4b,_0x47e0a3){var _0x348c89={};var _0x4cd963={};var _0x476a62;var _0x49230a;return db[_0xf0d2('0x43')][_0xf0d2('0x5c')]({'where':{'id':_0x126dc8[_0xf0d2('0x48')]['id']}})[_0xf0d2('0x26')](handleEntityNotFound(_0x50ee4b,null))[_0xf0d2('0x26')](function(_0x3c437e){if(_0x3c437e){_0x476a62=_0x3c437e;_0x4cd963[_0xf0d2('0x32')]=_['keys'](db['Action'][_0xf0d2('0x30')]);_0x4cd963['query']=_[_0xf0d2('0x34')](_0x126dc8[_0xf0d2('0x33')]);_0x4cd963['filters']=_['intersection'](_0x4cd963[_0xf0d2('0x32')],_0x4cd963[_0xf0d2('0x33')]);_0x348c89['attributes']=_[_0xf0d2('0x36')](_0x4cd963[_0xf0d2('0x32')],qs['fields'](_0x126dc8[_0xf0d2('0x33')]['fields']));_0x348c89[_0xf0d2('0x37')]=_0x348c89[_0xf0d2('0x37')][_0xf0d2('0x38')]?_0x348c89['attributes']:_0x4cd963[_0xf0d2('0x32')];_0x348c89[_0xf0d2('0x3b')]=qs[_0xf0d2('0x3c')](_0x126dc8[_0xf0d2('0x33')][_0xf0d2('0x3c')]);_0x348c89['where']=qs[_0xf0d2('0x35')](_['pick'](_0x126dc8[_0xf0d2('0x33')],_0x4cd963[_0xf0d2('0x35')]));if(_0x126dc8[_0xf0d2('0x33')]['filter']){_0x348c89['where']=_[_0xf0d2('0x40')](_0x348c89[_0xf0d2('0x3d')],{'$or':_['map'](_0x348c89[_0xf0d2('0x37')],function(_0x520e08){var _0x29bb67={};_0x29bb67[_0x520e08]={'$like':'%'+_0x126dc8['query'][_0xf0d2('0x3f')]+'%'};return _0x29bb67;})});}_0x348c89=_['merge']({},_0x348c89,_0x126dc8[_0xf0d2('0x4b')]);return _0x476a62[_0xf0d2('0x5b')](_0x348c89);}})[_0xf0d2('0x26')](function(_0x3aec4a){if(_0x3aec4a){_0x49230a=_0x3aec4a[_0xf0d2('0x38')];if(!_0x126dc8[_0xf0d2('0x33')][_0xf0d2('0x39')](_0xf0d2('0x3a'))){_0x348c89[_0xf0d2('0x22')]=qs[_0xf0d2('0x22')](_0x126dc8[_0xf0d2('0x33')][_0xf0d2('0x22')]);_0x348c89[_0xf0d2('0x20')]=qs[_0xf0d2('0x20')](_0x126dc8['query'][_0xf0d2('0x20')]);}return _0x476a62[_0xf0d2('0x5b')](_0x348c89);}})[_0xf0d2('0x26')](function(_0x502802){if(_0x502802){return _0x502802?{'count':_0x49230a,'rows':_0x502802}:null;}})['then'](respondWithResult(_0x50ee4b,null))[_0xf0d2('0x46')](handleError(_0x50ee4b,null));}; \ No newline at end of file +var _0x6a3a=['addAnyCondition','getAllConditions','findOne','order','hasOwnProperty','nolimit','getAnyConditions','addAction','TriggerId','Action','getActions','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','util','sox','to-csv','ejs','fs-extra','crypto','jsforce','ioredis','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','end','status','json','offset','undefined','limit','count','Content-Range','reject','save','then','get','Triggers','destroy','sendStatus','stack','name','index','map','fieldName','key','model','query','filters','attributes','fields','length','sort','where','pick','filter','merge','type','VIRTUAL','includeAll','include','Trigger','findAll','catch','show','keys','rawAttributes','intersection','options','find','create','body','user','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','UserProfileSection','userProfileId','UserProfileResource','error','update','params','TriggerAllId','Condition'];(function(_0x3b4453,_0x4d4115){var _0x480515=function(_0xc7309){while(--_0xc7309){_0x3b4453['push'](_0x3b4453['shift']());}};_0x480515(++_0x4d4115);}(_0x6a3a,0xc5));var _0xa6a3=function(_0x19950b,_0x53d0d7){_0x19950b=_0x19950b-0x0;var _0x3c6b41=_0x6a3a[_0x19950b];return _0x3c6b41;};'use strict';var emlformat=require('eml-format');var rimraf=require(_0xa6a3('0x0'));var zipdir=require(_0xa6a3('0x1'));var jsonpatch=require(_0xa6a3('0x2'));var rp=require(_0xa6a3('0x3'));var moment=require(_0xa6a3('0x4'));var BPromise=require(_0xa6a3('0x5'));var Mustache=require(_0xa6a3('0x6'));var util=require(_0xa6a3('0x7'));var path=require('path');var sox=require(_0xa6a3('0x8'));var csv=require(_0xa6a3('0x9'));var ejs=require(_0xa6a3('0xa'));var fs=require('fs');var fs_extra=require(_0xa6a3('0xb'));var _=require('lodash');var squel=require('squel');var crypto=require(_0xa6a3('0xc'));var jsforce=require(_0xa6a3('0xd'));var deskjs=require('desk.js');var toCsv=require(_0xa6a3('0x9'));var querystring=require('querystring');var Papa=require('papaparse');var Redis=require(_0xa6a3('0xe'));var authService=require('../../components/auth/service');var qs=require(_0xa6a3('0xf'));var as=require(_0xa6a3('0x10'));var hardwareService=require(_0xa6a3('0x11'));var logger=require(_0xa6a3('0x12'))(_0xa6a3('0x13'));var utils=require(_0xa6a3('0x14'));var config=require(_0xa6a3('0x15'));var licenseUtil=require(_0xa6a3('0x16'));var db=require(_0xa6a3('0x17'))['db'];function respondWithStatusCode(_0x4da17e,_0x30b5c7){_0x30b5c7=_0x30b5c7||0xcc;return function(_0x5db177){if(_0x5db177){return _0x4da17e['sendStatus'](_0x30b5c7);}return _0x4da17e['status'](_0x30b5c7)[_0xa6a3('0x18')]();};}function respondWithResult(_0x4cdbce,_0x1e40b0){_0x1e40b0=_0x1e40b0||0xc8;return function(_0x28b8df){if(_0x28b8df){return _0x4cdbce[_0xa6a3('0x19')](_0x1e40b0)[_0xa6a3('0x1a')](_0x28b8df);}};}function respondWithFilteredResult(_0x2134ff,_0x50f446){return function(_0x2458fc){if(_0x2458fc){var _0x2a2a4a=typeof _0x50f446[_0xa6a3('0x1b')]===_0xa6a3('0x1c')&&typeof _0x50f446[_0xa6a3('0x1d')]===_0xa6a3('0x1c');var _0x2cdaab=_0x2458fc[_0xa6a3('0x1e')];var _0x2a9254=_0x2a2a4a?0x0:_0x50f446['offset'];var _0x4b4e44=_0x2a2a4a?_0x2458fc[_0xa6a3('0x1e')]:_0x50f446[_0xa6a3('0x1b')]+_0x50f446['limit'];var _0xb1c912;if(_0x4b4e44>=_0x2cdaab){_0x4b4e44=_0x2cdaab;_0xb1c912=0xc8;}else{_0xb1c912=0xce;}_0x2134ff['status'](_0xb1c912);return _0x2134ff['set'](_0xa6a3('0x1f'),_0x2a9254+'-'+_0x4b4e44+'/'+_0x2cdaab)[_0xa6a3('0x1a')](_0x2458fc);}return null;};}function patchUpdates(_0x230c4c){return function(_0xa630e3){try{jsonpatch['apply'](_0xa630e3,_0x230c4c,!![]);}catch(_0x521082){return BPromise[_0xa6a3('0x20')](_0x521082);}return _0xa630e3[_0xa6a3('0x21')]();};}function saveUpdates(_0x5e7451,_0x1ddaca){return function(_0x27c4b1){if(_0x27c4b1){return _0x27c4b1['update'](_0x5e7451)[_0xa6a3('0x22')](function(_0xec87b7){return _0xec87b7;});}return null;};}function removeEntity(_0x7d11f4,_0x2761ab){return function(_0x37fef3){if(_0x37fef3){return _0x37fef3['destroy']()[_0xa6a3('0x22')](function(){var _0x224ecf=_0x37fef3[_0xa6a3('0x23')]({'plain':!![]});var _0x4f0b26=_0xa6a3('0x24');return db['UserProfileResource'][_0xa6a3('0x25')]({'where':{'type':_0x4f0b26,'resourceId':_0x224ecf['id']}})['then'](function(){return _0x37fef3;});})[_0xa6a3('0x22')](function(){_0x7d11f4['status'](0xcc)[_0xa6a3('0x18')]();});}};}function handleEntityNotFound(_0xc83189,_0x2e5bae){return function(_0x52b9bc){if(!_0x52b9bc){_0xc83189[_0xa6a3('0x26')](0x194);}return _0x52b9bc;};}function handleError(_0x27016e,_0x29bc20){_0x29bc20=_0x29bc20||0x1f4;return function(_0x385b23){logger['error'](_0x385b23[_0xa6a3('0x27')]);if(_0x385b23['name']){delete _0x385b23[_0xa6a3('0x28')];}_0x27016e[_0xa6a3('0x19')](_0x29bc20)['send'](_0x385b23);};}exports[_0xa6a3('0x29')]=function(_0x1bc22b,_0x6d4220){var _0x3dd32a={},_0x328e11={},_0x57f95f={'count':0x0,'rows':[]};var _0x3cb9f1=_[_0xa6a3('0x2a')](db['Trigger']['rawAttributes'],function(_0x15387e){return{'name':_0x15387e[_0xa6a3('0x2b')],'type':_0x15387e['type'][_0xa6a3('0x2c')]};});_0x328e11[_0xa6a3('0x2d')]=_[_0xa6a3('0x2a')](_0x3cb9f1,'name');_0x328e11[_0xa6a3('0x2e')]=_['keys'](_0x1bc22b['query']);_0x328e11[_0xa6a3('0x2f')]=_['intersection'](_0x328e11['model'],_0x328e11[_0xa6a3('0x2e')]);_0x3dd32a[_0xa6a3('0x30')]=_['intersection'](_0x328e11['model'],qs[_0xa6a3('0x31')](_0x1bc22b[_0xa6a3('0x2e')][_0xa6a3('0x31')]));_0x3dd32a[_0xa6a3('0x30')]=_0x3dd32a[_0xa6a3('0x30')][_0xa6a3('0x32')]?_0x3dd32a[_0xa6a3('0x30')]:_0x328e11[_0xa6a3('0x2d')];if(!_0x1bc22b['query']['hasOwnProperty']('nolimit')){_0x3dd32a[_0xa6a3('0x1d')]=qs[_0xa6a3('0x1d')](_0x1bc22b[_0xa6a3('0x2e')][_0xa6a3('0x1d')]);_0x3dd32a[_0xa6a3('0x1b')]=qs[_0xa6a3('0x1b')](_0x1bc22b[_0xa6a3('0x2e')]['offset']);}_0x3dd32a['order']=qs['sort'](_0x1bc22b['query'][_0xa6a3('0x33')]);_0x3dd32a[_0xa6a3('0x34')]=qs[_0xa6a3('0x2f')](_[_0xa6a3('0x35')](_0x1bc22b[_0xa6a3('0x2e')],_0x328e11[_0xa6a3('0x2f')]),_0x3cb9f1);if(_0x1bc22b[_0xa6a3('0x2e')][_0xa6a3('0x36')]){_0x3dd32a[_0xa6a3('0x34')]=_[_0xa6a3('0x37')](_0x3dd32a['where'],{'$or':_['map'](_0x3cb9f1,function(_0x13aefa){if(_0x13aefa[_0xa6a3('0x38')]!==_0xa6a3('0x39')){var _0x5e0024={};_0x5e0024[_0x13aefa['name']]={'$like':'%'+_0x1bc22b[_0xa6a3('0x2e')]['filter']+'%'};return _0x5e0024;}})});}_0x3dd32a=_['merge']({},_0x3dd32a,_0x1bc22b['options']);var _0x5489af={'where':_0x3dd32a['where']};return db['Trigger']['count'](_0x5489af)[_0xa6a3('0x22')](function(_0x1e3387){_0x57f95f[_0xa6a3('0x1e')]=_0x1e3387;if(_0x1bc22b[_0xa6a3('0x2e')][_0xa6a3('0x3a')]){_0x3dd32a[_0xa6a3('0x3b')]=[{'all':!![]}];}return db[_0xa6a3('0x3c')][_0xa6a3('0x3d')](_0x3dd32a);})[_0xa6a3('0x22')](function(_0x2a8957){_0x57f95f['rows']=_0x2a8957;return _0x57f95f;})[_0xa6a3('0x22')](respondWithFilteredResult(_0x6d4220,_0x3dd32a))[_0xa6a3('0x3e')](handleError(_0x6d4220,null));};exports[_0xa6a3('0x3f')]=function(_0x1956ff,_0x1a1d3d){var _0x375fb8={'raw':![],'where':{'id':_0x1956ff['params']['id']}},_0x18a920={};_0x18a920[_0xa6a3('0x2d')]=_[_0xa6a3('0x40')](db[_0xa6a3('0x3c')][_0xa6a3('0x41')]);_0x18a920[_0xa6a3('0x2e')]=_[_0xa6a3('0x40')](_0x1956ff[_0xa6a3('0x2e')]);_0x18a920['filters']=_[_0xa6a3('0x42')](_0x18a920[_0xa6a3('0x2d')],_0x18a920[_0xa6a3('0x2e')]);_0x375fb8[_0xa6a3('0x30')]=_[_0xa6a3('0x42')](_0x18a920['model'],qs[_0xa6a3('0x31')](_0x1956ff[_0xa6a3('0x2e')][_0xa6a3('0x31')]));_0x375fb8['attributes']=_0x375fb8[_0xa6a3('0x30')][_0xa6a3('0x32')]?_0x375fb8[_0xa6a3('0x30')]:_0x18a920[_0xa6a3('0x2d')];if(_0x1956ff[_0xa6a3('0x2e')][_0xa6a3('0x3a')]){_0x375fb8[_0xa6a3('0x3b')]=[{'all':!![]}];}_0x375fb8=_['merge']({},_0x375fb8,_0x1956ff[_0xa6a3('0x43')]);return db[_0xa6a3('0x3c')][_0xa6a3('0x44')](_0x375fb8)[_0xa6a3('0x22')](handleEntityNotFound(_0x1a1d3d,null))[_0xa6a3('0x22')](respondWithResult(_0x1a1d3d,null))['catch'](handleError(_0x1a1d3d,null));};exports[_0xa6a3('0x45')]=function(_0x4d448f,_0x2b627b){return db['Trigger'][_0xa6a3('0x45')](_0x4d448f[_0xa6a3('0x46')],{})[_0xa6a3('0x22')](function(_0x36329d){var _0x3982f3=_0x4d448f[_0xa6a3('0x47')][_0xa6a3('0x23')]({'plain':!![]});if(!_0x3982f3)throw new Error(_0xa6a3('0x48'));if(_0x3982f3[_0xa6a3('0x49')]==='user'){var _0x555a7e=_0x36329d[_0xa6a3('0x23')]({'plain':!![]});var _0x50a7e7=_0xa6a3('0x24');return db[_0xa6a3('0x4a')][_0xa6a3('0x44')]({'where':{'name':_0x50a7e7,'userProfileId':_0x3982f3[_0xa6a3('0x4b')]},'raw':!![]})[_0xa6a3('0x22')](function(_0x347e3d){if(_0x347e3d&&_0x347e3d['autoAssociation']===0x0){return db[_0xa6a3('0x4c')]['create']({'name':_0x555a7e['name'],'resourceId':_0x555a7e['id'],'type':_0x347e3d['name'],'sectionId':_0x347e3d['id']},{})[_0xa6a3('0x22')](function(){return _0x36329d;});}else{return _0x36329d;}})[_0xa6a3('0x3e')](function(_0x5d2a0a){logger[_0xa6a3('0x4d')]('Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s',_0x5d2a0a);throw _0x5d2a0a;});}return _0x36329d;})[_0xa6a3('0x22')](respondWithResult(_0x2b627b,0xc9))[_0xa6a3('0x3e')](handleError(_0x2b627b,null));};exports[_0xa6a3('0x4e')]=function(_0x3f1759,_0x4d9def){if(_0x3f1759[_0xa6a3('0x46')]['id']){delete _0x3f1759[_0xa6a3('0x46')]['id'];}return db[_0xa6a3('0x3c')][_0xa6a3('0x44')]({'where':{'id':_0x3f1759[_0xa6a3('0x4f')]['id']}})['then'](handleEntityNotFound(_0x4d9def,null))[_0xa6a3('0x22')](saveUpdates(_0x3f1759['body'],null))[_0xa6a3('0x22')](respondWithResult(_0x4d9def,null))[_0xa6a3('0x3e')](handleError(_0x4d9def,null));};exports[_0xa6a3('0x25')]=function(_0x14f093,_0x360d02){return db['Trigger'][_0xa6a3('0x44')]({'where':{'id':_0x14f093[_0xa6a3('0x4f')]['id']}})[_0xa6a3('0x22')](handleEntityNotFound(_0x360d02,null))[_0xa6a3('0x22')](removeEntity(_0x360d02,null))['catch'](handleError(_0x360d02,null));};exports['addAllCondition']=function(_0xe31892,_0x9693b1,_0x421489){if(_0xe31892[_0xa6a3('0x46')]['id']){delete _0xe31892[_0xa6a3('0x46')]['id'];}return db[_0xa6a3('0x3c')][_0xa6a3('0x44')]({'where':{'id':_0xe31892[_0xa6a3('0x4f')]['id']}})[_0xa6a3('0x22')](handleEntityNotFound(_0x9693b1,null))[_0xa6a3('0x22')](function(_0x559023){if(_0x559023){_0xe31892[_0xa6a3('0x46')][_0xa6a3('0x50')]=_0x559023['id'];return db[_0xa6a3('0x51')][_0xa6a3('0x45')](_0xe31892[_0xa6a3('0x46')]);}})[_0xa6a3('0x22')](respondWithResult(_0x9693b1,null))['catch'](handleError(_0x9693b1,null));};exports[_0xa6a3('0x52')]=function(_0x1bddb6,_0x4d5068,_0x5e4c79){if(_0x1bddb6[_0xa6a3('0x46')]['id']){delete _0x1bddb6['body']['id'];}return db[_0xa6a3('0x3c')][_0xa6a3('0x44')]({'where':{'id':_0x1bddb6['params']['id']}})[_0xa6a3('0x22')](handleEntityNotFound(_0x4d5068,null))[_0xa6a3('0x22')](function(_0x1d0d02){if(_0x1d0d02){_0x1bddb6[_0xa6a3('0x46')]['TriggerAnyId']=_0x1d0d02['id'];return db[_0xa6a3('0x51')][_0xa6a3('0x45')](_0x1bddb6[_0xa6a3('0x46')]);}})[_0xa6a3('0x22')](respondWithResult(_0x4d5068,null))['catch'](handleError(_0x4d5068,null));};exports[_0xa6a3('0x53')]=function(_0x37a972,_0x2f0a32,_0x30fb73){var _0x234235={};var _0x1e7c3d={};var _0x2ca89a;var _0x41f726;return db[_0xa6a3('0x3c')][_0xa6a3('0x54')]({'where':{'id':_0x37a972[_0xa6a3('0x4f')]['id']}})[_0xa6a3('0x22')](handleEntityNotFound(_0x2f0a32,null))[_0xa6a3('0x22')](function(_0x2a121d){if(_0x2a121d){_0x2ca89a=_0x2a121d;_0x1e7c3d[_0xa6a3('0x2d')]=_['keys'](db['Condition']['rawAttributes']);_0x1e7c3d[_0xa6a3('0x2e')]=_[_0xa6a3('0x40')](_0x37a972['query']);_0x1e7c3d[_0xa6a3('0x2f')]=_[_0xa6a3('0x42')](_0x1e7c3d[_0xa6a3('0x2d')],_0x1e7c3d['query']);_0x234235[_0xa6a3('0x30')]=_['intersection'](_0x1e7c3d[_0xa6a3('0x2d')],qs[_0xa6a3('0x31')](_0x37a972['query'][_0xa6a3('0x31')]));_0x234235[_0xa6a3('0x30')]=_0x234235[_0xa6a3('0x30')]['length']?_0x234235[_0xa6a3('0x30')]:_0x1e7c3d[_0xa6a3('0x2d')];_0x234235[_0xa6a3('0x55')]=qs[_0xa6a3('0x33')](_0x37a972['query'][_0xa6a3('0x33')]);_0x234235[_0xa6a3('0x34')]=qs[_0xa6a3('0x2f')](_[_0xa6a3('0x35')](_0x37a972[_0xa6a3('0x2e')],_0x1e7c3d[_0xa6a3('0x2f')]));if(_0x37a972['query'][_0xa6a3('0x36')]){_0x234235[_0xa6a3('0x34')]=_[_0xa6a3('0x37')](_0x234235['where'],{'$or':_[_0xa6a3('0x2a')](_0x234235['attributes'],function(_0x1065d1){var _0x21997c={};_0x21997c[_0x1065d1]={'$like':'%'+_0x37a972['query'][_0xa6a3('0x36')]+'%'};return _0x21997c;})});}_0x234235=_[_0xa6a3('0x37')]({},_0x234235,_0x37a972['options']);return _0x2ca89a['getAllConditions'](_0x234235);}})[_0xa6a3('0x22')](function(_0x468d34){if(_0x468d34){_0x41f726=_0x468d34[_0xa6a3('0x32')];if(!_0x37a972['query']['hasOwnProperty']('nolimit')){_0x234235[_0xa6a3('0x1d')]=qs[_0xa6a3('0x1d')](_0x37a972[_0xa6a3('0x2e')][_0xa6a3('0x1d')]);_0x234235['offset']=qs[_0xa6a3('0x1b')](_0x37a972['query']['offset']);}return _0x2ca89a['getAllConditions'](_0x234235);}})['then'](function(_0x4fcb06){if(_0x4fcb06){return _0x4fcb06?{'count':_0x41f726,'rows':_0x4fcb06}:null;}})[_0xa6a3('0x22')](respondWithResult(_0x2f0a32,null))[_0xa6a3('0x3e')](handleError(_0x2f0a32,null));};exports['getAnyConditions']=function(_0x2b5248,_0x83ab81,_0x5a6dca){var _0x4f88e6={};var _0x3f3f7b={};var _0x185dff;var _0x4228b6;return db[_0xa6a3('0x3c')]['findOne']({'where':{'id':_0x2b5248[_0xa6a3('0x4f')]['id']}})[_0xa6a3('0x22')](handleEntityNotFound(_0x83ab81,null))[_0xa6a3('0x22')](function(_0x287bfe){if(_0x287bfe){_0x185dff=_0x287bfe;_0x3f3f7b[_0xa6a3('0x2d')]=_[_0xa6a3('0x40')](db[_0xa6a3('0x51')]['rawAttributes']);_0x3f3f7b[_0xa6a3('0x2e')]=_['keys'](_0x2b5248[_0xa6a3('0x2e')]);_0x3f3f7b[_0xa6a3('0x2f')]=_[_0xa6a3('0x42')](_0x3f3f7b[_0xa6a3('0x2d')],_0x3f3f7b['query']);_0x4f88e6[_0xa6a3('0x30')]=_[_0xa6a3('0x42')](_0x3f3f7b[_0xa6a3('0x2d')],qs[_0xa6a3('0x31')](_0x2b5248[_0xa6a3('0x2e')][_0xa6a3('0x31')]));_0x4f88e6[_0xa6a3('0x30')]=_0x4f88e6[_0xa6a3('0x30')][_0xa6a3('0x32')]?_0x4f88e6[_0xa6a3('0x30')]:_0x3f3f7b[_0xa6a3('0x2d')];_0x4f88e6[_0xa6a3('0x55')]=qs['sort'](_0x2b5248[_0xa6a3('0x2e')][_0xa6a3('0x33')]);_0x4f88e6[_0xa6a3('0x34')]=qs[_0xa6a3('0x2f')](_['pick'](_0x2b5248[_0xa6a3('0x2e')],_0x3f3f7b[_0xa6a3('0x2f')]));if(_0x2b5248[_0xa6a3('0x2e')]['filter']){_0x4f88e6['where']=_[_0xa6a3('0x37')](_0x4f88e6['where'],{'$or':_[_0xa6a3('0x2a')](_0x4f88e6['attributes'],function(_0x3ff205){var _0x2327c2={};_0x2327c2[_0x3ff205]={'$like':'%'+_0x2b5248['query'][_0xa6a3('0x36')]+'%'};return _0x2327c2;})});}_0x4f88e6=_[_0xa6a3('0x37')]({},_0x4f88e6,_0x2b5248[_0xa6a3('0x43')]);return _0x185dff['getAnyConditions'](_0x4f88e6);}})[_0xa6a3('0x22')](function(_0x1d7166){if(_0x1d7166){_0x4228b6=_0x1d7166[_0xa6a3('0x32')];if(!_0x2b5248[_0xa6a3('0x2e')][_0xa6a3('0x56')](_0xa6a3('0x57'))){_0x4f88e6[_0xa6a3('0x1d')]=qs[_0xa6a3('0x1d')](_0x2b5248['query'][_0xa6a3('0x1d')]);_0x4f88e6[_0xa6a3('0x1b')]=qs[_0xa6a3('0x1b')](_0x2b5248[_0xa6a3('0x2e')][_0xa6a3('0x1b')]);}return _0x185dff[_0xa6a3('0x58')](_0x4f88e6);}})[_0xa6a3('0x22')](function(_0x293283){if(_0x293283){return _0x293283?{'count':_0x4228b6,'rows':_0x293283}:null;}})['then'](respondWithResult(_0x83ab81,null))[_0xa6a3('0x3e')](handleError(_0x83ab81,null));};exports[_0xa6a3('0x59')]=function(_0x2017f6,_0x46020d,_0x1e99e5){if(_0x2017f6[_0xa6a3('0x46')]['id']){delete _0x2017f6[_0xa6a3('0x46')]['id'];}return db[_0xa6a3('0x3c')]['find']({'where':{'id':_0x2017f6[_0xa6a3('0x4f')]['id']}})[_0xa6a3('0x22')](handleEntityNotFound(_0x46020d,null))[_0xa6a3('0x22')](function(_0xa1a464){if(_0xa1a464){_0x2017f6[_0xa6a3('0x46')][_0xa6a3('0x5a')]=_0xa1a464['id'];return db[_0xa6a3('0x5b')][_0xa6a3('0x45')](_0x2017f6['body']);}})[_0xa6a3('0x22')](respondWithResult(_0x46020d,null))[_0xa6a3('0x3e')](handleError(_0x46020d,null));};exports['getActions']=function(_0x4d5656,_0x32ebc7,_0xf1bdb4){var _0x22e590={};var _0x4b1312={};var _0x4192a7;var _0x1104a2;return db[_0xa6a3('0x3c')][_0xa6a3('0x54')]({'where':{'id':_0x4d5656['params']['id']}})[_0xa6a3('0x22')](handleEntityNotFound(_0x32ebc7,null))['then'](function(_0x1a997c){if(_0x1a997c){_0x4192a7=_0x1a997c;_0x4b1312[_0xa6a3('0x2d')]=_[_0xa6a3('0x40')](db['Action'][_0xa6a3('0x41')]);_0x4b1312[_0xa6a3('0x2e')]=_[_0xa6a3('0x40')](_0x4d5656[_0xa6a3('0x2e')]);_0x4b1312[_0xa6a3('0x2f')]=_['intersection'](_0x4b1312['model'],_0x4b1312[_0xa6a3('0x2e')]);_0x22e590[_0xa6a3('0x30')]=_[_0xa6a3('0x42')](_0x4b1312['model'],qs['fields'](_0x4d5656[_0xa6a3('0x2e')]['fields']));_0x22e590[_0xa6a3('0x30')]=_0x22e590[_0xa6a3('0x30')]['length']?_0x22e590['attributes']:_0x4b1312[_0xa6a3('0x2d')];_0x22e590['order']=qs[_0xa6a3('0x33')](_0x4d5656['query'][_0xa6a3('0x33')]);_0x22e590[_0xa6a3('0x34')]=qs[_0xa6a3('0x2f')](_[_0xa6a3('0x35')](_0x4d5656[_0xa6a3('0x2e')],_0x4b1312[_0xa6a3('0x2f')]));if(_0x4d5656[_0xa6a3('0x2e')][_0xa6a3('0x36')]){_0x22e590['where']=_[_0xa6a3('0x37')](_0x22e590[_0xa6a3('0x34')],{'$or':_['map'](_0x22e590[_0xa6a3('0x30')],function(_0x5caee3){var _0x1fbad3={};_0x1fbad3[_0x5caee3]={'$like':'%'+_0x4d5656[_0xa6a3('0x2e')][_0xa6a3('0x36')]+'%'};return _0x1fbad3;})});}_0x22e590=_[_0xa6a3('0x37')]({},_0x22e590,_0x4d5656[_0xa6a3('0x43')]);return _0x4192a7[_0xa6a3('0x5c')](_0x22e590);}})['then'](function(_0x1e8a0c){if(_0x1e8a0c){_0x1104a2=_0x1e8a0c['length'];if(!_0x4d5656[_0xa6a3('0x2e')][_0xa6a3('0x56')](_0xa6a3('0x57'))){_0x22e590[_0xa6a3('0x1d')]=qs[_0xa6a3('0x1d')](_0x4d5656['query'][_0xa6a3('0x1d')]);_0x22e590[_0xa6a3('0x1b')]=qs[_0xa6a3('0x1b')](_0x4d5656['query']['offset']);}return _0x4192a7['getActions'](_0x22e590);}})[_0xa6a3('0x22')](function(_0x435b1e){if(_0x435b1e){return _0x435b1e?{'count':_0x1104a2,'rows':_0x435b1e}:null;}})[_0xa6a3('0x22')](respondWithResult(_0x32ebc7,null))['catch'](handleError(_0x32ebc7,null));}; \ No newline at end of file diff --git a/server/api/trigger/trigger.model.js b/server/api/trigger/trigger.model.js index 22cdd35..7a0743c 100644 --- a/server/api/trigger/trigger.model.js +++ b/server/api/trigger/trigger.model.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x3248=['exports','define','Trigger','tools_triggers','util','moment','bluebird','request-promise','path','rimraf','../../config/environment'];(function(_0x119d42,_0x1f6c27){var _0x8a5d36=function(_0x1e0971){while(--_0x1e0971){_0x119d42['push'](_0x119d42['shift']());}};_0x8a5d36(++_0x1f6c27);}(_0x3248,0x1bc));var _0x8324=function(_0x98b6eb,_0x4fd368){_0x98b6eb=_0x98b6eb-0x0;var _0x55e701=_0x3248[_0x98b6eb];return _0x55e701;};'use strict';var _=require('lodash');var util=require(_0x8324('0x0'));var logger=require('../../config/logger')('api');var moment=require(_0x8324('0x1'));var BPromise=require(_0x8324('0x2'));var rp=require(_0x8324('0x3'));var fs=require('fs');var path=require(_0x8324('0x4'));var rimraf=require(_0x8324('0x5'));var config=require(_0x8324('0x6'));var attributes=require('./trigger.attributes');module[_0x8324('0x7')]=function(_0x1c5c2a,_0x5157f4){return _0x1c5c2a[_0x8324('0x8')](_0x8324('0x9'),attributes,{'tableName':_0x8324('0xa'),'paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file +var _0x1da6=['exports','define','Trigger','tools_triggers','lodash','util','../../config/logger','api','moment','bluebird','request-promise','path','rimraf','../../config/environment','./trigger.attributes'];(function(_0x38eb23,_0x196e8b){var _0x48506a=function(_0x36edb0){while(--_0x36edb0){_0x38eb23['push'](_0x38eb23['shift']());}};_0x48506a(++_0x196e8b);}(_0x1da6,0x7c));var _0x61da=function(_0x4d093a,_0x15d59c){_0x4d093a=_0x4d093a-0x0;var _0x5d7227=_0x1da6[_0x4d093a];return _0x5d7227;};'use strict';var _=require(_0x61da('0x0'));var util=require(_0x61da('0x1'));var logger=require(_0x61da('0x2'))(_0x61da('0x3'));var moment=require(_0x61da('0x4'));var BPromise=require(_0x61da('0x5'));var rp=require(_0x61da('0x6'));var fs=require('fs');var path=require(_0x61da('0x7'));var rimraf=require(_0x61da('0x8'));var config=require(_0x61da('0x9'));var attributes=require(_0x61da('0xa'));module[_0x61da('0xb')]=function(_0x16cd66,_0x2c40c6){return _0x16cd66[_0x61da('0xc')](_0x61da('0xd'),attributes,{'tableName':_0x61da('0xe'),'paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file diff --git a/server/api/trigger/trigger.rpc.js b/server/api/trigger/trigger.rpc.js index 6c06704..e1c3349 100644 --- a/server/api/trigger/trigger.rpc.js +++ b/server/api/trigger/trigger.rpc.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x0815=['info','Trigger,\x20%s,\x20%s','request\x20sent','debug','stringify','error','code','message','result','catch','GetTrigger','Trigger','findAll','options','raw','where','attributes','limit','include','map','model','ShowTrigger','lodash','moment','bluebird','ioredis','../../config/utils','../../config/logger','jayson/promise','request','then'];(function(_0x4fde08,_0x463a36){var _0x12e725=function(_0x2670c5){while(--_0x2670c5){_0x4fde08['push'](_0x4fde08['shift']());}};_0x12e725(++_0x463a36);}(_0x0815,0x92));var _0x5081=function(_0x59ee6f,_0x450239){_0x59ee6f=_0x59ee6f-0x0;var _0x4c0979=_0x0815[_0x59ee6f];return _0x4c0979;};'use strict';var _=require(_0x5081('0x0'));var util=require('util');var moment=require(_0x5081('0x1'));var BPromise=require(_0x5081('0x2'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x5081('0x3'));var db=require('../../mysqldb')['db'];var utils=require(_0x5081('0x4'));var logger=require(_0x5081('0x5'))('rpc');var config=require('../../config/environment');var jayson=require(_0x5081('0x6'));var client=jayson['client']['http']({'port':0x232a});function respondWithRpcPromise(_0xceb38c,_0x3febb2,_0x5619cf){return new BPromise(function(_0x1c759d,_0xb0edbc){return client[_0x5081('0x7')](_0xceb38c,_0x5619cf)[_0x5081('0x8')](function(_0x5acd87){logger[_0x5081('0x9')](_0x5081('0xa'),_0x3febb2,_0x5081('0xb'));logger[_0x5081('0xc')]('Trigger,\x20%s,\x20%s,\x20%s',_0x3febb2,_0x5081('0xb'),JSON[_0x5081('0xd')](_0x5acd87));if(_0x5acd87[_0x5081('0xe')]){if(_0x5acd87['error'][_0x5081('0xf')]===0x1f4){logger[_0x5081('0xe')]('Trigger,\x20%s,\x20%s',_0x3febb2,_0x5acd87[_0x5081('0xe')][_0x5081('0x10')]);return _0xb0edbc(_0x5acd87[_0x5081('0xe')][_0x5081('0x10')]);}logger[_0x5081('0xe')](_0x5081('0xa'),_0x3febb2,_0x5acd87[_0x5081('0xe')][_0x5081('0x10')]);return _0x1c759d(_0x5acd87[_0x5081('0xe')][_0x5081('0x10')]);}else{logger[_0x5081('0x9')](_0x5081('0xa'),_0x3febb2,_0x5081('0xb'));_0x1c759d(_0x5acd87[_0x5081('0x11')][_0x5081('0x10')]);}})[_0x5081('0x12')](function(_0x348c4a){logger[_0x5081('0xe')](_0x5081('0xa'),_0x3febb2,_0x348c4a);_0xb0edbc(_0x348c4a);});});}exports[_0x5081('0x13')]=function(_0x4be8d8){var _0x596a0f=this;return new Promise(function(_0x55d9ee,_0x43a81f){return db[_0x5081('0x14')][_0x5081('0x15')]({'raw':_0x4be8d8[_0x5081('0x16')]?_0x4be8d8['options'][_0x5081('0x17')]===undefined?!![]:![]:!![],'where':_0x4be8d8[_0x5081('0x16')]?_0x4be8d8[_0x5081('0x16')][_0x5081('0x18')]||null:null,'attributes':_0x4be8d8[_0x5081('0x16')]?_0x4be8d8[_0x5081('0x16')][_0x5081('0x19')]||null:null,'limit':_0x4be8d8[_0x5081('0x16')]?_0x4be8d8['options'][_0x5081('0x1a')]||null:null,'include':_0x4be8d8[_0x5081('0x16')]?_0x4be8d8[_0x5081('0x16')][_0x5081('0x1b')]?_['map'](_0x4be8d8[_0x5081('0x16')][_0x5081('0x1b')],function(_0x27e1c0){return{'model':db[_0x27e1c0['model']],'as':_0x27e1c0['as'],'attributes':_0x27e1c0[_0x5081('0x19')],'include':_0x27e1c0[_0x5081('0x1b')]?_[_0x5081('0x1c')](_0x27e1c0[_0x5081('0x1b')],function(_0x59c4fe){return{'model':db[_0x59c4fe[_0x5081('0x1d')]],'as':_0x59c4fe['as'],'attributes':_0x59c4fe[_0x5081('0x19')],'include':_0x59c4fe[_0x5081('0x1b')]?_[_0x5081('0x1c')](_0x59c4fe[_0x5081('0x1b')],function(_0x7dd3d5){return{'model':db[_0x7dd3d5[_0x5081('0x1d')]],'as':_0x7dd3d5['as'],'attributes':_0x7dd3d5[_0x5081('0x19')]};}):[]};}):[]};}):[]:[]})[_0x5081('0x8')](function(_0x2da2b2){logger[_0x5081('0x9')](_0x5081('0x13'),_0x4be8d8);logger[_0x5081('0xc')](_0x5081('0x13'),_0x4be8d8,JSON[_0x5081('0xd')](_0x2da2b2));_0x55d9ee(_0x2da2b2);})['catch'](function(_0x24e1fd){logger[_0x5081('0xe')](_0x5081('0x13'),_0x24e1fd['message'],_0x4be8d8);_0x43a81f(_0x596a0f[_0x5081('0xe')](0x1f4,_0x24e1fd[_0x5081('0x10')]));});});};exports['ShowTrigger']=function(_0x3b0cdf){var _0x1b5a86=this;return new Promise(function(_0xf143f5,_0xf6049f){return db[_0x5081('0x14')]['find']({'raw':_0x3b0cdf[_0x5081('0x16')]?_0x3b0cdf['options'][_0x5081('0x17')]===undefined?!![]:![]:!![],'where':_0x3b0cdf[_0x5081('0x16')]?_0x3b0cdf['options']['where']||null:null,'attributes':_0x3b0cdf['options']?_0x3b0cdf['options'][_0x5081('0x19')]||null:null,'include':_0x3b0cdf[_0x5081('0x16')]?_0x3b0cdf[_0x5081('0x16')][_0x5081('0x1b')]?_[_0x5081('0x1c')](_0x3b0cdf['options'][_0x5081('0x1b')],function(_0x4df072){return{'model':db[_0x4df072[_0x5081('0x1d')]],'as':_0x4df072['as'],'attributes':_0x4df072[_0x5081('0x19')],'include':_0x4df072[_0x5081('0x1b')]?_['map'](_0x4df072[_0x5081('0x1b')],function(_0x42b979){return{'model':db[_0x42b979[_0x5081('0x1d')]],'as':_0x42b979['as'],'attributes':_0x42b979[_0x5081('0x19')],'include':_0x42b979[_0x5081('0x1b')]?_[_0x5081('0x1c')](_0x42b979[_0x5081('0x1b')],function(_0x2482ec){return{'model':db[_0x2482ec[_0x5081('0x1d')]],'as':_0x2482ec['as'],'attributes':_0x2482ec[_0x5081('0x19')]};}):[]};}):[]};}):[]:[]})[_0x5081('0x8')](function(_0x18de17){logger[_0x5081('0x9')](_0x5081('0x1e'),_0x3b0cdf);logger[_0x5081('0xc')]('ShowTrigger',_0x3b0cdf,JSON['stringify'](_0x18de17));_0xf143f5(_0x18de17);})['catch'](function(_0x19bc04){logger[_0x5081('0xe')](_0x5081('0x1e'),_0x19bc04[_0x5081('0x10')],_0x3b0cdf);_0xf6049f(_0x1b5a86[_0x5081('0xe')](0x1f4,_0x19bc04[_0x5081('0x10')]));});});}; \ No newline at end of file +var _0x4b0b=['limit','include','model','map','GetTrigger','find','ShowTrigger','catch','lodash','util','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','rpc','jayson/promise','http','request','then','info','Trigger,\x20%s,\x20%s','request\x20sent','debug','Trigger,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','Trigger','findAll','options','raw','where','attributes'];(function(_0x2cad38,_0x22b22b){var _0xf2093a=function(_0x2874f4){while(--_0x2874f4){_0x2cad38['push'](_0x2cad38['shift']());}};_0xf2093a(++_0x22b22b);}(_0x4b0b,0x74));var _0xb4b0=function(_0x3d47e4,_0x1d01c0){_0x3d47e4=_0x3d47e4-0x0;var _0x1e555b=_0x4b0b[_0x3d47e4];return _0x1e555b;};'use strict';var _=require(_0xb4b0('0x0'));var util=require(_0xb4b0('0x1'));var moment=require('moment');var BPromise=require(_0xb4b0('0x2'));var rs=require(_0xb4b0('0x3'));var fs=require('fs');var Redis=require(_0xb4b0('0x4'));var db=require(_0xb4b0('0x5'))['db'];var utils=require(_0xb4b0('0x6'));var logger=require('../../config/logger')(_0xb4b0('0x7'));var config=require('../../config/environment');var jayson=require(_0xb4b0('0x8'));var client=jayson['client'][_0xb4b0('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x422b81,_0x5665fc,_0x3aacd6){return new BPromise(function(_0x476620,_0x28fb53){return client[_0xb4b0('0xa')](_0x422b81,_0x3aacd6)[_0xb4b0('0xb')](function(_0xe268d8){logger[_0xb4b0('0xc')](_0xb4b0('0xd'),_0x5665fc,_0xb4b0('0xe'));logger[_0xb4b0('0xf')](_0xb4b0('0x10'),_0x5665fc,_0xb4b0('0xe'),JSON[_0xb4b0('0x11')](_0xe268d8));if(_0xe268d8[_0xb4b0('0x12')]){if(_0xe268d8[_0xb4b0('0x12')][_0xb4b0('0x13')]===0x1f4){logger[_0xb4b0('0x12')](_0xb4b0('0xd'),_0x5665fc,_0xe268d8[_0xb4b0('0x12')]['message']);return _0x28fb53(_0xe268d8['error'][_0xb4b0('0x14')]);}logger['error']('Trigger,\x20%s,\x20%s',_0x5665fc,_0xe268d8[_0xb4b0('0x12')][_0xb4b0('0x14')]);return _0x476620(_0xe268d8['error'][_0xb4b0('0x14')]);}else{logger['info'](_0xb4b0('0xd'),_0x5665fc,_0xb4b0('0xe'));_0x476620(_0xe268d8[_0xb4b0('0x15')][_0xb4b0('0x14')]);}})['catch'](function(_0x46b6c6){logger[_0xb4b0('0x12')]('Trigger,\x20%s,\x20%s',_0x5665fc,_0x46b6c6);_0x28fb53(_0x46b6c6);});});}exports['GetTrigger']=function(_0x12b2b3){var _0x16df1a=this;return new Promise(function(_0x5a282d,_0xabd8e1){return db[_0xb4b0('0x16')][_0xb4b0('0x17')]({'raw':_0x12b2b3['options']?_0x12b2b3[_0xb4b0('0x18')][_0xb4b0('0x19')]===undefined?!![]:![]:!![],'where':_0x12b2b3[_0xb4b0('0x18')]?_0x12b2b3[_0xb4b0('0x18')][_0xb4b0('0x1a')]||null:null,'attributes':_0x12b2b3[_0xb4b0('0x18')]?_0x12b2b3['options'][_0xb4b0('0x1b')]||null:null,'limit':_0x12b2b3[_0xb4b0('0x18')]?_0x12b2b3[_0xb4b0('0x18')][_0xb4b0('0x1c')]||null:null,'include':_0x12b2b3[_0xb4b0('0x18')]?_0x12b2b3['options']['include']?_['map'](_0x12b2b3[_0xb4b0('0x18')][_0xb4b0('0x1d')],function(_0x165af5){return{'model':db[_0x165af5[_0xb4b0('0x1e')]],'as':_0x165af5['as'],'attributes':_0x165af5['attributes'],'include':_0x165af5[_0xb4b0('0x1d')]?_[_0xb4b0('0x1f')](_0x165af5[_0xb4b0('0x1d')],function(_0x59090b){return{'model':db[_0x59090b['model']],'as':_0x59090b['as'],'attributes':_0x59090b['attributes'],'include':_0x59090b[_0xb4b0('0x1d')]?_[_0xb4b0('0x1f')](_0x59090b[_0xb4b0('0x1d')],function(_0x5de756){return{'model':db[_0x5de756[_0xb4b0('0x1e')]],'as':_0x5de756['as'],'attributes':_0x5de756[_0xb4b0('0x1b')]};}):[]};}):[]};}):[]:[]})['then'](function(_0x3acf0e){logger[_0xb4b0('0xc')](_0xb4b0('0x20'),_0x12b2b3);logger[_0xb4b0('0xf')](_0xb4b0('0x20'),_0x12b2b3,JSON[_0xb4b0('0x11')](_0x3acf0e));_0x5a282d(_0x3acf0e);})['catch'](function(_0x1b30a0){logger[_0xb4b0('0x12')](_0xb4b0('0x20'),_0x1b30a0[_0xb4b0('0x14')],_0x12b2b3);_0xabd8e1(_0x16df1a[_0xb4b0('0x12')](0x1f4,_0x1b30a0[_0xb4b0('0x14')]));});});};exports['ShowTrigger']=function(_0x4088e4){var _0x57ab43=this;return new Promise(function(_0x1fe60f,_0x3b1598){return db['Trigger'][_0xb4b0('0x21')]({'raw':_0x4088e4[_0xb4b0('0x18')]?_0x4088e4[_0xb4b0('0x18')]['raw']===undefined?!![]:![]:!![],'where':_0x4088e4[_0xb4b0('0x18')]?_0x4088e4['options'][_0xb4b0('0x1a')]||null:null,'attributes':_0x4088e4['options']?_0x4088e4[_0xb4b0('0x18')]['attributes']||null:null,'include':_0x4088e4[_0xb4b0('0x18')]?_0x4088e4[_0xb4b0('0x18')][_0xb4b0('0x1d')]?_[_0xb4b0('0x1f')](_0x4088e4[_0xb4b0('0x18')]['include'],function(_0x1a6821){return{'model':db[_0x1a6821[_0xb4b0('0x1e')]],'as':_0x1a6821['as'],'attributes':_0x1a6821['attributes'],'include':_0x1a6821[_0xb4b0('0x1d')]?_[_0xb4b0('0x1f')](_0x1a6821[_0xb4b0('0x1d')],function(_0x4fdc03){return{'model':db[_0x4fdc03[_0xb4b0('0x1e')]],'as':_0x4fdc03['as'],'attributes':_0x4fdc03[_0xb4b0('0x1b')],'include':_0x4fdc03['include']?_[_0xb4b0('0x1f')](_0x4fdc03['include'],function(_0x182826){return{'model':db[_0x182826[_0xb4b0('0x1e')]],'as':_0x182826['as'],'attributes':_0x182826[_0xb4b0('0x1b')]};}):[]};}):[]};}):[]:[]})[_0xb4b0('0xb')](function(_0x11985b){logger[_0xb4b0('0xc')](_0xb4b0('0x22'),_0x4088e4);logger[_0xb4b0('0xf')](_0xb4b0('0x22'),_0x4088e4,JSON[_0xb4b0('0x11')](_0x11985b));_0x1fe60f(_0x11985b);})[_0xb4b0('0x23')](function(_0x3dfa8b){logger[_0xb4b0('0x12')](_0xb4b0('0x22'),_0x3dfa8b[_0xb4b0('0x14')],_0x4088e4);_0x3b1598(_0x57ab43[_0xb4b0('0x12')](0x1f4,_0x3dfa8b[_0xb4b0('0x14')]));});});}; \ No newline at end of file diff --git a/server/api/trunk/index.js b/server/api/trunk/index.js index a8c9804..cd6222b 100644 --- a/server/api/trunk/index.js +++ b/server/api/trunk/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x8208=['express','fs-extra','../../components/auth/service','../../components/interaction/service','get','isAuthenticated','index','/:id','show','post','/:id/clone','create','update','delete','destroy','exports','multer','util','path','connect-timeout'];(function(_0x4a26dd,_0x277184){var _0x3840c3=function(_0x2a07c6){while(--_0x2a07c6){_0x4a26dd['push'](_0x4a26dd['shift']());}};_0x3840c3(++_0x277184);}(_0x8208,0x1a0));var _0x8820=function(_0x42f1dc,_0x492215){_0x42f1dc=_0x42f1dc-0x0;var _0x446740=_0x8208[_0x42f1dc];return _0x446740;};'use strict';var multer=require(_0x8820('0x0'));var util=require(_0x8820('0x1'));var path=require(_0x8820('0x2'));var timeout=require(_0x8820('0x3'));var express=require(_0x8820('0x4'));var router=express['Router']();var fs_extra=require(_0x8820('0x5'));var auth=require(_0x8820('0x6'));var interaction=require(_0x8820('0x7'));var config=require('../../config/environment');var controller=require('./trunk.controller');router[_0x8820('0x8')]('/',auth[_0x8820('0x9')](),controller[_0x8820('0xa')]);router[_0x8820('0x8')](_0x8820('0xb'),auth[_0x8820('0x9')](),controller[_0x8820('0xc')]);router[_0x8820('0xd')](_0x8820('0xe'),auth[_0x8820('0x9')](),controller['clone']);router[_0x8820('0xd')]('/',auth[_0x8820('0x9')](),controller[_0x8820('0xf')]);router['put']('/:id',auth['isAuthenticated'](),controller[_0x8820('0x10')]);router[_0x8820('0x11')](_0x8820('0xb'),auth['isAuthenticated'](),controller[_0x8820('0x12')]);module[_0x8820('0x13')]=router; \ No newline at end of file +var _0xcabc=['show','post','/:id/clone','create','put','update','delete','destroy','exports','multer','util','connect-timeout','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','./trunk.controller','get','/:id','isAuthenticated'];(function(_0x32de0a,_0x3a98b3){var _0x376921=function(_0x1ced57){while(--_0x1ced57){_0x32de0a['push'](_0x32de0a['shift']());}};_0x376921(++_0x3a98b3);}(_0xcabc,0xf9));var _0xccab=function(_0x40a045,_0x516f0e){_0x40a045=_0x40a045-0x0;var _0x1a687c=_0xcabc[_0x40a045];return _0x1a687c;};'use strict';var multer=require(_0xccab('0x0'));var util=require(_0xccab('0x1'));var path=require('path');var timeout=require(_0xccab('0x2'));var express=require('express');var router=express['Router']();var fs_extra=require(_0xccab('0x3'));var auth=require(_0xccab('0x4'));var interaction=require(_0xccab('0x5'));var config=require(_0xccab('0x6'));var controller=require(_0xccab('0x7'));router[_0xccab('0x8')]('/',auth['isAuthenticated'](),controller['index']);router['get'](_0xccab('0x9'),auth[_0xccab('0xa')](),controller[_0xccab('0xb')]);router[_0xccab('0xc')](_0xccab('0xd'),auth[_0xccab('0xa')](),controller['clone']);router[_0xccab('0xc')]('/',auth[_0xccab('0xa')](),controller[_0xccab('0xe')]);router[_0xccab('0xf')](_0xccab('0x9'),auth[_0xccab('0xa')](),controller[_0xccab('0x10')]);router[_0xccab('0x11')](_0xccab('0x9'),auth[_0xccab('0xa')](),controller[_0xccab('0x12')]);module[_0xccab('0x13')]=router; \ No newline at end of file diff --git a/server/api/trunk/trunk.attributes.js b/server/api/trunk/trunk.attributes.js index 15aa158..c71750a 100644 --- a/server/api/trunk/trunk.attributes.js +++ b/server/api/trunk/trunk.attributes.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xc442=['certificate','passive','dynamic','update','BOOLEAN','sequelize','name','friend','peer','STRING','from-voip-provider','ENUM','ALLOWED_NOT_SCREENED','ALLOWED_PASSED_SCREEN','ALLOWED_FAILED_SCREEN','PROHIB_NOT_SCREENED','PROHIB','udp','setDataValue','transport','join','split','String\x20is\x20deprecated.\x20Please\x20use\x20an\x20Array\x20as\x20[\x22udp\x22,\x20\x22tcp\x22]','rfc2833','info','inband','auto','yes','nonat','outgoing','nat','getDataValue','String\x20is\x20deprecated.\x20Please\x20use\x20an\x20Array\x20as\x20[\x22force_rport\x22,\x20\x22comedia\x22]','all','ulaw;alaw;gsm','allow','port,invite','insecure','String\x20is\x20deprecated.\x20Please\x20use\x20an\x20Array\x20as\x20[\x22port\x22,\x20\x22invite\x22]','never','INTEGER','always','accept','uac','uas'];(function(_0x1707bd,_0x34f26e){var _0x19f5fc=function(_0x4620c8){while(--_0x4620c8){_0x1707bd['push'](_0x1707bd['shift']());}};_0x19f5fc(++_0x34f26e);}(_0xc442,0xe6));var _0x2c44=function(_0x2c196f,_0xdea9e6){_0x2c196f=_0x2c196f-0x0;var _0x315f7a=_0xc442[_0x2c196f];return _0x315f7a;};'use strict';var Sequelize=require(_0x2c44('0x0'));module['exports']={'name':{'type':Sequelize['STRING'],'allowNull':![],'unique':_0x2c44('0x1'),'validate':{'notEmpty':!![],'is':/^[A-Za-z0-9\.\_]+$/i}},'type':{'type':Sequelize['ENUM'](_0x2c44('0x2'),'user',_0x2c44('0x3')),'allowNull':![],'defaultValue':_0x2c44('0x2')},'context':{'type':Sequelize[_0x2c44('0x4')],'allowNull':![],'defaultValue':_0x2c44('0x5')},'callingpres':{'type':Sequelize[_0x2c44('0x6')](_0x2c44('0x7'),_0x2c44('0x8'),_0x2c44('0x9'),'ALLOWED',_0x2c44('0xa'),'PROHIB_PASSED_SCREEN','PROHIB_FAILED_SCREEN',_0x2c44('0xb'))},'deny':{'type':Sequelize[_0x2c44('0x4')]},'permit':{'type':Sequelize['STRING']},'secret':{'type':Sequelize[_0x2c44('0x4')]},'md5secret':{'type':Sequelize[_0x2c44('0x4')]},'remotesecret':{'type':Sequelize['STRING']},'transport':{'type':Sequelize[_0x2c44('0x4')],'defaultValue':_0x2c44('0xc'),'set':function(_0x4e9050){this[_0x2c44('0xd')](_0x2c44('0xe'),_0x4e9050?_0x4e9050[_0x2c44('0xf')](','):null);},'get':function(){return this['getDataValue'](_0x2c44('0xe'))?this['getDataValue'](_0x2c44('0xe'))[_0x2c44('0x10')](','):null;},'comment':_0x2c44('0x11')},'dtmfmode':{'type':Sequelize[_0x2c44('0x6')](_0x2c44('0x12'),_0x2c44('0x13'),'shortinfo',_0x2c44('0x14'),_0x2c44('0x15')),'defaultValue':'rfc2833'},'directmedia':{'type':Sequelize[_0x2c44('0x6')](_0x2c44('0x16'),'no',_0x2c44('0x17'),'update',_0x2c44('0x18')),'defaultValue':'no'},'directrtpsetup':{'type':Sequelize[_0x2c44('0x6')](_0x2c44('0x16'),'no'),'defaultValue':'no'},'directmediapermit':{'type':Sequelize['STRING']},'directmediadeny':{'type':Sequelize[_0x2c44('0x4')]},'nat':{'type':Sequelize[_0x2c44('0x4')],'defaultValue':'force_rport,comedia','set':function(_0x46ad1e){this[_0x2c44('0xd')](_0x2c44('0x19'),_0x46ad1e?_0x46ad1e[_0x2c44('0xf')](','):null);},'get':function(){return this[_0x2c44('0x1a')](_0x2c44('0x19'))?this[_0x2c44('0x1a')](_0x2c44('0x19'))[_0x2c44('0x10')](','):null;},'comment':_0x2c44('0x1b')},'callgroup':{'type':Sequelize[_0x2c44('0x4')]},'namedcallgroup':{'type':Sequelize[_0x2c44('0x4')]},'pickupgroup':{'type':Sequelize[_0x2c44('0x4')]},'namedpickupgroup':{'type':Sequelize[_0x2c44('0x4')]},'language':{'type':Sequelize['STRING'],'defaultValue':'en'},'tonezone':{'type':Sequelize['STRING'],'allowNull':!![]},'disallow':{'type':Sequelize[_0x2c44('0x4')],'defaultValue':_0x2c44('0x1c')},'allow':{'type':Sequelize[_0x2c44('0x4')],'allowNull':![],'defaultValue':_0x2c44('0x1d'),'set':function(_0x30ae70){this[_0x2c44('0xd')]('allow',_0x30ae70?_0x30ae70[_0x2c44('0xf')](';'):'ulaw;alaw;gsm');},'get':function(){return this[_0x2c44('0x1a')]('allow')?this['getDataValue'](_0x2c44('0x1e'))['split'](';'):null;},'comment':'String\x20is\x20deprecated.\x20Please\x20use\x20an\x20Array\x20as\x20[\x22ulaw\x22,\x20\x22alaw\x22,\x20\x22alaw\x22]'},'autoframing':{'type':Sequelize[_0x2c44('0x6')](_0x2c44('0x16'),'no')},'insecure':{'type':Sequelize[_0x2c44('0x4')],'defaultValue':_0x2c44('0x1f'),'set':function(_0x443b24){this[_0x2c44('0xd')](_0x2c44('0x20'),_0x443b24?_0x443b24[_0x2c44('0xf')](','):null);},'get':function(){return this[_0x2c44('0x1a')](_0x2c44('0x20'))?this['getDataValue'](_0x2c44('0x20'))[_0x2c44('0x10')](','):null;},'comment':_0x2c44('0x21')},'trustrpid':{'type':Sequelize[_0x2c44('0x6')](_0x2c44('0x16'),'no'),'defaultValue':'no'},'trust_id_outbound':{'type':Sequelize[_0x2c44('0x6')](_0x2c44('0x16'),'no'),'defaultValue':'no'},'progressinband':{'type':Sequelize[_0x2c44('0x6')](_0x2c44('0x16'),'no',_0x2c44('0x22'))},'promiscredir':{'type':Sequelize[_0x2c44('0x6')]('yes','no')},'useclientcode':{'type':Sequelize['ENUM'](_0x2c44('0x16'),'no')},'accountcode':{'type':Sequelize['INTEGER'](0xb)},'setvar':{'type':Sequelize[_0x2c44('0x4')]},'callerid':{'type':Sequelize[_0x2c44('0x4')],'defaultValue':'\x22\x22\x20<>'},'amaflags':{'type':Sequelize[_0x2c44('0x4')]},'callcounter':{'type':Sequelize['ENUM']('yes','no'),'defaultValue':_0x2c44('0x16')},'busylevel':{'type':Sequelize[_0x2c44('0x23')](0xb)},'allowoverlap':{'type':Sequelize[_0x2c44('0x6')](_0x2c44('0x16'),'no')},'allowsubscribe':{'type':Sequelize[_0x2c44('0x6')](_0x2c44('0x16'),'no')},'allowtransfer':{'type':Sequelize['ENUM'](_0x2c44('0x16'),'no')},'ignoresdpversion':{'type':Sequelize[_0x2c44('0x6')]('yes','no')},'subscribecontext':{'type':Sequelize['STRING']},'template':{'type':Sequelize[_0x2c44('0x4')]},'videosupport':{'type':Sequelize[_0x2c44('0x6')]('yes','no',_0x2c44('0x24')),'defaultValue':'no'},'maxcallbitrate':{'type':Sequelize['INTEGER'](0xb)},'rfc2833compensate':{'type':Sequelize[_0x2c44('0x6')](_0x2c44('0x16'),'no')},'mailbox':{'type':Sequelize[_0x2c44('0x4')]},'session_timers':{'type':Sequelize['ENUM'](_0x2c44('0x25'),'refuse','originate')},'session_expires':{'type':Sequelize[_0x2c44('0x23')](0xb)},'session_minse':{'type':Sequelize['INTEGER'](0xb)},'session_refresher':{'type':Sequelize['ENUM'](_0x2c44('0x26'),_0x2c44('0x27')),'defaultValue':_0x2c44('0x27')},'t38pt_usertpsource':{'type':Sequelize[_0x2c44('0x4')]},'regexten':{'type':Sequelize[_0x2c44('0x4')]},'fromdomain':{'type':Sequelize[_0x2c44('0x4')]},'fromuser':{'type':Sequelize[_0x2c44('0x4')]},'port':{'type':Sequelize[_0x2c44('0x23')](0x5)},'qualify':{'type':Sequelize['ENUM'](_0x2c44('0x16'),'no'),'defaultValue':_0x2c44('0x16')},'keepalive':{'type':Sequelize[_0x2c44('0x23')](0xb)},'defaultip':{'type':Sequelize['STRING']},'defaultuser':{'type':Sequelize[_0x2c44('0x4')]},'rtptimeout':{'type':Sequelize[_0x2c44('0x23')](0xb)},'rtpholdtimeout':{'type':Sequelize[_0x2c44('0x23')](0xb)},'rtpkeepalive':{'type':Sequelize[_0x2c44('0x23')](0xb)},'sendrpid':{'type':Sequelize['ENUM'](_0x2c44('0x16'),'no','pai'),'defaultValue':'no'},'outboundproxy':{'type':Sequelize['STRING']},'callbackextension':{'type':Sequelize[_0x2c44('0x4')]},'timert1':{'type':Sequelize[_0x2c44('0x23')](0xb)},'timerb':{'type':Sequelize[_0x2c44('0x23')](0xb)},'qualifyfreq':{'type':Sequelize[_0x2c44('0x23')](0xb)},'contactpermit':{'type':Sequelize[_0x2c44('0x4')]},'contactdeny':{'type':Sequelize[_0x2c44('0x4')]},'contactacl':{'type':Sequelize[_0x2c44('0x4')]},'unsolicited_mailbox':{'type':Sequelize[_0x2c44('0x4')]},'use_q850_reason':{'type':Sequelize[_0x2c44('0x4')]},'maxforwards':{'type':Sequelize[_0x2c44('0x23')](0xb)},'encryption':{'type':Sequelize[_0x2c44('0x6')](_0x2c44('0x16'),'no'),'defaultValue':'no'},'avpf':{'type':Sequelize[_0x2c44('0x6')]('yes','no')},'force_avp':{'type':Sequelize[_0x2c44('0x6')]('yes','no')},'icesupport':{'type':Sequelize['ENUM'](_0x2c44('0x16'),'no')},'dtlsenable':{'type':Sequelize[_0x2c44('0x6')](_0x2c44('0x16'),'no')},'dtlsverify':{'type':Sequelize[_0x2c44('0x6')](_0x2c44('0x16'),'no','fingerprint',_0x2c44('0x28'))},'dtlsrekey':{'type':Sequelize[_0x2c44('0x23')](0xb)},'dtlscertfile':{'type':Sequelize[_0x2c44('0x4')]},'dtlsprivatekey':{'type':Sequelize['STRING']},'dtlscipher':{'type':Sequelize[_0x2c44('0x4')]},'dtlscafile':{'type':Sequelize[_0x2c44('0x4')]},'dtlscapath':{'type':Sequelize[_0x2c44('0x4')]},'dtlssetup':{'type':Sequelize['ENUM']('active',_0x2c44('0x29'),'actpass'),'allowNull':!![]},'dtlsfingerprint':{'type':Sequelize['STRING']},'usereqphone':{'type':Sequelize[_0x2c44('0x6')](_0x2c44('0x16'),'no'),'defaultValue':'no'},'recordonfeature':{'type':Sequelize[_0x2c44('0x4')]},'recordofffeature':{'type':Sequelize[_0x2c44('0x4')]},'call_limit':{'type':Sequelize[_0x2c44('0x23')](0xb),'defaultValue':0x3e8},'registertrying':{'type':Sequelize[_0x2c44('0x6')]('yes','no')},'subscribemwi':{'type':Sequelize[_0x2c44('0x6')]('yes','no')},'vmexten':{'type':Sequelize[_0x2c44('0x4')]},'mohinterpret':{'type':Sequelize['STRING']},'mohsuggest':{'type':Sequelize['STRING']},'parkinglot':{'type':Sequelize['STRING']},'description':{'type':Sequelize['STRING']},'host':{'type':Sequelize[_0x2c44('0x4')],'defaultValue':_0x2c44('0x2a')},'canreinvite':{'type':Sequelize[_0x2c44('0x6')](_0x2c44('0x16'),'no',_0x2c44('0x17'),_0x2c44('0x2b'),'update,nonat'),'defaultValue':'no'},'registry':{'type':Sequelize[_0x2c44('0x4')]},'otherFields':{'type':Sequelize['STRING']},'active':{'type':Sequelize[_0x2c44('0x2c')],'allowNull':![],'defaultValue':!![]},'t38pt_udptl':{'type':Sequelize[_0x2c44('0x4')],'defaultValue':'no'}}; \ No newline at end of file +var _0xa6f3=['nat','String\x20is\x20deprecated.\x20Please\x20use\x20an\x20Array\x20as\x20[\x22force_rport\x22,\x20\x22comedia\x22]','all','ulaw;alaw;gsm','allow','String\x20is\x20deprecated.\x20Please\x20use\x20an\x20Array\x20as\x20[\x22ulaw\x22,\x20\x22alaw\x22,\x20\x22alaw\x22]','port,invite','insecure','String\x20is\x20deprecated.\x20Please\x20use\x20an\x20Array\x20as\x20[\x22port\x22,\x20\x22invite\x22]','never','INTEGER','always','accept','refuse','originate','uac','uas','certificate','actpass','dynamic','BOOLEAN','sequelize','exports','name','ENUM','friend','user','peer','STRING','from-voip-provider','ALLOWED_NOT_SCREENED','ALLOWED_FAILED_SCREEN','ALLOWED','PROHIB_NOT_SCREENED','PROHIB_FAILED_SCREEN','PROHIB','setDataValue','transport','join','getDataValue','split','String\x20is\x20deprecated.\x20Please\x20use\x20an\x20Array\x20as\x20[\x22udp\x22,\x20\x22tcp\x22]','rfc2833','shortinfo','inband','yes','nonat','update','outgoing','force_rport,comedia'];(function(_0xf54034,_0x1d510f){var _0x5144d9=function(_0x163422){while(--_0x163422){_0xf54034['push'](_0xf54034['shift']());}};_0x5144d9(++_0x1d510f);}(_0xa6f3,0x173));var _0x3a6f=function(_0x97c6ea,_0x4cffce){_0x97c6ea=_0x97c6ea-0x0;var _0x2d7f50=_0xa6f3[_0x97c6ea];return _0x2d7f50;};'use strict';var Sequelize=require(_0x3a6f('0x0'));module[_0x3a6f('0x1')]={'name':{'type':Sequelize['STRING'],'allowNull':![],'unique':_0x3a6f('0x2'),'validate':{'notEmpty':!![],'is':/^[A-Za-z0-9\.\_]+$/i}},'type':{'type':Sequelize[_0x3a6f('0x3')](_0x3a6f('0x4'),_0x3a6f('0x5'),_0x3a6f('0x6')),'allowNull':![],'defaultValue':_0x3a6f('0x4')},'context':{'type':Sequelize[_0x3a6f('0x7')],'allowNull':![],'defaultValue':_0x3a6f('0x8')},'callingpres':{'type':Sequelize['ENUM'](_0x3a6f('0x9'),'ALLOWED_PASSED_SCREEN',_0x3a6f('0xa'),_0x3a6f('0xb'),_0x3a6f('0xc'),'PROHIB_PASSED_SCREEN',_0x3a6f('0xd'),_0x3a6f('0xe'))},'deny':{'type':Sequelize[_0x3a6f('0x7')]},'permit':{'type':Sequelize['STRING']},'secret':{'type':Sequelize['STRING']},'md5secret':{'type':Sequelize[_0x3a6f('0x7')]},'remotesecret':{'type':Sequelize['STRING']},'transport':{'type':Sequelize[_0x3a6f('0x7')],'defaultValue':'udp','set':function(_0x4794e5){this[_0x3a6f('0xf')](_0x3a6f('0x10'),_0x4794e5?_0x4794e5[_0x3a6f('0x11')](','):null);},'get':function(){return this['getDataValue']('transport')?this[_0x3a6f('0x12')](_0x3a6f('0x10'))[_0x3a6f('0x13')](','):null;},'comment':_0x3a6f('0x14')},'dtmfmode':{'type':Sequelize[_0x3a6f('0x3')](_0x3a6f('0x15'),'info',_0x3a6f('0x16'),_0x3a6f('0x17'),'auto'),'defaultValue':'rfc2833'},'directmedia':{'type':Sequelize[_0x3a6f('0x3')](_0x3a6f('0x18'),'no',_0x3a6f('0x19'),_0x3a6f('0x1a'),_0x3a6f('0x1b')),'defaultValue':'no'},'directrtpsetup':{'type':Sequelize[_0x3a6f('0x3')]('yes','no'),'defaultValue':'no'},'directmediapermit':{'type':Sequelize[_0x3a6f('0x7')]},'directmediadeny':{'type':Sequelize[_0x3a6f('0x7')]},'nat':{'type':Sequelize[_0x3a6f('0x7')],'defaultValue':_0x3a6f('0x1c'),'set':function(_0x12bbaf){this[_0x3a6f('0xf')]('nat',_0x12bbaf?_0x12bbaf['join'](','):null);},'get':function(){return this[_0x3a6f('0x12')](_0x3a6f('0x1d'))?this['getDataValue'](_0x3a6f('0x1d'))[_0x3a6f('0x13')](','):null;},'comment':_0x3a6f('0x1e')},'callgroup':{'type':Sequelize[_0x3a6f('0x7')]},'namedcallgroup':{'type':Sequelize[_0x3a6f('0x7')]},'pickupgroup':{'type':Sequelize[_0x3a6f('0x7')]},'namedpickupgroup':{'type':Sequelize[_0x3a6f('0x7')]},'language':{'type':Sequelize['STRING'],'defaultValue':'en'},'tonezone':{'type':Sequelize[_0x3a6f('0x7')],'allowNull':!![]},'disallow':{'type':Sequelize[_0x3a6f('0x7')],'defaultValue':_0x3a6f('0x1f')},'allow':{'type':Sequelize[_0x3a6f('0x7')],'allowNull':![],'defaultValue':_0x3a6f('0x20'),'set':function(_0xa9abcc){this['setDataValue'](_0x3a6f('0x21'),_0xa9abcc?_0xa9abcc[_0x3a6f('0x11')](';'):'ulaw;alaw;gsm');},'get':function(){return this[_0x3a6f('0x12')]('allow')?this[_0x3a6f('0x12')]('allow')['split'](';'):null;},'comment':_0x3a6f('0x22')},'autoframing':{'type':Sequelize[_0x3a6f('0x3')](_0x3a6f('0x18'),'no')},'insecure':{'type':Sequelize[_0x3a6f('0x7')],'defaultValue':_0x3a6f('0x23'),'set':function(_0x2d417f){this['setDataValue']('insecure',_0x2d417f?_0x2d417f[_0x3a6f('0x11')](','):null);},'get':function(){return this[_0x3a6f('0x12')](_0x3a6f('0x24'))?this[_0x3a6f('0x12')](_0x3a6f('0x24'))[_0x3a6f('0x13')](','):null;},'comment':_0x3a6f('0x25')},'trustrpid':{'type':Sequelize[_0x3a6f('0x3')](_0x3a6f('0x18'),'no'),'defaultValue':'no'},'trust_id_outbound':{'type':Sequelize[_0x3a6f('0x3')]('yes','no'),'defaultValue':'no'},'progressinband':{'type':Sequelize[_0x3a6f('0x3')](_0x3a6f('0x18'),'no',_0x3a6f('0x26'))},'promiscredir':{'type':Sequelize[_0x3a6f('0x3')](_0x3a6f('0x18'),'no')},'useclientcode':{'type':Sequelize[_0x3a6f('0x3')]('yes','no')},'accountcode':{'type':Sequelize[_0x3a6f('0x27')](0xb)},'setvar':{'type':Sequelize[_0x3a6f('0x7')]},'callerid':{'type':Sequelize['STRING'],'defaultValue':'\x22\x22\x20<>'},'amaflags':{'type':Sequelize[_0x3a6f('0x7')]},'callcounter':{'type':Sequelize[_0x3a6f('0x3')](_0x3a6f('0x18'),'no'),'defaultValue':'yes'},'busylevel':{'type':Sequelize[_0x3a6f('0x27')](0xb)},'allowoverlap':{'type':Sequelize[_0x3a6f('0x3')](_0x3a6f('0x18'),'no')},'allowsubscribe':{'type':Sequelize['ENUM'](_0x3a6f('0x18'),'no')},'allowtransfer':{'type':Sequelize[_0x3a6f('0x3')]('yes','no')},'ignoresdpversion':{'type':Sequelize[_0x3a6f('0x3')](_0x3a6f('0x18'),'no')},'subscribecontext':{'type':Sequelize[_0x3a6f('0x7')]},'template':{'type':Sequelize[_0x3a6f('0x7')]},'videosupport':{'type':Sequelize[_0x3a6f('0x3')](_0x3a6f('0x18'),'no',_0x3a6f('0x28')),'defaultValue':'no'},'maxcallbitrate':{'type':Sequelize[_0x3a6f('0x27')](0xb)},'rfc2833compensate':{'type':Sequelize[_0x3a6f('0x3')](_0x3a6f('0x18'),'no')},'mailbox':{'type':Sequelize[_0x3a6f('0x7')]},'session_timers':{'type':Sequelize[_0x3a6f('0x3')](_0x3a6f('0x29'),_0x3a6f('0x2a'),_0x3a6f('0x2b'))},'session_expires':{'type':Sequelize[_0x3a6f('0x27')](0xb)},'session_minse':{'type':Sequelize[_0x3a6f('0x27')](0xb)},'session_refresher':{'type':Sequelize[_0x3a6f('0x3')](_0x3a6f('0x2c'),_0x3a6f('0x2d')),'defaultValue':'uas'},'t38pt_usertpsource':{'type':Sequelize[_0x3a6f('0x7')]},'regexten':{'type':Sequelize['STRING']},'fromdomain':{'type':Sequelize[_0x3a6f('0x7')]},'fromuser':{'type':Sequelize[_0x3a6f('0x7')]},'port':{'type':Sequelize[_0x3a6f('0x27')](0x5)},'qualify':{'type':Sequelize['ENUM']('yes','no'),'defaultValue':'yes'},'keepalive':{'type':Sequelize[_0x3a6f('0x27')](0xb)},'defaultip':{'type':Sequelize[_0x3a6f('0x7')]},'defaultuser':{'type':Sequelize[_0x3a6f('0x7')]},'rtptimeout':{'type':Sequelize[_0x3a6f('0x27')](0xb)},'rtpholdtimeout':{'type':Sequelize['INTEGER'](0xb)},'rtpkeepalive':{'type':Sequelize[_0x3a6f('0x27')](0xb)},'sendrpid':{'type':Sequelize[_0x3a6f('0x3')](_0x3a6f('0x18'),'no','pai'),'defaultValue':'no'},'outboundproxy':{'type':Sequelize[_0x3a6f('0x7')]},'callbackextension':{'type':Sequelize[_0x3a6f('0x7')]},'timert1':{'type':Sequelize[_0x3a6f('0x27')](0xb)},'timerb':{'type':Sequelize[_0x3a6f('0x27')](0xb)},'qualifyfreq':{'type':Sequelize['INTEGER'](0xb)},'contactpermit':{'type':Sequelize[_0x3a6f('0x7')]},'contactdeny':{'type':Sequelize[_0x3a6f('0x7')]},'contactacl':{'type':Sequelize[_0x3a6f('0x7')]},'unsolicited_mailbox':{'type':Sequelize[_0x3a6f('0x7')]},'use_q850_reason':{'type':Sequelize[_0x3a6f('0x7')]},'maxforwards':{'type':Sequelize['INTEGER'](0xb)},'encryption':{'type':Sequelize[_0x3a6f('0x3')](_0x3a6f('0x18'),'no'),'defaultValue':'no'},'avpf':{'type':Sequelize[_0x3a6f('0x3')](_0x3a6f('0x18'),'no')},'force_avp':{'type':Sequelize[_0x3a6f('0x3')](_0x3a6f('0x18'),'no')},'icesupport':{'type':Sequelize[_0x3a6f('0x3')]('yes','no')},'dtlsenable':{'type':Sequelize['ENUM']('yes','no')},'dtlsverify':{'type':Sequelize[_0x3a6f('0x3')](_0x3a6f('0x18'),'no','fingerprint',_0x3a6f('0x2e'))},'dtlsrekey':{'type':Sequelize[_0x3a6f('0x27')](0xb)},'dtlscertfile':{'type':Sequelize[_0x3a6f('0x7')]},'dtlsprivatekey':{'type':Sequelize[_0x3a6f('0x7')]},'dtlscipher':{'type':Sequelize[_0x3a6f('0x7')]},'dtlscafile':{'type':Sequelize['STRING']},'dtlscapath':{'type':Sequelize['STRING']},'dtlssetup':{'type':Sequelize[_0x3a6f('0x3')]('active','passive',_0x3a6f('0x2f')),'allowNull':!![]},'dtlsfingerprint':{'type':Sequelize[_0x3a6f('0x7')]},'usereqphone':{'type':Sequelize[_0x3a6f('0x3')](_0x3a6f('0x18'),'no'),'defaultValue':'no'},'recordonfeature':{'type':Sequelize['STRING']},'recordofffeature':{'type':Sequelize[_0x3a6f('0x7')]},'call_limit':{'type':Sequelize[_0x3a6f('0x27')](0xb),'defaultValue':0x3e8},'registertrying':{'type':Sequelize[_0x3a6f('0x3')]('yes','no')},'subscribemwi':{'type':Sequelize[_0x3a6f('0x3')]('yes','no')},'vmexten':{'type':Sequelize[_0x3a6f('0x7')]},'mohinterpret':{'type':Sequelize[_0x3a6f('0x7')]},'mohsuggest':{'type':Sequelize['STRING']},'parkinglot':{'type':Sequelize[_0x3a6f('0x7')]},'description':{'type':Sequelize[_0x3a6f('0x7')]},'host':{'type':Sequelize[_0x3a6f('0x7')],'defaultValue':_0x3a6f('0x30')},'canreinvite':{'type':Sequelize['ENUM']('yes','no',_0x3a6f('0x19'),_0x3a6f('0x1a'),'update,nonat'),'defaultValue':'no'},'registry':{'type':Sequelize['STRING']},'otherFields':{'type':Sequelize[_0x3a6f('0x7')]},'active':{'type':Sequelize[_0x3a6f('0x31')],'allowNull':![],'defaultValue':!![]},'t38pt_udptl':{'type':Sequelize['STRING'],'defaultValue':'no'}}; \ No newline at end of file diff --git a/server/api/trunk/trunk.controller.js b/server/api/trunk/trunk.controller.js index cde7a6d..70a7443 100644 --- a/server/api/trunk/trunk.controller.js +++ b/server/api/trunk/trunk.controller.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x9c44=['key','model','map','query','keys','filters','intersection','attributes','fields','length','hasOwnProperty','nolimit','order','sort','where','pick','filter','VIRTUAL','merge','options','includeAll','include','findAll','catch','clone','find','omit','createdAt','body','updatedAt','create','user','role','UserProfileSection','userProfileId','autoAssociation','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','readFileSync','join','root','server/files/templates/trunk.ejs','utf8','server/files/templates/registry.ejs','render','writeFileSync','/etc/asterisk/sip_xcally_trunks.conf','Reload','chan_sip.so','Unable\x20to\x20retrieve\x20the\x20current\x20user','update','params','/etc/asterisk/sip_xcally_registers.conf','zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','sox','ejs','fs-extra','lodash','squel','crypto','desk.js','to-csv','querystring','papaparse','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/logger','api','../../config/license/util','../../mysqldb','client','http','request','then','info','Trunk,\x20%s,\x20%s','request\x20sent','debug','Trunk,\x20%s,\x20%s,\x20%s','stringify','error','message','sendStatus','status','json','offset','limit','undefined','count','set','Content-Range','reject','save','get','Trunks','destroy','stack','name','send','index','Trunk','rawAttributes','fieldName','type'];(function(_0x382d8e,_0x2a5761){var _0x23993d=function(_0x1f491c){while(--_0x1f491c){_0x382d8e['push'](_0x382d8e['shift']());}};_0x23993d(++_0x2a5761);}(_0x9c44,0x178));var _0x49c4=function(_0x3511d3,_0x4107ae){_0x3511d3=_0x3511d3-0x0;var _0x5d6321=_0x9c44[_0x3511d3];return _0x5d6321;};'use strict';var emlformat=require('eml-format');var rimraf=require('rimraf');var zipdir=require(_0x49c4('0x0'));var jsonpatch=require(_0x49c4('0x1'));var rp=require(_0x49c4('0x2'));var moment=require(_0x49c4('0x3'));var BPromise=require(_0x49c4('0x4'));var Mustache=require(_0x49c4('0x5'));var util=require('util');var path=require('path');var sox=require(_0x49c4('0x6'));var csv=require('to-csv');var ejs=require(_0x49c4('0x7'));var fs=require('fs');var fs_extra=require(_0x49c4('0x8'));var _=require(_0x49c4('0x9'));var squel=require(_0x49c4('0xa'));var crypto=require(_0x49c4('0xb'));var jsforce=require('jsforce');var deskjs=require(_0x49c4('0xc'));var toCsv=require(_0x49c4('0xd'));var querystring=require(_0x49c4('0xe'));var Papa=require(_0x49c4('0xf'));var Redis=require('ioredis');var authService=require('../../components/auth/service');var qs=require(_0x49c4('0x10'));var as=require(_0x49c4('0x11'));var hardwareService=require('../../config/license/hardware');var logger=require(_0x49c4('0x12'))(_0x49c4('0x13'));var utils=require('../../config/utils');var config=require('../../config/environment');var licenseUtil=require(_0x49c4('0x14'));var db=require(_0x49c4('0x15'))['db'];var jayson=require('jayson/promise');var client=jayson[_0x49c4('0x16')][_0x49c4('0x17')]({'port':0x232a});function respondWithRpcPromise(_0x5f2fd9,_0x1909fe,_0x280996,_0x21f15a){return new BPromise(function(_0x2decee,_0x12777c){var _0x18211c=_0x21f15a||client;return _0x18211c[_0x49c4('0x18')](_0x5f2fd9,_0x280996)[_0x49c4('0x19')](function(_0x58d177){logger[_0x49c4('0x1a')](_0x49c4('0x1b'),_0x1909fe,_0x49c4('0x1c'));logger[_0x49c4('0x1d')](_0x49c4('0x1e'),_0x1909fe,'request\x20sent',JSON[_0x49c4('0x1f')](_0x58d177));if(_0x58d177[_0x49c4('0x20')]){if(_0x58d177['error']['code']===0x1f4){logger[_0x49c4('0x20')](_0x49c4('0x1b'),_0x1909fe,_0x58d177[_0x49c4('0x20')]['message']);return _0x12777c(_0x58d177[_0x49c4('0x20')]['message']);}logger[_0x49c4('0x20')](_0x49c4('0x1b'),_0x1909fe,_0x58d177[_0x49c4('0x20')][_0x49c4('0x21')]);return _0x2decee(_0x58d177[_0x49c4('0x20')][_0x49c4('0x21')]);}else{logger[_0x49c4('0x1a')](_0x49c4('0x1b'),_0x1909fe,_0x49c4('0x1c'));_0x2decee(_0x58d177['result']['message']);}})['catch'](function(_0x1c99b1){logger['error']('Trunk,\x20%s,\x20%s',_0x1909fe,_0x1c99b1);_0x12777c(_0x1c99b1);});});}function respondWithStatusCode(_0x2263ae,_0x15581b){_0x15581b=_0x15581b||0xcc;return function(_0x26c640){if(_0x26c640){return _0x2263ae[_0x49c4('0x22')](_0x15581b);}return _0x2263ae['status'](_0x15581b)['end']();};}function respondWithResult(_0x180276,_0x9cb797){_0x9cb797=_0x9cb797||0xc8;return function(_0x565423){if(_0x565423){return _0x180276[_0x49c4('0x23')](_0x9cb797)[_0x49c4('0x24')](_0x565423);}};}function respondWithFilteredResult(_0x210159,_0xa7a826){return function(_0x531d92){if(_0x531d92){var _0x543ea2=typeof _0xa7a826[_0x49c4('0x25')]==='undefined'&&typeof _0xa7a826[_0x49c4('0x26')]===_0x49c4('0x27');var _0x3f1708=_0x531d92[_0x49c4('0x28')];var _0x5987ae=_0x543ea2?0x0:_0xa7a826[_0x49c4('0x25')];var _0x2b2793=_0x543ea2?_0x531d92[_0x49c4('0x28')]:_0xa7a826[_0x49c4('0x25')]+_0xa7a826[_0x49c4('0x26')];var _0x29f835;if(_0x2b2793>=_0x3f1708){_0x2b2793=_0x3f1708;_0x29f835=0xc8;}else{_0x29f835=0xce;}_0x210159[_0x49c4('0x23')](_0x29f835);return _0x210159[_0x49c4('0x29')](_0x49c4('0x2a'),_0x5987ae+'-'+_0x2b2793+'/'+_0x3f1708)[_0x49c4('0x24')](_0x531d92);}return null;};}function patchUpdates(_0x46f7ea){return function(_0x4ea6ea){try{jsonpatch['apply'](_0x4ea6ea,_0x46f7ea,!![]);}catch(_0x59eb84){return BPromise[_0x49c4('0x2b')](_0x59eb84);}return _0x4ea6ea[_0x49c4('0x2c')]();};}function saveUpdates(_0x1eb035,_0x27e467){return function(_0x28eb47){if(_0x28eb47){return _0x28eb47['update'](_0x1eb035)[_0x49c4('0x19')](function(_0x116eb4){return _0x116eb4;});}return null;};}function removeEntity(_0x2e7a69,_0x24bba9){return function(_0x58e252){if(_0x58e252){return _0x58e252['destroy']()[_0x49c4('0x19')](function(){var _0x9a1bed=_0x58e252[_0x49c4('0x2d')]({'plain':!![]});var _0x13b3b4=_0x49c4('0x2e');return db['UserProfileResource'][_0x49c4('0x2f')]({'where':{'type':_0x13b3b4,'resourceId':_0x9a1bed['id']}})[_0x49c4('0x19')](function(){return _0x58e252;});})[_0x49c4('0x19')](function(){_0x2e7a69['status'](0xcc)['end']();});}};}function handleEntityNotFound(_0x85dce2,_0x1991e9){return function(_0x3bec0a){if(!_0x3bec0a){_0x85dce2[_0x49c4('0x22')](0x194);}return _0x3bec0a;};}function handleError(_0x2b45a1,_0x2cf897){_0x2cf897=_0x2cf897||0x1f4;return function(_0x1d1557){logger[_0x49c4('0x20')](_0x1d1557[_0x49c4('0x30')]);if(_0x1d1557['name']){delete _0x1d1557[_0x49c4('0x31')];}_0x2b45a1['status'](_0x2cf897)[_0x49c4('0x32')](_0x1d1557);};}exports[_0x49c4('0x33')]=function(_0x2625a6,_0x1c2830){var _0x4ed4f8={},_0x335f0c={},_0x31f3ff={'count':0x0,'rows':[]};var _0x1c910a=_['map'](db[_0x49c4('0x34')][_0x49c4('0x35')],function(_0x178987){return{'name':_0x178987[_0x49c4('0x36')],'type':_0x178987[_0x49c4('0x37')][_0x49c4('0x38')]};});_0x335f0c[_0x49c4('0x39')]=_[_0x49c4('0x3a')](_0x1c910a,_0x49c4('0x31'));_0x335f0c[_0x49c4('0x3b')]=_[_0x49c4('0x3c')](_0x2625a6['query']);_0x335f0c[_0x49c4('0x3d')]=_[_0x49c4('0x3e')](_0x335f0c[_0x49c4('0x39')],_0x335f0c[_0x49c4('0x3b')]);_0x4ed4f8[_0x49c4('0x3f')]=_[_0x49c4('0x3e')](_0x335f0c[_0x49c4('0x39')],qs[_0x49c4('0x40')](_0x2625a6[_0x49c4('0x3b')][_0x49c4('0x40')]));_0x4ed4f8[_0x49c4('0x3f')]=_0x4ed4f8[_0x49c4('0x3f')][_0x49c4('0x41')]?_0x4ed4f8['attributes']:_0x335f0c[_0x49c4('0x39')];if(!_0x2625a6['query'][_0x49c4('0x42')](_0x49c4('0x43'))){_0x4ed4f8[_0x49c4('0x26')]=qs[_0x49c4('0x26')](_0x2625a6[_0x49c4('0x3b')][_0x49c4('0x26')]);_0x4ed4f8['offset']=qs['offset'](_0x2625a6[_0x49c4('0x3b')][_0x49c4('0x25')]);}_0x4ed4f8[_0x49c4('0x44')]=qs[_0x49c4('0x45')](_0x2625a6['query'][_0x49c4('0x45')]);_0x4ed4f8[_0x49c4('0x46')]=qs[_0x49c4('0x3d')](_[_0x49c4('0x47')](_0x2625a6[_0x49c4('0x3b')],_0x335f0c[_0x49c4('0x3d')]),_0x1c910a);if(_0x2625a6[_0x49c4('0x3b')][_0x49c4('0x48')]){_0x4ed4f8[_0x49c4('0x46')]=_['merge'](_0x4ed4f8[_0x49c4('0x46')],{'$or':_['map'](_0x1c910a,function(_0x33696e){if(_0x33696e[_0x49c4('0x37')]!==_0x49c4('0x49')){var _0x258abe={};_0x258abe[_0x33696e[_0x49c4('0x31')]]={'$like':'%'+_0x2625a6['query'][_0x49c4('0x48')]+'%'};return _0x258abe;}})});}_0x4ed4f8=_[_0x49c4('0x4a')]({},_0x4ed4f8,_0x2625a6[_0x49c4('0x4b')]);var _0x254d07={'where':_0x4ed4f8[_0x49c4('0x46')]};return db[_0x49c4('0x34')][_0x49c4('0x28')](_0x254d07)['then'](function(_0x3bac1b){_0x31f3ff['count']=_0x3bac1b;if(_0x2625a6[_0x49c4('0x3b')][_0x49c4('0x4c')]){_0x4ed4f8[_0x49c4('0x4d')]=[{'all':!![]}];}return db[_0x49c4('0x34')][_0x49c4('0x4e')](_0x4ed4f8);})[_0x49c4('0x19')](function(_0x2c6be1){_0x31f3ff['rows']=_0x2c6be1;return _0x31f3ff;})[_0x49c4('0x19')](respondWithFilteredResult(_0x1c2830,_0x4ed4f8))[_0x49c4('0x4f')](handleError(_0x1c2830,null));};exports['show']=function(_0x1e1ac4,_0xaece5f){var _0xfbe179={'raw':![],'where':{'id':_0x1e1ac4['params']['id']}},_0x242afc={};_0x242afc['model']=_[_0x49c4('0x3c')](db['Trunk'][_0x49c4('0x35')]);_0x242afc[_0x49c4('0x3b')]=_[_0x49c4('0x3c')](_0x1e1ac4[_0x49c4('0x3b')]);_0x242afc[_0x49c4('0x3d')]=_[_0x49c4('0x3e')](_0x242afc[_0x49c4('0x39')],_0x242afc['query']);_0xfbe179[_0x49c4('0x3f')]=_[_0x49c4('0x3e')](_0x242afc[_0x49c4('0x39')],qs[_0x49c4('0x40')](_0x1e1ac4[_0x49c4('0x3b')][_0x49c4('0x40')]));_0xfbe179[_0x49c4('0x3f')]=_0xfbe179[_0x49c4('0x3f')][_0x49c4('0x41')]?_0xfbe179[_0x49c4('0x3f')]:_0x242afc['model'];if(_0x1e1ac4['query'][_0x49c4('0x4c')]){_0xfbe179[_0x49c4('0x4d')]=[{'all':!![]}];}_0xfbe179=_['merge']({},_0xfbe179,_0x1e1ac4['options']);return db[_0x49c4('0x34')]['find'](_0xfbe179)['then'](handleEntityNotFound(_0xaece5f,null))[_0x49c4('0x19')](respondWithResult(_0xaece5f,null))[_0x49c4('0x4f')](handleError(_0xaece5f,null));};exports[_0x49c4('0x50')]=function(_0x38c480,_0x2884ca){var _0x16949a={'where':{'id':_0x38c480['params']['id']}},_0x35724e={};_0x35724e[_0x49c4('0x39')]=_[_0x49c4('0x3c')](db[_0x49c4('0x34')][_0x49c4('0x35')]);_0x16949a[_0x49c4('0x3f')]=_[_0x49c4('0x3e')](_0x35724e['model'],qs['fields'](_0x38c480[_0x49c4('0x3b')][_0x49c4('0x40')]));_0x16949a[_0x49c4('0x3f')]=_0x16949a[_0x49c4('0x3f')][_0x49c4('0x41')]?_0x16949a[_0x49c4('0x3f')]:_0x35724e[_0x49c4('0x39')];if(_0x38c480['query'][_0x49c4('0x4c')]){_0x16949a[_0x49c4('0x4d')]=[{'all':!![]}];}_0x16949a=_['merge']({},_0x16949a,_0x38c480[_0x49c4('0x4b')]);return db['Trunk'][_0x49c4('0x51')](_0x16949a)[_0x49c4('0x19')](handleEntityNotFound(_0x2884ca,null))[_0x49c4('0x19')](function(_0x2fe89a){if(_0x2fe89a){var _0x845f7e=_0x2fe89a[_0x49c4('0x2d')]({'plain':!![]});_0x845f7e=qs[_0x49c4('0x52')](_0x845f7e,['id',_0x49c4('0x53'),'updatedAt']);_0x38c480[_0x49c4('0x54')]=_[_0x49c4('0x52')](_0x38c480['body'],['id',_0x49c4('0x53'),_0x49c4('0x55')]);return db['Trunk'][_0x49c4('0x56')](_[_0x49c4('0x4a')](_0x845f7e,_0x38c480['body']),{'include':_0x38c480['query']['includeAll']?[{'all':!![]}]:undefined})['then'](function(_0xc43386){var _0x54947d=_0x38c480[_0x49c4('0x57')][_0x49c4('0x2d')]({'plain':!![]});if(!_0x54947d)throw new Error('Unable\x20to\x20retrieve\x20the\x20current\x20user');if(_0x54947d[_0x49c4('0x58')]===_0x49c4('0x57')){var _0x5ac9f0=_0xc43386[_0x49c4('0x2d')]({'plain':!![]});var _0x3dcf4c=_0x49c4('0x2e');return db[_0x49c4('0x59')]['find']({'where':{'name':_0x3dcf4c,'userProfileId':_0x54947d[_0x49c4('0x5a')]},'raw':!![]})[_0x49c4('0x19')](function(_0x3cc604){if(_0x3cc604&&_0x3cc604[_0x49c4('0x5b')]===0x0){return db['UserProfileResource'][_0x49c4('0x56')]({'name':_0x5ac9f0['name'],'resourceId':_0x5ac9f0['id'],'type':_0x3cc604['name'],'sectionId':_0x3cc604['id']},{})['then'](function(){return _0xc43386;});}else{return _0xc43386;}})['catch'](function(_0x302251){logger[_0x49c4('0x20')](_0x49c4('0x5c'),_0x302251);throw _0x302251;});}return _0xc43386;});}})[_0x49c4('0x19')](respondWithResult(_0x2884ca,0xc9))['catch'](handleError(_0x2884ca,null));};exports['create']=function(_0x340523,_0x109b81,_0x342326){var _0x295ad0;return db[_0x49c4('0x34')][_0x49c4('0x56')](_0x340523[_0x49c4('0x54')],{'raw':!![]})[_0x49c4('0x19')](function(_0x4d49e0){_0x295ad0=_0x4d49e0;return db[_0x49c4('0x34')]['findAll']({'raw':!![]});})[_0x49c4('0x19')](function(_0x264902){var _0x1a5d4c=fs[_0x49c4('0x5d')](path[_0x49c4('0x5e')](config[_0x49c4('0x5f')],_0x49c4('0x60')),_0x49c4('0x61'));var _0x13d951=fs[_0x49c4('0x5d')](path[_0x49c4('0x5e')](config[_0x49c4('0x5f')],_0x49c4('0x62')),_0x49c4('0x61'));var _0x2d5f63=ejs[_0x49c4('0x63')](_0x1a5d4c,{'trunks':_0x264902||[]});fs[_0x49c4('0x64')](_0x49c4('0x65'),_0x2d5f63);if(_0x295ad0['registry']){var _0x5ec201=ejs[_0x49c4('0x63')](_0x13d951,{'trunks':_0x264902||[]});fs[_0x49c4('0x64')]('/etc/asterisk/sip_xcally_registers.conf',_0x5ec201);}})[_0x49c4('0x19')](function(){return respondWithRpcPromise(_0x49c4('0x66'),_0x49c4('0x56'),{'module':_0x49c4('0x67')});})['then'](function(){var _0x5a14a5=_0x340523['user'][_0x49c4('0x2d')]({'plain':!![]});if(!_0x5a14a5)throw new Error(_0x49c4('0x68'));if(_0x5a14a5[_0x49c4('0x58')]===_0x49c4('0x57')){var _0x118fc4=_0x295ad0[_0x49c4('0x2d')]({'plain':!![]});return db[_0x49c4('0x59')][_0x49c4('0x51')]({'where':{'name':_0x49c4('0x2e'),'userProfileId':_0x5a14a5['userProfileId']},'raw':!![]})[_0x49c4('0x19')](function(_0x10fb84){if(_0x10fb84&&_0x10fb84[_0x49c4('0x5b')]===0x0){return db['UserProfileResource'][_0x49c4('0x56')]({'name':_0x118fc4[_0x49c4('0x31')],'resourceId':_0x118fc4['id'],'type':_0x10fb84[_0x49c4('0x31')],'sectionId':_0x10fb84['id']},{})[_0x49c4('0x19')](function(){return _0x295ad0;});}else{return _0x295ad0;}})[_0x49c4('0x4f')](function(_0x2fd749){logger[_0x49c4('0x20')](_0x49c4('0x5c'),_0x2fd749);throw _0x2fd749;});}return _0x295ad0;})['then'](respondWithResult(_0x109b81,0xc9))[_0x49c4('0x4f')](handleError(_0x109b81,null));};exports[_0x49c4('0x69')]=function(_0x85540f,_0x18e82b,_0x1e948a){var _0x4a204d;return db['Trunk'][_0x49c4('0x51')]({'where':{'id':_0x85540f['params']['id']}})[_0x49c4('0x19')](handleEntityNotFound(_0x18e82b,null))['then'](saveUpdates(_0x85540f[_0x49c4('0x54')],null))[_0x49c4('0x19')](function(_0x3b03dd){if(_0x3b03dd){_0x4a204d=_0x3b03dd;return db[_0x49c4('0x34')]['findAll']({'raw':!![]});}})[_0x49c4('0x19')](function(_0x38d7d3){if(_0x38d7d3){var _0x2ceada=fs[_0x49c4('0x5d')](path[_0x49c4('0x5e')](config[_0x49c4('0x5f')],_0x49c4('0x60')),_0x49c4('0x61'));var _0x46477f=fs[_0x49c4('0x5d')](path['join'](config[_0x49c4('0x5f')],_0x49c4('0x62')),'utf8');var _0x15bee0=ejs['render'](_0x2ceada,{'trunks':_0x38d7d3||[]});fs[_0x49c4('0x64')](_0x49c4('0x65'),_0x15bee0);var _0x1f14a6=ejs[_0x49c4('0x63')](_0x46477f,{'trunks':_0x38d7d3||[]});fs[_0x49c4('0x64')]('/etc/asterisk/sip_xcally_registers.conf',_0x1f14a6);return respondWithRpcPromise(_0x49c4('0x66'),_0x49c4('0x69'),{'module':'chan_sip.so'});}return null;})[_0x49c4('0x19')](function(_0x167e41){if(_0x167e41){return _0x4a204d;}})['then'](respondWithResult(_0x18e82b,null))[_0x49c4('0x4f')](handleError(_0x18e82b,null));};exports[_0x49c4('0x2f')]=function(_0x57b137,_0x37fef1,_0x993d00){var _0x25989a;return db[_0x49c4('0x34')]['find']({'where':{'id':_0x57b137[_0x49c4('0x6a')]['id']}})[_0x49c4('0x19')](handleEntityNotFound(_0x37fef1,null))['then'](removeEntity(_0x37fef1,null))[_0x49c4('0x19')](function(){return db['Trunk']['findAll']({'raw':!![]});})[_0x49c4('0x19')](function(_0x507078){var _0x50fd24=fs[_0x49c4('0x5d')](path[_0x49c4('0x5e')](config['root'],_0x49c4('0x60')),'utf8');var _0x578f4b=fs['readFileSync'](path[_0x49c4('0x5e')](config[_0x49c4('0x5f')],_0x49c4('0x62')),_0x49c4('0x61'));var _0x4a5f0b=ejs['render'](_0x50fd24,{'trunks':_0x507078});var _0x348693=ejs['render'](_0x578f4b,{'trunks':_0x507078});fs[_0x49c4('0x64')]('/etc/asterisk/sip_xcally_trunks.conf',_0x4a5f0b);fs[_0x49c4('0x64')](_0x49c4('0x6b'),_0x348693);return respondWithRpcPromise(_0x49c4('0x66'),_0x49c4('0x2f'),{'module':_0x49c4('0x67')});})[_0x49c4('0x4f')](handleError(_0x37fef1,null));}; \ No newline at end of file +var _0x98a8=['../../mysqldb','jayson/promise','client','request','Trunk,\x20%s,\x20%s','debug','request\x20sent','error','code','message','info','catch','sendStatus','status','end','offset','undefined','limit','count','set','Content-Range','json','apply','reject','update','then','destroy','get','Trunks','UserProfileResource','stack','name','map','fieldName','model','query','filters','attributes','intersection','fields','length','hasOwnProperty','nolimit','order','sort','where','filter','merge','VIRTUAL','options','Trunk','include','show','params','keys','rawAttributes','includeAll','clone','find','createdAt','updatedAt','body','omit','create','user','role','UserProfileSection','userProfileId','autoAssociation','findAll','readFileSync','root','server/files/templates/trunk.ejs','join','server/files/templates/registry.ejs','utf8','render','writeFileSync','/etc/asterisk/sip_xcally_trunks.conf','registry','/etc/asterisk/sip_xcally_registers.conf','Reload','chan_sip.so','Unable\x20to\x20retrieve\x20the\x20current\x20user','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','util','path','sox','to-csv','ejs','lodash','crypto','desk.js','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','api','../../config/environment'];(function(_0x3f0bb8,_0x4cc442){var _0x41db16=function(_0x497e88){while(--_0x497e88){_0x3f0bb8['push'](_0x3f0bb8['shift']());}};_0x41db16(++_0x4cc442);}(_0x98a8,0x12c));var _0x898a=function(_0x2aea6d,_0x10d7ff){_0x2aea6d=_0x2aea6d-0x0;var _0x275736=_0x98a8[_0x2aea6d];return _0x275736;};'use strict';var emlformat=require(_0x898a('0x0'));var rimraf=require(_0x898a('0x1'));var zipdir=require(_0x898a('0x2'));var jsonpatch=require(_0x898a('0x3'));var rp=require(_0x898a('0x4'));var moment=require(_0x898a('0x5'));var BPromise=require(_0x898a('0x6'));var Mustache=require('mustache');var util=require(_0x898a('0x7'));var path=require(_0x898a('0x8'));var sox=require(_0x898a('0x9'));var csv=require(_0x898a('0xa'));var ejs=require(_0x898a('0xb'));var fs=require('fs');var fs_extra=require('fs-extra');var _=require(_0x898a('0xc'));var squel=require('squel');var crypto=require(_0x898a('0xd'));var jsforce=require('jsforce');var deskjs=require(_0x898a('0xe'));var toCsv=require(_0x898a('0xa'));var querystring=require(_0x898a('0xf'));var Papa=require(_0x898a('0x10'));var Redis=require(_0x898a('0x11'));var authService=require(_0x898a('0x12'));var qs=require(_0x898a('0x13'));var as=require(_0x898a('0x14'));var hardwareService=require(_0x898a('0x15'));var logger=require('../../config/logger')(_0x898a('0x16'));var utils=require('../../config/utils');var config=require(_0x898a('0x17'));var licenseUtil=require('../../config/license/util');var db=require(_0x898a('0x18'))['db'];var jayson=require(_0x898a('0x19'));var client=jayson[_0x898a('0x1a')]['http']({'port':0x232a});function respondWithRpcPromise(_0x5bfded,_0x5b5c9c,_0x373d53,_0x1f5be4){return new BPromise(function(_0xb24335,_0x116fbe){var _0x1873e9=_0x1f5be4||client;return _0x1873e9[_0x898a('0x1b')](_0x5bfded,_0x373d53)['then'](function(_0x47033c){logger['info'](_0x898a('0x1c'),_0x5b5c9c,'request\x20sent');logger[_0x898a('0x1d')]('Trunk,\x20%s,\x20%s,\x20%s',_0x5b5c9c,_0x898a('0x1e'),JSON['stringify'](_0x47033c));if(_0x47033c[_0x898a('0x1f')]){if(_0x47033c[_0x898a('0x1f')][_0x898a('0x20')]===0x1f4){logger['error'](_0x898a('0x1c'),_0x5b5c9c,_0x47033c['error']['message']);return _0x116fbe(_0x47033c[_0x898a('0x1f')][_0x898a('0x21')]);}logger['error']('Trunk,\x20%s,\x20%s',_0x5b5c9c,_0x47033c[_0x898a('0x1f')][_0x898a('0x21')]);return _0xb24335(_0x47033c[_0x898a('0x1f')][_0x898a('0x21')]);}else{logger[_0x898a('0x22')](_0x898a('0x1c'),_0x5b5c9c,_0x898a('0x1e'));_0xb24335(_0x47033c['result'][_0x898a('0x21')]);}})[_0x898a('0x23')](function(_0x11cae2){logger[_0x898a('0x1f')](_0x898a('0x1c'),_0x5b5c9c,_0x11cae2);_0x116fbe(_0x11cae2);});});}function respondWithStatusCode(_0x310bfa,_0x4e254d){_0x4e254d=_0x4e254d||0xcc;return function(_0x274cdf){if(_0x274cdf){return _0x310bfa[_0x898a('0x24')](_0x4e254d);}return _0x310bfa[_0x898a('0x25')](_0x4e254d)[_0x898a('0x26')]();};}function respondWithResult(_0x3901ab,_0x1426e3){_0x1426e3=_0x1426e3||0xc8;return function(_0x5b7719){if(_0x5b7719){return _0x3901ab[_0x898a('0x25')](_0x1426e3)['json'](_0x5b7719);}};}function respondWithFilteredResult(_0x513c6b,_0x53ddb2){return function(_0x3678be){if(_0x3678be){var _0x1f4d86=typeof _0x53ddb2[_0x898a('0x27')]===_0x898a('0x28')&&typeof _0x53ddb2[_0x898a('0x29')]===_0x898a('0x28');var _0x398e98=_0x3678be[_0x898a('0x2a')];var _0xd31922=_0x1f4d86?0x0:_0x53ddb2['offset'];var _0x4b3e68=_0x1f4d86?_0x3678be['count']:_0x53ddb2[_0x898a('0x27')]+_0x53ddb2[_0x898a('0x29')];var _0x3b7704;if(_0x4b3e68>=_0x398e98){_0x4b3e68=_0x398e98;_0x3b7704=0xc8;}else{_0x3b7704=0xce;}_0x513c6b[_0x898a('0x25')](_0x3b7704);return _0x513c6b[_0x898a('0x2b')](_0x898a('0x2c'),_0xd31922+'-'+_0x4b3e68+'/'+_0x398e98)[_0x898a('0x2d')](_0x3678be);}return null;};}function patchUpdates(_0xf74645){return function(_0x18773a){try{jsonpatch[_0x898a('0x2e')](_0x18773a,_0xf74645,!![]);}catch(_0x44c5d2){return BPromise[_0x898a('0x2f')](_0x44c5d2);}return _0x18773a['save']();};}function saveUpdates(_0x7a1eb5,_0x17a5f3){return function(_0x26eead){if(_0x26eead){return _0x26eead[_0x898a('0x30')](_0x7a1eb5)[_0x898a('0x31')](function(_0x47af5b){return _0x47af5b;});}return null;};}function removeEntity(_0x48cefb,_0x20a3fe){return function(_0x1e2fd4){if(_0x1e2fd4){return _0x1e2fd4[_0x898a('0x32')]()['then'](function(){var _0x105477=_0x1e2fd4[_0x898a('0x33')]({'plain':!![]});var _0x5eafc7=_0x898a('0x34');return db[_0x898a('0x35')][_0x898a('0x32')]({'where':{'type':_0x5eafc7,'resourceId':_0x105477['id']}})[_0x898a('0x31')](function(){return _0x1e2fd4;});})[_0x898a('0x31')](function(){_0x48cefb['status'](0xcc)[_0x898a('0x26')]();});}};}function handleEntityNotFound(_0x5baf5b,_0x573eb3){return function(_0x14e2dc){if(!_0x14e2dc){_0x5baf5b['sendStatus'](0x194);}return _0x14e2dc;};}function handleError(_0x3c9588,_0x4b3aac){_0x4b3aac=_0x4b3aac||0x1f4;return function(_0x37cb11){logger['error'](_0x37cb11[_0x898a('0x36')]);if(_0x37cb11[_0x898a('0x37')]){delete _0x37cb11[_0x898a('0x37')];}_0x3c9588['status'](_0x4b3aac)['send'](_0x37cb11);};}exports['index']=function(_0x1575d2,_0x429c32){var _0x5a228f={},_0xdd019d={},_0x3d3463={'count':0x0,'rows':[]};var _0xe84f7e=_[_0x898a('0x38')](db['Trunk']['rawAttributes'],function(_0x3aed01){return{'name':_0x3aed01[_0x898a('0x39')],'type':_0x3aed01['type']['key']};});_0xdd019d[_0x898a('0x3a')]=_[_0x898a('0x38')](_0xe84f7e,_0x898a('0x37'));_0xdd019d[_0x898a('0x3b')]=_['keys'](_0x1575d2[_0x898a('0x3b')]);_0xdd019d[_0x898a('0x3c')]=_['intersection'](_0xdd019d['model'],_0xdd019d['query']);_0x5a228f[_0x898a('0x3d')]=_[_0x898a('0x3e')](_0xdd019d[_0x898a('0x3a')],qs[_0x898a('0x3f')](_0x1575d2[_0x898a('0x3b')][_0x898a('0x3f')]));_0x5a228f[_0x898a('0x3d')]=_0x5a228f[_0x898a('0x3d')][_0x898a('0x40')]?_0x5a228f[_0x898a('0x3d')]:_0xdd019d[_0x898a('0x3a')];if(!_0x1575d2[_0x898a('0x3b')][_0x898a('0x41')](_0x898a('0x42'))){_0x5a228f[_0x898a('0x29')]=qs['limit'](_0x1575d2[_0x898a('0x3b')][_0x898a('0x29')]);_0x5a228f[_0x898a('0x27')]=qs['offset'](_0x1575d2[_0x898a('0x3b')][_0x898a('0x27')]);}_0x5a228f[_0x898a('0x43')]=qs[_0x898a('0x44')](_0x1575d2[_0x898a('0x3b')][_0x898a('0x44')]);_0x5a228f[_0x898a('0x45')]=qs[_0x898a('0x3c')](_['pick'](_0x1575d2[_0x898a('0x3b')],_0xdd019d[_0x898a('0x3c')]),_0xe84f7e);if(_0x1575d2[_0x898a('0x3b')][_0x898a('0x46')]){_0x5a228f['where']=_[_0x898a('0x47')](_0x5a228f[_0x898a('0x45')],{'$or':_['map'](_0xe84f7e,function(_0x241677){if(_0x241677['type']!==_0x898a('0x48')){var _0x5137c4={};_0x5137c4[_0x241677['name']]={'$like':'%'+_0x1575d2[_0x898a('0x3b')]['filter']+'%'};return _0x5137c4;}})});}_0x5a228f=_[_0x898a('0x47')]({},_0x5a228f,_0x1575d2[_0x898a('0x49')]);var _0x4d6ac0={'where':_0x5a228f[_0x898a('0x45')]};return db[_0x898a('0x4a')]['count'](_0x4d6ac0)[_0x898a('0x31')](function(_0x199437){_0x3d3463[_0x898a('0x2a')]=_0x199437;if(_0x1575d2[_0x898a('0x3b')]['includeAll']){_0x5a228f[_0x898a('0x4b')]=[{'all':!![]}];}return db[_0x898a('0x4a')]['findAll'](_0x5a228f);})[_0x898a('0x31')](function(_0x1d8c16){_0x3d3463['rows']=_0x1d8c16;return _0x3d3463;})[_0x898a('0x31')](respondWithFilteredResult(_0x429c32,_0x5a228f))['catch'](handleError(_0x429c32,null));};exports[_0x898a('0x4c')]=function(_0x41f291,_0x32ccb9){var _0x50f9e3={'raw':![],'where':{'id':_0x41f291[_0x898a('0x4d')]['id']}},_0x2f6cb3={};_0x2f6cb3[_0x898a('0x3a')]=_[_0x898a('0x4e')](db['Trunk'][_0x898a('0x4f')]);_0x2f6cb3['query']=_[_0x898a('0x4e')](_0x41f291[_0x898a('0x3b')]);_0x2f6cb3[_0x898a('0x3c')]=_['intersection'](_0x2f6cb3[_0x898a('0x3a')],_0x2f6cb3[_0x898a('0x3b')]);_0x50f9e3[_0x898a('0x3d')]=_['intersection'](_0x2f6cb3['model'],qs[_0x898a('0x3f')](_0x41f291[_0x898a('0x3b')][_0x898a('0x3f')]));_0x50f9e3[_0x898a('0x3d')]=_0x50f9e3[_0x898a('0x3d')][_0x898a('0x40')]?_0x50f9e3[_0x898a('0x3d')]:_0x2f6cb3[_0x898a('0x3a')];if(_0x41f291[_0x898a('0x3b')][_0x898a('0x50')]){_0x50f9e3[_0x898a('0x4b')]=[{'all':!![]}];}_0x50f9e3=_['merge']({},_0x50f9e3,_0x41f291[_0x898a('0x49')]);return db[_0x898a('0x4a')]['find'](_0x50f9e3)[_0x898a('0x31')](handleEntityNotFound(_0x32ccb9,null))['then'](respondWithResult(_0x32ccb9,null))['catch'](handleError(_0x32ccb9,null));};exports[_0x898a('0x51')]=function(_0x124f9b,_0x209529){var _0x5bfd61={'where':{'id':_0x124f9b[_0x898a('0x4d')]['id']}},_0x556fd8={};_0x556fd8[_0x898a('0x3a')]=_['keys'](db[_0x898a('0x4a')][_0x898a('0x4f')]);_0x5bfd61['attributes']=_[_0x898a('0x3e')](_0x556fd8[_0x898a('0x3a')],qs[_0x898a('0x3f')](_0x124f9b['query'][_0x898a('0x3f')]));_0x5bfd61[_0x898a('0x3d')]=_0x5bfd61[_0x898a('0x3d')][_0x898a('0x40')]?_0x5bfd61[_0x898a('0x3d')]:_0x556fd8[_0x898a('0x3a')];if(_0x124f9b['query'][_0x898a('0x50')]){_0x5bfd61['include']=[{'all':!![]}];}_0x5bfd61=_[_0x898a('0x47')]({},_0x5bfd61,_0x124f9b[_0x898a('0x49')]);return db[_0x898a('0x4a')][_0x898a('0x52')](_0x5bfd61)[_0x898a('0x31')](handleEntityNotFound(_0x209529,null))[_0x898a('0x31')](function(_0x2486a5){if(_0x2486a5){var _0x75ff57=_0x2486a5[_0x898a('0x33')]({'plain':!![]});_0x75ff57=qs['omit'](_0x75ff57,['id',_0x898a('0x53'),_0x898a('0x54')]);_0x124f9b[_0x898a('0x55')]=_[_0x898a('0x56')](_0x124f9b[_0x898a('0x55')],['id',_0x898a('0x53'),_0x898a('0x54')]);return db[_0x898a('0x4a')][_0x898a('0x57')](_[_0x898a('0x47')](_0x75ff57,_0x124f9b[_0x898a('0x55')]),{'include':_0x124f9b[_0x898a('0x3b')][_0x898a('0x50')]?[{'all':!![]}]:undefined})[_0x898a('0x31')](function(_0x22f9ba){var _0x5f42ae=_0x124f9b[_0x898a('0x58')][_0x898a('0x33')]({'plain':!![]});if(!_0x5f42ae)throw new Error('Unable\x20to\x20retrieve\x20the\x20current\x20user');if(_0x5f42ae[_0x898a('0x59')]===_0x898a('0x58')){var _0x5f0944=_0x22f9ba[_0x898a('0x33')]({'plain':!![]});var _0x1daecd=_0x898a('0x34');return db[_0x898a('0x5a')]['find']({'where':{'name':_0x1daecd,'userProfileId':_0x5f42ae[_0x898a('0x5b')]},'raw':!![]})[_0x898a('0x31')](function(_0x137935){if(_0x137935&&_0x137935[_0x898a('0x5c')]===0x0){return db['UserProfileResource'][_0x898a('0x57')]({'name':_0x5f0944[_0x898a('0x37')],'resourceId':_0x5f0944['id'],'type':_0x137935['name'],'sectionId':_0x137935['id']},{})[_0x898a('0x31')](function(){return _0x22f9ba;});}else{return _0x22f9ba;}})[_0x898a('0x23')](function(_0x5b7019){logger[_0x898a('0x1f')]('Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s',_0x5b7019);throw _0x5b7019;});}return _0x22f9ba;});}})[_0x898a('0x31')](respondWithResult(_0x209529,0xc9))['catch'](handleError(_0x209529,null));};exports['create']=function(_0x5ed35e,_0xfdd6d8,_0x473f5c){var _0x3909c5;return db[_0x898a('0x4a')]['create'](_0x5ed35e['body'],{'raw':!![]})[_0x898a('0x31')](function(_0x232be0){_0x3909c5=_0x232be0;return db[_0x898a('0x4a')][_0x898a('0x5d')]({'raw':!![]});})[_0x898a('0x31')](function(_0x41cf94){var _0x30051d=fs[_0x898a('0x5e')](path['join'](config[_0x898a('0x5f')],_0x898a('0x60')),'utf8');var _0x42fda8=fs[_0x898a('0x5e')](path[_0x898a('0x61')](config[_0x898a('0x5f')],_0x898a('0x62')),_0x898a('0x63'));var _0x3bcc3d=ejs[_0x898a('0x64')](_0x30051d,{'trunks':_0x41cf94||[]});fs[_0x898a('0x65')](_0x898a('0x66'),_0x3bcc3d);if(_0x3909c5[_0x898a('0x67')]){var _0x307849=ejs[_0x898a('0x64')](_0x42fda8,{'trunks':_0x41cf94||[]});fs['writeFileSync'](_0x898a('0x68'),_0x307849);}})['then'](function(){return respondWithRpcPromise(_0x898a('0x69'),_0x898a('0x57'),{'module':_0x898a('0x6a')});})['then'](function(){var _0x31102d=_0x5ed35e[_0x898a('0x58')][_0x898a('0x33')]({'plain':!![]});if(!_0x31102d)throw new Error(_0x898a('0x6b'));if(_0x31102d[_0x898a('0x59')]==='user'){var _0x4b9487=_0x3909c5[_0x898a('0x33')]({'plain':!![]});return db[_0x898a('0x5a')][_0x898a('0x52')]({'where':{'name':_0x898a('0x34'),'userProfileId':_0x31102d['userProfileId']},'raw':!![]})[_0x898a('0x31')](function(_0x3d3451){if(_0x3d3451&&_0x3d3451[_0x898a('0x5c')]===0x0){return db[_0x898a('0x35')][_0x898a('0x57')]({'name':_0x4b9487[_0x898a('0x37')],'resourceId':_0x4b9487['id'],'type':_0x3d3451[_0x898a('0x37')],'sectionId':_0x3d3451['id']},{})[_0x898a('0x31')](function(){return _0x3909c5;});}else{return _0x3909c5;}})['catch'](function(_0x32a207){logger[_0x898a('0x1f')]('Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s',_0x32a207);throw _0x32a207;});}return _0x3909c5;})[_0x898a('0x31')](respondWithResult(_0xfdd6d8,0xc9))['catch'](handleError(_0xfdd6d8,null));};exports[_0x898a('0x30')]=function(_0x4b2575,_0x2471d8,_0x387f2c){var _0x3b07dc;return db[_0x898a('0x4a')][_0x898a('0x52')]({'where':{'id':_0x4b2575[_0x898a('0x4d')]['id']}})[_0x898a('0x31')](handleEntityNotFound(_0x2471d8,null))[_0x898a('0x31')](saveUpdates(_0x4b2575[_0x898a('0x55')],null))['then'](function(_0x3fe54b){if(_0x3fe54b){_0x3b07dc=_0x3fe54b;return db[_0x898a('0x4a')][_0x898a('0x5d')]({'raw':!![]});}})[_0x898a('0x31')](function(_0x290972){if(_0x290972){var _0x1d594b=fs[_0x898a('0x5e')](path[_0x898a('0x61')](config[_0x898a('0x5f')],_0x898a('0x60')),'utf8');var _0x4fad03=fs[_0x898a('0x5e')](path[_0x898a('0x61')](config['root'],'server/files/templates/registry.ejs'),_0x898a('0x63'));var _0x4a79a4=ejs[_0x898a('0x64')](_0x1d594b,{'trunks':_0x290972||[]});fs[_0x898a('0x65')]('/etc/asterisk/sip_xcally_trunks.conf',_0x4a79a4);var _0x3f6815=ejs[_0x898a('0x64')](_0x4fad03,{'trunks':_0x290972||[]});fs[_0x898a('0x65')](_0x898a('0x68'),_0x3f6815);return respondWithRpcPromise(_0x898a('0x69'),_0x898a('0x30'),{'module':_0x898a('0x6a')});}return null;})['then'](function(_0x3237e8){if(_0x3237e8){return _0x3b07dc;}})[_0x898a('0x31')](respondWithResult(_0x2471d8,null))[_0x898a('0x23')](handleError(_0x2471d8,null));};exports['destroy']=function(_0x27560f,_0x61247c,_0x5c6247){var _0x39e917;return db['Trunk']['find']({'where':{'id':_0x27560f['params']['id']}})[_0x898a('0x31')](handleEntityNotFound(_0x61247c,null))[_0x898a('0x31')](removeEntity(_0x61247c,null))[_0x898a('0x31')](function(){return db[_0x898a('0x4a')][_0x898a('0x5d')]({'raw':!![]});})[_0x898a('0x31')](function(_0x12e54b){var _0x50dd52=fs[_0x898a('0x5e')](path['join'](config[_0x898a('0x5f')],_0x898a('0x60')),'utf8');var _0x24670c=fs[_0x898a('0x5e')](path[_0x898a('0x61')](config[_0x898a('0x5f')],_0x898a('0x62')),'utf8');var _0x5847cb=ejs['render'](_0x50dd52,{'trunks':_0x12e54b});var _0x3b8fb5=ejs[_0x898a('0x64')](_0x24670c,{'trunks':_0x12e54b});fs[_0x898a('0x65')]('/etc/asterisk/sip_xcally_trunks.conf',_0x5847cb);fs[_0x898a('0x65')]('/etc/asterisk/sip_xcally_registers.conf',_0x3b8fb5);return respondWithRpcPromise('Reload',_0x898a('0x32'),{'module':_0x898a('0x6a')});})[_0x898a('0x23')](handleError(_0x61247c,null));}; \ No newline at end of file diff --git a/server/api/trunk/trunk.model.js b/server/api/trunk/trunk.model.js index c082878..ec6c3c0 100644 --- a/server/api/trunk/trunk.model.js +++ b/server/api/trunk/trunk.model.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x4ced=['util','../../config/logger','api','bluebird','request-promise','path','rimraf','../../config/environment','./trunk.attributes','define','Trunk','tools_trunks'];(function(_0x1c5dc4,_0x4498a6){var _0x3f7235=function(_0x2caf5e){while(--_0x2caf5e){_0x1c5dc4['push'](_0x1c5dc4['shift']());}};_0x3f7235(++_0x4498a6);}(_0x4ced,0xa8));var _0xd4ce=function(_0x4be4c3,_0x39878a){_0x4be4c3=_0x4be4c3-0x0;var _0x4969c8=_0x4ced[_0x4be4c3];return _0x4969c8;};'use strict';var _=require('lodash');var util=require(_0xd4ce('0x0'));var logger=require(_0xd4ce('0x1'))(_0xd4ce('0x2'));var moment=require('moment');var BPromise=require(_0xd4ce('0x3'));var rp=require(_0xd4ce('0x4'));var fs=require('fs');var path=require(_0xd4ce('0x5'));var rimraf=require(_0xd4ce('0x6'));var config=require(_0xd4ce('0x7'));var attributes=require(_0xd4ce('0x8'));module['exports']=function(_0x472f7b,_0x50e0df){return _0x472f7b[_0xd4ce('0x9')](_0xd4ce('0xa'),attributes,{'tableName':_0xd4ce('0xb'),'paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file +var _0xef78=['./trunk.attributes','exports','Trunk','tools_trunks','lodash','util','../../config/logger','api','moment','request-promise','path','rimraf','../../config/environment'];(function(_0x19d986,_0xd6e4a5){var _0x33e542=function(_0x5768ee){while(--_0x5768ee){_0x19d986['push'](_0x19d986['shift']());}};_0x33e542(++_0xd6e4a5);}(_0xef78,0x79));var _0x8ef7=function(_0xdaa40,_0x8492f3){_0xdaa40=_0xdaa40-0x0;var _0x32b79d=_0xef78[_0xdaa40];return _0x32b79d;};'use strict';var _=require(_0x8ef7('0x0'));var util=require(_0x8ef7('0x1'));var logger=require(_0x8ef7('0x2'))(_0x8ef7('0x3'));var moment=require(_0x8ef7('0x4'));var BPromise=require('bluebird');var rp=require(_0x8ef7('0x5'));var fs=require('fs');var path=require(_0x8ef7('0x6'));var rimraf=require(_0x8ef7('0x7'));var config=require(_0x8ef7('0x8'));var attributes=require(_0x8ef7('0x9'));module[_0x8ef7('0xa')]=function(_0x4352da,_0x292feb){return _0x4352da['define'](_0x8ef7('0xb'),attributes,{'tableName':_0x8ef7('0xc'),'paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file diff --git a/server/api/trunk/trunk.rpc.js b/server/api/trunk/trunk.rpc.js index d6a4293..e590059 100644 --- a/server/api/trunk/trunk.rpc.js +++ b/server/api/trunk/trunk.rpc.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x96f6=['info','request\x20sent','debug','Trunk,\x20%s,\x20%s,\x20%s','stringify','error','message','Trunk,\x20%s,\x20%s','result','catch','GetTrunk','findAll','options','raw','limit','include','attributes','model','ShowTrunk','find','where','map','lodash','util','bluebird','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','jayson/promise','client','then'];(function(_0x22eed0,_0x2a3b1e){var _0x205dfc=function(_0x1209a7){while(--_0x1209a7){_0x22eed0['push'](_0x22eed0['shift']());}};_0x205dfc(++_0x2a3b1e);}(_0x96f6,0x181));var _0x696f=function(_0x3b96cf,_0x1592f2){_0x3b96cf=_0x3b96cf-0x0;var _0x2e315a=_0x96f6[_0x3b96cf];return _0x2e315a;};'use strict';var _=require(_0x696f('0x0'));var util=require(_0x696f('0x1'));var moment=require('moment');var BPromise=require(_0x696f('0x2'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x696f('0x3'));var db=require(_0x696f('0x4'))['db'];var utils=require(_0x696f('0x5'));var logger=require(_0x696f('0x6'))(_0x696f('0x7'));var config=require('../../config/environment');var jayson=require(_0x696f('0x8'));var client=jayson[_0x696f('0x9')]['http']({'port':0x232a});function respondWithRpcPromise(_0x1f2118,_0x4cbe98,_0x31771c){return new BPromise(function(_0x4ca0d7,_0x4455ed){return client['request'](_0x1f2118,_0x31771c)[_0x696f('0xa')](function(_0x4d5288){logger[_0x696f('0xb')]('Trunk,\x20%s,\x20%s',_0x4cbe98,_0x696f('0xc'));logger[_0x696f('0xd')](_0x696f('0xe'),_0x4cbe98,_0x696f('0xc'),JSON[_0x696f('0xf')](_0x4d5288));if(_0x4d5288[_0x696f('0x10')]){if(_0x4d5288[_0x696f('0x10')]['code']===0x1f4){logger[_0x696f('0x10')]('Trunk,\x20%s,\x20%s',_0x4cbe98,_0x4d5288[_0x696f('0x10')][_0x696f('0x11')]);return _0x4455ed(_0x4d5288[_0x696f('0x10')][_0x696f('0x11')]);}logger[_0x696f('0x10')]('Trunk,\x20%s,\x20%s',_0x4cbe98,_0x4d5288['error']['message']);return _0x4ca0d7(_0x4d5288[_0x696f('0x10')][_0x696f('0x11')]);}else{logger[_0x696f('0xb')](_0x696f('0x12'),_0x4cbe98,_0x696f('0xc'));_0x4ca0d7(_0x4d5288[_0x696f('0x13')][_0x696f('0x11')]);}})[_0x696f('0x14')](function(_0x292eb4){logger[_0x696f('0x10')](_0x696f('0x12'),_0x4cbe98,_0x292eb4);_0x4455ed(_0x292eb4);});});}exports[_0x696f('0x15')]=function(_0x32659a){var _0x252a77=this;return new Promise(function(_0x25ffaa,_0x5ef3fa){return db['Trunk'][_0x696f('0x16')]({'raw':_0x32659a[_0x696f('0x17')]?_0x32659a[_0x696f('0x17')][_0x696f('0x18')]===undefined?!![]:![]:!![],'where':_0x32659a['options']?_0x32659a['options']['where']||null:null,'attributes':_0x32659a[_0x696f('0x17')]?_0x32659a['options']['attributes']||null:null,'limit':_0x32659a[_0x696f('0x17')]?_0x32659a[_0x696f('0x17')][_0x696f('0x19')]||null:null,'include':_0x32659a[_0x696f('0x17')]?_0x32659a[_0x696f('0x17')]['include']?_['map'](_0x32659a[_0x696f('0x17')][_0x696f('0x1a')],function(_0x26fea1){return{'model':db[_0x26fea1['model']],'as':_0x26fea1['as'],'attributes':_0x26fea1[_0x696f('0x1b')],'include':_0x26fea1[_0x696f('0x1a')]?_['map'](_0x26fea1[_0x696f('0x1a')],function(_0x12d6ff){return{'model':db[_0x12d6ff[_0x696f('0x1c')]],'as':_0x12d6ff['as'],'attributes':_0x12d6ff['attributes'],'include':_0x12d6ff['include']?_['map'](_0x12d6ff[_0x696f('0x1a')],function(_0x4f54f7){return{'model':db[_0x4f54f7['model']],'as':_0x4f54f7['as'],'attributes':_0x4f54f7[_0x696f('0x1b')]};}):[]};}):[]};}):[]:[]})[_0x696f('0xa')](function(_0x11118e){logger['info'](_0x696f('0x15'),_0x32659a);logger[_0x696f('0xd')](_0x696f('0x15'),_0x32659a,JSON['stringify'](_0x11118e));_0x25ffaa(_0x11118e);})[_0x696f('0x14')](function(_0x29c591){logger[_0x696f('0x10')](_0x696f('0x15'),_0x29c591[_0x696f('0x11')],_0x32659a);_0x5ef3fa(_0x252a77['error'](0x1f4,_0x29c591[_0x696f('0x11')]));});});};exports[_0x696f('0x1d')]=function(_0x13cb6d){var _0x51519b=this;return new Promise(function(_0x5531f0,_0x129c1c){return db['Trunk'][_0x696f('0x1e')]({'raw':_0x13cb6d[_0x696f('0x17')]?_0x13cb6d[_0x696f('0x17')][_0x696f('0x18')]===undefined?!![]:![]:!![],'where':_0x13cb6d['options']?_0x13cb6d[_0x696f('0x17')][_0x696f('0x1f')]||null:null,'attributes':_0x13cb6d[_0x696f('0x17')]?_0x13cb6d[_0x696f('0x17')][_0x696f('0x1b')]||null:null,'include':_0x13cb6d['options']?_0x13cb6d[_0x696f('0x17')]['include']?_[_0x696f('0x20')](_0x13cb6d[_0x696f('0x17')][_0x696f('0x1a')],function(_0x42af7a){return{'model':db[_0x42af7a['model']],'as':_0x42af7a['as'],'attributes':_0x42af7a[_0x696f('0x1b')],'include':_0x42af7a['include']?_[_0x696f('0x20')](_0x42af7a['include'],function(_0x3f83ba){return{'model':db[_0x3f83ba[_0x696f('0x1c')]],'as':_0x3f83ba['as'],'attributes':_0x3f83ba['attributes'],'include':_0x3f83ba['include']?_[_0x696f('0x20')](_0x3f83ba[_0x696f('0x1a')],function(_0x372728){return{'model':db[_0x372728['model']],'as':_0x372728['as'],'attributes':_0x372728['attributes']};}):[]};}):[]};}):[]:[]})['then'](function(_0x47f3c3){logger[_0x696f('0xb')](_0x696f('0x1d'),_0x13cb6d);logger[_0x696f('0xd')](_0x696f('0x1d'),_0x13cb6d,JSON[_0x696f('0xf')](_0x47f3c3));_0x5531f0(_0x47f3c3);})[_0x696f('0x14')](function(_0x2dde6d){logger[_0x696f('0x10')](_0x696f('0x1d'),_0x2dde6d[_0x696f('0x11')],_0x13cb6d);_0x129c1c(_0x51519b['error'](0x1f4,_0x2dde6d[_0x696f('0x11')]));});});}; \ No newline at end of file +var _0x62f1=['info','Trunk,\x20%s,\x20%s','debug','Trunk,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','code','message','catch','Trunk','findAll','options','raw','where','limit','include','map','model','attributes','GetTrunk','ShowTrunk','then','moment','bluebird','randomstring','ioredis','../../config/utils','../../config/logger','jayson/promise','client','http','request'];(function(_0x2bd056,_0x271da0){var _0x4b50a3=function(_0x46016b){while(--_0x46016b){_0x2bd056['push'](_0x2bd056['shift']());}};_0x4b50a3(++_0x271da0);}(_0x62f1,0x161));var _0x162f=function(_0x319ff8,_0x45ca90){_0x319ff8=_0x319ff8-0x0;var _0x11d674=_0x62f1[_0x319ff8];return _0x11d674;};'use strict';var _=require('lodash');var util=require('util');var moment=require(_0x162f('0x0'));var BPromise=require(_0x162f('0x1'));var rs=require(_0x162f('0x2'));var fs=require('fs');var Redis=require(_0x162f('0x3'));var db=require('../../mysqldb')['db'];var utils=require(_0x162f('0x4'));var logger=require(_0x162f('0x5'))('rpc');var config=require('../../config/environment');var jayson=require(_0x162f('0x6'));var client=jayson[_0x162f('0x7')][_0x162f('0x8')]({'port':0x232a});function respondWithRpcPromise(_0x6afabf,_0x4a91b6,_0x3dfd21){return new BPromise(function(_0x10a580,_0x166d09){return client[_0x162f('0x9')](_0x6afabf,_0x3dfd21)['then'](function(_0x3e000c){logger[_0x162f('0xa')](_0x162f('0xb'),_0x4a91b6,'request\x20sent');logger[_0x162f('0xc')](_0x162f('0xd'),_0x4a91b6,_0x162f('0xe'),JSON[_0x162f('0xf')](_0x3e000c));if(_0x3e000c['error']){if(_0x3e000c[_0x162f('0x10')][_0x162f('0x11')]===0x1f4){logger[_0x162f('0x10')](_0x162f('0xb'),_0x4a91b6,_0x3e000c[_0x162f('0x10')][_0x162f('0x12')]);return _0x166d09(_0x3e000c[_0x162f('0x10')][_0x162f('0x12')]);}logger[_0x162f('0x10')](_0x162f('0xb'),_0x4a91b6,_0x3e000c[_0x162f('0x10')][_0x162f('0x12')]);return _0x10a580(_0x3e000c[_0x162f('0x10')][_0x162f('0x12')]);}else{logger[_0x162f('0xa')](_0x162f('0xb'),_0x4a91b6,_0x162f('0xe'));_0x10a580(_0x3e000c['result'][_0x162f('0x12')]);}})[_0x162f('0x13')](function(_0x2f8c2e){logger[_0x162f('0x10')](_0x162f('0xb'),_0x4a91b6,_0x2f8c2e);_0x166d09(_0x2f8c2e);});});}exports['GetTrunk']=function(_0x3cc36e){var _0x339e=this;return new Promise(function(_0x1b5bcb,_0x8c146c){return db[_0x162f('0x14')][_0x162f('0x15')]({'raw':_0x3cc36e[_0x162f('0x16')]?_0x3cc36e[_0x162f('0x16')][_0x162f('0x17')]===undefined?!![]:![]:!![],'where':_0x3cc36e[_0x162f('0x16')]?_0x3cc36e['options'][_0x162f('0x18')]||null:null,'attributes':_0x3cc36e[_0x162f('0x16')]?_0x3cc36e[_0x162f('0x16')]['attributes']||null:null,'limit':_0x3cc36e[_0x162f('0x16')]?_0x3cc36e['options'][_0x162f('0x19')]||null:null,'include':_0x3cc36e[_0x162f('0x16')]?_0x3cc36e[_0x162f('0x16')][_0x162f('0x1a')]?_[_0x162f('0x1b')](_0x3cc36e['options'][_0x162f('0x1a')],function(_0x2fa049){return{'model':db[_0x2fa049[_0x162f('0x1c')]],'as':_0x2fa049['as'],'attributes':_0x2fa049['attributes'],'include':_0x2fa049['include']?_[_0x162f('0x1b')](_0x2fa049[_0x162f('0x1a')],function(_0x28accb){return{'model':db[_0x28accb[_0x162f('0x1c')]],'as':_0x28accb['as'],'attributes':_0x28accb['attributes'],'include':_0x28accb[_0x162f('0x1a')]?_[_0x162f('0x1b')](_0x28accb[_0x162f('0x1a')],function(_0x10417c){return{'model':db[_0x10417c[_0x162f('0x1c')]],'as':_0x10417c['as'],'attributes':_0x10417c[_0x162f('0x1d')]};}):[]};}):[]};}):[]:[]})['then'](function(_0x5cccc9){logger[_0x162f('0xa')](_0x162f('0x1e'),_0x3cc36e);logger[_0x162f('0xc')](_0x162f('0x1e'),_0x3cc36e,JSON['stringify'](_0x5cccc9));_0x1b5bcb(_0x5cccc9);})['catch'](function(_0x20bf1c){logger[_0x162f('0x10')](_0x162f('0x1e'),_0x20bf1c[_0x162f('0x12')],_0x3cc36e);_0x8c146c(_0x339e['error'](0x1f4,_0x20bf1c['message']));});});};exports[_0x162f('0x1f')]=function(_0x11a62a){var _0x33eebf=this;return new Promise(function(_0x340d77,_0xb75919){return db[_0x162f('0x14')]['find']({'raw':_0x11a62a[_0x162f('0x16')]?_0x11a62a[_0x162f('0x16')][_0x162f('0x17')]===undefined?!![]:![]:!![],'where':_0x11a62a[_0x162f('0x16')]?_0x11a62a[_0x162f('0x16')][_0x162f('0x18')]||null:null,'attributes':_0x11a62a['options']?_0x11a62a['options'][_0x162f('0x1d')]||null:null,'include':_0x11a62a[_0x162f('0x16')]?_0x11a62a[_0x162f('0x16')][_0x162f('0x1a')]?_[_0x162f('0x1b')](_0x11a62a[_0x162f('0x16')]['include'],function(_0x1b607a){return{'model':db[_0x1b607a[_0x162f('0x1c')]],'as':_0x1b607a['as'],'attributes':_0x1b607a['attributes'],'include':_0x1b607a[_0x162f('0x1a')]?_[_0x162f('0x1b')](_0x1b607a[_0x162f('0x1a')],function(_0x376744){return{'model':db[_0x376744[_0x162f('0x1c')]],'as':_0x376744['as'],'attributes':_0x376744[_0x162f('0x1d')],'include':_0x376744[_0x162f('0x1a')]?_[_0x162f('0x1b')](_0x376744[_0x162f('0x1a')],function(_0x3447b4){return{'model':db[_0x3447b4[_0x162f('0x1c')]],'as':_0x3447b4['as'],'attributes':_0x3447b4[_0x162f('0x1d')]};}):[]};}):[]};}):[]:[]})[_0x162f('0x20')](function(_0x451fe2){logger[_0x162f('0xa')](_0x162f('0x1f'),_0x11a62a);logger[_0x162f('0xc')](_0x162f('0x1f'),_0x11a62a,JSON['stringify'](_0x451fe2));_0x340d77(_0x451fe2);})[_0x162f('0x13')](function(_0x12cf85){logger[_0x162f('0x10')](_0x162f('0x1f'),_0x12cf85[_0x162f('0x12')],_0x11a62a);_0xb75919(_0x33eebf[_0x162f('0x10')](0x1f4,_0x12cf85[_0x162f('0x12')]));});});}; \ No newline at end of file diff --git a/server/api/user-setting/index.js b/server/api/user-setting/index.js index d500d6c..5cbe960 100644 --- a/server/api/user-setting/index.js +++ b/server/api/user-setting/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xafef=['update','exports','Router','../../components/auth/service','put','/:id','isAuthenticated'];(function(_0x1a80d3,_0x332848){var _0x1f7fea=function(_0x42acae){while(--_0x42acae){_0x1a80d3['push'](_0x1a80d3['shift']());}};_0x1f7fea(++_0x332848);}(_0xafef,0x1e5));var _0xfafe=function(_0x27f3d7,_0xdbd9ab){_0x27f3d7=_0x27f3d7-0x0;var _0x565e4b=_0xafef[_0x27f3d7];return _0x565e4b;};'use strict';var express=require('express');var router=express[_0xfafe('0x0')]();var auth=require(_0xfafe('0x1'));var controller=require('./user-setting.controller');router[_0xfafe('0x2')](_0xfafe('0x3'),auth[_0xfafe('0x4')](),controller[_0xfafe('0x5')]);module[_0xfafe('0x6')]=router; \ No newline at end of file +var _0x9219=['isAuthenticated','update','exports','express','Router','../../components/auth/service','./user-setting.controller','put'];(function(_0xdf3db6,_0x2a1952){var _0x4b7a65=function(_0x2953be){while(--_0x2953be){_0xdf3db6['push'](_0xdf3db6['shift']());}};_0x4b7a65(++_0x2a1952);}(_0x9219,0xe3));var _0x9921=function(_0x390b0c,_0x18c911){_0x390b0c=_0x390b0c-0x0;var _0x2e48d6=_0x9219[_0x390b0c];return _0x2e48d6;};'use strict';var express=require(_0x9921('0x0'));var router=express[_0x9921('0x1')]();var auth=require(_0x9921('0x2'));var controller=require(_0x9921('0x3'));router[_0x9921('0x4')]('/:id',auth[_0x9921('0x5')](),controller[_0x9921('0x6')]);module[_0x9921('0x7')]=router; \ No newline at end of file diff --git a/server/api/user-setting/user-setting.attributes.js b/server/api/user-setting/user-setting.attributes.js index 5946995..7751668 100644 --- a/server/api/user-setting/user-setting.attributes.js +++ b/server/api/user-setting/user-setting.attributes.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x261a=['UserId','sequelize','warning','info','debug','exports','error','BOOLEAN','TEXT','DATE','INTEGER'];(function(_0x41159b,_0x18ae88){var _0x5bea4e=function(_0x95177e){while(--_0x95177e){_0x41159b['push'](_0x41159b['shift']());}};_0x5bea4e(++_0x18ae88);}(_0x261a,0x11f));var _0xa261=function(_0x2641f9,_0x26715f){_0x2641f9=_0x2641f9-0x0;var _0x585741=_0x261a[_0x2641f9];return _0x585741;};'use strict';var Sequelize=require(_0xa261('0x0'));const CLIENT_SIDE_LOG_LEVELS=['error',_0xa261('0x1'),_0xa261('0x2'),_0xa261('0x3')];module[_0xa261('0x4')]={'clientSideLoggingLevel':{'type':Sequelize['ENUM'](CLIENT_SIDE_LOG_LEVELS),'allowNull':![],'defaultValue':_0xa261('0x5'),'validate':{'isIn':[CLIENT_SIDE_LOG_LEVELS]}},'clientSideLoggingEnabled':{'type':Sequelize[_0xa261('0x6')],'defaultValue':![]},'clientSideLoggingScopes':{'type':Sequelize[_0xa261('0x7')],'allowNull':!![]},'clientSideLoggingEnabledSince':{'type':Sequelize[_0xa261('0x8')],'allowNull':!![],'defaultValue':null},'UserId':{'type':Sequelize[_0xa261('0x9')],'unique':_0xa261('0xa')}}; \ No newline at end of file +var _0xb003=['UserId','sequelize','error','info','debug','ENUM','DATE','INTEGER'];(function(_0x14add3,_0x13ce8d){var _0x4a174f=function(_0x2b3ed7){while(--_0x2b3ed7){_0x14add3['push'](_0x14add3['shift']());}};_0x4a174f(++_0x13ce8d);}(_0xb003,0x1e1));var _0x3b00=function(_0x222472,_0x33ea87){_0x222472=_0x222472-0x0;var _0x5d601f=_0xb003[_0x222472];return _0x5d601f;};'use strict';var Sequelize=require(_0x3b00('0x0'));const CLIENT_SIDE_LOG_LEVELS=[_0x3b00('0x1'),'warning',_0x3b00('0x2'),_0x3b00('0x3')];module['exports']={'clientSideLoggingLevel':{'type':Sequelize[_0x3b00('0x4')](CLIENT_SIDE_LOG_LEVELS),'allowNull':![],'defaultValue':_0x3b00('0x1'),'validate':{'isIn':[CLIENT_SIDE_LOG_LEVELS]}},'clientSideLoggingEnabled':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'clientSideLoggingScopes':{'type':Sequelize['TEXT'],'allowNull':!![]},'clientSideLoggingEnabledSince':{'type':Sequelize[_0x3b00('0x5')],'allowNull':!![],'defaultValue':null},'UserId':{'type':Sequelize[_0x3b00('0x6')],'unique':_0x3b00('0x7')}}; \ No newline at end of file diff --git a/server/api/user-setting/user-setting.controller.js b/server/api/user-setting/user-setting.controller.js index 1803d7b..bfb09ab 100644 --- a/server/api/user-setting/user-setting.controller.js +++ b/server/api/user-setting/user-setting.controller.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xc560=['UserSetting','find','then','catch','lodash','../../config/logger','../../config/environment','redis','./user-setting.socket','register','localhost','status','update','error','stack','name','user','role','admin','params','Invalid\x20user\x20setting\x20id'];(function(_0x4d81ed,_0x390b59){var _0x65ee2a=function(_0xd0b9b3){while(--_0xd0b9b3){_0x4d81ed['push'](_0x4d81ed['shift']());}};_0x65ee2a(++_0x390b59);}(_0xc560,0x82));var _0x0c56=function(_0x55dbfd,_0x27dd4b){_0x55dbfd=_0x55dbfd-0x0;var _0x3c4efb=_0xc560[_0x55dbfd];return _0x3c4efb;};'use strict';var _=require(_0x0c56('0x0'));var Redis=require('ioredis');var logger=require(_0x0c56('0x1'))('api');var config=require(_0x0c56('0x2'));var db=require('../../mysqldb')['db'];var socket=require('socket.io-emitter')(new Redis(config[_0x0c56('0x3')]));require(_0x0c56('0x4'))[_0x0c56('0x5')](socket);config[_0x0c56('0x3')]=_['defaults'](config[_0x0c56('0x3')],{'host':_0x0c56('0x6'),'port':0x18eb});function respondWithResult(_0x35b4ee,_0x1245b3){_0x1245b3=_0x1245b3||0xc8;return function(_0x501a0b){if(_0x501a0b){return _0x35b4ee[_0x0c56('0x7')](_0x1245b3)['json'](_0x501a0b);}};}function saveUpdates(_0xd83c84){return function(_0x1642d8){if(_0x1642d8){return _0x1642d8[_0x0c56('0x8')](_0xd83c84)['then'](function(_0x15979a){return _0x15979a;});}return null;};}function handleEntityNotFound(_0x41fd41){return function(_0x3651c6){if(!_0x3651c6){_0x41fd41['sendStatus'](0x194);}return _0x3651c6;};}function handleError(_0x2dab08,_0x2ecc1d){_0x2ecc1d=_0x2ecc1d||0x1f4;return function(_0x2e2bec){logger[_0x0c56('0x9')](_0x2e2bec[_0x0c56('0xa')]);if(_0x2e2bec[_0x0c56('0xb')]){delete _0x2e2bec[_0x0c56('0xb')];}_0x2dab08['status'](_0x2ecc1d)['send'](_0x2e2bec);};}exports[_0x0c56('0x8')]=function(_0x3220b1,_0x367417){if(_0x3220b1[_0x0c56('0xc')][_0x0c56('0xd')]!==_0x0c56('0xe'))throw new Error('Unauthorized');if(isNaN(Number(_0x3220b1[_0x0c56('0xf')]['id'])))throw new Error(_0x0c56('0x10'));return db[_0x0c56('0x11')][_0x0c56('0x12')]({'where':{'id':_0x3220b1[_0x0c56('0xf')]['id']}})['then'](handleEntityNotFound(_0x367417,null))[_0x0c56('0x13')](saveUpdates(_0x3220b1['body'],null))['then'](respondWithResult(_0x367417,null))[_0x0c56('0x14')](handleError(_0x367417,null));}; \ No newline at end of file +var _0xd737=['catch','lodash','../../config/logger','../../config/environment','../../mysqldb','socket.io-emitter','register','redis','localhost','status','json','then','stack','name','send','update','user','Unauthorized','params','Invalid\x20user\x20setting\x20id','find','body'];(function(_0x321bb2,_0x202794){var _0x9c12ed=function(_0x263dd3){while(--_0x263dd3){_0x321bb2['push'](_0x321bb2['shift']());}};_0x9c12ed(++_0x202794);}(_0xd737,0x85));var _0x7d73=function(_0x56138f,_0x1e9ebb){_0x56138f=_0x56138f-0x0;var _0x1acaf7=_0xd737[_0x56138f];return _0x1acaf7;};'use strict';var _=require(_0x7d73('0x0'));var Redis=require('ioredis');var logger=require(_0x7d73('0x1'))('api');var config=require(_0x7d73('0x2'));var db=require(_0x7d73('0x3'))['db'];var socket=require(_0x7d73('0x4'))(new Redis(config['redis']));require('./user-setting.socket')[_0x7d73('0x5')](socket);config['redis']=_['defaults'](config[_0x7d73('0x6')],{'host':_0x7d73('0x7'),'port':0x18eb});function respondWithResult(_0x70a9f1,_0x1bd2f4){_0x1bd2f4=_0x1bd2f4||0xc8;return function(_0x10dec9){if(_0x10dec9){return _0x70a9f1[_0x7d73('0x8')](_0x1bd2f4)[_0x7d73('0x9')](_0x10dec9);}};}function saveUpdates(_0x179cc4){return function(_0x491347){if(_0x491347){return _0x491347['update'](_0x179cc4)[_0x7d73('0xa')](function(_0x3252fc){return _0x3252fc;});}return null;};}function handleEntityNotFound(_0x5c6f19){return function(_0x1c1d21){if(!_0x1c1d21){_0x5c6f19['sendStatus'](0x194);}return _0x1c1d21;};}function handleError(_0x34704b,_0x3e2d6e){_0x3e2d6e=_0x3e2d6e||0x1f4;return function(_0x2c65ba){logger['error'](_0x2c65ba[_0x7d73('0xb')]);if(_0x2c65ba[_0x7d73('0xc')]){delete _0x2c65ba['name'];}_0x34704b[_0x7d73('0x8')](_0x3e2d6e)[_0x7d73('0xd')](_0x2c65ba);};}exports[_0x7d73('0xe')]=function(_0x41c05a,_0x492a18){if(_0x41c05a[_0x7d73('0xf')]['role']!=='admin')throw new Error(_0x7d73('0x10'));if(isNaN(Number(_0x41c05a[_0x7d73('0x11')]['id'])))throw new Error(_0x7d73('0x12'));return db['UserSetting'][_0x7d73('0x13')]({'where':{'id':_0x41c05a[_0x7d73('0x11')]['id']}})[_0x7d73('0xa')](handleEntityNotFound(_0x492a18,null))[_0x7d73('0xa')](saveUpdates(_0x41c05a[_0x7d73('0x14')],null))[_0x7d73('0xa')](respondWithResult(_0x492a18,null))[_0x7d73('0x15')](handleError(_0x492a18,null));}; \ No newline at end of file diff --git a/server/api/user-setting/user-setting.events.js b/server/api/user-setting/user-setting.events.js index 80bc9dd..685d51e 100644 --- a/server/api/user-setting/user-setting.events.js +++ b/server/api/user-setting/user-setting.events.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xb05d=['../../mysqldb','UserSetting','setMaxListeners','save','update','emit','hook','exports','events'];(function(_0x34c3f3,_0x15f139){var _0x3ca5cb=function(_0x1c7ed6){while(--_0x1c7ed6){_0x34c3f3['push'](_0x34c3f3['shift']());}};_0x3ca5cb(++_0x15f139);}(_0xb05d,0x128));var _0xdb05=function(_0x1443eb,_0x203408){_0x1443eb=_0x1443eb-0x0;var _0x2b8810=_0xb05d[_0x1443eb];return _0x2b8810;};'use strict';var EventEmitter=require(_0xdb05('0x0'));var UserSetting=require(_0xdb05('0x1'))['db'][_0xdb05('0x2')];var UserSettingEvents=new EventEmitter();UserSettingEvents[_0xdb05('0x3')](0x0);var events={'afterCreate':_0xdb05('0x4'),'afterUpdate':_0xdb05('0x5'),'afterDestroy':'remove'};function emitEvent(_0x52b74c){return function(_0x1c4b72,_0x527579,_0x4e6455){UserSettingEvents[_0xdb05('0x6')](_0x52b74c+':'+_0x1c4b72['id'],_0x1c4b72);UserSettingEvents[_0xdb05('0x6')](_0x52b74c,_0x1c4b72);_0x4e6455(null);};}for(var e in events){if(events['hasOwnProperty'](e)){var event=events[e];UserSetting[_0xdb05('0x7')](e,emitEvent(event));}}module[_0xdb05('0x8')]=UserSettingEvents; \ No newline at end of file +var _0xe7e1=['emit','hasOwnProperty','hook','exports','events','../../mysqldb','UserSetting','setMaxListeners','remove'];(function(_0x318cc9,_0x2f26f4){var _0x1a376d=function(_0x38cd16){while(--_0x38cd16){_0x318cc9['push'](_0x318cc9['shift']());}};_0x1a376d(++_0x2f26f4);}(_0xe7e1,0x175));var _0x1e7e=function(_0x9fd887,_0x47f76c){_0x9fd887=_0x9fd887-0x0;var _0x1a54ab=_0xe7e1[_0x9fd887];return _0x1a54ab;};'use strict';var EventEmitter=require(_0x1e7e('0x0'));var UserSetting=require(_0x1e7e('0x1'))['db'][_0x1e7e('0x2')];var UserSettingEvents=new EventEmitter();UserSettingEvents[_0x1e7e('0x3')](0x0);var events={'afterCreate':'save','afterUpdate':'update','afterDestroy':_0x1e7e('0x4')};function emitEvent(_0x4e579f){return function(_0x48f33c,_0x12fb51,_0x2acb40){UserSettingEvents['emit'](_0x4e579f+':'+_0x48f33c['id'],_0x48f33c);UserSettingEvents[_0x1e7e('0x5')](_0x4e579f,_0x48f33c);_0x2acb40(null);};}for(var e in events){if(events[_0x1e7e('0x6')](e)){var event=events[e];UserSetting[_0x1e7e('0x7')](e,emitEvent(event));}}module[_0x1e7e('0x8')]=UserSettingEvents; \ No newline at end of file diff --git a/server/api/user-setting/user-setting.model.js b/server/api/user-setting/user-setting.model.js index a711580..53e7f6f 100644 --- a/server/api/user-setting/user-setting.model.js +++ b/server/api/user-setting/user-setting.model.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x1491=['clientSideLoggingEnabledSince','./user-setting.attributes','exports','define','user_settings','clientSideLoggingEnabled'];(function(_0x20fd46,_0x14789f){var _0x1e1b2a=function(_0x3d73ce){while(--_0x3d73ce){_0x20fd46['push'](_0x20fd46['shift']());}};_0x1e1b2a(++_0x14789f);}(_0x1491,0x1b1));var _0x1149=function(_0x23a85f,_0x57673e){_0x23a85f=_0x23a85f-0x0;var _0x1bd2ab=_0x1491[_0x23a85f];return _0x1bd2ab;};'use strict';var attributes=require(_0x1149('0x0'));module[_0x1149('0x1')]=function(_0x2660c5){return _0x2660c5[_0x1149('0x2')]('UserSetting',attributes,{'tableName':_0x1149('0x3'),'paranoid':![],'indexes':[],'timestamps':!![],'hooks':{'beforeUpdate':function(_0x2e6865){if(!_0x2e6865[_0x1149('0x4')])_0x2e6865[_0x1149('0x5')]=null;else if(_0x2e6865[_0x1149('0x5')]===null)_0x2e6865[_0x1149('0x5')]=new Date();}}});}; \ No newline at end of file +var _0x94d2=['clientSideLoggingEnabledSince','define','UserSetting','user_settings'];(function(_0x16d411,_0x5e0970){var _0x20336d=function(_0x15d8aa){while(--_0x15d8aa){_0x16d411['push'](_0x16d411['shift']());}};_0x20336d(++_0x5e0970);}(_0x94d2,0x1cd));var _0x294d=function(_0x413aac,_0x5e2430){_0x413aac=_0x413aac-0x0;var _0x569b11=_0x94d2[_0x413aac];return _0x569b11;};'use strict';var attributes=require('./user-setting.attributes');module['exports']=function(_0x30eae3){return _0x30eae3[_0x294d('0x0')](_0x294d('0x1'),attributes,{'tableName':_0x294d('0x2'),'paranoid':![],'indexes':[],'timestamps':!![],'hooks':{'beforeUpdate':function(_0x33a820){if(!_0x33a820['clientSideLoggingEnabled'])_0x33a820['clientSideLoggingEnabledSince']=null;else if(_0x33a820[_0x294d('0x3')]===null)_0x33a820[_0x294d('0x3')]=new Date();}}});}; \ No newline at end of file diff --git a/server/api/user-setting/user-setting.socket.js b/server/api/user-setting/user-setting.socket.js index cf3f20d..47ebeae 100644 --- a/server/api/user-setting/user-setting.socket.js +++ b/server/api/user-setting/user-setting.socket.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x08c3=['save','remove','update','user-setting:update','emit','user-setting:update:user-','UserId','register','user-setting:','./user-setting.events'];(function(_0xf0bcac,_0x531755){var _0x4e4c65=function(_0x35a77a){while(--_0x35a77a){_0xf0bcac['push'](_0xf0bcac['shift']());}};_0x4e4c65(++_0x531755);}(_0x08c3,0xc7));var _0x308c=function(_0x6e51f1,_0x11371a){_0x6e51f1=_0x6e51f1-0x0;var _0x141b4c=_0x08c3[_0x6e51f1];return _0x141b4c;};'use strict';var UserSettingEvents=require(_0x308c('0x0'));var events=[_0x308c('0x1'),_0x308c('0x2'),_0x308c('0x3')];function createListener(_0xc0b6ac,_0x4f499f){return function(_0x5d75bc){_0x4f499f['emit'](_0xc0b6ac,_0x5d75bc);if(_0xc0b6ac===_0x308c('0x4')){_0x4f499f[_0x308c('0x5')](_0x308c('0x6')+_0x5d75bc[_0x308c('0x7')],_0x5d75bc);}};}exports[_0x308c('0x8')]=function(_0xd2915c){for(var _0x9686e5=0x0,_0x46f069=events['length'];_0x9686e5<_0x46f069;_0x9686e5++){var _0x29955c=events[_0x9686e5];var _0x3d3deb=createListener(_0x308c('0x9')+_0x29955c,_0xd2915c);UserSettingEvents['on'](_0x29955c,_0x3d3deb);}}; \ No newline at end of file +var _0xb2ab=['length','user-setting:','./user-setting.events','save','remove','update','emit','user-setting:update','UserId','register'];(function(_0x556634,_0x520958){var _0x4429fd=function(_0x1e7eb9){while(--_0x1e7eb9){_0x556634['push'](_0x556634['shift']());}};_0x4429fd(++_0x520958);}(_0xb2ab,0x8e));var _0xbb2a=function(_0x2eb30d,_0x53e5bf){_0x2eb30d=_0x2eb30d-0x0;var _0x189c50=_0xb2ab[_0x2eb30d];return _0x189c50;};'use strict';var UserSettingEvents=require(_0xbb2a('0x0'));var events=[_0xbb2a('0x1'),_0xbb2a('0x2'),_0xbb2a('0x3')];function createListener(_0x3f9695,_0x562a94){return function(_0x49a80b){_0x562a94[_0xbb2a('0x4')](_0x3f9695,_0x49a80b);if(_0x3f9695===_0xbb2a('0x5')){_0x562a94[_0xbb2a('0x4')]('user-setting:update:user-'+_0x49a80b[_0xbb2a('0x6')],_0x49a80b);}};}exports[_0xbb2a('0x7')]=function(_0xe36de9){for(var _0x3b263e=0x0,_0x2aa88b=events[_0xbb2a('0x8')];_0x3b263e<_0x2aa88b;_0x3b263e++){var _0x241f8c=events[_0x3b263e];var _0x52b4ac=createListener(_0xbb2a('0x9')+_0x241f8c,_0xe36de9);UserSettingEvents['on'](_0x241f8c,_0x52b4ac);}}; \ No newline at end of file diff --git a/server/api/user/index.js b/server/api/user/index.js index 19008dd..d9cd13f 100644 --- a/server/api/user/index.js +++ b/server/api/user/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xa149=['../../components/interaction/service','./user.controller','get','index','/describe','isAuthenticated','describe','/presence','getPresence','/:id','getAvatar','getContacts','/:id/queues','/:id/queues_rt','getVoiceQueuesRt','/:id/groups','getGroups','/:id/recordings','/:id/chat/interactions','getOpenchannelInteractions','/:id/mail/interactions','getMailInteractions','getSmsInteractions','/:id/fax/interactions','getFaxInteractions','/:id/whatsapp/interactions','getWhatsappInteractions','/:id/teams','/:id/lists','getLists','getAgents','/:id/prefixes','/:id/fax_accounts','getFaxAccounts','/:id/openchannel_accounts','getOpenchannelAccounts','/:id/sms_accounts','getSmsAccounts','/:id/whatsapp_accounts','getWhatsappAccounts','/:id/scheduled_calls','/:id/api_key','getApiKey','post','addContacts','/create_many','bulkCreate','addQueues','diskStorage','join','server/files/images/','%s-%s','now','/:id/avatar','single','file','addAvatar','/:id/login','/:id/logout','pause','/:id/unpause','unpause','/:id/chat_interactions','addMailInteractions','addFaxInteractions','/:id/sms_interactions','addSmsInteractions','/:id/whatsapp_interactions','addWhatsappInteractions','addFaxAccounts','/:id/mail_accounts','addMailAccounts','addOpenchannelAccounts','/:id/chat_websites','addChatWebsites','addWhatsappAccounts','createApiKey','put','update','/:id/password','changePassword','delete','removeQueues','removeTeams','destroy','removeMailInteractions','/:id/fax_interactions','removeFaxInteractions','removeWhatsappInteractions','removeFaxAccounts','removeMailAccounts','removeWhatsappAccounts','exports','multer','util','path','connect-timeout','express','Router','fs-extra','../../components/auth/service'];(function(_0x4de5d8,_0x1b4378){var _0x5bb299=function(_0x54f004){while(--_0x54f004){_0x4de5d8['push'](_0x4de5d8['shift']());}};_0x5bb299(++_0x1b4378);}(_0xa149,0x18c));var _0x9a14=function(_0x49bc42,_0x174b72){_0x49bc42=_0x49bc42-0x0;var _0x15f6ac=_0xa149[_0x49bc42];return _0x15f6ac;};'use strict';var multer=require(_0x9a14('0x0'));var util=require(_0x9a14('0x1'));var path=require(_0x9a14('0x2'));var timeout=require(_0x9a14('0x3'));var express=require(_0x9a14('0x4'));var router=express[_0x9a14('0x5')]();var fs_extra=require(_0x9a14('0x6'));var auth=require(_0x9a14('0x7'));var interaction=require(_0x9a14('0x8'));var config=require('../../config/environment');var controller=require(_0x9a14('0x9'));router[_0x9a14('0xa')]('/',auth['isAuthenticated'](),controller[_0x9a14('0xb')]);router[_0x9a14('0xa')](_0x9a14('0xc'),auth[_0x9a14('0xd')](),controller[_0x9a14('0xe')]);router[_0x9a14('0xa')]('/whoami',auth[_0x9a14('0xd')](),controller['whoami']);router[_0x9a14('0xa')](_0x9a14('0xf'),auth[_0x9a14('0xd')](),controller[_0x9a14('0x10')]);router[_0x9a14('0xa')](_0x9a14('0x11'),auth['isAuthenticated'](),controller['show']);router['get']('/:id/avatar',controller[_0x9a14('0x12')]);router[_0x9a14('0xa')]('/:id/open_tabs',auth[_0x9a14('0xd')](),controller['getOpenTabs']);router[_0x9a14('0xa')]('/:id/contacts',auth['isAuthenticated'](),controller[_0x9a14('0x13')]);router[_0x9a14('0xa')](_0x9a14('0x14'),auth[_0x9a14('0xd')](),controller['getQueues']);router[_0x9a14('0xa')](_0x9a14('0x15'),auth[_0x9a14('0xd')](),controller[_0x9a14('0x16')]);router[_0x9a14('0xa')](_0x9a14('0x17'),auth[_0x9a14('0xd')](),controller[_0x9a14('0x18')]);router[_0x9a14('0xa')](_0x9a14('0x19'),auth[_0x9a14('0xd')](),controller['getRecordings']);router['get']('/:id/screen_recordings',auth[_0x9a14('0xd')](),controller['getScreenRecordings']);router[_0x9a14('0xa')](_0x9a14('0x1a'),auth['isAuthenticated'](),controller['getChatInteractions']);router['get']('/:id/openchannel/interactions',auth[_0x9a14('0xd')](),controller[_0x9a14('0x1b')]);router[_0x9a14('0xa')](_0x9a14('0x1c'),auth[_0x9a14('0xd')](),controller[_0x9a14('0x1d')]);router[_0x9a14('0xa')]('/:id/sms/interactions',auth['isAuthenticated'](),controller[_0x9a14('0x1e')]);router[_0x9a14('0xa')](_0x9a14('0x1f'),auth['isAuthenticated'](),controller[_0x9a14('0x20')]);router[_0x9a14('0xa')](_0x9a14('0x21'),auth[_0x9a14('0xd')](),controller[_0x9a14('0x22')]);router[_0x9a14('0xa')](_0x9a14('0x23'),auth[_0x9a14('0xd')](),controller['getTeams']);router['get'](_0x9a14('0x24'),auth[_0x9a14('0xd')](),controller[_0x9a14('0x25')]);router['get']('/:id/agents',auth[_0x9a14('0xd')](),controller[_0x9a14('0x26')]);router[_0x9a14('0xa')](_0x9a14('0x27'),auth[_0x9a14('0xd')](),controller['getVoicePrefixes']);router[_0x9a14('0xa')](_0x9a14('0x28'),auth['isAuthenticated'](),controller[_0x9a14('0x29')]);router[_0x9a14('0xa')]('/:id/mail_accounts',auth[_0x9a14('0xd')](),controller['getMailAccounts']);router[_0x9a14('0xa')](_0x9a14('0x2a'),auth[_0x9a14('0xd')](),controller[_0x9a14('0x2b')]);router[_0x9a14('0xa')](_0x9a14('0x2c'),auth[_0x9a14('0xd')](),controller[_0x9a14('0x2d')]);router[_0x9a14('0xa')]('/:id/chat_websites',auth['isAuthenticated'](),controller['getChatWebsites']);router[_0x9a14('0xa')](_0x9a14('0x2e'),auth[_0x9a14('0xd')](),controller[_0x9a14('0x2f')]);router[_0x9a14('0xa')](_0x9a14('0x30'),auth[_0x9a14('0xd')](),controller['getScheduledCalls']);router[_0x9a14('0xa')](_0x9a14('0x31'),auth[_0x9a14('0xd')](),controller[_0x9a14('0x32')]);router[_0x9a14('0x33')]('/:id/contacts',auth[_0x9a14('0xd')](),controller[_0x9a14('0x34')]);router['post']('/',auth[_0x9a14('0xd')](),controller['create']);router[_0x9a14('0x33')](_0x9a14('0x35'),auth[_0x9a14('0xd')](),controller[_0x9a14('0x36')]);router[_0x9a14('0x33')](_0x9a14('0x14'),auth[_0x9a14('0xd')](),controller[_0x9a14('0x37')]);var upload=multer({'storage':multer[_0x9a14('0x38')]({'destination':function(_0x527c5c,_0x5779ca,_0x199fa1){_0x199fa1(null,path[_0x9a14('0x39')](config['root'],_0x9a14('0x3a')));},'filename':function(_0x2c0667,_0x5727fb,_0x2481db){_0x2481db(null,util['format'](_0x9a14('0x3b'),Date[_0x9a14('0x3c')](),_0x5727fb['originalname']));}})});router[_0x9a14('0x33')](_0x9a14('0x3d'),upload[_0x9a14('0x3e')](_0x9a14('0x3f')),controller[_0x9a14('0x40')]);router[_0x9a14('0x33')](_0x9a14('0x41'),auth['isAuthenticated'](),controller['login']);router[_0x9a14('0x33')](_0x9a14('0x42'),auth[_0x9a14('0xd')](),controller['logout']);router[_0x9a14('0x33')]('/:id/pause',auth['isAuthenticated'](),controller[_0x9a14('0x43')]);router[_0x9a14('0x33')](_0x9a14('0x44'),auth[_0x9a14('0xd')](),controller[_0x9a14('0x45')]);router['post'](_0x9a14('0x23'),auth[_0x9a14('0xd')](),controller['addTeams']);router[_0x9a14('0x33')](_0x9a14('0x46'),auth[_0x9a14('0xd')](),controller['addChatInteractions']);router[_0x9a14('0x33')]('/:id/mail_interactions',auth['isAuthenticated'](),controller[_0x9a14('0x47')]);router[_0x9a14('0x33')]('/:id/fax_interactions',auth[_0x9a14('0xd')](),controller[_0x9a14('0x48')]);router[_0x9a14('0x33')](_0x9a14('0x49'),auth['isAuthenticated'](),controller[_0x9a14('0x4a')]);router[_0x9a14('0x33')]('/:id/openchannel_interactions',auth[_0x9a14('0xd')](),controller['addOpenchannelInteractions']);router[_0x9a14('0x33')](_0x9a14('0x4b'),auth['isAuthenticated'](),controller[_0x9a14('0x4c')]);router[_0x9a14('0x33')](_0x9a14('0x28'),auth[_0x9a14('0xd')](),controller[_0x9a14('0x4d')]);router[_0x9a14('0x33')](_0x9a14('0x4e'),auth['isAuthenticated'](),controller[_0x9a14('0x4f')]);router[_0x9a14('0x33')](_0x9a14('0x2a'),auth['isAuthenticated'](),controller[_0x9a14('0x50')]);router[_0x9a14('0x33')](_0x9a14('0x2c'),auth['isAuthenticated'](),controller['addSmsAccounts']);router[_0x9a14('0x33')](_0x9a14('0x51'),auth[_0x9a14('0xd')](),controller[_0x9a14('0x52')]);router['post'](_0x9a14('0x2e'),auth[_0x9a14('0xd')](),controller[_0x9a14('0x53')]);router['post']('/:id/api_key',auth[_0x9a14('0xd')](),controller[_0x9a14('0x54')]);router[_0x9a14('0x55')](_0x9a14('0x11'),auth[_0x9a14('0xd')](),controller[_0x9a14('0x56')]);router['put'](_0x9a14('0x57'),auth['isAuthenticated'](),controller[_0x9a14('0x58')]);router[_0x9a14('0x59')](_0x9a14('0x14'),auth[_0x9a14('0xd')](),controller[_0x9a14('0x5a')]);router[_0x9a14('0x59')](_0x9a14('0x23'),auth[_0x9a14('0xd')](),controller[_0x9a14('0x5b')]);router[_0x9a14('0x59')](_0x9a14('0x11'),auth['isAuthenticated'](),controller[_0x9a14('0x5c')]);router[_0x9a14('0x59')](_0x9a14('0x46'),auth['isAuthenticated'](),controller['removeChatInteractions']);router[_0x9a14('0x59')]('/:id/mail_interactions',auth[_0x9a14('0xd')](),controller[_0x9a14('0x5d')]);router['delete'](_0x9a14('0x5e'),auth[_0x9a14('0xd')](),controller[_0x9a14('0x5f')]);router[_0x9a14('0x59')](_0x9a14('0x49'),auth['isAuthenticated'](),controller['removeSmsInteractions']);router[_0x9a14('0x59')]('/:id/openchannel_interactions',auth[_0x9a14('0xd')](),controller['removeOpenchannelInteractions']);router[_0x9a14('0x59')](_0x9a14('0x4b'),auth['isAuthenticated'](),controller[_0x9a14('0x60')]);router[_0x9a14('0x59')](_0x9a14('0x28'),auth[_0x9a14('0xd')](),controller[_0x9a14('0x61')]);router[_0x9a14('0x59')]('/:id/mail_accounts',auth['isAuthenticated'](),controller[_0x9a14('0x62')]);router[_0x9a14('0x59')](_0x9a14('0x2a'),auth[_0x9a14('0xd')](),controller['removeOpenchannelAccounts']);router['delete']('/:id/sms_accounts',auth['isAuthenticated'](),controller['removeSmsAccounts']);router[_0x9a14('0x59')]('/:id/chat_websites',auth[_0x9a14('0xd')](),controller['removeChatWebsites']);router[_0x9a14('0x59')]('/:id/whatsapp_accounts',auth[_0x9a14('0xd')](),controller[_0x9a14('0x63')]);router[_0x9a14('0x59')](_0x9a14('0x31'),auth[_0x9a14('0xd')](),controller['removeApiKey']);module[_0x9a14('0x64')]=router; \ No newline at end of file +var _0xed7a=['server/files/images/','%s-%s','now','originalname','/:id/avatar','file','login','/:id/logout','logout','/:id/pause','pause','/:id/unpause','unpause','addTeams','/:id/chat_interactions','addChatInteractions','/:id/mail_interactions','addMailInteractions','/:id/fax_interactions','addFaxInteractions','/:id/sms_interactions','addSmsInteractions','/:id/openchannel_interactions','addOpenchannelInteractions','/:id/whatsapp_interactions','/:id/fax_accounts','addMailAccounts','addOpenchannelAccounts','addSmsAccounts','addChatWebsites','addWhatsappAccounts','createApiKey','put','update','/:id/password','delete','removeQueues','removeTeams','removeChatInteractions','removeMailInteractions','removeSmsInteractions','removeOpenchannelInteractions','removeWhatsappInteractions','removeFaxAccounts','removeMailAccounts','removeOpenchannelAccounts','/:id/sms_accounts','removeSmsAccounts','/:id/api_key','exports','multer','util','connect-timeout','express','Router','fs-extra','../../components/auth/service','../../config/environment','./user.controller','get','index','isAuthenticated','/whoami','whoami','/presence','/:id','getOpenTabs','/:id/contacts','getContacts','getQueues','getVoiceQueuesRt','/:id/groups','getGroups','/:id/recordings','getRecordings','/:id/screen_recordings','getScreenRecordings','/:id/chat/interactions','/:id/openchannel/interactions','/:id/mail/interactions','getMailInteractions','/:id/sms/interactions','getSmsInteractions','/:id/fax/interactions','getFaxInteractions','/:id/whatsapp/interactions','getWhatsappInteractions','/:id/teams','getLists','getAgents','getFaxAccounts','/:id/mail_accounts','/:id/openchannel_accounts','getOpenchannelAccounts','getSmsAccounts','/:id/chat_websites','getChatWebsites','/:id/whatsapp_accounts','/:id/scheduled_calls','getScheduledCalls','getApiKey','post','/create_many','bulkCreate','/:id/queues','addQueues','diskStorage','join','root'];(function(_0x128ca2,_0x338033){var _0x565ef5=function(_0x4f970b){while(--_0x4f970b){_0x128ca2['push'](_0x128ca2['shift']());}};_0x565ef5(++_0x338033);}(_0xed7a,0x9f));var _0xaed7=function(_0x37a97e,_0x54f926){_0x37a97e=_0x37a97e-0x0;var _0x406099=_0xed7a[_0x37a97e];return _0x406099;};'use strict';var multer=require(_0xaed7('0x0'));var util=require(_0xaed7('0x1'));var path=require('path');var timeout=require(_0xaed7('0x2'));var express=require(_0xaed7('0x3'));var router=express[_0xaed7('0x4')]();var fs_extra=require(_0xaed7('0x5'));var auth=require(_0xaed7('0x6'));var interaction=require('../../components/interaction/service');var config=require(_0xaed7('0x7'));var controller=require(_0xaed7('0x8'));router[_0xaed7('0x9')]('/',auth['isAuthenticated'](),controller[_0xaed7('0xa')]);router[_0xaed7('0x9')]('/describe',auth[_0xaed7('0xb')](),controller['describe']);router['get'](_0xaed7('0xc'),auth[_0xaed7('0xb')](),controller[_0xaed7('0xd')]);router[_0xaed7('0x9')](_0xaed7('0xe'),auth[_0xaed7('0xb')](),controller['getPresence']);router[_0xaed7('0x9')](_0xaed7('0xf'),auth[_0xaed7('0xb')](),controller['show']);router[_0xaed7('0x9')]('/:id/avatar',controller['getAvatar']);router[_0xaed7('0x9')]('/:id/open_tabs',auth['isAuthenticated'](),controller[_0xaed7('0x10')]);router[_0xaed7('0x9')](_0xaed7('0x11'),auth[_0xaed7('0xb')](),controller[_0xaed7('0x12')]);router[_0xaed7('0x9')]('/:id/queues',auth[_0xaed7('0xb')](),controller[_0xaed7('0x13')]);router[_0xaed7('0x9')]('/:id/queues_rt',auth[_0xaed7('0xb')](),controller[_0xaed7('0x14')]);router[_0xaed7('0x9')](_0xaed7('0x15'),auth[_0xaed7('0xb')](),controller[_0xaed7('0x16')]);router['get'](_0xaed7('0x17'),auth[_0xaed7('0xb')](),controller[_0xaed7('0x18')]);router[_0xaed7('0x9')](_0xaed7('0x19'),auth[_0xaed7('0xb')](),controller[_0xaed7('0x1a')]);router[_0xaed7('0x9')](_0xaed7('0x1b'),auth[_0xaed7('0xb')](),controller['getChatInteractions']);router[_0xaed7('0x9')](_0xaed7('0x1c'),auth[_0xaed7('0xb')](),controller['getOpenchannelInteractions']);router[_0xaed7('0x9')](_0xaed7('0x1d'),auth[_0xaed7('0xb')](),controller[_0xaed7('0x1e')]);router[_0xaed7('0x9')](_0xaed7('0x1f'),auth[_0xaed7('0xb')](),controller[_0xaed7('0x20')]);router[_0xaed7('0x9')](_0xaed7('0x21'),auth[_0xaed7('0xb')](),controller[_0xaed7('0x22')]);router[_0xaed7('0x9')](_0xaed7('0x23'),auth[_0xaed7('0xb')](),controller[_0xaed7('0x24')]);router[_0xaed7('0x9')](_0xaed7('0x25'),auth[_0xaed7('0xb')](),controller['getTeams']);router['get']('/:id/lists',auth[_0xaed7('0xb')](),controller[_0xaed7('0x26')]);router[_0xaed7('0x9')]('/:id/agents',auth[_0xaed7('0xb')](),controller[_0xaed7('0x27')]);router['get']('/:id/prefixes',auth['isAuthenticated'](),controller['getVoicePrefixes']);router[_0xaed7('0x9')]('/:id/fax_accounts',auth[_0xaed7('0xb')](),controller[_0xaed7('0x28')]);router[_0xaed7('0x9')](_0xaed7('0x29'),auth[_0xaed7('0xb')](),controller['getMailAccounts']);router['get'](_0xaed7('0x2a'),auth[_0xaed7('0xb')](),controller[_0xaed7('0x2b')]);router[_0xaed7('0x9')]('/:id/sms_accounts',auth[_0xaed7('0xb')](),controller[_0xaed7('0x2c')]);router[_0xaed7('0x9')](_0xaed7('0x2d'),auth['isAuthenticated'](),controller[_0xaed7('0x2e')]);router[_0xaed7('0x9')](_0xaed7('0x2f'),auth[_0xaed7('0xb')](),controller['getWhatsappAccounts']);router['get'](_0xaed7('0x30'),auth[_0xaed7('0xb')](),controller[_0xaed7('0x31')]);router[_0xaed7('0x9')]('/:id/api_key',auth['isAuthenticated'](),controller[_0xaed7('0x32')]);router['post'](_0xaed7('0x11'),auth[_0xaed7('0xb')](),controller['addContacts']);router['post']('/',auth[_0xaed7('0xb')](),controller['create']);router[_0xaed7('0x33')](_0xaed7('0x34'),auth[_0xaed7('0xb')](),controller[_0xaed7('0x35')]);router[_0xaed7('0x33')](_0xaed7('0x36'),auth['isAuthenticated'](),controller[_0xaed7('0x37')]);var upload=multer({'storage':multer[_0xaed7('0x38')]({'destination':function(_0x4ab955,_0x18b874,_0xb5fc52){_0xb5fc52(null,path[_0xaed7('0x39')](config[_0xaed7('0x3a')],_0xaed7('0x3b')));},'filename':function(_0x3e2060,_0x2f02e0,_0x592a80){_0x592a80(null,util['format'](_0xaed7('0x3c'),Date[_0xaed7('0x3d')](),_0x2f02e0[_0xaed7('0x3e')]));}})});router[_0xaed7('0x33')](_0xaed7('0x3f'),upload['single'](_0xaed7('0x40')),controller['addAvatar']);router['post']('/:id/login',auth[_0xaed7('0xb')](),controller[_0xaed7('0x41')]);router['post'](_0xaed7('0x42'),auth[_0xaed7('0xb')](),controller[_0xaed7('0x43')]);router[_0xaed7('0x33')](_0xaed7('0x44'),auth[_0xaed7('0xb')](),controller[_0xaed7('0x45')]);router[_0xaed7('0x33')](_0xaed7('0x46'),auth[_0xaed7('0xb')](),controller[_0xaed7('0x47')]);router['post'](_0xaed7('0x25'),auth[_0xaed7('0xb')](),controller[_0xaed7('0x48')]);router['post'](_0xaed7('0x49'),auth[_0xaed7('0xb')](),controller[_0xaed7('0x4a')]);router[_0xaed7('0x33')](_0xaed7('0x4b'),auth[_0xaed7('0xb')](),controller[_0xaed7('0x4c')]);router[_0xaed7('0x33')](_0xaed7('0x4d'),auth[_0xaed7('0xb')](),controller[_0xaed7('0x4e')]);router[_0xaed7('0x33')](_0xaed7('0x4f'),auth[_0xaed7('0xb')](),controller[_0xaed7('0x50')]);router[_0xaed7('0x33')](_0xaed7('0x51'),auth[_0xaed7('0xb')](),controller[_0xaed7('0x52')]);router[_0xaed7('0x33')](_0xaed7('0x53'),auth[_0xaed7('0xb')](),controller['addWhatsappInteractions']);router['post'](_0xaed7('0x54'),auth['isAuthenticated'](),controller['addFaxAccounts']);router[_0xaed7('0x33')](_0xaed7('0x29'),auth[_0xaed7('0xb')](),controller[_0xaed7('0x55')]);router[_0xaed7('0x33')]('/:id/openchannel_accounts',auth[_0xaed7('0xb')](),controller[_0xaed7('0x56')]);router[_0xaed7('0x33')]('/:id/sms_accounts',auth[_0xaed7('0xb')](),controller[_0xaed7('0x57')]);router[_0xaed7('0x33')](_0xaed7('0x2d'),auth[_0xaed7('0xb')](),controller[_0xaed7('0x58')]);router[_0xaed7('0x33')](_0xaed7('0x2f'),auth[_0xaed7('0xb')](),controller[_0xaed7('0x59')]);router[_0xaed7('0x33')]('/:id/api_key',auth[_0xaed7('0xb')](),controller[_0xaed7('0x5a')]);router[_0xaed7('0x5b')]('/:id',auth['isAuthenticated'](),controller[_0xaed7('0x5c')]);router[_0xaed7('0x5b')](_0xaed7('0x5d'),auth[_0xaed7('0xb')](),controller['changePassword']);router[_0xaed7('0x5e')](_0xaed7('0x36'),auth[_0xaed7('0xb')](),controller[_0xaed7('0x5f')]);router[_0xaed7('0x5e')](_0xaed7('0x25'),auth[_0xaed7('0xb')](),controller[_0xaed7('0x60')]);router[_0xaed7('0x5e')](_0xaed7('0xf'),auth[_0xaed7('0xb')](),controller['destroy']);router[_0xaed7('0x5e')]('/:id/chat_interactions',auth[_0xaed7('0xb')](),controller[_0xaed7('0x61')]);router['delete']('/:id/mail_interactions',auth['isAuthenticated'](),controller[_0xaed7('0x62')]);router[_0xaed7('0x5e')]('/:id/fax_interactions',auth[_0xaed7('0xb')](),controller['removeFaxInteractions']);router[_0xaed7('0x5e')]('/:id/sms_interactions',auth[_0xaed7('0xb')](),controller[_0xaed7('0x63')]);router['delete'](_0xaed7('0x51'),auth['isAuthenticated'](),controller[_0xaed7('0x64')]);router[_0xaed7('0x5e')]('/:id/whatsapp_interactions',auth[_0xaed7('0xb')](),controller[_0xaed7('0x65')]);router[_0xaed7('0x5e')](_0xaed7('0x54'),auth[_0xaed7('0xb')](),controller[_0xaed7('0x66')]);router['delete'](_0xaed7('0x29'),auth[_0xaed7('0xb')](),controller[_0xaed7('0x67')]);router['delete'](_0xaed7('0x2a'),auth['isAuthenticated'](),controller[_0xaed7('0x68')]);router[_0xaed7('0x5e')](_0xaed7('0x69'),auth[_0xaed7('0xb')](),controller[_0xaed7('0x6a')]);router[_0xaed7('0x5e')](_0xaed7('0x2d'),auth['isAuthenticated'](),controller['removeChatWebsites']);router[_0xaed7('0x5e')]('/:id/whatsapp_accounts',auth[_0xaed7('0xb')](),controller['removeWhatsappAccounts']);router[_0xaed7('0x5e')](_0xaed7('0x6b'),auth[_0xaed7('0xb')](),controller['removeApiKey']);module[_0xaed7('0x6c')]=router; \ No newline at end of file diff --git a/server/api/user/user.attributes.js b/server/api/user/user.attributes.js index 2b246ee..9b8abcc 100644 --- a/server/api/user/user.attributes.js +++ b/server/api/user/user.attributes.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x9c44=['get','udp','encryption','avpf','force_avp','icesupport','dtlscertfile','dtlsprivatekey','wss','dtlsenable','dtlsverify','dtlssetup','actpass','/etc/pki/tls/certs/motion.crt','rtcp_mux','permissions','phoneBarEnableScreenRecordingByAgent','string','false','screenrecording','blocked','loginAttempts','blockedAt','UNSIGNED','util','lodash','exports','STRING','name','setDataValue','The\x20name\x20of\x20the\x20user','fullname','callerid','format','\x22%s\x22\x20<%s>','getDataValue','email','admin','user','telephone','local','INTEGER','internal','accountcode','DATE','BOOLEAN','DEFAULT\x20PAUSE','dynamic','ENUM','friend','peer','from-sip','ALLOWED_NOT_SCREENED','ALLOWED_PASSED_SCREEN','ALLOWED_FAILED_SCREEN','ALLOWED','PROHIB_NOT_SCREENED','PROHIB_PASSED_SCREEN','transport','join','split','String\x20is\x20deprecated.\x20Please\x20use\x20an\x20Array\x20as\x20[\x22udp\x22,\x20\x22tcp\x22]','info','shortinfo','inband','yes','nonat','update','outgoing','force_rport,comedia','nat','all','ulaw;alaw;gsm','allow','String\x20is\x20deprecated.\x20Please\x20use\x20an\x20Array\x20as\x20[\x22ulaw\x22,\x20\x22alaw\x22,\x20\x22gsm\x22]','insecure','String\x20is\x20deprecated.\x20Please\x20use\x20an\x20Array\x20as\x20[\x22port\x22,\x20\x22invite\x22]','\x22\x22\x20<>','accept','refuse','originate','uac','uas','fingerprint','certificate','active','update,nonat','TEXT'];(function(_0x1928c9,_0x13a6d1){var _0x51b5fb=function(_0x24cf70){while(--_0x24cf70){_0x1928c9['push'](_0x1928c9['shift']());}};_0x51b5fb(++_0x13a6d1);}(_0x9c44,0x178));var _0x49c4=function(_0x32f7d7,_0x54231b){_0x32f7d7=_0x32f7d7-0x0;var _0x133d09=_0x9c44[_0x32f7d7];return _0x133d09;};'use strict';var Sequelize=require('sequelize');var moment=require('moment');var util=require(_0x49c4('0x0'));var _=require(_0x49c4('0x1'));module[_0x49c4('0x2')]={'name':{'type':Sequelize[_0x49c4('0x3')],'allowNull':![],'unique':_0x49c4('0x4'),'validate':{'notEmpty':!![],'is':/^[A-Za-z0-9\.\_]+$/i},'set':function(_0x2ad237){this['setDataValue']('name',_0x2ad237);this[_0x49c4('0x5')]('defaultuser',_0x2ad237);},'comment':_0x49c4('0x6')},'fullname':{'type':Sequelize[_0x49c4('0x3')],'allowNull':![],'set':function(_0x69bc41){this[_0x49c4('0x5')](_0x49c4('0x7'),_0x69bc41);this['setDataValue'](_0x49c4('0x8'),util[_0x49c4('0x9')](_0x49c4('0xa'),_0x69bc41,this[_0x49c4('0xb')]('internal')));}},'alias':{'type':Sequelize['STRING']},'email':{'type':Sequelize[_0x49c4('0x3')],'allowNull':![],'unique':_0x49c4('0xc'),'validate':{'isEmail':!![]},'set':function(_0x58cad7){if(_0x58cad7){this[_0x49c4('0x5')](_0x49c4('0xc'),_0x58cad7['toLowerCase']());}}},'role':{'type':Sequelize['ENUM'](_0x49c4('0xd'),_0x49c4('0xe'),'agent',_0x49c4('0xf')),'allowNull':![]},'password':{'type':Sequelize[_0x49c4('0x3')],'allowNull':![],'validate':{'notEmpty':!![]}},'provider':{'type':Sequelize['STRING'],'defaultValue':_0x49c4('0x10')},'internal':{'type':Sequelize[_0x49c4('0x11')](0xb),'allowNull':![],'unique':_0x49c4('0x12'),'set':function(_0x2decee){this[_0x49c4('0x5')](_0x49c4('0x12'),_0x2decee);this[_0x49c4('0x5')](_0x49c4('0x13'),_0x2decee);this['setDataValue'](_0x49c4('0x8'),util[_0x49c4('0x9')](_0x49c4('0xa'),this[_0x49c4('0xb')](_0x49c4('0x7')),_0x2decee));}},'salt':{'type':Sequelize['STRING']},'phone':{'type':Sequelize[_0x49c4('0x3')]},'mobile':{'type':Sequelize[_0x49c4('0x3')]},'address':{'type':Sequelize['STRING']},'zipcode':{'type':Sequelize['STRING']},'userpic':{'type':Sequelize[_0x49c4('0x3')]},'city':{'type':Sequelize[_0x49c4('0x3')]},'country':{'type':Sequelize[_0x49c4('0x3')]},'online':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'lastLoginAt':{'type':Sequelize[_0x49c4('0x14')]},'voicePause':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'chatPause':{'type':Sequelize[_0x49c4('0x15')],'defaultValue':![]},'mailPause':{'type':Sequelize[_0x49c4('0x15')],'defaultValue':![]},'faxPause':{'type':Sequelize[_0x49c4('0x15')],'defaultValue':![]},'smsPause':{'type':Sequelize[_0x49c4('0x15')],'defaultValue':![]},'whatsappPause':{'type':Sequelize[_0x49c4('0x15')],'defaultValue':![]},'openchannelPause':{'type':Sequelize[_0x49c4('0x15')],'defaultValue':![]},'pauseType':{'type':Sequelize[_0x49c4('0x3')],'defaultValue':_0x49c4('0x16')},'lastPauseAt':{'type':Sequelize[_0x49c4('0x14')]},'chatCapacity':{'type':Sequelize['INTEGER'],'defaultValue':0x0},'mailCapacity':{'type':Sequelize['INTEGER'],'defaultValue':0x0},'faxCapacity':{'type':Sequelize['INTEGER'],'defaultValue':0x0},'smsCapacity':{'type':Sequelize[_0x49c4('0x11')],'defaultValue':0x0},'whatsappCapacity':{'type':Sequelize['INTEGER'],'defaultValue':0x0},'openchannelCapacity':{'type':Sequelize['INTEGER'],'defaultValue':0x0},'phoneBarAutoAnswer':{'type':Sequelize[_0x49c4('0x15')],'defaultValue':![]},'phoneBarEnableSettings':{'type':Sequelize[_0x49c4('0x15')],'defaultValue':!![]},'phoneBarListenPort':{'type':Sequelize[_0x49c4('0x11')](0x5),'defaultValue':0x1428},'phoneBarExpires':{'type':Sequelize[_0x49c4('0x11')](0x5),'defaultValue':0x78},'phoneBarRemoteControl':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'phoneBarRemoteControlPort':{'type':Sequelize['INTEGER'],'defaultValue':0x26a0},'phoneBarEnableRecording':{'type':Sequelize[_0x49c4('0x15')],'defaultValue':![]},'phoneBarRingInUse':{'type':Sequelize[_0x49c4('0x15')],'defaultValue':![]},'chanspy':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'description':{'type':Sequelize[_0x49c4('0x3')],'allowNull':!![]},'host':{'type':Sequelize[_0x49c4('0x3')],'allowNull':!![],'defaultValue':_0x49c4('0x17')},'ipaddr':{'type':Sequelize[_0x49c4('0x3')],'allowNull':!![]},'port':{'type':Sequelize['INTEGER'](0x5),'allowNull':!![]},'regseconds':{'type':Sequelize['INTEGER'](0xb),'allowNull':!![]},'fullcontact':{'type':Sequelize[_0x49c4('0x3')],'allowNull':!![]},'regserver':{'type':Sequelize['STRING'],'allowNull':!![]},'useragent':{'type':Sequelize[_0x49c4('0x3')],'allowNull':!![]},'lastms':{'type':Sequelize[_0x49c4('0x11')](0xb),'allowNull':!![]},'type':{'type':Sequelize[_0x49c4('0x18')](_0x49c4('0x19'),'user',_0x49c4('0x1a')),'allowNull':!![],'defaultValue':_0x49c4('0x19')},'context':{'type':Sequelize[_0x49c4('0x3')],'allowNull':!![],'defaultValue':_0x49c4('0x1b')},'callingpres':{'type':Sequelize[_0x49c4('0x18')](_0x49c4('0x1c'),_0x49c4('0x1d'),_0x49c4('0x1e'),_0x49c4('0x1f'),_0x49c4('0x20'),_0x49c4('0x21'),'PROHIB_FAILED_SCREEN','PROHIB'),'allowNull':!![]},'deny':{'type':Sequelize['STRING'],'allowNull':!![]},'permit':{'type':Sequelize[_0x49c4('0x3')],'allowNull':!![]},'secret':{'type':Sequelize[_0x49c4('0x3')],'allowNull':!![]},'md5secret':{'type':Sequelize[_0x49c4('0x3')],'allowNull':!![]},'remotesecret':{'type':Sequelize[_0x49c4('0x3')],'allowNull':!![]},'transport':{'type':Sequelize[_0x49c4('0x3')],'allowNull':!![],'defaultValue':'udp','set':function(_0x38ad77){this[_0x49c4('0x5')](_0x49c4('0x22'),_0x38ad77?_0x38ad77[_0x49c4('0x23')](','):null);},'get':function(){return this['getDataValue']('transport')?this[_0x49c4('0xb')](_0x49c4('0x22'))[_0x49c4('0x24')](','):null;},'comment':_0x49c4('0x25')},'dtmfmode':{'type':Sequelize[_0x49c4('0x18')]('rfc2833',_0x49c4('0x26'),_0x49c4('0x27'),_0x49c4('0x28'),'auto'),'allowNull':!![],'defaultValue':'rfc2833'},'directmedia':{'type':Sequelize[_0x49c4('0x18')](_0x49c4('0x29'),'no',_0x49c4('0x2a'),_0x49c4('0x2b'),_0x49c4('0x2c')),'allowNull':!![],'defaultValue':'no'},'directrtpsetup':{'type':Sequelize[_0x49c4('0x18')](_0x49c4('0x29'),'no'),'allowNull':!![],'defaultValue':'no'},'directmediapermit':{'type':Sequelize[_0x49c4('0x3')],'allowNull':!![]},'directmediadeny':{'type':Sequelize[_0x49c4('0x3')],'allowNull':!![]},'nat':{'type':Sequelize['STRING'],'allowNull':!![],'defaultValue':_0x49c4('0x2d'),'set':function(_0x5b96df){this[_0x49c4('0x5')](_0x49c4('0x2e'),_0x5b96df?_0x5b96df[_0x49c4('0x23')](','):null);},'get':function(){return this[_0x49c4('0xb')]('nat')?this[_0x49c4('0xb')](_0x49c4('0x2e'))[_0x49c4('0x24')](','):null;},'comment':'String\x20is\x20deprecated.\x20Please\x20use\x20an\x20Array\x20as\x20[\x22force_rport\x22,\x20\x22comedia\x22]'},'callgroup':{'type':Sequelize[_0x49c4('0x3')]},'namedcallgroup':{'type':Sequelize[_0x49c4('0x3')]},'pickupgroup':{'type':Sequelize[_0x49c4('0x3')]},'namedpickupgroup':{'type':Sequelize[_0x49c4('0x3')]},'language':{'type':Sequelize[_0x49c4('0x3')],'defaultValue':'en'},'tonezone':{'type':Sequelize[_0x49c4('0x3')]},'disallow':{'type':Sequelize[_0x49c4('0x3')],'allowNull':![],'defaultValue':_0x49c4('0x2f')},'allow':{'type':Sequelize[_0x49c4('0x3')],'allowNull':![],'defaultValue':_0x49c4('0x30'),'set':function(_0x1e506a){this['setDataValue'](_0x49c4('0x31'),_0x1e506a?_0x1e506a[_0x49c4('0x23')](';'):_0x49c4('0x30'));},'get':function(){return this[_0x49c4('0xb')](_0x49c4('0x31'))?this[_0x49c4('0xb')](_0x49c4('0x31'))[_0x49c4('0x24')](';'):null;},'comment':_0x49c4('0x32')},'autoframing':{'type':Sequelize[_0x49c4('0x18')](_0x49c4('0x29'),'no'),'allowNull':!![]},'insecure':{'type':Sequelize[_0x49c4('0x3')],'allowNull':!![],'set':function(_0x326142){this['setDataValue'](_0x49c4('0x33'),_0x326142?_0x326142['join'](','):null);},'get':function(){return this[_0x49c4('0xb')](_0x49c4('0x33'))?this[_0x49c4('0xb')](_0x49c4('0x33'))[_0x49c4('0x24')](','):null;},'comment':_0x49c4('0x34')},'trustrpid':{'type':Sequelize['ENUM']('yes','no'),'allowNull':!![],'defaultValue':'no'},'trust_id_outbound':{'type':Sequelize[_0x49c4('0x18')](_0x49c4('0x29'),'no'),'allowNull':!![],'defaultValue':'no'},'progressinband':{'type':Sequelize[_0x49c4('0x18')](_0x49c4('0x29'),'no','never'),'allowNull':!![]},'promiscredir':{'type':Sequelize[_0x49c4('0x18')](_0x49c4('0x29'),'no'),'allowNull':!![]},'useclientcode':{'type':Sequelize[_0x49c4('0x18')](_0x49c4('0x29'),'no'),'allowNull':!![]},'accountcode':{'type':Sequelize[_0x49c4('0x11')](0xb),'allowNull':!![]},'setvar':{'type':Sequelize[_0x49c4('0x3')],'allowNull':!![]},'callerid':{'type':Sequelize[_0x49c4('0x3')],'allowNull':!![],'defaultValue':_0x49c4('0x35')},'amaflags':{'type':Sequelize[_0x49c4('0x3')],'allowNull':!![]},'callcounter':{'type':Sequelize['ENUM'](_0x49c4('0x29'),'no'),'allowNull':!![],'defaultValue':'yes'},'busylevel':{'type':Sequelize[_0x49c4('0x11')](0xb),'allowNull':!![]},'allowoverlap':{'type':Sequelize[_0x49c4('0x18')](_0x49c4('0x29'),'no'),'allowNull':!![]},'allowsubscribe':{'type':Sequelize[_0x49c4('0x18')](_0x49c4('0x29'),'no'),'allowNull':!![]},'allowtransfer':{'type':Sequelize['ENUM'](_0x49c4('0x29'),'no'),'allowNull':!![]},'ignoresdpversion':{'type':Sequelize[_0x49c4('0x18')](_0x49c4('0x29'),'no'),'allowNull':!![]},'subscribecontext':{'type':Sequelize[_0x49c4('0x3')],'allowNull':!![]},'template':{'type':Sequelize[_0x49c4('0x3')],'allowNull':!![]},'videosupport':{'type':Sequelize[_0x49c4('0x18')](_0x49c4('0x29'),'no','always'),'allowNull':!![],'defaultValue':'no'},'maxcallbitrate':{'type':Sequelize[_0x49c4('0x11')](0xb),'allowNull':!![]},'rfc2833compensate':{'type':Sequelize['ENUM'](_0x49c4('0x29'),'no'),'allowNull':!![]},'mailbox':{'type':Sequelize[_0x49c4('0x3')],'allowNull':!![]},'session_timers':{'type':Sequelize[_0x49c4('0x18')](_0x49c4('0x36'),_0x49c4('0x37'),_0x49c4('0x38')),'allowNull':!![]},'session_expires':{'type':Sequelize[_0x49c4('0x11')](0xb),'allowNull':!![]},'session_minse':{'type':Sequelize['INTEGER'](0xb),'allowNull':!![]},'session_refresher':{'type':Sequelize[_0x49c4('0x18')](_0x49c4('0x39'),'uas'),'allowNull':!![],'defaultValue':_0x49c4('0x3a')},'t38pt_usertpsource':{'type':Sequelize[_0x49c4('0x3')],'allowNull':!![]},'regexten':{'type':Sequelize[_0x49c4('0x3')],'allowNull':!![]},'fromdomain':{'type':Sequelize[_0x49c4('0x3')],'allowNull':!![]},'fromuser':{'type':Sequelize['STRING'],'allowNull':!![]},'qualify':{'type':Sequelize['ENUM'](_0x49c4('0x29'),'no'),'allowNull':!![],'defaultValue':'yes'},'keepalive':{'type':Sequelize[_0x49c4('0x11')](0xb),'allowNull':!![]},'defaultip':{'type':Sequelize[_0x49c4('0x3')],'allowNull':!![]},'defaultuser':{'type':Sequelize[_0x49c4('0x3')],'allowNull':!![]},'rtptimeout':{'type':Sequelize[_0x49c4('0x11')](0xb),'allowNull':!![]},'rtpholdtimeout':{'type':Sequelize[_0x49c4('0x11')](0xb),'allowNull':!![]},'rtpkeepalive':{'type':Sequelize[_0x49c4('0x11')](0xb),'allowNull':!![]},'sendrpid':{'type':Sequelize[_0x49c4('0x18')]('yes','no'),'allowNull':!![],'defaultValue':'no'},'outboundproxy':{'type':Sequelize[_0x49c4('0x3')],'allowNull':!![]},'callbackextension':{'type':Sequelize[_0x49c4('0x3')],'allowNull':!![]},'timert1':{'type':Sequelize[_0x49c4('0x11')](0xb),'allowNull':!![]},'timerb':{'type':Sequelize[_0x49c4('0x11')](0xb),'allowNull':!![]},'qualifyfreq':{'type':Sequelize[_0x49c4('0x11')](0xb),'allowNull':!![]},'contactpermit':{'type':Sequelize[_0x49c4('0x3')],'allowNull':!![]},'contactdeny':{'type':Sequelize[_0x49c4('0x3')],'allowNull':!![]},'contactacl':{'type':Sequelize[_0x49c4('0x3')],'allowNull':!![]},'unsolicited_mailbox':{'type':Sequelize[_0x49c4('0x3')],'allowNull':!![]},'use_q850_reason':{'type':Sequelize[_0x49c4('0x3')],'allowNull':!![]},'maxforwards':{'type':Sequelize['INTEGER'](0xb),'allowNull':!![]},'encryption':{'type':Sequelize['ENUM'](_0x49c4('0x29'),'no'),'allowNull':!![],'defaultValue':'no'},'avpf':{'type':Sequelize[_0x49c4('0x18')]('yes','no'),'allowNull':!![]},'force_avp':{'type':Sequelize['ENUM'](_0x49c4('0x29'),'no'),'allowNull':!![]},'icesupport':{'type':Sequelize['ENUM']('yes','no'),'allowNull':!![]},'dtlsenable':{'type':Sequelize[_0x49c4('0x18')](_0x49c4('0x29'),'no'),'allowNull':!![]},'dtlsverify':{'type':Sequelize[_0x49c4('0x18')](_0x49c4('0x29'),'no',_0x49c4('0x3b'),_0x49c4('0x3c')),'allowNull':!![]},'dtlsrekey':{'type':Sequelize[_0x49c4('0x11')](0xb),'allowNull':!![]},'dtlscertfile':{'type':Sequelize['STRING'],'allowNull':!![]},'dtlsprivatekey':{'type':Sequelize[_0x49c4('0x3')],'allowNull':!![]},'dtlscipher':{'type':Sequelize[_0x49c4('0x3')],'allowNull':!![]},'dtlscafile':{'type':Sequelize[_0x49c4('0x3')],'allowNull':!![]},'dtlscapath':{'type':Sequelize[_0x49c4('0x3')],'allowNull':!![]},'dtlssetup':{'type':Sequelize[_0x49c4('0x18')](_0x49c4('0x3d'),'passive','actpass'),'allowNull':!![]},'dtlsfingerprint':{'type':Sequelize[_0x49c4('0x3')],'allowNull':!![]},'usereqphone':{'type':Sequelize[_0x49c4('0x18')](_0x49c4('0x29'),'no'),'allowNull':!![],'defaultValue':'no'},'recordonfeature':{'type':Sequelize[_0x49c4('0x3')],'allowNull':!![]},'recordofffeature':{'type':Sequelize[_0x49c4('0x3')],'allowNull':!![]},'call_limit':{'type':Sequelize[_0x49c4('0x11')](0xb),'allowNull':!![],'defaultValue':0xa},'registertrying':{'type':Sequelize[_0x49c4('0x18')]('yes','no'),'allowNull':!![]},'subscribemwi':{'type':Sequelize[_0x49c4('0x18')](_0x49c4('0x29'),'no'),'allowNull':!![]},'vmexten':{'type':Sequelize['STRING'],'allowNull':!![]},'mohinterpret':{'type':Sequelize[_0x49c4('0x3')],'allowNull':!![]},'mohsuggest':{'type':Sequelize['STRING'],'allowNull':!![]},'parkinglot':{'type':Sequelize[_0x49c4('0x3')],'allowNull':!![]},'canreinvite':{'type':Sequelize[_0x49c4('0x18')](_0x49c4('0x29'),'no',_0x49c4('0x2a'),_0x49c4('0x2b'),_0x49c4('0x3e')),'allowNull':!![],'defaultValue':'no'},'loginInPause':{'type':Sequelize[_0x49c4('0x15')],'defaultValue':![]},'resetPasswordToken':{'type':Sequelize[_0x49c4('0x3')]},'resetPasswordExpires':{'type':Sequelize['DATE']},'passwordResetAt':{'type':Sequelize[_0x49c4('0x14')],'defaultValue':null},'previousPasswords':{'type':Sequelize[_0x49c4('0x3f')]},'showWebBar':{'type':Sequelize['INTEGER'],'defaultValue':0x0,'set':function(_0x10dec7){this[_0x49c4('0x5')]('showWebBar',_0x10dec7);var _0x39c455=this[_0x49c4('0x40')]({'plain':!![]});switch(_0x10dec7){case 0x0:case 0x1:var _0x4f50bf=_0x39c455['transport']?_['isArray'](_0x39c455['transport'])?_0x39c455[_0x49c4('0x22')]['join']():_0x39c455[_0x49c4('0x22')]:_0x49c4('0x41');if(_0x4f50bf==='wss'){_0x4f50bf=_0x49c4('0x41');}this[_0x49c4('0x5')]('transport',_0x4f50bf);this[_0x49c4('0x5')](_0x49c4('0x42'),'no');this[_0x49c4('0x5')](_0x49c4('0x43'),null);this['setDataValue'](_0x49c4('0x44'),null);this[_0x49c4('0x5')](_0x49c4('0x45'),null);this[_0x49c4('0x5')]('dtlsenable',null);this[_0x49c4('0x5')]('dtlsverify',null);this['setDataValue']('dtlssetup',null);this['setDataValue'](_0x49c4('0x46'),null);this[_0x49c4('0x5')](_0x49c4('0x47'),null);this[_0x49c4('0x5')]('rtcp_mux','no');break;case 0x2:this['setDataValue'](_0x49c4('0x22'),_0x49c4('0x48'));this[_0x49c4('0x5')](_0x49c4('0x42'),_0x49c4('0x29'));this[_0x49c4('0x5')](_0x49c4('0x43'),_0x49c4('0x29'));this['setDataValue'](_0x49c4('0x44'),'yes');this[_0x49c4('0x5')](_0x49c4('0x45'),_0x49c4('0x29'));this[_0x49c4('0x5')](_0x49c4('0x49'),_0x49c4('0x29'));this[_0x49c4('0x5')](_0x49c4('0x4a'),'no');this[_0x49c4('0x5')](_0x49c4('0x4b'),_0x49c4('0x4c'));this[_0x49c4('0x5')](_0x49c4('0x46'),_0x39c455[_0x49c4('0x46')]||_0x49c4('0x4d'));this[_0x49c4('0x5')](_0x49c4('0x47'),_0x39c455[_0x49c4('0x47')]||'/etc/pki/tls/private/motion.key');this['setDataValue'](_0x49c4('0x4e'),_0x49c4('0x29'));break;default:}}},'permissions':{'type':Sequelize['TEXT'],'set':function(_0x1a15f3){this[_0x49c4('0x5')](_0x49c4('0x4f'),_0x1a15f3?_0x1a15f3[_0x49c4('0x23')](','):[]);},'get':function(){return this['getDataValue']('permissions')?_['map'](this[_0x49c4('0xb')](_0x49c4('0x4f'))[_0x49c4('0x24')](','),function(_0x2f4289){return parseInt(_0x2f4289,0xa);}):[];}},'phoneBarUnconditionalNumber':{'type':Sequelize[_0x49c4('0x3')]},'phoneBarNoReplyNumber':{'type':Sequelize[_0x49c4('0x3')]},'phoneBarBusyNumber':{'type':Sequelize[_0x49c4('0x3')]},'phoneBarUnconditional':{'type':Sequelize[_0x49c4('0x15')],'defaultValue':![]},'phoneBarNoReply':{'type':Sequelize[_0x49c4('0x15')],'defaultValue':![]},'phoneBarBusy':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'phoneBarDnd':{'type':Sequelize[_0x49c4('0x15')],'defaultValue':!![]},'phoneBarUnansweredCallBadge':{'type':Sequelize[_0x49c4('0x15')],'defaultValue':!![]},'phoneBarEnableDtmfTone':{'type':Sequelize[_0x49c4('0x15')],'defaultValue':![]},'phoneBarAutoAnswerDelay':{'type':Sequelize['INTEGER'],'defaultValue':0x0},'extensionMonitor':{'type':Sequelize[_0x49c4('0x3')],'defaultValue':''},'crudPermissions':{'type':Sequelize[_0x49c4('0x11')],'defaultValue':0x0},'rtcp_mux':{'type':Sequelize[_0x49c4('0x18')](_0x49c4('0x29'),'no'),'defaultValue':'no'},'allowmessenger':{'type':Sequelize[_0x49c4('0x15')],'defaultValue':!![]},'phoneBarOutboundProxy':{'type':Sequelize[_0x49c4('0x3')]},'phoneBarEnableJaws':{'type':Sequelize[_0x49c4('0x15')],'defaultValue':![]},'phoneBarEnableScreenRecordingByAgent':{'type':Sequelize[_0x49c4('0x15')],'defaultValue':![]},'phoneBarEnableVideoRecording':{'type':Sequelize['VIRTUAL'],'get':function(){return this[_0x49c4('0xb')](_0x49c4('0x50'))?this[_0x49c4('0xb')](_0x49c4('0x50')):![];}},'phoneBarEnableAutomaticScreenRecording':{'type':Sequelize[_0x49c4('0x15')],'defaultValue':![]},'phoneBarPrefixRequired':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'hotdesk':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'interface':{'type':Sequelize[_0x49c4('0x3')],'defaultValue':null},'privacyEnabled':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'apiKeyNonce':{'type':Sequelize[_0x49c4('0x3')],'allowNull':!![]},'apiKeyIat':{'type':Sequelize['STRING'],'allowNull':!![]},'screenrecording':{'type':Sequelize[_0x49c4('0x15')],'defaultValue':![],'set':function(_0x27b77d){if(typeof _0x27b77d===_0x49c4('0x51')){var _0x34870e=_0x27b77d==='1'?!![]:_0x27b77d==='0'?![]:_0x27b77d==='true'?!![]:_0x27b77d===_0x49c4('0x52')?![]:![];this[_0x49c4('0x5')](_0x49c4('0x53'),_0x34870e);}else{this[_0x49c4('0x5')](_0x49c4('0x53'),_0x27b77d);}}},'blocked':{'type':Sequelize[_0x49c4('0x15')],'defaultValue':![],'set':function(_0x38b291){this[_0x49c4('0x5')](_0x49c4('0x54'),_0x38b291);if(_0x38b291===!![]){this[_0x49c4('0x5')]('blockedAt',moment());this[_0x49c4('0x5')](_0x49c4('0x55'),0x0);}else{this['setDataValue'](_0x49c4('0x56'),null);}}},'blockedAt':{'type':Sequelize['DATE'],'defaultValue':null},'loginAttempts':{'type':Sequelize[_0x49c4('0x11')],'defaultValue':0x0},'disabled':{'type':Sequelize[_0x49c4('0x15')],'defaultValue':![]},'settingsEnabled':{'type':Sequelize[_0x49c4('0x15')],'defaultValue':!![]},'wssPort':{'type':Sequelize[_0x49c4('0x11')](0x5)[_0x49c4('0x57')],'defaultValue':0x1f99},'downloadAttachments':{'type':Sequelize['BOOLEAN'],'defaultValue':!![]},'downloadOmnichannelInteractions':{'type':Sequelize[_0x49c4('0x15')],'defaultValue':!![]},'downloadVoiceRecordings':{'type':Sequelize[_0x49c4('0x15')],'defaultValue':!![]},'ignorePauseForPreviewCalls':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'selectRecallMeCampaign':{'type':Sequelize[_0x49c4('0x15')],'defaultValue':![]},'adSsoEnabled':{'type':Sequelize[_0x49c4('0x15')],'defaultValue':![]},'chatAutoanswer':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'chatAutoanswerDelay':{'type':Sequelize[_0x49c4('0x11')],'defaultValue':0x0},'emailAutoanswer':{'type':Sequelize[_0x49c4('0x15')],'defaultValue':![]},'emailAutoanswerDelay':{'type':Sequelize['INTEGER'],'defaultValue':0x0},'smsAutoanswer':{'type':Sequelize[_0x49c4('0x15')],'defaultValue':![]},'smsAutoanswerDelay':{'type':Sequelize[_0x49c4('0x11')],'defaultValue':0x0},'openchannelAutoanswer':{'type':Sequelize[_0x49c4('0x15')],'defaultValue':![]},'openchannelAutoanswerDelay':{'type':Sequelize[_0x49c4('0x11')],'defaultValue':0x0},'faxAutoanswer':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'faxAutoanswerDelay':{'type':Sequelize[_0x49c4('0x11')],'defaultValue':0x0},'whatsappAutoanswer':{'type':Sequelize[_0x49c4('0x15')],'defaultValue':![]},'whatsappAutoanswerDelay':{'type':Sequelize['INTEGER'],'defaultValue':0x0}}; \ No newline at end of file +var _0x008c=['all','ulaw;alaw;gsm','allow','insecure','String\x20is\x20deprecated.\x20Please\x20use\x20an\x20Array\x20as\x20[\x22port\x22,\x20\x22invite\x22]','never','always','refuse','originate','uac','uas','fingerprint','certificate','active','actpass','update,nonat','TEXT','get','isArray','encryption','avpf','force_avp','icesupport','dtlsenable','dtlssetup','dtlsprivatekey','wss','dtlsverify','dtlscertfile','/etc/pki/tls/private/motion.key','rtcp_mux','permissions','VIRTUAL','phoneBarEnableScreenRecordingByAgent','string','true','false','screenrecording','blockedAt','UNSIGNED','sequelize','moment','util','lodash','exports','name','setDataValue','defaultuser','The\x20name\x20of\x20the\x20user','STRING','fullname','callerid','getDataValue','internal','toLowerCase','ENUM','admin','user','agent','telephone','INTEGER','accountcode','\x22%s\x22\x20<%s>','BOOLEAN','DATE','dynamic','friend','from-sip','ALLOWED_PASSED_SCREEN','ALLOWED_FAILED_SCREEN','PROHIB_FAILED_SCREEN','PROHIB','udp','transport','split','String\x20is\x20deprecated.\x20Please\x20use\x20an\x20Array\x20as\x20[\x22udp\x22,\x20\x22tcp\x22]','rfc2833','info','shortinfo','inband','auto','yes','nonat','update','outgoing','join','nat','String\x20is\x20deprecated.\x20Please\x20use\x20an\x20Array\x20as\x20[\x22force_rport\x22,\x20\x22comedia\x22]'];(function(_0x52525d,_0x565354){var _0x4e2949=function(_0x1c4bf5){while(--_0x1c4bf5){_0x52525d['push'](_0x52525d['shift']());}};_0x4e2949(++_0x565354);}(_0x008c,0x188));var _0xc008=function(_0xaee9b2,_0x4f74cf){_0xaee9b2=_0xaee9b2-0x0;var _0x8c26c1=_0x008c[_0xaee9b2];return _0x8c26c1;};'use strict';var Sequelize=require(_0xc008('0x0'));var moment=require(_0xc008('0x1'));var util=require(_0xc008('0x2'));var _=require(_0xc008('0x3'));module[_0xc008('0x4')]={'name':{'type':Sequelize['STRING'],'allowNull':![],'unique':_0xc008('0x5'),'validate':{'notEmpty':!![],'is':/^[A-Za-z0-9\.\_]+$/i},'set':function(_0x47063f){this[_0xc008('0x6')](_0xc008('0x5'),_0x47063f);this[_0xc008('0x6')](_0xc008('0x7'),_0x47063f);},'comment':_0xc008('0x8')},'fullname':{'type':Sequelize[_0xc008('0x9')],'allowNull':![],'set':function(_0x9c8cb2){this['setDataValue'](_0xc008('0xa'),_0x9c8cb2);this['setDataValue'](_0xc008('0xb'),util['format']('\x22%s\x22\x20<%s>',_0x9c8cb2,this[_0xc008('0xc')](_0xc008('0xd'))));}},'alias':{'type':Sequelize['STRING']},'email':{'type':Sequelize['STRING'],'allowNull':![],'unique':'email','validate':{'isEmail':!![]},'set':function(_0x1eacfa){if(_0x1eacfa){this[_0xc008('0x6')]('email',_0x1eacfa[_0xc008('0xe')]());}}},'role':{'type':Sequelize[_0xc008('0xf')](_0xc008('0x10'),_0xc008('0x11'),_0xc008('0x12'),_0xc008('0x13')),'allowNull':![]},'password':{'type':Sequelize[_0xc008('0x9')],'allowNull':![],'validate':{'notEmpty':!![]}},'provider':{'type':Sequelize['STRING'],'defaultValue':'local'},'internal':{'type':Sequelize[_0xc008('0x14')](0xb),'allowNull':![],'unique':'internal','set':function(_0x25e13f){this[_0xc008('0x6')](_0xc008('0xd'),_0x25e13f);this[_0xc008('0x6')](_0xc008('0x15'),_0x25e13f);this['setDataValue']('callerid',util['format'](_0xc008('0x16'),this[_0xc008('0xc')](_0xc008('0xa')),_0x25e13f));}},'salt':{'type':Sequelize[_0xc008('0x9')]},'phone':{'type':Sequelize['STRING']},'mobile':{'type':Sequelize['STRING']},'address':{'type':Sequelize['STRING']},'zipcode':{'type':Sequelize['STRING']},'userpic':{'type':Sequelize[_0xc008('0x9')]},'city':{'type':Sequelize[_0xc008('0x9')]},'country':{'type':Sequelize['STRING']},'online':{'type':Sequelize[_0xc008('0x17')],'defaultValue':![]},'lastLoginAt':{'type':Sequelize['DATE']},'voicePause':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'chatPause':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'mailPause':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'faxPause':{'type':Sequelize[_0xc008('0x17')],'defaultValue':![]},'smsPause':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'whatsappPause':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'openchannelPause':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'pauseType':{'type':Sequelize['STRING'],'defaultValue':'DEFAULT\x20PAUSE'},'lastPauseAt':{'type':Sequelize[_0xc008('0x18')]},'chatCapacity':{'type':Sequelize[_0xc008('0x14')],'defaultValue':0x0},'mailCapacity':{'type':Sequelize[_0xc008('0x14')],'defaultValue':0x0},'faxCapacity':{'type':Sequelize[_0xc008('0x14')],'defaultValue':0x0},'smsCapacity':{'type':Sequelize[_0xc008('0x14')],'defaultValue':0x0},'whatsappCapacity':{'type':Sequelize[_0xc008('0x14')],'defaultValue':0x0},'openchannelCapacity':{'type':Sequelize['INTEGER'],'defaultValue':0x0},'phoneBarAutoAnswer':{'type':Sequelize[_0xc008('0x17')],'defaultValue':![]},'phoneBarEnableSettings':{'type':Sequelize['BOOLEAN'],'defaultValue':!![]},'phoneBarListenPort':{'type':Sequelize['INTEGER'](0x5),'defaultValue':0x1428},'phoneBarExpires':{'type':Sequelize[_0xc008('0x14')](0x5),'defaultValue':0x78},'phoneBarRemoteControl':{'type':Sequelize[_0xc008('0x17')],'defaultValue':![]},'phoneBarRemoteControlPort':{'type':Sequelize[_0xc008('0x14')],'defaultValue':0x26a0},'phoneBarEnableRecording':{'type':Sequelize[_0xc008('0x17')],'defaultValue':![]},'phoneBarRingInUse':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'chanspy':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'description':{'type':Sequelize['STRING'],'allowNull':!![]},'host':{'type':Sequelize[_0xc008('0x9')],'allowNull':!![],'defaultValue':_0xc008('0x19')},'ipaddr':{'type':Sequelize[_0xc008('0x9')],'allowNull':!![]},'port':{'type':Sequelize[_0xc008('0x14')](0x5),'allowNull':!![]},'regseconds':{'type':Sequelize['INTEGER'](0xb),'allowNull':!![]},'fullcontact':{'type':Sequelize['STRING'],'allowNull':!![]},'regserver':{'type':Sequelize['STRING'],'allowNull':!![]},'useragent':{'type':Sequelize['STRING'],'allowNull':!![]},'lastms':{'type':Sequelize['INTEGER'](0xb),'allowNull':!![]},'type':{'type':Sequelize[_0xc008('0xf')](_0xc008('0x1a'),_0xc008('0x11'),'peer'),'allowNull':!![],'defaultValue':_0xc008('0x1a')},'context':{'type':Sequelize[_0xc008('0x9')],'allowNull':!![],'defaultValue':_0xc008('0x1b')},'callingpres':{'type':Sequelize[_0xc008('0xf')]('ALLOWED_NOT_SCREENED',_0xc008('0x1c'),_0xc008('0x1d'),'ALLOWED','PROHIB_NOT_SCREENED','PROHIB_PASSED_SCREEN',_0xc008('0x1e'),_0xc008('0x1f')),'allowNull':!![]},'deny':{'type':Sequelize[_0xc008('0x9')],'allowNull':!![]},'permit':{'type':Sequelize[_0xc008('0x9')],'allowNull':!![]},'secret':{'type':Sequelize[_0xc008('0x9')],'allowNull':!![]},'md5secret':{'type':Sequelize[_0xc008('0x9')],'allowNull':!![]},'remotesecret':{'type':Sequelize[_0xc008('0x9')],'allowNull':!![]},'transport':{'type':Sequelize[_0xc008('0x9')],'allowNull':!![],'defaultValue':_0xc008('0x20'),'set':function(_0x2b862d){this[_0xc008('0x6')](_0xc008('0x21'),_0x2b862d?_0x2b862d['join'](','):null);},'get':function(){return this[_0xc008('0xc')](_0xc008('0x21'))?this['getDataValue'](_0xc008('0x21'))[_0xc008('0x22')](','):null;},'comment':_0xc008('0x23')},'dtmfmode':{'type':Sequelize[_0xc008('0xf')](_0xc008('0x24'),_0xc008('0x25'),_0xc008('0x26'),_0xc008('0x27'),_0xc008('0x28')),'allowNull':!![],'defaultValue':'rfc2833'},'directmedia':{'type':Sequelize[_0xc008('0xf')](_0xc008('0x29'),'no',_0xc008('0x2a'),_0xc008('0x2b'),_0xc008('0x2c')),'allowNull':!![],'defaultValue':'no'},'directrtpsetup':{'type':Sequelize[_0xc008('0xf')](_0xc008('0x29'),'no'),'allowNull':!![],'defaultValue':'no'},'directmediapermit':{'type':Sequelize['STRING'],'allowNull':!![]},'directmediadeny':{'type':Sequelize[_0xc008('0x9')],'allowNull':!![]},'nat':{'type':Sequelize[_0xc008('0x9')],'allowNull':!![],'defaultValue':'force_rport,comedia','set':function(_0x399b64){this[_0xc008('0x6')]('nat',_0x399b64?_0x399b64[_0xc008('0x2d')](','):null);},'get':function(){return this[_0xc008('0xc')](_0xc008('0x2e'))?this['getDataValue']('nat')['split'](','):null;},'comment':_0xc008('0x2f')},'callgroup':{'type':Sequelize['STRING']},'namedcallgroup':{'type':Sequelize[_0xc008('0x9')]},'pickupgroup':{'type':Sequelize[_0xc008('0x9')]},'namedpickupgroup':{'type':Sequelize[_0xc008('0x9')]},'language':{'type':Sequelize[_0xc008('0x9')],'defaultValue':'en'},'tonezone':{'type':Sequelize[_0xc008('0x9')]},'disallow':{'type':Sequelize[_0xc008('0x9')],'allowNull':![],'defaultValue':_0xc008('0x30')},'allow':{'type':Sequelize[_0xc008('0x9')],'allowNull':![],'defaultValue':_0xc008('0x31'),'set':function(_0x387dfd){this[_0xc008('0x6')](_0xc008('0x32'),_0x387dfd?_0x387dfd[_0xc008('0x2d')](';'):_0xc008('0x31'));},'get':function(){return this['getDataValue'](_0xc008('0x32'))?this[_0xc008('0xc')](_0xc008('0x32'))[_0xc008('0x22')](';'):null;},'comment':'String\x20is\x20deprecated.\x20Please\x20use\x20an\x20Array\x20as\x20[\x22ulaw\x22,\x20\x22alaw\x22,\x20\x22gsm\x22]'},'autoframing':{'type':Sequelize[_0xc008('0xf')](_0xc008('0x29'),'no'),'allowNull':!![]},'insecure':{'type':Sequelize[_0xc008('0x9')],'allowNull':!![],'set':function(_0x36e7ae){this[_0xc008('0x6')]('insecure',_0x36e7ae?_0x36e7ae[_0xc008('0x2d')](','):null);},'get':function(){return this[_0xc008('0xc')](_0xc008('0x33'))?this[_0xc008('0xc')](_0xc008('0x33'))['split'](','):null;},'comment':_0xc008('0x34')},'trustrpid':{'type':Sequelize[_0xc008('0xf')](_0xc008('0x29'),'no'),'allowNull':!![],'defaultValue':'no'},'trust_id_outbound':{'type':Sequelize[_0xc008('0xf')]('yes','no'),'allowNull':!![],'defaultValue':'no'},'progressinband':{'type':Sequelize[_0xc008('0xf')](_0xc008('0x29'),'no',_0xc008('0x35')),'allowNull':!![]},'promiscredir':{'type':Sequelize['ENUM'](_0xc008('0x29'),'no'),'allowNull':!![]},'useclientcode':{'type':Sequelize['ENUM'](_0xc008('0x29'),'no'),'allowNull':!![]},'accountcode':{'type':Sequelize['INTEGER'](0xb),'allowNull':!![]},'setvar':{'type':Sequelize[_0xc008('0x9')],'allowNull':!![]},'callerid':{'type':Sequelize[_0xc008('0x9')],'allowNull':!![],'defaultValue':'\x22\x22\x20<>'},'amaflags':{'type':Sequelize[_0xc008('0x9')],'allowNull':!![]},'callcounter':{'type':Sequelize[_0xc008('0xf')](_0xc008('0x29'),'no'),'allowNull':!![],'defaultValue':'yes'},'busylevel':{'type':Sequelize[_0xc008('0x14')](0xb),'allowNull':!![]},'allowoverlap':{'type':Sequelize[_0xc008('0xf')](_0xc008('0x29'),'no'),'allowNull':!![]},'allowsubscribe':{'type':Sequelize[_0xc008('0xf')](_0xc008('0x29'),'no'),'allowNull':!![]},'allowtransfer':{'type':Sequelize[_0xc008('0xf')]('yes','no'),'allowNull':!![]},'ignoresdpversion':{'type':Sequelize['ENUM']('yes','no'),'allowNull':!![]},'subscribecontext':{'type':Sequelize[_0xc008('0x9')],'allowNull':!![]},'template':{'type':Sequelize[_0xc008('0x9')],'allowNull':!![]},'videosupport':{'type':Sequelize[_0xc008('0xf')](_0xc008('0x29'),'no',_0xc008('0x36')),'allowNull':!![],'defaultValue':'no'},'maxcallbitrate':{'type':Sequelize[_0xc008('0x14')](0xb),'allowNull':!![]},'rfc2833compensate':{'type':Sequelize[_0xc008('0xf')](_0xc008('0x29'),'no'),'allowNull':!![]},'mailbox':{'type':Sequelize['STRING'],'allowNull':!![]},'session_timers':{'type':Sequelize['ENUM']('accept',_0xc008('0x37'),_0xc008('0x38')),'allowNull':!![]},'session_expires':{'type':Sequelize[_0xc008('0x14')](0xb),'allowNull':!![]},'session_minse':{'type':Sequelize['INTEGER'](0xb),'allowNull':!![]},'session_refresher':{'type':Sequelize[_0xc008('0xf')](_0xc008('0x39'),_0xc008('0x3a')),'allowNull':!![],'defaultValue':_0xc008('0x3a')},'t38pt_usertpsource':{'type':Sequelize[_0xc008('0x9')],'allowNull':!![]},'regexten':{'type':Sequelize[_0xc008('0x9')],'allowNull':!![]},'fromdomain':{'type':Sequelize[_0xc008('0x9')],'allowNull':!![]},'fromuser':{'type':Sequelize[_0xc008('0x9')],'allowNull':!![]},'qualify':{'type':Sequelize[_0xc008('0xf')](_0xc008('0x29'),'no'),'allowNull':!![],'defaultValue':'yes'},'keepalive':{'type':Sequelize['INTEGER'](0xb),'allowNull':!![]},'defaultip':{'type':Sequelize[_0xc008('0x9')],'allowNull':!![]},'defaultuser':{'type':Sequelize['STRING'],'allowNull':!![]},'rtptimeout':{'type':Sequelize[_0xc008('0x14')](0xb),'allowNull':!![]},'rtpholdtimeout':{'type':Sequelize[_0xc008('0x14')](0xb),'allowNull':!![]},'rtpkeepalive':{'type':Sequelize[_0xc008('0x14')](0xb),'allowNull':!![]},'sendrpid':{'type':Sequelize['ENUM'](_0xc008('0x29'),'no'),'allowNull':!![],'defaultValue':'no'},'outboundproxy':{'type':Sequelize[_0xc008('0x9')],'allowNull':!![]},'callbackextension':{'type':Sequelize[_0xc008('0x9')],'allowNull':!![]},'timert1':{'type':Sequelize[_0xc008('0x14')](0xb),'allowNull':!![]},'timerb':{'type':Sequelize[_0xc008('0x14')](0xb),'allowNull':!![]},'qualifyfreq':{'type':Sequelize['INTEGER'](0xb),'allowNull':!![]},'contactpermit':{'type':Sequelize[_0xc008('0x9')],'allowNull':!![]},'contactdeny':{'type':Sequelize[_0xc008('0x9')],'allowNull':!![]},'contactacl':{'type':Sequelize['STRING'],'allowNull':!![]},'unsolicited_mailbox':{'type':Sequelize[_0xc008('0x9')],'allowNull':!![]},'use_q850_reason':{'type':Sequelize[_0xc008('0x9')],'allowNull':!![]},'maxforwards':{'type':Sequelize['INTEGER'](0xb),'allowNull':!![]},'encryption':{'type':Sequelize['ENUM'](_0xc008('0x29'),'no'),'allowNull':!![],'defaultValue':'no'},'avpf':{'type':Sequelize[_0xc008('0xf')](_0xc008('0x29'),'no'),'allowNull':!![]},'force_avp':{'type':Sequelize[_0xc008('0xf')](_0xc008('0x29'),'no'),'allowNull':!![]},'icesupport':{'type':Sequelize['ENUM']('yes','no'),'allowNull':!![]},'dtlsenable':{'type':Sequelize[_0xc008('0xf')]('yes','no'),'allowNull':!![]},'dtlsverify':{'type':Sequelize[_0xc008('0xf')](_0xc008('0x29'),'no',_0xc008('0x3b'),_0xc008('0x3c')),'allowNull':!![]},'dtlsrekey':{'type':Sequelize[_0xc008('0x14')](0xb),'allowNull':!![]},'dtlscertfile':{'type':Sequelize[_0xc008('0x9')],'allowNull':!![]},'dtlsprivatekey':{'type':Sequelize['STRING'],'allowNull':!![]},'dtlscipher':{'type':Sequelize[_0xc008('0x9')],'allowNull':!![]},'dtlscafile':{'type':Sequelize[_0xc008('0x9')],'allowNull':!![]},'dtlscapath':{'type':Sequelize[_0xc008('0x9')],'allowNull':!![]},'dtlssetup':{'type':Sequelize[_0xc008('0xf')](_0xc008('0x3d'),'passive',_0xc008('0x3e')),'allowNull':!![]},'dtlsfingerprint':{'type':Sequelize['STRING'],'allowNull':!![]},'usereqphone':{'type':Sequelize['ENUM']('yes','no'),'allowNull':!![],'defaultValue':'no'},'recordonfeature':{'type':Sequelize[_0xc008('0x9')],'allowNull':!![]},'recordofffeature':{'type':Sequelize[_0xc008('0x9')],'allowNull':!![]},'call_limit':{'type':Sequelize[_0xc008('0x14')](0xb),'allowNull':!![],'defaultValue':0xa},'registertrying':{'type':Sequelize['ENUM'](_0xc008('0x29'),'no'),'allowNull':!![]},'subscribemwi':{'type':Sequelize[_0xc008('0xf')](_0xc008('0x29'),'no'),'allowNull':!![]},'vmexten':{'type':Sequelize['STRING'],'allowNull':!![]},'mohinterpret':{'type':Sequelize[_0xc008('0x9')],'allowNull':!![]},'mohsuggest':{'type':Sequelize[_0xc008('0x9')],'allowNull':!![]},'parkinglot':{'type':Sequelize[_0xc008('0x9')],'allowNull':!![]},'canreinvite':{'type':Sequelize[_0xc008('0xf')]('yes','no',_0xc008('0x2a'),'update',_0xc008('0x3f')),'allowNull':!![],'defaultValue':'no'},'loginInPause':{'type':Sequelize[_0xc008('0x17')],'defaultValue':![]},'resetPasswordToken':{'type':Sequelize[_0xc008('0x9')]},'resetPasswordExpires':{'type':Sequelize[_0xc008('0x18')]},'passwordResetAt':{'type':Sequelize[_0xc008('0x18')],'defaultValue':null},'previousPasswords':{'type':Sequelize[_0xc008('0x40')]},'showWebBar':{'type':Sequelize['INTEGER'],'defaultValue':0x0,'set':function(_0x375e71){this['setDataValue']('showWebBar',_0x375e71);var _0x37ce5e=this[_0xc008('0x41')]({'plain':!![]});switch(_0x375e71){case 0x0:case 0x1:var _0x56e755=_0x37ce5e[_0xc008('0x21')]?_[_0xc008('0x42')](_0x37ce5e[_0xc008('0x21')])?_0x37ce5e[_0xc008('0x21')][_0xc008('0x2d')]():_0x37ce5e[_0xc008('0x21')]:_0xc008('0x20');if(_0x56e755==='wss'){_0x56e755=_0xc008('0x20');}this[_0xc008('0x6')](_0xc008('0x21'),_0x56e755);this[_0xc008('0x6')](_0xc008('0x43'),'no');this[_0xc008('0x6')](_0xc008('0x44'),null);this[_0xc008('0x6')](_0xc008('0x45'),null);this[_0xc008('0x6')](_0xc008('0x46'),null);this[_0xc008('0x6')](_0xc008('0x47'),null);this[_0xc008('0x6')]('dtlsverify',null);this[_0xc008('0x6')](_0xc008('0x48'),null);this[_0xc008('0x6')]('dtlscertfile',null);this[_0xc008('0x6')](_0xc008('0x49'),null);this['setDataValue']('rtcp_mux','no');break;case 0x2:this[_0xc008('0x6')](_0xc008('0x21'),_0xc008('0x4a'));this[_0xc008('0x6')](_0xc008('0x43'),_0xc008('0x29'));this[_0xc008('0x6')](_0xc008('0x44'),_0xc008('0x29'));this[_0xc008('0x6')](_0xc008('0x45'),'yes');this[_0xc008('0x6')](_0xc008('0x46'),_0xc008('0x29'));this[_0xc008('0x6')]('dtlsenable',_0xc008('0x29'));this['setDataValue'](_0xc008('0x4b'),'no');this[_0xc008('0x6')](_0xc008('0x48'),'actpass');this[_0xc008('0x6')](_0xc008('0x4c'),_0x37ce5e[_0xc008('0x4c')]||'/etc/pki/tls/certs/motion.crt');this[_0xc008('0x6')]('dtlsprivatekey',_0x37ce5e[_0xc008('0x49')]||_0xc008('0x4d'));this[_0xc008('0x6')](_0xc008('0x4e'),_0xc008('0x29'));break;default:}}},'permissions':{'type':Sequelize['TEXT'],'set':function(_0x3c30db){this[_0xc008('0x6')]('permissions',_0x3c30db?_0x3c30db[_0xc008('0x2d')](','):[]);},'get':function(){return this['getDataValue'](_0xc008('0x4f'))?_['map'](this[_0xc008('0xc')]('permissions')[_0xc008('0x22')](','),function(_0x103d75){return parseInt(_0x103d75,0xa);}):[];}},'phoneBarUnconditionalNumber':{'type':Sequelize[_0xc008('0x9')]},'phoneBarNoReplyNumber':{'type':Sequelize[_0xc008('0x9')]},'phoneBarBusyNumber':{'type':Sequelize['STRING']},'phoneBarUnconditional':{'type':Sequelize[_0xc008('0x17')],'defaultValue':![]},'phoneBarNoReply':{'type':Sequelize[_0xc008('0x17')],'defaultValue':![]},'phoneBarBusy':{'type':Sequelize[_0xc008('0x17')],'defaultValue':![]},'phoneBarDnd':{'type':Sequelize[_0xc008('0x17')],'defaultValue':!![]},'phoneBarUnansweredCallBadge':{'type':Sequelize[_0xc008('0x17')],'defaultValue':!![]},'phoneBarEnableDtmfTone':{'type':Sequelize[_0xc008('0x17')],'defaultValue':![]},'phoneBarAutoAnswerDelay':{'type':Sequelize[_0xc008('0x14')],'defaultValue':0x0},'extensionMonitor':{'type':Sequelize[_0xc008('0x9')],'defaultValue':''},'crudPermissions':{'type':Sequelize['INTEGER'],'defaultValue':0x0},'rtcp_mux':{'type':Sequelize[_0xc008('0xf')]('yes','no'),'defaultValue':'no'},'allowmessenger':{'type':Sequelize['BOOLEAN'],'defaultValue':!![]},'phoneBarOutboundProxy':{'type':Sequelize['STRING']},'phoneBarEnableJaws':{'type':Sequelize[_0xc008('0x17')],'defaultValue':![]},'phoneBarEnableScreenRecordingByAgent':{'type':Sequelize[_0xc008('0x17')],'defaultValue':![]},'phoneBarEnableVideoRecording':{'type':Sequelize[_0xc008('0x50')],'get':function(){return this[_0xc008('0xc')](_0xc008('0x51'))?this[_0xc008('0xc')](_0xc008('0x51')):![];}},'phoneBarEnableAutomaticScreenRecording':{'type':Sequelize[_0xc008('0x17')],'defaultValue':![]},'phoneBarPrefixRequired':{'type':Sequelize[_0xc008('0x17')],'defaultValue':![]},'hotdesk':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'interface':{'type':Sequelize[_0xc008('0x9')],'defaultValue':null},'privacyEnabled':{'type':Sequelize[_0xc008('0x17')],'defaultValue':![]},'apiKeyNonce':{'type':Sequelize[_0xc008('0x9')],'allowNull':!![]},'apiKeyIat':{'type':Sequelize[_0xc008('0x9')],'allowNull':!![]},'screenrecording':{'type':Sequelize[_0xc008('0x17')],'defaultValue':![],'set':function(_0x3b2669){if(typeof _0x3b2669===_0xc008('0x52')){var _0x2edb8e=_0x3b2669==='1'?!![]:_0x3b2669==='0'?![]:_0x3b2669===_0xc008('0x53')?!![]:_0x3b2669===_0xc008('0x54')?![]:![];this[_0xc008('0x6')](_0xc008('0x55'),_0x2edb8e);}else{this['setDataValue']('screenrecording',_0x3b2669);}}},'blocked':{'type':Sequelize[_0xc008('0x17')],'defaultValue':![],'set':function(_0x3104cd){this[_0xc008('0x6')]('blocked',_0x3104cd);if(_0x3104cd===!![]){this[_0xc008('0x6')](_0xc008('0x56'),moment());this['setDataValue']('loginAttempts',0x0);}else{this['setDataValue'](_0xc008('0x56'),null);}}},'blockedAt':{'type':Sequelize[_0xc008('0x18')],'defaultValue':null},'loginAttempts':{'type':Sequelize[_0xc008('0x14')],'defaultValue':0x0},'disabled':{'type':Sequelize[_0xc008('0x17')],'defaultValue':![]},'settingsEnabled':{'type':Sequelize[_0xc008('0x17')],'defaultValue':!![]},'wssPort':{'type':Sequelize[_0xc008('0x14')](0x5)[_0xc008('0x57')],'defaultValue':0x1f99},'downloadAttachments':{'type':Sequelize[_0xc008('0x17')],'defaultValue':!![]},'downloadOmnichannelInteractions':{'type':Sequelize[_0xc008('0x17')],'defaultValue':!![]},'downloadVoiceRecordings':{'type':Sequelize[_0xc008('0x17')],'defaultValue':!![]},'ignorePauseForPreviewCalls':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'selectRecallMeCampaign':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'adSsoEnabled':{'type':Sequelize[_0xc008('0x17')],'defaultValue':![]},'chatAutoanswer':{'type':Sequelize[_0xc008('0x17')],'defaultValue':![]},'chatAutoanswerDelay':{'type':Sequelize[_0xc008('0x14')],'defaultValue':0x0},'emailAutoanswer':{'type':Sequelize[_0xc008('0x17')],'defaultValue':![]},'emailAutoanswerDelay':{'type':Sequelize[_0xc008('0x14')],'defaultValue':0x0},'smsAutoanswer':{'type':Sequelize[_0xc008('0x17')],'defaultValue':![]},'smsAutoanswerDelay':{'type':Sequelize['INTEGER'],'defaultValue':0x0},'openchannelAutoanswer':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'openchannelAutoanswerDelay':{'type':Sequelize[_0xc008('0x14')],'defaultValue':0x0},'faxAutoanswer':{'type':Sequelize[_0xc008('0x17')],'defaultValue':![]},'faxAutoanswerDelay':{'type':Sequelize[_0xc008('0x14')],'defaultValue':0x0},'whatsappAutoanswer':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'whatsappAutoanswerDelay':{'type':Sequelize['INTEGER'],'defaultValue':0x0}}; \ No newline at end of file diff --git a/server/api/user/user.controller.js b/server/api/user/user.controller.js index 27995d0..05785b9 100644 --- a/server/api/user/user.controller.js +++ b/server/api/user/user.controller.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x039f=['existsSync','join','server/files/images/','download','getOpenTabs','ChatOpenTabs','CHAT','FAX','OPENCHANNEL','createdAt','MAIL','SmsOpenTabs','SMS','WhatsappOpenTabs','WHATSAPP','concat','getContacts','User\x20with\x20id\x20%s\x20not\x20found','hasOwnProperty','List','Tag','Tags','color','tag','getQueues','model','keys','filters','intersection','sort','where','pick','options','Queue','Unknown\x20role','nolimit','getVoiceQueuesRt','fields','getGroups','order','getRecordings','VoiceRecording','UserId','getScreenRecordings','ScreenRecording','getChatInteractions','getOpenchannelInteractions','OpenchannelInteraction','getMailInteractions','MailInteraction','getSmsInteractions','SmsInteraction','getFaxInteractions','WhatsappInteraction','getWhatsappInteractions','login','mobile','LOCAL/%s@from-sip/n','intrf','user:%s','user:forcelogout','headers','connection','remoteAddress','socket','User\x20not\x20found\x20or\x20not\x20allowed\x20to\x20perform\x20login\x20method','UserVoiceQueue.penalty','upsert','MemberReport','forEach','getChannels','YYYY-MM-DD\x20HH:mm:ss','LOGIN','device','PAUSE','LOGININPAUSE','resolve','logout','pause','DEFAULT\x20PAUSE','unpause','Channel\x20parameter\x20%s\x20is\x20invalid','mailPause','chatPause','faxPause','smsPause','whatsappPause','lastPauseAt','getTeams','Team','addTeams','Body\x20parameter\x20\x27ids\x27\x20is\x20required','transaction','flattenDeep','getDataValue','Voice','VoicePrefixId','removeTeams','isArray','Query\x20parameter\x20\x27ids\x27\x20is\x20required','getAssociatedQueues','TeamVoicePrefix','UserVoicePrefix','CmList','getLists','getAgents','getVoiceQueues','values','addChatInteractions','user_has_chat_interactions:save','removeChatInteractions','user_has_chat_interactions:remove','addMailInteractions','removeMailInteractions','user_has_mail_interactions:remove','addFaxInteractions','user_has_fax_interactions:save','removeFaxInteractions','user_has_fax_interactions:remove','addSmsInteractions','user_has_sms_interactions:save','removeSmsInteractions','user_has_sms_interactions:remove','addOpenchannelInteractions','user_has_openchannel_interactions:save','removeOpenchannelInteractions','addWhatsappInteractions','user_has_whatsapp_interactions:save','removeWhatsappInteractions','VoicePrefix','getVoicePrefixes','getFaxAccounts','addFaxAccounts','removeFaxAccounts','getMailAccounts','MailAccount','addMailAccounts','removeMailAccounts','OpenchannelAccount','getOpenchannelAccounts','addOpenchannelAccounts','removeOpenchannelAccounts','getSmsAccounts','addSmsAccounts','removeSmsAccounts','getChatWebsites','ChatWebsite','removeChatWebsites','getWhatsappAccounts','WhatsappAccount','addWhatsappAccounts','removeWhatsappAccounts','getScheduledCalls','CmHopper','$and','$gt','$gte','$lt','$lte','$ne','$eq','$not','$between','$notBetween','$in','$notIn','$like','$iLike','$overlap','$contained','$any','firstName','phone','Contact','getApiKey','retrieveApiKey','token','You\x20don\x27t\x20have\x20sufficient\x20privileges\x20to\x20access\x20this\x20resource.','createApiKey','generateApiKey','nonce','removeApiKey','apiKeyNonce','API\x20key\x20not\x20available','whoami','Unable\x20to\x20retrieve\x20the\x20current\x20user','getUserSetting','teams','queues','flatten','lower','col','toString','desc','asc','substring','uniqBy','orderBy','Unable\x20to\x20retrieve\x20RPC\x20agents\x20(AMI)','result','request','offline','idle','unknown','ringing','voiceStatus','toUpperCase','slice','select','field','ui.','ui.createdAt','user_has_','_interactions','ui.UserId\x20=\x20?','moment','util','path','lodash','squel','jayson/promise','ioredis','../../components/auth/service','../../components/contacts','../../components/parsers/qs','../../config/logger','../../config/utils','../../config/environment','../../config/license/util','../../errors/api','APIBadRequestError','APINotFoundError','socket.io-emitter','redis','./user.socket','register','defaults','localhost','client','http','sendStatus','status','end','json','offset','undefined','limit','count','set','Content-Range','update','then','role','emit','destroy','get','admin','user','agent','Telephones','telephone','filter','ignore','value','includes','find','UserProfileResource','stack','name','send','User','rawAttributes','map','fieldName','type','key','password','previousPasswords','resetPasswordExpires','passwordResetAt','md5secret','index','getOptions','query','userSetting','true','UserSetting','push','rows','openTabs','chat','sms','dataValues','fax','openchannel','whatsapp','all','catch','show','includeAll','include','merge','attributes','mail','body','params','describe','addContacts','ids','omit','internal','findById','validatePasswordPattern','max','min_internal','sequelize','select\x20(select\x20IFNULL(max(internal)+1,1)\x20from\x20users\x20where\x20internal\x20<\x20md.internal)\x20as\x20\x27from\x27,\x20md.internal\x20-\x201\x20as\x20\x27to\x27\x20from\x20users\x20md\x20where\x20md.internal\x20!=\x201\x20and\x20not\x20exists\x20(select\x201\x20from\x20users\x20md2\x20where\x20md2.internal\x20=\x20md.internal\x20-\x201)','QueryTypes','SELECT','length','isNil','from','voicemail','mailbox','VoiceMail','email','permissions','101','103','113','110','105','108','111','114','115','create','Unauthorized','Unauthorized.\x20You\x20must\x20be\x20an\x20administrator\x20in\x20order\x20to\x20create\x20an\x20user','checkUserLimits','settingsEnabled','userProfileId','UserProfileSection','Agents','error','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','bulkCreate','some','Unauthorized.\x20You\x20must\x20be\x20an\x20administrator\x20in\x20order\x20to\x20create\x20an\x20administrator','findAll','isEmpty','autoAssociation','compact','changePassword','oldPassword','newPassword','Invalid\x20body\x20format.\x20Use\x20oldPassword\x20and\x20newPassword','authenticate','Sequelize','ValidationError','Wrong\x20credentials','New\x20password\x20must\x20be\x20different\x20from\x20old\x20password','Invalid\x20body\x20format.\x20Use\x20newPassword','findOne','securePassword','enforcePasswordHistory','passwordHistoryLimit','validatePasswordHistory','updatePasswordsHistory','addQueues','channel','online','loginInPause','voicePause','interface','isValidChannel','Unknown\x20channel','add','capitalize','toLowerCase','Queues','penalty','spread','QueueId','Queue:save','voice','VoiceQueue','format','SIP/%s','UserVoiceQueueRt','removeQueues','remove','Queue:remove','userpic','file','filename','getAvatar','root','server/files/images/logos/default_profile.png'];(function(_0x39aa8d,_0x59136d){var _0x5473ec=function(_0x17a1d1){while(--_0x17a1d1){_0x39aa8d['push'](_0x39aa8d['shift']());}};_0x5473ec(++_0x59136d);}(_0x039f,0xd7));var _0xf039=function(_0x44039a,_0x2ac8a8){_0x44039a=_0x44039a-0x0;var _0x525de5=_0x039f[_0x44039a];return _0x525de5;};'use strict';var moment=require(_0xf039('0x0'));var util=require(_0xf039('0x1'));var path=require(_0xf039('0x2'));var fs=require('fs');var _=require(_0xf039('0x3'));var squel=require(_0xf039('0x4'));var jayson=require(_0xf039('0x5'));var Redis=require(_0xf039('0x6'));var authService=require(_0xf039('0x7'));var contacts=require(_0xf039('0x8'));var qs=require(_0xf039('0x9'));var logger=require(_0xf039('0xa'))('api');var utils=require(_0xf039('0xb'));var config=require(_0xf039('0xc'));var licenseUtil=require(_0xf039('0xd'));var APIBadRequestError=require(_0xf039('0xe'))[_0xf039('0xf')];var APINotFoundError=require('../../errors/api')[_0xf039('0x10')];var APIHandleError=require(_0xf039('0xe'))['handleError'];var db=require('../../mysqldb')['db'];var socket=require(_0xf039('0x11'))(new Redis(config[_0xf039('0x12')]));require(_0xf039('0x13'))[_0xf039('0x14')](socket);config[_0xf039('0x12')]=_[_0xf039('0x15')](config[_0xf039('0x12')],{'host':_0xf039('0x16'),'port':0x18eb});var amiClient=jayson[_0xf039('0x17')][_0xf039('0x18')]({'port':0x232a});var values;function respondWithStatusCode(_0x53dfe1,_0x59104d){_0x59104d=_0x59104d||0xcc;return function(_0x2f0921){if(_0x2f0921){return _0x53dfe1[_0xf039('0x19')](_0x59104d);}return _0x53dfe1[_0xf039('0x1a')](_0x59104d)[_0xf039('0x1b')]();};}function respondWithResult(_0x229159,_0x380436){_0x380436=_0x380436||0xc8;return function(_0x1ad526){if(_0x1ad526){return _0x229159[_0xf039('0x1a')](_0x380436)[_0xf039('0x1c')](_0x1ad526);}};}function respondWithFilteredResult(_0x147229,_0x2134fb){return function(_0x5db1de){if(_0x5db1de){var _0x42e260=typeof _0x2134fb[_0xf039('0x1d')]===_0xf039('0x1e')&&typeof _0x2134fb[_0xf039('0x1f')]==='undefined';var _0x5aec1b=_0x5db1de[_0xf039('0x20')];var _0x1d8272=_0x42e260?0x0:_0x2134fb[_0xf039('0x1d')];var _0x5c779a=_0x42e260?_0x5db1de['count']:_0x2134fb['offset']+_0x2134fb[_0xf039('0x1f')];var _0x5bc9f1;if(_0x5c779a>=_0x5aec1b){_0x5c779a=_0x5aec1b;_0x5bc9f1=0xc8;}else{_0x5bc9f1=0xce;}_0x147229[_0xf039('0x1a')](_0x5bc9f1);return _0x147229[_0xf039('0x21')](_0xf039('0x22'),_0x1d8272+'-'+_0x5c779a+'/'+_0x5aec1b)[_0xf039('0x1c')](_0x5db1de);}return null;};}function saveUpdates(_0x5aa2f6){return function(_0x12100b){if(_0x12100b){return _0x12100b[_0xf039('0x23')](_0x5aa2f6)[_0xf039('0x24')](function(_0x49bec4){if(_0x49bec4[_0xf039('0x25')]==='agent'){socket[_0xf039('0x26')]('userNotification:recalc:'+_0x49bec4['id'],_0x49bec4);}return _0x49bec4;});}return null;};}function removeEntity(_0x3da354){return function(_0x1c5b63){if(_0x1c5b63){return _0x1c5b63[_0xf039('0x27')]()[_0xf039('0x24')](function(){var _0x1898dc=_0x1c5b63[_0xf039('0x28')]({'plain':!![]});if(_0x1898dc[_0xf039('0x25')]===_0xf039('0x29'))return;var _0x3a8548=[{'name':'Users','value':_0xf039('0x2a'),'ignore':!![]},{'name':'Agents','value':_0xf039('0x2b'),'ignore':![]},{'name':_0xf039('0x2c'),'value':_0xf039('0x2d'),'ignore':![]}];var _0x2b54f5=_(_0x3a8548)[_0xf039('0x2e')](_0xf039('0x2f'))['map'](_0xf039('0x30'))['value']();if(_[_0xf039('0x31')](_0x2b54f5,_0x1898dc[_0xf039('0x25')])){return;}var _0x533aa0=_[_0xf039('0x32')](_0x3a8548,[_0xf039('0x30'),_0x1898dc[_0xf039('0x25')]])['name'];return db[_0xf039('0x33')]['destroy']({'where':{'type':_0x533aa0,'resourceId':_0x1898dc['id']}})[_0xf039('0x24')](function(){return _0x1c5b63;});})['then'](function(){_0x3da354[_0xf039('0x1a')](0xcc)['end']();});}};}function handleEntityNotFound(_0xae56f7){return function(_0x318ede){if(!_0x318ede){_0xae56f7[_0xf039('0x19')](0x194);}return _0x318ede;};}function handleError(_0x3a6655,_0x2bcef5){_0x2bcef5=_0x2bcef5||0x1f4;return function(_0x3b6b6f){logger['error'](_0x3b6b6f[_0xf039('0x34')]);if(_0x3b6b6f[_0xf039('0x35')]){delete _0x3b6b6f[_0xf039('0x35')];}_0x3a6655[_0xf039('0x1a')](_0x2bcef5)[_0xf039('0x36')](_0x3b6b6f);};}function getUserAttributes(){return _(db[_0xf039('0x37')][_0xf039('0x38')])[_0xf039('0x39')](function(_0x55694f){return{'name':_0x55694f[_0xf039('0x3a')],'type':_0x55694f[_0xf039('0x3b')][_0xf039('0x3c')]};})['filter'](function(_0x4a085d){return![_0xf039('0x3d'),'salt',_0xf039('0x3e'),'resetPasswordToken',_0xf039('0x3f'),_0xf039('0x40'),_0xf039('0x41')][_0xf039('0x31')](_0x4a085d[_0xf039('0x35')]);})[_0xf039('0x30')]();}exports[_0xf039('0x42')]=function(_0x532057,_0x2adb09){var _0x51709c={},_0x4f2bc8={'count':0x0,'rows':[]};var _0x2288ae=getUserAttributes();_0x51709c=qs[_0xf039('0x43')](_0x2288ae,_0x532057);var _0x3621ac={'where':_0x51709c['where']};return db[_0xf039('0x37')][_0xf039('0x20')](_0x3621ac)[_0xf039('0x24')](function(_0x1683ce){_0x4f2bc8[_0xf039('0x20')]=_0x1683ce;if(_0x532057[_0xf039('0x44')]['includeAll']){_0x51709c['include']=[{'all':!![]}];}if(_0x532057['query'][_0xf039('0x45')]===_0xf039('0x46')){_0x51709c['include']=[{'model':db[_0xf039('0x47')],'as':_0xf039('0x45')}];}if(!_[_0xf039('0x31')](_0x51709c['attributes'],'id')){_0x51709c['attributes'][_0xf039('0x48')]('id');}return db['User']['findAll'](_0x51709c);})[_0xf039('0x24')](function(_0x443c24){_0x4f2bc8[_0xf039('0x49')]=_0x443c24;if(_0x532057[_0xf039('0x44')][_0xf039('0x4a')]===_0xf039('0x46')){var _0x482053=[];for(var _0x1b6738=0x0;_0x1b6738<_0x4f2bc8['rows']['length'];_0x1b6738++){_0x482053[_0xf039('0x48')](get_open_tabs(_0xf039('0x4b'),_0x4f2bc8[_0xf039('0x49')][_0x1b6738]['dataValues']));_0x482053[_0xf039('0x48')](get_open_tabs(_0xf039('0x4c'),_0x4f2bc8[_0xf039('0x49')][_0x1b6738][_0xf039('0x4d')]));_0x482053[_0xf039('0x48')](get_open_tabs(_0xf039('0x4e'),_0x4f2bc8[_0xf039('0x49')][_0x1b6738]['dataValues']));_0x482053['push'](get_open_tabs('mail',_0x4f2bc8['rows'][_0x1b6738][_0xf039('0x4d')]));_0x482053['push'](get_open_tabs(_0xf039('0x4f'),_0x4f2bc8['rows'][_0x1b6738]['dataValues']));_0x482053[_0xf039('0x48')](get_open_tabs(_0xf039('0x50'),_0x4f2bc8[_0xf039('0x49')][_0x1b6738][_0xf039('0x4d')]));}return Promise[_0xf039('0x51')](_0x482053)[_0xf039('0x24')](function(){return _0x4f2bc8;});}else{return _0x4f2bc8;}})['then'](respondWithFilteredResult(_0x2adb09,_0x51709c))[_0xf039('0x52')](handleError(_0x2adb09,null));};exports[_0xf039('0x53')]=function(_0x2c0722,_0x1b49bf){var _0x37c6b3=getUserAttributes();_0x2c0722[_0xf039('0x44')]['id']=_0x2c0722['params']['id'];var _0x2b5d4d=qs['getOptions'](_0x37c6b3,_0x2c0722);if(_0x2c0722[_0xf039('0x44')][_0xf039('0x54')]){_0x2b5d4d[_0xf039('0x55')]=[{'all':!![]}];}if(_0x2c0722[_0xf039('0x44')][_0xf039('0x45')]===_0xf039('0x46')){_0x2b5d4d[_0xf039('0x55')]=[{'model':db['UserSetting'],'as':_0xf039('0x45')}];}_0x2b5d4d=_[_0xf039('0x56')]({},_0x2b5d4d,_0x2c0722['options']);if(!_['includes'](_0x2b5d4d[_0xf039('0x57')],'id')){_0x2b5d4d[_0xf039('0x57')][_0xf039('0x48')]('id');}return db[_0xf039('0x37')][_0xf039('0x32')](_0x2b5d4d)[_0xf039('0x24')](handleEntityNotFound(_0x1b49bf,null))[_0xf039('0x24')](function(_0x50c1e8){var _0x540956=[];values=_0x50c1e8;if(_0x2c0722['query'][_0xf039('0x4a')]===_0xf039('0x46')){_0x540956['push'](get_open_tabs(_0xf039('0x4b'),_0x50c1e8['dataValues']));_0x540956['push'](get_open_tabs(_0xf039('0x4c'),_0x50c1e8[_0xf039('0x4d')]));_0x540956['push'](get_open_tabs(_0xf039('0x4f'),_0x50c1e8[_0xf039('0x4d')]));_0x540956[_0xf039('0x48')](get_open_tabs(_0xf039('0x50'),_0x50c1e8[_0xf039('0x4d')]));_0x540956[_0xf039('0x48')](get_open_tabs(_0xf039('0x4e'),_0x50c1e8[_0xf039('0x4d')]));_0x540956[_0xf039('0x48')](get_open_tabs(_0xf039('0x58'),_0x50c1e8['dataValues']));return Promise[_0xf039('0x51')](_0x540956);}else{return values;}})[_0xf039('0x24')](function(){return values;})['then'](respondWithResult(_0x1b49bf,null))[_0xf039('0x52')](handleError(_0x1b49bf,null));};exports[_0xf039('0x23')]=function(_0x1a884e,_0x2c8abe){if(_0x1a884e[_0xf039('0x59')]['id']){delete _0x1a884e[_0xf039('0x59')]['id'];}delete _0x1a884e[_0xf039('0x59')]['role'];return db[_0xf039('0x37')][_0xf039('0x32')]({'where':{'id':_0x1a884e[_0xf039('0x5a')]['id']}})[_0xf039('0x24')](handleEntityNotFound(_0x2c8abe,null))[_0xf039('0x24')](saveUpdates(_0x1a884e[_0xf039('0x59')],null))['then'](respondWithResult(_0x2c8abe,null))[_0xf039('0x52')](handleError(_0x2c8abe,null));};exports[_0xf039('0x5b')]=function(_0x780d7,_0x26fbfc){return db[_0xf039('0x37')][_0xf039('0x5b')]()[_0xf039('0x24')](respondWithResult(_0x26fbfc,null))[_0xf039('0x52')](handleError(_0x26fbfc,null));};exports[_0xf039('0x5c')]=function(_0x2b0eeb,_0x2245da){return db[_0xf039('0x37')][_0xf039('0x32')]({'where':{'id':_0x2b0eeb[_0xf039('0x5a')]['id']}})[_0xf039('0x24')](handleEntityNotFound(_0x2245da,null))[_0xf039('0x24')](function(_0x43be61){if(_0x43be61){return _0x43be61[_0xf039('0x5c')](_0x2b0eeb['body'][_0xf039('0x5d')],_[_0xf039('0x5e')](_0x2b0eeb['body'],['ids','id'])||{});}})[_0xf039('0x24')](respondWithResult(_0x2245da,null))[_0xf039('0x52')](handleError(_0x2245da,null));};function validateUser(_0x113596){return new Promise(function(_0x492196,_0x551d28){if(_0x113596[_0xf039('0x5f')])return _0x492196(_0x113596);return db['Setting'][_0xf039('0x60')](0x1)[_0xf039('0x24')](function(_0x2dba79){if(_0x2dba79['securePassword'])authService[_0xf039('0x61')](_0x113596['password']);db['User'][_0xf039('0x62')](_0xf039('0x5f'))[_0xf039('0x24')](function(_0x24d8b3){if(_['isNil'](_0x24d8b3)){_0x113596['internal']=_0x2dba79['min_internal']||0x1;return;}if(_['isNil'](_0x2dba79[_0xf039('0x63')])||_0x2dba79[_0xf039('0x63')]===_0x24d8b3){_0x113596[_0xf039('0x5f')]=_0x24d8b3+0x1;return;}if(_0x2dba79['min_internal']>_0x24d8b3){_0x113596[_0xf039('0x5f')]=_0x2dba79['min_internal'];return;}return db[_0xf039('0x64')][_0xf039('0x44')](_0xf039('0x65'),{'type':db['sequelize'][_0xf039('0x66')][_0xf039('0x67')]})[_0xf039('0x24')](function(_0x35e8b3){if(_0x35e8b3&&_0x35e8b3[_0xf039('0x68')]){for(var _0x5cf9ce=0x0,_0x3ff542=_0x35e8b3['length'];_0x5cf9ce<_0x3ff542&&_[_0xf039('0x69')](_0x113596[_0xf039('0x5f')]);_0x5cf9ce++){if(_0x2dba79[_0xf039('0x63')]<=_0x35e8b3[_0x5cf9ce][_0xf039('0x6a')]){_0x113596[_0xf039('0x5f')]=_0x35e8b3[_0x5cf9ce][_0xf039('0x6a')];}else if(_0x2dba79[_0xf039('0x63')]>_0x35e8b3[_0x5cf9ce][_0xf039('0x6a')]&&_0x2dba79[_0xf039('0x63')]<=_0x35e8b3[_0x5cf9ce]['to']){_0x113596['internal']=_0x2dba79[_0xf039('0x63')];}}}if(_[_0xf039('0x69')](_0x113596[_0xf039('0x5f')])){_0x113596[_0xf039('0x5f')]=_0x24d8b3+0x1;}return _0x492196(_0x113596);});});})[_0xf039('0x52')](function(_0x49322c){_0x551d28(_0x49322c);});});}function updateUser(_0x3c9f27){return new Promise(function(_0x350c2b,_0x379cf6){try{if(_0x3c9f27[_0xf039('0x6b')]){_0x3c9f27[_0xf039('0x6c')]=_0x3c9f27[_0xf039('0x5f')];_0x3c9f27[_0xf039('0x6d')]={'mailbox':_0x3c9f27[_0xf039('0x5f')],'password':_0x3c9f27[_0xf039('0x3d')],'fullname':_0x3c9f27['fullname'],'email':_0x3c9f27[_0xf039('0x6e')]};}if(_0x3c9f27[_0xf039('0x25')]==='agent'){if(!_0x3c9f27[_0xf039('0x6f')])_0x3c9f27[_0xf039('0x6f')]=[_0xf039('0x70'),'102',_0xf039('0x71'),_0xf039('0x72'),_0xf039('0x73'),'104',_0xf039('0x74'),'106','107',_0xf039('0x75'),'109','100',_0xf039('0x76'),_0xf039('0x77'),_0xf039('0x78')];}_0x350c2b(_0x3c9f27);}catch(_0x543eb9){_0x379cf6(_0x543eb9);}});}exports[_0xf039('0x79')]=function(_0x41ae2a,_0x13e52d){if(_0x41ae2a[_0xf039('0x2a')]['role']===_0xf039('0x2b'))throw new Error(_0xf039('0x7a'));if(_0x41ae2a[_0xf039('0x59')][_0xf039('0x25')]==='user'&&_0x41ae2a[_0xf039('0x2a')][_0xf039('0x25')]!==_0xf039('0x29')){throw new Error(_0xf039('0x7b'));}if(_0x41ae2a[_0xf039('0x59')][_0xf039('0x25')]===_0xf039('0x29')&&_0x41ae2a[_0xf039('0x2a')]['role']!==_0xf039('0x29')){throw new Error('Unauthorized.\x20You\x20must\x20be\x20an\x20administrator\x20in\x20order\x20to\x20create\x20another\x20administrator');}return licenseUtil[_0xf039('0x7c')]([_0x41ae2a['body']])[_0xf039('0x24')](function(){return validateUser(_0x41ae2a[_0xf039('0x59')]);})[_0xf039('0x24')](function(_0x3b793b){return updateUser(_0x3b793b)[_0xf039('0x24')](function(_0x20533e){if(_0x20533e[_0xf039('0x25')]==='admin'){_0x20533e[_0xf039('0x7d')]=_0x41ae2a[_0xf039('0x2a')][_0xf039('0x7d')];delete _0x20533e[_0xf039('0x7e')];}return _0x20533e;});})[_0xf039('0x24')](function(_0x4ccd63){return db[_0xf039('0x37')][_0xf039('0x79')](_0x4ccd63,{'include':[{'model':db[_0xf039('0x6d')],'as':'VoiceMail'}]});})[_0xf039('0x24')](function(_0x122bec){if(_0x41ae2a[_0xf039('0x59')][_0xf039('0x25')]===_0xf039('0x2a'))return _0x122bec;if(_0x41ae2a[_0xf039('0x2a')]['role']!=='user')return _0x122bec;return db[_0xf039('0x7f')][_0xf039('0x32')]({'where':{'name':_0x122bec[_0xf039('0x25')]===_0xf039('0x2b')?_0xf039('0x80'):'Telephones','userProfileId':_0x41ae2a[_0xf039('0x2a')][_0xf039('0x7e')]},'raw':!![]})['then'](function(_0x39faec){if(!_0x39faec||_0x39faec['autoAssociation']!=0x0)return _0x122bec;return db[_0xf039('0x33')][_0xf039('0x79')]({'name':_0x122bec[_0xf039('0x35')],'resourceId':_0x122bec['id'],'type':_0x39faec['name'],'sectionId':_0x39faec['id']},{})['then'](function(){return _0x122bec;});})[_0xf039('0x52')](function(_0x763a34){logger[_0xf039('0x81')](_0xf039('0x82'),_0x763a34);throw _0x763a34;});})[_0xf039('0x24')](respondWithResult(_0x13e52d,0xc9))[_0xf039('0x52')](handleError(_0x13e52d,null));};exports[_0xf039('0x83')]=function(_0x51bd2d,_0x862ad4){var _0xfbf2f8=_0x51bd2d[_0xf039('0x59')];var _0x56433d=[];if(_0x51bd2d[_0xf039('0x2a')][_0xf039('0x25')]===_0xf039('0x2b'))throw new Error('Unauthorized');if(_[_0xf039('0x84')](_0xfbf2f8,['role','user'])&&_0x51bd2d[_0xf039('0x2a')][_0xf039('0x25')]!==_0xf039('0x29')){throw new Error('Unauthorized.\x20You\x20must\x20be\x20an\x20administrator\x20in\x20order\x20to\x20create\x20an\x20user');}if(_[_0xf039('0x84')](_0xfbf2f8,['role','admin'])&&_0x51bd2d[_0xf039('0x2a')]['role']!==_0xf039('0x29')){throw new Error(_0xf039('0x85'));}return licenseUtil[_0xf039('0x7c')](_0xfbf2f8)[_0xf039('0x24')](function(){return validateUser(_0xfbf2f8[0x0]);})[_0xf039('0x24')](function(){for(var _0x5e3489=0x1;_0x5e3489<_0xfbf2f8[_0xf039('0x68')];_0x5e3489++){var _0x327fa6=_0xfbf2f8[_0x5e3489-0x1][_0xf039('0x5f')];if(!_0xfbf2f8[_0x5e3489]['internal'])_0xfbf2f8[_0x5e3489][_0xf039('0x5f')]=_0x327fa6+0x1;_0x56433d[_0xf039('0x48')](validateUser(_0xfbf2f8[_0x5e3489]));}return Promise[_0xf039('0x51')](_0x56433d);})[_0xf039('0x24')](function(){_0x56433d=[];for(var _0x8c0862=0x0;_0x8c0862<_0xfbf2f8[_0xf039('0x68')];_0x8c0862++){_0x56433d[_0xf039('0x48')](updateUser(_0xfbf2f8[_0x8c0862]));}return Promise[_0xf039('0x51')](_0x56433d);})[_0xf039('0x24')](function(){_0x56433d=_0xfbf2f8[_0xf039('0x39')](function(_0x3dc3ed){return db[_0xf039('0x37')][_0xf039('0x79')](_0x3dc3ed,{'include':[{'model':db['VoiceMail'],'as':'VoiceMail'}]})[_0xf039('0x24')](function(_0x34a0cc){_0x3dc3ed['id']=_0x34a0cc['id'];return _0x3dc3ed;});});return Promise['all'](_0x56433d);})[_0xf039('0x24')](function(_0x22f570){if(_0x51bd2d[_0xf039('0x59')][_0xf039('0x25')]===_0xf039('0x2a'))return _0x22f570;if(_0x51bd2d[_0xf039('0x2a')][_0xf039('0x25')]!==_0xf039('0x2a'))return _0x22f570;var _0x5551ae=_['some'](_0x22f570,function(_0x5bf089){return _0x5bf089[_0xf039('0x25')]==='agent'||_0x5bf089[_0xf039('0x25')]===_0xf039('0x2d');});if(!_0x5551ae)return _0x22f570;return db[_0xf039('0x7f')][_0xf039('0x86')]({'where':{'name':{'$or':[_0xf039('0x80'),'Telephones']},'userProfileId':_0x51bd2d[_0xf039('0x2a')][_0xf039('0x7e')]},'raw':!![]})['then'](function(_0x223517){if(_[_0xf039('0x87')](_0x223517)||!_[_0xf039('0x84')](_0x223517,['autoAssociation',0x0]))return _0x22f570;_0x56433d=[];var _0x2b5637=_(_0x223517)[_0xf039('0x39')](function(_0x40b068){if(_0x40b068[_0xf039('0x88')]===0x1)return;return _0x40b068[_0xf039('0x35')]===_0xf039('0x80')?_0xf039('0x2b'):_0xf039('0x2d');})[_0xf039('0x89')]()[_0xf039('0x30')]();for(var _0x21271a=0x0;_0x21271a<_0x22f570[_0xf039('0x68')];_0x21271a++){if(!_[_0xf039('0x31')](_0x2b5637,_0x22f570[_0x21271a][_0xf039('0x25')]))return;var _0x4ed32d=_0x22f570[_0x21271a]['role']===_0xf039('0x2b')?_0xf039('0x80'):'Telephones';_0x56433d[_0xf039('0x48')](db[_0xf039('0x33')][_0xf039('0x79')]({'name':_0x22f570[_0x21271a]['name'],'resourceId':_0x22f570[_0x21271a]['id'],'type':_0x4ed32d,'sectionId':_[_0xf039('0x32')](_0x223517,['name',_0x4ed32d])['id']},{}));}return Promise[_0xf039('0x51')](_0x56433d);});})['then'](respondWithResult(_0x862ad4,0xc9))['catch'](handleError(_0x862ad4,null));};exports[_0xf039('0x8a')]=function(_0x525604,_0x45ce82){if(_0x525604[_0xf039('0x59')]['id']){delete _0x525604[_0xf039('0x59')]['id'];}return db['User'][_0xf039('0x32')]({'where':{'id':_0x525604[_0xf039('0x5a')]['id']}})[_0xf039('0x24')](function(_0x5a5191){if(!_0x5a5191)return null;if(_0x5a5191['id']===_0x525604['user']['id']){if(!_0x525604['body'][_0xf039('0x8b')]||!_0x525604[_0xf039('0x59')][_0xf039('0x8c')]){throw new db['Sequelize']['ValidationError'](_0xf039('0x8d'));}if(!_0x5a5191[_0xf039('0x8e')](_0x525604[_0xf039('0x59')]['oldPassword'])){throw new db[(_0xf039('0x8f'))][(_0xf039('0x90'))](_0xf039('0x91'));}if(_0x525604['body']['oldPassword']===_0x525604[_0xf039('0x59')][_0xf039('0x8c')]){throw new db['Sequelize'][(_0xf039('0x90'))](_0xf039('0x92'));}}else if(_0x525604[_0xf039('0x2a')]['role']===_0xf039('0x29')){if(!_0x525604[_0xf039('0x59')][_0xf039('0x8c')]){throw new db[(_0xf039('0x8f'))][(_0xf039('0x90'))](_0xf039('0x93'));}}else if(_0x525604['user'][_0xf039('0x25')]===_0xf039('0x2a')){if(!_0x525604[_0xf039('0x59')][_0xf039('0x8c')]){throw new db['Sequelize'][(_0xf039('0x90'))](_0xf039('0x93'));}if(_0x5a5191[_0xf039('0x25')]!==_0xf039('0x2b')){throw new db[(_0xf039('0x8f'))][(_0xf039('0x90'))]('Unauthorized');}}else{throw new db[(_0xf039('0x8f'))]['ValidationError'](_0xf039('0x7a'));}return _0x5a5191;})['then'](handleEntityNotFound(_0x45ce82,null))['then'](function(_0xc0a55f){return db['Setting'][_0xf039('0x94')]({'attributes':['id',_0xf039('0x95'),_0xf039('0x96'),_0xf039('0x97')]})[_0xf039('0x24')](function(_0x1b2988){if(_0x1b2988[_0xf039('0x95')])authService[_0xf039('0x61')](_0x525604['body']['newPassword']);if(!_0x1b2988[_0xf039('0x96')]||!_0xc0a55f[_0xf039('0x3e')])return _0xc0a55f;authService[_0xf039('0x98')](_0x525604[_0xf039('0x59')][_0xf039('0x8c')],_0xc0a55f['previousPasswords'],_0x1b2988[_0xf039('0x97')]);return _0xc0a55f;})['then'](saveUpdates({'password':_0x525604[_0xf039('0x59')][_0xf039('0x8c')],'passwordResetAt':_0x525604[_0xf039('0x2a')]['id']==_0x525604[_0xf039('0x5a')]['id']?moment():null,'previousPasswords':authService[_0xf039('0x99')](_0x525604[_0xf039('0x59')][_0xf039('0x8c')],_0xc0a55f[_0xf039('0x3e')])},null));})[_0xf039('0x24')](respondWithResult(_0x45ce82,null))[_0xf039('0x52')](handleError(_0x45ce82,null));};exports[_0xf039('0x9a')]=function(_0x148c63,_0x52ae6c){var _0xd853fb=_0x148c63['body'][_0xf039('0x9b')];return db['User'][_0xf039('0x32')]({'where':{'id':_0x148c63[_0xf039('0x5a')]['id']},'attributes':['id','name',_0xf039('0x25'),_0xf039('0x9c'),_0xf039('0x9d'),_0xf039('0x9e'),_0xf039('0x9f')]})['then'](handleEntityNotFound(_0x52ae6c,null))[_0xf039('0x24')](function(_0x51d1ad){if(_0x51d1ad){if(!utils[_0xf039('0xa0')](_0xd853fb)){throw new db['Sequelize'][(_0xf039('0x90'))](_0xf039('0xa1'));}return _0x51d1ad[_0xf039('0xa2')+_[_0xf039('0xa3')](_0xd853fb[_0xf039('0xa4')]())+_0xf039('0xa5')](_0x148c63['body']['ids'],{'penalty':_0x148c63[_0xf039('0x59')][_0xf039('0xa6')]||0x0})[_0xf039('0xa7')](function(_0x5b8be4){for(var _0x4121af=0x0;_0x4121af<_0x148c63[_0xf039('0x59')][_0xf039('0x5d')][_0xf039('0x68')];_0x4121af+=0x1){var _0x2b6d2c={'UserId':Number(_0x148c63[_0xf039('0x5a')]['id'])};_0x2b6d2c[_[_0xf039('0xa3')](_0xd853fb['toLowerCase']())+_0xf039('0xa8')]=Number(_0x148c63[_0xf039('0x59')][_0xf039('0x5d')][_0x4121af]);socket['emit']('user'+_[_0xf039('0xa3')](_0xd853fb[_0xf039('0xa4')]())+_0xf039('0xa9'),_0x2b6d2c);}return _0x5b8be4;})[_0xf039('0x24')](function(){if(_0xd853fb===_0xf039('0xaa')){return db[_0xf039('0xab')]['findAll']({'where':{'id':_0x148c63['body'][_0xf039('0x5d')]||[]},'raw':!![],'attributes':['id','name']});}})[_0xf039('0x24')](function(_0x3f65fb){var _0x4f3c4e=_0x51d1ad[_0xf039('0x28')]({'plain':!![]});var _0x7d75e7=[];if(_0xd853fb===_0xf039('0xaa')&&_0x4f3c4e[_0xf039('0x25')]===_0xf039('0x2b')&&_0x4f3c4e[_0xf039('0x9c')]){for(let _0x175d75=0x0;_0x175d75<_0x3f65fb[_0xf039('0x68')];_0x175d75+=0x1){_0x7d75e7[_0xf039('0x48')]({'membername':_0x4f3c4e[_0xf039('0x35')],'UserId':_0x4f3c4e['id'],'queue_name':_0x3f65fb[_0x175d75]['name'],'VoiceQueueId':_0x3f65fb[_0x175d75]['id'],'interface':_[_0xf039('0x69')](_0x4f3c4e[_0xf039('0x9f')])?util[_0xf039('0xac')](_0xf039('0xad'),_0x4f3c4e[_0xf039('0x35')]):_0x4f3c4e['interface'],'paused':_0x4f3c4e['voicePause']||![],'penalty':_0x148c63[_0xf039('0x59')][_0xf039('0xa6')]||0x0});}return Promise[_0xf039('0x51')](_0x7d75e7['map'](function(_0x17759c){return db[_0xf039('0xae')]['upsert'](_0x17759c);}));}return _0x51d1ad;});}})[_0xf039('0x24')](respondWithStatusCode(_0x52ae6c,null))[_0xf039('0x52')](handleError(_0x52ae6c,null));};exports[_0xf039('0xaf')]=function(_0x2f0a37,_0x1a9b9f){var _0x384c4f,_0x55980f;return db[_0xf039('0x37')][_0xf039('0x32')]({'where':{'id':_0x2f0a37['params']['id']},'attributes':['id','name',_0xf039('0x25')]})[_0xf039('0x24')](handleEntityNotFound(_0x1a9b9f,null))[_0xf039('0x24')](function(_0x351209){if(_0x351209){_0x384c4f=_0x351209;if(!_0x2f0a37[_0xf039('0x44')][_0xf039('0x9b')]||!utils[_0xf039('0xa0')](_0x2f0a37[_0xf039('0x44')][_0xf039('0x9b')])){throw new db['Sequelize'][(_0xf039('0x90'))]('Unknown\x20channel');}return _0x351209[_0xf039('0xb0')+_[_0xf039('0xa3')](_0x2f0a37['query'][_0xf039('0x9b')][_0xf039('0xa4')]())+'Queues'](_0x2f0a37['query'][_0xf039('0x5d')]);}})[_0xf039('0x24')](function(_0x4a3336){if(_['isArray'](_0x2f0a37['query'][_0xf039('0x5d')])){for(var _0x1cc930=0x0;_0x1cc930<_0x2f0a37[_0xf039('0x44')][_0xf039('0x5d')][_0xf039('0x68')];_0x1cc930+=0x1){_0x55980f={'UserId':Number(_0x2f0a37[_0xf039('0x5a')]['id'])};_0x55980f[_[_0xf039('0xa3')](_0x2f0a37[_0xf039('0x44')][_0xf039('0x9b')][_0xf039('0xa4')]())+_0xf039('0xa8')]=Number(_0x2f0a37['query']['ids'][_0x1cc930]);socket[_0xf039('0x26')](_0xf039('0x2a')+_['capitalize'](_0x2f0a37[_0xf039('0x44')]['channel']['toLowerCase']())+'Queue:remove',_0x55980f);}}else{_0x55980f={'UserId':Number(_0x2f0a37[_0xf039('0x5a')]['id'])};_0x55980f[_[_0xf039('0xa3')](_0x2f0a37[_0xf039('0x44')][_0xf039('0x9b')][_0xf039('0xa4')]())+_0xf039('0xa8')]=Number(_0x2f0a37['query'][_0xf039('0x5d')]);socket[_0xf039('0x26')](_0xf039('0x2a')+_[_0xf039('0xa3')](_0x2f0a37[_0xf039('0x44')][_0xf039('0x9b')][_0xf039('0xa4')]())+_0xf039('0xb1'),_0x55980f);}return _0x4a3336;})['then'](function(){if(_0x2f0a37['query'][_0xf039('0x9b')]===_0xf039('0xaa')){return db[_0xf039('0xae')]['destroy']({'where':{'UserId':_0x2f0a37[_0xf039('0x5a')]['id'],'VoiceQueueId':_0x2f0a37[_0xf039('0x44')][_0xf039('0x5d')]},'individualHooks':!![]})[_0xf039('0x24')](function(){return _0x384c4f;});}return _0x384c4f;})['then'](respondWithStatusCode(_0x1a9b9f,null))['catch'](handleError(_0x1a9b9f,null));};exports['addAvatar']=function(_0x1d8ba8,_0x16d446){_0x1d8ba8[_0xf039('0x59')][_0xf039('0xb2')]=_0x1d8ba8[_0xf039('0xb3')][_0xf039('0xb4')];return db[_0xf039('0x37')][_0xf039('0x32')]({'where':{'id':_0x1d8ba8[_0xf039('0x5a')]['id']}})[_0xf039('0x24')](handleEntityNotFound(_0x16d446,null))['then'](saveUpdates(_0x1d8ba8['body'],null))['then'](respondWithResult(_0x16d446,null))[_0xf039('0x52')](handleError(_0x16d446,null));};exports[_0xf039('0xb5')]=function(_0x3c3b3a,_0x441952){var _0x1f9d12=path['join'](config[_0xf039('0xb6')],_0xf039('0xb7'));return db[_0xf039('0x37')]['find']({'where':{'id':_0x3c3b3a[_0xf039('0x5a')]['id']},'attributes':['id',_0xf039('0xb2')],'raw':!![]})['then'](handleEntityNotFound(_0x441952,null))[_0xf039('0x24')](function(_0x29973f){if(_0x29973f){if(_[_0xf039('0x69')](_0x29973f[_0xf039('0xb2')])){return _0x441952['download'](_0x1f9d12);}else{if(!fs[_0xf039('0xb8')](path[_0xf039('0xb9')](config[_0xf039('0xb6')],_0xf039('0xba'),_0x29973f['userpic']))){return _0x441952[_0xf039('0xbb')](_0x1f9d12);}return _0x441952[_0xf039('0xbb')](path[_0xf039('0xb9')](config['root'],'server/files/images/',_0x29973f[_0xf039('0xb2')]));}}})[_0xf039('0x52')](handleError(_0x441952,null));};exports[_0xf039('0xbc')]=function(_0xba2b3d,_0x1f0a38){return db[_0xf039('0x37')]['find']({'where':{'id':_0xba2b3d[_0xf039('0x5a')]['id']},'attributes':['id']})[_0xf039('0x24')](handleEntityNotFound(_0x1f0a38,null))['then'](function(_0xcb09f1){var _0x1cf645=[];values=_0xcb09f1[_0xf039('0x4d')];_0x1cf645[_0xf039('0x48')](get_open_tabs(_0xf039('0x4b'),_0xcb09f1[_0xf039('0x4d')]));_0x1cf645[_0xf039('0x48')](get_open_tabs(_0xf039('0x4c'),_0xcb09f1[_0xf039('0x4d')]));_0x1cf645[_0xf039('0x48')](get_open_tabs(_0xf039('0x4f'),_0xcb09f1['dataValues']));_0x1cf645['push'](get_open_tabs('whatsapp',_0xcb09f1['dataValues']));_0x1cf645[_0xf039('0x48')](get_open_tabs(_0xf039('0x4e'),_0xcb09f1[_0xf039('0x4d')]));_0x1cf645[_0xf039('0x48')](get_open_tabs(_0xf039('0x58'),_0xcb09f1[_0xf039('0x4d')]));return Promise['all'](_0x1cf645);})[_0xf039('0x24')](function(_0x27805e){if(_0x27805e){var _0x407a42=_[_0xf039('0x39')](values[_0xf039('0xbd')],function(_0x26350b){return{'channel':_0xf039('0xbe'),'id':_0x26350b['id'],'createdAt':_0x26350b['createdAt']};});var _0x11e70c=_[_0xf039('0x39')](values['FaxOpenTabs'],function(_0x2e3d9b){return{'channel':_0xf039('0xbf'),'id':_0x2e3d9b['id'],'createdAt':_0x2e3d9b['createdAt']};});var _0x13d11b=_[_0xf039('0x39')](values['OpenchannelOpenTabs'],function(_0x2034d2){return{'channel':_0xf039('0xc0'),'id':_0x2034d2['id'],'createdAt':_0x2034d2[_0xf039('0xc1')]};});var _0x4dad59=_[_0xf039('0x39')](values['MailOpenTabs'],function(_0x281662){return{'channel':_0xf039('0xc2'),'id':_0x281662['id'],'createdAt':_0x281662['createdAt']};});var _0x19a974=_[_0xf039('0x39')](values[_0xf039('0xc3')],function(_0x885f77){return{'channel':_0xf039('0xc4'),'id':_0x885f77['id'],'createdAt':_0x885f77[_0xf039('0xc1')]};});var _0x3a6867=_[_0xf039('0x39')](values[_0xf039('0xc5')],function(_0x19c4d9){return{'channel':_0xf039('0xc6'),'id':_0x19c4d9['id'],'createdAt':_0x19c4d9[_0xf039('0xc1')]};});var _0x129afe=_[_0xf039('0xc7')](_0x407a42,_0x11e70c,_0x13d11b,_0x4dad59,_0x19a974,_0x3a6867);var _0x4a5917={'count':_0x129afe[_0xf039('0x68')],'rows':_0x129afe};return _0x4a5917;}else return null;})['then'](respondWithResult(_0x1f0a38,null))[_0xf039('0x52')](handleError(_0x1f0a38,null));};exports[_0xf039('0xc8')]=function(_0x2f0a69,_0x230729){var _0x462602={};return db[_0xf039('0x37')][_0xf039('0x94')]({'where':{'id':_0x2f0a69[_0xf039('0x5a')]['id']}})[_0xf039('0x24')](function(_0x1734a0){if(!_0x1734a0){throw new APINotFoundError(util['format'](_0xf039('0xc9'),_0x2f0a69['params']['id']));}return contacts[_0xf039('0x5b')]();})[_0xf039('0x24')](function(_0x278eda){_0x2f0a69['query'][_0xf039('0x37')]=_0x2f0a69['params']['id'];_0x462602=qs['getOptions'](_0x278eda,_0x2f0a69);if(_0x2f0a69[_0xf039('0x44')][_0xf039('0xca')](_0xf039('0x54'))){_0x462602[_0xf039('0x55')]=[{'model':db['CmList'],'as':_0xf039('0xcb'),'required':![]},{'model':db[_0xf039('0xcc')],'as':_0xf039('0xcd'),'attributes':['id',_0xf039('0x35'),_0xf039('0xce')],'where':_0x2f0a69[_0xf039('0x44')][_0xf039('0xcf')]?{'id':_0x2f0a69[_0xf039('0x44')][_0xf039('0xcf')]}:undefined,'required':_0x2f0a69[_0xf039('0x44')][_0xf039('0xcf')]?!![]:![]}];}return contacts[_0xf039('0x86')](_0x2f0a69[_0xf039('0x44')],_0x2f0a69[_0xf039('0x2a')],_0x462602,_0x278eda);})[_0xf039('0x24')](respondWithFilteredResult(_0x230729,_0x462602))[_0xf039('0x52')](APIHandleError(_0x230729));};exports[_0xf039('0xd0')]=function(_0x31eff6,_0x49c7b9){var _0x23ffd4;var _0x305b5c={};var _0x3e09b3;return db[_0xf039('0x37')]['findOne']({'where':{'id':_0x31eff6[_0xf039('0x5a')]['id']},'attributes':['id',_0xf039('0x35'),'role']})[_0xf039('0x24')](handleEntityNotFound(_0x49c7b9,null))[_0xf039('0x24')](function(_0x43232f){if(!utils['isValidChannel'](_0x31eff6[_0xf039('0x44')][_0xf039('0x9b')])){throw new db[(_0xf039('0x8f'))][(_0xf039('0x90'))](_0xf039('0xa1'));}_0x23ffd4=_0x43232f;var _0x4f9350={};_0x4f9350[_0xf039('0xd1')]=_['keys'](db[_[_0xf039('0xa3')](_0x31eff6[_0xf039('0x44')][_0xf039('0x9b')])+'Queue'][_0xf039('0x38')]);_0x4f9350[_0xf039('0x44')]=_[_0xf039('0xd2')](_0x31eff6[_0xf039('0x44')]);_0x4f9350[_0xf039('0xd3')]=_[_0xf039('0xd4')](_0x4f9350['model'],_0x4f9350[_0xf039('0x44')]);_0x305b5c['attributes']=_[_0xf039('0xd4')](_0x4f9350[_0xf039('0xd1')],qs['fields'](_0x31eff6[_0xf039('0x44')]['fields']));_0x305b5c[_0xf039('0x57')]=_0x305b5c[_0xf039('0x57')][_0xf039('0x68')]?_0x305b5c[_0xf039('0x57')]:_0x4f9350[_0xf039('0xd1')];_0x305b5c['order']=qs['sort'](_0x31eff6[_0xf039('0x44')][_0xf039('0xd5')]);_0x305b5c[_0xf039('0xd6')]=qs[_0xf039('0xd3')](_[_0xf039('0xd7')](_0x31eff6['query'],_0x4f9350['filters']));if(_0x31eff6[_0xf039('0x44')][_0xf039('0x2e')]){_0x305b5c[_0xf039('0xd6')]=_[_0xf039('0x56')](_0x305b5c[_0xf039('0xd6')],{'$or':_[_0xf039('0x39')](_0x305b5c[_0xf039('0x57')],function(_0x2c1468){var _0x46231f={};_0x46231f[_0x2c1468]={'$like':'%'+_0x31eff6[_0xf039('0x44')]['filter']+'%'};return _0x46231f;})});}_0x305b5c=_['merge']({},_0x305b5c,_0x31eff6[_0xf039('0xd8')]);switch(_0x23ffd4[_0xf039('0x25')]){case _0xf039('0x29'):return db[_[_0xf039('0xa3')](_0x31eff6[_0xf039('0x44')][_0xf039('0x9b')])+_0xf039('0xd9')][_0xf039('0x86')](_0x305b5c);case'user':case'agent':return _0x23ffd4['get'+_['capitalize'](_0x31eff6[_0xf039('0x44')][_0xf039('0x9b')])+_0xf039('0xa5')](_0x305b5c);default:throw new db[(_0xf039('0x8f'))][(_0xf039('0x90'))](_0xf039('0xda'));}})[_0xf039('0x24')](function(_0x42ab20){_0x3e09b3=_0x42ab20[_0xf039('0x68')];if(!_0x31eff6[_0xf039('0x44')][_0xf039('0xca')](_0xf039('0xdb'))){_0x305b5c[_0xf039('0x1f')]=qs[_0xf039('0x1f')](_0x31eff6[_0xf039('0x44')][_0xf039('0x1f')]);_0x305b5c[_0xf039('0x1d')]=qs[_0xf039('0x1d')](_0x31eff6['query'][_0xf039('0x1d')]);}switch(_0x23ffd4['role']){case'admin':return db[_['capitalize'](_0x31eff6[_0xf039('0x44')][_0xf039('0x9b')])+_0xf039('0xd9')][_0xf039('0x86')](_0x305b5c);case'user':case _0xf039('0x2b'):return _0x23ffd4[_0xf039('0x28')+_['capitalize'](_0x31eff6[_0xf039('0x44')]['channel'])+'Queues'](_0x305b5c);}})[_0xf039('0x24')](function(_0x40dc23){return{'count':_0x3e09b3,'rows':_0x40dc23};})[_0xf039('0x24')](respondWithResult(_0x49c7b9,null))['catch'](handleError(_0x49c7b9,null));};exports[_0xf039('0xdc')]=function(_0x663270,_0x5349f2){var _0x47faac={};var _0x3208b9={};var _0x379ec7;var _0x2d133b;return db[_0xf039('0x37')][_0xf039('0x94')]({'where':{'id':_0x663270['params']['id']}})['then'](handleEntityNotFound(_0x5349f2,null))[_0xf039('0x24')](function(_0x1cc4a6){if(_0x1cc4a6){_0x379ec7=_0x1cc4a6;_0x3208b9[_0xf039('0xd1')]=_['keys'](db['UserVoiceQueueRt']['rawAttributes']);_0x3208b9[_0xf039('0x44')]=_[_0xf039('0xd2')](_0x663270['query']);_0x3208b9['filters']=_[_0xf039('0xd4')](_0x3208b9[_0xf039('0xd1')],_0x3208b9['query']);_0x47faac[_0xf039('0x57')]=_[_0xf039('0xd4')](_0x3208b9[_0xf039('0xd1')],qs[_0xf039('0xdd')](_0x663270[_0xf039('0x44')][_0xf039('0xdd')]));_0x47faac[_0xf039('0x57')]=_0x47faac['attributes'][_0xf039('0x68')]?_0x47faac['attributes']:_0x3208b9['model'];_0x47faac['order']=qs['sort'](_0x663270[_0xf039('0x44')][_0xf039('0xd5')]);_0x47faac['where']=qs['filters'](_[_0xf039('0xd7')](_0x663270[_0xf039('0x44')],_0x3208b9['filters']));if(_0x663270[_0xf039('0x44')][_0xf039('0x2e')]){_0x47faac[_0xf039('0xd6')]=_[_0xf039('0x56')](_0x47faac[_0xf039('0xd6')],{'$or':_[_0xf039('0x39')](_0x47faac['attributes'],function(_0x1a2197){var _0x283713={};_0x283713[_0x1a2197]={'$like':'%'+_0x663270[_0xf039('0x44')][_0xf039('0x2e')]+'%'};return _0x283713;})});}_0x47faac=_[_0xf039('0x56')]({},_0x47faac,_0x663270[_0xf039('0xd8')]);return _0x379ec7[_0xf039('0xdc')](_0x47faac);}})[_0xf039('0x24')](function(_0x50f7f7){if(_0x50f7f7){_0x2d133b=_0x50f7f7[_0xf039('0x68')];if(!_0x663270['query'][_0xf039('0xca')](_0xf039('0xdb'))){_0x47faac[_0xf039('0x1f')]=qs[_0xf039('0x1f')](_0x663270[_0xf039('0x44')][_0xf039('0x1f')]);_0x47faac[_0xf039('0x1d')]=qs[_0xf039('0x1d')](_0x663270['query'][_0xf039('0x1d')]);}return _0x379ec7[_0xf039('0xdc')](_0x47faac);}})[_0xf039('0x24')](function(_0x21f518){if(_0x21f518){return _0x21f518?{'count':_0x2d133b,'rows':_0x21f518}:null;}})['then'](respondWithResult(_0x5349f2,null))[_0xf039('0x52')](handleError(_0x5349f2,null));};exports[_0xf039('0xde')]=function(_0x3e5502,_0x5a90fc){var _0xbe39d2={};var _0x50dcf6={};var _0x561965;var _0x5059a6;return db[_0xf039('0x37')]['findOne']({'where':{'id':_0x3e5502[_0xf039('0x5a')]['id']}})[_0xf039('0x24')](handleEntityNotFound(_0x5a90fc,null))['then'](function(_0x191ee0){if(_0x191ee0){_0x561965=_0x191ee0;_0x50dcf6[_0xf039('0xd1')]=_['keys'](db['ChatGroup'][_0xf039('0x38')]);_0x50dcf6[_0xf039('0x44')]=_[_0xf039('0xd2')](_0x3e5502[_0xf039('0x44')]);_0x50dcf6[_0xf039('0xd3')]=_[_0xf039('0xd4')](_0x50dcf6[_0xf039('0xd1')],_0x50dcf6[_0xf039('0x44')]);_0xbe39d2[_0xf039('0x57')]=_[_0xf039('0xd4')](_0x50dcf6[_0xf039('0xd1')],qs[_0xf039('0xdd')](_0x3e5502['query'][_0xf039('0xdd')]));_0xbe39d2[_0xf039('0x57')]=_0xbe39d2['attributes'][_0xf039('0x68')]?_0xbe39d2[_0xf039('0x57')]:_0x50dcf6['model'];_0xbe39d2[_0xf039('0xdf')]=qs[_0xf039('0xd5')](_0x3e5502[_0xf039('0x44')][_0xf039('0xd5')]);_0xbe39d2[_0xf039('0xd6')]=qs[_0xf039('0xd3')](_[_0xf039('0xd7')](_0x3e5502[_0xf039('0x44')],_0x50dcf6[_0xf039('0xd3')]));if(_0x3e5502['query'][_0xf039('0x2e')]){_0xbe39d2['where']=_['merge'](_0xbe39d2[_0xf039('0xd6')],{'$or':_[_0xf039('0x39')](_0xbe39d2[_0xf039('0x57')],function(_0x4ea8fe){var _0x3bb653={};_0x3bb653[_0x4ea8fe]={'$like':'%'+_0x3e5502[_0xf039('0x44')][_0xf039('0x2e')]+'%'};return _0x3bb653;})});}_0xbe39d2=_['merge']({},_0xbe39d2,_0x3e5502[_0xf039('0xd8')]);return _0x561965[_0xf039('0xde')](_0xbe39d2);}})['then'](function(_0x10976e){if(_0x10976e){_0x5059a6=_0x10976e[_0xf039('0x68')];if(!_0x3e5502[_0xf039('0x44')]['hasOwnProperty'](_0xf039('0xdb'))){_0xbe39d2[_0xf039('0x1f')]=qs[_0xf039('0x1f')](_0x3e5502['query'][_0xf039('0x1f')]);_0xbe39d2[_0xf039('0x1d')]=qs[_0xf039('0x1d')](_0x3e5502[_0xf039('0x44')][_0xf039('0x1d')]);}return _0x561965[_0xf039('0xde')](_0xbe39d2);}})['then'](function(_0x101483){if(_0x101483){return _0x101483?{'count':_0x5059a6,'rows':_0x101483}:null;}})[_0xf039('0x24')](respondWithResult(_0x5a90fc,null))['catch'](handleError(_0x5a90fc,null));};exports[_0xf039('0xe0')]=function(_0x5ad522,_0x20749a){var _0x1ed5d7={'raw':!![],'where':{}};var _0x32afcd={};var _0x448a12={'count':0x0,'rows':[]};return db[_0xf039('0x37')][_0xf039('0x94')]({'where':{'id':_0x5ad522[_0xf039('0x5a')]['id']}})['then'](handleEntityNotFound(_0x20749a,null))[_0xf039('0x24')](function(_0xd68661){if(_0xd68661){_0x32afcd[_0xf039('0xd1')]=_[_0xf039('0xd2')](db[_0xf039('0xe1')][_0xf039('0x38')]);_0x32afcd[_0xf039('0x44')]=_['keys'](_0x5ad522[_0xf039('0x44')]);_0x32afcd[_0xf039('0xd3')]=_[_0xf039('0xd4')](_0x32afcd[_0xf039('0xd1')],_0x32afcd[_0xf039('0x44')]);_0x1ed5d7[_0xf039('0x57')]=_['intersection'](_0x32afcd[_0xf039('0xd1')],qs[_0xf039('0xdd')](_0x5ad522[_0xf039('0x44')][_0xf039('0xdd')]));_0x1ed5d7[_0xf039('0x57')]=_0x1ed5d7['attributes'][_0xf039('0x68')]?_0x1ed5d7[_0xf039('0x57')]:_0x32afcd[_0xf039('0xd1')];if(!_0x5ad522[_0xf039('0x44')][_0xf039('0xca')](_0xf039('0xdb'))){_0x1ed5d7[_0xf039('0x1f')]=qs[_0xf039('0x1f')](_0x5ad522[_0xf039('0x44')]['limit']);_0x1ed5d7[_0xf039('0x1d')]=qs[_0xf039('0x1d')](_0x5ad522['query'][_0xf039('0x1d')]);}_0x1ed5d7[_0xf039('0xdf')]=qs['sort'](_0x5ad522[_0xf039('0x44')][_0xf039('0xd5')]);_0x1ed5d7[_0xf039('0xd6')]=qs['filters'](_['pick'](_0x5ad522[_0xf039('0x44')],_0x32afcd[_0xf039('0xd3')]));_0x1ed5d7[_0xf039('0xd6')][_0xf039('0xe2')]=_0xd68661['id'];if(_0x5ad522[_0xf039('0x44')][_0xf039('0x2e')]){_0x1ed5d7['where']=_[_0xf039('0x56')](_0x1ed5d7[_0xf039('0xd6')],{'$or':_['map'](_0x1ed5d7[_0xf039('0x57')],function(_0x1ca06b){var _0x2dec13={};_0x2dec13[_0x1ca06b]={'$like':'%'+_0x5ad522[_0xf039('0x44')]['filter']+'%'};return _0x2dec13;})});}_0x1ed5d7=_[_0xf039('0x56')]({},_0x1ed5d7,_0x5ad522[_0xf039('0xd8')]);return db['VoiceRecording'][_0xf039('0x20')]({'where':_0x1ed5d7[_0xf039('0xd6')]})[_0xf039('0x24')](function(_0x56f576){_0x448a12[_0xf039('0x20')]=_0x56f576;if(_0x5ad522['query']['includeAll']){_0x1ed5d7[_0xf039('0x55')]=[{'all':!![]}];}return db[_0xf039('0xe1')][_0xf039('0x86')](_0x1ed5d7);})[_0xf039('0x24')](function(_0x43f745){_0x448a12[_0xf039('0x49')]=_0x43f745;return _0x448a12;});}})['then'](respondWithFilteredResult(_0x20749a,_0x1ed5d7))['catch'](handleError(_0x20749a,null));};exports[_0xf039('0xe3')]=function(_0x14beac,_0xee99e8){var _0xcd318c={'raw':!![],'where':{}};var _0x424912={};var _0x1c3a2e={'count':0x0,'rows':[]};return db['User'][_0xf039('0x94')]({'where':{'id':_0x14beac[_0xf039('0x5a')]['id']}})[_0xf039('0x24')](handleEntityNotFound(_0xee99e8,null))['then'](function(_0x5224d3){if(_0x5224d3){_0x424912[_0xf039('0xd1')]=_[_0xf039('0xd2')](db[_0xf039('0xe4')][_0xf039('0x38')]);_0x424912[_0xf039('0x44')]=_['keys'](_0x14beac[_0xf039('0x44')]);_0x424912[_0xf039('0xd3')]=_['intersection'](_0x424912[_0xf039('0xd1')],_0x424912[_0xf039('0x44')]);_0xcd318c['attributes']=_['intersection'](_0x424912['model'],qs[_0xf039('0xdd')](_0x14beac[_0xf039('0x44')]['fields']));_0xcd318c[_0xf039('0x57')]=_0xcd318c['attributes']['length']?_0xcd318c['attributes']:_0x424912[_0xf039('0xd1')];if(!_0x14beac[_0xf039('0x44')][_0xf039('0xca')](_0xf039('0xdb'))){_0xcd318c[_0xf039('0x1f')]=qs['limit'](_0x14beac[_0xf039('0x44')]['limit']);_0xcd318c[_0xf039('0x1d')]=qs[_0xf039('0x1d')](_0x14beac['query'][_0xf039('0x1d')]);}_0xcd318c['order']=qs['sort'](_0x14beac['query'][_0xf039('0xd5')]);_0xcd318c['where']=qs[_0xf039('0xd3')](_[_0xf039('0xd7')](_0x14beac[_0xf039('0x44')],_0x424912[_0xf039('0xd3')]));_0xcd318c[_0xf039('0xd6')][_0xf039('0xe2')]=_0x5224d3['id'];if(_0x14beac[_0xf039('0x44')][_0xf039('0x2e')]){_0xcd318c[_0xf039('0xd6')]=_['merge'](_0xcd318c[_0xf039('0xd6')],{'$or':_[_0xf039('0x39')](_0xcd318c[_0xf039('0x57')],function(_0x3cb49f){var _0x2b6e14={};_0x2b6e14[_0x3cb49f]={'$like':'%'+_0x14beac[_0xf039('0x44')]['filter']+'%'};return _0x2b6e14;})});}_0xcd318c=_['merge']({},_0xcd318c,_0x14beac[_0xf039('0xd8')]);return db['ScreenRecording'][_0xf039('0x20')]({'where':_0xcd318c[_0xf039('0xd6')]})['then'](function(_0x70d87f){_0x1c3a2e['count']=_0x70d87f;if(_0x14beac['query'][_0xf039('0x54')]){_0xcd318c[_0xf039('0x55')]=[{'all':!![]}];}return db[_0xf039('0xe4')]['findAll'](_0xcd318c);})[_0xf039('0x24')](function(_0x318659){_0x1c3a2e['rows']=_0x318659;return _0x1c3a2e;});}})['then'](respondWithFilteredResult(_0xee99e8,_0xcd318c))[_0xf039('0x52')](handleError(_0xee99e8,null));};exports[_0xf039('0xe5')]=function(_0x19ca29,_0x17b599){var _0x34a8e9={};var _0x111ce2={};var _0x37eef5;var _0x442d8c;return db[_0xf039('0x37')][_0xf039('0x94')]({'where':{'id':_0x19ca29[_0xf039('0x5a')]['id']}})[_0xf039('0x24')](handleEntityNotFound(_0x17b599,null))[_0xf039('0x24')](function(_0x169beb){if(_0x169beb){_0x37eef5=_0x169beb;_0x111ce2[_0xf039('0xd1')]=_[_0xf039('0xd2')](db['ChatInteraction']['rawAttributes']);_0x111ce2['query']=_[_0xf039('0xd2')](_0x19ca29['query']);_0x111ce2[_0xf039('0xd3')]=_[_0xf039('0xd4')](_0x111ce2[_0xf039('0xd1')],_0x111ce2[_0xf039('0x44')]);_0x34a8e9['attributes']=_['intersection'](_0x111ce2['model'],qs[_0xf039('0xdd')](_0x19ca29[_0xf039('0x44')][_0xf039('0xdd')]));_0x34a8e9[_0xf039('0x57')]=_0x34a8e9['attributes']['length']?_0x34a8e9[_0xf039('0x57')]:_0x111ce2['model'];_0x34a8e9[_0xf039('0xdf')]=qs[_0xf039('0xd5')](_0x19ca29[_0xf039('0x44')][_0xf039('0xd5')]);_0x34a8e9[_0xf039('0xd6')]=qs[_0xf039('0xd3')](_[_0xf039('0xd7')](_0x19ca29[_0xf039('0x44')],_0x111ce2[_0xf039('0xd3')]));if(_0x19ca29['query']['filter']){_0x34a8e9[_0xf039('0xd6')]=_[_0xf039('0x56')](_0x34a8e9[_0xf039('0xd6')],{'$or':_[_0xf039('0x39')](_0x34a8e9[_0xf039('0x57')],function(_0x41eb9a){var _0x268603={};_0x268603[_0x41eb9a]={'$like':'%'+_0x19ca29[_0xf039('0x44')][_0xf039('0x2e')]+'%'};return _0x268603;})});}_0x34a8e9=_['merge']({},_0x34a8e9,_0x19ca29[_0xf039('0xd8')]);return _0x37eef5['getChatInteractions'](_0x34a8e9);}})['then'](function(_0x332ee6){if(_0x332ee6){_0x442d8c=_0x332ee6[_0xf039('0x68')];if(!_0x19ca29[_0xf039('0x44')][_0xf039('0xca')]('nolimit')){_0x34a8e9[_0xf039('0x1f')]=qs[_0xf039('0x1f')](_0x19ca29[_0xf039('0x44')][_0xf039('0x1f')]);_0x34a8e9['offset']=qs[_0xf039('0x1d')](_0x19ca29[_0xf039('0x44')][_0xf039('0x1d')]);}return _0x37eef5[_0xf039('0xe5')](_0x34a8e9);}})[_0xf039('0x24')](function(_0x1ef5d5){if(_0x1ef5d5){return _0x1ef5d5?{'count':_0x442d8c,'rows':_0x1ef5d5}:null;}})[_0xf039('0x24')](respondWithResult(_0x17b599,null))[_0xf039('0x52')](handleError(_0x17b599,null));};exports[_0xf039('0xe6')]=function(_0x1e59bd,_0x647f7){var _0x3d20f1={};var _0x216c79={};var _0x1ea592;var _0x5dcb56;return db[_0xf039('0x37')][_0xf039('0x94')]({'where':{'id':_0x1e59bd[_0xf039('0x5a')]['id']}})[_0xf039('0x24')](handleEntityNotFound(_0x647f7,null))[_0xf039('0x24')](function(_0x31050c){if(_0x31050c){_0x1ea592=_0x31050c;_0x216c79[_0xf039('0xd1')]=_['keys'](db[_0xf039('0xe7')][_0xf039('0x38')]);_0x216c79[_0xf039('0x44')]=_[_0xf039('0xd2')](_0x1e59bd['query']);_0x216c79[_0xf039('0xd3')]=_[_0xf039('0xd4')](_0x216c79[_0xf039('0xd1')],_0x216c79[_0xf039('0x44')]);_0x3d20f1[_0xf039('0x57')]=_[_0xf039('0xd4')](_0x216c79[_0xf039('0xd1')],qs[_0xf039('0xdd')](_0x1e59bd[_0xf039('0x44')][_0xf039('0xdd')]));_0x3d20f1[_0xf039('0x57')]=_0x3d20f1[_0xf039('0x57')][_0xf039('0x68')]?_0x3d20f1['attributes']:_0x216c79[_0xf039('0xd1')];_0x3d20f1[_0xf039('0xdf')]=qs[_0xf039('0xd5')](_0x1e59bd[_0xf039('0x44')][_0xf039('0xd5')]);_0x3d20f1[_0xf039('0xd6')]=qs[_0xf039('0xd3')](_[_0xf039('0xd7')](_0x1e59bd[_0xf039('0x44')],_0x216c79[_0xf039('0xd3')]));if(_0x1e59bd[_0xf039('0x44')][_0xf039('0x2e')]){_0x3d20f1[_0xf039('0xd6')]=_[_0xf039('0x56')](_0x3d20f1['where'],{'$or':_[_0xf039('0x39')](_0x3d20f1[_0xf039('0x57')],function(_0x5510eb){var _0x289537={};_0x289537[_0x5510eb]={'$like':'%'+_0x1e59bd[_0xf039('0x44')][_0xf039('0x2e')]+'%'};return _0x289537;})});}_0x3d20f1=_[_0xf039('0x56')]({},_0x3d20f1,_0x1e59bd[_0xf039('0xd8')]);return _0x1ea592['getOpenchannelInteractions'](_0x3d20f1);}})['then'](function(_0x61e5cd){if(_0x61e5cd){_0x5dcb56=_0x61e5cd[_0xf039('0x68')];if(!_0x1e59bd['query'][_0xf039('0xca')](_0xf039('0xdb'))){_0x3d20f1[_0xf039('0x1f')]=qs[_0xf039('0x1f')](_0x1e59bd[_0xf039('0x44')][_0xf039('0x1f')]);_0x3d20f1[_0xf039('0x1d')]=qs[_0xf039('0x1d')](_0x1e59bd[_0xf039('0x44')][_0xf039('0x1d')]);}return _0x1ea592[_0xf039('0xe6')](_0x3d20f1);}})[_0xf039('0x24')](function(_0x30ae59){if(_0x30ae59){return _0x30ae59?{'count':_0x5dcb56,'rows':_0x30ae59}:null;}})[_0xf039('0x24')](respondWithResult(_0x647f7,null))[_0xf039('0x52')](handleError(_0x647f7,null));};exports[_0xf039('0xe8')]=function(_0xc272ed,_0xbd0592){var _0x3f4e56={'raw':!![],'where':{}};var _0x512c42={};var _0xccc803={'count':0x0,'rows':[]};return db[_0xf039('0x37')][_0xf039('0x94')]({'where':{'id':_0xc272ed[_0xf039('0x5a')]['id']}})[_0xf039('0x24')](handleEntityNotFound(_0xbd0592,null))[_0xf039('0x24')](function(_0x20ed40){if(_0x20ed40){_0x512c42[_0xf039('0xd1')]=_[_0xf039('0xd2')](db[_0xf039('0xe9')][_0xf039('0x38')]);_0x512c42[_0xf039('0x44')]=_[_0xf039('0xd2')](_0xc272ed['query']);_0x512c42[_0xf039('0xd3')]=_[_0xf039('0xd4')](_0x512c42[_0xf039('0xd1')],_0x512c42['query']);_0x3f4e56[_0xf039('0x57')]=_[_0xf039('0xd4')](_0x512c42[_0xf039('0xd1')],qs[_0xf039('0xdd')](_0xc272ed[_0xf039('0x44')][_0xf039('0xdd')]));_0x3f4e56[_0xf039('0x57')]=_0x3f4e56['attributes'][_0xf039('0x68')]?_0x3f4e56[_0xf039('0x57')]:_0x512c42['model'];if(!_0xc272ed['query'][_0xf039('0xca')](_0xf039('0xdb'))){_0x3f4e56[_0xf039('0x1f')]=qs[_0xf039('0x1f')](_0xc272ed[_0xf039('0x44')][_0xf039('0x1f')]);_0x3f4e56['offset']=qs[_0xf039('0x1d')](_0xc272ed[_0xf039('0x44')][_0xf039('0x1d')]);}_0x3f4e56[_0xf039('0xdf')]=qs['sort'](_0xc272ed[_0xf039('0x44')]['sort']);_0x3f4e56[_0xf039('0xd6')]=qs[_0xf039('0xd3')](_[_0xf039('0xd7')](_0xc272ed[_0xf039('0x44')],_0x512c42[_0xf039('0xd3')]));_0x3f4e56['where'][_0xf039('0xe2')]=_0x20ed40['id'];if(_0xc272ed[_0xf039('0x44')]['filter']){_0x3f4e56['where']=_[_0xf039('0x56')](_0x3f4e56[_0xf039('0xd6')],{'$or':_['map'](_0x3f4e56[_0xf039('0x57')],function(_0x478c64){var _0xfd344d={};_0xfd344d[_0x478c64]={'$like':'%'+_0xc272ed[_0xf039('0x44')][_0xf039('0x2e')]+'%'};return _0xfd344d;})});}_0x3f4e56=_['merge']({},_0x3f4e56,_0xc272ed[_0xf039('0xd8')]);return db[_0xf039('0xe9')][_0xf039('0x20')]({'where':_0x3f4e56['where']})['then'](function(_0x45b250){_0xccc803[_0xf039('0x20')]=_0x45b250;if(_0xc272ed[_0xf039('0x44')][_0xf039('0x54')]){_0x3f4e56[_0xf039('0x55')]=[{'all':!![]}];}return db[_0xf039('0xe9')][_0xf039('0x86')](_0x3f4e56);})['then'](function(_0x41bffd){_0xccc803[_0xf039('0x49')]=_0x41bffd;return _0xccc803;});}})[_0xf039('0x24')](respondWithFilteredResult(_0xbd0592,_0x3f4e56))[_0xf039('0x52')](handleError(_0xbd0592,null));};exports[_0xf039('0xea')]=function(_0x21a9ab,_0x57216b){var _0x179b97={};var _0x3694b6={};var _0x391a31;var _0x159224;return db['User'][_0xf039('0x94')]({'where':{'id':_0x21a9ab[_0xf039('0x5a')]['id']}})[_0xf039('0x24')](handleEntityNotFound(_0x57216b,null))['then'](function(_0x3f3f1f){if(_0x3f3f1f){_0x391a31=_0x3f3f1f;_0x3694b6[_0xf039('0xd1')]=_[_0xf039('0xd2')](db[_0xf039('0xeb')][_0xf039('0x38')]);_0x3694b6[_0xf039('0x44')]=_[_0xf039('0xd2')](_0x21a9ab['query']);_0x3694b6[_0xf039('0xd3')]=_[_0xf039('0xd4')](_0x3694b6[_0xf039('0xd1')],_0x3694b6[_0xf039('0x44')]);_0x179b97['attributes']=_[_0xf039('0xd4')](_0x3694b6[_0xf039('0xd1')],qs['fields'](_0x21a9ab[_0xf039('0x44')]['fields']));_0x179b97['attributes']=_0x179b97['attributes'][_0xf039('0x68')]?_0x179b97[_0xf039('0x57')]:_0x3694b6['model'];_0x179b97['order']=qs[_0xf039('0xd5')](_0x21a9ab[_0xf039('0x44')][_0xf039('0xd5')]);_0x179b97[_0xf039('0xd6')]=qs['filters'](_[_0xf039('0xd7')](_0x21a9ab[_0xf039('0x44')],_0x3694b6[_0xf039('0xd3')]));if(_0x21a9ab['query'][_0xf039('0x2e')]){_0x179b97[_0xf039('0xd6')]=_[_0xf039('0x56')](_0x179b97['where'],{'$or':_['map'](_0x179b97[_0xf039('0x57')],function(_0x48be94){var _0x32e31c={};_0x32e31c[_0x48be94]={'$like':'%'+_0x21a9ab[_0xf039('0x44')][_0xf039('0x2e')]+'%'};return _0x32e31c;})});}_0x179b97=_[_0xf039('0x56')]({},_0x179b97,_0x21a9ab[_0xf039('0xd8')]);return _0x391a31[_0xf039('0xea')](_0x179b97);}})['then'](function(_0x32752c){if(_0x32752c){_0x159224=_0x32752c[_0xf039('0x68')];if(!_0x21a9ab['query']['hasOwnProperty'](_0xf039('0xdb'))){_0x179b97[_0xf039('0x1f')]=qs[_0xf039('0x1f')](_0x21a9ab[_0xf039('0x44')][_0xf039('0x1f')]);_0x179b97[_0xf039('0x1d')]=qs[_0xf039('0x1d')](_0x21a9ab[_0xf039('0x44')][_0xf039('0x1d')]);}return _0x391a31[_0xf039('0xea')](_0x179b97);}})[_0xf039('0x24')](function(_0x1fa4e6){if(_0x1fa4e6){return _0x1fa4e6?{'count':_0x159224,'rows':_0x1fa4e6}:null;}})[_0xf039('0x24')](respondWithResult(_0x57216b,null))[_0xf039('0x52')](handleError(_0x57216b,null));};exports[_0xf039('0xec')]=function(_0x2b171a,_0x16202c){var _0x38a84f={};var _0x14ff4d={};var _0x3c0d4d;var _0x25b97a;return db[_0xf039('0x37')][_0xf039('0x94')]({'where':{'id':_0x2b171a[_0xf039('0x5a')]['id']}})[_0xf039('0x24')](handleEntityNotFound(_0x16202c,null))[_0xf039('0x24')](function(_0x2dc7d4){if(_0x2dc7d4){_0x3c0d4d=_0x2dc7d4;_0x14ff4d[_0xf039('0xd1')]=_[_0xf039('0xd2')](db['FaxInteraction'][_0xf039('0x38')]);_0x14ff4d['query']=_[_0xf039('0xd2')](_0x2b171a['query']);_0x14ff4d[_0xf039('0xd3')]=_['intersection'](_0x14ff4d[_0xf039('0xd1')],_0x14ff4d['query']);_0x38a84f[_0xf039('0x57')]=_[_0xf039('0xd4')](_0x14ff4d[_0xf039('0xd1')],qs[_0xf039('0xdd')](_0x2b171a[_0xf039('0x44')]['fields']));_0x38a84f[_0xf039('0x57')]=_0x38a84f['attributes'][_0xf039('0x68')]?_0x38a84f['attributes']:_0x14ff4d[_0xf039('0xd1')];_0x38a84f['order']=qs[_0xf039('0xd5')](_0x2b171a['query'][_0xf039('0xd5')]);_0x38a84f[_0xf039('0xd6')]=qs['filters'](_['pick'](_0x2b171a[_0xf039('0x44')],_0x14ff4d['filters']));if(_0x2b171a[_0xf039('0x44')][_0xf039('0x2e')]){_0x38a84f[_0xf039('0xd6')]=_[_0xf039('0x56')](_0x38a84f[_0xf039('0xd6')],{'$or':_[_0xf039('0x39')](_0x38a84f[_0xf039('0x57')],function(_0x41178c){var _0x4d0d23={};_0x4d0d23[_0x41178c]={'$like':'%'+_0x2b171a[_0xf039('0x44')][_0xf039('0x2e')]+'%'};return _0x4d0d23;})});}_0x38a84f=_['merge']({},_0x38a84f,_0x2b171a[_0xf039('0xd8')]);return _0x3c0d4d['getFaxInteractions'](_0x38a84f);}})['then'](function(_0x454bb3){if(_0x454bb3){_0x25b97a=_0x454bb3['length'];if(!_0x2b171a['query']['hasOwnProperty']('nolimit')){_0x38a84f[_0xf039('0x1f')]=qs[_0xf039('0x1f')](_0x2b171a[_0xf039('0x44')][_0xf039('0x1f')]);_0x38a84f[_0xf039('0x1d')]=qs[_0xf039('0x1d')](_0x2b171a['query'][_0xf039('0x1d')]);}return _0x3c0d4d[_0xf039('0xec')](_0x38a84f);}})['then'](function(_0x1f8e4e){if(_0x1f8e4e){return _0x1f8e4e?{'count':_0x25b97a,'rows':_0x1f8e4e}:null;}})[_0xf039('0x24')](respondWithResult(_0x16202c,null))[_0xf039('0x52')](handleError(_0x16202c,null));};exports['getWhatsappInteractions']=function(_0x5bf6d9,_0x46d5d9){var _0x39def0={};var _0x2bde6e={};var _0x4e4932;var _0x56fe76;return db[_0xf039('0x37')][_0xf039('0x94')]({'where':{'id':_0x5bf6d9[_0xf039('0x5a')]['id']}})['then'](handleEntityNotFound(_0x46d5d9,null))[_0xf039('0x24')](function(_0x301de3){if(_0x301de3){_0x4e4932=_0x301de3;_0x2bde6e['model']=_[_0xf039('0xd2')](db[_0xf039('0xed')][_0xf039('0x38')]);_0x2bde6e['query']=_[_0xf039('0xd2')](_0x5bf6d9['query']);_0x2bde6e[_0xf039('0xd3')]=_['intersection'](_0x2bde6e[_0xf039('0xd1')],_0x2bde6e[_0xf039('0x44')]);_0x39def0['attributes']=_[_0xf039('0xd4')](_0x2bde6e[_0xf039('0xd1')],qs[_0xf039('0xdd')](_0x5bf6d9['query'][_0xf039('0xdd')]));_0x39def0[_0xf039('0x57')]=_0x39def0[_0xf039('0x57')]['length']?_0x39def0[_0xf039('0x57')]:_0x2bde6e[_0xf039('0xd1')];_0x39def0[_0xf039('0xdf')]=qs['sort'](_0x5bf6d9[_0xf039('0x44')][_0xf039('0xd5')]);_0x39def0[_0xf039('0xd6')]=qs[_0xf039('0xd3')](_['pick'](_0x5bf6d9[_0xf039('0x44')],_0x2bde6e[_0xf039('0xd3')]));if(_0x5bf6d9[_0xf039('0x44')][_0xf039('0x2e')]){_0x39def0[_0xf039('0xd6')]=_[_0xf039('0x56')](_0x39def0['where'],{'$or':_['map'](_0x39def0[_0xf039('0x57')],function(_0x41acfe){var _0x45d3e7={};_0x45d3e7[_0x41acfe]={'$like':'%'+_0x5bf6d9['query'][_0xf039('0x2e')]+'%'};return _0x45d3e7;})});}_0x39def0=_['merge']({},_0x39def0,_0x5bf6d9['options']);return _0x4e4932[_0xf039('0xee')](_0x39def0);}})['then'](function(_0x3caadf){if(_0x3caadf){_0x56fe76=_0x3caadf[_0xf039('0x68')];if(!_0x5bf6d9[_0xf039('0x44')][_0xf039('0xca')]('nolimit')){_0x39def0['limit']=qs[_0xf039('0x1f')](_0x5bf6d9[_0xf039('0x44')]['limit']);_0x39def0[_0xf039('0x1d')]=qs[_0xf039('0x1d')](_0x5bf6d9['query'][_0xf039('0x1d')]);}return _0x4e4932['getWhatsappInteractions'](_0x39def0);}})[_0xf039('0x24')](function(_0x495c57){if(_0x495c57){return _0x495c57?{'count':_0x56fe76,'rows':_0x495c57}:null;}})[_0xf039('0x24')](respondWithResult(_0x46d5d9,null))['catch'](handleError(_0x46d5d9,null));};exports[_0xf039('0xef')]=function(_0x36f9f4,_0x4ea91f,_0x292e8a){var _0x3a90cb;var _0x599a98;var _0x5b5c9c;var _0x28e8c8=!_[_0xf039('0x69')](_0x36f9f4[_0xf039('0x5a')]['id'])?_0x36f9f4[_0xf039('0x5a')]['id']:!_['isNil'](_0x36f9f4[_0xf039('0x2a')]['id'])?_0x36f9f4[_0xf039('0x2a')]['id']:null;return db['User'][_0xf039('0x32')]({'where':{'id':_0x28e8c8,'role':{'$or':[_0xf039('0x29'),_0xf039('0x2a'),'agent']}},'attributes':['id',_0xf039('0x35'),'phone',_0xf039('0xf0'),_0xf039('0x25'),'internal','loginInPause']})[_0xf039('0x24')](function(_0xeb0c57){if(_0xeb0c57){if(_0xeb0c57['role']===_0xf039('0x2b')){_0x3a90cb=_0xeb0c57;if(_0x36f9f4[_0xf039('0x59')][_0xf039('0x9f')]){_0x5b5c9c=util[_0xf039('0xac')](_0xf039('0xf1'),_0x3a90cb[_0x36f9f4[_0xf039('0x59')][_0xf039('0x9f')]]);}else if(_0x36f9f4[_0xf039('0x59')][_0xf039('0xf2')]){_0x5b5c9c=util['format']('SIP/%s',_0x36f9f4[_0xf039('0x59')][_0xf039('0xf2')]);}else{_0x5b5c9c=util[_0xf039('0xac')](_0xf039('0xad'),_0x3a90cb['name']);}socket['to'](util['format'](_0xf039('0xf3'),_0x3a90cb[_0xf039('0x35')]))[_0xf039('0x26')](_0xf039('0xf4'),{'user':{'id':_0x3a90cb['id'],'name':_0x3a90cb[_0xf039('0x35')]},'ip':_0x36f9f4[_0xf039('0xf5')]['x-forwarded-for']||_0x36f9f4[_0xf039('0xf6')][_0xf039('0xf7')]||_0x36f9f4[_0xf039('0xf8')][_0xf039('0xf7')]||_0x36f9f4[_0xf039('0xf6')][_0xf039('0xf8')][_0xf039('0xf7')]});return db[_0xf039('0xae')][_0xf039('0x27')]({'where':{'membername':_0x3a90cb['name']},'individualHooks':!![]});}}else{throw new db['Sequelize'][(_0xf039('0x90'))](_0xf039('0xf9'));}})['then'](function(){if(_0x3a90cb){return _0x3a90cb['getVoiceQueues']({'raw':!![]});}})[_0xf039('0x24')](function(_0x56b67a){if(_0x3a90cb){if(_0x56b67a){_0x599a98=_0x56b67a;if(_0x599a98[_0xf039('0x68')]){var _0x20d897=_0x599a98['map'](function(_0x38015c){var _0x1d6fcc={'membername':_0x3a90cb['name'],'UserId':_0x3a90cb['id'],'queue_name':_0x38015c['name'],'VoiceQueueId':_0x38015c['id'],'interface':_0x5b5c9c,'paused':_0x3a90cb['loginInPause']||![],'penalty':_0x38015c[_0xf039('0xfa')]||0x0};return db[_0xf039('0xae')][_0xf039('0xfb')](_0x1d6fcc);});return Promise[_0xf039('0x51')](_0x20d897);}}}})[_0xf039('0x24')](function(){if(_0x3a90cb){return db[_0xf039('0xfc')][_0xf039('0x86')]({'where':{'membername':_0x3a90cb[_0xf039('0x35')],'exitAt':null}});}})['then'](function(_0x3e226d){if(_0x3a90cb){var _0x36cd97=[];_0x3e226d[_0xf039('0xfd')](function(_0x4e6bad){_0x36cd97['push'](_0x4e6bad[_0xf039('0x23')]({'exitAt':moment()[_0xf039('0xac')]('YYYY-MM-DD\x20HH:mm:ss')}));});return Promise[_0xf039('0x51')](_0x36cd97);}})['then'](function(){if(_0x3a90cb){var _0x54d09e=[];var _0x2c44a9=[];var _0xe492=utils[_0xf039('0xfe')]();var _0x1645fa={'membername':_0x3a90cb[_0xf039('0x35')],'interface':_0x5b5c9c,'enterAt':moment()[_0xf039('0xac')](_0xf039('0xff')),'role':_0x3a90cb[_0xf039('0x25')],'internal':_0x3a90cb[_0xf039('0x5f')]};_0xe492['forEach'](function(_0x58870f){_0x54d09e['push'](_[_0xf039('0x56')]({'channel':_0x58870f,'type':_0xf039('0x100'),'data1':_0x36f9f4[_0xf039('0x59')][_0xf039('0x101')],'data2':_0x5b5c9c},_0x1645fa));if(_0x3a90cb[_0xf039('0x9d')]){_0x2c44a9[_0xf039('0x48')](_[_0xf039('0x56')]({'channel':_0x58870f,'type':_0xf039('0x102'),'data1':_0xf039('0x103')},_0x1645fa));}});return db['MemberReport'][_0xf039('0x83')](_0x54d09e['concat'](_0x2c44a9),{'individualHooks':!![]});}})[_0xf039('0x24')](function(){if(_0x3a90cb){return _0x3a90cb[_0xf039('0x23')]({'online':!![],'lastLoginAt':moment()[_0xf039('0xac')](_0xf039('0xff')),'voicePause':_0x3a90cb[_0xf039('0x9d')]||![],'mailPause':_0x3a90cb[_0xf039('0x9d')]||![],'chatPause':_0x3a90cb[_0xf039('0x9d')]||![],'faxPause':_0x3a90cb[_0xf039('0x9d')]||![],'smsPause':_0x3a90cb[_0xf039('0x9d')]||![],'openchannelPause':_0x3a90cb[_0xf039('0x9d')]||![],'whatsappPause':_0x3a90cb[_0xf039('0x9d')]||![],'pauseType':_0x3a90cb[_0xf039('0x9d')]?_0xf039('0x103'):null,'interface':_0x5b5c9c,'lastPauseAt':moment()[_0xf039('0xac')](_0xf039('0xff'))});}})[_0xf039('0x24')](function(_0x3d2c85){if(_0x36f9f4['isMiddleware']){return _0x292e8a();}else{return Promise[_0xf039('0x104')](_0x3d2c85)['then'](respondWithResult(_0x4ea91f,null));}})[_0xf039('0x52')](handleError(_0x4ea91f,null));};exports[_0xf039('0x105')]=function(_0x52ffc0,_0xc4641c){var _0x24b231;return db['User']['find']({'where':{'id':_0x52ffc0['params']['id'],'role':_0xf039('0x2b')},'attributes':['id',_0xf039('0x35'),_0xf039('0x25')]})['then'](handleEntityNotFound(_0xc4641c,null))[_0xf039('0x24')](function(_0x2ebd81){if(_0x2ebd81){_0x24b231=_0x2ebd81;return db[_0xf039('0xae')][_0xf039('0x27')]({'where':{'membername':_0x24b231[_0xf039('0x35')]},'individualHooks':!![]});}})[_0xf039('0x24')](function(){return db[_0xf039('0xfc')][_0xf039('0x86')]({'where':{'membername':_0x24b231['name'],'exitAt':null}});})[_0xf039('0x24')](function(_0x478475){var _0xc4fd77=[];_0x478475[_0xf039('0xfd')](function(_0x4e237b){_0xc4fd77[_0xf039('0x48')](_0x4e237b[_0xf039('0x23')]({'exitAt':moment()[_0xf039('0xac')](_0xf039('0xff'))}));});return Promise['all'](_0xc4fd77);})[_0xf039('0x24')](function(){return _0x24b231[_0xf039('0x23')]({'online':![],'voicePause':![],'mailPause':![],'chatPause':![],'faxPause':![],'smsPause':![],'openchannelPause':![],'whatsappPause':![],'interface':null});})['then'](respondWithResult(_0xc4641c,null))[_0xf039('0x52')](handleError(_0xc4641c,null));};exports[_0xf039('0x106')]=function(_0x24e727,_0x190bfa){var _0x523ba1;return db['UserVoiceQueueRt'][_0xf039('0x23')]({'paused':0x1},{'where':{'UserId':_0x24e727[_0xf039('0x5a')]['id']},'individualHooks':!![]})[_0xf039('0x24')](function(){return db[_0xf039('0x37')][_0xf039('0x32')]({'where':{'id':_0x24e727[_0xf039('0x5a')]['id'],'role':'agent'},'attributes':['id',_0xf039('0x35'),_0xf039('0x25'),'internal','interface',_0xf039('0x9c')]});})[_0xf039('0x24')](handleEntityNotFound(_0x190bfa,null))['then'](function(_0x16b4c2){if(_0x16b4c2){_0x523ba1=_0x16b4c2;return db[_0xf039('0xfc')][_0xf039('0x86')]({'where':{'membername':_0x523ba1[_0xf039('0x35')],'type':_0xf039('0x102'),'exitAt':null}});}})[_0xf039('0x24')](function(_0x56ccdf){if(_0x56ccdf[_0xf039('0x68')]){var _0x1d050b=moment()[_0xf039('0xac')](_0xf039('0xff'));for(var _0x1f0843=0x0,_0x460c62=_0x56ccdf[_0xf039('0x68')];_0x1f0843<_0x460c62;_0x1f0843++){_0x56ccdf[_0x1f0843]['updateAttributes']({'exitAt':_0x1d050b});}}})[_0xf039('0x24')](function(){var _0x4e0039=[];var _0x5dcf21=utils[_0xf039('0xfe')]();_0x5dcf21[_0xf039('0xfd')](function(_0x441ace){_0x4e0039['push']({'channel':_0x441ace,'membername':_0x523ba1['name'],'interface':_['isNil'](_0x523ba1[_0xf039('0x9f')])?util[_0xf039('0xac')](_0xf039('0xad'),_0x523ba1[_0xf039('0x35')]):_0x523ba1['interface'],'type':_0xf039('0x102'),'enterAt':moment()[_0xf039('0xac')](_0xf039('0xff')),'data1':_0x24e727[_0xf039('0x59')][_0xf039('0x3b')]||_0xf039('0x107'),'role':_0x523ba1[_0xf039('0x25')],'internal':_0x523ba1[_0xf039('0x5f')]});});return db[_0xf039('0xfc')][_0xf039('0x83')](_0x4e0039,{'individualHooks':!![]});})[_0xf039('0x24')](function(){return _0x523ba1['update']({'voicePause':!![],'mailPause':!![],'chatPause':!![],'faxPause':!![],'smsPause':!![],'whatsappPause':!![],'openchannelPause':!![],'pauseType':_0x24e727[_0xf039('0x59')][_0xf039('0x3b')]||_0xf039('0x107'),'lastPauseAt':moment()[_0xf039('0xac')](_0xf039('0xff'))});})[_0xf039('0x24')](respondWithResult(_0x190bfa,null))['catch'](handleError(_0x190bfa,null));};exports[_0xf039('0x108')]=function(_0x25ee8f,_0x50fd7b){if(_0x25ee8f['body'][_0xf039('0x9b')]&&!utils[_0xf039('0xa0')](_0x25ee8f[_0xf039('0x59')][_0xf039('0x9b')])){throw new APIBadRequestError(util['format'](_0xf039('0x109'),_0x25ee8f[_0xf039('0x59')][_0xf039('0x9b')]));}return db[_0xf039('0x37')][_0xf039('0x32')]({'where':{'id':_0x25ee8f[_0xf039('0x5a')]['id']},'attributes':['id',_0xf039('0x35'),'role','internal',_0xf039('0x9f'),_0xf039('0x9c'),_0xf039('0x9e'),_0xf039('0x10a'),_0xf039('0x10b'),_0xf039('0x10c'),'openchannelPause',_0xf039('0x10d'),_0xf039('0x10e'),'pauseType',_0xf039('0x10f')]})[_0xf039('0x24')](function(_0x5a9090){if(!_0x5a9090){throw new APINotFoundError(util[_0xf039('0xac')](_0xf039('0xc9'),_0x25ee8f[_0xf039('0x5a')]['id']));}return _0x5a9090[_0xf039('0x108')](_0x25ee8f['body'][_0xf039('0x9b')]);})[_0xf039('0x24')](respondWithResult(_0x50fd7b,null))[_0xf039('0x52')](APIHandleError(_0x50fd7b));};exports[_0xf039('0x110')]=function(_0x15526e,_0x5086ef){var _0x526b14={};var _0x5986d4={};var _0x2d8490;var _0xc9450c;return db[_0xf039('0x37')][_0xf039('0x94')]({'where':{'id':_0x15526e[_0xf039('0x5a')]['id']}})[_0xf039('0x24')](handleEntityNotFound(_0x5086ef,null))[_0xf039('0x24')](function(_0x4d5eec){if(_0x4d5eec){_0x2d8490=_0x4d5eec;_0x5986d4[_0xf039('0xd1')]=_[_0xf039('0xd2')](db[_0xf039('0x111')]['rawAttributes']);_0x5986d4[_0xf039('0x44')]=_[_0xf039('0xd2')](_0x15526e[_0xf039('0x44')]);_0x5986d4[_0xf039('0xd3')]=_[_0xf039('0xd4')](_0x5986d4[_0xf039('0xd1')],_0x5986d4[_0xf039('0x44')]);_0x526b14['attributes']=_[_0xf039('0xd4')](_0x5986d4[_0xf039('0xd1')],qs[_0xf039('0xdd')](_0x15526e[_0xf039('0x44')]['fields']));_0x526b14[_0xf039('0x57')]=_0x526b14[_0xf039('0x57')][_0xf039('0x68')]?_0x526b14[_0xf039('0x57')]:_0x5986d4[_0xf039('0xd1')];_0x526b14[_0xf039('0xdf')]=qs[_0xf039('0xd5')](_0x15526e[_0xf039('0x44')]['sort']);_0x526b14[_0xf039('0xd6')]=qs[_0xf039('0xd3')](_[_0xf039('0xd7')](_0x15526e['query'],_0x5986d4['filters']));if(_0x15526e['query'][_0xf039('0x2e')]){_0x526b14[_0xf039('0xd6')]=_[_0xf039('0x56')](_0x526b14[_0xf039('0xd6')],{'$or':_['map'](_0x526b14['attributes'],function(_0x3185bb){var _0x4d6d8e={};_0x4d6d8e[_0x3185bb]={'$like':'%'+_0x15526e['query'][_0xf039('0x2e')]+'%'};return _0x4d6d8e;})});}_0x526b14=_['merge']({},_0x526b14,_0x15526e[_0xf039('0xd8')]);return _0x2d8490[_0xf039('0x110')](_0x526b14);}})['then'](function(_0x472c59){if(_0x472c59){_0xc9450c=_0x472c59[_0xf039('0x68')];if(!_0x15526e[_0xf039('0x44')]['hasOwnProperty']('nolimit')){_0x526b14[_0xf039('0x1f')]=qs[_0xf039('0x1f')](_0x15526e[_0xf039('0x44')][_0xf039('0x1f')]);_0x526b14['offset']=qs['offset'](_0x15526e[_0xf039('0x44')][_0xf039('0x1d')]);}return _0x2d8490[_0xf039('0x110')](_0x526b14);}})[_0xf039('0x24')](function(_0x1a12d7){if(_0x1a12d7){return _0x1a12d7?{'count':_0xc9450c,'rows':_0x1a12d7}:null;}})['then'](respondWithResult(_0x5086ef,null))[_0xf039('0x52')](handleError(_0x5086ef,null));};exports[_0xf039('0x112')]=function(_0x11509d,_0x3d6a0d){var _0xa0b04=_0x11509d[_0xf039('0x5a')]['id'];var _0x2e3a49=_0x11509d[_0xf039('0x59')]?_0x11509d[_0xf039('0x59')][_0xf039('0x5d')]:null;var _0x5898c6=[];return Promise['resolve']()['then'](function(){if(!_0x2e3a49)throw new APIBadRequestError(_0xf039('0x113'));})[_0xf039('0x24')](function(){return db[_0xf039('0x37')]['findOne']({'where':{'id':_0xa0b04}});})[_0xf039('0x24')](function(_0x4ed01f){if(!_0x4ed01f)throw new APINotFoundError(util[_0xf039('0xac')]('User\x20with\x20id\x20%s\x20not\x20found',_0x11509d[_0xf039('0x5a')]['id']));return db[_0xf039('0x64')][_0xf039('0x114')](function(_0x36a801){return _0x4ed01f[_0xf039('0x112')](_0x2e3a49,{'transaction':_0x36a801})[_0xf039('0x24')](function(){return db[_0xf039('0x111')][_0xf039('0x86')]({'where':{'id':{'$in':_0x2e3a49}}});})[_0xf039('0x24')](function(_0x270d52){var _0x86c5ea=_[_0xf039('0x39')](_0x270d52,function(_0x2f484d){return _0x2f484d['getAssociatedQueues']();});return Promise[_0xf039('0x51')](_0x86c5ea);})['then'](function(_0x1c55b5){_0x5898c6=_[_0xf039('0x115')](_0x1c55b5);var _0x35b0ab=_[_0xf039('0x39')](_0x5898c6,function(_0x171757){return _0x171757['addAgent'](_0x4ed01f['id'],{'transaction':_0x36a801});});return Promise['all'](_0x35b0ab);})[_0xf039('0x24')](function(){if(!_0x4ed01f['online'])return;var _0x1421d1=_[_0xf039('0x2e')](_0x5898c6,function(_0x59888a){return _0x59888a[_0xf039('0x116')](_0xf039('0x9b'))===_0xf039('0x117');});var _0xf60389=_[_0xf039('0x39')](_0x1421d1,function(_0x5b869b){return db[_0xf039('0xae')][_0xf039('0xfb')]({'membername':_0x4ed01f[_0xf039('0x35')],'UserId':_0x4ed01f['id'],'queue_name':_0x5b869b[_0xf039('0x35')],'VoiceQueueId':_0x5b869b['id'],'interface':_['isNil'](_0x4ed01f['interface'])?util[_0xf039('0xac')](_0xf039('0xad'),_0x4ed01f[_0xf039('0x35')]):_0x4ed01f['interface'],'paused':_0x4ed01f[_0xf039('0x9e')]||![],'penalty':_0x4ed01f[_0xf039('0xa6')]},{'transaction':_0x36a801});});return Promise[_0xf039('0x51')](_0xf60389);})[_0xf039('0x24')](function(){return db['TeamVoicePrefix'][_0xf039('0x86')]({'where':{'teamId':{'$in':_0x2e3a49}}});})[_0xf039('0x24')](function(_0x2ec560){var _0x4aff4d=_[_0xf039('0x39')](_0x2ec560,function(_0x270661){return db['UserVoicePrefix'][_0xf039('0x79')]({'UserId':_0x4ed01f['id'],'VoicePrefixId':_0x270661[_0xf039('0x118')]},{'transaction':_0x36a801});});return Promise['all'](_0x4aff4d);});});})[_0xf039('0x24')](function(){for(var _0x41b95c=0x0;_0x41b95c<_0x5898c6[_0xf039('0x68')];_0x41b95c++){var _0x275526=_0x5898c6[_0x41b95c][_0xf039('0x116')](_0xf039('0x9b'));var _0x39ce0a=_0x275526+_0xf039('0xa8');socket[_0xf039('0x26')](_0xf039('0x2a')+_0x275526+_0xf039('0xa9'),{'UserId':_0xa0b04,['queueField']:_0x5898c6[_0x41b95c]['id']});}})['then'](respondWithStatusCode(_0x3d6a0d,null))['catch'](APIHandleError(_0x3d6a0d));};exports[_0xf039('0x119')]=function(_0x1243ab,_0x251cb4){var _0x23bc69=_0x1243ab[_0xf039('0x5a')]['id'];var _0x5c2065=null;if(_0x1243ab[_0xf039('0x44')]['ids']){_0x5c2065=_[_0xf039('0x11a')](_0x1243ab['query'][_0xf039('0x5d')])?_0x1243ab[_0xf039('0x44')][_0xf039('0x5d')]:[_0x1243ab[_0xf039('0x44')][_0xf039('0x5d')]];}var _0x272d34=[];return Promise['resolve']()[_0xf039('0x24')](function(){if(!_0x5c2065)throw new APIBadRequestError(_0xf039('0x11b'));})[_0xf039('0x24')](function(){return db[_0xf039('0x37')]['findOne']({'where':{'id':_0x23bc69}});})['then'](function(_0x407b88){if(!_0x407b88)throw new APINotFoundError(util[_0xf039('0xac')](_0xf039('0xc9'),_0x1243ab[_0xf039('0x5a')]['id']));return db[_0xf039('0x64')]['transaction'](function(_0x2fd19a){return _0x407b88[_0xf039('0x119')](_0x5c2065,{'transaction':_0x2fd19a})[_0xf039('0x24')](function(){return db[_0xf039('0x111')]['findAll']({'where':{'id':{'$in':_0x5c2065}}});})[_0xf039('0x24')](function(_0x280fa2){var _0x2165f3=_['map'](_0x280fa2,function(_0x1c0b66){return _0x1c0b66[_0xf039('0x11c')]();});return Promise[_0xf039('0x51')](_0x2165f3);})['then'](function(_0x1c46eb){_0x272d34=_[_0xf039('0x115')](_0x1c46eb);var _0x35e273=_[_0xf039('0x39')](_0x272d34,function(_0x4df3ba){return _0x4df3ba['removeAgent'](_0x407b88['id'],{'transaction':_0x2fd19a});});return Promise[_0xf039('0x51')](_0x35e273);})[_0xf039('0x24')](function(){if(!_0x407b88[_0xf039('0x9c')])return;var _0xbe1610=_['filter'](_0x272d34,function(_0x393743){return _0x393743[_0xf039('0x116')](_0xf039('0x9b'))==='Voice';});var _0x59669d=_[_0xf039('0x39')](_0xbe1610,function(_0x316754){return db[_0xf039('0xae')][_0xf039('0x27')]({'where':{'VoiceQueueId':_0x316754['id'],'UserId':_0x407b88['id']},'transaction':_0x2fd19a});});return Promise[_0xf039('0x51')](_0x59669d);})[_0xf039('0x24')](function(){return db[_0xf039('0x11d')][_0xf039('0x86')]({'where':{'teamId':{'$in':_0x5c2065}}});})[_0xf039('0x24')](function(_0x414340){var _0x39d559=_['map'](_0x414340,function(_0x1a8d1a){return db[_0xf039('0x11e')][_0xf039('0x27')]({'where':{'UserId':_0x407b88['id'],'VoicePrefixId':_0x1a8d1a[_0xf039('0x118')]}},{'transaction':_0x2fd19a});});return Promise[_0xf039('0x51')](_0x39d559);});});})[_0xf039('0x24')](function(){for(var _0x94f64c=0x0;_0x94f64c<_0x272d34[_0xf039('0x68')];_0x94f64c++){var _0x51b022=_0x272d34[_0x94f64c]['getDataValue'](_0xf039('0x9b'));var _0x4d53d1=_0x51b022+_0xf039('0xa8');socket[_0xf039('0x26')](_0xf039('0x2a')+_0x51b022+'Queue:remove',{'UserId':_0x23bc69,['queueField']:_0x272d34[_0x94f64c]['id']});}})['then'](respondWithStatusCode(_0x251cb4,null))[_0xf039('0x52')](APIHandleError(_0x251cb4));};exports['getLists']=function(_0x5d624b,_0x111025){var _0xc47992={};var _0x48101d={};var _0x5e030d;var _0x3ce879;return db[_0xf039('0x37')][_0xf039('0x94')]({'where':{'id':_0x5d624b[_0xf039('0x5a')]['id']}})[_0xf039('0x24')](handleEntityNotFound(_0x111025,null))['then'](function(_0x5337e5){if(_0x5337e5){_0x5e030d=_0x5337e5;_0x48101d[_0xf039('0xd1')]=_[_0xf039('0xd2')](db[_0xf039('0x11f')][_0xf039('0x38')]);_0x48101d[_0xf039('0x44')]=_[_0xf039('0xd2')](_0x5d624b[_0xf039('0x44')]);_0x48101d['filters']=_[_0xf039('0xd4')](_0x48101d[_0xf039('0xd1')],_0x48101d['query']);_0xc47992[_0xf039('0x57')]=_[_0xf039('0xd4')](_0x48101d['model'],qs['fields'](_0x5d624b['query'][_0xf039('0xdd')]));_0xc47992['attributes']=_0xc47992[_0xf039('0x57')][_0xf039('0x68')]?_0xc47992[_0xf039('0x57')]:_0x48101d[_0xf039('0xd1')];_0xc47992['order']=qs[_0xf039('0xd5')](_0x5d624b[_0xf039('0x44')]['sort']);_0xc47992[_0xf039('0xd6')]=qs[_0xf039('0xd3')](_['pick'](_0x5d624b[_0xf039('0x44')],_0x48101d[_0xf039('0xd3')]));if(_0x5d624b[_0xf039('0x44')][_0xf039('0x2e')]){_0xc47992['where']=_[_0xf039('0x56')](_0xc47992['where'],{'$or':_[_0xf039('0x39')](_0xc47992['attributes'],function(_0x30a84b){var _0x37a83b={};_0x37a83b[_0x30a84b]={'$like':'%'+_0x5d624b[_0xf039('0x44')][_0xf039('0x2e')]+'%'};return _0x37a83b;})});}_0xc47992=_[_0xf039('0x56')]({},_0xc47992,_0x5d624b['options']);return _0x5e030d[_0xf039('0x120')](_0xc47992);}})['then'](function(_0x917db3){if(_0x917db3){_0x3ce879=_0x917db3[_0xf039('0x68')];if(!_0x5d624b[_0xf039('0x44')][_0xf039('0xca')](_0xf039('0xdb'))){_0xc47992['limit']=qs[_0xf039('0x1f')](_0x5d624b['query'][_0xf039('0x1f')]);_0xc47992['offset']=qs[_0xf039('0x1d')](_0x5d624b[_0xf039('0x44')]['offset']);}return _0x5e030d[_0xf039('0x120')](_0xc47992);}})[_0xf039('0x24')](function(_0x533251){if(_0x533251){return _0x533251?{'count':_0x3ce879,'rows':_0x533251}:null;}})[_0xf039('0x24')](respondWithResult(_0x111025,null))[_0xf039('0x52')](handleError(_0x111025,null));};exports[_0xf039('0x121')]=function(_0x57ef52,_0x5d3799){var _0x744095={};var _0x5c3694={};var _0x51fabe;return db['User']['findOne']({'where':{'id':_0x57ef52[_0xf039('0x5a')]['id']}})[_0xf039('0x24')](handleEntityNotFound(_0x5d3799,null))['then'](function(_0x5b1862){if(_0x5b1862){_0x51fabe=_0x5b1862;_0x5c3694[_0xf039('0xd1')]=_['keys'](db[_0xf039('0x37')]['rawAttributes']);_0x5c3694[_0xf039('0x44')]=_['keys'](_0x57ef52[_0xf039('0x44')]);_0x5c3694[_0xf039('0xd3')]=_[_0xf039('0xd4')](_0x5c3694[_0xf039('0xd1')],_0x5c3694[_0xf039('0x44')]);_0x744095['attributes']=_[_0xf039('0xd4')](_0x5c3694['model'],qs['fields'](_0x57ef52['query']['fields']));_0x744095['attributes']=_0x744095[_0xf039('0x57')][_0xf039('0x68')]?_0x744095[_0xf039('0x57')]:_0x5c3694[_0xf039('0xd1')];_0x744095[_0xf039('0xdf')]=qs[_0xf039('0xd5')](_0x57ef52[_0xf039('0x44')]['sort']);_0x744095['where']=qs[_0xf039('0xd3')](_[_0xf039('0xd7')](_0x57ef52['query'],_0x5c3694[_0xf039('0xd3')]));if(_0x57ef52[_0xf039('0x44')][_0xf039('0x2e')]){_0x744095['where']=_['merge'](_0x744095['where'],{'$or':_[_0xf039('0x39')](_0x744095[_0xf039('0x57')],function(_0x5e79f0){var _0x523938={};_0x523938[_0x5e79f0]={'$like':'%'+_0x57ef52[_0xf039('0x44')]['filter']+'%'};return _0x523938;})});}_0x744095[_0xf039('0xd1')]=db[_0xf039('0x37')];_0x744095['as']='Agents';_0x744095=_[_0xf039('0x56')]({},_0x744095,_0x57ef52[_0xf039('0xd8')]);return _0x51fabe[_0xf039('0x122')]({'include':[_0x744095]});}})['then'](function(_0x5d67b4){if(_0x5d67b4){var _0x2e4305={},_0x52ed5a=[];for(var _0xc8e8a9=0x0;_0xc8e8a9<_0x5d67b4[_0xf039('0x68')];_0xc8e8a9+=0x1){for(var _0xe0b837=0x0,_0x5ec915;_0xe0b837<_0x5d67b4[_0xc8e8a9][_0xf039('0x80')][_0xf039('0x68')];_0xe0b837+=0x1){_0x5ec915=_0x5d67b4[_0xc8e8a9]['Agents'][_0xe0b837][_0xf039('0x28')]({'plain':!![]});_0x2e4305[_0x5ec915['id']]=_0x5ec915;}}_0x2e4305=_[_0xf039('0x123')](_0x2e4305);for(var _0x4ea1ee=qs['offset'](_0x57ef52[_0xf039('0x44')][_0xf039('0x1d')]);_0x4ea1ee<_0x2e4305[_0xf039('0x68')]&&_0x52ed5a['length']=_0x37725c){_0x24dafb=_0x37725c;_0x13ced4=0xc8;}else{_0x13ced4=0xce;}_0x573656['status'](_0x13ced4);return _0x573656[_0xa83a('0x1b')](_0xa83a('0x1c'),_0xa1c366+'-'+_0x24dafb+'/'+_0x37725c)[_0xa83a('0x1d')](_0x448d74);}return null;};}function saveUpdates(_0xd946ab){return function(_0x5a7073){if(_0x5a7073){return _0x5a7073[_0xa83a('0x1e')](_0xd946ab)[_0xa83a('0x1f')](function(_0x4b5e73){if(_0x4b5e73[_0xa83a('0x20')]===_0xa83a('0x21')){socket[_0xa83a('0x22')](_0xa83a('0x23')+_0x4b5e73['id'],_0x4b5e73);}return _0x4b5e73;});}return null;};}function removeEntity(_0x3be2f5){return function(_0x4a714c){if(_0x4a714c){return _0x4a714c[_0xa83a('0x24')]()['then'](function(){var _0x49589c=_0x4a714c[_0xa83a('0x25')]({'plain':!![]});if(_0x49589c['role']===_0xa83a('0x26'))return;var _0x4868f5=[{'name':_0xa83a('0x27'),'value':_0xa83a('0x28'),'ignore':!![]},{'name':_0xa83a('0x29'),'value':'agent','ignore':![]},{'name':_0xa83a('0x2a'),'value':'telephone','ignore':![]}];var _0x35ec47=_(_0x4868f5)[_0xa83a('0x2b')](_0xa83a('0x2c'))[_0xa83a('0x2d')](_0xa83a('0x2e'))[_0xa83a('0x2e')]();if(_[_0xa83a('0x2f')](_0x35ec47,_0x49589c[_0xa83a('0x20')])){return;}var _0x26d3fd=_['find'](_0x4868f5,[_0xa83a('0x2e'),_0x49589c[_0xa83a('0x20')]])['name'];return db[_0xa83a('0x30')][_0xa83a('0x24')]({'where':{'type':_0x26d3fd,'resourceId':_0x49589c['id']}})['then'](function(){return _0x4a714c;});})[_0xa83a('0x1f')](function(){_0x3be2f5[_0xa83a('0x16')](0xcc)[_0xa83a('0x31')]();});}};}function handleEntityNotFound(_0x23dc64){return function(_0xe27583){if(!_0xe27583){_0x23dc64['sendStatus'](0x194);}return _0xe27583;};}function handleError(_0xecc978,_0x53c3fd){_0x53c3fd=_0x53c3fd||0x1f4;return function(_0x4f450a){logger[_0xa83a('0x32')](_0x4f450a[_0xa83a('0x33')]);if(_0x4f450a[_0xa83a('0x34')]){delete _0x4f450a[_0xa83a('0x34')];}_0xecc978['status'](_0x53c3fd)['send'](_0x4f450a);};}function getUserAttributes(){return _(db[_0xa83a('0x35')][_0xa83a('0x36')])[_0xa83a('0x2d')](function(_0x5cc596){return{'name':_0x5cc596[_0xa83a('0x37')],'type':_0x5cc596[_0xa83a('0x38')][_0xa83a('0x39')]};})[_0xa83a('0x2b')](function(_0x13d024){return!['password','salt',_0xa83a('0x3a'),_0xa83a('0x3b'),'resetPasswordExpires','passwordResetAt',_0xa83a('0x3c')]['includes'](_0x13d024[_0xa83a('0x34')]);})['value']();}exports['index']=function(_0x4349ad,_0x14d7dd){var _0x135eb9={},_0x4d931b={'count':0x0,'rows':[]};var _0x41dfb8=getUserAttributes();_0x135eb9=qs[_0xa83a('0x3d')](_0x41dfb8,_0x4349ad);var _0x5385fb={'where':_0x135eb9['where']};return db[_0xa83a('0x35')]['count'](_0x5385fb)[_0xa83a('0x1f')](function(_0x26adec){_0x4d931b[_0xa83a('0x1a')]=_0x26adec;if(_0x4349ad[_0xa83a('0x3e')][_0xa83a('0x3f')]){_0x135eb9[_0xa83a('0x40')]=[{'all':!![]}];}if(_0x4349ad['query'][_0xa83a('0x41')]===_0xa83a('0x42')){_0x135eb9[_0xa83a('0x40')]=[{'model':db[_0xa83a('0x43')],'as':'userSetting'}];}if(!_[_0xa83a('0x2f')](_0x135eb9[_0xa83a('0x44')],'id')){_0x135eb9[_0xa83a('0x44')][_0xa83a('0x45')]('id');}return db[_0xa83a('0x35')][_0xa83a('0x46')](_0x135eb9);})[_0xa83a('0x1f')](function(_0x1dee91){_0x4d931b[_0xa83a('0x47')]=_0x1dee91;if(_0x4349ad['query'][_0xa83a('0x48')]==='true'){var _0xe14073=[];for(var _0x113bf5=0x0;_0x113bf5<_0x4d931b[_0xa83a('0x47')][_0xa83a('0x49')];_0x113bf5++){_0xe14073[_0xa83a('0x45')](get_open_tabs(_0xa83a('0x4a'),_0x4d931b['rows'][_0x113bf5]['dataValues']));_0xe14073[_0xa83a('0x45')](get_open_tabs('sms',_0x4d931b[_0xa83a('0x47')][_0x113bf5][_0xa83a('0x4b')]));_0xe14073[_0xa83a('0x45')](get_open_tabs('fax',_0x4d931b[_0xa83a('0x47')][_0x113bf5]['dataValues']));_0xe14073[_0xa83a('0x45')](get_open_tabs(_0xa83a('0x4c'),_0x4d931b[_0xa83a('0x47')][_0x113bf5][_0xa83a('0x4b')]));_0xe14073[_0xa83a('0x45')](get_open_tabs(_0xa83a('0x4d'),_0x4d931b['rows'][_0x113bf5][_0xa83a('0x4b')]));_0xe14073[_0xa83a('0x45')](get_open_tabs(_0xa83a('0x4e'),_0x4d931b[_0xa83a('0x47')][_0x113bf5][_0xa83a('0x4b')]));}return Promise[_0xa83a('0x4f')](_0xe14073)['then'](function(){return _0x4d931b;});}else{return _0x4d931b;}})[_0xa83a('0x1f')](respondWithFilteredResult(_0x14d7dd,_0x135eb9))[_0xa83a('0x50')](handleError(_0x14d7dd,null));};exports[_0xa83a('0x51')]=function(_0x82055a,_0x2f193f){var _0x55c12a=getUserAttributes();_0x82055a[_0xa83a('0x3e')]['id']=_0x82055a[_0xa83a('0x52')]['id'];var _0xfc89ae=qs['getOptions'](_0x55c12a,_0x82055a);if(_0x82055a[_0xa83a('0x3e')][_0xa83a('0x3f')]){_0xfc89ae[_0xa83a('0x40')]=[{'all':!![]}];}if(_0x82055a[_0xa83a('0x3e')][_0xa83a('0x41')]===_0xa83a('0x42')){_0xfc89ae[_0xa83a('0x40')]=[{'model':db['UserSetting'],'as':'userSetting'}];}_0xfc89ae=_[_0xa83a('0x53')]({},_0xfc89ae,_0x82055a[_0xa83a('0x54')]);if(!_[_0xa83a('0x2f')](_0xfc89ae['attributes'],'id')){_0xfc89ae['attributes']['push']('id');}return db[_0xa83a('0x35')]['find'](_0xfc89ae)[_0xa83a('0x1f')](handleEntityNotFound(_0x2f193f,null))['then'](function(_0x4e24bd){var _0x1041ed=[];values=_0x4e24bd;if(_0x82055a[_0xa83a('0x3e')][_0xa83a('0x48')]===_0xa83a('0x42')){_0x1041ed['push'](get_open_tabs('chat',_0x4e24bd[_0xa83a('0x4b')]));_0x1041ed['push'](get_open_tabs(_0xa83a('0x55'),_0x4e24bd['dataValues']));_0x1041ed['push'](get_open_tabs('openchannel',_0x4e24bd['dataValues']));_0x1041ed['push'](get_open_tabs(_0xa83a('0x4e'),_0x4e24bd['dataValues']));_0x1041ed[_0xa83a('0x45')](get_open_tabs('fax',_0x4e24bd['dataValues']));_0x1041ed['push'](get_open_tabs(_0xa83a('0x4c'),_0x4e24bd[_0xa83a('0x4b')]));return Promise[_0xa83a('0x4f')](_0x1041ed);}else{return values;}})[_0xa83a('0x1f')](function(){return values;})['then'](respondWithResult(_0x2f193f,null))[_0xa83a('0x50')](handleError(_0x2f193f,null));};exports[_0xa83a('0x1e')]=function(_0x1c09ef,_0x4f3ff2){if(_0x1c09ef[_0xa83a('0x56')]['id']){delete _0x1c09ef[_0xa83a('0x56')]['id'];}delete _0x1c09ef[_0xa83a('0x56')][_0xa83a('0x20')];return db[_0xa83a('0x35')][_0xa83a('0x57')]({'where':{'id':_0x1c09ef['params']['id']}})[_0xa83a('0x1f')](handleEntityNotFound(_0x4f3ff2,null))[_0xa83a('0x1f')](saveUpdates(_0x1c09ef[_0xa83a('0x56')],null))[_0xa83a('0x1f')](respondWithResult(_0x4f3ff2,null))[_0xa83a('0x50')](handleError(_0x4f3ff2,null));};exports[_0xa83a('0x58')]=function(_0xdb8f27,_0x575b5b){return db[_0xa83a('0x35')]['describe']()[_0xa83a('0x1f')](respondWithResult(_0x575b5b,null))[_0xa83a('0x50')](handleError(_0x575b5b,null));};exports[_0xa83a('0x59')]=function(_0x431875,_0x52e384){return db['User'][_0xa83a('0x57')]({'where':{'id':_0x431875[_0xa83a('0x52')]['id']}})[_0xa83a('0x1f')](handleEntityNotFound(_0x52e384,null))['then'](function(_0xdb2d7b){if(_0xdb2d7b){return _0xdb2d7b[_0xa83a('0x59')](_0x431875[_0xa83a('0x56')][_0xa83a('0x5a')],_[_0xa83a('0x5b')](_0x431875[_0xa83a('0x56')],[_0xa83a('0x5a'),'id'])||{});}})[_0xa83a('0x1f')](respondWithResult(_0x52e384,null))[_0xa83a('0x50')](handleError(_0x52e384,null));};function validateUser(_0xc4256f){return new Promise(function(_0x45fa55,_0x417ab5){if(_0xc4256f[_0xa83a('0x5c')])return _0x45fa55(_0xc4256f);return db[_0xa83a('0x5d')]['findById'](0x1)[_0xa83a('0x1f')](function(_0x368c2b){if(_0x368c2b[_0xa83a('0x5e')])authService['validatePasswordPattern'](_0xc4256f[_0xa83a('0x5f')]);db[_0xa83a('0x35')][_0xa83a('0x60')](_0xa83a('0x5c'))['then'](function(_0x32291c){if(_['isNil'](_0x32291c)){_0xc4256f[_0xa83a('0x5c')]=_0x368c2b[_0xa83a('0x61')]||0x1;return;}if(_[_0xa83a('0x62')](_0x368c2b[_0xa83a('0x61')])||_0x368c2b[_0xa83a('0x61')]===_0x32291c){_0xc4256f[_0xa83a('0x5c')]=_0x32291c+0x1;return;}if(_0x368c2b[_0xa83a('0x61')]>_0x32291c){_0xc4256f['internal']=_0x368c2b[_0xa83a('0x61')];return;}return db[_0xa83a('0x63')][_0xa83a('0x3e')]('select\x20(select\x20IFNULL(max(internal)+1,1)\x20from\x20users\x20where\x20internal\x20<\x20md.internal)\x20as\x20\x27from\x27,\x20md.internal\x20-\x201\x20as\x20\x27to\x27\x20from\x20users\x20md\x20where\x20md.internal\x20!=\x201\x20and\x20not\x20exists\x20(select\x201\x20from\x20users\x20md2\x20where\x20md2.internal\x20=\x20md.internal\x20-\x201)',{'type':db['sequelize']['QueryTypes']['SELECT']})['then'](function(_0x380cc1){if(_0x380cc1&&_0x380cc1[_0xa83a('0x49')]){for(var _0x288dbe=0x0,_0x107bd0=_0x380cc1[_0xa83a('0x49')];_0x288dbe<_0x107bd0&&_[_0xa83a('0x62')](_0xc4256f['internal']);_0x288dbe++){if(_0x368c2b[_0xa83a('0x61')]<=_0x380cc1[_0x288dbe][_0xa83a('0x64')]){_0xc4256f[_0xa83a('0x5c')]=_0x380cc1[_0x288dbe][_0xa83a('0x64')];}else if(_0x368c2b['min_internal']>_0x380cc1[_0x288dbe]['from']&&_0x368c2b[_0xa83a('0x61')]<=_0x380cc1[_0x288dbe]['to']){_0xc4256f[_0xa83a('0x5c')]=_0x368c2b['min_internal'];}}}if(_['isNil'](_0xc4256f[_0xa83a('0x5c')])){_0xc4256f['internal']=_0x32291c+0x1;}return _0x45fa55(_0xc4256f);});});})[_0xa83a('0x50')](function(_0x50b643){_0x417ab5(_0x50b643);});});}function updateUser(_0x49902d){return new Promise(function(_0x380c49,_0x2bcef8){try{if(_0x49902d['voicemail']){_0x49902d[_0xa83a('0x65')]=_0x49902d[_0xa83a('0x5c')];_0x49902d['VoiceMail']={'mailbox':_0x49902d[_0xa83a('0x5c')],'password':_0x49902d['password'],'fullname':_0x49902d['fullname'],'email':_0x49902d['email']};}if(_0x49902d['role']===_0xa83a('0x21')){if(!_0x49902d['permissions'])_0x49902d[_0xa83a('0x66')]=['101',_0xa83a('0x67'),'103',_0xa83a('0x68'),_0xa83a('0x69'),_0xa83a('0x6a'),'105','106','107',_0xa83a('0x6b'),_0xa83a('0x6c'),_0xa83a('0x6d'),_0xa83a('0x6e'),_0xa83a('0x6f'),_0xa83a('0x70')];}_0x380c49(_0x49902d);}catch(_0x406cc9){_0x2bcef8(_0x406cc9);}});}exports[_0xa83a('0x71')]=function(_0xa89d88,_0x344a76){if(_0xa89d88['user']['role']===_0xa83a('0x21'))throw new Error(_0xa83a('0x72'));if(_0xa89d88[_0xa83a('0x56')]['role']===_0xa83a('0x28')&&_0xa89d88[_0xa83a('0x28')][_0xa83a('0x20')]!==_0xa83a('0x26')){throw new Error(_0xa83a('0x73'));}if(_0xa89d88[_0xa83a('0x56')][_0xa83a('0x20')]===_0xa83a('0x26')&&_0xa89d88['user'][_0xa83a('0x20')]!==_0xa83a('0x26')){throw new Error(_0xa83a('0x74'));}return licenseUtil[_0xa83a('0x75')]([_0xa89d88[_0xa83a('0x56')]])[_0xa83a('0x1f')](function(){return validateUser(_0xa89d88[_0xa83a('0x56')]);})[_0xa83a('0x1f')](function(_0x4a2479){return updateUser(_0x4a2479)[_0xa83a('0x1f')](function(_0x5a74bd){if(_0x5a74bd[_0xa83a('0x20')]===_0xa83a('0x26')){_0x5a74bd[_0xa83a('0x76')]=_0xa89d88[_0xa83a('0x28')][_0xa83a('0x76')];delete _0x5a74bd[_0xa83a('0x77')];}return _0x5a74bd;});})[_0xa83a('0x1f')](function(_0x1c0f79){return db['User'][_0xa83a('0x71')](_0x1c0f79,{'include':[{'model':db['VoiceMail'],'as':_0xa83a('0x78')}]});})[_0xa83a('0x1f')](function(_0x4ed91b){if(_0xa89d88[_0xa83a('0x56')][_0xa83a('0x20')]===_0xa83a('0x28'))return _0x4ed91b;if(_0xa89d88[_0xa83a('0x28')][_0xa83a('0x20')]!=='user')return _0x4ed91b;return db[_0xa83a('0x79')][_0xa83a('0x57')]({'where':{'name':_0x4ed91b[_0xa83a('0x20')]===_0xa83a('0x21')?'Agents':'Telephones','userProfileId':_0xa89d88[_0xa83a('0x28')][_0xa83a('0x77')]},'raw':!![]})[_0xa83a('0x1f')](function(_0x1d045b){if(!_0x1d045b||_0x1d045b['autoAssociation']!=0x0)return _0x4ed91b;return db[_0xa83a('0x30')]['create']({'name':_0x4ed91b[_0xa83a('0x34')],'resourceId':_0x4ed91b['id'],'type':_0x1d045b['name'],'sectionId':_0x1d045b['id']},{})[_0xa83a('0x1f')](function(){return _0x4ed91b;});})[_0xa83a('0x50')](function(_0xe88053){logger[_0xa83a('0x32')]('Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s',_0xe88053);throw _0xe88053;});})['then'](respondWithResult(_0x344a76,0xc9))[_0xa83a('0x50')](handleError(_0x344a76,null));};exports[_0xa83a('0x7a')]=function(_0x38d101,_0x31e40e){var _0x2154ff=_0x38d101[_0xa83a('0x56')];var _0x26c89d=[];if(_0x38d101[_0xa83a('0x28')][_0xa83a('0x20')]===_0xa83a('0x21'))throw new Error(_0xa83a('0x72'));if(_[_0xa83a('0x7b')](_0x2154ff,[_0xa83a('0x20'),_0xa83a('0x28')])&&_0x38d101[_0xa83a('0x28')]['role']!=='admin'){throw new Error(_0xa83a('0x73'));}if(_[_0xa83a('0x7b')](_0x2154ff,[_0xa83a('0x20'),_0xa83a('0x26')])&&_0x38d101[_0xa83a('0x28')][_0xa83a('0x20')]!==_0xa83a('0x26')){throw new Error(_0xa83a('0x7c'));}return licenseUtil[_0xa83a('0x75')](_0x2154ff)[_0xa83a('0x1f')](function(){return validateUser(_0x2154ff[0x0]);})[_0xa83a('0x1f')](function(){for(var _0x546974=0x1;_0x546974<_0x2154ff['length'];_0x546974++){var _0x5c4c9d=_0x2154ff[_0x546974-0x1][_0xa83a('0x5c')];if(!_0x2154ff[_0x546974][_0xa83a('0x5c')])_0x2154ff[_0x546974][_0xa83a('0x5c')]=_0x5c4c9d+0x1;_0x26c89d['push'](validateUser(_0x2154ff[_0x546974]));}return Promise[_0xa83a('0x4f')](_0x26c89d);})[_0xa83a('0x1f')](function(){_0x26c89d=[];for(var _0x3a58e0=0x0;_0x3a58e0<_0x2154ff[_0xa83a('0x49')];_0x3a58e0++){_0x26c89d[_0xa83a('0x45')](updateUser(_0x2154ff[_0x3a58e0]));}return Promise[_0xa83a('0x4f')](_0x26c89d);})['then'](function(){_0x26c89d=_0x2154ff[_0xa83a('0x2d')](function(_0x32e853){return db['User'][_0xa83a('0x71')](_0x32e853,{'include':[{'model':db['VoiceMail'],'as':_0xa83a('0x78')}]})[_0xa83a('0x1f')](function(_0x4a7dbb){_0x32e853['id']=_0x4a7dbb['id'];return _0x32e853;});});return Promise[_0xa83a('0x4f')](_0x26c89d);})[_0xa83a('0x1f')](function(_0x28fdb5){if(_0x38d101[_0xa83a('0x56')][_0xa83a('0x20')]===_0xa83a('0x28'))return _0x28fdb5;if(_0x38d101[_0xa83a('0x28')][_0xa83a('0x20')]!==_0xa83a('0x28'))return _0x28fdb5;var _0x3b02ca=_['some'](_0x28fdb5,function(_0x137ce2){return _0x137ce2[_0xa83a('0x20')]===_0xa83a('0x21')||_0x137ce2[_0xa83a('0x20')]===_0xa83a('0x7d');});if(!_0x3b02ca)return _0x28fdb5;return db[_0xa83a('0x79')][_0xa83a('0x46')]({'where':{'name':{'$or':[_0xa83a('0x29'),_0xa83a('0x2a')]},'userProfileId':_0x38d101[_0xa83a('0x28')][_0xa83a('0x77')]},'raw':!![]})[_0xa83a('0x1f')](function(_0x1cc7ff){if(_[_0xa83a('0x7e')](_0x1cc7ff)||!_['some'](_0x1cc7ff,[_0xa83a('0x7f'),0x0]))return _0x28fdb5;_0x26c89d=[];var _0x466bed=_(_0x1cc7ff)[_0xa83a('0x2d')](function(_0x2de193){if(_0x2de193[_0xa83a('0x7f')]===0x1)return;return _0x2de193[_0xa83a('0x34')]===_0xa83a('0x29')?_0xa83a('0x21'):'telephone';})['compact']()[_0xa83a('0x2e')]();for(var _0x15b923=0x0;_0x15b923<_0x28fdb5[_0xa83a('0x49')];_0x15b923++){if(!_[_0xa83a('0x2f')](_0x466bed,_0x28fdb5[_0x15b923][_0xa83a('0x20')]))return;var _0x2090a5=_0x28fdb5[_0x15b923][_0xa83a('0x20')]===_0xa83a('0x21')?_0xa83a('0x29'):_0xa83a('0x2a');_0x26c89d[_0xa83a('0x45')](db['UserProfileResource']['create']({'name':_0x28fdb5[_0x15b923][_0xa83a('0x34')],'resourceId':_0x28fdb5[_0x15b923]['id'],'type':_0x2090a5,'sectionId':_['find'](_0x1cc7ff,['name',_0x2090a5])['id']},{}));}return Promise[_0xa83a('0x4f')](_0x26c89d);});})[_0xa83a('0x1f')](respondWithResult(_0x31e40e,0xc9))[_0xa83a('0x50')](handleError(_0x31e40e,null));};exports[_0xa83a('0x80')]=function(_0x184fad,_0x2c8d3a){if(_0x184fad[_0xa83a('0x56')]['id']){delete _0x184fad[_0xa83a('0x56')]['id'];}return db[_0xa83a('0x35')][_0xa83a('0x57')]({'where':{'id':_0x184fad['params']['id']}})['then'](function(_0x20ddf1){if(!_0x20ddf1)return null;if(_0x20ddf1['id']===_0x184fad['user']['id']){if(!_0x184fad[_0xa83a('0x56')][_0xa83a('0x81')]||!_0x184fad[_0xa83a('0x56')][_0xa83a('0x82')]){throw new db[(_0xa83a('0x83'))][(_0xa83a('0x84'))]('Invalid\x20body\x20format.\x20Use\x20oldPassword\x20and\x20newPassword');}if(!_0x20ddf1[_0xa83a('0x85')](_0x184fad[_0xa83a('0x56')][_0xa83a('0x81')])){throw new db[(_0xa83a('0x83'))]['ValidationError'](_0xa83a('0x86'));}if(_0x184fad[_0xa83a('0x56')]['oldPassword']===_0x184fad['body']['newPassword']){throw new db['Sequelize'][(_0xa83a('0x84'))](_0xa83a('0x87'));}}else if(_0x184fad[_0xa83a('0x28')][_0xa83a('0x20')]===_0xa83a('0x26')){if(!_0x184fad[_0xa83a('0x56')][_0xa83a('0x82')]){throw new db['Sequelize'][(_0xa83a('0x84'))](_0xa83a('0x88'));}}else if(_0x184fad[_0xa83a('0x28')]['role']==='user'){if(!_0x184fad[_0xa83a('0x56')][_0xa83a('0x82')]){throw new db[(_0xa83a('0x83'))][(_0xa83a('0x84'))]('Invalid\x20body\x20format.\x20Use\x20newPassword');}if(_0x20ddf1[_0xa83a('0x20')]!==_0xa83a('0x21')){throw new db[(_0xa83a('0x83'))][(_0xa83a('0x84'))](_0xa83a('0x72'));}}else{throw new db[(_0xa83a('0x83'))][(_0xa83a('0x84'))]('Unauthorized');}return _0x20ddf1;})[_0xa83a('0x1f')](handleEntityNotFound(_0x2c8d3a,null))[_0xa83a('0x1f')](function(_0x8c0ff8){return db['Setting']['findOne']({'attributes':['id',_0xa83a('0x5e'),'enforcePasswordHistory',_0xa83a('0x89')]})[_0xa83a('0x1f')](function(_0x172ef6){if(_0x172ef6[_0xa83a('0x5e')])authService['validatePasswordPattern'](_0x184fad[_0xa83a('0x56')]['newPassword']);if(!_0x172ef6[_0xa83a('0x8a')]||!_0x8c0ff8[_0xa83a('0x3a')])return _0x8c0ff8;authService[_0xa83a('0x8b')](_0x184fad['body']['newPassword'],_0x8c0ff8[_0xa83a('0x3a')],_0x172ef6[_0xa83a('0x89')]);return _0x8c0ff8;})[_0xa83a('0x1f')](saveUpdates({'password':_0x184fad[_0xa83a('0x56')]['newPassword'],'passwordResetAt':_0x184fad[_0xa83a('0x28')]['id']==_0x184fad[_0xa83a('0x52')]['id']?moment():null,'previousPasswords':authService[_0xa83a('0x8c')](_0x184fad[_0xa83a('0x56')]['newPassword'],_0x8c0ff8[_0xa83a('0x3a')])},null));})[_0xa83a('0x1f')](respondWithResult(_0x2c8d3a,null))[_0xa83a('0x50')](handleError(_0x2c8d3a,null));};exports[_0xa83a('0x8d')]=function(_0x1d44fa,_0x5b7c2c){var _0x3d2924=_0x1d44fa[_0xa83a('0x56')][_0xa83a('0x8e')];return db[_0xa83a('0x35')]['find']({'where':{'id':_0x1d44fa[_0xa83a('0x52')]['id']},'attributes':['id',_0xa83a('0x34'),_0xa83a('0x20'),_0xa83a('0x8f'),'loginInPause',_0xa83a('0x90'),_0xa83a('0x91')]})['then'](handleEntityNotFound(_0x5b7c2c,null))[_0xa83a('0x1f')](function(_0x37ba37){if(_0x37ba37){if(!utils[_0xa83a('0x92')](_0x3d2924)){throw new db['Sequelize'][(_0xa83a('0x84'))](_0xa83a('0x93'));}return _0x37ba37[_0xa83a('0x94')+_['capitalize'](_0x3d2924['toLowerCase']())+'Queues'](_0x1d44fa[_0xa83a('0x56')]['ids'],{'penalty':_0x1d44fa[_0xa83a('0x56')][_0xa83a('0x95')]||0x0})[_0xa83a('0x96')](function(_0x254f26){for(var _0x44c4df=0x0;_0x44c4df<_0x1d44fa[_0xa83a('0x56')][_0xa83a('0x5a')][_0xa83a('0x49')];_0x44c4df+=0x1){var _0x1d6f9a={'UserId':Number(_0x1d44fa[_0xa83a('0x52')]['id'])};_0x1d6f9a[_[_0xa83a('0x97')](_0x3d2924['toLowerCase']())+_0xa83a('0x98')]=Number(_0x1d44fa['body'][_0xa83a('0x5a')][_0x44c4df]);socket['emit']('user'+_[_0xa83a('0x97')](_0x3d2924['toLowerCase']())+_0xa83a('0x99'),_0x1d6f9a);}return _0x254f26;})['then'](function(){if(_0x3d2924===_0xa83a('0x9a')){return db[_0xa83a('0x9b')]['findAll']({'where':{'id':_0x1d44fa[_0xa83a('0x56')][_0xa83a('0x5a')]||[]},'raw':!![],'attributes':['id','name']});}})['then'](function(_0x3e5f9d){var _0x296976=_0x37ba37[_0xa83a('0x25')]({'plain':!![]});var _0x210147=[];if(_0x3d2924==='voice'&&_0x296976[_0xa83a('0x20')]==='agent'&&_0x296976['online']){for(let _0x37cec5=0x0;_0x37cec5<_0x3e5f9d[_0xa83a('0x49')];_0x37cec5+=0x1){_0x210147[_0xa83a('0x45')]({'membername':_0x296976[_0xa83a('0x34')],'UserId':_0x296976['id'],'queue_name':_0x3e5f9d[_0x37cec5]['name'],'VoiceQueueId':_0x3e5f9d[_0x37cec5]['id'],'interface':_[_0xa83a('0x62')](_0x296976[_0xa83a('0x91')])?util[_0xa83a('0x9c')]('SIP/%s',_0x296976[_0xa83a('0x34')]):_0x296976[_0xa83a('0x91')],'paused':_0x296976[_0xa83a('0x90')]||![],'penalty':_0x1d44fa[_0xa83a('0x56')][_0xa83a('0x95')]||0x0});}return Promise[_0xa83a('0x4f')](_0x210147['map'](function(_0x463a4c){return db[_0xa83a('0x9d')][_0xa83a('0x9e')](_0x463a4c);}));}return _0x37ba37;});}})[_0xa83a('0x1f')](respondWithStatusCode(_0x5b7c2c,null))[_0xa83a('0x50')](handleError(_0x5b7c2c,null));};exports[_0xa83a('0x9f')]=function(_0x5b5b47,_0x3f54c5){var _0x311a3d,_0x2015d6;return db[_0xa83a('0x35')][_0xa83a('0x57')]({'where':{'id':_0x5b5b47['params']['id']},'attributes':['id',_0xa83a('0x34'),'role']})[_0xa83a('0x1f')](handleEntityNotFound(_0x3f54c5,null))['then'](function(_0x2b5ccb){if(_0x2b5ccb){_0x311a3d=_0x2b5ccb;if(!_0x5b5b47[_0xa83a('0x3e')][_0xa83a('0x8e')]||!utils[_0xa83a('0x92')](_0x5b5b47[_0xa83a('0x3e')]['channel'])){throw new db['Sequelize'][(_0xa83a('0x84'))]('Unknown\x20channel');}return _0x2b5ccb[_0xa83a('0xa0')+_[_0xa83a('0x97')](_0x5b5b47[_0xa83a('0x3e')][_0xa83a('0x8e')][_0xa83a('0xa1')]())+_0xa83a('0xa2')](_0x5b5b47[_0xa83a('0x3e')][_0xa83a('0x5a')]);}})[_0xa83a('0x1f')](function(_0x146a48){if(_[_0xa83a('0xa3')](_0x5b5b47['query']['ids'])){for(var _0x123382=0x0;_0x123382<_0x5b5b47[_0xa83a('0x3e')][_0xa83a('0x5a')][_0xa83a('0x49')];_0x123382+=0x1){_0x2015d6={'UserId':Number(_0x5b5b47[_0xa83a('0x52')]['id'])};_0x2015d6[_[_0xa83a('0x97')](_0x5b5b47[_0xa83a('0x3e')][_0xa83a('0x8e')]['toLowerCase']())+'QueueId']=Number(_0x5b5b47[_0xa83a('0x3e')][_0xa83a('0x5a')][_0x123382]);socket[_0xa83a('0x22')](_0xa83a('0x28')+_['capitalize'](_0x5b5b47[_0xa83a('0x3e')]['channel'][_0xa83a('0xa1')]())+'Queue:remove',_0x2015d6);}}else{_0x2015d6={'UserId':Number(_0x5b5b47[_0xa83a('0x52')]['id'])};_0x2015d6[_[_0xa83a('0x97')](_0x5b5b47[_0xa83a('0x3e')][_0xa83a('0x8e')][_0xa83a('0xa1')]())+_0xa83a('0x98')]=Number(_0x5b5b47['query'][_0xa83a('0x5a')]);socket[_0xa83a('0x22')](_0xa83a('0x28')+_[_0xa83a('0x97')](_0x5b5b47[_0xa83a('0x3e')]['channel'][_0xa83a('0xa1')]())+_0xa83a('0xa4'),_0x2015d6);}return _0x146a48;})['then'](function(){if(_0x5b5b47[_0xa83a('0x3e')]['channel']==='voice'){return db['UserVoiceQueueRt']['destroy']({'where':{'UserId':_0x5b5b47[_0xa83a('0x52')]['id'],'VoiceQueueId':_0x5b5b47[_0xa83a('0x3e')][_0xa83a('0x5a')]},'individualHooks':!![]})[_0xa83a('0x1f')](function(){return _0x311a3d;});}return _0x311a3d;})[_0xa83a('0x1f')](respondWithStatusCode(_0x3f54c5,null))[_0xa83a('0x50')](handleError(_0x3f54c5,null));};exports[_0xa83a('0xa5')]=function(_0x3b1533,_0x51cb12){_0x3b1533['body'][_0xa83a('0xa6')]=_0x3b1533[_0xa83a('0xa7')]['filename'];return db[_0xa83a('0x35')][_0xa83a('0x57')]({'where':{'id':_0x3b1533[_0xa83a('0x52')]['id']}})[_0xa83a('0x1f')](handleEntityNotFound(_0x51cb12,null))[_0xa83a('0x1f')](saveUpdates(_0x3b1533[_0xa83a('0x56')],null))[_0xa83a('0x1f')](respondWithResult(_0x51cb12,null))[_0xa83a('0x50')](handleError(_0x51cb12,null));};exports[_0xa83a('0xa8')]=function(_0x231c9a,_0x2594d1){var _0x1e3042=path[_0xa83a('0xa9')](config[_0xa83a('0xaa')],_0xa83a('0xab'));return db[_0xa83a('0x35')]['find']({'where':{'id':_0x231c9a[_0xa83a('0x52')]['id']},'attributes':['id','userpic'],'raw':!![]})[_0xa83a('0x1f')](handleEntityNotFound(_0x2594d1,null))['then'](function(_0x1641bc){if(_0x1641bc){if(_['isNil'](_0x1641bc[_0xa83a('0xa6')])){return _0x2594d1[_0xa83a('0xac')](_0x1e3042);}else{if(!fs[_0xa83a('0xad')](path[_0xa83a('0xa9')](config['root'],_0xa83a('0xae'),_0x1641bc[_0xa83a('0xa6')]))){return _0x2594d1[_0xa83a('0xac')](_0x1e3042);}return _0x2594d1[_0xa83a('0xac')](path['join'](config['root'],'server/files/images/',_0x1641bc[_0xa83a('0xa6')]));}}})['catch'](handleError(_0x2594d1,null));};exports[_0xa83a('0xaf')]=function(_0xfb5a38,_0x17c849){return db[_0xa83a('0x35')]['find']({'where':{'id':_0xfb5a38['params']['id']},'attributes':['id']})[_0xa83a('0x1f')](handleEntityNotFound(_0x17c849,null))[_0xa83a('0x1f')](function(_0x1bb330){var _0x27aa2c=[];values=_0x1bb330['dataValues'];_0x27aa2c[_0xa83a('0x45')](get_open_tabs(_0xa83a('0x4a'),_0x1bb330['dataValues']));_0x27aa2c[_0xa83a('0x45')](get_open_tabs(_0xa83a('0x55'),_0x1bb330[_0xa83a('0x4b')]));_0x27aa2c[_0xa83a('0x45')](get_open_tabs(_0xa83a('0x4d'),_0x1bb330['dataValues']));_0x27aa2c[_0xa83a('0x45')](get_open_tabs(_0xa83a('0x4e'),_0x1bb330[_0xa83a('0x4b')]));_0x27aa2c[_0xa83a('0x45')](get_open_tabs(_0xa83a('0xb0'),_0x1bb330['dataValues']));_0x27aa2c[_0xa83a('0x45')](get_open_tabs('mail',_0x1bb330[_0xa83a('0x4b')]));return Promise['all'](_0x27aa2c);})['then'](function(_0x39dce1){if(_0x39dce1){var _0x478342=_[_0xa83a('0x2d')](values[_0xa83a('0xb1')],function(_0x26bc30){return{'channel':_0xa83a('0xb2'),'id':_0x26bc30['id'],'createdAt':_0x26bc30[_0xa83a('0xb3')]};});var _0x30d3c7=_[_0xa83a('0x2d')](values[_0xa83a('0xb4')],function(_0x296d96){return{'channel':_0xa83a('0xb5'),'id':_0x296d96['id'],'createdAt':_0x296d96['createdAt']};});var _0x262751=_['map'](values[_0xa83a('0xb6')],function(_0x2b6a15){return{'channel':_0xa83a('0xb7'),'id':_0x2b6a15['id'],'createdAt':_0x2b6a15['createdAt']};});var _0x366ba9=_[_0xa83a('0x2d')](values[_0xa83a('0xb8')],function(_0x30c279){return{'channel':'MAIL','id':_0x30c279['id'],'createdAt':_0x30c279[_0xa83a('0xb3')]};});var _0x43f83a=_['map'](values[_0xa83a('0xb9')],function(_0x10a0f9){return{'channel':_0xa83a('0xba'),'id':_0x10a0f9['id'],'createdAt':_0x10a0f9[_0xa83a('0xb3')]};});var _0x3eccc7=_['map'](values[_0xa83a('0xbb')],function(_0x4ce498){return{'channel':_0xa83a('0xbc'),'id':_0x4ce498['id'],'createdAt':_0x4ce498['createdAt']};});var _0x197a75=_[_0xa83a('0xbd')](_0x478342,_0x30d3c7,_0x262751,_0x366ba9,_0x43f83a,_0x3eccc7);var _0x567005={'count':_0x197a75[_0xa83a('0x49')],'rows':_0x197a75};return _0x567005;}else return null;})[_0xa83a('0x1f')](respondWithResult(_0x17c849,null))[_0xa83a('0x50')](handleError(_0x17c849,null));};exports[_0xa83a('0xbe')]=function(_0xea0e54,_0x293373){var _0x21009e={};return db[_0xa83a('0x35')][_0xa83a('0xbf')]({'where':{'id':_0xea0e54['params']['id']}})[_0xa83a('0x1f')](function(_0x423295){if(!_0x423295){throw new APINotFoundError(util[_0xa83a('0x9c')](_0xa83a('0xc0'),_0xea0e54[_0xa83a('0x52')]['id']));}return contacts['describe']();})[_0xa83a('0x1f')](function(_0x5591fe){_0xea0e54[_0xa83a('0x3e')][_0xa83a('0x35')]=_0xea0e54[_0xa83a('0x52')]['id'];_0x21009e=qs[_0xa83a('0x3d')](_0x5591fe,_0xea0e54);if(_0xea0e54[_0xa83a('0x3e')]['hasOwnProperty']('includeAll')){_0x21009e['include']=[{'model':db[_0xa83a('0xc1')],'as':_0xa83a('0xc2'),'required':![]},{'model':db[_0xa83a('0xc3')],'as':_0xa83a('0xc4'),'attributes':['id',_0xa83a('0x34'),_0xa83a('0xc5')],'where':_0xea0e54['query'][_0xa83a('0xc6')]?{'id':_0xea0e54[_0xa83a('0x3e')][_0xa83a('0xc6')]}:undefined,'required':_0xea0e54[_0xa83a('0x3e')][_0xa83a('0xc6')]?!![]:![]}];}return contacts[_0xa83a('0x46')](_0xea0e54[_0xa83a('0x3e')],_0xea0e54[_0xa83a('0x28')],_0x21009e,_0x5591fe);})[_0xa83a('0x1f')](respondWithFilteredResult(_0x293373,_0x21009e))[_0xa83a('0x50')](APIHandleError(_0x293373));};exports[_0xa83a('0xc7')]=function(_0x49009b,_0x571a55){var _0x369839;var _0x25d3bc={};var _0x18bf5f;return db[_0xa83a('0x35')]['findOne']({'where':{'id':_0x49009b['params']['id']},'attributes':['id','name','role']})[_0xa83a('0x1f')](handleEntityNotFound(_0x571a55,null))[_0xa83a('0x1f')](function(_0x504453){if(!utils[_0xa83a('0x92')](_0x49009b[_0xa83a('0x3e')][_0xa83a('0x8e')])){throw new db[(_0xa83a('0x83'))][(_0xa83a('0x84'))]('Unknown\x20channel');}_0x369839=_0x504453;var _0xf3208b={};_0xf3208b[_0xa83a('0xc8')]=_[_0xa83a('0xc9')](db[_[_0xa83a('0x97')](_0x49009b[_0xa83a('0x3e')]['channel'])+_0xa83a('0xca')][_0xa83a('0x36')]);_0xf3208b[_0xa83a('0x3e')]=_[_0xa83a('0xc9')](_0x49009b[_0xa83a('0x3e')]);_0xf3208b['filters']=_['intersection'](_0xf3208b[_0xa83a('0xc8')],_0xf3208b[_0xa83a('0x3e')]);_0x25d3bc[_0xa83a('0x44')]=_['intersection'](_0xf3208b[_0xa83a('0xc8')],qs[_0xa83a('0xcb')](_0x49009b[_0xa83a('0x3e')]['fields']));_0x25d3bc[_0xa83a('0x44')]=_0x25d3bc[_0xa83a('0x44')][_0xa83a('0x49')]?_0x25d3bc[_0xa83a('0x44')]:_0xf3208b[_0xa83a('0xc8')];_0x25d3bc[_0xa83a('0xcc')]=qs['sort'](_0x49009b['query'][_0xa83a('0xcd')]);_0x25d3bc['where']=qs[_0xa83a('0xce')](_[_0xa83a('0xcf')](_0x49009b[_0xa83a('0x3e')],_0xf3208b[_0xa83a('0xce')]));if(_0x49009b[_0xa83a('0x3e')][_0xa83a('0x2b')]){_0x25d3bc[_0xa83a('0xd0')]=_[_0xa83a('0x53')](_0x25d3bc[_0xa83a('0xd0')],{'$or':_[_0xa83a('0x2d')](_0x25d3bc[_0xa83a('0x44')],function(_0x3fddc9){var _0x4d3526={};_0x4d3526[_0x3fddc9]={'$like':'%'+_0x49009b[_0xa83a('0x3e')][_0xa83a('0x2b')]+'%'};return _0x4d3526;})});}_0x25d3bc=_[_0xa83a('0x53')]({},_0x25d3bc,_0x49009b[_0xa83a('0x54')]);switch(_0x369839[_0xa83a('0x20')]){case'admin':return db[_[_0xa83a('0x97')](_0x49009b['query']['channel'])+'Queue'][_0xa83a('0x46')](_0x25d3bc);case _0xa83a('0x28'):case _0xa83a('0x21'):return _0x369839[_0xa83a('0x25')+_[_0xa83a('0x97')](_0x49009b[_0xa83a('0x3e')][_0xa83a('0x8e')])+_0xa83a('0xa2')](_0x25d3bc);default:throw new db[(_0xa83a('0x83'))][(_0xa83a('0x84'))]('Unknown\x20role');}})['then'](function(_0x2b2ea8){_0x18bf5f=_0x2b2ea8[_0xa83a('0x49')];if(!_0x49009b[_0xa83a('0x3e')][_0xa83a('0xd1')]('nolimit')){_0x25d3bc[_0xa83a('0x19')]=qs[_0xa83a('0x19')](_0x49009b['query']['limit']);_0x25d3bc[_0xa83a('0x17')]=qs[_0xa83a('0x17')](_0x49009b[_0xa83a('0x3e')][_0xa83a('0x17')]);}switch(_0x369839[_0xa83a('0x20')]){case _0xa83a('0x26'):return db[_[_0xa83a('0x97')](_0x49009b[_0xa83a('0x3e')][_0xa83a('0x8e')])+'Queue'][_0xa83a('0x46')](_0x25d3bc);case _0xa83a('0x28'):case _0xa83a('0x21'):return _0x369839['get'+_[_0xa83a('0x97')](_0x49009b[_0xa83a('0x3e')][_0xa83a('0x8e')])+_0xa83a('0xa2')](_0x25d3bc);}})[_0xa83a('0x1f')](function(_0x586364){return{'count':_0x18bf5f,'rows':_0x586364};})[_0xa83a('0x1f')](respondWithResult(_0x571a55,null))['catch'](handleError(_0x571a55,null));};exports[_0xa83a('0xd2')]=function(_0x4b4dbb,_0x1bd207){var _0x3d77a3={};var _0x10f36b={};var _0x3121e5;var _0x50b478;return db[_0xa83a('0x35')][_0xa83a('0xbf')]({'where':{'id':_0x4b4dbb['params']['id']}})[_0xa83a('0x1f')](handleEntityNotFound(_0x1bd207,null))[_0xa83a('0x1f')](function(_0x1f33a5){if(_0x1f33a5){_0x3121e5=_0x1f33a5;_0x10f36b[_0xa83a('0xc8')]=_['keys'](db[_0xa83a('0x9d')]['rawAttributes']);_0x10f36b['query']=_[_0xa83a('0xc9')](_0x4b4dbb['query']);_0x10f36b[_0xa83a('0xce')]=_[_0xa83a('0xd3')](_0x10f36b[_0xa83a('0xc8')],_0x10f36b[_0xa83a('0x3e')]);_0x3d77a3[_0xa83a('0x44')]=_[_0xa83a('0xd3')](_0x10f36b[_0xa83a('0xc8')],qs[_0xa83a('0xcb')](_0x4b4dbb['query'][_0xa83a('0xcb')]));_0x3d77a3['attributes']=_0x3d77a3[_0xa83a('0x44')]['length']?_0x3d77a3[_0xa83a('0x44')]:_0x10f36b['model'];_0x3d77a3['order']=qs[_0xa83a('0xcd')](_0x4b4dbb['query'][_0xa83a('0xcd')]);_0x3d77a3[_0xa83a('0xd0')]=qs[_0xa83a('0xce')](_[_0xa83a('0xcf')](_0x4b4dbb[_0xa83a('0x3e')],_0x10f36b['filters']));if(_0x4b4dbb[_0xa83a('0x3e')]['filter']){_0x3d77a3[_0xa83a('0xd0')]=_['merge'](_0x3d77a3[_0xa83a('0xd0')],{'$or':_[_0xa83a('0x2d')](_0x3d77a3['attributes'],function(_0xfaf8eb){var _0x5931b4={};_0x5931b4[_0xfaf8eb]={'$like':'%'+_0x4b4dbb[_0xa83a('0x3e')]['filter']+'%'};return _0x5931b4;})});}_0x3d77a3=_[_0xa83a('0x53')]({},_0x3d77a3,_0x4b4dbb[_0xa83a('0x54')]);return _0x3121e5['getVoiceQueuesRt'](_0x3d77a3);}})[_0xa83a('0x1f')](function(_0xc1cf75){if(_0xc1cf75){_0x50b478=_0xc1cf75[_0xa83a('0x49')];if(!_0x4b4dbb[_0xa83a('0x3e')][_0xa83a('0xd1')](_0xa83a('0xd4'))){_0x3d77a3[_0xa83a('0x19')]=qs['limit'](_0x4b4dbb[_0xa83a('0x3e')][_0xa83a('0x19')]);_0x3d77a3['offset']=qs[_0xa83a('0x17')](_0x4b4dbb['query'][_0xa83a('0x17')]);}return _0x3121e5[_0xa83a('0xd2')](_0x3d77a3);}})['then'](function(_0x256037){if(_0x256037){return _0x256037?{'count':_0x50b478,'rows':_0x256037}:null;}})[_0xa83a('0x1f')](respondWithResult(_0x1bd207,null))[_0xa83a('0x50')](handleError(_0x1bd207,null));};exports['getGroups']=function(_0x1be69b,_0x205e3d){var _0x435cc1={};var _0x2fb015={};var _0x3d75c5;var _0x2fa1fd;return db[_0xa83a('0x35')][_0xa83a('0xbf')]({'where':{'id':_0x1be69b[_0xa83a('0x52')]['id']}})[_0xa83a('0x1f')](handleEntityNotFound(_0x205e3d,null))[_0xa83a('0x1f')](function(_0x10f126){if(_0x10f126){_0x3d75c5=_0x10f126;_0x2fb015['model']=_[_0xa83a('0xc9')](db['ChatGroup'][_0xa83a('0x36')]);_0x2fb015[_0xa83a('0x3e')]=_[_0xa83a('0xc9')](_0x1be69b[_0xa83a('0x3e')]);_0x2fb015[_0xa83a('0xce')]=_[_0xa83a('0xd3')](_0x2fb015[_0xa83a('0xc8')],_0x2fb015['query']);_0x435cc1['attributes']=_[_0xa83a('0xd3')](_0x2fb015[_0xa83a('0xc8')],qs['fields'](_0x1be69b[_0xa83a('0x3e')][_0xa83a('0xcb')]));_0x435cc1['attributes']=_0x435cc1['attributes'][_0xa83a('0x49')]?_0x435cc1[_0xa83a('0x44')]:_0x2fb015['model'];_0x435cc1[_0xa83a('0xcc')]=qs[_0xa83a('0xcd')](_0x1be69b['query']['sort']);_0x435cc1[_0xa83a('0xd0')]=qs['filters'](_['pick'](_0x1be69b[_0xa83a('0x3e')],_0x2fb015[_0xa83a('0xce')]));if(_0x1be69b[_0xa83a('0x3e')][_0xa83a('0x2b')]){_0x435cc1[_0xa83a('0xd0')]=_['merge'](_0x435cc1[_0xa83a('0xd0')],{'$or':_['map'](_0x435cc1[_0xa83a('0x44')],function(_0x5f5210){var _0x48c452={};_0x48c452[_0x5f5210]={'$like':'%'+_0x1be69b[_0xa83a('0x3e')][_0xa83a('0x2b')]+'%'};return _0x48c452;})});}_0x435cc1=_[_0xa83a('0x53')]({},_0x435cc1,_0x1be69b[_0xa83a('0x54')]);return _0x3d75c5['getGroups'](_0x435cc1);}})[_0xa83a('0x1f')](function(_0x583616){if(_0x583616){_0x2fa1fd=_0x583616[_0xa83a('0x49')];if(!_0x1be69b[_0xa83a('0x3e')][_0xa83a('0xd1')](_0xa83a('0xd4'))){_0x435cc1[_0xa83a('0x19')]=qs['limit'](_0x1be69b['query']['limit']);_0x435cc1[_0xa83a('0x17')]=qs[_0xa83a('0x17')](_0x1be69b[_0xa83a('0x3e')][_0xa83a('0x17')]);}return _0x3d75c5['getGroups'](_0x435cc1);}})[_0xa83a('0x1f')](function(_0x5ea0ee){if(_0x5ea0ee){return _0x5ea0ee?{'count':_0x2fa1fd,'rows':_0x5ea0ee}:null;}})[_0xa83a('0x1f')](respondWithResult(_0x205e3d,null))['catch'](handleError(_0x205e3d,null));};exports[_0xa83a('0xd5')]=function(_0x66d859,_0x2f847f){var _0x3d204e={'raw':!![],'where':{}};var _0x4877f0={};var _0x5210d7={'count':0x0,'rows':[]};return db[_0xa83a('0x35')][_0xa83a('0xbf')]({'where':{'id':_0x66d859[_0xa83a('0x52')]['id']}})[_0xa83a('0x1f')](handleEntityNotFound(_0x2f847f,null))['then'](function(_0x4f4d3f){if(_0x4f4d3f){_0x4877f0[_0xa83a('0xc8')]=_['keys'](db[_0xa83a('0xd6')][_0xa83a('0x36')]);_0x4877f0[_0xa83a('0x3e')]=_[_0xa83a('0xc9')](_0x66d859[_0xa83a('0x3e')]);_0x4877f0[_0xa83a('0xce')]=_[_0xa83a('0xd3')](_0x4877f0['model'],_0x4877f0[_0xa83a('0x3e')]);_0x3d204e[_0xa83a('0x44')]=_[_0xa83a('0xd3')](_0x4877f0['model'],qs['fields'](_0x66d859[_0xa83a('0x3e')]['fields']));_0x3d204e[_0xa83a('0x44')]=_0x3d204e['attributes'][_0xa83a('0x49')]?_0x3d204e['attributes']:_0x4877f0[_0xa83a('0xc8')];if(!_0x66d859['query']['hasOwnProperty']('nolimit')){_0x3d204e[_0xa83a('0x19')]=qs['limit'](_0x66d859[_0xa83a('0x3e')][_0xa83a('0x19')]);_0x3d204e[_0xa83a('0x17')]=qs['offset'](_0x66d859['query'][_0xa83a('0x17')]);}_0x3d204e[_0xa83a('0xcc')]=qs[_0xa83a('0xcd')](_0x66d859['query'][_0xa83a('0xcd')]);_0x3d204e[_0xa83a('0xd0')]=qs[_0xa83a('0xce')](_[_0xa83a('0xcf')](_0x66d859['query'],_0x4877f0[_0xa83a('0xce')]));_0x3d204e[_0xa83a('0xd0')]['UserId']=_0x4f4d3f['id'];if(_0x66d859[_0xa83a('0x3e')]['filter']){_0x3d204e[_0xa83a('0xd0')]=_[_0xa83a('0x53')](_0x3d204e['where'],{'$or':_[_0xa83a('0x2d')](_0x3d204e['attributes'],function(_0x8dda53){var _0x2c501c={};_0x2c501c[_0x8dda53]={'$like':'%'+_0x66d859['query'][_0xa83a('0x2b')]+'%'};return _0x2c501c;})});}_0x3d204e=_['merge']({},_0x3d204e,_0x66d859[_0xa83a('0x54')]);return db[_0xa83a('0xd6')][_0xa83a('0x1a')]({'where':_0x3d204e[_0xa83a('0xd0')]})[_0xa83a('0x1f')](function(_0x35cdc4){_0x5210d7['count']=_0x35cdc4;if(_0x66d859['query'][_0xa83a('0x3f')]){_0x3d204e[_0xa83a('0x40')]=[{'all':!![]}];}return db[_0xa83a('0xd6')]['findAll'](_0x3d204e);})['then'](function(_0x46f7d0){_0x5210d7[_0xa83a('0x47')]=_0x46f7d0;return _0x5210d7;});}})['then'](respondWithFilteredResult(_0x2f847f,_0x3d204e))['catch'](handleError(_0x2f847f,null));};exports['getScreenRecordings']=function(_0x46c497,_0x21bc55){var _0x3fbc90={'raw':!![],'where':{}};var _0x486cb9={};var _0x19710d={'count':0x0,'rows':[]};return db['User'][_0xa83a('0xbf')]({'where':{'id':_0x46c497[_0xa83a('0x52')]['id']}})[_0xa83a('0x1f')](handleEntityNotFound(_0x21bc55,null))['then'](function(_0x464c25){if(_0x464c25){_0x486cb9[_0xa83a('0xc8')]=_[_0xa83a('0xc9')](db[_0xa83a('0xd7')]['rawAttributes']);_0x486cb9[_0xa83a('0x3e')]=_[_0xa83a('0xc9')](_0x46c497[_0xa83a('0x3e')]);_0x486cb9[_0xa83a('0xce')]=_[_0xa83a('0xd3')](_0x486cb9[_0xa83a('0xc8')],_0x486cb9['query']);_0x3fbc90[_0xa83a('0x44')]=_[_0xa83a('0xd3')](_0x486cb9[_0xa83a('0xc8')],qs[_0xa83a('0xcb')](_0x46c497[_0xa83a('0x3e')][_0xa83a('0xcb')]));_0x3fbc90[_0xa83a('0x44')]=_0x3fbc90[_0xa83a('0x44')][_0xa83a('0x49')]?_0x3fbc90[_0xa83a('0x44')]:_0x486cb9[_0xa83a('0xc8')];if(!_0x46c497[_0xa83a('0x3e')][_0xa83a('0xd1')](_0xa83a('0xd4'))){_0x3fbc90[_0xa83a('0x19')]=qs[_0xa83a('0x19')](_0x46c497['query']['limit']);_0x3fbc90[_0xa83a('0x17')]=qs[_0xa83a('0x17')](_0x46c497[_0xa83a('0x3e')][_0xa83a('0x17')]);}_0x3fbc90['order']=qs[_0xa83a('0xcd')](_0x46c497['query'][_0xa83a('0xcd')]);_0x3fbc90[_0xa83a('0xd0')]=qs[_0xa83a('0xce')](_[_0xa83a('0xcf')](_0x46c497[_0xa83a('0x3e')],_0x486cb9[_0xa83a('0xce')]));_0x3fbc90['where']['UserId']=_0x464c25['id'];if(_0x46c497['query'][_0xa83a('0x2b')]){_0x3fbc90[_0xa83a('0xd0')]=_[_0xa83a('0x53')](_0x3fbc90[_0xa83a('0xd0')],{'$or':_['map'](_0x3fbc90[_0xa83a('0x44')],function(_0x156273){var _0xcfb99={};_0xcfb99[_0x156273]={'$like':'%'+_0x46c497['query'][_0xa83a('0x2b')]+'%'};return _0xcfb99;})});}_0x3fbc90=_['merge']({},_0x3fbc90,_0x46c497['options']);return db[_0xa83a('0xd7')]['count']({'where':_0x3fbc90[_0xa83a('0xd0')]})[_0xa83a('0x1f')](function(_0x577042){_0x19710d[_0xa83a('0x1a')]=_0x577042;if(_0x46c497[_0xa83a('0x3e')][_0xa83a('0x3f')]){_0x3fbc90[_0xa83a('0x40')]=[{'all':!![]}];}return db[_0xa83a('0xd7')][_0xa83a('0x46')](_0x3fbc90);})['then'](function(_0x54faf4){_0x19710d[_0xa83a('0x47')]=_0x54faf4;return _0x19710d;});}})['then'](respondWithFilteredResult(_0x21bc55,_0x3fbc90))[_0xa83a('0x50')](handleError(_0x21bc55,null));};exports[_0xa83a('0xd8')]=function(_0x2c14c6,_0x1db827){var _0x143ec0={};var _0x4eda6a={};var _0x19e36a;var _0xf5e212;return db[_0xa83a('0x35')][_0xa83a('0xbf')]({'where':{'id':_0x2c14c6[_0xa83a('0x52')]['id']}})['then'](handleEntityNotFound(_0x1db827,null))['then'](function(_0x17b829){if(_0x17b829){_0x19e36a=_0x17b829;_0x4eda6a[_0xa83a('0xc8')]=_[_0xa83a('0xc9')](db[_0xa83a('0xd9')][_0xa83a('0x36')]);_0x4eda6a[_0xa83a('0x3e')]=_[_0xa83a('0xc9')](_0x2c14c6[_0xa83a('0x3e')]);_0x4eda6a[_0xa83a('0xce')]=_[_0xa83a('0xd3')](_0x4eda6a['model'],_0x4eda6a[_0xa83a('0x3e')]);_0x143ec0[_0xa83a('0x44')]=_[_0xa83a('0xd3')](_0x4eda6a[_0xa83a('0xc8')],qs[_0xa83a('0xcb')](_0x2c14c6[_0xa83a('0x3e')][_0xa83a('0xcb')]));_0x143ec0[_0xa83a('0x44')]=_0x143ec0[_0xa83a('0x44')][_0xa83a('0x49')]?_0x143ec0[_0xa83a('0x44')]:_0x4eda6a['model'];_0x143ec0['order']=qs[_0xa83a('0xcd')](_0x2c14c6[_0xa83a('0x3e')][_0xa83a('0xcd')]);_0x143ec0[_0xa83a('0xd0')]=qs[_0xa83a('0xce')](_[_0xa83a('0xcf')](_0x2c14c6[_0xa83a('0x3e')],_0x4eda6a[_0xa83a('0xce')]));if(_0x2c14c6[_0xa83a('0x3e')]['filter']){_0x143ec0[_0xa83a('0xd0')]=_[_0xa83a('0x53')](_0x143ec0['where'],{'$or':_[_0xa83a('0x2d')](_0x143ec0[_0xa83a('0x44')],function(_0xe88201){var _0x35943a={};_0x35943a[_0xe88201]={'$like':'%'+_0x2c14c6[_0xa83a('0x3e')]['filter']+'%'};return _0x35943a;})});}_0x143ec0=_[_0xa83a('0x53')]({},_0x143ec0,_0x2c14c6[_0xa83a('0x54')]);return _0x19e36a[_0xa83a('0xd8')](_0x143ec0);}})[_0xa83a('0x1f')](function(_0x463914){if(_0x463914){_0xf5e212=_0x463914['length'];if(!_0x2c14c6[_0xa83a('0x3e')][_0xa83a('0xd1')](_0xa83a('0xd4'))){_0x143ec0[_0xa83a('0x19')]=qs[_0xa83a('0x19')](_0x2c14c6[_0xa83a('0x3e')][_0xa83a('0x19')]);_0x143ec0['offset']=qs['offset'](_0x2c14c6[_0xa83a('0x3e')]['offset']);}return _0x19e36a[_0xa83a('0xd8')](_0x143ec0);}})[_0xa83a('0x1f')](function(_0x517a77){if(_0x517a77){return _0x517a77?{'count':_0xf5e212,'rows':_0x517a77}:null;}})[_0xa83a('0x1f')](respondWithResult(_0x1db827,null))['catch'](handleError(_0x1db827,null));};exports[_0xa83a('0xda')]=function(_0x50011f,_0x35e368){var _0x459403={};var _0x16ddaf={};var _0x1ac2d0;var _0x14cb18;return db[_0xa83a('0x35')][_0xa83a('0xbf')]({'where':{'id':_0x50011f[_0xa83a('0x52')]['id']}})[_0xa83a('0x1f')](handleEntityNotFound(_0x35e368,null))[_0xa83a('0x1f')](function(_0x1a79d9){if(_0x1a79d9){_0x1ac2d0=_0x1a79d9;_0x16ddaf['model']=_[_0xa83a('0xc9')](db[_0xa83a('0xdb')][_0xa83a('0x36')]);_0x16ddaf[_0xa83a('0x3e')]=_[_0xa83a('0xc9')](_0x50011f[_0xa83a('0x3e')]);_0x16ddaf[_0xa83a('0xce')]=_[_0xa83a('0xd3')](_0x16ddaf[_0xa83a('0xc8')],_0x16ddaf[_0xa83a('0x3e')]);_0x459403[_0xa83a('0x44')]=_[_0xa83a('0xd3')](_0x16ddaf[_0xa83a('0xc8')],qs['fields'](_0x50011f[_0xa83a('0x3e')]['fields']));_0x459403[_0xa83a('0x44')]=_0x459403[_0xa83a('0x44')][_0xa83a('0x49')]?_0x459403[_0xa83a('0x44')]:_0x16ddaf['model'];_0x459403[_0xa83a('0xcc')]=qs['sort'](_0x50011f[_0xa83a('0x3e')][_0xa83a('0xcd')]);_0x459403[_0xa83a('0xd0')]=qs['filters'](_[_0xa83a('0xcf')](_0x50011f['query'],_0x16ddaf[_0xa83a('0xce')]));if(_0x50011f['query'][_0xa83a('0x2b')]){_0x459403[_0xa83a('0xd0')]=_['merge'](_0x459403[_0xa83a('0xd0')],{'$or':_[_0xa83a('0x2d')](_0x459403[_0xa83a('0x44')],function(_0x104cf4){var _0x5d3f01={};_0x5d3f01[_0x104cf4]={'$like':'%'+_0x50011f['query'][_0xa83a('0x2b')]+'%'};return _0x5d3f01;})});}_0x459403=_[_0xa83a('0x53')]({},_0x459403,_0x50011f['options']);return _0x1ac2d0[_0xa83a('0xda')](_0x459403);}})[_0xa83a('0x1f')](function(_0x16fe3d){if(_0x16fe3d){_0x14cb18=_0x16fe3d[_0xa83a('0x49')];if(!_0x50011f['query'][_0xa83a('0xd1')](_0xa83a('0xd4'))){_0x459403[_0xa83a('0x19')]=qs[_0xa83a('0x19')](_0x50011f[_0xa83a('0x3e')][_0xa83a('0x19')]);_0x459403['offset']=qs['offset'](_0x50011f[_0xa83a('0x3e')]['offset']);}return _0x1ac2d0[_0xa83a('0xda')](_0x459403);}})[_0xa83a('0x1f')](function(_0x2488d4){if(_0x2488d4){return _0x2488d4?{'count':_0x14cb18,'rows':_0x2488d4}:null;}})[_0xa83a('0x1f')](respondWithResult(_0x35e368,null))[_0xa83a('0x50')](handleError(_0x35e368,null));};exports[_0xa83a('0xdc')]=function(_0x152edc,_0x30e22f){var _0x5157be={'raw':!![],'where':{}};var _0xd9c3d0={};var _0x155f6c={'count':0x0,'rows':[]};return db[_0xa83a('0x35')]['findOne']({'where':{'id':_0x152edc[_0xa83a('0x52')]['id']}})[_0xa83a('0x1f')](handleEntityNotFound(_0x30e22f,null))[_0xa83a('0x1f')](function(_0xeb1667){if(_0xeb1667){_0xd9c3d0['model']=_[_0xa83a('0xc9')](db[_0xa83a('0xdd')][_0xa83a('0x36')]);_0xd9c3d0[_0xa83a('0x3e')]=_[_0xa83a('0xc9')](_0x152edc[_0xa83a('0x3e')]);_0xd9c3d0[_0xa83a('0xce')]=_[_0xa83a('0xd3')](_0xd9c3d0[_0xa83a('0xc8')],_0xd9c3d0['query']);_0x5157be['attributes']=_['intersection'](_0xd9c3d0[_0xa83a('0xc8')],qs[_0xa83a('0xcb')](_0x152edc[_0xa83a('0x3e')][_0xa83a('0xcb')]));_0x5157be[_0xa83a('0x44')]=_0x5157be['attributes'][_0xa83a('0x49')]?_0x5157be[_0xa83a('0x44')]:_0xd9c3d0['model'];if(!_0x152edc[_0xa83a('0x3e')]['hasOwnProperty'](_0xa83a('0xd4'))){_0x5157be[_0xa83a('0x19')]=qs['limit'](_0x152edc['query'][_0xa83a('0x19')]);_0x5157be['offset']=qs[_0xa83a('0x17')](_0x152edc['query'][_0xa83a('0x17')]);}_0x5157be['order']=qs[_0xa83a('0xcd')](_0x152edc[_0xa83a('0x3e')][_0xa83a('0xcd')]);_0x5157be[_0xa83a('0xd0')]=qs['filters'](_[_0xa83a('0xcf')](_0x152edc[_0xa83a('0x3e')],_0xd9c3d0['filters']));_0x5157be['where'][_0xa83a('0xde')]=_0xeb1667['id'];if(_0x152edc[_0xa83a('0x3e')][_0xa83a('0x2b')]){_0x5157be[_0xa83a('0xd0')]=_['merge'](_0x5157be[_0xa83a('0xd0')],{'$or':_[_0xa83a('0x2d')](_0x5157be[_0xa83a('0x44')],function(_0x88ca6c){var _0x5445a3={};_0x5445a3[_0x88ca6c]={'$like':'%'+_0x152edc[_0xa83a('0x3e')][_0xa83a('0x2b')]+'%'};return _0x5445a3;})});}_0x5157be=_['merge']({},_0x5157be,_0x152edc[_0xa83a('0x54')]);return db[_0xa83a('0xdd')]['count']({'where':_0x5157be[_0xa83a('0xd0')]})[_0xa83a('0x1f')](function(_0x4d9085){_0x155f6c[_0xa83a('0x1a')]=_0x4d9085;if(_0x152edc[_0xa83a('0x3e')]['includeAll']){_0x5157be['include']=[{'all':!![]}];}return db[_0xa83a('0xdd')][_0xa83a('0x46')](_0x5157be);})[_0xa83a('0x1f')](function(_0x2db290){_0x155f6c['rows']=_0x2db290;return _0x155f6c;});}})[_0xa83a('0x1f')](respondWithFilteredResult(_0x30e22f,_0x5157be))[_0xa83a('0x50')](handleError(_0x30e22f,null));};exports[_0xa83a('0xdf')]=function(_0xc8a910,_0x4d55d9){var _0x59b428={};var _0x3ddce0={};var _0x561606;var _0x4e2619;return db[_0xa83a('0x35')][_0xa83a('0xbf')]({'where':{'id':_0xc8a910[_0xa83a('0x52')]['id']}})[_0xa83a('0x1f')](handleEntityNotFound(_0x4d55d9,null))['then'](function(_0x281aac){if(_0x281aac){_0x561606=_0x281aac;_0x3ddce0[_0xa83a('0xc8')]=_['keys'](db[_0xa83a('0xe0')][_0xa83a('0x36')]);_0x3ddce0[_0xa83a('0x3e')]=_[_0xa83a('0xc9')](_0xc8a910[_0xa83a('0x3e')]);_0x3ddce0[_0xa83a('0xce')]=_['intersection'](_0x3ddce0['model'],_0x3ddce0[_0xa83a('0x3e')]);_0x59b428[_0xa83a('0x44')]=_[_0xa83a('0xd3')](_0x3ddce0['model'],qs['fields'](_0xc8a910[_0xa83a('0x3e')][_0xa83a('0xcb')]));_0x59b428[_0xa83a('0x44')]=_0x59b428[_0xa83a('0x44')][_0xa83a('0x49')]?_0x59b428[_0xa83a('0x44')]:_0x3ddce0[_0xa83a('0xc8')];_0x59b428['order']=qs['sort'](_0xc8a910[_0xa83a('0x3e')][_0xa83a('0xcd')]);_0x59b428[_0xa83a('0xd0')]=qs[_0xa83a('0xce')](_[_0xa83a('0xcf')](_0xc8a910[_0xa83a('0x3e')],_0x3ddce0[_0xa83a('0xce')]));if(_0xc8a910[_0xa83a('0x3e')]['filter']){_0x59b428[_0xa83a('0xd0')]=_['merge'](_0x59b428['where'],{'$or':_[_0xa83a('0x2d')](_0x59b428['attributes'],function(_0x9f9dfa){var _0x8dadde={};_0x8dadde[_0x9f9dfa]={'$like':'%'+_0xc8a910[_0xa83a('0x3e')][_0xa83a('0x2b')]+'%'};return _0x8dadde;})});}_0x59b428=_[_0xa83a('0x53')]({},_0x59b428,_0xc8a910['options']);return _0x561606[_0xa83a('0xdf')](_0x59b428);}})[_0xa83a('0x1f')](function(_0x2d0818){if(_0x2d0818){_0x4e2619=_0x2d0818[_0xa83a('0x49')];if(!_0xc8a910[_0xa83a('0x3e')][_0xa83a('0xd1')](_0xa83a('0xd4'))){_0x59b428[_0xa83a('0x19')]=qs['limit'](_0xc8a910[_0xa83a('0x3e')]['limit']);_0x59b428[_0xa83a('0x17')]=qs[_0xa83a('0x17')](_0xc8a910[_0xa83a('0x3e')][_0xa83a('0x17')]);}return _0x561606[_0xa83a('0xdf')](_0x59b428);}})[_0xa83a('0x1f')](function(_0x16f493){if(_0x16f493){return _0x16f493?{'count':_0x4e2619,'rows':_0x16f493}:null;}})[_0xa83a('0x1f')](respondWithResult(_0x4d55d9,null))[_0xa83a('0x50')](handleError(_0x4d55d9,null));};exports[_0xa83a('0xe1')]=function(_0xbcf66d,_0x999227){var _0x49d4ac={};var _0x2f1a98={};var _0x4dad0a;var _0x11b2d1;return db[_0xa83a('0x35')][_0xa83a('0xbf')]({'where':{'id':_0xbcf66d['params']['id']}})['then'](handleEntityNotFound(_0x999227,null))[_0xa83a('0x1f')](function(_0x5a8c37){if(_0x5a8c37){_0x4dad0a=_0x5a8c37;_0x2f1a98['model']=_[_0xa83a('0xc9')](db[_0xa83a('0xe2')][_0xa83a('0x36')]);_0x2f1a98[_0xa83a('0x3e')]=_[_0xa83a('0xc9')](_0xbcf66d[_0xa83a('0x3e')]);_0x2f1a98['filters']=_[_0xa83a('0xd3')](_0x2f1a98[_0xa83a('0xc8')],_0x2f1a98[_0xa83a('0x3e')]);_0x49d4ac[_0xa83a('0x44')]=_[_0xa83a('0xd3')](_0x2f1a98['model'],qs[_0xa83a('0xcb')](_0xbcf66d[_0xa83a('0x3e')][_0xa83a('0xcb')]));_0x49d4ac[_0xa83a('0x44')]=_0x49d4ac['attributes'][_0xa83a('0x49')]?_0x49d4ac['attributes']:_0x2f1a98['model'];_0x49d4ac[_0xa83a('0xcc')]=qs['sort'](_0xbcf66d['query'][_0xa83a('0xcd')]);_0x49d4ac[_0xa83a('0xd0')]=qs[_0xa83a('0xce')](_['pick'](_0xbcf66d[_0xa83a('0x3e')],_0x2f1a98[_0xa83a('0xce')]));if(_0xbcf66d[_0xa83a('0x3e')][_0xa83a('0x2b')]){_0x49d4ac['where']=_[_0xa83a('0x53')](_0x49d4ac[_0xa83a('0xd0')],{'$or':_[_0xa83a('0x2d')](_0x49d4ac['attributes'],function(_0x1011c9){var _0x3405a0={};_0x3405a0[_0x1011c9]={'$like':'%'+_0xbcf66d[_0xa83a('0x3e')][_0xa83a('0x2b')]+'%'};return _0x3405a0;})});}_0x49d4ac=_['merge']({},_0x49d4ac,_0xbcf66d[_0xa83a('0x54')]);return _0x4dad0a[_0xa83a('0xe1')](_0x49d4ac);}})[_0xa83a('0x1f')](function(_0x4e1cc7){if(_0x4e1cc7){_0x11b2d1=_0x4e1cc7[_0xa83a('0x49')];if(!_0xbcf66d[_0xa83a('0x3e')][_0xa83a('0xd1')]('nolimit')){_0x49d4ac[_0xa83a('0x19')]=qs[_0xa83a('0x19')](_0xbcf66d[_0xa83a('0x3e')]['limit']);_0x49d4ac[_0xa83a('0x17')]=qs[_0xa83a('0x17')](_0xbcf66d[_0xa83a('0x3e')]['offset']);}return _0x4dad0a[_0xa83a('0xe1')](_0x49d4ac);}})[_0xa83a('0x1f')](function(_0x18a7ea){if(_0x18a7ea){return _0x18a7ea?{'count':_0x11b2d1,'rows':_0x18a7ea}:null;}})[_0xa83a('0x1f')](respondWithResult(_0x999227,null))[_0xa83a('0x50')](handleError(_0x999227,null));};exports[_0xa83a('0xe3')]=function(_0x45af47,_0x59c0bd){var _0x44c8e9={};var _0x3e4b1e={};var _0x22b245;var _0x45ffb2;return db[_0xa83a('0x35')][_0xa83a('0xbf')]({'where':{'id':_0x45af47[_0xa83a('0x52')]['id']}})['then'](handleEntityNotFound(_0x59c0bd,null))[_0xa83a('0x1f')](function(_0x120860){if(_0x120860){_0x22b245=_0x120860;_0x3e4b1e[_0xa83a('0xc8')]=_[_0xa83a('0xc9')](db[_0xa83a('0xe4')]['rawAttributes']);_0x3e4b1e[_0xa83a('0x3e')]=_[_0xa83a('0xc9')](_0x45af47[_0xa83a('0x3e')]);_0x3e4b1e[_0xa83a('0xce')]=_['intersection'](_0x3e4b1e['model'],_0x3e4b1e[_0xa83a('0x3e')]);_0x44c8e9['attributes']=_[_0xa83a('0xd3')](_0x3e4b1e[_0xa83a('0xc8')],qs[_0xa83a('0xcb')](_0x45af47[_0xa83a('0x3e')][_0xa83a('0xcb')]));_0x44c8e9['attributes']=_0x44c8e9[_0xa83a('0x44')]['length']?_0x44c8e9[_0xa83a('0x44')]:_0x3e4b1e[_0xa83a('0xc8')];_0x44c8e9[_0xa83a('0xcc')]=qs[_0xa83a('0xcd')](_0x45af47['query']['sort']);_0x44c8e9[_0xa83a('0xd0')]=qs[_0xa83a('0xce')](_[_0xa83a('0xcf')](_0x45af47['query'],_0x3e4b1e[_0xa83a('0xce')]));if(_0x45af47[_0xa83a('0x3e')][_0xa83a('0x2b')]){_0x44c8e9[_0xa83a('0xd0')]=_[_0xa83a('0x53')](_0x44c8e9['where'],{'$or':_[_0xa83a('0x2d')](_0x44c8e9[_0xa83a('0x44')],function(_0x482769){var _0x70bd40={};_0x70bd40[_0x482769]={'$like':'%'+_0x45af47[_0xa83a('0x3e')][_0xa83a('0x2b')]+'%'};return _0x70bd40;})});}_0x44c8e9=_['merge']({},_0x44c8e9,_0x45af47[_0xa83a('0x54')]);return _0x22b245['getWhatsappInteractions'](_0x44c8e9);}})[_0xa83a('0x1f')](function(_0x83da4b){if(_0x83da4b){_0x45ffb2=_0x83da4b['length'];if(!_0x45af47[_0xa83a('0x3e')][_0xa83a('0xd1')](_0xa83a('0xd4'))){_0x44c8e9['limit']=qs[_0xa83a('0x19')](_0x45af47['query']['limit']);_0x44c8e9['offset']=qs[_0xa83a('0x17')](_0x45af47['query']['offset']);}return _0x22b245[_0xa83a('0xe3')](_0x44c8e9);}})[_0xa83a('0x1f')](function(_0x1f1ce9){if(_0x1f1ce9){return _0x1f1ce9?{'count':_0x45ffb2,'rows':_0x1f1ce9}:null;}})[_0xa83a('0x1f')](respondWithResult(_0x59c0bd,null))[_0xa83a('0x50')](handleError(_0x59c0bd,null));};exports[_0xa83a('0xe5')]=function(_0x2fce90,_0x20a4e2,_0x1a6779){var _0x5198e0;var _0x41fea8;var _0x57fa9b;var _0x452f4e=!_[_0xa83a('0x62')](_0x2fce90[_0xa83a('0x52')]['id'])?_0x2fce90[_0xa83a('0x52')]['id']:!_['isNil'](_0x2fce90[_0xa83a('0x28')]['id'])?_0x2fce90[_0xa83a('0x28')]['id']:null;return db[_0xa83a('0x35')][_0xa83a('0x57')]({'where':{'id':_0x452f4e,'role':{'$or':[_0xa83a('0x26'),_0xa83a('0x28'),_0xa83a('0x21')]}},'attributes':['id',_0xa83a('0x34'),'phone',_0xa83a('0xe6'),_0xa83a('0x20'),_0xa83a('0x5c'),_0xa83a('0xe7')]})['then'](function(_0x6a04de){if(_0x6a04de){if(_0x6a04de['role']==='agent'){_0x5198e0=_0x6a04de;if(_0x2fce90[_0xa83a('0x56')][_0xa83a('0x91')]){_0x57fa9b=util[_0xa83a('0x9c')](_0xa83a('0xe8'),_0x5198e0[_0x2fce90[_0xa83a('0x56')][_0xa83a('0x91')]]);}else if(_0x2fce90[_0xa83a('0x56')][_0xa83a('0xe9')]){_0x57fa9b=util[_0xa83a('0x9c')](_0xa83a('0xea'),_0x2fce90[_0xa83a('0x56')][_0xa83a('0xe9')]);}else{_0x57fa9b=util[_0xa83a('0x9c')](_0xa83a('0xea'),_0x5198e0['name']);}socket['to'](util[_0xa83a('0x9c')](_0xa83a('0xeb'),_0x5198e0['name']))[_0xa83a('0x22')](_0xa83a('0xec'),{'user':{'id':_0x5198e0['id'],'name':_0x5198e0[_0xa83a('0x34')]},'ip':_0x2fce90['headers'][_0xa83a('0xed')]||_0x2fce90['connection'][_0xa83a('0xee')]||_0x2fce90[_0xa83a('0xef')]['remoteAddress']||_0x2fce90[_0xa83a('0xf0')][_0xa83a('0xef')][_0xa83a('0xee')]});return db[_0xa83a('0x9d')][_0xa83a('0x24')]({'where':{'membername':_0x5198e0['name']},'individualHooks':!![]});}}else{throw new db[(_0xa83a('0x83'))][(_0xa83a('0x84'))](_0xa83a('0xf1'));}})[_0xa83a('0x1f')](function(){if(_0x5198e0){return _0x5198e0['getVoiceQueues']({'raw':!![]});}})[_0xa83a('0x1f')](function(_0x527548){if(_0x5198e0){if(_0x527548){_0x41fea8=_0x527548;if(_0x41fea8[_0xa83a('0x49')]){var _0x668eac=_0x41fea8[_0xa83a('0x2d')](function(_0x44639b){var _0x2e3d5a={'membername':_0x5198e0[_0xa83a('0x34')],'UserId':_0x5198e0['id'],'queue_name':_0x44639b[_0xa83a('0x34')],'VoiceQueueId':_0x44639b['id'],'interface':_0x57fa9b,'paused':_0x5198e0[_0xa83a('0xe7')]||![],'penalty':_0x44639b['UserVoiceQueue.penalty']||0x0};return db[_0xa83a('0x9d')][_0xa83a('0x9e')](_0x2e3d5a);});return Promise[_0xa83a('0x4f')](_0x668eac);}}}})[_0xa83a('0x1f')](function(){if(_0x5198e0){return db[_0xa83a('0xf2')][_0xa83a('0x46')]({'where':{'membername':_0x5198e0[_0xa83a('0x34')],'exitAt':null}});}})[_0xa83a('0x1f')](function(_0x22c51e){if(_0x5198e0){var _0x160e38=[];_0x22c51e[_0xa83a('0xf3')](function(_0x57b1da){_0x160e38[_0xa83a('0x45')](_0x57b1da['update']({'exitAt':moment()['format'](_0xa83a('0xf4'))}));});return Promise[_0xa83a('0x4f')](_0x160e38);}})[_0xa83a('0x1f')](function(){if(_0x5198e0){var _0x22678a=[];var _0x452412=[];var _0x5cc581=utils[_0xa83a('0xf5')]();var _0x5ac481={'membername':_0x5198e0['name'],'interface':_0x57fa9b,'enterAt':moment()[_0xa83a('0x9c')]('YYYY-MM-DD\x20HH:mm:ss'),'role':_0x5198e0[_0xa83a('0x20')],'internal':_0x5198e0[_0xa83a('0x5c')]};_0x5cc581[_0xa83a('0xf3')](function(_0x30f336){_0x22678a[_0xa83a('0x45')](_['merge']({'channel':_0x30f336,'type':_0xa83a('0xf6'),'data1':_0x2fce90[_0xa83a('0x56')][_0xa83a('0xf7')],'data2':_0x57fa9b},_0x5ac481));if(_0x5198e0[_0xa83a('0xe7')]){_0x452412[_0xa83a('0x45')](_[_0xa83a('0x53')]({'channel':_0x30f336,'type':_0xa83a('0xf8'),'data1':_0xa83a('0xf9')},_0x5ac481));}});return db['MemberReport'][_0xa83a('0x7a')](_0x22678a[_0xa83a('0xbd')](_0x452412),{'individualHooks':!![]});}})[_0xa83a('0x1f')](function(){if(_0x5198e0){return _0x5198e0[_0xa83a('0x1e')]({'online':!![],'lastLoginAt':moment()[_0xa83a('0x9c')]('YYYY-MM-DD\x20HH:mm:ss'),'voicePause':_0x5198e0[_0xa83a('0xe7')]||![],'mailPause':_0x5198e0[_0xa83a('0xe7')]||![],'chatPause':_0x5198e0[_0xa83a('0xe7')]||![],'faxPause':_0x5198e0[_0xa83a('0xe7')]||![],'smsPause':_0x5198e0[_0xa83a('0xe7')]||![],'openchannelPause':_0x5198e0['loginInPause']||![],'whatsappPause':_0x5198e0[_0xa83a('0xe7')]||![],'pauseType':_0x5198e0['loginInPause']?_0xa83a('0xf9'):null,'interface':_0x57fa9b,'lastPauseAt':moment()[_0xa83a('0x9c')]('YYYY-MM-DD\x20HH:mm:ss')});}})[_0xa83a('0x1f')](function(_0x5b3830){if(_0x2fce90[_0xa83a('0xfa')]){return _0x1a6779();}else{return Promise[_0xa83a('0xfb')](_0x5b3830)[_0xa83a('0x1f')](respondWithResult(_0x20a4e2,null));}})[_0xa83a('0x50')](handleError(_0x20a4e2,null));};exports[_0xa83a('0xfc')]=function(_0x2185d3,_0x364af3){var _0x2c4cdb;return db[_0xa83a('0x35')][_0xa83a('0x57')]({'where':{'id':_0x2185d3[_0xa83a('0x52')]['id'],'role':'agent'},'attributes':['id',_0xa83a('0x34'),_0xa83a('0x20')]})[_0xa83a('0x1f')](handleEntityNotFound(_0x364af3,null))[_0xa83a('0x1f')](function(_0x50608d){if(_0x50608d){_0x2c4cdb=_0x50608d;return db[_0xa83a('0x9d')][_0xa83a('0x24')]({'where':{'membername':_0x2c4cdb[_0xa83a('0x34')]},'individualHooks':!![]});}})[_0xa83a('0x1f')](function(){return db[_0xa83a('0xf2')][_0xa83a('0x46')]({'where':{'membername':_0x2c4cdb[_0xa83a('0x34')],'exitAt':null}});})[_0xa83a('0x1f')](function(_0x43da06){var _0x3c63ec=[];_0x43da06['forEach'](function(_0x3d0530){_0x3c63ec[_0xa83a('0x45')](_0x3d0530[_0xa83a('0x1e')]({'exitAt':moment()[_0xa83a('0x9c')](_0xa83a('0xf4'))}));});return Promise['all'](_0x3c63ec);})[_0xa83a('0x1f')](function(){return _0x2c4cdb[_0xa83a('0x1e')]({'online':![],'voicePause':![],'mailPause':![],'chatPause':![],'faxPause':![],'smsPause':![],'openchannelPause':![],'whatsappPause':![],'interface':null});})['then'](respondWithResult(_0x364af3,null))[_0xa83a('0x50')](handleError(_0x364af3,null));};exports[_0xa83a('0xfd')]=function(_0x15f5fa,_0x21c3b2){var _0x5ce635;return db['UserVoiceQueueRt'][_0xa83a('0x1e')]({'paused':0x1},{'where':{'UserId':_0x15f5fa[_0xa83a('0x52')]['id']},'individualHooks':!![]})['then'](function(){return db[_0xa83a('0x35')][_0xa83a('0x57')]({'where':{'id':_0x15f5fa[_0xa83a('0x52')]['id'],'role':_0xa83a('0x21')},'attributes':['id',_0xa83a('0x34'),_0xa83a('0x20'),_0xa83a('0x5c'),_0xa83a('0x91'),'online']});})['then'](handleEntityNotFound(_0x21c3b2,null))['then'](function(_0x45ba3b){if(_0x45ba3b){_0x5ce635=_0x45ba3b;return db[_0xa83a('0xf2')][_0xa83a('0x46')]({'where':{'membername':_0x5ce635['name'],'type':'PAUSE','exitAt':null}});}})[_0xa83a('0x1f')](function(_0x1cf613){if(_0x1cf613['length']){var _0x2de7de=moment()[_0xa83a('0x9c')](_0xa83a('0xf4'));for(var _0x36a101=0x0,_0x1a0603=_0x1cf613[_0xa83a('0x49')];_0x36a101<_0x1a0603;_0x36a101++){_0x1cf613[_0x36a101]['updateAttributes']({'exitAt':_0x2de7de});}}})['then'](function(){var _0x2afcf0=[];var _0x50b0c4=utils[_0xa83a('0xf5')]();_0x50b0c4[_0xa83a('0xf3')](function(_0x5d9b48){_0x2afcf0[_0xa83a('0x45')]({'channel':_0x5d9b48,'membername':_0x5ce635[_0xa83a('0x34')],'interface':_[_0xa83a('0x62')](_0x5ce635[_0xa83a('0x91')])?util[_0xa83a('0x9c')](_0xa83a('0xea'),_0x5ce635[_0xa83a('0x34')]):_0x5ce635[_0xa83a('0x91')],'type':_0xa83a('0xf8'),'enterAt':moment()[_0xa83a('0x9c')]('YYYY-MM-DD\x20HH:mm:ss'),'data1':_0x15f5fa[_0xa83a('0x56')][_0xa83a('0x38')]||_0xa83a('0xfe'),'role':_0x5ce635[_0xa83a('0x20')],'internal':_0x5ce635[_0xa83a('0x5c')]});});return db[_0xa83a('0xf2')]['bulkCreate'](_0x2afcf0,{'individualHooks':!![]});})[_0xa83a('0x1f')](function(){return _0x5ce635['update']({'voicePause':!![],'mailPause':!![],'chatPause':!![],'faxPause':!![],'smsPause':!![],'whatsappPause':!![],'openchannelPause':!![],'pauseType':_0x15f5fa[_0xa83a('0x56')][_0xa83a('0x38')]||_0xa83a('0xfe'),'lastPauseAt':moment()[_0xa83a('0x9c')](_0xa83a('0xf4'))});})[_0xa83a('0x1f')](respondWithResult(_0x21c3b2,null))[_0xa83a('0x50')](handleError(_0x21c3b2,null));};exports[_0xa83a('0xff')]=function(_0x26c777,_0xc4eb4){if(_0x26c777[_0xa83a('0x56')]['channel']&&!utils[_0xa83a('0x92')](_0x26c777['body']['channel'])){throw new APIBadRequestError(util[_0xa83a('0x9c')](_0xa83a('0x100'),_0x26c777['body'][_0xa83a('0x8e')]));}return db[_0xa83a('0x35')][_0xa83a('0x57')]({'where':{'id':_0x26c777['params']['id']},'attributes':['id','name',_0xa83a('0x20'),'internal',_0xa83a('0x91'),_0xa83a('0x8f'),_0xa83a('0x90'),_0xa83a('0x101'),_0xa83a('0x102'),_0xa83a('0x103'),_0xa83a('0x104'),'smsPause','whatsappPause','pauseType',_0xa83a('0x105')]})['then'](function(_0x581487){if(!_0x581487){throw new APINotFoundError(util[_0xa83a('0x9c')](_0xa83a('0xc0'),_0x26c777[_0xa83a('0x52')]['id']));}return _0x581487[_0xa83a('0xff')](_0x26c777[_0xa83a('0x56')][_0xa83a('0x8e')]);})[_0xa83a('0x1f')](respondWithResult(_0xc4eb4,null))['catch'](APIHandleError(_0xc4eb4));};exports[_0xa83a('0x106')]=function(_0x11589b,_0x59f275){var _0x1b1e38={};var _0x30ed73={};var _0x5bc1d6;var _0x4244ec;return db[_0xa83a('0x35')][_0xa83a('0xbf')]({'where':{'id':_0x11589b['params']['id']}})[_0xa83a('0x1f')](handleEntityNotFound(_0x59f275,null))[_0xa83a('0x1f')](function(_0x10f8c5){if(_0x10f8c5){_0x5bc1d6=_0x10f8c5;_0x30ed73[_0xa83a('0xc8')]=_[_0xa83a('0xc9')](db[_0xa83a('0x107')]['rawAttributes']);_0x30ed73[_0xa83a('0x3e')]=_[_0xa83a('0xc9')](_0x11589b[_0xa83a('0x3e')]);_0x30ed73[_0xa83a('0xce')]=_[_0xa83a('0xd3')](_0x30ed73[_0xa83a('0xc8')],_0x30ed73['query']);_0x1b1e38['attributes']=_[_0xa83a('0xd3')](_0x30ed73[_0xa83a('0xc8')],qs[_0xa83a('0xcb')](_0x11589b[_0xa83a('0x3e')]['fields']));_0x1b1e38['attributes']=_0x1b1e38[_0xa83a('0x44')][_0xa83a('0x49')]?_0x1b1e38[_0xa83a('0x44')]:_0x30ed73[_0xa83a('0xc8')];_0x1b1e38[_0xa83a('0xcc')]=qs[_0xa83a('0xcd')](_0x11589b[_0xa83a('0x3e')][_0xa83a('0xcd')]);_0x1b1e38[_0xa83a('0xd0')]=qs[_0xa83a('0xce')](_[_0xa83a('0xcf')](_0x11589b['query'],_0x30ed73[_0xa83a('0xce')]));if(_0x11589b['query']['filter']){_0x1b1e38[_0xa83a('0xd0')]=_['merge'](_0x1b1e38[_0xa83a('0xd0')],{'$or':_[_0xa83a('0x2d')](_0x1b1e38[_0xa83a('0x44')],function(_0x4a8ee7){var _0x15eb20={};_0x15eb20[_0x4a8ee7]={'$like':'%'+_0x11589b['query'][_0xa83a('0x2b')]+'%'};return _0x15eb20;})});}_0x1b1e38=_['merge']({},_0x1b1e38,_0x11589b[_0xa83a('0x54')]);return _0x5bc1d6[_0xa83a('0x106')](_0x1b1e38);}})[_0xa83a('0x1f')](function(_0x441ffd){if(_0x441ffd){_0x4244ec=_0x441ffd['length'];if(!_0x11589b[_0xa83a('0x3e')][_0xa83a('0xd1')]('nolimit')){_0x1b1e38[_0xa83a('0x19')]=qs['limit'](_0x11589b[_0xa83a('0x3e')][_0xa83a('0x19')]);_0x1b1e38['offset']=qs[_0xa83a('0x17')](_0x11589b['query']['offset']);}return _0x5bc1d6['getTeams'](_0x1b1e38);}})['then'](function(_0x640a2c){if(_0x640a2c){return _0x640a2c?{'count':_0x4244ec,'rows':_0x640a2c}:null;}})[_0xa83a('0x1f')](respondWithResult(_0x59f275,null))[_0xa83a('0x50')](handleError(_0x59f275,null));};exports['addTeams']=function(_0x2d4603,_0x26b887){var _0xe79c4b=_0x2d4603[_0xa83a('0x52')]['id'];var _0x5b8afd=_0x2d4603['body']?_0x2d4603[_0xa83a('0x56')][_0xa83a('0x5a')]:null;var _0x1f945e=[];return Promise[_0xa83a('0xfb')]()[_0xa83a('0x1f')](function(){if(!_0x5b8afd)throw new APIBadRequestError(_0xa83a('0x108'));})[_0xa83a('0x1f')](function(){return db[_0xa83a('0x35')][_0xa83a('0xbf')]({'where':{'id':_0xe79c4b}});})[_0xa83a('0x1f')](function(_0x434c80){if(!_0x434c80)throw new APINotFoundError(util[_0xa83a('0x9c')](_0xa83a('0xc0'),_0x2d4603[_0xa83a('0x52')]['id']));return db['sequelize']['transaction'](function(_0x119ec2){return _0x434c80['addTeams'](_0x5b8afd,{'transaction':_0x119ec2})[_0xa83a('0x1f')](function(){return db[_0xa83a('0x107')][_0xa83a('0x46')]({'where':{'id':{'$in':_0x5b8afd}}});})['then'](function(_0x63213b){var _0x1f84f4=_['map'](_0x63213b,function(_0x26468d){return _0x26468d['getAssociatedQueues']();});return Promise[_0xa83a('0x4f')](_0x1f84f4);})[_0xa83a('0x1f')](function(_0x22a6b6){_0x1f945e=_['flattenDeep'](_0x22a6b6);var _0x1cccc2=_[_0xa83a('0x2d')](_0x1f945e,function(_0x35c493){return _0x35c493[_0xa83a('0x109')](_0x434c80['id'],{'transaction':_0x119ec2});});return Promise[_0xa83a('0x4f')](_0x1cccc2);})[_0xa83a('0x1f')](function(){if(!_0x434c80[_0xa83a('0x8f')])return;var _0x1cc7c5=_[_0xa83a('0x2b')](_0x1f945e,function(_0x354fae){return _0x354fae[_0xa83a('0x10a')](_0xa83a('0x8e'))===_0xa83a('0x10b');});var _0x29c1b2=_[_0xa83a('0x2d')](_0x1cc7c5,function(_0x562413){return db[_0xa83a('0x9d')][_0xa83a('0x9e')]({'membername':_0x434c80['name'],'UserId':_0x434c80['id'],'queue_name':_0x562413[_0xa83a('0x34')],'VoiceQueueId':_0x562413['id'],'interface':_[_0xa83a('0x62')](_0x434c80['interface'])?util[_0xa83a('0x9c')](_0xa83a('0xea'),_0x434c80[_0xa83a('0x34')]):_0x434c80[_0xa83a('0x91')],'paused':_0x434c80[_0xa83a('0x90')]||![],'penalty':_0x434c80[_0xa83a('0x95')]},{'transaction':_0x119ec2});});return Promise[_0xa83a('0x4f')](_0x29c1b2);})['then'](function(){return db[_0xa83a('0x10c')][_0xa83a('0x46')]({'where':{'teamId':{'$in':_0x5b8afd}}});})[_0xa83a('0x1f')](function(_0x20817d){var _0xecf50d=_['map'](_0x20817d,function(_0x170c75){return db[_0xa83a('0x10d')][_0xa83a('0x71')]({'UserId':_0x434c80['id'],'VoicePrefixId':_0x170c75[_0xa83a('0x10e')]},{'transaction':_0x119ec2});});return Promise[_0xa83a('0x4f')](_0xecf50d);});});})[_0xa83a('0x1f')](function(){for(var _0x2d2ecc=0x0;_0x2d2ecc<_0x1f945e[_0xa83a('0x49')];_0x2d2ecc++){var _0x59890e=_0x1f945e[_0x2d2ecc][_0xa83a('0x10a')](_0xa83a('0x8e'));var _0x4d4761=_0x59890e+_0xa83a('0x98');socket[_0xa83a('0x22')](_0xa83a('0x28')+_0x59890e+_0xa83a('0x99'),{'UserId':_0xe79c4b,['queueField']:_0x1f945e[_0x2d2ecc]['id']});}})['then'](respondWithStatusCode(_0x26b887,null))[_0xa83a('0x50')](APIHandleError(_0x26b887));};exports[_0xa83a('0x10f')]=function(_0x46053b,_0x35e3d6){var _0x4ab05e=_0x46053b[_0xa83a('0x52')]['id'];var _0x441a44=null;if(_0x46053b[_0xa83a('0x3e')][_0xa83a('0x5a')]){_0x441a44=_[_0xa83a('0xa3')](_0x46053b['query']['ids'])?_0x46053b[_0xa83a('0x3e')][_0xa83a('0x5a')]:[_0x46053b[_0xa83a('0x3e')][_0xa83a('0x5a')]];}var _0x286159=[];return Promise[_0xa83a('0xfb')]()[_0xa83a('0x1f')](function(){if(!_0x441a44)throw new APIBadRequestError(_0xa83a('0x110'));})['then'](function(){return db['User']['findOne']({'where':{'id':_0x4ab05e}});})[_0xa83a('0x1f')](function(_0x2064a1){if(!_0x2064a1)throw new APINotFoundError(util[_0xa83a('0x9c')](_0xa83a('0xc0'),_0x46053b[_0xa83a('0x52')]['id']));return db[_0xa83a('0x63')]['transaction'](function(_0x24de33){return _0x2064a1['removeTeams'](_0x441a44,{'transaction':_0x24de33})[_0xa83a('0x1f')](function(){return db[_0xa83a('0x107')][_0xa83a('0x46')]({'where':{'id':{'$in':_0x441a44}}});})[_0xa83a('0x1f')](function(_0x1c8823){var _0x1e456c=_['map'](_0x1c8823,function(_0x297678){return _0x297678[_0xa83a('0x111')]();});return Promise['all'](_0x1e456c);})[_0xa83a('0x1f')](function(_0x4bed64){_0x286159=_[_0xa83a('0x112')](_0x4bed64);var _0x2e26b2=_[_0xa83a('0x2d')](_0x286159,function(_0x1fe8fb){return _0x1fe8fb['removeAgent'](_0x2064a1['id'],{'transaction':_0x24de33});});return Promise['all'](_0x2e26b2);})[_0xa83a('0x1f')](function(){if(!_0x2064a1[_0xa83a('0x8f')])return;var _0x237167=_[_0xa83a('0x2b')](_0x286159,function(_0x1dead1){return _0x1dead1['getDataValue'](_0xa83a('0x8e'))===_0xa83a('0x10b');});var _0x4d9188=_[_0xa83a('0x2d')](_0x237167,function(_0x44b777){return db[_0xa83a('0x9d')][_0xa83a('0x24')]({'where':{'VoiceQueueId':_0x44b777['id'],'UserId':_0x2064a1['id']},'transaction':_0x24de33});});return Promise[_0xa83a('0x4f')](_0x4d9188);})[_0xa83a('0x1f')](function(){return db['TeamVoicePrefix'][_0xa83a('0x46')]({'where':{'teamId':{'$in':_0x441a44}}});})['then'](function(_0x4577a7){var _0x1fca8e=_[_0xa83a('0x2d')](_0x4577a7,function(_0x5d6b83){return db['UserVoicePrefix'][_0xa83a('0x24')]({'where':{'UserId':_0x2064a1['id'],'VoicePrefixId':_0x5d6b83[_0xa83a('0x10e')]}},{'transaction':_0x24de33});});return Promise[_0xa83a('0x4f')](_0x1fca8e);});});})[_0xa83a('0x1f')](function(){for(var _0x2a75d1=0x0;_0x2a75d1<_0x286159['length'];_0x2a75d1++){var _0x2b4fd6=_0x286159[_0x2a75d1]['getDataValue'](_0xa83a('0x8e'));var _0x161e06=_0x2b4fd6+'QueueId';socket[_0xa83a('0x22')](_0xa83a('0x28')+_0x2b4fd6+_0xa83a('0xa4'),{'UserId':_0x4ab05e,['queueField']:_0x286159[_0x2a75d1]['id']});}})['then'](respondWithStatusCode(_0x35e3d6,null))['catch'](APIHandleError(_0x35e3d6));};exports[_0xa83a('0x113')]=function(_0x5a52d6,_0x3a18d0){var _0x578d1a={};var _0x2acbff={};var _0x1a9adf;var _0x3dcc5e;return db[_0xa83a('0x35')][_0xa83a('0xbf')]({'where':{'id':_0x5a52d6[_0xa83a('0x52')]['id']}})['then'](handleEntityNotFound(_0x3a18d0,null))['then'](function(_0x33f2bd){if(_0x33f2bd){_0x1a9adf=_0x33f2bd;_0x2acbff[_0xa83a('0xc8')]=_[_0xa83a('0xc9')](db['CmList'][_0xa83a('0x36')]);_0x2acbff['query']=_[_0xa83a('0xc9')](_0x5a52d6[_0xa83a('0x3e')]);_0x2acbff['filters']=_[_0xa83a('0xd3')](_0x2acbff[_0xa83a('0xc8')],_0x2acbff[_0xa83a('0x3e')]);_0x578d1a['attributes']=_[_0xa83a('0xd3')](_0x2acbff[_0xa83a('0xc8')],qs['fields'](_0x5a52d6[_0xa83a('0x3e')]['fields']));_0x578d1a['attributes']=_0x578d1a[_0xa83a('0x44')][_0xa83a('0x49')]?_0x578d1a[_0xa83a('0x44')]:_0x2acbff[_0xa83a('0xc8')];_0x578d1a[_0xa83a('0xcc')]=qs[_0xa83a('0xcd')](_0x5a52d6[_0xa83a('0x3e')][_0xa83a('0xcd')]);_0x578d1a[_0xa83a('0xd0')]=qs[_0xa83a('0xce')](_[_0xa83a('0xcf')](_0x5a52d6['query'],_0x2acbff['filters']));if(_0x5a52d6[_0xa83a('0x3e')][_0xa83a('0x2b')]){_0x578d1a[_0xa83a('0xd0')]=_[_0xa83a('0x53')](_0x578d1a['where'],{'$or':_[_0xa83a('0x2d')](_0x578d1a[_0xa83a('0x44')],function(_0x1c5fea){var _0x3f1c88={};_0x3f1c88[_0x1c5fea]={'$like':'%'+_0x5a52d6['query'][_0xa83a('0x2b')]+'%'};return _0x3f1c88;})});}_0x578d1a=_[_0xa83a('0x53')]({},_0x578d1a,_0x5a52d6[_0xa83a('0x54')]);return _0x1a9adf[_0xa83a('0x113')](_0x578d1a);}})[_0xa83a('0x1f')](function(_0x3bb485){if(_0x3bb485){_0x3dcc5e=_0x3bb485[_0xa83a('0x49')];if(!_0x5a52d6['query'][_0xa83a('0xd1')](_0xa83a('0xd4'))){_0x578d1a[_0xa83a('0x19')]=qs['limit'](_0x5a52d6[_0xa83a('0x3e')][_0xa83a('0x19')]);_0x578d1a[_0xa83a('0x17')]=qs[_0xa83a('0x17')](_0x5a52d6[_0xa83a('0x3e')][_0xa83a('0x17')]);}return _0x1a9adf[_0xa83a('0x113')](_0x578d1a);}})[_0xa83a('0x1f')](function(_0x459c62){if(_0x459c62){return _0x459c62?{'count':_0x3dcc5e,'rows':_0x459c62}:null;}})[_0xa83a('0x1f')](respondWithResult(_0x3a18d0,null))[_0xa83a('0x50')](handleError(_0x3a18d0,null));};exports[_0xa83a('0x114')]=function(_0xf8d43e,_0x42c6c4){var _0x5f4d3d={};var _0x254ed8={};var _0x482955;return db[_0xa83a('0x35')]['findOne']({'where':{'id':_0xf8d43e[_0xa83a('0x52')]['id']}})[_0xa83a('0x1f')](handleEntityNotFound(_0x42c6c4,null))[_0xa83a('0x1f')](function(_0x107eb5){if(_0x107eb5){_0x482955=_0x107eb5;_0x254ed8[_0xa83a('0xc8')]=_[_0xa83a('0xc9')](db['User'][_0xa83a('0x36')]);_0x254ed8[_0xa83a('0x3e')]=_[_0xa83a('0xc9')](_0xf8d43e['query']);_0x254ed8['filters']=_[_0xa83a('0xd3')](_0x254ed8[_0xa83a('0xc8')],_0x254ed8[_0xa83a('0x3e')]);_0x5f4d3d['attributes']=_[_0xa83a('0xd3')](_0x254ed8[_0xa83a('0xc8')],qs['fields'](_0xf8d43e[_0xa83a('0x3e')][_0xa83a('0xcb')]));_0x5f4d3d[_0xa83a('0x44')]=_0x5f4d3d[_0xa83a('0x44')][_0xa83a('0x49')]?_0x5f4d3d['attributes']:_0x254ed8[_0xa83a('0xc8')];_0x5f4d3d['order']=qs[_0xa83a('0xcd')](_0xf8d43e['query'][_0xa83a('0xcd')]);_0x5f4d3d[_0xa83a('0xd0')]=qs[_0xa83a('0xce')](_[_0xa83a('0xcf')](_0xf8d43e[_0xa83a('0x3e')],_0x254ed8[_0xa83a('0xce')]));if(_0xf8d43e[_0xa83a('0x3e')]['filter']){_0x5f4d3d[_0xa83a('0xd0')]=_[_0xa83a('0x53')](_0x5f4d3d[_0xa83a('0xd0')],{'$or':_[_0xa83a('0x2d')](_0x5f4d3d[_0xa83a('0x44')],function(_0x487f99){var _0x17100d={};_0x17100d[_0x487f99]={'$like':'%'+_0xf8d43e[_0xa83a('0x3e')][_0xa83a('0x2b')]+'%'};return _0x17100d;})});}_0x5f4d3d[_0xa83a('0xc8')]=db[_0xa83a('0x35')];_0x5f4d3d['as']=_0xa83a('0x29');_0x5f4d3d=_[_0xa83a('0x53')]({},_0x5f4d3d,_0xf8d43e[_0xa83a('0x54')]);return _0x482955[_0xa83a('0x115')]({'include':[_0x5f4d3d]});}})[_0xa83a('0x1f')](function(_0x2865b1){if(_0x2865b1){var _0x7aa7c={},_0x4cc935=[];for(var _0xf0cf4a=0x0;_0xf0cf4a<_0x2865b1[_0xa83a('0x49')];_0xf0cf4a+=0x1){for(var _0x46ef16=0x0,_0x5f5986;_0x46ef16<_0x2865b1[_0xf0cf4a][_0xa83a('0x29')][_0xa83a('0x49')];_0x46ef16+=0x1){_0x5f5986=_0x2865b1[_0xf0cf4a][_0xa83a('0x29')][_0x46ef16][_0xa83a('0x25')]({'plain':!![]});_0x7aa7c[_0x5f5986['id']]=_0x5f5986;}}_0x7aa7c=_['values'](_0x7aa7c);for(var _0x452549=qs[_0xa83a('0x17')](_0xf8d43e[_0xa83a('0x3e')][_0xa83a('0x17')]);_0x452549<_0x7aa7c[_0xa83a('0x49')]&&_0x4cc935['length']=_0x470c58[_0xffce('0x4c')]){throw new Error(_0xffce('0x4d'));}})[_0xffce('0x16')](function(){if(_0x7f831b){return db[_0xffce('0x26')]['destroy']({'where':{'membername':_0x7f831b['name']},'individualHooks':!![]});}})[_0xffce('0x16')](function(){if(_0x7f831b){return _0x7f831b[_0xffce('0x4e')]({'raw':!![]});}})['then'](function(_0x2f83ca){if(_0x7f831b){if(_0x2f83ca){var _0xafb84=[];_0x28c09b=_0x2f83ca;if(_0x28c09b[_0xffce('0x28')]){for(var _0x5c3c0a=0x0;_0x5c3c0a<_0x28c09b[_0xffce('0x28')];_0x5c3c0a++){_0xafb84[_0xffce('0x2c')](db[_0xffce('0x26')][_0xffce('0x4f')]({'membername':_0x7f831b['name'],'UserId':_0x7f831b['id'],'queue_name':_0x28c09b[_0x5c3c0a][_0xffce('0x1f')],'VoiceQueueId':_0x28c09b[_0x5c3c0a]['id'],'interface':_0x1a4a50,'paused':_0x7f831b[_0xffce('0x47')]||![],'penalty':_0x28c09b[_0x5c3c0a][_0xffce('0x50')]||0x0}));}return BPromise['all'](_0xafb84);}}}})[_0xffce('0x16')](function(){if(_0x7f831b){return db[_0xffce('0x44')][_0xffce('0xd')]({'where':{'membername':_0x7f831b['name'],'exitAt':null}});}})[_0xffce('0x16')](function(_0xa64fde){if(_0x7f831b){if(_0xa64fde&&_0xa64fde[_0xffce('0x28')]){var _0x547672=[];_0xa64fde[_0xffce('0x2b')](function(_0x3e984e){_0x547672['push'](_0x3e984e[_0xffce('0x27')]({'exitAt':moment()[_0xffce('0x23')](_0xffce('0x29'))}));});return BPromise[_0xffce('0x45')](_0x547672);}}})[_0xffce('0x16')](function(){if(_0x7f831b){var _0x377dbb=[];var _0x549f78=[];var _0x1d8ed0=utils[_0xffce('0x2a')]();var _0x1cf3e4={'membername':_0x7f831b[_0xffce('0x1f')],'interface':_0x1a4a50,'enterAt':moment()[_0xffce('0x23')](_0xffce('0x29')),'role':_0x7f831b['role'],'internal':_0x7f831b[_0xffce('0x21')]};_0x1d8ed0[_0xffce('0x2b')](function(_0x44cd2e){_0x377dbb['push'](_[_0xffce('0x51')]({'channel':_0x44cd2e,'type':_0xffce('0x52'),'data1':_0xffce('0x53'),'data2':_0x1a4a50},_0x1cf3e4));if(_0x7f831b[_0xffce('0x47')]){_0x549f78[_0xffce('0x2c')](_['merge']({'channel':_0x44cd2e,'type':_0xffce('0x2f'),'data1':'LOGININPAUSE'},_0x1cf3e4));}});return db[_0xffce('0x44')][_0xffce('0x34')](_0x377dbb['concat'](_0x549f78),{'individualHooks':!![]});}})['then'](function(){if(_0x7f831b){return _0x7f831b[_0xffce('0x27')]({'online':!![],'lastLoginAt':moment()[_0xffce('0x23')](_0xffce('0x29')),'voicePause':_0x7f831b[_0xffce('0x47')]||![],'mailPause':_0x7f831b[_0xffce('0x47')]||![],'chatPause':_0x7f831b[_0xffce('0x47')]||![],'faxPause':_0x7f831b[_0xffce('0x47')]||![],'smsPause':_0x7f831b[_0xffce('0x47')]||![],'openchannelPause':_0x7f831b[_0xffce('0x47')]||![],'pauseType':_0x7f831b[_0xffce('0x47')]?_0xffce('0x54'):null,'lastPauseAt':moment()['format'](_0xffce('0x29')),'interface':_0x1a4a50});}})[_0xffce('0x16')](function(_0xf9637){_0x417db0(_0xf9637);})['catch'](function(_0x2e5240){_0x5bde51(_0xe89acc[_0xffce('0x19')](0x1f4,_0x2e5240[_0xffce('0x1a')]));});});}; \ No newline at end of file +var _0x95b5=['getLicense','agents','Maximum\x20login\x20has\x20been\x20reached','upsert','UserVoiceQueue.penalty','merge','callysquare','LOGININPAUSE','concat','lodash','util','moment','bluebird','ioredis','../../mysqldb','../../config/utils','rpc','../../config/environment','redis','defaults','localhost','./user.socket','register','GetUser','User','findAll','options','raw','where','attributes','limit','include','model','map','then','info','debug','stringify','catch','error','message','ShowUser','find','PauseUser','name','role','internal','format','params','UserVoiceQueueRt','update','MemberReport','PAUSE','YYYY-MM-DD\x20HH:mm:ss','length','updateAttributes','getChannels','isNil','interface','body','type','DEFAULT\x20PAUSE','resolve','isValidChannel','channel','Channel\x20parameter\x20%s\x20is\x20invalid','findOne','online','voicePause','mailPause','chatPause','faxPause','whatsappPause','pauseType','lastPauseAt','LogoutUser','destroy','forEach','push','all','loginInPause','count','../../config/license/util'];(function(_0x33b3fc,_0x2ea848){var _0x2cdce6=function(_0x2b764b){while(--_0x2b764b){_0x33b3fc['push'](_0x33b3fc['shift']());}};_0x2cdce6(++_0x2ea848);}(_0x95b5,0xaf));var _0x595b=function(_0x10fc4a,_0x58442d){_0x10fc4a=_0x10fc4a-0x0;var _0x45d274=_0x95b5[_0x10fc4a];return _0x45d274;};'use strict';var _=require(_0x595b('0x0'));var util=require(_0x595b('0x1'));var moment=require(_0x595b('0x2'));var BPromise=require(_0x595b('0x3'));var Redis=require(_0x595b('0x4'));var db=require(_0x595b('0x5'))['db'];var utils=require(_0x595b('0x6'));var logger=require('../../config/logger')(_0x595b('0x7'));var config=require(_0x595b('0x8'));config[_0x595b('0x9')]=_[_0x595b('0xa')](config[_0x595b('0x9')],{'host':_0x595b('0xb'),'port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config[_0x595b('0x9')]));require(_0x595b('0xc'))[_0x595b('0xd')](socket);exports[_0x595b('0xe')]=function(_0x2caa55){var _0x4383e2=this;return new Promise(function(_0xa1b517,_0x35990a){return db[_0x595b('0xf')][_0x595b('0x10')]({'raw':_0x2caa55[_0x595b('0x11')]?_0x2caa55['options'][_0x595b('0x12')]===undefined?!![]:![]:!![],'where':_0x2caa55[_0x595b('0x11')]?_0x2caa55[_0x595b('0x11')][_0x595b('0x13')]||null:null,'attributes':_0x2caa55[_0x595b('0x11')]?_0x2caa55[_0x595b('0x11')][_0x595b('0x14')]||null:null,'limit':_0x2caa55[_0x595b('0x11')]?_0x2caa55[_0x595b('0x11')][_0x595b('0x15')]||null:null,'include':_0x2caa55['options']?_0x2caa55[_0x595b('0x11')][_0x595b('0x16')]?_['map'](_0x2caa55['options']['include'],function(_0x2e78ba){return{'model':db[_0x2e78ba[_0x595b('0x17')]],'as':_0x2e78ba['as'],'attributes':_0x2e78ba[_0x595b('0x14')],'include':_0x2e78ba[_0x595b('0x16')]?_[_0x595b('0x18')](_0x2e78ba[_0x595b('0x16')],function(_0x4e0545){return{'model':db[_0x4e0545[_0x595b('0x17')]],'as':_0x4e0545['as'],'attributes':_0x4e0545[_0x595b('0x14')],'include':_0x4e0545[_0x595b('0x16')]?_[_0x595b('0x18')](_0x4e0545[_0x595b('0x16')],function(_0x2820fb){return{'model':db[_0x2820fb['model']],'as':_0x2820fb['as'],'attributes':_0x2820fb['attributes']};}):[]};}):[]};}):[]:[]})[_0x595b('0x19')](function(_0x438878){logger[_0x595b('0x1a')](_0x595b('0xe'),_0x2caa55);logger[_0x595b('0x1b')](_0x595b('0xe'),_0x2caa55,JSON[_0x595b('0x1c')](_0x438878));_0xa1b517(_0x438878);})[_0x595b('0x1d')](function(_0x1e09e2){logger[_0x595b('0x1e')]('GetUser',_0x1e09e2['message'],_0x2caa55);_0x35990a(_0x4383e2[_0x595b('0x1e')](0x1f4,_0x1e09e2[_0x595b('0x1f')]));});});};exports[_0x595b('0x20')]=function(_0x50f9cd){var _0x41f4ed=this;return new Promise(function(_0x3fd998,_0x2a16f4){return db['User'][_0x595b('0x21')]({'raw':_0x50f9cd[_0x595b('0x11')]?_0x50f9cd[_0x595b('0x11')]['raw']===undefined?!![]:![]:!![],'where':_0x50f9cd[_0x595b('0x11')]?_0x50f9cd[_0x595b('0x11')][_0x595b('0x13')]||null:null,'attributes':_0x50f9cd[_0x595b('0x11')]?_0x50f9cd[_0x595b('0x11')][_0x595b('0x14')]||null:null,'include':_0x50f9cd[_0x595b('0x11')]?_0x50f9cd[_0x595b('0x11')][_0x595b('0x16')]?_[_0x595b('0x18')](_0x50f9cd[_0x595b('0x11')][_0x595b('0x16')],function(_0x24f357){return{'model':db[_0x24f357[_0x595b('0x17')]],'as':_0x24f357['as'],'attributes':_0x24f357['attributes'],'include':_0x24f357['include']?_['map'](_0x24f357['include'],function(_0x1fedd9){return{'model':db[_0x1fedd9[_0x595b('0x17')]],'as':_0x1fedd9['as'],'attributes':_0x1fedd9[_0x595b('0x14')],'include':_0x1fedd9[_0x595b('0x16')]?_[_0x595b('0x18')](_0x1fedd9['include'],function(_0x359d66){return{'model':db[_0x359d66['model']],'as':_0x359d66['as'],'attributes':_0x359d66[_0x595b('0x14')]};}):[]};}):[]};}):[]:[]})[_0x595b('0x19')](function(_0x551cda){logger[_0x595b('0x1a')]('ShowUser',_0x50f9cd);logger['debug']('ShowUser',_0x50f9cd,JSON[_0x595b('0x1c')](_0x551cda));_0x3fd998(_0x551cda);})[_0x595b('0x1d')](function(_0x7796a5){logger['error'](_0x595b('0x20'),_0x7796a5[_0x595b('0x1f')],_0x50f9cd);_0x2a16f4(_0x41f4ed['error'](0x1f4,_0x7796a5[_0x595b('0x1f')]));});});};exports[_0x595b('0x22')]=function(_0x2c36b8){var _0x552af9;return db['User'][_0x595b('0x21')]({'where':_0x2c36b8[_0x595b('0x11')]['where']||{},'attributes':['id',_0x595b('0x23'),_0x595b('0x24'),_0x595b('0x25'),'interface']})[_0x595b('0x19')](function(_0x18ac72){if(!_0x18ac72){throw new Error(util[_0x595b('0x26')]('User\x20with\x20id\x20%s\x20not\x20found',_0x2c36b8[_0x595b('0x27')]['id']));}_0x552af9=_0x18ac72;return db[_0x595b('0x28')][_0x595b('0x29')]({'paused':0x1},{'where':{'UserId':_0x552af9['id']},'individualHooks':!![]});})[_0x595b('0x19')](function(){return db[_0x595b('0x2a')][_0x595b('0x10')]({'where':{'membername':_0x552af9[_0x595b('0x23')],'type':_0x595b('0x2b'),'exitAt':null}});})[_0x595b('0x19')](function(_0x28daba){if(_0x28daba&&_0x28daba['length']){var _0x44a12d=moment()['format'](_0x595b('0x2c'));for(var _0x220fc3=0x0,_0x3e6856=_0x28daba[_0x595b('0x2d')];_0x220fc3<_0x3e6856;_0x220fc3++){_0x28daba[_0x220fc3][_0x595b('0x2e')]({'exitAt':_0x44a12d});}}})['then'](function(){var _0x414e7a=[];var _0xc60204=utils[_0x595b('0x2f')]();_0xc60204['forEach'](function(_0x58c325){_0x414e7a['push']({'channel':_0x58c325,'membername':_0x552af9[_0x595b('0x23')],'interface':_[_0x595b('0x30')](_0x552af9[_0x595b('0x31')])?util['format']('SIP/%s',_0x552af9['name']):_0x552af9[_0x595b('0x31')],'type':_0x595b('0x2b'),'enterAt':moment()[_0x595b('0x26')](_0x595b('0x2c')),'data1':_0x2c36b8[_0x595b('0x32')][_0x595b('0x33')]||_0x595b('0x34'),'role':_0x552af9[_0x595b('0x24')],'internal':_0x552af9[_0x595b('0x25')],'uniqueid':_0x2c36b8[_0x595b('0x32')]['uniqueid']||null});});return db['MemberReport']['bulkCreate'](_0x414e7a,{'individualHooks':!![]});})['then'](function(){return _0x552af9[_0x595b('0x29')]({'voicePause':!![],'mailPause':!![],'chatPause':!![],'faxPause':!![],'smsPause':!![],'openchannelPause':!![],'whatsappPause':!![],'pauseType':_0x2c36b8[_0x595b('0x32')][_0x595b('0x33')]||_0x595b('0x34'),'lastPauseAt':moment()['format'](_0x595b('0x2c'))});})[_0x595b('0x1d')](function(_0x58d55f){throw _0x58d55f;});};exports['UnpauseUser']=function(_0x4fc676){return Promise[_0x595b('0x35')]()[_0x595b('0x19')](function(){if(_0x4fc676[_0x595b('0x32')]['channel']&&!utils[_0x595b('0x36')](_0x4fc676[_0x595b('0x32')][_0x595b('0x37')])){throw new Error(util[_0x595b('0x26')](_0x595b('0x38'),_0x4fc676[_0x595b('0x32')]['channel']));}return db[_0x595b('0xf')][_0x595b('0x39')]({'where':_0x4fc676[_0x595b('0x11')][_0x595b('0x13')]||{},'attributes':['id',_0x595b('0x23'),_0x595b('0x24'),'internal',_0x595b('0x31'),_0x595b('0x3a'),_0x595b('0x3b'),_0x595b('0x3c'),_0x595b('0x3d'),_0x595b('0x3e'),'openchannelPause','smsPause',_0x595b('0x3f'),_0x595b('0x40'),_0x595b('0x41')]});})['then'](function(_0x18d7cb){if(!_0x18d7cb){throw new Error(util['format']('User\x20with\x20id\x20%s\x20not\x20found',_0x4fc676[_0x595b('0x27')]['id']));}return _0x18d7cb['unpause'](_0x4fc676[_0x595b('0x32')][_0x595b('0x37')],'system');})['catch'](function(_0x47ad0d){throw _0x47ad0d;});};exports[_0x595b('0x42')]=function(_0xab5d76){var _0x2f3ccb=this;return new Promise(function(_0x444df5,_0x200e58){var _0xf5362c;return db[_0x595b('0xf')][_0x595b('0x39')]({'where':_0xab5d76['options'][_0x595b('0x13')]||{},'attributes':['id',_0x595b('0x23')]})[_0x595b('0x19')](function(_0x50f16c){if(_0x50f16c){_0xf5362c=_0x50f16c;return db[_0x595b('0x28')][_0x595b('0x43')]({'where':{'membername':_0xf5362c[_0x595b('0x23')]},'individualHooks':!![]});}})[_0x595b('0x19')](function(){if(_0xf5362c){return db[_0x595b('0x2a')][_0x595b('0x10')]({'where':{'membername':_0xf5362c[_0x595b('0x23')],'exitAt':null}});}})[_0x595b('0x19')](function(_0x32884a){if(_0xf5362c){if(_0x32884a&&_0x32884a[_0x595b('0x2d')]){var _0x4d2fb7=[];_0x32884a[_0x595b('0x44')](function(_0x374b61){_0x4d2fb7[_0x595b('0x45')](_0x374b61[_0x595b('0x29')]({'exitAt':moment()[_0x595b('0x26')]('YYYY-MM-DD\x20HH:mm:ss')}));});return BPromise[_0x595b('0x46')](_0x4d2fb7);}}})['then'](function(){if(_0xf5362c){return _0xf5362c[_0x595b('0x29')]({'online':![],'voicePause':![],'mailPause':![],'chatPause':![],'faxPause':![],'smsPause':![],'openchannelPause':![]});}})[_0x595b('0x19')](function(_0x37f731){_0x444df5(_0x37f731);})[_0x595b('0x1d')](function(_0x217b28){_0x200e58(_0x2f3ccb[_0x595b('0x1e')](0x1f4,_0x217b28[_0x595b('0x1f')]));});});};exports['LoginUser']=function(_0x26139e){var _0x38dfb7=this;return new Promise(function(_0x2a00c7,_0x907b0b){var _0x622f82;var _0x54301f;var _0x3fdb9d;var _0x26627e;return db[_0x595b('0xf')][_0x595b('0x39')]({'where':_0x26139e[_0x595b('0x11')][_0x595b('0x13')]||{},'attributes':['id',_0x595b('0x23'),'role','mobile','phone','internal',_0x595b('0x47'),'interface']})[_0x595b('0x19')](function(_0x5a9940){if(_0x5a9940){_0x622f82=_0x5a9940;_0x26627e=_0x26139e[_0x595b('0x32')][_0x595b('0x31')]?_0x26139e[_0x595b('0x32')]['interface']:util[_0x595b('0x26')]('SIP/%s',_0x622f82[_0x595b('0x23')]);return db[_0x595b('0xf')][_0x595b('0x48')]({'where':{'role':'agent','online':!![],'id':{'$ne':_0x622f82['id']}}});}})[_0x595b('0x19')](function(_0x2e650f){if(_0x2e650f){_0x3fdb9d=_0x2e650f;return require(_0x595b('0x49'))[_0x595b('0x4a')]();}})[_0x595b('0x19')](function(_0x363060){if(_0x363060&&_0x363060[_0x595b('0x4b')]&&_0x3fdb9d>=_0x363060[_0x595b('0x4b')]){throw new Error(_0x595b('0x4c'));}})[_0x595b('0x19')](function(){if(_0x622f82){return db['UserVoiceQueueRt']['destroy']({'where':{'membername':_0x622f82[_0x595b('0x23')]},'individualHooks':!![]});}})[_0x595b('0x19')](function(){if(_0x622f82){return _0x622f82['getVoiceQueues']({'raw':!![]});}})[_0x595b('0x19')](function(_0x2f184){if(_0x622f82){if(_0x2f184){var _0x287518=[];_0x54301f=_0x2f184;if(_0x54301f[_0x595b('0x2d')]){for(var _0x159efd=0x0;_0x159efd<_0x54301f[_0x595b('0x2d')];_0x159efd++){_0x287518['push'](db[_0x595b('0x28')][_0x595b('0x4d')]({'membername':_0x622f82[_0x595b('0x23')],'UserId':_0x622f82['id'],'queue_name':_0x54301f[_0x159efd][_0x595b('0x23')],'VoiceQueueId':_0x54301f[_0x159efd]['id'],'interface':_0x26627e,'paused':_0x622f82[_0x595b('0x47')]||![],'penalty':_0x54301f[_0x159efd][_0x595b('0x4e')]||0x0}));}return BPromise[_0x595b('0x46')](_0x287518);}}}})[_0x595b('0x19')](function(){if(_0x622f82){return db[_0x595b('0x2a')][_0x595b('0x10')]({'where':{'membername':_0x622f82[_0x595b('0x23')],'exitAt':null}});}})[_0x595b('0x19')](function(_0x1d4f04){if(_0x622f82){if(_0x1d4f04&&_0x1d4f04[_0x595b('0x2d')]){var _0x332855=[];_0x1d4f04['forEach'](function(_0x4fe7f0){_0x332855[_0x595b('0x45')](_0x4fe7f0[_0x595b('0x29')]({'exitAt':moment()[_0x595b('0x26')](_0x595b('0x2c'))}));});return BPromise[_0x595b('0x46')](_0x332855);}}})['then'](function(){if(_0x622f82){var _0x4239fe=[];var _0x3bc583=[];var _0x538bfe=utils[_0x595b('0x2f')]();var _0x9aacc={'membername':_0x622f82[_0x595b('0x23')],'interface':_0x26627e,'enterAt':moment()[_0x595b('0x26')]('YYYY-MM-DD\x20HH:mm:ss'),'role':_0x622f82[_0x595b('0x24')],'internal':_0x622f82[_0x595b('0x25')]};_0x538bfe[_0x595b('0x44')](function(_0x163cf3){_0x4239fe[_0x595b('0x45')](_[_0x595b('0x4f')]({'channel':_0x163cf3,'type':'LOGIN','data1':_0x595b('0x50'),'data2':_0x26627e},_0x9aacc));if(_0x622f82[_0x595b('0x47')]){_0x3bc583[_0x595b('0x45')](_[_0x595b('0x4f')]({'channel':_0x163cf3,'type':'PAUSE','data1':_0x595b('0x51')},_0x9aacc));}});return db['MemberReport']['bulkCreate'](_0x4239fe[_0x595b('0x52')](_0x3bc583),{'individualHooks':!![]});}})[_0x595b('0x19')](function(){if(_0x622f82){return _0x622f82[_0x595b('0x29')]({'online':!![],'lastLoginAt':moment()['format']('YYYY-MM-DD\x20HH:mm:ss'),'voicePause':_0x622f82[_0x595b('0x47')]||![],'mailPause':_0x622f82['loginInPause']||![],'chatPause':_0x622f82[_0x595b('0x47')]||![],'faxPause':_0x622f82[_0x595b('0x47')]||![],'smsPause':_0x622f82['loginInPause']||![],'openchannelPause':_0x622f82[_0x595b('0x47')]||![],'pauseType':_0x622f82[_0x595b('0x47')]?_0x595b('0x51'):null,'lastPauseAt':moment()[_0x595b('0x26')](_0x595b('0x2c')),'interface':_0x26627e});}})[_0x595b('0x19')](function(_0x23ad1d){_0x2a00c7(_0x23ad1d);})[_0x595b('0x1d')](function(_0x52a1b1){_0x907b0b(_0x38dfb7[_0x595b('0x1e')](0x1f4,_0x52a1b1[_0x595b('0x1f')]));});});}; \ No newline at end of file diff --git a/server/api/user/user.socket.js b/server/api/user/user.socket.js index 8947a57..f16d10a 100644 --- a/server/api/user/user.socket.js +++ b/server/api/user/user.socket.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xebc8=['./user.events','save','remove','update','emit','user:'];(function(_0x20e6a4,_0x3d799c){var _0x51813e=function(_0x1cb53f){while(--_0x1cb53f){_0x20e6a4['push'](_0x20e6a4['shift']());}};_0x51813e(++_0x3d799c);}(_0xebc8,0xc6));var _0x8ebc=function(_0x6131cd,_0x4c26a1){_0x6131cd=_0x6131cd-0x0;var _0x47e916=_0xebc8[_0x6131cd];return _0x47e916;};'use strict';var UserEvents=require(_0x8ebc('0x0'));var events=[_0x8ebc('0x1'),_0x8ebc('0x2'),_0x8ebc('0x3')];function createListener(_0xa28480,_0x3b0704){return function(_0x445d06){_0x3b0704[_0x8ebc('0x4')](_0xa28480,_0x445d06);};}function removeListener(_0x8b6e6d,_0x406ec5){return function(){UserEvents['removeListener'](_0x8b6e6d,_0x406ec5);};}exports['register']=function(_0x2eeaf7){for(var _0x5e59ed=0x0,_0x2a115b=events['length'];_0x5e59ed<_0x2a115b;_0x5e59ed++){var _0x499e83=events[_0x5e59ed];var _0x2893fa=createListener(_0x8ebc('0x5')+_0x499e83,_0x2eeaf7);UserEvents['on'](_0x499e83,_0x2893fa);}}; \ No newline at end of file +var _0xe1b4=['./user.events','remove','register','user:'];(function(_0x5cd613,_0x2c4a21){var _0x4699d1=function(_0x179a95){while(--_0x179a95){_0x5cd613['push'](_0x5cd613['shift']());}};_0x4699d1(++_0x2c4a21);}(_0xe1b4,0x18c));var _0x4e1b=function(_0x4d8f6f,_0x559720){_0x4d8f6f=_0x4d8f6f-0x0;var _0x441c71=_0xe1b4[_0x4d8f6f];return _0x441c71;};'use strict';var UserEvents=require(_0x4e1b('0x0'));var events=['save',_0x4e1b('0x1'),'update'];function createListener(_0x706d6,_0x55db03){return function(_0x5aa7f4){_0x55db03['emit'](_0x706d6,_0x5aa7f4);};}function removeListener(_0x1325fa,_0x55bb80){return function(){UserEvents['removeListener'](_0x1325fa,_0x55bb80);};}exports[_0x4e1b('0x2')]=function(_0x536076){for(var _0x1aa2a1=0x0,_0xbf0ce8=events['length'];_0x1aa2a1<_0xbf0ce8;_0x1aa2a1++){var _0x2af2be=events[_0x1aa2a1];var _0x2859ec=createListener(_0x4e1b('0x3')+_0x2af2be,_0x536076);UserEvents['on'](_0x2af2be,_0x2859ec);}}; \ No newline at end of file diff --git a/server/api/userChatQueue/index.js b/server/api/userChatQueue/index.js index 75f2e32..820a33a 100644 --- a/server/api/userChatQueue/index.js +++ b/server/api/userChatQueue/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xe706=['../../components/interaction/service','../../config/environment','exports','multer','util','path','express','Router','fs-extra','../../components/auth/service'];(function(_0x4e72a5,_0x23df84){var _0x574028=function(_0x246658){while(--_0x246658){_0x4e72a5['push'](_0x4e72a5['shift']());}};_0x574028(++_0x23df84);}(_0xe706,0xa3));var _0x6e70=function(_0x14b239,_0x3fda4e){_0x14b239=_0x14b239-0x0;var _0x3443eb=_0xe706[_0x14b239];return _0x3443eb;};'use strict';var multer=require(_0x6e70('0x0'));var util=require(_0x6e70('0x1'));var path=require(_0x6e70('0x2'));var timeout=require('connect-timeout');var express=require(_0x6e70('0x3'));var router=express[_0x6e70('0x4')]();var fs_extra=require(_0x6e70('0x5'));var auth=require(_0x6e70('0x6'));var interaction=require(_0x6e70('0x7'));var config=require(_0x6e70('0x8'));module[_0x6e70('0x9')]=router; \ No newline at end of file +var _0x70e0=['../../components/auth/service','../../components/interaction/service','exports','multer','util','path','Router','fs-extra'];(function(_0x2364b8,_0x1c3637){var _0x6b5fac=function(_0xc442fc){while(--_0xc442fc){_0x2364b8['push'](_0x2364b8['shift']());}};_0x6b5fac(++_0x1c3637);}(_0x70e0,0x17b));var _0x070e=function(_0x22b7fd,_0x4bd2ae){_0x22b7fd=_0x22b7fd-0x0;var _0x4e5d03=_0x70e0[_0x22b7fd];return _0x4e5d03;};'use strict';var multer=require(_0x070e('0x0'));var util=require(_0x070e('0x1'));var path=require(_0x070e('0x2'));var timeout=require('connect-timeout');var express=require('express');var router=express[_0x070e('0x3')]();var fs_extra=require(_0x070e('0x4'));var auth=require(_0x070e('0x5'));var interaction=require(_0x070e('0x6'));var config=require('../../config/environment');module[_0x070e('0x7')]=router; \ No newline at end of file diff --git a/server/api/userChatQueue/userChatQueue.attributes.js b/server/api/userChatQueue/userChatQueue.attributes.js index 7006ec8..04d45c5 100644 --- a/server/api/userChatQueue/userChatQueue.attributes.js +++ b/server/api/userChatQueue/userChatQueue.attributes.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xcbd1=['INTEGER','sequelize'];(function(_0x3c106e,_0x2f9ce0){var _0x362495=function(_0x5090e7){while(--_0x5090e7){_0x3c106e['push'](_0x3c106e['shift']());}};_0x362495(++_0x2f9ce0);}(_0xcbd1,0x89));var _0x1cbd=function(_0x3494b9,_0x5f1d67){_0x3494b9=_0x3494b9-0x0;var _0x51457f=_0xcbd1[_0x3494b9];return _0x51457f;};'use strict';var Sequelize=require(_0x1cbd('0x0'));module['exports']={'penalty':{'type':Sequelize[_0x1cbd('0x1')],'defaultValue':0x0}}; \ No newline at end of file +var _0x742e=['sequelize','exports'];(function(_0x89064d,_0x3b096a){var _0x318fc9=function(_0x4dfcd3){while(--_0x4dfcd3){_0x89064d['push'](_0x89064d['shift']());}};_0x318fc9(++_0x3b096a);}(_0x742e,0xa2));var _0xe742=function(_0x3af7c1,_0x4d9454){_0x3af7c1=_0x3af7c1-0x0;var _0x342af8=_0x742e[_0x3af7c1];return _0x342af8;};'use strict';var Sequelize=require(_0xe742('0x0'));module[_0xe742('0x1')]={'penalty':{'type':Sequelize['INTEGER'],'defaultValue':0x0}}; \ No newline at end of file diff --git a/server/api/userChatQueue/userChatQueue.model.js b/server/api/userChatQueue/userChatQueue.model.js index 07ff739..cdaca74 100644 --- a/server/api/userChatQueue/userChatQueue.model.js +++ b/server/api/userChatQueue/userChatQueue.model.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x281d=['../../config/logger','api','moment','bluebird','rimraf','../../config/environment','./userChatQueue.attributes','define','UserChatQueue','lodash','util'];(function(_0x5e3cf6,_0x3724b6){var _0x1e0b40=function(_0x3da802){while(--_0x3da802){_0x5e3cf6['push'](_0x5e3cf6['shift']());}};_0x1e0b40(++_0x3724b6);}(_0x281d,0x11c));var _0xd281=function(_0xebe8f7,_0x41056b){_0xebe8f7=_0xebe8f7-0x0;var _0x2dfc61=_0x281d[_0xebe8f7];return _0x2dfc61;};'use strict';var _=require(_0xd281('0x0'));var util=require(_0xd281('0x1'));var logger=require(_0xd281('0x2'))(_0xd281('0x3'));var moment=require(_0xd281('0x4'));var BPromise=require(_0xd281('0x5'));var rp=require('request-promise');var fs=require('fs');var path=require('path');var rimraf=require(_0xd281('0x6'));var config=require(_0xd281('0x7'));var attributes=require(_0xd281('0x8'));module['exports']=function(_0x37e1e5,_0x5de6d7){return _0x37e1e5[_0xd281('0x9')](_0xd281('0xa'),attributes,{'tableName':'user_has_chat_queues','paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file +var _0x0cd4=['path','../../config/environment','./userChatQueue.attributes','exports','define','UserChatQueue','user_has_chat_queues','util','../../config/logger','api','moment','bluebird'];(function(_0x2e5e73,_0x30d4d9){var _0x4cf641=function(_0x26b1b6){while(--_0x26b1b6){_0x2e5e73['push'](_0x2e5e73['shift']());}};_0x4cf641(++_0x30d4d9);}(_0x0cd4,0xa3));var _0x40cd=function(_0x5036ba,_0x4bdf4f){_0x5036ba=_0x5036ba-0x0;var _0x2d4dbf=_0x0cd4[_0x5036ba];return _0x2d4dbf;};'use strict';var _=require('lodash');var util=require(_0x40cd('0x0'));var logger=require(_0x40cd('0x1'))(_0x40cd('0x2'));var moment=require(_0x40cd('0x3'));var BPromise=require(_0x40cd('0x4'));var rp=require('request-promise');var fs=require('fs');var path=require(_0x40cd('0x5'));var rimraf=require('rimraf');var config=require(_0x40cd('0x6'));var attributes=require(_0x40cd('0x7'));module[_0x40cd('0x8')]=function(_0xcd068d,_0x2a0840){return _0xcd068d[_0x40cd('0x9')](_0x40cd('0xa'),attributes,{'tableName':_0x40cd('0xb'),'paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file diff --git a/server/api/userChatQueue/userChatQueue.rpc.js b/server/api/userChatQueue/userChatQueue.rpc.js index ce27b32..1de7f60 100644 --- a/server/api/userChatQueue/userChatQueue.rpc.js +++ b/server/api/userChatQueue/userChatQueue.rpc.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xf206=['UserChatQueue,\x20%s,\x20%s,\x20%s','stringify','error','code','message','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','client','http','request','then','info','UserChatQueue,\x20%s,\x20%s','request\x20sent'];(function(_0x515a1e,_0x156d10){var _0x29f82c=function(_0x4678f5){while(--_0x4678f5){_0x515a1e['push'](_0x515a1e['shift']());}};_0x29f82c(++_0x156d10);}(_0xf206,0x1d3));var _0x6f20=function(_0x147dae,_0x2a50a8){_0x147dae=_0x147dae-0x0;var _0xaa9e4c=_0xf206[_0x147dae];return _0xaa9e4c;};'use strict';var _=require('lodash');var util=require('util');var moment=require(_0x6f20('0x0'));var BPromise=require(_0x6f20('0x1'));var rs=require(_0x6f20('0x2'));var fs=require('fs');var Redis=require(_0x6f20('0x3'));var db=require(_0x6f20('0x4'))['db'];var utils=require(_0x6f20('0x5'));var logger=require(_0x6f20('0x6'))(_0x6f20('0x7'));var config=require(_0x6f20('0x8'));var jayson=require('jayson/promise');var client=jayson[_0x6f20('0x9')][_0x6f20('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x14be57,_0x282d08,_0x13053f){return new BPromise(function(_0x1681ea,_0x41ed02){return client[_0x6f20('0xb')](_0x14be57,_0x13053f)[_0x6f20('0xc')](function(_0x193546){logger[_0x6f20('0xd')](_0x6f20('0xe'),_0x282d08,_0x6f20('0xf'));logger['debug'](_0x6f20('0x10'),_0x282d08,_0x6f20('0xf'),JSON[_0x6f20('0x11')](_0x193546));if(_0x193546[_0x6f20('0x12')]){if(_0x193546[_0x6f20('0x12')][_0x6f20('0x13')]===0x1f4){logger[_0x6f20('0x12')](_0x6f20('0xe'),_0x282d08,_0x193546[_0x6f20('0x12')][_0x6f20('0x14')]);return _0x41ed02(_0x193546['error']['message']);}logger[_0x6f20('0x12')](_0x6f20('0xe'),_0x282d08,_0x193546['error'][_0x6f20('0x14')]);return _0x1681ea(_0x193546[_0x6f20('0x12')][_0x6f20('0x14')]);}else{logger[_0x6f20('0xd')]('UserChatQueue,\x20%s,\x20%s',_0x282d08,_0x6f20('0xf'));_0x1681ea(_0x193546['result']['message']);}})['catch'](function(_0x24699c){logger[_0x6f20('0x12')](_0x6f20('0xe'),_0x282d08,_0x24699c);_0x41ed02(_0x24699c);});});} \ No newline at end of file +var _0x39e3=['client','http','request','then','info','UserChatQueue,\x20%s,\x20%s','request\x20sent','debug','stringify','error','code','message','result','catch','lodash','util','randomstring','ioredis','../../config/utils','rpc','jayson/promise'];(function(_0x167cc1,_0x56ef5a){var _0x10bc4b=function(_0xd6a255){while(--_0xd6a255){_0x167cc1['push'](_0x167cc1['shift']());}};_0x10bc4b(++_0x56ef5a);}(_0x39e3,0x1b2));var _0x339e=function(_0x5cb071,_0x572a5d){_0x5cb071=_0x5cb071-0x0;var _0x30d388=_0x39e3[_0x5cb071];return _0x30d388;};'use strict';var _=require(_0x339e('0x0'));var util=require(_0x339e('0x1'));var moment=require('moment');var BPromise=require('bluebird');var rs=require(_0x339e('0x2'));var fs=require('fs');var Redis=require(_0x339e('0x3'));var db=require('../../mysqldb')['db'];var utils=require(_0x339e('0x4'));var logger=require('../../config/logger')(_0x339e('0x5'));var config=require('../../config/environment');var jayson=require(_0x339e('0x6'));var client=jayson[_0x339e('0x7')][_0x339e('0x8')]({'port':0x232a});function respondWithRpcPromise(_0x1b6262,_0x5a3f04,_0x492e92){return new BPromise(function(_0x3498e5,_0x3236fa){return client[_0x339e('0x9')](_0x1b6262,_0x492e92)[_0x339e('0xa')](function(_0x305c8e){logger[_0x339e('0xb')](_0x339e('0xc'),_0x5a3f04,_0x339e('0xd'));logger[_0x339e('0xe')]('UserChatQueue,\x20%s,\x20%s,\x20%s',_0x5a3f04,'request\x20sent',JSON[_0x339e('0xf')](_0x305c8e));if(_0x305c8e[_0x339e('0x10')]){if(_0x305c8e[_0x339e('0x10')][_0x339e('0x11')]===0x1f4){logger[_0x339e('0x10')](_0x339e('0xc'),_0x5a3f04,_0x305c8e[_0x339e('0x10')]['message']);return _0x3236fa(_0x305c8e['error'][_0x339e('0x12')]);}logger[_0x339e('0x10')]('UserChatQueue,\x20%s,\x20%s',_0x5a3f04,_0x305c8e[_0x339e('0x10')][_0x339e('0x12')]);return _0x3498e5(_0x305c8e[_0x339e('0x10')]['message']);}else{logger[_0x339e('0xb')](_0x339e('0xc'),_0x5a3f04,_0x339e('0xd'));_0x3498e5(_0x305c8e[_0x339e('0x13')][_0x339e('0x12')]);}})[_0x339e('0x14')](function(_0x576cb5){logger[_0x339e('0x10')](_0x339e('0xc'),_0x5a3f04,_0x576cb5);_0x3236fa(_0x576cb5);});});} \ No newline at end of file diff --git a/server/api/userFaxQueue/index.js b/server/api/userFaxQueue/index.js index f0ad241..0d92b1a 100644 --- a/server/api/userFaxQueue/index.js +++ b/server/api/userFaxQueue/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xd8b0=['Router','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','multer','util'];(function(_0x2f8619,_0x195689){var _0x13b303=function(_0x31c236){while(--_0x31c236){_0x2f8619['push'](_0x2f8619['shift']());}};_0x13b303(++_0x195689);}(_0xd8b0,0xad));var _0x0d8b=function(_0x20a584,_0xe384a5){_0x20a584=_0x20a584-0x0;var _0x4b41a8=_0xd8b0[_0x20a584];return _0x4b41a8;};'use strict';var multer=require(_0x0d8b('0x0'));var util=require(_0x0d8b('0x1'));var path=require('path');var timeout=require('connect-timeout');var express=require('express');var router=express[_0x0d8b('0x2')]();var fs_extra=require(_0x0d8b('0x3'));var auth=require(_0x0d8b('0x4'));var interaction=require(_0x0d8b('0x5'));var config=require(_0x0d8b('0x6'));module['exports']=router; \ No newline at end of file +var _0xd8b0=['Router','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','multer','util'];(function(_0xac1d19,_0x447fa8){var _0x1133e0=function(_0x44a661){while(--_0x44a661){_0xac1d19['push'](_0xac1d19['shift']());}};_0x1133e0(++_0x447fa8);}(_0xd8b0,0xad));var _0x0d8b=function(_0x20a584,_0xe384a5){_0x20a584=_0x20a584-0x0;var _0x4b41a8=_0xd8b0[_0x20a584];return _0x4b41a8;};'use strict';var multer=require(_0x0d8b('0x0'));var util=require(_0x0d8b('0x1'));var path=require('path');var timeout=require('connect-timeout');var express=require('express');var router=express[_0x0d8b('0x2')]();var fs_extra=require(_0x0d8b('0x3'));var auth=require(_0x0d8b('0x4'));var interaction=require(_0x0d8b('0x5'));var config=require(_0x0d8b('0x6'));module['exports']=router; \ No newline at end of file diff --git a/server/api/userFaxQueue/userFaxQueue.attributes.js b/server/api/userFaxQueue/userFaxQueue.attributes.js index 6b755be..c743a48 100644 --- a/server/api/userFaxQueue/userFaxQueue.attributes.js +++ b/server/api/userFaxQueue/userFaxQueue.attributes.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xffca=['sequelize','exports','STRING'];(function(_0x241424,_0x25eb5d){var _0x3da798=function(_0x415153){while(--_0x415153){_0x241424['push'](_0x241424['shift']());}};_0x3da798(++_0x25eb5d);}(_0xffca,0x66));var _0xaffc=function(_0x8c43de,_0x90ff31){_0x8c43de=_0x8c43de-0x0;var _0xa6591b=_0xffca[_0x8c43de];return _0xa6591b;};'use strict';var Sequelize=require(_0xaffc('0x0'));module[_0xaffc('0x1')]={'penalty':{'type':Sequelize['INTEGER'],'defaultValue':0x0},'assigned':{'type':Sequelize['INTEGER'],'defaultValue':0x0},'queue':{'type':Sequelize[_0xaffc('0x2')]}}; \ No newline at end of file +var _0x9b38=['STRING','sequelize','INTEGER'];(function(_0x465b6f,_0x252683){var _0x4b2193=function(_0x368e28){while(--_0x368e28){_0x465b6f['push'](_0x465b6f['shift']());}};_0x4b2193(++_0x252683);}(_0x9b38,0x11e));var _0x89b3=function(_0x354352,_0xb0dcc1){_0x354352=_0x354352-0x0;var _0xfbb346=_0x9b38[_0x354352];return _0xfbb346;};'use strict';var Sequelize=require(_0x89b3('0x0'));module['exports']={'penalty':{'type':Sequelize[_0x89b3('0x1')],'defaultValue':0x0},'assigned':{'type':Sequelize[_0x89b3('0x1')],'defaultValue':0x0},'queue':{'type':Sequelize[_0x89b3('0x2')]}}; \ No newline at end of file diff --git a/server/api/userFaxQueue/userFaxQueue.model.js b/server/api/userFaxQueue/userFaxQueue.model.js index 92c604e..91af095 100644 --- a/server/api/userFaxQueue/userFaxQueue.model.js +++ b/server/api/userFaxQueue/userFaxQueue.model.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xe264=['moment','bluebird','request-promise','path','rimraf','../../config/environment','./userFaxQueue.attributes','define','UserFaxQueue','user_has_fax_queues','lodash','util'];(function(_0xa687ad,_0x21a3ab){var _0x51357c=function(_0x3c2a07){while(--_0x3c2a07){_0xa687ad['push'](_0xa687ad['shift']());}};_0x51357c(++_0x21a3ab);}(_0xe264,0x166));var _0x4e26=function(_0x3e69ae,_0x366e8d){_0x3e69ae=_0x3e69ae-0x0;var _0x3d7f42=_0xe264[_0x3e69ae];return _0x3d7f42;};'use strict';var _=require(_0x4e26('0x0'));var util=require(_0x4e26('0x1'));var logger=require('../../config/logger')('api');var moment=require(_0x4e26('0x2'));var BPromise=require(_0x4e26('0x3'));var rp=require(_0x4e26('0x4'));var fs=require('fs');var path=require(_0x4e26('0x5'));var rimraf=require(_0x4e26('0x6'));var config=require(_0x4e26('0x7'));var attributes=require(_0x4e26('0x8'));module['exports']=function(_0x57ffe2,_0x51f2a9){return _0x57ffe2[_0x4e26('0x9')](_0x4e26('0xa'),attributes,{'tableName':_0x4e26('0xb'),'paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file +var _0xe1be=['util','../../config/logger','bluebird','request-promise','path','rimraf','../../config/environment','./userFaxQueue.attributes','exports','define','UserFaxQueue','user_has_fax_queues','lodash'];(function(_0x22cc16,_0x1f4fa2){var _0x399b70=function(_0x34d464){while(--_0x34d464){_0x22cc16['push'](_0x22cc16['shift']());}};_0x399b70(++_0x1f4fa2);}(_0xe1be,0x11d));var _0xee1b=function(_0x56578c,_0x17c0ef){_0x56578c=_0x56578c-0x0;var _0xff736d=_0xe1be[_0x56578c];return _0xff736d;};'use strict';var _=require(_0xee1b('0x0'));var util=require(_0xee1b('0x1'));var logger=require(_0xee1b('0x2'))('api');var moment=require('moment');var BPromise=require(_0xee1b('0x3'));var rp=require(_0xee1b('0x4'));var fs=require('fs');var path=require(_0xee1b('0x5'));var rimraf=require(_0xee1b('0x6'));var config=require(_0xee1b('0x7'));var attributes=require(_0xee1b('0x8'));module[_0xee1b('0x9')]=function(_0x28bb16,_0x1d1f8a){return _0x28bb16[_0xee1b('0xa')](_0xee1b('0xb'),attributes,{'tableName':_0xee1b('0xc'),'paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file diff --git a/server/api/userFaxQueue/userFaxQueue.rpc.js b/server/api/userFaxQueue/userFaxQueue.rpc.js index 915490e..c7b6f42 100644 --- a/server/api/userFaxQueue/userFaxQueue.rpc.js +++ b/server/api/userFaxQueue/userFaxQueue.rpc.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xd5d4=['../../config/logger','rpc','../../config/environment','jayson/promise','client','http','request','info','UserFaxQueue,\x20%s,\x20%s','request\x20sent','debug','UserFaxQueue,\x20%s,\x20%s,\x20%s','error','message','catch','lodash','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils'];(function(_0x447d1f,_0x2b3474){var _0x571211=function(_0x42fd85){while(--_0x42fd85){_0x447d1f['push'](_0x447d1f['shift']());}};_0x571211(++_0x2b3474);}(_0xd5d4,0x99));var _0x4d5d=function(_0x3e3819,_0x562054){_0x3e3819=_0x3e3819-0x0;var _0x148457=_0xd5d4[_0x3e3819];return _0x148457;};'use strict';var _=require(_0x4d5d('0x0'));var util=require(_0x4d5d('0x1'));var moment=require(_0x4d5d('0x2'));var BPromise=require(_0x4d5d('0x3'));var rs=require(_0x4d5d('0x4'));var fs=require('fs');var Redis=require(_0x4d5d('0x5'));var db=require(_0x4d5d('0x6'))['db'];var utils=require(_0x4d5d('0x7'));var logger=require(_0x4d5d('0x8'))(_0x4d5d('0x9'));var config=require(_0x4d5d('0xa'));var jayson=require(_0x4d5d('0xb'));var client=jayson[_0x4d5d('0xc')][_0x4d5d('0xd')]({'port':0x232a});function respondWithRpcPromise(_0x57c566,_0x518887,_0x1bb881){return new BPromise(function(_0x2ca13e,_0x3ebe69){return client[_0x4d5d('0xe')](_0x57c566,_0x1bb881)['then'](function(_0x5171ff){logger[_0x4d5d('0xf')](_0x4d5d('0x10'),_0x518887,_0x4d5d('0x11'));logger[_0x4d5d('0x12')](_0x4d5d('0x13'),_0x518887,_0x4d5d('0x11'),JSON['stringify'](_0x5171ff));if(_0x5171ff[_0x4d5d('0x14')]){if(_0x5171ff[_0x4d5d('0x14')]['code']===0x1f4){logger[_0x4d5d('0x14')](_0x4d5d('0x10'),_0x518887,_0x5171ff[_0x4d5d('0x14')]['message']);return _0x3ebe69(_0x5171ff[_0x4d5d('0x14')][_0x4d5d('0x15')]);}logger[_0x4d5d('0x14')](_0x4d5d('0x10'),_0x518887,_0x5171ff[_0x4d5d('0x14')][_0x4d5d('0x15')]);return _0x2ca13e(_0x5171ff[_0x4d5d('0x14')][_0x4d5d('0x15')]);}else{logger['info'](_0x4d5d('0x10'),_0x518887,_0x4d5d('0x11'));_0x2ca13e(_0x5171ff['result'][_0x4d5d('0x15')]);}})[_0x4d5d('0x16')](function(_0x4d8a74){logger[_0x4d5d('0x14')](_0x4d5d('0x10'),_0x518887,_0x4d8a74);_0x3ebe69(_0x4d8a74);});});} \ No newline at end of file +var _0xddd1=['message','result','catch','lodash','util','moment','bluebird','randomstring','ioredis','../../config/utils','rpc','../../config/environment','client','http','request','then','info','UserFaxQueue,\x20%s,\x20%s','request\x20sent','debug','UserFaxQueue,\x20%s,\x20%s,\x20%s','stringify','error'];(function(_0x2dafbe,_0x5d04de){var _0x58a45a=function(_0x50ac96){while(--_0x50ac96){_0x2dafbe['push'](_0x2dafbe['shift']());}};_0x58a45a(++_0x5d04de);}(_0xddd1,0xe9));var _0x1ddd=function(_0x3d5205,_0x51e463){_0x3d5205=_0x3d5205-0x0;var _0x5561fb=_0xddd1[_0x3d5205];return _0x5561fb;};'use strict';var _=require(_0x1ddd('0x0'));var util=require(_0x1ddd('0x1'));var moment=require(_0x1ddd('0x2'));var BPromise=require(_0x1ddd('0x3'));var rs=require(_0x1ddd('0x4'));var fs=require('fs');var Redis=require(_0x1ddd('0x5'));var db=require('../../mysqldb')['db'];var utils=require(_0x1ddd('0x6'));var logger=require('../../config/logger')(_0x1ddd('0x7'));var config=require(_0x1ddd('0x8'));var jayson=require('jayson/promise');var client=jayson[_0x1ddd('0x9')][_0x1ddd('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x3dea4e,_0x466f76,_0x59f850){return new BPromise(function(_0x58b6bf,_0xea3e7d){return client[_0x1ddd('0xb')](_0x3dea4e,_0x59f850)[_0x1ddd('0xc')](function(_0x30909f){logger[_0x1ddd('0xd')](_0x1ddd('0xe'),_0x466f76,_0x1ddd('0xf'));logger[_0x1ddd('0x10')](_0x1ddd('0x11'),_0x466f76,_0x1ddd('0xf'),JSON[_0x1ddd('0x12')](_0x30909f));if(_0x30909f[_0x1ddd('0x13')]){if(_0x30909f[_0x1ddd('0x13')]['code']===0x1f4){logger['error'](_0x1ddd('0xe'),_0x466f76,_0x30909f[_0x1ddd('0x13')][_0x1ddd('0x14')]);return _0xea3e7d(_0x30909f[_0x1ddd('0x13')][_0x1ddd('0x14')]);}logger['error'](_0x1ddd('0xe'),_0x466f76,_0x30909f[_0x1ddd('0x13')][_0x1ddd('0x14')]);return _0x58b6bf(_0x30909f[_0x1ddd('0x13')][_0x1ddd('0x14')]);}else{logger[_0x1ddd('0xd')](_0x1ddd('0xe'),_0x466f76,_0x1ddd('0xf'));_0x58b6bf(_0x30909f[_0x1ddd('0x15')][_0x1ddd('0x14')]);}})[_0x1ddd('0x16')](function(_0x4c61b6){logger[_0x1ddd('0x13')]('UserFaxQueue,\x20%s,\x20%s',_0x466f76,_0x4c61b6);_0xea3e7d(_0x4c61b6);});});} \ No newline at end of file diff --git a/server/api/userMailQueue/index.js b/server/api/userMailQueue/index.js index 8dcb182..f0f2d98 100644 --- a/server/api/userMailQueue/index.js +++ b/server/api/userMailQueue/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xd8b0=['Router','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','multer','util'];(function(_0x22d6f8,_0x4bbab4){var _0xdff824=function(_0x49850a){while(--_0x49850a){_0x22d6f8['push'](_0x22d6f8['shift']());}};_0xdff824(++_0x4bbab4);}(_0xd8b0,0xad));var _0x0d8b=function(_0x20a584,_0xe384a5){_0x20a584=_0x20a584-0x0;var _0x4b41a8=_0xd8b0[_0x20a584];return _0x4b41a8;};'use strict';var multer=require(_0x0d8b('0x0'));var util=require(_0x0d8b('0x1'));var path=require('path');var timeout=require('connect-timeout');var express=require('express');var router=express[_0x0d8b('0x2')]();var fs_extra=require(_0x0d8b('0x3'));var auth=require(_0x0d8b('0x4'));var interaction=require(_0x0d8b('0x5'));var config=require(_0x0d8b('0x6'));module['exports']=router; \ No newline at end of file +var _0xcb91=['express','Router','../../components/auth/service','../../components/interaction/service','exports','path','connect-timeout'];(function(_0x54a19b,_0x295df7){var _0x5de355=function(_0x132afc){while(--_0x132afc){_0x54a19b['push'](_0x54a19b['shift']());}};_0x5de355(++_0x295df7);}(_0xcb91,0x1a9));var _0x1cb9=function(_0x1b1a3b,_0x52a88a){_0x1b1a3b=_0x1b1a3b-0x0;var _0x385347=_0xcb91[_0x1b1a3b];return _0x385347;};'use strict';var multer=require('multer');var util=require('util');var path=require(_0x1cb9('0x0'));var timeout=require(_0x1cb9('0x1'));var express=require(_0x1cb9('0x2'));var router=express[_0x1cb9('0x3')]();var fs_extra=require('fs-extra');var auth=require(_0x1cb9('0x4'));var interaction=require(_0x1cb9('0x5'));var config=require('../../config/environment');module[_0x1cb9('0x6')]=router; \ No newline at end of file diff --git a/server/api/userMailQueue/userMailQueue.attributes.js b/server/api/userMailQueue/userMailQueue.attributes.js index d870d15..9b13cf1 100644 --- a/server/api/userMailQueue/userMailQueue.attributes.js +++ b/server/api/userMailQueue/userMailQueue.attributes.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x4bce=['exports','INTEGER','sequelize'];(function(_0x1fb10b,_0x940f93){var _0x10712e=function(_0x31bc4a){while(--_0x31bc4a){_0x1fb10b['push'](_0x1fb10b['shift']());}};_0x10712e(++_0x940f93);}(_0x4bce,0x1e5));var _0xe4bc=function(_0x296144,_0x26bbbf){_0x296144=_0x296144-0x0;var _0x5329b1=_0x4bce[_0x296144];return _0x5329b1;};'use strict';var Sequelize=require(_0xe4bc('0x0'));module[_0xe4bc('0x1')]={'penalty':{'type':Sequelize[_0xe4bc('0x2')],'defaultValue':0x0}}; \ No newline at end of file +var _0x37f5=['exports'];(function(_0x2c0c4a,_0x43c0cd){var _0x466fce=function(_0x236a8c){while(--_0x236a8c){_0x2c0c4a['push'](_0x2c0c4a['shift']());}};_0x466fce(++_0x43c0cd);}(_0x37f5,0x7b));var _0x537f=function(_0x536ff4,_0x5bc6cd){_0x536ff4=_0x536ff4-0x0;var _0x5d7557=_0x37f5[_0x536ff4];return _0x5d7557;};'use strict';var Sequelize=require('sequelize');module[_0x537f('0x0')]={'penalty':{'type':Sequelize['INTEGER'],'defaultValue':0x0}}; \ No newline at end of file diff --git a/server/api/userMailQueue/userMailQueue.model.js b/server/api/userMailQueue/userMailQueue.model.js index 866842a..af9ffb3 100644 --- a/server/api/userMailQueue/userMailQueue.model.js +++ b/server/api/userMailQueue/userMailQueue.model.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x7690=['bluebird','path','rimraf','UserMailQueue','user_has_mail_queues','lodash','util','../../config/logger','api','moment'];(function(_0x3cc9d9,_0x69ed38){var _0x1a425d=function(_0x44d109){while(--_0x44d109){_0x3cc9d9['push'](_0x3cc9d9['shift']());}};_0x1a425d(++_0x69ed38);}(_0x7690,0x1b3));var _0x0769=function(_0x1cb093,_0x63a105){_0x1cb093=_0x1cb093-0x0;var _0x323476=_0x7690[_0x1cb093];return _0x323476;};'use strict';var _=require(_0x0769('0x0'));var util=require(_0x0769('0x1'));var logger=require(_0x0769('0x2'))(_0x0769('0x3'));var moment=require(_0x0769('0x4'));var BPromise=require(_0x0769('0x5'));var rp=require('request-promise');var fs=require('fs');var path=require(_0x0769('0x6'));var rimraf=require(_0x0769('0x7'));var config=require('../../config/environment');var attributes=require('./userMailQueue.attributes');module['exports']=function(_0x59caf6,_0x1dd8d2){return _0x59caf6['define'](_0x0769('0x8'),attributes,{'tableName':_0x0769('0x9'),'paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file +var _0x0937=['bluebird','request-promise','path','rimraf','../../config/environment','./userMailQueue.attributes','exports','define','UserMailQueue','user_has_mail_queues','lodash','api'];(function(_0x573caa,_0x40a378){var _0x5450d5=function(_0x2a2ddf){while(--_0x2a2ddf){_0x573caa['push'](_0x573caa['shift']());}};_0x5450d5(++_0x40a378);}(_0x0937,0xa6));var _0x7093=function(_0x2f98ec,_0x25a6a5){_0x2f98ec=_0x2f98ec-0x0;var _0x57ec11=_0x0937[_0x2f98ec];return _0x57ec11;};'use strict';var _=require(_0x7093('0x0'));var util=require('util');var logger=require('../../config/logger')(_0x7093('0x1'));var moment=require('moment');var BPromise=require(_0x7093('0x2'));var rp=require(_0x7093('0x3'));var fs=require('fs');var path=require(_0x7093('0x4'));var rimraf=require(_0x7093('0x5'));var config=require(_0x7093('0x6'));var attributes=require(_0x7093('0x7'));module[_0x7093('0x8')]=function(_0x444fea,_0xc40e61){return _0x444fea[_0x7093('0x9')](_0x7093('0xa'),attributes,{'tableName':_0x7093('0xb'),'paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file diff --git a/server/api/userMailQueue/userMailQueue.rpc.js b/server/api/userMailQueue/userMailQueue.rpc.js index d508ab2..10f4290 100644 --- a/server/api/userMailQueue/userMailQueue.rpc.js +++ b/server/api/userMailQueue/userMailQueue.rpc.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x4b84=['../../config/logger','rpc','http','then','info','request\x20sent','debug','UserMailQueue,\x20%s,\x20%s,\x20%s','stringify','error','UserMailQueue,\x20%s,\x20%s','message','lodash','util','randomstring','../../config/utils'];(function(_0x29891b,_0x471829){var _0x5dbd25=function(_0x82f3a7){while(--_0x82f3a7){_0x29891b['push'](_0x29891b['shift']());}};_0x5dbd25(++_0x471829);}(_0x4b84,0x1cc));var _0x44b8=function(_0x4de586,_0x183427){_0x4de586=_0x4de586-0x0;var _0x46baf5=_0x4b84[_0x4de586];return _0x46baf5;};'use strict';var _=require(_0x44b8('0x0'));var util=require(_0x44b8('0x1'));var moment=require('moment');var BPromise=require('bluebird');var rs=require(_0x44b8('0x2'));var fs=require('fs');var Redis=require('ioredis');var db=require('../../mysqldb')['db'];var utils=require(_0x44b8('0x3'));var logger=require(_0x44b8('0x4'))(_0x44b8('0x5'));var config=require('../../config/environment');var jayson=require('jayson/promise');var client=jayson['client'][_0x44b8('0x6')]({'port':0x232a});function respondWithRpcPromise(_0x54274b,_0x327f59,_0x5947f7){return new BPromise(function(_0x3e87c5,_0x5a2353){return client['request'](_0x54274b,_0x5947f7)[_0x44b8('0x7')](function(_0x42319d){logger[_0x44b8('0x8')]('UserMailQueue,\x20%s,\x20%s',_0x327f59,_0x44b8('0x9'));logger[_0x44b8('0xa')](_0x44b8('0xb'),_0x327f59,_0x44b8('0x9'),JSON[_0x44b8('0xc')](_0x42319d));if(_0x42319d[_0x44b8('0xd')]){if(_0x42319d[_0x44b8('0xd')]['code']===0x1f4){logger[_0x44b8('0xd')](_0x44b8('0xe'),_0x327f59,_0x42319d['error'][_0x44b8('0xf')]);return _0x5a2353(_0x42319d['error'][_0x44b8('0xf')]);}logger[_0x44b8('0xd')]('UserMailQueue,\x20%s,\x20%s',_0x327f59,_0x42319d[_0x44b8('0xd')]['message']);return _0x3e87c5(_0x42319d['error'][_0x44b8('0xf')]);}else{logger[_0x44b8('0x8')](_0x44b8('0xe'),_0x327f59,_0x44b8('0x9'));_0x3e87c5(_0x42319d['result']['message']);}})['catch'](function(_0x3fe9fb){logger['error'](_0x44b8('0xe'),_0x327f59,_0x3fe9fb);_0x5a2353(_0x3fe9fb);});});} \ No newline at end of file +var _0x1cb9=['error','message','result','catch','lodash','moment','bluebird','randomstring','ioredis','../../config/utils','../../config/logger','../../config/environment','jayson/promise','client','http','request','info','UserMailQueue,\x20%s,\x20%s','request\x20sent','debug','UserMailQueue,\x20%s,\x20%s,\x20%s','stringify'];(function(_0xf50820,_0x56f041){var _0x2a9b10=function(_0x33f0f4){while(--_0x33f0f4){_0xf50820['push'](_0xf50820['shift']());}};_0x2a9b10(++_0x56f041);}(_0x1cb9,0x14e));var _0x91cb=function(_0x1a9209,_0x3a6b29){_0x1a9209=_0x1a9209-0x0;var _0x4a04cc=_0x1cb9[_0x1a9209];return _0x4a04cc;};'use strict';var _=require(_0x91cb('0x0'));var util=require('util');var moment=require(_0x91cb('0x1'));var BPromise=require(_0x91cb('0x2'));var rs=require(_0x91cb('0x3'));var fs=require('fs');var Redis=require(_0x91cb('0x4'));var db=require('../../mysqldb')['db'];var utils=require(_0x91cb('0x5'));var logger=require(_0x91cb('0x6'))('rpc');var config=require(_0x91cb('0x7'));var jayson=require(_0x91cb('0x8'));var client=jayson[_0x91cb('0x9')][_0x91cb('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x3b9d98,_0x8f8a3b,_0x4c1f56){return new BPromise(function(_0x15c517,_0x5bda2f){return client[_0x91cb('0xb')](_0x3b9d98,_0x4c1f56)['then'](function(_0xa43e7a){logger[_0x91cb('0xc')](_0x91cb('0xd'),_0x8f8a3b,_0x91cb('0xe'));logger[_0x91cb('0xf')](_0x91cb('0x10'),_0x8f8a3b,_0x91cb('0xe'),JSON[_0x91cb('0x11')](_0xa43e7a));if(_0xa43e7a[_0x91cb('0x12')]){if(_0xa43e7a[_0x91cb('0x12')]['code']===0x1f4){logger[_0x91cb('0x12')](_0x91cb('0xd'),_0x8f8a3b,_0xa43e7a['error'][_0x91cb('0x13')]);return _0x5bda2f(_0xa43e7a[_0x91cb('0x12')][_0x91cb('0x13')]);}logger[_0x91cb('0x12')]('UserMailQueue,\x20%s,\x20%s',_0x8f8a3b,_0xa43e7a['error'][_0x91cb('0x13')]);return _0x15c517(_0xa43e7a[_0x91cb('0x12')]['message']);}else{logger['info'](_0x91cb('0xd'),_0x8f8a3b,_0x91cb('0xe'));_0x15c517(_0xa43e7a[_0x91cb('0x14')]['message']);}})[_0x91cb('0x15')](function(_0x135890){logger['error'](_0x91cb('0xd'),_0x8f8a3b,_0x135890);_0x5bda2f(_0x135890);});});} \ No newline at end of file diff --git a/server/api/userNotification/index.js b/server/api/userNotification/index.js index d448a90..25aaa58 100644 --- a/server/api/userNotification/index.js +++ b/server/api/userNotification/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x63c0=['connect-timeout','Router','fs-extra','../../components/auth/service','../../config/environment','post','isAuthenticated','sendUserNotification','exports','multer','util','path'];(function(_0x3a5a6d,_0x276055){var _0x230723=function(_0x5b2dcd){while(--_0x5b2dcd){_0x3a5a6d['push'](_0x3a5a6d['shift']());}};_0x230723(++_0x276055);}(_0x63c0,0x8d));var _0x063c=function(_0x3cb656,_0xaa47b4){_0x3cb656=_0x3cb656-0x0;var _0x290763=_0x63c0[_0x3cb656];return _0x290763;};'use strict';var multer=require(_0x063c('0x0'));var util=require(_0x063c('0x1'));var path=require(_0x063c('0x2'));var timeout=require(_0x063c('0x3'));var express=require('express');var router=express[_0x063c('0x4')]();var fs_extra=require(_0x063c('0x5'));var auth=require(_0x063c('0x6'));var interaction=require('../../components/interaction/service');var config=require(_0x063c('0x7'));var controller=require('./userNotification.controller');router[_0x063c('0x8')]('/',auth[_0x063c('0x9')](),controller[_0x063c('0xa')]);module[_0x063c('0xb')]=router; \ No newline at end of file +var _0xedf2=['sendUserNotification','util','connect-timeout','express','Router','fs-extra','../../components/interaction/service','../../config/environment','./userNotification.controller'];(function(_0x399849,_0x3b630d){var _0xfbb04=function(_0x4fea04){while(--_0x4fea04){_0x399849['push'](_0x399849['shift']());}};_0xfbb04(++_0x3b630d);}(_0xedf2,0x1ba));var _0x2edf=function(_0x503768,_0x79abd4){_0x503768=_0x503768-0x0;var _0x172d44=_0xedf2[_0x503768];return _0x172d44;};'use strict';var multer=require('multer');var util=require(_0x2edf('0x0'));var path=require('path');var timeout=require(_0x2edf('0x1'));var express=require(_0x2edf('0x2'));var router=express[_0x2edf('0x3')]();var fs_extra=require(_0x2edf('0x4'));var auth=require('../../components/auth/service');var interaction=require(_0x2edf('0x5'));var config=require(_0x2edf('0x6'));var controller=require(_0x2edf('0x7'));router['post']('/',auth['isAuthenticated'](),controller[_0x2edf('0x8')]);module['exports']=router; \ No newline at end of file diff --git a/server/api/userNotification/userNotification.attributes.js b/server/api/userNotification/userNotification.attributes.js index b12d411..8a129fd 100644 --- a/server/api/userNotification/userNotification.attributes.js +++ b/server/api/userNotification/userNotification.attributes.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x5048=['TEXT','STRING'];(function(_0x1269ab,_0x439617){var _0x3137cd=function(_0xbee801){while(--_0xbee801){_0x1269ab['push'](_0x1269ab['shift']());}};_0x3137cd(++_0x439617);}(_0x5048,0xd2));var _0x8504=function(_0x751f5e,_0x2d6ea5){_0x751f5e=_0x751f5e-0x0;var _0x4ee682=_0x5048[_0x751f5e];return _0x4ee682;};'use strict';var Sequelize=require('sequelize');module['exports']={'body':{'type':Sequelize[_0x8504('0x0')]},'senderName':{'type':Sequelize[_0x8504('0x1')]},'recipientsId':{'type':Sequelize[_0x8504('0x0')]},'recipientsDescription':{'type':Sequelize[_0x8504('0x1')]},'beep':{'type':Sequelize['BOOLEAN']}}; \ No newline at end of file +var _0xde32=['exports','TEXT','STRING','BOOLEAN','sequelize'];(function(_0x47d172,_0x24d685){var _0x3126f0=function(_0x5c2968){while(--_0x5c2968){_0x47d172['push'](_0x47d172['shift']());}};_0x3126f0(++_0x24d685);}(_0xde32,0xd6));var _0x2de3=function(_0x8563a0,_0x9d2a3f){_0x8563a0=_0x8563a0-0x0;var _0x5d5f9d=_0xde32[_0x8563a0];return _0x5d5f9d;};'use strict';var Sequelize=require(_0x2de3('0x0'));module[_0x2de3('0x1')]={'body':{'type':Sequelize[_0x2de3('0x2')]},'senderName':{'type':Sequelize[_0x2de3('0x3')]},'recipientsId':{'type':Sequelize['TEXT']},'recipientsDescription':{'type':Sequelize[_0x2de3('0x3')]},'beep':{'type':Sequelize[_0x2de3('0x4')]}}; \ No newline at end of file diff --git a/server/api/userNotification/userNotification.controller.js b/server/api/userNotification/userNotification.controller.js index 35f2cd6..2189508 100644 --- a/server/api/userNotification/userNotification.controller.js +++ b/server/api/userNotification/userNotification.controller.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xd051=['ids','all','flatten','getAgents','map','eml-format','rimraf','fast-json-patch','request-promise','bluebird','mustache','util','path','to-csv','ejs','fs-extra','squel','crypto','jsforce','desk.js','papaparse','../../components/auth/service','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../config/license/util','redis','localhost','socket.io-emitter','sendStatus','status','json','offset','undefined','limit','count','set','Content-Range','reject','save','destroy','error','name','send','sendUserNotification','hasOwnProperty','text','body','Sequelize','ValidationError','Must\x20specify\x20at\x20least\x20one\x20argument\x20for\x20\x27text\x27\x20or\x20\x27TemplateId\x27','TemplateId','recipients','Missing\x20\x27recipients\x27\x20parameter','parse','Invalid\x20\x27recipients\x27\x20object','chatqueue','faxqueue','openchannelqueue','voicequeue','whatsappqueue','includes','toLowerCase','Invalid\x20model\x20in\x20\x27recipients\x27\x20object','senderName','user','recipientsDescription','isEmpty','beep','SenderId','then','recipientsId','sortBy','join','sequelize','transaction','UserNotification','create','forEach','recipient','userNotification:send','findOne','html','Invalid\x20\x27TemplateId\x27\x20parameter','render','view','catch','model','User','union','queue','replace'];(function(_0x30a6b8,_0x51fdf9){var _0x4b1d61=function(_0x2c992b){while(--_0x2c992b){_0x30a6b8['push'](_0x30a6b8['shift']());}};_0x4b1d61(++_0x51fdf9);}(_0xd051,0x64));var _0x1d05=function(_0x589eb7,_0x37eb7a){_0x589eb7=_0x589eb7-0x0;var _0x2382db=_0xd051[_0x589eb7];return _0x2382db;};'use strict';var emlformat=require(_0x1d05('0x0'));var rimraf=require(_0x1d05('0x1'));var zipdir=require('zip-dir');var jsonpatch=require(_0x1d05('0x2'));var rp=require(_0x1d05('0x3'));var moment=require('moment');var BPromise=require(_0x1d05('0x4'));var Mustache=require(_0x1d05('0x5'));var util=require(_0x1d05('0x6'));var path=require(_0x1d05('0x7'));var sox=require('sox');var csv=require(_0x1d05('0x8'));var ejs=require(_0x1d05('0x9'));var fs=require('fs');var fs_extra=require(_0x1d05('0xa'));var _=require('lodash');var squel=require(_0x1d05('0xb'));var crypto=require(_0x1d05('0xc'));var jsforce=require(_0x1d05('0xd'));var deskjs=require(_0x1d05('0xe'));var toCsv=require(_0x1d05('0x8'));var querystring=require('querystring');var Papa=require(_0x1d05('0xf'));var Redis=require('ioredis');var authService=require(_0x1d05('0x10'));var qs=require('../../components/parsers/qs');var as=require(_0x1d05('0x11'));var hardwareService=require(_0x1d05('0x12'));var logger=require(_0x1d05('0x13'))(_0x1d05('0x14'));var utils=require(_0x1d05('0x15'));var config=require(_0x1d05('0x16'));var licenseUtil=require(_0x1d05('0x17'));var db=require('../../mysqldb')['db'];config[_0x1d05('0x18')]=_['defaults'](config[_0x1d05('0x18')],{'host':_0x1d05('0x19'),'port':0x18eb});var socket=require(_0x1d05('0x1a'))(new Redis(config['redis']));require('./userNotification.socket')['register'](socket);function respondWithStatusCode(_0x35dada,_0x5a84ce){_0x5a84ce=_0x5a84ce||0xcc;return function(_0xf256d2){if(_0xf256d2){return _0x35dada[_0x1d05('0x1b')](_0x5a84ce);}return _0x35dada[_0x1d05('0x1c')](_0x5a84ce)['end']();};}function respondWithResult(_0x3b94cc,_0x3d24ca){_0x3d24ca=_0x3d24ca||0xc8;return function(_0x59c9d4){if(_0x59c9d4){return _0x3b94cc[_0x1d05('0x1c')](_0x3d24ca)[_0x1d05('0x1d')](_0x59c9d4);}};}function respondWithFilteredResult(_0x150ea5,_0x2d42ba){return function(_0x556462){if(_0x556462){var _0x406040=typeof _0x2d42ba[_0x1d05('0x1e')]===_0x1d05('0x1f')&&typeof _0x2d42ba[_0x1d05('0x20')]==='undefined';var _0x537157=_0x556462[_0x1d05('0x21')];var _0xfc7e1a=_0x406040?0x0:_0x2d42ba[_0x1d05('0x1e')];var _0x433945=_0x406040?_0x556462[_0x1d05('0x21')]:_0x2d42ba[_0x1d05('0x1e')]+_0x2d42ba[_0x1d05('0x20')];var _0x3f6351;if(_0x433945>=_0x537157){_0x433945=_0x537157;_0x3f6351=0xc8;}else{_0x3f6351=0xce;}_0x150ea5['status'](_0x3f6351);return _0x150ea5[_0x1d05('0x22')](_0x1d05('0x23'),_0xfc7e1a+'-'+_0x433945+'/'+_0x537157)['json'](_0x556462);}return null;};}function patchUpdates(_0x2289d2){return function(_0x113abc){try{jsonpatch['apply'](_0x113abc,_0x2289d2,!![]);}catch(_0x2010b2){return BPromise[_0x1d05('0x24')](_0x2010b2);}return _0x113abc[_0x1d05('0x25')]();};}function saveUpdates(_0x134cdc,_0x6496f5){return function(_0x477b7e){if(_0x477b7e){return _0x477b7e['update'](_0x134cdc)['then'](function(_0x2337b6){return _0x2337b6;});}return null;};}function removeEntity(_0x2fac08,_0x1b21e0){return function(_0x2b0b1a){if(_0x2b0b1a){return _0x2b0b1a[_0x1d05('0x26')]()['then'](function(){_0x2fac08['status'](0xcc)['end']();});}};}function handleEntityNotFound(_0x2f500d,_0x3bd61f){return function(_0x1d591c){if(!_0x1d591c){_0x2f500d[_0x1d05('0x1b')](0x194);}return _0x1d591c;};}function handleError(_0x451e64,_0x51007c){_0x51007c=_0x51007c||0x1f4;return function(_0x3f2892){logger[_0x1d05('0x27')](_0x3f2892['stack']);if(_0x3f2892[_0x1d05('0x28')]){delete _0x3f2892[_0x1d05('0x28')];}_0x451e64[_0x1d05('0x1c')](_0x51007c)[_0x1d05('0x29')](_0x3f2892);};}exports[_0x1d05('0x2a')]=function(_0x3785aa,_0x65df2b,_0xfbc8ae){if(!_0x3785aa['body'][_0x1d05('0x2b')](_0x1d05('0x2c'))&&!_0x3785aa[_0x1d05('0x2d')]['hasOwnProperty']('TemplateId')){throw new db[(_0x1d05('0x2e'))][(_0x1d05('0x2f'))](_0x1d05('0x30'));}else{if(_0x3785aa['body'][_0x1d05('0x2b')](_0x1d05('0x31'))&&!_0x3785aa[_0x1d05('0x2d')]['hasOwnProperty']('view')){throw new db[(_0x1d05('0x2e'))]['ValidationError']('Missing\x20\x27view\x27\x20parameter');}if(!_0x3785aa['body']['hasOwnProperty'](_0x1d05('0x32'))){throw new db[(_0x1d05('0x2e'))]['ValidationError'](_0x1d05('0x33'));}else{try{var _0x32b04=JSON[_0x1d05('0x34')](_0x3785aa['body'][_0x1d05('0x32')]);}catch(_0x24e7d5){logger[_0x1d05('0x27')](_0x24e7d5);throw new db[(_0x1d05('0x2e'))]['ValidationError'](_0x1d05('0x35'));}var _0x374736=[_0x1d05('0x36'),_0x1d05('0x37'),'mailqueue',_0x1d05('0x38'),'smsqueue',_0x1d05('0x39'),_0x1d05('0x3a'),'team','user'];if(_['some'](_0x32b04,function(_0x28f3f7){return!_[_0x1d05('0x3b')](_0x374736,_0x28f3f7['model'][_0x1d05('0x3c')]());})){throw new db[(_0x1d05('0x2e'))][(_0x1d05('0x2f'))](_0x1d05('0x3d'));}}}var _0x467952={};_0x467952[_0x1d05('0x3e')]=_0x3785aa['body'][_0x1d05('0x2b')](_0x1d05('0x3e'))?_0x3785aa[_0x1d05('0x2d')][_0x1d05('0x3e')]:_0x3785aa[_0x1d05('0x3f')]['fullname'];_0x467952[_0x1d05('0x40')]=_[_0x1d05('0x41')](_0x3785aa[_0x1d05('0x2d')][_0x1d05('0x40')])?null:_0x3785aa[_0x1d05('0x2d')][_0x1d05('0x40')];_0x467952[_0x1d05('0x42')]=_0x3785aa[_0x1d05('0x2d')][_0x1d05('0x42')]||![];_0x467952[_0x1d05('0x43')]=_0x3785aa['user']['id'];return getContent(_0x3785aa[_0x1d05('0x2d')])[_0x1d05('0x44')](function(_0x4bc88e){_0x467952[_0x1d05('0x2d')]=_0x4bc88e;return getRecipients(_0x32b04);})[_0x1d05('0x44')](function(_0xc1be7c){_0x467952[_0x1d05('0x45')]=_[_0x1d05('0x46')](_0xc1be7c)[_0x1d05('0x47')](',');return db[_0x1d05('0x48')][_0x1d05('0x49')](function(_0xc2ab96){return db[_0x1d05('0x4a')][_0x1d05('0x4b')](_0x467952,{'raw':!![],'transaction':_0xc2ab96})[_0x1d05('0x44')](function(_0x30cd2f){var _0x27d34c={'sender':_0x467952[_0x1d05('0x3e')],'description':_0x467952['recipientsDescription'],'content':_0x467952['body'],'beep':_0x467952[_0x1d05('0x42')]};_0xc1be7c[_0x1d05('0x4c')](function(_0x16ece7){_0x27d34c[_0x1d05('0x4d')]=_0x16ece7;socket['emit'](_0x1d05('0x4e'),_0x27d34c);});return _0x30cd2f;});});})[_0x1d05('0x44')](respondWithResult(_0x65df2b,0xc9))['catch'](handleError(_0x65df2b,null));};function getContent(_0x31546f){return new BPromise(function(_0xe6e721,_0x4fc561){if(_0x31546f[_0x1d05('0x2c')]){_0xe6e721(_0x31546f[_0x1d05('0x2c')]);return;}return db['Template'][_0x1d05('0x4f')]({'attributes':[_0x1d05('0x50')],'where':{'id':_0x31546f[_0x1d05('0x31')]},'raw':!![]})[_0x1d05('0x44')](function(_0x36e2e1){if(!_0x36e2e1)throw new db[(_0x1d05('0x2e'))]['ValidationError'](_0x1d05('0x51'));var _0x12b5af=Mustache[_0x1d05('0x52')](_0x36e2e1[_0x1d05('0x50')],_0x31546f[_0x1d05('0x53')]);_0xe6e721(_0x12b5af);})[_0x1d05('0x54')](function(_0x442a40){_0x4fc561(_0x442a40);});});}function getRecipients(_0xe684b4){return new BPromise(function(_0x2c35ff,_0x4d2390){var _0x13181f=[];var _0x11109f=[];_0xe684b4[_0x1d05('0x4c')](function(_0x367d8a){var _0x2f3bc0=_['startCase'](_0x367d8a[_0x1d05('0x55')][_0x1d05('0x3c')]());if(_0x2f3bc0===_0x1d05('0x56')){_0x13181f=_[_0x1d05('0x57')](_0x13181f,_0x367d8a['ids']);}else{if(_[_0x1d05('0x3b')](_0x2f3bc0,_0x1d05('0x58')))_0x2f3bc0=_0x2f3bc0[_0x1d05('0x59')](_0x1d05('0x58'),'Queue');_0x367d8a[_0x1d05('0x5a')][_0x1d05('0x4c')](function(_0x498b0a){_0x11109f['push'](getAgents(_0x2f3bc0,_0x498b0a));});}});return BPromise[_0x1d05('0x5b')](_0x11109f)[_0x1d05('0x44')](function(_0x39991a){_0x13181f=_[_0x1d05('0x57')](_0x13181f,_[_0x1d05('0x5c')](_0x39991a));_0x2c35ff(_0x13181f);})[_0x1d05('0x54')](function(_0x27eb8c){_0x4d2390(_0x27eb8c);});});}function getAgents(_0x44b77b,_0x173e9b){return new BPromise(function(_0x23fc7e,_0x1af77c){return db[_0x44b77b][_0x1d05('0x4f')]({'where':{'id':_0x173e9b}})[_0x1d05('0x44')](function(_0x3af9e1){return _0x3af9e1[_0x1d05('0x5d')]({'attributes':['id'],'raw':!![]})[_0x1d05('0x44')](function(_0x5eee5c){var _0x23a2cf=_[_0x1d05('0x5e')](_0x5eee5c,'id');_0x23fc7e(_0x23a2cf);});})[_0x1d05('0x54')](function(_0x5cc7b3){_0x1af77c(_0x5cc7b3);});});} \ No newline at end of file +var _0x7c5d=['../../config/logger','../../config/utils','../../mysqldb','redis','defaults','localhost','socket.io-emitter','./userNotification.socket','register','sendStatus','end','status','json','offset','undefined','limit','count','set','Content-Range','apply','reject','save','update','then','destroy','error','stack','send','sendUserNotification','body','hasOwnProperty','TemplateId','Sequelize','ValidationError','Must\x20specify\x20at\x20least\x20one\x20argument\x20for\x20\x27text\x27\x20or\x20\x27TemplateId\x27','view','recipients','Missing\x20\x27recipients\x27\x20parameter','parse','Invalid\x20\x27recipients\x27\x20object','chatqueue','faxqueue','mailqueue','openchannelqueue','smsqueue','voicequeue','whatsappqueue','user','some','model','toLowerCase','Invalid\x20model\x20in\x20\x27recipients\x27\x20object','senderName','fullname','recipientsDescription','isEmpty','beep','SenderId','recipientsId','join','sequelize','transaction','UserNotification','create','forEach','recipient','emit','text','Template','html','Invalid\x20\x27TemplateId\x27\x20parameter','render','startCase','User','union','ids','includes','queue','replace','Queue','push','all','flatten','catch','findOne','getAgents','eml-format','rimraf','request-promise','moment','mustache','util','path','to-csv','squel','crypto','jsforce','desk.js','querystring','../../components/auth/service','../../components/parsers/advancedSearch','../../config/license/hardware'];(function(_0x550ac6,_0x5ed43e){var _0x24c233=function(_0x549f79){while(--_0x549f79){_0x550ac6['push'](_0x550ac6['shift']());}};_0x24c233(++_0x5ed43e);}(_0x7c5d,0xbc));var _0xd7c5=function(_0x4767ec,_0x54e3a1){_0x4767ec=_0x4767ec-0x0;var _0x3446ed=_0x7c5d[_0x4767ec];return _0x3446ed;};'use strict';var emlformat=require(_0xd7c5('0x0'));var rimraf=require(_0xd7c5('0x1'));var zipdir=require('zip-dir');var jsonpatch=require('fast-json-patch');var rp=require(_0xd7c5('0x2'));var moment=require(_0xd7c5('0x3'));var BPromise=require('bluebird');var Mustache=require(_0xd7c5('0x4'));var util=require(_0xd7c5('0x5'));var path=require(_0xd7c5('0x6'));var sox=require('sox');var csv=require(_0xd7c5('0x7'));var ejs=require('ejs');var fs=require('fs');var fs_extra=require('fs-extra');var _=require('lodash');var squel=require(_0xd7c5('0x8'));var crypto=require(_0xd7c5('0x9'));var jsforce=require(_0xd7c5('0xa'));var deskjs=require(_0xd7c5('0xb'));var toCsv=require(_0xd7c5('0x7'));var querystring=require(_0xd7c5('0xc'));var Papa=require('papaparse');var Redis=require('ioredis');var authService=require(_0xd7c5('0xd'));var qs=require('../../components/parsers/qs');var as=require(_0xd7c5('0xe'));var hardwareService=require(_0xd7c5('0xf'));var logger=require(_0xd7c5('0x10'))('api');var utils=require(_0xd7c5('0x11'));var config=require('../../config/environment');var licenseUtil=require('../../config/license/util');var db=require(_0xd7c5('0x12'))['db'];config[_0xd7c5('0x13')]=_[_0xd7c5('0x14')](config[_0xd7c5('0x13')],{'host':_0xd7c5('0x15'),'port':0x18eb});var socket=require(_0xd7c5('0x16'))(new Redis(config[_0xd7c5('0x13')]));require(_0xd7c5('0x17'))[_0xd7c5('0x18')](socket);function respondWithStatusCode(_0x582d57,_0x3d2406){_0x3d2406=_0x3d2406||0xcc;return function(_0x3c66c8){if(_0x3c66c8){return _0x582d57[_0xd7c5('0x19')](_0x3d2406);}return _0x582d57['status'](_0x3d2406)[_0xd7c5('0x1a')]();};}function respondWithResult(_0x2bf0da,_0x2a9f98){_0x2a9f98=_0x2a9f98||0xc8;return function(_0x2d0c29){if(_0x2d0c29){return _0x2bf0da[_0xd7c5('0x1b')](_0x2a9f98)[_0xd7c5('0x1c')](_0x2d0c29);}};}function respondWithFilteredResult(_0x5cfe75,_0x298921){return function(_0x2d04e2){if(_0x2d04e2){var _0x1e5da5=typeof _0x298921[_0xd7c5('0x1d')]===_0xd7c5('0x1e')&&typeof _0x298921[_0xd7c5('0x1f')]===_0xd7c5('0x1e');var _0x226e59=_0x2d04e2[_0xd7c5('0x20')];var _0x5572d0=_0x1e5da5?0x0:_0x298921['offset'];var _0x18571c=_0x1e5da5?_0x2d04e2[_0xd7c5('0x20')]:_0x298921['offset']+_0x298921[_0xd7c5('0x1f')];var _0x919b92;if(_0x18571c>=_0x226e59){_0x18571c=_0x226e59;_0x919b92=0xc8;}else{_0x919b92=0xce;}_0x5cfe75[_0xd7c5('0x1b')](_0x919b92);return _0x5cfe75[_0xd7c5('0x21')](_0xd7c5('0x22'),_0x5572d0+'-'+_0x18571c+'/'+_0x226e59)[_0xd7c5('0x1c')](_0x2d04e2);}return null;};}function patchUpdates(_0x53acd1){return function(_0x22fb1e){try{jsonpatch[_0xd7c5('0x23')](_0x22fb1e,_0x53acd1,!![]);}catch(_0x3d3811){return BPromise[_0xd7c5('0x24')](_0x3d3811);}return _0x22fb1e[_0xd7c5('0x25')]();};}function saveUpdates(_0xe8b6dc,_0x408362){return function(_0x2e3a63){if(_0x2e3a63){return _0x2e3a63[_0xd7c5('0x26')](_0xe8b6dc)[_0xd7c5('0x27')](function(_0x402b78){return _0x402b78;});}return null;};}function removeEntity(_0xdbe78b,_0x798c12){return function(_0x15002b){if(_0x15002b){return _0x15002b[_0xd7c5('0x28')]()['then'](function(){_0xdbe78b['status'](0xcc)[_0xd7c5('0x1a')]();});}};}function handleEntityNotFound(_0x51c119,_0x5b220a){return function(_0x29f82f){if(!_0x29f82f){_0x51c119[_0xd7c5('0x19')](0x194);}return _0x29f82f;};}function handleError(_0x3afe59,_0x4c33b8){_0x4c33b8=_0x4c33b8||0x1f4;return function(_0x22df50){logger[_0xd7c5('0x29')](_0x22df50[_0xd7c5('0x2a')]);if(_0x22df50['name']){delete _0x22df50['name'];}_0x3afe59[_0xd7c5('0x1b')](_0x4c33b8)[_0xd7c5('0x2b')](_0x22df50);};}exports[_0xd7c5('0x2c')]=function(_0x44c689,_0x4fe078,_0x14d210){if(!_0x44c689['body']['hasOwnProperty']('text')&&!_0x44c689[_0xd7c5('0x2d')][_0xd7c5('0x2e')](_0xd7c5('0x2f'))){throw new db[(_0xd7c5('0x30'))][(_0xd7c5('0x31'))](_0xd7c5('0x32'));}else{if(_0x44c689[_0xd7c5('0x2d')][_0xd7c5('0x2e')](_0xd7c5('0x2f'))&&!_0x44c689['body']['hasOwnProperty'](_0xd7c5('0x33'))){throw new db[(_0xd7c5('0x30'))]['ValidationError']('Missing\x20\x27view\x27\x20parameter');}if(!_0x44c689[_0xd7c5('0x2d')][_0xd7c5('0x2e')](_0xd7c5('0x34'))){throw new db[(_0xd7c5('0x30'))]['ValidationError'](_0xd7c5('0x35'));}else{try{var _0x2afad8=JSON[_0xd7c5('0x36')](_0x44c689[_0xd7c5('0x2d')][_0xd7c5('0x34')]);}catch(_0x5dcc7d){logger[_0xd7c5('0x29')](_0x5dcc7d);throw new db[(_0xd7c5('0x30'))][(_0xd7c5('0x31'))](_0xd7c5('0x37'));}var _0x20ccc7=[_0xd7c5('0x38'),_0xd7c5('0x39'),_0xd7c5('0x3a'),_0xd7c5('0x3b'),_0xd7c5('0x3c'),_0xd7c5('0x3d'),_0xd7c5('0x3e'),'team',_0xd7c5('0x3f')];if(_[_0xd7c5('0x40')](_0x2afad8,function(_0x448316){return!_['includes'](_0x20ccc7,_0x448316[_0xd7c5('0x41')][_0xd7c5('0x42')]());})){throw new db['Sequelize'][(_0xd7c5('0x31'))](_0xd7c5('0x43'));}}}var _0x1e4be7={};_0x1e4be7['senderName']=_0x44c689['body']['hasOwnProperty'](_0xd7c5('0x44'))?_0x44c689[_0xd7c5('0x2d')][_0xd7c5('0x44')]:_0x44c689[_0xd7c5('0x3f')][_0xd7c5('0x45')];_0x1e4be7[_0xd7c5('0x46')]=_[_0xd7c5('0x47')](_0x44c689['body'][_0xd7c5('0x46')])?null:_0x44c689[_0xd7c5('0x2d')][_0xd7c5('0x46')];_0x1e4be7[_0xd7c5('0x48')]=_0x44c689[_0xd7c5('0x2d')][_0xd7c5('0x48')]||![];_0x1e4be7[_0xd7c5('0x49')]=_0x44c689[_0xd7c5('0x3f')]['id'];return getContent(_0x44c689[_0xd7c5('0x2d')])[_0xd7c5('0x27')](function(_0x1f8651){_0x1e4be7[_0xd7c5('0x2d')]=_0x1f8651;return getRecipients(_0x2afad8);})[_0xd7c5('0x27')](function(_0x258b90){_0x1e4be7[_0xd7c5('0x4a')]=_['sortBy'](_0x258b90)[_0xd7c5('0x4b')](',');return db[_0xd7c5('0x4c')][_0xd7c5('0x4d')](function(_0x512d09){return db[_0xd7c5('0x4e')][_0xd7c5('0x4f')](_0x1e4be7,{'raw':!![],'transaction':_0x512d09})[_0xd7c5('0x27')](function(_0x231369){var _0x1f7f26={'sender':_0x1e4be7[_0xd7c5('0x44')],'description':_0x1e4be7[_0xd7c5('0x46')],'content':_0x1e4be7[_0xd7c5('0x2d')],'beep':_0x1e4be7[_0xd7c5('0x48')]};_0x258b90[_0xd7c5('0x50')](function(_0x4f4ef9){_0x1f7f26[_0xd7c5('0x51')]=_0x4f4ef9;socket[_0xd7c5('0x52')]('userNotification:send',_0x1f7f26);});return _0x231369;});});})[_0xd7c5('0x27')](respondWithResult(_0x4fe078,0xc9))['catch'](handleError(_0x4fe078,null));};function getContent(_0x1baa36){return new BPromise(function(_0x2d4421,_0x2402e4){if(_0x1baa36[_0xd7c5('0x53')]){_0x2d4421(_0x1baa36[_0xd7c5('0x53')]);return;}return db[_0xd7c5('0x54')]['findOne']({'attributes':[_0xd7c5('0x55')],'where':{'id':_0x1baa36[_0xd7c5('0x2f')]},'raw':!![]})['then'](function(_0x27cadc){if(!_0x27cadc)throw new db[(_0xd7c5('0x30'))][(_0xd7c5('0x31'))](_0xd7c5('0x56'));var _0x3bf06b=Mustache[_0xd7c5('0x57')](_0x27cadc['html'],_0x1baa36[_0xd7c5('0x33')]);_0x2d4421(_0x3bf06b);})['catch'](function(_0x2570d3){_0x2402e4(_0x2570d3);});});}function getRecipients(_0x36ed25){return new BPromise(function(_0x5e8e02,_0x1f5e83){var _0x2ce75c=[];var _0x199aff=[];_0x36ed25['forEach'](function(_0x4f01e1){var _0x40aeee=_[_0xd7c5('0x58')](_0x4f01e1[_0xd7c5('0x41')]['toLowerCase']());if(_0x40aeee===_0xd7c5('0x59')){_0x2ce75c=_[_0xd7c5('0x5a')](_0x2ce75c,_0x4f01e1[_0xd7c5('0x5b')]);}else{if(_[_0xd7c5('0x5c')](_0x40aeee,_0xd7c5('0x5d')))_0x40aeee=_0x40aeee[_0xd7c5('0x5e')](_0xd7c5('0x5d'),_0xd7c5('0x5f'));_0x4f01e1[_0xd7c5('0x5b')][_0xd7c5('0x50')](function(_0x43d370){_0x199aff[_0xd7c5('0x60')](getAgents(_0x40aeee,_0x43d370));});}});return BPromise[_0xd7c5('0x61')](_0x199aff)[_0xd7c5('0x27')](function(_0x554b82){_0x2ce75c=_['union'](_0x2ce75c,_[_0xd7c5('0x62')](_0x554b82));_0x5e8e02(_0x2ce75c);})[_0xd7c5('0x63')](function(_0x273a90){_0x1f5e83(_0x273a90);});});}function getAgents(_0xb90eaa,_0x4299e4){return new BPromise(function(_0x182f60,_0xdf32fa){return db[_0xb90eaa][_0xd7c5('0x64')]({'where':{'id':_0x4299e4}})['then'](function(_0x13217f){return _0x13217f[_0xd7c5('0x65')]({'attributes':['id'],'raw':!![]})[_0xd7c5('0x27')](function(_0x1c69b1){var _0x2afdfe=_['map'](_0x1c69b1,'id');_0x182f60(_0x2afdfe);});})[_0xd7c5('0x63')](function(_0x5bc175){_0xdf32fa(_0x5bc175);});});} \ No newline at end of file diff --git a/server/api/userNotification/userNotification.events.js b/server/api/userNotification/userNotification.events.js index 9c55b7e..75172b1 100644 --- a/server/api/userNotification/userNotification.events.js +++ b/server/api/userNotification/userNotification.events.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x09e3=['../../mysqldb','UserNotification','setMaxListeners','save','remove','emit','hasOwnProperty','hook','events'];(function(_0x46e363,_0x45d7e2){var _0x3fb059=function(_0x5e6274){while(--_0x5e6274){_0x46e363['push'](_0x46e363['shift']());}};_0x3fb059(++_0x45d7e2);}(_0x09e3,0x1dc));var _0x309e=function(_0x583aec,_0xff39c5){_0x583aec=_0x583aec-0x0;var _0x54cdc3=_0x09e3[_0x583aec];return _0x54cdc3;};'use strict';var EventEmitter=require(_0x309e('0x0'));var UserNotification=require(_0x309e('0x1'))['db'][_0x309e('0x2')];var UserNotificationEvents=new EventEmitter();UserNotificationEvents[_0x309e('0x3')](0x0);var events={'afterCreate':_0x309e('0x4'),'afterUpdate':'update','afterDestroy':_0x309e('0x5')};function emitEvent(_0x5428a0){return function(_0x1e1cf9,_0x547d5c,_0x18fc4f){UserNotificationEvents[_0x309e('0x6')](_0x5428a0+':'+_0x1e1cf9['id'],_0x1e1cf9);UserNotificationEvents[_0x309e('0x6')](_0x5428a0,_0x1e1cf9);_0x18fc4f(null);};}for(var e in events){if(events[_0x309e('0x7')](e)){var event=events[e];UserNotification[_0x309e('0x8')](e,emitEvent(event));}}module['exports']=UserNotificationEvents; \ No newline at end of file +var _0x1bf0=['events','../../mysqldb','UserNotification','save','update','remove','emit','hasOwnProperty','hook'];(function(_0x2ba00c,_0x10f136){var _0x4a4853=function(_0x42add8){while(--_0x42add8){_0x2ba00c['push'](_0x2ba00c['shift']());}};_0x4a4853(++_0x10f136);}(_0x1bf0,0x156));var _0x01bf=function(_0x2bf0b0,_0xbb08c5){_0x2bf0b0=_0x2bf0b0-0x0;var _0x10a6bf=_0x1bf0[_0x2bf0b0];return _0x10a6bf;};'use strict';var EventEmitter=require(_0x01bf('0x0'));var UserNotification=require(_0x01bf('0x1'))['db'][_0x01bf('0x2')];var UserNotificationEvents=new EventEmitter();UserNotificationEvents['setMaxListeners'](0x0);var events={'afterCreate':_0x01bf('0x3'),'afterUpdate':_0x01bf('0x4'),'afterDestroy':_0x01bf('0x5')};function emitEvent(_0x2a878d){return function(_0x515837,_0x43896c,_0x1ea8d0){UserNotificationEvents[_0x01bf('0x6')](_0x2a878d+':'+_0x515837['id'],_0x515837);UserNotificationEvents[_0x01bf('0x6')](_0x2a878d,_0x515837);_0x1ea8d0(null);};}for(var e in events){if(events[_0x01bf('0x7')](e)){var event=events[e];UserNotification[_0x01bf('0x8')](e,emitEvent(event));}}module['exports']=UserNotificationEvents; \ No newline at end of file diff --git a/server/api/userNotification/userNotification.model.js b/server/api/userNotification/userNotification.model.js index 22d98cf..83bf9bc 100644 --- a/server/api/userNotification/userNotification.model.js +++ b/server/api/userNotification/userNotification.model.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xfda0=['utf8mb4','utf8mb4_unicode_ci','lodash','util','../../config/logger','api','bluebird','path','./userNotification.attributes','exports','define','UserNotification','userNotifications'];(function(_0x38c3d4,_0x5a3bc2){var _0x18ea50=function(_0x2a995f){while(--_0x2a995f){_0x38c3d4['push'](_0x38c3d4['shift']());}};_0x18ea50(++_0x5a3bc2);}(_0xfda0,0x17b));var _0x0fda=function(_0x75e9d0,_0x4ef7b8){_0x75e9d0=_0x75e9d0-0x0;var _0x35aaab=_0xfda0[_0x75e9d0];return _0x35aaab;};'use strict';var _=require(_0x0fda('0x0'));var util=require(_0x0fda('0x1'));var logger=require(_0x0fda('0x2'))(_0x0fda('0x3'));var moment=require('moment');var BPromise=require(_0x0fda('0x4'));var rp=require('request-promise');var fs=require('fs');var path=require(_0x0fda('0x5'));var rimraf=require('rimraf');var config=require('../../config/environment');var attributes=require(_0x0fda('0x6'));module[_0x0fda('0x7')]=function(_0x2d759b,_0x5e8d0b){return _0x2d759b[_0x0fda('0x8')](_0x0fda('0x9'),attributes,{'tableName':_0x0fda('0xa'),'paranoid':![],'indexes':[],'timestamps':!![],'charset':_0x0fda('0xb'),'collate':_0x0fda('0xc')});}; \ No newline at end of file +var _0x952f=['moment','request-promise','path','rimraf','../../config/environment','./userNotification.attributes','exports','UserNotification','userNotifications','lodash','api'];(function(_0x258653,_0x3fb029){var _0x550ab8=function(_0x236ba2){while(--_0x236ba2){_0x258653['push'](_0x258653['shift']());}};_0x550ab8(++_0x3fb029);}(_0x952f,0x1ed));var _0xf952=function(_0x3d89ce,_0x5d5e4b){_0x3d89ce=_0x3d89ce-0x0;var _0x494a2e=_0x952f[_0x3d89ce];return _0x494a2e;};'use strict';var _=require(_0xf952('0x0'));var util=require('util');var logger=require('../../config/logger')(_0xf952('0x1'));var moment=require(_0xf952('0x2'));var BPromise=require('bluebird');var rp=require(_0xf952('0x3'));var fs=require('fs');var path=require(_0xf952('0x4'));var rimraf=require(_0xf952('0x5'));var config=require(_0xf952('0x6'));var attributes=require(_0xf952('0x7'));module[_0xf952('0x8')]=function(_0x487ba7,_0x1a55eb){return _0x487ba7['define'](_0xf952('0x9'),attributes,{'tableName':_0xf952('0xa'),'paranoid':![],'indexes':[],'timestamps':!![],'charset':'utf8mb4','collate':'utf8mb4_unicode_ci'});}; \ No newline at end of file diff --git a/server/api/userNotification/userNotification.rpc.js b/server/api/userNotification/userNotification.rpc.js index a5703e7..6fabd9c 100644 --- a/server/api/userNotification/userNotification.rpc.js +++ b/server/api/userNotification/userNotification.rpc.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x6930=['redis','socket.io-emitter','./userNotification.socket','request','then','info','request\x20sent','UserNotification,\x20%s,\x20%s,\x20%s','error','code','UserNotification,\x20%s,\x20%s','message','result','catch','lodash','util','moment','bluebird','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','defaults'];(function(_0x8c43de,_0x90ff31){var _0xa6591b=function(_0x469716){while(--_0x469716){_0x8c43de['push'](_0x8c43de['shift']());}};_0xa6591b(++_0x90ff31);}(_0x6930,0x13a));var _0x0693=function(_0x1b040c,_0x106584){_0x1b040c=_0x1b040c-0x0;var _0x27655c=_0x6930[_0x1b040c];return _0x27655c;};'use strict';var _=require(_0x0693('0x0'));var util=require(_0x0693('0x1'));var moment=require(_0x0693('0x2'));var BPromise=require(_0x0693('0x3'));var rs=require('randomstring');var fs=require('fs');var Redis=require('ioredis');var db=require('../../mysqldb')['db'];var utils=require(_0x0693('0x4'));var logger=require(_0x0693('0x5'))(_0x0693('0x6'));var config=require(_0x0693('0x7'));var jayson=require(_0x0693('0x8'));var client=jayson[_0x0693('0x9')]['http']({'port':0x232a});config['redis']=_[_0x0693('0xa')](config[_0x0693('0xb')],{'host':'localhost','port':0x18eb});var socket=require(_0x0693('0xc'))(new Redis(config[_0x0693('0xb')]));require(_0x0693('0xd'))['register'](socket);function respondWithRpcPromise(_0x576d29,_0x1714b4,_0x58723b){return new BPromise(function(_0x253b36,_0x431d43){return client[_0x0693('0xe')](_0x576d29,_0x58723b)[_0x0693('0xf')](function(_0x16abe0){logger[_0x0693('0x10')]('UserNotification,\x20%s,\x20%s',_0x1714b4,_0x0693('0x11'));logger['debug'](_0x0693('0x12'),_0x1714b4,_0x0693('0x11'),JSON['stringify'](_0x16abe0));if(_0x16abe0[_0x0693('0x13')]){if(_0x16abe0[_0x0693('0x13')][_0x0693('0x14')]===0x1f4){logger[_0x0693('0x13')](_0x0693('0x15'),_0x1714b4,_0x16abe0[_0x0693('0x13')][_0x0693('0x16')]);return _0x431d43(_0x16abe0[_0x0693('0x13')]['message']);}logger['error'](_0x0693('0x15'),_0x1714b4,_0x16abe0[_0x0693('0x13')][_0x0693('0x16')]);return _0x253b36(_0x16abe0[_0x0693('0x13')][_0x0693('0x16')]);}else{logger['info'](_0x0693('0x15'),_0x1714b4,_0x0693('0x11'));_0x253b36(_0x16abe0[_0x0693('0x17')]['message']);}})[_0x0693('0x18')](function(_0x53dfbc){logger[_0x0693('0x13')](_0x0693('0x15'),_0x1714b4,_0x53dfbc);_0x431d43(_0x53dfbc);});});} \ No newline at end of file +var _0x3cb1=['UserNotification,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','catch','randomstring','ioredis','../../mysqldb','../../config/utils','client','http','redis','defaults','localhost','socket.io-emitter','./userNotification.socket','register','request','then','info','UserNotification,\x20%s,\x20%s','request\x20sent','debug'];(function(_0x21599b,_0x5dc6c9){var _0xe35621=function(_0x29ed09){while(--_0x29ed09){_0x21599b['push'](_0x21599b['shift']());}};_0xe35621(++_0x5dc6c9);}(_0x3cb1,0x1b0));var _0x13cb=function(_0x5413df,_0xb6b70f){_0x5413df=_0x5413df-0x0;var _0x4d0ee1=_0x3cb1[_0x5413df];return _0x4d0ee1;};'use strict';var _=require('lodash');var util=require('util');var moment=require('moment');var BPromise=require('bluebird');var rs=require(_0x13cb('0x0'));var fs=require('fs');var Redis=require(_0x13cb('0x1'));var db=require(_0x13cb('0x2'))['db'];var utils=require(_0x13cb('0x3'));var logger=require('../../config/logger')('rpc');var config=require('../../config/environment');var jayson=require('jayson/promise');var client=jayson[_0x13cb('0x4')][_0x13cb('0x5')]({'port':0x232a});config[_0x13cb('0x6')]=_[_0x13cb('0x7')](config[_0x13cb('0x6')],{'host':_0x13cb('0x8'),'port':0x18eb});var socket=require(_0x13cb('0x9'))(new Redis(config['redis']));require(_0x13cb('0xa'))[_0x13cb('0xb')](socket);function respondWithRpcPromise(_0x1ff4b7,_0x396528,_0x3706a3){return new BPromise(function(_0x5b91d9,_0xade676){return client[_0x13cb('0xc')](_0x1ff4b7,_0x3706a3)[_0x13cb('0xd')](function(_0x3296cb){logger[_0x13cb('0xe')](_0x13cb('0xf'),_0x396528,_0x13cb('0x10'));logger[_0x13cb('0x11')](_0x13cb('0x12'),_0x396528,_0x13cb('0x10'),JSON[_0x13cb('0x13')](_0x3296cb));if(_0x3296cb[_0x13cb('0x14')]){if(_0x3296cb[_0x13cb('0x14')][_0x13cb('0x15')]===0x1f4){logger[_0x13cb('0x14')]('UserNotification,\x20%s,\x20%s',_0x396528,_0x3296cb[_0x13cb('0x14')][_0x13cb('0x16')]);return _0xade676(_0x3296cb[_0x13cb('0x14')][_0x13cb('0x16')]);}logger[_0x13cb('0x14')]('UserNotification,\x20%s,\x20%s',_0x396528,_0x3296cb[_0x13cb('0x14')][_0x13cb('0x16')]);return _0x5b91d9(_0x3296cb['error']['message']);}else{logger[_0x13cb('0xe')](_0x13cb('0xf'),_0x396528,_0x13cb('0x10'));_0x5b91d9(_0x3296cb[_0x13cb('0x17')][_0x13cb('0x16')]);}})[_0x13cb('0x18')](function(_0x197a14){logger[_0x13cb('0x14')](_0x13cb('0xf'),_0x396528,_0x197a14);_0xade676(_0x197a14);});});} \ No newline at end of file diff --git a/server/api/userNotification/userNotification.socket.js b/server/api/userNotification/userNotification.socket.js index a97949a..ef3ade5 100644 --- a/server/api/userNotification/userNotification.socket.js +++ b/server/api/userNotification/userNotification.socket.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x2d94=['save','remove','emit','removeListener','length'];(function(_0x14915a,_0x222f6b){var _0x2f683c=function(_0x28e694){while(--_0x28e694){_0x14915a['push'](_0x14915a['shift']());}};_0x2f683c(++_0x222f6b);}(_0x2d94,0x10e));var _0x42d9=function(_0x57f1c2,_0x36d8bf){_0x57f1c2=_0x57f1c2-0x0;var _0x55d99d=_0x2d94[_0x57f1c2];return _0x55d99d;};'use strict';var UserNotificationEvents=require('./userNotification.events');var events=[_0x42d9('0x0'),_0x42d9('0x1'),'update'];function createListener(_0x23869c,_0x2dca5b){return function(_0x665a5d){_0x2dca5b[_0x42d9('0x2')](_0x23869c,_0x665a5d);};}function removeListener(_0x57621f,_0x2e062c){return function(){UserNotificationEvents[_0x42d9('0x3')](_0x57621f,_0x2e062c);};}exports['register']=function(_0x57d0a9){for(var _0x8d1842=0x0,_0x31261f=events[_0x42d9('0x4')];_0x8d1842<_0x31261f;_0x8d1842++){var _0x508987=events[_0x8d1842];var _0x1297b8=createListener('userNotification:'+_0x508987,_0x57d0a9);UserNotificationEvents['on'](_0x508987,_0x1297b8);}}; \ No newline at end of file +var _0xd634=['register','./userNotification.events','save','remove','update','emit','removeListener'];(function(_0x1ac33b,_0x5e027b){var _0x42c871=function(_0x359e85){while(--_0x359e85){_0x1ac33b['push'](_0x1ac33b['shift']());}};_0x42c871(++_0x5e027b);}(_0xd634,0x16d));var _0x4d63=function(_0x257642,_0x270a80){_0x257642=_0x257642-0x0;var _0x3d813b=_0xd634[_0x257642];return _0x3d813b;};'use strict';var UserNotificationEvents=require(_0x4d63('0x0'));var events=[_0x4d63('0x1'),_0x4d63('0x2'),_0x4d63('0x3')];function createListener(_0x3c19d9,_0xaae62){return function(_0x32ecfc){_0xaae62[_0x4d63('0x4')](_0x3c19d9,_0x32ecfc);};}function removeListener(_0x45ef6a,_0x417cc1){return function(){UserNotificationEvents[_0x4d63('0x5')](_0x45ef6a,_0x417cc1);};}exports[_0x4d63('0x6')]=function(_0x3cd8d2){for(var _0x20c8f8=0x0,_0x8a6f83=events['length'];_0x20c8f8<_0x8a6f83;_0x20c8f8++){var _0x98217=events[_0x20c8f8];var _0x52e21c=createListener('userNotification:'+_0x98217,_0x3cd8d2);UserNotificationEvents['on'](_0x98217,_0x52e21c);}}; \ No newline at end of file diff --git a/server/api/userOpenchannelQueue/index.js b/server/api/userOpenchannelQueue/index.js index 5343ff6..74c593d 100644 --- a/server/api/userOpenchannelQueue/index.js +++ b/server/api/userOpenchannelQueue/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x9c44=['express','Router','fs-extra','../../components/auth/service','exports','path','connect-timeout'];(function(_0x393b41,_0x7973a3){var _0x5d738a=function(_0x3b4078){while(--_0x3b4078){_0x393b41['push'](_0x393b41['shift']());}};_0x5d738a(++_0x7973a3);}(_0x9c44,0x178));var _0x49c4=function(_0x15bc81,_0x4d4f77){_0x15bc81=_0x15bc81-0x0;var _0x59440e=_0x9c44[_0x15bc81];return _0x59440e;};'use strict';var multer=require('multer');var util=require('util');var path=require(_0x49c4('0x0'));var timeout=require(_0x49c4('0x1'));var express=require(_0x49c4('0x2'));var router=express[_0x49c4('0x3')]();var fs_extra=require(_0x49c4('0x4'));var auth=require(_0x49c4('0x5'));var interaction=require('../../components/interaction/service');var config=require('../../config/environment');module[_0x49c4('0x6')]=router; \ No newline at end of file +var _0xedd9=['util','path','connect-timeout','express','Router','fs-extra','../../components/auth/service','../../components/interaction/service','exports'];(function(_0x298615,_0x5b514){var _0x427243=function(_0x2d817d){while(--_0x2d817d){_0x298615['push'](_0x298615['shift']());}};_0x427243(++_0x5b514);}(_0xedd9,0xfc));var _0x9edd=function(_0x173f04,_0x219684){_0x173f04=_0x173f04-0x0;var _0x3888bf=_0xedd9[_0x173f04];return _0x3888bf;};'use strict';var multer=require('multer');var util=require(_0x9edd('0x0'));var path=require(_0x9edd('0x1'));var timeout=require(_0x9edd('0x2'));var express=require(_0x9edd('0x3'));var router=express[_0x9edd('0x4')]();var fs_extra=require(_0x9edd('0x5'));var auth=require(_0x9edd('0x6'));var interaction=require(_0x9edd('0x7'));var config=require('../../config/environment');module[_0x9edd('0x8')]=router; \ No newline at end of file diff --git a/server/api/userOpenchannelQueue/userOpenchannelQueue.attributes.js b/server/api/userOpenchannelQueue/userOpenchannelQueue.attributes.js index ff4e460..5f946a1 100644 --- a/server/api/userOpenchannelQueue/userOpenchannelQueue.attributes.js +++ b/server/api/userOpenchannelQueue/userOpenchannelQueue.attributes.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xf116=['INTEGER','sequelize'];(function(_0x438d2c,_0xa04810){var _0x220929=function(_0x5d06ed){while(--_0x5d06ed){_0x438d2c['push'](_0x438d2c['shift']());}};_0x220929(++_0xa04810);}(_0xf116,0xad));var _0x6f11=function(_0x4e9f29,_0x1bbcbf){_0x4e9f29=_0x4e9f29-0x0;var _0x8e1ab3=_0xf116[_0x4e9f29];return _0x8e1ab3;};'use strict';var Sequelize=require(_0x6f11('0x0'));module['exports']={'penalty':{'type':Sequelize[_0x6f11('0x1')],'defaultValue':0x0}}; \ No newline at end of file +var _0xd771=['sequelize','INTEGER'];(function(_0x478414,_0xcf142d){var _0x5eb6b9=function(_0x10e6fe){while(--_0x10e6fe){_0x478414['push'](_0x478414['shift']());}};_0x5eb6b9(++_0xcf142d);}(_0xd771,0x7a));var _0x1d77=function(_0xeef697,_0x3644df){_0xeef697=_0xeef697-0x0;var _0x5a6115=_0xd771[_0xeef697];return _0x5a6115;};'use strict';var Sequelize=require(_0x1d77('0x0'));module['exports']={'penalty':{'type':Sequelize[_0x1d77('0x1')],'defaultValue':0x0}}; \ No newline at end of file diff --git a/server/api/userOpenchannelQueue/userOpenchannelQueue.model.js b/server/api/userOpenchannelQueue/userOpenchannelQueue.model.js index 42245f8..06f48c3 100644 --- a/server/api/userOpenchannelQueue/userOpenchannelQueue.model.js +++ b/server/api/userOpenchannelQueue/userOpenchannelQueue.model.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xc5cf=['moment','bluebird','path','rimraf','../../config/environment','exports','define','UserOpenchannelQueue','user_has_openchannel_queues','util','../../config/logger','api'];(function(_0x4ee776,_0x9c8db2){var _0x811a04=function(_0x11e3db){while(--_0x11e3db){_0x4ee776['push'](_0x4ee776['shift']());}};_0x811a04(++_0x9c8db2);}(_0xc5cf,0xa5));var _0xfc5c=function(_0x3193e4,_0x18a45a){_0x3193e4=_0x3193e4-0x0;var _0xbc6883=_0xc5cf[_0x3193e4];return _0xbc6883;};'use strict';var _=require('lodash');var util=require(_0xfc5c('0x0'));var logger=require(_0xfc5c('0x1'))(_0xfc5c('0x2'));var moment=require(_0xfc5c('0x3'));var BPromise=require(_0xfc5c('0x4'));var rp=require('request-promise');var fs=require('fs');var path=require(_0xfc5c('0x5'));var rimraf=require(_0xfc5c('0x6'));var config=require(_0xfc5c('0x7'));var attributes=require('./userOpenchannelQueue.attributes');module[_0xfc5c('0x8')]=function(_0x24b3d3,_0x312dcc){return _0x24b3d3[_0xfc5c('0x9')](_0xfc5c('0xa'),attributes,{'tableName':_0xfc5c('0xb'),'paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file +var _0xe138=['lodash','util','../../config/logger','api','bluebird','path','rimraf','../../config/environment','exports','define','UserOpenchannelQueue','user_has_openchannel_queues'];(function(_0x424012,_0x5cb32c){var _0x4ece5f=function(_0x5ae6a0){while(--_0x5ae6a0){_0x424012['push'](_0x424012['shift']());}};_0x4ece5f(++_0x5cb32c);}(_0xe138,0xa8));var _0x8e13=function(_0x4ebb72,_0x4110e1){_0x4ebb72=_0x4ebb72-0x0;var _0x14f72a=_0xe138[_0x4ebb72];return _0x14f72a;};'use strict';var _=require(_0x8e13('0x0'));var util=require(_0x8e13('0x1'));var logger=require(_0x8e13('0x2'))(_0x8e13('0x3'));var moment=require('moment');var BPromise=require(_0x8e13('0x4'));var rp=require('request-promise');var fs=require('fs');var path=require(_0x8e13('0x5'));var rimraf=require(_0x8e13('0x6'));var config=require(_0x8e13('0x7'));var attributes=require('./userOpenchannelQueue.attributes');module[_0x8e13('0x8')]=function(_0x33a959,_0x5cace7){return _0x33a959[_0x8e13('0x9')](_0x8e13('0xa'),attributes,{'tableName':_0x8e13('0xb'),'paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file diff --git a/server/api/userOpenchannelQueue/userOpenchannelQueue.rpc.js b/server/api/userOpenchannelQueue/userOpenchannelQueue.rpc.js index 553fef0..4c42d50 100644 --- a/server/api/userOpenchannelQueue/userOpenchannelQueue.rpc.js +++ b/server/api/userOpenchannelQueue/userOpenchannelQueue.rpc.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x0a82=['info','UserOpenchannelQueue,\x20%s,\x20%s','request\x20sent','debug','error','code','message','catch','lodash','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/logger','rpc','../../config/environment','jayson/promise','request','then'];(function(_0xccfcbb,_0x51dbf5){var _0x22387d=function(_0x114c7b){while(--_0x114c7b){_0xccfcbb['push'](_0xccfcbb['shift']());}};_0x22387d(++_0x51dbf5);}(_0x0a82,0x1d6));var _0x20a8=function(_0x4be66e,_0xd5a5f3){_0x4be66e=_0x4be66e-0x0;var _0x3d73bb=_0x0a82[_0x4be66e];return _0x3d73bb;};'use strict';var _=require(_0x20a8('0x0'));var util=require(_0x20a8('0x1'));var moment=require(_0x20a8('0x2'));var BPromise=require(_0x20a8('0x3'));var rs=require(_0x20a8('0x4'));var fs=require('fs');var Redis=require(_0x20a8('0x5'));var db=require(_0x20a8('0x6'))['db'];var utils=require('../../config/utils');var logger=require(_0x20a8('0x7'))(_0x20a8('0x8'));var config=require(_0x20a8('0x9'));var jayson=require(_0x20a8('0xa'));var client=jayson['client']['http']({'port':0x232a});function respondWithRpcPromise(_0x478139,_0x4d688d,_0x10c790){return new BPromise(function(_0x31cae9,_0x2ca9a5){return client[_0x20a8('0xb')](_0x478139,_0x10c790)[_0x20a8('0xc')](function(_0x2f4d98){logger[_0x20a8('0xd')](_0x20a8('0xe'),_0x4d688d,_0x20a8('0xf'));logger[_0x20a8('0x10')]('UserOpenchannelQueue,\x20%s,\x20%s,\x20%s',_0x4d688d,_0x20a8('0xf'),JSON['stringify'](_0x2f4d98));if(_0x2f4d98[_0x20a8('0x11')]){if(_0x2f4d98['error'][_0x20a8('0x12')]===0x1f4){logger[_0x20a8('0x11')]('UserOpenchannelQueue,\x20%s,\x20%s',_0x4d688d,_0x2f4d98[_0x20a8('0x11')]['message']);return _0x2ca9a5(_0x2f4d98['error']['message']);}logger[_0x20a8('0x11')]('UserOpenchannelQueue,\x20%s,\x20%s',_0x4d688d,_0x2f4d98[_0x20a8('0x11')]['message']);return _0x31cae9(_0x2f4d98['error'][_0x20a8('0x13')]);}else{logger['info'](_0x20a8('0xe'),_0x4d688d,_0x20a8('0xf'));_0x31cae9(_0x2f4d98['result'][_0x20a8('0x13')]);}})[_0x20a8('0x14')](function(_0x15fa53){logger[_0x20a8('0x11')](_0x20a8('0xe'),_0x4d688d,_0x15fa53);_0x2ca9a5(_0x15fa53);});});} \ No newline at end of file +var _0x9fc2=['catch','lodash','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','request','then','info','UserOpenchannelQueue,\x20%s,\x20%s','request\x20sent','debug','UserOpenchannelQueue,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result'];(function(_0x5bf756,_0x313666){var _0x5d3f18=function(_0xe5fd02){while(--_0xe5fd02){_0x5bf756['push'](_0x5bf756['shift']());}};_0x5d3f18(++_0x313666);}(_0x9fc2,0x1a1));var _0x29fc=function(_0xdc81d7,_0x5b9182){_0xdc81d7=_0xdc81d7-0x0;var _0x41ddc6=_0x9fc2[_0xdc81d7];return _0x41ddc6;};'use strict';var _=require(_0x29fc('0x0'));var util=require(_0x29fc('0x1'));var moment=require(_0x29fc('0x2'));var BPromise=require(_0x29fc('0x3'));var rs=require(_0x29fc('0x4'));var fs=require('fs');var Redis=require(_0x29fc('0x5'));var db=require(_0x29fc('0x6'))['db'];var utils=require(_0x29fc('0x7'));var logger=require(_0x29fc('0x8'))(_0x29fc('0x9'));var config=require(_0x29fc('0xa'));var jayson=require(_0x29fc('0xb'));var client=jayson[_0x29fc('0xc')]['http']({'port':0x232a});function respondWithRpcPromise(_0x150b73,_0x544bde,_0x512404){return new BPromise(function(_0x4f6811,_0xb6c5d3){return client[_0x29fc('0xd')](_0x150b73,_0x512404)[_0x29fc('0xe')](function(_0x3ed0cb){logger[_0x29fc('0xf')](_0x29fc('0x10'),_0x544bde,_0x29fc('0x11'));logger[_0x29fc('0x12')](_0x29fc('0x13'),_0x544bde,_0x29fc('0x11'),JSON[_0x29fc('0x14')](_0x3ed0cb));if(_0x3ed0cb[_0x29fc('0x15')]){if(_0x3ed0cb['error'][_0x29fc('0x16')]===0x1f4){logger[_0x29fc('0x15')](_0x29fc('0x10'),_0x544bde,_0x3ed0cb[_0x29fc('0x15')][_0x29fc('0x17')]);return _0xb6c5d3(_0x3ed0cb[_0x29fc('0x15')][_0x29fc('0x17')]);}logger[_0x29fc('0x15')]('UserOpenchannelQueue,\x20%s,\x20%s',_0x544bde,_0x3ed0cb[_0x29fc('0x15')][_0x29fc('0x17')]);return _0x4f6811(_0x3ed0cb['error'][_0x29fc('0x17')]);}else{logger[_0x29fc('0xf')](_0x29fc('0x10'),_0x544bde,_0x29fc('0x11'));_0x4f6811(_0x3ed0cb[_0x29fc('0x18')]['message']);}})[_0x29fc('0x19')](function(_0x2ad604){logger[_0x29fc('0x15')](_0x29fc('0x10'),_0x544bde,_0x2ad604);_0xb6c5d3(_0x2ad604);});});} \ No newline at end of file diff --git a/server/api/userProfile/index.js b/server/api/userProfile/index.js index c9bf5db..a7cf459 100644 --- a/server/api/userProfile/index.js +++ b/server/api/userProfile/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x2a14=['/:id/sections','getSections','/:id/resources','getResources','post','create','clone','addSections','addResources','put','update','delete','destroy','removeSections','exports','multer','util','path','express','Router','fs-extra','../../components/interaction/service','../../config/environment','./userProfile.controller','get','isAuthenticated','index','/describe','describe','/:id'];(function(_0x369a98,_0x32250c){var _0x29565c=function(_0x1a6973){while(--_0x1a6973){_0x369a98['push'](_0x369a98['shift']());}};_0x29565c(++_0x32250c);}(_0x2a14,0xc3));var _0x42a1=function(_0x1990a7,_0x54f9c4){_0x1990a7=_0x1990a7-0x0;var _0x2b7c3e=_0x2a14[_0x1990a7];return _0x2b7c3e;};'use strict';var multer=require(_0x42a1('0x0'));var util=require(_0x42a1('0x1'));var path=require(_0x42a1('0x2'));var timeout=require('connect-timeout');var express=require(_0x42a1('0x3'));var router=express[_0x42a1('0x4')]();var fs_extra=require(_0x42a1('0x5'));var auth=require('../../components/auth/service');var interaction=require(_0x42a1('0x6'));var config=require(_0x42a1('0x7'));var controller=require(_0x42a1('0x8'));router[_0x42a1('0x9')]('/',auth[_0x42a1('0xa')](),controller[_0x42a1('0xb')]);router[_0x42a1('0x9')](_0x42a1('0xc'),auth[_0x42a1('0xa')](),controller[_0x42a1('0xd')]);router['get'](_0x42a1('0xe'),auth[_0x42a1('0xa')](),controller['show']);router['get'](_0x42a1('0xf'),auth[_0x42a1('0xa')](),controller[_0x42a1('0x10')]);router[_0x42a1('0x9')](_0x42a1('0x11'),auth[_0x42a1('0xa')](),controller[_0x42a1('0x12')]);router[_0x42a1('0x13')]('/',auth[_0x42a1('0xa')](),controller[_0x42a1('0x14')]);router['post']('/:id/clone',auth['isAuthenticated'](),controller[_0x42a1('0x15')]);router['post'](_0x42a1('0xf'),auth['isAuthenticated'](),controller[_0x42a1('0x16')]);router[_0x42a1('0x13')](_0x42a1('0x11'),auth[_0x42a1('0xa')](),controller[_0x42a1('0x17')]);router[_0x42a1('0x18')](_0x42a1('0xe'),auth['isAuthenticated'](),controller[_0x42a1('0x19')]);router[_0x42a1('0x1a')]('/:id',auth[_0x42a1('0xa')](),controller[_0x42a1('0x1b')]);router['delete'](_0x42a1('0xf'),auth[_0x42a1('0xa')](),controller[_0x42a1('0x1c')]);router[_0x42a1('0x1a')](_0x42a1('0x11'),auth[_0x42a1('0xa')](),controller['removeResources']);module[_0x42a1('0x1d')]=router; \ No newline at end of file +var _0x0dd6=['getResources','post','create','/:id/clone','clone','/:id/sections','addSections','put','update','delete','removeSections','removeResources','multer','util','path','connect-timeout','express','Router','fs-extra','../../components/interaction/service','./userProfile.controller','isAuthenticated','index','get','describe','/:id','show','/:id/resources'];(function(_0x20a584,_0xe384a5){var _0x4b41a8=function(_0x2127c6){while(--_0x2127c6){_0x20a584['push'](_0x20a584['shift']());}};_0x4b41a8(++_0xe384a5);}(_0x0dd6,0x98));var _0x60dd=function(_0x2c6a9c,_0x244ed9){_0x2c6a9c=_0x2c6a9c-0x0;var _0x21591f=_0x0dd6[_0x2c6a9c];return _0x21591f;};'use strict';var multer=require(_0x60dd('0x0'));var util=require(_0x60dd('0x1'));var path=require(_0x60dd('0x2'));var timeout=require(_0x60dd('0x3'));var express=require(_0x60dd('0x4'));var router=express[_0x60dd('0x5')]();var fs_extra=require(_0x60dd('0x6'));var auth=require('../../components/auth/service');var interaction=require(_0x60dd('0x7'));var config=require('../../config/environment');var controller=require(_0x60dd('0x8'));router['get']('/',auth[_0x60dd('0x9')](),controller[_0x60dd('0xa')]);router[_0x60dd('0xb')]('/describe',auth[_0x60dd('0x9')](),controller[_0x60dd('0xc')]);router[_0x60dd('0xb')](_0x60dd('0xd'),auth[_0x60dd('0x9')](),controller[_0x60dd('0xe')]);router['get']('/:id/sections',auth[_0x60dd('0x9')](),controller['getSections']);router[_0x60dd('0xb')](_0x60dd('0xf'),auth[_0x60dd('0x9')](),controller[_0x60dd('0x10')]);router[_0x60dd('0x11')]('/',auth[_0x60dd('0x9')](),controller[_0x60dd('0x12')]);router[_0x60dd('0x11')](_0x60dd('0x13'),auth[_0x60dd('0x9')](),controller[_0x60dd('0x14')]);router[_0x60dd('0x11')](_0x60dd('0x15'),auth[_0x60dd('0x9')](),controller[_0x60dd('0x16')]);router['post'](_0x60dd('0xf'),auth[_0x60dd('0x9')](),controller['addResources']);router[_0x60dd('0x17')](_0x60dd('0xd'),auth['isAuthenticated'](),controller[_0x60dd('0x18')]);router['delete'](_0x60dd('0xd'),auth[_0x60dd('0x9')](),controller['destroy']);router[_0x60dd('0x19')]('/:id/sections',auth['isAuthenticated'](),controller[_0x60dd('0x1a')]);router[_0x60dd('0x19')](_0x60dd('0xf'),auth[_0x60dd('0x9')](),controller[_0x60dd('0x1b')]);module['exports']=router; \ No newline at end of file diff --git a/server/api/userProfile/userProfile.attributes.js b/server/api/userProfile/userProfile.attributes.js index cbefc8a..6ec8e14 100644 --- a/server/api/userProfile/userProfile.attributes.js +++ b/server/api/userProfile/userProfile.attributes.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xdeb1=['BOOLEAN','sequelize','exports','name','STRING','setDataValue','crudPermissions','join','getDataValue'];(function(_0x30249d,_0x3a89d7){var _0x54ebef=function(_0x4f7e2){while(--_0x4f7e2){_0x30249d['push'](_0x30249d['shift']());}};_0x54ebef(++_0x3a89d7);}(_0xdeb1,0x12a));var _0x1deb=function(_0x24fda2,_0x56e57d){_0x24fda2=_0x24fda2-0x0;var _0x24d06d=_0xdeb1[_0x24fda2];return _0x24d06d;};'use strict';var Sequelize=require(_0x1deb('0x0'));module[_0x1deb('0x1')]={'name':{'type':Sequelize['STRING'],'allowNull':![],'unique':_0x1deb('0x2')},'crudPermissions':{'type':Sequelize[_0x1deb('0x3')],'set':function(_0x2686dc){this[_0x1deb('0x4')](_0x1deb('0x5'),_0x2686dc?_0x2686dc[_0x1deb('0x6')](''):[]);},'get':function(){return this[_0x1deb('0x7')]('crudPermissions')?this['getDataValue']('crudPermissions')['split'](''):[];},'allowNull':![],'defaultValue':'r'},'description':{'type':Sequelize[_0x1deb('0x3')],'allowNull':!![]},'privacyEnabled':{'type':Sequelize[_0x1deb('0x8')],'defaultValue':![]},'downloadAttachments':{'type':Sequelize[_0x1deb('0x8')],'defaultValue':!![]},'downloadCallySquareRecordings':{'type':Sequelize[_0x1deb('0x8')],'defaultValue':!![]},'downloadContactManagerLists':{'type':Sequelize[_0x1deb('0x8')],'defaultValue':!![]},'downloadJscriptySessions':{'type':Sequelize[_0x1deb('0x8')],'defaultValue':!![]},'downloadOmnichannelInteractions':{'type':Sequelize[_0x1deb('0x8')],'defaultValue':!![]},'downloadScreenRecordings':{'type':Sequelize[_0x1deb('0x8')],'defaultValue':!![]},'downloadVoiceRecordings':{'type':Sequelize['BOOLEAN'],'defaultValue':!![]}}; \ No newline at end of file +var _0xae93=['crudPermissions','getDataValue','BOOLEAN','exports','STRING','name','setDataValue'];(function(_0x15bc81,_0x4d4f77){var _0x59440e=function(_0x1b60f2){while(--_0x1b60f2){_0x15bc81['push'](_0x15bc81['shift']());}};_0x59440e(++_0x4d4f77);}(_0xae93,0x168));var _0x3ae9=function(_0x187dc8,_0x526ed6){_0x187dc8=_0x187dc8-0x0;var _0xb02eaa=_0xae93[_0x187dc8];return _0xb02eaa;};'use strict';var Sequelize=require('sequelize');module[_0x3ae9('0x0')]={'name':{'type':Sequelize[_0x3ae9('0x1')],'allowNull':![],'unique':_0x3ae9('0x2')},'crudPermissions':{'type':Sequelize[_0x3ae9('0x1')],'set':function(_0x21907c){this[_0x3ae9('0x3')](_0x3ae9('0x4'),_0x21907c?_0x21907c['join'](''):[]);},'get':function(){return this[_0x3ae9('0x5')](_0x3ae9('0x4'))?this[_0x3ae9('0x5')](_0x3ae9('0x4'))['split'](''):[];},'allowNull':![],'defaultValue':'r'},'description':{'type':Sequelize['STRING'],'allowNull':!![]},'privacyEnabled':{'type':Sequelize[_0x3ae9('0x6')],'defaultValue':![]},'downloadAttachments':{'type':Sequelize[_0x3ae9('0x6')],'defaultValue':!![]},'downloadCallySquareRecordings':{'type':Sequelize[_0x3ae9('0x6')],'defaultValue':!![]},'downloadContactManagerLists':{'type':Sequelize[_0x3ae9('0x6')],'defaultValue':!![]},'downloadJscriptySessions':{'type':Sequelize[_0x3ae9('0x6')],'defaultValue':!![]},'downloadOmnichannelInteractions':{'type':Sequelize[_0x3ae9('0x6')],'defaultValue':!![]},'downloadScreenRecordings':{'type':Sequelize[_0x3ae9('0x6')],'defaultValue':!![]},'downloadVoiceRecordings':{'type':Sequelize[_0x3ae9('0x6')],'defaultValue':!![]}}; \ No newline at end of file diff --git a/server/api/userProfile/userProfile.controller.js b/server/api/userProfile/userProfile.controller.js index 973c640..55f3a13 100644 --- a/server/api/userProfile/userProfile.controller.js +++ b/server/api/userProfile/userProfile.controller.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x37a5=['sequelize','transaction','UserProfileSection','autoAssociation','UserProfileResource','sectionId','userProfileId','Resources','find','describe','addSections','push','removeSections','ids','getSections','enabled','isEmpty','includes','subsections','concat','findOne','Dashboard','forEach','resourceId','addResources','bulkCreate','removeResources','getResources','section','Missing\x20section\x20parameter','hasOwnProperty','No\x20User\x20Profile\x20found\x20for\x20id\x20','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','sox','to-csv','lodash','squel','crypto','jsforce','desk.js','querystring','papaparse','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/logger','api','../../config/environment','../../mysqldb','redis','defaults','localhost','socket.io-emitter','./userProfile.socket','sendStatus','status','json','offset','undefined','limit','count','set','Content-Range','apply','reject','update','then','destroy','end','error','stack','name','send','index','map','UserProfile','rawAttributes','type','key','model','query','keys','intersection','attributes','fields','length','nolimit','order','sort','where','filters','pick','filter','merge','VIRTUAL','options','includeAll','include','findAll','rows','show','params','create','catch','get','omit','updatedAt','crudPermissions','body','createdAt'];(function(_0x3eee1c,_0x5969f6){var _0x3c1601=function(_0x1cee62){while(--_0x1cee62){_0x3eee1c['push'](_0x3eee1c['shift']());}};_0x3c1601(++_0x5969f6);}(_0x37a5,0x108));var _0x537a=function(_0x4f9b18,_0x2cb5ca){_0x4f9b18=_0x4f9b18-0x0;var _0x29f20c=_0x37a5[_0x4f9b18];return _0x29f20c;};'use strict';var emlformat=require(_0x537a('0x0'));var rimraf=require(_0x537a('0x1'));var zipdir=require(_0x537a('0x2'));var jsonpatch=require(_0x537a('0x3'));var rp=require(_0x537a('0x4'));var moment=require(_0x537a('0x5'));var BPromise=require(_0x537a('0x6'));var Mustache=require('mustache');var util=require('util');var path=require('path');var sox=require(_0x537a('0x7'));var csv=require(_0x537a('0x8'));var ejs=require('ejs');var fs=require('fs');var fs_extra=require('fs-extra');var _=require(_0x537a('0x9'));var squel=require(_0x537a('0xa'));var crypto=require(_0x537a('0xb'));var jsforce=require(_0x537a('0xc'));var deskjs=require(_0x537a('0xd'));var toCsv=require(_0x537a('0x8'));var querystring=require(_0x537a('0xe'));var Papa=require(_0x537a('0xf'));var Redis=require('ioredis');var authService=require(_0x537a('0x10'));var qs=require(_0x537a('0x11'));var as=require(_0x537a('0x12'));var hardwareService=require('../../config/license/hardware');var logger=require(_0x537a('0x13'))(_0x537a('0x14'));var utils=require('../../config/utils');var config=require(_0x537a('0x15'));var licenseUtil=require('../../config/license/util');var db=require(_0x537a('0x16'))['db'];config[_0x537a('0x17')]=_[_0x537a('0x18')](config['redis'],{'host':_0x537a('0x19'),'port':0x18eb});var socket=require(_0x537a('0x1a'))(new Redis(config[_0x537a('0x17')]));require(_0x537a('0x1b'))['register'](socket);function respondWithStatusCode(_0x3ed6f5,_0x5e465b){_0x5e465b=_0x5e465b||0xcc;return function(_0x5e7ea9){if(_0x5e7ea9){return _0x3ed6f5[_0x537a('0x1c')](_0x5e465b);}return _0x3ed6f5['status'](_0x5e465b)['end']();};}function respondWithResult(_0x139eea,_0x4c3b63){_0x4c3b63=_0x4c3b63||0xc8;return function(_0x212de5){if(_0x212de5){return _0x139eea[_0x537a('0x1d')](_0x4c3b63)[_0x537a('0x1e')](_0x212de5);}};}function respondWithFilteredResult(_0x28ec2c,_0x54e422){return function(_0x382472){if(_0x382472){var _0x4d63e5=typeof _0x54e422[_0x537a('0x1f')]===_0x537a('0x20')&&typeof _0x54e422[_0x537a('0x21')]===_0x537a('0x20');var _0x4d3e1d=_0x382472[_0x537a('0x22')];var _0xe749cc=_0x4d63e5?0x0:_0x54e422[_0x537a('0x1f')];var _0x132ce6=_0x4d63e5?_0x382472[_0x537a('0x22')]:_0x54e422['offset']+_0x54e422['limit'];var _0x3d392d;if(_0x132ce6>=_0x4d3e1d){_0x132ce6=_0x4d3e1d;_0x3d392d=0xc8;}else{_0x3d392d=0xce;}_0x28ec2c[_0x537a('0x1d')](_0x3d392d);return _0x28ec2c[_0x537a('0x23')](_0x537a('0x24'),_0xe749cc+'-'+_0x132ce6+'/'+_0x4d3e1d)[_0x537a('0x1e')](_0x382472);}return null;};}function patchUpdates(_0x10fc26){return function(_0x48c3ab){try{jsonpatch[_0x537a('0x25')](_0x48c3ab,_0x10fc26,!![]);}catch(_0xe7052f){return BPromise[_0x537a('0x26')](_0xe7052f);}return _0x48c3ab['save']();};}function saveUpdates(_0x4bdfc6,_0x3f499b){return function(_0x4495a6){if(_0x4495a6){return _0x4495a6[_0x537a('0x27')](_0x4bdfc6)[_0x537a('0x28')](function(_0x18e522){return _0x18e522;});}return null;};}function removeEntity(_0x5ea79d,_0x2ac71f){return function(_0x48e5a){if(_0x48e5a){return _0x48e5a[_0x537a('0x29')]()['then'](function(){_0x5ea79d['status'](0xcc)[_0x537a('0x2a')]();});}};}function handleEntityNotFound(_0x463021,_0x37eb17){return function(_0x1dd947){if(!_0x1dd947){_0x463021['sendStatus'](0x194);}return _0x1dd947;};}function handleError(_0x18ed4f,_0x49129e){_0x49129e=_0x49129e||0x1f4;return function(_0x49e5f2){logger[_0x537a('0x2b')](_0x49e5f2[_0x537a('0x2c')]);if(_0x49e5f2[_0x537a('0x2d')]){delete _0x49e5f2[_0x537a('0x2d')];}_0x18ed4f['status'](_0x49129e)[_0x537a('0x2e')](_0x49e5f2);};}exports[_0x537a('0x2f')]=function(_0x324412,_0x2a05bd){var _0x38354f={},_0x5183ad={},_0x28061f={'count':0x0,'rows':[]};var _0x4d6b30=_[_0x537a('0x30')](db[_0x537a('0x31')][_0x537a('0x32')],function(_0x31fc06){return{'name':_0x31fc06['fieldName'],'type':_0x31fc06[_0x537a('0x33')][_0x537a('0x34')]};});_0x5183ad[_0x537a('0x35')]=_[_0x537a('0x30')](_0x4d6b30,'name');_0x5183ad[_0x537a('0x36')]=_[_0x537a('0x37')](_0x324412[_0x537a('0x36')]);_0x5183ad['filters']=_[_0x537a('0x38')](_0x5183ad[_0x537a('0x35')],_0x5183ad[_0x537a('0x36')]);_0x38354f[_0x537a('0x39')]=_[_0x537a('0x38')](_0x5183ad[_0x537a('0x35')],qs[_0x537a('0x3a')](_0x324412['query'][_0x537a('0x3a')]));_0x38354f[_0x537a('0x39')]=_0x38354f['attributes'][_0x537a('0x3b')]?_0x38354f[_0x537a('0x39')]:_0x5183ad['model'];if(!_0x324412[_0x537a('0x36')]['hasOwnProperty'](_0x537a('0x3c'))){_0x38354f['limit']=qs[_0x537a('0x21')](_0x324412['query'][_0x537a('0x21')]);_0x38354f[_0x537a('0x1f')]=qs[_0x537a('0x1f')](_0x324412[_0x537a('0x36')]['offset']);}_0x38354f[_0x537a('0x3d')]=qs[_0x537a('0x3e')](_0x324412[_0x537a('0x36')][_0x537a('0x3e')]);_0x38354f[_0x537a('0x3f')]=qs[_0x537a('0x40')](_[_0x537a('0x41')](_0x324412[_0x537a('0x36')],_0x5183ad[_0x537a('0x40')]),_0x4d6b30);if(_0x324412['query'][_0x537a('0x42')]){_0x38354f['where']=_[_0x537a('0x43')](_0x38354f[_0x537a('0x3f')],{'$or':_[_0x537a('0x30')](_0x4d6b30,function(_0x5f49ba){if(_0x5f49ba[_0x537a('0x33')]!==_0x537a('0x44')){var _0x2f8fd0={};_0x2f8fd0[_0x5f49ba['name']]={'$like':'%'+_0x324412[_0x537a('0x36')][_0x537a('0x42')]+'%'};return _0x2f8fd0;}})});}_0x38354f=_[_0x537a('0x43')]({},_0x38354f,_0x324412[_0x537a('0x45')]);var _0x8ba8c1={'where':_0x38354f[_0x537a('0x3f')]};return db[_0x537a('0x31')][_0x537a('0x22')](_0x8ba8c1)['then'](function(_0x18bf32){_0x28061f[_0x537a('0x22')]=_0x18bf32;if(_0x324412[_0x537a('0x36')][_0x537a('0x46')]){_0x38354f[_0x537a('0x47')]=[{'all':!![]}];}return db[_0x537a('0x31')][_0x537a('0x48')](_0x38354f);})[_0x537a('0x28')](function(_0x5cf3fa){_0x28061f[_0x537a('0x49')]=_0x5cf3fa;return _0x28061f;})[_0x537a('0x28')](respondWithFilteredResult(_0x2a05bd,_0x38354f))['catch'](handleError(_0x2a05bd,null));};exports[_0x537a('0x4a')]=function(_0x7b19f0,_0x4b0b6c){var _0x32232b={'raw':![],'where':{'id':_0x7b19f0[_0x537a('0x4b')]['id']}},_0x4df258={};_0x4df258[_0x537a('0x35')]=_[_0x537a('0x37')](db[_0x537a('0x31')][_0x537a('0x32')]);_0x4df258['query']=_['keys'](_0x7b19f0[_0x537a('0x36')]);_0x4df258[_0x537a('0x40')]=_[_0x537a('0x38')](_0x4df258[_0x537a('0x35')],_0x4df258[_0x537a('0x36')]);_0x32232b[_0x537a('0x39')]=_[_0x537a('0x38')](_0x4df258[_0x537a('0x35')],qs[_0x537a('0x3a')](_0x7b19f0[_0x537a('0x36')][_0x537a('0x3a')]));_0x32232b[_0x537a('0x39')]=_0x32232b[_0x537a('0x39')][_0x537a('0x3b')]?_0x32232b[_0x537a('0x39')]:_0x4df258[_0x537a('0x35')];if(_0x7b19f0[_0x537a('0x36')][_0x537a('0x46')]){_0x32232b[_0x537a('0x47')]=[{'all':!![]}];}_0x32232b=_[_0x537a('0x43')]({},_0x32232b,_0x7b19f0[_0x537a('0x45')]);return db[_0x537a('0x31')]['find'](_0x32232b)[_0x537a('0x28')](handleEntityNotFound(_0x4b0b6c,null))[_0x537a('0x28')](respondWithResult(_0x4b0b6c,null))['catch'](handleError(_0x4b0b6c,null));};exports[_0x537a('0x4c')]=function(_0x4be875,_0x3b5476){return db[_0x537a('0x31')][_0x537a('0x4c')](_0x4be875['body'],{})[_0x537a('0x28')](respondWithResult(_0x3b5476,0xc9))[_0x537a('0x4d')](handleError(_0x3b5476,null));};exports['clone']=function(_0x1a9caa,_0x385aaa){var _0x215f00={'where':{'id':_0x1a9caa[_0x537a('0x4b')]['id']}},_0x401917={};_0x401917['model']=_[_0x537a('0x37')](db[_0x537a('0x31')][_0x537a('0x32')]);_0x215f00[_0x537a('0x39')]=_[_0x537a('0x38')](_0x401917['model'],qs[_0x537a('0x3a')](_0x1a9caa[_0x537a('0x36')][_0x537a('0x3a')]));_0x215f00[_0x537a('0x39')]=_0x215f00['attributes'][_0x537a('0x3b')]?_0x215f00['attributes']:_0x401917[_0x537a('0x35')];if(_0x1a9caa[_0x537a('0x36')]['includeAll']){_0x215f00['include']=[{'all':!![]}];}_0x215f00=_[_0x537a('0x43')]({},_0x215f00,_0x1a9caa[_0x537a('0x45')]);return db[_0x537a('0x31')]['find'](_0x215f00)[_0x537a('0x28')](handleEntityNotFound(_0x385aaa,null))[_0x537a('0x28')](function(_0x2f659c){if(_0x2f659c){var _0x200b08=_0x2f659c[_0x537a('0x4e')]({'plain':!![]});_0x200b08=qs[_0x537a('0x4f')](_0x200b08,['id','createdAt',_0x537a('0x50'),_0x537a('0x51')]);_0x1a9caa[_0x537a('0x52')]=_[_0x537a('0x4f')](_0x1a9caa[_0x537a('0x52')],['id',_0x537a('0x53'),_0x537a('0x50')]);return db[_0x537a('0x54')][_0x537a('0x55')](function(_0x4116cb){return db[_0x537a('0x31')][_0x537a('0x4c')](_[_0x537a('0x43')](_0x200b08,_0x1a9caa[_0x537a('0x52')]),{'include':_0x1a9caa[_0x537a('0x36')][_0x537a('0x46')]?[{'all':!![]}]:undefined,'transaction':_0x4116cb})[_0x537a('0x28')](function(_0x4966e9){var _0x996068=_0x4966e9[_0x537a('0x4e')]({'plain':!![]});return db[_0x537a('0x56')]['findAll']({'where':{'userProfileId':_0x1a9caa[_0x537a('0x4b')]['id']},'raw':!![]})[_0x537a('0x28')](function(_0x3d0f5f){if(_0x3d0f5f){return BPromise['each'](_0x3d0f5f,function(_0x4c67f3){return new BPromise(function(_0x410d9b,_0xc98284){if(_0x4c67f3['autoAssociation']===null||_0x4c67f3[_0x537a('0x57')]===0x1)_0x410d9b(null);return db[_0x537a('0x58')][_0x537a('0x48')]({'where':{'sectionId':_0x4c67f3['id']},'raw':!![]})['then'](function(_0x2a050b){var _0x539dd8=_[_0x537a('0x30')](_0x2a050b,function(_0x57c3eb){return qs['omit'](_0x57c3eb,['id',_0x537a('0x53'),_0x537a('0x50'),_0x537a('0x59')]);});_0x410d9b(_0x539dd8);})[_0x537a('0x4d')](function(_0x111f84){_0xc98284(_0x111f84);});})[_0x537a('0x28')](function(_0xe7a520){var _0x400038=qs['omit'](_0x4c67f3,['id',_0x537a('0x53'),_0x537a('0x50')]);_0x400038[_0x537a('0x5a')]=_0x996068['id'];if(_0xe7a520)_0x400038[_0x537a('0x5b')]=_0xe7a520;return _0x400038;})[_0x537a('0x28')](function(_0x3e815d){return db[_0x537a('0x56')][_0x537a('0x4c')](_0x3e815d,{'include':[{'model':db[_0x537a('0x58')],'as':_0x537a('0x5b')}],'raw':!![],'transaction':_0x4116cb});});})['then'](function(){return _0x996068;});}});});});}})[_0x537a('0x28')](respondWithResult(_0x385aaa,0xc9))[_0x537a('0x4d')](handleError(_0x385aaa,null));};exports[_0x537a('0x27')]=function(_0x2740d0,_0x168303){if(_0x2740d0['body']['id']){delete _0x2740d0[_0x537a('0x52')]['id'];}return db[_0x537a('0x31')][_0x537a('0x5c')]({'where':{'id':_0x2740d0[_0x537a('0x4b')]['id']}})[_0x537a('0x28')](handleEntityNotFound(_0x168303,null))['then'](saveUpdates(_0x2740d0[_0x537a('0x52')],null))['then'](respondWithResult(_0x168303,null))[_0x537a('0x4d')](handleError(_0x168303,null));};exports[_0x537a('0x29')]=function(_0x255cba,_0x4e7d6f){return db['UserProfile'][_0x537a('0x5c')]({'where':{'id':_0x255cba[_0x537a('0x4b')]['id']}})['then'](handleEntityNotFound(_0x4e7d6f,null))[_0x537a('0x28')](removeEntity(_0x4e7d6f,null))[_0x537a('0x4d')](handleError(_0x4e7d6f,null));};exports[_0x537a('0x5d')]=function(_0x30d83d,_0x40bb29){return db['UserProfile'][_0x537a('0x5d')]()[_0x537a('0x28')](respondWithResult(_0x40bb29,null))['catch'](handleError(_0x40bb29,null));};exports[_0x537a('0x5e')]=function(_0x592948,_0x397879){var _0x496f9d=_0x592948[_0x537a('0x52')];return db[_0x537a('0x31')]['find']({'where':{'id':_0x592948['params']['id']}})[_0x537a('0x28')](handleEntityNotFound(_0x397879,null))[_0x537a('0x28')](function(_0x1f47d3){if(_0x1f47d3){return db[_0x537a('0x54')][_0x537a('0x55')](function(_0x3d9ce9){return db[_0x537a('0x56')][_0x537a('0x29')]({'where':{'userProfileId':_0x592948['params']['id'],'sectionId':_[_0x537a('0x30')](_0x496f9d,function(_0x14347c){return _0x14347c[_0x537a('0x59')];})},'transaction':_0x3d9ce9})[_0x537a('0x28')](function(){var _0x1ad52f=_[_0x537a('0x30')](_0x496f9d,function(_0x1c1c01){_0x1c1c01[_0x537a('0x5a')]=_0x592948[_0x537a('0x4b')]['id'];return _0x1c1c01;});var _0x1099f2=[];return BPromise['each'](_0x1ad52f,function(_0x19a0ed){return db[_0x537a('0x56')][_0x537a('0x4c')](_0x19a0ed,{'include':[{'model':db[_0x537a('0x58')],'as':'Resources'}],'raw':!![],'transaction':_0x3d9ce9})[_0x537a('0x28')](function(_0x10dd8a){_0x1099f2[_0x537a('0x5f')](_0x10dd8a[_0x537a('0x4e')]({'plain':!![]}));});})[_0x537a('0x28')](function(){return _0x1099f2;});});});}})['then'](function(_0x236f9b){return _0x236f9b;})[_0x537a('0x28')](respondWithResult(_0x397879,null))['catch'](handleError(_0x397879,null));};exports[_0x537a('0x60')]=function(_0x34fe4b,_0x5465f1){var _0x1d140a;return db['UserProfile'][_0x537a('0x5c')]({'where':{'id':_0x34fe4b[_0x537a('0x4b')]['id']},'attributes':['id','name']})[_0x537a('0x28')](handleEntityNotFound(_0x5465f1,null))[_0x537a('0x28')](function(_0x31d50b){if(_0x31d50b){_0x1d140a=_0x31d50b;return db[_0x537a('0x56')]['destroy']({'where':{'userProfileId':_0x34fe4b[_0x537a('0x4b')]['id'],'sectionId':_0x34fe4b[_0x537a('0x36')][_0x537a('0x61')]}});}})[_0x537a('0x28')](function(){return _0x1d140a;})[_0x537a('0x28')](respondWithStatusCode(_0x5465f1,null))['catch'](handleError(_0x5465f1,null));};exports[_0x537a('0x62')]=function(_0x54e5a5,_0x4ded3e){var _0x4b1761=[];var _0x173d4c=[];return db[_0x537a('0x56')][_0x537a('0x48')]({'where':{'userProfileId':_0x54e5a5['params']['id']},'raw':!![]})[_0x537a('0x28')](function(_0x421cfb){_0x4b1761=_[_0x537a('0x42')](_0x421cfb,function(_0x3dbc06){return _0x3dbc06[_0x537a('0x63')]===0x1||_['includes']([0x3eb,0x709],_0x3dbc06[_0x537a('0x59')]);});if(!_[_0x537a('0x64')](_0x4b1761)){return _['map'](_0x4b1761,function(_0x14d34d){return _0x14d34d[_0x537a('0x59')];});}else{return;}})[_0x537a('0x28')](function(_0x159ae6){if(_0x159ae6)_0x173d4c=_0x159ae6;if(_[_0x537a('0x65')](_0x173d4c,0x64)){var _0x22340a=_['find'](_0x4b1761,{'sectionId':0x64});return hasDefaultDashboard(_0x22340a)[_0x537a('0x28')](function(_0x99c5a4){return _[_0x537a('0x30')](_0x4b1761,function(_0x3288e9){if(_0x3288e9['sectionId']===0x64){_0x3288e9[_0x537a('0x66')]=_0x99c5a4;}return _0x3288e9;});});}else{return;}})['then'](function(_0x123e2b){if(_0x123e2b)_0x4b1761=_0x123e2b;if(_['includes'](_0x173d4c,0x3eb)){var _0xafa982=_['find'](_0x4b1761,{'sectionId':0x3eb});return getCustomDashboards(_0xafa982)[_0x537a('0x28')](function(_0x3decc4){return _['map'](_0x4b1761,function(_0x5374ed){if(_0xafa982[_0x537a('0x63')]){if(_0x5374ed[_0x537a('0x59')]===0x3eb){_0x5374ed[_0x537a('0x66')]=_0x3decc4;}}else{if(_0x5374ed[_0x537a('0x59')]===0x64){if(!_0x5374ed[_0x537a('0x66')]){_0x5374ed[_0x537a('0x66')]=[];}_0x5374ed[_0x537a('0x66')]=_0x5374ed[_0x537a('0x66')][_0x537a('0x67')](_0x3decc4);}}return _0x5374ed;});});}else{return;}})['then'](function(_0x424d9f){if(_0x424d9f)_0x4b1761=_0x424d9f;if(_[_0x537a('0x65')](_0x173d4c,0x709)){var _0x3df4a2=_[_0x537a('0x5c')](_0x4b1761,{'sectionId':0x709});return getPlugins(_0x3df4a2)[_0x537a('0x28')](function(_0x12b4a9){if(_0x3df4a2[_0x537a('0x63')]){return _[_0x537a('0x30')](_0x4b1761,function(_0x1d6d66){if(_0x1d6d66[_0x537a('0x59')]===0x709){_0x1d6d66[_0x537a('0x66')]=_0x12b4a9;}return _0x1d6d66;});}else{var _0x299f15={'sectionId':0x76c,'enabled':0x1,'subsections':_0x12b4a9};var _0x488c81=_[_0x537a('0x30')](_0x4b1761);_0x488c81['push'](_0x299f15);return _0x488c81;}});}else{return;}})[_0x537a('0x28')](function(_0x283e9b){if(_0x283e9b)_0x4b1761=_0x283e9b;return _[_0x537a('0x42')](_0x4b1761,[_0x537a('0x63'),0x1]);})[_0x537a('0x28')](respondWithResult(_0x4ded3e,null))[_0x537a('0x4d')](handleError(_0x4ded3e,null));};function hasDefaultDashboard(_0xb22a1){var _0x159d0a=[0x65];return new BPromise(function(_0x32d16a,_0x4eb1c9){try{if(_0xb22a1[_0x537a('0x57')]){_0x32d16a(_0x159d0a);}else{return db[_0x537a('0x58')][_0x537a('0x68')]({'where':{'sectionId':_0xb22a1['id']},'raw':!![]})[_0x537a('0x28')](function(_0x50ce92){_0x50ce92?_0x32d16a(_0x159d0a):_0x32d16a();});}}catch(_0x42f40a){_0x4eb1c9(_0x42f40a);}});}function getCustomDashboards(_0x590940){var _0x318280=[];return new BPromise(function(_0x3bbc51,_0x58a14b){try{if(_0x590940['autoAssociation']){return db[_0x537a('0x69')][_0x537a('0x48')]({'raw':!![]})[_0x537a('0x28')](function(_0x2d4aab){_0x2d4aab[_0x537a('0x6a')](function(_0x563b61){_0x318280[_0x537a('0x5f')](_0x563b61['id']+0x1869f);});_0x3bbc51(_0x318280);});}else{return db['UserProfileResource'][_0x537a('0x48')]({'where':{'sectionId':_0x590940['id']},'raw':!![]})[_0x537a('0x28')](function(_0x12c668){_0x12c668[_0x537a('0x6a')](function(_0x31025b){_0x318280['push'](_0x31025b[_0x537a('0x6b')]+0x1869f);});_0x3bbc51(_0x318280);});}}catch(_0x3ab4ad){_0x58a14b(_0x3ab4ad);}});}function getPlugins(_0x5d14d9){var _0x14ee58=[];return new BPromise(function(_0x21d0ce,_0x10f897){try{if(_0x5d14d9[_0x537a('0x57')]){return db['Plugin'][_0x537a('0x48')]({'raw':!![]})['then'](function(_0x591dc4){_0x591dc4[_0x537a('0x6a')](function(_0x47b515){_0x14ee58[_0x537a('0x5f')](_0x47b515['id']+0x15b38);});_0x21d0ce(_0x14ee58);});}else{return db[_0x537a('0x58')]['findAll']({'where':{'sectionId':_0x5d14d9['id']},'raw':!![]})[_0x537a('0x28')](function(_0x4e6653){_0x4e6653['forEach'](function(_0x2e35d1){_0x14ee58[_0x537a('0x5f')](_0x2e35d1[_0x537a('0x6b')]+0x15b38);});_0x21d0ce(_0x14ee58);});}}catch(_0x267790){_0x10f897(_0x267790);}});}exports[_0x537a('0x6c')]=function(_0x4b6cfa,_0x339582){return db[_0x537a('0x31')][_0x537a('0x5c')]({'where':{'id':_0x4b6cfa[_0x537a('0x4b')]['id']}})[_0x537a('0x28')](handleEntityNotFound(_0x339582,null))[_0x537a('0x28')](function(_0xa543fd){if(_0xa543fd){return db['sequelize'][_0x537a('0x55')](function(_0x331e8c){return db[_0x537a('0x56')]['findAll']({'where':{'userProfileId':_0x4b6cfa[_0x537a('0x4b')]['id']},'attributes':['id'],'raw':!![]})[_0x537a('0x28')](function(_0x20afe9){if(_0x20afe9){return db['UserProfileSection'][_0x537a('0x29')]({'where':{'userProfileId':_0x4b6cfa[_0x537a('0x4b')]['id'],'id':_[_0x537a('0x30')](_0x20afe9,function(_0x15f6d0){return _0x15f6d0['id'];})},'transaction':_0x331e8c});}})[_0x537a('0x28')](function(_0x27a09e){var _0x239a92=_[_0x537a('0x30')](_0x4b6cfa[_0x537a('0x52')],function(_0x15cb74){_0x15cb74[_0x537a('0x5a')]=_0x4b6cfa['params']['id'];return _0x15cb74;});return db['UserProfileSection'][_0x537a('0x6d')](_0x239a92,{'raw':!![],'transaction':_0x331e8c});})['then'](function(_0x12e212){var _0x11971b=_[_0x537a('0x42')](_[_0x537a('0x30')](_0x12e212,function(_0x312bb5){return _0x312bb5[_0x537a('0x4e')]({'plain':!![]});}),{'includeAll':![]});if(_0x11971b){return db[_0x537a('0x56')][_0x537a('0x48')]({'where':{'userProfileId':_0x4b6cfa[_0x537a('0x4b')]['id'],'sectionId':_[_0x537a('0x30')](_0x11971b,function(_0x845c76){return _0x845c76[_0x537a('0x59')];})},'attributes':['id',_0x537a('0x59')],'raw':!![]})['then'](function(_0x56a46c){var _0x26fb33=_[_0x537a('0x30')](_0x4b6cfa[_0x537a('0x52')],function(_0x25eb54){_0x25eb54[_0x537a('0x5a')]=_0x4b6cfa[_0x537a('0x4b')]['id'];return _0x25eb54;});return db[_0x537a('0x58')][_0x537a('0x6d')](_0x26fb33,{'raw':!![],'transaction':_0x331e8c});});}})[_0x537a('0x4d')](handleError(_0x339582,null));});}})[_0x537a('0x28')](function(_0x3650ff){var _0xe74d28=_[_0x537a('0x30')](_0x3650ff,function(_0x4c40a8){return _0x4c40a8[_0x537a('0x4e')]({'plain':!![]});});})['then'](respondWithResult(_0x339582,null))[_0x537a('0x4d')](handleError(_0x339582,null));};exports['removeResources']=function(_0x1f08c5,_0x202678,_0x785aad){return db[_0x537a('0x31')][_0x537a('0x5c')]({'where':{'id':_0x1f08c5[_0x537a('0x4b')]['id']}})[_0x537a('0x28')](handleEntityNotFound(_0x202678,null))[_0x537a('0x28')](function(_0x107376){if(_0x107376){return _0x107376[_0x537a('0x6e')](_0x1f08c5['query'][_0x537a('0x61')]);}})[_0x537a('0x28')](respondWithStatusCode(_0x202678,null))['catch'](handleError(_0x202678,null));};exports[_0x537a('0x6f')]=function(_0x3aac74,_0x437f78){var _0x3d3cda={};if(!_0x3aac74[_0x537a('0x36')][_0x537a('0x70')])throw new Error(_0x537a('0x71'));if(!_0x3aac74[_0x537a('0x36')][_0x537a('0x72')](_0x537a('0x3c'))){_0x3d3cda[_0x537a('0x21')]=qs[_0x537a('0x21')](_0x3aac74[_0x537a('0x36')][_0x537a('0x21')]);_0x3d3cda['offset']=qs[_0x537a('0x1f')](_0x3aac74['query'][_0x537a('0x1f')]);}return db['UserProfile'][_0x537a('0x5c')]({'where':{'id':_0x3aac74[_0x537a('0x4b')]['id']}})[_0x537a('0x28')](function(_0x10131d){if(!_0x10131d)throw new Error(_0x537a('0x73')+_0x3aac74[_0x537a('0x4b')]['id']);return db['UserProfile']['getResources'](_0x3aac74);})[_0x537a('0x28')](respondWithFilteredResult(_0x437f78,_0x3d3cda))[_0x537a('0x4d')](handleError(_0x437f78,null));}; \ No newline at end of file +var _0xa903=['Resources','UserProfileSection','update','addSections','destroy','sectionId','removeSections','ids','getSections','enabled','includes','subsections','push','findOne','Dashboard','forEach','resourceId','userProfileId','bulkCreate','removeResources','getResources','No\x20User\x20Profile\x20found\x20for\x20id\x20','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','path','sox','to-csv','ejs','fs-extra','lodash','squel','crypto','jsforce','desk.js','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','api','../../config/utils','../../config/environment','redis','defaults','socket.io-emitter','./userProfile.socket','status','end','json','limit','undefined','count','offset','apply','reject','save','then','sendStatus','error','stack','name','send','index','map','UserProfile','rawAttributes','fieldName','type','model','keys','query','attributes','fields','length','hasOwnProperty','nolimit','order','sort','where','pick','filter','merge','VIRTUAL','options','catch','show','filters','intersection','create','body','params','includeAll','include','find','get','omit','createdAt','updatedAt','crudPermissions','sequelize','transaction','findAll','each','autoAssociation','UserProfileResource'];(function(_0x5a99db,_0x1cece5){var _0x3aad62=function(_0x334cb7){while(--_0x334cb7){_0x5a99db['push'](_0x5a99db['shift']());}};_0x3aad62(++_0x1cece5);}(_0xa903,0x163));var _0x3a90=function(_0x5c4a29,_0x21b060){_0x5c4a29=_0x5c4a29-0x0;var _0x6e0cb9=_0xa903[_0x5c4a29];return _0x6e0cb9;};'use strict';var emlformat=require('eml-format');var rimraf=require(_0x3a90('0x0'));var zipdir=require(_0x3a90('0x1'));var jsonpatch=require(_0x3a90('0x2'));var rp=require(_0x3a90('0x3'));var moment=require(_0x3a90('0x4'));var BPromise=require(_0x3a90('0x5'));var Mustache=require(_0x3a90('0x6'));var util=require('util');var path=require(_0x3a90('0x7'));var sox=require(_0x3a90('0x8'));var csv=require(_0x3a90('0x9'));var ejs=require(_0x3a90('0xa'));var fs=require('fs');var fs_extra=require(_0x3a90('0xb'));var _=require(_0x3a90('0xc'));var squel=require(_0x3a90('0xd'));var crypto=require(_0x3a90('0xe'));var jsforce=require(_0x3a90('0xf'));var deskjs=require(_0x3a90('0x10'));var toCsv=require(_0x3a90('0x9'));var querystring=require(_0x3a90('0x11'));var Papa=require(_0x3a90('0x12'));var Redis=require(_0x3a90('0x13'));var authService=require(_0x3a90('0x14'));var qs=require(_0x3a90('0x15'));var as=require(_0x3a90('0x16'));var hardwareService=require('../../config/license/hardware');var logger=require('../../config/logger')(_0x3a90('0x17'));var utils=require(_0x3a90('0x18'));var config=require(_0x3a90('0x19'));var licenseUtil=require('../../config/license/util');var db=require('../../mysqldb')['db'];config[_0x3a90('0x1a')]=_[_0x3a90('0x1b')](config['redis'],{'host':'localhost','port':0x18eb});var socket=require(_0x3a90('0x1c'))(new Redis(config['redis']));require(_0x3a90('0x1d'))['register'](socket);function respondWithStatusCode(_0x59638f,_0x143f33){_0x143f33=_0x143f33||0xcc;return function(_0x12a8f6){if(_0x12a8f6){return _0x59638f['sendStatus'](_0x143f33);}return _0x59638f[_0x3a90('0x1e')](_0x143f33)[_0x3a90('0x1f')]();};}function respondWithResult(_0x111837,_0x389659){_0x389659=_0x389659||0xc8;return function(_0x1432ae){if(_0x1432ae){return _0x111837[_0x3a90('0x1e')](_0x389659)[_0x3a90('0x20')](_0x1432ae);}};}function respondWithFilteredResult(_0x5e86de,_0x27168f){return function(_0x57df6c){if(_0x57df6c){var _0x1d7383=typeof _0x27168f['offset']==='undefined'&&typeof _0x27168f[_0x3a90('0x21')]===_0x3a90('0x22');var _0x1137c9=_0x57df6c[_0x3a90('0x23')];var _0x4cd2d5=_0x1d7383?0x0:_0x27168f[_0x3a90('0x24')];var _0xb0aa62=_0x1d7383?_0x57df6c[_0x3a90('0x23')]:_0x27168f[_0x3a90('0x24')]+_0x27168f[_0x3a90('0x21')];var _0x43557e;if(_0xb0aa62>=_0x1137c9){_0xb0aa62=_0x1137c9;_0x43557e=0xc8;}else{_0x43557e=0xce;}_0x5e86de[_0x3a90('0x1e')](_0x43557e);return _0x5e86de['set']('Content-Range',_0x4cd2d5+'-'+_0xb0aa62+'/'+_0x1137c9)[_0x3a90('0x20')](_0x57df6c);}return null;};}function patchUpdates(_0x4ba76b){return function(_0x263f58){try{jsonpatch[_0x3a90('0x25')](_0x263f58,_0x4ba76b,!![]);}catch(_0x423185){return BPromise[_0x3a90('0x26')](_0x423185);}return _0x263f58[_0x3a90('0x27')]();};}function saveUpdates(_0x3f3275,_0x240ced){return function(_0x522d95){if(_0x522d95){return _0x522d95['update'](_0x3f3275)[_0x3a90('0x28')](function(_0x406a84){return _0x406a84;});}return null;};}function removeEntity(_0x34ad00,_0x4dcaf9){return function(_0x3ae64b){if(_0x3ae64b){return _0x3ae64b['destroy']()[_0x3a90('0x28')](function(){_0x34ad00['status'](0xcc)[_0x3a90('0x1f')]();});}};}function handleEntityNotFound(_0x4065e2,_0x279c84){return function(_0x1ed47d){if(!_0x1ed47d){_0x4065e2[_0x3a90('0x29')](0x194);}return _0x1ed47d;};}function handleError(_0x7f758d,_0x1a3cb3){_0x1a3cb3=_0x1a3cb3||0x1f4;return function(_0x83667){logger[_0x3a90('0x2a')](_0x83667[_0x3a90('0x2b')]);if(_0x83667['name']){delete _0x83667[_0x3a90('0x2c')];}_0x7f758d[_0x3a90('0x1e')](_0x1a3cb3)[_0x3a90('0x2d')](_0x83667);};}exports[_0x3a90('0x2e')]=function(_0x3460f0,_0x1483a8){var _0x226731={},_0x167f97={},_0x413c17={'count':0x0,'rows':[]};var _0x51810b=_[_0x3a90('0x2f')](db[_0x3a90('0x30')][_0x3a90('0x31')],function(_0x320bab){return{'name':_0x320bab[_0x3a90('0x32')],'type':_0x320bab[_0x3a90('0x33')]['key']};});_0x167f97[_0x3a90('0x34')]=_[_0x3a90('0x2f')](_0x51810b,_0x3a90('0x2c'));_0x167f97['query']=_[_0x3a90('0x35')](_0x3460f0[_0x3a90('0x36')]);_0x167f97['filters']=_['intersection'](_0x167f97[_0x3a90('0x34')],_0x167f97[_0x3a90('0x36')]);_0x226731[_0x3a90('0x37')]=_['intersection'](_0x167f97[_0x3a90('0x34')],qs[_0x3a90('0x38')](_0x3460f0[_0x3a90('0x36')][_0x3a90('0x38')]));_0x226731[_0x3a90('0x37')]=_0x226731[_0x3a90('0x37')][_0x3a90('0x39')]?_0x226731[_0x3a90('0x37')]:_0x167f97[_0x3a90('0x34')];if(!_0x3460f0['query'][_0x3a90('0x3a')](_0x3a90('0x3b'))){_0x226731[_0x3a90('0x21')]=qs['limit'](_0x3460f0[_0x3a90('0x36')][_0x3a90('0x21')]);_0x226731['offset']=qs['offset'](_0x3460f0[_0x3a90('0x36')][_0x3a90('0x24')]);}_0x226731[_0x3a90('0x3c')]=qs[_0x3a90('0x3d')](_0x3460f0['query'][_0x3a90('0x3d')]);_0x226731[_0x3a90('0x3e')]=qs['filters'](_[_0x3a90('0x3f')](_0x3460f0['query'],_0x167f97['filters']),_0x51810b);if(_0x3460f0[_0x3a90('0x36')][_0x3a90('0x40')]){_0x226731[_0x3a90('0x3e')]=_[_0x3a90('0x41')](_0x226731[_0x3a90('0x3e')],{'$or':_[_0x3a90('0x2f')](_0x51810b,function(_0x40d21e){if(_0x40d21e[_0x3a90('0x33')]!==_0x3a90('0x42')){var _0x1db934={};_0x1db934[_0x40d21e[_0x3a90('0x2c')]]={'$like':'%'+_0x3460f0[_0x3a90('0x36')][_0x3a90('0x40')]+'%'};return _0x1db934;}})});}_0x226731=_[_0x3a90('0x41')]({},_0x226731,_0x3460f0[_0x3a90('0x43')]);var _0x2d8cd4={'where':_0x226731['where']};return db[_0x3a90('0x30')]['count'](_0x2d8cd4)[_0x3a90('0x28')](function(_0x38a980){_0x413c17[_0x3a90('0x23')]=_0x38a980;if(_0x3460f0[_0x3a90('0x36')]['includeAll']){_0x226731['include']=[{'all':!![]}];}return db[_0x3a90('0x30')]['findAll'](_0x226731);})[_0x3a90('0x28')](function(_0x5b56d6){_0x413c17['rows']=_0x5b56d6;return _0x413c17;})[_0x3a90('0x28')](respondWithFilteredResult(_0x1483a8,_0x226731))[_0x3a90('0x44')](handleError(_0x1483a8,null));};exports[_0x3a90('0x45')]=function(_0x426ebf,_0x3226b5){var _0x5aeb8b={'raw':![],'where':{'id':_0x426ebf['params']['id']}},_0x5c3a08={};_0x5c3a08[_0x3a90('0x34')]=_[_0x3a90('0x35')](db[_0x3a90('0x30')][_0x3a90('0x31')]);_0x5c3a08['query']=_[_0x3a90('0x35')](_0x426ebf[_0x3a90('0x36')]);_0x5c3a08[_0x3a90('0x46')]=_[_0x3a90('0x47')](_0x5c3a08[_0x3a90('0x34')],_0x5c3a08[_0x3a90('0x36')]);_0x5aeb8b[_0x3a90('0x37')]=_[_0x3a90('0x47')](_0x5c3a08['model'],qs[_0x3a90('0x38')](_0x426ebf['query'][_0x3a90('0x38')]));_0x5aeb8b[_0x3a90('0x37')]=_0x5aeb8b[_0x3a90('0x37')][_0x3a90('0x39')]?_0x5aeb8b[_0x3a90('0x37')]:_0x5c3a08[_0x3a90('0x34')];if(_0x426ebf[_0x3a90('0x36')]['includeAll']){_0x5aeb8b['include']=[{'all':!![]}];}_0x5aeb8b=_[_0x3a90('0x41')]({},_0x5aeb8b,_0x426ebf['options']);return db[_0x3a90('0x30')]['find'](_0x5aeb8b)[_0x3a90('0x28')](handleEntityNotFound(_0x3226b5,null))[_0x3a90('0x28')](respondWithResult(_0x3226b5,null))['catch'](handleError(_0x3226b5,null));};exports[_0x3a90('0x48')]=function(_0x44c2d6,_0x416e1d){return db[_0x3a90('0x30')][_0x3a90('0x48')](_0x44c2d6[_0x3a90('0x49')],{})[_0x3a90('0x28')](respondWithResult(_0x416e1d,0xc9))[_0x3a90('0x44')](handleError(_0x416e1d,null));};exports['clone']=function(_0x46565e,_0x49bfa0){var _0x49b953={'where':{'id':_0x46565e[_0x3a90('0x4a')]['id']}},_0x4224ca={};_0x4224ca[_0x3a90('0x34')]=_['keys'](db[_0x3a90('0x30')][_0x3a90('0x31')]);_0x49b953['attributes']=_[_0x3a90('0x47')](_0x4224ca[_0x3a90('0x34')],qs[_0x3a90('0x38')](_0x46565e[_0x3a90('0x36')]['fields']));_0x49b953[_0x3a90('0x37')]=_0x49b953[_0x3a90('0x37')][_0x3a90('0x39')]?_0x49b953['attributes']:_0x4224ca[_0x3a90('0x34')];if(_0x46565e[_0x3a90('0x36')][_0x3a90('0x4b')]){_0x49b953[_0x3a90('0x4c')]=[{'all':!![]}];}_0x49b953=_[_0x3a90('0x41')]({},_0x49b953,_0x46565e[_0x3a90('0x43')]);return db[_0x3a90('0x30')][_0x3a90('0x4d')](_0x49b953)[_0x3a90('0x28')](handleEntityNotFound(_0x49bfa0,null))[_0x3a90('0x28')](function(_0x1f2c57){if(_0x1f2c57){var _0x37c203=_0x1f2c57[_0x3a90('0x4e')]({'plain':!![]});_0x37c203=qs[_0x3a90('0x4f')](_0x37c203,['id',_0x3a90('0x50'),_0x3a90('0x51'),_0x3a90('0x52')]);_0x46565e[_0x3a90('0x49')]=_[_0x3a90('0x4f')](_0x46565e[_0x3a90('0x49')],['id',_0x3a90('0x50'),_0x3a90('0x51')]);return db[_0x3a90('0x53')][_0x3a90('0x54')](function(_0x4e0c06){return db['UserProfile']['create'](_[_0x3a90('0x41')](_0x37c203,_0x46565e[_0x3a90('0x49')]),{'include':_0x46565e[_0x3a90('0x36')][_0x3a90('0x4b')]?[{'all':!![]}]:undefined,'transaction':_0x4e0c06})[_0x3a90('0x28')](function(_0x5f1cdb){var _0x3c9a40=_0x5f1cdb[_0x3a90('0x4e')]({'plain':!![]});return db['UserProfileSection'][_0x3a90('0x55')]({'where':{'userProfileId':_0x46565e[_0x3a90('0x4a')]['id']},'raw':!![]})[_0x3a90('0x28')](function(_0x5e3d08){if(_0x5e3d08){return BPromise[_0x3a90('0x56')](_0x5e3d08,function(_0xcafba5){return new BPromise(function(_0x5a296d,_0x378f3f){if(_0xcafba5[_0x3a90('0x57')]===null||_0xcafba5[_0x3a90('0x57')]===0x1)_0x5a296d(null);return db[_0x3a90('0x58')][_0x3a90('0x55')]({'where':{'sectionId':_0xcafba5['id']},'raw':!![]})[_0x3a90('0x28')](function(_0x297b15){var _0x1e4575=_[_0x3a90('0x2f')](_0x297b15,function(_0x3fd0de){return qs[_0x3a90('0x4f')](_0x3fd0de,['id','createdAt',_0x3a90('0x51'),'sectionId']);});_0x5a296d(_0x1e4575);})['catch'](function(_0x2a978d){_0x378f3f(_0x2a978d);});})['then'](function(_0x54b76b){var _0x288db4=qs['omit'](_0xcafba5,['id',_0x3a90('0x50'),_0x3a90('0x51')]);_0x288db4['userProfileId']=_0x3c9a40['id'];if(_0x54b76b)_0x288db4[_0x3a90('0x59')]=_0x54b76b;return _0x288db4;})[_0x3a90('0x28')](function(_0x2d70ae){return db[_0x3a90('0x5a')][_0x3a90('0x48')](_0x2d70ae,{'include':[{'model':db[_0x3a90('0x58')],'as':'Resources'}],'raw':!![],'transaction':_0x4e0c06});});})[_0x3a90('0x28')](function(){return _0x3c9a40;});}});});});}})[_0x3a90('0x28')](respondWithResult(_0x49bfa0,0xc9))[_0x3a90('0x44')](handleError(_0x49bfa0,null));};exports[_0x3a90('0x5b')]=function(_0x4ef8c1,_0x43c0c0){if(_0x4ef8c1[_0x3a90('0x49')]['id']){delete _0x4ef8c1[_0x3a90('0x49')]['id'];}return db[_0x3a90('0x30')][_0x3a90('0x4d')]({'where':{'id':_0x4ef8c1[_0x3a90('0x4a')]['id']}})[_0x3a90('0x28')](handleEntityNotFound(_0x43c0c0,null))['then'](saveUpdates(_0x4ef8c1['body'],null))['then'](respondWithResult(_0x43c0c0,null))[_0x3a90('0x44')](handleError(_0x43c0c0,null));};exports['destroy']=function(_0x962875,_0x48ab2d){return db[_0x3a90('0x30')][_0x3a90('0x4d')]({'where':{'id':_0x962875[_0x3a90('0x4a')]['id']}})[_0x3a90('0x28')](handleEntityNotFound(_0x48ab2d,null))[_0x3a90('0x28')](removeEntity(_0x48ab2d,null))[_0x3a90('0x44')](handleError(_0x48ab2d,null));};exports['describe']=function(_0x581a2f,_0x5ed44d){return db[_0x3a90('0x30')]['describe']()[_0x3a90('0x28')](respondWithResult(_0x5ed44d,null))[_0x3a90('0x44')](handleError(_0x5ed44d,null));};exports[_0x3a90('0x5c')]=function(_0x180ea7,_0x2b1d42){var _0x3a8c82=_0x180ea7[_0x3a90('0x49')];return db[_0x3a90('0x30')][_0x3a90('0x4d')]({'where':{'id':_0x180ea7[_0x3a90('0x4a')]['id']}})[_0x3a90('0x28')](handleEntityNotFound(_0x2b1d42,null))[_0x3a90('0x28')](function(_0x6f368){if(_0x6f368){return db[_0x3a90('0x53')][_0x3a90('0x54')](function(_0x4a46bf){return db[_0x3a90('0x5a')][_0x3a90('0x5d')]({'where':{'userProfileId':_0x180ea7[_0x3a90('0x4a')]['id'],'sectionId':_[_0x3a90('0x2f')](_0x3a8c82,function(_0x44adf3){return _0x44adf3[_0x3a90('0x5e')];})},'transaction':_0x4a46bf})[_0x3a90('0x28')](function(){var _0x50cb11=_['map'](_0x3a8c82,function(_0x15fb65){_0x15fb65['userProfileId']=_0x180ea7[_0x3a90('0x4a')]['id'];return _0x15fb65;});var _0x3d8690=[];return BPromise['each'](_0x50cb11,function(_0xa733ae){return db[_0x3a90('0x5a')][_0x3a90('0x48')](_0xa733ae,{'include':[{'model':db[_0x3a90('0x58')],'as':_0x3a90('0x59')}],'raw':!![],'transaction':_0x4a46bf})['then'](function(_0x5d010a){_0x3d8690['push'](_0x5d010a[_0x3a90('0x4e')]({'plain':!![]}));});})['then'](function(){return _0x3d8690;});});});}})[_0x3a90('0x28')](function(_0x55bc1d){return _0x55bc1d;})['then'](respondWithResult(_0x2b1d42,null))['catch'](handleError(_0x2b1d42,null));};exports[_0x3a90('0x5f')]=function(_0xb8c78d,_0x95397e){var _0x5f0934;return db[_0x3a90('0x30')][_0x3a90('0x4d')]({'where':{'id':_0xb8c78d[_0x3a90('0x4a')]['id']},'attributes':['id',_0x3a90('0x2c')]})[_0x3a90('0x28')](handleEntityNotFound(_0x95397e,null))[_0x3a90('0x28')](function(_0xab700c){if(_0xab700c){_0x5f0934=_0xab700c;return db[_0x3a90('0x5a')][_0x3a90('0x5d')]({'where':{'userProfileId':_0xb8c78d[_0x3a90('0x4a')]['id'],'sectionId':_0xb8c78d['query'][_0x3a90('0x60')]}});}})[_0x3a90('0x28')](function(){return _0x5f0934;})['then'](respondWithStatusCode(_0x95397e,null))[_0x3a90('0x44')](handleError(_0x95397e,null));};exports[_0x3a90('0x61')]=function(_0x3bd20f,_0x51c89a){var _0x4f66b7=[];var _0x435434=[];return db[_0x3a90('0x5a')]['findAll']({'where':{'userProfileId':_0x3bd20f[_0x3a90('0x4a')]['id']},'raw':!![]})['then'](function(_0x310cc2){_0x4f66b7=_[_0x3a90('0x40')](_0x310cc2,function(_0x4bea60){return _0x4bea60[_0x3a90('0x62')]===0x1||_[_0x3a90('0x63')]([0x3eb,0x709],_0x4bea60['sectionId']);});if(!_['isEmpty'](_0x4f66b7)){return _['map'](_0x4f66b7,function(_0x3220ee){return _0x3220ee['sectionId'];});}else{return;}})[_0x3a90('0x28')](function(_0x3c1dc4){if(_0x3c1dc4)_0x435434=_0x3c1dc4;if(_[_0x3a90('0x63')](_0x435434,0x64)){var _0x29895c=_['find'](_0x4f66b7,{'sectionId':0x64});return hasDefaultDashboard(_0x29895c)['then'](function(_0x4dbb87){return _[_0x3a90('0x2f')](_0x4f66b7,function(_0x1be94f){if(_0x1be94f[_0x3a90('0x5e')]===0x64){_0x1be94f['subsections']=_0x4dbb87;}return _0x1be94f;});});}else{return;}})[_0x3a90('0x28')](function(_0x4046a1){if(_0x4046a1)_0x4f66b7=_0x4046a1;if(_['includes'](_0x435434,0x3eb)){var _0x26bac1=_['find'](_0x4f66b7,{'sectionId':0x3eb});return getCustomDashboards(_0x26bac1)[_0x3a90('0x28')](function(_0x305e3b){return _[_0x3a90('0x2f')](_0x4f66b7,function(_0x327760){if(_0x26bac1[_0x3a90('0x62')]){if(_0x327760['sectionId']===0x3eb){_0x327760[_0x3a90('0x64')]=_0x305e3b;}}else{if(_0x327760['sectionId']===0x64){if(!_0x327760['subsections']){_0x327760[_0x3a90('0x64')]=[];}_0x327760[_0x3a90('0x64')]=_0x327760[_0x3a90('0x64')]['concat'](_0x305e3b);}}return _0x327760;});});}else{return;}})[_0x3a90('0x28')](function(_0x3277d7){if(_0x3277d7)_0x4f66b7=_0x3277d7;if(_[_0x3a90('0x63')](_0x435434,0x709)){var _0x282c1f=_['find'](_0x4f66b7,{'sectionId':0x709});return getPlugins(_0x282c1f)[_0x3a90('0x28')](function(_0x95def1){if(_0x282c1f[_0x3a90('0x62')]){return _[_0x3a90('0x2f')](_0x4f66b7,function(_0x24f00b){if(_0x24f00b[_0x3a90('0x5e')]===0x709){_0x24f00b[_0x3a90('0x64')]=_0x95def1;}return _0x24f00b;});}else{var _0x1260ac={'sectionId':0x76c,'enabled':0x1,'subsections':_0x95def1};var _0x30a447=_['map'](_0x4f66b7);_0x30a447[_0x3a90('0x65')](_0x1260ac);return _0x30a447;}});}else{return;}})[_0x3a90('0x28')](function(_0x503485){if(_0x503485)_0x4f66b7=_0x503485;return _[_0x3a90('0x40')](_0x4f66b7,['enabled',0x1]);})[_0x3a90('0x28')](respondWithResult(_0x51c89a,null))['catch'](handleError(_0x51c89a,null));};function hasDefaultDashboard(_0x43c731){var _0x54d395=[0x65];return new BPromise(function(_0xd7f24e,_0x3387c6){try{if(_0x43c731['autoAssociation']){_0xd7f24e(_0x54d395);}else{return db[_0x3a90('0x58')][_0x3a90('0x66')]({'where':{'sectionId':_0x43c731['id']},'raw':!![]})[_0x3a90('0x28')](function(_0x5b668c){_0x5b668c?_0xd7f24e(_0x54d395):_0xd7f24e();});}}catch(_0x3c556c){_0x3387c6(_0x3c556c);}});}function getCustomDashboards(_0x3e8da5){var _0xa722af=[];return new BPromise(function(_0x4842f2,_0x324311){try{if(_0x3e8da5[_0x3a90('0x57')]){return db[_0x3a90('0x67')][_0x3a90('0x55')]({'raw':!![]})[_0x3a90('0x28')](function(_0x54af12){_0x54af12['forEach'](function(_0x369d64){_0xa722af[_0x3a90('0x65')](_0x369d64['id']+0x1869f);});_0x4842f2(_0xa722af);});}else{return db[_0x3a90('0x58')][_0x3a90('0x55')]({'where':{'sectionId':_0x3e8da5['id']},'raw':!![]})[_0x3a90('0x28')](function(_0xdf4f35){_0xdf4f35['forEach'](function(_0x4b789f){_0xa722af['push'](_0x4b789f['resourceId']+0x1869f);});_0x4842f2(_0xa722af);});}}catch(_0xb115fe){_0x324311(_0xb115fe);}});}function getPlugins(_0x595072){var _0x4e101f=[];return new BPromise(function(_0x4fb735,_0x38fb50){try{if(_0x595072[_0x3a90('0x57')]){return db['Plugin'][_0x3a90('0x55')]({'raw':!![]})['then'](function(_0x660dc4){_0x660dc4[_0x3a90('0x68')](function(_0x19ef50){_0x4e101f['push'](_0x19ef50['id']+0x15b38);});_0x4fb735(_0x4e101f);});}else{return db[_0x3a90('0x58')][_0x3a90('0x55')]({'where':{'sectionId':_0x595072['id']},'raw':!![]})[_0x3a90('0x28')](function(_0x33a2d5){_0x33a2d5[_0x3a90('0x68')](function(_0x274396){_0x4e101f[_0x3a90('0x65')](_0x274396[_0x3a90('0x69')]+0x15b38);});_0x4fb735(_0x4e101f);});}}catch(_0x50338d){_0x38fb50(_0x50338d);}});}exports['addResources']=function(_0x44031e,_0x6f4f87){return db[_0x3a90('0x30')]['find']({'where':{'id':_0x44031e[_0x3a90('0x4a')]['id']}})['then'](handleEntityNotFound(_0x6f4f87,null))[_0x3a90('0x28')](function(_0x29c268){if(_0x29c268){return db['sequelize'][_0x3a90('0x54')](function(_0x5d60a9){return db[_0x3a90('0x5a')][_0x3a90('0x55')]({'where':{'userProfileId':_0x44031e[_0x3a90('0x4a')]['id']},'attributes':['id'],'raw':!![]})[_0x3a90('0x28')](function(_0x7ab37f){if(_0x7ab37f){return db[_0x3a90('0x5a')][_0x3a90('0x5d')]({'where':{'userProfileId':_0x44031e[_0x3a90('0x4a')]['id'],'id':_[_0x3a90('0x2f')](_0x7ab37f,function(_0x37c81d){return _0x37c81d['id'];})},'transaction':_0x5d60a9});}})['then'](function(_0x3d61a7){var _0x304024=_['map'](_0x44031e['body'],function(_0xcbd271){_0xcbd271['userProfileId']=_0x44031e[_0x3a90('0x4a')]['id'];return _0xcbd271;});return db[_0x3a90('0x5a')]['bulkCreate'](_0x304024,{'raw':!![],'transaction':_0x5d60a9});})[_0x3a90('0x28')](function(_0x4a2e73){var _0xf7ea3=_[_0x3a90('0x40')](_[_0x3a90('0x2f')](_0x4a2e73,function(_0x529052){return _0x529052[_0x3a90('0x4e')]({'plain':!![]});}),{'includeAll':![]});if(_0xf7ea3){return db['UserProfileSection'][_0x3a90('0x55')]({'where':{'userProfileId':_0x44031e['params']['id'],'sectionId':_[_0x3a90('0x2f')](_0xf7ea3,function(_0x1932ee){return _0x1932ee[_0x3a90('0x5e')];})},'attributes':['id',_0x3a90('0x5e')],'raw':!![]})[_0x3a90('0x28')](function(_0x41bc0c){var _0x23f704=_[_0x3a90('0x2f')](_0x44031e[_0x3a90('0x49')],function(_0x35e621){_0x35e621[_0x3a90('0x6a')]=_0x44031e[_0x3a90('0x4a')]['id'];return _0x35e621;});return db[_0x3a90('0x58')][_0x3a90('0x6b')](_0x23f704,{'raw':!![],'transaction':_0x5d60a9});});}})[_0x3a90('0x44')](handleError(_0x6f4f87,null));});}})[_0x3a90('0x28')](function(_0x515553){var _0x3c1c08=_[_0x3a90('0x2f')](_0x515553,function(_0x23a9ee){return _0x23a9ee['get']({'plain':!![]});});})[_0x3a90('0x28')](respondWithResult(_0x6f4f87,null))[_0x3a90('0x44')](handleError(_0x6f4f87,null));};exports['removeResources']=function(_0x14305d,_0xd0c038,_0x33421e){return db[_0x3a90('0x30')][_0x3a90('0x4d')]({'where':{'id':_0x14305d[_0x3a90('0x4a')]['id']}})[_0x3a90('0x28')](handleEntityNotFound(_0xd0c038,null))[_0x3a90('0x28')](function(_0x4a857d){if(_0x4a857d){return _0x4a857d[_0x3a90('0x6c')](_0x14305d[_0x3a90('0x36')][_0x3a90('0x60')]);}})[_0x3a90('0x28')](respondWithStatusCode(_0xd0c038,null))[_0x3a90('0x44')](handleError(_0xd0c038,null));};exports[_0x3a90('0x6d')]=function(_0x44d306,_0x238c24){var _0x510127={};if(!_0x44d306['query']['section'])throw new Error('Missing\x20section\x20parameter');if(!_0x44d306[_0x3a90('0x36')]['hasOwnProperty']('nolimit')){_0x510127[_0x3a90('0x21')]=qs[_0x3a90('0x21')](_0x44d306[_0x3a90('0x36')]['limit']);_0x510127[_0x3a90('0x24')]=qs[_0x3a90('0x24')](_0x44d306['query'][_0x3a90('0x24')]);}return db[_0x3a90('0x30')][_0x3a90('0x4d')]({'where':{'id':_0x44d306[_0x3a90('0x4a')]['id']}})[_0x3a90('0x28')](function(_0x3625ab){if(!_0x3625ab)throw new Error(_0x3a90('0x6e')+_0x44d306[_0x3a90('0x4a')]['id']);return db[_0x3a90('0x30')][_0x3a90('0x6d')](_0x44d306);})[_0x3a90('0x28')](respondWithFilteredResult(_0x238c24,_0x510127))[_0x3a90('0x44')](handleError(_0x238c24,null));}; \ No newline at end of file diff --git a/server/api/userProfile/userProfile.events.js b/server/api/userProfile/userProfile.events.js index 489dfc6..678c962 100644 --- a/server/api/userProfile/userProfile.events.js +++ b/server/api/userProfile/userProfile.events.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x444e=['exports','events','UserProfile','save','remove','emit','hasOwnProperty'];(function(_0x55f4ff,_0x29226e){var _0x25c7e4=function(_0xfb58ff){while(--_0xfb58ff){_0x55f4ff['push'](_0x55f4ff['shift']());}};_0x25c7e4(++_0x29226e);}(_0x444e,0xe8));var _0xe444=function(_0xe0b6c7,_0x3e366f){_0xe0b6c7=_0xe0b6c7-0x0;var _0x4543ec=_0x444e[_0xe0b6c7];return _0x4543ec;};'use strict';var EventEmitter=require(_0xe444('0x0'));var UserProfile=require('../../mysqldb')['db'][_0xe444('0x1')];var UserProfileEvents=new EventEmitter();UserProfileEvents['setMaxListeners'](0x0);var events={'afterCreate':_0xe444('0x2'),'afterUpdate':'update','afterDestroy':_0xe444('0x3')};function emitEvent(_0x4e248d){return function(_0xd7b634,_0x389c5b,_0x91763c){UserProfileEvents[_0xe444('0x4')](_0x4e248d+':'+_0xd7b634['id'],_0xd7b634);UserProfileEvents[_0xe444('0x4')](_0x4e248d,_0xd7b634);_0x91763c(null);};}for(var e in events){if(events[_0xe444('0x5')](e)){var event=events[e];UserProfile['hook'](e,emitEvent(event));}}module[_0xe444('0x6')]=UserProfileEvents; \ No newline at end of file +var _0x398a=['hook','exports','events','../../mysqldb','UserProfile','setMaxListeners','save','update','emit','hasOwnProperty'];(function(_0x1341a6,_0x23816a){var _0x37658e=function(_0xbe0a4d){while(--_0xbe0a4d){_0x1341a6['push'](_0x1341a6['shift']());}};_0x37658e(++_0x23816a);}(_0x398a,0x11a));var _0xa398=function(_0x42e216,_0x3d9f5e){_0x42e216=_0x42e216-0x0;var _0x44a84f=_0x398a[_0x42e216];return _0x44a84f;};'use strict';var EventEmitter=require(_0xa398('0x0'));var UserProfile=require(_0xa398('0x1'))['db'][_0xa398('0x2')];var UserProfileEvents=new EventEmitter();UserProfileEvents[_0xa398('0x3')](0x0);var events={'afterCreate':_0xa398('0x4'),'afterUpdate':_0xa398('0x5'),'afterDestroy':'remove'};function emitEvent(_0x538105){return function(_0x51a35c,_0x29c575,_0x3d14ae){UserProfileEvents[_0xa398('0x6')](_0x538105+':'+_0x51a35c['id'],_0x51a35c);UserProfileEvents[_0xa398('0x6')](_0x538105,_0x51a35c);_0x3d14ae(null);};}for(var e in events){if(events[_0xa398('0x7')](e)){var event=events[e];UserProfile[_0xa398('0x8')](e,emitEvent(event));}}module[_0xa398('0x9')]=UserProfileEvents; \ No newline at end of file diff --git a/server/api/userProfile/userProfile.model.js b/server/api/userProfile/userProfile.model.js index 2268723..3ca53f8 100644 --- a/server/api/userProfile/userProfile.model.js +++ b/server/api/userProfile/userProfile.model.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x7eff=['true','chat','dataValues','sms','fax','mail','openchannel','whatsapp','lodash','./userProfile.attributes','../../components/parsers/qs','squel','exports','models','filter','field','then','associatedResources','map','catch','value','model','findAll','name','resolve','UserProfileResource','resourceId','type','toLowerCase','squareprojects','childModel','odbc','SquareOdbc','squarerecordings','SquareRecording','SquareProjects','projects','JscriptyProject','contacts','CmContact','ListId','lists','CmList','CmCompany','CmCustomField','chatqueues','ChatQueue','chatwebsites','faxqueues','FaxQueue','faxaccounts','FaxAccount','inboundroutes','outboundroutes','VoiceExtension','contexts','VoiceContext','voicemails','voicerecordings','VoiceRecording','Agents','membername','role','Telephones','User','VoiceQueues','queue','VoiceQueue','inbound','outbound','musiconholds','VoiceMusicOnHold','voiceprefixes','VoicePrefix','ivrcampaigns','Campaign','mailqueues','mailaccounts','MailAccount','mailsubstatuses','MailSubstatus','OpenchannelQueue','openchannelaccounts','OpenchannelAccount','smsqueues','SmsQueue','smsaccounts','whatsappqueues','WhatsappQueue','whatsappaccounts','WhatsappAccount','teams','voicequeues','parentSections','users','telephones','Users','admin','user','zendeskaccounts','ZendeskAccount','salesforceaccounts','SalesforceAccount','FreshdeskAccount','sugarcrmaccounts','SugarcrmAccount','deskaccounts','DeskAccount','zohoaccounts','ZohoAccount','vtigeraccounts','cannedanswers','CannedAnswer','dispositions','Disposition','Dashboard','pauses','scheduler','Schedule','Sound','tags','Tag','templates','Template','triggers','trunks','Trunk','variables','Variable','plugins','extractedreports','AnalyticExtractedReport','Reports','reportId','metrics','AnalyticMetric','charAt','toUpperCase','slice','QueryTypes','SELECT','select','ui.','ui.createdAt','from','user_has_','_interactions','where','ui.UserId\x20=\x20?','query','toString','OpenTabs','define','UserProfile','user_profiles','raw','section','mergeResources','Invalid\x20section\x20\x27','isEmpty','push','UserProfileSection','ignore','union','length','all','rawAttributes','keys','filters','intersection','fields','attributes','hasOwnProperty','limit','offset','order','sort','merge','key','foreignKey','find','forEach','options','autoAssociation','includeAll','include','default','DefaultReports','custom','count','rows','ids','color','tag','ThroughTags','openTabs'];(function(_0x437606,_0x3c0490){var _0x3af77e=function(_0x117d08){while(--_0x117d08){_0x437606['push'](_0x437606['shift']());}};_0x3af77e(++_0x3c0490);}(_0x7eff,0xcc));var _0xf7ef=function(_0x321bb2,_0x202794){_0x321bb2=_0x321bb2-0x0;var _0x9c12ed=_0x7eff[_0x321bb2];return _0x9c12ed;};'use strict';var _=require(_0xf7ef('0x0'));var attributes=require(_0xf7ef('0x1'));var qs=require(_0xf7ef('0x2'));var squel=require(_0xf7ef('0x3'));module[_0xf7ef('0x4')]=function(_0x529efa){var _0x53845f=_0x529efa[_0xf7ef('0x5')];function _0x45c215(_0x339dcc,_0x51f089){return new Promise(function(_0x8b821,_0x3ad735){if(!_0x51f089)return _0x8b821(null);var _0x19bde3=_0x51f089['filter']?{[_0x51f089[_0xf7ef('0x6')][_0xf7ef('0x7')]]:_0x51f089[_0xf7ef('0x6')]['value']}:undefined;return _0x53845f[_0x339dcc]['findAll']({'where':_0x19bde3,'raw':!![]})[_0xf7ef('0x8')](function(_0x104204){_0x51f089[_0xf7ef('0x9')]=_[_0xf7ef('0xa')](_0x104204,'id');_0x8b821(_0x51f089);})[_0xf7ef('0xb')](function(_0x377aeb){_0x3ad735(_0x377aeb);});});}function _0x1ee34a(_0x54fe1d,_0x5cfdd2){return new Promise(function(_0x54fa3b,_0x3db087){var _0x15559d=_0x54fe1d['filter']?{[_0x54fe1d[_0xf7ef('0x6')][_0xf7ef('0x7')]]:_0x54fe1d[_0xf7ef('0x6')][_0xf7ef('0xc')]}:undefined;return _0x53845f[_0x54fe1d[_0xf7ef('0xd')]][_0xf7ef('0xe')]({'where':_0x15559d,'raw':!![]})['then'](function(_0x8e4f67){_0x5cfdd2[_0xf7ef('0x9')]=_['map'](_0x8e4f67,function(_0x480d1d){return _0x480d1d[_0xf7ef('0xf')];});_0x54fa3b(_0x5cfdd2);})[_0xf7ef('0xb')](function(_0x4ed23b){_0x3db087(_0x4ed23b);});});}function _0x537001(_0x5bb0c1,_0x41d8cf,_0x59ccf1){if(!_0x41d8cf)return Promise[_0xf7ef('0x10')](null);return new Promise(function(_0xdd976a,_0x536776){return _0x53845f[_0xf7ef('0x11')][_0xf7ef('0xe')]({'where':{'sectionId':_0x41d8cf['id']},'raw':!![]})[_0xf7ef('0x8')](function(_0x287aa2){if(_0x5bb0c1[_0xf7ef('0x7')]&&_0x5bb0c1[_0xf7ef('0x7')]!=='id'){_0x41d8cf[_0xf7ef('0x9')]=_[_0xf7ef('0xa')](_0x287aa2,function(_0x4b2210){return _0x4b2210[_0x5bb0c1[_0xf7ef('0x7')]];});}else{if(_0x59ccf1==='AnalyticExtractedReport'){_0x41d8cf[_0xf7ef('0x9')]=_[_0xf7ef('0xa')](_0x287aa2,function(_0x171232){return{'id':_0x171232[_0xf7ef('0x12')],'type':_0x171232[_0xf7ef('0x13')]};});}else{_0x41d8cf[_0xf7ef('0x9')]=_['map'](_0x287aa2,function(_0xed97c4){return _0xed97c4['resourceId'];});}}_0xdd976a(_0x41d8cf);})[_0xf7ef('0xb')](function(_0x431e43){_0x536776(_0x431e43);});});}function _0x5ddd23(_0x56ddcf,_0x502351){var _0x32db93={'parentSections':[]};switch(_0x56ddcf[_0xf7ef('0x14')]()){case _0xf7ef('0x15'):_0x32db93[_0xf7ef('0x16')]='SquareProject';break;case _0xf7ef('0x17'):_0x32db93[_0xf7ef('0x16')]=_0xf7ef('0x18');break;case _0xf7ef('0x19'):_0x32db93['childModel']=_0xf7ef('0x1a');_0x32db93['parentSections']=[{'name':_0xf7ef('0x1b'),'field':_0xf7ef('0xf'),'foreignKey':'projectName'}];break;case _0xf7ef('0x1c'):_0x32db93[_0xf7ef('0x16')]=_0xf7ef('0x1d');break;case _0xf7ef('0x1e'):_0x32db93['childModel']=_0xf7ef('0x1f');_0x32db93['parentSections']=[{'name':'Lists','field':'id','foreignKey':_0xf7ef('0x20')}];break;case _0xf7ef('0x21'):_0x32db93[_0xf7ef('0x16')]=_0xf7ef('0x22');break;case'companies':_0x32db93[_0xf7ef('0x16')]=_0xf7ef('0x23');break;case'globalcustomfields':_0x32db93[_0xf7ef('0x16')]=_0xf7ef('0x24');break;case _0xf7ef('0x25'):_0x32db93[_0xf7ef('0x16')]=_0xf7ef('0x26');break;case _0xf7ef('0x27'):_0x32db93[_0xf7ef('0x16')]='ChatWebsite';break;case _0xf7ef('0x28'):_0x32db93[_0xf7ef('0x16')]=_0xf7ef('0x29');break;case _0xf7ef('0x2a'):_0x32db93['childModel']=_0xf7ef('0x2b');break;case _0xf7ef('0x2c'):case'internalroutes':case _0xf7ef('0x2d'):_0x32db93[_0xf7ef('0x16')]=_0xf7ef('0x2e');break;case _0xf7ef('0x2f'):_0x32db93[_0xf7ef('0x16')]=_0xf7ef('0x30');break;case _0xf7ef('0x31'):_0x32db93[_0xf7ef('0x16')]='VoiceMail';break;case _0xf7ef('0x32'):_0x32db93[_0xf7ef('0x16')]=_0xf7ef('0x33');_0x32db93['parentSections']=[{'name':_0xf7ef('0x34'),'field':_0xf7ef('0xf'),'foreignKey':_0xf7ef('0x35'),'model':'User','filter':{'field':_0xf7ef('0x36'),'value':['agent']}},{'name':_0xf7ef('0x37'),'field':'name','foreignKey':_0xf7ef('0x35'),'model':_0xf7ef('0x38'),'filter':{'field':_0xf7ef('0x36'),'value':['telephone']}},{'name':_0xf7ef('0x39'),'field':_0xf7ef('0xf'),'foreignKey':_0xf7ef('0x3a'),'model':_0xf7ef('0x3b'),'filter':{'field':_0xf7ef('0x13'),'value':[_0xf7ef('0x3c')]}},{'name':'QueueCampaigns','field':_0xf7ef('0xf'),'foreignKey':_0xf7ef('0x3a'),'model':_0xf7ef('0x3b'),'filter':{'field':_0xf7ef('0x13'),'value':[_0xf7ef('0x3d')]}}];break;case _0xf7ef('0x3e'):_0x32db93[_0xf7ef('0x16')]=_0xf7ef('0x3f');break;case'chanspies':_0x32db93[_0xf7ef('0x16')]='VoiceChanSpy';break;case _0xf7ef('0x40'):_0x32db93[_0xf7ef('0x16')]=_0xf7ef('0x41');break;case _0xf7ef('0x42'):_0x32db93['childModel']=_0xf7ef('0x43');break;case _0xf7ef('0x44'):_0x32db93[_0xf7ef('0x16')]='MailQueue';break;case _0xf7ef('0x45'):_0x32db93[_0xf7ef('0x16')]=_0xf7ef('0x46');break;case _0xf7ef('0x47'):_0x32db93[_0xf7ef('0x16')]=_0xf7ef('0x48');break;case'openchannelqueues':_0x32db93[_0xf7ef('0x16')]=_0xf7ef('0x49');break;case _0xf7ef('0x4a'):_0x32db93[_0xf7ef('0x16')]=_0xf7ef('0x4b');break;case _0xf7ef('0x4c'):_0x32db93['childModel']=_0xf7ef('0x4d');break;case _0xf7ef('0x4e'):_0x32db93[_0xf7ef('0x16')]='SmsAccount';break;case _0xf7ef('0x4f'):_0x32db93['childModel']=_0xf7ef('0x50');break;case _0xf7ef('0x51'):_0x32db93['childModel']=_0xf7ef('0x52');break;case _0xf7ef('0x53'):_0x32db93[_0xf7ef('0x16')]='Team';break;case _0xf7ef('0x54'):case'queuecampaigns':_0x32db93['childModel']=_0xf7ef('0x3b');if(_0x502351){_0x32db93[_0xf7ef('0x55')]=[{'name':_0xf7ef('0x39')},{'name':'QueueCampaigns'}];}break;case _0xf7ef('0x56'):case'agents':case _0xf7ef('0x57'):_0x32db93[_0xf7ef('0x16')]=_0xf7ef('0x38');if(_0x502351){_0x32db93[_0xf7ef('0x55')]=[{'name':_0xf7ef('0x58'),'filter':{'field':_0xf7ef('0x36'),'value':[_0xf7ef('0x59'),_0xf7ef('0x5a')]},'ignore':!![]},{'name':_0xf7ef('0x34')},{'name':_0xf7ef('0x37')}];}break;case _0xf7ef('0x5b'):_0x32db93['childModel']=_0xf7ef('0x5c');break;case _0xf7ef('0x5d'):_0x32db93['childModel']=_0xf7ef('0x5e');break;case'freshdeskaccounts':_0x32db93[_0xf7ef('0x16')]=_0xf7ef('0x5f');break;case _0xf7ef('0x60'):_0x32db93[_0xf7ef('0x16')]=_0xf7ef('0x61');break;case _0xf7ef('0x62'):_0x32db93['childModel']=_0xf7ef('0x63');break;case _0xf7ef('0x64'):_0x32db93['childModel']=_0xf7ef('0x65');break;case _0xf7ef('0x66'):_0x32db93[_0xf7ef('0x16')]=_0xf7ef('0x38');break;case _0xf7ef('0x67'):_0x32db93[_0xf7ef('0x16')]=_0xf7ef('0x68');break;case _0xf7ef('0x69'):_0x32db93[_0xf7ef('0x16')]=_0xf7ef('0x6a');break;case'customdashboards':_0x32db93[_0xf7ef('0x16')]=_0xf7ef('0x6b');break;case'intervals':_0x32db93[_0xf7ef('0x16')]='Interval';break;case _0xf7ef('0x6c'):_0x32db93[_0xf7ef('0x16')]='Pause';break;case _0xf7ef('0x6d'):_0x32db93['childModel']=_0xf7ef('0x6e');break;case'sounds':_0x32db93[_0xf7ef('0x16')]=_0xf7ef('0x6f');break;case _0xf7ef('0x70'):_0x32db93[_0xf7ef('0x16')]=_0xf7ef('0x71');break;case _0xf7ef('0x72'):_0x32db93[_0xf7ef('0x16')]=_0xf7ef('0x73');break;case _0xf7ef('0x74'):_0x32db93[_0xf7ef('0x16')]='Trigger';break;case _0xf7ef('0x75'):_0x32db93['childModel']=_0xf7ef('0x76');break;case _0xf7ef('0x77'):_0x32db93[_0xf7ef('0x16')]=_0xf7ef('0x78');break;case _0xf7ef('0x79'):_0x32db93[_0xf7ef('0x16')]='Plugin';break;case _0xf7ef('0x7a'):_0x32db93[_0xf7ef('0x16')]=_0xf7ef('0x7b');_0x32db93[_0xf7ef('0x55')]=[{'name':_0xf7ef('0x7c'),'field':'id','foreignKey':_0xf7ef('0x7d')}];break;case _0xf7ef('0x7e'):_0x32db93[_0xf7ef('0x16')]=_0xf7ef('0x7f');break;}return _0x32db93;}function _0x4d16ad(_0x540f7d,_0xeb6255){var _0x1aeb7c=_0x540f7d[_0xf7ef('0x80')](0x0)[_0xf7ef('0x81')]()+_0x540f7d[_0xf7ef('0x82')](0x1);var _0x667a3c={'type':_0x53845f['Sequelize'][_0xf7ef('0x83')][_0xf7ef('0x84')],'raw':!![]};return new Promise(function(_0x490bee,_0x4076c0){var _0x57022f=squel[_0xf7ef('0x85')]()[_0xf7ef('0x7')](_0xf7ef('0x86')+_0x1aeb7c+'InteractionId','id')[_0xf7ef('0x7')](_0xf7ef('0x87'))[_0xf7ef('0x88')](_0xf7ef('0x89')+_0x540f7d+_0xf7ef('0x8a'),'ui')[_0xf7ef('0x8b')](_0xf7ef('0x8c'),_0xeb6255['id']);return _0x53845f['sequelize'][_0xf7ef('0x8d')](_0x57022f[_0xf7ef('0x8e')](),_0x667a3c)[_0xf7ef('0x8')](function(_0x2053b7){_0xeb6255[_0x1aeb7c+_0xf7ef('0x8f')]=_0x2053b7;_0x490bee(_0x2053b7);})[_0xf7ef('0xb')](function(_0x34487c){_0x4076c0(_0x34487c);});});}return _0x529efa[_0xf7ef('0x90')](_0xf7ef('0x91'),attributes,{'tableName':_0xf7ef('0x92'),'paranoid':![],'indexes':[],'timestamps':!![],'classMethods':{'getResources':function(_0x3423c9){var _0x3b40f6={'raw':_0x3423c9[_0xf7ef('0x8d')][_0xf7ef('0x93')],'where':{}};var _0x5084a5={};var _0x16604d={'count':0x0,'rows':[]};var _0x13be7f=_0x3423c9[_0xf7ef('0x8d')][_0xf7ef('0x94')];var _0x1d8ade=_0x3423c9[_0xf7ef('0x8d')][_0xf7ef('0x95')]||![];var _0x1f573e=_0x5ddd23(_0x13be7f,_0x1d8ade);if(!_0x1f573e[_0xf7ef('0x16')])throw new Error(_0xf7ef('0x96')+_0x13be7f+'\x27');var _0x458cfc=[{'name':_0x13be7f}];if(!_[_0xf7ef('0x97')](_0x1f573e[_0xf7ef('0x55')]))_0x458cfc=_0x1f573e[_0xf7ef('0x55')];var _0x44a47c=[];for(var _0x17e83d=0x0;_0x17e83d<_0x458cfc['length'];_0x17e83d++){_0x44a47c[_0xf7ef('0x98')](_0x53845f[_0xf7ef('0x99')]['find']({'where':{'userProfileId':_0x3423c9['params']['id'],'name':_0x458cfc[_0x17e83d][_0xf7ef('0xf')]},'raw':!![]}));}return Promise['all'](_0x44a47c)['then'](function(_0x503d84){var _0x152296=_[_0xf7ef('0x6')](_0x503d84,function(_0x335234){return _0x335234?_0x335234:undefined;});var _0x49dd3b=_[_0xf7ef('0x6')](_0x458cfc,[_0xf7ef('0x9a'),!![]]);var _0x166e39=_[_0xf7ef('0x97')](_0x152296)&&_[_0xf7ef('0x97')](_0x49dd3b)?null:_[_0xf7ef('0x9b')](_0x49dd3b,_0x152296);if(!_0x166e39)return null;var _0x3260be=[];for(var _0xbd6826=0x0;_0xbd6826<_0x166e39[_0xf7ef('0x9c')];_0xbd6826++){var _0x1bca00=_['find'](_0x458cfc,function(_0x7a675c){return _0x166e39[_0xbd6826]?_0x7a675c[_0xf7ef('0xf')]===_0x166e39[_0xbd6826]['name']:null;});if(_0x1bca00){if(_0x166e39[_0xbd6826][_0xf7ef('0x9a')]){_0x3260be[_0xf7ef('0x98')](_0x45c215(_0x1f573e['childModel'],_0x166e39[_0xbd6826]));}else{if(!_0x166e39[_0xbd6826]['autoAssociation']){_0x3260be['push'](_0x537001(_0x1bca00,_0x166e39[_0xbd6826],_0x1f573e[_0xf7ef('0x16')]));}else{if(_0x1bca00['model']){_0x3260be['push'](_0x1ee34a(_0x1bca00,_0x166e39[_0xbd6826]));}}}}}return Promise[_0xf7ef('0x9d')](_0x3260be);})[_0xf7ef('0x8')](function(_0x42f481){var _0x1b9bda=_0x42f481;var _0x1212db=null;if(_0x1b9bda){_0x1212db=_0x1b9bda[_0xf7ef('0x9c')]===0x1?_0x1b9bda[0x0]:null;}if(!_0x1212db&&!_0x1b9bda)return _0x16604d;var _0x2eceaf=_0x53845f[_0x1f573e[_0xf7ef('0x16')]][_0xf7ef('0x9e')];_0x5084a5[_0xf7ef('0xd')]=_[_0xf7ef('0x9f')](_0x2eceaf);_0x5084a5[_0xf7ef('0x8d')]=_[_0xf7ef('0x9f')](_0x3423c9[_0xf7ef('0x8d')]);_0x5084a5[_0xf7ef('0xa0')]=_['intersection'](_0x5084a5[_0xf7ef('0xd')],_0x5084a5['query']);_0x3b40f6['attributes']=_[_0xf7ef('0xa1')](_0x5084a5[_0xf7ef('0xd')],qs['fields'](_0x3423c9['query'][_0xf7ef('0xa2')]));_0x3b40f6['attributes']=_0x3b40f6[_0xf7ef('0xa3')][_0xf7ef('0x9c')]?_0x3b40f6[_0xf7ef('0xa3')]:_0x5084a5[_0xf7ef('0xd')];if(!_0x3423c9[_0xf7ef('0x8d')][_0xf7ef('0xa4')]('nolimit')){_0x3b40f6['limit']=qs['limit'](_0x3423c9[_0xf7ef('0x8d')][_0xf7ef('0xa5')]);_0x3b40f6[_0xf7ef('0xa6')]=qs['offset'](_0x3423c9[_0xf7ef('0x8d')][_0xf7ef('0xa6')]);}_0x3b40f6[_0xf7ef('0xa7')]=qs['sort'](_0x3423c9['query'][_0xf7ef('0xa8')]);_0x3b40f6[_0xf7ef('0x8b')]=qs['filters'](_['pick'](_0x3423c9[_0xf7ef('0x8d')],_0x5084a5[_0xf7ef('0xa0')]));if(_0x3423c9['query'][_0xf7ef('0x6')]){_0x3b40f6['where']=_[_0xf7ef('0xa9')](_0x3b40f6[_0xf7ef('0x8b')],{'$or':_[_0xf7ef('0xa')](_0x2eceaf,function(_0x3af363){if(_0x3af363['type'][_0xf7ef('0xaa')]!=='VIRTUAL'){var _0x1e9ac4={};_0x1e9ac4[_0x3af363[_0xf7ef('0x7')]]={'$like':'%'+_0x3423c9[_0xf7ef('0x8d')][_0xf7ef('0x6')]+'%'};return _0x1e9ac4;}})});}var _0x381d2c=[];var _0x5432da=null;var _0xbe8662={};if(_0x1212db){_0x5432da=_['find'](_0x458cfc,[_0xf7ef('0xf'),_0x1212db[_0xf7ef('0xf')]]);if(_0x5432da[_0xf7ef('0x7')]){_0xbe8662={};if(_0x1f573e['childModel']===_0xf7ef('0x7b')){_0xbe8662[_0x5432da[_0xf7ef('0xab')]]=_[_0xf7ef('0xa')](_0x1212db[_0xf7ef('0x9')],'id');}else{_0xbe8662[_0x5432da[_0xf7ef('0xab')]]=_0x1212db[_0xf7ef('0x9')];}_0x381d2c[_0xf7ef('0x98')](_0xbe8662);}else{_0x3b40f6[_0xf7ef('0x8b')]['id']=_0x1212db[_0xf7ef('0x9')];}}else{for(var _0x529ee9=0x0;_0x529ee9<_0x1b9bda[_0xf7ef('0x9c')];_0x529ee9++){_0x5432da=_[_0xf7ef('0xac')](_0x458cfc,[_0xf7ef('0xf'),_0x1b9bda[_0x529ee9][_0xf7ef('0xf')]]);if(_0x5432da[_0xf7ef('0x7')]){_0xbe8662={};_0xbe8662[_0x5432da['foreignKey']]=_0x1b9bda[_0x529ee9][_0xf7ef('0x9')];_0x381d2c[_0xf7ef('0x98')](_0xbe8662);}else{if(!_0x3b40f6['where']['id'])_0x3b40f6[_0xf7ef('0x8b')]['id']=[];_0x1b9bda[_0x529ee9]['associatedResources'][_0xf7ef('0xad')](function(_0x13259b){_0x3b40f6[_0xf7ef('0x8b')]['id'][_0xf7ef('0x98')](_0x13259b);});}}}if(!_['isEmpty'](_0x381d2c)){_0x3b40f6[_0xf7ef('0x8b')]=_[_0xf7ef('0xa9')](_0x3b40f6[_0xf7ef('0x8b')],{'$and':{'$or':_0x381d2c}});}_0x3b40f6=_[_0xf7ef('0xa9')]({},_0x3b40f6,_0x3423c9[_0xf7ef('0xae')]);if(_0x1212db&&!_0x1212db[_0xf7ef('0xaf')]&&_0x1f573e[_0xf7ef('0x16')]==='AnalyticExtractedReport'){if(_0x3423c9['query'][_0xf7ef('0xb0')]){_0x3b40f6[_0xf7ef('0xb1')]=[{'all':!![]}];}return _0x53845f[_0x1f573e[_0xf7ef('0x16')]][_0xf7ef('0xe')](_0x3b40f6)[_0xf7ef('0x8')](function(_0x38866d){var _0x46e073=[];_0x38866d[_0xf7ef('0xad')](function(_0x32d6b0){var _0x1d9b74;switch(_0x32d6b0['reportType']){case _0xf7ef('0xb2'):_0x1d9b74=_['find'](_0x1212db[_0xf7ef('0x9')],function(_0x2fd81d){return _0x2fd81d['id']===_0x32d6b0['reportId']&&_0x2fd81d['type']===_0xf7ef('0xb3');});break;case _0xf7ef('0xb4'):_0x1d9b74=_[_0xf7ef('0xac')](_0x1212db[_0xf7ef('0x9')],function(_0x56140d){return _0x56140d['id']===_0x32d6b0[_0xf7ef('0x7d')]&&_0x56140d[_0xf7ef('0x13')]==='CustomReports';});break;}if(_0x1d9b74)_0x46e073[_0xf7ef('0x98')](_0x32d6b0);});_0x16604d[_0xf7ef('0xb5')]=_0x46e073[_0xf7ef('0x9c')];_0x16604d[_0xf7ef('0xb6')]=_0x46e073;return _0x16604d;});}else{if(!_[_0xf7ef('0x97')](_0x3423c9['query'][_0xf7ef('0xb7')])){_0x3b40f6['where']['id']=_0x3b40f6[_0xf7ef('0x8b')]['id']?_[_0xf7ef('0xa1')](_0x3b40f6[_0xf7ef('0x8b')]['id'],_0x3423c9[_0xf7ef('0x8d')][_0xf7ef('0xb7')]):_0x3423c9[_0xf7ef('0x8d')][_0xf7ef('0xb7')];if(_0x3423c9[_0xf7ef('0x8d')]['customSorting']){_0x3b40f6[_0xf7ef('0xa7')]=_0x3423c9['query']['customSorting'];}}if(_0x3423c9[_0xf7ef('0x8d')]['extraQueryConditions']){_0x3b40f6['where']=_['merge'](_0x3b40f6[_0xf7ef('0x8b')],{'$and':_0x3423c9[_0xf7ef('0x8d')]['extraQueryConditions']});}return _0x53845f[_0x1f573e[_0xf7ef('0x16')]]['count']({'where':_0x3b40f6[_0xf7ef('0x8b')]})[_0xf7ef('0x8')](function(_0x378afd){_0x16604d['count']=_0x378afd;if(_0x3423c9[_0xf7ef('0x8d')][_0xf7ef('0xb0')]){if(_0x1f573e[_0xf7ef('0x16')]===_0xf7ef('0x1f')){_0x3b40f6[_0xf7ef('0xb1')]=[{'model':_0x53845f[_0xf7ef('0x71')],'as':'Tags','attributes':['id',_0xf7ef('0xf'),_0xf7ef('0xb8')],'required':_0x3423c9[_0xf7ef('0x8d')][_0xf7ef('0xb9')]?!![]:![]},{'model':_0x53845f[_0xf7ef('0x71')],'as':_0xf7ef('0xba'),'attributes':['id',_0xf7ef('0xf'),_0xf7ef('0xb8')],'through':_0x3423c9[_0xf7ef('0x8d')][_0xf7ef('0xb9')]?{'attributes':[],'where':{'TagId':_0x3423c9[_0xf7ef('0x8d')]['tag']||undefined}}:{},'required':_0x3423c9[_0xf7ef('0x8d')][_0xf7ef('0xb9')]?!![]:![]}];}else{_0x3b40f6['include']=[{'all':!![]}];}}return _0x53845f[_0x1f573e[_0xf7ef('0x16')]]['findAll'](_0x3b40f6);})[_0xf7ef('0x8')](function(_0x5105c9){_0x16604d[_0xf7ef('0xb6')]=_0x5105c9;if(_0x13be7f===_0xf7ef('0x34')&&_0x3423c9[_0xf7ef('0x8d')][_0xf7ef('0xbb')]===_0xf7ef('0xbc')){var _0xbd7ca2=[];for(var _0x33e005=0x0;_0x33e005<_0x16604d[_0xf7ef('0xb6')][_0xf7ef('0x9c')];_0x33e005++){_0xbd7ca2[_0xf7ef('0x98')](_0x4d16ad(_0xf7ef('0xbd'),_0x16604d[_0xf7ef('0xb6')][_0x33e005][_0xf7ef('0xbe')]));_0xbd7ca2[_0xf7ef('0x98')](_0x4d16ad(_0xf7ef('0xbf'),_0x16604d[_0xf7ef('0xb6')][_0x33e005]['dataValues']));_0xbd7ca2[_0xf7ef('0x98')](_0x4d16ad(_0xf7ef('0xc0'),_0x16604d[_0xf7ef('0xb6')][_0x33e005]['dataValues']));_0xbd7ca2[_0xf7ef('0x98')](_0x4d16ad(_0xf7ef('0xc1'),_0x16604d[_0xf7ef('0xb6')][_0x33e005][_0xf7ef('0xbe')]));_0xbd7ca2[_0xf7ef('0x98')](_0x4d16ad(_0xf7ef('0xc2'),_0x16604d[_0xf7ef('0xb6')][_0x33e005][_0xf7ef('0xbe')]));_0xbd7ca2[_0xf7ef('0x98')](_0x4d16ad(_0xf7ef('0xc3'),_0x16604d['rows'][_0x33e005][_0xf7ef('0xbe')]));}return Promise['all'](_0xbd7ca2)[_0xf7ef('0x8')](function(){return _0x16604d;});}return _0x16604d;});}});}}});}; \ No newline at end of file +var _0x49a6=['VIRTUAL','foreignKey','forEach','options','includeAll','include','reportType','default','DefaultReports','custom','CustomReports','count','ids','customSorting','extraQueryConditions','color','tag','ThroughTags','openTabs','true','rows','dataValues','sms','fax','mail','openchannel','whatsapp','lodash','./userProfile.attributes','models','filter','field','value','findAll','map','catch','then','name','resolve','UserProfileResource','associatedResources','resourceId','toLowerCase','squareprojects','SquareProject','odbc','SquareOdbc','squarerecordings','childModel','SquareRecording','parentSections','SquareProjects','JscriptyProject','contacts','Lists','ListId','CmList','companies','globalcustomfields','CmCustomField','chatqueues','ChatQueue','ChatWebsite','FaxQueue','faxaccounts','FaxAccount','inboundroutes','VoiceContext','voicemails','voicerecordings','User','role','agent','Telephones','membername','telephone','VoiceQueues','queue','VoiceQueue','type','inbound','QueueCampaigns','outbound','musiconholds','VoiceMusicOnHold','VoiceChanSpy','voiceprefixes','VoicePrefix','ivrcampaigns','Campaign','mailqueues','MailQueue','mailaccounts','mailsubstatuses','MailSubstatus','openchannelqueues','OpenchannelQueue','OpenchannelAccount','smsqueues','smsaccounts','SmsAccount','whatsappqueues','WhatsappQueue','whatsappaccounts','WhatsappAccount','teams','Team','queuecampaigns','users','agents','Users','admin','Agents','ZendeskAccount','salesforceaccounts','FreshdeskAccount','SugarcrmAccount','deskaccounts','zohoaccounts','ZohoAccount','CannedAnswer','dispositions','Dashboard','intervals','scheduler','sounds','Sound','tags','Tag','Template','triggers','Trigger','Trunk','variables','Variable','plugins','Plugin','AnalyticExtractedReport','Reports','reportId','metrics','AnalyticMetric','toUpperCase','slice','Sequelize','SELECT','select','InteractionId','ui.createdAt','from','user_has_','sequelize','query','toString','OpenTabs','define','UserProfile','raw','section','mergeResources','Invalid\x20section\x20\x27','length','UserProfileSection','find','params','all','ignore','isEmpty','union','push','autoAssociation','model','rawAttributes','keys','filters','intersection','attributes','fields','hasOwnProperty','nolimit','limit','offset','order','sort','where','merge','key'];(function(_0x5845ad,_0x489f3d){var _0x2aaade=function(_0x29d92d){while(--_0x29d92d){_0x5845ad['push'](_0x5845ad['shift']());}};_0x2aaade(++_0x489f3d);}(_0x49a6,0xd6));var _0x649a=function(_0x73bb55,_0x5d9fbf){_0x73bb55=_0x73bb55-0x0;var _0x55543b=_0x49a6[_0x73bb55];return _0x55543b;};'use strict';var _=require(_0x649a('0x0'));var attributes=require(_0x649a('0x1'));var qs=require('../../components/parsers/qs');var squel=require('squel');module['exports']=function(_0x1efdee){var _0x984a16=_0x1efdee[_0x649a('0x2')];function _0x59cb18(_0x25fcac,_0x256673){return new Promise(function(_0x2ee484,_0x1d4cc7){if(!_0x256673)return _0x2ee484(null);var _0x53aa14=_0x256673[_0x649a('0x3')]?{[_0x256673['filter'][_0x649a('0x4')]]:_0x256673[_0x649a('0x3')][_0x649a('0x5')]}:undefined;return _0x984a16[_0x25fcac][_0x649a('0x6')]({'where':_0x53aa14,'raw':!![]})['then'](function(_0x3e8877){_0x256673['associatedResources']=_[_0x649a('0x7')](_0x3e8877,'id');_0x2ee484(_0x256673);})[_0x649a('0x8')](function(_0x70ec82){_0x1d4cc7(_0x70ec82);});});}function _0x2ab776(_0x2592e9,_0x4a1031){return new Promise(function(_0x24abda,_0x775707){var _0x981009=_0x2592e9[_0x649a('0x3')]?{[_0x2592e9[_0x649a('0x3')][_0x649a('0x4')]]:_0x2592e9[_0x649a('0x3')][_0x649a('0x5')]}:undefined;return _0x984a16[_0x2592e9['model']][_0x649a('0x6')]({'where':_0x981009,'raw':!![]})[_0x649a('0x9')](function(_0x2b8c9a){_0x4a1031['associatedResources']=_[_0x649a('0x7')](_0x2b8c9a,function(_0x4e7ea6){return _0x4e7ea6[_0x649a('0xa')];});_0x24abda(_0x4a1031);})[_0x649a('0x8')](function(_0x38be33){_0x775707(_0x38be33);});});}function _0x440259(_0x548ed4,_0x3f25ca,_0x343df1){if(!_0x3f25ca)return Promise[_0x649a('0xb')](null);return new Promise(function(_0x2dfd6e,_0x3f0519){return _0x984a16[_0x649a('0xc')][_0x649a('0x6')]({'where':{'sectionId':_0x3f25ca['id']},'raw':!![]})[_0x649a('0x9')](function(_0x38a174){if(_0x548ed4[_0x649a('0x4')]&&_0x548ed4[_0x649a('0x4')]!=='id'){_0x3f25ca[_0x649a('0xd')]=_[_0x649a('0x7')](_0x38a174,function(_0x343016){return _0x343016[_0x548ed4[_0x649a('0x4')]];});}else{if(_0x343df1==='AnalyticExtractedReport'){_0x3f25ca['associatedResources']=_['map'](_0x38a174,function(_0x47390f){return{'id':_0x47390f[_0x649a('0xe')],'type':_0x47390f['type']};});}else{_0x3f25ca['associatedResources']=_['map'](_0x38a174,function(_0x185c57){return _0x185c57['resourceId'];});}}_0x2dfd6e(_0x3f25ca);})[_0x649a('0x8')](function(_0x28d369){_0x3f0519(_0x28d369);});});}function _0x59a5f9(_0x297950,_0x10104d){var _0x459087={'parentSections':[]};switch(_0x297950[_0x649a('0xf')]()){case _0x649a('0x10'):_0x459087['childModel']=_0x649a('0x11');break;case _0x649a('0x12'):_0x459087['childModel']=_0x649a('0x13');break;case _0x649a('0x14'):_0x459087[_0x649a('0x15')]=_0x649a('0x16');_0x459087[_0x649a('0x17')]=[{'name':_0x649a('0x18'),'field':'name','foreignKey':'projectName'}];break;case'projects':_0x459087[_0x649a('0x15')]=_0x649a('0x19');break;case _0x649a('0x1a'):_0x459087[_0x649a('0x15')]='CmContact';_0x459087[_0x649a('0x17')]=[{'name':_0x649a('0x1b'),'field':'id','foreignKey':_0x649a('0x1c')}];break;case'lists':_0x459087[_0x649a('0x15')]=_0x649a('0x1d');break;case _0x649a('0x1e'):_0x459087[_0x649a('0x15')]='CmCompany';break;case _0x649a('0x1f'):_0x459087['childModel']=_0x649a('0x20');break;case _0x649a('0x21'):_0x459087[_0x649a('0x15')]=_0x649a('0x22');break;case'chatwebsites':_0x459087[_0x649a('0x15')]=_0x649a('0x23');break;case'faxqueues':_0x459087[_0x649a('0x15')]=_0x649a('0x24');break;case _0x649a('0x25'):_0x459087['childModel']=_0x649a('0x26');break;case _0x649a('0x27'):case'internalroutes':case'outboundroutes':_0x459087[_0x649a('0x15')]='VoiceExtension';break;case'contexts':_0x459087[_0x649a('0x15')]=_0x649a('0x28');break;case _0x649a('0x29'):_0x459087[_0x649a('0x15')]='VoiceMail';break;case _0x649a('0x2a'):_0x459087[_0x649a('0x15')]='VoiceRecording';_0x459087[_0x649a('0x17')]=[{'name':'Agents','field':'name','foreignKey':'membername','model':_0x649a('0x2b'),'filter':{'field':_0x649a('0x2c'),'value':[_0x649a('0x2d')]}},{'name':_0x649a('0x2e'),'field':_0x649a('0xa'),'foreignKey':_0x649a('0x2f'),'model':_0x649a('0x2b'),'filter':{'field':_0x649a('0x2c'),'value':[_0x649a('0x30')]}},{'name':_0x649a('0x31'),'field':_0x649a('0xa'),'foreignKey':_0x649a('0x32'),'model':_0x649a('0x33'),'filter':{'field':_0x649a('0x34'),'value':[_0x649a('0x35')]}},{'name':_0x649a('0x36'),'field':_0x649a('0xa'),'foreignKey':_0x649a('0x32'),'model':_0x649a('0x33'),'filter':{'field':'type','value':[_0x649a('0x37')]}}];break;case _0x649a('0x38'):_0x459087[_0x649a('0x15')]=_0x649a('0x39');break;case'chanspies':_0x459087[_0x649a('0x15')]=_0x649a('0x3a');break;case _0x649a('0x3b'):_0x459087[_0x649a('0x15')]=_0x649a('0x3c');break;case _0x649a('0x3d'):_0x459087[_0x649a('0x15')]=_0x649a('0x3e');break;case _0x649a('0x3f'):_0x459087[_0x649a('0x15')]=_0x649a('0x40');break;case _0x649a('0x41'):_0x459087[_0x649a('0x15')]='MailAccount';break;case _0x649a('0x42'):_0x459087[_0x649a('0x15')]=_0x649a('0x43');break;case _0x649a('0x44'):_0x459087[_0x649a('0x15')]=_0x649a('0x45');break;case'openchannelaccounts':_0x459087['childModel']=_0x649a('0x46');break;case _0x649a('0x47'):_0x459087[_0x649a('0x15')]='SmsQueue';break;case _0x649a('0x48'):_0x459087['childModel']=_0x649a('0x49');break;case _0x649a('0x4a'):_0x459087[_0x649a('0x15')]=_0x649a('0x4b');break;case _0x649a('0x4c'):_0x459087[_0x649a('0x15')]=_0x649a('0x4d');break;case _0x649a('0x4e'):_0x459087['childModel']=_0x649a('0x4f');break;case'voicequeues':case _0x649a('0x50'):_0x459087[_0x649a('0x15')]=_0x649a('0x33');if(_0x10104d){_0x459087['parentSections']=[{'name':_0x649a('0x31')},{'name':_0x649a('0x36')}];}break;case _0x649a('0x51'):case _0x649a('0x52'):case'telephones':_0x459087[_0x649a('0x15')]=_0x649a('0x2b');if(_0x10104d){_0x459087['parentSections']=[{'name':_0x649a('0x53'),'filter':{'field':_0x649a('0x2c'),'value':[_0x649a('0x54'),'user']},'ignore':!![]},{'name':_0x649a('0x55')},{'name':'Telephones'}];}break;case'zendeskaccounts':_0x459087[_0x649a('0x15')]=_0x649a('0x56');break;case _0x649a('0x57'):_0x459087['childModel']='SalesforceAccount';break;case'freshdeskaccounts':_0x459087[_0x649a('0x15')]=_0x649a('0x58');break;case'sugarcrmaccounts':_0x459087[_0x649a('0x15')]=_0x649a('0x59');break;case _0x649a('0x5a'):_0x459087[_0x649a('0x15')]='DeskAccount';break;case _0x649a('0x5b'):_0x459087['childModel']=_0x649a('0x5c');break;case'vtigeraccounts':_0x459087[_0x649a('0x15')]=_0x649a('0x2b');break;case'cannedanswers':_0x459087[_0x649a('0x15')]=_0x649a('0x5d');break;case _0x649a('0x5e'):_0x459087['childModel']='Disposition';break;case'customdashboards':_0x459087[_0x649a('0x15')]=_0x649a('0x5f');break;case _0x649a('0x60'):_0x459087['childModel']='Interval';break;case'pauses':_0x459087[_0x649a('0x15')]='Pause';break;case _0x649a('0x61'):_0x459087[_0x649a('0x15')]='Schedule';break;case _0x649a('0x62'):_0x459087['childModel']=_0x649a('0x63');break;case _0x649a('0x64'):_0x459087[_0x649a('0x15')]=_0x649a('0x65');break;case'templates':_0x459087['childModel']=_0x649a('0x66');break;case _0x649a('0x67'):_0x459087[_0x649a('0x15')]=_0x649a('0x68');break;case'trunks':_0x459087[_0x649a('0x15')]=_0x649a('0x69');break;case _0x649a('0x6a'):_0x459087[_0x649a('0x15')]=_0x649a('0x6b');break;case _0x649a('0x6c'):_0x459087[_0x649a('0x15')]=_0x649a('0x6d');break;case'extractedreports':_0x459087['childModel']=_0x649a('0x6e');_0x459087[_0x649a('0x17')]=[{'name':_0x649a('0x6f'),'field':'id','foreignKey':_0x649a('0x70')}];break;case _0x649a('0x71'):_0x459087['childModel']=_0x649a('0x72');break;}return _0x459087;}function _0xb223fb(_0xe8614a,_0x475b29){var _0x1274b3=_0xe8614a['charAt'](0x0)[_0x649a('0x73')]()+_0xe8614a[_0x649a('0x74')](0x1);var _0xb65925={'type':_0x984a16[_0x649a('0x75')]['QueryTypes'][_0x649a('0x76')],'raw':!![]};return new Promise(function(_0x186a47,_0x21aa3a){var _0x3e3250=squel[_0x649a('0x77')]()['field']('ui.'+_0x1274b3+_0x649a('0x78'),'id')[_0x649a('0x4')](_0x649a('0x79'))[_0x649a('0x7a')](_0x649a('0x7b')+_0xe8614a+'_interactions','ui')['where']('ui.UserId\x20=\x20?',_0x475b29['id']);return _0x984a16[_0x649a('0x7c')][_0x649a('0x7d')](_0x3e3250[_0x649a('0x7e')](),_0xb65925)[_0x649a('0x9')](function(_0x32f296){_0x475b29[_0x1274b3+_0x649a('0x7f')]=_0x32f296;_0x186a47(_0x32f296);})[_0x649a('0x8')](function(_0x4af8f1){_0x21aa3a(_0x4af8f1);});});}return _0x1efdee[_0x649a('0x80')](_0x649a('0x81'),attributes,{'tableName':'user_profiles','paranoid':![],'indexes':[],'timestamps':!![],'classMethods':{'getResources':function(_0xe5c9a6){var _0x91a85a={'raw':_0xe5c9a6['query'][_0x649a('0x82')],'where':{}};var _0xc404b9={};var _0x2b5b15={'count':0x0,'rows':[]};var _0x44d24b=_0xe5c9a6[_0x649a('0x7d')][_0x649a('0x83')];var _0x135712=_0xe5c9a6[_0x649a('0x7d')][_0x649a('0x84')]||![];var _0x2b16cc=_0x59a5f9(_0x44d24b,_0x135712);if(!_0x2b16cc['childModel'])throw new Error(_0x649a('0x85')+_0x44d24b+'\x27');var _0x603b88=[{'name':_0x44d24b}];if(!_['isEmpty'](_0x2b16cc[_0x649a('0x17')]))_0x603b88=_0x2b16cc['parentSections'];var _0x57a4c4=[];for(var _0x4fcaff=0x0;_0x4fcaff<_0x603b88[_0x649a('0x86')];_0x4fcaff++){_0x57a4c4['push'](_0x984a16[_0x649a('0x87')][_0x649a('0x88')]({'where':{'userProfileId':_0xe5c9a6[_0x649a('0x89')]['id'],'name':_0x603b88[_0x4fcaff]['name']},'raw':!![]}));}return Promise[_0x649a('0x8a')](_0x57a4c4)['then'](function(_0xb443fd){var _0x332335=_['filter'](_0xb443fd,function(_0x2d90ae){return _0x2d90ae?_0x2d90ae:undefined;});var _0x4fa156=_['filter'](_0x603b88,[_0x649a('0x8b'),!![]]);var _0x14927d=_[_0x649a('0x8c')](_0x332335)&&_[_0x649a('0x8c')](_0x4fa156)?null:_[_0x649a('0x8d')](_0x4fa156,_0x332335);if(!_0x14927d)return null;var _0x27ebcf=[];for(var _0x14d18b=0x0;_0x14d18b<_0x14927d[_0x649a('0x86')];_0x14d18b++){var _0x46153d=_['find'](_0x603b88,function(_0x348d7f){return _0x14927d[_0x14d18b]?_0x348d7f[_0x649a('0xa')]===_0x14927d[_0x14d18b][_0x649a('0xa')]:null;});if(_0x46153d){if(_0x14927d[_0x14d18b][_0x649a('0x8b')]){_0x27ebcf[_0x649a('0x8e')](_0x59cb18(_0x2b16cc[_0x649a('0x15')],_0x14927d[_0x14d18b]));}else{if(!_0x14927d[_0x14d18b][_0x649a('0x8f')]){_0x27ebcf[_0x649a('0x8e')](_0x440259(_0x46153d,_0x14927d[_0x14d18b],_0x2b16cc[_0x649a('0x15')]));}else{if(_0x46153d[_0x649a('0x90')]){_0x27ebcf[_0x649a('0x8e')](_0x2ab776(_0x46153d,_0x14927d[_0x14d18b]));}}}}}return Promise[_0x649a('0x8a')](_0x27ebcf);})[_0x649a('0x9')](function(_0x2e9dae){var _0x1404df=_0x2e9dae;var _0x1886c5=null;if(_0x1404df){_0x1886c5=_0x1404df['length']===0x1?_0x1404df[0x0]:null;}if(!_0x1886c5&&!_0x1404df)return _0x2b5b15;var _0x27fa47=_0x984a16[_0x2b16cc[_0x649a('0x15')]][_0x649a('0x91')];_0xc404b9['model']=_[_0x649a('0x92')](_0x27fa47);_0xc404b9['query']=_['keys'](_0xe5c9a6[_0x649a('0x7d')]);_0xc404b9[_0x649a('0x93')]=_[_0x649a('0x94')](_0xc404b9[_0x649a('0x90')],_0xc404b9['query']);_0x91a85a[_0x649a('0x95')]=_[_0x649a('0x94')](_0xc404b9[_0x649a('0x90')],qs[_0x649a('0x96')](_0xe5c9a6[_0x649a('0x7d')]['fields']));_0x91a85a[_0x649a('0x95')]=_0x91a85a[_0x649a('0x95')][_0x649a('0x86')]?_0x91a85a['attributes']:_0xc404b9[_0x649a('0x90')];if(!_0xe5c9a6[_0x649a('0x7d')][_0x649a('0x97')](_0x649a('0x98'))){_0x91a85a[_0x649a('0x99')]=qs['limit'](_0xe5c9a6[_0x649a('0x7d')]['limit']);_0x91a85a[_0x649a('0x9a')]=qs[_0x649a('0x9a')](_0xe5c9a6['query'][_0x649a('0x9a')]);}_0x91a85a[_0x649a('0x9b')]=qs[_0x649a('0x9c')](_0xe5c9a6[_0x649a('0x7d')][_0x649a('0x9c')]);_0x91a85a['where']=qs[_0x649a('0x93')](_['pick'](_0xe5c9a6['query'],_0xc404b9[_0x649a('0x93')]));if(_0xe5c9a6[_0x649a('0x7d')]['filter']){_0x91a85a[_0x649a('0x9d')]=_[_0x649a('0x9e')](_0x91a85a['where'],{'$or':_[_0x649a('0x7')](_0x27fa47,function(_0x47d9c6){if(_0x47d9c6[_0x649a('0x34')][_0x649a('0x9f')]!==_0x649a('0xa0')){var _0x3e0dcf={};_0x3e0dcf[_0x47d9c6[_0x649a('0x4')]]={'$like':'%'+_0xe5c9a6['query']['filter']+'%'};return _0x3e0dcf;}})});}var _0x1b1f5e=[];var _0x5c3469=null;var _0x39a27f={};if(_0x1886c5){_0x5c3469=_[_0x649a('0x88')](_0x603b88,['name',_0x1886c5[_0x649a('0xa')]]);if(_0x5c3469['field']){_0x39a27f={};if(_0x2b16cc[_0x649a('0x15')]===_0x649a('0x6e')){_0x39a27f[_0x5c3469[_0x649a('0xa1')]]=_['map'](_0x1886c5['associatedResources'],'id');}else{_0x39a27f[_0x5c3469[_0x649a('0xa1')]]=_0x1886c5['associatedResources'];}_0x1b1f5e[_0x649a('0x8e')](_0x39a27f);}else{_0x91a85a[_0x649a('0x9d')]['id']=_0x1886c5[_0x649a('0xd')];}}else{for(var _0x36f756=0x0;_0x36f756<_0x1404df[_0x649a('0x86')];_0x36f756++){_0x5c3469=_[_0x649a('0x88')](_0x603b88,[_0x649a('0xa'),_0x1404df[_0x36f756]['name']]);if(_0x5c3469[_0x649a('0x4')]){_0x39a27f={};_0x39a27f[_0x5c3469[_0x649a('0xa1')]]=_0x1404df[_0x36f756][_0x649a('0xd')];_0x1b1f5e[_0x649a('0x8e')](_0x39a27f);}else{if(!_0x91a85a['where']['id'])_0x91a85a[_0x649a('0x9d')]['id']=[];_0x1404df[_0x36f756][_0x649a('0xd')][_0x649a('0xa2')](function(_0x14729f){_0x91a85a[_0x649a('0x9d')]['id'][_0x649a('0x8e')](_0x14729f);});}}}if(!_['isEmpty'](_0x1b1f5e)){_0x91a85a[_0x649a('0x9d')]=_['merge'](_0x91a85a[_0x649a('0x9d')],{'$and':{'$or':_0x1b1f5e}});}_0x91a85a=_['merge']({},_0x91a85a,_0xe5c9a6[_0x649a('0xa3')]);if(_0x1886c5&&!_0x1886c5[_0x649a('0x8f')]&&_0x2b16cc[_0x649a('0x15')]==='AnalyticExtractedReport'){if(_0xe5c9a6[_0x649a('0x7d')][_0x649a('0xa4')]){_0x91a85a[_0x649a('0xa5')]=[{'all':!![]}];}return _0x984a16[_0x2b16cc[_0x649a('0x15')]][_0x649a('0x6')](_0x91a85a)[_0x649a('0x9')](function(_0x3fac2a){var _0xfd226d=[];_0x3fac2a[_0x649a('0xa2')](function(_0x4beb87){var _0x4b6017;switch(_0x4beb87[_0x649a('0xa6')]){case _0x649a('0xa7'):_0x4b6017=_[_0x649a('0x88')](_0x1886c5[_0x649a('0xd')],function(_0x570486){return _0x570486['id']===_0x4beb87[_0x649a('0x70')]&&_0x570486[_0x649a('0x34')]===_0x649a('0xa8');});break;case _0x649a('0xa9'):_0x4b6017=_[_0x649a('0x88')](_0x1886c5[_0x649a('0xd')],function(_0x8e0dd7){return _0x8e0dd7['id']===_0x4beb87['reportId']&&_0x8e0dd7['type']===_0x649a('0xaa');});break;}if(_0x4b6017)_0xfd226d['push'](_0x4beb87);});_0x2b5b15[_0x649a('0xab')]=_0xfd226d[_0x649a('0x86')];_0x2b5b15['rows']=_0xfd226d;return _0x2b5b15;});}else{if(!_[_0x649a('0x8c')](_0xe5c9a6['query']['ids'])){_0x91a85a['where']['id']=_0x91a85a[_0x649a('0x9d')]['id']?_[_0x649a('0x94')](_0x91a85a[_0x649a('0x9d')]['id'],_0xe5c9a6[_0x649a('0x7d')]['ids']):_0xe5c9a6['query'][_0x649a('0xac')];if(_0xe5c9a6['query'][_0x649a('0xad')]){_0x91a85a['order']=_0xe5c9a6[_0x649a('0x7d')]['customSorting'];}}if(_0xe5c9a6[_0x649a('0x7d')][_0x649a('0xae')]){_0x91a85a[_0x649a('0x9d')]=_[_0x649a('0x9e')](_0x91a85a['where'],{'$and':_0xe5c9a6[_0x649a('0x7d')]['extraQueryConditions']});}return _0x984a16[_0x2b16cc[_0x649a('0x15')]][_0x649a('0xab')]({'where':_0x91a85a['where']})[_0x649a('0x9')](function(_0x560699){_0x2b5b15[_0x649a('0xab')]=_0x560699;if(_0xe5c9a6[_0x649a('0x7d')][_0x649a('0xa4')]){if(_0x2b16cc['childModel']==='CmContact'){_0x91a85a['include']=[{'model':_0x984a16[_0x649a('0x65')],'as':'Tags','attributes':['id',_0x649a('0xa'),_0x649a('0xaf')],'required':_0xe5c9a6['query'][_0x649a('0xb0')]?!![]:![]},{'model':_0x984a16['Tag'],'as':_0x649a('0xb1'),'attributes':['id','name',_0x649a('0xaf')],'through':_0xe5c9a6[_0x649a('0x7d')]['tag']?{'attributes':[],'where':{'TagId':_0xe5c9a6[_0x649a('0x7d')][_0x649a('0xb0')]||undefined}}:{},'required':_0xe5c9a6[_0x649a('0x7d')][_0x649a('0xb0')]?!![]:![]}];}else{_0x91a85a[_0x649a('0xa5')]=[{'all':!![]}];}}return _0x984a16[_0x2b16cc[_0x649a('0x15')]][_0x649a('0x6')](_0x91a85a);})['then'](function(_0x58fff0){_0x2b5b15['rows']=_0x58fff0;if(_0x44d24b==='Agents'&&_0xe5c9a6[_0x649a('0x7d')][_0x649a('0xb2')]===_0x649a('0xb3')){var _0x503fa4=[];for(var _0x3646be=0x0;_0x3646be<_0x2b5b15[_0x649a('0xb4')]['length'];_0x3646be++){_0x503fa4['push'](_0xb223fb('chat',_0x2b5b15[_0x649a('0xb4')][_0x3646be][_0x649a('0xb5')]));_0x503fa4[_0x649a('0x8e')](_0xb223fb(_0x649a('0xb6'),_0x2b5b15['rows'][_0x3646be]['dataValues']));_0x503fa4['push'](_0xb223fb(_0x649a('0xb7'),_0x2b5b15[_0x649a('0xb4')][_0x3646be][_0x649a('0xb5')]));_0x503fa4['push'](_0xb223fb(_0x649a('0xb8'),_0x2b5b15[_0x649a('0xb4')][_0x3646be][_0x649a('0xb5')]));_0x503fa4[_0x649a('0x8e')](_0xb223fb(_0x649a('0xb9'),_0x2b5b15[_0x649a('0xb4')][_0x3646be]['dataValues']));_0x503fa4[_0x649a('0x8e')](_0xb223fb(_0x649a('0xba'),_0x2b5b15[_0x649a('0xb4')][_0x3646be]['dataValues']));}return Promise[_0x649a('0x8a')](_0x503fa4)[_0x649a('0x9')](function(){return _0x2b5b15;});}return _0x2b5b15;});}});}}});}; \ No newline at end of file diff --git a/server/api/userProfile/userProfile.rpc.js b/server/api/userProfile/userProfile.rpc.js index ececc41..64a12c1 100644 --- a/server/api/userProfile/userProfile.rpc.js +++ b/server/api/userProfile/userProfile.rpc.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x9666=['defaults','localhost','socket.io-emitter','register','request','then','info','UserProfile,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','UserProfile,\x20%s,\x20%s','message','result','lodash','util','moment','bluebird','ioredis','../../mysqldb','../../config/utils','../../config/environment','jayson/promise','client','http','redis'];(function(_0x23a163,_0x315a26){var _0x9adab4=function(_0x171387){while(--_0x171387){_0x23a163['push'](_0x23a163['shift']());}};_0x9adab4(++_0x315a26);}(_0x9666,0x17a));var _0x6966=function(_0x3fe54f,_0x516b69){_0x3fe54f=_0x3fe54f-0x0;var _0x3d420e=_0x9666[_0x3fe54f];return _0x3d420e;};'use strict';var _=require(_0x6966('0x0'));var util=require(_0x6966('0x1'));var moment=require(_0x6966('0x2'));var BPromise=require(_0x6966('0x3'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x6966('0x4'));var db=require(_0x6966('0x5'))['db'];var utils=require(_0x6966('0x6'));var logger=require('../../config/logger')('rpc');var config=require(_0x6966('0x7'));var jayson=require(_0x6966('0x8'));var client=jayson[_0x6966('0x9')][_0x6966('0xa')]({'port':0x232a});config[_0x6966('0xb')]=_[_0x6966('0xc')](config['redis'],{'host':_0x6966('0xd'),'port':0x18eb});var socket=require(_0x6966('0xe'))(new Redis(config[_0x6966('0xb')]));require('./userProfile.socket')[_0x6966('0xf')](socket);function respondWithRpcPromise(_0x377666,_0x150ca1,_0x47578b){return new BPromise(function(_0x2961fd,_0x3bb5b1){return client[_0x6966('0x10')](_0x377666,_0x47578b)[_0x6966('0x11')](function(_0x276f89){logger[_0x6966('0x12')]('UserProfile,\x20%s,\x20%s',_0x150ca1,'request\x20sent');logger['debug'](_0x6966('0x13'),_0x150ca1,_0x6966('0x14'),JSON[_0x6966('0x15')](_0x276f89));if(_0x276f89['error']){if(_0x276f89['error']['code']===0x1f4){logger[_0x6966('0x16')](_0x6966('0x17'),_0x150ca1,_0x276f89[_0x6966('0x16')][_0x6966('0x18')]);return _0x3bb5b1(_0x276f89[_0x6966('0x16')]['message']);}logger[_0x6966('0x16')](_0x6966('0x17'),_0x150ca1,_0x276f89['error'][_0x6966('0x18')]);return _0x2961fd(_0x276f89[_0x6966('0x16')][_0x6966('0x18')]);}else{logger['info'](_0x6966('0x17'),_0x150ca1,'request\x20sent');_0x2961fd(_0x276f89[_0x6966('0x19')]['message']);}})['catch'](function(_0x5de186){logger[_0x6966('0x16')]('UserProfile,\x20%s,\x20%s',_0x150ca1,_0x5de186);_0x3bb5b1(_0x5de186);});});} \ No newline at end of file +var _0x1410=['error','code','message','catch','lodash','util','moment','bluebird','ioredis','../../config/utils','rpc','../../config/environment','jayson/promise','client','http','redis','defaults','localhost','./userProfile.socket','register','then','info','UserProfile,\x20%s,\x20%s','UserProfile,\x20%s,\x20%s,\x20%s','request\x20sent'];(function(_0x1573ea,_0x434f02){var _0x51c0e2=function(_0x5c9b28){while(--_0x5c9b28){_0x1573ea['push'](_0x1573ea['shift']());}};_0x51c0e2(++_0x434f02);}(_0x1410,0x130));var _0x0141=function(_0x46052c,_0x28ad1b){_0x46052c=_0x46052c-0x0;var _0x2b94e0=_0x1410[_0x46052c];return _0x2b94e0;};'use strict';var _=require(_0x0141('0x0'));var util=require(_0x0141('0x1'));var moment=require(_0x0141('0x2'));var BPromise=require(_0x0141('0x3'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x0141('0x4'));var db=require('../../mysqldb')['db'];var utils=require(_0x0141('0x5'));var logger=require('../../config/logger')(_0x0141('0x6'));var config=require(_0x0141('0x7'));var jayson=require(_0x0141('0x8'));var client=jayson[_0x0141('0x9')][_0x0141('0xa')]({'port':0x232a});config[_0x0141('0xb')]=_[_0x0141('0xc')](config[_0x0141('0xb')],{'host':_0x0141('0xd'),'port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config[_0x0141('0xb')]));require(_0x0141('0xe'))[_0x0141('0xf')](socket);function respondWithRpcPromise(_0x3465f2,_0x1b6b66,_0x1798ae){return new BPromise(function(_0x3f5e8f,_0x5f368f){return client['request'](_0x3465f2,_0x1798ae)[_0x0141('0x10')](function(_0x3b7718){logger[_0x0141('0x11')](_0x0141('0x12'),_0x1b6b66,'request\x20sent');logger['debug'](_0x0141('0x13'),_0x1b6b66,_0x0141('0x14'),JSON['stringify'](_0x3b7718));if(_0x3b7718[_0x0141('0x15')]){if(_0x3b7718[_0x0141('0x15')][_0x0141('0x16')]===0x1f4){logger[_0x0141('0x15')](_0x0141('0x12'),_0x1b6b66,_0x3b7718['error'][_0x0141('0x17')]);return _0x5f368f(_0x3b7718['error'][_0x0141('0x17')]);}logger[_0x0141('0x15')](_0x0141('0x12'),_0x1b6b66,_0x3b7718[_0x0141('0x15')][_0x0141('0x17')]);return _0x3f5e8f(_0x3b7718[_0x0141('0x15')]['message']);}else{logger['info'](_0x0141('0x12'),_0x1b6b66,_0x0141('0x14'));_0x3f5e8f(_0x3b7718['result'][_0x0141('0x17')]);}})[_0x0141('0x18')](function(_0x8beed8){logger[_0x0141('0x15')]('UserProfile,\x20%s,\x20%s',_0x1b6b66,_0x8beed8);_0x5f368f(_0x8beed8);});});} \ No newline at end of file diff --git a/server/api/userProfile/userProfile.socket.js b/server/api/userProfile/userProfile.socket.js index 09506d3..09f1f59 100644 --- a/server/api/userProfile/userProfile.socket.js +++ b/server/api/userProfile/userProfile.socket.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x0947=['userProfile:','./userProfile.events','update','emit','removeListener','length'];(function(_0x533495,_0x479a5b){var _0x49c006=function(_0x18eb34){while(--_0x18eb34){_0x533495['push'](_0x533495['shift']());}};_0x49c006(++_0x479a5b);}(_0x0947,0x169));var _0x7094=function(_0x54ef60,_0x1c85c8){_0x54ef60=_0x54ef60-0x0;var _0x4257af=_0x0947[_0x54ef60];return _0x4257af;};'use strict';var UserProfileEvents=require(_0x7094('0x0'));var events=['save','remove',_0x7094('0x1')];function createListener(_0x32b8ca,_0x533732){return function(_0x325de2){_0x533732[_0x7094('0x2')](_0x32b8ca,_0x325de2);};}function removeListener(_0x23c507,_0x345611){return function(){UserProfileEvents[_0x7094('0x3')](_0x23c507,_0x345611);};}exports['register']=function(_0x4ef0af){for(var _0x1bf002=0x0,_0x115c0c=events[_0x7094('0x4')];_0x1bf002<_0x115c0c;_0x1bf002++){var _0x55613d=events[_0x1bf002];var _0x14a9b7=createListener(_0x7094('0x5')+_0x55613d,_0x4ef0af);UserProfileEvents['on'](_0x55613d,_0x14a9b7);}}; \ No newline at end of file +var _0x46b8=['userProfile:','./userProfile.events','save','remove','update','emit','length'];(function(_0x19b3f9,_0xade753){var _0x18c3f6=function(_0x21439f){while(--_0x21439f){_0x19b3f9['push'](_0x19b3f9['shift']());}};_0x18c3f6(++_0xade753);}(_0x46b8,0x1dd));var _0x846b=function(_0x378ea0,_0x4d5b5f){_0x378ea0=_0x378ea0-0x0;var _0x2cdad6=_0x46b8[_0x378ea0];return _0x2cdad6;};'use strict';var UserProfileEvents=require(_0x846b('0x0'));var events=[_0x846b('0x1'),_0x846b('0x2'),_0x846b('0x3')];function createListener(_0xe91584,_0x28a92c){return function(_0x4ad04d){_0x28a92c[_0x846b('0x4')](_0xe91584,_0x4ad04d);};}function removeListener(_0x477026,_0x5d8918){return function(){UserProfileEvents['removeListener'](_0x477026,_0x5d8918);};}exports['register']=function(_0x491bc5){for(var _0x3d7d86=0x0,_0x44bb69=events[_0x846b('0x5')];_0x3d7d86<_0x44bb69;_0x3d7d86++){var _0x5cbc5e=events[_0x3d7d86];var _0x35037e=createListener(_0x846b('0x6')+_0x5cbc5e,_0x491bc5);UserProfileEvents['on'](_0x5cbc5e,_0x35037e);}}; \ No newline at end of file diff --git a/server/api/userProfileResource/index.js b/server/api/userProfileResource/index.js index 425da50..2b879b1 100644 --- a/server/api/userProfileResource/index.js +++ b/server/api/userProfileResource/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xbf48=['../../config/environment','get','isAuthenticated','index','/describe','describe','/:id','show','post','put','update','destroy','exports','multer','util','connect-timeout','express','Router','fs-extra','../../components/auth/service','../../components/interaction/service'];(function(_0x44db50,_0x5ecc02){var _0x2647ff=function(_0x2e454b){while(--_0x2e454b){_0x44db50['push'](_0x44db50['shift']());}};_0x2647ff(++_0x5ecc02);}(_0xbf48,0x133));var _0x8bf4=function(_0x383a67,_0x287a3b){_0x383a67=_0x383a67-0x0;var _0x51b5f1=_0xbf48[_0x383a67];return _0x51b5f1;};'use strict';var multer=require(_0x8bf4('0x0'));var util=require(_0x8bf4('0x1'));var path=require('path');var timeout=require(_0x8bf4('0x2'));var express=require(_0x8bf4('0x3'));var router=express[_0x8bf4('0x4')]();var fs_extra=require(_0x8bf4('0x5'));var auth=require(_0x8bf4('0x6'));var interaction=require(_0x8bf4('0x7'));var config=require(_0x8bf4('0x8'));var controller=require('./userProfileResource.controller');router[_0x8bf4('0x9')]('/',auth[_0x8bf4('0xa')](),controller[_0x8bf4('0xb')]);router['get'](_0x8bf4('0xc'),auth[_0x8bf4('0xa')](),controller[_0x8bf4('0xd')]);router[_0x8bf4('0x9')](_0x8bf4('0xe'),auth[_0x8bf4('0xa')](),controller[_0x8bf4('0xf')]);router[_0x8bf4('0x10')]('/',auth[_0x8bf4('0xa')](),controller['create']);router[_0x8bf4('0x11')]('/:id',auth[_0x8bf4('0xa')](),controller[_0x8bf4('0x12')]);router['delete']('/:id',auth[_0x8bf4('0xa')](),controller[_0x8bf4('0x13')]);module[_0x8bf4('0x14')]=router; \ No newline at end of file +var _0xb48a=['../../components/auth/service','../../components/interaction/service','../../config/environment','./userProfileResource.controller','get','index','/describe','isAuthenticated','/:id','show','create','put','update','destroy','exports','multer','util','path','connect-timeout','express','Router','fs-extra'];(function(_0x2faddb,_0xc18b78){var _0x273c05=function(_0x1a3785){while(--_0x1a3785){_0x2faddb['push'](_0x2faddb['shift']());}};_0x273c05(++_0xc18b78);}(_0xb48a,0x19b));var _0xab48=function(_0x3861e6,_0xbf65e){_0x3861e6=_0x3861e6-0x0;var _0x34cbc3=_0xb48a[_0x3861e6];return _0x34cbc3;};'use strict';var multer=require(_0xab48('0x0'));var util=require(_0xab48('0x1'));var path=require(_0xab48('0x2'));var timeout=require(_0xab48('0x3'));var express=require(_0xab48('0x4'));var router=express[_0xab48('0x5')]();var fs_extra=require(_0xab48('0x6'));var auth=require(_0xab48('0x7'));var interaction=require(_0xab48('0x8'));var config=require(_0xab48('0x9'));var controller=require(_0xab48('0xa'));router[_0xab48('0xb')]('/',auth['isAuthenticated'](),controller[_0xab48('0xc')]);router['get'](_0xab48('0xd'),auth[_0xab48('0xe')](),controller['describe']);router['get'](_0xab48('0xf'),auth['isAuthenticated'](),controller[_0xab48('0x10')]);router['post']('/',auth[_0xab48('0xe')](),controller[_0xab48('0x11')]);router[_0xab48('0x12')](_0xab48('0xf'),auth[_0xab48('0xe')](),controller[_0xab48('0x13')]);router['delete']('/:id',auth[_0xab48('0xe')](),controller[_0xab48('0x14')]);module[_0xab48('0x15')]=router; \ No newline at end of file diff --git a/server/api/userProfileResource/userProfileResource.attributes.js b/server/api/userProfileResource/userProfileResource.attributes.js index 689dc0a..8fa44e1 100644 --- a/server/api/userProfileResource/userProfileResource.attributes.js +++ b/server/api/userProfileResource/userProfileResource.attributes.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xce2e=['STRING','INTEGER','sequelize','exports'];(function(_0x543906,_0x34a7dd){var _0x7ec55a=function(_0x3b4b79){while(--_0x3b4b79){_0x543906['push'](_0x543906['shift']());}};_0x7ec55a(++_0x34a7dd);}(_0xce2e,0x1be));var _0xece2=function(_0x169841,_0x33e479){_0x169841=_0x169841-0x0;var _0x7453c3=_0xce2e[_0x169841];return _0x7453c3;};'use strict';var Sequelize=require(_0xece2('0x0'));module[_0xece2('0x1')]={'name':{'type':Sequelize[_0xece2('0x2')],'allowNull':![]},'resourceId':{'type':Sequelize[_0xece2('0x3')],'allowNull':![]},'type':{'type':Sequelize[_0xece2('0x2')],'allowNull':![]}}; \ No newline at end of file +var _0xeaff=['exports','INTEGER','sequelize'];(function(_0x2641f9,_0x26715f){var _0x585741=function(_0x2d1462){while(--_0x2d1462){_0x2641f9['push'](_0x2641f9['shift']());}};_0x585741(++_0x26715f);}(_0xeaff,0x164));var _0xfeaf=function(_0x27b93d,_0x16df02){_0x27b93d=_0x27b93d-0x0;var _0x3c3498=_0xeaff[_0x27b93d];return _0x3c3498;};'use strict';var Sequelize=require(_0xfeaf('0x0'));module[_0xfeaf('0x1')]={'name':{'type':Sequelize['STRING'],'allowNull':![]},'resourceId':{'type':Sequelize[_0xfeaf('0x2')],'allowNull':![]},'type':{'type':Sequelize['STRING'],'allowNull':![]}}; \ No newline at end of file diff --git a/server/api/userProfileResource/userProfileResource.controller.js b/server/api/userProfileResource/userProfileResource.controller.js index 12e7772..3b84613 100644 --- a/server/api/userProfileResource/userProfileResource.controller.js +++ b/server/api/userProfileResource/userProfileResource.controller.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x4c60=['../../mysqldb','sendStatus','status','json','offset','undefined','limit','count','Content-Range','apply','reject','then','destroy','end','error','stack','name','index','map','UserProfileResource','rawAttributes','key','keys','query','filters','intersection','attributes','model','fields','length','hasOwnProperty','nolimit','sort','where','pick','filter','VIRTUAL','merge','options','include','findAll','rows','catch','show','includeAll','find','create','update','body','params','describe','eml-format','rimraf','zip-dir','fast-json-patch','moment','sox','to-csv','ejs','fs-extra','lodash','squel','crypto','desk.js','querystring','papaparse','../../components/parsers/advancedSearch','../../config/logger','api','../../config/environment','../../config/license/util'];(function(_0x4b416c,_0x53ef9e){var _0x2037fa=function(_0x5d9816){while(--_0x5d9816){_0x4b416c['push'](_0x4b416c['shift']());}};_0x2037fa(++_0x53ef9e);}(_0x4c60,0xc1));var _0x04c6=function(_0x3941fb,_0x4a6af3){_0x3941fb=_0x3941fb-0x0;var _0xa0fdab=_0x4c60[_0x3941fb];return _0xa0fdab;};'use strict';var emlformat=require(_0x04c6('0x0'));var rimraf=require(_0x04c6('0x1'));var zipdir=require(_0x04c6('0x2'));var jsonpatch=require(_0x04c6('0x3'));var rp=require('request-promise');var moment=require(_0x04c6('0x4'));var BPromise=require('bluebird');var Mustache=require('mustache');var util=require('util');var path=require('path');var sox=require(_0x04c6('0x5'));var csv=require(_0x04c6('0x6'));var ejs=require(_0x04c6('0x7'));var fs=require('fs');var fs_extra=require(_0x04c6('0x8'));var _=require(_0x04c6('0x9'));var squel=require(_0x04c6('0xa'));var crypto=require(_0x04c6('0xb'));var jsforce=require('jsforce');var deskjs=require(_0x04c6('0xc'));var toCsv=require(_0x04c6('0x6'));var querystring=require(_0x04c6('0xd'));var Papa=require(_0x04c6('0xe'));var Redis=require('ioredis');var authService=require('../../components/auth/service');var qs=require('../../components/parsers/qs');var as=require(_0x04c6('0xf'));var hardwareService=require('../../config/license/hardware');var logger=require(_0x04c6('0x10'))(_0x04c6('0x11'));var utils=require('../../config/utils');var config=require(_0x04c6('0x12'));var licenseUtil=require(_0x04c6('0x13'));var db=require(_0x04c6('0x14'))['db'];function respondWithStatusCode(_0x4e5e6,_0x52cdcf){_0x52cdcf=_0x52cdcf||0xcc;return function(_0x257a0a){if(_0x257a0a){return _0x4e5e6[_0x04c6('0x15')](_0x52cdcf);}return _0x4e5e6[_0x04c6('0x16')](_0x52cdcf)['end']();};}function respondWithResult(_0x12d1c5,_0x15cbe0){_0x15cbe0=_0x15cbe0||0xc8;return function(_0x28632e){if(_0x28632e){return _0x12d1c5[_0x04c6('0x16')](_0x15cbe0)[_0x04c6('0x17')](_0x28632e);}};}function respondWithFilteredResult(_0x19a26f,_0x1cd963){return function(_0x3d46a9){if(_0x3d46a9){var _0x5a5a66=typeof _0x1cd963[_0x04c6('0x18')]===_0x04c6('0x19')&&typeof _0x1cd963[_0x04c6('0x1a')]===_0x04c6('0x19');var _0x43596a=_0x3d46a9[_0x04c6('0x1b')];var _0x21674a=_0x5a5a66?0x0:_0x1cd963[_0x04c6('0x18')];var _0x47f400=_0x5a5a66?_0x3d46a9[_0x04c6('0x1b')]:_0x1cd963[_0x04c6('0x18')]+_0x1cd963[_0x04c6('0x1a')];var _0x558b43;if(_0x47f400>=_0x43596a){_0x47f400=_0x43596a;_0x558b43=0xc8;}else{_0x558b43=0xce;}_0x19a26f['status'](_0x558b43);return _0x19a26f['set'](_0x04c6('0x1c'),_0x21674a+'-'+_0x47f400+'/'+_0x43596a)[_0x04c6('0x17')](_0x3d46a9);}return null;};}function patchUpdates(_0x50dd61){return function(_0x5a5e9e){try{jsonpatch[_0x04c6('0x1d')](_0x5a5e9e,_0x50dd61,!![]);}catch(_0x2eed94){return BPromise[_0x04c6('0x1e')](_0x2eed94);}return _0x5a5e9e['save']();};}function saveUpdates(_0x33a0f7,_0x13f2dc){return function(_0x9d41f8){if(_0x9d41f8){return _0x9d41f8['update'](_0x33a0f7)[_0x04c6('0x1f')](function(_0x41e29f){return _0x41e29f;});}return null;};}function removeEntity(_0x562491,_0x54a8b0){return function(_0x4c8d72){if(_0x4c8d72){return _0x4c8d72[_0x04c6('0x20')]()[_0x04c6('0x1f')](function(){_0x562491[_0x04c6('0x16')](0xcc)[_0x04c6('0x21')]();});}};}function handleEntityNotFound(_0x3e1328,_0x52e5f5){return function(_0x562952){if(!_0x562952){_0x3e1328[_0x04c6('0x15')](0x194);}return _0x562952;};}function handleError(_0x2ab1d2,_0x9acfa){_0x9acfa=_0x9acfa||0x1f4;return function(_0x3233d7){logger[_0x04c6('0x22')](_0x3233d7[_0x04c6('0x23')]);if(_0x3233d7['name']){delete _0x3233d7[_0x04c6('0x24')];}_0x2ab1d2[_0x04c6('0x16')](_0x9acfa)['send'](_0x3233d7);};}exports[_0x04c6('0x25')]=function(_0x1cd16a,_0x5f1331){var _0x5c9003={},_0x115d84={},_0x3a6d92={'count':0x0,'rows':[]};var _0x2a191f=_[_0x04c6('0x26')](db[_0x04c6('0x27')][_0x04c6('0x28')],function(_0x49c4ed){return{'name':_0x49c4ed['fieldName'],'type':_0x49c4ed['type'][_0x04c6('0x29')]};});_0x115d84['model']=_[_0x04c6('0x26')](_0x2a191f,_0x04c6('0x24'));_0x115d84['query']=_[_0x04c6('0x2a')](_0x1cd16a[_0x04c6('0x2b')]);_0x115d84[_0x04c6('0x2c')]=_[_0x04c6('0x2d')](_0x115d84['model'],_0x115d84[_0x04c6('0x2b')]);_0x5c9003[_0x04c6('0x2e')]=_[_0x04c6('0x2d')](_0x115d84[_0x04c6('0x2f')],qs[_0x04c6('0x30')](_0x1cd16a[_0x04c6('0x2b')][_0x04c6('0x30')]));_0x5c9003[_0x04c6('0x2e')]=_0x5c9003[_0x04c6('0x2e')][_0x04c6('0x31')]?_0x5c9003[_0x04c6('0x2e')]:_0x115d84[_0x04c6('0x2f')];if(!_0x1cd16a[_0x04c6('0x2b')][_0x04c6('0x32')](_0x04c6('0x33'))){_0x5c9003['limit']=qs[_0x04c6('0x1a')](_0x1cd16a[_0x04c6('0x2b')][_0x04c6('0x1a')]);_0x5c9003[_0x04c6('0x18')]=qs['offset'](_0x1cd16a[_0x04c6('0x2b')][_0x04c6('0x18')]);}_0x5c9003['order']=qs['sort'](_0x1cd16a['query'][_0x04c6('0x34')]);_0x5c9003[_0x04c6('0x35')]=qs['filters'](_[_0x04c6('0x36')](_0x1cd16a['query'],_0x115d84[_0x04c6('0x2c')]),_0x2a191f);if(_0x1cd16a[_0x04c6('0x2b')][_0x04c6('0x37')]){_0x5c9003[_0x04c6('0x35')]=_['merge'](_0x5c9003['where'],{'$or':_[_0x04c6('0x26')](_0x2a191f,function(_0x3a9a3b){if(_0x3a9a3b['type']!==_0x04c6('0x38')){var _0x5ce4b0={};_0x5ce4b0[_0x3a9a3b['name']]={'$like':'%'+_0x1cd16a[_0x04c6('0x2b')]['filter']+'%'};return _0x5ce4b0;}})});}_0x5c9003=_[_0x04c6('0x39')]({},_0x5c9003,_0x1cd16a[_0x04c6('0x3a')]);var _0x59ca18={'where':_0x5c9003[_0x04c6('0x35')]};return db['UserProfileResource'][_0x04c6('0x1b')](_0x59ca18)[_0x04c6('0x1f')](function(_0x2d83eb){_0x3a6d92[_0x04c6('0x1b')]=_0x2d83eb;if(_0x1cd16a[_0x04c6('0x2b')]['includeAll']){_0x5c9003[_0x04c6('0x3b')]=[{'all':!![]}];}return db['UserProfileResource'][_0x04c6('0x3c')](_0x5c9003);})['then'](function(_0x1f7ead){_0x3a6d92[_0x04c6('0x3d')]=_0x1f7ead;return _0x3a6d92;})[_0x04c6('0x1f')](respondWithFilteredResult(_0x5f1331,_0x5c9003))[_0x04c6('0x3e')](handleError(_0x5f1331,null));};exports[_0x04c6('0x3f')]=function(_0x2cdf34,_0x40477f){var _0x4a3c45={'raw':![],'where':{'id':_0x2cdf34['params']['id']}},_0xdfdc34={};_0xdfdc34[_0x04c6('0x2f')]=_['keys'](db['UserProfileResource'][_0x04c6('0x28')]);_0xdfdc34['query']=_[_0x04c6('0x2a')](_0x2cdf34[_0x04c6('0x2b')]);_0xdfdc34[_0x04c6('0x2c')]=_['intersection'](_0xdfdc34[_0x04c6('0x2f')],_0xdfdc34[_0x04c6('0x2b')]);_0x4a3c45[_0x04c6('0x2e')]=_[_0x04c6('0x2d')](_0xdfdc34[_0x04c6('0x2f')],qs[_0x04c6('0x30')](_0x2cdf34[_0x04c6('0x2b')]['fields']));_0x4a3c45['attributes']=_0x4a3c45[_0x04c6('0x2e')][_0x04c6('0x31')]?_0x4a3c45[_0x04c6('0x2e')]:_0xdfdc34['model'];if(_0x2cdf34[_0x04c6('0x2b')][_0x04c6('0x40')]){_0x4a3c45[_0x04c6('0x3b')]=[{'all':!![]}];}_0x4a3c45=_['merge']({},_0x4a3c45,_0x2cdf34['options']);return db['UserProfileResource'][_0x04c6('0x41')](_0x4a3c45)[_0x04c6('0x1f')](handleEntityNotFound(_0x40477f,null))['then'](respondWithResult(_0x40477f,null))[_0x04c6('0x3e')](handleError(_0x40477f,null));};exports[_0x04c6('0x42')]=function(_0x2bd045,_0x4ef366){return db[_0x04c6('0x27')][_0x04c6('0x42')](_0x2bd045['body'],{})[_0x04c6('0x1f')](respondWithResult(_0x4ef366,0xc9))[_0x04c6('0x3e')](handleError(_0x4ef366,null));};exports[_0x04c6('0x43')]=function(_0xee2822,_0x4cfde2){if(_0xee2822[_0x04c6('0x44')]['id']){delete _0xee2822[_0x04c6('0x44')]['id'];}return db[_0x04c6('0x27')][_0x04c6('0x41')]({'where':{'id':_0xee2822['params']['id']}})[_0x04c6('0x1f')](handleEntityNotFound(_0x4cfde2,null))[_0x04c6('0x1f')](saveUpdates(_0xee2822[_0x04c6('0x44')],null))[_0x04c6('0x1f')](respondWithResult(_0x4cfde2,null))['catch'](handleError(_0x4cfde2,null));};exports[_0x04c6('0x20')]=function(_0x42273e,_0x15ec61){return db['UserProfileResource'][_0x04c6('0x41')]({'where':{'id':_0x42273e[_0x04c6('0x45')]['id']}})[_0x04c6('0x1f')](handleEntityNotFound(_0x15ec61,null))[_0x04c6('0x1f')](removeEntity(_0x15ec61,null))[_0x04c6('0x3e')](handleError(_0x15ec61,null));};exports[_0x04c6('0x46')]=function(_0x1b8fa4,_0x160f91){return db[_0x04c6('0x27')][_0x04c6('0x46')]()[_0x04c6('0x1f')](respondWithResult(_0x160f91,null))[_0x04c6('0x3e')](handleError(_0x160f91,null));}; \ No newline at end of file +var _0xba34=['../../config/utils','../../config/license/util','sendStatus','status','end','json','offset','undefined','limit','count','set','apply','reject','save','update','then','destroy','error','stack','name','send','map','UserProfileResource','rawAttributes','fieldName','type','model','query','keys','filters','intersection','fields','attributes','length','hasOwnProperty','nolimit','order','sort','where','merge','VIRTUAL','filter','options','includeAll','include','findAll','rows','catch','show','find','body','params','describe','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','util','path','sox','to-csv','ejs','fs-extra','lodash','crypto','jsforce','desk.js','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','api'];(function(_0x1d70db,_0x142b63){var _0x3060c6=function(_0x347866){while(--_0x347866){_0x1d70db['push'](_0x1d70db['shift']());}};_0x3060c6(++_0x142b63);}(_0xba34,0x119));var _0x4ba3=function(_0x3308e9,_0x4bd024){_0x3308e9=_0x3308e9-0x0;var _0x50d70a=_0xba34[_0x3308e9];return _0x50d70a;};'use strict';var emlformat=require(_0x4ba3('0x0'));var rimraf=require(_0x4ba3('0x1'));var zipdir=require(_0x4ba3('0x2'));var jsonpatch=require(_0x4ba3('0x3'));var rp=require(_0x4ba3('0x4'));var moment=require('moment');var BPromise=require('bluebird');var Mustache=require('mustache');var util=require(_0x4ba3('0x5'));var path=require(_0x4ba3('0x6'));var sox=require(_0x4ba3('0x7'));var csv=require(_0x4ba3('0x8'));var ejs=require(_0x4ba3('0x9'));var fs=require('fs');var fs_extra=require(_0x4ba3('0xa'));var _=require(_0x4ba3('0xb'));var squel=require('squel');var crypto=require(_0x4ba3('0xc'));var jsforce=require(_0x4ba3('0xd'));var deskjs=require(_0x4ba3('0xe'));var toCsv=require(_0x4ba3('0x8'));var querystring=require(_0x4ba3('0xf'));var Papa=require(_0x4ba3('0x10'));var Redis=require(_0x4ba3('0x11'));var authService=require(_0x4ba3('0x12'));var qs=require(_0x4ba3('0x13'));var as=require(_0x4ba3('0x14'));var hardwareService=require(_0x4ba3('0x15'));var logger=require('../../config/logger')(_0x4ba3('0x16'));var utils=require(_0x4ba3('0x17'));var config=require('../../config/environment');var licenseUtil=require(_0x4ba3('0x18'));var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0x1073d4,_0x52f55c){_0x52f55c=_0x52f55c||0xcc;return function(_0x256f02){if(_0x256f02){return _0x1073d4[_0x4ba3('0x19')](_0x52f55c);}return _0x1073d4[_0x4ba3('0x1a')](_0x52f55c)[_0x4ba3('0x1b')]();};}function respondWithResult(_0x2bc796,_0x3d2ace){_0x3d2ace=_0x3d2ace||0xc8;return function(_0x3a74f7){if(_0x3a74f7){return _0x2bc796[_0x4ba3('0x1a')](_0x3d2ace)[_0x4ba3('0x1c')](_0x3a74f7);}};}function respondWithFilteredResult(_0x401366,_0x36638b){return function(_0x301359){if(_0x301359){var _0x29a9d1=typeof _0x36638b[_0x4ba3('0x1d')]===_0x4ba3('0x1e')&&typeof _0x36638b[_0x4ba3('0x1f')]==='undefined';var _0x382fd0=_0x301359[_0x4ba3('0x20')];var _0x5ff7ce=_0x29a9d1?0x0:_0x36638b[_0x4ba3('0x1d')];var _0x556290=_0x29a9d1?_0x301359[_0x4ba3('0x20')]:_0x36638b[_0x4ba3('0x1d')]+_0x36638b[_0x4ba3('0x1f')];var _0x1e2ce5;if(_0x556290>=_0x382fd0){_0x556290=_0x382fd0;_0x1e2ce5=0xc8;}else{_0x1e2ce5=0xce;}_0x401366[_0x4ba3('0x1a')](_0x1e2ce5);return _0x401366[_0x4ba3('0x21')]('Content-Range',_0x5ff7ce+'-'+_0x556290+'/'+_0x382fd0)['json'](_0x301359);}return null;};}function patchUpdates(_0x2278b0){return function(_0x579d9f){try{jsonpatch[_0x4ba3('0x22')](_0x579d9f,_0x2278b0,!![]);}catch(_0x163967){return BPromise[_0x4ba3('0x23')](_0x163967);}return _0x579d9f[_0x4ba3('0x24')]();};}function saveUpdates(_0x46f1f5,_0x278a23){return function(_0x4a0823){if(_0x4a0823){return _0x4a0823[_0x4ba3('0x25')](_0x46f1f5)[_0x4ba3('0x26')](function(_0x5c28f9){return _0x5c28f9;});}return null;};}function removeEntity(_0x28bb3d,_0x4ffe39){return function(_0x1ae4de){if(_0x1ae4de){return _0x1ae4de[_0x4ba3('0x27')]()[_0x4ba3('0x26')](function(){_0x28bb3d[_0x4ba3('0x1a')](0xcc)[_0x4ba3('0x1b')]();});}};}function handleEntityNotFound(_0xe29a49,_0x159596){return function(_0xe1f7d2){if(!_0xe1f7d2){_0xe29a49[_0x4ba3('0x19')](0x194);}return _0xe1f7d2;};}function handleError(_0x2e67a0,_0x50c729){_0x50c729=_0x50c729||0x1f4;return function(_0x252f37){logger[_0x4ba3('0x28')](_0x252f37[_0x4ba3('0x29')]);if(_0x252f37['name']){delete _0x252f37[_0x4ba3('0x2a')];}_0x2e67a0[_0x4ba3('0x1a')](_0x50c729)[_0x4ba3('0x2b')](_0x252f37);};}exports['index']=function(_0x10cae6,_0x843276){var _0x34ecb4={},_0x22394d={},_0x4a339e={'count':0x0,'rows':[]};var _0x590108=_[_0x4ba3('0x2c')](db[_0x4ba3('0x2d')][_0x4ba3('0x2e')],function(_0x19f039){return{'name':_0x19f039[_0x4ba3('0x2f')],'type':_0x19f039[_0x4ba3('0x30')]['key']};});_0x22394d[_0x4ba3('0x31')]=_[_0x4ba3('0x2c')](_0x590108,_0x4ba3('0x2a'));_0x22394d[_0x4ba3('0x32')]=_[_0x4ba3('0x33')](_0x10cae6[_0x4ba3('0x32')]);_0x22394d[_0x4ba3('0x34')]=_[_0x4ba3('0x35')](_0x22394d[_0x4ba3('0x31')],_0x22394d[_0x4ba3('0x32')]);_0x34ecb4['attributes']=_['intersection'](_0x22394d['model'],qs[_0x4ba3('0x36')](_0x10cae6[_0x4ba3('0x32')][_0x4ba3('0x36')]));_0x34ecb4[_0x4ba3('0x37')]=_0x34ecb4[_0x4ba3('0x37')][_0x4ba3('0x38')]?_0x34ecb4[_0x4ba3('0x37')]:_0x22394d[_0x4ba3('0x31')];if(!_0x10cae6[_0x4ba3('0x32')][_0x4ba3('0x39')](_0x4ba3('0x3a'))){_0x34ecb4[_0x4ba3('0x1f')]=qs['limit'](_0x10cae6[_0x4ba3('0x32')][_0x4ba3('0x1f')]);_0x34ecb4[_0x4ba3('0x1d')]=qs['offset'](_0x10cae6[_0x4ba3('0x32')]['offset']);}_0x34ecb4[_0x4ba3('0x3b')]=qs[_0x4ba3('0x3c')](_0x10cae6[_0x4ba3('0x32')][_0x4ba3('0x3c')]);_0x34ecb4[_0x4ba3('0x3d')]=qs[_0x4ba3('0x34')](_['pick'](_0x10cae6[_0x4ba3('0x32')],_0x22394d[_0x4ba3('0x34')]),_0x590108);if(_0x10cae6[_0x4ba3('0x32')]['filter']){_0x34ecb4[_0x4ba3('0x3d')]=_[_0x4ba3('0x3e')](_0x34ecb4['where'],{'$or':_[_0x4ba3('0x2c')](_0x590108,function(_0x503777){if(_0x503777['type']!==_0x4ba3('0x3f')){var _0x1acc74={};_0x1acc74[_0x503777[_0x4ba3('0x2a')]]={'$like':'%'+_0x10cae6[_0x4ba3('0x32')][_0x4ba3('0x40')]+'%'};return _0x1acc74;}})});}_0x34ecb4=_['merge']({},_0x34ecb4,_0x10cae6[_0x4ba3('0x41')]);var _0x10e4b5={'where':_0x34ecb4[_0x4ba3('0x3d')]};return db[_0x4ba3('0x2d')][_0x4ba3('0x20')](_0x10e4b5)[_0x4ba3('0x26')](function(_0x349af4){_0x4a339e[_0x4ba3('0x20')]=_0x349af4;if(_0x10cae6['query'][_0x4ba3('0x42')]){_0x34ecb4[_0x4ba3('0x43')]=[{'all':!![]}];}return db[_0x4ba3('0x2d')][_0x4ba3('0x44')](_0x34ecb4);})[_0x4ba3('0x26')](function(_0x25b2c9){_0x4a339e[_0x4ba3('0x45')]=_0x25b2c9;return _0x4a339e;})[_0x4ba3('0x26')](respondWithFilteredResult(_0x843276,_0x34ecb4))[_0x4ba3('0x46')](handleError(_0x843276,null));};exports[_0x4ba3('0x47')]=function(_0x3b9a0a,_0x1c58d2){var _0x1d031b={'raw':![],'where':{'id':_0x3b9a0a['params']['id']}},_0x28b649={};_0x28b649['model']=_['keys'](db['UserProfileResource']['rawAttributes']);_0x28b649[_0x4ba3('0x32')]=_['keys'](_0x3b9a0a[_0x4ba3('0x32')]);_0x28b649['filters']=_[_0x4ba3('0x35')](_0x28b649[_0x4ba3('0x31')],_0x28b649[_0x4ba3('0x32')]);_0x1d031b[_0x4ba3('0x37')]=_[_0x4ba3('0x35')](_0x28b649['model'],qs[_0x4ba3('0x36')](_0x3b9a0a['query'][_0x4ba3('0x36')]));_0x1d031b['attributes']=_0x1d031b[_0x4ba3('0x37')][_0x4ba3('0x38')]?_0x1d031b[_0x4ba3('0x37')]:_0x28b649[_0x4ba3('0x31')];if(_0x3b9a0a[_0x4ba3('0x32')][_0x4ba3('0x42')]){_0x1d031b[_0x4ba3('0x43')]=[{'all':!![]}];}_0x1d031b=_['merge']({},_0x1d031b,_0x3b9a0a[_0x4ba3('0x41')]);return db[_0x4ba3('0x2d')][_0x4ba3('0x48')](_0x1d031b)[_0x4ba3('0x26')](handleEntityNotFound(_0x1c58d2,null))[_0x4ba3('0x26')](respondWithResult(_0x1c58d2,null))['catch'](handleError(_0x1c58d2,null));};exports['create']=function(_0xa4bbb2,_0x1fe115){return db[_0x4ba3('0x2d')]['create'](_0xa4bbb2[_0x4ba3('0x49')],{})[_0x4ba3('0x26')](respondWithResult(_0x1fe115,0xc9))[_0x4ba3('0x46')](handleError(_0x1fe115,null));};exports['update']=function(_0x47f588,_0x34dc04){if(_0x47f588['body']['id']){delete _0x47f588[_0x4ba3('0x49')]['id'];}return db[_0x4ba3('0x2d')][_0x4ba3('0x48')]({'where':{'id':_0x47f588[_0x4ba3('0x4a')]['id']}})[_0x4ba3('0x26')](handleEntityNotFound(_0x34dc04,null))[_0x4ba3('0x26')](saveUpdates(_0x47f588['body'],null))[_0x4ba3('0x26')](respondWithResult(_0x34dc04,null))[_0x4ba3('0x46')](handleError(_0x34dc04,null));};exports['destroy']=function(_0x325475,_0x12ae6f){return db[_0x4ba3('0x2d')][_0x4ba3('0x48')]({'where':{'id':_0x325475[_0x4ba3('0x4a')]['id']}})['then'](handleEntityNotFound(_0x12ae6f,null))[_0x4ba3('0x26')](removeEntity(_0x12ae6f,null))[_0x4ba3('0x46')](handleError(_0x12ae6f,null));};exports['describe']=function(_0x43f820,_0x19d70f){return db[_0x4ba3('0x2d')][_0x4ba3('0x4b')]()[_0x4ba3('0x26')](respondWithResult(_0x19d70f,null))[_0x4ba3('0x46')](handleError(_0x19d70f,null));}; \ No newline at end of file diff --git a/server/api/userProfileResource/userProfileResource.model.js b/server/api/userProfileResource/userProfileResource.model.js index e50d68c..0bb4717 100644 --- a/server/api/userProfileResource/userProfileResource.model.js +++ b/server/api/userProfileResource/userProfileResource.model.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x4a26=['UserProfileResource','user_profile_has_resources','compositeIndex','resourceId','sectionId','lodash','util','api','moment','bluebird','path','rimraf','exports','define'];(function(_0x122ef9,_0x451d2a){var _0x42fba0=function(_0x17c9d3){while(--_0x17c9d3){_0x122ef9['push'](_0x122ef9['shift']());}};_0x42fba0(++_0x451d2a);}(_0x4a26,0x18d));var _0x64a2=function(_0x471202,_0x465957){_0x471202=_0x471202-0x0;var _0x1acbe7=_0x4a26[_0x471202];return _0x1acbe7;};'use strict';var _=require(_0x64a2('0x0'));var util=require(_0x64a2('0x1'));var logger=require('../../config/logger')(_0x64a2('0x2'));var moment=require(_0x64a2('0x3'));var BPromise=require(_0x64a2('0x4'));var rp=require('request-promise');var fs=require('fs');var path=require(_0x64a2('0x5'));var rimraf=require(_0x64a2('0x6'));var config=require('../../config/environment');var attributes=require('./userProfileResource.attributes');module[_0x64a2('0x7')]=function(_0x16c13a,_0x5d80b4){return _0x16c13a[_0x64a2('0x8')](_0x64a2('0x9'),attributes,{'tableName':_0x64a2('0xa'),'paranoid':![],'indexes':[{'name':_0x64a2('0xb'),'fields':[_0x64a2('0xc'),_0x64a2('0xd')]}],'timestamps':!![]});}; \ No newline at end of file +var _0xe8e7=['UserProfileResource','compositeIndex','resourceId','sectionId','lodash','util','../../config/logger','moment','bluebird','request-promise','rimraf','../../config/environment','./userProfileResource.attributes','exports','define'];(function(_0x397cfb,_0xb8f317){var _0x15fed9=function(_0x3eba43){while(--_0x3eba43){_0x397cfb['push'](_0x397cfb['shift']());}};_0x15fed9(++_0xb8f317);}(_0xe8e7,0xa9));var _0x7e8e=function(_0x2eeba1,_0x5d496d){_0x2eeba1=_0x2eeba1-0x0;var _0x1d795e=_0xe8e7[_0x2eeba1];return _0x1d795e;};'use strict';var _=require(_0x7e8e('0x0'));var util=require(_0x7e8e('0x1'));var logger=require(_0x7e8e('0x2'))('api');var moment=require(_0x7e8e('0x3'));var BPromise=require(_0x7e8e('0x4'));var rp=require(_0x7e8e('0x5'));var fs=require('fs');var path=require('path');var rimraf=require(_0x7e8e('0x6'));var config=require(_0x7e8e('0x7'));var attributes=require(_0x7e8e('0x8'));module[_0x7e8e('0x9')]=function(_0x340faf,_0x512bc8){return _0x340faf[_0x7e8e('0xa')](_0x7e8e('0xb'),attributes,{'tableName':'user_profile_has_resources','paranoid':![],'indexes':[{'name':_0x7e8e('0xc'),'fields':[_0x7e8e('0xd'),_0x7e8e('0xe')]}],'timestamps':!![]});}; \ No newline at end of file diff --git a/server/api/userProfileResource/userProfileResource.rpc.js b/server/api/userProfileResource/userProfileResource.rpc.js index 51debb5..fafcc93 100644 --- a/server/api/userProfileResource/userProfileResource.rpc.js +++ b/server/api/userProfileResource/userProfileResource.rpc.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x8b30=['randomstring','ioredis','../../mysqldb','../../config/utils','rpc','../../config/environment','jayson/promise','http','then','info','UserProfileResource,\x20%s,\x20%s','request\x20sent','stringify','error','code','message','result','catch','lodash','util','moment','bluebird'];(function(_0x51e79c,_0x51485e){var _0x2467be=function(_0xbf70f0){while(--_0xbf70f0){_0x51e79c['push'](_0x51e79c['shift']());}};_0x2467be(++_0x51485e);}(_0x8b30,0x130));var _0x08b3=function(_0x2faddb,_0xc18b78){_0x2faddb=_0x2faddb-0x0;var _0x273c05=_0x8b30[_0x2faddb];return _0x273c05;};'use strict';var _=require(_0x08b3('0x0'));var util=require(_0x08b3('0x1'));var moment=require(_0x08b3('0x2'));var BPromise=require(_0x08b3('0x3'));var rs=require(_0x08b3('0x4'));var fs=require('fs');var Redis=require(_0x08b3('0x5'));var db=require(_0x08b3('0x6'))['db'];var utils=require(_0x08b3('0x7'));var logger=require('../../config/logger')(_0x08b3('0x8'));var config=require(_0x08b3('0x9'));var jayson=require(_0x08b3('0xa'));var client=jayson['client'][_0x08b3('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x4d8736,_0x3b1510,_0x2341d9){return new BPromise(function(_0x5de763,_0x548be2){return client['request'](_0x4d8736,_0x2341d9)[_0x08b3('0xc')](function(_0xa92bf8){logger[_0x08b3('0xd')](_0x08b3('0xe'),_0x3b1510,_0x08b3('0xf'));logger['debug']('UserProfileResource,\x20%s,\x20%s,\x20%s',_0x3b1510,_0x08b3('0xf'),JSON[_0x08b3('0x10')](_0xa92bf8));if(_0xa92bf8[_0x08b3('0x11')]){if(_0xa92bf8[_0x08b3('0x11')][_0x08b3('0x12')]===0x1f4){logger['error'](_0x08b3('0xe'),_0x3b1510,_0xa92bf8[_0x08b3('0x11')]['message']);return _0x548be2(_0xa92bf8[_0x08b3('0x11')][_0x08b3('0x13')]);}logger[_0x08b3('0x11')](_0x08b3('0xe'),_0x3b1510,_0xa92bf8['error'][_0x08b3('0x13')]);return _0x5de763(_0xa92bf8[_0x08b3('0x11')]['message']);}else{logger[_0x08b3('0xd')](_0x08b3('0xe'),_0x3b1510,_0x08b3('0xf'));_0x5de763(_0xa92bf8[_0x08b3('0x14')][_0x08b3('0x13')]);}})[_0x08b3('0x15')](function(_0x4f571e){logger['error'](_0x08b3('0xe'),_0x3b1510,_0x4f571e);_0x548be2(_0x4f571e);});});} \ No newline at end of file +var _0x2552=['result','catch','moment','bluebird','ioredis','../../mysqldb','../../config/logger','rpc','../../config/environment','jayson/promise','request','info','request\x20sent','debug','stringify','error','UserProfileResource,\x20%s,\x20%s','message'];(function(_0x13b8f3,_0x442821){var _0x1a6d06=function(_0x5126f2){while(--_0x5126f2){_0x13b8f3['push'](_0x13b8f3['shift']());}};_0x1a6d06(++_0x442821);}(_0x2552,0x122));var _0x2255=function(_0x12c406,_0x42c02e){_0x12c406=_0x12c406-0x0;var _0x3fba16=_0x2552[_0x12c406];return _0x3fba16;};'use strict';var _=require('lodash');var util=require('util');var moment=require(_0x2255('0x0'));var BPromise=require(_0x2255('0x1'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x2255('0x2'));var db=require(_0x2255('0x3'))['db'];var utils=require('../../config/utils');var logger=require(_0x2255('0x4'))(_0x2255('0x5'));var config=require(_0x2255('0x6'));var jayson=require(_0x2255('0x7'));var client=jayson['client']['http']({'port':0x232a});function respondWithRpcPromise(_0x5a5904,_0x543414,_0x18b203){return new BPromise(function(_0x26e670,_0x322f2d){return client[_0x2255('0x8')](_0x5a5904,_0x18b203)['then'](function(_0x33484b){logger[_0x2255('0x9')]('UserProfileResource,\x20%s,\x20%s',_0x543414,_0x2255('0xa'));logger[_0x2255('0xb')]('UserProfileResource,\x20%s,\x20%s,\x20%s',_0x543414,'request\x20sent',JSON[_0x2255('0xc')](_0x33484b));if(_0x33484b[_0x2255('0xd')]){if(_0x33484b['error']['code']===0x1f4){logger[_0x2255('0xd')](_0x2255('0xe'),_0x543414,_0x33484b['error'][_0x2255('0xf')]);return _0x322f2d(_0x33484b[_0x2255('0xd')]['message']);}logger[_0x2255('0xd')](_0x2255('0xe'),_0x543414,_0x33484b[_0x2255('0xd')][_0x2255('0xf')]);return _0x26e670(_0x33484b[_0x2255('0xd')][_0x2255('0xf')]);}else{logger[_0x2255('0x9')](_0x2255('0xe'),_0x543414,'request\x20sent');_0x26e670(_0x33484b[_0x2255('0x10')][_0x2255('0xf')]);}})[_0x2255('0x11')](function(_0x2bcc9e){logger['error'](_0x2255('0xe'),_0x543414,_0x2bcc9e);_0x322f2d(_0x2bcc9e);});});} \ No newline at end of file diff --git a/server/api/userProfileSection/index.js b/server/api/userProfileSection/index.js index b7a5f44..743668a 100644 --- a/server/api/userProfileSection/index.js +++ b/server/api/userProfileSection/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x60c2=['/describe','describe','post','create','put','/:id','update','destroy','exports','multer','path','connect-timeout','express','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','./userProfileSection.controller','get','isAuthenticated','index'];(function(_0x30aeb8,_0x31ca3a){var _0x2b4a0f=function(_0x1c6893){while(--_0x1c6893){_0x30aeb8['push'](_0x30aeb8['shift']());}};_0x2b4a0f(++_0x31ca3a);}(_0x60c2,0x183));var _0x260c=function(_0x19e35c,_0x29cd1e){_0x19e35c=_0x19e35c-0x0;var _0x3e1fe8=_0x60c2[_0x19e35c];return _0x3e1fe8;};'use strict';var multer=require(_0x260c('0x0'));var util=require('util');var path=require(_0x260c('0x1'));var timeout=require(_0x260c('0x2'));var express=require(_0x260c('0x3'));var router=express['Router']();var fs_extra=require(_0x260c('0x4'));var auth=require(_0x260c('0x5'));var interaction=require(_0x260c('0x6'));var config=require(_0x260c('0x7'));var controller=require(_0x260c('0x8'));router[_0x260c('0x9')]('/',auth[_0x260c('0xa')](),controller[_0x260c('0xb')]);router[_0x260c('0x9')](_0x260c('0xc'),auth[_0x260c('0xa')](),controller[_0x260c('0xd')]);router[_0x260c('0x9')]('/:id',auth[_0x260c('0xa')](),controller['show']);router[_0x260c('0xe')]('/',auth['isAuthenticated'](),controller[_0x260c('0xf')]);router[_0x260c('0x10')](_0x260c('0x11'),auth['isAuthenticated'](),controller[_0x260c('0x12')]);router['delete'](_0x260c('0x11'),auth['isAuthenticated'](),controller[_0x260c('0x13')]);module[_0x260c('0x14')]=router; \ No newline at end of file +var _0xe542=['connect-timeout','express','../../components/auth/service','../../components/interaction/service','./userProfileSection.controller','isAuthenticated','index','get','/describe','describe','/:id','show','post','create','put','update','delete','exports','util','path'];(function(_0x2deb15,_0x102a17){var _0x1abb33=function(_0x1a1a10){while(--_0x1a1a10){_0x2deb15['push'](_0x2deb15['shift']());}};_0x1abb33(++_0x102a17);}(_0xe542,0x18e));var _0x2e54=function(_0x1f0b55,_0x20360a){_0x1f0b55=_0x1f0b55-0x0;var _0x49df7e=_0xe542[_0x1f0b55];return _0x49df7e;};'use strict';var multer=require('multer');var util=require(_0x2e54('0x0'));var path=require(_0x2e54('0x1'));var timeout=require(_0x2e54('0x2'));var express=require(_0x2e54('0x3'));var router=express['Router']();var fs_extra=require('fs-extra');var auth=require(_0x2e54('0x4'));var interaction=require(_0x2e54('0x5'));var config=require('../../config/environment');var controller=require(_0x2e54('0x6'));router['get']('/',auth[_0x2e54('0x7')](),controller[_0x2e54('0x8')]);router[_0x2e54('0x9')](_0x2e54('0xa'),auth[_0x2e54('0x7')](),controller[_0x2e54('0xb')]);router[_0x2e54('0x9')](_0x2e54('0xc'),auth[_0x2e54('0x7')](),controller[_0x2e54('0xd')]);router[_0x2e54('0xe')]('/',auth[_0x2e54('0x7')](),controller[_0x2e54('0xf')]);router[_0x2e54('0x10')](_0x2e54('0xc'),auth[_0x2e54('0x7')](),controller[_0x2e54('0x11')]);router[_0x2e54('0x12')]('/:id',auth[_0x2e54('0x7')](),controller['destroy']);module[_0x2e54('0x13')]=router; \ No newline at end of file diff --git a/server/api/userProfileSection/userProfileSection.attributes.js b/server/api/userProfileSection/userProfileSection.attributes.js index 279e6b3..5258f02 100644 --- a/server/api/userProfileSection/userProfileSection.attributes.js +++ b/server/api/userProfileSection/userProfileSection.attributes.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x2032=['split','exports','STRING','BOOLEAN','setDataValue','crudPermissions','join','getDataValue'];(function(_0x42d69e,_0x38ce06){var _0xf0a25c=function(_0x194964){while(--_0x194964){_0x42d69e['push'](_0x42d69e['shift']());}};_0xf0a25c(++_0x38ce06);}(_0x2032,0xd9));var _0x2203=function(_0x164e33,_0x397fa5){_0x164e33=_0x164e33-0x0;var _0x17de3a=_0x2032[_0x164e33];return _0x17de3a;};'use strict';var Sequelize=require('sequelize');module[_0x2203('0x0')]={'name':{'type':Sequelize[_0x2203('0x1')],'allowNull':![]},'category':{'type':Sequelize[_0x2203('0x1')],'allowNull':![]},'sectionId':{'type':Sequelize['INTEGER'],'allowNull':![]},'enabled':{'type':Sequelize[_0x2203('0x2')],'defaultValue':null},'autoAssociation':{'type':Sequelize[_0x2203('0x2')],'defaultValue':null},'crudPermissions':{'type':Sequelize['STRING'],'set':function(_0x46c49a){this[_0x2203('0x3')](_0x2203('0x4'),_0x46c49a?_0x46c49a[_0x2203('0x5')](''):[]);},'get':function(){return this[_0x2203('0x6')](_0x2203('0x4'))?this[_0x2203('0x6')](_0x2203('0x4'))[_0x2203('0x7')](''):[];}}}; \ No newline at end of file +var _0x1eba=['join','getDataValue','split','sequelize','exports','STRING','INTEGER','setDataValue','crudPermissions'];(function(_0x2f4076,_0x1dbab7){var _0x474038=function(_0x114f13){while(--_0x114f13){_0x2f4076['push'](_0x2f4076['shift']());}};_0x474038(++_0x1dbab7);}(_0x1eba,0x1d7));var _0xa1eb=function(_0xba1760,_0x191969){_0xba1760=_0xba1760-0x0;var _0x1f3143=_0x1eba[_0xba1760];return _0x1f3143;};'use strict';var Sequelize=require(_0xa1eb('0x0'));module[_0xa1eb('0x1')]={'name':{'type':Sequelize[_0xa1eb('0x2')],'allowNull':![]},'category':{'type':Sequelize[_0xa1eb('0x2')],'allowNull':![]},'sectionId':{'type':Sequelize[_0xa1eb('0x3')],'allowNull':![]},'enabled':{'type':Sequelize['BOOLEAN'],'defaultValue':null},'autoAssociation':{'type':Sequelize['BOOLEAN'],'defaultValue':null},'crudPermissions':{'type':Sequelize[_0xa1eb('0x2')],'set':function(_0x34be5a){this[_0xa1eb('0x4')](_0xa1eb('0x5'),_0x34be5a?_0x34be5a[_0xa1eb('0x6')](''):[]);},'get':function(){return this[_0xa1eb('0x7')](_0xa1eb('0x5'))?this[_0xa1eb('0x7')](_0xa1eb('0x5'))[_0xa1eb('0x8')](''):[];}}}; \ No newline at end of file diff --git a/server/api/userProfileSection/userProfileSection.controller.js b/server/api/userProfileSection/userProfileSection.controller.js index a4a5fef..c192e92 100644 --- a/server/api/userProfileSection/userProfileSection.controller.js +++ b/server/api/userProfileSection/userProfileSection.controller.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xeff0=['limit','sort','where','pick','merge','filter','includeAll','include','rows','catch','params','options','find','create','body','destroy','describe','zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','util','path','sox','to-csv','ejs','lodash','jsforce','desk.js','papaparse','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','../../config/utils','../../config/license/util','../../mysqldb','sendStatus','status','end','json','offset','undefined','count','set','Content-Range','apply','reject','save','update','then','error','name','send','index','UserProfileSection','rawAttributes','fieldName','type','key','map','query','keys','filters','intersection','model','fields','attributes','length','hasOwnProperty','nolimit'];(function(_0x487e2d,_0x1fe8ba){var _0xe4457c=function(_0x394c39){while(--_0x394c39){_0x487e2d['push'](_0x487e2d['shift']());}};_0xe4457c(++_0x1fe8ba);}(_0xeff0,0x183));var _0x0eff=function(_0x3ab51d,_0x2fa01d){_0x3ab51d=_0x3ab51d-0x0;var _0x29a04e=_0xeff0[_0x3ab51d];return _0x29a04e;};'use strict';var emlformat=require('eml-format');var rimraf=require('rimraf');var zipdir=require(_0x0eff('0x0'));var jsonpatch=require(_0x0eff('0x1'));var rp=require(_0x0eff('0x2'));var moment=require(_0x0eff('0x3'));var BPromise=require(_0x0eff('0x4'));var Mustache=require(_0x0eff('0x5'));var util=require(_0x0eff('0x6'));var path=require(_0x0eff('0x7'));var sox=require(_0x0eff('0x8'));var csv=require(_0x0eff('0x9'));var ejs=require(_0x0eff('0xa'));var fs=require('fs');var fs_extra=require('fs-extra');var _=require(_0x0eff('0xb'));var squel=require('squel');var crypto=require('crypto');var jsforce=require(_0x0eff('0xc'));var deskjs=require(_0x0eff('0xd'));var toCsv=require('to-csv');var querystring=require('querystring');var Papa=require(_0x0eff('0xe'));var Redis=require('ioredis');var authService=require(_0x0eff('0xf'));var qs=require(_0x0eff('0x10'));var as=require(_0x0eff('0x11'));var hardwareService=require(_0x0eff('0x12'));var logger=require(_0x0eff('0x13'))('api');var utils=require(_0x0eff('0x14'));var config=require('../../config/environment');var licenseUtil=require(_0x0eff('0x15'));var db=require(_0x0eff('0x16'))['db'];function respondWithStatusCode(_0x1bef62,_0x457221){_0x457221=_0x457221||0xcc;return function(_0x10646e){if(_0x10646e){return _0x1bef62[_0x0eff('0x17')](_0x457221);}return _0x1bef62[_0x0eff('0x18')](_0x457221)[_0x0eff('0x19')]();};}function respondWithResult(_0x2e78b0,_0x4a2945){_0x4a2945=_0x4a2945||0xc8;return function(_0x3bc122){if(_0x3bc122){return _0x2e78b0['status'](_0x4a2945)[_0x0eff('0x1a')](_0x3bc122);}};}function respondWithFilteredResult(_0xf93df2,_0x168da4){return function(_0x4448bb){if(_0x4448bb){var _0x308ff6=typeof _0x168da4[_0x0eff('0x1b')]==='undefined'&&typeof _0x168da4['limit']===_0x0eff('0x1c');var _0x27ecf6=_0x4448bb['count'];var _0x4fdedd=_0x308ff6?0x0:_0x168da4[_0x0eff('0x1b')];var _0x31a053=_0x308ff6?_0x4448bb[_0x0eff('0x1d')]:_0x168da4[_0x0eff('0x1b')]+_0x168da4['limit'];var _0x54f6e7;if(_0x31a053>=_0x27ecf6){_0x31a053=_0x27ecf6;_0x54f6e7=0xc8;}else{_0x54f6e7=0xce;}_0xf93df2['status'](_0x54f6e7);return _0xf93df2[_0x0eff('0x1e')](_0x0eff('0x1f'),_0x4fdedd+'-'+_0x31a053+'/'+_0x27ecf6)[_0x0eff('0x1a')](_0x4448bb);}return null;};}function patchUpdates(_0xcce3a4){return function(_0x343033){try{jsonpatch[_0x0eff('0x20')](_0x343033,_0xcce3a4,!![]);}catch(_0x6b3651){return BPromise[_0x0eff('0x21')](_0x6b3651);}return _0x343033[_0x0eff('0x22')]();};}function saveUpdates(_0x58b695,_0x3f5a39){return function(_0x42093d){if(_0x42093d){return _0x42093d[_0x0eff('0x23')](_0x58b695)[_0x0eff('0x24')](function(_0xce3c9e){return _0xce3c9e;});}return null;};}function removeEntity(_0x4c7760,_0xed47ad){return function(_0x329819){if(_0x329819){return _0x329819['destroy']()['then'](function(){_0x4c7760[_0x0eff('0x18')](0xcc)[_0x0eff('0x19')]();});}};}function handleEntityNotFound(_0x200a66,_0x83fe40){return function(_0x4cd4cf){if(!_0x4cd4cf){_0x200a66[_0x0eff('0x17')](0x194);}return _0x4cd4cf;};}function handleError(_0x4cb6f9,_0xf08a2b){_0xf08a2b=_0xf08a2b||0x1f4;return function(_0x5c62d1){logger[_0x0eff('0x25')](_0x5c62d1['stack']);if(_0x5c62d1[_0x0eff('0x26')]){delete _0x5c62d1[_0x0eff('0x26')];}_0x4cb6f9['status'](_0xf08a2b)[_0x0eff('0x27')](_0x5c62d1);};}exports[_0x0eff('0x28')]=function(_0x1857ae,_0x59c75e){var _0x20963a={},_0x566079={},_0x23fb55={'count':0x0,'rows':[]};var _0x930478=_['map'](db[_0x0eff('0x29')][_0x0eff('0x2a')],function(_0x55f053){return{'name':_0x55f053[_0x0eff('0x2b')],'type':_0x55f053[_0x0eff('0x2c')][_0x0eff('0x2d')]};});_0x566079['model']=_[_0x0eff('0x2e')](_0x930478,_0x0eff('0x26'));_0x566079[_0x0eff('0x2f')]=_[_0x0eff('0x30')](_0x1857ae[_0x0eff('0x2f')]);_0x566079[_0x0eff('0x31')]=_[_0x0eff('0x32')](_0x566079[_0x0eff('0x33')],_0x566079[_0x0eff('0x2f')]);_0x20963a['attributes']=_['intersection'](_0x566079['model'],qs[_0x0eff('0x34')](_0x1857ae[_0x0eff('0x2f')][_0x0eff('0x34')]));_0x20963a[_0x0eff('0x35')]=_0x20963a[_0x0eff('0x35')][_0x0eff('0x36')]?_0x20963a[_0x0eff('0x35')]:_0x566079[_0x0eff('0x33')];if(!_0x1857ae[_0x0eff('0x2f')][_0x0eff('0x37')](_0x0eff('0x38'))){_0x20963a[_0x0eff('0x39')]=qs[_0x0eff('0x39')](_0x1857ae[_0x0eff('0x2f')][_0x0eff('0x39')]);_0x20963a[_0x0eff('0x1b')]=qs[_0x0eff('0x1b')](_0x1857ae[_0x0eff('0x2f')][_0x0eff('0x1b')]);}_0x20963a['order']=qs['sort'](_0x1857ae[_0x0eff('0x2f')][_0x0eff('0x3a')]);_0x20963a[_0x0eff('0x3b')]=qs[_0x0eff('0x31')](_[_0x0eff('0x3c')](_0x1857ae[_0x0eff('0x2f')],_0x566079[_0x0eff('0x31')]),_0x930478);if(_0x1857ae['query']['filter']){_0x20963a[_0x0eff('0x3b')]=_[_0x0eff('0x3d')](_0x20963a[_0x0eff('0x3b')],{'$or':_['map'](_0x930478,function(_0xa82347){if(_0xa82347[_0x0eff('0x2c')]!=='VIRTUAL'){var _0x54f498={};_0x54f498[_0xa82347[_0x0eff('0x26')]]={'$like':'%'+_0x1857ae['query'][_0x0eff('0x3e')]+'%'};return _0x54f498;}})});}_0x20963a=_['merge']({},_0x20963a,_0x1857ae['options']);var _0x121e2b={'where':_0x20963a[_0x0eff('0x3b')]};return db[_0x0eff('0x29')][_0x0eff('0x1d')](_0x121e2b)[_0x0eff('0x24')](function(_0x313e15){_0x23fb55[_0x0eff('0x1d')]=_0x313e15;if(_0x1857ae[_0x0eff('0x2f')][_0x0eff('0x3f')]){_0x20963a[_0x0eff('0x40')]=[{'all':!![]}];}return db['UserProfileSection']['findAll'](_0x20963a);})[_0x0eff('0x24')](function(_0x5ce7de){_0x23fb55[_0x0eff('0x41')]=_0x5ce7de;return _0x23fb55;})[_0x0eff('0x24')](respondWithFilteredResult(_0x59c75e,_0x20963a))[_0x0eff('0x42')](handleError(_0x59c75e,null));};exports['show']=function(_0x4b58d4,_0x43c3d7){var _0x2cee47={'raw':![],'where':{'id':_0x4b58d4[_0x0eff('0x43')]['id']}},_0x58ad7e={};_0x58ad7e['model']=_[_0x0eff('0x30')](db['UserProfileSection'][_0x0eff('0x2a')]);_0x58ad7e[_0x0eff('0x2f')]=_[_0x0eff('0x30')](_0x4b58d4[_0x0eff('0x2f')]);_0x58ad7e['filters']=_[_0x0eff('0x32')](_0x58ad7e['model'],_0x58ad7e[_0x0eff('0x2f')]);_0x2cee47['attributes']=_[_0x0eff('0x32')](_0x58ad7e[_0x0eff('0x33')],qs[_0x0eff('0x34')](_0x4b58d4[_0x0eff('0x2f')][_0x0eff('0x34')]));_0x2cee47['attributes']=_0x2cee47['attributes'][_0x0eff('0x36')]?_0x2cee47[_0x0eff('0x35')]:_0x58ad7e[_0x0eff('0x33')];if(_0x4b58d4['query'][_0x0eff('0x3f')]){_0x2cee47[_0x0eff('0x40')]=[{'all':!![]}];}_0x2cee47=_['merge']({},_0x2cee47,_0x4b58d4[_0x0eff('0x44')]);return db[_0x0eff('0x29')][_0x0eff('0x45')](_0x2cee47)[_0x0eff('0x24')](handleEntityNotFound(_0x43c3d7,null))[_0x0eff('0x24')](respondWithResult(_0x43c3d7,null))[_0x0eff('0x42')](handleError(_0x43c3d7,null));};exports[_0x0eff('0x46')]=function(_0x273f62,_0x3dc1ac){return db[_0x0eff('0x29')][_0x0eff('0x46')](_0x273f62['body'],{})['then'](respondWithResult(_0x3dc1ac,0xc9))[_0x0eff('0x42')](handleError(_0x3dc1ac,null));};exports[_0x0eff('0x23')]=function(_0x2ed1c6,_0x1c2601){if(_0x2ed1c6['body']['id']){delete _0x2ed1c6['body']['id'];}return db[_0x0eff('0x29')][_0x0eff('0x45')]({'where':{'id':_0x2ed1c6[_0x0eff('0x43')]['id']}})['then'](handleEntityNotFound(_0x1c2601,null))[_0x0eff('0x24')](saveUpdates(_0x2ed1c6[_0x0eff('0x47')],null))['then'](respondWithResult(_0x1c2601,null))[_0x0eff('0x42')](handleError(_0x1c2601,null));};exports[_0x0eff('0x48')]=function(_0x297ef4,_0x2a70ff){return db['UserProfileSection']['find']({'where':{'id':_0x297ef4[_0x0eff('0x43')]['id']}})[_0x0eff('0x24')](handleEntityNotFound(_0x2a70ff,null))[_0x0eff('0x24')](removeEntity(_0x2a70ff,null))[_0x0eff('0x42')](handleError(_0x2a70ff,null));};exports[_0x0eff('0x49')]=function(_0x9d9eca,_0x9ffe8){return db['UserProfileSection']['describe']()[_0x0eff('0x24')](respondWithResult(_0x9ffe8,null))['catch'](handleError(_0x9ffe8,null));}; \ No newline at end of file +var _0xdf81=['map','UserProfileSection','rawAttributes','fieldName','type','key','model','query','intersection','attributes','hasOwnProperty','nolimit','limit','order','sort','filters','filter','where','merge','VIRTUAL','options','includeAll','include','findAll','rows','catch','show','params','keys','fields','length','create','body','find','describe','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','mustache','util','path','to-csv','ejs','fs-extra','lodash','squel','crypto','jsforce','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/license/util','sendStatus','status','json','offset','undefined','count','set','Content-Range','apply','then','end','stack','name','send'];(function(_0x49a6ba,_0xbafa08){var _0x136d13=function(_0x2a8aca){while(--_0x2a8aca){_0x49a6ba['push'](_0x49a6ba['shift']());}};_0x136d13(++_0xbafa08);}(_0xdf81,0xb7));var _0x1df8=function(_0x5627e1,_0x1b2dbf){_0x5627e1=_0x5627e1-0x0;var _0x2f013f=_0xdf81[_0x5627e1];return _0x2f013f;};'use strict';var emlformat=require(_0x1df8('0x0'));var rimraf=require(_0x1df8('0x1'));var zipdir=require(_0x1df8('0x2'));var jsonpatch=require(_0x1df8('0x3'));var rp=require(_0x1df8('0x4'));var moment=require(_0x1df8('0x5'));var BPromise=require('bluebird');var Mustache=require(_0x1df8('0x6'));var util=require(_0x1df8('0x7'));var path=require(_0x1df8('0x8'));var sox=require('sox');var csv=require(_0x1df8('0x9'));var ejs=require(_0x1df8('0xa'));var fs=require('fs');var fs_extra=require(_0x1df8('0xb'));var _=require(_0x1df8('0xc'));var squel=require(_0x1df8('0xd'));var crypto=require(_0x1df8('0xe'));var jsforce=require(_0x1df8('0xf'));var deskjs=require('desk.js');var toCsv=require(_0x1df8('0x9'));var querystring=require('querystring');var Papa=require('papaparse');var Redis=require(_0x1df8('0x10'));var authService=require(_0x1df8('0x11'));var qs=require(_0x1df8('0x12'));var as=require(_0x1df8('0x13'));var hardwareService=require(_0x1df8('0x14'));var logger=require(_0x1df8('0x15'))(_0x1df8('0x16'));var utils=require(_0x1df8('0x17'));var config=require('../../config/environment');var licenseUtil=require(_0x1df8('0x18'));var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0x4d12a2,_0x5eb0ea){_0x5eb0ea=_0x5eb0ea||0xcc;return function(_0x31e03d){if(_0x31e03d){return _0x4d12a2[_0x1df8('0x19')](_0x5eb0ea);}return _0x4d12a2[_0x1df8('0x1a')](_0x5eb0ea)['end']();};}function respondWithResult(_0x66b3c6,_0x20f22e){_0x20f22e=_0x20f22e||0xc8;return function(_0x4c779d){if(_0x4c779d){return _0x66b3c6[_0x1df8('0x1a')](_0x20f22e)[_0x1df8('0x1b')](_0x4c779d);}};}function respondWithFilteredResult(_0x480b94,_0x4cb03b){return function(_0x42a1ea){if(_0x42a1ea){var _0x258184=typeof _0x4cb03b[_0x1df8('0x1c')]===_0x1df8('0x1d')&&typeof _0x4cb03b['limit']===_0x1df8('0x1d');var _0x4c1b7b=_0x42a1ea['count'];var _0xf0bd84=_0x258184?0x0:_0x4cb03b[_0x1df8('0x1c')];var _0x5e0260=_0x258184?_0x42a1ea[_0x1df8('0x1e')]:_0x4cb03b[_0x1df8('0x1c')]+_0x4cb03b['limit'];var _0x5caba2;if(_0x5e0260>=_0x4c1b7b){_0x5e0260=_0x4c1b7b;_0x5caba2=0xc8;}else{_0x5caba2=0xce;}_0x480b94[_0x1df8('0x1a')](_0x5caba2);return _0x480b94[_0x1df8('0x1f')](_0x1df8('0x20'),_0xf0bd84+'-'+_0x5e0260+'/'+_0x4c1b7b)['json'](_0x42a1ea);}return null;};}function patchUpdates(_0x23489b){return function(_0x1d465b){try{jsonpatch[_0x1df8('0x21')](_0x1d465b,_0x23489b,!![]);}catch(_0x40aa5c){return BPromise['reject'](_0x40aa5c);}return _0x1d465b['save']();};}function saveUpdates(_0x499a58,_0x123fc3){return function(_0x8c837d){if(_0x8c837d){return _0x8c837d['update'](_0x499a58)[_0x1df8('0x22')](function(_0x3783d7){return _0x3783d7;});}return null;};}function removeEntity(_0x540b95,_0xe2d8b5){return function(_0x1884aa){if(_0x1884aa){return _0x1884aa['destroy']()['then'](function(){_0x540b95[_0x1df8('0x1a')](0xcc)[_0x1df8('0x23')]();});}};}function handleEntityNotFound(_0x758b97,_0x279baa){return function(_0x4aead4){if(!_0x4aead4){_0x758b97[_0x1df8('0x19')](0x194);}return _0x4aead4;};}function handleError(_0x6e7832,_0x39f84e){_0x39f84e=_0x39f84e||0x1f4;return function(_0x11cbc0){logger['error'](_0x11cbc0[_0x1df8('0x24')]);if(_0x11cbc0[_0x1df8('0x25')]){delete _0x11cbc0['name'];}_0x6e7832[_0x1df8('0x1a')](_0x39f84e)[_0x1df8('0x26')](_0x11cbc0);};}exports['index']=function(_0x46c466,_0x17d0e8){var _0x516272={},_0x3a5647={},_0xb3a88c={'count':0x0,'rows':[]};var _0xaa5a9a=_[_0x1df8('0x27')](db[_0x1df8('0x28')][_0x1df8('0x29')],function(_0x271fb5){return{'name':_0x271fb5[_0x1df8('0x2a')],'type':_0x271fb5[_0x1df8('0x2b')][_0x1df8('0x2c')]};});_0x3a5647[_0x1df8('0x2d')]=_[_0x1df8('0x27')](_0xaa5a9a,'name');_0x3a5647[_0x1df8('0x2e')]=_['keys'](_0x46c466[_0x1df8('0x2e')]);_0x3a5647['filters']=_[_0x1df8('0x2f')](_0x3a5647[_0x1df8('0x2d')],_0x3a5647[_0x1df8('0x2e')]);_0x516272[_0x1df8('0x30')]=_[_0x1df8('0x2f')](_0x3a5647[_0x1df8('0x2d')],qs['fields'](_0x46c466[_0x1df8('0x2e')]['fields']));_0x516272[_0x1df8('0x30')]=_0x516272[_0x1df8('0x30')]['length']?_0x516272['attributes']:_0x3a5647[_0x1df8('0x2d')];if(!_0x46c466[_0x1df8('0x2e')][_0x1df8('0x31')](_0x1df8('0x32'))){_0x516272[_0x1df8('0x33')]=qs[_0x1df8('0x33')](_0x46c466[_0x1df8('0x2e')][_0x1df8('0x33')]);_0x516272[_0x1df8('0x1c')]=qs[_0x1df8('0x1c')](_0x46c466[_0x1df8('0x2e')]['offset']);}_0x516272[_0x1df8('0x34')]=qs[_0x1df8('0x35')](_0x46c466[_0x1df8('0x2e')][_0x1df8('0x35')]);_0x516272['where']=qs[_0x1df8('0x36')](_['pick'](_0x46c466[_0x1df8('0x2e')],_0x3a5647[_0x1df8('0x36')]),_0xaa5a9a);if(_0x46c466[_0x1df8('0x2e')][_0x1df8('0x37')]){_0x516272[_0x1df8('0x38')]=_[_0x1df8('0x39')](_0x516272[_0x1df8('0x38')],{'$or':_['map'](_0xaa5a9a,function(_0xcdc69e){if(_0xcdc69e[_0x1df8('0x2b')]!==_0x1df8('0x3a')){var _0x55181e={};_0x55181e[_0xcdc69e[_0x1df8('0x25')]]={'$like':'%'+_0x46c466['query'][_0x1df8('0x37')]+'%'};return _0x55181e;}})});}_0x516272=_[_0x1df8('0x39')]({},_0x516272,_0x46c466[_0x1df8('0x3b')]);var _0x1dbe13={'where':_0x516272['where']};return db['UserProfileSection'][_0x1df8('0x1e')](_0x1dbe13)[_0x1df8('0x22')](function(_0x53cf7c){_0xb3a88c[_0x1df8('0x1e')]=_0x53cf7c;if(_0x46c466[_0x1df8('0x2e')][_0x1df8('0x3c')]){_0x516272[_0x1df8('0x3d')]=[{'all':!![]}];}return db['UserProfileSection'][_0x1df8('0x3e')](_0x516272);})[_0x1df8('0x22')](function(_0x1f57d8){_0xb3a88c[_0x1df8('0x3f')]=_0x1f57d8;return _0xb3a88c;})[_0x1df8('0x22')](respondWithFilteredResult(_0x17d0e8,_0x516272))[_0x1df8('0x40')](handleError(_0x17d0e8,null));};exports[_0x1df8('0x41')]=function(_0x1352ce,_0x13e2e5){var _0x2da9f6={'raw':![],'where':{'id':_0x1352ce[_0x1df8('0x42')]['id']}},_0x3b46fc={};_0x3b46fc[_0x1df8('0x2d')]=_[_0x1df8('0x43')](db[_0x1df8('0x28')][_0x1df8('0x29')]);_0x3b46fc['query']=_['keys'](_0x1352ce['query']);_0x3b46fc[_0x1df8('0x36')]=_['intersection'](_0x3b46fc['model'],_0x3b46fc['query']);_0x2da9f6['attributes']=_['intersection'](_0x3b46fc[_0x1df8('0x2d')],qs['fields'](_0x1352ce[_0x1df8('0x2e')][_0x1df8('0x44')]));_0x2da9f6[_0x1df8('0x30')]=_0x2da9f6['attributes'][_0x1df8('0x45')]?_0x2da9f6[_0x1df8('0x30')]:_0x3b46fc[_0x1df8('0x2d')];if(_0x1352ce['query'][_0x1df8('0x3c')]){_0x2da9f6[_0x1df8('0x3d')]=[{'all':!![]}];}_0x2da9f6=_[_0x1df8('0x39')]({},_0x2da9f6,_0x1352ce[_0x1df8('0x3b')]);return db['UserProfileSection']['find'](_0x2da9f6)[_0x1df8('0x22')](handleEntityNotFound(_0x13e2e5,null))[_0x1df8('0x22')](respondWithResult(_0x13e2e5,null))['catch'](handleError(_0x13e2e5,null));};exports[_0x1df8('0x46')]=function(_0x1a53d2,_0x2a2d1e){return db['UserProfileSection'][_0x1df8('0x46')](_0x1a53d2[_0x1df8('0x47')],{})[_0x1df8('0x22')](respondWithResult(_0x2a2d1e,0xc9))[_0x1df8('0x40')](handleError(_0x2a2d1e,null));};exports['update']=function(_0x3c2e33,_0x17d009){if(_0x3c2e33[_0x1df8('0x47')]['id']){delete _0x3c2e33['body']['id'];}return db['UserProfileSection'][_0x1df8('0x48')]({'where':{'id':_0x3c2e33['params']['id']}})['then'](handleEntityNotFound(_0x17d009,null))[_0x1df8('0x22')](saveUpdates(_0x3c2e33[_0x1df8('0x47')],null))[_0x1df8('0x22')](respondWithResult(_0x17d009,null))['catch'](handleError(_0x17d009,null));};exports['destroy']=function(_0x5cb8d7,_0x21ede5){return db[_0x1df8('0x28')]['find']({'where':{'id':_0x5cb8d7['params']['id']}})[_0x1df8('0x22')](handleEntityNotFound(_0x21ede5,null))['then'](removeEntity(_0x21ede5,null))[_0x1df8('0x40')](handleError(_0x21ede5,null));};exports[_0x1df8('0x49')]=function(_0x5d47da,_0x5a4d15){return db[_0x1df8('0x28')]['describe']()[_0x1df8('0x22')](respondWithResult(_0x5a4d15,null))['catch'](handleError(_0x5a4d15,null));}; \ No newline at end of file diff --git a/server/api/userProfileSection/userProfileSection.model.js b/server/api/userProfileSection/userProfileSection.model.js index afd5db1..eb02eab 100644 --- a/server/api/userProfileSection/userProfileSection.model.js +++ b/server/api/userProfileSection/userProfileSection.model.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x5387=['sectionId','lodash','api','moment','bluebird','request-promise','path','rimraf','./userProfileSection.attributes','exports','define','UserProfileSection','compositeIndex'];(function(_0x5ad220,_0x27407e){var _0xdec77d=function(_0x58d736){while(--_0x58d736){_0x5ad220['push'](_0x5ad220['shift']());}};_0xdec77d(++_0x27407e);}(_0x5387,0x146));var _0x7538=function(_0x4e7d1e,_0x48d31c){_0x4e7d1e=_0x4e7d1e-0x0;var _0x1df0de=_0x5387[_0x4e7d1e];return _0x1df0de;};'use strict';var _=require(_0x7538('0x0'));var util=require('util');var logger=require('../../config/logger')(_0x7538('0x1'));var moment=require(_0x7538('0x2'));var BPromise=require(_0x7538('0x3'));var rp=require(_0x7538('0x4'));var fs=require('fs');var path=require(_0x7538('0x5'));var rimraf=require(_0x7538('0x6'));var config=require('../../config/environment');var attributes=require(_0x7538('0x7'));module[_0x7538('0x8')]=function(_0x10baeb,_0xb230f4){return _0x10baeb[_0x7538('0x9')](_0x7538('0xa'),attributes,{'tableName':'user_profile_has_sections','paranoid':![],'indexes':[{'name':_0x7538('0xb'),'fields':[_0x7538('0xc'),'userProfileId']}],'timestamps':!![]});}; \ No newline at end of file +var _0xe030=['UserProfileSection','user_profile_has_sections','compositeIndex','userProfileId','lodash','util','../../config/logger','api','bluebird','request-promise','../../config/environment','exports'];(function(_0x4eb168,_0x209d1f){var _0x130fac=function(_0x516a31){while(--_0x516a31){_0x4eb168['push'](_0x4eb168['shift']());}};_0x130fac(++_0x209d1f);}(_0xe030,0xdc));var _0x0e03=function(_0x2335e6,_0x1bade8){_0x2335e6=_0x2335e6-0x0;var _0x370a50=_0xe030[_0x2335e6];return _0x370a50;};'use strict';var _=require(_0x0e03('0x0'));var util=require(_0x0e03('0x1'));var logger=require(_0x0e03('0x2'))(_0x0e03('0x3'));var moment=require('moment');var BPromise=require(_0x0e03('0x4'));var rp=require(_0x0e03('0x5'));var fs=require('fs');var path=require('path');var rimraf=require('rimraf');var config=require(_0x0e03('0x6'));var attributes=require('./userProfileSection.attributes');module[_0x0e03('0x7')]=function(_0x5232d0,_0x1cbb58){return _0x5232d0['define'](_0x0e03('0x8'),attributes,{'tableName':_0x0e03('0x9'),'paranoid':![],'indexes':[{'name':_0x0e03('0xa'),'fields':['sectionId',_0x0e03('0xb')]}],'timestamps':!![]});}; \ No newline at end of file diff --git a/server/api/userProfileSection/userProfileSection.rpc.js b/server/api/userProfileSection/userProfileSection.rpc.js index a82be47..cb67f65 100644 --- a/server/api/userProfileSection/userProfileSection.rpc.js +++ b/server/api/userProfileSection/userProfileSection.rpc.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x8d81=['request','then','info','UserProfileSection,\x20%s,\x20%s','request\x20sent','debug','UserProfileSection,\x20%s,\x20%s,\x20%s','stringify','error','message','result','catch','lodash','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','jayson/promise','client'];(function(_0x138f59,_0x1b53fb){var _0x3d114d=function(_0x1f9461){while(--_0x1f9461){_0x138f59['push'](_0x138f59['shift']());}};_0x3d114d(++_0x1b53fb);}(_0x8d81,0xe4));var _0x18d8=function(_0x2deb8e,_0x3127e6){_0x2deb8e=_0x2deb8e-0x0;var _0x2a8577=_0x8d81[_0x2deb8e];return _0x2a8577;};'use strict';var _=require(_0x18d8('0x0'));var util=require(_0x18d8('0x1'));var moment=require(_0x18d8('0x2'));var BPromise=require(_0x18d8('0x3'));var rs=require(_0x18d8('0x4'));var fs=require('fs');var Redis=require(_0x18d8('0x5'));var db=require(_0x18d8('0x6'))['db'];var utils=require(_0x18d8('0x7'));var logger=require(_0x18d8('0x8'))(_0x18d8('0x9'));var config=require('../../config/environment');var jayson=require(_0x18d8('0xa'));var client=jayson[_0x18d8('0xb')]['http']({'port':0x232a});function respondWithRpcPromise(_0x4f4b83,_0xe0d14c,_0x51cb53){return new BPromise(function(_0x1127c6,_0x14e1ef){return client[_0x18d8('0xc')](_0x4f4b83,_0x51cb53)[_0x18d8('0xd')](function(_0x3da3d0){logger[_0x18d8('0xe')](_0x18d8('0xf'),_0xe0d14c,_0x18d8('0x10'));logger[_0x18d8('0x11')](_0x18d8('0x12'),_0xe0d14c,_0x18d8('0x10'),JSON[_0x18d8('0x13')](_0x3da3d0));if(_0x3da3d0[_0x18d8('0x14')]){if(_0x3da3d0[_0x18d8('0x14')]['code']===0x1f4){logger[_0x18d8('0x14')]('UserProfileSection,\x20%s,\x20%s',_0xe0d14c,_0x3da3d0['error'][_0x18d8('0x15')]);return _0x14e1ef(_0x3da3d0[_0x18d8('0x14')][_0x18d8('0x15')]);}logger['error'](_0x18d8('0xf'),_0xe0d14c,_0x3da3d0[_0x18d8('0x14')][_0x18d8('0x15')]);return _0x1127c6(_0x3da3d0[_0x18d8('0x14')][_0x18d8('0x15')]);}else{logger[_0x18d8('0xe')](_0x18d8('0xf'),_0xe0d14c,_0x18d8('0x10'));_0x1127c6(_0x3da3d0[_0x18d8('0x16')][_0x18d8('0x15')]);}})[_0x18d8('0x17')](function(_0x5cbc74){logger['error']('UserProfileSection,\x20%s,\x20%s',_0xe0d14c,_0x5cbc74);_0x14e1ef(_0x5cbc74);});});} \ No newline at end of file +var _0xfc98=['randomstring','../../mysqldb','../../config/utils','../../config/logger','rpc','jayson/promise','client','request','then','info','UserProfileSection,\x20%s,\x20%s','request\x20sent','UserProfileSection,\x20%s,\x20%s,\x20%s','stringify','error','message','result','lodash','moment'];(function(_0x316b36,_0x157b33){var _0x245f4d=function(_0x438fab){while(--_0x438fab){_0x316b36['push'](_0x316b36['shift']());}};_0x245f4d(++_0x157b33);}(_0xfc98,0x154));var _0x8fc9=function(_0x4b369d,_0x265eb8){_0x4b369d=_0x4b369d-0x0;var _0x571a98=_0xfc98[_0x4b369d];return _0x571a98;};'use strict';var _=require(_0x8fc9('0x0'));var util=require('util');var moment=require(_0x8fc9('0x1'));var BPromise=require('bluebird');var rs=require(_0x8fc9('0x2'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0x8fc9('0x3'))['db'];var utils=require(_0x8fc9('0x4'));var logger=require(_0x8fc9('0x5'))(_0x8fc9('0x6'));var config=require('../../config/environment');var jayson=require(_0x8fc9('0x7'));var client=jayson[_0x8fc9('0x8')]['http']({'port':0x232a});function respondWithRpcPromise(_0x300d07,_0x2b8b4a,_0x45658f){return new BPromise(function(_0x47de8c,_0xa2a202){return client[_0x8fc9('0x9')](_0x300d07,_0x45658f)[_0x8fc9('0xa')](function(_0x287549){logger[_0x8fc9('0xb')](_0x8fc9('0xc'),_0x2b8b4a,_0x8fc9('0xd'));logger['debug'](_0x8fc9('0xe'),_0x2b8b4a,'request\x20sent',JSON[_0x8fc9('0xf')](_0x287549));if(_0x287549['error']){if(_0x287549[_0x8fc9('0x10')]['code']===0x1f4){logger[_0x8fc9('0x10')]('UserProfileSection,\x20%s,\x20%s',_0x2b8b4a,_0x287549[_0x8fc9('0x10')][_0x8fc9('0x11')]);return _0xa2a202(_0x287549[_0x8fc9('0x10')]['message']);}logger['error']('UserProfileSection,\x20%s,\x20%s',_0x2b8b4a,_0x287549['error'][_0x8fc9('0x11')]);return _0x47de8c(_0x287549['error'][_0x8fc9('0x11')]);}else{logger[_0x8fc9('0xb')](_0x8fc9('0xc'),_0x2b8b4a,'request\x20sent');_0x47de8c(_0x287549[_0x8fc9('0x12')][_0x8fc9('0x11')]);}})['catch'](function(_0x2ed94d){logger[_0x8fc9('0x10')](_0x8fc9('0xc'),_0x2b8b4a,_0x2ed94d);_0xa2a202(_0x2ed94d);});});} \ No newline at end of file diff --git a/server/api/userSmsQueue/index.js b/server/api/userSmsQueue/index.js index 2191618..7537bae 100644 --- a/server/api/userSmsQueue/index.js +++ b/server/api/userSmsQueue/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xd8b0=['Router','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','multer','util'];(function(_0x4e707e,_0x208eb5){var _0x3d346e=function(_0xd1f767){while(--_0xd1f767){_0x4e707e['push'](_0x4e707e['shift']());}};_0x3d346e(++_0x208eb5);}(_0xd8b0,0xad));var _0x0d8b=function(_0x122ef9,_0x451d2a){_0x122ef9=_0x122ef9-0x0;var _0x42fba0=_0xd8b0[_0x122ef9];return _0x42fba0;};'use strict';var multer=require(_0x0d8b('0x0'));var util=require(_0x0d8b('0x1'));var path=require('path');var timeout=require('connect-timeout');var express=require('express');var router=express[_0x0d8b('0x2')]();var fs_extra=require(_0x0d8b('0x3'));var auth=require(_0x0d8b('0x4'));var interaction=require(_0x0d8b('0x5'));var config=require(_0x0d8b('0x6'));module['exports']=router; \ No newline at end of file +var _0x0713=['../../config/environment','exports','path','connect-timeout','express','Router','fs-extra','../../components/interaction/service'];(function(_0x4d217,_0x5ba0fc){var _0x323f17=function(_0x5ba07e){while(--_0x5ba07e){_0x4d217['push'](_0x4d217['shift']());}};_0x323f17(++_0x5ba0fc);}(_0x0713,0x1ba));var _0x3071=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0x0713[_0x3dd15e];return _0x231fd0;};'use strict';var multer=require('multer');var util=require('util');var path=require(_0x3071('0x0'));var timeout=require(_0x3071('0x1'));var express=require(_0x3071('0x2'));var router=express[_0x3071('0x3')]();var fs_extra=require(_0x3071('0x4'));var auth=require('../../components/auth/service');var interaction=require(_0x3071('0x5'));var config=require(_0x3071('0x6'));module[_0x3071('0x7')]=router; \ No newline at end of file diff --git a/server/api/userSmsQueue/userSmsQueue.attributes.js b/server/api/userSmsQueue/userSmsQueue.attributes.js index d91a3dc..e44893e 100644 --- a/server/api/userSmsQueue/userSmsQueue.attributes.js +++ b/server/api/userSmsQueue/userSmsQueue.attributes.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x4491=['INTEGER','sequelize'];(function(_0x19e35c,_0x29cd1e){var _0x3e1fe8=function(_0x17258b){while(--_0x17258b){_0x19e35c['push'](_0x19e35c['shift']());}};_0x3e1fe8(++_0x29cd1e);}(_0x4491,0x1bb));var _0x1449=function(_0x405f08,_0x15595a){_0x405f08=_0x405f08-0x0;var _0x19ef0c=_0x4491[_0x405f08];return _0x19ef0c;};'use strict';var Sequelize=require(_0x1449('0x0'));module['exports']={'penalty':{'type':Sequelize[_0x1449('0x1')],'defaultValue':0x0}}; \ No newline at end of file +var _0x4790=['INTEGER'];(function(_0x240261,_0x4fe66c){var _0x45c332=function(_0x4f367a){while(--_0x4f367a){_0x240261['push'](_0x240261['shift']());}};_0x45c332(++_0x4fe66c);}(_0x4790,0x105));var _0x0479=function(_0x55e839,_0x3b5345){_0x55e839=_0x55e839-0x0;var _0x39c61a=_0x4790[_0x55e839];return _0x39c61a;};'use strict';var Sequelize=require('sequelize');module['exports']={'penalty':{'type':Sequelize[_0x0479('0x0')],'defaultValue':0x0}}; \ No newline at end of file diff --git a/server/api/userSmsQueue/userSmsQueue.model.js b/server/api/userSmsQueue/userSmsQueue.model.js index a78e74e..2797e17 100644 --- a/server/api/userSmsQueue/userSmsQueue.model.js +++ b/server/api/userSmsQueue/userSmsQueue.model.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x3e24=['util','../../config/logger','api','moment','request-promise','path','../../config/environment','./userSmsQueue.attributes','exports','define','UserSmsQueue','lodash'];(function(_0x184cec,_0x49cfa7){var _0x270619=function(_0x57eddc){while(--_0x57eddc){_0x184cec['push'](_0x184cec['shift']());}};_0x270619(++_0x49cfa7);}(_0x3e24,0x167));var _0x43e2=function(_0xefc497,_0x297122){_0xefc497=_0xefc497-0x0;var _0x3c2f0d=_0x3e24[_0xefc497];return _0x3c2f0d;};'use strict';var _=require(_0x43e2('0x0'));var util=require(_0x43e2('0x1'));var logger=require(_0x43e2('0x2'))(_0x43e2('0x3'));var moment=require(_0x43e2('0x4'));var BPromise=require('bluebird');var rp=require(_0x43e2('0x5'));var fs=require('fs');var path=require(_0x43e2('0x6'));var rimraf=require('rimraf');var config=require(_0x43e2('0x7'));var attributes=require(_0x43e2('0x8'));module[_0x43e2('0x9')]=function(_0x28b144,_0x43b5a7){return _0x28b144[_0x43e2('0xa')](_0x43e2('0xb'),attributes,{'tableName':'user_has_sms_queues','paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file +var _0x524e=['define','UserSmsQueue','../../config/logger','api','moment','bluebird','request-promise','path','rimraf','../../config/environment','./userSmsQueue.attributes','exports'];(function(_0x5e6c6b,_0x394668){var _0x14a242=function(_0x5dc425){while(--_0x5dc425){_0x5e6c6b['push'](_0x5e6c6b['shift']());}};_0x14a242(++_0x394668);}(_0x524e,0x15e));var _0xe524=function(_0x140e67,_0x1c5b64){_0x140e67=_0x140e67-0x0;var _0x5e3feb=_0x524e[_0x140e67];return _0x5e3feb;};'use strict';var _=require('lodash');var util=require('util');var logger=require(_0xe524('0x0'))(_0xe524('0x1'));var moment=require(_0xe524('0x2'));var BPromise=require(_0xe524('0x3'));var rp=require(_0xe524('0x4'));var fs=require('fs');var path=require(_0xe524('0x5'));var rimraf=require(_0xe524('0x6'));var config=require(_0xe524('0x7'));var attributes=require(_0xe524('0x8'));module[_0xe524('0x9')]=function(_0x4f75d6,_0xaaeaa9){return _0x4f75d6[_0xe524('0xa')](_0xe524('0xb'),attributes,{'tableName':'user_has_sms_queues','paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file diff --git a/server/api/userSmsQueue/userSmsQueue.rpc.js b/server/api/userSmsQueue/userSmsQueue.rpc.js index b37145b..760cb0d 100644 --- a/server/api/userSmsQueue/userSmsQueue.rpc.js +++ b/server/api/userSmsQueue/userSmsQueue.rpc.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xe728=['request\x20sent','debug','UserSmsQueue,\x20%s,\x20%s,\x20%s','error','code','UserSmsQueue,\x20%s,\x20%s','message','info','catch','moment','bluebird','randomstring','../../config/logger','rpc','../../config/environment','client','http','then'];(function(_0x256b72,_0x340985){var _0x2183e3=function(_0xf7fd37){while(--_0xf7fd37){_0x256b72['push'](_0x256b72['shift']());}};_0x2183e3(++_0x340985);}(_0xe728,0xbd));var _0x8e72=function(_0x137ad2,_0x55c5e2){_0x137ad2=_0x137ad2-0x0;var _0x245700=_0xe728[_0x137ad2];return _0x245700;};'use strict';var _=require('lodash');var util=require('util');var moment=require(_0x8e72('0x0'));var BPromise=require(_0x8e72('0x1'));var rs=require(_0x8e72('0x2'));var fs=require('fs');var Redis=require('ioredis');var db=require('../../mysqldb')['db'];var utils=require('../../config/utils');var logger=require(_0x8e72('0x3'))(_0x8e72('0x4'));var config=require(_0x8e72('0x5'));var jayson=require('jayson/promise');var client=jayson[_0x8e72('0x6')][_0x8e72('0x7')]({'port':0x232a});function respondWithRpcPromise(_0x4d0947,_0x10e0c8,_0x38f7ee){return new BPromise(function(_0x26ee6d,_0x507843){return client['request'](_0x4d0947,_0x38f7ee)[_0x8e72('0x8')](function(_0x15581f){logger['info']('UserSmsQueue,\x20%s,\x20%s',_0x10e0c8,_0x8e72('0x9'));logger[_0x8e72('0xa')](_0x8e72('0xb'),_0x10e0c8,_0x8e72('0x9'),JSON['stringify'](_0x15581f));if(_0x15581f['error']){if(_0x15581f[_0x8e72('0xc')][_0x8e72('0xd')]===0x1f4){logger['error']('UserSmsQueue,\x20%s,\x20%s',_0x10e0c8,_0x15581f[_0x8e72('0xc')]['message']);return _0x507843(_0x15581f[_0x8e72('0xc')]['message']);}logger[_0x8e72('0xc')](_0x8e72('0xe'),_0x10e0c8,_0x15581f[_0x8e72('0xc')][_0x8e72('0xf')]);return _0x26ee6d(_0x15581f['error'][_0x8e72('0xf')]);}else{logger[_0x8e72('0x10')](_0x8e72('0xe'),_0x10e0c8,'request\x20sent');_0x26ee6d(_0x15581f['result'][_0x8e72('0xf')]);}})[_0x8e72('0x11')](function(_0x380da8){logger['error'](_0x8e72('0xe'),_0x10e0c8,_0x380da8);_0x507843(_0x380da8);});});} \ No newline at end of file +var _0x7d98=['debug','UserSmsQueue,\x20%s,\x20%s,\x20%s','stringify','error','message','result','catch','lodash','util','moment','bluebird','ioredis','../../config/logger','rpc','../../config/environment','client','http','request','then','info','UserSmsQueue,\x20%s,\x20%s','request\x20sent'];(function(_0x15c261,_0x2b170a){var _0x3b059b=function(_0x494edf){while(--_0x494edf){_0x15c261['push'](_0x15c261['shift']());}};_0x3b059b(++_0x2b170a);}(_0x7d98,0x167));var _0x87d9=function(_0x2ca2d0,_0x3ea8e4){_0x2ca2d0=_0x2ca2d0-0x0;var _0x521c23=_0x7d98[_0x2ca2d0];return _0x521c23;};'use strict';var _=require(_0x87d9('0x0'));var util=require(_0x87d9('0x1'));var moment=require(_0x87d9('0x2'));var BPromise=require(_0x87d9('0x3'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x87d9('0x4'));var db=require('../../mysqldb')['db'];var utils=require('../../config/utils');var logger=require(_0x87d9('0x5'))(_0x87d9('0x6'));var config=require(_0x87d9('0x7'));var jayson=require('jayson/promise');var client=jayson[_0x87d9('0x8')][_0x87d9('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x426c0c,_0x247eb7,_0x5b565a){return new BPromise(function(_0x33c506,_0xcd73d8){return client[_0x87d9('0xa')](_0x426c0c,_0x5b565a)[_0x87d9('0xb')](function(_0x51d9df){logger[_0x87d9('0xc')](_0x87d9('0xd'),_0x247eb7,_0x87d9('0xe'));logger[_0x87d9('0xf')](_0x87d9('0x10'),_0x247eb7,_0x87d9('0xe'),JSON[_0x87d9('0x11')](_0x51d9df));if(_0x51d9df[_0x87d9('0x12')]){if(_0x51d9df[_0x87d9('0x12')]['code']===0x1f4){logger[_0x87d9('0x12')]('UserSmsQueue,\x20%s,\x20%s',_0x247eb7,_0x51d9df[_0x87d9('0x12')]['message']);return _0xcd73d8(_0x51d9df['error'][_0x87d9('0x13')]);}logger[_0x87d9('0x12')](_0x87d9('0xd'),_0x247eb7,_0x51d9df[_0x87d9('0x12')]['message']);return _0x33c506(_0x51d9df[_0x87d9('0x12')][_0x87d9('0x13')]);}else{logger[_0x87d9('0xc')](_0x87d9('0xd'),_0x247eb7,_0x87d9('0xe'));_0x33c506(_0x51d9df[_0x87d9('0x14')]['message']);}})[_0x87d9('0x15')](function(_0x4b655c){logger[_0x87d9('0x12')]('UserSmsQueue,\x20%s,\x20%s',_0x247eb7,_0x4b655c);_0xcd73d8(_0x4b655c);});});} \ No newline at end of file diff --git a/server/api/userVoicePrefix/userVoicePrefix.attributes.js b/server/api/userVoicePrefix/userVoicePrefix.attributes.js index 9437f53..ed9a06a 100644 --- a/server/api/userVoicePrefix/userVoicePrefix.attributes.js +++ b/server/api/userVoicePrefix/userVoicePrefix.attributes.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xf82a=['exports'];(function(_0x5de41d,_0x4bcd7b){var _0x48b82c=function(_0x3572cb){while(--_0x3572cb){_0x5de41d['push'](_0x5de41d['shift']());}};_0x48b82c(++_0x4bcd7b);}(_0xf82a,0x172));var _0xaf82=function(_0x4b8d0e,_0x2b313b){_0x4b8d0e=_0x4b8d0e-0x0;var _0x37f1e9=_0xf82a[_0x4b8d0e];return _0x37f1e9;};'use strict';var Sequelize=require('sequelize');module[_0xaf82('0x0')]={'UserId':{'type':Sequelize['INTEGER']},'VoicePrefixId':{'type':Sequelize['INTEGER']}}; \ No newline at end of file +var _0x27e4=['sequelize','exports'];(function(_0x24e3cf,_0x3f5c23){var _0x52dde0=function(_0x5be91a){while(--_0x5be91a){_0x24e3cf['push'](_0x24e3cf['shift']());}};_0x52dde0(++_0x3f5c23);}(_0x27e4,0x112));var _0x427e=function(_0x304f00,_0x7deb5a){_0x304f00=_0x304f00-0x0;var _0x3de226=_0x27e4[_0x304f00];return _0x3de226;};'use strict';var Sequelize=require(_0x427e('0x0'));module[_0x427e('0x1')]={'UserId':{'type':Sequelize['INTEGER']},'VoicePrefixId':{'type':Sequelize['INTEGER']}}; \ No newline at end of file diff --git a/server/api/userVoicePrefix/userVoicePrefix.model.js b/server/api/userVoicePrefix/userVoicePrefix.model.js index 15578ca..b07d189 100644 --- a/server/api/userVoicePrefix/userVoicePrefix.model.js +++ b/server/api/userVoicePrefix/userVoicePrefix.model.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xa9e0=['../../config/environment','./userVoicePrefix.attributes','exports','define','UserVoicePrefix','lodash','util','../../config/logger','bluebird','path','rimraf'];(function(_0x1f9df1,_0xbb7dd2){var _0x4df6c1=function(_0x4d2638){while(--_0x4d2638){_0x1f9df1['push'](_0x1f9df1['shift']());}};_0x4df6c1(++_0xbb7dd2);}(_0xa9e0,0x123));var _0x0a9e=function(_0x4dbaad,_0x730318){_0x4dbaad=_0x4dbaad-0x0;var _0x226c72=_0xa9e0[_0x4dbaad];return _0x226c72;};'use strict';var _=require(_0x0a9e('0x0'));var util=require(_0x0a9e('0x1'));var logger=require(_0x0a9e('0x2'))('api');var moment=require('moment');var BPromise=require(_0x0a9e('0x3'));var rp=require('request-promise');var fs=require('fs');var path=require(_0x0a9e('0x4'));var rimraf=require(_0x0a9e('0x5'));var config=require(_0x0a9e('0x6'));var attributes=require(_0x0a9e('0x7'));module[_0x0a9e('0x8')]=function(_0x57b080,_0x219af0){return _0x57b080[_0x0a9e('0x9')](_0x0a9e('0xa'),attributes,{'tableName':'user_has_voice_prefixes','paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file +var _0xa9e0=['../../config/environment','./userVoicePrefix.attributes','exports','define','UserVoicePrefix','lodash','util','../../config/logger','bluebird','path','rimraf'];(function(_0x4d26a2,_0x2c8147){var _0x393900=function(_0x569be5){while(--_0x569be5){_0x4d26a2['push'](_0x4d26a2['shift']());}};_0x393900(++_0x2c8147);}(_0xa9e0,0x123));var _0x0a9e=function(_0x5b644e,_0x2e5e07){_0x5b644e=_0x5b644e-0x0;var _0x49c6bf=_0xa9e0[_0x5b644e];return _0x49c6bf;};'use strict';var _=require(_0x0a9e('0x0'));var util=require(_0x0a9e('0x1'));var logger=require(_0x0a9e('0x2'))('api');var moment=require('moment');var BPromise=require(_0x0a9e('0x3'));var rp=require('request-promise');var fs=require('fs');var path=require(_0x0a9e('0x4'));var rimraf=require(_0x0a9e('0x5'));var config=require(_0x0a9e('0x6'));var attributes=require(_0x0a9e('0x7'));module[_0x0a9e('0x8')]=function(_0x57b080,_0x219af0){return _0x57b080[_0x0a9e('0x9')](_0x0a9e('0xa'),attributes,{'tableName':'user_has_voice_prefixes','paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file diff --git a/server/api/userVoiceQueue/index.js b/server/api/userVoiceQueue/index.js index 7c7d8a7..80f6dd6 100644 --- a/server/api/userVoiceQueue/index.js +++ b/server/api/userVoiceQueue/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xcb91=['express','Router','../../components/auth/service','../../components/interaction/service','exports','path','connect-timeout'];(function(_0x1e45a6,_0x3c33c7){var _0x1bc4a8=function(_0x224e62){while(--_0x224e62){_0x1e45a6['push'](_0x1e45a6['shift']());}};_0x1bc4a8(++_0x3c33c7);}(_0xcb91,0x1a9));var _0x1cb9=function(_0x5951e8,_0x42b9a7){_0x5951e8=_0x5951e8-0x0;var _0x20a1f5=_0xcb91[_0x5951e8];return _0x20a1f5;};'use strict';var multer=require('multer');var util=require('util');var path=require(_0x1cb9('0x0'));var timeout=require(_0x1cb9('0x1'));var express=require(_0x1cb9('0x2'));var router=express[_0x1cb9('0x3')]();var fs_extra=require('fs-extra');var auth=require(_0x1cb9('0x4'));var interaction=require(_0x1cb9('0x5'));var config=require('../../config/environment');module[_0x1cb9('0x6')]=router; \ No newline at end of file +var _0xe706=['../../components/interaction/service','../../config/environment','exports','multer','util','path','express','Router','fs-extra','../../components/auth/service'];(function(_0x13b5b7,_0x56f34b){var _0x979f53=function(_0x56c39a){while(--_0x56c39a){_0x13b5b7['push'](_0x13b5b7['shift']());}};_0x979f53(++_0x56f34b);}(_0xe706,0xa3));var _0x6e70=function(_0x239b5e,_0x208a3f){_0x239b5e=_0x239b5e-0x0;var _0x577f3d=_0xe706[_0x239b5e];return _0x577f3d;};'use strict';var multer=require(_0x6e70('0x0'));var util=require(_0x6e70('0x1'));var path=require(_0x6e70('0x2'));var timeout=require('connect-timeout');var express=require(_0x6e70('0x3'));var router=express[_0x6e70('0x4')]();var fs_extra=require(_0x6e70('0x5'));var auth=require(_0x6e70('0x6'));var interaction=require(_0x6e70('0x7'));var config=require(_0x6e70('0x8'));module[_0x6e70('0x9')]=router; \ No newline at end of file diff --git a/server/api/userVoiceQueue/userVoiceQueue.attributes.js b/server/api/userVoiceQueue/userVoiceQueue.attributes.js index 79c8261..d930c9e 100644 --- a/server/api/userVoiceQueue/userVoiceQueue.attributes.js +++ b/server/api/userVoiceQueue/userVoiceQueue.attributes.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x8af3=['sequelize','exports'];(function(_0x5b678c,_0x437344){var _0x27dc6f=function(_0x5ad0fe){while(--_0x5ad0fe){_0x5b678c['push'](_0x5b678c['shift']());}};_0x27dc6f(++_0x437344);}(_0x8af3,0x140));var _0x38af=function(_0xe0cd40,_0x3dad3b){_0xe0cd40=_0xe0cd40-0x0;var _0x1f6ef7=_0x8af3[_0xe0cd40];return _0x1f6ef7;};'use strict';var Sequelize=require(_0x38af('0x0'));module[_0x38af('0x1')]={'penalty':{'type':Sequelize['INTEGER'],'defaultValue':0x0}}; \ No newline at end of file +var _0x34b4=['exports','INTEGER','sequelize'];(function(_0x47c492,_0x311a27){var _0x32105d=function(_0x5b0289){while(--_0x5b0289){_0x47c492['push'](_0x47c492['shift']());}};_0x32105d(++_0x311a27);}(_0x34b4,0x155));var _0x434b=function(_0x1dbf86,_0x5be767){_0x1dbf86=_0x1dbf86-0x0;var _0x2c035a=_0x34b4[_0x1dbf86];return _0x2c035a;};'use strict';var Sequelize=require(_0x434b('0x0'));module[_0x434b('0x1')]={'penalty':{'type':Sequelize[_0x434b('0x2')],'defaultValue':0x0}}; \ No newline at end of file diff --git a/server/api/userVoiceQueue/userVoiceQueue.model.js b/server/api/userVoiceQueue/userVoiceQueue.model.js index 43b2c24..1b021f9 100644 --- a/server/api/userVoiceQueue/userVoiceQueue.model.js +++ b/server/api/userVoiceQueue/userVoiceQueue.model.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x764f=['user_has_voice_queues','util','../../config/logger','api','moment','bluebird','request-promise','path','rimraf','../../config/environment','exports','define','UserVoiceQueue'];(function(_0x3511d3,_0x4107ae){var _0x5d6321=function(_0x1a23da){while(--_0x1a23da){_0x3511d3['push'](_0x3511d3['shift']());}};_0x5d6321(++_0x4107ae);}(_0x764f,0x69));var _0xf764=function(_0x35f00b,_0x2fc72a){_0x35f00b=_0x35f00b-0x0;var _0x6ed845=_0x764f[_0x35f00b];return _0x6ed845;};'use strict';var _=require('lodash');var util=require(_0xf764('0x0'));var logger=require(_0xf764('0x1'))(_0xf764('0x2'));var moment=require(_0xf764('0x3'));var BPromise=require(_0xf764('0x4'));var rp=require(_0xf764('0x5'));var fs=require('fs');var path=require(_0xf764('0x6'));var rimraf=require(_0xf764('0x7'));var config=require(_0xf764('0x8'));var attributes=require('./userVoiceQueue.attributes');module[_0xf764('0x9')]=function(_0x5d91f1,_0x5d32c3){return _0x5d91f1[_0xf764('0xa')](_0xf764('0xb'),attributes,{'tableName':_0xf764('0xc'),'paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file +var _0x781f=['rimraf','../../config/environment','./userVoiceQueue.attributes','exports','define','UserVoiceQueue','user_has_voice_queues','lodash','util','api','bluebird','request-promise','path'];(function(_0x3a1ea5,_0x349f01){var _0xfac9b2=function(_0xd5310c){while(--_0xd5310c){_0x3a1ea5['push'](_0x3a1ea5['shift']());}};_0xfac9b2(++_0x349f01);}(_0x781f,0x13f));var _0xf781=function(_0x51b0dc,_0x5307b7){_0x51b0dc=_0x51b0dc-0x0;var _0x13fa89=_0x781f[_0x51b0dc];return _0x13fa89;};'use strict';var _=require(_0xf781('0x0'));var util=require(_0xf781('0x1'));var logger=require('../../config/logger')(_0xf781('0x2'));var moment=require('moment');var BPromise=require(_0xf781('0x3'));var rp=require(_0xf781('0x4'));var fs=require('fs');var path=require(_0xf781('0x5'));var rimraf=require(_0xf781('0x6'));var config=require(_0xf781('0x7'));var attributes=require(_0xf781('0x8'));module[_0xf781('0x9')]=function(_0x1e9c0e,_0x41c82b){return _0x1e9c0e[_0xf781('0xa')](_0xf781('0xb'),attributes,{'tableName':_0xf781('0xc'),'paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file diff --git a/server/api/userVoiceQueue/userVoiceQueue.rpc.js b/server/api/userVoiceQueue/userVoiceQueue.rpc.js index 3c8a9fc..5acc51f 100644 --- a/server/api/userVoiceQueue/userVoiceQueue.rpc.js +++ b/server/api/userVoiceQueue/userVoiceQueue.rpc.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x1c5a=['stringify','error','code','message','info','result','catch','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','jayson/promise','client','http','request','then','UserVoiceQueue,\x20%s,\x20%s','request\x20sent','debug','UserVoiceQueue,\x20%s,\x20%s,\x20%s'];(function(_0x3e04f7,_0x2a0457){var _0x2c1d33=function(_0x59af99){while(--_0x59af99){_0x3e04f7['push'](_0x3e04f7['shift']());}};_0x2c1d33(++_0x2a0457);}(_0x1c5a,0xcf));var _0xa1c5=function(_0x422905,_0x3bce3a){_0x422905=_0x422905-0x0;var _0x33dc6c=_0x1c5a[_0x422905];return _0x33dc6c;};'use strict';var _=require('lodash');var util=require(_0xa1c5('0x0'));var moment=require(_0xa1c5('0x1'));var BPromise=require(_0xa1c5('0x2'));var rs=require(_0xa1c5('0x3'));var fs=require('fs');var Redis=require(_0xa1c5('0x4'));var db=require(_0xa1c5('0x5'))['db'];var utils=require(_0xa1c5('0x6'));var logger=require(_0xa1c5('0x7'))(_0xa1c5('0x8'));var config=require('../../config/environment');var jayson=require(_0xa1c5('0x9'));var client=jayson[_0xa1c5('0xa')][_0xa1c5('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x35b458,_0xf47701,_0x2483c4){return new BPromise(function(_0x3ab1a3,_0x333e9b){return client[_0xa1c5('0xc')](_0x35b458,_0x2483c4)[_0xa1c5('0xd')](function(_0x5685d5){logger['info'](_0xa1c5('0xe'),_0xf47701,_0xa1c5('0xf'));logger[_0xa1c5('0x10')](_0xa1c5('0x11'),_0xf47701,_0xa1c5('0xf'),JSON[_0xa1c5('0x12')](_0x5685d5));if(_0x5685d5['error']){if(_0x5685d5[_0xa1c5('0x13')][_0xa1c5('0x14')]===0x1f4){logger[_0xa1c5('0x13')](_0xa1c5('0xe'),_0xf47701,_0x5685d5[_0xa1c5('0x13')][_0xa1c5('0x15')]);return _0x333e9b(_0x5685d5[_0xa1c5('0x13')]['message']);}logger[_0xa1c5('0x13')](_0xa1c5('0xe'),_0xf47701,_0x5685d5[_0xa1c5('0x13')][_0xa1c5('0x15')]);return _0x3ab1a3(_0x5685d5[_0xa1c5('0x13')]['message']);}else{logger[_0xa1c5('0x16')](_0xa1c5('0xe'),_0xf47701,_0xa1c5('0xf'));_0x3ab1a3(_0x5685d5[_0xa1c5('0x17')]['message']);}})[_0xa1c5('0x18')](function(_0x30c4d5){logger[_0xa1c5('0x13')](_0xa1c5('0xe'),_0xf47701,_0x30c4d5);_0x333e9b(_0x30c4d5);});});} \ No newline at end of file +var _0xab6e=['debug','stringify','error','code','message','request\x20sent','result','lodash','util','moment','randomstring','ioredis','rpc','../../config/environment','jayson/promise','client','http','request','then','UserVoiceQueue,\x20%s,\x20%s'];(function(_0x47e7cb,_0x4c1b8d){var _0x2a8874=function(_0x36498f){while(--_0x36498f){_0x47e7cb['push'](_0x47e7cb['shift']());}};_0x2a8874(++_0x4c1b8d);}(_0xab6e,0x93));var _0xeab6=function(_0x7c1a77,_0x1cefe3){_0x7c1a77=_0x7c1a77-0x0;var _0x3496d7=_0xab6e[_0x7c1a77];return _0x3496d7;};'use strict';var _=require(_0xeab6('0x0'));var util=require(_0xeab6('0x1'));var moment=require(_0xeab6('0x2'));var BPromise=require('bluebird');var rs=require(_0xeab6('0x3'));var fs=require('fs');var Redis=require(_0xeab6('0x4'));var db=require('../../mysqldb')['db'];var utils=require('../../config/utils');var logger=require('../../config/logger')(_0xeab6('0x5'));var config=require(_0xeab6('0x6'));var jayson=require(_0xeab6('0x7'));var client=jayson[_0xeab6('0x8')][_0xeab6('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x383f39,_0x280d00,_0x39b948){return new BPromise(function(_0x42c3d9,_0x3f3eb2){return client[_0xeab6('0xa')](_0x383f39,_0x39b948)[_0xeab6('0xb')](function(_0x5063e6){logger['info'](_0xeab6('0xc'),_0x280d00,'request\x20sent');logger[_0xeab6('0xd')]('UserVoiceQueue,\x20%s,\x20%s,\x20%s',_0x280d00,'request\x20sent',JSON[_0xeab6('0xe')](_0x5063e6));if(_0x5063e6[_0xeab6('0xf')]){if(_0x5063e6[_0xeab6('0xf')][_0xeab6('0x10')]===0x1f4){logger[_0xeab6('0xf')](_0xeab6('0xc'),_0x280d00,_0x5063e6[_0xeab6('0xf')][_0xeab6('0x11')]);return _0x3f3eb2(_0x5063e6['error'][_0xeab6('0x11')]);}logger[_0xeab6('0xf')]('UserVoiceQueue,\x20%s,\x20%s',_0x280d00,_0x5063e6[_0xeab6('0xf')][_0xeab6('0x11')]);return _0x42c3d9(_0x5063e6[_0xeab6('0xf')][_0xeab6('0x11')]);}else{logger['info'](_0xeab6('0xc'),_0x280d00,_0xeab6('0x12'));_0x42c3d9(_0x5063e6[_0xeab6('0x13')][_0xeab6('0x11')]);}})['catch'](function(_0x1fe331){logger[_0xeab6('0xf')]('UserVoiceQueue,\x20%s,\x20%s',_0x280d00,_0x1fe331);_0x3f3eb2(_0x1fe331);});});} \ No newline at end of file diff --git a/server/api/userVoiceQueueRt/index.js b/server/api/userVoiceQueueRt/index.js index e5aab66..f66a7fe 100644 --- a/server/api/userVoiceQueueRt/index.js +++ b/server/api/userVoiceQueueRt/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x0713=['../../config/environment','exports','path','connect-timeout','express','Router','fs-extra','../../components/interaction/service'];(function(_0x47a98b,_0x46a403){var _0x43dacf=function(_0x1ba48c){while(--_0x1ba48c){_0x47a98b['push'](_0x47a98b['shift']());}};_0x43dacf(++_0x46a403);}(_0x0713,0x1ba));var _0x3071=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0x0713[_0x3dd15e];return _0x231fd0;};'use strict';var multer=require('multer');var util=require('util');var path=require(_0x3071('0x0'));var timeout=require(_0x3071('0x1'));var express=require(_0x3071('0x2'));var router=express[_0x3071('0x3')]();var fs_extra=require(_0x3071('0x4'));var auth=require('../../components/auth/service');var interaction=require(_0x3071('0x5'));var config=require(_0x3071('0x6'));module[_0x3071('0x7')]=router; \ No newline at end of file +var _0xedd9=['util','path','connect-timeout','express','Router','fs-extra','../../components/auth/service','../../components/interaction/service','exports'];(function(_0x3e28cd,_0x19506c){var _0x5d30c1=function(_0x18c8d1){while(--_0x18c8d1){_0x3e28cd['push'](_0x3e28cd['shift']());}};_0x5d30c1(++_0x19506c);}(_0xedd9,0xfc));var _0x9edd=function(_0x93d7e0,_0x3ecdf4){_0x93d7e0=_0x93d7e0-0x0;var _0x1e93e8=_0xedd9[_0x93d7e0];return _0x1e93e8;};'use strict';var multer=require('multer');var util=require(_0x9edd('0x0'));var path=require(_0x9edd('0x1'));var timeout=require(_0x9edd('0x2'));var express=require(_0x9edd('0x3'));var router=express[_0x9edd('0x4')]();var fs_extra=require(_0x9edd('0x5'));var auth=require(_0x9edd('0x6'));var interaction=require(_0x9edd('0x7'));var config=require('../../config/environment');module[_0x9edd('0x8')]=router; \ No newline at end of file diff --git a/server/api/userVoiceQueueRt/userVoiceQueueRt.attributes.js b/server/api/userVoiceQueueRt/userVoiceQueueRt.attributes.js index 29341c4..82a34a9 100644 --- a/server/api/userVoiceQueueRt/userVoiceQueueRt.attributes.js +++ b/server/api/userVoiceQueueRt/userVoiceQueueRt.attributes.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x0496=['INTEGER','Required\x20by\x20Asterisk','STRING','queue_interface','sequelize'];(function(_0x552c27,_0x478dc2){var _0x2a0922=function(_0x22617c){while(--_0x22617c){_0x552c27['push'](_0x552c27['shift']());}};_0x2a0922(++_0x478dc2);}(_0x0496,0x199));var _0x6049=function(_0x12d65e,_0x145df2){_0x12d65e=_0x12d65e-0x0;var _0x5dbf8a=_0x0496[_0x12d65e];return _0x5dbf8a;};'use strict';var Sequelize=require(_0x6049('0x0'));module['exports']={'uniqueid':{'type':Sequelize[_0x6049('0x1')],'primaryKey':!![],'autoIncrement':!![],'comment':_0x6049('0x2')},'membername':{'type':Sequelize[_0x6049('0x3')],'allowNull':![],'comment':_0x6049('0x2')},'UserId':{'type':Sequelize[_0x6049('0x1')],'allowNull':![]},'queue_name':{'type':Sequelize[_0x6049('0x3')],'allowNull':![],'unique':'queue_interface','comment':_0x6049('0x2')},'VoiceQueueId':{'type':Sequelize[_0x6049('0x1')],'allowNull':![]},'interface':{'type':Sequelize[_0x6049('0x3')],'allowNull':![],'unique':_0x6049('0x4'),'comment':_0x6049('0x2')},'penalty':{'type':Sequelize[_0x6049('0x1')](0xb),'defaultValue':0x0,'comment':_0x6049('0x2')},'paused':{'type':Sequelize[_0x6049('0x1')](0xb),'defaultValue':0x0,'comment':_0x6049('0x2')}}; \ No newline at end of file +var _0xf64f=['sequelize','INTEGER','Required\x20by\x20Asterisk','STRING','queue_interface'];(function(_0x3f7dc3,_0x1cacbc){var _0xf50a6c=function(_0x3f04c0){while(--_0x3f04c0){_0x3f7dc3['push'](_0x3f7dc3['shift']());}};_0xf50a6c(++_0x1cacbc);}(_0xf64f,0xb4));var _0xff64=function(_0x18425d,_0x37470d){_0x18425d=_0x18425d-0x0;var _0x32611e=_0xf64f[_0x18425d];return _0x32611e;};'use strict';var Sequelize=require(_0xff64('0x0'));module['exports']={'uniqueid':{'type':Sequelize[_0xff64('0x1')],'primaryKey':!![],'autoIncrement':!![],'comment':_0xff64('0x2')},'membername':{'type':Sequelize[_0xff64('0x3')],'allowNull':![],'comment':_0xff64('0x2')},'UserId':{'type':Sequelize[_0xff64('0x1')],'allowNull':![]},'queue_name':{'type':Sequelize[_0xff64('0x3')],'allowNull':![],'unique':'queue_interface','comment':_0xff64('0x2')},'VoiceQueueId':{'type':Sequelize[_0xff64('0x1')],'allowNull':![]},'interface':{'type':Sequelize[_0xff64('0x3')],'allowNull':![],'unique':_0xff64('0x4'),'comment':'Required\x20by\x20Asterisk'},'penalty':{'type':Sequelize[_0xff64('0x1')](0xb),'defaultValue':0x0,'comment':_0xff64('0x2')},'paused':{'type':Sequelize['INTEGER'](0xb),'defaultValue':0x0,'comment':_0xff64('0x2')}}; \ No newline at end of file diff --git a/server/api/userVoiceQueueRt/userVoiceQueueRt.events.js b/server/api/userVoiceQueueRt/userVoiceQueueRt.events.js index 8170870..8d63d24 100644 --- a/server/api/userVoiceQueueRt/userVoiceQueueRt.events.js +++ b/server/api/userVoiceQueueRt/userVoiceQueueRt.events.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x86a2=['remove','emit','hook','exports','../../mysqldb','setMaxListeners','save','update'];(function(_0x1e89ff,_0x1b13d5){var _0x21d495=function(_0x12cd4a){while(--_0x12cd4a){_0x1e89ff['push'](_0x1e89ff['shift']());}};_0x21d495(++_0x1b13d5);}(_0x86a2,0x11c));var _0x286a=function(_0x2406b4,_0x2f9771){_0x2406b4=_0x2406b4-0x0;var _0x7f3752=_0x86a2[_0x2406b4];return _0x7f3752;};'use strict';var EventEmitter=require('events');var UserVoiceQueueRt=require(_0x286a('0x0'))['db']['UserVoiceQueueRt'];var UserVoiceQueueRtEvents=new EventEmitter();UserVoiceQueueRtEvents[_0x286a('0x1')](0x0);var events={'afterCreate':_0x286a('0x2'),'afterUpdate':_0x286a('0x3'),'afterDestroy':_0x286a('0x4')};function emitEvent(_0x411013){return function(_0x1f4474,_0x1001c7,_0xa0d595){UserVoiceQueueRtEvents[_0x286a('0x5')](_0x411013+':'+_0x1f4474['id'],_0x1f4474);UserVoiceQueueRtEvents['emit'](_0x411013,_0x1f4474);_0xa0d595(null);};}for(var e in events){if(events['hasOwnProperty'](e)){var event=events[e];UserVoiceQueueRt[_0x286a('0x6')](e,emitEvent(event));}}module[_0x286a('0x7')]=UserVoiceQueueRtEvents; \ No newline at end of file +var _0x1092=['events','../../mysqldb','UserVoiceQueueRt','setMaxListeners','save','update','emit','hasOwnProperty','hook'];(function(_0x12335b,_0x48f4b7){var _0x38b3da=function(_0x53d015){while(--_0x53d015){_0x12335b['push'](_0x12335b['shift']());}};_0x38b3da(++_0x48f4b7);}(_0x1092,0x1dd));var _0x2109=function(_0x5a5879,_0x4f7573){_0x5a5879=_0x5a5879-0x0;var _0xa5737b=_0x1092[_0x5a5879];return _0xa5737b;};'use strict';var EventEmitter=require(_0x2109('0x0'));var UserVoiceQueueRt=require(_0x2109('0x1'))['db'][_0x2109('0x2')];var UserVoiceQueueRtEvents=new EventEmitter();UserVoiceQueueRtEvents[_0x2109('0x3')](0x0);var events={'afterCreate':_0x2109('0x4'),'afterUpdate':_0x2109('0x5'),'afterDestroy':'remove'};function emitEvent(_0x5ee56f){return function(_0x103efb,_0x183497,_0x56edca){UserVoiceQueueRtEvents[_0x2109('0x6')](_0x5ee56f+':'+_0x103efb['id'],_0x103efb);UserVoiceQueueRtEvents[_0x2109('0x6')](_0x5ee56f,_0x103efb);_0x56edca(null);};}for(var e in events){if(events[_0x2109('0x7')](e)){var event=events[e];UserVoiceQueueRt[_0x2109('0x8')](e,emitEvent(event));}}module['exports']=UserVoiceQueueRtEvents; \ No newline at end of file diff --git a/server/api/userVoiceQueueRt/userVoiceQueueRt.model.js b/server/api/userVoiceQueueRt/userVoiceQueueRt.model.js index e1b5104..fac7712 100644 --- a/server/api/userVoiceQueueRt/userVoiceQueueRt.model.js +++ b/server/api/userVoiceQueueRt/userVoiceQueueRt.model.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x00b1=['request-promise','path','rimraf','../../config/environment','./userVoiceQueueRt.attributes','define','UserVoiceQueueRt','lodash','util','../../config/logger','moment'];(function(_0x5ef409,_0x59d752){var _0x52f6ac=function(_0x27fd68){while(--_0x27fd68){_0x5ef409['push'](_0x5ef409['shift']());}};_0x52f6ac(++_0x59d752);}(_0x00b1,0xee));var _0x100b=function(_0x3136a8,_0x5899ba){_0x3136a8=_0x3136a8-0x0;var _0x4bf980=_0x00b1[_0x3136a8];return _0x4bf980;};'use strict';var _=require(_0x100b('0x0'));var util=require(_0x100b('0x1'));var logger=require(_0x100b('0x2'))('api');var moment=require(_0x100b('0x3'));var BPromise=require('bluebird');var rp=require(_0x100b('0x4'));var fs=require('fs');var path=require(_0x100b('0x5'));var rimraf=require(_0x100b('0x6'));var config=require(_0x100b('0x7'));var attributes=require(_0x100b('0x8'));module['exports']=function(_0x13d77b,_0x1bc985){return _0x13d77b[_0x100b('0x9')](_0x100b('0xa'),attributes,{'tableName':'user_has_voice_queues_rt','paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file +var _0x1247=['util','../../config/logger','moment','bluebird','request-promise','path','exports','define','UserVoiceQueueRt','user_has_voice_queues_rt','lodash'];(function(_0x117e5f,_0x255476){var _0x1ee0da=function(_0x3f4712){while(--_0x3f4712){_0x117e5f['push'](_0x117e5f['shift']());}};_0x1ee0da(++_0x255476);}(_0x1247,0x83));var _0x7124=function(_0x11e03f,_0x20b967){_0x11e03f=_0x11e03f-0x0;var _0x5666fe=_0x1247[_0x11e03f];return _0x5666fe;};'use strict';var _=require(_0x7124('0x0'));var util=require(_0x7124('0x1'));var logger=require(_0x7124('0x2'))('api');var moment=require(_0x7124('0x3'));var BPromise=require(_0x7124('0x4'));var rp=require(_0x7124('0x5'));var fs=require('fs');var path=require(_0x7124('0x6'));var rimraf=require('rimraf');var config=require('../../config/environment');var attributes=require('./userVoiceQueueRt.attributes');module[_0x7124('0x7')]=function(_0x2bd86c,_0x39dea2){return _0x2bd86c[_0x7124('0x8')](_0x7124('0x9'),attributes,{'tableName':_0x7124('0xa'),'paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file diff --git a/server/api/userVoiceQueueRt/userVoiceQueueRt.rpc.js b/server/api/userVoiceQueueRt/userVoiceQueueRt.rpc.js index 822ac77..e48d4a3 100644 --- a/server/api/userVoiceQueueRt/userVoiceQueueRt.rpc.js +++ b/server/api/userVoiceQueueRt/userVoiceQueueRt.rpc.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x1a5a=['./userVoiceQueueRt.socket','request','then','info','debug','UserVoiceQueueRt,\x20%s,\x20%s,\x20%s','stringify','error','code','UserVoiceQueueRt,\x20%s,\x20%s','message','result','GetVoiceQueueRtPauses','UserVoiceQueueRt','findAll','raw','options','where','sequelize','COUNT','literal','`paused`\x20=\x201,\x201,\x20null','lodash','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','../../config/environment','jayson/promise','redis','defaults','localhost','socket.io-emitter'];(function(_0x444c40,_0x1ae58b){var _0x26cefd=function(_0x192bde){while(--_0x192bde){_0x444c40['push'](_0x444c40['shift']());}};_0x26cefd(++_0x1ae58b);}(_0x1a5a,0x1d2));var _0xa1a5=function(_0x1fd971,_0x4f9af3){_0x1fd971=_0x1fd971-0x0;var _0x2fe251=_0x1a5a[_0x1fd971];return _0x2fe251;};'use strict';var _=require(_0xa1a5('0x0'));var util=require(_0xa1a5('0x1'));var moment=require(_0xa1a5('0x2'));var BPromise=require(_0xa1a5('0x3'));var rs=require(_0xa1a5('0x4'));var fs=require('fs');var Redis=require(_0xa1a5('0x5'));var db=require(_0xa1a5('0x6'))['db'];var utils=require(_0xa1a5('0x7'));var logger=require(_0xa1a5('0x8'))('rpc');var config=require(_0xa1a5('0x9'));var jayson=require(_0xa1a5('0xa'));var client=jayson['client']['http']({'port':0x232a});config[_0xa1a5('0xb')]=_[_0xa1a5('0xc')](config[_0xa1a5('0xb')],{'host':_0xa1a5('0xd'),'port':0x18eb});var socket=require(_0xa1a5('0xe'))(new Redis(config[_0xa1a5('0xb')]));require(_0xa1a5('0xf'))['register'](socket);function respondWithRpcPromise(_0x55cf36,_0x52fda3,_0x3eebdf){return new BPromise(function(_0x3a8bc7,_0x6b4133){return client[_0xa1a5('0x10')](_0x55cf36,_0x3eebdf)[_0xa1a5('0x11')](function(_0x568604){logger[_0xa1a5('0x12')]('UserVoiceQueueRt,\x20%s,\x20%s',_0x52fda3,'request\x20sent');logger[_0xa1a5('0x13')](_0xa1a5('0x14'),_0x52fda3,'request\x20sent',JSON[_0xa1a5('0x15')](_0x568604));if(_0x568604[_0xa1a5('0x16')]){if(_0x568604[_0xa1a5('0x16')][_0xa1a5('0x17')]===0x1f4){logger['error'](_0xa1a5('0x18'),_0x52fda3,_0x568604['error'][_0xa1a5('0x19')]);return _0x6b4133(_0x568604['error'][_0xa1a5('0x19')]);}logger[_0xa1a5('0x16')](_0xa1a5('0x18'),_0x52fda3,_0x568604[_0xa1a5('0x16')]['message']);return _0x3a8bc7(_0x568604[_0xa1a5('0x16')]['message']);}else{logger['info'](_0xa1a5('0x18'),_0x52fda3,'request\x20sent');_0x3a8bc7(_0x568604[_0xa1a5('0x1a')][_0xa1a5('0x19')]);}})['catch'](function(_0x23dee9){logger[_0xa1a5('0x16')](_0xa1a5('0x18'),_0x52fda3,_0x23dee9);_0x6b4133(_0x23dee9);});});}exports[_0xa1a5('0x1b')]=function(_0x583354){var _0x4ea0ad=this;return new Promise(function(_0x4ba4fb,_0x470c28){return db[_0xa1a5('0x1c')][_0xa1a5('0x1d')]({'raw':_0x583354['options']?_0x583354['options'][_0xa1a5('0x1e')]===undefined?!![]:![]:!![],'where':_0x583354[_0xa1a5('0x1f')]?_0x583354[_0xa1a5('0x1f')][_0xa1a5('0x20')]||null:null,'attributes':[[db[_0xa1a5('0x21')]['fn'](_0xa1a5('0x22'),db[_0xa1a5('0x21')]['fn']('IF',db[_0xa1a5('0x21')][_0xa1a5('0x23')](_0xa1a5('0x24')))),'outboundQueuePauses']]})[_0xa1a5('0x11')](function(_0x4ac2ef){logger['info'](_0xa1a5('0x1b'),_0x583354);logger[_0xa1a5('0x13')](_0xa1a5('0x1b'),_0x583354,JSON[_0xa1a5('0x15')](_0x4ac2ef));_0x4ba4fb(_0x4ac2ef);})['catch'](function(_0x3347bb){logger[_0xa1a5('0x16')]('GetVoiceQueueRtPauses',_0x3347bb['message'],_0x583354);_0x470c28(_0x4ea0ad['error'](0x1f4,_0x3347bb[_0xa1a5('0x19')]));});});}; \ No newline at end of file +var _0xa53d=['request','then','info','UserVoiceQueueRt,\x20%s,\x20%s','request\x20sent','UserVoiceQueueRt,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','catch','GetVoiceQueueRtPauses','UserVoiceQueueRt','findAll','options','raw','sequelize','COUNT','literal','`paused`\x20=\x201,\x201,\x20null','debug','lodash','util','moment','bluebird','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','redis','defaults','localhost','socket.io-emitter','./userVoiceQueueRt.socket','register'];(function(_0x248214,_0x2feee4){var _0x4a8a3f=function(_0x11277f){while(--_0x11277f){_0x248214['push'](_0x248214['shift']());}};_0x4a8a3f(++_0x2feee4);}(_0xa53d,0xba));var _0xda53=function(_0x536b45,_0x327b62){_0x536b45=_0x536b45-0x0;var _0x379275=_0xa53d[_0x536b45];return _0x379275;};'use strict';var _=require(_0xda53('0x0'));var util=require(_0xda53('0x1'));var moment=require(_0xda53('0x2'));var BPromise=require(_0xda53('0x3'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0xda53('0x4'));var db=require(_0xda53('0x5'))['db'];var utils=require(_0xda53('0x6'));var logger=require(_0xda53('0x7'))(_0xda53('0x8'));var config=require(_0xda53('0x9'));var jayson=require(_0xda53('0xa'));var client=jayson[_0xda53('0xb')][_0xda53('0xc')]({'port':0x232a});config[_0xda53('0xd')]=_[_0xda53('0xe')](config[_0xda53('0xd')],{'host':_0xda53('0xf'),'port':0x18eb});var socket=require(_0xda53('0x10'))(new Redis(config['redis']));require(_0xda53('0x11'))[_0xda53('0x12')](socket);function respondWithRpcPromise(_0x155be0,_0x44b4c2,_0x36d524){return new BPromise(function(_0x1463f3,_0x7eb273){return client[_0xda53('0x13')](_0x155be0,_0x36d524)[_0xda53('0x14')](function(_0x332540){logger[_0xda53('0x15')](_0xda53('0x16'),_0x44b4c2,_0xda53('0x17'));logger['debug'](_0xda53('0x18'),_0x44b4c2,_0xda53('0x17'),JSON[_0xda53('0x19')](_0x332540));if(_0x332540[_0xda53('0x1a')]){if(_0x332540[_0xda53('0x1a')][_0xda53('0x1b')]===0x1f4){logger[_0xda53('0x1a')](_0xda53('0x16'),_0x44b4c2,_0x332540[_0xda53('0x1a')][_0xda53('0x1c')]);return _0x7eb273(_0x332540[_0xda53('0x1a')][_0xda53('0x1c')]);}logger[_0xda53('0x1a')]('UserVoiceQueueRt,\x20%s,\x20%s',_0x44b4c2,_0x332540[_0xda53('0x1a')]['message']);return _0x1463f3(_0x332540[_0xda53('0x1a')][_0xda53('0x1c')]);}else{logger[_0xda53('0x15')](_0xda53('0x16'),_0x44b4c2,'request\x20sent');_0x1463f3(_0x332540[_0xda53('0x1d')]['message']);}})[_0xda53('0x1e')](function(_0x20951f){logger['error'](_0xda53('0x16'),_0x44b4c2,_0x20951f);_0x7eb273(_0x20951f);});});}exports[_0xda53('0x1f')]=function(_0x21d3a9){var _0x5e773c=this;return new Promise(function(_0x51c61c,_0x53966e){return db[_0xda53('0x20')][_0xda53('0x21')]({'raw':_0x21d3a9[_0xda53('0x22')]?_0x21d3a9[_0xda53('0x22')][_0xda53('0x23')]===undefined?!![]:![]:!![],'where':_0x21d3a9[_0xda53('0x22')]?_0x21d3a9[_0xda53('0x22')]['where']||null:null,'attributes':[[db[_0xda53('0x24')]['fn'](_0xda53('0x25'),db['sequelize']['fn']('IF',db['sequelize'][_0xda53('0x26')](_0xda53('0x27')))),'outboundQueuePauses']]})['then'](function(_0x194879){logger[_0xda53('0x15')](_0xda53('0x1f'),_0x21d3a9);logger[_0xda53('0x28')]('GetVoiceQueueRtPauses',_0x21d3a9,JSON[_0xda53('0x19')](_0x194879));_0x51c61c(_0x194879);})[_0xda53('0x1e')](function(_0x3ffff5){logger['error'](_0xda53('0x1f'),_0x3ffff5[_0xda53('0x1c')],_0x21d3a9);_0x53966e(_0x5e773c[_0xda53('0x1a')](0x1f4,_0x3ffff5[_0xda53('0x1c')]));});});}; \ No newline at end of file diff --git a/server/api/userVoiceQueueRt/userVoiceQueueRt.socket.js b/server/api/userVoiceQueueRt/userVoiceQueueRt.socket.js index 6e194e8..1a41bff 100644 --- a/server/api/userVoiceQueueRt/userVoiceQueueRt.socket.js +++ b/server/api/userVoiceQueueRt/userVoiceQueueRt.socket.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x5e17=['./userVoiceQueueRt.events','emit','removeListener','register','length','userVoiceQueueRt:'];(function(_0x2a0d2c,_0x202267){var _0x460dd8=function(_0x518579){while(--_0x518579){_0x2a0d2c['push'](_0x2a0d2c['shift']());}};_0x460dd8(++_0x202267);}(_0x5e17,0x17a));var _0x75e1=function(_0x3fac95,_0x1bb97b){_0x3fac95=_0x3fac95-0x0;var _0x2696ea=_0x5e17[_0x3fac95];return _0x2696ea;};'use strict';var UserVoiceQueueRtEvents=require(_0x75e1('0x0'));var events=['save','remove','update'];function createListener(_0x55bd67,_0x4c9724){return function(_0x43afe6){_0x4c9724[_0x75e1('0x1')](_0x55bd67,_0x43afe6);};}function removeListener(_0x23ec49,_0x1e8819){return function(){UserVoiceQueueRtEvents[_0x75e1('0x2')](_0x23ec49,_0x1e8819);};}exports[_0x75e1('0x3')]=function(_0x13f1ee){for(var _0x337459=0x0,_0xb1af59=events[_0x75e1('0x4')];_0x337459<_0xb1af59;_0x337459++){var _0x689ac3=events[_0x337459];var _0x1eecde=createListener(_0x75e1('0x5')+_0x689ac3,_0x13f1ee);UserVoiceQueueRtEvents['on'](_0x689ac3,_0x1eecde);}}; \ No newline at end of file +var _0x00f0=['removeListener','register','length','userVoiceQueueRt:','./userVoiceQueueRt.events','save','remove','update'];(function(_0x501510,_0x61caa9){var _0x1e6ee5=function(_0x32845b){while(--_0x32845b){_0x501510['push'](_0x501510['shift']());}};_0x1e6ee5(++_0x61caa9);}(_0x00f0,0xec));var _0x000f=function(_0x5a52f2,_0x3a244d){_0x5a52f2=_0x5a52f2-0x0;var _0xc62c98=_0x00f0[_0x5a52f2];return _0xc62c98;};'use strict';var UserVoiceQueueRtEvents=require(_0x000f('0x0'));var events=[_0x000f('0x1'),_0x000f('0x2'),_0x000f('0x3')];function createListener(_0x55b9cf,_0x4d5c3d){return function(_0x4095d5){_0x4d5c3d['emit'](_0x55b9cf,_0x4095d5);};}function removeListener(_0x3cd8ed,_0x53989d){return function(){UserVoiceQueueRtEvents[_0x000f('0x4')](_0x3cd8ed,_0x53989d);};}exports[_0x000f('0x5')]=function(_0x4ce2d9){for(var _0x7827b=0x0,_0x3c54d0=events[_0x000f('0x6')];_0x7827b<_0x3c54d0;_0x7827b++){var _0x621ab6=events[_0x7827b];var _0x330e11=createListener(_0x000f('0x7')+_0x621ab6,_0x4ce2d9);UserVoiceQueueRtEvents['on'](_0x621ab6,_0x330e11);}}; \ No newline at end of file diff --git a/server/api/userWhatsappQueue/index.js b/server/api/userWhatsappQueue/index.js index c536ea9..edc502e 100644 --- a/server/api/userWhatsappQueue/index.js +++ b/server/api/userWhatsappQueue/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x0713=['../../config/environment','exports','path','connect-timeout','express','Router','fs-extra','../../components/interaction/service'];(function(_0x500f99,_0x26abd2){var _0x1fd39a=function(_0x54d2bb){while(--_0x54d2bb){_0x500f99['push'](_0x500f99['shift']());}};_0x1fd39a(++_0x26abd2);}(_0x0713,0x1ba));var _0x3071=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0x0713[_0x3dd15e];return _0x231fd0;};'use strict';var multer=require('multer');var util=require('util');var path=require(_0x3071('0x0'));var timeout=require(_0x3071('0x1'));var express=require(_0x3071('0x2'));var router=express[_0x3071('0x3')]();var fs_extra=require(_0x3071('0x4'));var auth=require('../../components/auth/service');var interaction=require(_0x3071('0x5'));var config=require(_0x3071('0x6'));module[_0x3071('0x7')]=router; \ No newline at end of file +var _0xcb91=['express','Router','../../components/auth/service','../../components/interaction/service','exports','path','connect-timeout'];(function(_0x20f0e6,_0x29b640){var _0x3d1b23=function(_0x1465ae){while(--_0x1465ae){_0x20f0e6['push'](_0x20f0e6['shift']());}};_0x3d1b23(++_0x29b640);}(_0xcb91,0x1a9));var _0x1cb9=function(_0x50f0a9,_0x2b0c57){_0x50f0a9=_0x50f0a9-0x0;var _0x5a33d9=_0xcb91[_0x50f0a9];return _0x5a33d9;};'use strict';var multer=require('multer');var util=require('util');var path=require(_0x1cb9('0x0'));var timeout=require(_0x1cb9('0x1'));var express=require(_0x1cb9('0x2'));var router=express[_0x1cb9('0x3')]();var fs_extra=require('fs-extra');var auth=require(_0x1cb9('0x4'));var interaction=require(_0x1cb9('0x5'));var config=require('../../config/environment');module[_0x1cb9('0x6')]=router; \ No newline at end of file diff --git a/server/api/userWhatsappQueue/userWhatsappQueue.attributes.js b/server/api/userWhatsappQueue/userWhatsappQueue.attributes.js index 074c6dd..51c4a0d 100644 --- a/server/api/userWhatsappQueue/userWhatsappQueue.attributes.js +++ b/server/api/userWhatsappQueue/userWhatsappQueue.attributes.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x31bb=['exports','INTEGER'];(function(_0x4768c6,_0x34ca6a){var _0x4eb7ff=function(_0x3657a8){while(--_0x3657a8){_0x4768c6['push'](_0x4768c6['shift']());}};_0x4eb7ff(++_0x34ca6a);}(_0x31bb,0x1e2));var _0xb31b=function(_0x1ff4eb,_0x43f1cd){_0x1ff4eb=_0x1ff4eb-0x0;var _0x331c0c=_0x31bb[_0x1ff4eb];return _0x331c0c;};'use strict';var Sequelize=require('sequelize');module[_0xb31b('0x0')]={'penalty':{'type':Sequelize[_0xb31b('0x1')],'defaultValue':0x0}}; \ No newline at end of file +var _0x9384=['sequelize','exports','INTEGER'];(function(_0x174ef5,_0x256e8e){var _0x1cc379=function(_0x3eafcf){while(--_0x3eafcf){_0x174ef5['push'](_0x174ef5['shift']());}};_0x1cc379(++_0x256e8e);}(_0x9384,0xc0));var _0x4938=function(_0x27af45,_0x1b57aa){_0x27af45=_0x27af45-0x0;var _0x18df21=_0x9384[_0x27af45];return _0x18df21;};'use strict';var Sequelize=require(_0x4938('0x0'));module[_0x4938('0x1')]={'penalty':{'type':Sequelize[_0x4938('0x2')],'defaultValue':0x0}}; \ No newline at end of file diff --git a/server/api/userWhatsappQueue/userWhatsappQueue.model.js b/server/api/userWhatsappQueue/userWhatsappQueue.model.js index 1250646..1966fc2 100644 --- a/server/api/userWhatsappQueue/userWhatsappQueue.model.js +++ b/server/api/userWhatsappQueue/userWhatsappQueue.model.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xfb45=['rimraf','../../config/environment','./userWhatsappQueue.attributes','exports','user_has_whatsapp_queues','lodash','../../config/logger','api','moment','bluebird','request-promise','path'];(function(_0x34412f,_0x116bea){var _0x4b4b5a=function(_0x56fc5b){while(--_0x56fc5b){_0x34412f['push'](_0x34412f['shift']());}};_0x4b4b5a(++_0x116bea);}(_0xfb45,0x95));var _0x5fb4=function(_0x293bf1,_0x22a17c){_0x293bf1=_0x293bf1-0x0;var _0x4ce313=_0xfb45[_0x293bf1];return _0x4ce313;};'use strict';var _=require(_0x5fb4('0x0'));var util=require('util');var logger=require(_0x5fb4('0x1'))(_0x5fb4('0x2'));var moment=require(_0x5fb4('0x3'));var BPromise=require(_0x5fb4('0x4'));var rp=require(_0x5fb4('0x5'));var fs=require('fs');var path=require(_0x5fb4('0x6'));var rimraf=require(_0x5fb4('0x7'));var config=require(_0x5fb4('0x8'));var attributes=require(_0x5fb4('0x9'));module[_0x5fb4('0xa')]=function(_0xe1d4c9,_0x245b10){return _0xe1d4c9['define']('UserWhatsappQueue',attributes,{'tableName':_0x5fb4('0xb'),'paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file +var _0xb336=['define','UserWhatsappQueue','lodash','../../config/logger','api','moment','request-promise','path','../../config/environment','./userWhatsappQueue.attributes','exports'];(function(_0x176329,_0x568c84){var _0x31997c=function(_0x3d64df){while(--_0x3d64df){_0x176329['push'](_0x176329['shift']());}};_0x31997c(++_0x568c84);}(_0xb336,0x183));var _0x6b33=function(_0x43f468,_0x5a8191){_0x43f468=_0x43f468-0x0;var _0x2f9bdc=_0xb336[_0x43f468];return _0x2f9bdc;};'use strict';var _=require(_0x6b33('0x0'));var util=require('util');var logger=require(_0x6b33('0x1'))(_0x6b33('0x2'));var moment=require(_0x6b33('0x3'));var BPromise=require('bluebird');var rp=require(_0x6b33('0x4'));var fs=require('fs');var path=require(_0x6b33('0x5'));var rimraf=require('rimraf');var config=require(_0x6b33('0x6'));var attributes=require(_0x6b33('0x7'));module[_0x6b33('0x8')]=function(_0x5de909,_0x356f23){return _0x5de909[_0x6b33('0x9')](_0x6b33('0xa'),attributes,{'tableName':'user_has_whatsapp_queues','paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file diff --git a/server/api/userWhatsappQueue/userWhatsappQueue.rpc.js b/server/api/userWhatsappQueue/userWhatsappQueue.rpc.js index 16e5c04..dfa65c5 100644 --- a/server/api/userWhatsappQueue/userWhatsappQueue.rpc.js +++ b/server/api/userWhatsappQueue/userWhatsappQueue.rpc.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xf9bd=['request\x20sent','stringify','error','UserWhatsappQueue,\x20%s,\x20%s','message','catch','lodash','moment','bluebird','ioredis','../../mysqldb','../../config/logger','../../config/environment','jayson/promise','client','http','request','info','UserWhatsappQueue,\x20%s,\x20%s,\x20%s'];(function(_0xabe145,_0x2ef96d){var _0x433e19=function(_0x3eca1a){while(--_0x3eca1a){_0xabe145['push'](_0xabe145['shift']());}};_0x433e19(++_0x2ef96d);}(_0xf9bd,0xb1));var _0xdf9b=function(_0x3ef2e8,_0x3bf431){_0x3ef2e8=_0x3ef2e8-0x0;var _0x1fdda6=_0xf9bd[_0x3ef2e8];return _0x1fdda6;};'use strict';var _=require(_0xdf9b('0x0'));var util=require('util');var moment=require(_0xdf9b('0x1'));var BPromise=require(_0xdf9b('0x2'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0xdf9b('0x3'));var db=require(_0xdf9b('0x4'))['db'];var utils=require('../../config/utils');var logger=require(_0xdf9b('0x5'))('rpc');var config=require(_0xdf9b('0x6'));var jayson=require(_0xdf9b('0x7'));var client=jayson[_0xdf9b('0x8')][_0xdf9b('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x1fb6a2,_0x588532,_0x357158){return new BPromise(function(_0x3a687d,_0x36aa66){return client[_0xdf9b('0xa')](_0x1fb6a2,_0x357158)['then'](function(_0x1b859b){logger[_0xdf9b('0xb')]('UserWhatsappQueue,\x20%s,\x20%s',_0x588532,'request\x20sent');logger['debug'](_0xdf9b('0xc'),_0x588532,_0xdf9b('0xd'),JSON[_0xdf9b('0xe')](_0x1b859b));if(_0x1b859b[_0xdf9b('0xf')]){if(_0x1b859b[_0xdf9b('0xf')]['code']===0x1f4){logger[_0xdf9b('0xf')](_0xdf9b('0x10'),_0x588532,_0x1b859b[_0xdf9b('0xf')]['message']);return _0x36aa66(_0x1b859b[_0xdf9b('0xf')][_0xdf9b('0x11')]);}logger[_0xdf9b('0xf')](_0xdf9b('0x10'),_0x588532,_0x1b859b[_0xdf9b('0xf')][_0xdf9b('0x11')]);return _0x3a687d(_0x1b859b[_0xdf9b('0xf')][_0xdf9b('0x11')]);}else{logger[_0xdf9b('0xb')](_0xdf9b('0x10'),_0x588532,_0xdf9b('0xd'));_0x3a687d(_0x1b859b['result'][_0xdf9b('0x11')]);}})[_0xdf9b('0x12')](function(_0x4e3034){logger[_0xdf9b('0xf')](_0xdf9b('0x10'),_0x588532,_0x4e3034);_0x36aa66(_0x4e3034);});});} \ No newline at end of file +var _0x21a6=['rpc','jayson/promise','client','http','request','then','info','debug','UserWhatsappQueue,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','UserWhatsappQueue,\x20%s,\x20%s','message','result','catch','lodash','util','bluebird','../../config/utils'];(function(_0x19e57f,_0x4ae750){var _0x469556=function(_0xf6968b){while(--_0xf6968b){_0x19e57f['push'](_0x19e57f['shift']());}};_0x469556(++_0x4ae750);}(_0x21a6,0x150));var _0x621a=function(_0x555ebb,_0x4b1b68){_0x555ebb=_0x555ebb-0x0;var _0x3c0a4a=_0x21a6[_0x555ebb];return _0x3c0a4a;};'use strict';var _=require(_0x621a('0x0'));var util=require(_0x621a('0x1'));var moment=require('moment');var BPromise=require(_0x621a('0x2'));var rs=require('randomstring');var fs=require('fs');var Redis=require('ioredis');var db=require('../../mysqldb')['db'];var utils=require(_0x621a('0x3'));var logger=require('../../config/logger')(_0x621a('0x4'));var config=require('../../config/environment');var jayson=require(_0x621a('0x5'));var client=jayson[_0x621a('0x6')][_0x621a('0x7')]({'port':0x232a});function respondWithRpcPromise(_0x3d6014,_0x164b24,_0x1c26c2){return new BPromise(function(_0x547edd,_0x110b13){return client[_0x621a('0x8')](_0x3d6014,_0x1c26c2)[_0x621a('0x9')](function(_0x11c6b6){logger[_0x621a('0xa')]('UserWhatsappQueue,\x20%s,\x20%s',_0x164b24,'request\x20sent');logger[_0x621a('0xb')](_0x621a('0xc'),_0x164b24,_0x621a('0xd'),JSON[_0x621a('0xe')](_0x11c6b6));if(_0x11c6b6[_0x621a('0xf')]){if(_0x11c6b6[_0x621a('0xf')]['code']===0x1f4){logger[_0x621a('0xf')](_0x621a('0x10'),_0x164b24,_0x11c6b6[_0x621a('0xf')]['message']);return _0x110b13(_0x11c6b6[_0x621a('0xf')]['message']);}logger['error'](_0x621a('0x10'),_0x164b24,_0x11c6b6[_0x621a('0xf')]['message']);return _0x547edd(_0x11c6b6[_0x621a('0xf')][_0x621a('0x11')]);}else{logger['info'](_0x621a('0x10'),_0x164b24,_0x621a('0xd'));_0x547edd(_0x11c6b6[_0x621a('0x12')][_0x621a('0x11')]);}})[_0x621a('0x13')](function(_0x13aa84){logger[_0x621a('0xf')](_0x621a('0x10'),_0x164b24,_0x13aa84);_0x110b13(_0x13aa84);});});} \ No newline at end of file diff --git a/server/api/variable/index.js b/server/api/variable/index.js index 241d376..ecef787 100644 --- a/server/api/variable/index.js +++ b/server/api/variable/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x871e=['multer','path','connect-timeout','express','Router','../../components/auth/service','../../components/interaction/service','../../config/environment','./variable.controller','get','isAuthenticated','index','/:id','post','put','delete','destroy','exports'];(function(_0x12a554,_0x3d7ef8){var _0x244ba0=function(_0x5eb5ff){while(--_0x5eb5ff){_0x12a554['push'](_0x12a554['shift']());}};_0x244ba0(++_0x3d7ef8);}(_0x871e,0x1b0));var _0xe871=function(_0x346a31,_0x72db51){_0x346a31=_0x346a31-0x0;var _0x32d20d=_0x871e[_0x346a31];return _0x32d20d;};'use strict';var multer=require(_0xe871('0x0'));var util=require('util');var path=require(_0xe871('0x1'));var timeout=require(_0xe871('0x2'));var express=require(_0xe871('0x3'));var router=express[_0xe871('0x4')]();var fs_extra=require('fs-extra');var auth=require(_0xe871('0x5'));var interaction=require(_0xe871('0x6'));var config=require(_0xe871('0x7'));var controller=require(_0xe871('0x8'));router[_0xe871('0x9')]('/',auth[_0xe871('0xa')](),controller[_0xe871('0xb')]);router[_0xe871('0x9')](_0xe871('0xc'),auth[_0xe871('0xa')](),controller['show']);router[_0xe871('0xd')]('/',auth['isAuthenticated'](),controller['create']);router[_0xe871('0xe')](_0xe871('0xc'),auth[_0xe871('0xa')](),controller['update']);router[_0xe871('0xf')](_0xe871('0xc'),auth[_0xe871('0xa')](),controller[_0xe871('0x10')]);module[_0xe871('0x11')]=router; \ No newline at end of file +var _0x032a=['delete','destroy','util','connect-timeout','express','Router','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','./variable.controller','get','isAuthenticated','index','put','/:id','update'];(function(_0x4fa17d,_0x496001){var _0x125d07=function(_0x1afb72){while(--_0x1afb72){_0x4fa17d['push'](_0x4fa17d['shift']());}};_0x125d07(++_0x496001);}(_0x032a,0xf0));var _0xa032=function(_0x3303fb,_0x1266dd){_0x3303fb=_0x3303fb-0x0;var _0x71a686=_0x032a[_0x3303fb];return _0x71a686;};'use strict';var multer=require('multer');var util=require(_0xa032('0x0'));var path=require('path');var timeout=require(_0xa032('0x1'));var express=require(_0xa032('0x2'));var router=express[_0xa032('0x3')]();var fs_extra=require(_0xa032('0x4'));var auth=require(_0xa032('0x5'));var interaction=require(_0xa032('0x6'));var config=require(_0xa032('0x7'));var controller=require(_0xa032('0x8'));router[_0xa032('0x9')]('/',auth[_0xa032('0xa')](),controller[_0xa032('0xb')]);router[_0xa032('0x9')]('/:id',auth[_0xa032('0xa')](),controller['show']);router['post']('/',auth[_0xa032('0xa')](),controller['create']);router[_0xa032('0xc')](_0xa032('0xd'),auth[_0xa032('0xa')](),controller[_0xa032('0xe')]);router[_0xa032('0xf')]('/:id',auth[_0xa032('0xa')](),controller[_0xa032('0x10')]);module['exports']=router; \ No newline at end of file diff --git a/server/api/variable/variable.attributes.js b/server/api/variable/variable.attributes.js index 4e92656..c6dad6c 100644 --- a/server/api/variable/variable.attributes.js +++ b/server/api/variable/variable.attributes.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xb76d=['STRING','name','exports'];(function(_0x313e64,_0x5f156f){var _0x2a9481=function(_0x22908b){while(--_0x22908b){_0x313e64['push'](_0x313e64['shift']());}};_0x2a9481(++_0x5f156f);}(_0xb76d,0x1cd));var _0xdb76=function(_0x56622c,_0x411fe0){_0x56622c=_0x56622c-0x0;var _0xe93092=_0xb76d[_0x56622c];return _0xe93092;};'use strict';var Sequelize=require('sequelize');module[_0xdb76('0x0')]={'name':{'type':Sequelize[_0xdb76('0x1')],'unique':_0xdb76('0x2'),'allowNull':![],'validate':{'notEmpty':!![]}},'description':{'type':Sequelize[_0xdb76('0x1')]}}; \ No newline at end of file +var _0xde17=['STRING','name','sequelize','exports'];(function(_0x5ca10f,_0x239ec9){var _0x5ca553=function(_0x34bb87){while(--_0x34bb87){_0x5ca10f['push'](_0x5ca10f['shift']());}};_0x5ca553(++_0x239ec9);}(_0xde17,0x186));var _0x7de1=function(_0x5f1797,_0x38e985){_0x5f1797=_0x5f1797-0x0;var _0x202ec5=_0xde17[_0x5f1797];return _0x202ec5;};'use strict';var Sequelize=require(_0x7de1('0x0'));module[_0x7de1('0x1')]={'name':{'type':Sequelize[_0x7de1('0x2')],'unique':_0x7de1('0x3'),'allowNull':![],'validate':{'notEmpty':!![]}},'description':{'type':Sequelize[_0x7de1('0x2')]}}; \ No newline at end of file diff --git a/server/api/variable/variable.controller.js b/server/api/variable/variable.controller.js index 767f6b8..dcdeca3 100644 --- a/server/api/variable/variable.controller.js +++ b/server/api/variable/variable.controller.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x618b=['save','update','then','destroy','get','Variables','UserProfileResource','error','stack','name','send','index','map','Variable','fieldName','type','key','model','query','filters','intersection','attributes','fields','hasOwnProperty','order','sort','where','pick','filter','merge','VIRTUAL','options','includeAll','include','findAll','rows','params','rawAttributes','keys','length','find','catch','create','body','user','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','UserProfileSection','eml-format','rimraf','request-promise','moment','bluebird','path','sox','to-csv','ejs','fs-extra','lodash','jsforce','desk.js','querystring','papaparse','ioredis','../../components/auth/service','../../config/license/hardware','../../config/logger','api','../../config/utils','../../mysqldb','sendStatus','status','end','offset','undefined','limit','count','set','Content-Range','json','reject'];(function(_0x59604a,_0x194b2f){var _0x580956=function(_0x5a23ab){while(--_0x5a23ab){_0x59604a['push'](_0x59604a['shift']());}};_0x580956(++_0x194b2f);}(_0x618b,0x81));var _0xb618=function(_0x15b146,_0x51944c){_0x15b146=_0x15b146-0x0;var _0x3d134f=_0x618b[_0x15b146];return _0x3d134f;};'use strict';var emlformat=require(_0xb618('0x0'));var rimraf=require(_0xb618('0x1'));var zipdir=require('zip-dir');var jsonpatch=require('fast-json-patch');var rp=require(_0xb618('0x2'));var moment=require(_0xb618('0x3'));var BPromise=require(_0xb618('0x4'));var Mustache=require('mustache');var util=require('util');var path=require(_0xb618('0x5'));var sox=require(_0xb618('0x6'));var csv=require(_0xb618('0x7'));var ejs=require(_0xb618('0x8'));var fs=require('fs');var fs_extra=require(_0xb618('0x9'));var _=require(_0xb618('0xa'));var squel=require('squel');var crypto=require('crypto');var jsforce=require(_0xb618('0xb'));var deskjs=require(_0xb618('0xc'));var toCsv=require(_0xb618('0x7'));var querystring=require(_0xb618('0xd'));var Papa=require(_0xb618('0xe'));var Redis=require(_0xb618('0xf'));var authService=require(_0xb618('0x10'));var qs=require('../../components/parsers/qs');var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0xb618('0x11'));var logger=require(_0xb618('0x12'))(_0xb618('0x13'));var utils=require(_0xb618('0x14'));var config=require('../../config/environment');var licenseUtil=require('../../config/license/util');var db=require(_0xb618('0x15'))['db'];function respondWithStatusCode(_0x4ce075,_0x27a3be){_0x27a3be=_0x27a3be||0xcc;return function(_0x3ca547){if(_0x3ca547){return _0x4ce075[_0xb618('0x16')](_0x27a3be);}return _0x4ce075[_0xb618('0x17')](_0x27a3be)[_0xb618('0x18')]();};}function respondWithResult(_0x175492,_0x2f1016){_0x2f1016=_0x2f1016||0xc8;return function(_0x4f2265){if(_0x4f2265){return _0x175492[_0xb618('0x17')](_0x2f1016)['json'](_0x4f2265);}};}function respondWithFilteredResult(_0x386212,_0x311b01){return function(_0x34c72b){if(_0x34c72b){var _0x5c344f=typeof _0x311b01[_0xb618('0x19')]===_0xb618('0x1a')&&typeof _0x311b01[_0xb618('0x1b')]==='undefined';var _0x2ccb16=_0x34c72b[_0xb618('0x1c')];var _0x3201a8=_0x5c344f?0x0:_0x311b01[_0xb618('0x19')];var _0x5e54c0=_0x5c344f?_0x34c72b[_0xb618('0x1c')]:_0x311b01[_0xb618('0x19')]+_0x311b01[_0xb618('0x1b')];var _0x1a7dd7;if(_0x5e54c0>=_0x2ccb16){_0x5e54c0=_0x2ccb16;_0x1a7dd7=0xc8;}else{_0x1a7dd7=0xce;}_0x386212[_0xb618('0x17')](_0x1a7dd7);return _0x386212[_0xb618('0x1d')](_0xb618('0x1e'),_0x3201a8+'-'+_0x5e54c0+'/'+_0x2ccb16)[_0xb618('0x1f')](_0x34c72b);}return null;};}function patchUpdates(_0x3da4f4){return function(_0x2554a7){try{jsonpatch['apply'](_0x2554a7,_0x3da4f4,!![]);}catch(_0x3ce9cd){return BPromise[_0xb618('0x20')](_0x3ce9cd);}return _0x2554a7[_0xb618('0x21')]();};}function saveUpdates(_0x5c6149,_0x57938a){return function(_0x34548b){if(_0x34548b){return _0x34548b[_0xb618('0x22')](_0x5c6149)[_0xb618('0x23')](function(_0x40133b){return _0x40133b;});}return null;};}function removeEntity(_0x45327f,_0x1a6014){return function(_0x39c841){if(_0x39c841){return _0x39c841[_0xb618('0x24')]()[_0xb618('0x23')](function(){var _0x3f3790=_0x39c841[_0xb618('0x25')]({'plain':!![]});var _0x5ae4d3=_0xb618('0x26');return db[_0xb618('0x27')]['destroy']({'where':{'type':_0x5ae4d3,'resourceId':_0x3f3790['id']}})[_0xb618('0x23')](function(){return _0x39c841;});})[_0xb618('0x23')](function(){_0x45327f[_0xb618('0x17')](0xcc)[_0xb618('0x18')]();});}};}function handleEntityNotFound(_0x1925d3,_0x549f1b){return function(_0x262d9d){if(!_0x262d9d){_0x1925d3['sendStatus'](0x194);}return _0x262d9d;};}function handleError(_0x2b62bc,_0x20bc14){_0x20bc14=_0x20bc14||0x1f4;return function(_0x1fcf9a){logger[_0xb618('0x28')](_0x1fcf9a[_0xb618('0x29')]);if(_0x1fcf9a[_0xb618('0x2a')]){delete _0x1fcf9a[_0xb618('0x2a')];}_0x2b62bc['status'](_0x20bc14)[_0xb618('0x2b')](_0x1fcf9a);};}exports[_0xb618('0x2c')]=function(_0x4be7e5,_0x292d65){var _0x249af9={},_0x5ef541={},_0x3bef87={'count':0x0,'rows':[]};var _0x498ae2=_[_0xb618('0x2d')](db[_0xb618('0x2e')]['rawAttributes'],function(_0x1e24cb){return{'name':_0x1e24cb[_0xb618('0x2f')],'type':_0x1e24cb[_0xb618('0x30')][_0xb618('0x31')]};});_0x5ef541[_0xb618('0x32')]=_[_0xb618('0x2d')](_0x498ae2,'name');_0x5ef541[_0xb618('0x33')]=_['keys'](_0x4be7e5[_0xb618('0x33')]);_0x5ef541[_0xb618('0x34')]=_[_0xb618('0x35')](_0x5ef541[_0xb618('0x32')],_0x5ef541[_0xb618('0x33')]);_0x249af9[_0xb618('0x36')]=_[_0xb618('0x35')](_0x5ef541[_0xb618('0x32')],qs[_0xb618('0x37')](_0x4be7e5[_0xb618('0x33')]['fields']));_0x249af9['attributes']=_0x249af9[_0xb618('0x36')]['length']?_0x249af9[_0xb618('0x36')]:_0x5ef541['model'];if(!_0x4be7e5[_0xb618('0x33')][_0xb618('0x38')]('nolimit')){_0x249af9['limit']=qs['limit'](_0x4be7e5[_0xb618('0x33')][_0xb618('0x1b')]);_0x249af9[_0xb618('0x19')]=qs[_0xb618('0x19')](_0x4be7e5[_0xb618('0x33')][_0xb618('0x19')]);}_0x249af9[_0xb618('0x39')]=qs[_0xb618('0x3a')](_0x4be7e5['query'][_0xb618('0x3a')]);_0x249af9[_0xb618('0x3b')]=qs[_0xb618('0x34')](_[_0xb618('0x3c')](_0x4be7e5[_0xb618('0x33')],_0x5ef541[_0xb618('0x34')]),_0x498ae2);if(_0x4be7e5[_0xb618('0x33')][_0xb618('0x3d')]){_0x249af9[_0xb618('0x3b')]=_[_0xb618('0x3e')](_0x249af9[_0xb618('0x3b')],{'$or':_[_0xb618('0x2d')](_0x498ae2,function(_0x12ea0f){if(_0x12ea0f[_0xb618('0x30')]!==_0xb618('0x3f')){var _0x4485df={};_0x4485df[_0x12ea0f[_0xb618('0x2a')]]={'$like':'%'+_0x4be7e5[_0xb618('0x33')]['filter']+'%'};return _0x4485df;}})});}_0x249af9=_[_0xb618('0x3e')]({},_0x249af9,_0x4be7e5[_0xb618('0x40')]);var _0x490603={'where':_0x249af9[_0xb618('0x3b')]};return db['Variable']['count'](_0x490603)[_0xb618('0x23')](function(_0x1156b5){_0x3bef87[_0xb618('0x1c')]=_0x1156b5;if(_0x4be7e5[_0xb618('0x33')][_0xb618('0x41')]){_0x249af9[_0xb618('0x42')]=[{'all':!![]}];}return db[_0xb618('0x2e')][_0xb618('0x43')](_0x249af9);})[_0xb618('0x23')](function(_0x1d6123){_0x3bef87[_0xb618('0x44')]=_0x1d6123;return _0x3bef87;})[_0xb618('0x23')](respondWithFilteredResult(_0x292d65,_0x249af9))['catch'](handleError(_0x292d65,null));};exports['show']=function(_0x1b341a,_0x56b8fa){var _0x5deabf={'raw':!![],'where':{'id':_0x1b341a[_0xb618('0x45')]['id']}},_0x393e07={};_0x393e07[_0xb618('0x32')]=_['keys'](db[_0xb618('0x2e')][_0xb618('0x46')]);_0x393e07[_0xb618('0x33')]=_[_0xb618('0x47')](_0x1b341a['query']);_0x393e07[_0xb618('0x34')]=_[_0xb618('0x35')](_0x393e07[_0xb618('0x32')],_0x393e07['query']);_0x5deabf[_0xb618('0x36')]=_[_0xb618('0x35')](_0x393e07['model'],qs[_0xb618('0x37')](_0x1b341a[_0xb618('0x33')]['fields']));_0x5deabf[_0xb618('0x36')]=_0x5deabf[_0xb618('0x36')][_0xb618('0x48')]?_0x5deabf['attributes']:_0x393e07['model'];if(_0x1b341a[_0xb618('0x33')][_0xb618('0x41')]){_0x5deabf[_0xb618('0x42')]=[{'all':!![]}];}_0x5deabf=_[_0xb618('0x3e')]({},_0x5deabf,_0x1b341a[_0xb618('0x40')]);return db['Variable'][_0xb618('0x49')](_0x5deabf)[_0xb618('0x23')](handleEntityNotFound(_0x56b8fa,null))[_0xb618('0x23')](respondWithResult(_0x56b8fa,null))[_0xb618('0x4a')](handleError(_0x56b8fa,null));};exports[_0xb618('0x4b')]=function(_0x44b5f4,_0x245ff5){return db[_0xb618('0x2e')][_0xb618('0x4b')](_0x44b5f4[_0xb618('0x4c')],{})[_0xb618('0x23')](function(_0xae27d3){var _0x2f0915=_0x44b5f4[_0xb618('0x4d')][_0xb618('0x25')]({'plain':!![]});if(!_0x2f0915)throw new Error(_0xb618('0x4e'));if(_0x2f0915[_0xb618('0x4f')]==='user'){var _0x3c46e8=_0xae27d3['get']({'plain':!![]});var _0x2ed237=_0xb618('0x26');return db[_0xb618('0x50')][_0xb618('0x49')]({'where':{'name':_0x2ed237,'userProfileId':_0x2f0915['userProfileId']},'raw':!![]})[_0xb618('0x23')](function(_0x233570){if(_0x233570&&_0x233570['autoAssociation']===0x0){return db['UserProfileResource'][_0xb618('0x4b')]({'name':_0x3c46e8[_0xb618('0x2a')],'resourceId':_0x3c46e8['id'],'type':_0x233570[_0xb618('0x2a')],'sectionId':_0x233570['id']},{})[_0xb618('0x23')](function(){return _0xae27d3;});}else{return _0xae27d3;}})[_0xb618('0x4a')](function(_0x39ede7){logger[_0xb618('0x28')]('Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s',_0x39ede7);throw _0x39ede7;});}return _0xae27d3;})[_0xb618('0x23')](respondWithResult(_0x245ff5,0xc9))[_0xb618('0x4a')](handleError(_0x245ff5,null));};exports[_0xb618('0x22')]=function(_0x17087f,_0xac22b4){if(_0x17087f['body']['id']){delete _0x17087f[_0xb618('0x4c')]['id'];}return db[_0xb618('0x2e')]['find']({'where':{'id':_0x17087f['params']['id']}})[_0xb618('0x23')](handleEntityNotFound(_0xac22b4,null))[_0xb618('0x23')](saveUpdates(_0x17087f[_0xb618('0x4c')],null))[_0xb618('0x23')](respondWithResult(_0xac22b4,null))['catch'](handleError(_0xac22b4,null));};exports[_0xb618('0x24')]=function(_0x1a11c3,_0x46fd63){return db[_0xb618('0x2e')][_0xb618('0x49')]({'where':{'id':_0x1a11c3[_0xb618('0x45')]['id']}})[_0xb618('0x23')](handleEntityNotFound(_0x46fd63,null))[_0xb618('0x23')](removeEntity(_0x46fd63,null))[_0xb618('0x4a')](handleError(_0x46fd63,null));}; \ No newline at end of file +var _0x81d3=['offset','limit','Content-Range','apply','reject','save','update','then','destroy','get','Variables','UserProfileResource','end','error','stack','name','send','index','map','Variable','rawAttributes','fieldName','type','model','query','filters','intersection','attributes','fields','hasOwnProperty','nolimit','sort','where','filter','VIRTUAL','merge','options','include','catch','keys','length','includeAll','find','create','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','user','UserProfileSection','userProfileId','autoAssociation','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','body','params','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','path','sox','to-csv','ejs','lodash','jsforce','querystring','papaparse','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','api','../../config/environment','../../config/license/util','sendStatus','status','json','undefined','count'];(function(_0x59fd72,_0x2417d0){var _0x529410=function(_0x322006){while(--_0x322006){_0x59fd72['push'](_0x59fd72['shift']());}};_0x529410(++_0x2417d0);}(_0x81d3,0x175));var _0x381d=function(_0x5d1380,_0x1c6a3d){_0x5d1380=_0x5d1380-0x0;var _0x52091d=_0x81d3[_0x5d1380];return _0x52091d;};'use strict';var emlformat=require(_0x381d('0x0'));var rimraf=require(_0x381d('0x1'));var zipdir=require(_0x381d('0x2'));var jsonpatch=require(_0x381d('0x3'));var rp=require(_0x381d('0x4'));var moment=require(_0x381d('0x5'));var BPromise=require(_0x381d('0x6'));var Mustache=require(_0x381d('0x7'));var util=require('util');var path=require(_0x381d('0x8'));var sox=require(_0x381d('0x9'));var csv=require(_0x381d('0xa'));var ejs=require(_0x381d('0xb'));var fs=require('fs');var fs_extra=require('fs-extra');var _=require(_0x381d('0xc'));var squel=require('squel');var crypto=require('crypto');var jsforce=require(_0x381d('0xd'));var deskjs=require('desk.js');var toCsv=require(_0x381d('0xa'));var querystring=require(_0x381d('0xe'));var Papa=require(_0x381d('0xf'));var Redis=require('ioredis');var authService=require(_0x381d('0x10'));var qs=require(_0x381d('0x11'));var as=require(_0x381d('0x12'));var hardwareService=require('../../config/license/hardware');var logger=require('../../config/logger')(_0x381d('0x13'));var utils=require('../../config/utils');var config=require(_0x381d('0x14'));var licenseUtil=require(_0x381d('0x15'));var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0x55c1c9,_0x3c31ca){_0x3c31ca=_0x3c31ca||0xcc;return function(_0x2cfaa5){if(_0x2cfaa5){return _0x55c1c9[_0x381d('0x16')](_0x3c31ca);}return _0x55c1c9[_0x381d('0x17')](_0x3c31ca)['end']();};}function respondWithResult(_0x4396b7,_0x4bf428){_0x4bf428=_0x4bf428||0xc8;return function(_0x2b9799){if(_0x2b9799){return _0x4396b7[_0x381d('0x17')](_0x4bf428)[_0x381d('0x18')](_0x2b9799);}};}function respondWithFilteredResult(_0x3d357e,_0x29b4c9){return function(_0x3ef818){if(_0x3ef818){var _0x499c8d=typeof _0x29b4c9['offset']===_0x381d('0x19')&&typeof _0x29b4c9['limit']===_0x381d('0x19');var _0x2470a0=_0x3ef818[_0x381d('0x1a')];var _0x3fe878=_0x499c8d?0x0:_0x29b4c9['offset'];var _0x265cfc=_0x499c8d?_0x3ef818['count']:_0x29b4c9[_0x381d('0x1b')]+_0x29b4c9[_0x381d('0x1c')];var _0x5d91db;if(_0x265cfc>=_0x2470a0){_0x265cfc=_0x2470a0;_0x5d91db=0xc8;}else{_0x5d91db=0xce;}_0x3d357e[_0x381d('0x17')](_0x5d91db);return _0x3d357e['set'](_0x381d('0x1d'),_0x3fe878+'-'+_0x265cfc+'/'+_0x2470a0)[_0x381d('0x18')](_0x3ef818);}return null;};}function patchUpdates(_0x48b518){return function(_0x3db3d5){try{jsonpatch[_0x381d('0x1e')](_0x3db3d5,_0x48b518,!![]);}catch(_0x284e31){return BPromise[_0x381d('0x1f')](_0x284e31);}return _0x3db3d5[_0x381d('0x20')]();};}function saveUpdates(_0x5472c4,_0x3b00cd){return function(_0x21f589){if(_0x21f589){return _0x21f589[_0x381d('0x21')](_0x5472c4)[_0x381d('0x22')](function(_0xa3e213){return _0xa3e213;});}return null;};}function removeEntity(_0x469672,_0x1c1cc7){return function(_0x1fc913){if(_0x1fc913){return _0x1fc913[_0x381d('0x23')]()['then'](function(){var _0x8799ab=_0x1fc913[_0x381d('0x24')]({'plain':!![]});var _0x440e7d=_0x381d('0x25');return db[_0x381d('0x26')]['destroy']({'where':{'type':_0x440e7d,'resourceId':_0x8799ab['id']}})[_0x381d('0x22')](function(){return _0x1fc913;});})['then'](function(){_0x469672['status'](0xcc)[_0x381d('0x27')]();});}};}function handleEntityNotFound(_0x16379f,_0x3ae8eb){return function(_0x4715ed){if(!_0x4715ed){_0x16379f['sendStatus'](0x194);}return _0x4715ed;};}function handleError(_0x5c89fb,_0x11522d){_0x11522d=_0x11522d||0x1f4;return function(_0x4314c1){logger[_0x381d('0x28')](_0x4314c1[_0x381d('0x29')]);if(_0x4314c1[_0x381d('0x2a')]){delete _0x4314c1[_0x381d('0x2a')];}_0x5c89fb[_0x381d('0x17')](_0x11522d)[_0x381d('0x2b')](_0x4314c1);};}exports[_0x381d('0x2c')]=function(_0x5ae685,_0x10f664){var _0x46c2b6={},_0x59bb91={},_0x4cdd95={'count':0x0,'rows':[]};var _0x2ab4ee=_[_0x381d('0x2d')](db[_0x381d('0x2e')][_0x381d('0x2f')],function(_0x4d0950){return{'name':_0x4d0950[_0x381d('0x30')],'type':_0x4d0950[_0x381d('0x31')]['key']};});_0x59bb91[_0x381d('0x32')]=_['map'](_0x2ab4ee,_0x381d('0x2a'));_0x59bb91[_0x381d('0x33')]=_['keys'](_0x5ae685[_0x381d('0x33')]);_0x59bb91[_0x381d('0x34')]=_[_0x381d('0x35')](_0x59bb91[_0x381d('0x32')],_0x59bb91[_0x381d('0x33')]);_0x46c2b6[_0x381d('0x36')]=_[_0x381d('0x35')](_0x59bb91[_0x381d('0x32')],qs[_0x381d('0x37')](_0x5ae685[_0x381d('0x33')]['fields']));_0x46c2b6['attributes']=_0x46c2b6['attributes']['length']?_0x46c2b6[_0x381d('0x36')]:_0x59bb91[_0x381d('0x32')];if(!_0x5ae685['query'][_0x381d('0x38')](_0x381d('0x39'))){_0x46c2b6[_0x381d('0x1c')]=qs['limit'](_0x5ae685['query'][_0x381d('0x1c')]);_0x46c2b6[_0x381d('0x1b')]=qs['offset'](_0x5ae685[_0x381d('0x33')]['offset']);}_0x46c2b6['order']=qs['sort'](_0x5ae685[_0x381d('0x33')][_0x381d('0x3a')]);_0x46c2b6[_0x381d('0x3b')]=qs[_0x381d('0x34')](_['pick'](_0x5ae685[_0x381d('0x33')],_0x59bb91[_0x381d('0x34')]),_0x2ab4ee);if(_0x5ae685[_0x381d('0x33')][_0x381d('0x3c')]){_0x46c2b6['where']=_['merge'](_0x46c2b6[_0x381d('0x3b')],{'$or':_['map'](_0x2ab4ee,function(_0x15a34e){if(_0x15a34e[_0x381d('0x31')]!==_0x381d('0x3d')){var _0x203a0={};_0x203a0[_0x15a34e['name']]={'$like':'%'+_0x5ae685[_0x381d('0x33')][_0x381d('0x3c')]+'%'};return _0x203a0;}})});}_0x46c2b6=_[_0x381d('0x3e')]({},_0x46c2b6,_0x5ae685[_0x381d('0x3f')]);var _0x3f5d27={'where':_0x46c2b6[_0x381d('0x3b')]};return db['Variable']['count'](_0x3f5d27)[_0x381d('0x22')](function(_0x306df3){_0x4cdd95[_0x381d('0x1a')]=_0x306df3;if(_0x5ae685[_0x381d('0x33')]['includeAll']){_0x46c2b6[_0x381d('0x40')]=[{'all':!![]}];}return db[_0x381d('0x2e')]['findAll'](_0x46c2b6);})[_0x381d('0x22')](function(_0x3b9488){_0x4cdd95['rows']=_0x3b9488;return _0x4cdd95;})[_0x381d('0x22')](respondWithFilteredResult(_0x10f664,_0x46c2b6))[_0x381d('0x41')](handleError(_0x10f664,null));};exports['show']=function(_0x4a9f6b,_0x464a7e){var _0x2ad76f={'raw':!![],'where':{'id':_0x4a9f6b['params']['id']}},_0x560ba0={};_0x560ba0[_0x381d('0x32')]=_[_0x381d('0x42')](db[_0x381d('0x2e')]['rawAttributes']);_0x560ba0[_0x381d('0x33')]=_['keys'](_0x4a9f6b[_0x381d('0x33')]);_0x560ba0[_0x381d('0x34')]=_[_0x381d('0x35')](_0x560ba0['model'],_0x560ba0[_0x381d('0x33')]);_0x2ad76f[_0x381d('0x36')]=_['intersection'](_0x560ba0[_0x381d('0x32')],qs[_0x381d('0x37')](_0x4a9f6b['query'][_0x381d('0x37')]));_0x2ad76f[_0x381d('0x36')]=_0x2ad76f[_0x381d('0x36')][_0x381d('0x43')]?_0x2ad76f[_0x381d('0x36')]:_0x560ba0[_0x381d('0x32')];if(_0x4a9f6b[_0x381d('0x33')][_0x381d('0x44')]){_0x2ad76f[_0x381d('0x40')]=[{'all':!![]}];}_0x2ad76f=_[_0x381d('0x3e')]({},_0x2ad76f,_0x4a9f6b[_0x381d('0x3f')]);return db['Variable'][_0x381d('0x45')](_0x2ad76f)[_0x381d('0x22')](handleEntityNotFound(_0x464a7e,null))[_0x381d('0x22')](respondWithResult(_0x464a7e,null))['catch'](handleError(_0x464a7e,null));};exports[_0x381d('0x46')]=function(_0x1556d1,_0x452c99){return db[_0x381d('0x2e')][_0x381d('0x46')](_0x1556d1['body'],{})[_0x381d('0x22')](function(_0x436cd1){var _0x2e9ff0=_0x1556d1['user'][_0x381d('0x24')]({'plain':!![]});if(!_0x2e9ff0)throw new Error(_0x381d('0x47'));if(_0x2e9ff0[_0x381d('0x48')]===_0x381d('0x49')){var _0x1287d0=_0x436cd1[_0x381d('0x24')]({'plain':!![]});var _0x522719=_0x381d('0x25');return db[_0x381d('0x4a')][_0x381d('0x45')]({'where':{'name':_0x522719,'userProfileId':_0x2e9ff0[_0x381d('0x4b')]},'raw':!![]})[_0x381d('0x22')](function(_0x432bdb){if(_0x432bdb&&_0x432bdb[_0x381d('0x4c')]===0x0){return db[_0x381d('0x26')][_0x381d('0x46')]({'name':_0x1287d0[_0x381d('0x2a')],'resourceId':_0x1287d0['id'],'type':_0x432bdb[_0x381d('0x2a')],'sectionId':_0x432bdb['id']},{})[_0x381d('0x22')](function(){return _0x436cd1;});}else{return _0x436cd1;}})[_0x381d('0x41')](function(_0x31fe0a){logger[_0x381d('0x28')](_0x381d('0x4d'),_0x31fe0a);throw _0x31fe0a;});}return _0x436cd1;})[_0x381d('0x22')](respondWithResult(_0x452c99,0xc9))[_0x381d('0x41')](handleError(_0x452c99,null));};exports[_0x381d('0x21')]=function(_0xbff670,_0x1927ec){if(_0xbff670[_0x381d('0x4e')]['id']){delete _0xbff670[_0x381d('0x4e')]['id'];}return db[_0x381d('0x2e')][_0x381d('0x45')]({'where':{'id':_0xbff670[_0x381d('0x4f')]['id']}})[_0x381d('0x22')](handleEntityNotFound(_0x1927ec,null))[_0x381d('0x22')](saveUpdates(_0xbff670[_0x381d('0x4e')],null))['then'](respondWithResult(_0x1927ec,null))['catch'](handleError(_0x1927ec,null));};exports[_0x381d('0x23')]=function(_0x454a78,_0x52ac13){return db[_0x381d('0x2e')][_0x381d('0x45')]({'where':{'id':_0x454a78[_0x381d('0x4f')]['id']}})[_0x381d('0x22')](handleEntityNotFound(_0x52ac13,null))['then'](removeEntity(_0x52ac13,null))[_0x381d('0x41')](handleError(_0x52ac13,null));}; \ No newline at end of file diff --git a/server/api/variable/variable.model.js b/server/api/variable/variable.model.js index 62c6a1f..a18d10b 100644 --- a/server/api/variable/variable.model.js +++ b/server/api/variable/variable.model.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xbef6=['exports','lodash','../../config/logger','api','moment','bluebird','path','rimraf','../../config/environment','./variable.attributes'];(function(_0x2cee0e,_0x2ff24a){var _0xe9cec=function(_0x4ed8e0){while(--_0x4ed8e0){_0x2cee0e['push'](_0x2cee0e['shift']());}};_0xe9cec(++_0x2ff24a);}(_0xbef6,0xe7));var _0x6bef=function(_0x11d631,_0x5a68d4){_0x11d631=_0x11d631-0x0;var _0x30e9db=_0xbef6[_0x11d631];return _0x30e9db;};'use strict';var _=require(_0x6bef('0x0'));var util=require('util');var logger=require(_0x6bef('0x1'))(_0x6bef('0x2'));var moment=require(_0x6bef('0x3'));var BPromise=require(_0x6bef('0x4'));var rp=require('request-promise');var fs=require('fs');var path=require(_0x6bef('0x5'));var rimraf=require(_0x6bef('0x6'));var config=require(_0x6bef('0x7'));var attributes=require(_0x6bef('0x8'));module[_0x6bef('0x9')]=function(_0x5232a2,_0x1de669){return _0x5232a2['define']('Variable',attributes,{'tableName':'tools_variables','paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file +var _0x1b41=['../../config/logger','api','moment','bluebird','request-promise','../../config/environment','./variable.attributes','Variable','tools_variables','util'];(function(_0x575111,_0x3e4217){var _0x277057=function(_0x1836f){while(--_0x1836f){_0x575111['push'](_0x575111['shift']());}};_0x277057(++_0x3e4217);}(_0x1b41,0x1f3));var _0x11b4=function(_0x8f82df,_0x4ad0e9){_0x8f82df=_0x8f82df-0x0;var _0x19212a=_0x1b41[_0x8f82df];return _0x19212a;};'use strict';var _=require('lodash');var util=require(_0x11b4('0x0'));var logger=require(_0x11b4('0x1'))(_0x11b4('0x2'));var moment=require(_0x11b4('0x3'));var BPromise=require(_0x11b4('0x4'));var rp=require(_0x11b4('0x5'));var fs=require('fs');var path=require('path');var rimraf=require('rimraf');var config=require(_0x11b4('0x6'));var attributes=require(_0x11b4('0x7'));module['exports']=function(_0xa81368,_0x3333e3){return _0xa81368['define'](_0x11b4('0x8'),attributes,{'tableName':_0x11b4('0x9'),'paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file diff --git a/server/api/variable/variable.rpc.js b/server/api/variable/variable.rpc.js index a1f4a61..08b70fe 100644 --- a/server/api/variable/variable.rpc.js +++ b/server/api/variable/variable.rpc.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x1cb9=['include','map','model','then','lodash','moment','bluebird','randomstring','ioredis','../../config/utils','../../config/logger','../../config/environment','jayson/promise','client','http','request','info','Variable,\x20%s,\x20%s','request\x20sent','debug','Variable,\x20%s,\x20%s,\x20%s','stringify','error','message','result','catch','ShowVariable','Variable','options','attributes'];(function(_0x2353fe,_0x4b0bca){var _0x4d43f6=function(_0x5d0bd9){while(--_0x5d0bd9){_0x2353fe['push'](_0x2353fe['shift']());}};_0x4d43f6(++_0x4b0bca);}(_0x1cb9,0x14e));var _0x91cb=function(_0x45a1a7,_0x52fb7c){_0x45a1a7=_0x45a1a7-0x0;var _0x39e14e=_0x1cb9[_0x45a1a7];return _0x39e14e;};'use strict';var _=require(_0x91cb('0x0'));var util=require('util');var moment=require(_0x91cb('0x1'));var BPromise=require(_0x91cb('0x2'));var rs=require(_0x91cb('0x3'));var fs=require('fs');var Redis=require(_0x91cb('0x4'));var db=require('../../mysqldb')['db'];var utils=require(_0x91cb('0x5'));var logger=require(_0x91cb('0x6'))('rpc');var config=require(_0x91cb('0x7'));var jayson=require(_0x91cb('0x8'));var client=jayson[_0x91cb('0x9')][_0x91cb('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x3b9d98,_0x8f8a3b,_0x4c1f56){return new BPromise(function(_0x15c517,_0x5bda2f){return client[_0x91cb('0xb')](_0x3b9d98,_0x4c1f56)['then'](function(_0xa43e7a){logger[_0x91cb('0xc')](_0x91cb('0xd'),_0x8f8a3b,_0x91cb('0xe'));logger[_0x91cb('0xf')](_0x91cb('0x10'),_0x8f8a3b,_0x91cb('0xe'),JSON[_0x91cb('0x11')](_0xa43e7a));if(_0xa43e7a[_0x91cb('0x12')]){if(_0xa43e7a[_0x91cb('0x12')]['code']===0x1f4){logger[_0x91cb('0x12')](_0x91cb('0xd'),_0x8f8a3b,_0xa43e7a['error'][_0x91cb('0x13')]);return _0x5bda2f(_0xa43e7a[_0x91cb('0x12')][_0x91cb('0x13')]);}logger[_0x91cb('0x12')]('Variable,\x20%s,\x20%s',_0x8f8a3b,_0xa43e7a['error'][_0x91cb('0x13')]);return _0x15c517(_0xa43e7a[_0x91cb('0x12')]['message']);}else{logger['info'](_0x91cb('0xd'),_0x8f8a3b,_0x91cb('0xe'));_0x15c517(_0xa43e7a[_0x91cb('0x14')]['message']);}})[_0x91cb('0x15')](function(_0x135890){logger['error'](_0x91cb('0xd'),_0x8f8a3b,_0x135890);_0x5bda2f(_0x135890);});});}exports[_0x91cb('0x16')]=function(_0x1cd34b){var _0xcd1a78=this;return new Promise(function(_0x5cc1c3,_0x3fba4f){return db[_0x91cb('0x17')]['find']({'raw':_0x1cd34b[_0x91cb('0x18')]?_0x1cd34b['options']['raw']===undefined?!![]:![]:!![],'where':_0x1cd34b[_0x91cb('0x18')]?_0x1cd34b[_0x91cb('0x18')]['where']||null:null,'attributes':_0x1cd34b['options']?_0x1cd34b['options'][_0x91cb('0x19')]||null:null,'include':_0x1cd34b[_0x91cb('0x18')]?_0x1cd34b[_0x91cb('0x18')][_0x91cb('0x1a')]?_['map'](_0x1cd34b[_0x91cb('0x18')][_0x91cb('0x1a')],function(_0x1fa837){return{'model':db[_0x1fa837['model']],'as':_0x1fa837['as'],'attributes':_0x1fa837[_0x91cb('0x19')],'include':_0x1fa837[_0x91cb('0x1a')]?_[_0x91cb('0x1b')](_0x1fa837[_0x91cb('0x1a')],function(_0x3ca500){return{'model':db[_0x3ca500[_0x91cb('0x1c')]],'as':_0x3ca500['as'],'attributes':_0x3ca500[_0x91cb('0x19')],'include':_0x3ca500[_0x91cb('0x1a')]?_[_0x91cb('0x1b')](_0x3ca500['include'],function(_0x59bf3a){return{'model':db[_0x59bf3a[_0x91cb('0x1c')]],'as':_0x59bf3a['as'],'attributes':_0x59bf3a['attributes']};}):[]};}):[]};}):[]:[]})[_0x91cb('0x1d')](function(_0x34d372){logger[_0x91cb('0xc')]('ShowVariable',_0x1cd34b);logger[_0x91cb('0xf')]('ShowVariable',_0x1cd34b,JSON[_0x91cb('0x11')](_0x34d372));_0x5cc1c3(_0x34d372);})[_0x91cb('0x15')](function(_0x3b3ee6){logger[_0x91cb('0x12')](_0x91cb('0x16'),_0x3b3ee6['message'],_0x1cd34b);_0x3fba4f(_0xcd1a78[_0x91cb('0x12')](0x1f4,_0x3b3ee6['message']));});});}; \ No newline at end of file +var _0xe14b=['ioredis','../../config/utils','../../config/environment','jayson/promise','client','http','then','info','Variable,\x20%s,\x20%s','Variable,\x20%s,\x20%s,\x20%s','request\x20sent','error','code','message','result','catch','ShowVariable','Variable','find','options','raw','where','attributes','map','include','model','stringify','lodash','util','randomstring'];(function(_0x311c92,_0x9166a3){var _0x2914d0=function(_0x3476d2){while(--_0x3476d2){_0x311c92['push'](_0x311c92['shift']());}};_0x2914d0(++_0x9166a3);}(_0xe14b,0x93));var _0xbe14=function(_0x4d1f0c,_0x5ec163){_0x4d1f0c=_0x4d1f0c-0x0;var _0x277fae=_0xe14b[_0x4d1f0c];return _0x277fae;};'use strict';var _=require(_0xbe14('0x0'));var util=require(_0xbe14('0x1'));var moment=require('moment');var BPromise=require('bluebird');var rs=require(_0xbe14('0x2'));var fs=require('fs');var Redis=require(_0xbe14('0x3'));var db=require('../../mysqldb')['db'];var utils=require(_0xbe14('0x4'));var logger=require('../../config/logger')('rpc');var config=require(_0xbe14('0x5'));var jayson=require(_0xbe14('0x6'));var client=jayson[_0xbe14('0x7')][_0xbe14('0x8')]({'port':0x232a});function respondWithRpcPromise(_0x1d9ade,_0x39387e,_0x196fca){return new BPromise(function(_0x566ae7,_0x50f909){return client['request'](_0x1d9ade,_0x196fca)[_0xbe14('0x9')](function(_0x6fceff){logger[_0xbe14('0xa')](_0xbe14('0xb'),_0x39387e,'request\x20sent');logger['debug'](_0xbe14('0xc'),_0x39387e,_0xbe14('0xd'),JSON['stringify'](_0x6fceff));if(_0x6fceff[_0xbe14('0xe')]){if(_0x6fceff[_0xbe14('0xe')][_0xbe14('0xf')]===0x1f4){logger[_0xbe14('0xe')](_0xbe14('0xb'),_0x39387e,_0x6fceff[_0xbe14('0xe')][_0xbe14('0x10')]);return _0x50f909(_0x6fceff[_0xbe14('0xe')][_0xbe14('0x10')]);}logger[_0xbe14('0xe')](_0xbe14('0xb'),_0x39387e,_0x6fceff[_0xbe14('0xe')][_0xbe14('0x10')]);return _0x566ae7(_0x6fceff['error']['message']);}else{logger[_0xbe14('0xa')](_0xbe14('0xb'),_0x39387e,_0xbe14('0xd'));_0x566ae7(_0x6fceff[_0xbe14('0x11')]['message']);}})[_0xbe14('0x12')](function(_0xe9c3ec){logger[_0xbe14('0xe')](_0xbe14('0xb'),_0x39387e,_0xe9c3ec);_0x50f909(_0xe9c3ec);});});}exports[_0xbe14('0x13')]=function(_0x29ab73){var _0x17ae86=this;return new Promise(function(_0x5ea1f8,_0x137ee5){return db[_0xbe14('0x14')][_0xbe14('0x15')]({'raw':_0x29ab73[_0xbe14('0x16')]?_0x29ab73[_0xbe14('0x16')][_0xbe14('0x17')]===undefined?!![]:![]:!![],'where':_0x29ab73['options']?_0x29ab73[_0xbe14('0x16')][_0xbe14('0x18')]||null:null,'attributes':_0x29ab73[_0xbe14('0x16')]?_0x29ab73[_0xbe14('0x16')][_0xbe14('0x19')]||null:null,'include':_0x29ab73['options']?_0x29ab73[_0xbe14('0x16')]['include']?_[_0xbe14('0x1a')](_0x29ab73['options'][_0xbe14('0x1b')],function(_0x4a25fa){return{'model':db[_0x4a25fa[_0xbe14('0x1c')]],'as':_0x4a25fa['as'],'attributes':_0x4a25fa[_0xbe14('0x19')],'include':_0x4a25fa['include']?_[_0xbe14('0x1a')](_0x4a25fa['include'],function(_0x4587a8){return{'model':db[_0x4587a8['model']],'as':_0x4587a8['as'],'attributes':_0x4587a8[_0xbe14('0x19')],'include':_0x4587a8[_0xbe14('0x1b')]?_[_0xbe14('0x1a')](_0x4587a8[_0xbe14('0x1b')],function(_0x15ef02){return{'model':db[_0x15ef02[_0xbe14('0x1c')]],'as':_0x15ef02['as'],'attributes':_0x15ef02['attributes']};}):[]};}):[]};}):[]:[]})[_0xbe14('0x9')](function(_0x1ba46a){logger[_0xbe14('0xa')](_0xbe14('0x13'),_0x29ab73);logger['debug'](_0xbe14('0x13'),_0x29ab73,JSON[_0xbe14('0x1d')](_0x1ba46a));_0x5ea1f8(_0x1ba46a);})['catch'](function(_0x3c3613){logger[_0xbe14('0xe')](_0xbe14('0x13'),_0x3c3613[_0xbe14('0x10')],_0x29ab73);_0x137ee5(_0x17ae86[_0xbe14('0xe')](0x1f4,_0x3c3613[_0xbe14('0x10')]));});});}; \ No newline at end of file diff --git a/server/api/version/index.js b/server/api/version/index.js index 075aeda..7645eed 100644 --- a/server/api/version/index.js +++ b/server/api/version/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x4f1d=['restart','migrations','exports','express','Router','../../components/auth/service','get','index','isAuthenticated','canUpdate','fetch','/reset','reset','/pull','pull','/restart'];(function(_0x57f2d3,_0x533bfd){var _0x5eadca=function(_0x1e90b9){while(--_0x1e90b9){_0x57f2d3['push'](_0x57f2d3['shift']());}};_0x5eadca(++_0x533bfd);}(_0x4f1d,0x1e3));var _0xd4f1=function(_0x5de214,_0x107e9d){_0x5de214=_0x5de214-0x0;var _0x4df627=_0x4f1d[_0x5de214];return _0x4df627;};'use strict';var express=require(_0xd4f1('0x0'));var router=express[_0xd4f1('0x1')]();var auth=require(_0xd4f1('0x2'));var controller=require('./version.controller');router[_0xd4f1('0x3')]('/',controller[_0xd4f1('0x4')]);router[_0xd4f1('0x3')]('/fetch',auth[_0xd4f1('0x5')](),auth[_0xd4f1('0x6')](),controller[_0xd4f1('0x7')]);router[_0xd4f1('0x3')](_0xd4f1('0x8'),auth[_0xd4f1('0x5')](),auth[_0xd4f1('0x6')](),controller[_0xd4f1('0x9')]);router[_0xd4f1('0x3')](_0xd4f1('0xa'),auth[_0xd4f1('0x5')](),auth[_0xd4f1('0x6')](),controller[_0xd4f1('0xb')]);router['get'](_0xd4f1('0xc'),auth['isAuthenticated'](),controller[_0xd4f1('0xd')]);router[_0xd4f1('0x3')]('/migrations',controller[_0xd4f1('0xe')]);module[_0xd4f1('0xf')]=router; \ No newline at end of file +var _0x6b42=['../../components/auth/service','get','/fetch','isAuthenticated','canUpdate','fetch','reset','/pull','restart','/migrations','exports','express'];(function(_0x44449b,_0x5e16ea){var _0x1dde55=function(_0x3c50f0){while(--_0x3c50f0){_0x44449b['push'](_0x44449b['shift']());}};_0x1dde55(++_0x5e16ea);}(_0x6b42,0x6b));var _0x26b4=function(_0x4a04e0,_0x9a0ce6){_0x4a04e0=_0x4a04e0-0x0;var _0x5f1398=_0x6b42[_0x4a04e0];return _0x5f1398;};'use strict';var express=require(_0x26b4('0x0'));var router=express['Router']();var auth=require(_0x26b4('0x1'));var controller=require('./version.controller');router['get']('/',controller['index']);router[_0x26b4('0x2')](_0x26b4('0x3'),auth[_0x26b4('0x4')](),auth[_0x26b4('0x5')](),controller[_0x26b4('0x6')]);router['get']('/reset',auth[_0x26b4('0x4')](),auth[_0x26b4('0x5')](),controller[_0x26b4('0x7')]);router['get'](_0x26b4('0x8'),auth[_0x26b4('0x4')](),auth[_0x26b4('0x5')](),controller['pull']);router[_0x26b4('0x2')]('/restart',auth[_0x26b4('0x4')](),controller[_0x26b4('0x9')]);router[_0x26b4('0x2')](_0x26b4('0xa'),controller['migrations']);module[_0x26b4('0xb')]=router; \ No newline at end of file diff --git a/server/api/version/version.controller.js b/server/api/version/version.controller.js index 45106a5..0b5f954 100644 --- a/server/api/version/version.controller.js +++ b/server/api/version/version.controller.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x6a79=['\x20to\x20','last','UniqueConstraintError','Database\x20already\x20up-to-date','umzug','lodash','pkginfo','version','compare-versions','child_process','exec','../../config/environment','../../config/pm2','../../config/logger','simple-git','root','index','exports','query','latest','tags','2.0.0','status','json','fetch','master','info','git\x20fetch\x20origin\x20master','reset','FETCH_HEAD','error','git\x20reset\x20--hard\x20FETCH_HEAD','git\x20reset\x20--hard','pull','npm\x20install\x20--production','restart','Your\x20system\x20has\x20been\x20restart\x20successfully','catch','migrations','join','server','length','replace','push','sort','sequelize','Migration','getQueryInterface','constructor','Migration\x20tried\x20to\x20use\x20old\x20style\x20\x22done\x22\x20callback.\x20Please\x20upgrade\x20to\x20\x22umzug\x22\x20and\x20return\x20a\x20promise\x20instead.','map','.js','Database\x20migrated\x20successfully\x20from\x20version\x20'];(function(_0x174ef5,_0x256e8e){var _0x1cc379=function(_0x3eafcf){while(--_0x3eafcf){_0x174ef5['push'](_0x174ef5['shift']());}};_0x1cc379(++_0x256e8e);}(_0x6a79,0xa3));var _0x96a7=function(_0x58b6c7,_0x3bf35e){_0x58b6c7=_0x58b6c7-0x0;var _0x5f50d0=_0x6a79[_0x58b6c7];return _0x5f50d0;};'use strict';var Umzug=require(_0x96a7('0x0'));var path=require('path');var fs=require('fs');var _=require(_0x96a7('0x1'));var pkginfo=require(_0x96a7('0x2'))(module,_0x96a7('0x3'));var compareVersions=require(_0x96a7('0x4'));var exec=require(_0x96a7('0x5'))[_0x96a7('0x6')];var db=require('../../mysqldb')['db'];var config=require(_0x96a7('0x7'));var pm2=require(_0x96a7('0x8'));var logger=require(_0x96a7('0x9'))('update');var git=require(_0x96a7('0xa'))(config[_0x96a7('0xb')]);exports[_0x96a7('0xc')]=function(_0x1a81d8,_0x217bd1){var _0x48f7a4={'current':module[_0x96a7('0xd')][_0x96a7('0x3')],'phonebar':0x2};if(_0x1a81d8[_0x96a7('0xe')]&&_0x1a81d8[_0x96a7('0xe')][_0x96a7('0xf')]){return git['fetch']()[_0x96a7('0x10')](function(_0x5d96f5,_0x3be9f0){_0x48f7a4[_0x96a7('0xf')]=(_0x5d96f5?module[_0x96a7('0xd')][_0x96a7('0x3')]:_0x3be9f0[_0x96a7('0xf')])||_0x96a7('0x11');return _0x217bd1[_0x96a7('0x12')](0xc8)[_0x96a7('0x13')](_0x48f7a4);});}else{return _0x217bd1[_0x96a7('0x12')](0xc8)[_0x96a7('0x13')](_0x48f7a4);}};exports[_0x96a7('0x14')]=function(_0x5ed36c,_0x1a9c3c){return git[_0x96a7('0x14')](['origin',_0x96a7('0x15')],function(_0x1df1b8){if(_0x1df1b8){logger['error'](_0x1df1b8);return _0x1a9c3c[_0x96a7('0x12')](0x1f4)[_0x96a7('0x13')](_0x1df1b8);}logger[_0x96a7('0x16')]('git\x20fetch');return _0x1a9c3c[_0x96a7('0x12')](0xc8)['json']({'output':_0x96a7('0x17')});});};exports[_0x96a7('0x18')]=function(_0x2e5f3e,_0x4a2671){return git['reset'](['--hard',_0x96a7('0x19')],function(_0x8700a7){if(_0x8700a7){logger[_0x96a7('0x1a')](_0x8700a7);return _0x4a2671[_0x96a7('0x12')](0x1f4)[_0x96a7('0x13')](_0x8700a7);}logger['info'](_0x96a7('0x1b'));return _0x4a2671[_0x96a7('0x12')](0xc8)[_0x96a7('0x13')]({'output':_0x96a7('0x1c')});});};exports[_0x96a7('0x1d')]=function(_0x1c43b8,_0x2b68ef){exec(_0x96a7('0x1e'),function(_0x5ef3e7,_0x328803,_0x90c123){logger[_0x96a7('0x16')](_0x328803);logger['info'](_0x90c123);if(_0x5ef3e7){logger[_0x96a7('0x1a')](_0x5ef3e7);return _0x2b68ef[_0x96a7('0x12')](0x1f4)['json'](_0x5ef3e7);}return _0x2b68ef[_0x96a7('0x12')](0xc8)['json']({'output':_0x328803});});};exports[_0x96a7('0x1f')]=function(_0x371f1f,_0x1317b9){return pm2[_0x96a7('0x1f')]('motion2')['then'](function(_0x4f5af9){logger[_0x96a7('0x16')]('pm2\x20restart\x20motion\x20%s',_0x4f5af9);return _0x1317b9[_0x96a7('0x12')](0xc8)['json']({'output':_0x96a7('0x20')});})[_0x96a7('0x21')](function(_0x13d281){logger[_0x96a7('0x1a')](_0x13d281);return _0x1317b9[_0x96a7('0x12')](0x1f4)['json'](_0x13d281);});};exports[_0x96a7('0x22')]=function(_0x141e0a,_0x10edf5){var _0x3762ee=fs['readdirSync'](path[_0x96a7('0x23')](config[_0x96a7('0xb')],_0x96a7('0x24'),_0x96a7('0x22')));var _0x28abf4=[];for(var _0x1b9877=0x0;_0x1b9877<_0x3762ee[_0x96a7('0x25')];_0x1b9877++){var _0x5e1db7=_0x3762ee[_0x1b9877][_0x96a7('0x26')]('.js','');if(compareVersions(module[_0x96a7('0xd')]['version'],_0x5e1db7)===-0x1){_0x28abf4[_0x96a7('0x27')](_0x5e1db7);}}if(_0x28abf4[_0x96a7('0x25')]){var _0x37ecaa=_0x28abf4[_0x96a7('0x28')](compareVersions);var _0x16a558=new Umzug({'storage':_0x96a7('0x29'),'storageOptions':{'model':db[_0x96a7('0x2a')],'modelName':_0x96a7('0x2a'),'columnName':'version'},'migrations':{'params':[db[_0x96a7('0x29')][_0x96a7('0x2b')](),db[_0x96a7('0x29')][_0x96a7('0x2c')],function(){throw new Error(_0x96a7('0x2d'));}],'path':path[_0x96a7('0x23')](config['root'],'server','migrations'),'pattern':/\.js$/}});_0x16a558['up']({'migrations':_[_0x96a7('0x2e')](_0x37ecaa,function(_0x281aee){return _0x281aee+_0x96a7('0x2f');})})['then'](function(){return _0x10edf5[_0x96a7('0x12')](0xc8)[_0x96a7('0x13')]({'output':_0x96a7('0x30')+module[_0x96a7('0xd')][_0x96a7('0x3')]+_0x96a7('0x31')+_[_0x96a7('0x32')](_0x37ecaa),'migrations':_[_0x96a7('0x23')](_0x37ecaa)});})['catch'](function(_0xda9be){if(_0xda9be instanceof db[_0x96a7('0x29')][_0x96a7('0x33')]){return _0x10edf5[_0x96a7('0x12')](0xc8)[_0x96a7('0x13')]({'output':_0x96a7('0x34')});}else{return _0x10edf5[_0x96a7('0x12')](0x1f4)['json'](_0xda9be);}});}else{return _0x10edf5[_0x96a7('0x12')](0xc8)[_0x96a7('0x13')]({'output':'Database\x20already\x20up-to-date'});}}; \ No newline at end of file +var _0x8818=['getQueryInterface','Migration\x20tried\x20to\x20use\x20old\x20style\x20\x22done\x22\x20callback.\x20Please\x20upgrade\x20to\x20\x22umzug\x22\x20and\x20return\x20a\x20promise\x20instead.','\x20to\x20','UniqueConstraintError','Database\x20already\x20up-to-date','umzug','path','lodash','pkginfo','version','compare-versions','child_process','exec','../../mysqldb','../../config/pm2','../../config/logger','update','simple-git','root','index','exports','query','latest','fetch','tags','2.0.0','status','json','origin','master','info','git\x20fetch','git\x20fetch\x20origin\x20master','reset','FETCH_HEAD','error','git\x20reset\x20--hard\x20FETCH_HEAD','git\x20reset\x20--hard','pull','restart','motion2','then','pm2\x20restart\x20motion\x20%s','catch','readdirSync','join','server','migrations','length','replace','.js','push','sort','sequelize','Migration'];(function(_0x302b51,_0x29ddad){var _0x7f1357=function(_0x59a55b){while(--_0x59a55b){_0x302b51['push'](_0x302b51['shift']());}};_0x7f1357(++_0x29ddad);}(_0x8818,0xe1));var _0x8881=function(_0x334841,_0x2bbc4c){_0x334841=_0x334841-0x0;var _0x5beb4b=_0x8818[_0x334841];return _0x5beb4b;};'use strict';var Umzug=require(_0x8881('0x0'));var path=require(_0x8881('0x1'));var fs=require('fs');var _=require(_0x8881('0x2'));var pkginfo=require(_0x8881('0x3'))(module,_0x8881('0x4'));var compareVersions=require(_0x8881('0x5'));var exec=require(_0x8881('0x6'))[_0x8881('0x7')];var db=require(_0x8881('0x8'))['db'];var config=require('../../config/environment');var pm2=require(_0x8881('0x9'));var logger=require(_0x8881('0xa'))(_0x8881('0xb'));var git=require(_0x8881('0xc'))(config[_0x8881('0xd')]);exports[_0x8881('0xe')]=function(_0x15b37e,_0x1915c2){var _0x25e614={'current':module[_0x8881('0xf')][_0x8881('0x4')],'phonebar':0x2};if(_0x15b37e['query']&&_0x15b37e[_0x8881('0x10')][_0x8881('0x11')]){return git[_0x8881('0x12')]()[_0x8881('0x13')](function(_0x2fb65c,_0x569a6b){_0x25e614['latest']=(_0x2fb65c?module[_0x8881('0xf')][_0x8881('0x4')]:_0x569a6b[_0x8881('0x11')])||_0x8881('0x14');return _0x1915c2[_0x8881('0x15')](0xc8)['json'](_0x25e614);});}else{return _0x1915c2[_0x8881('0x15')](0xc8)[_0x8881('0x16')](_0x25e614);}};exports[_0x8881('0x12')]=function(_0x45296d,_0x2432e7){return git[_0x8881('0x12')]([_0x8881('0x17'),_0x8881('0x18')],function(_0x14535f){if(_0x14535f){logger['error'](_0x14535f);return _0x2432e7['status'](0x1f4)['json'](_0x14535f);}logger[_0x8881('0x19')](_0x8881('0x1a'));return _0x2432e7[_0x8881('0x15')](0xc8)[_0x8881('0x16')]({'output':_0x8881('0x1b')});});};exports[_0x8881('0x1c')]=function(_0xfbbac4,_0x58b40b){return git['reset'](['--hard',_0x8881('0x1d')],function(_0x100eba){if(_0x100eba){logger[_0x8881('0x1e')](_0x100eba);return _0x58b40b['status'](0x1f4)['json'](_0x100eba);}logger[_0x8881('0x19')](_0x8881('0x1f'));return _0x58b40b[_0x8881('0x15')](0xc8)[_0x8881('0x16')]({'output':_0x8881('0x20')});});};exports[_0x8881('0x21')]=function(_0x1d13a6,_0x32b150){exec('npm\x20install\x20--production',function(_0x2b74b5,_0x46c506,_0x2ea6b2){logger['info'](_0x46c506);logger['info'](_0x2ea6b2);if(_0x2b74b5){logger['error'](_0x2b74b5);return _0x32b150['status'](0x1f4)[_0x8881('0x16')](_0x2b74b5);}return _0x32b150[_0x8881('0x15')](0xc8)[_0x8881('0x16')]({'output':_0x46c506});});};exports[_0x8881('0x22')]=function(_0x396e25,_0x55c077){return pm2[_0x8881('0x22')](_0x8881('0x23'))[_0x8881('0x24')](function(_0x56cd37){logger[_0x8881('0x19')](_0x8881('0x25'),_0x56cd37);return _0x55c077[_0x8881('0x15')](0xc8)[_0x8881('0x16')]({'output':'Your\x20system\x20has\x20been\x20restart\x20successfully'});})[_0x8881('0x26')](function(_0x1dee37){logger[_0x8881('0x1e')](_0x1dee37);return _0x55c077[_0x8881('0x15')](0x1f4)['json'](_0x1dee37);});};exports['migrations']=function(_0x515fc5,_0x35f5b3){var _0x56f1c8=fs[_0x8881('0x27')](path[_0x8881('0x28')](config[_0x8881('0xd')],_0x8881('0x29'),_0x8881('0x2a')));var _0x61df44=[];for(var _0x2e3a4a=0x0;_0x2e3a4a<_0x56f1c8[_0x8881('0x2b')];_0x2e3a4a++){var _0x2e6571=_0x56f1c8[_0x2e3a4a][_0x8881('0x2c')](_0x8881('0x2d'),'');if(compareVersions(module[_0x8881('0xf')][_0x8881('0x4')],_0x2e6571)===-0x1){_0x61df44[_0x8881('0x2e')](_0x2e6571);}}if(_0x61df44[_0x8881('0x2b')]){var _0x436ad8=_0x61df44[_0x8881('0x2f')](compareVersions);var _0x19caec=new Umzug({'storage':_0x8881('0x30'),'storageOptions':{'model':db[_0x8881('0x31')],'modelName':_0x8881('0x31'),'columnName':_0x8881('0x4')},'migrations':{'params':[db[_0x8881('0x30')][_0x8881('0x32')](),db[_0x8881('0x30')]['constructor'],function(){throw new Error(_0x8881('0x33'));}],'path':path[_0x8881('0x28')](config[_0x8881('0xd')],_0x8881('0x29'),'migrations'),'pattern':/\.js$/}});_0x19caec['up']({'migrations':_['map'](_0x436ad8,function(_0x3d6553){return _0x3d6553+_0x8881('0x2d');})})[_0x8881('0x24')](function(){return _0x35f5b3[_0x8881('0x15')](0xc8)[_0x8881('0x16')]({'output':'Database\x20migrated\x20successfully\x20from\x20version\x20'+module[_0x8881('0xf')][_0x8881('0x4')]+_0x8881('0x34')+_['last'](_0x436ad8),'migrations':_[_0x8881('0x28')](_0x436ad8)});})[_0x8881('0x26')](function(_0x38ba19){if(_0x38ba19 instanceof db[_0x8881('0x30')][_0x8881('0x35')]){return _0x35f5b3[_0x8881('0x15')](0xc8)[_0x8881('0x16')]({'output':_0x8881('0x36')});}else{return _0x35f5b3[_0x8881('0x15')](0x1f4)['json'](_0x38ba19);}});}else{return _0x35f5b3['status'](0xc8)[_0x8881('0x16')]({'output':_0x8881('0x36')});}}; \ No newline at end of file diff --git a/server/api/voiceAgentReport/index.js b/server/api/voiceAgentReport/index.js index 21e9cd5..ab17b9b 100644 --- a/server/api/voiceAgentReport/index.js +++ b/server/api/voiceAgentReport/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x2f6c=['index','/describe','describe','/:id','post','create','put','delete','exports','multer','path','connect-timeout','express','Router','fs-extra','./voiceAgentReport.controller','get','isAuthenticated'];(function(_0x1928c9,_0x13a6d1){var _0x51b5fb=function(_0x24cf70){while(--_0x24cf70){_0x1928c9['push'](_0x1928c9['shift']());}};_0x51b5fb(++_0x13a6d1);}(_0x2f6c,0xe1));var _0xc2f6=function(_0x280f4a,_0x2ed8d6){_0x280f4a=_0x280f4a-0x0;var _0x1bb157=_0x2f6c[_0x280f4a];return _0x1bb157;};'use strict';var multer=require(_0xc2f6('0x0'));var util=require('util');var path=require(_0xc2f6('0x1'));var timeout=require(_0xc2f6('0x2'));var express=require(_0xc2f6('0x3'));var router=express[_0xc2f6('0x4')]();var fs_extra=require(_0xc2f6('0x5'));var auth=require('../../components/auth/service');var interaction=require('../../components/interaction/service');var config=require('../../config/environment');var controller=require(_0xc2f6('0x6'));router[_0xc2f6('0x7')]('/',auth[_0xc2f6('0x8')](),controller[_0xc2f6('0x9')]);router[_0xc2f6('0x7')](_0xc2f6('0xa'),auth['isAuthenticated'](),controller[_0xc2f6('0xb')]);router[_0xc2f6('0x7')](_0xc2f6('0xc'),auth['isAuthenticated'](),controller['show']);router[_0xc2f6('0xd')]('/',auth[_0xc2f6('0x8')](),controller[_0xc2f6('0xe')]);router[_0xc2f6('0xf')](_0xc2f6('0xc'),auth[_0xc2f6('0x8')](),controller['update']);router[_0xc2f6('0x10')](_0xc2f6('0xc'),auth[_0xc2f6('0x8')](),controller['destroy']);module[_0xc2f6('0x11')]=router; \ No newline at end of file +var _0x9fd6=['index','/describe','get','show','post','create','/:id','update','delete','destroy','exports','multer','connect-timeout','Router','fs-extra','../../components/auth/service','../../components/interaction/service','./voiceAgentReport.controller','isAuthenticated'];(function(_0x3d347f,_0x297f3b){var _0x11054f=function(_0x553142){while(--_0x553142){_0x3d347f['push'](_0x3d347f['shift']());}};_0x11054f(++_0x297f3b);}(_0x9fd6,0xb6));var _0x69fd=function(_0x122ef9,_0x451d2a){_0x122ef9=_0x122ef9-0x0;var _0x42fba0=_0x9fd6[_0x122ef9];return _0x42fba0;};'use strict';var multer=require(_0x69fd('0x0'));var util=require('util');var path=require('path');var timeout=require(_0x69fd('0x1'));var express=require('express');var router=express[_0x69fd('0x2')]();var fs_extra=require(_0x69fd('0x3'));var auth=require(_0x69fd('0x4'));var interaction=require(_0x69fd('0x5'));var config=require('../../config/environment');var controller=require(_0x69fd('0x6'));router['get']('/',auth[_0x69fd('0x7')](),controller[_0x69fd('0x8')]);router['get'](_0x69fd('0x9'),auth['isAuthenticated'](),controller['describe']);router[_0x69fd('0xa')]('/:id',auth['isAuthenticated'](),controller[_0x69fd('0xb')]);router[_0x69fd('0xc')]('/',auth[_0x69fd('0x7')](),controller[_0x69fd('0xd')]);router['put'](_0x69fd('0xe'),auth[_0x69fd('0x7')](),controller[_0x69fd('0xf')]);router[_0x69fd('0x10')](_0x69fd('0xe'),auth[_0x69fd('0x7')](),controller[_0x69fd('0x11')]);module[_0x69fd('0x12')]=router; \ No newline at end of file diff --git a/server/api/voiceAgentReport/voiceAgentReport.attributes.js b/server/api/voiceAgentReport/voiceAgentReport.attributes.js index 4f6f25a..0edc5f7 100644 --- a/server/api/voiceAgentReport/voiceAgentReport.attributes.js +++ b/server/api/voiceAgentReport/voiceAgentReport.attributes.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x9d5b=['BOOLEAN','INTEGER','FORWARD,\x20BLIND,\x20ATTENDED','exports','STRING','DATE'];(function(_0x45d55e,_0x2fede3){var _0x29812a=function(_0x3c6830){while(--_0x3c6830){_0x45d55e['push'](_0x45d55e['shift']());}};_0x29812a(++_0x2fede3);}(_0x9d5b,0x14d));var _0xb9d5=function(_0x2f8b02,_0x1efa57){_0x2f8b02=_0x2f8b02-0x0;var _0x41a3f4=_0x9d5b[_0x2f8b02];return _0x41a3f4;};'use strict';var Sequelize=require('sequelize');module[_0xb9d5('0x0')]={'type':{'type':Sequelize[_0xb9d5('0x1')]},'uniqueid':{'type':Sequelize[_0xb9d5('0x1')]},'calleridnum':{'type':Sequelize[_0xb9d5('0x1')]},'calleridname':{'type':Sequelize[_0xb9d5('0x1')]},'queue':{'type':Sequelize['STRING']},'interface':{'type':Sequelize[_0xb9d5('0x1')]},'membername':{'type':Sequelize['STRING']},'agentcalledAt':{'type':Sequelize[_0xb9d5('0x2')]},'agentconnectAt':{'type':Sequelize[_0xb9d5('0x2')]},'agentcompleteAt':{'type':Sequelize[_0xb9d5('0x2')]},'agentringnoanswerAt':{'type':Sequelize[_0xb9d5('0x2')]},'agentdumpAt':{'type':Sequelize[_0xb9d5('0x2')]},'holdtime':{'type':Sequelize['INTEGER']},'agentcomplete':{'type':Sequelize[_0xb9d5('0x3')],'defaultValue':![]},'agentringnoanswer':{'type':Sequelize[_0xb9d5('0x3')],'defaultValue':![]},'agentdump':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'talktime':{'type':Sequelize[_0xb9d5('0x4')]},'agentacw':{'type':Sequelize[_0xb9d5('0x3')],'defaultValue':![]},'acwtime':{'type':Sequelize[_0xb9d5('0x4')]},'reason':{'type':Sequelize[_0xb9d5('0x1')]},'lastevent':{'type':Sequelize['STRING']},'channel':{'type':Sequelize[_0xb9d5('0x1')]},'channelstate':{'type':Sequelize[_0xb9d5('0x4')]},'channelstatedesc':{'type':Sequelize['STRING']},'connectedlinenum':{'type':Sequelize[_0xb9d5('0x1')]},'connectedlinename':{'type':Sequelize[_0xb9d5('0x1')]},'language':{'type':Sequelize[_0xb9d5('0x1')]},'accountcode':{'type':Sequelize[_0xb9d5('0x1')]},'context':{'type':Sequelize[_0xb9d5('0x1')]},'exten':{'type':Sequelize[_0xb9d5('0x1')]},'priority':{'type':Sequelize[_0xb9d5('0x1')]},'destchannel':{'type':Sequelize[_0xb9d5('0x1')]},'destchannelstate':{'type':Sequelize[_0xb9d5('0x4')]},'destchannelstatedesc':{'type':Sequelize[_0xb9d5('0x1')]},'destcalleridnum':{'type':Sequelize[_0xb9d5('0x1')]},'destcalleridname':{'type':Sequelize['STRING']},'destconnectedlinenum':{'type':Sequelize[_0xb9d5('0x1')]},'destconnectedlinename':{'type':Sequelize[_0xb9d5('0x1')]},'destlanguage':{'type':Sequelize['STRING']},'destaccountcode':{'type':Sequelize[_0xb9d5('0x1')]},'destcontext':{'type':Sequelize[_0xb9d5('0x1')]},'destexten':{'type':Sequelize[_0xb9d5('0x1')]},'destpriority':{'type':Sequelize['STRING']},'destuniqueid':{'type':Sequelize[_0xb9d5('0x1')]},'answeredelsewheredestinationuniqueid':{'type':Sequelize[_0xb9d5('0x1')]},'answeredelsewheremembername':{'type':Sequelize[_0xb9d5('0x1')]},'transfer':{'type':Sequelize[_0xb9d5('0x3')],'defaultValue':![]},'transfertype':{'type':Sequelize[_0xb9d5('0x1')],'comment':_0xb9d5('0x5')},'transferexten':{'type':Sequelize[_0xb9d5('0x1')]},'transferuniqueid':{'type':Sequelize[_0xb9d5('0x1')]},'agententerreason':{'type':Sequelize[_0xb9d5('0x4')],'defaultValue':0x0}}; \ No newline at end of file +var _0x215d=['FORWARD,\x20BLIND,\x20ATTENDED','sequelize','STRING','DATE','BOOLEAN','INTEGER'];(function(_0x5e1ba9,_0x17e64e){var _0x3e1bcd=function(_0x5e13fe){while(--_0x5e13fe){_0x5e1ba9['push'](_0x5e1ba9['shift']());}};_0x3e1bcd(++_0x17e64e);}(_0x215d,0x187));var _0xd215=function(_0x24d994,_0x4b33da){_0x24d994=_0x24d994-0x0;var _0x5ae16f=_0x215d[_0x24d994];return _0x5ae16f;};'use strict';var Sequelize=require(_0xd215('0x0'));module['exports']={'type':{'type':Sequelize[_0xd215('0x1')]},'uniqueid':{'type':Sequelize[_0xd215('0x1')]},'calleridnum':{'type':Sequelize[_0xd215('0x1')]},'calleridname':{'type':Sequelize[_0xd215('0x1')]},'queue':{'type':Sequelize[_0xd215('0x1')]},'interface':{'type':Sequelize[_0xd215('0x1')]},'membername':{'type':Sequelize['STRING']},'agentcalledAt':{'type':Sequelize[_0xd215('0x2')]},'agentconnectAt':{'type':Sequelize['DATE']},'agentcompleteAt':{'type':Sequelize[_0xd215('0x2')]},'agentringnoanswerAt':{'type':Sequelize[_0xd215('0x2')]},'agentdumpAt':{'type':Sequelize[_0xd215('0x2')]},'holdtime':{'type':Sequelize['INTEGER']},'agentcomplete':{'type':Sequelize[_0xd215('0x3')],'defaultValue':![]},'agentringnoanswer':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'agentdump':{'type':Sequelize[_0xd215('0x3')],'defaultValue':![]},'talktime':{'type':Sequelize[_0xd215('0x4')]},'agentacw':{'type':Sequelize[_0xd215('0x3')],'defaultValue':![]},'acwtime':{'type':Sequelize['INTEGER']},'reason':{'type':Sequelize[_0xd215('0x1')]},'lastevent':{'type':Sequelize[_0xd215('0x1')]},'channel':{'type':Sequelize[_0xd215('0x1')]},'channelstate':{'type':Sequelize[_0xd215('0x4')]},'channelstatedesc':{'type':Sequelize[_0xd215('0x1')]},'connectedlinenum':{'type':Sequelize['STRING']},'connectedlinename':{'type':Sequelize[_0xd215('0x1')]},'language':{'type':Sequelize[_0xd215('0x1')]},'accountcode':{'type':Sequelize[_0xd215('0x1')]},'context':{'type':Sequelize['STRING']},'exten':{'type':Sequelize[_0xd215('0x1')]},'priority':{'type':Sequelize[_0xd215('0x1')]},'destchannel':{'type':Sequelize[_0xd215('0x1')]},'destchannelstate':{'type':Sequelize[_0xd215('0x4')]},'destchannelstatedesc':{'type':Sequelize[_0xd215('0x1')]},'destcalleridnum':{'type':Sequelize['STRING']},'destcalleridname':{'type':Sequelize[_0xd215('0x1')]},'destconnectedlinenum':{'type':Sequelize[_0xd215('0x1')]},'destconnectedlinename':{'type':Sequelize[_0xd215('0x1')]},'destlanguage':{'type':Sequelize[_0xd215('0x1')]},'destaccountcode':{'type':Sequelize[_0xd215('0x1')]},'destcontext':{'type':Sequelize[_0xd215('0x1')]},'destexten':{'type':Sequelize[_0xd215('0x1')]},'destpriority':{'type':Sequelize[_0xd215('0x1')]},'destuniqueid':{'type':Sequelize['STRING']},'answeredelsewheredestinationuniqueid':{'type':Sequelize[_0xd215('0x1')]},'answeredelsewheremembername':{'type':Sequelize[_0xd215('0x1')]},'transfer':{'type':Sequelize[_0xd215('0x3')],'defaultValue':![]},'transfertype':{'type':Sequelize[_0xd215('0x1')],'comment':_0xd215('0x5')},'transferexten':{'type':Sequelize[_0xd215('0x1')]},'transferuniqueid':{'type':Sequelize[_0xd215('0x1')]},'agententerreason':{'type':Sequelize[_0xd215('0x4')],'defaultValue':0x0}}; \ No newline at end of file diff --git a/server/api/voiceAgentReport/voiceAgentReport.controller.js b/server/api/voiceAgentReport/voiceAgentReport.controller.js index 4d7885d..9a2a75c 100644 --- a/server/api/voiceAgentReport/voiceAgentReport.controller.js +++ b/server/api/voiceAgentReport/voiceAgentReport.controller.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xa9e0=['type','options','includeAll','include','findAll','catch','show','params','find','body','describe','eml-format','rimraf','zip-dir','moment','mustache','util','path','sox','to-csv','fs-extra','lodash','squel','desk.js','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/license/util','../../mysqldb','sendStatus','end','status','json','undefined','limit','offset','count','set','Content-Range','apply','save','update','then','destroy','stack','name','send','index','VoiceAgentReport','rawAttributes','fieldName','key','model','map','query','keys','filters','intersection','fields','attributes','length','hasOwnProperty','nolimit','sort','where','filter','merge'];(function(_0x87b0ff,_0x314389){var _0x3bc0b2=function(_0x41682b){while(--_0x41682b){_0x87b0ff['push'](_0x87b0ff['shift']());}};_0x3bc0b2(++_0x314389);}(_0xa9e0,0x123));var _0x0a9e=function(_0x1cfa0d,_0x4391f2){_0x1cfa0d=_0x1cfa0d-0x0;var _0xe33279=_0xa9e0[_0x1cfa0d];return _0xe33279;};'use strict';var emlformat=require(_0x0a9e('0x0'));var rimraf=require(_0x0a9e('0x1'));var zipdir=require(_0x0a9e('0x2'));var jsonpatch=require('fast-json-patch');var rp=require('request-promise');var moment=require(_0x0a9e('0x3'));var BPromise=require('bluebird');var Mustache=require(_0x0a9e('0x4'));var util=require(_0x0a9e('0x5'));var path=require(_0x0a9e('0x6'));var sox=require(_0x0a9e('0x7'));var csv=require(_0x0a9e('0x8'));var ejs=require('ejs');var fs=require('fs');var fs_extra=require(_0x0a9e('0x9'));var _=require(_0x0a9e('0xa'));var squel=require(_0x0a9e('0xb'));var crypto=require('crypto');var jsforce=require('jsforce');var deskjs=require(_0x0a9e('0xc'));var toCsv=require('to-csv');var querystring=require('querystring');var Papa=require(_0x0a9e('0xd'));var Redis=require(_0x0a9e('0xe'));var authService=require(_0x0a9e('0xf'));var qs=require(_0x0a9e('0x10'));var as=require(_0x0a9e('0x11'));var hardwareService=require(_0x0a9e('0x12'));var logger=require('../../config/logger')('api');var utils=require('../../config/utils');var config=require('../../config/environment');var licenseUtil=require(_0x0a9e('0x13'));var db=require(_0x0a9e('0x14'))['db'];function respondWithStatusCode(_0xd5b662,_0x26d672){_0x26d672=_0x26d672||0xcc;return function(_0x32d742){if(_0x32d742){return _0xd5b662[_0x0a9e('0x15')](_0x26d672);}return _0xd5b662['status'](_0x26d672)[_0x0a9e('0x16')]();};}function respondWithResult(_0x239b12,_0x2b4227){_0x2b4227=_0x2b4227||0xc8;return function(_0x281129){if(_0x281129){return _0x239b12[_0x0a9e('0x17')](_0x2b4227)[_0x0a9e('0x18')](_0x281129);}};}function respondWithFilteredResult(_0x52a03d,_0x22dccb){return function(_0x5d0880){if(_0x5d0880){var _0x1985b6=typeof _0x22dccb['offset']===_0x0a9e('0x19')&&typeof _0x22dccb[_0x0a9e('0x1a')]==='undefined';var _0x225616=_0x5d0880['count'];var _0x459eb1=_0x1985b6?0x0:_0x22dccb[_0x0a9e('0x1b')];var _0x106033=_0x1985b6?_0x5d0880[_0x0a9e('0x1c')]:_0x22dccb[_0x0a9e('0x1b')]+_0x22dccb[_0x0a9e('0x1a')];var _0x530eb7;if(_0x106033>=_0x225616){_0x106033=_0x225616;_0x530eb7=0xc8;}else{_0x530eb7=0xce;}_0x52a03d[_0x0a9e('0x17')](_0x530eb7);return _0x52a03d[_0x0a9e('0x1d')](_0x0a9e('0x1e'),_0x459eb1+'-'+_0x106033+'/'+_0x225616)[_0x0a9e('0x18')](_0x5d0880);}return null;};}function patchUpdates(_0x105080){return function(_0x4bb1e3){try{jsonpatch[_0x0a9e('0x1f')](_0x4bb1e3,_0x105080,!![]);}catch(_0x155cce){return BPromise['reject'](_0x155cce);}return _0x4bb1e3[_0x0a9e('0x20')]();};}function saveUpdates(_0x5a09ef,_0x588269){return function(_0x3a02e1){if(_0x3a02e1){return _0x3a02e1[_0x0a9e('0x21')](_0x5a09ef)[_0x0a9e('0x22')](function(_0x30bae6){return _0x30bae6;});}return null;};}function removeEntity(_0x4abc77,_0xfb6e48){return function(_0x2fb0e4){if(_0x2fb0e4){return _0x2fb0e4[_0x0a9e('0x23')]()[_0x0a9e('0x22')](function(){_0x4abc77[_0x0a9e('0x17')](0xcc)[_0x0a9e('0x16')]();});}};}function handleEntityNotFound(_0x16b1ca,_0x5ea472){return function(_0x59181e){if(!_0x59181e){_0x16b1ca[_0x0a9e('0x15')](0x194);}return _0x59181e;};}function handleError(_0x3a8e58,_0x40c424){_0x40c424=_0x40c424||0x1f4;return function(_0x33161b){logger['error'](_0x33161b[_0x0a9e('0x24')]);if(_0x33161b['name']){delete _0x33161b[_0x0a9e('0x25')];}_0x3a8e58['status'](_0x40c424)[_0x0a9e('0x26')](_0x33161b);};}exports[_0x0a9e('0x27')]=function(_0x25fba9,_0x14433c){var _0x140511={},_0x1538a4={},_0x11c3b6={'count':0x0,'rows':[]};var _0x14de77=_['map'](db[_0x0a9e('0x28')][_0x0a9e('0x29')],function(_0x2b1f27){return{'name':_0x2b1f27[_0x0a9e('0x2a')],'type':_0x2b1f27['type'][_0x0a9e('0x2b')]};});_0x1538a4[_0x0a9e('0x2c')]=_[_0x0a9e('0x2d')](_0x14de77,_0x0a9e('0x25'));_0x1538a4[_0x0a9e('0x2e')]=_[_0x0a9e('0x2f')](_0x25fba9[_0x0a9e('0x2e')]);_0x1538a4[_0x0a9e('0x30')]=_[_0x0a9e('0x31')](_0x1538a4['model'],_0x1538a4[_0x0a9e('0x2e')]);_0x140511['attributes']=_[_0x0a9e('0x31')](_0x1538a4[_0x0a9e('0x2c')],qs[_0x0a9e('0x32')](_0x25fba9[_0x0a9e('0x2e')][_0x0a9e('0x32')]));_0x140511['attributes']=_0x140511[_0x0a9e('0x33')][_0x0a9e('0x34')]?_0x140511[_0x0a9e('0x33')]:_0x1538a4[_0x0a9e('0x2c')];if(!_0x25fba9[_0x0a9e('0x2e')][_0x0a9e('0x35')](_0x0a9e('0x36'))){_0x140511[_0x0a9e('0x1a')]=qs['limit'](_0x25fba9[_0x0a9e('0x2e')]['limit']);_0x140511[_0x0a9e('0x1b')]=qs[_0x0a9e('0x1b')](_0x25fba9[_0x0a9e('0x2e')][_0x0a9e('0x1b')]);}_0x140511['order']=qs[_0x0a9e('0x37')](_0x25fba9[_0x0a9e('0x2e')][_0x0a9e('0x37')]);_0x140511[_0x0a9e('0x38')]=qs['filters'](_['pick'](_0x25fba9[_0x0a9e('0x2e')],_0x1538a4['filters']),_0x14de77);if(_0x25fba9[_0x0a9e('0x2e')][_0x0a9e('0x39')]){_0x140511[_0x0a9e('0x38')]=_[_0x0a9e('0x3a')](_0x140511['where'],{'$or':_[_0x0a9e('0x2d')](_0x14de77,function(_0x3bfce8){if(_0x3bfce8[_0x0a9e('0x3b')]!=='VIRTUAL'){var _0x1dbf74={};_0x1dbf74[_0x3bfce8[_0x0a9e('0x25')]]={'$like':'%'+_0x25fba9[_0x0a9e('0x2e')]['filter']+'%'};return _0x1dbf74;}})});}_0x140511=_['merge']({},_0x140511,_0x25fba9[_0x0a9e('0x3c')]);var _0x40d766={'where':_0x140511['where']};return db[_0x0a9e('0x28')][_0x0a9e('0x1c')](_0x40d766)[_0x0a9e('0x22')](function(_0x148f55){_0x11c3b6['count']=_0x148f55;if(_0x25fba9['query'][_0x0a9e('0x3d')]){_0x140511[_0x0a9e('0x3e')]=[{'all':!![]}];}return db['VoiceAgentReport'][_0x0a9e('0x3f')](_0x140511);})[_0x0a9e('0x22')](function(_0x1459bb){_0x11c3b6['rows']=_0x1459bb;return _0x11c3b6;})[_0x0a9e('0x22')](respondWithFilteredResult(_0x14433c,_0x140511))[_0x0a9e('0x40')](handleError(_0x14433c,null));};exports[_0x0a9e('0x41')]=function(_0x43dd5b,_0x13cb1f){var _0xeaa5e5={'raw':![],'where':{'id':_0x43dd5b[_0x0a9e('0x42')]['id']}},_0x2881b3={};_0x2881b3[_0x0a9e('0x2c')]=_[_0x0a9e('0x2f')](db[_0x0a9e('0x28')][_0x0a9e('0x29')]);_0x2881b3[_0x0a9e('0x2e')]=_[_0x0a9e('0x2f')](_0x43dd5b[_0x0a9e('0x2e')]);_0x2881b3['filters']=_['intersection'](_0x2881b3[_0x0a9e('0x2c')],_0x2881b3[_0x0a9e('0x2e')]);_0xeaa5e5[_0x0a9e('0x33')]=_[_0x0a9e('0x31')](_0x2881b3[_0x0a9e('0x2c')],qs[_0x0a9e('0x32')](_0x43dd5b[_0x0a9e('0x2e')][_0x0a9e('0x32')]));_0xeaa5e5[_0x0a9e('0x33')]=_0xeaa5e5[_0x0a9e('0x33')][_0x0a9e('0x34')]?_0xeaa5e5[_0x0a9e('0x33')]:_0x2881b3['model'];if(_0x43dd5b[_0x0a9e('0x2e')][_0x0a9e('0x3d')]){_0xeaa5e5[_0x0a9e('0x3e')]=[{'all':!![]}];}_0xeaa5e5=_[_0x0a9e('0x3a')]({},_0xeaa5e5,_0x43dd5b[_0x0a9e('0x3c')]);return db[_0x0a9e('0x28')][_0x0a9e('0x43')](_0xeaa5e5)[_0x0a9e('0x22')](handleEntityNotFound(_0x13cb1f,null))['then'](respondWithResult(_0x13cb1f,null))[_0x0a9e('0x40')](handleError(_0x13cb1f,null));};exports['create']=function(_0x473dc8,_0x476688){return db[_0x0a9e('0x28')]['create'](_0x473dc8[_0x0a9e('0x44')],{})[_0x0a9e('0x22')](respondWithResult(_0x476688,0xc9))[_0x0a9e('0x40')](handleError(_0x476688,null));};exports[_0x0a9e('0x21')]=function(_0x45c845,_0x37be73){if(_0x45c845[_0x0a9e('0x44')]['id']){delete _0x45c845['body']['id'];}return db[_0x0a9e('0x28')][_0x0a9e('0x43')]({'where':{'id':_0x45c845[_0x0a9e('0x42')]['id']}})[_0x0a9e('0x22')](handleEntityNotFound(_0x37be73,null))[_0x0a9e('0x22')](saveUpdates(_0x45c845[_0x0a9e('0x44')],null))[_0x0a9e('0x22')](respondWithResult(_0x37be73,null))[_0x0a9e('0x40')](handleError(_0x37be73,null));};exports[_0x0a9e('0x23')]=function(_0x58a5c2,_0xe401a){return db[_0x0a9e('0x28')]['find']({'where':{'id':_0x58a5c2['params']['id']}})['then'](handleEntityNotFound(_0xe401a,null))[_0x0a9e('0x22')](removeEntity(_0xe401a,null))[_0x0a9e('0x40')](handleError(_0xe401a,null));};exports[_0x0a9e('0x45')]=function(_0x11545a,_0x61bb17){return db[_0x0a9e('0x28')][_0x0a9e('0x45')]()[_0x0a9e('0x22')](respondWithResult(_0x61bb17,null))['catch'](handleError(_0x61bb17,null));}; \ No newline at end of file +var _0xa9e0=['type','options','includeAll','include','findAll','catch','show','params','find','body','describe','eml-format','rimraf','zip-dir','moment','mustache','util','path','sox','to-csv','fs-extra','lodash','squel','desk.js','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/license/util','../../mysqldb','sendStatus','end','status','json','undefined','limit','offset','count','set','Content-Range','apply','save','update','then','destroy','stack','name','send','index','VoiceAgentReport','rawAttributes','fieldName','key','model','map','query','keys','filters','intersection','fields','attributes','length','hasOwnProperty','nolimit','sort','where','filter','merge'];(function(_0x2642cb,_0x4b917f){var _0xe6e41=function(_0x281676){while(--_0x281676){_0x2642cb['push'](_0x2642cb['shift']());}};_0xe6e41(++_0x4b917f);}(_0xa9e0,0x123));var _0x0a9e=function(_0x3899d1,_0x4aa04c){_0x3899d1=_0x3899d1-0x0;var _0xeb4a7d=_0xa9e0[_0x3899d1];return _0xeb4a7d;};'use strict';var emlformat=require(_0x0a9e('0x0'));var rimraf=require(_0x0a9e('0x1'));var zipdir=require(_0x0a9e('0x2'));var jsonpatch=require('fast-json-patch');var rp=require('request-promise');var moment=require(_0x0a9e('0x3'));var BPromise=require('bluebird');var Mustache=require(_0x0a9e('0x4'));var util=require(_0x0a9e('0x5'));var path=require(_0x0a9e('0x6'));var sox=require(_0x0a9e('0x7'));var csv=require(_0x0a9e('0x8'));var ejs=require('ejs');var fs=require('fs');var fs_extra=require(_0x0a9e('0x9'));var _=require(_0x0a9e('0xa'));var squel=require(_0x0a9e('0xb'));var crypto=require('crypto');var jsforce=require('jsforce');var deskjs=require(_0x0a9e('0xc'));var toCsv=require('to-csv');var querystring=require('querystring');var Papa=require(_0x0a9e('0xd'));var Redis=require(_0x0a9e('0xe'));var authService=require(_0x0a9e('0xf'));var qs=require(_0x0a9e('0x10'));var as=require(_0x0a9e('0x11'));var hardwareService=require(_0x0a9e('0x12'));var logger=require('../../config/logger')('api');var utils=require('../../config/utils');var config=require('../../config/environment');var licenseUtil=require(_0x0a9e('0x13'));var db=require(_0x0a9e('0x14'))['db'];function respondWithStatusCode(_0xd5b662,_0x26d672){_0x26d672=_0x26d672||0xcc;return function(_0x32d742){if(_0x32d742){return _0xd5b662[_0x0a9e('0x15')](_0x26d672);}return _0xd5b662['status'](_0x26d672)[_0x0a9e('0x16')]();};}function respondWithResult(_0x239b12,_0x2b4227){_0x2b4227=_0x2b4227||0xc8;return function(_0x281129){if(_0x281129){return _0x239b12[_0x0a9e('0x17')](_0x2b4227)[_0x0a9e('0x18')](_0x281129);}};}function respondWithFilteredResult(_0x52a03d,_0x22dccb){return function(_0x5d0880){if(_0x5d0880){var _0x1985b6=typeof _0x22dccb['offset']===_0x0a9e('0x19')&&typeof _0x22dccb[_0x0a9e('0x1a')]==='undefined';var _0x225616=_0x5d0880['count'];var _0x459eb1=_0x1985b6?0x0:_0x22dccb[_0x0a9e('0x1b')];var _0x106033=_0x1985b6?_0x5d0880[_0x0a9e('0x1c')]:_0x22dccb[_0x0a9e('0x1b')]+_0x22dccb[_0x0a9e('0x1a')];var _0x530eb7;if(_0x106033>=_0x225616){_0x106033=_0x225616;_0x530eb7=0xc8;}else{_0x530eb7=0xce;}_0x52a03d[_0x0a9e('0x17')](_0x530eb7);return _0x52a03d[_0x0a9e('0x1d')](_0x0a9e('0x1e'),_0x459eb1+'-'+_0x106033+'/'+_0x225616)[_0x0a9e('0x18')](_0x5d0880);}return null;};}function patchUpdates(_0x105080){return function(_0x4bb1e3){try{jsonpatch[_0x0a9e('0x1f')](_0x4bb1e3,_0x105080,!![]);}catch(_0x155cce){return BPromise['reject'](_0x155cce);}return _0x4bb1e3[_0x0a9e('0x20')]();};}function saveUpdates(_0x5a09ef,_0x588269){return function(_0x3a02e1){if(_0x3a02e1){return _0x3a02e1[_0x0a9e('0x21')](_0x5a09ef)[_0x0a9e('0x22')](function(_0x30bae6){return _0x30bae6;});}return null;};}function removeEntity(_0x4abc77,_0xfb6e48){return function(_0x2fb0e4){if(_0x2fb0e4){return _0x2fb0e4[_0x0a9e('0x23')]()[_0x0a9e('0x22')](function(){_0x4abc77[_0x0a9e('0x17')](0xcc)[_0x0a9e('0x16')]();});}};}function handleEntityNotFound(_0x16b1ca,_0x5ea472){return function(_0x59181e){if(!_0x59181e){_0x16b1ca[_0x0a9e('0x15')](0x194);}return _0x59181e;};}function handleError(_0x3a8e58,_0x40c424){_0x40c424=_0x40c424||0x1f4;return function(_0x33161b){logger['error'](_0x33161b[_0x0a9e('0x24')]);if(_0x33161b['name']){delete _0x33161b[_0x0a9e('0x25')];}_0x3a8e58['status'](_0x40c424)[_0x0a9e('0x26')](_0x33161b);};}exports[_0x0a9e('0x27')]=function(_0x25fba9,_0x14433c){var _0x140511={},_0x1538a4={},_0x11c3b6={'count':0x0,'rows':[]};var _0x14de77=_['map'](db[_0x0a9e('0x28')][_0x0a9e('0x29')],function(_0x2b1f27){return{'name':_0x2b1f27[_0x0a9e('0x2a')],'type':_0x2b1f27['type'][_0x0a9e('0x2b')]};});_0x1538a4[_0x0a9e('0x2c')]=_[_0x0a9e('0x2d')](_0x14de77,_0x0a9e('0x25'));_0x1538a4[_0x0a9e('0x2e')]=_[_0x0a9e('0x2f')](_0x25fba9[_0x0a9e('0x2e')]);_0x1538a4[_0x0a9e('0x30')]=_[_0x0a9e('0x31')](_0x1538a4['model'],_0x1538a4[_0x0a9e('0x2e')]);_0x140511['attributes']=_[_0x0a9e('0x31')](_0x1538a4[_0x0a9e('0x2c')],qs[_0x0a9e('0x32')](_0x25fba9[_0x0a9e('0x2e')][_0x0a9e('0x32')]));_0x140511['attributes']=_0x140511[_0x0a9e('0x33')][_0x0a9e('0x34')]?_0x140511[_0x0a9e('0x33')]:_0x1538a4[_0x0a9e('0x2c')];if(!_0x25fba9[_0x0a9e('0x2e')][_0x0a9e('0x35')](_0x0a9e('0x36'))){_0x140511[_0x0a9e('0x1a')]=qs['limit'](_0x25fba9[_0x0a9e('0x2e')]['limit']);_0x140511[_0x0a9e('0x1b')]=qs[_0x0a9e('0x1b')](_0x25fba9[_0x0a9e('0x2e')][_0x0a9e('0x1b')]);}_0x140511['order']=qs[_0x0a9e('0x37')](_0x25fba9[_0x0a9e('0x2e')][_0x0a9e('0x37')]);_0x140511[_0x0a9e('0x38')]=qs['filters'](_['pick'](_0x25fba9[_0x0a9e('0x2e')],_0x1538a4['filters']),_0x14de77);if(_0x25fba9[_0x0a9e('0x2e')][_0x0a9e('0x39')]){_0x140511[_0x0a9e('0x38')]=_[_0x0a9e('0x3a')](_0x140511['where'],{'$or':_[_0x0a9e('0x2d')](_0x14de77,function(_0x3bfce8){if(_0x3bfce8[_0x0a9e('0x3b')]!=='VIRTUAL'){var _0x1dbf74={};_0x1dbf74[_0x3bfce8[_0x0a9e('0x25')]]={'$like':'%'+_0x25fba9[_0x0a9e('0x2e')]['filter']+'%'};return _0x1dbf74;}})});}_0x140511=_['merge']({},_0x140511,_0x25fba9[_0x0a9e('0x3c')]);var _0x40d766={'where':_0x140511['where']};return db[_0x0a9e('0x28')][_0x0a9e('0x1c')](_0x40d766)[_0x0a9e('0x22')](function(_0x148f55){_0x11c3b6['count']=_0x148f55;if(_0x25fba9['query'][_0x0a9e('0x3d')]){_0x140511[_0x0a9e('0x3e')]=[{'all':!![]}];}return db['VoiceAgentReport'][_0x0a9e('0x3f')](_0x140511);})[_0x0a9e('0x22')](function(_0x1459bb){_0x11c3b6['rows']=_0x1459bb;return _0x11c3b6;})[_0x0a9e('0x22')](respondWithFilteredResult(_0x14433c,_0x140511))[_0x0a9e('0x40')](handleError(_0x14433c,null));};exports[_0x0a9e('0x41')]=function(_0x43dd5b,_0x13cb1f){var _0xeaa5e5={'raw':![],'where':{'id':_0x43dd5b[_0x0a9e('0x42')]['id']}},_0x2881b3={};_0x2881b3[_0x0a9e('0x2c')]=_[_0x0a9e('0x2f')](db[_0x0a9e('0x28')][_0x0a9e('0x29')]);_0x2881b3[_0x0a9e('0x2e')]=_[_0x0a9e('0x2f')](_0x43dd5b[_0x0a9e('0x2e')]);_0x2881b3['filters']=_['intersection'](_0x2881b3[_0x0a9e('0x2c')],_0x2881b3[_0x0a9e('0x2e')]);_0xeaa5e5[_0x0a9e('0x33')]=_[_0x0a9e('0x31')](_0x2881b3[_0x0a9e('0x2c')],qs[_0x0a9e('0x32')](_0x43dd5b[_0x0a9e('0x2e')][_0x0a9e('0x32')]));_0xeaa5e5[_0x0a9e('0x33')]=_0xeaa5e5[_0x0a9e('0x33')][_0x0a9e('0x34')]?_0xeaa5e5[_0x0a9e('0x33')]:_0x2881b3['model'];if(_0x43dd5b[_0x0a9e('0x2e')][_0x0a9e('0x3d')]){_0xeaa5e5[_0x0a9e('0x3e')]=[{'all':!![]}];}_0xeaa5e5=_[_0x0a9e('0x3a')]({},_0xeaa5e5,_0x43dd5b[_0x0a9e('0x3c')]);return db[_0x0a9e('0x28')][_0x0a9e('0x43')](_0xeaa5e5)[_0x0a9e('0x22')](handleEntityNotFound(_0x13cb1f,null))['then'](respondWithResult(_0x13cb1f,null))[_0x0a9e('0x40')](handleError(_0x13cb1f,null));};exports['create']=function(_0x473dc8,_0x476688){return db[_0x0a9e('0x28')]['create'](_0x473dc8[_0x0a9e('0x44')],{})[_0x0a9e('0x22')](respondWithResult(_0x476688,0xc9))[_0x0a9e('0x40')](handleError(_0x476688,null));};exports[_0x0a9e('0x21')]=function(_0x45c845,_0x37be73){if(_0x45c845[_0x0a9e('0x44')]['id']){delete _0x45c845['body']['id'];}return db[_0x0a9e('0x28')][_0x0a9e('0x43')]({'where':{'id':_0x45c845[_0x0a9e('0x42')]['id']}})[_0x0a9e('0x22')](handleEntityNotFound(_0x37be73,null))[_0x0a9e('0x22')](saveUpdates(_0x45c845[_0x0a9e('0x44')],null))[_0x0a9e('0x22')](respondWithResult(_0x37be73,null))[_0x0a9e('0x40')](handleError(_0x37be73,null));};exports[_0x0a9e('0x23')]=function(_0x58a5c2,_0xe401a){return db[_0x0a9e('0x28')]['find']({'where':{'id':_0x58a5c2['params']['id']}})['then'](handleEntityNotFound(_0xe401a,null))[_0x0a9e('0x22')](removeEntity(_0xe401a,null))[_0x0a9e('0x40')](handleError(_0xe401a,null));};exports[_0x0a9e('0x45')]=function(_0x11545a,_0x61bb17){return db[_0x0a9e('0x28')][_0x0a9e('0x45')]()[_0x0a9e('0x22')](respondWithResult(_0x61bb17,null))['catch'](handleError(_0x61bb17,null));}; \ No newline at end of file diff --git a/server/api/voiceAgentReport/voiceAgentReport.model.js b/server/api/voiceAgentReport/voiceAgentReport.model.js index 6189369..aaf88c9 100644 --- a/server/api/voiceAgentReport/voiceAgentReport.model.js +++ b/server/api/voiceAgentReport/voiceAgentReport.model.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x7250=['destuniqueid','lodash','util','api','moment','bluebird','request-promise','path','rimraf','./voiceAgentReport.attributes','VoiceAgentReport','report_agent'];(function(_0x2be8c2,_0x14a4b5){var _0x97f531=function(_0xcee58d){while(--_0xcee58d){_0x2be8c2['push'](_0x2be8c2['shift']());}};_0x97f531(++_0x14a4b5);}(_0x7250,0x1b1));var _0x0725=function(_0x37cab7,_0x2be093){_0x37cab7=_0x37cab7-0x0;var _0x51f80a=_0x7250[_0x37cab7];return _0x51f80a;};'use strict';var _=require(_0x0725('0x0'));var util=require(_0x0725('0x1'));var logger=require('../../config/logger')(_0x0725('0x2'));var moment=require(_0x0725('0x3'));var BPromise=require(_0x0725('0x4'));var rp=require(_0x0725('0x5'));var fs=require('fs');var path=require(_0x0725('0x6'));var rimraf=require(_0x0725('0x7'));var config=require('../../config/environment');var attributes=require(_0x0725('0x8'));module['exports']=function(_0x4e8c6c,_0xa32c3f){return _0x4e8c6c['define'](_0x0725('0x9'),attributes,{'tableName':_0x0725('0xa'),'paranoid':![],'indexes':[{'fields':['uniqueid',_0x0725('0xb')]}],'timestamps':!![]});}; \ No newline at end of file +var _0x1a8f=['request-promise','exports','VoiceAgentReport','uniqueid','destuniqueid','lodash','../../config/logger','api','moment','bluebird'];(function(_0x2c5b42,_0x1b0576){var _0x5f18d5=function(_0xa6dab6){while(--_0xa6dab6){_0x2c5b42['push'](_0x2c5b42['shift']());}};_0x5f18d5(++_0x1b0576);}(_0x1a8f,0x87));var _0xf1a8=function(_0x361078,_0x283dcb){_0x361078=_0x361078-0x0;var _0x22d9e8=_0x1a8f[_0x361078];return _0x22d9e8;};'use strict';var _=require(_0xf1a8('0x0'));var util=require('util');var logger=require(_0xf1a8('0x1'))(_0xf1a8('0x2'));var moment=require(_0xf1a8('0x3'));var BPromise=require(_0xf1a8('0x4'));var rp=require(_0xf1a8('0x5'));var fs=require('fs');var path=require('path');var rimraf=require('rimraf');var config=require('../../config/environment');var attributes=require('./voiceAgentReport.attributes');module[_0xf1a8('0x6')]=function(_0x515ff3,_0x29dc33){return _0x515ff3['define'](_0xf1a8('0x7'),attributes,{'tableName':'report_agent','paranoid':![],'indexes':[{'fields':[_0xf1a8('0x8'),_0xf1a8('0x9')]}],'timestamps':!![]});}; \ No newline at end of file diff --git a/server/api/voiceAgentReport/voiceAgentReport.rpc.js b/server/api/voiceAgentReport/voiceAgentReport.rpc.js index a25adf4..270b8df 100644 --- a/server/api/voiceAgentReport/voiceAgentReport.rpc.js +++ b/server/api/voiceAgentReport/voiceAgentReport.rpc.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xe5b0=['rpc','../../config/environment','jayson/promise','client','http','request','info','VoiceAgentReport,\x20%s,\x20%s','request\x20sent','debug','VoiceAgentReport,\x20%s,\x20%s,\x20%s','stringify','error','code','message','CreateVoiceAgentReport','create','body','options','raw','then','catch','VoiceAgentReport','update','limit','UpdateVoiceAgentReport','lodash','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger'];(function(_0x4d4a06,_0x30289a){var _0x1dbcd8=function(_0x30ed6e){while(--_0x30ed6e){_0x4d4a06['push'](_0x4d4a06['shift']());}};_0x1dbcd8(++_0x30289a);}(_0xe5b0,0xa6));var _0x0e5b=function(_0x3ff1ae,_0x4985bc){_0x3ff1ae=_0x3ff1ae-0x0;var _0x590ddb=_0xe5b0[_0x3ff1ae];return _0x590ddb;};'use strict';var _=require(_0x0e5b('0x0'));var util=require(_0x0e5b('0x1'));var moment=require(_0x0e5b('0x2'));var BPromise=require(_0x0e5b('0x3'));var rs=require(_0x0e5b('0x4'));var fs=require('fs');var Redis=require(_0x0e5b('0x5'));var db=require(_0x0e5b('0x6'))['db'];var utils=require(_0x0e5b('0x7'));var logger=require(_0x0e5b('0x8'))(_0x0e5b('0x9'));var config=require(_0x0e5b('0xa'));var jayson=require(_0x0e5b('0xb'));var client=jayson[_0x0e5b('0xc')][_0x0e5b('0xd')]({'port':0x232a});function respondWithRpcPromise(_0x1fb6e4,_0x1e1069,_0x3f36cc){return new BPromise(function(_0x196b9d,_0xa1f11a){return client[_0x0e5b('0xe')](_0x1fb6e4,_0x3f36cc)['then'](function(_0x335154){logger[_0x0e5b('0xf')](_0x0e5b('0x10'),_0x1e1069,_0x0e5b('0x11'));logger[_0x0e5b('0x12')](_0x0e5b('0x13'),_0x1e1069,_0x0e5b('0x11'),JSON[_0x0e5b('0x14')](_0x335154));if(_0x335154['error']){if(_0x335154[_0x0e5b('0x15')][_0x0e5b('0x16')]===0x1f4){logger[_0x0e5b('0x15')](_0x0e5b('0x10'),_0x1e1069,_0x335154[_0x0e5b('0x15')]['message']);return _0xa1f11a(_0x335154[_0x0e5b('0x15')][_0x0e5b('0x17')]);}logger[_0x0e5b('0x15')]('VoiceAgentReport,\x20%s,\x20%s',_0x1e1069,_0x335154[_0x0e5b('0x15')][_0x0e5b('0x17')]);return _0x196b9d(_0x335154[_0x0e5b('0x15')]['message']);}else{logger[_0x0e5b('0xf')](_0x0e5b('0x10'),_0x1e1069,_0x0e5b('0x11'));_0x196b9d(_0x335154['result']['message']);}})['catch'](function(_0x1cdc6a){logger[_0x0e5b('0x15')](_0x0e5b('0x10'),_0x1e1069,_0x1cdc6a);_0xa1f11a(_0x1cdc6a);});});}exports[_0x0e5b('0x18')]=function(_0x20142d){var _0x5c7d03=this;return new Promise(function(_0x7e2a96,_0x5b9f4c){return db['VoiceAgentReport'][_0x0e5b('0x19')](_0x20142d[_0x0e5b('0x1a')],{'raw':_0x20142d['options']?_0x20142d[_0x0e5b('0x1b')][_0x0e5b('0x1c')]===undefined?!![]:![]:!![]})[_0x0e5b('0x1d')](function(_0x3f02c1){logger['info']('CreateVoiceAgentReport',_0x20142d);logger['debug'](_0x0e5b('0x18'),_0x20142d,JSON['stringify'](_0x3f02c1));_0x7e2a96(_0x3f02c1);})[_0x0e5b('0x1e')](function(_0x277e5d){logger[_0x0e5b('0x15')](_0x0e5b('0x18'),_0x277e5d[_0x0e5b('0x17')],_0x20142d);_0x5b9f4c(_0x5c7d03[_0x0e5b('0x15')](0x1f4,_0x277e5d[_0x0e5b('0x17')]));});});};exports['UpdateVoiceAgentReport']=function(_0x15a8e1){var _0x181ac9=this;return new Promise(function(_0x3a4192,_0x5b86d4){return db[_0x0e5b('0x1f')][_0x0e5b('0x20')](_0x15a8e1[_0x0e5b('0x1a')],{'raw':_0x15a8e1[_0x0e5b('0x1b')]?_0x15a8e1[_0x0e5b('0x1b')][_0x0e5b('0x1c')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x15a8e1['options']?_0x15a8e1[_0x0e5b('0x1b')]['where']||null:null,'attributes':_0x15a8e1[_0x0e5b('0x1b')]?_0x15a8e1[_0x0e5b('0x1b')]['attributes']||null:null,'limit':_0x15a8e1[_0x0e5b('0x1b')]?_0x15a8e1[_0x0e5b('0x1b')][_0x0e5b('0x21')]||null:null})[_0x0e5b('0x1d')](function(_0x460d49){logger[_0x0e5b('0xf')](_0x0e5b('0x22'),_0x15a8e1);logger[_0x0e5b('0x12')](_0x0e5b('0x22'),_0x15a8e1,JSON['stringify'](_0x460d49));_0x3a4192(_0x460d49);})[_0x0e5b('0x1e')](function(_0x598269){logger[_0x0e5b('0x15')](_0x0e5b('0x22'),_0x598269[_0x0e5b('0x17')],_0x15a8e1);_0x5b86d4(_0x181ac9['error'](0x1f4,_0x598269[_0x0e5b('0x17')]));});});}; \ No newline at end of file +var _0x8f65=['stringify','error','code','VoiceAgentReport,\x20%s,\x20%s','message','CreateVoiceAgentReport','VoiceAgentReport','create','body','options','raw','catch','UpdateVoiceAgentReport','update','attributes','limit','lodash','util','moment','bluebird','../../mysqldb','../../config/utils','../../config/logger','rpc','jayson/promise','client','http','request','then','info','debug','VoiceAgentReport,\x20%s,\x20%s,\x20%s','request\x20sent'];(function(_0x12d534,_0x5d3562){var _0x5ca4b0=function(_0x3f7204){while(--_0x3f7204){_0x12d534['push'](_0x12d534['shift']());}};_0x5ca4b0(++_0x5d3562);}(_0x8f65,0xb5));var _0x58f6=function(_0xe11a0c,_0x493568){_0xe11a0c=_0xe11a0c-0x0;var _0x1be886=_0x8f65[_0xe11a0c];return _0x1be886;};'use strict';var _=require(_0x58f6('0x0'));var util=require(_0x58f6('0x1'));var moment=require(_0x58f6('0x2'));var BPromise=require(_0x58f6('0x3'));var rs=require('randomstring');var fs=require('fs');var Redis=require('ioredis');var db=require(_0x58f6('0x4'))['db'];var utils=require(_0x58f6('0x5'));var logger=require(_0x58f6('0x6'))(_0x58f6('0x7'));var config=require('../../config/environment');var jayson=require(_0x58f6('0x8'));var client=jayson[_0x58f6('0x9')][_0x58f6('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x4512e9,_0x3ea317,_0x26fbec){return new BPromise(function(_0x27fcc9,_0x1ad3e8){return client[_0x58f6('0xb')](_0x4512e9,_0x26fbec)[_0x58f6('0xc')](function(_0x25d465){logger[_0x58f6('0xd')]('VoiceAgentReport,\x20%s,\x20%s',_0x3ea317,'request\x20sent');logger[_0x58f6('0xe')](_0x58f6('0xf'),_0x3ea317,_0x58f6('0x10'),JSON[_0x58f6('0x11')](_0x25d465));if(_0x25d465[_0x58f6('0x12')]){if(_0x25d465[_0x58f6('0x12')][_0x58f6('0x13')]===0x1f4){logger['error'](_0x58f6('0x14'),_0x3ea317,_0x25d465[_0x58f6('0x12')]['message']);return _0x1ad3e8(_0x25d465[_0x58f6('0x12')]['message']);}logger[_0x58f6('0x12')](_0x58f6('0x14'),_0x3ea317,_0x25d465[_0x58f6('0x12')][_0x58f6('0x15')]);return _0x27fcc9(_0x25d465['error'][_0x58f6('0x15')]);}else{logger[_0x58f6('0xd')](_0x58f6('0x14'),_0x3ea317,_0x58f6('0x10'));_0x27fcc9(_0x25d465['result']['message']);}})['catch'](function(_0x41a534){logger[_0x58f6('0x12')]('VoiceAgentReport,\x20%s,\x20%s',_0x3ea317,_0x41a534);_0x1ad3e8(_0x41a534);});});}exports[_0x58f6('0x16')]=function(_0x179004){var _0x353e4e=this;return new Promise(function(_0x2f395c,_0x29b924){return db[_0x58f6('0x17')][_0x58f6('0x18')](_0x179004[_0x58f6('0x19')],{'raw':_0x179004[_0x58f6('0x1a')]?_0x179004[_0x58f6('0x1a')][_0x58f6('0x1b')]===undefined?!![]:![]:!![]})[_0x58f6('0xc')](function(_0x43a4af){logger['info'](_0x58f6('0x16'),_0x179004);logger[_0x58f6('0xe')](_0x58f6('0x16'),_0x179004,JSON[_0x58f6('0x11')](_0x43a4af));_0x2f395c(_0x43a4af);})[_0x58f6('0x1c')](function(_0x62660){logger[_0x58f6('0x12')](_0x58f6('0x16'),_0x62660[_0x58f6('0x15')],_0x179004);_0x29b924(_0x353e4e['error'](0x1f4,_0x62660['message']));});});};exports[_0x58f6('0x1d')]=function(_0x470967){var _0x597a36=this;return new Promise(function(_0x53ec54,_0x14e885){return db['VoiceAgentReport'][_0x58f6('0x1e')](_0x470967[_0x58f6('0x19')],{'raw':_0x470967[_0x58f6('0x1a')]?_0x470967['options'][_0x58f6('0x1b')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x470967[_0x58f6('0x1a')]?_0x470967[_0x58f6('0x1a')]['where']||null:null,'attributes':_0x470967[_0x58f6('0x1a')]?_0x470967[_0x58f6('0x1a')][_0x58f6('0x1f')]||null:null,'limit':_0x470967[_0x58f6('0x1a')]?_0x470967[_0x58f6('0x1a')][_0x58f6('0x20')]||null:null})[_0x58f6('0xc')](function(_0x58cf1c){logger[_0x58f6('0xd')](_0x58f6('0x1d'),_0x470967);logger['debug'](_0x58f6('0x1d'),_0x470967,JSON['stringify'](_0x58cf1c));_0x53ec54(_0x58cf1c);})[_0x58f6('0x1c')](function(_0x5b39df){logger[_0x58f6('0x12')]('UpdateVoiceAgentReport',_0x5b39df[_0x58f6('0x15')],_0x470967);_0x14e885(_0x597a36[_0x58f6('0x12')](0x1f4,_0x5b39df[_0x58f6('0x15')]));});});}; \ No newline at end of file diff --git a/server/api/voiceCallReport/index.js b/server/api/voiceCallReport/index.js index 66212b5..d672e2f 100644 --- a/server/api/voiceCallReport/index.js +++ b/server/api/voiceCallReport/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x7bae=['isAuthenticated','index','/describe','describe','/:id','post','create','put','update','delete','destroy','path','connect-timeout','Router','../../components/auth/service','../../components/interaction/service','../../config/environment','./voiceCallReport.controller','get'];(function(_0x5dda34,_0x4547c3){var _0x40ba81=function(_0x56820a){while(--_0x56820a){_0x5dda34['push'](_0x5dda34['shift']());}};_0x40ba81(++_0x4547c3);}(_0x7bae,0x13b));var _0xe7ba=function(_0x273c39,_0x1052e6){_0x273c39=_0x273c39-0x0;var _0x46d6b5=_0x7bae[_0x273c39];return _0x46d6b5;};'use strict';var multer=require('multer');var util=require('util');var path=require(_0xe7ba('0x0'));var timeout=require(_0xe7ba('0x1'));var express=require('express');var router=express[_0xe7ba('0x2')]();var fs_extra=require('fs-extra');var auth=require(_0xe7ba('0x3'));var interaction=require(_0xe7ba('0x4'));var config=require(_0xe7ba('0x5'));var controller=require(_0xe7ba('0x6'));router[_0xe7ba('0x7')]('/',auth[_0xe7ba('0x8')](),controller[_0xe7ba('0x9')]);router[_0xe7ba('0x7')](_0xe7ba('0xa'),auth[_0xe7ba('0x8')](),controller[_0xe7ba('0xb')]);router[_0xe7ba('0x7')](_0xe7ba('0xc'),auth[_0xe7ba('0x8')](),controller['show']);router[_0xe7ba('0xd')]('/',auth[_0xe7ba('0x8')](),controller[_0xe7ba('0xe')]);router[_0xe7ba('0xf')](_0xe7ba('0xc'),auth[_0xe7ba('0x8')](),controller[_0xe7ba('0x10')]);router[_0xe7ba('0x11')](_0xe7ba('0xc'),auth['isAuthenticated'](),controller[_0xe7ba('0x12')]);module['exports']=router; \ No newline at end of file +var _0xf2ca=['destroy','exports','multer','util','path','express','Router','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','get','isAuthenticated','index','describe','/:id','show','create','put','delete'];(function(_0x24f31b,_0x44b8f3){var _0x488401=function(_0x204caf){while(--_0x204caf){_0x24f31b['push'](_0x24f31b['shift']());}};_0x488401(++_0x44b8f3);}(_0xf2ca,0x16a));var _0xaf2c=function(_0x21e034,_0x59fc14){_0x21e034=_0x21e034-0x0;var _0x1faab3=_0xf2ca[_0x21e034];return _0x1faab3;};'use strict';var multer=require(_0xaf2c('0x0'));var util=require(_0xaf2c('0x1'));var path=require(_0xaf2c('0x2'));var timeout=require('connect-timeout');var express=require(_0xaf2c('0x3'));var router=express[_0xaf2c('0x4')]();var fs_extra=require(_0xaf2c('0x5'));var auth=require(_0xaf2c('0x6'));var interaction=require(_0xaf2c('0x7'));var config=require(_0xaf2c('0x8'));var controller=require('./voiceCallReport.controller');router[_0xaf2c('0x9')]('/',auth[_0xaf2c('0xa')](),controller[_0xaf2c('0xb')]);router[_0xaf2c('0x9')]('/describe',auth[_0xaf2c('0xa')](),controller[_0xaf2c('0xc')]);router['get'](_0xaf2c('0xd'),auth['isAuthenticated'](),controller[_0xaf2c('0xe')]);router['post']('/',auth[_0xaf2c('0xa')](),controller[_0xaf2c('0xf')]);router[_0xaf2c('0x10')](_0xaf2c('0xd'),auth['isAuthenticated'](),controller['update']);router[_0xaf2c('0x11')](_0xaf2c('0xd'),auth[_0xaf2c('0xa')](),controller[_0xaf2c('0x12')]);module[_0xaf2c('0x13')]=router; \ No newline at end of file diff --git a/server/api/voiceCallReport/voiceCallReport.attributes.js b/server/api/voiceCallReport/voiceCallReport.attributes.js index e0b6ac3..fa31349 100644 --- a/server/api/voiceCallReport/voiceCallReport.attributes.js +++ b/server/api/voiceCallReport/voiceCallReport.attributes.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x6478=['internal','inbound-fax','outbound-fax','dialer','TEXT','DATE','INTEGER','sequelize','exports','STRING','ENUM','inbound'];(function(_0x1d614c,_0x220d6e){var _0x1bc957=function(_0x3b8c22){while(--_0x3b8c22){_0x1d614c['push'](_0x1d614c['shift']());}};_0x1bc957(++_0x220d6e);}(_0x6478,0x1e7));var _0x8647=function(_0x96cefd,_0x25cb5d){_0x96cefd=_0x96cefd-0x0;var _0x4310c1=_0x6478[_0x96cefd];return _0x4310c1;};'use strict';var Sequelize=require(_0x8647('0x0'));module[_0x8647('0x1')]={'uniqueid':{'type':Sequelize[_0x8647('0x2')]},'type':{'type':Sequelize[_0x8647('0x3')](_0x8647('0x4'),_0x8647('0x5'),'outbound',_0x8647('0x6'),_0x8647('0x7'),_0x8647('0x8'))},'tag':{'type':Sequelize[_0x8647('0x2')]},'accountcode':{'type':Sequelize['STRING']},'source':{'type':Sequelize['STRING']},'destination':{'type':Sequelize[_0x8647('0x2')]},'destinationcontext':{'type':Sequelize[_0x8647('0x2')]},'callerid':{'type':Sequelize[_0x8647('0x2')]},'channel':{'type':Sequelize[_0x8647('0x2')]},'destinationchannel':{'type':Sequelize[_0x8647('0x2')]},'lastapplication':{'type':Sequelize[_0x8647('0x2')]},'lastdata':{'type':Sequelize[_0x8647('0x9')]},'starttime':{'type':Sequelize[_0x8647('0xa')]},'systemanswertime':{'type':Sequelize[_0x8647('0xa')]},'answertime':{'type':Sequelize[_0x8647('0xa')]},'endtime':{'type':Sequelize[_0x8647('0xa')]},'duration':{'type':Sequelize[_0x8647('0xb')]},'billableseconds':{'type':Sequelize[_0x8647('0xb')]},'mohtime':{'type':Sequelize[_0x8647('0xb')],'defaultValue':0x0},'disposition':{'type':Sequelize[_0x8647('0x2')]},'amaflags':{'type':Sequelize[_0x8647('0x2')]},'userfield':{'type':Sequelize[_0x8647('0x2')]},'userDisposition':{'type':Sequelize[_0x8647('0x2')]},'userSecondDisposition':{'type':Sequelize[_0x8647('0x2')]},'userThirdDisposition':{'type':Sequelize['STRING']},'note':{'type':Sequelize[_0x8647('0x2')]},'prefix':{'type':Sequelize['STRING']},'routeid':{'type':Sequelize[_0x8647('0xb')]},'sipcallid':{'type':Sequelize[_0x8647('0x2')]}}; \ No newline at end of file +var _0x7fdd=['STRING','ENUM','outbound','dialer','TEXT','DATE','INTEGER','exports'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0x7fdd,0x18f));var _0xd7fd=function(_0x14add3,_0x13ce8d){_0x14add3=_0x14add3-0x0;var _0x4a174f=_0x7fdd[_0x14add3];return _0x4a174f;};'use strict';var Sequelize=require('sequelize');module[_0xd7fd('0x0')]={'uniqueid':{'type':Sequelize[_0xd7fd('0x1')]},'type':{'type':Sequelize[_0xd7fd('0x2')]('inbound','internal',_0xd7fd('0x3'),'inbound-fax','outbound-fax',_0xd7fd('0x4'))},'tag':{'type':Sequelize[_0xd7fd('0x1')]},'accountcode':{'type':Sequelize[_0xd7fd('0x1')]},'source':{'type':Sequelize[_0xd7fd('0x1')]},'destination':{'type':Sequelize[_0xd7fd('0x1')]},'destinationcontext':{'type':Sequelize[_0xd7fd('0x1')]},'callerid':{'type':Sequelize[_0xd7fd('0x1')]},'channel':{'type':Sequelize[_0xd7fd('0x1')]},'destinationchannel':{'type':Sequelize[_0xd7fd('0x1')]},'lastapplication':{'type':Sequelize[_0xd7fd('0x1')]},'lastdata':{'type':Sequelize[_0xd7fd('0x5')]},'starttime':{'type':Sequelize[_0xd7fd('0x6')]},'systemanswertime':{'type':Sequelize['DATE']},'answertime':{'type':Sequelize[_0xd7fd('0x6')]},'endtime':{'type':Sequelize[_0xd7fd('0x6')]},'duration':{'type':Sequelize[_0xd7fd('0x7')]},'billableseconds':{'type':Sequelize[_0xd7fd('0x7')]},'mohtime':{'type':Sequelize['INTEGER'],'defaultValue':0x0},'disposition':{'type':Sequelize[_0xd7fd('0x1')]},'amaflags':{'type':Sequelize[_0xd7fd('0x1')]},'userfield':{'type':Sequelize[_0xd7fd('0x1')]},'userDisposition':{'type':Sequelize[_0xd7fd('0x1')]},'userSecondDisposition':{'type':Sequelize['STRING']},'userThirdDisposition':{'type':Sequelize[_0xd7fd('0x1')]},'note':{'type':Sequelize[_0xd7fd('0x1')]},'prefix':{'type':Sequelize['STRING']},'routeid':{'type':Sequelize['INTEGER']},'sipcallid':{'type':Sequelize[_0xd7fd('0x1')]}}; \ No newline at end of file diff --git a/server/api/voiceCallReport/voiceCallReport.controller.js b/server/api/voiceCallReport/voiceCallReport.controller.js index b6be3b5..34087d3 100644 --- a/server/api/voiceCallReport/voiceCallReport.controller.js +++ b/server/api/voiceCallReport/voiceCallReport.controller.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x2032=['../../config/logger','../../config/utils','../../config/license/util','../../mysqldb','end','status','json','offset','undefined','limit','count','set','Content-Range','apply','save','then','destroy','sendStatus','error','stack','name','send','index','map','VoiceCallReport','fieldName','type','key','query','model','attributes','intersection','fields','length','hasOwnProperty','nolimit','sort','pick','filters','filter','merge','where','options','alias','User','rows','catch','show','params','keys','rawAttributes','includeAll','include','create','body','find','describe','uniqueid','user','rimraf','zip-dir','fast-json-patch','moment','bluebird','util','path','sox','to-csv','ejs','fs-extra','lodash','squel','crypto','jsforce','desk.js','papaparse','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0x2032,0xd9));var _0x2203=function(_0xfb6a20,_0x25ca0e){_0xfb6a20=_0xfb6a20-0x0;var _0xfc985a=_0x2032[_0xfb6a20];return _0xfc985a;};'use strict';var emlformat=require('eml-format');var rimraf=require(_0x2203('0x0'));var zipdir=require(_0x2203('0x1'));var jsonpatch=require(_0x2203('0x2'));var rp=require('request-promise');var moment=require(_0x2203('0x3'));var BPromise=require(_0x2203('0x4'));var Mustache=require('mustache');var util=require(_0x2203('0x5'));var path=require(_0x2203('0x6'));var sox=require(_0x2203('0x7'));var csv=require(_0x2203('0x8'));var ejs=require(_0x2203('0x9'));var fs=require('fs');var fs_extra=require(_0x2203('0xa'));var _=require(_0x2203('0xb'));var squel=require(_0x2203('0xc'));var crypto=require(_0x2203('0xd'));var jsforce=require(_0x2203('0xe'));var deskjs=require(_0x2203('0xf'));var toCsv=require('to-csv');var querystring=require('querystring');var Papa=require(_0x2203('0x10'));var Redis=require('ioredis');var authService=require(_0x2203('0x11'));var qs=require(_0x2203('0x12'));var as=require(_0x2203('0x13'));var hardwareService=require('../../config/license/hardware');var logger=require(_0x2203('0x14'))('api');var utils=require(_0x2203('0x15'));var config=require('../../config/environment');var licenseUtil=require(_0x2203('0x16'));var db=require(_0x2203('0x17'))['db'];function respondWithStatusCode(_0x4b9376,_0x583bc7){_0x583bc7=_0x583bc7||0xcc;return function(_0x585c76){if(_0x585c76){return _0x4b9376['sendStatus'](_0x583bc7);}return _0x4b9376['status'](_0x583bc7)[_0x2203('0x18')]();};}function respondWithResult(_0x538b30,_0x592e47){_0x592e47=_0x592e47||0xc8;return function(_0x21a3af){if(_0x21a3af){return _0x538b30[_0x2203('0x19')](_0x592e47)[_0x2203('0x1a')](_0x21a3af);}};}function respondWithFilteredResult(_0x41af85,_0x226209){return function(_0x3fe0a8){if(_0x3fe0a8){var _0x2c36e6=typeof _0x226209[_0x2203('0x1b')]===_0x2203('0x1c')&&typeof _0x226209[_0x2203('0x1d')]==='undefined';var _0x280eda=_0x3fe0a8[_0x2203('0x1e')];var _0x4893ff=_0x2c36e6?0x0:_0x226209[_0x2203('0x1b')];var _0x8906e1=_0x2c36e6?_0x3fe0a8['count']:_0x226209[_0x2203('0x1b')]+_0x226209['limit'];var _0x2904ba;if(_0x8906e1>=_0x280eda){_0x8906e1=_0x280eda;_0x2904ba=0xc8;}else{_0x2904ba=0xce;}_0x41af85[_0x2203('0x19')](_0x2904ba);return _0x41af85[_0x2203('0x1f')](_0x2203('0x20'),_0x4893ff+'-'+_0x8906e1+'/'+_0x280eda)[_0x2203('0x1a')](_0x3fe0a8);}return null;};}function patchUpdates(_0x449039){return function(_0x538c23){try{jsonpatch[_0x2203('0x21')](_0x538c23,_0x449039,!![]);}catch(_0x50822b){return BPromise['reject'](_0x50822b);}return _0x538c23[_0x2203('0x22')]();};}function saveUpdates(_0x496d82,_0x3b8ef9){return function(_0x5bfe61){if(_0x5bfe61){return _0x5bfe61['update'](_0x496d82)[_0x2203('0x23')](function(_0x5e29cd){return _0x5e29cd;});}return null;};}function removeEntity(_0x5c8da9,_0x226374){return function(_0x2718f5){if(_0x2718f5){return _0x2718f5[_0x2203('0x24')]()[_0x2203('0x23')](function(){_0x5c8da9[_0x2203('0x19')](0xcc)[_0x2203('0x18')]();});}};}function handleEntityNotFound(_0x49c12,_0x250349){return function(_0x576378){if(!_0x576378){_0x49c12[_0x2203('0x25')](0x194);}return _0x576378;};}function handleError(_0x36b958,_0x39a11a){_0x39a11a=_0x39a11a||0x1f4;return function(_0x5f11bf){logger[_0x2203('0x26')](_0x5f11bf[_0x2203('0x27')]);if(_0x5f11bf['name']){delete _0x5f11bf[_0x2203('0x28')];}_0x36b958[_0x2203('0x19')](_0x39a11a)[_0x2203('0x29')](_0x5f11bf);};}exports[_0x2203('0x2a')]=function(_0x28ae02,_0x1df508){var _0x9c53f={},_0x5a95c1={},_0x34b8ba={'count':0x0,'rows':[]};var _0x616ed8=_[_0x2203('0x2b')](db[_0x2203('0x2c')]['rawAttributes'],function(_0x3a8e23){return{'name':_0x3a8e23[_0x2203('0x2d')],'type':_0x3a8e23[_0x2203('0x2e')][_0x2203('0x2f')]};});_0x5a95c1['model']=_[_0x2203('0x2b')](_0x616ed8,_0x2203('0x28'));_0x5a95c1['query']=_['keys'](_0x28ae02[_0x2203('0x30')]);_0x5a95c1['filters']=_['intersection'](_0x5a95c1[_0x2203('0x31')],_0x5a95c1[_0x2203('0x30')]);_0x9c53f[_0x2203('0x32')]=_[_0x2203('0x33')](_0x5a95c1[_0x2203('0x31')],qs['fields'](_0x28ae02[_0x2203('0x30')][_0x2203('0x34')]));_0x9c53f['attributes']=_0x9c53f[_0x2203('0x32')][_0x2203('0x35')]?_0x9c53f[_0x2203('0x32')]:_0x5a95c1[_0x2203('0x31')];if(!_0x28ae02[_0x2203('0x30')][_0x2203('0x36')](_0x2203('0x37'))){_0x9c53f[_0x2203('0x1d')]=qs[_0x2203('0x1d')](_0x28ae02['query'][_0x2203('0x1d')]);_0x9c53f[_0x2203('0x1b')]=qs['offset'](_0x28ae02['query'][_0x2203('0x1b')]);}_0x9c53f['order']=qs[_0x2203('0x38')](_0x28ae02[_0x2203('0x30')][_0x2203('0x38')]);_0x9c53f['where']=qs['filters'](_[_0x2203('0x39')](_0x28ae02['query'],_0x5a95c1[_0x2203('0x3a')]),_0x616ed8);if(_0x28ae02['query'][_0x2203('0x3b')]){_0x9c53f['where']=_[_0x2203('0x3c')](_0x9c53f[_0x2203('0x3d')],{'$or':_[_0x2203('0x2b')](_0x616ed8,function(_0x40a793){if(_0x40a793[_0x2203('0x2e')]!=='VIRTUAL'){var _0x5f1561={};_0x5f1561[_0x40a793['name']]={'$like':'%'+_0x28ae02[_0x2203('0x30')][_0x2203('0x3b')]+'%'};return _0x5f1561;}})});}_0x9c53f=_[_0x2203('0x3c')]({},_0x9c53f,_0x28ae02[_0x2203('0x3e')]);var _0x3283fb={'where':_0x9c53f[_0x2203('0x3d')]};return db[_0x2203('0x2c')]['count'](_0x3283fb)[_0x2203('0x23')](function(_0x1b12c3){_0x34b8ba[_0x2203('0x1e')]=_0x1b12c3;if(_0x28ae02[_0x2203('0x30')]['includeAll']){_0x9c53f['include']=[{'attributes':['id',_0x2203('0x28'),'fullname',_0x2203('0x3f')],'model':db[_0x2203('0x40')],'as':_0x2203('0x40')}];}return db['VoiceCallReport']['findAll'](_0x9c53f);})[_0x2203('0x23')](function(_0x3739f6){_0x34b8ba[_0x2203('0x41')]=_0x3739f6;return _0x34b8ba;})[_0x2203('0x23')](respondWithFilteredResult(_0x1df508,_0x9c53f))[_0x2203('0x42')](handleError(_0x1df508,null));};exports[_0x2203('0x43')]=function(_0x5cd573,_0x15d3b6){var _0x165a3f={'raw':!![],'where':{'id':_0x5cd573[_0x2203('0x44')]['id']}},_0x3a866c={};_0x3a866c[_0x2203('0x31')]=_[_0x2203('0x45')](db[_0x2203('0x2c')][_0x2203('0x46')]);_0x3a866c[_0x2203('0x30')]=_[_0x2203('0x45')](_0x5cd573['query']);_0x3a866c[_0x2203('0x3a')]=_[_0x2203('0x33')](_0x3a866c[_0x2203('0x31')],_0x3a866c[_0x2203('0x30')]);_0x165a3f['attributes']=_['intersection'](_0x3a866c[_0x2203('0x31')],qs['fields'](_0x5cd573[_0x2203('0x30')][_0x2203('0x34')]));_0x165a3f[_0x2203('0x32')]=_0x165a3f[_0x2203('0x32')]['length']?_0x165a3f[_0x2203('0x32')]:_0x3a866c[_0x2203('0x31')];if(_0x5cd573['query'][_0x2203('0x47')]){_0x165a3f[_0x2203('0x48')]=[{'all':!![]}];}_0x165a3f=_[_0x2203('0x3c')]({},_0x165a3f,_0x5cd573[_0x2203('0x3e')]);return db['VoiceCallReport']['find'](_0x165a3f)[_0x2203('0x23')](handleEntityNotFound(_0x15d3b6,null))['then'](respondWithResult(_0x15d3b6,null))['catch'](handleError(_0x15d3b6,null));};exports[_0x2203('0x49')]=function(_0x33b7b5,_0x1a2665){return db['VoiceCallReport']['create'](_0x33b7b5[_0x2203('0x4a')],{})[_0x2203('0x23')](respondWithResult(_0x1a2665,0xc9))[_0x2203('0x42')](handleError(_0x1a2665,null));};exports[_0x2203('0x24')]=function(_0x225b0e,_0x21fd78){return db['VoiceCallReport'][_0x2203('0x4b')]({'where':{'id':_0x225b0e['params']['id']}})[_0x2203('0x23')](handleEntityNotFound(_0x21fd78,null))[_0x2203('0x23')](removeEntity(_0x21fd78,null))[_0x2203('0x42')](handleError(_0x21fd78,null));};exports[_0x2203('0x4c')]=function(_0x58b9bb,_0x506795){return db[_0x2203('0x2c')][_0x2203('0x4c')]()[_0x2203('0x23')](respondWithResult(_0x506795,null))[_0x2203('0x42')](handleError(_0x506795,null));};exports['update']=function(_0x4de47a,_0x49999a){if(_0x4de47a[_0x2203('0x4a')][_0x2203('0x4d')]){delete _0x4de47a['body'][_0x2203('0x4d')];}return db[_0x2203('0x2c')]['find']({'where':{'uniqueid':_0x4de47a[_0x2203('0x44')]['id'],'UserId':{'$or':[null,_0x4de47a[_0x2203('0x4e')]['id']]}}})[_0x2203('0x23')](handleEntityNotFound(_0x49999a,null))[_0x2203('0x23')](saveUpdates(_0x4de47a['body'],null))[_0x2203('0x23')](respondWithResult(_0x49999a,null))['catch'](handleError(_0x49999a,null));}; \ No newline at end of file +var _0x0b0e=['bluebird','mustache','util','path','sox','to-csv','ejs','fs-extra','lodash','jsforce','desk.js','querystring','ioredis','../../components/auth/service','../../components/parsers/advancedSearch','../../config/license/hardware','api','../../config/utils','../../config/environment','../../mysqldb','sendStatus','end','status','undefined','offset','limit','set','json','apply','reject','save','then','destroy','error','stack','name','index','map','VoiceCallReport','rawAttributes','fieldName','type','query','keys','intersection','model','attributes','fields','length','hasOwnProperty','nolimit','order','sort','filters','filter','merge','where','VIRTUAL','options','count','includeAll','fullname','alias','User','findAll','rows','params','find','create','body','catch','describe','update','uniqueid','user','eml-format','zip-dir','request-promise','moment'];(function(_0x30bb57,_0x3df186){var _0x2f139f=function(_0x110926){while(--_0x110926){_0x30bb57['push'](_0x30bb57['shift']());}};_0x2f139f(++_0x3df186);}(_0x0b0e,0x187));var _0xe0b0=function(_0x25ccbe,_0xc935c0){_0x25ccbe=_0x25ccbe-0x0;var _0x289529=_0x0b0e[_0x25ccbe];return _0x289529;};'use strict';var emlformat=require(_0xe0b0('0x0'));var rimraf=require('rimraf');var zipdir=require(_0xe0b0('0x1'));var jsonpatch=require('fast-json-patch');var rp=require(_0xe0b0('0x2'));var moment=require(_0xe0b0('0x3'));var BPromise=require(_0xe0b0('0x4'));var Mustache=require(_0xe0b0('0x5'));var util=require(_0xe0b0('0x6'));var path=require(_0xe0b0('0x7'));var sox=require(_0xe0b0('0x8'));var csv=require(_0xe0b0('0x9'));var ejs=require(_0xe0b0('0xa'));var fs=require('fs');var fs_extra=require(_0xe0b0('0xb'));var _=require(_0xe0b0('0xc'));var squel=require('squel');var crypto=require('crypto');var jsforce=require(_0xe0b0('0xd'));var deskjs=require(_0xe0b0('0xe'));var toCsv=require(_0xe0b0('0x9'));var querystring=require(_0xe0b0('0xf'));var Papa=require('papaparse');var Redis=require(_0xe0b0('0x10'));var authService=require(_0xe0b0('0x11'));var qs=require('../../components/parsers/qs');var as=require(_0xe0b0('0x12'));var hardwareService=require(_0xe0b0('0x13'));var logger=require('../../config/logger')(_0xe0b0('0x14'));var utils=require(_0xe0b0('0x15'));var config=require(_0xe0b0('0x16'));var licenseUtil=require('../../config/license/util');var db=require(_0xe0b0('0x17'))['db'];function respondWithStatusCode(_0x1c358a,_0x3cc19a){_0x3cc19a=_0x3cc19a||0xcc;return function(_0x45f914){if(_0x45f914){return _0x1c358a[_0xe0b0('0x18')](_0x3cc19a);}return _0x1c358a['status'](_0x3cc19a)[_0xe0b0('0x19')]();};}function respondWithResult(_0x154de6,_0x743318){_0x743318=_0x743318||0xc8;return function(_0x24babd){if(_0x24babd){return _0x154de6[_0xe0b0('0x1a')](_0x743318)['json'](_0x24babd);}};}function respondWithFilteredResult(_0x41a7e2,_0x5adb01){return function(_0x35cb40){if(_0x35cb40){var _0xadee6e=typeof _0x5adb01['offset']===_0xe0b0('0x1b')&&typeof _0x5adb01['limit']===_0xe0b0('0x1b');var _0x100204=_0x35cb40['count'];var _0x54a3eb=_0xadee6e?0x0:_0x5adb01[_0xe0b0('0x1c')];var _0x50a441=_0xadee6e?_0x35cb40['count']:_0x5adb01['offset']+_0x5adb01[_0xe0b0('0x1d')];var _0x50fa4a;if(_0x50a441>=_0x100204){_0x50a441=_0x100204;_0x50fa4a=0xc8;}else{_0x50fa4a=0xce;}_0x41a7e2['status'](_0x50fa4a);return _0x41a7e2[_0xe0b0('0x1e')]('Content-Range',_0x54a3eb+'-'+_0x50a441+'/'+_0x100204)[_0xe0b0('0x1f')](_0x35cb40);}return null;};}function patchUpdates(_0x5dba2f){return function(_0x2c84cc){try{jsonpatch[_0xe0b0('0x20')](_0x2c84cc,_0x5dba2f,!![]);}catch(_0x3e10b3){return BPromise[_0xe0b0('0x21')](_0x3e10b3);}return _0x2c84cc[_0xe0b0('0x22')]();};}function saveUpdates(_0x58b804,_0x4cae54){return function(_0x2fa820){if(_0x2fa820){return _0x2fa820['update'](_0x58b804)[_0xe0b0('0x23')](function(_0x31b5f8){return _0x31b5f8;});}return null;};}function removeEntity(_0x513e63,_0x170ad8){return function(_0x503883){if(_0x503883){return _0x503883[_0xe0b0('0x24')]()['then'](function(){_0x513e63[_0xe0b0('0x1a')](0xcc)['end']();});}};}function handleEntityNotFound(_0x3e5c88,_0x4de537){return function(_0x4700cc){if(!_0x4700cc){_0x3e5c88['sendStatus'](0x194);}return _0x4700cc;};}function handleError(_0x3c221d,_0x5c5317){_0x5c5317=_0x5c5317||0x1f4;return function(_0x362aba){logger[_0xe0b0('0x25')](_0x362aba[_0xe0b0('0x26')]);if(_0x362aba[_0xe0b0('0x27')]){delete _0x362aba[_0xe0b0('0x27')];}_0x3c221d[_0xe0b0('0x1a')](_0x5c5317)['send'](_0x362aba);};}exports[_0xe0b0('0x28')]=function(_0x1b8aa8,_0x5b7a64){var _0x15e13b={},_0x419b1f={},_0x36d137={'count':0x0,'rows':[]};var _0x1d5759=_[_0xe0b0('0x29')](db[_0xe0b0('0x2a')][_0xe0b0('0x2b')],function(_0x4fb3b7){return{'name':_0x4fb3b7[_0xe0b0('0x2c')],'type':_0x4fb3b7[_0xe0b0('0x2d')]['key']};});_0x419b1f['model']=_[_0xe0b0('0x29')](_0x1d5759,_0xe0b0('0x27'));_0x419b1f[_0xe0b0('0x2e')]=_[_0xe0b0('0x2f')](_0x1b8aa8[_0xe0b0('0x2e')]);_0x419b1f['filters']=_[_0xe0b0('0x30')](_0x419b1f[_0xe0b0('0x31')],_0x419b1f[_0xe0b0('0x2e')]);_0x15e13b[_0xe0b0('0x32')]=_[_0xe0b0('0x30')](_0x419b1f['model'],qs[_0xe0b0('0x33')](_0x1b8aa8[_0xe0b0('0x2e')][_0xe0b0('0x33')]));_0x15e13b[_0xe0b0('0x32')]=_0x15e13b[_0xe0b0('0x32')][_0xe0b0('0x34')]?_0x15e13b[_0xe0b0('0x32')]:_0x419b1f[_0xe0b0('0x31')];if(!_0x1b8aa8[_0xe0b0('0x2e')][_0xe0b0('0x35')](_0xe0b0('0x36'))){_0x15e13b[_0xe0b0('0x1d')]=qs[_0xe0b0('0x1d')](_0x1b8aa8[_0xe0b0('0x2e')][_0xe0b0('0x1d')]);_0x15e13b['offset']=qs[_0xe0b0('0x1c')](_0x1b8aa8[_0xe0b0('0x2e')][_0xe0b0('0x1c')]);}_0x15e13b[_0xe0b0('0x37')]=qs[_0xe0b0('0x38')](_0x1b8aa8[_0xe0b0('0x2e')][_0xe0b0('0x38')]);_0x15e13b['where']=qs['filters'](_['pick'](_0x1b8aa8['query'],_0x419b1f[_0xe0b0('0x39')]),_0x1d5759);if(_0x1b8aa8[_0xe0b0('0x2e')][_0xe0b0('0x3a')]){_0x15e13b['where']=_[_0xe0b0('0x3b')](_0x15e13b[_0xe0b0('0x3c')],{'$or':_[_0xe0b0('0x29')](_0x1d5759,function(_0x297c64){if(_0x297c64['type']!==_0xe0b0('0x3d')){var _0xfbb61d={};_0xfbb61d[_0x297c64[_0xe0b0('0x27')]]={'$like':'%'+_0x1b8aa8[_0xe0b0('0x2e')][_0xe0b0('0x3a')]+'%'};return _0xfbb61d;}})});}_0x15e13b=_[_0xe0b0('0x3b')]({},_0x15e13b,_0x1b8aa8[_0xe0b0('0x3e')]);var _0x115a69={'where':_0x15e13b[_0xe0b0('0x3c')]};return db['VoiceCallReport'][_0xe0b0('0x3f')](_0x115a69)['then'](function(_0x34178d){_0x36d137[_0xe0b0('0x3f')]=_0x34178d;if(_0x1b8aa8[_0xe0b0('0x2e')][_0xe0b0('0x40')]){_0x15e13b['include']=[{'attributes':['id',_0xe0b0('0x27'),_0xe0b0('0x41'),_0xe0b0('0x42')],'model':db[_0xe0b0('0x43')],'as':_0xe0b0('0x43')}];}return db[_0xe0b0('0x2a')][_0xe0b0('0x44')](_0x15e13b);})[_0xe0b0('0x23')](function(_0x52ffe4){_0x36d137[_0xe0b0('0x45')]=_0x52ffe4;return _0x36d137;})[_0xe0b0('0x23')](respondWithFilteredResult(_0x5b7a64,_0x15e13b))['catch'](handleError(_0x5b7a64,null));};exports['show']=function(_0x327fb4,_0x247f8d){var _0x56e7df={'raw':!![],'where':{'id':_0x327fb4[_0xe0b0('0x46')]['id']}},_0x18a59d={};_0x18a59d[_0xe0b0('0x31')]=_[_0xe0b0('0x2f')](db[_0xe0b0('0x2a')]['rawAttributes']);_0x18a59d['query']=_['keys'](_0x327fb4[_0xe0b0('0x2e')]);_0x18a59d[_0xe0b0('0x39')]=_['intersection'](_0x18a59d[_0xe0b0('0x31')],_0x18a59d[_0xe0b0('0x2e')]);_0x56e7df[_0xe0b0('0x32')]=_[_0xe0b0('0x30')](_0x18a59d[_0xe0b0('0x31')],qs['fields'](_0x327fb4['query'][_0xe0b0('0x33')]));_0x56e7df[_0xe0b0('0x32')]=_0x56e7df[_0xe0b0('0x32')][_0xe0b0('0x34')]?_0x56e7df[_0xe0b0('0x32')]:_0x18a59d['model'];if(_0x327fb4[_0xe0b0('0x2e')][_0xe0b0('0x40')]){_0x56e7df['include']=[{'all':!![]}];}_0x56e7df=_['merge']({},_0x56e7df,_0x327fb4['options']);return db[_0xe0b0('0x2a')][_0xe0b0('0x47')](_0x56e7df)[_0xe0b0('0x23')](handleEntityNotFound(_0x247f8d,null))[_0xe0b0('0x23')](respondWithResult(_0x247f8d,null))['catch'](handleError(_0x247f8d,null));};exports[_0xe0b0('0x48')]=function(_0x87d8f3,_0x483f12){return db['VoiceCallReport'][_0xe0b0('0x48')](_0x87d8f3[_0xe0b0('0x49')],{})['then'](respondWithResult(_0x483f12,0xc9))[_0xe0b0('0x4a')](handleError(_0x483f12,null));};exports[_0xe0b0('0x24')]=function(_0x504284,_0x5cb2b6){return db[_0xe0b0('0x2a')]['find']({'where':{'id':_0x504284[_0xe0b0('0x46')]['id']}})[_0xe0b0('0x23')](handleEntityNotFound(_0x5cb2b6,null))[_0xe0b0('0x23')](removeEntity(_0x5cb2b6,null))[_0xe0b0('0x4a')](handleError(_0x5cb2b6,null));};exports[_0xe0b0('0x4b')]=function(_0xf9e694,_0x5f5486){return db['VoiceCallReport'][_0xe0b0('0x4b')]()['then'](respondWithResult(_0x5f5486,null))['catch'](handleError(_0x5f5486,null));};exports[_0xe0b0('0x4c')]=function(_0x222174,_0x54cf7b){if(_0x222174['body'][_0xe0b0('0x4d')]){delete _0x222174[_0xe0b0('0x49')][_0xe0b0('0x4d')];}return db[_0xe0b0('0x2a')][_0xe0b0('0x47')]({'where':{'uniqueid':_0x222174[_0xe0b0('0x46')]['id'],'UserId':{'$or':[null,_0x222174[_0xe0b0('0x4e')]['id']]}}})['then'](handleEntityNotFound(_0x54cf7b,null))[_0xe0b0('0x23')](saveUpdates(_0x222174['body'],null))[_0xe0b0('0x23')](respondWithResult(_0x54cf7b,null))['catch'](handleError(_0x54cf7b,null));}; \ No newline at end of file diff --git a/server/api/voiceCallReport/voiceCallReport.model.js b/server/api/voiceCallReport/voiceCallReport.model.js index bb9d69e..f7493a0 100644 --- a/server/api/voiceCallReport/voiceCallReport.model.js +++ b/server/api/voiceCallReport/voiceCallReport.model.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xa486=['VoiceCallReport','report_call','uniqueid','lodash','../../config/logger','api','request-promise','path','rimraf','exports'];(function(_0x1646fa,_0x4e5bd7){var _0x5a47a5=function(_0x2db820){while(--_0x2db820){_0x1646fa['push'](_0x1646fa['shift']());}};_0x5a47a5(++_0x4e5bd7);}(_0xa486,0xd5));var _0x6a48=function(_0x393e15,_0xfed285){_0x393e15=_0x393e15-0x0;var _0x747485=_0xa486[_0x393e15];return _0x747485;};'use strict';var _=require(_0x6a48('0x0'));var util=require('util');var logger=require(_0x6a48('0x1'))(_0x6a48('0x2'));var moment=require('moment');var BPromise=require('bluebird');var rp=require(_0x6a48('0x3'));var fs=require('fs');var path=require(_0x6a48('0x4'));var rimraf=require(_0x6a48('0x5'));var config=require('../../config/environment');var attributes=require('./voiceCallReport.attributes');module[_0x6a48('0x6')]=function(_0x3531c6,_0x1e4059){return _0x3531c6['define'](_0x6a48('0x7'),attributes,{'tableName':_0x6a48('0x8'),'paranoid':![],'indexes':[{'fields':[_0x6a48('0x9')]}],'timestamps':!![]});}; \ No newline at end of file +var _0x271e=['./voiceCallReport.attributes','exports','uniqueid','lodash','util','../../config/logger','api','moment','bluebird','request-promise','rimraf','../../config/environment'];(function(_0x58fac9,_0x290a65){var _0x35da60=function(_0xff9be0){while(--_0xff9be0){_0x58fac9['push'](_0x58fac9['shift']());}};_0x35da60(++_0x290a65);}(_0x271e,0x123));var _0xe271=function(_0x27688b,_0x2cd85b){_0x27688b=_0x27688b-0x0;var _0x2630c7=_0x271e[_0x27688b];return _0x2630c7;};'use strict';var _=require(_0xe271('0x0'));var util=require(_0xe271('0x1'));var logger=require(_0xe271('0x2'))(_0xe271('0x3'));var moment=require(_0xe271('0x4'));var BPromise=require(_0xe271('0x5'));var rp=require(_0xe271('0x6'));var fs=require('fs');var path=require('path');var rimraf=require(_0xe271('0x7'));var config=require(_0xe271('0x8'));var attributes=require(_0xe271('0x9'));module[_0xe271('0xa')]=function(_0xc8765d,_0x27742d){return _0xc8765d['define']('VoiceCallReport',attributes,{'tableName':'report_call','paranoid':![],'indexes':[{'fields':[_0xe271('0xb')]}],'timestamps':!![]});}; \ No newline at end of file diff --git a/server/api/voiceCallReport/voiceCallReport.rpc.js b/server/api/voiceCallReport/voiceCallReport.rpc.js index 176a8e6..dbdac6d 100644 --- a/server/api/voiceCallReport/voiceCallReport.rpc.js +++ b/server/api/voiceCallReport/voiceCallReport.rpc.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x5855=['stringify','error','code','message','request\x20sent','result','catch','GetVoiceCallReport','VoiceCallReport','options','where','limit','map','include','model','attributes','info','CreateVoiceCallReport','create','UpdateVoiceCallReport','body','lodash','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','jayson/promise','client','http','then','VoiceCallReport,\x20%s,\x20%s','debug','VoiceCallReport,\x20%s,\x20%s,\x20%s'];(function(_0x39479f,_0x822ae4){var _0x4a6d96=function(_0x55bfba){while(--_0x55bfba){_0x39479f['push'](_0x39479f['shift']());}};_0x4a6d96(++_0x822ae4);}(_0x5855,0xc9));var _0x5585=function(_0x4bd8e1,_0x5e9388){_0x4bd8e1=_0x4bd8e1-0x0;var _0x286282=_0x5855[_0x4bd8e1];return _0x286282;};'use strict';var _=require(_0x5585('0x0'));var util=require('util');var moment=require('moment');var BPromise=require(_0x5585('0x1'));var rs=require(_0x5585('0x2'));var fs=require('fs');var Redis=require(_0x5585('0x3'));var db=require(_0x5585('0x4'))['db'];var utils=require(_0x5585('0x5'));var logger=require(_0x5585('0x6'))(_0x5585('0x7'));var config=require('../../config/environment');var jayson=require(_0x5585('0x8'));var client=jayson[_0x5585('0x9')][_0x5585('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x344ff0,_0xcd74f8,_0xcfe8ec){return new BPromise(function(_0x3267e7,_0x370228){return client['request'](_0x344ff0,_0xcfe8ec)[_0x5585('0xb')](function(_0x405af7){logger['info'](_0x5585('0xc'),_0xcd74f8,'request\x20sent');logger[_0x5585('0xd')](_0x5585('0xe'),_0xcd74f8,'request\x20sent',JSON[_0x5585('0xf')](_0x405af7));if(_0x405af7[_0x5585('0x10')]){if(_0x405af7['error'][_0x5585('0x11')]===0x1f4){logger[_0x5585('0x10')](_0x5585('0xc'),_0xcd74f8,_0x405af7[_0x5585('0x10')][_0x5585('0x12')]);return _0x370228(_0x405af7[_0x5585('0x10')][_0x5585('0x12')]);}logger[_0x5585('0x10')]('VoiceCallReport,\x20%s,\x20%s',_0xcd74f8,_0x405af7[_0x5585('0x10')][_0x5585('0x12')]);return _0x3267e7(_0x405af7['error'][_0x5585('0x12')]);}else{logger['info'](_0x5585('0xc'),_0xcd74f8,_0x5585('0x13'));_0x3267e7(_0x405af7[_0x5585('0x14')][_0x5585('0x12')]);}})[_0x5585('0x15')](function(_0x2af084){logger[_0x5585('0x10')](_0x5585('0xc'),_0xcd74f8,_0x2af084);_0x370228(_0x2af084);});});}exports[_0x5585('0x16')]=function(_0x14d726){var _0x513d15=this;return new Promise(function(_0x536ec2,_0x1d44f0){return db[_0x5585('0x17')]['findAll']({'raw':_0x14d726['options']?_0x14d726[_0x5585('0x18')]['raw']===undefined?!![]:![]:!![],'where':_0x14d726[_0x5585('0x18')]?_0x14d726[_0x5585('0x18')][_0x5585('0x19')]||null:null,'attributes':_0x14d726[_0x5585('0x18')]?_0x14d726[_0x5585('0x18')]['attributes']||null:null,'limit':_0x14d726[_0x5585('0x18')]?_0x14d726[_0x5585('0x18')][_0x5585('0x1a')]||null:null,'include':_0x14d726[_0x5585('0x18')]?_0x14d726['options']['include']?_[_0x5585('0x1b')](_0x14d726['options'][_0x5585('0x1c')],function(_0x46884d){return{'model':db[_0x46884d[_0x5585('0x1d')]],'as':_0x46884d['as'],'attributes':_0x46884d[_0x5585('0x1e')],'include':_0x46884d[_0x5585('0x1c')]?_['map'](_0x46884d['include'],function(_0x254264){return{'model':db[_0x254264[_0x5585('0x1d')]],'as':_0x254264['as'],'attributes':_0x254264[_0x5585('0x1e')],'include':_0x254264['include']?_[_0x5585('0x1b')](_0x254264['include'],function(_0x1ed4e2){return{'model':db[_0x1ed4e2[_0x5585('0x1d')]],'as':_0x1ed4e2['as'],'attributes':_0x1ed4e2[_0x5585('0x1e')]};}):[]};}):[]};}):[]:[]})['then'](function(_0x331912){logger[_0x5585('0x1f')](_0x5585('0x16'),_0x14d726);logger['debug']('GetVoiceCallReport',_0x14d726,JSON[_0x5585('0xf')](_0x331912));_0x536ec2(_0x331912);})['catch'](function(_0x56d031){logger[_0x5585('0x10')](_0x5585('0x16'),_0x56d031[_0x5585('0x12')],_0x14d726);_0x1d44f0(_0x513d15[_0x5585('0x10')](0x1f4,_0x56d031[_0x5585('0x12')]));});});};exports[_0x5585('0x20')]=function(_0x232f1f){var _0x5ce048=this;return new Promise(function(_0x224d0c,_0x463b4c){return db['VoiceCallReport'][_0x5585('0x21')](_0x232f1f['body'],{'raw':_0x232f1f['options']?_0x232f1f[_0x5585('0x18')]['raw']===undefined?!![]:![]:!![]})['then'](function(_0x12a490){logger[_0x5585('0x1f')](_0x5585('0x20'),_0x232f1f);logger[_0x5585('0xd')](_0x5585('0x20'),_0x232f1f,JSON[_0x5585('0xf')](_0x12a490));_0x224d0c(_0x12a490);})[_0x5585('0x15')](function(_0x5df17c){logger[_0x5585('0x10')](_0x5585('0x20'),_0x5df17c[_0x5585('0x12')],_0x232f1f);_0x463b4c(_0x5ce048[_0x5585('0x10')](0x1f4,_0x5df17c[_0x5585('0x12')]));});});};exports[_0x5585('0x22')]=function(_0x535f3e){var _0x2e6f13=this;return new Promise(function(_0x18bdbe,_0x57c09d){return db['VoiceCallReport']['update'](_0x535f3e[_0x5585('0x23')],{'raw':_0x535f3e['options']?_0x535f3e[_0x5585('0x18')]['raw']===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x535f3e[_0x5585('0x18')]?_0x535f3e[_0x5585('0x18')][_0x5585('0x19')]||null:null,'attributes':_0x535f3e[_0x5585('0x18')]?_0x535f3e[_0x5585('0x18')][_0x5585('0x1e')]||null:null,'limit':_0x535f3e['options']?_0x535f3e[_0x5585('0x18')][_0x5585('0x1a')]||null:null})[_0x5585('0xb')](function(_0x83ada2){logger[_0x5585('0x1f')]('UpdateVoiceCallReport',_0x535f3e);logger[_0x5585('0xd')]('UpdateVoiceCallReport',_0x535f3e,JSON[_0x5585('0xf')](_0x83ada2));_0x18bdbe(_0x83ada2);})[_0x5585('0x15')](function(_0x51dd62){logger[_0x5585('0x10')](_0x5585('0x22'),_0x51dd62[_0x5585('0x12')],_0x535f3e);_0x57c09d(_0x2e6f13[_0x5585('0x10')](0x1f4,_0x51dd62[_0x5585('0x12')]));});});}; \ No newline at end of file +var _0x4051=['include','map','model','info','CreateVoiceCallReport','create','body','then','UpdateVoiceCallReport','update','moment','bluebird','randomstring','../../mysqldb','../../config/utils','rpc','jayson/promise','client','http','VoiceCallReport,\x20%s,\x20%s','request\x20sent','debug','stringify','code','error','message','catch','GetVoiceCallReport','VoiceCallReport','options','raw','where','attributes','limit'];(function(_0x2fb03a,_0x33595d){var _0x2fd4c1=function(_0x251eb9){while(--_0x251eb9){_0x2fb03a['push'](_0x2fb03a['shift']());}};_0x2fd4c1(++_0x33595d);}(_0x4051,0xb4));var _0x1405=function(_0x4b369d,_0x265eb8){_0x4b369d=_0x4b369d-0x0;var _0x571a98=_0x4051[_0x4b369d];return _0x571a98;};'use strict';var _=require('lodash');var util=require('util');var moment=require(_0x1405('0x0'));var BPromise=require(_0x1405('0x1'));var rs=require(_0x1405('0x2'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0x1405('0x3'))['db'];var utils=require(_0x1405('0x4'));var logger=require('../../config/logger')(_0x1405('0x5'));var config=require('../../config/environment');var jayson=require(_0x1405('0x6'));var client=jayson[_0x1405('0x7')][_0x1405('0x8')]({'port':0x232a});function respondWithRpcPromise(_0x2ba72a,_0x519f32,_0x381f77){return new BPromise(function(_0x293069,_0x27bf8f){return client['request'](_0x2ba72a,_0x381f77)['then'](function(_0x50537c){logger['info'](_0x1405('0x9'),_0x519f32,_0x1405('0xa'));logger[_0x1405('0xb')]('VoiceCallReport,\x20%s,\x20%s,\x20%s',_0x519f32,_0x1405('0xa'),JSON[_0x1405('0xc')](_0x50537c));if(_0x50537c['error']){if(_0x50537c['error'][_0x1405('0xd')]===0x1f4){logger[_0x1405('0xe')]('VoiceCallReport,\x20%s,\x20%s',_0x519f32,_0x50537c[_0x1405('0xe')][_0x1405('0xf')]);return _0x27bf8f(_0x50537c[_0x1405('0xe')][_0x1405('0xf')]);}logger['error'](_0x1405('0x9'),_0x519f32,_0x50537c[_0x1405('0xe')][_0x1405('0xf')]);return _0x293069(_0x50537c['error'][_0x1405('0xf')]);}else{logger['info'](_0x1405('0x9'),_0x519f32,_0x1405('0xa'));_0x293069(_0x50537c['result'][_0x1405('0xf')]);}})[_0x1405('0x10')](function(_0x3cab9c){logger[_0x1405('0xe')]('VoiceCallReport,\x20%s,\x20%s',_0x519f32,_0x3cab9c);_0x27bf8f(_0x3cab9c);});});}exports[_0x1405('0x11')]=function(_0x4593fb){var _0xf57a4e=this;return new Promise(function(_0x4de8f1,_0x2eb64d){return db[_0x1405('0x12')]['findAll']({'raw':_0x4593fb[_0x1405('0x13')]?_0x4593fb[_0x1405('0x13')][_0x1405('0x14')]===undefined?!![]:![]:!![],'where':_0x4593fb[_0x1405('0x13')]?_0x4593fb['options'][_0x1405('0x15')]||null:null,'attributes':_0x4593fb[_0x1405('0x13')]?_0x4593fb[_0x1405('0x13')][_0x1405('0x16')]||null:null,'limit':_0x4593fb[_0x1405('0x13')]?_0x4593fb[_0x1405('0x13')][_0x1405('0x17')]||null:null,'include':_0x4593fb['options']?_0x4593fb[_0x1405('0x13')][_0x1405('0x18')]?_['map'](_0x4593fb['options'][_0x1405('0x18')],function(_0x4dc979){return{'model':db[_0x4dc979['model']],'as':_0x4dc979['as'],'attributes':_0x4dc979[_0x1405('0x16')],'include':_0x4dc979[_0x1405('0x18')]?_[_0x1405('0x19')](_0x4dc979[_0x1405('0x18')],function(_0x50af00){return{'model':db[_0x50af00[_0x1405('0x1a')]],'as':_0x50af00['as'],'attributes':_0x50af00[_0x1405('0x16')],'include':_0x50af00[_0x1405('0x18')]?_[_0x1405('0x19')](_0x50af00[_0x1405('0x18')],function(_0x1f3604){return{'model':db[_0x1f3604['model']],'as':_0x1f3604['as'],'attributes':_0x1f3604[_0x1405('0x16')]};}):[]};}):[]};}):[]:[]})['then'](function(_0x589f47){logger[_0x1405('0x1b')]('GetVoiceCallReport',_0x4593fb);logger[_0x1405('0xb')](_0x1405('0x11'),_0x4593fb,JSON[_0x1405('0xc')](_0x589f47));_0x4de8f1(_0x589f47);})['catch'](function(_0x1f8154){logger[_0x1405('0xe')](_0x1405('0x11'),_0x1f8154[_0x1405('0xf')],_0x4593fb);_0x2eb64d(_0xf57a4e[_0x1405('0xe')](0x1f4,_0x1f8154[_0x1405('0xf')]));});});};exports[_0x1405('0x1c')]=function(_0x2eb851){var _0x2cdbb8=this;return new Promise(function(_0x58f9ec,_0x368bdc){return db[_0x1405('0x12')][_0x1405('0x1d')](_0x2eb851[_0x1405('0x1e')],{'raw':_0x2eb851[_0x1405('0x13')]?_0x2eb851['options']['raw']===undefined?!![]:![]:!![]})[_0x1405('0x1f')](function(_0x27f12b){logger['info'](_0x1405('0x1c'),_0x2eb851);logger['debug'](_0x1405('0x1c'),_0x2eb851,JSON[_0x1405('0xc')](_0x27f12b));_0x58f9ec(_0x27f12b);})['catch'](function(_0x14e151){logger[_0x1405('0xe')](_0x1405('0x1c'),_0x14e151[_0x1405('0xf')],_0x2eb851);_0x368bdc(_0x2cdbb8['error'](0x1f4,_0x14e151[_0x1405('0xf')]));});});};exports[_0x1405('0x20')]=function(_0x50070d){var _0x4c064c=this;return new Promise(function(_0x39586c,_0x4143a4){return db[_0x1405('0x12')][_0x1405('0x21')](_0x50070d[_0x1405('0x1e')],{'raw':_0x50070d[_0x1405('0x13')]?_0x50070d['options'][_0x1405('0x14')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x50070d[_0x1405('0x13')]?_0x50070d[_0x1405('0x13')][_0x1405('0x15')]||null:null,'attributes':_0x50070d[_0x1405('0x13')]?_0x50070d[_0x1405('0x13')][_0x1405('0x16')]||null:null,'limit':_0x50070d[_0x1405('0x13')]?_0x50070d[_0x1405('0x13')][_0x1405('0x17')]||null:null})['then'](function(_0x40ba7d){logger[_0x1405('0x1b')]('UpdateVoiceCallReport',_0x50070d);logger['debug']('UpdateVoiceCallReport',_0x50070d,JSON[_0x1405('0xc')](_0x40ba7d));_0x39586c(_0x40ba7d);})[_0x1405('0x10')](function(_0x4d9f44){logger['error'](_0x1405('0x20'),_0x4d9f44[_0x1405('0xf')],_0x50070d);_0x4143a4(_0x4c064c['error'](0x1f4,_0x4d9f44[_0x1405('0xf')]));});});}; \ No newline at end of file diff --git a/server/api/voiceChanSpy/index.js b/server/api/voiceChanSpy/index.js index 3b62727..0759b39 100644 --- a/server/api/voiceChanSpy/index.js +++ b/server/api/voiceChanSpy/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x1773=['./voiceChanSpy.controller','get','isAuthenticated','index','/:id','show','post','put','exports','multer','util','path','connect-timeout','express','Router','fs-extra','../../components/auth/service','../../components/interaction/service'];(function(_0x1e933a,_0x224ca4){var _0x146103=function(_0x3817de){while(--_0x3817de){_0x1e933a['push'](_0x1e933a['shift']());}};_0x146103(++_0x224ca4);}(_0x1773,0xe1));var _0x3177=function(_0x22f6b3,_0x35be3e){_0x22f6b3=_0x22f6b3-0x0;var _0x3dcb97=_0x1773[_0x22f6b3];return _0x3dcb97;};'use strict';var multer=require(_0x3177('0x0'));var util=require(_0x3177('0x1'));var path=require(_0x3177('0x2'));var timeout=require(_0x3177('0x3'));var express=require(_0x3177('0x4'));var router=express[_0x3177('0x5')]();var fs_extra=require(_0x3177('0x6'));var auth=require(_0x3177('0x7'));var interaction=require(_0x3177('0x8'));var config=require('../../config/environment');var controller=require(_0x3177('0x9'));router[_0x3177('0xa')]('/',auth[_0x3177('0xb')](),controller[_0x3177('0xc')]);router[_0x3177('0xa')](_0x3177('0xd'),auth['isAuthenticated'](),controller[_0x3177('0xe')]);router[_0x3177('0xf')]('/',auth['isAuthenticated'](),controller['create']);router[_0x3177('0x10')]('/:id',auth[_0x3177('0xb')](),controller['update']);router['delete'](_0x3177('0xd'),auth[_0x3177('0xb')](),controller['destroy']);module[_0x3177('0x11')]=router; \ No newline at end of file +var _0x068f=['index','/:id','show','post','create','put','update','destroy','exports','multer','util','path','connect-timeout','express','Router','fs-extra','../../components/interaction/service','../../config/environment','./voiceChanSpy.controller','get','isAuthenticated'];(function(_0x566bdf,_0x1f4861){var _0x331215=function(_0x524d0d){while(--_0x524d0d){_0x566bdf['push'](_0x566bdf['shift']());}};_0x331215(++_0x1f4861);}(_0x068f,0x159));var _0xf068=function(_0x4565bf,_0x5ad9d6){_0x4565bf=_0x4565bf-0x0;var _0x5610ba=_0x068f[_0x4565bf];return _0x5610ba;};'use strict';var multer=require(_0xf068('0x0'));var util=require(_0xf068('0x1'));var path=require(_0xf068('0x2'));var timeout=require(_0xf068('0x3'));var express=require(_0xf068('0x4'));var router=express[_0xf068('0x5')]();var fs_extra=require(_0xf068('0x6'));var auth=require('../../components/auth/service');var interaction=require(_0xf068('0x7'));var config=require(_0xf068('0x8'));var controller=require(_0xf068('0x9'));router[_0xf068('0xa')]('/',auth[_0xf068('0xb')](),controller[_0xf068('0xc')]);router[_0xf068('0xa')](_0xf068('0xd'),auth[_0xf068('0xb')](),controller[_0xf068('0xe')]);router[_0xf068('0xf')]('/',auth['isAuthenticated'](),controller[_0xf068('0x10')]);router[_0xf068('0x11')](_0xf068('0xd'),auth[_0xf068('0xb')](),controller[_0xf068('0x12')]);router['delete'](_0xf068('0xd'),auth['isAuthenticated'](),controller[_0xf068('0x13')]);module[_0xf068('0x14')]=router; \ No newline at end of file diff --git a/server/api/voiceChanSpy/voiceChanSpy.attributes.js b/server/api/voiceChanSpy/voiceChanSpy.attributes.js index ffc5173..fd008ae 100644 --- a/server/api/voiceChanSpy/voiceChanSpy.attributes.js +++ b/server/api/voiceChanSpy/voiceChanSpy.attributes.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xb986=['setDataValue','options','join','getDataValue','split','BOOLEAN','sequelize','exports','STRING'];(function(_0x3b380d,_0x4bf247){var _0x54502b=function(_0x35d207){while(--_0x35d207){_0x3b380d['push'](_0x3b380d['shift']());}};_0x54502b(++_0x4bf247);}(_0xb986,0x189));var _0x6b98=function(_0x4747b7,_0x4514b2){_0x4747b7=_0x4747b7-0x0;var _0x6f196b=_0xb986[_0x4747b7];return _0x6f196b;};'use strict';var Sequelize=require(_0x6b98('0x0'));module[_0x6b98('0x1')]={'name':{'type':Sequelize[_0x6b98('0x2')]},'prefix':{'type':Sequelize[_0x6b98('0x2')],'unique':'name','allowNull':![]},'options':{'type':Sequelize[_0x6b98('0x2')],'set':function(_0x2d06b3){this[_0x6b98('0x3')](_0x6b98('0x4'),_0x2d06b3?_0x2d06b3[_0x6b98('0x5')](''):[]);},'get':function(){return this[_0x6b98('0x6')](_0x6b98('0x4'))?this['getDataValue'](_0x6b98('0x4'))[_0x6b98('0x7')](''):[];}},'auth':{'type':Sequelize[_0x6b98('0x8')],'defaultValue':![]},'password':{'type':Sequelize[_0x6b98('0x2')]},'record':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'recordingFormat':{'type':Sequelize[_0x6b98('0x2')]},'description':{'type':Sequelize[_0x6b98('0x2')]}}; \ No newline at end of file +var _0xa1dc=['join','getDataValue','split','BOOLEAN','sequelize','exports','STRING','name','setDataValue','options'];(function(_0xe73080,_0x24c56d){var _0x12cbc4=function(_0x1377e2){while(--_0x1377e2){_0xe73080['push'](_0xe73080['shift']());}};_0x12cbc4(++_0x24c56d);}(_0xa1dc,0xa4));var _0xca1d=function(_0x2f8c9a,_0x2b026d){_0x2f8c9a=_0x2f8c9a-0x0;var _0x1a980f=_0xa1dc[_0x2f8c9a];return _0x1a980f;};'use strict';var Sequelize=require(_0xca1d('0x0'));module[_0xca1d('0x1')]={'name':{'type':Sequelize[_0xca1d('0x2')]},'prefix':{'type':Sequelize[_0xca1d('0x2')],'unique':_0xca1d('0x3'),'allowNull':![]},'options':{'type':Sequelize[_0xca1d('0x2')],'set':function(_0x1eb3de){this[_0xca1d('0x4')](_0xca1d('0x5'),_0x1eb3de?_0x1eb3de[_0xca1d('0x6')](''):[]);},'get':function(){return this[_0xca1d('0x7')]('options')?this['getDataValue'](_0xca1d('0x5'))[_0xca1d('0x8')](''):[];}},'auth':{'type':Sequelize[_0xca1d('0x9')],'defaultValue':![]},'password':{'type':Sequelize[_0xca1d('0x2')]},'record':{'type':Sequelize[_0xca1d('0x9')],'defaultValue':![]},'recordingFormat':{'type':Sequelize[_0xca1d('0x2')]},'description':{'type':Sequelize[_0xca1d('0x2')]}}; \ No newline at end of file diff --git a/server/api/voiceChanSpy/voiceChanSpy.controller.js b/server/api/voiceChanSpy/voiceChanSpy.controller.js index 94a930a..72bb238 100644 --- a/server/api/voiceChanSpy/voiceChanSpy.controller.js +++ b/server/api/voiceChanSpy/voiceChanSpy.controller.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xc686=['zip-dir','request-promise','bluebird','mustache','util','path','sox','to-csv','ejs','fs-extra','lodash','squel','crypto','jsforce','querystring','ioredis','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/logger','../../config/utils','../../config/environment','../../mysqldb','status','end','json','undefined','limit','offset','set','Content-Range','apply','reject','save','update','then','destroy','get','ChanSpies','UserProfileResource','sendStatus','error','name','send','index','map','VoiceChanSpy','rawAttributes','fieldName','type','key','model','query','keys','filters','intersection','fields','attributes','length','hasOwnProperty','order','sort','where','pick','filter','merge','VIRTUAL','options','count','includeAll','include','findAll','rows','catch','show','find','create','body','user','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','UserProfileSection','params'];(function(_0x178d62,_0x2196f2){var _0x1e903e=function(_0x549f0d){while(--_0x549f0d){_0x178d62['push'](_0x178d62['shift']());}};_0x1e903e(++_0x2196f2);}(_0xc686,0x148));var _0x6c68=function(_0x4e9628,_0x250573){_0x4e9628=_0x4e9628-0x0;var _0x27bc8c=_0xc686[_0x4e9628];return _0x27bc8c;};'use strict';var emlformat=require('eml-format');var rimraf=require('rimraf');var zipdir=require(_0x6c68('0x0'));var jsonpatch=require('fast-json-patch');var rp=require(_0x6c68('0x1'));var moment=require('moment');var BPromise=require(_0x6c68('0x2'));var Mustache=require(_0x6c68('0x3'));var util=require(_0x6c68('0x4'));var path=require(_0x6c68('0x5'));var sox=require(_0x6c68('0x6'));var csv=require(_0x6c68('0x7'));var ejs=require(_0x6c68('0x8'));var fs=require('fs');var fs_extra=require(_0x6c68('0x9'));var _=require(_0x6c68('0xa'));var squel=require(_0x6c68('0xb'));var crypto=require(_0x6c68('0xc'));var jsforce=require(_0x6c68('0xd'));var deskjs=require('desk.js');var toCsv=require(_0x6c68('0x7'));var querystring=require(_0x6c68('0xe'));var Papa=require('papaparse');var Redis=require(_0x6c68('0xf'));var authService=require('../../components/auth/service');var qs=require(_0x6c68('0x10'));var as=require(_0x6c68('0x11'));var hardwareService=require('../../config/license/hardware');var logger=require(_0x6c68('0x12'))('api');var utils=require(_0x6c68('0x13'));var config=require(_0x6c68('0x14'));var licenseUtil=require('../../config/license/util');var db=require(_0x6c68('0x15'))['db'];function respondWithStatusCode(_0x489c2f,_0x4f947a){_0x4f947a=_0x4f947a||0xcc;return function(_0x29e0a5){if(_0x29e0a5){return _0x489c2f['sendStatus'](_0x4f947a);}return _0x489c2f[_0x6c68('0x16')](_0x4f947a)[_0x6c68('0x17')]();};}function respondWithResult(_0x310431,_0x4c4f5d){_0x4c4f5d=_0x4c4f5d||0xc8;return function(_0x25a4dc){if(_0x25a4dc){return _0x310431[_0x6c68('0x16')](_0x4c4f5d)[_0x6c68('0x18')](_0x25a4dc);}};}function respondWithFilteredResult(_0x9393b,_0x2dc30b){return function(_0x494b6e){if(_0x494b6e){var _0x5a0a84=typeof _0x2dc30b['offset']===_0x6c68('0x19')&&typeof _0x2dc30b[_0x6c68('0x1a')]===_0x6c68('0x19');var _0x1422fa=_0x494b6e['count'];var _0x2cd5f6=_0x5a0a84?0x0:_0x2dc30b[_0x6c68('0x1b')];var _0x5045e3=_0x5a0a84?_0x494b6e['count']:_0x2dc30b[_0x6c68('0x1b')]+_0x2dc30b[_0x6c68('0x1a')];var _0x23d91d;if(_0x5045e3>=_0x1422fa){_0x5045e3=_0x1422fa;_0x23d91d=0xc8;}else{_0x23d91d=0xce;}_0x9393b['status'](_0x23d91d);return _0x9393b[_0x6c68('0x1c')](_0x6c68('0x1d'),_0x2cd5f6+'-'+_0x5045e3+'/'+_0x1422fa)[_0x6c68('0x18')](_0x494b6e);}return null;};}function patchUpdates(_0x29b74d){return function(_0x153edb){try{jsonpatch[_0x6c68('0x1e')](_0x153edb,_0x29b74d,!![]);}catch(_0x12dc3a){return BPromise[_0x6c68('0x1f')](_0x12dc3a);}return _0x153edb[_0x6c68('0x20')]();};}function saveUpdates(_0xb6635c,_0x5974e8){return function(_0x201d7d){if(_0x201d7d){return _0x201d7d[_0x6c68('0x21')](_0xb6635c)[_0x6c68('0x22')](function(_0x1d981c){return _0x1d981c;});}return null;};}function removeEntity(_0xb06428,_0x2a4aba){return function(_0x3e680a){if(_0x3e680a){return _0x3e680a[_0x6c68('0x23')]()[_0x6c68('0x22')](function(){var _0xfd98ef=_0x3e680a[_0x6c68('0x24')]({'plain':!![]});var _0x2f4fd5=_0x6c68('0x25');return db[_0x6c68('0x26')][_0x6c68('0x23')]({'where':{'type':_0x2f4fd5,'resourceId':_0xfd98ef['id']}})[_0x6c68('0x22')](function(){return _0x3e680a;});})[_0x6c68('0x22')](function(){_0xb06428['status'](0xcc)[_0x6c68('0x17')]();});}};}function handleEntityNotFound(_0x12ec21,_0x456728){return function(_0x3bf62a){if(!_0x3bf62a){_0x12ec21[_0x6c68('0x27')](0x194);}return _0x3bf62a;};}function handleError(_0x2da548,_0x17f3e0){_0x17f3e0=_0x17f3e0||0x1f4;return function(_0x1d4566){logger[_0x6c68('0x28')](_0x1d4566['stack']);if(_0x1d4566[_0x6c68('0x29')]){delete _0x1d4566[_0x6c68('0x29')];}_0x2da548['status'](_0x17f3e0)[_0x6c68('0x2a')](_0x1d4566);};}exports[_0x6c68('0x2b')]=function(_0x24fc6d,_0x486e84){var _0x18f087={},_0x590023={},_0xd55c65={'count':0x0,'rows':[]};var _0x5a5fd4=_[_0x6c68('0x2c')](db[_0x6c68('0x2d')][_0x6c68('0x2e')],function(_0x18d98c){return{'name':_0x18d98c[_0x6c68('0x2f')],'type':_0x18d98c[_0x6c68('0x30')][_0x6c68('0x31')]};});_0x590023[_0x6c68('0x32')]=_[_0x6c68('0x2c')](_0x5a5fd4,_0x6c68('0x29'));_0x590023[_0x6c68('0x33')]=_[_0x6c68('0x34')](_0x24fc6d[_0x6c68('0x33')]);_0x590023[_0x6c68('0x35')]=_[_0x6c68('0x36')](_0x590023[_0x6c68('0x32')],_0x590023['query']);_0x18f087['attributes']=_[_0x6c68('0x36')](_0x590023[_0x6c68('0x32')],qs[_0x6c68('0x37')](_0x24fc6d[_0x6c68('0x33')][_0x6c68('0x37')]));_0x18f087['attributes']=_0x18f087[_0x6c68('0x38')][_0x6c68('0x39')]?_0x18f087[_0x6c68('0x38')]:_0x590023[_0x6c68('0x32')];if(!_0x24fc6d[_0x6c68('0x33')][_0x6c68('0x3a')]('nolimit')){_0x18f087['limit']=qs[_0x6c68('0x1a')](_0x24fc6d[_0x6c68('0x33')]['limit']);_0x18f087['offset']=qs[_0x6c68('0x1b')](_0x24fc6d['query'][_0x6c68('0x1b')]);}_0x18f087[_0x6c68('0x3b')]=qs['sort'](_0x24fc6d[_0x6c68('0x33')][_0x6c68('0x3c')]);_0x18f087[_0x6c68('0x3d')]=qs[_0x6c68('0x35')](_[_0x6c68('0x3e')](_0x24fc6d[_0x6c68('0x33')],_0x590023[_0x6c68('0x35')]),_0x5a5fd4);if(_0x24fc6d[_0x6c68('0x33')][_0x6c68('0x3f')]){_0x18f087[_0x6c68('0x3d')]=_[_0x6c68('0x40')](_0x18f087[_0x6c68('0x3d')],{'$or':_[_0x6c68('0x2c')](_0x5a5fd4,function(_0x798117){if(_0x798117[_0x6c68('0x30')]!==_0x6c68('0x41')){var _0x29b900={};_0x29b900[_0x798117[_0x6c68('0x29')]]={'$like':'%'+_0x24fc6d[_0x6c68('0x33')][_0x6c68('0x3f')]+'%'};return _0x29b900;}})});}_0x18f087=_[_0x6c68('0x40')]({},_0x18f087,_0x24fc6d[_0x6c68('0x42')]);var _0x1bcf52={'where':_0x18f087['where']};return db[_0x6c68('0x2d')][_0x6c68('0x43')](_0x1bcf52)[_0x6c68('0x22')](function(_0x5cc254){_0xd55c65[_0x6c68('0x43')]=_0x5cc254;if(_0x24fc6d[_0x6c68('0x33')][_0x6c68('0x44')]){_0x18f087[_0x6c68('0x45')]=[{'all':!![]}];}return db[_0x6c68('0x2d')][_0x6c68('0x46')](_0x18f087);})[_0x6c68('0x22')](function(_0x388d2c){_0xd55c65[_0x6c68('0x47')]=_0x388d2c;return _0xd55c65;})[_0x6c68('0x22')](respondWithFilteredResult(_0x486e84,_0x18f087))[_0x6c68('0x48')](handleError(_0x486e84,null));};exports[_0x6c68('0x49')]=function(_0x10aade,_0x13d3f3){var _0x2aa77e={'raw':![],'where':{'id':_0x10aade['params']['id']}},_0x145e75={};_0x145e75[_0x6c68('0x32')]=_[_0x6c68('0x34')](db[_0x6c68('0x2d')][_0x6c68('0x2e')]);_0x145e75['query']=_[_0x6c68('0x34')](_0x10aade[_0x6c68('0x33')]);_0x145e75['filters']=_[_0x6c68('0x36')](_0x145e75[_0x6c68('0x32')],_0x145e75[_0x6c68('0x33')]);_0x2aa77e['attributes']=_[_0x6c68('0x36')](_0x145e75[_0x6c68('0x32')],qs[_0x6c68('0x37')](_0x10aade[_0x6c68('0x33')][_0x6c68('0x37')]));_0x2aa77e[_0x6c68('0x38')]=_0x2aa77e['attributes'][_0x6c68('0x39')]?_0x2aa77e['attributes']:_0x145e75[_0x6c68('0x32')];if(_0x10aade['query'][_0x6c68('0x44')]){_0x2aa77e['include']=[{'all':!![]}];}_0x2aa77e=_[_0x6c68('0x40')]({},_0x2aa77e,_0x10aade[_0x6c68('0x42')]);return db[_0x6c68('0x2d')][_0x6c68('0x4a')](_0x2aa77e)[_0x6c68('0x22')](handleEntityNotFound(_0x13d3f3,null))[_0x6c68('0x22')](respondWithResult(_0x13d3f3,null))[_0x6c68('0x48')](handleError(_0x13d3f3,null));};exports[_0x6c68('0x4b')]=function(_0x4f9ab6,_0x19f1fc){return db['VoiceChanSpy']['create'](_0x4f9ab6[_0x6c68('0x4c')],{})[_0x6c68('0x22')](function(_0x1507fe){var _0x33fa95=_0x4f9ab6[_0x6c68('0x4d')]['get']({'plain':!![]});if(!_0x33fa95)throw new Error(_0x6c68('0x4e'));if(_0x33fa95[_0x6c68('0x4f')]===_0x6c68('0x4d')){var _0x4bb381=_0x1507fe[_0x6c68('0x24')]({'plain':!![]});var _0x42bda2=_0x6c68('0x25');return db[_0x6c68('0x50')]['find']({'where':{'name':_0x42bda2,'userProfileId':_0x33fa95['userProfileId']},'raw':!![]})[_0x6c68('0x22')](function(_0x1ce44e){if(_0x1ce44e&&_0x1ce44e['autoAssociation']===0x0){return db[_0x6c68('0x26')]['create']({'name':_0x4bb381['name'],'resourceId':_0x4bb381['id'],'type':_0x1ce44e[_0x6c68('0x29')],'sectionId':_0x1ce44e['id']},{})['then'](function(){return _0x1507fe;});}else{return _0x1507fe;}})[_0x6c68('0x48')](function(_0x1cf860){logger[_0x6c68('0x28')]('Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s',_0x1cf860);throw _0x1cf860;});}return _0x1507fe;})['then'](respondWithResult(_0x19f1fc,0xc9))['catch'](handleError(_0x19f1fc,null));};exports[_0x6c68('0x21')]=function(_0x3a56dd,_0x1bcd6d){if(_0x3a56dd[_0x6c68('0x4c')]['id']){delete _0x3a56dd[_0x6c68('0x4c')]['id'];}return db[_0x6c68('0x2d')][_0x6c68('0x4a')]({'where':{'id':_0x3a56dd[_0x6c68('0x51')]['id']}})['then'](handleEntityNotFound(_0x1bcd6d,null))[_0x6c68('0x22')](saveUpdates(_0x3a56dd['body'],null))[_0x6c68('0x22')](respondWithResult(_0x1bcd6d,null))[_0x6c68('0x48')](handleError(_0x1bcd6d,null));};exports[_0x6c68('0x23')]=function(_0x1b5b23,_0x4c3895){return db[_0x6c68('0x2d')][_0x6c68('0x4a')]({'where':{'id':_0x1b5b23['params']['id']}})[_0x6c68('0x22')](handleEntityNotFound(_0x4c3895,null))[_0x6c68('0x22')](removeEntity(_0x4c3895,null))[_0x6c68('0x48')](handleError(_0x4c3895,null));}; \ No newline at end of file +var _0x2209=['ioredis','../../components/auth/service','../../components/parsers/qs','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','status','json','limit','count','set','Content-Range','apply','reject','save','update','then','get','ChanSpies','UserProfileResource','end','sendStatus','error','stack','name','send','map','VoiceChanSpy','rawAttributes','type','key','keys','query','filters','intersection','model','fields','attributes','nolimit','offset','order','sort','pick','filter','where','VIRTUAL','options','include','findAll','rows','catch','params','length','includeAll','merge','find','create','body','user','role','UserProfileSection','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','bluebird','util','path','sox','to-csv','ejs','fs-extra','lodash','squel','crypto','desk.js','papaparse'];(function(_0x413766,_0x501853){var _0x5ebf93=function(_0x4698c4){while(--_0x4698c4){_0x413766['push'](_0x413766['shift']());}};_0x5ebf93(++_0x501853);}(_0x2209,0x95));var _0x9220=function(_0x439bda,_0x4f26c1){_0x439bda=_0x439bda-0x0;var _0x571e00=_0x2209[_0x439bda];return _0x571e00;};'use strict';var emlformat=require(_0x9220('0x0'));var rimraf=require(_0x9220('0x1'));var zipdir=require(_0x9220('0x2'));var jsonpatch=require(_0x9220('0x3'));var rp=require(_0x9220('0x4'));var moment=require('moment');var BPromise=require(_0x9220('0x5'));var Mustache=require('mustache');var util=require(_0x9220('0x6'));var path=require(_0x9220('0x7'));var sox=require(_0x9220('0x8'));var csv=require(_0x9220('0x9'));var ejs=require(_0x9220('0xa'));var fs=require('fs');var fs_extra=require(_0x9220('0xb'));var _=require(_0x9220('0xc'));var squel=require(_0x9220('0xd'));var crypto=require(_0x9220('0xe'));var jsforce=require('jsforce');var deskjs=require(_0x9220('0xf'));var toCsv=require(_0x9220('0x9'));var querystring=require('querystring');var Papa=require(_0x9220('0x10'));var Redis=require(_0x9220('0x11'));var authService=require(_0x9220('0x12'));var qs=require(_0x9220('0x13'));var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0x9220('0x14'));var logger=require(_0x9220('0x15'))(_0x9220('0x16'));var utils=require(_0x9220('0x17'));var config=require(_0x9220('0x18'));var licenseUtil=require(_0x9220('0x19'));var db=require(_0x9220('0x1a'))['db'];function respondWithStatusCode(_0x2d65d4,_0x4c58e9){_0x4c58e9=_0x4c58e9||0xcc;return function(_0x2cbe2a){if(_0x2cbe2a){return _0x2d65d4['sendStatus'](_0x4c58e9);}return _0x2d65d4[_0x9220('0x1b')](_0x4c58e9)['end']();};}function respondWithResult(_0x6c9ba4,_0x4d8bf1){_0x4d8bf1=_0x4d8bf1||0xc8;return function(_0xa13cd){if(_0xa13cd){return _0x6c9ba4[_0x9220('0x1b')](_0x4d8bf1)[_0x9220('0x1c')](_0xa13cd);}};}function respondWithFilteredResult(_0x1f7bf7,_0x493744){return function(_0x3fe2c1){if(_0x3fe2c1){var _0x1f484b=typeof _0x493744['offset']==='undefined'&&typeof _0x493744[_0x9220('0x1d')]==='undefined';var _0x388089=_0x3fe2c1[_0x9220('0x1e')];var _0x44713f=_0x1f484b?0x0:_0x493744['offset'];var _0x4a9507=_0x1f484b?_0x3fe2c1[_0x9220('0x1e')]:_0x493744['offset']+_0x493744[_0x9220('0x1d')];var _0x558c28;if(_0x4a9507>=_0x388089){_0x4a9507=_0x388089;_0x558c28=0xc8;}else{_0x558c28=0xce;}_0x1f7bf7['status'](_0x558c28);return _0x1f7bf7[_0x9220('0x1f')](_0x9220('0x20'),_0x44713f+'-'+_0x4a9507+'/'+_0x388089)[_0x9220('0x1c')](_0x3fe2c1);}return null;};}function patchUpdates(_0x16626d){return function(_0x2ded94){try{jsonpatch[_0x9220('0x21')](_0x2ded94,_0x16626d,!![]);}catch(_0x3c13b1){return BPromise[_0x9220('0x22')](_0x3c13b1);}return _0x2ded94[_0x9220('0x23')]();};}function saveUpdates(_0x9d19fe,_0x462798){return function(_0x2eb9f3){if(_0x2eb9f3){return _0x2eb9f3[_0x9220('0x24')](_0x9d19fe)['then'](function(_0x1cfabf){return _0x1cfabf;});}return null;};}function removeEntity(_0x379c1f,_0x48ee62){return function(_0xfde27f){if(_0xfde27f){return _0xfde27f['destroy']()[_0x9220('0x25')](function(){var _0x293b63=_0xfde27f[_0x9220('0x26')]({'plain':!![]});var _0x284ed7=_0x9220('0x27');return db[_0x9220('0x28')]['destroy']({'where':{'type':_0x284ed7,'resourceId':_0x293b63['id']}})[_0x9220('0x25')](function(){return _0xfde27f;});})[_0x9220('0x25')](function(){_0x379c1f[_0x9220('0x1b')](0xcc)[_0x9220('0x29')]();});}};}function handleEntityNotFound(_0x5594c8,_0x5e6918){return function(_0x330268){if(!_0x330268){_0x5594c8[_0x9220('0x2a')](0x194);}return _0x330268;};}function handleError(_0x173472,_0x5c001c){_0x5c001c=_0x5c001c||0x1f4;return function(_0x57bcb3){logger[_0x9220('0x2b')](_0x57bcb3[_0x9220('0x2c')]);if(_0x57bcb3['name']){delete _0x57bcb3[_0x9220('0x2d')];}_0x173472[_0x9220('0x1b')](_0x5c001c)[_0x9220('0x2e')](_0x57bcb3);};}exports['index']=function(_0x18bb7d,_0x21376b){var _0x1e23d1={},_0x3737f8={},_0x14fee4={'count':0x0,'rows':[]};var _0x107fcd=_[_0x9220('0x2f')](db[_0x9220('0x30')][_0x9220('0x31')],function(_0x3e6e91){return{'name':_0x3e6e91['fieldName'],'type':_0x3e6e91[_0x9220('0x32')][_0x9220('0x33')]};});_0x3737f8['model']=_['map'](_0x107fcd,_0x9220('0x2d'));_0x3737f8['query']=_[_0x9220('0x34')](_0x18bb7d[_0x9220('0x35')]);_0x3737f8[_0x9220('0x36')]=_[_0x9220('0x37')](_0x3737f8[_0x9220('0x38')],_0x3737f8[_0x9220('0x35')]);_0x1e23d1['attributes']=_[_0x9220('0x37')](_0x3737f8[_0x9220('0x38')],qs[_0x9220('0x39')](_0x18bb7d[_0x9220('0x35')][_0x9220('0x39')]));_0x1e23d1[_0x9220('0x3a')]=_0x1e23d1[_0x9220('0x3a')]['length']?_0x1e23d1['attributes']:_0x3737f8['model'];if(!_0x18bb7d[_0x9220('0x35')]['hasOwnProperty'](_0x9220('0x3b'))){_0x1e23d1[_0x9220('0x1d')]=qs[_0x9220('0x1d')](_0x18bb7d[_0x9220('0x35')]['limit']);_0x1e23d1[_0x9220('0x3c')]=qs[_0x9220('0x3c')](_0x18bb7d[_0x9220('0x35')][_0x9220('0x3c')]);}_0x1e23d1[_0x9220('0x3d')]=qs[_0x9220('0x3e')](_0x18bb7d[_0x9220('0x35')][_0x9220('0x3e')]);_0x1e23d1['where']=qs['filters'](_[_0x9220('0x3f')](_0x18bb7d[_0x9220('0x35')],_0x3737f8[_0x9220('0x36')]),_0x107fcd);if(_0x18bb7d[_0x9220('0x35')][_0x9220('0x40')]){_0x1e23d1['where']=_['merge'](_0x1e23d1[_0x9220('0x41')],{'$or':_[_0x9220('0x2f')](_0x107fcd,function(_0x4968d){if(_0x4968d[_0x9220('0x32')]!==_0x9220('0x42')){var _0x19fd74={};_0x19fd74[_0x4968d[_0x9220('0x2d')]]={'$like':'%'+_0x18bb7d[_0x9220('0x35')][_0x9220('0x40')]+'%'};return _0x19fd74;}})});}_0x1e23d1=_['merge']({},_0x1e23d1,_0x18bb7d[_0x9220('0x43')]);var _0x3d3410={'where':_0x1e23d1[_0x9220('0x41')]};return db['VoiceChanSpy'][_0x9220('0x1e')](_0x3d3410)[_0x9220('0x25')](function(_0x22169b){_0x14fee4[_0x9220('0x1e')]=_0x22169b;if(_0x18bb7d[_0x9220('0x35')]['includeAll']){_0x1e23d1[_0x9220('0x44')]=[{'all':!![]}];}return db[_0x9220('0x30')][_0x9220('0x45')](_0x1e23d1);})[_0x9220('0x25')](function(_0x1e8170){_0x14fee4[_0x9220('0x46')]=_0x1e8170;return _0x14fee4;})[_0x9220('0x25')](respondWithFilteredResult(_0x21376b,_0x1e23d1))[_0x9220('0x47')](handleError(_0x21376b,null));};exports['show']=function(_0x1ac4c5,_0x3510b3){var _0x5acf51={'raw':![],'where':{'id':_0x1ac4c5[_0x9220('0x48')]['id']}},_0x241cbe={};_0x241cbe[_0x9220('0x38')]=_['keys'](db[_0x9220('0x30')]['rawAttributes']);_0x241cbe[_0x9220('0x35')]=_[_0x9220('0x34')](_0x1ac4c5[_0x9220('0x35')]);_0x241cbe[_0x9220('0x36')]=_[_0x9220('0x37')](_0x241cbe[_0x9220('0x38')],_0x241cbe[_0x9220('0x35')]);_0x5acf51[_0x9220('0x3a')]=_[_0x9220('0x37')](_0x241cbe['model'],qs[_0x9220('0x39')](_0x1ac4c5[_0x9220('0x35')][_0x9220('0x39')]));_0x5acf51[_0x9220('0x3a')]=_0x5acf51[_0x9220('0x3a')][_0x9220('0x49')]?_0x5acf51['attributes']:_0x241cbe[_0x9220('0x38')];if(_0x1ac4c5[_0x9220('0x35')][_0x9220('0x4a')]){_0x5acf51[_0x9220('0x44')]=[{'all':!![]}];}_0x5acf51=_[_0x9220('0x4b')]({},_0x5acf51,_0x1ac4c5[_0x9220('0x43')]);return db[_0x9220('0x30')][_0x9220('0x4c')](_0x5acf51)[_0x9220('0x25')](handleEntityNotFound(_0x3510b3,null))[_0x9220('0x25')](respondWithResult(_0x3510b3,null))[_0x9220('0x47')](handleError(_0x3510b3,null));};exports[_0x9220('0x4d')]=function(_0x3ed09b,_0x26f07b){return db['VoiceChanSpy'][_0x9220('0x4d')](_0x3ed09b[_0x9220('0x4e')],{})['then'](function(_0x13f378){var _0x125dea=_0x3ed09b[_0x9220('0x4f')][_0x9220('0x26')]({'plain':!![]});if(!_0x125dea)throw new Error('Unable\x20to\x20retrieve\x20the\x20current\x20user');if(_0x125dea[_0x9220('0x50')]==='user'){var _0x174464=_0x13f378[_0x9220('0x26')]({'plain':!![]});var _0xf6934f=_0x9220('0x27');return db[_0x9220('0x51')]['find']({'where':{'name':_0xf6934f,'userProfileId':_0x125dea['userProfileId']},'raw':!![]})[_0x9220('0x25')](function(_0x39a832){if(_0x39a832&&_0x39a832['autoAssociation']===0x0){return db[_0x9220('0x28')]['create']({'name':_0x174464['name'],'resourceId':_0x174464['id'],'type':_0x39a832[_0x9220('0x2d')],'sectionId':_0x39a832['id']},{})['then'](function(){return _0x13f378;});}else{return _0x13f378;}})[_0x9220('0x47')](function(_0x1c89cd){logger[_0x9220('0x2b')](_0x9220('0x52'),_0x1c89cd);throw _0x1c89cd;});}return _0x13f378;})['then'](respondWithResult(_0x26f07b,0xc9))[_0x9220('0x47')](handleError(_0x26f07b,null));};exports[_0x9220('0x24')]=function(_0x47dd12,_0x2e397e){if(_0x47dd12['body']['id']){delete _0x47dd12['body']['id'];}return db['VoiceChanSpy'][_0x9220('0x4c')]({'where':{'id':_0x47dd12[_0x9220('0x48')]['id']}})[_0x9220('0x25')](handleEntityNotFound(_0x2e397e,null))[_0x9220('0x25')](saveUpdates(_0x47dd12[_0x9220('0x4e')],null))['then'](respondWithResult(_0x2e397e,null))['catch'](handleError(_0x2e397e,null));};exports['destroy']=function(_0x295f0f,_0x1c5e00){return db[_0x9220('0x30')][_0x9220('0x4c')]({'where':{'id':_0x295f0f['params']['id']}})[_0x9220('0x25')](handleEntityNotFound(_0x1c5e00,null))[_0x9220('0x25')](removeEntity(_0x1c5e00,null))[_0x9220('0x47')](handleError(_0x1c5e00,null));}; \ No newline at end of file diff --git a/server/api/voiceChanSpy/voiceChanSpy.model.js b/server/api/voiceChanSpy/voiceChanSpy.model.js index 3c16a52..e4ff2e4 100644 --- a/server/api/voiceChanSpy/voiceChanSpy.model.js +++ b/server/api/voiceChanSpy/voiceChanSpy.model.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x4b80=['voice_chanspy','length','VoiceExtension','bulkCreate','destroy','lodash','util','bluebird','./voiceChanSpy.attributes','context','from-sip','prefix','system','push','merge','Set','CDR(type)=%s','chanspy','MixMonitor','format','recordingFormat','Authenticate','password','SIP/%s,%s','name','join','StopMixMonitor','concat','internal','User','findAll','agent','then','catch','exports','models'];(function(_0x4ae6ef,_0xc2af80){var _0x3cbb4e=function(_0x569ad5){while(--_0x569ad5){_0x4ae6ef['push'](_0x4ae6ef['shift']());}};_0x3cbb4e(++_0xc2af80);}(_0x4b80,0x125));var _0x04b8=function(_0x468087,_0x3d8d0c){_0x468087=_0x468087-0x0;var _0x52ef75=_0x4b80[_0x468087];return _0x52ef75;};'use strict';var _=require(_0x04b8('0x0'));var util=require(_0x04b8('0x1'));var BPromise=require(_0x04b8('0x2'));var attributes=require(_0x04b8('0x3'));var getUserApplications=function(_0x3086c0,_0x294768,_0x1e8255){var _0x310ece=0x1;var _0x236699=[];var _0x4bbeb4={'context':_0x294768[_0x04b8('0x4')]||_0x04b8('0x5'),'exten':util['format']('%s%s',_0x3086c0[_0x04b8('0x6')],_0x1e8255),'type':_0x04b8('0x7'),'isApp':![],'ChanSpyId':_0x3086c0['id'],'UserId':_0x294768['id']};_0x236699[_0x04b8('0x8')](_[_0x04b8('0x9')]({'app':_0x04b8('0xa'),'appdata':util['format'](_0x04b8('0xb'),_0x04b8('0xc')),'priority':_0x310ece++},_0x4bbeb4));if(_0x3086c0['record']){_0x236699[_0x04b8('0x8')](_[_0x04b8('0x9')]({'app':_0x04b8('0xd'),'appdata':util[_0x04b8('0xe')]('${UNIQUEID}.%s,a',_0x3086c0[_0x04b8('0xf')]),'priority':_0x310ece++},_0x4bbeb4));}if(_0x3086c0['auth']){_0x236699[_0x04b8('0x8')](_[_0x04b8('0x9')]({'app':_0x04b8('0x10'),'appdata':_0x3086c0[_0x04b8('0x11')],'priority':_0x310ece++},_0x4bbeb4));}_0x236699['push'](_[_0x04b8('0x9')]({'app':'ChanSpy','appdata':util[_0x04b8('0xe')](_0x04b8('0x12'),_0x294768[_0x04b8('0x13')],_0x3086c0['options']?_0x3086c0['options'][_0x04b8('0x14')](''):''),'priority':_0x310ece++},_0x4bbeb4));if(_0x3086c0['record']){_0x236699[_0x04b8('0x8')](_['merge']({'app':_0x04b8('0x15'),'priority':_0x310ece++},_0x4bbeb4));}return _0x236699;};var getChanSpyApplications=function(_0x462669,_0x2afd7a){var _0x4b8ca9=[];for(var _0x4ae6bf=0x0,_0xa97953=0x1;_0x4ae6bf<_0x2afd7a['length'];_0x4ae6bf++,_0xa97953=0x1){_0x4b8ca9=_0x4b8ca9[_0x04b8('0x16')](getUserApplications(_0x462669,_0x2afd7a[_0x4ae6bf],_0x2afd7a[_0x4ae6bf][_0x04b8('0x17')]));if(_0x2afd7a[_0x4ae6bf]['internal']!=_0x2afd7a[_0x4ae6bf][_0x04b8('0x13')]){_0x4b8ca9=_0x4b8ca9['concat'](getUserApplications(_0x462669,_0x2afd7a[_0x4ae6bf],_0x2afd7a[_0x4ae6bf][_0x04b8('0x13')]));}}return _0x4b8ca9;};var getChanSpyPromise=function(_0x416bda,_0x128440){return new BPromise(function(_0x539ff4,_0x6e647){return _0x416bda[_0x04b8('0x18')][_0x04b8('0x19')]({'attributes':['id','name',_0x04b8('0x17')],'where':{'role':_0x04b8('0x1a'),'chanspy':!![]},'raw':!![]})[_0x04b8('0x1b')](function(_0x3bb67){if(_0x3bb67){return _0x539ff4(getChanSpyApplications(_0x128440,_0x3bb67));}return _0x539ff4([]);})[_0x04b8('0x1c')](function(_0x57ae46){_0x6e647(_0x57ae46);});});};module[_0x04b8('0x1d')]=function(_0x3a9356,_0xe9ee64){var _0x10fb1e=_0x3a9356[_0x04b8('0x1e')];return _0x3a9356['define']('VoiceChanSpy',attributes,{'tableName':_0x04b8('0x1f'),'paranoid':![],'indexes':[],'timestamps':!![],'hooks':{'afterCreate':function(_0x5ae08d,_0x33f5dd,_0x4c6531){return getChanSpyPromise(_0x10fb1e,_0x5ae08d)[_0x04b8('0x1b')](function(_0x1115bd){if(_0x1115bd&&_0x1115bd[_0x04b8('0x20')]){return _0x10fb1e[_0x04b8('0x21')][_0x04b8('0x22')](_0x1115bd);}})['then'](function(){_0x4c6531();})['catch'](function(_0x3974fe){_0x4c6531(_0x3974fe);});},'afterUpdate':function(_0x4d04ce,_0x3929e8,_0x19b363){return _0x10fb1e['VoiceExtension'][_0x04b8('0x23')]({'where':{'ChanSpyId':_0x4d04ce['id']}})[_0x04b8('0x1b')](function(){return getChanSpyPromise(_0x10fb1e,_0x4d04ce);})['then'](function(_0x209c30){if(_0x209c30&&_0x209c30[_0x04b8('0x20')]){return _0x10fb1e[_0x04b8('0x21')][_0x04b8('0x22')](_0x209c30);}})[_0x04b8('0x1b')](function(){_0x19b363();})[_0x04b8('0x1c')](function(_0x21f3b2){_0x19b363(_0x21f3b2);});},'afterDestroy':function(_0x5b27a1,_0x23baee,_0x4c04a5){return _0x10fb1e['VoiceExtension']['destroy']({'where':{'ChanSpyId':_0x5b27a1['id']}})[_0x04b8('0x1b')](function(){_0x4c04a5();})['catch'](function(_0x2f8358){_0x4c04a5(_0x2f8358);});}}});}; \ No newline at end of file +var _0x88e7=['findAll','exports','models','define','VoiceChanSpy','voice_chanspy','then','length','bulkCreate','catch','destroy','VoiceExtension','lodash','util','bluebird','./voiceChanSpy.attributes','context','from-sip','%s%s','prefix','system','push','Set','format','chanspy','record','merge','${UNIQUEID}.%s,a','auth','Authenticate','password','ChanSpy','SIP/%s,%s','name','join','StopMixMonitor','concat','internal','User'];(function(_0x72dcf5,_0x3cf4b3){var _0x27317c=function(_0x284563){while(--_0x284563){_0x72dcf5['push'](_0x72dcf5['shift']());}};_0x27317c(++_0x3cf4b3);}(_0x88e7,0x144));var _0x788e=function(_0x178e48,_0x3c9509){_0x178e48=_0x178e48-0x0;var _0x440d7e=_0x88e7[_0x178e48];return _0x440d7e;};'use strict';var _=require(_0x788e('0x0'));var util=require(_0x788e('0x1'));var BPromise=require(_0x788e('0x2'));var attributes=require(_0x788e('0x3'));var getUserApplications=function(_0x46c08c,_0x524131,_0x1b4749){var _0x5b5d8a=0x1;var _0x274503=[];var _0x5ab63a={'context':_0x524131[_0x788e('0x4')]||_0x788e('0x5'),'exten':util['format'](_0x788e('0x6'),_0x46c08c[_0x788e('0x7')],_0x1b4749),'type':_0x788e('0x8'),'isApp':![],'ChanSpyId':_0x46c08c['id'],'UserId':_0x524131['id']};_0x274503[_0x788e('0x9')](_['merge']({'app':_0x788e('0xa'),'appdata':util[_0x788e('0xb')]('CDR(type)=%s',_0x788e('0xc')),'priority':_0x5b5d8a++},_0x5ab63a));if(_0x46c08c[_0x788e('0xd')]){_0x274503[_0x788e('0x9')](_[_0x788e('0xe')]({'app':'MixMonitor','appdata':util['format'](_0x788e('0xf'),_0x46c08c['recordingFormat']),'priority':_0x5b5d8a++},_0x5ab63a));}if(_0x46c08c[_0x788e('0x10')]){_0x274503[_0x788e('0x9')](_['merge']({'app':_0x788e('0x11'),'appdata':_0x46c08c[_0x788e('0x12')],'priority':_0x5b5d8a++},_0x5ab63a));}_0x274503[_0x788e('0x9')](_['merge']({'app':_0x788e('0x13'),'appdata':util[_0x788e('0xb')](_0x788e('0x14'),_0x524131[_0x788e('0x15')],_0x46c08c['options']?_0x46c08c['options'][_0x788e('0x16')](''):''),'priority':_0x5b5d8a++},_0x5ab63a));if(_0x46c08c['record']){_0x274503[_0x788e('0x9')](_[_0x788e('0xe')]({'app':_0x788e('0x17'),'priority':_0x5b5d8a++},_0x5ab63a));}return _0x274503;};var getChanSpyApplications=function(_0xe7de27,_0x135680){var _0x2d297b=[];for(var _0xd3cc29=0x0,_0x463581=0x1;_0xd3cc29<_0x135680['length'];_0xd3cc29++,_0x463581=0x1){_0x2d297b=_0x2d297b[_0x788e('0x18')](getUserApplications(_0xe7de27,_0x135680[_0xd3cc29],_0x135680[_0xd3cc29]['internal']));if(_0x135680[_0xd3cc29][_0x788e('0x19')]!=_0x135680[_0xd3cc29]['name']){_0x2d297b=_0x2d297b[_0x788e('0x18')](getUserApplications(_0xe7de27,_0x135680[_0xd3cc29],_0x135680[_0xd3cc29][_0x788e('0x15')]));}}return _0x2d297b;};var getChanSpyPromise=function(_0x41ba8b,_0x4e3ede){return new BPromise(function(_0x48b32b,_0x4eb1ad){return _0x41ba8b[_0x788e('0x1a')][_0x788e('0x1b')]({'attributes':['id',_0x788e('0x15'),_0x788e('0x19')],'where':{'role':'agent','chanspy':!![]},'raw':!![]})['then'](function(_0x5b3309){if(_0x5b3309){return _0x48b32b(getChanSpyApplications(_0x4e3ede,_0x5b3309));}return _0x48b32b([]);})['catch'](function(_0xda4b64){_0x4eb1ad(_0xda4b64);});});};module[_0x788e('0x1c')]=function(_0x589a5c,_0x344d3f){var _0x1411c1=_0x589a5c[_0x788e('0x1d')];return _0x589a5c[_0x788e('0x1e')](_0x788e('0x1f'),attributes,{'tableName':_0x788e('0x20'),'paranoid':![],'indexes':[],'timestamps':!![],'hooks':{'afterCreate':function(_0xc5a81e,_0x3bacf4,_0x26d65b){return getChanSpyPromise(_0x1411c1,_0xc5a81e)[_0x788e('0x21')](function(_0x4cf7d5){if(_0x4cf7d5&&_0x4cf7d5[_0x788e('0x22')]){return _0x1411c1['VoiceExtension'][_0x788e('0x23')](_0x4cf7d5);}})[_0x788e('0x21')](function(){_0x26d65b();})[_0x788e('0x24')](function(_0x567df7){_0x26d65b(_0x567df7);});},'afterUpdate':function(_0x32a9b9,_0x69a9bf,_0x3acf5f){return _0x1411c1['VoiceExtension'][_0x788e('0x25')]({'where':{'ChanSpyId':_0x32a9b9['id']}})[_0x788e('0x21')](function(){return getChanSpyPromise(_0x1411c1,_0x32a9b9);})[_0x788e('0x21')](function(_0x31733a){if(_0x31733a&&_0x31733a['length']){return _0x1411c1[_0x788e('0x26')][_0x788e('0x23')](_0x31733a);}})[_0x788e('0x21')](function(){_0x3acf5f();})[_0x788e('0x24')](function(_0x88efd2){_0x3acf5f(_0x88efd2);});},'afterDestroy':function(_0x186a3a,_0x66da0,_0x561324){return _0x1411c1[_0x788e('0x26')]['destroy']({'where':{'ChanSpyId':_0x186a3a['id']}})[_0x788e('0x21')](function(){_0x561324();})[_0x788e('0x24')](function(_0x5c7b28){_0x561324(_0x5c7b28);});}}});}; \ No newline at end of file diff --git a/server/api/voiceChanSpy/voiceChanSpy.rpc.js b/server/api/voiceChanSpy/voiceChanSpy.rpc.js index fdd6c1f..b5ee1cf 100644 --- a/server/api/voiceChanSpy/voiceChanSpy.rpc.js +++ b/server/api/voiceChanSpy/voiceChanSpy.rpc.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xb332=['ioredis','../../config/utils','rpc','jayson/promise','client','http','request','then','info','request\x20sent','debug','VoiceChanSpy,\x20%s,\x20%s,\x20%s','stringify','error','code','VoiceChanSpy,\x20%s,\x20%s','message','result','catch','lodash','moment','bluebird'];(function(_0x209941,_0x5c9988){var _0x1e8729=function(_0x51a9b8){while(--_0x51a9b8){_0x209941['push'](_0x209941['shift']());}};_0x1e8729(++_0x5c9988);}(_0xb332,0xd9));var _0x2b33=function(_0x2f2360,_0x151089){_0x2f2360=_0x2f2360-0x0;var _0x1cc8d3=_0xb332[_0x2f2360];return _0x1cc8d3;};'use strict';var _=require(_0x2b33('0x0'));var util=require('util');var moment=require(_0x2b33('0x1'));var BPromise=require(_0x2b33('0x2'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x2b33('0x3'));var db=require('../../mysqldb')['db'];var utils=require(_0x2b33('0x4'));var logger=require('../../config/logger')(_0x2b33('0x5'));var config=require('../../config/environment');var jayson=require(_0x2b33('0x6'));var client=jayson[_0x2b33('0x7')][_0x2b33('0x8')]({'port':0x232a});function respondWithRpcPromise(_0x461d44,_0x5a7a3f,_0x5ccf2d){return new BPromise(function(_0x4302b7,_0x5f29ab){return client[_0x2b33('0x9')](_0x461d44,_0x5ccf2d)[_0x2b33('0xa')](function(_0x2f2cb3){logger[_0x2b33('0xb')]('VoiceChanSpy,\x20%s,\x20%s',_0x5a7a3f,_0x2b33('0xc'));logger[_0x2b33('0xd')](_0x2b33('0xe'),_0x5a7a3f,_0x2b33('0xc'),JSON[_0x2b33('0xf')](_0x2f2cb3));if(_0x2f2cb3[_0x2b33('0x10')]){if(_0x2f2cb3[_0x2b33('0x10')][_0x2b33('0x11')]===0x1f4){logger[_0x2b33('0x10')](_0x2b33('0x12'),_0x5a7a3f,_0x2f2cb3[_0x2b33('0x10')]['message']);return _0x5f29ab(_0x2f2cb3[_0x2b33('0x10')][_0x2b33('0x13')]);}logger[_0x2b33('0x10')]('VoiceChanSpy,\x20%s,\x20%s',_0x5a7a3f,_0x2f2cb3[_0x2b33('0x10')]['message']);return _0x4302b7(_0x2f2cb3[_0x2b33('0x10')][_0x2b33('0x13')]);}else{logger[_0x2b33('0xb')]('VoiceChanSpy,\x20%s,\x20%s',_0x5a7a3f,'request\x20sent');_0x4302b7(_0x2f2cb3[_0x2b33('0x14')][_0x2b33('0x13')]);}})[_0x2b33('0x15')](function(_0x2f5119){logger[_0x2b33('0x10')]('VoiceChanSpy,\x20%s,\x20%s',_0x5a7a3f,_0x2f5119);_0x5f29ab(_0x2f5119);});});} \ No newline at end of file +var _0x8130=['stringify','error','code','message','result','catch','lodash','util','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','../../config/environment','http','request','info','VoiceChanSpy,\x20%s,\x20%s','VoiceChanSpy,\x20%s,\x20%s,\x20%s'];(function(_0x515702,_0x461650){var _0x84d4f0=function(_0x525a82){while(--_0x525a82){_0x515702['push'](_0x515702['shift']());}};_0x84d4f0(++_0x461650);}(_0x8130,0x146));var _0x0813=function(_0x599616,_0x3e477f){_0x599616=_0x599616-0x0;var _0x2c8af9=_0x8130[_0x599616];return _0x2c8af9;};'use strict';var _=require(_0x0813('0x0'));var util=require(_0x0813('0x1'));var moment=require('moment');var BPromise=require(_0x0813('0x2'));var rs=require(_0x0813('0x3'));var fs=require('fs');var Redis=require(_0x0813('0x4'));var db=require(_0x0813('0x5'))['db'];var utils=require(_0x0813('0x6'));var logger=require(_0x0813('0x7'))('rpc');var config=require(_0x0813('0x8'));var jayson=require('jayson/promise');var client=jayson['client'][_0x0813('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x2df45a,_0x2bbdfd,_0x19a508){return new BPromise(function(_0x2ab8f0,_0x115a90){return client[_0x0813('0xa')](_0x2df45a,_0x19a508)['then'](function(_0x44ec2c){logger[_0x0813('0xb')](_0x0813('0xc'),_0x2bbdfd,'request\x20sent');logger['debug'](_0x0813('0xd'),_0x2bbdfd,'request\x20sent',JSON[_0x0813('0xe')](_0x44ec2c));if(_0x44ec2c['error']){if(_0x44ec2c[_0x0813('0xf')][_0x0813('0x10')]===0x1f4){logger[_0x0813('0xf')](_0x0813('0xc'),_0x2bbdfd,_0x44ec2c['error']['message']);return _0x115a90(_0x44ec2c[_0x0813('0xf')][_0x0813('0x11')]);}logger['error'](_0x0813('0xc'),_0x2bbdfd,_0x44ec2c['error']['message']);return _0x2ab8f0(_0x44ec2c[_0x0813('0xf')][_0x0813('0x11')]);}else{logger['info'](_0x0813('0xc'),_0x2bbdfd,'request\x20sent');_0x2ab8f0(_0x44ec2c[_0x0813('0x12')][_0x0813('0x11')]);}})[_0x0813('0x13')](function(_0xee126d){logger[_0x0813('0xf')](_0x0813('0xc'),_0x2bbdfd,_0xee126d);_0x115a90(_0xee126d);});});} \ No newline at end of file diff --git a/server/api/voiceContext/index.js b/server/api/voiceContext/index.js index 27072fc..8a688b5 100644 --- a/server/api/voiceContext/index.js +++ b/server/api/voiceContext/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x09a7=['isAuthenticated','get','/:id','post','create','update','delete','multer','path','connect-timeout','express','Router','fs-extra','../../components/auth/service','../../config/environment','./voiceContext.controller'];(function(_0xcbb7fd,_0x3eba6d){var _0x5e3fb4=function(_0x98118){while(--_0x98118){_0xcbb7fd['push'](_0xcbb7fd['shift']());}};_0x5e3fb4(++_0x3eba6d);}(_0x09a7,0x127));var _0x709a=function(_0x2fecf2,_0xc78dec){_0x2fecf2=_0x2fecf2-0x0;var _0x49cb93=_0x09a7[_0x2fecf2];return _0x49cb93;};'use strict';var multer=require(_0x709a('0x0'));var util=require('util');var path=require(_0x709a('0x1'));var timeout=require(_0x709a('0x2'));var express=require(_0x709a('0x3'));var router=express[_0x709a('0x4')]();var fs_extra=require(_0x709a('0x5'));var auth=require(_0x709a('0x6'));var interaction=require('../../components/interaction/service');var config=require(_0x709a('0x7'));var controller=require(_0x709a('0x8'));router['get']('/',auth[_0x709a('0x9')](),controller['index']);router[_0x709a('0xa')](_0x709a('0xb'),auth['isAuthenticated'](),controller['show']);router[_0x709a('0xc')]('/',auth['isAuthenticated'](),controller[_0x709a('0xd')]);router['put'](_0x709a('0xb'),auth[_0x709a('0x9')](),controller[_0x709a('0xe')]);router[_0x709a('0xf')](_0x709a('0xb'),auth[_0x709a('0x9')](),controller['destroy']);module['exports']=router; \ No newline at end of file +var _0x73f5=['show','post','create','put','/:id','update','util','path','connect-timeout','Router','fs-extra','../../components/auth/service','./voiceContext.controller','isAuthenticated','index'];(function(_0x34af74,_0x59ab9d){var _0x12d74b=function(_0x51a854){while(--_0x51a854){_0x34af74['push'](_0x34af74['shift']());}};_0x12d74b(++_0x59ab9d);}(_0x73f5,0xd8));var _0x573f=function(_0x3fc00b,_0x46f56e){_0x3fc00b=_0x3fc00b-0x0;var _0x20f84b=_0x73f5[_0x3fc00b];return _0x20f84b;};'use strict';var multer=require('multer');var util=require(_0x573f('0x0'));var path=require(_0x573f('0x1'));var timeout=require(_0x573f('0x2'));var express=require('express');var router=express[_0x573f('0x3')]();var fs_extra=require(_0x573f('0x4'));var auth=require(_0x573f('0x5'));var interaction=require('../../components/interaction/service');var config=require('../../config/environment');var controller=require(_0x573f('0x6'));router['get']('/',auth[_0x573f('0x7')](),controller[_0x573f('0x8')]);router['get']('/:id',auth['isAuthenticated'](),controller[_0x573f('0x9')]);router[_0x573f('0xa')]('/',auth[_0x573f('0x7')](),controller[_0x573f('0xb')]);router[_0x573f('0xc')](_0x573f('0xd'),auth[_0x573f('0x7')](),controller[_0x573f('0xe')]);router['delete'](_0x573f('0xd'),auth[_0x573f('0x7')](),controller['destroy']);module['exports']=router; \ No newline at end of file diff --git a/server/api/voiceContext/voiceContext.attributes.js b/server/api/voiceContext/voiceContext.attributes.js index 23d4762..6000f31 100644 --- a/server/api/voiceContext/voiceContext.attributes.js +++ b/server/api/voiceContext/voiceContext.attributes.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xf189=['exports','STRING','name'];(function(_0x3ab377,_0xecf4fa){var _0x2db1a7=function(_0x1c925d){while(--_0x1c925d){_0x3ab377['push'](_0x3ab377['shift']());}};_0x2db1a7(++_0xecf4fa);}(_0xf189,0x1e6));var _0x9f18=function(_0x19e35c,_0x29cd1e){_0x19e35c=_0x19e35c-0x0;var _0x3e1fe8=_0xf189[_0x19e35c];return _0x3e1fe8;};'use strict';var Sequelize=require('sequelize');module[_0x9f18('0x0')]={'name':{'type':Sequelize[_0x9f18('0x1')],'unique':_0x9f18('0x2')},'description':{'type':Sequelize['STRING'],'allowNull':!![]},'defaultEntry':{'type':Sequelize['BOOLEAN'],'defaultValue':0x0}}; \ No newline at end of file +var _0xa5a3=['STRING','name','sequelize','exports'];(function(_0x5cd376,_0x163789){var _0x57de74=function(_0x3e56c9){while(--_0x3e56c9){_0x5cd376['push'](_0x5cd376['shift']());}};_0x57de74(++_0x163789);}(_0xa5a3,0x166));var _0x3a5a=function(_0x618414,_0x1a7a60){_0x618414=_0x618414-0x0;var _0x21c19a=_0xa5a3[_0x618414];return _0x21c19a;};'use strict';var Sequelize=require(_0x3a5a('0x0'));module[_0x3a5a('0x1')]={'name':{'type':Sequelize[_0x3a5a('0x2')],'unique':_0x3a5a('0x3')},'description':{'type':Sequelize[_0x3a5a('0x2')],'allowNull':!![]},'defaultEntry':{'type':Sequelize['BOOLEAN'],'defaultValue':0x0}}; \ No newline at end of file diff --git a/server/api/voiceContext/voiceContext.controller.js b/server/api/voiceContext/voiceContext.controller.js index 5822a1f..962191e 100644 --- a/server/api/voiceContext/voiceContext.controller.js +++ b/server/api/voiceContext/voiceContext.controller.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x62ac=['sort','where','pick','filter','merge','VIRTUAL','options','findAll','rows','show','params','keys','includeAll','include','create','readFileSync','join','root','server/files/templates/context.ejs','utf8','render','writeFileSync','/etc/asterisk/extensions_xcally_contexts.conf','Reload','chan_sip.so','user','get','UserProfileSection','find','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','eml-format','rimraf','request-promise','moment','bluebird','mustache','util','to-csv','ejs','fs-extra','squel','crypto','jsforce','desk.js','querystring','api','../../config/utils','../../config/environment','jayson/promise','client','http','then','info','VoiceContext,\x20%s,\x20%s','debug','request\x20sent','stringify','error','message','result','catch','sendStatus','end','status','undefined','limit','count','offset','set','json','reject','update','destroy','Contexts','UserProfileResource','name','send','index','map','VoiceContext','rawAttributes','fieldName','type','key','model','filters','intersection','query','attributes','fields','length','hasOwnProperty','nolimit','order'];(function(_0x38ae4f,_0x1d3180){var _0x1e92db=function(_0x1a1cb9){while(--_0x1a1cb9){_0x38ae4f['push'](_0x38ae4f['shift']());}};_0x1e92db(++_0x1d3180);}(_0x62ac,0x196));var _0xc62a=function(_0x5b685e,_0x3e69ad){_0x5b685e=_0x5b685e-0x0;var _0x9a0173=_0x62ac[_0x5b685e];return _0x9a0173;};'use strict';var emlformat=require(_0xc62a('0x0'));var rimraf=require(_0xc62a('0x1'));var zipdir=require('zip-dir');var jsonpatch=require('fast-json-patch');var rp=require(_0xc62a('0x2'));var moment=require(_0xc62a('0x3'));var BPromise=require(_0xc62a('0x4'));var Mustache=require(_0xc62a('0x5'));var util=require(_0xc62a('0x6'));var path=require('path');var sox=require('sox');var csv=require(_0xc62a('0x7'));var ejs=require(_0xc62a('0x8'));var fs=require('fs');var fs_extra=require(_0xc62a('0x9'));var _=require('lodash');var squel=require(_0xc62a('0xa'));var crypto=require(_0xc62a('0xb'));var jsforce=require(_0xc62a('0xc'));var deskjs=require(_0xc62a('0xd'));var toCsv=require(_0xc62a('0x7'));var querystring=require(_0xc62a('0xe'));var Papa=require('papaparse');var Redis=require('ioredis');var authService=require('../../components/auth/service');var qs=require('../../components/parsers/qs');var as=require('../../components/parsers/advancedSearch');var hardwareService=require('../../config/license/hardware');var logger=require('../../config/logger')(_0xc62a('0xf'));var utils=require(_0xc62a('0x10'));var config=require(_0xc62a('0x11'));var licenseUtil=require('../../config/license/util');var db=require('../../mysqldb')['db'];var jayson=require(_0xc62a('0x12'));var client=jayson[_0xc62a('0x13')][_0xc62a('0x14')]({'port':0x232a});function respondWithRpcPromise(_0x280974,_0x13d199,_0x1d3b84,_0x240d29){return new BPromise(function(_0x316b3f,_0x2430dc){var _0x4f5008=_0x240d29||client;return _0x4f5008['request'](_0x280974,_0x1d3b84)[_0xc62a('0x15')](function(_0x3a0591){logger[_0xc62a('0x16')](_0xc62a('0x17'),_0x13d199,'request\x20sent');logger[_0xc62a('0x18')]('VoiceContext,\x20%s,\x20%s,\x20%s',_0x13d199,_0xc62a('0x19'),JSON[_0xc62a('0x1a')](_0x3a0591));if(_0x3a0591[_0xc62a('0x1b')]){if(_0x3a0591[_0xc62a('0x1b')]['code']===0x1f4){logger[_0xc62a('0x1b')](_0xc62a('0x17'),_0x13d199,_0x3a0591[_0xc62a('0x1b')]['message']);return _0x2430dc(_0x3a0591[_0xc62a('0x1b')][_0xc62a('0x1c')]);}logger['error'](_0xc62a('0x17'),_0x13d199,_0x3a0591[_0xc62a('0x1b')][_0xc62a('0x1c')]);return _0x316b3f(_0x3a0591['error'][_0xc62a('0x1c')]);}else{logger[_0xc62a('0x16')](_0xc62a('0x17'),_0x13d199,_0xc62a('0x19'));_0x316b3f(_0x3a0591[_0xc62a('0x1d')]['message']);}})[_0xc62a('0x1e')](function(_0x47a918){logger[_0xc62a('0x1b')](_0xc62a('0x17'),_0x13d199,_0x47a918);_0x2430dc(_0x47a918);});});}function respondWithStatusCode(_0x327b29,_0x25e512){_0x25e512=_0x25e512||0xcc;return function(_0x4c3112){if(_0x4c3112){return _0x327b29[_0xc62a('0x1f')](_0x25e512);}return _0x327b29['status'](_0x25e512)[_0xc62a('0x20')]();};}function respondWithResult(_0x10d38a,_0x407e07){_0x407e07=_0x407e07||0xc8;return function(_0x5c9a5a){if(_0x5c9a5a){return _0x10d38a[_0xc62a('0x21')](_0x407e07)['json'](_0x5c9a5a);}};}function respondWithFilteredResult(_0x18163d,_0x6fa398){return function(_0x155276){if(_0x155276){var _0x4f8759=typeof _0x6fa398['offset']===_0xc62a('0x22')&&typeof _0x6fa398[_0xc62a('0x23')]===_0xc62a('0x22');var _0x3e3493=_0x155276[_0xc62a('0x24')];var _0x29096a=_0x4f8759?0x0:_0x6fa398[_0xc62a('0x25')];var _0xd005c4=_0x4f8759?_0x155276[_0xc62a('0x24')]:_0x6fa398[_0xc62a('0x25')]+_0x6fa398[_0xc62a('0x23')];var _0x3ffb2e;if(_0xd005c4>=_0x3e3493){_0xd005c4=_0x3e3493;_0x3ffb2e=0xc8;}else{_0x3ffb2e=0xce;}_0x18163d[_0xc62a('0x21')](_0x3ffb2e);return _0x18163d[_0xc62a('0x26')]('Content-Range',_0x29096a+'-'+_0xd005c4+'/'+_0x3e3493)[_0xc62a('0x27')](_0x155276);}return null;};}function patchUpdates(_0x791159){return function(_0x4c8ff5){try{jsonpatch['apply'](_0x4c8ff5,_0x791159,!![]);}catch(_0x458650){return BPromise[_0xc62a('0x28')](_0x458650);}return _0x4c8ff5['save']();};}function saveUpdates(_0x1071fd,_0x489787){return function(_0x16a5a6){if(_0x16a5a6){return _0x16a5a6[_0xc62a('0x29')](_0x1071fd)[_0xc62a('0x15')](function(_0x184e4d){return _0x184e4d;});}return null;};}function removeEntity(_0x1b86d3,_0x4c6f3f){return function(_0x3fe6ef){if(_0x3fe6ef){return _0x3fe6ef[_0xc62a('0x2a')]()['then'](function(){var _0x228e57=_0x3fe6ef['get']({'plain':!![]});var _0x423db5=_0xc62a('0x2b');return db[_0xc62a('0x2c')][_0xc62a('0x2a')]({'where':{'type':_0x423db5,'resourceId':_0x228e57['id']}})[_0xc62a('0x15')](function(){return _0x3fe6ef;});})['then'](function(){_0x1b86d3[_0xc62a('0x21')](0xcc)[_0xc62a('0x20')]();});}};}function handleEntityNotFound(_0x2bc10b,_0x3b6af7){return function(_0x523231){if(!_0x523231){_0x2bc10b[_0xc62a('0x1f')](0x194);}return _0x523231;};}function handleError(_0x32e24c,_0x132c7b){_0x132c7b=_0x132c7b||0x1f4;return function(_0x450fc9){logger[_0xc62a('0x1b')](_0x450fc9['stack']);if(_0x450fc9[_0xc62a('0x2d')]){delete _0x450fc9[_0xc62a('0x2d')];}_0x32e24c[_0xc62a('0x21')](_0x132c7b)[_0xc62a('0x2e')](_0x450fc9);};}exports[_0xc62a('0x2f')]=function(_0x49ede7,_0x2d3a32){var _0x4ac185={},_0x343abc={},_0x10920f={'count':0x0,'rows':[]};var _0x2be72d=_[_0xc62a('0x30')](db[_0xc62a('0x31')][_0xc62a('0x32')],function(_0x5bf4a1){return{'name':_0x5bf4a1[_0xc62a('0x33')],'type':_0x5bf4a1[_0xc62a('0x34')][_0xc62a('0x35')]};});_0x343abc[_0xc62a('0x36')]=_[_0xc62a('0x30')](_0x2be72d,_0xc62a('0x2d'));_0x343abc['query']=_['keys'](_0x49ede7['query']);_0x343abc[_0xc62a('0x37')]=_[_0xc62a('0x38')](_0x343abc[_0xc62a('0x36')],_0x343abc[_0xc62a('0x39')]);_0x4ac185[_0xc62a('0x3a')]=_[_0xc62a('0x38')](_0x343abc['model'],qs['fields'](_0x49ede7[_0xc62a('0x39')][_0xc62a('0x3b')]));_0x4ac185[_0xc62a('0x3a')]=_0x4ac185[_0xc62a('0x3a')][_0xc62a('0x3c')]?_0x4ac185[_0xc62a('0x3a')]:_0x343abc['model'];if(!_0x49ede7[_0xc62a('0x39')][_0xc62a('0x3d')](_0xc62a('0x3e'))){_0x4ac185['limit']=qs[_0xc62a('0x23')](_0x49ede7['query']['limit']);_0x4ac185[_0xc62a('0x25')]=qs[_0xc62a('0x25')](_0x49ede7[_0xc62a('0x39')]['offset']);}_0x4ac185[_0xc62a('0x3f')]=qs[_0xc62a('0x40')](_0x49ede7[_0xc62a('0x39')]['sort']);_0x4ac185[_0xc62a('0x41')]=qs[_0xc62a('0x37')](_[_0xc62a('0x42')](_0x49ede7[_0xc62a('0x39')],_0x343abc['filters']),_0x2be72d);if(_0x49ede7[_0xc62a('0x39')][_0xc62a('0x43')]){_0x4ac185[_0xc62a('0x41')]=_[_0xc62a('0x44')](_0x4ac185[_0xc62a('0x41')],{'$or':_['map'](_0x2be72d,function(_0x1a97cd){if(_0x1a97cd[_0xc62a('0x34')]!==_0xc62a('0x45')){var _0xd26ab5={};_0xd26ab5[_0x1a97cd[_0xc62a('0x2d')]]={'$like':'%'+_0x49ede7['query']['filter']+'%'};return _0xd26ab5;}})});}_0x4ac185=_['merge']({},_0x4ac185,_0x49ede7[_0xc62a('0x46')]);var _0x2b659f={'where':_0x4ac185['where']};return db[_0xc62a('0x31')][_0xc62a('0x24')](_0x2b659f)[_0xc62a('0x15')](function(_0x483fb8){_0x10920f[_0xc62a('0x24')]=_0x483fb8;if(_0x49ede7['query']['includeAll']){_0x4ac185['include']=[{'all':!![]}];}return db[_0xc62a('0x31')][_0xc62a('0x47')](_0x4ac185);})[_0xc62a('0x15')](function(_0x1cc4a9){_0x10920f[_0xc62a('0x48')]=_0x1cc4a9;return _0x10920f;})[_0xc62a('0x15')](respondWithFilteredResult(_0x2d3a32,_0x4ac185))[_0xc62a('0x1e')](handleError(_0x2d3a32,null));};exports[_0xc62a('0x49')]=function(_0x189659,_0x13b82c){var _0x25b9f2={'raw':![],'where':{'id':_0x189659[_0xc62a('0x4a')]['id']}},_0x196e29={};_0x196e29[_0xc62a('0x36')]=_[_0xc62a('0x4b')](db[_0xc62a('0x31')]['rawAttributes']);_0x196e29[_0xc62a('0x39')]=_[_0xc62a('0x4b')](_0x189659[_0xc62a('0x39')]);_0x196e29[_0xc62a('0x37')]=_[_0xc62a('0x38')](_0x196e29[_0xc62a('0x36')],_0x196e29[_0xc62a('0x39')]);_0x25b9f2[_0xc62a('0x3a')]=_[_0xc62a('0x38')](_0x196e29[_0xc62a('0x36')],qs['fields'](_0x189659[_0xc62a('0x39')][_0xc62a('0x3b')]));_0x25b9f2['attributes']=_0x25b9f2[_0xc62a('0x3a')]['length']?_0x25b9f2[_0xc62a('0x3a')]:_0x196e29[_0xc62a('0x36')];if(_0x189659[_0xc62a('0x39')][_0xc62a('0x4c')]){_0x25b9f2[_0xc62a('0x4d')]=[{'all':!![]}];}_0x25b9f2=_[_0xc62a('0x44')]({},_0x25b9f2,_0x189659['options']);return db[_0xc62a('0x31')]['find'](_0x25b9f2)[_0xc62a('0x15')](handleEntityNotFound(_0x13b82c,null))[_0xc62a('0x15')](respondWithResult(_0x13b82c,null))[_0xc62a('0x1e')](handleError(_0x13b82c,null));};exports[_0xc62a('0x4e')]=function(_0x47e46a,_0x1979ea,_0x2b1d8d){var _0x84cd79;return db[_0xc62a('0x31')][_0xc62a('0x4e')](_0x47e46a['body'],{'raw':!![]})[_0xc62a('0x15')](function(_0x4a552b){_0x84cd79=_0x4a552b;return db[_0xc62a('0x31')]['findAll']({'raw':!![]});})['then'](function(_0x92f7ee){var _0x39ebe6=fs[_0xc62a('0x4f')](path[_0xc62a('0x50')](config[_0xc62a('0x51')],_0xc62a('0x52')),_0xc62a('0x53'));var _0xc7c3cc=ejs[_0xc62a('0x54')](_0x39ebe6,{'contexts':_0x92f7ee||[]});fs[_0xc62a('0x55')](_0xc62a('0x56'),_0xc7c3cc);})[_0xc62a('0x15')](function(){return respondWithRpcPromise(_0xc62a('0x57'),'create',{'module':_0xc62a('0x58')});})[_0xc62a('0x15')](function(){var _0xdda8c4=_0x47e46a[_0xc62a('0x59')]['get']({'plain':!![]});if(!_0xdda8c4)throw new Error('Unable\x20to\x20retrieve\x20the\x20current\x20user');if(_0xdda8c4['role']===_0xc62a('0x59')){var _0x34828e=_0x84cd79[_0xc62a('0x5a')]({'plain':!![]});return db[_0xc62a('0x5b')][_0xc62a('0x5c')]({'where':{'name':_0xc62a('0x2b'),'userProfileId':_0xdda8c4['userProfileId']},'raw':!![]})[_0xc62a('0x15')](function(_0x2cddd4){if(_0x2cddd4&&_0x2cddd4['autoAssociation']===0x0){return db[_0xc62a('0x2c')][_0xc62a('0x4e')]({'name':_0x34828e[_0xc62a('0x2d')],'resourceId':_0x34828e['id'],'type':_0x2cddd4[_0xc62a('0x2d')],'sectionId':_0x2cddd4['id']},{})[_0xc62a('0x15')](function(){return _0x84cd79;});}else{return _0x84cd79;}})[_0xc62a('0x1e')](function(_0x581f0b){logger[_0xc62a('0x1b')](_0xc62a('0x5d'),_0x581f0b);throw _0x581f0b;});}return _0x84cd79;})[_0xc62a('0x15')](respondWithResult(_0x1979ea,0xc9))[_0xc62a('0x1e')](handleError(_0x1979ea,null));};exports[_0xc62a('0x29')]=function(_0x472a6b,_0x15e838,_0x57831f){var _0xb14539;return db[_0xc62a('0x31')][_0xc62a('0x5c')]({'where':{'id':_0x472a6b[_0xc62a('0x4a')]['id']}})[_0xc62a('0x15')](handleEntityNotFound(_0x15e838,null))[_0xc62a('0x15')](saveUpdates(_0x472a6b['body'],null))[_0xc62a('0x15')](function(_0x461062){if(_0x461062){_0xb14539=_0x461062;return db['VoiceContext'][_0xc62a('0x47')]({'raw':!![]});}})[_0xc62a('0x15')](function(_0x4fbc52){var _0x636bb7=fs[_0xc62a('0x4f')](path[_0xc62a('0x50')](config['root'],'server/files/templates/context.ejs'),'utf8');var _0x1cc075=ejs[_0xc62a('0x54')](_0x636bb7,{'contexts':_0x4fbc52||[]});fs[_0xc62a('0x55')](_0xc62a('0x56'),_0x1cc075);})['then'](function(){return respondWithRpcPromise('Reload',_0xc62a('0x29'),{'module':_0xc62a('0x58')});})[_0xc62a('0x15')](function(){return _0xb14539;})[_0xc62a('0x15')](respondWithResult(_0x15e838,null))[_0xc62a('0x1e')](handleError(_0x15e838,null));};exports['destroy']=function(_0x4b0833,_0x248672,_0x2b39e1){var _0x5a641f;return db['VoiceContext']['find']({'where':{'id':_0x4b0833['params']['id']}})['then'](handleEntityNotFound(_0x248672,null))[_0xc62a('0x15')](removeEntity(_0x248672,null))['then'](function(){return db[_0xc62a('0x31')][_0xc62a('0x47')]({'raw':!![]});})[_0xc62a('0x15')](function(_0x3e0394){var _0xe6ca46=fs[_0xc62a('0x4f')](path[_0xc62a('0x50')](config[_0xc62a('0x51')],_0xc62a('0x52')),_0xc62a('0x53'));var _0x535e8f=ejs[_0xc62a('0x54')](_0xe6ca46,{'contexts':_0x3e0394});fs[_0xc62a('0x55')](_0xc62a('0x56'),_0x535e8f);return respondWithRpcPromise(_0xc62a('0x57'),'destroy',{'module':'chan_sip.so'});})[_0xc62a('0x1e')](handleError(_0x248672,null));}; \ No newline at end of file +var _0x0c7d=['rimraf','zip-dir','request-promise','moment','mustache','sox','to-csv','ejs','fs-extra','squel','crypto','desk.js','ioredis','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','jayson/promise','client','http','request','then','info','VoiceContext,\x20%s,\x20%s','request\x20sent','debug','stringify','code','error','message','result','status','end','offset','undefined','limit','count','set','json','apply','reject','save','update','destroy','get','Contexts','UserProfileResource','sendStatus','name','rawAttributes','type','key','model','keys','query','intersection','attributes','fields','length','hasOwnProperty','nolimit','order','sort','where','pick','map','VIRTUAL','merge','options','includeAll','include','VoiceContext','findAll','rows','catch','show','params','filters','find','create','body','readFileSync','join','server/files/templates/context.ejs','utf8','writeFileSync','Reload','chan_sip.so','user','UserProfileSection','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','root','/etc/asterisk/extensions_xcally_contexts.conf'];(function(_0x4a73f2,_0x352409){var _0x4190ee=function(_0x19603c){while(--_0x19603c){_0x4a73f2['push'](_0x4a73f2['shift']());}};_0x4190ee(++_0x352409);}(_0x0c7d,0x1e0));var _0xd0c7=function(_0x2610db,_0x454344){_0x2610db=_0x2610db-0x0;var _0x5d4d96=_0x0c7d[_0x2610db];return _0x5d4d96;};'use strict';var emlformat=require('eml-format');var rimraf=require(_0xd0c7('0x0'));var zipdir=require(_0xd0c7('0x1'));var jsonpatch=require('fast-json-patch');var rp=require(_0xd0c7('0x2'));var moment=require(_0xd0c7('0x3'));var BPromise=require('bluebird');var Mustache=require(_0xd0c7('0x4'));var util=require('util');var path=require('path');var sox=require(_0xd0c7('0x5'));var csv=require(_0xd0c7('0x6'));var ejs=require(_0xd0c7('0x7'));var fs=require('fs');var fs_extra=require(_0xd0c7('0x8'));var _=require('lodash');var squel=require(_0xd0c7('0x9'));var crypto=require(_0xd0c7('0xa'));var jsforce=require('jsforce');var deskjs=require(_0xd0c7('0xb'));var toCsv=require(_0xd0c7('0x6'));var querystring=require('querystring');var Papa=require('papaparse');var Redis=require(_0xd0c7('0xc'));var authService=require('../../components/auth/service');var qs=require(_0xd0c7('0xd'));var as=require(_0xd0c7('0xe'));var hardwareService=require(_0xd0c7('0xf'));var logger=require('../../config/logger')('api');var utils=require(_0xd0c7('0x10'));var config=require(_0xd0c7('0x11'));var licenseUtil=require(_0xd0c7('0x12'));var db=require(_0xd0c7('0x13'))['db'];var jayson=require(_0xd0c7('0x14'));var client=jayson[_0xd0c7('0x15')][_0xd0c7('0x16')]({'port':0x232a});function respondWithRpcPromise(_0x4e0a30,_0x88d4eb,_0x25bf27,_0x493302){return new BPromise(function(_0x579923,_0x1d8282){var _0x56876d=_0x493302||client;return _0x56876d[_0xd0c7('0x17')](_0x4e0a30,_0x25bf27)[_0xd0c7('0x18')](function(_0x290f19){logger[_0xd0c7('0x19')](_0xd0c7('0x1a'),_0x88d4eb,_0xd0c7('0x1b'));logger[_0xd0c7('0x1c')]('VoiceContext,\x20%s,\x20%s,\x20%s',_0x88d4eb,_0xd0c7('0x1b'),JSON[_0xd0c7('0x1d')](_0x290f19));if(_0x290f19['error']){if(_0x290f19['error'][_0xd0c7('0x1e')]===0x1f4){logger['error'](_0xd0c7('0x1a'),_0x88d4eb,_0x290f19[_0xd0c7('0x1f')][_0xd0c7('0x20')]);return _0x1d8282(_0x290f19[_0xd0c7('0x1f')][_0xd0c7('0x20')]);}logger[_0xd0c7('0x1f')](_0xd0c7('0x1a'),_0x88d4eb,_0x290f19[_0xd0c7('0x1f')][_0xd0c7('0x20')]);return _0x579923(_0x290f19[_0xd0c7('0x1f')][_0xd0c7('0x20')]);}else{logger['info'](_0xd0c7('0x1a'),_0x88d4eb,_0xd0c7('0x1b'));_0x579923(_0x290f19[_0xd0c7('0x21')][_0xd0c7('0x20')]);}})['catch'](function(_0x505d4c){logger[_0xd0c7('0x1f')](_0xd0c7('0x1a'),_0x88d4eb,_0x505d4c);_0x1d8282(_0x505d4c);});});}function respondWithStatusCode(_0x57dea2,_0x286505){_0x286505=_0x286505||0xcc;return function(_0x5367e8){if(_0x5367e8){return _0x57dea2['sendStatus'](_0x286505);}return _0x57dea2[_0xd0c7('0x22')](_0x286505)[_0xd0c7('0x23')]();};}function respondWithResult(_0xa4a004,_0x3a7e3f){_0x3a7e3f=_0x3a7e3f||0xc8;return function(_0x587032){if(_0x587032){return _0xa4a004['status'](_0x3a7e3f)['json'](_0x587032);}};}function respondWithFilteredResult(_0x760791,_0x4a0c72){return function(_0x55d4be){if(_0x55d4be){var _0x3e6fb7=typeof _0x4a0c72[_0xd0c7('0x24')]===_0xd0c7('0x25')&&typeof _0x4a0c72[_0xd0c7('0x26')]===_0xd0c7('0x25');var _0x4cb411=_0x55d4be['count'];var _0x1439cd=_0x3e6fb7?0x0:_0x4a0c72[_0xd0c7('0x24')];var _0x50447b=_0x3e6fb7?_0x55d4be[_0xd0c7('0x27')]:_0x4a0c72[_0xd0c7('0x24')]+_0x4a0c72[_0xd0c7('0x26')];var _0x47e395;if(_0x50447b>=_0x4cb411){_0x50447b=_0x4cb411;_0x47e395=0xc8;}else{_0x47e395=0xce;}_0x760791[_0xd0c7('0x22')](_0x47e395);return _0x760791[_0xd0c7('0x28')]('Content-Range',_0x1439cd+'-'+_0x50447b+'/'+_0x4cb411)[_0xd0c7('0x29')](_0x55d4be);}return null;};}function patchUpdates(_0x487843){return function(_0x410644){try{jsonpatch[_0xd0c7('0x2a')](_0x410644,_0x487843,!![]);}catch(_0x2ad080){return BPromise[_0xd0c7('0x2b')](_0x2ad080);}return _0x410644[_0xd0c7('0x2c')]();};}function saveUpdates(_0x5ed22c,_0xb4f448){return function(_0x12459f){if(_0x12459f){return _0x12459f[_0xd0c7('0x2d')](_0x5ed22c)[_0xd0c7('0x18')](function(_0x262c83){return _0x262c83;});}return null;};}function removeEntity(_0x4d7bc8,_0x5d6771){return function(_0x1798af){if(_0x1798af){return _0x1798af[_0xd0c7('0x2e')]()[_0xd0c7('0x18')](function(){var _0x37581e=_0x1798af[_0xd0c7('0x2f')]({'plain':!![]});var _0x5b4eef=_0xd0c7('0x30');return db[_0xd0c7('0x31')][_0xd0c7('0x2e')]({'where':{'type':_0x5b4eef,'resourceId':_0x37581e['id']}})['then'](function(){return _0x1798af;});})[_0xd0c7('0x18')](function(){_0x4d7bc8[_0xd0c7('0x22')](0xcc)['end']();});}};}function handleEntityNotFound(_0x551d42,_0x10129b){return function(_0x500d4c){if(!_0x500d4c){_0x551d42[_0xd0c7('0x32')](0x194);}return _0x500d4c;};}function handleError(_0x39ba9d,_0x59ca5f){_0x59ca5f=_0x59ca5f||0x1f4;return function(_0x2ac8e5){logger[_0xd0c7('0x1f')](_0x2ac8e5['stack']);if(_0x2ac8e5['name']){delete _0x2ac8e5[_0xd0c7('0x33')];}_0x39ba9d[_0xd0c7('0x22')](_0x59ca5f)['send'](_0x2ac8e5);};}exports['index']=function(_0x403888,_0x26325e){var _0x129f61={},_0x55d2d2={},_0x16d5af={'count':0x0,'rows':[]};var _0x2bed2a=_['map'](db['VoiceContext'][_0xd0c7('0x34')],function(_0x3002bc){return{'name':_0x3002bc['fieldName'],'type':_0x3002bc[_0xd0c7('0x35')][_0xd0c7('0x36')]};});_0x55d2d2[_0xd0c7('0x37')]=_['map'](_0x2bed2a,_0xd0c7('0x33'));_0x55d2d2['query']=_[_0xd0c7('0x38')](_0x403888[_0xd0c7('0x39')]);_0x55d2d2['filters']=_[_0xd0c7('0x3a')](_0x55d2d2[_0xd0c7('0x37')],_0x55d2d2[_0xd0c7('0x39')]);_0x129f61[_0xd0c7('0x3b')]=_[_0xd0c7('0x3a')](_0x55d2d2[_0xd0c7('0x37')],qs['fields'](_0x403888[_0xd0c7('0x39')][_0xd0c7('0x3c')]));_0x129f61[_0xd0c7('0x3b')]=_0x129f61[_0xd0c7('0x3b')][_0xd0c7('0x3d')]?_0x129f61['attributes']:_0x55d2d2[_0xd0c7('0x37')];if(!_0x403888['query'][_0xd0c7('0x3e')](_0xd0c7('0x3f'))){_0x129f61[_0xd0c7('0x26')]=qs[_0xd0c7('0x26')](_0x403888[_0xd0c7('0x39')]['limit']);_0x129f61[_0xd0c7('0x24')]=qs['offset'](_0x403888[_0xd0c7('0x39')][_0xd0c7('0x24')]);}_0x129f61[_0xd0c7('0x40')]=qs[_0xd0c7('0x41')](_0x403888[_0xd0c7('0x39')][_0xd0c7('0x41')]);_0x129f61[_0xd0c7('0x42')]=qs['filters'](_[_0xd0c7('0x43')](_0x403888[_0xd0c7('0x39')],_0x55d2d2['filters']),_0x2bed2a);if(_0x403888['query']['filter']){_0x129f61[_0xd0c7('0x42')]=_['merge'](_0x129f61[_0xd0c7('0x42')],{'$or':_[_0xd0c7('0x44')](_0x2bed2a,function(_0x3b2aa1){if(_0x3b2aa1[_0xd0c7('0x35')]!==_0xd0c7('0x45')){var _0x4d9458={};_0x4d9458[_0x3b2aa1[_0xd0c7('0x33')]]={'$like':'%'+_0x403888[_0xd0c7('0x39')]['filter']+'%'};return _0x4d9458;}})});}_0x129f61=_[_0xd0c7('0x46')]({},_0x129f61,_0x403888[_0xd0c7('0x47')]);var _0x3cbf33={'where':_0x129f61['where']};return db['VoiceContext'][_0xd0c7('0x27')](_0x3cbf33)[_0xd0c7('0x18')](function(_0xa2be4b){_0x16d5af[_0xd0c7('0x27')]=_0xa2be4b;if(_0x403888[_0xd0c7('0x39')][_0xd0c7('0x48')]){_0x129f61[_0xd0c7('0x49')]=[{'all':!![]}];}return db[_0xd0c7('0x4a')][_0xd0c7('0x4b')](_0x129f61);})[_0xd0c7('0x18')](function(_0x3ade3c){_0x16d5af[_0xd0c7('0x4c')]=_0x3ade3c;return _0x16d5af;})['then'](respondWithFilteredResult(_0x26325e,_0x129f61))[_0xd0c7('0x4d')](handleError(_0x26325e,null));};exports[_0xd0c7('0x4e')]=function(_0x3cc89b,_0x4c25eb){var _0x29cd31={'raw':![],'where':{'id':_0x3cc89b[_0xd0c7('0x4f')]['id']}},_0x904abd={};_0x904abd[_0xd0c7('0x37')]=_['keys'](db[_0xd0c7('0x4a')][_0xd0c7('0x34')]);_0x904abd[_0xd0c7('0x39')]=_['keys'](_0x3cc89b[_0xd0c7('0x39')]);_0x904abd[_0xd0c7('0x50')]=_[_0xd0c7('0x3a')](_0x904abd[_0xd0c7('0x37')],_0x904abd['query']);_0x29cd31[_0xd0c7('0x3b')]=_['intersection'](_0x904abd[_0xd0c7('0x37')],qs[_0xd0c7('0x3c')](_0x3cc89b[_0xd0c7('0x39')]['fields']));_0x29cd31['attributes']=_0x29cd31[_0xd0c7('0x3b')][_0xd0c7('0x3d')]?_0x29cd31[_0xd0c7('0x3b')]:_0x904abd['model'];if(_0x3cc89b[_0xd0c7('0x39')]['includeAll']){_0x29cd31[_0xd0c7('0x49')]=[{'all':!![]}];}_0x29cd31=_[_0xd0c7('0x46')]({},_0x29cd31,_0x3cc89b['options']);return db[_0xd0c7('0x4a')][_0xd0c7('0x51')](_0x29cd31)[_0xd0c7('0x18')](handleEntityNotFound(_0x4c25eb,null))[_0xd0c7('0x18')](respondWithResult(_0x4c25eb,null))[_0xd0c7('0x4d')](handleError(_0x4c25eb,null));};exports[_0xd0c7('0x52')]=function(_0x14283c,_0x470e8a,_0x288458){var _0x204858;return db[_0xd0c7('0x4a')][_0xd0c7('0x52')](_0x14283c[_0xd0c7('0x53')],{'raw':!![]})['then'](function(_0x4633eb){_0x204858=_0x4633eb;return db[_0xd0c7('0x4a')][_0xd0c7('0x4b')]({'raw':!![]});})['then'](function(_0xacf6ac){var _0x20e93d=fs[_0xd0c7('0x54')](path[_0xd0c7('0x55')](config['root'],_0xd0c7('0x56')),_0xd0c7('0x57'));var _0x3a231b=ejs['render'](_0x20e93d,{'contexts':_0xacf6ac||[]});fs[_0xd0c7('0x58')]('/etc/asterisk/extensions_xcally_contexts.conf',_0x3a231b);})[_0xd0c7('0x18')](function(){return respondWithRpcPromise(_0xd0c7('0x59'),_0xd0c7('0x52'),{'module':_0xd0c7('0x5a')});})[_0xd0c7('0x18')](function(){var _0x33ced3=_0x14283c[_0xd0c7('0x5b')][_0xd0c7('0x2f')]({'plain':!![]});if(!_0x33ced3)throw new Error('Unable\x20to\x20retrieve\x20the\x20current\x20user');if(_0x33ced3['role']===_0xd0c7('0x5b')){var _0x2f51e6=_0x204858[_0xd0c7('0x2f')]({'plain':!![]});return db[_0xd0c7('0x5c')][_0xd0c7('0x51')]({'where':{'name':_0xd0c7('0x30'),'userProfileId':_0x33ced3['userProfileId']},'raw':!![]})['then'](function(_0x1476be){if(_0x1476be&&_0x1476be['autoAssociation']===0x0){return db[_0xd0c7('0x31')][_0xd0c7('0x52')]({'name':_0x2f51e6[_0xd0c7('0x33')],'resourceId':_0x2f51e6['id'],'type':_0x1476be[_0xd0c7('0x33')],'sectionId':_0x1476be['id']},{})[_0xd0c7('0x18')](function(){return _0x204858;});}else{return _0x204858;}})[_0xd0c7('0x4d')](function(_0x580dd8){logger[_0xd0c7('0x1f')](_0xd0c7('0x5d'),_0x580dd8);throw _0x580dd8;});}return _0x204858;})[_0xd0c7('0x18')](respondWithResult(_0x470e8a,0xc9))[_0xd0c7('0x4d')](handleError(_0x470e8a,null));};exports[_0xd0c7('0x2d')]=function(_0x1db1f1,_0x1badc9,_0x31bf1f){var _0x2582bd;return db['VoiceContext']['find']({'where':{'id':_0x1db1f1[_0xd0c7('0x4f')]['id']}})[_0xd0c7('0x18')](handleEntityNotFound(_0x1badc9,null))[_0xd0c7('0x18')](saveUpdates(_0x1db1f1['body'],null))[_0xd0c7('0x18')](function(_0x457d84){if(_0x457d84){_0x2582bd=_0x457d84;return db['VoiceContext']['findAll']({'raw':!![]});}})[_0xd0c7('0x18')](function(_0x2c97a1){var _0x12134f=fs[_0xd0c7('0x54')](path[_0xd0c7('0x55')](config[_0xd0c7('0x5e')],_0xd0c7('0x56')),_0xd0c7('0x57'));var _0x58887a=ejs['render'](_0x12134f,{'contexts':_0x2c97a1||[]});fs[_0xd0c7('0x58')](_0xd0c7('0x5f'),_0x58887a);})[_0xd0c7('0x18')](function(){return respondWithRpcPromise(_0xd0c7('0x59'),_0xd0c7('0x2d'),{'module':'chan_sip.so'});})['then'](function(){return _0x2582bd;})[_0xd0c7('0x18')](respondWithResult(_0x1badc9,null))[_0xd0c7('0x4d')](handleError(_0x1badc9,null));};exports[_0xd0c7('0x2e')]=function(_0xf61f30,_0x1fccce,_0x298b96){var _0x116028;return db[_0xd0c7('0x4a')]['find']({'where':{'id':_0xf61f30[_0xd0c7('0x4f')]['id']}})[_0xd0c7('0x18')](handleEntityNotFound(_0x1fccce,null))[_0xd0c7('0x18')](removeEntity(_0x1fccce,null))['then'](function(){return db[_0xd0c7('0x4a')][_0xd0c7('0x4b')]({'raw':!![]});})[_0xd0c7('0x18')](function(_0x381efd){var _0x2cfe6d=fs[_0xd0c7('0x54')](path['join'](config[_0xd0c7('0x5e')],_0xd0c7('0x56')),_0xd0c7('0x57'));var _0x1af300=ejs['render'](_0x2cfe6d,{'contexts':_0x381efd});fs[_0xd0c7('0x58')]('/etc/asterisk/extensions_xcally_contexts.conf',_0x1af300);return respondWithRpcPromise(_0xd0c7('0x59'),_0xd0c7('0x2e'),{'module':_0xd0c7('0x5a')});})[_0xd0c7('0x4d')](handleError(_0x1fccce,null));}; \ No newline at end of file diff --git a/server/api/voiceContext/voiceContext.model.js b/server/api/voiceContext/voiceContext.model.js index a7781f6..4e61af0 100644 --- a/server/api/voiceContext/voiceContext.model.js +++ b/server/api/voiceContext/voiceContext.model.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x7839=['VoiceContext','voice_contexts','lodash','util','../../config/logger','bluebird','request-promise','path','../../config/environment','./voiceContext.attributes'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0x7839,0x1ba));var _0x9783=function(_0xedb8cc,_0x369c17){_0xedb8cc=_0xedb8cc-0x0;var _0x1ba42b=_0x7839[_0xedb8cc];return _0x1ba42b;};'use strict';var _=require(_0x9783('0x0'));var util=require(_0x9783('0x1'));var logger=require(_0x9783('0x2'))('api');var moment=require('moment');var BPromise=require(_0x9783('0x3'));var rp=require(_0x9783('0x4'));var fs=require('fs');var path=require(_0x9783('0x5'));var rimraf=require('rimraf');var config=require(_0x9783('0x6'));var attributes=require(_0x9783('0x7'));module['exports']=function(_0x42cb1c,_0x569550){return _0x42cb1c['define'](_0x9783('0x8'),attributes,{'tableName':_0x9783('0x9'),'paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file +var _0x7177=['exports','define','VoiceContext','voice_contexts','lodash','../../config/logger','moment','bluebird','path','rimraf','./voiceContext.attributes'];(function(_0x593bfc,_0x19963e){var _0x108166=function(_0x5e1a89){while(--_0x5e1a89){_0x593bfc['push'](_0x593bfc['shift']());}};_0x108166(++_0x19963e);}(_0x7177,0x101));var _0x7717=function(_0x743b6c,_0x4dbc78){_0x743b6c=_0x743b6c-0x0;var _0x41575a=_0x7177[_0x743b6c];return _0x41575a;};'use strict';var _=require(_0x7717('0x0'));var util=require('util');var logger=require(_0x7717('0x1'))('api');var moment=require(_0x7717('0x2'));var BPromise=require(_0x7717('0x3'));var rp=require('request-promise');var fs=require('fs');var path=require(_0x7717('0x4'));var rimraf=require(_0x7717('0x5'));var config=require('../../config/environment');var attributes=require(_0x7717('0x6'));module[_0x7717('0x7')]=function(_0x40e3ec,_0x20ca81){return _0x40e3ec[_0x7717('0x8')](_0x7717('0x9'),attributes,{'tableName':_0x7717('0xa'),'paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file diff --git a/server/api/voiceContext/voiceContext.rpc.js b/server/api/voiceContext/voiceContext.rpc.js index 0e7458e..cbb5a76 100644 --- a/server/api/voiceContext/voiceContext.rpc.js +++ b/server/api/voiceContext/voiceContext.rpc.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x865c=['util','moment','bluebird','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','request','VoiceContext,\x20%s,\x20%s','request\x20sent','debug','VoiceContext,\x20%s,\x20%s,\x20%s','error','message','info','result','catch','lodash'];(function(_0x51b181,_0x1c38ec){var _0x56ef7d=function(_0x19841c){while(--_0x19841c){_0x51b181['push'](_0x51b181['shift']());}};_0x56ef7d(++_0x1c38ec);}(_0x865c,0x158));var _0xc865=function(_0x55258f,_0x182273){_0x55258f=_0x55258f-0x0;var _0x14de5a=_0x865c[_0x55258f];return _0x14de5a;};'use strict';var _=require(_0xc865('0x0'));var util=require(_0xc865('0x1'));var moment=require(_0xc865('0x2'));var BPromise=require(_0xc865('0x3'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0xc865('0x4'));var db=require(_0xc865('0x5'))['db'];var utils=require(_0xc865('0x6'));var logger=require(_0xc865('0x7'))(_0xc865('0x8'));var config=require(_0xc865('0x9'));var jayson=require(_0xc865('0xa'));var client=jayson[_0xc865('0xb')][_0xc865('0xc')]({'port':0x232a});function respondWithRpcPromise(_0x29490e,_0x3be090,_0x5d4755){return new BPromise(function(_0x37709b,_0xb9d225){return client[_0xc865('0xd')](_0x29490e,_0x5d4755)['then'](function(_0x3be865){logger['info'](_0xc865('0xe'),_0x3be090,_0xc865('0xf'));logger[_0xc865('0x10')](_0xc865('0x11'),_0x3be090,_0xc865('0xf'),JSON['stringify'](_0x3be865));if(_0x3be865[_0xc865('0x12')]){if(_0x3be865[_0xc865('0x12')]['code']===0x1f4){logger[_0xc865('0x12')](_0xc865('0xe'),_0x3be090,_0x3be865[_0xc865('0x12')][_0xc865('0x13')]);return _0xb9d225(_0x3be865[_0xc865('0x12')][_0xc865('0x13')]);}logger[_0xc865('0x12')](_0xc865('0xe'),_0x3be090,_0x3be865['error'][_0xc865('0x13')]);return _0x37709b(_0x3be865[_0xc865('0x12')][_0xc865('0x13')]);}else{logger[_0xc865('0x14')]('VoiceContext,\x20%s,\x20%s',_0x3be090,_0xc865('0xf'));_0x37709b(_0x3be865[_0xc865('0x15')]['message']);}})[_0xc865('0x16')](function(_0x2ee65a){logger['error']('VoiceContext,\x20%s,\x20%s',_0x3be090,_0x2ee65a);_0xb9d225(_0x2ee65a);});});} \ No newline at end of file +var _0xfd49=['http','request','then','VoiceContext,\x20%s,\x20%s','debug','VoiceContext,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','message','info','result','catch','lodash','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/environment','client'];(function(_0x482268,_0x4d4330){var _0x1f1b7f=function(_0x18206d){while(--_0x18206d){_0x482268['push'](_0x482268['shift']());}};_0x1f1b7f(++_0x4d4330);}(_0xfd49,0x91));var _0x9fd4=function(_0x46af4e,_0x5a4285){_0x46af4e=_0x46af4e-0x0;var _0x557c08=_0xfd49[_0x46af4e];return _0x557c08;};'use strict';var _=require(_0x9fd4('0x0'));var util=require(_0x9fd4('0x1'));var moment=require(_0x9fd4('0x2'));var BPromise=require(_0x9fd4('0x3'));var rs=require(_0x9fd4('0x4'));var fs=require('fs');var Redis=require(_0x9fd4('0x5'));var db=require(_0x9fd4('0x6'))['db'];var utils=require('../../config/utils');var logger=require('../../config/logger')('rpc');var config=require(_0x9fd4('0x7'));var jayson=require('jayson/promise');var client=jayson[_0x9fd4('0x8')][_0x9fd4('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x1ac096,_0x5d5560,_0x5ce929){return new BPromise(function(_0x21b91a,_0x205cee){return client[_0x9fd4('0xa')](_0x1ac096,_0x5ce929)[_0x9fd4('0xb')](function(_0xb0e1fc){logger['info'](_0x9fd4('0xc'),_0x5d5560,'request\x20sent');logger[_0x9fd4('0xd')](_0x9fd4('0xe'),_0x5d5560,_0x9fd4('0xf'),JSON[_0x9fd4('0x10')](_0xb0e1fc));if(_0xb0e1fc[_0x9fd4('0x11')]){if(_0xb0e1fc[_0x9fd4('0x11')]['code']===0x1f4){logger[_0x9fd4('0x11')](_0x9fd4('0xc'),_0x5d5560,_0xb0e1fc[_0x9fd4('0x11')][_0x9fd4('0x12')]);return _0x205cee(_0xb0e1fc[_0x9fd4('0x11')][_0x9fd4('0x12')]);}logger['error'](_0x9fd4('0xc'),_0x5d5560,_0xb0e1fc[_0x9fd4('0x11')][_0x9fd4('0x12')]);return _0x21b91a(_0xb0e1fc[_0x9fd4('0x11')][_0x9fd4('0x12')]);}else{logger[_0x9fd4('0x13')](_0x9fd4('0xc'),_0x5d5560,_0x9fd4('0xf'));_0x21b91a(_0xb0e1fc[_0x9fd4('0x14')][_0x9fd4('0x12')]);}})[_0x9fd4('0x15')](function(_0x54a2d1){logger[_0x9fd4('0x11')](_0x9fd4('0xc'),_0x5d5560,_0x54a2d1);_0x205cee(_0x54a2d1);});});} \ No newline at end of file diff --git a/server/api/voiceDialReport/index.js b/server/api/voiceDialReport/index.js index 5195b07..dbffec1 100644 --- a/server/api/voiceDialReport/index.js +++ b/server/api/voiceDialReport/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x5a8b=['./voiceDialReport.controller','get','isAuthenticated','index','/describe','describe','show','post','put','delete','/:id','destroy','util','path','connect-timeout','express','Router','fs-extra','../../config/environment'];(function(_0x53afe9,_0x2c9f40){var _0x396396=function(_0x1f574d){while(--_0x1f574d){_0x53afe9['push'](_0x53afe9['shift']());}};_0x396396(++_0x2c9f40);}(_0x5a8b,0x103));var _0xb5a8=function(_0x1648a6,_0x38e0f3){_0x1648a6=_0x1648a6-0x0;var _0x161a07=_0x5a8b[_0x1648a6];return _0x161a07;};'use strict';var multer=require('multer');var util=require(_0xb5a8('0x0'));var path=require(_0xb5a8('0x1'));var timeout=require(_0xb5a8('0x2'));var express=require(_0xb5a8('0x3'));var router=express[_0xb5a8('0x4')]();var fs_extra=require(_0xb5a8('0x5'));var auth=require('../../components/auth/service');var interaction=require('../../components/interaction/service');var config=require(_0xb5a8('0x6'));var controller=require(_0xb5a8('0x7'));router[_0xb5a8('0x8')]('/',auth[_0xb5a8('0x9')](),controller[_0xb5a8('0xa')]);router['get'](_0xb5a8('0xb'),auth[_0xb5a8('0x9')](),controller[_0xb5a8('0xc')]);router['get']('/:id',auth[_0xb5a8('0x9')](),controller[_0xb5a8('0xd')]);router[_0xb5a8('0xe')]('/',auth[_0xb5a8('0x9')](),controller['create']);router[_0xb5a8('0xf')]('/:id',auth[_0xb5a8('0x9')](),controller['update']);router[_0xb5a8('0x10')](_0xb5a8('0x11'),auth[_0xb5a8('0x9')](),controller[_0xb5a8('0x12')]);module['exports']=router; \ No newline at end of file +var _0x8fe8=['show','post','create','put','delete','exports','multer','util','path','connect-timeout','Router','fs-extra','../../components/auth/service','../../components/interaction/service','get','isAuthenticated','index','/:id'];(function(_0x2b5cd5,_0x1f79be){var _0x5ea88f=function(_0x2fca2a){while(--_0x2fca2a){_0x2b5cd5['push'](_0x2b5cd5['shift']());}};_0x5ea88f(++_0x1f79be);}(_0x8fe8,0x1b6));var _0x88fe=function(_0x2ff771,_0x4ef744){_0x2ff771=_0x2ff771-0x0;var _0x555f6c=_0x8fe8[_0x2ff771];return _0x555f6c;};'use strict';var multer=require(_0x88fe('0x0'));var util=require(_0x88fe('0x1'));var path=require(_0x88fe('0x2'));var timeout=require(_0x88fe('0x3'));var express=require('express');var router=express[_0x88fe('0x4')]();var fs_extra=require(_0x88fe('0x5'));var auth=require(_0x88fe('0x6'));var interaction=require(_0x88fe('0x7'));var config=require('../../config/environment');var controller=require('./voiceDialReport.controller');router[_0x88fe('0x8')]('/',auth[_0x88fe('0x9')](),controller[_0x88fe('0xa')]);router[_0x88fe('0x8')]('/describe',auth[_0x88fe('0x9')](),controller['describe']);router[_0x88fe('0x8')](_0x88fe('0xb'),auth[_0x88fe('0x9')](),controller[_0x88fe('0xc')]);router[_0x88fe('0xd')]('/',auth['isAuthenticated'](),controller[_0x88fe('0xe')]);router[_0x88fe('0xf')](_0x88fe('0xb'),auth[_0x88fe('0x9')](),controller['update']);router[_0x88fe('0x10')](_0x88fe('0xb'),auth[_0x88fe('0x9')](),controller['destroy']);module[_0x88fe('0x11')]=router; \ No newline at end of file diff --git a/server/api/voiceDialReport/voiceDialReport.attributes.js b/server/api/voiceDialReport/voiceDialReport.attributes.js index 55ce7a4..1dc747d 100644 --- a/server/api/voiceDialReport/voiceDialReport.attributes.js +++ b/server/api/voiceDialReport/voiceDialReport.attributes.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x6f0d=['STRING','INTEGER','DATE','called,connect,complete','exports'];(function(_0x459b5b,_0x53665b){var _0x2a79e1=function(_0xc49842){while(--_0xc49842){_0x459b5b['push'](_0x459b5b['shift']());}};_0x2a79e1(++_0x53665b);}(_0x6f0d,0x16c));var _0xd6f0=function(_0x55e1ef,_0x4384a6){_0x55e1ef=_0x55e1ef-0x0;var _0x2d0a86=_0x6f0d[_0x55e1ef];return _0x2d0a86;};'use strict';var Sequelize=require('sequelize');module[_0xd6f0('0x0')]={'privilege':{'type':Sequelize[_0xd6f0('0x1')]},'channel':{'type':Sequelize[_0xd6f0('0x1')]},'channelstate':{'type':Sequelize[_0xd6f0('0x2')]},'channelstatedesc':{'type':Sequelize['STRING']},'calleridnum':{'type':Sequelize[_0xd6f0('0x1')]},'calleridname':{'type':Sequelize[_0xd6f0('0x1')]},'connectedlinenum':{'type':Sequelize[_0xd6f0('0x1')]},'connectedlinename':{'type':Sequelize[_0xd6f0('0x1')]},'language':{'type':Sequelize[_0xd6f0('0x1')]},'accountcode':{'type':Sequelize['STRING']},'context':{'type':Sequelize[_0xd6f0('0x1')]},'exten':{'type':Sequelize['STRING']},'priority':{'type':Sequelize[_0xd6f0('0x2')]},'uniqueid':{'type':Sequelize[_0xd6f0('0x1')]},'linkedid':{'type':Sequelize[_0xd6f0('0x1')]},'destchannel':{'type':Sequelize[_0xd6f0('0x1')]},'destchannelstate':{'type':Sequelize['INTEGER']},'destchannelstatedesc':{'type':Sequelize['STRING']},'destcalleridnum':{'type':Sequelize[_0xd6f0('0x1')]},'destcalleridname':{'type':Sequelize[_0xd6f0('0x1')]},'destconnectedlinenum':{'type':Sequelize[_0xd6f0('0x1')]},'destconnectedlinename':{'type':Sequelize[_0xd6f0('0x1')]},'destlanguage':{'type':Sequelize[_0xd6f0('0x1')]},'destaccountcode':{'type':Sequelize['STRING']},'destcontext':{'type':Sequelize[_0xd6f0('0x1')]},'destexten':{'type':Sequelize[_0xd6f0('0x1')]},'destpriority':{'type':Sequelize[_0xd6f0('0x2')]},'destuniqueid':{'type':Sequelize[_0xd6f0('0x1')]},'destlinkedid':{'type':Sequelize['STRING']},'dialstring':{'type':Sequelize[_0xd6f0('0x1')]},'dialstatus':{'type':Sequelize[_0xd6f0('0x1')]},'starttime':{'type':Sequelize[_0xd6f0('0x3')]},'answertime':{'type':Sequelize[_0xd6f0('0x3')]},'endtime':{'type':Sequelize[_0xd6f0('0x3')]},'lastevent':{'type':Sequelize[_0xd6f0('0x1')],'comment':_0xd6f0('0x4')},'routeId':{'type':Sequelize[_0xd6f0('0x2')]},'duration':{'type':Sequelize[_0xd6f0('0x2')]},'holdtime':{'type':Sequelize['INTEGER']},'billableseconds':{'type':Sequelize[_0xd6f0('0x2')]}}; \ No newline at end of file +var _0x425d=['sequelize','STRING','INTEGER','DATE'];(function(_0x12bce9,_0x29c528){var _0x59adcd=function(_0x1ddd8b){while(--_0x1ddd8b){_0x12bce9['push'](_0x12bce9['shift']());}};_0x59adcd(++_0x29c528);}(_0x425d,0x1e0));var _0xd425=function(_0x4a8fea,_0x4603f4){_0x4a8fea=_0x4a8fea-0x0;var _0x5e23a4=_0x425d[_0x4a8fea];return _0x5e23a4;};'use strict';var Sequelize=require(_0xd425('0x0'));module['exports']={'privilege':{'type':Sequelize[_0xd425('0x1')]},'channel':{'type':Sequelize[_0xd425('0x1')]},'channelstate':{'type':Sequelize[_0xd425('0x2')]},'channelstatedesc':{'type':Sequelize[_0xd425('0x1')]},'calleridnum':{'type':Sequelize[_0xd425('0x1')]},'calleridname':{'type':Sequelize[_0xd425('0x1')]},'connectedlinenum':{'type':Sequelize[_0xd425('0x1')]},'connectedlinename':{'type':Sequelize['STRING']},'language':{'type':Sequelize[_0xd425('0x1')]},'accountcode':{'type':Sequelize[_0xd425('0x1')]},'context':{'type':Sequelize[_0xd425('0x1')]},'exten':{'type':Sequelize[_0xd425('0x1')]},'priority':{'type':Sequelize[_0xd425('0x2')]},'uniqueid':{'type':Sequelize[_0xd425('0x1')]},'linkedid':{'type':Sequelize['STRING']},'destchannel':{'type':Sequelize[_0xd425('0x1')]},'destchannelstate':{'type':Sequelize[_0xd425('0x2')]},'destchannelstatedesc':{'type':Sequelize[_0xd425('0x1')]},'destcalleridnum':{'type':Sequelize[_0xd425('0x1')]},'destcalleridname':{'type':Sequelize[_0xd425('0x1')]},'destconnectedlinenum':{'type':Sequelize[_0xd425('0x1')]},'destconnectedlinename':{'type':Sequelize[_0xd425('0x1')]},'destlanguage':{'type':Sequelize[_0xd425('0x1')]},'destaccountcode':{'type':Sequelize[_0xd425('0x1')]},'destcontext':{'type':Sequelize[_0xd425('0x1')]},'destexten':{'type':Sequelize[_0xd425('0x1')]},'destpriority':{'type':Sequelize[_0xd425('0x2')]},'destuniqueid':{'type':Sequelize[_0xd425('0x1')]},'destlinkedid':{'type':Sequelize[_0xd425('0x1')]},'dialstring':{'type':Sequelize[_0xd425('0x1')]},'dialstatus':{'type':Sequelize[_0xd425('0x1')]},'starttime':{'type':Sequelize[_0xd425('0x3')]},'answertime':{'type':Sequelize[_0xd425('0x3')]},'endtime':{'type':Sequelize[_0xd425('0x3')]},'lastevent':{'type':Sequelize[_0xd425('0x1')],'comment':'called,connect,complete'},'routeId':{'type':Sequelize[_0xd425('0x2')]},'duration':{'type':Sequelize[_0xd425('0x2')]},'holdtime':{'type':Sequelize[_0xd425('0x2')]},'billableseconds':{'type':Sequelize['INTEGER']}}; \ No newline at end of file diff --git a/server/api/voiceDialReport/voiceDialReport.controller.js b/server/api/voiceDialReport/voiceDialReport.controller.js index 12bbb6d..245c473 100644 --- a/server/api/voiceDialReport/voiceDialReport.controller.js +++ b/server/api/voiceDialReport/voiceDialReport.controller.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x5129=['ejs','lodash','squel','querystring','../../components/auth/service','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../mysqldb','sendStatus','status','end','json','offset','undefined','limit','count','set','Content-Range','reject','update','then','destroy','error','stack','name','send','index','map','VoiceDialReport','fieldName','key','model','query','keys','filters','intersection','attributes','fields','length','nolimit','order','sort','where','filter','type','options','include','findAll','catch','show','params','rawAttributes','includeAll','merge','find','create','body','describe','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','sox','to-csv'];(function(_0x464855,_0x53da1d){var _0x23e230=function(_0x405fc2){while(--_0x405fc2){_0x464855['push'](_0x464855['shift']());}};_0x23e230(++_0x53da1d);}(_0x5129,0x155));var _0x9512=function(_0x45d0b2,_0x29f9e0){_0x45d0b2=_0x45d0b2-0x0;var _0x3eff94=_0x5129[_0x45d0b2];return _0x3eff94;};'use strict';var emlformat=require('eml-format');var rimraf=require(_0x9512('0x0'));var zipdir=require(_0x9512('0x1'));var jsonpatch=require(_0x9512('0x2'));var rp=require(_0x9512('0x3'));var moment=require(_0x9512('0x4'));var BPromise=require(_0x9512('0x5'));var Mustache=require(_0x9512('0x6'));var util=require('util');var path=require('path');var sox=require(_0x9512('0x7'));var csv=require(_0x9512('0x8'));var ejs=require(_0x9512('0x9'));var fs=require('fs');var fs_extra=require('fs-extra');var _=require(_0x9512('0xa'));var squel=require(_0x9512('0xb'));var crypto=require('crypto');var jsforce=require('jsforce');var deskjs=require('desk.js');var toCsv=require(_0x9512('0x8'));var querystring=require(_0x9512('0xc'));var Papa=require('papaparse');var Redis=require('ioredis');var authService=require(_0x9512('0xd'));var qs=require('../../components/parsers/qs');var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0x9512('0xe'));var logger=require(_0x9512('0xf'))(_0x9512('0x10'));var utils=require(_0x9512('0x11'));var config=require(_0x9512('0x12'));var licenseUtil=require('../../config/license/util');var db=require(_0x9512('0x13'))['db'];function respondWithStatusCode(_0x23f96c,_0x5e4c1a){_0x5e4c1a=_0x5e4c1a||0xcc;return function(_0x796ec6){if(_0x796ec6){return _0x23f96c[_0x9512('0x14')](_0x5e4c1a);}return _0x23f96c[_0x9512('0x15')](_0x5e4c1a)[_0x9512('0x16')]();};}function respondWithResult(_0x3d8971,_0x5444ff){_0x5444ff=_0x5444ff||0xc8;return function(_0x18899a){if(_0x18899a){return _0x3d8971[_0x9512('0x15')](_0x5444ff)[_0x9512('0x17')](_0x18899a);}};}function respondWithFilteredResult(_0x316efb,_0x5494dd){return function(_0x12f5ad){if(_0x12f5ad){var _0x4e4b37=typeof _0x5494dd[_0x9512('0x18')]===_0x9512('0x19')&&typeof _0x5494dd[_0x9512('0x1a')]===_0x9512('0x19');var _0x34446c=_0x12f5ad[_0x9512('0x1b')];var _0x35afb0=_0x4e4b37?0x0:_0x5494dd[_0x9512('0x18')];var _0x182fe5=_0x4e4b37?_0x12f5ad[_0x9512('0x1b')]:_0x5494dd[_0x9512('0x18')]+_0x5494dd[_0x9512('0x1a')];var _0x8fe4ee;if(_0x182fe5>=_0x34446c){_0x182fe5=_0x34446c;_0x8fe4ee=0xc8;}else{_0x8fe4ee=0xce;}_0x316efb[_0x9512('0x15')](_0x8fe4ee);return _0x316efb[_0x9512('0x1c')](_0x9512('0x1d'),_0x35afb0+'-'+_0x182fe5+'/'+_0x34446c)[_0x9512('0x17')](_0x12f5ad);}return null;};}function patchUpdates(_0x344b90){return function(_0x4a3653){try{jsonpatch['apply'](_0x4a3653,_0x344b90,!![]);}catch(_0x5912f9){return BPromise[_0x9512('0x1e')](_0x5912f9);}return _0x4a3653['save']();};}function saveUpdates(_0x53307b,_0x15bc6b){return function(_0x394eab){if(_0x394eab){return _0x394eab[_0x9512('0x1f')](_0x53307b)[_0x9512('0x20')](function(_0x5af2bf){return _0x5af2bf;});}return null;};}function removeEntity(_0x3c6d4f,_0x35bbc7){return function(_0x53b19a){if(_0x53b19a){return _0x53b19a[_0x9512('0x21')]()['then'](function(){_0x3c6d4f[_0x9512('0x15')](0xcc)[_0x9512('0x16')]();});}};}function handleEntityNotFound(_0x19921f,_0x264576){return function(_0x1640d4){if(!_0x1640d4){_0x19921f[_0x9512('0x14')](0x194);}return _0x1640d4;};}function handleError(_0x4d05da,_0x478268){_0x478268=_0x478268||0x1f4;return function(_0x370a8d){logger[_0x9512('0x22')](_0x370a8d[_0x9512('0x23')]);if(_0x370a8d[_0x9512('0x24')]){delete _0x370a8d['name'];}_0x4d05da['status'](_0x478268)[_0x9512('0x25')](_0x370a8d);};}exports[_0x9512('0x26')]=function(_0x365aca,_0xc0deff){var _0x3658f9={},_0x5f4ed7={},_0x4011b9={'count':0x0,'rows':[]};var _0x579b70=_[_0x9512('0x27')](db[_0x9512('0x28')]['rawAttributes'],function(_0x1f8dbc){return{'name':_0x1f8dbc[_0x9512('0x29')],'type':_0x1f8dbc['type'][_0x9512('0x2a')]};});_0x5f4ed7[_0x9512('0x2b')]=_[_0x9512('0x27')](_0x579b70,_0x9512('0x24'));_0x5f4ed7[_0x9512('0x2c')]=_[_0x9512('0x2d')](_0x365aca[_0x9512('0x2c')]);_0x5f4ed7[_0x9512('0x2e')]=_[_0x9512('0x2f')](_0x5f4ed7[_0x9512('0x2b')],_0x5f4ed7[_0x9512('0x2c')]);_0x3658f9[_0x9512('0x30')]=_[_0x9512('0x2f')](_0x5f4ed7[_0x9512('0x2b')],qs[_0x9512('0x31')](_0x365aca[_0x9512('0x2c')][_0x9512('0x31')]));_0x3658f9['attributes']=_0x3658f9['attributes'][_0x9512('0x32')]?_0x3658f9[_0x9512('0x30')]:_0x5f4ed7[_0x9512('0x2b')];if(!_0x365aca[_0x9512('0x2c')]['hasOwnProperty'](_0x9512('0x33'))){_0x3658f9[_0x9512('0x1a')]=qs[_0x9512('0x1a')](_0x365aca['query'][_0x9512('0x1a')]);_0x3658f9[_0x9512('0x18')]=qs['offset'](_0x365aca[_0x9512('0x2c')][_0x9512('0x18')]);}_0x3658f9[_0x9512('0x34')]=qs[_0x9512('0x35')](_0x365aca['query'][_0x9512('0x35')]);_0x3658f9[_0x9512('0x36')]=qs[_0x9512('0x2e')](_['pick'](_0x365aca[_0x9512('0x2c')],_0x5f4ed7['filters']),_0x579b70);if(_0x365aca['query'][_0x9512('0x37')]){_0x3658f9[_0x9512('0x36')]=_['merge'](_0x3658f9[_0x9512('0x36')],{'$or':_[_0x9512('0x27')](_0x579b70,function(_0x577b6d){if(_0x577b6d[_0x9512('0x38')]!=='VIRTUAL'){var _0x4d610b={};_0x4d610b[_0x577b6d[_0x9512('0x24')]]={'$like':'%'+_0x365aca['query'][_0x9512('0x37')]+'%'};return _0x4d610b;}})});}_0x3658f9=_['merge']({},_0x3658f9,_0x365aca[_0x9512('0x39')]);var _0xe840c5={'where':_0x3658f9[_0x9512('0x36')]};return db['VoiceDialReport'][_0x9512('0x1b')](_0xe840c5)[_0x9512('0x20')](function(_0x55b710){_0x4011b9['count']=_0x55b710;if(_0x365aca['query']['includeAll']){_0x3658f9[_0x9512('0x3a')]=[{'all':!![]}];}return db['VoiceDialReport'][_0x9512('0x3b')](_0x3658f9);})['then'](function(_0x92f1bd){_0x4011b9['rows']=_0x92f1bd;return _0x4011b9;})[_0x9512('0x20')](respondWithFilteredResult(_0xc0deff,_0x3658f9))[_0x9512('0x3c')](handleError(_0xc0deff,null));};exports[_0x9512('0x3d')]=function(_0x1e8316,_0x39e589){var _0x3d104d={'raw':!![],'where':{'id':_0x1e8316[_0x9512('0x3e')]['id']}},_0x573d7a={};_0x573d7a[_0x9512('0x2b')]=_[_0x9512('0x2d')](db['VoiceDialReport'][_0x9512('0x3f')]);_0x573d7a[_0x9512('0x2c')]=_[_0x9512('0x2d')](_0x1e8316['query']);_0x573d7a[_0x9512('0x2e')]=_[_0x9512('0x2f')](_0x573d7a[_0x9512('0x2b')],_0x573d7a[_0x9512('0x2c')]);_0x3d104d[_0x9512('0x30')]=_[_0x9512('0x2f')](_0x573d7a[_0x9512('0x2b')],qs[_0x9512('0x31')](_0x1e8316['query'][_0x9512('0x31')]));_0x3d104d[_0x9512('0x30')]=_0x3d104d[_0x9512('0x30')]['length']?_0x3d104d[_0x9512('0x30')]:_0x573d7a['model'];if(_0x1e8316[_0x9512('0x2c')][_0x9512('0x40')]){_0x3d104d[_0x9512('0x3a')]=[{'all':!![]}];}_0x3d104d=_[_0x9512('0x41')]({},_0x3d104d,_0x1e8316[_0x9512('0x39')]);return db[_0x9512('0x28')][_0x9512('0x42')](_0x3d104d)[_0x9512('0x20')](handleEntityNotFound(_0x39e589,null))[_0x9512('0x20')](respondWithResult(_0x39e589,null))['catch'](handleError(_0x39e589,null));};exports[_0x9512('0x43')]=function(_0x39bc09,_0x323677){return db[_0x9512('0x28')][_0x9512('0x43')](_0x39bc09[_0x9512('0x44')],{})['then'](respondWithResult(_0x323677,0xc9))[_0x9512('0x3c')](handleError(_0x323677,null));};exports[_0x9512('0x1f')]=function(_0xabf7ed,_0x51abf0){if(_0xabf7ed[_0x9512('0x44')]['id']){delete _0xabf7ed[_0x9512('0x44')]['id'];}return db[_0x9512('0x28')][_0x9512('0x42')]({'where':{'id':_0xabf7ed[_0x9512('0x3e')]['id']}})[_0x9512('0x20')](handleEntityNotFound(_0x51abf0,null))[_0x9512('0x20')](saveUpdates(_0xabf7ed[_0x9512('0x44')],null))['then'](respondWithResult(_0x51abf0,null))[_0x9512('0x3c')](handleError(_0x51abf0,null));};exports[_0x9512('0x21')]=function(_0x1e9f71,_0x4bedcb){return db[_0x9512('0x28')][_0x9512('0x42')]({'where':{'id':_0x1e9f71[_0x9512('0x3e')]['id']}})['then'](handleEntityNotFound(_0x4bedcb,null))['then'](removeEntity(_0x4bedcb,null))[_0x9512('0x3c')](handleError(_0x4bedcb,null));};exports[_0x9512('0x45')]=function(_0x18d9e8,_0x1b3666){return db['VoiceDialReport'][_0x9512('0x45')]()[_0x9512('0x20')](respondWithResult(_0x1b3666,null))['catch'](handleError(_0x1b3666,null));}; \ No newline at end of file +var _0x921d=['VIRTUAL','options','VoiceDialReport','rows','catch','keys','includeAll','include','find','create','body','params','describe','rimraf','zip-dir','fast-json-patch','moment','bluebird','mustache','util','sox','to-csv','ejs','fs-extra','lodash','crypto','jsforce','querystring','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','api','../../config/utils','../../config/license/util','../../mysqldb','sendStatus','status','end','json','undefined','limit','count','set','apply','reject','save','update','then','destroy','error','stack','name','send','index','map','fieldName','type','key','model','query','filters','intersection','attributes','fields','length','hasOwnProperty','offset','order','sort','pick','filter','merge','where'];(function(_0x5da82e,_0x2cf875){var _0x49a714=function(_0xc240b0){while(--_0xc240b0){_0x5da82e['push'](_0x5da82e['shift']());}};_0x49a714(++_0x2cf875);}(_0x921d,0x1cf));var _0xd921=function(_0x1aca63,_0xde7170){_0x1aca63=_0x1aca63-0x0;var _0x5dbddb=_0x921d[_0x1aca63];return _0x5dbddb;};'use strict';var emlformat=require('eml-format');var rimraf=require(_0xd921('0x0'));var zipdir=require(_0xd921('0x1'));var jsonpatch=require(_0xd921('0x2'));var rp=require('request-promise');var moment=require(_0xd921('0x3'));var BPromise=require(_0xd921('0x4'));var Mustache=require(_0xd921('0x5'));var util=require(_0xd921('0x6'));var path=require('path');var sox=require(_0xd921('0x7'));var csv=require(_0xd921('0x8'));var ejs=require(_0xd921('0x9'));var fs=require('fs');var fs_extra=require(_0xd921('0xa'));var _=require(_0xd921('0xb'));var squel=require('squel');var crypto=require(_0xd921('0xc'));var jsforce=require(_0xd921('0xd'));var deskjs=require('desk.js');var toCsv=require(_0xd921('0x8'));var querystring=require(_0xd921('0xe'));var Papa=require('papaparse');var Redis=require(_0xd921('0xf'));var authService=require(_0xd921('0x10'));var qs=require(_0xd921('0x11'));var as=require(_0xd921('0x12'));var hardwareService=require(_0xd921('0x13'));var logger=require('../../config/logger')(_0xd921('0x14'));var utils=require(_0xd921('0x15'));var config=require('../../config/environment');var licenseUtil=require(_0xd921('0x16'));var db=require(_0xd921('0x17'))['db'];function respondWithStatusCode(_0x59a672,_0x28592c){_0x28592c=_0x28592c||0xcc;return function(_0x3c4009){if(_0x3c4009){return _0x59a672[_0xd921('0x18')](_0x28592c);}return _0x59a672[_0xd921('0x19')](_0x28592c)[_0xd921('0x1a')]();};}function respondWithResult(_0x373f34,_0x4ded72){_0x4ded72=_0x4ded72||0xc8;return function(_0x3f7c93){if(_0x3f7c93){return _0x373f34[_0xd921('0x19')](_0x4ded72)[_0xd921('0x1b')](_0x3f7c93);}};}function respondWithFilteredResult(_0x3f010e,_0x35824b){return function(_0x3ca9a2){if(_0x3ca9a2){var _0x425fb9=typeof _0x35824b['offset']===_0xd921('0x1c')&&typeof _0x35824b[_0xd921('0x1d')]===_0xd921('0x1c');var _0x195f65=_0x3ca9a2[_0xd921('0x1e')];var _0x3f711b=_0x425fb9?0x0:_0x35824b['offset'];var _0x2474b3=_0x425fb9?_0x3ca9a2[_0xd921('0x1e')]:_0x35824b['offset']+_0x35824b['limit'];var _0x4621f0;if(_0x2474b3>=_0x195f65){_0x2474b3=_0x195f65;_0x4621f0=0xc8;}else{_0x4621f0=0xce;}_0x3f010e[_0xd921('0x19')](_0x4621f0);return _0x3f010e[_0xd921('0x1f')]('Content-Range',_0x3f711b+'-'+_0x2474b3+'/'+_0x195f65)[_0xd921('0x1b')](_0x3ca9a2);}return null;};}function patchUpdates(_0x1baeec){return function(_0x353244){try{jsonpatch[_0xd921('0x20')](_0x353244,_0x1baeec,!![]);}catch(_0x4b7c4e){return BPromise[_0xd921('0x21')](_0x4b7c4e);}return _0x353244[_0xd921('0x22')]();};}function saveUpdates(_0x27bf1a,_0x514e99){return function(_0x5d2784){if(_0x5d2784){return _0x5d2784[_0xd921('0x23')](_0x27bf1a)[_0xd921('0x24')](function(_0x422bad){return _0x422bad;});}return null;};}function removeEntity(_0x488016,_0x296319){return function(_0x525ea6){if(_0x525ea6){return _0x525ea6[_0xd921('0x25')]()[_0xd921('0x24')](function(){_0x488016[_0xd921('0x19')](0xcc)[_0xd921('0x1a')]();});}};}function handleEntityNotFound(_0xf516c0,_0x145603){return function(_0x429f4b){if(!_0x429f4b){_0xf516c0[_0xd921('0x18')](0x194);}return _0x429f4b;};}function handleError(_0x28859a,_0x54755f){_0x54755f=_0x54755f||0x1f4;return function(_0x3f8dba){logger[_0xd921('0x26')](_0x3f8dba[_0xd921('0x27')]);if(_0x3f8dba[_0xd921('0x28')]){delete _0x3f8dba[_0xd921('0x28')];}_0x28859a[_0xd921('0x19')](_0x54755f)[_0xd921('0x29')](_0x3f8dba);};}exports[_0xd921('0x2a')]=function(_0x3c8cf9,_0x5ebb57){var _0x5c4e20={},_0x3c56dc={},_0x7c5674={'count':0x0,'rows':[]};var _0x2b162e=_[_0xd921('0x2b')](db['VoiceDialReport']['rawAttributes'],function(_0x8b700e){return{'name':_0x8b700e[_0xd921('0x2c')],'type':_0x8b700e[_0xd921('0x2d')][_0xd921('0x2e')]};});_0x3c56dc[_0xd921('0x2f')]=_[_0xd921('0x2b')](_0x2b162e,_0xd921('0x28'));_0x3c56dc[_0xd921('0x30')]=_['keys'](_0x3c8cf9[_0xd921('0x30')]);_0x3c56dc[_0xd921('0x31')]=_[_0xd921('0x32')](_0x3c56dc[_0xd921('0x2f')],_0x3c56dc['query']);_0x5c4e20[_0xd921('0x33')]=_[_0xd921('0x32')](_0x3c56dc['model'],qs[_0xd921('0x34')](_0x3c8cf9[_0xd921('0x30')][_0xd921('0x34')]));_0x5c4e20[_0xd921('0x33')]=_0x5c4e20[_0xd921('0x33')][_0xd921('0x35')]?_0x5c4e20[_0xd921('0x33')]:_0x3c56dc['model'];if(!_0x3c8cf9[_0xd921('0x30')][_0xd921('0x36')]('nolimit')){_0x5c4e20['limit']=qs[_0xd921('0x1d')](_0x3c8cf9['query']['limit']);_0x5c4e20[_0xd921('0x37')]=qs['offset'](_0x3c8cf9['query']['offset']);}_0x5c4e20[_0xd921('0x38')]=qs[_0xd921('0x39')](_0x3c8cf9[_0xd921('0x30')][_0xd921('0x39')]);_0x5c4e20['where']=qs[_0xd921('0x31')](_[_0xd921('0x3a')](_0x3c8cf9[_0xd921('0x30')],_0x3c56dc[_0xd921('0x31')]),_0x2b162e);if(_0x3c8cf9[_0xd921('0x30')][_0xd921('0x3b')]){_0x5c4e20['where']=_[_0xd921('0x3c')](_0x5c4e20[_0xd921('0x3d')],{'$or':_['map'](_0x2b162e,function(_0x214f5c){if(_0x214f5c[_0xd921('0x2d')]!==_0xd921('0x3e')){var _0x5034ff={};_0x5034ff[_0x214f5c[_0xd921('0x28')]]={'$like':'%'+_0x3c8cf9[_0xd921('0x30')][_0xd921('0x3b')]+'%'};return _0x5034ff;}})});}_0x5c4e20=_[_0xd921('0x3c')]({},_0x5c4e20,_0x3c8cf9[_0xd921('0x3f')]);var _0x490c47={'where':_0x5c4e20[_0xd921('0x3d')]};return db[_0xd921('0x40')][_0xd921('0x1e')](_0x490c47)[_0xd921('0x24')](function(_0x191a5d){_0x7c5674[_0xd921('0x1e')]=_0x191a5d;if(_0x3c8cf9[_0xd921('0x30')]['includeAll']){_0x5c4e20['include']=[{'all':!![]}];}return db[_0xd921('0x40')]['findAll'](_0x5c4e20);})[_0xd921('0x24')](function(_0xf0810f){_0x7c5674[_0xd921('0x41')]=_0xf0810f;return _0x7c5674;})[_0xd921('0x24')](respondWithFilteredResult(_0x5ebb57,_0x5c4e20))[_0xd921('0x42')](handleError(_0x5ebb57,null));};exports['show']=function(_0x5ed94a,_0x7cb91c){var _0x1eec30={'raw':!![],'where':{'id':_0x5ed94a['params']['id']}},_0x42250e={};_0x42250e['model']=_[_0xd921('0x43')](db['VoiceDialReport']['rawAttributes']);_0x42250e['query']=_[_0xd921('0x43')](_0x5ed94a[_0xd921('0x30')]);_0x42250e[_0xd921('0x31')]=_[_0xd921('0x32')](_0x42250e[_0xd921('0x2f')],_0x42250e['query']);_0x1eec30[_0xd921('0x33')]=_[_0xd921('0x32')](_0x42250e[_0xd921('0x2f')],qs[_0xd921('0x34')](_0x5ed94a[_0xd921('0x30')][_0xd921('0x34')]));_0x1eec30[_0xd921('0x33')]=_0x1eec30['attributes']['length']?_0x1eec30[_0xd921('0x33')]:_0x42250e[_0xd921('0x2f')];if(_0x5ed94a[_0xd921('0x30')][_0xd921('0x44')]){_0x1eec30[_0xd921('0x45')]=[{'all':!![]}];}_0x1eec30=_[_0xd921('0x3c')]({},_0x1eec30,_0x5ed94a['options']);return db[_0xd921('0x40')][_0xd921('0x46')](_0x1eec30)['then'](handleEntityNotFound(_0x7cb91c,null))[_0xd921('0x24')](respondWithResult(_0x7cb91c,null))[_0xd921('0x42')](handleError(_0x7cb91c,null));};exports[_0xd921('0x47')]=function(_0x2c8083,_0x205a90){return db[_0xd921('0x40')][_0xd921('0x47')](_0x2c8083[_0xd921('0x48')],{})[_0xd921('0x24')](respondWithResult(_0x205a90,0xc9))[_0xd921('0x42')](handleError(_0x205a90,null));};exports[_0xd921('0x23')]=function(_0x1bd872,_0x2b16e2){if(_0x1bd872[_0xd921('0x48')]['id']){delete _0x1bd872[_0xd921('0x48')]['id'];}return db[_0xd921('0x40')]['find']({'where':{'id':_0x1bd872[_0xd921('0x49')]['id']}})[_0xd921('0x24')](handleEntityNotFound(_0x2b16e2,null))[_0xd921('0x24')](saveUpdates(_0x1bd872[_0xd921('0x48')],null))[_0xd921('0x24')](respondWithResult(_0x2b16e2,null))['catch'](handleError(_0x2b16e2,null));};exports['destroy']=function(_0x16218a,_0x2668dc){return db[_0xd921('0x40')][_0xd921('0x46')]({'where':{'id':_0x16218a[_0xd921('0x49')]['id']}})[_0xd921('0x24')](handleEntityNotFound(_0x2668dc,null))[_0xd921('0x24')](removeEntity(_0x2668dc,null))['catch'](handleError(_0x2668dc,null));};exports['describe']=function(_0x4b82f0,_0x1437da){return db[_0xd921('0x40')][_0xd921('0x4a')]()[_0xd921('0x24')](respondWithResult(_0x1437da,null))[_0xd921('0x42')](handleError(_0x1437da,null));}; \ No newline at end of file diff --git a/server/api/voiceDialReport/voiceDialReport.model.js b/server/api/voiceDialReport/voiceDialReport.model.js index a2c42dd..5268c04 100644 --- a/server/api/voiceDialReport/voiceDialReport.model.js +++ b/server/api/voiceDialReport/voiceDialReport.model.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x49b7=['VoiceDialReport','report_dial','uniqueid','lodash','../../config/logger','api','moment','bluebird','request-promise','path','rimraf','../../config/environment','./voiceDialReport.attributes','define'];(function(_0x44b452,_0x4cf7c4){var _0x3bd8cd=function(_0x5935f4){while(--_0x5935f4){_0x44b452['push'](_0x44b452['shift']());}};_0x3bd8cd(++_0x4cf7c4);}(_0x49b7,0x73));var _0x749b=function(_0xd816e2,_0x5edac2){_0xd816e2=_0xd816e2-0x0;var _0x1f5924=_0x49b7[_0xd816e2];return _0x1f5924;};'use strict';var _=require(_0x749b('0x0'));var util=require('util');var logger=require(_0x749b('0x1'))(_0x749b('0x2'));var moment=require(_0x749b('0x3'));var BPromise=require(_0x749b('0x4'));var rp=require(_0x749b('0x5'));var fs=require('fs');var path=require(_0x749b('0x6'));var rimraf=require(_0x749b('0x7'));var config=require(_0x749b('0x8'));var attributes=require(_0x749b('0x9'));module['exports']=function(_0x52d0b8,_0x43a79a){return _0x52d0b8[_0x749b('0xa')](_0x749b('0xb'),attributes,{'tableName':_0x749b('0xc'),'paranoid':![],'indexes':[{'fields':[_0x749b('0xd')]}],'timestamps':!![]});}; \ No newline at end of file +var _0xe526=['bluebird','request-promise','path','rimraf','../../config/environment','./voiceDialReport.attributes','define','VoiceDialReport','uniqueid','util','api'];(function(_0x30b076,_0x8d6de2){var _0x5eef6e=function(_0x3910af){while(--_0x3910af){_0x30b076['push'](_0x30b076['shift']());}};_0x5eef6e(++_0x8d6de2);}(_0xe526,0x6c));var _0x6e52=function(_0x5d2d4f,_0x4b7dde){_0x5d2d4f=_0x5d2d4f-0x0;var _0x5e1044=_0xe526[_0x5d2d4f];return _0x5e1044;};'use strict';var _=require('lodash');var util=require(_0x6e52('0x0'));var logger=require('../../config/logger')(_0x6e52('0x1'));var moment=require('moment');var BPromise=require(_0x6e52('0x2'));var rp=require(_0x6e52('0x3'));var fs=require('fs');var path=require(_0x6e52('0x4'));var rimraf=require(_0x6e52('0x5'));var config=require(_0x6e52('0x6'));var attributes=require(_0x6e52('0x7'));module['exports']=function(_0xf6cc3a,_0x652124){return _0xf6cc3a[_0x6e52('0x8')](_0x6e52('0x9'),attributes,{'tableName':'report_dial','paranoid':![],'indexes':[{'fields':[_0x6e52('0xa')]}],'timestamps':!![]});}; \ No newline at end of file diff --git a/server/api/voiceDialReport/voiceDialReport.rpc.js b/server/api/voiceDialReport/voiceDialReport.rpc.js index dd602a5..0ec2a96 100644 --- a/server/api/voiceDialReport/voiceDialReport.rpc.js +++ b/server/api/voiceDialReport/voiceDialReport.rpc.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xe84e=['stringify','error','code','message','result','catch','CreateVoiceDialReport','VoiceDialReport','create','options','raw','update','body','attributes','limit','UpdateVoiceDialReport','lodash','util','bluebird','randomstring','ioredis','../../mysqldb','../../config/logger','rpc','jayson/promise','http','request','then','info','VoiceDialReport,\x20%s,\x20%s','request\x20sent','debug','VoiceDialReport,\x20%s,\x20%s,\x20%s'];(function(_0x140793,_0x3e7a0d){var _0xefddc8=function(_0x5e70f6){while(--_0x5e70f6){_0x140793['push'](_0x140793['shift']());}};_0xefddc8(++_0x3e7a0d);}(_0xe84e,0x19c));var _0xee84=function(_0x9faff7,_0x59a564){_0x9faff7=_0x9faff7-0x0;var _0x4f8043=_0xe84e[_0x9faff7];return _0x4f8043;};'use strict';var _=require(_0xee84('0x0'));var util=require(_0xee84('0x1'));var moment=require('moment');var BPromise=require(_0xee84('0x2'));var rs=require(_0xee84('0x3'));var fs=require('fs');var Redis=require(_0xee84('0x4'));var db=require(_0xee84('0x5'))['db'];var utils=require('../../config/utils');var logger=require(_0xee84('0x6'))(_0xee84('0x7'));var config=require('../../config/environment');var jayson=require(_0xee84('0x8'));var client=jayson['client'][_0xee84('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x399718,_0x1d4b12,_0x43e11c){return new BPromise(function(_0x5a5d15,_0x19972d){return client[_0xee84('0xa')](_0x399718,_0x43e11c)[_0xee84('0xb')](function(_0x18ba93){logger[_0xee84('0xc')](_0xee84('0xd'),_0x1d4b12,_0xee84('0xe'));logger[_0xee84('0xf')](_0xee84('0x10'),_0x1d4b12,_0xee84('0xe'),JSON[_0xee84('0x11')](_0x18ba93));if(_0x18ba93[_0xee84('0x12')]){if(_0x18ba93[_0xee84('0x12')][_0xee84('0x13')]===0x1f4){logger['error'](_0xee84('0xd'),_0x1d4b12,_0x18ba93[_0xee84('0x12')][_0xee84('0x14')]);return _0x19972d(_0x18ba93['error']['message']);}logger[_0xee84('0x12')]('VoiceDialReport,\x20%s,\x20%s',_0x1d4b12,_0x18ba93[_0xee84('0x12')][_0xee84('0x14')]);return _0x5a5d15(_0x18ba93[_0xee84('0x12')][_0xee84('0x14')]);}else{logger[_0xee84('0xc')](_0xee84('0xd'),_0x1d4b12,'request\x20sent');_0x5a5d15(_0x18ba93[_0xee84('0x15')][_0xee84('0x14')]);}})[_0xee84('0x16')](function(_0x4ff8f7){logger[_0xee84('0x12')]('VoiceDialReport,\x20%s,\x20%s',_0x1d4b12,_0x4ff8f7);_0x19972d(_0x4ff8f7);});});}exports[_0xee84('0x17')]=function(_0x1a6315){var _0x2a9c75=this;return new Promise(function(_0x2a7063,_0x95dbbc){return db[_0xee84('0x18')][_0xee84('0x19')](_0x1a6315['body'],{'raw':_0x1a6315[_0xee84('0x1a')]?_0x1a6315[_0xee84('0x1a')][_0xee84('0x1b')]===undefined?!![]:![]:!![]})[_0xee84('0xb')](function(_0x2d560e){logger[_0xee84('0xc')](_0xee84('0x17'),_0x1a6315);logger[_0xee84('0xf')](_0xee84('0x17'),_0x1a6315,JSON[_0xee84('0x11')](_0x2d560e));_0x2a7063(_0x2d560e);})[_0xee84('0x16')](function(_0x5f2ef1){logger[_0xee84('0x12')](_0xee84('0x17'),_0x5f2ef1[_0xee84('0x14')],_0x1a6315);_0x95dbbc(_0x2a9c75[_0xee84('0x12')](0x1f4,_0x5f2ef1[_0xee84('0x14')]));});});};exports['UpdateVoiceDialReport']=function(_0x89604b){var _0x14f0f8=this;return new Promise(function(_0x44dc28,_0x2463ba){return db['VoiceDialReport'][_0xee84('0x1c')](_0x89604b[_0xee84('0x1d')],{'raw':_0x89604b[_0xee84('0x1a')]?_0x89604b['options']['raw']===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x89604b[_0xee84('0x1a')]?_0x89604b[_0xee84('0x1a')]['where']||null:null,'attributes':_0x89604b[_0xee84('0x1a')]?_0x89604b['options'][_0xee84('0x1e')]||null:null,'limit':_0x89604b[_0xee84('0x1a')]?_0x89604b['options'][_0xee84('0x1f')]||null:null})['then'](function(_0x46950b){logger[_0xee84('0xc')]('UpdateVoiceDialReport',_0x89604b);logger[_0xee84('0xf')](_0xee84('0x20'),_0x89604b,JSON['stringify'](_0x46950b));_0x44dc28(_0x46950b);})[_0xee84('0x16')](function(_0x2f5374){logger[_0xee84('0x12')](_0xee84('0x20'),_0x2f5374[_0xee84('0x14')],_0x89604b);_0x2463ba(_0x14f0f8[_0xee84('0x12')](0x1f4,_0x2f5374['message']));});});}; \ No newline at end of file +var _0x7cfd=['../../config/environment','jayson/promise','request','then','info','VoiceDialReport,\x20%s,\x20%s','request\x20sent','debug','error','code','message','result','catch','CreateVoiceDialReport','create','body','options','raw','stringify','UpdateVoiceDialReport','VoiceDialReport','where','attributes','limit','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger'];(function(_0x19359a,_0x2f2c09){var _0x1231af=function(_0x15e097){while(--_0x15e097){_0x19359a['push'](_0x19359a['shift']());}};_0x1231af(++_0x2f2c09);}(_0x7cfd,0xd8));var _0xd7cf=function(_0x52d7c1,_0x5f1d4e){_0x52d7c1=_0x52d7c1-0x0;var _0x5752e9=_0x7cfd[_0x52d7c1];return _0x5752e9;};'use strict';var _=require('lodash');var util=require(_0xd7cf('0x0'));var moment=require(_0xd7cf('0x1'));var BPromise=require(_0xd7cf('0x2'));var rs=require(_0xd7cf('0x3'));var fs=require('fs');var Redis=require(_0xd7cf('0x4'));var db=require(_0xd7cf('0x5'))['db'];var utils=require(_0xd7cf('0x6'));var logger=require(_0xd7cf('0x7'))('rpc');var config=require(_0xd7cf('0x8'));var jayson=require(_0xd7cf('0x9'));var client=jayson['client']['http']({'port':0x232a});function respondWithRpcPromise(_0x334ae2,_0x4ba33e,_0x2a29f9){return new BPromise(function(_0x1423ec,_0x3d5bca){return client[_0xd7cf('0xa')](_0x334ae2,_0x2a29f9)[_0xd7cf('0xb')](function(_0x242386){logger[_0xd7cf('0xc')](_0xd7cf('0xd'),_0x4ba33e,_0xd7cf('0xe'));logger[_0xd7cf('0xf')]('VoiceDialReport,\x20%s,\x20%s,\x20%s',_0x4ba33e,_0xd7cf('0xe'),JSON['stringify'](_0x242386));if(_0x242386[_0xd7cf('0x10')]){if(_0x242386[_0xd7cf('0x10')][_0xd7cf('0x11')]===0x1f4){logger[_0xd7cf('0x10')](_0xd7cf('0xd'),_0x4ba33e,_0x242386[_0xd7cf('0x10')][_0xd7cf('0x12')]);return _0x3d5bca(_0x242386[_0xd7cf('0x10')][_0xd7cf('0x12')]);}logger['error'](_0xd7cf('0xd'),_0x4ba33e,_0x242386['error'][_0xd7cf('0x12')]);return _0x1423ec(_0x242386[_0xd7cf('0x10')][_0xd7cf('0x12')]);}else{logger[_0xd7cf('0xc')](_0xd7cf('0xd'),_0x4ba33e,_0xd7cf('0xe'));_0x1423ec(_0x242386[_0xd7cf('0x13')][_0xd7cf('0x12')]);}})[_0xd7cf('0x14')](function(_0x1ecc3b){logger[_0xd7cf('0x10')](_0xd7cf('0xd'),_0x4ba33e,_0x1ecc3b);_0x3d5bca(_0x1ecc3b);});});}exports[_0xd7cf('0x15')]=function(_0x292c91){var _0x3a38ca=this;return new Promise(function(_0x38409e,_0xefed02){return db['VoiceDialReport'][_0xd7cf('0x16')](_0x292c91[_0xd7cf('0x17')],{'raw':_0x292c91[_0xd7cf('0x18')]?_0x292c91[_0xd7cf('0x18')][_0xd7cf('0x19')]===undefined?!![]:![]:!![]})[_0xd7cf('0xb')](function(_0x4a162f){logger[_0xd7cf('0xc')](_0xd7cf('0x15'),_0x292c91);logger[_0xd7cf('0xf')](_0xd7cf('0x15'),_0x292c91,JSON[_0xd7cf('0x1a')](_0x4a162f));_0x38409e(_0x4a162f);})['catch'](function(_0x1ee6de){logger[_0xd7cf('0x10')]('CreateVoiceDialReport',_0x1ee6de[_0xd7cf('0x12')],_0x292c91);_0xefed02(_0x3a38ca[_0xd7cf('0x10')](0x1f4,_0x1ee6de[_0xd7cf('0x12')]));});});};exports[_0xd7cf('0x1b')]=function(_0x6e29ee){var _0x3bfb5f=this;return new Promise(function(_0x2bc5f8,_0x2e4a2e){return db[_0xd7cf('0x1c')]['update'](_0x6e29ee[_0xd7cf('0x17')],{'raw':_0x6e29ee[_0xd7cf('0x18')]?_0x6e29ee[_0xd7cf('0x18')][_0xd7cf('0x19')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x6e29ee[_0xd7cf('0x18')]?_0x6e29ee[_0xd7cf('0x18')][_0xd7cf('0x1d')]||null:null,'attributes':_0x6e29ee[_0xd7cf('0x18')]?_0x6e29ee['options'][_0xd7cf('0x1e')]||null:null,'limit':_0x6e29ee[_0xd7cf('0x18')]?_0x6e29ee[_0xd7cf('0x18')][_0xd7cf('0x1f')]||null:null})['then'](function(_0x349d6c){logger[_0xd7cf('0xc')](_0xd7cf('0x1b'),_0x6e29ee);logger[_0xd7cf('0xf')](_0xd7cf('0x1b'),_0x6e29ee,JSON['stringify'](_0x349d6c));_0x2bc5f8(_0x349d6c);})['catch'](function(_0x439904){logger[_0xd7cf('0x10')]('UpdateVoiceDialReport',_0x439904[_0xd7cf('0x12')],_0x6e29ee);_0x2e4a2e(_0x3bfb5f[_0xd7cf('0x10')](0x1f4,_0x439904[_0xd7cf('0x12')]));});});}; \ No newline at end of file diff --git a/server/api/voiceExtension/index.js b/server/api/voiceExtension/index.js index f4724bd..34a2f25 100644 --- a/server/api/voiceExtension/index.js +++ b/server/api/voiceExtension/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x3213=['put','update','destroy','exports','multer','util','express','../../components/auth/service','../../components/interaction/service','./voiceExtension.controller','get','index','/:id','isAuthenticated','post','create','addApplications'];(function(_0x2da73a,_0x3ffebe){var _0x259745=function(_0xfd2126){while(--_0xfd2126){_0x2da73a['push'](_0x2da73a['shift']());}};_0x259745(++_0x3ffebe);}(_0x3213,0xae));var _0x3321=function(_0x3ca68e,_0x39027){_0x3ca68e=_0x3ca68e-0x0;var _0x13eae2=_0x3213[_0x3ca68e];return _0x13eae2;};'use strict';var multer=require(_0x3321('0x0'));var util=require(_0x3321('0x1'));var path=require('path');var timeout=require('connect-timeout');var express=require(_0x3321('0x2'));var router=express['Router']();var fs_extra=require('fs-extra');var auth=require(_0x3321('0x3'));var interaction=require(_0x3321('0x4'));var config=require('../../config/environment');var controller=require(_0x3321('0x5'));router[_0x3321('0x6')]('/',auth['isAuthenticated'](),controller[_0x3321('0x7')]);router[_0x3321('0x6')](_0x3321('0x8'),auth[_0x3321('0x9')](),controller['show']);router[_0x3321('0xa')]('/',auth[_0x3321('0x9')](),controller[_0x3321('0xb')]);router[_0x3321('0xa')]('/:id/applications',auth[_0x3321('0x9')](),controller[_0x3321('0xc')]);router[_0x3321('0xd')](_0x3321('0x8'),auth[_0x3321('0x9')](),controller[_0x3321('0xe')]);router['delete']('/:id',auth[_0x3321('0x9')](),controller[_0x3321('0xf')]);module[_0x3321('0x10')]=router; \ No newline at end of file +var _0x89bd=['get','/:id','show','create','/:id/applications','addApplications','put','delete','destroy','exports','multer','util','path','express','Router','../../components/interaction/service','../../config/environment','isAuthenticated','index'];(function(_0x444bb3,_0x4e4f03){var _0x18de2c=function(_0x4de2ef){while(--_0x4de2ef){_0x444bb3['push'](_0x444bb3['shift']());}};_0x18de2c(++_0x4e4f03);}(_0x89bd,0xb5));var _0xd89b=function(_0x4c5276,_0x29c86c){_0x4c5276=_0x4c5276-0x0;var _0x17d86a=_0x89bd[_0x4c5276];return _0x17d86a;};'use strict';var multer=require(_0xd89b('0x0'));var util=require(_0xd89b('0x1'));var path=require(_0xd89b('0x2'));var timeout=require('connect-timeout');var express=require(_0xd89b('0x3'));var router=express[_0xd89b('0x4')]();var fs_extra=require('fs-extra');var auth=require('../../components/auth/service');var interaction=require(_0xd89b('0x5'));var config=require(_0xd89b('0x6'));var controller=require('./voiceExtension.controller');router['get']('/',auth[_0xd89b('0x7')](),controller[_0xd89b('0x8')]);router[_0xd89b('0x9')](_0xd89b('0xa'),auth['isAuthenticated'](),controller[_0xd89b('0xb')]);router['post']('/',auth[_0xd89b('0x7')](),controller[_0xd89b('0xc')]);router['post'](_0xd89b('0xd'),auth[_0xd89b('0x7')](),controller[_0xd89b('0xe')]);router[_0xd89b('0xf')](_0xd89b('0xa'),auth['isAuthenticated'](),controller['update']);router[_0xd89b('0x10')](_0xd89b('0xa'),auth['isAuthenticated'](),controller[_0xd89b('0x11')]);module[_0xd89b('0x12')]=router; \ No newline at end of file diff --git a/server/api/voiceExtension/voiceExtension.attributes.js b/server/api/voiceExtension/voiceExtension.attributes.js index 55d6078..aa92e61 100644 --- a/server/api/voiceExtension/voiceExtension.attributes.js +++ b/server/api/voiceExtension/voiceExtension.attributes.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x4d71=['any','*,*,*,*','BOOLEAN','INTEGER','wav','getDataValue','sequelize','STRING','compositeIndex','NoOp','ENUM','inbound','outbound','internal','inbound-fax','outbound-fax','system'];(function(_0x518b7c,_0x49e180){var _0x14f4b7=function(_0x248ad1){while(--_0x248ad1){_0x518b7c['push'](_0x518b7c['shift']());}};_0x14f4b7(++_0x49e180);}(_0x4d71,0x17c));var _0x14d7=function(_0x5e633a,_0x23f23e){_0x5e633a=_0x5e633a-0x0;var _0x2a7452=_0x4d71[_0x5e633a];return _0x2a7452;};'use strict';var Sequelize=require(_0x14d7('0x0'));module['exports']={'context':{'type':Sequelize[_0x14d7('0x1')],'allowNull':![],'unique':_0x14d7('0x2'),'validate':{'notEmpty':!![],'is':/[A-Za-z0-9._\+*!\-\[\]]+$/i}},'exten':{'type':Sequelize['STRING'],'allowNull':![],'unique':_0x14d7('0x2')},'priority':{'type':Sequelize['STRING'],'allowNull':![],'defaultValue':'1','unique':'compositeIndex'},'tag':{'type':Sequelize[_0x14d7('0x1')],'allowNull':![],'defaultValue':'--'},'app':{'type':Sequelize['STRING'],'allowNull':![],'defaultValue':_0x14d7('0x3')},'appdata':{'type':Sequelize[_0x14d7('0x1')](0x1000),'allowNull':!![],'defaultValue':''},'type':{'type':Sequelize[_0x14d7('0x4')](_0x14d7('0x5'),_0x14d7('0x6'),_0x14d7('0x7'),_0x14d7('0x8'),_0x14d7('0x9'),_0x14d7('0xa'),_0x14d7('0xb')),'allowNull':![]},'description':{'type':Sequelize['STRING']},'interval':{'type':Sequelize[_0x14d7('0x1')],'allowNull':![],'defaultValue':_0x14d7('0xc')},'IntervalId':{'type':Sequelize['INTEGER']},'isApp':{'type':Sequelize[_0x14d7('0xd')],'allowNull':![],'defaultValue':![]},'appType':{'type':Sequelize[_0x14d7('0x1')],'defaultValue':null},'callerID':{'type':Sequelize[_0x14d7('0x1')],'allowNull':!![]},'record':{'type':Sequelize[_0x14d7('0xd')],'defaultValue':![]},'cutdigits':{'type':Sequelize[_0x14d7('0xe')]},'recordingFormat':{'type':Sequelize['STRING'],'defaultValue':_0x14d7('0xf')},'answer':{'type':Sequelize[_0x14d7('0xd')],'defaultValue':!![]},'name':{'type':Sequelize['VIRTUAL'],'get':function(_0x3eac6e){return this[_0x14d7('0x10')]('exten');}},'alias':{'type':Sequelize[_0x14d7('0x1')],'allowNull':!![]}}; \ No newline at end of file +var _0x4e5d=['compositeIndex','STRING','NoOp','outbound','internal','inbound-fax','outbound-fax','any','INTEGER','BOOLEAN','wav','VIRTUAL','getDataValue','exten','exports'];(function(_0x2ad19a,_0xb1e06a){var _0x4e4e65=function(_0x4aedaa){while(--_0x4aedaa){_0x2ad19a['push'](_0x2ad19a['shift']());}};_0x4e4e65(++_0xb1e06a);}(_0x4e5d,0xb3));var _0xd4e5=function(_0x5c59f0,_0x222e3d){_0x5c59f0=_0x5c59f0-0x0;var _0x1c87e8=_0x4e5d[_0x5c59f0];return _0x1c87e8;};'use strict';var Sequelize=require('sequelize');module[_0xd4e5('0x0')]={'context':{'type':Sequelize['STRING'],'allowNull':![],'unique':_0xd4e5('0x1'),'validate':{'notEmpty':!![],'is':/[A-Za-z0-9._\+*!\-\[\]]+$/i}},'exten':{'type':Sequelize[_0xd4e5('0x2')],'allowNull':![],'unique':_0xd4e5('0x1')},'priority':{'type':Sequelize['STRING'],'allowNull':![],'defaultValue':'1','unique':_0xd4e5('0x1')},'tag':{'type':Sequelize['STRING'],'allowNull':![],'defaultValue':'--'},'app':{'type':Sequelize[_0xd4e5('0x2')],'allowNull':![],'defaultValue':_0xd4e5('0x3')},'appdata':{'type':Sequelize[_0xd4e5('0x2')](0x1000),'allowNull':!![],'defaultValue':''},'type':{'type':Sequelize['ENUM']('inbound',_0xd4e5('0x4'),_0xd4e5('0x5'),_0xd4e5('0x6'),_0xd4e5('0x7'),'system',_0xd4e5('0x8')),'allowNull':![]},'description':{'type':Sequelize[_0xd4e5('0x2')]},'interval':{'type':Sequelize[_0xd4e5('0x2')],'allowNull':![],'defaultValue':'*,*,*,*'},'IntervalId':{'type':Sequelize[_0xd4e5('0x9')]},'isApp':{'type':Sequelize[_0xd4e5('0xa')],'allowNull':![],'defaultValue':![]},'appType':{'type':Sequelize[_0xd4e5('0x2')],'defaultValue':null},'callerID':{'type':Sequelize['STRING'],'allowNull':!![]},'record':{'type':Sequelize[_0xd4e5('0xa')],'defaultValue':![]},'cutdigits':{'type':Sequelize[_0xd4e5('0x9')]},'recordingFormat':{'type':Sequelize[_0xd4e5('0x2')],'defaultValue':_0xd4e5('0xb')},'answer':{'type':Sequelize[_0xd4e5('0xa')],'defaultValue':!![]},'name':{'type':Sequelize[_0xd4e5('0xc')],'get':function(_0xbbeaf7){return this[_0xd4e5('0xd')](_0xd4e5('0xe'));}},'alias':{'type':Sequelize['STRING'],'allowNull':!![]}}; \ No newline at end of file diff --git a/server/api/voiceExtension/voiceExtension.controller.js b/server/api/voiceExtension/voiceExtension.controller.js index ce43a01..89dd6b0 100644 --- a/server/api/voiceExtension/voiceExtension.controller.js +++ b/server/api/voiceExtension/voiceExtension.controller.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x4333=['body','exten','user','role','internal','userProfileId','autoAssociation','update','context','description','mandatoryDisposition','alias','addApplications','sequelize','transaction','Transaction','ISOLATION_LEVELS','READ_COMMITTED','findOne','VoiceExtensionId','isApp','createRouting','bulkCreate','findAndCountAll','stack','lodash','../../components/parsers/qs','../../config/logger','api','../../mysqldb','redis','defaults','localhost','socket.io-emitter','./voiceExtension.socket','status','end','json','undefined','limit','count','offset','set','destroy','get','inbound','OutboundRoutes','outbound','InternalRoutes','filter','ignore','map','value','includes','type','find','name','UserProfileResource','then','sendStatus','error','send','index','rawAttributes','fieldName','model','query','intersection','fields','attributes','length','nolimit','order','sort','where','filters','merge','options','VoiceExtension','includeAll','findAll','rows','catch','show','params','keys','create'];(function(_0xdf72bd,_0x98d8fe){var _0x57febb=function(_0x40a31d){while(--_0x40a31d){_0xdf72bd['push'](_0xdf72bd['shift']());}};_0x57febb(++_0x98d8fe);}(_0x4333,0x1cc));var _0x3433=function(_0x9c2427,_0x17c865){_0x9c2427=_0x9c2427-0x0;var _0x51984f=_0x4333[_0x9c2427];return _0x51984f;};'use strict';var _=require(_0x3433('0x0'));var Redis=require('ioredis');var qs=require(_0x3433('0x1'));var logger=require(_0x3433('0x2'))(_0x3433('0x3'));var config=require('../../config/environment');var db=require(_0x3433('0x4'))['db'];config[_0x3433('0x5')]=_[_0x3433('0x6')](config[_0x3433('0x5')],{'host':_0x3433('0x7'),'port':0x18eb});var socket=require(_0x3433('0x8'))(new Redis(config['redis']));require(_0x3433('0x9'))['register'](socket);function respondWithStatusCode(_0x5662fc,_0x176253){_0x176253=_0x176253||0xcc;return function(_0x199c90){if(_0x199c90){return _0x5662fc['sendStatus'](_0x176253);}return _0x5662fc[_0x3433('0xa')](_0x176253)[_0x3433('0xb')]();};}function respondWithResult(_0x36763d,_0x23f651){_0x23f651=_0x23f651||0xc8;return function(_0x2d213a){if(_0x2d213a){return _0x36763d[_0x3433('0xa')](_0x23f651)[_0x3433('0xc')](_0x2d213a);}};}function respondWithFilteredResult(_0x3423ff,_0x571876){return function(_0x414b35){if(_0x414b35){var _0x2edcc5=typeof _0x571876['offset']===_0x3433('0xd')&&typeof _0x571876[_0x3433('0xe')]===_0x3433('0xd');var _0x120a7c=_0x414b35[_0x3433('0xf')];var _0x13a987=_0x2edcc5?0x0:_0x571876[_0x3433('0x10')];var _0x288e39=_0x2edcc5?_0x414b35[_0x3433('0xf')]:_0x571876[_0x3433('0x10')]+_0x571876[_0x3433('0xe')];var _0x1b6d6e;if(_0x288e39>=_0x120a7c){_0x288e39=_0x120a7c;_0x1b6d6e=0xc8;}else{_0x1b6d6e=0xce;}_0x3423ff[_0x3433('0xa')](_0x1b6d6e);return _0x3423ff[_0x3433('0x11')]('Content-Range',_0x13a987+'-'+_0x288e39+'/'+_0x120a7c)[_0x3433('0xc')](_0x414b35);}return null;};}function removeEntity(_0x1c689a){return function(_0x434e0f){if(_0x434e0f){return _0x434e0f[_0x3433('0x12')]()['then'](function(){var _0x2290e4=_0x434e0f[_0x3433('0x13')]({'plain':!![]});var _0x12b341=[{'name':'InboundRoutes','value':_0x3433('0x14'),'ignore':![]},{'name':_0x3433('0x15'),'value':_0x3433('0x16'),'ignore':![]},{'name':_0x3433('0x17'),'value':'internal','ignore':![]}];var _0x38afd0=_(_0x12b341)[_0x3433('0x18')](_0x3433('0x19'))[_0x3433('0x1a')](_0x3433('0x1b'))[_0x3433('0x1b')]();if(_[_0x3433('0x1c')](_0x38afd0,_0x2290e4[_0x3433('0x1d')])){return;}var _0x28b4e6=_[_0x3433('0x1e')](_0x12b341,[_0x3433('0x1b'),_0x2290e4[_0x3433('0x1d')]])[_0x3433('0x1f')];return db[_0x3433('0x20')][_0x3433('0x12')]({'where':{'type':_0x28b4e6,'resourceId':_0x2290e4['id']}})[_0x3433('0x21')](function(){return _0x434e0f;});})[_0x3433('0x21')](function(){_0x1c689a['status'](0xcc)[_0x3433('0xb')]();});}};}function handleEntityNotFound(_0x2407c7){return function(_0x56550b){if(!_0x56550b){_0x2407c7[_0x3433('0x22')](0x194);}return _0x56550b;};}function handleError(_0x5acd59,_0x2bab5e){_0x2bab5e=_0x2bab5e||0x1f4;return function(_0x5bfe10){logger[_0x3433('0x23')](_0x5bfe10['stack']);if(_0x5bfe10[_0x3433('0x1f')]){delete _0x5bfe10[_0x3433('0x1f')];}_0x5acd59['status'](_0x2bab5e)[_0x3433('0x24')](_0x5bfe10);};}exports[_0x3433('0x25')]=function(_0x4a2a49,_0x407f7a){var _0x2be631={},_0x25b66d={},_0x98248={'count':0x0,'rows':[]};var _0x2f6070=_['map'](db['VoiceExtension'][_0x3433('0x26')],function(_0x69827b){return{'name':_0x69827b[_0x3433('0x27')],'type':_0x69827b[_0x3433('0x1d')]['key']};});_0x25b66d[_0x3433('0x28')]=_[_0x3433('0x1a')](_0x2f6070,_0x3433('0x1f'));_0x25b66d['query']=_['keys'](_0x4a2a49[_0x3433('0x29')]);_0x25b66d['filters']=_['intersection'](_0x25b66d[_0x3433('0x28')],_0x25b66d[_0x3433('0x29')]);_0x2be631['attributes']=_[_0x3433('0x2a')](_0x25b66d['model'],qs[_0x3433('0x2b')](_0x4a2a49[_0x3433('0x29')][_0x3433('0x2b')]));_0x2be631[_0x3433('0x2c')]=_0x2be631[_0x3433('0x2c')][_0x3433('0x2d')]?_0x2be631['attributes']:_0x25b66d[_0x3433('0x28')];if(!_0x4a2a49[_0x3433('0x29')]['hasOwnProperty'](_0x3433('0x2e'))){_0x2be631['limit']=qs[_0x3433('0xe')](_0x4a2a49['query'][_0x3433('0xe')]);_0x2be631['offset']=qs[_0x3433('0x10')](_0x4a2a49['query'][_0x3433('0x10')]);}_0x2be631[_0x3433('0x2f')]=qs['sort'](_0x4a2a49['query'][_0x3433('0x30')]);_0x2be631[_0x3433('0x31')]=qs[_0x3433('0x32')](_['pick'](_0x4a2a49[_0x3433('0x29')],_0x25b66d[_0x3433('0x32')]),_0x2f6070);if(_0x4a2a49['query'][_0x3433('0x18')]){_0x2be631[_0x3433('0x31')]=_[_0x3433('0x33')](_0x2be631[_0x3433('0x31')],{'$or':_['map'](_0x2f6070,function(_0x14d69b){if(_0x14d69b[_0x3433('0x1d')]!=='VIRTUAL'){var _0x313fa8={};_0x313fa8[_0x14d69b[_0x3433('0x1f')]]={'$like':'%'+_0x4a2a49['query'][_0x3433('0x18')]+'%'};return _0x313fa8;}})});}_0x2be631=_['merge']({},_0x2be631,_0x4a2a49[_0x3433('0x34')]);var _0x4dee62={'where':_0x2be631['where']};return db[_0x3433('0x35')]['count'](_0x4dee62)[_0x3433('0x21')](function(_0x1938f4){_0x98248[_0x3433('0xf')]=_0x1938f4;if(_0x4a2a49['query'][_0x3433('0x36')]){_0x2be631['include']=[{'all':!![]}];}return db[_0x3433('0x35')][_0x3433('0x37')](_0x2be631);})[_0x3433('0x21')](function(_0x3ea729){_0x98248[_0x3433('0x38')]=_0x3ea729;return _0x98248;})['then'](respondWithFilteredResult(_0x407f7a,_0x2be631))[_0x3433('0x39')](handleError(_0x407f7a,null));};exports[_0x3433('0x3a')]=function(_0x4bbbe0,_0x3baf6a){var _0x36cf21={'raw':![],'where':{'id':_0x4bbbe0[_0x3433('0x3b')]['id']}},_0x42ca0d={};_0x42ca0d[_0x3433('0x28')]=_[_0x3433('0x3c')](db[_0x3433('0x35')][_0x3433('0x26')]);_0x42ca0d[_0x3433('0x29')]=_[_0x3433('0x3c')](_0x4bbbe0[_0x3433('0x29')]);_0x42ca0d['filters']=_[_0x3433('0x2a')](_0x42ca0d[_0x3433('0x28')],_0x42ca0d[_0x3433('0x29')]);_0x36cf21[_0x3433('0x2c')]=_[_0x3433('0x2a')](_0x42ca0d[_0x3433('0x28')],qs['fields'](_0x4bbbe0[_0x3433('0x29')][_0x3433('0x2b')]));_0x36cf21[_0x3433('0x2c')]=_0x36cf21[_0x3433('0x2c')][_0x3433('0x2d')]?_0x36cf21[_0x3433('0x2c')]:_0x42ca0d[_0x3433('0x28')];if(_0x4bbbe0[_0x3433('0x29')]['includeAll']){_0x36cf21['include']=[{'all':!![]}];}_0x36cf21=_[_0x3433('0x33')]({},_0x36cf21,_0x4bbbe0[_0x3433('0x34')]);return db[_0x3433('0x35')][_0x3433('0x1e')](_0x36cf21)[_0x3433('0x21')](handleEntityNotFound(_0x3baf6a,null))[_0x3433('0x21')](respondWithResult(_0x3baf6a,null))['catch'](handleError(_0x3baf6a,null));};exports['destroy']=function(_0x10d56f,_0x4353c8){return db[_0x3433('0x35')][_0x3433('0x1e')]({'where':{'id':_0x10d56f[_0x3433('0x3b')]['id']}})[_0x3433('0x21')](handleEntityNotFound(_0x4353c8,null))[_0x3433('0x21')](removeEntity(_0x4353c8,null))['catch'](handleError(_0x4353c8,null));};exports[_0x3433('0x3d')]=function(_0x275a9e,_0x4e99cd){if(_0x275a9e[_0x3433('0x3e')][_0x3433('0x1d')]===_0x3433('0x16')&&!_['startsWith'](_0x275a9e[_0x3433('0x3e')][_0x3433('0x3f')],'_')){_0x275a9e[_0x3433('0x3e')]['exten']='_'['concat'](_0x275a9e['body'][_0x3433('0x3f')]);}return db[_0x3433('0x35')]['create'](_0x275a9e['body'],{'raw':![]})[_0x3433('0x21')](function(_0x526d9d){var _0x61a47a=_0x275a9e[_0x3433('0x40')]['get']({'plain':!![]});if(!_0x61a47a)throw new Error('Unable\x20to\x20retrieve\x20the\x20current\x20user');if(_0x61a47a[_0x3433('0x41')]===_0x3433('0x40')){var _0x4fcb3e=_0x526d9d[_0x3433('0x13')]({'plain':!![]});var _0x57c4ce=[{'name':'InboundRoutes','value':_0x3433('0x14')},{'name':_0x3433('0x15'),'value':_0x3433('0x16')},{'name':_0x3433('0x17'),'value':_0x3433('0x42')}];var _0x4d5fff=_['find'](_0x57c4ce,[_0x3433('0x1b'),_0x4fcb3e[_0x3433('0x1d')]])[_0x3433('0x1f')];return db['UserProfileSection']['find']({'where':{'name':_0x4d5fff,'userProfileId':_0x61a47a[_0x3433('0x43')]},'raw':!![]})[_0x3433('0x21')](function(_0x4e28c3){if(_0x4e28c3&&_0x4e28c3[_0x3433('0x44')]===0x0){return db[_0x3433('0x20')][_0x3433('0x3d')]({'name':_0x4fcb3e[_0x3433('0x1f')],'resourceId':_0x4fcb3e['id'],'type':_0x4e28c3[_0x3433('0x1f')],'sectionId':_0x4e28c3['id']},{})[_0x3433('0x21')](function(){return _0x526d9d;});}else{return _0x526d9d;}})[_0x3433('0x39')](function(_0x49d308){logger[_0x3433('0x23')]('Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s',_0x49d308);throw _0x49d308;});}return _0x526d9d;})[_0x3433('0x21')](respondWithResult(_0x4e99cd,0xc9))[_0x3433('0x39')](handleError(_0x4e99cd,null));};exports[_0x3433('0x45')]=function(_0x36d984,_0x4776b2){if(_0x36d984['body']['id']){delete _0x36d984['body']['id'];}return db[_0x3433('0x35')][_0x3433('0x1e')]({'where':{'id':_0x36d984['params']['id']}})[_0x3433('0x21')](handleEntityNotFound(_0x4776b2,null))[_0x3433('0x21')](function(_0x57f090){if(_0x57f090){return db[_0x3433('0x35')]['update'](_['pick'](_0x36d984['body'],['exten',_0x3433('0x46'),_0x3433('0x47'),'recordingFormat','cutdigits',_0x3433('0x48'),_0x3433('0x49')]),{'where':{'context':_0x57f090[_0x3433('0x46')],'exten':_0x57f090['exten']},'individualHooks':!![]})[_0x3433('0x21')](function(_0x26ee8a){return _0x26ee8a;});}return null;})[_0x3433('0x21')](respondWithStatusCode(_0x4776b2,null))[_0x3433('0x39')](handleError(_0x4776b2,null));};exports[_0x3433('0x4a')]=function(_0x4ba03b,_0x45a4ea){var _0x1792da=_0x4ba03b['params']['id'];var _0xadd10e=_0x4ba03b[_0x3433('0x3e')];var _0x2cec9f=0xc8;var _0xe65402=null;return db[_0x3433('0x4b')][_0x3433('0x4c')]({'isolationLevel':db[_0x3433('0x4b')][_0x3433('0x4d')][_0x3433('0x4e')][_0x3433('0x4f')]},function(_0x37bce5){return db[_0x3433('0x35')][_0x3433('0x50')]({'where':{'id':_0x1792da},'transaction':_0x37bce5})[_0x3433('0x21')](function(_0x23379e){if(_0x23379e){return db[_0x3433('0x35')][_0x3433('0x12')]({'where':{'VoiceExtensionId':_0x1792da},'transaction':_0x37bce5})[_0x3433('0x21')](function(){var _0x231d25=_[_0x3433('0x1a')](_0xadd10e,function(_0x496aa8){_0x496aa8[_0x3433('0x51')]=_0x1792da;_0x496aa8[_0x3433('0x52')]=!![];return _0x496aa8;});return _0x23379e[_0x3433('0x53')](_0x231d25);})[_0x3433('0x21')](function(_0x2365dc){return db[_0x3433('0x35')][_0x3433('0x54')](_0x2365dc,{'transaction':_0x37bce5});});}else{_0x2cec9f=0x194;_0xe65402=[];}});})[_0x3433('0x21')](function(){if(_0x2cec9f!==0x194){return db[_0x3433('0x35')][_0x3433('0x55')]({'where':{'isApp':!![],'VoiceExtensionId':_0x1792da},'order':'cast(priority\x20as\x20unsigned)'})[_0x3433('0x21')](function(_0x1f1335){_0xe65402=_0x1f1335;});}})[_0x3433('0x39')](function(_0x42de9b){_0x2cec9f=0x1f4;logger[_0x3433('0x23')](_0x42de9b[_0x3433('0x56')]);if(_0x42de9b[_0x3433('0x1f')]){delete _0x42de9b[_0x3433('0x1f')];}_0xe65402=_0x42de9b;})['finally'](function(){if(_0xe65402===null){_0x45a4ea[_0x3433('0x22')](_0x2cec9f);}else{if(_0x2cec9f===0x1f4){_0x45a4ea[_0x3433('0xa')](_0x2cec9f)[_0x3433('0x24')](_0xe65402);}else{_0x45a4ea['status'](_0x2cec9f)[_0x3433('0xc')](_0xe65402);}}});}; \ No newline at end of file +var _0xa7be=['query','filters','intersection','fields','attributes','length','nolimit','order','sort','where','merge','VIRTUAL','options','includeAll','rows','catch','show','keys','rawAttributes','include','params','create','body','startsWith','exten','concat','Unable\x20to\x20retrieve\x20the\x20current\x20user','UserProfileSection','autoAssociation','error','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','pick','context','description','recordingFormat','alias','addApplications','sequelize','transaction','ISOLATION_LEVELS','READ_COMMITTED','findOne','VoiceExtensionId','isApp','createRouting','cast(priority\x20as\x20unsigned)','ioredis','../../components/parsers/qs','../../config/logger','api','../../config/environment','../../mysqldb','redis','defaults','localhost','socket.io-emitter','./voiceExtension.socket','register','sendStatus','end','status','json','offset','undefined','limit','count','Content-Range','then','get','InboundRoutes','inbound','OutboundRoutes','outbound','InternalRoutes','internal','filter','ignore','map','value','type','find','UserProfileResource','destroy','stack','name','send','index','VoiceExtension','fieldName','key','model'];(function(_0x187718,_0x427383){var _0x29ddf4=function(_0x2ec62a){while(--_0x2ec62a){_0x187718['push'](_0x187718['shift']());}};_0x29ddf4(++_0x427383);}(_0xa7be,0x19a));var _0xea7b=function(_0x9b360d,_0x3a0e88){_0x9b360d=_0x9b360d-0x0;var _0x45e2da=_0xa7be[_0x9b360d];return _0x45e2da;};'use strict';var _=require('lodash');var Redis=require(_0xea7b('0x0'));var qs=require(_0xea7b('0x1'));var logger=require(_0xea7b('0x2'))(_0xea7b('0x3'));var config=require(_0xea7b('0x4'));var db=require(_0xea7b('0x5'))['db'];config[_0xea7b('0x6')]=_[_0xea7b('0x7')](config['redis'],{'host':_0xea7b('0x8'),'port':0x18eb});var socket=require(_0xea7b('0x9'))(new Redis(config[_0xea7b('0x6')]));require(_0xea7b('0xa'))[_0xea7b('0xb')](socket);function respondWithStatusCode(_0x39ab9a,_0x543563){_0x543563=_0x543563||0xcc;return function(_0x383e72){if(_0x383e72){return _0x39ab9a[_0xea7b('0xc')](_0x543563);}return _0x39ab9a['status'](_0x543563)[_0xea7b('0xd')]();};}function respondWithResult(_0xb67a6b,_0xab0a38){_0xab0a38=_0xab0a38||0xc8;return function(_0x1d5076){if(_0x1d5076){return _0xb67a6b[_0xea7b('0xe')](_0xab0a38)[_0xea7b('0xf')](_0x1d5076);}};}function respondWithFilteredResult(_0x1e7fa4,_0x396d2c){return function(_0x389678){if(_0x389678){var _0x377c11=typeof _0x396d2c[_0xea7b('0x10')]===_0xea7b('0x11')&&typeof _0x396d2c[_0xea7b('0x12')]===_0xea7b('0x11');var _0x2be989=_0x389678['count'];var _0x9a055e=_0x377c11?0x0:_0x396d2c[_0xea7b('0x10')];var _0x50725b=_0x377c11?_0x389678[_0xea7b('0x13')]:_0x396d2c['offset']+_0x396d2c[_0xea7b('0x12')];var _0x769410;if(_0x50725b>=_0x2be989){_0x50725b=_0x2be989;_0x769410=0xc8;}else{_0x769410=0xce;}_0x1e7fa4[_0xea7b('0xe')](_0x769410);return _0x1e7fa4['set'](_0xea7b('0x14'),_0x9a055e+'-'+_0x50725b+'/'+_0x2be989)[_0xea7b('0xf')](_0x389678);}return null;};}function removeEntity(_0x5ce575){return function(_0x345446){if(_0x345446){return _0x345446['destroy']()[_0xea7b('0x15')](function(){var _0x2295d5=_0x345446[_0xea7b('0x16')]({'plain':!![]});var _0x3436fd=[{'name':_0xea7b('0x17'),'value':_0xea7b('0x18'),'ignore':![]},{'name':_0xea7b('0x19'),'value':_0xea7b('0x1a'),'ignore':![]},{'name':_0xea7b('0x1b'),'value':_0xea7b('0x1c'),'ignore':![]}];var _0x3a94b5=_(_0x3436fd)[_0xea7b('0x1d')](_0xea7b('0x1e'))[_0xea7b('0x1f')]('value')[_0xea7b('0x20')]();if(_['includes'](_0x3a94b5,_0x2295d5[_0xea7b('0x21')])){return;}var _0x54e295=_[_0xea7b('0x22')](_0x3436fd,[_0xea7b('0x20'),_0x2295d5[_0xea7b('0x21')]])['name'];return db[_0xea7b('0x23')][_0xea7b('0x24')]({'where':{'type':_0x54e295,'resourceId':_0x2295d5['id']}})[_0xea7b('0x15')](function(){return _0x345446;});})[_0xea7b('0x15')](function(){_0x5ce575[_0xea7b('0xe')](0xcc)[_0xea7b('0xd')]();});}};}function handleEntityNotFound(_0x1328f7){return function(_0x35e63d){if(!_0x35e63d){_0x1328f7[_0xea7b('0xc')](0x194);}return _0x35e63d;};}function handleError(_0x1900cf,_0xa08791){_0xa08791=_0xa08791||0x1f4;return function(_0x2c359a){logger['error'](_0x2c359a[_0xea7b('0x25')]);if(_0x2c359a[_0xea7b('0x26')]){delete _0x2c359a[_0xea7b('0x26')];}_0x1900cf[_0xea7b('0xe')](_0xa08791)[_0xea7b('0x27')](_0x2c359a);};}exports[_0xea7b('0x28')]=function(_0x5b9172,_0x2b8967){var _0xba0b92={},_0x22d121={},_0x150fae={'count':0x0,'rows':[]};var _0x525d7f=_['map'](db[_0xea7b('0x29')]['rawAttributes'],function(_0x39ed38){return{'name':_0x39ed38[_0xea7b('0x2a')],'type':_0x39ed38[_0xea7b('0x21')][_0xea7b('0x2b')]};});_0x22d121[_0xea7b('0x2c')]=_[_0xea7b('0x1f')](_0x525d7f,_0xea7b('0x26'));_0x22d121[_0xea7b('0x2d')]=_['keys'](_0x5b9172[_0xea7b('0x2d')]);_0x22d121[_0xea7b('0x2e')]=_[_0xea7b('0x2f')](_0x22d121['model'],_0x22d121[_0xea7b('0x2d')]);_0xba0b92['attributes']=_['intersection'](_0x22d121[_0xea7b('0x2c')],qs[_0xea7b('0x30')](_0x5b9172['query'][_0xea7b('0x30')]));_0xba0b92[_0xea7b('0x31')]=_0xba0b92[_0xea7b('0x31')][_0xea7b('0x32')]?_0xba0b92[_0xea7b('0x31')]:_0x22d121['model'];if(!_0x5b9172[_0xea7b('0x2d')]['hasOwnProperty'](_0xea7b('0x33'))){_0xba0b92[_0xea7b('0x12')]=qs[_0xea7b('0x12')](_0x5b9172[_0xea7b('0x2d')]['limit']);_0xba0b92[_0xea7b('0x10')]=qs[_0xea7b('0x10')](_0x5b9172['query'][_0xea7b('0x10')]);}_0xba0b92[_0xea7b('0x34')]=qs[_0xea7b('0x35')](_0x5b9172[_0xea7b('0x2d')][_0xea7b('0x35')]);_0xba0b92[_0xea7b('0x36')]=qs[_0xea7b('0x2e')](_['pick'](_0x5b9172['query'],_0x22d121['filters']),_0x525d7f);if(_0x5b9172[_0xea7b('0x2d')][_0xea7b('0x1d')]){_0xba0b92['where']=_[_0xea7b('0x37')](_0xba0b92[_0xea7b('0x36')],{'$or':_[_0xea7b('0x1f')](_0x525d7f,function(_0x507bb6){if(_0x507bb6[_0xea7b('0x21')]!==_0xea7b('0x38')){var _0x1615bf={};_0x1615bf[_0x507bb6[_0xea7b('0x26')]]={'$like':'%'+_0x5b9172[_0xea7b('0x2d')]['filter']+'%'};return _0x1615bf;}})});}_0xba0b92=_['merge']({},_0xba0b92,_0x5b9172[_0xea7b('0x39')]);var _0x21ea6d={'where':_0xba0b92[_0xea7b('0x36')]};return db[_0xea7b('0x29')][_0xea7b('0x13')](_0x21ea6d)['then'](function(_0xc267b2){_0x150fae[_0xea7b('0x13')]=_0xc267b2;if(_0x5b9172[_0xea7b('0x2d')][_0xea7b('0x3a')]){_0xba0b92['include']=[{'all':!![]}];}return db[_0xea7b('0x29')]['findAll'](_0xba0b92);})[_0xea7b('0x15')](function(_0x4dfca3){_0x150fae[_0xea7b('0x3b')]=_0x4dfca3;return _0x150fae;})[_0xea7b('0x15')](respondWithFilteredResult(_0x2b8967,_0xba0b92))[_0xea7b('0x3c')](handleError(_0x2b8967,null));};exports[_0xea7b('0x3d')]=function(_0x20a996,_0x4850fc){var _0x23f3c0={'raw':![],'where':{'id':_0x20a996['params']['id']}},_0x2be794={};_0x2be794['model']=_[_0xea7b('0x3e')](db[_0xea7b('0x29')][_0xea7b('0x3f')]);_0x2be794[_0xea7b('0x2d')]=_[_0xea7b('0x3e')](_0x20a996['query']);_0x2be794[_0xea7b('0x2e')]=_['intersection'](_0x2be794[_0xea7b('0x2c')],_0x2be794[_0xea7b('0x2d')]);_0x23f3c0[_0xea7b('0x31')]=_[_0xea7b('0x2f')](_0x2be794[_0xea7b('0x2c')],qs[_0xea7b('0x30')](_0x20a996[_0xea7b('0x2d')][_0xea7b('0x30')]));_0x23f3c0[_0xea7b('0x31')]=_0x23f3c0[_0xea7b('0x31')][_0xea7b('0x32')]?_0x23f3c0[_0xea7b('0x31')]:_0x2be794['model'];if(_0x20a996[_0xea7b('0x2d')]['includeAll']){_0x23f3c0[_0xea7b('0x40')]=[{'all':!![]}];}_0x23f3c0=_['merge']({},_0x23f3c0,_0x20a996[_0xea7b('0x39')]);return db['VoiceExtension'][_0xea7b('0x22')](_0x23f3c0)[_0xea7b('0x15')](handleEntityNotFound(_0x4850fc,null))[_0xea7b('0x15')](respondWithResult(_0x4850fc,null))[_0xea7b('0x3c')](handleError(_0x4850fc,null));};exports[_0xea7b('0x24')]=function(_0x34c8d3,_0x3de165){return db['VoiceExtension'][_0xea7b('0x22')]({'where':{'id':_0x34c8d3[_0xea7b('0x41')]['id']}})[_0xea7b('0x15')](handleEntityNotFound(_0x3de165,null))[_0xea7b('0x15')](removeEntity(_0x3de165,null))[_0xea7b('0x3c')](handleError(_0x3de165,null));};exports[_0xea7b('0x42')]=function(_0x51afbc,_0x167bd0){if(_0x51afbc[_0xea7b('0x43')]['type']==='outbound'&&!_[_0xea7b('0x44')](_0x51afbc[_0xea7b('0x43')][_0xea7b('0x45')],'_')){_0x51afbc[_0xea7b('0x43')][_0xea7b('0x45')]='_'[_0xea7b('0x46')](_0x51afbc[_0xea7b('0x43')][_0xea7b('0x45')]);}return db['VoiceExtension'][_0xea7b('0x42')](_0x51afbc[_0xea7b('0x43')],{'raw':![]})['then'](function(_0x3248e4){var _0x1ba74a=_0x51afbc['user']['get']({'plain':!![]});if(!_0x1ba74a)throw new Error(_0xea7b('0x47'));if(_0x1ba74a['role']==='user'){var _0x18fd20=_0x3248e4[_0xea7b('0x16')]({'plain':!![]});var _0xc52be4=[{'name':_0xea7b('0x17'),'value':'inbound'},{'name':_0xea7b('0x19'),'value':_0xea7b('0x1a')},{'name':_0xea7b('0x1b'),'value':'internal'}];var _0x3b785d=_[_0xea7b('0x22')](_0xc52be4,[_0xea7b('0x20'),_0x18fd20[_0xea7b('0x21')]])[_0xea7b('0x26')];return db[_0xea7b('0x48')]['find']({'where':{'name':_0x3b785d,'userProfileId':_0x1ba74a['userProfileId']},'raw':!![]})['then'](function(_0x50f6d1){if(_0x50f6d1&&_0x50f6d1[_0xea7b('0x49')]===0x0){return db[_0xea7b('0x23')][_0xea7b('0x42')]({'name':_0x18fd20[_0xea7b('0x26')],'resourceId':_0x18fd20['id'],'type':_0x50f6d1[_0xea7b('0x26')],'sectionId':_0x50f6d1['id']},{})[_0xea7b('0x15')](function(){return _0x3248e4;});}else{return _0x3248e4;}})[_0xea7b('0x3c')](function(_0x256bce){logger[_0xea7b('0x4a')](_0xea7b('0x4b'),_0x256bce);throw _0x256bce;});}return _0x3248e4;})[_0xea7b('0x15')](respondWithResult(_0x167bd0,0xc9))[_0xea7b('0x3c')](handleError(_0x167bd0,null));};exports['update']=function(_0x12d2c4,_0xe2099e){if(_0x12d2c4['body']['id']){delete _0x12d2c4['body']['id'];}return db[_0xea7b('0x29')][_0xea7b('0x22')]({'where':{'id':_0x12d2c4[_0xea7b('0x41')]['id']}})[_0xea7b('0x15')](handleEntityNotFound(_0xe2099e,null))[_0xea7b('0x15')](function(_0x475297){if(_0x475297){return db[_0xea7b('0x29')]['update'](_[_0xea7b('0x4c')](_0x12d2c4[_0xea7b('0x43')],[_0xea7b('0x45'),_0xea7b('0x4d'),_0xea7b('0x4e'),_0xea7b('0x4f'),'cutdigits','mandatoryDisposition',_0xea7b('0x50')]),{'where':{'context':_0x475297[_0xea7b('0x4d')],'exten':_0x475297['exten']},'individualHooks':!![]})['then'](function(_0x1aa84d){return _0x1aa84d;});}return null;})[_0xea7b('0x15')](respondWithStatusCode(_0xe2099e,null))['catch'](handleError(_0xe2099e,null));};exports[_0xea7b('0x51')]=function(_0x4d27fb,_0x538381){var _0x59476a=_0x4d27fb[_0xea7b('0x41')]['id'];var _0x31955b=_0x4d27fb['body'];var _0x12735c=0xc8;var _0x498d69=null;return db[_0xea7b('0x52')][_0xea7b('0x53')]({'isolationLevel':db[_0xea7b('0x52')]['Transaction'][_0xea7b('0x54')][_0xea7b('0x55')]},function(_0x1afab0){return db[_0xea7b('0x29')][_0xea7b('0x56')]({'where':{'id':_0x59476a},'transaction':_0x1afab0})[_0xea7b('0x15')](function(_0x2afc31){if(_0x2afc31){return db[_0xea7b('0x29')][_0xea7b('0x24')]({'where':{'VoiceExtensionId':_0x59476a},'transaction':_0x1afab0})[_0xea7b('0x15')](function(){var _0x3f3c7a=_[_0xea7b('0x1f')](_0x31955b,function(_0x56f82b){_0x56f82b[_0xea7b('0x57')]=_0x59476a;_0x56f82b[_0xea7b('0x58')]=!![];return _0x56f82b;});return _0x2afc31[_0xea7b('0x59')](_0x3f3c7a);})['then'](function(_0x339261){return db[_0xea7b('0x29')]['bulkCreate'](_0x339261,{'transaction':_0x1afab0});});}else{_0x12735c=0x194;_0x498d69=[];}});})[_0xea7b('0x15')](function(){if(_0x12735c!==0x194){return db[_0xea7b('0x29')]['findAndCountAll']({'where':{'isApp':!![],'VoiceExtensionId':_0x59476a},'order':_0xea7b('0x5a')})['then'](function(_0x1551fb){_0x498d69=_0x1551fb;});}})['catch'](function(_0x228647){_0x12735c=0x1f4;logger[_0xea7b('0x4a')](_0x228647[_0xea7b('0x25')]);if(_0x228647[_0xea7b('0x26')]){delete _0x228647[_0xea7b('0x26')];}_0x498d69=_0x228647;})['finally'](function(){if(_0x498d69===null){_0x538381[_0xea7b('0xc')](_0x12735c);}else{if(_0x12735c===0x1f4){_0x538381[_0xea7b('0xe')](_0x12735c)['send'](_0x498d69);}else{_0x538381[_0xea7b('0xe')](_0x12735c)[_0xea7b('0xf')](_0x498d69);}}});}; \ No newline at end of file diff --git a/server/api/voiceExtension/voiceExtension.events.js b/server/api/voiceExtension/voiceExtension.events.js index 33587c7..59e1615 100644 --- a/server/api/voiceExtension/voiceExtension.events.js +++ b/server/api/voiceExtension/voiceExtension.events.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xbcf6=['../../mysqldb','setMaxListeners','save','update','remove','emit','hasOwnProperty'];(function(_0x1a58a9,_0xe32406){var _0x45449b=function(_0x1e9721){while(--_0x1e9721){_0x1a58a9['push'](_0x1a58a9['shift']());}};_0x45449b(++_0xe32406);}(_0xbcf6,0xfc));var _0x6bcf=function(_0x514a57,_0x3f68f0){_0x514a57=_0x514a57-0x0;var _0x5814ac=_0xbcf6[_0x514a57];return _0x5814ac;};'use strict';var EventEmitter=require('events');var VoiceExtension=require(_0x6bcf('0x0'))['db']['VoiceExtension'];var VoiceExtensionEvents=new EventEmitter();VoiceExtensionEvents[_0x6bcf('0x1')](0x0);var events={'afterCreate':_0x6bcf('0x2'),'afterUpdate':_0x6bcf('0x3'),'afterDestroy':_0x6bcf('0x4')};function emitEvent(_0x143d72){return function(_0x59677c,_0x195f96,_0x4542ba){VoiceExtensionEvents[_0x6bcf('0x5')](_0x143d72+':'+_0x59677c['id'],_0x59677c);VoiceExtensionEvents[_0x6bcf('0x5')](_0x143d72,_0x59677c);_0x4542ba(null);};}for(var e in events){if(events[_0x6bcf('0x6')](e)){var event=events[e];VoiceExtension['hook'](e,emitEvent(event));}}module['exports']=VoiceExtensionEvents; \ No newline at end of file +var _0xcbaf=['update','emit','hasOwnProperty','hook','VoiceExtension','setMaxListeners','save'];(function(_0x243217,_0x522951){var _0x478029=function(_0x18d053){while(--_0x18d053){_0x243217['push'](_0x243217['shift']());}};_0x478029(++_0x522951);}(_0xcbaf,0x100));var _0xfcba=function(_0x477332,_0x2ce779){_0x477332=_0x477332-0x0;var _0x1140af=_0xcbaf[_0x477332];return _0x1140af;};'use strict';var EventEmitter=require('events');var VoiceExtension=require('../../mysqldb')['db'][_0xfcba('0x0')];var VoiceExtensionEvents=new EventEmitter();VoiceExtensionEvents[_0xfcba('0x1')](0x0);var events={'afterCreate':_0xfcba('0x2'),'afterUpdate':_0xfcba('0x3'),'afterDestroy':'remove'};function emitEvent(_0x20d668){return function(_0x28c3ed,_0x352793,_0x137dbd){VoiceExtensionEvents['emit'](_0x20d668+':'+_0x28c3ed['id'],_0x28c3ed);VoiceExtensionEvents[_0xfcba('0x4')](_0x20d668,_0x28c3ed);_0x137dbd(null);};}for(var e in events){if(events[_0xfcba('0x5')](e)){var event=events[e];VoiceExtension[_0xfcba('0x6')](e,emitEvent(event));}}module['exports']=VoiceExtensionEvents; \ No newline at end of file diff --git a/server/api/voiceExtension/voiceExtension.model.js b/server/api/voiceExtension/voiceExtension.model.js index ddbb729..de655d5 100644 --- a/server/api/voiceExtension/voiceExtension.model.js +++ b/server/api/voiceExtension/voiceExtension.model.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xf767=['replace','isEmpty','findAll','then','interval','*,*,*,*','intervals','IntervalId','filter','toLowerCase','tag','CDR(tag)=','callerID','NoOp(No\x20number\x20available)','answer','queue','playback','includes','app','appType','custom','$[${XCALLY-MOTION-ANSWER}=0]?Answer','XCALLY-MOTION-ANSWER=1','$[${XCALLY-MOTION-PROGRESS}=0]?Progress','splice','GotoIfTime',',${EXTEN},','outboundDial','appdata','last','priority','concat','catch','define','VoiceExtension','get','Hangup','./voiceExtension.attributes','exports','models','type','CDR(type)=','context','exten','Set','NoOp','alias','CDR(routeAlias)=','No\x20alias\x20set','inbound','push','MONITOR_OPTIONS=ab','outbound','CDR(destination)=','${EXTEN:','${EXTEN}','ExecIf','$[${LEN(${CDR(prefix)})}\x20>\x200]?Goto(','):Goto(','cutdigits','CDR(prefix)=${EXTEN:0:','CDR(prefix)=noprefix','XCALLY-MOTION-PROGRESS=0','outboundrouteid=','hasOwnProperty','recordingFormat','none','_XCALLY_MIXMONITOR_UNIQUEID=${UNIQUEID}','wav','timeout','split','length','trunk','param','phone','prefix','SIP','join','options','indexOf','U(xcally-mixmonitor-context)'];(function(_0x206341,_0x52a5ba){var _0x4655d7=function(_0x38ae96){while(--_0x38ae96){_0x206341['push'](_0x206341['shift']());}};_0x4655d7(++_0x52a5ba);}(_0xf767,0x76));var _0x7f76=function(_0x10df18,_0x13338c){_0x10df18=_0x10df18-0x0;var _0x1f9a1d=_0xf767[_0x10df18];return _0x1f9a1d;};'use strict';var _=require('lodash');var attributes=require(_0x7f76('0x0'));module[_0x7f76('0x1')]=function(_0x39149){var _0x23f0c3=_0x39149[_0x7f76('0x2')];function _0x5d215a(_0x396137){var _0x2aa5e1=0x2;var _0x40ba50=[{'type':_0x396137[_0x7f76('0x3')],'app':'Set','appdata':_0x7f76('0x4')+_0x396137[_0x7f76('0x3')],'context':_0x396137[_0x7f76('0x5')],'exten':_0x396137[_0x7f76('0x6')],'priority':_0x2aa5e1++,'VoiceExtensionId':_0x396137['id']},{'type':_0x396137[_0x7f76('0x3')],'app':_0x396137['alias']?_0x7f76('0x7'):_0x7f76('0x8'),'appdata':_0x396137[_0x7f76('0x9')]?_0x7f76('0xa')+_0x396137['alias']:_0x7f76('0xb'),'context':_0x396137['context'],'exten':_0x396137[_0x7f76('0x6')],'priority':_0x2aa5e1++,'VoiceExtensionId':_0x396137['id']}];if(_0x396137[_0x7f76('0x3')]===_0x7f76('0xc')){_0x40ba50[_0x7f76('0xd')]({'type':_0x7f76('0xc'),'app':_0x7f76('0x7'),'appdata':'CDR(routeid)='+_0x396137['id'],'context':_0x396137[_0x7f76('0x5')],'exten':_0x396137[_0x7f76('0x6')],'priority':_0x2aa5e1++,'VoiceExtensionId':_0x396137['id']});}_0x40ba50[_0x7f76('0xd')]({'type':_0x396137[_0x7f76('0x3')],'app':_0x7f76('0x7'),'appdata':'XCALLY-MOTION-ANSWER=0','context':_0x396137[_0x7f76('0x5')],'exten':_0x396137['exten'],'priority':_0x2aa5e1++,'VoiceExtensionId':_0x396137['id']},{'type':_0x396137[_0x7f76('0x3')],'app':_0x7f76('0x7'),'appdata':'XCALLY-MOTION-PROGRESS=0','context':_0x396137['context'],'exten':_0x396137['exten'],'priority':_0x2aa5e1++,'VoiceExtensionId':_0x396137['id']},{'type':_0x396137[_0x7f76('0x3')],'app':_0x7f76('0x7'),'appdata':_0x7f76('0xe'),'context':_0x396137['context'],'exten':_0x396137[_0x7f76('0x6')],'priority':_0x2aa5e1++,'VoiceExtensionId':_0x396137['id']});return _0x40ba50;}function _0x522a2c(_0x629c46){var _0x3ceb6a=0x2;var _0x431076=[{'type':'outbound','app':'Set','appdata':'CDR(type)=outbound','context':_0x629c46['context'],'exten':_0x629c46['exten'],'priority':_0x3ceb6a++,'VoiceExtensionId':_0x629c46['id']},{'type':_0x7f76('0xf'),'app':_0x629c46[_0x7f76('0x9')]?_0x7f76('0x7'):_0x7f76('0x8'),'appdata':_0x629c46['alias']?_0x7f76('0xa')+_0x629c46['alias']:_0x7f76('0xb'),'context':_0x629c46[_0x7f76('0x5')],'exten':_0x629c46['exten'],'priority':_0x3ceb6a++,'VoiceExtensionId':_0x629c46['id']},{'type':'outbound','app':_0x7f76('0x7'),'appdata':_0x7f76('0x10')+(_0x629c46['cutdigits']?_0x7f76('0x11')+_0x629c46['cutdigits']+'}':_0x7f76('0x12')),'context':_0x629c46[_0x7f76('0x5')],'exten':_0x629c46[_0x7f76('0x6')],'priority':_0x3ceb6a++,'VoiceExtensionId':_0x629c46['id']},{'type':_0x7f76('0xf'),'app':_0x7f76('0x7'),'appdata':'CDR(routeid)='+_0x629c46['id'],'context':_0x629c46[_0x7f76('0x5')],'exten':_0x629c46['exten'],'priority':_0x3ceb6a++,'VoiceExtensionId':_0x629c46['id']},{'type':'outbound','app':_0x7f76('0x13'),'appdata':_0x7f76('0x14')+(_0x3ceb6a+0x2)+_0x7f76('0x15')+(_0x3ceb6a+0x1)+')','context':_0x629c46['context'],'exten':_0x629c46[_0x7f76('0x6')],'priority':_0x3ceb6a++,'VoiceExtensionId':_0x629c46['id']},{'type':_0x7f76('0xf'),'app':_0x7f76('0x7'),'appdata':_0x629c46[_0x7f76('0x16')]?_0x7f76('0x17')+_0x629c46['cutdigits']+'}':_0x7f76('0x18'),'context':_0x629c46[_0x7f76('0x5')],'exten':_0x629c46['exten'],'priority':_0x3ceb6a++,'VoiceExtensionId':_0x629c46['id']},{'type':'outbound','app':_0x7f76('0x7'),'appdata':'XCALLY-MOTION-ANSWER=0','context':_0x629c46[_0x7f76('0x5')],'exten':_0x629c46[_0x7f76('0x6')],'priority':_0x3ceb6a++,'VoiceExtensionId':_0x629c46['id']},{'type':_0x7f76('0xf'),'app':_0x7f76('0x7'),'appdata':_0x7f76('0x19'),'context':_0x629c46[_0x7f76('0x5')],'exten':_0x629c46['exten'],'priority':_0x3ceb6a++,'VoiceExtensionId':_0x629c46['id']},{'type':_0x7f76('0xf'),'app':_0x7f76('0x7'),'appdata':_0x7f76('0xe'),'context':_0x629c46[_0x7f76('0x5')],'exten':_0x629c46['exten'],'priority':_0x3ceb6a++,'VoiceExtensionId':_0x629c46['id']},{'type':_0x7f76('0xf'),'app':_0x7f76('0x7'),'appdata':_0x7f76('0x1a')+_0x629c46['id'],'context':_0x629c46['context'],'exten':_0x629c46[_0x7f76('0x6')],'priority':_0x3ceb6a++,'VoiceExtensionId':_0x629c46['id']}];if(_0x629c46[_0x7f76('0x1b')](_0x7f76('0x1c'))&&_0x629c46[_0x7f76('0x1c')]!==_0x7f76('0x1d')){_0x431076[_0x7f76('0xd')]({'type':_0x7f76('0xf'),'app':_0x7f76('0x7'),'appdata':_0x7f76('0x1e'),'context':_0x629c46[_0x7f76('0x5')],'exten':_0x629c46[_0x7f76('0x6')],'priority':_0x3ceb6a++,'VoiceExtensionId':_0x629c46['id']},{'type':_0x7f76('0xf'),'app':_0x7f76('0x7'),'appdata':'_XCALLY_MIXMONITOR_FORMAT='+_0x629c46[_0x7f76('0x1c')]||_0x7f76('0x1f'),'context':_0x629c46[_0x7f76('0x5')],'exten':_0x629c46[_0x7f76('0x6')],'priority':_0x3ceb6a++,'VoiceExtensionId':_0x629c46['id']});}return _0x431076;}function _0x349343(_0x20c260,_0x21cb09){var _0xa02fb3=[{'name':'trunk','param':0x0},{'name':_0x7f76('0x20'),'param':0x1},{'name':'options','param':0x2},{'name':'url','param':0x3}];var _0x3aec4e={};var _0x4df806=_0x21cb09[_0x7f76('0x21')](',');var _0x165a1e=[];for(var _0x539c90=0x0;_0x539c90<_0xa02fb3[_0x7f76('0x22')];_0x539c90++){switch(_0xa02fb3[_0x539c90]['name']){case'trunk':_0x3aec4e[_0x7f76('0x23')]=_0x4df806[_0xa02fb3[_0x539c90][_0x7f76('0x24')]][_0x7f76('0x21')]('/')[0x1];_0x3aec4e[_0x7f76('0x25')]=_0x4df806[_0xa02fb3[_0x539c90][_0x7f76('0x24')]]['split']('/')[0x2];_0x3aec4e[_0x7f76('0x26')]=_0x3aec4e[_0x7f76('0x25')]?_0x3aec4e['phone']['split']('$')[0x0]:undefined;_0x3aec4e[_0x7f76('0x25')]=_0x20c260['cutdigits']?(_0x3aec4e[_0x7f76('0x26')]||'')+_0x7f76('0x11')+_0x20c260[_0x7f76('0x16')]+'}':(_0x3aec4e['prefix']||'')+_0x7f76('0x12');_0x165a1e[_0xa02fb3[_0x539c90][_0x7f76('0x24')]]=[_0x7f76('0x27'),_0x3aec4e[_0x7f76('0x23')],_0x3aec4e[_0x7f76('0x25')]][_0x7f76('0x28')]('/');break;case'options':_0x3aec4e['options']=_0x4df806[_0xa02fb3[_0x539c90][_0x7f76('0x24')]];if(_0x20c260[_0x7f76('0x1c')]!==_0x7f76('0x1d')){if(_0x3aec4e[_0x7f76('0x29')][_0x7f76('0x2a')](_0x7f76('0x2b'))<0x0){_0x3aec4e[_0x7f76('0x29')]+=_0x7f76('0x2b');}}else{_0x3aec4e[_0x7f76('0x29')]=_0x3aec4e[_0x7f76('0x29')][_0x7f76('0x2c')](_0x7f76('0x2b'),'');}_0x165a1e[_0xa02fb3[_0x539c90][_0x7f76('0x24')]]=_0x3aec4e[_0x7f76('0x29')];break;default:_0x165a1e[_0xa02fb3[_0x539c90][_0x7f76('0x24')]]=_0x4df806[_0xa02fb3[_0x539c90][_0x7f76('0x24')]];}}return _0x165a1e[_0x7f76('0x28')](',');}function _0x3acada(_0x48a841,_0x50f136,_0x278069){return new Promise(function(_0xc1bd2,_0x4fa218){var _0x56493f=[];if(_[_0x7f76('0x2d')](_0x50f136))return _0xc1bd2(_0x56493f);_0x23f0c3['Interval'][_0x7f76('0x2e')]({'attributes':['id','interval','IntervalId'],'raw':!![]})[_0x7f76('0x2f')](function(_0x20ffe5){for(var _0x14b26b=0x0,_0x1f9564=0x0;_0x14b26b<_0x50f136[_0x7f76('0x22')];_0x14b26b++,_0x1f9564=0x0){var _0xb10f5b=_0x50f136[_0x14b26b];var _0x1dc32d=[];var _0x3588e2=[];delete _0xb10f5b['id'];if(_0xb10f5b[_0x7f76('0x30')]!==_0x7f76('0x31')){_0xb10f5b[_0x7f76('0x32')]=[_0xb10f5b[_0x7f76('0x30')]];}else{_0xb10f5b[_0x7f76('0x32')]=_0xb10f5b[_0x7f76('0x33')]?_['map'](_[_0x7f76('0x34')](_0x20ffe5,{'IntervalId':_0xb10f5b['IntervalId']}),_0x7f76('0x30')):[];}_0xb10f5b[_0x7f76('0x5')]=_0x48a841[_0x7f76('0x5')];_0xb10f5b[_0x7f76('0x6')]=_0x48a841['exten'];if(_0xb10f5b[_0x7f76('0x3')])_0xb10f5b[_0x7f76('0x3')]=_0xb10f5b[_0x7f76('0x3')][_0x7f76('0x35')]();if(_0x48a841['type']===_0x7f76('0xf')){if(_0xb10f5b[_0x7f76('0x1b')]('tag')&&_0xb10f5b[_0x7f76('0x36')]&&_0xb10f5b[_0x7f76('0x36')]!=='--'){_0x1dc32d[_0x7f76('0xd')]({'type':_0xb10f5b['type'][_0x7f76('0x35')](),'app':_0x7f76('0x7'),'appdata':_0x7f76('0x37')+_0xb10f5b[_0x7f76('0x36')],'context':_0x48a841[_0x7f76('0x5')],'exten':_0x48a841[_0x7f76('0x6')],'priority':_0xb10f5b[_0x7f76('0x32')][_0x7f76('0x22')]+_0x278069+_0x1f9564++,'VoiceExtensionId':_0x48a841['id']});}_0x1dc32d[_0x7f76('0xd')]({'type':_0xb10f5b[_0x7f76('0x3')][_0x7f76('0x35')](),'app':_0x7f76('0x13'),'appdata':'$[${LEN(${PREFIX-CALLERIDALL})}\x20>\x200]?Set(CALLERID(all)=${PREFIX-CALLERIDALL}):'+(_0xb10f5b[_0x7f76('0x38')]?'Set(CALLERID(all)='+_0xb10f5b[_0x7f76('0x38')]+')':_0x7f76('0x39')),'context':_0x48a841[_0x7f76('0x5')],'exten':_0x48a841['exten'],'priority':_0xb10f5b[_0x7f76('0x32')][_0x7f76('0x22')]+_0x278069+_0x1f9564++,'VoiceExtensionId':_0x48a841['id']});}else{if(_0xb10f5b['hasOwnProperty'](_0x7f76('0x3a'))){if([_0x7f76('0x3b'),_0x7f76('0x3c')][_0x7f76('0x3d')](_0xb10f5b[_0x7f76('0x3e')][_0x7f76('0x35')]())&&_0xb10f5b[_0x7f76('0x3f')]!==_0x7f76('0x40')){if(_0xb10f5b[_0x7f76('0x3a')]){_0x1dc32d['push']({'type':_0xb10f5b['type'][_0x7f76('0x35')](),'app':_0x7f76('0x13'),'appdata':_0x7f76('0x41'),'context':_0x48a841[_0x7f76('0x5')],'exten':_0x48a841[_0x7f76('0x6')],'priority':_0xb10f5b[_0x7f76('0x32')][_0x7f76('0x22')]+_0x278069+_0x1f9564++,'VoiceExtensionId':_0x48a841['id']});_0x1dc32d[_0x7f76('0xd')]({'type':_0xb10f5b[_0x7f76('0x3')]['toLowerCase'](),'app':_0x7f76('0x7'),'appdata':_0x7f76('0x42'),'context':_0x48a841[_0x7f76('0x5')],'exten':_0x48a841[_0x7f76('0x6')],'priority':_0xb10f5b[_0x7f76('0x32')][_0x7f76('0x22')]+_0x278069+_0x1f9564++,'VoiceExtensionId':_0x48a841['id']});}else{_0x1dc32d[_0x7f76('0xd')]({'type':_0xb10f5b['type'][_0x7f76('0x35')](),'app':'ExecIf','appdata':_0x7f76('0x43'),'context':_0x48a841[_0x7f76('0x5')],'exten':_0x48a841[_0x7f76('0x6')],'priority':_0xb10f5b[_0x7f76('0x32')][_0x7f76('0x22')]+_0x278069+_0x1f9564++,'VoiceExtensionId':_0x48a841['id']});_0x1dc32d[_0x7f76('0xd')]({'type':_0xb10f5b[_0x7f76('0x3')][_0x7f76('0x35')](),'app':'Set','appdata':'XCALLY-MOTION-PROGRESS=1','context':_0x48a841[_0x7f76('0x5')],'exten':_0x48a841[_0x7f76('0x6')],'priority':_0xb10f5b[_0x7f76('0x32')][_0x7f76('0x22')]+_0x278069+_0x1f9564++,'VoiceExtensionId':_0x48a841['id']});}}}}for(var _0xcee4fe=0x0;_0xcee4fe<_0xb10f5b[_0x7f76('0x32')][_0x7f76('0x22')];_0xcee4fe++){var _0xc8a635=_0x278069+_0xb10f5b['intervals']['length'];var _0x3b5eaf=_0xcee4fe===_0xb10f5b[_0x7f76('0x32')][_0x7f76('0x22')]-0x1?_0x278069+_0x1dc32d['length']+_0x3588e2[_0x7f76('0x22')]+0x2:_0x278069+_0xcee4fe+0x1;_0x1dc32d[_0x7f76('0x44')](_0xcee4fe,0x0,{'type':_0x48a841['type'],'app':_0x7f76('0x45'),'appdata':_0xb10f5b[_0x7f76('0x32')][_0xcee4fe]+'?'+_0x48a841[_0x7f76('0x5')]+_0x7f76('0x46')+_0xc8a635+':'+_0x48a841[_0x7f76('0x5')]+_0x7f76('0x46')+_0x3b5eaf,'exten':_0x48a841['exten'],'context':_0x48a841[_0x7f76('0x5')],'priority':_0x278069+_0xcee4fe,'VoiceExtensionId':_0x48a841['id']});}if(_0xb10f5b['appType']===_0x7f76('0x47'))_0xb10f5b['appdata']=_0x349343(_0x48a841,_0xb10f5b[_0x7f76('0x48')]);_0xb10f5b['priority']=_0x1dc32d[_0x7f76('0x22')]?_[_0x7f76('0x49')](_0x1dc32d)[_0x7f76('0x4a')]+0x1:_0x278069;_0x56493f=_[_0x7f76('0x4b')](_0x56493f,_0x1dc32d,[_0xb10f5b],_0x3588e2);_0x278069=_['last'](_0x56493f)[_0x7f76('0x4a')]+0x1;}return _0xc1bd2(_0x56493f);})[_0x7f76('0x4c')](function(_0x46b15b){_0x4fa218(_0x46b15b);});});}return _0x39149[_0x7f76('0x4d')](_0x7f76('0x4e'),attributes,{'tableName':'voice_extensions','paranoid':![],'indexes':[],'timestamps':!![],'instanceMethods':{'createRouting':function(_0x2c8fde){var _0x584e01=this[_0x7f76('0x4f')]({'plain':!![]});var _0x5374bf=_0x584e01[_0x7f76('0x3')]===_0x7f76('0xf')?_0x522a2c(_0x584e01):_0x5d215a(_0x584e01);return _0x3acada(_0x584e01,_0x2c8fde,_['last'](_0x5374bf)[_0x7f76('0x4a')]+0x1)[_0x7f76('0x2f')](function(_0xd7e34){var _0x718f7c=_[_0x7f76('0x4b')](_0x5374bf,_0xd7e34);_0x718f7c[_0x7f76('0xd')]({'type':_0x584e01[_0x7f76('0x3')],'app':_0x7f76('0x50'),'exten':_0x584e01[_0x7f76('0x6')],'context':_0x584e01[_0x7f76('0x5')],'priority':_[_0x7f76('0x49')](_0x718f7c)[_0x7f76('0x4a')]+0x1,'VoiceExtensionId':_0x584e01['id']});return _0x718f7c;});}}});}; \ No newline at end of file +var _0xbd50=['catch','define','VoiceExtension','voice_extensions','get','Hangup','lodash','./voiceExtension.attributes','exports','models','CDR(type)=','type','context','exten','NoOp','alias','CDR(routeAlias)=','No\x20alias\x20set','inbound','Set','CDR(routeid)=','push','XCALLY-MOTION-ANSWER=0','XCALLY-MOTION-PROGRESS=0','MONITOR_OPTIONS=ab','outbound','CDR(type)=outbound','CDR(destination)=','cutdigits','${EXTEN:','${EXTEN}','ExecIf','):Goto(','CDR(prefix)=${EXTEN:0:','CDR(prefix)=noprefix','outboundrouteid=','hasOwnProperty','recordingFormat','_XCALLY_MIXMONITOR_UNIQUEID=${UNIQUEID}','_XCALLY_MIXMONITOR_FORMAT=','wav','trunk','url','split','length','name','param','phone','prefix','SIP','join','options','none','U(xcally-mixmonitor-context)','replace','Interval','findAll','then','interval','*,*,*,*','intervals','IntervalId','map','tag','CDR(tag)=','Set(CALLERID(all)=','callerID','NoOp(No\x20number\x20available)','answer','app','toLowerCase','appType','$[${XCALLY-MOTION-PROGRESS}=0]?Progress','XCALLY-MOTION-PROGRESS=1','splice','outboundDial','appdata','priority','last','concat'];(function(_0x551739,_0x40cb34){var _0xebdce8=function(_0x4a596c){while(--_0x4a596c){_0x551739['push'](_0x551739['shift']());}};_0xebdce8(++_0x40cb34);}(_0xbd50,0x196));var _0x0bd5=function(_0x471e72,_0x393900){_0x471e72=_0x471e72-0x0;var _0x1c5684=_0xbd50[_0x471e72];return _0x1c5684;};'use strict';var _=require(_0x0bd5('0x0'));var attributes=require(_0x0bd5('0x1'));module[_0x0bd5('0x2')]=function(_0x4acbd6){var _0x44fcb9=_0x4acbd6[_0x0bd5('0x3')];function _0x37acba(_0x1e9877){var _0x15620d=0x2;var _0x4c17ee=[{'type':_0x1e9877['type'],'app':'Set','appdata':_0x0bd5('0x4')+_0x1e9877[_0x0bd5('0x5')],'context':_0x1e9877[_0x0bd5('0x6')],'exten':_0x1e9877[_0x0bd5('0x7')],'priority':_0x15620d++,'VoiceExtensionId':_0x1e9877['id']},{'type':_0x1e9877[_0x0bd5('0x5')],'app':_0x1e9877['alias']?'Set':_0x0bd5('0x8'),'appdata':_0x1e9877[_0x0bd5('0x9')]?_0x0bd5('0xa')+_0x1e9877['alias']:_0x0bd5('0xb'),'context':_0x1e9877[_0x0bd5('0x6')],'exten':_0x1e9877['exten'],'priority':_0x15620d++,'VoiceExtensionId':_0x1e9877['id']}];if(_0x1e9877[_0x0bd5('0x5')]===_0x0bd5('0xc')){_0x4c17ee['push']({'type':_0x0bd5('0xc'),'app':_0x0bd5('0xd'),'appdata':_0x0bd5('0xe')+_0x1e9877['id'],'context':_0x1e9877['context'],'exten':_0x1e9877[_0x0bd5('0x7')],'priority':_0x15620d++,'VoiceExtensionId':_0x1e9877['id']});}_0x4c17ee[_0x0bd5('0xf')]({'type':_0x1e9877[_0x0bd5('0x5')],'app':_0x0bd5('0xd'),'appdata':_0x0bd5('0x10'),'context':_0x1e9877[_0x0bd5('0x6')],'exten':_0x1e9877[_0x0bd5('0x7')],'priority':_0x15620d++,'VoiceExtensionId':_0x1e9877['id']},{'type':_0x1e9877[_0x0bd5('0x5')],'app':'Set','appdata':_0x0bd5('0x11'),'context':_0x1e9877[_0x0bd5('0x6')],'exten':_0x1e9877['exten'],'priority':_0x15620d++,'VoiceExtensionId':_0x1e9877['id']},{'type':_0x1e9877[_0x0bd5('0x5')],'app':_0x0bd5('0xd'),'appdata':_0x0bd5('0x12'),'context':_0x1e9877[_0x0bd5('0x6')],'exten':_0x1e9877['exten'],'priority':_0x15620d++,'VoiceExtensionId':_0x1e9877['id']});return _0x4c17ee;}function _0x14f32c(_0x2e4f36){var _0xa890be=0x2;var _0x277b32=[{'type':_0x0bd5('0x13'),'app':_0x0bd5('0xd'),'appdata':_0x0bd5('0x14'),'context':_0x2e4f36[_0x0bd5('0x6')],'exten':_0x2e4f36[_0x0bd5('0x7')],'priority':_0xa890be++,'VoiceExtensionId':_0x2e4f36['id']},{'type':_0x0bd5('0x13'),'app':_0x2e4f36[_0x0bd5('0x9')]?_0x0bd5('0xd'):_0x0bd5('0x8'),'appdata':_0x2e4f36[_0x0bd5('0x9')]?'CDR(routeAlias)='+_0x2e4f36['alias']:'No\x20alias\x20set','context':_0x2e4f36['context'],'exten':_0x2e4f36['exten'],'priority':_0xa890be++,'VoiceExtensionId':_0x2e4f36['id']},{'type':_0x0bd5('0x13'),'app':_0x0bd5('0xd'),'appdata':_0x0bd5('0x15')+(_0x2e4f36[_0x0bd5('0x16')]?_0x0bd5('0x17')+_0x2e4f36['cutdigits']+'}':_0x0bd5('0x18')),'context':_0x2e4f36[_0x0bd5('0x6')],'exten':_0x2e4f36[_0x0bd5('0x7')],'priority':_0xa890be++,'VoiceExtensionId':_0x2e4f36['id']},{'type':'outbound','app':_0x0bd5('0xd'),'appdata':'CDR(routeid)='+_0x2e4f36['id'],'context':_0x2e4f36['context'],'exten':_0x2e4f36[_0x0bd5('0x7')],'priority':_0xa890be++,'VoiceExtensionId':_0x2e4f36['id']},{'type':_0x0bd5('0x13'),'app':_0x0bd5('0x19'),'appdata':'$[${LEN(${CDR(prefix)})}\x20>\x200]?Goto('+(_0xa890be+0x2)+_0x0bd5('0x1a')+(_0xa890be+0x1)+')','context':_0x2e4f36['context'],'exten':_0x2e4f36[_0x0bd5('0x7')],'priority':_0xa890be++,'VoiceExtensionId':_0x2e4f36['id']},{'type':_0x0bd5('0x13'),'app':_0x0bd5('0xd'),'appdata':_0x2e4f36[_0x0bd5('0x16')]?_0x0bd5('0x1b')+_0x2e4f36[_0x0bd5('0x16')]+'}':_0x0bd5('0x1c'),'context':_0x2e4f36[_0x0bd5('0x6')],'exten':_0x2e4f36[_0x0bd5('0x7')],'priority':_0xa890be++,'VoiceExtensionId':_0x2e4f36['id']},{'type':_0x0bd5('0x13'),'app':_0x0bd5('0xd'),'appdata':_0x0bd5('0x10'),'context':_0x2e4f36[_0x0bd5('0x6')],'exten':_0x2e4f36[_0x0bd5('0x7')],'priority':_0xa890be++,'VoiceExtensionId':_0x2e4f36['id']},{'type':'outbound','app':_0x0bd5('0xd'),'appdata':_0x0bd5('0x11'),'context':_0x2e4f36['context'],'exten':_0x2e4f36[_0x0bd5('0x7')],'priority':_0xa890be++,'VoiceExtensionId':_0x2e4f36['id']},{'type':_0x0bd5('0x13'),'app':'Set','appdata':_0x0bd5('0x12'),'context':_0x2e4f36[_0x0bd5('0x6')],'exten':_0x2e4f36[_0x0bd5('0x7')],'priority':_0xa890be++,'VoiceExtensionId':_0x2e4f36['id']},{'type':_0x0bd5('0x13'),'app':'Set','appdata':_0x0bd5('0x1d')+_0x2e4f36['id'],'context':_0x2e4f36[_0x0bd5('0x6')],'exten':_0x2e4f36[_0x0bd5('0x7')],'priority':_0xa890be++,'VoiceExtensionId':_0x2e4f36['id']}];if(_0x2e4f36[_0x0bd5('0x1e')](_0x0bd5('0x1f'))&&_0x2e4f36[_0x0bd5('0x1f')]!=='none'){_0x277b32[_0x0bd5('0xf')]({'type':'outbound','app':_0x0bd5('0xd'),'appdata':_0x0bd5('0x20'),'context':_0x2e4f36[_0x0bd5('0x6')],'exten':_0x2e4f36[_0x0bd5('0x7')],'priority':_0xa890be++,'VoiceExtensionId':_0x2e4f36['id']},{'type':_0x0bd5('0x13'),'app':_0x0bd5('0xd'),'appdata':_0x0bd5('0x21')+_0x2e4f36[_0x0bd5('0x1f')]||_0x0bd5('0x22'),'context':_0x2e4f36[_0x0bd5('0x6')],'exten':_0x2e4f36[_0x0bd5('0x7')],'priority':_0xa890be++,'VoiceExtensionId':_0x2e4f36['id']});}return _0x277b32;}function _0x64d66d(_0x3cfb74,_0x4c9a61){var _0x3e153a=[{'name':_0x0bd5('0x23'),'param':0x0},{'name':'timeout','param':0x1},{'name':'options','param':0x2},{'name':_0x0bd5('0x24'),'param':0x3}];var _0xdf1ef5={};var _0x8a6edc=_0x4c9a61[_0x0bd5('0x25')](',');var _0x1dd2e1=[];for(var _0x387e24=0x0;_0x387e24<_0x3e153a[_0x0bd5('0x26')];_0x387e24++){switch(_0x3e153a[_0x387e24][_0x0bd5('0x27')]){case _0x0bd5('0x23'):_0xdf1ef5[_0x0bd5('0x23')]=_0x8a6edc[_0x3e153a[_0x387e24][_0x0bd5('0x28')]][_0x0bd5('0x25')]('/')[0x1];_0xdf1ef5[_0x0bd5('0x29')]=_0x8a6edc[_0x3e153a[_0x387e24]['param']][_0x0bd5('0x25')]('/')[0x2];_0xdf1ef5['prefix']=_0xdf1ef5[_0x0bd5('0x29')]?_0xdf1ef5[_0x0bd5('0x29')][_0x0bd5('0x25')]('$')[0x0]:undefined;_0xdf1ef5[_0x0bd5('0x29')]=_0x3cfb74[_0x0bd5('0x16')]?(_0xdf1ef5[_0x0bd5('0x2a')]||'')+'${EXTEN:'+_0x3cfb74[_0x0bd5('0x16')]+'}':(_0xdf1ef5[_0x0bd5('0x2a')]||'')+_0x0bd5('0x18');_0x1dd2e1[_0x3e153a[_0x387e24][_0x0bd5('0x28')]]=[_0x0bd5('0x2b'),_0xdf1ef5[_0x0bd5('0x23')],_0xdf1ef5[_0x0bd5('0x29')]][_0x0bd5('0x2c')]('/');break;case _0x0bd5('0x2d'):_0xdf1ef5['options']=_0x8a6edc[_0x3e153a[_0x387e24][_0x0bd5('0x28')]];if(_0x3cfb74['recordingFormat']!==_0x0bd5('0x2e')){if(_0xdf1ef5[_0x0bd5('0x2d')]['indexOf'](_0x0bd5('0x2f'))<0x0){_0xdf1ef5[_0x0bd5('0x2d')]+=_0x0bd5('0x2f');}}else{_0xdf1ef5[_0x0bd5('0x2d')]=_0xdf1ef5[_0x0bd5('0x2d')][_0x0bd5('0x30')](_0x0bd5('0x2f'),'');}_0x1dd2e1[_0x3e153a[_0x387e24]['param']]=_0xdf1ef5['options'];break;default:_0x1dd2e1[_0x3e153a[_0x387e24][_0x0bd5('0x28')]]=_0x8a6edc[_0x3e153a[_0x387e24]['param']];}}return _0x1dd2e1['join'](',');}function _0x28892e(_0x3c6f2b,_0x480d1b,_0x544275){return new Promise(function(_0x5cb5ae,_0xcf09de){var _0x561a38=[];if(_['isEmpty'](_0x480d1b))return _0x5cb5ae(_0x561a38);_0x44fcb9[_0x0bd5('0x31')][_0x0bd5('0x32')]({'attributes':['id','interval','IntervalId'],'raw':!![]})[_0x0bd5('0x33')](function(_0x3f645b){for(var _0x238fc7=0x0,_0xa36962=0x0;_0x238fc7<_0x480d1b['length'];_0x238fc7++,_0xa36962=0x0){var _0x290342=_0x480d1b[_0x238fc7];var _0x44f485=[];var _0x1c34b8=[];delete _0x290342['id'];if(_0x290342[_0x0bd5('0x34')]!==_0x0bd5('0x35')){_0x290342[_0x0bd5('0x36')]=[_0x290342['interval']];}else{_0x290342[_0x0bd5('0x36')]=_0x290342[_0x0bd5('0x37')]?_[_0x0bd5('0x38')](_['filter'](_0x3f645b,{'IntervalId':_0x290342[_0x0bd5('0x37')]}),_0x0bd5('0x34')):[];}_0x290342[_0x0bd5('0x6')]=_0x3c6f2b['context'];_0x290342[_0x0bd5('0x7')]=_0x3c6f2b[_0x0bd5('0x7')];if(_0x290342[_0x0bd5('0x5')])_0x290342[_0x0bd5('0x5')]=_0x290342[_0x0bd5('0x5')]['toLowerCase']();if(_0x3c6f2b[_0x0bd5('0x5')]===_0x0bd5('0x13')){if(_0x290342['hasOwnProperty'](_0x0bd5('0x39'))&&_0x290342[_0x0bd5('0x39')]&&_0x290342[_0x0bd5('0x39')]!=='--'){_0x44f485[_0x0bd5('0xf')]({'type':_0x290342[_0x0bd5('0x5')]['toLowerCase'](),'app':_0x0bd5('0xd'),'appdata':_0x0bd5('0x3a')+_0x290342['tag'],'context':_0x3c6f2b[_0x0bd5('0x6')],'exten':_0x3c6f2b['exten'],'priority':_0x290342[_0x0bd5('0x36')][_0x0bd5('0x26')]+_0x544275+_0xa36962++,'VoiceExtensionId':_0x3c6f2b['id']});}_0x44f485[_0x0bd5('0xf')]({'type':_0x290342[_0x0bd5('0x5')]['toLowerCase'](),'app':_0x0bd5('0x19'),'appdata':'$[${LEN(${PREFIX-CALLERIDALL})}\x20>\x200]?Set(CALLERID(all)=${PREFIX-CALLERIDALL}):'+(_0x290342['callerID']?_0x0bd5('0x3b')+_0x290342[_0x0bd5('0x3c')]+')':_0x0bd5('0x3d')),'context':_0x3c6f2b['context'],'exten':_0x3c6f2b[_0x0bd5('0x7')],'priority':_0x290342['intervals'][_0x0bd5('0x26')]+_0x544275+_0xa36962++,'VoiceExtensionId':_0x3c6f2b['id']});}else{if(_0x290342[_0x0bd5('0x1e')](_0x0bd5('0x3e'))){if(['queue','playback']['includes'](_0x290342[_0x0bd5('0x3f')][_0x0bd5('0x40')]())&&_0x290342[_0x0bd5('0x41')]!=='custom'){if(_0x290342[_0x0bd5('0x3e')]){_0x44f485[_0x0bd5('0xf')]({'type':_0x290342['type'][_0x0bd5('0x40')](),'app':'ExecIf','appdata':'$[${XCALLY-MOTION-ANSWER}=0]?Answer','context':_0x3c6f2b[_0x0bd5('0x6')],'exten':_0x3c6f2b[_0x0bd5('0x7')],'priority':_0x290342[_0x0bd5('0x36')][_0x0bd5('0x26')]+_0x544275+_0xa36962++,'VoiceExtensionId':_0x3c6f2b['id']});_0x44f485['push']({'type':_0x290342[_0x0bd5('0x5')][_0x0bd5('0x40')](),'app':_0x0bd5('0xd'),'appdata':'XCALLY-MOTION-ANSWER=1','context':_0x3c6f2b[_0x0bd5('0x6')],'exten':_0x3c6f2b[_0x0bd5('0x7')],'priority':_0x290342[_0x0bd5('0x36')]['length']+_0x544275+_0xa36962++,'VoiceExtensionId':_0x3c6f2b['id']});}else{_0x44f485['push']({'type':_0x290342[_0x0bd5('0x5')]['toLowerCase'](),'app':_0x0bd5('0x19'),'appdata':_0x0bd5('0x42'),'context':_0x3c6f2b[_0x0bd5('0x6')],'exten':_0x3c6f2b['exten'],'priority':_0x290342[_0x0bd5('0x36')][_0x0bd5('0x26')]+_0x544275+_0xa36962++,'VoiceExtensionId':_0x3c6f2b['id']});_0x44f485[_0x0bd5('0xf')]({'type':_0x290342[_0x0bd5('0x5')]['toLowerCase'](),'app':_0x0bd5('0xd'),'appdata':_0x0bd5('0x43'),'context':_0x3c6f2b[_0x0bd5('0x6')],'exten':_0x3c6f2b[_0x0bd5('0x7')],'priority':_0x290342[_0x0bd5('0x36')]['length']+_0x544275+_0xa36962++,'VoiceExtensionId':_0x3c6f2b['id']});}}}}for(var _0xd651f2=0x0;_0xd651f2<_0x290342['intervals'][_0x0bd5('0x26')];_0xd651f2++){var _0x5d6cb3=_0x544275+_0x290342['intervals'][_0x0bd5('0x26')];var _0x55883d=_0xd651f2===_0x290342[_0x0bd5('0x36')][_0x0bd5('0x26')]-0x1?_0x544275+_0x44f485[_0x0bd5('0x26')]+_0x1c34b8['length']+0x2:_0x544275+_0xd651f2+0x1;_0x44f485[_0x0bd5('0x44')](_0xd651f2,0x0,{'type':_0x3c6f2b[_0x0bd5('0x5')],'app':'GotoIfTime','appdata':_0x290342[_0x0bd5('0x36')][_0xd651f2]+'?'+_0x3c6f2b[_0x0bd5('0x6')]+',${EXTEN},'+_0x5d6cb3+':'+_0x3c6f2b[_0x0bd5('0x6')]+',${EXTEN},'+_0x55883d,'exten':_0x3c6f2b[_0x0bd5('0x7')],'context':_0x3c6f2b[_0x0bd5('0x6')],'priority':_0x544275+_0xd651f2,'VoiceExtensionId':_0x3c6f2b['id']});}if(_0x290342[_0x0bd5('0x41')]===_0x0bd5('0x45'))_0x290342[_0x0bd5('0x46')]=_0x64d66d(_0x3c6f2b,_0x290342[_0x0bd5('0x46')]);_0x290342[_0x0bd5('0x47')]=_0x44f485['length']?_[_0x0bd5('0x48')](_0x44f485)[_0x0bd5('0x47')]+0x1:_0x544275;_0x561a38=_[_0x0bd5('0x49')](_0x561a38,_0x44f485,[_0x290342],_0x1c34b8);_0x544275=_['last'](_0x561a38)['priority']+0x1;}return _0x5cb5ae(_0x561a38);})[_0x0bd5('0x4a')](function(_0x378586){_0xcf09de(_0x378586);});});}return _0x4acbd6[_0x0bd5('0x4b')](_0x0bd5('0x4c'),attributes,{'tableName':_0x0bd5('0x4d'),'paranoid':![],'indexes':[],'timestamps':!![],'instanceMethods':{'createRouting':function(_0x43b330){var _0x1db7f2=this[_0x0bd5('0x4e')]({'plain':!![]});var _0x38687d=_0x1db7f2[_0x0bd5('0x5')]===_0x0bd5('0x13')?_0x14f32c(_0x1db7f2):_0x37acba(_0x1db7f2);return _0x28892e(_0x1db7f2,_0x43b330,_[_0x0bd5('0x48')](_0x38687d)[_0x0bd5('0x47')]+0x1)[_0x0bd5('0x33')](function(_0x1c9a84){var _0x2865b3=_[_0x0bd5('0x49')](_0x38687d,_0x1c9a84);_0x2865b3[_0x0bd5('0xf')]({'type':_0x1db7f2['type'],'app':_0x0bd5('0x4f'),'exten':_0x1db7f2[_0x0bd5('0x7')],'context':_0x1db7f2['context'],'priority':_[_0x0bd5('0x48')](_0x2865b3)['priority']+0x1,'VoiceExtensionId':_0x1db7f2['id']});return _0x2865b3;});}}});}; \ No newline at end of file diff --git a/server/api/voiceExtension/voiceExtension.rpc.js b/server/api/voiceExtension/voiceExtension.rpc.js index 7efaa96..961e3f7 100644 --- a/server/api/voiceExtension/voiceExtension.rpc.js +++ b/server/api/voiceExtension/voiceExtension.rpc.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xa0a1=['register','request','VoiceExtension,\x20%s,\x20%s','request\x20sent','debug','VoiceExtension,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','catch','GetVoiceExtension','findAll','options','where','limit','map','model','attributes','include','then','info','lodash','moment','bluebird','randomstring','../../config/utils','../../config/logger','../../config/environment','jayson/promise','http','redis','defaults','localhost','./voiceExtension.socket'];(function(_0x2b3358,_0xb18eea){var _0x259384=function(_0x4c4b9e){while(--_0x4c4b9e){_0x2b3358['push'](_0x2b3358['shift']());}};_0x259384(++_0xb18eea);}(_0xa0a1,0x15b));var _0x1a0a=function(_0x2c83b7,_0xa6861c){_0x2c83b7=_0x2c83b7-0x0;var _0x7fc6e8=_0xa0a1[_0x2c83b7];return _0x7fc6e8;};'use strict';var _=require(_0x1a0a('0x0'));var util=require('util');var moment=require(_0x1a0a('0x1'));var BPromise=require(_0x1a0a('0x2'));var rs=require(_0x1a0a('0x3'));var fs=require('fs');var Redis=require('ioredis');var db=require('../../mysqldb')['db'];var utils=require(_0x1a0a('0x4'));var logger=require(_0x1a0a('0x5'))('rpc');var config=require(_0x1a0a('0x6'));var jayson=require(_0x1a0a('0x7'));var client=jayson['client'][_0x1a0a('0x8')]({'port':0x232a});config[_0x1a0a('0x9')]=_[_0x1a0a('0xa')](config[_0x1a0a('0x9')],{'host':_0x1a0a('0xb'),'port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config[_0x1a0a('0x9')]));require(_0x1a0a('0xc'))[_0x1a0a('0xd')](socket);function respondWithRpcPromise(_0x4ffaf5,_0x511d2f,_0x53a060){return new BPromise(function(_0x42277a,_0xf92e83){return client[_0x1a0a('0xe')](_0x4ffaf5,_0x53a060)['then'](function(_0x1d8bda){logger['info'](_0x1a0a('0xf'),_0x511d2f,_0x1a0a('0x10'));logger[_0x1a0a('0x11')](_0x1a0a('0x12'),_0x511d2f,_0x1a0a('0x10'),JSON[_0x1a0a('0x13')](_0x1d8bda));if(_0x1d8bda[_0x1a0a('0x14')]){if(_0x1d8bda['error'][_0x1a0a('0x15')]===0x1f4){logger[_0x1a0a('0x14')](_0x1a0a('0xf'),_0x511d2f,_0x1d8bda[_0x1a0a('0x14')][_0x1a0a('0x16')]);return _0xf92e83(_0x1d8bda['error'][_0x1a0a('0x16')]);}logger[_0x1a0a('0x14')](_0x1a0a('0xf'),_0x511d2f,_0x1d8bda['error'][_0x1a0a('0x16')]);return _0x42277a(_0x1d8bda['error'][_0x1a0a('0x16')]);}else{logger['info']('VoiceExtension,\x20%s,\x20%s',_0x511d2f,_0x1a0a('0x10'));_0x42277a(_0x1d8bda[_0x1a0a('0x17')][_0x1a0a('0x16')]);}})[_0x1a0a('0x18')](function(_0x4d11a4){logger['error'](_0x1a0a('0xf'),_0x511d2f,_0x4d11a4);_0xf92e83(_0x4d11a4);});});}exports[_0x1a0a('0x19')]=function(_0xfa74ce){var _0x5b2884=this;return new Promise(function(_0x1976ba,_0x3547fe){return db['VoiceExtension'][_0x1a0a('0x1a')]({'raw':_0xfa74ce[_0x1a0a('0x1b')]?_0xfa74ce[_0x1a0a('0x1b')]['raw']===undefined?!![]:![]:!![],'where':_0xfa74ce[_0x1a0a('0x1b')]?_0xfa74ce[_0x1a0a('0x1b')][_0x1a0a('0x1c')]||null:null,'attributes':_0xfa74ce['options']?_0xfa74ce[_0x1a0a('0x1b')]['attributes']||null:null,'limit':_0xfa74ce[_0x1a0a('0x1b')]?_0xfa74ce[_0x1a0a('0x1b')][_0x1a0a('0x1d')]||null:null,'include':_0xfa74ce[_0x1a0a('0x1b')]?_0xfa74ce[_0x1a0a('0x1b')]['include']?_[_0x1a0a('0x1e')](_0xfa74ce[_0x1a0a('0x1b')]['include'],function(_0x4cf939){return{'model':db[_0x4cf939[_0x1a0a('0x1f')]],'as':_0x4cf939['as'],'attributes':_0x4cf939[_0x1a0a('0x20')],'include':_0x4cf939[_0x1a0a('0x21')]?_[_0x1a0a('0x1e')](_0x4cf939[_0x1a0a('0x21')],function(_0x244bbf){return{'model':db[_0x244bbf[_0x1a0a('0x1f')]],'as':_0x244bbf['as'],'attributes':_0x244bbf[_0x1a0a('0x20')],'include':_0x244bbf[_0x1a0a('0x21')]?_[_0x1a0a('0x1e')](_0x244bbf[_0x1a0a('0x21')],function(_0x35fd0a){return{'model':db[_0x35fd0a[_0x1a0a('0x1f')]],'as':_0x35fd0a['as'],'attributes':_0x35fd0a[_0x1a0a('0x20')]};}):[]};}):[]};}):[]:[]})[_0x1a0a('0x22')](function(_0x3069ab){logger[_0x1a0a('0x23')]('GetVoiceExtension',_0xfa74ce);logger[_0x1a0a('0x11')](_0x1a0a('0x19'),_0xfa74ce,JSON[_0x1a0a('0x13')](_0x3069ab));_0x1976ba(_0x3069ab);})[_0x1a0a('0x18')](function(_0x133bb8){logger[_0x1a0a('0x14')](_0x1a0a('0x19'),_0x133bb8[_0x1a0a('0x16')],_0xfa74ce);_0x3547fe(_0x5b2884[_0x1a0a('0x14')](0x1f4,_0x133bb8[_0x1a0a('0x16')]));});});}; \ No newline at end of file +var _0x6dac=['client','redis','defaults','localhost','socket.io-emitter','./voiceExtension.socket','register','request','then','info','VoiceExtension,\x20%s,\x20%s','request\x20sent','debug','VoiceExtension,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','GetVoiceExtension','VoiceExtension','findAll','options','raw','limit','include','map','model','attributes','catch','lodash','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise'];(function(_0x4792c8,_0x5158a1){var _0x35edb1=function(_0x2472d3){while(--_0x2472d3){_0x4792c8['push'](_0x4792c8['shift']());}};_0x35edb1(++_0x5158a1);}(_0x6dac,0x16e));var _0xc6da=function(_0x3bd959,_0x4b1526){_0x3bd959=_0x3bd959-0x0;var _0x35bd20=_0x6dac[_0x3bd959];return _0x35bd20;};'use strict';var _=require(_0xc6da('0x0'));var util=require(_0xc6da('0x1'));var moment=require(_0xc6da('0x2'));var BPromise=require(_0xc6da('0x3'));var rs=require(_0xc6da('0x4'));var fs=require('fs');var Redis=require(_0xc6da('0x5'));var db=require(_0xc6da('0x6'))['db'];var utils=require(_0xc6da('0x7'));var logger=require(_0xc6da('0x8'))(_0xc6da('0x9'));var config=require(_0xc6da('0xa'));var jayson=require(_0xc6da('0xb'));var client=jayson[_0xc6da('0xc')]['http']({'port':0x232a});config[_0xc6da('0xd')]=_[_0xc6da('0xe')](config[_0xc6da('0xd')],{'host':_0xc6da('0xf'),'port':0x18eb});var socket=require(_0xc6da('0x10'))(new Redis(config[_0xc6da('0xd')]));require(_0xc6da('0x11'))[_0xc6da('0x12')](socket);function respondWithRpcPromise(_0x13fea1,_0x48455d,_0x34b9ea){return new BPromise(function(_0x2e4eb7,_0x414831){return client[_0xc6da('0x13')](_0x13fea1,_0x34b9ea)[_0xc6da('0x14')](function(_0x27411e){logger[_0xc6da('0x15')](_0xc6da('0x16'),_0x48455d,_0xc6da('0x17'));logger[_0xc6da('0x18')](_0xc6da('0x19'),_0x48455d,_0xc6da('0x17'),JSON[_0xc6da('0x1a')](_0x27411e));if(_0x27411e['error']){if(_0x27411e[_0xc6da('0x1b')][_0xc6da('0x1c')]===0x1f4){logger[_0xc6da('0x1b')](_0xc6da('0x16'),_0x48455d,_0x27411e[_0xc6da('0x1b')][_0xc6da('0x1d')]);return _0x414831(_0x27411e['error'][_0xc6da('0x1d')]);}logger[_0xc6da('0x1b')](_0xc6da('0x16'),_0x48455d,_0x27411e[_0xc6da('0x1b')][_0xc6da('0x1d')]);return _0x2e4eb7(_0x27411e['error'][_0xc6da('0x1d')]);}else{logger['info'](_0xc6da('0x16'),_0x48455d,_0xc6da('0x17'));_0x2e4eb7(_0x27411e[_0xc6da('0x1e')][_0xc6da('0x1d')]);}})['catch'](function(_0x232565){logger[_0xc6da('0x1b')](_0xc6da('0x16'),_0x48455d,_0x232565);_0x414831(_0x232565);});});}exports[_0xc6da('0x1f')]=function(_0x357880){var _0x3d16bc=this;return new Promise(function(_0x423387,_0x36ac99){return db[_0xc6da('0x20')][_0xc6da('0x21')]({'raw':_0x357880['options']?_0x357880[_0xc6da('0x22')][_0xc6da('0x23')]===undefined?!![]:![]:!![],'where':_0x357880[_0xc6da('0x22')]?_0x357880[_0xc6da('0x22')]['where']||null:null,'attributes':_0x357880[_0xc6da('0x22')]?_0x357880[_0xc6da('0x22')]['attributes']||null:null,'limit':_0x357880[_0xc6da('0x22')]?_0x357880[_0xc6da('0x22')][_0xc6da('0x24')]||null:null,'include':_0x357880[_0xc6da('0x22')]?_0x357880['options'][_0xc6da('0x25')]?_[_0xc6da('0x26')](_0x357880['options'][_0xc6da('0x25')],function(_0x89b637){return{'model':db[_0x89b637[_0xc6da('0x27')]],'as':_0x89b637['as'],'attributes':_0x89b637['attributes'],'include':_0x89b637['include']?_[_0xc6da('0x26')](_0x89b637[_0xc6da('0x25')],function(_0x5edb14){return{'model':db[_0x5edb14['model']],'as':_0x5edb14['as'],'attributes':_0x5edb14['attributes'],'include':_0x5edb14['include']?_[_0xc6da('0x26')](_0x5edb14[_0xc6da('0x25')],function(_0x33eba0){return{'model':db[_0x33eba0['model']],'as':_0x33eba0['as'],'attributes':_0x33eba0[_0xc6da('0x28')]};}):[]};}):[]};}):[]:[]})[_0xc6da('0x14')](function(_0x13cb9e){logger[_0xc6da('0x15')]('GetVoiceExtension',_0x357880);logger['debug'](_0xc6da('0x1f'),_0x357880,JSON['stringify'](_0x13cb9e));_0x423387(_0x13cb9e);})[_0xc6da('0x29')](function(_0xff5a50){logger[_0xc6da('0x1b')]('GetVoiceExtension',_0xff5a50[_0xc6da('0x1d')],_0x357880);_0x36ac99(_0x3d16bc[_0xc6da('0x1b')](0x1f4,_0xff5a50[_0xc6da('0x1d')]));});});}; \ No newline at end of file diff --git a/server/api/voiceExtension/voiceExtension.socket.js b/server/api/voiceExtension/voiceExtension.socket.js index 2df4aa8..694fbe1 100644 --- a/server/api/voiceExtension/voiceExtension.socket.js +++ b/server/api/voiceExtension/voiceExtension.socket.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x4975=['length','./voiceExtension.events','remove','update','emit','removeListener','register'];(function(_0x5990f3,_0x39a5ef){var _0xd883fe=function(_0x4f87cd){while(--_0x4f87cd){_0x5990f3['push'](_0x5990f3['shift']());}};_0xd883fe(++_0x39a5ef);}(_0x4975,0x86));var _0x5497=function(_0x11b14d,_0x31a0f2){_0x11b14d=_0x11b14d-0x0;var _0x27de63=_0x4975[_0x11b14d];return _0x27de63;};'use strict';var VoiceExtensionEvents=require(_0x5497('0x0'));var events=['save',_0x5497('0x1'),_0x5497('0x2')];function createListener(_0xfc7927,_0x349f5f){return function(_0x135f6f){_0x349f5f[_0x5497('0x3')](_0xfc7927,_0x135f6f);};}function removeListener(_0x14cecb,_0xeb31af){return function(){VoiceExtensionEvents[_0x5497('0x4')](_0x14cecb,_0xeb31af);};}exports[_0x5497('0x5')]=function(_0x539a27){for(var _0x37e48d=0x0,_0x4f563d=events[_0x5497('0x6')];_0x37e48d<_0x4f563d;_0x37e48d++){var _0x674a2a=events[_0x37e48d];var _0x368e8b=createListener('voiceExtension:'+_0x674a2a,_0x539a27);VoiceExtensionEvents['on'](_0x674a2a,_0x368e8b);}}; \ No newline at end of file +var _0xe14b=['removeListener','register','length','./voiceExtension.events','save','emit'];(function(_0x35ad07,_0x4b6cc4){var _0x5346ee=function(_0x8e366e){while(--_0x8e366e){_0x35ad07['push'](_0x35ad07['shift']());}};_0x5346ee(++_0x4b6cc4);}(_0xe14b,0x93));var _0xbe14=function(_0x520fe2,_0x3bfe8b){_0x520fe2=_0x520fe2-0x0;var _0x509442=_0xe14b[_0x520fe2];return _0x509442;};'use strict';var VoiceExtensionEvents=require(_0xbe14('0x0'));var events=[_0xbe14('0x1'),'remove','update'];function createListener(_0x11c3a0,_0x36393a){return function(_0x48a116){_0x36393a[_0xbe14('0x2')](_0x11c3a0,_0x48a116);};}function removeListener(_0x5ce8fb,_0x496c04){return function(){VoiceExtensionEvents[_0xbe14('0x3')](_0x5ce8fb,_0x496c04);};}exports[_0xbe14('0x4')]=function(_0x1fe204){for(var _0x1ff100=0x0,_0x1d9ade=events[_0xbe14('0x5')];_0x1ff100<_0x1d9ade;_0x1ff100++){var _0x196fca=events[_0x1ff100];var _0x566ae7=createListener('voiceExtension:'+_0x196fca,_0x1fe204);VoiceExtensionEvents['on'](_0x196fca,_0x566ae7);}}; \ No newline at end of file diff --git a/server/api/voiceMail/index.js b/server/api/voiceMail/index.js index f4c6b9e..afc36ee 100644 --- a/server/api/voiceMail/index.js +++ b/server/api/voiceMail/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xa456=['util','path','connect-timeout','Router','fs-extra','../../components/auth/service','../../config/environment','./voiceMail.controller','get','isAuthenticated','/:id','show','post','create','put','delete','multer'];(function(_0xa7429c,_0x3f6c95){var _0x57aacc=function(_0x276abe){while(--_0x276abe){_0xa7429c['push'](_0xa7429c['shift']());}};_0x57aacc(++_0x3f6c95);}(_0xa456,0x142));var _0x6a45=function(_0x500419,_0x549162){_0x500419=_0x500419-0x0;var _0x241c1a=_0xa456[_0x500419];return _0x241c1a;};'use strict';var multer=require(_0x6a45('0x0'));var util=require(_0x6a45('0x1'));var path=require(_0x6a45('0x2'));var timeout=require(_0x6a45('0x3'));var express=require('express');var router=express[_0x6a45('0x4')]();var fs_extra=require(_0x6a45('0x5'));var auth=require(_0x6a45('0x6'));var interaction=require('../../components/interaction/service');var config=require(_0x6a45('0x7'));var controller=require(_0x6a45('0x8'));router[_0x6a45('0x9')]('/',auth[_0x6a45('0xa')](),controller['index']);router[_0x6a45('0x9')](_0x6a45('0xb'),auth[_0x6a45('0xa')](),controller[_0x6a45('0xc')]);router[_0x6a45('0x9')]('/:id/messages',auth[_0x6a45('0xa')](),controller['getMessages']);router[_0x6a45('0xd')]('/',auth[_0x6a45('0xa')](),controller[_0x6a45('0xe')]);router[_0x6a45('0xf')](_0x6a45('0xb'),auth['isAuthenticated'](),controller['update']);router[_0x6a45('0x10')](_0x6a45('0xb'),auth['isAuthenticated'](),controller['destroy']);module['exports']=router; \ No newline at end of file +var _0x430c=['isAuthenticated','show','/:id/messages','getMessages','post','put','update','destroy','exports','multer','connect-timeout','express','Router','./voiceMail.controller','get','index','/:id'];(function(_0x1c4b99,_0x28d322){var _0x2daee1=function(_0x12f523){while(--_0x12f523){_0x1c4b99['push'](_0x1c4b99['shift']());}};_0x2daee1(++_0x28d322);}(_0x430c,0x1a1));var _0xc430=function(_0x54f7c0,_0x27af83){_0x54f7c0=_0x54f7c0-0x0;var _0x245d03=_0x430c[_0x54f7c0];return _0x245d03;};'use strict';var multer=require(_0xc430('0x0'));var util=require('util');var path=require('path');var timeout=require(_0xc430('0x1'));var express=require(_0xc430('0x2'));var router=express[_0xc430('0x3')]();var fs_extra=require('fs-extra');var auth=require('../../components/auth/service');var interaction=require('../../components/interaction/service');var config=require('../../config/environment');var controller=require(_0xc430('0x4'));router[_0xc430('0x5')]('/',auth['isAuthenticated'](),controller[_0xc430('0x6')]);router['get'](_0xc430('0x7'),auth[_0xc430('0x8')](),controller[_0xc430('0x9')]);router[_0xc430('0x5')](_0xc430('0xa'),auth[_0xc430('0x8')](),controller[_0xc430('0xb')]);router[_0xc430('0xc')]('/',auth[_0xc430('0x8')](),controller['create']);router[_0xc430('0xd')](_0xc430('0x7'),auth['isAuthenticated'](),controller[_0xc430('0xe')]);router['delete'](_0xc430('0x7'),auth['isAuthenticated'](),controller[_0xc430('0xf')]);module[_0xc430('0x10')]=router; \ No newline at end of file diff --git a/server/api/voiceMail/voiceMail.attributes.js b/server/api/voiceMail/voiceMail.attributes.js index eeb1a31..d4c4c22 100644 --- a/server/api/voiceMail/voiceMail.attributes.js +++ b/server/api/voiceMail/voiceMail.attributes.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x07fd=['from-voicemail','contest_mailbox','STRING','setDataValue','trim','central','ENUM','yes','TINYINT(4)','TIMESTAMP','INTEGER','VIRTUAL','getDataValue','\x20-\x20','mailbox','sequelize','exports'];(function(_0x480bc8,_0x1fac40){var _0x28c245=function(_0x22a049){while(--_0x22a049){_0x480bc8['push'](_0x480bc8['shift']());}};_0x28c245(++_0x1fac40);}(_0x07fd,0xdb));var _0xd07f=function(_0x1b9f97,_0x399247){_0x1b9f97=_0x1b9f97-0x0;var _0x2d2a78=_0x07fd[_0x1b9f97];return _0x2d2a78;};'use strict';var Sequelize=require(_0xd07f('0x0'));module[_0xd07f('0x1')]={'customer_id':{'type':Sequelize['STRING']},'context':{'type':Sequelize['STRING'],'defaultValue':_0xd07f('0x2'),'unique':_0xd07f('0x3')},'mailbox':{'type':Sequelize[_0xd07f('0x4')],'defaultValue':'','allowNull':![],'unique':_0xd07f('0x3')},'password':{'type':Sequelize[_0xd07f('0x4')]},'fullname':{'type':Sequelize['STRING']},'email':{'type':Sequelize[_0xd07f('0x4')],'validate':{'isEmail':!![]},'set':function(_0x1ec6ce){this[_0xd07f('0x5')]('email',typeof _0x1ec6ce==='string'&&_0x1ec6ce[_0xd07f('0x6')]()?_0x1ec6ce[_0xd07f('0x6')]():null);}},'pager':{'type':Sequelize[_0xd07f('0x4')]},'tz':{'type':Sequelize[_0xd07f('0x4')],'defaultValue':_0xd07f('0x7')},'attach':{'type':Sequelize[_0xd07f('0x8')](_0xd07f('0x9'),'no'),'defaultValue':_0xd07f('0x9'),'allowNull':![]},'saycid':{'type':Sequelize['ENUM']('yes','no'),'defaultValue':'yes','allowNull':![]},'dialout':{'type':Sequelize[_0xd07f('0x4')]},'callback':{'type':Sequelize['STRING']},'review':{'type':Sequelize[_0xd07f('0x8')](_0xd07f('0x9'),'no'),'defaultValue':'no','allowNull':![]},'operator':{'type':Sequelize[_0xd07f('0x8')]('yes','no'),'defaultValue':'no','allowNull':![]},'envelope':{'type':Sequelize[_0xd07f('0x8')](_0xd07f('0x9'),'no'),'defaultValue':'no','allowNull':![]},'sayduration':{'type':Sequelize[_0xd07f('0x8')](_0xd07f('0x9'),'no'),'defaultValue':'no','allowNull':![]},'saydurationm':{'type':_0xd07f('0xa'),'defaultValue':0x1,'allowNull':![]},'sendvoicemail':{'type':Sequelize[_0xd07f('0x8')](_0xd07f('0x9'),'no'),'defaultValue':'no','allowNull':![]},'delete':{'type':Sequelize[_0xd07f('0x8')](_0xd07f('0x9'),'no'),'defaultValue':'no','allowNull':![]},'nextaftercmd':{'type':Sequelize['ENUM']('yes','no'),'defaultValue':'yes','allowNull':![]},'forcename':{'type':Sequelize[_0xd07f('0x8')]('yes','no'),'defaultValue':'no','allowNull':![]},'forcegreetings':{'type':Sequelize['ENUM']('yes','no'),'defaultValue':'no','allowNull':![]},'hidefromdir':{'type':Sequelize['ENUM']('yes','no'),'defaultValue':_0xd07f('0x9'),'allowNull':![]},'stamp':{'type':_0xd07f('0xb')},'emailsubject':{'type':Sequelize[_0xd07f('0x4')]},'emailbody':{'type':Sequelize[_0xd07f('0x4')]},'maxsecs':{'type':Sequelize[_0xd07f('0xc')](0xff),'defaultValue':0xb4,'allowNull':![]},'maxmsg':{'type':Sequelize[_0xd07f('0xc')](0xff),'defaultValue':0x64,'allowNull':![]},'name':{'type':Sequelize[_0xd07f('0xd')],'get':function(){return this[_0xd07f('0xe')]('fullname')+_0xd07f('0xf')+this[_0xd07f('0xe')](_0xd07f('0x10'));}}}; \ No newline at end of file +var _0xac0e=['TINYINT(4)','INTEGER','VIRTUAL','getDataValue','fullname','\x20-\x20','sequelize','exports','STRING','from-voicemail','contest_mailbox','email','string','trim','central','yes','ENUM'];(function(_0x4ce5ae,_0x205bcf){var _0x1bdd5b=function(_0x3d7c27){while(--_0x3d7c27){_0x4ce5ae['push'](_0x4ce5ae['shift']());}};_0x1bdd5b(++_0x205bcf);}(_0xac0e,0x127));var _0xeac0=function(_0x5e6dca,_0x21c716){_0x5e6dca=_0x5e6dca-0x0;var _0x2a5406=_0xac0e[_0x5e6dca];return _0x2a5406;};'use strict';var Sequelize=require(_0xeac0('0x0'));module[_0xeac0('0x1')]={'customer_id':{'type':Sequelize['STRING']},'context':{'type':Sequelize[_0xeac0('0x2')],'defaultValue':_0xeac0('0x3'),'unique':_0xeac0('0x4')},'mailbox':{'type':Sequelize[_0xeac0('0x2')],'defaultValue':'','allowNull':![],'unique':_0xeac0('0x4')},'password':{'type':Sequelize[_0xeac0('0x2')]},'fullname':{'type':Sequelize[_0xeac0('0x2')]},'email':{'type':Sequelize[_0xeac0('0x2')],'validate':{'isEmail':!![]},'set':function(_0x5345b5){this['setDataValue'](_0xeac0('0x5'),typeof _0x5345b5===_0xeac0('0x6')&&_0x5345b5[_0xeac0('0x7')]()?_0x5345b5[_0xeac0('0x7')]():null);}},'pager':{'type':Sequelize[_0xeac0('0x2')]},'tz':{'type':Sequelize['STRING'],'defaultValue':_0xeac0('0x8')},'attach':{'type':Sequelize['ENUM'](_0xeac0('0x9'),'no'),'defaultValue':'yes','allowNull':![]},'saycid':{'type':Sequelize[_0xeac0('0xa')](_0xeac0('0x9'),'no'),'defaultValue':_0xeac0('0x9'),'allowNull':![]},'dialout':{'type':Sequelize[_0xeac0('0x2')]},'callback':{'type':Sequelize['STRING']},'review':{'type':Sequelize[_0xeac0('0xa')]('yes','no'),'defaultValue':'no','allowNull':![]},'operator':{'type':Sequelize[_0xeac0('0xa')](_0xeac0('0x9'),'no'),'defaultValue':'no','allowNull':![]},'envelope':{'type':Sequelize['ENUM'](_0xeac0('0x9'),'no'),'defaultValue':'no','allowNull':![]},'sayduration':{'type':Sequelize[_0xeac0('0xa')]('yes','no'),'defaultValue':'no','allowNull':![]},'saydurationm':{'type':_0xeac0('0xb'),'defaultValue':0x1,'allowNull':![]},'sendvoicemail':{'type':Sequelize[_0xeac0('0xa')](_0xeac0('0x9'),'no'),'defaultValue':'no','allowNull':![]},'delete':{'type':Sequelize[_0xeac0('0xa')](_0xeac0('0x9'),'no'),'defaultValue':'no','allowNull':![]},'nextaftercmd':{'type':Sequelize['ENUM'](_0xeac0('0x9'),'no'),'defaultValue':'yes','allowNull':![]},'forcename':{'type':Sequelize['ENUM'](_0xeac0('0x9'),'no'),'defaultValue':'no','allowNull':![]},'forcegreetings':{'type':Sequelize[_0xeac0('0xa')](_0xeac0('0x9'),'no'),'defaultValue':'no','allowNull':![]},'hidefromdir':{'type':Sequelize[_0xeac0('0xa')]('yes','no'),'defaultValue':_0xeac0('0x9'),'allowNull':![]},'stamp':{'type':'TIMESTAMP'},'emailsubject':{'type':Sequelize[_0xeac0('0x2')]},'emailbody':{'type':Sequelize[_0xeac0('0x2')]},'maxsecs':{'type':Sequelize[_0xeac0('0xc')](0xff),'defaultValue':0xb4,'allowNull':![]},'maxmsg':{'type':Sequelize[_0xeac0('0xc')](0xff),'defaultValue':0x64,'allowNull':![]},'name':{'type':Sequelize[_0xeac0('0xd')],'get':function(){return this[_0xeac0('0xe')](_0xeac0('0xf'))+_0xeac0('0x10')+this['getDataValue']('mailbox');}}}; \ No newline at end of file diff --git a/server/api/voiceMail/voiceMail.controller.js b/server/api/voiceMail/voiceMail.controller.js index 3a13fc9..ba490f8 100644 --- a/server/api/voiceMail/voiceMail.controller.js +++ b/server/api/voiceMail/voiceMail.controller.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x4ded=['findAll','rows','catch','show','keys','find','create','body','user','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','UserProfileSection','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','params','getMessages','findOne','VoiceMailMessage','order','sort','findAndCountAll','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','util','path','sox','to-csv','fs-extra','lodash','squel','crypto','jsforce','desk.js','querystring','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/utils','../../config/license/util','../../mysqldb','sendStatus','status','end','json','limit','undefined','count','offset','Content-Range','reject','save','update','then','destroy','get','Voicemails','UserProfileResource','error','name','index','map','VoiceMail','rawAttributes','type','key','query','filters','intersection','model','attributes','fields','length','hasOwnProperty','nolimit','where','pick','VIRTUAL','filter','merge','options','includeAll','include'];(function(_0x1a4f81,_0x1a0f22){var _0x4f119c=function(_0x2f7afe){while(--_0x2f7afe){_0x1a4f81['push'](_0x1a4f81['shift']());}};_0x4f119c(++_0x1a0f22);}(_0x4ded,0x116));var _0xd4de=function(_0x330404,_0x457bbf){_0x330404=_0x330404-0x0;var _0x154cb2=_0x4ded[_0x330404];return _0x154cb2;};'use strict';var emlformat=require(_0xd4de('0x0'));var rimraf=require(_0xd4de('0x1'));var zipdir=require(_0xd4de('0x2'));var jsonpatch=require(_0xd4de('0x3'));var rp=require(_0xd4de('0x4'));var moment=require(_0xd4de('0x5'));var BPromise=require(_0xd4de('0x6'));var Mustache=require(_0xd4de('0x7'));var util=require(_0xd4de('0x8'));var path=require(_0xd4de('0x9'));var sox=require(_0xd4de('0xa'));var csv=require(_0xd4de('0xb'));var ejs=require('ejs');var fs=require('fs');var fs_extra=require(_0xd4de('0xc'));var _=require(_0xd4de('0xd'));var squel=require(_0xd4de('0xe'));var crypto=require(_0xd4de('0xf'));var jsforce=require(_0xd4de('0x10'));var deskjs=require(_0xd4de('0x11'));var toCsv=require('to-csv');var querystring=require(_0xd4de('0x12'));var Papa=require('papaparse');var Redis=require('ioredis');var authService=require('../../components/auth/service');var qs=require(_0xd4de('0x13'));var as=require(_0xd4de('0x14'));var hardwareService=require('../../config/license/hardware');var logger=require('../../config/logger')('api');var utils=require(_0xd4de('0x15'));var config=require('../../config/environment');var licenseUtil=require(_0xd4de('0x16'));var db=require(_0xd4de('0x17'))['db'];function respondWithStatusCode(_0x104dad,_0x2aa09d){_0x2aa09d=_0x2aa09d||0xcc;return function(_0x3ffc72){if(_0x3ffc72){return _0x104dad[_0xd4de('0x18')](_0x2aa09d);}return _0x104dad[_0xd4de('0x19')](_0x2aa09d)[_0xd4de('0x1a')]();};}function respondWithResult(_0x3e3735,_0x37cb9f){_0x37cb9f=_0x37cb9f||0xc8;return function(_0x691ba9){if(_0x691ba9){return _0x3e3735[_0xd4de('0x19')](_0x37cb9f)[_0xd4de('0x1b')](_0x691ba9);}};}function respondWithFilteredResult(_0xbb4f7e,_0x102e5b){return function(_0xa7c18b){if(_0xa7c18b){var _0x325fba=typeof _0x102e5b['offset']==='undefined'&&typeof _0x102e5b[_0xd4de('0x1c')]===_0xd4de('0x1d');var _0x17b377=_0xa7c18b[_0xd4de('0x1e')];var _0x5b1d1c=_0x325fba?0x0:_0x102e5b['offset'];var _0x1e91d5=_0x325fba?_0xa7c18b['count']:_0x102e5b[_0xd4de('0x1f')]+_0x102e5b[_0xd4de('0x1c')];var _0x50b9e3;if(_0x1e91d5>=_0x17b377){_0x1e91d5=_0x17b377;_0x50b9e3=0xc8;}else{_0x50b9e3=0xce;}_0xbb4f7e[_0xd4de('0x19')](_0x50b9e3);return _0xbb4f7e['set'](_0xd4de('0x20'),_0x5b1d1c+'-'+_0x1e91d5+'/'+_0x17b377)[_0xd4de('0x1b')](_0xa7c18b);}return null;};}function patchUpdates(_0x2bad14){return function(_0x8e8712){try{jsonpatch['apply'](_0x8e8712,_0x2bad14,!![]);}catch(_0x318658){return BPromise[_0xd4de('0x21')](_0x318658);}return _0x8e8712[_0xd4de('0x22')]();};}function saveUpdates(_0xdb3fc,_0x1c631a){return function(_0x2d092a){if(_0x2d092a){return _0x2d092a[_0xd4de('0x23')](_0xdb3fc)[_0xd4de('0x24')](function(_0x2f9de6){return _0x2f9de6;});}return null;};}function removeEntity(_0x413f68,_0x534b37){return function(_0xad333f){if(_0xad333f){return _0xad333f[_0xd4de('0x25')]()[_0xd4de('0x24')](function(){var _0x22970c=_0xad333f[_0xd4de('0x26')]({'plain':!![]});var _0x984904=_0xd4de('0x27');return db[_0xd4de('0x28')][_0xd4de('0x25')]({'where':{'type':_0x984904,'resourceId':_0x22970c['id']}})[_0xd4de('0x24')](function(){return _0xad333f;});})[_0xd4de('0x24')](function(){_0x413f68[_0xd4de('0x19')](0xcc)['end']();});}};}function handleEntityNotFound(_0xe64e4e,_0x35e2fc){return function(_0x5005b0){if(!_0x5005b0){_0xe64e4e[_0xd4de('0x18')](0x194);}return _0x5005b0;};}function handleError(_0x59b3c5,_0x44b710){_0x44b710=_0x44b710||0x1f4;return function(_0x32e407){logger[_0xd4de('0x29')](_0x32e407['stack']);if(_0x32e407[_0xd4de('0x2a')]){delete _0x32e407[_0xd4de('0x2a')];}_0x59b3c5[_0xd4de('0x19')](_0x44b710)['send'](_0x32e407);};}exports[_0xd4de('0x2b')]=function(_0x1804c7,_0x55f9f9){var _0x5103b5={},_0x5706fe={},_0x3f6491={'count':0x0,'rows':[]};var _0x496795=_[_0xd4de('0x2c')](db[_0xd4de('0x2d')][_0xd4de('0x2e')],function(_0x2e08eb){return{'name':_0x2e08eb['fieldName'],'type':_0x2e08eb[_0xd4de('0x2f')][_0xd4de('0x30')]};});_0x5706fe['model']=_[_0xd4de('0x2c')](_0x496795,_0xd4de('0x2a'));_0x5706fe['query']=_['keys'](_0x1804c7[_0xd4de('0x31')]);_0x5706fe[_0xd4de('0x32')]=_[_0xd4de('0x33')](_0x5706fe[_0xd4de('0x34')],_0x5706fe['query']);_0x5103b5[_0xd4de('0x35')]=_[_0xd4de('0x33')](_0x5706fe['model'],qs[_0xd4de('0x36')](_0x1804c7[_0xd4de('0x31')][_0xd4de('0x36')]));_0x5103b5[_0xd4de('0x35')]=_0x5103b5[_0xd4de('0x35')][_0xd4de('0x37')]?_0x5103b5['attributes']:_0x5706fe['model'];if(!_0x1804c7[_0xd4de('0x31')][_0xd4de('0x38')](_0xd4de('0x39'))){_0x5103b5['limit']=qs[_0xd4de('0x1c')](_0x1804c7[_0xd4de('0x31')]['limit']);_0x5103b5[_0xd4de('0x1f')]=qs[_0xd4de('0x1f')](_0x1804c7[_0xd4de('0x31')][_0xd4de('0x1f')]);}_0x5103b5['order']=qs['sort'](_0x1804c7[_0xd4de('0x31')]['sort']);_0x5103b5[_0xd4de('0x3a')]=qs['filters'](_[_0xd4de('0x3b')](_0x1804c7[_0xd4de('0x31')],_0x5706fe[_0xd4de('0x32')]),_0x496795);if(_0x1804c7[_0xd4de('0x31')]['filter']){_0x5103b5[_0xd4de('0x3a')]=_['merge'](_0x5103b5[_0xd4de('0x3a')],{'$or':_[_0xd4de('0x2c')](_0x496795,function(_0x7f17b9){if(_0x7f17b9[_0xd4de('0x2f')]!==_0xd4de('0x3c')){var _0x13c256={};_0x13c256[_0x7f17b9[_0xd4de('0x2a')]]={'$like':'%'+_0x1804c7['query'][_0xd4de('0x3d')]+'%'};return _0x13c256;}})});}_0x5103b5=_[_0xd4de('0x3e')]({},_0x5103b5,_0x1804c7[_0xd4de('0x3f')]);var _0x2ec1fa={'where':_0x5103b5[_0xd4de('0x3a')]};return db['VoiceMail'][_0xd4de('0x1e')](_0x2ec1fa)[_0xd4de('0x24')](function(_0x2294e2){_0x3f6491['count']=_0x2294e2;if(_0x1804c7[_0xd4de('0x31')][_0xd4de('0x40')]){_0x5103b5[_0xd4de('0x41')]=[{'all':!![]}];}return db['VoiceMail'][_0xd4de('0x42')](_0x5103b5);})[_0xd4de('0x24')](function(_0x419c49){_0x3f6491[_0xd4de('0x43')]=_0x419c49;return _0x3f6491;})[_0xd4de('0x24')](respondWithFilteredResult(_0x55f9f9,_0x5103b5))[_0xd4de('0x44')](handleError(_0x55f9f9,null));};exports[_0xd4de('0x45')]=function(_0x5ecbbd,_0x43b542){var _0x164bde={'raw':!![],'where':{'id':_0x5ecbbd['params']['id']}},_0x58082a={};_0x58082a[_0xd4de('0x34')]=_[_0xd4de('0x46')](db[_0xd4de('0x2d')]['rawAttributes']);_0x58082a['query']=_[_0xd4de('0x46')](_0x5ecbbd[_0xd4de('0x31')]);_0x58082a['filters']=_[_0xd4de('0x33')](_0x58082a[_0xd4de('0x34')],_0x58082a[_0xd4de('0x31')]);_0x164bde[_0xd4de('0x35')]=_['intersection'](_0x58082a[_0xd4de('0x34')],qs[_0xd4de('0x36')](_0x5ecbbd[_0xd4de('0x31')][_0xd4de('0x36')]));_0x164bde[_0xd4de('0x35')]=_0x164bde[_0xd4de('0x35')]['length']?_0x164bde[_0xd4de('0x35')]:_0x58082a[_0xd4de('0x34')];if(_0x5ecbbd[_0xd4de('0x31')][_0xd4de('0x40')]){_0x164bde[_0xd4de('0x41')]=[{'all':!![]}];}_0x164bde=_[_0xd4de('0x3e')]({},_0x164bde,_0x5ecbbd[_0xd4de('0x3f')]);return db[_0xd4de('0x2d')][_0xd4de('0x47')](_0x164bde)[_0xd4de('0x24')](handleEntityNotFound(_0x43b542,null))['then'](respondWithResult(_0x43b542,null))[_0xd4de('0x44')](handleError(_0x43b542,null));};exports[_0xd4de('0x48')]=function(_0x178daf,_0x518bfe){return db[_0xd4de('0x2d')][_0xd4de('0x48')](_0x178daf[_0xd4de('0x49')],{})[_0xd4de('0x24')](function(_0x42e58e){var _0xa24bb7=_0x178daf[_0xd4de('0x4a')][_0xd4de('0x26')]({'plain':!![]});if(!_0xa24bb7)throw new Error(_0xd4de('0x4b'));if(_0xa24bb7[_0xd4de('0x4c')]==='user'){var _0x3e4c7f=_0x42e58e[_0xd4de('0x26')]({'plain':!![]});var _0x215f85=_0xd4de('0x27');return db[_0xd4de('0x4d')]['find']({'where':{'name':_0x215f85,'userProfileId':_0xa24bb7['userProfileId']},'raw':!![]})[_0xd4de('0x24')](function(_0x2deedb){if(_0x2deedb&&_0x2deedb['autoAssociation']===0x0){return db['UserProfileResource'][_0xd4de('0x48')]({'name':_0x3e4c7f[_0xd4de('0x2a')],'resourceId':_0x3e4c7f['id'],'type':_0x2deedb[_0xd4de('0x2a')],'sectionId':_0x2deedb['id']},{})[_0xd4de('0x24')](function(){return _0x42e58e;});}else{return _0x42e58e;}})[_0xd4de('0x44')](function(_0x15c8cd){logger[_0xd4de('0x29')](_0xd4de('0x4e'),_0x15c8cd);throw _0x15c8cd;});}return _0x42e58e;})[_0xd4de('0x24')](respondWithResult(_0x518bfe,0xc9))[_0xd4de('0x44')](handleError(_0x518bfe,null));};exports[_0xd4de('0x23')]=function(_0x2e1780,_0x56c13e){if(_0x2e1780[_0xd4de('0x49')]['id']){delete _0x2e1780[_0xd4de('0x49')]['id'];}return db[_0xd4de('0x2d')][_0xd4de('0x47')]({'where':{'id':_0x2e1780[_0xd4de('0x4f')]['id']}})[_0xd4de('0x24')](handleEntityNotFound(_0x56c13e,null))['then'](saveUpdates(_0x2e1780[_0xd4de('0x49')],null))['then'](respondWithResult(_0x56c13e,null))['catch'](handleError(_0x56c13e,null));};exports[_0xd4de('0x25')]=function(_0xd79781,_0x2d1e45){return db[_0xd4de('0x2d')]['find']({'where':{'id':_0xd79781[_0xd4de('0x4f')]['id']}})[_0xd4de('0x24')](handleEntityNotFound(_0x2d1e45,null))[_0xd4de('0x24')](removeEntity(_0x2d1e45,null))[_0xd4de('0x44')](handleError(_0x2d1e45,null));};exports[_0xd4de('0x50')]=function(_0x4bb7df,_0x5496f7,_0x4b55cc){return db[_0xd4de('0x2d')][_0xd4de('0x51')]({'where':{'id':_0x4bb7df[_0xd4de('0x4f')]['id']}})[_0xd4de('0x24')](handleEntityNotFound(_0x5496f7,null))['then'](function(_0x35ba6f){var _0x146eaa;var _0x2e0d76={},_0x17047a={};_0x17047a['model']=_[_0xd4de('0x46')](db[_0xd4de('0x52')][_0xd4de('0x2e')]);_0x17047a[_0xd4de('0x31')]=_['keys'](_0x4bb7df['query']);_0x17047a['filters']=_[_0xd4de('0x33')](_0x17047a[_0xd4de('0x34')],_0x17047a[_0xd4de('0x31')]);_0x2e0d76['attributes']=_[_0xd4de('0x33')](_0x17047a[_0xd4de('0x34')],qs[_0xd4de('0x36')](_0x4bb7df['query'][_0xd4de('0x36')]));_0x2e0d76['attributes']=_0x2e0d76[_0xd4de('0x35')][_0xd4de('0x37')]?_0x2e0d76[_0xd4de('0x35')]:_0x17047a[_0xd4de('0x34')];if(!_0x4bb7df[_0xd4de('0x31')][_0xd4de('0x38')](_0xd4de('0x39'))){_0x2e0d76[_0xd4de('0x1c')]=qs['limit'](_0x4bb7df[_0xd4de('0x31')]['limit']);_0x2e0d76[_0xd4de('0x1f')]=qs[_0xd4de('0x1f')](_0x4bb7df['query'][_0xd4de('0x1f')]);}_0x2e0d76[_0xd4de('0x53')]=qs[_0xd4de('0x54')](_0x4bb7df[_0xd4de('0x31')][_0xd4de('0x54')]);_0x2e0d76[_0xd4de('0x3a')]=qs[_0xd4de('0x32')](_[_0xd4de('0x3b')](_0x4bb7df[_0xd4de('0x31')],_0x17047a[_0xd4de('0x32')]));if(_0x4bb7df[_0xd4de('0x31')][_0xd4de('0x3d')]){_0x2e0d76[_0xd4de('0x3a')]=_['merge'](_0x2e0d76[_0xd4de('0x3a')],{'$or':_[_0xd4de('0x2c')](_0x2e0d76[_0xd4de('0x35')],function(_0x331f08){var _0x25628e={};_0x25628e[_0x331f08]={'$like':'%'+_0x4bb7df[_0xd4de('0x31')][_0xd4de('0x3d')]+'%'};return _0x25628e;})});}_0x2e0d76[_0xd4de('0x3a')]=_['merge'](_0x2e0d76[_0xd4de('0x3a')],{'mailboxuser':_0x35ba6f['mailbox']});_0x2e0d76=_['merge']({},_0x2e0d76,_0x4bb7df['options']);return db[_0xd4de('0x52')][_0xd4de('0x55')](_0x2e0d76)['then'](respondWithFilteredResult(_0x5496f7,_0x2e0d76));})['catch'](handleError(_0x5496f7,null));}; \ No newline at end of file +var _0xb9be=['filter','options','include','findAll','rows','catch','show','rawAttributes','length','includeAll','create','body','user','UserProfileSection','find','autoAssociation','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','params','getMessages','findOne','VoiceMailMessage','mailbox','findAndCountAll','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','util','to-csv','ejs','fs-extra','squel','crypto','jsforce','desk.js','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/advancedSearch','api','../../config/utils','../../config/license/util','../../mysqldb','end','offset','undefined','limit','count','status','Content-Range','apply','reject','save','update','then','destroy','get','UserProfileResource','sendStatus','error','name','index','VoiceMail','fieldName','type','key','model','map','query','keys','intersection','attributes','fields','hasOwnProperty','nolimit','order','sort','filters','pick','where','merge','VIRTUAL'];(function(_0x2dafbe,_0x5d04de){var _0x58a45a=function(_0x50ac96){while(--_0x50ac96){_0x2dafbe['push'](_0x2dafbe['shift']());}};_0x58a45a(++_0x5d04de);}(_0xb9be,0xc5));var _0xeb9b=function(_0x485b5a,_0x2b289b){_0x485b5a=_0x485b5a-0x0;var _0xd2b34d=_0xb9be[_0x485b5a];return _0xd2b34d;};'use strict';var emlformat=require(_0xeb9b('0x0'));var rimraf=require(_0xeb9b('0x1'));var zipdir=require(_0xeb9b('0x2'));var jsonpatch=require(_0xeb9b('0x3'));var rp=require(_0xeb9b('0x4'));var moment=require(_0xeb9b('0x5'));var BPromise=require(_0xeb9b('0x6'));var Mustache=require(_0xeb9b('0x7'));var util=require(_0xeb9b('0x8'));var path=require('path');var sox=require('sox');var csv=require(_0xeb9b('0x9'));var ejs=require(_0xeb9b('0xa'));var fs=require('fs');var fs_extra=require(_0xeb9b('0xb'));var _=require('lodash');var squel=require(_0xeb9b('0xc'));var crypto=require(_0xeb9b('0xd'));var jsforce=require(_0xeb9b('0xe'));var deskjs=require(_0xeb9b('0xf'));var toCsv=require(_0xeb9b('0x9'));var querystring=require(_0xeb9b('0x10'));var Papa=require(_0xeb9b('0x11'));var Redis=require(_0xeb9b('0x12'));var authService=require(_0xeb9b('0x13'));var qs=require('../../components/parsers/qs');var as=require(_0xeb9b('0x14'));var hardwareService=require('../../config/license/hardware');var logger=require('../../config/logger')(_0xeb9b('0x15'));var utils=require(_0xeb9b('0x16'));var config=require('../../config/environment');var licenseUtil=require(_0xeb9b('0x17'));var db=require(_0xeb9b('0x18'))['db'];function respondWithStatusCode(_0x3df18a,_0x2a01df){_0x2a01df=_0x2a01df||0xcc;return function(_0x51598f){if(_0x51598f){return _0x3df18a['sendStatus'](_0x2a01df);}return _0x3df18a['status'](_0x2a01df)[_0xeb9b('0x19')]();};}function respondWithResult(_0x1ef03f,_0x2674e6){_0x2674e6=_0x2674e6||0xc8;return function(_0x4ec46d){if(_0x4ec46d){return _0x1ef03f['status'](_0x2674e6)['json'](_0x4ec46d);}};}function respondWithFilteredResult(_0x32538b,_0x1a5f27){return function(_0x406afd){if(_0x406afd){var _0x3fa308=typeof _0x1a5f27[_0xeb9b('0x1a')]===_0xeb9b('0x1b')&&typeof _0x1a5f27[_0xeb9b('0x1c')]==='undefined';var _0x2e8645=_0x406afd[_0xeb9b('0x1d')];var _0x21aca6=_0x3fa308?0x0:_0x1a5f27[_0xeb9b('0x1a')];var _0x3cbe3e=_0x3fa308?_0x406afd[_0xeb9b('0x1d')]:_0x1a5f27[_0xeb9b('0x1a')]+_0x1a5f27[_0xeb9b('0x1c')];var _0x2c199f;if(_0x3cbe3e>=_0x2e8645){_0x3cbe3e=_0x2e8645;_0x2c199f=0xc8;}else{_0x2c199f=0xce;}_0x32538b[_0xeb9b('0x1e')](_0x2c199f);return _0x32538b['set'](_0xeb9b('0x1f'),_0x21aca6+'-'+_0x3cbe3e+'/'+_0x2e8645)['json'](_0x406afd);}return null;};}function patchUpdates(_0x5d5f54){return function(_0x580498){try{jsonpatch[_0xeb9b('0x20')](_0x580498,_0x5d5f54,!![]);}catch(_0x4ab4b8){return BPromise[_0xeb9b('0x21')](_0x4ab4b8);}return _0x580498[_0xeb9b('0x22')]();};}function saveUpdates(_0x37935c,_0x37d7e0){return function(_0x3c8be7){if(_0x3c8be7){return _0x3c8be7[_0xeb9b('0x23')](_0x37935c)[_0xeb9b('0x24')](function(_0x15e5b8){return _0x15e5b8;});}return null;};}function removeEntity(_0x142d1c,_0x46df93){return function(_0x61c86d){if(_0x61c86d){return _0x61c86d[_0xeb9b('0x25')]()[_0xeb9b('0x24')](function(){var _0xe6d3e1=_0x61c86d[_0xeb9b('0x26')]({'plain':!![]});var _0x434461='Voicemails';return db[_0xeb9b('0x27')]['destroy']({'where':{'type':_0x434461,'resourceId':_0xe6d3e1['id']}})[_0xeb9b('0x24')](function(){return _0x61c86d;});})['then'](function(){_0x142d1c[_0xeb9b('0x1e')](0xcc)[_0xeb9b('0x19')]();});}};}function handleEntityNotFound(_0x7e0134,_0xe3eda5){return function(_0x52f6c1){if(!_0x52f6c1){_0x7e0134[_0xeb9b('0x28')](0x194);}return _0x52f6c1;};}function handleError(_0x42fe78,_0x54ab67){_0x54ab67=_0x54ab67||0x1f4;return function(_0x35ff07){logger[_0xeb9b('0x29')](_0x35ff07['stack']);if(_0x35ff07[_0xeb9b('0x2a')]){delete _0x35ff07[_0xeb9b('0x2a')];}_0x42fe78[_0xeb9b('0x1e')](_0x54ab67)['send'](_0x35ff07);};}exports[_0xeb9b('0x2b')]=function(_0x5336f2,_0x6bb66){var _0x4c1331={},_0x411467={},_0x54c659={'count':0x0,'rows':[]};var _0x27578d=_['map'](db[_0xeb9b('0x2c')]['rawAttributes'],function(_0x25b8da){return{'name':_0x25b8da[_0xeb9b('0x2d')],'type':_0x25b8da[_0xeb9b('0x2e')][_0xeb9b('0x2f')]};});_0x411467[_0xeb9b('0x30')]=_[_0xeb9b('0x31')](_0x27578d,_0xeb9b('0x2a'));_0x411467[_0xeb9b('0x32')]=_[_0xeb9b('0x33')](_0x5336f2[_0xeb9b('0x32')]);_0x411467['filters']=_[_0xeb9b('0x34')](_0x411467[_0xeb9b('0x30')],_0x411467[_0xeb9b('0x32')]);_0x4c1331[_0xeb9b('0x35')]=_[_0xeb9b('0x34')](_0x411467[_0xeb9b('0x30')],qs[_0xeb9b('0x36')](_0x5336f2['query'][_0xeb9b('0x36')]));_0x4c1331[_0xeb9b('0x35')]=_0x4c1331[_0xeb9b('0x35')]['length']?_0x4c1331[_0xeb9b('0x35')]:_0x411467[_0xeb9b('0x30')];if(!_0x5336f2[_0xeb9b('0x32')][_0xeb9b('0x37')](_0xeb9b('0x38'))){_0x4c1331[_0xeb9b('0x1c')]=qs['limit'](_0x5336f2[_0xeb9b('0x32')][_0xeb9b('0x1c')]);_0x4c1331['offset']=qs[_0xeb9b('0x1a')](_0x5336f2[_0xeb9b('0x32')][_0xeb9b('0x1a')]);}_0x4c1331[_0xeb9b('0x39')]=qs[_0xeb9b('0x3a')](_0x5336f2[_0xeb9b('0x32')][_0xeb9b('0x3a')]);_0x4c1331['where']=qs[_0xeb9b('0x3b')](_[_0xeb9b('0x3c')](_0x5336f2[_0xeb9b('0x32')],_0x411467['filters']),_0x27578d);if(_0x5336f2['query']['filter']){_0x4c1331[_0xeb9b('0x3d')]=_[_0xeb9b('0x3e')](_0x4c1331[_0xeb9b('0x3d')],{'$or':_['map'](_0x27578d,function(_0x409ce6){if(_0x409ce6[_0xeb9b('0x2e')]!==_0xeb9b('0x3f')){var _0x20da52={};_0x20da52[_0x409ce6[_0xeb9b('0x2a')]]={'$like':'%'+_0x5336f2[_0xeb9b('0x32')][_0xeb9b('0x40')]+'%'};return _0x20da52;}})});}_0x4c1331=_['merge']({},_0x4c1331,_0x5336f2[_0xeb9b('0x41')]);var _0x3ccf45={'where':_0x4c1331[_0xeb9b('0x3d')]};return db['VoiceMail']['count'](_0x3ccf45)[_0xeb9b('0x24')](function(_0x110122){_0x54c659['count']=_0x110122;if(_0x5336f2[_0xeb9b('0x32')]['includeAll']){_0x4c1331[_0xeb9b('0x42')]=[{'all':!![]}];}return db[_0xeb9b('0x2c')][_0xeb9b('0x43')](_0x4c1331);})[_0xeb9b('0x24')](function(_0xbee63e){_0x54c659[_0xeb9b('0x44')]=_0xbee63e;return _0x54c659;})[_0xeb9b('0x24')](respondWithFilteredResult(_0x6bb66,_0x4c1331))[_0xeb9b('0x45')](handleError(_0x6bb66,null));};exports[_0xeb9b('0x46')]=function(_0x311e7d,_0x21bcf1){var _0x761d18={'raw':!![],'where':{'id':_0x311e7d['params']['id']}},_0x5e270a={};_0x5e270a[_0xeb9b('0x30')]=_['keys'](db[_0xeb9b('0x2c')][_0xeb9b('0x47')]);_0x5e270a[_0xeb9b('0x32')]=_['keys'](_0x311e7d[_0xeb9b('0x32')]);_0x5e270a[_0xeb9b('0x3b')]=_['intersection'](_0x5e270a[_0xeb9b('0x30')],_0x5e270a[_0xeb9b('0x32')]);_0x761d18[_0xeb9b('0x35')]=_[_0xeb9b('0x34')](_0x5e270a[_0xeb9b('0x30')],qs[_0xeb9b('0x36')](_0x311e7d[_0xeb9b('0x32')][_0xeb9b('0x36')]));_0x761d18['attributes']=_0x761d18['attributes'][_0xeb9b('0x48')]?_0x761d18['attributes']:_0x5e270a['model'];if(_0x311e7d[_0xeb9b('0x32')][_0xeb9b('0x49')]){_0x761d18[_0xeb9b('0x42')]=[{'all':!![]}];}_0x761d18=_[_0xeb9b('0x3e')]({},_0x761d18,_0x311e7d[_0xeb9b('0x41')]);return db[_0xeb9b('0x2c')]['find'](_0x761d18)['then'](handleEntityNotFound(_0x21bcf1,null))['then'](respondWithResult(_0x21bcf1,null))[_0xeb9b('0x45')](handleError(_0x21bcf1,null));};exports['create']=function(_0x4901b0,_0x2ee59c){return db[_0xeb9b('0x2c')][_0xeb9b('0x4a')](_0x4901b0[_0xeb9b('0x4b')],{})[_0xeb9b('0x24')](function(_0x202ef3){var _0x1a2189=_0x4901b0[_0xeb9b('0x4c')][_0xeb9b('0x26')]({'plain':!![]});if(!_0x1a2189)throw new Error('Unable\x20to\x20retrieve\x20the\x20current\x20user');if(_0x1a2189['role']===_0xeb9b('0x4c')){var _0x21c93a=_0x202ef3['get']({'plain':!![]});var _0x19bfe9='Voicemails';return db[_0xeb9b('0x4d')][_0xeb9b('0x4e')]({'where':{'name':_0x19bfe9,'userProfileId':_0x1a2189['userProfileId']},'raw':!![]})['then'](function(_0x530c1c){if(_0x530c1c&&_0x530c1c[_0xeb9b('0x4f')]===0x0){return db[_0xeb9b('0x27')][_0xeb9b('0x4a')]({'name':_0x21c93a['name'],'resourceId':_0x21c93a['id'],'type':_0x530c1c['name'],'sectionId':_0x530c1c['id']},{})[_0xeb9b('0x24')](function(){return _0x202ef3;});}else{return _0x202ef3;}})[_0xeb9b('0x45')](function(_0x3e6e73){logger[_0xeb9b('0x29')](_0xeb9b('0x50'),_0x3e6e73);throw _0x3e6e73;});}return _0x202ef3;})[_0xeb9b('0x24')](respondWithResult(_0x2ee59c,0xc9))['catch'](handleError(_0x2ee59c,null));};exports[_0xeb9b('0x23')]=function(_0x1fab7a,_0x47e84a){if(_0x1fab7a[_0xeb9b('0x4b')]['id']){delete _0x1fab7a['body']['id'];}return db[_0xeb9b('0x2c')][_0xeb9b('0x4e')]({'where':{'id':_0x1fab7a['params']['id']}})[_0xeb9b('0x24')](handleEntityNotFound(_0x47e84a,null))['then'](saveUpdates(_0x1fab7a[_0xeb9b('0x4b')],null))[_0xeb9b('0x24')](respondWithResult(_0x47e84a,null))[_0xeb9b('0x45')](handleError(_0x47e84a,null));};exports[_0xeb9b('0x25')]=function(_0x5c769e,_0x5a641a){return db[_0xeb9b('0x2c')][_0xeb9b('0x4e')]({'where':{'id':_0x5c769e[_0xeb9b('0x51')]['id']}})['then'](handleEntityNotFound(_0x5a641a,null))[_0xeb9b('0x24')](removeEntity(_0x5a641a,null))[_0xeb9b('0x45')](handleError(_0x5a641a,null));};exports[_0xeb9b('0x52')]=function(_0x24444e,_0x2d0ba9,_0x114132){return db[_0xeb9b('0x2c')][_0xeb9b('0x53')]({'where':{'id':_0x24444e[_0xeb9b('0x51')]['id']}})[_0xeb9b('0x24')](handleEntityNotFound(_0x2d0ba9,null))[_0xeb9b('0x24')](function(_0x58e550){var _0x5531a4;var _0x4b2506={},_0x83d48a={};_0x83d48a['model']=_[_0xeb9b('0x33')](db[_0xeb9b('0x54')][_0xeb9b('0x47')]);_0x83d48a['query']=_[_0xeb9b('0x33')](_0x24444e[_0xeb9b('0x32')]);_0x83d48a[_0xeb9b('0x3b')]=_[_0xeb9b('0x34')](_0x83d48a[_0xeb9b('0x30')],_0x83d48a[_0xeb9b('0x32')]);_0x4b2506[_0xeb9b('0x35')]=_[_0xeb9b('0x34')](_0x83d48a['model'],qs['fields'](_0x24444e[_0xeb9b('0x32')][_0xeb9b('0x36')]));_0x4b2506[_0xeb9b('0x35')]=_0x4b2506['attributes'][_0xeb9b('0x48')]?_0x4b2506['attributes']:_0x83d48a[_0xeb9b('0x30')];if(!_0x24444e['query'][_0xeb9b('0x37')](_0xeb9b('0x38'))){_0x4b2506[_0xeb9b('0x1c')]=qs[_0xeb9b('0x1c')](_0x24444e[_0xeb9b('0x32')]['limit']);_0x4b2506[_0xeb9b('0x1a')]=qs[_0xeb9b('0x1a')](_0x24444e['query']['offset']);}_0x4b2506[_0xeb9b('0x39')]=qs[_0xeb9b('0x3a')](_0x24444e['query'][_0xeb9b('0x3a')]);_0x4b2506['where']=qs[_0xeb9b('0x3b')](_['pick'](_0x24444e[_0xeb9b('0x32')],_0x83d48a[_0xeb9b('0x3b')]));if(_0x24444e[_0xeb9b('0x32')][_0xeb9b('0x40')]){_0x4b2506[_0xeb9b('0x3d')]=_[_0xeb9b('0x3e')](_0x4b2506['where'],{'$or':_[_0xeb9b('0x31')](_0x4b2506[_0xeb9b('0x35')],function(_0x5b670b){var _0x1acf82={};_0x1acf82[_0x5b670b]={'$like':'%'+_0x24444e[_0xeb9b('0x32')][_0xeb9b('0x40')]+'%'};return _0x1acf82;})});}_0x4b2506[_0xeb9b('0x3d')]=_['merge'](_0x4b2506[_0xeb9b('0x3d')],{'mailboxuser':_0x58e550[_0xeb9b('0x55')]});_0x4b2506=_['merge']({},_0x4b2506,_0x24444e[_0xeb9b('0x41')]);return db[_0xeb9b('0x54')][_0xeb9b('0x56')](_0x4b2506)[_0xeb9b('0x24')](respondWithFilteredResult(_0x2d0ba9,_0x4b2506));})[_0xeb9b('0x45')](handleError(_0x2d0ba9,null));}; \ No newline at end of file diff --git a/server/api/voiceMail/voiceMail.model.js b/server/api/voiceMail/voiceMail.model.js index 04496f0..076b8a9 100644 --- a/server/api/voiceMail/voiceMail.model.js +++ b/server/api/voiceMail/voiceMail.model.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x865c=['util','../../config/logger','moment','bluebird','request-promise','path','rimraf','../../config/environment','./voiceMail.attributes','exports','VoiceMail','voice_voicemail','mailbox_context','context','lodash'];(function(_0x7f100e,_0x42cdf6){var _0x446d=function(_0x52beb3){while(--_0x52beb3){_0x7f100e['push'](_0x7f100e['shift']());}};_0x446d(++_0x42cdf6);}(_0x865c,0x1c1));var _0xc865=function(_0x450b0e,_0x2fb50b){_0x450b0e=_0x450b0e-0x0;var _0x5f413f=_0x865c[_0x450b0e];return _0x5f413f;};'use strict';var _=require(_0xc865('0x0'));var util=require(_0xc865('0x1'));var logger=require(_0xc865('0x2'))('api');var moment=require(_0xc865('0x3'));var BPromise=require(_0xc865('0x4'));var rp=require(_0xc865('0x5'));var fs=require('fs');var path=require(_0xc865('0x6'));var rimraf=require(_0xc865('0x7'));var config=require(_0xc865('0x8'));var attributes=require(_0xc865('0x9'));module[_0xc865('0xa')]=function(_0x2672c3,_0x4f0f39){return _0x2672c3['define'](_0xc865('0xb'),attributes,{'tableName':_0xc865('0xc'),'paranoid':![],'indexes':[{'name':_0xc865('0xd'),'fields':['mailbox',_0xc865('0xe')]}],'timestamps':!![]});}; \ No newline at end of file +var _0x4856=['lodash','util','api','bluebird','request-promise','path','rimraf','../../config/environment','./voiceMail.attributes','define','VoiceMail','voice_voicemail','mailbox_context','mailbox'];(function(_0x1e3f3d,_0x51900b){var _0x39f856=function(_0x3b0800){while(--_0x3b0800){_0x1e3f3d['push'](_0x1e3f3d['shift']());}};_0x39f856(++_0x51900b);}(_0x4856,0x188));var _0x6485=function(_0x2b50e0,_0x48d2bb){_0x2b50e0=_0x2b50e0-0x0;var _0x379c45=_0x4856[_0x2b50e0];return _0x379c45;};'use strict';var _=require(_0x6485('0x0'));var util=require(_0x6485('0x1'));var logger=require('../../config/logger')(_0x6485('0x2'));var moment=require('moment');var BPromise=require(_0x6485('0x3'));var rp=require(_0x6485('0x4'));var fs=require('fs');var path=require(_0x6485('0x5'));var rimraf=require(_0x6485('0x6'));var config=require(_0x6485('0x7'));var attributes=require(_0x6485('0x8'));module['exports']=function(_0x1af99b,_0x595437){return _0x1af99b[_0x6485('0x9')](_0x6485('0xa'),attributes,{'tableName':_0x6485('0xb'),'paranoid':![],'indexes':[{'name':_0x6485('0xc'),'fields':[_0x6485('0xd'),'context']}],'timestamps':!![]});}; \ No newline at end of file diff --git a/server/api/voiceMail/voiceMail.rpc.js b/server/api/voiceMail/voiceMail.rpc.js index d49dd76..e68f0ca 100644 --- a/server/api/voiceMail/voiceMail.rpc.js +++ b/server/api/voiceMail/voiceMail.rpc.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xf12f=['then','info','VoiceMail,\x20%s,\x20%s','request\x20sent','debug','stringify','error','message','catch','lodash','util','bluebird','randomstring','ioredis','../../config/utils','rpc','jayson/promise','client','request'];(function(_0x5c8827,_0x5bc5d7){var _0x50ffd5=function(_0x4121bc){while(--_0x4121bc){_0x5c8827['push'](_0x5c8827['shift']());}};_0x50ffd5(++_0x5bc5d7);}(_0xf12f,0x15f));var _0xff12=function(_0x4bf8d7,_0x28132e){_0x4bf8d7=_0x4bf8d7-0x0;var _0x318b0e=_0xf12f[_0x4bf8d7];return _0x318b0e;};'use strict';var _=require(_0xff12('0x0'));var util=require(_0xff12('0x1'));var moment=require('moment');var BPromise=require(_0xff12('0x2'));var rs=require(_0xff12('0x3'));var fs=require('fs');var Redis=require(_0xff12('0x4'));var db=require('../../mysqldb')['db'];var utils=require(_0xff12('0x5'));var logger=require('../../config/logger')(_0xff12('0x6'));var config=require('../../config/environment');var jayson=require(_0xff12('0x7'));var client=jayson[_0xff12('0x8')]['http']({'port':0x232a});function respondWithRpcPromise(_0x17fa2c,_0x22c484,_0x12baba){return new BPromise(function(_0x5f6f30,_0x3211a8){return client[_0xff12('0x9')](_0x17fa2c,_0x12baba)[_0xff12('0xa')](function(_0x2d28c6){logger[_0xff12('0xb')](_0xff12('0xc'),_0x22c484,_0xff12('0xd'));logger[_0xff12('0xe')]('VoiceMail,\x20%s,\x20%s,\x20%s',_0x22c484,_0xff12('0xd'),JSON[_0xff12('0xf')](_0x2d28c6));if(_0x2d28c6[_0xff12('0x10')]){if(_0x2d28c6[_0xff12('0x10')]['code']===0x1f4){logger[_0xff12('0x10')](_0xff12('0xc'),_0x22c484,_0x2d28c6[_0xff12('0x10')][_0xff12('0x11')]);return _0x3211a8(_0x2d28c6[_0xff12('0x10')][_0xff12('0x11')]);}logger[_0xff12('0x10')](_0xff12('0xc'),_0x22c484,_0x2d28c6[_0xff12('0x10')][_0xff12('0x11')]);return _0x5f6f30(_0x2d28c6['error'][_0xff12('0x11')]);}else{logger[_0xff12('0xb')]('VoiceMail,\x20%s,\x20%s',_0x22c484,'request\x20sent');_0x5f6f30(_0x2d28c6['result'][_0xff12('0x11')]);}})[_0xff12('0x12')](function(_0x58711c){logger[_0xff12('0x10')](_0xff12('0xc'),_0x22c484,_0x58711c);_0x3211a8(_0x58711c);});});} \ No newline at end of file +var _0x7045=['VoiceMail,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','bluebird','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','client','http','request','then','info','VoiceMail,\x20%s,\x20%s','request\x20sent','debug'];(function(_0x20caec,_0x265d8c){var _0xf69f5e=function(_0x4acf97){while(--_0x4acf97){_0x20caec['push'](_0x20caec['shift']());}};_0xf69f5e(++_0x265d8c);}(_0x7045,0x6a));var _0x5704=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0x7045[_0x3dd15e];return _0x231fd0;};'use strict';var _=require('lodash');var util=require('util');var moment=require('moment');var BPromise=require(_0x5704('0x0'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x5704('0x1'));var db=require(_0x5704('0x2'))['db'];var utils=require(_0x5704('0x3'));var logger=require(_0x5704('0x4'))(_0x5704('0x5'));var config=require('../../config/environment');var jayson=require('jayson/promise');var client=jayson[_0x5704('0x6')][_0x5704('0x7')]({'port':0x232a});function respondWithRpcPromise(_0x31cd10,_0x5a2e0e,_0x350a4d){return new BPromise(function(_0x322b0d,_0x1a555c){return client[_0x5704('0x8')](_0x31cd10,_0x350a4d)[_0x5704('0x9')](function(_0x36bd71){logger[_0x5704('0xa')](_0x5704('0xb'),_0x5a2e0e,_0x5704('0xc'));logger[_0x5704('0xd')](_0x5704('0xe'),_0x5a2e0e,_0x5704('0xc'),JSON[_0x5704('0xf')](_0x36bd71));if(_0x36bd71['error']){if(_0x36bd71[_0x5704('0x10')][_0x5704('0x11')]===0x1f4){logger['error']('VoiceMail,\x20%s,\x20%s',_0x5a2e0e,_0x36bd71[_0x5704('0x10')][_0x5704('0x12')]);return _0x1a555c(_0x36bd71[_0x5704('0x10')][_0x5704('0x12')]);}logger[_0x5704('0x10')](_0x5704('0xb'),_0x5a2e0e,_0x36bd71[_0x5704('0x10')][_0x5704('0x12')]);return _0x322b0d(_0x36bd71['error'][_0x5704('0x12')]);}else{logger[_0x5704('0xa')](_0x5704('0xb'),_0x5a2e0e,_0x5704('0xc'));_0x322b0d(_0x36bd71[_0x5704('0x13')][_0x5704('0x12')]);}})['catch'](function(_0x2facde){logger[_0x5704('0x10')](_0x5704('0xb'),_0x5a2e0e,_0x2facde);_0x1a555c(_0x2facde);});});} \ No newline at end of file diff --git a/server/api/voiceMailMessage/index.js b/server/api/voiceMailMessage/index.js index a8fac0b..d3ad76f 100644 --- a/server/api/voiceMailMessage/index.js +++ b/server/api/voiceMailMessage/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xbe0c=['./voiceMailMessage.controller','isAuthenticated','index','get','show','/:id/download','download','post','create','put','/:id','update','delete','destroy','exports','multer','path','connect-timeout','express','Router','fs-extra','../../components/interaction/service','../../config/environment'];(function(_0x5a778b,_0x717daa){var _0x32f0da=function(_0x546db4){while(--_0x546db4){_0x5a778b['push'](_0x5a778b['shift']());}};_0x32f0da(++_0x717daa);}(_0xbe0c,0x1db));var _0xcbe0=function(_0x550839,_0xf664c){_0x550839=_0x550839-0x0;var _0x145c26=_0xbe0c[_0x550839];return _0x145c26;};'use strict';var multer=require(_0xcbe0('0x0'));var util=require('util');var path=require(_0xcbe0('0x1'));var timeout=require(_0xcbe0('0x2'));var express=require(_0xcbe0('0x3'));var router=express[_0xcbe0('0x4')]();var fs_extra=require(_0xcbe0('0x5'));var auth=require('../../components/auth/service');var interaction=require(_0xcbe0('0x6'));var config=require(_0xcbe0('0x7'));var controller=require(_0xcbe0('0x8'));router['get']('/',auth[_0xcbe0('0x9')](),controller[_0xcbe0('0xa')]);router[_0xcbe0('0xb')]('/:id',auth[_0xcbe0('0x9')](),controller[_0xcbe0('0xc')]);router[_0xcbe0('0xb')](_0xcbe0('0xd'),auth[_0xcbe0('0x9')](),controller[_0xcbe0('0xe')]);router[_0xcbe0('0xf')]('/',auth[_0xcbe0('0x9')](),controller[_0xcbe0('0x10')]);router[_0xcbe0('0x11')](_0xcbe0('0x12'),auth[_0xcbe0('0x9')](),controller[_0xcbe0('0x13')]);router[_0xcbe0('0x14')](_0xcbe0('0x12'),auth[_0xcbe0('0x9')](),controller[_0xcbe0('0x15')]);module[_0xcbe0('0x16')]=router; \ No newline at end of file +var _0xb30f=['post','create','delete','destroy','exports','connect-timeout','Router','../../components/auth/service','../../components/interaction/service','../../config/environment','index','get','/:id','show','/:id/download','isAuthenticated'];(function(_0x3776b4,_0x19a1e3){var _0x1636d9=function(_0x320ae3){while(--_0x320ae3){_0x3776b4['push'](_0x3776b4['shift']());}};_0x1636d9(++_0x19a1e3);}(_0xb30f,0x195));var _0xfb30=function(_0x142891,_0x4b9d6c){_0x142891=_0x142891-0x0;var _0x51df81=_0xb30f[_0x142891];return _0x51df81;};'use strict';var multer=require('multer');var util=require('util');var path=require('path');var timeout=require(_0xfb30('0x0'));var express=require('express');var router=express[_0xfb30('0x1')]();var fs_extra=require('fs-extra');var auth=require(_0xfb30('0x2'));var interaction=require(_0xfb30('0x3'));var config=require(_0xfb30('0x4'));var controller=require('./voiceMailMessage.controller');router['get']('/',auth['isAuthenticated'](),controller[_0xfb30('0x5')]);router[_0xfb30('0x6')](_0xfb30('0x7'),auth['isAuthenticated'](),controller[_0xfb30('0x8')]);router[_0xfb30('0x6')](_0xfb30('0x9'),auth[_0xfb30('0xa')](),controller['download']);router[_0xfb30('0xb')]('/',auth[_0xfb30('0xa')](),controller[_0xfb30('0xc')]);router['put']('/:id',auth['isAuthenticated'](),controller['update']);router[_0xfb30('0xd')]('/:id',auth['isAuthenticated'](),controller[_0xfb30('0xe')]);module[_0xfb30('0xf')]=router; \ No newline at end of file diff --git a/server/api/voiceMailMessage/voiceMailMessage.attributes.js b/server/api/voiceMailMessage/voiceMailMessage.attributes.js index 5baae4b..3ee7612 100644 --- a/server/api/voiceMailMessage/voiceMailMessage.attributes.js +++ b/server/api/voiceMailMessage/voiceMailMessage.attributes.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x1575=['TIMESTAMP','literal','CURRENT_TIMESTAMP\x20ON\x20UPDATE\x20CURRENT_TIMESTAMP','sequelize','exports','getDataValue','INTEGER','STRING'];(function(_0x25fc2a,_0x2c3ee9){var _0x3d046c=function(_0x423fb8){while(--_0x423fb8){_0x25fc2a['push'](_0x25fc2a['shift']());}};_0x3d046c(++_0x2c3ee9);}(_0x1575,0x17b));var _0x5157=function(_0xc82f28,_0x24e29a){_0xc82f28=_0xc82f28-0x0;var _0x5608b1=_0x1575[_0xc82f28];return _0x5608b1;};'use strict';var Sequelize=require(_0x5157('0x0'));module[_0x5157('0x1')]={'name':{'type':Sequelize['VIRTUAL'],'get':function(_0x53acc5){return this[_0x5157('0x2')]('id');}},'msgnum':{'type':Sequelize[_0x5157('0x3')](0xb),'defaultValue':0x0,'allowNull':![]},'dir':{'type':Sequelize['STRING'],'defaultValue':''},'context':{'type':Sequelize[_0x5157('0x4')],'defaultValue':''},'macrocontext':{'type':Sequelize[_0x5157('0x4')],'defaultValue':''},'callerid':{'type':Sequelize[_0x5157('0x4')],'defaultValue':''},'origtime':{'type':Sequelize[_0x5157('0x4')],'defaultValue':''},'duration':{'type':Sequelize['STRING'],'defaultValue':''},'mailboxuser':{'type':Sequelize['STRING'],'defaultValue':''},'mailboxcontext':{'type':Sequelize[_0x5157('0x4')],'defaultValue':''},'recording':{'type':Sequelize['BLOB']('long'),'defaultValue':null},'flag':{'type':Sequelize[_0x5157('0x4')],'defaultValue':''},'msg_id':{'type':Sequelize[_0x5157('0x4')],'defaultValue':''},'stamp':{'type':_0x5157('0x5'),'defaultValue':Sequelize[_0x5157('0x6')](_0x5157('0x7'))}}; \ No newline at end of file +var _0xce8b=['INTEGER','STRING','BLOB','long','TIMESTAMP','CURRENT_TIMESTAMP\x20ON\x20UPDATE\x20CURRENT_TIMESTAMP','sequelize','exports','VIRTUAL','getDataValue'];(function(_0x5e4d54,_0x4c590a){var _0x22523c=function(_0x55784a){while(--_0x55784a){_0x5e4d54['push'](_0x5e4d54['shift']());}};_0x22523c(++_0x4c590a);}(_0xce8b,0x1f0));var _0xbce8=function(_0x3bfdde,_0x306be4){_0x3bfdde=_0x3bfdde-0x0;var _0x3f752a=_0xce8b[_0x3bfdde];return _0x3f752a;};'use strict';var Sequelize=require(_0xbce8('0x0'));module[_0xbce8('0x1')]={'name':{'type':Sequelize[_0xbce8('0x2')],'get':function(_0xbe0d0d){return this[_0xbce8('0x3')]('id');}},'msgnum':{'type':Sequelize[_0xbce8('0x4')](0xb),'defaultValue':0x0,'allowNull':![]},'dir':{'type':Sequelize[_0xbce8('0x5')],'defaultValue':''},'context':{'type':Sequelize[_0xbce8('0x5')],'defaultValue':''},'macrocontext':{'type':Sequelize[_0xbce8('0x5')],'defaultValue':''},'callerid':{'type':Sequelize[_0xbce8('0x5')],'defaultValue':''},'origtime':{'type':Sequelize[_0xbce8('0x5')],'defaultValue':''},'duration':{'type':Sequelize['STRING'],'defaultValue':''},'mailboxuser':{'type':Sequelize[_0xbce8('0x5')],'defaultValue':''},'mailboxcontext':{'type':Sequelize['STRING'],'defaultValue':''},'recording':{'type':Sequelize[_0xbce8('0x6')](_0xbce8('0x7')),'defaultValue':null},'flag':{'type':Sequelize[_0xbce8('0x5')],'defaultValue':''},'msg_id':{'type':Sequelize['STRING'],'defaultValue':''},'stamp':{'type':_0xbce8('0x8'),'defaultValue':Sequelize['literal'](_0xbce8('0x9'))}}; \ No newline at end of file diff --git a/server/api/voiceMailMessage/voiceMailMessage.controller.js b/server/api/voiceMailMessage/voiceMailMessage.controller.js index 5b9a576..9e2c228 100644 --- a/server/api/voiceMailMessage/voiceMailMessage.controller.js +++ b/server/api/voiceMailMessage/voiceMailMessage.controller.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xa41b=['squel','crypto','desk.js','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/environment','../../config/license/util','../../mysqldb','sendStatus','status','json','offset','undefined','limit','count','set','apply','save','then','destroy','end','error','name','index','map','VoiceMailMessage','rawAttributes','fieldName','key','model','differenceBy','query','filters','intersection','fields','length','nolimit','sort','where','filter','type','merge','options','include','findAll','rows','catch','show','params','keys','attributes','includeAll','create','body','find','recording','msg_id','Sequelize','ValidationError','VoiceMailMessage\x20not\x20found','audio/wav','Content-Disposition','send','eml-format','rimraf','fast-json-patch','request-promise','moment','bluebird','mustache','util','sox','to-csv','ejs','fs-extra'];(function(_0x42306e,_0x2eb132){var _0x53b867=function(_0xfd1414){while(--_0xfd1414){_0x42306e['push'](_0x42306e['shift']());}};_0x53b867(++_0x2eb132);}(_0xa41b,0xe4));var _0xba41=function(_0x4c7fb5,_0x2548ef){_0x4c7fb5=_0x4c7fb5-0x0;var _0x2e10ac=_0xa41b[_0x4c7fb5];return _0x2e10ac;};'use strict';var emlformat=require(_0xba41('0x0'));var rimraf=require(_0xba41('0x1'));var zipdir=require('zip-dir');var jsonpatch=require(_0xba41('0x2'));var rp=require(_0xba41('0x3'));var moment=require(_0xba41('0x4'));var BPromise=require(_0xba41('0x5'));var Mustache=require(_0xba41('0x6'));var util=require(_0xba41('0x7'));var path=require('path');var sox=require(_0xba41('0x8'));var csv=require(_0xba41('0x9'));var ejs=require(_0xba41('0xa'));var fs=require('fs');var fs_extra=require(_0xba41('0xb'));var _=require('lodash');var squel=require(_0xba41('0xc'));var crypto=require(_0xba41('0xd'));var jsforce=require('jsforce');var deskjs=require(_0xba41('0xe'));var toCsv=require(_0xba41('0x9'));var querystring=require('querystring');var Papa=require('papaparse');var Redis=require(_0xba41('0xf'));var authService=require(_0xba41('0x10'));var qs=require(_0xba41('0x11'));var as=require(_0xba41('0x12'));var hardwareService=require(_0xba41('0x13'));var logger=require(_0xba41('0x14'))(_0xba41('0x15'));var utils=require('../../config/utils');var config=require(_0xba41('0x16'));var licenseUtil=require(_0xba41('0x17'));var db=require(_0xba41('0x18'))['db'];function respondWithStatusCode(_0x5ec1c3,_0x16a97a){_0x16a97a=_0x16a97a||0xcc;return function(_0x5c702e){if(_0x5c702e){return _0x5ec1c3[_0xba41('0x19')](_0x16a97a);}return _0x5ec1c3[_0xba41('0x1a')](_0x16a97a)['end']();};}function respondWithResult(_0x217a1d,_0x104229){_0x104229=_0x104229||0xc8;return function(_0x12b7f2){if(_0x12b7f2){return _0x217a1d[_0xba41('0x1a')](_0x104229)[_0xba41('0x1b')](_0x12b7f2);}};}function respondWithFilteredResult(_0x2266df,_0x188eed){return function(_0x2dfca5){if(_0x2dfca5){var _0x5a8ac6=typeof _0x188eed[_0xba41('0x1c')]===_0xba41('0x1d')&&typeof _0x188eed[_0xba41('0x1e')]===_0xba41('0x1d');var _0x437630=_0x2dfca5[_0xba41('0x1f')];var _0x572182=_0x5a8ac6?0x0:_0x188eed[_0xba41('0x1c')];var _0x58bbb4=_0x5a8ac6?_0x2dfca5[_0xba41('0x1f')]:_0x188eed['offset']+_0x188eed['limit'];var _0x357a15;if(_0x58bbb4>=_0x437630){_0x58bbb4=_0x437630;_0x357a15=0xc8;}else{_0x357a15=0xce;}_0x2266df[_0xba41('0x1a')](_0x357a15);return _0x2266df[_0xba41('0x20')]('Content-Range',_0x572182+'-'+_0x58bbb4+'/'+_0x437630)['json'](_0x2dfca5);}return null;};}function patchUpdates(_0x2dca89){return function(_0x3cea05){try{jsonpatch[_0xba41('0x21')](_0x3cea05,_0x2dca89,!![]);}catch(_0x55a95a){return BPromise['reject'](_0x55a95a);}return _0x3cea05[_0xba41('0x22')]();};}function saveUpdates(_0x23725d,_0x2cc166){return function(_0x8b8ca){if(_0x8b8ca){return _0x8b8ca['update'](_0x23725d)[_0xba41('0x23')](function(_0x505bac){return _0x505bac;});}return null;};}function removeEntity(_0x3060bd,_0x3237c4){return function(_0x95b9c){if(_0x95b9c){return _0x95b9c[_0xba41('0x24')]()['then'](function(){_0x3060bd['status'](0xcc)[_0xba41('0x25')]();});}};}function handleEntityNotFound(_0xd11e57,_0x3402da){return function(_0x687bb0){if(!_0x687bb0){_0xd11e57[_0xba41('0x19')](0x194);}return _0x687bb0;};}function handleError(_0x412aec,_0x3bda9e){_0x3bda9e=_0x3bda9e||0x1f4;return function(_0x1734e6){logger[_0xba41('0x26')](_0x1734e6['stack']);if(_0x1734e6['name']){delete _0x1734e6[_0xba41('0x27')];}_0x412aec[_0xba41('0x1a')](_0x3bda9e)['send'](_0x1734e6);};}exports[_0xba41('0x28')]=function(_0x208242,_0x2b660a){var _0x5f913={},_0x2b36d9={},_0x4bbc49={'count':0x0,'rows':[]};var _0x4cb9e0=_[_0xba41('0x29')](db[_0xba41('0x2a')][_0xba41('0x2b')],function(_0x5832b8){return{'name':_0x5832b8[_0xba41('0x2c')],'type':_0x5832b8['type'][_0xba41('0x2d')]};});_0x2b36d9[_0xba41('0x2e')]=_[_0xba41('0x2f')](_[_0xba41('0x29')](_0x4cb9e0,'name'),[_0xba41('0x27')]);_0x2b36d9[_0xba41('0x30')]=_['keys'](_0x208242[_0xba41('0x30')]);_0x2b36d9[_0xba41('0x31')]=_[_0xba41('0x32')](_0x2b36d9[_0xba41('0x2e')],_0x2b36d9[_0xba41('0x30')]);_0x5f913['attributes']=_['intersection'](_0x2b36d9[_0xba41('0x2e')],qs[_0xba41('0x33')](_0x208242[_0xba41('0x30')]['fields']));_0x5f913['attributes']=_0x5f913['attributes'][_0xba41('0x34')]?_0x5f913['attributes']:_0x2b36d9[_0xba41('0x2e')];if(!_0x208242['query']['hasOwnProperty'](_0xba41('0x35'))){_0x5f913[_0xba41('0x1e')]=qs['limit'](_0x208242[_0xba41('0x30')]['limit']);_0x5f913[_0xba41('0x1c')]=qs[_0xba41('0x1c')](_0x208242[_0xba41('0x30')][_0xba41('0x1c')]);}_0x5f913['order']=qs[_0xba41('0x36')](_0x208242[_0xba41('0x30')][_0xba41('0x36')]);_0x5f913[_0xba41('0x37')]=qs[_0xba41('0x31')](_['pick'](_0x208242['query'],_0x2b36d9[_0xba41('0x31')]),_0x4cb9e0);if(_0x208242[_0xba41('0x30')][_0xba41('0x38')]){_0x5f913[_0xba41('0x37')]=_['merge'](_0x5f913[_0xba41('0x37')],{'$or':_[_0xba41('0x29')](_0x4cb9e0,function(_0x5e0714){if(_0x5e0714[_0xba41('0x39')]!=='VIRTUAL'){var _0x42d687={};_0x42d687[_0x5e0714[_0xba41('0x27')]]={'$like':'%'+_0x208242['query'][_0xba41('0x38')]+'%'};return _0x42d687;}})});}_0x5f913=_[_0xba41('0x3a')]({},_0x5f913,_0x208242[_0xba41('0x3b')]);var _0x56f949={'where':_0x5f913[_0xba41('0x37')]};return db[_0xba41('0x2a')][_0xba41('0x1f')](_0x56f949)[_0xba41('0x23')](function(_0x202b67){_0x4bbc49[_0xba41('0x1f')]=_0x202b67;if(_0x208242['query']['includeAll']){_0x5f913[_0xba41('0x3c')]=[{'all':!![]}];}return db[_0xba41('0x2a')][_0xba41('0x3d')](_0x5f913);})['then'](function(_0x2c92a1){_0x4bbc49[_0xba41('0x3e')]=_0x2c92a1;return _0x4bbc49;})[_0xba41('0x23')](respondWithFilteredResult(_0x2b660a,_0x5f913))[_0xba41('0x3f')](handleError(_0x2b660a,null));};exports[_0xba41('0x40')]=function(_0x47bd17,_0x522dba){var _0x31b1b0={'raw':!![],'where':{'id':_0x47bd17[_0xba41('0x41')]['id']}},_0x2fff79={};_0x2fff79[_0xba41('0x2e')]=_['keys'](db[_0xba41('0x2a')]['rawAttributes']);_0x2fff79[_0xba41('0x30')]=_[_0xba41('0x42')](_0x47bd17[_0xba41('0x30')]);_0x2fff79[_0xba41('0x31')]=_[_0xba41('0x32')](_0x2fff79['model'],_0x2fff79[_0xba41('0x30')]);_0x31b1b0['attributes']=_[_0xba41('0x32')](_0x2fff79[_0xba41('0x2e')],qs[_0xba41('0x33')](_0x47bd17[_0xba41('0x30')][_0xba41('0x33')]));_0x31b1b0['attributes']=_0x31b1b0[_0xba41('0x43')]['length']?_0x31b1b0[_0xba41('0x43')]:_0x2fff79[_0xba41('0x2e')];if(_0x47bd17[_0xba41('0x30')][_0xba41('0x44')]){_0x31b1b0[_0xba41('0x3c')]=[{'all':!![]}];}_0x31b1b0=_[_0xba41('0x3a')]({},_0x31b1b0,_0x47bd17[_0xba41('0x3b')]);return db[_0xba41('0x2a')]['find'](_0x31b1b0)['then'](handleEntityNotFound(_0x522dba,null))[_0xba41('0x23')](respondWithResult(_0x522dba,null))['catch'](handleError(_0x522dba,null));};exports[_0xba41('0x45')]=function(_0x22ff3d,_0x331b05){return db[_0xba41('0x2a')][_0xba41('0x45')](_0x22ff3d['body'],{})['then'](respondWithResult(_0x331b05,0xc9))[_0xba41('0x3f')](handleError(_0x331b05,null));};exports['update']=function(_0x469c34,_0x4d2c7b){if(_0x469c34[_0xba41('0x46')]['id']){delete _0x469c34[_0xba41('0x46')]['id'];}return db[_0xba41('0x2a')][_0xba41('0x47')]({'where':{'id':_0x469c34[_0xba41('0x41')]['id']}})[_0xba41('0x23')](handleEntityNotFound(_0x4d2c7b,null))[_0xba41('0x23')](saveUpdates(_0x469c34[_0xba41('0x46')],null))['then'](respondWithResult(_0x4d2c7b,null))[_0xba41('0x3f')](handleError(_0x4d2c7b,null));};exports[_0xba41('0x24')]=function(_0xa1135f,_0x56481b){return db['VoiceMailMessage'][_0xba41('0x47')]({'where':{'id':_0xa1135f[_0xba41('0x41')]['id']}})[_0xba41('0x23')](handleEntityNotFound(_0x56481b,null))[_0xba41('0x23')](removeEntity(_0x56481b,null))['catch'](handleError(_0x56481b,null));};exports['download']=function(_0x511c0a,_0x56e65f,_0x39af76){return db[_0xba41('0x2a')][_0xba41('0x47')]({'where':{'id':_0x511c0a[_0xba41('0x41')]['id']},'attributes':['id',_0xba41('0x48'),_0xba41('0x49')]})[_0xba41('0x23')](handleEntityNotFound(_0x56e65f,null))[_0xba41('0x23')](function(_0x39874e){if(_0x39874e){if(!_0x39874e[_0xba41('0x48')]){throw new db[(_0xba41('0x4a'))][(_0xba41('0x4b'))](_0xba41('0x4c'));}var _0x178351={'Content-Type':_0xba41('0x4d'),'Content-Disposition':'attachment'};if(_0x39874e[_0xba41('0x49')]){_0x178351[_0xba41('0x4e')]='attachment;\x20filename=\x22'+_0x39874e[_0xba41('0x49')]+'.wav\x22';}_0x56e65f[_0xba41('0x20')](_0x178351);return _0x56e65f[_0xba41('0x4f')](new Buffer(_0x39874e[_0xba41('0x48')]));}})[_0xba41('0x3f')](handleError(_0x56e65f,null));}; \ No newline at end of file +var _0x1886=['merge','type','VIRTUAL','options','include','VoiceMailMessage','findAll','rows','show','params','rawAttributes','includeAll','catch','create','body','update','find','destroy','download','msg_id','Sequelize','VoiceMailMessage\x20not\x20found','attachment','Content-Disposition','attachment;\x20filename=\x22','.wav\x22','recording','eml-format','rimraf','zip-dir','fast-json-patch','moment','bluebird','util','path','ejs','lodash','jsforce','desk.js','querystring','papaparse','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','api','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','sendStatus','status','json','offset','undefined','count','limit','set','Content-Range','apply','reject','save','then','end','error','stack','name','send','map','key','model','differenceBy','keys','query','attributes','intersection','fields','length','hasOwnProperty','order','where','filters','pick','filter'];(function(_0x410ca2,_0x4359b7){var _0xa7b1f7=function(_0x817a13){while(--_0x817a13){_0x410ca2['push'](_0x410ca2['shift']());}};_0xa7b1f7(++_0x4359b7);}(_0x1886,0x16b));var _0x6188=function(_0x2641f9,_0x26715f){_0x2641f9=_0x2641f9-0x0;var _0x585741=_0x1886[_0x2641f9];return _0x585741;};'use strict';var emlformat=require(_0x6188('0x0'));var rimraf=require(_0x6188('0x1'));var zipdir=require(_0x6188('0x2'));var jsonpatch=require(_0x6188('0x3'));var rp=require('request-promise');var moment=require(_0x6188('0x4'));var BPromise=require(_0x6188('0x5'));var Mustache=require('mustache');var util=require(_0x6188('0x6'));var path=require(_0x6188('0x7'));var sox=require('sox');var csv=require('to-csv');var ejs=require(_0x6188('0x8'));var fs=require('fs');var fs_extra=require('fs-extra');var _=require(_0x6188('0x9'));var squel=require('squel');var crypto=require('crypto');var jsforce=require(_0x6188('0xa'));var deskjs=require(_0x6188('0xb'));var toCsv=require('to-csv');var querystring=require(_0x6188('0xc'));var Papa=require(_0x6188('0xd'));var Redis=require('ioredis');var authService=require(_0x6188('0xe'));var qs=require(_0x6188('0xf'));var as=require(_0x6188('0x10'));var hardwareService=require(_0x6188('0x11'));var logger=require('../../config/logger')(_0x6188('0x12'));var utils=require(_0x6188('0x13'));var config=require(_0x6188('0x14'));var licenseUtil=require(_0x6188('0x15'));var db=require(_0x6188('0x16'))['db'];function respondWithStatusCode(_0x40d9cd,_0x43cfcd){_0x43cfcd=_0x43cfcd||0xcc;return function(_0x2302ab){if(_0x2302ab){return _0x40d9cd[_0x6188('0x17')](_0x43cfcd);}return _0x40d9cd[_0x6188('0x18')](_0x43cfcd)['end']();};}function respondWithResult(_0x2f5762,_0x43e9c0){_0x43e9c0=_0x43e9c0||0xc8;return function(_0x4ac0e4){if(_0x4ac0e4){return _0x2f5762[_0x6188('0x18')](_0x43e9c0)[_0x6188('0x19')](_0x4ac0e4);}};}function respondWithFilteredResult(_0x3c8a02,_0x13b849){return function(_0x3817b4){if(_0x3817b4){var _0x305c67=typeof _0x13b849[_0x6188('0x1a')]==='undefined'&&typeof _0x13b849['limit']===_0x6188('0x1b');var _0x5e55ae=_0x3817b4['count'];var _0x4d15e6=_0x305c67?0x0:_0x13b849['offset'];var _0x17b37=_0x305c67?_0x3817b4[_0x6188('0x1c')]:_0x13b849[_0x6188('0x1a')]+_0x13b849[_0x6188('0x1d')];var _0x2c04cf;if(_0x17b37>=_0x5e55ae){_0x17b37=_0x5e55ae;_0x2c04cf=0xc8;}else{_0x2c04cf=0xce;}_0x3c8a02[_0x6188('0x18')](_0x2c04cf);return _0x3c8a02[_0x6188('0x1e')](_0x6188('0x1f'),_0x4d15e6+'-'+_0x17b37+'/'+_0x5e55ae)[_0x6188('0x19')](_0x3817b4);}return null;};}function patchUpdates(_0x34e923){return function(_0x180e87){try{jsonpatch[_0x6188('0x20')](_0x180e87,_0x34e923,!![]);}catch(_0x32b4e1){return BPromise[_0x6188('0x21')](_0x32b4e1);}return _0x180e87[_0x6188('0x22')]();};}function saveUpdates(_0x2b20c0,_0xdce979){return function(_0x3845d6){if(_0x3845d6){return _0x3845d6['update'](_0x2b20c0)[_0x6188('0x23')](function(_0x1855b8){return _0x1855b8;});}return null;};}function removeEntity(_0x3eae0f,_0x210d3c){return function(_0x7cb077){if(_0x7cb077){return _0x7cb077['destroy']()[_0x6188('0x23')](function(){_0x3eae0f[_0x6188('0x18')](0xcc)[_0x6188('0x24')]();});}};}function handleEntityNotFound(_0x12af1a,_0x348779){return function(_0x58dd92){if(!_0x58dd92){_0x12af1a[_0x6188('0x17')](0x194);}return _0x58dd92;};}function handleError(_0x597745,_0x110a3e){_0x110a3e=_0x110a3e||0x1f4;return function(_0x31f7ed){logger[_0x6188('0x25')](_0x31f7ed[_0x6188('0x26')]);if(_0x31f7ed[_0x6188('0x27')]){delete _0x31f7ed[_0x6188('0x27')];}_0x597745[_0x6188('0x18')](_0x110a3e)[_0x6188('0x28')](_0x31f7ed);};}exports['index']=function(_0x50d4b6,_0xd53faa){var _0x594a10={},_0x10841f={},_0x54f87f={'count':0x0,'rows':[]};var _0x23864f=_[_0x6188('0x29')](db['VoiceMailMessage']['rawAttributes'],function(_0x2ae1c5){return{'name':_0x2ae1c5['fieldName'],'type':_0x2ae1c5['type'][_0x6188('0x2a')]};});_0x10841f[_0x6188('0x2b')]=_[_0x6188('0x2c')](_['map'](_0x23864f,_0x6188('0x27')),['name']);_0x10841f['query']=_[_0x6188('0x2d')](_0x50d4b6[_0x6188('0x2e')]);_0x10841f['filters']=_['intersection'](_0x10841f['model'],_0x10841f[_0x6188('0x2e')]);_0x594a10[_0x6188('0x2f')]=_[_0x6188('0x30')](_0x10841f['model'],qs[_0x6188('0x31')](_0x50d4b6[_0x6188('0x2e')]['fields']));_0x594a10['attributes']=_0x594a10[_0x6188('0x2f')][_0x6188('0x32')]?_0x594a10[_0x6188('0x2f')]:_0x10841f[_0x6188('0x2b')];if(!_0x50d4b6[_0x6188('0x2e')][_0x6188('0x33')]('nolimit')){_0x594a10[_0x6188('0x1d')]=qs[_0x6188('0x1d')](_0x50d4b6[_0x6188('0x2e')][_0x6188('0x1d')]);_0x594a10['offset']=qs[_0x6188('0x1a')](_0x50d4b6['query'][_0x6188('0x1a')]);}_0x594a10[_0x6188('0x34')]=qs['sort'](_0x50d4b6['query']['sort']);_0x594a10[_0x6188('0x35')]=qs[_0x6188('0x36')](_[_0x6188('0x37')](_0x50d4b6[_0x6188('0x2e')],_0x10841f[_0x6188('0x36')]),_0x23864f);if(_0x50d4b6[_0x6188('0x2e')][_0x6188('0x38')]){_0x594a10['where']=_[_0x6188('0x39')](_0x594a10[_0x6188('0x35')],{'$or':_[_0x6188('0x29')](_0x23864f,function(_0xa94c79){if(_0xa94c79[_0x6188('0x3a')]!==_0x6188('0x3b')){var _0x31941a={};_0x31941a[_0xa94c79[_0x6188('0x27')]]={'$like':'%'+_0x50d4b6[_0x6188('0x2e')][_0x6188('0x38')]+'%'};return _0x31941a;}})});}_0x594a10=_[_0x6188('0x39')]({},_0x594a10,_0x50d4b6[_0x6188('0x3c')]);var _0x869d09={'where':_0x594a10[_0x6188('0x35')]};return db['VoiceMailMessage'][_0x6188('0x1c')](_0x869d09)[_0x6188('0x23')](function(_0x149aa6){_0x54f87f['count']=_0x149aa6;if(_0x50d4b6['query']['includeAll']){_0x594a10[_0x6188('0x3d')]=[{'all':!![]}];}return db[_0x6188('0x3e')][_0x6188('0x3f')](_0x594a10);})[_0x6188('0x23')](function(_0x229090){_0x54f87f[_0x6188('0x40')]=_0x229090;return _0x54f87f;})[_0x6188('0x23')](respondWithFilteredResult(_0xd53faa,_0x594a10))['catch'](handleError(_0xd53faa,null));};exports[_0x6188('0x41')]=function(_0x53241d,_0x11e5aa){var _0x51b00f={'raw':!![],'where':{'id':_0x53241d[_0x6188('0x42')]['id']}},_0x117454={};_0x117454[_0x6188('0x2b')]=_['keys'](db[_0x6188('0x3e')][_0x6188('0x43')]);_0x117454[_0x6188('0x2e')]=_[_0x6188('0x2d')](_0x53241d[_0x6188('0x2e')]);_0x117454[_0x6188('0x36')]=_[_0x6188('0x30')](_0x117454[_0x6188('0x2b')],_0x117454[_0x6188('0x2e')]);_0x51b00f['attributes']=_['intersection'](_0x117454[_0x6188('0x2b')],qs[_0x6188('0x31')](_0x53241d[_0x6188('0x2e')][_0x6188('0x31')]));_0x51b00f[_0x6188('0x2f')]=_0x51b00f[_0x6188('0x2f')][_0x6188('0x32')]?_0x51b00f[_0x6188('0x2f')]:_0x117454[_0x6188('0x2b')];if(_0x53241d[_0x6188('0x2e')][_0x6188('0x44')]){_0x51b00f[_0x6188('0x3d')]=[{'all':!![]}];}_0x51b00f=_[_0x6188('0x39')]({},_0x51b00f,_0x53241d['options']);return db['VoiceMailMessage']['find'](_0x51b00f)[_0x6188('0x23')](handleEntityNotFound(_0x11e5aa,null))[_0x6188('0x23')](respondWithResult(_0x11e5aa,null))[_0x6188('0x45')](handleError(_0x11e5aa,null));};exports[_0x6188('0x46')]=function(_0x1c528e,_0x4dfb2b){return db[_0x6188('0x3e')]['create'](_0x1c528e[_0x6188('0x47')],{})[_0x6188('0x23')](respondWithResult(_0x4dfb2b,0xc9))[_0x6188('0x45')](handleError(_0x4dfb2b,null));};exports[_0x6188('0x48')]=function(_0x432e9,_0x416f4a){if(_0x432e9[_0x6188('0x47')]['id']){delete _0x432e9['body']['id'];}return db['VoiceMailMessage'][_0x6188('0x49')]({'where':{'id':_0x432e9[_0x6188('0x42')]['id']}})[_0x6188('0x23')](handleEntityNotFound(_0x416f4a,null))['then'](saveUpdates(_0x432e9['body'],null))[_0x6188('0x23')](respondWithResult(_0x416f4a,null))[_0x6188('0x45')](handleError(_0x416f4a,null));};exports[_0x6188('0x4a')]=function(_0x210db8,_0x216458){return db[_0x6188('0x3e')][_0x6188('0x49')]({'where':{'id':_0x210db8[_0x6188('0x42')]['id']}})[_0x6188('0x23')](handleEntityNotFound(_0x216458,null))[_0x6188('0x23')](removeEntity(_0x216458,null))[_0x6188('0x45')](handleError(_0x216458,null));};exports[_0x6188('0x4b')]=function(_0x3012c3,_0xaf41b8,_0x573252){return db[_0x6188('0x3e')][_0x6188('0x49')]({'where':{'id':_0x3012c3[_0x6188('0x42')]['id']},'attributes':['id','recording',_0x6188('0x4c')]})[_0x6188('0x23')](handleEntityNotFound(_0xaf41b8,null))[_0x6188('0x23')](function(_0x3404e5){if(_0x3404e5){if(!_0x3404e5['recording']){throw new db[(_0x6188('0x4d'))]['ValidationError'](_0x6188('0x4e'));}var _0x5a8ad9={'Content-Type':'audio/wav','Content-Disposition':_0x6188('0x4f')};if(_0x3404e5[_0x6188('0x4c')]){_0x5a8ad9[_0x6188('0x50')]=_0x6188('0x51')+_0x3404e5[_0x6188('0x4c')]+_0x6188('0x52');}_0xaf41b8[_0x6188('0x1e')](_0x5a8ad9);return _0xaf41b8[_0x6188('0x28')](new Buffer(_0x3404e5[_0x6188('0x53')]));}})['catch'](handleError(_0xaf41b8,null));}; \ No newline at end of file diff --git a/server/api/voiceMailMessage/voiceMailMessage.model.js b/server/api/voiceMailMessage/voiceMailMessage.model.js index c56a756..3001a23 100644 --- a/server/api/voiceMailMessage/voiceMailMessage.model.js +++ b/server/api/voiceMailMessage/voiceMailMessage.model.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x809a=['request-promise','path','rimraf','../../config/environment','./voiceMailMessage.attributes','define','VoiceMailMessage','dir','lodash','util','api','moment'];(function(_0x2c6120,_0x1f3e60){var _0x5fb114=function(_0x45a72d){while(--_0x45a72d){_0x2c6120['push'](_0x2c6120['shift']());}};_0x5fb114(++_0x1f3e60);}(_0x809a,0xb0));var _0xa809=function(_0x4de9a4,_0x57f365){_0x4de9a4=_0x4de9a4-0x0;var _0x233216=_0x809a[_0x4de9a4];return _0x233216;};'use strict';var _=require(_0xa809('0x0'));var util=require(_0xa809('0x1'));var logger=require('../../config/logger')(_0xa809('0x2'));var moment=require(_0xa809('0x3'));var BPromise=require('bluebird');var rp=require(_0xa809('0x4'));var fs=require('fs');var path=require(_0xa809('0x5'));var rimraf=require(_0xa809('0x6'));var config=require(_0xa809('0x7'));var attributes=require(_0xa809('0x8'));module['exports']=function(_0x42eda7,_0x1b8eef){return _0x42eda7[_0xa809('0x9')](_0xa809('0xa'),attributes,{'tableName':'voice_voicemail_messages','paranoid':![],'indexes':[{'name':_0xa809('0xb'),'fields':[_0xa809('0xb')]}],'timestamps':![]});}; \ No newline at end of file +var _0xe93f=['request-promise','rimraf','../../config/environment','./voiceMailMessage.attributes','exports','define','dir','lodash','util','../../config/logger','api','moment','bluebird'];(function(_0x47643e,_0x337374){var _0x2aa5db=function(_0x5dcbf2){while(--_0x5dcbf2){_0x47643e['push'](_0x47643e['shift']());}};_0x2aa5db(++_0x337374);}(_0xe93f,0x1ce));var _0xfe93=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0xe93f[_0x3dd15e];return _0x231fd0;};'use strict';var _=require(_0xfe93('0x0'));var util=require(_0xfe93('0x1'));var logger=require(_0xfe93('0x2'))(_0xfe93('0x3'));var moment=require(_0xfe93('0x4'));var BPromise=require(_0xfe93('0x5'));var rp=require(_0xfe93('0x6'));var fs=require('fs');var path=require('path');var rimraf=require(_0xfe93('0x7'));var config=require(_0xfe93('0x8'));var attributes=require(_0xfe93('0x9'));module[_0xfe93('0xa')]=function(_0x1e19ef,_0x4d477d){return _0x1e19ef[_0xfe93('0xb')]('VoiceMailMessage',attributes,{'tableName':'voice_voicemail_messages','paranoid':![],'indexes':[{'name':_0xfe93('0xc'),'fields':[_0xfe93('0xc')]}],'timestamps':![]});}; \ No newline at end of file diff --git a/server/api/voiceMailMessage/voiceMailMessage.rpc.js b/server/api/voiceMailMessage/voiceMailMessage.rpc.js index c975025..bc4c16a 100644 --- a/server/api/voiceMailMessage/voiceMailMessage.rpc.js +++ b/server/api/voiceMailMessage/voiceMailMessage.rpc.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x8487=['../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','request','then','info','request\x20sent','debug','stringify','error','code','VoiceMailMessage,\x20%s,\x20%s','message','result','catch','moment','randomstring'];(function(_0x14406e,_0x2502b2){var _0x1474e9=function(_0x1220af){while(--_0x1220af){_0x14406e['push'](_0x14406e['shift']());}};_0x1474e9(++_0x2502b2);}(_0x8487,0x106));var _0x7848=function(_0x5b070b,_0x4a45b2){_0x5b070b=_0x5b070b-0x0;var _0x252df3=_0x8487[_0x5b070b];return _0x252df3;};'use strict';var _=require('lodash');var util=require('util');var moment=require(_0x7848('0x0'));var BPromise=require('bluebird');var rs=require(_0x7848('0x1'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0x7848('0x2'))['db'];var utils=require(_0x7848('0x3'));var logger=require(_0x7848('0x4'))(_0x7848('0x5'));var config=require(_0x7848('0x6'));var jayson=require(_0x7848('0x7'));var client=jayson[_0x7848('0x8')][_0x7848('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x1250d4,_0x2fbc05,_0x5cdcec){return new BPromise(function(_0x129a92,_0x33ee59){return client[_0x7848('0xa')](_0x1250d4,_0x5cdcec)[_0x7848('0xb')](function(_0x1c6183){logger[_0x7848('0xc')]('VoiceMailMessage,\x20%s,\x20%s',_0x2fbc05,_0x7848('0xd'));logger[_0x7848('0xe')]('VoiceMailMessage,\x20%s,\x20%s,\x20%s',_0x2fbc05,_0x7848('0xd'),JSON[_0x7848('0xf')](_0x1c6183));if(_0x1c6183['error']){if(_0x1c6183[_0x7848('0x10')][_0x7848('0x11')]===0x1f4){logger[_0x7848('0x10')](_0x7848('0x12'),_0x2fbc05,_0x1c6183[_0x7848('0x10')]['message']);return _0x33ee59(_0x1c6183['error'][_0x7848('0x13')]);}logger['error'](_0x7848('0x12'),_0x2fbc05,_0x1c6183[_0x7848('0x10')]['message']);return _0x129a92(_0x1c6183[_0x7848('0x10')][_0x7848('0x13')]);}else{logger['info']('VoiceMailMessage,\x20%s,\x20%s',_0x2fbc05,'request\x20sent');_0x129a92(_0x1c6183[_0x7848('0x14')][_0x7848('0x13')]);}})[_0x7848('0x15')](function(_0x1aeaba){logger[_0x7848('0x10')]('VoiceMailMessage,\x20%s,\x20%s',_0x2fbc05,_0x1aeaba);_0x33ee59(_0x1aeaba);});});} \ No newline at end of file +var _0x6010=['randomstring','ioredis','../../config/utils','../../config/logger','../../config/environment','client','http','request','then','info','request\x20sent','debug','VoiceMailMessage,\x20%s,\x20%s,\x20%s','stringify','error','VoiceMailMessage,\x20%s,\x20%s','message','result','catch','lodash','util','bluebird'];(function(_0x5217bf,_0x3cb838){var _0x407d67=function(_0x373de8){while(--_0x373de8){_0x5217bf['push'](_0x5217bf['shift']());}};_0x407d67(++_0x3cb838);}(_0x6010,0x1b5));var _0x0601=function(_0x3cbaa5,_0x38438a){_0x3cbaa5=_0x3cbaa5-0x0;var _0x3ab256=_0x6010[_0x3cbaa5];return _0x3ab256;};'use strict';var _=require(_0x0601('0x0'));var util=require(_0x0601('0x1'));var moment=require('moment');var BPromise=require(_0x0601('0x2'));var rs=require(_0x0601('0x3'));var fs=require('fs');var Redis=require(_0x0601('0x4'));var db=require('../../mysqldb')['db'];var utils=require(_0x0601('0x5'));var logger=require(_0x0601('0x6'))('rpc');var config=require(_0x0601('0x7'));var jayson=require('jayson/promise');var client=jayson[_0x0601('0x8')][_0x0601('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x80870c,_0x1d04ae,_0x4a0b76){return new BPromise(function(_0x1e8e47,_0x330ad5){return client[_0x0601('0xa')](_0x80870c,_0x4a0b76)[_0x0601('0xb')](function(_0x5638fb){logger[_0x0601('0xc')]('VoiceMailMessage,\x20%s,\x20%s',_0x1d04ae,_0x0601('0xd'));logger[_0x0601('0xe')](_0x0601('0xf'),_0x1d04ae,_0x0601('0xd'),JSON[_0x0601('0x10')](_0x5638fb));if(_0x5638fb['error']){if(_0x5638fb[_0x0601('0x11')]['code']===0x1f4){logger[_0x0601('0x11')](_0x0601('0x12'),_0x1d04ae,_0x5638fb[_0x0601('0x11')][_0x0601('0x13')]);return _0x330ad5(_0x5638fb[_0x0601('0x11')][_0x0601('0x13')]);}logger[_0x0601('0x11')](_0x0601('0x12'),_0x1d04ae,_0x5638fb[_0x0601('0x11')][_0x0601('0x13')]);return _0x1e8e47(_0x5638fb[_0x0601('0x11')][_0x0601('0x13')]);}else{logger[_0x0601('0xc')](_0x0601('0x12'),_0x1d04ae,_0x0601('0xd'));_0x1e8e47(_0x5638fb[_0x0601('0x14')][_0x0601('0x13')]);}})[_0x0601('0x15')](function(_0x2ff7ff){logger[_0x0601('0x11')](_0x0601('0x12'),_0x1d04ae,_0x2ff7ff);_0x330ad5(_0x2ff7ff);});});} \ No newline at end of file diff --git a/server/api/voiceMusicOnHold/index.js b/server/api/voiceMusicOnHold/index.js index ef5d18d..a7acbe8 100644 --- a/server/api/voiceMusicOnHold/index.js +++ b/server/api/voiceMusicOnHold/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x27d2=['destroy','/:id/sounds/:id2','removeSound','exports','util','path','connect-timeout','express','Router','../../components/interaction/service','get','isAuthenticated','index','/:id','show','/:id/sounds','getSounds','post','create','put','delete'];(function(_0x4d2f00,_0x4e94d5){var _0x2d7b7f=function(_0x18fa08){while(--_0x18fa08){_0x4d2f00['push'](_0x4d2f00['shift']());}};_0x2d7b7f(++_0x4e94d5);}(_0x27d2,0x97));var _0x227d=function(_0x2c7cad,_0x2c219a){_0x2c7cad=_0x2c7cad-0x0;var _0x22e631=_0x27d2[_0x2c7cad];return _0x22e631;};'use strict';var multer=require('multer');var util=require(_0x227d('0x0'));var path=require(_0x227d('0x1'));var timeout=require(_0x227d('0x2'));var express=require(_0x227d('0x3'));var router=express[_0x227d('0x4')]();var fs_extra=require('fs-extra');var auth=require('../../components/auth/service');var interaction=require(_0x227d('0x5'));var config=require('../../config/environment');var controller=require('./voiceMusicOnHold.controller');router[_0x227d('0x6')]('/',auth[_0x227d('0x7')](),controller[_0x227d('0x8')]);router[_0x227d('0x6')](_0x227d('0x9'),auth[_0x227d('0x7')](),controller[_0x227d('0xa')]);router['get'](_0x227d('0xb'),auth[_0x227d('0x7')](),controller[_0x227d('0xc')]);router[_0x227d('0xd')]('/',auth[_0x227d('0x7')](),controller[_0x227d('0xe')]);router[_0x227d('0xd')](_0x227d('0xb'),auth['isAuthenticated'](),controller['addSound']);router[_0x227d('0xf')](_0x227d('0x9'),auth[_0x227d('0x7')](),controller['update']);router[_0x227d('0x10')]('/:id',auth[_0x227d('0x7')](),controller[_0x227d('0x11')]);router[_0x227d('0x10')](_0x227d('0x12'),auth['isAuthenticated'](),controller[_0x227d('0x13')]);module[_0x227d('0x14')]=router; \ No newline at end of file +var _0x8ab6=['../../components/interaction/service','../../config/environment','./voiceMusicOnHold.controller','get','index','/:id','isAuthenticated','/:id/sounds','getSounds','post','update','delete','removeSound','multer','path','connect-timeout','express','fs-extra','../../components/auth/service'];(function(_0x48edc4,_0x511029){var _0x57e137=function(_0x20656e){while(--_0x20656e){_0x48edc4['push'](_0x48edc4['shift']());}};_0x57e137(++_0x511029);}(_0x8ab6,0x189));var _0x68ab=function(_0x1e62fe,_0x4ff801){_0x1e62fe=_0x1e62fe-0x0;var _0x3f4cc6=_0x8ab6[_0x1e62fe];return _0x3f4cc6;};'use strict';var multer=require(_0x68ab('0x0'));var util=require('util');var path=require(_0x68ab('0x1'));var timeout=require(_0x68ab('0x2'));var express=require(_0x68ab('0x3'));var router=express['Router']();var fs_extra=require(_0x68ab('0x4'));var auth=require(_0x68ab('0x5'));var interaction=require(_0x68ab('0x6'));var config=require(_0x68ab('0x7'));var controller=require(_0x68ab('0x8'));router[_0x68ab('0x9')]('/',auth['isAuthenticated'](),controller[_0x68ab('0xa')]);router[_0x68ab('0x9')](_0x68ab('0xb'),auth[_0x68ab('0xc')](),controller['show']);router[_0x68ab('0x9')](_0x68ab('0xd'),auth[_0x68ab('0xc')](),controller[_0x68ab('0xe')]);router[_0x68ab('0xf')]('/',auth[_0x68ab('0xc')](),controller['create']);router[_0x68ab('0xf')](_0x68ab('0xd'),auth[_0x68ab('0xc')](),controller['addSound']);router['put'](_0x68ab('0xb'),auth['isAuthenticated'](),controller[_0x68ab('0x10')]);router[_0x68ab('0x11')](_0x68ab('0xb'),auth[_0x68ab('0xc')](),controller['destroy']);router[_0x68ab('0x11')]('/:id/sounds/:id2',auth[_0x68ab('0xc')](),controller[_0x68ab('0x12')]);module['exports']=router; \ No newline at end of file diff --git a/server/api/voiceMusicOnHold/voiceMusicOnHold.attributes.js b/server/api/voiceMusicOnHold/voiceMusicOnHold.attributes.js index 1941d93..579da21 100644 --- a/server/api/voiceMusicOnHold/voiceMusicOnHold.attributes.js +++ b/server/api/voiceMusicOnHold/voiceMusicOnHold.attributes.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x53e3=['mp3nb','quietmp3nb','mp3','STRING','alpha','sequelize','exports','name','files'];(function(_0x350474,_0x372b95){var _0x5d75d8=function(_0x30fc78){while(--_0x30fc78){_0x350474['push'](_0x350474['shift']());}};_0x5d75d8(++_0x372b95);}(_0x53e3,0x1a3));var _0x353e=function(_0x5dac5c,_0x3f110f){_0x5dac5c=_0x5dac5c-0x0;var _0x1cfebe=_0x53e3[_0x5dac5c];return _0x1cfebe;};'use strict';var Sequelize=require(_0x353e('0x0'));module[_0x353e('0x1')]={'name':{'type':Sequelize['STRING'],'allowNull':![],'unique':_0x353e('0x2')},'mode':{'type':Sequelize['ENUM']('custom',_0x353e('0x3'),_0x353e('0x4'),_0x353e('0x5'),'quietmp3',_0x353e('0x6')),'allowNull':!![],'defaultValue':_0x353e('0x3')},'directory':{'type':Sequelize[_0x353e('0x7')],'allowNull':!![]},'application':{'type':Sequelize[_0x353e('0x7')],'allowNull':!![]},'digit':{'type':Sequelize[_0x353e('0x7')],'allowNull':!![]},'sort':{'type':Sequelize[_0x353e('0x7')],'allowNull':!![],'defaultValue':_0x353e('0x8')},'format':{'type':Sequelize['STRING'],'allowNull':!![]},'stamp':{'type':'TIMESTAMP'},'defaultEntry':{'type':Sequelize['BOOLEAN'],'defaultValue':0x0}}; \ No newline at end of file +var _0x5a88=['name','ENUM','custom','files','quietmp3nb','mp3','STRING','TIMESTAMP','BOOLEAN','sequelize','exports'];(function(_0xf7eaae,_0x2ed4c6){var _0x29683e=function(_0x3431b4){while(--_0x3431b4){_0xf7eaae['push'](_0xf7eaae['shift']());}};_0x29683e(++_0x2ed4c6);}(_0x5a88,0x153));var _0x85a8=function(_0x5b14e4,_0x8a1255){_0x5b14e4=_0x5b14e4-0x0;var _0x584855=_0x5a88[_0x5b14e4];return _0x584855;};'use strict';var Sequelize=require(_0x85a8('0x0'));module[_0x85a8('0x1')]={'name':{'type':Sequelize['STRING'],'allowNull':![],'unique':_0x85a8('0x2')},'mode':{'type':Sequelize[_0x85a8('0x3')](_0x85a8('0x4'),_0x85a8('0x5'),'mp3nb',_0x85a8('0x6'),'quietmp3',_0x85a8('0x7')),'allowNull':!![],'defaultValue':_0x85a8('0x5')},'directory':{'type':Sequelize['STRING'],'allowNull':!![]},'application':{'type':Sequelize[_0x85a8('0x8')],'allowNull':!![]},'digit':{'type':Sequelize[_0x85a8('0x8')],'allowNull':!![]},'sort':{'type':Sequelize[_0x85a8('0x8')],'allowNull':!![],'defaultValue':'alpha'},'format':{'type':Sequelize[_0x85a8('0x8')],'allowNull':!![]},'stamp':{'type':_0x85a8('0x9')},'defaultEntry':{'type':Sequelize[_0x85a8('0xa')],'defaultValue':0x0}}; \ No newline at end of file diff --git a/server/api/voiceMusicOnHold/voiceMusicOnHold.controller.js b/server/api/voiceMusicOnHold/voiceMusicOnHold.controller.js index 644846f..18f81b8 100644 --- a/server/api/voiceMusicOnHold/voiceMusicOnHold.controller.js +++ b/server/api/voiceMusicOnHold/voiceMusicOnHold.controller.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xd830=['0777','get','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','userProfileId','autoAssociation','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','transaction','forEach','unlinkSync','addSound','Sound','findOne','createdAt','server/files/sounds/converted','%s.%s','basename','save_name','extname','converted_format','server/files/moh','symlinkSync','Sequelize','removeSound','format','ValidationError','message','getSounds','nolimit','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','util','to-csv','ejs','fs-extra','lodash','squel','jsforce','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','sendStatus','status','end','json','offset','undefined','count','limit','Content-Range','apply','reject','update','then','destroy','MusicOnHolds','UserProfileResource','error','name','send','map','fieldName','key','model','query','keys','attributes','intersection','fields','hasOwnProperty','order','sort','where','filters','pick','filter','merge','type','VIRTUAL','options','VoiceMusicOnHold','includeAll','findAll','rows','catch','show','params','rawAttributes','length','include','body','find','create','sequelize','files','directory','join','root','mkdirSync'];(function(_0x1b1e6d,_0x422457){var _0x11b8eb=function(_0xac7c21){while(--_0xac7c21){_0x1b1e6d['push'](_0x1b1e6d['shift']());}};_0x11b8eb(++_0x422457);}(_0xd830,0xff));var _0x0d83=function(_0x45ea24,_0x3e0208){_0x45ea24=_0x45ea24-0x0;var _0x1d55d9=_0xd830[_0x45ea24];return _0x1d55d9;};'use strict';var emlformat=require(_0x0d83('0x0'));var rimraf=require(_0x0d83('0x1'));var zipdir=require(_0x0d83('0x2'));var jsonpatch=require(_0x0d83('0x3'));var rp=require(_0x0d83('0x4'));var moment=require(_0x0d83('0x5'));var BPromise=require(_0x0d83('0x6'));var Mustache=require(_0x0d83('0x7'));var util=require(_0x0d83('0x8'));var path=require('path');var sox=require('sox');var csv=require(_0x0d83('0x9'));var ejs=require(_0x0d83('0xa'));var fs=require('fs');var fs_extra=require(_0x0d83('0xb'));var _=require(_0x0d83('0xc'));var squel=require(_0x0d83('0xd'));var crypto=require('crypto');var jsforce=require(_0x0d83('0xe'));var deskjs=require('desk.js');var toCsv=require(_0x0d83('0x9'));var querystring=require(_0x0d83('0xf'));var Papa=require(_0x0d83('0x10'));var Redis=require(_0x0d83('0x11'));var authService=require(_0x0d83('0x12'));var qs=require(_0x0d83('0x13'));var as=require(_0x0d83('0x14'));var hardwareService=require(_0x0d83('0x15'));var logger=require('../../config/logger')('api');var utils=require(_0x0d83('0x16'));var config=require(_0x0d83('0x17'));var licenseUtil=require(_0x0d83('0x18'));var db=require(_0x0d83('0x19'))['db'];function respondWithStatusCode(_0x13056d,_0x55fa9f){_0x55fa9f=_0x55fa9f||0xcc;return function(_0x1a6fab){if(_0x1a6fab){return _0x13056d[_0x0d83('0x1a')](_0x55fa9f);}return _0x13056d[_0x0d83('0x1b')](_0x55fa9f)[_0x0d83('0x1c')]();};}function respondWithResult(_0x5d32a1,_0xce5723){_0xce5723=_0xce5723||0xc8;return function(_0x23b90c){if(_0x23b90c){return _0x5d32a1[_0x0d83('0x1b')](_0xce5723)[_0x0d83('0x1d')](_0x23b90c);}};}function respondWithFilteredResult(_0x26fe4b,_0x55889c){return function(_0x37042f){if(_0x37042f){var _0x25d13a=typeof _0x55889c[_0x0d83('0x1e')]===_0x0d83('0x1f')&&typeof _0x55889c['limit']==='undefined';var _0x580697=_0x37042f[_0x0d83('0x20')];var _0x4b4972=_0x25d13a?0x0:_0x55889c[_0x0d83('0x1e')];var _0x532c6b=_0x25d13a?_0x37042f[_0x0d83('0x20')]:_0x55889c[_0x0d83('0x1e')]+_0x55889c[_0x0d83('0x21')];var _0x45b22e;if(_0x532c6b>=_0x580697){_0x532c6b=_0x580697;_0x45b22e=0xc8;}else{_0x45b22e=0xce;}_0x26fe4b[_0x0d83('0x1b')](_0x45b22e);return _0x26fe4b['set'](_0x0d83('0x22'),_0x4b4972+'-'+_0x532c6b+'/'+_0x580697)[_0x0d83('0x1d')](_0x37042f);}return null;};}function patchUpdates(_0xf441a1){return function(_0x345a01){try{jsonpatch[_0x0d83('0x23')](_0x345a01,_0xf441a1,!![]);}catch(_0x214650){return BPromise[_0x0d83('0x24')](_0x214650);}return _0x345a01['save']();};}function saveUpdates(_0x2b373f,_0x337156){return function(_0xea1c3d){if(_0xea1c3d){return _0xea1c3d[_0x0d83('0x25')](_0x2b373f)[_0x0d83('0x26')](function(_0x161128){return _0x161128;});}return null;};}function removeEntity(_0x18b5ad,_0x1b3b22){return function(_0x20131a){if(_0x20131a){return _0x20131a[_0x0d83('0x27')]()[_0x0d83('0x26')](function(){var _0x57a7d9=_0x20131a['get']({'plain':!![]});var _0x19efff=_0x0d83('0x28');return db[_0x0d83('0x29')][_0x0d83('0x27')]({'where':{'type':_0x19efff,'resourceId':_0x57a7d9['id']}})[_0x0d83('0x26')](function(){return _0x20131a;});})[_0x0d83('0x26')](function(){_0x18b5ad[_0x0d83('0x1b')](0xcc)[_0x0d83('0x1c')]();});}};}function handleEntityNotFound(_0x5e6f0a,_0x3d0b24){return function(_0x322bf3){if(!_0x322bf3){_0x5e6f0a['sendStatus'](0x194);}return _0x322bf3;};}function handleError(_0x5550fc,_0x10fa57){_0x10fa57=_0x10fa57||0x1f4;return function(_0x3b67ab){logger[_0x0d83('0x2a')](_0x3b67ab['stack']);if(_0x3b67ab[_0x0d83('0x2b')]){delete _0x3b67ab['name'];}_0x5550fc[_0x0d83('0x1b')](_0x10fa57)[_0x0d83('0x2c')](_0x3b67ab);};}exports['index']=function(_0x4a64f5,_0x215f30){var _0x4d269a={},_0x346898={},_0x25c750={'count':0x0,'rows':[]};var _0x4de404=_[_0x0d83('0x2d')](db['VoiceMusicOnHold']['rawAttributes'],function(_0x2b35af){return{'name':_0x2b35af[_0x0d83('0x2e')],'type':_0x2b35af['type'][_0x0d83('0x2f')]};});_0x346898[_0x0d83('0x30')]=_[_0x0d83('0x2d')](_0x4de404,_0x0d83('0x2b'));_0x346898[_0x0d83('0x31')]=_[_0x0d83('0x32')](_0x4a64f5[_0x0d83('0x31')]);_0x346898['filters']=_['intersection'](_0x346898[_0x0d83('0x30')],_0x346898[_0x0d83('0x31')]);_0x4d269a[_0x0d83('0x33')]=_[_0x0d83('0x34')](_0x346898[_0x0d83('0x30')],qs[_0x0d83('0x35')](_0x4a64f5[_0x0d83('0x31')][_0x0d83('0x35')]));_0x4d269a[_0x0d83('0x33')]=_0x4d269a[_0x0d83('0x33')]['length']?_0x4d269a[_0x0d83('0x33')]:_0x346898[_0x0d83('0x30')];if(!_0x4a64f5[_0x0d83('0x31')][_0x0d83('0x36')]('nolimit')){_0x4d269a[_0x0d83('0x21')]=qs[_0x0d83('0x21')](_0x4a64f5['query']['limit']);_0x4d269a[_0x0d83('0x1e')]=qs['offset'](_0x4a64f5[_0x0d83('0x31')][_0x0d83('0x1e')]);}_0x4d269a[_0x0d83('0x37')]=qs['sort'](_0x4a64f5[_0x0d83('0x31')]['sort']);delete _0x4a64f5[_0x0d83('0x31')][_0x0d83('0x38')];_0x4d269a[_0x0d83('0x39')]=qs[_0x0d83('0x3a')](_[_0x0d83('0x3b')](_0x4a64f5[_0x0d83('0x31')],_0x346898[_0x0d83('0x3a')]),_0x4de404);if(_0x4a64f5['query'][_0x0d83('0x3c')]){_0x4d269a[_0x0d83('0x39')]=_[_0x0d83('0x3d')](_0x4d269a[_0x0d83('0x39')],{'$or':_['map'](_0x4de404,function(_0x13dd0c){if(_0x13dd0c[_0x0d83('0x3e')]!==_0x0d83('0x3f')){var _0x502686={};_0x502686[_0x13dd0c['name']]={'$like':'%'+_0x4a64f5['query']['filter']+'%'};return _0x502686;}})});}_0x4d269a=_['merge']({},_0x4d269a,_0x4a64f5[_0x0d83('0x40')]);var _0x3f1614={'where':_0x4d269a[_0x0d83('0x39')]};return db[_0x0d83('0x41')]['count'](_0x3f1614)[_0x0d83('0x26')](function(_0x15b0c4){_0x25c750[_0x0d83('0x20')]=_0x15b0c4;if(_0x4a64f5[_0x0d83('0x31')][_0x0d83('0x42')]){_0x4d269a['include']=[{'all':!![]}];}return db[_0x0d83('0x41')][_0x0d83('0x43')](_0x4d269a);})['then'](function(_0x34ce43){_0x25c750[_0x0d83('0x44')]=_0x34ce43;return _0x25c750;})[_0x0d83('0x26')](respondWithFilteredResult(_0x215f30,_0x4d269a))[_0x0d83('0x45')](handleError(_0x215f30,null));};exports[_0x0d83('0x46')]=function(_0x59cfb1,_0xfcd825){var _0x3c65cb={'raw':![],'where':{'id':_0x59cfb1[_0x0d83('0x47')]['id']}},_0x2b0f0e={};_0x2b0f0e[_0x0d83('0x30')]=_[_0x0d83('0x32')](db[_0x0d83('0x41')][_0x0d83('0x48')]);_0x2b0f0e[_0x0d83('0x31')]=_[_0x0d83('0x32')](_0x59cfb1[_0x0d83('0x31')]);_0x2b0f0e[_0x0d83('0x3a')]=_[_0x0d83('0x34')](_0x2b0f0e[_0x0d83('0x30')],_0x2b0f0e[_0x0d83('0x31')]);_0x3c65cb['attributes']=_[_0x0d83('0x34')](_0x2b0f0e[_0x0d83('0x30')],qs[_0x0d83('0x35')](_0x59cfb1[_0x0d83('0x31')][_0x0d83('0x35')]));_0x3c65cb[_0x0d83('0x33')]=_0x3c65cb[_0x0d83('0x33')][_0x0d83('0x49')]?_0x3c65cb['attributes']:_0x2b0f0e[_0x0d83('0x30')];if(_0x59cfb1['query'][_0x0d83('0x42')]){_0x3c65cb[_0x0d83('0x4a')]=[{'all':!![]}];}_0x3c65cb=_[_0x0d83('0x3d')]({},_0x3c65cb,_0x59cfb1['options']);return db['VoiceMusicOnHold']['find'](_0x3c65cb)[_0x0d83('0x26')](handleEntityNotFound(_0xfcd825,null))[_0x0d83('0x26')](respondWithResult(_0xfcd825,null))[_0x0d83('0x45')](handleError(_0xfcd825,null));};exports[_0x0d83('0x25')]=function(_0x518ad1,_0x3ba634){if(_0x518ad1[_0x0d83('0x4b')]['id']){delete _0x518ad1[_0x0d83('0x4b')]['id'];}return db[_0x0d83('0x41')][_0x0d83('0x4c')]({'where':{'id':_0x518ad1[_0x0d83('0x47')]['id']}})['then'](handleEntityNotFound(_0x3ba634,null))[_0x0d83('0x26')](saveUpdates(_0x518ad1[_0x0d83('0x4b')],null))[_0x0d83('0x26')](respondWithResult(_0x3ba634,null))[_0x0d83('0x45')](handleError(_0x3ba634,null));};exports[_0x0d83('0x4d')]=function(_0x44e35e,_0x13e22f,_0x3e8ff1){return db[_0x0d83('0x4e')]['transaction'](function(_0x3ca7ed){if(_0x44e35e[_0x0d83('0x4b')]['mode']===_0x0d83('0x4f')){_0x44e35e['body'][_0x0d83('0x50')]=path[_0x0d83('0x51')](config[_0x0d83('0x52')],'server/files/moh',_0x44e35e[_0x0d83('0x4b')][_0x0d83('0x2b')]);}return db[_0x0d83('0x41')][_0x0d83('0x4d')](_0x44e35e[_0x0d83('0x4b')],{'transaction':_0x3ca7ed})[_0x0d83('0x26')](function(_0x19825e){if(_0x44e35e[_0x0d83('0x4b')]['mode']===_0x0d83('0x4f')){fs[_0x0d83('0x53')](_0x19825e[_0x0d83('0x50')],parseInt(_0x0d83('0x54'),0x8));}var _0x1ddd1=_0x44e35e['user'][_0x0d83('0x55')]({'plain':!![]});if(!_0x1ddd1)throw new Error(_0x0d83('0x56'));if(_0x1ddd1[_0x0d83('0x57')]==='user'){var _0x4d8a4f=_0x19825e[_0x0d83('0x55')]({'plain':!![]});return db['UserProfileSection'][_0x0d83('0x4c')]({'where':{'name':_0x0d83('0x28'),'userProfileId':_0x1ddd1[_0x0d83('0x58')]},'raw':!![]})['then'](function(_0xdb8be8){if(_0xdb8be8&&_0xdb8be8[_0x0d83('0x59')]===0x0){return db[_0x0d83('0x29')][_0x0d83('0x4d')]({'name':_0x4d8a4f[_0x0d83('0x2b')],'resourceId':_0x4d8a4f['id'],'type':_0xdb8be8[_0x0d83('0x2b')],'sectionId':_0xdb8be8['id']},{})[_0x0d83('0x26')](function(){return _0x19825e;});}else{return _0x19825e;}})[_0x0d83('0x45')](function(_0x4a636a){logger[_0x0d83('0x2a')](_0x0d83('0x5a'),_0x4a636a);});}return _0x19825e;});})['then'](respondWithResult(_0x13e22f,0xc9))[_0x0d83('0x45')](handleError(_0x13e22f,null));};exports[_0x0d83('0x27')]=function(_0x5b1032,_0x4413ab,_0x482189){var _0x9bb68b;return db[_0x0d83('0x41')][_0x0d83('0x4c')]({'where':{'id':_0x5b1032['params']['id']}})[_0x0d83('0x26')](function(_0x17dae0){if(_0x17dae0){return db[_0x0d83('0x4e')][_0x0d83('0x5b')](function(_0x4cae2b){return _0x17dae0[_0x0d83('0x27')]({'transaction':_0x4cae2b,'raw':!![]})[_0x0d83('0x26')](function(_0x31297b){if(_0x31297b[_0x0d83('0x50')]){fs['readdirSync'](_0x31297b[_0x0d83('0x50')])[_0x0d83('0x5c')](function(_0x24c75f){fs[_0x0d83('0x5d')](path['join'](_0x31297b['directory'],_0x24c75f));});fs['rmdirSync'](_0x31297b[_0x0d83('0x50')]);}return _0x31297b;});})[_0x0d83('0x45')](function(_0x2c87c1){throw new db['Sequelize']['ValidationError'](_0x2c87c1['message']);});}})[_0x0d83('0x26')](handleEntityNotFound(_0x4413ab,null))[_0x0d83('0x26')](removeEntity(_0x4413ab,null))[_0x0d83('0x45')](handleError(_0x4413ab,null));};exports[_0x0d83('0x5e')]=function(_0x3fa7fa,_0x4a87af,_0x328c64){return db[_0x0d83('0x4e')][_0x0d83('0x5b')](function(_0x104213){var _0x2c05a7;return db[_0x0d83('0x41')][_0x0d83('0x4c')]({'where':{'id':_0x3fa7fa['params']['id']}})[_0x0d83('0x26')](function(_0x20cda1){if(_0x20cda1){_0x2c05a7=_0x20cda1;return _0x20cda1[_0x0d83('0x5e')](_0x3fa7fa[_0x0d83('0x4b')]['id'],{'transaction':_0x104213});}})['then'](function(_0x4ce46d){if(_0x4ce46d){return db[_0x0d83('0x5f')][_0x0d83('0x60')]({'where':{'id':_0x3fa7fa[_0x0d83('0x4b')]['id']},'attributes':['id',_0x0d83('0x2b'),'save_name','converted_format',_0x0d83('0x61')],'raw':!![]});}})[_0x0d83('0x26')](function(_0x1fbab4){if(_0x1fbab4){var _0x54d52c=path[_0x0d83('0x51')](config['root'],_0x0d83('0x62'),util['format'](_0x0d83('0x63'),path[_0x0d83('0x64')](_0x1fbab4[_0x0d83('0x65')],path[_0x0d83('0x66')](_0x1fbab4['save_name'])),_0x1fbab4[_0x0d83('0x67')]));var _0x19a30d=path['join'](config[_0x0d83('0x52')],_0x0d83('0x68'),_0x2c05a7[_0x0d83('0x2b')],util['format'](_0x0d83('0x63'),_0x1fbab4[_0x0d83('0x2b')],_0x1fbab4[_0x0d83('0x67')]));fs[_0x0d83('0x69')](_0x54d52c,_0x19a30d);return _0x1fbab4;}})[_0x0d83('0x45')](function(_0x5dfaca){throw new db[(_0x0d83('0x6a'))]['ValidationError'](_0x5dfaca['message']);});})[_0x0d83('0x26')](handleEntityNotFound(_0x4a87af,null))[_0x0d83('0x26')](respondWithResult(_0x4a87af,0xc9))[_0x0d83('0x45')](handleError(_0x4a87af,null));};exports[_0x0d83('0x6b')]=function(_0xeb06c,_0xf1addd,_0x3f8de7){return db[_0x0d83('0x4e')][_0x0d83('0x5b')](function(_0x180fa8){var _0x5199d8;return db[_0x0d83('0x41')]['findOne']({'where':{'id':_0xeb06c['params']['id']}})['then'](handleEntityNotFound(_0xf1addd,null))[_0x0d83('0x26')](function(_0x214111){if(_0x214111){_0x5199d8=_0x214111;return _0x214111[_0x0d83('0x6b')](_0xeb06c[_0x0d83('0x47')]['id2']);}})[_0x0d83('0x26')](function(_0x453187){if(_0x453187){return db[_0x0d83('0x5f')][_0x0d83('0x60')]({'where':{'id':_0xeb06c[_0x0d83('0x47')]['id2']},'attributes':['id',_0x0d83('0x2b'),_0x0d83('0x65'),_0x0d83('0x67'),_0x0d83('0x61')],'raw':!![]});}})[_0x0d83('0x26')](function(_0xbfa5f6){if(_0xbfa5f6){fs[_0x0d83('0x5d')](path[_0x0d83('0x51')](_0x5199d8[_0x0d83('0x50')],util[_0x0d83('0x6c')]('%s.%s',_0xbfa5f6['name'],_0xbfa5f6['converted_format'])));return _0xbfa5f6;}})['catch'](function(_0x5d3453){throw new db[(_0x0d83('0x6a'))][(_0x0d83('0x6d'))](_0x5d3453[_0x0d83('0x6e')]);});})['then'](handleEntityNotFound(_0xf1addd,null))[_0x0d83('0x26')](respondWithStatusCode(_0xf1addd,0xcc))[_0x0d83('0x45')](handleError(_0xf1addd,null));};exports[_0x0d83('0x6f')]=function(_0x1c2f3e,_0x21d000,_0x376860){var _0x6c4043={};var _0x4f276f={};var _0x13c95e;var _0x24d0d2;return db['VoiceMusicOnHold'][_0x0d83('0x60')]({'where':{'id':_0x1c2f3e['params']['id']}})[_0x0d83('0x26')](handleEntityNotFound(_0x21d000,null))[_0x0d83('0x26')](function(_0x508bcb){if(_0x508bcb){_0x13c95e=_0x508bcb;_0x4f276f[_0x0d83('0x30')]=_['keys'](db[_0x0d83('0x5f')][_0x0d83('0x48')]);_0x4f276f['query']=_[_0x0d83('0x32')](_0x1c2f3e[_0x0d83('0x31')]);_0x4f276f['filters']=_[_0x0d83('0x34')](_0x4f276f['model'],_0x4f276f['query']);_0x6c4043[_0x0d83('0x33')]=_[_0x0d83('0x34')](_0x4f276f[_0x0d83('0x30')],qs[_0x0d83('0x35')](_0x1c2f3e['query'][_0x0d83('0x35')]));_0x6c4043[_0x0d83('0x33')]=_0x6c4043[_0x0d83('0x33')][_0x0d83('0x49')]?_0x6c4043[_0x0d83('0x33')]:_0x4f276f[_0x0d83('0x30')];_0x6c4043['order']=qs[_0x0d83('0x38')](_0x1c2f3e[_0x0d83('0x31')][_0x0d83('0x38')]);_0x6c4043[_0x0d83('0x39')]=qs[_0x0d83('0x3a')](_[_0x0d83('0x3b')](_0x1c2f3e['query'],_0x4f276f[_0x0d83('0x3a')]));if(_0x1c2f3e[_0x0d83('0x31')][_0x0d83('0x3c')]){_0x6c4043[_0x0d83('0x39')]=_['merge'](_0x6c4043[_0x0d83('0x39')],{'$or':_['map'](_0x6c4043[_0x0d83('0x33')],function(_0x50c166){var _0x530b02={};_0x530b02[_0x50c166]={'$like':'%'+_0x1c2f3e[_0x0d83('0x31')][_0x0d83('0x3c')]+'%'};return _0x530b02;})});}_0x6c4043=_[_0x0d83('0x3d')]({},_0x6c4043,_0x1c2f3e[_0x0d83('0x40')]);return _0x13c95e[_0x0d83('0x6f')](_0x6c4043);}})['then'](function(_0x1148d3){if(_0x1148d3){_0x24d0d2=_0x1148d3['length'];if(!_0x1c2f3e[_0x0d83('0x31')][_0x0d83('0x36')](_0x0d83('0x70'))){_0x6c4043['limit']=qs['limit'](_0x1c2f3e['query']['limit']);_0x6c4043[_0x0d83('0x1e')]=qs[_0x0d83('0x1e')](_0x1c2f3e['query'][_0x0d83('0x1e')]);}return _0x13c95e[_0x0d83('0x6f')](_0x6c4043);}})['then'](function(_0x555744){if(_0x555744){return _0x555744?{'count':_0x24d0d2,'rows':_0x555744}:null;}})[_0x0d83('0x26')](respondWithResult(_0x21d000,null))['catch'](handleError(_0x21d000,null));}; \ No newline at end of file +var _0x66df=['name','index','map','VoiceMusicOnHold','rawAttributes','key','query','attributes','intersection','fields','length','nolimit','order','sort','where','pick','filter','merge','options','includeAll','include','findAll','rows','catch','show','params','keys','model','find','body','transaction','mode','join','root','server/files/moh','create','get','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','user','UserProfileSection','autoAssociation','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','sequelize','readdirSync','directory','forEach','unlinkSync','rmdirSync','ValidationError','message','addSound','Sound','findOne','save_name','createdAt','server/files/sounds/converted','format','basename','extname','%s.%s','converted_format','symlinkSync','Sequelize','removeSound','id2','getSounds','filters','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','util','sox','to-csv','ejs','fs-extra','lodash','squel','crypto','jsforce','desk.js','querystring','papaparse','ioredis','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','sendStatus','status','json','undefined','limit','count','offset','set','Content-Range','apply','reject','save','update','then','destroy','MusicOnHolds','UserProfileResource','end','error'];(function(_0x367dd8,_0xd8ff8){var _0x54b23f=function(_0xcbdfc3){while(--_0xcbdfc3){_0x367dd8['push'](_0x367dd8['shift']());}};_0x54b23f(++_0xd8ff8);}(_0x66df,0x19a));var _0xf66d=function(_0x1aba25,_0x1faed1){_0x1aba25=_0x1aba25-0x0;var _0x47d997=_0x66df[_0x1aba25];return _0x47d997;};'use strict';var emlformat=require(_0xf66d('0x0'));var rimraf=require(_0xf66d('0x1'));var zipdir=require(_0xf66d('0x2'));var jsonpatch=require(_0xf66d('0x3'));var rp=require(_0xf66d('0x4'));var moment=require('moment');var BPromise=require('bluebird');var Mustache=require('mustache');var util=require(_0xf66d('0x5'));var path=require('path');var sox=require(_0xf66d('0x6'));var csv=require(_0xf66d('0x7'));var ejs=require(_0xf66d('0x8'));var fs=require('fs');var fs_extra=require(_0xf66d('0x9'));var _=require(_0xf66d('0xa'));var squel=require(_0xf66d('0xb'));var crypto=require(_0xf66d('0xc'));var jsforce=require(_0xf66d('0xd'));var deskjs=require(_0xf66d('0xe'));var toCsv=require('to-csv');var querystring=require(_0xf66d('0xf'));var Papa=require(_0xf66d('0x10'));var Redis=require(_0xf66d('0x11'));var authService=require('../../components/auth/service');var qs=require(_0xf66d('0x12'));var as=require(_0xf66d('0x13'));var hardwareService=require(_0xf66d('0x14'));var logger=require(_0xf66d('0x15'))(_0xf66d('0x16'));var utils=require(_0xf66d('0x17'));var config=require(_0xf66d('0x18'));var licenseUtil=require(_0xf66d('0x19'));var db=require(_0xf66d('0x1a'))['db'];function respondWithStatusCode(_0x38a082,_0x1560eb){_0x1560eb=_0x1560eb||0xcc;return function(_0x5ddaeb){if(_0x5ddaeb){return _0x38a082[_0xf66d('0x1b')](_0x1560eb);}return _0x38a082[_0xf66d('0x1c')](_0x1560eb)['end']();};}function respondWithResult(_0x5bf1e4,_0x164602){_0x164602=_0x164602||0xc8;return function(_0x4fadb4){if(_0x4fadb4){return _0x5bf1e4[_0xf66d('0x1c')](_0x164602)[_0xf66d('0x1d')](_0x4fadb4);}};}function respondWithFilteredResult(_0xe8849d,_0x40125d){return function(_0x107d3e){if(_0x107d3e){var _0x4261fb=typeof _0x40125d['offset']===_0xf66d('0x1e')&&typeof _0x40125d[_0xf66d('0x1f')]===_0xf66d('0x1e');var _0x14dbfa=_0x107d3e[_0xf66d('0x20')];var _0x5cbf8c=_0x4261fb?0x0:_0x40125d['offset'];var _0x2bccee=_0x4261fb?_0x107d3e[_0xf66d('0x20')]:_0x40125d[_0xf66d('0x21')]+_0x40125d[_0xf66d('0x1f')];var _0x52162b;if(_0x2bccee>=_0x14dbfa){_0x2bccee=_0x14dbfa;_0x52162b=0xc8;}else{_0x52162b=0xce;}_0xe8849d[_0xf66d('0x1c')](_0x52162b);return _0xe8849d[_0xf66d('0x22')](_0xf66d('0x23'),_0x5cbf8c+'-'+_0x2bccee+'/'+_0x14dbfa)['json'](_0x107d3e);}return null;};}function patchUpdates(_0x497d41){return function(_0x532b35){try{jsonpatch[_0xf66d('0x24')](_0x532b35,_0x497d41,!![]);}catch(_0x18fd53){return BPromise[_0xf66d('0x25')](_0x18fd53);}return _0x532b35[_0xf66d('0x26')]();};}function saveUpdates(_0x4cf261,_0x21803c){return function(_0x188be8){if(_0x188be8){return _0x188be8[_0xf66d('0x27')](_0x4cf261)[_0xf66d('0x28')](function(_0x30e0ee){return _0x30e0ee;});}return null;};}function removeEntity(_0x4fd41a,_0x435449){return function(_0x3fc722){if(_0x3fc722){return _0x3fc722[_0xf66d('0x29')]()['then'](function(){var _0x175585=_0x3fc722['get']({'plain':!![]});var _0x47bf22=_0xf66d('0x2a');return db[_0xf66d('0x2b')][_0xf66d('0x29')]({'where':{'type':_0x47bf22,'resourceId':_0x175585['id']}})[_0xf66d('0x28')](function(){return _0x3fc722;});})['then'](function(){_0x4fd41a[_0xf66d('0x1c')](0xcc)[_0xf66d('0x2c')]();});}};}function handleEntityNotFound(_0x4ec4e3,_0x1eaa06){return function(_0x19b30a){if(!_0x19b30a){_0x4ec4e3[_0xf66d('0x1b')](0x194);}return _0x19b30a;};}function handleError(_0x50e8e9,_0x21b16f){_0x21b16f=_0x21b16f||0x1f4;return function(_0x10176c){logger[_0xf66d('0x2d')](_0x10176c['stack']);if(_0x10176c[_0xf66d('0x2e')]){delete _0x10176c[_0xf66d('0x2e')];}_0x50e8e9[_0xf66d('0x1c')](_0x21b16f)['send'](_0x10176c);};}exports[_0xf66d('0x2f')]=function(_0x375873,_0x585967){var _0x5e94df={},_0x45a430={},_0x210d10={'count':0x0,'rows':[]};var _0x53f07d=_[_0xf66d('0x30')](db[_0xf66d('0x31')][_0xf66d('0x32')],function(_0x3fb20d){return{'name':_0x3fb20d['fieldName'],'type':_0x3fb20d['type'][_0xf66d('0x33')]};});_0x45a430['model']=_[_0xf66d('0x30')](_0x53f07d,_0xf66d('0x2e'));_0x45a430[_0xf66d('0x34')]=_['keys'](_0x375873[_0xf66d('0x34')]);_0x45a430['filters']=_['intersection'](_0x45a430['model'],_0x45a430[_0xf66d('0x34')]);_0x5e94df[_0xf66d('0x35')]=_[_0xf66d('0x36')](_0x45a430['model'],qs['fields'](_0x375873[_0xf66d('0x34')][_0xf66d('0x37')]));_0x5e94df[_0xf66d('0x35')]=_0x5e94df[_0xf66d('0x35')][_0xf66d('0x38')]?_0x5e94df[_0xf66d('0x35')]:_0x45a430['model'];if(!_0x375873[_0xf66d('0x34')]['hasOwnProperty'](_0xf66d('0x39'))){_0x5e94df['limit']=qs[_0xf66d('0x1f')](_0x375873['query'][_0xf66d('0x1f')]);_0x5e94df[_0xf66d('0x21')]=qs[_0xf66d('0x21')](_0x375873[_0xf66d('0x34')][_0xf66d('0x21')]);}_0x5e94df[_0xf66d('0x3a')]=qs[_0xf66d('0x3b')](_0x375873[_0xf66d('0x34')][_0xf66d('0x3b')]);delete _0x375873[_0xf66d('0x34')][_0xf66d('0x3b')];_0x5e94df[_0xf66d('0x3c')]=qs['filters'](_[_0xf66d('0x3d')](_0x375873[_0xf66d('0x34')],_0x45a430['filters']),_0x53f07d);if(_0x375873['query']['filter']){_0x5e94df[_0xf66d('0x3c')]=_['merge'](_0x5e94df[_0xf66d('0x3c')],{'$or':_['map'](_0x53f07d,function(_0x445ef2){if(_0x445ef2['type']!=='VIRTUAL'){var _0x100f47={};_0x100f47[_0x445ef2['name']]={'$like':'%'+_0x375873['query'][_0xf66d('0x3e')]+'%'};return _0x100f47;}})});}_0x5e94df=_[_0xf66d('0x3f')]({},_0x5e94df,_0x375873[_0xf66d('0x40')]);var _0x236ae0={'where':_0x5e94df[_0xf66d('0x3c')]};return db['VoiceMusicOnHold']['count'](_0x236ae0)['then'](function(_0x99794e){_0x210d10[_0xf66d('0x20')]=_0x99794e;if(_0x375873[_0xf66d('0x34')][_0xf66d('0x41')]){_0x5e94df[_0xf66d('0x42')]=[{'all':!![]}];}return db[_0xf66d('0x31')][_0xf66d('0x43')](_0x5e94df);})['then'](function(_0x2c070c){_0x210d10[_0xf66d('0x44')]=_0x2c070c;return _0x210d10;})[_0xf66d('0x28')](respondWithFilteredResult(_0x585967,_0x5e94df))[_0xf66d('0x45')](handleError(_0x585967,null));};exports[_0xf66d('0x46')]=function(_0x22717a,_0x40733b){var _0x589b28={'raw':![],'where':{'id':_0x22717a[_0xf66d('0x47')]['id']}},_0x4911b9={};_0x4911b9['model']=_['keys'](db[_0xf66d('0x31')]['rawAttributes']);_0x4911b9['query']=_[_0xf66d('0x48')](_0x22717a['query']);_0x4911b9['filters']=_[_0xf66d('0x36')](_0x4911b9[_0xf66d('0x49')],_0x4911b9[_0xf66d('0x34')]);_0x589b28['attributes']=_['intersection'](_0x4911b9[_0xf66d('0x49')],qs[_0xf66d('0x37')](_0x22717a[_0xf66d('0x34')]['fields']));_0x589b28[_0xf66d('0x35')]=_0x589b28[_0xf66d('0x35')]['length']?_0x589b28[_0xf66d('0x35')]:_0x4911b9['model'];if(_0x22717a[_0xf66d('0x34')][_0xf66d('0x41')]){_0x589b28[_0xf66d('0x42')]=[{'all':!![]}];}_0x589b28=_[_0xf66d('0x3f')]({},_0x589b28,_0x22717a[_0xf66d('0x40')]);return db[_0xf66d('0x31')][_0xf66d('0x4a')](_0x589b28)[_0xf66d('0x28')](handleEntityNotFound(_0x40733b,null))[_0xf66d('0x28')](respondWithResult(_0x40733b,null))[_0xf66d('0x45')](handleError(_0x40733b,null));};exports['update']=function(_0x2a8e58,_0x5b182c){if(_0x2a8e58[_0xf66d('0x4b')]['id']){delete _0x2a8e58['body']['id'];}return db[_0xf66d('0x31')][_0xf66d('0x4a')]({'where':{'id':_0x2a8e58[_0xf66d('0x47')]['id']}})[_0xf66d('0x28')](handleEntityNotFound(_0x5b182c,null))[_0xf66d('0x28')](saveUpdates(_0x2a8e58[_0xf66d('0x4b')],null))[_0xf66d('0x28')](respondWithResult(_0x5b182c,null))[_0xf66d('0x45')](handleError(_0x5b182c,null));};exports['create']=function(_0x4401a7,_0x7ead02,_0x4a7fc6){return db['sequelize'][_0xf66d('0x4c')](function(_0x103239){if(_0x4401a7[_0xf66d('0x4b')][_0xf66d('0x4d')]==='files'){_0x4401a7[_0xf66d('0x4b')]['directory']=path[_0xf66d('0x4e')](config[_0xf66d('0x4f')],_0xf66d('0x50'),_0x4401a7[_0xf66d('0x4b')][_0xf66d('0x2e')]);}return db[_0xf66d('0x31')][_0xf66d('0x51')](_0x4401a7[_0xf66d('0x4b')],{'transaction':_0x103239})[_0xf66d('0x28')](function(_0x1c7d2f){if(_0x4401a7[_0xf66d('0x4b')][_0xf66d('0x4d')]==='files'){fs['mkdirSync'](_0x1c7d2f['directory'],parseInt('0777',0x8));}var _0x2b1547=_0x4401a7['user'][_0xf66d('0x52')]({'plain':!![]});if(!_0x2b1547)throw new Error(_0xf66d('0x53'));if(_0x2b1547[_0xf66d('0x54')]===_0xf66d('0x55')){var _0x53e3f9=_0x1c7d2f[_0xf66d('0x52')]({'plain':!![]});return db[_0xf66d('0x56')]['find']({'where':{'name':_0xf66d('0x2a'),'userProfileId':_0x2b1547['userProfileId']},'raw':!![]})[_0xf66d('0x28')](function(_0x34738a){if(_0x34738a&&_0x34738a[_0xf66d('0x57')]===0x0){return db[_0xf66d('0x2b')][_0xf66d('0x51')]({'name':_0x53e3f9[_0xf66d('0x2e')],'resourceId':_0x53e3f9['id'],'type':_0x34738a[_0xf66d('0x2e')],'sectionId':_0x34738a['id']},{})[_0xf66d('0x28')](function(){return _0x1c7d2f;});}else{return _0x1c7d2f;}})[_0xf66d('0x45')](function(_0x3d2a0a){logger[_0xf66d('0x2d')](_0xf66d('0x58'),_0x3d2a0a);});}return _0x1c7d2f;});})['then'](respondWithResult(_0x7ead02,0xc9))[_0xf66d('0x45')](handleError(_0x7ead02,null));};exports['destroy']=function(_0x52c4e5,_0x21618d,_0x54ccae){var _0x2aa740;return db[_0xf66d('0x31')][_0xf66d('0x4a')]({'where':{'id':_0x52c4e5[_0xf66d('0x47')]['id']}})[_0xf66d('0x28')](function(_0x4ce8ea){if(_0x4ce8ea){return db[_0xf66d('0x59')][_0xf66d('0x4c')](function(_0x54eb6d){return _0x4ce8ea['destroy']({'transaction':_0x54eb6d,'raw':!![]})['then'](function(_0x504f3c){if(_0x504f3c['directory']){fs[_0xf66d('0x5a')](_0x504f3c[_0xf66d('0x5b')])[_0xf66d('0x5c')](function(_0x5d595a){fs[_0xf66d('0x5d')](path[_0xf66d('0x4e')](_0x504f3c[_0xf66d('0x5b')],_0x5d595a));});fs[_0xf66d('0x5e')](_0x504f3c[_0xf66d('0x5b')]);}return _0x504f3c;});})['catch'](function(_0x4cf1fc){throw new db['Sequelize'][(_0xf66d('0x5f'))](_0x4cf1fc[_0xf66d('0x60')]);});}})[_0xf66d('0x28')](handleEntityNotFound(_0x21618d,null))[_0xf66d('0x28')](removeEntity(_0x21618d,null))[_0xf66d('0x45')](handleError(_0x21618d,null));};exports['addSound']=function(_0x322989,_0x422b8a,_0x2fb913){return db[_0xf66d('0x59')][_0xf66d('0x4c')](function(_0x4be033){var _0x4d5ce1;return db[_0xf66d('0x31')][_0xf66d('0x4a')]({'where':{'id':_0x322989['params']['id']}})[_0xf66d('0x28')](function(_0x2bdc89){if(_0x2bdc89){_0x4d5ce1=_0x2bdc89;return _0x2bdc89[_0xf66d('0x61')](_0x322989['body']['id'],{'transaction':_0x4be033});}})[_0xf66d('0x28')](function(_0x37ac44){if(_0x37ac44){return db[_0xf66d('0x62')][_0xf66d('0x63')]({'where':{'id':_0x322989[_0xf66d('0x4b')]['id']},'attributes':['id',_0xf66d('0x2e'),_0xf66d('0x64'),'converted_format',_0xf66d('0x65')],'raw':!![]});}})[_0xf66d('0x28')](function(_0x1201b7){if(_0x1201b7){var _0x4b1197=path[_0xf66d('0x4e')](config[_0xf66d('0x4f')],_0xf66d('0x66'),util[_0xf66d('0x67')]('%s.%s',path[_0xf66d('0x68')](_0x1201b7['save_name'],path[_0xf66d('0x69')](_0x1201b7['save_name'])),_0x1201b7['converted_format']));var _0x35668b=path[_0xf66d('0x4e')](config[_0xf66d('0x4f')],_0xf66d('0x50'),_0x4d5ce1['name'],util[_0xf66d('0x67')](_0xf66d('0x6a'),_0x1201b7['name'],_0x1201b7[_0xf66d('0x6b')]));fs[_0xf66d('0x6c')](_0x4b1197,_0x35668b);return _0x1201b7;}})['catch'](function(_0x72c4ff){throw new db[(_0xf66d('0x6d'))]['ValidationError'](_0x72c4ff[_0xf66d('0x60')]);});})['then'](handleEntityNotFound(_0x422b8a,null))[_0xf66d('0x28')](respondWithResult(_0x422b8a,0xc9))[_0xf66d('0x45')](handleError(_0x422b8a,null));};exports[_0xf66d('0x6e')]=function(_0x4cfaa9,_0x331309,_0x2c90f8){return db[_0xf66d('0x59')][_0xf66d('0x4c')](function(_0x4756fa){var _0x18f8b6;return db['VoiceMusicOnHold']['findOne']({'where':{'id':_0x4cfaa9[_0xf66d('0x47')]['id']}})[_0xf66d('0x28')](handleEntityNotFound(_0x331309,null))['then'](function(_0x395947){if(_0x395947){_0x18f8b6=_0x395947;return _0x395947[_0xf66d('0x6e')](_0x4cfaa9[_0xf66d('0x47')][_0xf66d('0x6f')]);}})['then'](function(_0x1136d9){if(_0x1136d9){return db[_0xf66d('0x62')][_0xf66d('0x63')]({'where':{'id':_0x4cfaa9['params']['id2']},'attributes':['id','name',_0xf66d('0x64'),_0xf66d('0x6b'),_0xf66d('0x65')],'raw':!![]});}})[_0xf66d('0x28')](function(_0x28c7da){if(_0x28c7da){fs[_0xf66d('0x5d')](path['join'](_0x18f8b6[_0xf66d('0x5b')],util[_0xf66d('0x67')](_0xf66d('0x6a'),_0x28c7da[_0xf66d('0x2e')],_0x28c7da['converted_format'])));return _0x28c7da;}})[_0xf66d('0x45')](function(_0x1c0838){throw new db['Sequelize']['ValidationError'](_0x1c0838[_0xf66d('0x60')]);});})[_0xf66d('0x28')](handleEntityNotFound(_0x331309,null))[_0xf66d('0x28')](respondWithStatusCode(_0x331309,0xcc))[_0xf66d('0x45')](handleError(_0x331309,null));};exports[_0xf66d('0x70')]=function(_0x293692,_0x9fd86b,_0x4242cb){var _0x37936b={};var _0x32d0b2={};var _0x846f6c;var _0x3f76c4;return db[_0xf66d('0x31')][_0xf66d('0x63')]({'where':{'id':_0x293692['params']['id']}})[_0xf66d('0x28')](handleEntityNotFound(_0x9fd86b,null))[_0xf66d('0x28')](function(_0x36fb47){if(_0x36fb47){_0x846f6c=_0x36fb47;_0x32d0b2['model']=_[_0xf66d('0x48')](db['Sound'][_0xf66d('0x32')]);_0x32d0b2[_0xf66d('0x34')]=_[_0xf66d('0x48')](_0x293692['query']);_0x32d0b2['filters']=_[_0xf66d('0x36')](_0x32d0b2[_0xf66d('0x49')],_0x32d0b2[_0xf66d('0x34')]);_0x37936b[_0xf66d('0x35')]=_['intersection'](_0x32d0b2[_0xf66d('0x49')],qs[_0xf66d('0x37')](_0x293692[_0xf66d('0x34')]['fields']));_0x37936b['attributes']=_0x37936b['attributes'][_0xf66d('0x38')]?_0x37936b[_0xf66d('0x35')]:_0x32d0b2[_0xf66d('0x49')];_0x37936b['order']=qs[_0xf66d('0x3b')](_0x293692[_0xf66d('0x34')][_0xf66d('0x3b')]);_0x37936b[_0xf66d('0x3c')]=qs[_0xf66d('0x71')](_[_0xf66d('0x3d')](_0x293692[_0xf66d('0x34')],_0x32d0b2[_0xf66d('0x71')]));if(_0x293692[_0xf66d('0x34')][_0xf66d('0x3e')]){_0x37936b[_0xf66d('0x3c')]=_['merge'](_0x37936b[_0xf66d('0x3c')],{'$or':_[_0xf66d('0x30')](_0x37936b[_0xf66d('0x35')],function(_0x575585){var _0x419d75={};_0x419d75[_0x575585]={'$like':'%'+_0x293692['query'][_0xf66d('0x3e')]+'%'};return _0x419d75;})});}_0x37936b=_['merge']({},_0x37936b,_0x293692[_0xf66d('0x40')]);return _0x846f6c[_0xf66d('0x70')](_0x37936b);}})['then'](function(_0xebb87){if(_0xebb87){_0x3f76c4=_0xebb87[_0xf66d('0x38')];if(!_0x293692[_0xf66d('0x34')]['hasOwnProperty'](_0xf66d('0x39'))){_0x37936b[_0xf66d('0x1f')]=qs[_0xf66d('0x1f')](_0x293692[_0xf66d('0x34')]['limit']);_0x37936b[_0xf66d('0x21')]=qs['offset'](_0x293692['query'][_0xf66d('0x21')]);}return _0x846f6c[_0xf66d('0x70')](_0x37936b);}})[_0xf66d('0x28')](function(_0xeec090){if(_0xeec090){return _0xeec090?{'count':_0x3f76c4,'rows':_0xeec090}:null;}})[_0xf66d('0x28')](respondWithResult(_0x9fd86b,null))[_0xf66d('0x45')](handleError(_0x9fd86b,null));}; \ No newline at end of file diff --git a/server/api/voiceMusicOnHold/voiceMusicOnHold.model.js b/server/api/voiceMusicOnHold/voiceMusicOnHold.model.js index db24095..1c23531 100644 --- a/server/api/voiceMusicOnHold/voiceMusicOnHold.model.js +++ b/server/api/voiceMusicOnHold/voiceMusicOnHold.model.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x5b93=['define','VoiceMusicOnHold','../../config/logger','moment','path','rimraf','../../config/environment','./voiceMusicOnHold.attributes'];(function(_0x3bff2b,_0x5f20ec){var _0x3a6857=function(_0x25337c){while(--_0x25337c){_0x3bff2b['push'](_0x3bff2b['shift']());}};_0x3a6857(++_0x5f20ec);}(_0x5b93,0x152));var _0x35b9=function(_0x16c760,_0x4ab963){_0x16c760=_0x16c760-0x0;var _0x49eb66=_0x5b93[_0x16c760];return _0x49eb66;};'use strict';var _=require('lodash');var util=require('util');var logger=require(_0x35b9('0x0'))('api');var moment=require(_0x35b9('0x1'));var BPromise=require('bluebird');var rp=require('request-promise');var fs=require('fs');var path=require(_0x35b9('0x2'));var rimraf=require(_0x35b9('0x3'));var config=require(_0x35b9('0x4'));var attributes=require(_0x35b9('0x5'));module['exports']=function(_0xf1a7f4,_0x1c4250){return _0xf1a7f4[_0x35b9('0x6')](_0x35b9('0x7'),attributes,{'tableName':'voice_musiconhold','paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file +var _0x594a=['./voiceMusicOnHold.attributes','exports','define','VoiceMusicOnHold','voice_musiconhold','util','../../config/logger','api','moment','bluebird','path','rimraf','../../config/environment'];(function(_0x549720,_0x488410){var _0x3c1a6a=function(_0x372036){while(--_0x372036){_0x549720['push'](_0x549720['shift']());}};_0x3c1a6a(++_0x488410);}(_0x594a,0x1a5));var _0xa594=function(_0x5b43f6,_0x411397){_0x5b43f6=_0x5b43f6-0x0;var _0x4372b9=_0x594a[_0x5b43f6];return _0x4372b9;};'use strict';var _=require('lodash');var util=require(_0xa594('0x0'));var logger=require(_0xa594('0x1'))(_0xa594('0x2'));var moment=require(_0xa594('0x3'));var BPromise=require(_0xa594('0x4'));var rp=require('request-promise');var fs=require('fs');var path=require(_0xa594('0x5'));var rimraf=require(_0xa594('0x6'));var config=require(_0xa594('0x7'));var attributes=require(_0xa594('0x8'));module[_0xa594('0x9')]=function(_0x5843a1,_0x17c968){return _0x5843a1[_0xa594('0xa')](_0xa594('0xb'),attributes,{'tableName':_0xa594('0xc'),'paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file diff --git a/server/api/voiceMusicOnHold/voiceMusicOnHold.rpc.js b/server/api/voiceMusicOnHold/voiceMusicOnHold.rpc.js index c6ff485..816c657 100644 --- a/server/api/voiceMusicOnHold/voiceMusicOnHold.rpc.js +++ b/server/api/voiceMusicOnHold/voiceMusicOnHold.rpc.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xa9e0=['http','info','VoiceMusicOnHold,\x20%s,\x20%s','request\x20sent','debug','VoiceMusicOnHold,\x20%s,\x20%s,\x20%s','code','error','message','result','catch','lodash','util','moment','ioredis','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise'];(function(_0x3faaa,_0x266855){var _0x264400=function(_0x29d275){while(--_0x29d275){_0x3faaa['push'](_0x3faaa['shift']());}};_0x264400(++_0x266855);}(_0xa9e0,0x123));var _0x0a9e=function(_0x3054be,_0x1bdc8b){_0x3054be=_0x3054be-0x0;var _0x3df150=_0xa9e0[_0x3054be];return _0x3df150;};'use strict';var _=require(_0x0a9e('0x0'));var util=require(_0x0a9e('0x1'));var moment=require(_0x0a9e('0x2'));var BPromise=require('bluebird');var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x0a9e('0x3'));var db=require('../../mysqldb')['db'];var utils=require(_0x0a9e('0x4'));var logger=require(_0x0a9e('0x5'))(_0x0a9e('0x6'));var config=require(_0x0a9e('0x7'));var jayson=require(_0x0a9e('0x8'));var client=jayson['client'][_0x0a9e('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x441e3a,_0x2cc193,_0x5f41ea){return new BPromise(function(_0x503809,_0xe42b77){return client['request'](_0x441e3a,_0x5f41ea)['then'](function(_0x39753a){logger[_0x0a9e('0xa')](_0x0a9e('0xb'),_0x2cc193,_0x0a9e('0xc'));logger[_0x0a9e('0xd')](_0x0a9e('0xe'),_0x2cc193,'request\x20sent',JSON['stringify'](_0x39753a));if(_0x39753a['error']){if(_0x39753a['error'][_0x0a9e('0xf')]===0x1f4){logger[_0x0a9e('0x10')](_0x0a9e('0xb'),_0x2cc193,_0x39753a[_0x0a9e('0x10')][_0x0a9e('0x11')]);return _0xe42b77(_0x39753a[_0x0a9e('0x10')]['message']);}logger[_0x0a9e('0x10')](_0x0a9e('0xb'),_0x2cc193,_0x39753a[_0x0a9e('0x10')][_0x0a9e('0x11')]);return _0x503809(_0x39753a[_0x0a9e('0x10')][_0x0a9e('0x11')]);}else{logger['info'](_0x0a9e('0xb'),_0x2cc193,'request\x20sent');_0x503809(_0x39753a[_0x0a9e('0x12')]['message']);}})[_0x0a9e('0x13')](function(_0x12066b){logger['error'](_0x0a9e('0xb'),_0x2cc193,_0x12066b);_0xe42b77(_0x12066b);});});} \ No newline at end of file +var _0xa9e0=['http','info','VoiceMusicOnHold,\x20%s,\x20%s','request\x20sent','debug','VoiceMusicOnHold,\x20%s,\x20%s,\x20%s','code','error','message','result','catch','lodash','util','moment','ioredis','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise'];(function(_0x557799,_0x38c8c5){var _0x3e550a=function(_0x22e033){while(--_0x22e033){_0x557799['push'](_0x557799['shift']());}};_0x3e550a(++_0x38c8c5);}(_0xa9e0,0x123));var _0x0a9e=function(_0x501510,_0x61caa9){_0x501510=_0x501510-0x0;var _0x1e6ee5=_0xa9e0[_0x501510];return _0x1e6ee5;};'use strict';var _=require(_0x0a9e('0x0'));var util=require(_0x0a9e('0x1'));var moment=require(_0x0a9e('0x2'));var BPromise=require('bluebird');var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x0a9e('0x3'));var db=require('../../mysqldb')['db'];var utils=require(_0x0a9e('0x4'));var logger=require(_0x0a9e('0x5'))(_0x0a9e('0x6'));var config=require(_0x0a9e('0x7'));var jayson=require(_0x0a9e('0x8'));var client=jayson['client'][_0x0a9e('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x441e3a,_0x2cc193,_0x5f41ea){return new BPromise(function(_0x503809,_0xe42b77){return client['request'](_0x441e3a,_0x5f41ea)['then'](function(_0x39753a){logger[_0x0a9e('0xa')](_0x0a9e('0xb'),_0x2cc193,_0x0a9e('0xc'));logger[_0x0a9e('0xd')](_0x0a9e('0xe'),_0x2cc193,'request\x20sent',JSON['stringify'](_0x39753a));if(_0x39753a['error']){if(_0x39753a['error'][_0x0a9e('0xf')]===0x1f4){logger[_0x0a9e('0x10')](_0x0a9e('0xb'),_0x2cc193,_0x39753a[_0x0a9e('0x10')][_0x0a9e('0x11')]);return _0xe42b77(_0x39753a[_0x0a9e('0x10')]['message']);}logger[_0x0a9e('0x10')](_0x0a9e('0xb'),_0x2cc193,_0x39753a[_0x0a9e('0x10')][_0x0a9e('0x11')]);return _0x503809(_0x39753a[_0x0a9e('0x10')][_0x0a9e('0x11')]);}else{logger['info'](_0x0a9e('0xb'),_0x2cc193,'request\x20sent');_0x503809(_0x39753a[_0x0a9e('0x12')]['message']);}})[_0x0a9e('0x13')](function(_0x12066b){logger['error'](_0x0a9e('0xb'),_0x2cc193,_0x12066b);_0xe42b77(_0x12066b);});});} \ No newline at end of file diff --git a/server/api/voicePrefix/index.js b/server/api/voicePrefix/index.js index 8c3299a..ec5ea1c 100644 --- a/server/api/voicePrefix/index.js +++ b/server/api/voicePrefix/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x34e8=['../../config/environment','./voicePrefix.controller','get','index','/describe','isAuthenticated','describe','/:id','show','/:id/users','getAgents','/:id/teams','getTeams','post','addAgents','put','update','delete','removeTeams','exports','multer','util','path','connect-timeout','Router','fs-extra','../../components/auth/service','../../components/interaction/service'];(function(_0x58d8d4,_0x19129e){var _0xf1f1d9=function(_0x57b92b){while(--_0x57b92b){_0x58d8d4['push'](_0x58d8d4['shift']());}};_0xf1f1d9(++_0x19129e);}(_0x34e8,0x12c));var _0x834e=function(_0x3f8ffd,_0x25f238){_0x3f8ffd=_0x3f8ffd-0x0;var _0x47cd98=_0x34e8[_0x3f8ffd];return _0x47cd98;};'use strict';var multer=require(_0x834e('0x0'));var util=require(_0x834e('0x1'));var path=require(_0x834e('0x2'));var timeout=require(_0x834e('0x3'));var express=require('express');var router=express[_0x834e('0x4')]();var fs_extra=require(_0x834e('0x5'));var auth=require(_0x834e('0x6'));var interaction=require(_0x834e('0x7'));var config=require(_0x834e('0x8'));var controller=require(_0x834e('0x9'));router[_0x834e('0xa')]('/',auth['isAuthenticated'](),controller[_0x834e('0xb')]);router['get'](_0x834e('0xc'),auth[_0x834e('0xd')](),controller[_0x834e('0xe')]);router[_0x834e('0xa')](_0x834e('0xf'),auth[_0x834e('0xd')](),controller[_0x834e('0x10')]);router[_0x834e('0xa')](_0x834e('0x11'),auth[_0x834e('0xd')](),controller[_0x834e('0x12')]);router[_0x834e('0xa')](_0x834e('0x13'),auth[_0x834e('0xd')](),controller[_0x834e('0x14')]);router[_0x834e('0x15')]('/',auth[_0x834e('0xd')](),controller['create']);router[_0x834e('0x15')](_0x834e('0x11'),auth['isAuthenticated'](),controller[_0x834e('0x16')]);router[_0x834e('0x15')](_0x834e('0x13'),auth[_0x834e('0xd')](),controller['addTeams']);router[_0x834e('0x17')](_0x834e('0xf'),auth['isAuthenticated'](),controller[_0x834e('0x18')]);router['delete'](_0x834e('0xf'),auth[_0x834e('0xd')](),controller['destroy']);router[_0x834e('0x19')](_0x834e('0x11'),auth[_0x834e('0xd')](),controller['removeAgents']);router[_0x834e('0x19')](_0x834e('0x13'),auth[_0x834e('0xd')](),controller[_0x834e('0x1a')]);module[_0x834e('0x1b')]=router; \ No newline at end of file +var _0x7edb=['get','isAuthenticated','index','/describe','describe','/:id','show','/:id/users','getAgents','/:id/teams','getTeams','post','create','addAgents','addTeams','put','update','delete','destroy','exports','util','path','connect-timeout','express','Router','../../components/auth/service','./voicePrefix.controller'];(function(_0x561def,_0x40e0e2){var _0x44d233=function(_0x2fe034){while(--_0x2fe034){_0x561def['push'](_0x561def['shift']());}};_0x44d233(++_0x40e0e2);}(_0x7edb,0x158));var _0xb7ed=function(_0x2715d8,_0x1e4b9d){_0x2715d8=_0x2715d8-0x0;var _0x5e2401=_0x7edb[_0x2715d8];return _0x5e2401;};'use strict';var multer=require('multer');var util=require(_0xb7ed('0x0'));var path=require(_0xb7ed('0x1'));var timeout=require(_0xb7ed('0x2'));var express=require(_0xb7ed('0x3'));var router=express[_0xb7ed('0x4')]();var fs_extra=require('fs-extra');var auth=require(_0xb7ed('0x5'));var interaction=require('../../components/interaction/service');var config=require('../../config/environment');var controller=require(_0xb7ed('0x6'));router[_0xb7ed('0x7')]('/',auth[_0xb7ed('0x8')](),controller[_0xb7ed('0x9')]);router[_0xb7ed('0x7')](_0xb7ed('0xa'),auth[_0xb7ed('0x8')](),controller[_0xb7ed('0xb')]);router[_0xb7ed('0x7')](_0xb7ed('0xc'),auth['isAuthenticated'](),controller[_0xb7ed('0xd')]);router[_0xb7ed('0x7')](_0xb7ed('0xe'),auth[_0xb7ed('0x8')](),controller[_0xb7ed('0xf')]);router[_0xb7ed('0x7')](_0xb7ed('0x10'),auth['isAuthenticated'](),controller[_0xb7ed('0x11')]);router[_0xb7ed('0x12')]('/',auth[_0xb7ed('0x8')](),controller[_0xb7ed('0x13')]);router[_0xb7ed('0x12')]('/:id/users',auth['isAuthenticated'](),controller[_0xb7ed('0x14')]);router['post'](_0xb7ed('0x10'),auth[_0xb7ed('0x8')](),controller[_0xb7ed('0x15')]);router[_0xb7ed('0x16')](_0xb7ed('0xc'),auth[_0xb7ed('0x8')](),controller[_0xb7ed('0x17')]);router[_0xb7ed('0x18')](_0xb7ed('0xc'),auth[_0xb7ed('0x8')](),controller[_0xb7ed('0x19')]);router[_0xb7ed('0x18')]('/:id/users',auth[_0xb7ed('0x8')](),controller['removeAgents']);router[_0xb7ed('0x18')](_0xb7ed('0x10'),auth['isAuthenticated'](),controller['removeTeams']);module[_0xb7ed('0x1a')]=router; \ No newline at end of file diff --git a/server/api/voicePrefix/voicePrefix.attributes.js b/server/api/voicePrefix/voicePrefix.attributes.js index 4ce3867..a5bbf6f 100644 --- a/server/api/voicePrefix/voicePrefix.attributes.js +++ b/server/api/voicePrefix/voicePrefix.attributes.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x08a2=['system-','name','STRING','sequelize','exports','VIRTUAL'];(function(_0x5b36e5,_0x3e3d2c){var _0x2c049f=function(_0x134b7c){while(--_0x134b7c){_0x5b36e5['push'](_0x5b36e5['shift']());}};_0x2c049f(++_0x3e3d2c);}(_0x08a2,0x105));var _0x208a=function(_0x14add3,_0x13ce8d){_0x14add3=_0x14add3-0x0;var _0x4a174f=_0x08a2[_0x14add3];return _0x4a174f;};'use strict';var Sequelize=require(_0x208a('0x0'));module[_0x208a('0x1')]={'name':{'type':Sequelize['STRING'],'allowNull':![],'unique':'name'},'prefix':{'type':Sequelize[_0x208a('0x2')],'get':function(_0x275057){return _0x208a('0x3')+this['getDataValue'](_0x208a('0x4'))+'-';}},'description':{'type':Sequelize[_0x208a('0x5')]},'callerIdAll':{'type':Sequelize[_0x208a('0x5')]},'VoiceExtensionId':{'type':Sequelize['INTEGER']}}; \ No newline at end of file +var _0xc4b1=['VIRTUAL','system-','getDataValue','STRING','sequelize','name'];(function(_0x47eee6,_0x2ac644){var _0x50048f=function(_0x42e9f5){while(--_0x42e9f5){_0x47eee6['push'](_0x47eee6['shift']());}};_0x50048f(++_0x2ac644);}(_0xc4b1,0xb2));var _0x1c4b=function(_0x243b2f,_0x30aa15){_0x243b2f=_0x243b2f-0x0;var _0xcb3c2d=_0xc4b1[_0x243b2f];return _0xcb3c2d;};'use strict';var Sequelize=require(_0x1c4b('0x0'));module['exports']={'name':{'type':Sequelize['STRING'],'allowNull':![],'unique':_0x1c4b('0x1')},'prefix':{'type':Sequelize[_0x1c4b('0x2')],'get':function(_0x5ea960){return _0x1c4b('0x3')+this[_0x1c4b('0x4')](_0x1c4b('0x1'))+'-';}},'description':{'type':Sequelize[_0x1c4b('0x5')]},'callerIdAll':{'type':Sequelize[_0x1c4b('0x5')]},'VoiceExtensionId':{'type':Sequelize['INTEGER']}}; \ No newline at end of file diff --git a/server/api/voicePrefix/voicePrefix.controller.js b/server/api/voicePrefix/voicePrefix.controller.js index dc077ce..57c5f0b 100644 --- a/server/api/voicePrefix/voicePrefix.controller.js +++ b/server/api/voicePrefix/voicePrefix.controller.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x5f2f=['VoicePrefixes','UserProfileResource','error','stack','name','send','map','VoicePrefix','rawAttributes','type','key','model','query','keys','filters','intersection','fields','attributes','length','nolimit','sort','where','pick','filter','VIRTUAL','merge','options','includeAll','include','findAll','rows','catch','show','params','find','describe','create','transaction','body','get','VoiceExtension','user','role','userProfileId','autoAssociation','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','from-sip','app','system','description','Voice\x20Prefix\x20Extension','appdata','Voice\x20Prefix','VoiceExtensionId','VoicePrefixId','Extensions\x20creation\x20failed','push','Set','CDR(prefix)=','callerIdAll','PREFIX-CALLERIDALL=','NoOp','No\x20callerid\x20available','goto','context','charAt','prefix','system-','sequelize','findById','addAgents','ids','omit','spread','emit','removeAgents','isArray','userVoicePrefix:remove','getAgents','order','hasOwnProperty','getTeams','findOne','Team','addTeams','User','Agents','online','voicePause','flatMap','each','TeamVoicePrefix','UserVoicePrefix','findOrCreate','forEach','userVoicePrefix:save','select','tq.TeamId','from','team_has_voice_prefixes','join','user_has_teams','ut.TeamId\x20=\x20tq.TeamId','VoicePrefixId\x20=\x20?','clone','ut.UserId\x20=\x20?','toString','QueryTypes','SELECT','every','TeamId','all','union','compact','value','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','sox','to-csv','ejs','fs-extra','lodash','squel','jsforce','desk.js','papaparse','ioredis','../../components/auth/service','../../components/parsers/advancedSearch','api','../../config/utils','../../config/license/util','../../mysqldb','redis','defaults','localhost','./voicePrefix.socket','register','sendStatus','status','end','json','offset','undefined','limit','set','Content-Range','apply','reject','save','update','then','destroy'];(function(_0x2bbc07,_0x1e2168){var _0x6879e4=function(_0x290fa1){while(--_0x290fa1){_0x2bbc07['push'](_0x2bbc07['shift']());}};_0x6879e4(++_0x1e2168);}(_0x5f2f,0x73));var _0xf5f2=function(_0x5a7634,_0x48b67c){_0x5a7634=_0x5a7634-0x0;var _0x293a8a=_0x5f2f[_0x5a7634];return _0x293a8a;};'use strict';var emlformat=require(_0xf5f2('0x0'));var rimraf=require(_0xf5f2('0x1'));var zipdir=require(_0xf5f2('0x2'));var jsonpatch=require(_0xf5f2('0x3'));var rp=require(_0xf5f2('0x4'));var moment=require(_0xf5f2('0x5'));var BPromise=require(_0xf5f2('0x6'));var Mustache=require(_0xf5f2('0x7'));var util=require('util');var path=require('path');var sox=require(_0xf5f2('0x8'));var csv=require(_0xf5f2('0x9'));var ejs=require(_0xf5f2('0xa'));var fs=require('fs');var fs_extra=require(_0xf5f2('0xb'));var _=require(_0xf5f2('0xc'));var squel=require(_0xf5f2('0xd'));var crypto=require('crypto');var jsforce=require(_0xf5f2('0xe'));var deskjs=require(_0xf5f2('0xf'));var toCsv=require(_0xf5f2('0x9'));var querystring=require('querystring');var Papa=require(_0xf5f2('0x10'));var Redis=require(_0xf5f2('0x11'));var authService=require(_0xf5f2('0x12'));var qs=require('../../components/parsers/qs');var as=require(_0xf5f2('0x13'));var hardwareService=require('../../config/license/hardware');var logger=require('../../config/logger')(_0xf5f2('0x14'));var utils=require(_0xf5f2('0x15'));var config=require('../../config/environment');var licenseUtil=require(_0xf5f2('0x16'));var db=require(_0xf5f2('0x17'))['db'];config[_0xf5f2('0x18')]=_[_0xf5f2('0x19')](config[_0xf5f2('0x18')],{'host':_0xf5f2('0x1a'),'port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config[_0xf5f2('0x18')]));require(_0xf5f2('0x1b'))[_0xf5f2('0x1c')](socket);function respondWithStatusCode(_0x1c1a5c,_0x422b55){_0x422b55=_0x422b55||0xcc;return function(_0x4d97fc){if(_0x4d97fc){return _0x1c1a5c[_0xf5f2('0x1d')](_0x422b55);}return _0x1c1a5c[_0xf5f2('0x1e')](_0x422b55)[_0xf5f2('0x1f')]();};}function respondWithResult(_0x1b6dd2,_0x23e23a){_0x23e23a=_0x23e23a||0xc8;return function(_0x3a9dbb){if(_0x3a9dbb){return _0x1b6dd2[_0xf5f2('0x1e')](_0x23e23a)[_0xf5f2('0x20')](_0x3a9dbb);}};}function respondWithFilteredResult(_0x11f702,_0x228ace){return function(_0x20fccd){if(_0x20fccd){var _0x28e097=typeof _0x228ace[_0xf5f2('0x21')]===_0xf5f2('0x22')&&typeof _0x228ace[_0xf5f2('0x23')]===_0xf5f2('0x22');var _0x1bf655=_0x20fccd['count'];var _0x34706d=_0x28e097?0x0:_0x228ace[_0xf5f2('0x21')];var _0x49dac2=_0x28e097?_0x20fccd['count']:_0x228ace[_0xf5f2('0x21')]+_0x228ace[_0xf5f2('0x23')];var _0x4ae323;if(_0x49dac2>=_0x1bf655){_0x49dac2=_0x1bf655;_0x4ae323=0xc8;}else{_0x4ae323=0xce;}_0x11f702[_0xf5f2('0x1e')](_0x4ae323);return _0x11f702[_0xf5f2('0x24')](_0xf5f2('0x25'),_0x34706d+'-'+_0x49dac2+'/'+_0x1bf655)[_0xf5f2('0x20')](_0x20fccd);}return null;};}function patchUpdates(_0x36f1cb){return function(_0x4c691a){try{jsonpatch[_0xf5f2('0x26')](_0x4c691a,_0x36f1cb,!![]);}catch(_0x4669a6){return BPromise[_0xf5f2('0x27')](_0x4669a6);}return _0x4c691a[_0xf5f2('0x28')]();};}function saveUpdates(_0x287ad5,_0x5bdf4a){return function(_0x529f07){if(_0x529f07){return _0x529f07[_0xf5f2('0x29')](_0x287ad5)[_0xf5f2('0x2a')](function(_0x13da6f){return _0x13da6f;});}return null;};}function removeEntity(_0x1a5bb3,_0xf6c58d){return function(_0x788a8d){if(_0x788a8d){return _0x788a8d[_0xf5f2('0x2b')]()[_0xf5f2('0x2a')](function(){var _0x294414=_0x788a8d['get']({'plain':!![]});var _0xaa2602=_0xf5f2('0x2c');return db[_0xf5f2('0x2d')][_0xf5f2('0x2b')]({'where':{'type':_0xaa2602,'resourceId':_0x294414['id']}})[_0xf5f2('0x2a')](function(){return _0x788a8d;});})[_0xf5f2('0x2a')](function(){_0x1a5bb3['status'](0xcc)['end']();});}};}function handleEntityNotFound(_0x22c826,_0x14c829){return function(_0x11c771){if(!_0x11c771){_0x22c826['sendStatus'](0x194);}return _0x11c771;};}function handleError(_0x5a2c7e,_0x29571b){_0x29571b=_0x29571b||0x1f4;return function(_0x50b8a2){logger[_0xf5f2('0x2e')](_0x50b8a2[_0xf5f2('0x2f')]);if(_0x50b8a2[_0xf5f2('0x30')]){delete _0x50b8a2['name'];}_0x5a2c7e['status'](_0x29571b)[_0xf5f2('0x31')](_0x50b8a2);};}exports['index']=function(_0xb744b9,_0x58a4df){var _0x45b643={},_0x31087c={},_0x7b6817={'count':0x0,'rows':[]};var _0x428770=_[_0xf5f2('0x32')](db[_0xf5f2('0x33')][_0xf5f2('0x34')],function(_0x2c0e05){return{'name':_0x2c0e05['fieldName'],'type':_0x2c0e05[_0xf5f2('0x35')][_0xf5f2('0x36')]};});_0x31087c[_0xf5f2('0x37')]=_[_0xf5f2('0x32')](_0x428770,_0xf5f2('0x30'));_0x31087c[_0xf5f2('0x38')]=_[_0xf5f2('0x39')](_0xb744b9['query']);_0x31087c[_0xf5f2('0x3a')]=_[_0xf5f2('0x3b')](_0x31087c['model'],_0x31087c[_0xf5f2('0x38')]);_0x45b643['attributes']=_[_0xf5f2('0x3b')](_0x31087c[_0xf5f2('0x37')],qs[_0xf5f2('0x3c')](_0xb744b9[_0xf5f2('0x38')]['fields']));_0x45b643['attributes']=_0x45b643[_0xf5f2('0x3d')][_0xf5f2('0x3e')]?_0x45b643[_0xf5f2('0x3d')]:_0x31087c['model'];if(!_0xb744b9[_0xf5f2('0x38')]['hasOwnProperty'](_0xf5f2('0x3f'))){_0x45b643['limit']=qs[_0xf5f2('0x23')](_0xb744b9[_0xf5f2('0x38')]['limit']);_0x45b643[_0xf5f2('0x21')]=qs[_0xf5f2('0x21')](_0xb744b9[_0xf5f2('0x38')][_0xf5f2('0x21')]);}_0x45b643['order']=qs['sort'](_0xb744b9[_0xf5f2('0x38')][_0xf5f2('0x40')]);_0x45b643[_0xf5f2('0x41')]=qs[_0xf5f2('0x3a')](_[_0xf5f2('0x42')](_0xb744b9[_0xf5f2('0x38')],_0x31087c[_0xf5f2('0x3a')]),_0x428770);if(_0xb744b9['query'][_0xf5f2('0x43')]){_0x45b643[_0xf5f2('0x41')]=_['merge'](_0x45b643[_0xf5f2('0x41')],{'$or':_[_0xf5f2('0x32')](_0x428770,function(_0x71b0e7){if(_0x71b0e7[_0xf5f2('0x35')]!==_0xf5f2('0x44')){var _0x3b6372={};_0x3b6372[_0x71b0e7[_0xf5f2('0x30')]]={'$like':'%'+_0xb744b9[_0xf5f2('0x38')]['filter']+'%'};return _0x3b6372;}})});}_0x45b643=_[_0xf5f2('0x45')]({},_0x45b643,_0xb744b9[_0xf5f2('0x46')]);var _0x17a78e={'where':_0x45b643['where']};return db['VoicePrefix']['count'](_0x17a78e)[_0xf5f2('0x2a')](function(_0x2ad13c){_0x7b6817['count']=_0x2ad13c;if(_0xb744b9[_0xf5f2('0x38')][_0xf5f2('0x47')]){_0x45b643[_0xf5f2('0x48')]=[{'all':!![]}];}return db[_0xf5f2('0x33')][_0xf5f2('0x49')](_0x45b643);})[_0xf5f2('0x2a')](function(_0x1a6ec1){_0x7b6817[_0xf5f2('0x4a')]=_0x1a6ec1;return _0x7b6817;})[_0xf5f2('0x2a')](respondWithFilteredResult(_0x58a4df,_0x45b643))[_0xf5f2('0x4b')](handleError(_0x58a4df,null));};exports[_0xf5f2('0x4c')]=function(_0x4773cd,_0x4252a3){var _0x2fb67e={'raw':![],'where':{'id':_0x4773cd[_0xf5f2('0x4d')]['id']}},_0x4faeed={};_0x4faeed['model']=_[_0xf5f2('0x39')](db[_0xf5f2('0x33')][_0xf5f2('0x34')]);_0x4faeed[_0xf5f2('0x38')]=_[_0xf5f2('0x39')](_0x4773cd[_0xf5f2('0x38')]);_0x4faeed['filters']=_[_0xf5f2('0x3b')](_0x4faeed[_0xf5f2('0x37')],_0x4faeed[_0xf5f2('0x38')]);_0x2fb67e[_0xf5f2('0x3d')]=_[_0xf5f2('0x3b')](_0x4faeed[_0xf5f2('0x37')],qs[_0xf5f2('0x3c')](_0x4773cd[_0xf5f2('0x38')]['fields']));_0x2fb67e[_0xf5f2('0x3d')]=_0x2fb67e[_0xf5f2('0x3d')][_0xf5f2('0x3e')]?_0x2fb67e['attributes']:_0x4faeed[_0xf5f2('0x37')];if(_0x4773cd[_0xf5f2('0x38')][_0xf5f2('0x47')]){_0x2fb67e['include']=[{'all':!![]}];}_0x2fb67e=_['merge']({},_0x2fb67e,_0x4773cd[_0xf5f2('0x46')]);return db[_0xf5f2('0x33')]['find'](_0x2fb67e)[_0xf5f2('0x2a')](handleEntityNotFound(_0x4252a3,null))['then'](respondWithResult(_0x4252a3,null))[_0xf5f2('0x4b')](handleError(_0x4252a3,null));};exports['destroy']=function(_0x2cbd9d,_0x5d9120){return db[_0xf5f2('0x33')][_0xf5f2('0x4e')]({'where':{'id':_0x2cbd9d[_0xf5f2('0x4d')]['id']}})[_0xf5f2('0x2a')](handleEntityNotFound(_0x5d9120,null))['then'](removeEntity(_0x5d9120,null))[_0xf5f2('0x4b')](handleError(_0x5d9120,null));};exports[_0xf5f2('0x4f')]=function(_0x4f6b01,_0x58213b){return db[_0xf5f2('0x33')][_0xf5f2('0x4f')]()['then'](respondWithResult(_0x58213b,null))[_0xf5f2('0x4b')](handleError(_0x58213b,null));};exports[_0xf5f2('0x50')]=function(_0x29c9b6,_0x41b1c7){var _0x5d0db0;return db['sequelize'][_0xf5f2('0x51')](function(_0xa3cc67){return db['VoicePrefix'][_0xf5f2('0x50')](_0x29c9b6[_0xf5f2('0x52')],{'transaction':_0xa3cc67})[_0xf5f2('0x2a')](function(_0x14029e){_0x5d0db0=_0x14029e[_0xf5f2('0x53')]({'plain':!![]});return db[_0xf5f2('0x54')][_0xf5f2('0x4e')]({'where':{'id':_0x5d0db0['VoiceExtensionId']},'raw':!![]})['then'](function(_0x330730){return createVoicePrefixExtensions(_0x5d0db0,_0x330730,_0xa3cc67);});});})[_0xf5f2('0x2a')](function(){var _0x3c349f=_0x29c9b6[_0xf5f2('0x55')][_0xf5f2('0x53')]({'plain':!![]});if(!_0x3c349f)throw new Error('Unable\x20to\x20retrieve\x20the\x20current\x20user');if(_0x3c349f[_0xf5f2('0x56')]===_0xf5f2('0x55')){var _0x18b124=_0x5d0db0;return db['UserProfileSection'][_0xf5f2('0x4e')]({'where':{'name':'VoicePrefixes','userProfileId':_0x3c349f[_0xf5f2('0x57')]},'raw':!![]})[_0xf5f2('0x2a')](function(_0x28cce5){if(_0x28cce5&&_0x28cce5[_0xf5f2('0x58')]===0x0){return db['UserProfileResource']['create']({'name':_0x18b124[_0xf5f2('0x30')],'resourceId':_0x18b124['id'],'type':_0x28cce5['name'],'sectionId':_0x28cce5['id']},{})[_0xf5f2('0x2a')](function(){return _0x5d0db0;});}else{return _0x5d0db0;}})[_0xf5f2('0x4b')](function(_0x572ec1){logger[_0xf5f2('0x2e')](_0xf5f2('0x59'),_0x572ec1);throw _0x572ec1;});}return _0x5d0db0;})[_0xf5f2('0x2a')](respondWithResult(_0x41b1c7,null))['catch'](handleError(_0x41b1c7,null));};function Extension(_0x397b99,_0xcf7a50,_0x42cc27,_0x4579f4){this['context']=_0xf5f2('0x5a');this['exten']=_0x397b99;this[_0xf5f2('0x5b')]=_0x42cc27;this[_0xf5f2('0x35')]=_0xf5f2('0x5c');this[_0xf5f2('0x5d')]=_0xf5f2('0x5e');this['priority']=_0xcf7a50;this[_0xf5f2('0x5f')]=_0x4579f4;}function createVoicePrefixExtensions(_0xacd80,_0x3461e5,_0x212639){return new BPromise(function(_0x2c5733,_0x5359b5){var _0x31e16b=new Extension(formatPrefixName(_0xacd80['prefix']),0x1,'NoOp',_0xf5f2('0x60'));_0x31e16b['VoicePrefixId']=_0xacd80['id'];return db[_0xf5f2('0x54')][_0xf5f2('0x50')](_0x31e16b,{'transaction':_0x212639})[_0xf5f2('0x2a')](function(_0x123b93){var _0x5767fc=_0x123b93[_0xf5f2('0x53')]({'plain':!![]});var _0x3a53f2=_[_0xf5f2('0x32')](addVoicePrefixExtensions(_0xacd80,_0x3461e5),function(_0x18c41f){_0x18c41f[_0xf5f2('0x61')]=_0x5767fc['id'];_0x18c41f[_0xf5f2('0x62')]=_0xacd80['id'];return _0x18c41f;});return db[_0xf5f2('0x54')]['bulkCreate'](_0x3a53f2,{'transaction':_0x212639})[_0xf5f2('0x2a')](function(_0x2d171d){if(!_0x2d171d){return _0x5359b5(_0xf5f2('0x63'));}else{return _0x2c5733(_0x2d171d);}})[_0xf5f2('0x4b')](function(_0x5a5b2b){return _0x5359b5(_0x5a5b2b);});});;});};function addVoicePrefixExtensions(_0x1de396,_0x4cce08){var _0x410866=[];var _0x1c7f06=formatPrefixName(_0x1de396['prefix']);_0x410866[_0xf5f2('0x64')](new Extension(_0x1c7f06,0x2,_0xf5f2('0x65'),_0xf5f2('0x66')+_0x1de396[_0xf5f2('0x30')]));if(_0x1de396[_0xf5f2('0x67')]){_0x410866['push'](new Extension(_0x1c7f06,0x3,_0xf5f2('0x65'),_0xf5f2('0x68')+_0x1de396[_0xf5f2('0x67')]));}else{_0x410866[_0xf5f2('0x64')](new Extension(_0x1c7f06,0x3,_0xf5f2('0x69'),_0xf5f2('0x6a')));}_0x410866['push'](new Extension(_0x1c7f06,0x4,_0xf5f2('0x6b'),_0x4cce08[_0xf5f2('0x6c')]+','+'${EXTEN:'+(0x8+_0x1de396[_0xf5f2('0x30')][_0xf5f2('0x3e')])+'}'+','+0x1));return _0x410866;}function formatPrefixName(_0x377aad){var _0x51a3c7='_';for(var _0x551cc9=0x0;_0x551cc9<_0x377aad['length'];_0x551cc9++){if(_0x377aad[_0xf5f2('0x6d')](_0x551cc9)=='-'){_0x51a3c7+=_0x377aad[_0xf5f2('0x6d')](_0x551cc9);}else{_0x51a3c7+='['+_0x377aad[_0xf5f2('0x6d')](_0x551cc9)+']';}}_0x51a3c7+='.';return _0x51a3c7;}exports[_0xf5f2('0x29')]=function(_0x55da4d,_0x4d878e,_0x278b76){var _0x3a98b4=_0x55da4d[_0xf5f2('0x52')];_0x3a98b4[_0xf5f2('0x6e')]=_0xf5f2('0x6f')+_0x3a98b4[_0xf5f2('0x30')]+'-';return db[_0xf5f2('0x70')][_0xf5f2('0x51')](function(_0x155f45){return db[_0xf5f2('0x33')][_0xf5f2('0x29')](_0x3a98b4,{'where':{'id':_0x3a98b4['id']},'transaction':_0x155f45})['then'](function(){return db['VoiceExtension']['destroy']({'where':{'VoicePrefixId':_0x3a98b4['id']},'transaction':_0x155f45})[_0xf5f2('0x2a')](function(){return db[_0xf5f2('0x54')][_0xf5f2('0x4e')]({'where':{'id':_0x3a98b4[_0xf5f2('0x61')]},'raw':!![]})[_0xf5f2('0x2a')](function(_0x5c6959){return createVoicePrefixExtensions(_0x3a98b4,_0x5c6959,_0x155f45);});});});})[_0xf5f2('0x2a')](function(){return db[_0xf5f2('0x33')][_0xf5f2('0x71')](_0x3a98b4['id']);})[_0xf5f2('0x2a')](respondWithResult(_0x4d878e,null))[_0xf5f2('0x4b')](handleError(_0x4d878e,null));};exports['addAgents']=function(_0x2986ed,_0x1409b9,_0x517c15){return db[_0xf5f2('0x33')][_0xf5f2('0x4e')]({'where':{'id':_0x2986ed[_0xf5f2('0x4d')]['id']}})[_0xf5f2('0x2a')](handleEntityNotFound(_0x1409b9,null))['then'](function(_0x40b36e){if(_0x40b36e){return _0x40b36e[_0xf5f2('0x72')](_0x2986ed[_0xf5f2('0x52')][_0xf5f2('0x73')],_[_0xf5f2('0x74')](_0x2986ed['body'],['ids','id'])||{})[_0xf5f2('0x75')](function(_0x30f362){for(var _0x17eb69=0x0;_0x17eb69<_0x2986ed[_0xf5f2('0x52')]['ids']['length'];_0x17eb69+=0x1){socket[_0xf5f2('0x76')]('userVoicePrefix:save',{'UserId':Number(_0x2986ed['body']['ids'][_0x17eb69]),'VoicePrefixId':Number(_0x2986ed['params']['id'])});}return _0x30f362;});}})[_0xf5f2('0x2a')](respondWithResult(_0x1409b9,null))[_0xf5f2('0x4b')](handleError(_0x1409b9,null));};exports[_0xf5f2('0x77')]=function(_0x168092,_0x3de508,_0x9f941e){return db[_0xf5f2('0x33')][_0xf5f2('0x4e')]({'where':{'id':_0x168092[_0xf5f2('0x4d')]['id']}})[_0xf5f2('0x2a')](handleEntityNotFound(_0x3de508,null))[_0xf5f2('0x2a')](function(_0x2afeac){if(_0x2afeac){return _0x2afeac[_0xf5f2('0x77')](_0x168092[_0xf5f2('0x38')][_0xf5f2('0x73')])[_0xf5f2('0x2a')](function(){if(_[_0xf5f2('0x78')](_0x168092[_0xf5f2('0x38')]['ids'])){for(var _0xe7ac8=0x0;_0xe7ac8<_0x168092[_0xf5f2('0x38')][_0xf5f2('0x73')][_0xf5f2('0x3e')];_0xe7ac8+=0x1){socket[_0xf5f2('0x76')](_0xf5f2('0x79'),{'UserId':Number(_0x168092[_0xf5f2('0x38')][_0xf5f2('0x73')][_0xe7ac8]),'VoicePrefixId':Number(_0x168092['params']['id'])});}}else{socket[_0xf5f2('0x76')]('userVoicePrefix:remove',{'UserId':Number(_0x168092['query']['ids']),'VoicePrefixId':Number(_0x168092['params']['id'])});}});}})['then'](respondWithStatusCode(_0x3de508,null))['catch'](handleError(_0x3de508,null));};exports[_0xf5f2('0x7a')]=function(_0x18ce86,_0x26a57c,_0x375bc9){var _0x145d4d={};var _0x3cf857={};var _0x5dc63f;var _0x4a0005;return db[_0xf5f2('0x33')]['findOne']({'where':{'id':_0x18ce86[_0xf5f2('0x4d')]['id']}})[_0xf5f2('0x2a')](handleEntityNotFound(_0x26a57c,null))['then'](function(_0x4f3ad4){if(_0x4f3ad4){_0x5dc63f=_0x4f3ad4;_0x3cf857[_0xf5f2('0x37')]=_[_0xf5f2('0x39')](db['User'][_0xf5f2('0x34')]);_0x3cf857[_0xf5f2('0x38')]=_['keys'](_0x18ce86[_0xf5f2('0x38')]);_0x3cf857[_0xf5f2('0x3a')]=_[_0xf5f2('0x3b')](_0x3cf857['model'],_0x3cf857[_0xf5f2('0x38')]);_0x145d4d[_0xf5f2('0x3d')]=_[_0xf5f2('0x3b')](_0x3cf857[_0xf5f2('0x37')],qs[_0xf5f2('0x3c')](_0x18ce86[_0xf5f2('0x38')][_0xf5f2('0x3c')]));_0x145d4d[_0xf5f2('0x3d')]=_0x145d4d[_0xf5f2('0x3d')][_0xf5f2('0x3e')]?_0x145d4d[_0xf5f2('0x3d')]:_0x3cf857[_0xf5f2('0x37')];_0x145d4d[_0xf5f2('0x7b')]=qs[_0xf5f2('0x40')](_0x18ce86[_0xf5f2('0x38')][_0xf5f2('0x40')]);_0x145d4d[_0xf5f2('0x41')]=qs[_0xf5f2('0x3a')](_[_0xf5f2('0x42')](_0x18ce86[_0xf5f2('0x38')],_0x3cf857[_0xf5f2('0x3a')]));if(_0x18ce86['query'][_0xf5f2('0x43')]){_0x145d4d[_0xf5f2('0x41')]=_['merge'](_0x145d4d[_0xf5f2('0x41')],{'$or':_[_0xf5f2('0x32')](_0x145d4d['attributes'],function(_0xb56304){var _0x2f54eb={};_0x2f54eb[_0xb56304]={'$like':'%'+_0x18ce86[_0xf5f2('0x38')]['filter']+'%'};return _0x2f54eb;})});}_0x145d4d=_['merge']({},_0x145d4d,_0x18ce86[_0xf5f2('0x46')]);return _0x5dc63f[_0xf5f2('0x7a')](_0x145d4d);}})[_0xf5f2('0x2a')](function(_0x5ba275){if(_0x5ba275){_0x4a0005=_0x5ba275['length'];if(!_0x18ce86[_0xf5f2('0x38')][_0xf5f2('0x7c')](_0xf5f2('0x3f'))){_0x145d4d['limit']=qs['limit'](_0x18ce86['query']['limit']);_0x145d4d['offset']=qs[_0xf5f2('0x21')](_0x18ce86['query'][_0xf5f2('0x21')]);}return _0x5dc63f[_0xf5f2('0x7a')](_0x145d4d);}})[_0xf5f2('0x2a')](function(_0x43a167){if(_0x43a167){return _0x43a167?{'count':_0x4a0005,'rows':_0x43a167}:null;}})[_0xf5f2('0x2a')](respondWithResult(_0x26a57c,null))[_0xf5f2('0x4b')](handleError(_0x26a57c,null));};exports[_0xf5f2('0x7d')]=function(_0x40e921,_0x3dc051,_0x27ca4a){var _0x1bb4ac={};var _0x36c3c8={};var _0x10c982;var _0x5e69a2;return db[_0xf5f2('0x33')][_0xf5f2('0x7e')]({'where':{'id':_0x40e921['params']['id']}})[_0xf5f2('0x2a')](handleEntityNotFound(_0x3dc051,null))[_0xf5f2('0x2a')](function(_0x537a7d){if(_0x537a7d){_0x10c982=_0x537a7d;_0x36c3c8[_0xf5f2('0x37')]=_[_0xf5f2('0x39')](db[_0xf5f2('0x7f')]['rawAttributes']);_0x36c3c8[_0xf5f2('0x38')]=_[_0xf5f2('0x39')](_0x40e921['query']);_0x36c3c8[_0xf5f2('0x3a')]=_[_0xf5f2('0x3b')](_0x36c3c8[_0xf5f2('0x37')],_0x36c3c8['query']);_0x1bb4ac[_0xf5f2('0x3d')]=_['intersection'](_0x36c3c8[_0xf5f2('0x37')],qs['fields'](_0x40e921[_0xf5f2('0x38')][_0xf5f2('0x3c')]));_0x1bb4ac[_0xf5f2('0x3d')]=_0x1bb4ac[_0xf5f2('0x3d')]['length']?_0x1bb4ac[_0xf5f2('0x3d')]:_0x36c3c8['model'];_0x1bb4ac['order']=qs['sort'](_0x40e921[_0xf5f2('0x38')][_0xf5f2('0x40')]);_0x1bb4ac['where']=qs[_0xf5f2('0x3a')](_[_0xf5f2('0x42')](_0x40e921[_0xf5f2('0x38')],_0x36c3c8[_0xf5f2('0x3a')]));if(_0x40e921[_0xf5f2('0x38')][_0xf5f2('0x43')]){_0x1bb4ac['where']=_[_0xf5f2('0x45')](_0x1bb4ac[_0xf5f2('0x41')],{'$or':_['map'](_0x1bb4ac[_0xf5f2('0x3d')],function(_0x19cbff){var _0x58042c={};_0x58042c[_0x19cbff]={'$like':'%'+_0x40e921[_0xf5f2('0x38')][_0xf5f2('0x43')]+'%'};return _0x58042c;})});}_0x1bb4ac=_[_0xf5f2('0x45')]({},_0x1bb4ac,_0x40e921[_0xf5f2('0x46')]);return _0x10c982[_0xf5f2('0x7d')](_0x1bb4ac);}})[_0xf5f2('0x2a')](function(_0x4df05c){if(_0x4df05c){_0x5e69a2=_0x4df05c[_0xf5f2('0x3e')];if(!_0x40e921[_0xf5f2('0x38')][_0xf5f2('0x7c')](_0xf5f2('0x3f'))){_0x1bb4ac[_0xf5f2('0x23')]=qs[_0xf5f2('0x23')](_0x40e921[_0xf5f2('0x38')][_0xf5f2('0x23')]);_0x1bb4ac[_0xf5f2('0x21')]=qs['offset'](_0x40e921[_0xf5f2('0x38')][_0xf5f2('0x21')]);}return _0x10c982[_0xf5f2('0x7d')](_0x1bb4ac);}})[_0xf5f2('0x2a')](function(_0x35fe1a){if(_0x35fe1a){return _0x35fe1a?{'count':_0x5e69a2,'rows':_0x35fe1a}:null;}})[_0xf5f2('0x2a')](respondWithResult(_0x3dc051,null))[_0xf5f2('0x4b')](handleError(_0x3dc051,null));};exports[_0xf5f2('0x80')]=function(_0x33cfe7,_0x40d0eb,_0x4c138c){var _0x52e419=_0x33cfe7[_0xf5f2('0x52')][_0xf5f2('0x73')];var _0x28eda5;return db[_0xf5f2('0x7f')]['findAll']({'where':{'id':_0x52e419},'attributes':['id'],'include':[{'model':db[_0xf5f2('0x81')],'as':_0xf5f2('0x82'),'attributes':['id',_0xf5f2('0x30'),_0xf5f2('0x83'),_0xf5f2('0x84'),'interface'],'raw':!![]}]})[_0xf5f2('0x2a')](function(_0x18d727){if(_0x18d727){_0x28eda5=_0x18d727;var _0x4bdb72=_[_0xf5f2('0x85')](_0x18d727,function(_0x3ff714){var _0x2563fa=_0x3ff714[_0xf5f2('0x53')]({'plain':!![]});return _0x2563fa['Agents'];});return db[_0xf5f2('0x33')][_0xf5f2('0x4e')]({'where':{'id':_0x33cfe7[_0xf5f2('0x4d')]['id']}})['then'](function(_0x489d4a){return db[_0xf5f2('0x70')][_0xf5f2('0x51')](function(_0x1432ef){return _0x489d4a[_0xf5f2('0x80')](_0x52e419,{'transaction':_0x1432ef})[_0xf5f2('0x2a')](function(){return BPromise[_0xf5f2('0x86')](_0x28eda5,function(_0x58711d){return db[_0xf5f2('0x87')]['upsert']({'TeamId':_0x58711d['id'],'VoicePrefixId':_0x33cfe7[_0xf5f2('0x4d')]['id']},{'transaction':_0x1432ef});});})[_0xf5f2('0x2a')](function(){return BPromise[_0xf5f2('0x86')](_0x4bdb72,function(_0xa74467){return db[_0xf5f2('0x88')][_0xf5f2('0x89')]({'where':{'UserId':_0xa74467['id'],'VoicePrefixId':_0x33cfe7['params']['id']},'transaction':_0x1432ef});});})[_0xf5f2('0x2a')](function(){_0x4bdb72[_0xf5f2('0x8a')](function(_0x457b53){socket[_0xf5f2('0x76')](_0xf5f2('0x8b'),{'UserId':_0x457b53['id'],'VoicePrefixId':_0x489d4a['id']});});});});});}})[_0xf5f2('0x2a')](respondWithStatusCode(_0x40d0eb,null))[_0xf5f2('0x4b')](handleError(_0x40d0eb,null));};exports['removeTeams']=function(_0x1ee541,_0x4a6b83,_0x5857d1){return db['Team'][_0xf5f2('0x49')]({'where':{'id':_0x1ee541[_0xf5f2('0x38')]['ids']},'attributes':['id'],'include':[{'model':db[_0xf5f2('0x81')],'as':_0xf5f2('0x82'),'attributes':['id'],'raw':!![]}]})[_0xf5f2('0x2a')](handleEntityNotFound(_0x4a6b83,null))[_0xf5f2('0x2a')](function(_0x4f2704){var _0x3075b4=_[_0xf5f2('0x32')](_0x4f2704,'id');var _0x10ac11=[];var _0x5d3ca7=[];var _0x29f7bd=squel[_0xf5f2('0x8c')]();_0x29f7bd['field'](_0xf5f2('0x8d'))[_0xf5f2('0x8e')](_0xf5f2('0x8f'),'tq')[_0xf5f2('0x90')](_0xf5f2('0x91'),'ut',_0xf5f2('0x92'))[_0xf5f2('0x41')](_0xf5f2('0x93'),_0x1ee541[_0xf5f2('0x4d')]['id']);for(var _0x4782da=0x0;_0x4782da<_0x4f2704[_0xf5f2('0x3e')];_0x4782da+=0x1){let _0x4b6146=_0x4f2704[_0x4782da];for(var _0x299c53=0x0;_0x299c53<_0x4b6146[_0xf5f2('0x82')]['length'];_0x299c53+=0x1){let _0x2275ba=_0x4b6146['Agents'][_0x299c53];var _0x3b2620=_0x29f7bd[_0xf5f2('0x94')]();_0x3b2620[_0xf5f2('0x41')](_0xf5f2('0x95'),_0x2275ba['id']);_0x5d3ca7['push'](db[_0xf5f2('0x70')]['query'](_0x3b2620[_0xf5f2('0x96')](),{'type':db['sequelize'][_0xf5f2('0x97')][_0xf5f2('0x98')]})['then'](function(_0x2bfc53){if(_0x2bfc53[_0xf5f2('0x3e')]===0x1){return _0x2275ba['id'];}else{var _0x16619b=_[_0xf5f2('0x99')](_[_0xf5f2('0x32')](_0x2bfc53,_0xf5f2('0x9a')),function(_0x54c86e){return _['includes'](_0x3075b4,_0x54c86e);});if(_0x16619b){return _0x2275ba['id'];}}}));}}return BPromise[_0xf5f2('0x9b')](_0x5d3ca7)[_0xf5f2('0x2a')](function(_0x5dc5da){_0x10ac11=_(_0x10ac11)[_0xf5f2('0x9c')](_0x5dc5da)[_0xf5f2('0x9d')]()[_0xf5f2('0x9e')]();return db[_0xf5f2('0x33')][_0xf5f2('0x4e')]({'where':{'id':_0x1ee541[_0xf5f2('0x4d')]['id']}})[_0xf5f2('0x2a')](function(_0x4f9e2d){return db[_0xf5f2('0x70')]['transaction'](function(_0x3ea1aa){return _0x4f9e2d['removeTeams'](_0x1ee541[_0xf5f2('0x38')]['ids'],{'transaction':_0x3ea1aa})[_0xf5f2('0x2a')](function(){if(!_['isEmpty'](_0x10ac11)){return _0x4f9e2d['removeAgents'](_0x10ac11,{'transaction':_0x3ea1aa});}})[_0xf5f2('0x2a')](function(){_0x10ac11[_0xf5f2('0x8a')](function(_0x57708f){socket[_0xf5f2('0x76')](_0xf5f2('0x79'),{'UserId':_0x57708f,'VoicePrefixId':_0x4f9e2d['id']});});});});});});})[_0xf5f2('0x2a')](respondWithStatusCode(_0x4a6b83,null))[_0xf5f2('0x4b')](handleError(_0x4a6b83,null));}; \ No newline at end of file +var _0x5f66=['map','rawAttributes','fieldName','key','model','name','query','keys','filters','intersection','fields','attributes','length','nolimit','order','sort','where','pick','filter','merge','type','VIRTUAL','options','VoicePrefix','count','includeAll','include','findAll','rows','catch','find','destroy','describe','create','transaction','body','VoiceExtension','VoiceExtensionId','user','Unable\x20to\x20retrieve\x20the\x20current\x20user','UserProfileSection','userProfileId','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','context','from-sip','exten','system','description','Voice\x20Prefix\x20Extension','appdata','NoOp','Voice\x20Prefix','VoicePrefixId','bulkCreate','Extensions\x20creation\x20failed','prefix','Set','CDR(prefix)=','callerIdAll','push','PREFIX-CALLERIDALL=','goto','charAt','system-','findById','params','addAgents','ids','spread','userVoicePrefix:save','removeAgents','isArray','emit','userVoicePrefix:remove','findOne','getAgents','hasOwnProperty','getTeams','Team','online','voicePause','interface','flatMap','Agents','sequelize','addTeams','each','TeamVoicePrefix','upsert','UserVoicePrefix','findOrCreate','forEach','removeTeams','User','select','from','team_has_voice_prefixes','join','user_has_teams','clone','toString','QueryTypes','every','TeamId','includes','all','union','compact','value','isEmpty','rimraf','fast-json-patch','request-promise','moment','bluebird','mustache','path','to-csv','ejs','squel','crypto','jsforce','desk.js','querystring','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','api','../../config/license/util','redis','localhost','socket.io-emitter','./voicePrefix.socket','register','sendStatus','end','status','json','offset','undefined','limit','set','Content-Range','reject','update','get','VoicePrefixes','UserProfileResource','then','error','stack','send'];(function(_0x244e2d,_0x302d40){var _0x3df084=function(_0x4bfc1f){while(--_0x4bfc1f){_0x244e2d['push'](_0x244e2d['shift']());}};_0x3df084(++_0x302d40);}(_0x5f66,0x1a0));var _0x65f6=function(_0x31e29a,_0x349c9b){_0x31e29a=_0x31e29a-0x0;var _0x32d892=_0x5f66[_0x31e29a];return _0x32d892;};'use strict';var emlformat=require('eml-format');var rimraf=require(_0x65f6('0x0'));var zipdir=require('zip-dir');var jsonpatch=require(_0x65f6('0x1'));var rp=require(_0x65f6('0x2'));var moment=require(_0x65f6('0x3'));var BPromise=require(_0x65f6('0x4'));var Mustache=require(_0x65f6('0x5'));var util=require('util');var path=require(_0x65f6('0x6'));var sox=require('sox');var csv=require(_0x65f6('0x7'));var ejs=require(_0x65f6('0x8'));var fs=require('fs');var fs_extra=require('fs-extra');var _=require('lodash');var squel=require(_0x65f6('0x9'));var crypto=require(_0x65f6('0xa'));var jsforce=require(_0x65f6('0xb'));var deskjs=require(_0x65f6('0xc'));var toCsv=require(_0x65f6('0x7'));var querystring=require(_0x65f6('0xd'));var Papa=require('papaparse');var Redis=require('ioredis');var authService=require(_0x65f6('0xe'));var qs=require(_0x65f6('0xf'));var as=require(_0x65f6('0x10'));var hardwareService=require(_0x65f6('0x11'));var logger=require('../../config/logger')(_0x65f6('0x12'));var utils=require('../../config/utils');var config=require('../../config/environment');var licenseUtil=require(_0x65f6('0x13'));var db=require('../../mysqldb')['db'];config[_0x65f6('0x14')]=_['defaults'](config[_0x65f6('0x14')],{'host':_0x65f6('0x15'),'port':0x18eb});var socket=require(_0x65f6('0x16'))(new Redis(config[_0x65f6('0x14')]));require(_0x65f6('0x17'))[_0x65f6('0x18')](socket);function respondWithStatusCode(_0x44144b,_0xb1d40a){_0xb1d40a=_0xb1d40a||0xcc;return function(_0x46dbc6){if(_0x46dbc6){return _0x44144b[_0x65f6('0x19')](_0xb1d40a);}return _0x44144b['status'](_0xb1d40a)[_0x65f6('0x1a')]();};}function respondWithResult(_0x49a913,_0x5dd324){_0x5dd324=_0x5dd324||0xc8;return function(_0x1693e6){if(_0x1693e6){return _0x49a913[_0x65f6('0x1b')](_0x5dd324)[_0x65f6('0x1c')](_0x1693e6);}};}function respondWithFilteredResult(_0x1c955c,_0x1b1cbb){return function(_0x1f974c){if(_0x1f974c){var _0xc8660c=typeof _0x1b1cbb[_0x65f6('0x1d')]==='undefined'&&typeof _0x1b1cbb['limit']===_0x65f6('0x1e');var _0x5b4055=_0x1f974c['count'];var _0x5c5b91=_0xc8660c?0x0:_0x1b1cbb[_0x65f6('0x1d')];var _0x21ea88=_0xc8660c?_0x1f974c['count']:_0x1b1cbb[_0x65f6('0x1d')]+_0x1b1cbb[_0x65f6('0x1f')];var _0xbee6a4;if(_0x21ea88>=_0x5b4055){_0x21ea88=_0x5b4055;_0xbee6a4=0xc8;}else{_0xbee6a4=0xce;}_0x1c955c[_0x65f6('0x1b')](_0xbee6a4);return _0x1c955c[_0x65f6('0x20')](_0x65f6('0x21'),_0x5c5b91+'-'+_0x21ea88+'/'+_0x5b4055)['json'](_0x1f974c);}return null;};}function patchUpdates(_0x197a49){return function(_0x4bb39e){try{jsonpatch['apply'](_0x4bb39e,_0x197a49,!![]);}catch(_0x212247){return BPromise[_0x65f6('0x22')](_0x212247);}return _0x4bb39e['save']();};}function saveUpdates(_0x1eeaaa,_0x471a33){return function(_0x2317ce){if(_0x2317ce){return _0x2317ce[_0x65f6('0x23')](_0x1eeaaa)['then'](function(_0x9d7bb0){return _0x9d7bb0;});}return null;};}function removeEntity(_0x59ea32,_0x20a161){return function(_0x5963e0){if(_0x5963e0){return _0x5963e0['destroy']()['then'](function(){var _0x29abdb=_0x5963e0[_0x65f6('0x24')]({'plain':!![]});var _0x4b2292=_0x65f6('0x25');return db[_0x65f6('0x26')]['destroy']({'where':{'type':_0x4b2292,'resourceId':_0x29abdb['id']}})[_0x65f6('0x27')](function(){return _0x5963e0;});})[_0x65f6('0x27')](function(){_0x59ea32[_0x65f6('0x1b')](0xcc)['end']();});}};}function handleEntityNotFound(_0x4ac04b,_0x488d36){return function(_0x266cfe){if(!_0x266cfe){_0x4ac04b[_0x65f6('0x19')](0x194);}return _0x266cfe;};}function handleError(_0x4344b3,_0x408ccc){_0x408ccc=_0x408ccc||0x1f4;return function(_0x518cac){logger[_0x65f6('0x28')](_0x518cac[_0x65f6('0x29')]);if(_0x518cac['name']){delete _0x518cac['name'];}_0x4344b3[_0x65f6('0x1b')](_0x408ccc)[_0x65f6('0x2a')](_0x518cac);};}exports['index']=function(_0x4e50c0,_0x10b368){var _0x1ce43c={},_0x11fe3b={},_0xc53cb7={'count':0x0,'rows':[]};var _0x1217fd=_[_0x65f6('0x2b')](db['VoicePrefix'][_0x65f6('0x2c')],function(_0x38f3c6){return{'name':_0x38f3c6[_0x65f6('0x2d')],'type':_0x38f3c6['type'][_0x65f6('0x2e')]};});_0x11fe3b[_0x65f6('0x2f')]=_[_0x65f6('0x2b')](_0x1217fd,_0x65f6('0x30'));_0x11fe3b[_0x65f6('0x31')]=_[_0x65f6('0x32')](_0x4e50c0['query']);_0x11fe3b[_0x65f6('0x33')]=_[_0x65f6('0x34')](_0x11fe3b['model'],_0x11fe3b[_0x65f6('0x31')]);_0x1ce43c['attributes']=_[_0x65f6('0x34')](_0x11fe3b['model'],qs[_0x65f6('0x35')](_0x4e50c0[_0x65f6('0x31')]['fields']));_0x1ce43c[_0x65f6('0x36')]=_0x1ce43c[_0x65f6('0x36')][_0x65f6('0x37')]?_0x1ce43c['attributes']:_0x11fe3b['model'];if(!_0x4e50c0[_0x65f6('0x31')]['hasOwnProperty'](_0x65f6('0x38'))){_0x1ce43c['limit']=qs[_0x65f6('0x1f')](_0x4e50c0[_0x65f6('0x31')]['limit']);_0x1ce43c[_0x65f6('0x1d')]=qs['offset'](_0x4e50c0['query'][_0x65f6('0x1d')]);}_0x1ce43c[_0x65f6('0x39')]=qs[_0x65f6('0x3a')](_0x4e50c0[_0x65f6('0x31')][_0x65f6('0x3a')]);_0x1ce43c[_0x65f6('0x3b')]=qs[_0x65f6('0x33')](_[_0x65f6('0x3c')](_0x4e50c0['query'],_0x11fe3b[_0x65f6('0x33')]),_0x1217fd);if(_0x4e50c0['query'][_0x65f6('0x3d')]){_0x1ce43c[_0x65f6('0x3b')]=_[_0x65f6('0x3e')](_0x1ce43c[_0x65f6('0x3b')],{'$or':_['map'](_0x1217fd,function(_0x32148f){if(_0x32148f[_0x65f6('0x3f')]!==_0x65f6('0x40')){var _0x3fb1c6={};_0x3fb1c6[_0x32148f[_0x65f6('0x30')]]={'$like':'%'+_0x4e50c0[_0x65f6('0x31')][_0x65f6('0x3d')]+'%'};return _0x3fb1c6;}})});}_0x1ce43c=_[_0x65f6('0x3e')]({},_0x1ce43c,_0x4e50c0[_0x65f6('0x41')]);var _0x5d8e48={'where':_0x1ce43c[_0x65f6('0x3b')]};return db[_0x65f6('0x42')][_0x65f6('0x43')](_0x5d8e48)[_0x65f6('0x27')](function(_0x83e2d9){_0xc53cb7[_0x65f6('0x43')]=_0x83e2d9;if(_0x4e50c0[_0x65f6('0x31')][_0x65f6('0x44')]){_0x1ce43c[_0x65f6('0x45')]=[{'all':!![]}];}return db[_0x65f6('0x42')][_0x65f6('0x46')](_0x1ce43c);})[_0x65f6('0x27')](function(_0x6c4d94){_0xc53cb7[_0x65f6('0x47')]=_0x6c4d94;return _0xc53cb7;})[_0x65f6('0x27')](respondWithFilteredResult(_0x10b368,_0x1ce43c))[_0x65f6('0x48')](handleError(_0x10b368,null));};exports['show']=function(_0x2dd16c,_0x37cd36){var _0x2d8c45={'raw':![],'where':{'id':_0x2dd16c['params']['id']}},_0x3828c9={};_0x3828c9[_0x65f6('0x2f')]=_[_0x65f6('0x32')](db[_0x65f6('0x42')]['rawAttributes']);_0x3828c9[_0x65f6('0x31')]=_[_0x65f6('0x32')](_0x2dd16c[_0x65f6('0x31')]);_0x3828c9[_0x65f6('0x33')]=_['intersection'](_0x3828c9[_0x65f6('0x2f')],_0x3828c9['query']);_0x2d8c45[_0x65f6('0x36')]=_[_0x65f6('0x34')](_0x3828c9['model'],qs[_0x65f6('0x35')](_0x2dd16c['query'][_0x65f6('0x35')]));_0x2d8c45[_0x65f6('0x36')]=_0x2d8c45[_0x65f6('0x36')][_0x65f6('0x37')]?_0x2d8c45[_0x65f6('0x36')]:_0x3828c9[_0x65f6('0x2f')];if(_0x2dd16c['query']['includeAll']){_0x2d8c45[_0x65f6('0x45')]=[{'all':!![]}];}_0x2d8c45=_[_0x65f6('0x3e')]({},_0x2d8c45,_0x2dd16c[_0x65f6('0x41')]);return db[_0x65f6('0x42')][_0x65f6('0x49')](_0x2d8c45)[_0x65f6('0x27')](handleEntityNotFound(_0x37cd36,null))[_0x65f6('0x27')](respondWithResult(_0x37cd36,null))[_0x65f6('0x48')](handleError(_0x37cd36,null));};exports[_0x65f6('0x4a')]=function(_0x517a47,_0x1f16cf){return db[_0x65f6('0x42')][_0x65f6('0x49')]({'where':{'id':_0x517a47['params']['id']}})[_0x65f6('0x27')](handleEntityNotFound(_0x1f16cf,null))[_0x65f6('0x27')](removeEntity(_0x1f16cf,null))['catch'](handleError(_0x1f16cf,null));};exports[_0x65f6('0x4b')]=function(_0x253d52,_0x57eb04){return db[_0x65f6('0x42')]['describe']()[_0x65f6('0x27')](respondWithResult(_0x57eb04,null))[_0x65f6('0x48')](handleError(_0x57eb04,null));};exports[_0x65f6('0x4c')]=function(_0x4b9f0a,_0x1646c5){var _0x43a52e;return db['sequelize'][_0x65f6('0x4d')](function(_0x34312c){return db['VoicePrefix'][_0x65f6('0x4c')](_0x4b9f0a[_0x65f6('0x4e')],{'transaction':_0x34312c})[_0x65f6('0x27')](function(_0x25d504){_0x43a52e=_0x25d504[_0x65f6('0x24')]({'plain':!![]});return db[_0x65f6('0x4f')][_0x65f6('0x49')]({'where':{'id':_0x43a52e[_0x65f6('0x50')]},'raw':!![]})['then'](function(_0x52c5a4){return createVoicePrefixExtensions(_0x43a52e,_0x52c5a4,_0x34312c);});});})['then'](function(){var _0x19f40c=_0x4b9f0a[_0x65f6('0x51')][_0x65f6('0x24')]({'plain':!![]});if(!_0x19f40c)throw new Error(_0x65f6('0x52'));if(_0x19f40c['role']===_0x65f6('0x51')){var _0x2032b9=_0x43a52e;return db[_0x65f6('0x53')]['find']({'where':{'name':_0x65f6('0x25'),'userProfileId':_0x19f40c[_0x65f6('0x54')]},'raw':!![]})[_0x65f6('0x27')](function(_0x4e289e){if(_0x4e289e&&_0x4e289e['autoAssociation']===0x0){return db[_0x65f6('0x26')][_0x65f6('0x4c')]({'name':_0x2032b9[_0x65f6('0x30')],'resourceId':_0x2032b9['id'],'type':_0x4e289e[_0x65f6('0x30')],'sectionId':_0x4e289e['id']},{})[_0x65f6('0x27')](function(){return _0x43a52e;});}else{return _0x43a52e;}})[_0x65f6('0x48')](function(_0x35d77f){logger[_0x65f6('0x28')](_0x65f6('0x55'),_0x35d77f);throw _0x35d77f;});}return _0x43a52e;})[_0x65f6('0x27')](respondWithResult(_0x1646c5,null))[_0x65f6('0x48')](handleError(_0x1646c5,null));};function Extension(_0x141fcc,_0x30adee,_0x3e3143,_0x5ba9c6){this[_0x65f6('0x56')]=_0x65f6('0x57');this[_0x65f6('0x58')]=_0x141fcc;this['app']=_0x3e3143;this[_0x65f6('0x3f')]=_0x65f6('0x59');this[_0x65f6('0x5a')]=_0x65f6('0x5b');this['priority']=_0x30adee;this[_0x65f6('0x5c')]=_0x5ba9c6;}function createVoicePrefixExtensions(_0x4227f5,_0xe5fc65,_0x3e0d8b){return new BPromise(function(_0x553ff0,_0x2923ff){var _0x2fc20f=new Extension(formatPrefixName(_0x4227f5['prefix']),0x1,_0x65f6('0x5d'),_0x65f6('0x5e'));_0x2fc20f[_0x65f6('0x5f')]=_0x4227f5['id'];return db['VoiceExtension'][_0x65f6('0x4c')](_0x2fc20f,{'transaction':_0x3e0d8b})[_0x65f6('0x27')](function(_0x3974ef){var _0x3c23e3=_0x3974ef[_0x65f6('0x24')]({'plain':!![]});var _0x334fa1=_['map'](addVoicePrefixExtensions(_0x4227f5,_0xe5fc65),function(_0x4ee8bd){_0x4ee8bd['VoiceExtensionId']=_0x3c23e3['id'];_0x4ee8bd[_0x65f6('0x5f')]=_0x4227f5['id'];return _0x4ee8bd;});return db[_0x65f6('0x4f')][_0x65f6('0x60')](_0x334fa1,{'transaction':_0x3e0d8b})[_0x65f6('0x27')](function(_0xab6f0){if(!_0xab6f0){return _0x2923ff(_0x65f6('0x61'));}else{return _0x553ff0(_0xab6f0);}})['catch'](function(_0xfbfebc){return _0x2923ff(_0xfbfebc);});});;});};function addVoicePrefixExtensions(_0x1d1532,_0x54b569){var _0x225aeb=[];var _0x39c244=formatPrefixName(_0x1d1532[_0x65f6('0x62')]);_0x225aeb['push'](new Extension(_0x39c244,0x2,_0x65f6('0x63'),_0x65f6('0x64')+_0x1d1532['name']));if(_0x1d1532[_0x65f6('0x65')]){_0x225aeb[_0x65f6('0x66')](new Extension(_0x39c244,0x3,_0x65f6('0x63'),_0x65f6('0x67')+_0x1d1532[_0x65f6('0x65')]));}else{_0x225aeb[_0x65f6('0x66')](new Extension(_0x39c244,0x3,_0x65f6('0x5d'),'No\x20callerid\x20available'));}_0x225aeb['push'](new Extension(_0x39c244,0x4,_0x65f6('0x68'),_0x54b569[_0x65f6('0x56')]+','+'${EXTEN:'+(0x8+_0x1d1532[_0x65f6('0x30')]['length'])+'}'+','+0x1));return _0x225aeb;}function formatPrefixName(_0x3a483b){var _0x4e0450='_';for(var _0x440df1=0x0;_0x440df1<_0x3a483b[_0x65f6('0x37')];_0x440df1++){if(_0x3a483b[_0x65f6('0x69')](_0x440df1)=='-'){_0x4e0450+=_0x3a483b[_0x65f6('0x69')](_0x440df1);}else{_0x4e0450+='['+_0x3a483b[_0x65f6('0x69')](_0x440df1)+']';}}_0x4e0450+='.';return _0x4e0450;}exports[_0x65f6('0x23')]=function(_0x1aaf75,_0x1cc66a,_0x2405a7){var _0x4b7ecd=_0x1aaf75['body'];_0x4b7ecd[_0x65f6('0x62')]=_0x65f6('0x6a')+_0x4b7ecd[_0x65f6('0x30')]+'-';return db['sequelize']['transaction'](function(_0x2dbec2){return db[_0x65f6('0x42')][_0x65f6('0x23')](_0x4b7ecd,{'where':{'id':_0x4b7ecd['id']},'transaction':_0x2dbec2})[_0x65f6('0x27')](function(){return db[_0x65f6('0x4f')][_0x65f6('0x4a')]({'where':{'VoicePrefixId':_0x4b7ecd['id']},'transaction':_0x2dbec2})['then'](function(){return db['VoiceExtension'][_0x65f6('0x49')]({'where':{'id':_0x4b7ecd[_0x65f6('0x50')]},'raw':!![]})['then'](function(_0x219bf8){return createVoicePrefixExtensions(_0x4b7ecd,_0x219bf8,_0x2dbec2);});});});})['then'](function(){return db[_0x65f6('0x42')][_0x65f6('0x6b')](_0x4b7ecd['id']);})[_0x65f6('0x27')](respondWithResult(_0x1cc66a,null))[_0x65f6('0x48')](handleError(_0x1cc66a,null));};exports['addAgents']=function(_0x34ab7b,_0x351d43,_0x11411c){return db['VoicePrefix']['find']({'where':{'id':_0x34ab7b[_0x65f6('0x6c')]['id']}})['then'](handleEntityNotFound(_0x351d43,null))[_0x65f6('0x27')](function(_0xf6de){if(_0xf6de){return _0xf6de[_0x65f6('0x6d')](_0x34ab7b[_0x65f6('0x4e')]['ids'],_['omit'](_0x34ab7b['body'],[_0x65f6('0x6e'),'id'])||{})[_0x65f6('0x6f')](function(_0x161fb2){for(var _0x57464e=0x0;_0x57464e<_0x34ab7b[_0x65f6('0x4e')][_0x65f6('0x6e')][_0x65f6('0x37')];_0x57464e+=0x1){socket['emit'](_0x65f6('0x70'),{'UserId':Number(_0x34ab7b[_0x65f6('0x4e')]['ids'][_0x57464e]),'VoicePrefixId':Number(_0x34ab7b[_0x65f6('0x6c')]['id'])});}return _0x161fb2;});}})[_0x65f6('0x27')](respondWithResult(_0x351d43,null))['catch'](handleError(_0x351d43,null));};exports[_0x65f6('0x71')]=function(_0x5ef825,_0xe8449b,_0x55ea91){return db[_0x65f6('0x42')][_0x65f6('0x49')]({'where':{'id':_0x5ef825['params']['id']}})[_0x65f6('0x27')](handleEntityNotFound(_0xe8449b,null))[_0x65f6('0x27')](function(_0x2a700b){if(_0x2a700b){return _0x2a700b[_0x65f6('0x71')](_0x5ef825[_0x65f6('0x31')][_0x65f6('0x6e')])[_0x65f6('0x27')](function(){if(_[_0x65f6('0x72')](_0x5ef825[_0x65f6('0x31')][_0x65f6('0x6e')])){for(var _0x288eb0=0x0;_0x288eb0<_0x5ef825['query'][_0x65f6('0x6e')][_0x65f6('0x37')];_0x288eb0+=0x1){socket[_0x65f6('0x73')](_0x65f6('0x74'),{'UserId':Number(_0x5ef825['query'][_0x65f6('0x6e')][_0x288eb0]),'VoicePrefixId':Number(_0x5ef825[_0x65f6('0x6c')]['id'])});}}else{socket['emit'](_0x65f6('0x74'),{'UserId':Number(_0x5ef825['query'][_0x65f6('0x6e')]),'VoicePrefixId':Number(_0x5ef825['params']['id'])});}});}})[_0x65f6('0x27')](respondWithStatusCode(_0xe8449b,null))[_0x65f6('0x48')](handleError(_0xe8449b,null));};exports['getAgents']=function(_0x4946c7,_0xa4a742,_0x413c21){var _0x5158c9={};var _0x2d86c8={};var _0x3b3bd5;var _0x73d359;return db['VoicePrefix'][_0x65f6('0x75')]({'where':{'id':_0x4946c7[_0x65f6('0x6c')]['id']}})['then'](handleEntityNotFound(_0xa4a742,null))[_0x65f6('0x27')](function(_0x504b39){if(_0x504b39){_0x3b3bd5=_0x504b39;_0x2d86c8[_0x65f6('0x2f')]=_['keys'](db['User'][_0x65f6('0x2c')]);_0x2d86c8[_0x65f6('0x31')]=_[_0x65f6('0x32')](_0x4946c7[_0x65f6('0x31')]);_0x2d86c8[_0x65f6('0x33')]=_[_0x65f6('0x34')](_0x2d86c8[_0x65f6('0x2f')],_0x2d86c8[_0x65f6('0x31')]);_0x5158c9['attributes']=_['intersection'](_0x2d86c8[_0x65f6('0x2f')],qs['fields'](_0x4946c7[_0x65f6('0x31')][_0x65f6('0x35')]));_0x5158c9[_0x65f6('0x36')]=_0x5158c9[_0x65f6('0x36')][_0x65f6('0x37')]?_0x5158c9['attributes']:_0x2d86c8[_0x65f6('0x2f')];_0x5158c9[_0x65f6('0x39')]=qs[_0x65f6('0x3a')](_0x4946c7['query'][_0x65f6('0x3a')]);_0x5158c9[_0x65f6('0x3b')]=qs[_0x65f6('0x33')](_[_0x65f6('0x3c')](_0x4946c7[_0x65f6('0x31')],_0x2d86c8[_0x65f6('0x33')]));if(_0x4946c7['query']['filter']){_0x5158c9[_0x65f6('0x3b')]=_[_0x65f6('0x3e')](_0x5158c9[_0x65f6('0x3b')],{'$or':_[_0x65f6('0x2b')](_0x5158c9['attributes'],function(_0x4bda86){var _0x336076={};_0x336076[_0x4bda86]={'$like':'%'+_0x4946c7[_0x65f6('0x31')][_0x65f6('0x3d')]+'%'};return _0x336076;})});}_0x5158c9=_[_0x65f6('0x3e')]({},_0x5158c9,_0x4946c7[_0x65f6('0x41')]);return _0x3b3bd5[_0x65f6('0x76')](_0x5158c9);}})['then'](function(_0x4d607a){if(_0x4d607a){_0x73d359=_0x4d607a['length'];if(!_0x4946c7[_0x65f6('0x31')][_0x65f6('0x77')](_0x65f6('0x38'))){_0x5158c9[_0x65f6('0x1f')]=qs['limit'](_0x4946c7['query'][_0x65f6('0x1f')]);_0x5158c9[_0x65f6('0x1d')]=qs['offset'](_0x4946c7[_0x65f6('0x31')]['offset']);}return _0x3b3bd5[_0x65f6('0x76')](_0x5158c9);}})['then'](function(_0x3a30ed){if(_0x3a30ed){return _0x3a30ed?{'count':_0x73d359,'rows':_0x3a30ed}:null;}})[_0x65f6('0x27')](respondWithResult(_0xa4a742,null))['catch'](handleError(_0xa4a742,null));};exports[_0x65f6('0x78')]=function(_0x330e18,_0x13c03b,_0x9f6e0c){var _0xec6a56={};var _0x144db0={};var _0x584ea4;var _0x45b3e6;return db['VoicePrefix'][_0x65f6('0x75')]({'where':{'id':_0x330e18['params']['id']}})[_0x65f6('0x27')](handleEntityNotFound(_0x13c03b,null))[_0x65f6('0x27')](function(_0xdf396c){if(_0xdf396c){_0x584ea4=_0xdf396c;_0x144db0[_0x65f6('0x2f')]=_['keys'](db[_0x65f6('0x79')][_0x65f6('0x2c')]);_0x144db0[_0x65f6('0x31')]=_['keys'](_0x330e18['query']);_0x144db0[_0x65f6('0x33')]=_[_0x65f6('0x34')](_0x144db0['model'],_0x144db0[_0x65f6('0x31')]);_0xec6a56[_0x65f6('0x36')]=_[_0x65f6('0x34')](_0x144db0['model'],qs[_0x65f6('0x35')](_0x330e18[_0x65f6('0x31')]['fields']));_0xec6a56[_0x65f6('0x36')]=_0xec6a56[_0x65f6('0x36')][_0x65f6('0x37')]?_0xec6a56['attributes']:_0x144db0[_0x65f6('0x2f')];_0xec6a56[_0x65f6('0x39')]=qs[_0x65f6('0x3a')](_0x330e18['query'][_0x65f6('0x3a')]);_0xec6a56['where']=qs[_0x65f6('0x33')](_[_0x65f6('0x3c')](_0x330e18[_0x65f6('0x31')],_0x144db0[_0x65f6('0x33')]));if(_0x330e18[_0x65f6('0x31')][_0x65f6('0x3d')]){_0xec6a56['where']=_[_0x65f6('0x3e')](_0xec6a56[_0x65f6('0x3b')],{'$or':_[_0x65f6('0x2b')](_0xec6a56[_0x65f6('0x36')],function(_0x207d15){var _0x59407d={};_0x59407d[_0x207d15]={'$like':'%'+_0x330e18['query']['filter']+'%'};return _0x59407d;})});}_0xec6a56=_[_0x65f6('0x3e')]({},_0xec6a56,_0x330e18[_0x65f6('0x41')]);return _0x584ea4[_0x65f6('0x78')](_0xec6a56);}})['then'](function(_0x151cee){if(_0x151cee){_0x45b3e6=_0x151cee['length'];if(!_0x330e18['query'][_0x65f6('0x77')](_0x65f6('0x38'))){_0xec6a56['limit']=qs[_0x65f6('0x1f')](_0x330e18[_0x65f6('0x31')][_0x65f6('0x1f')]);_0xec6a56[_0x65f6('0x1d')]=qs[_0x65f6('0x1d')](_0x330e18[_0x65f6('0x31')][_0x65f6('0x1d')]);}return _0x584ea4[_0x65f6('0x78')](_0xec6a56);}})[_0x65f6('0x27')](function(_0x350641){if(_0x350641){return _0x350641?{'count':_0x45b3e6,'rows':_0x350641}:null;}})[_0x65f6('0x27')](respondWithResult(_0x13c03b,null))[_0x65f6('0x48')](handleError(_0x13c03b,null));};exports['addTeams']=function(_0x349af7,_0x52dc75,_0x55355f){var _0x24d524=_0x349af7[_0x65f6('0x4e')][_0x65f6('0x6e')];var _0x3727f9;return db['Team'][_0x65f6('0x46')]({'where':{'id':_0x24d524},'attributes':['id'],'include':[{'model':db['User'],'as':'Agents','attributes':['id',_0x65f6('0x30'),_0x65f6('0x7a'),_0x65f6('0x7b'),_0x65f6('0x7c')],'raw':!![]}]})[_0x65f6('0x27')](function(_0xcdfebe){if(_0xcdfebe){_0x3727f9=_0xcdfebe;var _0x5a33cf=_[_0x65f6('0x7d')](_0xcdfebe,function(_0x56bf49){var _0x1ef2a0=_0x56bf49[_0x65f6('0x24')]({'plain':!![]});return _0x1ef2a0[_0x65f6('0x7e')];});return db['VoicePrefix'][_0x65f6('0x49')]({'where':{'id':_0x349af7['params']['id']}})['then'](function(_0x377d5e){return db[_0x65f6('0x7f')][_0x65f6('0x4d')](function(_0xf364a9){return _0x377d5e[_0x65f6('0x80')](_0x24d524,{'transaction':_0xf364a9})['then'](function(){return BPromise[_0x65f6('0x81')](_0x3727f9,function(_0x400633){return db[_0x65f6('0x82')][_0x65f6('0x83')]({'TeamId':_0x400633['id'],'VoicePrefixId':_0x349af7['params']['id']},{'transaction':_0xf364a9});});})[_0x65f6('0x27')](function(){return BPromise[_0x65f6('0x81')](_0x5a33cf,function(_0x344163){return db[_0x65f6('0x84')][_0x65f6('0x85')]({'where':{'UserId':_0x344163['id'],'VoicePrefixId':_0x349af7[_0x65f6('0x6c')]['id']},'transaction':_0xf364a9});});})[_0x65f6('0x27')](function(){_0x5a33cf[_0x65f6('0x86')](function(_0x558410){socket[_0x65f6('0x73')](_0x65f6('0x70'),{'UserId':_0x558410['id'],'VoicePrefixId':_0x377d5e['id']});});});});});}})[_0x65f6('0x27')](respondWithStatusCode(_0x52dc75,null))[_0x65f6('0x48')](handleError(_0x52dc75,null));};exports[_0x65f6('0x87')]=function(_0x4171a1,_0x57667e,_0x3fd6ee){return db[_0x65f6('0x79')]['findAll']({'where':{'id':_0x4171a1[_0x65f6('0x31')]['ids']},'attributes':['id'],'include':[{'model':db[_0x65f6('0x88')],'as':_0x65f6('0x7e'),'attributes':['id'],'raw':!![]}]})[_0x65f6('0x27')](handleEntityNotFound(_0x57667e,null))[_0x65f6('0x27')](function(_0x2177f1){var _0x55c9bd=_[_0x65f6('0x2b')](_0x2177f1,'id');var _0x395642=[];var _0x2394eb=[];var _0x31870f=squel[_0x65f6('0x89')]();_0x31870f['field']('tq.TeamId')[_0x65f6('0x8a')](_0x65f6('0x8b'),'tq')[_0x65f6('0x8c')](_0x65f6('0x8d'),'ut','ut.TeamId\x20=\x20tq.TeamId')['where']('VoicePrefixId\x20=\x20?',_0x4171a1[_0x65f6('0x6c')]['id']);for(var _0x3b0a97=0x0;_0x3b0a97<_0x2177f1[_0x65f6('0x37')];_0x3b0a97+=0x1){let _0x50e159=_0x2177f1[_0x3b0a97];for(var _0x12730b=0x0;_0x12730b<_0x50e159[_0x65f6('0x7e')][_0x65f6('0x37')];_0x12730b+=0x1){let _0x18c6a8=_0x50e159[_0x65f6('0x7e')][_0x12730b];var _0x54e258=_0x31870f[_0x65f6('0x8e')]();_0x54e258[_0x65f6('0x3b')]('ut.UserId\x20=\x20?',_0x18c6a8['id']);_0x2394eb['push'](db[_0x65f6('0x7f')][_0x65f6('0x31')](_0x54e258[_0x65f6('0x8f')](),{'type':db[_0x65f6('0x7f')][_0x65f6('0x90')]['SELECT']})[_0x65f6('0x27')](function(_0x4b080a){if(_0x4b080a[_0x65f6('0x37')]===0x1){return _0x18c6a8['id'];}else{var _0x5d181a=_[_0x65f6('0x91')](_['map'](_0x4b080a,_0x65f6('0x92')),function(_0x48a9df){return _[_0x65f6('0x93')](_0x55c9bd,_0x48a9df);});if(_0x5d181a){return _0x18c6a8['id'];}}}));}}return BPromise[_0x65f6('0x94')](_0x2394eb)['then'](function(_0x4f2f43){_0x395642=_(_0x395642)[_0x65f6('0x95')](_0x4f2f43)[_0x65f6('0x96')]()[_0x65f6('0x97')]();return db[_0x65f6('0x42')][_0x65f6('0x49')]({'where':{'id':_0x4171a1[_0x65f6('0x6c')]['id']}})[_0x65f6('0x27')](function(_0x1b5957){return db[_0x65f6('0x7f')][_0x65f6('0x4d')](function(_0x4a90e3){return _0x1b5957[_0x65f6('0x87')](_0x4171a1[_0x65f6('0x31')][_0x65f6('0x6e')],{'transaction':_0x4a90e3})[_0x65f6('0x27')](function(){if(!_[_0x65f6('0x98')](_0x395642)){return _0x1b5957[_0x65f6('0x71')](_0x395642,{'transaction':_0x4a90e3});}})['then'](function(){_0x395642[_0x65f6('0x86')](function(_0x91d7bf){socket[_0x65f6('0x73')](_0x65f6('0x74'),{'UserId':_0x91d7bf,'VoicePrefixId':_0x1b5957['id']});});});});});});})[_0x65f6('0x27')](respondWithStatusCode(_0x57667e,null))[_0x65f6('0x48')](handleError(_0x57667e,null));}; \ No newline at end of file diff --git a/server/api/voicePrefix/voicePrefix.events.js b/server/api/voicePrefix/voicePrefix.events.js index 3e7798a..c8f08c5 100644 --- a/server/api/voicePrefix/voicePrefix.events.js +++ b/server/api/voicePrefix/voicePrefix.events.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x2cd7=['save','update','remove','emit','hasOwnProperty','exports','../../mysqldb','VoicePrefix','setMaxListeners'];(function(_0x11f9da,_0x1d2696){var _0x2737da=function(_0x54b50e){while(--_0x54b50e){_0x11f9da['push'](_0x11f9da['shift']());}};_0x2737da(++_0x1d2696);}(_0x2cd7,0x7b));var _0x72cd=function(_0x4028ba,_0x158abe){_0x4028ba=_0x4028ba-0x0;var _0xf5f0e3=_0x2cd7[_0x4028ba];return _0xf5f0e3;};'use strict';var EventEmitter=require('events');var VoicePrefix=require(_0x72cd('0x0'))['db'][_0x72cd('0x1')];var VoicePrefixEvents=new EventEmitter();VoicePrefixEvents[_0x72cd('0x2')](0x0);var events={'afterCreate':_0x72cd('0x3'),'afterUpdate':_0x72cd('0x4'),'afterDestroy':_0x72cd('0x5')};function emitEvent(_0x144ad4){return function(_0x115557,_0x314e64,_0x2744ae){VoicePrefixEvents['emit'](_0x144ad4+':'+_0x115557['id'],_0x115557);VoicePrefixEvents[_0x72cd('0x6')](_0x144ad4,_0x115557);_0x2744ae(null);};}for(var e in events){if(events[_0x72cd('0x7')](e)){var event=events[e];VoicePrefix['hook'](e,emitEvent(event));}}module[_0x72cd('0x8')]=VoicePrefixEvents; \ No newline at end of file +var _0xb637=['hasOwnProperty','hook','exports','events','setMaxListeners','save','update','emit'];(function(_0x220bbb,_0x45973d){var _0x58dc4d=function(_0x4741c4){while(--_0x4741c4){_0x220bbb['push'](_0x220bbb['shift']());}};_0x58dc4d(++_0x45973d);}(_0xb637,0x1ab));var _0x7b63=function(_0x185a55,_0x33e5f9){_0x185a55=_0x185a55-0x0;var _0x22e2e5=_0xb637[_0x185a55];return _0x22e2e5;};'use strict';var EventEmitter=require(_0x7b63('0x0'));var VoicePrefix=require('../../mysqldb')['db']['VoicePrefix'];var VoicePrefixEvents=new EventEmitter();VoicePrefixEvents[_0x7b63('0x1')](0x0);var events={'afterCreate':_0x7b63('0x2'),'afterUpdate':_0x7b63('0x3'),'afterDestroy':'remove'};function emitEvent(_0x3ce408){return function(_0xcbe3d0,_0x2865b9,_0x2f05a4){VoicePrefixEvents[_0x7b63('0x4')](_0x3ce408+':'+_0xcbe3d0['id'],_0xcbe3d0);VoicePrefixEvents[_0x7b63('0x4')](_0x3ce408,_0xcbe3d0);_0x2f05a4(null);};}for(var e in events){if(events[_0x7b63('0x5')](e)){var event=events[e];VoicePrefix[_0x7b63('0x6')](e,emitEvent(event));}}module[_0x7b63('0x7')]=VoicePrefixEvents; \ No newline at end of file diff --git a/server/api/voicePrefix/voicePrefix.model.js b/server/api/voicePrefix/voicePrefix.model.js index d0be535..deabc63 100644 --- a/server/api/voicePrefix/voicePrefix.model.js +++ b/server/api/voicePrefix/voicePrefix.model.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xc494=['voice_prefixes','util','../../config/logger','api','moment','rimraf','exports','define','VoicePrefix'];(function(_0x14b87f,_0x4a4221){var _0x315b79=function(_0x111f14){while(--_0x111f14){_0x14b87f['push'](_0x14b87f['shift']());}};_0x315b79(++_0x4a4221);}(_0xc494,0xf4));var _0x4c49=function(_0x5ecadc,_0x1cf9f1){_0x5ecadc=_0x5ecadc-0x0;var _0x565037=_0xc494[_0x5ecadc];return _0x565037;};'use strict';var _=require('lodash');var util=require(_0x4c49('0x0'));var logger=require(_0x4c49('0x1'))(_0x4c49('0x2'));var moment=require(_0x4c49('0x3'));var BPromise=require('bluebird');var rp=require('request-promise');var fs=require('fs');var path=require('path');var rimraf=require(_0x4c49('0x4'));var config=require('../../config/environment');var attributes=require('./voicePrefix.attributes');module[_0x4c49('0x5')]=function(_0x50bb84,_0x297a03){return _0x50bb84[_0x4c49('0x6')](_0x4c49('0x7'),attributes,{'tableName':_0x4c49('0x8'),'paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file +var _0x2f3c=['api','moment','bluebird','path','rimraf','../../config/environment','./voicePrefix.attributes','exports','define','VoicePrefix','lodash','util','../../config/logger'];(function(_0xa148b7,_0x2f3eb2){var _0x51efd3=function(_0x34bcec){while(--_0x34bcec){_0xa148b7['push'](_0xa148b7['shift']());}};_0x51efd3(++_0x2f3eb2);}(_0x2f3c,0xb3));var _0xc2f3=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0x2f3c[_0x3dd15e];return _0x231fd0;};'use strict';var _=require(_0xc2f3('0x0'));var util=require(_0xc2f3('0x1'));var logger=require(_0xc2f3('0x2'))(_0xc2f3('0x3'));var moment=require(_0xc2f3('0x4'));var BPromise=require(_0xc2f3('0x5'));var rp=require('request-promise');var fs=require('fs');var path=require(_0xc2f3('0x6'));var rimraf=require(_0xc2f3('0x7'));var config=require(_0xc2f3('0x8'));var attributes=require(_0xc2f3('0x9'));module[_0xc2f3('0xa')]=function(_0x4ab832,_0x2dc24a){return _0x4ab832[_0xc2f3('0xb')](_0xc2f3('0xc'),attributes,{'tableName':'voice_prefixes','paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file diff --git a/server/api/voicePrefix/voicePrefix.rpc.js b/server/api/voicePrefix/voicePrefix.rpc.js index a8c521d..2e6761f 100644 --- a/server/api/voicePrefix/voicePrefix.rpc.js +++ b/server/api/voicePrefix/voicePrefix.rpc.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x45d8=['../../config/utils','rpc','../../config/environment','http','defaults','redis','localhost','socket.io-emitter','./voicePrefix.socket','request','then','info','request\x20sent','debug','VoicePrefix,\x20%s,\x20%s,\x20%s','error','code','VoicePrefix,\x20%s,\x20%s','message','result','catch','lodash','util','moment','bluebird','randomstring','ioredis'];(function(_0x3d2c19,_0x26c294){var _0x3a9a07=function(_0x3fd64e){while(--_0x3fd64e){_0x3d2c19['push'](_0x3d2c19['shift']());}};_0x3a9a07(++_0x26c294);}(_0x45d8,0x174));var _0x845d=function(_0x228641,_0x25d636){_0x228641=_0x228641-0x0;var _0x5d5d78=_0x45d8[_0x228641];return _0x5d5d78;};'use strict';var _=require(_0x845d('0x0'));var util=require(_0x845d('0x1'));var moment=require(_0x845d('0x2'));var BPromise=require(_0x845d('0x3'));var rs=require(_0x845d('0x4'));var fs=require('fs');var Redis=require(_0x845d('0x5'));var db=require('../../mysqldb')['db'];var utils=require(_0x845d('0x6'));var logger=require('../../config/logger')(_0x845d('0x7'));var config=require(_0x845d('0x8'));var jayson=require('jayson/promise');var client=jayson['client'][_0x845d('0x9')]({'port':0x232a});config['redis']=_[_0x845d('0xa')](config[_0x845d('0xb')],{'host':_0x845d('0xc'),'port':0x18eb});var socket=require(_0x845d('0xd'))(new Redis(config[_0x845d('0xb')]));require(_0x845d('0xe'))['register'](socket);function respondWithRpcPromise(_0x209d2e,_0x234efb,_0x50b504){return new BPromise(function(_0x5d4128,_0x1a2afb){return client[_0x845d('0xf')](_0x209d2e,_0x50b504)[_0x845d('0x10')](function(_0x10deb0){logger[_0x845d('0x11')]('VoicePrefix,\x20%s,\x20%s',_0x234efb,_0x845d('0x12'));logger[_0x845d('0x13')](_0x845d('0x14'),_0x234efb,_0x845d('0x12'),JSON['stringify'](_0x10deb0));if(_0x10deb0['error']){if(_0x10deb0[_0x845d('0x15')][_0x845d('0x16')]===0x1f4){logger[_0x845d('0x15')]('VoicePrefix,\x20%s,\x20%s',_0x234efb,_0x10deb0[_0x845d('0x15')]['message']);return _0x1a2afb(_0x10deb0[_0x845d('0x15')]['message']);}logger[_0x845d('0x15')](_0x845d('0x17'),_0x234efb,_0x10deb0[_0x845d('0x15')][_0x845d('0x18')]);return _0x5d4128(_0x10deb0[_0x845d('0x15')]['message']);}else{logger['info'](_0x845d('0x17'),_0x234efb,_0x845d('0x12'));_0x5d4128(_0x10deb0[_0x845d('0x19')][_0x845d('0x18')]);}})[_0x845d('0x1a')](function(_0x523b63){logger[_0x845d('0x15')](_0x845d('0x17'),_0x234efb,_0x523b63);_0x1a2afb(_0x523b63);});});} \ No newline at end of file +var _0xf06c=['VoicePrefix,\x20%s,\x20%s,\x20%s','error','code','VoicePrefix,\x20%s,\x20%s','message','result','catch','lodash','util','moment','bluebird','randomstring','../../mysqldb','../../config/utils','../../config/logger','../../config/environment','jayson/promise','client','redis','register','then','info','request\x20sent','debug'];(function(_0x20e214,_0x3afe50){var _0x2661ed=function(_0x41b276){while(--_0x41b276){_0x20e214['push'](_0x20e214['shift']());}};_0x2661ed(++_0x3afe50);}(_0xf06c,0xc7));var _0xcf06=function(_0x26ee16,_0x4da133){_0x26ee16=_0x26ee16-0x0;var _0x4fb841=_0xf06c[_0x26ee16];return _0x4fb841;};'use strict';var _=require(_0xcf06('0x0'));var util=require(_0xcf06('0x1'));var moment=require(_0xcf06('0x2'));var BPromise=require(_0xcf06('0x3'));var rs=require(_0xcf06('0x4'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0xcf06('0x5'))['db'];var utils=require(_0xcf06('0x6'));var logger=require(_0xcf06('0x7'))('rpc');var config=require(_0xcf06('0x8'));var jayson=require(_0xcf06('0x9'));var client=jayson[_0xcf06('0xa')]['http']({'port':0x232a});config[_0xcf06('0xb')]=_['defaults'](config[_0xcf06('0xb')],{'host':'localhost','port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config['redis']));require('./voicePrefix.socket')[_0xcf06('0xc')](socket);function respondWithRpcPromise(_0xfd85ed,_0x41dea0,_0x59d6ba){return new BPromise(function(_0x4ed56b,_0x463309){return client['request'](_0xfd85ed,_0x59d6ba)[_0xcf06('0xd')](function(_0x544ac2){logger[_0xcf06('0xe')]('VoicePrefix,\x20%s,\x20%s',_0x41dea0,_0xcf06('0xf'));logger[_0xcf06('0x10')](_0xcf06('0x11'),_0x41dea0,_0xcf06('0xf'),JSON['stringify'](_0x544ac2));if(_0x544ac2['error']){if(_0x544ac2[_0xcf06('0x12')][_0xcf06('0x13')]===0x1f4){logger[_0xcf06('0x12')](_0xcf06('0x14'),_0x41dea0,_0x544ac2['error'][_0xcf06('0x15')]);return _0x463309(_0x544ac2[_0xcf06('0x12')]['message']);}logger['error'](_0xcf06('0x14'),_0x41dea0,_0x544ac2[_0xcf06('0x12')][_0xcf06('0x15')]);return _0x4ed56b(_0x544ac2['error'][_0xcf06('0x15')]);}else{logger[_0xcf06('0xe')](_0xcf06('0x14'),_0x41dea0,'request\x20sent');_0x4ed56b(_0x544ac2[_0xcf06('0x16')][_0xcf06('0x15')]);}})[_0xcf06('0x17')](function(_0x1aad31){logger[_0xcf06('0x12')]('VoicePrefix,\x20%s,\x20%s',_0x41dea0,_0x1aad31);_0x463309(_0x1aad31);});});} \ No newline at end of file diff --git a/server/api/voicePrefix/voicePrefix.socket.js b/server/api/voicePrefix/voicePrefix.socket.js index 3d51ac5..00b81be 100644 --- a/server/api/voicePrefix/voicePrefix.socket.js +++ b/server/api/voicePrefix/voicePrefix.socket.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xe130=['voicePrefix:','./voicePrefix.events','save','update','emit','removeListener','register'];(function(_0x15fb19,_0x3f9d71){var _0x5b1b67=function(_0x1b51f7){while(--_0x1b51f7){_0x15fb19['push'](_0x15fb19['shift']());}};_0x5b1b67(++_0x3f9d71);}(_0xe130,0x127));var _0x0e13=function(_0x5bb5e4,_0x838aa8){_0x5bb5e4=_0x5bb5e4-0x0;var _0x3835cc=_0xe130[_0x5bb5e4];return _0x3835cc;};'use strict';var VoicePrefixEvents=require(_0x0e13('0x0'));var events=[_0x0e13('0x1'),'remove',_0x0e13('0x2')];function createListener(_0x3cbccc,_0x1dd4fa){return function(_0x360489){_0x1dd4fa[_0x0e13('0x3')](_0x3cbccc,_0x360489);};}function removeListener(_0x504f15,_0x1489a9){return function(){VoicePrefixEvents[_0x0e13('0x4')](_0x504f15,_0x1489a9);};}exports[_0x0e13('0x5')]=function(_0xcd92e){for(var _0x50a80e=0x0,_0x1774a5=events['length'];_0x50a80e<_0x1774a5;_0x50a80e++){var _0x567031=events[_0x50a80e];var _0x5aaa22=createListener(_0x0e13('0x6')+_0x567031,_0xcd92e);VoicePrefixEvents['on'](_0x567031,_0x5aaa22);}}; \ No newline at end of file +var _0xb04a=['save','remove','update','emit','removeListener','register','voicePrefix:','./voicePrefix.events'];(function(_0x1e1b5a,_0x13b534){var _0x3206db=function(_0x5d6c2f){while(--_0x5d6c2f){_0x1e1b5a['push'](_0x1e1b5a['shift']());}};_0x3206db(++_0x13b534);}(_0xb04a,0xcf));var _0xab04=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0xb04a[_0x3dd15e];return _0x231fd0;};'use strict';var VoicePrefixEvents=require(_0xab04('0x0'));var events=[_0xab04('0x1'),_0xab04('0x2'),_0xab04('0x3')];function createListener(_0x565575,_0x28963e){return function(_0x4657c4){_0x28963e[_0xab04('0x4')](_0x565575,_0x4657c4);};}function removeListener(_0x4b8c0f,_0x2b5b06){return function(){VoicePrefixEvents[_0xab04('0x5')](_0x4b8c0f,_0x2b5b06);};}exports[_0xab04('0x6')]=function(_0x488ced){for(var _0x3b68e3=0x0,_0x46d9b2=events['length'];_0x3b68e3<_0x46d9b2;_0x3b68e3++){var _0x53a969=events[_0x3b68e3];var _0x4d47f5=createListener(_0xab04('0x7')+_0x53a969,_0x488ced);VoicePrefixEvents['on'](_0x53a969,_0x4d47f5);}}; \ No newline at end of file diff --git a/server/api/voiceQueue/index.js b/server/api/voiceQueue/index.js index b1cebe4..9b08920 100644 --- a/server/api/voiceQueue/index.js +++ b/server/api/voiceQueue/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xa9e0=['addAgents','/:id/blacklists','addBlackLists','update','delete','destroy','removeTeams','removeAgents','removeLists','removeBlackLists','exports','multer','util','path','Router','../../components/auth/service','../../components/interaction/service','../../config/environment','./voiceQueue.controller','get','index','/:id','getHoppers','/:id/hopper_histories','isAuthenticated','getHopperHistories','/:id/hopper_black','getHopperBlacks','/:id/teams','/:id/users','getAgents','/:id/members','getMembers','/:id/lists','getLists','post','create','/:id/clone','clone','addTeams'];(function(_0x580427,_0x2d4b8d){var _0x25ee0e=function(_0x15f649){while(--_0x15f649){_0x580427['push'](_0x580427['shift']());}};_0x25ee0e(++_0x2d4b8d);}(_0xa9e0,0x123));var _0x0a9e=function(_0x4ea69d,_0x290f53){_0x4ea69d=_0x4ea69d-0x0;var _0x5318e0=_0xa9e0[_0x4ea69d];return _0x5318e0;};'use strict';var multer=require(_0x0a9e('0x0'));var util=require(_0x0a9e('0x1'));var path=require(_0x0a9e('0x2'));var timeout=require('connect-timeout');var express=require('express');var router=express[_0x0a9e('0x3')]();var fs_extra=require('fs-extra');var auth=require(_0x0a9e('0x4'));var interaction=require(_0x0a9e('0x5'));var config=require(_0x0a9e('0x6'));var controller=require(_0x0a9e('0x7'));router[_0x0a9e('0x8')]('/',auth['isAuthenticated'](),controller[_0x0a9e('0x9')]);router[_0x0a9e('0x8')](_0x0a9e('0xa'),auth['isAuthenticated'](),controller['show']);router[_0x0a9e('0x8')]('/:id/hoppers',auth['isAuthenticated'](),controller[_0x0a9e('0xb')]);router[_0x0a9e('0x8')](_0x0a9e('0xc'),auth[_0x0a9e('0xd')](),controller[_0x0a9e('0xe')]);router[_0x0a9e('0x8')]('/:id/hopper_finals',auth['isAuthenticated'](),controller['getHopperFinals']);router['get'](_0x0a9e('0xf'),auth[_0x0a9e('0xd')](),controller[_0x0a9e('0x10')]);router[_0x0a9e('0x8')](_0x0a9e('0x11'),auth[_0x0a9e('0xd')](),controller['getTeams']);router[_0x0a9e('0x8')](_0x0a9e('0x12'),auth[_0x0a9e('0xd')](),controller[_0x0a9e('0x13')]);router[_0x0a9e('0x8')](_0x0a9e('0x14'),auth['isAuthenticated'](),controller[_0x0a9e('0x15')]);router['get'](_0x0a9e('0x16'),auth['isAuthenticated'](),controller[_0x0a9e('0x17')]);router[_0x0a9e('0x8')]('/:id/blacklists',auth[_0x0a9e('0xd')](),controller['getBlackLists']);router[_0x0a9e('0x18')]('/',auth[_0x0a9e('0xd')](),controller[_0x0a9e('0x19')]);router[_0x0a9e('0x18')](_0x0a9e('0x1a'),auth[_0x0a9e('0xd')](),controller[_0x0a9e('0x1b')]);router[_0x0a9e('0x18')](_0x0a9e('0x11'),auth[_0x0a9e('0xd')](),controller[_0x0a9e('0x1c')]);router[_0x0a9e('0x18')]('/:id/users',auth[_0x0a9e('0xd')](),controller[_0x0a9e('0x1d')]);router['post'](_0x0a9e('0x16'),auth['isAuthenticated'](),controller['addLists']);router[_0x0a9e('0x18')](_0x0a9e('0x1e'),auth[_0x0a9e('0xd')](),controller[_0x0a9e('0x1f')]);router['put'](_0x0a9e('0xa'),auth[_0x0a9e('0xd')](),controller[_0x0a9e('0x20')]);router[_0x0a9e('0x21')](_0x0a9e('0xa'),auth[_0x0a9e('0xd')](),controller[_0x0a9e('0x22')]);router['delete']('/:id/teams',auth[_0x0a9e('0xd')](),controller[_0x0a9e('0x23')]);router[_0x0a9e('0x21')](_0x0a9e('0x12'),auth['isAuthenticated'](),controller[_0x0a9e('0x24')]);router['delete'](_0x0a9e('0x16'),auth['isAuthenticated'](),controller[_0x0a9e('0x25')]);router[_0x0a9e('0x21')](_0x0a9e('0x1e'),auth[_0x0a9e('0xd')](),controller[_0x0a9e('0x26')]);module[_0x0a9e('0x27')]=router; \ No newline at end of file +var _0xa9e0=['addAgents','/:id/blacklists','addBlackLists','update','delete','destroy','removeTeams','removeAgents','removeLists','removeBlackLists','exports','multer','util','path','Router','../../components/auth/service','../../components/interaction/service','../../config/environment','./voiceQueue.controller','get','index','/:id','getHoppers','/:id/hopper_histories','isAuthenticated','getHopperHistories','/:id/hopper_black','getHopperBlacks','/:id/teams','/:id/users','getAgents','/:id/members','getMembers','/:id/lists','getLists','post','create','/:id/clone','clone','addTeams'];(function(_0x40393b,_0x387c81){var _0x42dc4e=function(_0x3d87ec){while(--_0x3d87ec){_0x40393b['push'](_0x40393b['shift']());}};_0x42dc4e(++_0x387c81);}(_0xa9e0,0x123));var _0x0a9e=function(_0x3054be,_0x1bdc8b){_0x3054be=_0x3054be-0x0;var _0x3df150=_0xa9e0[_0x3054be];return _0x3df150;};'use strict';var multer=require(_0x0a9e('0x0'));var util=require(_0x0a9e('0x1'));var path=require(_0x0a9e('0x2'));var timeout=require('connect-timeout');var express=require('express');var router=express[_0x0a9e('0x3')]();var fs_extra=require('fs-extra');var auth=require(_0x0a9e('0x4'));var interaction=require(_0x0a9e('0x5'));var config=require(_0x0a9e('0x6'));var controller=require(_0x0a9e('0x7'));router[_0x0a9e('0x8')]('/',auth['isAuthenticated'](),controller[_0x0a9e('0x9')]);router[_0x0a9e('0x8')](_0x0a9e('0xa'),auth['isAuthenticated'](),controller['show']);router[_0x0a9e('0x8')]('/:id/hoppers',auth['isAuthenticated'](),controller[_0x0a9e('0xb')]);router[_0x0a9e('0x8')](_0x0a9e('0xc'),auth[_0x0a9e('0xd')](),controller[_0x0a9e('0xe')]);router[_0x0a9e('0x8')]('/:id/hopper_finals',auth['isAuthenticated'](),controller['getHopperFinals']);router['get'](_0x0a9e('0xf'),auth[_0x0a9e('0xd')](),controller[_0x0a9e('0x10')]);router[_0x0a9e('0x8')](_0x0a9e('0x11'),auth[_0x0a9e('0xd')](),controller['getTeams']);router[_0x0a9e('0x8')](_0x0a9e('0x12'),auth[_0x0a9e('0xd')](),controller[_0x0a9e('0x13')]);router[_0x0a9e('0x8')](_0x0a9e('0x14'),auth['isAuthenticated'](),controller[_0x0a9e('0x15')]);router['get'](_0x0a9e('0x16'),auth['isAuthenticated'](),controller[_0x0a9e('0x17')]);router[_0x0a9e('0x8')]('/:id/blacklists',auth[_0x0a9e('0xd')](),controller['getBlackLists']);router[_0x0a9e('0x18')]('/',auth[_0x0a9e('0xd')](),controller[_0x0a9e('0x19')]);router[_0x0a9e('0x18')](_0x0a9e('0x1a'),auth[_0x0a9e('0xd')](),controller[_0x0a9e('0x1b')]);router[_0x0a9e('0x18')](_0x0a9e('0x11'),auth[_0x0a9e('0xd')](),controller[_0x0a9e('0x1c')]);router[_0x0a9e('0x18')]('/:id/users',auth[_0x0a9e('0xd')](),controller[_0x0a9e('0x1d')]);router['post'](_0x0a9e('0x16'),auth['isAuthenticated'](),controller['addLists']);router[_0x0a9e('0x18')](_0x0a9e('0x1e'),auth[_0x0a9e('0xd')](),controller[_0x0a9e('0x1f')]);router['put'](_0x0a9e('0xa'),auth[_0x0a9e('0xd')](),controller[_0x0a9e('0x20')]);router[_0x0a9e('0x21')](_0x0a9e('0xa'),auth[_0x0a9e('0xd')](),controller[_0x0a9e('0x22')]);router['delete']('/:id/teams',auth[_0x0a9e('0xd')](),controller[_0x0a9e('0x23')]);router[_0x0a9e('0x21')](_0x0a9e('0x12'),auth['isAuthenticated'](),controller[_0x0a9e('0x24')]);router['delete'](_0x0a9e('0x16'),auth['isAuthenticated'](),controller[_0x0a9e('0x25')]);router[_0x0a9e('0x21')](_0x0a9e('0x1e'),auth[_0x0a9e('0xd')](),controller[_0x0a9e('0x26')]);module[_0x0a9e('0x27')]=router; \ No newline at end of file diff --git a/server/api/voiceQueue/voiceQueue.attributes.js b/server/api/voiceQueue/voiceQueue.attributes.js index 1ddcafa..15cbe15 100644 --- a/server/api/voiceQueue/voiceQueue.attributes.js +++ b/server/api/voiceQueue/voiceQueue.attributes.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xe774=['setDataValue','getDataValue','type','dialMethod','preview','booked','roundrobin','includes','strategy','INTEGER','yes','all','periodic_announce','join','split','joinempty','leavewhenempty','acw','wrapuptime','BOOLEAN','progressive','power','predictive','Dial\x20Method.','UNSIGNED','Max\x209999\x20channels,\x200\x20means\x20unlimited.','FLOAT','Power\x20Level:\x20Calls\x20for\x20agents\x20(min:1,\x20max:10).','agentBusyFactor','dropRate','Only\x20for\x20predictive\x20method.','Predictive\x20Optimization\x20Percentage\x20(min:\x201,\x20max:\x2095)','Interval\x20Predictive\x20Minutes\x20(min:5\x20max:30)','Originate\x20Timeout\x20Seconds\x20(min:1,\x20max:999)','https://wiki.asterisk.org/wiki/display/AST/Asterisk+13+Application_Queue','Queue\x20Timeout\x20Seconds\x20(min:1,\x20max:999)','AGI\x20queue\x20option\x20(use:\x20agi://127.0.0.1/square,)','#Congestion\x20Retry\x20(min:1,\x20max:999)','#Busy\x20Retry\x20(min:1,\x20max:999)','#NoAnswer\x20Retry\x20(min:1,\x20max:999)','NoAnswer\x20Retry\x20Frequency\x20Minutes\x20(min:1,\x20max:99999)','07:00-22:00,*,*,*','always','never','Active/Disactive\x20AMD','#AMD\x20Initial\x20Silence','#AMD\x20Greeting','#AMD\x20After\x20Greeting\x20Silence','#AMD\x20Min\x20Word\x20Length','#AMD\x20Maximum\x20Number\x20Of\x20Words','#AMD\x20Silence\x20Threshold\x20(min:0,\x20max:32767)','#AMD\x20Maximum\x20Word\x20Length','#RecallMe\x20Timeout\x20(min:1)','Active/Disactive\x20Recall\x20In\x20Queue','DESC','Random\x20Last\x20Digit\x20(min:1,\x20max:15)','Cut\x20Digit\x20(min:1,\x20max:15)','#NoSuchNumber\x20Retry\x20(min:1,\x20max:999)','NoSuchNumber\x20Retry\x20Frequency\x20Minutes\x20(min:1,\x20max:99999)','Drop\x20Retry\x20Frequency\x20Minutes\x20(min:1,\x20max:99999)','#Abandoned\x20Retry\x20(min:1,\x20max:999)','Abandoned\x20Retry\x20Frequency\x20Minutes\x20(min:1,\x20max:99999)','#Machine\x20Retry\x20(min:1,\x20max:999)','Machine\x20Retry\x20Frequency\x20Minutes\x20(min:1,\x20max:99999)','Status\x20to\x20put\x20when\x20mandatory\x20disposition\x20is\x20enabled','Enabled/disables\x20mandatory\x20dispo\x20on\x20a\x20queue','mandatoryDispositionPauseId','mandatoryDisposition','sequelize','exports','STRING','name','ENUM','inbound','outbound','default','leastrecent','fewestcalls','random','rrmemory','linear','rrordered','ringall'];(function(_0x450689,_0x3b857c){var _0x46ffb0=function(_0x5d3679){while(--_0x5d3679){_0x450689['push'](_0x450689['shift']());}};_0x46ffb0(++_0x3b857c);}(_0xe774,0x97));var _0x4e77=function(_0x11675f,_0x44eeee){_0x11675f=_0x11675f-0x0;var _0xe30603=_0xe774[_0x11675f];return _0xe30603;};'use strict';var Sequelize=require(_0x4e77('0x0'));module[_0x4e77('0x1')]={'name':{'type':Sequelize[_0x4e77('0x2')],'allowNull':![],'unique':_0x4e77('0x3'),'validate':{'notEmpty':!![],'is':/^[A-Za-z0-9\.\_]+$/i}},'type':{'type':Sequelize[_0x4e77('0x4')](_0x4e77('0x5'),_0x4e77('0x6')),'allowNull':![],'defaultValue':'inbound'},'musiconhold':{'type':Sequelize[_0x4e77('0x2')],'defaultValue':_0x4e77('0x7')},'announce':{'type':Sequelize[_0x4e77('0x2')],'defaultValue':''},'strategy':{'type':Sequelize[_0x4e77('0x4')]('rr','ringall',_0x4e77('0x8'),_0x4e77('0x9'),_0x4e77('0xa'),_0x4e77('0xb'),_0x4e77('0xc'),'wrandom',_0x4e77('0xd')),'allowNull':![],'defaultValue':_0x4e77('0xe'),'set':function(_0x2e0449){this[_0x4e77('0xf')]('strategy',_0x2e0449?_0x2e0449:_0x4e77('0xb'));},'get':function(){var _0x1fc520=this[_0x4e77('0x10')](_0x4e77('0x11'));var _0x72a278=this[_0x4e77('0x10')](_0x4e77('0x12'));var _0x2475e7=this[_0x4e77('0x10')]('strategy');if(_0x1fc520===_0x4e77('0x6')){if(_0x72a278===_0x4e77('0x13')){return null;}if(_0x72a278===_0x4e77('0x14')&&![_0x4e77('0xb'),_0x4e77('0x15')][_0x4e77('0x16')](_0x2475e7)){this[_0x4e77('0xf')](_0x4e77('0x17'),_0x4e77('0xb'));}}return _0x2475e7;}},'servicelevel':{'type':Sequelize[_0x4e77('0x18')](0xb),'defaultValue':0x0},'context':{'type':Sequelize['STRING'],'defaultValue':null},'penaltymemberslimit':{'type':Sequelize[_0x4e77('0x18')](0xb)},'timeout':{'type':Sequelize['INTEGER'](0xb),'defaultValue':0xf},'retry':{'type':Sequelize[_0x4e77('0x18')](0xb),'defaultValue':0x2},'timeoutpriority':{'type':Sequelize['STRING']},'weight':{'type':Sequelize['INTEGER'](0xb),'allowNull':!![],'defaultValue':0x0},'wrapuptime':{'type':Sequelize[_0x4e77('0x18')](0xb),'defaultValue':0x0},'autofill':{'type':Sequelize[_0x4e77('0x4')](_0x4e77('0x19'),'no'),'defaultValue':'yes'},'autopause':{'type':Sequelize[_0x4e77('0x4')](_0x4e77('0x19'),'no',_0x4e77('0x1a')),'defaultValue':'no'},'autopausedelay':{'type':Sequelize[_0x4e77('0x18')](0xb)},'autopausebusy':{'type':Sequelize[_0x4e77('0x4')]('yes','no'),'defaultValue':'no'},'autopauseunavail':{'type':Sequelize['ENUM'](_0x4e77('0x19'),'no'),'defaultValue':'no'},'maxlen':{'type':Sequelize['INTEGER'](0xb),'defaultValue':0x0},'setinterfacevar':{'type':Sequelize[_0x4e77('0x4')](_0x4e77('0x19'),'no'),'defaultValue':'no'},'setqueueentryvar':{'type':Sequelize[_0x4e77('0x4')](_0x4e77('0x19'),'no'),'defautValue':'no'},'setqueuevar':{'type':Sequelize[_0x4e77('0x4')](_0x4e77('0x19'),'no'),'defaultValue':'no'},'eventmemberstatus':{'type':Sequelize[_0x4e77('0x4')](_0x4e77('0x19'),'no'),'defaultValue':'no'},'membermacro':{'type':Sequelize[_0x4e77('0x2')],'allowNull':!![]},'membergosub':{'type':Sequelize[_0x4e77('0x2')],'allowNull':!![]},'announce_frequency':{'type':Sequelize['INTEGER'](0xb),'defaultValue':0x0},'min_announce_frequency':{'type':Sequelize[_0x4e77('0x18')](0xb),'defaultValue':0x0},'periodic_announce_frequency':{'type':Sequelize[_0x4e77('0x18')](0xb),'defaultValue':0x0},'random_periodic_announce':{'type':Sequelize['ENUM']('yes','no'),'defaultValue':'no'},'relative_periodic_announce':{'type':Sequelize[_0x4e77('0x4')](_0x4e77('0x19'),'no'),'defaultValue':_0x4e77('0x19')},'announce_holdtime':{'type':Sequelize[_0x4e77('0x4')]('yes','no','once'),'defaultValue':'no'},'announce_position':{'type':Sequelize[_0x4e77('0x2')],'defaultValue':'no'},'announce_to_first_user':{'type':Sequelize[_0x4e77('0x4')]('yes','no')},'announce_position_limit':{'type':Sequelize[_0x4e77('0x18')](0xb)},'announce_round_seconds':{'type':Sequelize[_0x4e77('0x4')]('0','5','10','15','20','30'),'defaultValue':'0'},'monitor_format':{'type':Sequelize[_0x4e77('0x2')],'defaultValue':''},'monitor_type':{'type':Sequelize[_0x4e77('0x2')]},'queue_youarenext':{'type':Sequelize['STRING'],'defaultValue':null},'queue_thereare':{'type':Sequelize[_0x4e77('0x2')],'defaultValue':null},'queue_callswaiting':{'type':Sequelize[_0x4e77('0x2')],'defaultValue':null},'queue_holdtime':{'type':Sequelize[_0x4e77('0x2')],'defaultValue':null},'queue_minute':{'type':Sequelize['STRING'],'allowNull':!![],'defaultValue':null},'queue_minutes':{'type':Sequelize[_0x4e77('0x2')],'defaultValue':null},'queue_seconds':{'type':Sequelize[_0x4e77('0x2')],'defaultValue':null},'queue_thankyou':{'type':Sequelize[_0x4e77('0x2')],'defaultValue':null},'queue_reporthold':{'type':Sequelize['STRING']},'queue_quantity1':{'type':Sequelize[_0x4e77('0x2')]},'queue_quantity2':{'type':Sequelize[_0x4e77('0x2')]},'queue_periodic_announce':{'type':Sequelize[_0x4e77('0x2')]},'queue_less_than':{'type':Sequelize[_0x4e77('0x2')]},'periodic_announce':{'type':Sequelize['TEXT'],'set':function(_0x546edb){this[_0x4e77('0xf')](_0x4e77('0x1b'),_0x546edb?_0x546edb[_0x4e77('0x1c')](','):[]);},'get':function(){return this[_0x4e77('0x10')](_0x4e77('0x1b'))?this[_0x4e77('0x10')](_0x4e77('0x1b'))[_0x4e77('0x1d')](','):[];}},'joinempty':{'type':Sequelize[_0x4e77('0x2')],'defaultValue':'yes','set':function(_0x4b9317){this[_0x4e77('0xf')](_0x4e77('0x1e'),_0x4b9317?_0x4b9317['join'](','):undefined);},'get':function(){return this[_0x4e77('0x10')]('joinempty')?this[_0x4e77('0x10')](_0x4e77('0x1e'))[_0x4e77('0x1d')](','):undefined;}},'leavewhenempty':{'type':Sequelize['STRING'],'defaultValue':'no','set':function(_0x5444c0){this[_0x4e77('0xf')]('leavewhenempty',_0x5444c0?_0x5444c0[_0x4e77('0x1c')](','):undefined);},'get':function(){return this[_0x4e77('0x10')](_0x4e77('0x1f'))?this[_0x4e77('0x10')]('leavewhenempty')[_0x4e77('0x1d')](','):undefined;}},'reportholdtime':{'type':Sequelize['ENUM'](_0x4e77('0x19'),'no'),'defaultValue':'no'},'ringinuse':{'type':Sequelize[_0x4e77('0x4')](_0x4e77('0x19'),'no'),'defaultValue':'no'},'memberdelay':{'type':Sequelize[_0x4e77('0x18')](0xb),'defaultValue':0x0},'timeoutrestart':{'type':Sequelize['ENUM'](_0x4e77('0x19'),'no'),'defaultValue':'no'},'defaultrule':{'type':Sequelize['STRING']},'description':{'type':Sequelize[_0x4e77('0x2')]},'acw':{'type':Sequelize['BOOLEAN'],'defaultValue':0x0,'set':function(_0x11634f){this[_0x4e77('0xf')](_0x4e77('0x20'),_0x11634f);if(_0x11634f){if(this[_0x4e77('0x10')](_0x4e77('0x21'))<0x2){this[_0x4e77('0xf')](_0x4e77('0x21'),0x2);}}}},'acwTimeout':{'type':Sequelize[_0x4e77('0x18')](0xb),'defaultValue':0xa},'dialActive':{'type':Sequelize[_0x4e77('0x22')],'defaultValue':0x0,'comment':'Active/Disactive\x20Campaign'},'dialMethod':{'type':Sequelize['ENUM'](_0x4e77('0x13'),_0x4e77('0x23'),_0x4e77('0x24'),_0x4e77('0x25'),_0x4e77('0x14')),'defaultValue':_0x4e77('0x23'),'comment':_0x4e77('0x26')},'dialLimitChannel':{'type':Sequelize[_0x4e77('0x18')](0x4)[_0x4e77('0x27')],'defaultValue':0x0,'validate':{'min':0x0,'max':0x270f},'comment':_0x4e77('0x28')},'dialLimitQueue':{'type':Sequelize['INTEGER'](0x4)[_0x4e77('0x27')],'defaultValue':0x0,'validate':{'min':0x0,'max':0x270f},'comment':'Max\x209999\x20member\x20in\x20queue(min:1,\x20max:9999),\x200\x20means\x20unlimited.'},'dialPowerLevel':{'type':Sequelize[_0x4e77('0x29')](0x2)[_0x4e77('0x27')],'defaultValue':0x1,'validate':{'min':0x1,'max':0xa},'comment':_0x4e77('0x2a')},'dialPredictiveOptimization':{'type':Sequelize[_0x4e77('0x4')](_0x4e77('0x2b'),_0x4e77('0x2c')),'defaultValue':_0x4e77('0x2c'),'comment':_0x4e77('0x2d')},'dialPredictiveOptimizationPercentage':{'type':Sequelize[_0x4e77('0x29')](0x2)[_0x4e77('0x27')],'defaultValue':0x3,'validate':{'min':0x1,'max':0x5f},'comment':_0x4e77('0x2e')},'dialPredictiveInterval':{'type':Sequelize[_0x4e77('0x18')](0x3)['UNSIGNED'],'defaultValue':0xa,'validate':{'min':0x5,'max':0x1e},'comment':_0x4e77('0x2f')},'dialOriginateCallerIdName':{'type':Sequelize[_0x4e77('0x2')]},'dialOriginateCallerIdNumber':{'type':Sequelize[_0x4e77('0x2')]},'dialOriginateTimeout':{'type':Sequelize[_0x4e77('0x18')](0x3)[_0x4e77('0x27')],'defaultValue':0x1e,'validate':{'min':0x1,'max':0x3e7},'comment':_0x4e77('0x30')},'dialQueueOptions':{'type':Sequelize[_0x4e77('0x2')],'defaultValue':'tTxX','comment':_0x4e77('0x31')},'dialQueueTimeout':{'type':Sequelize[_0x4e77('0x18')](0x3)[_0x4e77('0x27')],'defaultValue':0x3,'validate':{'min':0x1,'max':0x3e7},'comment':_0x4e77('0x32')},'dialQueueProject':{'type':Sequelize['STRING'],'comment':_0x4e77('0x33')},'dialCongestionMaxRetry':{'type':Sequelize[_0x4e77('0x18')](0x3)['UNSIGNED'],'defaultValue':0x3,'validate':{'min':0x1,'max':0x3e7},'comment':_0x4e77('0x34')},'dialCongestionRetryFrequency':{'type':Sequelize['INTEGER'](0x5)[_0x4e77('0x27')],'validate':{'min':0x1,'max':0x1869f},'defaultValue':0x96,'comment':'Congestion\x20Retry\x20Frequency\x20Minutes\x20(min:1,\x20max:99999)'},'dialBusyMaxRetry':{'type':Sequelize[_0x4e77('0x18')](0x3)[_0x4e77('0x27')],'defaultValue':0x3,'validate':{'min':0x1,'max':0x3e7},'comment':_0x4e77('0x35')},'dialBusyRetryFrequency':{'type':Sequelize['INTEGER'](0x5)[_0x4e77('0x27')],'validate':{'min':0x1,'max':0x1869f},'defaultValue':0x96,'comment':'Busy\x20Retry\x20Frequency\x20Minutes\x20(min:1,\x20max:99999)'},'dialNoAnswerMaxRetry':{'type':Sequelize['INTEGER'](0x3)[_0x4e77('0x27')],'defaultValue':0x3,'comment':_0x4e77('0x36')},'dialNoAnswerRetryFrequency':{'type':Sequelize[_0x4e77('0x18')](0x5)[_0x4e77('0x27')],'validate':{'min':0x1,'max':0x1869f},'defaultValue':0x96,'comment':_0x4e77('0x37')},'dialGlobalMaxRetry':{'type':Sequelize[_0x4e77('0x18')](0x3)[_0x4e77('0x27')],'validate':{'min':0x1,'max':0x3e7},'defaultValue':0x4,'comment':'#Global\x20Max\x20Retry\x20(min:1,\x20max:999)'},'dialTimezone':{'type':Sequelize[_0x4e77('0x2')],'defaultValue':null},'dialGlobalInterval':{'type':Sequelize[_0x4e77('0x2')],'defaultValue':_0x4e77('0x38')},'dialPrefix':{'type':Sequelize[_0x4e77('0x2')],'defaultValue':null},'dialCheckDuplicateType':{'type':Sequelize['ENUM'](_0x4e77('0x39'),_0x4e77('0x3a'),'onlyIfOpen'),'defaultValue':_0x4e77('0x39')},'dialAMDActive':{'type':Sequelize[_0x4e77('0x22')],'defaultValue':0x0,'comment':_0x4e77('0x3b')},'dialAMDInitialSilence':{'type':Sequelize[_0x4e77('0x18')](0x9)[_0x4e77('0x27')],'defaultValue':0x9c4,'validate':{'min':0x0},'comment':_0x4e77('0x3c')},'dialAMDGreeting':{'type':Sequelize[_0x4e77('0x18')](0x9)[_0x4e77('0x27')],'defaultValue':0x5dc,'validate':{'min':0x0},'comment':_0x4e77('0x3d')},'dialAMDAfterGreetingSilence':{'type':Sequelize[_0x4e77('0x18')](0x9)[_0x4e77('0x27')],'defaultValue':0x320,'validate':{'min':0x0},'comment':_0x4e77('0x3e')},'dialAMDTotalAnalysisTime':{'type':Sequelize['INTEGER'](0x9)[_0x4e77('0x27')],'defaultValue':0x1388,'validate':{'min':0x0},'comment':'#AMD\x20Total\x20Analysis\x20Time'},'dialAMDMinWordLength':{'type':Sequelize[_0x4e77('0x18')](0x9)[_0x4e77('0x27')],'defaultValue':0x64,'validate':{'min':0x0},'comment':_0x4e77('0x3f')},'dialAMDBetweenWordsSilence':{'type':Sequelize[_0x4e77('0x18')](0x9)['UNSIGNED'],'defaultValue':0x32,'validate':{'min':0x0},'comment':'#AMD\x20Between\x20Words\x20Silence'},'dialAMDMaximumNumberOfWords':{'type':Sequelize[_0x4e77('0x18')](0x9)['UNSIGNED'],'defaultValue':0x3,'validate':{'min':0x0},'comment':_0x4e77('0x40')},'dialAMDSilenceThreshold':{'type':Sequelize[_0x4e77('0x18')](0x5)[_0x4e77('0x27')],'validate':{'min':0x0,'max':0x7fff},'defaultValue':0x100,'comment':_0x4e77('0x41')},'dialAMDMaximumWordLength':{'type':Sequelize['INTEGER'](0x9)[_0x4e77('0x27')],'defaultValue':0x1388,'validate':{'min':0x0},'comment':_0x4e77('0x42')},'dialRecallMeTimeout':{'type':Sequelize[_0x4e77('0x18')](0x5)[_0x4e77('0x27')],'validate':{'min':0x1},'defaultValue':0x1e,'comment':_0x4e77('0x43')},'dialRecallInQueue':{'type':Sequelize[_0x4e77('0x22')],'defaultValue':0x0,'comment':_0x4e77('0x44')},'dialOrderByScheduledAt':{'type':Sequelize['ENUM'](_0x4e77('0x45'),'ASC'),'defaultValue':_0x4e77('0x45')},'dialQueueProject2':{'type':Sequelize[_0x4e77('0x2')],'comment':_0x4e77('0x33')},'dialAgiAfterHangupClient':{'type':Sequelize[_0x4e77('0x22')],'defaultValue':![]},'dialAgiAfterHangupAgent':{'type':Sequelize[_0x4e77('0x22')],'defaultValue':![]},'dialRandomLastDigitCallerIdNumber':{'type':Sequelize['INTEGER'](0x3)[_0x4e77('0x27')],'validate':{'min':0x0,'max':0xf},'defaultValue':0x0,'comment':_0x4e77('0x46')},'dialCutDigit':{'type':Sequelize[_0x4e77('0x18')](0x3)[_0x4e77('0x27')],'validate':{'min':0x0,'max':0xf},'defaultValue':0x0,'comment':_0x4e77('0x47')},'dialNoSuchNumberMaxRetry':{'type':Sequelize[_0x4e77('0x18')](0x3)['UNSIGNED'],'defaultValue':0x3,'validate':{'min':0x1,'max':0x3e7},'comment':_0x4e77('0x48')},'dialNoSuchNumberRetryFrequency':{'type':Sequelize[_0x4e77('0x18')](0x5)[_0x4e77('0x27')],'validate':{'min':0x1,'max':0x1869f},'defaultValue':0x96,'comment':_0x4e77('0x49')},'dialDropMaxRetry':{'type':Sequelize[_0x4e77('0x18')](0x3)[_0x4e77('0x27')],'defaultValue':0x3,'validate':{'min':0x1,'max':0x3e7},'comment':'#Drop\x20Retry\x20(min:1,\x20max:999)'},'dialDropRetryFrequency':{'type':Sequelize['INTEGER'](0x5)['UNSIGNED'],'validate':{'min':0x1,'max':0x1869f},'defaultValue':0x96,'comment':_0x4e77('0x4a')},'dialAbandonedMaxRetry':{'type':Sequelize[_0x4e77('0x18')](0x3)[_0x4e77('0x27')],'defaultValue':0x3,'validate':{'min':0x1,'max':0x3e7},'comment':_0x4e77('0x4b')},'dialAbandonedRetryFrequency':{'type':Sequelize[_0x4e77('0x18')](0x5)[_0x4e77('0x27')],'validate':{'min':0x1,'max':0x1869f},'defaultValue':0x96,'comment':_0x4e77('0x4c')},'dialMachineMaxRetry':{'type':Sequelize[_0x4e77('0x18')](0x3)[_0x4e77('0x27')],'defaultValue':0x3,'validate':{'min':0x1,'max':0x3e7},'comment':_0x4e77('0x4d')},'dialMachineRetryFrequency':{'type':Sequelize[_0x4e77('0x18')](0x5)[_0x4e77('0x27')],'validate':{'min':0x1,'max':0x1869f},'defaultValue':0x96,'comment':_0x4e77('0x4e')},'dialAgentRejectMaxRetry':{'type':Sequelize[_0x4e77('0x18')](0x3)[_0x4e77('0x27')],'defaultValue':0x3,'validate':{'min':0x1,'max':0x3e7},'comment':'#AgentReject\x20Retry\x20(min:1,\x20max:999)'},'dialAgentRejectRetryFrequency':{'type':Sequelize[_0x4e77('0x18')](0x5)[_0x4e77('0x27')],'validate':{'min':0x1,'max':0x1869f},'defaultValue':0x96,'comment':'AgentReject\x20Retry\x20Frequency\x20Minutes\x20(min:1,\x20max:99999)'},'mandatoryDispositionPauseId':{'type':Sequelize['INTEGER'],'allowNull':!![],'comment':_0x4e77('0x4f')},'mandatoryDisposition':{'type':Sequelize[_0x4e77('0x22')],'defaultValue':![],'comment':_0x4e77('0x50'),'set':function(_0x56c86f){if(!_0x56c86f)this[_0x4e77('0xf')](_0x4e77('0x51'),null);this[_0x4e77('0xf')](_0x4e77('0x52'),_0x56c86f);}},'dialPredictiveIntervalMaxThreshold':{'type':Sequelize['INTEGER'](0x3)['UNSIGNED'],'defaultValue':0x14,'validate':{'min':0x1,'max':0x64}},'dialPredictiveIntervalMinThreshold':{'type':Sequelize[_0x4e77('0x18')](0x3)[_0x4e77('0x27')],'defaultValue':0xa,'validate':{'min':0x1,'max':0x64}},'dialPreviewAutoRecallMe':{'type':Sequelize[_0x4e77('0x22')],'defaultValue':!![]},'callAdditionalPhoneAfterMin':{'type':Sequelize[_0x4e77('0x18')](0x3)[_0x4e77('0x27')],'defaultValue':0x4},'dialPreviewRecallmeReminder':{'type':Sequelize[_0x4e77('0x22')],'defaultValue':![]}}; \ No newline at end of file +var _0x74c8=['Status\x20to\x20put\x20when\x20mandatory\x20disposition\x20is\x20enabled','Enabled/disables\x20mandatory\x20dispo\x20on\x20a\x20queue','mandatoryDispositionPauseId','sequelize','STRING','name','inbound','random','rrmemory','wrandom','rrordered','ringall','setDataValue','strategy','getDataValue','type','dialMethod','outbound','preview','booked','roundrobin','includes','INTEGER','ENUM','yes','all','once','TEXT','periodic_announce','join','split','joinempty','leavewhenempty','acw','wrapuptime','Active/Disactive\x20Campaign','progressive','power','predictive','Dial\x20Method.','UNSIGNED','Max\x209999\x20channels,\x200\x20means\x20unlimited.','Max\x209999\x20member\x20in\x20queue(min:1,\x20max:9999),\x200\x20means\x20unlimited.','agentBusyFactor','FLOAT','Interval\x20Predictive\x20Minutes\x20(min:5\x20max:30)','Originate\x20Timeout\x20Seconds\x20(min:1,\x20max:999)','Queue\x20Timeout\x20Seconds\x20(min:1,\x20max:999)','#Congestion\x20Retry\x20(min:1,\x20max:999)','Congestion\x20Retry\x20Frequency\x20Minutes\x20(min:1,\x20max:99999)','#Busy\x20Retry\x20(min:1,\x20max:999)','Busy\x20Retry\x20Frequency\x20Minutes\x20(min:1,\x20max:99999)','#NoAnswer\x20Retry\x20(min:1,\x20max:999)','NoAnswer\x20Retry\x20Frequency\x20Minutes\x20(min:1,\x20max:99999)','#Global\x20Max\x20Retry\x20(min:1,\x20max:999)','07:00-22:00,*,*,*','always','never','onlyIfOpen','BOOLEAN','Active/Disactive\x20AMD','#AMD\x20Initial\x20Silence','#AMD\x20After\x20Greeting\x20Silence','#AMD\x20Total\x20Analysis\x20Time','#AMD\x20Min\x20Word\x20Length','#AMD\x20Between\x20Words\x20Silence','#AMD\x20Silence\x20Threshold\x20(min:0,\x20max:32767)','#RecallMe\x20Timeout\x20(min:1)','Active/Disactive\x20Recall\x20In\x20Queue','DESC','ASC','AGI\x20queue\x20option\x20(use:\x20agi://127.0.0.1/square,)','#NoSuchNumber\x20Retry\x20(min:1,\x20max:999)','Abandoned\x20Retry\x20Frequency\x20Minutes\x20(min:1,\x20max:99999)','#Machine\x20Retry\x20(min:1,\x20max:999)','Machine\x20Retry\x20Frequency\x20Minutes\x20(min:1,\x20max:99999)','#AgentReject\x20Retry\x20(min:1,\x20max:999)','AgentReject\x20Retry\x20Frequency\x20Minutes\x20(min:1,\x20max:99999)'];(function(_0x16c93f,_0x2a921d){var _0x54327a=function(_0x57f30e){while(--_0x57f30e){_0x16c93f['push'](_0x16c93f['shift']());}};_0x54327a(++_0x2a921d);}(_0x74c8,0x1d7));var _0x874c=function(_0x268473,_0xc9f239){_0x268473=_0x268473-0x0;var _0x56d376=_0x74c8[_0x268473];return _0x56d376;};'use strict';var Sequelize=require(_0x874c('0x0'));module['exports']={'name':{'type':Sequelize[_0x874c('0x1')],'allowNull':![],'unique':_0x874c('0x2'),'validate':{'notEmpty':!![],'is':/^[A-Za-z0-9\.\_]+$/i}},'type':{'type':Sequelize['ENUM'](_0x874c('0x3'),'outbound'),'allowNull':![],'defaultValue':_0x874c('0x3')},'musiconhold':{'type':Sequelize[_0x874c('0x1')],'defaultValue':'default'},'announce':{'type':Sequelize[_0x874c('0x1')],'defaultValue':''},'strategy':{'type':Sequelize['ENUM']('rr','ringall','leastrecent','fewestcalls',_0x874c('0x4'),_0x874c('0x5'),'linear',_0x874c('0x6'),_0x874c('0x7')),'allowNull':![],'defaultValue':_0x874c('0x8'),'set':function(_0x332158){this[_0x874c('0x9')](_0x874c('0xa'),_0x332158?_0x332158:'rrmemory');},'get':function(){var _0x4f6b49=this[_0x874c('0xb')](_0x874c('0xc'));var _0x2ca98d=this[_0x874c('0xb')](_0x874c('0xd'));var _0x4fd130=this[_0x874c('0xb')](_0x874c('0xa'));if(_0x4f6b49===_0x874c('0xe')){if(_0x2ca98d===_0x874c('0xf')){return null;}if(_0x2ca98d===_0x874c('0x10')&&![_0x874c('0x5'),_0x874c('0x11')][_0x874c('0x12')](_0x4fd130)){this['setDataValue'](_0x874c('0xa'),_0x874c('0x5'));}}return _0x4fd130;}},'servicelevel':{'type':Sequelize['INTEGER'](0xb),'defaultValue':0x0},'context':{'type':Sequelize['STRING'],'defaultValue':null},'penaltymemberslimit':{'type':Sequelize[_0x874c('0x13')](0xb)},'timeout':{'type':Sequelize[_0x874c('0x13')](0xb),'defaultValue':0xf},'retry':{'type':Sequelize[_0x874c('0x13')](0xb),'defaultValue':0x2},'timeoutpriority':{'type':Sequelize['STRING']},'weight':{'type':Sequelize[_0x874c('0x13')](0xb),'allowNull':!![],'defaultValue':0x0},'wrapuptime':{'type':Sequelize[_0x874c('0x13')](0xb),'defaultValue':0x0},'autofill':{'type':Sequelize[_0x874c('0x14')](_0x874c('0x15'),'no'),'defaultValue':_0x874c('0x15')},'autopause':{'type':Sequelize['ENUM'](_0x874c('0x15'),'no',_0x874c('0x16')),'defaultValue':'no'},'autopausedelay':{'type':Sequelize[_0x874c('0x13')](0xb)},'autopausebusy':{'type':Sequelize[_0x874c('0x14')]('yes','no'),'defaultValue':'no'},'autopauseunavail':{'type':Sequelize[_0x874c('0x14')](_0x874c('0x15'),'no'),'defaultValue':'no'},'maxlen':{'type':Sequelize[_0x874c('0x13')](0xb),'defaultValue':0x0},'setinterfacevar':{'type':Sequelize['ENUM'](_0x874c('0x15'),'no'),'defaultValue':'no'},'setqueueentryvar':{'type':Sequelize[_0x874c('0x14')](_0x874c('0x15'),'no'),'defautValue':'no'},'setqueuevar':{'type':Sequelize[_0x874c('0x14')](_0x874c('0x15'),'no'),'defaultValue':'no'},'eventmemberstatus':{'type':Sequelize[_0x874c('0x14')](_0x874c('0x15'),'no'),'defaultValue':'no'},'membermacro':{'type':Sequelize['STRING'],'allowNull':!![]},'membergosub':{'type':Sequelize[_0x874c('0x1')],'allowNull':!![]},'announce_frequency':{'type':Sequelize['INTEGER'](0xb),'defaultValue':0x0},'min_announce_frequency':{'type':Sequelize[_0x874c('0x13')](0xb),'defaultValue':0x0},'periodic_announce_frequency':{'type':Sequelize['INTEGER'](0xb),'defaultValue':0x0},'random_periodic_announce':{'type':Sequelize['ENUM']('yes','no'),'defaultValue':'no'},'relative_periodic_announce':{'type':Sequelize[_0x874c('0x14')](_0x874c('0x15'),'no'),'defaultValue':_0x874c('0x15')},'announce_holdtime':{'type':Sequelize[_0x874c('0x14')](_0x874c('0x15'),'no',_0x874c('0x17')),'defaultValue':'no'},'announce_position':{'type':Sequelize[_0x874c('0x1')],'defaultValue':'no'},'announce_to_first_user':{'type':Sequelize['ENUM']('yes','no')},'announce_position_limit':{'type':Sequelize[_0x874c('0x13')](0xb)},'announce_round_seconds':{'type':Sequelize[_0x874c('0x14')]('0','5','10','15','20','30'),'defaultValue':'0'},'monitor_format':{'type':Sequelize[_0x874c('0x1')],'defaultValue':''},'monitor_type':{'type':Sequelize['STRING']},'queue_youarenext':{'type':Sequelize[_0x874c('0x1')],'defaultValue':null},'queue_thereare':{'type':Sequelize[_0x874c('0x1')],'defaultValue':null},'queue_callswaiting':{'type':Sequelize[_0x874c('0x1')],'defaultValue':null},'queue_holdtime':{'type':Sequelize[_0x874c('0x1')],'defaultValue':null},'queue_minute':{'type':Sequelize[_0x874c('0x1')],'allowNull':!![],'defaultValue':null},'queue_minutes':{'type':Sequelize['STRING'],'defaultValue':null},'queue_seconds':{'type':Sequelize['STRING'],'defaultValue':null},'queue_thankyou':{'type':Sequelize['STRING'],'defaultValue':null},'queue_reporthold':{'type':Sequelize[_0x874c('0x1')]},'queue_quantity1':{'type':Sequelize[_0x874c('0x1')]},'queue_quantity2':{'type':Sequelize['STRING']},'queue_periodic_announce':{'type':Sequelize['STRING']},'queue_less_than':{'type':Sequelize[_0x874c('0x1')]},'periodic_announce':{'type':Sequelize[_0x874c('0x18')],'set':function(_0x4ea32b){this[_0x874c('0x9')](_0x874c('0x19'),_0x4ea32b?_0x4ea32b[_0x874c('0x1a')](','):[]);},'get':function(){return this[_0x874c('0xb')]('periodic_announce')?this[_0x874c('0xb')](_0x874c('0x19'))[_0x874c('0x1b')](','):[];}},'joinempty':{'type':Sequelize[_0x874c('0x1')],'defaultValue':_0x874c('0x15'),'set':function(_0x156a44){this[_0x874c('0x9')](_0x874c('0x1c'),_0x156a44?_0x156a44[_0x874c('0x1a')](','):undefined);},'get':function(){return this['getDataValue']('joinempty')?this[_0x874c('0xb')]('joinempty')[_0x874c('0x1b')](','):undefined;}},'leavewhenempty':{'type':Sequelize[_0x874c('0x1')],'defaultValue':'no','set':function(_0x56ac3b){this['setDataValue']('leavewhenempty',_0x56ac3b?_0x56ac3b[_0x874c('0x1a')](','):undefined);},'get':function(){return this[_0x874c('0xb')]('leavewhenempty')?this['getDataValue'](_0x874c('0x1d'))[_0x874c('0x1b')](','):undefined;}},'reportholdtime':{'type':Sequelize['ENUM'](_0x874c('0x15'),'no'),'defaultValue':'no'},'ringinuse':{'type':Sequelize[_0x874c('0x14')](_0x874c('0x15'),'no'),'defaultValue':'no'},'memberdelay':{'type':Sequelize[_0x874c('0x13')](0xb),'defaultValue':0x0},'timeoutrestart':{'type':Sequelize[_0x874c('0x14')](_0x874c('0x15'),'no'),'defaultValue':'no'},'defaultrule':{'type':Sequelize['STRING']},'description':{'type':Sequelize['STRING']},'acw':{'type':Sequelize['BOOLEAN'],'defaultValue':0x0,'set':function(_0x35f45c){this['setDataValue'](_0x874c('0x1e'),_0x35f45c);if(_0x35f45c){if(this[_0x874c('0xb')](_0x874c('0x1f'))<0x2){this['setDataValue'](_0x874c('0x1f'),0x2);}}}},'acwTimeout':{'type':Sequelize[_0x874c('0x13')](0xb),'defaultValue':0xa},'dialActive':{'type':Sequelize['BOOLEAN'],'defaultValue':0x0,'comment':_0x874c('0x20')},'dialMethod':{'type':Sequelize[_0x874c('0x14')](_0x874c('0xf'),_0x874c('0x21'),_0x874c('0x22'),_0x874c('0x23'),'booked'),'defaultValue':'progressive','comment':_0x874c('0x24')},'dialLimitChannel':{'type':Sequelize[_0x874c('0x13')](0x4)[_0x874c('0x25')],'defaultValue':0x0,'validate':{'min':0x0,'max':0x270f},'comment':_0x874c('0x26')},'dialLimitQueue':{'type':Sequelize[_0x874c('0x13')](0x4)['UNSIGNED'],'defaultValue':0x0,'validate':{'min':0x0,'max':0x270f},'comment':_0x874c('0x27')},'dialPowerLevel':{'type':Sequelize['FLOAT'](0x2)[_0x874c('0x25')],'defaultValue':0x1,'validate':{'min':0x1,'max':0xa},'comment':'Power\x20Level:\x20Calls\x20for\x20agents\x20(min:1,\x20max:10).'},'dialPredictiveOptimization':{'type':Sequelize['ENUM'](_0x874c('0x28'),'dropRate'),'defaultValue':'dropRate','comment':'Only\x20for\x20predictive\x20method.'},'dialPredictiveOptimizationPercentage':{'type':Sequelize[_0x874c('0x29')](0x2)[_0x874c('0x25')],'defaultValue':0x3,'validate':{'min':0x1,'max':0x5f},'comment':'Predictive\x20Optimization\x20Percentage\x20(min:\x201,\x20max:\x2095)'},'dialPredictiveInterval':{'type':Sequelize['INTEGER'](0x3)[_0x874c('0x25')],'defaultValue':0xa,'validate':{'min':0x5,'max':0x1e},'comment':_0x874c('0x2a')},'dialOriginateCallerIdName':{'type':Sequelize['STRING']},'dialOriginateCallerIdNumber':{'type':Sequelize[_0x874c('0x1')]},'dialOriginateTimeout':{'type':Sequelize[_0x874c('0x13')](0x3)['UNSIGNED'],'defaultValue':0x1e,'validate':{'min':0x1,'max':0x3e7},'comment':_0x874c('0x2b')},'dialQueueOptions':{'type':Sequelize[_0x874c('0x1')],'defaultValue':'tTxX','comment':'https://wiki.asterisk.org/wiki/display/AST/Asterisk+13+Application_Queue'},'dialQueueTimeout':{'type':Sequelize[_0x874c('0x13')](0x3)[_0x874c('0x25')],'defaultValue':0x3,'validate':{'min':0x1,'max':0x3e7},'comment':_0x874c('0x2c')},'dialQueueProject':{'type':Sequelize['STRING'],'comment':'AGI\x20queue\x20option\x20(use:\x20agi://127.0.0.1/square,)'},'dialCongestionMaxRetry':{'type':Sequelize[_0x874c('0x13')](0x3)[_0x874c('0x25')],'defaultValue':0x3,'validate':{'min':0x1,'max':0x3e7},'comment':_0x874c('0x2d')},'dialCongestionRetryFrequency':{'type':Sequelize['INTEGER'](0x5)[_0x874c('0x25')],'validate':{'min':0x1,'max':0x1869f},'defaultValue':0x96,'comment':_0x874c('0x2e')},'dialBusyMaxRetry':{'type':Sequelize['INTEGER'](0x3)[_0x874c('0x25')],'defaultValue':0x3,'validate':{'min':0x1,'max':0x3e7},'comment':_0x874c('0x2f')},'dialBusyRetryFrequency':{'type':Sequelize[_0x874c('0x13')](0x5)[_0x874c('0x25')],'validate':{'min':0x1,'max':0x1869f},'defaultValue':0x96,'comment':_0x874c('0x30')},'dialNoAnswerMaxRetry':{'type':Sequelize[_0x874c('0x13')](0x3)[_0x874c('0x25')],'defaultValue':0x3,'comment':_0x874c('0x31')},'dialNoAnswerRetryFrequency':{'type':Sequelize[_0x874c('0x13')](0x5)[_0x874c('0x25')],'validate':{'min':0x1,'max':0x1869f},'defaultValue':0x96,'comment':_0x874c('0x32')},'dialGlobalMaxRetry':{'type':Sequelize['INTEGER'](0x3)[_0x874c('0x25')],'validate':{'min':0x1,'max':0x3e7},'defaultValue':0x4,'comment':_0x874c('0x33')},'dialTimezone':{'type':Sequelize['STRING'],'defaultValue':null},'dialGlobalInterval':{'type':Sequelize[_0x874c('0x1')],'defaultValue':_0x874c('0x34')},'dialPrefix':{'type':Sequelize[_0x874c('0x1')],'defaultValue':null},'dialCheckDuplicateType':{'type':Sequelize[_0x874c('0x14')](_0x874c('0x35'),_0x874c('0x36'),_0x874c('0x37')),'defaultValue':_0x874c('0x35')},'dialAMDActive':{'type':Sequelize[_0x874c('0x38')],'defaultValue':0x0,'comment':_0x874c('0x39')},'dialAMDInitialSilence':{'type':Sequelize['INTEGER'](0x9)[_0x874c('0x25')],'defaultValue':0x9c4,'validate':{'min':0x0},'comment':_0x874c('0x3a')},'dialAMDGreeting':{'type':Sequelize[_0x874c('0x13')](0x9)[_0x874c('0x25')],'defaultValue':0x5dc,'validate':{'min':0x0},'comment':'#AMD\x20Greeting'},'dialAMDAfterGreetingSilence':{'type':Sequelize[_0x874c('0x13')](0x9)['UNSIGNED'],'defaultValue':0x320,'validate':{'min':0x0},'comment':_0x874c('0x3b')},'dialAMDTotalAnalysisTime':{'type':Sequelize[_0x874c('0x13')](0x9)[_0x874c('0x25')],'defaultValue':0x1388,'validate':{'min':0x0},'comment':_0x874c('0x3c')},'dialAMDMinWordLength':{'type':Sequelize[_0x874c('0x13')](0x9)[_0x874c('0x25')],'defaultValue':0x64,'validate':{'min':0x0},'comment':_0x874c('0x3d')},'dialAMDBetweenWordsSilence':{'type':Sequelize[_0x874c('0x13')](0x9)[_0x874c('0x25')],'defaultValue':0x32,'validate':{'min':0x0},'comment':_0x874c('0x3e')},'dialAMDMaximumNumberOfWords':{'type':Sequelize[_0x874c('0x13')](0x9)[_0x874c('0x25')],'defaultValue':0x3,'validate':{'min':0x0},'comment':'#AMD\x20Maximum\x20Number\x20Of\x20Words'},'dialAMDSilenceThreshold':{'type':Sequelize['INTEGER'](0x5)['UNSIGNED'],'validate':{'min':0x0,'max':0x7fff},'defaultValue':0x100,'comment':_0x874c('0x3f')},'dialAMDMaximumWordLength':{'type':Sequelize[_0x874c('0x13')](0x9)['UNSIGNED'],'defaultValue':0x1388,'validate':{'min':0x0},'comment':'#AMD\x20Maximum\x20Word\x20Length'},'dialRecallMeTimeout':{'type':Sequelize[_0x874c('0x13')](0x5)[_0x874c('0x25')],'validate':{'min':0x1},'defaultValue':0x1e,'comment':_0x874c('0x40')},'dialRecallInQueue':{'type':Sequelize[_0x874c('0x38')],'defaultValue':0x0,'comment':_0x874c('0x41')},'dialOrderByScheduledAt':{'type':Sequelize[_0x874c('0x14')](_0x874c('0x42'),_0x874c('0x43')),'defaultValue':_0x874c('0x42')},'dialQueueProject2':{'type':Sequelize[_0x874c('0x1')],'comment':_0x874c('0x44')},'dialAgiAfterHangupClient':{'type':Sequelize[_0x874c('0x38')],'defaultValue':![]},'dialAgiAfterHangupAgent':{'type':Sequelize[_0x874c('0x38')],'defaultValue':![]},'dialRandomLastDigitCallerIdNumber':{'type':Sequelize[_0x874c('0x13')](0x3)[_0x874c('0x25')],'validate':{'min':0x0,'max':0xf},'defaultValue':0x0,'comment':'Random\x20Last\x20Digit\x20(min:1,\x20max:15)'},'dialCutDigit':{'type':Sequelize['INTEGER'](0x3)[_0x874c('0x25')],'validate':{'min':0x0,'max':0xf},'defaultValue':0x0,'comment':'Cut\x20Digit\x20(min:1,\x20max:15)'},'dialNoSuchNumberMaxRetry':{'type':Sequelize[_0x874c('0x13')](0x3)[_0x874c('0x25')],'defaultValue':0x3,'validate':{'min':0x1,'max':0x3e7},'comment':_0x874c('0x45')},'dialNoSuchNumberRetryFrequency':{'type':Sequelize[_0x874c('0x13')](0x5)['UNSIGNED'],'validate':{'min':0x1,'max':0x1869f},'defaultValue':0x96,'comment':'NoSuchNumber\x20Retry\x20Frequency\x20Minutes\x20(min:1,\x20max:99999)'},'dialDropMaxRetry':{'type':Sequelize[_0x874c('0x13')](0x3)[_0x874c('0x25')],'defaultValue':0x3,'validate':{'min':0x1,'max':0x3e7},'comment':'#Drop\x20Retry\x20(min:1,\x20max:999)'},'dialDropRetryFrequency':{'type':Sequelize['INTEGER'](0x5)['UNSIGNED'],'validate':{'min':0x1,'max':0x1869f},'defaultValue':0x96,'comment':'Drop\x20Retry\x20Frequency\x20Minutes\x20(min:1,\x20max:99999)'},'dialAbandonedMaxRetry':{'type':Sequelize[_0x874c('0x13')](0x3)[_0x874c('0x25')],'defaultValue':0x3,'validate':{'min':0x1,'max':0x3e7},'comment':'#Abandoned\x20Retry\x20(min:1,\x20max:999)'},'dialAbandonedRetryFrequency':{'type':Sequelize[_0x874c('0x13')](0x5)[_0x874c('0x25')],'validate':{'min':0x1,'max':0x1869f},'defaultValue':0x96,'comment':_0x874c('0x46')},'dialMachineMaxRetry':{'type':Sequelize[_0x874c('0x13')](0x3)[_0x874c('0x25')],'defaultValue':0x3,'validate':{'min':0x1,'max':0x3e7},'comment':_0x874c('0x47')},'dialMachineRetryFrequency':{'type':Sequelize[_0x874c('0x13')](0x5)[_0x874c('0x25')],'validate':{'min':0x1,'max':0x1869f},'defaultValue':0x96,'comment':_0x874c('0x48')},'dialAgentRejectMaxRetry':{'type':Sequelize['INTEGER'](0x3)[_0x874c('0x25')],'defaultValue':0x3,'validate':{'min':0x1,'max':0x3e7},'comment':_0x874c('0x49')},'dialAgentRejectRetryFrequency':{'type':Sequelize[_0x874c('0x13')](0x5)[_0x874c('0x25')],'validate':{'min':0x1,'max':0x1869f},'defaultValue':0x96,'comment':_0x874c('0x4a')},'mandatoryDispositionPauseId':{'type':Sequelize[_0x874c('0x13')],'allowNull':!![],'comment':_0x874c('0x4b')},'mandatoryDisposition':{'type':Sequelize['BOOLEAN'],'defaultValue':![],'comment':_0x874c('0x4c'),'set':function(_0x32a0a8){if(!_0x32a0a8)this[_0x874c('0x9')](_0x874c('0x4d'),null);this['setDataValue']('mandatoryDisposition',_0x32a0a8);}},'dialPredictiveIntervalMaxThreshold':{'type':Sequelize[_0x874c('0x13')](0x3)['UNSIGNED'],'defaultValue':0x14,'validate':{'min':0x1,'max':0x64}},'dialPredictiveIntervalMinThreshold':{'type':Sequelize[_0x874c('0x13')](0x3)['UNSIGNED'],'defaultValue':0xa,'validate':{'min':0x1,'max':0x64}},'dialPreviewAutoRecallMe':{'type':Sequelize[_0x874c('0x38')],'defaultValue':!![]},'callAdditionalPhoneAfterMin':{'type':Sequelize[_0x874c('0x13')](0x3)[_0x874c('0x25')],'defaultValue':0x4},'dialPreviewRecallmeReminder':{'type':Sequelize[_0x874c('0x38')],'defaultValue':![]}}; \ No newline at end of file diff --git a/server/api/voiceQueue/voiceQueue.controller.js b/server/api/voiceQueue/voiceQueue.controller.js index 8431cf3..614b5b2 100644 --- a/server/api/voiceQueue/voiceQueue.controller.js +++ b/server/api/voiceQueue/voiceQueue.controller.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x444e=['CmList','addLists','YYYY-MM-DD\x20HH:mm:ss','dialCheckDuplicateType','always','insert','into','cm_hopper','fromQuery','phone','ContactId','ListId','field','scheduledAt','CmListId','from','cm_contacts','ListId\x20=\x20?','phone\x20NOT\x20IN\x20(?)','COALESCE(calleridnum,\x27\x27)','cm_hopper_final','VoiceQueueId\x20=\x20?','COALESCE(phone,\x27\x27)','deletedAt\x20IS\x20NULL','cm_hopper_additional_phones','CmHopperId','OrderBy','h.id','ci.item','ci.OrderBy+1','cm_contact_has_items','h.ContactId=ci.CmContactId','h.scheduledat=?','ci.ItemClass=?','PHONE','all','removeLists','getBlackLists','addBlackLists','cm_hopper_black','NOW()','phone\x20IS\x20NOT\x20NULL','removeBlackLists','eml-format','zip-dir','request-promise','bluebird','util','path','sox','to-csv','ejs','fs-extra','squel','jsforce','querystring','papaparse','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/logger','../../config/environment','../../mysqldb','redis','./voiceQueue.socket','sendStatus','status','end','json','undefined','limit','offset','count','Content-Range','apply','reject','update','then','get','VoiceQueues','inbound','QueueCampaigns','filter','ignore','map','includes','type','find','name','UserProfileResource','destroy','error','send','index','rawAttributes','fieldName','model','keys','filters','intersection','fields','query','attributes','hasOwnProperty','order','sort','where','pick','merge','VIRTUAL','options','includeAll','findAll','rows','catch','show','params','VoiceQueue','length','include','create','body','user','Unable\x20to\x20retrieve\x20the\x20current\x20user','outbound','value','UserProfileSection','userProfileId','autoAssociation','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','clone','omit','createdAt','updatedAt','role','findOne','nolimit','CmHopper','getHopperHistories','CmHopperHistory','VoiceQueueId','getHopperFinals','CmHopperFinal','getHopperBlacks','CmHopperBlack','getTeams','Team','addTeams','User','Agents','online','voicePause','flatMap','forEach','penalty','transaction','each','TeamVoiceQueue','UserVoiceQueue','findOrCreate','upsert','format','SIP/%s','interface','emit','userVoiceQueue:save','removeTeams','ids','select','tq.TeamId','team_has_voice_queues','join','user_has_teams','push','toString','QueryTypes','SELECT','every','compact','sequelize','isEmpty','removeAgents','UserVoiceQueueRt','userVoiceQueue:remove','spread','isNil','isArray','getAgents','getMembers','getLists'];(function(_0x4af20c,_0x31dd5b){var _0x3e5504=function(_0x54ef3b){while(--_0x54ef3b){_0x4af20c['push'](_0x4af20c['shift']());}};_0x3e5504(++_0x31dd5b);}(_0x444e,0xe8));var _0xe444=function(_0x19fb20,_0x33c447){_0x19fb20=_0x19fb20-0x0;var _0x2b35e2=_0x444e[_0x19fb20];return _0x2b35e2;};'use strict';var emlformat=require(_0xe444('0x0'));var rimraf=require('rimraf');var zipdir=require(_0xe444('0x1'));var jsonpatch=require('fast-json-patch');var rp=require(_0xe444('0x2'));var moment=require('moment');var BPromise=require(_0xe444('0x3'));var Mustache=require('mustache');var util=require(_0xe444('0x4'));var path=require(_0xe444('0x5'));var sox=require(_0xe444('0x6'));var csv=require(_0xe444('0x7'));var ejs=require(_0xe444('0x8'));var fs=require('fs');var fs_extra=require(_0xe444('0x9'));var _=require('lodash');var squel=require(_0xe444('0xa'));var crypto=require('crypto');var jsforce=require(_0xe444('0xb'));var deskjs=require('desk.js');var toCsv=require(_0xe444('0x7'));var querystring=require(_0xe444('0xc'));var Papa=require(_0xe444('0xd'));var Redis=require('ioredis');var authService=require('../../components/auth/service');var qs=require(_0xe444('0xe'));var as=require(_0xe444('0xf'));var hardwareService=require('../../config/license/hardware');var logger=require(_0xe444('0x10'))('api');var utils=require('../../config/utils');var config=require(_0xe444('0x11'));var licenseUtil=require('../../config/license/util');var db=require(_0xe444('0x12'))['db'];config[_0xe444('0x13')]=_['defaults'](config[_0xe444('0x13')],{'host':'localhost','port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config[_0xe444('0x13')]));require(_0xe444('0x14'))['register'](socket);function respondWithStatusCode(_0x192c1a,_0x5d739a){_0x5d739a=_0x5d739a||0xcc;return function(_0x19ab27){if(_0x19ab27){return _0x192c1a[_0xe444('0x15')](_0x5d739a);}return _0x192c1a[_0xe444('0x16')](_0x5d739a)[_0xe444('0x17')]();};}function respondWithResult(_0x363716,_0x2d44af){_0x2d44af=_0x2d44af||0xc8;return function(_0x16ab23){if(_0x16ab23){return _0x363716[_0xe444('0x16')](_0x2d44af)[_0xe444('0x18')](_0x16ab23);}};}function respondWithFilteredResult(_0x4009c7,_0x236bc4){return function(_0x3d9066){if(_0x3d9066){var _0x38879b=typeof _0x236bc4['offset']===_0xe444('0x19')&&typeof _0x236bc4[_0xe444('0x1a')]===_0xe444('0x19');var _0x2f6a4a=_0x3d9066['count'];var _0x306e05=_0x38879b?0x0:_0x236bc4[_0xe444('0x1b')];var _0x2e95bc=_0x38879b?_0x3d9066[_0xe444('0x1c')]:_0x236bc4[_0xe444('0x1b')]+_0x236bc4['limit'];var _0x21d01d;if(_0x2e95bc>=_0x2f6a4a){_0x2e95bc=_0x2f6a4a;_0x21d01d=0xc8;}else{_0x21d01d=0xce;}_0x4009c7[_0xe444('0x16')](_0x21d01d);return _0x4009c7['set'](_0xe444('0x1d'),_0x306e05+'-'+_0x2e95bc+'/'+_0x2f6a4a)['json'](_0x3d9066);}return null;};}function patchUpdates(_0x13108c){return function(_0x5c5b8){try{jsonpatch[_0xe444('0x1e')](_0x5c5b8,_0x13108c,!![]);}catch(_0x322c07){return BPromise[_0xe444('0x1f')](_0x322c07);}return _0x5c5b8['save']();};}function saveUpdates(_0x527bf5,_0x251efb){return function(_0x327064){if(_0x327064){return _0x327064[_0xe444('0x20')](_0x527bf5)[_0xe444('0x21')](function(_0x2a03a2){return _0x2a03a2;});}return null;};}function removeEntity(_0x5e0311,_0x3c9cf7){return function(_0x40a963){if(_0x40a963){return _0x40a963['destroy']()[_0xe444('0x21')](function(){var _0x4f4412=_0x40a963[_0xe444('0x22')]({'plain':!![]});var _0x26ca6f=[{'name':_0xe444('0x23'),'value':_0xe444('0x24'),'ignore':![]},{'name':_0xe444('0x25'),'value':'outbound','ignore':![]}];var _0x3015c7=_(_0x26ca6f)[_0xe444('0x26')](_0xe444('0x27'))[_0xe444('0x28')]('value')['value']();if(_[_0xe444('0x29')](_0x3015c7,_0x4f4412[_0xe444('0x2a')])){return;}var _0x33de83=_[_0xe444('0x2b')](_0x26ca6f,['value',_0x4f4412[_0xe444('0x2a')]])[_0xe444('0x2c')];return db[_0xe444('0x2d')][_0xe444('0x2e')]({'where':{'type':_0x33de83,'resourceId':_0x4f4412['id']}})['then'](function(){return _0x40a963;});})['then'](function(){_0x5e0311['status'](0xcc)[_0xe444('0x17')]();});}};}function handleEntityNotFound(_0xd4df5,_0x3d23fd){return function(_0x152e89){if(!_0x152e89){_0xd4df5[_0xe444('0x15')](0x194);}return _0x152e89;};}function handleError(_0x5ade84,_0x2c6169){_0x2c6169=_0x2c6169||0x1f4;return function(_0x64b90d){logger[_0xe444('0x2f')](_0x64b90d['stack']);if(_0x64b90d[_0xe444('0x2c')]){delete _0x64b90d['name'];}_0x5ade84['status'](_0x2c6169)[_0xe444('0x30')](_0x64b90d);};}exports[_0xe444('0x31')]=function(_0x5307d2,_0x3dd328){var _0x4f31ef={},_0x1bf90b={},_0x5dfd0e={'count':0x0,'rows':[]};var _0x4b01b9=_[_0xe444('0x28')](db['VoiceQueue'][_0xe444('0x32')],function(_0xa4ed6){return{'name':_0xa4ed6[_0xe444('0x33')],'type':_0xa4ed6[_0xe444('0x2a')]['key']};});_0x1bf90b[_0xe444('0x34')]=_[_0xe444('0x28')](_0x4b01b9,_0xe444('0x2c'));_0x1bf90b['query']=_[_0xe444('0x35')](_0x5307d2['query']);_0x1bf90b[_0xe444('0x36')]=_[_0xe444('0x37')](_0x1bf90b[_0xe444('0x34')],_0x1bf90b['query']);_0x4f31ef['attributes']=_[_0xe444('0x37')](_0x1bf90b[_0xe444('0x34')],qs[_0xe444('0x38')](_0x5307d2[_0xe444('0x39')][_0xe444('0x38')]));_0x4f31ef[_0xe444('0x3a')]=_0x4f31ef[_0xe444('0x3a')]['length']?_0x4f31ef['attributes']:_0x1bf90b[_0xe444('0x34')];if(!_0x5307d2['query'][_0xe444('0x3b')]('nolimit')){_0x4f31ef[_0xe444('0x1a')]=qs[_0xe444('0x1a')](_0x5307d2[_0xe444('0x39')][_0xe444('0x1a')]);_0x4f31ef[_0xe444('0x1b')]=qs[_0xe444('0x1b')](_0x5307d2['query'][_0xe444('0x1b')]);}_0x4f31ef[_0xe444('0x3c')]=qs[_0xe444('0x3d')](_0x5307d2[_0xe444('0x39')]['sort']);_0x4f31ef[_0xe444('0x3e')]=qs[_0xe444('0x36')](_[_0xe444('0x3f')](_0x5307d2[_0xe444('0x39')],_0x1bf90b[_0xe444('0x36')]),_0x4b01b9);if(_0x5307d2[_0xe444('0x39')][_0xe444('0x26')]){_0x4f31ef[_0xe444('0x3e')]=_[_0xe444('0x40')](_0x4f31ef['where'],{'$or':_['map'](_0x4b01b9,function(_0x4c7713){if(_0x4c7713[_0xe444('0x2a')]!==_0xe444('0x41')){var _0x2ad1a5={};_0x2ad1a5[_0x4c7713[_0xe444('0x2c')]]={'$like':'%'+_0x5307d2[_0xe444('0x39')]['filter']+'%'};return _0x2ad1a5;}})});}_0x4f31ef=_['merge']({},_0x4f31ef,_0x5307d2[_0xe444('0x42')]);var _0x1674e9={'where':_0x4f31ef[_0xe444('0x3e')]};return db['VoiceQueue'][_0xe444('0x1c')](_0x1674e9)[_0xe444('0x21')](function(_0x1ef435){_0x5dfd0e[_0xe444('0x1c')]=_0x1ef435;if(_0x5307d2[_0xe444('0x39')][_0xe444('0x43')]){_0x4f31ef['include']=[{'all':!![]}];}return db['VoiceQueue'][_0xe444('0x44')](_0x4f31ef);})[_0xe444('0x21')](function(_0x2eba87){_0x5dfd0e[_0xe444('0x45')]=_0x2eba87;return _0x5dfd0e;})['then'](respondWithFilteredResult(_0x3dd328,_0x4f31ef))[_0xe444('0x46')](handleError(_0x3dd328,null));};exports[_0xe444('0x47')]=function(_0x3549d0,_0x394665){var _0xbbd474={'raw':![],'where':{'id':_0x3549d0[_0xe444('0x48')]['id']}},_0x300cea={};_0x300cea[_0xe444('0x34')]=_['keys'](db[_0xe444('0x49')][_0xe444('0x32')]);_0x300cea[_0xe444('0x39')]=_['keys'](_0x3549d0[_0xe444('0x39')]);_0x300cea['filters']=_['intersection'](_0x300cea['model'],_0x300cea[_0xe444('0x39')]);_0xbbd474[_0xe444('0x3a')]=_['intersection'](_0x300cea['model'],qs[_0xe444('0x38')](_0x3549d0[_0xe444('0x39')]['fields']));_0xbbd474[_0xe444('0x3a')]=_0xbbd474[_0xe444('0x3a')][_0xe444('0x4a')]?_0xbbd474['attributes']:_0x300cea[_0xe444('0x34')];if(_0x3549d0['query'][_0xe444('0x43')]){_0xbbd474[_0xe444('0x4b')]=[{'all':!![]}];}_0xbbd474=_['merge']({},_0xbbd474,_0x3549d0['options']);return db[_0xe444('0x49')]['find'](_0xbbd474)[_0xe444('0x21')](handleEntityNotFound(_0x394665,null))[_0xe444('0x21')](respondWithResult(_0x394665,null))['catch'](handleError(_0x394665,null));};exports[_0xe444('0x4c')]=function(_0x272482,_0x2502e5){return db[_0xe444('0x49')][_0xe444('0x4c')](_0x272482[_0xe444('0x4d')],{})[_0xe444('0x21')](function(_0xc58b){var _0x3f92f6=_0x272482[_0xe444('0x4e')][_0xe444('0x22')]({'plain':!![]});if(!_0x3f92f6)throw new Error(_0xe444('0x4f'));if(_0x3f92f6['role']===_0xe444('0x4e')){var _0x41e690=_0xc58b['get']({'plain':!![]});var _0x34a74b=[{'name':'VoiceQueues','value':_0xe444('0x24')},{'name':'QueueCampaigns','value':_0xe444('0x50')}];var _0x509a4b=_[_0xe444('0x2b')](_0x34a74b,[_0xe444('0x51'),_0x41e690[_0xe444('0x2a')]])[_0xe444('0x2c')];return db[_0xe444('0x52')]['find']({'where':{'name':_0x509a4b,'userProfileId':_0x3f92f6[_0xe444('0x53')]},'raw':!![]})[_0xe444('0x21')](function(_0x49a889){if(_0x49a889&&_0x49a889[_0xe444('0x54')]===0x0){return db[_0xe444('0x2d')][_0xe444('0x4c')]({'name':_0x41e690[_0xe444('0x2c')],'resourceId':_0x41e690['id'],'type':_0x49a889['name'],'sectionId':_0x49a889['id']},{})[_0xe444('0x21')](function(){return _0xc58b;});}else{return _0xc58b;}})[_0xe444('0x46')](function(_0x5b5cd9){logger[_0xe444('0x2f')](_0xe444('0x55'),_0x5b5cd9);throw _0x5b5cd9;});}return _0xc58b;})['then'](respondWithResult(_0x2502e5,0xc9))['catch'](handleError(_0x2502e5,null));};exports[_0xe444('0x56')]=function(_0x35793c,_0x31f478){var _0x607be6={'where':{'id':_0x35793c[_0xe444('0x48')]['id']}},_0x57cbf2={};_0x57cbf2['model']=_[_0xe444('0x35')](db[_0xe444('0x49')][_0xe444('0x32')]);_0x607be6[_0xe444('0x3a')]=_[_0xe444('0x37')](_0x57cbf2['model'],qs[_0xe444('0x38')](_0x35793c[_0xe444('0x39')]['fields']));_0x607be6[_0xe444('0x3a')]=_0x607be6[_0xe444('0x3a')][_0xe444('0x4a')]?_0x607be6[_0xe444('0x3a')]:_0x57cbf2[_0xe444('0x34')];if(_0x35793c[_0xe444('0x39')][_0xe444('0x43')]){_0x607be6[_0xe444('0x4b')]=[{'all':!![]}];}_0x607be6=_[_0xe444('0x40')]({},_0x607be6,_0x35793c[_0xe444('0x42')]);return db[_0xe444('0x49')]['find'](_0x607be6)[_0xe444('0x21')](handleEntityNotFound(_0x31f478,null))[_0xe444('0x21')](function(_0x4d91e3){if(_0x4d91e3){var _0x335ae4=_0x4d91e3['get']({'plain':!![]});_0x335ae4=qs[_0xe444('0x57')](_0x335ae4,['id',_0xe444('0x58'),_0xe444('0x59')]);_0x35793c[_0xe444('0x4d')]=_['omit'](_0x35793c[_0xe444('0x4d')],['id',_0xe444('0x58'),'updatedAt']);return db[_0xe444('0x49')][_0xe444('0x4c')](_['merge'](_0x335ae4,_0x35793c[_0xe444('0x4d')]),{'include':_0x35793c[_0xe444('0x39')][_0xe444('0x43')]?[{'all':!![]}]:undefined})['then'](function(_0x849c5c){var _0x14c6bc=_0x35793c['user'][_0xe444('0x22')]({'plain':!![]});if(!_0x14c6bc)throw new Error(_0xe444('0x4f'));if(_0x14c6bc[_0xe444('0x5a')]===_0xe444('0x4e')){var _0x392a3a=_0x849c5c[_0xe444('0x22')]({'plain':!![]});var _0x3e68f4=[{'name':_0xe444('0x23'),'value':'inbound'},{'name':_0xe444('0x25'),'value':_0xe444('0x50')}];var _0x1025e2=_[_0xe444('0x2b')](_0x3e68f4,['value',_0x392a3a[_0xe444('0x2a')]])[_0xe444('0x2c')];return db[_0xe444('0x52')]['find']({'where':{'name':_0x1025e2,'userProfileId':_0x14c6bc[_0xe444('0x53')]},'raw':!![]})[_0xe444('0x21')](function(_0x3f739a){if(_0x3f739a&&_0x3f739a[_0xe444('0x54')]===0x0){return db[_0xe444('0x2d')][_0xe444('0x4c')]({'name':_0x392a3a[_0xe444('0x2c')],'resourceId':_0x392a3a['id'],'type':_0x3f739a[_0xe444('0x2c')],'sectionId':_0x3f739a['id']},{})[_0xe444('0x21')](function(){return _0x849c5c;});}else{return _0x849c5c;}})[_0xe444('0x46')](function(_0x3396d0){logger['error'](_0xe444('0x55'),_0x3396d0);throw _0x3396d0;});}return _0x849c5c;});}})[_0xe444('0x21')](respondWithResult(_0x31f478,0xc9))[_0xe444('0x46')](handleError(_0x31f478,null));};exports['update']=function(_0x4ca57c,_0x37533c){if(_0x4ca57c['body']['id']){delete _0x4ca57c[_0xe444('0x4d')]['id'];}return db[_0xe444('0x49')][_0xe444('0x2b')]({'where':{'id':_0x4ca57c['params']['id']}})[_0xe444('0x21')](handleEntityNotFound(_0x37533c,null))[_0xe444('0x21')](saveUpdates(_0x4ca57c[_0xe444('0x4d')],null))[_0xe444('0x21')](respondWithResult(_0x37533c,null))[_0xe444('0x46')](handleError(_0x37533c,null));};exports['destroy']=function(_0x4effe8,_0x5ea9ba){return db['VoiceQueue'][_0xe444('0x2b')]({'where':{'id':_0x4effe8[_0xe444('0x48')]['id']}})[_0xe444('0x21')](handleEntityNotFound(_0x5ea9ba,null))['then'](removeEntity(_0x5ea9ba,null))[_0xe444('0x46')](handleError(_0x5ea9ba,null));};exports['getHoppers']=function(_0x14f6ac,_0xf735fc,_0x4d3dfa){var _0x5e7e4b={'raw':![],'where':{}};var _0x4a1328={};var _0x2ac3a1={'count':0x0,'rows':[]};return db['VoiceQueue'][_0xe444('0x5b')]({'where':{'id':_0x14f6ac['params']['id']}})['then'](handleEntityNotFound(_0xf735fc,null))[_0xe444('0x21')](function(_0x46b348){if(_0x46b348){_0x4a1328[_0xe444('0x34')]=_[_0xe444('0x35')](db['CmHopper']['rawAttributes']);_0x4a1328[_0xe444('0x39')]=_['keys'](_0x14f6ac[_0xe444('0x39')]);_0x4a1328[_0xe444('0x36')]=_['intersection'](_0x4a1328['model'],_0x4a1328[_0xe444('0x39')]);_0x5e7e4b[_0xe444('0x3a')]=_[_0xe444('0x37')](_0x4a1328[_0xe444('0x34')],qs[_0xe444('0x38')](_0x14f6ac[_0xe444('0x39')][_0xe444('0x38')]));_0x5e7e4b[_0xe444('0x3a')]=_0x5e7e4b['attributes'][_0xe444('0x4a')]?_0x5e7e4b['attributes']:_0x4a1328[_0xe444('0x34')];if(!_0x14f6ac[_0xe444('0x39')][_0xe444('0x3b')](_0xe444('0x5c'))){_0x5e7e4b['limit']=qs[_0xe444('0x1a')](_0x14f6ac[_0xe444('0x39')][_0xe444('0x1a')]);_0x5e7e4b[_0xe444('0x1b')]=qs[_0xe444('0x1b')](_0x14f6ac['query'][_0xe444('0x1b')]);}_0x5e7e4b[_0xe444('0x3c')]=qs[_0xe444('0x3d')](_0x14f6ac[_0xe444('0x39')][_0xe444('0x3d')]);_0x5e7e4b[_0xe444('0x3e')]=qs['filters'](_[_0xe444('0x3f')](_0x14f6ac[_0xe444('0x39')],_0x4a1328[_0xe444('0x36')]));_0x5e7e4b['where']['VoiceQueueId']=_0x46b348['id'];if(_0x14f6ac[_0xe444('0x39')][_0xe444('0x26')]){_0x5e7e4b[_0xe444('0x3e')]=_[_0xe444('0x40')](_0x5e7e4b[_0xe444('0x3e')],{'$or':_[_0xe444('0x28')](_0x5e7e4b[_0xe444('0x3a')],function(_0x4c529a){var _0x41a6e9={};_0x41a6e9[_0x4c529a]={'$like':'%'+_0x14f6ac[_0xe444('0x39')][_0xe444('0x26')]+'%'};return _0x41a6e9;})});}_0x5e7e4b=_['merge']({},_0x5e7e4b,_0x14f6ac[_0xe444('0x42')]);return db[_0xe444('0x5d')]['count']({'where':_0x5e7e4b[_0xe444('0x3e')]})['then'](function(_0x53b2a2){_0x2ac3a1[_0xe444('0x1c')]=_0x53b2a2;if(_0x14f6ac[_0xe444('0x39')][_0xe444('0x43')]){_0x5e7e4b['include']=[{'all':!![]}];}return db[_0xe444('0x5d')][_0xe444('0x44')](_0x5e7e4b);})[_0xe444('0x21')](function(_0x51b876){_0x2ac3a1[_0xe444('0x45')]=_0x51b876;return _0x2ac3a1;});}})[_0xe444('0x21')](respondWithFilteredResult(_0xf735fc,_0x5e7e4b))['catch'](handleError(_0xf735fc,null));};exports[_0xe444('0x5e')]=function(_0x5ebfb5,_0x656676,_0x538968){var _0x1372a7={'raw':!![],'where':{}};var _0x5605cf={};var _0xe67fb={'count':0x0,'rows':[]};return db[_0xe444('0x49')][_0xe444('0x5b')]({'where':{'id':_0x5ebfb5[_0xe444('0x48')]['id']}})[_0xe444('0x21')](handleEntityNotFound(_0x656676,null))[_0xe444('0x21')](function(_0x517f69){if(_0x517f69){_0x5605cf[_0xe444('0x34')]=_[_0xe444('0x35')](db[_0xe444('0x5f')][_0xe444('0x32')]);_0x5605cf[_0xe444('0x39')]=_[_0xe444('0x35')](_0x5ebfb5['query']);_0x5605cf[_0xe444('0x36')]=_[_0xe444('0x37')](_0x5605cf[_0xe444('0x34')],_0x5605cf[_0xe444('0x39')]);_0x1372a7['attributes']=_[_0xe444('0x37')](_0x5605cf[_0xe444('0x34')],qs['fields'](_0x5ebfb5[_0xe444('0x39')][_0xe444('0x38')]));_0x1372a7[_0xe444('0x3a')]=_0x1372a7['attributes'][_0xe444('0x4a')]?_0x1372a7['attributes']:_0x5605cf[_0xe444('0x34')];if(!_0x5ebfb5[_0xe444('0x39')][_0xe444('0x3b')](_0xe444('0x5c'))){_0x1372a7[_0xe444('0x1a')]=qs[_0xe444('0x1a')](_0x5ebfb5[_0xe444('0x39')][_0xe444('0x1a')]);_0x1372a7[_0xe444('0x1b')]=qs[_0xe444('0x1b')](_0x5ebfb5[_0xe444('0x39')][_0xe444('0x1b')]);}_0x1372a7[_0xe444('0x3c')]=qs['sort'](_0x5ebfb5[_0xe444('0x39')]['sort']);_0x1372a7[_0xe444('0x3e')]=qs[_0xe444('0x36')](_[_0xe444('0x3f')](_0x5ebfb5[_0xe444('0x39')],_0x5605cf[_0xe444('0x36')]));_0x1372a7[_0xe444('0x3e')][_0xe444('0x60')]=_0x517f69['id'];if(_0x5ebfb5[_0xe444('0x39')]['filter']){_0x1372a7[_0xe444('0x3e')]=_[_0xe444('0x40')](_0x1372a7[_0xe444('0x3e')],{'$or':_[_0xe444('0x28')](_0x1372a7[_0xe444('0x3a')],function(_0x5e31ef){var _0x1fa6fa={};_0x1fa6fa[_0x5e31ef]={'$like':'%'+_0x5ebfb5['query'][_0xe444('0x26')]+'%'};return _0x1fa6fa;})});}_0x1372a7=_[_0xe444('0x40')]({},_0x1372a7,_0x5ebfb5['options']);return db['CmHopperHistory'][_0xe444('0x1c')]({'where':_0x1372a7[_0xe444('0x3e')]})['then'](function(_0x381084){_0xe67fb[_0xe444('0x1c')]=_0x381084;if(_0x5ebfb5[_0xe444('0x39')][_0xe444('0x43')]){_0x1372a7['include']=[{'all':!![]}];}return db[_0xe444('0x5f')]['findAll'](_0x1372a7);})[_0xe444('0x21')](function(_0x16532c){_0xe67fb['rows']=_0x16532c;return _0xe67fb;});}})[_0xe444('0x21')](respondWithFilteredResult(_0x656676,_0x1372a7))[_0xe444('0x46')](handleError(_0x656676,null));};exports[_0xe444('0x61')]=function(_0x3ee85a,_0x1b2ec0,_0x468ab3){var _0x1bc594={'raw':!![],'where':{}};var _0x15279f={};var _0x4692b5={'count':0x0,'rows':[]};return db[_0xe444('0x49')][_0xe444('0x5b')]({'where':{'id':_0x3ee85a[_0xe444('0x48')]['id']}})[_0xe444('0x21')](handleEntityNotFound(_0x1b2ec0,null))[_0xe444('0x21')](function(_0xbd2d75){if(_0xbd2d75){_0x15279f['model']=_[_0xe444('0x35')](db[_0xe444('0x62')][_0xe444('0x32')]);_0x15279f[_0xe444('0x39')]=_[_0xe444('0x35')](_0x3ee85a[_0xe444('0x39')]);_0x15279f[_0xe444('0x36')]=_['intersection'](_0x15279f[_0xe444('0x34')],_0x15279f[_0xe444('0x39')]);_0x1bc594[_0xe444('0x3a')]=_[_0xe444('0x37')](_0x15279f[_0xe444('0x34')],qs['fields'](_0x3ee85a[_0xe444('0x39')][_0xe444('0x38')]));_0x1bc594['attributes']=_0x1bc594[_0xe444('0x3a')][_0xe444('0x4a')]?_0x1bc594[_0xe444('0x3a')]:_0x15279f[_0xe444('0x34')];if(!_0x3ee85a['query'][_0xe444('0x3b')](_0xe444('0x5c'))){_0x1bc594[_0xe444('0x1a')]=qs[_0xe444('0x1a')](_0x3ee85a['query'][_0xe444('0x1a')]);_0x1bc594[_0xe444('0x1b')]=qs[_0xe444('0x1b')](_0x3ee85a['query'][_0xe444('0x1b')]);}_0x1bc594['order']=qs[_0xe444('0x3d')](_0x3ee85a[_0xe444('0x39')][_0xe444('0x3d')]);_0x1bc594[_0xe444('0x3e')]=qs[_0xe444('0x36')](_[_0xe444('0x3f')](_0x3ee85a[_0xe444('0x39')],_0x15279f[_0xe444('0x36')]));_0x1bc594[_0xe444('0x3e')][_0xe444('0x60')]=_0xbd2d75['id'];if(_0x3ee85a[_0xe444('0x39')][_0xe444('0x26')]){_0x1bc594[_0xe444('0x3e')]=_[_0xe444('0x40')](_0x1bc594['where'],{'$or':_[_0xe444('0x28')](_0x1bc594[_0xe444('0x3a')],function(_0x252f24){var _0xa64a93={};_0xa64a93[_0x252f24]={'$like':'%'+_0x3ee85a[_0xe444('0x39')][_0xe444('0x26')]+'%'};return _0xa64a93;})});}_0x1bc594=_[_0xe444('0x40')]({},_0x1bc594,_0x3ee85a[_0xe444('0x42')]);return db['CmHopperFinal'][_0xe444('0x1c')]({'where':_0x1bc594[_0xe444('0x3e')]})[_0xe444('0x21')](function(_0x24e46c){_0x4692b5['count']=_0x24e46c;if(_0x3ee85a[_0xe444('0x39')][_0xe444('0x43')]){_0x1bc594['include']=[{'all':!![]}];}return db[_0xe444('0x62')]['findAll'](_0x1bc594);})[_0xe444('0x21')](function(_0x17529f){_0x4692b5[_0xe444('0x45')]=_0x17529f;return _0x4692b5;});}})[_0xe444('0x21')](respondWithFilteredResult(_0x1b2ec0,_0x1bc594))[_0xe444('0x46')](handleError(_0x1b2ec0,null));};exports[_0xe444('0x63')]=function(_0x1aa424,_0x2c8299,_0x1d2578){var _0x540881={'raw':!![],'where':{}};var _0x3e4485={};var _0x4348ac={'count':0x0,'rows':[]};return db[_0xe444('0x49')]['findOne']({'where':{'id':_0x1aa424[_0xe444('0x48')]['id']}})['then'](handleEntityNotFound(_0x2c8299,null))['then'](function(_0x1add2c){if(_0x1add2c){_0x3e4485[_0xe444('0x34')]=_[_0xe444('0x35')](db['CmHopperBlack']['rawAttributes']);_0x3e4485[_0xe444('0x39')]=_[_0xe444('0x35')](_0x1aa424[_0xe444('0x39')]);_0x3e4485[_0xe444('0x36')]=_['intersection'](_0x3e4485[_0xe444('0x34')],_0x3e4485[_0xe444('0x39')]);_0x540881[_0xe444('0x3a')]=_[_0xe444('0x37')](_0x3e4485[_0xe444('0x34')],qs[_0xe444('0x38')](_0x1aa424[_0xe444('0x39')]['fields']));_0x540881['attributes']=_0x540881[_0xe444('0x3a')][_0xe444('0x4a')]?_0x540881[_0xe444('0x3a')]:_0x3e4485[_0xe444('0x34')];if(!_0x1aa424['query'][_0xe444('0x3b')](_0xe444('0x5c'))){_0x540881[_0xe444('0x1a')]=qs[_0xe444('0x1a')](_0x1aa424[_0xe444('0x39')]['limit']);_0x540881[_0xe444('0x1b')]=qs[_0xe444('0x1b')](_0x1aa424[_0xe444('0x39')][_0xe444('0x1b')]);}_0x540881[_0xe444('0x3c')]=qs[_0xe444('0x3d')](_0x1aa424['query'][_0xe444('0x3d')]);_0x540881['where']=qs[_0xe444('0x36')](_[_0xe444('0x3f')](_0x1aa424[_0xe444('0x39')],_0x3e4485[_0xe444('0x36')]));_0x540881[_0xe444('0x3e')]['VoiceQueueId']=_0x1add2c['id'];if(_0x1aa424[_0xe444('0x39')][_0xe444('0x26')]){_0x540881[_0xe444('0x3e')]=_[_0xe444('0x40')](_0x540881[_0xe444('0x3e')],{'$or':_[_0xe444('0x28')](_0x540881[_0xe444('0x3a')],function(_0x536b33){var _0x404579={};_0x404579[_0x536b33]={'$like':'%'+_0x1aa424[_0xe444('0x39')][_0xe444('0x26')]+'%'};return _0x404579;})});}_0x540881=_[_0xe444('0x40')]({},_0x540881,_0x1aa424[_0xe444('0x42')]);return db[_0xe444('0x64')][_0xe444('0x1c')]({'where':_0x540881['where']})[_0xe444('0x21')](function(_0xab7d42){_0x4348ac[_0xe444('0x1c')]=_0xab7d42;if(_0x1aa424[_0xe444('0x39')][_0xe444('0x43')]){_0x540881[_0xe444('0x4b')]=[{'all':!![]}];}return db[_0xe444('0x64')][_0xe444('0x44')](_0x540881);})[_0xe444('0x21')](function(_0x533224){_0x4348ac['rows']=_0x533224;return _0x4348ac;});}})[_0xe444('0x21')](respondWithFilteredResult(_0x2c8299,_0x540881))['catch'](handleError(_0x2c8299,null));};exports[_0xe444('0x65')]=function(_0x1f4101,_0xe21192,_0x4f4fcf){var _0x4ab74e={};var _0x7d339c={};var _0x5ba7d2;var _0xa443a9;return db[_0xe444('0x49')][_0xe444('0x5b')]({'where':{'id':_0x1f4101[_0xe444('0x48')]['id']}})['then'](handleEntityNotFound(_0xe21192,null))[_0xe444('0x21')](function(_0x47690c){if(_0x47690c){_0x5ba7d2=_0x47690c;_0x7d339c[_0xe444('0x34')]=_[_0xe444('0x35')](db[_0xe444('0x66')][_0xe444('0x32')]);_0x7d339c[_0xe444('0x39')]=_[_0xe444('0x35')](_0x1f4101[_0xe444('0x39')]);_0x7d339c[_0xe444('0x36')]=_['intersection'](_0x7d339c[_0xe444('0x34')],_0x7d339c[_0xe444('0x39')]);_0x4ab74e[_0xe444('0x3a')]=_[_0xe444('0x37')](_0x7d339c[_0xe444('0x34')],qs[_0xe444('0x38')](_0x1f4101[_0xe444('0x39')][_0xe444('0x38')]));_0x4ab74e[_0xe444('0x3a')]=_0x4ab74e['attributes']['length']?_0x4ab74e['attributes']:_0x7d339c[_0xe444('0x34')];_0x4ab74e[_0xe444('0x3c')]=qs['sort'](_0x1f4101[_0xe444('0x39')][_0xe444('0x3d')]);_0x4ab74e[_0xe444('0x3e')]=qs['filters'](_[_0xe444('0x3f')](_0x1f4101['query'],_0x7d339c[_0xe444('0x36')]));if(_0x1f4101[_0xe444('0x39')][_0xe444('0x26')]){_0x4ab74e[_0xe444('0x3e')]=_[_0xe444('0x40')](_0x4ab74e[_0xe444('0x3e')],{'$or':_[_0xe444('0x28')](_0x4ab74e[_0xe444('0x3a')],function(_0x51a01d){var _0x5b32fb={};_0x5b32fb[_0x51a01d]={'$like':'%'+_0x1f4101[_0xe444('0x39')]['filter']+'%'};return _0x5b32fb;})});}_0x4ab74e=_['merge']({},_0x4ab74e,_0x1f4101['options']);return _0x5ba7d2[_0xe444('0x65')](_0x4ab74e);}})[_0xe444('0x21')](function(_0x29678a){if(_0x29678a){_0xa443a9=_0x29678a[_0xe444('0x4a')];if(!_0x1f4101[_0xe444('0x39')][_0xe444('0x3b')]('nolimit')){_0x4ab74e[_0xe444('0x1a')]=qs[_0xe444('0x1a')](_0x1f4101[_0xe444('0x39')][_0xe444('0x1a')]);_0x4ab74e[_0xe444('0x1b')]=qs[_0xe444('0x1b')](_0x1f4101['query'][_0xe444('0x1b')]);}return _0x5ba7d2[_0xe444('0x65')](_0x4ab74e);}})[_0xe444('0x21')](function(_0x80d7db){if(_0x80d7db){return _0x80d7db?{'count':_0xa443a9,'rows':_0x80d7db}:null;}})['then'](respondWithResult(_0xe21192,null))[_0xe444('0x46')](handleError(_0xe21192,null));};exports[_0xe444('0x67')]=function(_0x40fa76,_0x28785a,_0x4003e5){var _0x14d0cb=_0x40fa76[_0xe444('0x4d')]['teams'];var _0x403fe8=_['map'](_0x14d0cb,'id');return db[_0xe444('0x66')]['findAll']({'where':{'id':_0x403fe8},'attributes':['id'],'include':[{'model':db[_0xe444('0x68')],'as':_0xe444('0x69'),'attributes':['id','name',_0xe444('0x6a'),_0xe444('0x6b'),'interface'],'raw':!![]}]})['then'](function(_0x4f4427){if(_0x4f4427){var _0x54de84=_[_0xe444('0x6c')](_0x4f4427,function(_0x57fe5b){var _0x3d2fe8=_0x57fe5b['get']({'plain':!![]});_0x3d2fe8['Agents'][_0xe444('0x6d')](function(_0x5033be){_0x5033be[_0xe444('0x6e')]=_[_0xe444('0x2b')](_0x14d0cb,{'id':_0x3d2fe8['id']})[_0xe444('0x6e')];});return _0x3d2fe8['Agents'];});return db[_0xe444('0x49')]['find']({'where':{'id':_0x40fa76[_0xe444('0x48')]['id']}})[_0xe444('0x21')](function(_0x374893){return db['sequelize'][_0xe444('0x6f')](function(_0x432ef7){return _0x374893['addTeams'](_0x403fe8,{'transaction':_0x432ef7})[_0xe444('0x21')](function(){return BPromise[_0xe444('0x70')](_0x14d0cb,function(_0x4ecbce){return db[_0xe444('0x71')]['upsert']({'TeamId':_0x4ecbce['id'],'VoiceQueueId':_0x40fa76[_0xe444('0x48')]['id'],'penalty':_0x4ecbce[_0xe444('0x6e')]},{'transaction':_0x432ef7});});})[_0xe444('0x21')](function(){return BPromise[_0xe444('0x70')](_0x54de84,function(_0x55dd83){return db[_0xe444('0x72')][_0xe444('0x73')]({'where':{'UserId':_0x55dd83['id'],'VoiceQueueId':_0x40fa76[_0xe444('0x48')]['id']},'defaults':{'penalty':_0x55dd83[_0xe444('0x6e')]},'transaction':_0x432ef7});});})['then'](function(){return BPromise[_0xe444('0x70')](_[_0xe444('0x26')](_0x54de84,{'online':!![]}),function(_0x4f8e7c){return db['UserVoiceQueueRt'][_0xe444('0x74')]({'membername':_0x4f8e7c['name'],'UserId':_0x4f8e7c['id'],'queue_name':_0x374893['name'],'VoiceQueueId':_0x374893['id'],'interface':_['isNil'](_0x4f8e7c['interface'])?util[_0xe444('0x75')](_0xe444('0x76'),_0x4f8e7c['name']):_0x4f8e7c[_0xe444('0x77')],'paused':_0x4f8e7c[_0xe444('0x6b')]||![],'penalty':_0x4f8e7c[_0xe444('0x6e')]},{'transaction':_0x432ef7});});})['then'](function(){_0x54de84['forEach'](function(_0x8981f3){socket[_0xe444('0x78')](_0xe444('0x79'),{'UserId':_0x8981f3['id'],'VoiceQueueId':_0x374893['id']});});});});});}})[_0xe444('0x21')](respondWithStatusCode(_0x28785a,null))['catch'](handleError(_0x28785a,null));};exports[_0xe444('0x7a')]=function(_0x4d2777,_0x8638de,_0x944cc8){return db['Team']['findAll']({'where':{'id':_0x4d2777[_0xe444('0x39')][_0xe444('0x7b')]},'attributes':['id'],'include':[{'model':db['User'],'as':_0xe444('0x69'),'attributes':['id'],'raw':!![]}]})[_0xe444('0x21')](handleEntityNotFound(_0x8638de,null))['then'](function(_0x4c9471){var _0x14f14d=_[_0xe444('0x28')](_0x4c9471,'id');var _0x51ac0f=[];var _0x507644=[];var _0x163713=squel[_0xe444('0x7c')]();_0x163713['field'](_0xe444('0x7d'))['from'](_0xe444('0x7e'),'tq')[_0xe444('0x7f')](_0xe444('0x80'),'ut','ut.TeamId\x20=\x20tq.TeamId')[_0xe444('0x3e')]('VoiceQueueId\x20=\x20?',_0x4d2777[_0xe444('0x48')]['id']);for(var _0x49ff49=0x0;_0x49ff49<_0x4c9471[_0xe444('0x4a')];_0x49ff49+=0x1){let _0xba1c09=_0x4c9471[_0x49ff49];for(var _0x18ee83=0x0;_0x18ee83<_0xba1c09[_0xe444('0x69')][_0xe444('0x4a')];_0x18ee83+=0x1){let _0xcc6c32=_0xba1c09[_0xe444('0x69')][_0x18ee83];var _0x4f4b36=_0x163713[_0xe444('0x56')]();_0x4f4b36[_0xe444('0x3e')]('ut.UserId\x20=\x20?',_0xcc6c32['id']);_0x507644[_0xe444('0x81')](db['sequelize']['query'](_0x4f4b36[_0xe444('0x82')](),{'type':db['sequelize'][_0xe444('0x83')][_0xe444('0x84')]})[_0xe444('0x21')](function(_0x5120c4){if(_0x5120c4[_0xe444('0x4a')]===0x1){return _0xcc6c32['id'];}else{var _0x2fdfd6=_[_0xe444('0x85')](_['map'](_0x5120c4,'TeamId'),function(_0x22b0ce){return _[_0xe444('0x29')](_0x14f14d,_0x22b0ce);});if(_0x2fdfd6){return _0xcc6c32['id'];}}}));}}return BPromise['all'](_0x507644)[_0xe444('0x21')](function(_0x2144f8){_0x51ac0f=_(_0x51ac0f)['union'](_0x2144f8)[_0xe444('0x86')]()[_0xe444('0x51')]();return db['VoiceQueue'][_0xe444('0x2b')]({'where':{'id':_0x4d2777[_0xe444('0x48')]['id']}})[_0xe444('0x21')](function(_0x40afe5){return db[_0xe444('0x87')][_0xe444('0x6f')](function(_0x33b693){return _0x40afe5['removeTeams'](_0x4d2777['query']['ids'],{'transaction':_0x33b693})[_0xe444('0x21')](function(){if(!_[_0xe444('0x88')](_0x51ac0f)){return _0x40afe5[_0xe444('0x89')](_0x51ac0f,{'transaction':_0x33b693})['then'](function(){return db[_0xe444('0x8a')][_0xe444('0x2e')]({'where':{'VoiceQueueId':_0x4d2777[_0xe444('0x48')]['id'],'UserId':_0x51ac0f},'transaction':_0x33b693});});}})[_0xe444('0x21')](function(){_0x51ac0f[_0xe444('0x6d')](function(_0x1d59a4){socket[_0xe444('0x78')](_0xe444('0x8b'),{'UserId':_0x1d59a4,'VoiceQueueId':_0x40afe5['id']});});});});});});})[_0xe444('0x21')](respondWithStatusCode(_0x8638de,null))[_0xe444('0x46')](handleError(_0x8638de,null));};exports['addAgents']=function(_0x651da9,_0x2c5db2,_0x5b8c3b){var _0x3a971d,_0x407587;return db[_0xe444('0x49')][_0xe444('0x2b')]({'where':{'id':_0x651da9['params']['id']}})[_0xe444('0x21')](handleEntityNotFound(_0x2c5db2,null))[_0xe444('0x21')](function(_0x149191){if(_0x149191){_0x407587=_0x149191;return _0x149191['addAgents'](_0x651da9[_0xe444('0x4d')][_0xe444('0x7b')],_['omit'](_0x651da9[_0xe444('0x4d')],['ids','id'])||{})[_0xe444('0x8c')](function(_0x2d6e1a){for(var _0x1066f2=0x0;_0x1066f2<_0x651da9[_0xe444('0x4d')]['ids']['length'];_0x1066f2+=0x1){socket[_0xe444('0x78')](_0xe444('0x79'),{'UserId':Number(_0x651da9[_0xe444('0x4d')]['ids'][_0x1066f2]),'VoiceQueueId':Number(_0x651da9['params']['id'])});}return _0x2d6e1a;});}})[_0xe444('0x21')](function(_0x4d55ba){_0x3a971d=_0x4d55ba||[];if(_0x407587){return db[_0xe444('0x68')][_0xe444('0x44')]({'where':{'id':_0x651da9[_0xe444('0x4d')][_0xe444('0x7b')]},'attributes':['id',_0xe444('0x2c'),'online',_0xe444('0x6b'),_0xe444('0x77')],'raw':!![]});}})[_0xe444('0x21')](function(_0xbcdbaa){if(!_[_0xe444('0x88')](_0xbcdbaa)){var _0xe7a990=[];for(var _0x969df3=0x0;_0x969df3<_0xbcdbaa['length'];_0x969df3++){if(_0xbcdbaa[_0x969df3]['online']){_0xe7a990[_0xe444('0x81')](db['UserVoiceQueueRt'][_0xe444('0x74')]({'membername':_0xbcdbaa[_0x969df3]['name'],'UserId':_0xbcdbaa[_0x969df3]['id'],'queue_name':_0x407587['name'],'VoiceQueueId':_0x407587['id'],'interface':_[_0xe444('0x8d')](_0xbcdbaa[_0x969df3][_0xe444('0x77')])?util[_0xe444('0x75')]('SIP/%s',_0xbcdbaa[_0x969df3][_0xe444('0x2c')]):_0xbcdbaa[_0x969df3][_0xe444('0x77')],'paused':_0xbcdbaa[_0x969df3][_0xe444('0x6b')]||![],'penalty':_0x651da9['body'][_0xe444('0x6e')]||0x0}));}}return BPromise['all'](_0xe7a990);}})[_0xe444('0x21')](function(){return _0x3a971d;})[_0xe444('0x21')](respondWithResult(_0x2c5db2,null))[_0xe444('0x46')](handleError(_0x2c5db2,null));};exports[_0xe444('0x89')]=function(_0x4143d1,_0x397950,_0x527b76){return db[_0xe444('0x49')]['find']({'where':{'id':_0x4143d1[_0xe444('0x48')]['id']}})[_0xe444('0x21')](handleEntityNotFound(_0x397950,null))[_0xe444('0x21')](function(_0x2cbe70){if(_0x2cbe70){return _0x2cbe70[_0xe444('0x89')](_0x4143d1[_0xe444('0x39')]['ids'])[_0xe444('0x21')](function(){if(_[_0xe444('0x8e')](_0x4143d1['query'][_0xe444('0x7b')])){for(var _0x2600e4=0x0;_0x2600e4<_0x4143d1[_0xe444('0x39')]['ids'][_0xe444('0x4a')];_0x2600e4+=0x1){socket['emit'](_0xe444('0x8b'),{'UserId':Number(_0x4143d1['query'][_0xe444('0x7b')][_0x2600e4]),'VoiceQueueId':Number(_0x4143d1['params']['id'])});}}else{socket[_0xe444('0x78')](_0xe444('0x8b'),{'UserId':Number(_0x4143d1[_0xe444('0x39')]['ids']),'VoiceQueueId':Number(_0x4143d1['params']['id'])});}});}})[_0xe444('0x21')](function(_0x2f8caf){return db['UserVoiceQueueRt'][_0xe444('0x2e')]({'where':{'VoiceQueueId':_0x4143d1['params']['id'],'UserId':_0x4143d1[_0xe444('0x39')][_0xe444('0x7b')]}})[_0xe444('0x21')](function(){return _0x2f8caf;});})[_0xe444('0x21')](respondWithStatusCode(_0x397950,null))[_0xe444('0x46')](handleError(_0x397950,null));};exports[_0xe444('0x8f')]=function(_0xf93fed,_0xc7bcd9,_0x2f3ca6){var _0x285235={};var _0x310044={};var _0xf8d899;var _0x272cad;return db[_0xe444('0x49')][_0xe444('0x5b')]({'where':{'id':_0xf93fed[_0xe444('0x48')]['id']}})[_0xe444('0x21')](handleEntityNotFound(_0xc7bcd9,null))[_0xe444('0x21')](function(_0x3ae7dc){if(_0x3ae7dc){_0xf8d899=_0x3ae7dc;_0x310044[_0xe444('0x34')]=_[_0xe444('0x35')](db[_0xe444('0x68')][_0xe444('0x32')]);_0x310044[_0xe444('0x39')]=_['keys'](_0xf93fed[_0xe444('0x39')]);_0x310044[_0xe444('0x36')]=_['intersection'](_0x310044[_0xe444('0x34')],_0x310044[_0xe444('0x39')]);_0x285235[_0xe444('0x3a')]=_[_0xe444('0x37')](_0x310044[_0xe444('0x34')],qs['fields'](_0xf93fed['query'][_0xe444('0x38')]));_0x285235[_0xe444('0x3a')]=_0x285235[_0xe444('0x3a')][_0xe444('0x4a')]?_0x285235[_0xe444('0x3a')]:_0x310044[_0xe444('0x34')];_0x285235[_0xe444('0x3c')]=qs[_0xe444('0x3d')](_0xf93fed[_0xe444('0x39')]['sort']);_0x285235[_0xe444('0x3e')]=qs['filters'](_[_0xe444('0x3f')](_0xf93fed[_0xe444('0x39')],_0x310044[_0xe444('0x36')]));if(_0xf93fed[_0xe444('0x39')]['filter']){_0x285235[_0xe444('0x3e')]=_[_0xe444('0x40')](_0x285235[_0xe444('0x3e')],{'$or':_[_0xe444('0x28')](_0x285235[_0xe444('0x3a')],function(_0x10b793){var _0x3fafd1={};_0x3fafd1[_0x10b793]={'$like':'%'+_0xf93fed[_0xe444('0x39')]['filter']+'%'};return _0x3fafd1;})});}_0x285235=_[_0xe444('0x40')]({},_0x285235,_0xf93fed[_0xe444('0x42')]);return _0xf8d899[_0xe444('0x8f')](_0x285235);}})[_0xe444('0x21')](function(_0x3f0d02){if(_0x3f0d02){_0x272cad=_0x3f0d02['length'];if(!_0xf93fed[_0xe444('0x39')][_0xe444('0x3b')]('nolimit')){_0x285235[_0xe444('0x1a')]=qs[_0xe444('0x1a')](_0xf93fed[_0xe444('0x39')][_0xe444('0x1a')]);_0x285235[_0xe444('0x1b')]=qs[_0xe444('0x1b')](_0xf93fed[_0xe444('0x39')]['offset']);}return _0xf8d899['getAgents'](_0x285235);}})[_0xe444('0x21')](function(_0x218f80){if(_0x218f80){return _0x218f80?{'count':_0x272cad,'rows':_0x218f80}:null;}})[_0xe444('0x21')](respondWithResult(_0xc7bcd9,null))[_0xe444('0x46')](handleError(_0xc7bcd9,null));};exports[_0xe444('0x90')]=function(_0x282f80,_0x48ffb8,_0x50b472){var _0x3195f9={};var _0xdda4b={};var _0x413473;var _0x4b6f2b;return db[_0xe444('0x49')][_0xe444('0x5b')]({'where':{'id':_0x282f80[_0xe444('0x48')]['id']}})[_0xe444('0x21')](handleEntityNotFound(_0x48ffb8,null))[_0xe444('0x21')](function(_0x230c2a){if(_0x230c2a){_0x413473=_0x230c2a;_0xdda4b[_0xe444('0x34')]=_[_0xe444('0x35')](db[_0xe444('0x8a')][_0xe444('0x32')]);_0xdda4b[_0xe444('0x39')]=_[_0xe444('0x35')](_0x282f80['query']);_0xdda4b['filters']=_[_0xe444('0x37')](_0xdda4b[_0xe444('0x34')],_0xdda4b['query']);_0x3195f9[_0xe444('0x3a')]=_[_0xe444('0x37')](_0xdda4b[_0xe444('0x34')],qs[_0xe444('0x38')](_0x282f80[_0xe444('0x39')][_0xe444('0x38')]));_0x3195f9['attributes']=_0x3195f9[_0xe444('0x3a')][_0xe444('0x4a')]?_0x3195f9[_0xe444('0x3a')]:_0xdda4b[_0xe444('0x34')];_0x3195f9[_0xe444('0x3c')]=qs[_0xe444('0x3d')](_0x282f80[_0xe444('0x39')][_0xe444('0x3d')]);_0x3195f9['where']=qs['filters'](_[_0xe444('0x3f')](_0x282f80[_0xe444('0x39')],_0xdda4b['filters']));if(_0x282f80[_0xe444('0x39')][_0xe444('0x26')]){_0x3195f9[_0xe444('0x3e')]=_[_0xe444('0x40')](_0x3195f9[_0xe444('0x3e')],{'$or':_[_0xe444('0x28')](_0x3195f9[_0xe444('0x3a')],function(_0x4335e8){var _0x47b685={};_0x47b685[_0x4335e8]={'$like':'%'+_0x282f80[_0xe444('0x39')][_0xe444('0x26')]+'%'};return _0x47b685;})});}_0x3195f9=_[_0xe444('0x40')]({},_0x3195f9,_0x282f80[_0xe444('0x42')]);return _0x413473[_0xe444('0x90')](_0x3195f9);}})['then'](function(_0x4544c1){if(_0x4544c1){_0x4b6f2b=_0x4544c1[_0xe444('0x4a')];if(!_0x282f80[_0xe444('0x39')][_0xe444('0x3b')](_0xe444('0x5c'))){_0x3195f9[_0xe444('0x1a')]=qs[_0xe444('0x1a')](_0x282f80['query'][_0xe444('0x1a')]);_0x3195f9[_0xe444('0x1b')]=qs[_0xe444('0x1b')](_0x282f80[_0xe444('0x39')]['offset']);}return _0x413473[_0xe444('0x90')](_0x3195f9);}})[_0xe444('0x21')](function(_0xdace58){return _0xdace58?{'count':_0x4b6f2b,'rows':_0xdace58}:null;})[_0xe444('0x21')](respondWithResult(_0x48ffb8,null))[_0xe444('0x46')](handleError(_0x48ffb8,null));};exports[_0xe444('0x91')]=function(_0x37d9ed,_0x5e9a46,_0x3c4d6b){var _0x3dfba8={};var _0x138120={};var _0x5d60c7;var _0x4bfaa0;return db[_0xe444('0x49')]['findOne']({'where':{'id':_0x37d9ed['params']['id']}})[_0xe444('0x21')](handleEntityNotFound(_0x5e9a46,null))['then'](function(_0x1d0f53){if(_0x1d0f53){_0x5d60c7=_0x1d0f53;_0x138120['model']=_[_0xe444('0x35')](db[_0xe444('0x92')][_0xe444('0x32')]);_0x138120[_0xe444('0x39')]=_['keys'](_0x37d9ed[_0xe444('0x39')]);_0x138120[_0xe444('0x36')]=_['intersection'](_0x138120['model'],_0x138120['query']);_0x3dfba8[_0xe444('0x3a')]=_['intersection'](_0x138120[_0xe444('0x34')],qs[_0xe444('0x38')](_0x37d9ed[_0xe444('0x39')][_0xe444('0x38')]));_0x3dfba8[_0xe444('0x3a')]=_0x3dfba8[_0xe444('0x3a')][_0xe444('0x4a')]?_0x3dfba8[_0xe444('0x3a')]:_0x138120['model'];_0x3dfba8[_0xe444('0x3c')]=qs[_0xe444('0x3d')](_0x37d9ed[_0xe444('0x39')][_0xe444('0x3d')]);_0x3dfba8[_0xe444('0x3e')]=qs[_0xe444('0x36')](_[_0xe444('0x3f')](_0x37d9ed[_0xe444('0x39')],_0x138120[_0xe444('0x36')]));if(_0x37d9ed[_0xe444('0x39')][_0xe444('0x26')]){_0x3dfba8[_0xe444('0x3e')]=_[_0xe444('0x40')](_0x3dfba8[_0xe444('0x3e')],{'$or':_['map'](_0x3dfba8['attributes'],function(_0x3b906a){var _0x3cc07={};_0x3cc07[_0x3b906a]={'$like':'%'+_0x37d9ed[_0xe444('0x39')][_0xe444('0x26')]+'%'};return _0x3cc07;})});}_0x3dfba8=_[_0xe444('0x40')]({},_0x3dfba8,_0x37d9ed[_0xe444('0x42')]);return _0x5d60c7[_0xe444('0x91')](_0x3dfba8);}})[_0xe444('0x21')](function(_0x3f3c26){if(_0x3f3c26){_0x4bfaa0=_0x3f3c26[_0xe444('0x4a')];if(!_0x37d9ed[_0xe444('0x39')]['hasOwnProperty'](_0xe444('0x5c'))){_0x3dfba8[_0xe444('0x1a')]=qs[_0xe444('0x1a')](_0x37d9ed[_0xe444('0x39')][_0xe444('0x1a')]);_0x3dfba8[_0xe444('0x1b')]=qs[_0xe444('0x1b')](_0x37d9ed['query'][_0xe444('0x1b')]);}return _0x5d60c7['getLists'](_0x3dfba8);}})[_0xe444('0x21')](function(_0x5525da){if(_0x5525da){return _0x5525da?{'count':_0x4bfaa0,'rows':_0x5525da}:null;}})[_0xe444('0x21')](respondWithResult(_0x5e9a46,null))['catch'](handleError(_0x5e9a46,null));};exports[_0xe444('0x93')]=function(_0x438ea9,_0x19942f,_0x1c12b1){var _0x58ab1f=moment()[_0xe444('0x75')](_0xe444('0x94'));var _0x5dafc6,_0x1f8730;return db[_0xe444('0x49')]['find']({'where':{'id':_0x438ea9[_0xe444('0x48')]['id']}})[_0xe444('0x21')](handleEntityNotFound(_0x19942f,null))['then'](function(_0x5455e2){if(_0x5455e2){_0x1f8730=_0x5455e2;return _0x5455e2[_0xe444('0x93')](_0x438ea9[_0xe444('0x4d')][_0xe444('0x7b')],_[_0xe444('0x57')](_0x438ea9[_0xe444('0x4d')],[_0xe444('0x7b'),'id'])||{});}return null;})[_0xe444('0x8c')](function(_0x5381ba){var _0x5b1cd6;_0x5dafc6=_0x5381ba||[];var _0x189030=[];if(_0x5381ba){for(var _0x4653d8=0x0;_0x4653d8<_0x5381ba[_0xe444('0x4a')];_0x4653d8+=0x1){var _0xa1621b=_0x5381ba[_0x4653d8][_0xe444('0x22')]({'plain':!![]});_0x1f8730[_0xe444('0x95')]=_0x438ea9['body'][_0xe444('0x95')]?_0x438ea9[_0xe444('0x4d')][_0xe444('0x95')]:_0x1f8730[_0xe444('0x95')];switch(_0x1f8730[_0xe444('0x95')]){case _0xe444('0x96'):_0x5b1cd6=squel[_0xe444('0x97')]()[_0xe444('0x98')](_0xe444('0x99'))[_0xe444('0x9a')]([_0xe444('0x9b'),'scheduledAt',_0xe444('0x9c'),_0xe444('0x9d'),_0xe444('0x60'),_0xe444('0x58'),'updatedAt'],squel[_0xe444('0x7c')]()[_0xe444('0x9e')](_0xe444('0x9b'),_0xe444('0x9b'))[_0xe444('0x9e')]('\x27'+_0x58ab1f+'\x27',_0xe444('0x9f'))[_0xe444('0x9e')]('id','ContactId')[_0xe444('0x9e')](_0xa1621b[_0xe444('0xa0')][_0xe444('0x82')](),'ListId')[_0xe444('0x9e')](_0x438ea9['params']['id']['toString'](),_0xe444('0x60'))['field']('\x27'+_0x58ab1f+'\x27',_0xe444('0x58'))[_0xe444('0x9e')]('\x27'+_0x58ab1f+'\x27',_0xe444('0x59'))[_0xe444('0xa1')](_0xe444('0xa2'))[_0xe444('0x3e')]('deletedAt\x20IS\x20NULL')[_0xe444('0x3e')](_0xe444('0xa3'),_0xa1621b[_0xe444('0xa0')][_0xe444('0x82')]())[_0xe444('0x3e')]('phone\x20IS\x20NOT\x20NULL')['where'](_0xe444('0xa4'),squel[_0xe444('0x7c')]()[_0xe444('0x9e')](_0xe444('0xa5'))[_0xe444('0xa1')](_0xe444('0xa6'))['where'](_0xe444('0xa7'),_0x438ea9[_0xe444('0x48')]['id']['toString']()))[_0xe444('0x3e')](_0xe444('0xa4'),squel[_0xe444('0x7c')]()['field'](_0xe444('0xa8'))['from'](_0xe444('0x99'))[_0xe444('0x3e')](_0xe444('0xa7'),_0x438ea9[_0xe444('0x48')]['id'][_0xe444('0x82')]())))[_0xe444('0x82')]();break;case'onlyIfOpen':_0x5b1cd6=squel[_0xe444('0x97')]()[_0xe444('0x98')]('cm_hopper')[_0xe444('0x9a')]([_0xe444('0x9b'),'scheduledAt',_0xe444('0x9c'),_0xe444('0x9d'),_0xe444('0x60'),_0xe444('0x58'),_0xe444('0x59')],squel[_0xe444('0x7c')]()[_0xe444('0x9e')](_0xe444('0x9b'),_0xe444('0x9b'))[_0xe444('0x9e')]('\x27'+_0x58ab1f+'\x27',_0xe444('0x9f'))[_0xe444('0x9e')]('id',_0xe444('0x9c'))[_0xe444('0x9e')](_0xa1621b[_0xe444('0xa0')][_0xe444('0x82')](),'ListId')[_0xe444('0x9e')](_0x438ea9[_0xe444('0x48')]['id'][_0xe444('0x82')](),_0xe444('0x60'))[_0xe444('0x9e')]('\x27'+_0x58ab1f+'\x27',_0xe444('0x58'))[_0xe444('0x9e')]('\x27'+_0x58ab1f+'\x27',_0xe444('0x59'))[_0xe444('0xa1')](_0xe444('0xa2'))[_0xe444('0x3e')]('deletedAt\x20IS\x20NULL')[_0xe444('0x3e')](_0xe444('0xa3'),_0xa1621b[_0xe444('0xa0')][_0xe444('0x82')]())[_0xe444('0x3e')]('phone\x20IS\x20NOT\x20NULL')[_0xe444('0x3e')](_0xe444('0xa4'),squel[_0xe444('0x7c')]()[_0xe444('0x9e')](_0xe444('0xa8'))[_0xe444('0xa1')](_0xe444('0x99'))[_0xe444('0x3e')](_0xe444('0xa7'),_0x438ea9[_0xe444('0x48')]['id'][_0xe444('0x82')]())))[_0xe444('0x82')]();break;default:_0x5b1cd6=squel[_0xe444('0x97')]()[_0xe444('0x98')](_0xe444('0x99'))[_0xe444('0x9a')](['phone',_0xe444('0x9f'),'ContactId',_0xe444('0x9d'),_0xe444('0x60'),_0xe444('0x58'),_0xe444('0x59')],squel['select']()[_0xe444('0x9e')]('phone',_0xe444('0x9b'))[_0xe444('0x9e')]('\x27'+_0x58ab1f+'\x27','scheduledAt')[_0xe444('0x9e')]('id',_0xe444('0x9c'))[_0xe444('0x9e')](_0xa1621b[_0xe444('0xa0')]['toString'](),_0xe444('0x9d'))[_0xe444('0x9e')](_0x438ea9[_0xe444('0x48')]['id'][_0xe444('0x82')](),_0xe444('0x60'))['field']('\x27'+_0x58ab1f+'\x27',_0xe444('0x58'))['field']('\x27'+_0x58ab1f+'\x27',_0xe444('0x59'))[_0xe444('0xa1')]('cm_contacts')[_0xe444('0x3e')](_0xe444('0xa9'))['where'](_0xe444('0xa3'),_0xa1621b[_0xe444('0xa0')][_0xe444('0x82')]())[_0xe444('0x3e')]('phone\x20IS\x20NOT\x20NULL'))[_0xe444('0x82')]();}_0x189030['push'](db[_0xe444('0x87')][_0xe444('0x39')](_0x5b1cd6));}return BPromise['all'](_0x189030);}})['then'](function(){var _0x2fabe2=[];var _0x4e0c2f=squel[_0xe444('0x97')]()['into'](_0xe444('0xaa'))['fromQuery']([_0xe444('0xab'),'phone',_0xe444('0xac'),_0xe444('0x58'),'updatedAt'],squel[_0xe444('0x7c')]()[_0xe444('0x9e')](_0xe444('0xad'))['field'](_0xe444('0xae'))[_0xe444('0x9e')](_0xe444('0xaf'))[_0xe444('0x9e')]('\x27'+_0x58ab1f+'\x27',_0xe444('0x58'))['field']('\x27'+_0x58ab1f+'\x27',_0xe444('0x59'))['from'](_0xe444('0xb0'),'ci')[_0xe444('0x7f')](_0xe444('0x99'),'h',_0xe444('0xb1'))[_0xe444('0x3e')](_0xe444('0xb2'),_0x58ab1f)[_0xe444('0x3e')](_0xe444('0xb3'),_0xe444('0xb4')))['toString']();_0x2fabe2['push'](db[_0xe444('0x87')][_0xe444('0x39')](_0x4e0c2f));return BPromise[_0xe444('0xb5')](_0x2fabe2);})[_0xe444('0x21')](function(){return _0x5dafc6;})[_0xe444('0x21')](respondWithResult(_0x19942f,null))[_0xe444('0x46')](handleError(_0x19942f,null));};exports[_0xe444('0xb6')]=function(_0x1244f0,_0x8685a1,_0x1de0c1){return db[_0xe444('0x49')][_0xe444('0x2b')]({'where':{'id':_0x1244f0[_0xe444('0x48')]['id']}})[_0xe444('0x21')](handleEntityNotFound(_0x8685a1,null))['then'](function(_0x19014f){if(_0x19014f){return _0x19014f['removeLists'](_0x1244f0[_0xe444('0x39')][_0xe444('0x7b')]);}})['then'](function(_0x52f2f8){if(_0x52f2f8){return db[_0xe444('0x5d')][_0xe444('0x2e')]({'where':{'ListId':_0x1244f0[_0xe444('0x39')]['ids'],'VoiceQueueId':_0x1244f0[_0xe444('0x48')]['id']}})['then'](function(){return _0x52f2f8;});}})['then'](respondWithStatusCode(_0x8685a1,null))['catch'](handleError(_0x8685a1,null));};exports['getBlackLists']=function(_0x50aab8,_0x43f3a4,_0x8ced91){var _0xe73bf2={};var _0x2b9f93={};var _0x3e43f9;var _0x552139;return db[_0xe444('0x49')]['findOne']({'where':{'id':_0x50aab8[_0xe444('0x48')]['id']}})[_0xe444('0x21')](handleEntityNotFound(_0x43f3a4,null))[_0xe444('0x21')](function(_0x3ae68a){if(_0x3ae68a){_0x3e43f9=_0x3ae68a;_0x2b9f93[_0xe444('0x34')]=_['keys'](db['CmList'][_0xe444('0x32')]);_0x2b9f93['query']=_[_0xe444('0x35')](_0x50aab8[_0xe444('0x39')]);_0x2b9f93[_0xe444('0x36')]=_[_0xe444('0x37')](_0x2b9f93[_0xe444('0x34')],_0x2b9f93[_0xe444('0x39')]);_0xe73bf2[_0xe444('0x3a')]=_[_0xe444('0x37')](_0x2b9f93[_0xe444('0x34')],qs[_0xe444('0x38')](_0x50aab8[_0xe444('0x39')][_0xe444('0x38')]));_0xe73bf2[_0xe444('0x3a')]=_0xe73bf2[_0xe444('0x3a')][_0xe444('0x4a')]?_0xe73bf2[_0xe444('0x3a')]:_0x2b9f93[_0xe444('0x34')];_0xe73bf2[_0xe444('0x3c')]=qs[_0xe444('0x3d')](_0x50aab8[_0xe444('0x39')][_0xe444('0x3d')]);_0xe73bf2[_0xe444('0x3e')]=qs[_0xe444('0x36')](_[_0xe444('0x3f')](_0x50aab8[_0xe444('0x39')],_0x2b9f93['filters']));if(_0x50aab8[_0xe444('0x39')]['filter']){_0xe73bf2[_0xe444('0x3e')]=_['merge'](_0xe73bf2[_0xe444('0x3e')],{'$or':_[_0xe444('0x28')](_0xe73bf2['attributes'],function(_0x1e950f){var _0x45d58b={};_0x45d58b[_0x1e950f]={'$like':'%'+_0x50aab8[_0xe444('0x39')][_0xe444('0x26')]+'%'};return _0x45d58b;})});}_0xe73bf2=_[_0xe444('0x40')]({},_0xe73bf2,_0x50aab8[_0xe444('0x42')]);return _0x3e43f9[_0xe444('0xb7')](_0xe73bf2);}})['then'](function(_0x28761b){if(_0x28761b){_0x552139=_0x28761b['length'];if(!_0x50aab8['query'][_0xe444('0x3b')](_0xe444('0x5c'))){_0xe73bf2[_0xe444('0x1a')]=qs[_0xe444('0x1a')](_0x50aab8[_0xe444('0x39')][_0xe444('0x1a')]);_0xe73bf2[_0xe444('0x1b')]=qs[_0xe444('0x1b')](_0x50aab8[_0xe444('0x39')][_0xe444('0x1b')]);}return _0x3e43f9[_0xe444('0xb7')](_0xe73bf2);}})['then'](function(_0x3d9d1b){if(_0x3d9d1b){return _0x3d9d1b?{'count':_0x552139,'rows':_0x3d9d1b}:null;}})[_0xe444('0x21')](respondWithResult(_0x43f3a4,null))[_0xe444('0x46')](handleError(_0x43f3a4,null));};exports[_0xe444('0xb8')]=function(_0x440c80,_0x499961,_0x5884bf){var _0x425a45,_0x5a99c9;return db[_0xe444('0x49')][_0xe444('0x2b')]({'where':{'id':_0x440c80[_0xe444('0x48')]['id']}})['then'](handleEntityNotFound(_0x499961,null))[_0xe444('0x21')](function(_0x1374aa){if(_0x1374aa){_0x5a99c9=_0x1374aa;return _0x1374aa['addBlackLists'](_0x440c80['body'][_0xe444('0x7b')],_[_0xe444('0x57')](_0x440c80['body'],[_0xe444('0x7b'),'id'])||{});}return null;})['spread'](function(_0x578b86){var _0x2483ab;_0x425a45=_0x578b86||[];var _0x23e7c6=[];if(_0x578b86){for(var _0x24f30a=0x0;_0x24f30a<_0x578b86['length'];_0x24f30a+=0x1){var _0x83fb35=_0x578b86[_0x24f30a][_0xe444('0x22')]({'plain':!![]});_0x2483ab=squel['insert']()['into'](_0xe444('0xb9'))['fromQuery']([_0xe444('0x9b'),_0xe444('0x9c'),'ListId',_0xe444('0x60'),_0xe444('0x58'),_0xe444('0x59')],squel[_0xe444('0x7c')]()[_0xe444('0x9e')](_0xe444('0x9b'),_0xe444('0x9b'))[_0xe444('0x9e')]('id','ContactId')[_0xe444('0x9e')](_0x83fb35[_0xe444('0xa0')][_0xe444('0x82')](),_0xe444('0x9d'))['field'](_0x440c80[_0xe444('0x48')]['id'][_0xe444('0x82')](),_0xe444('0x60'))['field'](_0xe444('0xba'),'createdAt')[_0xe444('0x9e')](_0xe444('0xba'),'updatedAt')[_0xe444('0xa1')]('cm_contacts')[_0xe444('0x3e')](_0xe444('0xa9'))[_0xe444('0x3e')](_0xe444('0xa3'),_0x83fb35[_0xe444('0xa0')][_0xe444('0x82')]())[_0xe444('0x3e')](_0xe444('0xbb')))['toString']();_0x23e7c6[_0xe444('0x81')](db['sequelize'][_0xe444('0x39')](_0x2483ab));}return BPromise[_0xe444('0xb5')](_0x23e7c6);}})['then'](function(){return _0x425a45;})['then'](respondWithResult(_0x499961,null))[_0xe444('0x46')](handleError(_0x499961,null));};exports['removeBlackLists']=function(_0x3cc3e9,_0x111594,_0x330824){return db['VoiceQueue'][_0xe444('0x2b')]({'where':{'id':_0x3cc3e9[_0xe444('0x48')]['id']}})[_0xe444('0x21')](handleEntityNotFound(_0x111594,null))[_0xe444('0x21')](function(_0x32177a){if(_0x32177a){return _0x32177a[_0xe444('0xbc')](_0x3cc3e9[_0xe444('0x39')]['ids']);}})[_0xe444('0x21')](function(_0x357210){if(_0x357210){return db[_0xe444('0x64')]['destroy']({'where':{'ListId':_0x3cc3e9[_0xe444('0x39')][_0xe444('0x7b')],'VoiceQueueId':_0x3cc3e9[_0xe444('0x48')]['id']}})['then'](function(){return _0x357210;});}})[_0xe444('0x21')](respondWithStatusCode(_0x111594,null))[_0xe444('0x46')](handleError(_0x111594,null));}; \ No newline at end of file +var _0xef66=['omit','user','UserProfileResource','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','getHoppers','hasOwnProperty','VoiceQueueId','CmHopper','findOne','CmHopperHistory','CmHopperFinal','getHopperBlacks','CmHopperBlack','getTeams','Team','addTeams','teams','User','Agents','interface','flatMap','penalty','sequelize','each','upsert','findOrCreate','isNil','format','SIP/%s','voicePause','emit','userVoiceQueue:save','removeTeams','ids','select','field','tq.TeamId','from','user_has_teams','ut.TeamId\x20=\x20tq.TeamId','VoiceQueueId\x20=\x20?','ut.UserId\x20=\x20?','push','toString','QueryTypes','SELECT','every','union','compact','isEmpty','userVoiceQueue:remove','addAgents','spread','online','UserVoiceQueueRt','getAgents','getMembers','getLists','addLists','YYYY-MM-DD\x20HH:mm:ss','dialCheckDuplicateType','always','insert','cm_hopper','phone','ContactId','ListId','CmListId','deletedAt\x20IS\x20NULL','phone\x20NOT\x20IN\x20(?)','COALESCE(calleridnum,\x27\x27)','cm_hopper_final','COALESCE(phone,\x27\x27)','into','fromQuery','scheduledAt','cm_contacts','ListId\x20=\x20?','phone\x20IS\x20NOT\x20NULL','all','cm_hopper_additional_phones','CmHopperId','OrderBy','ci.OrderBy+1','cm_contact_has_items','join','ci.ItemClass=?','PHONE','removeLists','getBlackLists','CmList','addBlackLists','cm_hopper_black','NOW()','removeBlackLists','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','mustache','util','path','sox','to-csv','ejs','fs-extra','lodash','squel','desk.js','querystring','papaparse','ioredis','../../components/parsers/qs','../../config/logger','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','defaults','redis','localhost','socket.io-emitter','./voiceQueue.socket','sendStatus','status','end','json','offset','undefined','limit','count','set','apply','save','update','then','destroy','get','VoiceQueues','inbound','QueueCampaigns','outbound','filter','ignore','map','value','includes','type','find','name','error','send','rawAttributes','fieldName','key','model','keys','query','filters','intersection','attributes','fields','length','nolimit','order','sort','where','pick','VIRTUAL','merge','options','includeAll','include','VoiceQueue','findAll','rows','catch','show','create','body','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','UserProfileSection','userProfileId','autoAssociation','clone','params','createdAt','updatedAt'];(function(_0x2f74a2,_0x4f2ae0){var _0xdbb1ec=function(_0x444ddd){while(--_0x444ddd){_0x2f74a2['push'](_0x2f74a2['shift']());}};_0xdbb1ec(++_0x4f2ae0);}(_0xef66,0x1db));var _0x6ef6=function(_0xa13f25,_0x116b5b){_0xa13f25=_0xa13f25-0x0;var _0x33c917=_0xef66[_0xa13f25];return _0x33c917;};'use strict';var emlformat=require(_0x6ef6('0x0'));var rimraf=require(_0x6ef6('0x1'));var zipdir=require(_0x6ef6('0x2'));var jsonpatch=require(_0x6ef6('0x3'));var rp=require(_0x6ef6('0x4'));var moment=require('moment');var BPromise=require('bluebird');var Mustache=require(_0x6ef6('0x5'));var util=require(_0x6ef6('0x6'));var path=require(_0x6ef6('0x7'));var sox=require(_0x6ef6('0x8'));var csv=require(_0x6ef6('0x9'));var ejs=require(_0x6ef6('0xa'));var fs=require('fs');var fs_extra=require(_0x6ef6('0xb'));var _=require(_0x6ef6('0xc'));var squel=require(_0x6ef6('0xd'));var crypto=require('crypto');var jsforce=require('jsforce');var deskjs=require(_0x6ef6('0xe'));var toCsv=require(_0x6ef6('0x9'));var querystring=require(_0x6ef6('0xf'));var Papa=require(_0x6ef6('0x10'));var Redis=require(_0x6ef6('0x11'));var authService=require('../../components/auth/service');var qs=require(_0x6ef6('0x12'));var as=require('../../components/parsers/advancedSearch');var hardwareService=require('../../config/license/hardware');var logger=require(_0x6ef6('0x13'))('api');var utils=require(_0x6ef6('0x14'));var config=require(_0x6ef6('0x15'));var licenseUtil=require(_0x6ef6('0x16'));var db=require(_0x6ef6('0x17'))['db'];config['redis']=_[_0x6ef6('0x18')](config[_0x6ef6('0x19')],{'host':_0x6ef6('0x1a'),'port':0x18eb});var socket=require(_0x6ef6('0x1b'))(new Redis(config['redis']));require(_0x6ef6('0x1c'))['register'](socket);function respondWithStatusCode(_0x40d198,_0x29510e){_0x29510e=_0x29510e||0xcc;return function(_0x587806){if(_0x587806){return _0x40d198[_0x6ef6('0x1d')](_0x29510e);}return _0x40d198[_0x6ef6('0x1e')](_0x29510e)[_0x6ef6('0x1f')]();};}function respondWithResult(_0x3f0a84,_0x3fa688){_0x3fa688=_0x3fa688||0xc8;return function(_0x2e6eb6){if(_0x2e6eb6){return _0x3f0a84[_0x6ef6('0x1e')](_0x3fa688)[_0x6ef6('0x20')](_0x2e6eb6);}};}function respondWithFilteredResult(_0x1ed381,_0x2ddb6a){return function(_0x53586d){if(_0x53586d){var _0x3fc3d1=typeof _0x2ddb6a[_0x6ef6('0x21')]===_0x6ef6('0x22')&&typeof _0x2ddb6a[_0x6ef6('0x23')]===_0x6ef6('0x22');var _0x2e6e52=_0x53586d[_0x6ef6('0x24')];var _0x5a87e9=_0x3fc3d1?0x0:_0x2ddb6a[_0x6ef6('0x21')];var _0x20ef96=_0x3fc3d1?_0x53586d[_0x6ef6('0x24')]:_0x2ddb6a[_0x6ef6('0x21')]+_0x2ddb6a['limit'];var _0x164ed9;if(_0x20ef96>=_0x2e6e52){_0x20ef96=_0x2e6e52;_0x164ed9=0xc8;}else{_0x164ed9=0xce;}_0x1ed381[_0x6ef6('0x1e')](_0x164ed9);return _0x1ed381[_0x6ef6('0x25')]('Content-Range',_0x5a87e9+'-'+_0x20ef96+'/'+_0x2e6e52)[_0x6ef6('0x20')](_0x53586d);}return null;};}function patchUpdates(_0x1096de){return function(_0x5c943c){try{jsonpatch[_0x6ef6('0x26')](_0x5c943c,_0x1096de,!![]);}catch(_0x3c225f){return BPromise['reject'](_0x3c225f);}return _0x5c943c[_0x6ef6('0x27')]();};}function saveUpdates(_0xb1c6b0,_0x2072a1){return function(_0x414def){if(_0x414def){return _0x414def[_0x6ef6('0x28')](_0xb1c6b0)[_0x6ef6('0x29')](function(_0x1cd549){return _0x1cd549;});}return null;};}function removeEntity(_0x499d4f,_0x2e5059){return function(_0x503379){if(_0x503379){return _0x503379[_0x6ef6('0x2a')]()[_0x6ef6('0x29')](function(){var _0x443ded=_0x503379[_0x6ef6('0x2b')]({'plain':!![]});var _0x1faa2c=[{'name':_0x6ef6('0x2c'),'value':_0x6ef6('0x2d'),'ignore':![]},{'name':_0x6ef6('0x2e'),'value':_0x6ef6('0x2f'),'ignore':![]}];var _0x1c4d4d=_(_0x1faa2c)[_0x6ef6('0x30')](_0x6ef6('0x31'))[_0x6ef6('0x32')](_0x6ef6('0x33'))[_0x6ef6('0x33')]();if(_[_0x6ef6('0x34')](_0x1c4d4d,_0x443ded[_0x6ef6('0x35')])){return;}var _0x17d261=_[_0x6ef6('0x36')](_0x1faa2c,[_0x6ef6('0x33'),_0x443ded['type']])[_0x6ef6('0x37')];return db['UserProfileResource'][_0x6ef6('0x2a')]({'where':{'type':_0x17d261,'resourceId':_0x443ded['id']}})[_0x6ef6('0x29')](function(){return _0x503379;});})[_0x6ef6('0x29')](function(){_0x499d4f['status'](0xcc)['end']();});}};}function handleEntityNotFound(_0xd97cd0,_0x300051){return function(_0x335b1d){if(!_0x335b1d){_0xd97cd0['sendStatus'](0x194);}return _0x335b1d;};}function handleError(_0x364d4d,_0x5ed542){_0x5ed542=_0x5ed542||0x1f4;return function(_0x3cc6a3){logger[_0x6ef6('0x38')](_0x3cc6a3['stack']);if(_0x3cc6a3['name']){delete _0x3cc6a3[_0x6ef6('0x37')];}_0x364d4d['status'](_0x5ed542)[_0x6ef6('0x39')](_0x3cc6a3);};}exports['index']=function(_0x3f0ada,_0x4b8d24){var _0x5e132a={},_0x72c277={},_0x220b88={'count':0x0,'rows':[]};var _0x5d1db9=_[_0x6ef6('0x32')](db['VoiceQueue'][_0x6ef6('0x3a')],function(_0x515908){return{'name':_0x515908[_0x6ef6('0x3b')],'type':_0x515908['type'][_0x6ef6('0x3c')]};});_0x72c277[_0x6ef6('0x3d')]=_[_0x6ef6('0x32')](_0x5d1db9,'name');_0x72c277['query']=_[_0x6ef6('0x3e')](_0x3f0ada[_0x6ef6('0x3f')]);_0x72c277[_0x6ef6('0x40')]=_[_0x6ef6('0x41')](_0x72c277['model'],_0x72c277['query']);_0x5e132a[_0x6ef6('0x42')]=_['intersection'](_0x72c277['model'],qs[_0x6ef6('0x43')](_0x3f0ada['query'][_0x6ef6('0x43')]));_0x5e132a[_0x6ef6('0x42')]=_0x5e132a[_0x6ef6('0x42')][_0x6ef6('0x44')]?_0x5e132a[_0x6ef6('0x42')]:_0x72c277[_0x6ef6('0x3d')];if(!_0x3f0ada[_0x6ef6('0x3f')]['hasOwnProperty'](_0x6ef6('0x45'))){_0x5e132a['limit']=qs['limit'](_0x3f0ada[_0x6ef6('0x3f')][_0x6ef6('0x23')]);_0x5e132a[_0x6ef6('0x21')]=qs['offset'](_0x3f0ada[_0x6ef6('0x3f')][_0x6ef6('0x21')]);}_0x5e132a[_0x6ef6('0x46')]=qs['sort'](_0x3f0ada[_0x6ef6('0x3f')][_0x6ef6('0x47')]);_0x5e132a[_0x6ef6('0x48')]=qs[_0x6ef6('0x40')](_[_0x6ef6('0x49')](_0x3f0ada[_0x6ef6('0x3f')],_0x72c277[_0x6ef6('0x40')]),_0x5d1db9);if(_0x3f0ada[_0x6ef6('0x3f')][_0x6ef6('0x30')]){_0x5e132a[_0x6ef6('0x48')]=_['merge'](_0x5e132a[_0x6ef6('0x48')],{'$or':_[_0x6ef6('0x32')](_0x5d1db9,function(_0x3be8e3){if(_0x3be8e3[_0x6ef6('0x35')]!==_0x6ef6('0x4a')){var _0x23abee={};_0x23abee[_0x3be8e3[_0x6ef6('0x37')]]={'$like':'%'+_0x3f0ada[_0x6ef6('0x3f')][_0x6ef6('0x30')]+'%'};return _0x23abee;}})});}_0x5e132a=_[_0x6ef6('0x4b')]({},_0x5e132a,_0x3f0ada[_0x6ef6('0x4c')]);var _0x5a5e91={'where':_0x5e132a[_0x6ef6('0x48')]};return db['VoiceQueue'][_0x6ef6('0x24')](_0x5a5e91)['then'](function(_0x2b7b21){_0x220b88[_0x6ef6('0x24')]=_0x2b7b21;if(_0x3f0ada['query'][_0x6ef6('0x4d')]){_0x5e132a[_0x6ef6('0x4e')]=[{'all':!![]}];}return db[_0x6ef6('0x4f')][_0x6ef6('0x50')](_0x5e132a);})[_0x6ef6('0x29')](function(_0x5dfd25){_0x220b88[_0x6ef6('0x51')]=_0x5dfd25;return _0x220b88;})[_0x6ef6('0x29')](respondWithFilteredResult(_0x4b8d24,_0x5e132a))[_0x6ef6('0x52')](handleError(_0x4b8d24,null));};exports[_0x6ef6('0x53')]=function(_0x26e869,_0x30be57){var _0x3144ea={'raw':![],'where':{'id':_0x26e869['params']['id']}},_0x435231={};_0x435231[_0x6ef6('0x3d')]=_[_0x6ef6('0x3e')](db['VoiceQueue']['rawAttributes']);_0x435231[_0x6ef6('0x3f')]=_['keys'](_0x26e869[_0x6ef6('0x3f')]);_0x435231['filters']=_[_0x6ef6('0x41')](_0x435231[_0x6ef6('0x3d')],_0x435231[_0x6ef6('0x3f')]);_0x3144ea[_0x6ef6('0x42')]=_['intersection'](_0x435231['model'],qs['fields'](_0x26e869['query'][_0x6ef6('0x43')]));_0x3144ea[_0x6ef6('0x42')]=_0x3144ea[_0x6ef6('0x42')]['length']?_0x3144ea[_0x6ef6('0x42')]:_0x435231[_0x6ef6('0x3d')];if(_0x26e869[_0x6ef6('0x3f')][_0x6ef6('0x4d')]){_0x3144ea[_0x6ef6('0x4e')]=[{'all':!![]}];}_0x3144ea=_[_0x6ef6('0x4b')]({},_0x3144ea,_0x26e869[_0x6ef6('0x4c')]);return db['VoiceQueue'][_0x6ef6('0x36')](_0x3144ea)['then'](handleEntityNotFound(_0x30be57,null))[_0x6ef6('0x29')](respondWithResult(_0x30be57,null))[_0x6ef6('0x52')](handleError(_0x30be57,null));};exports['create']=function(_0x501c03,_0xac8647){return db[_0x6ef6('0x4f')][_0x6ef6('0x54')](_0x501c03[_0x6ef6('0x55')],{})[_0x6ef6('0x29')](function(_0x3070f9){var _0x3e4a64=_0x501c03['user'][_0x6ef6('0x2b')]({'plain':!![]});if(!_0x3e4a64)throw new Error(_0x6ef6('0x56'));if(_0x3e4a64[_0x6ef6('0x57')]==='user'){var _0x3a0533=_0x3070f9[_0x6ef6('0x2b')]({'plain':!![]});var _0x4c9213=[{'name':_0x6ef6('0x2c'),'value':_0x6ef6('0x2d')},{'name':_0x6ef6('0x2e'),'value':_0x6ef6('0x2f')}];var _0x10ba90=_[_0x6ef6('0x36')](_0x4c9213,[_0x6ef6('0x33'),_0x3a0533[_0x6ef6('0x35')]])['name'];return db[_0x6ef6('0x58')][_0x6ef6('0x36')]({'where':{'name':_0x10ba90,'userProfileId':_0x3e4a64[_0x6ef6('0x59')]},'raw':!![]})[_0x6ef6('0x29')](function(_0x4f7472){if(_0x4f7472&&_0x4f7472[_0x6ef6('0x5a')]===0x0){return db['UserProfileResource'][_0x6ef6('0x54')]({'name':_0x3a0533[_0x6ef6('0x37')],'resourceId':_0x3a0533['id'],'type':_0x4f7472[_0x6ef6('0x37')],'sectionId':_0x4f7472['id']},{})['then'](function(){return _0x3070f9;});}else{return _0x3070f9;}})[_0x6ef6('0x52')](function(_0x308f63){logger['error']('Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s',_0x308f63);throw _0x308f63;});}return _0x3070f9;})[_0x6ef6('0x29')](respondWithResult(_0xac8647,0xc9))[_0x6ef6('0x52')](handleError(_0xac8647,null));};exports[_0x6ef6('0x5b')]=function(_0x59a1f7,_0x266d2e){var _0x5c5f1d={'where':{'id':_0x59a1f7[_0x6ef6('0x5c')]['id']}},_0x5b5d1b={};_0x5b5d1b[_0x6ef6('0x3d')]=_['keys'](db[_0x6ef6('0x4f')][_0x6ef6('0x3a')]);_0x5c5f1d[_0x6ef6('0x42')]=_[_0x6ef6('0x41')](_0x5b5d1b['model'],qs[_0x6ef6('0x43')](_0x59a1f7[_0x6ef6('0x3f')][_0x6ef6('0x43')]));_0x5c5f1d[_0x6ef6('0x42')]=_0x5c5f1d[_0x6ef6('0x42')][_0x6ef6('0x44')]?_0x5c5f1d['attributes']:_0x5b5d1b['model'];if(_0x59a1f7['query'][_0x6ef6('0x4d')]){_0x5c5f1d[_0x6ef6('0x4e')]=[{'all':!![]}];}_0x5c5f1d=_[_0x6ef6('0x4b')]({},_0x5c5f1d,_0x59a1f7[_0x6ef6('0x4c')]);return db[_0x6ef6('0x4f')][_0x6ef6('0x36')](_0x5c5f1d)[_0x6ef6('0x29')](handleEntityNotFound(_0x266d2e,null))[_0x6ef6('0x29')](function(_0x338b57){if(_0x338b57){var _0x25e61e=_0x338b57[_0x6ef6('0x2b')]({'plain':!![]});_0x25e61e=qs['omit'](_0x25e61e,['id',_0x6ef6('0x5d'),_0x6ef6('0x5e')]);_0x59a1f7[_0x6ef6('0x55')]=_[_0x6ef6('0x5f')](_0x59a1f7[_0x6ef6('0x55')],['id',_0x6ef6('0x5d'),_0x6ef6('0x5e')]);return db[_0x6ef6('0x4f')]['create'](_[_0x6ef6('0x4b')](_0x25e61e,_0x59a1f7['body']),{'include':_0x59a1f7[_0x6ef6('0x3f')][_0x6ef6('0x4d')]?[{'all':!![]}]:undefined})[_0x6ef6('0x29')](function(_0x52a442){var _0x1aa427=_0x59a1f7[_0x6ef6('0x60')][_0x6ef6('0x2b')]({'plain':!![]});if(!_0x1aa427)throw new Error(_0x6ef6('0x56'));if(_0x1aa427['role']===_0x6ef6('0x60')){var _0x4135c5=_0x52a442[_0x6ef6('0x2b')]({'plain':!![]});var _0x3d4060=[{'name':_0x6ef6('0x2c'),'value':_0x6ef6('0x2d')},{'name':_0x6ef6('0x2e'),'value':_0x6ef6('0x2f')}];var _0x1a6aed=_[_0x6ef6('0x36')](_0x3d4060,['value',_0x4135c5[_0x6ef6('0x35')]])[_0x6ef6('0x37')];return db[_0x6ef6('0x58')][_0x6ef6('0x36')]({'where':{'name':_0x1a6aed,'userProfileId':_0x1aa427['userProfileId']},'raw':!![]})[_0x6ef6('0x29')](function(_0x3af65){if(_0x3af65&&_0x3af65[_0x6ef6('0x5a')]===0x0){return db[_0x6ef6('0x61')][_0x6ef6('0x54')]({'name':_0x4135c5['name'],'resourceId':_0x4135c5['id'],'type':_0x3af65['name'],'sectionId':_0x3af65['id']},{})[_0x6ef6('0x29')](function(){return _0x52a442;});}else{return _0x52a442;}})['catch'](function(_0x34f9ea){logger[_0x6ef6('0x38')](_0x6ef6('0x62'),_0x34f9ea);throw _0x34f9ea;});}return _0x52a442;});}})[_0x6ef6('0x29')](respondWithResult(_0x266d2e,0xc9))[_0x6ef6('0x52')](handleError(_0x266d2e,null));};exports[_0x6ef6('0x28')]=function(_0x2999a8,_0x30f096){if(_0x2999a8['body']['id']){delete _0x2999a8['body']['id'];}return db['VoiceQueue'][_0x6ef6('0x36')]({'where':{'id':_0x2999a8[_0x6ef6('0x5c')]['id']}})[_0x6ef6('0x29')](handleEntityNotFound(_0x30f096,null))['then'](saveUpdates(_0x2999a8[_0x6ef6('0x55')],null))['then'](respondWithResult(_0x30f096,null))['catch'](handleError(_0x30f096,null));};exports[_0x6ef6('0x2a')]=function(_0x307e33,_0x576174){return db['VoiceQueue'][_0x6ef6('0x36')]({'where':{'id':_0x307e33['params']['id']}})['then'](handleEntityNotFound(_0x576174,null))[_0x6ef6('0x29')](removeEntity(_0x576174,null))[_0x6ef6('0x52')](handleError(_0x576174,null));};exports[_0x6ef6('0x63')]=function(_0x614770,_0x1d1da7,_0x2cd616){var _0x529853={'raw':![],'where':{}};var _0x128d65={};var _0x6a81eb={'count':0x0,'rows':[]};return db[_0x6ef6('0x4f')]['findOne']({'where':{'id':_0x614770[_0x6ef6('0x5c')]['id']}})[_0x6ef6('0x29')](handleEntityNotFound(_0x1d1da7,null))[_0x6ef6('0x29')](function(_0x17d5e7){if(_0x17d5e7){_0x128d65['model']=_[_0x6ef6('0x3e')](db['CmHopper'][_0x6ef6('0x3a')]);_0x128d65[_0x6ef6('0x3f')]=_[_0x6ef6('0x3e')](_0x614770[_0x6ef6('0x3f')]);_0x128d65[_0x6ef6('0x40')]=_[_0x6ef6('0x41')](_0x128d65[_0x6ef6('0x3d')],_0x128d65[_0x6ef6('0x3f')]);_0x529853[_0x6ef6('0x42')]=_[_0x6ef6('0x41')](_0x128d65['model'],qs[_0x6ef6('0x43')](_0x614770[_0x6ef6('0x3f')][_0x6ef6('0x43')]));_0x529853[_0x6ef6('0x42')]=_0x529853[_0x6ef6('0x42')][_0x6ef6('0x44')]?_0x529853[_0x6ef6('0x42')]:_0x128d65[_0x6ef6('0x3d')];if(!_0x614770['query'][_0x6ef6('0x64')]('nolimit')){_0x529853[_0x6ef6('0x23')]=qs['limit'](_0x614770[_0x6ef6('0x3f')][_0x6ef6('0x23')]);_0x529853[_0x6ef6('0x21')]=qs['offset'](_0x614770['query'][_0x6ef6('0x21')]);}_0x529853[_0x6ef6('0x46')]=qs['sort'](_0x614770[_0x6ef6('0x3f')][_0x6ef6('0x47')]);_0x529853[_0x6ef6('0x48')]=qs[_0x6ef6('0x40')](_[_0x6ef6('0x49')](_0x614770[_0x6ef6('0x3f')],_0x128d65[_0x6ef6('0x40')]));_0x529853[_0x6ef6('0x48')][_0x6ef6('0x65')]=_0x17d5e7['id'];if(_0x614770[_0x6ef6('0x3f')][_0x6ef6('0x30')]){_0x529853[_0x6ef6('0x48')]=_['merge'](_0x529853[_0x6ef6('0x48')],{'$or':_[_0x6ef6('0x32')](_0x529853['attributes'],function(_0x5d9e4f){var _0x79816c={};_0x79816c[_0x5d9e4f]={'$like':'%'+_0x614770[_0x6ef6('0x3f')][_0x6ef6('0x30')]+'%'};return _0x79816c;})});}_0x529853=_[_0x6ef6('0x4b')]({},_0x529853,_0x614770[_0x6ef6('0x4c')]);return db[_0x6ef6('0x66')][_0x6ef6('0x24')]({'where':_0x529853['where']})[_0x6ef6('0x29')](function(_0x4ec67a){_0x6a81eb[_0x6ef6('0x24')]=_0x4ec67a;if(_0x614770[_0x6ef6('0x3f')][_0x6ef6('0x4d')]){_0x529853[_0x6ef6('0x4e')]=[{'all':!![]}];}return db[_0x6ef6('0x66')]['findAll'](_0x529853);})[_0x6ef6('0x29')](function(_0x40d669){_0x6a81eb[_0x6ef6('0x51')]=_0x40d669;return _0x6a81eb;});}})['then'](respondWithFilteredResult(_0x1d1da7,_0x529853))[_0x6ef6('0x52')](handleError(_0x1d1da7,null));};exports['getHopperHistories']=function(_0x19c241,_0x4c13b0,_0x4a9892){var _0x5bb2ec={'raw':!![],'where':{}};var _0x3287bc={};var _0x1fbfb5={'count':0x0,'rows':[]};return db[_0x6ef6('0x4f')][_0x6ef6('0x67')]({'where':{'id':_0x19c241[_0x6ef6('0x5c')]['id']}})['then'](handleEntityNotFound(_0x4c13b0,null))[_0x6ef6('0x29')](function(_0x2f86ce){if(_0x2f86ce){_0x3287bc['model']=_[_0x6ef6('0x3e')](db[_0x6ef6('0x68')][_0x6ef6('0x3a')]);_0x3287bc['query']=_[_0x6ef6('0x3e')](_0x19c241['query']);_0x3287bc[_0x6ef6('0x40')]=_[_0x6ef6('0x41')](_0x3287bc[_0x6ef6('0x3d')],_0x3287bc[_0x6ef6('0x3f')]);_0x5bb2ec[_0x6ef6('0x42')]=_['intersection'](_0x3287bc['model'],qs[_0x6ef6('0x43')](_0x19c241[_0x6ef6('0x3f')]['fields']));_0x5bb2ec[_0x6ef6('0x42')]=_0x5bb2ec[_0x6ef6('0x42')][_0x6ef6('0x44')]?_0x5bb2ec[_0x6ef6('0x42')]:_0x3287bc[_0x6ef6('0x3d')];if(!_0x19c241['query'][_0x6ef6('0x64')]('nolimit')){_0x5bb2ec['limit']=qs[_0x6ef6('0x23')](_0x19c241[_0x6ef6('0x3f')][_0x6ef6('0x23')]);_0x5bb2ec[_0x6ef6('0x21')]=qs[_0x6ef6('0x21')](_0x19c241[_0x6ef6('0x3f')]['offset']);}_0x5bb2ec[_0x6ef6('0x46')]=qs[_0x6ef6('0x47')](_0x19c241['query'][_0x6ef6('0x47')]);_0x5bb2ec['where']=qs[_0x6ef6('0x40')](_[_0x6ef6('0x49')](_0x19c241[_0x6ef6('0x3f')],_0x3287bc['filters']));_0x5bb2ec[_0x6ef6('0x48')][_0x6ef6('0x65')]=_0x2f86ce['id'];if(_0x19c241[_0x6ef6('0x3f')][_0x6ef6('0x30')]){_0x5bb2ec['where']=_[_0x6ef6('0x4b')](_0x5bb2ec[_0x6ef6('0x48')],{'$or':_[_0x6ef6('0x32')](_0x5bb2ec[_0x6ef6('0x42')],function(_0x17a7b0){var _0x5cf22b={};_0x5cf22b[_0x17a7b0]={'$like':'%'+_0x19c241[_0x6ef6('0x3f')][_0x6ef6('0x30')]+'%'};return _0x5cf22b;})});}_0x5bb2ec=_[_0x6ef6('0x4b')]({},_0x5bb2ec,_0x19c241[_0x6ef6('0x4c')]);return db[_0x6ef6('0x68')][_0x6ef6('0x24')]({'where':_0x5bb2ec[_0x6ef6('0x48')]})[_0x6ef6('0x29')](function(_0x52757a){_0x1fbfb5[_0x6ef6('0x24')]=_0x52757a;if(_0x19c241[_0x6ef6('0x3f')][_0x6ef6('0x4d')]){_0x5bb2ec['include']=[{'all':!![]}];}return db['CmHopperHistory'][_0x6ef6('0x50')](_0x5bb2ec);})[_0x6ef6('0x29')](function(_0x3c1748){_0x1fbfb5['rows']=_0x3c1748;return _0x1fbfb5;});}})[_0x6ef6('0x29')](respondWithFilteredResult(_0x4c13b0,_0x5bb2ec))[_0x6ef6('0x52')](handleError(_0x4c13b0,null));};exports['getHopperFinals']=function(_0x5719ad,_0x56429d,_0x55a4d5){var _0x195cea={'raw':!![],'where':{}};var _0x5cfa09={};var _0x2c70fe={'count':0x0,'rows':[]};return db[_0x6ef6('0x4f')][_0x6ef6('0x67')]({'where':{'id':_0x5719ad[_0x6ef6('0x5c')]['id']}})[_0x6ef6('0x29')](handleEntityNotFound(_0x56429d,null))[_0x6ef6('0x29')](function(_0x1e8674){if(_0x1e8674){_0x5cfa09['model']=_[_0x6ef6('0x3e')](db[_0x6ef6('0x69')][_0x6ef6('0x3a')]);_0x5cfa09[_0x6ef6('0x3f')]=_[_0x6ef6('0x3e')](_0x5719ad['query']);_0x5cfa09[_0x6ef6('0x40')]=_[_0x6ef6('0x41')](_0x5cfa09['model'],_0x5cfa09[_0x6ef6('0x3f')]);_0x195cea[_0x6ef6('0x42')]=_['intersection'](_0x5cfa09[_0x6ef6('0x3d')],qs[_0x6ef6('0x43')](_0x5719ad[_0x6ef6('0x3f')][_0x6ef6('0x43')]));_0x195cea[_0x6ef6('0x42')]=_0x195cea[_0x6ef6('0x42')][_0x6ef6('0x44')]?_0x195cea['attributes']:_0x5cfa09['model'];if(!_0x5719ad['query']['hasOwnProperty'](_0x6ef6('0x45'))){_0x195cea[_0x6ef6('0x23')]=qs[_0x6ef6('0x23')](_0x5719ad[_0x6ef6('0x3f')][_0x6ef6('0x23')]);_0x195cea[_0x6ef6('0x21')]=qs[_0x6ef6('0x21')](_0x5719ad['query'][_0x6ef6('0x21')]);}_0x195cea['order']=qs[_0x6ef6('0x47')](_0x5719ad[_0x6ef6('0x3f')][_0x6ef6('0x47')]);_0x195cea['where']=qs[_0x6ef6('0x40')](_[_0x6ef6('0x49')](_0x5719ad[_0x6ef6('0x3f')],_0x5cfa09[_0x6ef6('0x40')]));_0x195cea['where'][_0x6ef6('0x65')]=_0x1e8674['id'];if(_0x5719ad['query'][_0x6ef6('0x30')]){_0x195cea[_0x6ef6('0x48')]=_[_0x6ef6('0x4b')](_0x195cea['where'],{'$or':_['map'](_0x195cea['attributes'],function(_0xf7d3d5){var _0x59994b={};_0x59994b[_0xf7d3d5]={'$like':'%'+_0x5719ad['query'][_0x6ef6('0x30')]+'%'};return _0x59994b;})});}_0x195cea=_[_0x6ef6('0x4b')]({},_0x195cea,_0x5719ad['options']);return db[_0x6ef6('0x69')][_0x6ef6('0x24')]({'where':_0x195cea[_0x6ef6('0x48')]})[_0x6ef6('0x29')](function(_0x2e3ed3){_0x2c70fe['count']=_0x2e3ed3;if(_0x5719ad[_0x6ef6('0x3f')][_0x6ef6('0x4d')]){_0x195cea[_0x6ef6('0x4e')]=[{'all':!![]}];}return db[_0x6ef6('0x69')][_0x6ef6('0x50')](_0x195cea);})[_0x6ef6('0x29')](function(_0x526b89){_0x2c70fe['rows']=_0x526b89;return _0x2c70fe;});}})['then'](respondWithFilteredResult(_0x56429d,_0x195cea))[_0x6ef6('0x52')](handleError(_0x56429d,null));};exports[_0x6ef6('0x6a')]=function(_0x240637,_0x8c775c,_0x1a9bda){var _0x291f90={'raw':!![],'where':{}};var _0x5c201a={};var _0x292d58={'count':0x0,'rows':[]};return db['VoiceQueue'][_0x6ef6('0x67')]({'where':{'id':_0x240637[_0x6ef6('0x5c')]['id']}})['then'](handleEntityNotFound(_0x8c775c,null))[_0x6ef6('0x29')](function(_0x3bc477){if(_0x3bc477){_0x5c201a[_0x6ef6('0x3d')]=_['keys'](db[_0x6ef6('0x6b')][_0x6ef6('0x3a')]);_0x5c201a[_0x6ef6('0x3f')]=_[_0x6ef6('0x3e')](_0x240637[_0x6ef6('0x3f')]);_0x5c201a[_0x6ef6('0x40')]=_[_0x6ef6('0x41')](_0x5c201a[_0x6ef6('0x3d')],_0x5c201a['query']);_0x291f90['attributes']=_[_0x6ef6('0x41')](_0x5c201a['model'],qs[_0x6ef6('0x43')](_0x240637[_0x6ef6('0x3f')][_0x6ef6('0x43')]));_0x291f90[_0x6ef6('0x42')]=_0x291f90[_0x6ef6('0x42')]['length']?_0x291f90[_0x6ef6('0x42')]:_0x5c201a[_0x6ef6('0x3d')];if(!_0x240637[_0x6ef6('0x3f')][_0x6ef6('0x64')](_0x6ef6('0x45'))){_0x291f90[_0x6ef6('0x23')]=qs[_0x6ef6('0x23')](_0x240637['query'][_0x6ef6('0x23')]);_0x291f90[_0x6ef6('0x21')]=qs[_0x6ef6('0x21')](_0x240637['query'][_0x6ef6('0x21')]);}_0x291f90['order']=qs[_0x6ef6('0x47')](_0x240637[_0x6ef6('0x3f')]['sort']);_0x291f90['where']=qs[_0x6ef6('0x40')](_['pick'](_0x240637['query'],_0x5c201a[_0x6ef6('0x40')]));_0x291f90[_0x6ef6('0x48')][_0x6ef6('0x65')]=_0x3bc477['id'];if(_0x240637[_0x6ef6('0x3f')][_0x6ef6('0x30')]){_0x291f90[_0x6ef6('0x48')]=_[_0x6ef6('0x4b')](_0x291f90[_0x6ef6('0x48')],{'$or':_[_0x6ef6('0x32')](_0x291f90[_0x6ef6('0x42')],function(_0x46a80f){var _0x3deb57={};_0x3deb57[_0x46a80f]={'$like':'%'+_0x240637[_0x6ef6('0x3f')][_0x6ef6('0x30')]+'%'};return _0x3deb57;})});}_0x291f90=_['merge']({},_0x291f90,_0x240637[_0x6ef6('0x4c')]);return db['CmHopperBlack'][_0x6ef6('0x24')]({'where':_0x291f90['where']})[_0x6ef6('0x29')](function(_0x523591){_0x292d58[_0x6ef6('0x24')]=_0x523591;if(_0x240637['query'][_0x6ef6('0x4d')]){_0x291f90['include']=[{'all':!![]}];}return db[_0x6ef6('0x6b')][_0x6ef6('0x50')](_0x291f90);})[_0x6ef6('0x29')](function(_0x1c571a){_0x292d58[_0x6ef6('0x51')]=_0x1c571a;return _0x292d58;});}})[_0x6ef6('0x29')](respondWithFilteredResult(_0x8c775c,_0x291f90))[_0x6ef6('0x52')](handleError(_0x8c775c,null));};exports[_0x6ef6('0x6c')]=function(_0x16c53c,_0x4be0b3,_0x45737d){var _0x4cf81a={};var _0x94ddc5={};var _0x23709f;var _0x25a772;return db[_0x6ef6('0x4f')][_0x6ef6('0x67')]({'where':{'id':_0x16c53c['params']['id']}})['then'](handleEntityNotFound(_0x4be0b3,null))[_0x6ef6('0x29')](function(_0x50370d){if(_0x50370d){_0x23709f=_0x50370d;_0x94ddc5[_0x6ef6('0x3d')]=_['keys'](db[_0x6ef6('0x6d')][_0x6ef6('0x3a')]);_0x94ddc5[_0x6ef6('0x3f')]=_[_0x6ef6('0x3e')](_0x16c53c[_0x6ef6('0x3f')]);_0x94ddc5[_0x6ef6('0x40')]=_[_0x6ef6('0x41')](_0x94ddc5[_0x6ef6('0x3d')],_0x94ddc5['query']);_0x4cf81a[_0x6ef6('0x42')]=_[_0x6ef6('0x41')](_0x94ddc5['model'],qs[_0x6ef6('0x43')](_0x16c53c[_0x6ef6('0x3f')][_0x6ef6('0x43')]));_0x4cf81a['attributes']=_0x4cf81a[_0x6ef6('0x42')]['length']?_0x4cf81a[_0x6ef6('0x42')]:_0x94ddc5[_0x6ef6('0x3d')];_0x4cf81a[_0x6ef6('0x46')]=qs[_0x6ef6('0x47')](_0x16c53c[_0x6ef6('0x3f')][_0x6ef6('0x47')]);_0x4cf81a[_0x6ef6('0x48')]=qs[_0x6ef6('0x40')](_[_0x6ef6('0x49')](_0x16c53c[_0x6ef6('0x3f')],_0x94ddc5['filters']));if(_0x16c53c[_0x6ef6('0x3f')][_0x6ef6('0x30')]){_0x4cf81a[_0x6ef6('0x48')]=_[_0x6ef6('0x4b')](_0x4cf81a[_0x6ef6('0x48')],{'$or':_[_0x6ef6('0x32')](_0x4cf81a[_0x6ef6('0x42')],function(_0x104720){var _0x216614={};_0x216614[_0x104720]={'$like':'%'+_0x16c53c[_0x6ef6('0x3f')][_0x6ef6('0x30')]+'%'};return _0x216614;})});}_0x4cf81a=_[_0x6ef6('0x4b')]({},_0x4cf81a,_0x16c53c[_0x6ef6('0x4c')]);return _0x23709f['getTeams'](_0x4cf81a);}})[_0x6ef6('0x29')](function(_0x504c51){if(_0x504c51){_0x25a772=_0x504c51[_0x6ef6('0x44')];if(!_0x16c53c[_0x6ef6('0x3f')][_0x6ef6('0x64')](_0x6ef6('0x45'))){_0x4cf81a[_0x6ef6('0x23')]=qs['limit'](_0x16c53c[_0x6ef6('0x3f')][_0x6ef6('0x23')]);_0x4cf81a[_0x6ef6('0x21')]=qs[_0x6ef6('0x21')](_0x16c53c[_0x6ef6('0x3f')][_0x6ef6('0x21')]);}return _0x23709f['getTeams'](_0x4cf81a);}})[_0x6ef6('0x29')](function(_0x406e52){if(_0x406e52){return _0x406e52?{'count':_0x25a772,'rows':_0x406e52}:null;}})[_0x6ef6('0x29')](respondWithResult(_0x4be0b3,null))[_0x6ef6('0x52')](handleError(_0x4be0b3,null));};exports[_0x6ef6('0x6e')]=function(_0x547672,_0x36e4ce,_0x1e8424){var _0x3bafa6=_0x547672[_0x6ef6('0x55')][_0x6ef6('0x6f')];var _0x19380a=_[_0x6ef6('0x32')](_0x3bafa6,'id');return db[_0x6ef6('0x6d')][_0x6ef6('0x50')]({'where':{'id':_0x19380a},'attributes':['id'],'include':[{'model':db[_0x6ef6('0x70')],'as':_0x6ef6('0x71'),'attributes':['id',_0x6ef6('0x37'),'online','voicePause',_0x6ef6('0x72')],'raw':!![]}]})['then'](function(_0x2affc0){if(_0x2affc0){var _0x2330f7=_[_0x6ef6('0x73')](_0x2affc0,function(_0x377f23){var _0x51171c=_0x377f23[_0x6ef6('0x2b')]({'plain':!![]});_0x51171c[_0x6ef6('0x71')]['forEach'](function(_0x266973){_0x266973[_0x6ef6('0x74')]=_[_0x6ef6('0x36')](_0x3bafa6,{'id':_0x51171c['id']})['penalty'];});return _0x51171c[_0x6ef6('0x71')];});return db[_0x6ef6('0x4f')][_0x6ef6('0x36')]({'where':{'id':_0x547672[_0x6ef6('0x5c')]['id']}})[_0x6ef6('0x29')](function(_0x55fe99){return db[_0x6ef6('0x75')]['transaction'](function(_0xee89c9){return _0x55fe99[_0x6ef6('0x6e')](_0x19380a,{'transaction':_0xee89c9})[_0x6ef6('0x29')](function(){return BPromise[_0x6ef6('0x76')](_0x3bafa6,function(_0x2390d1){return db['TeamVoiceQueue'][_0x6ef6('0x77')]({'TeamId':_0x2390d1['id'],'VoiceQueueId':_0x547672[_0x6ef6('0x5c')]['id'],'penalty':_0x2390d1[_0x6ef6('0x74')]},{'transaction':_0xee89c9});});})[_0x6ef6('0x29')](function(){return BPromise['each'](_0x2330f7,function(_0x4208ba){return db['UserVoiceQueue'][_0x6ef6('0x78')]({'where':{'UserId':_0x4208ba['id'],'VoiceQueueId':_0x547672['params']['id']},'defaults':{'penalty':_0x4208ba[_0x6ef6('0x74')]},'transaction':_0xee89c9});});})['then'](function(){return BPromise['each'](_[_0x6ef6('0x30')](_0x2330f7,{'online':!![]}),function(_0x25a137){return db['UserVoiceQueueRt']['upsert']({'membername':_0x25a137[_0x6ef6('0x37')],'UserId':_0x25a137['id'],'queue_name':_0x55fe99['name'],'VoiceQueueId':_0x55fe99['id'],'interface':_[_0x6ef6('0x79')](_0x25a137['interface'])?util[_0x6ef6('0x7a')](_0x6ef6('0x7b'),_0x25a137[_0x6ef6('0x37')]):_0x25a137[_0x6ef6('0x72')],'paused':_0x25a137[_0x6ef6('0x7c')]||![],'penalty':_0x25a137['penalty']},{'transaction':_0xee89c9});});})['then'](function(){_0x2330f7['forEach'](function(_0x1237c4){socket[_0x6ef6('0x7d')](_0x6ef6('0x7e'),{'UserId':_0x1237c4['id'],'VoiceQueueId':_0x55fe99['id']});});});});});}})[_0x6ef6('0x29')](respondWithStatusCode(_0x36e4ce,null))[_0x6ef6('0x52')](handleError(_0x36e4ce,null));};exports[_0x6ef6('0x7f')]=function(_0x256328,_0x373937,_0x176f12){return db['Team']['findAll']({'where':{'id':_0x256328['query'][_0x6ef6('0x80')]},'attributes':['id'],'include':[{'model':db[_0x6ef6('0x70')],'as':_0x6ef6('0x71'),'attributes':['id'],'raw':!![]}]})['then'](handleEntityNotFound(_0x373937,null))[_0x6ef6('0x29')](function(_0x5b2fb4){var _0x3691a0=_[_0x6ef6('0x32')](_0x5b2fb4,'id');var _0x2ddeec=[];var _0x5e9224=[];var _0x1975c0=squel[_0x6ef6('0x81')]();_0x1975c0[_0x6ef6('0x82')](_0x6ef6('0x83'))[_0x6ef6('0x84')]('team_has_voice_queues','tq')['join'](_0x6ef6('0x85'),'ut',_0x6ef6('0x86'))[_0x6ef6('0x48')](_0x6ef6('0x87'),_0x256328['params']['id']);for(var _0x2ed386=0x0;_0x2ed386<_0x5b2fb4[_0x6ef6('0x44')];_0x2ed386+=0x1){let _0x479784=_0x5b2fb4[_0x2ed386];for(var _0x57b44b=0x0;_0x57b44b<_0x479784[_0x6ef6('0x71')]['length'];_0x57b44b+=0x1){let _0x2eac13=_0x479784[_0x6ef6('0x71')][_0x57b44b];var _0x331a40=_0x1975c0[_0x6ef6('0x5b')]();_0x331a40['where'](_0x6ef6('0x88'),_0x2eac13['id']);_0x5e9224[_0x6ef6('0x89')](db[_0x6ef6('0x75')][_0x6ef6('0x3f')](_0x331a40[_0x6ef6('0x8a')](),{'type':db[_0x6ef6('0x75')][_0x6ef6('0x8b')][_0x6ef6('0x8c')]})[_0x6ef6('0x29')](function(_0x2ad20a){if(_0x2ad20a['length']===0x1){return _0x2eac13['id'];}else{var _0x576d9d=_[_0x6ef6('0x8d')](_['map'](_0x2ad20a,'TeamId'),function(_0x32b9d5){return _[_0x6ef6('0x34')](_0x3691a0,_0x32b9d5);});if(_0x576d9d){return _0x2eac13['id'];}}}));}}return BPromise['all'](_0x5e9224)[_0x6ef6('0x29')](function(_0x248c75){_0x2ddeec=_(_0x2ddeec)[_0x6ef6('0x8e')](_0x248c75)[_0x6ef6('0x8f')]()[_0x6ef6('0x33')]();return db['VoiceQueue'][_0x6ef6('0x36')]({'where':{'id':_0x256328[_0x6ef6('0x5c')]['id']}})[_0x6ef6('0x29')](function(_0x29d2db){return db[_0x6ef6('0x75')]['transaction'](function(_0x121440){return _0x29d2db[_0x6ef6('0x7f')](_0x256328[_0x6ef6('0x3f')][_0x6ef6('0x80')],{'transaction':_0x121440})[_0x6ef6('0x29')](function(){if(!_[_0x6ef6('0x90')](_0x2ddeec)){return _0x29d2db['removeAgents'](_0x2ddeec,{'transaction':_0x121440})[_0x6ef6('0x29')](function(){return db['UserVoiceQueueRt'][_0x6ef6('0x2a')]({'where':{'VoiceQueueId':_0x256328[_0x6ef6('0x5c')]['id'],'UserId':_0x2ddeec},'transaction':_0x121440});});}})['then'](function(){_0x2ddeec['forEach'](function(_0x462ccb){socket[_0x6ef6('0x7d')](_0x6ef6('0x91'),{'UserId':_0x462ccb,'VoiceQueueId':_0x29d2db['id']});});});});});});})['then'](respondWithStatusCode(_0x373937,null))[_0x6ef6('0x52')](handleError(_0x373937,null));};exports[_0x6ef6('0x92')]=function(_0x108617,_0x2ce2ff,_0x18fb4f){var _0x4c1b03,_0x556e5b;return db[_0x6ef6('0x4f')]['find']({'where':{'id':_0x108617[_0x6ef6('0x5c')]['id']}})[_0x6ef6('0x29')](handleEntityNotFound(_0x2ce2ff,null))[_0x6ef6('0x29')](function(_0x527ec4){if(_0x527ec4){_0x556e5b=_0x527ec4;return _0x527ec4['addAgents'](_0x108617[_0x6ef6('0x55')]['ids'],_[_0x6ef6('0x5f')](_0x108617[_0x6ef6('0x55')],[_0x6ef6('0x80'),'id'])||{})[_0x6ef6('0x93')](function(_0x5b26b9){for(var _0x2369a7=0x0;_0x2369a7<_0x108617[_0x6ef6('0x55')]['ids']['length'];_0x2369a7+=0x1){socket[_0x6ef6('0x7d')](_0x6ef6('0x7e'),{'UserId':Number(_0x108617['body'][_0x6ef6('0x80')][_0x2369a7]),'VoiceQueueId':Number(_0x108617[_0x6ef6('0x5c')]['id'])});}return _0x5b26b9;});}})[_0x6ef6('0x29')](function(_0x3bff3d){_0x4c1b03=_0x3bff3d||[];if(_0x556e5b){return db[_0x6ef6('0x70')][_0x6ef6('0x50')]({'where':{'id':_0x108617[_0x6ef6('0x55')][_0x6ef6('0x80')]},'attributes':['id','name','online','voicePause',_0x6ef6('0x72')],'raw':!![]});}})[_0x6ef6('0x29')](function(_0x466f4a){if(!_[_0x6ef6('0x90')](_0x466f4a)){var _0x108634=[];for(var _0x88f564=0x0;_0x88f564<_0x466f4a['length'];_0x88f564++){if(_0x466f4a[_0x88f564][_0x6ef6('0x94')]){_0x108634[_0x6ef6('0x89')](db[_0x6ef6('0x95')][_0x6ef6('0x77')]({'membername':_0x466f4a[_0x88f564][_0x6ef6('0x37')],'UserId':_0x466f4a[_0x88f564]['id'],'queue_name':_0x556e5b[_0x6ef6('0x37')],'VoiceQueueId':_0x556e5b['id'],'interface':_[_0x6ef6('0x79')](_0x466f4a[_0x88f564][_0x6ef6('0x72')])?util[_0x6ef6('0x7a')](_0x6ef6('0x7b'),_0x466f4a[_0x88f564][_0x6ef6('0x37')]):_0x466f4a[_0x88f564][_0x6ef6('0x72')],'paused':_0x466f4a[_0x88f564][_0x6ef6('0x7c')]||![],'penalty':_0x108617['body'][_0x6ef6('0x74')]||0x0}));}}return BPromise['all'](_0x108634);}})[_0x6ef6('0x29')](function(){return _0x4c1b03;})['then'](respondWithResult(_0x2ce2ff,null))[_0x6ef6('0x52')](handleError(_0x2ce2ff,null));};exports['removeAgents']=function(_0x35ebae,_0x1047b1,_0x331c56){return db[_0x6ef6('0x4f')][_0x6ef6('0x36')]({'where':{'id':_0x35ebae[_0x6ef6('0x5c')]['id']}})['then'](handleEntityNotFound(_0x1047b1,null))[_0x6ef6('0x29')](function(_0x4710cb){if(_0x4710cb){return _0x4710cb['removeAgents'](_0x35ebae[_0x6ef6('0x3f')][_0x6ef6('0x80')])[_0x6ef6('0x29')](function(){if(_['isArray'](_0x35ebae[_0x6ef6('0x3f')][_0x6ef6('0x80')])){for(var _0x5bc045=0x0;_0x5bc045<_0x35ebae[_0x6ef6('0x3f')][_0x6ef6('0x80')][_0x6ef6('0x44')];_0x5bc045+=0x1){socket[_0x6ef6('0x7d')](_0x6ef6('0x91'),{'UserId':Number(_0x35ebae[_0x6ef6('0x3f')][_0x6ef6('0x80')][_0x5bc045]),'VoiceQueueId':Number(_0x35ebae[_0x6ef6('0x5c')]['id'])});}}else{socket['emit'](_0x6ef6('0x91'),{'UserId':Number(_0x35ebae[_0x6ef6('0x3f')][_0x6ef6('0x80')]),'VoiceQueueId':Number(_0x35ebae['params']['id'])});}});}})['then'](function(_0x273eff){return db[_0x6ef6('0x95')]['destroy']({'where':{'VoiceQueueId':_0x35ebae[_0x6ef6('0x5c')]['id'],'UserId':_0x35ebae[_0x6ef6('0x3f')]['ids']}})[_0x6ef6('0x29')](function(){return _0x273eff;});})['then'](respondWithStatusCode(_0x1047b1,null))[_0x6ef6('0x52')](handleError(_0x1047b1,null));};exports['getAgents']=function(_0x18a0b7,_0x1d1073,_0x3321ab){var _0xa990f5={};var _0x1e7d64={};var _0x5def5a;var _0x405ad0;return db[_0x6ef6('0x4f')][_0x6ef6('0x67')]({'where':{'id':_0x18a0b7['params']['id']}})[_0x6ef6('0x29')](handleEntityNotFound(_0x1d1073,null))[_0x6ef6('0x29')](function(_0x44c744){if(_0x44c744){_0x5def5a=_0x44c744;_0x1e7d64['model']=_['keys'](db['User']['rawAttributes']);_0x1e7d64['query']=_[_0x6ef6('0x3e')](_0x18a0b7[_0x6ef6('0x3f')]);_0x1e7d64[_0x6ef6('0x40')]=_[_0x6ef6('0x41')](_0x1e7d64['model'],_0x1e7d64['query']);_0xa990f5[_0x6ef6('0x42')]=_[_0x6ef6('0x41')](_0x1e7d64['model'],qs['fields'](_0x18a0b7['query']['fields']));_0xa990f5[_0x6ef6('0x42')]=_0xa990f5[_0x6ef6('0x42')][_0x6ef6('0x44')]?_0xa990f5[_0x6ef6('0x42')]:_0x1e7d64[_0x6ef6('0x3d')];_0xa990f5['order']=qs['sort'](_0x18a0b7[_0x6ef6('0x3f')]['sort']);_0xa990f5['where']=qs[_0x6ef6('0x40')](_[_0x6ef6('0x49')](_0x18a0b7['query'],_0x1e7d64[_0x6ef6('0x40')]));if(_0x18a0b7['query'][_0x6ef6('0x30')]){_0xa990f5['where']=_[_0x6ef6('0x4b')](_0xa990f5[_0x6ef6('0x48')],{'$or':_[_0x6ef6('0x32')](_0xa990f5[_0x6ef6('0x42')],function(_0x493eff){var _0x40b0e4={};_0x40b0e4[_0x493eff]={'$like':'%'+_0x18a0b7['query'][_0x6ef6('0x30')]+'%'};return _0x40b0e4;})});}_0xa990f5=_['merge']({},_0xa990f5,_0x18a0b7[_0x6ef6('0x4c')]);return _0x5def5a['getAgents'](_0xa990f5);}})[_0x6ef6('0x29')](function(_0x6fe77d){if(_0x6fe77d){_0x405ad0=_0x6fe77d[_0x6ef6('0x44')];if(!_0x18a0b7[_0x6ef6('0x3f')][_0x6ef6('0x64')](_0x6ef6('0x45'))){_0xa990f5[_0x6ef6('0x23')]=qs['limit'](_0x18a0b7[_0x6ef6('0x3f')][_0x6ef6('0x23')]);_0xa990f5[_0x6ef6('0x21')]=qs[_0x6ef6('0x21')](_0x18a0b7[_0x6ef6('0x3f')][_0x6ef6('0x21')]);}return _0x5def5a[_0x6ef6('0x96')](_0xa990f5);}})[_0x6ef6('0x29')](function(_0x2c49dd){if(_0x2c49dd){return _0x2c49dd?{'count':_0x405ad0,'rows':_0x2c49dd}:null;}})[_0x6ef6('0x29')](respondWithResult(_0x1d1073,null))[_0x6ef6('0x52')](handleError(_0x1d1073,null));};exports[_0x6ef6('0x97')]=function(_0x4aedeb,_0x193508,_0x47e358){var _0x2c15a9={};var _0x1e61fc={};var _0x4c5a70;var _0x38c80a;return db['VoiceQueue'][_0x6ef6('0x67')]({'where':{'id':_0x4aedeb[_0x6ef6('0x5c')]['id']}})['then'](handleEntityNotFound(_0x193508,null))[_0x6ef6('0x29')](function(_0x4ca57d){if(_0x4ca57d){_0x4c5a70=_0x4ca57d;_0x1e61fc[_0x6ef6('0x3d')]=_['keys'](db[_0x6ef6('0x95')]['rawAttributes']);_0x1e61fc['query']=_[_0x6ef6('0x3e')](_0x4aedeb['query']);_0x1e61fc[_0x6ef6('0x40')]=_[_0x6ef6('0x41')](_0x1e61fc[_0x6ef6('0x3d')],_0x1e61fc['query']);_0x2c15a9[_0x6ef6('0x42')]=_['intersection'](_0x1e61fc['model'],qs['fields'](_0x4aedeb['query'][_0x6ef6('0x43')]));_0x2c15a9[_0x6ef6('0x42')]=_0x2c15a9[_0x6ef6('0x42')]['length']?_0x2c15a9[_0x6ef6('0x42')]:_0x1e61fc[_0x6ef6('0x3d')];_0x2c15a9['order']=qs[_0x6ef6('0x47')](_0x4aedeb[_0x6ef6('0x3f')]['sort']);_0x2c15a9[_0x6ef6('0x48')]=qs[_0x6ef6('0x40')](_[_0x6ef6('0x49')](_0x4aedeb['query'],_0x1e61fc[_0x6ef6('0x40')]));if(_0x4aedeb[_0x6ef6('0x3f')][_0x6ef6('0x30')]){_0x2c15a9[_0x6ef6('0x48')]=_[_0x6ef6('0x4b')](_0x2c15a9[_0x6ef6('0x48')],{'$or':_[_0x6ef6('0x32')](_0x2c15a9[_0x6ef6('0x42')],function(_0x43a6f9){var _0x5dca43={};_0x5dca43[_0x43a6f9]={'$like':'%'+_0x4aedeb['query'][_0x6ef6('0x30')]+'%'};return _0x5dca43;})});}_0x2c15a9=_[_0x6ef6('0x4b')]({},_0x2c15a9,_0x4aedeb[_0x6ef6('0x4c')]);return _0x4c5a70[_0x6ef6('0x97')](_0x2c15a9);}})[_0x6ef6('0x29')](function(_0x20f0c1){if(_0x20f0c1){_0x38c80a=_0x20f0c1[_0x6ef6('0x44')];if(!_0x4aedeb[_0x6ef6('0x3f')]['hasOwnProperty']('nolimit')){_0x2c15a9[_0x6ef6('0x23')]=qs[_0x6ef6('0x23')](_0x4aedeb[_0x6ef6('0x3f')][_0x6ef6('0x23')]);_0x2c15a9['offset']=qs[_0x6ef6('0x21')](_0x4aedeb[_0x6ef6('0x3f')][_0x6ef6('0x21')]);}return _0x4c5a70[_0x6ef6('0x97')](_0x2c15a9);}})['then'](function(_0x4af3e0){return _0x4af3e0?{'count':_0x38c80a,'rows':_0x4af3e0}:null;})[_0x6ef6('0x29')](respondWithResult(_0x193508,null))[_0x6ef6('0x52')](handleError(_0x193508,null));};exports[_0x6ef6('0x98')]=function(_0x16f6c2,_0x354caa,_0x34a887){var _0x2bfd7d={};var _0x518571={};var _0x239f99;var _0x15c215;return db[_0x6ef6('0x4f')][_0x6ef6('0x67')]({'where':{'id':_0x16f6c2[_0x6ef6('0x5c')]['id']}})[_0x6ef6('0x29')](handleEntityNotFound(_0x354caa,null))[_0x6ef6('0x29')](function(_0x59289e){if(_0x59289e){_0x239f99=_0x59289e;_0x518571[_0x6ef6('0x3d')]=_[_0x6ef6('0x3e')](db['CmList'][_0x6ef6('0x3a')]);_0x518571[_0x6ef6('0x3f')]=_[_0x6ef6('0x3e')](_0x16f6c2[_0x6ef6('0x3f')]);_0x518571['filters']=_[_0x6ef6('0x41')](_0x518571[_0x6ef6('0x3d')],_0x518571[_0x6ef6('0x3f')]);_0x2bfd7d['attributes']=_['intersection'](_0x518571['model'],qs[_0x6ef6('0x43')](_0x16f6c2[_0x6ef6('0x3f')][_0x6ef6('0x43')]));_0x2bfd7d[_0x6ef6('0x42')]=_0x2bfd7d[_0x6ef6('0x42')][_0x6ef6('0x44')]?_0x2bfd7d['attributes']:_0x518571[_0x6ef6('0x3d')];_0x2bfd7d[_0x6ef6('0x46')]=qs[_0x6ef6('0x47')](_0x16f6c2[_0x6ef6('0x3f')][_0x6ef6('0x47')]);_0x2bfd7d[_0x6ef6('0x48')]=qs[_0x6ef6('0x40')](_['pick'](_0x16f6c2[_0x6ef6('0x3f')],_0x518571[_0x6ef6('0x40')]));if(_0x16f6c2[_0x6ef6('0x3f')][_0x6ef6('0x30')]){_0x2bfd7d[_0x6ef6('0x48')]=_[_0x6ef6('0x4b')](_0x2bfd7d[_0x6ef6('0x48')],{'$or':_[_0x6ef6('0x32')](_0x2bfd7d[_0x6ef6('0x42')],function(_0x4534d1){var _0x51abf6={};_0x51abf6[_0x4534d1]={'$like':'%'+_0x16f6c2[_0x6ef6('0x3f')][_0x6ef6('0x30')]+'%'};return _0x51abf6;})});}_0x2bfd7d=_[_0x6ef6('0x4b')]({},_0x2bfd7d,_0x16f6c2[_0x6ef6('0x4c')]);return _0x239f99[_0x6ef6('0x98')](_0x2bfd7d);}})['then'](function(_0x328538){if(_0x328538){_0x15c215=_0x328538[_0x6ef6('0x44')];if(!_0x16f6c2[_0x6ef6('0x3f')][_0x6ef6('0x64')](_0x6ef6('0x45'))){_0x2bfd7d[_0x6ef6('0x23')]=qs[_0x6ef6('0x23')](_0x16f6c2[_0x6ef6('0x3f')][_0x6ef6('0x23')]);_0x2bfd7d[_0x6ef6('0x21')]=qs[_0x6ef6('0x21')](_0x16f6c2[_0x6ef6('0x3f')]['offset']);}return _0x239f99[_0x6ef6('0x98')](_0x2bfd7d);}})[_0x6ef6('0x29')](function(_0x33f369){if(_0x33f369){return _0x33f369?{'count':_0x15c215,'rows':_0x33f369}:null;}})['then'](respondWithResult(_0x354caa,null))[_0x6ef6('0x52')](handleError(_0x354caa,null));};exports[_0x6ef6('0x99')]=function(_0x37747f,_0x32c170,_0x30ecc3){var _0x469e54=moment()[_0x6ef6('0x7a')](_0x6ef6('0x9a'));var _0x4c914c,_0x4faebd;return db[_0x6ef6('0x4f')][_0x6ef6('0x36')]({'where':{'id':_0x37747f['params']['id']}})[_0x6ef6('0x29')](handleEntityNotFound(_0x32c170,null))['then'](function(_0x43f543){if(_0x43f543){_0x4faebd=_0x43f543;return _0x43f543[_0x6ef6('0x99')](_0x37747f[_0x6ef6('0x55')][_0x6ef6('0x80')],_['omit'](_0x37747f[_0x6ef6('0x55')],['ids','id'])||{});}return null;})[_0x6ef6('0x93')](function(_0x26228d){var _0x3a6396;_0x4c914c=_0x26228d||[];var _0x23851c=[];if(_0x26228d){for(var _0x8884c3=0x0;_0x8884c3<_0x26228d['length'];_0x8884c3+=0x1){var _0x36506c=_0x26228d[_0x8884c3]['get']({'plain':!![]});_0x4faebd[_0x6ef6('0x9b')]=_0x37747f[_0x6ef6('0x55')]['dialCheckDuplicateType']?_0x37747f[_0x6ef6('0x55')][_0x6ef6('0x9b')]:_0x4faebd[_0x6ef6('0x9b')];switch(_0x4faebd['dialCheckDuplicateType']){case _0x6ef6('0x9c'):_0x3a6396=squel[_0x6ef6('0x9d')]()['into'](_0x6ef6('0x9e'))['fromQuery']([_0x6ef6('0x9f'),'scheduledAt',_0x6ef6('0xa0'),_0x6ef6('0xa1'),_0x6ef6('0x65'),_0x6ef6('0x5d'),'updatedAt'],squel['select']()[_0x6ef6('0x82')](_0x6ef6('0x9f'),_0x6ef6('0x9f'))['field']('\x27'+_0x469e54+'\x27','scheduledAt')['field']('id',_0x6ef6('0xa0'))[_0x6ef6('0x82')](_0x36506c[_0x6ef6('0xa2')][_0x6ef6('0x8a')](),_0x6ef6('0xa1'))[_0x6ef6('0x82')](_0x37747f['params']['id'][_0x6ef6('0x8a')](),_0x6ef6('0x65'))[_0x6ef6('0x82')]('\x27'+_0x469e54+'\x27',_0x6ef6('0x5d'))[_0x6ef6('0x82')]('\x27'+_0x469e54+'\x27',_0x6ef6('0x5e'))[_0x6ef6('0x84')]('cm_contacts')[_0x6ef6('0x48')](_0x6ef6('0xa3'))[_0x6ef6('0x48')]('ListId\x20=\x20?',_0x36506c[_0x6ef6('0xa2')][_0x6ef6('0x8a')]())[_0x6ef6('0x48')]('phone\x20IS\x20NOT\x20NULL')[_0x6ef6('0x48')](_0x6ef6('0xa4'),squel[_0x6ef6('0x81')]()[_0x6ef6('0x82')](_0x6ef6('0xa5'))[_0x6ef6('0x84')](_0x6ef6('0xa6'))[_0x6ef6('0x48')](_0x6ef6('0x87'),_0x37747f['params']['id'][_0x6ef6('0x8a')]()))[_0x6ef6('0x48')]('phone\x20NOT\x20IN\x20(?)',squel['select']()['field'](_0x6ef6('0xa7'))[_0x6ef6('0x84')](_0x6ef6('0x9e'))['where'](_0x6ef6('0x87'),_0x37747f[_0x6ef6('0x5c')]['id'][_0x6ef6('0x8a')]())))[_0x6ef6('0x8a')]();break;case'onlyIfOpen':_0x3a6396=squel[_0x6ef6('0x9d')]()[_0x6ef6('0xa8')](_0x6ef6('0x9e'))[_0x6ef6('0xa9')]([_0x6ef6('0x9f'),_0x6ef6('0xaa'),_0x6ef6('0xa0'),_0x6ef6('0xa1'),'VoiceQueueId',_0x6ef6('0x5d'),'updatedAt'],squel['select']()[_0x6ef6('0x82')]('phone',_0x6ef6('0x9f'))[_0x6ef6('0x82')]('\x27'+_0x469e54+'\x27',_0x6ef6('0xaa'))['field']('id','ContactId')[_0x6ef6('0x82')](_0x36506c[_0x6ef6('0xa2')][_0x6ef6('0x8a')](),_0x6ef6('0xa1'))[_0x6ef6('0x82')](_0x37747f[_0x6ef6('0x5c')]['id'][_0x6ef6('0x8a')](),'VoiceQueueId')[_0x6ef6('0x82')]('\x27'+_0x469e54+'\x27','createdAt')[_0x6ef6('0x82')]('\x27'+_0x469e54+'\x27',_0x6ef6('0x5e'))['from'](_0x6ef6('0xab'))[_0x6ef6('0x48')](_0x6ef6('0xa3'))[_0x6ef6('0x48')](_0x6ef6('0xac'),_0x36506c[_0x6ef6('0xa2')][_0x6ef6('0x8a')]())['where'](_0x6ef6('0xad'))[_0x6ef6('0x48')](_0x6ef6('0xa4'),squel[_0x6ef6('0x81')]()[_0x6ef6('0x82')](_0x6ef6('0xa7'))[_0x6ef6('0x84')](_0x6ef6('0x9e'))[_0x6ef6('0x48')](_0x6ef6('0x87'),_0x37747f['params']['id'][_0x6ef6('0x8a')]())))[_0x6ef6('0x8a')]();break;default:_0x3a6396=squel[_0x6ef6('0x9d')]()[_0x6ef6('0xa8')](_0x6ef6('0x9e'))[_0x6ef6('0xa9')]([_0x6ef6('0x9f'),'scheduledAt',_0x6ef6('0xa0'),_0x6ef6('0xa1'),'VoiceQueueId',_0x6ef6('0x5d'),'updatedAt'],squel[_0x6ef6('0x81')]()['field']('phone',_0x6ef6('0x9f'))['field']('\x27'+_0x469e54+'\x27',_0x6ef6('0xaa'))[_0x6ef6('0x82')]('id','ContactId')['field'](_0x36506c[_0x6ef6('0xa2')][_0x6ef6('0x8a')](),_0x6ef6('0xa1'))['field'](_0x37747f[_0x6ef6('0x5c')]['id'][_0x6ef6('0x8a')](),_0x6ef6('0x65'))['field']('\x27'+_0x469e54+'\x27',_0x6ef6('0x5d'))[_0x6ef6('0x82')]('\x27'+_0x469e54+'\x27',_0x6ef6('0x5e'))[_0x6ef6('0x84')]('cm_contacts')[_0x6ef6('0x48')](_0x6ef6('0xa3'))[_0x6ef6('0x48')](_0x6ef6('0xac'),_0x36506c[_0x6ef6('0xa2')]['toString']())[_0x6ef6('0x48')]('phone\x20IS\x20NOT\x20NULL'))[_0x6ef6('0x8a')]();}_0x23851c[_0x6ef6('0x89')](db['sequelize'][_0x6ef6('0x3f')](_0x3a6396));}return BPromise[_0x6ef6('0xae')](_0x23851c);}})[_0x6ef6('0x29')](function(){var _0x1c1e11=[];var _0x1d1243=squel[_0x6ef6('0x9d')]()[_0x6ef6('0xa8')](_0x6ef6('0xaf'))[_0x6ef6('0xa9')]([_0x6ef6('0xb0'),_0x6ef6('0x9f'),_0x6ef6('0xb1'),_0x6ef6('0x5d'),_0x6ef6('0x5e')],squel[_0x6ef6('0x81')]()['field']('h.id')['field']('ci.item')['field'](_0x6ef6('0xb2'))['field']('\x27'+_0x469e54+'\x27',_0x6ef6('0x5d'))[_0x6ef6('0x82')]('\x27'+_0x469e54+'\x27',_0x6ef6('0x5e'))[_0x6ef6('0x84')](_0x6ef6('0xb3'),'ci')[_0x6ef6('0xb4')](_0x6ef6('0x9e'),'h','h.ContactId=ci.CmContactId')[_0x6ef6('0x48')]('h.scheduledat=?',_0x469e54)['where'](_0x6ef6('0xb5'),_0x6ef6('0xb6')))[_0x6ef6('0x8a')]();_0x1c1e11['push'](db[_0x6ef6('0x75')][_0x6ef6('0x3f')](_0x1d1243));return BPromise[_0x6ef6('0xae')](_0x1c1e11);})[_0x6ef6('0x29')](function(){return _0x4c914c;})[_0x6ef6('0x29')](respondWithResult(_0x32c170,null))['catch'](handleError(_0x32c170,null));};exports['removeLists']=function(_0x3ec248,_0x2d7880,_0x202b9){return db[_0x6ef6('0x4f')][_0x6ef6('0x36')]({'where':{'id':_0x3ec248['params']['id']}})[_0x6ef6('0x29')](handleEntityNotFound(_0x2d7880,null))[_0x6ef6('0x29')](function(_0x4cabe2){if(_0x4cabe2){return _0x4cabe2[_0x6ef6('0xb7')](_0x3ec248[_0x6ef6('0x3f')][_0x6ef6('0x80')]);}})[_0x6ef6('0x29')](function(_0x32036f){if(_0x32036f){return db[_0x6ef6('0x66')][_0x6ef6('0x2a')]({'where':{'ListId':_0x3ec248['query'][_0x6ef6('0x80')],'VoiceQueueId':_0x3ec248[_0x6ef6('0x5c')]['id']}})[_0x6ef6('0x29')](function(){return _0x32036f;});}})[_0x6ef6('0x29')](respondWithStatusCode(_0x2d7880,null))[_0x6ef6('0x52')](handleError(_0x2d7880,null));};exports[_0x6ef6('0xb8')]=function(_0x2d4ee6,_0x582116,_0x220a66){var _0x320a9e={};var _0x3a48a7={};var _0x4fd0b8;var _0x222e7e;return db['VoiceQueue'][_0x6ef6('0x67')]({'where':{'id':_0x2d4ee6[_0x6ef6('0x5c')]['id']}})[_0x6ef6('0x29')](handleEntityNotFound(_0x582116,null))[_0x6ef6('0x29')](function(_0x15c5c4){if(_0x15c5c4){_0x4fd0b8=_0x15c5c4;_0x3a48a7[_0x6ef6('0x3d')]=_[_0x6ef6('0x3e')](db[_0x6ef6('0xb9')][_0x6ef6('0x3a')]);_0x3a48a7[_0x6ef6('0x3f')]=_[_0x6ef6('0x3e')](_0x2d4ee6[_0x6ef6('0x3f')]);_0x3a48a7[_0x6ef6('0x40')]=_[_0x6ef6('0x41')](_0x3a48a7[_0x6ef6('0x3d')],_0x3a48a7[_0x6ef6('0x3f')]);_0x320a9e[_0x6ef6('0x42')]=_[_0x6ef6('0x41')](_0x3a48a7['model'],qs[_0x6ef6('0x43')](_0x2d4ee6[_0x6ef6('0x3f')]['fields']));_0x320a9e[_0x6ef6('0x42')]=_0x320a9e['attributes']['length']?_0x320a9e[_0x6ef6('0x42')]:_0x3a48a7[_0x6ef6('0x3d')];_0x320a9e[_0x6ef6('0x46')]=qs['sort'](_0x2d4ee6[_0x6ef6('0x3f')]['sort']);_0x320a9e['where']=qs[_0x6ef6('0x40')](_[_0x6ef6('0x49')](_0x2d4ee6[_0x6ef6('0x3f')],_0x3a48a7[_0x6ef6('0x40')]));if(_0x2d4ee6[_0x6ef6('0x3f')]['filter']){_0x320a9e[_0x6ef6('0x48')]=_[_0x6ef6('0x4b')](_0x320a9e[_0x6ef6('0x48')],{'$or':_[_0x6ef6('0x32')](_0x320a9e[_0x6ef6('0x42')],function(_0x32c85c){var _0x235df3={};_0x235df3[_0x32c85c]={'$like':'%'+_0x2d4ee6[_0x6ef6('0x3f')][_0x6ef6('0x30')]+'%'};return _0x235df3;})});}_0x320a9e=_[_0x6ef6('0x4b')]({},_0x320a9e,_0x2d4ee6[_0x6ef6('0x4c')]);return _0x4fd0b8[_0x6ef6('0xb8')](_0x320a9e);}})[_0x6ef6('0x29')](function(_0x495bce){if(_0x495bce){_0x222e7e=_0x495bce[_0x6ef6('0x44')];if(!_0x2d4ee6[_0x6ef6('0x3f')][_0x6ef6('0x64')](_0x6ef6('0x45'))){_0x320a9e[_0x6ef6('0x23')]=qs[_0x6ef6('0x23')](_0x2d4ee6[_0x6ef6('0x3f')][_0x6ef6('0x23')]);_0x320a9e[_0x6ef6('0x21')]=qs['offset'](_0x2d4ee6[_0x6ef6('0x3f')]['offset']);}return _0x4fd0b8[_0x6ef6('0xb8')](_0x320a9e);}})[_0x6ef6('0x29')](function(_0x2e1609){if(_0x2e1609){return _0x2e1609?{'count':_0x222e7e,'rows':_0x2e1609}:null;}})[_0x6ef6('0x29')](respondWithResult(_0x582116,null))[_0x6ef6('0x52')](handleError(_0x582116,null));};exports[_0x6ef6('0xba')]=function(_0x3b2aee,_0x111adf,_0x1de26c){var _0x33b673,_0x412132;return db[_0x6ef6('0x4f')]['find']({'where':{'id':_0x3b2aee[_0x6ef6('0x5c')]['id']}})[_0x6ef6('0x29')](handleEntityNotFound(_0x111adf,null))['then'](function(_0xa05c0e){if(_0xa05c0e){_0x412132=_0xa05c0e;return _0xa05c0e[_0x6ef6('0xba')](_0x3b2aee[_0x6ef6('0x55')][_0x6ef6('0x80')],_['omit'](_0x3b2aee['body'],[_0x6ef6('0x80'),'id'])||{});}return null;})[_0x6ef6('0x93')](function(_0x7e1435){var _0x2f186d;_0x33b673=_0x7e1435||[];var _0x108eb1=[];if(_0x7e1435){for(var _0x44ea37=0x0;_0x44ea37<_0x7e1435[_0x6ef6('0x44')];_0x44ea37+=0x1){var _0x5ab4da=_0x7e1435[_0x44ea37]['get']({'plain':!![]});_0x2f186d=squel['insert']()[_0x6ef6('0xa8')](_0x6ef6('0xbb'))['fromQuery'](['phone',_0x6ef6('0xa0'),'ListId',_0x6ef6('0x65'),_0x6ef6('0x5d'),'updatedAt'],squel[_0x6ef6('0x81')]()[_0x6ef6('0x82')](_0x6ef6('0x9f'),_0x6ef6('0x9f'))[_0x6ef6('0x82')]('id','ContactId')[_0x6ef6('0x82')](_0x5ab4da[_0x6ef6('0xa2')]['toString'](),_0x6ef6('0xa1'))[_0x6ef6('0x82')](_0x3b2aee[_0x6ef6('0x5c')]['id'][_0x6ef6('0x8a')](),_0x6ef6('0x65'))[_0x6ef6('0x82')](_0x6ef6('0xbc'),_0x6ef6('0x5d'))[_0x6ef6('0x82')](_0x6ef6('0xbc'),'updatedAt')[_0x6ef6('0x84')]('cm_contacts')[_0x6ef6('0x48')]('deletedAt\x20IS\x20NULL')[_0x6ef6('0x48')](_0x6ef6('0xac'),_0x5ab4da['CmListId'][_0x6ef6('0x8a')]())[_0x6ef6('0x48')](_0x6ef6('0xad')))[_0x6ef6('0x8a')]();_0x108eb1['push'](db[_0x6ef6('0x75')][_0x6ef6('0x3f')](_0x2f186d));}return BPromise[_0x6ef6('0xae')](_0x108eb1);}})[_0x6ef6('0x29')](function(){return _0x33b673;})[_0x6ef6('0x29')](respondWithResult(_0x111adf,null))[_0x6ef6('0x52')](handleError(_0x111adf,null));};exports[_0x6ef6('0xbd')]=function(_0x35968f,_0x3eda56,_0x591939){return db[_0x6ef6('0x4f')]['find']({'where':{'id':_0x35968f[_0x6ef6('0x5c')]['id']}})[_0x6ef6('0x29')](handleEntityNotFound(_0x3eda56,null))[_0x6ef6('0x29')](function(_0x286d3d){if(_0x286d3d){return _0x286d3d[_0x6ef6('0xbd')](_0x35968f[_0x6ef6('0x3f')]['ids']);}})['then'](function(_0x526e47){if(_0x526e47){return db[_0x6ef6('0x6b')][_0x6ef6('0x2a')]({'where':{'ListId':_0x35968f[_0x6ef6('0x3f')]['ids'],'VoiceQueueId':_0x35968f[_0x6ef6('0x5c')]['id']}})[_0x6ef6('0x29')](function(){return _0x526e47;});}})[_0x6ef6('0x29')](respondWithStatusCode(_0x3eda56,null))[_0x6ef6('0x52')](handleError(_0x3eda56,null));}; \ No newline at end of file diff --git a/server/api/voiceQueue/voiceQueue.events.js b/server/api/voiceQueue/voiceQueue.events.js index 0e158e3..168dd71 100644 --- a/server/api/voiceQueue/voiceQueue.events.js +++ b/server/api/voiceQueue/voiceQueue.events.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xccb4=['remove','emit','hasOwnProperty','exports','events','setMaxListeners','save','update'];(function(_0x487b0c,_0x14ff74){var _0x1adbdc=function(_0x2e7b9d){while(--_0x2e7b9d){_0x487b0c['push'](_0x487b0c['shift']());}};_0x1adbdc(++_0x14ff74);}(_0xccb4,0xac));var _0x4ccb=function(_0x59c301,_0x359c50){_0x59c301=_0x59c301-0x0;var _0x3866b9=_0xccb4[_0x59c301];return _0x3866b9;};'use strict';var EventEmitter=require(_0x4ccb('0x0'));var VoiceQueue=require('../../mysqldb')['db']['VoiceQueue'];var VoiceQueueEvents=new EventEmitter();VoiceQueueEvents[_0x4ccb('0x1')](0x0);var events={'afterCreate':_0x4ccb('0x2'),'afterUpdate':_0x4ccb('0x3'),'afterDestroy':_0x4ccb('0x4')};function emitEvent(_0x27f1cc){return function(_0x216970,_0x3e53f8,_0x7612a1){VoiceQueueEvents['emit'](_0x27f1cc+':'+_0x216970['id'],_0x216970);VoiceQueueEvents[_0x4ccb('0x5')](_0x27f1cc,_0x216970);_0x7612a1(null);};}for(var e in events){if(events[_0x4ccb('0x6')](e)){var event=events[e];VoiceQueue['hook'](e,emitEvent(event));}}module[_0x4ccb('0x7')]=VoiceQueueEvents; \ No newline at end of file +var _0x8595=['../../mysqldb','VoiceQueue','setMaxListeners','save','update','emit','hasOwnProperty','hook','exports','events'];(function(_0x1e14d8,_0x43f992){var _0x27b1ce=function(_0x4c5e55){while(--_0x4c5e55){_0x1e14d8['push'](_0x1e14d8['shift']());}};_0x27b1ce(++_0x43f992);}(_0x8595,0x171));var _0x5859=function(_0x409353,_0xe9f04d){_0x409353=_0x409353-0x0;var _0x4f4b59=_0x8595[_0x409353];return _0x4f4b59;};'use strict';var EventEmitter=require(_0x5859('0x0'));var VoiceQueue=require(_0x5859('0x1'))['db'][_0x5859('0x2')];var VoiceQueueEvents=new EventEmitter();VoiceQueueEvents[_0x5859('0x3')](0x0);var events={'afterCreate':_0x5859('0x4'),'afterUpdate':_0x5859('0x5'),'afterDestroy':'remove'};function emitEvent(_0x504cfe){return function(_0x40ef07,_0x4ed54f,_0x523064){VoiceQueueEvents[_0x5859('0x6')](_0x504cfe+':'+_0x40ef07['id'],_0x40ef07);VoiceQueueEvents[_0x5859('0x6')](_0x504cfe,_0x40ef07);_0x523064(null);};}for(var e in events){if(events[_0x5859('0x7')](e)){var event=events[e];VoiceQueue[_0x5859('0x8')](e,emitEvent(event));}}module[_0x5859('0x9')]=VoiceQueueEvents; \ No newline at end of file diff --git a/server/api/voiceQueue/voiceQueue.model.js b/server/api/voiceQueue/voiceQueue.model.js index 8883f94..76f6ec9 100644 --- a/server/api/voiceQueue/voiceQueue.model.js +++ b/server/api/voiceQueue/voiceQueue.model.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xedd9=['../../config/logger','api','moment','bluebird','request-promise','path','rimraf','./voiceQueue.attributes','exports','VoiceQueue','util'];(function(_0xab5f79,_0x5b7192){var _0x32b760=function(_0x4a9643){while(--_0x4a9643){_0xab5f79['push'](_0xab5f79['shift']());}};_0x32b760(++_0x5b7192);}(_0xedd9,0xfc));var _0x9edd=function(_0x5530f2,_0x235d04){_0x5530f2=_0x5530f2-0x0;var _0x311dcc=_0xedd9[_0x5530f2];return _0x311dcc;};'use strict';var _=require('lodash');var util=require(_0x9edd('0x0'));var logger=require(_0x9edd('0x1'))(_0x9edd('0x2'));var moment=require(_0x9edd('0x3'));var BPromise=require(_0x9edd('0x4'));var rp=require(_0x9edd('0x5'));var fs=require('fs');var path=require(_0x9edd('0x6'));var rimraf=require(_0x9edd('0x7'));var config=require('../../config/environment');var attributes=require(_0x9edd('0x8'));module[_0x9edd('0x9')]=function(_0x268f9e,_0x34c1a7){return _0x268f9e['define'](_0x9edd('0xa'),attributes,{'tableName':'voice_queues','paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file +var _0xedd9=['../../config/logger','api','moment','bluebird','request-promise','path','rimraf','./voiceQueue.attributes','exports','VoiceQueue','util'];(function(_0x582fd4,_0x4f336d){var _0x5725c5=function(_0x338ba4){while(--_0x338ba4){_0x582fd4['push'](_0x582fd4['shift']());}};_0x5725c5(++_0x4f336d);}(_0xedd9,0xfc));var _0x9edd=function(_0x518d16,_0x53cb8d){_0x518d16=_0x518d16-0x0;var _0x4d3bdc=_0xedd9[_0x518d16];return _0x4d3bdc;};'use strict';var _=require('lodash');var util=require(_0x9edd('0x0'));var logger=require(_0x9edd('0x1'))(_0x9edd('0x2'));var moment=require(_0x9edd('0x3'));var BPromise=require(_0x9edd('0x4'));var rp=require(_0x9edd('0x5'));var fs=require('fs');var path=require(_0x9edd('0x6'));var rimraf=require(_0x9edd('0x7'));var config=require('../../config/environment');var attributes=require(_0x9edd('0x8'));module[_0x9edd('0x9')]=function(_0x268f9e,_0x34c1a7){return _0x268f9e['define'](_0x9edd('0xa'),attributes,{'tableName':'voice_queues','paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file diff --git a/server/api/voiceQueue/voiceQueue.rpc.js b/server/api/voiceQueue/voiceQueue.rpc.js index 75c20dc..717f2c3 100644 --- a/server/api/voiceQueue/voiceQueue.rpc.js +++ b/server/api/voiceQueue/voiceQueue.rpc.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xeb46=['redis','defaults','localhost','socket.io-emitter','./voiceQueue.socket','register','request','then','info','VoiceQueue,\x20%s,\x20%s','request\x20sent','VoiceQueue,\x20%s,\x20%s,\x20%s','stringify','error','message','result','catch','GetVoiceQueue','VoiceQueue','raw','options','where','attributes','limit','include','map','model','debug','ShowVoiceQueue','find','lodash','util','moment','bluebird','ioredis','../../config/utils','../../config/logger','rpc','client'];(function(_0x5dee2a,_0x47d02a){var _0x31e98e=function(_0x48b1e9){while(--_0x48b1e9){_0x5dee2a['push'](_0x5dee2a['shift']());}};_0x31e98e(++_0x47d02a);}(_0xeb46,0x156));var _0x6eb4=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0xeb46[_0x3dd15e];return _0x231fd0;};'use strict';var _=require(_0x6eb4('0x0'));var util=require(_0x6eb4('0x1'));var moment=require(_0x6eb4('0x2'));var BPromise=require(_0x6eb4('0x3'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x6eb4('0x4'));var db=require('../../mysqldb')['db'];var utils=require(_0x6eb4('0x5'));var logger=require(_0x6eb4('0x6'))(_0x6eb4('0x7'));var config=require('../../config/environment');var jayson=require('jayson/promise');var client=jayson[_0x6eb4('0x8')]['http']({'port':0x232a});config[_0x6eb4('0x9')]=_[_0x6eb4('0xa')](config['redis'],{'host':_0x6eb4('0xb'),'port':0x18eb});var socket=require(_0x6eb4('0xc'))(new Redis(config[_0x6eb4('0x9')]));require(_0x6eb4('0xd'))[_0x6eb4('0xe')](socket);function respondWithRpcPromise(_0x556642,_0x11360e,_0x9e4986){return new BPromise(function(_0x183fa2,_0x46ff59){return client[_0x6eb4('0xf')](_0x556642,_0x9e4986)[_0x6eb4('0x10')](function(_0x417ad8){logger[_0x6eb4('0x11')](_0x6eb4('0x12'),_0x11360e,_0x6eb4('0x13'));logger['debug'](_0x6eb4('0x14'),_0x11360e,_0x6eb4('0x13'),JSON[_0x6eb4('0x15')](_0x417ad8));if(_0x417ad8[_0x6eb4('0x16')]){if(_0x417ad8['error']['code']===0x1f4){logger[_0x6eb4('0x16')](_0x6eb4('0x12'),_0x11360e,_0x417ad8['error'][_0x6eb4('0x17')]);return _0x46ff59(_0x417ad8[_0x6eb4('0x16')][_0x6eb4('0x17')]);}logger[_0x6eb4('0x16')](_0x6eb4('0x12'),_0x11360e,_0x417ad8[_0x6eb4('0x16')][_0x6eb4('0x17')]);return _0x183fa2(_0x417ad8['error'][_0x6eb4('0x17')]);}else{logger[_0x6eb4('0x11')]('VoiceQueue,\x20%s,\x20%s',_0x11360e,_0x6eb4('0x13'));_0x183fa2(_0x417ad8[_0x6eb4('0x18')][_0x6eb4('0x17')]);}})[_0x6eb4('0x19')](function(_0x481eee){logger[_0x6eb4('0x16')](_0x6eb4('0x12'),_0x11360e,_0x481eee);_0x46ff59(_0x481eee);});});}exports[_0x6eb4('0x1a')]=function(_0x54d9c0){var _0x4014be=this;return new Promise(function(_0x3519b8,_0x33b5ac){return db[_0x6eb4('0x1b')]['findAll']({'raw':_0x54d9c0['options']?_0x54d9c0['options'][_0x6eb4('0x1c')]===undefined?!![]:![]:!![],'where':_0x54d9c0[_0x6eb4('0x1d')]?_0x54d9c0[_0x6eb4('0x1d')][_0x6eb4('0x1e')]||null:null,'attributes':_0x54d9c0['options']?_0x54d9c0[_0x6eb4('0x1d')][_0x6eb4('0x1f')]||null:null,'limit':_0x54d9c0[_0x6eb4('0x1d')]?_0x54d9c0[_0x6eb4('0x1d')][_0x6eb4('0x20')]||null:null,'include':_0x54d9c0['options']?_0x54d9c0['options'][_0x6eb4('0x21')]?_[_0x6eb4('0x22')](_0x54d9c0[_0x6eb4('0x1d')][_0x6eb4('0x21')],function(_0x590a76){return{'model':db[_0x590a76[_0x6eb4('0x23')]],'as':_0x590a76['as'],'attributes':_0x590a76[_0x6eb4('0x1f')],'include':_0x590a76[_0x6eb4('0x21')]?_[_0x6eb4('0x22')](_0x590a76['include'],function(_0x270685){return{'model':db[_0x270685['model']],'as':_0x270685['as'],'attributes':_0x270685[_0x6eb4('0x1f')],'include':_0x270685['include']?_[_0x6eb4('0x22')](_0x270685[_0x6eb4('0x21')],function(_0x2ea067){return{'model':db[_0x2ea067[_0x6eb4('0x23')]],'as':_0x2ea067['as'],'attributes':_0x2ea067['attributes']};}):[]};}):[]};}):[]:[]})['then'](function(_0x22fa7f){logger[_0x6eb4('0x11')](_0x6eb4('0x1a'),_0x54d9c0);logger[_0x6eb4('0x24')](_0x6eb4('0x1a'),_0x54d9c0,JSON[_0x6eb4('0x15')](_0x22fa7f));_0x3519b8(_0x22fa7f);})[_0x6eb4('0x19')](function(_0x5f06d1){logger['error'](_0x6eb4('0x1a'),_0x5f06d1['message'],_0x54d9c0);_0x33b5ac(_0x4014be[_0x6eb4('0x16')](0x1f4,_0x5f06d1[_0x6eb4('0x17')]));});});};exports[_0x6eb4('0x25')]=function(_0x236d1e){var _0x410503=this;return new Promise(function(_0x2f7e67,_0x3b600a){return db[_0x6eb4('0x1b')][_0x6eb4('0x26')]({'raw':_0x236d1e[_0x6eb4('0x1d')]?_0x236d1e[_0x6eb4('0x1d')][_0x6eb4('0x1c')]===undefined?!![]:![]:!![],'where':_0x236d1e[_0x6eb4('0x1d')]?_0x236d1e[_0x6eb4('0x1d')]['where']||null:null,'attributes':_0x236d1e[_0x6eb4('0x1d')]?_0x236d1e[_0x6eb4('0x1d')][_0x6eb4('0x1f')]||null:null,'include':_0x236d1e['options']?_0x236d1e['options'][_0x6eb4('0x21')]?_[_0x6eb4('0x22')](_0x236d1e[_0x6eb4('0x1d')][_0x6eb4('0x21')],function(_0x1e4da0){return{'model':db[_0x1e4da0[_0x6eb4('0x23')]],'as':_0x1e4da0['as'],'attributes':_0x1e4da0[_0x6eb4('0x1f')],'include':_0x1e4da0['include']?_[_0x6eb4('0x22')](_0x1e4da0[_0x6eb4('0x21')],function(_0x4b960f){return{'model':db[_0x4b960f[_0x6eb4('0x23')]],'as':_0x4b960f['as'],'attributes':_0x4b960f['attributes'],'include':_0x4b960f['include']?_[_0x6eb4('0x22')](_0x4b960f['include'],function(_0x21b31b){return{'model':db[_0x21b31b[_0x6eb4('0x23')]],'as':_0x21b31b['as'],'attributes':_0x21b31b[_0x6eb4('0x1f')]};}):[]};}):[]};}):[]:[]})[_0x6eb4('0x10')](function(_0x382550){logger[_0x6eb4('0x11')]('ShowVoiceQueue',_0x236d1e);logger[_0x6eb4('0x24')](_0x6eb4('0x25'),_0x236d1e,JSON[_0x6eb4('0x15')](_0x382550));_0x2f7e67(_0x382550);})[_0x6eb4('0x19')](function(_0x1219a0){logger[_0x6eb4('0x16')]('ShowVoiceQueue',_0x1219a0[_0x6eb4('0x17')],_0x236d1e);_0x3b600a(_0x410503[_0x6eb4('0x16')](0x1f4,_0x1219a0['message']));});});}; \ No newline at end of file +var _0xaf77=['VoiceQueue,\x20%s,\x20%s','message','catch','GetVoiceQueue','VoiceQueue','findAll','options','raw','where','attributes','limit','include','map','model','ShowVoiceQueue','find','lodash','moment','bluebird','ioredis','../../mysqldb','../../config/utils','rpc','../../config/environment','jayson/promise','client','http','redis','defaults','socket.io-emitter','register','then','info','request\x20sent','debug','VoiceQueue,\x20%s,\x20%s,\x20%s','stringify','error','code'];(function(_0x4f3f71,_0x1e35ce){var _0x559c25=function(_0x1d874e){while(--_0x1d874e){_0x4f3f71['push'](_0x4f3f71['shift']());}};_0x559c25(++_0x1e35ce);}(_0xaf77,0x16f));var _0x7af7=function(_0x2a69b5,_0xa0fe8e){_0x2a69b5=_0x2a69b5-0x0;var _0x14622e=_0xaf77[_0x2a69b5];return _0x14622e;};'use strict';var _=require(_0x7af7('0x0'));var util=require('util');var moment=require(_0x7af7('0x1'));var BPromise=require(_0x7af7('0x2'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x7af7('0x3'));var db=require(_0x7af7('0x4'))['db'];var utils=require(_0x7af7('0x5'));var logger=require('../../config/logger')(_0x7af7('0x6'));var config=require(_0x7af7('0x7'));var jayson=require(_0x7af7('0x8'));var client=jayson[_0x7af7('0x9')][_0x7af7('0xa')]({'port':0x232a});config[_0x7af7('0xb')]=_[_0x7af7('0xc')](config[_0x7af7('0xb')],{'host':'localhost','port':0x18eb});var socket=require(_0x7af7('0xd'))(new Redis(config['redis']));require('./voiceQueue.socket')[_0x7af7('0xe')](socket);function respondWithRpcPromise(_0x4bf17f,_0x567d3a,_0x4c5627){return new BPromise(function(_0x8b6569,_0x382cfd){return client['request'](_0x4bf17f,_0x4c5627)[_0x7af7('0xf')](function(_0x5e945d){logger[_0x7af7('0x10')]('VoiceQueue,\x20%s,\x20%s',_0x567d3a,_0x7af7('0x11'));logger[_0x7af7('0x12')](_0x7af7('0x13'),_0x567d3a,'request\x20sent',JSON[_0x7af7('0x14')](_0x5e945d));if(_0x5e945d[_0x7af7('0x15')]){if(_0x5e945d[_0x7af7('0x15')][_0x7af7('0x16')]===0x1f4){logger[_0x7af7('0x15')](_0x7af7('0x17'),_0x567d3a,_0x5e945d[_0x7af7('0x15')]['message']);return _0x382cfd(_0x5e945d['error'][_0x7af7('0x18')]);}logger[_0x7af7('0x15')]('VoiceQueue,\x20%s,\x20%s',_0x567d3a,_0x5e945d['error'][_0x7af7('0x18')]);return _0x8b6569(_0x5e945d[_0x7af7('0x15')][_0x7af7('0x18')]);}else{logger[_0x7af7('0x10')](_0x7af7('0x17'),_0x567d3a,_0x7af7('0x11'));_0x8b6569(_0x5e945d['result'][_0x7af7('0x18')]);}})[_0x7af7('0x19')](function(_0x2ace0e){logger['error']('VoiceQueue,\x20%s,\x20%s',_0x567d3a,_0x2ace0e);_0x382cfd(_0x2ace0e);});});}exports[_0x7af7('0x1a')]=function(_0x50e789){var _0x217e12=this;return new Promise(function(_0x42c44f,_0x4305b7){return db[_0x7af7('0x1b')][_0x7af7('0x1c')]({'raw':_0x50e789[_0x7af7('0x1d')]?_0x50e789[_0x7af7('0x1d')][_0x7af7('0x1e')]===undefined?!![]:![]:!![],'where':_0x50e789[_0x7af7('0x1d')]?_0x50e789['options'][_0x7af7('0x1f')]||null:null,'attributes':_0x50e789[_0x7af7('0x1d')]?_0x50e789['options'][_0x7af7('0x20')]||null:null,'limit':_0x50e789['options']?_0x50e789[_0x7af7('0x1d')][_0x7af7('0x21')]||null:null,'include':_0x50e789[_0x7af7('0x1d')]?_0x50e789['options'][_0x7af7('0x22')]?_[_0x7af7('0x23')](_0x50e789[_0x7af7('0x1d')][_0x7af7('0x22')],function(_0x433b9e){return{'model':db[_0x433b9e[_0x7af7('0x24')]],'as':_0x433b9e['as'],'attributes':_0x433b9e[_0x7af7('0x20')],'include':_0x433b9e[_0x7af7('0x22')]?_[_0x7af7('0x23')](_0x433b9e[_0x7af7('0x22')],function(_0x32971b){return{'model':db[_0x32971b[_0x7af7('0x24')]],'as':_0x32971b['as'],'attributes':_0x32971b[_0x7af7('0x20')],'include':_0x32971b[_0x7af7('0x22')]?_['map'](_0x32971b['include'],function(_0x2e90d6){return{'model':db[_0x2e90d6[_0x7af7('0x24')]],'as':_0x2e90d6['as'],'attributes':_0x2e90d6['attributes']};}):[]};}):[]};}):[]:[]})[_0x7af7('0xf')](function(_0x537758){logger[_0x7af7('0x10')]('GetVoiceQueue',_0x50e789);logger[_0x7af7('0x12')]('GetVoiceQueue',_0x50e789,JSON[_0x7af7('0x14')](_0x537758));_0x42c44f(_0x537758);})['catch'](function(_0x4fe70b){logger[_0x7af7('0x15')]('GetVoiceQueue',_0x4fe70b['message'],_0x50e789);_0x4305b7(_0x217e12[_0x7af7('0x15')](0x1f4,_0x4fe70b['message']));});});};exports[_0x7af7('0x25')]=function(_0x54c52a){var _0x286af4=this;return new Promise(function(_0x5c882d,_0x34c4de){return db['VoiceQueue'][_0x7af7('0x26')]({'raw':_0x54c52a[_0x7af7('0x1d')]?_0x54c52a['options']['raw']===undefined?!![]:![]:!![],'where':_0x54c52a[_0x7af7('0x1d')]?_0x54c52a[_0x7af7('0x1d')][_0x7af7('0x1f')]||null:null,'attributes':_0x54c52a['options']?_0x54c52a[_0x7af7('0x1d')][_0x7af7('0x20')]||null:null,'include':_0x54c52a[_0x7af7('0x1d')]?_0x54c52a[_0x7af7('0x1d')][_0x7af7('0x22')]?_[_0x7af7('0x23')](_0x54c52a[_0x7af7('0x1d')][_0x7af7('0x22')],function(_0xd439be){return{'model':db[_0xd439be['model']],'as':_0xd439be['as'],'attributes':_0xd439be[_0x7af7('0x20')],'include':_0xd439be[_0x7af7('0x22')]?_[_0x7af7('0x23')](_0xd439be[_0x7af7('0x22')],function(_0x148733){return{'model':db[_0x148733[_0x7af7('0x24')]],'as':_0x148733['as'],'attributes':_0x148733[_0x7af7('0x20')],'include':_0x148733[_0x7af7('0x22')]?_[_0x7af7('0x23')](_0x148733[_0x7af7('0x22')],function(_0x382fdb){return{'model':db[_0x382fdb[_0x7af7('0x24')]],'as':_0x382fdb['as'],'attributes':_0x382fdb[_0x7af7('0x20')]};}):[]};}):[]};}):[]:[]})[_0x7af7('0xf')](function(_0xc9af08){logger['info'](_0x7af7('0x25'),_0x54c52a);logger['debug'](_0x7af7('0x25'),_0x54c52a,JSON[_0x7af7('0x14')](_0xc9af08));_0x5c882d(_0xc9af08);})[_0x7af7('0x19')](function(_0x5b2cc2){logger[_0x7af7('0x15')](_0x7af7('0x25'),_0x5b2cc2[_0x7af7('0x18')],_0x54c52a);_0x34c4de(_0x286af4[_0x7af7('0x15')](0x1f4,_0x5b2cc2[_0x7af7('0x18')]));});});}; \ No newline at end of file diff --git a/server/api/voiceQueue/voiceQueue.socket.js b/server/api/voiceQueue/voiceQueue.socket.js index d7297a7..9642943 100644 --- a/server/api/voiceQueue/voiceQueue.socket.js +++ b/server/api/voiceQueue/voiceQueue.socket.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xe89e=['emit','removeListener','register','length','voiceQueue:','./voiceQueue.events','remove'];(function(_0x35a140,_0x3aeac6){var _0x30ab82=function(_0x15a7c3){while(--_0x15a7c3){_0x35a140['push'](_0x35a140['shift']());}};_0x30ab82(++_0x3aeac6);}(_0xe89e,0x67));var _0xee89=function(_0x560711,_0x2a331a){_0x560711=_0x560711-0x0;var _0x36b953=_0xe89e[_0x560711];return _0x36b953;};'use strict';var VoiceQueueEvents=require(_0xee89('0x0'));var events=['save',_0xee89('0x1'),'update'];function createListener(_0x14b994,_0x53dd1e){return function(_0x4c432c){_0x53dd1e[_0xee89('0x2')](_0x14b994,_0x4c432c);};}function removeListener(_0x281046,_0x43d9d3){return function(){VoiceQueueEvents[_0xee89('0x3')](_0x281046,_0x43d9d3);};}exports[_0xee89('0x4')]=function(_0x136f79){for(var _0x40de15=0x0,_0x18f360=events[_0xee89('0x5')];_0x40de15<_0x18f360;_0x40de15++){var _0x22ed64=events[_0x40de15];var _0x15daf3=createListener(_0xee89('0x6')+_0x22ed64,_0x136f79);VoiceQueueEvents['on'](_0x22ed64,_0x15daf3);}}; \ No newline at end of file +var _0x44ad=['emit','removeListener','register','length','voiceQueue:','./voiceQueue.events','save','remove'];(function(_0x3a7111,_0x1fad2d){var _0x1a38f3=function(_0x18ae14){while(--_0x18ae14){_0x3a7111['push'](_0x3a7111['shift']());}};_0x1a38f3(++_0x1fad2d);}(_0x44ad,0x15d));var _0xd44a=function(_0x6e609d,_0x455314){_0x6e609d=_0x6e609d-0x0;var _0x5b78ce=_0x44ad[_0x6e609d];return _0x5b78ce;};'use strict';var VoiceQueueEvents=require(_0xd44a('0x0'));var events=[_0xd44a('0x1'),_0xd44a('0x2'),'update'];function createListener(_0x566276,_0x4cb6bd){return function(_0x1b2638){_0x4cb6bd[_0xd44a('0x3')](_0x566276,_0x1b2638);};}function removeListener(_0x1b5222,_0x2fcbb5){return function(){VoiceQueueEvents[_0xd44a('0x4')](_0x1b5222,_0x2fcbb5);};}exports[_0xd44a('0x5')]=function(_0x59f19e){for(var _0x202e34=0x0,_0x286588=events[_0xd44a('0x6')];_0x202e34<_0x286588;_0x202e34++){var _0x5b55af=events[_0x202e34];var _0x1b77dc=createListener(_0xd44a('0x7')+_0x5b55af,_0x59f19e);VoiceQueueEvents['on'](_0x5b55af,_0x1b77dc);}}; \ No newline at end of file diff --git a/server/api/voiceQueueReport/index.js b/server/api/voiceQueueReport/index.js index 23aaaa6..9311f19 100644 --- a/server/api/voiceQueueReport/index.js +++ b/server/api/voiceQueueReport/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x1336=['put','update','delete','destroy','exports','multer','path','connect-timeout','express','Router','fs-extra','../../config/environment','isAuthenticated','index','get','describe','/index','getVoiceQueuesReport','/:id','create'];(function(_0x2394d5,_0x3ad0cd){var _0x33a319=function(_0x590191){while(--_0x590191){_0x2394d5['push'](_0x2394d5['shift']());}};_0x33a319(++_0x3ad0cd);}(_0x1336,0xe1));var _0x6133=function(_0xf17839,_0x5061be){_0xf17839=_0xf17839-0x0;var _0x1ead1f=_0x1336[_0xf17839];return _0x1ead1f;};'use strict';var multer=require(_0x6133('0x0'));var util=require('util');var path=require(_0x6133('0x1'));var timeout=require(_0x6133('0x2'));var express=require(_0x6133('0x3'));var router=express[_0x6133('0x4')]();var fs_extra=require(_0x6133('0x5'));var auth=require('../../components/auth/service');var interaction=require('../../components/interaction/service');var config=require(_0x6133('0x6'));var controller=require('./voiceQueueReport.controller');router['get']('/',auth[_0x6133('0x7')](),controller[_0x6133('0x8')]);router[_0x6133('0x9')]('/describe',auth[_0x6133('0x7')](),controller[_0x6133('0xa')]);router['get'](_0x6133('0xb'),auth[_0x6133('0x7')](),controller[_0x6133('0xc')]);router[_0x6133('0x9')](_0x6133('0xd'),auth[_0x6133('0x7')](),controller['show']);router['post']('/',auth[_0x6133('0x7')](),controller[_0x6133('0xe')]);router[_0x6133('0xf')](_0x6133('0xd'),auth[_0x6133('0x7')](),controller[_0x6133('0x10')]);router[_0x6133('0x11')](_0x6133('0xd'),auth[_0x6133('0x7')](),controller[_0x6133('0x12')]);module[_0x6133('0x13')]=router; \ No newline at end of file +var _0x1f7a=['Router','fs-extra','../../components/auth/service','../../components/interaction/service','./voiceQueueReport.controller','get','isAuthenticated','index','/describe','describe','getVoiceQueuesReport','show','post','update','/:id','destroy','exports','multer','path','connect-timeout'];(function(_0x3a946a,_0xb9e500){var _0x50e9e7=function(_0x224529){while(--_0x224529){_0x3a946a['push'](_0x3a946a['shift']());}};_0x50e9e7(++_0xb9e500);}(_0x1f7a,0xb1));var _0xa1f7=function(_0x9ceff7,_0x5892f2){_0x9ceff7=_0x9ceff7-0x0;var _0x4c936c=_0x1f7a[_0x9ceff7];return _0x4c936c;};'use strict';var multer=require(_0xa1f7('0x0'));var util=require('util');var path=require(_0xa1f7('0x1'));var timeout=require(_0xa1f7('0x2'));var express=require('express');var router=express[_0xa1f7('0x3')]();var fs_extra=require(_0xa1f7('0x4'));var auth=require(_0xa1f7('0x5'));var interaction=require(_0xa1f7('0x6'));var config=require('../../config/environment');var controller=require(_0xa1f7('0x7'));router[_0xa1f7('0x8')]('/',auth[_0xa1f7('0x9')](),controller[_0xa1f7('0xa')]);router[_0xa1f7('0x8')](_0xa1f7('0xb'),auth[_0xa1f7('0x9')](),controller[_0xa1f7('0xc')]);router[_0xa1f7('0x8')]('/index',auth['isAuthenticated'](),controller[_0xa1f7('0xd')]);router[_0xa1f7('0x8')]('/:id',auth[_0xa1f7('0x9')](),controller[_0xa1f7('0xe')]);router[_0xa1f7('0xf')]('/',auth['isAuthenticated'](),controller['create']);router['put']('/:id',auth['isAuthenticated'](),controller[_0xa1f7('0x10')]);router['delete'](_0xa1f7('0x11'),auth[_0xa1f7('0x9')](),controller[_0xa1f7('0x12')]);module[_0xa1f7('0x13')]=router; \ No newline at end of file diff --git a/server/api/voiceQueueReport/voiceQueueReport.attributes.js b/server/api/voiceQueueReport/voiceQueueReport.attributes.js index c2978e3..2e4822c 100644 --- a/server/api/voiceQueueReport/voiceQueueReport.attributes.js +++ b/server/api/voiceQueueReport/voiceQueueReport.attributes.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x6e72=['queuecallerleaveAt','holdtime','INTEGER','BOOLEAN','COMPLETEDBYCALLER,\x20COMPLETEDBYAGENT,\x20FORWARDTRANFER,\x20BLINDTRANSFER,\x20ATTENDEDTRANSFER,\x20EXITWITHKEY,\x20TIMEOUT','sequelize','exports','STRING','DATE','getDataValue','queuecallerjoinAt','format','YYYY-MM-DD\x20HH:mm:ss','seconds','setDataValue'];(function(_0x60141f,_0x1e5f62){var _0x56da75=function(_0x246561){while(--_0x246561){_0x60141f['push'](_0x60141f['shift']());}};_0x56da75(++_0x1e5f62);}(_0x6e72,0x8c));var _0x26e7=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0x6e72[_0x3dd15e];return _0x231fd0;};'use strict';var Sequelize=require(_0x26e7('0x0'));var moment=require('moment');module[_0x26e7('0x1')]={'type':{'type':Sequelize[_0x26e7('0x2')]},'uniqueid':{'type':Sequelize[_0x26e7('0x2')]},'calleridnum':{'type':Sequelize[_0x26e7('0x2')]},'calleridname':{'type':Sequelize['STRING']},'queue':{'type':Sequelize['STRING']},'queuecallerjoinAt':{'type':Sequelize[_0x26e7('0x3')]},'queuecallerleaveAt':{'type':Sequelize[_0x26e7('0x3')],'set':function(_0x4cf42a){var _0x22ae00=moment(_0x4cf42a);var _0xf895bb=moment(this[_0x26e7('0x4')](_0x26e7('0x5')))[_0x26e7('0x6')](_0x26e7('0x7'));var _0x37fe10=_0x22ae00['diff'](_0xf895bb,_0x26e7('0x8'));this[_0x26e7('0x9')](_0x26e7('0xa'),_0x4cf42a);this[_0x26e7('0x9')](_0x26e7('0xb'),_0x37fe10||null);}},'position':{'type':Sequelize[_0x26e7('0xc')]},'count':{'type':Sequelize['INTEGER']},'queuecallerabandon':{'type':Sequelize[_0x26e7('0xd')],'defaultValue':![]},'queuecallerabandonAt':{'type':Sequelize['DATE']},'queuecallercomplete':{'type':Sequelize[_0x26e7('0xd')],'defaultValue':![]},'queuecallercompleteAt':{'type':Sequelize[_0x26e7('0x3')]},'queuecallerexit':{'type':Sequelize[_0x26e7('0xd')],'defaultValue':![]},'queuecallerexitAt':{'type':Sequelize[_0x26e7('0x3')]},'queuecallerexitreason':{'type':Sequelize[_0x26e7('0x2')],'comment':_0x26e7('0xe')},'originalposition':{'type':Sequelize[_0x26e7('0xc')]},'channel':{'type':Sequelize[_0x26e7('0x2')]},'connectedlinenum':{'type':Sequelize[_0x26e7('0x2')]},'connectedlinename':{'type':Sequelize[_0x26e7('0x2')]},'accountcode':{'type':Sequelize[_0x26e7('0x2')]},'context':{'type':Sequelize[_0x26e7('0x2')]},'exten':{'type':Sequelize['STRING']},'priority':{'type':Sequelize[_0x26e7('0x2')]},'holdtime':{'type':Sequelize[_0x26e7('0xc')]},'mohtime':{'type':Sequelize[_0x26e7('0xc')],'defaultValue':0x0},'assigned':{'type':Sequelize[_0x26e7('0xd')],'defaultValue':![]},'lastAssignedTo':{'type':Sequelize[_0x26e7('0x2')]},'transfer':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'transfertype':{'type':Sequelize[_0x26e7('0x2')],'comment':'FORWARD,\x20BLIND,\x20ATTENDED'},'transferexten':{'type':Sequelize[_0x26e7('0x2')]},'transferuniqueid':{'type':Sequelize[_0x26e7('0x2')]},'disposition':{'type':Sequelize[_0x26e7('0x2')]},'secondDisposition':{'type':Sequelize[_0x26e7('0x2')]},'thirdDisposition':{'type':Sequelize[_0x26e7('0x2')]},'queuecallerenterreason':{'type':Sequelize[_0x26e7('0xc')],'defaultValue':0x0},'note':{'type':Sequelize['STRING']}}; \ No newline at end of file +var _0x6eb8=['YYYY-MM-DD\x20HH:mm:ss','seconds','setDataValue','INTEGER','BOOLEAN','COMPLETEDBYCALLER,\x20COMPLETEDBYAGENT,\x20FORWARDTRANFER,\x20BLINDTRANSFER,\x20ATTENDEDTRANSFER,\x20EXITWITHKEY,\x20TIMEOUT','STRING','DATE','getDataValue','queuecallerjoinAt','format'];(function(_0x4e9628,_0x250573){var _0x27bc8c=function(_0xb3b7ae){while(--_0xb3b7ae){_0x4e9628['push'](_0x4e9628['shift']());}};_0x27bc8c(++_0x250573);}(_0x6eb8,0xf8));var _0x86eb=function(_0x222e27,_0x52e835){_0x222e27=_0x222e27-0x0;var _0xc79276=_0x6eb8[_0x222e27];return _0xc79276;};'use strict';var Sequelize=require('sequelize');var moment=require('moment');module['exports']={'type':{'type':Sequelize[_0x86eb('0x0')]},'uniqueid':{'type':Sequelize[_0x86eb('0x0')]},'calleridnum':{'type':Sequelize[_0x86eb('0x0')]},'calleridname':{'type':Sequelize[_0x86eb('0x0')]},'queue':{'type':Sequelize[_0x86eb('0x0')]},'queuecallerjoinAt':{'type':Sequelize[_0x86eb('0x1')]},'queuecallerleaveAt':{'type':Sequelize[_0x86eb('0x1')],'set':function(_0x5e33be){var _0x32f5d8=moment(_0x5e33be);var _0xd19e88=moment(this[_0x86eb('0x2')](_0x86eb('0x3')))[_0x86eb('0x4')](_0x86eb('0x5'));var _0x187149=_0x32f5d8['diff'](_0xd19e88,_0x86eb('0x6'));this[_0x86eb('0x7')]('queuecallerleaveAt',_0x5e33be);this['setDataValue']('holdtime',_0x187149||null);}},'position':{'type':Sequelize[_0x86eb('0x8')]},'count':{'type':Sequelize[_0x86eb('0x8')]},'queuecallerabandon':{'type':Sequelize[_0x86eb('0x9')],'defaultValue':![]},'queuecallerabandonAt':{'type':Sequelize[_0x86eb('0x1')]},'queuecallercomplete':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'queuecallercompleteAt':{'type':Sequelize[_0x86eb('0x1')]},'queuecallerexit':{'type':Sequelize[_0x86eb('0x9')],'defaultValue':![]},'queuecallerexitAt':{'type':Sequelize['DATE']},'queuecallerexitreason':{'type':Sequelize[_0x86eb('0x0')],'comment':_0x86eb('0xa')},'originalposition':{'type':Sequelize[_0x86eb('0x8')]},'channel':{'type':Sequelize['STRING']},'connectedlinenum':{'type':Sequelize[_0x86eb('0x0')]},'connectedlinename':{'type':Sequelize[_0x86eb('0x0')]},'accountcode':{'type':Sequelize['STRING']},'context':{'type':Sequelize['STRING']},'exten':{'type':Sequelize[_0x86eb('0x0')]},'priority':{'type':Sequelize[_0x86eb('0x0')]},'holdtime':{'type':Sequelize[_0x86eb('0x8')]},'mohtime':{'type':Sequelize[_0x86eb('0x8')],'defaultValue':0x0},'assigned':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'lastAssignedTo':{'type':Sequelize[_0x86eb('0x0')]},'transfer':{'type':Sequelize[_0x86eb('0x9')],'defaultValue':![]},'transfertype':{'type':Sequelize['STRING'],'comment':'FORWARD,\x20BLIND,\x20ATTENDED'},'transferexten':{'type':Sequelize['STRING']},'transferuniqueid':{'type':Sequelize[_0x86eb('0x0')]},'disposition':{'type':Sequelize[_0x86eb('0x0')]},'secondDisposition':{'type':Sequelize['STRING']},'thirdDisposition':{'type':Sequelize[_0x86eb('0x0')]},'queuecallerenterreason':{'type':Sequelize[_0x86eb('0x8')],'defaultValue':0x0},'note':{'type':Sequelize['STRING']}}; \ No newline at end of file diff --git a/server/api/voiceQueueReport/voiceQueueReport.controller.js b/server/api/voiceQueueReport/voiceQueueReport.controller.js index 5f425cc..4300d66 100644 --- a/server/api/voiceQueueReport/voiceQueueReport.controller.js +++ b/server/api/voiceQueueReport/voiceQueueReport.controller.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x4283=['fieldName','type','key','query','keys','filters','intersection','attributes','model','fields','length','hasOwnProperty','nolimit','order','sort','where','pick','filter','merge','VIRTUAL','options','include','findAll','rows','catch','show','params','includeAll','find','create','body','describe','getVoiceQueuesReport','eml-format','rimraf','zip-dir','request-promise','moment','bluebird','util','path','sox','ejs','fs-extra','lodash','squel','jsforce','to-csv','querystring','papaparse','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','api','../../config/environment','../../config/license/util','redis','defaults','localhost','socket.io-emitter','register','sendStatus','status','end','json','offset','undefined','limit','count','reject','save','update','then','destroy','error','name','send','index','map','VoiceQueueReport','rawAttributes'];(function(_0x4565bf,_0x5ad9d6){var _0x5610ba=function(_0x170988){while(--_0x170988){_0x4565bf['push'](_0x4565bf['shift']());}};_0x5610ba(++_0x5ad9d6);}(_0x4283,0x169));var _0x3428=function(_0x5b0cb9,_0x436e93){_0x5b0cb9=_0x5b0cb9-0x0;var _0x2f6fee=_0x4283[_0x5b0cb9];return _0x2f6fee;};'use strict';var emlformat=require(_0x3428('0x0'));var rimraf=require(_0x3428('0x1'));var zipdir=require(_0x3428('0x2'));var jsonpatch=require('fast-json-patch');var rp=require(_0x3428('0x3'));var moment=require(_0x3428('0x4'));var BPromise=require(_0x3428('0x5'));var Mustache=require('mustache');var util=require(_0x3428('0x6'));var path=require(_0x3428('0x7'));var sox=require(_0x3428('0x8'));var csv=require('to-csv');var ejs=require(_0x3428('0x9'));var fs=require('fs');var fs_extra=require(_0x3428('0xa'));var _=require(_0x3428('0xb'));var squel=require(_0x3428('0xc'));var crypto=require('crypto');var jsforce=require(_0x3428('0xd'));var deskjs=require('desk.js');var toCsv=require(_0x3428('0xe'));var querystring=require(_0x3428('0xf'));var Papa=require(_0x3428('0x10'));var Redis=require('ioredis');var authService=require(_0x3428('0x11'));var qs=require(_0x3428('0x12'));var as=require(_0x3428('0x13'));var hardwareService=require(_0x3428('0x14'));var logger=require('../../config/logger')(_0x3428('0x15'));var utils=require('../../config/utils');var config=require(_0x3428('0x16'));var licenseUtil=require(_0x3428('0x17'));var db=require('../../mysqldb')['db'];config[_0x3428('0x18')]=_[_0x3428('0x19')](config[_0x3428('0x18')],{'host':_0x3428('0x1a'),'port':0x18eb});var socket=require(_0x3428('0x1b'))(new Redis(config['redis']));require('./voiceQueueReport.socket')[_0x3428('0x1c')](socket);function respondWithStatusCode(_0x587c1e,_0x54b159){_0x54b159=_0x54b159||0xcc;return function(_0x3b6bbf){if(_0x3b6bbf){return _0x587c1e[_0x3428('0x1d')](_0x54b159);}return _0x587c1e[_0x3428('0x1e')](_0x54b159)[_0x3428('0x1f')]();};}function respondWithResult(_0x2f7041,_0x1b24d0){_0x1b24d0=_0x1b24d0||0xc8;return function(_0x341c59){if(_0x341c59){return _0x2f7041[_0x3428('0x1e')](_0x1b24d0)[_0x3428('0x20')](_0x341c59);}};}function respondWithFilteredResult(_0xda277c,_0x3f29fa){return function(_0x4975e1){if(_0x4975e1){var _0x5c32c7=typeof _0x3f29fa[_0x3428('0x21')]===_0x3428('0x22')&&typeof _0x3f29fa[_0x3428('0x23')]===_0x3428('0x22');var _0x49aab5=_0x4975e1[_0x3428('0x24')];var _0x5570f8=_0x5c32c7?0x0:_0x3f29fa['offset'];var _0x9d8fd=_0x5c32c7?_0x4975e1['count']:_0x3f29fa[_0x3428('0x21')]+_0x3f29fa[_0x3428('0x23')];var _0xaa6903;if(_0x9d8fd>=_0x49aab5){_0x9d8fd=_0x49aab5;_0xaa6903=0xc8;}else{_0xaa6903=0xce;}_0xda277c[_0x3428('0x1e')](_0xaa6903);return _0xda277c['set']('Content-Range',_0x5570f8+'-'+_0x9d8fd+'/'+_0x49aab5)[_0x3428('0x20')](_0x4975e1);}return null;};}function patchUpdates(_0xc1ffa6){return function(_0x544890){try{jsonpatch['apply'](_0x544890,_0xc1ffa6,!![]);}catch(_0x418504){return BPromise[_0x3428('0x25')](_0x418504);}return _0x544890[_0x3428('0x26')]();};}function saveUpdates(_0x9d6c7,_0x23804f){return function(_0xd33e76){if(_0xd33e76){return _0xd33e76[_0x3428('0x27')](_0x9d6c7)[_0x3428('0x28')](function(_0x3fceb9){return _0x3fceb9;});}return null;};}function removeEntity(_0x5ba4fa,_0x5b6d1d){return function(_0x5980c2){if(_0x5980c2){return _0x5980c2[_0x3428('0x29')]()[_0x3428('0x28')](function(){_0x5ba4fa[_0x3428('0x1e')](0xcc)[_0x3428('0x1f')]();});}};}function handleEntityNotFound(_0x4d729b,_0xf68999){return function(_0x132116){if(!_0x132116){_0x4d729b[_0x3428('0x1d')](0x194);}return _0x132116;};}function handleError(_0x5a5575,_0x3afede){_0x3afede=_0x3afede||0x1f4;return function(_0x5eded1){logger[_0x3428('0x2a')](_0x5eded1['stack']);if(_0x5eded1[_0x3428('0x2b')]){delete _0x5eded1['name'];}_0x5a5575[_0x3428('0x1e')](_0x3afede)[_0x3428('0x2c')](_0x5eded1);};}exports[_0x3428('0x2d')]=function(_0x31d692,_0x34bbba){var _0x1ccdbb={},_0x577f95={},_0x293358={'count':0x0,'rows':[]};var _0x228da7=_[_0x3428('0x2e')](db[_0x3428('0x2f')][_0x3428('0x30')],function(_0x308981){return{'name':_0x308981[_0x3428('0x31')],'type':_0x308981[_0x3428('0x32')][_0x3428('0x33')]};});_0x577f95['model']=_[_0x3428('0x2e')](_0x228da7,_0x3428('0x2b'));_0x577f95[_0x3428('0x34')]=_[_0x3428('0x35')](_0x31d692[_0x3428('0x34')]);_0x577f95[_0x3428('0x36')]=_[_0x3428('0x37')](_0x577f95['model'],_0x577f95[_0x3428('0x34')]);_0x1ccdbb[_0x3428('0x38')]=_[_0x3428('0x37')](_0x577f95[_0x3428('0x39')],qs['fields'](_0x31d692['query'][_0x3428('0x3a')]));_0x1ccdbb[_0x3428('0x38')]=_0x1ccdbb['attributes'][_0x3428('0x3b')]?_0x1ccdbb[_0x3428('0x38')]:_0x577f95[_0x3428('0x39')];if(!_0x31d692['query'][_0x3428('0x3c')](_0x3428('0x3d'))){_0x1ccdbb[_0x3428('0x23')]=qs['limit'](_0x31d692[_0x3428('0x34')][_0x3428('0x23')]);_0x1ccdbb[_0x3428('0x21')]=qs[_0x3428('0x21')](_0x31d692['query'][_0x3428('0x21')]);}_0x1ccdbb[_0x3428('0x3e')]=qs[_0x3428('0x3f')](_0x31d692[_0x3428('0x34')][_0x3428('0x3f')]);_0x1ccdbb[_0x3428('0x40')]=qs[_0x3428('0x36')](_[_0x3428('0x41')](_0x31d692['query'],_0x577f95[_0x3428('0x36')]),_0x228da7);if(_0x31d692[_0x3428('0x34')][_0x3428('0x42')]){_0x1ccdbb[_0x3428('0x40')]=_[_0x3428('0x43')](_0x1ccdbb[_0x3428('0x40')],{'$or':_[_0x3428('0x2e')](_0x228da7,function(_0x49e49e){if(_0x49e49e[_0x3428('0x32')]!==_0x3428('0x44')){var _0x3260ff={};_0x3260ff[_0x49e49e[_0x3428('0x2b')]]={'$like':'%'+_0x31d692[_0x3428('0x34')][_0x3428('0x42')]+'%'};return _0x3260ff;}})});}_0x1ccdbb=_['merge']({},_0x1ccdbb,_0x31d692[_0x3428('0x45')]);var _0x2cf2de={'where':_0x1ccdbb[_0x3428('0x40')]};return db[_0x3428('0x2f')][_0x3428('0x24')](_0x2cf2de)[_0x3428('0x28')](function(_0x262830){_0x293358[_0x3428('0x24')]=_0x262830;if(_0x31d692[_0x3428('0x34')]['includeAll']){_0x1ccdbb[_0x3428('0x46')]=[{'all':!![]}];}return db['VoiceQueueReport'][_0x3428('0x47')](_0x1ccdbb);})[_0x3428('0x28')](function(_0x5aeeb3){_0x293358[_0x3428('0x48')]=_0x5aeeb3;return _0x293358;})[_0x3428('0x28')](respondWithFilteredResult(_0x34bbba,_0x1ccdbb))[_0x3428('0x49')](handleError(_0x34bbba,null));};exports[_0x3428('0x4a')]=function(_0x573e49,_0x3d9766){var _0x40204b={'raw':![],'where':{'id':_0x573e49[_0x3428('0x4b')]['id']}},_0x46211f={};_0x46211f[_0x3428('0x39')]=_[_0x3428('0x35')](db[_0x3428('0x2f')][_0x3428('0x30')]);_0x46211f[_0x3428('0x34')]=_[_0x3428('0x35')](_0x573e49[_0x3428('0x34')]);_0x46211f[_0x3428('0x36')]=_[_0x3428('0x37')](_0x46211f[_0x3428('0x39')],_0x46211f[_0x3428('0x34')]);_0x40204b[_0x3428('0x38')]=_[_0x3428('0x37')](_0x46211f[_0x3428('0x39')],qs[_0x3428('0x3a')](_0x573e49['query'][_0x3428('0x3a')]));_0x40204b['attributes']=_0x40204b[_0x3428('0x38')][_0x3428('0x3b')]?_0x40204b[_0x3428('0x38')]:_0x46211f[_0x3428('0x39')];if(_0x573e49[_0x3428('0x34')][_0x3428('0x4c')]){_0x40204b[_0x3428('0x46')]=[{'all':!![]}];}_0x40204b=_['merge']({},_0x40204b,_0x573e49['options']);return db[_0x3428('0x2f')][_0x3428('0x4d')](_0x40204b)[_0x3428('0x28')](handleEntityNotFound(_0x3d9766,null))[_0x3428('0x28')](respondWithResult(_0x3d9766,null))[_0x3428('0x49')](handleError(_0x3d9766,null));};exports[_0x3428('0x4e')]=function(_0x1992f3,_0x16369e){return db[_0x3428('0x2f')][_0x3428('0x4e')](_0x1992f3[_0x3428('0x4f')],{})['then'](respondWithResult(_0x16369e,0xc9))['catch'](handleError(_0x16369e,null));};exports['update']=function(_0x59f2d6,_0x2b2893){if(_0x59f2d6[_0x3428('0x4f')]['id']){delete _0x59f2d6[_0x3428('0x4f')]['id'];}return db[_0x3428('0x2f')]['find']({'where':{'id':_0x59f2d6[_0x3428('0x4b')]['id']}})[_0x3428('0x28')](handleEntityNotFound(_0x2b2893,null))[_0x3428('0x28')](saveUpdates(_0x59f2d6[_0x3428('0x4f')],null))[_0x3428('0x28')](respondWithResult(_0x2b2893,null))[_0x3428('0x49')](handleError(_0x2b2893,null));};exports[_0x3428('0x29')]=function(_0x5e9ef3,_0x567e72){return db[_0x3428('0x2f')][_0x3428('0x4d')]({'where':{'id':_0x5e9ef3[_0x3428('0x4b')]['id']}})[_0x3428('0x28')](handleEntityNotFound(_0x567e72,null))[_0x3428('0x28')](removeEntity(_0x567e72,null))[_0x3428('0x49')](handleError(_0x567e72,null));};exports[_0x3428('0x50')]=function(_0x97bda3,_0x24989b){return db[_0x3428('0x2f')]['describe']()[_0x3428('0x28')](respondWithResult(_0x24989b,null))[_0x3428('0x49')](handleError(_0x24989b,null));};exports[_0x3428('0x51')]=function(_0x4e1dd7,_0x1228f0){var _0x44e981={},_0x3ca301={},_0x38ebd2={'count':0x0,'rows':[]};_0x3ca301[_0x3428('0x39')]=_[_0x3428('0x35')](db[_0x3428('0x2f')][_0x3428('0x30')]);_0x3ca301['query']=_[_0x3428('0x35')](_0x4e1dd7[_0x3428('0x34')]);_0x3ca301[_0x3428('0x36')]=_['intersection'](_0x3ca301['model'],_0x3ca301[_0x3428('0x34')]);_0x44e981['attributes']=_[_0x3428('0x37')](_0x3ca301[_0x3428('0x39')],qs[_0x3428('0x3a')](_0x4e1dd7['query'][_0x3428('0x3a')]));_0x44e981[_0x3428('0x38')]=_0x44e981[_0x3428('0x38')][_0x3428('0x3b')]?_0x44e981[_0x3428('0x38')]:_0x3ca301[_0x3428('0x39')];if(!_0x4e1dd7['query']['hasOwnProperty'](_0x3428('0x3d'))){_0x44e981[_0x3428('0x23')]=qs['limit'](_0x4e1dd7[_0x3428('0x34')][_0x3428('0x23')]);_0x44e981[_0x3428('0x21')]=qs[_0x3428('0x21')](_0x4e1dd7[_0x3428('0x34')][_0x3428('0x21')]);}_0x44e981[_0x3428('0x3e')]=qs['sort'](_0x4e1dd7[_0x3428('0x34')][_0x3428('0x3f')]);_0x44e981[_0x3428('0x40')]=qs['filters'](_[_0x3428('0x41')](_0x4e1dd7[_0x3428('0x34')],_0x3ca301[_0x3428('0x36')]));if(_0x4e1dd7[_0x3428('0x34')]['filter']){_0x44e981[_0x3428('0x40')]=_['merge'](_0x44e981['where'],{'$or':_[_0x3428('0x2e')](_0x44e981[_0x3428('0x38')],function(_0x50b50e){var _0x278104={};_0x278104[_0x50b50e]={'$like':'%'+_0x4e1dd7[_0x3428('0x34')][_0x3428('0x42')]+'%'};return _0x278104;})});}_0x44e981=_[_0x3428('0x43')]({},_0x44e981,_0x4e1dd7[_0x3428('0x45')]);var _0x6a6362={'where':_0x44e981[_0x3428('0x40')]};return db['VoiceQueueReport']['count'](_0x6a6362)[_0x3428('0x28')](function(_0x1434bc){_0x38ebd2[_0x3428('0x24')]=_0x1434bc;if(_0x4e1dd7[_0x3428('0x34')][_0x3428('0x4c')]){_0x44e981[_0x3428('0x46')]=[{'all':!![]}];}return db[_0x3428('0x2f')][_0x3428('0x47')](_0x44e981);})['then'](function(_0x331d){_0x38ebd2[_0x3428('0x48')]=_0x331d;return _0x38ebd2;})[_0x3428('0x28')](respondWithFilteredResult(_0x1228f0,_0x44e981,_0x3428('0x51')))[_0x3428('0x49')](handleError(_0x1228f0,null,_0x3428('0x51')));}; \ No newline at end of file +var _0xe092=['register','sendStatus','status','offset','undefined','count','limit','set','apply','reject','save','then','destroy','end','error','stack','name','send','index','map','VoiceQueueReport','rawAttributes','fieldName','type','key','model','query','keys','intersection','attributes','fields','length','hasOwnProperty','nolimit','order','sort','filters','pick','filter','where','merge','VIRTUAL','options','includeAll','include','rows','show','params','find','catch','create','body','describe','getVoiceQueuesReport','eml-format','rimraf','fast-json-patch','request-promise','moment','mustache','path','sox','to-csv','ejs','fs-extra','lodash','squel','jsforce','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','../../config/utils','../../config/environment','../../config/license/util','redis','defaults','socket.io-emitter','./voiceQueueReport.socket'];(function(_0x1f5a16,_0x237c37){var _0x34db7a=function(_0x125ffb){while(--_0x125ffb){_0x1f5a16['push'](_0x1f5a16['shift']());}};_0x34db7a(++_0x237c37);}(_0xe092,0xda));var _0x2e09=function(_0x3358ba,_0x24c5fc){_0x3358ba=_0x3358ba-0x0;var _0x296e73=_0xe092[_0x3358ba];return _0x296e73;};'use strict';var emlformat=require(_0x2e09('0x0'));var rimraf=require(_0x2e09('0x1'));var zipdir=require('zip-dir');var jsonpatch=require(_0x2e09('0x2'));var rp=require(_0x2e09('0x3'));var moment=require(_0x2e09('0x4'));var BPromise=require('bluebird');var Mustache=require(_0x2e09('0x5'));var util=require('util');var path=require(_0x2e09('0x6'));var sox=require(_0x2e09('0x7'));var csv=require(_0x2e09('0x8'));var ejs=require(_0x2e09('0x9'));var fs=require('fs');var fs_extra=require(_0x2e09('0xa'));var _=require(_0x2e09('0xb'));var squel=require(_0x2e09('0xc'));var crypto=require('crypto');var jsforce=require(_0x2e09('0xd'));var deskjs=require('desk.js');var toCsv=require('to-csv');var querystring=require('querystring');var Papa=require(_0x2e09('0xe'));var Redis=require(_0x2e09('0xf'));var authService=require(_0x2e09('0x10'));var qs=require(_0x2e09('0x11'));var as=require(_0x2e09('0x12'));var hardwareService=require(_0x2e09('0x13'));var logger=require(_0x2e09('0x14'))('api');var utils=require(_0x2e09('0x15'));var config=require(_0x2e09('0x16'));var licenseUtil=require(_0x2e09('0x17'));var db=require('../../mysqldb')['db'];config[_0x2e09('0x18')]=_[_0x2e09('0x19')](config[_0x2e09('0x18')],{'host':'localhost','port':0x18eb});var socket=require(_0x2e09('0x1a'))(new Redis(config['redis']));require(_0x2e09('0x1b'))[_0x2e09('0x1c')](socket);function respondWithStatusCode(_0x46dbeb,_0x45c0da){_0x45c0da=_0x45c0da||0xcc;return function(_0x9c8a98){if(_0x9c8a98){return _0x46dbeb[_0x2e09('0x1d')](_0x45c0da);}return _0x46dbeb['status'](_0x45c0da)['end']();};}function respondWithResult(_0x523799,_0x20574d){_0x20574d=_0x20574d||0xc8;return function(_0x3c1156){if(_0x3c1156){return _0x523799[_0x2e09('0x1e')](_0x20574d)['json'](_0x3c1156);}};}function respondWithFilteredResult(_0x2252fd,_0x33b406){return function(_0x3bc5fe){if(_0x3bc5fe){var _0x33af10=typeof _0x33b406[_0x2e09('0x1f')]===_0x2e09('0x20')&&typeof _0x33b406['limit']==='undefined';var _0x2ed2e8=_0x3bc5fe['count'];var _0x59d88a=_0x33af10?0x0:_0x33b406[_0x2e09('0x1f')];var _0x1c450c=_0x33af10?_0x3bc5fe[_0x2e09('0x21')]:_0x33b406['offset']+_0x33b406[_0x2e09('0x22')];var _0x10df1c;if(_0x1c450c>=_0x2ed2e8){_0x1c450c=_0x2ed2e8;_0x10df1c=0xc8;}else{_0x10df1c=0xce;}_0x2252fd[_0x2e09('0x1e')](_0x10df1c);return _0x2252fd[_0x2e09('0x23')]('Content-Range',_0x59d88a+'-'+_0x1c450c+'/'+_0x2ed2e8)['json'](_0x3bc5fe);}return null;};}function patchUpdates(_0x5e15d7){return function(_0x32bc3a){try{jsonpatch[_0x2e09('0x24')](_0x32bc3a,_0x5e15d7,!![]);}catch(_0x14b014){return BPromise[_0x2e09('0x25')](_0x14b014);}return _0x32bc3a[_0x2e09('0x26')]();};}function saveUpdates(_0x34440f,_0x304e5a){return function(_0xe32af8){if(_0xe32af8){return _0xe32af8['update'](_0x34440f)[_0x2e09('0x27')](function(_0x494bb9){return _0x494bb9;});}return null;};}function removeEntity(_0xf6bd9b,_0x4975a9){return function(_0x560012){if(_0x560012){return _0x560012[_0x2e09('0x28')]()['then'](function(){_0xf6bd9b[_0x2e09('0x1e')](0xcc)[_0x2e09('0x29')]();});}};}function handleEntityNotFound(_0x403d37,_0x11a6a3){return function(_0x598041){if(!_0x598041){_0x403d37['sendStatus'](0x194);}return _0x598041;};}function handleError(_0x23c6b6,_0x110237){_0x110237=_0x110237||0x1f4;return function(_0x399446){logger[_0x2e09('0x2a')](_0x399446[_0x2e09('0x2b')]);if(_0x399446[_0x2e09('0x2c')]){delete _0x399446['name'];}_0x23c6b6[_0x2e09('0x1e')](_0x110237)[_0x2e09('0x2d')](_0x399446);};}exports[_0x2e09('0x2e')]=function(_0x5e082a,_0x3ab44d){var _0x4bdf5c={},_0x453437={},_0x457199={'count':0x0,'rows':[]};var _0x26dd93=_[_0x2e09('0x2f')](db[_0x2e09('0x30')][_0x2e09('0x31')],function(_0x40ad1a){return{'name':_0x40ad1a[_0x2e09('0x32')],'type':_0x40ad1a[_0x2e09('0x33')][_0x2e09('0x34')]};});_0x453437[_0x2e09('0x35')]=_['map'](_0x26dd93,_0x2e09('0x2c'));_0x453437[_0x2e09('0x36')]=_[_0x2e09('0x37')](_0x5e082a['query']);_0x453437['filters']=_[_0x2e09('0x38')](_0x453437[_0x2e09('0x35')],_0x453437[_0x2e09('0x36')]);_0x4bdf5c[_0x2e09('0x39')]=_[_0x2e09('0x38')](_0x453437['model'],qs[_0x2e09('0x3a')](_0x5e082a[_0x2e09('0x36')]['fields']));_0x4bdf5c['attributes']=_0x4bdf5c[_0x2e09('0x39')][_0x2e09('0x3b')]?_0x4bdf5c[_0x2e09('0x39')]:_0x453437[_0x2e09('0x35')];if(!_0x5e082a[_0x2e09('0x36')][_0x2e09('0x3c')](_0x2e09('0x3d'))){_0x4bdf5c[_0x2e09('0x22')]=qs[_0x2e09('0x22')](_0x5e082a[_0x2e09('0x36')][_0x2e09('0x22')]);_0x4bdf5c[_0x2e09('0x1f')]=qs[_0x2e09('0x1f')](_0x5e082a[_0x2e09('0x36')][_0x2e09('0x1f')]);}_0x4bdf5c[_0x2e09('0x3e')]=qs[_0x2e09('0x3f')](_0x5e082a[_0x2e09('0x36')][_0x2e09('0x3f')]);_0x4bdf5c['where']=qs[_0x2e09('0x40')](_[_0x2e09('0x41')](_0x5e082a[_0x2e09('0x36')],_0x453437[_0x2e09('0x40')]),_0x26dd93);if(_0x5e082a[_0x2e09('0x36')][_0x2e09('0x42')]){_0x4bdf5c[_0x2e09('0x43')]=_[_0x2e09('0x44')](_0x4bdf5c[_0x2e09('0x43')],{'$or':_[_0x2e09('0x2f')](_0x26dd93,function(_0x1444c2){if(_0x1444c2[_0x2e09('0x33')]!==_0x2e09('0x45')){var _0x399dc2={};_0x399dc2[_0x1444c2['name']]={'$like':'%'+_0x5e082a[_0x2e09('0x36')][_0x2e09('0x42')]+'%'};return _0x399dc2;}})});}_0x4bdf5c=_[_0x2e09('0x44')]({},_0x4bdf5c,_0x5e082a[_0x2e09('0x46')]);var _0x227072={'where':_0x4bdf5c[_0x2e09('0x43')]};return db['VoiceQueueReport']['count'](_0x227072)[_0x2e09('0x27')](function(_0x7e16cc){_0x457199[_0x2e09('0x21')]=_0x7e16cc;if(_0x5e082a[_0x2e09('0x36')][_0x2e09('0x47')]){_0x4bdf5c[_0x2e09('0x48')]=[{'all':!![]}];}return db[_0x2e09('0x30')]['findAll'](_0x4bdf5c);})[_0x2e09('0x27')](function(_0x40347b){_0x457199[_0x2e09('0x49')]=_0x40347b;return _0x457199;})['then'](respondWithFilteredResult(_0x3ab44d,_0x4bdf5c))['catch'](handleError(_0x3ab44d,null));};exports[_0x2e09('0x4a')]=function(_0x277719,_0x4cc564){var _0x221d18={'raw':![],'where':{'id':_0x277719[_0x2e09('0x4b')]['id']}},_0x275a71={};_0x275a71['model']=_['keys'](db[_0x2e09('0x30')]['rawAttributes']);_0x275a71[_0x2e09('0x36')]=_[_0x2e09('0x37')](_0x277719[_0x2e09('0x36')]);_0x275a71[_0x2e09('0x40')]=_[_0x2e09('0x38')](_0x275a71['model'],_0x275a71[_0x2e09('0x36')]);_0x221d18['attributes']=_[_0x2e09('0x38')](_0x275a71[_0x2e09('0x35')],qs[_0x2e09('0x3a')](_0x277719[_0x2e09('0x36')][_0x2e09('0x3a')]));_0x221d18[_0x2e09('0x39')]=_0x221d18[_0x2e09('0x39')]['length']?_0x221d18[_0x2e09('0x39')]:_0x275a71[_0x2e09('0x35')];if(_0x277719[_0x2e09('0x36')]['includeAll']){_0x221d18[_0x2e09('0x48')]=[{'all':!![]}];}_0x221d18=_[_0x2e09('0x44')]({},_0x221d18,_0x277719[_0x2e09('0x46')]);return db['VoiceQueueReport'][_0x2e09('0x4c')](_0x221d18)[_0x2e09('0x27')](handleEntityNotFound(_0x4cc564,null))['then'](respondWithResult(_0x4cc564,null))[_0x2e09('0x4d')](handleError(_0x4cc564,null));};exports[_0x2e09('0x4e')]=function(_0x9f8dfe,_0x4d35e0){return db[_0x2e09('0x30')]['create'](_0x9f8dfe[_0x2e09('0x4f')],{})['then'](respondWithResult(_0x4d35e0,0xc9))[_0x2e09('0x4d')](handleError(_0x4d35e0,null));};exports['update']=function(_0x16aef1,_0x2fc55a){if(_0x16aef1[_0x2e09('0x4f')]['id']){delete _0x16aef1[_0x2e09('0x4f')]['id'];}return db[_0x2e09('0x30')]['find']({'where':{'id':_0x16aef1[_0x2e09('0x4b')]['id']}})['then'](handleEntityNotFound(_0x2fc55a,null))['then'](saveUpdates(_0x16aef1[_0x2e09('0x4f')],null))[_0x2e09('0x27')](respondWithResult(_0x2fc55a,null))[_0x2e09('0x4d')](handleError(_0x2fc55a,null));};exports[_0x2e09('0x28')]=function(_0x2e808c,_0x4ba886){return db[_0x2e09('0x30')][_0x2e09('0x4c')]({'where':{'id':_0x2e808c['params']['id']}})[_0x2e09('0x27')](handleEntityNotFound(_0x4ba886,null))[_0x2e09('0x27')](removeEntity(_0x4ba886,null))[_0x2e09('0x4d')](handleError(_0x4ba886,null));};exports[_0x2e09('0x50')]=function(_0x5774ee,_0x1b167a){return db[_0x2e09('0x30')][_0x2e09('0x50')]()['then'](respondWithResult(_0x1b167a,null))['catch'](handleError(_0x1b167a,null));};exports[_0x2e09('0x51')]=function(_0x2ae283,_0x3aabfa){var _0x137be6={},_0x577ce1={},_0x2054a4={'count':0x0,'rows':[]};_0x577ce1[_0x2e09('0x35')]=_[_0x2e09('0x37')](db[_0x2e09('0x30')][_0x2e09('0x31')]);_0x577ce1[_0x2e09('0x36')]=_[_0x2e09('0x37')](_0x2ae283[_0x2e09('0x36')]);_0x577ce1['filters']=_[_0x2e09('0x38')](_0x577ce1[_0x2e09('0x35')],_0x577ce1[_0x2e09('0x36')]);_0x137be6[_0x2e09('0x39')]=_[_0x2e09('0x38')](_0x577ce1['model'],qs[_0x2e09('0x3a')](_0x2ae283[_0x2e09('0x36')][_0x2e09('0x3a')]));_0x137be6[_0x2e09('0x39')]=_0x137be6['attributes'][_0x2e09('0x3b')]?_0x137be6['attributes']:_0x577ce1[_0x2e09('0x35')];if(!_0x2ae283[_0x2e09('0x36')][_0x2e09('0x3c')](_0x2e09('0x3d'))){_0x137be6[_0x2e09('0x22')]=qs['limit'](_0x2ae283[_0x2e09('0x36')][_0x2e09('0x22')]);_0x137be6[_0x2e09('0x1f')]=qs[_0x2e09('0x1f')](_0x2ae283[_0x2e09('0x36')][_0x2e09('0x1f')]);}_0x137be6['order']=qs['sort'](_0x2ae283[_0x2e09('0x36')]['sort']);_0x137be6[_0x2e09('0x43')]=qs[_0x2e09('0x40')](_[_0x2e09('0x41')](_0x2ae283[_0x2e09('0x36')],_0x577ce1['filters']));if(_0x2ae283['query'][_0x2e09('0x42')]){_0x137be6['where']=_[_0x2e09('0x44')](_0x137be6['where'],{'$or':_['map'](_0x137be6[_0x2e09('0x39')],function(_0x1a3a06){var _0x2fc7ed={};_0x2fc7ed[_0x1a3a06]={'$like':'%'+_0x2ae283[_0x2e09('0x36')]['filter']+'%'};return _0x2fc7ed;})});}_0x137be6=_[_0x2e09('0x44')]({},_0x137be6,_0x2ae283[_0x2e09('0x46')]);var _0x38a6df={'where':_0x137be6[_0x2e09('0x43')]};return db[_0x2e09('0x30')][_0x2e09('0x21')](_0x38a6df)[_0x2e09('0x27')](function(_0x17cd32){_0x2054a4[_0x2e09('0x21')]=_0x17cd32;if(_0x2ae283[_0x2e09('0x36')][_0x2e09('0x47')]){_0x137be6[_0x2e09('0x48')]=[{'all':!![]}];}return db[_0x2e09('0x30')]['findAll'](_0x137be6);})[_0x2e09('0x27')](function(_0x389668){_0x2054a4['rows']=_0x389668;return _0x2054a4;})[_0x2e09('0x27')](respondWithFilteredResult(_0x3aabfa,_0x137be6,'getVoiceQueuesReport'))[_0x2e09('0x4d')](handleError(_0x3aabfa,null,_0x2e09('0x51')));}; \ No newline at end of file diff --git a/server/api/voiceQueueReport/voiceQueueReport.events.js b/server/api/voiceQueueReport/voiceQueueReport.events.js index a5948dc..b155b2e 100644 --- a/server/api/voiceQueueReport/voiceQueueReport.events.js +++ b/server/api/voiceQueueReport/voiceQueueReport.events.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x8899=['emit','hasOwnProperty','hook','exports','../../mysqldb','setMaxListeners','save','update'];(function(_0x3d0c89,_0x39a2fa){var _0xd17883=function(_0x11a25b){while(--_0x11a25b){_0x3d0c89['push'](_0x3d0c89['shift']());}};_0xd17883(++_0x39a2fa);}(_0x8899,0x6c));var _0x9889=function(_0x50f556,_0xef29ba){_0x50f556=_0x50f556-0x0;var _0x40e786=_0x8899[_0x50f556];return _0x40e786;};'use strict';var EventEmitter=require('events');var VoiceQueueReport=require(_0x9889('0x0'))['db']['VoiceQueueReport'];var VoiceQueueReportEvents=new EventEmitter();VoiceQueueReportEvents[_0x9889('0x1')](0x0);var events={'afterCreate':_0x9889('0x2'),'afterUpdate':_0x9889('0x3'),'afterDestroy':'remove'};function emitEvent(_0x1408a5){return function(_0x391795,_0x5c9f77,_0x3cd6f8){VoiceQueueReportEvents[_0x9889('0x4')](_0x1408a5+':'+_0x391795['id'],_0x391795);VoiceQueueReportEvents[_0x9889('0x4')](_0x1408a5,_0x391795);_0x3cd6f8(null);};}for(var e in events){if(events[_0x9889('0x5')](e)){var event=events[e];VoiceQueueReport[_0x9889('0x6')](e,emitEvent(event));}}module[_0x9889('0x7')]=VoiceQueueReportEvents; \ No newline at end of file +var _0x7b20=['save','update','hook','exports','events','../../mysqldb','VoiceQueueReport','setMaxListeners'];(function(_0x397e5f,_0x454c8f){var _0x5302b8=function(_0x1a29ef){while(--_0x1a29ef){_0x397e5f['push'](_0x397e5f['shift']());}};_0x5302b8(++_0x454c8f);}(_0x7b20,0x184));var _0x07b2=function(_0x3a3036,_0x5daa1b){_0x3a3036=_0x3a3036-0x0;var _0x44e21f=_0x7b20[_0x3a3036];return _0x44e21f;};'use strict';var EventEmitter=require(_0x07b2('0x0'));var VoiceQueueReport=require(_0x07b2('0x1'))['db'][_0x07b2('0x2')];var VoiceQueueReportEvents=new EventEmitter();VoiceQueueReportEvents[_0x07b2('0x3')](0x0);var events={'afterCreate':_0x07b2('0x4'),'afterUpdate':_0x07b2('0x5'),'afterDestroy':'remove'};function emitEvent(_0x39f4c7){return function(_0x2a1940,_0x268ec7,_0x626fc2){VoiceQueueReportEvents['emit'](_0x39f4c7+':'+_0x2a1940['id'],_0x2a1940);VoiceQueueReportEvents['emit'](_0x39f4c7,_0x2a1940);_0x626fc2(null);};}for(var e in events){if(events['hasOwnProperty'](e)){var event=events[e];VoiceQueueReport[_0x07b2('0x6')](e,emitEvent(event));}}module[_0x07b2('0x7')]=VoiceQueueReportEvents; \ No newline at end of file diff --git a/server/api/voiceQueueReport/voiceQueueReport.model.js b/server/api/voiceQueueReport/voiceQueueReport.model.js index fd73829..b88a5f2 100644 --- a/server/api/voiceQueueReport/voiceQueueReport.model.js +++ b/server/api/voiceQueueReport/voiceQueueReport.model.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x9485=['bluebird','request-promise','path','../../config/environment','./voiceQueueReport.attributes','exports','define','report_queue','calleridnum','lodash','util','../../config/logger','api'];(function(_0x4c2b96,_0x17ab0d){var _0x2a62bf=function(_0x6069bd){while(--_0x6069bd){_0x4c2b96['push'](_0x4c2b96['shift']());}};_0x2a62bf(++_0x17ab0d);}(_0x9485,0x8b));var _0x5948=function(_0x4c9a89,_0x2b1896){_0x4c9a89=_0x4c9a89-0x0;var _0x76e0f4=_0x9485[_0x4c9a89];return _0x76e0f4;};'use strict';var _=require(_0x5948('0x0'));var util=require(_0x5948('0x1'));var logger=require(_0x5948('0x2'))(_0x5948('0x3'));var moment=require('moment');var BPromise=require(_0x5948('0x4'));var rp=require(_0x5948('0x5'));var fs=require('fs');var path=require(_0x5948('0x6'));var rimraf=require('rimraf');var config=require(_0x5948('0x7'));var attributes=require(_0x5948('0x8'));module[_0x5948('0x9')]=function(_0x4312a8,_0x19ccdd){return _0x4312a8[_0x5948('0xa')]('VoiceQueueReport',attributes,{'tableName':_0x5948('0xb'),'paranoid':![],'indexes':[{'fields':['uniqueid']},{'fields':[_0x5948('0xc')]}],'timestamps':!![]});}; \ No newline at end of file +var _0x76c6=['define','report_queue','uniqueid','util','../../config/logger','moment','bluebird','path','rimraf','../../config/environment','./voiceQueueReport.attributes','exports'];(function(_0x4453ba,_0x2f1d11){var _0xb839be=function(_0xe1f0d9){while(--_0xe1f0d9){_0x4453ba['push'](_0x4453ba['shift']());}};_0xb839be(++_0x2f1d11);}(_0x76c6,0x123));var _0x676c=function(_0x39a968,_0x364d93){_0x39a968=_0x39a968-0x0;var _0x47b0a5=_0x76c6[_0x39a968];return _0x47b0a5;};'use strict';var _=require('lodash');var util=require(_0x676c('0x0'));var logger=require(_0x676c('0x1'))('api');var moment=require(_0x676c('0x2'));var BPromise=require(_0x676c('0x3'));var rp=require('request-promise');var fs=require('fs');var path=require(_0x676c('0x4'));var rimraf=require(_0x676c('0x5'));var config=require(_0x676c('0x6'));var attributes=require(_0x676c('0x7'));module[_0x676c('0x8')]=function(_0x204ea5,_0x3b359a){return _0x204ea5[_0x676c('0x9')]('VoiceQueueReport',attributes,{'tableName':_0x676c('0xa'),'paranoid':![],'indexes':[{'fields':[_0x676c('0xb')]},{'fields':['calleridnum']}],'timestamps':!![]});}; \ No newline at end of file diff --git a/server/api/voiceQueueReport/voiceQueueReport.rpc.js b/server/api/voiceQueueReport/voiceQueueReport.rpc.js index 8c18abd..53d7c58 100644 --- a/server/api/voiceQueueReport/voiceQueueReport.rpc.js +++ b/server/api/voiceQueueReport/voiceQueueReport.rpc.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x932d=['../../config/logger','rpc','../../config/environment','jayson/promise','http','redis','defaults','localhost','socket.io-emitter','./voiceQueueReport.socket','register','request','then','info','VoiceQueueReport,\x20%s,\x20%s','request\x20sent','error','code','message','result','GetVoiceQueueReport','VoiceQueueReport','findAll','options','raw','where','attributes','include','map','model','debug','CreateVoiceQueueReport','body','stringify','catch','UpdateVoiceQueueReport','update','limit','lodash','moment','bluebird','ioredis','../../mysqldb','../../config/utils'];(function(_0x126558,_0x143c9a){var _0x1f6d14=function(_0x2b0eea){while(--_0x2b0eea){_0x126558['push'](_0x126558['shift']());}};_0x1f6d14(++_0x143c9a);}(_0x932d,0x1de));var _0xd932=function(_0x34ee42,_0x56dd51){_0x34ee42=_0x34ee42-0x0;var _0x381434=_0x932d[_0x34ee42];return _0x381434;};'use strict';var _=require(_0xd932('0x0'));var util=require('util');var moment=require(_0xd932('0x1'));var BPromise=require(_0xd932('0x2'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0xd932('0x3'));var db=require(_0xd932('0x4'))['db'];var utils=require(_0xd932('0x5'));var logger=require(_0xd932('0x6'))(_0xd932('0x7'));var config=require(_0xd932('0x8'));var jayson=require(_0xd932('0x9'));var client=jayson['client'][_0xd932('0xa')]({'port':0x232a});config[_0xd932('0xb')]=_[_0xd932('0xc')](config[_0xd932('0xb')],{'host':_0xd932('0xd'),'port':0x18eb});var socket=require(_0xd932('0xe'))(new Redis(config[_0xd932('0xb')]));require(_0xd932('0xf'))[_0xd932('0x10')](socket);function respondWithRpcPromise(_0x3fee11,_0x4a9918,_0x194803){return new BPromise(function(_0x5fbd5e,_0x462ce7){return client[_0xd932('0x11')](_0x3fee11,_0x194803)[_0xd932('0x12')](function(_0x379b0d){logger[_0xd932('0x13')](_0xd932('0x14'),_0x4a9918,'request\x20sent');logger['debug']('VoiceQueueReport,\x20%s,\x20%s,\x20%s',_0x4a9918,_0xd932('0x15'),JSON['stringify'](_0x379b0d));if(_0x379b0d[_0xd932('0x16')]){if(_0x379b0d[_0xd932('0x16')][_0xd932('0x17')]===0x1f4){logger[_0xd932('0x16')](_0xd932('0x14'),_0x4a9918,_0x379b0d['error'][_0xd932('0x18')]);return _0x462ce7(_0x379b0d[_0xd932('0x16')][_0xd932('0x18')]);}logger[_0xd932('0x16')](_0xd932('0x14'),_0x4a9918,_0x379b0d[_0xd932('0x16')][_0xd932('0x18')]);return _0x5fbd5e(_0x379b0d[_0xd932('0x16')][_0xd932('0x18')]);}else{logger[_0xd932('0x13')]('VoiceQueueReport,\x20%s,\x20%s',_0x4a9918,_0xd932('0x15'));_0x5fbd5e(_0x379b0d[_0xd932('0x19')]['message']);}})['catch'](function(_0x42c68a){logger['error']('VoiceQueueReport,\x20%s,\x20%s',_0x4a9918,_0x42c68a);_0x462ce7(_0x42c68a);});});}exports[_0xd932('0x1a')]=function(_0x4a6edb){var _0x43b314=this;return new Promise(function(_0x20a080,_0x1ef9b4){return db[_0xd932('0x1b')][_0xd932('0x1c')]({'raw':_0x4a6edb[_0xd932('0x1d')]?_0x4a6edb[_0xd932('0x1d')][_0xd932('0x1e')]===undefined?!![]:![]:!![],'where':_0x4a6edb[_0xd932('0x1d')]?_0x4a6edb[_0xd932('0x1d')][_0xd932('0x1f')]||null:null,'attributes':_0x4a6edb['options']?_0x4a6edb['options'][_0xd932('0x20')]||null:null,'limit':_0x4a6edb[_0xd932('0x1d')]?_0x4a6edb[_0xd932('0x1d')]['limit']||null:null,'include':_0x4a6edb[_0xd932('0x1d')]?_0x4a6edb[_0xd932('0x1d')][_0xd932('0x21')]?_[_0xd932('0x22')](_0x4a6edb[_0xd932('0x1d')][_0xd932('0x21')],function(_0xf7e164){return{'model':db[_0xf7e164[_0xd932('0x23')]],'as':_0xf7e164['as'],'attributes':_0xf7e164['attributes'],'include':_0xf7e164[_0xd932('0x21')]?_['map'](_0xf7e164[_0xd932('0x21')],function(_0x33e376){return{'model':db[_0x33e376[_0xd932('0x23')]],'as':_0x33e376['as'],'attributes':_0x33e376[_0xd932('0x20')],'include':_0x33e376[_0xd932('0x21')]?_['map'](_0x33e376[_0xd932('0x21')],function(_0x20aa76){return{'model':db[_0x20aa76['model']],'as':_0x20aa76['as'],'attributes':_0x20aa76[_0xd932('0x20')]};}):[]};}):[]};}):[]:[]})[_0xd932('0x12')](function(_0x13a263){logger[_0xd932('0x13')](_0xd932('0x1a'),_0x4a6edb);logger[_0xd932('0x24')](_0xd932('0x1a'),_0x4a6edb,JSON['stringify'](_0x13a263));_0x20a080(_0x13a263);})['catch'](function(_0x5bb589){logger[_0xd932('0x16')](_0xd932('0x1a'),_0x5bb589['message'],_0x4a6edb);_0x1ef9b4(_0x43b314['error'](0x1f4,_0x5bb589[_0xd932('0x18')]));});});};exports[_0xd932('0x25')]=function(_0x33a5b4){var _0x2af8f6=this;return new Promise(function(_0x1efedb,_0x1c8d0c){return db['VoiceQueueReport']['create'](_0x33a5b4[_0xd932('0x26')],{'raw':_0x33a5b4[_0xd932('0x1d')]?_0x33a5b4[_0xd932('0x1d')][_0xd932('0x1e')]===undefined?!![]:![]:!![]})[_0xd932('0x12')](function(_0x5caee2){logger[_0xd932('0x13')]('CreateVoiceQueueReport',_0x33a5b4);logger[_0xd932('0x24')]('CreateVoiceQueueReport',_0x33a5b4,JSON[_0xd932('0x27')](_0x5caee2));_0x1efedb(_0x5caee2);})[_0xd932('0x28')](function(_0x158fab){logger[_0xd932('0x16')]('CreateVoiceQueueReport',_0x158fab[_0xd932('0x18')],_0x33a5b4);_0x1c8d0c(_0x2af8f6[_0xd932('0x16')](0x1f4,_0x158fab[_0xd932('0x18')]));});});};exports[_0xd932('0x29')]=function(_0x40cd81){var _0x307438=this;return new Promise(function(_0x128c34,_0x35c236){return db[_0xd932('0x1b')][_0xd932('0x2a')](_0x40cd81[_0xd932('0x26')],{'raw':_0x40cd81[_0xd932('0x1d')]?_0x40cd81[_0xd932('0x1d')][_0xd932('0x1e')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x40cd81[_0xd932('0x1d')]?_0x40cd81[_0xd932('0x1d')][_0xd932('0x1f')]||null:null,'attributes':_0x40cd81[_0xd932('0x1d')]?_0x40cd81[_0xd932('0x1d')][_0xd932('0x20')]||null:null,'limit':_0x40cd81[_0xd932('0x1d')]?_0x40cd81[_0xd932('0x1d')][_0xd932('0x2b')]||null:null})[_0xd932('0x12')](function(_0x20d9f5){logger[_0xd932('0x13')](_0xd932('0x29'),_0x40cd81);logger[_0xd932('0x24')](_0xd932('0x29'),_0x40cd81,JSON[_0xd932('0x27')](_0x20d9f5));_0x128c34(_0x20d9f5);})[_0xd932('0x28')](function(_0x459733){logger[_0xd932('0x16')](_0xd932('0x29'),_0x459733[_0xd932('0x18')],_0x40cd81);_0x35c236(_0x307438['error'](0x1f4,_0x459733[_0xd932('0x18')]));});});}; \ No newline at end of file +var _0xa2ee=['VoiceQueueReport,\x20%s,\x20%s','request\x20sent','VoiceQueueReport,\x20%s,\x20%s,\x20%s','stringify','error','message','info','result','catch','GetVoiceQueueReport','VoiceQueueReport','findAll','options','raw','where','limit','include','model','attributes','map','debug','CreateVoiceQueueReport','create','body','then','UpdateVoiceQueueReport','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/logger','rpc','client','http','redis','defaults','localhost','socket.io-emitter','./voiceQueueReport.socket','register','request'];(function(_0x14add3,_0x13ce8d){var _0x4a174f=function(_0x2b3ed7){while(--_0x2b3ed7){_0x14add3['push'](_0x14add3['shift']());}};_0x4a174f(++_0x13ce8d);}(_0xa2ee,0x19d));var _0xea2e=function(_0xf458ea,_0x5767e5){_0xf458ea=_0xf458ea-0x0;var _0x20f763=_0xa2ee[_0xf458ea];return _0x20f763;};'use strict';var _=require('lodash');var util=require(_0xea2e('0x0'));var moment=require(_0xea2e('0x1'));var BPromise=require(_0xea2e('0x2'));var rs=require(_0xea2e('0x3'));var fs=require('fs');var Redis=require(_0xea2e('0x4'));var db=require(_0xea2e('0x5'))['db'];var utils=require('../../config/utils');var logger=require(_0xea2e('0x6'))(_0xea2e('0x7'));var config=require('../../config/environment');var jayson=require('jayson/promise');var client=jayson[_0xea2e('0x8')][_0xea2e('0x9')]({'port':0x232a});config[_0xea2e('0xa')]=_[_0xea2e('0xb')](config[_0xea2e('0xa')],{'host':_0xea2e('0xc'),'port':0x18eb});var socket=require(_0xea2e('0xd'))(new Redis(config[_0xea2e('0xa')]));require(_0xea2e('0xe'))[_0xea2e('0xf')](socket);function respondWithRpcPromise(_0x9c010f,_0x1cb197,_0x2dd9b3){return new BPromise(function(_0x140073,_0x3da34d){return client[_0xea2e('0x10')](_0x9c010f,_0x2dd9b3)['then'](function(_0x2d96d7){logger['info'](_0xea2e('0x11'),_0x1cb197,_0xea2e('0x12'));logger['debug'](_0xea2e('0x13'),_0x1cb197,_0xea2e('0x12'),JSON[_0xea2e('0x14')](_0x2d96d7));if(_0x2d96d7['error']){if(_0x2d96d7['error']['code']===0x1f4){logger[_0xea2e('0x15')]('VoiceQueueReport,\x20%s,\x20%s',_0x1cb197,_0x2d96d7[_0xea2e('0x15')]['message']);return _0x3da34d(_0x2d96d7['error'][_0xea2e('0x16')]);}logger['error'](_0xea2e('0x11'),_0x1cb197,_0x2d96d7[_0xea2e('0x15')][_0xea2e('0x16')]);return _0x140073(_0x2d96d7[_0xea2e('0x15')][_0xea2e('0x16')]);}else{logger[_0xea2e('0x17')]('VoiceQueueReport,\x20%s,\x20%s',_0x1cb197,_0xea2e('0x12'));_0x140073(_0x2d96d7[_0xea2e('0x18')][_0xea2e('0x16')]);}})[_0xea2e('0x19')](function(_0x292564){logger[_0xea2e('0x15')](_0xea2e('0x11'),_0x1cb197,_0x292564);_0x3da34d(_0x292564);});});}exports[_0xea2e('0x1a')]=function(_0x3ebcd1){var _0x48833c=this;return new Promise(function(_0xed90a9,_0x12eb72){return db[_0xea2e('0x1b')][_0xea2e('0x1c')]({'raw':_0x3ebcd1[_0xea2e('0x1d')]?_0x3ebcd1[_0xea2e('0x1d')][_0xea2e('0x1e')]===undefined?!![]:![]:!![],'where':_0x3ebcd1[_0xea2e('0x1d')]?_0x3ebcd1['options'][_0xea2e('0x1f')]||null:null,'attributes':_0x3ebcd1['options']?_0x3ebcd1[_0xea2e('0x1d')]['attributes']||null:null,'limit':_0x3ebcd1[_0xea2e('0x1d')]?_0x3ebcd1[_0xea2e('0x1d')][_0xea2e('0x20')]||null:null,'include':_0x3ebcd1[_0xea2e('0x1d')]?_0x3ebcd1[_0xea2e('0x1d')]['include']?_['map'](_0x3ebcd1[_0xea2e('0x1d')][_0xea2e('0x21')],function(_0x15dd93){return{'model':db[_0x15dd93[_0xea2e('0x22')]],'as':_0x15dd93['as'],'attributes':_0x15dd93[_0xea2e('0x23')],'include':_0x15dd93[_0xea2e('0x21')]?_['map'](_0x15dd93[_0xea2e('0x21')],function(_0x4ed6b9){return{'model':db[_0x4ed6b9[_0xea2e('0x22')]],'as':_0x4ed6b9['as'],'attributes':_0x4ed6b9[_0xea2e('0x23')],'include':_0x4ed6b9['include']?_[_0xea2e('0x24')](_0x4ed6b9['include'],function(_0xc9e15){return{'model':db[_0xc9e15[_0xea2e('0x22')]],'as':_0xc9e15['as'],'attributes':_0xc9e15['attributes']};}):[]};}):[]};}):[]:[]})['then'](function(_0x3c13c8){logger[_0xea2e('0x17')](_0xea2e('0x1a'),_0x3ebcd1);logger[_0xea2e('0x25')]('GetVoiceQueueReport',_0x3ebcd1,JSON['stringify'](_0x3c13c8));_0xed90a9(_0x3c13c8);})[_0xea2e('0x19')](function(_0x2dca21){logger['error']('GetVoiceQueueReport',_0x2dca21[_0xea2e('0x16')],_0x3ebcd1);_0x12eb72(_0x48833c[_0xea2e('0x15')](0x1f4,_0x2dca21['message']));});});};exports[_0xea2e('0x26')]=function(_0x7f7b06){var _0x35d0ff=this;return new Promise(function(_0x2e2506,_0x15bc39){return db[_0xea2e('0x1b')][_0xea2e('0x27')](_0x7f7b06[_0xea2e('0x28')],{'raw':_0x7f7b06[_0xea2e('0x1d')]?_0x7f7b06[_0xea2e('0x1d')][_0xea2e('0x1e')]===undefined?!![]:![]:!![]})[_0xea2e('0x29')](function(_0x4c77e6){logger[_0xea2e('0x17')](_0xea2e('0x26'),_0x7f7b06);logger[_0xea2e('0x25')]('CreateVoiceQueueReport',_0x7f7b06,JSON[_0xea2e('0x14')](_0x4c77e6));_0x2e2506(_0x4c77e6);})['catch'](function(_0x35debc){logger[_0xea2e('0x15')](_0xea2e('0x26'),_0x35debc[_0xea2e('0x16')],_0x7f7b06);_0x15bc39(_0x35d0ff[_0xea2e('0x15')](0x1f4,_0x35debc[_0xea2e('0x16')]));});});};exports[_0xea2e('0x2a')]=function(_0x260335){var _0x469940=this;return new Promise(function(_0xa1339e,_0x12fbb0){return db[_0xea2e('0x1b')]['update'](_0x260335[_0xea2e('0x28')],{'raw':_0x260335[_0xea2e('0x1d')]?_0x260335[_0xea2e('0x1d')][_0xea2e('0x1e')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x260335[_0xea2e('0x1d')]?_0x260335[_0xea2e('0x1d')][_0xea2e('0x1f')]||null:null,'attributes':_0x260335[_0xea2e('0x1d')]?_0x260335['options'][_0xea2e('0x23')]||null:null,'limit':_0x260335[_0xea2e('0x1d')]?_0x260335['options'][_0xea2e('0x20')]||null:null})[_0xea2e('0x29')](function(_0x26f872){logger[_0xea2e('0x17')](_0xea2e('0x2a'),_0x260335);logger[_0xea2e('0x25')](_0xea2e('0x2a'),_0x260335,JSON[_0xea2e('0x14')](_0x26f872));_0xa1339e(_0x26f872);})[_0xea2e('0x19')](function(_0x4ef8e1){logger[_0xea2e('0x15')](_0xea2e('0x2a'),_0x4ef8e1['message'],_0x260335);_0x12fbb0(_0x469940['error'](0x1f4,_0x4ef8e1[_0xea2e('0x16')]));});});}; \ No newline at end of file diff --git a/server/api/voiceQueueReport/voiceQueueReport.socket.js b/server/api/voiceQueueReport/voiceQueueReport.socket.js index 895d5cd..5d57f37 100644 --- a/server/api/voiceQueueReport/voiceQueueReport.socket.js +++ b/server/api/voiceQueueReport/voiceQueueReport.socket.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x55d2=['emit','removeListener','register','length','voiceQueueReport:','remove','update'];(function(_0x3cf1ad,_0x5a153d){var _0x481ca3=function(_0x4db9e8){while(--_0x4db9e8){_0x3cf1ad['push'](_0x3cf1ad['shift']());}};_0x481ca3(++_0x5a153d);}(_0x55d2,0x9f));var _0x255d=function(_0x4d7fb3,_0x4abee8){_0x4d7fb3=_0x4d7fb3-0x0;var _0x3db26c=_0x55d2[_0x4d7fb3];return _0x3db26c;};'use strict';var VoiceQueueReportEvents=require('./voiceQueueReport.events');var events=['save',_0x255d('0x0'),_0x255d('0x1')];function createListener(_0xb754b6,_0x2bac55){return function(_0x28c41e){_0x2bac55[_0x255d('0x2')](_0xb754b6,_0x28c41e);};}function removeListener(_0x57cbc1,_0x44e16c){return function(){VoiceQueueReportEvents[_0x255d('0x3')](_0x57cbc1,_0x44e16c);};}exports[_0x255d('0x4')]=function(_0x38017a){for(var _0x58dae4=0x0,_0x4f93b4=events[_0x255d('0x5')];_0x58dae4<_0x4f93b4;_0x58dae4++){var _0xcf66a2=events[_0x58dae4];var _0x253ac9=createListener(_0x255d('0x6')+_0xcf66a2,_0x38017a);VoiceQueueReportEvents['on'](_0xcf66a2,_0x253ac9);}}; \ No newline at end of file +var _0xed1f=['register','length','./voiceQueueReport.events','save','remove','update','emit','removeListener'];(function(_0x40a045,_0x516f0e){var _0x1a687c=function(_0x48c9fe){while(--_0x48c9fe){_0x40a045['push'](_0x40a045['shift']());}};_0x1a687c(++_0x516f0e);}(_0xed1f,0x6a));var _0xfed1=function(_0x12fc8d,_0x19ee33){_0x12fc8d=_0x12fc8d-0x0;var _0x3f9d04=_0xed1f[_0x12fc8d];return _0x3f9d04;};'use strict';var VoiceQueueReportEvents=require(_0xfed1('0x0'));var events=[_0xfed1('0x1'),_0xfed1('0x2'),_0xfed1('0x3')];function createListener(_0xa45937,_0x25f345){return function(_0x1dd614){_0x25f345[_0xfed1('0x4')](_0xa45937,_0x1dd614);};}function removeListener(_0x2209b3,_0x45c3c1){return function(){VoiceQueueReportEvents[_0xfed1('0x5')](_0x2209b3,_0x45c3c1);};}exports[_0xfed1('0x6')]=function(_0x3d6706){for(var _0x42751d=0x0,_0x380e18=events[_0xfed1('0x7')];_0x42751d<_0x380e18;_0x42751d++){var _0x2a6082=events[_0x42751d];var _0x2967ef=createListener('voiceQueueReport:'+_0x2a6082,_0x3d6706);VoiceQueueReportEvents['on'](_0x2a6082,_0x2967ef);}}; \ No newline at end of file diff --git a/server/api/voiceQueuesLog/index.js b/server/api/voiceQueuesLog/index.js index 04822be..ab3e8b8 100644 --- a/server/api/voiceQueuesLog/index.js +++ b/server/api/voiceQueuesLog/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xb05d=['/:id','update','delete','destroy','exports','multer','path','connect-timeout','Router','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','./voiceQueuesLog.controller','get','isAuthenticated','show','create'];(function(_0x3da317,_0x22843d){var _0x372ed7=function(_0x9ffe99){while(--_0x9ffe99){_0x3da317['push'](_0x3da317['shift']());}};_0x372ed7(++_0x22843d);}(_0xb05d,0x1d9));var _0xdb05=function(_0x1b6311,_0x42ec20){_0x1b6311=_0x1b6311-0x0;var _0x25aab6=_0xb05d[_0x1b6311];return _0x25aab6;};'use strict';var multer=require(_0xdb05('0x0'));var util=require('util');var path=require(_0xdb05('0x1'));var timeout=require(_0xdb05('0x2'));var express=require('express');var router=express[_0xdb05('0x3')]();var fs_extra=require(_0xdb05('0x4'));var auth=require(_0xdb05('0x5'));var interaction=require(_0xdb05('0x6'));var config=require(_0xdb05('0x7'));var controller=require(_0xdb05('0x8'));router[_0xdb05('0x9')]('/',auth['isAuthenticated'](),controller['index']);router[_0xdb05('0x9')]('/:id',auth[_0xdb05('0xa')](),controller[_0xdb05('0xb')]);router['post']('/',auth[_0xdb05('0xa')](),controller[_0xdb05('0xc')]);router['put'](_0xdb05('0xd'),auth['isAuthenticated'](),controller[_0xdb05('0xe')]);router[_0xdb05('0xf')](_0xdb05('0xd'),auth[_0xdb05('0xa')](),controller[_0xdb05('0x10')]);module[_0xdb05('0x11')]=router; \ No newline at end of file +var _0xaa5b=['get','isAuthenticated','index','/:id','show','create','put','update','exports','multer','util','connect-timeout','Router','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','./voiceQueuesLog.controller'];(function(_0x3b686b,_0x32f06c){var _0x8cb331=function(_0x14b6b0){while(--_0x14b6b0){_0x3b686b['push'](_0x3b686b['shift']());}};_0x8cb331(++_0x32f06c);}(_0xaa5b,0x129));var _0xbaa5=function(_0x20a584,_0xe384a5){_0x20a584=_0x20a584-0x0;var _0x4b41a8=_0xaa5b[_0x20a584];return _0x4b41a8;};'use strict';var multer=require(_0xbaa5('0x0'));var util=require(_0xbaa5('0x1'));var path=require('path');var timeout=require(_0xbaa5('0x2'));var express=require('express');var router=express[_0xbaa5('0x3')]();var fs_extra=require(_0xbaa5('0x4'));var auth=require(_0xbaa5('0x5'));var interaction=require(_0xbaa5('0x6'));var config=require(_0xbaa5('0x7'));var controller=require(_0xbaa5('0x8'));router[_0xbaa5('0x9')]('/',auth[_0xbaa5('0xa')](),controller[_0xbaa5('0xb')]);router[_0xbaa5('0x9')](_0xbaa5('0xc'),auth['isAuthenticated'](),controller[_0xbaa5('0xd')]);router['post']('/',auth[_0xbaa5('0xa')](),controller[_0xbaa5('0xe')]);router[_0xbaa5('0xf')](_0xbaa5('0xc'),auth['isAuthenticated'](),controller[_0xbaa5('0x10')]);router['delete']('/:id',auth[_0xbaa5('0xa')](),controller['destroy']);module[_0xbaa5('0x11')]=router; \ No newline at end of file diff --git a/server/api/voiceQueuesLog/voiceQueuesLog.attributes.js b/server/api/voiceQueuesLog/voiceQueuesLog.attributes.js index 4cf64b6..8518a15 100644 --- a/server/api/voiceQueuesLog/voiceQueuesLog.attributes.js +++ b/server/api/voiceQueuesLog/voiceQueuesLog.attributes.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xab4b=['CURRENT_TIMESTAMP\x20ON\x20UPDATE\x20CURRENT_TIMESTAMP','sequelize','moment','exports','STRING','DATE','literal'];(function(_0x421e36,_0x26af55){var _0x1e3275=function(_0x36e870){while(--_0x36e870){_0x421e36['push'](_0x421e36['shift']());}};_0x1e3275(++_0x26af55);}(_0xab4b,0xcc));var _0xbab4=function(_0x2d0c48,_0x5146ef){_0x2d0c48=_0x2d0c48-0x0;var _0x44b4db=_0xab4b[_0x2d0c48];return _0x44b4db;};'use strict';var Sequelize=require(_0xbab4('0x0'));var moment=require(_0xbab4('0x1'));module[_0xbab4('0x2')]={'time':{'type':Sequelize[_0xbab4('0x3')]},'callid':{'type':Sequelize['STRING'],'allowNull':![],'defaultValue':''},'queuename':{'type':Sequelize[_0xbab4('0x3')],'allowNull':![],'defaultValue':''},'agent':{'type':Sequelize[_0xbab4('0x3')],'allowNull':![],'defaultValue':''},'event':{'type':Sequelize['STRING'],'allowNull':![],'defaultValue':''},'data':{'type':Sequelize[_0xbab4('0x3')],'allowNull':![],'defaultValue':''},'data1':{'type':Sequelize[_0xbab4('0x3')],'allowNull':![],'defaultValue':''},'data2':{'type':Sequelize[_0xbab4('0x3')],'allowNull':![],'defaultValue':''},'data3':{'type':Sequelize[_0xbab4('0x3')],'allowNull':![],'defaultValue':''},'data4':{'type':Sequelize['STRING'],'allowNull':![],'defaultValue':''},'data5':{'type':Sequelize['STRING'],'allowNull':![],'defaultValue':''},'dtm':{'type':Sequelize[_0xbab4('0x4')],'allowNull':![],'defaultValue':Sequelize[_0xbab4('0x5')](_0xbab4('0x6'))}}; \ No newline at end of file +var _0xbafd=['literal','sequelize','exports','STRING','DATE'];(function(_0x34c889,_0xea69ac){var _0x4b4751=function(_0x4d5cfe){while(--_0x4d5cfe){_0x34c889['push'](_0x34c889['shift']());}};_0x4b4751(++_0xea69ac);}(_0xbafd,0xdd));var _0xdbaf=function(_0x3b9479,_0x1a6c61){_0x3b9479=_0x3b9479-0x0;var _0x38e331=_0xbafd[_0x3b9479];return _0x38e331;};'use strict';var Sequelize=require(_0xdbaf('0x0'));var moment=require('moment');module[_0xdbaf('0x1')]={'time':{'type':Sequelize[_0xdbaf('0x2')]},'callid':{'type':Sequelize[_0xdbaf('0x2')],'allowNull':![],'defaultValue':''},'queuename':{'type':Sequelize[_0xdbaf('0x2')],'allowNull':![],'defaultValue':''},'agent':{'type':Sequelize['STRING'],'allowNull':![],'defaultValue':''},'event':{'type':Sequelize[_0xdbaf('0x2')],'allowNull':![],'defaultValue':''},'data':{'type':Sequelize[_0xdbaf('0x2')],'allowNull':![],'defaultValue':''},'data1':{'type':Sequelize[_0xdbaf('0x2')],'allowNull':![],'defaultValue':''},'data2':{'type':Sequelize[_0xdbaf('0x2')],'allowNull':![],'defaultValue':''},'data3':{'type':Sequelize[_0xdbaf('0x2')],'allowNull':![],'defaultValue':''},'data4':{'type':Sequelize['STRING'],'allowNull':![],'defaultValue':''},'data5':{'type':Sequelize[_0xdbaf('0x2')],'allowNull':![],'defaultValue':''},'dtm':{'type':Sequelize[_0xdbaf('0x3')],'allowNull':![],'defaultValue':Sequelize[_0xdbaf('0x4')]('CURRENT_TIMESTAMP\x20ON\x20UPDATE\x20CURRENT_TIMESTAMP')}}; \ No newline at end of file diff --git a/server/api/voiceQueuesLog/voiceQueuesLog.controller.js b/server/api/voiceQueuesLog/voiceQueuesLog.controller.js index e084470..7e4e176 100644 --- a/server/api/voiceQueuesLog/voiceQueuesLog.controller.js +++ b/server/api/voiceQueuesLog/voiceQueuesLog.controller.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x989a=['map','VoiceQueuesLog','fieldName','type','key','model','query','filters','intersection','attributes','fields','length','hasOwnProperty','nolimit','order','sort','filter','merge','VIRTUAL','include','findAll','catch','show','params','keys','find','create','body','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','util','path','sox','ejs','fs-extra','squel','crypto','jsforce','desk.js','to-csv','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/environment','../../config/license/util','sendStatus','end','status','json','offset','undefined','limit','count','set','Content-Range','apply','reject','save','update','then','destroy','error','stack','name'];(function(_0x200aa5,_0x197802){var _0x458200=function(_0x594959){while(--_0x594959){_0x200aa5['push'](_0x200aa5['shift']());}};_0x458200(++_0x197802);}(_0x989a,0xb4));var _0xa989=function(_0x2e3ccb,_0x4972e3){_0x2e3ccb=_0x2e3ccb-0x0;var _0x5732e7=_0x989a[_0x2e3ccb];return _0x5732e7;};'use strict';var emlformat=require(_0xa989('0x0'));var rimraf=require(_0xa989('0x1'));var zipdir=require(_0xa989('0x2'));var jsonpatch=require(_0xa989('0x3'));var rp=require(_0xa989('0x4'));var moment=require(_0xa989('0x5'));var BPromise=require(_0xa989('0x6'));var Mustache=require(_0xa989('0x7'));var util=require(_0xa989('0x8'));var path=require(_0xa989('0x9'));var sox=require(_0xa989('0xa'));var csv=require('to-csv');var ejs=require(_0xa989('0xb'));var fs=require('fs');var fs_extra=require(_0xa989('0xc'));var _=require('lodash');var squel=require(_0xa989('0xd'));var crypto=require(_0xa989('0xe'));var jsforce=require(_0xa989('0xf'));var deskjs=require(_0xa989('0x10'));var toCsv=require(_0xa989('0x11'));var querystring=require(_0xa989('0x12'));var Papa=require(_0xa989('0x13'));var Redis=require(_0xa989('0x14'));var authService=require(_0xa989('0x15'));var qs=require(_0xa989('0x16'));var as=require(_0xa989('0x17'));var hardwareService=require(_0xa989('0x18'));var logger=require(_0xa989('0x19'))(_0xa989('0x1a'));var utils=require('../../config/utils');var config=require(_0xa989('0x1b'));var licenseUtil=require(_0xa989('0x1c'));var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0x354991,_0x511172){_0x511172=_0x511172||0xcc;return function(_0x5deb09){if(_0x5deb09){return _0x354991[_0xa989('0x1d')](_0x511172);}return _0x354991['status'](_0x511172)[_0xa989('0x1e')]();};}function respondWithResult(_0x5c7c8e,_0x91467f){_0x91467f=_0x91467f||0xc8;return function(_0x11c4ed){if(_0x11c4ed){return _0x5c7c8e[_0xa989('0x1f')](_0x91467f)[_0xa989('0x20')](_0x11c4ed);}};}function respondWithFilteredResult(_0x48b839,_0x1dd6ce){return function(_0x210e2d){if(_0x210e2d){var _0xec1e37=typeof _0x1dd6ce[_0xa989('0x21')]===_0xa989('0x22')&&typeof _0x1dd6ce[_0xa989('0x23')]===_0xa989('0x22');var _0x297b35=_0x210e2d[_0xa989('0x24')];var _0x436002=_0xec1e37?0x0:_0x1dd6ce[_0xa989('0x21')];var _0x49034d=_0xec1e37?_0x210e2d[_0xa989('0x24')]:_0x1dd6ce[_0xa989('0x21')]+_0x1dd6ce['limit'];var _0x1f6809;if(_0x49034d>=_0x297b35){_0x49034d=_0x297b35;_0x1f6809=0xc8;}else{_0x1f6809=0xce;}_0x48b839[_0xa989('0x1f')](_0x1f6809);return _0x48b839[_0xa989('0x25')](_0xa989('0x26'),_0x436002+'-'+_0x49034d+'/'+_0x297b35)[_0xa989('0x20')](_0x210e2d);}return null;};}function patchUpdates(_0x33cd61){return function(_0x5270b8){try{jsonpatch[_0xa989('0x27')](_0x5270b8,_0x33cd61,!![]);}catch(_0x2ab152){return BPromise[_0xa989('0x28')](_0x2ab152);}return _0x5270b8[_0xa989('0x29')]();};}function saveUpdates(_0x531085,_0x14ecb8){return function(_0x2c0e3b){if(_0x2c0e3b){return _0x2c0e3b[_0xa989('0x2a')](_0x531085)[_0xa989('0x2b')](function(_0x854a9b){return _0x854a9b;});}return null;};}function removeEntity(_0x371b06,_0x20d522){return function(_0x1594ea){if(_0x1594ea){return _0x1594ea[_0xa989('0x2c')]()[_0xa989('0x2b')](function(){_0x371b06[_0xa989('0x1f')](0xcc)[_0xa989('0x1e')]();});}};}function handleEntityNotFound(_0x509af9,_0x463ca1){return function(_0x3ad37a){if(!_0x3ad37a){_0x509af9[_0xa989('0x1d')](0x194);}return _0x3ad37a;};}function handleError(_0x50b3f0,_0x315fc4){_0x315fc4=_0x315fc4||0x1f4;return function(_0x58ac3a){logger[_0xa989('0x2d')](_0x58ac3a[_0xa989('0x2e')]);if(_0x58ac3a[_0xa989('0x2f')]){delete _0x58ac3a[_0xa989('0x2f')];}_0x50b3f0[_0xa989('0x1f')](_0x315fc4)['send'](_0x58ac3a);};}exports['index']=function(_0x39dd4d,_0x2c0583){var _0x41185e={},_0x51f48a={},_0x13c4e1={'count':0x0,'rows':[]};var _0x68b7f0=_[_0xa989('0x30')](db[_0xa989('0x31')]['rawAttributes'],function(_0x16ffd2){return{'name':_0x16ffd2[_0xa989('0x32')],'type':_0x16ffd2[_0xa989('0x33')][_0xa989('0x34')]};});_0x51f48a[_0xa989('0x35')]=_[_0xa989('0x30')](_0x68b7f0,_0xa989('0x2f'));_0x51f48a[_0xa989('0x36')]=_['keys'](_0x39dd4d[_0xa989('0x36')]);_0x51f48a[_0xa989('0x37')]=_[_0xa989('0x38')](_0x51f48a[_0xa989('0x35')],_0x51f48a[_0xa989('0x36')]);_0x41185e[_0xa989('0x39')]=_[_0xa989('0x38')](_0x51f48a[_0xa989('0x35')],qs[_0xa989('0x3a')](_0x39dd4d['query'][_0xa989('0x3a')]));_0x41185e[_0xa989('0x39')]=_0x41185e[_0xa989('0x39')][_0xa989('0x3b')]?_0x41185e[_0xa989('0x39')]:_0x51f48a[_0xa989('0x35')];if(!_0x39dd4d['query'][_0xa989('0x3c')](_0xa989('0x3d'))){_0x41185e['limit']=qs['limit'](_0x39dd4d[_0xa989('0x36')][_0xa989('0x23')]);_0x41185e[_0xa989('0x21')]=qs['offset'](_0x39dd4d['query'][_0xa989('0x21')]);}_0x41185e[_0xa989('0x3e')]=qs['sort'](_0x39dd4d[_0xa989('0x36')][_0xa989('0x3f')]);_0x41185e['where']=qs[_0xa989('0x37')](_['pick'](_0x39dd4d[_0xa989('0x36')],_0x51f48a['filters']),_0x68b7f0);if(_0x39dd4d[_0xa989('0x36')][_0xa989('0x40')]){_0x41185e['where']=_[_0xa989('0x41')](_0x41185e['where'],{'$or':_['map'](_0x68b7f0,function(_0x4bb286){if(_0x4bb286['type']!==_0xa989('0x42')){var _0x2583ee={};_0x2583ee[_0x4bb286['name']]={'$like':'%'+_0x39dd4d['query'][_0xa989('0x40')]+'%'};return _0x2583ee;}})});}_0x41185e=_[_0xa989('0x41')]({},_0x41185e,_0x39dd4d['options']);var _0x307d9d={'where':_0x41185e['where']};return db[_0xa989('0x31')][_0xa989('0x24')](_0x307d9d)['then'](function(_0x4d4973){_0x13c4e1[_0xa989('0x24')]=_0x4d4973;if(_0x39dd4d[_0xa989('0x36')]['includeAll']){_0x41185e[_0xa989('0x43')]=[{'all':!![]}];}return db[_0xa989('0x31')][_0xa989('0x44')](_0x41185e);})[_0xa989('0x2b')](function(_0x23dba5){_0x13c4e1['rows']=_0x23dba5;return _0x13c4e1;})[_0xa989('0x2b')](respondWithFilteredResult(_0x2c0583,_0x41185e))[_0xa989('0x45')](handleError(_0x2c0583,null));};exports[_0xa989('0x46')]=function(_0x1d18e2,_0xf6fdc8){var _0x5904ea={'raw':!![],'where':{'id':_0x1d18e2[_0xa989('0x47')]['id']}},_0x3b612a={};_0x3b612a['model']=_[_0xa989('0x48')](db['VoiceQueuesLog']['rawAttributes']);_0x3b612a[_0xa989('0x36')]=_[_0xa989('0x48')](_0x1d18e2[_0xa989('0x36')]);_0x3b612a[_0xa989('0x37')]=_['intersection'](_0x3b612a[_0xa989('0x35')],_0x3b612a[_0xa989('0x36')]);_0x5904ea[_0xa989('0x39')]=_[_0xa989('0x38')](_0x3b612a[_0xa989('0x35')],qs[_0xa989('0x3a')](_0x1d18e2[_0xa989('0x36')][_0xa989('0x3a')]));_0x5904ea[_0xa989('0x39')]=_0x5904ea['attributes'][_0xa989('0x3b')]?_0x5904ea['attributes']:_0x3b612a['model'];if(_0x1d18e2['query']['includeAll']){_0x5904ea[_0xa989('0x43')]=[{'all':!![]}];}_0x5904ea=_['merge']({},_0x5904ea,_0x1d18e2['options']);return db[_0xa989('0x31')][_0xa989('0x49')](_0x5904ea)[_0xa989('0x2b')](handleEntityNotFound(_0xf6fdc8,null))[_0xa989('0x2b')](respondWithResult(_0xf6fdc8,null))['catch'](handleError(_0xf6fdc8,null));};exports['create']=function(_0x282348,_0x45716b){return db[_0xa989('0x31')][_0xa989('0x4a')](_0x282348[_0xa989('0x4b')],{})['then'](respondWithResult(_0x45716b,0xc9))[_0xa989('0x45')](handleError(_0x45716b,null));};exports['update']=function(_0x3628d2,_0x494f30){if(_0x3628d2['body']['id']){delete _0x3628d2[_0xa989('0x4b')]['id'];}return db[_0xa989('0x31')]['find']({'where':{'id':_0x3628d2[_0xa989('0x47')]['id']}})[_0xa989('0x2b')](handleEntityNotFound(_0x494f30,null))[_0xa989('0x2b')](saveUpdates(_0x3628d2[_0xa989('0x4b')],null))[_0xa989('0x2b')](respondWithResult(_0x494f30,null))['catch'](handleError(_0x494f30,null));};exports[_0xa989('0x2c')]=function(_0x12282a,_0xf159ba){return db[_0xa989('0x31')][_0xa989('0x49')]({'where':{'id':_0x12282a[_0xa989('0x47')]['id']}})['then'](handleEntityNotFound(_0xf159ba,null))[_0xa989('0x2b')](removeEntity(_0xf159ba,null))['catch'](handleError(_0xf159ba,null));}; \ No newline at end of file +var _0x578e=['error','stack','name','send','index','map','VoiceQueuesLog','rawAttributes','type','key','keys','query','filters','model','attributes','intersection','fields','length','order','sort','where','pick','filter','merge','options','includeAll','include','findAll','rows','show','params','find','catch','create','body','eml-format','rimraf','zip-dir','fast-json-patch','bluebird','mustache','path','sox','to-csv','ejs','squel','jsforce','desk.js','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','sendStatus','end','status','offset','undefined','count','limit','set','Content-Range','json','apply','reject','save','update','destroy','then'];(function(_0x14add3,_0x13ce8d){var _0x4a174f=function(_0x2b3ed7){while(--_0x2b3ed7){_0x14add3['push'](_0x14add3['shift']());}};_0x4a174f(++_0x13ce8d);}(_0x578e,0x1f1));var _0xe578=function(_0x15cdcb,_0x4340e9){_0x15cdcb=_0x15cdcb-0x0;var _0x37b069=_0x578e[_0x15cdcb];return _0x37b069;};'use strict';var emlformat=require(_0xe578('0x0'));var rimraf=require(_0xe578('0x1'));var zipdir=require(_0xe578('0x2'));var jsonpatch=require(_0xe578('0x3'));var rp=require('request-promise');var moment=require('moment');var BPromise=require(_0xe578('0x4'));var Mustache=require(_0xe578('0x5'));var util=require('util');var path=require(_0xe578('0x6'));var sox=require(_0xe578('0x7'));var csv=require(_0xe578('0x8'));var ejs=require(_0xe578('0x9'));var fs=require('fs');var fs_extra=require('fs-extra');var _=require('lodash');var squel=require(_0xe578('0xa'));var crypto=require('crypto');var jsforce=require(_0xe578('0xb'));var deskjs=require(_0xe578('0xc'));var toCsv=require(_0xe578('0x8'));var querystring=require(_0xe578('0xd'));var Papa=require(_0xe578('0xe'));var Redis=require(_0xe578('0xf'));var authService=require(_0xe578('0x10'));var qs=require(_0xe578('0x11'));var as=require(_0xe578('0x12'));var hardwareService=require(_0xe578('0x13'));var logger=require(_0xe578('0x14'))(_0xe578('0x15'));var utils=require(_0xe578('0x16'));var config=require(_0xe578('0x17'));var licenseUtil=require(_0xe578('0x18'));var db=require(_0xe578('0x19'))['db'];function respondWithStatusCode(_0x28a559,_0x5351dc){_0x5351dc=_0x5351dc||0xcc;return function(_0x28b06e){if(_0x28b06e){return _0x28a559[_0xe578('0x1a')](_0x5351dc);}return _0x28a559['status'](_0x5351dc)[_0xe578('0x1b')]();};}function respondWithResult(_0x43a10c,_0x14d7b0){_0x14d7b0=_0x14d7b0||0xc8;return function(_0x719f82){if(_0x719f82){return _0x43a10c[_0xe578('0x1c')](_0x14d7b0)['json'](_0x719f82);}};}function respondWithFilteredResult(_0x2bbcd7,_0x32d7d9){return function(_0x5eeeb1){if(_0x5eeeb1){var _0x4fecb7=typeof _0x32d7d9[_0xe578('0x1d')]===_0xe578('0x1e')&&typeof _0x32d7d9['limit']===_0xe578('0x1e');var _0x52ce89=_0x5eeeb1['count'];var _0x4b6ae4=_0x4fecb7?0x0:_0x32d7d9['offset'];var _0x4a5ad3=_0x4fecb7?_0x5eeeb1[_0xe578('0x1f')]:_0x32d7d9[_0xe578('0x1d')]+_0x32d7d9[_0xe578('0x20')];var _0x4a879a;if(_0x4a5ad3>=_0x52ce89){_0x4a5ad3=_0x52ce89;_0x4a879a=0xc8;}else{_0x4a879a=0xce;}_0x2bbcd7['status'](_0x4a879a);return _0x2bbcd7[_0xe578('0x21')](_0xe578('0x22'),_0x4b6ae4+'-'+_0x4a5ad3+'/'+_0x52ce89)[_0xe578('0x23')](_0x5eeeb1);}return null;};}function patchUpdates(_0x517c25){return function(_0x6d184c){try{jsonpatch[_0xe578('0x24')](_0x6d184c,_0x517c25,!![]);}catch(_0x1cc890){return BPromise[_0xe578('0x25')](_0x1cc890);}return _0x6d184c[_0xe578('0x26')]();};}function saveUpdates(_0x1da9f6,_0x563ca4){return function(_0x5b2d4b){if(_0x5b2d4b){return _0x5b2d4b[_0xe578('0x27')](_0x1da9f6)['then'](function(_0x8440d6){return _0x8440d6;});}return null;};}function removeEntity(_0x11af6c,_0x10993e){return function(_0x4ba6f5){if(_0x4ba6f5){return _0x4ba6f5[_0xe578('0x28')]()[_0xe578('0x29')](function(){_0x11af6c[_0xe578('0x1c')](0xcc)[_0xe578('0x1b')]();});}};}function handleEntityNotFound(_0x1f2a3d,_0x2a215e){return function(_0x4bed0c){if(!_0x4bed0c){_0x1f2a3d[_0xe578('0x1a')](0x194);}return _0x4bed0c;};}function handleError(_0x1ca79d,_0xaee393){_0xaee393=_0xaee393||0x1f4;return function(_0x3aeaa3){logger[_0xe578('0x2a')](_0x3aeaa3[_0xe578('0x2b')]);if(_0x3aeaa3['name']){delete _0x3aeaa3[_0xe578('0x2c')];}_0x1ca79d[_0xe578('0x1c')](_0xaee393)[_0xe578('0x2d')](_0x3aeaa3);};}exports[_0xe578('0x2e')]=function(_0x1f1305,_0x7c32b4){var _0x882932={},_0x3019de={},_0x1955c0={'count':0x0,'rows':[]};var _0xc8f828=_[_0xe578('0x2f')](db[_0xe578('0x30')][_0xe578('0x31')],function(_0x5bb55d){return{'name':_0x5bb55d['fieldName'],'type':_0x5bb55d[_0xe578('0x32')][_0xe578('0x33')]};});_0x3019de['model']=_['map'](_0xc8f828,'name');_0x3019de['query']=_[_0xe578('0x34')](_0x1f1305[_0xe578('0x35')]);_0x3019de[_0xe578('0x36')]=_['intersection'](_0x3019de[_0xe578('0x37')],_0x3019de[_0xe578('0x35')]);_0x882932[_0xe578('0x38')]=_[_0xe578('0x39')](_0x3019de[_0xe578('0x37')],qs[_0xe578('0x3a')](_0x1f1305['query'][_0xe578('0x3a')]));_0x882932[_0xe578('0x38')]=_0x882932[_0xe578('0x38')][_0xe578('0x3b')]?_0x882932[_0xe578('0x38')]:_0x3019de['model'];if(!_0x1f1305[_0xe578('0x35')]['hasOwnProperty']('nolimit')){_0x882932[_0xe578('0x20')]=qs['limit'](_0x1f1305[_0xe578('0x35')][_0xe578('0x20')]);_0x882932[_0xe578('0x1d')]=qs[_0xe578('0x1d')](_0x1f1305[_0xe578('0x35')]['offset']);}_0x882932[_0xe578('0x3c')]=qs[_0xe578('0x3d')](_0x1f1305[_0xe578('0x35')]['sort']);_0x882932[_0xe578('0x3e')]=qs[_0xe578('0x36')](_[_0xe578('0x3f')](_0x1f1305['query'],_0x3019de['filters']),_0xc8f828);if(_0x1f1305[_0xe578('0x35')][_0xe578('0x40')]){_0x882932[_0xe578('0x3e')]=_[_0xe578('0x41')](_0x882932['where'],{'$or':_[_0xe578('0x2f')](_0xc8f828,function(_0x3af8a7){if(_0x3af8a7[_0xe578('0x32')]!=='VIRTUAL'){var _0x514304={};_0x514304[_0x3af8a7['name']]={'$like':'%'+_0x1f1305['query'][_0xe578('0x40')]+'%'};return _0x514304;}})});}_0x882932=_[_0xe578('0x41')]({},_0x882932,_0x1f1305[_0xe578('0x42')]);var _0xfd5ea8={'where':_0x882932['where']};return db[_0xe578('0x30')]['count'](_0xfd5ea8)[_0xe578('0x29')](function(_0x4bc97c){_0x1955c0[_0xe578('0x1f')]=_0x4bc97c;if(_0x1f1305[_0xe578('0x35')][_0xe578('0x43')]){_0x882932[_0xe578('0x44')]=[{'all':!![]}];}return db[_0xe578('0x30')][_0xe578('0x45')](_0x882932);})[_0xe578('0x29')](function(_0x349368){_0x1955c0[_0xe578('0x46')]=_0x349368;return _0x1955c0;})['then'](respondWithFilteredResult(_0x7c32b4,_0x882932))['catch'](handleError(_0x7c32b4,null));};exports[_0xe578('0x47')]=function(_0x54bf27,_0x4e412b){var _0x5dda39={'raw':!![],'where':{'id':_0x54bf27[_0xe578('0x48')]['id']}},_0x3f3e76={};_0x3f3e76['model']=_['keys'](db[_0xe578('0x30')][_0xe578('0x31')]);_0x3f3e76[_0xe578('0x35')]=_[_0xe578('0x34')](_0x54bf27['query']);_0x3f3e76[_0xe578('0x36')]=_[_0xe578('0x39')](_0x3f3e76[_0xe578('0x37')],_0x3f3e76[_0xe578('0x35')]);_0x5dda39[_0xe578('0x38')]=_[_0xe578('0x39')](_0x3f3e76[_0xe578('0x37')],qs[_0xe578('0x3a')](_0x54bf27[_0xe578('0x35')][_0xe578('0x3a')]));_0x5dda39[_0xe578('0x38')]=_0x5dda39['attributes'][_0xe578('0x3b')]?_0x5dda39[_0xe578('0x38')]:_0x3f3e76[_0xe578('0x37')];if(_0x54bf27[_0xe578('0x35')][_0xe578('0x43')]){_0x5dda39[_0xe578('0x44')]=[{'all':!![]}];}_0x5dda39=_[_0xe578('0x41')]({},_0x5dda39,_0x54bf27[_0xe578('0x42')]);return db[_0xe578('0x30')][_0xe578('0x49')](_0x5dda39)['then'](handleEntityNotFound(_0x4e412b,null))[_0xe578('0x29')](respondWithResult(_0x4e412b,null))[_0xe578('0x4a')](handleError(_0x4e412b,null));};exports[_0xe578('0x4b')]=function(_0x151e98,_0x238d9b){return db[_0xe578('0x30')][_0xe578('0x4b')](_0x151e98[_0xe578('0x4c')],{})[_0xe578('0x29')](respondWithResult(_0x238d9b,0xc9))[_0xe578('0x4a')](handleError(_0x238d9b,null));};exports['update']=function(_0x2e0064,_0x21a176){if(_0x2e0064['body']['id']){delete _0x2e0064[_0xe578('0x4c')]['id'];}return db[_0xe578('0x30')]['find']({'where':{'id':_0x2e0064[_0xe578('0x48')]['id']}})[_0xe578('0x29')](handleEntityNotFound(_0x21a176,null))[_0xe578('0x29')](saveUpdates(_0x2e0064[_0xe578('0x4c')],null))[_0xe578('0x29')](respondWithResult(_0x21a176,null))['catch'](handleError(_0x21a176,null));};exports[_0xe578('0x28')]=function(_0x173b7c,_0x181797){return db[_0xe578('0x30')][_0xe578('0x49')]({'where':{'id':_0x173b7c[_0xe578('0x48')]['id']}})['then'](handleEntityNotFound(_0x181797,null))[_0xe578('0x29')](removeEntity(_0x181797,null))['catch'](handleError(_0x181797,null));}; \ No newline at end of file diff --git a/server/api/voiceQueuesLog/voiceQueuesLog.model.js b/server/api/voiceQueuesLog/voiceQueuesLog.model.js index d2cf1a1..dfb4363 100644 --- a/server/api/voiceQueuesLog/voiceQueuesLog.model.js +++ b/server/api/voiceQueuesLog/voiceQueuesLog.model.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x44f2=['bluebird','request-promise','path','rimraf','../../config/environment','./voiceQueuesLog.attributes','exports','define','VoiceQueuesLog','event_dtm','event','dtm','../../config/logger','api'];(function(_0x3caa2c,_0x36baf7){var _0x135627=function(_0x37bf08){while(--_0x37bf08){_0x3caa2c['push'](_0x3caa2c['shift']());}};_0x135627(++_0x36baf7);}(_0x44f2,0x1da));var _0x244f=function(_0x7fb279,_0x4e333a){_0x7fb279=_0x7fb279-0x0;var _0x4344de=_0x44f2[_0x7fb279];return _0x4344de;};'use strict';var _=require('lodash');var util=require('util');var logger=require(_0x244f('0x0'))(_0x244f('0x1'));var moment=require('moment');var BPromise=require(_0x244f('0x2'));var rp=require(_0x244f('0x3'));var fs=require('fs');var path=require(_0x244f('0x4'));var rimraf=require(_0x244f('0x5'));var config=require(_0x244f('0x6'));var attributes=require(_0x244f('0x7'));module[_0x244f('0x8')]=function(_0x21c055,_0x25d4a2){return _0x21c055[_0x244f('0x9')](_0x244f('0xa'),attributes,{'tableName':'voice_queues_log','paranoid':![],'indexes':[{'name':_0x244f('0xb'),'fields':[_0x244f('0xc'),_0x244f('0xd')]}],'timestamps':![]});}; \ No newline at end of file +var _0x58ea=['event_dtm','event','util','../../config/logger','api','moment','bluebird','request-promise','path','rimraf','../../config/environment','./voiceQueuesLog.attributes','exports','define','voice_queues_log'];(function(_0xf71725,_0x2bf8b4){var _0x10477f=function(_0x1ecabd){while(--_0x1ecabd){_0xf71725['push'](_0xf71725['shift']());}};_0x10477f(++_0x2bf8b4);}(_0x58ea,0xa7));var _0xa58e=function(_0x227578,_0x4b4e46){_0x227578=_0x227578-0x0;var _0x16e4ce=_0x58ea[_0x227578];return _0x16e4ce;};'use strict';var _=require('lodash');var util=require(_0xa58e('0x0'));var logger=require(_0xa58e('0x1'))(_0xa58e('0x2'));var moment=require(_0xa58e('0x3'));var BPromise=require(_0xa58e('0x4'));var rp=require(_0xa58e('0x5'));var fs=require('fs');var path=require(_0xa58e('0x6'));var rimraf=require(_0xa58e('0x7'));var config=require(_0xa58e('0x8'));var attributes=require(_0xa58e('0x9'));module[_0xa58e('0xa')]=function(_0x24249e,_0x1182a3){return _0x24249e[_0xa58e('0xb')]('VoiceQueuesLog',attributes,{'tableName':_0xa58e('0xc'),'paranoid':![],'indexes':[{'name':_0xa58e('0xd'),'fields':[_0xa58e('0xe'),'dtm']}],'timestamps':![]});}; \ No newline at end of file diff --git a/server/api/voiceQueuesLog/voiceQueuesLog.rpc.js b/server/api/voiceQueuesLog/voiceQueuesLog.rpc.js index f7f68cf..c0d6ba2 100644 --- a/server/api/voiceQueuesLog/voiceQueuesLog.rpc.js +++ b/server/api/voiceQueuesLog/voiceQueuesLog.rpc.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xbfef=['code','message','result','catch','lodash','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','jayson/promise','client','http','request','then','info','VoiceQueuesLog,\x20%s,\x20%s','request\x20sent','debug','VoiceQueuesLog,\x20%s,\x20%s,\x20%s','stringify','error'];(function(_0x5120ce,_0xba1732){var _0x2dc10a=function(_0xf9280d){while(--_0xf9280d){_0x5120ce['push'](_0x5120ce['shift']());}};_0x2dc10a(++_0xba1732);}(_0xbfef,0x1df));var _0xfbfe=function(_0x495332,_0x2f655d){_0x495332=_0x495332-0x0;var _0x2eae84=_0xbfef[_0x495332];return _0x2eae84;};'use strict';var _=require(_0xfbfe('0x0'));var util=require(_0xfbfe('0x1'));var moment=require(_0xfbfe('0x2'));var BPromise=require(_0xfbfe('0x3'));var rs=require(_0xfbfe('0x4'));var fs=require('fs');var Redis=require(_0xfbfe('0x5'));var db=require(_0xfbfe('0x6'))['db'];var utils=require(_0xfbfe('0x7'));var logger=require(_0xfbfe('0x8'))('rpc');var config=require('../../config/environment');var jayson=require(_0xfbfe('0x9'));var client=jayson[_0xfbfe('0xa')][_0xfbfe('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x1d747e,_0x489d5f,_0x2f9db4){return new BPromise(function(_0x23a647,_0x23033){return client[_0xfbfe('0xc')](_0x1d747e,_0x2f9db4)[_0xfbfe('0xd')](function(_0x11b642){logger[_0xfbfe('0xe')](_0xfbfe('0xf'),_0x489d5f,_0xfbfe('0x10'));logger[_0xfbfe('0x11')](_0xfbfe('0x12'),_0x489d5f,_0xfbfe('0x10'),JSON[_0xfbfe('0x13')](_0x11b642));if(_0x11b642[_0xfbfe('0x14')]){if(_0x11b642[_0xfbfe('0x14')][_0xfbfe('0x15')]===0x1f4){logger[_0xfbfe('0x14')](_0xfbfe('0xf'),_0x489d5f,_0x11b642[_0xfbfe('0x14')][_0xfbfe('0x16')]);return _0x23033(_0x11b642['error']['message']);}logger[_0xfbfe('0x14')]('VoiceQueuesLog,\x20%s,\x20%s',_0x489d5f,_0x11b642['error'][_0xfbfe('0x16')]);return _0x23a647(_0x11b642[_0xfbfe('0x14')][_0xfbfe('0x16')]);}else{logger[_0xfbfe('0xe')](_0xfbfe('0xf'),_0x489d5f,'request\x20sent');_0x23a647(_0x11b642[_0xfbfe('0x17')][_0xfbfe('0x16')]);}})[_0xfbfe('0x18')](function(_0x5a630e){logger[_0xfbfe('0x14')](_0xfbfe('0xf'),_0x489d5f,_0x5a630e);_0x23033(_0x5a630e);});});} \ No newline at end of file +var _0x4d71=['ioredis','../../mysqldb','../../config/utils','rpc','../../config/environment','jayson/promise','client','http','then','info','VoiceQueuesLog,\x20%s,\x20%s','request\x20sent','debug','VoiceQueuesLog,\x20%s,\x20%s,\x20%s','stringify','error','message','result','catch','lodash','moment','randomstring'];(function(_0x2a06fc,_0x25be89){var _0x2dac8f=function(_0x5c5e5c){while(--_0x5c5e5c){_0x2a06fc['push'](_0x2a06fc['shift']());}};_0x2dac8f(++_0x25be89);}(_0x4d71,0x6b));var _0x14d7=function(_0x48a335,_0x359b33){_0x48a335=_0x48a335-0x0;var _0xd83ca8=_0x4d71[_0x48a335];return _0xd83ca8;};'use strict';var _=require(_0x14d7('0x0'));var util=require('util');var moment=require(_0x14d7('0x1'));var BPromise=require('bluebird');var rs=require(_0x14d7('0x2'));var fs=require('fs');var Redis=require(_0x14d7('0x3'));var db=require(_0x14d7('0x4'))['db'];var utils=require(_0x14d7('0x5'));var logger=require('../../config/logger')(_0x14d7('0x6'));var config=require(_0x14d7('0x7'));var jayson=require(_0x14d7('0x8'));var client=jayson[_0x14d7('0x9')][_0x14d7('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x2ee6e6,_0x364142,_0x3e4efd){return new BPromise(function(_0x5a9294,_0x9c7dc5){return client['request'](_0x2ee6e6,_0x3e4efd)[_0x14d7('0xb')](function(_0x238619){logger[_0x14d7('0xc')](_0x14d7('0xd'),_0x364142,_0x14d7('0xe'));logger[_0x14d7('0xf')](_0x14d7('0x10'),_0x364142,_0x14d7('0xe'),JSON[_0x14d7('0x11')](_0x238619));if(_0x238619[_0x14d7('0x12')]){if(_0x238619[_0x14d7('0x12')]['code']===0x1f4){logger[_0x14d7('0x12')](_0x14d7('0xd'),_0x364142,_0x238619[_0x14d7('0x12')]['message']);return _0x9c7dc5(_0x238619[_0x14d7('0x12')][_0x14d7('0x13')]);}logger[_0x14d7('0x12')](_0x14d7('0xd'),_0x364142,_0x238619[_0x14d7('0x12')][_0x14d7('0x13')]);return _0x5a9294(_0x238619[_0x14d7('0x12')]['message']);}else{logger[_0x14d7('0xc')]('VoiceQueuesLog,\x20%s,\x20%s',_0x364142,_0x14d7('0xe'));_0x5a9294(_0x238619[_0x14d7('0x14')]['message']);}})[_0x14d7('0x15')](function(_0x3474b4){logger['error'](_0x14d7('0xd'),_0x364142,_0x3474b4);_0x9c7dc5(_0x3474b4);});});} \ No newline at end of file diff --git a/server/api/voiceRecording/index.js b/server/api/voiceRecording/index.js index 52dc637..3f13d97 100644 --- a/server/api/voiceRecording/index.js +++ b/server/api/voiceRecording/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xc23f=['destroy','multer','util','path','express','Router','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','get','isAuthenticated','index','describe','/:id','show','/:id/download','download','downloads','/:id/transcribe','downloadTranscribe','post','create','runTranscribe','put','delete'];(function(_0x491b6d,_0x4458ff){var _0x3902cf=function(_0x48c701){while(--_0x48c701){_0x491b6d['push'](_0x491b6d['shift']());}};_0x3902cf(++_0x4458ff);}(_0xc23f,0x187));var _0xfc23=function(_0x253b48,_0x2c066a){_0x253b48=_0x253b48-0x0;var _0x539fc4=_0xc23f[_0x253b48];return _0x539fc4;};'use strict';var multer=require(_0xfc23('0x0'));var util=require(_0xfc23('0x1'));var path=require(_0xfc23('0x2'));var timeout=require('connect-timeout');var express=require(_0xfc23('0x3'));var router=express[_0xfc23('0x4')]();var fs_extra=require(_0xfc23('0x5'));var auth=require(_0xfc23('0x6'));var interaction=require(_0xfc23('0x7'));var config=require(_0xfc23('0x8'));var controller=require('./voiceRecording.controller');router[_0xfc23('0x9')]('/',auth[_0xfc23('0xa')](),controller[_0xfc23('0xb')]);router[_0xfc23('0x9')]('/describe',auth[_0xfc23('0xa')](),controller[_0xfc23('0xc')]);router['get'](_0xfc23('0xd'),auth[_0xfc23('0xa')](),controller[_0xfc23('0xe')]);router[_0xfc23('0x9')](_0xfc23('0xf'),auth['isAuthenticated'](),controller[_0xfc23('0x10')]);router['get']('/:id/downloads',controller[_0xfc23('0x11')]);router[_0xfc23('0x9')](_0xfc23('0x12'),auth['isAuthenticated'](),controller[_0xfc23('0x13')]);router[_0xfc23('0x14')]('/',auth[_0xfc23('0xa')](),controller[_0xfc23('0x15')]);router['post'](_0xfc23('0x12'),auth[_0xfc23('0xa')](),controller[_0xfc23('0x16')]);router[_0xfc23('0x17')](_0xfc23('0xd'),auth[_0xfc23('0xa')](),controller['update']);router[_0xfc23('0x18')](_0xfc23('0xd'),auth['isAuthenticated'](),controller[_0xfc23('0x19')]);module['exports']=router; \ No newline at end of file +var _0x47cb=['express','Router','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','./voiceRecording.controller','get','index','isAuthenticated','describe','/:id','/:id/download','download','/:id/transcribe','downloadTranscribe','post','update','delete','destroy','exports','multer'];(function(_0x4ea17a,_0x4b9c83){var _0x58e65f=function(_0x46ad6d){while(--_0x46ad6d){_0x4ea17a['push'](_0x4ea17a['shift']());}};_0x58e65f(++_0x4b9c83);}(_0x47cb,0x107));var _0xb47c=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0x47cb[_0x3dd15e];return _0x231fd0;};'use strict';var multer=require(_0xb47c('0x0'));var util=require('util');var path=require('path');var timeout=require('connect-timeout');var express=require(_0xb47c('0x1'));var router=express[_0xb47c('0x2')]();var fs_extra=require(_0xb47c('0x3'));var auth=require(_0xb47c('0x4'));var interaction=require(_0xb47c('0x5'));var config=require(_0xb47c('0x6'));var controller=require(_0xb47c('0x7'));router[_0xb47c('0x8')]('/',auth['isAuthenticated'](),controller[_0xb47c('0x9')]);router[_0xb47c('0x8')]('/describe',auth[_0xb47c('0xa')](),controller[_0xb47c('0xb')]);router[_0xb47c('0x8')](_0xb47c('0xc'),auth['isAuthenticated'](),controller['show']);router['get'](_0xb47c('0xd'),auth[_0xb47c('0xa')](),controller[_0xb47c('0xe')]);router[_0xb47c('0x8')]('/:id/downloads',controller['downloads']);router[_0xb47c('0x8')](_0xb47c('0xf'),auth['isAuthenticated'](),controller[_0xb47c('0x10')]);router[_0xb47c('0x11')]('/',auth['isAuthenticated'](),controller['create']);router[_0xb47c('0x11')](_0xb47c('0xf'),auth[_0xb47c('0xa')](),controller['runTranscribe']);router['put'](_0xb47c('0xc'),auth['isAuthenticated'](),controller[_0xb47c('0x12')]);router[_0xb47c('0x13')](_0xb47c('0xc'),auth[_0xb47c('0xa')](),controller[_0xb47c('0x14')]);module[_0xb47c('0x15')]=router; \ No newline at end of file diff --git a/server/api/voiceRecording/voiceRecording.attributes.js b/server/api/voiceRecording/voiceRecording.attributes.js index c92beda..9593482 100644 --- a/server/api/voiceRecording/voiceRecording.attributes.js +++ b/server/api/voiceRecording/voiceRecording.attributes.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xa9e0=['DATE','updatedAt','toString','sequelize','moment','path','getDataValue','extname','value','STRING','setDataValue','channel','TEXT','NEW','FLOAT','BOOLEAN','format','MM-DD-YYYY\x20HH:mm'];(function(_0x173441,_0x26b0d9){var _0x2423a8=function(_0x4d96c2){while(--_0x4d96c2){_0x173441['push'](_0x173441['shift']());}};_0x2423a8(++_0x26b0d9);}(_0xa9e0,0x123));var _0x0a9e=function(_0x3a6efd,_0x2a5102){_0x3a6efd=_0x3a6efd-0x0;var _0x487b9a=_0xa9e0[_0x3a6efd];return _0x487b9a;};'use strict';var Sequelize=require(_0x0a9e('0x0'));var moment=require(_0x0a9e('0x1'));var path=require(_0x0a9e('0x2'));module['exports']={'format':{'type':Sequelize['VIRTUAL'],'get':function(){return this[_0x0a9e('0x3')]('value')?path[_0x0a9e('0x4')](this[_0x0a9e('0x3')](_0x0a9e('0x5'))):undefined;}},'uniqueid':{'type':Sequelize[_0x0a9e('0x6')]},'channel':{'type':Sequelize[_0x0a9e('0x6')],'set':function(_0x57b080){if(_0x57b080){this[_0x0a9e('0x7')](_0x0a9e('0x8'),_0x57b080);this[_0x0a9e('0x7')]('membername',_0x57b080['split'](/\/|-/)[0x1]);}}},'membername':{'type':Sequelize[_0x0a9e('0x6')]},'calleridnum':{'type':Sequelize['STRING']},'calleridname':{'type':Sequelize['STRING']},'connectedlinenum':{'type':Sequelize[_0x0a9e('0x6')]},'connectedlinename':{'type':Sequelize[_0x0a9e('0x6')]},'accountcode':{'type':Sequelize[_0x0a9e('0x6')]},'context':{'type':Sequelize[_0x0a9e('0x6')]},'exten':{'type':Sequelize[_0x0a9e('0x6')]},'value':{'type':Sequelize[_0x0a9e('0x6')]},'type':{'type':Sequelize['STRING']},'rating':{'type':Sequelize['INTEGER'],'validate':{'max':0x5,'min':0x0}},'queue':{'type':Sequelize['STRING']},'userDisposition':{'type':Sequelize['STRING']},'userSecondDisposition':{'type':Sequelize[_0x0a9e('0x6')]},'userThirdDisposition':{'type':Sequelize[_0x0a9e('0x6')]},'location':{'type':Sequelize[_0x0a9e('0x9')]},'transcribeName':{'type':Sequelize[_0x0a9e('0x6')]},'transcribeStatus':{'type':Sequelize[_0x0a9e('0x6')],'defaultValue':_0x0a9e('0xa')},'fileUri':{'type':Sequelize['TEXT']},'fileText':{'type':Sequelize[_0x0a9e('0x9')]},'failureReason':{'type':Sequelize[_0x0a9e('0x9')]},'sentiment':{'type':Sequelize[_0x0a9e('0x6')]},'sPositive':{'type':Sequelize[_0x0a9e('0xb')]},'sNegative':{'type':Sequelize[_0x0a9e('0xb')]},'sNeutral':{'type':Sequelize[_0x0a9e('0xb')]},'sMixed':{'type':Sequelize['FLOAT']},'tempSentiment':{'type':Sequelize[_0x0a9e('0xc')],'defaultValue':![]},'createdAt':{'type':Sequelize['DATE'],'get':function(){return moment(this[_0x0a9e('0x3')]('createdAt'))[_0x0a9e('0xd')](_0x0a9e('0xe'))['toString']();}},'updatedAt':{'type':Sequelize[_0x0a9e('0xf')],'get':function(){return moment(this['getDataValue'](_0x0a9e('0x10')))[_0x0a9e('0xd')](_0x0a9e('0xe'))[_0x0a9e('0x11')]();}}}; \ No newline at end of file +var _0xa9e0=['DATE','updatedAt','toString','sequelize','moment','path','getDataValue','extname','value','STRING','setDataValue','channel','TEXT','NEW','FLOAT','BOOLEAN','format','MM-DD-YYYY\x20HH:mm'];(function(_0x465028,_0x4570ac){var _0xb783d4=function(_0x5458c5){while(--_0x5458c5){_0x465028['push'](_0x465028['shift']());}};_0xb783d4(++_0x4570ac);}(_0xa9e0,0x123));var _0x0a9e=function(_0x30ae5e,_0x391fc4){_0x30ae5e=_0x30ae5e-0x0;var _0x1f2e93=_0xa9e0[_0x30ae5e];return _0x1f2e93;};'use strict';var Sequelize=require(_0x0a9e('0x0'));var moment=require(_0x0a9e('0x1'));var path=require(_0x0a9e('0x2'));module['exports']={'format':{'type':Sequelize['VIRTUAL'],'get':function(){return this[_0x0a9e('0x3')]('value')?path[_0x0a9e('0x4')](this[_0x0a9e('0x3')](_0x0a9e('0x5'))):undefined;}},'uniqueid':{'type':Sequelize[_0x0a9e('0x6')]},'channel':{'type':Sequelize[_0x0a9e('0x6')],'set':function(_0x57b080){if(_0x57b080){this[_0x0a9e('0x7')](_0x0a9e('0x8'),_0x57b080);this[_0x0a9e('0x7')]('membername',_0x57b080['split'](/\/|-/)[0x1]);}}},'membername':{'type':Sequelize[_0x0a9e('0x6')]},'calleridnum':{'type':Sequelize['STRING']},'calleridname':{'type':Sequelize['STRING']},'connectedlinenum':{'type':Sequelize[_0x0a9e('0x6')]},'connectedlinename':{'type':Sequelize[_0x0a9e('0x6')]},'accountcode':{'type':Sequelize[_0x0a9e('0x6')]},'context':{'type':Sequelize[_0x0a9e('0x6')]},'exten':{'type':Sequelize[_0x0a9e('0x6')]},'value':{'type':Sequelize[_0x0a9e('0x6')]},'type':{'type':Sequelize['STRING']},'rating':{'type':Sequelize['INTEGER'],'validate':{'max':0x5,'min':0x0}},'queue':{'type':Sequelize['STRING']},'userDisposition':{'type':Sequelize['STRING']},'userSecondDisposition':{'type':Sequelize[_0x0a9e('0x6')]},'userThirdDisposition':{'type':Sequelize[_0x0a9e('0x6')]},'location':{'type':Sequelize[_0x0a9e('0x9')]},'transcribeName':{'type':Sequelize[_0x0a9e('0x6')]},'transcribeStatus':{'type':Sequelize[_0x0a9e('0x6')],'defaultValue':_0x0a9e('0xa')},'fileUri':{'type':Sequelize['TEXT']},'fileText':{'type':Sequelize[_0x0a9e('0x9')]},'failureReason':{'type':Sequelize[_0x0a9e('0x9')]},'sentiment':{'type':Sequelize[_0x0a9e('0x6')]},'sPositive':{'type':Sequelize[_0x0a9e('0xb')]},'sNegative':{'type':Sequelize[_0x0a9e('0xb')]},'sNeutral':{'type':Sequelize[_0x0a9e('0xb')]},'sMixed':{'type':Sequelize['FLOAT']},'tempSentiment':{'type':Sequelize[_0x0a9e('0xc')],'defaultValue':![]},'createdAt':{'type':Sequelize['DATE'],'get':function(){return moment(this[_0x0a9e('0x3')]('createdAt'))[_0x0a9e('0xd')](_0x0a9e('0xe'))['toString']();}},'updatedAt':{'type':Sequelize[_0x0a9e('0xf')],'get':function(){return moment(this['getDataValue'](_0x0a9e('0x10')))[_0x0a9e('0xd')](_0x0a9e('0xe'))[_0x0a9e('0x11')]();}}}; \ No newline at end of file diff --git a/server/api/voiceRecording/voiceRecording.controller.js b/server/api/voiceRecording/voiceRecording.controller.js index b8ad61b..8fa1d6d 100644 --- a/server/api/voiceRecording/voiceRecording.controller.js +++ b/server/api/voiceRecording/voiceRecording.controller.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x52b3=['fields','attributes','length','hasOwnProperty','order','sort','where','filters','pick','filter','merge','options','VoiceRecording','includeAll','rows','catch','show','params','include','create','body','find','describe','download','../../components/encryptor','uniqueid','value','%s.cypher','decryptFile','secrets','existsSync','ValidationError','VoiceRecording\x20not\x20found','filename','extname','unlink','message','downloads','sequelize','MD5','col','token','$and','push','recording','Sequelize','isNil','Entity\x20not\x20found','info','cancellazione\x20fisica\x20documento\x20%s','File:\x20\x22','unlinkSync','\x22\x20trovato\x20eseguo\x20la\x20cancellazione','listBuckets','createBucket','TranscribeService','startTranscriptionJob','[RUNTRANSCRIPT][%d]\x20Starting\x20voice\x20recording\x20upload\x20in\x20bucket\x20%s','readFileSync','[RUNTRANSCRIPT][%d]\x20Voice\x20recording\x20uploaded\x20in\x20bucket\x20%s\x20(%s)','Location','bucket','Bucket','location','[RUNTRANSCRIPT][%d]\x20Transcription\x20job\x20%s\x20created','TranscriptionJob','transcribeName','transcribeStatus','TranscriptionJobStatus','runTranscribe','findOne','Voice\x20Recording\x20not\x20found','Setting','transcribe','transcribeAccountId','transcribeRegion','runSentiment','sentiment','sentimentAccountId','language','Sentiment\x20Analysis\x20not\x20configured','Cloud\x20Provider\x20not\x20available','data1','data2','Cloud\x20Provider\x20not\x20configured','Buckets','Name','[RUNTRANSCRIPT][%d]\x20Bucket\x20%s\x20not\x20available','NEW','[RUNTRANSCRIPT][%d]\x20Transcript\x20action\x20already\x20requested','tempSentiment','downloadTranscribe','fileText','root','/server/files/transcribes/transcribe_','Transcript\x20not\x20available','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','mustache','util','sox','to-csv','ejs','fs-extra','lodash','squel','crypto','jsforce','desk.js','querystring','papaparse','aws-sdk','uuid/v4','ioredis','../../components/parsers/qs','../../config/license/hardware','api','../../config/utils','../../config/license/util','../../mysqldb','sendStatus','status','end','json','offset','undefined','limit','count','Content-Range','apply','reject','update','destroy','then','error','stack','name','send','map','rawAttributes','fieldName','type','model','differenceBy','format','query','keys','intersection'];(function(_0x236e28,_0x3f3e73){var _0x279130=function(_0x52c20a){while(--_0x52c20a){_0x236e28['push'](_0x236e28['shift']());}};_0x279130(++_0x3f3e73);}(_0x52b3,0xf8));var _0x352b=function(_0x4d09b7,_0x13ea2f){_0x4d09b7=_0x4d09b7-0x0;var _0x4b8d00=_0x52b3[_0x4d09b7];return _0x4b8d00;};'use strict';var emlformat=require(_0x352b('0x0'));var rimraf=require(_0x352b('0x1'));var zipdir=require(_0x352b('0x2'));var jsonpatch=require(_0x352b('0x3'));var rp=require(_0x352b('0x4'));var moment=require(_0x352b('0x5'));var BPromise=require('bluebird');var Mustache=require(_0x352b('0x6'));var util=require(_0x352b('0x7'));var path=require('path');var sox=require(_0x352b('0x8'));var csv=require(_0x352b('0x9'));var ejs=require(_0x352b('0xa'));var fs=require('fs');var fs_extra=require(_0x352b('0xb'));var _=require(_0x352b('0xc'));var squel=require(_0x352b('0xd'));var crypto=require(_0x352b('0xe'));var jsforce=require(_0x352b('0xf'));var deskjs=require(_0x352b('0x10'));var toCsv=require(_0x352b('0x9'));var querystring=require(_0x352b('0x11'));var Papa=require(_0x352b('0x12'));var AWS=require(_0x352b('0x13'));var uuidv4=require(_0x352b('0x14'));var Redis=require(_0x352b('0x15'));var authService=require('../../components/auth/service');var qs=require(_0x352b('0x16'));var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0x352b('0x17'));var logger=require('../../config/logger')(_0x352b('0x18'));var utils=require(_0x352b('0x19'));var config=require('../../config/environment');var licenseUtil=require(_0x352b('0x1a'));var db=require(_0x352b('0x1b'))['db'];function respondWithStatusCode(_0x4530a1,_0x5d819e){_0x5d819e=_0x5d819e||0xcc;return function(_0x392038){if(_0x392038){return _0x4530a1[_0x352b('0x1c')](_0x5d819e);}return _0x4530a1[_0x352b('0x1d')](_0x5d819e)[_0x352b('0x1e')]();};}function respondWithResult(_0x50ed5c,_0x5590e9){_0x5590e9=_0x5590e9||0xc8;return function(_0x4a9c74){if(_0x4a9c74){return _0x50ed5c[_0x352b('0x1d')](_0x5590e9)[_0x352b('0x1f')](_0x4a9c74);}};}function respondWithFilteredResult(_0xb6622,_0x43fc9b){return function(_0x396cec){if(_0x396cec){var _0x54f6bd=typeof _0x43fc9b[_0x352b('0x20')]===_0x352b('0x21')&&typeof _0x43fc9b[_0x352b('0x22')]===_0x352b('0x21');var _0x4ea34d=_0x396cec['count'];var _0x568828=_0x54f6bd?0x0:_0x43fc9b[_0x352b('0x20')];var _0x1d7c00=_0x54f6bd?_0x396cec[_0x352b('0x23')]:_0x43fc9b[_0x352b('0x20')]+_0x43fc9b[_0x352b('0x22')];var _0x483f10;if(_0x1d7c00>=_0x4ea34d){_0x1d7c00=_0x4ea34d;_0x483f10=0xc8;}else{_0x483f10=0xce;}_0xb6622[_0x352b('0x1d')](_0x483f10);return _0xb6622['set'](_0x352b('0x24'),_0x568828+'-'+_0x1d7c00+'/'+_0x4ea34d)['json'](_0x396cec);}return null;};}function patchUpdates(_0x7f6fbe){return function(_0x31865f){try{jsonpatch[_0x352b('0x25')](_0x31865f,_0x7f6fbe,!![]);}catch(_0x5137b8){return BPromise[_0x352b('0x26')](_0x5137b8);}return _0x31865f['save']();};}function saveUpdates(_0x50b41b,_0x9df03a){return function(_0x4def49){if(_0x4def49){return _0x4def49[_0x352b('0x27')](_0x50b41b)['then'](function(_0x430986){return _0x430986;});}return null;};}function removeEntity(_0x3872dc,_0x101761){return function(_0x186773){if(_0x186773){return _0x186773[_0x352b('0x28')]()[_0x352b('0x29')](function(){_0x3872dc['status'](0xcc)[_0x352b('0x1e')]();});}};}function handleEntityNotFound(_0xb98b62,_0x4c516e){return function(_0x27d2c4){if(!_0x27d2c4){_0xb98b62['sendStatus'](0x194);}return _0x27d2c4;};}function handleError(_0x168624,_0x40dfcd){_0x40dfcd=_0x40dfcd||0x1f4;return function(_0x42fb7d){logger[_0x352b('0x2a')](_0x42fb7d[_0x352b('0x2b')]);if(_0x42fb7d[_0x352b('0x2c')]){delete _0x42fb7d[_0x352b('0x2c')];}_0x168624[_0x352b('0x1d')](_0x40dfcd)[_0x352b('0x2d')](_0x42fb7d);};}exports['index']=function(_0x5f3ecd,_0x5d9ed6){var _0x19685b={},_0x31fe94={},_0x25d64e={'count':0x0,'rows':[]};var _0x23f851=_[_0x352b('0x2e')](db['VoiceRecording'][_0x352b('0x2f')],function(_0x23980d){return{'name':_0x23980d[_0x352b('0x30')],'type':_0x23980d[_0x352b('0x31')]['key']};});_0x31fe94[_0x352b('0x32')]=_[_0x352b('0x33')](_[_0x352b('0x2e')](_0x23f851,_0x352b('0x2c')),[_0x352b('0x34')]);_0x31fe94[_0x352b('0x35')]=_[_0x352b('0x36')](_0x5f3ecd[_0x352b('0x35')]);_0x31fe94['filters']=_[_0x352b('0x37')](_0x31fe94[_0x352b('0x32')],_0x31fe94[_0x352b('0x35')]);_0x19685b['attributes']=_[_0x352b('0x37')](_0x31fe94[_0x352b('0x32')],qs[_0x352b('0x38')](_0x5f3ecd['query'][_0x352b('0x38')]));_0x19685b['attributes']=_0x19685b[_0x352b('0x39')][_0x352b('0x3a')]?_0x19685b[_0x352b('0x39')]:_0x31fe94[_0x352b('0x32')];if(!_0x5f3ecd[_0x352b('0x35')][_0x352b('0x3b')]('nolimit')){_0x19685b[_0x352b('0x22')]=qs[_0x352b('0x22')](_0x5f3ecd[_0x352b('0x35')][_0x352b('0x22')]);_0x19685b['offset']=qs[_0x352b('0x20')](_0x5f3ecd[_0x352b('0x35')][_0x352b('0x20')]);}_0x19685b[_0x352b('0x3c')]=qs[_0x352b('0x3d')](_0x5f3ecd[_0x352b('0x35')][_0x352b('0x3d')]);_0x19685b[_0x352b('0x3e')]=qs[_0x352b('0x3f')](_[_0x352b('0x40')](_0x5f3ecd[_0x352b('0x35')],_0x31fe94['filters']),_0x23f851);if(_0x5f3ecd[_0x352b('0x35')][_0x352b('0x41')]){_0x19685b[_0x352b('0x3e')]=_[_0x352b('0x42')](_0x19685b[_0x352b('0x3e')],{'$or':_['map'](_0x23f851,function(_0x2356cc){if(_0x2356cc[_0x352b('0x31')]!=='VIRTUAL'){var _0x11afe2={};_0x11afe2[_0x2356cc['name']]={'$like':'%'+_0x5f3ecd[_0x352b('0x35')][_0x352b('0x41')]+'%'};return _0x11afe2;}})});}_0x19685b=_[_0x352b('0x42')]({},_0x19685b,_0x5f3ecd[_0x352b('0x43')]);var _0x450f61={'where':_0x19685b[_0x352b('0x3e')]};return db[_0x352b('0x44')][_0x352b('0x23')](_0x450f61)[_0x352b('0x29')](function(_0x306e32){_0x25d64e['count']=_0x306e32;if(_0x5f3ecd[_0x352b('0x35')][_0x352b('0x45')]){_0x19685b['include']=[{'all':!![]}];}return db[_0x352b('0x44')]['findAll'](_0x19685b);})[_0x352b('0x29')](function(_0x3bf743){_0x25d64e[_0x352b('0x46')]=_0x3bf743;return _0x25d64e;})[_0x352b('0x29')](respondWithFilteredResult(_0x5d9ed6,_0x19685b))[_0x352b('0x47')](handleError(_0x5d9ed6,null));};exports[_0x352b('0x48')]=function(_0x4a87a5,_0x32fea2){var _0x291040={'raw':![],'where':{'id':_0x4a87a5[_0x352b('0x49')]['id']}},_0xb67d05={};_0xb67d05[_0x352b('0x32')]=_[_0x352b('0x36')](db['VoiceRecording'][_0x352b('0x2f')]);_0xb67d05[_0x352b('0x35')]=_[_0x352b('0x36')](_0x4a87a5['query']);_0xb67d05[_0x352b('0x3f')]=_[_0x352b('0x37')](_0xb67d05[_0x352b('0x32')],_0xb67d05[_0x352b('0x35')]);_0x291040[_0x352b('0x39')]=_[_0x352b('0x37')](_0xb67d05['model'],qs['fields'](_0x4a87a5[_0x352b('0x35')][_0x352b('0x38')]));_0x291040['attributes']=_0x291040[_0x352b('0x39')]['length']?_0x291040[_0x352b('0x39')]:_0xb67d05['model'];if(_0x4a87a5[_0x352b('0x35')][_0x352b('0x45')]){_0x291040[_0x352b('0x4a')]=[{'all':!![]}];}_0x291040=_['merge']({},_0x291040,_0x4a87a5[_0x352b('0x43')]);return db['VoiceRecording']['find'](_0x291040)[_0x352b('0x29')](handleEntityNotFound(_0x32fea2,null))[_0x352b('0x29')](respondWithResult(_0x32fea2,null))[_0x352b('0x47')](handleError(_0x32fea2,null));};exports[_0x352b('0x4b')]=function(_0x207a50,_0x480553){return db[_0x352b('0x44')]['create'](_0x207a50[_0x352b('0x4c')],{})['then'](respondWithResult(_0x480553,0xc9))[_0x352b('0x47')](handleError(_0x480553,null));};exports[_0x352b('0x27')]=function(_0x4d1b95,_0x27c546){if(_0x4d1b95[_0x352b('0x4c')]['id']){delete _0x4d1b95[_0x352b('0x4c')]['id'];}return db['VoiceRecording'][_0x352b('0x4d')]({'where':{'id':_0x4d1b95[_0x352b('0x49')]['id']}})[_0x352b('0x29')](handleEntityNotFound(_0x27c546,null))[_0x352b('0x29')](saveUpdates(_0x4d1b95[_0x352b('0x4c')],null))[_0x352b('0x29')](respondWithResult(_0x27c546,null))[_0x352b('0x47')](handleError(_0x27c546,null));};exports[_0x352b('0x4e')]=function(_0x382a44,_0x114a3d){return db[_0x352b('0x44')][_0x352b('0x4e')]()[_0x352b('0x29')](respondWithResult(_0x114a3d,null))[_0x352b('0x47')](handleError(_0x114a3d,null));};exports[_0x352b('0x4f')]=function(_0x505ba4,_0xf07a43,_0x3c235c){var _0x59a83e=require(_0x352b('0x50'));var _0x4db43a=![];var _0x13c30d={};if(_0x505ba4[_0x352b('0x35')]['type']&&_0x505ba4['query'][_0x352b('0x31')]===_0x352b('0x51')){_0x13c30d['uniqueid']=_0x505ba4['params']['id'];}else{_0x13c30d['id']=_0x505ba4[_0x352b('0x49')]['id'];}return db[_0x352b('0x44')][_0x352b('0x4d')]({'where':_0x13c30d,'attributes':['id',_0x352b('0x52')],'raw':!![]})['then'](handleEntityNotFound(_0xf07a43,null))[_0x352b('0x29')](function(_0x2f07da){if(_0x2f07da){var _0x4453be=_0x2f07da[_0x352b('0x52')];var _0x1ee67c=util[_0x352b('0x34')](_0x352b('0x53'),_0x4453be);if(fs['existsSync'](_0x1ee67c)){_0x4db43a=!![];return _0x59a83e[_0x352b('0x54')](_0x1ee67c,_0x4453be,config[_0x352b('0x55')]['recording'])[_0x352b('0x29')](function(){return _0x2f07da;});}return _0x2f07da;}})[_0x352b('0x29')](function(_0x4ed32a){if(_0x4ed32a){var _0x3f46c2=_0x4ed32a[_0x352b('0x52')];if(!fs[_0x352b('0x56')](_0x3f46c2)){throw new db['Sequelize'][(_0x352b('0x57'))](_0x352b('0x58'));}if(_0x4ed32a[_0x352b('0x59')]){return _0xf07a43['download'](_0x3f46c2,_0x4ed32a['filename']+path[_0x352b('0x5a')](_0x3f46c2),function(){if(_0x4db43a){fs[_0x352b('0x5b')](_0x3f46c2);}});}else{return _0xf07a43['download'](_0x3f46c2,function(_0x4fbf8e){if(_0x4db43a){fs['unlink'](_0x3f46c2);}});}}})['catch'](function(_0xe991fe){if(_0xe991fe[_0x352b('0x5c')]===_0x352b('0x58')){_0xf07a43[_0x352b('0x1d')](0x194)[_0x352b('0x2d')]('Not\x20found');}else{return handleError(_0xf07a43,null);}});};exports[_0x352b('0x5d')]=function(_0x590c3e,_0x2170aa,_0x194bfb){var _0x1f2384=require(_0x352b('0x50'));var _0x60d414=![];var _0x5c543f={'$and':[db['sequelize'][_0x352b('0x3e')](db[_0x352b('0x5e')]['fn'](_0x352b('0x5f'),db[_0x352b('0x5e')][_0x352b('0x60')](_0x352b('0x51'))),_0x590c3e[_0x352b('0x35')][_0x352b('0x61')])]};if(_0x590c3e[_0x352b('0x35')][_0x352b('0x31')]&&_0x590c3e[_0x352b('0x35')][_0x352b('0x31')]==='uniqueid'){_0x5c543f[_0x352b('0x62')][_0x352b('0x63')]({'uniqueid':_0x590c3e['params']['id']});}else{_0x5c543f[_0x352b('0x62')][_0x352b('0x63')]({'id':_0x590c3e[_0x352b('0x49')]['id']});}return db[_0x352b('0x44')][_0x352b('0x4d')]({'where':_0x5c543f,'attributes':['id',_0x352b('0x52')],'raw':!![]})[_0x352b('0x29')](handleEntityNotFound(_0x2170aa,null))[_0x352b('0x29')](function(_0x393d4b){if(_0x393d4b){var _0x4936c6=util[_0x352b('0x34')](_0x352b('0x53'),_0x393d4b[_0x352b('0x52')]);if(fs['existsSync'](_0x4936c6)){_0x60d414=!![];return _0x1f2384[_0x352b('0x54')](_0x4936c6,_0x393d4b[_0x352b('0x52')],config[_0x352b('0x55')][_0x352b('0x64')])['then'](function(){return _0x393d4b;});}return _0x393d4b;}})[_0x352b('0x29')](function(_0x533402){if(_0x533402){if(!fs[_0x352b('0x56')](_0x533402[_0x352b('0x52')])){throw new db[(_0x352b('0x65'))]['ValidationError']('VoiceRecording\x20not\x20found');}if(_0x533402[_0x352b('0x59')]){return _0x2170aa[_0x352b('0x4f')](_0x533402[_0x352b('0x52')],_0x533402[_0x352b('0x59')]+path['extname'](_0x533402[_0x352b('0x52')]),function(){if(_0x60d414){fs[_0x352b('0x5b')](_0x533402['value']);}});}else{return _0x2170aa[_0x352b('0x4f')](_0x533402[_0x352b('0x52')],function(_0x3a0db1){if(_0x60d414){fs['unlink'](_0x533402['value']);}});}}})['catch'](handleError(_0x2170aa,null));};exports[_0x352b('0x28')]=function(_0x43d6c5,_0x4e0a7c){return db[_0x352b('0x44')][_0x352b('0x4d')]({'where':{'id':_0x43d6c5[_0x352b('0x49')]['id']}})[_0x352b('0x29')](function(_0x3b67c9){if(_[_0x352b('0x66')](_0x3b67c9)){throw new ReferenceError(_0x352b('0x67'));}return _0x3b67c9;})[_0x352b('0x29')](function(_0x3f5337){var _0x39b418=_0x3f5337[_0x352b('0x52')];logger[_0x352b('0x68')](_0x352b('0x69'),_0x39b418);if(!_[_0x352b('0x66')](_0x3f5337[_0x352b('0x52')])&&fs[_0x352b('0x56')](_0x39b418)){logger[_0x352b('0x68')](_0x352b('0x6a')+_0x39b418+'\x22\x20trovato\x20eseguo\x20la\x20cancellazione');fs[_0x352b('0x6b')](_0x39b418);}_0x39b418=_0x39b418+'.cypher';if(!_[_0x352b('0x66')](_0x3f5337[_0x352b('0x52')])&&fs['existsSync'](_0x39b418)){logger[_0x352b('0x68')](_0x352b('0x6a')+_0x39b418+_0x352b('0x6c'));fs[_0x352b('0x6b')](_0x39b418);}return _0x3f5337;})[_0x352b('0x29')](function(_0x501ecf){if(!_0x501ecf)throw new InternalError();return _0x501ecf['destroy']();})[_0x352b('0x29')](function(){_0x4e0a7c[_0x352b('0x1d')](0xcc)[_0x352b('0x1e')]();})[_0x352b('0x47')](handleError(_0x4e0a7c,null));};function getBucketslist(_0x507646,_0x4afc30,_0x453edf){return new Promise(function(_0xb4cc74,_0xaf0e02){var _0xb2ba45=new AWS['S3']({'accessKeyId':_0x4afc30,'secretAccessKey':_0x507646,'region':_0x453edf});_0xb2ba45[_0x352b('0x6d')]({},function(_0x1ae18c,_0x2a7888){if(_0x1ae18c){return _0xaf0e02(_0x1ae18c);}else{return _0xb4cc74(_0x2a7888);}});});}function createBucket(_0x22ff04,_0x4ffae9,_0x424fac,_0x7c662a){return new Promise(function(_0x51b113,_0x2ce7b6){var _0xfd291b=new AWS['S3']({'accessKeyId':_0x4ffae9,'secretAccessKey':_0x22ff04,'region':_0x424fac});_0xfd291b[_0x352b('0x6e')]({'Bucket':_0x7c662a},function(_0x2c4508,_0x49ef43){if(_0x2c4508){return _0x2ce7b6(_0x2c4508);}else{return _0x51b113(_0x49ef43);}});});}function uploadFile(_0x186ba9,_0x3cac1e,_0x53f83c,_0x57a36e,_0x49fb3c,_0x48d91f){return new Promise(function(_0x513404,_0x1765ed){var _0x5650ad=new AWS['S3']({'accessKeyId':_0x3cac1e,'secretAccessKey':_0x186ba9,'region':_0x53f83c});_0x5650ad['upload']({'Bucket':_0x57a36e,'Key':_0x49fb3c,'Body':_0x48d91f},function(_0x39b8d,_0x476bba){if(_0x39b8d){return _0x1765ed(_0x39b8d);}else{return _0x513404(_0x476bba);}});});}function startTranscribe(_0xa2bf99,_0xafd6c2,_0x593f8b,_0x2f7129,_0x4497de,_0x55ff47){return new Promise(function(_0x4d2dd8,_0x216d10){var _0xe33ea1=new AWS[(_0x352b('0x6f'))]({'accessKeyId':_0xafd6c2,'secretAccessKey':_0xa2bf99,'region':_0x593f8b});_0xe33ea1[_0x352b('0x70')]({'TranscriptionJobName':_0x2f7129,'LanguageCode':_0x4497de,'Media':{'MediaFileUri':_0x55ff47}},function(_0x54446d,_0x3335e0){if(_0x54446d){return _0x216d10(_0x54446d);}else{return _0x4d2dd8(_0x3335e0);}});});}function transcribe(_0x2244db,_0x87285,_0x3f5e2d,_0x2dd658,_0x3d9621,_0x1531e4,_0x28f11f){return new Promise(function(_0x3fdc8c,_0x1dcdd0){var _0x47023c={};logger[_0x352b('0x68')](util[_0x352b('0x34')](_0x352b('0x71'),_0x2244db,_0x3d9621));return uploadFile(_0x87285,_0x3f5e2d,_0x2dd658,_0x3d9621,path['basename'](_0x1531e4),fs[_0x352b('0x72')](_0x1531e4))[_0x352b('0x29')](function(_0x25eb8d){logger[_0x352b('0x68')](util[_0x352b('0x34')](_0x352b('0x73'),_0x2244db,_0x3d9621,_0x25eb8d[_0x352b('0x74')]));_0x47023c[_0x352b('0x75')]=_0x25eb8d[_0x352b('0x76')];_0x47023c[_0x352b('0x77')]=_0x25eb8d[_0x352b('0x74')];logger[_0x352b('0x68')](util[_0x352b('0x34')]('[RUNTRANSCRIPT][%d]\x20Sending\x20transcribe\x20request',_0x2244db));return startTranscribe(_0x87285,_0x3f5e2d,_0x2dd658,uuidv4(),_0x28f11f,_0x25eb8d[_0x352b('0x74')]);})[_0x352b('0x29')](function(_0x2c1ca6){logger[_0x352b('0x68')](util[_0x352b('0x34')](_0x352b('0x78'),_0x2244db,_0x2c1ca6[_0x352b('0x79')]['TranscriptionJobName']));_0x47023c[_0x352b('0x7a')]=_0x2c1ca6[_0x352b('0x79')]['TranscriptionJobName'];_0x47023c[_0x352b('0x7b')]=_0x2c1ca6['TranscriptionJob'][_0x352b('0x7c')];return _0x3fdc8c(_0x47023c);})[_0x352b('0x47')](function(_0x1fb78d){return _0x1dcdd0(_0x1fb78d);});});}exports[_0x352b('0x7d')]=function(_0x596c95,_0x148171,_0x384592){var _0x1b00c1;var _0x222782;var _0x478687;var _0x213fb7=require(_0x352b('0x50'));return db['VoiceRecording'][_0x352b('0x7e')]({'where':{'id':_0x596c95[_0x352b('0x49')]['id']}})[_0x352b('0x29')](function(_0x3ccd42){if(_0x3ccd42){var _0x41709f=util[_0x352b('0x34')](_0x352b('0x53'),_0x3ccd42['value']);if(fs[_0x352b('0x56')](_0x41709f)){cypher=!![];return _0x213fb7[_0x352b('0x54')](_0x41709f,_0x3ccd42[_0x352b('0x52')],config[_0x352b('0x55')]['recording'])[_0x352b('0x29')](function(){return _0x3ccd42;});}return _0x3ccd42;}})[_0x352b('0x29')](function(_0x34ef2c){if(!_0x34ef2c){throw new db[(_0x352b('0x65'))][(_0x352b('0x57'))](_0x352b('0x7f'));}_0x222782=_0x34ef2c;return db[_0x352b('0x80')][_0x352b('0x7e')]({'where':{'id':0x1}});})[_0x352b('0x29')](handleEntityNotFound(_0x148171,null))[_0x352b('0x29')](function(_0x11c9cf){if(_0x11c9cf){_0x1b00c1=_0x11c9cf;if(!_0x1b00c1[_0x352b('0x81')]||!_0x1b00c1[_0x352b('0x82')]||!_0x1b00c1[_0x352b('0x83')]||!_0x1b00c1['language']||!_0x1b00c1[_0x352b('0x75')]){throw new db[(_0x352b('0x65'))][(_0x352b('0x57'))]('Transcribe\x20not\x20configured');}if(_0x596c95[_0x352b('0x4c')][_0x352b('0x84')]&&(!_0x1b00c1[_0x352b('0x85')]||!_0x1b00c1[_0x352b('0x86')]||!_0x1b00c1['sentimentRegion']||!_0x1b00c1[_0x352b('0x87')]||!_0x1b00c1[_0x352b('0x75')])){throw new db[(_0x352b('0x65'))][(_0x352b('0x57'))](_0x352b('0x88'));}return db['CloudProvider']['findOne']({'where':{'id':_0x1b00c1[_0x352b('0x82')]}});}})[_0x352b('0x29')](function(_0x1b5ac2){if(!_0x1b5ac2){throw new db[(_0x352b('0x65'))][(_0x352b('0x57'))](_0x352b('0x89'));}if(!_0x1b5ac2[_0x352b('0x8a')]||!_0x1b5ac2[_0x352b('0x8b')]){throw new db[(_0x352b('0x65'))][(_0x352b('0x57'))](_0x352b('0x8c'));}_0x478687=_0x1b5ac2;return getBucketslist(_0x478687[_0x352b('0x8a')],_0x478687['data2'],_0x1b00c1[_0x352b('0x83')]);})[_0x352b('0x29')](function(_0x511fda){if(_0x511fda&&_0x511fda[_0x352b('0x8d')]){var _0x8c7891=_[_0x352b('0x4d')](_0x511fda[_0x352b('0x8d')],function(_0x5af6f5){return _0x5af6f5[_0x352b('0x8e')]===_0x1b00c1[_0x352b('0x75')];});if(!_0x8c7891){logger[_0x352b('0x68')](util[_0x352b('0x34')](_0x352b('0x8f'),_0x596c95['params']['id'],_0x1b00c1[_0x352b('0x75')]));return createBucket(_0x478687[_0x352b('0x8a')],_0x478687[_0x352b('0x8b')],_0x1b00c1['transcribeRegion'],_0x1b00c1[_0x352b('0x75')]);}logger['info'](util[_0x352b('0x34')]('[RUNTRANSCRIPT][%d]\x20Bucket\x20%s\x20available',_0x596c95[_0x352b('0x49')]['id'],_0x1b00c1[_0x352b('0x75')]));return;}})[_0x352b('0x29')](function(_0x2b31bf){if(_0x222782[_0x352b('0x7b')]===_0x352b('0x90')){return transcribe(_0x596c95[_0x352b('0x49')]['id'],_0x478687[_0x352b('0x8a')],_0x478687['data2'],_0x1b00c1[_0x352b('0x83')],_0x1b00c1[_0x352b('0x75')],_0x222782[_0x352b('0x52')],_0x1b00c1[_0x352b('0x87')]);}else{logger[_0x352b('0x68')](util[_0x352b('0x34')](_0x352b('0x91'),_0x596c95[_0x352b('0x49')]['id']));return{'transcribeStatus':'IN_PROGRESS'};}})[_0x352b('0x29')](function(_0x53b6ee){if(_0x53b6ee){_0x53b6ee[_0x352b('0x92')]=_0x596c95[_0x352b('0x4c')][_0x352b('0x84')];return _0x222782['updateAttributes'](_0x53b6ee);}})['then'](respondWithResult(_0x148171,null))[_0x352b('0x47')](handleError(_0x148171,null));};function writeFile(_0x1ca56f,_0x5d6e62){return new Promise(function(_0x31eb56,_0x53eefd){fs['writeFile'](_0x5d6e62,_0x1ca56f,function(_0x48cc21,_0x20551b){if(_0x48cc21){return _0x53eefd(_0x48cc21);}else{return _0x31eb56(_0x20551b);}});});}exports[_0x352b('0x93')]=function(_0x384b6c,_0x314ecc,_0x4b54cc){return db[_0x352b('0x44')][_0x352b('0x7e')]({'where':{'id':_0x384b6c[_0x352b('0x49')]['id']}})[_0x352b('0x29')](handleEntityNotFound(_0x314ecc))[_0x352b('0x29')](function(_0x3e0216){if(_0x3e0216&&_0x3e0216[_0x352b('0x94')]){var _0x4b639c=_0x3e0216['fileText'];var _0x2d3103=config[_0x352b('0x95')]+_0x352b('0x96')+_0x3e0216['id']+'.txt';if(fs[_0x352b('0x56')](_0x2d3103)){return _0x2d3103;}return writeFile(_0x4b639c,_0x2d3103)[_0x352b('0x29')](function(){return _0x2d3103;});}else{throw new db[(_0x352b('0x65'))][(_0x352b('0x57'))](_0x352b('0x97'));}})[_0x352b('0x29')](function(_0x2b9f24){return _0x314ecc[_0x352b('0x4f')](_0x2b9f24);})[_0x352b('0x47')](handleError(_0x314ecc));}; \ No newline at end of file +var _0xb9fc=['findOne','Setting','transcribe','transcribeAccountId','transcribeRegion','bucket','runSentiment','sentiment','sentimentAccountId','sentimentRegion','Sentiment\x20Analysis\x20not\x20configured','CloudProvider','Cloud\x20Provider\x20not\x20available','data1','data2','Cloud\x20Provider\x20not\x20configured','Name','[RUNTRANSCRIPT][%d]\x20Bucket\x20%s\x20not\x20available','[RUNTRANSCRIPT][%d]\x20Bucket\x20%s\x20available','transcribeStatus','NEW','language','[RUNTRANSCRIPT][%d]\x20Transcript\x20action\x20already\x20requested','IN_PROGRESS','updateAttributes','writeFile','downloadTranscribe','fileText','/server/files/transcribes/transcribe_','.txt','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','util','to-csv','ejs','fs-extra','lodash','squel','crypto','jsforce','desk.js','querystring','uuid/v4','ioredis','../../components/auth/service','api','../../config/environment','../../config/license/util','../../mysqldb','sendStatus','end','status','json','offset','undefined','count','limit','Content-Range','apply','save','update','then','destroy','stack','name','index','map','VoiceRecording','fieldName','type','key','model','differenceBy','format','query','keys','filters','intersection','attributes','fields','hasOwnProperty','sort','where','pick','merge','VIRTUAL','filter','options','includeAll','include','catch','show','params','rawAttributes','length','find','create','body','describe','download','uniqueid','value','%s.cypher','existsSync','decryptFile','secrets','recording','Sequelize','ValidationError','filename','unlink','VoiceRecording\x20not\x20found','send','Not\x20found','downloads','../../components/encryptor','sequelize','MD5','token','$and','push','isNil','info','cancellazione\x20fisica\x20documento\x20%s','\x22\x20trovato\x20eseguo\x20la\x20cancellazione','.cypher','File:\x20\x22','listBuckets','upload','startTranscriptionJob','readFileSync','[RUNTRANSCRIPT][%d]\x20Voice\x20recording\x20uploaded\x20in\x20bucket\x20%s\x20(%s)','Location','TranscriptionJob','transcribeName','TranscriptionJobName','TranscriptionJobStatus','runTranscribe'];(function(_0x307086,_0x3bfe4e){var _0x699043=function(_0x1a7677){while(--_0x1a7677){_0x307086['push'](_0x307086['shift']());}};_0x699043(++_0x3bfe4e);}(_0xb9fc,0x1cb));var _0xcb9f=function(_0x4c6c70,_0x35f5c4){_0x4c6c70=_0x4c6c70-0x0;var _0x1ad010=_0xb9fc[_0x4c6c70];return _0x1ad010;};'use strict';var emlformat=require(_0xcb9f('0x0'));var rimraf=require(_0xcb9f('0x1'));var zipdir=require(_0xcb9f('0x2'));var jsonpatch=require(_0xcb9f('0x3'));var rp=require(_0xcb9f('0x4'));var moment=require(_0xcb9f('0x5'));var BPromise=require(_0xcb9f('0x6'));var Mustache=require('mustache');var util=require(_0xcb9f('0x7'));var path=require('path');var sox=require('sox');var csv=require(_0xcb9f('0x8'));var ejs=require(_0xcb9f('0x9'));var fs=require('fs');var fs_extra=require(_0xcb9f('0xa'));var _=require(_0xcb9f('0xb'));var squel=require(_0xcb9f('0xc'));var crypto=require(_0xcb9f('0xd'));var jsforce=require(_0xcb9f('0xe'));var deskjs=require(_0xcb9f('0xf'));var toCsv=require(_0xcb9f('0x8'));var querystring=require(_0xcb9f('0x10'));var Papa=require('papaparse');var AWS=require('aws-sdk');var uuidv4=require(_0xcb9f('0x11'));var Redis=require(_0xcb9f('0x12'));var authService=require(_0xcb9f('0x13'));var qs=require('../../components/parsers/qs');var as=require('../../components/parsers/advancedSearch');var hardwareService=require('../../config/license/hardware');var logger=require('../../config/logger')(_0xcb9f('0x14'));var utils=require('../../config/utils');var config=require(_0xcb9f('0x15'));var licenseUtil=require(_0xcb9f('0x16'));var db=require(_0xcb9f('0x17'))['db'];function respondWithStatusCode(_0x538d61,_0x336e75){_0x336e75=_0x336e75||0xcc;return function(_0x34db9c){if(_0x34db9c){return _0x538d61[_0xcb9f('0x18')](_0x336e75);}return _0x538d61['status'](_0x336e75)[_0xcb9f('0x19')]();};}function respondWithResult(_0x519ceb,_0x31370f){_0x31370f=_0x31370f||0xc8;return function(_0xdd1348){if(_0xdd1348){return _0x519ceb[_0xcb9f('0x1a')](_0x31370f)[_0xcb9f('0x1b')](_0xdd1348);}};}function respondWithFilteredResult(_0x145761,_0x4bbfae){return function(_0x1e6bf9){if(_0x1e6bf9){var _0x30059f=typeof _0x4bbfae[_0xcb9f('0x1c')]===_0xcb9f('0x1d')&&typeof _0x4bbfae['limit']===_0xcb9f('0x1d');var _0x52f80f=_0x1e6bf9[_0xcb9f('0x1e')];var _0x54ef56=_0x30059f?0x0:_0x4bbfae['offset'];var _0xa22ac5=_0x30059f?_0x1e6bf9['count']:_0x4bbfae[_0xcb9f('0x1c')]+_0x4bbfae[_0xcb9f('0x1f')];var _0x59f6b7;if(_0xa22ac5>=_0x52f80f){_0xa22ac5=_0x52f80f;_0x59f6b7=0xc8;}else{_0x59f6b7=0xce;}_0x145761[_0xcb9f('0x1a')](_0x59f6b7);return _0x145761['set'](_0xcb9f('0x20'),_0x54ef56+'-'+_0xa22ac5+'/'+_0x52f80f)[_0xcb9f('0x1b')](_0x1e6bf9);}return null;};}function patchUpdates(_0x20963d){return function(_0x9ffe81){try{jsonpatch[_0xcb9f('0x21')](_0x9ffe81,_0x20963d,!![]);}catch(_0x1a808c){return BPromise['reject'](_0x1a808c);}return _0x9ffe81[_0xcb9f('0x22')]();};}function saveUpdates(_0x136fab,_0x2332e0){return function(_0x15dc53){if(_0x15dc53){return _0x15dc53[_0xcb9f('0x23')](_0x136fab)[_0xcb9f('0x24')](function(_0x151504){return _0x151504;});}return null;};}function removeEntity(_0x5c6096,_0x111784){return function(_0x955aa0){if(_0x955aa0){return _0x955aa0[_0xcb9f('0x25')]()[_0xcb9f('0x24')](function(){_0x5c6096[_0xcb9f('0x1a')](0xcc)[_0xcb9f('0x19')]();});}};}function handleEntityNotFound(_0x511c32,_0x4e59a5){return function(_0x144d02){if(!_0x144d02){_0x511c32[_0xcb9f('0x18')](0x194);}return _0x144d02;};}function handleError(_0x507967,_0x155c26){_0x155c26=_0x155c26||0x1f4;return function(_0xf186d){logger['error'](_0xf186d[_0xcb9f('0x26')]);if(_0xf186d[_0xcb9f('0x27')]){delete _0xf186d[_0xcb9f('0x27')];}_0x507967[_0xcb9f('0x1a')](_0x155c26)['send'](_0xf186d);};}exports[_0xcb9f('0x28')]=function(_0x2a1b2b,_0x291f3c){var _0x7df42f={},_0xaaf19e={},_0x362d05={'count':0x0,'rows':[]};var _0x3fc772=_[_0xcb9f('0x29')](db[_0xcb9f('0x2a')]['rawAttributes'],function(_0x1874d0){return{'name':_0x1874d0[_0xcb9f('0x2b')],'type':_0x1874d0[_0xcb9f('0x2c')][_0xcb9f('0x2d')]};});_0xaaf19e[_0xcb9f('0x2e')]=_[_0xcb9f('0x2f')](_[_0xcb9f('0x29')](_0x3fc772,_0xcb9f('0x27')),[_0xcb9f('0x30')]);_0xaaf19e[_0xcb9f('0x31')]=_[_0xcb9f('0x32')](_0x2a1b2b[_0xcb9f('0x31')]);_0xaaf19e[_0xcb9f('0x33')]=_[_0xcb9f('0x34')](_0xaaf19e[_0xcb9f('0x2e')],_0xaaf19e['query']);_0x7df42f[_0xcb9f('0x35')]=_[_0xcb9f('0x34')](_0xaaf19e[_0xcb9f('0x2e')],qs[_0xcb9f('0x36')](_0x2a1b2b[_0xcb9f('0x31')][_0xcb9f('0x36')]));_0x7df42f['attributes']=_0x7df42f[_0xcb9f('0x35')]['length']?_0x7df42f[_0xcb9f('0x35')]:_0xaaf19e['model'];if(!_0x2a1b2b[_0xcb9f('0x31')][_0xcb9f('0x37')]('nolimit')){_0x7df42f[_0xcb9f('0x1f')]=qs[_0xcb9f('0x1f')](_0x2a1b2b[_0xcb9f('0x31')][_0xcb9f('0x1f')]);_0x7df42f[_0xcb9f('0x1c')]=qs[_0xcb9f('0x1c')](_0x2a1b2b[_0xcb9f('0x31')]['offset']);}_0x7df42f['order']=qs[_0xcb9f('0x38')](_0x2a1b2b['query'][_0xcb9f('0x38')]);_0x7df42f[_0xcb9f('0x39')]=qs['filters'](_[_0xcb9f('0x3a')](_0x2a1b2b[_0xcb9f('0x31')],_0xaaf19e[_0xcb9f('0x33')]),_0x3fc772);if(_0x2a1b2b[_0xcb9f('0x31')]['filter']){_0x7df42f['where']=_[_0xcb9f('0x3b')](_0x7df42f['where'],{'$or':_[_0xcb9f('0x29')](_0x3fc772,function(_0x550e4e){if(_0x550e4e[_0xcb9f('0x2c')]!==_0xcb9f('0x3c')){var _0x5d5eff={};_0x5d5eff[_0x550e4e['name']]={'$like':'%'+_0x2a1b2b[_0xcb9f('0x31')][_0xcb9f('0x3d')]+'%'};return _0x5d5eff;}})});}_0x7df42f=_[_0xcb9f('0x3b')]({},_0x7df42f,_0x2a1b2b[_0xcb9f('0x3e')]);var _0x112c2d={'where':_0x7df42f['where']};return db[_0xcb9f('0x2a')]['count'](_0x112c2d)['then'](function(_0x237b06){_0x362d05[_0xcb9f('0x1e')]=_0x237b06;if(_0x2a1b2b[_0xcb9f('0x31')][_0xcb9f('0x3f')]){_0x7df42f[_0xcb9f('0x40')]=[{'all':!![]}];}return db[_0xcb9f('0x2a')]['findAll'](_0x7df42f);})[_0xcb9f('0x24')](function(_0x4a8b0d){_0x362d05['rows']=_0x4a8b0d;return _0x362d05;})[_0xcb9f('0x24')](respondWithFilteredResult(_0x291f3c,_0x7df42f))[_0xcb9f('0x41')](handleError(_0x291f3c,null));};exports[_0xcb9f('0x42')]=function(_0x4daa21,_0x28df35){var _0xc83a93={'raw':![],'where':{'id':_0x4daa21[_0xcb9f('0x43')]['id']}},_0x203ce3={};_0x203ce3[_0xcb9f('0x2e')]=_[_0xcb9f('0x32')](db[_0xcb9f('0x2a')][_0xcb9f('0x44')]);_0x203ce3[_0xcb9f('0x31')]=_[_0xcb9f('0x32')](_0x4daa21['query']);_0x203ce3[_0xcb9f('0x33')]=_[_0xcb9f('0x34')](_0x203ce3['model'],_0x203ce3['query']);_0xc83a93[_0xcb9f('0x35')]=_['intersection'](_0x203ce3['model'],qs['fields'](_0x4daa21['query'][_0xcb9f('0x36')]));_0xc83a93['attributes']=_0xc83a93[_0xcb9f('0x35')][_0xcb9f('0x45')]?_0xc83a93[_0xcb9f('0x35')]:_0x203ce3[_0xcb9f('0x2e')];if(_0x4daa21[_0xcb9f('0x31')][_0xcb9f('0x3f')]){_0xc83a93[_0xcb9f('0x40')]=[{'all':!![]}];}_0xc83a93=_['merge']({},_0xc83a93,_0x4daa21[_0xcb9f('0x3e')]);return db[_0xcb9f('0x2a')][_0xcb9f('0x46')](_0xc83a93)[_0xcb9f('0x24')](handleEntityNotFound(_0x28df35,null))['then'](respondWithResult(_0x28df35,null))[_0xcb9f('0x41')](handleError(_0x28df35,null));};exports[_0xcb9f('0x47')]=function(_0x1ad352,_0x4d7332){return db[_0xcb9f('0x2a')][_0xcb9f('0x47')](_0x1ad352['body'],{})[_0xcb9f('0x24')](respondWithResult(_0x4d7332,0xc9))['catch'](handleError(_0x4d7332,null));};exports[_0xcb9f('0x23')]=function(_0x195d5c,_0x47acf6){if(_0x195d5c[_0xcb9f('0x48')]['id']){delete _0x195d5c['body']['id'];}return db['VoiceRecording']['find']({'where':{'id':_0x195d5c[_0xcb9f('0x43')]['id']}})[_0xcb9f('0x24')](handleEntityNotFound(_0x47acf6,null))['then'](saveUpdates(_0x195d5c[_0xcb9f('0x48')],null))[_0xcb9f('0x24')](respondWithResult(_0x47acf6,null))[_0xcb9f('0x41')](handleError(_0x47acf6,null));};exports[_0xcb9f('0x49')]=function(_0x529d5d,_0x2001f4){return db['VoiceRecording'][_0xcb9f('0x49')]()[_0xcb9f('0x24')](respondWithResult(_0x2001f4,null))[_0xcb9f('0x41')](handleError(_0x2001f4,null));};exports[_0xcb9f('0x4a')]=function(_0x52474d,_0x286d57,_0x318611){var _0x3147e5=require('../../components/encryptor');var _0x4d39c6=![];var _0x20d029={};if(_0x52474d[_0xcb9f('0x31')]['type']&&_0x52474d[_0xcb9f('0x31')][_0xcb9f('0x2c')]==='uniqueid'){_0x20d029[_0xcb9f('0x4b')]=_0x52474d[_0xcb9f('0x43')]['id'];}else{_0x20d029['id']=_0x52474d[_0xcb9f('0x43')]['id'];}return db[_0xcb9f('0x2a')]['find']({'where':_0x20d029,'attributes':['id',_0xcb9f('0x4c')],'raw':!![]})['then'](handleEntityNotFound(_0x286d57,null))['then'](function(_0x2c2b7b){if(_0x2c2b7b){var _0x569b3c=_0x2c2b7b[_0xcb9f('0x4c')];var _0xd6d0f1=util['format'](_0xcb9f('0x4d'),_0x569b3c);if(fs[_0xcb9f('0x4e')](_0xd6d0f1)){_0x4d39c6=!![];return _0x3147e5[_0xcb9f('0x4f')](_0xd6d0f1,_0x569b3c,config[_0xcb9f('0x50')][_0xcb9f('0x51')])['then'](function(){return _0x2c2b7b;});}return _0x2c2b7b;}})['then'](function(_0x3762a5){if(_0x3762a5){var _0x3f3db2=_0x3762a5[_0xcb9f('0x4c')];if(!fs[_0xcb9f('0x4e')](_0x3f3db2)){throw new db[(_0xcb9f('0x52'))][(_0xcb9f('0x53'))]('VoiceRecording\x20not\x20found');}if(_0x3762a5[_0xcb9f('0x54')]){return _0x286d57[_0xcb9f('0x4a')](_0x3f3db2,_0x3762a5[_0xcb9f('0x54')]+path['extname'](_0x3f3db2),function(){if(_0x4d39c6){fs[_0xcb9f('0x55')](_0x3f3db2);}});}else{return _0x286d57[_0xcb9f('0x4a')](_0x3f3db2,function(_0x3b89c4){if(_0x4d39c6){fs[_0xcb9f('0x55')](_0x3f3db2);}});}}})[_0xcb9f('0x41')](function(_0x569fe3){if(_0x569fe3['message']===_0xcb9f('0x56')){_0x286d57[_0xcb9f('0x1a')](0x194)[_0xcb9f('0x57')](_0xcb9f('0x58'));}else{return handleError(_0x286d57,null);}});};exports[_0xcb9f('0x59')]=function(_0x9cbaa4,_0x560587,_0x44f921){var _0x597924=require(_0xcb9f('0x5a'));var _0x377ed0=![];var _0x2d1429={'$and':[db[_0xcb9f('0x5b')][_0xcb9f('0x39')](db[_0xcb9f('0x5b')]['fn'](_0xcb9f('0x5c'),db[_0xcb9f('0x5b')]['col'](_0xcb9f('0x4b'))),_0x9cbaa4[_0xcb9f('0x31')][_0xcb9f('0x5d')])]};if(_0x9cbaa4['query'][_0xcb9f('0x2c')]&&_0x9cbaa4[_0xcb9f('0x31')][_0xcb9f('0x2c')]==='uniqueid'){_0x2d1429[_0xcb9f('0x5e')][_0xcb9f('0x5f')]({'uniqueid':_0x9cbaa4[_0xcb9f('0x43')]['id']});}else{_0x2d1429[_0xcb9f('0x5e')][_0xcb9f('0x5f')]({'id':_0x9cbaa4['params']['id']});}return db['VoiceRecording'][_0xcb9f('0x46')]({'where':_0x2d1429,'attributes':['id',_0xcb9f('0x4c')],'raw':!![]})['then'](handleEntityNotFound(_0x560587,null))[_0xcb9f('0x24')](function(_0xcc7a6b){if(_0xcc7a6b){var _0x1032be=util[_0xcb9f('0x30')](_0xcb9f('0x4d'),_0xcc7a6b[_0xcb9f('0x4c')]);if(fs[_0xcb9f('0x4e')](_0x1032be)){_0x377ed0=!![];return _0x597924['decryptFile'](_0x1032be,_0xcc7a6b[_0xcb9f('0x4c')],config['secrets'][_0xcb9f('0x51')])[_0xcb9f('0x24')](function(){return _0xcc7a6b;});}return _0xcc7a6b;}})['then'](function(_0x4fffe0){if(_0x4fffe0){if(!fs[_0xcb9f('0x4e')](_0x4fffe0['value'])){throw new db[(_0xcb9f('0x52'))]['ValidationError']('VoiceRecording\x20not\x20found');}if(_0x4fffe0[_0xcb9f('0x54')]){return _0x560587['download'](_0x4fffe0['value'],_0x4fffe0[_0xcb9f('0x54')]+path['extname'](_0x4fffe0[_0xcb9f('0x4c')]),function(){if(_0x377ed0){fs[_0xcb9f('0x55')](_0x4fffe0[_0xcb9f('0x4c')]);}});}else{return _0x560587['download'](_0x4fffe0[_0xcb9f('0x4c')],function(_0x293159){if(_0x377ed0){fs['unlink'](_0x4fffe0[_0xcb9f('0x4c')]);}});}}})['catch'](handleError(_0x560587,null));};exports[_0xcb9f('0x25')]=function(_0x393233,_0x4e1bfb){return db[_0xcb9f('0x2a')]['find']({'where':{'id':_0x393233['params']['id']}})[_0xcb9f('0x24')](function(_0x5beb9a){if(_[_0xcb9f('0x60')](_0x5beb9a)){throw new ReferenceError('Entity\x20not\x20found');}return _0x5beb9a;})[_0xcb9f('0x24')](function(_0x1da5c0){var _0x1fe3c6=_0x1da5c0[_0xcb9f('0x4c')];logger[_0xcb9f('0x61')](_0xcb9f('0x62'),_0x1fe3c6);if(!_[_0xcb9f('0x60')](_0x1da5c0[_0xcb9f('0x4c')])&&fs['existsSync'](_0x1fe3c6)){logger[_0xcb9f('0x61')]('File:\x20\x22'+_0x1fe3c6+_0xcb9f('0x63'));fs['unlinkSync'](_0x1fe3c6);}_0x1fe3c6=_0x1fe3c6+_0xcb9f('0x64');if(!_[_0xcb9f('0x60')](_0x1da5c0[_0xcb9f('0x4c')])&&fs[_0xcb9f('0x4e')](_0x1fe3c6)){logger['info'](_0xcb9f('0x65')+_0x1fe3c6+_0xcb9f('0x63'));fs['unlinkSync'](_0x1fe3c6);}return _0x1da5c0;})[_0xcb9f('0x24')](function(_0x5ae1d5){if(!_0x5ae1d5)throw new InternalError();return _0x5ae1d5['destroy']();})[_0xcb9f('0x24')](function(){_0x4e1bfb['status'](0xcc)[_0xcb9f('0x19')]();})[_0xcb9f('0x41')](handleError(_0x4e1bfb,null));};function getBucketslist(_0x828079,_0x2a7859,_0x483fb6){return new Promise(function(_0xab8fcc,_0x548429){var _0x6aa903=new AWS['S3']({'accessKeyId':_0x2a7859,'secretAccessKey':_0x828079,'region':_0x483fb6});_0x6aa903[_0xcb9f('0x66')]({},function(_0xa93fb8,_0xb4111e){if(_0xa93fb8){return _0x548429(_0xa93fb8);}else{return _0xab8fcc(_0xb4111e);}});});}function createBucket(_0x1be12a,_0x5da6ba,_0x294de8,_0x97e01b){return new Promise(function(_0x2e98f0,_0x509a8c){var _0xcc048e=new AWS['S3']({'accessKeyId':_0x5da6ba,'secretAccessKey':_0x1be12a,'region':_0x294de8});_0xcc048e['createBucket']({'Bucket':_0x97e01b},function(_0x22867d,_0x14d9b8){if(_0x22867d){return _0x509a8c(_0x22867d);}else{return _0x2e98f0(_0x14d9b8);}});});}function uploadFile(_0x4d599b,_0x5a5a57,_0x4ed0ad,_0x4ecebe,_0x1d58e3,_0x53b464){return new Promise(function(_0x13589a,_0x5262bf){var _0x212d7d=new AWS['S3']({'accessKeyId':_0x5a5a57,'secretAccessKey':_0x4d599b,'region':_0x4ed0ad});_0x212d7d[_0xcb9f('0x67')]({'Bucket':_0x4ecebe,'Key':_0x1d58e3,'Body':_0x53b464},function(_0x38f0d2,_0x4b767f){if(_0x38f0d2){return _0x5262bf(_0x38f0d2);}else{return _0x13589a(_0x4b767f);}});});}function startTranscribe(_0x4ae6dd,_0x16f3db,_0xfc50b0,_0x33cccf,_0x3b94b6,_0x126468){return new Promise(function(_0x295423,_0x51d1e5){var _0x2f38c7=new AWS['TranscribeService']({'accessKeyId':_0x16f3db,'secretAccessKey':_0x4ae6dd,'region':_0xfc50b0});_0x2f38c7[_0xcb9f('0x68')]({'TranscriptionJobName':_0x33cccf,'LanguageCode':_0x3b94b6,'Media':{'MediaFileUri':_0x126468}},function(_0x67c6ce,_0x17758e){if(_0x67c6ce){return _0x51d1e5(_0x67c6ce);}else{return _0x295423(_0x17758e);}});});}function transcribe(_0x47c445,_0x2fcad4,_0x1dc387,_0x469968,_0x31edbc,_0x7afc99,_0x538096){return new Promise(function(_0x59ef45,_0xf9f6c1){var _0x412e57={};logger['info'](util['format']('[RUNTRANSCRIPT][%d]\x20Starting\x20voice\x20recording\x20upload\x20in\x20bucket\x20%s',_0x47c445,_0x31edbc));return uploadFile(_0x2fcad4,_0x1dc387,_0x469968,_0x31edbc,path['basename'](_0x7afc99),fs[_0xcb9f('0x69')](_0x7afc99))[_0xcb9f('0x24')](function(_0x9540ce){logger[_0xcb9f('0x61')](util[_0xcb9f('0x30')](_0xcb9f('0x6a'),_0x47c445,_0x31edbc,_0x9540ce[_0xcb9f('0x6b')]));_0x412e57['bucket']=_0x9540ce['Bucket'];_0x412e57['location']=_0x9540ce[_0xcb9f('0x6b')];logger[_0xcb9f('0x61')](util[_0xcb9f('0x30')]('[RUNTRANSCRIPT][%d]\x20Sending\x20transcribe\x20request',_0x47c445));return startTranscribe(_0x2fcad4,_0x1dc387,_0x469968,uuidv4(),_0x538096,_0x9540ce[_0xcb9f('0x6b')]);})[_0xcb9f('0x24')](function(_0x468d14){logger[_0xcb9f('0x61')](util[_0xcb9f('0x30')]('[RUNTRANSCRIPT][%d]\x20Transcription\x20job\x20%s\x20created',_0x47c445,_0x468d14[_0xcb9f('0x6c')]['TranscriptionJobName']));_0x412e57[_0xcb9f('0x6d')]=_0x468d14[_0xcb9f('0x6c')][_0xcb9f('0x6e')];_0x412e57['transcribeStatus']=_0x468d14[_0xcb9f('0x6c')][_0xcb9f('0x6f')];return _0x59ef45(_0x412e57);})[_0xcb9f('0x41')](function(_0xd08cc){return _0xf9f6c1(_0xd08cc);});});}exports[_0xcb9f('0x70')]=function(_0x3a0182,_0x25c76c,_0xf93088){var _0x101473;var _0x1ad876;var _0x1263ee;var _0x217db0=require(_0xcb9f('0x5a'));return db[_0xcb9f('0x2a')][_0xcb9f('0x71')]({'where':{'id':_0x3a0182[_0xcb9f('0x43')]['id']}})['then'](function(_0x1dad04){if(_0x1dad04){var _0x2be082=util['format'](_0xcb9f('0x4d'),_0x1dad04[_0xcb9f('0x4c')]);if(fs[_0xcb9f('0x4e')](_0x2be082)){cypher=!![];return _0x217db0[_0xcb9f('0x4f')](_0x2be082,_0x1dad04[_0xcb9f('0x4c')],config[_0xcb9f('0x50')]['recording'])[_0xcb9f('0x24')](function(){return _0x1dad04;});}return _0x1dad04;}})[_0xcb9f('0x24')](function(_0x186e3d){if(!_0x186e3d){throw new db[(_0xcb9f('0x52'))][(_0xcb9f('0x53'))]('Voice\x20Recording\x20not\x20found');}_0x1ad876=_0x186e3d;return db[_0xcb9f('0x72')]['findOne']({'where':{'id':0x1}});})[_0xcb9f('0x24')](handleEntityNotFound(_0x25c76c,null))['then'](function(_0x2ca6f9){if(_0x2ca6f9){_0x101473=_0x2ca6f9;if(!_0x101473[_0xcb9f('0x73')]||!_0x101473[_0xcb9f('0x74')]||!_0x101473[_0xcb9f('0x75')]||!_0x101473['language']||!_0x101473[_0xcb9f('0x76')]){throw new db['Sequelize'][(_0xcb9f('0x53'))]('Transcribe\x20not\x20configured');}if(_0x3a0182[_0xcb9f('0x48')][_0xcb9f('0x77')]&&(!_0x101473[_0xcb9f('0x78')]||!_0x101473[_0xcb9f('0x79')]||!_0x101473[_0xcb9f('0x7a')]||!_0x101473['language']||!_0x101473[_0xcb9f('0x76')])){throw new db['Sequelize'][(_0xcb9f('0x53'))](_0xcb9f('0x7b'));}return db[_0xcb9f('0x7c')][_0xcb9f('0x71')]({'where':{'id':_0x101473[_0xcb9f('0x74')]}});}})[_0xcb9f('0x24')](function(_0x3b341e){if(!_0x3b341e){throw new db[(_0xcb9f('0x52'))]['ValidationError'](_0xcb9f('0x7d'));}if(!_0x3b341e[_0xcb9f('0x7e')]||!_0x3b341e[_0xcb9f('0x7f')]){throw new db['Sequelize'][(_0xcb9f('0x53'))](_0xcb9f('0x80'));}_0x1263ee=_0x3b341e;return getBucketslist(_0x1263ee['data1'],_0x1263ee['data2'],_0x101473[_0xcb9f('0x75')]);})[_0xcb9f('0x24')](function(_0x27f64f){if(_0x27f64f&&_0x27f64f['Buckets']){var _0x11f376=_[_0xcb9f('0x46')](_0x27f64f['Buckets'],function(_0x3e285d){return _0x3e285d[_0xcb9f('0x81')]===_0x101473[_0xcb9f('0x76')];});if(!_0x11f376){logger['info'](util['format'](_0xcb9f('0x82'),_0x3a0182[_0xcb9f('0x43')]['id'],_0x101473[_0xcb9f('0x76')]));return createBucket(_0x1263ee[_0xcb9f('0x7e')],_0x1263ee[_0xcb9f('0x7f')],_0x101473[_0xcb9f('0x75')],_0x101473[_0xcb9f('0x76')]);}logger[_0xcb9f('0x61')](util[_0xcb9f('0x30')](_0xcb9f('0x83'),_0x3a0182[_0xcb9f('0x43')]['id'],_0x101473[_0xcb9f('0x76')]));return;}})[_0xcb9f('0x24')](function(_0x4dd1a6){if(_0x1ad876[_0xcb9f('0x84')]===_0xcb9f('0x85')){return transcribe(_0x3a0182[_0xcb9f('0x43')]['id'],_0x1263ee['data1'],_0x1263ee['data2'],_0x101473[_0xcb9f('0x75')],_0x101473[_0xcb9f('0x76')],_0x1ad876[_0xcb9f('0x4c')],_0x101473[_0xcb9f('0x86')]);}else{logger['info'](util[_0xcb9f('0x30')](_0xcb9f('0x87'),_0x3a0182[_0xcb9f('0x43')]['id']));return{'transcribeStatus':_0xcb9f('0x88')};}})['then'](function(_0x19f2fa){if(_0x19f2fa){_0x19f2fa['tempSentiment']=_0x3a0182[_0xcb9f('0x48')][_0xcb9f('0x77')];return _0x1ad876[_0xcb9f('0x89')](_0x19f2fa);}})[_0xcb9f('0x24')](respondWithResult(_0x25c76c,null))[_0xcb9f('0x41')](handleError(_0x25c76c,null));};function writeFile(_0x2cc000,_0x444ac5){return new Promise(function(_0x519e62,_0x5e12e4){fs[_0xcb9f('0x8a')](_0x444ac5,_0x2cc000,function(_0x2c0c95,_0xe2f5d9){if(_0x2c0c95){return _0x5e12e4(_0x2c0c95);}else{return _0x519e62(_0xe2f5d9);}});});}exports[_0xcb9f('0x8b')]=function(_0x5659f4,_0x496a98,_0x508cf6){return db[_0xcb9f('0x2a')][_0xcb9f('0x71')]({'where':{'id':_0x5659f4[_0xcb9f('0x43')]['id']}})[_0xcb9f('0x24')](handleEntityNotFound(_0x496a98))[_0xcb9f('0x24')](function(_0x2d2b16){if(_0x2d2b16&&_0x2d2b16[_0xcb9f('0x8c')]){var _0x3185f0=_0x2d2b16[_0xcb9f('0x8c')];var _0x27c946=config['root']+_0xcb9f('0x8d')+_0x2d2b16['id']+_0xcb9f('0x8e');if(fs['existsSync'](_0x27c946)){return _0x27c946;}return writeFile(_0x3185f0,_0x27c946)[_0xcb9f('0x24')](function(){return _0x27c946;});}else{throw new db[(_0xcb9f('0x52'))][(_0xcb9f('0x53'))]('Transcript\x20not\x20available');}})[_0xcb9f('0x24')](function(_0x536083){return _0x496a98['download'](_0x536083);})['catch'](handleError(_0x496a98));}; \ No newline at end of file diff --git a/server/api/voiceRecording/voiceRecording.model.js b/server/api/voiceRecording/voiceRecording.model.js index 8840fd7..c71a8bc 100644 --- a/server/api/voiceRecording/voiceRecording.model.js +++ b/server/api/voiceRecording/voiceRecording.model.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x33a1=['exports','voice_recordings','uniqueid','transcribeStatus','./voiceRecording.attributes'];(function(_0x4e9e97,_0x225db8){var _0x140bb9=function(_0x43347e){while(--_0x43347e){_0x4e9e97['push'](_0x4e9e97['shift']());}};_0x140bb9(++_0x225db8);}(_0x33a1,0x7c));var _0x133a=function(_0x17d9e3,_0x1f969c){_0x17d9e3=_0x17d9e3-0x0;var _0x14192d=_0x33a1[_0x17d9e3];return _0x14192d;};'use strict';var attributes=require(_0x133a('0x0'));module[_0x133a('0x1')]=function(_0x5f43e5,_0x598a1b){return _0x5f43e5['define']('VoiceRecording',attributes,{'tableName':_0x133a('0x2'),'paranoid':![],'indexes':[{'name':_0x133a('0x3'),'fields':[_0x133a('0x3')]},{'name':'transcribeStatus','fields':[_0x133a('0x4')]}],'timestamps':!![]});}; \ No newline at end of file +var _0x0269=['define','voice_recordings','uniqueid','transcribeStatus','./voiceRecording.attributes'];(function(_0x32efcb,_0x55523f){var _0x1dae88=function(_0x11c606){while(--_0x11c606){_0x32efcb['push'](_0x32efcb['shift']());}};_0x1dae88(++_0x55523f);}(_0x0269,0x135));var _0x9026=function(_0xdf1c60,_0x3b6d78){_0xdf1c60=_0xdf1c60-0x0;var _0x5da15c=_0x0269[_0xdf1c60];return _0x5da15c;};'use strict';var attributes=require(_0x9026('0x0'));module['exports']=function(_0x1c4837,_0x5c3ab8){return _0x1c4837[_0x9026('0x1')]('VoiceRecording',attributes,{'tableName':_0x9026('0x2'),'paranoid':![],'indexes':[{'name':_0x9026('0x3'),'fields':[_0x9026('0x3')]},{'name':_0x9026('0x4'),'fields':['transcribeStatus']}],'timestamps':!![]});}; \ No newline at end of file diff --git a/server/api/voiceRecording/voiceRecording.rpc.js b/server/api/voiceRecording/voiceRecording.rpc.js index 092279a..7594916 100644 --- a/server/api/voiceRecording/voiceRecording.rpc.js +++ b/server/api/voiceRecording/voiceRecording.rpc.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xe5af=['util','moment','randomstring','ioredis','../../mysqldb','../../config/logger','jayson/promise','client','then','VoiceRecording,\x20%s,\x20%s','request\x20sent','VoiceRecording,\x20%s,\x20%s,\x20%s','stringify','error','message','info','result','catch','UpdateVoiceRecording','VoiceRecording','update','body','raw','options','where','limit','debug','../../components/encryptor','Setting','create','existsSync','%s.cypher','value','encryptFile','secrets','recording','unlink','CreateVoiceRecording\x20file\x20encrypted','CreateVoiceRecording'];(function(_0x519756,_0x288785){var _0x37047e=function(_0x3d64a7){while(--_0x3d64a7){_0x519756['push'](_0x519756['shift']());}};_0x37047e(++_0x288785);}(_0xe5af,0x9c));var _0xfe5a=function(_0x42e92e,_0x5f0ecd){_0x42e92e=_0x42e92e-0x0;var _0x5af3f5=_0xe5af[_0x42e92e];return _0x5af3f5;};'use strict';var _=require('lodash');var util=require(_0xfe5a('0x0'));var moment=require(_0xfe5a('0x1'));var BPromise=require('bluebird');var rs=require(_0xfe5a('0x2'));var fs=require('fs');var Redis=require(_0xfe5a('0x3'));var db=require(_0xfe5a('0x4'))['db'];var utils=require('../../config/utils');var logger=require(_0xfe5a('0x5'))('rpc');var config=require('../../config/environment');var jayson=require(_0xfe5a('0x6'));var client=jayson[_0xfe5a('0x7')]['http']({'port':0x232a});function respondWithRpcPromise(_0x5eea2e,_0x356c69,_0x106492){return new BPromise(function(_0xfb4357,_0x3e683c){return client['request'](_0x5eea2e,_0x106492)[_0xfe5a('0x8')](function(_0x5a48ff){logger['info'](_0xfe5a('0x9'),_0x356c69,_0xfe5a('0xa'));logger['debug'](_0xfe5a('0xb'),_0x356c69,_0xfe5a('0xa'),JSON[_0xfe5a('0xc')](_0x5a48ff));if(_0x5a48ff[_0xfe5a('0xd')]){if(_0x5a48ff[_0xfe5a('0xd')]['code']===0x1f4){logger[_0xfe5a('0xd')](_0xfe5a('0x9'),_0x356c69,_0x5a48ff[_0xfe5a('0xd')][_0xfe5a('0xe')]);return _0x3e683c(_0x5a48ff[_0xfe5a('0xd')]['message']);}logger[_0xfe5a('0xd')](_0xfe5a('0x9'),_0x356c69,_0x5a48ff[_0xfe5a('0xd')][_0xfe5a('0xe')]);return _0xfb4357(_0x5a48ff[_0xfe5a('0xd')][_0xfe5a('0xe')]);}else{logger[_0xfe5a('0xf')](_0xfe5a('0x9'),_0x356c69,_0xfe5a('0xa'));_0xfb4357(_0x5a48ff[_0xfe5a('0x10')][_0xfe5a('0xe')]);}})[_0xfe5a('0x11')](function(_0x22afa7){logger[_0xfe5a('0xd')](_0xfe5a('0x9'),_0x356c69,_0x22afa7);_0x3e683c(_0x22afa7);});});}exports[_0xfe5a('0x12')]=function(_0x5bf597){var _0x20620b=this;return new Promise(function(_0x456707,_0x54d5fb){return db[_0xfe5a('0x13')][_0xfe5a('0x14')](_0x5bf597[_0xfe5a('0x15')],{'raw':_0x5bf597['options']?_0x5bf597['options'][_0xfe5a('0x16')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x5bf597[_0xfe5a('0x17')]?_0x5bf597[_0xfe5a('0x17')][_0xfe5a('0x18')]||null:null,'attributes':_0x5bf597[_0xfe5a('0x17')]?_0x5bf597[_0xfe5a('0x17')]['attributes']||null:null,'limit':_0x5bf597[_0xfe5a('0x17')]?_0x5bf597['options'][_0xfe5a('0x19')]||null:null})[_0xfe5a('0x8')](function(_0x1fbde5){logger['info']('UpdateVoiceRecording',_0x5bf597);logger[_0xfe5a('0x1a')](_0xfe5a('0x12'),_0x5bf597,JSON['stringify'](_0x1fbde5));_0x456707(_0x1fbde5);})[_0xfe5a('0x11')](function(_0x26f744){logger['error'](_0xfe5a('0x12'),_0x26f744[_0xfe5a('0xe')],_0x5bf597);_0x54d5fb(_0x20620b[_0xfe5a('0xd')](0x1f4,_0x26f744[_0xfe5a('0xe')]));});});};exports['CreateVoiceRecording']=function(_0x42136e){var _0x2f5d04=this;return new Promise(function(_0x24481f,_0x1cd531){var _0x36bf20=require(_0xfe5a('0x1b'));var _0xdbf1e0;return db[_0xfe5a('0x1c')]['findOne']({'attributes':['id','callRecordingEncryption'],'where':{'id':0x1},'raw':!![]})[_0xfe5a('0x8')](function(_0x485f9d){_0xdbf1e0=_0x485f9d;return db[_0xfe5a('0x13')][_0xfe5a('0x1d')](_0x42136e[_0xfe5a('0x15')]);})['then'](function(_0x48a061){if(_0xdbf1e0['callRecordingEncryption']&&fs[_0xfe5a('0x1e')](_0x48a061['value'])){var _0x51d1f4=util['format'](_0xfe5a('0x1f'),_0x48a061[_0xfe5a('0x20')]);return _0x36bf20[_0xfe5a('0x21')](_0x48a061[_0xfe5a('0x20')],_0x51d1f4,config[_0xfe5a('0x22')][_0xfe5a('0x23')])[_0xfe5a('0x8')](function(){fs[_0xfe5a('0x24')](_0x48a061[_0xfe5a('0x20')]);logger[_0xfe5a('0xf')](_0xfe5a('0x25'));return _0x48a061;});}return _0x48a061;})['then'](function(_0x1f0c86){logger[_0xfe5a('0xf')]('CreateVoiceRecording',_0x42136e);logger[_0xfe5a('0x1a')](_0xfe5a('0x26'),_0x42136e,JSON[_0xfe5a('0xc')](_0x1f0c86));_0x24481f(_0x1f0c86);})[_0xfe5a('0x11')](function(_0xe5a992){logger['error']('CreateVoiceRecording',_0xe5a992[_0xfe5a('0xe')],_0x42136e);_0x1cd531(_0x2f5d04['error'](0x1f4,_0xe5a992[_0xfe5a('0xe')]));});});}; \ No newline at end of file +var _0x430c=['../../components/encryptor','findOne','callRecordingEncryption','create','existsSync','value','%s.cypher','encryptFile','recording','lodash','bluebird','randomstring','ioredis','../../config/environment','jayson/promise','http','request','then','info','VoiceRecording,\x20%s,\x20%s','debug','VoiceRecording,\x20%s,\x20%s,\x20%s','stringify','error','message','result','body','options','raw','where','limit','UpdateVoiceRecording','catch','CreateVoiceRecording'];(function(_0x171244,_0x4e239a){var _0x189fc2=function(_0x1f5e87){while(--_0x1f5e87){_0x171244['push'](_0x171244['shift']());}};_0x189fc2(++_0x4e239a);}(_0x430c,0x1a1));var _0xc430=function(_0x4f4c2a,_0x5f5a28){_0x4f4c2a=_0x4f4c2a-0x0;var _0xd15be6=_0x430c[_0x4f4c2a];return _0xd15be6;};'use strict';var _=require(_0xc430('0x0'));var util=require('util');var moment=require('moment');var BPromise=require(_0xc430('0x1'));var rs=require(_0xc430('0x2'));var fs=require('fs');var Redis=require(_0xc430('0x3'));var db=require('../../mysqldb')['db'];var utils=require('../../config/utils');var logger=require('../../config/logger')('rpc');var config=require(_0xc430('0x4'));var jayson=require(_0xc430('0x5'));var client=jayson['client'][_0xc430('0x6')]({'port':0x232a});function respondWithRpcPromise(_0x4de44f,_0x212354,_0x2e51c6){return new BPromise(function(_0x814a90,_0x13ae66){return client[_0xc430('0x7')](_0x4de44f,_0x2e51c6)[_0xc430('0x8')](function(_0x861581){logger[_0xc430('0x9')](_0xc430('0xa'),_0x212354,'request\x20sent');logger[_0xc430('0xb')](_0xc430('0xc'),_0x212354,'request\x20sent',JSON[_0xc430('0xd')](_0x861581));if(_0x861581['error']){if(_0x861581[_0xc430('0xe')]['code']===0x1f4){logger[_0xc430('0xe')](_0xc430('0xa'),_0x212354,_0x861581[_0xc430('0xe')][_0xc430('0xf')]);return _0x13ae66(_0x861581[_0xc430('0xe')][_0xc430('0xf')]);}logger[_0xc430('0xe')]('VoiceRecording,\x20%s,\x20%s',_0x212354,_0x861581['error'][_0xc430('0xf')]);return _0x814a90(_0x861581[_0xc430('0xe')][_0xc430('0xf')]);}else{logger[_0xc430('0x9')](_0xc430('0xa'),_0x212354,'request\x20sent');_0x814a90(_0x861581[_0xc430('0x10')]['message']);}})['catch'](function(_0x2e7987){logger[_0xc430('0xe')](_0xc430('0xa'),_0x212354,_0x2e7987);_0x13ae66(_0x2e7987);});});}exports['UpdateVoiceRecording']=function(_0x5d3acc){var _0x36d112=this;return new Promise(function(_0x4c1937,_0x2bcb21){return db['VoiceRecording']['update'](_0x5d3acc[_0xc430('0x11')],{'raw':_0x5d3acc['options']?_0x5d3acc[_0xc430('0x12')][_0xc430('0x13')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x5d3acc[_0xc430('0x12')]?_0x5d3acc[_0xc430('0x12')][_0xc430('0x14')]||null:null,'attributes':_0x5d3acc['options']?_0x5d3acc[_0xc430('0x12')]['attributes']||null:null,'limit':_0x5d3acc['options']?_0x5d3acc[_0xc430('0x12')][_0xc430('0x15')]||null:null})[_0xc430('0x8')](function(_0x56dd16){logger[_0xc430('0x9')]('UpdateVoiceRecording',_0x5d3acc);logger[_0xc430('0xb')](_0xc430('0x16'),_0x5d3acc,JSON['stringify'](_0x56dd16));_0x4c1937(_0x56dd16);})[_0xc430('0x17')](function(_0x3cdbd3){logger['error'](_0xc430('0x16'),_0x3cdbd3['message'],_0x5d3acc);_0x2bcb21(_0x36d112[_0xc430('0xe')](0x1f4,_0x3cdbd3['message']));});});};exports[_0xc430('0x18')]=function(_0x21e28a){var _0x50110b=this;return new Promise(function(_0x33433f,_0x2ec021){var _0x2c0422=require(_0xc430('0x19'));var _0x285407;return db['Setting'][_0xc430('0x1a')]({'attributes':['id',_0xc430('0x1b')],'where':{'id':0x1},'raw':!![]})[_0xc430('0x8')](function(_0x1591e3){_0x285407=_0x1591e3;return db['VoiceRecording'][_0xc430('0x1c')](_0x21e28a['body']);})[_0xc430('0x8')](function(_0x4ad29e){if(_0x285407[_0xc430('0x1b')]&&fs[_0xc430('0x1d')](_0x4ad29e[_0xc430('0x1e')])){var _0x3d7ccf=util['format'](_0xc430('0x1f'),_0x4ad29e[_0xc430('0x1e')]);return _0x2c0422[_0xc430('0x20')](_0x4ad29e[_0xc430('0x1e')],_0x3d7ccf,config['secrets'][_0xc430('0x21')])[_0xc430('0x8')](function(){fs['unlink'](_0x4ad29e[_0xc430('0x1e')]);logger['info']('CreateVoiceRecording\x20file\x20encrypted');return _0x4ad29e;});}return _0x4ad29e;})[_0xc430('0x8')](function(_0x973a39){logger[_0xc430('0x9')](_0xc430('0x18'),_0x21e28a);logger[_0xc430('0xb')](_0xc430('0x18'),_0x21e28a,JSON[_0xc430('0xd')](_0x973a39));_0x33433f(_0x973a39);})[_0xc430('0x17')](function(_0x47da0d){logger[_0xc430('0xe')]('CreateVoiceRecording',_0x47da0d[_0xc430('0xf')],_0x21e28a);_0x2ec021(_0x50110b[_0xc430('0xe')](0x1f4,_0x47da0d[_0xc430('0xf')]));});});}; \ No newline at end of file diff --git a/server/api/voiceTransferReport/index.js b/server/api/voiceTransferReport/index.js index 96c0031..f82c2b2 100644 --- a/server/api/voiceTransferReport/index.js +++ b/server/api/voiceTransferReport/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xc099=['../../components/interaction/service','../../config/environment','./voiceTransferReport.controller','isAuthenticated','get','/describe','describe','/:id','show','put','destroy','exports','multer','util','path','express','Router','fs-extra'];(function(_0x3947c9,_0x4d6c97){var _0x2e7871=function(_0x1236cc){while(--_0x1236cc){_0x3947c9['push'](_0x3947c9['shift']());}};_0x2e7871(++_0x4d6c97);}(_0xc099,0xd2));var _0x9c09=function(_0x2a30bb,_0x46a1ee){_0x2a30bb=_0x2a30bb-0x0;var _0x316a1b=_0xc099[_0x2a30bb];return _0x316a1b;};'use strict';var multer=require(_0x9c09('0x0'));var util=require(_0x9c09('0x1'));var path=require(_0x9c09('0x2'));var timeout=require('connect-timeout');var express=require(_0x9c09('0x3'));var router=express[_0x9c09('0x4')]();var fs_extra=require(_0x9c09('0x5'));var auth=require('../../components/auth/service');var interaction=require(_0x9c09('0x6'));var config=require(_0x9c09('0x7'));var controller=require(_0x9c09('0x8'));router['get']('/',auth[_0x9c09('0x9')](),controller['index']);router[_0x9c09('0xa')](_0x9c09('0xb'),auth['isAuthenticated'](),controller[_0x9c09('0xc')]);router[_0x9c09('0xa')](_0x9c09('0xd'),auth['isAuthenticated'](),controller[_0x9c09('0xe')]);router['post']('/',auth[_0x9c09('0x9')](),controller['create']);router[_0x9c09('0xf')]('/:id',auth[_0x9c09('0x9')](),controller['update']);router['delete'](_0x9c09('0xd'),auth['isAuthenticated'](),controller[_0x9c09('0x10')]);module[_0x9c09('0x11')]=router; \ No newline at end of file +var _0x05a0=['show','post','create','update','delete','destroy','exports','multer','util','path','connect-timeout','express','fs-extra','../../components/auth/service','../../config/environment','./voiceTransferReport.controller','get','index','/describe','isAuthenticated','describe','/:id'];(function(_0xa464c9,_0x7c86d8){var _0x3d73c4=function(_0x5c2056){while(--_0x5c2056){_0xa464c9['push'](_0xa464c9['shift']());}};_0x3d73c4(++_0x7c86d8);}(_0x05a0,0x125));var _0x005a=function(_0x5b1ae5,_0x2bd80f){_0x5b1ae5=_0x5b1ae5-0x0;var _0x199f52=_0x05a0[_0x5b1ae5];return _0x199f52;};'use strict';var multer=require(_0x005a('0x0'));var util=require(_0x005a('0x1'));var path=require(_0x005a('0x2'));var timeout=require(_0x005a('0x3'));var express=require(_0x005a('0x4'));var router=express['Router']();var fs_extra=require(_0x005a('0x5'));var auth=require(_0x005a('0x6'));var interaction=require('../../components/interaction/service');var config=require(_0x005a('0x7'));var controller=require(_0x005a('0x8'));router[_0x005a('0x9')]('/',auth['isAuthenticated'](),controller[_0x005a('0xa')]);router[_0x005a('0x9')](_0x005a('0xb'),auth[_0x005a('0xc')](),controller[_0x005a('0xd')]);router[_0x005a('0x9')](_0x005a('0xe'),auth[_0x005a('0xc')](),controller[_0x005a('0xf')]);router[_0x005a('0x10')]('/',auth[_0x005a('0xc')](),controller[_0x005a('0x11')]);router['put'](_0x005a('0xe'),auth['isAuthenticated'](),controller[_0x005a('0x12')]);router[_0x005a('0x13')]('/:id',auth[_0x005a('0xc')](),controller[_0x005a('0x14')]);module[_0x005a('0x15')]=router; \ No newline at end of file diff --git a/server/api/voiceTransferReport/voiceTransferReport.attributes.js b/server/api/voiceTransferReport/voiceTransferReport.attributes.js index 317ef76..fc7e30e 100644 --- a/server/api/voiceTransferReport/voiceTransferReport.attributes.js +++ b/server/api/voiceTransferReport/voiceTransferReport.attributes.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x0d6e=['Yes','sequelize','moment','exports','ENUM','blind','attended','STRING'];(function(_0x364d6e,_0x34ea10){var _0x50018b=function(_0x2b3e5e){while(--_0x2b3e5e){_0x364d6e['push'](_0x364d6e['shift']());}};_0x50018b(++_0x34ea10);}(_0x0d6e,0x1f1));var _0xe0d6=function(_0x26e6ba,_0x366304){_0x26e6ba=_0x26e6ba-0x0;var _0x237d9c=_0x0d6e[_0x26e6ba];return _0x237d9c;};'use strict';var Sequelize=require(_0xe0d6('0x0'));var moment=require(_0xe0d6('0x1'));module[_0xe0d6('0x2')]={'type':{'type':Sequelize[_0xe0d6('0x3')](_0xe0d6('0x4'),_0xe0d6('0x5'))},'result':{'type':Sequelize[_0xe0d6('0x6')]},'transfererchannel':{'type':Sequelize[_0xe0d6('0x6')]},'transferercalleridnum':{'type':Sequelize['STRING']},'transferercalleridname':{'type':Sequelize[_0xe0d6('0x6')]},'transfererconnectedlinenum':{'type':Sequelize[_0xe0d6('0x6')]},'transfererconnectedlinename':{'type':Sequelize['STRING']},'transfereraccountcode':{'type':Sequelize[_0xe0d6('0x6')]},'transferercontext':{'type':Sequelize['STRING']},'transfererexten':{'type':Sequelize[_0xe0d6('0x6')]},'transfererlinkedid':{'type':Sequelize[_0xe0d6('0x6')]},'transfereechannel':{'type':Sequelize[_0xe0d6('0x6')]},'transfereecalleridnum':{'type':Sequelize[_0xe0d6('0x6')]},'transfereecalleridname':{'type':Sequelize['STRING']},'transfereeconnectedlinenum':{'type':Sequelize[_0xe0d6('0x6')]},'transfereeconnectedlinename':{'type':Sequelize[_0xe0d6('0x6')]},'transfereeaccountcode':{'type':Sequelize[_0xe0d6('0x6')]},'transfereecontext':{'type':Sequelize['STRING']},'transfereeexten':{'type':Sequelize['STRING']},'transfereelinkedid':{'type':Sequelize[_0xe0d6('0x6')]},'isexternal':{'type':Sequelize[_0xe0d6('0x3')](_0xe0d6('0x7'),'No')},'context':{'type':Sequelize[_0xe0d6('0x6')]},'extension':{'type':Sequelize[_0xe0d6('0x6')]}}; \ No newline at end of file +var _0x6a9b=['sequelize','moment','exports','attended','STRING','ENUM','Yes'];(function(_0x5e9c00,_0x8ef29f){var _0x42cb5c=function(_0x570aa2){while(--_0x570aa2){_0x5e9c00['push'](_0x5e9c00['shift']());}};_0x42cb5c(++_0x8ef29f);}(_0x6a9b,0x1ab));var _0xb6a9=function(_0x2970fc,_0x3dcdb1){_0x2970fc=_0x2970fc-0x0;var _0x1ed337=_0x6a9b[_0x2970fc];return _0x1ed337;};'use strict';var Sequelize=require(_0xb6a9('0x0'));var moment=require(_0xb6a9('0x1'));module[_0xb6a9('0x2')]={'type':{'type':Sequelize['ENUM']('blind',_0xb6a9('0x3'))},'result':{'type':Sequelize[_0xb6a9('0x4')]},'transfererchannel':{'type':Sequelize['STRING']},'transferercalleridnum':{'type':Sequelize['STRING']},'transferercalleridname':{'type':Sequelize[_0xb6a9('0x4')]},'transfererconnectedlinenum':{'type':Sequelize[_0xb6a9('0x4')]},'transfererconnectedlinename':{'type':Sequelize['STRING']},'transfereraccountcode':{'type':Sequelize[_0xb6a9('0x4')]},'transferercontext':{'type':Sequelize[_0xb6a9('0x4')]},'transfererexten':{'type':Sequelize[_0xb6a9('0x4')]},'transfererlinkedid':{'type':Sequelize[_0xb6a9('0x4')]},'transfereechannel':{'type':Sequelize[_0xb6a9('0x4')]},'transfereecalleridnum':{'type':Sequelize['STRING']},'transfereecalleridname':{'type':Sequelize[_0xb6a9('0x4')]},'transfereeconnectedlinenum':{'type':Sequelize[_0xb6a9('0x4')]},'transfereeconnectedlinename':{'type':Sequelize[_0xb6a9('0x4')]},'transfereeaccountcode':{'type':Sequelize[_0xb6a9('0x4')]},'transfereecontext':{'type':Sequelize['STRING']},'transfereeexten':{'type':Sequelize[_0xb6a9('0x4')]},'transfereelinkedid':{'type':Sequelize[_0xb6a9('0x4')]},'isexternal':{'type':Sequelize[_0xb6a9('0x5')](_0xb6a9('0x6'),'No')},'context':{'type':Sequelize['STRING']},'extension':{'type':Sequelize[_0xb6a9('0x4')]}}; \ No newline at end of file diff --git a/server/api/voiceTransferReport/voiceTransferReport.controller.js b/server/api/voiceTransferReport/voiceTransferReport.controller.js index 39076a3..3496826 100644 --- a/server/api/voiceTransferReport/voiceTransferReport.controller.js +++ b/server/api/voiceTransferReport/voiceTransferReport.controller.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x2eda=['map','VoiceTransferReport','type','model','query','keys','filters','intersection','attributes','fields','length','hasOwnProperty','nolimit','sort','pick','filter','where','merge','VIRTUAL','options','includeAll','include','findAll','rows','catch','show','params','rawAttributes','create','body','find','describe','eml-format','rimraf','zip-dir','fast-json-patch','moment','util','sox','to-csv','ejs','fs-extra','squel','jsforce','desk.js','querystring','papaparse','ioredis','../../components/parsers/qs','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/license/util','../../mysqldb','end','offset','undefined','count','limit','status','Content-Range','json','apply','reject','update','then','destroy','sendStatus','error','stack','name','index'];(function(_0x104072,_0x3f331e){var _0x2a7893=function(_0x300b76){while(--_0x300b76){_0x104072['push'](_0x104072['shift']());}};_0x2a7893(++_0x3f331e);}(_0x2eda,0xb2));var _0xa2ed=function(_0x496ec4,_0x1a1fc3){_0x496ec4=_0x496ec4-0x0;var _0x6636a6=_0x2eda[_0x496ec4];return _0x6636a6;};'use strict';var emlformat=require(_0xa2ed('0x0'));var rimraf=require(_0xa2ed('0x1'));var zipdir=require(_0xa2ed('0x2'));var jsonpatch=require(_0xa2ed('0x3'));var rp=require('request-promise');var moment=require(_0xa2ed('0x4'));var BPromise=require('bluebird');var Mustache=require('mustache');var util=require(_0xa2ed('0x5'));var path=require('path');var sox=require(_0xa2ed('0x6'));var csv=require(_0xa2ed('0x7'));var ejs=require(_0xa2ed('0x8'));var fs=require('fs');var fs_extra=require(_0xa2ed('0x9'));var _=require('lodash');var squel=require(_0xa2ed('0xa'));var crypto=require('crypto');var jsforce=require(_0xa2ed('0xb'));var deskjs=require(_0xa2ed('0xc'));var toCsv=require(_0xa2ed('0x7'));var querystring=require(_0xa2ed('0xd'));var Papa=require(_0xa2ed('0xe'));var Redis=require(_0xa2ed('0xf'));var authService=require('../../components/auth/service');var qs=require(_0xa2ed('0x10'));var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0xa2ed('0x11'));var logger=require(_0xa2ed('0x12'))(_0xa2ed('0x13'));var utils=require(_0xa2ed('0x14'));var config=require('../../config/environment');var licenseUtil=require(_0xa2ed('0x15'));var db=require(_0xa2ed('0x16'))['db'];function respondWithStatusCode(_0x33471d,_0xf02e16){_0xf02e16=_0xf02e16||0xcc;return function(_0x42ea92){if(_0x42ea92){return _0x33471d['sendStatus'](_0xf02e16);}return _0x33471d['status'](_0xf02e16)[_0xa2ed('0x17')]();};}function respondWithResult(_0xee7e0d,_0x4e8b84){_0x4e8b84=_0x4e8b84||0xc8;return function(_0x3b012c){if(_0x3b012c){return _0xee7e0d['status'](_0x4e8b84)['json'](_0x3b012c);}};}function respondWithFilteredResult(_0x186dd6,_0x39b973){return function(_0x245821){if(_0x245821){var _0x111d79=typeof _0x39b973[_0xa2ed('0x18')]===_0xa2ed('0x19')&&typeof _0x39b973['limit']===_0xa2ed('0x19');var _0x51d4c8=_0x245821[_0xa2ed('0x1a')];var _0x3f4221=_0x111d79?0x0:_0x39b973[_0xa2ed('0x18')];var _0x217da0=_0x111d79?_0x245821[_0xa2ed('0x1a')]:_0x39b973[_0xa2ed('0x18')]+_0x39b973[_0xa2ed('0x1b')];var _0x1d1c33;if(_0x217da0>=_0x51d4c8){_0x217da0=_0x51d4c8;_0x1d1c33=0xc8;}else{_0x1d1c33=0xce;}_0x186dd6[_0xa2ed('0x1c')](_0x1d1c33);return _0x186dd6['set'](_0xa2ed('0x1d'),_0x3f4221+'-'+_0x217da0+'/'+_0x51d4c8)[_0xa2ed('0x1e')](_0x245821);}return null;};}function patchUpdates(_0x4b4572){return function(_0x555a17){try{jsonpatch[_0xa2ed('0x1f')](_0x555a17,_0x4b4572,!![]);}catch(_0x1c8908){return BPromise[_0xa2ed('0x20')](_0x1c8908);}return _0x555a17['save']();};}function saveUpdates(_0x2787c5,_0x148a2f){return function(_0x491d18){if(_0x491d18){return _0x491d18[_0xa2ed('0x21')](_0x2787c5)[_0xa2ed('0x22')](function(_0x13e284){return _0x13e284;});}return null;};}function removeEntity(_0x2dc663,_0x19970a){return function(_0x8be927){if(_0x8be927){return _0x8be927[_0xa2ed('0x23')]()[_0xa2ed('0x22')](function(){_0x2dc663[_0xa2ed('0x1c')](0xcc)[_0xa2ed('0x17')]();});}};}function handleEntityNotFound(_0x2d2394,_0x2fb3e5){return function(_0x315aaf){if(!_0x315aaf){_0x2d2394[_0xa2ed('0x24')](0x194);}return _0x315aaf;};}function handleError(_0x41bfaf,_0xebcd67){_0xebcd67=_0xebcd67||0x1f4;return function(_0x4aa4f1){logger[_0xa2ed('0x25')](_0x4aa4f1[_0xa2ed('0x26')]);if(_0x4aa4f1['name']){delete _0x4aa4f1[_0xa2ed('0x27')];}_0x41bfaf[_0xa2ed('0x1c')](_0xebcd67)['send'](_0x4aa4f1);};}exports[_0xa2ed('0x28')]=function(_0xb8364d,_0x19abab){var _0x539e00={},_0x7c2cf={},_0x55f966={'count':0x0,'rows':[]};var _0x2832b9=_[_0xa2ed('0x29')](db[_0xa2ed('0x2a')]['rawAttributes'],function(_0x462e26){return{'name':_0x462e26['fieldName'],'type':_0x462e26[_0xa2ed('0x2b')]['key']};});_0x7c2cf[_0xa2ed('0x2c')]=_['map'](_0x2832b9,_0xa2ed('0x27'));_0x7c2cf[_0xa2ed('0x2d')]=_[_0xa2ed('0x2e')](_0xb8364d['query']);_0x7c2cf[_0xa2ed('0x2f')]=_[_0xa2ed('0x30')](_0x7c2cf['model'],_0x7c2cf['query']);_0x539e00[_0xa2ed('0x31')]=_[_0xa2ed('0x30')](_0x7c2cf[_0xa2ed('0x2c')],qs[_0xa2ed('0x32')](_0xb8364d['query'][_0xa2ed('0x32')]));_0x539e00[_0xa2ed('0x31')]=_0x539e00[_0xa2ed('0x31')][_0xa2ed('0x33')]?_0x539e00[_0xa2ed('0x31')]:_0x7c2cf[_0xa2ed('0x2c')];if(!_0xb8364d[_0xa2ed('0x2d')][_0xa2ed('0x34')](_0xa2ed('0x35'))){_0x539e00[_0xa2ed('0x1b')]=qs[_0xa2ed('0x1b')](_0xb8364d[_0xa2ed('0x2d')]['limit']);_0x539e00[_0xa2ed('0x18')]=qs['offset'](_0xb8364d[_0xa2ed('0x2d')]['offset']);}_0x539e00['order']=qs[_0xa2ed('0x36')](_0xb8364d['query'][_0xa2ed('0x36')]);_0x539e00['where']=qs['filters'](_[_0xa2ed('0x37')](_0xb8364d[_0xa2ed('0x2d')],_0x7c2cf[_0xa2ed('0x2f')]),_0x2832b9);if(_0xb8364d[_0xa2ed('0x2d')][_0xa2ed('0x38')]){_0x539e00[_0xa2ed('0x39')]=_[_0xa2ed('0x3a')](_0x539e00[_0xa2ed('0x39')],{'$or':_[_0xa2ed('0x29')](_0x2832b9,function(_0x2dabd0){if(_0x2dabd0['type']!==_0xa2ed('0x3b')){var _0x230aed={};_0x230aed[_0x2dabd0[_0xa2ed('0x27')]]={'$like':'%'+_0xb8364d[_0xa2ed('0x2d')]['filter']+'%'};return _0x230aed;}})});}_0x539e00=_[_0xa2ed('0x3a')]({},_0x539e00,_0xb8364d[_0xa2ed('0x3c')]);var _0x406e69={'where':_0x539e00[_0xa2ed('0x39')]};return db[_0xa2ed('0x2a')][_0xa2ed('0x1a')](_0x406e69)[_0xa2ed('0x22')](function(_0x44bffa){_0x55f966['count']=_0x44bffa;if(_0xb8364d[_0xa2ed('0x2d')][_0xa2ed('0x3d')]){_0x539e00[_0xa2ed('0x3e')]=[{'all':!![]}];}return db['VoiceTransferReport'][_0xa2ed('0x3f')](_0x539e00);})[_0xa2ed('0x22')](function(_0x77b55b){_0x55f966[_0xa2ed('0x40')]=_0x77b55b;return _0x55f966;})[_0xa2ed('0x22')](respondWithFilteredResult(_0x19abab,_0x539e00))[_0xa2ed('0x41')](handleError(_0x19abab,null));};exports[_0xa2ed('0x42')]=function(_0x51dac4,_0x566bf4){var _0x930ab1={'raw':!![],'where':{'id':_0x51dac4[_0xa2ed('0x43')]['id']}},_0x2dd67b={};_0x2dd67b[_0xa2ed('0x2c')]=_[_0xa2ed('0x2e')](db[_0xa2ed('0x2a')][_0xa2ed('0x44')]);_0x2dd67b['query']=_[_0xa2ed('0x2e')](_0x51dac4[_0xa2ed('0x2d')]);_0x2dd67b[_0xa2ed('0x2f')]=_[_0xa2ed('0x30')](_0x2dd67b[_0xa2ed('0x2c')],_0x2dd67b['query']);_0x930ab1[_0xa2ed('0x31')]=_[_0xa2ed('0x30')](_0x2dd67b[_0xa2ed('0x2c')],qs[_0xa2ed('0x32')](_0x51dac4[_0xa2ed('0x2d')]['fields']));_0x930ab1[_0xa2ed('0x31')]=_0x930ab1[_0xa2ed('0x31')][_0xa2ed('0x33')]?_0x930ab1[_0xa2ed('0x31')]:_0x2dd67b[_0xa2ed('0x2c')];if(_0x51dac4[_0xa2ed('0x2d')][_0xa2ed('0x3d')]){_0x930ab1[_0xa2ed('0x3e')]=[{'all':!![]}];}_0x930ab1=_['merge']({},_0x930ab1,_0x51dac4['options']);return db[_0xa2ed('0x2a')]['find'](_0x930ab1)[_0xa2ed('0x22')](handleEntityNotFound(_0x566bf4,null))['then'](respondWithResult(_0x566bf4,null))[_0xa2ed('0x41')](handleError(_0x566bf4,null));};exports[_0xa2ed('0x45')]=function(_0x5426f5,_0x50e9e){return db['VoiceTransferReport'][_0xa2ed('0x45')](_0x5426f5[_0xa2ed('0x46')],{})[_0xa2ed('0x22')](respondWithResult(_0x50e9e,0xc9))[_0xa2ed('0x41')](handleError(_0x50e9e,null));};exports[_0xa2ed('0x21')]=function(_0x39b7f9,_0x9456da){if(_0x39b7f9['body']['id']){delete _0x39b7f9[_0xa2ed('0x46')]['id'];}return db[_0xa2ed('0x2a')][_0xa2ed('0x47')]({'where':{'id':_0x39b7f9[_0xa2ed('0x43')]['id']}})['then'](handleEntityNotFound(_0x9456da,null))[_0xa2ed('0x22')](saveUpdates(_0x39b7f9[_0xa2ed('0x46')],null))['then'](respondWithResult(_0x9456da,null))[_0xa2ed('0x41')](handleError(_0x9456da,null));};exports['destroy']=function(_0x41c3e2,_0xb131e9){return db['VoiceTransferReport'][_0xa2ed('0x47')]({'where':{'id':_0x41c3e2['params']['id']}})[_0xa2ed('0x22')](handleEntityNotFound(_0xb131e9,null))[_0xa2ed('0x22')](removeEntity(_0xb131e9,null))[_0xa2ed('0x41')](handleError(_0xb131e9,null));};exports[_0xa2ed('0x48')]=function(_0x547f50,_0x177581){return db[_0xa2ed('0x2a')][_0xa2ed('0x48')]()[_0xa2ed('0x22')](respondWithResult(_0x177581,null))['catch'](handleError(_0x177581,null));}; \ No newline at end of file +var _0xe56e=['VIRTUAL','options','includeAll','findAll','rows','catch','show','include','find','create','body','params','describe','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','mustache','util','sox','to-csv','fs-extra','lodash','squel','crypto','jsforce','desk.js','querystring','papaparse','../../components/auth/service','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','sendStatus','status','end','offset','limit','undefined','count','set','Content-Range','json','reject','save','update','then','destroy','error','stack','name','send','index','map','VoiceTransferReport','rawAttributes','fieldName','type','key','model','query','keys','filters','intersection','fields','attributes','hasOwnProperty','nolimit','sort','where','pick','filter','merge'];(function(_0x1fcf1b,_0x214549){var _0x5d2952=function(_0x3331b7){while(--_0x3331b7){_0x1fcf1b['push'](_0x1fcf1b['shift']());}};_0x5d2952(++_0x214549);}(_0xe56e,0x1ed));var _0xee56=function(_0xa1947d,_0xeb1015){_0xa1947d=_0xa1947d-0x0;var _0xccc41a=_0xe56e[_0xa1947d];return _0xccc41a;};'use strict';var emlformat=require(_0xee56('0x0'));var rimraf=require(_0xee56('0x1'));var zipdir=require(_0xee56('0x2'));var jsonpatch=require(_0xee56('0x3'));var rp=require(_0xee56('0x4'));var moment=require(_0xee56('0x5'));var BPromise=require('bluebird');var Mustache=require(_0xee56('0x6'));var util=require(_0xee56('0x7'));var path=require('path');var sox=require(_0xee56('0x8'));var csv=require(_0xee56('0x9'));var ejs=require('ejs');var fs=require('fs');var fs_extra=require(_0xee56('0xa'));var _=require(_0xee56('0xb'));var squel=require(_0xee56('0xc'));var crypto=require(_0xee56('0xd'));var jsforce=require(_0xee56('0xe'));var deskjs=require(_0xee56('0xf'));var toCsv=require(_0xee56('0x9'));var querystring=require(_0xee56('0x10'));var Papa=require(_0xee56('0x11'));var Redis=require('ioredis');var authService=require(_0xee56('0x12'));var qs=require('../../components/parsers/qs');var as=require(_0xee56('0x13'));var hardwareService=require(_0xee56('0x14'));var logger=require(_0xee56('0x15'))(_0xee56('0x16'));var utils=require(_0xee56('0x17'));var config=require(_0xee56('0x18'));var licenseUtil=require(_0xee56('0x19'));var db=require(_0xee56('0x1a'))['db'];function respondWithStatusCode(_0x2a8c37,_0x4b35f9){_0x4b35f9=_0x4b35f9||0xcc;return function(_0x2a1f18){if(_0x2a1f18){return _0x2a8c37[_0xee56('0x1b')](_0x4b35f9);}return _0x2a8c37[_0xee56('0x1c')](_0x4b35f9)[_0xee56('0x1d')]();};}function respondWithResult(_0x4dd78b,_0x533dd2){_0x533dd2=_0x533dd2||0xc8;return function(_0x457d76){if(_0x457d76){return _0x4dd78b[_0xee56('0x1c')](_0x533dd2)['json'](_0x457d76);}};}function respondWithFilteredResult(_0x136bd1,_0x3dffe6){return function(_0x5ddbeb){if(_0x5ddbeb){var _0x4b1eaf=typeof _0x3dffe6[_0xee56('0x1e')]==='undefined'&&typeof _0x3dffe6[_0xee56('0x1f')]===_0xee56('0x20');var _0xba0fbf=_0x5ddbeb['count'];var _0xc7f95d=_0x4b1eaf?0x0:_0x3dffe6[_0xee56('0x1e')];var _0x418f15=_0x4b1eaf?_0x5ddbeb[_0xee56('0x21')]:_0x3dffe6['offset']+_0x3dffe6[_0xee56('0x1f')];var _0x34bba2;if(_0x418f15>=_0xba0fbf){_0x418f15=_0xba0fbf;_0x34bba2=0xc8;}else{_0x34bba2=0xce;}_0x136bd1[_0xee56('0x1c')](_0x34bba2);return _0x136bd1[_0xee56('0x22')](_0xee56('0x23'),_0xc7f95d+'-'+_0x418f15+'/'+_0xba0fbf)[_0xee56('0x24')](_0x5ddbeb);}return null;};}function patchUpdates(_0x129099){return function(_0x8c8af7){try{jsonpatch['apply'](_0x8c8af7,_0x129099,!![]);}catch(_0x2175bf){return BPromise[_0xee56('0x25')](_0x2175bf);}return _0x8c8af7[_0xee56('0x26')]();};}function saveUpdates(_0x3ff639,_0x9be83c){return function(_0x244f7d){if(_0x244f7d){return _0x244f7d[_0xee56('0x27')](_0x3ff639)[_0xee56('0x28')](function(_0x5d43af){return _0x5d43af;});}return null;};}function removeEntity(_0x40b374,_0x27117c){return function(_0x42aee6){if(_0x42aee6){return _0x42aee6[_0xee56('0x29')]()[_0xee56('0x28')](function(){_0x40b374[_0xee56('0x1c')](0xcc)[_0xee56('0x1d')]();});}};}function handleEntityNotFound(_0x3a3f89,_0x1fc0d5){return function(_0x154500){if(!_0x154500){_0x3a3f89[_0xee56('0x1b')](0x194);}return _0x154500;};}function handleError(_0x3db745,_0x44766a){_0x44766a=_0x44766a||0x1f4;return function(_0x42f8cd){logger[_0xee56('0x2a')](_0x42f8cd[_0xee56('0x2b')]);if(_0x42f8cd['name']){delete _0x42f8cd[_0xee56('0x2c')];}_0x3db745[_0xee56('0x1c')](_0x44766a)[_0xee56('0x2d')](_0x42f8cd);};}exports[_0xee56('0x2e')]=function(_0x17dd79,_0x8db937){var _0xaaef74={},_0x1d820f={},_0x3eb457={'count':0x0,'rows':[]};var _0x14f370=_[_0xee56('0x2f')](db[_0xee56('0x30')][_0xee56('0x31')],function(_0x3d0491){return{'name':_0x3d0491[_0xee56('0x32')],'type':_0x3d0491[_0xee56('0x33')][_0xee56('0x34')]};});_0x1d820f[_0xee56('0x35')]=_[_0xee56('0x2f')](_0x14f370,_0xee56('0x2c'));_0x1d820f[_0xee56('0x36')]=_[_0xee56('0x37')](_0x17dd79[_0xee56('0x36')]);_0x1d820f[_0xee56('0x38')]=_['intersection'](_0x1d820f['model'],_0x1d820f[_0xee56('0x36')]);_0xaaef74['attributes']=_[_0xee56('0x39')](_0x1d820f[_0xee56('0x35')],qs[_0xee56('0x3a')](_0x17dd79[_0xee56('0x36')][_0xee56('0x3a')]));_0xaaef74[_0xee56('0x3b')]=_0xaaef74['attributes']['length']?_0xaaef74[_0xee56('0x3b')]:_0x1d820f[_0xee56('0x35')];if(!_0x17dd79['query'][_0xee56('0x3c')](_0xee56('0x3d'))){_0xaaef74[_0xee56('0x1f')]=qs['limit'](_0x17dd79[_0xee56('0x36')][_0xee56('0x1f')]);_0xaaef74[_0xee56('0x1e')]=qs[_0xee56('0x1e')](_0x17dd79[_0xee56('0x36')][_0xee56('0x1e')]);}_0xaaef74['order']=qs['sort'](_0x17dd79[_0xee56('0x36')][_0xee56('0x3e')]);_0xaaef74[_0xee56('0x3f')]=qs[_0xee56('0x38')](_[_0xee56('0x40')](_0x17dd79[_0xee56('0x36')],_0x1d820f[_0xee56('0x38')]),_0x14f370);if(_0x17dd79[_0xee56('0x36')][_0xee56('0x41')]){_0xaaef74['where']=_[_0xee56('0x42')](_0xaaef74[_0xee56('0x3f')],{'$or':_[_0xee56('0x2f')](_0x14f370,function(_0xa54507){if(_0xa54507[_0xee56('0x33')]!==_0xee56('0x43')){var _0x3d1499={};_0x3d1499[_0xa54507['name']]={'$like':'%'+_0x17dd79['query']['filter']+'%'};return _0x3d1499;}})});}_0xaaef74=_['merge']({},_0xaaef74,_0x17dd79[_0xee56('0x44')]);var _0x139394={'where':_0xaaef74['where']};return db[_0xee56('0x30')][_0xee56('0x21')](_0x139394)[_0xee56('0x28')](function(_0x8d6345){_0x3eb457['count']=_0x8d6345;if(_0x17dd79[_0xee56('0x36')][_0xee56('0x45')]){_0xaaef74['include']=[{'all':!![]}];}return db[_0xee56('0x30')][_0xee56('0x46')](_0xaaef74);})[_0xee56('0x28')](function(_0x57fec2){_0x3eb457[_0xee56('0x47')]=_0x57fec2;return _0x3eb457;})['then'](respondWithFilteredResult(_0x8db937,_0xaaef74))[_0xee56('0x48')](handleError(_0x8db937,null));};exports[_0xee56('0x49')]=function(_0x9d8173,_0x437c2e){var _0x56792d={'raw':!![],'where':{'id':_0x9d8173['params']['id']}},_0x538962={};_0x538962[_0xee56('0x35')]=_[_0xee56('0x37')](db[_0xee56('0x30')][_0xee56('0x31')]);_0x538962[_0xee56('0x36')]=_[_0xee56('0x37')](_0x9d8173[_0xee56('0x36')]);_0x538962[_0xee56('0x38')]=_[_0xee56('0x39')](_0x538962[_0xee56('0x35')],_0x538962[_0xee56('0x36')]);_0x56792d[_0xee56('0x3b')]=_[_0xee56('0x39')](_0x538962[_0xee56('0x35')],qs[_0xee56('0x3a')](_0x9d8173['query'][_0xee56('0x3a')]));_0x56792d['attributes']=_0x56792d[_0xee56('0x3b')]['length']?_0x56792d[_0xee56('0x3b')]:_0x538962['model'];if(_0x9d8173[_0xee56('0x36')][_0xee56('0x45')]){_0x56792d[_0xee56('0x4a')]=[{'all':!![]}];}_0x56792d=_['merge']({},_0x56792d,_0x9d8173[_0xee56('0x44')]);return db['VoiceTransferReport'][_0xee56('0x4b')](_0x56792d)[_0xee56('0x28')](handleEntityNotFound(_0x437c2e,null))[_0xee56('0x28')](respondWithResult(_0x437c2e,null))['catch'](handleError(_0x437c2e,null));};exports[_0xee56('0x4c')]=function(_0x22302a,_0x3606be){return db['VoiceTransferReport'][_0xee56('0x4c')](_0x22302a[_0xee56('0x4d')],{})['then'](respondWithResult(_0x3606be,0xc9))[_0xee56('0x48')](handleError(_0x3606be,null));};exports[_0xee56('0x27')]=function(_0x32dcac,_0x5510e4){if(_0x32dcac['body']['id']){delete _0x32dcac[_0xee56('0x4d')]['id'];}return db[_0xee56('0x30')][_0xee56('0x4b')]({'where':{'id':_0x32dcac[_0xee56('0x4e')]['id']}})[_0xee56('0x28')](handleEntityNotFound(_0x5510e4,null))[_0xee56('0x28')](saveUpdates(_0x32dcac['body'],null))[_0xee56('0x28')](respondWithResult(_0x5510e4,null))['catch'](handleError(_0x5510e4,null));};exports[_0xee56('0x29')]=function(_0x2e4710,_0x36d87a){return db[_0xee56('0x30')][_0xee56('0x4b')]({'where':{'id':_0x2e4710['params']['id']}})[_0xee56('0x28')](handleEntityNotFound(_0x36d87a,null))[_0xee56('0x28')](removeEntity(_0x36d87a,null))['catch'](handleError(_0x36d87a,null));};exports[_0xee56('0x4f')]=function(_0x453dcf,_0x21ea52){return db[_0xee56('0x30')][_0xee56('0x4f')]()['then'](respondWithResult(_0x21ea52,null))[_0xee56('0x48')](handleError(_0x21ea52,null));}; \ No newline at end of file diff --git a/server/api/voiceTransferReport/voiceTransferReport.model.js b/server/api/voiceTransferReport/voiceTransferReport.model.js index 4624f96..93d7fa1 100644 --- a/server/api/voiceTransferReport/voiceTransferReport.model.js +++ b/server/api/voiceTransferReport/voiceTransferReport.model.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x6d82=['bluebird','request-promise','rimraf','../../config/environment','./voiceTransferReport.attributes','exports','VoiceTransferReport','report_call_transfer','lodash','util','../../config/logger','api'];(function(_0x53aaf8,_0x863bcb){var _0x1fedb1=function(_0x5696f4){while(--_0x5696f4){_0x53aaf8['push'](_0x53aaf8['shift']());}};_0x1fedb1(++_0x863bcb);}(_0x6d82,0x170));var _0x26d8=function(_0x41a953,_0x41c013){_0x41a953=_0x41a953-0x0;var _0x394c67=_0x6d82[_0x41a953];return _0x394c67;};'use strict';var _=require(_0x26d8('0x0'));var util=require(_0x26d8('0x1'));var logger=require(_0x26d8('0x2'))(_0x26d8('0x3'));var moment=require('moment');var BPromise=require(_0x26d8('0x4'));var rp=require(_0x26d8('0x5'));var fs=require('fs');var path=require('path');var rimraf=require(_0x26d8('0x6'));var config=require(_0x26d8('0x7'));var attributes=require(_0x26d8('0x8'));module[_0x26d8('0x9')]=function(_0x33c8ca,_0x555e91){return _0x33c8ca['define'](_0x26d8('0xa'),attributes,{'tableName':_0x26d8('0xb'),'paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file +var _0xcee7=['rimraf','../../config/environment','./voiceTransferReport.attributes','exports','define','report_call_transfer','lodash','../../config/logger','api','moment','bluebird','request-promise','path'];(function(_0x3c578a,_0x906599){var _0x5954ae=function(_0x4a95a3){while(--_0x4a95a3){_0x3c578a['push'](_0x3c578a['shift']());}};_0x5954ae(++_0x906599);}(_0xcee7,0x14b));var _0x7cee=function(_0x3ee2c7,_0x23d9e7){_0x3ee2c7=_0x3ee2c7-0x0;var _0x161e78=_0xcee7[_0x3ee2c7];return _0x161e78;};'use strict';var _=require(_0x7cee('0x0'));var util=require('util');var logger=require(_0x7cee('0x1'))(_0x7cee('0x2'));var moment=require(_0x7cee('0x3'));var BPromise=require(_0x7cee('0x4'));var rp=require(_0x7cee('0x5'));var fs=require('fs');var path=require(_0x7cee('0x6'));var rimraf=require(_0x7cee('0x7'));var config=require(_0x7cee('0x8'));var attributes=require(_0x7cee('0x9'));module[_0x7cee('0xa')]=function(_0xe03b92,_0x4ee46c){return _0xe03b92[_0x7cee('0xb')]('VoiceTransferReport',attributes,{'tableName':_0x7cee('0xc'),'paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file diff --git a/server/api/voiceTransferReport/voiceTransferReport.rpc.js b/server/api/voiceTransferReport/voiceTransferReport.rpc.js index c4c68f8..a8726ca 100644 --- a/server/api/voiceTransferReport/voiceTransferReport.rpc.js +++ b/server/api/voiceTransferReport/voiceTransferReport.rpc.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x0468=['client','request','then','info','VoiceTransferReport,\x20%s,\x20%s','request\x20sent','stringify','error','code','message','CreateVoiceTransferReport','body','options','raw','debug','lodash','util','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment'];(function(_0x35cb62,_0x55a6cd){var _0x1ec360=function(_0x2b532f){while(--_0x2b532f){_0x35cb62['push'](_0x35cb62['shift']());}};_0x1ec360(++_0x55a6cd);}(_0x0468,0x8c));var _0x8046=function(_0x4ae2a9,_0x2d4169){_0x4ae2a9=_0x4ae2a9-0x0;var _0x3037f0=_0x0468[_0x4ae2a9];return _0x3037f0;};'use strict';var _=require(_0x8046('0x0'));var util=require(_0x8046('0x1'));var moment=require('moment');var BPromise=require(_0x8046('0x2'));var rs=require(_0x8046('0x3'));var fs=require('fs');var Redis=require(_0x8046('0x4'));var db=require(_0x8046('0x5'))['db'];var utils=require(_0x8046('0x6'));var logger=require(_0x8046('0x7'))(_0x8046('0x8'));var config=require(_0x8046('0x9'));var jayson=require('jayson/promise');var client=jayson[_0x8046('0xa')]['http']({'port':0x232a});function respondWithRpcPromise(_0x2f960b,_0x338492,_0x5a419c){return new BPromise(function(_0xa82114,_0x110a3e){return client[_0x8046('0xb')](_0x2f960b,_0x5a419c)[_0x8046('0xc')](function(_0x42674a){logger[_0x8046('0xd')](_0x8046('0xe'),_0x338492,_0x8046('0xf'));logger['debug']('VoiceTransferReport,\x20%s,\x20%s,\x20%s',_0x338492,'request\x20sent',JSON[_0x8046('0x10')](_0x42674a));if(_0x42674a['error']){if(_0x42674a[_0x8046('0x11')][_0x8046('0x12')]===0x1f4){logger[_0x8046('0x11')](_0x8046('0xe'),_0x338492,_0x42674a[_0x8046('0x11')][_0x8046('0x13')]);return _0x110a3e(_0x42674a[_0x8046('0x11')]['message']);}logger[_0x8046('0x11')](_0x8046('0xe'),_0x338492,_0x42674a[_0x8046('0x11')][_0x8046('0x13')]);return _0xa82114(_0x42674a[_0x8046('0x11')][_0x8046('0x13')]);}else{logger[_0x8046('0xd')](_0x8046('0xe'),_0x338492,_0x8046('0xf'));_0xa82114(_0x42674a['result'][_0x8046('0x13')]);}})['catch'](function(_0x19873a){logger[_0x8046('0x11')](_0x8046('0xe'),_0x338492,_0x19873a);_0x110a3e(_0x19873a);});});}exports[_0x8046('0x14')]=function(_0x441b3d){var _0x31d2ee=this;return new Promise(function(_0x4d1a20,_0x3cb563){return db['VoiceTransferReport']['create'](_0x441b3d[_0x8046('0x15')],{'raw':_0x441b3d[_0x8046('0x16')]?_0x441b3d[_0x8046('0x16')][_0x8046('0x17')]===undefined?!![]:![]:!![]})[_0x8046('0xc')](function(_0x3ed96a){logger[_0x8046('0xd')](_0x8046('0x14'),_0x441b3d);logger[_0x8046('0x18')](_0x8046('0x14'),_0x441b3d,JSON[_0x8046('0x10')](_0x3ed96a));_0x4d1a20(_0x3ed96a);})['catch'](function(_0x1bd7bc){logger[_0x8046('0x11')](_0x8046('0x14'),_0x1bd7bc[_0x8046('0x13')],_0x441b3d);_0x3cb563(_0x31d2ee['error'](0x1f4,_0x1bd7bc[_0x8046('0x13')]));});});}; \ No newline at end of file +var _0x308a=['ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','request','then','info','VoiceTransferReport,\x20%s,\x20%s','request\x20sent','debug','stringify','error','code','message','result','catch','CreateVoiceTransferReport','VoiceTransferReport','create','body','options','raw','util','moment','bluebird','randomstring'];(function(_0x3af61c,_0x51db90){var _0x339d71=function(_0x3b9da3){while(--_0x3b9da3){_0x3af61c['push'](_0x3af61c['shift']());}};_0x339d71(++_0x51db90);}(_0x308a,0xf4));var _0xa308=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0x308a[_0x3dd15e];return _0x231fd0;};'use strict';var _=require('lodash');var util=require(_0xa308('0x0'));var moment=require(_0xa308('0x1'));var BPromise=require(_0xa308('0x2'));var rs=require(_0xa308('0x3'));var fs=require('fs');var Redis=require(_0xa308('0x4'));var db=require(_0xa308('0x5'))['db'];var utils=require(_0xa308('0x6'));var logger=require(_0xa308('0x7'))(_0xa308('0x8'));var config=require(_0xa308('0x9'));var jayson=require(_0xa308('0xa'));var client=jayson[_0xa308('0xb')][_0xa308('0xc')]({'port':0x232a});function respondWithRpcPromise(_0x24faa9,_0x11b9ba,_0x379116){return new BPromise(function(_0x42d3b4,_0x3c3351){return client[_0xa308('0xd')](_0x24faa9,_0x379116)[_0xa308('0xe')](function(_0x95d10e){logger[_0xa308('0xf')](_0xa308('0x10'),_0x11b9ba,_0xa308('0x11'));logger[_0xa308('0x12')]('VoiceTransferReport,\x20%s,\x20%s,\x20%s',_0x11b9ba,_0xa308('0x11'),JSON[_0xa308('0x13')](_0x95d10e));if(_0x95d10e['error']){if(_0x95d10e[_0xa308('0x14')][_0xa308('0x15')]===0x1f4){logger['error'](_0xa308('0x10'),_0x11b9ba,_0x95d10e[_0xa308('0x14')][_0xa308('0x16')]);return _0x3c3351(_0x95d10e[_0xa308('0x14')][_0xa308('0x16')]);}logger[_0xa308('0x14')](_0xa308('0x10'),_0x11b9ba,_0x95d10e[_0xa308('0x14')][_0xa308('0x16')]);return _0x42d3b4(_0x95d10e[_0xa308('0x14')][_0xa308('0x16')]);}else{logger[_0xa308('0xf')](_0xa308('0x10'),_0x11b9ba,_0xa308('0x11'));_0x42d3b4(_0x95d10e[_0xa308('0x17')][_0xa308('0x16')]);}})[_0xa308('0x18')](function(_0x12a47b){logger['error'](_0xa308('0x10'),_0x11b9ba,_0x12a47b);_0x3c3351(_0x12a47b);});});}exports[_0xa308('0x19')]=function(_0x566d63){var _0x53196f=this;return new Promise(function(_0x23880c,_0x148c70){return db[_0xa308('0x1a')][_0xa308('0x1b')](_0x566d63[_0xa308('0x1c')],{'raw':_0x566d63[_0xa308('0x1d')]?_0x566d63['options'][_0xa308('0x1e')]===undefined?!![]:![]:!![]})[_0xa308('0xe')](function(_0x58f78f){logger[_0xa308('0xf')](_0xa308('0x19'),_0x566d63);logger[_0xa308('0x12')](_0xa308('0x19'),_0x566d63,JSON[_0xa308('0x13')](_0x58f78f));_0x23880c(_0x58f78f);})[_0xa308('0x18')](function(_0x57e3e3){logger['error'](_0xa308('0x19'),_0x57e3e3['message'],_0x566d63);_0x148c70(_0x53196f['error'](0x1f4,_0x57e3e3[_0xa308('0x16')]));});});}; \ No newline at end of file diff --git a/server/api/webbar/index.js b/server/api/webbar/index.js index 0ed58e9..dd2a85c 100644 --- a/server/api/webbar/index.js +++ b/server/api/webbar/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xa9e0=['/transfer','transfer','exports','express','Router','../../components/auth/service','/originate','isWebrtcLicence','originate','post','/hangup','isAuthenticated','hangup','/answer','answer','hold','/unhold','calls'];(function(_0x1d4c6d,_0x4b5204){var _0x2e2206=function(_0x453775){while(--_0x453775){_0x1d4c6d['push'](_0x1d4c6d['shift']());}};_0x2e2206(++_0x4b5204);}(_0xa9e0,0x123));var _0x0a9e=function(_0x47e7cb,_0x4c1b8d){_0x47e7cb=_0x47e7cb-0x0;var _0x2a8874=_0xa9e0[_0x47e7cb];return _0x2a8874;};'use strict';var express=require(_0x0a9e('0x0'));var router=express[_0x0a9e('0x1')]();var auth=require(_0x0a9e('0x2'));var controller=require('./webbar.controller');router['post'](_0x0a9e('0x3'),auth['isAuthenticated'](),auth[_0x0a9e('0x4')](),controller[_0x0a9e('0x5')]);router[_0x0a9e('0x6')](_0x0a9e('0x7'),auth[_0x0a9e('0x8')](),auth['isWebrtcLicence'](),controller[_0x0a9e('0x9')]);router[_0x0a9e('0x6')](_0x0a9e('0xa'),auth['isAuthenticated'](),auth['isWebrtcLicence'](),controller[_0x0a9e('0xb')]);router['post']('/hold',auth[_0x0a9e('0x8')](),auth[_0x0a9e('0x4')](),controller[_0x0a9e('0xc')]);router[_0x0a9e('0x6')](_0x0a9e('0xd'),auth[_0x0a9e('0x8')](),auth['isWebrtcLicence'](),controller['unhold']);router['post']('/calls',auth[_0x0a9e('0x8')](),auth[_0x0a9e('0x4')](),controller[_0x0a9e('0xe')]);router[_0x0a9e('0x6')](_0x0a9e('0xf'),auth[_0x0a9e('0x8')](),auth['isWebrtcLicence'](),controller[_0x0a9e('0x10')]);module[_0x0a9e('0x11')]=router; \ No newline at end of file +var _0x0bb5=['unhold','/calls','calls','/transfer','exports','express','Router','post','/originate','isAuthenticated','isWebrtcLicence','originate','/hangup','/answer','/hold','hold','/unhold'];(function(_0x302a7e,_0x447eeb){var _0x58fc22=function(_0x44c1c6){while(--_0x44c1c6){_0x302a7e['push'](_0x302a7e['shift']());}};_0x58fc22(++_0x447eeb);}(_0x0bb5,0x148));var _0x50bb=function(_0x13ada9,_0x132e03){_0x13ada9=_0x13ada9-0x0;var _0x5cc9f6=_0x0bb5[_0x13ada9];return _0x5cc9f6;};'use strict';var express=require(_0x50bb('0x0'));var router=express[_0x50bb('0x1')]();var auth=require('../../components/auth/service');var controller=require('./webbar.controller');router[_0x50bb('0x2')](_0x50bb('0x3'),auth[_0x50bb('0x4')](),auth[_0x50bb('0x5')](),controller[_0x50bb('0x6')]);router[_0x50bb('0x2')](_0x50bb('0x7'),auth[_0x50bb('0x4')](),auth['isWebrtcLicence'](),controller['hangup']);router[_0x50bb('0x2')](_0x50bb('0x8'),auth[_0x50bb('0x4')](),auth[_0x50bb('0x5')](),controller['answer']);router['post'](_0x50bb('0x9'),auth[_0x50bb('0x4')](),auth[_0x50bb('0x5')](),controller[_0x50bb('0xa')]);router['post'](_0x50bb('0xb'),auth[_0x50bb('0x4')](),auth[_0x50bb('0x5')](),controller[_0x50bb('0xc')]);router[_0x50bb('0x2')](_0x50bb('0xd'),auth[_0x50bb('0x4')](),auth['isWebrtcLicence'](),controller[_0x50bb('0xe')]);router['post'](_0x50bb('0xf'),auth[_0x50bb('0x4')](),auth[_0x50bb('0x5')](),controller['transfer']);module[_0x50bb('0x10')]=router; \ No newline at end of file diff --git a/server/api/webbar/webbar.controller.js b/server/api/webbar/webbar.controller.js index 9ed7f83..679b179 100644 --- a/server/api/webbar/webbar.controller.js +++ b/server/api/webbar/webbar.controller.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x7a2c=['answer\x20fired:','webbar:answer','answer\x20executed!','hold\x20fired:','unhold','webbar:unhold','unhold\x20executed!','all','conference','webbar:conference','conference\x20executed!','transfer\x20fired:','webbar:transfer','transfer\x20executed!','path','../../mysqldb','../../config/environment','util','bluebird','jayson/promise','client','http','../../config/logger','ioredis','redis','socket.io-emitter','validate','number','string','callNumber\x20is\x20required','userId\x20is\x20required','transferNumber\x20is\x20required','stringify','log','handleError:','name','send','request','then','error','code','message','result','catch','User','agent','VoiceChannels','filter','rows','UserId','sessionId','sessionId\x20','\x20not\x20found!','originate','originate\x20fired:','status','userId','body','callNumber','callerId','callbackUrl','info','format','user:%s','webbar:originate','json','hangup','hangup\x20fired:','length','entityFound:','webbar:hangup','hangup\x20executed!','answer'];(function(_0x516983,_0x26b1bd){var _0x583260=function(_0xb1d6b3){while(--_0xb1d6b3){_0x516983['push'](_0x516983['shift']());}};_0x583260(++_0x26b1bd);}(_0x7a2c,0x17b));var _0xc7a2=function(_0x4233a9,_0x59151e){_0x4233a9=_0x4233a9-0x0;var _0x23113a=_0x7a2c[_0x4233a9];return _0x23113a;};'use strict';var path=require(_0xc7a2('0x0'));var fs=require('fs');var _=require('lodash');var db=require(_0xc7a2('0x1'))['db'];var config=require(_0xc7a2('0x2'));var util=require(_0xc7a2('0x3'));var BPromise=require(_0xc7a2('0x4'));var jayson=require(_0xc7a2('0x5'));var amiClient=jayson[_0xc7a2('0x6')][_0xc7a2('0x7')]({'port':0x232a});var logger=require(_0xc7a2('0x8'))('webbarapi');var Redis=require(_0xc7a2('0x9'));config[_0xc7a2('0xa')]=_['defaults'](config['redis'],{'host':'localhost','port':0x18eb});var io=require(_0xc7a2('0xb'))(new Redis(config[_0xc7a2('0xa')]));var Schema=require(_0xc7a2('0xc'));var originateValidation=new Schema({'userId':{'type':_0xc7a2('0xd'),'required':[!![],'userId\x20is\x20required']},'callNumber':{'type':_0xc7a2('0xe'),'required':[!![],_0xc7a2('0xf')]},'callerId':{'type':_0xc7a2('0xe')},'callbackUrl':{'type':'string'}});var hangupValidation=new Schema({'userId':{'type':_0xc7a2('0xd'),'required':[!![],'userId\x20is\x20required']},'sessionId':{'type':_0xc7a2('0xe'),'required':![]}});var answerValidation=new Schema({'userId':{'type':_0xc7a2('0xd'),'required':[!![],_0xc7a2('0x10')]},'sessionId':{'type':'string','required':![]}});var transferValidation=new Schema({'userId':{'type':_0xc7a2('0xd'),'required':[!![],_0xc7a2('0x10')]},'sessionId':{'type':_0xc7a2('0xe'),'required':[!![],'sessionId\x20is\x20required']},'transferNumber':{'type':_0xc7a2('0xe'),'required':[!![],_0xc7a2('0x11')]}});var holdValidation=new Schema({'userId':{'type':_0xc7a2('0xd'),'required':[!![],_0xc7a2('0x10')]},'sessionId':{'type':_0xc7a2('0xe'),'required':![]}});var unholdValidation=new Schema({'userId':{'type':_0xc7a2('0xd'),'required':[!![],_0xc7a2('0x10')]},'sessionId':{'type':_0xc7a2('0xe'),'required':![]}});var callsValidation=new Schema({'userId':{'type':_0xc7a2('0xd'),'required':[!![],_0xc7a2('0x10')]}});var conferenceValidation=new Schema({'userId':{'type':_0xc7a2('0xd'),'required':[!![],_0xc7a2('0x10')]}});function emit(_0x26d678,_0x2c3338,_0x2bc321){logger['info'](_0x26d678,_0x2c3338,JSON[_0xc7a2('0x12')](_0x2bc321));io['to'](_0x26d678)['emit'](_0x2c3338,_0x2bc321);}function handleError(_0x2414f4){return function(_0x302d54){console[_0xc7a2('0x13')](_0xc7a2('0x14'),_0x302d54,_0x302d54 instanceof RangeError);logger['error'](_0x302d54['stack']);if(_0x302d54 instanceof RangeError){if(_0x302d54[_0xc7a2('0x15')]){delete _0x302d54[_0xc7a2('0x15')];}_0x2414f4['status'](0x194)['send'](_0x302d54);}else{if(_0x302d54['name']){delete _0x302d54[_0xc7a2('0x15')];}_0x2414f4['status'](0x1f4)[_0xc7a2('0x16')](_0x302d54);}};}function checkError(){return function(_0x260be1){if(!_0x260be1){throw new RangeError('NotFound');}return _0x260be1;};}function respondWithRpcPromise(_0x40f3c4,_0x2dff1d){return new BPromise(function(_0x1b51a1,_0x35e0f6){var _0x337bdb=amiClient;return _0x337bdb[_0xc7a2('0x17')](_0x40f3c4,_0x2dff1d)[_0xc7a2('0x18')](function(_0x4a05e1){if(_0x4a05e1['error']){if(_0x4a05e1[_0xc7a2('0x19')][_0xc7a2('0x1a')]===0x1f4){return _0x35e0f6(_0x4a05e1['error'][_0xc7a2('0x1b')]);}return _0x1b51a1(_0x4a05e1[_0xc7a2('0x19')][_0xc7a2('0x1b')]);}else{_0x1b51a1(_0x4a05e1[_0xc7a2('0x1c')]);}})[_0xc7a2('0x1d')](function(_0x35584a){_0x35e0f6(_0x35584a);});});}function getAgent(_0x1beecd){return db[_0xc7a2('0x1e')]['findOne']({'where':{'id':_0x1beecd,'role':_0xc7a2('0x1f')}})['then'](checkError());}function getAgentCheckSession(_0x206eb7,_0x4cc3a8){return new BPromise(function(_0x20404b,_0x14182f){var _0xd93f19=respondWithRpcPromise(_0xc7a2('0x20'));var _0x4977f0=getAgent(_0x206eb7);Promise['all']([_0xd93f19,_0x4977f0])[_0xc7a2('0x18')](function(_0x2f3097){var _0x272c6b=_0x2f3097[0x0];var _0x305efb=_0x2f3097[0x1];var _0x3be88c=_[_0xc7a2('0x21')](_0x272c6b[_0xc7a2('0x22')],function(_0x5e970e){return _0x5e970e[_0xc7a2('0x23')]==_0x305efb['id']&&_0x5e970e[_0xc7a2('0x24')]==_0x4cc3a8;});if(_0x3be88c['length']==0x1){_0x20404b(_0x305efb);}else{_0x14182f(new RangeError(_0xc7a2('0x25')+_0x4cc3a8+_0xc7a2('0x26')));}});});}exports[_0xc7a2('0x27')]=function(_0x517df7,_0x2820a9){logger['info'](_0xc7a2('0x28'),_0x517df7['body']);var _0x5cd5ef=originateValidation[_0xc7a2('0xc')](_0x517df7['body']);if(_0x5cd5ef['length']>0x0){return _0x2820a9[_0xc7a2('0x29')](0x190)['json'](_0x5cd5ef);}var _0x3df1d2=_0x517df7['body'][_0xc7a2('0x2a')];var _0x2a8a26=_0x517df7[_0xc7a2('0x2b')][_0xc7a2('0x2c')];var _0x3d5d7e=_0x517df7[_0xc7a2('0x2b')][_0xc7a2('0x2d')];var _0x2a3bfb=_0x517df7[_0xc7a2('0x2b')][_0xc7a2('0x2e')];return getAgent(_0x3df1d2)['then'](function(_0x30234f){logger[_0xc7a2('0x2f')]('entityFound:',_0x30234f[_0xc7a2('0x15')]);emit(util[_0xc7a2('0x30')](_0xc7a2('0x31'),_0x30234f[_0xc7a2('0x15')]),_0xc7a2('0x32'),{'callNumber':_0x2a8a26,'callerId':_0x3d5d7e,'callbackUrl':_0x2a3bfb});return _0x2820a9[_0xc7a2('0x29')](0xc8)[_0xc7a2('0x33')]({'error':![],'message':'originate\x20executed!'});})[_0xc7a2('0x1d')](handleError(_0x2820a9));};exports[_0xc7a2('0x34')]=function(_0x468151,_0x49ad1f){logger[_0xc7a2('0x2f')](_0xc7a2('0x35'),_0x468151['body']);var _0x366706=hangupValidation[_0xc7a2('0xc')](_0x468151[_0xc7a2('0x2b')]);if(_0x366706[_0xc7a2('0x36')]>0x0){return _0x49ad1f[_0xc7a2('0x29')](0x190)[_0xc7a2('0x33')](_0x366706);}var _0x8559fe=_0x468151[_0xc7a2('0x2b')]['userId'];var _0xd418ee=_0x468151['body'][_0xc7a2('0x24')];return getAgent(_0x8559fe)[_0xc7a2('0x18')](function(_0x2cd014){logger[_0xc7a2('0x2f')](_0xc7a2('0x37'),_0x2cd014[_0xc7a2('0x15')]);emit(util[_0xc7a2('0x30')](_0xc7a2('0x31'),_0x2cd014['name']),_0xc7a2('0x38'),{'sessionId':_0xd418ee});return _0x49ad1f[_0xc7a2('0x29')](0xc8)[_0xc7a2('0x33')]({'error':![],'message':_0xc7a2('0x39')});})[_0xc7a2('0x1d')](handleError(_0x49ad1f));};exports[_0xc7a2('0x3a')]=function(_0x4c99de,_0x5ebb9c){logger['info'](_0xc7a2('0x3b'),_0x4c99de[_0xc7a2('0x2b')]);var _0x28ed1c=answerValidation[_0xc7a2('0xc')](_0x4c99de[_0xc7a2('0x2b')]);if(_0x28ed1c[_0xc7a2('0x36')]>0x0){return _0x5ebb9c[_0xc7a2('0x29')](0x190)[_0xc7a2('0x33')](_0x28ed1c);}var _0x246482=_0x4c99de['body']['userId'];var _0x4bcb42=_0x4c99de[_0xc7a2('0x2b')][_0xc7a2('0x24')];return getAgent(_0x246482)['then'](function(_0x44f2e9){logger[_0xc7a2('0x2f')](_0xc7a2('0x37'),_0x44f2e9['name']);emit(util[_0xc7a2('0x30')]('user:%s',_0x44f2e9[_0xc7a2('0x15')]),_0xc7a2('0x3c'),{'sessionId':_0x4bcb42});return _0x5ebb9c['status'](0xc8)['json']({'error':![],'message':_0xc7a2('0x3d')});})[_0xc7a2('0x1d')](handleError(_0x5ebb9c));};exports['hold']=function(_0x8b8cc2,_0x404e48){logger[_0xc7a2('0x2f')](_0xc7a2('0x3e'),_0x8b8cc2[_0xc7a2('0x2b')]);var _0xa81aa3=holdValidation['validate'](_0x8b8cc2[_0xc7a2('0x2b')]);if(_0xa81aa3[_0xc7a2('0x36')]>0x0){return _0x404e48[_0xc7a2('0x29')](0x190)[_0xc7a2('0x33')](_0xa81aa3);}var _0x54fc41=_0x8b8cc2[_0xc7a2('0x2b')][_0xc7a2('0x2a')];var _0x2adcc6=_0x8b8cc2[_0xc7a2('0x2b')][_0xc7a2('0x24')];return getAgent(_0x54fc41)[_0xc7a2('0x18')](function(_0x7378ed){logger[_0xc7a2('0x2f')]('entityFound:',_0x7378ed[_0xc7a2('0x15')]);emit(util[_0xc7a2('0x30')](_0xc7a2('0x31'),_0x7378ed[_0xc7a2('0x15')]),'webbar:hold',{'sessionId':_0x2adcc6});return _0x404e48[_0xc7a2('0x29')](0xc8)[_0xc7a2('0x33')]({'error':![],'message':'hold\x20executed!'});})[_0xc7a2('0x1d')](handleError(_0x404e48));};exports[_0xc7a2('0x3f')]=function(_0xb09c6f,_0x457318){logger[_0xc7a2('0x2f')]('unhold\x20fired:',_0xb09c6f[_0xc7a2('0x2b')]);var _0x44716e=unholdValidation[_0xc7a2('0xc')](_0xb09c6f['body']);if(_0x44716e['length']>0x0){return _0x457318[_0xc7a2('0x29')](0x190)['json'](_0x44716e);}var _0x4944b7=_0xb09c6f[_0xc7a2('0x2b')][_0xc7a2('0x2a')];var _0x4a6cb2=_0xb09c6f['body'][_0xc7a2('0x24')];return getAgent(_0x4944b7)[_0xc7a2('0x18')](function(_0x119355){logger[_0xc7a2('0x2f')](_0xc7a2('0x37'),_0x119355['name']);emit(util[_0xc7a2('0x30')](_0xc7a2('0x31'),_0x119355['name']),_0xc7a2('0x40'),{'sessionId':_0x4a6cb2});return _0x457318[_0xc7a2('0x29')](0xc8)[_0xc7a2('0x33')]({'error':![],'message':_0xc7a2('0x41')});})[_0xc7a2('0x1d')](handleError(_0x457318));};exports['calls']=function(_0xd91777,_0x40afd2){logger[_0xc7a2('0x2f')]('calls\x20fired:',_0x40afd2[_0xc7a2('0x2b')]);var _0x3174ef=callsValidation[_0xc7a2('0xc')](_0xd91777[_0xc7a2('0x2b')]);if(_0x3174ef[_0xc7a2('0x36')]>0x0){return _0x40afd2[_0xc7a2('0x29')](0x190)['json'](_0x3174ef);}var _0x458ee7=_0xd91777[_0xc7a2('0x2b')][_0xc7a2('0x2a')];var _0x332e8e=respondWithRpcPromise(_0xc7a2('0x20'));var _0x1f0762=getAgent(_0x458ee7);return Promise[_0xc7a2('0x42')]([_0x332e8e,_0x1f0762])['then'](function(_0x2b1bb3){var _0x4e51a8=_0x2b1bb3[0x0];var _0x4e1efa=_0x2b1bb3[0x1];var _0x38df09=_[_0xc7a2('0x21')](_0x4e51a8[_0xc7a2('0x22')],function(_0x4b3045){return _0x4b3045[_0xc7a2('0x23')]==_0x4e1efa['id'];});return _0x40afd2['status'](0xc8)['json']({'count':_0x38df09[_0xc7a2('0x36')],'rows':_0x38df09});})[_0xc7a2('0x1d')](handleError(_0x40afd2));};exports[_0xc7a2('0x43')]=function(_0x1c915b,_0x2fd2b2){logger[_0xc7a2('0x2f')]('conference\x20fired:',_0x1c915b['body']);var _0x5a91d1=conferenceValidation[_0xc7a2('0xc')](_0x1c915b['body']);if(_0x5a91d1['length']>0x0){return _0x2fd2b2['status'](0x190)['json'](_0x5a91d1);}var _0x100b1f=_0x1c915b[_0xc7a2('0x2b')][_0xc7a2('0x2a')];return getAgent(_0x100b1f)[_0xc7a2('0x18')](function(_0x52c83a){logger[_0xc7a2('0x2f')](_0xc7a2('0x37'),_0x52c83a[_0xc7a2('0x15')]);emit(util[_0xc7a2('0x30')](_0xc7a2('0x31'),_0x52c83a[_0xc7a2('0x15')]),_0xc7a2('0x44'));return _0x2fd2b2[_0xc7a2('0x29')](0xc8)[_0xc7a2('0x33')]({'error':![],'message':_0xc7a2('0x45')});})[_0xc7a2('0x1d')](handleError(_0x2fd2b2));};exports['transfer']=function(_0x531924,_0x3613be){logger['info'](_0xc7a2('0x46'),_0x531924[_0xc7a2('0x2b')]);var _0x3dc131=transferValidation[_0xc7a2('0xc')](_0x531924['body']);if(_0x3dc131[_0xc7a2('0x36')]>0x0){return _0x3613be[_0xc7a2('0x29')](0x190)[_0xc7a2('0x33')](_0x3dc131);}var _0xc7ce86=_0x531924[_0xc7a2('0x2b')]['userId'];var _0x1d387c=_0x531924[_0xc7a2('0x2b')][_0xc7a2('0x24')];var _0x45044a=_0x531924[_0xc7a2('0x2b')]['transferNumber'];return getAgent(_0xc7ce86)[_0xc7a2('0x18')](function(_0x4ce8d0){logger['info'](_0xc7a2('0x37'),_0x4ce8d0[_0xc7a2('0x15')]);emit(util[_0xc7a2('0x30')]('user:%s',_0x4ce8d0[_0xc7a2('0x15')]),_0xc7a2('0x47'),{'sessionId':_0x1d387c,'transferNumber':_0x45044a});return _0x3613be['status'](0xc8)[_0xc7a2('0x33')]({'error':![],'message':_0xc7a2('0x48')});})[_0xc7a2('0x1d')](handleError(_0x3613be));}; \ No newline at end of file +var _0xd3d1=['send','NotFound','request','then','error','code','message','result','catch','User','findOne','agent','VoiceChannels','filter','rows','UserId','length','sessionId\x20','originate','originate\x20fired:','body','json','callNumber','callerId','entityFound:','format','user:%s','webbar:originate','hangup\x20fired:','webbar:hangup','hangup\x20executed!','answer','userId','webbar:answer','answer\x20executed!','hold','hold\x20fired:','sessionId','webbar:hold','unhold\x20fired:','webbar:unhold','unhold\x20executed!','calls','calls\x20fired:','all','conference','conference\x20fired:','webbar:conference','conference\x20executed!','transfer','transfer\x20fired:','transferNumber','webbar:transfer','transfer\x20executed!','path','lodash','util','bluebird','jayson/promise','client','http','../../config/logger','webbarapi','ioredis','redis','defaults','localhost','socket.io-emitter','validate','number','userId\x20is\x20required','callNumber\x20is\x20required','string','sessionId\x20is\x20required','info','handleError:','stack','name','status'];(function(_0x3ce3c,_0x319337){var _0x55a2c9=function(_0x1568d0){while(--_0x1568d0){_0x3ce3c['push'](_0x3ce3c['shift']());}};_0x55a2c9(++_0x319337);}(_0xd3d1,0x172));var _0x1d3d=function(_0x20a584,_0xe384a5){_0x20a584=_0x20a584-0x0;var _0x4b41a8=_0xd3d1[_0x20a584];return _0x4b41a8;};'use strict';var path=require(_0x1d3d('0x0'));var fs=require('fs');var _=require(_0x1d3d('0x1'));var db=require('../../mysqldb')['db'];var config=require('../../config/environment');var util=require(_0x1d3d('0x2'));var BPromise=require(_0x1d3d('0x3'));var jayson=require(_0x1d3d('0x4'));var amiClient=jayson[_0x1d3d('0x5')][_0x1d3d('0x6')]({'port':0x232a});var logger=require(_0x1d3d('0x7'))(_0x1d3d('0x8'));var Redis=require(_0x1d3d('0x9'));config[_0x1d3d('0xa')]=_[_0x1d3d('0xb')](config[_0x1d3d('0xa')],{'host':_0x1d3d('0xc'),'port':0x18eb});var io=require(_0x1d3d('0xd'))(new Redis(config[_0x1d3d('0xa')]));var Schema=require(_0x1d3d('0xe'));var originateValidation=new Schema({'userId':{'type':_0x1d3d('0xf'),'required':[!![],_0x1d3d('0x10')]},'callNumber':{'type':'string','required':[!![],_0x1d3d('0x11')]},'callerId':{'type':_0x1d3d('0x12')},'callbackUrl':{'type':_0x1d3d('0x12')}});var hangupValidation=new Schema({'userId':{'type':_0x1d3d('0xf'),'required':[!![],_0x1d3d('0x10')]},'sessionId':{'type':_0x1d3d('0x12'),'required':![]}});var answerValidation=new Schema({'userId':{'type':_0x1d3d('0xf'),'required':[!![],_0x1d3d('0x10')]},'sessionId':{'type':_0x1d3d('0x12'),'required':![]}});var transferValidation=new Schema({'userId':{'type':_0x1d3d('0xf'),'required':[!![],_0x1d3d('0x10')]},'sessionId':{'type':'string','required':[!![],_0x1d3d('0x13')]},'transferNumber':{'type':_0x1d3d('0x12'),'required':[!![],'transferNumber\x20is\x20required']}});var holdValidation=new Schema({'userId':{'type':'number','required':[!![],_0x1d3d('0x10')]},'sessionId':{'type':_0x1d3d('0x12'),'required':![]}});var unholdValidation=new Schema({'userId':{'type':_0x1d3d('0xf'),'required':[!![],'userId\x20is\x20required']},'sessionId':{'type':_0x1d3d('0x12'),'required':![]}});var callsValidation=new Schema({'userId':{'type':'number','required':[!![],_0x1d3d('0x10')]}});var conferenceValidation=new Schema({'userId':{'type':_0x1d3d('0xf'),'required':[!![],_0x1d3d('0x10')]}});function emit(_0x24bb8c,_0x21c2e4,_0x1bdbdc){logger[_0x1d3d('0x14')](_0x24bb8c,_0x21c2e4,JSON['stringify'](_0x1bdbdc));io['to'](_0x24bb8c)['emit'](_0x21c2e4,_0x1bdbdc);}function handleError(_0x316ab4){return function(_0xe0a583){console['log'](_0x1d3d('0x15'),_0xe0a583,_0xe0a583 instanceof RangeError);logger['error'](_0xe0a583[_0x1d3d('0x16')]);if(_0xe0a583 instanceof RangeError){if(_0xe0a583[_0x1d3d('0x17')]){delete _0xe0a583[_0x1d3d('0x17')];}_0x316ab4[_0x1d3d('0x18')](0x194)['send'](_0xe0a583);}else{if(_0xe0a583[_0x1d3d('0x17')]){delete _0xe0a583['name'];}_0x316ab4['status'](0x1f4)[_0x1d3d('0x19')](_0xe0a583);}};}function checkError(){return function(_0x2bfac3){if(!_0x2bfac3){throw new RangeError(_0x1d3d('0x1a'));}return _0x2bfac3;};}function respondWithRpcPromise(_0x344a03,_0xa6f180){return new BPromise(function(_0xe4afa2,_0x471df5){var _0xa55c43=amiClient;return _0xa55c43[_0x1d3d('0x1b')](_0x344a03,_0xa6f180)[_0x1d3d('0x1c')](function(_0x1610a6){if(_0x1610a6['error']){if(_0x1610a6[_0x1d3d('0x1d')][_0x1d3d('0x1e')]===0x1f4){return _0x471df5(_0x1610a6['error'][_0x1d3d('0x1f')]);}return _0xe4afa2(_0x1610a6['error'][_0x1d3d('0x1f')]);}else{_0xe4afa2(_0x1610a6[_0x1d3d('0x20')]);}})[_0x1d3d('0x21')](function(_0x4235fd){_0x471df5(_0x4235fd);});});}function getAgent(_0x44e03e){return db[_0x1d3d('0x22')][_0x1d3d('0x23')]({'where':{'id':_0x44e03e,'role':_0x1d3d('0x24')}})[_0x1d3d('0x1c')](checkError());}function getAgentCheckSession(_0x2df7b7,_0x172dbd){return new BPromise(function(_0x4f0aa7,_0x3f5681){var _0x5b2986=respondWithRpcPromise(_0x1d3d('0x25'));var _0x2bcc2=getAgent(_0x2df7b7);Promise['all']([_0x5b2986,_0x2bcc2])[_0x1d3d('0x1c')](function(_0x16b7b3){var _0x3cb011=_0x16b7b3[0x0];var _0x2a3812=_0x16b7b3[0x1];var _0x4abbfc=_[_0x1d3d('0x26')](_0x3cb011[_0x1d3d('0x27')],function(_0x5d1b6c){return _0x5d1b6c[_0x1d3d('0x28')]==_0x2a3812['id']&&_0x5d1b6c['sessionId']==_0x172dbd;});if(_0x4abbfc[_0x1d3d('0x29')]==0x1){_0x4f0aa7(_0x2a3812);}else{_0x3f5681(new RangeError(_0x1d3d('0x2a')+_0x172dbd+'\x20not\x20found!'));}});});}exports[_0x1d3d('0x2b')]=function(_0x192f60,_0x102b70){logger[_0x1d3d('0x14')](_0x1d3d('0x2c'),_0x192f60[_0x1d3d('0x2d')]);var _0x4fc03a=originateValidation[_0x1d3d('0xe')](_0x192f60[_0x1d3d('0x2d')]);if(_0x4fc03a['length']>0x0){return _0x102b70[_0x1d3d('0x18')](0x190)[_0x1d3d('0x2e')](_0x4fc03a);}var _0x4017b2=_0x192f60[_0x1d3d('0x2d')]['userId'];var _0x4a1e67=_0x192f60[_0x1d3d('0x2d')][_0x1d3d('0x2f')];var _0x47a8e3=_0x192f60[_0x1d3d('0x2d')][_0x1d3d('0x30')];var _0x2888f9=_0x192f60[_0x1d3d('0x2d')]['callbackUrl'];return getAgent(_0x4017b2)['then'](function(_0x29fa6c){logger['info'](_0x1d3d('0x31'),_0x29fa6c[_0x1d3d('0x17')]);emit(util[_0x1d3d('0x32')](_0x1d3d('0x33'),_0x29fa6c[_0x1d3d('0x17')]),_0x1d3d('0x34'),{'callNumber':_0x4a1e67,'callerId':_0x47a8e3,'callbackUrl':_0x2888f9});return _0x102b70[_0x1d3d('0x18')](0xc8)[_0x1d3d('0x2e')]({'error':![],'message':'originate\x20executed!'});})[_0x1d3d('0x21')](handleError(_0x102b70));};exports['hangup']=function(_0x58ae8e,_0x206e4c){logger['info'](_0x1d3d('0x35'),_0x58ae8e[_0x1d3d('0x2d')]);var _0x182083=hangupValidation[_0x1d3d('0xe')](_0x58ae8e['body']);if(_0x182083['length']>0x0){return _0x206e4c[_0x1d3d('0x18')](0x190)['json'](_0x182083);}var _0x290853=_0x58ae8e[_0x1d3d('0x2d')]['userId'];var _0x1ad7a6=_0x58ae8e[_0x1d3d('0x2d')]['sessionId'];return getAgent(_0x290853)[_0x1d3d('0x1c')](function(_0x40f8ca){logger[_0x1d3d('0x14')](_0x1d3d('0x31'),_0x40f8ca[_0x1d3d('0x17')]);emit(util[_0x1d3d('0x32')]('user:%s',_0x40f8ca[_0x1d3d('0x17')]),_0x1d3d('0x36'),{'sessionId':_0x1ad7a6});return _0x206e4c[_0x1d3d('0x18')](0xc8)[_0x1d3d('0x2e')]({'error':![],'message':_0x1d3d('0x37')});})['catch'](handleError(_0x206e4c));};exports[_0x1d3d('0x38')]=function(_0x2ccba6,_0x1c0cc6){logger[_0x1d3d('0x14')]('answer\x20fired:',_0x2ccba6[_0x1d3d('0x2d')]);var _0x977ea8=answerValidation[_0x1d3d('0xe')](_0x2ccba6[_0x1d3d('0x2d')]);if(_0x977ea8[_0x1d3d('0x29')]>0x0){return _0x1c0cc6['status'](0x190)['json'](_0x977ea8);}var _0x229f48=_0x2ccba6[_0x1d3d('0x2d')][_0x1d3d('0x39')];var _0x66efd=_0x2ccba6[_0x1d3d('0x2d')]['sessionId'];return getAgent(_0x229f48)[_0x1d3d('0x1c')](function(_0x557a25){logger[_0x1d3d('0x14')](_0x1d3d('0x31'),_0x557a25[_0x1d3d('0x17')]);emit(util[_0x1d3d('0x32')]('user:%s',_0x557a25[_0x1d3d('0x17')]),_0x1d3d('0x3a'),{'sessionId':_0x66efd});return _0x1c0cc6[_0x1d3d('0x18')](0xc8)[_0x1d3d('0x2e')]({'error':![],'message':_0x1d3d('0x3b')});})[_0x1d3d('0x21')](handleError(_0x1c0cc6));};exports[_0x1d3d('0x3c')]=function(_0x55aa8a,_0x3c5ccf){logger['info'](_0x1d3d('0x3d'),_0x55aa8a[_0x1d3d('0x2d')]);var _0x5e8ec0=holdValidation[_0x1d3d('0xe')](_0x55aa8a['body']);if(_0x5e8ec0[_0x1d3d('0x29')]>0x0){return _0x3c5ccf['status'](0x190)[_0x1d3d('0x2e')](_0x5e8ec0);}var _0xebd1f4=_0x55aa8a[_0x1d3d('0x2d')][_0x1d3d('0x39')];var _0xea9cf2=_0x55aa8a[_0x1d3d('0x2d')][_0x1d3d('0x3e')];return getAgent(_0xebd1f4)[_0x1d3d('0x1c')](function(_0x59e88a){logger['info']('entityFound:',_0x59e88a[_0x1d3d('0x17')]);emit(util[_0x1d3d('0x32')](_0x1d3d('0x33'),_0x59e88a[_0x1d3d('0x17')]),_0x1d3d('0x3f'),{'sessionId':_0xea9cf2});return _0x3c5ccf[_0x1d3d('0x18')](0xc8)['json']({'error':![],'message':'hold\x20executed!'});})['catch'](handleError(_0x3c5ccf));};exports['unhold']=function(_0x3dc5ca,_0x21620d){logger[_0x1d3d('0x14')](_0x1d3d('0x40'),_0x3dc5ca[_0x1d3d('0x2d')]);var _0x363f4c=unholdValidation[_0x1d3d('0xe')](_0x3dc5ca[_0x1d3d('0x2d')]);if(_0x363f4c[_0x1d3d('0x29')]>0x0){return _0x21620d[_0x1d3d('0x18')](0x190)[_0x1d3d('0x2e')](_0x363f4c);}var _0xb88d59=_0x3dc5ca[_0x1d3d('0x2d')][_0x1d3d('0x39')];var _0x311b05=_0x3dc5ca['body'][_0x1d3d('0x3e')];return getAgent(_0xb88d59)[_0x1d3d('0x1c')](function(_0x1bbfc8){logger[_0x1d3d('0x14')]('entityFound:',_0x1bbfc8[_0x1d3d('0x17')]);emit(util['format']('user:%s',_0x1bbfc8[_0x1d3d('0x17')]),_0x1d3d('0x41'),{'sessionId':_0x311b05});return _0x21620d['status'](0xc8)[_0x1d3d('0x2e')]({'error':![],'message':_0x1d3d('0x42')});})['catch'](handleError(_0x21620d));};exports[_0x1d3d('0x43')]=function(_0x7af4dd,_0x15d9b4){logger[_0x1d3d('0x14')](_0x1d3d('0x44'),_0x15d9b4[_0x1d3d('0x2d')]);var _0x213b0b=callsValidation[_0x1d3d('0xe')](_0x7af4dd[_0x1d3d('0x2d')]);if(_0x213b0b['length']>0x0){return _0x15d9b4[_0x1d3d('0x18')](0x190)['json'](_0x213b0b);}var _0x482c31=_0x7af4dd['body']['userId'];var _0x17c3ab=respondWithRpcPromise(_0x1d3d('0x25'));var _0x32aaa2=getAgent(_0x482c31);return Promise[_0x1d3d('0x45')]([_0x17c3ab,_0x32aaa2])['then'](function(_0xecfc7e){var _0x480439=_0xecfc7e[0x0];var _0x44273d=_0xecfc7e[0x1];var _0xd3f336=_['filter'](_0x480439[_0x1d3d('0x27')],function(_0x45419e){return _0x45419e['UserId']==_0x44273d['id'];});return _0x15d9b4[_0x1d3d('0x18')](0xc8)[_0x1d3d('0x2e')]({'count':_0xd3f336[_0x1d3d('0x29')],'rows':_0xd3f336});})[_0x1d3d('0x21')](handleError(_0x15d9b4));};exports[_0x1d3d('0x46')]=function(_0x16e757,_0x4e47d5){logger[_0x1d3d('0x14')](_0x1d3d('0x47'),_0x16e757[_0x1d3d('0x2d')]);var _0x1183c0=conferenceValidation[_0x1d3d('0xe')](_0x16e757['body']);if(_0x1183c0[_0x1d3d('0x29')]>0x0){return _0x4e47d5['status'](0x190)[_0x1d3d('0x2e')](_0x1183c0);}var _0x5dcad1=_0x16e757[_0x1d3d('0x2d')][_0x1d3d('0x39')];return getAgent(_0x5dcad1)[_0x1d3d('0x1c')](function(_0x1711ee){logger[_0x1d3d('0x14')](_0x1d3d('0x31'),_0x1711ee[_0x1d3d('0x17')]);emit(util['format'](_0x1d3d('0x33'),_0x1711ee[_0x1d3d('0x17')]),_0x1d3d('0x48'));return _0x4e47d5[_0x1d3d('0x18')](0xc8)[_0x1d3d('0x2e')]({'error':![],'message':_0x1d3d('0x49')});})['catch'](handleError(_0x4e47d5));};exports[_0x1d3d('0x4a')]=function(_0x2ca216,_0xa8891a){logger[_0x1d3d('0x14')](_0x1d3d('0x4b'),_0x2ca216['body']);var _0xe83c1d=transferValidation[_0x1d3d('0xe')](_0x2ca216[_0x1d3d('0x2d')]);if(_0xe83c1d['length']>0x0){return _0xa8891a[_0x1d3d('0x18')](0x190)['json'](_0xe83c1d);}var _0x2ee6ca=_0x2ca216['body'][_0x1d3d('0x39')];var _0x378878=_0x2ca216[_0x1d3d('0x2d')]['sessionId'];var _0x389330=_0x2ca216[_0x1d3d('0x2d')][_0x1d3d('0x4c')];return getAgent(_0x2ee6ca)['then'](function(_0x19a126){logger[_0x1d3d('0x14')](_0x1d3d('0x31'),_0x19a126['name']);emit(util[_0x1d3d('0x32')](_0x1d3d('0x33'),_0x19a126[_0x1d3d('0x17')]),_0x1d3d('0x4d'),{'sessionId':_0x378878,'transferNumber':_0x389330});return _0xa8891a[_0x1d3d('0x18')](0xc8)['json']({'error':![],'message':_0x1d3d('0x4e')});})[_0x1d3d('0x21')](handleError(_0xa8891a));}; \ No newline at end of file diff --git a/server/api/whatsappAccount/index.js b/server/api/whatsappAccount/index.js index c765776..5d44a0c 100644 --- a/server/api/whatsappAccount/index.js +++ b/server/api/whatsappAccount/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x5f66=['util','connect-timeout','express','Router','fs-extra','../../components/auth/service','../../config/environment','get','isAuthenticated','/describe','describe','/:id','/:id/dispositions','getDispositions','/:id/users','getAgents','/:id/applications','getApplications','post','create','addDisposition','/:id/canned_answers','addAgents','addApplications','notify','send','put','update','delete','destroy','removeAnswers','exports'];(function(_0x383666,_0x566149){var _0x97a428=function(_0x4151af){while(--_0x4151af){_0x383666['push'](_0x383666['shift']());}};_0x97a428(++_0x566149);}(_0x5f66,0x1a0));var _0x65f6=function(_0x3ab9ee,_0x4a74b8){_0x3ab9ee=_0x3ab9ee-0x0;var _0x82ee88=_0x5f66[_0x3ab9ee];return _0x82ee88;};'use strict';var multer=require('multer');var util=require(_0x65f6('0x0'));var path=require('path');var timeout=require(_0x65f6('0x1'));var express=require(_0x65f6('0x2'));var router=express[_0x65f6('0x3')]();var fs_extra=require(_0x65f6('0x4'));var auth=require(_0x65f6('0x5'));var interaction=require('../../components/interaction/service');var config=require(_0x65f6('0x6'));var controller=require('./whatsappAccount.controller');router[_0x65f6('0x7')]('/',auth[_0x65f6('0x8')](),controller['index']);router['get'](_0x65f6('0x9'),auth[_0x65f6('0x8')](),controller[_0x65f6('0xa')]);router[_0x65f6('0x7')](_0x65f6('0xb'),auth[_0x65f6('0x8')](),controller['show']);router['get'](_0x65f6('0xc'),auth[_0x65f6('0x8')](),controller[_0x65f6('0xd')]);router[_0x65f6('0x7')]('/:id/canned_answers',auth[_0x65f6('0x8')](),controller['getAnswers']);router['get'](_0x65f6('0xe'),auth['isAuthenticated'](),controller[_0x65f6('0xf')]);router['get'](_0x65f6('0x10'),auth[_0x65f6('0x8')](),controller[_0x65f6('0x11')]);router[_0x65f6('0x12')]('/',auth[_0x65f6('0x8')](),controller[_0x65f6('0x13')]);router[_0x65f6('0x12')](_0x65f6('0xc'),auth[_0x65f6('0x8')](),controller[_0x65f6('0x14')]);router['post'](_0x65f6('0x15'),auth['isAuthenticated'](),controller['addAnswer']);router[_0x65f6('0x12')](_0x65f6('0xe'),auth[_0x65f6('0x8')](),controller[_0x65f6('0x16')]);router[_0x65f6('0x12')](_0x65f6('0x10'),auth[_0x65f6('0x8')](),controller[_0x65f6('0x17')]);router['post']('/:id/notify',controller[_0x65f6('0x18')]);router['post']('/:id/send',auth['isAuthenticated'](),controller[_0x65f6('0x19')]);router[_0x65f6('0x1a')]('/:id',auth[_0x65f6('0x8')](),controller[_0x65f6('0x1b')]);router[_0x65f6('0x1c')](_0x65f6('0xb'),auth[_0x65f6('0x8')](),controller[_0x65f6('0x1d')]);router['delete'](_0x65f6('0xc'),auth['isAuthenticated'](),controller['removeDispositions']);router[_0x65f6('0x1c')](_0x65f6('0x15'),auth['isAuthenticated'](),controller[_0x65f6('0x1e')]);router[_0x65f6('0x1c')](_0x65f6('0xe'),auth[_0x65f6('0x8')](),controller['removeAgents']);module[_0x65f6('0x1f')]=router; \ No newline at end of file +var _0x47c5=['/:id/notify','notify','send','update','delete','removeAnswers','removeAgents','multer','util','path','connect-timeout','express','Router','../../components/auth/service','../../components/interaction/service','./whatsappAccount.controller','get','index','/describe','isAuthenticated','describe','/:id','show','/:id/dispositions','getDispositions','/:id/canned_answers','getAnswers','/:id/users','/:id/applications','getApplications','post','create','addDisposition','addAnswer','addApplications'];(function(_0x5b644e,_0x2e5e07){var _0x49c6bf=function(_0x3032d9){while(--_0x3032d9){_0x5b644e['push'](_0x5b644e['shift']());}};_0x49c6bf(++_0x2e5e07);}(_0x47c5,0x165));var _0x547c=function(_0x40676d,_0x531472){_0x40676d=_0x40676d-0x0;var _0x4623eb=_0x47c5[_0x40676d];return _0x4623eb;};'use strict';var multer=require(_0x547c('0x0'));var util=require(_0x547c('0x1'));var path=require(_0x547c('0x2'));var timeout=require(_0x547c('0x3'));var express=require(_0x547c('0x4'));var router=express[_0x547c('0x5')]();var fs_extra=require('fs-extra');var auth=require(_0x547c('0x6'));var interaction=require(_0x547c('0x7'));var config=require('../../config/environment');var controller=require(_0x547c('0x8'));router[_0x547c('0x9')]('/',auth['isAuthenticated'](),controller[_0x547c('0xa')]);router[_0x547c('0x9')](_0x547c('0xb'),auth[_0x547c('0xc')](),controller[_0x547c('0xd')]);router[_0x547c('0x9')](_0x547c('0xe'),auth[_0x547c('0xc')](),controller[_0x547c('0xf')]);router[_0x547c('0x9')](_0x547c('0x10'),auth[_0x547c('0xc')](),controller[_0x547c('0x11')]);router[_0x547c('0x9')](_0x547c('0x12'),auth[_0x547c('0xc')](),controller[_0x547c('0x13')]);router['get'](_0x547c('0x14'),auth[_0x547c('0xc')](),controller['getAgents']);router[_0x547c('0x9')](_0x547c('0x15'),auth[_0x547c('0xc')](),controller[_0x547c('0x16')]);router[_0x547c('0x17')]('/',auth[_0x547c('0xc')](),controller[_0x547c('0x18')]);router[_0x547c('0x17')](_0x547c('0x10'),auth[_0x547c('0xc')](),controller[_0x547c('0x19')]);router[_0x547c('0x17')](_0x547c('0x12'),auth[_0x547c('0xc')](),controller[_0x547c('0x1a')]);router[_0x547c('0x17')](_0x547c('0x14'),auth[_0x547c('0xc')](),controller['addAgents']);router['post'](_0x547c('0x15'),auth[_0x547c('0xc')](),controller[_0x547c('0x1b')]);router['post'](_0x547c('0x1c'),controller[_0x547c('0x1d')]);router[_0x547c('0x17')]('/:id/send',auth[_0x547c('0xc')](),controller[_0x547c('0x1e')]);router['put']('/:id',auth[_0x547c('0xc')](),controller[_0x547c('0x1f')]);router['delete'](_0x547c('0xe'),auth[_0x547c('0xc')](),controller['destroy']);router[_0x547c('0x20')](_0x547c('0x10'),auth[_0x547c('0xc')](),controller['removeDispositions']);router[_0x547c('0x20')](_0x547c('0x12'),auth[_0x547c('0xc')](),controller[_0x547c('0x21')]);router[_0x547c('0x20')](_0x547c('0x14'),auth[_0x547c('0xc')](),controller[_0x547c('0x22')]);module['exports']=router; \ No newline at end of file diff --git a/server/api/whatsappAccount/whatsappAccount.attributes.js b/server/api/whatsappAccount/whatsappAccount.attributes.js index 3f4c95d..2eed156 100644 --- a/server/api/whatsappAccount/whatsappAccount.attributes.js +++ b/server/api/whatsappAccount/whatsappAccount.attributes.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x95fd=['Account:\x20{{account.name}}
{{#queue}}Queue:\x20{{queue.name}}
{{/queue}}From\x20:\x20{{from}}','BOOLEAN','INTEGER','Enabled/disables\x20mandatory\x20dispo\x20on\x20a\x20queue','setDataValue','mandatoryDispositionPauseId','mandatoryDisposition','sequelize','randomstring','name','STRING','generate','ENUM','twilio','sinch'];(function(_0x258e7a,_0xfb3313){var _0x17c9ca=function(_0x22ab3c){while(--_0x22ab3c){_0x258e7a['push'](_0x258e7a['shift']());}};_0x17c9ca(++_0xfb3313);}(_0x95fd,0x16f));var _0xd95f=function(_0x4ba61f,_0x761aa3){_0x4ba61f=_0x4ba61f-0x0;var _0x50ffba=_0x95fd[_0x4ba61f];return _0x50ffba;};'use strict';var Sequelize=require(_0xd95f('0x0'));var rs=require(_0xd95f('0x1'));module['exports']={'name':{'type':Sequelize['STRING'],'unique':_0xd95f('0x2'),'allowNull':![]},'key':{'type':Sequelize[_0xd95f('0x3')],'allowNull':![]},'remote':{'type':Sequelize[_0xd95f('0x3')],'allowNull':![]},'token':{'type':Sequelize['STRING'],'defaultValue':function(){return rs[_0xd95f('0x4')]();}},'phone':{'type':Sequelize[_0xd95f('0x3')]},'type':{'type':Sequelize[_0xd95f('0x5')](_0xd95f('0x6'),_0xd95f('0x7'))},'accountSid':{'type':Sequelize[_0xd95f('0x3')]},'baseUrl':{'type':Sequelize[_0xd95f('0x3')]},'authToken':{'type':Sequelize['STRING']},'notificationTemplate':{'type':Sequelize['TEXT'],'defaultValue':function(){return _0xd95f('0x8');}},'notificationSound':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'notificationShake':{'type':Sequelize[_0xd95f('0x9')],'defaultValue':![]},'waitForTheAssignedAgent':{'type':Sequelize[_0xd95f('0xa')],'validate':{'min':0x1,'max':0x20c49b},'defaultValue':0xa},'queueTransfer':{'type':Sequelize[_0xd95f('0x9')],'defaultValue':![]},'queueTransferTimeout':{'type':Sequelize[_0xd95f('0xa')],'validate':{'min':0x1,'max':0x20c49b},'defaultValue':0x12c},'agentTransfer':{'type':Sequelize[_0xd95f('0x9')],'defaultValue':![]},'agentTransferTimeout':{'type':Sequelize[_0xd95f('0xa')],'validate':{'min':0x1,'max':0x20c49b},'defaultValue':0x12c},'mandatoryDispositionPauseId':{'type':Sequelize['INTEGER'],'comment':'Status\x20to\x20put\x20when\x20mandatory\x20disposition\x20is\x20enabled'},'mandatoryDisposition':{'type':Sequelize[_0xd95f('0x9')],'defaultValue':![],'comment':_0xd95f('0xb'),'set':function(_0x3b15a1){if(!_0x3b15a1){this[_0xd95f('0xc')](_0xd95f('0xd'),null);}this[_0xd95f('0xc')](_0xd95f('0xe'),_0x3b15a1);}},'description':{'type':Sequelize[_0xd95f('0x3')]}}; \ No newline at end of file +var _0xf649=['ENUM','sinch','Account:\x20{{account.name}}
{{#queue}}Queue:\x20{{queue.name}}
{{/queue}}From\x20:\x20{{from}}','BOOLEAN','INTEGER','Status\x20to\x20put\x20when\x20mandatory\x20disposition\x20is\x20enabled','Enabled/disables\x20mandatory\x20dispo\x20on\x20a\x20queue','setDataValue','mandatoryDispositionPauseId','mandatoryDisposition','randomstring','exports','name','STRING','generate'];(function(_0x58e0ae,_0x236bf2){var _0x32ac79=function(_0x4fe09d){while(--_0x4fe09d){_0x58e0ae['push'](_0x58e0ae['shift']());}};_0x32ac79(++_0x236bf2);}(_0xf649,0x1bd));var _0x9f64=function(_0x55d3c6,_0x491a7f){_0x55d3c6=_0x55d3c6-0x0;var _0x55a03b=_0xf649[_0x55d3c6];return _0x55a03b;};'use strict';var Sequelize=require('sequelize');var rs=require(_0x9f64('0x0'));module[_0x9f64('0x1')]={'name':{'type':Sequelize['STRING'],'unique':_0x9f64('0x2'),'allowNull':![]},'key':{'type':Sequelize[_0x9f64('0x3')],'allowNull':![]},'remote':{'type':Sequelize[_0x9f64('0x3')],'allowNull':![]},'token':{'type':Sequelize[_0x9f64('0x3')],'defaultValue':function(){return rs[_0x9f64('0x4')]();}},'phone':{'type':Sequelize[_0x9f64('0x3')]},'type':{'type':Sequelize[_0x9f64('0x5')]('twilio',_0x9f64('0x6'))},'accountSid':{'type':Sequelize['STRING']},'baseUrl':{'type':Sequelize['STRING']},'authToken':{'type':Sequelize['STRING']},'notificationTemplate':{'type':Sequelize['TEXT'],'defaultValue':function(){return _0x9f64('0x7');}},'notificationSound':{'type':Sequelize[_0x9f64('0x8')],'defaultValue':![]},'notificationShake':{'type':Sequelize[_0x9f64('0x8')],'defaultValue':![]},'waitForTheAssignedAgent':{'type':Sequelize['INTEGER'],'validate':{'min':0x1,'max':0x20c49b},'defaultValue':0xa},'queueTransfer':{'type':Sequelize[_0x9f64('0x8')],'defaultValue':![]},'queueTransferTimeout':{'type':Sequelize[_0x9f64('0x9')],'validate':{'min':0x1,'max':0x20c49b},'defaultValue':0x12c},'agentTransfer':{'type':Sequelize[_0x9f64('0x8')],'defaultValue':![]},'agentTransferTimeout':{'type':Sequelize[_0x9f64('0x9')],'validate':{'min':0x1,'max':0x20c49b},'defaultValue':0x12c},'mandatoryDispositionPauseId':{'type':Sequelize[_0x9f64('0x9')],'comment':_0x9f64('0xa')},'mandatoryDisposition':{'type':Sequelize[_0x9f64('0x8')],'defaultValue':![],'comment':_0x9f64('0xb'),'set':function(_0x50f1ff){if(!_0x50f1ff){this[_0x9f64('0xc')](_0x9f64('0xd'),null);}this[_0x9f64('0xc')](_0x9f64('0xe'),_0x50f1ff);}},'description':{'type':Sequelize['STRING']}}; \ No newline at end of file diff --git a/server/api/whatsappAccount/whatsappAccount.controller.js b/server/api/whatsappAccount/whatsappAccount.controller.js index dc01776..28b746e 100644 --- a/server/api/whatsappAccount/whatsappAccount.controller.js +++ b/server/api/whatsappAccount/whatsappAccount.controller.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x371d=['WhatsappInteraction','interaction','created','close','ContactId','AttachmentId','UserId','unshift','waitForTheAssignedAgent','Start','startRouting','receiveMessage','info','WhatsappAccount,\x20%s,\x20%s,\x20%s','entity\x20found','debug','WhatsappAccount,\x20%s,\x20%s,\x20%s,\x20%s','stringify','Content-Type','text/xml','\x0a','to\x20is\x20mandatory','List','DESC','out','Messages','dataValues','push','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','bluebird','mustache','path','sox','to-csv','fs-extra','lodash','squel','jsforce','desk.js','papaparse','ioredis','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','redis','localhost','socket.io-emitter','./whatsappAccount.socket','register','jayson/promise','client','http','request','then','WhatsappAccount,\x20%s,\x20%s','request\x20sent','error','code','message','result','sendStatus','status','end','json','offset','undefined','limit','set','Content-Range','apply','reject','save','update','destroy','get','WhatsappAccounts','UserProfileResource','stack','name','send','index','Pause','mandatoryDispositionPause','map','WhatsappAccount','type','key','query','filters','intersection','model','attributes','fields','length','hasOwnProperty','nolimit','order','sort','where','pick','filter','VIRTUAL','merge','count','includeAll','findAll','catch','params','keys','find','create','body','user','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','UserProfileSection','userProfileId','autoAssociation','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','describe','WhatsappAccountId','Disposition','getDispositions','findOne','rawAttributes','options','include','removeDispositions','getAnswers','CannedAnswer','rows','removeAnswers','addAgents','ids','omit','spread','removeAgents','isArray','emit','userWhatsappAccount:remove','getAgents','User','addApplications','sequelize','Transaction','ISOLATION_LEVELS','READ_COMMITTED','WhatsappApplication','findAndCountAll','priority','finally','getApplications','notify','Applications','account','sinch','statuses','state','read','WhatsappMessage','timestamp','message_id','applications','orderBy','CmContact','createdAt','twilio','from','notifications','isNil','Sequelize','ValidationError','body\x20is\x20mandatory\x20and\x20not\x20empty','mapKey','includes','mapKey\x20invalid,\x20please\x20use\x20one\x20of\x20these:\x20','CmList','Contacts','updatedAt','list','defaults','contact'];(function(_0x5a93ff,_0x3ce6f0){var _0x1ad6f3=function(_0xca0703){while(--_0xca0703){_0x5a93ff['push'](_0x5a93ff['shift']());}};_0x1ad6f3(++_0x3ce6f0);}(_0x371d,0xdc));var _0xd371=function(_0x2afd29,_0x39ecc5){_0x2afd29=_0x2afd29-0x0;var _0x5aa1e5=_0x371d[_0x2afd29];return _0x5aa1e5;};'use strict';var emlformat=require(_0xd371('0x0'));var rimraf=require(_0xd371('0x1'));var zipdir=require(_0xd371('0x2'));var jsonpatch=require(_0xd371('0x3'));var rp=require(_0xd371('0x4'));var moment=require('moment');var BPromise=require(_0xd371('0x5'));var Mustache=require(_0xd371('0x6'));var util=require('util');var path=require(_0xd371('0x7'));var sox=require(_0xd371('0x8'));var csv=require(_0xd371('0x9'));var ejs=require('ejs');var fs=require('fs');var fs_extra=require(_0xd371('0xa'));var _=require(_0xd371('0xb'));var squel=require(_0xd371('0xc'));var crypto=require('crypto');var jsforce=require(_0xd371('0xd'));var deskjs=require(_0xd371('0xe'));var toCsv=require(_0xd371('0x9'));var querystring=require('querystring');var Papa=require(_0xd371('0xf'));var Redis=require(_0xd371('0x10'));var authService=require('../../components/auth/service');var qs=require(_0xd371('0x11'));var as=require(_0xd371('0x12'));var hardwareService=require(_0xd371('0x13'));var logger=require(_0xd371('0x14'))(_0xd371('0x15'));var utils=require(_0xd371('0x16'));var config=require(_0xd371('0x17'));var licenseUtil=require(_0xd371('0x18'));var db=require(_0xd371('0x19'))['db'];config['redis']=_['defaults'](config[_0xd371('0x1a')],{'host':_0xd371('0x1b'),'port':0x18eb});var socket=require(_0xd371('0x1c'))(new Redis(config['redis']));require(_0xd371('0x1d'))[_0xd371('0x1e')](socket);var jayson=require(_0xd371('0x1f'));var client=jayson[_0xd371('0x20')][_0xd371('0x21')]({'port':0x232c});function respondWithRpcPromise(_0x2ac060,_0x4d5e47,_0x5360b,_0x38032a){return new BPromise(function(_0x4c3385,_0x361329){var _0x28e2a3=_0x38032a||client;return _0x28e2a3[_0xd371('0x22')](_0x2ac060,_0x5360b)[_0xd371('0x23')](function(_0x14ee50){logger['info'](_0xd371('0x24'),_0x4d5e47,_0xd371('0x25'));logger['debug']('WhatsappAccount,\x20%s,\x20%s,\x20%s',_0x4d5e47,'request\x20sent',JSON['stringify'](_0x14ee50));if(_0x14ee50[_0xd371('0x26')]){if(_0x14ee50['error'][_0xd371('0x27')]===0x1f4){logger['error'](_0xd371('0x24'),_0x4d5e47,_0x14ee50[_0xd371('0x26')][_0xd371('0x28')]);return _0x361329(_0x14ee50[_0xd371('0x26')]['message']);}logger[_0xd371('0x26')](_0xd371('0x24'),_0x4d5e47,_0x14ee50[_0xd371('0x26')][_0xd371('0x28')]);return _0x4c3385(_0x14ee50['error'][_0xd371('0x28')]);}else{logger['info'](_0xd371('0x24'),_0x4d5e47,'request\x20sent');_0x4c3385(_0x14ee50[_0xd371('0x29')]['message']);}})['catch'](function(_0x5cd492){logger[_0xd371('0x26')](_0xd371('0x24'),_0x4d5e47,_0x5cd492);_0x361329(_0x5cd492);});});}function respondWithStatusCode(_0x2e7eb0,_0x1adc18){_0x1adc18=_0x1adc18||0xcc;return function(_0x8f69f6){if(_0x8f69f6){return _0x2e7eb0[_0xd371('0x2a')](_0x1adc18);}return _0x2e7eb0[_0xd371('0x2b')](_0x1adc18)[_0xd371('0x2c')]();};}function respondWithResult(_0x3cd5ae,_0x1c97fe){_0x1c97fe=_0x1c97fe||0xc8;return function(_0x1a1b16){if(_0x1a1b16){return _0x3cd5ae[_0xd371('0x2b')](_0x1c97fe)[_0xd371('0x2d')](_0x1a1b16);}};}function respondWithFilteredResult(_0x391cd7,_0x139fb2){return function(_0x6a6187){if(_0x6a6187){var _0x65a92e=typeof _0x139fb2[_0xd371('0x2e')]===_0xd371('0x2f')&&typeof _0x139fb2[_0xd371('0x30')]===_0xd371('0x2f');var _0x50cd50=_0x6a6187['count'];var _0x3d2f1f=_0x65a92e?0x0:_0x139fb2['offset'];var _0x2794a0=_0x65a92e?_0x6a6187['count']:_0x139fb2[_0xd371('0x2e')]+_0x139fb2[_0xd371('0x30')];var _0x5f41e7;if(_0x2794a0>=_0x50cd50){_0x2794a0=_0x50cd50;_0x5f41e7=0xc8;}else{_0x5f41e7=0xce;}_0x391cd7[_0xd371('0x2b')](_0x5f41e7);return _0x391cd7[_0xd371('0x31')](_0xd371('0x32'),_0x3d2f1f+'-'+_0x2794a0+'/'+_0x50cd50)[_0xd371('0x2d')](_0x6a6187);}return null;};}function patchUpdates(_0x2a2eb8){return function(_0x2dd138){try{jsonpatch[_0xd371('0x33')](_0x2dd138,_0x2a2eb8,!![]);}catch(_0x36e3e5){return BPromise[_0xd371('0x34')](_0x36e3e5);}return _0x2dd138[_0xd371('0x35')]();};}function saveUpdates(_0x606136,_0x4e1975){return function(_0x268b33){if(_0x268b33){return _0x268b33[_0xd371('0x36')](_0x606136)[_0xd371('0x23')](function(_0x3bdd5c){return _0x3bdd5c;});}return null;};}function removeEntity(_0xa14faf,_0x2517bb){return function(_0x11af55){if(_0x11af55){return _0x11af55[_0xd371('0x37')]()[_0xd371('0x23')](function(){var _0x52b4b6=_0x11af55[_0xd371('0x38')]({'plain':!![]});var _0x56663c=_0xd371('0x39');return db[_0xd371('0x3a')][_0xd371('0x37')]({'where':{'type':_0x56663c,'resourceId':_0x52b4b6['id']}})[_0xd371('0x23')](function(){return _0x11af55;});})['then'](function(){_0xa14faf[_0xd371('0x2b')](0xcc)['end']();});}};}function handleEntityNotFound(_0x59b35f,_0x313971){return function(_0x29c850){if(!_0x29c850){_0x59b35f[_0xd371('0x2a')](0x194);}return _0x29c850;};}function handleError(_0x40f85b,_0x408866){_0x408866=_0x408866||0x1f4;return function(_0x364837){logger[_0xd371('0x26')](_0x364837[_0xd371('0x3b')]);if(_0x364837[_0xd371('0x3c')]){delete _0x364837[_0xd371('0x3c')];}_0x40f85b[_0xd371('0x2b')](_0x408866)[_0xd371('0x3d')](_0x364837);};}exports[_0xd371('0x3e')]=function(_0x16ca72,_0x121004){var _0x2f26e2={'include':[{'model':db[_0xd371('0x3f')],'as':_0xd371('0x40')}]},_0x1e69a7={},_0x2f7e19={'count':0x0,'rows':[]};var _0x465ebd=_[_0xd371('0x41')](db[_0xd371('0x42')]['rawAttributes'],function(_0x223fc6){return{'name':_0x223fc6['fieldName'],'type':_0x223fc6[_0xd371('0x43')][_0xd371('0x44')]};});_0x1e69a7['model']=_[_0xd371('0x41')](_0x465ebd,_0xd371('0x3c'));_0x1e69a7[_0xd371('0x45')]=_['keys'](_0x16ca72[_0xd371('0x45')]);_0x1e69a7[_0xd371('0x46')]=_[_0xd371('0x47')](_0x1e69a7[_0xd371('0x48')],_0x1e69a7[_0xd371('0x45')]);_0x2f26e2[_0xd371('0x49')]=_[_0xd371('0x47')](_0x1e69a7[_0xd371('0x48')],qs[_0xd371('0x4a')](_0x16ca72[_0xd371('0x45')][_0xd371('0x4a')]));_0x2f26e2[_0xd371('0x49')]=_0x2f26e2[_0xd371('0x49')][_0xd371('0x4b')]?_0x2f26e2[_0xd371('0x49')]:_0x1e69a7['model'];if(!_0x16ca72['query'][_0xd371('0x4c')](_0xd371('0x4d'))){_0x2f26e2[_0xd371('0x30')]=qs['limit'](_0x16ca72[_0xd371('0x45')][_0xd371('0x30')]);_0x2f26e2['offset']=qs[_0xd371('0x2e')](_0x16ca72[_0xd371('0x45')]['offset']);}_0x2f26e2[_0xd371('0x4e')]=qs[_0xd371('0x4f')](_0x16ca72[_0xd371('0x45')][_0xd371('0x4f')]);_0x2f26e2[_0xd371('0x50')]=qs[_0xd371('0x46')](_[_0xd371('0x51')](_0x16ca72[_0xd371('0x45')],_0x1e69a7[_0xd371('0x46')]),_0x465ebd);if(_0x16ca72['query'][_0xd371('0x52')]){_0x2f26e2[_0xd371('0x50')]=_['merge'](_0x2f26e2[_0xd371('0x50')],{'$or':_[_0xd371('0x41')](_0x465ebd,function(_0x56c245){if(_0x56c245[_0xd371('0x43')]!==_0xd371('0x53')){var _0x56d4c5={};_0x56d4c5[_0x56c245['name']]={'$like':'%'+_0x16ca72[_0xd371('0x45')][_0xd371('0x52')]+'%'};return _0x56d4c5;}})});}_0x2f26e2=_[_0xd371('0x54')]({},_0x2f26e2,_0x16ca72['options']);var _0x305628={'where':_0x2f26e2['where']};return db[_0xd371('0x42')][_0xd371('0x55')](_0x305628)['then'](function(_0x4a8c40){_0x2f7e19[_0xd371('0x55')]=_0x4a8c40;if(_0x16ca72[_0xd371('0x45')][_0xd371('0x56')]){_0x2f26e2['include']=[{'all':!![]}];}return db['WhatsappAccount'][_0xd371('0x57')](_0x2f26e2);})['then'](function(_0x4fb6a9){_0x2f7e19['rows']=_0x4fb6a9;return _0x2f7e19;})[_0xd371('0x23')](respondWithFilteredResult(_0x121004,_0x2f26e2))[_0xd371('0x58')](handleError(_0x121004,null));};exports['show']=function(_0x17d8c,_0x1beefb){var _0x54dc71={'raw':![],'where':{'id':_0x17d8c[_0xd371('0x59')]['id']},'include':[{'model':db[_0xd371('0x3f')],'as':_0xd371('0x40')}]},_0x3f37fe={};_0x3f37fe[_0xd371('0x48')]=_[_0xd371('0x5a')](db[_0xd371('0x42')]['rawAttributes']);_0x3f37fe['query']=_[_0xd371('0x5a')](_0x17d8c[_0xd371('0x45')]);_0x3f37fe[_0xd371('0x46')]=_[_0xd371('0x47')](_0x3f37fe['model'],_0x3f37fe[_0xd371('0x45')]);_0x54dc71[_0xd371('0x49')]=_[_0xd371('0x47')](_0x3f37fe['model'],qs[_0xd371('0x4a')](_0x17d8c[_0xd371('0x45')][_0xd371('0x4a')]));_0x54dc71[_0xd371('0x49')]=_0x54dc71[_0xd371('0x49')][_0xd371('0x4b')]?_0x54dc71[_0xd371('0x49')]:_0x3f37fe[_0xd371('0x48')];if(_0x17d8c[_0xd371('0x45')][_0xd371('0x56')]){_0x54dc71['include']=[{'all':!![]}];}_0x54dc71=_[_0xd371('0x54')]({},_0x54dc71,_0x17d8c['options']);return db[_0xd371('0x42')][_0xd371('0x5b')](_0x54dc71)[_0xd371('0x23')](handleEntityNotFound(_0x1beefb,null))[_0xd371('0x23')](respondWithResult(_0x1beefb,null))['catch'](handleError(_0x1beefb,null));};exports['create']=function(_0x3c3ef9,_0x5005b4){return db[_0xd371('0x42')][_0xd371('0x5c')](_0x3c3ef9[_0xd371('0x5d')],{})[_0xd371('0x23')](function(_0x42c4ba){var _0x52fa35=_0x3c3ef9[_0xd371('0x5e')][_0xd371('0x38')]({'plain':!![]});if(!_0x52fa35)throw new Error(_0xd371('0x5f'));if(_0x52fa35[_0xd371('0x60')]===_0xd371('0x5e')){var _0x57d96d=_0x42c4ba[_0xd371('0x38')]({'plain':!![]});var _0x35d54a=_0xd371('0x39');return db[_0xd371('0x61')][_0xd371('0x5b')]({'where':{'name':_0x35d54a,'userProfileId':_0x52fa35[_0xd371('0x62')]},'raw':!![]})[_0xd371('0x23')](function(_0x450bb0){if(_0x450bb0&&_0x450bb0[_0xd371('0x63')]===0x0){return db['UserProfileResource'][_0xd371('0x5c')]({'name':_0x57d96d[_0xd371('0x3c')],'resourceId':_0x57d96d['id'],'type':_0x450bb0[_0xd371('0x3c')],'sectionId':_0x450bb0['id']},{})[_0xd371('0x23')](function(){return _0x42c4ba;});}else{return _0x42c4ba;}})['catch'](function(_0x24d154){logger[_0xd371('0x26')](_0xd371('0x64'),_0x24d154);throw _0x24d154;});}return _0x42c4ba;})[_0xd371('0x23')](respondWithResult(_0x5005b4,0xc9))['catch'](handleError(_0x5005b4,null));};exports[_0xd371('0x36')]=function(_0x43142b,_0x51d797){if(_0x43142b[_0xd371('0x5d')]['id']){delete _0x43142b[_0xd371('0x5d')]['id'];}return db[_0xd371('0x42')][_0xd371('0x5b')]({'where':{'id':_0x43142b[_0xd371('0x59')]['id']},'include':[{'model':db['Pause'],'as':'mandatoryDispositionPause'}]})['then'](handleEntityNotFound(_0x51d797,null))[_0xd371('0x23')](saveUpdates(_0x43142b[_0xd371('0x5d')],null))[_0xd371('0x23')](respondWithResult(_0x51d797,null))['catch'](handleError(_0x51d797,null));};exports[_0xd371('0x37')]=function(_0x5b61de,_0x3a7f16){return db[_0xd371('0x42')][_0xd371('0x5b')]({'where':{'id':_0x5b61de['params']['id']}})[_0xd371('0x23')](handleEntityNotFound(_0x3a7f16,null))[_0xd371('0x23')](removeEntity(_0x3a7f16,null))[_0xd371('0x58')](handleError(_0x3a7f16,null));};exports[_0xd371('0x65')]=function(_0x27e7a9,_0x5f51ff){return db[_0xd371('0x42')][_0xd371('0x65')]()[_0xd371('0x23')](respondWithResult(_0x5f51ff,null))[_0xd371('0x58')](handleError(_0x5f51ff,null));};exports['addDisposition']=function(_0x102f0e,_0x4dd351,_0x36f490){if(_0x102f0e[_0xd371('0x5d')]['id']){delete _0x102f0e['body']['id'];}return db['WhatsappAccount'][_0xd371('0x5b')]({'where':{'id':_0x102f0e[_0xd371('0x59')]['id']}})['then'](handleEntityNotFound(_0x4dd351,null))['then'](function(_0xecb9a5){if(_0xecb9a5){_0x102f0e['body'][_0xd371('0x66')]=_0xecb9a5['id'];return db[_0xd371('0x67')][_0xd371('0x5c')](_0x102f0e['body']);}})[_0xd371('0x23')](respondWithResult(_0x4dd351,null))['catch'](handleError(_0x4dd351,null));};exports[_0xd371('0x68')]=function(_0x2712f6,_0x25e7fa,_0x1912e2){var _0x2717a3={'raw':![],'where':{}};var _0x340ded={};var _0x51a021={'count':0x0,'rows':[]};return db['WhatsappAccount'][_0xd371('0x69')]({'where':{'id':_0x2712f6[_0xd371('0x59')]['id']}})['then'](handleEntityNotFound(_0x25e7fa,null))[_0xd371('0x23')](function(_0x2560eb){if(_0x2560eb){_0x340ded[_0xd371('0x48')]=_[_0xd371('0x5a')](db[_0xd371('0x67')][_0xd371('0x6a')]);_0x340ded[_0xd371('0x45')]=_[_0xd371('0x5a')](_0x2712f6[_0xd371('0x45')]);_0x340ded[_0xd371('0x46')]=_[_0xd371('0x47')](_0x340ded[_0xd371('0x48')],_0x340ded[_0xd371('0x45')]);_0x2717a3['attributes']=_[_0xd371('0x47')](_0x340ded['model'],qs[_0xd371('0x4a')](_0x2712f6[_0xd371('0x45')][_0xd371('0x4a')]));_0x2717a3[_0xd371('0x49')]=_0x2717a3[_0xd371('0x49')][_0xd371('0x4b')]?_0x2717a3[_0xd371('0x49')]:_0x340ded['model'];if(!_0x2712f6[_0xd371('0x45')][_0xd371('0x4c')](_0xd371('0x4d'))){_0x2717a3[_0xd371('0x30')]=qs[_0xd371('0x30')](_0x2712f6[_0xd371('0x45')][_0xd371('0x30')]);_0x2717a3[_0xd371('0x2e')]=qs['offset'](_0x2712f6[_0xd371('0x45')][_0xd371('0x2e')]);}_0x2717a3['order']=qs['sort'](_0x2712f6[_0xd371('0x45')][_0xd371('0x4f')]);_0x2717a3[_0xd371('0x50')]=qs[_0xd371('0x46')](_[_0xd371('0x51')](_0x2712f6[_0xd371('0x45')],_0x340ded[_0xd371('0x46')]));_0x2717a3['where']['WhatsappAccountId']=_0x2560eb['id'];if(_0x2712f6[_0xd371('0x45')][_0xd371('0x52')]){_0x2717a3['where']=_[_0xd371('0x54')](_0x2717a3['where'],{'$or':_[_0xd371('0x41')](_0x2717a3[_0xd371('0x49')],function(_0x1705c6){var _0x5cddee={};_0x5cddee[_0x1705c6]={'$like':'%'+_0x2712f6['query'][_0xd371('0x52')]+'%'};return _0x5cddee;})});}_0x2717a3=_[_0xd371('0x54')]({},_0x2717a3,_0x2712f6[_0xd371('0x6b')]);return db[_0xd371('0x67')][_0xd371('0x55')]({'where':_0x2717a3['where']})[_0xd371('0x23')](function(_0x4d2b0e){_0x51a021[_0xd371('0x55')]=_0x4d2b0e;if(_0x2712f6[_0xd371('0x45')][_0xd371('0x56')]){_0x2717a3[_0xd371('0x6c')]=[{'all':!![]}];}return db[_0xd371('0x67')][_0xd371('0x57')](_0x2717a3);})[_0xd371('0x23')](function(_0x11f312){_0x51a021['rows']=_0x11f312;return _0x51a021;});}})['then'](respondWithFilteredResult(_0x25e7fa,_0x2717a3))[_0xd371('0x58')](handleError(_0x25e7fa,null));};exports[_0xd371('0x6d')]=function(_0x23e965,_0x37d9e0,_0x513e3e){return db[_0xd371('0x42')][_0xd371('0x5b')]({'where':{'id':_0x23e965[_0xd371('0x59')]['id']}})['then'](handleEntityNotFound(_0x37d9e0,null))[_0xd371('0x23')](function(_0x3f8a82){if(_0x3f8a82){return _0x3f8a82['removeDispositions'](_0x23e965[_0xd371('0x45')]['ids']);}})[_0xd371('0x23')](respondWithStatusCode(_0x37d9e0,null))[_0xd371('0x58')](handleError(_0x37d9e0,null));};exports['addAnswer']=function(_0x33e9fb,_0x5d899e,_0x31861e){if(_0x33e9fb[_0xd371('0x5d')]['id']){delete _0x33e9fb[_0xd371('0x5d')]['id'];}return db[_0xd371('0x42')][_0xd371('0x5b')]({'where':{'id':_0x33e9fb[_0xd371('0x59')]['id']}})[_0xd371('0x23')](handleEntityNotFound(_0x5d899e,null))[_0xd371('0x23')](function(_0x180d17){if(_0x180d17){_0x33e9fb[_0xd371('0x5d')][_0xd371('0x66')]=_0x180d17['id'];return db['CannedAnswer']['create'](_0x33e9fb['body']);}})['then'](respondWithResult(_0x5d899e,null))[_0xd371('0x58')](handleError(_0x5d899e,null));};exports[_0xd371('0x6e')]=function(_0x457862,_0x4b4cb3,_0x490d53){var _0x71e9ed={'raw':![],'where':{}};var _0x488bf0={};var _0x25b3ba={'count':0x0,'rows':[]};return db['WhatsappAccount'][_0xd371('0x69')]({'where':{'id':_0x457862[_0xd371('0x59')]['id']}})['then'](handleEntityNotFound(_0x4b4cb3,null))[_0xd371('0x23')](function(_0x5e2fd7){if(_0x5e2fd7){_0x488bf0[_0xd371('0x48')]=_[_0xd371('0x5a')](db[_0xd371('0x6f')][_0xd371('0x6a')]);_0x488bf0['query']=_[_0xd371('0x5a')](_0x457862[_0xd371('0x45')]);_0x488bf0['filters']=_[_0xd371('0x47')](_0x488bf0['model'],_0x488bf0[_0xd371('0x45')]);_0x71e9ed[_0xd371('0x49')]=_[_0xd371('0x47')](_0x488bf0[_0xd371('0x48')],qs[_0xd371('0x4a')](_0x457862['query'][_0xd371('0x4a')]));_0x71e9ed['attributes']=_0x71e9ed[_0xd371('0x49')][_0xd371('0x4b')]?_0x71e9ed[_0xd371('0x49')]:_0x488bf0[_0xd371('0x48')];if(!_0x457862[_0xd371('0x45')]['hasOwnProperty']('nolimit')){_0x71e9ed[_0xd371('0x30')]=qs[_0xd371('0x30')](_0x457862[_0xd371('0x45')][_0xd371('0x30')]);_0x71e9ed[_0xd371('0x2e')]=qs['offset'](_0x457862[_0xd371('0x45')]['offset']);}_0x71e9ed['order']=qs[_0xd371('0x4f')](_0x457862['query']['sort']);_0x71e9ed[_0xd371('0x50')]=qs['filters'](_[_0xd371('0x51')](_0x457862[_0xd371('0x45')],_0x488bf0[_0xd371('0x46')]));_0x71e9ed[_0xd371('0x50')]['WhatsappAccountId']=_0x5e2fd7['id'];if(_0x457862[_0xd371('0x45')][_0xd371('0x52')]){_0x71e9ed[_0xd371('0x50')]=_['merge'](_0x71e9ed[_0xd371('0x50')],{'$or':_['map'](_0x71e9ed[_0xd371('0x49')],function(_0x340bc5){var _0x311120={};_0x311120[_0x340bc5]={'$like':'%'+_0x457862[_0xd371('0x45')][_0xd371('0x52')]+'%'};return _0x311120;})});}_0x71e9ed=_[_0xd371('0x54')]({},_0x71e9ed,_0x457862[_0xd371('0x6b')]);return db[_0xd371('0x6f')][_0xd371('0x55')]({'where':_0x71e9ed[_0xd371('0x50')]})['then'](function(_0x2bdcdf){_0x25b3ba['count']=_0x2bdcdf;if(_0x457862[_0xd371('0x45')][_0xd371('0x56')]){_0x71e9ed[_0xd371('0x6c')]=[{'all':!![]}];}return db['CannedAnswer'][_0xd371('0x57')](_0x71e9ed);})[_0xd371('0x23')](function(_0xecbf29){_0x25b3ba[_0xd371('0x70')]=_0xecbf29;return _0x25b3ba;});}})[_0xd371('0x23')](respondWithFilteredResult(_0x4b4cb3,_0x71e9ed))['catch'](handleError(_0x4b4cb3,null));};exports[_0xd371('0x71')]=function(_0xa0edbb,_0x43828e,_0x55bb4b){return db[_0xd371('0x42')][_0xd371('0x5b')]({'where':{'id':_0xa0edbb[_0xd371('0x59')]['id']}})[_0xd371('0x23')](handleEntityNotFound(_0x43828e,null))[_0xd371('0x23')](function(_0x21bb4c){if(_0x21bb4c){return _0x21bb4c[_0xd371('0x71')](_0xa0edbb[_0xd371('0x45')]['ids']);}})[_0xd371('0x23')](respondWithStatusCode(_0x43828e,null))[_0xd371('0x58')](handleError(_0x43828e,null));};exports[_0xd371('0x72')]=function(_0x4acb0b,_0x46f90b,_0x2a3a60){return db['WhatsappAccount'][_0xd371('0x5b')]({'where':{'id':_0x4acb0b[_0xd371('0x59')]['id']}})['then'](handleEntityNotFound(_0x46f90b,null))[_0xd371('0x23')](function(_0x10066f){if(_0x10066f){return _0x10066f[_0xd371('0x72')](_0x4acb0b[_0xd371('0x5d')][_0xd371('0x73')],_[_0xd371('0x74')](_0x4acb0b[_0xd371('0x5d')],[_0xd371('0x73'),'id'])||{})[_0xd371('0x75')](function(_0x1bb0f9){for(var _0x26cce0=0x0;_0x26cce0<_0x4acb0b[_0xd371('0x5d')]['ids'][_0xd371('0x4b')];_0x26cce0+=0x1){socket['emit']('userWhatsappAccount:save',{'UserId':Number(_0x4acb0b['body'][_0xd371('0x73')][_0x26cce0]),'WhatsappAccountId':Number(_0x4acb0b[_0xd371('0x59')]['id'])});}return _0x1bb0f9;});}})[_0xd371('0x23')](respondWithResult(_0x46f90b,null))[_0xd371('0x58')](handleError(_0x46f90b,null));};exports[_0xd371('0x76')]=function(_0x53abb0,_0x685fa3,_0x30ee1d){return db['WhatsappAccount'][_0xd371('0x5b')]({'where':{'id':_0x53abb0[_0xd371('0x59')]['id']}})['then'](handleEntityNotFound(_0x685fa3,null))[_0xd371('0x23')](function(_0x1b19d6){if(_0x1b19d6){return _0x1b19d6[_0xd371('0x76')](_0x53abb0['query']['ids'])[_0xd371('0x23')](function(){if(_[_0xd371('0x77')](_0x53abb0[_0xd371('0x45')][_0xd371('0x73')])){for(var _0xbcd167=0x0;_0xbcd167<_0x53abb0[_0xd371('0x45')][_0xd371('0x73')][_0xd371('0x4b')];_0xbcd167+=0x1){socket[_0xd371('0x78')](_0xd371('0x79'),{'UserId':Number(_0x53abb0[_0xd371('0x45')][_0xd371('0x73')][_0xbcd167]),'WhatsappAccountId':Number(_0x53abb0[_0xd371('0x59')]['id'])});}}else{socket[_0xd371('0x78')](_0xd371('0x79'),{'UserId':Number(_0x53abb0['query'][_0xd371('0x73')]),'WhatsappAccountId':Number(_0x53abb0['params']['id'])});}});}})['then'](respondWithStatusCode(_0x685fa3,null))[_0xd371('0x58')](handleError(_0x685fa3,null));};exports[_0xd371('0x7a')]=function(_0x1cc593,_0x2f6c8e,_0x1c27d0){var _0x365e13={};var _0x11b47e={};var _0x31a5f8;var _0x1d36cf;return db[_0xd371('0x42')][_0xd371('0x69')]({'where':{'id':_0x1cc593[_0xd371('0x59')]['id']}})[_0xd371('0x23')](handleEntityNotFound(_0x2f6c8e,null))[_0xd371('0x23')](function(_0x3d2dcb){if(_0x3d2dcb){_0x31a5f8=_0x3d2dcb;_0x11b47e[_0xd371('0x48')]=_[_0xd371('0x5a')](db[_0xd371('0x7b')][_0xd371('0x6a')]);_0x11b47e[_0xd371('0x45')]=_[_0xd371('0x5a')](_0x1cc593[_0xd371('0x45')]);_0x11b47e[_0xd371('0x46')]=_[_0xd371('0x47')](_0x11b47e[_0xd371('0x48')],_0x11b47e[_0xd371('0x45')]);_0x365e13['attributes']=_[_0xd371('0x47')](_0x11b47e['model'],qs[_0xd371('0x4a')](_0x1cc593['query'][_0xd371('0x4a')]));_0x365e13[_0xd371('0x49')]=_0x365e13['attributes']['length']?_0x365e13[_0xd371('0x49')]:_0x11b47e[_0xd371('0x48')];_0x365e13['order']=qs[_0xd371('0x4f')](_0x1cc593[_0xd371('0x45')]['sort']);_0x365e13[_0xd371('0x50')]=qs[_0xd371('0x46')](_['pick'](_0x1cc593[_0xd371('0x45')],_0x11b47e[_0xd371('0x46')]));if(_0x1cc593[_0xd371('0x45')][_0xd371('0x52')]){_0x365e13[_0xd371('0x50')]=_[_0xd371('0x54')](_0x365e13[_0xd371('0x50')],{'$or':_[_0xd371('0x41')](_0x365e13[_0xd371('0x49')],function(_0x9c6fdb){var _0x3a8741={};_0x3a8741[_0x9c6fdb]={'$like':'%'+_0x1cc593[_0xd371('0x45')][_0xd371('0x52')]+'%'};return _0x3a8741;})});}_0x365e13=_[_0xd371('0x54')]({},_0x365e13,_0x1cc593[_0xd371('0x6b')]);return _0x31a5f8[_0xd371('0x7a')](_0x365e13);}})[_0xd371('0x23')](function(_0x268af4){if(_0x268af4){_0x1d36cf=_0x268af4[_0xd371('0x4b')];if(!_0x1cc593['query'][_0xd371('0x4c')](_0xd371('0x4d'))){_0x365e13['limit']=qs['limit'](_0x1cc593['query'][_0xd371('0x30')]);_0x365e13['offset']=qs['offset'](_0x1cc593['query'][_0xd371('0x2e')]);}return _0x31a5f8[_0xd371('0x7a')](_0x365e13);}})[_0xd371('0x23')](function(_0x81fd08){if(_0x81fd08){return _0x81fd08?{'count':_0x1d36cf,'rows':_0x81fd08}:null;}})['then'](respondWithResult(_0x2f6c8e,null))[_0xd371('0x58')](handleError(_0x2f6c8e,null));};exports[_0xd371('0x7c')]=function(_0x52ab44,_0x3a6376){var _0x184a48=_0x52ab44['params']['id'];var _0x3f0798=_0x52ab44[_0xd371('0x5d')];var _0x2fa221=0xc8;var _0x5932e6=null;return db[_0xd371('0x7d')]['transaction']({'isolationLevel':db[_0xd371('0x7d')][_0xd371('0x7e')][_0xd371('0x7f')][_0xd371('0x80')]},function(_0x3aa5f3){return db[_0xd371('0x42')][_0xd371('0x69')]({'where':{'id':_0x184a48},'transaction':_0x3aa5f3})['then'](function(_0x6881e1){if(_0x6881e1){return db[_0xd371('0x81')][_0xd371('0x37')]({'where':{'WhatsappAccountId':_0x184a48},'transaction':_0x3aa5f3})[_0xd371('0x23')](function(){var _0x42132f=_[_0xd371('0x41')](_0x3f0798,function(_0x77d8a0){_0x77d8a0[_0xd371('0x66')]=_0x184a48;return _0x77d8a0;});return db['WhatsappApplication']['bulkCreate'](_0x42132f,{'transaction':_0x3aa5f3});});}else{_0x2fa221=0x194;_0x5932e6=[];}});})['then'](function(){if(_0x2fa221!==0x194){return db[_0xd371('0x81')][_0xd371('0x82')]({'where':{'WhatsappAccountId':_0x184a48},'order':_0xd371('0x83')})[_0xd371('0x23')](function(_0x302a5d){_0x5932e6=_0x302a5d;});}})[_0xd371('0x58')](function(_0x15bf0b){_0x2fa221=0x1f4;logger[_0xd371('0x26')](_0x15bf0b[_0xd371('0x3b')]);if(_0x15bf0b['name']){delete _0x15bf0b[_0xd371('0x3c')];}_0x5932e6=_0x15bf0b;})[_0xd371('0x84')](function(){if(_0x5932e6===null){_0x3a6376['sendStatus'](_0x2fa221);}else{if(_0x2fa221===0x1f4){_0x3a6376[_0xd371('0x2b')](_0x2fa221)['send'](_0x5932e6);}else{_0x3a6376[_0xd371('0x2b')](_0x2fa221)[_0xd371('0x2d')](_0x5932e6);}}});};exports['getApplications']=function(_0x18c788,_0x120aa7,_0x6c510c){var _0xccdb7e={};var _0x3beeca={};var _0x85e649;var _0x281a7;return db[_0xd371('0x42')][_0xd371('0x69')]({'where':{'id':_0x18c788[_0xd371('0x59')]['id']}})[_0xd371('0x23')](handleEntityNotFound(_0x120aa7,null))[_0xd371('0x23')](function(_0x342132){if(_0x342132){_0x85e649=_0x342132;_0x3beeca['model']=_[_0xd371('0x5a')](db[_0xd371('0x81')][_0xd371('0x6a')]);_0x3beeca[_0xd371('0x45')]=_[_0xd371('0x5a')](_0x18c788[_0xd371('0x45')]);_0x3beeca[_0xd371('0x46')]=_[_0xd371('0x47')](_0x3beeca[_0xd371('0x48')],_0x3beeca['query']);_0xccdb7e[_0xd371('0x49')]=_[_0xd371('0x47')](_0x3beeca['model'],qs[_0xd371('0x4a')](_0x18c788[_0xd371('0x45')][_0xd371('0x4a')]));_0xccdb7e['attributes']=_0xccdb7e[_0xd371('0x49')]['length']?_0xccdb7e['attributes']:_0x3beeca[_0xd371('0x48')];_0xccdb7e[_0xd371('0x4e')]=qs[_0xd371('0x4f')](_0x18c788[_0xd371('0x45')]['sort']);_0xccdb7e[_0xd371('0x50')]=qs[_0xd371('0x46')](_[_0xd371('0x51')](_0x18c788[_0xd371('0x45')],_0x3beeca['filters']));if(_0x18c788[_0xd371('0x45')][_0xd371('0x52')]){_0xccdb7e[_0xd371('0x50')]=_[_0xd371('0x54')](_0xccdb7e[_0xd371('0x50')],{'$or':_[_0xd371('0x41')](_0xccdb7e[_0xd371('0x49')],function(_0x5454af){var _0x4eb8c6={};_0x4eb8c6[_0x5454af]={'$like':'%'+_0x18c788[_0xd371('0x45')][_0xd371('0x52')]+'%'};return _0x4eb8c6;})});}_0xccdb7e=_[_0xd371('0x54')]({},_0xccdb7e,_0x18c788[_0xd371('0x6b')]);return _0x85e649[_0xd371('0x85')](_0xccdb7e);}})[_0xd371('0x23')](function(_0x4d1c3a){if(_0x4d1c3a){_0x281a7=_0x4d1c3a[_0xd371('0x4b')];if(!_0x18c788['query'][_0xd371('0x4c')]('nolimit')){_0xccdb7e[_0xd371('0x30')]=qs[_0xd371('0x30')](_0x18c788[_0xd371('0x45')][_0xd371('0x30')]);_0xccdb7e[_0xd371('0x2e')]=qs[_0xd371('0x2e')](_0x18c788['query']['offset']);}return _0x85e649[_0xd371('0x85')](_0xccdb7e);}})[_0xd371('0x23')](function(_0x22c0b3){if(_0x22c0b3){return _0x22c0b3?{'count':_0x281a7,'rows':_0x22c0b3}:null;}})[_0xd371('0x23')](respondWithResult(_0x120aa7,null))[_0xd371('0x58')](handleError(_0x120aa7,null));};exports[_0xd371('0x86')]=function(_0x4b715f,_0x3f1ebf,_0x4ba1b5){var _0x2d1879={'channel':'whatsapp'};var _0x55dc58=[];var _0x2137b1=[];var _0x5517fb={};return db[_0xd371('0x42')][_0xd371('0x5b')]({'where':{'id':_0x4b715f[_0xd371('0x59')]['id']},'include':[{'model':db[_0xd371('0x81')],'as':_0xd371('0x87')}]})[_0xd371('0x23')](handleEntityNotFound(_0x3f1ebf,null))[_0xd371('0x23')](function(_0x141562){_0x2d1879['account']=_0x141562;if(_0x2d1879[_0xd371('0x88')]&&_0x2d1879['account'][_0xd371('0x43')]===_0xd371('0x89')&&_0x4b715f[_0xd371('0x5d')][_0xd371('0x8a')]){if(_0x4b715f[_0xd371('0x5d')][_0xd371('0x8a')][_0xd371('0x4b')]===0x0)return;if(_0x4b715f[_0xd371('0x5d')][_0xd371('0x8a')][0x0][_0xd371('0x8b')]!==_0xd371('0x8c'))return;return db[_0xd371('0x8d')][_0xd371('0x36')]({'read':!![],'readAt':_0x4b715f[_0xd371('0x5d')][_0xd371('0x8a')][0x0][_0xd371('0x8e')]},{'where':{'messageId':_0x4b715f[_0xd371('0x5d')][_0xd371('0x8a')][0x0][_0xd371('0x8f')]},'individualHooks':!![]})[_0xd371('0x23')](function(_0x4982bb){return _0x3f1ebf[_0xd371('0x2b')](0xc8)[_0xd371('0x2d')](_0x4982bb);});}_0x2d1879[_0xd371('0x90')]=_[_0xd371('0x91')](_0x141562[_0xd371('0x87')],['priority'],['asc']);if(_0x2d1879[_0xd371('0x88')]['Applications']){delete _0x2d1879[_0xd371('0x88')][_0xd371('0x87')];}return db[_0xd371('0x92')][_0xd371('0x65')]()[_0xd371('0x23')](function(_0x278577){if(!_0x278577){throw new db['Sequelize']['ValidationError']('no\x20available\x20attributes');}_0x55dc58=_['difference'](_[_0xd371('0x5a')](_0x278577),[_0xd371('0x93'),'updatedAt']);_0x2137b1=_['difference'](_[_0xd371('0x5a')](_0x278577),[_0xd371('0x93'),'updatedAt','CompanyId','ListId']);_0x2d1879[_0xd371('0x5d')]={'mapKey':'mobile'};if(_0x2d1879[_0xd371('0x88')]&&_0x2d1879['account']['type']===_0xd371('0x94')){_0x2d1879['body'][_0xd371('0x95')]=_0x4b715f['body']['From']['replace']('whatsapp:','');_0x2d1879[_0xd371('0x5d')][_0xd371('0x5d')]=_0x4b715f[_0xd371('0x5d')]['Body'];_0x2d1879[_0xd371('0x5d')]['messageId']=_0x4b715f['body']['MessageSid'];}if(_0x2d1879['account']&&_0x2d1879['account'][_0xd371('0x43')]===_0xd371('0x89')){_0x2d1879[_0xd371('0x5d')][_0xd371('0x95')]=_0x4b715f[_0xd371('0x5d')][_0xd371('0x96')][0x0][_0xd371('0x95')];_0x2d1879['body']['body']=_0x4b715f[_0xd371('0x5d')][_0xd371('0x96')][0x0]['message']['body'];_0x2d1879['body']['messageId']=_0x4b715f['body']['notifications'][0x0][_0xd371('0x8f')];}if(_0x2d1879[_0xd371('0x5d')]['id']){delete _0x2d1879[_0xd371('0x5d')]['id'];}if(_[_0xd371('0x97')](_0x2d1879[_0xd371('0x5d')]['from'])){throw new db[(_0xd371('0x98'))][(_0xd371('0x99'))]('from\x20is\x20mandatory');}if(_[_0xd371('0x97')](_0x2d1879[_0xd371('0x5d')]['body'])||_0x2d1879['body']['body']===''){throw new db['Sequelize']['ValidationError'](_0xd371('0x9a'));}if(_[_0xd371('0x97')](_0x2d1879[_0xd371('0x5d')][_0xd371('0x9b')])){throw new db['Sequelize'][(_0xd371('0x99'))]('mapKey\x20is\x20mandatory,\x20please\x20use\x20one\x20of\x20these:\x20'+_0x2137b1);}if(!_[_0xd371('0x9c')](_0x2137b1,_0x2d1879[_0xd371('0x5d')][_0xd371('0x9b')])){throw new db[(_0xd371('0x98'))][(_0xd371('0x99'))](_0xd371('0x9d')+_0x2137b1);}_0x5517fb[_0x2d1879[_0xd371('0x5d')][_0xd371('0x9b')]]=_0x2d1879[_0xd371('0x5d')]['from'];return db[_0xd371('0x9e')][_0xd371('0x5b')]({'where':{'id':_0x2d1879[_0xd371('0x88')]['ListId']},'include':[{'model':db[_0xd371('0x92')],'as':_0xd371('0x9f'),'where':_0x5517fb,'limit':0x1,'order':[[_0xd371('0xa0'),'DESC']]}]});})[_0xd371('0x23')](handleEntityNotFound(_0x3f1ebf,null))[_0xd371('0x23')](function(_0x760c4e){if(_0x760c4e){_0x2d1879[_0xd371('0xa1')]=_[_0xd371('0x74')](_0x760c4e,[_0xd371('0x9f')]);if(_0x760c4e[_0xd371('0x9f')]['length']){return _0x760c4e[_0xd371('0x9f')][0x0];}var _0x54661e=_[_0xd371('0xa2')](_0x2d1879[_0xd371('0x5d')],{'firstName':_0x2d1879['body'][_0xd371('0x95')],'ListId':_0x760c4e['id']});_0x54661e[_0x2d1879[_0xd371('0x5d')][_0xd371('0x9b')]]=_0x2d1879[_0xd371('0x5d')][_0xd371('0x95')];return db[_0xd371('0x92')][_0xd371('0x5c')](_0x54661e,{'fields':_0x55dc58,'raw':!![]});}})[_0xd371('0x23')](handleEntityNotFound(_0x3f1ebf,null))[_0xd371('0x23')](function(_0x43ea01){if(_0x43ea01){_0x2d1879[_0xd371('0xa3')]=_0x43ea01;var _0x185d53={'ContactId':_0x43ea01['id'],'phone':_0x2d1879[_0xd371('0x5d')][_0xd371('0x95')],'WhatsappAccountId':_0x4b715f[_0xd371('0x59')]['id']};var _0x6ffdab={'ContactId':_0x43ea01['id'],'WhatsappAccountId':_0x4b715f['params']['id'],'closed':![]};return db[_0xd371('0xa4')][_0xd371('0x5b')]({'where':_0x6ffdab})[_0xd371('0x23')](function(_0x5b21a7){if(_0x5b21a7){return[_0x5b21a7,![]];}return db[_0xd371('0xa4')][_0xd371('0x5c')](_0x185d53)['then'](function(_0x3da21f){return[_0x3da21f,!![]];});});}})[_0xd371('0x75')](function(_0x3ce597,_0xebb6ff){_0x2d1879['interaction']=_0x3ce597[_0xd371('0x38')]({'plain':!![]});_0x2d1879[_0xd371('0xa5')][_0xd371('0xa6')]=![];if(_0xebb6ff){if(_0x2d1879['account']['autoclose']){_0x2d1879[_0xd371('0x90')]['push']({'id':0x0,'priority':_0x2d1879[_0xd371('0x90')]['length']+0x1,'app':_0xd371('0xa7'),'appdata':'unmanaged','interval':'*,*,*,*'});}_0x2d1879[_0xd371('0xa5')]['created']=!![];}return db[_0xd371('0x8d')][_0xd371('0x5c')]({'phone':_0x2d1879['body']['from'],'messageId':_0x2d1879[_0xd371('0x5d')]['messageId'],'body':_0x2d1879[_0xd371('0x5d')][_0xd371('0x5d')],'WhatsappAccountId':_0x4b715f[_0xd371('0x59')]['id'],'WhatsappInteractionId':_0x3ce597['id'],'direction':'in','ContactId':_0x3ce597[_0xd371('0xa8')],'AttachmentId':_0x2d1879[_0xd371('0x5d')][_0xd371('0xa9')]});})[_0xd371('0x23')](function(_0x5e3589){_0x2d1879['message']=_0x5e3589;if(_0x2d1879['interaction'][_0xd371('0xaa')]){return db[_0xd371('0x7b')][_0xd371('0x5b')]({'attributes':['id','name'],'where':{'id':_0x2d1879['interaction'][_0xd371('0xaa')]}})['then'](function(_0x3ca29f){if(_0x3ca29f){_0x2d1879[_0xd371('0x90')][_0xd371('0xab')]({'id':0x0,'priority':0x0,'app':'agent','appdata':_0x3ca29f[_0xd371('0x3c')]+','+(_0x2d1879[_0xd371('0x88')][_0xd371('0xac')]||0xa),'interval':'*,*,*,*'});}return respondWithRpcPromise(_0xd371('0xad'),_0xd371('0xae'),_0x2d1879);});}return respondWithRpcPromise(_0xd371('0xad'),_0xd371('0xae'),_0x2d1879);})['then'](function(_0x17ee95){if(_0x17ee95){var _0x145f49=0xc8;var _0x1a811e=_0xd371('0xaf');logger[_0xd371('0xb0')](_0xd371('0xb1'),_0x1a811e,_0x145f49,_0xd371('0xb2'));logger[_0xd371('0xb3')](_0xd371('0xb4'),_0x1a811e,_0x145f49,_0xd371('0xb2'),JSON[_0xd371('0xb5')](_0x17ee95));if(_0x2d1879[_0xd371('0x88')][_0xd371('0x43')]===_0xd371('0x94')){return _0x3f1ebf[_0xd371('0x2b')](_0x145f49)[_0xd371('0x31')](_0xd371('0xb6'),_0xd371('0xb7'))[_0xd371('0x3d')](_0xd371('0xb8'));}else{return _0x3f1ebf[_0xd371('0x2b')](_0x145f49)[_0xd371('0x2d')](_0x17ee95);}}});})['catch'](handleError(_0x3f1ebf,null));};exports['send']=function(_0xa40729,_0x48d276,_0x23af12){var _0xee9c63,_0x39803a,_0x4bd989;if(_[_0xd371('0x97')](_0xa40729[_0xd371('0x5d')][_0xd371('0x5d')])||_0xa40729['body'][_0xd371('0x5d')]===''){throw new db[(_0xd371('0x98'))][(_0xd371('0x99'))](_0xd371('0x9a'));}if(_[_0xd371('0x97')](_0xa40729['body']['to'])){throw new db['Sequelize'][(_0xd371('0x99'))](_0xd371('0xb9'));}_0xee9c63=_0xa40729[_0xd371('0x5d')]['to'];return db['WhatsappAccount'][_0xd371('0x5b')]({'where':{'id':_0xa40729[_0xd371('0x59')]['id']},'include':[{'model':db['CmList'],'as':_0xd371('0xba'),'include':[{'model':db[_0xd371('0x92')],'as':_0xd371('0x9f'),'where':{'mobile':_0xee9c63},'limit':0x1,'order':[[_0xd371('0xa0'),_0xd371('0xbb')]]}]}]})[_0xd371('0x23')](handleEntityNotFound(_0x48d276,null))[_0xd371('0x23')](function(_0x4c35ce){if(_0x4c35ce&&_0x4c35ce[_0xd371('0xba')]){_0x39803a=_0x4c35ce['get']({'plain':!![]});if(_0x39803a[_0xd371('0xba')]&&_0x39803a[_0xd371('0xba')][_0xd371('0x9f')][_0xd371('0x4b')]){return _0x39803a[_0xd371('0xba')][_0xd371('0x9f')][0x0];}return db['CmContact'][_0xd371('0x5c')](_[_0xd371('0xa2')](_0xa40729[_0xd371('0x5d')],{'firstName':_0xee9c63,'mobile':_0xee9c63,'phone':_0xee9c63,'ListId':_0x39803a['ListId']}));}})[_0xd371('0x23')](handleEntityNotFound(_0x48d276,null))['then'](function(_0x34c619){if(_0x34c619){_0x4bd989=_0x34c619;return db[_0xd371('0xa4')]['find']({'where':{'ContactId':_0x4bd989['id'],'closed':![],'WhatsappAccountId':_0x39803a['id']}})['then'](function(_0x2903ec){if(_0x2903ec){return[_0x2903ec,![]];}return db['WhatsappInteraction'][_0xd371('0x5c')]({'UserId':_0xa40729['user']['id'],'ContactId':_0x4bd989['id'],'WhatsappAccountId':_0x39803a['id'],'phone':_0xee9c63,'firstMsgDirection':_0xd371('0xbc'),'Messages':[_[_0xd371('0x54')](_0xa40729[_0xd371('0x5d')],{'read':![],'body':_0xa40729[_0xd371('0x5d')][_0xd371('0x5d')],'phone':_0xee9c63,'WhatsappAccountId':_0x39803a['id'],'UserId':_0xa40729['user']['id'],'ContactId':_0x4bd989['id']})]},{'include':[{'model':db[_0xd371('0x8d')],'as':_0xd371('0xbd')}]})['then'](function(_0x3dd63e){return[_0x3dd63e,!![]];});});}})[_0xd371('0x75')](function(_0x34f37c,_0x3cfdb9){if(_0x3cfdb9){return _0x34f37c;}return db[_0xd371('0x8d')][_0xd371('0x5c')](_[_0xd371('0x54')](_0xa40729[_0xd371('0x5d')],{'read':![],'body':_0xa40729['body'][_0xd371('0x5d')],'phone':_0xee9c63,'WhatsappAccountId':_0x39803a['id'],'WhatsappInteractionId':_0x34f37c['id'],'UserId':_0xa40729[_0xd371('0x5e')]['id'],'ContactId':_0x4bd989['id']}))[_0xd371('0x23')](function(_0x1a9fea){_0x34f37c[_0xd371('0xbe')][_0xd371('0xbd')]=[];_0x34f37c[_0xd371('0xbe')][_0xd371('0xbd')][_0xd371('0xbf')](_0x1a9fea[_0xd371('0xbe')]);return _0x34f37c;});})[_0xd371('0x23')](respondWithResult(_0x48d276,null))[_0xd371('0x58')](handleError(_0x48d276,null));}; \ No newline at end of file +var _0x65fe=['nolimit','order','sort','where','pick','filter','merge','type','VIRTUAL','options','includeAll','include','rows','show','params','keys','find','create','body','user','userProfileId','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','describe','addDisposition','WhatsappAccountId','Disposition','getDispositions','findOne','findAll','removeDispositions','ids','addAnswer','CannedAnswer','removeAnswers','addAgents','omit','spread','emit','userWhatsappAccount:save','removeAgents','userWhatsappAccount:remove','User','getAgents','addApplications','sequelize','Transaction','ISOLATION_LEVELS','READ_COMMITTED','WhatsappApplication','bulkCreate','findAndCountAll','priority','finally','send','json','getApplications','notify','whatsapp','Applications','account','sinch','statuses','state','read','applications','asc','CmContact','Sequelize','ValidationError','no\x20available\x20attributes','difference','createdAt','updatedAt','CompanyId','ListId','mobile','twilio','from','From','replace','messageId','notifications','message_id','isNil','body\x20is\x20mandatory\x20and\x20not\x20empty','mapKey','mapKey\x20is\x20mandatory,\x20please\x20use\x20one\x20of\x20these:\x20','includes','CmList','Contacts','DESC','list','contact','interaction','created','autoclose','push','close','unmanaged','*,*,*,*','AttachmentId','UserId','unshift','agent','waitForTheAssignedAgent','Start','startRouting','receiveMessage','entity\x20found','set','Content-Type','text/xml','\x0a','to\x20is\x20mandatory','List','WhatsappInteraction','out','WhatsappMessage','Messages','dataValues','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','util','sox','to-csv','fs-extra','lodash','squel','crypto','jsforce','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','../../config/utils','../../config/environment','../../mysqldb','redis','defaults','localhost','socket.io-emitter','./whatsappAccount.socket','register','jayson/promise','client','http','request','then','info','WhatsappAccount,\x20%s,\x20%s','request\x20sent','debug','WhatsappAccount,\x20%s,\x20%s,\x20%s','stringify','error','message','catch','sendStatus','status','end','offset','limit','count','Content-Range','apply','reject','save','update','destroy','get','WhatsappAccounts','UserProfileResource','stack','name','Pause','mandatoryDispositionPause','map','WhatsappAccount','rawAttributes','key','model','query','filters','intersection','attributes','fields','length','hasOwnProperty'];(function(_0x9778a1,_0x5a1b5f){var _0x2afc0d=function(_0x45a907){while(--_0x45a907){_0x9778a1['push'](_0x9778a1['shift']());}};_0x2afc0d(++_0x5a1b5f);}(_0x65fe,0x78));var _0xe65f=function(_0x22099c,_0x164994){_0x22099c=_0x22099c-0x0;var _0x48dee8=_0x65fe[_0x22099c];return _0x48dee8;};'use strict';var emlformat=require(_0xe65f('0x0'));var rimraf=require(_0xe65f('0x1'));var zipdir=require(_0xe65f('0x2'));var jsonpatch=require(_0xe65f('0x3'));var rp=require(_0xe65f('0x4'));var moment=require(_0xe65f('0x5'));var BPromise=require(_0xe65f('0x6'));var Mustache=require(_0xe65f('0x7'));var util=require(_0xe65f('0x8'));var path=require('path');var sox=require(_0xe65f('0x9'));var csv=require(_0xe65f('0xa'));var ejs=require('ejs');var fs=require('fs');var fs_extra=require(_0xe65f('0xb'));var _=require(_0xe65f('0xc'));var squel=require(_0xe65f('0xd'));var crypto=require(_0xe65f('0xe'));var jsforce=require(_0xe65f('0xf'));var deskjs=require('desk.js');var toCsv=require(_0xe65f('0xa'));var querystring=require('querystring');var Papa=require(_0xe65f('0x10'));var Redis=require(_0xe65f('0x11'));var authService=require(_0xe65f('0x12'));var qs=require(_0xe65f('0x13'));var as=require(_0xe65f('0x14'));var hardwareService=require(_0xe65f('0x15'));var logger=require(_0xe65f('0x16'))('api');var utils=require(_0xe65f('0x17'));var config=require(_0xe65f('0x18'));var licenseUtil=require('../../config/license/util');var db=require(_0xe65f('0x19'))['db'];config[_0xe65f('0x1a')]=_[_0xe65f('0x1b')](config[_0xe65f('0x1a')],{'host':_0xe65f('0x1c'),'port':0x18eb});var socket=require(_0xe65f('0x1d'))(new Redis(config[_0xe65f('0x1a')]));require(_0xe65f('0x1e'))[_0xe65f('0x1f')](socket);var jayson=require(_0xe65f('0x20'));var client=jayson[_0xe65f('0x21')][_0xe65f('0x22')]({'port':0x232c});function respondWithRpcPromise(_0x6453d2,_0x371405,_0x3581a1,_0x4aa32f){return new BPromise(function(_0x13e535,_0x12f72c){var _0x290d57=_0x4aa32f||client;return _0x290d57[_0xe65f('0x23')](_0x6453d2,_0x3581a1)[_0xe65f('0x24')](function(_0x4bb119){logger[_0xe65f('0x25')](_0xe65f('0x26'),_0x371405,_0xe65f('0x27'));logger[_0xe65f('0x28')](_0xe65f('0x29'),_0x371405,'request\x20sent',JSON[_0xe65f('0x2a')](_0x4bb119));if(_0x4bb119[_0xe65f('0x2b')]){if(_0x4bb119[_0xe65f('0x2b')]['code']===0x1f4){logger[_0xe65f('0x2b')](_0xe65f('0x26'),_0x371405,_0x4bb119['error'][_0xe65f('0x2c')]);return _0x12f72c(_0x4bb119[_0xe65f('0x2b')][_0xe65f('0x2c')]);}logger[_0xe65f('0x2b')](_0xe65f('0x26'),_0x371405,_0x4bb119[_0xe65f('0x2b')][_0xe65f('0x2c')]);return _0x13e535(_0x4bb119[_0xe65f('0x2b')][_0xe65f('0x2c')]);}else{logger[_0xe65f('0x25')](_0xe65f('0x26'),_0x371405,_0xe65f('0x27'));_0x13e535(_0x4bb119['result']['message']);}})[_0xe65f('0x2d')](function(_0x2ff17b){logger[_0xe65f('0x2b')](_0xe65f('0x26'),_0x371405,_0x2ff17b);_0x12f72c(_0x2ff17b);});});}function respondWithStatusCode(_0xfdd027,_0x459d2b){_0x459d2b=_0x459d2b||0xcc;return function(_0x6a110d){if(_0x6a110d){return _0xfdd027[_0xe65f('0x2e')](_0x459d2b);}return _0xfdd027[_0xe65f('0x2f')](_0x459d2b)[_0xe65f('0x30')]();};}function respondWithResult(_0x563c5a,_0x136dba){_0x136dba=_0x136dba||0xc8;return function(_0x14345f){if(_0x14345f){return _0x563c5a['status'](_0x136dba)['json'](_0x14345f);}};}function respondWithFilteredResult(_0x1d2991,_0x1c722c){return function(_0x2b3bb9){if(_0x2b3bb9){var _0x45057d=typeof _0x1c722c[_0xe65f('0x31')]==='undefined'&&typeof _0x1c722c[_0xe65f('0x32')]==='undefined';var _0x25d75e=_0x2b3bb9[_0xe65f('0x33')];var _0x521d7f=_0x45057d?0x0:_0x1c722c[_0xe65f('0x31')];var _0x2f2fa4=_0x45057d?_0x2b3bb9['count']:_0x1c722c[_0xe65f('0x31')]+_0x1c722c['limit'];var _0x5c88f0;if(_0x2f2fa4>=_0x25d75e){_0x2f2fa4=_0x25d75e;_0x5c88f0=0xc8;}else{_0x5c88f0=0xce;}_0x1d2991[_0xe65f('0x2f')](_0x5c88f0);return _0x1d2991['set'](_0xe65f('0x34'),_0x521d7f+'-'+_0x2f2fa4+'/'+_0x25d75e)['json'](_0x2b3bb9);}return null;};}function patchUpdates(_0x1ade48){return function(_0xe83c3){try{jsonpatch[_0xe65f('0x35')](_0xe83c3,_0x1ade48,!![]);}catch(_0x5274b8){return BPromise[_0xe65f('0x36')](_0x5274b8);}return _0xe83c3[_0xe65f('0x37')]();};}function saveUpdates(_0xbea473,_0x4f5f8c){return function(_0x3a5189){if(_0x3a5189){return _0x3a5189[_0xe65f('0x38')](_0xbea473)['then'](function(_0x5dee98){return _0x5dee98;});}return null;};}function removeEntity(_0x220329,_0x54f815){return function(_0x459354){if(_0x459354){return _0x459354[_0xe65f('0x39')]()[_0xe65f('0x24')](function(){var _0x189e52=_0x459354[_0xe65f('0x3a')]({'plain':!![]});var _0x2f30ef=_0xe65f('0x3b');return db[_0xe65f('0x3c')][_0xe65f('0x39')]({'where':{'type':_0x2f30ef,'resourceId':_0x189e52['id']}})['then'](function(){return _0x459354;});})[_0xe65f('0x24')](function(){_0x220329[_0xe65f('0x2f')](0xcc)['end']();});}};}function handleEntityNotFound(_0x534532,_0xdc78a){return function(_0x5448f3){if(!_0x5448f3){_0x534532['sendStatus'](0x194);}return _0x5448f3;};}function handleError(_0x2f074d,_0x3481a8){_0x3481a8=_0x3481a8||0x1f4;return function(_0x41cb8f){logger[_0xe65f('0x2b')](_0x41cb8f[_0xe65f('0x3d')]);if(_0x41cb8f['name']){delete _0x41cb8f[_0xe65f('0x3e')];}_0x2f074d[_0xe65f('0x2f')](_0x3481a8)['send'](_0x41cb8f);};}exports['index']=function(_0x214270,_0x18431c){var _0x4ca492={'include':[{'model':db[_0xe65f('0x3f')],'as':_0xe65f('0x40')}]},_0x1d2776={},_0x2fe602={'count':0x0,'rows':[]};var _0x24885b=_[_0xe65f('0x41')](db[_0xe65f('0x42')][_0xe65f('0x43')],function(_0x2d3e2d){return{'name':_0x2d3e2d['fieldName'],'type':_0x2d3e2d['type'][_0xe65f('0x44')]};});_0x1d2776[_0xe65f('0x45')]=_[_0xe65f('0x41')](_0x24885b,_0xe65f('0x3e'));_0x1d2776[_0xe65f('0x46')]=_['keys'](_0x214270['query']);_0x1d2776[_0xe65f('0x47')]=_[_0xe65f('0x48')](_0x1d2776[_0xe65f('0x45')],_0x1d2776['query']);_0x4ca492[_0xe65f('0x49')]=_['intersection'](_0x1d2776[_0xe65f('0x45')],qs['fields'](_0x214270[_0xe65f('0x46')][_0xe65f('0x4a')]));_0x4ca492[_0xe65f('0x49')]=_0x4ca492[_0xe65f('0x49')][_0xe65f('0x4b')]?_0x4ca492[_0xe65f('0x49')]:_0x1d2776['model'];if(!_0x214270[_0xe65f('0x46')][_0xe65f('0x4c')](_0xe65f('0x4d'))){_0x4ca492[_0xe65f('0x32')]=qs[_0xe65f('0x32')](_0x214270[_0xe65f('0x46')][_0xe65f('0x32')]);_0x4ca492[_0xe65f('0x31')]=qs[_0xe65f('0x31')](_0x214270[_0xe65f('0x46')][_0xe65f('0x31')]);}_0x4ca492[_0xe65f('0x4e')]=qs['sort'](_0x214270[_0xe65f('0x46')][_0xe65f('0x4f')]);_0x4ca492[_0xe65f('0x50')]=qs['filters'](_[_0xe65f('0x51')](_0x214270['query'],_0x1d2776['filters']),_0x24885b);if(_0x214270[_0xe65f('0x46')][_0xe65f('0x52')]){_0x4ca492['where']=_[_0xe65f('0x53')](_0x4ca492[_0xe65f('0x50')],{'$or':_[_0xe65f('0x41')](_0x24885b,function(_0x2dd992){if(_0x2dd992[_0xe65f('0x54')]!==_0xe65f('0x55')){var _0x15738e={};_0x15738e[_0x2dd992['name']]={'$like':'%'+_0x214270[_0xe65f('0x46')]['filter']+'%'};return _0x15738e;}})});}_0x4ca492=_[_0xe65f('0x53')]({},_0x4ca492,_0x214270[_0xe65f('0x56')]);var _0x5d84f1={'where':_0x4ca492[_0xe65f('0x50')]};return db[_0xe65f('0x42')][_0xe65f('0x33')](_0x5d84f1)[_0xe65f('0x24')](function(_0x2be9a1){_0x2fe602[_0xe65f('0x33')]=_0x2be9a1;if(_0x214270['query'][_0xe65f('0x57')]){_0x4ca492[_0xe65f('0x58')]=[{'all':!![]}];}return db[_0xe65f('0x42')]['findAll'](_0x4ca492);})['then'](function(_0xa28a53){_0x2fe602[_0xe65f('0x59')]=_0xa28a53;return _0x2fe602;})[_0xe65f('0x24')](respondWithFilteredResult(_0x18431c,_0x4ca492))['catch'](handleError(_0x18431c,null));};exports[_0xe65f('0x5a')]=function(_0x24cee5,_0x259428){var _0x5e0a7b={'raw':![],'where':{'id':_0x24cee5[_0xe65f('0x5b')]['id']},'include':[{'model':db[_0xe65f('0x3f')],'as':_0xe65f('0x40')}]},_0x41bea4={};_0x41bea4[_0xe65f('0x45')]=_[_0xe65f('0x5c')](db[_0xe65f('0x42')][_0xe65f('0x43')]);_0x41bea4[_0xe65f('0x46')]=_[_0xe65f('0x5c')](_0x24cee5['query']);_0x41bea4[_0xe65f('0x47')]=_[_0xe65f('0x48')](_0x41bea4['model'],_0x41bea4['query']);_0x5e0a7b[_0xe65f('0x49')]=_['intersection'](_0x41bea4[_0xe65f('0x45')],qs[_0xe65f('0x4a')](_0x24cee5[_0xe65f('0x46')][_0xe65f('0x4a')]));_0x5e0a7b[_0xe65f('0x49')]=_0x5e0a7b[_0xe65f('0x49')][_0xe65f('0x4b')]?_0x5e0a7b[_0xe65f('0x49')]:_0x41bea4[_0xe65f('0x45')];if(_0x24cee5[_0xe65f('0x46')][_0xe65f('0x57')]){_0x5e0a7b['include']=[{'all':!![]}];}_0x5e0a7b=_[_0xe65f('0x53')]({},_0x5e0a7b,_0x24cee5[_0xe65f('0x56')]);return db['WhatsappAccount'][_0xe65f('0x5d')](_0x5e0a7b)[_0xe65f('0x24')](handleEntityNotFound(_0x259428,null))[_0xe65f('0x24')](respondWithResult(_0x259428,null))[_0xe65f('0x2d')](handleError(_0x259428,null));};exports[_0xe65f('0x5e')]=function(_0x2f7122,_0xeff65c){return db[_0xe65f('0x42')]['create'](_0x2f7122[_0xe65f('0x5f')],{})['then'](function(_0x24a24d){var _0x5dd541=_0x2f7122[_0xe65f('0x60')][_0xe65f('0x3a')]({'plain':!![]});if(!_0x5dd541)throw new Error('Unable\x20to\x20retrieve\x20the\x20current\x20user');if(_0x5dd541['role']===_0xe65f('0x60')){var _0x2a980f=_0x24a24d[_0xe65f('0x3a')]({'plain':!![]});var _0x27c746=_0xe65f('0x3b');return db['UserProfileSection']['find']({'where':{'name':_0x27c746,'userProfileId':_0x5dd541[_0xe65f('0x61')]},'raw':!![]})[_0xe65f('0x24')](function(_0x14faf8){if(_0x14faf8&&_0x14faf8['autoAssociation']===0x0){return db[_0xe65f('0x3c')][_0xe65f('0x5e')]({'name':_0x2a980f[_0xe65f('0x3e')],'resourceId':_0x2a980f['id'],'type':_0x14faf8[_0xe65f('0x3e')],'sectionId':_0x14faf8['id']},{})[_0xe65f('0x24')](function(){return _0x24a24d;});}else{return _0x24a24d;}})[_0xe65f('0x2d')](function(_0x14e975){logger[_0xe65f('0x2b')](_0xe65f('0x62'),_0x14e975);throw _0x14e975;});}return _0x24a24d;})['then'](respondWithResult(_0xeff65c,0xc9))[_0xe65f('0x2d')](handleError(_0xeff65c,null));};exports[_0xe65f('0x38')]=function(_0x27feb6,_0x55dee4){if(_0x27feb6[_0xe65f('0x5f')]['id']){delete _0x27feb6[_0xe65f('0x5f')]['id'];}return db[_0xe65f('0x42')][_0xe65f('0x5d')]({'where':{'id':_0x27feb6['params']['id']},'include':[{'model':db[_0xe65f('0x3f')],'as':_0xe65f('0x40')}]})['then'](handleEntityNotFound(_0x55dee4,null))[_0xe65f('0x24')](saveUpdates(_0x27feb6['body'],null))[_0xe65f('0x24')](respondWithResult(_0x55dee4,null))[_0xe65f('0x2d')](handleError(_0x55dee4,null));};exports[_0xe65f('0x39')]=function(_0xa141cf,_0x5b49d0){return db['WhatsappAccount'][_0xe65f('0x5d')]({'where':{'id':_0xa141cf[_0xe65f('0x5b')]['id']}})[_0xe65f('0x24')](handleEntityNotFound(_0x5b49d0,null))['then'](removeEntity(_0x5b49d0,null))['catch'](handleError(_0x5b49d0,null));};exports[_0xe65f('0x63')]=function(_0x2c4746,_0x44c645){return db['WhatsappAccount'][_0xe65f('0x63')]()[_0xe65f('0x24')](respondWithResult(_0x44c645,null))['catch'](handleError(_0x44c645,null));};exports[_0xe65f('0x64')]=function(_0x29d187,_0xcf9d65,_0x429b1b){if(_0x29d187[_0xe65f('0x5f')]['id']){delete _0x29d187[_0xe65f('0x5f')]['id'];}return db[_0xe65f('0x42')][_0xe65f('0x5d')]({'where':{'id':_0x29d187['params']['id']}})[_0xe65f('0x24')](handleEntityNotFound(_0xcf9d65,null))[_0xe65f('0x24')](function(_0x5d6bba){if(_0x5d6bba){_0x29d187['body'][_0xe65f('0x65')]=_0x5d6bba['id'];return db[_0xe65f('0x66')][_0xe65f('0x5e')](_0x29d187[_0xe65f('0x5f')]);}})[_0xe65f('0x24')](respondWithResult(_0xcf9d65,null))['catch'](handleError(_0xcf9d65,null));};exports[_0xe65f('0x67')]=function(_0xc69b67,_0x4c38b7,_0x2b3155){var _0xcff9ec={'raw':![],'where':{}};var _0x5cdaca={};var _0x1861aa={'count':0x0,'rows':[]};return db[_0xe65f('0x42')][_0xe65f('0x68')]({'where':{'id':_0xc69b67[_0xe65f('0x5b')]['id']}})['then'](handleEntityNotFound(_0x4c38b7,null))[_0xe65f('0x24')](function(_0x4c29f6){if(_0x4c29f6){_0x5cdaca['model']=_[_0xe65f('0x5c')](db[_0xe65f('0x66')][_0xe65f('0x43')]);_0x5cdaca[_0xe65f('0x46')]=_[_0xe65f('0x5c')](_0xc69b67[_0xe65f('0x46')]);_0x5cdaca[_0xe65f('0x47')]=_[_0xe65f('0x48')](_0x5cdaca['model'],_0x5cdaca[_0xe65f('0x46')]);_0xcff9ec['attributes']=_[_0xe65f('0x48')](_0x5cdaca[_0xe65f('0x45')],qs['fields'](_0xc69b67[_0xe65f('0x46')][_0xe65f('0x4a')]));_0xcff9ec[_0xe65f('0x49')]=_0xcff9ec[_0xe65f('0x49')][_0xe65f('0x4b')]?_0xcff9ec[_0xe65f('0x49')]:_0x5cdaca[_0xe65f('0x45')];if(!_0xc69b67[_0xe65f('0x46')][_0xe65f('0x4c')](_0xe65f('0x4d'))){_0xcff9ec[_0xe65f('0x32')]=qs[_0xe65f('0x32')](_0xc69b67[_0xe65f('0x46')]['limit']);_0xcff9ec['offset']=qs['offset'](_0xc69b67[_0xe65f('0x46')][_0xe65f('0x31')]);}_0xcff9ec[_0xe65f('0x4e')]=qs[_0xe65f('0x4f')](_0xc69b67[_0xe65f('0x46')]['sort']);_0xcff9ec['where']=qs[_0xe65f('0x47')](_[_0xe65f('0x51')](_0xc69b67[_0xe65f('0x46')],_0x5cdaca[_0xe65f('0x47')]));_0xcff9ec['where'][_0xe65f('0x65')]=_0x4c29f6['id'];if(_0xc69b67[_0xe65f('0x46')][_0xe65f('0x52')]){_0xcff9ec[_0xe65f('0x50')]=_['merge'](_0xcff9ec[_0xe65f('0x50')],{'$or':_[_0xe65f('0x41')](_0xcff9ec['attributes'],function(_0x25f48d){var _0x1dfcea={};_0x1dfcea[_0x25f48d]={'$like':'%'+_0xc69b67[_0xe65f('0x46')][_0xe65f('0x52')]+'%'};return _0x1dfcea;})});}_0xcff9ec=_['merge']({},_0xcff9ec,_0xc69b67['options']);return db[_0xe65f('0x66')][_0xe65f('0x33')]({'where':_0xcff9ec[_0xe65f('0x50')]})[_0xe65f('0x24')](function(_0x1a46f){_0x1861aa[_0xe65f('0x33')]=_0x1a46f;if(_0xc69b67['query'][_0xe65f('0x57')]){_0xcff9ec[_0xe65f('0x58')]=[{'all':!![]}];}return db['Disposition'][_0xe65f('0x69')](_0xcff9ec);})[_0xe65f('0x24')](function(_0x4996f7){_0x1861aa['rows']=_0x4996f7;return _0x1861aa;});}})[_0xe65f('0x24')](respondWithFilteredResult(_0x4c38b7,_0xcff9ec))[_0xe65f('0x2d')](handleError(_0x4c38b7,null));};exports[_0xe65f('0x6a')]=function(_0x25e5f0,_0x92b21,_0xdf34bd){return db[_0xe65f('0x42')][_0xe65f('0x5d')]({'where':{'id':_0x25e5f0[_0xe65f('0x5b')]['id']}})[_0xe65f('0x24')](handleEntityNotFound(_0x92b21,null))[_0xe65f('0x24')](function(_0x417056){if(_0x417056){return _0x417056[_0xe65f('0x6a')](_0x25e5f0[_0xe65f('0x46')][_0xe65f('0x6b')]);}})[_0xe65f('0x24')](respondWithStatusCode(_0x92b21,null))['catch'](handleError(_0x92b21,null));};exports[_0xe65f('0x6c')]=function(_0x1a38a1,_0x11c6ac,_0x382273){if(_0x1a38a1[_0xe65f('0x5f')]['id']){delete _0x1a38a1['body']['id'];}return db[_0xe65f('0x42')]['find']({'where':{'id':_0x1a38a1[_0xe65f('0x5b')]['id']}})['then'](handleEntityNotFound(_0x11c6ac,null))[_0xe65f('0x24')](function(_0x56fe52){if(_0x56fe52){_0x1a38a1[_0xe65f('0x5f')]['WhatsappAccountId']=_0x56fe52['id'];return db[_0xe65f('0x6d')][_0xe65f('0x5e')](_0x1a38a1[_0xe65f('0x5f')]);}})[_0xe65f('0x24')](respondWithResult(_0x11c6ac,null))[_0xe65f('0x2d')](handleError(_0x11c6ac,null));};exports['getAnswers']=function(_0x12b1e,_0x2f25fe,_0x6e4629){var _0x25b5c4={'raw':![],'where':{}};var _0x350f82={};var _0x1fc454={'count':0x0,'rows':[]};return db[_0xe65f('0x42')][_0xe65f('0x68')]({'where':{'id':_0x12b1e['params']['id']}})[_0xe65f('0x24')](handleEntityNotFound(_0x2f25fe,null))[_0xe65f('0x24')](function(_0x24232d){if(_0x24232d){_0x350f82['model']=_[_0xe65f('0x5c')](db[_0xe65f('0x6d')][_0xe65f('0x43')]);_0x350f82[_0xe65f('0x46')]=_[_0xe65f('0x5c')](_0x12b1e['query']);_0x350f82[_0xe65f('0x47')]=_[_0xe65f('0x48')](_0x350f82[_0xe65f('0x45')],_0x350f82['query']);_0x25b5c4[_0xe65f('0x49')]=_['intersection'](_0x350f82['model'],qs['fields'](_0x12b1e['query'][_0xe65f('0x4a')]));_0x25b5c4[_0xe65f('0x49')]=_0x25b5c4[_0xe65f('0x49')][_0xe65f('0x4b')]?_0x25b5c4[_0xe65f('0x49')]:_0x350f82[_0xe65f('0x45')];if(!_0x12b1e['query'][_0xe65f('0x4c')](_0xe65f('0x4d'))){_0x25b5c4['limit']=qs[_0xe65f('0x32')](_0x12b1e[_0xe65f('0x46')][_0xe65f('0x32')]);_0x25b5c4[_0xe65f('0x31')]=qs[_0xe65f('0x31')](_0x12b1e[_0xe65f('0x46')][_0xe65f('0x31')]);}_0x25b5c4['order']=qs[_0xe65f('0x4f')](_0x12b1e[_0xe65f('0x46')][_0xe65f('0x4f')]);_0x25b5c4[_0xe65f('0x50')]=qs[_0xe65f('0x47')](_[_0xe65f('0x51')](_0x12b1e['query'],_0x350f82[_0xe65f('0x47')]));_0x25b5c4['where'][_0xe65f('0x65')]=_0x24232d['id'];if(_0x12b1e[_0xe65f('0x46')][_0xe65f('0x52')]){_0x25b5c4[_0xe65f('0x50')]=_[_0xe65f('0x53')](_0x25b5c4[_0xe65f('0x50')],{'$or':_[_0xe65f('0x41')](_0x25b5c4['attributes'],function(_0x12b505){var _0x4f573f={};_0x4f573f[_0x12b505]={'$like':'%'+_0x12b1e[_0xe65f('0x46')][_0xe65f('0x52')]+'%'};return _0x4f573f;})});}_0x25b5c4=_[_0xe65f('0x53')]({},_0x25b5c4,_0x12b1e[_0xe65f('0x56')]);return db[_0xe65f('0x6d')][_0xe65f('0x33')]({'where':_0x25b5c4[_0xe65f('0x50')]})['then'](function(_0x3f26f6){_0x1fc454[_0xe65f('0x33')]=_0x3f26f6;if(_0x12b1e[_0xe65f('0x46')][_0xe65f('0x57')]){_0x25b5c4['include']=[{'all':!![]}];}return db[_0xe65f('0x6d')]['findAll'](_0x25b5c4);})[_0xe65f('0x24')](function(_0x3bac5c){_0x1fc454['rows']=_0x3bac5c;return _0x1fc454;});}})[_0xe65f('0x24')](respondWithFilteredResult(_0x2f25fe,_0x25b5c4))['catch'](handleError(_0x2f25fe,null));};exports[_0xe65f('0x6e')]=function(_0xc99e59,_0x3d8c34,_0x3d72a0){return db['WhatsappAccount'][_0xe65f('0x5d')]({'where':{'id':_0xc99e59[_0xe65f('0x5b')]['id']}})[_0xe65f('0x24')](handleEntityNotFound(_0x3d8c34,null))[_0xe65f('0x24')](function(_0x2366c3){if(_0x2366c3){return _0x2366c3['removeAnswers'](_0xc99e59[_0xe65f('0x46')]['ids']);}})[_0xe65f('0x24')](respondWithStatusCode(_0x3d8c34,null))[_0xe65f('0x2d')](handleError(_0x3d8c34,null));};exports[_0xe65f('0x6f')]=function(_0x6e8c9f,_0x29722a,_0x1b18ac){return db[_0xe65f('0x42')][_0xe65f('0x5d')]({'where':{'id':_0x6e8c9f[_0xe65f('0x5b')]['id']}})[_0xe65f('0x24')](handleEntityNotFound(_0x29722a,null))[_0xe65f('0x24')](function(_0x27abc4){if(_0x27abc4){return _0x27abc4[_0xe65f('0x6f')](_0x6e8c9f[_0xe65f('0x5f')][_0xe65f('0x6b')],_[_0xe65f('0x70')](_0x6e8c9f[_0xe65f('0x5f')],['ids','id'])||{})[_0xe65f('0x71')](function(_0x2c23f9){for(var _0x231170=0x0;_0x231170<_0x6e8c9f[_0xe65f('0x5f')][_0xe65f('0x6b')]['length'];_0x231170+=0x1){socket[_0xe65f('0x72')](_0xe65f('0x73'),{'UserId':Number(_0x6e8c9f[_0xe65f('0x5f')][_0xe65f('0x6b')][_0x231170]),'WhatsappAccountId':Number(_0x6e8c9f[_0xe65f('0x5b')]['id'])});}return _0x2c23f9;});}})['then'](respondWithResult(_0x29722a,null))[_0xe65f('0x2d')](handleError(_0x29722a,null));};exports[_0xe65f('0x74')]=function(_0x5daeb0,_0x3dac73,_0x596951){return db[_0xe65f('0x42')][_0xe65f('0x5d')]({'where':{'id':_0x5daeb0[_0xe65f('0x5b')]['id']}})[_0xe65f('0x24')](handleEntityNotFound(_0x3dac73,null))['then'](function(_0x4c9e49){if(_0x4c9e49){return _0x4c9e49[_0xe65f('0x74')](_0x5daeb0['query'][_0xe65f('0x6b')])[_0xe65f('0x24')](function(){if(_['isArray'](_0x5daeb0[_0xe65f('0x46')][_0xe65f('0x6b')])){for(var _0x4f5179=0x0;_0x4f5179<_0x5daeb0[_0xe65f('0x46')][_0xe65f('0x6b')][_0xe65f('0x4b')];_0x4f5179+=0x1){socket[_0xe65f('0x72')](_0xe65f('0x75'),{'UserId':Number(_0x5daeb0['query'][_0xe65f('0x6b')][_0x4f5179]),'WhatsappAccountId':Number(_0x5daeb0['params']['id'])});}}else{socket[_0xe65f('0x72')]('userWhatsappAccount:remove',{'UserId':Number(_0x5daeb0[_0xe65f('0x46')][_0xe65f('0x6b')]),'WhatsappAccountId':Number(_0x5daeb0[_0xe65f('0x5b')]['id'])});}});}})[_0xe65f('0x24')](respondWithStatusCode(_0x3dac73,null))[_0xe65f('0x2d')](handleError(_0x3dac73,null));};exports['getAgents']=function(_0x1abfd1,_0x147845,_0x1661b8){var _0x17dcfc={};var _0x1c9a74={};var _0x1fb364;var _0x4c90ab;return db[_0xe65f('0x42')][_0xe65f('0x68')]({'where':{'id':_0x1abfd1['params']['id']}})[_0xe65f('0x24')](handleEntityNotFound(_0x147845,null))['then'](function(_0x41170c){if(_0x41170c){_0x1fb364=_0x41170c;_0x1c9a74[_0xe65f('0x45')]=_['keys'](db[_0xe65f('0x76')][_0xe65f('0x43')]);_0x1c9a74[_0xe65f('0x46')]=_[_0xe65f('0x5c')](_0x1abfd1[_0xe65f('0x46')]);_0x1c9a74[_0xe65f('0x47')]=_['intersection'](_0x1c9a74[_0xe65f('0x45')],_0x1c9a74[_0xe65f('0x46')]);_0x17dcfc[_0xe65f('0x49')]=_['intersection'](_0x1c9a74['model'],qs[_0xe65f('0x4a')](_0x1abfd1[_0xe65f('0x46')][_0xe65f('0x4a')]));_0x17dcfc[_0xe65f('0x49')]=_0x17dcfc[_0xe65f('0x49')][_0xe65f('0x4b')]?_0x17dcfc[_0xe65f('0x49')]:_0x1c9a74[_0xe65f('0x45')];_0x17dcfc[_0xe65f('0x4e')]=qs[_0xe65f('0x4f')](_0x1abfd1[_0xe65f('0x46')][_0xe65f('0x4f')]);_0x17dcfc[_0xe65f('0x50')]=qs['filters'](_['pick'](_0x1abfd1[_0xe65f('0x46')],_0x1c9a74[_0xe65f('0x47')]));if(_0x1abfd1[_0xe65f('0x46')][_0xe65f('0x52')]){_0x17dcfc['where']=_[_0xe65f('0x53')](_0x17dcfc[_0xe65f('0x50')],{'$or':_['map'](_0x17dcfc['attributes'],function(_0x26040c){var _0x2ace1b={};_0x2ace1b[_0x26040c]={'$like':'%'+_0x1abfd1[_0xe65f('0x46')][_0xe65f('0x52')]+'%'};return _0x2ace1b;})});}_0x17dcfc=_[_0xe65f('0x53')]({},_0x17dcfc,_0x1abfd1[_0xe65f('0x56')]);return _0x1fb364[_0xe65f('0x77')](_0x17dcfc);}})[_0xe65f('0x24')](function(_0xc2eda){if(_0xc2eda){_0x4c90ab=_0xc2eda[_0xe65f('0x4b')];if(!_0x1abfd1[_0xe65f('0x46')]['hasOwnProperty'](_0xe65f('0x4d'))){_0x17dcfc[_0xe65f('0x32')]=qs[_0xe65f('0x32')](_0x1abfd1[_0xe65f('0x46')]['limit']);_0x17dcfc[_0xe65f('0x31')]=qs[_0xe65f('0x31')](_0x1abfd1[_0xe65f('0x46')]['offset']);}return _0x1fb364[_0xe65f('0x77')](_0x17dcfc);}})['then'](function(_0x22cb7a){if(_0x22cb7a){return _0x22cb7a?{'count':_0x4c90ab,'rows':_0x22cb7a}:null;}})[_0xe65f('0x24')](respondWithResult(_0x147845,null))[_0xe65f('0x2d')](handleError(_0x147845,null));};exports[_0xe65f('0x78')]=function(_0x688cbf,_0x34fa45){var _0x2e0394=_0x688cbf['params']['id'];var _0x4c6e64=_0x688cbf[_0xe65f('0x5f')];var _0x7035be=0xc8;var _0x454387=null;return db[_0xe65f('0x79')]['transaction']({'isolationLevel':db[_0xe65f('0x79')][_0xe65f('0x7a')][_0xe65f('0x7b')][_0xe65f('0x7c')]},function(_0x9ad2a7){return db['WhatsappAccount'][_0xe65f('0x68')]({'where':{'id':_0x2e0394},'transaction':_0x9ad2a7})[_0xe65f('0x24')](function(_0x992912){if(_0x992912){return db[_0xe65f('0x7d')]['destroy']({'where':{'WhatsappAccountId':_0x2e0394},'transaction':_0x9ad2a7})[_0xe65f('0x24')](function(){var _0x11fa7d=_[_0xe65f('0x41')](_0x4c6e64,function(_0x55200a){_0x55200a[_0xe65f('0x65')]=_0x2e0394;return _0x55200a;});return db[_0xe65f('0x7d')][_0xe65f('0x7e')](_0x11fa7d,{'transaction':_0x9ad2a7});});}else{_0x7035be=0x194;_0x454387=[];}});})[_0xe65f('0x24')](function(){if(_0x7035be!==0x194){return db[_0xe65f('0x7d')][_0xe65f('0x7f')]({'where':{'WhatsappAccountId':_0x2e0394},'order':_0xe65f('0x80')})[_0xe65f('0x24')](function(_0x13a251){_0x454387=_0x13a251;});}})[_0xe65f('0x2d')](function(_0x5bbb38){_0x7035be=0x1f4;logger['error'](_0x5bbb38[_0xe65f('0x3d')]);if(_0x5bbb38[_0xe65f('0x3e')]){delete _0x5bbb38[_0xe65f('0x3e')];}_0x454387=_0x5bbb38;})[_0xe65f('0x81')](function(){if(_0x454387===null){_0x34fa45[_0xe65f('0x2e')](_0x7035be);}else{if(_0x7035be===0x1f4){_0x34fa45[_0xe65f('0x2f')](_0x7035be)[_0xe65f('0x82')](_0x454387);}else{_0x34fa45['status'](_0x7035be)[_0xe65f('0x83')](_0x454387);}}});};exports[_0xe65f('0x84')]=function(_0x14a4a6,_0x2716d9,_0x406958){var _0x5c8772={};var _0x185f6e={};var _0x7d7455;var _0x4c152a;return db[_0xe65f('0x42')][_0xe65f('0x68')]({'where':{'id':_0x14a4a6[_0xe65f('0x5b')]['id']}})[_0xe65f('0x24')](handleEntityNotFound(_0x2716d9,null))[_0xe65f('0x24')](function(_0x4fc195){if(_0x4fc195){_0x7d7455=_0x4fc195;_0x185f6e[_0xe65f('0x45')]=_['keys'](db['WhatsappApplication'][_0xe65f('0x43')]);_0x185f6e[_0xe65f('0x46')]=_[_0xe65f('0x5c')](_0x14a4a6[_0xe65f('0x46')]);_0x185f6e['filters']=_[_0xe65f('0x48')](_0x185f6e[_0xe65f('0x45')],_0x185f6e[_0xe65f('0x46')]);_0x5c8772[_0xe65f('0x49')]=_[_0xe65f('0x48')](_0x185f6e[_0xe65f('0x45')],qs['fields'](_0x14a4a6[_0xe65f('0x46')][_0xe65f('0x4a')]));_0x5c8772[_0xe65f('0x49')]=_0x5c8772[_0xe65f('0x49')][_0xe65f('0x4b')]?_0x5c8772[_0xe65f('0x49')]:_0x185f6e['model'];_0x5c8772[_0xe65f('0x4e')]=qs['sort'](_0x14a4a6[_0xe65f('0x46')][_0xe65f('0x4f')]);_0x5c8772[_0xe65f('0x50')]=qs[_0xe65f('0x47')](_[_0xe65f('0x51')](_0x14a4a6[_0xe65f('0x46')],_0x185f6e[_0xe65f('0x47')]));if(_0x14a4a6[_0xe65f('0x46')][_0xe65f('0x52')]){_0x5c8772[_0xe65f('0x50')]=_['merge'](_0x5c8772[_0xe65f('0x50')],{'$or':_[_0xe65f('0x41')](_0x5c8772['attributes'],function(_0x53b1e5){var _0x4f4724={};_0x4f4724[_0x53b1e5]={'$like':'%'+_0x14a4a6['query'][_0xe65f('0x52')]+'%'};return _0x4f4724;})});}_0x5c8772=_[_0xe65f('0x53')]({},_0x5c8772,_0x14a4a6['options']);return _0x7d7455[_0xe65f('0x84')](_0x5c8772);}})['then'](function(_0x2a8a87){if(_0x2a8a87){_0x4c152a=_0x2a8a87[_0xe65f('0x4b')];if(!_0x14a4a6['query'][_0xe65f('0x4c')](_0xe65f('0x4d'))){_0x5c8772[_0xe65f('0x32')]=qs['limit'](_0x14a4a6[_0xe65f('0x46')][_0xe65f('0x32')]);_0x5c8772['offset']=qs['offset'](_0x14a4a6[_0xe65f('0x46')][_0xe65f('0x31')]);}return _0x7d7455[_0xe65f('0x84')](_0x5c8772);}})[_0xe65f('0x24')](function(_0x12832a){if(_0x12832a){return _0x12832a?{'count':_0x4c152a,'rows':_0x12832a}:null;}})[_0xe65f('0x24')](respondWithResult(_0x2716d9,null))[_0xe65f('0x2d')](handleError(_0x2716d9,null));};exports[_0xe65f('0x85')]=function(_0x5a03b1,_0x4d69ef,_0x48306f){var _0x474d01={'channel':_0xe65f('0x86')};var _0x56c5c1=[];var _0x5e7d5e=[];var _0x3cd0b6={};return db[_0xe65f('0x42')][_0xe65f('0x5d')]({'where':{'id':_0x5a03b1[_0xe65f('0x5b')]['id']},'include':[{'model':db[_0xe65f('0x7d')],'as':_0xe65f('0x87')}]})['then'](handleEntityNotFound(_0x4d69ef,null))[_0xe65f('0x24')](function(_0x33763c){_0x474d01[_0xe65f('0x88')]=_0x33763c;if(_0x474d01[_0xe65f('0x88')]&&_0x474d01['account'][_0xe65f('0x54')]===_0xe65f('0x89')&&_0x5a03b1[_0xe65f('0x5f')][_0xe65f('0x8a')]){if(_0x5a03b1[_0xe65f('0x5f')][_0xe65f('0x8a')]['length']===0x0)return;if(_0x5a03b1['body'][_0xe65f('0x8a')][0x0][_0xe65f('0x8b')]!==_0xe65f('0x8c'))return;return db['WhatsappMessage'][_0xe65f('0x38')]({'read':!![],'readAt':_0x5a03b1[_0xe65f('0x5f')][_0xe65f('0x8a')][0x0]['timestamp']},{'where':{'messageId':_0x5a03b1[_0xe65f('0x5f')][_0xe65f('0x8a')][0x0]['message_id']},'individualHooks':!![]})['then'](function(_0xbf1ed9){return _0x4d69ef[_0xe65f('0x2f')](0xc8)[_0xe65f('0x83')](_0xbf1ed9);});}_0x474d01[_0xe65f('0x8d')]=_['orderBy'](_0x33763c['Applications'],[_0xe65f('0x80')],[_0xe65f('0x8e')]);if(_0x474d01[_0xe65f('0x88')]['Applications']){delete _0x474d01[_0xe65f('0x88')][_0xe65f('0x87')];}return db[_0xe65f('0x8f')]['describe']()[_0xe65f('0x24')](function(_0x3e534b){if(!_0x3e534b){throw new db[(_0xe65f('0x90'))][(_0xe65f('0x91'))](_0xe65f('0x92'));}_0x56c5c1=_[_0xe65f('0x93')](_[_0xe65f('0x5c')](_0x3e534b),['createdAt','updatedAt']);_0x5e7d5e=_[_0xe65f('0x93')](_[_0xe65f('0x5c')](_0x3e534b),[_0xe65f('0x94'),_0xe65f('0x95'),_0xe65f('0x96'),_0xe65f('0x97')]);_0x474d01['body']={'mapKey':_0xe65f('0x98')};if(_0x474d01[_0xe65f('0x88')]&&_0x474d01['account']['type']===_0xe65f('0x99')){_0x474d01[_0xe65f('0x5f')][_0xe65f('0x9a')]=_0x5a03b1[_0xe65f('0x5f')][_0xe65f('0x9b')][_0xe65f('0x9c')]('whatsapp:','');_0x474d01['body'][_0xe65f('0x5f')]=_0x5a03b1[_0xe65f('0x5f')]['Body'];_0x474d01[_0xe65f('0x5f')][_0xe65f('0x9d')]=_0x5a03b1[_0xe65f('0x5f')]['MessageSid'];}if(_0x474d01[_0xe65f('0x88')]&&_0x474d01[_0xe65f('0x88')][_0xe65f('0x54')]==='sinch'){_0x474d01[_0xe65f('0x5f')][_0xe65f('0x9a')]=_0x5a03b1[_0xe65f('0x5f')][_0xe65f('0x9e')][0x0][_0xe65f('0x9a')];_0x474d01['body']['body']=_0x5a03b1[_0xe65f('0x5f')]['notifications'][0x0][_0xe65f('0x2c')]['body'];_0x474d01['body'][_0xe65f('0x9d')]=_0x5a03b1[_0xe65f('0x5f')][_0xe65f('0x9e')][0x0][_0xe65f('0x9f')];}if(_0x474d01[_0xe65f('0x5f')]['id']){delete _0x474d01['body']['id'];}if(_[_0xe65f('0xa0')](_0x474d01[_0xe65f('0x5f')][_0xe65f('0x9a')])){throw new db[(_0xe65f('0x90'))]['ValidationError']('from\x20is\x20mandatory');}if(_[_0xe65f('0xa0')](_0x474d01[_0xe65f('0x5f')][_0xe65f('0x5f')])||_0x474d01[_0xe65f('0x5f')]['body']===''){throw new db['Sequelize']['ValidationError'](_0xe65f('0xa1'));}if(_['isNil'](_0x474d01[_0xe65f('0x5f')][_0xe65f('0xa2')])){throw new db[(_0xe65f('0x90'))][(_0xe65f('0x91'))](_0xe65f('0xa3')+_0x5e7d5e);}if(!_[_0xe65f('0xa4')](_0x5e7d5e,_0x474d01[_0xe65f('0x5f')][_0xe65f('0xa2')])){throw new db[(_0xe65f('0x90'))][(_0xe65f('0x91'))]('mapKey\x20invalid,\x20please\x20use\x20one\x20of\x20these:\x20'+_0x5e7d5e);}_0x3cd0b6[_0x474d01[_0xe65f('0x5f')][_0xe65f('0xa2')]]=_0x474d01[_0xe65f('0x5f')][_0xe65f('0x9a')];return db[_0xe65f('0xa5')][_0xe65f('0x5d')]({'where':{'id':_0x474d01[_0xe65f('0x88')][_0xe65f('0x97')]},'include':[{'model':db['CmContact'],'as':_0xe65f('0xa6'),'where':_0x3cd0b6,'limit':0x1,'order':[[_0xe65f('0x95'),_0xe65f('0xa7')]]}]});})[_0xe65f('0x24')](handleEntityNotFound(_0x4d69ef,null))['then'](function(_0x3eaee1){if(_0x3eaee1){_0x474d01[_0xe65f('0xa8')]=_[_0xe65f('0x70')](_0x3eaee1,[_0xe65f('0xa6')]);if(_0x3eaee1[_0xe65f('0xa6')][_0xe65f('0x4b')]){return _0x3eaee1['Contacts'][0x0];}var _0x2e2084=_[_0xe65f('0x1b')](_0x474d01['body'],{'firstName':_0x474d01[_0xe65f('0x5f')][_0xe65f('0x9a')],'ListId':_0x3eaee1['id']});_0x2e2084[_0x474d01['body'][_0xe65f('0xa2')]]=_0x474d01['body'][_0xe65f('0x9a')];return db['CmContact'][_0xe65f('0x5e')](_0x2e2084,{'fields':_0x56c5c1,'raw':!![]});}})[_0xe65f('0x24')](handleEntityNotFound(_0x4d69ef,null))['then'](function(_0x1924e6){if(_0x1924e6){_0x474d01[_0xe65f('0xa9')]=_0x1924e6;var _0x55a7f7={'ContactId':_0x1924e6['id'],'phone':_0x474d01['body'][_0xe65f('0x9a')],'WhatsappAccountId':_0x5a03b1['params']['id']};var _0x337718={'ContactId':_0x1924e6['id'],'WhatsappAccountId':_0x5a03b1['params']['id'],'closed':![]};return db['WhatsappInteraction'][_0xe65f('0x5d')]({'where':_0x337718})[_0xe65f('0x24')](function(_0x299300){if(_0x299300){return[_0x299300,![]];}return db['WhatsappInteraction'][_0xe65f('0x5e')](_0x55a7f7)['then'](function(_0x1779a0){return[_0x1779a0,!![]];});});}})['spread'](function(_0x30cf60,_0x53d45e){_0x474d01[_0xe65f('0xaa')]=_0x30cf60[_0xe65f('0x3a')]({'plain':!![]});_0x474d01['interaction'][_0xe65f('0xab')]=![];if(_0x53d45e){if(_0x474d01['account'][_0xe65f('0xac')]){_0x474d01['applications'][_0xe65f('0xad')]({'id':0x0,'priority':_0x474d01[_0xe65f('0x8d')]['length']+0x1,'app':_0xe65f('0xae'),'appdata':_0xe65f('0xaf'),'interval':_0xe65f('0xb0')});}_0x474d01[_0xe65f('0xaa')][_0xe65f('0xab')]=!![];}return db['WhatsappMessage'][_0xe65f('0x5e')]({'phone':_0x474d01[_0xe65f('0x5f')][_0xe65f('0x9a')],'messageId':_0x474d01['body']['messageId'],'body':_0x474d01[_0xe65f('0x5f')]['body'],'WhatsappAccountId':_0x5a03b1['params']['id'],'WhatsappInteractionId':_0x30cf60['id'],'direction':'in','ContactId':_0x30cf60['ContactId'],'AttachmentId':_0x474d01['body'][_0xe65f('0xb1')]});})[_0xe65f('0x24')](function(_0x2b9ae5){_0x474d01['message']=_0x2b9ae5;if(_0x474d01[_0xe65f('0xaa')][_0xe65f('0xb2')]){return db[_0xe65f('0x76')][_0xe65f('0x5d')]({'attributes':['id','name'],'where':{'id':_0x474d01[_0xe65f('0xaa')]['UserId']}})[_0xe65f('0x24')](function(_0x36466d){if(_0x36466d){_0x474d01[_0xe65f('0x8d')][_0xe65f('0xb3')]({'id':0x0,'priority':0x0,'app':_0xe65f('0xb4'),'appdata':_0x36466d[_0xe65f('0x3e')]+','+(_0x474d01['account'][_0xe65f('0xb5')]||0xa),'interval':'*,*,*,*'});}return respondWithRpcPromise(_0xe65f('0xb6'),_0xe65f('0xb7'),_0x474d01);});}return respondWithRpcPromise(_0xe65f('0xb6'),_0xe65f('0xb7'),_0x474d01);})[_0xe65f('0x24')](function(_0x5aa1f1){if(_0x5aa1f1){var _0x176d64=0xc8;var _0x42a07d=_0xe65f('0xb8');logger[_0xe65f('0x25')]('WhatsappAccount,\x20%s,\x20%s,\x20%s',_0x42a07d,_0x176d64,'entity\x20found');logger[_0xe65f('0x28')]('WhatsappAccount,\x20%s,\x20%s,\x20%s,\x20%s',_0x42a07d,_0x176d64,_0xe65f('0xb9'),JSON[_0xe65f('0x2a')](_0x5aa1f1));if(_0x474d01[_0xe65f('0x88')][_0xe65f('0x54')]===_0xe65f('0x99')){return _0x4d69ef[_0xe65f('0x2f')](_0x176d64)[_0xe65f('0xba')](_0xe65f('0xbb'),_0xe65f('0xbc'))[_0xe65f('0x82')](_0xe65f('0xbd'));}else{return _0x4d69ef[_0xe65f('0x2f')](_0x176d64)[_0xe65f('0x83')](_0x5aa1f1);}}});})[_0xe65f('0x2d')](handleError(_0x4d69ef,null));};exports[_0xe65f('0x82')]=function(_0x3dc5b3,_0x159a7b,_0x47647f){var _0x3eca67,_0x27f725,_0x33aa80;if(_[_0xe65f('0xa0')](_0x3dc5b3[_0xe65f('0x5f')][_0xe65f('0x5f')])||_0x3dc5b3[_0xe65f('0x5f')]['body']===''){throw new db[(_0xe65f('0x90'))]['ValidationError'](_0xe65f('0xa1'));}if(_['isNil'](_0x3dc5b3[_0xe65f('0x5f')]['to'])){throw new db['Sequelize']['ValidationError'](_0xe65f('0xbe'));}_0x3eca67=_0x3dc5b3[_0xe65f('0x5f')]['to'];return db[_0xe65f('0x42')]['find']({'where':{'id':_0x3dc5b3['params']['id']},'include':[{'model':db[_0xe65f('0xa5')],'as':_0xe65f('0xbf'),'include':[{'model':db[_0xe65f('0x8f')],'as':'Contacts','where':{'mobile':_0x3eca67},'limit':0x1,'order':[[_0xe65f('0x95'),'DESC']]}]}]})[_0xe65f('0x24')](handleEntityNotFound(_0x159a7b,null))['then'](function(_0x315e68){if(_0x315e68&&_0x315e68['List']){_0x27f725=_0x315e68[_0xe65f('0x3a')]({'plain':!![]});if(_0x27f725[_0xe65f('0xbf')]&&_0x27f725[_0xe65f('0xbf')][_0xe65f('0xa6')][_0xe65f('0x4b')]){return _0x27f725[_0xe65f('0xbf')][_0xe65f('0xa6')][0x0];}return db['CmContact'][_0xe65f('0x5e')](_[_0xe65f('0x1b')](_0x3dc5b3[_0xe65f('0x5f')],{'firstName':_0x3eca67,'mobile':_0x3eca67,'phone':_0x3eca67,'ListId':_0x27f725['ListId']}));}})[_0xe65f('0x24')](handleEntityNotFound(_0x159a7b,null))[_0xe65f('0x24')](function(_0xd5725f){if(_0xd5725f){_0x33aa80=_0xd5725f;return db[_0xe65f('0xc0')]['find']({'where':{'ContactId':_0x33aa80['id'],'closed':![],'WhatsappAccountId':_0x27f725['id']}})['then'](function(_0x19747f){if(_0x19747f){return[_0x19747f,![]];}return db[_0xe65f('0xc0')][_0xe65f('0x5e')]({'UserId':_0x3dc5b3[_0xe65f('0x60')]['id'],'ContactId':_0x33aa80['id'],'WhatsappAccountId':_0x27f725['id'],'phone':_0x3eca67,'firstMsgDirection':_0xe65f('0xc1'),'Messages':[_['merge'](_0x3dc5b3[_0xe65f('0x5f')],{'read':![],'body':_0x3dc5b3['body']['body'],'phone':_0x3eca67,'WhatsappAccountId':_0x27f725['id'],'UserId':_0x3dc5b3[_0xe65f('0x60')]['id'],'ContactId':_0x33aa80['id']})]},{'include':[{'model':db[_0xe65f('0xc2')],'as':_0xe65f('0xc3')}]})[_0xe65f('0x24')](function(_0x54140a){return[_0x54140a,!![]];});});}})[_0xe65f('0x71')](function(_0x92f7b3,_0x32cf33){if(_0x32cf33){return _0x92f7b3;}return db['WhatsappMessage'][_0xe65f('0x5e')](_[_0xe65f('0x53')](_0x3dc5b3['body'],{'read':![],'body':_0x3dc5b3['body'][_0xe65f('0x5f')],'phone':_0x3eca67,'WhatsappAccountId':_0x27f725['id'],'WhatsappInteractionId':_0x92f7b3['id'],'UserId':_0x3dc5b3[_0xe65f('0x60')]['id'],'ContactId':_0x33aa80['id']}))[_0xe65f('0x24')](function(_0x45b95f){_0x92f7b3[_0xe65f('0xc4')][_0xe65f('0xc3')]=[];_0x92f7b3[_0xe65f('0xc4')][_0xe65f('0xc3')][_0xe65f('0xad')](_0x45b95f[_0xe65f('0xc4')]);return _0x92f7b3;});})[_0xe65f('0x24')](respondWithResult(_0x159a7b,null))['catch'](handleError(_0x159a7b,null));}; \ No newline at end of file diff --git a/server/api/whatsappAccount/whatsappAccount.events.js b/server/api/whatsappAccount/whatsappAccount.events.js index 2790d63..e865f77 100644 --- a/server/api/whatsappAccount/whatsappAccount.events.js +++ b/server/api/whatsappAccount/whatsappAccount.events.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x3482=['../../mysqldb','WhatsappAccount','setMaxListeners','update','remove','emit','hasOwnProperty','hook','exports','events'];(function(_0x19e35c,_0x29cd1e){var _0x3e1fe8=function(_0x17258b){while(--_0x17258b){_0x19e35c['push'](_0x19e35c['shift']());}};_0x3e1fe8(++_0x29cd1e);}(_0x3482,0x17b));var _0x2348=function(_0x270891,_0xc0f01b){_0x270891=_0x270891-0x0;var _0x1faad7=_0x3482[_0x270891];return _0x1faad7;};'use strict';var EventEmitter=require(_0x2348('0x0'));var WhatsappAccount=require(_0x2348('0x1'))['db'][_0x2348('0x2')];var WhatsappAccountEvents=new EventEmitter();WhatsappAccountEvents[_0x2348('0x3')](0x0);var events={'afterCreate':'save','afterUpdate':_0x2348('0x4'),'afterDestroy':_0x2348('0x5')};function emitEvent(_0xbc0f54){return function(_0x4d9413,_0x1ea212,_0x55c3af){WhatsappAccountEvents[_0x2348('0x6')](_0xbc0f54+':'+_0x4d9413['id'],_0x4d9413);WhatsappAccountEvents[_0x2348('0x6')](_0xbc0f54,_0x4d9413);_0x55c3af(null);};}for(var e in events){if(events[_0x2348('0x7')](e)){var event=events[e];WhatsappAccount[_0x2348('0x8')](e,emitEvent(event));}}module[_0x2348('0x9')]=WhatsappAccountEvents; \ No newline at end of file +var _0xe1f3=['../../mysqldb','WhatsappAccount','update','remove','emit','hasOwnProperty','exports','events'];(function(_0x5399aa,_0x474fa1){var _0x1b4654=function(_0x4abcdc){while(--_0x4abcdc){_0x5399aa['push'](_0x5399aa['shift']());}};_0x1b4654(++_0x474fa1);}(_0xe1f3,0x11f));var _0x3e1f=function(_0x255036,_0x4c8d6e){_0x255036=_0x255036-0x0;var _0x15e026=_0xe1f3[_0x255036];return _0x15e026;};'use strict';var EventEmitter=require(_0x3e1f('0x0'));var WhatsappAccount=require(_0x3e1f('0x1'))['db'][_0x3e1f('0x2')];var WhatsappAccountEvents=new EventEmitter();WhatsappAccountEvents['setMaxListeners'](0x0);var events={'afterCreate':'save','afterUpdate':_0x3e1f('0x3'),'afterDestroy':_0x3e1f('0x4')};function emitEvent(_0xa93900){return function(_0xf370c6,_0x31234c,_0x207c8e){WhatsappAccountEvents[_0x3e1f('0x5')](_0xa93900+':'+_0xf370c6['id'],_0xf370c6);WhatsappAccountEvents[_0x3e1f('0x5')](_0xa93900,_0xf370c6);_0x207c8e(null);};}for(var e in events){if(events[_0x3e1f('0x6')](e)){var event=events[e];WhatsappAccount['hook'](e,emitEvent(event));}}module[_0x3e1f('0x7')]=WhatsappAccountEvents; \ No newline at end of file diff --git a/server/api/whatsappAccount/whatsappAccount.model.js b/server/api/whatsappAccount/whatsappAccount.model.js index b97a676..938a7c7 100644 --- a/server/api/whatsappAccount/whatsappAccount.model.js +++ b/server/api/whatsappAccount/whatsappAccount.model.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x42e0=['bluebird','request-promise','path','rimraf','./whatsappAccount.attributes','exports','whatsapp_accounts','lodash','util','../../config/logger'];(function(_0x92d580,_0x4928fb){var _0x4ee344=function(_0x55aa0c){while(--_0x55aa0c){_0x92d580['push'](_0x92d580['shift']());}};_0x4ee344(++_0x4928fb);}(_0x42e0,0x1ab));var _0x042e=function(_0x595602,_0x23b57e){_0x595602=_0x595602-0x0;var _0x4f94d6=_0x42e0[_0x595602];return _0x4f94d6;};'use strict';var _=require(_0x042e('0x0'));var util=require(_0x042e('0x1'));var logger=require(_0x042e('0x2'))('api');var moment=require('moment');var BPromise=require(_0x042e('0x3'));var rp=require(_0x042e('0x4'));var fs=require('fs');var path=require(_0x042e('0x5'));var rimraf=require(_0x042e('0x6'));var config=require('../../config/environment');var attributes=require(_0x042e('0x7'));module[_0x042e('0x8')]=function(_0x352d32,_0x4401b7){return _0x352d32['define']('WhatsappAccount',attributes,{'tableName':_0x042e('0x9'),'paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file +var _0x79a4=['whatsapp_accounts','util','../../config/logger','moment','../../config/environment','./whatsappAccount.attributes','define'];(function(_0x13ea00,_0x12f610){var _0x1f7347=function(_0x34ae63){while(--_0x34ae63){_0x13ea00['push'](_0x13ea00['shift']());}};_0x1f7347(++_0x12f610);}(_0x79a4,0x19e));var _0x479a=function(_0x1b3e11,_0x15787b){_0x1b3e11=_0x1b3e11-0x0;var _0x564b5a=_0x79a4[_0x1b3e11];return _0x564b5a;};'use strict';var _=require('lodash');var util=require(_0x479a('0x0'));var logger=require(_0x479a('0x1'))('api');var moment=require(_0x479a('0x2'));var BPromise=require('bluebird');var rp=require('request-promise');var fs=require('fs');var path=require('path');var rimraf=require('rimraf');var config=require(_0x479a('0x3'));var attributes=require(_0x479a('0x4'));module['exports']=function(_0x5c0b9a,_0x303000){return _0x5c0b9a[_0x479a('0x5')]('WhatsappAccount',attributes,{'tableName':_0x479a('0x6'),'paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file diff --git a/server/api/whatsappAccount/whatsappAccount.rpc.js b/server/api/whatsappAccount/whatsappAccount.rpc.js index bba941d..5437137 100644 --- a/server/api/whatsappAccount/whatsappAccount.rpc.js +++ b/server/api/whatsappAccount/whatsappAccount.rpc.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x754a=['options','raw','where','attributes','include','map','model','catch','lodash','util','moment','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','redis','defaults','localhost','socket.io-emitter','./whatsappAccount.socket','register','request','then','WhatsappAccount,\x20%s,\x20%s','request\x20sent','debug','WhatsappAccount,\x20%s,\x20%s,\x20%s','stringify','error','message','info','result','ShowWhatsappAccount','WhatsappAccount','find'];(function(_0x245ea0,_0x2a96b9){var _0x110ad6=function(_0x1824b9){while(--_0x1824b9){_0x245ea0['push'](_0x245ea0['shift']());}};_0x110ad6(++_0x2a96b9);}(_0x754a,0x127));var _0xa754=function(_0x1694f5,_0x49b7c3){_0x1694f5=_0x1694f5-0x0;var _0x5b4321=_0x754a[_0x1694f5];return _0x5b4321;};'use strict';var _=require(_0xa754('0x0'));var util=require(_0xa754('0x1'));var moment=require(_0xa754('0x2'));var BPromise=require('bluebird');var rs=require(_0xa754('0x3'));var fs=require('fs');var Redis=require(_0xa754('0x4'));var db=require(_0xa754('0x5'))['db'];var utils=require(_0xa754('0x6'));var logger=require(_0xa754('0x7'))(_0xa754('0x8'));var config=require(_0xa754('0x9'));var jayson=require(_0xa754('0xa'));var client=jayson[_0xa754('0xb')][_0xa754('0xc')]({'port':0x232a});config[_0xa754('0xd')]=_[_0xa754('0xe')](config[_0xa754('0xd')],{'host':_0xa754('0xf'),'port':0x18eb});var socket=require(_0xa754('0x10'))(new Redis(config['redis']));require(_0xa754('0x11'))[_0xa754('0x12')](socket);function respondWithRpcPromise(_0x32aa92,_0x39af99,_0xd570d7){return new BPromise(function(_0x50095b,_0x43e2ec){return client[_0xa754('0x13')](_0x32aa92,_0xd570d7)[_0xa754('0x14')](function(_0x4c008a){logger['info'](_0xa754('0x15'),_0x39af99,_0xa754('0x16'));logger[_0xa754('0x17')](_0xa754('0x18'),_0x39af99,'request\x20sent',JSON[_0xa754('0x19')](_0x4c008a));if(_0x4c008a[_0xa754('0x1a')]){if(_0x4c008a['error']['code']===0x1f4){logger[_0xa754('0x1a')](_0xa754('0x15'),_0x39af99,_0x4c008a[_0xa754('0x1a')][_0xa754('0x1b')]);return _0x43e2ec(_0x4c008a[_0xa754('0x1a')][_0xa754('0x1b')]);}logger['error'](_0xa754('0x15'),_0x39af99,_0x4c008a[_0xa754('0x1a')][_0xa754('0x1b')]);return _0x50095b(_0x4c008a['error'][_0xa754('0x1b')]);}else{logger[_0xa754('0x1c')]('WhatsappAccount,\x20%s,\x20%s',_0x39af99,_0xa754('0x16'));_0x50095b(_0x4c008a[_0xa754('0x1d')][_0xa754('0x1b')]);}})['catch'](function(_0x3afc53){logger[_0xa754('0x1a')](_0xa754('0x15'),_0x39af99,_0x3afc53);_0x43e2ec(_0x3afc53);});});}exports[_0xa754('0x1e')]=function(_0x4be083){var _0x17fee7=this;return new Promise(function(_0x1334a8,_0x452199){return db[_0xa754('0x1f')][_0xa754('0x20')]({'raw':_0x4be083[_0xa754('0x21')]?_0x4be083[_0xa754('0x21')][_0xa754('0x22')]===undefined?!![]:![]:!![],'where':_0x4be083[_0xa754('0x21')]?_0x4be083['options'][_0xa754('0x23')]||null:null,'attributes':_0x4be083['options']?_0x4be083[_0xa754('0x21')][_0xa754('0x24')]||null:null,'include':_0x4be083[_0xa754('0x21')]?_0x4be083[_0xa754('0x21')][_0xa754('0x25')]?_[_0xa754('0x26')](_0x4be083[_0xa754('0x21')][_0xa754('0x25')],function(_0x1e2e6d){return{'model':db[_0x1e2e6d[_0xa754('0x27')]],'as':_0x1e2e6d['as'],'attributes':_0x1e2e6d[_0xa754('0x24')],'include':_0x1e2e6d[_0xa754('0x25')]?_[_0xa754('0x26')](_0x1e2e6d['include'],function(_0x54c797){return{'model':db[_0x54c797[_0xa754('0x27')]],'as':_0x54c797['as'],'attributes':_0x54c797[_0xa754('0x24')],'include':_0x54c797['include']?_['map'](_0x54c797[_0xa754('0x25')],function(_0x5f44bc){return{'model':db[_0x5f44bc[_0xa754('0x27')]],'as':_0x5f44bc['as'],'attributes':_0x5f44bc[_0xa754('0x24')]};}):[]};}):[]};}):[]:[]})[_0xa754('0x14')](function(_0x4e4963){logger[_0xa754('0x1c')]('ShowWhatsappAccount',_0x4be083);logger['debug'](_0xa754('0x1e'),_0x4be083,JSON['stringify'](_0x4e4963));_0x1334a8(_0x4e4963);})[_0xa754('0x28')](function(_0x36f01d){logger['error'](_0xa754('0x1e'),_0x36f01d[_0xa754('0x1b')],_0x4be083);_0x452199(_0x17fee7[_0xa754('0x1a')](0x1f4,_0x36f01d[_0xa754('0x1b')]));});});}; \ No newline at end of file +var _0x18cb=['raw','include','map','model','attributes','info','stringify','catch','lodash','util','moment','bluebird','randomstring','ioredis','../../config/utils','../../config/logger','rpc','../../config/environment','client','http','redis','defaults','localhost','socket.io-emitter','./whatsappAccount.socket','WhatsappAccount,\x20%s,\x20%s','request\x20sent','debug','WhatsappAccount,\x20%s,\x20%s,\x20%s','error','code','message','result','ShowWhatsappAccount','WhatsappAccount','find','options'];(function(_0x495110,_0x3a7833){var _0x18707e=function(_0x531fe2){while(--_0x531fe2){_0x495110['push'](_0x495110['shift']());}};_0x18707e(++_0x3a7833);}(_0x18cb,0xe6));var _0xb18c=function(_0x2da0ef,_0x20856b){_0x2da0ef=_0x2da0ef-0x0;var _0x2fdba4=_0x18cb[_0x2da0ef];return _0x2fdba4;};'use strict';var _=require(_0xb18c('0x0'));var util=require(_0xb18c('0x1'));var moment=require(_0xb18c('0x2'));var BPromise=require(_0xb18c('0x3'));var rs=require(_0xb18c('0x4'));var fs=require('fs');var Redis=require(_0xb18c('0x5'));var db=require('../../mysqldb')['db'];var utils=require(_0xb18c('0x6'));var logger=require(_0xb18c('0x7'))(_0xb18c('0x8'));var config=require(_0xb18c('0x9'));var jayson=require('jayson/promise');var client=jayson[_0xb18c('0xa')][_0xb18c('0xb')]({'port':0x232a});config[_0xb18c('0xc')]=_[_0xb18c('0xd')](config[_0xb18c('0xc')],{'host':_0xb18c('0xe'),'port':0x18eb});var socket=require(_0xb18c('0xf'))(new Redis(config[_0xb18c('0xc')]));require(_0xb18c('0x10'))['register'](socket);function respondWithRpcPromise(_0xd1c560,_0x5b420d,_0x47a5b4){return new BPromise(function(_0x4d2757,_0x5e802a){return client['request'](_0xd1c560,_0x47a5b4)['then'](function(_0x552484){logger['info'](_0xb18c('0x11'),_0x5b420d,_0xb18c('0x12'));logger[_0xb18c('0x13')](_0xb18c('0x14'),_0x5b420d,'request\x20sent',JSON['stringify'](_0x552484));if(_0x552484[_0xb18c('0x15')]){if(_0x552484['error'][_0xb18c('0x16')]===0x1f4){logger[_0xb18c('0x15')](_0xb18c('0x11'),_0x5b420d,_0x552484[_0xb18c('0x15')][_0xb18c('0x17')]);return _0x5e802a(_0x552484[_0xb18c('0x15')][_0xb18c('0x17')]);}logger[_0xb18c('0x15')]('WhatsappAccount,\x20%s,\x20%s',_0x5b420d,_0x552484[_0xb18c('0x15')][_0xb18c('0x17')]);return _0x4d2757(_0x552484['error'][_0xb18c('0x17')]);}else{logger['info'](_0xb18c('0x11'),_0x5b420d,_0xb18c('0x12'));_0x4d2757(_0x552484[_0xb18c('0x18')][_0xb18c('0x17')]);}})['catch'](function(_0x48bd21){logger[_0xb18c('0x15')](_0xb18c('0x11'),_0x5b420d,_0x48bd21);_0x5e802a(_0x48bd21);});});}exports[_0xb18c('0x19')]=function(_0x93836c){var _0x1a4de9=this;return new Promise(function(_0x508748,_0x46109c){return db[_0xb18c('0x1a')][_0xb18c('0x1b')]({'raw':_0x93836c[_0xb18c('0x1c')]?_0x93836c[_0xb18c('0x1c')][_0xb18c('0x1d')]===undefined?!![]:![]:!![],'where':_0x93836c[_0xb18c('0x1c')]?_0x93836c['options']['where']||null:null,'attributes':_0x93836c[_0xb18c('0x1c')]?_0x93836c[_0xb18c('0x1c')]['attributes']||null:null,'include':_0x93836c[_0xb18c('0x1c')]?_0x93836c[_0xb18c('0x1c')][_0xb18c('0x1e')]?_[_0xb18c('0x1f')](_0x93836c[_0xb18c('0x1c')][_0xb18c('0x1e')],function(_0x275a67){return{'model':db[_0x275a67[_0xb18c('0x20')]],'as':_0x275a67['as'],'attributes':_0x275a67[_0xb18c('0x21')],'include':_0x275a67[_0xb18c('0x1e')]?_['map'](_0x275a67[_0xb18c('0x1e')],function(_0x4673c4){return{'model':db[_0x4673c4[_0xb18c('0x20')]],'as':_0x4673c4['as'],'attributes':_0x4673c4[_0xb18c('0x21')],'include':_0x4673c4[_0xb18c('0x1e')]?_['map'](_0x4673c4[_0xb18c('0x1e')],function(_0x24291f){return{'model':db[_0x24291f[_0xb18c('0x20')]],'as':_0x24291f['as'],'attributes':_0x24291f[_0xb18c('0x21')]};}):[]};}):[]};}):[]:[]})['then'](function(_0x2a2600){logger[_0xb18c('0x22')]('ShowWhatsappAccount',_0x93836c);logger['debug'](_0xb18c('0x19'),_0x93836c,JSON[_0xb18c('0x23')](_0x2a2600));_0x508748(_0x2a2600);})[_0xb18c('0x24')](function(_0x3b84f3){logger['error'](_0xb18c('0x19'),_0x3b84f3[_0xb18c('0x17')],_0x93836c);_0x46109c(_0x1a4de9[_0xb18c('0x15')](0x1f4,_0x3b84f3['message']));});});}; \ No newline at end of file diff --git a/server/api/whatsappAccount/whatsappAccount.socket.js b/server/api/whatsappAccount/whatsappAccount.socket.js index 518a7ef..a6f7ff5 100644 --- a/server/api/whatsappAccount/whatsappAccount.socket.js +++ b/server/api/whatsappAccount/whatsappAccount.socket.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xacd3=['removeListener','length','whatsappAccount:','save','remove','update','emit'];(function(_0x588220,_0x5eb96a){var _0x138f7f=function(_0x4ffe46){while(--_0x4ffe46){_0x588220['push'](_0x588220['shift']());}};_0x138f7f(++_0x5eb96a);}(_0xacd3,0x145));var _0x3acd=function(_0xecc8d,_0x7a564){_0xecc8d=_0xecc8d-0x0;var _0x528739=_0xacd3[_0xecc8d];return _0x528739;};'use strict';var WhatsappAccountEvents=require('./whatsappAccount.events');var events=[_0x3acd('0x0'),_0x3acd('0x1'),_0x3acd('0x2')];function createListener(_0x5ab420,_0x1aa825){return function(_0x135c6c){_0x1aa825[_0x3acd('0x3')](_0x5ab420,_0x135c6c);};}function removeListener(_0x5c3ddd,_0x2d84ee){return function(){WhatsappAccountEvents[_0x3acd('0x4')](_0x5c3ddd,_0x2d84ee);};}exports['register']=function(_0x50065d){for(var _0x543a8d=0x0,_0x5f0a70=events[_0x3acd('0x5')];_0x543a8d<_0x5f0a70;_0x543a8d++){var _0x53b3d2=events[_0x543a8d];var _0x19bb25=createListener(_0x3acd('0x6')+_0x53b3d2,_0x50065d);WhatsappAccountEvents['on'](_0x53b3d2,_0x19bb25);}}; \ No newline at end of file +var _0x8711=['remove','update','emit','removeListener','register','whatsappAccount:','./whatsappAccount.events'];(function(_0x413feb,_0x10477f){var _0x40ee88=function(_0x32a3f6){while(--_0x32a3f6){_0x413feb['push'](_0x413feb['shift']());}};_0x40ee88(++_0x10477f);}(_0x8711,0x110));var _0x1871=function(_0x4868af,_0x5e8e37){_0x4868af=_0x4868af-0x0;var _0x2ad800=_0x8711[_0x4868af];return _0x2ad800;};'use strict';var WhatsappAccountEvents=require(_0x1871('0x0'));var events=['save',_0x1871('0x1'),_0x1871('0x2')];function createListener(_0x1d006d,_0x223b6b){return function(_0x1bd92d){_0x223b6b[_0x1871('0x3')](_0x1d006d,_0x1bd92d);};}function removeListener(_0x68cbe4,_0x3c3053){return function(){WhatsappAccountEvents[_0x1871('0x4')](_0x68cbe4,_0x3c3053);};}exports[_0x1871('0x5')]=function(_0x43c675){for(var _0x1936f9=0x0,_0x168b0c=events['length'];_0x1936f9<_0x168b0c;_0x1936f9++){var _0x4a6c96=events[_0x1936f9];var _0x3b129a=createListener(_0x1871('0x6')+_0x4a6c96,_0x43c675);WhatsappAccountEvents['on'](_0x4a6c96,_0x3b129a);}}; \ No newline at end of file diff --git a/server/api/whatsappApplication/index.js b/server/api/whatsappApplication/index.js index e30fa1a..ad9ba92 100644 --- a/server/api/whatsappApplication/index.js +++ b/server/api/whatsappApplication/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x0e04=['connect-timeout','express','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','./whatsappApplication.controller','isAuthenticated','get','post','create','put','/:id','update','delete','destroy','exports','multer','path'];(function(_0xfae23b,_0x2be4ba){var _0x200640=function(_0x4ae258){while(--_0x4ae258){_0xfae23b['push'](_0xfae23b['shift']());}};_0x200640(++_0x2be4ba);}(_0x0e04,0x141));var _0x40e0=function(_0x39ce7b,_0x5c85e0){_0x39ce7b=_0x39ce7b-0x0;var _0x193018=_0x0e04[_0x39ce7b];return _0x193018;};'use strict';var multer=require(_0x40e0('0x0'));var util=require('util');var path=require(_0x40e0('0x1'));var timeout=require(_0x40e0('0x2'));var express=require(_0x40e0('0x3'));var router=express['Router']();var fs_extra=require(_0x40e0('0x4'));var auth=require(_0x40e0('0x5'));var interaction=require(_0x40e0('0x6'));var config=require(_0x40e0('0x7'));var controller=require(_0x40e0('0x8'));router['get']('/',auth[_0x40e0('0x9')](),controller['index']);router[_0x40e0('0xa')]('/:id',auth['isAuthenticated'](),controller['show']);router[_0x40e0('0xb')]('/',auth[_0x40e0('0x9')](),controller[_0x40e0('0xc')]);router[_0x40e0('0xd')](_0x40e0('0xe'),auth[_0x40e0('0x9')](),controller[_0x40e0('0xf')]);router[_0x40e0('0x10')]('/:id',auth['isAuthenticated'](),controller[_0x40e0('0x11')]);module[_0x40e0('0x12')]=router; \ No newline at end of file +var _0xc15f=['isAuthenticated','index','show','post','put','/:id','update','delete','path','connect-timeout','express','Router','../../components/auth/service','../../components/interaction/service','./whatsappApplication.controller','get'];(function(_0x1db481,_0x1627b2){var _0x3db95b=function(_0x2d54e4){while(--_0x2d54e4){_0x1db481['push'](_0x1db481['shift']());}};_0x3db95b(++_0x1627b2);}(_0xc15f,0x1a8));var _0xfc15=function(_0x41f15f,_0x1a39ef){_0x41f15f=_0x41f15f-0x0;var _0x269a71=_0xc15f[_0x41f15f];return _0x269a71;};'use strict';var multer=require('multer');var util=require('util');var path=require(_0xfc15('0x0'));var timeout=require(_0xfc15('0x1'));var express=require(_0xfc15('0x2'));var router=express[_0xfc15('0x3')]();var fs_extra=require('fs-extra');var auth=require(_0xfc15('0x4'));var interaction=require(_0xfc15('0x5'));var config=require('../../config/environment');var controller=require(_0xfc15('0x6'));router[_0xfc15('0x7')]('/',auth[_0xfc15('0x8')](),controller[_0xfc15('0x9')]);router[_0xfc15('0x7')]('/:id',auth[_0xfc15('0x8')](),controller[_0xfc15('0xa')]);router[_0xfc15('0xb')]('/',auth['isAuthenticated'](),controller['create']);router[_0xfc15('0xc')](_0xfc15('0xd'),auth[_0xfc15('0x8')](),controller[_0xfc15('0xe')]);router[_0xfc15('0xf')](_0xfc15('0xd'),auth['isAuthenticated'](),controller['destroy']);module['exports']=router; \ No newline at end of file diff --git a/server/api/whatsappApplication/whatsappApplication.attributes.js b/server/api/whatsappApplication/whatsappApplication.attributes.js index 94c1c5f..3414039 100644 --- a/server/api/whatsappApplication/whatsappApplication.attributes.js +++ b/server/api/whatsappApplication/whatsappApplication.attributes.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x4acb=['STRING','*,*,*,*','sequelize','exports','INTEGER','TEXT'];(function(_0x378891,_0x4e3e16){var _0xfbfda2=function(_0x3b7681){while(--_0x3b7681){_0x378891['push'](_0x378891['shift']());}};_0xfbfda2(++_0x4e3e16);}(_0x4acb,0x128));var _0xb4ac=function(_0x2f9731,_0x580c0c){_0x2f9731=_0x2f9731-0x0;var _0x181b7d=_0x4acb[_0x2f9731];return _0x181b7d;};'use strict';var Sequelize=require(_0xb4ac('0x0'));module[_0xb4ac('0x1')]={'priority':{'type':Sequelize[_0xb4ac('0x2')],'allowNull':![]},'app':{'type':Sequelize['STRING'],'allowNull':![],'defaultValue':'noop'},'appdata':{'type':Sequelize[_0xb4ac('0x3')]()},'description':{'type':Sequelize[_0xb4ac('0x4')]},'interval':{'type':Sequelize[_0xb4ac('0x4')],'defaultValue':_0xb4ac('0x5')}}; \ No newline at end of file +var _0x1e06=['*,*,*,*','sequelize','exports','STRING','noop','TEXT'];(function(_0x2fc012,_0x503e5b){var _0x2891f9=function(_0x295f5e){while(--_0x295f5e){_0x2fc012['push'](_0x2fc012['shift']());}};_0x2891f9(++_0x503e5b);}(_0x1e06,0x1b7));var _0x61e0=function(_0x345bb7,_0x386dbf){_0x345bb7=_0x345bb7-0x0;var _0x2b1799=_0x1e06[_0x345bb7];return _0x2b1799;};'use strict';var Sequelize=require(_0x61e0('0x0'));module[_0x61e0('0x1')]={'priority':{'type':Sequelize['INTEGER'],'allowNull':![]},'app':{'type':Sequelize[_0x61e0('0x2')],'allowNull':![],'defaultValue':_0x61e0('0x3')},'appdata':{'type':Sequelize[_0x61e0('0x4')]()},'description':{'type':Sequelize[_0x61e0('0x2')]},'interval':{'type':Sequelize[_0x61e0('0x2')],'defaultValue':_0x61e0('0x5')}}; \ No newline at end of file diff --git a/server/api/whatsappApplication/whatsappApplication.controller.js b/server/api/whatsappApplication/whatsappApplication.controller.js index cd16775..a9041e2 100644 --- a/server/api/whatsappApplication/whatsappApplication.controller.js +++ b/server/api/whatsappApplication/whatsappApplication.controller.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x1b64=['status','end','json','offset','limit','undefined','count','set','Content-Range','reject','update','then','destroy','sendStatus','error','name','index','map','fieldName','type','model','query','keys','filters','intersection','attributes','length','hasOwnProperty','nolimit','sort','where','pick','merge','VIRTUAL','filter','options','WhatsappApplication','includeAll','include','findAll','catch','show','params','fields','find','create','body','eml-format','rimraf','fast-json-patch','mustache','util','path','sox','ejs','fs-extra','jsforce','desk.js','to-csv','querystring','papaparse','ioredis','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb'];(function(_0x54270e,_0x21c471){var _0x25ac71=function(_0x83011f){while(--_0x83011f){_0x54270e['push'](_0x54270e['shift']());}};_0x25ac71(++_0x21c471);}(_0x1b64,0x76));var _0x41b6=function(_0x31cb1f,_0x545cb1){_0x31cb1f=_0x31cb1f-0x0;var _0x1fbb35=_0x1b64[_0x31cb1f];return _0x1fbb35;};'use strict';var emlformat=require(_0x41b6('0x0'));var rimraf=require(_0x41b6('0x1'));var zipdir=require('zip-dir');var jsonpatch=require(_0x41b6('0x2'));var rp=require('request-promise');var moment=require('moment');var BPromise=require('bluebird');var Mustache=require(_0x41b6('0x3'));var util=require(_0x41b6('0x4'));var path=require(_0x41b6('0x5'));var sox=require(_0x41b6('0x6'));var csv=require('to-csv');var ejs=require(_0x41b6('0x7'));var fs=require('fs');var fs_extra=require(_0x41b6('0x8'));var _=require('lodash');var squel=require('squel');var crypto=require('crypto');var jsforce=require(_0x41b6('0x9'));var deskjs=require(_0x41b6('0xa'));var toCsv=require(_0x41b6('0xb'));var querystring=require(_0x41b6('0xc'));var Papa=require(_0x41b6('0xd'));var Redis=require(_0x41b6('0xe'));var authService=require('../../components/auth/service');var qs=require(_0x41b6('0xf'));var as=require(_0x41b6('0x10'));var hardwareService=require(_0x41b6('0x11'));var logger=require(_0x41b6('0x12'))(_0x41b6('0x13'));var utils=require(_0x41b6('0x14'));var config=require(_0x41b6('0x15'));var licenseUtil=require(_0x41b6('0x16'));var db=require(_0x41b6('0x17'))['db'];function respondWithStatusCode(_0x1d6080,_0x663516){_0x663516=_0x663516||0xcc;return function(_0x249c3c){if(_0x249c3c){return _0x1d6080['sendStatus'](_0x663516);}return _0x1d6080[_0x41b6('0x18')](_0x663516)[_0x41b6('0x19')]();};}function respondWithResult(_0x11256f,_0x26bb9d){_0x26bb9d=_0x26bb9d||0xc8;return function(_0x549976){if(_0x549976){return _0x11256f[_0x41b6('0x18')](_0x26bb9d)[_0x41b6('0x1a')](_0x549976);}};}function respondWithFilteredResult(_0x24e59a,_0x2d948d){return function(_0x1d4441){if(_0x1d4441){var _0x1bd0b0=typeof _0x2d948d[_0x41b6('0x1b')]==='undefined'&&typeof _0x2d948d[_0x41b6('0x1c')]===_0x41b6('0x1d');var _0x1b2500=_0x1d4441[_0x41b6('0x1e')];var _0x14a786=_0x1bd0b0?0x0:_0x2d948d['offset'];var _0x5637f6=_0x1bd0b0?_0x1d4441['count']:_0x2d948d['offset']+_0x2d948d[_0x41b6('0x1c')];var _0x5a427a;if(_0x5637f6>=_0x1b2500){_0x5637f6=_0x1b2500;_0x5a427a=0xc8;}else{_0x5a427a=0xce;}_0x24e59a[_0x41b6('0x18')](_0x5a427a);return _0x24e59a[_0x41b6('0x1f')](_0x41b6('0x20'),_0x14a786+'-'+_0x5637f6+'/'+_0x1b2500)[_0x41b6('0x1a')](_0x1d4441);}return null;};}function patchUpdates(_0x10c17c){return function(_0x448c62){try{jsonpatch['apply'](_0x448c62,_0x10c17c,!![]);}catch(_0x59948c){return BPromise[_0x41b6('0x21')](_0x59948c);}return _0x448c62['save']();};}function saveUpdates(_0xb4596c,_0x1c37ea){return function(_0x309eba){if(_0x309eba){return _0x309eba[_0x41b6('0x22')](_0xb4596c)[_0x41b6('0x23')](function(_0x1c8e7a){return _0x1c8e7a;});}return null;};}function removeEntity(_0x1fea00,_0x11cc02){return function(_0x2f8e9c){if(_0x2f8e9c){return _0x2f8e9c[_0x41b6('0x24')]()[_0x41b6('0x23')](function(){_0x1fea00['status'](0xcc)[_0x41b6('0x19')]();});}};}function handleEntityNotFound(_0x2c1290,_0x5a984b){return function(_0x7e3269){if(!_0x7e3269){_0x2c1290[_0x41b6('0x25')](0x194);}return _0x7e3269;};}function handleError(_0x4f98de,_0x22d399){_0x22d399=_0x22d399||0x1f4;return function(_0x454b5f){logger[_0x41b6('0x26')](_0x454b5f['stack']);if(_0x454b5f[_0x41b6('0x27')]){delete _0x454b5f['name'];}_0x4f98de['status'](_0x22d399)['send'](_0x454b5f);};}exports[_0x41b6('0x28')]=function(_0x425c16,_0x5b5ca7){var _0x2dee1f={},_0x45f9e2={},_0x102345={'count':0x0,'rows':[]};var _0x426cfc=_[_0x41b6('0x29')](db['WhatsappApplication']['rawAttributes'],function(_0x3338c4){return{'name':_0x3338c4[_0x41b6('0x2a')],'type':_0x3338c4[_0x41b6('0x2b')]['key']};});_0x45f9e2[_0x41b6('0x2c')]=_[_0x41b6('0x29')](_0x426cfc,'name');_0x45f9e2[_0x41b6('0x2d')]=_[_0x41b6('0x2e')](_0x425c16[_0x41b6('0x2d')]);_0x45f9e2[_0x41b6('0x2f')]=_[_0x41b6('0x30')](_0x45f9e2[_0x41b6('0x2c')],_0x45f9e2[_0x41b6('0x2d')]);_0x2dee1f['attributes']=_[_0x41b6('0x30')](_0x45f9e2['model'],qs['fields'](_0x425c16[_0x41b6('0x2d')]['fields']));_0x2dee1f[_0x41b6('0x31')]=_0x2dee1f[_0x41b6('0x31')][_0x41b6('0x32')]?_0x2dee1f[_0x41b6('0x31')]:_0x45f9e2[_0x41b6('0x2c')];if(!_0x425c16[_0x41b6('0x2d')][_0x41b6('0x33')](_0x41b6('0x34'))){_0x2dee1f['limit']=qs[_0x41b6('0x1c')](_0x425c16[_0x41b6('0x2d')][_0x41b6('0x1c')]);_0x2dee1f[_0x41b6('0x1b')]=qs[_0x41b6('0x1b')](_0x425c16[_0x41b6('0x2d')][_0x41b6('0x1b')]);}_0x2dee1f['order']=qs[_0x41b6('0x35')](_0x425c16['query']['sort']);_0x2dee1f[_0x41b6('0x36')]=qs[_0x41b6('0x2f')](_[_0x41b6('0x37')](_0x425c16[_0x41b6('0x2d')],_0x45f9e2[_0x41b6('0x2f')]),_0x426cfc);if(_0x425c16[_0x41b6('0x2d')]['filter']){_0x2dee1f[_0x41b6('0x36')]=_[_0x41b6('0x38')](_0x2dee1f[_0x41b6('0x36')],{'$or':_[_0x41b6('0x29')](_0x426cfc,function(_0x10cec5){if(_0x10cec5[_0x41b6('0x2b')]!==_0x41b6('0x39')){var _0x565ff8={};_0x565ff8[_0x10cec5[_0x41b6('0x27')]]={'$like':'%'+_0x425c16[_0x41b6('0x2d')][_0x41b6('0x3a')]+'%'};return _0x565ff8;}})});}_0x2dee1f=_[_0x41b6('0x38')]({},_0x2dee1f,_0x425c16[_0x41b6('0x3b')]);var _0x158d55={'where':_0x2dee1f[_0x41b6('0x36')]};return db[_0x41b6('0x3c')][_0x41b6('0x1e')](_0x158d55)[_0x41b6('0x23')](function(_0x175b33){_0x102345[_0x41b6('0x1e')]=_0x175b33;if(_0x425c16['query'][_0x41b6('0x3d')]){_0x2dee1f[_0x41b6('0x3e')]=[{'all':!![]}];}return db[_0x41b6('0x3c')][_0x41b6('0x3f')](_0x2dee1f);})[_0x41b6('0x23')](function(_0x3b26ca){_0x102345['rows']=_0x3b26ca;return _0x102345;})['then'](respondWithFilteredResult(_0x5b5ca7,_0x2dee1f))[_0x41b6('0x40')](handleError(_0x5b5ca7,null));};exports[_0x41b6('0x41')]=function(_0x501bab,_0x56d9ab){var _0x1e4d30={'raw':!![],'where':{'id':_0x501bab[_0x41b6('0x42')]['id']}},_0x2e72ae={};_0x2e72ae['model']=_['keys'](db[_0x41b6('0x3c')]['rawAttributes']);_0x2e72ae[_0x41b6('0x2d')]=_[_0x41b6('0x2e')](_0x501bab[_0x41b6('0x2d')]);_0x2e72ae[_0x41b6('0x2f')]=_[_0x41b6('0x30')](_0x2e72ae['model'],_0x2e72ae[_0x41b6('0x2d')]);_0x1e4d30[_0x41b6('0x31')]=_[_0x41b6('0x30')](_0x2e72ae[_0x41b6('0x2c')],qs['fields'](_0x501bab[_0x41b6('0x2d')][_0x41b6('0x43')]));_0x1e4d30[_0x41b6('0x31')]=_0x1e4d30[_0x41b6('0x31')][_0x41b6('0x32')]?_0x1e4d30[_0x41b6('0x31')]:_0x2e72ae[_0x41b6('0x2c')];if(_0x501bab['query'][_0x41b6('0x3d')]){_0x1e4d30['include']=[{'all':!![]}];}_0x1e4d30=_[_0x41b6('0x38')]({},_0x1e4d30,_0x501bab[_0x41b6('0x3b')]);return db['WhatsappApplication'][_0x41b6('0x44')](_0x1e4d30)[_0x41b6('0x23')](handleEntityNotFound(_0x56d9ab,null))['then'](respondWithResult(_0x56d9ab,null))[_0x41b6('0x40')](handleError(_0x56d9ab,null));};exports[_0x41b6('0x45')]=function(_0x11a951,_0x690c7a){return db[_0x41b6('0x3c')]['create'](_0x11a951[_0x41b6('0x46')],{})[_0x41b6('0x23')](respondWithResult(_0x690c7a,0xc9))[_0x41b6('0x40')](handleError(_0x690c7a,null));};exports['update']=function(_0x1b519a,_0x46a496){if(_0x1b519a[_0x41b6('0x46')]['id']){delete _0x1b519a[_0x41b6('0x46')]['id'];}return db[_0x41b6('0x3c')][_0x41b6('0x44')]({'where':{'id':_0x1b519a[_0x41b6('0x42')]['id']}})['then'](handleEntityNotFound(_0x46a496,null))['then'](saveUpdates(_0x1b519a[_0x41b6('0x46')],null))['then'](respondWithResult(_0x46a496,null))['catch'](handleError(_0x46a496,null));};exports[_0x41b6('0x24')]=function(_0x40a284,_0x39d4a0){return db[_0x41b6('0x3c')][_0x41b6('0x44')]({'where':{'id':_0x40a284[_0x41b6('0x42')]['id']}})['then'](handleEntityNotFound(_0x39d4a0,null))[_0x41b6('0x23')](removeEntity(_0x39d4a0,null))['catch'](handleError(_0x39d4a0,null));}; \ No newline at end of file +var _0xf06c=['ioredis','../../components/auth/service','../../config/license/hardware','api','../../config/environment','../../mysqldb','end','json','offset','undefined','count','limit','status','set','Content-Range','reject','update','then','destroy','sendStatus','name','send','index','WhatsappApplication','fieldName','type','key','model','map','query','keys','filters','intersection','attributes','fields','length','hasOwnProperty','nolimit','order','sort','where','pick','filter','merge','VIRTUAL','options','includeAll','findAll','rows','show','params','rawAttributes','include','find','catch','create','body','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','bluebird','mustache','util','sox','to-csv','ejs','lodash','crypto','papaparse'];(function(_0x4d41f6,_0x2c4d5e){var _0x4c3143=function(_0xfb3b67){while(--_0xfb3b67){_0x4d41f6['push'](_0x4d41f6['shift']());}};_0x4c3143(++_0x2c4d5e);}(_0xf06c,0xc7));var _0xcf06=function(_0x28d78e,_0x433f96){_0x28d78e=_0x28d78e-0x0;var _0x1addab=_0xf06c[_0x28d78e];return _0x1addab;};'use strict';var emlformat=require(_0xcf06('0x0'));var rimraf=require(_0xcf06('0x1'));var zipdir=require(_0xcf06('0x2'));var jsonpatch=require(_0xcf06('0x3'));var rp=require(_0xcf06('0x4'));var moment=require('moment');var BPromise=require(_0xcf06('0x5'));var Mustache=require(_0xcf06('0x6'));var util=require(_0xcf06('0x7'));var path=require('path');var sox=require(_0xcf06('0x8'));var csv=require(_0xcf06('0x9'));var ejs=require(_0xcf06('0xa'));var fs=require('fs');var fs_extra=require('fs-extra');var _=require(_0xcf06('0xb'));var squel=require('squel');var crypto=require(_0xcf06('0xc'));var jsforce=require('jsforce');var deskjs=require('desk.js');var toCsv=require('to-csv');var querystring=require('querystring');var Papa=require(_0xcf06('0xd'));var Redis=require(_0xcf06('0xe'));var authService=require(_0xcf06('0xf'));var qs=require('../../components/parsers/qs');var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0xcf06('0x10'));var logger=require('../../config/logger')(_0xcf06('0x11'));var utils=require('../../config/utils');var config=require(_0xcf06('0x12'));var licenseUtil=require('../../config/license/util');var db=require(_0xcf06('0x13'))['db'];function respondWithStatusCode(_0x570965,_0x2aaa5f){_0x2aaa5f=_0x2aaa5f||0xcc;return function(_0x3dc669){if(_0x3dc669){return _0x570965['sendStatus'](_0x2aaa5f);}return _0x570965['status'](_0x2aaa5f)[_0xcf06('0x14')]();};}function respondWithResult(_0x45f66a,_0x2fd686){_0x2fd686=_0x2fd686||0xc8;return function(_0x157689){if(_0x157689){return _0x45f66a['status'](_0x2fd686)[_0xcf06('0x15')](_0x157689);}};}function respondWithFilteredResult(_0x4aa0d,_0x5db932){return function(_0x584d2c){if(_0x584d2c){var _0x15a795=typeof _0x5db932[_0xcf06('0x16')]===_0xcf06('0x17')&&typeof _0x5db932['limit']===_0xcf06('0x17');var _0x18cd3f=_0x584d2c[_0xcf06('0x18')];var _0x569bbf=_0x15a795?0x0:_0x5db932[_0xcf06('0x16')];var _0x2a5ef5=_0x15a795?_0x584d2c[_0xcf06('0x18')]:_0x5db932[_0xcf06('0x16')]+_0x5db932[_0xcf06('0x19')];var _0x48886d;if(_0x2a5ef5>=_0x18cd3f){_0x2a5ef5=_0x18cd3f;_0x48886d=0xc8;}else{_0x48886d=0xce;}_0x4aa0d[_0xcf06('0x1a')](_0x48886d);return _0x4aa0d[_0xcf06('0x1b')](_0xcf06('0x1c'),_0x569bbf+'-'+_0x2a5ef5+'/'+_0x18cd3f)['json'](_0x584d2c);}return null;};}function patchUpdates(_0x465eed){return function(_0x19305d){try{jsonpatch['apply'](_0x19305d,_0x465eed,!![]);}catch(_0x362fcc){return BPromise[_0xcf06('0x1d')](_0x362fcc);}return _0x19305d['save']();};}function saveUpdates(_0x2edadc,_0x132eaa){return function(_0x139b17){if(_0x139b17){return _0x139b17[_0xcf06('0x1e')](_0x2edadc)[_0xcf06('0x1f')](function(_0x13fa04){return _0x13fa04;});}return null;};}function removeEntity(_0xe3304a,_0x26a685){return function(_0xb039dd){if(_0xb039dd){return _0xb039dd[_0xcf06('0x20')]()[_0xcf06('0x1f')](function(){_0xe3304a[_0xcf06('0x1a')](0xcc)['end']();});}};}function handleEntityNotFound(_0x58840a,_0x87440){return function(_0x27beb7){if(!_0x27beb7){_0x58840a[_0xcf06('0x21')](0x194);}return _0x27beb7;};}function handleError(_0x27cbd9,_0x2e1617){_0x2e1617=_0x2e1617||0x1f4;return function(_0x6c3dcf){logger['error'](_0x6c3dcf['stack']);if(_0x6c3dcf[_0xcf06('0x22')]){delete _0x6c3dcf['name'];}_0x27cbd9[_0xcf06('0x1a')](_0x2e1617)[_0xcf06('0x23')](_0x6c3dcf);};}exports[_0xcf06('0x24')]=function(_0x474bfe,_0x120d0c){var _0x4651f4={},_0x303823={},_0x2b2508={'count':0x0,'rows':[]};var _0x2ec5b7=_['map'](db[_0xcf06('0x25')]['rawAttributes'],function(_0x92666b){return{'name':_0x92666b[_0xcf06('0x26')],'type':_0x92666b[_0xcf06('0x27')][_0xcf06('0x28')]};});_0x303823[_0xcf06('0x29')]=_[_0xcf06('0x2a')](_0x2ec5b7,'name');_0x303823[_0xcf06('0x2b')]=_[_0xcf06('0x2c')](_0x474bfe[_0xcf06('0x2b')]);_0x303823[_0xcf06('0x2d')]=_[_0xcf06('0x2e')](_0x303823[_0xcf06('0x29')],_0x303823[_0xcf06('0x2b')]);_0x4651f4[_0xcf06('0x2f')]=_[_0xcf06('0x2e')](_0x303823[_0xcf06('0x29')],qs['fields'](_0x474bfe[_0xcf06('0x2b')][_0xcf06('0x30')]));_0x4651f4[_0xcf06('0x2f')]=_0x4651f4[_0xcf06('0x2f')][_0xcf06('0x31')]?_0x4651f4[_0xcf06('0x2f')]:_0x303823[_0xcf06('0x29')];if(!_0x474bfe[_0xcf06('0x2b')][_0xcf06('0x32')](_0xcf06('0x33'))){_0x4651f4[_0xcf06('0x19')]=qs['limit'](_0x474bfe[_0xcf06('0x2b')][_0xcf06('0x19')]);_0x4651f4['offset']=qs[_0xcf06('0x16')](_0x474bfe['query'][_0xcf06('0x16')]);}_0x4651f4[_0xcf06('0x34')]=qs[_0xcf06('0x35')](_0x474bfe[_0xcf06('0x2b')]['sort']);_0x4651f4[_0xcf06('0x36')]=qs[_0xcf06('0x2d')](_[_0xcf06('0x37')](_0x474bfe[_0xcf06('0x2b')],_0x303823[_0xcf06('0x2d')]),_0x2ec5b7);if(_0x474bfe['query'][_0xcf06('0x38')]){_0x4651f4[_0xcf06('0x36')]=_[_0xcf06('0x39')](_0x4651f4[_0xcf06('0x36')],{'$or':_[_0xcf06('0x2a')](_0x2ec5b7,function(_0x45ddbf){if(_0x45ddbf[_0xcf06('0x27')]!==_0xcf06('0x3a')){var _0x3e0b3f={};_0x3e0b3f[_0x45ddbf[_0xcf06('0x22')]]={'$like':'%'+_0x474bfe[_0xcf06('0x2b')][_0xcf06('0x38')]+'%'};return _0x3e0b3f;}})});}_0x4651f4=_[_0xcf06('0x39')]({},_0x4651f4,_0x474bfe[_0xcf06('0x3b')]);var _0x446972={'where':_0x4651f4[_0xcf06('0x36')]};return db[_0xcf06('0x25')]['count'](_0x446972)[_0xcf06('0x1f')](function(_0x59b8ed){_0x2b2508[_0xcf06('0x18')]=_0x59b8ed;if(_0x474bfe[_0xcf06('0x2b')][_0xcf06('0x3c')]){_0x4651f4['include']=[{'all':!![]}];}return db[_0xcf06('0x25')][_0xcf06('0x3d')](_0x4651f4);})[_0xcf06('0x1f')](function(_0x38c153){_0x2b2508[_0xcf06('0x3e')]=_0x38c153;return _0x2b2508;})['then'](respondWithFilteredResult(_0x120d0c,_0x4651f4))['catch'](handleError(_0x120d0c,null));};exports[_0xcf06('0x3f')]=function(_0x518c2f,_0x120dae){var _0x40735b={'raw':!![],'where':{'id':_0x518c2f[_0xcf06('0x40')]['id']}},_0x4342e0={};_0x4342e0['model']=_[_0xcf06('0x2c')](db[_0xcf06('0x25')][_0xcf06('0x41')]);_0x4342e0['query']=_[_0xcf06('0x2c')](_0x518c2f['query']);_0x4342e0[_0xcf06('0x2d')]=_['intersection'](_0x4342e0[_0xcf06('0x29')],_0x4342e0['query']);_0x40735b[_0xcf06('0x2f')]=_[_0xcf06('0x2e')](_0x4342e0[_0xcf06('0x29')],qs['fields'](_0x518c2f[_0xcf06('0x2b')][_0xcf06('0x30')]));_0x40735b[_0xcf06('0x2f')]=_0x40735b['attributes'][_0xcf06('0x31')]?_0x40735b['attributes']:_0x4342e0[_0xcf06('0x29')];if(_0x518c2f[_0xcf06('0x2b')][_0xcf06('0x3c')]){_0x40735b[_0xcf06('0x42')]=[{'all':!![]}];}_0x40735b=_['merge']({},_0x40735b,_0x518c2f[_0xcf06('0x3b')]);return db[_0xcf06('0x25')][_0xcf06('0x43')](_0x40735b)['then'](handleEntityNotFound(_0x120dae,null))[_0xcf06('0x1f')](respondWithResult(_0x120dae,null))[_0xcf06('0x44')](handleError(_0x120dae,null));};exports['create']=function(_0xc392e,_0x8a988f){return db[_0xcf06('0x25')][_0xcf06('0x45')](_0xc392e[_0xcf06('0x46')],{})['then'](respondWithResult(_0x8a988f,0xc9))[_0xcf06('0x44')](handleError(_0x8a988f,null));};exports[_0xcf06('0x1e')]=function(_0x453e6e,_0x319314){if(_0x453e6e[_0xcf06('0x46')]['id']){delete _0x453e6e['body']['id'];}return db[_0xcf06('0x25')]['find']({'where':{'id':_0x453e6e[_0xcf06('0x40')]['id']}})[_0xcf06('0x1f')](handleEntityNotFound(_0x319314,null))[_0xcf06('0x1f')](saveUpdates(_0x453e6e[_0xcf06('0x46')],null))[_0xcf06('0x1f')](respondWithResult(_0x319314,null))['catch'](handleError(_0x319314,null));};exports[_0xcf06('0x20')]=function(_0x4e45dd,_0xc32502){return db[_0xcf06('0x25')][_0xcf06('0x43')]({'where':{'id':_0x4e45dd[_0xcf06('0x40')]['id']}})[_0xcf06('0x1f')](handleEntityNotFound(_0xc32502,null))[_0xcf06('0x1f')](removeEntity(_0xc32502,null))['catch'](handleError(_0xc32502,null));}; \ No newline at end of file diff --git a/server/api/whatsappApplication/whatsappApplication.model.js b/server/api/whatsappApplication/whatsappApplication.model.js index 9cc9b21..aef4ed0 100644 --- a/server/api/whatsappApplication/whatsappApplication.model.js +++ b/server/api/whatsappApplication/whatsappApplication.model.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xd67b=['../../config/environment','exports','define','WhatsappApplication','whatsapp_applications','utf8mb4','utf8mb4_unicode_ci','util','api','moment','bluebird','path'];(function(_0x3e2bcd,_0x45b246){var _0x20c085=function(_0x21f666){while(--_0x21f666){_0x3e2bcd['push'](_0x3e2bcd['shift']());}};_0x20c085(++_0x45b246);}(_0xd67b,0x133));var _0xbd67=function(_0x47d79b,_0x4f8f4d){_0x47d79b=_0x47d79b-0x0;var _0x20aa71=_0xd67b[_0x47d79b];return _0x20aa71;};'use strict';var _=require('lodash');var util=require(_0xbd67('0x0'));var logger=require('../../config/logger')(_0xbd67('0x1'));var moment=require(_0xbd67('0x2'));var BPromise=require(_0xbd67('0x3'));var rp=require('request-promise');var fs=require('fs');var path=require(_0xbd67('0x4'));var rimraf=require('rimraf');var config=require(_0xbd67('0x5'));var attributes=require('./whatsappApplication.attributes');module[_0xbd67('0x6')]=function(_0xa5c384,_0x2ad142){return _0xa5c384[_0xbd67('0x7')](_0xbd67('0x8'),attributes,{'tableName':_0xbd67('0x9'),'paranoid':![],'indexes':[],'timestamps':!![],'charset':_0xbd67('0xa'),'collate':_0xbd67('0xb')});}; \ No newline at end of file +var _0xa8eb=['bluebird','request-promise','rimraf','../../config/environment','exports','WhatsappApplication','whatsapp_applications','lodash','../../config/logger','moment'];(function(_0x56482c,_0x16118d){var _0x5aae7a=function(_0x52512f){while(--_0x52512f){_0x56482c['push'](_0x56482c['shift']());}};_0x5aae7a(++_0x16118d);}(_0xa8eb,0x179));var _0xba8e=function(_0x4f49af,_0x47e992){_0x4f49af=_0x4f49af-0x0;var _0x28ef1a=_0xa8eb[_0x4f49af];return _0x28ef1a;};'use strict';var _=require(_0xba8e('0x0'));var util=require('util');var logger=require(_0xba8e('0x1'))('api');var moment=require(_0xba8e('0x2'));var BPromise=require(_0xba8e('0x3'));var rp=require(_0xba8e('0x4'));var fs=require('fs');var path=require('path');var rimraf=require(_0xba8e('0x5'));var config=require(_0xba8e('0x6'));var attributes=require('./whatsappApplication.attributes');module[_0xba8e('0x7')]=function(_0x57e345,_0x14c3ac){return _0x57e345['define'](_0xba8e('0x8'),attributes,{'tableName':_0xba8e('0x9'),'paranoid':![],'indexes':[],'timestamps':!![],'charset':'utf8mb4','collate':'utf8mb4_unicode_ci'});}; \ No newline at end of file diff --git a/server/api/whatsappApplication/whatsappApplication.rpc.js b/server/api/whatsappApplication/whatsappApplication.rpc.js index 8340296..9aed681 100644 --- a/server/api/whatsappApplication/whatsappApplication.rpc.js +++ b/server/api/whatsappApplication/whatsappApplication.rpc.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x81bd=['util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/logger','rpc','../../config/environment','client','http','request','then','info','WhatsappApplication,\x20%s,\x20%s','request\x20sent','debug','WhatsappApplication,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','catch','lodash'];(function(_0x4c06d7,_0x3c270b){var _0x2af20f=function(_0x48b8fb){while(--_0x48b8fb){_0x4c06d7['push'](_0x4c06d7['shift']());}};_0x2af20f(++_0x3c270b);}(_0x81bd,0x7c));var _0xd81b=function(_0x29d87d,_0x23dc31){_0x29d87d=_0x29d87d-0x0;var _0x1fd84b=_0x81bd[_0x29d87d];return _0x1fd84b;};'use strict';var _=require(_0xd81b('0x0'));var util=require(_0xd81b('0x1'));var moment=require(_0xd81b('0x2'));var BPromise=require(_0xd81b('0x3'));var rs=require(_0xd81b('0x4'));var fs=require('fs');var Redis=require(_0xd81b('0x5'));var db=require(_0xd81b('0x6'))['db'];var utils=require('../../config/utils');var logger=require(_0xd81b('0x7'))(_0xd81b('0x8'));var config=require(_0xd81b('0x9'));var jayson=require('jayson/promise');var client=jayson[_0xd81b('0xa')][_0xd81b('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x1f3f2c,_0x562084,_0x5e14e8){return new BPromise(function(_0xa4cf97,_0x5468d5){return client[_0xd81b('0xc')](_0x1f3f2c,_0x5e14e8)[_0xd81b('0xd')](function(_0x3420a7){logger[_0xd81b('0xe')](_0xd81b('0xf'),_0x562084,_0xd81b('0x10'));logger[_0xd81b('0x11')](_0xd81b('0x12'),_0x562084,_0xd81b('0x10'),JSON[_0xd81b('0x13')](_0x3420a7));if(_0x3420a7[_0xd81b('0x14')]){if(_0x3420a7[_0xd81b('0x14')][_0xd81b('0x15')]===0x1f4){logger['error'](_0xd81b('0xf'),_0x562084,_0x3420a7['error'][_0xd81b('0x16')]);return _0x5468d5(_0x3420a7[_0xd81b('0x14')]['message']);}logger[_0xd81b('0x14')]('WhatsappApplication,\x20%s,\x20%s',_0x562084,_0x3420a7[_0xd81b('0x14')][_0xd81b('0x16')]);return _0xa4cf97(_0x3420a7[_0xd81b('0x14')][_0xd81b('0x16')]);}else{logger[_0xd81b('0xe')]('WhatsappApplication,\x20%s,\x20%s',_0x562084,_0xd81b('0x10'));_0xa4cf97(_0x3420a7[_0xd81b('0x17')]['message']);}})[_0xd81b('0x18')](function(_0x26df61){logger[_0xd81b('0x14')](_0xd81b('0xf'),_0x562084,_0x26df61);_0x5468d5(_0x26df61);});});} \ No newline at end of file +var _0x24ca=['request\x20sent','debug','WhatsappApplication,\x20%s,\x20%s,\x20%s','stringify','error','message','result','lodash','moment','bluebird','randomstring','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','request','then','info','WhatsappApplication,\x20%s,\x20%s'];(function(_0xc8505b,_0x294fcd){var _0x2bac9b=function(_0xbcef17){while(--_0xbcef17){_0xc8505b['push'](_0xc8505b['shift']());}};_0x2bac9b(++_0x294fcd);}(_0x24ca,0x1bc));var _0xa24c=function(_0x1a809b,_0x4c15e3){_0x1a809b=_0x1a809b-0x0;var _0x5d90e6=_0x24ca[_0x1a809b];return _0x5d90e6;};'use strict';var _=require(_0xa24c('0x0'));var util=require('util');var moment=require(_0xa24c('0x1'));var BPromise=require(_0xa24c('0x2'));var rs=require(_0xa24c('0x3'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0xa24c('0x4'))['db'];var utils=require(_0xa24c('0x5'));var logger=require(_0xa24c('0x6'))(_0xa24c('0x7'));var config=require(_0xa24c('0x8'));var jayson=require(_0xa24c('0x9'));var client=jayson[_0xa24c('0xa')][_0xa24c('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x2dd348,_0x257264,_0x9a5013){return new BPromise(function(_0x481196,_0x42d89c){return client[_0xa24c('0xc')](_0x2dd348,_0x9a5013)[_0xa24c('0xd')](function(_0x5eac78){logger[_0xa24c('0xe')](_0xa24c('0xf'),_0x257264,_0xa24c('0x10'));logger[_0xa24c('0x11')](_0xa24c('0x12'),_0x257264,_0xa24c('0x10'),JSON[_0xa24c('0x13')](_0x5eac78));if(_0x5eac78[_0xa24c('0x14')]){if(_0x5eac78[_0xa24c('0x14')]['code']===0x1f4){logger[_0xa24c('0x14')](_0xa24c('0xf'),_0x257264,_0x5eac78[_0xa24c('0x14')][_0xa24c('0x15')]);return _0x42d89c(_0x5eac78['error'][_0xa24c('0x15')]);}logger[_0xa24c('0x14')](_0xa24c('0xf'),_0x257264,_0x5eac78[_0xa24c('0x14')][_0xa24c('0x15')]);return _0x481196(_0x5eac78[_0xa24c('0x14')][_0xa24c('0x15')]);}else{logger['info']('WhatsappApplication,\x20%s,\x20%s',_0x257264,_0xa24c('0x10'));_0x481196(_0x5eac78[_0xa24c('0x16')]['message']);}})['catch'](function(_0x221d21){logger[_0xa24c('0x14')]('WhatsappApplication,\x20%s,\x20%s',_0x257264,_0x221d21);_0x42d89c(_0x221d21);});});} \ No newline at end of file diff --git a/server/api/whatsappInteraction/index.js b/server/api/whatsappInteraction/index.js index 607038d..5adcb85 100644 --- a/server/api/whatsappInteraction/index.js +++ b/server/api/whatsappInteraction/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xe714=['post','/:id/tags','whatsapp','/:id','whatsappinteraction:update','update','delete','tracked','whatsappinteraction:destroy','destroy','multer','path','connect-timeout','express','Router','../../components/auth/service','../../config/environment','./whatsappInteraction.controller','get','isAuthenticated','index','describe','/:id/messages','getMessages','/:id/download','download','create'];(function(_0x336312,_0x32dd3e){var _0x4992d6=function(_0x30ab80){while(--_0x30ab80){_0x336312['push'](_0x336312['shift']());}};_0x4992d6(++_0x32dd3e);}(_0xe714,0xe2));var _0x4e71=function(_0x31a382,_0x2c336d){_0x31a382=_0x31a382-0x0;var _0x3b71d4=_0xe714[_0x31a382];return _0x3b71d4;};'use strict';var multer=require(_0x4e71('0x0'));var util=require('util');var path=require(_0x4e71('0x1'));var timeout=require(_0x4e71('0x2'));var express=require(_0x4e71('0x3'));var router=express[_0x4e71('0x4')]();var fs_extra=require('fs-extra');var auth=require(_0x4e71('0x5'));var interaction=require('../../components/interaction/service');var config=require(_0x4e71('0x6'));var controller=require(_0x4e71('0x7'));router[_0x4e71('0x8')]('/',auth[_0x4e71('0x9')](),controller[_0x4e71('0xa')]);router[_0x4e71('0x8')]('/describe',auth[_0x4e71('0x9')](),controller[_0x4e71('0xb')]);router[_0x4e71('0x8')]('/:id',auth[_0x4e71('0x9')](),controller['show']);router[_0x4e71('0x8')](_0x4e71('0xc'),auth[_0x4e71('0x9')](),controller[_0x4e71('0xd')]);router[_0x4e71('0x8')](_0x4e71('0xe'),auth[_0x4e71('0x9')](),controller[_0x4e71('0xf')]);router['post']('/',auth[_0x4e71('0x9')](),controller[_0x4e71('0x10')]);router['post'](_0x4e71('0xc'),auth[_0x4e71('0x9')](),controller['addMessage']);router[_0x4e71('0x11')](_0x4e71('0x12'),auth['isAuthenticated'](),interaction['tracked'](_0x4e71('0x13'),'whatsappinteraction:addtags'),controller['addTags']);router['put'](_0x4e71('0x14'),auth[_0x4e71('0x9')](),interaction['tracked']('whatsapp',_0x4e71('0x15')),controller[_0x4e71('0x16')]);router[_0x4e71('0x17')](_0x4e71('0x14'),auth[_0x4e71('0x9')](),interaction[_0x4e71('0x18')]('whatsapp',_0x4e71('0x19')),controller[_0x4e71('0x1a')]);router['delete'](_0x4e71('0x12'),auth[_0x4e71('0x9')](),controller['removeTags']);module['exports']=router; \ No newline at end of file +var _0x82c4=['create','post','addMessage','tracked','whatsapp','whatsappinteraction:addtags','addTags','put','/:id','whatsappinteraction:update','update','delete','whatsappinteraction:destroy','/:id/tags','removeTags','exports','multer','util','path','connect-timeout','express','Router','fs-extra','../../components/interaction/service','./whatsappInteraction.controller','isAuthenticated','get','/describe','describe','show','/:id/messages','getMessages','/:id/download','download'];(function(_0x406620,_0x16a1a0){var _0x1abbee=function(_0x33d6b9){while(--_0x33d6b9){_0x406620['push'](_0x406620['shift']());}};_0x1abbee(++_0x16a1a0);}(_0x82c4,0x1ca));var _0x482c=function(_0x174e66,_0x3ef28d){_0x174e66=_0x174e66-0x0;var _0x1d3a43=_0x82c4[_0x174e66];return _0x1d3a43;};'use strict';var multer=require(_0x482c('0x0'));var util=require(_0x482c('0x1'));var path=require(_0x482c('0x2'));var timeout=require(_0x482c('0x3'));var express=require(_0x482c('0x4'));var router=express[_0x482c('0x5')]();var fs_extra=require(_0x482c('0x6'));var auth=require('../../components/auth/service');var interaction=require(_0x482c('0x7'));var config=require('../../config/environment');var controller=require(_0x482c('0x8'));router['get']('/',auth[_0x482c('0x9')](),controller['index']);router[_0x482c('0xa')](_0x482c('0xb'),auth[_0x482c('0x9')](),controller[_0x482c('0xc')]);router[_0x482c('0xa')]('/:id',auth[_0x482c('0x9')](),controller[_0x482c('0xd')]);router[_0x482c('0xa')](_0x482c('0xe'),auth[_0x482c('0x9')](),controller[_0x482c('0xf')]);router['get'](_0x482c('0x10'),auth[_0x482c('0x9')](),controller[_0x482c('0x11')]);router['post']('/',auth[_0x482c('0x9')](),controller[_0x482c('0x12')]);router[_0x482c('0x13')]('/:id/messages',auth['isAuthenticated'](),controller[_0x482c('0x14')]);router[_0x482c('0x13')]('/:id/tags',auth['isAuthenticated'](),interaction[_0x482c('0x15')](_0x482c('0x16'),_0x482c('0x17')),controller[_0x482c('0x18')]);router[_0x482c('0x19')](_0x482c('0x1a'),auth[_0x482c('0x9')](),interaction[_0x482c('0x15')](_0x482c('0x16'),_0x482c('0x1b')),controller[_0x482c('0x1c')]);router[_0x482c('0x1d')]('/:id',auth[_0x482c('0x9')](),interaction['tracked'](_0x482c('0x16'),_0x482c('0x1e')),controller['destroy']);router['delete'](_0x482c('0x1f'),auth['isAuthenticated'](),controller[_0x482c('0x20')]);module[_0x482c('0x21')]=router; \ No newline at end of file diff --git a/server/api/whatsappInteraction/whatsappInteraction.attributes.js b/server/api/whatsappInteraction/whatsappInteraction.attributes.js index dc07696..bafaadb 100644 --- a/server/api/whatsappInteraction/whatsappInteraction.attributes.js +++ b/server/api/whatsappInteraction/whatsappInteraction.attributes.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xcb57=['sequelize','moment','BOOLEAN','STRING','DATE','ENUM','out'];(function(_0x326d0d,_0x568038){var _0x397247=function(_0x433f2f){while(--_0x433f2f){_0x326d0d['push'](_0x326d0d['shift']());}};_0x397247(++_0x568038);}(_0xcb57,0xa1));var _0x7cb5=function(_0x42bdad,_0x12836c){_0x42bdad=_0x42bdad-0x0;var _0x122626=_0xcb57[_0x42bdad];return _0x122626;};'use strict';var Sequelize=require(_0x7cb5('0x0'));var moment=require(_0x7cb5('0x1'));module['exports']={'closed':{'type':Sequelize[_0x7cb5('0x2')],'defaultValue':![]},'closedAt':{'type':Sequelize['DATE']},'disposition':{'type':Sequelize[_0x7cb5('0x3')]},'secondDisposition':{'type':Sequelize['STRING']},'thirdDisposition':{'type':Sequelize[_0x7cb5('0x3')]},'note':{'type':Sequelize[_0x7cb5('0x3')]},'phone':{'type':Sequelize['STRING']},'read1stAt':{'type':Sequelize[_0x7cb5('0x4')]},'firstMsgDirection':{'type':Sequelize[_0x7cb5('0x5')]('in',_0x7cb5('0x6')),'defaultValue':'in','allowNull':![]},'lastMsgAt':{'type':Sequelize['DATE']},'lastMsgDirection':{'type':Sequelize[_0x7cb5('0x5')]('in',_0x7cb5('0x6')),'defaultValue':'in','allowNull':![]},'autoreplyExecuted':{'type':Sequelize[_0x7cb5('0x2')],'defaultValue':![]}}; \ No newline at end of file +var _0xc949=['sequelize','exports','BOOLEAN','DATE','STRING','ENUM','out'];(function(_0x3bb987,_0xa33875){var _0x48011a=function(_0x541ada){while(--_0x541ada){_0x3bb987['push'](_0x3bb987['shift']());}};_0x48011a(++_0xa33875);}(_0xc949,0x181));var _0x9c94=function(_0x3ab9ee,_0x4a74b8){_0x3ab9ee=_0x3ab9ee-0x0;var _0x82ee88=_0xc949[_0x3ab9ee];return _0x82ee88;};'use strict';var Sequelize=require(_0x9c94('0x0'));var moment=require('moment');module[_0x9c94('0x1')]={'closed':{'type':Sequelize[_0x9c94('0x2')],'defaultValue':![]},'closedAt':{'type':Sequelize[_0x9c94('0x3')]},'disposition':{'type':Sequelize[_0x9c94('0x4')]},'secondDisposition':{'type':Sequelize['STRING']},'thirdDisposition':{'type':Sequelize[_0x9c94('0x4')]},'note':{'type':Sequelize[_0x9c94('0x4')]},'phone':{'type':Sequelize['STRING']},'read1stAt':{'type':Sequelize[_0x9c94('0x3')]},'firstMsgDirection':{'type':Sequelize[_0x9c94('0x5')]('in',_0x9c94('0x6')),'defaultValue':'in','allowNull':![]},'lastMsgAt':{'type':Sequelize[_0x9c94('0x3')]},'lastMsgDirection':{'type':Sequelize['ENUM']('in',_0x9c94('0x6')),'defaultValue':'in','allowNull':![]},'autoreplyExecuted':{'type':Sequelize[_0x9c94('0x2')],'defaultValue':![]}}; \ No newline at end of file diff --git a/server/api/whatsappInteraction/whatsappInteraction.controller.js b/server/api/whatsappInteraction/whatsappInteraction.controller.js index 812f419..ecf9b0e 100644 --- a/server/api/whatsappInteraction/whatsappInteraction.controller.js +++ b/server/api/whatsappInteraction/whatsappInteraction.controller.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x2bf4=['where','WhatsappInteractionId','filter','$gte','split','includeAll','rows','addTags','setTags','omit','spread','Tag','color','emit','whatsappInteractionTags:save','removeTags','download','unix','toString','join','root','files','tmp','server','attachments','format','transcript-%d-%s.zip','push','User','CmContact','Contact','firstName','lastName','Attachment','Messages','createdAt','direction','secret','read','WhatsappAccount','Owner','fullname','get','mkdirSync','Whatsapp','Account','N.A.','YYYY-MM-DD\x20HH:mm:ss','closed','closedAt','disposition','basename','existsSync','createReadStream','pipe','createWriteStream','out','value','renderFile','views','downloadInteraction.ejs','.pdf','createPdfFromHTML','log','err','unlinkSync','rimraf','moment','util','path','ejs','lodash','../../components/interaction/service','../../components/parsers/qs','../../components/export/pdf','../../config/logger','api','../../config/environment','../../mysqldb','redis','localhost','socket.io-emitter','register','sendStatus','status','end','offset','undefined','limit','count','Content-Range','update','then','error','stack','name','send','map','rawAttributes','fieldName','type','key','getOptions','findAll','whatsapp','user','catch','show','params','model','keys','WhatsappInteraction','query','attributes','intersection','fields','length','include','merge','options','find','create','body','destroy','describe','WhatsappMessage','addMessage','ids','getMessages','findOne','hasOwnProperty','nolimit','order','sort','filters','pick'];(function(_0x2f3d29,_0x150e7b){var _0x53d69d=function(_0x45f6ec){while(--_0x45f6ec){_0x2f3d29['push'](_0x2f3d29['shift']());}};_0x53d69d(++_0x150e7b);}(_0x2bf4,0x1da));var _0x42bf=function(_0x4f6ffd,_0x316dd8){_0x4f6ffd=_0x4f6ffd-0x0;var _0x34a32e=_0x2bf4[_0x4f6ffd];return _0x34a32e;};'use strict';var rimraf=require(_0x42bf('0x0'));var zipdir=require('zip-dir');var moment=require(_0x42bf('0x1'));var BPromise=require('bluebird');var util=require(_0x42bf('0x2'));var path=require(_0x42bf('0x3'));var ejs=require(_0x42bf('0x4'));var fs=require('fs');var _=require(_0x42bf('0x5'));var Redis=require('ioredis');var interaction=require(_0x42bf('0x6'));var qs=require(_0x42bf('0x7'));var pdf=require(_0x42bf('0x8'));var logger=require(_0x42bf('0x9'))(_0x42bf('0xa'));var config=require(_0x42bf('0xb'));var db=require(_0x42bf('0xc'))['db'];config[_0x42bf('0xd')]=_['defaults'](config['redis'],{'host':_0x42bf('0xe'),'port':0x18eb});var socket=require(_0x42bf('0xf'))(new Redis(config[_0x42bf('0xd')]));require('./whatsappInteraction.socket')[_0x42bf('0x10')](socket);function respondWithStatusCode(_0x53b2ce,_0x3f3faa){_0x3f3faa=_0x3f3faa||0xcc;return function(_0x11551f){if(_0x11551f){return _0x53b2ce[_0x42bf('0x11')](_0x3f3faa);}return _0x53b2ce[_0x42bf('0x12')](_0x3f3faa)[_0x42bf('0x13')]();};}function respondWithResult(_0x4e566b,_0x394c2b){_0x394c2b=_0x394c2b||0xc8;return function(_0x3d07bb){if(_0x3d07bb){return _0x4e566b[_0x42bf('0x12')](_0x394c2b)['json'](_0x3d07bb);}};}function respondWithFilteredResult(_0x22730d,_0x3fccfb){return function(_0x47eb5b){if(_0x47eb5b){var _0x3f4230=typeof _0x3fccfb[_0x42bf('0x14')]===_0x42bf('0x15')&&typeof _0x3fccfb[_0x42bf('0x16')]===_0x42bf('0x15');var _0x49def3=_0x47eb5b[_0x42bf('0x17')];var _0x2d52b4=_0x3f4230?0x0:_0x3fccfb[_0x42bf('0x14')];var _0x5a7f1a=_0x3f4230?_0x47eb5b[_0x42bf('0x17')]:_0x3fccfb[_0x42bf('0x14')]+_0x3fccfb[_0x42bf('0x16')];var _0x2b8f22;if(_0x5a7f1a>=_0x49def3){_0x5a7f1a=_0x49def3;_0x2b8f22=0xc8;}else{_0x2b8f22=0xce;}_0x22730d['status'](_0x2b8f22);return _0x22730d['set'](_0x42bf('0x18'),_0x2d52b4+'-'+_0x5a7f1a+'/'+_0x49def3)['json'](_0x47eb5b);}return null;};}function saveUpdates(_0x41c523){return function(_0x4ac7e0){if(_0x4ac7e0){return _0x4ac7e0[_0x42bf('0x19')](_0x41c523)[_0x42bf('0x1a')](function(_0x28c826){return _0x28c826;});}return null;};}function removeEntity(_0x40c236){return function(_0x1b3678){if(_0x1b3678){return _0x1b3678['destroy']()[_0x42bf('0x1a')](function(){_0x40c236['status'](0xcc)['end']();});}};}function handleEntityNotFound(_0x131b66){return function(_0x13567f){if(!_0x13567f){_0x131b66[_0x42bf('0x11')](0x194);}return _0x13567f;};}function handleError(_0x55484d,_0x2f86e9){_0x2f86e9=_0x2f86e9||0x1f4;return function(_0x3eda86){logger[_0x42bf('0x1b')](_0x3eda86[_0x42bf('0x1c')]);if(_0x3eda86['name']){delete _0x3eda86[_0x42bf('0x1d')];}_0x55484d['status'](_0x2f86e9)[_0x42bf('0x1e')](_0x3eda86);};}exports['index']=function(_0x245ac1,_0x422b3d){var _0x10c2be={};var _0x519870=_[_0x42bf('0x1f')](db['WhatsappInteraction'][_0x42bf('0x20')],function(_0x3cae90){return{'name':_0x3cae90[_0x42bf('0x21')],'type':_0x3cae90[_0x42bf('0x22')][_0x42bf('0x23')]};});_0x10c2be=qs[_0x42bf('0x24')](_0x519870,_0x245ac1);return interaction[_0x42bf('0x25')](_0x42bf('0x26'),_0x245ac1['query'],_0x245ac1[_0x42bf('0x27')],_0x10c2be,_0x519870)[_0x42bf('0x1a')](respondWithFilteredResult(_0x422b3d,_0x10c2be))[_0x42bf('0x28')](handleError(_0x422b3d,null));};exports[_0x42bf('0x29')]=function(_0x3b7e75,_0xaf9e75){var _0x4b0757={'raw':![],'where':{'id':_0x3b7e75[_0x42bf('0x2a')]['id']}},_0x247034={};_0x247034[_0x42bf('0x2b')]=_[_0x42bf('0x2c')](db[_0x42bf('0x2d')][_0x42bf('0x20')]);_0x247034['query']=_[_0x42bf('0x2c')](_0x3b7e75[_0x42bf('0x2e')]);_0x247034['filters']=_['intersection'](_0x247034[_0x42bf('0x2b')],_0x247034[_0x42bf('0x2e')]);_0x4b0757[_0x42bf('0x2f')]=_[_0x42bf('0x30')](_0x247034['model'],qs['fields'](_0x3b7e75[_0x42bf('0x2e')][_0x42bf('0x31')]));_0x4b0757['attributes']=_0x4b0757[_0x42bf('0x2f')][_0x42bf('0x32')]?_0x4b0757['attributes']:_0x247034[_0x42bf('0x2b')];if(_0x3b7e75[_0x42bf('0x2e')]['includeAll']){_0x4b0757[_0x42bf('0x33')]=[{'all':!![]}];}_0x4b0757=_[_0x42bf('0x34')]({},_0x4b0757,_0x3b7e75[_0x42bf('0x35')]);return db['WhatsappInteraction'][_0x42bf('0x36')](_0x4b0757)[_0x42bf('0x1a')](handleEntityNotFound(_0xaf9e75,null))[_0x42bf('0x1a')](respondWithResult(_0xaf9e75,null))[_0x42bf('0x28')](handleError(_0xaf9e75,null));};exports[_0x42bf('0x37')]=function(_0x3ca5b4,_0x2cc75a){return db[_0x42bf('0x2d')][_0x42bf('0x37')](_0x3ca5b4[_0x42bf('0x38')],{})[_0x42bf('0x1a')](respondWithResult(_0x2cc75a,0xc9))[_0x42bf('0x28')](handleError(_0x2cc75a,null));};exports[_0x42bf('0x19')]=function(_0x3ef0a5,_0x33e670){if(_0x3ef0a5[_0x42bf('0x38')]['id']){delete _0x3ef0a5['body']['id'];}return db[_0x42bf('0x2d')][_0x42bf('0x36')]({'where':{'id':_0x3ef0a5[_0x42bf('0x2a')]['id']}})['then'](handleEntityNotFound(_0x33e670,null))[_0x42bf('0x1a')](saveUpdates(_0x3ef0a5['body'],null))[_0x42bf('0x1a')](respondWithResult(_0x33e670,null))[_0x42bf('0x28')](handleError(_0x33e670,null));};exports[_0x42bf('0x39')]=function(_0x13009d,_0x3027f8){return db[_0x42bf('0x2d')]['find']({'where':{'id':_0x13009d[_0x42bf('0x2a')]['id']}})[_0x42bf('0x1a')](handleEntityNotFound(_0x3027f8,null))[_0x42bf('0x1a')](removeEntity(_0x3027f8,null))[_0x42bf('0x28')](handleError(_0x3027f8,null));};exports[_0x42bf('0x3a')]=function(_0x42f43e,_0x557d96){return db[_0x42bf('0x2d')]['describe']()['then'](respondWithResult(_0x557d96,null))[_0x42bf('0x28')](handleError(_0x557d96,null));};exports['addMessage']=function(_0x474586,_0x5662b3){return db[_0x42bf('0x3b')][_0x42bf('0x36')]({'where':{'id':_0x474586['params']['id']}})[_0x42bf('0x1a')](handleEntityNotFound(_0x5662b3,null))[_0x42bf('0x1a')](function(_0x280212){if(_0x280212){return _0x280212[_0x42bf('0x3c')](_0x474586['body'][_0x42bf('0x3d')],_['omit'](_0x474586[_0x42bf('0x38')],[_0x42bf('0x3d'),'id'])||{});}})[_0x42bf('0x1a')](respondWithResult(_0x5662b3,null))[_0x42bf('0x28')](handleError(_0x5662b3,null));};exports[_0x42bf('0x3e')]=function(_0x4bc33a,_0x33ee82){var _0x860b6c={'raw':![],'where':{}};var _0x55c5a6={};var _0x216849={'count':0x0,'rows':[]};return db[_0x42bf('0x2d')][_0x42bf('0x3f')]({'where':{'id':_0x4bc33a['params']['id']}})[_0x42bf('0x1a')](handleEntityNotFound(_0x33ee82,null))[_0x42bf('0x1a')](function(_0x3a1c5a){if(_0x3a1c5a){_0x55c5a6['model']=_[_0x42bf('0x2c')](db[_0x42bf('0x3b')][_0x42bf('0x20')]);_0x55c5a6[_0x42bf('0x2e')]=_[_0x42bf('0x2c')](_0x4bc33a[_0x42bf('0x2e')]);_0x55c5a6['filters']=_['intersection'](_0x55c5a6[_0x42bf('0x2b')],_0x55c5a6[_0x42bf('0x2e')]);_0x860b6c[_0x42bf('0x2f')]=_[_0x42bf('0x30')](_0x55c5a6[_0x42bf('0x2b')],qs[_0x42bf('0x31')](_0x4bc33a['query'][_0x42bf('0x31')]));_0x860b6c['attributes']=_0x860b6c[_0x42bf('0x2f')][_0x42bf('0x32')]?_0x860b6c[_0x42bf('0x2f')]:_0x55c5a6[_0x42bf('0x2b')];if(!_0x4bc33a[_0x42bf('0x2e')][_0x42bf('0x40')](_0x42bf('0x41'))){_0x860b6c[_0x42bf('0x16')]=qs['limit'](_0x4bc33a[_0x42bf('0x2e')][_0x42bf('0x16')]);_0x860b6c[_0x42bf('0x14')]=qs[_0x42bf('0x14')](_0x4bc33a['query']['offset']);}_0x860b6c[_0x42bf('0x42')]=qs[_0x42bf('0x43')](_0x4bc33a[_0x42bf('0x2e')][_0x42bf('0x43')]);_0x860b6c['where']=qs[_0x42bf('0x44')](_[_0x42bf('0x45')](_0x4bc33a[_0x42bf('0x2e')],_0x55c5a6[_0x42bf('0x44')]));_0x860b6c[_0x42bf('0x46')][_0x42bf('0x47')]=_0x3a1c5a['id'];if(_0x4bc33a[_0x42bf('0x2e')][_0x42bf('0x48')]){_0x860b6c[_0x42bf('0x46')]=_[_0x42bf('0x34')](_0x860b6c[_0x42bf('0x46')],{'$or':_['map'](_0x860b6c[_0x42bf('0x2f')],function(_0x1b1ef6){var _0x3ab211={};_0x3ab211[_0x1b1ef6]={'$like':'%'+_0x4bc33a[_0x42bf('0x2e')][_0x42bf('0x48')]+'%'};return _0x3ab211;})});}if(_0x4bc33a['query']['$gte']){var _0x43c3b8=_0x4bc33a['query'][_0x42bf('0x49')][_0x42bf('0x4a')](',');var _0x5996f8={};_0x5996f8[_0x43c3b8[0x0]]={'$gte':moment(_0x43c3b8[0x1])['format']('YYYY-MM-DD\x20HH:mm:ss')};_0x860b6c['where']=_[_0x42bf('0x34')](_0x860b6c[_0x42bf('0x46')],_0x5996f8);}_0x860b6c=_[_0x42bf('0x34')]({},_0x860b6c,_0x4bc33a[_0x42bf('0x35')]);return db[_0x42bf('0x3b')][_0x42bf('0x17')]({'where':_0x860b6c['where']})[_0x42bf('0x1a')](function(_0x18aeaf){_0x216849[_0x42bf('0x17')]=_0x18aeaf;if(_0x4bc33a['query'][_0x42bf('0x4b')]){_0x860b6c[_0x42bf('0x33')]=[{'all':!![]}];}return db[_0x42bf('0x3b')]['findAll'](_0x860b6c);})[_0x42bf('0x1a')](function(_0x59a813){_0x216849[_0x42bf('0x4c')]=_0x59a813;return _0x216849;});}})[_0x42bf('0x1a')](respondWithFilteredResult(_0x33ee82,_0x860b6c))[_0x42bf('0x28')](handleError(_0x33ee82,null));};exports[_0x42bf('0x4d')]=function(_0x19e15e,_0x30c21d){return db[_0x42bf('0x2d')][_0x42bf('0x36')]({'where':{'id':_0x19e15e[_0x42bf('0x2a')]['id']}})['then'](handleEntityNotFound(_0x30c21d,null))['then'](function(_0x3cf5e8){if(_0x3cf5e8){return _0x3cf5e8[_0x42bf('0x4e')](_0x19e15e[_0x42bf('0x38')]['ids'],_[_0x42bf('0x4f')](_0x19e15e['body'],[_0x42bf('0x3d'),'id'])||{})[_0x42bf('0x50')](function(){return db[_0x42bf('0x51')][_0x42bf('0x25')]({'attributes':['id',_0x42bf('0x1d'),_0x42bf('0x52')],'where':{'id':_0x19e15e['body'][_0x42bf('0x3d')]}});})[_0x42bf('0x1a')](function(_0x473c71){socket[_0x42bf('0x53')](_0x42bf('0x54'),{'id':Number(_0x19e15e['params']['id']),'tags':_0x473c71||[]});return{'id':Number(_0x19e15e[_0x42bf('0x2a')]['id']),'tags':_0x473c71||[]};});}})[_0x42bf('0x1a')](respondWithResult(_0x30c21d,null))[_0x42bf('0x28')](handleError(_0x30c21d,null));};exports[_0x42bf('0x55')]=function(_0x514e72,_0x99af46){return db[_0x42bf('0x2d')][_0x42bf('0x36')]({'where':{'id':_0x514e72['params']['id']}})[_0x42bf('0x1a')](handleEntityNotFound(_0x99af46,null))[_0x42bf('0x1a')](function(_0x57239e){if(_0x57239e){return _0x57239e[_0x42bf('0x55')](_0x514e72[_0x42bf('0x2e')]['ids']);}})['then'](respondWithStatusCode(_0x99af46,null))[_0x42bf('0x28')](handleError(_0x99af46,null));};exports[_0x42bf('0x56')]=function(_0x1dfd3d,_0x3c29aa){var _0x489026=moment()[_0x42bf('0x57')]()[_0x42bf('0x58')]();var _0x3bad96=path[_0x42bf('0x59')](config[_0x42bf('0x5a')],'server',_0x42bf('0x5b'),_0x42bf('0x5c'));var _0x1b2600=path['join'](config[_0x42bf('0x5a')],_0x42bf('0x5d'),_0x42bf('0x5b'),_0x42bf('0x5e'));var _0x4cc77b=path[_0x42bf('0x59')](_0x3bad96,_0x489026);var _0xd759de=util[_0x42bf('0x5f')](_0x42bf('0x60'),_0x1dfd3d[_0x42bf('0x2a')]['id'],_0x489026);var _0x7ff5f7=path[_0x42bf('0x59')](_0x3bad96,_0xd759de);var _0x3e408e=[];_0x3e408e[_0x42bf('0x61')]({'model':db[_0x42bf('0x62')],'as':_0x42bf('0x62'),'attributes':['id','fullname'],'raw':!![]});_0x3e408e[_0x42bf('0x61')]({'model':db[_0x42bf('0x63')],'as':_0x42bf('0x64'),'attributes':['id',_0x42bf('0x65'),_0x42bf('0x66')],'raw':!![]});if(_0x1dfd3d['query'][_0x42bf('0x5e')]){_0x3e408e[_0x42bf('0x61')]({'model':db[_0x42bf('0x67')],'as':_0x42bf('0x67'),'raw':!![]});}var _0x3c5141=[{'model':db[_0x42bf('0x3b')],'as':_0x42bf('0x68'),'attributes':['id',_0x42bf('0x38'),_0x42bf('0x69'),_0x42bf('0x6a'),_0x42bf('0x6b'),_0x42bf('0x6c')],'include':_0x3e408e}];_0x3c5141['push']({'model':db[_0x42bf('0x6d')],'as':'Account','attributes':['id',_0x42bf('0x1d')]});_0x3c5141[_0x42bf('0x61')]({'model':db[_0x42bf('0x62')],'as':_0x42bf('0x6e'),'attributes':['id',_0x42bf('0x6f')]});return db[_0x42bf('0x2d')]['find']({'where':{'id':_0x1dfd3d[_0x42bf('0x2a')]['id']},'include':_0x3c5141})['then'](handleEntityNotFound(_0x3c29aa,null))[_0x42bf('0x1a')](function(_0x521782){if(_0x521782){var _0x42f8d2=_0x521782[_0x42bf('0x70')]({'plain':!![]});fs[_0x42bf('0x71')](_0x4cc77b);var _0x46bd94={'channel':_0x42bf('0x72'),'account':_0x42f8d2[_0x42bf('0x73')][_0x42bf('0x1d')],'agent':_0x42f8d2[_0x42bf('0x6e')]?_0x42f8d2['Owner']['fullname']:_0x42bf('0x74'),'createdAt':moment(_0x42f8d2[_0x42bf('0x69')])[_0x42bf('0x5f')](_0x42bf('0x75'))[_0x42bf('0x58')](),'closedAt':_0x42f8d2[_0x42bf('0x76')]?moment(_0x42f8d2[_0x42bf('0x77')])[_0x42bf('0x5f')](_0x42bf('0x75'))[_0x42bf('0x58')]():'','disposition':_0x42f8d2[_0x42bf('0x78')],'messages':_(_0x42f8d2[_0x42bf('0x68')])[_0x42bf('0x48')]({'secret':![]})[_0x42bf('0x1f')](function(_0x387825){if(_0x387825['Attachment']){var _0x1dbaa3=path[_0x42bf('0x59')](_0x1b2600,_0x387825[_0x42bf('0x67')][_0x42bf('0x79')]);if(fs[_0x42bf('0x7a')](_0x1dbaa3)){fs[_0x42bf('0x7b')](_0x1dbaa3)[_0x42bf('0x7c')](fs[_0x42bf('0x7d')](path[_0x42bf('0x59')](_0x4cc77b,_0x387825[_0x42bf('0x67')][_0x42bf('0x79')])));}}return{'date':moment(_0x387825[_0x42bf('0x69')])[_0x42bf('0x5f')](_0x42bf('0x75'))[_0x42bf('0x58')](),'sender':_0x387825[_0x42bf('0x6a')]===_0x42bf('0x7e')?_0x387825[_0x42bf('0x62')]?_0x387825['User'][_0x42bf('0x6f')]:'System':_0x387825['Contact'][_0x42bf('0x65')]+(_0x387825['Contact'][_0x42bf('0x66')]?'\x20'+_0x387825[_0x42bf('0x64')][_0x42bf('0x66')]:''),'body':_0x387825[_0x42bf('0x67')]?_0x387825['Attachment']['basename']:_0x387825['body'],'direction':_0x387825[_0x42bf('0x6a')]===_0x42bf('0x7e')?'A':'C','secret':_0x387825[_0x42bf('0x6b')],'read':_0x387825[_0x42bf('0x6c')],'attachment':_0x387825[_0x42bf('0x67')]};})[_0x42bf('0x7f')]()};return ejs[_0x42bf('0x80')](path['join'](config[_0x42bf('0x5a')],_0x42bf('0x5d'),_0x42bf('0x81'),_0x42bf('0x82')),{'interaction':_0x46bd94})[_0x42bf('0x1a')](function(_0x34aad8){var _0x2c3d09=path[_0x42bf('0x59')](_0x4cc77b,'transcript-'+_0x42f8d2['id']+'-'+_0x489026+_0x42bf('0x83'));var _0x34dd2e={'path':_0x2c3d09,'channel':_0x42bf('0x72'),'interactionId':_0x42f8d2['id']};return pdf[_0x42bf('0x84')](_0x34aad8,_0x34dd2e);})[_0x42bf('0x1a')](function(){return new BPromise(function(_0x370541,_0x4546f3){zipdir(_0x4cc77b,{'saveTo':_0x7ff5f7},function(_0x38f494,_0x4f83ff){if(_0x38f494)return _0x4546f3(_0x38f494);return _0x370541(_0x4f83ff);});})[_0x42bf('0x1a')](function(){return new BPromise(function(_0x3135b1,_0x4ca80d){rimraf(_0x4cc77b,function(_0x3a2e22){if(_0x3a2e22)_0x4ca80d(_0x3a2e22);return _0x3135b1();});});})[_0x42bf('0x1a')](function(){return _0x3c29aa[_0x42bf('0x56')](_0x7ff5f7,_0xd759de,function(_0x511887){if(_0x511887){console[_0x42bf('0x85')](_0x42bf('0x86'),_0x511887);}else{fs[_0x42bf('0x87')](_0x7ff5f7);}});});});}else{return _0x3c29aa['sendStatus'](0xc8);}})[_0x42bf('0x28')](handleError(_0x3c29aa,null));}; \ No newline at end of file +var _0xcf4a=['set','Content-Range','update','then','destroy','error','stack','name','index','map','WhatsappInteraction','rawAttributes','type','key','getOptions','whatsapp','query','user','show','params','keys','filters','intersection','attributes','model','fields','length','includeAll','include','merge','options','find','catch','create','body','describe','addMessage','WhatsappMessage','ids','omit','where','pick','WhatsappInteractionId','filter','$gte','split','format','findAll','rows','setTags','spread','Tag','color','whatsappInteractionTags:save','removeTags','unix','join','root','server','push','User','fullname','CmContact','Contact','firstName','attachments','Attachment','Messages','direction','secret','WhatsappAccount','Account','Owner','get','mkdirSync','Whatsapp','N.A.','createdAt','YYYY-MM-DD\x20HH:mm:ss','closed','closedAt','disposition','existsSync','basename','System','lastName','out','read','value','transcript-','.pdf','createPdfFromHTML','download','err','rimraf','zip-dir','moment','bluebird','util','path','ejs','lodash','../../components/interaction/service','../../components/parsers/qs','../../config/logger','../../config/environment','../../mysqldb','redis','localhost','./whatsappInteraction.socket','register','sendStatus','status','end','json','offset','undefined','limit','count'];(function(_0x433159,_0x1db06c){var _0x70e196=function(_0x4d8b07){while(--_0x4d8b07){_0x433159['push'](_0x433159['shift']());}};_0x70e196(++_0x1db06c);}(_0xcf4a,0x14c));var _0xacf4=function(_0x55ade1,_0x687676){_0x55ade1=_0x55ade1-0x0;var _0x36a697=_0xcf4a[_0x55ade1];return _0x36a697;};'use strict';var rimraf=require(_0xacf4('0x0'));var zipdir=require(_0xacf4('0x1'));var moment=require(_0xacf4('0x2'));var BPromise=require(_0xacf4('0x3'));var util=require(_0xacf4('0x4'));var path=require(_0xacf4('0x5'));var ejs=require(_0xacf4('0x6'));var fs=require('fs');var _=require(_0xacf4('0x7'));var Redis=require('ioredis');var interaction=require(_0xacf4('0x8'));var qs=require(_0xacf4('0x9'));var pdf=require('../../components/export/pdf');var logger=require(_0xacf4('0xa'))('api');var config=require(_0xacf4('0xb'));var db=require(_0xacf4('0xc'))['db'];config['redis']=_['defaults'](config[_0xacf4('0xd')],{'host':_0xacf4('0xe'),'port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config[_0xacf4('0xd')]));require(_0xacf4('0xf'))[_0xacf4('0x10')](socket);function respondWithStatusCode(_0x5d5991,_0x3515ee){_0x3515ee=_0x3515ee||0xcc;return function(_0x5e5319){if(_0x5e5319){return _0x5d5991[_0xacf4('0x11')](_0x3515ee);}return _0x5d5991[_0xacf4('0x12')](_0x3515ee)[_0xacf4('0x13')]();};}function respondWithResult(_0x522597,_0x3bab31){_0x3bab31=_0x3bab31||0xc8;return function(_0x148090){if(_0x148090){return _0x522597['status'](_0x3bab31)[_0xacf4('0x14')](_0x148090);}};}function respondWithFilteredResult(_0x4fb680,_0x2dbf10){return function(_0x44690e){if(_0x44690e){var _0x57def1=typeof _0x2dbf10[_0xacf4('0x15')]===_0xacf4('0x16')&&typeof _0x2dbf10[_0xacf4('0x17')]===_0xacf4('0x16');var _0x8e466c=_0x44690e['count'];var _0x5b9cd6=_0x57def1?0x0:_0x2dbf10[_0xacf4('0x15')];var _0x44610f=_0x57def1?_0x44690e[_0xacf4('0x18')]:_0x2dbf10[_0xacf4('0x15')]+_0x2dbf10[_0xacf4('0x17')];var _0x54c2d8;if(_0x44610f>=_0x8e466c){_0x44610f=_0x8e466c;_0x54c2d8=0xc8;}else{_0x54c2d8=0xce;}_0x4fb680['status'](_0x54c2d8);return _0x4fb680[_0xacf4('0x19')](_0xacf4('0x1a'),_0x5b9cd6+'-'+_0x44610f+'/'+_0x8e466c)[_0xacf4('0x14')](_0x44690e);}return null;};}function saveUpdates(_0x466f0f){return function(_0x3bfbe0){if(_0x3bfbe0){return _0x3bfbe0[_0xacf4('0x1b')](_0x466f0f)[_0xacf4('0x1c')](function(_0x13576){return _0x13576;});}return null;};}function removeEntity(_0x13b797){return function(_0x55cad3){if(_0x55cad3){return _0x55cad3[_0xacf4('0x1d')]()[_0xacf4('0x1c')](function(){_0x13b797[_0xacf4('0x12')](0xcc)['end']();});}};}function handleEntityNotFound(_0x2f5fd7){return function(_0xaaa6ba){if(!_0xaaa6ba){_0x2f5fd7[_0xacf4('0x11')](0x194);}return _0xaaa6ba;};}function handleError(_0x5b451b,_0x4a0d37){_0x4a0d37=_0x4a0d37||0x1f4;return function(_0x47d284){logger[_0xacf4('0x1e')](_0x47d284[_0xacf4('0x1f')]);if(_0x47d284[_0xacf4('0x20')]){delete _0x47d284[_0xacf4('0x20')];}_0x5b451b[_0xacf4('0x12')](_0x4a0d37)['send'](_0x47d284);};}exports[_0xacf4('0x21')]=function(_0x15164f,_0x300765){var _0x51438d={};var _0x2baf52=_[_0xacf4('0x22')](db[_0xacf4('0x23')][_0xacf4('0x24')],function(_0x8bad9){return{'name':_0x8bad9['fieldName'],'type':_0x8bad9[_0xacf4('0x25')][_0xacf4('0x26')]};});_0x51438d=qs[_0xacf4('0x27')](_0x2baf52,_0x15164f);return interaction['findAll'](_0xacf4('0x28'),_0x15164f[_0xacf4('0x29')],_0x15164f[_0xacf4('0x2a')],_0x51438d,_0x2baf52)[_0xacf4('0x1c')](respondWithFilteredResult(_0x300765,_0x51438d))['catch'](handleError(_0x300765,null));};exports[_0xacf4('0x2b')]=function(_0x1fa5b8,_0x5ec53c){var _0x251ea7={'raw':![],'where':{'id':_0x1fa5b8[_0xacf4('0x2c')]['id']}},_0x3ff74c={};_0x3ff74c['model']=_[_0xacf4('0x2d')](db[_0xacf4('0x23')]['rawAttributes']);_0x3ff74c[_0xacf4('0x29')]=_['keys'](_0x1fa5b8[_0xacf4('0x29')]);_0x3ff74c[_0xacf4('0x2e')]=_[_0xacf4('0x2f')](_0x3ff74c['model'],_0x3ff74c[_0xacf4('0x29')]);_0x251ea7[_0xacf4('0x30')]=_[_0xacf4('0x2f')](_0x3ff74c[_0xacf4('0x31')],qs[_0xacf4('0x32')](_0x1fa5b8[_0xacf4('0x29')]['fields']));_0x251ea7[_0xacf4('0x30')]=_0x251ea7[_0xacf4('0x30')][_0xacf4('0x33')]?_0x251ea7['attributes']:_0x3ff74c['model'];if(_0x1fa5b8[_0xacf4('0x29')][_0xacf4('0x34')]){_0x251ea7[_0xacf4('0x35')]=[{'all':!![]}];}_0x251ea7=_[_0xacf4('0x36')]({},_0x251ea7,_0x1fa5b8[_0xacf4('0x37')]);return db[_0xacf4('0x23')][_0xacf4('0x38')](_0x251ea7)[_0xacf4('0x1c')](handleEntityNotFound(_0x5ec53c,null))['then'](respondWithResult(_0x5ec53c,null))[_0xacf4('0x39')](handleError(_0x5ec53c,null));};exports[_0xacf4('0x3a')]=function(_0x1d44b9,_0x404152){return db['WhatsappInteraction'][_0xacf4('0x3a')](_0x1d44b9['body'],{})[_0xacf4('0x1c')](respondWithResult(_0x404152,0xc9))[_0xacf4('0x39')](handleError(_0x404152,null));};exports['update']=function(_0x552d0a,_0x43accf){if(_0x552d0a[_0xacf4('0x3b')]['id']){delete _0x552d0a[_0xacf4('0x3b')]['id'];}return db[_0xacf4('0x23')]['find']({'where':{'id':_0x552d0a['params']['id']}})[_0xacf4('0x1c')](handleEntityNotFound(_0x43accf,null))['then'](saveUpdates(_0x552d0a['body'],null))[_0xacf4('0x1c')](respondWithResult(_0x43accf,null))[_0xacf4('0x39')](handleError(_0x43accf,null));};exports[_0xacf4('0x1d')]=function(_0x22b880,_0x3f2723){return db[_0xacf4('0x23')][_0xacf4('0x38')]({'where':{'id':_0x22b880[_0xacf4('0x2c')]['id']}})[_0xacf4('0x1c')](handleEntityNotFound(_0x3f2723,null))[_0xacf4('0x1c')](removeEntity(_0x3f2723,null))[_0xacf4('0x39')](handleError(_0x3f2723,null));};exports['describe']=function(_0x35eb63,_0x4ac6ee){return db['WhatsappInteraction'][_0xacf4('0x3c')]()[_0xacf4('0x1c')](respondWithResult(_0x4ac6ee,null))[_0xacf4('0x39')](handleError(_0x4ac6ee,null));};exports[_0xacf4('0x3d')]=function(_0x544819,_0x30c277){return db[_0xacf4('0x3e')][_0xacf4('0x38')]({'where':{'id':_0x544819[_0xacf4('0x2c')]['id']}})[_0xacf4('0x1c')](handleEntityNotFound(_0x30c277,null))['then'](function(_0x2a9e87){if(_0x2a9e87){return _0x2a9e87['addMessage'](_0x544819[_0xacf4('0x3b')][_0xacf4('0x3f')],_[_0xacf4('0x40')](_0x544819[_0xacf4('0x3b')],[_0xacf4('0x3f'),'id'])||{});}})['then'](respondWithResult(_0x30c277,null))[_0xacf4('0x39')](handleError(_0x30c277,null));};exports['getMessages']=function(_0x1c57c1,_0x28207e){var _0x2b7835={'raw':![],'where':{}};var _0x79e799={};var _0x2bfcdf={'count':0x0,'rows':[]};return db[_0xacf4('0x23')]['findOne']({'where':{'id':_0x1c57c1[_0xacf4('0x2c')]['id']}})[_0xacf4('0x1c')](handleEntityNotFound(_0x28207e,null))[_0xacf4('0x1c')](function(_0x6a12af){if(_0x6a12af){_0x79e799[_0xacf4('0x31')]=_[_0xacf4('0x2d')](db[_0xacf4('0x3e')][_0xacf4('0x24')]);_0x79e799[_0xacf4('0x29')]=_[_0xacf4('0x2d')](_0x1c57c1['query']);_0x79e799[_0xacf4('0x2e')]=_['intersection'](_0x79e799[_0xacf4('0x31')],_0x79e799[_0xacf4('0x29')]);_0x2b7835[_0xacf4('0x30')]=_['intersection'](_0x79e799[_0xacf4('0x31')],qs['fields'](_0x1c57c1[_0xacf4('0x29')][_0xacf4('0x32')]));_0x2b7835[_0xacf4('0x30')]=_0x2b7835[_0xacf4('0x30')][_0xacf4('0x33')]?_0x2b7835[_0xacf4('0x30')]:_0x79e799[_0xacf4('0x31')];if(!_0x1c57c1['query']['hasOwnProperty']('nolimit')){_0x2b7835[_0xacf4('0x17')]=qs[_0xacf4('0x17')](_0x1c57c1['query']['limit']);_0x2b7835[_0xacf4('0x15')]=qs[_0xacf4('0x15')](_0x1c57c1[_0xacf4('0x29')][_0xacf4('0x15')]);}_0x2b7835['order']=qs['sort'](_0x1c57c1[_0xacf4('0x29')]['sort']);_0x2b7835[_0xacf4('0x41')]=qs[_0xacf4('0x2e')](_[_0xacf4('0x42')](_0x1c57c1[_0xacf4('0x29')],_0x79e799['filters']));_0x2b7835[_0xacf4('0x41')][_0xacf4('0x43')]=_0x6a12af['id'];if(_0x1c57c1[_0xacf4('0x29')][_0xacf4('0x44')]){_0x2b7835[_0xacf4('0x41')]=_['merge'](_0x2b7835[_0xacf4('0x41')],{'$or':_[_0xacf4('0x22')](_0x2b7835[_0xacf4('0x30')],function(_0xdd1529){var _0x5e929d={};_0x5e929d[_0xdd1529]={'$like':'%'+_0x1c57c1[_0xacf4('0x29')]['filter']+'%'};return _0x5e929d;})});}if(_0x1c57c1['query'][_0xacf4('0x45')]){var _0xa57595=_0x1c57c1[_0xacf4('0x29')][_0xacf4('0x45')][_0xacf4('0x46')](',');var _0x4906d9={};_0x4906d9[_0xa57595[0x0]]={'$gte':moment(_0xa57595[0x1])[_0xacf4('0x47')]('YYYY-MM-DD\x20HH:mm:ss')};_0x2b7835['where']=_[_0xacf4('0x36')](_0x2b7835[_0xacf4('0x41')],_0x4906d9);}_0x2b7835=_[_0xacf4('0x36')]({},_0x2b7835,_0x1c57c1[_0xacf4('0x37')]);return db[_0xacf4('0x3e')][_0xacf4('0x18')]({'where':_0x2b7835[_0xacf4('0x41')]})[_0xacf4('0x1c')](function(_0x55a59d){_0x2bfcdf[_0xacf4('0x18')]=_0x55a59d;if(_0x1c57c1[_0xacf4('0x29')][_0xacf4('0x34')]){_0x2b7835[_0xacf4('0x35')]=[{'all':!![]}];}return db[_0xacf4('0x3e')][_0xacf4('0x48')](_0x2b7835);})[_0xacf4('0x1c')](function(_0x4d73d5){_0x2bfcdf[_0xacf4('0x49')]=_0x4d73d5;return _0x2bfcdf;});}})[_0xacf4('0x1c')](respondWithFilteredResult(_0x28207e,_0x2b7835))[_0xacf4('0x39')](handleError(_0x28207e,null));};exports['addTags']=function(_0x25b098,_0x1cea2a){return db[_0xacf4('0x23')][_0xacf4('0x38')]({'where':{'id':_0x25b098[_0xacf4('0x2c')]['id']}})['then'](handleEntityNotFound(_0x1cea2a,null))[_0xacf4('0x1c')](function(_0x370084){if(_0x370084){return _0x370084[_0xacf4('0x4a')](_0x25b098['body']['ids'],_[_0xacf4('0x40')](_0x25b098[_0xacf4('0x3b')],[_0xacf4('0x3f'),'id'])||{})[_0xacf4('0x4b')](function(){return db[_0xacf4('0x4c')][_0xacf4('0x48')]({'attributes':['id',_0xacf4('0x20'),_0xacf4('0x4d')],'where':{'id':_0x25b098[_0xacf4('0x3b')][_0xacf4('0x3f')]}});})['then'](function(_0x2afe55){socket['emit'](_0xacf4('0x4e'),{'id':Number(_0x25b098[_0xacf4('0x2c')]['id']),'tags':_0x2afe55||[]});return{'id':Number(_0x25b098[_0xacf4('0x2c')]['id']),'tags':_0x2afe55||[]};});}})[_0xacf4('0x1c')](respondWithResult(_0x1cea2a,null))[_0xacf4('0x39')](handleError(_0x1cea2a,null));};exports[_0xacf4('0x4f')]=function(_0x428735,_0x478629){return db[_0xacf4('0x23')][_0xacf4('0x38')]({'where':{'id':_0x428735[_0xacf4('0x2c')]['id']}})[_0xacf4('0x1c')](handleEntityNotFound(_0x478629,null))['then'](function(_0x3c7f00){if(_0x3c7f00){return _0x3c7f00[_0xacf4('0x4f')](_0x428735['query']['ids']);}})['then'](respondWithStatusCode(_0x478629,null))[_0xacf4('0x39')](handleError(_0x478629,null));};exports['download']=function(_0x3ef322,_0x124f07){var _0x643b12=moment()[_0xacf4('0x50')]()['toString']();var _0x4d7e73=path[_0xacf4('0x51')](config[_0xacf4('0x52')],_0xacf4('0x53'),'files','tmp');var _0x2c2017=path[_0xacf4('0x51')](config[_0xacf4('0x52')],_0xacf4('0x53'),'files','attachments');var _0x39a606=path[_0xacf4('0x51')](_0x4d7e73,_0x643b12);var _0x404a7b=util[_0xacf4('0x47')]('transcript-%d-%s.zip',_0x3ef322[_0xacf4('0x2c')]['id'],_0x643b12);var _0x9fe254=path[_0xacf4('0x51')](_0x4d7e73,_0x404a7b);var _0x5962a6=[];_0x5962a6[_0xacf4('0x54')]({'model':db['User'],'as':_0xacf4('0x55'),'attributes':['id',_0xacf4('0x56')],'raw':!![]});_0x5962a6[_0xacf4('0x54')]({'model':db[_0xacf4('0x57')],'as':_0xacf4('0x58'),'attributes':['id',_0xacf4('0x59'),'lastName'],'raw':!![]});if(_0x3ef322['query'][_0xacf4('0x5a')]){_0x5962a6[_0xacf4('0x54')]({'model':db['Attachment'],'as':_0xacf4('0x5b'),'raw':!![]});}var _0x523056=[{'model':db['WhatsappMessage'],'as':_0xacf4('0x5c'),'attributes':['id',_0xacf4('0x3b'),'createdAt',_0xacf4('0x5d'),_0xacf4('0x5e'),'read'],'include':_0x5962a6}];_0x523056[_0xacf4('0x54')]({'model':db[_0xacf4('0x5f')],'as':_0xacf4('0x60'),'attributes':['id',_0xacf4('0x20')]});_0x523056['push']({'model':db[_0xacf4('0x55')],'as':_0xacf4('0x61'),'attributes':['id',_0xacf4('0x56')]});return db[_0xacf4('0x23')]['find']({'where':{'id':_0x3ef322['params']['id']},'include':_0x523056})[_0xacf4('0x1c')](handleEntityNotFound(_0x124f07,null))['then'](function(_0xdb5668){if(_0xdb5668){var _0x4bbe06=_0xdb5668[_0xacf4('0x62')]({'plain':!![]});fs[_0xacf4('0x63')](_0x39a606);var _0x2d93d4={'channel':_0xacf4('0x64'),'account':_0x4bbe06[_0xacf4('0x60')][_0xacf4('0x20')],'agent':_0x4bbe06[_0xacf4('0x61')]?_0x4bbe06[_0xacf4('0x61')][_0xacf4('0x56')]:_0xacf4('0x65'),'createdAt':moment(_0x4bbe06[_0xacf4('0x66')])[_0xacf4('0x47')](_0xacf4('0x67'))['toString'](),'closedAt':_0x4bbe06[_0xacf4('0x68')]?moment(_0x4bbe06[_0xacf4('0x69')])[_0xacf4('0x47')](_0xacf4('0x67'))['toString']():'','disposition':_0x4bbe06[_0xacf4('0x6a')],'messages':_(_0x4bbe06['Messages'])[_0xacf4('0x44')]({'secret':![]})[_0xacf4('0x22')](function(_0x34f0bf){if(_0x34f0bf[_0xacf4('0x5b')]){var _0x29fae2=path[_0xacf4('0x51')](_0x2c2017,_0x34f0bf[_0xacf4('0x5b')]['basename']);if(fs[_0xacf4('0x6b')](_0x29fae2)){fs['createReadStream'](_0x29fae2)['pipe'](fs['createWriteStream'](path[_0xacf4('0x51')](_0x39a606,_0x34f0bf[_0xacf4('0x5b')][_0xacf4('0x6c')])));}}return{'date':moment(_0x34f0bf[_0xacf4('0x66')])[_0xacf4('0x47')](_0xacf4('0x67'))['toString'](),'sender':_0x34f0bf[_0xacf4('0x5d')]==='out'?_0x34f0bf[_0xacf4('0x55')]?_0x34f0bf[_0xacf4('0x55')][_0xacf4('0x56')]:_0xacf4('0x6d'):_0x34f0bf[_0xacf4('0x58')][_0xacf4('0x59')]+(_0x34f0bf[_0xacf4('0x58')][_0xacf4('0x6e')]?'\x20'+_0x34f0bf[_0xacf4('0x58')]['lastName']:''),'body':_0x34f0bf[_0xacf4('0x5b')]?_0x34f0bf[_0xacf4('0x5b')][_0xacf4('0x6c')]:_0x34f0bf[_0xacf4('0x3b')],'direction':_0x34f0bf[_0xacf4('0x5d')]===_0xacf4('0x6f')?'A':'C','secret':_0x34f0bf[_0xacf4('0x5e')],'read':_0x34f0bf[_0xacf4('0x70')],'attachment':_0x34f0bf[_0xacf4('0x5b')]};})[_0xacf4('0x71')]()};return ejs['renderFile'](path[_0xacf4('0x51')](config['root'],'server','views','downloadInteraction.ejs'),{'interaction':_0x2d93d4})[_0xacf4('0x1c')](function(_0x501ad1){var _0x3b26c5=path[_0xacf4('0x51')](_0x39a606,_0xacf4('0x72')+_0x4bbe06['id']+'-'+_0x643b12+_0xacf4('0x73'));var _0x5b6b03={'path':_0x3b26c5,'channel':_0xacf4('0x64'),'interactionId':_0x4bbe06['id']};return pdf[_0xacf4('0x74')](_0x501ad1,_0x5b6b03);})['then'](function(){return new BPromise(function(_0xf5c9e1,_0x25c666){zipdir(_0x39a606,{'saveTo':_0x9fe254},function(_0x63eac,_0x6c9feb){if(_0x63eac)return _0x25c666(_0x63eac);return _0xf5c9e1(_0x6c9feb);});})['then'](function(){return new BPromise(function(_0x36ba22,_0x2b4082){rimraf(_0x39a606,function(_0x8cd06c){if(_0x8cd06c)_0x2b4082(_0x8cd06c);return _0x36ba22();});});})['then'](function(){return _0x124f07[_0xacf4('0x75')](_0x9fe254,_0x404a7b,function(_0x593992){if(_0x593992){console['log'](_0xacf4('0x76'),_0x593992);}else{fs['unlinkSync'](_0x9fe254);}});});});}else{return _0x124f07['sendStatus'](0xc8);}})[_0xacf4('0x39')](handleError(_0x124f07,null));}; \ No newline at end of file diff --git a/server/api/whatsappInteraction/whatsappInteraction.events.js b/server/api/whatsappInteraction/whatsappInteraction.events.js index 0457655..e7269e9 100644 --- a/server/api/whatsappInteraction/whatsappInteraction.events.js +++ b/server/api/whatsappInteraction/whatsappInteraction.events.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x0b96=['save','remove','getUsers','then','setDataValue','Users','unreadMessages','length','emit','catch','hasOwnProperty','exports','events','../../mysqldb','WhatsappInteraction','WhatsappMessage','setMaxListeners'];(function(_0x2fc6cf,_0x2bb133){var _0xf2ade3=function(_0x522b04){while(--_0x522b04){_0x2fc6cf['push'](_0x2fc6cf['shift']());}};_0xf2ade3(++_0x2bb133);}(_0x0b96,0xa5));var _0x60b9=function(_0x169d7f,_0x129afd){_0x169d7f=_0x169d7f-0x0;var _0x28e8c=_0x0b96[_0x169d7f];return _0x28e8c;};'use strict';var EventEmitter=require(_0x60b9('0x0'));var WhatsappInteraction=require(_0x60b9('0x1'))['db'][_0x60b9('0x2')];var WhatsappMessage=require('../../mysqldb')['db'][_0x60b9('0x3')];var WhatsappInteractionEvents=new EventEmitter();WhatsappInteractionEvents[_0x60b9('0x4')](0x0);var events={'afterCreate':_0x60b9('0x5'),'afterUpdate':'update','afterDestroy':_0x60b9('0x6')};function emitEvent(_0x3e232a){return function(_0x5c3e38,_0x393671,_0x443326){_0x5c3e38[_0x60b9('0x7')]({'attributes':['id'],'raw':!![]})[_0x60b9('0x8')](function(_0x13dd69){_0x5c3e38[_0x60b9('0x9')](_0x60b9('0xa'),_0x13dd69['map'](function(_0x462d22){return{'id':_0x462d22['id']};}));return WhatsappMessage['findAll']({'where':{'WhatsappInteractionId':_0x5c3e38['id'],'direction':'in','read':![]},'raw':!![]});})['then'](function(_0x2c4117){_0x5c3e38[_0x60b9('0x9')](_0x60b9('0xb'),_0x2c4117[_0x60b9('0xc')]);WhatsappInteractionEvents['emit'](_0x3e232a+':'+_0x5c3e38['id'],_0x5c3e38);WhatsappInteractionEvents[_0x60b9('0xd')](_0x3e232a,_0x5c3e38);_0x443326(null);})[_0x60b9('0xe')](_0x443326(null));};}for(var e in events){if(events[_0x60b9('0xf')](e)){var event=events[e];WhatsappInteraction['hook'](e,emitEvent(event));}}module[_0x60b9('0x10')]=WhatsappInteractionEvents; \ No newline at end of file +var _0x60d7=['setMaxListeners','update','remove','getUsers','then','setDataValue','map','findAll','unreadMessages','emit','hasOwnProperty','hook','exports','events','../../mysqldb'];(function(_0x441ff3,_0x3a410f){var _0x380dca=function(_0x1411d8){while(--_0x1411d8){_0x441ff3['push'](_0x441ff3['shift']());}};_0x380dca(++_0x3a410f);}(_0x60d7,0x139));var _0x760d=function(_0x3cb0fe,_0x48f725){_0x3cb0fe=_0x3cb0fe-0x0;var _0x3ed506=_0x60d7[_0x3cb0fe];return _0x3ed506;};'use strict';var EventEmitter=require(_0x760d('0x0'));var WhatsappInteraction=require(_0x760d('0x1'))['db']['WhatsappInteraction'];var WhatsappMessage=require(_0x760d('0x1'))['db']['WhatsappMessage'];var WhatsappInteractionEvents=new EventEmitter();WhatsappInteractionEvents[_0x760d('0x2')](0x0);var events={'afterCreate':'save','afterUpdate':_0x760d('0x3'),'afterDestroy':_0x760d('0x4')};function emitEvent(_0x2eebb3){return function(_0x2d963b,_0x47affe,_0x34ebba){_0x2d963b[_0x760d('0x5')]({'attributes':['id'],'raw':!![]})[_0x760d('0x6')](function(_0x463b41){_0x2d963b[_0x760d('0x7')]('Users',_0x463b41[_0x760d('0x8')](function(_0x3ffaa4){return{'id':_0x3ffaa4['id']};}));return WhatsappMessage[_0x760d('0x9')]({'where':{'WhatsappInteractionId':_0x2d963b['id'],'direction':'in','read':![]},'raw':!![]});})['then'](function(_0x465102){_0x2d963b[_0x760d('0x7')](_0x760d('0xa'),_0x465102['length']);WhatsappInteractionEvents[_0x760d('0xb')](_0x2eebb3+':'+_0x2d963b['id'],_0x2d963b);WhatsappInteractionEvents[_0x760d('0xb')](_0x2eebb3,_0x2d963b);_0x34ebba(null);})['catch'](_0x34ebba(null));};}for(var e in events){if(events[_0x760d('0xc')](e)){var event=events[e];WhatsappInteraction[_0x760d('0xd')](e,emitEvent(event));}}module[_0x760d('0xe')]=WhatsappInteractionEvents; \ No newline at end of file diff --git a/server/api/whatsappInteraction/whatsappInteraction.model.js b/server/api/whatsappInteraction/whatsappInteraction.model.js index 1ae99aa..6437f77 100644 --- a/server/api/whatsappInteraction/whatsappInteraction.model.js +++ b/server/api/whatsappInteraction/whatsappInteraction.model.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xb9f0=['../../config/environment','exports','WhatsappInteraction','whatsapp_interactions','format','util','bluebird','request-promise','path','rimraf'];(function(_0x9b1f76,_0x3c094a){var _0x46fe53=function(_0x37ab28){while(--_0x37ab28){_0x9b1f76['push'](_0x9b1f76['shift']());}};_0x46fe53(++_0x3c094a);}(_0xb9f0,0x181));var _0x0b9f=function(_0x21b14f,_0x3ed9b9){_0x21b14f=_0x21b14f-0x0;var _0x4c0fd0=_0xb9f0[_0x21b14f];return _0x4c0fd0;};'use strict';var _=require('lodash');var util=require(_0x0b9f('0x0'));var logger=require('../../config/logger')('api');var moment=require('moment');var BPromise=require(_0x0b9f('0x1'));var rp=require(_0x0b9f('0x2'));var fs=require('fs');var path=require(_0x0b9f('0x3'));var rimraf=require(_0x0b9f('0x4'));var config=require(_0x0b9f('0x5'));var attributes=require('./whatsappInteraction.attributes');module[_0x0b9f('0x6')]=function(_0x68c8c0,_0x446f7a){return _0x68c8c0['define'](_0x0b9f('0x7'),attributes,{'tableName':_0x0b9f('0x8'),'paranoid':![],'indexes':[],'timestamps':!![],'hooks':{'beforeUpdate':function(_0x4440e1,_0xf56540,_0x5125ea){if(_0x4440e1['changed']('closed')){_0x4440e1['closedAt']=moment()[_0x0b9f('0x9')]('YYYY-MM-DD\x20HH:mm:ss');}_0x5125ea(null,_0x4440e1);}}});}; \ No newline at end of file +var _0xad9f=['closed','closedAt','format','YYYY-MM-DD\x20HH:mm:ss','lodash','util','../../config/logger','moment','bluebird','request-promise','path','../../config/environment','exports','define','WhatsappInteraction','whatsapp_interactions','changed'];(function(_0x122ef9,_0x451d2a){var _0x42fba0=function(_0x17c9d3){while(--_0x17c9d3){_0x122ef9['push'](_0x122ef9['shift']());}};_0x42fba0(++_0x451d2a);}(_0xad9f,0x1be));var _0xfad9=function(_0x117ae5,_0x5ea5b0){_0x117ae5=_0x117ae5-0x0;var _0xcd6156=_0xad9f[_0x117ae5];return _0xcd6156;};'use strict';var _=require(_0xfad9('0x0'));var util=require(_0xfad9('0x1'));var logger=require(_0xfad9('0x2'))('api');var moment=require(_0xfad9('0x3'));var BPromise=require(_0xfad9('0x4'));var rp=require(_0xfad9('0x5'));var fs=require('fs');var path=require(_0xfad9('0x6'));var rimraf=require('rimraf');var config=require(_0xfad9('0x7'));var attributes=require('./whatsappInteraction.attributes');module[_0xfad9('0x8')]=function(_0x24d3fb,_0x19230a){return _0x24d3fb[_0xfad9('0x9')](_0xfad9('0xa'),attributes,{'tableName':_0xfad9('0xb'),'paranoid':![],'indexes':[],'timestamps':!![],'hooks':{'beforeUpdate':function(_0x4d46a7,_0x5580be,_0x121cd4){if(_0x4d46a7[_0xfad9('0xc')](_0xfad9('0xd'))){_0x4d46a7[_0xfad9('0xe')]=moment()[_0xfad9('0xf')](_0xfad9('0x10'));}_0x121cd4(null,_0x4d46a7);}}});}; \ No newline at end of file diff --git a/server/api/whatsappInteraction/whatsappInteraction.rpc.js b/server/api/whatsappInteraction/whatsappInteraction.rpc.js index 8508730..9a9dc93 100644 --- a/server/api/whatsappInteraction/whatsappInteraction.rpc.js +++ b/server/api/whatsappInteraction/whatsappInteraction.rpc.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xaca2=['then','info','WhatsappInteraction,\x20%s,\x20%s','request\x20sent','WhatsappInteraction,\x20%s,\x20%s,\x20%s','stringify','error','code','message','UpdateWhatsappInteraction','body','options','raw','where','debug','catch','AddTagsToWhatsappInteraction','WhatsappInteraction','find','ids','omit','AddTags','lodash','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','defaults','redis','localhost','socket.io-emitter','./whatsappInteraction.socket','register','request'];(function(_0x548ab8,_0xb30500){var _0x3bfe3d=function(_0x95cc8e){while(--_0x95cc8e){_0x548ab8['push'](_0x548ab8['shift']());}};_0x3bfe3d(++_0xb30500);}(_0xaca2,0x94));var _0x2aca=function(_0x189c9e,_0x1c3b55){_0x189c9e=_0x189c9e-0x0;var _0x3f38ca=_0xaca2[_0x189c9e];return _0x3f38ca;};'use strict';var _=require(_0x2aca('0x0'));var util=require(_0x2aca('0x1'));var moment=require(_0x2aca('0x2'));var BPromise=require(_0x2aca('0x3'));var rs=require(_0x2aca('0x4'));var fs=require('fs');var Redis=require(_0x2aca('0x5'));var db=require(_0x2aca('0x6'))['db'];var utils=require('../../config/utils');var logger=require(_0x2aca('0x7'))(_0x2aca('0x8'));var config=require(_0x2aca('0x9'));var jayson=require(_0x2aca('0xa'));var client=jayson[_0x2aca('0xb')][_0x2aca('0xc')]({'port':0x232a});config['redis']=_[_0x2aca('0xd')](config[_0x2aca('0xe')],{'host':_0x2aca('0xf'),'port':0x18eb});var socket=require(_0x2aca('0x10'))(new Redis(config[_0x2aca('0xe')]));require(_0x2aca('0x11'))[_0x2aca('0x12')](socket);function respondWithRpcPromise(_0xc2b990,_0x414e22,_0x9d2b93){return new BPromise(function(_0x3fe451,_0x244fbb){return client[_0x2aca('0x13')](_0xc2b990,_0x9d2b93)[_0x2aca('0x14')](function(_0x4385ad){logger[_0x2aca('0x15')](_0x2aca('0x16'),_0x414e22,_0x2aca('0x17'));logger['debug'](_0x2aca('0x18'),_0x414e22,'request\x20sent',JSON[_0x2aca('0x19')](_0x4385ad));if(_0x4385ad['error']){if(_0x4385ad[_0x2aca('0x1a')][_0x2aca('0x1b')]===0x1f4){logger[_0x2aca('0x1a')](_0x2aca('0x16'),_0x414e22,_0x4385ad[_0x2aca('0x1a')][_0x2aca('0x1c')]);return _0x244fbb(_0x4385ad['error'][_0x2aca('0x1c')]);}logger[_0x2aca('0x1a')](_0x2aca('0x16'),_0x414e22,_0x4385ad[_0x2aca('0x1a')][_0x2aca('0x1c')]);return _0x3fe451(_0x4385ad[_0x2aca('0x1a')][_0x2aca('0x1c')]);}else{logger[_0x2aca('0x15')](_0x2aca('0x16'),_0x414e22,_0x2aca('0x17'));_0x3fe451(_0x4385ad['result'][_0x2aca('0x1c')]);}})['catch'](function(_0x5529a4){logger['error']('WhatsappInteraction,\x20%s,\x20%s',_0x414e22,_0x5529a4);_0x244fbb(_0x5529a4);});});}exports[_0x2aca('0x1d')]=function(_0xd3a541){var _0x3a755b=this;return new Promise(function(_0x4ace78,_0x257990){return db['WhatsappInteraction']['update'](_0xd3a541[_0x2aca('0x1e')],{'raw':_0xd3a541['options']?_0xd3a541[_0x2aca('0x1f')][_0x2aca('0x20')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0xd3a541[_0x2aca('0x1f')]?_0xd3a541[_0x2aca('0x1f')][_0x2aca('0x21')]||null:null,'attributes':_0xd3a541[_0x2aca('0x1f')]?_0xd3a541[_0x2aca('0x1f')]['attributes']||null:null,'limit':_0xd3a541[_0x2aca('0x1f')]?_0xd3a541[_0x2aca('0x1f')]['limit']||null:null})['then'](function(_0x1600d8){logger[_0x2aca('0x15')]('UpdateWhatsappInteraction',_0xd3a541);logger[_0x2aca('0x22')](_0x2aca('0x1d'),_0xd3a541,JSON[_0x2aca('0x19')](_0x1600d8));_0x4ace78(_0x1600d8);})[_0x2aca('0x23')](function(_0x17b900){logger[_0x2aca('0x1a')](_0x2aca('0x1d'),_0x17b900[_0x2aca('0x1c')],_0xd3a541);_0x257990(_0x3a755b[_0x2aca('0x1a')](0x1f4,_0x17b900[_0x2aca('0x1c')]));});});};exports[_0x2aca('0x24')]=function(_0x216f5e){return new Promise(function(_0x2a8922,_0x21b6bb){return db[_0x2aca('0x25')][_0x2aca('0x26')]({'where':_0x216f5e[_0x2aca('0x1f')]?_0x216f5e[_0x2aca('0x1f')]['where']||null:null})[_0x2aca('0x14')](function(_0x4d6ea2){if(_0x4d6ea2){return _0x4d6ea2['addTags'](_0x216f5e[_0x2aca('0x1e')][_0x2aca('0x27')],_[_0x2aca('0x28')](_0x216f5e[_0x2aca('0x1e')],[_0x2aca('0x27'),'id'])||{});}})['spread'](function(_0x1f3eeb){logger[_0x2aca('0x15')](_0x2aca('0x29'),_0x216f5e);logger['debug'](_0x2aca('0x29'),_0x216f5e,JSON[_0x2aca('0x19')](_0x1f3eeb));_0x2a8922(_0x1f3eeb);})[_0x2aca('0x23')](function(_0x2058e1){logger[_0x2aca('0x1a')]('AddTags',_0x2058e1['message'],_0x216f5e);_0x21b6bb(_this['error'](0x1f4,_0x2058e1[_0x2aca('0x1c')]));});});}; \ No newline at end of file +var _0x6e6f=['request\x20sent','error','message','result','UpdateWhatsappInteraction','WhatsappInteraction','update','body','options','raw','where','attributes','limit','stringify','catch','addTags','ids','AddTags','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/logger','../../config/environment','jayson/promise','client','http','redis','defaults','localhost','socket.io-emitter','register','request','then','info','WhatsappInteraction,\x20%s,\x20%s','debug','WhatsappInteraction,\x20%s,\x20%s,\x20%s'];(function(_0xbbfe59,_0x46067f){var _0x28a2a4=function(_0xfe230){while(--_0xfe230){_0xbbfe59['push'](_0xbbfe59['shift']());}};_0x28a2a4(++_0x46067f);}(_0x6e6f,0x1ca));var _0xf6e6=function(_0x49279c,_0x56da65){_0x49279c=_0x49279c-0x0;var _0x472c04=_0x6e6f[_0x49279c];return _0x472c04;};'use strict';var _=require('lodash');var util=require(_0xf6e6('0x0'));var moment=require(_0xf6e6('0x1'));var BPromise=require(_0xf6e6('0x2'));var rs=require(_0xf6e6('0x3'));var fs=require('fs');var Redis=require(_0xf6e6('0x4'));var db=require(_0xf6e6('0x5'))['db'];var utils=require('../../config/utils');var logger=require(_0xf6e6('0x6'))('rpc');var config=require(_0xf6e6('0x7'));var jayson=require(_0xf6e6('0x8'));var client=jayson[_0xf6e6('0x9')][_0xf6e6('0xa')]({'port':0x232a});config[_0xf6e6('0xb')]=_[_0xf6e6('0xc')](config[_0xf6e6('0xb')],{'host':_0xf6e6('0xd'),'port':0x18eb});var socket=require(_0xf6e6('0xe'))(new Redis(config[_0xf6e6('0xb')]));require('./whatsappInteraction.socket')[_0xf6e6('0xf')](socket);function respondWithRpcPromise(_0xdad741,_0x5a22af,_0x1de9cb){return new BPromise(function(_0x637401,_0x1efaea){return client[_0xf6e6('0x10')](_0xdad741,_0x1de9cb)[_0xf6e6('0x11')](function(_0x364d51){logger[_0xf6e6('0x12')](_0xf6e6('0x13'),_0x5a22af,'request\x20sent');logger[_0xf6e6('0x14')](_0xf6e6('0x15'),_0x5a22af,_0xf6e6('0x16'),JSON['stringify'](_0x364d51));if(_0x364d51[_0xf6e6('0x17')]){if(_0x364d51[_0xf6e6('0x17')]['code']===0x1f4){logger['error'](_0xf6e6('0x13'),_0x5a22af,_0x364d51[_0xf6e6('0x17')][_0xf6e6('0x18')]);return _0x1efaea(_0x364d51[_0xf6e6('0x17')]['message']);}logger[_0xf6e6('0x17')](_0xf6e6('0x13'),_0x5a22af,_0x364d51[_0xf6e6('0x17')][_0xf6e6('0x18')]);return _0x637401(_0x364d51['error']['message']);}else{logger[_0xf6e6('0x12')](_0xf6e6('0x13'),_0x5a22af,_0xf6e6('0x16'));_0x637401(_0x364d51[_0xf6e6('0x19')][_0xf6e6('0x18')]);}})['catch'](function(_0x5b42ea){logger['error']('WhatsappInteraction,\x20%s,\x20%s',_0x5a22af,_0x5b42ea);_0x1efaea(_0x5b42ea);});});}exports[_0xf6e6('0x1a')]=function(_0x45762a){var _0x1e1760=this;return new Promise(function(_0x3a1cc3,_0x2e025d){return db[_0xf6e6('0x1b')][_0xf6e6('0x1c')](_0x45762a[_0xf6e6('0x1d')],{'raw':_0x45762a[_0xf6e6('0x1e')]?_0x45762a[_0xf6e6('0x1e')][_0xf6e6('0x1f')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x45762a[_0xf6e6('0x1e')]?_0x45762a['options'][_0xf6e6('0x20')]||null:null,'attributes':_0x45762a[_0xf6e6('0x1e')]?_0x45762a[_0xf6e6('0x1e')][_0xf6e6('0x21')]||null:null,'limit':_0x45762a[_0xf6e6('0x1e')]?_0x45762a[_0xf6e6('0x1e')][_0xf6e6('0x22')]||null:null})[_0xf6e6('0x11')](function(_0x3c6d46){logger[_0xf6e6('0x12')]('UpdateWhatsappInteraction',_0x45762a);logger[_0xf6e6('0x14')]('UpdateWhatsappInteraction',_0x45762a,JSON[_0xf6e6('0x23')](_0x3c6d46));_0x3a1cc3(_0x3c6d46);})[_0xf6e6('0x24')](function(_0x15b1ca){logger[_0xf6e6('0x17')]('UpdateWhatsappInteraction',_0x15b1ca[_0xf6e6('0x18')],_0x45762a);_0x2e025d(_0x1e1760['error'](0x1f4,_0x15b1ca[_0xf6e6('0x18')]));});});};exports['AddTagsToWhatsappInteraction']=function(_0x1f5387){return new Promise(function(_0x129944,_0x56446d){return db['WhatsappInteraction']['find']({'where':_0x1f5387[_0xf6e6('0x1e')]?_0x1f5387[_0xf6e6('0x1e')]['where']||null:null})[_0xf6e6('0x11')](function(_0xbb99d0){if(_0xbb99d0){return _0xbb99d0[_0xf6e6('0x25')](_0x1f5387['body'][_0xf6e6('0x26')],_['omit'](_0x1f5387[_0xf6e6('0x1d')],[_0xf6e6('0x26'),'id'])||{});}})['spread'](function(_0x3fad2e){logger['info'](_0xf6e6('0x27'),_0x1f5387);logger[_0xf6e6('0x14')](_0xf6e6('0x27'),_0x1f5387,JSON['stringify'](_0x3fad2e));_0x129944(_0x3fad2e);})[_0xf6e6('0x24')](function(_0xaa9dcb){logger['error']('AddTags',_0xaa9dcb['message'],_0x1f5387);_0x56446d(_this[_0xf6e6('0x17')](0x1f4,_0xaa9dcb['message']));});});}; \ No newline at end of file diff --git a/server/api/whatsappInteraction/whatsappInteraction.socket.js b/server/api/whatsappInteraction/whatsappInteraction.socket.js index 2e870c5..55f48e4 100644 --- a/server/api/whatsappInteraction/whatsappInteraction.socket.js +++ b/server/api/whatsappInteraction/whatsappInteraction.socket.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x9e23=['./whatsappInteraction.events','save','remove','update','emit','register','length'];(function(_0x4f6ffd,_0x316dd8){var _0x34a32e=function(_0x386980){while(--_0x386980){_0x4f6ffd['push'](_0x4f6ffd['shift']());}};_0x34a32e(++_0x316dd8);}(_0x9e23,0x126));var _0x39e2=function(_0x52c104,_0x3425a0){_0x52c104=_0x52c104-0x0;var _0x32f40e=_0x9e23[_0x52c104];return _0x32f40e;};'use strict';var WhatsappInteractionEvents=require(_0x39e2('0x0'));var events=[_0x39e2('0x1'),_0x39e2('0x2'),_0x39e2('0x3')];function createListener(_0x6dc6cc,_0x10c5cd){return function(_0x5bbd09){_0x10c5cd[_0x39e2('0x4')](_0x6dc6cc,_0x5bbd09);};}function removeListener(_0x28d9b3,_0x3dc9a8){return function(){WhatsappInteractionEvents['removeListener'](_0x28d9b3,_0x3dc9a8);};}exports[_0x39e2('0x5')]=function(_0x2ff27b){for(var _0x51c613=0x0,_0x484457=events[_0x39e2('0x6')];_0x51c613<_0x484457;_0x51c613++){var _0x4f9dd8=events[_0x51c613];var _0x281323=createListener('whatsappInteraction:'+_0x4f9dd8,_0x2ff27b);WhatsappInteractionEvents['on'](_0x4f9dd8,_0x281323);}}; \ No newline at end of file +var _0xc0c4=['save','remove','update','emit','removeListener','length','whatsappInteraction:','./whatsappInteraction.events'];(function(_0x5b601a,_0x52e161){var _0x183b9b=function(_0x344e60){while(--_0x344e60){_0x5b601a['push'](_0x5b601a['shift']());}};_0x183b9b(++_0x52e161);}(_0xc0c4,0x18f));var _0x4c0c=function(_0x155737,_0x552b34){_0x155737=_0x155737-0x0;var _0x48a879=_0xc0c4[_0x155737];return _0x48a879;};'use strict';var WhatsappInteractionEvents=require(_0x4c0c('0x0'));var events=[_0x4c0c('0x1'),_0x4c0c('0x2'),_0x4c0c('0x3')];function createListener(_0x792d4a,_0x27bc75){return function(_0x5f515a){_0x27bc75[_0x4c0c('0x4')](_0x792d4a,_0x5f515a);};}function removeListener(_0x430ed3,_0x3eba5e){return function(){WhatsappInteractionEvents[_0x4c0c('0x5')](_0x430ed3,_0x3eba5e);};}exports['register']=function(_0x1a63d3){for(var _0x4df043=0x0,_0x5503bd=events[_0x4c0c('0x6')];_0x4df043<_0x5503bd;_0x4df043++){var _0x428e3c=events[_0x4df043];var _0x31d670=createListener(_0x4c0c('0x7')+_0x428e3c,_0x1a63d3);WhatsappInteractionEvents['on'](_0x428e3c,_0x31d670);}}; \ No newline at end of file diff --git a/server/api/whatsappMessage/index.js b/server/api/whatsappMessage/index.js index 3cb364a..fe44b48 100644 --- a/server/api/whatsappMessage/index.js +++ b/server/api/whatsappMessage/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x4512=['../../components/interaction/service','../../config/environment','./whatsappMessage.controller','isAuthenticated','get','/describe','describe','/:id','show','post','whatsapp','create','/:id/status','status','put','update','/:id/accept','reject','delete','multer','util','express','Router','fs-extra'];(function(_0x9e612d,_0x30207f){var _0x19b670=function(_0x5ab25f){while(--_0x5ab25f){_0x9e612d['push'](_0x9e612d['shift']());}};_0x19b670(++_0x30207f);}(_0x4512,0x1ab));var _0x2451=function(_0xda501a,_0x159d6a){_0xda501a=_0xda501a-0x0;var _0x44be3a=_0x4512[_0xda501a];return _0x44be3a;};'use strict';var multer=require(_0x2451('0x0'));var util=require(_0x2451('0x1'));var path=require('path');var timeout=require('connect-timeout');var express=require(_0x2451('0x2'));var router=express[_0x2451('0x3')]();var fs_extra=require(_0x2451('0x4'));var auth=require('../../components/auth/service');var interaction=require(_0x2451('0x5'));var config=require(_0x2451('0x6'));var controller=require(_0x2451('0x7'));router['get']('/',auth[_0x2451('0x8')](),controller['index']);router[_0x2451('0x9')](_0x2451('0xa'),auth[_0x2451('0x8')](),controller[_0x2451('0xb')]);router[_0x2451('0x9')](_0x2451('0xc'),auth[_0x2451('0x8')](),controller[_0x2451('0xd')]);router[_0x2451('0xe')]('/',auth[_0x2451('0x8')](),interaction['tracked'](_0x2451('0xf'),'whatsappmessage:create'),controller[_0x2451('0x10')]);router[_0x2451('0xe')](_0x2451('0x11'),controller[_0x2451('0x12')]);router[_0x2451('0x13')](_0x2451('0xc'),auth[_0x2451('0x8')](),controller[_0x2451('0x14')]);router[_0x2451('0x13')](_0x2451('0x15'),auth[_0x2451('0x8')](),controller['accept']);router[_0x2451('0x13')]('/:id/reject',auth[_0x2451('0x8')](),controller[_0x2451('0x16')]);router[_0x2451('0x17')](_0x2451('0xc'),auth[_0x2451('0x8')](),controller['destroy']);module['exports']=router; \ No newline at end of file +var _0x28fc=['status','put','/:id/accept','accept','/:id/reject','reject','delete','destroy','exports','multer','util','path','express','Router','fs-extra','../../components/interaction/service','../../config/environment','./whatsappMessage.controller','get','isAuthenticated','index','/describe','/:id','show','post','tracked','whatsapp'];(function(_0x532437,_0x404706){var _0x29a9e8=function(_0x5b7465){while(--_0x5b7465){_0x532437['push'](_0x532437['shift']());}};_0x29a9e8(++_0x404706);}(_0x28fc,0x19e));var _0xc28f=function(_0x3aeae6,_0x201d94){_0x3aeae6=_0x3aeae6-0x0;var _0xc3594=_0x28fc[_0x3aeae6];return _0xc3594;};'use strict';var multer=require(_0xc28f('0x0'));var util=require(_0xc28f('0x1'));var path=require(_0xc28f('0x2'));var timeout=require('connect-timeout');var express=require(_0xc28f('0x3'));var router=express[_0xc28f('0x4')]();var fs_extra=require(_0xc28f('0x5'));var auth=require('../../components/auth/service');var interaction=require(_0xc28f('0x6'));var config=require(_0xc28f('0x7'));var controller=require(_0xc28f('0x8'));router[_0xc28f('0x9')]('/',auth[_0xc28f('0xa')](),controller[_0xc28f('0xb')]);router[_0xc28f('0x9')](_0xc28f('0xc'),auth[_0xc28f('0xa')](),controller['describe']);router['get'](_0xc28f('0xd'),auth[_0xc28f('0xa')](),controller[_0xc28f('0xe')]);router[_0xc28f('0xf')]('/',auth[_0xc28f('0xa')](),interaction[_0xc28f('0x10')](_0xc28f('0x11'),'whatsappmessage:create'),controller['create']);router[_0xc28f('0xf')]('/:id/status',controller[_0xc28f('0x12')]);router['put'](_0xc28f('0xd'),auth[_0xc28f('0xa')](),controller['update']);router[_0xc28f('0x13')](_0xc28f('0x14'),auth[_0xc28f('0xa')](),controller[_0xc28f('0x15')]);router[_0xc28f('0x13')](_0xc28f('0x16'),auth['isAuthenticated'](),controller[_0xc28f('0x17')]);router[_0xc28f('0x18')](_0xc28f('0xd'),auth[_0xc28f('0xa')](),controller[_0xc28f('0x19')]);module[_0xc28f('0x1a')]=router; \ No newline at end of file diff --git a/server/api/whatsappMessage/whatsappMessage.attributes.js b/server/api/whatsappMessage/whatsappMessage.attributes.js index 8da93fa..8364062 100644 --- a/server/api/whatsappMessage/whatsappMessage.attributes.js +++ b/server/api/whatsappMessage/whatsappMessage.attributes.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xb9e1=['STRING','DATE','sequelize','exports','TEXT','medium','BOOLEAN','ENUM','out'];(function(_0x4bfbab,_0x4c3b2f){var _0x43eb0e=function(_0xb3bdc4){while(--_0xb3bdc4){_0x4bfbab['push'](_0x4bfbab['shift']());}};_0x43eb0e(++_0x4c3b2f);}(_0xb9e1,0xad));var _0x1b9e=function(_0x5167a4,_0x4ac437){_0x5167a4=_0x5167a4-0x0;var _0xba0081=_0xb9e1[_0x5167a4];return _0xba0081;};'use strict';var Sequelize=require(_0x1b9e('0x0'));module[_0x1b9e('0x1')]={'body':{'type':Sequelize[_0x1b9e('0x2')](_0x1b9e('0x3')),'allowNull':![]},'read':{'type':Sequelize[_0x1b9e('0x4')],'defaultValue':![]},'direction':{'type':Sequelize[_0x1b9e('0x5')]('in',_0x1b9e('0x6')),'defaultValue':_0x1b9e('0x6'),'allowNull':![]},'messageId':{'type':Sequelize['STRING'](0xbe)},'phone':{'type':Sequelize[_0x1b9e('0x7')]},'readAt':{'type':Sequelize[_0x1b9e('0x8')]},'secret':{'type':Sequelize[_0x1b9e('0x4')],'defaultValue':![]},'providerName':{'type':Sequelize[_0x1b9e('0x7')]},'providerResponse':{'type':Sequelize[_0x1b9e('0x2')]}}; \ No newline at end of file +var _0xc7a1=['STRING','sequelize','exports','TEXT','medium','BOOLEAN','ENUM','out'];(function(_0x5cf763,_0x43d0f5){var _0x11c50c=function(_0x2adb6b){while(--_0x2adb6b){_0x5cf763['push'](_0x5cf763['shift']());}};_0x11c50c(++_0x43d0f5);}(_0xc7a1,0xa9));var _0x1c7a=function(_0x321bb2,_0x202794){_0x321bb2=_0x321bb2-0x0;var _0x9c12ed=_0xc7a1[_0x321bb2];return _0x9c12ed;};'use strict';var Sequelize=require(_0x1c7a('0x0'));module[_0x1c7a('0x1')]={'body':{'type':Sequelize[_0x1c7a('0x2')](_0x1c7a('0x3')),'allowNull':![]},'read':{'type':Sequelize[_0x1c7a('0x4')],'defaultValue':![]},'direction':{'type':Sequelize[_0x1c7a('0x5')]('in',_0x1c7a('0x6')),'defaultValue':_0x1c7a('0x6'),'allowNull':![]},'messageId':{'type':Sequelize[_0x1c7a('0x7')](0xbe)},'phone':{'type':Sequelize[_0x1c7a('0x7')]},'readAt':{'type':Sequelize['DATE']},'secret':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'providerName':{'type':Sequelize[_0x1c7a('0x7')]},'providerResponse':{'type':Sequelize[_0x1c7a('0x2')]}}; \ No newline at end of file diff --git a/server/api/whatsappMessage/whatsappMessage.controller.js b/server/api/whatsappMessage/whatsappMessage.controller.js index e5a59ef..b98efb9 100644 --- a/server/api/whatsappMessage/whatsappMessage.controller.js +++ b/server/api/whatsappMessage/whatsappMessage.controller.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xbe5e=['ContactId','sequelize','Sequelize','QueryTypes','SELECT','contact','User','fullname','email','internal','interface','motionChannel','channel','EventManager','acceptmessage','WhatsappInteraction','[WHATSAPPMESSAGE:REJECT]\x20id=%s\x20name=%s\x20role=%s\x20interaction=%s\x20body=%s','RejectMessage','rejectMessage','event','rejectmessage','WhatsappAccount','WhatsappAccountId','inspect','messageId','WhatsappAccount,\x20%s,\x20%s,\x20%s','eml-format','zip-dir','request-promise','moment','bluebird','mustache','util','path','sox','to-csv','lodash','squel','jsforce','desk.js','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/license/util','../../mysqldb','defaults','redis','localhost','socket.io-emitter','./whatsappMessage.socket','register','jayson/promise','client','http','request','then','info','request\x20sent','debug','WhatsappMessage,\x20%s,\x20%s,\x20%s','error','code','WhatsappMessage,\x20%s,\x20%s','message','result','catch','sendStatus','end','json','undefined','limit','count','offset','status','Content-Range','apply','reject','save','update','destroy','stack','name','send','index','map','WhatsappMessage','rawAttributes','fieldName','type','key','query','keys','filters','intersection','attributes','model','fields','length','hasOwnProperty','nolimit','order','sort','where','merge','options','includeAll','include','find','create','body','params','describe','whatsapp-interactions','accept','whatsapp','read','format','YYYY-MM-DD\x20HH:mm:ss','UserId','agent','WhatsappInteractionId','read1stAt','interaction','get','[WHATSAPPMESSAGE:ACCEPT]\x20id=%s\x20name=%s\x20role=%s\x20interaction=%s\x20body=%s','user','role','stringify','null','acceptMessage','SELECT\x20*\x20FROM\x20cm_contacts\x20WHERE\x20id\x20=\x20'];(function(_0x45814a,_0x5a8cb2){var _0x1c033d=function(_0x5441bc){while(--_0x5441bc){_0x45814a['push'](_0x45814a['shift']());}};_0x1c033d(++_0x5a8cb2);}(_0xbe5e,0xa3));var _0xebe5=function(_0x4f7c34,_0x437ce8){_0x4f7c34=_0x4f7c34-0x0;var _0x4e4fb0=_0xbe5e[_0x4f7c34];return _0x4e4fb0;};'use strict';var emlformat=require(_0xebe5('0x0'));var rimraf=require('rimraf');var zipdir=require(_0xebe5('0x1'));var jsonpatch=require('fast-json-patch');var rp=require(_0xebe5('0x2'));var moment=require(_0xebe5('0x3'));var BPromise=require(_0xebe5('0x4'));var Mustache=require(_0xebe5('0x5'));var util=require(_0xebe5('0x6'));var path=require(_0xebe5('0x7'));var sox=require(_0xebe5('0x8'));var csv=require(_0xebe5('0x9'));var ejs=require('ejs');var fs=require('fs');var fs_extra=require('fs-extra');var _=require(_0xebe5('0xa'));var squel=require(_0xebe5('0xb'));var crypto=require('crypto');var jsforce=require(_0xebe5('0xc'));var deskjs=require(_0xebe5('0xd'));var toCsv=require(_0xebe5('0x9'));var querystring=require(_0xebe5('0xe'));var Papa=require(_0xebe5('0xf'));var Redis=require(_0xebe5('0x10'));var authService=require(_0xebe5('0x11'));var qs=require(_0xebe5('0x12'));var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0xebe5('0x13'));var logger=require(_0xebe5('0x14'))(_0xebe5('0x15'));var utils=require(_0xebe5('0x16'));var config=require('../../config/environment');var licenseUtil=require(_0xebe5('0x17'));var db=require(_0xebe5('0x18'))['db'];config['redis']=_[_0xebe5('0x19')](config[_0xebe5('0x1a')],{'host':_0xebe5('0x1b'),'port':0x18eb});var socket=require(_0xebe5('0x1c'))(new Redis(config[_0xebe5('0x1a')]));require(_0xebe5('0x1d'))[_0xebe5('0x1e')](socket);var jayson=require(_0xebe5('0x1f'));var client=jayson[_0xebe5('0x20')][_0xebe5('0x21')]({'port':0x232c});var client9002=jayson[_0xebe5('0x20')][_0xebe5('0x21')]({'port':0x232a});function respondWithRpcPromise(_0x4c711c,_0x59fddb,_0x1ae68f,_0x40cfdf){return new BPromise(function(_0x3c8b23,_0x12fecb){var _0x2652e0=_0x40cfdf||client;return _0x2652e0[_0xebe5('0x22')](_0x4c711c,_0x1ae68f)[_0xebe5('0x23')](function(_0x16f608){logger[_0xebe5('0x24')]('WhatsappMessage,\x20%s,\x20%s',_0x59fddb,_0xebe5('0x25'));logger[_0xebe5('0x26')](_0xebe5('0x27'),_0x59fddb,_0xebe5('0x25'),JSON['stringify'](_0x16f608));if(_0x16f608[_0xebe5('0x28')]){if(_0x16f608[_0xebe5('0x28')][_0xebe5('0x29')]===0x1f4){logger['error'](_0xebe5('0x2a'),_0x59fddb,_0x16f608[_0xebe5('0x28')][_0xebe5('0x2b')]);return _0x12fecb(_0x16f608[_0xebe5('0x28')][_0xebe5('0x2b')]);}logger[_0xebe5('0x28')]('WhatsappMessage,\x20%s,\x20%s',_0x59fddb,_0x16f608[_0xebe5('0x28')][_0xebe5('0x2b')]);return _0x3c8b23(_0x16f608[_0xebe5('0x28')]['message']);}else{logger['info'](_0xebe5('0x2a'),_0x59fddb,_0xebe5('0x25'));_0x3c8b23(_0x16f608[_0xebe5('0x2c')][_0xebe5('0x2b')]);}})[_0xebe5('0x2d')](function(_0x5ee7f8){logger['error'](_0xebe5('0x2a'),_0x59fddb,_0x5ee7f8);_0x12fecb(_0x5ee7f8);});});}function respondWithStatusCode(_0x201412,_0x5ee413){_0x5ee413=_0x5ee413||0xcc;return function(_0x4a2ed8){if(_0x4a2ed8){return _0x201412[_0xebe5('0x2e')](_0x5ee413);}return _0x201412['status'](_0x5ee413)[_0xebe5('0x2f')]();};}function respondWithResult(_0x5dcb47,_0xf2d6e4){_0xf2d6e4=_0xf2d6e4||0xc8;return function(_0x365c55){if(_0x365c55){return _0x5dcb47['status'](_0xf2d6e4)[_0xebe5('0x30')](_0x365c55);}};}function respondWithFilteredResult(_0xb1963,_0x229cc2){return function(_0x3f196e){if(_0x3f196e){var _0x5351f8=typeof _0x229cc2['offset']===_0xebe5('0x31')&&typeof _0x229cc2[_0xebe5('0x32')]===_0xebe5('0x31');var _0x5f4728=_0x3f196e['count'];var _0x187b0f=_0x5351f8?0x0:_0x229cc2['offset'];var _0x310989=_0x5351f8?_0x3f196e[_0xebe5('0x33')]:_0x229cc2[_0xebe5('0x34')]+_0x229cc2[_0xebe5('0x32')];var _0x13825d;if(_0x310989>=_0x5f4728){_0x310989=_0x5f4728;_0x13825d=0xc8;}else{_0x13825d=0xce;}_0xb1963[_0xebe5('0x35')](_0x13825d);return _0xb1963['set'](_0xebe5('0x36'),_0x187b0f+'-'+_0x310989+'/'+_0x5f4728)[_0xebe5('0x30')](_0x3f196e);}return null;};}function patchUpdates(_0x245aee){return function(_0x2d4286){try{jsonpatch[_0xebe5('0x37')](_0x2d4286,_0x245aee,!![]);}catch(_0x3da206){return BPromise[_0xebe5('0x38')](_0x3da206);}return _0x2d4286[_0xebe5('0x39')]();};}function saveUpdates(_0x46c219,_0x3b58df){return function(_0x251cf1){if(_0x251cf1){return _0x251cf1[_0xebe5('0x3a')](_0x46c219)['then'](function(_0x2eb5b4){return _0x2eb5b4;});}return null;};}function removeEntity(_0x92519d,_0x4898b8){return function(_0x572742){if(_0x572742){return _0x572742[_0xebe5('0x3b')]()['then'](function(){_0x92519d['status'](0xcc)[_0xebe5('0x2f')]();});}};}function handleEntityNotFound(_0x4fa570,_0x33222c){return function(_0x35e588){if(!_0x35e588){_0x4fa570[_0xebe5('0x2e')](0x194);}return _0x35e588;};}function handleError(_0x53fe03,_0x337664){_0x337664=_0x337664||0x1f4;return function(_0x4692d7){logger['error'](_0x4692d7[_0xebe5('0x3c')]);if(_0x4692d7[_0xebe5('0x3d')]){delete _0x4692d7[_0xebe5('0x3d')];}_0x53fe03[_0xebe5('0x35')](_0x337664)[_0xebe5('0x3e')](_0x4692d7);};}exports[_0xebe5('0x3f')]=function(_0xee0e7f,_0x7972d8){var _0x2fa9a8={},_0x19bc79={},_0x510c4b={'count':0x0,'rows':[]};var _0x1b9755=_[_0xebe5('0x40')](db[_0xebe5('0x41')][_0xebe5('0x42')],function(_0x182b7a){return{'name':_0x182b7a[_0xebe5('0x43')],'type':_0x182b7a[_0xebe5('0x44')][_0xebe5('0x45')]};});_0x19bc79['model']=_['map'](_0x1b9755,_0xebe5('0x3d'));_0x19bc79[_0xebe5('0x46')]=_[_0xebe5('0x47')](_0xee0e7f[_0xebe5('0x46')]);_0x19bc79[_0xebe5('0x48')]=_[_0xebe5('0x49')](_0x19bc79['model'],_0x19bc79['query']);_0x2fa9a8[_0xebe5('0x4a')]=_[_0xebe5('0x49')](_0x19bc79[_0xebe5('0x4b')],qs[_0xebe5('0x4c')](_0xee0e7f[_0xebe5('0x46')][_0xebe5('0x4c')]));_0x2fa9a8[_0xebe5('0x4a')]=_0x2fa9a8[_0xebe5('0x4a')][_0xebe5('0x4d')]?_0x2fa9a8['attributes']:_0x19bc79['model'];if(!_0xee0e7f['query'][_0xebe5('0x4e')](_0xebe5('0x4f'))){_0x2fa9a8['limit']=qs[_0xebe5('0x32')](_0xee0e7f[_0xebe5('0x46')][_0xebe5('0x32')]);_0x2fa9a8['offset']=qs[_0xebe5('0x34')](_0xee0e7f[_0xebe5('0x46')][_0xebe5('0x34')]);}_0x2fa9a8[_0xebe5('0x50')]=qs[_0xebe5('0x51')](_0xee0e7f[_0xebe5('0x46')][_0xebe5('0x51')]);_0x2fa9a8[_0xebe5('0x52')]=qs[_0xebe5('0x48')](_['pick'](_0xee0e7f['query'],_0x19bc79[_0xebe5('0x48')]),_0x1b9755);if(_0xee0e7f[_0xebe5('0x46')]['filter']){_0x2fa9a8[_0xebe5('0x52')]=_[_0xebe5('0x53')](_0x2fa9a8['where'],{'$or':_[_0xebe5('0x40')](_0x1b9755,function(_0x5a338d){if(_0x5a338d['type']!=='VIRTUAL'){var _0x4c263c={};_0x4c263c[_0x5a338d['name']]={'$like':'%'+_0xee0e7f[_0xebe5('0x46')]['filter']+'%'};return _0x4c263c;}})});}_0x2fa9a8=_[_0xebe5('0x53')]({},_0x2fa9a8,_0xee0e7f[_0xebe5('0x54')]);var _0x301cd5={'where':_0x2fa9a8['where']};return db[_0xebe5('0x41')][_0xebe5('0x33')](_0x301cd5)['then'](function(_0x2c83e4){_0x510c4b['count']=_0x2c83e4;if(_0xee0e7f[_0xebe5('0x46')][_0xebe5('0x55')]){_0x2fa9a8['include']=[{'all':!![]}];}return db[_0xebe5('0x41')]['findAll'](_0x2fa9a8);})['then'](function(_0x518f16){_0x510c4b['rows']=_0x518f16;return _0x510c4b;})['then'](respondWithFilteredResult(_0x7972d8,_0x2fa9a8))[_0xebe5('0x2d')](handleError(_0x7972d8,null));};exports['show']=function(_0x2c4bf6,_0xa70d27){var _0x59feb={'raw':!![],'where':{'id':_0x2c4bf6['params']['id']}},_0x414506={};_0x414506[_0xebe5('0x4b')]=_['keys'](db[_0xebe5('0x41')][_0xebe5('0x42')]);_0x414506[_0xebe5('0x46')]=_[_0xebe5('0x47')](_0x2c4bf6[_0xebe5('0x46')]);_0x414506[_0xebe5('0x48')]=_['intersection'](_0x414506[_0xebe5('0x4b')],_0x414506[_0xebe5('0x46')]);_0x59feb[_0xebe5('0x4a')]=_[_0xebe5('0x49')](_0x414506[_0xebe5('0x4b')],qs[_0xebe5('0x4c')](_0x2c4bf6['query'][_0xebe5('0x4c')]));_0x59feb[_0xebe5('0x4a')]=_0x59feb[_0xebe5('0x4a')][_0xebe5('0x4d')]?_0x59feb[_0xebe5('0x4a')]:_0x414506['model'];if(_0x2c4bf6[_0xebe5('0x46')][_0xebe5('0x55')]){_0x59feb[_0xebe5('0x56')]=[{'all':!![]}];}_0x59feb=_['merge']({},_0x59feb,_0x2c4bf6['options']);return db[_0xebe5('0x41')][_0xebe5('0x57')](_0x59feb)['then'](handleEntityNotFound(_0xa70d27,null))[_0xebe5('0x23')](respondWithResult(_0xa70d27,null))['catch'](handleError(_0xa70d27,null));};exports[_0xebe5('0x58')]=function(_0x2f6091,_0x14656e){return db[_0xebe5('0x41')]['create'](_0x2f6091['body'],{})[_0xebe5('0x23')](respondWithResult(_0x14656e,0xc9))['catch'](handleError(_0x14656e,null));};exports[_0xebe5('0x3a')]=function(_0x25de8b,_0x4c3a6f){if(_0x25de8b[_0xebe5('0x59')]['id']){delete _0x25de8b[_0xebe5('0x59')]['id'];}return db[_0xebe5('0x41')][_0xebe5('0x57')]({'where':{'id':_0x25de8b[_0xebe5('0x5a')]['id']}})[_0xebe5('0x23')](handleEntityNotFound(_0x4c3a6f,null))[_0xebe5('0x23')](saveUpdates(_0x25de8b[_0xebe5('0x59')],null))[_0xebe5('0x23')](respondWithResult(_0x4c3a6f,null))['catch'](handleError(_0x4c3a6f,null));};exports['destroy']=function(_0x3581ed,_0x2609f1){return db[_0xebe5('0x41')]['find']({'where':{'id':_0x3581ed['params']['id']}})[_0xebe5('0x23')](handleEntityNotFound(_0x2609f1,null))['then'](removeEntity(_0x2609f1,null))['catch'](handleError(_0x2609f1,null));};exports[_0xebe5('0x5b')]=function(_0x4b2802,_0x4be0bb){return db[_0xebe5('0x41')][_0xebe5('0x5b')]()[_0xebe5('0x23')](respondWithResult(_0x4be0bb,null))[_0xebe5('0x2d')](handleError(_0x4be0bb,null));};var interaction_log=require(_0xebe5('0x14'))(_0xebe5('0x5c'));exports[_0xebe5('0x5d')]=function(_0x9d2758,_0x42e97e,_0x4ee344){var _0x283c40={'agent':{},'channel':_0xebe5('0x5e')};if(_0x9d2758['body']['id']){delete _0x9d2758[_0xebe5('0x59')]['id'];}_0x9d2758[_0xebe5('0x59')][_0xebe5('0x5f')]=!![];_0x9d2758[_0xebe5('0x59')]['readAt']=moment()[_0xebe5('0x60')](_0xebe5('0x61'));_0x9d2758[_0xebe5('0x59')][_0xebe5('0x62')]=_0x9d2758[_0xebe5('0x59')][_0xebe5('0x62')]||_0x9d2758['user']['id'];_0x283c40[_0xebe5('0x63')]['id']=_0x9d2758[_0xebe5('0x59')]['UserId'];return db[_0xebe5('0x41')][_0xebe5('0x57')]({'where':{'id':_0x9d2758[_0xebe5('0x5a')]['id'],'UserId':null}})[_0xebe5('0x23')](handleEntityNotFound(_0x42e97e,null))[_0xebe5('0x23')](saveUpdates(_0x9d2758[_0xebe5('0x59')],null))['then'](function(_0xcfd20a){if(_0xcfd20a){_0x283c40[_0xebe5('0x2b')]=_0xcfd20a['get']({'plain':!![]});return db['WhatsappInteraction'][_0xebe5('0x57')]({'where':{'id':_0xcfd20a[_0xebe5('0x64')]}});}return null;})[_0xebe5('0x23')](handleEntityNotFound(_0x42e97e,null))[_0xebe5('0x23')](function(_0x4fdb49){if(_0x4fdb49){return _0x4fdb49[_0xebe5('0x3a')]({'UserId':_0x9d2758[_0xebe5('0x59')][_0xebe5('0x62')],'read1stAt':_['isNil'](_0x4fdb49[_0xebe5('0x65')])?moment()[_0xebe5('0x60')](_0xebe5('0x61')):undefined});}return null;})[_0xebe5('0x23')](function(_0x759fea){if(_0x759fea){_0x283c40[_0xebe5('0x66')]=_0x759fea[_0xebe5('0x67')]({'plain':!![]});interaction_log[_0xebe5('0x24')](_0xebe5('0x68'),_0x9d2758[_0xebe5('0x69')]['id'],_0x9d2758[_0xebe5('0x69')][_0xebe5('0x3d')],_0x9d2758['user'][_0xebe5('0x6a')],_0x283c40['interaction']['id'],_0x9d2758[_0xebe5('0x59')]?JSON[_0xebe5('0x6b')](_0x9d2758[_0xebe5('0x59')]):_0xebe5('0x6c'));return respondWithRpcPromise('AcceptMessage',_0xebe5('0x6d'),_0x283c40);}return null;})[_0xebe5('0x23')](function(_0xb12a92){var _0x36d9bf=_0xebe5('0x6e')+_0xb12a92[_0xebe5('0x2b')][_0xebe5('0x6f')];return db[_0xebe5('0x70')][_0xebe5('0x46')](_0x36d9bf,{'type':db[_0xebe5('0x71')][_0xebe5('0x72')][_0xebe5('0x73')],'raw':!![]})[_0xebe5('0x23')](function(_0x5242b5){return _0x5242b5;});})[_0xebe5('0x23')](function(_0x3b3c4c){if(_0x3b3c4c){_0x283c40[_0xebe5('0x2b')][_0xebe5('0x74')]=_0x3b3c4c[0x0];if(!_0x9d2758[_0xebe5('0x59')][_0xebe5('0x62')])return;return db[_0xebe5('0x75')][_0xebe5('0x57')]({'where':{'id':_0x9d2758[_0xebe5('0x59')][_0xebe5('0x62')],'role':_0xebe5('0x63')},'attributes':['id',_0xebe5('0x3d'),_0xebe5('0x76'),_0xebe5('0x77'),_0xebe5('0x78')],'raw':!![]});}return null;})['then'](function(_0x15faf7){if(!_0x15faf7)return null;_0x283c40[_0xebe5('0x2b')][_0xebe5('0x63')]=_0x15faf7;return _0x283c40;})['then'](function(_0x5e453f){if(_0x5e453f){if(_0x9d2758['body']['manual']){_0x283c40[_0xebe5('0x2b')][_0xebe5('0x79')]=util[_0xebe5('0x60')]('SIP/%s',_0x9d2758[_0xebe5('0x69')][_0xebe5('0x3d')]);_0x283c40['message']['channel']=_0x283c40['channel'];_0x283c40['message'][_0xebe5('0x7a')]=_0x283c40[_0xebe5('0x7b')];_0x283c40['message']['event']=_0xebe5('0x5d');return respondWithRpcPromise(_0xebe5('0x7c'),_0xebe5('0x7c'),{'event':_0xebe5('0x7d'),'message':_0x283c40[_0xebe5('0x2b')]},client9002)[_0xebe5('0x23')](function(){return _0x283c40;});}return _0x283c40;}return null;})['then'](respondWithResult(_0x42e97e,null))[_0xebe5('0x2d')](handleError(_0x42e97e,null));};var interaction_log=require(_0xebe5('0x14'))('whatsapp-interactions');exports[_0xebe5('0x38')]=function(_0xf0a802,_0x3c0955,_0x33701e){var _0x1d7fa1={'agent':{},'channel':'whatsapp'};if(_0xf0a802[_0xebe5('0x59')]['id']){delete _0xf0a802[_0xebe5('0x59')]['id'];}_0xf0a802[_0xebe5('0x59')][_0xebe5('0x62')]=_0xf0a802[_0xebe5('0x59')][_0xebe5('0x62')]||_0xf0a802[_0xebe5('0x69')]['id'];_0x1d7fa1['agent']['id']=_0xf0a802[_0xebe5('0x59')][_0xebe5('0x62')];return db[_0xebe5('0x41')]['find']({'where':{'id':_0xf0a802[_0xebe5('0x5a')]['id'],'UserId':null}})[_0xebe5('0x23')](handleEntityNotFound(_0x3c0955,null))['then'](function(_0x30f632){if(_0x30f632){_0x1d7fa1[_0xebe5('0x2b')]=_0x30f632[_0xebe5('0x67')]({'plain':!![]});return db[_0xebe5('0x7e')][_0xebe5('0x57')]({'where':{'id':_0x30f632[_0xebe5('0x64')]}});}return null;})[_0xebe5('0x23')](handleEntityNotFound(_0x3c0955,null))[_0xebe5('0x23')](function(_0xd2b0ca){if(_0xd2b0ca){_0x1d7fa1[_0xebe5('0x66')]=_0xd2b0ca[_0xebe5('0x67')]({'plain':!![]});interaction_log[_0xebe5('0x24')](_0xebe5('0x7f'),_0xf0a802[_0xebe5('0x69')]['id'],_0xf0a802[_0xebe5('0x69')]['name'],_0xf0a802[_0xebe5('0x69')]['role'],_0x1d7fa1['interaction']['id'],_0xf0a802[_0xebe5('0x59')]?JSON['stringify'](_0xf0a802[_0xebe5('0x59')]):'null');return respondWithRpcPromise(_0xebe5('0x80'),_0xebe5('0x81'),_0x1d7fa1);}return null;})['then'](function(_0x5a5fcf){var _0x131b59='SELECT\x20*\x20FROM\x20cm_contacts\x20WHERE\x20id\x20=\x20'+_0x5a5fcf[_0xebe5('0x2b')][_0xebe5('0x6f')];return db[_0xebe5('0x70')]['query'](_0x131b59,{'type':db[_0xebe5('0x71')]['QueryTypes'][_0xebe5('0x73')],'raw':!![]})[_0xebe5('0x23')](function(_0x293aa1){return _0x293aa1;});})[_0xebe5('0x23')](function(_0x3a0bf0){if(_0x3a0bf0){_0x1d7fa1[_0xebe5('0x2b')][_0xebe5('0x74')]=_0x3a0bf0[0x0];if(!_0xf0a802[_0xebe5('0x59')][_0xebe5('0x62')])return;return db['User'][_0xebe5('0x57')]({'where':{'id':_0xf0a802[_0xebe5('0x59')][_0xebe5('0x62')],'role':_0xebe5('0x63')},'attributes':['id',_0xebe5('0x3d'),_0xebe5('0x76'),_0xebe5('0x77'),_0xebe5('0x78')],'raw':!![]});}return null;})['then'](function(_0x39bfb4){if(!_0x39bfb4)return null;_0x1d7fa1[_0xebe5('0x2b')]['agent']=_0x39bfb4;return _0x1d7fa1;})['then'](function(_0x19a2b2){if(_0x19a2b2){_0x19a2b2[_0xebe5('0x2b')][_0xebe5('0x79')]=util[_0xebe5('0x60')]('SIP/%s',_0xf0a802[_0xebe5('0x69')][_0xebe5('0x3d')]);_0x19a2b2['message']['channel']=_0x1d7fa1['channel'];_0x19a2b2[_0xebe5('0x2b')][_0xebe5('0x7a')]=_0x1d7fa1[_0xebe5('0x7b')];_0x19a2b2[_0xebe5('0x2b')][_0xebe5('0x82')]=_0xebe5('0x38');respondWithRpcPromise(_0xebe5('0x7c'),_0xebe5('0x7c'),{'event':_0xebe5('0x83'),'message':_0x19a2b2[_0xebe5('0x2b')]},client9002);return _0x1d7fa1;}return null;})['then'](respondWithResult(_0x3c0955,null))[_0xebe5('0x2d')](handleError(_0x3c0955,null));};exports['status']=function(_0x4007ec,_0x79d724,_0x1c6d91){if(_0x4007ec[_0xebe5('0x59')]['id']){delete _0x4007ec[_0xebe5('0x59')]['id'];}var _0x2cab36;return db[_0xebe5('0x41')][_0xebe5('0x57')]({'where':{'id':_0x4007ec[_0xebe5('0x5a')]['id']}})[_0xebe5('0x23')](handleEntityNotFound(_0x79d724,null))[_0xebe5('0x23')](function(_0x3c6c96){if(_0x3c6c96){_0x2cab36=_0x3c6c96;return db[_0xebe5('0x84')]['find']({'where':{'id':_0x3c6c96[_0xebe5('0x85')]}});}})[_0xebe5('0x23')](handleEntityNotFound(_0x79d724,null))[_0xebe5('0x23')](function(_0x1986e0){if(_0x1986e0){logger[_0xebe5('0x26')]('WhatsppMessage,\x20%s,\x20%s,\x20%s',_0xebe5('0x35'),'received\x20delivery\x20report\x20from',_0x1986e0[_0xebe5('0x44')],util[_0xebe5('0x86')](_0x4007ec[_0xebe5('0x59')],{'showHidden':![],'depth':null}));switch(_0x1986e0[_0xebe5('0x44')]){case'twilio':if(_0x4007ec['body']['MessageSid']&&_0x4007ec[_0xebe5('0x59')]['MessageSid']===_0x2cab36[_0xebe5('0x87')]&&_0x4007ec[_0xebe5('0x59')]['MessageStatus']&&_0x4007ec[_0xebe5('0x59')]['MessageStatus']==='read'){return _0x2cab36[_0xebe5('0x3a')]({'read':!![]});}else{logger[_0xebe5('0x28')](_0xebe5('0x88'),_0xebe5('0x35'),'twilio',util[_0xebe5('0x86')](_0x4007ec[_0xebe5('0x59')],{'showHidden':![],'depth':null}));}break;}return _0x2cab36;}})[_0xebe5('0x23')](respondWithResult(_0x79d724,null))[_0xebe5('0x2d')](handleError(_0x79d724,null));}; \ No newline at end of file +var _0x0630=['keys','filters','intersection','model','attributes','fields','length','hasOwnProperty','order','sort','where','pick','filter','merge','VIRTUAL','options','includeAll','include','findAll','rows','show','params','find','create','body','destroy','describe','../../config/logger','whatsapp-interactions','accept','read','readAt','UserId','user','agent','get','WhatsappInteraction','WhatsappInteractionId','update','read1stAt','format','YYYY-MM-DD\x20HH:mm:ss','interaction','role','null','AcceptMessage','acceptMessage','SELECT\x20*\x20FROM\x20cm_contacts\x20WHERE\x20id\x20=\x20','ContactId','QueryTypes','SELECT','contact','fullname','email','internal','manual','SIP/%s','channel','motionChannel','event','EventManager','whatsapp','[WHATSAPPMESSAGE:REJECT]\x20id=%s\x20name=%s\x20role=%s\x20interaction=%s\x20body=%s','stringify','RejectMessage','rejectMessage','sequelize','Sequelize','User','rejectmessage','WhatsappAccount','WhatsappAccountId','WhatsppMessage,\x20%s,\x20%s,\x20%s','received\x20delivery\x20report\x20from','inspect','twilio','MessageSid','messageId','MessageStatus','WhatsappAccount,\x20%s,\x20%s,\x20%s','eml-format','rimraf','fast-json-patch','moment','mustache','util','sox','to-csv','fs-extra','lodash','squel','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','api','../../config/utils','redis','defaults','socket.io-emitter','register','jayson/promise','client','http','request','info','WhatsappMessage,\x20%s,\x20%s','request\x20sent','debug','WhatsappMessage,\x20%s,\x20%s,\x20%s','error','code','message','catch','sendStatus','status','offset','undefined','count','limit','Content-Range','json','apply','reject','save','then','end','stack','name','send','map','WhatsappMessage','rawAttributes','fieldName','type','key','query'];(function(_0x2a2cf6,_0x1f1e78){var _0x4fb178=function(_0x50f1d8){while(--_0x50f1d8){_0x2a2cf6['push'](_0x2a2cf6['shift']());}};_0x4fb178(++_0x1f1e78);}(_0x0630,0xdc));var _0x0063=function(_0x7c629b,_0xfd95c1){_0x7c629b=_0x7c629b-0x0;var _0x50ecd5=_0x0630[_0x7c629b];return _0x50ecd5;};'use strict';var emlformat=require(_0x0063('0x0'));var rimraf=require(_0x0063('0x1'));var zipdir=require('zip-dir');var jsonpatch=require(_0x0063('0x2'));var rp=require('request-promise');var moment=require(_0x0063('0x3'));var BPromise=require('bluebird');var Mustache=require(_0x0063('0x4'));var util=require(_0x0063('0x5'));var path=require('path');var sox=require(_0x0063('0x6'));var csv=require(_0x0063('0x7'));var ejs=require('ejs');var fs=require('fs');var fs_extra=require(_0x0063('0x8'));var _=require(_0x0063('0x9'));var squel=require(_0x0063('0xa'));var crypto=require('crypto');var jsforce=require('jsforce');var deskjs=require('desk.js');var toCsv=require(_0x0063('0x7'));var querystring=require(_0x0063('0xb'));var Papa=require(_0x0063('0xc'));var Redis=require(_0x0063('0xd'));var authService=require(_0x0063('0xe'));var qs=require(_0x0063('0xf'));var as=require(_0x0063('0x10'));var hardwareService=require(_0x0063('0x11'));var logger=require('../../config/logger')(_0x0063('0x12'));var utils=require(_0x0063('0x13'));var config=require('../../config/environment');var licenseUtil=require('../../config/license/util');var db=require('../../mysqldb')['db'];config[_0x0063('0x14')]=_[_0x0063('0x15')](config[_0x0063('0x14')],{'host':'localhost','port':0x18eb});var socket=require(_0x0063('0x16'))(new Redis(config['redis']));require('./whatsappMessage.socket')[_0x0063('0x17')](socket);var jayson=require(_0x0063('0x18'));var client=jayson[_0x0063('0x19')][_0x0063('0x1a')]({'port':0x232c});var client9002=jayson[_0x0063('0x19')][_0x0063('0x1a')]({'port':0x232a});function respondWithRpcPromise(_0x4df0ff,_0xc62fec,_0x2180c8,_0x4a10a5){return new BPromise(function(_0x1bf5dc,_0x18d9e1){var _0x5d27a8=_0x4a10a5||client;return _0x5d27a8[_0x0063('0x1b')](_0x4df0ff,_0x2180c8)['then'](function(_0xc975ed){logger[_0x0063('0x1c')](_0x0063('0x1d'),_0xc62fec,_0x0063('0x1e'));logger[_0x0063('0x1f')](_0x0063('0x20'),_0xc62fec,_0x0063('0x1e'),JSON['stringify'](_0xc975ed));if(_0xc975ed['error']){if(_0xc975ed[_0x0063('0x21')][_0x0063('0x22')]===0x1f4){logger[_0x0063('0x21')](_0x0063('0x1d'),_0xc62fec,_0xc975ed[_0x0063('0x21')][_0x0063('0x23')]);return _0x18d9e1(_0xc975ed[_0x0063('0x21')][_0x0063('0x23')]);}logger[_0x0063('0x21')](_0x0063('0x1d'),_0xc62fec,_0xc975ed[_0x0063('0x21')][_0x0063('0x23')]);return _0x1bf5dc(_0xc975ed['error']['message']);}else{logger[_0x0063('0x1c')]('WhatsappMessage,\x20%s,\x20%s',_0xc62fec,_0x0063('0x1e'));_0x1bf5dc(_0xc975ed['result'][_0x0063('0x23')]);}})[_0x0063('0x24')](function(_0x352686){logger['error'](_0x0063('0x1d'),_0xc62fec,_0x352686);_0x18d9e1(_0x352686);});});}function respondWithStatusCode(_0x2a2fd4,_0x5d9474){_0x5d9474=_0x5d9474||0xcc;return function(_0x17e7ca){if(_0x17e7ca){return _0x2a2fd4[_0x0063('0x25')](_0x5d9474);}return _0x2a2fd4[_0x0063('0x26')](_0x5d9474)['end']();};}function respondWithResult(_0x45305e,_0x206539){_0x206539=_0x206539||0xc8;return function(_0x430046){if(_0x430046){return _0x45305e[_0x0063('0x26')](_0x206539)['json'](_0x430046);}};}function respondWithFilteredResult(_0x3df7af,_0x2997cb){return function(_0x58d680){if(_0x58d680){var _0x2bc745=typeof _0x2997cb[_0x0063('0x27')]===_0x0063('0x28')&&typeof _0x2997cb['limit']===_0x0063('0x28');var _0x5d2cec=_0x58d680[_0x0063('0x29')];var _0x2d0659=_0x2bc745?0x0:_0x2997cb[_0x0063('0x27')];var _0x36516f=_0x2bc745?_0x58d680[_0x0063('0x29')]:_0x2997cb['offset']+_0x2997cb[_0x0063('0x2a')];var _0x5c1c1e;if(_0x36516f>=_0x5d2cec){_0x36516f=_0x5d2cec;_0x5c1c1e=0xc8;}else{_0x5c1c1e=0xce;}_0x3df7af['status'](_0x5c1c1e);return _0x3df7af['set'](_0x0063('0x2b'),_0x2d0659+'-'+_0x36516f+'/'+_0x5d2cec)[_0x0063('0x2c')](_0x58d680);}return null;};}function patchUpdates(_0x33c1d4){return function(_0x262f16){try{jsonpatch[_0x0063('0x2d')](_0x262f16,_0x33c1d4,!![]);}catch(_0x2d5abf){return BPromise[_0x0063('0x2e')](_0x2d5abf);}return _0x262f16[_0x0063('0x2f')]();};}function saveUpdates(_0x23c7c7,_0x2c9303){return function(_0x3397ee){if(_0x3397ee){return _0x3397ee['update'](_0x23c7c7)[_0x0063('0x30')](function(_0x408775){return _0x408775;});}return null;};}function removeEntity(_0x16b134,_0x3313ec){return function(_0x38c65d){if(_0x38c65d){return _0x38c65d['destroy']()[_0x0063('0x30')](function(){_0x16b134[_0x0063('0x26')](0xcc)[_0x0063('0x31')]();});}};}function handleEntityNotFound(_0x48d906,_0x131bc6){return function(_0x114988){if(!_0x114988){_0x48d906[_0x0063('0x25')](0x194);}return _0x114988;};}function handleError(_0x3b5a54,_0x2b87ff){_0x2b87ff=_0x2b87ff||0x1f4;return function(_0x2ca85f){logger['error'](_0x2ca85f[_0x0063('0x32')]);if(_0x2ca85f[_0x0063('0x33')]){delete _0x2ca85f[_0x0063('0x33')];}_0x3b5a54['status'](_0x2b87ff)[_0x0063('0x34')](_0x2ca85f);};}exports['index']=function(_0x5e1efe,_0x1ba980){var _0x230514={},_0x3a9985={},_0x26e961={'count':0x0,'rows':[]};var _0x52328a=_[_0x0063('0x35')](db[_0x0063('0x36')][_0x0063('0x37')],function(_0x3093ec){return{'name':_0x3093ec[_0x0063('0x38')],'type':_0x3093ec[_0x0063('0x39')][_0x0063('0x3a')]};});_0x3a9985['model']=_[_0x0063('0x35')](_0x52328a,_0x0063('0x33'));_0x3a9985[_0x0063('0x3b')]=_[_0x0063('0x3c')](_0x5e1efe[_0x0063('0x3b')]);_0x3a9985[_0x0063('0x3d')]=_[_0x0063('0x3e')](_0x3a9985[_0x0063('0x3f')],_0x3a9985[_0x0063('0x3b')]);_0x230514[_0x0063('0x40')]=_[_0x0063('0x3e')](_0x3a9985['model'],qs[_0x0063('0x41')](_0x5e1efe[_0x0063('0x3b')][_0x0063('0x41')]));_0x230514[_0x0063('0x40')]=_0x230514[_0x0063('0x40')][_0x0063('0x42')]?_0x230514['attributes']:_0x3a9985['model'];if(!_0x5e1efe[_0x0063('0x3b')][_0x0063('0x43')]('nolimit')){_0x230514[_0x0063('0x2a')]=qs[_0x0063('0x2a')](_0x5e1efe[_0x0063('0x3b')][_0x0063('0x2a')]);_0x230514[_0x0063('0x27')]=qs[_0x0063('0x27')](_0x5e1efe[_0x0063('0x3b')][_0x0063('0x27')]);}_0x230514[_0x0063('0x44')]=qs[_0x0063('0x45')](_0x5e1efe['query'][_0x0063('0x45')]);_0x230514[_0x0063('0x46')]=qs[_0x0063('0x3d')](_[_0x0063('0x47')](_0x5e1efe['query'],_0x3a9985[_0x0063('0x3d')]),_0x52328a);if(_0x5e1efe['query'][_0x0063('0x48')]){_0x230514[_0x0063('0x46')]=_[_0x0063('0x49')](_0x230514[_0x0063('0x46')],{'$or':_['map'](_0x52328a,function(_0x544ae2){if(_0x544ae2[_0x0063('0x39')]!==_0x0063('0x4a')){var _0x564517={};_0x564517[_0x544ae2[_0x0063('0x33')]]={'$like':'%'+_0x5e1efe[_0x0063('0x3b')][_0x0063('0x48')]+'%'};return _0x564517;}})});}_0x230514=_[_0x0063('0x49')]({},_0x230514,_0x5e1efe[_0x0063('0x4b')]);var _0x803243={'where':_0x230514[_0x0063('0x46')]};return db[_0x0063('0x36')][_0x0063('0x29')](_0x803243)['then'](function(_0x56ff68){_0x26e961[_0x0063('0x29')]=_0x56ff68;if(_0x5e1efe[_0x0063('0x3b')][_0x0063('0x4c')]){_0x230514[_0x0063('0x4d')]=[{'all':!![]}];}return db[_0x0063('0x36')][_0x0063('0x4e')](_0x230514);})[_0x0063('0x30')](function(_0x2cc38d){_0x26e961[_0x0063('0x4f')]=_0x2cc38d;return _0x26e961;})[_0x0063('0x30')](respondWithFilteredResult(_0x1ba980,_0x230514))[_0x0063('0x24')](handleError(_0x1ba980,null));};exports[_0x0063('0x50')]=function(_0x2f7173,_0x427b74){var _0x1c258d={'raw':!![],'where':{'id':_0x2f7173[_0x0063('0x51')]['id']}},_0xf8dc52={};_0xf8dc52[_0x0063('0x3f')]=_[_0x0063('0x3c')](db['WhatsappMessage'][_0x0063('0x37')]);_0xf8dc52['query']=_[_0x0063('0x3c')](_0x2f7173[_0x0063('0x3b')]);_0xf8dc52[_0x0063('0x3d')]=_[_0x0063('0x3e')](_0xf8dc52[_0x0063('0x3f')],_0xf8dc52[_0x0063('0x3b')]);_0x1c258d[_0x0063('0x40')]=_['intersection'](_0xf8dc52[_0x0063('0x3f')],qs[_0x0063('0x41')](_0x2f7173[_0x0063('0x3b')][_0x0063('0x41')]));_0x1c258d[_0x0063('0x40')]=_0x1c258d[_0x0063('0x40')][_0x0063('0x42')]?_0x1c258d[_0x0063('0x40')]:_0xf8dc52[_0x0063('0x3f')];if(_0x2f7173[_0x0063('0x3b')][_0x0063('0x4c')]){_0x1c258d[_0x0063('0x4d')]=[{'all':!![]}];}_0x1c258d=_[_0x0063('0x49')]({},_0x1c258d,_0x2f7173[_0x0063('0x4b')]);return db[_0x0063('0x36')][_0x0063('0x52')](_0x1c258d)[_0x0063('0x30')](handleEntityNotFound(_0x427b74,null))[_0x0063('0x30')](respondWithResult(_0x427b74,null))['catch'](handleError(_0x427b74,null));};exports[_0x0063('0x53')]=function(_0x447dda,_0x44b255){return db[_0x0063('0x36')]['create'](_0x447dda[_0x0063('0x54')],{})[_0x0063('0x30')](respondWithResult(_0x44b255,0xc9))[_0x0063('0x24')](handleError(_0x44b255,null));};exports['update']=function(_0x3fdea1,_0x1eeda2){if(_0x3fdea1['body']['id']){delete _0x3fdea1[_0x0063('0x54')]['id'];}return db['WhatsappMessage']['find']({'where':{'id':_0x3fdea1[_0x0063('0x51')]['id']}})[_0x0063('0x30')](handleEntityNotFound(_0x1eeda2,null))[_0x0063('0x30')](saveUpdates(_0x3fdea1[_0x0063('0x54')],null))[_0x0063('0x30')](respondWithResult(_0x1eeda2,null))['catch'](handleError(_0x1eeda2,null));};exports[_0x0063('0x55')]=function(_0x4961d6,_0xb4babe){return db[_0x0063('0x36')][_0x0063('0x52')]({'where':{'id':_0x4961d6[_0x0063('0x51')]['id']}})[_0x0063('0x30')](handleEntityNotFound(_0xb4babe,null))[_0x0063('0x30')](removeEntity(_0xb4babe,null))['catch'](handleError(_0xb4babe,null));};exports[_0x0063('0x56')]=function(_0x1f29d9,_0x562f21){return db[_0x0063('0x36')][_0x0063('0x56')]()[_0x0063('0x30')](respondWithResult(_0x562f21,null))[_0x0063('0x24')](handleError(_0x562f21,null));};var interaction_log=require(_0x0063('0x57'))(_0x0063('0x58'));exports[_0x0063('0x59')]=function(_0x253612,_0x4f5702,_0x184f6c){var _0x15c2b2={'agent':{},'channel':'whatsapp'};if(_0x253612['body']['id']){delete _0x253612[_0x0063('0x54')]['id'];}_0x253612['body'][_0x0063('0x5a')]=!![];_0x253612[_0x0063('0x54')][_0x0063('0x5b')]=moment()['format']('YYYY-MM-DD\x20HH:mm:ss');_0x253612[_0x0063('0x54')][_0x0063('0x5c')]=_0x253612[_0x0063('0x54')][_0x0063('0x5c')]||_0x253612[_0x0063('0x5d')]['id'];_0x15c2b2[_0x0063('0x5e')]['id']=_0x253612[_0x0063('0x54')]['UserId'];return db['WhatsappMessage'][_0x0063('0x52')]({'where':{'id':_0x253612[_0x0063('0x51')]['id'],'UserId':null}})[_0x0063('0x30')](handleEntityNotFound(_0x4f5702,null))[_0x0063('0x30')](saveUpdates(_0x253612['body'],null))['then'](function(_0x3fdcc8){if(_0x3fdcc8){_0x15c2b2['message']=_0x3fdcc8[_0x0063('0x5f')]({'plain':!![]});return db[_0x0063('0x60')][_0x0063('0x52')]({'where':{'id':_0x3fdcc8[_0x0063('0x61')]}});}return null;})[_0x0063('0x30')](handleEntityNotFound(_0x4f5702,null))[_0x0063('0x30')](function(_0x31942f){if(_0x31942f){return _0x31942f[_0x0063('0x62')]({'UserId':_0x253612[_0x0063('0x54')][_0x0063('0x5c')],'read1stAt':_['isNil'](_0x31942f[_0x0063('0x63')])?moment()[_0x0063('0x64')](_0x0063('0x65')):undefined});}return null;})[_0x0063('0x30')](function(_0x57e062){if(_0x57e062){_0x15c2b2[_0x0063('0x66')]=_0x57e062['get']({'plain':!![]});interaction_log['info']('[WHATSAPPMESSAGE:ACCEPT]\x20id=%s\x20name=%s\x20role=%s\x20interaction=%s\x20body=%s',_0x253612[_0x0063('0x5d')]['id'],_0x253612['user'][_0x0063('0x33')],_0x253612[_0x0063('0x5d')][_0x0063('0x67')],_0x15c2b2[_0x0063('0x66')]['id'],_0x253612[_0x0063('0x54')]?JSON['stringify'](_0x253612[_0x0063('0x54')]):_0x0063('0x68'));return respondWithRpcPromise(_0x0063('0x69'),_0x0063('0x6a'),_0x15c2b2);}return null;})[_0x0063('0x30')](function(_0x608b33){var _0x19a399=_0x0063('0x6b')+_0x608b33[_0x0063('0x23')][_0x0063('0x6c')];return db['sequelize']['query'](_0x19a399,{'type':db['Sequelize'][_0x0063('0x6d')][_0x0063('0x6e')],'raw':!![]})[_0x0063('0x30')](function(_0x27f8fb){return _0x27f8fb;});})['then'](function(_0xc03844){if(_0xc03844){_0x15c2b2['message'][_0x0063('0x6f')]=_0xc03844[0x0];if(!_0x253612['body']['UserId'])return;return db['User'][_0x0063('0x52')]({'where':{'id':_0x253612[_0x0063('0x54')]['UserId'],'role':_0x0063('0x5e')},'attributes':['id',_0x0063('0x33'),_0x0063('0x70'),_0x0063('0x71'),_0x0063('0x72')],'raw':!![]});}return null;})[_0x0063('0x30')](function(_0x3e0fda){if(!_0x3e0fda)return null;_0x15c2b2[_0x0063('0x23')][_0x0063('0x5e')]=_0x3e0fda;return _0x15c2b2;})['then'](function(_0x1e781c){if(_0x1e781c){if(_0x253612['body'][_0x0063('0x73')]){_0x15c2b2[_0x0063('0x23')]['interface']=util['format'](_0x0063('0x74'),_0x253612['user']['name']);_0x15c2b2[_0x0063('0x23')][_0x0063('0x75')]=_0x15c2b2[_0x0063('0x75')];_0x15c2b2[_0x0063('0x23')][_0x0063('0x76')]=_0x15c2b2[_0x0063('0x75')];_0x15c2b2[_0x0063('0x23')][_0x0063('0x77')]=_0x0063('0x59');return respondWithRpcPromise('EventManager',_0x0063('0x78'),{'event':'acceptmessage','message':_0x15c2b2[_0x0063('0x23')]},client9002)['then'](function(){return _0x15c2b2;});}return _0x15c2b2;}return null;})[_0x0063('0x30')](respondWithResult(_0x4f5702,null))[_0x0063('0x24')](handleError(_0x4f5702,null));};var interaction_log=require(_0x0063('0x57'))(_0x0063('0x58'));exports[_0x0063('0x2e')]=function(_0x4874d0,_0x8f22a4,_0x513baa){var _0x24690f={'agent':{},'channel':_0x0063('0x79')};if(_0x4874d0['body']['id']){delete _0x4874d0[_0x0063('0x54')]['id'];}_0x4874d0[_0x0063('0x54')]['UserId']=_0x4874d0['body'][_0x0063('0x5c')]||_0x4874d0[_0x0063('0x5d')]['id'];_0x24690f[_0x0063('0x5e')]['id']=_0x4874d0[_0x0063('0x54')][_0x0063('0x5c')];return db['WhatsappMessage'][_0x0063('0x52')]({'where':{'id':_0x4874d0[_0x0063('0x51')]['id'],'UserId':null}})[_0x0063('0x30')](handleEntityNotFound(_0x8f22a4,null))[_0x0063('0x30')](function(_0x5cc3f){if(_0x5cc3f){_0x24690f[_0x0063('0x23')]=_0x5cc3f['get']({'plain':!![]});return db[_0x0063('0x60')][_0x0063('0x52')]({'where':{'id':_0x5cc3f[_0x0063('0x61')]}});}return null;})[_0x0063('0x30')](handleEntityNotFound(_0x8f22a4,null))[_0x0063('0x30')](function(_0x491fb9){if(_0x491fb9){_0x24690f[_0x0063('0x66')]=_0x491fb9[_0x0063('0x5f')]({'plain':!![]});interaction_log[_0x0063('0x1c')](_0x0063('0x7a'),_0x4874d0[_0x0063('0x5d')]['id'],_0x4874d0[_0x0063('0x5d')][_0x0063('0x33')],_0x4874d0[_0x0063('0x5d')][_0x0063('0x67')],_0x24690f['interaction']['id'],_0x4874d0[_0x0063('0x54')]?JSON[_0x0063('0x7b')](_0x4874d0[_0x0063('0x54')]):_0x0063('0x68'));return respondWithRpcPromise(_0x0063('0x7c'),_0x0063('0x7d'),_0x24690f);}return null;})[_0x0063('0x30')](function(_0x4cc5ba){var _0x367b02=_0x0063('0x6b')+_0x4cc5ba[_0x0063('0x23')][_0x0063('0x6c')];return db[_0x0063('0x7e')][_0x0063('0x3b')](_0x367b02,{'type':db[_0x0063('0x7f')][_0x0063('0x6d')][_0x0063('0x6e')],'raw':!![]})[_0x0063('0x30')](function(_0x3b6258){return _0x3b6258;});})[_0x0063('0x30')](function(_0x24afb4){if(_0x24afb4){_0x24690f[_0x0063('0x23')][_0x0063('0x6f')]=_0x24afb4[0x0];if(!_0x4874d0[_0x0063('0x54')][_0x0063('0x5c')])return;return db[_0x0063('0x80')]['find']({'where':{'id':_0x4874d0[_0x0063('0x54')]['UserId'],'role':_0x0063('0x5e')},'attributes':['id',_0x0063('0x33'),_0x0063('0x70'),_0x0063('0x71'),_0x0063('0x72')],'raw':!![]});}return null;})[_0x0063('0x30')](function(_0x3dd448){if(!_0x3dd448)return null;_0x24690f[_0x0063('0x23')][_0x0063('0x5e')]=_0x3dd448;return _0x24690f;})['then'](function(_0x138ebf){if(_0x138ebf){_0x138ebf[_0x0063('0x23')]['interface']=util[_0x0063('0x64')](_0x0063('0x74'),_0x4874d0['user'][_0x0063('0x33')]);_0x138ebf[_0x0063('0x23')][_0x0063('0x75')]=_0x24690f[_0x0063('0x75')];_0x138ebf[_0x0063('0x23')]['motionChannel']=_0x24690f[_0x0063('0x75')];_0x138ebf[_0x0063('0x23')][_0x0063('0x77')]=_0x0063('0x2e');respondWithRpcPromise('EventManager',_0x0063('0x78'),{'event':_0x0063('0x81'),'message':_0x138ebf['message']},client9002);return _0x24690f;}return null;})[_0x0063('0x30')](respondWithResult(_0x8f22a4,null))['catch'](handleError(_0x8f22a4,null));};exports[_0x0063('0x26')]=function(_0x4f284a,_0x30c3d7,_0x3139d6){if(_0x4f284a[_0x0063('0x54')]['id']){delete _0x4f284a[_0x0063('0x54')]['id'];}var _0x237da5;return db[_0x0063('0x36')]['find']({'where':{'id':_0x4f284a['params']['id']}})['then'](handleEntityNotFound(_0x30c3d7,null))[_0x0063('0x30')](function(_0x2c604e){if(_0x2c604e){_0x237da5=_0x2c604e;return db[_0x0063('0x82')]['find']({'where':{'id':_0x2c604e[_0x0063('0x83')]}});}})[_0x0063('0x30')](handleEntityNotFound(_0x30c3d7,null))[_0x0063('0x30')](function(_0x32fd7c){if(_0x32fd7c){logger[_0x0063('0x1f')](_0x0063('0x84'),_0x0063('0x26'),_0x0063('0x85'),_0x32fd7c[_0x0063('0x39')],util[_0x0063('0x86')](_0x4f284a[_0x0063('0x54')],{'showHidden':![],'depth':null}));switch(_0x32fd7c[_0x0063('0x39')]){case _0x0063('0x87'):if(_0x4f284a[_0x0063('0x54')][_0x0063('0x88')]&&_0x4f284a[_0x0063('0x54')][_0x0063('0x88')]===_0x237da5[_0x0063('0x89')]&&_0x4f284a[_0x0063('0x54')]['MessageStatus']&&_0x4f284a[_0x0063('0x54')][_0x0063('0x8a')]==='read'){return _0x237da5[_0x0063('0x62')]({'read':!![]});}else{logger['error'](_0x0063('0x8b'),'status','twilio',util['inspect'](_0x4f284a[_0x0063('0x54')],{'showHidden':![],'depth':null}));}break;}return _0x237da5;}})['then'](respondWithResult(_0x30c3d7,null))['catch'](handleError(_0x30c3d7,null));}; \ No newline at end of file diff --git a/server/api/whatsappMessage/whatsappMessage.events.js b/server/api/whatsappMessage/whatsappMessage.events.js index 523a15d..1009f8c 100644 --- a/server/api/whatsappMessage/whatsappMessage.events.js +++ b/server/api/whatsappMessage/whatsappMessage.events.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x4227=['exports','events','setMaxListeners','update','remove','emit','hasOwnProperty','hook'];(function(_0x280a97,_0x1c3a99){var _0x54e2a2=function(_0x514939){while(--_0x514939){_0x280a97['push'](_0x280a97['shift']());}};_0x54e2a2(++_0x1c3a99);}(_0x4227,0x89));var _0x7422=function(_0x26a0d4,_0x24a9fa){_0x26a0d4=_0x26a0d4-0x0;var _0x4bbd51=_0x4227[_0x26a0d4];return _0x4bbd51;};'use strict';var EventEmitter=require(_0x7422('0x0'));var WhatsappMessage=require('../../mysqldb')['db']['WhatsappMessage'];var WhatsappMessageEvents=new EventEmitter();WhatsappMessageEvents[_0x7422('0x1')](0x0);var events={'afterCreate':'save','afterUpdate':_0x7422('0x2'),'afterDestroy':_0x7422('0x3')};function emitEvent(_0x3e69ca){return function(_0x57e279,_0x2de51f,_0x1cd829){WhatsappMessageEvents[_0x7422('0x4')](_0x3e69ca+':'+_0x57e279['id'],_0x57e279);WhatsappMessageEvents[_0x7422('0x4')](_0x3e69ca,_0x57e279);_0x1cd829(null);};}for(var e in events){if(events[_0x7422('0x5')](e)){var event=events[e];WhatsappMessage[_0x7422('0x6')](e,emitEvent(event));}}module[_0x7422('0x7')]=WhatsappMessageEvents; \ No newline at end of file +var _0xc2da=['emit','hasOwnProperty','hook','exports','events','WhatsappMessage','save','remove'];(function(_0x4eb517,_0x385479){var _0x30e9ed=function(_0x1825ef){while(--_0x1825ef){_0x4eb517['push'](_0x4eb517['shift']());}};_0x30e9ed(++_0x385479);}(_0xc2da,0x124));var _0xac2d=function(_0x7aeeb5,_0x37c8c2){_0x7aeeb5=_0x7aeeb5-0x0;var _0x581310=_0xc2da[_0x7aeeb5];return _0x581310;};'use strict';var EventEmitter=require(_0xac2d('0x0'));var WhatsappMessage=require('../../mysqldb')['db'][_0xac2d('0x1')];var WhatsappMessageEvents=new EventEmitter();WhatsappMessageEvents['setMaxListeners'](0x0);var events={'afterCreate':_0xac2d('0x2'),'afterUpdate':'update','afterDestroy':_0xac2d('0x3')};function emitEvent(_0xb261fc){return function(_0xff0fff,_0x332f28,_0x120263){WhatsappMessageEvents[_0xac2d('0x4')](_0xb261fc+':'+_0xff0fff['id'],_0xff0fff);WhatsappMessageEvents[_0xac2d('0x4')](_0xb261fc,_0xff0fff);_0x120263(null);};}for(var e in events){if(events[_0xac2d('0x5')](e)){var event=events[e];WhatsappMessage[_0xac2d('0x6')](e,emitEvent(event));}}module[_0xac2d('0x7')]=WhatsappMessageEvents; \ No newline at end of file diff --git a/server/api/whatsappMessage/whatsappMessage.model.js b/server/api/whatsappMessage/whatsappMessage.model.js index efec2b2..4ff00ef 100644 --- a/server/api/whatsappMessage/whatsappMessage.model.js +++ b/server/api/whatsappMessage/whatsappMessage.model.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xf2ab=['twilio','accountSid','authToken','phone','create','body','whatsapp:','/api/whatsapp/messages/','/status?token=','sid','WhatsappMessage,\x20%s,\x20%s,\x20%s','afterCreate','sinch','baseUrl','/whatsapp/v1/','POST','Bearer\x20','application/json','statuses','message_id','err','WhatsappMessage,\x20%s','finally','utf8mb4','utf8mb4_unicode_ci','lodash','util','../../config/logger','api','bluebird','request-promise','node-fetch','path','rimraf','../../config/environment','define','whatsapp_messages','messageId','fti_whatsapp_messages','FULLTEXT','models','get','direction','toLowerCase','out','secret','isNil','WhatsappInteraction','findOne','WhatsappInteractionId','then','update','createdAt','catch','error','WhatsappAccountId'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0xf2ab,0x1d9));var _0xbf2a=function(_0x65d6c7,_0x232cc7){_0x65d6c7=_0x65d6c7-0x0;var _0x3a1614=_0xf2ab[_0x65d6c7];return _0x3a1614;};'use strict';var _=require(_0xbf2a('0x0'));var util=require(_0xbf2a('0x1'));var logger=require(_0xbf2a('0x2'))(_0xbf2a('0x3'));var moment=require('moment');var BPromise=require(_0xbf2a('0x4'));var rp=require(_0xbf2a('0x5'));var fetch=require(_0xbf2a('0x6'));var fs=require('fs');var path=require(_0xbf2a('0x7'));var rimraf=require(_0xbf2a('0x8'));var config=require(_0xbf2a('0x9'));var attributes=require('./whatsappMessage.attributes');module['exports']=function(_0x2ea401,_0x4d8b7c){return _0x2ea401[_0xbf2a('0xa')]('WhatsappMessage',attributes,{'tableName':_0xbf2a('0xb'),'paranoid':![],'indexes':[{'name':'messageId','fields':[_0xbf2a('0xc')]},{'name':_0xbf2a('0xd'),'fields':['body'],'type':_0xbf2a('0xe')}],'timestamps':!![],'hooks':{'afterCreate':function(_0x44858c,_0x44eb0a,_0x4eb4d0){var _0x49f8b0=_0x2ea401[_0xbf2a('0xf')];var _0x1635db=_0x44858c[_0xbf2a('0x10')]({'plain':!![]});if(_0x1635db[_0xbf2a('0x11')][_0xbf2a('0x12')]()==='in'||_0x1635db['direction'][_0xbf2a('0x12')]()===_0xbf2a('0x13')&&!_0x1635db[_0xbf2a('0x14')]&&!_[_0xbf2a('0x15')](_0x1635db['UserId'])){_0x49f8b0[_0xbf2a('0x16')][_0xbf2a('0x17')]({'where':{'id':_0x1635db[_0xbf2a('0x18')]}})[_0xbf2a('0x19')](function(_0x40d696){if(_0x40d696){_0x40d696[_0xbf2a('0x1a')]({'lastMsgAt':_0x1635db[_0xbf2a('0x1b')],'lastMsgDirection':_0x1635db[_0xbf2a('0x11')][_0xbf2a('0x12')]()});}})[_0xbf2a('0x1c')](function(_0x19e79e){console[_0xbf2a('0x1d')](_0x19e79e);});}if(_0x1635db[_0xbf2a('0x11')]===_0xbf2a('0x13')&&!_0x1635db[_0xbf2a('0x14')]){var _0x4ef664;_0x49f8b0['WhatsappAccount']['find']({'where':{'id':_0x1635db[_0xbf2a('0x1e')]},'raw':!![]})[_0xbf2a('0x19')](function(_0x15e9f9){_0x4ef664=_0x15e9f9;if(_0x4ef664&&_0x4ef664['type']){switch(_0x4ef664['type']){case _0xbf2a('0x1f'):var _0x1fefb0=require(_0xbf2a('0x1f'));if(_0x4ef664[_0xbf2a('0x20')]&&_0x4ef664[_0xbf2a('0x21')]&&_0x4ef664[_0xbf2a('0x22')]){var _0x5954e8=new _0x1fefb0(_0x4ef664['accountSid'],_0x4ef664[_0xbf2a('0x21')]);_0x5954e8['messages'][_0xbf2a('0x23')]({'body':_0x1635db[_0xbf2a('0x24')],'to':_0xbf2a('0x25')+_0x1635db['phone'],'from':'whatsapp:'+_0x4ef664[_0xbf2a('0x22')],'statusCallback':_0x4ef664['remote']+_0xbf2a('0x26')+_0x1635db['id']+_0xbf2a('0x27')+_0x4ef664['token']})[_0xbf2a('0x19')](function(_0x3c2ba6){if(_0x3c2ba6[_0xbf2a('0x28')]){return _0x44858c['update']({'messageId':_0x3c2ba6['sid']});}})[_0xbf2a('0x1c')](function(_0x1c3293){logger[_0xbf2a('0x1d')](_0xbf2a('0x29'),_0xbf2a('0x2a'),'twilio',util['inspect'](_0x1c3293,{'showHidden':![],'depth':null}));});}else{logger[_0xbf2a('0x1d')](_0xbf2a('0x29'),_0xbf2a('0x2a'),_0xbf2a('0x1f'),'Missing\x20parameters:\x20phone,\x20accountSid\x20or\x20authToken');}break;case _0xbf2a('0x2b'):var _0x406cf4=_0x4ef664[_0xbf2a('0x20')];var _0x2bc0e8=_0x4ef664[_0xbf2a('0x21')];var _0x41e130=_0x4ef664[_0xbf2a('0x2c')]+_0xbf2a('0x2d')+_0x406cf4+'/messages/';var _0x23be27={'to':[_0x1635db['phone']],'message':{'type':'text','text':_0x1635db[_0xbf2a('0x24')]}};var _0x3f966c={'method':_0xbf2a('0x2e'),'uri':_0x41e130,'headers':{'Authorization':_0xbf2a('0x2f')+_0x2bc0e8,'Content-Type':_0xbf2a('0x30')},'body':_0x23be27,'json':!![]};rp(_0x3f966c)[_0xbf2a('0x19')](function(_0x3c0c1b){if(_0x3c0c1b[_0xbf2a('0x31')][0x0][_0xbf2a('0x32')]){return _0x44858c[_0xbf2a('0x1a')]({'messageId':_0x3c0c1b[_0xbf2a('0x31')][0x0][_0xbf2a('0x32')]});}})[_0xbf2a('0x1c')](function(_0x380cd3){logger[_0xbf2a('0x33')](_0xbf2a('0x34'),_0x380cd3);});break;}}})[_0xbf2a('0x35')](function(){_0x4eb4d0();});}else{_0x4eb4d0();}}},'charset':_0xbf2a('0x36'),'collate':_0xbf2a('0x37')});}; \ No newline at end of file +var _0x433a=['WhatsappMessage,\x20%s,\x20%s,\x20%s','afterCreate','inspect','Missing\x20parameters:\x20phone,\x20accountSid\x20or\x20authToken','sinch','baseUrl','/whatsapp/v1/','/messages/','text','POST','Bearer\x20','statuses','message_id','err','finally','utf8mb4','utf8mb4_unicode_ci','lodash','util','../../config/logger','moment','bluebird','request-promise','node-fetch','rimraf','../../config/environment','exports','define','WhatsappMessage','messageId','body','FULLTEXT','models','get','direction','toLowerCase','out','secret','UserId','WhatsappInteraction','findOne','WhatsappInteractionId','then','update','createdAt','error','WhatsappAccount','find','WhatsappAccountId','type','twilio','accountSid','authToken','phone','messages','create','whatsapp:','remote','/api/whatsapp/messages/','/status?token=','token','sid','catch'];(function(_0x5608a3,_0x5b33c5){var _0x1ed50a=function(_0x959171){while(--_0x959171){_0x5608a3['push'](_0x5608a3['shift']());}};_0x1ed50a(++_0x5b33c5);}(_0x433a,0x14c));var _0xa433=function(_0x26616c,_0x52b720){_0x26616c=_0x26616c-0x0;var _0x2b0766=_0x433a[_0x26616c];return _0x2b0766;};'use strict';var _=require(_0xa433('0x0'));var util=require(_0xa433('0x1'));var logger=require(_0xa433('0x2'))('api');var moment=require(_0xa433('0x3'));var BPromise=require(_0xa433('0x4'));var rp=require(_0xa433('0x5'));var fetch=require(_0xa433('0x6'));var fs=require('fs');var path=require('path');var rimraf=require(_0xa433('0x7'));var config=require(_0xa433('0x8'));var attributes=require('./whatsappMessage.attributes');module[_0xa433('0x9')]=function(_0x4117cb,_0x406fd6){return _0x4117cb[_0xa433('0xa')](_0xa433('0xb'),attributes,{'tableName':'whatsapp_messages','paranoid':![],'indexes':[{'name':_0xa433('0xc'),'fields':[_0xa433('0xc')]},{'name':'fti_whatsapp_messages','fields':[_0xa433('0xd')],'type':_0xa433('0xe')}],'timestamps':!![],'hooks':{'afterCreate':function(_0x21e1b3,_0x364115,_0x1715a4){var _0xfbf9c1=_0x4117cb[_0xa433('0xf')];var _0x3e57b7=_0x21e1b3[_0xa433('0x10')]({'plain':!![]});if(_0x3e57b7[_0xa433('0x11')]['toLowerCase']()==='in'||_0x3e57b7[_0xa433('0x11')][_0xa433('0x12')]()===_0xa433('0x13')&&!_0x3e57b7[_0xa433('0x14')]&&!_['isNil'](_0x3e57b7[_0xa433('0x15')])){_0xfbf9c1[_0xa433('0x16')][_0xa433('0x17')]({'where':{'id':_0x3e57b7[_0xa433('0x18')]}})[_0xa433('0x19')](function(_0x452f1e){if(_0x452f1e){_0x452f1e[_0xa433('0x1a')]({'lastMsgAt':_0x3e57b7[_0xa433('0x1b')],'lastMsgDirection':_0x3e57b7['direction'][_0xa433('0x12')]()});}})['catch'](function(_0x452aa4){console[_0xa433('0x1c')](_0x452aa4);});}if(_0x3e57b7[_0xa433('0x11')]===_0xa433('0x13')&&!_0x3e57b7[_0xa433('0x14')]){var _0x1bc01f;_0xfbf9c1[_0xa433('0x1d')][_0xa433('0x1e')]({'where':{'id':_0x3e57b7[_0xa433('0x1f')]},'raw':!![]})[_0xa433('0x19')](function(_0x304549){_0x1bc01f=_0x304549;if(_0x1bc01f&&_0x1bc01f[_0xa433('0x20')]){switch(_0x1bc01f[_0xa433('0x20')]){case _0xa433('0x21'):var _0x5f46a5=require('twilio');if(_0x1bc01f[_0xa433('0x22')]&&_0x1bc01f[_0xa433('0x23')]&&_0x1bc01f[_0xa433('0x24')]){var _0x378682=new _0x5f46a5(_0x1bc01f[_0xa433('0x22')],_0x1bc01f[_0xa433('0x23')]);_0x378682[_0xa433('0x25')][_0xa433('0x26')]({'body':_0x3e57b7[_0xa433('0xd')],'to':'whatsapp:'+_0x3e57b7[_0xa433('0x24')],'from':_0xa433('0x27')+_0x1bc01f[_0xa433('0x24')],'statusCallback':_0x1bc01f[_0xa433('0x28')]+_0xa433('0x29')+_0x3e57b7['id']+_0xa433('0x2a')+_0x1bc01f[_0xa433('0x2b')]})[_0xa433('0x19')](function(_0x55756c){if(_0x55756c['sid']){return _0x21e1b3[_0xa433('0x1a')]({'messageId':_0x55756c[_0xa433('0x2c')]});}})[_0xa433('0x2d')](function(_0x57994c){logger[_0xa433('0x1c')](_0xa433('0x2e'),_0xa433('0x2f'),_0xa433('0x21'),util[_0xa433('0x30')](_0x57994c,{'showHidden':![],'depth':null}));});}else{logger[_0xa433('0x1c')](_0xa433('0x2e'),_0xa433('0x2f'),_0xa433('0x21'),_0xa433('0x31'));}break;case _0xa433('0x32'):var _0x36ce46=_0x1bc01f[_0xa433('0x22')];var _0xea450a=_0x1bc01f[_0xa433('0x23')];var _0x3cc2c2=_0x1bc01f[_0xa433('0x33')]+_0xa433('0x34')+_0x36ce46+_0xa433('0x35');var _0x52b9c1={'to':[_0x3e57b7[_0xa433('0x24')]],'message':{'type':_0xa433('0x36'),'text':_0x3e57b7['body']}};var _0x16fe7c={'method':_0xa433('0x37'),'uri':_0x3cc2c2,'headers':{'Authorization':_0xa433('0x38')+_0xea450a,'Content-Type':'application/json'},'body':_0x52b9c1,'json':!![]};rp(_0x16fe7c)[_0xa433('0x19')](function(_0x29d427){if(_0x29d427[_0xa433('0x39')][0x0][_0xa433('0x3a')]){return _0x21e1b3[_0xa433('0x1a')]({'messageId':_0x29d427[_0xa433('0x39')][0x0][_0xa433('0x3a')]});}})[_0xa433('0x2d')](function(_0x51287e){logger[_0xa433('0x3b')]('WhatsappMessage,\x20%s',_0x51287e);});break;}}})[_0xa433('0x3c')](function(){_0x1715a4();});}else{_0x1715a4();}}},'charset':_0xa433('0x3d'),'collate':_0xa433('0x3e')});}; \ No newline at end of file diff --git a/server/api/whatsappMessage/whatsappMessage.rpc.js b/server/api/whatsappMessage/whatsappMessage.rpc.js index 9d7cf8a..81e4527 100644 --- a/server/api/whatsappMessage/whatsappMessage.rpc.js +++ b/server/api/whatsappMessage/whatsappMessage.rpc.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xfd01=['register','request','then','info','debug','request\x20sent','error','code','WhatsappMessage,\x20%s,\x20%s','message','result','catch','CreateWhatsappMessage','WhatsappMessage','create','body','options','raw','stringify','ioredis','../../config/utils','rpc','../../config/environment','jayson/promise','client','http','defaults','redis','localhost','socket.io-emitter','./whatsappMessage.socket'];(function(_0x1c90a7,_0x115e4d){var _0x408b33=function(_0x4b2b46){while(--_0x4b2b46){_0x1c90a7['push'](_0x1c90a7['shift']());}};_0x408b33(++_0x115e4d);}(_0xfd01,0xec));var _0x1fd0=function(_0x10ee98,_0x5ece4b){_0x10ee98=_0x10ee98-0x0;var _0x508b9d=_0xfd01[_0x10ee98];return _0x508b9d;};'use strict';var _=require('lodash');var util=require('util');var moment=require('moment');var BPromise=require('bluebird');var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x1fd0('0x0'));var db=require('../../mysqldb')['db'];var utils=require(_0x1fd0('0x1'));var logger=require('../../config/logger')(_0x1fd0('0x2'));var config=require(_0x1fd0('0x3'));var jayson=require(_0x1fd0('0x4'));var client=jayson[_0x1fd0('0x5')][_0x1fd0('0x6')]({'port':0x232a});config['redis']=_[_0x1fd0('0x7')](config[_0x1fd0('0x8')],{'host':_0x1fd0('0x9'),'port':0x18eb});var socket=require(_0x1fd0('0xa'))(new Redis(config[_0x1fd0('0x8')]));require(_0x1fd0('0xb'))[_0x1fd0('0xc')](socket);function respondWithRpcPromise(_0x335459,_0x528b75,_0x8462ed){return new BPromise(function(_0x38d209,_0x7ba8b1){return client[_0x1fd0('0xd')](_0x335459,_0x8462ed)[_0x1fd0('0xe')](function(_0x100f5f){logger[_0x1fd0('0xf')]('WhatsappMessage,\x20%s,\x20%s',_0x528b75,'request\x20sent');logger[_0x1fd0('0x10')]('WhatsappMessage,\x20%s,\x20%s,\x20%s',_0x528b75,_0x1fd0('0x11'),JSON['stringify'](_0x100f5f));if(_0x100f5f[_0x1fd0('0x12')]){if(_0x100f5f[_0x1fd0('0x12')][_0x1fd0('0x13')]===0x1f4){logger[_0x1fd0('0x12')](_0x1fd0('0x14'),_0x528b75,_0x100f5f[_0x1fd0('0x12')][_0x1fd0('0x15')]);return _0x7ba8b1(_0x100f5f[_0x1fd0('0x12')]['message']);}logger[_0x1fd0('0x12')](_0x1fd0('0x14'),_0x528b75,_0x100f5f['error'][_0x1fd0('0x15')]);return _0x38d209(_0x100f5f[_0x1fd0('0x12')][_0x1fd0('0x15')]);}else{logger[_0x1fd0('0xf')](_0x1fd0('0x14'),_0x528b75,'request\x20sent');_0x38d209(_0x100f5f[_0x1fd0('0x16')][_0x1fd0('0x15')]);}})[_0x1fd0('0x17')](function(_0x29c3f1){logger[_0x1fd0('0x12')]('WhatsappMessage,\x20%s,\x20%s',_0x528b75,_0x29c3f1);_0x7ba8b1(_0x29c3f1);});});}exports[_0x1fd0('0x18')]=function(_0x26056b){var _0xb52162=this;return new Promise(function(_0x2715c9,_0x1e1f27){return db[_0x1fd0('0x19')][_0x1fd0('0x1a')](_0x26056b[_0x1fd0('0x1b')],{'raw':_0x26056b[_0x1fd0('0x1c')]?_0x26056b[_0x1fd0('0x1c')][_0x1fd0('0x1d')]===undefined?!![]:![]:!![]})[_0x1fd0('0xe')](function(_0x6505a5){logger['info']('CreateWhatsappMessage',_0x26056b);logger[_0x1fd0('0x10')](_0x1fd0('0x18'),_0x26056b,JSON[_0x1fd0('0x1e')](_0x6505a5));_0x2715c9(_0x6505a5);})[_0x1fd0('0x17')](function(_0x2cca57){logger[_0x1fd0('0x12')](_0x1fd0('0x18'),_0x2cca57['message'],_0x26056b);_0x1e1f27(_0xb52162['error'](0x1f4,_0x2cca57[_0x1fd0('0x15')]));});});}; \ No newline at end of file +var _0x860b=['WhatsappMessage,\x20%s,\x20%s','request\x20sent','debug','WhatsappMessage,\x20%s,\x20%s,\x20%s','stringify','error','message','result','catch','CreateWhatsappMessage','WhatsappMessage','create','body','options','then','util','moment','bluebird','ioredis','../../config/logger','rpc','../../config/environment','client','http','redis','defaults','socket.io-emitter','register','request','info'];(function(_0x1867fb,_0x763112){var _0x147564=function(_0xebc55b){while(--_0xebc55b){_0x1867fb['push'](_0x1867fb['shift']());}};_0x147564(++_0x763112);}(_0x860b,0x177));var _0xb860=function(_0x993971,_0x3f6e30){_0x993971=_0x993971-0x0;var _0x314aba=_0x860b[_0x993971];return _0x314aba;};'use strict';var _=require('lodash');var util=require(_0xb860('0x0'));var moment=require(_0xb860('0x1'));var BPromise=require(_0xb860('0x2'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0xb860('0x3'));var db=require('../../mysqldb')['db'];var utils=require('../../config/utils');var logger=require(_0xb860('0x4'))(_0xb860('0x5'));var config=require(_0xb860('0x6'));var jayson=require('jayson/promise');var client=jayson[_0xb860('0x7')][_0xb860('0x8')]({'port':0x232a});config[_0xb860('0x9')]=_[_0xb860('0xa')](config[_0xb860('0x9')],{'host':'localhost','port':0x18eb});var socket=require(_0xb860('0xb'))(new Redis(config['redis']));require('./whatsappMessage.socket')[_0xb860('0xc')](socket);function respondWithRpcPromise(_0xbe260,_0x4936c3,_0x3c1994){return new BPromise(function(_0x22ba0b,_0x120de2){return client[_0xb860('0xd')](_0xbe260,_0x3c1994)['then'](function(_0x58d955){logger[_0xb860('0xe')](_0xb860('0xf'),_0x4936c3,_0xb860('0x10'));logger[_0xb860('0x11')](_0xb860('0x12'),_0x4936c3,_0xb860('0x10'),JSON[_0xb860('0x13')](_0x58d955));if(_0x58d955[_0xb860('0x14')]){if(_0x58d955[_0xb860('0x14')]['code']===0x1f4){logger['error']('WhatsappMessage,\x20%s,\x20%s',_0x4936c3,_0x58d955[_0xb860('0x14')][_0xb860('0x15')]);return _0x120de2(_0x58d955[_0xb860('0x14')][_0xb860('0x15')]);}logger[_0xb860('0x14')]('WhatsappMessage,\x20%s,\x20%s',_0x4936c3,_0x58d955[_0xb860('0x14')][_0xb860('0x15')]);return _0x22ba0b(_0x58d955[_0xb860('0x14')]['message']);}else{logger[_0xb860('0xe')](_0xb860('0xf'),_0x4936c3,_0xb860('0x10'));_0x22ba0b(_0x58d955[_0xb860('0x16')][_0xb860('0x15')]);}})[_0xb860('0x17')](function(_0x5b996d){logger['error']('WhatsappMessage,\x20%s,\x20%s',_0x4936c3,_0x5b996d);_0x120de2(_0x5b996d);});});}exports[_0xb860('0x18')]=function(_0x161506){var _0xca1040=this;return new Promise(function(_0x5c7b15,_0x151189){return db[_0xb860('0x19')][_0xb860('0x1a')](_0x161506[_0xb860('0x1b')],{'raw':_0x161506[_0xb860('0x1c')]?_0x161506[_0xb860('0x1c')]['raw']===undefined?!![]:![]:!![]})[_0xb860('0x1d')](function(_0x1d6fa1){logger[_0xb860('0xe')](_0xb860('0x18'),_0x161506);logger[_0xb860('0x11')](_0xb860('0x18'),_0x161506,JSON[_0xb860('0x13')](_0x1d6fa1));_0x5c7b15(_0x1d6fa1);})[_0xb860('0x17')](function(_0x124037){logger['error'](_0xb860('0x18'),_0x124037['message'],_0x161506);_0x151189(_0xca1040[_0xb860('0x14')](0x1f4,_0x124037[_0xb860('0x15')]));});});}; \ No newline at end of file diff --git a/server/api/whatsappMessage/whatsappMessage.socket.js b/server/api/whatsappMessage/whatsappMessage.socket.js index 66d7625..599f3a6 100644 --- a/server/api/whatsappMessage/whatsappMessage.socket.js +++ b/server/api/whatsappMessage/whatsappMessage.socket.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xff77=['whatsappMessage:','save','remove','emit','length'];(function(_0x3eec7c,_0xbab5f9){var _0xad2c6a=function(_0x3cb7bd){while(--_0x3cb7bd){_0x3eec7c['push'](_0x3eec7c['shift']());}};_0xad2c6a(++_0xbab5f9);}(_0xff77,0xfb));var _0x7ff7=function(_0x518cb0,_0x45cf00){_0x518cb0=_0x518cb0-0x0;var _0x15b018=_0xff77[_0x518cb0];return _0x15b018;};'use strict';var WhatsappMessageEvents=require('./whatsappMessage.events');var events=[_0x7ff7('0x0'),_0x7ff7('0x1'),'update'];function createListener(_0x411b39,_0x99d31){return function(_0x393942){_0x99d31[_0x7ff7('0x2')](_0x411b39,_0x393942);};}function removeListener(_0x581b96,_0x295c70){return function(){WhatsappMessageEvents['removeListener'](_0x581b96,_0x295c70);};}exports['register']=function(_0x3ad646){for(var _0x286ffa=0x0,_0x3b7a42=events[_0x7ff7('0x3')];_0x286ffa<_0x3b7a42;_0x286ffa++){var _0x40fa00=events[_0x286ffa];var _0x2de074=createListener(_0x7ff7('0x4')+_0x40fa00,_0x3ad646);WhatsappMessageEvents['on'](_0x40fa00,_0x2de074);}}; \ No newline at end of file +var _0xc7f6=['emit','removeListener','length','whatsappMessage:','./whatsappMessage.events','remove'];(function(_0x281522,_0x315f8c){var _0x18836c=function(_0x36da1e){while(--_0x36da1e){_0x281522['push'](_0x281522['shift']());}};_0x18836c(++_0x315f8c);}(_0xc7f6,0x148));var _0x6c7f=function(_0x12db95,_0x43c770){_0x12db95=_0x12db95-0x0;var _0x2c530b=_0xc7f6[_0x12db95];return _0x2c530b;};'use strict';var WhatsappMessageEvents=require(_0x6c7f('0x0'));var events=['save',_0x6c7f('0x1'),'update'];function createListener(_0x482fe8,_0x553f65){return function(_0x215ea2){_0x553f65[_0x6c7f('0x2')](_0x482fe8,_0x215ea2);};}function removeListener(_0x5bdeb1,_0x174220){return function(){WhatsappMessageEvents[_0x6c7f('0x3')](_0x5bdeb1,_0x174220);};}exports['register']=function(_0x313845){for(var _0x398772=0x0,_0x434b14=events[_0x6c7f('0x4')];_0x398772<_0x434b14;_0x398772++){var _0x348aae=events[_0x398772];var _0x5e3279=createListener(_0x6c7f('0x5')+_0x348aae,_0x313845);WhatsappMessageEvents['on'](_0x348aae,_0x5e3279);}}; \ No newline at end of file diff --git a/server/api/whatsappQueue/index.js b/server/api/whatsappQueue/index.js index d0cd40d..fad0e53 100644 --- a/server/api/whatsappQueue/index.js +++ b/server/api/whatsappQueue/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x2006=['/:id/teams','addTeams','put','delete','removeAgents','exports','multer','util','connect-timeout','express','fs-extra','../../config/environment','get','isAuthenticated','index','/describe','describe','/:id','/:id/members','getMembers','getTeams','/:id/users','getAgents','post'];(function(_0x12dd61,_0x7ccade){var _0x1d8659=function(_0x580867){while(--_0x580867){_0x12dd61['push'](_0x12dd61['shift']());}};_0x1d8659(++_0x7ccade);}(_0x2006,0x156));var _0x6200=function(_0x55cc3e,_0x106639){_0x55cc3e=_0x55cc3e-0x0;var _0x9a3d2a=_0x2006[_0x55cc3e];return _0x9a3d2a;};'use strict';var multer=require(_0x6200('0x0'));var util=require(_0x6200('0x1'));var path=require('path');var timeout=require(_0x6200('0x2'));var express=require(_0x6200('0x3'));var router=express['Router']();var fs_extra=require(_0x6200('0x4'));var auth=require('../../components/auth/service');var interaction=require('../../components/interaction/service');var config=require(_0x6200('0x5'));var controller=require('./whatsappQueue.controller');router[_0x6200('0x6')]('/',auth[_0x6200('0x7')](),controller[_0x6200('0x8')]);router['get'](_0x6200('0x9'),auth[_0x6200('0x7')](),controller[_0x6200('0xa')]);router['get'](_0x6200('0xb'),auth[_0x6200('0x7')](),controller['show']);router[_0x6200('0x6')](_0x6200('0xc'),auth[_0x6200('0x7')](),controller[_0x6200('0xd')]);router['get']('/:id/teams',auth[_0x6200('0x7')](),controller[_0x6200('0xe')]);router[_0x6200('0x6')](_0x6200('0xf'),auth[_0x6200('0x7')](),controller[_0x6200('0x10')]);router[_0x6200('0x11')]('/',auth[_0x6200('0x7')](),controller['create']);router['post'](_0x6200('0x12'),auth['isAuthenticated'](),controller[_0x6200('0x13')]);router[_0x6200('0x11')](_0x6200('0xf'),auth[_0x6200('0x7')](),controller['addAgents']);router[_0x6200('0x14')](_0x6200('0xb'),auth[_0x6200('0x7')](),controller['update']);router['delete'](_0x6200('0xb'),auth[_0x6200('0x7')](),controller['destroy']);router[_0x6200('0x15')](_0x6200('0x12'),auth[_0x6200('0x7')](),controller['removeTeams']);router['delete']('/:id/users',auth[_0x6200('0x7')](),controller[_0x6200('0x16')]);module[_0x6200('0x17')]=router; \ No newline at end of file +var _0x2a95=['put','destroy','removeTeams','delete','removeAgents','exports','util','express','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','./whatsappQueue.controller','isAuthenticated','get','/describe','describe','/:id','show','/:id/members','getMembers','/:id/teams','post','create','/:id/users','addAgents'];(function(_0x264fc2,_0x11a992){var _0x242093=function(_0x49c943){while(--_0x49c943){_0x264fc2['push'](_0x264fc2['shift']());}};_0x242093(++_0x11a992);}(_0x2a95,0x1f4));var _0x52a9=function(_0xf15167,_0x3d0c08){_0xf15167=_0xf15167-0x0;var _0x28899a=_0x2a95[_0xf15167];return _0x28899a;};'use strict';var multer=require('multer');var util=require(_0x52a9('0x0'));var path=require('path');var timeout=require('connect-timeout');var express=require(_0x52a9('0x1'));var router=express['Router']();var fs_extra=require(_0x52a9('0x2'));var auth=require(_0x52a9('0x3'));var interaction=require(_0x52a9('0x4'));var config=require(_0x52a9('0x5'));var controller=require(_0x52a9('0x6'));router['get']('/',auth[_0x52a9('0x7')](),controller['index']);router[_0x52a9('0x8')](_0x52a9('0x9'),auth[_0x52a9('0x7')](),controller[_0x52a9('0xa')]);router[_0x52a9('0x8')](_0x52a9('0xb'),auth[_0x52a9('0x7')](),controller[_0x52a9('0xc')]);router[_0x52a9('0x8')](_0x52a9('0xd'),auth[_0x52a9('0x7')](),controller[_0x52a9('0xe')]);router[_0x52a9('0x8')](_0x52a9('0xf'),auth[_0x52a9('0x7')](),controller['getTeams']);router[_0x52a9('0x8')]('/:id/users',auth[_0x52a9('0x7')](),controller['getAgents']);router[_0x52a9('0x10')]('/',auth[_0x52a9('0x7')](),controller[_0x52a9('0x11')]);router[_0x52a9('0x10')](_0x52a9('0xf'),auth[_0x52a9('0x7')](),controller['addTeams']);router[_0x52a9('0x10')](_0x52a9('0x12'),auth[_0x52a9('0x7')](),controller[_0x52a9('0x13')]);router[_0x52a9('0x14')](_0x52a9('0xb'),auth[_0x52a9('0x7')](),controller['update']);router['delete'](_0x52a9('0xb'),auth['isAuthenticated'](),controller[_0x52a9('0x15')]);router['delete'](_0x52a9('0xf'),auth[_0x52a9('0x7')](),controller[_0x52a9('0x16')]);router[_0x52a9('0x17')](_0x52a9('0x12'),auth['isAuthenticated'](),controller[_0x52a9('0x18')]);module[_0x52a9('0x19')]=router; \ No newline at end of file diff --git a/server/api/whatsappQueue/whatsappQueue.attributes.js b/server/api/whatsappQueue/whatsappQueue.attributes.js index e04f4f8..36bcfce 100644 --- a/server/api/whatsappQueue/whatsappQueue.attributes.js +++ b/server/api/whatsappQueue/whatsappQueue.attributes.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x36f1=['roundrobin','sequelize','STRING','INTEGER','ENUM','rrmemory','beepall'];(function(_0x5a5276,_0x262d69){var _0x3e8ee2=function(_0x151ce3){while(--_0x151ce3){_0x5a5276['push'](_0x5a5276['shift']());}};_0x3e8ee2(++_0x262d69);}(_0x36f1,0xb0));var _0x136f=function(_0x187ee1,_0x3fd1e6){_0x187ee1=_0x187ee1-0x0;var _0x388160=_0x36f1[_0x187ee1];return _0x388160;};'use strict';var Sequelize=require(_0x136f('0x0'));module['exports']={'name':{'type':Sequelize[_0x136f('0x1')],'unique':'name','validate':{'notEmpty':!![],'is':/^[A-Za-z0-9\.\_]+$/i}},'timeout':{'type':Sequelize[_0x136f('0x2')],'validate':{'min':0x1,'max':0x20c49b}},'strategy':{'type':Sequelize[_0x136f('0x3')](_0x136f('0x4'),_0x136f('0x5'),_0x136f('0x6'))},'description':{'type':Sequelize[_0x136f('0x1')]}}; \ No newline at end of file +var _0x1cf3=['STRING','name','ENUM','beepall','roundrobin','sequelize','exports'];(function(_0x41e96,_0x4c9b00){var _0x2f16cf=function(_0x3c6cb4){while(--_0x3c6cb4){_0x41e96['push'](_0x41e96['shift']());}};_0x2f16cf(++_0x4c9b00);}(_0x1cf3,0x1be));var _0x31cf=function(_0xe43115,_0x3c3b21){_0xe43115=_0xe43115-0x0;var _0x29a9d7=_0x1cf3[_0xe43115];return _0x29a9d7;};'use strict';var Sequelize=require(_0x31cf('0x0'));module[_0x31cf('0x1')]={'name':{'type':Sequelize[_0x31cf('0x2')],'unique':_0x31cf('0x3'),'validate':{'notEmpty':!![],'is':/^[A-Za-z0-9\.\_]+$/i}},'timeout':{'type':Sequelize['INTEGER'],'validate':{'min':0x1,'max':0x20c49b}},'strategy':{'type':Sequelize[_0x31cf('0x4')]('rrmemory',_0x31cf('0x5'),_0x31cf('0x6'))},'description':{'type':Sequelize[_0x31cf('0x2')]}}; \ No newline at end of file diff --git a/server/api/whatsappQueue/whatsappQueue.controller.js b/server/api/whatsappQueue/whatsappQueue.controller.js index b0dc8e1..5869a78 100644 --- a/server/api/whatsappQueue/whatsappQueue.controller.js +++ b/server/api/whatsappQueue/whatsappQueue.controller.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x94d6=['error','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','body','getMembers','findOne','UserWhatsappQueue','WhatsappQueueId','User','UserId','agent','createdAt','%s/%s','updatedAt','getTeams','addTeams','ids','Team','online','voicePause','interface','Agents','transaction','each','findOrCreate','forEach','emit','userWhatsappQueue:save','removeTeams','select','field','tq.TeamId','from','team_has_whatsapp_queues','join','user_has_teams','ut.TeamId\x20=\x20tq.TeamId','clone','ut.UserId\x20=\x20?','sequelize','toString','QueryTypes','SELECT','every','TeamId','includes','all','value','isEmpty','removeAgents','userWhatsappQueue:remove','addAgents','omit','isArray','getAgents','eml-format','zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','util','path','to-csv','ejs','fs-extra','lodash','squel','crypto','jsforce','desk.js','ioredis','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../mysqldb','redis','defaults','socket.io-emitter','./whatsappQueue.socket','register','status','end','json','offset','undefined','limit','count','set','apply','reject','save','update','then','get','WhatsappQueues','destroy','sendStatus','stack','name','send','index','map','rawAttributes','fieldName','type','model','query','intersection','attributes','fields','length','hasOwnProperty','nolimit','order','sort','where','filters','pick','filter','merge','VIRTUAL','options','includeAll','include','findAll','rows','catch','show','params','keys','WhatsappQueue','create','user','role','UserProfileSection','find','autoAssociation','UserProfileResource'];(function(_0x37fdab,_0x12ec81){var _0x4350f4=function(_0x46fe74){while(--_0x46fe74){_0x37fdab['push'](_0x37fdab['shift']());}};_0x4350f4(++_0x12ec81);}(_0x94d6,0x154));var _0x694d=function(_0x200915,_0x57da6e){_0x200915=_0x200915-0x0;var _0x589ac1=_0x94d6[_0x200915];return _0x589ac1;};'use strict';var emlformat=require(_0x694d('0x0'));var rimraf=require('rimraf');var zipdir=require(_0x694d('0x1'));var jsonpatch=require(_0x694d('0x2'));var rp=require(_0x694d('0x3'));var moment=require(_0x694d('0x4'));var BPromise=require(_0x694d('0x5'));var Mustache=require(_0x694d('0x6'));var util=require(_0x694d('0x7'));var path=require(_0x694d('0x8'));var sox=require('sox');var csv=require(_0x694d('0x9'));var ejs=require(_0x694d('0xa'));var fs=require('fs');var fs_extra=require(_0x694d('0xb'));var _=require(_0x694d('0xc'));var squel=require(_0x694d('0xd'));var crypto=require(_0x694d('0xe'));var jsforce=require(_0x694d('0xf'));var deskjs=require(_0x694d('0x10'));var toCsv=require(_0x694d('0x9'));var querystring=require('querystring');var Papa=require('papaparse');var Redis=require(_0x694d('0x11'));var authService=require('../../components/auth/service');var qs=require(_0x694d('0x12'));var as=require(_0x694d('0x13'));var hardwareService=require(_0x694d('0x14'));var logger=require(_0x694d('0x15'))(_0x694d('0x16'));var utils=require(_0x694d('0x17'));var config=require(_0x694d('0x18'));var licenseUtil=require('../../config/license/util');var db=require(_0x694d('0x19'))['db'];config[_0x694d('0x1a')]=_[_0x694d('0x1b')](config['redis'],{'host':'localhost','port':0x18eb});var socket=require(_0x694d('0x1c'))(new Redis(config[_0x694d('0x1a')]));require(_0x694d('0x1d'))[_0x694d('0x1e')](socket);function respondWithStatusCode(_0x109763,_0x4d311b){_0x4d311b=_0x4d311b||0xcc;return function(_0x5825f1){if(_0x5825f1){return _0x109763['sendStatus'](_0x4d311b);}return _0x109763[_0x694d('0x1f')](_0x4d311b)[_0x694d('0x20')]();};}function respondWithResult(_0x4ce133,_0x16d12c){_0x16d12c=_0x16d12c||0xc8;return function(_0x3b183a){if(_0x3b183a){return _0x4ce133[_0x694d('0x1f')](_0x16d12c)[_0x694d('0x21')](_0x3b183a);}};}function respondWithFilteredResult(_0x2ffe40,_0x20359b){return function(_0x4fd739){if(_0x4fd739){var _0x22c30f=typeof _0x20359b[_0x694d('0x22')]===_0x694d('0x23')&&typeof _0x20359b[_0x694d('0x24')]===_0x694d('0x23');var _0x430587=_0x4fd739[_0x694d('0x25')];var _0x41c63f=_0x22c30f?0x0:_0x20359b[_0x694d('0x22')];var _0x5b6eff=_0x22c30f?_0x4fd739[_0x694d('0x25')]:_0x20359b[_0x694d('0x22')]+_0x20359b[_0x694d('0x24')];var _0x53fe85;if(_0x5b6eff>=_0x430587){_0x5b6eff=_0x430587;_0x53fe85=0xc8;}else{_0x53fe85=0xce;}_0x2ffe40['status'](_0x53fe85);return _0x2ffe40[_0x694d('0x26')]('Content-Range',_0x41c63f+'-'+_0x5b6eff+'/'+_0x430587)[_0x694d('0x21')](_0x4fd739);}return null;};}function patchUpdates(_0x18a668){return function(_0x30669a){try{jsonpatch[_0x694d('0x27')](_0x30669a,_0x18a668,!![]);}catch(_0x46884e){return BPromise[_0x694d('0x28')](_0x46884e);}return _0x30669a[_0x694d('0x29')]();};}function saveUpdates(_0x48221f,_0x207adf){return function(_0x2fca65){if(_0x2fca65){return _0x2fca65[_0x694d('0x2a')](_0x48221f)['then'](function(_0x1ada53){return _0x1ada53;});}return null;};}function removeEntity(_0x3dfb69,_0xa8fa98){return function(_0x1cb4b4){if(_0x1cb4b4){return _0x1cb4b4['destroy']()[_0x694d('0x2b')](function(){var _0x3fd103=_0x1cb4b4[_0x694d('0x2c')]({'plain':!![]});var _0x500b79=_0x694d('0x2d');return db['UserProfileResource'][_0x694d('0x2e')]({'where':{'type':_0x500b79,'resourceId':_0x3fd103['id']}})[_0x694d('0x2b')](function(){return _0x1cb4b4;});})[_0x694d('0x2b')](function(){_0x3dfb69['status'](0xcc)[_0x694d('0x20')]();});}};}function handleEntityNotFound(_0x4770b0,_0x4df86d){return function(_0x5887e4){if(!_0x5887e4){_0x4770b0[_0x694d('0x2f')](0x194);}return _0x5887e4;};}function handleError(_0x2cb5c0,_0x2a7274){_0x2a7274=_0x2a7274||0x1f4;return function(_0x5d5fc1){logger['error'](_0x5d5fc1[_0x694d('0x30')]);if(_0x5d5fc1[_0x694d('0x31')]){delete _0x5d5fc1[_0x694d('0x31')];}_0x2cb5c0['status'](_0x2a7274)[_0x694d('0x32')](_0x5d5fc1);};}exports[_0x694d('0x33')]=function(_0xb0c91c,_0x457076){var _0x1e9531={},_0x3d8207={},_0x587276={'count':0x0,'rows':[]};var _0x5fef56=_[_0x694d('0x34')](db['WhatsappQueue'][_0x694d('0x35')],function(_0x9e6f22){return{'name':_0x9e6f22[_0x694d('0x36')],'type':_0x9e6f22[_0x694d('0x37')]['key']};});_0x3d8207[_0x694d('0x38')]=_[_0x694d('0x34')](_0x5fef56,_0x694d('0x31'));_0x3d8207[_0x694d('0x39')]=_['keys'](_0xb0c91c[_0x694d('0x39')]);_0x3d8207['filters']=_[_0x694d('0x3a')](_0x3d8207['model'],_0x3d8207[_0x694d('0x39')]);_0x1e9531[_0x694d('0x3b')]=_[_0x694d('0x3a')](_0x3d8207[_0x694d('0x38')],qs[_0x694d('0x3c')](_0xb0c91c[_0x694d('0x39')][_0x694d('0x3c')]));_0x1e9531[_0x694d('0x3b')]=_0x1e9531['attributes'][_0x694d('0x3d')]?_0x1e9531[_0x694d('0x3b')]:_0x3d8207['model'];if(!_0xb0c91c[_0x694d('0x39')][_0x694d('0x3e')](_0x694d('0x3f'))){_0x1e9531[_0x694d('0x24')]=qs['limit'](_0xb0c91c[_0x694d('0x39')][_0x694d('0x24')]);_0x1e9531['offset']=qs[_0x694d('0x22')](_0xb0c91c[_0x694d('0x39')][_0x694d('0x22')]);}_0x1e9531[_0x694d('0x40')]=qs[_0x694d('0x41')](_0xb0c91c['query'][_0x694d('0x41')]);_0x1e9531[_0x694d('0x42')]=qs[_0x694d('0x43')](_[_0x694d('0x44')](_0xb0c91c[_0x694d('0x39')],_0x3d8207['filters']),_0x5fef56);if(_0xb0c91c[_0x694d('0x39')][_0x694d('0x45')]){_0x1e9531[_0x694d('0x42')]=_[_0x694d('0x46')](_0x1e9531[_0x694d('0x42')],{'$or':_[_0x694d('0x34')](_0x5fef56,function(_0x1a7263){if(_0x1a7263['type']!==_0x694d('0x47')){var _0x5cad85={};_0x5cad85[_0x1a7263['name']]={'$like':'%'+_0xb0c91c[_0x694d('0x39')][_0x694d('0x45')]+'%'};return _0x5cad85;}})});}_0x1e9531=_['merge']({},_0x1e9531,_0xb0c91c[_0x694d('0x48')]);var _0x3b7d08={'where':_0x1e9531[_0x694d('0x42')]};return db['WhatsappQueue']['count'](_0x3b7d08)[_0x694d('0x2b')](function(_0x508bd3){_0x587276[_0x694d('0x25')]=_0x508bd3;if(_0xb0c91c[_0x694d('0x39')][_0x694d('0x49')]){_0x1e9531[_0x694d('0x4a')]=[{'all':!![]}];}return db['WhatsappQueue'][_0x694d('0x4b')](_0x1e9531);})['then'](function(_0x5d2479){_0x587276[_0x694d('0x4c')]=_0x5d2479;return _0x587276;})[_0x694d('0x2b')](respondWithFilteredResult(_0x457076,_0x1e9531))[_0x694d('0x4d')](handleError(_0x457076,null));};exports[_0x694d('0x4e')]=function(_0x41e503,_0x534397){var _0x1f0755={'raw':!![],'where':{'id':_0x41e503[_0x694d('0x4f')]['id']}},_0x41ccb0={};_0x41ccb0[_0x694d('0x38')]=_[_0x694d('0x50')](db[_0x694d('0x51')][_0x694d('0x35')]);_0x41ccb0[_0x694d('0x39')]=_['keys'](_0x41e503[_0x694d('0x39')]);_0x41ccb0['filters']=_[_0x694d('0x3a')](_0x41ccb0[_0x694d('0x38')],_0x41ccb0['query']);_0x1f0755['attributes']=_[_0x694d('0x3a')](_0x41ccb0[_0x694d('0x38')],qs['fields'](_0x41e503[_0x694d('0x39')]['fields']));_0x1f0755['attributes']=_0x1f0755[_0x694d('0x3b')][_0x694d('0x3d')]?_0x1f0755[_0x694d('0x3b')]:_0x41ccb0[_0x694d('0x38')];if(_0x41e503[_0x694d('0x39')][_0x694d('0x49')]){_0x1f0755[_0x694d('0x4a')]=[{'all':!![]}];}_0x1f0755=_['merge']({},_0x1f0755,_0x41e503[_0x694d('0x48')]);return db['WhatsappQueue']['find'](_0x1f0755)[_0x694d('0x2b')](handleEntityNotFound(_0x534397,null))[_0x694d('0x2b')](respondWithResult(_0x534397,null))[_0x694d('0x4d')](handleError(_0x534397,null));};exports[_0x694d('0x52')]=function(_0x5281a1,_0x18b9a8){return db['WhatsappQueue'][_0x694d('0x52')](_0x5281a1['body'],{})['then'](function(_0x445873){var _0x26c33b=_0x5281a1[_0x694d('0x53')]['get']({'plain':!![]});if(!_0x26c33b)throw new Error('Unable\x20to\x20retrieve\x20the\x20current\x20user');if(_0x26c33b[_0x694d('0x54')]==='user'){var _0x4ebfc4=_0x445873[_0x694d('0x2c')]({'plain':!![]});var _0x386c00=_0x694d('0x2d');return db[_0x694d('0x55')][_0x694d('0x56')]({'where':{'name':_0x386c00,'userProfileId':_0x26c33b['userProfileId']},'raw':!![]})[_0x694d('0x2b')](function(_0xbb4ded){if(_0xbb4ded&&_0xbb4ded[_0x694d('0x57')]===0x0){return db[_0x694d('0x58')][_0x694d('0x52')]({'name':_0x4ebfc4[_0x694d('0x31')],'resourceId':_0x4ebfc4['id'],'type':_0xbb4ded['name'],'sectionId':_0xbb4ded['id']},{})['then'](function(){return _0x445873;});}else{return _0x445873;}})[_0x694d('0x4d')](function(_0x17592c){logger[_0x694d('0x59')](_0x694d('0x5a'),_0x17592c);throw _0x17592c;});}return _0x445873;})[_0x694d('0x2b')](respondWithResult(_0x18b9a8,0xc9))[_0x694d('0x4d')](handleError(_0x18b9a8,null));};exports[_0x694d('0x2a')]=function(_0x5f0b0d,_0x172ff0){if(_0x5f0b0d[_0x694d('0x5b')]['id']){delete _0x5f0b0d[_0x694d('0x5b')]['id'];}return db['WhatsappQueue'][_0x694d('0x56')]({'where':{'id':_0x5f0b0d[_0x694d('0x4f')]['id']}})[_0x694d('0x2b')](handleEntityNotFound(_0x172ff0,null))[_0x694d('0x2b')](saveUpdates(_0x5f0b0d['body'],null))[_0x694d('0x2b')](respondWithResult(_0x172ff0,null))[_0x694d('0x4d')](handleError(_0x172ff0,null));};exports[_0x694d('0x2e')]=function(_0x10cac8,_0x385dfe){return db[_0x694d('0x51')][_0x694d('0x56')]({'where':{'id':_0x10cac8[_0x694d('0x4f')]['id']}})[_0x694d('0x2b')](handleEntityNotFound(_0x385dfe,null))[_0x694d('0x2b')](removeEntity(_0x385dfe,null))[_0x694d('0x4d')](handleError(_0x385dfe,null));};exports['describe']=function(_0xbbfaf5,_0x409e36){return db[_0x694d('0x51')]['describe']()[_0x694d('0x2b')](respondWithResult(_0x409e36,null))[_0x694d('0x4d')](handleError(_0x409e36,null));};exports[_0x694d('0x5c')]=function(_0x924f73,_0x4784bc,_0x3d11ff){var _0x1a4284={'raw':!![],'where':{}},_0x2e39a8={},_0x41248f;return db[_0x694d('0x51')][_0x694d('0x5d')]({'where':{'id':_0x924f73[_0x694d('0x4f')]['id']}})[_0x694d('0x2b')](handleEntityNotFound(_0x4784bc,null))[_0x694d('0x2b')](function(_0x3674b8){if(_0x3674b8){_0x41248f=_0x3674b8[_0x694d('0x2c')]({'plain':!![]});_0x2e39a8[_0x694d('0x38')]=_[_0x694d('0x50')](db[_0x694d('0x5e')][_0x694d('0x35')]);_0x2e39a8[_0x694d('0x39')]=_[_0x694d('0x50')](_0x924f73[_0x694d('0x39')]);_0x2e39a8['filters']=_[_0x694d('0x3a')](_0x2e39a8[_0x694d('0x38')],_0x2e39a8[_0x694d('0x39')]);_0x1a4284['attributes']=_['intersection'](_0x2e39a8[_0x694d('0x38')],qs[_0x694d('0x3c')](_0x924f73[_0x694d('0x39')][_0x694d('0x3c')]));_0x1a4284[_0x694d('0x3b')]=_0x1a4284['attributes']['length']?_0x1a4284[_0x694d('0x3b')]:_0x2e39a8[_0x694d('0x38')];if(!_0x924f73[_0x694d('0x39')][_0x694d('0x3e')](_0x694d('0x3f'))){_0x1a4284[_0x694d('0x24')]=qs['limit'](_0x924f73['query'][_0x694d('0x24')]);_0x1a4284[_0x694d('0x22')]=qs['offset'](_0x924f73[_0x694d('0x39')][_0x694d('0x22')]);}_0x1a4284[_0x694d('0x40')]=qs[_0x694d('0x41')](_0x924f73['query'][_0x694d('0x41')]);_0x1a4284[_0x694d('0x42')]=qs[_0x694d('0x43')](_[_0x694d('0x44')](_0x924f73['query'],_0x2e39a8[_0x694d('0x43')]));_0x1a4284[_0x694d('0x42')][_0x694d('0x5f')]=_0x3674b8['id'];if(_0x924f73[_0x694d('0x39')]['filter']){_0x1a4284[_0x694d('0x42')]=_['merge'](_0x1a4284[_0x694d('0x42')],{'$or':_[_0x694d('0x34')](_0x1a4284[_0x694d('0x3b')],function(_0x1d0362){var _0xd0fdc5={};_0xd0fdc5[_0x1d0362]={'$like':'%'+_0x924f73[_0x694d('0x39')][_0x694d('0x45')]+'%'};return _0xd0fdc5;})});}_0x1a4284=_['merge']({},_0x1a4284,_0x924f73['options']);return db[_0x694d('0x5e')][_0x694d('0x4b')](_0x1a4284);}})['then'](function(_0xca8824){if(_0xca8824){return db[_0x694d('0x60')]['findAndCountAll']({'where':{'id':_['map'](_0xca8824,_0x694d('0x61')),'role':_0x694d('0x62')},'attributes':['id',_0x694d('0x31'),'whatsappPause','updatedAt',_0x694d('0x63')]});}})[_0x694d('0x2b')](function(_0x560b95){if(_0x560b95){return{'count':_0x560b95['count'],'rows':_[_0x694d('0x34')](_0x560b95[_0x694d('0x4c')],function(_0x2cd6ca){return{'membername':_0x2cd6ca[_0x694d('0x31')],'UserId':_0x2cd6ca['id'],'queue_name':_0x41248f[_0x694d('0x31')],'WhatsappQueueId':_0x41248f['id'],'interface':util['format'](_0x694d('0x64'),'SIP',_0x2cd6ca[_0x694d('0x31')]),'penalty':0x0,'paused':_0x2cd6ca['whatsappPause'],'createdAt':_0x2cd6ca[_0x694d('0x63')],'updatedAt':_0x2cd6ca[_0x694d('0x65')]};})};}else{return{'count':0x0,'rows':[]};}})[_0x694d('0x2b')](respondWithFilteredResult(_0x4784bc,_0x1a4284))[_0x694d('0x4d')](handleError(_0x4784bc,null));};exports[_0x694d('0x66')]=function(_0x5ee240,_0x59506e,_0x491ab7){var _0x2c81eb={};var _0x49c702={};var _0x1f14a8;var _0x14bd6e;return db[_0x694d('0x51')][_0x694d('0x5d')]({'where':{'id':_0x5ee240[_0x694d('0x4f')]['id']}})[_0x694d('0x2b')](handleEntityNotFound(_0x59506e,null))[_0x694d('0x2b')](function(_0x480d5b){if(_0x480d5b){_0x1f14a8=_0x480d5b;_0x49c702[_0x694d('0x38')]=_['keys'](db['Team']['rawAttributes']);_0x49c702[_0x694d('0x39')]=_[_0x694d('0x50')](_0x5ee240[_0x694d('0x39')]);_0x49c702[_0x694d('0x43')]=_[_0x694d('0x3a')](_0x49c702[_0x694d('0x38')],_0x49c702[_0x694d('0x39')]);_0x2c81eb[_0x694d('0x3b')]=_[_0x694d('0x3a')](_0x49c702[_0x694d('0x38')],qs[_0x694d('0x3c')](_0x5ee240[_0x694d('0x39')][_0x694d('0x3c')]));_0x2c81eb['attributes']=_0x2c81eb[_0x694d('0x3b')][_0x694d('0x3d')]?_0x2c81eb[_0x694d('0x3b')]:_0x49c702['model'];_0x2c81eb[_0x694d('0x40')]=qs[_0x694d('0x41')](_0x5ee240['query']['sort']);_0x2c81eb['where']=qs[_0x694d('0x43')](_[_0x694d('0x44')](_0x5ee240['query'],_0x49c702['filters']));if(_0x5ee240[_0x694d('0x39')]['filter']){_0x2c81eb['where']=_[_0x694d('0x46')](_0x2c81eb[_0x694d('0x42')],{'$or':_[_0x694d('0x34')](_0x2c81eb[_0x694d('0x3b')],function(_0x2d471a){var _0x1de60d={};_0x1de60d[_0x2d471a]={'$like':'%'+_0x5ee240[_0x694d('0x39')]['filter']+'%'};return _0x1de60d;})});}_0x2c81eb=_[_0x694d('0x46')]({},_0x2c81eb,_0x5ee240[_0x694d('0x48')]);return _0x1f14a8['getTeams'](_0x2c81eb);}})[_0x694d('0x2b')](function(_0x2e6dc8){if(_0x2e6dc8){_0x14bd6e=_0x2e6dc8[_0x694d('0x3d')];if(!_0x5ee240[_0x694d('0x39')]['hasOwnProperty'](_0x694d('0x3f'))){_0x2c81eb['limit']=qs[_0x694d('0x24')](_0x5ee240[_0x694d('0x39')][_0x694d('0x24')]);_0x2c81eb[_0x694d('0x22')]=qs[_0x694d('0x22')](_0x5ee240[_0x694d('0x39')][_0x694d('0x22')]);}return _0x1f14a8[_0x694d('0x66')](_0x2c81eb);}})['then'](function(_0xaec6d8){if(_0xaec6d8){return _0xaec6d8?{'count':_0x14bd6e,'rows':_0xaec6d8}:null;}})[_0x694d('0x2b')](respondWithResult(_0x59506e,null))[_0x694d('0x4d')](handleError(_0x59506e,null));};exports[_0x694d('0x67')]=function(_0x64ec3c,_0x173ebd,_0x2e5538){var _0x5acc21=_0x64ec3c['body'][_0x694d('0x68')];return db[_0x694d('0x69')][_0x694d('0x4b')]({'where':{'id':_0x5acc21},'attributes':['id'],'include':[{'model':db['User'],'as':'Agents','attributes':['id','name',_0x694d('0x6a'),_0x694d('0x6b'),_0x694d('0x6c')],'raw':!![]}]})['then'](function(_0x50f8a6){if(_0x50f8a6){var _0x1474e9=_['flatMap'](_0x50f8a6,function(_0x31931d){var _0x196af6=_0x31931d[_0x694d('0x2c')]({'plain':!![]});return _0x196af6[_0x694d('0x6d')];});return db[_0x694d('0x51')][_0x694d('0x56')]({'where':{'id':_0x64ec3c['params']['id']}})['then'](function(_0x224128){return db['sequelize'][_0x694d('0x6e')](function(_0x9131d4){return _0x224128[_0x694d('0x67')](_0x5acc21,{'transaction':_0x9131d4})[_0x694d('0x2b')](function(){return BPromise[_0x694d('0x6f')](_0x1474e9,function(_0x91c7c4){return db[_0x694d('0x5e')][_0x694d('0x70')]({'where':{'UserId':_0x91c7c4['id'],'WhatsappQueueId':_0x64ec3c['params']['id']},'transaction':_0x9131d4});});})['then'](function(){_0x1474e9[_0x694d('0x71')](function(_0x51675a){socket[_0x694d('0x72')](_0x694d('0x73'),{'UserId':_0x51675a['id'],'WhatsappQueueId':_0x224128['id']});});});});});}})['then'](respondWithStatusCode(_0x173ebd,null))[_0x694d('0x4d')](handleError(_0x173ebd,null));};exports[_0x694d('0x74')]=function(_0x5ba227,_0x12c154,_0x3d1f9c){return db['Team']['findAll']({'where':{'id':_0x5ba227[_0x694d('0x39')]['ids']},'attributes':['id'],'include':[{'model':db['User'],'as':_0x694d('0x6d'),'attributes':['id'],'raw':!![]}]})['then'](handleEntityNotFound(_0x12c154,null))['then'](function(_0x1453d7){var _0x17307e=_['map'](_0x1453d7,'id');var _0xd16c00=[];var _0x36e6bc=[];var _0x533577=squel[_0x694d('0x75')]();_0x533577[_0x694d('0x76')](_0x694d('0x77'))[_0x694d('0x78')](_0x694d('0x79'),'tq')[_0x694d('0x7a')](_0x694d('0x7b'),'ut',_0x694d('0x7c'))[_0x694d('0x42')]('WhatsappQueueId\x20=\x20?',_0x5ba227[_0x694d('0x4f')]['id']);for(var _0x5da75f=0x0;_0x5da75f<_0x1453d7[_0x694d('0x3d')];_0x5da75f+=0x1){let _0x400011=_0x1453d7[_0x5da75f];for(var _0x659a89=0x0;_0x659a89<_0x400011[_0x694d('0x6d')][_0x694d('0x3d')];_0x659a89+=0x1){let _0x70e3e0=_0x400011[_0x694d('0x6d')][_0x659a89];var _0x1a8974=_0x533577[_0x694d('0x7d')]();_0x1a8974[_0x694d('0x42')](_0x694d('0x7e'),_0x70e3e0['id']);_0x36e6bc['push'](db[_0x694d('0x7f')][_0x694d('0x39')](_0x1a8974[_0x694d('0x80')](),{'type':db[_0x694d('0x7f')][_0x694d('0x81')][_0x694d('0x82')]})['then'](function(_0x4d9aae){if(_0x4d9aae['length']===0x1){return _0x70e3e0['id'];}else{var _0x499ead=_[_0x694d('0x83')](_[_0x694d('0x34')](_0x4d9aae,_0x694d('0x84')),function(_0x4cdadf){return _[_0x694d('0x85')](_0x17307e,_0x4cdadf);});if(_0x499ead){return _0x70e3e0['id'];}}}));}}return BPromise[_0x694d('0x86')](_0x36e6bc)[_0x694d('0x2b')](function(_0x18c5a1){_0xd16c00=_(_0xd16c00)['union'](_0x18c5a1)['compact']()[_0x694d('0x87')]();return db['WhatsappQueue'][_0x694d('0x56')]({'where':{'id':_0x5ba227[_0x694d('0x4f')]['id']}})[_0x694d('0x2b')](function(_0x381bd0){return db['sequelize'][_0x694d('0x6e')](function(_0x1d5e01){return _0x381bd0[_0x694d('0x74')](_0x5ba227['query']['ids'],{'transaction':_0x1d5e01})[_0x694d('0x2b')](function(){if(!_[_0x694d('0x88')](_0xd16c00)){return _0x381bd0[_0x694d('0x89')](_0xd16c00,{'transaction':_0x1d5e01});}})[_0x694d('0x2b')](function(){_0xd16c00[_0x694d('0x71')](function(_0x249db2){socket[_0x694d('0x72')](_0x694d('0x8a'),{'UserId':_0x249db2,'WhatsappQueueId':_0x381bd0['id']});});});});});});})[_0x694d('0x2b')](respondWithStatusCode(_0x12c154,null))[_0x694d('0x4d')](handleError(_0x12c154,null));};exports[_0x694d('0x8b')]=function(_0x582774,_0x3bd47b,_0x28e252){return db['WhatsappQueue']['find']({'where':{'id':_0x582774[_0x694d('0x4f')]['id']}})[_0x694d('0x2b')](handleEntityNotFound(_0x3bd47b,null))[_0x694d('0x2b')](function(_0x459a74){if(_0x459a74){return _0x459a74[_0x694d('0x8b')](_0x582774[_0x694d('0x5b')][_0x694d('0x68')],_[_0x694d('0x8c')](_0x582774[_0x694d('0x5b')],[_0x694d('0x68'),'id'])||{})['spread'](function(_0x58ec4c){for(var _0x449480=0x0;_0x449480<_0x582774['body'][_0x694d('0x68')]['length'];_0x449480+=0x1){socket[_0x694d('0x72')](_0x694d('0x73'),{'UserId':Number(_0x582774['body'][_0x694d('0x68')][_0x449480]),'WhatsappQueueId':Number(_0x582774[_0x694d('0x4f')]['id'])});}return _0x58ec4c;});}})[_0x694d('0x2b')](respondWithResult(_0x3bd47b,null))[_0x694d('0x4d')](handleError(_0x3bd47b,null));};exports[_0x694d('0x89')]=function(_0x37086a,_0x265ca7,_0x488ff8){return db['WhatsappQueue'][_0x694d('0x56')]({'where':{'id':_0x37086a[_0x694d('0x4f')]['id']}})[_0x694d('0x2b')](handleEntityNotFound(_0x265ca7,null))[_0x694d('0x2b')](function(_0x3576a8){if(_0x3576a8){return _0x3576a8[_0x694d('0x89')](_0x37086a[_0x694d('0x39')][_0x694d('0x68')])[_0x694d('0x2b')](function(){if(_[_0x694d('0x8d')](_0x37086a[_0x694d('0x39')][_0x694d('0x68')])){for(var _0x57dcd0=0x0;_0x57dcd0<_0x37086a[_0x694d('0x39')][_0x694d('0x68')][_0x694d('0x3d')];_0x57dcd0+=0x1){socket[_0x694d('0x72')](_0x694d('0x8a'),{'UserId':Number(_0x37086a[_0x694d('0x39')][_0x694d('0x68')][_0x57dcd0]),'WhatsappQueueId':Number(_0x37086a[_0x694d('0x4f')]['id'])});}}else{socket[_0x694d('0x72')](_0x694d('0x8a'),{'UserId':Number(_0x37086a[_0x694d('0x39')]['ids']),'WhatsappQueueId':Number(_0x37086a[_0x694d('0x4f')]['id'])});}});}})[_0x694d('0x2b')](respondWithStatusCode(_0x265ca7,null))[_0x694d('0x4d')](handleError(_0x265ca7,null));};exports[_0x694d('0x8e')]=function(_0x2db8d9,_0x154e3b,_0x118ab4){var _0x40b135={};var _0x1bf623={};var _0x5939a1;var _0x13a136;return db[_0x694d('0x51')][_0x694d('0x5d')]({'where':{'id':_0x2db8d9[_0x694d('0x4f')]['id']}})[_0x694d('0x2b')](handleEntityNotFound(_0x154e3b,null))[_0x694d('0x2b')](function(_0x5f9e1e){if(_0x5f9e1e){_0x5939a1=_0x5f9e1e;_0x1bf623['model']=_[_0x694d('0x50')](db[_0x694d('0x60')]['rawAttributes']);_0x1bf623['query']=_[_0x694d('0x50')](_0x2db8d9['query']);_0x1bf623[_0x694d('0x43')]=_[_0x694d('0x3a')](_0x1bf623[_0x694d('0x38')],_0x1bf623['query']);_0x40b135['attributes']=_[_0x694d('0x3a')](_0x1bf623[_0x694d('0x38')],qs[_0x694d('0x3c')](_0x2db8d9[_0x694d('0x39')][_0x694d('0x3c')]));_0x40b135[_0x694d('0x3b')]=_0x40b135[_0x694d('0x3b')][_0x694d('0x3d')]?_0x40b135[_0x694d('0x3b')]:_0x1bf623[_0x694d('0x38')];_0x40b135[_0x694d('0x40')]=qs[_0x694d('0x41')](_0x2db8d9['query'][_0x694d('0x41')]);_0x40b135[_0x694d('0x42')]=qs[_0x694d('0x43')](_['pick'](_0x2db8d9[_0x694d('0x39')],_0x1bf623[_0x694d('0x43')]));if(_0x2db8d9[_0x694d('0x39')][_0x694d('0x45')]){_0x40b135[_0x694d('0x42')]=_[_0x694d('0x46')](_0x40b135['where'],{'$or':_[_0x694d('0x34')](_0x40b135[_0x694d('0x3b')],function(_0x56783a){var _0x144b7b={};_0x144b7b[_0x56783a]={'$like':'%'+_0x2db8d9[_0x694d('0x39')][_0x694d('0x45')]+'%'};return _0x144b7b;})});}_0x40b135=_[_0x694d('0x46')]({},_0x40b135,_0x2db8d9['options']);return _0x5939a1[_0x694d('0x8e')](_0x40b135);}})[_0x694d('0x2b')](function(_0x50ce6d){if(_0x50ce6d){_0x13a136=_0x50ce6d[_0x694d('0x3d')];if(!_0x2db8d9['query'][_0x694d('0x3e')]('nolimit')){_0x40b135[_0x694d('0x24')]=qs[_0x694d('0x24')](_0x2db8d9[_0x694d('0x39')][_0x694d('0x24')]);_0x40b135[_0x694d('0x22')]=qs[_0x694d('0x22')](_0x2db8d9[_0x694d('0x39')][_0x694d('0x22')]);}return _0x5939a1['getAgents'](_0x40b135);}})[_0x694d('0x2b')](function(_0x181ea1){if(_0x181ea1){return _0x181ea1?{'count':_0x13a136,'rows':_0x181ea1}:null;}})[_0x694d('0x2b')](respondWithResult(_0x154e3b,null))[_0x694d('0x4d')](handleError(_0x154e3b,null));}; \ No newline at end of file +var _0xab4f=['each','findOrCreate','emit','userWhatsappQueue:save','removeTeams','select','tq.TeamId','from','join','user_has_teams','ut.TeamId\x20=\x20tq.TeamId','clone','push','toString','QueryTypes','SELECT','every','TeamId','includes','all','compact','value','ids','isEmpty','removeAgents','userWhatsappQueue:remove','addAgents','omit','spread','isArray','getAgents','eml-format','fast-json-patch','request-promise','moment','bluebird','mustache','util','path','sox','to-csv','fs-extra','lodash','squel','crypto','jsforce','querystring','ioredis','../../config/license/hardware','../../config/logger','api','../../config/utils','../../mysqldb','defaults','redis','localhost','socket.io-emitter','./whatsappQueue.socket','register','sendStatus','status','end','json','offset','limit','undefined','count','set','apply','reject','save','update','then','get','WhatsappQueues','error','stack','name','send','index','map','WhatsappQueue','rawAttributes','fieldName','key','model','query','keys','filters','intersection','attributes','fields','length','hasOwnProperty','nolimit','order','sort','pick','merge','where','type','VIRTUAL','filter','options','includeAll','include','findAll','rows','catch','params','find','create','body','user','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','UserProfileSection','userProfileId','autoAssociation','destroy','describe','findOne','UserWhatsappQueue','WhatsappQueueId','User','UserId','agent','format','%s/%s','SIP','createdAt','updatedAt','getTeams','Team','addTeams','online','voicePause','interface','flatMap','Agents','sequelize','transaction'];(function(_0x218271,_0x2a7c51){var _0xfe3312=function(_0x176de1){while(--_0x176de1){_0x218271['push'](_0x218271['shift']());}};_0xfe3312(++_0x2a7c51);}(_0xab4f,0x1c9));var _0xfab4=function(_0x2be8c2,_0x14a4b5){_0x2be8c2=_0x2be8c2-0x0;var _0x97f531=_0xab4f[_0x2be8c2];return _0x97f531;};'use strict';var emlformat=require(_0xfab4('0x0'));var rimraf=require('rimraf');var zipdir=require('zip-dir');var jsonpatch=require(_0xfab4('0x1'));var rp=require(_0xfab4('0x2'));var moment=require(_0xfab4('0x3'));var BPromise=require(_0xfab4('0x4'));var Mustache=require(_0xfab4('0x5'));var util=require(_0xfab4('0x6'));var path=require(_0xfab4('0x7'));var sox=require(_0xfab4('0x8'));var csv=require(_0xfab4('0x9'));var ejs=require('ejs');var fs=require('fs');var fs_extra=require(_0xfab4('0xa'));var _=require(_0xfab4('0xb'));var squel=require(_0xfab4('0xc'));var crypto=require(_0xfab4('0xd'));var jsforce=require(_0xfab4('0xe'));var deskjs=require('desk.js');var toCsv=require('to-csv');var querystring=require(_0xfab4('0xf'));var Papa=require('papaparse');var Redis=require(_0xfab4('0x10'));var authService=require('../../components/auth/service');var qs=require('../../components/parsers/qs');var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0xfab4('0x11'));var logger=require(_0xfab4('0x12'))(_0xfab4('0x13'));var utils=require(_0xfab4('0x14'));var config=require('../../config/environment');var licenseUtil=require('../../config/license/util');var db=require(_0xfab4('0x15'))['db'];config['redis']=_[_0xfab4('0x16')](config[_0xfab4('0x17')],{'host':_0xfab4('0x18'),'port':0x18eb});var socket=require(_0xfab4('0x19'))(new Redis(config[_0xfab4('0x17')]));require(_0xfab4('0x1a'))[_0xfab4('0x1b')](socket);function respondWithStatusCode(_0x26c92c,_0x20ad94){_0x20ad94=_0x20ad94||0xcc;return function(_0x4fd27f){if(_0x4fd27f){return _0x26c92c[_0xfab4('0x1c')](_0x20ad94);}return _0x26c92c[_0xfab4('0x1d')](_0x20ad94)[_0xfab4('0x1e')]();};}function respondWithResult(_0x4a1762,_0x389a03){_0x389a03=_0x389a03||0xc8;return function(_0x8fbba1){if(_0x8fbba1){return _0x4a1762[_0xfab4('0x1d')](_0x389a03)[_0xfab4('0x1f')](_0x8fbba1);}};}function respondWithFilteredResult(_0x4b8ea7,_0x52b6a0){return function(_0x53d224){if(_0x53d224){var _0x168693=typeof _0x52b6a0[_0xfab4('0x20')]==='undefined'&&typeof _0x52b6a0[_0xfab4('0x21')]===_0xfab4('0x22');var _0x15f25c=_0x53d224[_0xfab4('0x23')];var _0x213a64=_0x168693?0x0:_0x52b6a0[_0xfab4('0x20')];var _0xaa2c3=_0x168693?_0x53d224['count']:_0x52b6a0[_0xfab4('0x20')]+_0x52b6a0[_0xfab4('0x21')];var _0x39a9f7;if(_0xaa2c3>=_0x15f25c){_0xaa2c3=_0x15f25c;_0x39a9f7=0xc8;}else{_0x39a9f7=0xce;}_0x4b8ea7['status'](_0x39a9f7);return _0x4b8ea7[_0xfab4('0x24')]('Content-Range',_0x213a64+'-'+_0xaa2c3+'/'+_0x15f25c)[_0xfab4('0x1f')](_0x53d224);}return null;};}function patchUpdates(_0x207b90){return function(_0x100eaf){try{jsonpatch[_0xfab4('0x25')](_0x100eaf,_0x207b90,!![]);}catch(_0x39c2d1){return BPromise[_0xfab4('0x26')](_0x39c2d1);}return _0x100eaf[_0xfab4('0x27')]();};}function saveUpdates(_0x3cd7b3,_0x5d30e0){return function(_0x4b7c22){if(_0x4b7c22){return _0x4b7c22[_0xfab4('0x28')](_0x3cd7b3)[_0xfab4('0x29')](function(_0x593aa0){return _0x593aa0;});}return null;};}function removeEntity(_0x596be5,_0x42576e){return function(_0x5c8913){if(_0x5c8913){return _0x5c8913['destroy']()[_0xfab4('0x29')](function(){var _0x4c9039=_0x5c8913[_0xfab4('0x2a')]({'plain':!![]});var _0x23c050=_0xfab4('0x2b');return db['UserProfileResource']['destroy']({'where':{'type':_0x23c050,'resourceId':_0x4c9039['id']}})[_0xfab4('0x29')](function(){return _0x5c8913;});})[_0xfab4('0x29')](function(){_0x596be5['status'](0xcc)['end']();});}};}function handleEntityNotFound(_0xc1893a,_0x5e684){return function(_0xa4308b){if(!_0xa4308b){_0xc1893a[_0xfab4('0x1c')](0x194);}return _0xa4308b;};}function handleError(_0x2106be,_0x37bc7a){_0x37bc7a=_0x37bc7a||0x1f4;return function(_0x3fde17){logger[_0xfab4('0x2c')](_0x3fde17[_0xfab4('0x2d')]);if(_0x3fde17[_0xfab4('0x2e')]){delete _0x3fde17[_0xfab4('0x2e')];}_0x2106be[_0xfab4('0x1d')](_0x37bc7a)[_0xfab4('0x2f')](_0x3fde17);};}exports[_0xfab4('0x30')]=function(_0x363cb9,_0x477ed1){var _0x21a393={},_0xd06d85={},_0x1248a6={'count':0x0,'rows':[]};var _0x5abb71=_[_0xfab4('0x31')](db[_0xfab4('0x32')][_0xfab4('0x33')],function(_0xe23d86){return{'name':_0xe23d86[_0xfab4('0x34')],'type':_0xe23d86['type'][_0xfab4('0x35')]};});_0xd06d85[_0xfab4('0x36')]=_[_0xfab4('0x31')](_0x5abb71,_0xfab4('0x2e'));_0xd06d85[_0xfab4('0x37')]=_[_0xfab4('0x38')](_0x363cb9[_0xfab4('0x37')]);_0xd06d85[_0xfab4('0x39')]=_[_0xfab4('0x3a')](_0xd06d85[_0xfab4('0x36')],_0xd06d85[_0xfab4('0x37')]);_0x21a393[_0xfab4('0x3b')]=_[_0xfab4('0x3a')](_0xd06d85[_0xfab4('0x36')],qs[_0xfab4('0x3c')](_0x363cb9[_0xfab4('0x37')][_0xfab4('0x3c')]));_0x21a393['attributes']=_0x21a393[_0xfab4('0x3b')][_0xfab4('0x3d')]?_0x21a393[_0xfab4('0x3b')]:_0xd06d85[_0xfab4('0x36')];if(!_0x363cb9[_0xfab4('0x37')][_0xfab4('0x3e')](_0xfab4('0x3f'))){_0x21a393[_0xfab4('0x21')]=qs[_0xfab4('0x21')](_0x363cb9[_0xfab4('0x37')]['limit']);_0x21a393[_0xfab4('0x20')]=qs[_0xfab4('0x20')](_0x363cb9[_0xfab4('0x37')][_0xfab4('0x20')]);}_0x21a393[_0xfab4('0x40')]=qs[_0xfab4('0x41')](_0x363cb9[_0xfab4('0x37')][_0xfab4('0x41')]);_0x21a393['where']=qs[_0xfab4('0x39')](_[_0xfab4('0x42')](_0x363cb9[_0xfab4('0x37')],_0xd06d85[_0xfab4('0x39')]),_0x5abb71);if(_0x363cb9[_0xfab4('0x37')]['filter']){_0x21a393['where']=_[_0xfab4('0x43')](_0x21a393[_0xfab4('0x44')],{'$or':_['map'](_0x5abb71,function(_0x225fa8){if(_0x225fa8[_0xfab4('0x45')]!==_0xfab4('0x46')){var _0x55c338={};_0x55c338[_0x225fa8[_0xfab4('0x2e')]]={'$like':'%'+_0x363cb9['query'][_0xfab4('0x47')]+'%'};return _0x55c338;}})});}_0x21a393=_[_0xfab4('0x43')]({},_0x21a393,_0x363cb9[_0xfab4('0x48')]);var _0x177db8={'where':_0x21a393[_0xfab4('0x44')]};return db['WhatsappQueue'][_0xfab4('0x23')](_0x177db8)['then'](function(_0x61404c){_0x1248a6[_0xfab4('0x23')]=_0x61404c;if(_0x363cb9[_0xfab4('0x37')][_0xfab4('0x49')]){_0x21a393[_0xfab4('0x4a')]=[{'all':!![]}];}return db[_0xfab4('0x32')][_0xfab4('0x4b')](_0x21a393);})[_0xfab4('0x29')](function(_0x56c5c2){_0x1248a6[_0xfab4('0x4c')]=_0x56c5c2;return _0x1248a6;})[_0xfab4('0x29')](respondWithFilteredResult(_0x477ed1,_0x21a393))[_0xfab4('0x4d')](handleError(_0x477ed1,null));};exports['show']=function(_0x4533fc,_0x5aa8c4){var _0xf6459e={'raw':!![],'where':{'id':_0x4533fc[_0xfab4('0x4e')]['id']}},_0x4ce1f4={};_0x4ce1f4[_0xfab4('0x36')]=_['keys'](db[_0xfab4('0x32')][_0xfab4('0x33')]);_0x4ce1f4[_0xfab4('0x37')]=_['keys'](_0x4533fc['query']);_0x4ce1f4['filters']=_[_0xfab4('0x3a')](_0x4ce1f4[_0xfab4('0x36')],_0x4ce1f4[_0xfab4('0x37')]);_0xf6459e[_0xfab4('0x3b')]=_['intersection'](_0x4ce1f4['model'],qs[_0xfab4('0x3c')](_0x4533fc[_0xfab4('0x37')]['fields']));_0xf6459e[_0xfab4('0x3b')]=_0xf6459e[_0xfab4('0x3b')][_0xfab4('0x3d')]?_0xf6459e[_0xfab4('0x3b')]:_0x4ce1f4['model'];if(_0x4533fc[_0xfab4('0x37')][_0xfab4('0x49')]){_0xf6459e[_0xfab4('0x4a')]=[{'all':!![]}];}_0xf6459e=_[_0xfab4('0x43')]({},_0xf6459e,_0x4533fc['options']);return db[_0xfab4('0x32')][_0xfab4('0x4f')](_0xf6459e)[_0xfab4('0x29')](handleEntityNotFound(_0x5aa8c4,null))[_0xfab4('0x29')](respondWithResult(_0x5aa8c4,null))[_0xfab4('0x4d')](handleError(_0x5aa8c4,null));};exports[_0xfab4('0x50')]=function(_0x54a2e7,_0x417f2f){return db['WhatsappQueue'][_0xfab4('0x50')](_0x54a2e7[_0xfab4('0x51')],{})[_0xfab4('0x29')](function(_0x11df65){var _0x2885c1=_0x54a2e7[_0xfab4('0x52')][_0xfab4('0x2a')]({'plain':!![]});if(!_0x2885c1)throw new Error(_0xfab4('0x53'));if(_0x2885c1[_0xfab4('0x54')]==='user'){var _0x33ae6f=_0x11df65[_0xfab4('0x2a')]({'plain':!![]});var _0x5b0503='WhatsappQueues';return db[_0xfab4('0x55')][_0xfab4('0x4f')]({'where':{'name':_0x5b0503,'userProfileId':_0x2885c1[_0xfab4('0x56')]},'raw':!![]})['then'](function(_0x11d0f1){if(_0x11d0f1&&_0x11d0f1[_0xfab4('0x57')]===0x0){return db['UserProfileResource'][_0xfab4('0x50')]({'name':_0x33ae6f[_0xfab4('0x2e')],'resourceId':_0x33ae6f['id'],'type':_0x11d0f1[_0xfab4('0x2e')],'sectionId':_0x11d0f1['id']},{})[_0xfab4('0x29')](function(){return _0x11df65;});}else{return _0x11df65;}})[_0xfab4('0x4d')](function(_0x4a8e33){logger['error']('Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s',_0x4a8e33);throw _0x4a8e33;});}return _0x11df65;})['then'](respondWithResult(_0x417f2f,0xc9))['catch'](handleError(_0x417f2f,null));};exports[_0xfab4('0x28')]=function(_0x569592,_0x4ade2c){if(_0x569592[_0xfab4('0x51')]['id']){delete _0x569592['body']['id'];}return db[_0xfab4('0x32')][_0xfab4('0x4f')]({'where':{'id':_0x569592[_0xfab4('0x4e')]['id']}})[_0xfab4('0x29')](handleEntityNotFound(_0x4ade2c,null))[_0xfab4('0x29')](saveUpdates(_0x569592[_0xfab4('0x51')],null))[_0xfab4('0x29')](respondWithResult(_0x4ade2c,null))[_0xfab4('0x4d')](handleError(_0x4ade2c,null));};exports[_0xfab4('0x58')]=function(_0x5ab75c,_0x32f0da){return db[_0xfab4('0x32')][_0xfab4('0x4f')]({'where':{'id':_0x5ab75c['params']['id']}})[_0xfab4('0x29')](handleEntityNotFound(_0x32f0da,null))[_0xfab4('0x29')](removeEntity(_0x32f0da,null))[_0xfab4('0x4d')](handleError(_0x32f0da,null));};exports['describe']=function(_0x48f8bf,_0x20e65d){return db[_0xfab4('0x32')][_0xfab4('0x59')]()['then'](respondWithResult(_0x20e65d,null))[_0xfab4('0x4d')](handleError(_0x20e65d,null));};exports['getMembers']=function(_0x78ee36,_0x2c4f3a,_0x251f69){var _0x3dd702={'raw':!![],'where':{}},_0x4b3d1a={},_0x17abc0;return db['WhatsappQueue'][_0xfab4('0x5a')]({'where':{'id':_0x78ee36[_0xfab4('0x4e')]['id']}})[_0xfab4('0x29')](handleEntityNotFound(_0x2c4f3a,null))[_0xfab4('0x29')](function(_0xb40c15){if(_0xb40c15){_0x17abc0=_0xb40c15[_0xfab4('0x2a')]({'plain':!![]});_0x4b3d1a[_0xfab4('0x36')]=_[_0xfab4('0x38')](db[_0xfab4('0x5b')][_0xfab4('0x33')]);_0x4b3d1a[_0xfab4('0x37')]=_[_0xfab4('0x38')](_0x78ee36[_0xfab4('0x37')]);_0x4b3d1a[_0xfab4('0x39')]=_[_0xfab4('0x3a')](_0x4b3d1a[_0xfab4('0x36')],_0x4b3d1a['query']);_0x3dd702[_0xfab4('0x3b')]=_['intersection'](_0x4b3d1a['model'],qs[_0xfab4('0x3c')](_0x78ee36[_0xfab4('0x37')][_0xfab4('0x3c')]));_0x3dd702[_0xfab4('0x3b')]=_0x3dd702['attributes'][_0xfab4('0x3d')]?_0x3dd702[_0xfab4('0x3b')]:_0x4b3d1a['model'];if(!_0x78ee36['query'][_0xfab4('0x3e')](_0xfab4('0x3f'))){_0x3dd702[_0xfab4('0x21')]=qs[_0xfab4('0x21')](_0x78ee36[_0xfab4('0x37')][_0xfab4('0x21')]);_0x3dd702[_0xfab4('0x20')]=qs['offset'](_0x78ee36[_0xfab4('0x37')][_0xfab4('0x20')]);}_0x3dd702[_0xfab4('0x40')]=qs[_0xfab4('0x41')](_0x78ee36[_0xfab4('0x37')][_0xfab4('0x41')]);_0x3dd702['where']=qs[_0xfab4('0x39')](_['pick'](_0x78ee36[_0xfab4('0x37')],_0x4b3d1a['filters']));_0x3dd702[_0xfab4('0x44')][_0xfab4('0x5c')]=_0xb40c15['id'];if(_0x78ee36[_0xfab4('0x37')]['filter']){_0x3dd702['where']=_[_0xfab4('0x43')](_0x3dd702[_0xfab4('0x44')],{'$or':_[_0xfab4('0x31')](_0x3dd702[_0xfab4('0x3b')],function(_0x180afe){var _0x41a73b={};_0x41a73b[_0x180afe]={'$like':'%'+_0x78ee36[_0xfab4('0x37')][_0xfab4('0x47')]+'%'};return _0x41a73b;})});}_0x3dd702=_['merge']({},_0x3dd702,_0x78ee36[_0xfab4('0x48')]);return db[_0xfab4('0x5b')][_0xfab4('0x4b')](_0x3dd702);}})[_0xfab4('0x29')](function(_0x5aa40e){if(_0x5aa40e){return db[_0xfab4('0x5d')]['findAndCountAll']({'where':{'id':_['map'](_0x5aa40e,_0xfab4('0x5e')),'role':_0xfab4('0x5f')},'attributes':['id',_0xfab4('0x2e'),'whatsappPause','updatedAt','createdAt']});}})[_0xfab4('0x29')](function(_0x2896eb){if(_0x2896eb){return{'count':_0x2896eb[_0xfab4('0x23')],'rows':_[_0xfab4('0x31')](_0x2896eb[_0xfab4('0x4c')],function(_0x278021){return{'membername':_0x278021['name'],'UserId':_0x278021['id'],'queue_name':_0x17abc0[_0xfab4('0x2e')],'WhatsappQueueId':_0x17abc0['id'],'interface':util[_0xfab4('0x60')](_0xfab4('0x61'),_0xfab4('0x62'),_0x278021[_0xfab4('0x2e')]),'penalty':0x0,'paused':_0x278021['whatsappPause'],'createdAt':_0x278021[_0xfab4('0x63')],'updatedAt':_0x278021[_0xfab4('0x64')]};})};}else{return{'count':0x0,'rows':[]};}})['then'](respondWithFilteredResult(_0x2c4f3a,_0x3dd702))[_0xfab4('0x4d')](handleError(_0x2c4f3a,null));};exports[_0xfab4('0x65')]=function(_0x1d00f6,_0x401f38,_0x48b7a1){var _0x1cffa9={};var _0x3de26b={};var _0x39b9e7;var _0x23dab3;return db[_0xfab4('0x32')][_0xfab4('0x5a')]({'where':{'id':_0x1d00f6[_0xfab4('0x4e')]['id']}})['then'](handleEntityNotFound(_0x401f38,null))['then'](function(_0x15340b){if(_0x15340b){_0x39b9e7=_0x15340b;_0x3de26b['model']=_[_0xfab4('0x38')](db[_0xfab4('0x66')][_0xfab4('0x33')]);_0x3de26b[_0xfab4('0x37')]=_['keys'](_0x1d00f6[_0xfab4('0x37')]);_0x3de26b[_0xfab4('0x39')]=_[_0xfab4('0x3a')](_0x3de26b[_0xfab4('0x36')],_0x3de26b[_0xfab4('0x37')]);_0x1cffa9[_0xfab4('0x3b')]=_['intersection'](_0x3de26b['model'],qs['fields'](_0x1d00f6[_0xfab4('0x37')][_0xfab4('0x3c')]));_0x1cffa9['attributes']=_0x1cffa9[_0xfab4('0x3b')][_0xfab4('0x3d')]?_0x1cffa9['attributes']:_0x3de26b['model'];_0x1cffa9[_0xfab4('0x40')]=qs[_0xfab4('0x41')](_0x1d00f6['query'][_0xfab4('0x41')]);_0x1cffa9[_0xfab4('0x44')]=qs[_0xfab4('0x39')](_[_0xfab4('0x42')](_0x1d00f6[_0xfab4('0x37')],_0x3de26b[_0xfab4('0x39')]));if(_0x1d00f6['query'][_0xfab4('0x47')]){_0x1cffa9[_0xfab4('0x44')]=_[_0xfab4('0x43')](_0x1cffa9[_0xfab4('0x44')],{'$or':_[_0xfab4('0x31')](_0x1cffa9[_0xfab4('0x3b')],function(_0x3e77a2){var _0x25aa64={};_0x25aa64[_0x3e77a2]={'$like':'%'+_0x1d00f6[_0xfab4('0x37')][_0xfab4('0x47')]+'%'};return _0x25aa64;})});}_0x1cffa9=_[_0xfab4('0x43')]({},_0x1cffa9,_0x1d00f6[_0xfab4('0x48')]);return _0x39b9e7[_0xfab4('0x65')](_0x1cffa9);}})['then'](function(_0x11d990){if(_0x11d990){_0x23dab3=_0x11d990[_0xfab4('0x3d')];if(!_0x1d00f6[_0xfab4('0x37')][_0xfab4('0x3e')](_0xfab4('0x3f'))){_0x1cffa9[_0xfab4('0x21')]=qs[_0xfab4('0x21')](_0x1d00f6[_0xfab4('0x37')][_0xfab4('0x21')]);_0x1cffa9['offset']=qs['offset'](_0x1d00f6['query'][_0xfab4('0x20')]);}return _0x39b9e7[_0xfab4('0x65')](_0x1cffa9);}})[_0xfab4('0x29')](function(_0x100b4f){if(_0x100b4f){return _0x100b4f?{'count':_0x23dab3,'rows':_0x100b4f}:null;}})[_0xfab4('0x29')](respondWithResult(_0x401f38,null))[_0xfab4('0x4d')](handleError(_0x401f38,null));};exports[_0xfab4('0x67')]=function(_0x5aef02,_0x2ba97d,_0x5429fc){var _0x4a8e1a=_0x5aef02[_0xfab4('0x51')]['ids'];return db[_0xfab4('0x66')][_0xfab4('0x4b')]({'where':{'id':_0x4a8e1a},'attributes':['id'],'include':[{'model':db[_0xfab4('0x5d')],'as':'Agents','attributes':['id',_0xfab4('0x2e'),_0xfab4('0x68'),_0xfab4('0x69'),_0xfab4('0x6a')],'raw':!![]}]})[_0xfab4('0x29')](function(_0x8351eb){if(_0x8351eb){var _0x1c89a6=_[_0xfab4('0x6b')](_0x8351eb,function(_0x4db486){var _0x53505e=_0x4db486[_0xfab4('0x2a')]({'plain':!![]});return _0x53505e[_0xfab4('0x6c')];});return db['WhatsappQueue'][_0xfab4('0x4f')]({'where':{'id':_0x5aef02[_0xfab4('0x4e')]['id']}})[_0xfab4('0x29')](function(_0x50708a){return db[_0xfab4('0x6d')][_0xfab4('0x6e')](function(_0x329329){return _0x50708a[_0xfab4('0x67')](_0x4a8e1a,{'transaction':_0x329329})[_0xfab4('0x29')](function(){return BPromise[_0xfab4('0x6f')](_0x1c89a6,function(_0x30cf68){return db[_0xfab4('0x5b')][_0xfab4('0x70')]({'where':{'UserId':_0x30cf68['id'],'WhatsappQueueId':_0x5aef02['params']['id']},'transaction':_0x329329});});})[_0xfab4('0x29')](function(){_0x1c89a6['forEach'](function(_0x9e3b2c){socket[_0xfab4('0x71')](_0xfab4('0x72'),{'UserId':_0x9e3b2c['id'],'WhatsappQueueId':_0x50708a['id']});});});});});}})[_0xfab4('0x29')](respondWithStatusCode(_0x2ba97d,null))['catch'](handleError(_0x2ba97d,null));};exports[_0xfab4('0x73')]=function(_0xa205d,_0x213298,_0x19ba87){return db[_0xfab4('0x66')][_0xfab4('0x4b')]({'where':{'id':_0xa205d[_0xfab4('0x37')]['ids']},'attributes':['id'],'include':[{'model':db['User'],'as':_0xfab4('0x6c'),'attributes':['id'],'raw':!![]}]})[_0xfab4('0x29')](handleEntityNotFound(_0x213298,null))[_0xfab4('0x29')](function(_0x30636c){var _0x248fb4=_[_0xfab4('0x31')](_0x30636c,'id');var _0xa870cb=[];var _0x34cfcc=[];var _0x9828a6=squel[_0xfab4('0x74')]();_0x9828a6['field'](_0xfab4('0x75'))[_0xfab4('0x76')]('team_has_whatsapp_queues','tq')[_0xfab4('0x77')](_0xfab4('0x78'),'ut',_0xfab4('0x79'))[_0xfab4('0x44')]('WhatsappQueueId\x20=\x20?',_0xa205d[_0xfab4('0x4e')]['id']);for(var _0x589334=0x0;_0x589334<_0x30636c['length'];_0x589334+=0x1){let _0x5315ef=_0x30636c[_0x589334];for(var _0x4c6b76=0x0;_0x4c6b76<_0x5315ef['Agents']['length'];_0x4c6b76+=0x1){let _0x3e892e=_0x5315ef[_0xfab4('0x6c')][_0x4c6b76];var _0x24b2cb=_0x9828a6[_0xfab4('0x7a')]();_0x24b2cb[_0xfab4('0x44')]('ut.UserId\x20=\x20?',_0x3e892e['id']);_0x34cfcc[_0xfab4('0x7b')](db[_0xfab4('0x6d')]['query'](_0x24b2cb[_0xfab4('0x7c')](),{'type':db[_0xfab4('0x6d')][_0xfab4('0x7d')][_0xfab4('0x7e')]})[_0xfab4('0x29')](function(_0x3683a5){if(_0x3683a5['length']===0x1){return _0x3e892e['id'];}else{var _0x16a3ab=_[_0xfab4('0x7f')](_[_0xfab4('0x31')](_0x3683a5,_0xfab4('0x80')),function(_0x58e115){return _[_0xfab4('0x81')](_0x248fb4,_0x58e115);});if(_0x16a3ab){return _0x3e892e['id'];}}}));}}return BPromise[_0xfab4('0x82')](_0x34cfcc)[_0xfab4('0x29')](function(_0x268358){_0xa870cb=_(_0xa870cb)['union'](_0x268358)[_0xfab4('0x83')]()[_0xfab4('0x84')]();return db[_0xfab4('0x32')][_0xfab4('0x4f')]({'where':{'id':_0xa205d[_0xfab4('0x4e')]['id']}})[_0xfab4('0x29')](function(_0x41746f){return db[_0xfab4('0x6d')][_0xfab4('0x6e')](function(_0x5d832b){return _0x41746f[_0xfab4('0x73')](_0xa205d[_0xfab4('0x37')][_0xfab4('0x85')],{'transaction':_0x5d832b})[_0xfab4('0x29')](function(){if(!_[_0xfab4('0x86')](_0xa870cb)){return _0x41746f[_0xfab4('0x87')](_0xa870cb,{'transaction':_0x5d832b});}})[_0xfab4('0x29')](function(){_0xa870cb['forEach'](function(_0x1c194c){socket[_0xfab4('0x71')](_0xfab4('0x88'),{'UserId':_0x1c194c,'WhatsappQueueId':_0x41746f['id']});});});});});});})['then'](respondWithStatusCode(_0x213298,null))[_0xfab4('0x4d')](handleError(_0x213298,null));};exports['addAgents']=function(_0x2aa664,_0x45f7a1,_0x4826ef){return db[_0xfab4('0x32')][_0xfab4('0x4f')]({'where':{'id':_0x2aa664[_0xfab4('0x4e')]['id']}})[_0xfab4('0x29')](handleEntityNotFound(_0x45f7a1,null))[_0xfab4('0x29')](function(_0x4b733d){if(_0x4b733d){return _0x4b733d[_0xfab4('0x89')](_0x2aa664[_0xfab4('0x51')][_0xfab4('0x85')],_[_0xfab4('0x8a')](_0x2aa664[_0xfab4('0x51')],[_0xfab4('0x85'),'id'])||{})[_0xfab4('0x8b')](function(_0x134469){for(var _0x506408=0x0;_0x506408<_0x2aa664[_0xfab4('0x51')][_0xfab4('0x85')]['length'];_0x506408+=0x1){socket[_0xfab4('0x71')]('userWhatsappQueue:save',{'UserId':Number(_0x2aa664[_0xfab4('0x51')][_0xfab4('0x85')][_0x506408]),'WhatsappQueueId':Number(_0x2aa664[_0xfab4('0x4e')]['id'])});}return _0x134469;});}})[_0xfab4('0x29')](respondWithResult(_0x45f7a1,null))['catch'](handleError(_0x45f7a1,null));};exports[_0xfab4('0x87')]=function(_0x935c05,_0x5b51d5,_0x1d2f49){return db[_0xfab4('0x32')]['find']({'where':{'id':_0x935c05[_0xfab4('0x4e')]['id']}})[_0xfab4('0x29')](handleEntityNotFound(_0x5b51d5,null))[_0xfab4('0x29')](function(_0xe9a375){if(_0xe9a375){return _0xe9a375[_0xfab4('0x87')](_0x935c05[_0xfab4('0x37')]['ids'])['then'](function(){if(_[_0xfab4('0x8c')](_0x935c05['query']['ids'])){for(var _0x16ffdd=0x0;_0x16ffdd<_0x935c05['query'][_0xfab4('0x85')][_0xfab4('0x3d')];_0x16ffdd+=0x1){socket['emit'](_0xfab4('0x88'),{'UserId':Number(_0x935c05['query']['ids'][_0x16ffdd]),'WhatsappQueueId':Number(_0x935c05[_0xfab4('0x4e')]['id'])});}}else{socket[_0xfab4('0x71')](_0xfab4('0x88'),{'UserId':Number(_0x935c05[_0xfab4('0x37')][_0xfab4('0x85')]),'WhatsappQueueId':Number(_0x935c05[_0xfab4('0x4e')]['id'])});}});}})[_0xfab4('0x29')](respondWithStatusCode(_0x5b51d5,null))[_0xfab4('0x4d')](handleError(_0x5b51d5,null));};exports[_0xfab4('0x8d')]=function(_0x11aa7f,_0x12cc45,_0x4fb2af){var _0x588f3a={};var _0x38e502={};var _0x1c184a;var _0x1c4e90;return db[_0xfab4('0x32')][_0xfab4('0x5a')]({'where':{'id':_0x11aa7f[_0xfab4('0x4e')]['id']}})[_0xfab4('0x29')](handleEntityNotFound(_0x12cc45,null))[_0xfab4('0x29')](function(_0x47e1dd){if(_0x47e1dd){_0x1c184a=_0x47e1dd;_0x38e502['model']=_[_0xfab4('0x38')](db[_0xfab4('0x5d')][_0xfab4('0x33')]);_0x38e502[_0xfab4('0x37')]=_[_0xfab4('0x38')](_0x11aa7f[_0xfab4('0x37')]);_0x38e502[_0xfab4('0x39')]=_['intersection'](_0x38e502['model'],_0x38e502[_0xfab4('0x37')]);_0x588f3a[_0xfab4('0x3b')]=_[_0xfab4('0x3a')](_0x38e502['model'],qs[_0xfab4('0x3c')](_0x11aa7f[_0xfab4('0x37')]['fields']));_0x588f3a['attributes']=_0x588f3a[_0xfab4('0x3b')]['length']?_0x588f3a[_0xfab4('0x3b')]:_0x38e502[_0xfab4('0x36')];_0x588f3a[_0xfab4('0x40')]=qs[_0xfab4('0x41')](_0x11aa7f[_0xfab4('0x37')][_0xfab4('0x41')]);_0x588f3a[_0xfab4('0x44')]=qs[_0xfab4('0x39')](_[_0xfab4('0x42')](_0x11aa7f[_0xfab4('0x37')],_0x38e502['filters']));if(_0x11aa7f[_0xfab4('0x37')][_0xfab4('0x47')]){_0x588f3a[_0xfab4('0x44')]=_[_0xfab4('0x43')](_0x588f3a[_0xfab4('0x44')],{'$or':_['map'](_0x588f3a['attributes'],function(_0x2d9f20){var _0x1d43eb={};_0x1d43eb[_0x2d9f20]={'$like':'%'+_0x11aa7f[_0xfab4('0x37')][_0xfab4('0x47')]+'%'};return _0x1d43eb;})});}_0x588f3a=_[_0xfab4('0x43')]({},_0x588f3a,_0x11aa7f[_0xfab4('0x48')]);return _0x1c184a[_0xfab4('0x8d')](_0x588f3a);}})[_0xfab4('0x29')](function(_0x2cbb9b){if(_0x2cbb9b){_0x1c4e90=_0x2cbb9b['length'];if(!_0x11aa7f[_0xfab4('0x37')]['hasOwnProperty'](_0xfab4('0x3f'))){_0x588f3a['limit']=qs[_0xfab4('0x21')](_0x11aa7f[_0xfab4('0x37')][_0xfab4('0x21')]);_0x588f3a[_0xfab4('0x20')]=qs[_0xfab4('0x20')](_0x11aa7f[_0xfab4('0x37')][_0xfab4('0x20')]);}return _0x1c184a[_0xfab4('0x8d')](_0x588f3a);}})[_0xfab4('0x29')](function(_0x19a810){if(_0x19a810){return _0x19a810?{'count':_0x1c4e90,'rows':_0x19a810}:null;}})[_0xfab4('0x29')](respondWithResult(_0x12cc45,null))['catch'](handleError(_0x12cc45,null));}; \ No newline at end of file diff --git a/server/api/whatsappQueue/whatsappQueue.events.js b/server/api/whatsappQueue/whatsappQueue.events.js index 9be9437..250a724 100644 --- a/server/api/whatsappQueue/whatsappQueue.events.js +++ b/server/api/whatsappQueue/whatsappQueue.events.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xd4be=['events','../../mysqldb','WhatsappQueue','setMaxListeners','remove','emit','hasOwnProperty','hook'];(function(_0x532631,_0x54689e){var _0x562c40=function(_0x1eaeb3){while(--_0x1eaeb3){_0x532631['push'](_0x532631['shift']());}};_0x562c40(++_0x54689e);}(_0xd4be,0x180));var _0xed4b=function(_0x35dd5e,_0x5c8bd4){_0x35dd5e=_0x35dd5e-0x0;var _0x37fd71=_0xd4be[_0x35dd5e];return _0x37fd71;};'use strict';var EventEmitter=require(_0xed4b('0x0'));var WhatsappQueue=require(_0xed4b('0x1'))['db'][_0xed4b('0x2')];var WhatsappQueueEvents=new EventEmitter();WhatsappQueueEvents[_0xed4b('0x3')](0x0);var events={'afterCreate':'save','afterUpdate':'update','afterDestroy':_0xed4b('0x4')};function emitEvent(_0x53d301){return function(_0x53858c,_0x5109ce,_0x3e5357){WhatsappQueueEvents[_0xed4b('0x5')](_0x53d301+':'+_0x53858c['id'],_0x53858c);WhatsappQueueEvents[_0xed4b('0x5')](_0x53d301,_0x53858c);_0x3e5357(null);};}for(var e in events){if(events[_0xed4b('0x6')](e)){var event=events[e];WhatsappQueue[_0xed4b('0x7')](e,emitEvent(event));}}module['exports']=WhatsappQueueEvents; \ No newline at end of file +var _0xb283=['WhatsappQueue','save','update','remove','emit','hasOwnProperty','hook','exports','events'];(function(_0x57b54c,_0x54ce0d){var _0x59cc19=function(_0xa33bc6){while(--_0xa33bc6){_0x57b54c['push'](_0x57b54c['shift']());}};_0x59cc19(++_0x54ce0d);}(_0xb283,0x182));var _0x3b28=function(_0x31179a,_0x2b61e0){_0x31179a=_0x31179a-0x0;var _0x5ca88c=_0xb283[_0x31179a];return _0x5ca88c;};'use strict';var EventEmitter=require(_0x3b28('0x0'));var WhatsappQueue=require('../../mysqldb')['db'][_0x3b28('0x1')];var WhatsappQueueEvents=new EventEmitter();WhatsappQueueEvents['setMaxListeners'](0x0);var events={'afterCreate':_0x3b28('0x2'),'afterUpdate':_0x3b28('0x3'),'afterDestroy':_0x3b28('0x4')};function emitEvent(_0x384f1a){return function(_0x1e1a26,_0xed0daf,_0x3485fc){WhatsappQueueEvents[_0x3b28('0x5')](_0x384f1a+':'+_0x1e1a26['id'],_0x1e1a26);WhatsappQueueEvents[_0x3b28('0x5')](_0x384f1a,_0x1e1a26);_0x3485fc(null);};}for(var e in events){if(events[_0x3b28('0x6')](e)){var event=events[e];WhatsappQueue[_0x3b28('0x7')](e,emitEvent(event));}}module[_0x3b28('0x8')]=WhatsappQueueEvents; \ No newline at end of file diff --git a/server/api/whatsappQueue/whatsappQueue.model.js b/server/api/whatsappQueue/whatsappQueue.model.js index b124472..82fd7d4 100644 --- a/server/api/whatsappQueue/whatsappQueue.model.js +++ b/server/api/whatsappQueue/whatsappQueue.model.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x0238=['path','rimraf','../../config/environment','./whatsappQueue.attributes','define','whatsapp_queues','lodash','../../config/logger','api','moment','bluebird','request-promise'];(function(_0x2a67bc,_0x4c5421){var _0x54bf93=function(_0x25e6e5){while(--_0x25e6e5){_0x2a67bc['push'](_0x2a67bc['shift']());}};_0x54bf93(++_0x4c5421);}(_0x0238,0x1c2));var _0x8023=function(_0x13e724,_0x296739){_0x13e724=_0x13e724-0x0;var _0x334a44=_0x0238[_0x13e724];return _0x334a44;};'use strict';var _=require(_0x8023('0x0'));var util=require('util');var logger=require(_0x8023('0x1'))(_0x8023('0x2'));var moment=require(_0x8023('0x3'));var BPromise=require(_0x8023('0x4'));var rp=require(_0x8023('0x5'));var fs=require('fs');var path=require(_0x8023('0x6'));var rimraf=require(_0x8023('0x7'));var config=require(_0x8023('0x8'));var attributes=require(_0x8023('0x9'));module['exports']=function(_0xea82e4,_0x2a846a){return _0xea82e4[_0x8023('0xa')]('WhatsappQueue',attributes,{'tableName':_0x8023('0xb'),'paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file +var _0x2852=['request-promise','rimraf','../../config/environment','./whatsappQueue.attributes','exports','define','WhatsappQueue','whatsapp_queues','util','../../config/logger','api','moment'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0x2852,0xc8));var _0x2285=function(_0x174996,_0x56edb4){_0x174996=_0x174996-0x0;var _0x2b63bf=_0x2852[_0x174996];return _0x2b63bf;};'use strict';var _=require('lodash');var util=require(_0x2285('0x0'));var logger=require(_0x2285('0x1'))(_0x2285('0x2'));var moment=require(_0x2285('0x3'));var BPromise=require('bluebird');var rp=require(_0x2285('0x4'));var fs=require('fs');var path=require('path');var rimraf=require(_0x2285('0x5'));var config=require(_0x2285('0x6'));var attributes=require(_0x2285('0x7'));module[_0x2285('0x8')]=function(_0x84adb4,_0x4f33be){return _0x84adb4[_0x2285('0x9')](_0x2285('0xa'),attributes,{'tableName':_0x2285('0xb'),'paranoid':![],'indexes':[],'timestamps':!![]});}; \ No newline at end of file diff --git a/server/api/whatsappQueue/whatsappQueue.rpc.js b/server/api/whatsappQueue/whatsappQueue.rpc.js index 9fae518..e260511 100644 --- a/server/api/whatsappQueue/whatsappQueue.rpc.js +++ b/server/api/whatsappQueue/whatsappQueue.rpc.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xa193=['catch','GetWhatsappQueue','WhatsappQueue','findAll','options','raw','where','attributes','limit','include','map','model','ShowWhatsappQueue','find','debug','moment','bluebird','randomstring','../../mysqldb','../../config/utils','rpc','../../config/environment','jayson/promise','client','http','redis','localhost','socket.io-emitter','./whatsappQueue.socket','request','then','info','WhatsappQueue,\x20%s,\x20%s','request\x20sent','WhatsappQueue,\x20%s,\x20%s,\x20%s','stringify','code','error','message','result'];(function(_0x2235bf,_0x3a06a7){var _0x4c3a64=function(_0x3b3bb6){while(--_0x3b3bb6){_0x2235bf['push'](_0x2235bf['shift']());}};_0x4c3a64(++_0x3a06a7);}(_0xa193,0xd7));var _0x3a19=function(_0x46fdf3,_0x1b4021){_0x46fdf3=_0x46fdf3-0x0;var _0x56c82b=_0xa193[_0x46fdf3];return _0x56c82b;};'use strict';var _=require('lodash');var util=require('util');var moment=require(_0x3a19('0x0'));var BPromise=require(_0x3a19('0x1'));var rs=require(_0x3a19('0x2'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0x3a19('0x3'))['db'];var utils=require(_0x3a19('0x4'));var logger=require('../../config/logger')(_0x3a19('0x5'));var config=require(_0x3a19('0x6'));var jayson=require(_0x3a19('0x7'));var client=jayson[_0x3a19('0x8')][_0x3a19('0x9')]({'port':0x232a});config[_0x3a19('0xa')]=_['defaults'](config['redis'],{'host':_0x3a19('0xb'),'port':0x18eb});var socket=require(_0x3a19('0xc'))(new Redis(config[_0x3a19('0xa')]));require(_0x3a19('0xd'))['register'](socket);function respondWithRpcPromise(_0x2156ac,_0x8d62ac,_0x6d0f18){return new BPromise(function(_0x54b7e2,_0x52fa7e){return client[_0x3a19('0xe')](_0x2156ac,_0x6d0f18)[_0x3a19('0xf')](function(_0x402808){logger[_0x3a19('0x10')](_0x3a19('0x11'),_0x8d62ac,_0x3a19('0x12'));logger['debug'](_0x3a19('0x13'),_0x8d62ac,_0x3a19('0x12'),JSON[_0x3a19('0x14')](_0x402808));if(_0x402808['error']){if(_0x402808['error'][_0x3a19('0x15')]===0x1f4){logger[_0x3a19('0x16')](_0x3a19('0x11'),_0x8d62ac,_0x402808[_0x3a19('0x16')][_0x3a19('0x17')]);return _0x52fa7e(_0x402808[_0x3a19('0x16')][_0x3a19('0x17')]);}logger['error'](_0x3a19('0x11'),_0x8d62ac,_0x402808['error'][_0x3a19('0x17')]);return _0x54b7e2(_0x402808[_0x3a19('0x16')]['message']);}else{logger['info']('WhatsappQueue,\x20%s,\x20%s',_0x8d62ac,_0x3a19('0x12'));_0x54b7e2(_0x402808[_0x3a19('0x18')][_0x3a19('0x17')]);}})[_0x3a19('0x19')](function(_0x35c0fb){logger[_0x3a19('0x16')](_0x3a19('0x11'),_0x8d62ac,_0x35c0fb);_0x52fa7e(_0x35c0fb);});});}exports[_0x3a19('0x1a')]=function(_0x1745e9){var _0x12b382=this;return new Promise(function(_0x5a1be9,_0x275918){return db[_0x3a19('0x1b')][_0x3a19('0x1c')]({'raw':_0x1745e9['options']?_0x1745e9[_0x3a19('0x1d')][_0x3a19('0x1e')]===undefined?!![]:![]:!![],'where':_0x1745e9[_0x3a19('0x1d')]?_0x1745e9[_0x3a19('0x1d')][_0x3a19('0x1f')]||null:null,'attributes':_0x1745e9[_0x3a19('0x1d')]?_0x1745e9[_0x3a19('0x1d')][_0x3a19('0x20')]||null:null,'limit':_0x1745e9[_0x3a19('0x1d')]?_0x1745e9[_0x3a19('0x1d')][_0x3a19('0x21')]||null:null,'include':_0x1745e9[_0x3a19('0x1d')]?_0x1745e9['options'][_0x3a19('0x22')]?_[_0x3a19('0x23')](_0x1745e9[_0x3a19('0x1d')]['include'],function(_0x50cae4){return{'model':db[_0x50cae4[_0x3a19('0x24')]],'as':_0x50cae4['as'],'attributes':_0x50cae4['attributes'],'include':_0x50cae4[_0x3a19('0x22')]?_[_0x3a19('0x23')](_0x50cae4['include'],function(_0x421e48){return{'model':db[_0x421e48[_0x3a19('0x24')]],'as':_0x421e48['as'],'attributes':_0x421e48[_0x3a19('0x20')],'include':_0x421e48[_0x3a19('0x22')]?_[_0x3a19('0x23')](_0x421e48['include'],function(_0x2c1ab4){return{'model':db[_0x2c1ab4[_0x3a19('0x24')]],'as':_0x2c1ab4['as'],'attributes':_0x2c1ab4['attributes']};}):[]};}):[]};}):[]:[]})[_0x3a19('0xf')](function(_0x5d1df7){logger[_0x3a19('0x10')](_0x3a19('0x1a'),_0x1745e9);logger['debug'](_0x3a19('0x1a'),_0x1745e9,JSON[_0x3a19('0x14')](_0x5d1df7));_0x5a1be9(_0x5d1df7);})[_0x3a19('0x19')](function(_0x5438e4){logger[_0x3a19('0x16')]('GetWhatsappQueue',_0x5438e4['message'],_0x1745e9);_0x275918(_0x12b382['error'](0x1f4,_0x5438e4[_0x3a19('0x17')]));});});};exports[_0x3a19('0x25')]=function(_0xdb2ea2){var _0x255aba=this;return new Promise(function(_0x346c5a,_0x38f38f){return db[_0x3a19('0x1b')][_0x3a19('0x26')]({'raw':_0xdb2ea2[_0x3a19('0x1d')]?_0xdb2ea2[_0x3a19('0x1d')][_0x3a19('0x1e')]===undefined?!![]:![]:!![],'where':_0xdb2ea2[_0x3a19('0x1d')]?_0xdb2ea2[_0x3a19('0x1d')][_0x3a19('0x1f')]||null:null,'attributes':_0xdb2ea2[_0x3a19('0x1d')]?_0xdb2ea2[_0x3a19('0x1d')][_0x3a19('0x20')]||null:null,'include':_0xdb2ea2['options']?_0xdb2ea2['options']['include']?_[_0x3a19('0x23')](_0xdb2ea2[_0x3a19('0x1d')][_0x3a19('0x22')],function(_0xfbe04b){return{'model':db[_0xfbe04b['model']],'as':_0xfbe04b['as'],'attributes':_0xfbe04b[_0x3a19('0x20')],'include':_0xfbe04b[_0x3a19('0x22')]?_['map'](_0xfbe04b[_0x3a19('0x22')],function(_0x1c5079){return{'model':db[_0x1c5079[_0x3a19('0x24')]],'as':_0x1c5079['as'],'attributes':_0x1c5079[_0x3a19('0x20')],'include':_0x1c5079[_0x3a19('0x22')]?_[_0x3a19('0x23')](_0x1c5079[_0x3a19('0x22')],function(_0x5c7a2d){return{'model':db[_0x5c7a2d[_0x3a19('0x24')]],'as':_0x5c7a2d['as'],'attributes':_0x5c7a2d['attributes']};}):[]};}):[]};}):[]:[]})[_0x3a19('0xf')](function(_0x2b6c11){logger['info'](_0x3a19('0x25'),_0xdb2ea2);logger[_0x3a19('0x27')]('ShowWhatsappQueue',_0xdb2ea2,JSON[_0x3a19('0x14')](_0x2b6c11));_0x346c5a(_0x2b6c11);})[_0x3a19('0x19')](function(_0x550f23){logger[_0x3a19('0x16')]('ShowWhatsappQueue',_0x550f23[_0x3a19('0x17')],_0xdb2ea2);_0x38f38f(_0x255aba[_0x3a19('0x16')](0x1f4,_0x550f23['message']));});});}; \ No newline at end of file +var _0x7707=['include','map','model','attributes','then','info','GetWhatsappQueue','debug','ShowWhatsappQueue','find','lodash','util','moment','bluebird','randomstring','ioredis','../../config/logger','rpc','../../config/environment','jayson/promise','http','redis','defaults','localhost','socket.io-emitter','./whatsappQueue.socket','register','WhatsappQueue,\x20%s,\x20%s','WhatsappQueue,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','code','message','result','catch','WhatsappQueue','findAll','options','raw','where','limit'];(function(_0x5e4c34,_0x387a28){var _0xfd8fb0=function(_0x1fed41){while(--_0x1fed41){_0x5e4c34['push'](_0x5e4c34['shift']());}};_0xfd8fb0(++_0x387a28);}(_0x7707,0x15a));var _0x7770=function(_0x2a796d,_0x36b7ea){_0x2a796d=_0x2a796d-0x0;var _0x2bff7c=_0x7707[_0x2a796d];return _0x2bff7c;};'use strict';var _=require(_0x7770('0x0'));var util=require(_0x7770('0x1'));var moment=require(_0x7770('0x2'));var BPromise=require(_0x7770('0x3'));var rs=require(_0x7770('0x4'));var fs=require('fs');var Redis=require(_0x7770('0x5'));var db=require('../../mysqldb')['db'];var utils=require('../../config/utils');var logger=require(_0x7770('0x6'))(_0x7770('0x7'));var config=require(_0x7770('0x8'));var jayson=require(_0x7770('0x9'));var client=jayson['client'][_0x7770('0xa')]({'port':0x232a});config[_0x7770('0xb')]=_[_0x7770('0xc')](config['redis'],{'host':_0x7770('0xd'),'port':0x18eb});var socket=require(_0x7770('0xe'))(new Redis(config[_0x7770('0xb')]));require(_0x7770('0xf'))[_0x7770('0x10')](socket);function respondWithRpcPromise(_0x25e749,_0x15e602,_0x28ed6d){return new BPromise(function(_0x4e4c21,_0x2f74fd){return client['request'](_0x25e749,_0x28ed6d)['then'](function(_0x5c6f84){logger['info'](_0x7770('0x11'),_0x15e602,'request\x20sent');logger['debug'](_0x7770('0x12'),_0x15e602,_0x7770('0x13'),JSON[_0x7770('0x14')](_0x5c6f84));if(_0x5c6f84[_0x7770('0x15')]){if(_0x5c6f84[_0x7770('0x15')][_0x7770('0x16')]===0x1f4){logger[_0x7770('0x15')]('WhatsappQueue,\x20%s,\x20%s',_0x15e602,_0x5c6f84[_0x7770('0x15')][_0x7770('0x17')]);return _0x2f74fd(_0x5c6f84[_0x7770('0x15')][_0x7770('0x17')]);}logger[_0x7770('0x15')]('WhatsappQueue,\x20%s,\x20%s',_0x15e602,_0x5c6f84['error']['message']);return _0x4e4c21(_0x5c6f84['error'][_0x7770('0x17')]);}else{logger['info'](_0x7770('0x11'),_0x15e602,_0x7770('0x13'));_0x4e4c21(_0x5c6f84[_0x7770('0x18')][_0x7770('0x17')]);}})[_0x7770('0x19')](function(_0x21f535){logger[_0x7770('0x15')](_0x7770('0x11'),_0x15e602,_0x21f535);_0x2f74fd(_0x21f535);});});}exports['GetWhatsappQueue']=function(_0x537d92){var _0x4161ad=this;return new Promise(function(_0x50e769,_0x569682){return db[_0x7770('0x1a')][_0x7770('0x1b')]({'raw':_0x537d92['options']?_0x537d92[_0x7770('0x1c')][_0x7770('0x1d')]===undefined?!![]:![]:!![],'where':_0x537d92['options']?_0x537d92[_0x7770('0x1c')][_0x7770('0x1e')]||null:null,'attributes':_0x537d92[_0x7770('0x1c')]?_0x537d92[_0x7770('0x1c')]['attributes']||null:null,'limit':_0x537d92[_0x7770('0x1c')]?_0x537d92['options'][_0x7770('0x1f')]||null:null,'include':_0x537d92[_0x7770('0x1c')]?_0x537d92['options'][_0x7770('0x20')]?_[_0x7770('0x21')](_0x537d92[_0x7770('0x1c')][_0x7770('0x20')],function(_0x2aea6a){return{'model':db[_0x2aea6a[_0x7770('0x22')]],'as':_0x2aea6a['as'],'attributes':_0x2aea6a['attributes'],'include':_0x2aea6a[_0x7770('0x20')]?_[_0x7770('0x21')](_0x2aea6a['include'],function(_0x58240f){return{'model':db[_0x58240f[_0x7770('0x22')]],'as':_0x58240f['as'],'attributes':_0x58240f[_0x7770('0x23')],'include':_0x58240f[_0x7770('0x20')]?_['map'](_0x58240f[_0x7770('0x20')],function(_0xe2be5d){return{'model':db[_0xe2be5d[_0x7770('0x22')]],'as':_0xe2be5d['as'],'attributes':_0xe2be5d[_0x7770('0x23')]};}):[]};}):[]};}):[]:[]})[_0x7770('0x24')](function(_0x23f5d6){logger[_0x7770('0x25')](_0x7770('0x26'),_0x537d92);logger[_0x7770('0x27')](_0x7770('0x26'),_0x537d92,JSON[_0x7770('0x14')](_0x23f5d6));_0x50e769(_0x23f5d6);})[_0x7770('0x19')](function(_0xfbaf8b){logger[_0x7770('0x15')](_0x7770('0x26'),_0xfbaf8b['message'],_0x537d92);_0x569682(_0x4161ad[_0x7770('0x15')](0x1f4,_0xfbaf8b['message']));});});};exports[_0x7770('0x28')]=function(_0x7e770a){var _0x541fd0=this;return new Promise(function(_0x2853ef,_0x49e8ee){return db[_0x7770('0x1a')][_0x7770('0x29')]({'raw':_0x7e770a[_0x7770('0x1c')]?_0x7e770a[_0x7770('0x1c')]['raw']===undefined?!![]:![]:!![],'where':_0x7e770a[_0x7770('0x1c')]?_0x7e770a['options'][_0x7770('0x1e')]||null:null,'attributes':_0x7e770a[_0x7770('0x1c')]?_0x7e770a[_0x7770('0x1c')][_0x7770('0x23')]||null:null,'include':_0x7e770a[_0x7770('0x1c')]?_0x7e770a[_0x7770('0x1c')]['include']?_[_0x7770('0x21')](_0x7e770a[_0x7770('0x1c')]['include'],function(_0x18a4c9){return{'model':db[_0x18a4c9[_0x7770('0x22')]],'as':_0x18a4c9['as'],'attributes':_0x18a4c9[_0x7770('0x23')],'include':_0x18a4c9['include']?_[_0x7770('0x21')](_0x18a4c9[_0x7770('0x20')],function(_0x54df88){return{'model':db[_0x54df88[_0x7770('0x22')]],'as':_0x54df88['as'],'attributes':_0x54df88[_0x7770('0x23')],'include':_0x54df88[_0x7770('0x20')]?_[_0x7770('0x21')](_0x54df88[_0x7770('0x20')],function(_0x3481ab){return{'model':db[_0x3481ab['model']],'as':_0x3481ab['as'],'attributes':_0x3481ab[_0x7770('0x23')]};}):[]};}):[]};}):[]:[]})[_0x7770('0x24')](function(_0x5e2fb5){logger[_0x7770('0x25')](_0x7770('0x28'),_0x7e770a);logger['debug'](_0x7770('0x28'),_0x7e770a,JSON['stringify'](_0x5e2fb5));_0x2853ef(_0x5e2fb5);})['catch'](function(_0x839f13){logger[_0x7770('0x15')](_0x7770('0x28'),_0x839f13['message'],_0x7e770a);_0x49e8ee(_0x541fd0['error'](0x1f4,_0x839f13['message']));});});}; \ No newline at end of file diff --git a/server/api/whatsappQueue/whatsappQueue.socket.js b/server/api/whatsappQueue/whatsappQueue.socket.js index 1e41ec0..5b700c2 100644 --- a/server/api/whatsappQueue/whatsappQueue.socket.js +++ b/server/api/whatsappQueue/whatsappQueue.socket.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x3267=['length','whatsappQueue:','./whatsappQueue.events','save','remove','update','emit','removeListener','register'];(function(_0x419a76,_0x28b7cd){var _0x34fcd6=function(_0x54eafc){while(--_0x54eafc){_0x419a76['push'](_0x419a76['shift']());}};_0x34fcd6(++_0x28b7cd);}(_0x3267,0x1d6));var _0x7326=function(_0x870b62,_0x2143f9){_0x870b62=_0x870b62-0x0;var _0x2dcb39=_0x3267[_0x870b62];return _0x2dcb39;};'use strict';var WhatsappQueueEvents=require(_0x7326('0x0'));var events=[_0x7326('0x1'),_0x7326('0x2'),_0x7326('0x3')];function createListener(_0x3d516e,_0x69adfb){return function(_0x4f6da4){_0x69adfb[_0x7326('0x4')](_0x3d516e,_0x4f6da4);};}function removeListener(_0x1e4e37,_0x112f4e){return function(){WhatsappQueueEvents[_0x7326('0x5')](_0x1e4e37,_0x112f4e);};}exports[_0x7326('0x6')]=function(_0x4c6fec){for(var _0x2898e4=0x0,_0x17c77e=events[_0x7326('0x7')];_0x2898e4<_0x17c77e;_0x2898e4++){var _0x496bde=events[_0x2898e4];var _0x4c7a52=createListener(_0x7326('0x8')+_0x496bde,_0x4c6fec);WhatsappQueueEvents['on'](_0x496bde,_0x4c7a52);}}; \ No newline at end of file +var _0x3cae=['update','emit','removeListener','whatsappQueue:','save','remove'];(function(_0x4fd75e,_0x219e4a){var _0x5b6338=function(_0xf2969c){while(--_0xf2969c){_0x4fd75e['push'](_0x4fd75e['shift']());}};_0x5b6338(++_0x219e4a);}(_0x3cae,0x6a));var _0xe3ca=function(_0x37c22c,_0x28a70d){_0x37c22c=_0x37c22c-0x0;var _0x119d79=_0x3cae[_0x37c22c];return _0x119d79;};'use strict';var WhatsappQueueEvents=require('./whatsappQueue.events');var events=[_0xe3ca('0x0'),_0xe3ca('0x1'),_0xe3ca('0x2')];function createListener(_0x33bbef,_0x1ca8c5){return function(_0x5885da){_0x1ca8c5[_0xe3ca('0x3')](_0x33bbef,_0x5885da);};}function removeListener(_0x598c80,_0x250b18){return function(){WhatsappQueueEvents[_0xe3ca('0x4')](_0x598c80,_0x250b18);};}exports['register']=function(_0x5b8644){for(var _0xca112c=0x0,_0xf14f3b=events['length'];_0xca112c<_0xf14f3b;_0xca112c++){var _0x3d9709=events[_0xca112c];var _0x75c90b=createListener(_0xe3ca('0x5')+_0x3d9709,_0x5b8644);WhatsappQueueEvents['on'](_0x3d9709,_0x75c90b);}}; \ No newline at end of file diff --git a/server/api/whatsappQueueReport/index.js b/server/api/whatsappQueueReport/index.js index b031587..810248a 100644 --- a/server/api/whatsappQueueReport/index.js +++ b/server/api/whatsappQueueReport/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xde05=['get','index','/describe','isAuthenticated','describe','/:id','show','post','create','put','delete','destroy','exports','multer','util','connect-timeout','express','fs-extra','../../components/auth/service','../../components/interaction/service','./whatsappQueueReport.controller'];(function(_0x61b3ab,_0x1fc298){var _0x57097f=function(_0x25970b){while(--_0x25970b){_0x61b3ab['push'](_0x61b3ab['shift']());}};_0x57097f(++_0x1fc298);}(_0xde05,0x133));var _0x5de0=function(_0x2d15cb,_0x465397){_0x2d15cb=_0x2d15cb-0x0;var _0x41a12d=_0xde05[_0x2d15cb];return _0x41a12d;};'use strict';var multer=require(_0x5de0('0x0'));var util=require(_0x5de0('0x1'));var path=require('path');var timeout=require(_0x5de0('0x2'));var express=require(_0x5de0('0x3'));var router=express['Router']();var fs_extra=require(_0x5de0('0x4'));var auth=require(_0x5de0('0x5'));var interaction=require(_0x5de0('0x6'));var config=require('../../config/environment');var controller=require(_0x5de0('0x7'));router[_0x5de0('0x8')]('/',auth['isAuthenticated'](),controller[_0x5de0('0x9')]);router[_0x5de0('0x8')](_0x5de0('0xa'),auth[_0x5de0('0xb')](),controller[_0x5de0('0xc')]);router['get'](_0x5de0('0xd'),auth[_0x5de0('0xb')](),controller[_0x5de0('0xe')]);router[_0x5de0('0xf')]('/',auth[_0x5de0('0xb')](),controller[_0x5de0('0x10')]);router[_0x5de0('0x11')](_0x5de0('0xd'),auth[_0x5de0('0xb')](),controller['update']);router[_0x5de0('0x12')](_0x5de0('0xd'),auth[_0x5de0('0xb')](),controller[_0x5de0('0x13')]);module[_0x5de0('0x14')]=router; \ No newline at end of file +var _0xe05b=['delete','multer','util','path','connect-timeout','express','Router','fs-extra','../../components/interaction/service','../../config/environment','./whatsappQueueReport.controller','isAuthenticated','index','get','/describe','describe','/:id','show','post','create','update'];(function(_0x586fa2,_0x1a45bc){var _0x515be9=function(_0x4e90d5){while(--_0x4e90d5){_0x586fa2['push'](_0x586fa2['shift']());}};_0x515be9(++_0x1a45bc);}(_0xe05b,0x112));var _0xbe05=function(_0x488b75,_0x278074){_0x488b75=_0x488b75-0x0;var _0x42b6da=_0xe05b[_0x488b75];return _0x42b6da;};'use strict';var multer=require(_0xbe05('0x0'));var util=require(_0xbe05('0x1'));var path=require(_0xbe05('0x2'));var timeout=require(_0xbe05('0x3'));var express=require(_0xbe05('0x4'));var router=express[_0xbe05('0x5')]();var fs_extra=require(_0xbe05('0x6'));var auth=require('../../components/auth/service');var interaction=require(_0xbe05('0x7'));var config=require(_0xbe05('0x8'));var controller=require(_0xbe05('0x9'));router['get']('/',auth[_0xbe05('0xa')](),controller[_0xbe05('0xb')]);router[_0xbe05('0xc')](_0xbe05('0xd'),auth[_0xbe05('0xa')](),controller[_0xbe05('0xe')]);router[_0xbe05('0xc')](_0xbe05('0xf'),auth[_0xbe05('0xa')](),controller[_0xbe05('0x10')]);router[_0xbe05('0x11')]('/',auth['isAuthenticated'](),controller[_0xbe05('0x12')]);router['put'](_0xbe05('0xf'),auth[_0xbe05('0xa')](),controller[_0xbe05('0x13')]);router[_0xbe05('0x14')](_0xbe05('0xf'),auth[_0xbe05('0xa')](),controller['destroy']);module['exports']=router; \ No newline at end of file diff --git a/server/api/whatsappQueueReport/whatsappQueueReport.attributes.js b/server/api/whatsappQueueReport/whatsappQueueReport.attributes.js index c11da9c..d706e71 100644 --- a/server/api/whatsappQueueReport/whatsappQueueReport.attributes.js +++ b/server/api/whatsappQueueReport/whatsappQueueReport.attributes.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x9957=['exports','STRING','DATE','sequelize'];(function(_0x201929,_0x420ad2){var _0x36f9c7=function(_0x32253b){while(--_0x32253b){_0x201929['push'](_0x201929['shift']());}};_0x36f9c7(++_0x420ad2);}(_0x9957,0x93));var _0x7995=function(_0x3b380d,_0x4bf247){_0x3b380d=_0x3b380d-0x0;var _0x54502b=_0x9957[_0x3b380d];return _0x54502b;};'use strict';var Sequelize=require(_0x7995('0x0'));module[_0x7995('0x1')]={'uniqueid':{'type':Sequelize[_0x7995('0x2')],'allowNull':![]},'from':{'type':Sequelize[_0x7995('0x2')]},'joinAt':{'type':Sequelize['DATE']},'leaveAt':{'type':Sequelize[_0x7995('0x3')]},'acceptAt':{'type':Sequelize[_0x7995('0x3')]},'exitAt':{'type':Sequelize[_0x7995('0x3')]},'reason':{'type':Sequelize[_0x7995('0x2')]}}; \ No newline at end of file +var _0x9957=['exports','STRING','DATE','sequelize'];(function(_0x188484,_0x56c35d){var _0x49daf9=function(_0x3e94c0){while(--_0x3e94c0){_0x188484['push'](_0x188484['shift']());}};_0x49daf9(++_0x56c35d);}(_0x9957,0x93));var _0x7995=function(_0x19e35c,_0x29cd1e){_0x19e35c=_0x19e35c-0x0;var _0x3e1fe8=_0x9957[_0x19e35c];return _0x3e1fe8;};'use strict';var Sequelize=require(_0x7995('0x0'));module[_0x7995('0x1')]={'uniqueid':{'type':Sequelize[_0x7995('0x2')],'allowNull':![]},'from':{'type':Sequelize[_0x7995('0x2')]},'joinAt':{'type':Sequelize['DATE']},'leaveAt':{'type':Sequelize[_0x7995('0x3')]},'acceptAt':{'type':Sequelize[_0x7995('0x3')]},'exitAt':{'type':Sequelize[_0x7995('0x3')]},'reason':{'type':Sequelize[_0x7995('0x2')]}}; \ No newline at end of file diff --git a/server/api/whatsappQueueReport/whatsappQueueReport.controller.js b/server/api/whatsappQueueReport/whatsappQueueReport.controller.js index e4b0067..d6a3649 100644 --- a/server/api/whatsappQueueReport/whatsappQueueReport.controller.js +++ b/server/api/whatsappQueueReport/whatsappQueueReport.controller.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xeb74=['papaparse','../../components/auth/service','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','status','json','offset','undefined','limit','count','set','Content-Range','apply','reject','save','update','then','destroy','end','sendStatus','error','stack','name','send','index','map','rawAttributes','fieldName','type','key','model','query','intersection','fields','attributes','length','hasOwnProperty','nolimit','order','sort','filters','pick','merge','where','VIRTUAL','filter','options','WhatsappQueueReport','includeAll','include','findAll','rows','catch','show','params','keys','find','create','body','describe','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','util','path','sox','to-csv','ejs','lodash','crypto','jsforce','querystring'];(function(_0x33d096,_0x13edaa){var _0x3f994a=function(_0x5a9a61){while(--_0x5a9a61){_0x33d096['push'](_0x33d096['shift']());}};_0x3f994a(++_0x13edaa);}(_0xeb74,0xe3));var _0x4eb7=function(_0x3b7b1a,_0x1b069a){_0x3b7b1a=_0x3b7b1a-0x0;var _0x22d296=_0xeb74[_0x3b7b1a];return _0x22d296;};'use strict';var emlformat=require(_0x4eb7('0x0'));var rimraf=require(_0x4eb7('0x1'));var zipdir=require(_0x4eb7('0x2'));var jsonpatch=require(_0x4eb7('0x3'));var rp=require(_0x4eb7('0x4'));var moment=require(_0x4eb7('0x5'));var BPromise=require(_0x4eb7('0x6'));var Mustache=require('mustache');var util=require(_0x4eb7('0x7'));var path=require(_0x4eb7('0x8'));var sox=require(_0x4eb7('0x9'));var csv=require(_0x4eb7('0xa'));var ejs=require(_0x4eb7('0xb'));var fs=require('fs');var fs_extra=require('fs-extra');var _=require(_0x4eb7('0xc'));var squel=require('squel');var crypto=require(_0x4eb7('0xd'));var jsforce=require(_0x4eb7('0xe'));var deskjs=require('desk.js');var toCsv=require('to-csv');var querystring=require(_0x4eb7('0xf'));var Papa=require(_0x4eb7('0x10'));var Redis=require('ioredis');var authService=require(_0x4eb7('0x11'));var qs=require('../../components/parsers/qs');var as=require(_0x4eb7('0x12'));var hardwareService=require(_0x4eb7('0x13'));var logger=require(_0x4eb7('0x14'))('api');var utils=require(_0x4eb7('0x15'));var config=require(_0x4eb7('0x16'));var licenseUtil=require(_0x4eb7('0x17'));var db=require(_0x4eb7('0x18'))['db'];function respondWithStatusCode(_0x35fa89,_0x4194e1){_0x4194e1=_0x4194e1||0xcc;return function(_0x3c9f45){if(_0x3c9f45){return _0x35fa89['sendStatus'](_0x4194e1);}return _0x35fa89['status'](_0x4194e1)['end']();};}function respondWithResult(_0x17fb81,_0x51f09d){_0x51f09d=_0x51f09d||0xc8;return function(_0x84c68b){if(_0x84c68b){return _0x17fb81[_0x4eb7('0x19')](_0x51f09d)[_0x4eb7('0x1a')](_0x84c68b);}};}function respondWithFilteredResult(_0x1c4a97,_0x5d6d5){return function(_0x21433d){if(_0x21433d){var _0x11674f=typeof _0x5d6d5[_0x4eb7('0x1b')]===_0x4eb7('0x1c')&&typeof _0x5d6d5[_0x4eb7('0x1d')]==='undefined';var _0xb86bc9=_0x21433d[_0x4eb7('0x1e')];var _0x3b6d41=_0x11674f?0x0:_0x5d6d5[_0x4eb7('0x1b')];var _0x302e16=_0x11674f?_0x21433d[_0x4eb7('0x1e')]:_0x5d6d5[_0x4eb7('0x1b')]+_0x5d6d5[_0x4eb7('0x1d')];var _0x5f4780;if(_0x302e16>=_0xb86bc9){_0x302e16=_0xb86bc9;_0x5f4780=0xc8;}else{_0x5f4780=0xce;}_0x1c4a97[_0x4eb7('0x19')](_0x5f4780);return _0x1c4a97[_0x4eb7('0x1f')](_0x4eb7('0x20'),_0x3b6d41+'-'+_0x302e16+'/'+_0xb86bc9)[_0x4eb7('0x1a')](_0x21433d);}return null;};}function patchUpdates(_0x32f0f5){return function(_0x2efd67){try{jsonpatch[_0x4eb7('0x21')](_0x2efd67,_0x32f0f5,!![]);}catch(_0x4ddbe4){return BPromise[_0x4eb7('0x22')](_0x4ddbe4);}return _0x2efd67[_0x4eb7('0x23')]();};}function saveUpdates(_0x4783b1,_0x164515){return function(_0x14a7be){if(_0x14a7be){return _0x14a7be[_0x4eb7('0x24')](_0x4783b1)[_0x4eb7('0x25')](function(_0x2df1b1){return _0x2df1b1;});}return null;};}function removeEntity(_0x1a2b8b,_0x13e871){return function(_0x4de2d9){if(_0x4de2d9){return _0x4de2d9[_0x4eb7('0x26')]()[_0x4eb7('0x25')](function(){_0x1a2b8b[_0x4eb7('0x19')](0xcc)[_0x4eb7('0x27')]();});}};}function handleEntityNotFound(_0x3e0da2,_0x25eb74){return function(_0x365060){if(!_0x365060){_0x3e0da2[_0x4eb7('0x28')](0x194);}return _0x365060;};}function handleError(_0x80b804,_0x248759){_0x248759=_0x248759||0x1f4;return function(_0xf83c11){logger[_0x4eb7('0x29')](_0xf83c11[_0x4eb7('0x2a')]);if(_0xf83c11[_0x4eb7('0x2b')]){delete _0xf83c11[_0x4eb7('0x2b')];}_0x80b804[_0x4eb7('0x19')](_0x248759)[_0x4eb7('0x2c')](_0xf83c11);};}exports[_0x4eb7('0x2d')]=function(_0x33a2c1,_0x28fda8){var _0x114c68={},_0x17030a={},_0x3ed224={'count':0x0,'rows':[]};var _0x50209d=_[_0x4eb7('0x2e')](db['WhatsappQueueReport'][_0x4eb7('0x2f')],function(_0x13f71a){return{'name':_0x13f71a[_0x4eb7('0x30')],'type':_0x13f71a[_0x4eb7('0x31')][_0x4eb7('0x32')]};});_0x17030a[_0x4eb7('0x33')]=_[_0x4eb7('0x2e')](_0x50209d,_0x4eb7('0x2b'));_0x17030a[_0x4eb7('0x34')]=_['keys'](_0x33a2c1[_0x4eb7('0x34')]);_0x17030a['filters']=_[_0x4eb7('0x35')](_0x17030a[_0x4eb7('0x33')],_0x17030a['query']);_0x114c68['attributes']=_[_0x4eb7('0x35')](_0x17030a[_0x4eb7('0x33')],qs[_0x4eb7('0x36')](_0x33a2c1[_0x4eb7('0x34')]['fields']));_0x114c68[_0x4eb7('0x37')]=_0x114c68[_0x4eb7('0x37')][_0x4eb7('0x38')]?_0x114c68[_0x4eb7('0x37')]:_0x17030a[_0x4eb7('0x33')];if(!_0x33a2c1['query'][_0x4eb7('0x39')](_0x4eb7('0x3a'))){_0x114c68[_0x4eb7('0x1d')]=qs['limit'](_0x33a2c1[_0x4eb7('0x34')][_0x4eb7('0x1d')]);_0x114c68[_0x4eb7('0x1b')]=qs['offset'](_0x33a2c1[_0x4eb7('0x34')]['offset']);}_0x114c68[_0x4eb7('0x3b')]=qs[_0x4eb7('0x3c')](_0x33a2c1[_0x4eb7('0x34')][_0x4eb7('0x3c')]);_0x114c68['where']=qs[_0x4eb7('0x3d')](_[_0x4eb7('0x3e')](_0x33a2c1[_0x4eb7('0x34')],_0x17030a[_0x4eb7('0x3d')]),_0x50209d);if(_0x33a2c1['query']['filter']){_0x114c68['where']=_[_0x4eb7('0x3f')](_0x114c68[_0x4eb7('0x40')],{'$or':_[_0x4eb7('0x2e')](_0x50209d,function(_0x20ac7b){if(_0x20ac7b[_0x4eb7('0x31')]!==_0x4eb7('0x41')){var _0x1038c1={};_0x1038c1[_0x20ac7b[_0x4eb7('0x2b')]]={'$like':'%'+_0x33a2c1[_0x4eb7('0x34')][_0x4eb7('0x42')]+'%'};return _0x1038c1;}})});}_0x114c68=_['merge']({},_0x114c68,_0x33a2c1[_0x4eb7('0x43')]);var _0x38218f={'where':_0x114c68[_0x4eb7('0x40')]};return db[_0x4eb7('0x44')][_0x4eb7('0x1e')](_0x38218f)[_0x4eb7('0x25')](function(_0x704d4d){_0x3ed224[_0x4eb7('0x1e')]=_0x704d4d;if(_0x33a2c1[_0x4eb7('0x34')][_0x4eb7('0x45')]){_0x114c68[_0x4eb7('0x46')]=[{'all':!![]}];}return db[_0x4eb7('0x44')][_0x4eb7('0x47')](_0x114c68);})[_0x4eb7('0x25')](function(_0x38af1f){_0x3ed224[_0x4eb7('0x48')]=_0x38af1f;return _0x3ed224;})[_0x4eb7('0x25')](respondWithFilteredResult(_0x28fda8,_0x114c68))[_0x4eb7('0x49')](handleError(_0x28fda8,null));};exports[_0x4eb7('0x4a')]=function(_0x79aec5,_0x5eff9e){var _0x2fd5c2={'raw':!![],'where':{'id':_0x79aec5[_0x4eb7('0x4b')]['id']}},_0x2df542={};_0x2df542[_0x4eb7('0x33')]=_[_0x4eb7('0x4c')](db[_0x4eb7('0x44')][_0x4eb7('0x2f')]);_0x2df542[_0x4eb7('0x34')]=_[_0x4eb7('0x4c')](_0x79aec5['query']);_0x2df542[_0x4eb7('0x3d')]=_['intersection'](_0x2df542[_0x4eb7('0x33')],_0x2df542[_0x4eb7('0x34')]);_0x2fd5c2[_0x4eb7('0x37')]=_['intersection'](_0x2df542[_0x4eb7('0x33')],qs[_0x4eb7('0x36')](_0x79aec5[_0x4eb7('0x34')][_0x4eb7('0x36')]));_0x2fd5c2['attributes']=_0x2fd5c2[_0x4eb7('0x37')]['length']?_0x2fd5c2[_0x4eb7('0x37')]:_0x2df542[_0x4eb7('0x33')];if(_0x79aec5[_0x4eb7('0x34')][_0x4eb7('0x45')]){_0x2fd5c2[_0x4eb7('0x46')]=[{'all':!![]}];}_0x2fd5c2=_['merge']({},_0x2fd5c2,_0x79aec5['options']);return db[_0x4eb7('0x44')][_0x4eb7('0x4d')](_0x2fd5c2)[_0x4eb7('0x25')](handleEntityNotFound(_0x5eff9e,null))[_0x4eb7('0x25')](respondWithResult(_0x5eff9e,null))[_0x4eb7('0x49')](handleError(_0x5eff9e,null));};exports['create']=function(_0x6086,_0x104284){return db['WhatsappQueueReport'][_0x4eb7('0x4e')](_0x6086[_0x4eb7('0x4f')],{})['then'](respondWithResult(_0x104284,0xc9))[_0x4eb7('0x49')](handleError(_0x104284,null));};exports[_0x4eb7('0x24')]=function(_0x3c8049,_0x5774d5){if(_0x3c8049[_0x4eb7('0x4f')]['id']){delete _0x3c8049['body']['id'];}return db['WhatsappQueueReport'][_0x4eb7('0x4d')]({'where':{'id':_0x3c8049[_0x4eb7('0x4b')]['id']}})[_0x4eb7('0x25')](handleEntityNotFound(_0x5774d5,null))[_0x4eb7('0x25')](saveUpdates(_0x3c8049[_0x4eb7('0x4f')],null))[_0x4eb7('0x25')](respondWithResult(_0x5774d5,null))[_0x4eb7('0x49')](handleError(_0x5774d5,null));};exports[_0x4eb7('0x26')]=function(_0x2913c5,_0x23c0d5){return db[_0x4eb7('0x44')][_0x4eb7('0x4d')]({'where':{'id':_0x2913c5[_0x4eb7('0x4b')]['id']}})[_0x4eb7('0x25')](handleEntityNotFound(_0x23c0d5,null))[_0x4eb7('0x25')](removeEntity(_0x23c0d5,null))[_0x4eb7('0x49')](handleError(_0x23c0d5,null));};exports[_0x4eb7('0x50')]=function(_0x1580ba,_0x1411c9){return db[_0x4eb7('0x44')]['describe']()[_0x4eb7('0x25')](respondWithResult(_0x1411c9,null))['catch'](handleError(_0x1411c9,null));}; \ No newline at end of file +var _0x7916=['VIRTUAL','options','includeAll','include','findAll','catch','params','length','create','body','destroy','describe','eml-format','zip-dir','fast-json-patch','moment','bluebird','mustache','util','sox','ejs','fs-extra','squel','jsforce','querystring','papaparse','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/logger','api','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','sendStatus','status','undefined','limit','count','offset','set','Content-Range','reject','update','then','end','error','stack','name','send','map','WhatsappQueueReport','rawAttributes','key','query','keys','filters','intersection','model','attributes','fields','hasOwnProperty','nolimit','order','sort','pick','filter','where','merge','type'];(function(_0x196de4,_0x320509){var _0x354ff2=function(_0x401f58){while(--_0x401f58){_0x196de4['push'](_0x196de4['shift']());}};_0x354ff2(++_0x320509);}(_0x7916,0x128));var _0x6791=function(_0xe8ffd,_0x2954b2){_0xe8ffd=_0xe8ffd-0x0;var _0x59d496=_0x7916[_0xe8ffd];return _0x59d496;};'use strict';var emlformat=require(_0x6791('0x0'));var rimraf=require('rimraf');var zipdir=require(_0x6791('0x1'));var jsonpatch=require(_0x6791('0x2'));var rp=require('request-promise');var moment=require(_0x6791('0x3'));var BPromise=require(_0x6791('0x4'));var Mustache=require(_0x6791('0x5'));var util=require(_0x6791('0x6'));var path=require('path');var sox=require(_0x6791('0x7'));var csv=require('to-csv');var ejs=require(_0x6791('0x8'));var fs=require('fs');var fs_extra=require(_0x6791('0x9'));var _=require('lodash');var squel=require(_0x6791('0xa'));var crypto=require('crypto');var jsforce=require(_0x6791('0xb'));var deskjs=require('desk.js');var toCsv=require('to-csv');var querystring=require(_0x6791('0xc'));var Papa=require(_0x6791('0xd'));var Redis=require('ioredis');var authService=require(_0x6791('0xe'));var qs=require(_0x6791('0xf'));var as=require(_0x6791('0x10'));var hardwareService=require('../../config/license/hardware');var logger=require(_0x6791('0x11'))(_0x6791('0x12'));var utils=require(_0x6791('0x13'));var config=require(_0x6791('0x14'));var licenseUtil=require(_0x6791('0x15'));var db=require(_0x6791('0x16'))['db'];function respondWithStatusCode(_0x61ac73,_0x16c62b){_0x16c62b=_0x16c62b||0xcc;return function(_0x423e22){if(_0x423e22){return _0x61ac73[_0x6791('0x17')](_0x16c62b);}return _0x61ac73[_0x6791('0x18')](_0x16c62b)['end']();};}function respondWithResult(_0x4b1719,_0x34b28d){_0x34b28d=_0x34b28d||0xc8;return function(_0x5122f9){if(_0x5122f9){return _0x4b1719[_0x6791('0x18')](_0x34b28d)['json'](_0x5122f9);}};}function respondWithFilteredResult(_0x3be9f0,_0x163898){return function(_0x517910){if(_0x517910){var _0x3e4792=typeof _0x163898['offset']===_0x6791('0x19')&&typeof _0x163898[_0x6791('0x1a')]==='undefined';var _0xbc35d=_0x517910[_0x6791('0x1b')];var _0x5bec14=_0x3e4792?0x0:_0x163898[_0x6791('0x1c')];var _0x4d8a79=_0x3e4792?_0x517910[_0x6791('0x1b')]:_0x163898[_0x6791('0x1c')]+_0x163898[_0x6791('0x1a')];var _0x3a72ce;if(_0x4d8a79>=_0xbc35d){_0x4d8a79=_0xbc35d;_0x3a72ce=0xc8;}else{_0x3a72ce=0xce;}_0x3be9f0[_0x6791('0x18')](_0x3a72ce);return _0x3be9f0[_0x6791('0x1d')](_0x6791('0x1e'),_0x5bec14+'-'+_0x4d8a79+'/'+_0xbc35d)['json'](_0x517910);}return null;};}function patchUpdates(_0x4a2922){return function(_0x306acb){try{jsonpatch['apply'](_0x306acb,_0x4a2922,!![]);}catch(_0x21ef16){return BPromise[_0x6791('0x1f')](_0x21ef16);}return _0x306acb['save']();};}function saveUpdates(_0x17f200,_0x309610){return function(_0x15b9ab){if(_0x15b9ab){return _0x15b9ab[_0x6791('0x20')](_0x17f200)['then'](function(_0x3e17b3){return _0x3e17b3;});}return null;};}function removeEntity(_0x1b516d,_0x4a8717){return function(_0x53bb44){if(_0x53bb44){return _0x53bb44['destroy']()[_0x6791('0x21')](function(){_0x1b516d['status'](0xcc)[_0x6791('0x22')]();});}};}function handleEntityNotFound(_0x5409f1,_0x54a092){return function(_0x496273){if(!_0x496273){_0x5409f1[_0x6791('0x17')](0x194);}return _0x496273;};}function handleError(_0x23442e,_0xd49b84){_0xd49b84=_0xd49b84||0x1f4;return function(_0x56a74e){logger[_0x6791('0x23')](_0x56a74e[_0x6791('0x24')]);if(_0x56a74e['name']){delete _0x56a74e[_0x6791('0x25')];}_0x23442e['status'](_0xd49b84)[_0x6791('0x26')](_0x56a74e);};}exports['index']=function(_0x4fc5d5,_0x270a1d){var _0x551718={},_0x2f56a2={},_0x34b006={'count':0x0,'rows':[]};var _0x483d6c=_[_0x6791('0x27')](db[_0x6791('0x28')][_0x6791('0x29')],function(_0xd36448){return{'name':_0xd36448['fieldName'],'type':_0xd36448['type'][_0x6791('0x2a')]};});_0x2f56a2['model']=_[_0x6791('0x27')](_0x483d6c,_0x6791('0x25'));_0x2f56a2[_0x6791('0x2b')]=_[_0x6791('0x2c')](_0x4fc5d5[_0x6791('0x2b')]);_0x2f56a2[_0x6791('0x2d')]=_[_0x6791('0x2e')](_0x2f56a2[_0x6791('0x2f')],_0x2f56a2[_0x6791('0x2b')]);_0x551718[_0x6791('0x30')]=_['intersection'](_0x2f56a2[_0x6791('0x2f')],qs[_0x6791('0x31')](_0x4fc5d5[_0x6791('0x2b')][_0x6791('0x31')]));_0x551718[_0x6791('0x30')]=_0x551718[_0x6791('0x30')]['length']?_0x551718['attributes']:_0x2f56a2['model'];if(!_0x4fc5d5[_0x6791('0x2b')][_0x6791('0x32')](_0x6791('0x33'))){_0x551718['limit']=qs['limit'](_0x4fc5d5[_0x6791('0x2b')][_0x6791('0x1a')]);_0x551718[_0x6791('0x1c')]=qs[_0x6791('0x1c')](_0x4fc5d5['query'][_0x6791('0x1c')]);}_0x551718[_0x6791('0x34')]=qs[_0x6791('0x35')](_0x4fc5d5['query'][_0x6791('0x35')]);_0x551718['where']=qs['filters'](_[_0x6791('0x36')](_0x4fc5d5[_0x6791('0x2b')],_0x2f56a2['filters']),_0x483d6c);if(_0x4fc5d5[_0x6791('0x2b')][_0x6791('0x37')]){_0x551718[_0x6791('0x38')]=_[_0x6791('0x39')](_0x551718[_0x6791('0x38')],{'$or':_['map'](_0x483d6c,function(_0x1798cf){if(_0x1798cf[_0x6791('0x3a')]!==_0x6791('0x3b')){var _0x53f48d={};_0x53f48d[_0x1798cf[_0x6791('0x25')]]={'$like':'%'+_0x4fc5d5[_0x6791('0x2b')][_0x6791('0x37')]+'%'};return _0x53f48d;}})});}_0x551718=_['merge']({},_0x551718,_0x4fc5d5[_0x6791('0x3c')]);var _0x31f2bb={'where':_0x551718[_0x6791('0x38')]};return db[_0x6791('0x28')]['count'](_0x31f2bb)[_0x6791('0x21')](function(_0x1a4b64){_0x34b006[_0x6791('0x1b')]=_0x1a4b64;if(_0x4fc5d5[_0x6791('0x2b')][_0x6791('0x3d')]){_0x551718[_0x6791('0x3e')]=[{'all':!![]}];}return db[_0x6791('0x28')][_0x6791('0x3f')](_0x551718);})[_0x6791('0x21')](function(_0x4e4004){_0x34b006['rows']=_0x4e4004;return _0x34b006;})[_0x6791('0x21')](respondWithFilteredResult(_0x270a1d,_0x551718))[_0x6791('0x40')](handleError(_0x270a1d,null));};exports['show']=function(_0x39dcb7,_0x1c9913){var _0x1c6803={'raw':!![],'where':{'id':_0x39dcb7[_0x6791('0x41')]['id']}},_0x3edb86={};_0x3edb86[_0x6791('0x2f')]=_[_0x6791('0x2c')](db['WhatsappQueueReport'][_0x6791('0x29')]);_0x3edb86['query']=_[_0x6791('0x2c')](_0x39dcb7[_0x6791('0x2b')]);_0x3edb86[_0x6791('0x2d')]=_[_0x6791('0x2e')](_0x3edb86['model'],_0x3edb86[_0x6791('0x2b')]);_0x1c6803[_0x6791('0x30')]=_[_0x6791('0x2e')](_0x3edb86[_0x6791('0x2f')],qs[_0x6791('0x31')](_0x39dcb7[_0x6791('0x2b')][_0x6791('0x31')]));_0x1c6803[_0x6791('0x30')]=_0x1c6803['attributes'][_0x6791('0x42')]?_0x1c6803[_0x6791('0x30')]:_0x3edb86[_0x6791('0x2f')];if(_0x39dcb7[_0x6791('0x2b')]['includeAll']){_0x1c6803[_0x6791('0x3e')]=[{'all':!![]}];}_0x1c6803=_[_0x6791('0x39')]({},_0x1c6803,_0x39dcb7['options']);return db[_0x6791('0x28')]['find'](_0x1c6803)[_0x6791('0x21')](handleEntityNotFound(_0x1c9913,null))[_0x6791('0x21')](respondWithResult(_0x1c9913,null))[_0x6791('0x40')](handleError(_0x1c9913,null));};exports[_0x6791('0x43')]=function(_0x18d405,_0xb2a2){return db[_0x6791('0x28')][_0x6791('0x43')](_0x18d405[_0x6791('0x44')],{})['then'](respondWithResult(_0xb2a2,0xc9))[_0x6791('0x40')](handleError(_0xb2a2,null));};exports['update']=function(_0x10e806,_0x2bb86a){if(_0x10e806[_0x6791('0x44')]['id']){delete _0x10e806[_0x6791('0x44')]['id'];}return db[_0x6791('0x28')]['find']({'where':{'id':_0x10e806[_0x6791('0x41')]['id']}})[_0x6791('0x21')](handleEntityNotFound(_0x2bb86a,null))[_0x6791('0x21')](saveUpdates(_0x10e806[_0x6791('0x44')],null))[_0x6791('0x21')](respondWithResult(_0x2bb86a,null))['catch'](handleError(_0x2bb86a,null));};exports[_0x6791('0x45')]=function(_0x42948b,_0x4ff9f4){return db[_0x6791('0x28')]['find']({'where':{'id':_0x42948b[_0x6791('0x41')]['id']}})[_0x6791('0x21')](handleEntityNotFound(_0x4ff9f4,null))[_0x6791('0x21')](removeEntity(_0x4ff9f4,null))[_0x6791('0x40')](handleError(_0x4ff9f4,null));};exports['describe']=function(_0x1b838f,_0x243faf){return db['WhatsappQueueReport'][_0x6791('0x46')]()[_0x6791('0x21')](respondWithResult(_0x243faf,null))[_0x6791('0x40')](handleError(_0x243faf,null));}; \ No newline at end of file diff --git a/server/api/whatsappQueueReport/whatsappQueueReport.model.js b/server/api/whatsappQueueReport/whatsappQueueReport.model.js index 863735f..3b99a75 100644 --- a/server/api/whatsappQueueReport/whatsappQueueReport.model.js +++ b/server/api/whatsappQueueReport/whatsappQueueReport.model.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x5e8a=['./whatsappQueueReport.attributes','exports','define','WhatsappQueueReport','report_whatsapp_queue','uniqueid','lodash','../../config/logger','api','bluebird','request-promise','path','../../config/environment'];(function(_0x4fde08,_0x463a36){var _0x12e725=function(_0x2670c5){while(--_0x2670c5){_0x4fde08['push'](_0x4fde08['shift']());}};_0x12e725(++_0x463a36);}(_0x5e8a,0x13e));var _0xa5e8=function(_0x246eeb,_0x149e6a){_0x246eeb=_0x246eeb-0x0;var _0x644aa=_0x5e8a[_0x246eeb];return _0x644aa;};'use strict';var _=require(_0xa5e8('0x0'));var util=require('util');var logger=require(_0xa5e8('0x1'))(_0xa5e8('0x2'));var moment=require('moment');var BPromise=require(_0xa5e8('0x3'));var rp=require(_0xa5e8('0x4'));var fs=require('fs');var path=require(_0xa5e8('0x5'));var rimraf=require('rimraf');var config=require(_0xa5e8('0x6'));var attributes=require(_0xa5e8('0x7'));module[_0xa5e8('0x8')]=function(_0x1a2c29,_0x34c724){return _0x1a2c29[_0xa5e8('0x9')](_0xa5e8('0xa'),attributes,{'tableName':_0xa5e8('0xb'),'paranoid':![],'indexes':[{'name':_0xa5e8('0xc'),'fields':[_0xa5e8('0xc')]}],'timestamps':!![]});}; \ No newline at end of file +var _0xa48a=['rimraf','../../config/environment','./whatsappQueueReport.attributes','exports','define','WhatsappQueueReport','report_whatsapp_queue','uniqueid','../../config/logger','api','moment','bluebird','request-promise'];(function(_0x590a00,_0x1863d9){var _0x1db99d=function(_0x17f1d4){while(--_0x17f1d4){_0x590a00['push'](_0x590a00['shift']());}};_0x1db99d(++_0x1863d9);}(_0xa48a,0x133));var _0xaa48=function(_0x41079a,_0x219a93){_0x41079a=_0x41079a-0x0;var _0x12d94f=_0xa48a[_0x41079a];return _0x12d94f;};'use strict';var _=require('lodash');var util=require('util');var logger=require(_0xaa48('0x0'))(_0xaa48('0x1'));var moment=require(_0xaa48('0x2'));var BPromise=require(_0xaa48('0x3'));var rp=require(_0xaa48('0x4'));var fs=require('fs');var path=require('path');var rimraf=require(_0xaa48('0x5'));var config=require(_0xaa48('0x6'));var attributes=require(_0xaa48('0x7'));module[_0xaa48('0x8')]=function(_0x327332,_0x2102b4){return _0x327332[_0xaa48('0x9')](_0xaa48('0xa'),attributes,{'tableName':_0xaa48('0xb'),'paranoid':![],'indexes':[{'name':'uniqueid','fields':[_0xaa48('0xc')]}],'timestamps':!![]});}; \ No newline at end of file diff --git a/server/api/whatsappQueueReport/whatsappQueueReport.rpc.js b/server/api/whatsappQueueReport/whatsappQueueReport.rpc.js index 9a7816a..7e90657 100644 --- a/server/api/whatsappQueueReport/whatsappQueueReport.rpc.js +++ b/server/api/whatsappQueueReport/whatsappQueueReport.rpc.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x639c=['create','body','options','raw','then','CreateWhatsappQueueReport','debug','catch','UpdateWhatsappQueueReport','update','where','attributes','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','client','http','request','info','WhatsappQueueReport,\x20%s,\x20%s','request\x20sent','stringify','error','message','result','WhatsappQueueReport'];(function(_0x14add3,_0x13ce8d){var _0x4a174f=function(_0x2b3ed7){while(--_0x2b3ed7){_0x14add3['push'](_0x14add3['shift']());}};_0x4a174f(++_0x13ce8d);}(_0x639c,0x123));var _0xc639=function(_0x347884,_0xd8ef37){_0x347884=_0x347884-0x0;var _0x2cd3fa=_0x639c[_0x347884];return _0x2cd3fa;};'use strict';var _=require('lodash');var util=require(_0xc639('0x0'));var moment=require(_0xc639('0x1'));var BPromise=require(_0xc639('0x2'));var rs=require(_0xc639('0x3'));var fs=require('fs');var Redis=require(_0xc639('0x4'));var db=require(_0xc639('0x5'))['db'];var utils=require(_0xc639('0x6'));var logger=require(_0xc639('0x7'))('rpc');var config=require('../../config/environment');var jayson=require('jayson/promise');var client=jayson[_0xc639('0x8')][_0xc639('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x37c642,_0x462c26,_0x2ccf91){return new BPromise(function(_0x528ce3,_0x4fafcc){return client[_0xc639('0xa')](_0x37c642,_0x2ccf91)['then'](function(_0x69c0bb){logger[_0xc639('0xb')](_0xc639('0xc'),_0x462c26,'request\x20sent');logger['debug']('WhatsappQueueReport,\x20%s,\x20%s,\x20%s',_0x462c26,_0xc639('0xd'),JSON[_0xc639('0xe')](_0x69c0bb));if(_0x69c0bb[_0xc639('0xf')]){if(_0x69c0bb[_0xc639('0xf')]['code']===0x1f4){logger[_0xc639('0xf')]('WhatsappQueueReport,\x20%s,\x20%s',_0x462c26,_0x69c0bb[_0xc639('0xf')]['message']);return _0x4fafcc(_0x69c0bb[_0xc639('0xf')][_0xc639('0x10')]);}logger['error'](_0xc639('0xc'),_0x462c26,_0x69c0bb['error'][_0xc639('0x10')]);return _0x528ce3(_0x69c0bb['error'][_0xc639('0x10')]);}else{logger[_0xc639('0xb')](_0xc639('0xc'),_0x462c26,_0xc639('0xd'));_0x528ce3(_0x69c0bb[_0xc639('0x11')]['message']);}})['catch'](function(_0x553ae8){logger['error'](_0xc639('0xc'),_0x462c26,_0x553ae8);_0x4fafcc(_0x553ae8);});});}exports['CreateWhatsappQueueReport']=function(_0x40af79){var _0x368377=this;return new Promise(function(_0x13d98c,_0x14300){return db[_0xc639('0x12')][_0xc639('0x13')](_0x40af79[_0xc639('0x14')],{'raw':_0x40af79[_0xc639('0x15')]?_0x40af79[_0xc639('0x15')][_0xc639('0x16')]===undefined?!![]:![]:!![]})[_0xc639('0x17')](function(_0x1a0a47){logger[_0xc639('0xb')](_0xc639('0x18'),_0x40af79);logger[_0xc639('0x19')](_0xc639('0x18'),_0x40af79,JSON[_0xc639('0xe')](_0x1a0a47));_0x13d98c(_0x1a0a47);})[_0xc639('0x1a')](function(_0x377a01){logger['error']('CreateWhatsappQueueReport',_0x377a01[_0xc639('0x10')],_0x40af79);_0x14300(_0x368377[_0xc639('0xf')](0x1f4,_0x377a01[_0xc639('0x10')]));});});};exports[_0xc639('0x1b')]=function(_0x53916b){var _0x18f488=this;return new Promise(function(_0x2537ec,_0x5ed43d){return db['WhatsappQueueReport'][_0xc639('0x1c')](_0x53916b[_0xc639('0x14')],{'raw':_0x53916b['options']?_0x53916b['options'][_0xc639('0x16')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x53916b[_0xc639('0x15')]?_0x53916b[_0xc639('0x15')][_0xc639('0x1d')]||null:null,'attributes':_0x53916b[_0xc639('0x15')]?_0x53916b[_0xc639('0x15')][_0xc639('0x1e')]||null:null,'limit':_0x53916b['options']?_0x53916b[_0xc639('0x15')]['limit']||null:null})[_0xc639('0x17')](function(_0x240e4e){logger[_0xc639('0xb')]('UpdateWhatsappQueueReport',_0x53916b);logger[_0xc639('0x19')](_0xc639('0x1b'),_0x53916b,JSON['stringify'](_0x240e4e));_0x2537ec(_0x240e4e);})[_0xc639('0x1a')](function(_0x303a3b){logger[_0xc639('0xf')](_0xc639('0x1b'),_0x303a3b[_0xc639('0x10')],_0x53916b);_0x5ed43d(_0x18f488['error'](0x1f4,_0x303a3b[_0xc639('0x10')]));});});}; \ No newline at end of file +var _0xb3aa=['jayson/promise','client','request','WhatsappQueueReport,\x20%s,\x20%s','request\x20sent','debug','WhatsappQueueReport,\x20%s,\x20%s,\x20%s','error','message','info','result','catch','CreateWhatsappQueueReport','WhatsappQueueReport','options','raw','then','update','where','attributes','limit','UpdateWhatsappQueueReport','stringify','lodash','moment','randomstring','ioredis','../../config/utils','rpc','../../config/environment'];(function(_0x2ad008,_0x45c253){var _0x4538cf=function(_0xe143e4){while(--_0xe143e4){_0x2ad008['push'](_0x2ad008['shift']());}};_0x4538cf(++_0x45c253);}(_0xb3aa,0x71));var _0xab3a=function(_0x20a584,_0xe384a5){_0x20a584=_0x20a584-0x0;var _0x4b41a8=_0xb3aa[_0x20a584];return _0x4b41a8;};'use strict';var _=require(_0xab3a('0x0'));var util=require('util');var moment=require(_0xab3a('0x1'));var BPromise=require('bluebird');var rs=require(_0xab3a('0x2'));var fs=require('fs');var Redis=require(_0xab3a('0x3'));var db=require('../../mysqldb')['db'];var utils=require(_0xab3a('0x4'));var logger=require('../../config/logger')(_0xab3a('0x5'));var config=require(_0xab3a('0x6'));var jayson=require(_0xab3a('0x7'));var client=jayson[_0xab3a('0x8')]['http']({'port':0x232a});function respondWithRpcPromise(_0x256634,_0x4e0052,_0x10fb07){return new BPromise(function(_0x17856e,_0x2d269c){return client[_0xab3a('0x9')](_0x256634,_0x10fb07)['then'](function(_0x3d6929){logger['info'](_0xab3a('0xa'),_0x4e0052,_0xab3a('0xb'));logger[_0xab3a('0xc')](_0xab3a('0xd'),_0x4e0052,_0xab3a('0xb'),JSON['stringify'](_0x3d6929));if(_0x3d6929[_0xab3a('0xe')]){if(_0x3d6929[_0xab3a('0xe')]['code']===0x1f4){logger[_0xab3a('0xe')]('WhatsappQueueReport,\x20%s,\x20%s',_0x4e0052,_0x3d6929['error'][_0xab3a('0xf')]);return _0x2d269c(_0x3d6929[_0xab3a('0xe')][_0xab3a('0xf')]);}logger[_0xab3a('0xe')](_0xab3a('0xa'),_0x4e0052,_0x3d6929['error'][_0xab3a('0xf')]);return _0x17856e(_0x3d6929[_0xab3a('0xe')][_0xab3a('0xf')]);}else{logger[_0xab3a('0x10')]('WhatsappQueueReport,\x20%s,\x20%s',_0x4e0052,_0xab3a('0xb'));_0x17856e(_0x3d6929[_0xab3a('0x11')][_0xab3a('0xf')]);}})[_0xab3a('0x12')](function(_0xb50754){logger[_0xab3a('0xe')]('WhatsappQueueReport,\x20%s,\x20%s',_0x4e0052,_0xb50754);_0x2d269c(_0xb50754);});});}exports[_0xab3a('0x13')]=function(_0x52fec1){var _0x59630d=this;return new Promise(function(_0x159195,_0x56af62){return db[_0xab3a('0x14')]['create'](_0x52fec1['body'],{'raw':_0x52fec1[_0xab3a('0x15')]?_0x52fec1[_0xab3a('0x15')][_0xab3a('0x16')]===undefined?!![]:![]:!![]})[_0xab3a('0x17')](function(_0x54e003){logger[_0xab3a('0x10')]('CreateWhatsappQueueReport',_0x52fec1);logger[_0xab3a('0xc')](_0xab3a('0x13'),_0x52fec1,JSON['stringify'](_0x54e003));_0x159195(_0x54e003);})[_0xab3a('0x12')](function(_0x5a9c9f){logger['error'](_0xab3a('0x13'),_0x5a9c9f[_0xab3a('0xf')],_0x52fec1);_0x56af62(_0x59630d[_0xab3a('0xe')](0x1f4,_0x5a9c9f[_0xab3a('0xf')]));});});};exports['UpdateWhatsappQueueReport']=function(_0x43aa0a){var _0x1442a7=this;return new Promise(function(_0x18d28d,_0x4ffb5c){return db[_0xab3a('0x14')][_0xab3a('0x18')](_0x43aa0a['body'],{'raw':_0x43aa0a[_0xab3a('0x15')]?_0x43aa0a['options'][_0xab3a('0x16')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x43aa0a[_0xab3a('0x15')]?_0x43aa0a['options'][_0xab3a('0x19')]||null:null,'attributes':_0x43aa0a[_0xab3a('0x15')]?_0x43aa0a[_0xab3a('0x15')][_0xab3a('0x1a')]||null:null,'limit':_0x43aa0a['options']?_0x43aa0a[_0xab3a('0x15')][_0xab3a('0x1b')]||null:null})[_0xab3a('0x17')](function(_0x2f0e7a){logger[_0xab3a('0x10')](_0xab3a('0x1c'),_0x43aa0a);logger['debug']('UpdateWhatsappQueueReport',_0x43aa0a,JSON[_0xab3a('0x1d')](_0x2f0e7a));_0x18d28d(_0x2f0e7a);})[_0xab3a('0x12')](function(_0x395b61){logger['error'](_0xab3a('0x1c'),_0x395b61[_0xab3a('0xf')],_0x43aa0a);_0x4ffb5c(_0x1442a7[_0xab3a('0xe')](0x1f4,_0x395b61[_0xab3a('0xf')]));});});}; \ No newline at end of file diff --git a/server/api/whatsappTransferReport/index.js b/server/api/whatsappTransferReport/index.js index 98df1b7..4c1eeac 100644 --- a/server/api/whatsappTransferReport/index.js +++ b/server/api/whatsappTransferReport/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x8839=['get','isAuthenticated','index','describe','show','post','put','/:id','delete','exports','multer','util','path','connect-timeout','Router','fs-extra','../../components/auth/service','./whatsappTransferReport.controller'];(function(_0x1c11c5,_0x5e4983){var _0x2fac34=function(_0x3711d9){while(--_0x3711d9){_0x1c11c5['push'](_0x1c11c5['shift']());}};_0x2fac34(++_0x5e4983);}(_0x8839,0x106));var _0x9883=function(_0x338ba9,_0x85de32){_0x338ba9=_0x338ba9-0x0;var _0x39d764=_0x8839[_0x338ba9];return _0x39d764;};'use strict';var multer=require(_0x9883('0x0'));var util=require(_0x9883('0x1'));var path=require(_0x9883('0x2'));var timeout=require(_0x9883('0x3'));var express=require('express');var router=express[_0x9883('0x4')]();var fs_extra=require(_0x9883('0x5'));var auth=require(_0x9883('0x6'));var interaction=require('../../components/interaction/service');var config=require('../../config/environment');var controller=require(_0x9883('0x7'));router[_0x9883('0x8')]('/',auth[_0x9883('0x9')](),controller[_0x9883('0xa')]);router['get']('/describe',auth[_0x9883('0x9')](),controller[_0x9883('0xb')]);router['get']('/:id',auth['isAuthenticated'](),controller[_0x9883('0xc')]);router[_0x9883('0xd')]('/',auth[_0x9883('0x9')](),controller['create']);router[_0x9883('0xe')](_0x9883('0xf'),auth[_0x9883('0x9')](),controller['update']);router[_0x9883('0x10')]('/:id',auth[_0x9883('0x9')](),controller['destroy']);module[_0x9883('0x11')]=router; \ No newline at end of file +var _0x8c3e=['util','path','Router','../../components/auth/service','../../components/interaction/service','../../config/environment','get','/describe','describe','/:id','isAuthenticated','show','update','delete','destroy','exports','multer'];(function(_0x2ed44d,_0x3fd94b){var _0x27ff02=function(_0x322476){while(--_0x322476){_0x2ed44d['push'](_0x2ed44d['shift']());}};_0x27ff02(++_0x3fd94b);}(_0x8c3e,0x1b9));var _0xe8c3=function(_0x2f1ac4,_0x236a72){_0x2f1ac4=_0x2f1ac4-0x0;var _0x18e1a5=_0x8c3e[_0x2f1ac4];return _0x18e1a5;};'use strict';var multer=require(_0xe8c3('0x0'));var util=require(_0xe8c3('0x1'));var path=require(_0xe8c3('0x2'));var timeout=require('connect-timeout');var express=require('express');var router=express[_0xe8c3('0x3')]();var fs_extra=require('fs-extra');var auth=require(_0xe8c3('0x4'));var interaction=require(_0xe8c3('0x5'));var config=require(_0xe8c3('0x6'));var controller=require('./whatsappTransferReport.controller');router['get']('/',auth['isAuthenticated'](),controller['index']);router[_0xe8c3('0x7')](_0xe8c3('0x8'),auth['isAuthenticated'](),controller[_0xe8c3('0x9')]);router[_0xe8c3('0x7')](_0xe8c3('0xa'),auth[_0xe8c3('0xb')](),controller[_0xe8c3('0xc')]);router['post']('/',auth[_0xe8c3('0xb')](),controller['create']);router['put'](_0xe8c3('0xa'),auth[_0xe8c3('0xb')](),controller[_0xe8c3('0xd')]);router[_0xe8c3('0xe')](_0xe8c3('0xa'),auth[_0xe8c3('0xb')](),controller[_0xe8c3('0xf')]);module[_0xe8c3('0x10')]=router; \ No newline at end of file diff --git a/server/api/whatsappTransferReport/whatsappTransferReport.attributes.js b/server/api/whatsappTransferReport/whatsappTransferReport.attributes.js index 19a8adf..318a2d2 100644 --- a/server/api/whatsappTransferReport/whatsappTransferReport.attributes.js +++ b/server/api/whatsappTransferReport/whatsappTransferReport.attributes.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x1a85=['STRING','ENUM','account','DATE'];(function(_0x57b54c,_0x54ce0d){var _0x59cc19=function(_0xa33bc6){while(--_0xa33bc6){_0x57b54c['push'](_0x57b54c['shift']());}};_0x59cc19(++_0x54ce0d);}(_0x1a85,0x178));var _0x51a8=function(_0x5b8a99,_0x2e0c12){_0x5b8a99=_0x5b8a99-0x0;var _0x31fa01=_0x1a85[_0x5b8a99];return _0x31fa01;};'use strict';var Sequelize=require('sequelize');module['exports']={'uniqueid':{'type':Sequelize[_0x51a8('0x0')],'allowNull':![]},'type':{'type':Sequelize[_0x51a8('0x1')](_0x51a8('0x2'),'agent','queue'),'allowNull':![]},'transferredAt':{'type':Sequelize[_0x51a8('0x3')]}}; \ No newline at end of file +var _0xb7aa=['queue','DATE','sequelize','exports','STRING','ENUM','account','agent'];(function(_0xfd74e9,_0x15ae2c){var _0x16d207=function(_0x4c278c){while(--_0x4c278c){_0xfd74e9['push'](_0xfd74e9['shift']());}};_0x16d207(++_0x15ae2c);}(_0xb7aa,0x11a));var _0xab7a=function(_0x18d5d9,_0x306625){_0x18d5d9=_0x18d5d9-0x0;var _0x4ea7c9=_0xb7aa[_0x18d5d9];return _0x4ea7c9;};'use strict';var Sequelize=require(_0xab7a('0x0'));module[_0xab7a('0x1')]={'uniqueid':{'type':Sequelize[_0xab7a('0x2')],'allowNull':![]},'type':{'type':Sequelize[_0xab7a('0x3')](_0xab7a('0x4'),_0xab7a('0x5'),_0xab7a('0x6')),'allowNull':![]},'transferredAt':{'type':Sequelize[_0xab7a('0x7')]}}; \ No newline at end of file diff --git a/server/api/whatsappTransferReport/whatsappTransferReport.controller.js b/server/api/whatsappTransferReport/whatsappTransferReport.controller.js index 9573a17..ce8738e 100644 --- a/server/api/whatsappTransferReport/whatsappTransferReport.controller.js +++ b/server/api/whatsappTransferReport/whatsappTransferReport.controller.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xa200=['../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','sendStatus','end','status','undefined','count','offset','limit','set','Content-Range','apply','save','update','then','stack','name','send','index','map','WhatsappTransferReport','rawAttributes','type','key','model','query','keys','filters','attributes','intersection','fields','length','hasOwnProperty','nolimit','order','sort','where','pick','filter','merge','VIRTUAL','include','findAll','rows','catch','show','params','includeAll','create','body','find','destroy','describe','rimraf','zip-dir','fast-json-patch','request-promise','bluebird','mustache','util','path','sox','to-csv','ejs','fs-extra','lodash','squel','crypto','jsforce','desk.js','querystring','papaparse','ioredis','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware'];(function(_0x4b4779,_0x12080f){var _0x346eb3=function(_0x154b02){while(--_0x154b02){_0x4b4779['push'](_0x4b4779['shift']());}};_0x346eb3(++_0x12080f);}(_0xa200,0xd3));var _0x0a20=function(_0x122ef9,_0x451d2a){_0x122ef9=_0x122ef9-0x0;var _0x42fba0=_0xa200[_0x122ef9];return _0x42fba0;};'use strict';var emlformat=require('eml-format');var rimraf=require(_0x0a20('0x0'));var zipdir=require(_0x0a20('0x1'));var jsonpatch=require(_0x0a20('0x2'));var rp=require(_0x0a20('0x3'));var moment=require('moment');var BPromise=require(_0x0a20('0x4'));var Mustache=require(_0x0a20('0x5'));var util=require(_0x0a20('0x6'));var path=require(_0x0a20('0x7'));var sox=require(_0x0a20('0x8'));var csv=require(_0x0a20('0x9'));var ejs=require(_0x0a20('0xa'));var fs=require('fs');var fs_extra=require(_0x0a20('0xb'));var _=require(_0x0a20('0xc'));var squel=require(_0x0a20('0xd'));var crypto=require(_0x0a20('0xe'));var jsforce=require(_0x0a20('0xf'));var deskjs=require(_0x0a20('0x10'));var toCsv=require(_0x0a20('0x9'));var querystring=require(_0x0a20('0x11'));var Papa=require(_0x0a20('0x12'));var Redis=require(_0x0a20('0x13'));var authService=require('../../components/auth/service');var qs=require(_0x0a20('0x14'));var as=require(_0x0a20('0x15'));var hardwareService=require(_0x0a20('0x16'));var logger=require('../../config/logger')('api');var utils=require(_0x0a20('0x17'));var config=require(_0x0a20('0x18'));var licenseUtil=require(_0x0a20('0x19'));var db=require(_0x0a20('0x1a'))['db'];function respondWithStatusCode(_0x43ccce,_0x1592fc){_0x1592fc=_0x1592fc||0xcc;return function(_0x4a8014){if(_0x4a8014){return _0x43ccce[_0x0a20('0x1b')](_0x1592fc);}return _0x43ccce['status'](_0x1592fc)[_0x0a20('0x1c')]();};}function respondWithResult(_0xb1c5b2,_0x482878){_0x482878=_0x482878||0xc8;return function(_0x18a217){if(_0x18a217){return _0xb1c5b2[_0x0a20('0x1d')](_0x482878)['json'](_0x18a217);}};}function respondWithFilteredResult(_0x3420d2,_0x181341){return function(_0x1ad9e8){if(_0x1ad9e8){var _0x53c08b=typeof _0x181341['offset']===_0x0a20('0x1e')&&typeof _0x181341['limit']===_0x0a20('0x1e');var _0x12ed9e=_0x1ad9e8[_0x0a20('0x1f')];var _0x39db0d=_0x53c08b?0x0:_0x181341[_0x0a20('0x20')];var _0x41dc4e=_0x53c08b?_0x1ad9e8[_0x0a20('0x1f')]:_0x181341[_0x0a20('0x20')]+_0x181341[_0x0a20('0x21')];var _0x37c939;if(_0x41dc4e>=_0x12ed9e){_0x41dc4e=_0x12ed9e;_0x37c939=0xc8;}else{_0x37c939=0xce;}_0x3420d2[_0x0a20('0x1d')](_0x37c939);return _0x3420d2[_0x0a20('0x22')](_0x0a20('0x23'),_0x39db0d+'-'+_0x41dc4e+'/'+_0x12ed9e)['json'](_0x1ad9e8);}return null;};}function patchUpdates(_0x2ce953){return function(_0x2647ba){try{jsonpatch[_0x0a20('0x24')](_0x2647ba,_0x2ce953,!![]);}catch(_0x488199){return BPromise['reject'](_0x488199);}return _0x2647ba[_0x0a20('0x25')]();};}function saveUpdates(_0x5cf478,_0xd2a1e5){return function(_0xbfda94){if(_0xbfda94){return _0xbfda94[_0x0a20('0x26')](_0x5cf478)[_0x0a20('0x27')](function(_0x313c8c){return _0x313c8c;});}return null;};}function removeEntity(_0x2c2212,_0x361571){return function(_0x51de16){if(_0x51de16){return _0x51de16['destroy']()[_0x0a20('0x27')](function(){_0x2c2212[_0x0a20('0x1d')](0xcc)[_0x0a20('0x1c')]();});}};}function handleEntityNotFound(_0x4a88b5,_0x33c443){return function(_0x2706d5){if(!_0x2706d5){_0x4a88b5[_0x0a20('0x1b')](0x194);}return _0x2706d5;};}function handleError(_0x4327a5,_0x4afcf0){_0x4afcf0=_0x4afcf0||0x1f4;return function(_0x4d2f06){logger['error'](_0x4d2f06[_0x0a20('0x28')]);if(_0x4d2f06[_0x0a20('0x29')]){delete _0x4d2f06[_0x0a20('0x29')];}_0x4327a5[_0x0a20('0x1d')](_0x4afcf0)[_0x0a20('0x2a')](_0x4d2f06);};}exports[_0x0a20('0x2b')]=function(_0x4a2e92,_0x422130){var _0x4909e0={},_0x433c34={},_0x53f1a9={'count':0x0,'rows':[]};var _0x55d21f=_[_0x0a20('0x2c')](db[_0x0a20('0x2d')][_0x0a20('0x2e')],function(_0x1d0857){return{'name':_0x1d0857['fieldName'],'type':_0x1d0857[_0x0a20('0x2f')][_0x0a20('0x30')]};});_0x433c34[_0x0a20('0x31')]=_[_0x0a20('0x2c')](_0x55d21f,_0x0a20('0x29'));_0x433c34[_0x0a20('0x32')]=_[_0x0a20('0x33')](_0x4a2e92[_0x0a20('0x32')]);_0x433c34[_0x0a20('0x34')]=_['intersection'](_0x433c34[_0x0a20('0x31')],_0x433c34['query']);_0x4909e0[_0x0a20('0x35')]=_[_0x0a20('0x36')](_0x433c34[_0x0a20('0x31')],qs[_0x0a20('0x37')](_0x4a2e92[_0x0a20('0x32')][_0x0a20('0x37')]));_0x4909e0['attributes']=_0x4909e0[_0x0a20('0x35')][_0x0a20('0x38')]?_0x4909e0[_0x0a20('0x35')]:_0x433c34['model'];if(!_0x4a2e92['query'][_0x0a20('0x39')](_0x0a20('0x3a'))){_0x4909e0[_0x0a20('0x21')]=qs[_0x0a20('0x21')](_0x4a2e92[_0x0a20('0x32')][_0x0a20('0x21')]);_0x4909e0['offset']=qs[_0x0a20('0x20')](_0x4a2e92[_0x0a20('0x32')][_0x0a20('0x20')]);}_0x4909e0[_0x0a20('0x3b')]=qs[_0x0a20('0x3c')](_0x4a2e92[_0x0a20('0x32')][_0x0a20('0x3c')]);_0x4909e0[_0x0a20('0x3d')]=qs[_0x0a20('0x34')](_[_0x0a20('0x3e')](_0x4a2e92['query'],_0x433c34['filters']),_0x55d21f);if(_0x4a2e92[_0x0a20('0x32')][_0x0a20('0x3f')]){_0x4909e0[_0x0a20('0x3d')]=_[_0x0a20('0x40')](_0x4909e0[_0x0a20('0x3d')],{'$or':_[_0x0a20('0x2c')](_0x55d21f,function(_0x2e6759){if(_0x2e6759[_0x0a20('0x2f')]!==_0x0a20('0x41')){var _0x5c63c1={};_0x5c63c1[_0x2e6759['name']]={'$like':'%'+_0x4a2e92['query'][_0x0a20('0x3f')]+'%'};return _0x5c63c1;}})});}_0x4909e0=_['merge']({},_0x4909e0,_0x4a2e92['options']);var _0x17c6ed={'where':_0x4909e0[_0x0a20('0x3d')]};return db[_0x0a20('0x2d')][_0x0a20('0x1f')](_0x17c6ed)[_0x0a20('0x27')](function(_0x3d930d){_0x53f1a9['count']=_0x3d930d;if(_0x4a2e92['query']['includeAll']){_0x4909e0[_0x0a20('0x42')]=[{'all':!![]}];}return db[_0x0a20('0x2d')][_0x0a20('0x43')](_0x4909e0);})['then'](function(_0x707f88){_0x53f1a9[_0x0a20('0x44')]=_0x707f88;return _0x53f1a9;})[_0x0a20('0x27')](respondWithFilteredResult(_0x422130,_0x4909e0))[_0x0a20('0x45')](handleError(_0x422130,null));};exports[_0x0a20('0x46')]=function(_0x5fa0aa,_0x27f683){var _0x33d1b2={'raw':!![],'where':{'id':_0x5fa0aa[_0x0a20('0x47')]['id']}},_0x40f1ba={};_0x40f1ba[_0x0a20('0x31')]=_[_0x0a20('0x33')](db['WhatsappTransferReport']['rawAttributes']);_0x40f1ba['query']=_[_0x0a20('0x33')](_0x5fa0aa[_0x0a20('0x32')]);_0x40f1ba['filters']=_[_0x0a20('0x36')](_0x40f1ba[_0x0a20('0x31')],_0x40f1ba[_0x0a20('0x32')]);_0x33d1b2[_0x0a20('0x35')]=_['intersection'](_0x40f1ba[_0x0a20('0x31')],qs[_0x0a20('0x37')](_0x5fa0aa[_0x0a20('0x32')][_0x0a20('0x37')]));_0x33d1b2[_0x0a20('0x35')]=_0x33d1b2[_0x0a20('0x35')][_0x0a20('0x38')]?_0x33d1b2[_0x0a20('0x35')]:_0x40f1ba[_0x0a20('0x31')];if(_0x5fa0aa[_0x0a20('0x32')][_0x0a20('0x48')]){_0x33d1b2[_0x0a20('0x42')]=[{'all':!![]}];}_0x33d1b2=_['merge']({},_0x33d1b2,_0x5fa0aa['options']);return db['WhatsappTransferReport']['find'](_0x33d1b2)[_0x0a20('0x27')](handleEntityNotFound(_0x27f683,null))['then'](respondWithResult(_0x27f683,null))[_0x0a20('0x45')](handleError(_0x27f683,null));};exports[_0x0a20('0x49')]=function(_0x2604c6,_0x1e7f4f){return db[_0x0a20('0x2d')]['create'](_0x2604c6[_0x0a20('0x4a')],{})[_0x0a20('0x27')](respondWithResult(_0x1e7f4f,0xc9))[_0x0a20('0x45')](handleError(_0x1e7f4f,null));};exports[_0x0a20('0x26')]=function(_0x348d1f,_0x13afaa){if(_0x348d1f['body']['id']){delete _0x348d1f[_0x0a20('0x4a')]['id'];}return db[_0x0a20('0x2d')][_0x0a20('0x4b')]({'where':{'id':_0x348d1f[_0x0a20('0x47')]['id']}})['then'](handleEntityNotFound(_0x13afaa,null))[_0x0a20('0x27')](saveUpdates(_0x348d1f[_0x0a20('0x4a')],null))[_0x0a20('0x27')](respondWithResult(_0x13afaa,null))['catch'](handleError(_0x13afaa,null));};exports[_0x0a20('0x4c')]=function(_0x1771f8,_0xbb9369){return db[_0x0a20('0x2d')][_0x0a20('0x4b')]({'where':{'id':_0x1771f8[_0x0a20('0x47')]['id']}})[_0x0a20('0x27')](handleEntityNotFound(_0xbb9369,null))['then'](removeEntity(_0xbb9369,null))['catch'](handleError(_0xbb9369,null));};exports[_0x0a20('0x4d')]=function(_0x4e546b,_0x1d3757){return db['WhatsappTransferReport'][_0x0a20('0x4d')]()[_0x0a20('0x27')](respondWithResult(_0x1d3757,null))['catch'](handleError(_0x1d3757,null));}; \ No newline at end of file +var _0x08bd=['bluebird','mustache','util','to-csv','ejs','lodash','squel','crypto','jsforce','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/logger','api','../../config/utils','../../config/license/util','../../mysqldb','sendStatus','end','status','offset','undefined','count','limit','set','Content-Range','json','apply','reject','save','then','destroy','error','stack','name','index','map','WhatsappTransferReport','rawAttributes','type','model','query','keys','intersection','attributes','fields','length','hasOwnProperty','sort','where','pick','filters','filter','merge','VIRTUAL','options','findAll','rows','catch','params','includeAll','find','create','body','update','describe','eml-format','rimraf','zip-dir','fast-json-patch','request-promise'];(function(_0x4a9fb1,_0x273043){var _0x348672=function(_0x142b69){while(--_0x142b69){_0x4a9fb1['push'](_0x4a9fb1['shift']());}};_0x348672(++_0x273043);}(_0x08bd,0xd3));var _0xd08b=function(_0x121b52,_0x5802b4){_0x121b52=_0x121b52-0x0;var _0xd3d4a=_0x08bd[_0x121b52];return _0xd3d4a;};'use strict';var emlformat=require(_0xd08b('0x0'));var rimraf=require(_0xd08b('0x1'));var zipdir=require(_0xd08b('0x2'));var jsonpatch=require(_0xd08b('0x3'));var rp=require(_0xd08b('0x4'));var moment=require('moment');var BPromise=require(_0xd08b('0x5'));var Mustache=require(_0xd08b('0x6'));var util=require(_0xd08b('0x7'));var path=require('path');var sox=require('sox');var csv=require(_0xd08b('0x8'));var ejs=require(_0xd08b('0x9'));var fs=require('fs');var fs_extra=require('fs-extra');var _=require(_0xd08b('0xa'));var squel=require(_0xd08b('0xb'));var crypto=require(_0xd08b('0xc'));var jsforce=require(_0xd08b('0xd'));var deskjs=require('desk.js');var toCsv=require('to-csv');var querystring=require('querystring');var Papa=require('papaparse');var Redis=require(_0xd08b('0xe'));var authService=require(_0xd08b('0xf'));var qs=require(_0xd08b('0x10'));var as=require(_0xd08b('0x11'));var hardwareService=require('../../config/license/hardware');var logger=require(_0xd08b('0x12'))(_0xd08b('0x13'));var utils=require(_0xd08b('0x14'));var config=require('../../config/environment');var licenseUtil=require(_0xd08b('0x15'));var db=require(_0xd08b('0x16'))['db'];function respondWithStatusCode(_0x276cf8,_0xc4e282){_0xc4e282=_0xc4e282||0xcc;return function(_0x1dd417){if(_0x1dd417){return _0x276cf8[_0xd08b('0x17')](_0xc4e282);}return _0x276cf8['status'](_0xc4e282)[_0xd08b('0x18')]();};}function respondWithResult(_0x146290,_0x530ed4){_0x530ed4=_0x530ed4||0xc8;return function(_0x32f43b){if(_0x32f43b){return _0x146290[_0xd08b('0x19')](_0x530ed4)['json'](_0x32f43b);}};}function respondWithFilteredResult(_0x1d9b9c,_0x2b4eda){return function(_0x4539e6){if(_0x4539e6){var _0x4a310c=typeof _0x2b4eda[_0xd08b('0x1a')]==='undefined'&&typeof _0x2b4eda['limit']===_0xd08b('0x1b');var _0x49e625=_0x4539e6[_0xd08b('0x1c')];var _0x397e08=_0x4a310c?0x0:_0x2b4eda[_0xd08b('0x1a')];var _0xa9b195=_0x4a310c?_0x4539e6[_0xd08b('0x1c')]:_0x2b4eda[_0xd08b('0x1a')]+_0x2b4eda[_0xd08b('0x1d')];var _0x2379a4;if(_0xa9b195>=_0x49e625){_0xa9b195=_0x49e625;_0x2379a4=0xc8;}else{_0x2379a4=0xce;}_0x1d9b9c[_0xd08b('0x19')](_0x2379a4);return _0x1d9b9c[_0xd08b('0x1e')](_0xd08b('0x1f'),_0x397e08+'-'+_0xa9b195+'/'+_0x49e625)[_0xd08b('0x20')](_0x4539e6);}return null;};}function patchUpdates(_0x25c1aa){return function(_0x542406){try{jsonpatch[_0xd08b('0x21')](_0x542406,_0x25c1aa,!![]);}catch(_0x3d7d1a){return BPromise[_0xd08b('0x22')](_0x3d7d1a);}return _0x542406[_0xd08b('0x23')]();};}function saveUpdates(_0x5d0c15,_0x19832a){return function(_0x1ec580){if(_0x1ec580){return _0x1ec580['update'](_0x5d0c15)[_0xd08b('0x24')](function(_0x8b77b1){return _0x8b77b1;});}return null;};}function removeEntity(_0x3101dd,_0x49f4f9){return function(_0x5e36e0){if(_0x5e36e0){return _0x5e36e0[_0xd08b('0x25')]()['then'](function(){_0x3101dd[_0xd08b('0x19')](0xcc)[_0xd08b('0x18')]();});}};}function handleEntityNotFound(_0x586163,_0x29dd65){return function(_0x4ab0d9){if(!_0x4ab0d9){_0x586163[_0xd08b('0x17')](0x194);}return _0x4ab0d9;};}function handleError(_0x2785e7,_0x4a6a9b){_0x4a6a9b=_0x4a6a9b||0x1f4;return function(_0x29bba4){logger[_0xd08b('0x26')](_0x29bba4[_0xd08b('0x27')]);if(_0x29bba4['name']){delete _0x29bba4[_0xd08b('0x28')];}_0x2785e7['status'](_0x4a6a9b)['send'](_0x29bba4);};}exports[_0xd08b('0x29')]=function(_0x53efeb,_0x2f44ba){var _0x522d5c={},_0x27ca26={},_0x223418={'count':0x0,'rows':[]};var _0x488422=_[_0xd08b('0x2a')](db[_0xd08b('0x2b')][_0xd08b('0x2c')],function(_0xc16702){return{'name':_0xc16702['fieldName'],'type':_0xc16702[_0xd08b('0x2d')]['key']};});_0x27ca26[_0xd08b('0x2e')]=_[_0xd08b('0x2a')](_0x488422,'name');_0x27ca26[_0xd08b('0x2f')]=_[_0xd08b('0x30')](_0x53efeb[_0xd08b('0x2f')]);_0x27ca26['filters']=_[_0xd08b('0x31')](_0x27ca26['model'],_0x27ca26[_0xd08b('0x2f')]);_0x522d5c[_0xd08b('0x32')]=_[_0xd08b('0x31')](_0x27ca26['model'],qs[_0xd08b('0x33')](_0x53efeb['query'][_0xd08b('0x33')]));_0x522d5c[_0xd08b('0x32')]=_0x522d5c[_0xd08b('0x32')][_0xd08b('0x34')]?_0x522d5c[_0xd08b('0x32')]:_0x27ca26['model'];if(!_0x53efeb[_0xd08b('0x2f')][_0xd08b('0x35')]('nolimit')){_0x522d5c[_0xd08b('0x1d')]=qs[_0xd08b('0x1d')](_0x53efeb[_0xd08b('0x2f')][_0xd08b('0x1d')]);_0x522d5c[_0xd08b('0x1a')]=qs[_0xd08b('0x1a')](_0x53efeb[_0xd08b('0x2f')][_0xd08b('0x1a')]);}_0x522d5c['order']=qs[_0xd08b('0x36')](_0x53efeb[_0xd08b('0x2f')][_0xd08b('0x36')]);_0x522d5c[_0xd08b('0x37')]=qs['filters'](_[_0xd08b('0x38')](_0x53efeb[_0xd08b('0x2f')],_0x27ca26[_0xd08b('0x39')]),_0x488422);if(_0x53efeb[_0xd08b('0x2f')][_0xd08b('0x3a')]){_0x522d5c['where']=_[_0xd08b('0x3b')](_0x522d5c[_0xd08b('0x37')],{'$or':_[_0xd08b('0x2a')](_0x488422,function(_0x3539d2){if(_0x3539d2['type']!==_0xd08b('0x3c')){var _0x434391={};_0x434391[_0x3539d2['name']]={'$like':'%'+_0x53efeb[_0xd08b('0x2f')]['filter']+'%'};return _0x434391;}})});}_0x522d5c=_[_0xd08b('0x3b')]({},_0x522d5c,_0x53efeb[_0xd08b('0x3d')]);var _0x1faa5b={'where':_0x522d5c[_0xd08b('0x37')]};return db['WhatsappTransferReport'][_0xd08b('0x1c')](_0x1faa5b)[_0xd08b('0x24')](function(_0xa2b5){_0x223418['count']=_0xa2b5;if(_0x53efeb[_0xd08b('0x2f')]['includeAll']){_0x522d5c['include']=[{'all':!![]}];}return db[_0xd08b('0x2b')][_0xd08b('0x3e')](_0x522d5c);})[_0xd08b('0x24')](function(_0x37697f){_0x223418[_0xd08b('0x3f')]=_0x37697f;return _0x223418;})[_0xd08b('0x24')](respondWithFilteredResult(_0x2f44ba,_0x522d5c))[_0xd08b('0x40')](handleError(_0x2f44ba,null));};exports['show']=function(_0x2c72fa,_0x244e5d){var _0x35283e={'raw':!![],'where':{'id':_0x2c72fa[_0xd08b('0x41')]['id']}},_0x2ae260={};_0x2ae260[_0xd08b('0x2e')]=_[_0xd08b('0x30')](db['WhatsappTransferReport'][_0xd08b('0x2c')]);_0x2ae260['query']=_[_0xd08b('0x30')](_0x2c72fa[_0xd08b('0x2f')]);_0x2ae260['filters']=_[_0xd08b('0x31')](_0x2ae260[_0xd08b('0x2e')],_0x2ae260[_0xd08b('0x2f')]);_0x35283e['attributes']=_['intersection'](_0x2ae260[_0xd08b('0x2e')],qs[_0xd08b('0x33')](_0x2c72fa[_0xd08b('0x2f')][_0xd08b('0x33')]));_0x35283e['attributes']=_0x35283e['attributes'][_0xd08b('0x34')]?_0x35283e[_0xd08b('0x32')]:_0x2ae260['model'];if(_0x2c72fa[_0xd08b('0x2f')][_0xd08b('0x42')]){_0x35283e['include']=[{'all':!![]}];}_0x35283e=_[_0xd08b('0x3b')]({},_0x35283e,_0x2c72fa['options']);return db[_0xd08b('0x2b')][_0xd08b('0x43')](_0x35283e)[_0xd08b('0x24')](handleEntityNotFound(_0x244e5d,null))[_0xd08b('0x24')](respondWithResult(_0x244e5d,null))[_0xd08b('0x40')](handleError(_0x244e5d,null));};exports['create']=function(_0x48076b,_0x3e1a2c){return db['WhatsappTransferReport'][_0xd08b('0x44')](_0x48076b[_0xd08b('0x45')],{})[_0xd08b('0x24')](respondWithResult(_0x3e1a2c,0xc9))[_0xd08b('0x40')](handleError(_0x3e1a2c,null));};exports[_0xd08b('0x46')]=function(_0x3c6bf3,_0x2ca77c){if(_0x3c6bf3['body']['id']){delete _0x3c6bf3['body']['id'];}return db[_0xd08b('0x2b')][_0xd08b('0x43')]({'where':{'id':_0x3c6bf3['params']['id']}})[_0xd08b('0x24')](handleEntityNotFound(_0x2ca77c,null))[_0xd08b('0x24')](saveUpdates(_0x3c6bf3['body'],null))[_0xd08b('0x24')](respondWithResult(_0x2ca77c,null))[_0xd08b('0x40')](handleError(_0x2ca77c,null));};exports['destroy']=function(_0x4c3d49,_0xcec2cd){return db[_0xd08b('0x2b')][_0xd08b('0x43')]({'where':{'id':_0x4c3d49[_0xd08b('0x41')]['id']}})[_0xd08b('0x24')](handleEntityNotFound(_0xcec2cd,null))[_0xd08b('0x24')](removeEntity(_0xcec2cd,null))['catch'](handleError(_0xcec2cd,null));};exports['describe']=function(_0x13fe78,_0x585812){return db[_0xd08b('0x2b')][_0xd08b('0x47')]()[_0xd08b('0x24')](respondWithResult(_0x585812,null))['catch'](handleError(_0x585812,null));}; \ No newline at end of file diff --git a/server/api/whatsappTransferReport/whatsappTransferReport.model.js b/server/api/whatsappTransferReport/whatsappTransferReport.model.js index b827f55..5b784d6 100644 --- a/server/api/whatsappTransferReport/whatsappTransferReport.model.js +++ b/server/api/whatsappTransferReport/whatsappTransferReport.model.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x1563=['WhatsappTransferReport','report_whatsapp_transfer','uniqueid','lodash','util','api','moment','bluebird','request-promise','../../config/environment','./whatsappTransferReport.attributes'];(function(_0x26a776,_0xb78d93){var _0x440e98=function(_0x3ee6d8){while(--_0x3ee6d8){_0x26a776['push'](_0x26a776['shift']());}};_0x440e98(++_0xb78d93);}(_0x1563,0xdf));var _0x3156=function(_0x412faa,_0x6d5ea8){_0x412faa=_0x412faa-0x0;var _0x204402=_0x1563[_0x412faa];return _0x204402;};'use strict';var _=require(_0x3156('0x0'));var util=require(_0x3156('0x1'));var logger=require('../../config/logger')(_0x3156('0x2'));var moment=require(_0x3156('0x3'));var BPromise=require(_0x3156('0x4'));var rp=require(_0x3156('0x5'));var fs=require('fs');var path=require('path');var rimraf=require('rimraf');var config=require(_0x3156('0x6'));var attributes=require(_0x3156('0x7'));module['exports']=function(_0x1e54ef,_0x4b9dd1){return _0x1e54ef['define'](_0x3156('0x8'),attributes,{'tableName':_0x3156('0x9'),'paranoid':![],'indexes':[{'name':'uniqueid','fields':[_0x3156('0xa')]}],'timestamps':!![]});}; \ No newline at end of file +var _0x83c0=['rimraf','../../config/environment','./whatsappTransferReport.attributes','exports','WhatsappTransferReport','report_whatsapp_transfer','lodash','util','../../config/logger','api','bluebird','path'];(function(_0x4f3c9b,_0x28e078){var _0x84e58a=function(_0x37bf49){while(--_0x37bf49){_0x4f3c9b['push'](_0x4f3c9b['shift']());}};_0x84e58a(++_0x28e078);}(_0x83c0,0x72));var _0x083c=function(_0x54c11d,_0x963b10){_0x54c11d=_0x54c11d-0x0;var _0x5b1114=_0x83c0[_0x54c11d];return _0x5b1114;};'use strict';var _=require(_0x083c('0x0'));var util=require(_0x083c('0x1'));var logger=require(_0x083c('0x2'))(_0x083c('0x3'));var moment=require('moment');var BPromise=require(_0x083c('0x4'));var rp=require('request-promise');var fs=require('fs');var path=require(_0x083c('0x5'));var rimraf=require(_0x083c('0x6'));var config=require(_0x083c('0x7'));var attributes=require(_0x083c('0x8'));module[_0x083c('0x9')]=function(_0x2238e6,_0xd29c7e){return _0x2238e6['define'](_0x083c('0xa'),attributes,{'tableName':_0x083c('0xb'),'paranoid':![],'indexes':[{'name':'uniqueid','fields':['uniqueid']}],'timestamps':!![]});}; \ No newline at end of file diff --git a/server/api/whatsappTransferReport/whatsappTransferReport.rpc.js b/server/api/whatsappTransferReport/whatsappTransferReport.rpc.js index d6606f6..b8ff23c 100644 --- a/server/api/whatsappTransferReport/whatsappTransferReport.rpc.js +++ b/server/api/whatsappTransferReport/whatsappTransferReport.rpc.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x2de4=['code','message','catch','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','client','http','request','then','info','WhatsappTransferReport,\x20%s,\x20%s','debug','WhatsappTransferReport,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error'];(function(_0x43e27c,_0x4e3653){var _0x19c397=function(_0x28ec8f){while(--_0x28ec8f){_0x43e27c['push'](_0x43e27c['shift']());}};_0x19c397(++_0x4e3653);}(_0x2de4,0x6c));var _0x42de=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0x2de4[_0x3dd15e];return _0x231fd0;};'use strict';var _=require('lodash');var util=require(_0x42de('0x0'));var moment=require(_0x42de('0x1'));var BPromise=require(_0x42de('0x2'));var rs=require(_0x42de('0x3'));var fs=require('fs');var Redis=require(_0x42de('0x4'));var db=require(_0x42de('0x5'))['db'];var utils=require(_0x42de('0x6'));var logger=require('../../config/logger')('rpc');var config=require('../../config/environment');var jayson=require('jayson/promise');var client=jayson[_0x42de('0x7')][_0x42de('0x8')]({'port':0x232a});function respondWithRpcPromise(_0x1655cc,_0x32f9f2,_0x2963e6){return new BPromise(function(_0x2639bb,_0x127dd7){return client[_0x42de('0x9')](_0x1655cc,_0x2963e6)[_0x42de('0xa')](function(_0x4ad79d){logger[_0x42de('0xb')](_0x42de('0xc'),_0x32f9f2,'request\x20sent');logger[_0x42de('0xd')](_0x42de('0xe'),_0x32f9f2,_0x42de('0xf'),JSON[_0x42de('0x10')](_0x4ad79d));if(_0x4ad79d[_0x42de('0x11')]){if(_0x4ad79d[_0x42de('0x11')][_0x42de('0x12')]===0x1f4){logger[_0x42de('0x11')](_0x42de('0xc'),_0x32f9f2,_0x4ad79d[_0x42de('0x11')]['message']);return _0x127dd7(_0x4ad79d[_0x42de('0x11')][_0x42de('0x13')]);}logger[_0x42de('0x11')](_0x42de('0xc'),_0x32f9f2,_0x4ad79d[_0x42de('0x11')]['message']);return _0x2639bb(_0x4ad79d['error'][_0x42de('0x13')]);}else{logger[_0x42de('0xb')]('WhatsappTransferReport,\x20%s,\x20%s',_0x32f9f2,_0x42de('0xf'));_0x2639bb(_0x4ad79d['result'][_0x42de('0x13')]);}})[_0x42de('0x14')](function(_0x2860bd){logger[_0x42de('0x11')](_0x42de('0xc'),_0x32f9f2,_0x2860bd);_0x127dd7(_0x2860bd);});});} \ No newline at end of file +var _0x8b4f=['debug','WhatsappTransferReport,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','catch','lodash','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','../../config/environment','jayson/promise','http','request','then','info','WhatsappTransferReport,\x20%s,\x20%s','request\x20sent'];(function(_0x47aff3,_0x2f4828){var _0x33544a=function(_0x5525eb){while(--_0x5525eb){_0x47aff3['push'](_0x47aff3['shift']());}};_0x33544a(++_0x2f4828);}(_0x8b4f,0x85));var _0xf8b4=function(_0x3a607e,_0x54d530){_0x3a607e=_0x3a607e-0x0;var _0x37b106=_0x8b4f[_0x3a607e];return _0x37b106;};'use strict';var _=require(_0xf8b4('0x0'));var util=require(_0xf8b4('0x1'));var moment=require(_0xf8b4('0x2'));var BPromise=require(_0xf8b4('0x3'));var rs=require(_0xf8b4('0x4'));var fs=require('fs');var Redis=require(_0xf8b4('0x5'));var db=require(_0xf8b4('0x6'))['db'];var utils=require(_0xf8b4('0x7'));var logger=require(_0xf8b4('0x8'))('rpc');var config=require(_0xf8b4('0x9'));var jayson=require(_0xf8b4('0xa'));var client=jayson['client'][_0xf8b4('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x13517a,_0x7447db,_0x5888ed){return new BPromise(function(_0x3c19ce,_0xc96e6a){return client[_0xf8b4('0xc')](_0x13517a,_0x5888ed)[_0xf8b4('0xd')](function(_0x1c49d9){logger[_0xf8b4('0xe')](_0xf8b4('0xf'),_0x7447db,_0xf8b4('0x10'));logger[_0xf8b4('0x11')](_0xf8b4('0x12'),_0x7447db,'request\x20sent',JSON[_0xf8b4('0x13')](_0x1c49d9));if(_0x1c49d9[_0xf8b4('0x14')]){if(_0x1c49d9[_0xf8b4('0x14')][_0xf8b4('0x15')]===0x1f4){logger[_0xf8b4('0x14')](_0xf8b4('0xf'),_0x7447db,_0x1c49d9[_0xf8b4('0x14')]['message']);return _0xc96e6a(_0x1c49d9[_0xf8b4('0x14')][_0xf8b4('0x16')]);}logger[_0xf8b4('0x14')](_0xf8b4('0xf'),_0x7447db,_0x1c49d9['error'][_0xf8b4('0x16')]);return _0x3c19ce(_0x1c49d9[_0xf8b4('0x14')][_0xf8b4('0x16')]);}else{logger['info']('WhatsappTransferReport,\x20%s,\x20%s',_0x7447db,'request\x20sent');_0x3c19ce(_0x1c49d9[_0xf8b4('0x17')]['message']);}})[_0xf8b4('0x18')](function(_0x2b3b03){logger[_0xf8b4('0x14')]('WhatsappTransferReport,\x20%s,\x20%s',_0x7447db,_0x2b3b03);_0xc96e6a(_0x2b3b03);});});} \ No newline at end of file diff --git a/server/app.js b/server/app.js index a10b7a1..7e88761 100644 --- a/server/app.js +++ b/server/app.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x87d3=['info','start','number','exitCode','length','\x20processes\x20failed\x20at\x20startup:\x20','map','pm2_env','Online\x20apps:','online','join','Offline\x20apps:','filter','status','None','log','App\x20Ready!','catch','Server\x20failed\x20to\x20start\x20due\x20to\x20error!','error','lodash','./mysqldb','./config/seedDB','./config/license','./rpc','./config/environment','app','./config/pm2/config','./config/schedule','./config/schedule/chat','./config/schedule/transcribe','./config/schedule/cloud-provider','sequelize','sync','then','seedDB','default','listen'];(function(_0x104b5a,_0x37a46a){var _0x3092cd=function(_0x4bcafe){while(--_0x4bcafe){_0x104b5a['push'](_0x104b5a['shift']());}};_0x3092cd(++_0x37a46a);}(_0x87d3,0x86));var _0x387d=function(_0x3c5f40,_0xb82ced){_0x3c5f40=_0x3c5f40-0x0;var _0x5b610e=_0x87d3[_0x3c5f40];return _0x5b610e;};'use strict';var _=require(_0x387d('0x0'));var db=require(_0x387d('0x1'))['db'];var seedDb=require(_0x387d('0x2'));var checkLicense=require(_0x387d('0x3'));var rpc=require(_0x387d('0x4'));var config=require(_0x387d('0x5'));var logger=require('./config/logger')(_0x387d('0x6'));var pm2=require('./config/pm2');var pm2Config=require(_0x387d('0x7'));var schedule=require(_0x387d('0x8'));var chat=require(_0x387d('0x9'));var whatsapp=require('./config/schedule/whatsapp');var transcribe=require(_0x387d('0xa'));var provider=require(_0x387d('0xb'));function main(){return db[_0x387d('0xc')][_0x387d('0xd')]()[_0x387d('0xe')](function(){if(config[_0x387d('0xf')]){return seedDb[_0x387d('0x10')]();}})[_0x387d('0xe')](function(){return checkLicense[_0x387d('0x10')]();})[_0x387d('0xe')](function(){return rpc[_0x387d('0x11')]();})['then'](function(_0x297877){logger[_0x387d('0x12')](_0x297877);return chat[_0x387d('0x13')]();})[_0x387d('0xe')](function(){return whatsapp[_0x387d('0x13')]();})[_0x387d('0xe')](function(){return schedule[_0x387d('0x13')]();})[_0x387d('0xe')](function(){return transcribe[_0x387d('0x13')]();})[_0x387d('0xe')](function(){return provider[_0x387d('0x13')]();})[_0x387d('0xe')](function(_0x368694){logger[_0x387d('0x12')](_0x368694);return pm2[_0x387d('0x13')](pm2Config);})['then'](function(_0x4914a8){var _0xeca288=_0x4914a8['filter'](function(_0x54c482){return typeof _0x54c482['exitCode']===_0x387d('0x14')&&_0x54c482[_0x387d('0x15')]>=0x0;});if(_0xeca288[_0x387d('0x16')]>0x0){throw new Error(_0xeca288[_0x387d('0x16')]+_0x387d('0x17')+_[_0x387d('0x18')](_0xeca288,function(_0x3bbf9f){return'\x22'+_0x3bbf9f[_0x387d('0x19')]['name']+'\x22';}));}logger[_0x387d('0x12')](_0x387d('0x1a'),_[_0x387d('0x18')](_['filter'](_0x4914a8,{'status':_0x387d('0x1b')}),'name')[_0x387d('0x1c')]());logger['info'](_0x387d('0x1d'),_[_0x387d('0x18')](_[_0x387d('0x1e')](_0x4914a8,function(_0x37b84b){return _0x37b84b[_0x387d('0x1f')]!=='online';}),'name')[_0x387d('0x1c')]()||_0x387d('0x20'));console[_0x387d('0x21')](_0x387d('0x22'));})[_0x387d('0x23')](function(_0x3300e4){console[_0x387d('0x21')](_0x387d('0x24'),_0x3300e4);logger[_0x387d('0x25')]('Server\x20failed\x20to\x20start\x20due\x20to\x20error:\x20%s',_0x3300e4);process['exit'](0x1);});}main(); \ No newline at end of file +var _0xbd3c=['online','None','log','App\x20Ready!','Server\x20failed\x20to\x20start\x20due\x20to\x20error!','error','Server\x20failed\x20to\x20start\x20due\x20to\x20error:\x20%s','exit','lodash','./mysqldb','./config/seedDB','./rpc','./config/environment','./config/logger','./config/pm2/config','./config/schedule/chat','./config/schedule/whatsapp','./config/schedule/cloud-provider','sequelize','sync','seedDB','default','then','info','start','filter','exitCode','length','map','pm2_env','name'];(function(_0x56de0b,_0x1c39c1){var _0x1c05f0=function(_0x5a6e7d){while(--_0x5a6e7d){_0x56de0b['push'](_0x56de0b['shift']());}};_0x1c05f0(++_0x1c39c1);}(_0xbd3c,0xc2));var _0xcbd3=function(_0x3fa0df,_0x32c96b){_0x3fa0df=_0x3fa0df-0x0;var _0x31f29d=_0xbd3c[_0x3fa0df];return _0x31f29d;};'use strict';var _=require(_0xcbd3('0x0'));var db=require(_0xcbd3('0x1'))['db'];var seedDb=require(_0xcbd3('0x2'));var checkLicense=require('./config/license');var rpc=require(_0xcbd3('0x3'));var config=require(_0xcbd3('0x4'));var logger=require(_0xcbd3('0x5'))('app');var pm2=require('./config/pm2');var pm2Config=require(_0xcbd3('0x6'));var schedule=require('./config/schedule');var chat=require(_0xcbd3('0x7'));var whatsapp=require(_0xcbd3('0x8'));var transcribe=require('./config/schedule/transcribe');var provider=require(_0xcbd3('0x9'));function main(){return db[_0xcbd3('0xa')][_0xcbd3('0xb')]()['then'](function(){if(config[_0xcbd3('0xc')]){return seedDb[_0xcbd3('0xd')]();}})[_0xcbd3('0xe')](function(){return checkLicense[_0xcbd3('0xd')]();})[_0xcbd3('0xe')](function(){return rpc['listen']();})['then'](function(_0x41f67b){logger[_0xcbd3('0xf')](_0x41f67b);return chat['start']();})['then'](function(){return whatsapp['start']();})[_0xcbd3('0xe')](function(){return schedule[_0xcbd3('0x10')]();})[_0xcbd3('0xe')](function(){return transcribe['start']();})[_0xcbd3('0xe')](function(){return provider[_0xcbd3('0x10')]();})[_0xcbd3('0xe')](function(_0x1dfcfd){logger[_0xcbd3('0xf')](_0x1dfcfd);return pm2[_0xcbd3('0x10')](pm2Config);})['then'](function(_0x3cb72d){var _0x4f1dfd=_0x3cb72d[_0xcbd3('0x11')](function(_0x434ed6){return typeof _0x434ed6[_0xcbd3('0x12')]==='number'&&_0x434ed6[_0xcbd3('0x12')]>=0x0;});if(_0x4f1dfd['length']>0x0){throw new Error(_0x4f1dfd[_0xcbd3('0x13')]+'\x20processes\x20failed\x20at\x20startup:\x20'+_[_0xcbd3('0x14')](_0x4f1dfd,function(_0x4dd582){return'\x22'+_0x4dd582[_0xcbd3('0x15')][_0xcbd3('0x16')]+'\x22';}));}logger[_0xcbd3('0xf')]('Online\x20apps:',_['map'](_[_0xcbd3('0x11')](_0x3cb72d,{'status':_0xcbd3('0x17')}),_0xcbd3('0x16'))['join']());logger[_0xcbd3('0xf')]('Offline\x20apps:',_[_0xcbd3('0x14')](_['filter'](_0x3cb72d,function(_0x281133){return _0x281133['status']!==_0xcbd3('0x17');}),'name')['join']()||_0xcbd3('0x18'));console[_0xcbd3('0x19')](_0xcbd3('0x1a'));})['catch'](function(_0x23cf8d){console[_0xcbd3('0x19')](_0xcbd3('0x1b'),_0x23cf8d);logger[_0xcbd3('0x1c')](_0xcbd3('0x1d'),_0x23cf8d);process[_0xcbd3('0x1e')](0x1);});}main(); \ No newline at end of file diff --git a/server/components/auth/service.js b/server/components/auth/service.js index 7f247c2..99bee58 100644 --- a/server/components/auth/service.js +++ b/server/components/auth/service.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x34e8=['validatePasswordPattern','test','Sequelize','ValidationError','validatePasswordHistory','decryptString','split','toLowerCase','format','The\x20password\x20must\x20be\x20different\x20from\x20the\x20last\x20one.\x20Please\x20choose\x20another\x20one.','length','splice','unshift','encryptString','join','promisify','sign','secret','secrets','payload','options','verify','toString','hex','../../mysqldb','../../config/environment','../../config/license/hardware','../../config/license/util','lodash','jsonwebtoken','express-jwt','composable-middleware','basic-auth','crypto','bluebird','moment','session','role','fullname','name','internal','email','userpic','permissions','md5secret','voicePause','chatPause','mailPause','faxPause','smsPause','openchannelPause','pauseType','showWebBar','lastPauseAt','crudPermissions','passwordResetAt','alias','phoneBarAutoAnswer','phoneBarAutoAnswerDelay','phoneBarEnableRecording','phoneBarEnableDtmfTone','phoneBarExpires','phoneBarRemoteControl','phoneBarRemoteControlPort','interface','userProfileId','privacyEnabled','wssPort','downloadVoiceRecordings','downloadOmnichannelInteractions','downloadAttachments','ignorePauseForPreviewCalls','selectRecallMeCampaign','chatAutoanswer','emailAutoanswer','emailAutoanswerDelay','smsAutoanswer','smsAutoanswerDelay','openchannelAutoanswerDelay','faxAutoanswer','whatsappAutoanswer','whatsappAutoanswerDelay','isChatInteractionAuthorized','user','ChatInteraction','params','closed','disposition','unmanaged','Unmanaged.','Forbidden.','catch','authorization','startsWith','headers','Basic','User','find','pass','status','json','Wrong\x20credentials.','Unknown\x20authorization\x20format','query','getUuid','then','sub','Setting','allowedLoginAttempts','blockDuration','isEqual','API\x20access\x20key\x20is\x20not\x20valid\x20anymore','disabled','Invalid\x20API\x20access\x20key','blockedAt','minutes','User\x20not\x20found.','canUpdate','use','getLicense','update','Forbidden','isWebrtcLicence','webrtc','isMiddleware','signToken','setTokenCookie','It\x20looks\x20like\x20you\x20aren\x27t\x20logged\x20in,\x20please\x20try\x20again.','motion.token','redirect','/dashboards/general','send','isNil','apiKeyNonce','apiKeyIat','generateApiKey','regenerateApiKey','Please\x20use\x20the\x20previous\x20API\x20access\x20key\x20to\x20generate\x20a\x20new\x20one'];(function(_0x45e9d4,_0x1c1a2e){var _0x1fda68=function(_0x1eaf28){while(--_0x1eaf28){_0x45e9d4['push'](_0x45e9d4['shift']());}};_0x1fda68(++_0x1c1a2e);}(_0x34e8,0x12c));var _0x834e=function(_0xab59b6,_0x1b2e2c){_0xab59b6=_0xab59b6-0x0;var _0x16afd2=_0x34e8[_0xab59b6];return _0x16afd2;};'use strict';var db=require(_0x834e('0x0'))['db'];var config=require(_0x834e('0x1'));var hardwareConf=require(_0x834e('0x2'));var licenseUtil=require(_0x834e('0x3'));var encryptor=require('../encryptor');var _=require(_0x834e('0x4'));var jwt=require(_0x834e('0x5'));var expressJwt=require(_0x834e('0x6'));var compose=require(_0x834e('0x7'));var basicAuth=require(_0x834e('0x8'));var crypto=require(_0x834e('0x9'));var BPromise=require(_0x834e('0xa'));var util=require('util');var moment=require(_0x834e('0xb'));var validateJwt=expressJwt({'secret':config['secrets'][_0x834e('0xc')]});var userAttributes=['id',_0x834e('0xd'),_0x834e('0xe'),_0x834e('0xf'),_0x834e('0x10'),_0x834e('0x11'),_0x834e('0x12'),_0x834e('0x13'),_0x834e('0x14'),_0x834e('0x15'),_0x834e('0x16'),_0x834e('0x17'),_0x834e('0x18'),_0x834e('0x19'),_0x834e('0x1a'),_0x834e('0x1b'),_0x834e('0x1c'),'lastLoginAt',_0x834e('0x1d'),_0x834e('0x1e'),'allowmessenger',_0x834e('0x1f'),_0x834e('0x20'),_0x834e('0x21'),_0x834e('0x22'),'phoneBarDnd',_0x834e('0x23'),_0x834e('0x24'),'phoneBarEnableSettings',_0x834e('0x25'),'phoneBarPrefixRequired',_0x834e('0x26'),_0x834e('0x27'),'hotdesk',_0x834e('0x28'),_0x834e('0x29'),_0x834e('0x2a'),'settingsEnabled',_0x834e('0x2b'),_0x834e('0x2c'),_0x834e('0x2d'),_0x834e('0x2e'),_0x834e('0x2f'),_0x834e('0x30'),_0x834e('0x31'),'chatAutoanswerDelay',_0x834e('0x32'),_0x834e('0x33'),_0x834e('0x34'),_0x834e('0x35'),'openchannelAutoanswer',_0x834e('0x36'),_0x834e('0x37'),'faxAutoanswerDelay',_0x834e('0x38'),_0x834e('0x39')];exports[_0x834e('0x3a')]=function(){return this['isAuthenticated'](!![])['use'](function(_0x231619,_0x34563b,_0x589dde){if(_0x231619[_0x834e('0x3b')]){_0x589dde();}else{return db[_0x834e('0x3c')]['findOne']({'where':{'id':_0x231619[_0x834e('0x3d')]['id']},'attributes':['id',_0x834e('0x3e'),_0x834e('0x3f')],'raw':!![]})['then'](function(_0x24fcf7){if(_0x24fcf7&&_0x24fcf7[_0x834e('0x3e')]){return _0x34563b['status'](_0x24fcf7['disposition']===_0x834e('0x40')?0x195:0x193)['json']({'message':_0x24fcf7[_0x834e('0x3f')]===_0x834e('0x40')?_0x834e('0x41'):_0x834e('0x42')});}else{_0x589dde();}})[_0x834e('0x43')](function(_0x130cc5){_0x589dde(_0x130cc5);});}});};exports['isAuthenticated']=function isAuthenticated(_0x510780){return compose()['use'](function(_0x58c1d7,_0x2c7a8d,_0x567cea){var _0x106d6a;if(_0x58c1d7['headers'][_0x834e('0x44')]){if(_[_0x834e('0x45')](_0x58c1d7[_0x834e('0x46')][_0x834e('0x44')],_0x834e('0x47'))){var _0x390119=basicAuth(_0x58c1d7);db[_0x834e('0x48')][_0x834e('0x49')]({'where':{'name':_0x390119[_0x834e('0xf')]}})['then'](function(_0xef9ec2){if(!_0xef9ec2||!_0xef9ec2['authenticate'](_0x390119[_0x834e('0x4a')])){return _0x2c7a8d[_0x834e('0x4b')](0x191)[_0x834e('0x4c')]({'message':_0x834e('0x4d')});}_0x58c1d7[_0x834e('0x3b')]={'id':_0xef9ec2['id']};_0x567cea();})[_0x834e('0x43')](function(_0x4696a1){_0x567cea(_0x4696a1);});}else if(_[_0x834e('0x45')](_0x58c1d7[_0x834e('0x46')][_0x834e('0x44')],'Bearer')){validateJwt(_0x58c1d7,_0x2c7a8d,_0x567cea);}else{if(_0x510780){_0x567cea();}else{return _0x2c7a8d[_0x834e('0x4b')](0x193)[_0x834e('0x4c')]({'message':_0x834e('0x4e')});}}}else if(_0x58c1d7[_0x834e('0x4f')]['apikey']){try{var _0x3f88ad={'audience':hardwareConf[_0x834e('0x50')](),'issuer':hardwareConf['getUuid']()};verifyJwt(_0x58c1d7['query']['apikey'],_0x3f88ad)[_0x834e('0x51')](function(_0x41bf4d){return db[_0x834e('0x48')][_0x834e('0x49')]({'where':{'id':_0x41bf4d[_0x834e('0x52')]}})[_0x834e('0x51')](function(_0x4c2ef6){_0x106d6a=_0x4c2ef6;return db[_0x834e('0x53')]['findOne']({'where':{'id':0x1},'attributes':[_0x834e('0x54'),_0x834e('0x55')],'raw':!![]});})['then'](function(_0x18ac3b){if(!_0x106d6a||!_[_0x834e('0x56')](_0x106d6a['apiKeyNonce'],_0x41bf4d['nonce'])){return _0x2c7a8d[_0x834e('0x4b')](0x191)[_0x834e('0x4c')]({'message':_0x834e('0x57')});}if(_0x106d6a[_0x834e('0x58')]){return _0x2c7a8d[_0x834e('0x4b')](0x191)['json']({'message':_0x834e('0x59')});}if(_0x106d6a['blocked']){if(_0x18ac3b['blockDuration']>0x0){if(moment(_0x106d6a[_0x834e('0x5a')])['add'](_0x18ac3b[_0x834e('0x55')],_0x834e('0x5b'))>moment()){return _0x2c7a8d[_0x834e('0x4b')](0x191)[_0x834e('0x4c')]({'message':_0x834e('0x59')});}}else{return _0x2c7a8d['status'](0x191)[_0x834e('0x4c')]({'message':_0x834e('0x59')});}}_0x58c1d7[_0x834e('0x3b')]={'id':_0x106d6a['id']};_0x567cea();});})['catch'](function(){return _0x2c7a8d[_0x834e('0x4b')](0x191)[_0x834e('0x4c')]({'message':'Invalid\x20API\x20access\x20key'});});}catch(_0x1e3e71){_0x567cea(_0x1e3e71);}}else if(_0x510780){_0x567cea();}else{return _0x2c7a8d['status'](0x193)[_0x834e('0x4c')]({'message':_0x834e('0x4e')});}})['use'](function(_0x4a6942,_0x22ea21,_0x16969b){if(_0x4a6942[_0x834e('0x3b')]){db[_0x834e('0x48')][_0x834e('0x49')]({'where':{'id':_0x4a6942[_0x834e('0x3b')]['id']},'attributes':userAttributes})[_0x834e('0x51')](function(_0x4a3381){if(!_0x4a3381){return _0x22ea21[_0x834e('0x4b')](0x194)['json']({'message':_0x834e('0x5c')});}_0x4a6942['user']=_0x4a3381;_0x16969b();})[_0x834e('0x43')](function(_0x5a5807){_0x16969b(_0x5a5807);});}else if(_0x510780){_0x16969b();}else{return _0x22ea21[_0x834e('0x4b')](0x194)[_0x834e('0x4c')]({'message':'User\x20object\x20not\x20found.'});}});};exports[_0x834e('0x5d')]=function canUpdate(){return compose()[_0x834e('0x5e')](function(_0xa880cb,_0xd55cc3,_0x252ea0){return licenseUtil[_0x834e('0x5f')]()[_0x834e('0x51')](function(_0x3ccd8e){if(_0x3ccd8e[_0x834e('0x60')]){_0x252ea0();}else{return _0xd55cc3[_0x834e('0x4b')](0x193)['json']({'message':_0x834e('0x61')});}})[_0x834e('0x43')](function(_0x47a8a9){_0x252ea0(_0x47a8a9);});});};exports[_0x834e('0x62')]=function isWebrtcLicence(){return compose()[_0x834e('0x5e')](function(_0x25b035,_0x2112d5,_0x19b5ef){return licenseUtil[_0x834e('0x5f')]()['then'](function(_0x59c855){if(_0x59c855[_0x834e('0x63')]){_0x19b5ef();}else{return _0x2112d5[_0x834e('0x4b')](0x193)[_0x834e('0x4c')]({'message':_0x834e('0x61')});}})[_0x834e('0x43')](function(_0xd1d83b){_0x19b5ef(_0xd1d83b);});});};exports[_0x834e('0x64')]=function(_0x43f599,_0x1419eb,_0x390c45){_0x43f599[_0x834e('0x64')]=!![];return _0x390c45();};exports[_0x834e('0x65')]=function signToken(_0x1a28f6){return signJwt(_0x1a28f6);};exports[_0x834e('0x66')]=function(_0x2aa072,_0x1a3855){if(!_0x2aa072[_0x834e('0x3b')]){return _0x1a3855[_0x834e('0x4b')](0x194)[_0x834e('0x4c')]({'message':_0x834e('0x67')});}var _0x4cfacd={'payload':{'id':_0x2aa072[_0x834e('0x3b')]['id'],'role':_0x2aa072[_0x834e('0x3b')]['role']},'options':{'expiresIn':0x15180}};return signJwt(_0x4cfacd)[_0x834e('0x51')](function(_0x3b0988){_0x1a3855['cookie'](_0x834e('0x68'),_0x3b0988);_0x1a3855[_0x834e('0x69')](_0x834e('0x6a'));})[_0x834e('0x43')](function(_0x4288e4){return _0x1a3855[_0x834e('0x4b')](0x1f4)[_0x834e('0x6b')](_0x4288e4);});};exports['retrieveApiKey']=function(_0x1ad7fe){if(_[_0x834e('0x6c')](_0x1ad7fe[_0x834e('0x6d')])||_[_0x834e('0x6c')](_0x1ad7fe[_0x834e('0x6e')])){return null;}else{return createJwt(_0x1ad7fe);}};exports[_0x834e('0x6f')]=function(_0x344b51){_0x344b51[_0x834e('0x6d')]=generateNonce();_0x344b51['apiKeyIat']=generateIssuedAt();return createJwt(_0x344b51);};exports[_0x834e('0x70')]=function(_0x4dc104,_0x2f4bde){var _0x53a9ee=_0x4dc104[_0x834e('0x4f')]['apikey'];if(_0x53a9ee){var _0x527eef={'nonce':_0x2f4bde[_0x834e('0x6d')],'iat':_0x2f4bde[_0x834e('0x6e')],'audience':hardwareConf['getUuid'](),'issuer':hardwareConf['getUuid']()};return verifyJwt(_0x53a9ee,_0x527eef)[_0x834e('0x51')](function(){return generateApiKey(_0x2f4bde);});}else{throw{'message':_0x834e('0x71')};}};exports[_0x834e('0x72')]=function(_0x387365){var _0x21c417=new RegExp(/(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[?!@#\$%\^&\*~\-_=+[{\]\}])(?=.{8,})/);if(!_0x21c417[_0x834e('0x73')](_0x387365))throw new db[(_0x834e('0x74'))][(_0x834e('0x75'))]('The\x20password\x20must\x20be\x20at\x20least\x208\x20characters\x20long\x20and\x20have\x201\x20lowercase\x20character,\x201\x20uppercase\x20character,\x201\x20number\x20and\x201\x20special\x20character\x20~!@#$%^&-_=+[{]}.');return;};exports[_0x834e('0x76')]=function(_0x3c70bf,_0x5d5ac2,_0x281342){var _0x4e2b22=encryptor[_0x834e('0x77')](_0x5d5ac2)[_0x834e('0x78')](',');for(var _0x5160c4=0x0;_0x5160c4<_0x281342;_0x5160c4++){if(!_0x4e2b22[_0x5160c4])break;if(_0x3c70bf[_0x834e('0x79')]()===_0x4e2b22[_0x5160c4][_0x834e('0x79')]()){var _0x2de29a=util[_0x834e('0x7a')]('The\x20password\x20must\x20be\x20different\x20from\x20the\x20previous\x20%d\x20passwords.\x20Please\x20choose\x20another\x20one.',_0x281342);if(_0x281342===0x1){_0x2de29a=_0x834e('0x7b');}throw new db[(_0x834e('0x74'))][(_0x834e('0x75'))](_0x2de29a);}}return;};exports['updatePasswordsHistory']=function(_0x246b8e,_0x1fcae9){var _0x3a7683=_0x1fcae9?encryptor[_0x834e('0x77')](_0x1fcae9)[_0x834e('0x78')](','):[];if(_0x3a7683[_0x834e('0x7c')]===0x5){_0x3a7683[_0x834e('0x7d')](-0x1,0x1);}_0x3a7683[_0x834e('0x7e')](_0x246b8e);return encryptor[_0x834e('0x7f')](_0x3a7683[_0x834e('0x80')](','));};function signJwt(_0x1e4310){var _0x1dfa95=BPromise[_0x834e('0x81')](jwt[_0x834e('0x82')],{'context':jwt});var _0x460a7a=_0x1e4310[_0x834e('0x83')]||config[_0x834e('0x84')][_0x834e('0xc')];return new BPromise(function(_0x193a15,_0x3e3467){_0x1dfa95(_0x1e4310[_0x834e('0x85')],_0x460a7a,_0x1e4310[_0x834e('0x86')])['then'](function(_0x2145cf){_0x193a15(_0x2145cf);})[_0x834e('0x43')](function(_0x45bcc2){_0x3e3467(_0x45bcc2);});});}function verifyJwt(_0x36cc14,_0x4ca099,_0x30faa8){var _0x5a9c70=BPromise['promisify'](jwt[_0x834e('0x87')],{'context':jwt});var _0x2b1ec7=_0x30faa8||config[_0x834e('0x84')][_0x834e('0xc')];return new BPromise(function(_0x216105,_0x3821ad){_0x5a9c70(_0x36cc14,_0x2b1ec7,_0x4ca099)[_0x834e('0x51')](function(_0xe5c8f6){_0x216105(_0xe5c8f6);})['catch'](function(_0xdef8c4){_0x3821ad(_0xdef8c4);});});}function generateNonce(){return crypto['randomBytes'](0x10)[_0x834e('0x88')](_0x834e('0x89'));}function generateIssuedAt(){return Math['floor'](Date['now']()/0x3e8)[_0x834e('0x88')]();}function createJwt(_0x82f2a7){var _0x363cc2={'payload':{'iat':_0x82f2a7[_0x834e('0x6e')],'nonce':_0x82f2a7[_0x834e('0x6d')]},'options':{'algorithm':'HS512','subject':_0x82f2a7['id'][_0x834e('0x88')](),'issuer':hardwareConf[_0x834e('0x50')](),'audience':hardwareConf[_0x834e('0x50')]()}};return signJwt(_0x363cc2)[_0x834e('0x51')](function(_0x3181af){return{'iat':_0x82f2a7[_0x834e('0x6e')],'nonce':_0x82f2a7[_0x834e('0x6d')],'token':_0x3181af};});} \ No newline at end of file +var _0xb43b=['headers','then','authenticate','pass','status','Wrong\x20credentials.','user','Bearer','Unknown\x20authorization\x20format','query','apikey','getUuid','User','find','sub','allowedLoginAttempts','isEqual','API\x20access\x20key\x20is\x20not\x20valid\x20anymore','Invalid\x20API\x20access\x20key','blocked','blockDuration','blockedAt','minutes','User\x20object\x20not\x20found.','getLicense','update','Forbidden','webrtc','isMiddleware','signToken','It\x20looks\x20like\x20you\x20aren\x27t\x20logged\x20in,\x20please\x20try\x20again.','cookie','redirect','/dashboards/general','apiKeyNonce','isNil','generateApiKey','apiKeyIat','regenerateApiKey','Please\x20use\x20the\x20previous\x20API\x20access\x20key\x20to\x20generate\x20a\x20new\x20one','validatePasswordPattern','test','Sequelize','ValidationError','The\x20password\x20must\x20be\x20at\x20least\x208\x20characters\x20long\x20and\x20have\x201\x20lowercase\x20character,\x201\x20uppercase\x20character,\x201\x20number\x20and\x201\x20special\x20character\x20~!@#$%^&-_=+[{]}.','validatePasswordHistory','decryptString','split','toLowerCase','The\x20password\x20must\x20be\x20different\x20from\x20the\x20last\x20one.\x20Please\x20choose\x20another\x20one.','updatePasswordsHistory','unshift','encryptString','join','promisify','sign','payload','options','verify','randomBytes','toString','hex','floor','now','HS512','../../mysqldb','../../config/environment','../../config/license/util','../encryptor','lodash','express-jwt','composable-middleware','basic-auth','crypto','moment','session','role','fullname','name','internal','userpic','permissions','voicePause','chatPause','mailPause','faxPause','smsPause','openchannelPause','showWebBar','lastLoginAt','allowmessenger','phoneBarAutoAnswer','phoneBarDnd','phoneBarEnableRecording','phoneBarPrefixRequired','phoneBarRemoteControl','interface','settingsEnabled','wssPort','downloadVoiceRecordings','downloadAttachments','selectRecallMeCampaign','chatAutoanswer','emailAutoanswerDelay','smsAutoanswer','smsAutoanswerDelay','openchannelAutoanswer','faxAutoanswer','whatsappAutoanswer','isChatInteractionAuthorized','use','ChatInteraction','findOne','params','closed','disposition','unmanaged','json','Forbidden.','catch','isAuthenticated','authorization','startsWith'];(function(_0x1cb18a,_0x33167a){var _0x22442e=function(_0x46c611){while(--_0x46c611){_0x1cb18a['push'](_0x1cb18a['shift']());}};_0x22442e(++_0x33167a);}(_0xb43b,0x1b2));var _0xbb43=function(_0x4147ac,_0xe0736e){_0x4147ac=_0x4147ac-0x0;var _0x1d622d=_0xb43b[_0x4147ac];return _0x1d622d;};'use strict';var db=require(_0xbb43('0x0'))['db'];var config=require(_0xbb43('0x1'));var hardwareConf=require('../../config/license/hardware');var licenseUtil=require(_0xbb43('0x2'));var encryptor=require(_0xbb43('0x3'));var _=require(_0xbb43('0x4'));var jwt=require('jsonwebtoken');var expressJwt=require(_0xbb43('0x5'));var compose=require(_0xbb43('0x6'));var basicAuth=require(_0xbb43('0x7'));var crypto=require(_0xbb43('0x8'));var BPromise=require('bluebird');var util=require('util');var moment=require(_0xbb43('0x9'));var validateJwt=expressJwt({'secret':config['secrets'][_0xbb43('0xa')]});var userAttributes=['id',_0xbb43('0xb'),_0xbb43('0xc'),_0xbb43('0xd'),_0xbb43('0xe'),'email',_0xbb43('0xf'),_0xbb43('0x10'),'md5secret',_0xbb43('0x11'),_0xbb43('0x12'),_0xbb43('0x13'),_0xbb43('0x14'),_0xbb43('0x15'),_0xbb43('0x16'),'pauseType',_0xbb43('0x17'),_0xbb43('0x18'),'lastPauseAt','crudPermissions',_0xbb43('0x19'),'passwordResetAt','alias',_0xbb43('0x1a'),'phoneBarAutoAnswerDelay',_0xbb43('0x1b'),_0xbb43('0x1c'),'phoneBarEnableDtmfTone','phoneBarEnableSettings','phoneBarExpires',_0xbb43('0x1d'),_0xbb43('0x1e'),'phoneBarRemoteControlPort','hotdesk',_0xbb43('0x1f'),'userProfileId','privacyEnabled',_0xbb43('0x20'),_0xbb43('0x21'),_0xbb43('0x22'),'downloadOmnichannelInteractions',_0xbb43('0x23'),'ignorePauseForPreviewCalls',_0xbb43('0x24'),_0xbb43('0x25'),'chatAutoanswerDelay','emailAutoanswer',_0xbb43('0x26'),_0xbb43('0x27'),_0xbb43('0x28'),_0xbb43('0x29'),'openchannelAutoanswerDelay',_0xbb43('0x2a'),'faxAutoanswerDelay',_0xbb43('0x2b'),'whatsappAutoanswerDelay'];exports[_0xbb43('0x2c')]=function(){return this['isAuthenticated'](!![])[_0xbb43('0x2d')](function(_0x451cbd,_0x577ddd,_0x1d0768){if(_0x451cbd['user']){_0x1d0768();}else{return db[_0xbb43('0x2e')][_0xbb43('0x2f')]({'where':{'id':_0x451cbd[_0xbb43('0x30')]['id']},'attributes':['id','closed','disposition'],'raw':!![]})['then'](function(_0x269ca5){if(_0x269ca5&&_0x269ca5[_0xbb43('0x31')]){return _0x577ddd['status'](_0x269ca5[_0xbb43('0x32')]===_0xbb43('0x33')?0x195:0x193)[_0xbb43('0x34')]({'message':_0x269ca5[_0xbb43('0x32')]==='unmanaged'?'Unmanaged.':_0xbb43('0x35')});}else{_0x1d0768();}})[_0xbb43('0x36')](function(_0xa88db0){_0x1d0768(_0xa88db0);});}});};exports[_0xbb43('0x37')]=function isAuthenticated(_0x510b05){return compose()[_0xbb43('0x2d')](function(_0x21d386,_0x473828,_0x539730){var _0x2ad6da;if(_0x21d386['headers'][_0xbb43('0x38')]){if(_[_0xbb43('0x39')](_0x21d386[_0xbb43('0x3a')][_0xbb43('0x38')],'Basic')){var _0x157d62=basicAuth(_0x21d386);db['User']['find']({'where':{'name':_0x157d62['name']}})[_0xbb43('0x3b')](function(_0x573a05){if(!_0x573a05||!_0x573a05[_0xbb43('0x3c')](_0x157d62[_0xbb43('0x3d')])){return _0x473828[_0xbb43('0x3e')](0x191)['json']({'message':_0xbb43('0x3f')});}_0x21d386[_0xbb43('0x40')]={'id':_0x573a05['id']};_0x539730();})[_0xbb43('0x36')](function(_0xd987fa){_0x539730(_0xd987fa);});}else if(_[_0xbb43('0x39')](_0x21d386[_0xbb43('0x3a')][_0xbb43('0x38')],_0xbb43('0x41'))){validateJwt(_0x21d386,_0x473828,_0x539730);}else{if(_0x510b05){_0x539730();}else{return _0x473828['status'](0x193)[_0xbb43('0x34')]({'message':_0xbb43('0x42')});}}}else if(_0x21d386[_0xbb43('0x43')][_0xbb43('0x44')]){try{var _0x4015ec={'audience':hardwareConf[_0xbb43('0x45')](),'issuer':hardwareConf[_0xbb43('0x45')]()};verifyJwt(_0x21d386[_0xbb43('0x43')][_0xbb43('0x44')],_0x4015ec)[_0xbb43('0x3b')](function(_0x21346a){return db[_0xbb43('0x46')][_0xbb43('0x47')]({'where':{'id':_0x21346a[_0xbb43('0x48')]}})[_0xbb43('0x3b')](function(_0x405f36){_0x2ad6da=_0x405f36;return db['Setting'][_0xbb43('0x2f')]({'where':{'id':0x1},'attributes':[_0xbb43('0x49'),'blockDuration'],'raw':!![]});})[_0xbb43('0x3b')](function(_0x2c9a7c){if(!_0x2ad6da||!_[_0xbb43('0x4a')](_0x2ad6da['apiKeyNonce'],_0x21346a['nonce'])){return _0x473828['status'](0x191)[_0xbb43('0x34')]({'message':_0xbb43('0x4b')});}if(_0x2ad6da['disabled']){return _0x473828['status'](0x191)[_0xbb43('0x34')]({'message':_0xbb43('0x4c')});}if(_0x2ad6da[_0xbb43('0x4d')]){if(_0x2c9a7c[_0xbb43('0x4e')]>0x0){if(moment(_0x2ad6da[_0xbb43('0x4f')])['add'](_0x2c9a7c[_0xbb43('0x4e')],_0xbb43('0x50'))>moment()){return _0x473828[_0xbb43('0x3e')](0x191)[_0xbb43('0x34')]({'message':_0xbb43('0x4c')});}}else{return _0x473828['status'](0x191)[_0xbb43('0x34')]({'message':'Invalid\x20API\x20access\x20key'});}}_0x21d386[_0xbb43('0x40')]={'id':_0x2ad6da['id']};_0x539730();});})[_0xbb43('0x36')](function(){return _0x473828['status'](0x191)[_0xbb43('0x34')]({'message':'Invalid\x20API\x20access\x20key'});});}catch(_0x1fcf64){_0x539730(_0x1fcf64);}}else if(_0x510b05){_0x539730();}else{return _0x473828[_0xbb43('0x3e')](0x193)[_0xbb43('0x34')]({'message':_0xbb43('0x42')});}})['use'](function(_0x3e0871,_0x136bd4,_0x59750b){if(_0x3e0871[_0xbb43('0x40')]){db['User'][_0xbb43('0x47')]({'where':{'id':_0x3e0871[_0xbb43('0x40')]['id']},'attributes':userAttributes})[_0xbb43('0x3b')](function(_0x14e57e){if(!_0x14e57e){return _0x136bd4[_0xbb43('0x3e')](0x194)[_0xbb43('0x34')]({'message':'User\x20not\x20found.'});}_0x3e0871[_0xbb43('0x40')]=_0x14e57e;_0x59750b();})['catch'](function(_0x307f1e){_0x59750b(_0x307f1e);});}else if(_0x510b05){_0x59750b();}else{return _0x136bd4[_0xbb43('0x3e')](0x194)[_0xbb43('0x34')]({'message':_0xbb43('0x51')});}});};exports['canUpdate']=function canUpdate(){return compose()[_0xbb43('0x2d')](function(_0x39f75f,_0x4bc351,_0x24ba15){return licenseUtil[_0xbb43('0x52')]()[_0xbb43('0x3b')](function(_0x40f519){if(_0x40f519[_0xbb43('0x53')]){_0x24ba15();}else{return _0x4bc351['status'](0x193)[_0xbb43('0x34')]({'message':_0xbb43('0x54')});}})['catch'](function(_0x1a66f0){_0x24ba15(_0x1a66f0);});});};exports['isWebrtcLicence']=function isWebrtcLicence(){return compose()['use'](function(_0x4d7034,_0x5e2e6d,_0x1c3482){return licenseUtil['getLicense']()[_0xbb43('0x3b')](function(_0x5e5c86){if(_0x5e5c86[_0xbb43('0x55')]){_0x1c3482();}else{return _0x5e2e6d[_0xbb43('0x3e')](0x193)[_0xbb43('0x34')]({'message':'Forbidden'});}})[_0xbb43('0x36')](function(_0x4d9f18){_0x1c3482(_0x4d9f18);});});};exports[_0xbb43('0x56')]=function(_0x2518bf,_0xd43d24,_0x29840e){_0x2518bf[_0xbb43('0x56')]=!![];return _0x29840e();};exports[_0xbb43('0x57')]=function signToken(_0x37d8d3){return signJwt(_0x37d8d3);};exports['setTokenCookie']=function(_0x93f6e7,_0x26ea59){if(!_0x93f6e7[_0xbb43('0x40')]){return _0x26ea59[_0xbb43('0x3e')](0x194)['json']({'message':_0xbb43('0x58')});}var _0x3233b7={'payload':{'id':_0x93f6e7[_0xbb43('0x40')]['id'],'role':_0x93f6e7[_0xbb43('0x40')]['role']},'options':{'expiresIn':0x15180}};return signJwt(_0x3233b7)[_0xbb43('0x3b')](function(_0x3fdb10){_0x26ea59[_0xbb43('0x59')]('motion.token',_0x3fdb10);_0x26ea59[_0xbb43('0x5a')](_0xbb43('0x5b'));})[_0xbb43('0x36')](function(_0x1dc40a){return _0x26ea59[_0xbb43('0x3e')](0x1f4)['send'](_0x1dc40a);});};exports['retrieveApiKey']=function(_0xb44557){if(_['isNil'](_0xb44557[_0xbb43('0x5c')])||_[_0xbb43('0x5d')](_0xb44557['apiKeyIat'])){return null;}else{return createJwt(_0xb44557);}};exports[_0xbb43('0x5e')]=function(_0x3719dc){_0x3719dc[_0xbb43('0x5c')]=generateNonce();_0x3719dc[_0xbb43('0x5f')]=generateIssuedAt();return createJwt(_0x3719dc);};exports[_0xbb43('0x60')]=function(_0x5cb3c6,_0x124f88){var _0x539ffc=_0x5cb3c6['query'][_0xbb43('0x44')];if(_0x539ffc){var _0x1b9307={'nonce':_0x124f88[_0xbb43('0x5c')],'iat':_0x124f88[_0xbb43('0x5f')],'audience':hardwareConf[_0xbb43('0x45')](),'issuer':hardwareConf['getUuid']()};return verifyJwt(_0x539ffc,_0x1b9307)['then'](function(){return generateApiKey(_0x124f88);});}else{throw{'message':_0xbb43('0x61')};}};exports[_0xbb43('0x62')]=function(_0x3a84ad){var _0x308646=new RegExp(/(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[?!@#\$%\^&\*~\-_=+[{\]\}])(?=.{8,})/);if(!_0x308646[_0xbb43('0x63')](_0x3a84ad))throw new db[(_0xbb43('0x64'))][(_0xbb43('0x65'))](_0xbb43('0x66'));return;};exports[_0xbb43('0x67')]=function(_0x578b85,_0x1b6f96,_0xb996d7){var _0x432bd8=encryptor[_0xbb43('0x68')](_0x1b6f96)[_0xbb43('0x69')](',');for(var _0x1fae27=0x0;_0x1fae27<_0xb996d7;_0x1fae27++){if(!_0x432bd8[_0x1fae27])break;if(_0x578b85[_0xbb43('0x6a')]()===_0x432bd8[_0x1fae27][_0xbb43('0x6a')]()){var _0x3e01e4=util['format']('The\x20password\x20must\x20be\x20different\x20from\x20the\x20previous\x20%d\x20passwords.\x20Please\x20choose\x20another\x20one.',_0xb996d7);if(_0xb996d7===0x1){_0x3e01e4=_0xbb43('0x6b');}throw new db[(_0xbb43('0x64'))][(_0xbb43('0x65'))](_0x3e01e4);}}return;};exports[_0xbb43('0x6c')]=function(_0x38814a,_0x19e27e){var _0x2e01fb=_0x19e27e?encryptor['decryptString'](_0x19e27e)[_0xbb43('0x69')](','):[];if(_0x2e01fb['length']===0x5){_0x2e01fb['splice'](-0x1,0x1);}_0x2e01fb[_0xbb43('0x6d')](_0x38814a);return encryptor[_0xbb43('0x6e')](_0x2e01fb[_0xbb43('0x6f')](','));};function signJwt(_0x22ce17){var _0x24393a=BPromise[_0xbb43('0x70')](jwt[_0xbb43('0x71')],{'context':jwt});var _0x341481=_0x22ce17['secret']||config['secrets'][_0xbb43('0xa')];return new BPromise(function(_0x2b96b8,_0x137e75){_0x24393a(_0x22ce17[_0xbb43('0x72')],_0x341481,_0x22ce17[_0xbb43('0x73')])[_0xbb43('0x3b')](function(_0x12717e){_0x2b96b8(_0x12717e);})[_0xbb43('0x36')](function(_0x3ca6ad){_0x137e75(_0x3ca6ad);});});}function verifyJwt(_0x555426,_0x165936,_0x392d1a){var _0x234bc7=BPromise[_0xbb43('0x70')](jwt[_0xbb43('0x74')],{'context':jwt});var _0x33a4db=_0x392d1a||config['secrets'][_0xbb43('0xa')];return new BPromise(function(_0xb48be2,_0x42e437){_0x234bc7(_0x555426,_0x33a4db,_0x165936)[_0xbb43('0x3b')](function(_0xc34a02){_0xb48be2(_0xc34a02);})['catch'](function(_0x3c260f){_0x42e437(_0x3c260f);});});}function generateNonce(){return crypto[_0xbb43('0x75')](0x10)[_0xbb43('0x76')](_0xbb43('0x77'));}function generateIssuedAt(){return Math[_0xbb43('0x78')](Date[_0xbb43('0x79')]()/0x3e8)[_0xbb43('0x76')]();}function createJwt(_0x2992ea){var _0x10fd8b={'payload':{'iat':_0x2992ea[_0xbb43('0x5f')],'nonce':_0x2992ea['apiKeyNonce']},'options':{'algorithm':_0xbb43('0x7a'),'subject':_0x2992ea['id']['toString'](),'issuer':hardwareConf[_0xbb43('0x45')](),'audience':hardwareConf[_0xbb43('0x45')]()}};return signJwt(_0x10fd8b)[_0xbb43('0x3b')](function(_0x3dbcd9){return{'iat':_0x2992ea[_0xbb43('0x5f')],'nonce':_0x2992ea['apiKeyNonce'],'token':_0x3dbcd9};});} \ No newline at end of file diff --git a/server/components/contacts/index.js b/server/components/contacts/index.js index c973258..2681db5 100644 --- a/server/components/contacts/index.js +++ b/server/components/contacts/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x6754=['catch','describe','keys','cf_','map','CmCustomField','findOne','all','length','fieldType','type','lodash','../../mysqldb','findAll','skipContactsQuery','resolve','getContactsSubquery','search','parseAdvancedSearchFilter','parseQueryParameters','where','default','fields','filter','user','clause','tags','skip','checkListsRestrictions','then','ids','countFilteredContacts','count','User','buildContactsQuery','getFilteredContacts'];(function(_0x23c6db,_0x1cc298){var _0x55c746=function(_0x1e2932){while(--_0x1e2932){_0x23c6db['push'](_0x23c6db['shift']());}};_0x55c746(++_0x1cc298);}(_0x6754,0xbf));var _0x4675=function(_0x2b118d,_0x40e9e9){_0x2b118d=_0x2b118d-0x0;var _0x31d80b=_0x6754[_0x2b118d];return _0x31d80b;};'use strict';var _=require(_0x4675('0x0'));var sqlUtils=require('./sql-utils');var db=require(_0x4675('0x1'))['db'];exports[_0x4675('0x2')]=function(_0x594975,_0x3f5280,_0x3d8c51,_0x2801e7){var _0x11ffa5={'count':0x0,'rows':[]};var _0x9ff200=sqlUtils[_0x4675('0x3')](_0x3f5280,_0x594975);if(_0x9ff200){return Promise[_0x4675('0x4')](_0x11ffa5);}var _0x53d01e=sqlUtils[_0x4675('0x5')]();var _0x2c4eed={};var _0x57c733=![];var _0x30ba4d=![];return Promise[_0x4675('0x4')]()['then'](function(){if(_0x594975[_0x4675('0x6')]){return sqlUtils[_0x4675('0x7')](_0x594975[_0x4675('0x6')],_0x2801e7);}else{return sqlUtils[_0x4675('0x8')](_0x594975,_0x2801e7);}})['then'](function(_0x57c4d8){_0x53d01e[_0x4675('0x9')](_0x57c4d8[_0x4675('0xa')]);_0x53d01e[_0x4675('0x9')](_0x57c4d8[_0x4675('0xb')]);_0x53d01e[_0x4675('0x9')](_0x57c4d8[_0x4675('0xc')]);_0x53d01e[_0x4675('0x9')](_0x57c4d8[_0x4675('0xd')][_0x4675('0xe')]);_0x2c4eed=_0x57c4d8[_0x4675('0xf')];_0x30ba4d=_0x57c4d8['user'][_0x4675('0x10')];return sqlUtils[_0x4675('0x11')](_0x3f5280,_0x594975,_0x30ba4d);})[_0x4675('0x12')](function(_0x5467f9){_0x53d01e[_0x4675('0x9')](_0x5467f9);var _0x4d7d65=_0x594975[_0x4675('0x6')]?_0x2c4eed[_0x4675('0x13')]:_0x594975['tag'];_0x57c733=_0x4d7d65?!![]:![];return sqlUtils[_0x4675('0x14')](_0x53d01e,_0x4d7d65);})['then'](function(_0x55c1dd){_0x11ffa5['count']=_0x55c1dd;if(_0x11ffa5[_0x4675('0x15')]===0x0){return;}if(_0x594975[_0x4675('0x16')]){_0x30ba4d=!![];}return sqlUtils[_0x4675('0x17')](_0x53d01e,_0x594975[_0x4675('0xb')],_0x3d8c51,_0x57c733,_0x2c4eed[_0x4675('0xe')],_0x30ba4d);})['then'](function(_0x5c2b63){if(!_0x5c2b63){return[];}return sqlUtils[_0x4675('0x18')](_0x5c2b63,_0x594975,_0x3d8c51);})[_0x4675('0x12')](function(_0x58b4c9){_0x11ffa5['rows']=_0x58b4c9;return _0x11ffa5;})[_0x4675('0x19')](function(_0x176777){throw _0x176777;});};exports[_0x4675('0x1a')]=function(){var _0x5aabc7={};var _0x33a075=[];return db['CmContact'][_0x4675('0x1a')]()[_0x4675('0x12')](function(_0x4783da){_0x5aabc7=_0x4783da;var _0x5642bd=Object[_0x4675('0x1b')](_0x5aabc7)[_0x4675('0xc')](function(_0x213974){return _['startsWith'](_0x213974,_0x4675('0x1c'))?_0x213974:undefined;});var _0x17bb22=_0x5642bd[_0x4675('0x1d')](function(_0x4492fa){return db[_0x4675('0x1e')][_0x4675('0x1f')]({'where':{'id':_0x4492fa['slice'](0x3)},'raw':!![]});});return Promise[_0x4675('0x20')](_0x17bb22);})['then'](function(_0x2a55e1){for(var _0x37fe13=0x0;_0x37fe13<_0x2a55e1[_0x4675('0x21')];_0x37fe13++){if(_0x2a55e1[_0x37fe13]){var _0x3f1fd2=_0x4675('0x1c')+_0x2a55e1[_0x37fe13]['id'];_0x5aabc7[_0x3f1fd2][_0x4675('0x22')]=_0x2a55e1[_0x37fe13][_0x4675('0x23')];}}_0x33a075=_[_0x4675('0x1d')](Object['keys'](_0x5aabc7),function(_0x23f7a0){return{'name':_0x23f7a0,'type':_0x5aabc7[_0x23f7a0][_0x4675('0x23')]};});return _0x33a075;})[_0x4675('0x19')](function(_0x5ad358){throw _0x5ad358;});}; \ No newline at end of file +var _0x7eee=['buildContactsQuery','rows','catch','describe','CmContact','keys','cf_','map','CmCustomField','findOne','slice','all','length','fieldType','type','lodash','./sql-utils','../../mysqldb','skipContactsQuery','resolve','getContactsSubquery','then','search','parseAdvancedSearchFilter','parseQueryParameters','where','default','fields','user','clause','tags','skip','checkListsRestrictions','ids','countFilteredContacts','count'];(function(_0x17784a,_0x42fe44){var _0x41aded=function(_0x2e7319){while(--_0x2e7319){_0x17784a['push'](_0x17784a['shift']());}};_0x41aded(++_0x42fe44);}(_0x7eee,0xe7));var _0xe7ee=function(_0x9ef465,_0x3ecc6a){_0x9ef465=_0x9ef465-0x0;var _0x4f3727=_0x7eee[_0x9ef465];return _0x4f3727;};'use strict';var _=require(_0xe7ee('0x0'));var sqlUtils=require(_0xe7ee('0x1'));var db=require(_0xe7ee('0x2'))['db'];exports['findAll']=function(_0x25043b,_0x50ebc3,_0x417196,_0x1826da){var _0x35deb2={'count':0x0,'rows':[]};var _0x3d444c=sqlUtils[_0xe7ee('0x3')](_0x50ebc3,_0x25043b);if(_0x3d444c){return Promise[_0xe7ee('0x4')](_0x35deb2);}var _0x38a3c2=sqlUtils[_0xe7ee('0x5')]();var _0x28205c={};var _0x149ccb=![];var _0x1111be=![];return Promise[_0xe7ee('0x4')]()[_0xe7ee('0x6')](function(){if(_0x25043b[_0xe7ee('0x7')]){return sqlUtils[_0xe7ee('0x8')](_0x25043b['search'],_0x1826da);}else{return sqlUtils[_0xe7ee('0x9')](_0x25043b,_0x1826da);}})['then'](function(_0x16821d){_0x38a3c2[_0xe7ee('0xa')](_0x16821d[_0xe7ee('0xb')]);_0x38a3c2[_0xe7ee('0xa')](_0x16821d[_0xe7ee('0xc')]);_0x38a3c2[_0xe7ee('0xa')](_0x16821d['filter']);_0x38a3c2['where'](_0x16821d[_0xe7ee('0xd')][_0xe7ee('0xe')]);_0x28205c=_0x16821d[_0xe7ee('0xf')];_0x1111be=_0x16821d['user'][_0xe7ee('0x10')];return sqlUtils[_0xe7ee('0x11')](_0x50ebc3,_0x25043b,_0x1111be);})['then'](function(_0x1204a5){_0x38a3c2[_0xe7ee('0xa')](_0x1204a5);var _0x3119a8=_0x25043b[_0xe7ee('0x7')]?_0x28205c[_0xe7ee('0x12')]:_0x25043b['tag'];_0x149ccb=_0x3119a8?!![]:![];return sqlUtils[_0xe7ee('0x13')](_0x38a3c2,_0x3119a8);})[_0xe7ee('0x6')](function(_0x57a591){_0x35deb2[_0xe7ee('0x14')]=_0x57a591;if(_0x35deb2['count']===0x0){return;}if(_0x25043b['User']){_0x1111be=!![];}return sqlUtils[_0xe7ee('0x15')](_0x38a3c2,_0x25043b[_0xe7ee('0xc')],_0x417196,_0x149ccb,_0x28205c[_0xe7ee('0xe')],_0x1111be);})[_0xe7ee('0x6')](function(_0x3f39f5){if(!_0x3f39f5){return[];}return sqlUtils['getFilteredContacts'](_0x3f39f5,_0x25043b,_0x417196);})[_0xe7ee('0x6')](function(_0x3262d8){_0x35deb2[_0xe7ee('0x16')]=_0x3262d8;return _0x35deb2;})[_0xe7ee('0x17')](function(_0x1a0d02){throw _0x1a0d02;});};exports[_0xe7ee('0x18')]=function(){var _0x124abf={};var _0x40e1c5=[];return db[_0xe7ee('0x19')][_0xe7ee('0x18')]()[_0xe7ee('0x6')](function(_0x2c116a){_0x124abf=_0x2c116a;var _0x566bad=Object[_0xe7ee('0x1a')](_0x124abf)['filter'](function(_0x5f37cf){return _['startsWith'](_0x5f37cf,_0xe7ee('0x1b'))?_0x5f37cf:undefined;});var _0x59f101=_0x566bad[_0xe7ee('0x1c')](function(_0x371080){return db[_0xe7ee('0x1d')][_0xe7ee('0x1e')]({'where':{'id':_0x371080[_0xe7ee('0x1f')](0x3)},'raw':!![]});});return Promise[_0xe7ee('0x20')](_0x59f101);})[_0xe7ee('0x6')](function(_0x3a5f56){for(var _0x1959d3=0x0;_0x1959d3<_0x3a5f56[_0xe7ee('0x21')];_0x1959d3++){if(_0x3a5f56[_0x1959d3]){var _0x3b7d7e=_0xe7ee('0x1b')+_0x3a5f56[_0x1959d3]['id'];_0x124abf[_0x3b7d7e][_0xe7ee('0x22')]=_0x3a5f56[_0x1959d3][_0xe7ee('0x23')];}}_0x40e1c5=_[_0xe7ee('0x1c')](Object['keys'](_0x124abf),function(_0x16d736){return{'name':_0x16d736,'type':_0x124abf[_0x16d736][_0xe7ee('0x23')]};});return _0x40e1c5;})[_0xe7ee('0x17')](function(_0x269271){throw _0x269271;});}; \ No newline at end of file diff --git a/server/components/contacts/sql-utils.js b/server/components/contacts/sql-utils.js index e480ec9..d301540 100644 --- a/server/components/contacts/sql-utils.js +++ b/server/components/contacts/sql-utils.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xc3f6=['phone','fax','email','CompanyId','createdAt','updatedAt','deletedAt','TagIds','includes','push','forEach','GROUP_CONCAT(DISTINCT\x20t.id)','field','expr','getSelectedTags','replace','split','length','isNumeric','c.id\x20LIKE\x20?','c.email\x20LIKE\x20?','c.firstName\x20LIKE\x20?','c.lastName\x20LIKE\x20?','parseSearch','sqlOperator','conditions','name','dateOfBirth','fieldType','datetime','castTo','DATE','buildExpression','default','text','start','end','Tag','value','map','tags','and','ids','User','user','clause','uc.UserId\x20=\x20?','skip','compact','Contact','c.ListId\x20IN\x20?','concat','then','fields','filter','resolve','getLists','group','c.id','limit','offset','subqry.id','having','order','DESC','findAll','color','Sequelize','QueryTypes','SELECT','CmContact','toString','Tags','COUNT(*)','where','t.id\x20IN\x20?','sequelize','query','lodash','squel','../parsers/advancedSearch','../../mysqldb','role','agent','search','ListId','autocomplete','true','select','from','c.deletedAt\x20IS\x20NULL','subqry','left_join','cm_user_has_contacts','uc.CmContactId\x20=\x20','.id','ct.CmContactId\x20=\x20','tools_tags','firstName','lastName'];(function(_0x5576c4,_0x2cd5e1){var _0x5d5c32=function(_0x45e4f6){while(--_0x45e4f6){_0x5576c4['push'](_0x5576c4['shift']());}};_0x5d5c32(++_0x2cd5e1);}(_0xc3f6,0xb2));var _0x6c3f=function(_0x26b3c4,_0x34ff56){_0x26b3c4=_0x26b3c4-0x0;var _0x10d044=_0xc3f6[_0x26b3c4];return _0x10d044;};'use strict';var _=require(_0x6c3f('0x0'));var squel=require(_0x6c3f('0x1'));var as=require(_0x6c3f('0x2'));var qs=require('../parsers/qs');var utils=require('../interaction/utils');var db=require(_0x6c3f('0x3'))['db'];function skipContactsQuery(_0x5135c5,_0x46661a){var _0x3bde82=![];if(_0x5135c5[_0x6c3f('0x4')]===_0x6c3f('0x5')&&!_0x46661a[_0x6c3f('0x6')]&&!_0x46661a[_0x6c3f('0x7')]&&_0x46661a[_0x6c3f('0x8')]!==_0x6c3f('0x9')){_0x3bde82=!![];}return _0x3bde82;}function getContactsSubquery(){return squel[_0x6c3f('0xa')]()[_0x6c3f('0xb')]('cm_contacts','c')['where'](_0x6c3f('0xc'));}function applyJoinClauses(_0x472f18,_0x22223d){var _0x4ba09e=_0x22223d?'c':_0x6c3f('0xd');_0x472f18[_0x6c3f('0xe')](_0x6c3f('0xf'),'uc',_0x6c3f('0x10')+_0x4ba09e+_0x6c3f('0x11'))[_0x6c3f('0xe')]('cm_contact_has_tags','ct',_0x6c3f('0x12')+_0x4ba09e+_0x6c3f('0x11'))[_0x6c3f('0xe')](_0x6c3f('0x13'),'t','t.id\x20=\x20ct.TagId');return _0x472f18;}function addFieldsToQuery(_0x5b54f8,_0x1ee082,_0x40f057,_0x38650e,_0x214742){var _0xafaa7e=_0x214742?'c':_0x6c3f('0xd');if(!_0x1ee082){_0x1ee082=['id',_0x6c3f('0x14'),_0x6c3f('0x15'),_0x6c3f('0x16'),'mobile',_0x6c3f('0x17'),_0x6c3f('0x18'),_0x6c3f('0x7'),_0x6c3f('0x19'),_0x6c3f('0x1a'),_0x6c3f('0x1b'),_0x6c3f('0x1c'),_0x6c3f('0x1d')];}else if(!_0x1ee082[_0x6c3f('0x1e')]('id')){_0x1ee082[_0x6c3f('0x1f')]('id');}var _0x5d107b=_0x40f057&&_0x214742||!_0x40f057&&!_0x214742;if(_0x38650e){_0x5d107b=_0x38650e&&_0x214742||!_0x38650e&&!_0x214742;}_0x1ee082[_0x6c3f('0x20')](function(_0x365241){if(_0x365241===_0x6c3f('0x1d')){if(_0x5d107b){_0x5b54f8['field'](_0x6c3f('0x21'),_0x365241);}else if(_0x40f057||_0x38650e){_0x5b54f8[_0x6c3f('0x22')](_0xafaa7e+'.'+_0x365241);}}else{_0x5b54f8['field'](_0xafaa7e+'.'+_0x365241);}});return _0x5b54f8;}function getSqlClauses(){var _0x3f9dad={'default':squel[_0x6c3f('0x23')](),'fields':squel[_0x6c3f('0x23')](),'filter':squel[_0x6c3f('0x23')](),'tags':{'clause':squel[_0x6c3f('0x23')](),'ids':null},'user':{'clause':squel[_0x6c3f('0x23')](),'skip':![]}};return _0x3f9dad;}function parseTagParameter(_0x1c5893){var _0x2c78a7=squel[_0x6c3f('0x23')]();if(_0x1c5893){var _0x26b27f=utils[_0x6c3f('0x24')](_0x1c5893);_0x26b27f[_0x6c3f('0x20')](function(_0x1c8126){_0x2c78a7['or']('CONCAT(\x27,\x27,\x20subqry.TagIds,\x20\x27,\x27)\x20LIKE\x20?','%,'+_0x1c8126+',%');});}return _0x2c78a7;}function parseSearchFilter(_0x1cb9e6){var _0x196ff1=squel['expr']();if(_0x1cb9e6){var _0x4366c9=_0x1cb9e6[_0x6c3f('0x25')]('\x5c','\x5c\x5c')[_0x6c3f('0x25')](/'/g,'\x27\x27');if(_0x4366c9[_0x6c3f('0x26')]('\x20')[_0x6c3f('0x27')]>0x1){_0x196ff1['or']('MATCH\x20(c.firstName,\x20c.lastName,\x20c.phone,\x20c.mobile,\x20c.fax,\x20c.email)\x20AGAINST\x20(?\x20IN\x20BOOLEAN\x20MODE)',qs['getFullTextValue'](_0x4366c9,!![]),null);}else{if(qs[_0x6c3f('0x28')](_0x4366c9)){_0x196ff1['or'](_0x6c3f('0x29'),_0x4366c9+'%');_0x196ff1['or']('c.phone\x20LIKE\x20?',_0x4366c9+'%');_0x196ff1['or']('c.mobile\x20LIKE\x20?',_0x4366c9+'%');_0x196ff1['or']('c.fax\x20LIKE\x20?',_0x4366c9+'%');}else if(qs['isEmail'](_0x4366c9)){_0x196ff1['or'](_0x6c3f('0x2a'),_0x4366c9+'%');}else{_0x196ff1['or'](_0x6c3f('0x2b'),'%'+_0x4366c9+'%');_0x196ff1['or'](_0x6c3f('0x2c'),'%'+_0x4366c9+'%');_0x196ff1['or'](_0x6c3f('0x2a'),'%'+_0x4366c9+'%');}}}return _0x196ff1;}function parseAdvancedSearchFilter(_0x1a4400,_0x3e06df){var _0x5ea199=getSqlClauses();var _0x1a5d31=as[_0x6c3f('0x2d')](_0x1a4400);var _0x3b754a=_0x1a5d31[_0x6c3f('0x2e')];for(var _0x3dbded=0x0;_0x3dbded<_0x1a5d31['conditions']['length'];_0x3dbded++){var _0x275c76=_0x1a5d31[_0x6c3f('0x2f')][_0x3dbded];var _0x281481='c';var _0x16aece=_['find'](_0x3e06df,[_0x6c3f('0x30'),_0x275c76[_0x6c3f('0x22')]]);if(_0x16aece){if(_0x275c76[_0x6c3f('0x22')]===_0x6c3f('0x31')||_0x16aece[_0x6c3f('0x32')]===_0x6c3f('0x33')){_0x275c76[_0x6c3f('0x34')]=_0x6c3f('0x35');}var _0x4025a4=as[_0x6c3f('0x36')](_0x281481,_0x16aece['type'],_0x275c76);_0x5ea199[_0x6c3f('0x37')][_0x3b754a](_0x4025a4[_0x6c3f('0x38')],_0x4025a4['value'][_0x6c3f('0x39')],_0x4025a4['value'][_0x6c3f('0x3a')]);}else{if(_0x275c76[_0x6c3f('0x22')]===_0x6c3f('0x3b')){var _0x3619bc=_0x275c76[_0x6c3f('0x3c')][_0x6c3f('0x26')](',')[_0x6c3f('0x3d')](function(_0x49928e){return Number(_0x49928e);});var _0x1db61f=parseTagParameter(_0x3619bc);_0x5ea199[_0x6c3f('0x3e')]['clause'][_0x6c3f('0x3f')](_0x1db61f);_0x5ea199[_0x6c3f('0x3e')][_0x6c3f('0x40')]=_0x3619bc;}else if(_0x275c76[_0x6c3f('0x22')]===_0x6c3f('0x41')){_0x5ea199[_0x6c3f('0x42')][_0x6c3f('0x43')][_0x6c3f('0x3f')](_0x6c3f('0x44'),_0x275c76[_0x6c3f('0x3c')]);_0x5ea199['user'][_0x6c3f('0x45')]=!![];}}}return _0x5ea199;}function parseModelFields(_0x50cb39,_0x4805ff){var _0x48a089=squel[_0x6c3f('0x23')]();var _0x46d804=_(_0x50cb39)['keys']()[_0x6c3f('0x3d')](function(_0xac17c8){return _['some'](_0x4805ff,[_0x6c3f('0x30'),_0xac17c8])?_0xac17c8:undefined;})[_0x6c3f('0x46')]()['value']();if(_0x50cb39['Contact']){_0x46d804[_0x6c3f('0x1f')](_0x6c3f('0x47'));}if(_0x50cb39[_0x6c3f('0x41')]){_0x46d804[_0x6c3f('0x1f')](_0x6c3f('0x41'));}if(_0x46d804[_0x6c3f('0x27')]>0x0){_0x46d804[_0x6c3f('0x20')](function(_0x3a164d){if(_0x3a164d===_0x6c3f('0x7')){_0x48a089['and'](_0x6c3f('0x48'),[][_0x6c3f('0x49')](_0x50cb39[_0x3a164d]));}else if(_0x3a164d===_0x6c3f('0x47')){var _0x531b7f='%'+_0x50cb39[_0x3a164d]+'%';_0x48a089['and']('CONCAT_WS(\x27\x20\x27,\x20c.firstName,\x20c.lastName,\x20c.email)\x20LIKE\x20?',_0x531b7f);}else if(_0x3a164d===_0x6c3f('0x41')){_0x48a089[_0x6c3f('0x3f')](_0x6c3f('0x44'),_0x50cb39[_0x3a164d]);}else{_0x48a089[_0x6c3f('0x3f')]('c.'+_0x3a164d+'\x20=\x20?',_0x50cb39[_0x3a164d]);}});}return _0x48a089;}function parseQueryParameters(_0x3cbb36,_0x30520d){var _0x354dff=getSqlClauses();return Promise['resolve']()[_0x6c3f('0x4a')](function(){return parseModelFields(_0x3cbb36,_0x30520d);})[_0x6c3f('0x4a')](function(_0x3a93a6){_0x354dff[_0x6c3f('0x4b')]['and'](_0x3a93a6);return parseTagParameter(_0x3cbb36['tag']);})['then'](function(_0x5ce97e){_0x354dff['tags'][_0x6c3f('0x43')][_0x6c3f('0x3f')](_0x5ce97e);return parseSearchFilter(_0x3cbb36[_0x6c3f('0x4c')]);})[_0x6c3f('0x4a')](function(_0x127dc4){_0x354dff[_0x6c3f('0x4c')]=_0x127dc4;return _0x354dff;});}function checkListsRestrictions(_0x2ddd98,_0xbf2672,_0x5078b0){var _0x412121=squel[_0x6c3f('0x23')]();return Promise[_0x6c3f('0x4d')]()['then'](function(){if(_0xbf2672[_0x6c3f('0x6')]&&_0x2ddd98[_0x6c3f('0x4')]===_0x6c3f('0x5')&&!_0x5078b0){return _0x2ddd98[_0x6c3f('0x4e')]({'attributes':['id'],'raw':!![]});}})['then'](function(_0x1dc639){if(_0x1dc639){if(_0x1dc639[_0x6c3f('0x27')]===0x0){_0x412121[_0x6c3f('0x3f')]('c.ListId\x20IS\x20NULL');}else{_0x412121['and']('c.ListId\x20IN\x20?',_[_0x6c3f('0x3d')](_0x1dc639,'id'));}}})[_0x6c3f('0x4a')](function(){return _0x412121;});}function buildContactsQuery(_0x36430a,_0x4c829e,_0x104a2f,_0x46fc8e,_0x5564a0,_0x533ef5){if(_0x4c829e){_0x4c829e=_0x104a2f['attributes'];}_0x36430a=addFieldsToQuery(_0x36430a,_0x4c829e,_0x46fc8e,_0x533ef5,!![]);var _0x454857=squel[_0x6c3f('0xa')]();_0x454857=addFieldsToQuery(_0x454857,_0x4c829e,_0x46fc8e,_0x533ef5,![]);if(_0x46fc8e||_0x533ef5){_0x36430a=applyJoinClauses(_0x36430a,!![]);_0x36430a[_0x6c3f('0x4f')](_0x6c3f('0x50'));if(_0x104a2f[_0x6c3f('0x51')]){_0x454857[_0x6c3f('0x51')](_0x104a2f[_0x6c3f('0x51')]);}if(_0x104a2f[_0x6c3f('0x52')]){_0x454857[_0x6c3f('0x52')](_0x104a2f[_0x6c3f('0x52')]);}}else{_0x454857=applyJoinClauses(_0x454857,![]);_0x454857[_0x6c3f('0x4f')](_0x6c3f('0x53'));if(_0x104a2f[_0x6c3f('0x51')]){_0x36430a[_0x6c3f('0x51')](_0x104a2f[_0x6c3f('0x51')]);}if(_0x104a2f['offset']){_0x36430a[_0x6c3f('0x52')](_0x104a2f['offset']);}}_0x454857[_0x6c3f('0x54')](_0x5564a0);if(_0x104a2f[_0x6c3f('0x55')]){_0x104a2f['order'][_0x6c3f('0x20')](function(_0x11ca46){_0x36430a[_0x6c3f('0x55')]('c.'+_0x11ca46[0x0],_0x11ca46[0x1]==='DESC'?![]:!![]);_0x454857[_0x6c3f('0x55')]('subqry.'+_0x11ca46[0x0],_0x11ca46[0x1]===_0x6c3f('0x56')?![]:!![]);});}_0x454857[_0x6c3f('0xb')](_0x36430a,_0x6c3f('0xd'));return _0x454857;}function getFilteredContacts(_0x212329){var _0x5892fc=[];return db[_0x6c3f('0x3b')][_0x6c3f('0x57')]({'attributes':['id',_0x6c3f('0x30'),_0x6c3f('0x58')],'raw':!![]})['then'](function(_0x5c8d85){_0x5892fc=_['keyBy'](_0x5c8d85,'id');var _0x16bbd3={'type':db[_0x6c3f('0x59')][_0x6c3f('0x5a')][_0x6c3f('0x5b')],'model':db[_0x6c3f('0x5c')],'mapToModel':!![],'nest':!![],'raw':!![]};return db['sequelize']['query'](_0x212329[_0x6c3f('0x5d')](),_0x16bbd3);})['then'](function(_0x171e7e){_0x171e7e['forEach'](function(_0x4392a2){if(_0x4392a2[_0x6c3f('0x1d')]){_0x4392a2[_0x6c3f('0x5e')]=[];_0x4392a2[_0x6c3f('0x1d')][_0x6c3f('0x26')](',')[_0x6c3f('0x20')](function(_0x3da857){_0x4392a2[_0x6c3f('0x5e')][_0x6c3f('0x1f')](_0x5892fc[_0x3da857]);});}delete _0x4392a2['TagIds'];});return _0x171e7e;});}function countFilteredContacts(_0x295127,_0x522250){var _0x29c28a=_0x295127['clone']();_0x29c28a[_0x6c3f('0x22')](_0x6c3f('0x5f'));_0x29c28a=applyJoinClauses(_0x29c28a,!![]);_0x295127['group'](_0x6c3f('0x50'));var _0x4cba8f=utils[_0x6c3f('0x24')](_0x522250);if(!_['isEmpty'](_0x4cba8f)){_0x29c28a[_0x6c3f('0x60')](_0x6c3f('0x61'),_0x4cba8f);}var _0x5c9e4b={'type':db[_0x6c3f('0x59')][_0x6c3f('0x5a')][_0x6c3f('0x5b')],'raw':!![]};return db[_0x6c3f('0x62')][_0x6c3f('0x63')](_0x29c28a[_0x6c3f('0x5d')](),_0x5c9e4b)[_0x6c3f('0x4a')](function(_0x4075ba){return _0x4075ba[0x0]['COUNT(*)'];});}module['exports']={'buildContactsQuery':buildContactsQuery,'checkListsRestrictions':checkListsRestrictions,'countFilteredContacts':countFilteredContacts,'getContactsSubquery':getContactsSubquery,'getFilteredContacts':getFilteredContacts,'parseAdvancedSearchFilter':parseAdvancedSearchFilter,'parseQueryParameters':parseQueryParameters,'skipContactsQuery':skipContactsQuery}; \ No newline at end of file +var _0x7942=['search','ListId','autocomplete','true','from','where','c.deletedAt\x20IS\x20NULL','subqry','cm_user_has_contacts','uc.CmContactId\x20=\x20','.id','left_join','cm_contact_has_tags','ct.CmContactId\x20=\x20','tools_tags','t.id\x20=\x20ct.TagId','firstName','fax','email','deletedAt','TagIds','push','forEach','field','GROUP_CONCAT(DISTINCT\x20t.id)','expr','getSelectedTags','CONCAT(\x27,\x27,\x20subqry.TagIds,\x20\x27,\x27)\x20LIKE\x20?','replace','split','MATCH\x20(c.firstName,\x20c.lastName,\x20c.phone,\x20c.mobile,\x20c.fax,\x20c.email)\x20AGAINST\x20(?\x20IN\x20BOOLEAN\x20MODE)','getFullTextValue','isNumeric','c.id\x20LIKE\x20?','c.phone\x20LIKE\x20?','c.mobile\x20LIKE\x20?','c.fax\x20LIKE\x20?','isEmail','c.email\x20LIKE\x20?','parseSearch','sqlOperator','length','conditions','name','dateOfBirth','fieldType','castTo','DATE','buildExpression','type','default','value','end','map','tags','clause','user','and','uc.UserId\x20=\x20?','skip','keys','some','compact','Contact','User','concat','CONCAT_WS(\x27\x20\x27,\x20c.firstName,\x20c.lastName,\x20c.email)\x20LIKE\x20?','\x20=\x20?','resolve','then','fields','tag','filter','getLists','c.ListId\x20IS\x20NULL','c.ListId\x20IN\x20?','attributes','select','c.id','limit','offset','group','having','order','DESC','findAll','Sequelize','QueryTypes','sequelize','Tags','clone','COUNT(*)','isEmpty','SELECT','query','toString','exports','lodash','squel','../parsers/advancedSearch','../parsers/qs','../interaction/utils','../../mysqldb'];(function(_0x15fc07,_0x41cc0c){var _0x3d2c0f=function(_0x2a9a17){while(--_0x2a9a17){_0x15fc07['push'](_0x15fc07['shift']());}};_0x3d2c0f(++_0x41cc0c);}(_0x7942,0xc8));var _0x2794=function(_0x31ced5,_0x5d5415){_0x31ced5=_0x31ced5-0x0;var _0x10d9e5=_0x7942[_0x31ced5];return _0x10d9e5;};'use strict';var _=require(_0x2794('0x0'));var squel=require(_0x2794('0x1'));var as=require(_0x2794('0x2'));var qs=require(_0x2794('0x3'));var utils=require(_0x2794('0x4'));var db=require(_0x2794('0x5'))['db'];function skipContactsQuery(_0x55a04d,_0x4fe792){var _0x5903f2=![];if(_0x55a04d['role']==='agent'&&!_0x4fe792[_0x2794('0x6')]&&!_0x4fe792[_0x2794('0x7')]&&_0x4fe792[_0x2794('0x8')]!==_0x2794('0x9')){_0x5903f2=!![];}return _0x5903f2;}function getContactsSubquery(){return squel['select']()[_0x2794('0xa')]('cm_contacts','c')[_0x2794('0xb')](_0x2794('0xc'));}function applyJoinClauses(_0x4a0743,_0x57059a){var _0x24ee49=_0x57059a?'c':_0x2794('0xd');_0x4a0743['left_join'](_0x2794('0xe'),'uc',_0x2794('0xf')+_0x24ee49+_0x2794('0x10'))[_0x2794('0x11')](_0x2794('0x12'),'ct',_0x2794('0x13')+_0x24ee49+'.id')[_0x2794('0x11')](_0x2794('0x14'),'t',_0x2794('0x15'));return _0x4a0743;}function addFieldsToQuery(_0x1ffdfd,_0x2afeff,_0x175af6,_0x42eb74,_0x1136db){var _0x1005f7=_0x1136db?'c':_0x2794('0xd');if(!_0x2afeff){_0x2afeff=['id',_0x2794('0x16'),'lastName','phone','mobile',_0x2794('0x17'),_0x2794('0x18'),_0x2794('0x7'),'CompanyId','createdAt','updatedAt',_0x2794('0x19'),_0x2794('0x1a')];}else if(!_0x2afeff['includes']('id')){_0x2afeff[_0x2794('0x1b')]('id');}var _0x5a46c4=_0x175af6&&_0x1136db||!_0x175af6&&!_0x1136db;if(_0x42eb74){_0x5a46c4=_0x42eb74&&_0x1136db||!_0x42eb74&&!_0x1136db;}_0x2afeff[_0x2794('0x1c')](function(_0x3b47d7){if(_0x3b47d7===_0x2794('0x1a')){if(_0x5a46c4){_0x1ffdfd[_0x2794('0x1d')](_0x2794('0x1e'),_0x3b47d7);}else if(_0x175af6||_0x42eb74){_0x1ffdfd['field'](_0x1005f7+'.'+_0x3b47d7);}}else{_0x1ffdfd['field'](_0x1005f7+'.'+_0x3b47d7);}});return _0x1ffdfd;}function getSqlClauses(){var _0x1a2fc3={'default':squel['expr'](),'fields':squel['expr'](),'filter':squel[_0x2794('0x1f')](),'tags':{'clause':squel[_0x2794('0x1f')](),'ids':null},'user':{'clause':squel[_0x2794('0x1f')](),'skip':![]}};return _0x1a2fc3;}function parseTagParameter(_0x29a402){var _0x4a11d0=squel['expr']();if(_0x29a402){var _0xc6f05c=utils[_0x2794('0x20')](_0x29a402);_0xc6f05c[_0x2794('0x1c')](function(_0x5693fc){_0x4a11d0['or'](_0x2794('0x21'),'%,'+_0x5693fc+',%');});}return _0x4a11d0;}function parseSearchFilter(_0x2499d5){var _0x4cd8bf=squel[_0x2794('0x1f')]();if(_0x2499d5){var _0x234fcf=_0x2499d5['replace']('\x5c','\x5c\x5c')[_0x2794('0x22')](/'/g,'\x27\x27');if(_0x234fcf[_0x2794('0x23')]('\x20')['length']>0x1){_0x4cd8bf['or'](_0x2794('0x24'),qs[_0x2794('0x25')](_0x234fcf,!![]),null);}else{if(qs[_0x2794('0x26')](_0x234fcf)){_0x4cd8bf['or'](_0x2794('0x27'),_0x234fcf+'%');_0x4cd8bf['or'](_0x2794('0x28'),_0x234fcf+'%');_0x4cd8bf['or'](_0x2794('0x29'),_0x234fcf+'%');_0x4cd8bf['or'](_0x2794('0x2a'),_0x234fcf+'%');}else if(qs[_0x2794('0x2b')](_0x234fcf)){_0x4cd8bf['or'](_0x2794('0x2c'),_0x234fcf+'%');}else{_0x4cd8bf['or']('c.firstName\x20LIKE\x20?','%'+_0x234fcf+'%');_0x4cd8bf['or']('c.lastName\x20LIKE\x20?','%'+_0x234fcf+'%');_0x4cd8bf['or'](_0x2794('0x2c'),'%'+_0x234fcf+'%');}}}return _0x4cd8bf;}function parseAdvancedSearchFilter(_0x16272d,_0xcca704){var _0x5c10f4=getSqlClauses();var _0x1349a6=as[_0x2794('0x2d')](_0x16272d);var _0x4933ec=_0x1349a6[_0x2794('0x2e')];for(var _0x46f85e=0x0;_0x46f85e<_0x1349a6['conditions'][_0x2794('0x2f')];_0x46f85e++){var _0x222a85=_0x1349a6[_0x2794('0x30')][_0x46f85e];var _0x5713fc='c';var _0x430c59=_['find'](_0xcca704,[_0x2794('0x31'),_0x222a85['field']]);if(_0x430c59){if(_0x222a85[_0x2794('0x1d')]===_0x2794('0x32')||_0x430c59[_0x2794('0x33')]==='datetime'){_0x222a85[_0x2794('0x34')]=_0x2794('0x35');}var _0x7dba68=as[_0x2794('0x36')](_0x5713fc,_0x430c59[_0x2794('0x37')],_0x222a85);_0x5c10f4[_0x2794('0x38')][_0x4933ec](_0x7dba68['text'],_0x7dba68[_0x2794('0x39')]['start'],_0x7dba68[_0x2794('0x39')][_0x2794('0x3a')]);}else{if(_0x222a85['field']==='Tag'){var _0x15b994=_0x222a85[_0x2794('0x39')]['split'](',')[_0x2794('0x3b')](function(_0x53e4a0){return Number(_0x53e4a0);});var _0x4f2ec2=parseTagParameter(_0x15b994);_0x5c10f4[_0x2794('0x3c')][_0x2794('0x3d')]['and'](_0x4f2ec2);_0x5c10f4[_0x2794('0x3c')]['ids']=_0x15b994;}else if(_0x222a85[_0x2794('0x1d')]==='User'){_0x5c10f4[_0x2794('0x3e')][_0x2794('0x3d')][_0x2794('0x3f')](_0x2794('0x40'),_0x222a85[_0x2794('0x39')]);_0x5c10f4[_0x2794('0x3e')][_0x2794('0x41')]=!![];}}}return _0x5c10f4;}function parseModelFields(_0x412be8,_0x504cf0){var _0x328329=squel[_0x2794('0x1f')]();var _0x552d78=_(_0x412be8)[_0x2794('0x42')]()[_0x2794('0x3b')](function(_0x21fe21){return _[_0x2794('0x43')](_0x504cf0,[_0x2794('0x31'),_0x21fe21])?_0x21fe21:undefined;})[_0x2794('0x44')]()[_0x2794('0x39')]();if(_0x412be8[_0x2794('0x45')]){_0x552d78['push']('Contact');}if(_0x412be8['User']){_0x552d78[_0x2794('0x1b')](_0x2794('0x46'));}if(_0x552d78[_0x2794('0x2f')]>0x0){_0x552d78[_0x2794('0x1c')](function(_0x2098c6){if(_0x2098c6===_0x2794('0x7')){_0x328329[_0x2794('0x3f')]('c.ListId\x20IN\x20?',[][_0x2794('0x47')](_0x412be8[_0x2098c6]));}else if(_0x2098c6===_0x2794('0x45')){var _0x141ded='%'+_0x412be8[_0x2098c6]+'%';_0x328329[_0x2794('0x3f')](_0x2794('0x48'),_0x141ded);}else if(_0x2098c6==='User'){_0x328329[_0x2794('0x3f')](_0x2794('0x40'),_0x412be8[_0x2098c6]);}else{_0x328329[_0x2794('0x3f')]('c.'+_0x2098c6+_0x2794('0x49'),_0x412be8[_0x2098c6]);}});}return _0x328329;}function parseQueryParameters(_0x4cb09c,_0x3eac04){var _0x3d3c34=getSqlClauses();return Promise[_0x2794('0x4a')]()[_0x2794('0x4b')](function(){return parseModelFields(_0x4cb09c,_0x3eac04);})[_0x2794('0x4b')](function(_0x417854){_0x3d3c34[_0x2794('0x4c')]['and'](_0x417854);return parseTagParameter(_0x4cb09c[_0x2794('0x4d')]);})['then'](function(_0x5113c4){_0x3d3c34['tags'][_0x2794('0x3d')][_0x2794('0x3f')](_0x5113c4);return parseSearchFilter(_0x4cb09c[_0x2794('0x4e')]);})[_0x2794('0x4b')](function(_0x5f0ce3){_0x3d3c34[_0x2794('0x4e')]=_0x5f0ce3;return _0x3d3c34;});}function checkListsRestrictions(_0x1b64de,_0x33f8dd,_0x47aee8){var _0xa4e7b0=squel[_0x2794('0x1f')]();return Promise[_0x2794('0x4a')]()[_0x2794('0x4b')](function(){if(_0x33f8dd[_0x2794('0x6')]&&_0x1b64de['role']==='agent'&&!_0x47aee8){return _0x1b64de[_0x2794('0x4f')]({'attributes':['id'],'raw':!![]});}})[_0x2794('0x4b')](function(_0x18f399){if(_0x18f399){if(_0x18f399[_0x2794('0x2f')]===0x0){_0xa4e7b0[_0x2794('0x3f')](_0x2794('0x50'));}else{_0xa4e7b0[_0x2794('0x3f')](_0x2794('0x51'),_['map'](_0x18f399,'id'));}}})['then'](function(){return _0xa4e7b0;});}function buildContactsQuery(_0x35d3ce,_0x40bb1b,_0x1a383f,_0x1f5419,_0x2be286,_0x19b516){if(_0x40bb1b){_0x40bb1b=_0x1a383f[_0x2794('0x52')];}_0x35d3ce=addFieldsToQuery(_0x35d3ce,_0x40bb1b,_0x1f5419,_0x19b516,!![]);var _0x1441f1=squel[_0x2794('0x53')]();_0x1441f1=addFieldsToQuery(_0x1441f1,_0x40bb1b,_0x1f5419,_0x19b516,![]);if(_0x1f5419||_0x19b516){_0x35d3ce=applyJoinClauses(_0x35d3ce,!![]);_0x35d3ce['group'](_0x2794('0x54'));if(_0x1a383f[_0x2794('0x55')]){_0x1441f1[_0x2794('0x55')](_0x1a383f['limit']);}if(_0x1a383f[_0x2794('0x56')]){_0x1441f1[_0x2794('0x56')](_0x1a383f['offset']);}}else{_0x1441f1=applyJoinClauses(_0x1441f1,![]);_0x1441f1[_0x2794('0x57')]('subqry.id');if(_0x1a383f[_0x2794('0x55')]){_0x35d3ce[_0x2794('0x55')](_0x1a383f['limit']);}if(_0x1a383f[_0x2794('0x56')]){_0x35d3ce['offset'](_0x1a383f['offset']);}}_0x1441f1[_0x2794('0x58')](_0x2be286);if(_0x1a383f[_0x2794('0x59')]){_0x1a383f['order'][_0x2794('0x1c')](function(_0xdb0245){_0x35d3ce[_0x2794('0x59')]('c.'+_0xdb0245[0x0],_0xdb0245[0x1]===_0x2794('0x5a')?![]:!![]);_0x1441f1[_0x2794('0x59')]('subqry.'+_0xdb0245[0x0],_0xdb0245[0x1]===_0x2794('0x5a')?![]:!![]);});}_0x1441f1[_0x2794('0xa')](_0x35d3ce,_0x2794('0xd'));return _0x1441f1;}function getFilteredContacts(_0x926de6){var _0x5466fc=[];return db['Tag'][_0x2794('0x5b')]({'attributes':['id','name','color'],'raw':!![]})[_0x2794('0x4b')](function(_0xce8794){_0x5466fc=_['keyBy'](_0xce8794,'id');var _0x5f1001={'type':db[_0x2794('0x5c')][_0x2794('0x5d')]['SELECT'],'model':db['CmContact'],'mapToModel':!![],'nest':!![],'raw':!![]};return db[_0x2794('0x5e')]['query'](_0x926de6['toString'](),_0x5f1001);})[_0x2794('0x4b')](function(_0x2f2705){_0x2f2705[_0x2794('0x1c')](function(_0x586122){if(_0x586122[_0x2794('0x1a')]){_0x586122['Tags']=[];_0x586122['TagIds'][_0x2794('0x23')](',')[_0x2794('0x1c')](function(_0x4374aa){_0x586122[_0x2794('0x5f')]['push'](_0x5466fc[_0x4374aa]);});}delete _0x586122[_0x2794('0x1a')];});return _0x2f2705;});}function countFilteredContacts(_0x24b512,_0xacd67){var _0xb16521=_0x24b512[_0x2794('0x60')]();_0xb16521[_0x2794('0x1d')](_0x2794('0x61'));_0xb16521=applyJoinClauses(_0xb16521,!![]);_0x24b512['group'](_0x2794('0x54'));var _0x1a16d9=utils[_0x2794('0x20')](_0xacd67);if(!_[_0x2794('0x62')](_0x1a16d9)){_0xb16521[_0x2794('0xb')]('t.id\x20IN\x20?',_0x1a16d9);}var _0x216be8={'type':db['Sequelize'][_0x2794('0x5d')][_0x2794('0x63')],'raw':!![]};return db['sequelize'][_0x2794('0x64')](_0xb16521[_0x2794('0x65')](),_0x216be8)['then'](function(_0xb861fd){return _0xb861fd[0x0][_0x2794('0x61')];});}module[_0x2794('0x66')]={'buildContactsQuery':buildContactsQuery,'checkListsRestrictions':checkListsRestrictions,'countFilteredContacts':countFilteredContacts,'getContactsSubquery':getContactsSubquery,'getFilteredContacts':getFilteredContacts,'parseAdvancedSearchFilter':parseAdvancedSearchFilter,'parseQueryParameters':parseQueryParameters,'skipContactsQuery':skipContactsQuery}; \ No newline at end of file diff --git a/server/components/encryptor/index.js b/server/components/encryptor/index.js index 67bb9bb..ce7faa2 100644 --- a/server/components/encryptor/index.js +++ b/server/components/encryptor/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x513a=['data','binary','write','end','final','close','unlink','decryptFile','update','encryptString','secret','base64','decryptString','utf8','lodash','../../config/logger','app','secrets','aes-256-ctr','aes192','encrypt','algorithm','join','error','test','getCiphers','filter','hasOwnProperty','encryptFile','createReadStream','createWriteStream','createCipher'];(function(_0x1bd524,_0x3d1989){var _0x50bbe7=function(_0x439ece){while(--_0x439ece){_0x1bd524['push'](_0x1bd524['shift']());}};_0x50bbe7(++_0x3d1989);}(_0x513a,0x16e));var _0xa513=function(_0x16e195,_0x15c53f){_0x16e195=_0x16e195-0x0;var _0x5f471a=_0x513a[_0x16e195];return _0x5f471a;};'use strict';var crypto=require('crypto');var fs=require('fs');var BPromise=require('bluebird');var _=require(_0xa513('0x0'));var config=require('../../config/environment');var logger=require(_0xa513('0x1'))(_0xa513('0x2'));const AES_SUPPORTED_RX=/^aes(-)?\d{3}(-(cbc|cfb|ctr)(1|8)?){0,1}$/;const stringOptions={'secret':config[_0xa513('0x3')]['session'],'algorithm':_0xa513('0x4')};const fileOptions={'algorithm':_0xa513('0x5')};if(config['encrypt']&&config[_0xa513('0x6')][_0xa513('0x7')]){var isSupported=isAlgorithmSupported(config['encrypt'][_0xa513('0x7')]);if(isSupported){fileOptions[_0xa513('0x7')]=config[_0xa513('0x6')][_0xa513('0x7')];}else{var supportedAlgorithms=getSupportedCiphers()[_0xa513('0x8')](',\x20');logger[_0xa513('0x9')](config['encrypt'][_0xa513('0x7')],'is\x20not\x20a\x20supported\x20algorithm.\x20Your\x20system\x20supports\x20the\x20following\x20algorithms:',supportedAlgorithms);}}function isASupportedCipher(_0x36d4b5){return AES_SUPPORTED_RX[_0xa513('0xa')](_0x36d4b5);}function getSupportedCiphers(){return crypto[_0xa513('0xb')]()[_0xa513('0xc')](isASupportedCipher);}function isAlgorithmSupported(_0x1412e8){return getSupportedCiphers()['indexOf'](_0x1412e8)>-0x1;}function combineOptions(_0x265854){var _0x15be62={};for(var _0x3ce715 in fileOptions){if(fileOptions[_0xa513('0xd')](_0x3ce715)){_0x15be62[_0x3ce715]=fileOptions[_0x3ce715];}}if(_0x265854){for(var _0x37240e in _0x265854){if(_0x265854[_0xa513('0xd')](_0x37240e)){_0x15be62[_0x37240e]=_0x265854[_0x37240e];}}}return _0x15be62;}exports[_0xa513('0xe')]=function(_0xf93df6,_0x5b2248,_0x53a36a,_0x96cb6e){return new BPromise(function(_0x263ddd,_0x1c99ba){_0x96cb6e=combineOptions(_0x96cb6e);var _0xff0a8f=new Buffer(_0x53a36a);var _0x5b6711=fs[_0xa513('0xf')](_0xf93df6);var _0x1d9ca4=fs[_0xa513('0x10')](_0x5b2248);var _0x504739=crypto[_0xa513('0x11')](_0x96cb6e[_0xa513('0x7')],_0xff0a8f);_0x5b6711['on'](_0xa513('0x12'),function(_0x2827df){var _0x4ec069=new Buffer(_0x504739['update'](_0x2827df),_0xa513('0x13'));_0x1d9ca4[_0xa513('0x14')](_0x4ec069);});_0x5b6711['on'](_0xa513('0x15'),function(){try{var _0x2f79bc=new Buffer(_0x504739[_0xa513('0x16')]('binary'),_0xa513('0x13'));_0x1d9ca4[_0xa513('0x14')](_0x2f79bc);_0x1d9ca4[_0xa513('0x15')]();_0x1d9ca4['on'](_0xa513('0x17'),function(){return _0x263ddd(_0x5b2248);});}catch(_0x41c0af){fs[_0xa513('0x18')](_0x5b2248);return _0x1c99ba(_0x41c0af);}});});};exports[_0xa513('0x19')]=function(_0xd2fac7,_0x31e091,_0x4f6511,_0x310857){return new BPromise(function(_0x3c1259,_0x1d233d){_0x310857=combineOptions(_0x310857);var _0x20329b=new Buffer(_0x4f6511);var _0xfa6019=fs[_0xa513('0xf')](_0xd2fac7);var _0xf47cf1=fs['createWriteStream'](_0x31e091);var _0x22a17c=crypto['createDecipher'](_0x310857['algorithm'],_0x20329b);_0xfa6019['on'](_0xa513('0x12'),function(_0x20812b){var _0x19746f=new Buffer(_0x22a17c[_0xa513('0x1a')](_0x20812b),_0xa513('0x13'));_0xf47cf1['write'](_0x19746f);});_0xfa6019['on'](_0xa513('0x15'),function(){try{var _0x5b820d=new Buffer(_0x22a17c[_0xa513('0x16')]('binary'),'binary');_0xf47cf1[_0xa513('0x14')](_0x5b820d);_0xf47cf1['end']();_0xf47cf1['on'](_0xa513('0x17'),function(){return _0x3c1259(_0x31e091);});}catch(_0x5b6401){fs[_0xa513('0x18')](_0x31e091);return _0x1d233d(_0x5b6401);}});});};exports[_0xa513('0x1b')]=function(_0x2f5ed5,_0x13962c,_0x93c15b){var _0x3341d6=_0x93c15b||stringOptions[_0xa513('0x7')];var _0x4ffe59=_0x13962c||stringOptions[_0xa513('0x1c')];var _0x350491=crypto[_0xa513('0x11')](_0x3341d6,_0x4ffe59);var _0x3cd5dd=_0x350491[_0xa513('0x1a')](_0x2f5ed5,'utf8',_0xa513('0x1d'));_0x3cd5dd+=_0x350491[_0xa513('0x16')]('base64');return _0x3cd5dd;};exports[_0xa513('0x1e')]=function(_0x2b7d24,_0x3286d5,_0x4b8f65){var _0x2d1ba0=_0x4b8f65||stringOptions[_0xa513('0x7')];var _0x39f6f7=_0x3286d5||stringOptions[_0xa513('0x1c')];var _0x5601c0=crypto['createDecipher'](_0x2d1ba0,_0x39f6f7);var _0x2437ad=_0x5601c0[_0xa513('0x1a')](_0x2b7d24,_0xa513('0x1d'),_0xa513('0x1f'));_0x2437ad+=_0x5601c0[_0xa513('0x16')](_0xa513('0x1f'));return _0x2437ad;}; \ No newline at end of file +var _0x784c=['decryptString','createDecipher','utf8','bluebird','../../config/environment','../../config/logger','secrets','session','aes-256-ctr','aes192','encrypt','algorithm','join','error','is\x20not\x20a\x20supported\x20algorithm.\x20Your\x20system\x20supports\x20the\x20following\x20algorithms:','test','getCiphers','filter','hasOwnProperty','createReadStream','createWriteStream','data','write','end','binary','close','unlink','decryptFile','update','final','encryptString','secret','createCipher','base64'];(function(_0x23d35d,_0x39c88e){var _0x15e742=function(_0x207d62){while(--_0x207d62){_0x23d35d['push'](_0x23d35d['shift']());}};_0x15e742(++_0x39c88e);}(_0x784c,0x113));var _0xc784=function(_0x3ef7f8,_0x26db34){_0x3ef7f8=_0x3ef7f8-0x0;var _0xd7ab16=_0x784c[_0x3ef7f8];return _0xd7ab16;};'use strict';var crypto=require('crypto');var fs=require('fs');var BPromise=require(_0xc784('0x0'));var _=require('lodash');var config=require(_0xc784('0x1'));var logger=require(_0xc784('0x2'))('app');const AES_SUPPORTED_RX=/^aes(-)?\d{3}(-(cbc|cfb|ctr)(1|8)?){0,1}$/;const stringOptions={'secret':config[_0xc784('0x3')][_0xc784('0x4')],'algorithm':_0xc784('0x5')};const fileOptions={'algorithm':_0xc784('0x6')};if(config[_0xc784('0x7')]&&config['encrypt'][_0xc784('0x8')]){var isSupported=isAlgorithmSupported(config['encrypt'][_0xc784('0x8')]);if(isSupported){fileOptions[_0xc784('0x8')]=config[_0xc784('0x7')][_0xc784('0x8')];}else{var supportedAlgorithms=getSupportedCiphers()[_0xc784('0x9')](',\x20');logger[_0xc784('0xa')](config[_0xc784('0x7')][_0xc784('0x8')],_0xc784('0xb'),supportedAlgorithms);}}function isASupportedCipher(_0x198fae){return AES_SUPPORTED_RX[_0xc784('0xc')](_0x198fae);}function getSupportedCiphers(){return crypto[_0xc784('0xd')]()[_0xc784('0xe')](isASupportedCipher);}function isAlgorithmSupported(_0x2ea0c8){return getSupportedCiphers()['indexOf'](_0x2ea0c8)>-0x1;}function combineOptions(_0x28946d){var _0x224f26={};for(var _0x3afa1b in fileOptions){if(fileOptions[_0xc784('0xf')](_0x3afa1b)){_0x224f26[_0x3afa1b]=fileOptions[_0x3afa1b];}}if(_0x28946d){for(var _0x18e608 in _0x28946d){if(_0x28946d['hasOwnProperty'](_0x18e608)){_0x224f26[_0x18e608]=_0x28946d[_0x18e608];}}}return _0x224f26;}exports['encryptFile']=function(_0x40cb3e,_0xa7be03,_0x2833cd,_0x221e7a){return new BPromise(function(_0x2d9fef,_0x50924b){_0x221e7a=combineOptions(_0x221e7a);var _0x4de958=new Buffer(_0x2833cd);var _0x1130d1=fs[_0xc784('0x10')](_0x40cb3e);var _0x1ce936=fs[_0xc784('0x11')](_0xa7be03);var _0x170094=crypto['createCipher'](_0x221e7a['algorithm'],_0x4de958);_0x1130d1['on'](_0xc784('0x12'),function(_0xb35100){var _0x4b5a62=new Buffer(_0x170094['update'](_0xb35100),'binary');_0x1ce936[_0xc784('0x13')](_0x4b5a62);});_0x1130d1['on'](_0xc784('0x14'),function(){try{var _0x42565e=new Buffer(_0x170094['final'](_0xc784('0x15')),_0xc784('0x15'));_0x1ce936[_0xc784('0x13')](_0x42565e);_0x1ce936[_0xc784('0x14')]();_0x1ce936['on'](_0xc784('0x16'),function(){return _0x2d9fef(_0xa7be03);});}catch(_0x408a99){fs[_0xc784('0x17')](_0xa7be03);return _0x50924b(_0x408a99);}});});};exports[_0xc784('0x18')]=function(_0x71d80d,_0x5d7ae3,_0xbcb0b6,_0x130a75){return new BPromise(function(_0x5af081,_0x4f6c71){_0x130a75=combineOptions(_0x130a75);var _0xdb8f68=new Buffer(_0xbcb0b6);var _0x54c5a8=fs[_0xc784('0x10')](_0x71d80d);var _0x539359=fs['createWriteStream'](_0x5d7ae3);var _0x161019=crypto['createDecipher'](_0x130a75[_0xc784('0x8')],_0xdb8f68);_0x54c5a8['on'](_0xc784('0x12'),function(_0x12df03){var _0x935e77=new Buffer(_0x161019[_0xc784('0x19')](_0x12df03),_0xc784('0x15'));_0x539359[_0xc784('0x13')](_0x935e77);});_0x54c5a8['on'](_0xc784('0x14'),function(){try{var _0xbe6def=new Buffer(_0x161019[_0xc784('0x1a')](_0xc784('0x15')),_0xc784('0x15'));_0x539359[_0xc784('0x13')](_0xbe6def);_0x539359['end']();_0x539359['on'](_0xc784('0x16'),function(){return _0x5af081(_0x5d7ae3);});}catch(_0x1bde3c){fs[_0xc784('0x17')](_0x5d7ae3);return _0x4f6c71(_0x1bde3c);}});});};exports[_0xc784('0x1b')]=function(_0x5b9cbe,_0x1e38c2,_0x1aa875){var _0x418148=_0x1aa875||stringOptions[_0xc784('0x8')];var _0x475864=_0x1e38c2||stringOptions[_0xc784('0x1c')];var _0x55efef=crypto[_0xc784('0x1d')](_0x418148,_0x475864);var _0x56453a=_0x55efef[_0xc784('0x19')](_0x5b9cbe,'utf8',_0xc784('0x1e'));_0x56453a+=_0x55efef[_0xc784('0x1a')](_0xc784('0x1e'));return _0x56453a;};exports[_0xc784('0x1f')]=function(_0xa66d4e,_0x5cc79d,_0x42826b){var _0x48c0ff=_0x42826b||stringOptions[_0xc784('0x8')];var _0xdefb8a=_0x5cc79d||stringOptions[_0xc784('0x1c')];var _0x510b1a=crypto[_0xc784('0x20')](_0x48c0ff,_0xdefb8a);var _0x120045=_0x510b1a[_0xc784('0x19')](_0xa66d4e,_0xc784('0x1e'),_0xc784('0x21'));_0x120045+=_0x510b1a[_0xc784('0x1a')](_0xc784('0x21'));return _0x120045;}; \ No newline at end of file diff --git a/server/components/export/csv.js b/server/components/export/csv.js index 622e027..53bb825 100644 --- a/server/components/export/csv.js +++ b/server/components/export/csv.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x5bf1=['range','isInteger','forEach','push','SELECT','basename','.csv','existsSync','join','mkdirSync','each','%s%d.%s','%s.%s','csv','zip','zip\x20finished','Completed','catch','info','Error\x20during\x20extraction\x20report\x20with\x20id\x20%d\x20in\x20%s\x20format','CSV','Failed','finally','util','to-csv','bluebird','zip-dir','rimraf','../../mysqldb','dbH','../../config/logger','argv','savename','AnalyticExtractedReport','format','Start\x20extraction\x20report\x20with\x20id\x20%d\x20in\x20%s\x20format','Setting','split','then','sequelize','query','QueryTypes','num','length'];(function(_0x2d4340,_0x14bd7f){var _0x5a2e9e=function(_0x2ea64f){while(--_0x2ea64f){_0x2d4340['push'](_0x2d4340['shift']());}};_0x5a2e9e(++_0x14bd7f);}(_0x5bf1,0x177));var _0x15bf=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0x5bf1[_0x3dd15e];return _0x231fd0;};'use strict';var util=require(_0x15bf('0x0'));var path=require('path');var _=require('lodash');var csv=require(_0x15bf('0x1'));var fs=require('fs');var BPromise=require(_0x15bf('0x2'));var zipdir=require(_0x15bf('0x3'));var rimraf=require(_0x15bf('0x4'));var db=require(_0x15bf('0x5'))['db'];var dbH=require('../../mysqldb')[_0x15bf('0x6')];var logger=require(_0x15bf('0x7'))('analytics');var EXTRACTED_REPORT_ID=Number(process[_0x15bf('0x8')][0x2]);var QUERY=process['argv'][0x3];var PATH=process[_0x15bf('0x8')][0x4];var EXIT_CODE=0x0;function analyticExtractedReport(_0x424827,_0x3ce84e){var _0x17238f={'status':_0x424827};var _0x2b10b1={'where':{'id':EXTRACTED_REPORT_ID}};if(_0x3ce84e){_0x17238f[_0x15bf('0x9')]=_0x3ce84e;}return db[_0x15bf('0xa')]['update'](_0x17238f,_0x2b10b1);}function main(){var _0x1f0f61=0x1388;var _0x25fafa;logger['info'](util[_0x15bf('0xb')](_0x15bf('0xc'),EXTRACTED_REPORT_ID,'CSV'));return db[_0x15bf('0xd')]['find']({'where':{'id':0x1},'raw':!![],'attributes':['id',_0x15bf('0xe'),'splitSizeCsv']})[_0x15bf('0xf')](function(_0x340d9c){if(_0x340d9c){_0x25fafa=_0x340d9c;_0x1f0f61=_0x25fafa['splitSizeCsv']||0x1388;}})[_0x15bf('0xf')](function(){return dbH[_0x15bf('0x10')][_0x15bf('0x11')](util['format']('SELECT\x20count(*)\x20as\x20num\x20FROM\x20(%s)\x20t',QUERY),{'type':dbH['sequelize'][_0x15bf('0x12')]['SELECT']});})['then'](function(_0x4fadc1){if(!_0x4fadc1[0x0][_0x15bf('0x13')]){return analyticExtractedReport('Empty');}var _0x3e1770=[];var _0x100024=0x0;if(_0x25fafa['split']){if(_0x4fadc1&&_0x4fadc1[_0x15bf('0x14')]){var _0xd5efc4=_[_0x15bf('0x15')](_0x4fadc1[0x0][_0x15bf('0x13')]/_0x1f0f61);var _0x109fb0=Number[_0x15bf('0x16')](_0x4fadc1[0x0][_0x15bf('0x13')]/_0x1f0f61)?_0x4fadc1[0x0][_0x15bf('0x13')]%_0x1f0f61:0x0;_0xd5efc4[_0x15bf('0x17')](function(_0x114c21){if(_0x114c21>0x0){_0x100024+=_0x1f0f61;}_0x3e1770[_0x15bf('0x18')](dbH[_0x15bf('0x10')][_0x15bf('0x11')](util[_0x15bf('0xb')]('%s\x20limit\x20%d\x20OFFSET\x20%d',QUERY,_0x1f0f61,_0x100024),{'type':dbH[_0x15bf('0x10')]['QueryTypes'][_0x15bf('0x19')]}));});if(_0x109fb0>0x0){_0x100024+=_0x1f0f61;_0x3e1770[_0x15bf('0x18')](dbH['sequelize'][_0x15bf('0x11')](util[_0x15bf('0xb')]('%s\x20limit\x20%d\x20OFFSET\x20%d',QUERY,_0x109fb0,_0x100024),{'type':dbH[_0x15bf('0x10')][_0x15bf('0x12')]['SELECT']}));}}}else{_0x3e1770['push'](dbH[_0x15bf('0x10')][_0x15bf('0x11')](QUERY,{'type':dbH[_0x15bf('0x10')]['QueryTypes'][_0x15bf('0x19')]}));}var _0x5023e5=path['dirname'](PATH);var _0x2c572b=path[_0x15bf('0x1a')](PATH,_0x15bf('0x1b'));var _0x1d3934=_0x25fafa[_0x15bf('0xe')]&&_0x3e1770[_0x15bf('0x14')]>0x1;var _0x14ecb9=[];if(!fs[_0x15bf('0x1c')](path[_0x15bf('0x1d')](_0x5023e5,_0x2c572b))&&_0x1d3934){fs[_0x15bf('0x1e')](path[_0x15bf('0x1d')](_0x5023e5,_0x2c572b));}return BPromise[_0x15bf('0x1f')](_0x3e1770,function(_0xeadf03){_0x14ecb9[_0x15bf('0x18')](_0xeadf03);})[_0x15bf('0xf')](function(){for(var _0x11e034=0x0;_0x11e034<_0x14ecb9[_0x15bf('0x14')];_0x11e034+=0x1){var _0x1df4c2;var _0x1150c8=_0x14ecb9[_0x11e034];if(_0x1d3934){_0x1df4c2=path['join'](_0x5023e5,_0x2c572b,util['format'](_0x15bf('0x20'),_0x2c572b,_0x11e034,'csv'));}else{_0x1df4c2=path[_0x15bf('0x1d')](_0x5023e5,util[_0x15bf('0xb')](_0x15bf('0x21'),_0x2c572b,_0x15bf('0x22')));}fs['writeFileSync'](_0x1df4c2,csv(_0x1150c8));}})['then'](function(){if(_0x1d3934){return new Promise(function(_0x2b4bcb){zipdir(path['join'](_0x5023e5,_0x2c572b),{'saveTo':path[_0x15bf('0x1d')](_0x5023e5,util[_0x15bf('0xb')](_0x15bf('0x21'),_0x2c572b,_0x15bf('0x23')))},function(_0x4c1927,_0x31f1a5){rimraf(path[_0x15bf('0x1d')](_0x5023e5,_0x2c572b),function(){});_0x2b4bcb(_0x15bf('0x24'));});});}})['then'](function(){logger['info'](util['format']('Extraction\x20report\x20with\x20id\x20%d\x20in\x20%s\x20format\x20completed',EXTRACTED_REPORT_ID,'CSV'));return analyticExtractedReport(_0x15bf('0x25'),_0x1d3934?util[_0x15bf('0xb')]('%s.%s',_0x2c572b,_0x1d3934?_0x15bf('0x23'):_0x15bf('0x22')):null);});})[_0x15bf('0x26')](function(_0x53c1a7){logger[_0x15bf('0x27')](util['format'](_0x15bf('0x28'),EXTRACTED_REPORT_ID,_0x15bf('0x29')),util['inspect'](_0x53c1a7,{'showHidden':![],'depth':null}));EXIT_CODE=0x1;return analyticExtractedReport(_0x15bf('0x2a'));})[_0x15bf('0x2b')](function(){process['exit'](EXIT_CODE);});}main(); \ No newline at end of file +var _0x4827=['CSV','find','split','splitSizeCsv','then','sequelize','query','SELECT\x20count(*)\x20as\x20num\x20FROM\x20(%s)\x20t','QueryTypes','SELECT','length','range','num','isInteger','push','%s\x20limit\x20%d\x20OFFSET\x20%d','dirname','basename','.csv','existsSync','join','mkdirSync','each','%s%d.%s','csv','writeFileSync','%s.%s','zip\x20finished','zip','catch','Error\x20during\x20extraction\x20report\x20with\x20id\x20%d\x20in\x20%s\x20format','inspect','Failed','finally','exit','util','lodash','../../mysqldb','dbH','../../config/logger','argv','savename','AnalyticExtractedReport','update','info','format'];(function(_0x5c3f3e,_0x29697a){var _0x3b97c6=function(_0x180765){while(--_0x180765){_0x5c3f3e['push'](_0x5c3f3e['shift']());}};_0x3b97c6(++_0x29697a);}(_0x4827,0x1c1));var _0x7482=function(_0x1facfa,_0x1acf7d){_0x1facfa=_0x1facfa-0x0;var _0x9ec701=_0x4827[_0x1facfa];return _0x9ec701;};'use strict';var util=require(_0x7482('0x0'));var path=require('path');var _=require(_0x7482('0x1'));var csv=require('to-csv');var fs=require('fs');var BPromise=require('bluebird');var zipdir=require('zip-dir');var rimraf=require('rimraf');var db=require(_0x7482('0x2'))['db'];var dbH=require(_0x7482('0x2'))[_0x7482('0x3')];var logger=require(_0x7482('0x4'))('analytics');var EXTRACTED_REPORT_ID=Number(process['argv'][0x2]);var QUERY=process[_0x7482('0x5')][0x3];var PATH=process[_0x7482('0x5')][0x4];var EXIT_CODE=0x0;function analyticExtractedReport(_0x2537d1,_0x4aa8a8){var _0x366558={'status':_0x2537d1};var _0x14b234={'where':{'id':EXTRACTED_REPORT_ID}};if(_0x4aa8a8){_0x366558[_0x7482('0x6')]=_0x4aa8a8;}return db[_0x7482('0x7')][_0x7482('0x8')](_0x366558,_0x14b234);}function main(){var _0x55b5b5=0x1388;var _0x5753e8;logger[_0x7482('0x9')](util[_0x7482('0xa')]('Start\x20extraction\x20report\x20with\x20id\x20%d\x20in\x20%s\x20format',EXTRACTED_REPORT_ID,_0x7482('0xb')));return db['Setting'][_0x7482('0xc')]({'where':{'id':0x1},'raw':!![],'attributes':['id',_0x7482('0xd'),_0x7482('0xe')]})[_0x7482('0xf')](function(_0x204cca){if(_0x204cca){_0x5753e8=_0x204cca;_0x55b5b5=_0x5753e8['splitSizeCsv']||0x1388;}})[_0x7482('0xf')](function(){return dbH[_0x7482('0x10')][_0x7482('0x11')](util[_0x7482('0xa')](_0x7482('0x12'),QUERY),{'type':dbH[_0x7482('0x10')][_0x7482('0x13')][_0x7482('0x14')]});})[_0x7482('0xf')](function(_0x26ebc9){if(!_0x26ebc9[0x0]['num']){return analyticExtractedReport('Empty');}var _0x450ee4=[];var _0x8dae80=0x0;if(_0x5753e8[_0x7482('0xd')]){if(_0x26ebc9&&_0x26ebc9[_0x7482('0x15')]){var _0x5a1d09=_[_0x7482('0x16')](_0x26ebc9[0x0][_0x7482('0x17')]/_0x55b5b5);var _0x1fb345=Number[_0x7482('0x18')](_0x26ebc9[0x0][_0x7482('0x17')]/_0x55b5b5)?_0x26ebc9[0x0][_0x7482('0x17')]%_0x55b5b5:0x0;_0x5a1d09['forEach'](function(_0x1f242b){if(_0x1f242b>0x0){_0x8dae80+=_0x55b5b5;}_0x450ee4[_0x7482('0x19')](dbH[_0x7482('0x10')]['query'](util[_0x7482('0xa')](_0x7482('0x1a'),QUERY,_0x55b5b5,_0x8dae80),{'type':dbH[_0x7482('0x10')][_0x7482('0x13')]['SELECT']}));});if(_0x1fb345>0x0){_0x8dae80+=_0x55b5b5;_0x450ee4[_0x7482('0x19')](dbH[_0x7482('0x10')][_0x7482('0x11')](util[_0x7482('0xa')](_0x7482('0x1a'),QUERY,_0x1fb345,_0x8dae80),{'type':dbH['sequelize'][_0x7482('0x13')][_0x7482('0x14')]}));}}}else{_0x450ee4['push'](dbH[_0x7482('0x10')][_0x7482('0x11')](QUERY,{'type':dbH['sequelize'][_0x7482('0x13')][_0x7482('0x14')]}));}var _0xf2cf3a=path[_0x7482('0x1b')](PATH);var _0x300a1c=path[_0x7482('0x1c')](PATH,_0x7482('0x1d'));var _0x2d9269=_0x5753e8[_0x7482('0xd')]&&_0x450ee4[_0x7482('0x15')]>0x1;var _0x19627c=[];if(!fs[_0x7482('0x1e')](path[_0x7482('0x1f')](_0xf2cf3a,_0x300a1c))&&_0x2d9269){fs[_0x7482('0x20')](path[_0x7482('0x1f')](_0xf2cf3a,_0x300a1c));}return BPromise[_0x7482('0x21')](_0x450ee4,function(_0x1f2fd7){_0x19627c[_0x7482('0x19')](_0x1f2fd7);})[_0x7482('0xf')](function(){for(var _0xb52e44=0x0;_0xb52e44<_0x19627c[_0x7482('0x15')];_0xb52e44+=0x1){var _0x36ea03;var _0x3cfa62=_0x19627c[_0xb52e44];if(_0x2d9269){_0x36ea03=path[_0x7482('0x1f')](_0xf2cf3a,_0x300a1c,util['format'](_0x7482('0x22'),_0x300a1c,_0xb52e44,'csv'));}else{_0x36ea03=path[_0x7482('0x1f')](_0xf2cf3a,util[_0x7482('0xa')]('%s.%s',_0x300a1c,_0x7482('0x23')));}fs[_0x7482('0x24')](_0x36ea03,csv(_0x3cfa62));}})[_0x7482('0xf')](function(){if(_0x2d9269){return new Promise(function(_0x461961){zipdir(path[_0x7482('0x1f')](_0xf2cf3a,_0x300a1c),{'saveTo':path[_0x7482('0x1f')](_0xf2cf3a,util['format'](_0x7482('0x25'),_0x300a1c,'zip'))},function(_0x10945b,_0x236580){rimraf(path['join'](_0xf2cf3a,_0x300a1c),function(){});_0x461961(_0x7482('0x26'));});});}})[_0x7482('0xf')](function(){logger[_0x7482('0x9')](util['format']('Extraction\x20report\x20with\x20id\x20%d\x20in\x20%s\x20format\x20completed',EXTRACTED_REPORT_ID,_0x7482('0xb')));return analyticExtractedReport('Completed',_0x2d9269?util[_0x7482('0xa')](_0x7482('0x25'),_0x300a1c,_0x2d9269?_0x7482('0x27'):'csv'):null);});})[_0x7482('0x28')](function(_0x55a645){logger[_0x7482('0x9')](util[_0x7482('0xa')](_0x7482('0x29'),EXTRACTED_REPORT_ID,_0x7482('0xb')),util[_0x7482('0x2a')](_0x55a645,{'showHidden':![],'depth':null}));EXIT_CODE=0x1;return analyticExtractedReport(_0x7482('0x2b'));})[_0x7482('0x2c')](function(){process[_0x7482('0x2d')](EXIT_CODE);});}main(); \ No newline at end of file diff --git a/server/components/export/pdf.js b/server/components/export/pdf.js index 5edce2c..c2448d0 100644 --- a/server/components/export/pdf.js +++ b/server/components/export/pdf.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x48fb=['MMMM\x20Do\x20YYYY,\x20h:mm:ss\x20a','savename','AnalyticExtractedReport','update','map','tableHeader','pick','toString','value','fill','length','body','chunk','keys','forEach','push','Name:\x20%s\x0aReport:\x20%s\x0aFrom:\x20%s\x20To:\x20%s','name','startDate','format','endDate','header','pageBreak','before','\x20/\x20','footer','black','Empty','split','splitSizePdf','then','num','isInteger','sequelize','query','QueryTypes','%s\x20limit\x20%d\x20OFFSET\x20%d','SELECT','basename','.pdf','join','mkdirSync','each','flatten','createPdfKitDocument','%s%d.%s','%s.%s','all','info','PDF','Completed','pdf','Start\x20extraction\x20report\x20with\x20id\x20%d\x20in\x20%s\x20format','findOne','Error\x20during\x20extraction\x20report\x20with\x20id\x20%d\x20in\x20%s\x20format','Failed','finally','exit','/fonts/arial-bold.ttf','/fonts/arial-italic.ttf','/fonts/arial-bold-italic.ttf','interactionId','YYYY-MM-DD','Arial','center','Interaction\x20Transcript','\x09\x09XCALLY\x20Motion\x20-\x20%s\x09\x09\x09\x09%d/%d\x09\x09\x09\x09%s','pipe','finish','error','end','path','catch','lodash','util','html-to-pdfmake','rimraf','jsdom','window','bluebird','../../config/logger','analytics','argv'];(function(_0x194adf,_0x220258){var _0x2242e3=function(_0x42afcd){while(--_0x42afcd){_0x194adf['push'](_0x194adf['shift']());}};_0x2242e3(++_0x220258);}(_0x48fb,0xef));var _0xb48f=function(_0x1926aa,_0x534a4b){_0x1926aa=_0x1926aa-0x0;var _0xb95006=_0x48fb[_0x1926aa];return _0xb95006;};'use strict';var _=require(_0xb48f('0x0'));var fs=require('fs');var util=require(_0xb48f('0x1'));var path=require('path');var moment=require('moment');var htmlToPdfmake=require(_0xb48f('0x2'));var PdfPrinter=require('pdfmake/src/printer');var zipdir=require('zip-dir');var rimraf=require(_0xb48f('0x3'));var JSDOM=require(_0xb48f('0x4'))['JSDOM'];var window=new JSDOM('')[_0xb48f('0x5')];var BPromise=require(_0xb48f('0x6'));var db=require('../../mysqldb')['db'];var dbH=require('../../mysqldb')['dbH'];var logger=require(_0xb48f('0x7'))(_0xb48f('0x8'));var EXTRACTED_REPORT_ID=Number(process[_0xb48f('0x9')][0x2]);var QUERY=process[_0xb48f('0x9')][0x3];var PATH=process['argv'][0x4];var NAME=process[_0xb48f('0x9')][0x5];var FORMAT=_0xb48f('0xa');var EXTRACTED_REPORT;var EXIT_CODE=0x0;function analyticExtractedReport(_0x3cb8c4,_0x427a84){var _0x1f0466={'status':_0x3cb8c4};var _0x3442b9={'where':{'id':EXTRACTED_REPORT_ID}};if(_0x427a84){_0x1f0466[_0xb48f('0xb')]=_0x427a84;}return db[_0xb48f('0xc')][_0xb48f('0xd')](_0x1f0466,_0x3442b9);}function getHeaders(_0x4d123c){return _[_0xb48f('0xe')](_0x4d123c,function(_0x15a009){return{'text':_0x15a009,'style':_0xb48f('0xf')};});}function getRows(_0x466d67,_0x4cc14f){return _['map'](_0x4cc14f,function(_0x27c404){return _(_0x27c404)[_0xb48f('0x10')](_0x466d67)[_0xb48f('0xe')](function(_0xc4e7ff){return _0xc4e7ff?_[_0xb48f('0x11')](_0xc4e7ff):'';})[_0xb48f('0x12')]();});}function createTable(_0xe683bb,_0x32b00e){var _0x41c471={'widths':_[_0xb48f('0x13')](Array(_0xe683bb[_0xb48f('0x14')]),0x91),'heights':function(_0xd69b51){return _0xd69b51===0x0?'auto':0x32;},'dontBreakRows':!![],'headerRows':0x1,'body':[]};var _0x3c1c90=getHeaders(_0xe683bb);_0x41c471[_0xb48f('0x15')]['push'](_0x3c1c90);var _0x524e7c=getRows(_0xe683bb,_0x32b00e);_0x41c471[_0xb48f('0x15')]=_0x41c471[_0xb48f('0x15')]['concat'](_0x524e7c);return _0x41c471;}function createTables(_0x2300e1){var _0x58502e=[];var _0x1372fc=_[_0xb48f('0x16')](Object[_0xb48f('0x17')](_0x2300e1[0x0]),0x5);_0x1372fc[_0xb48f('0x18')](function(_0x9edde0){_0x58502e[_0xb48f('0x19')](createTable(_0x9edde0,_0x2300e1));});return _0x58502e;}function getPDFDocDefinition(_0xfcc177){var _0x19a217=util['format'](_0xb48f('0x1a'),NAME,EXTRACTED_REPORT[_0xb48f('0x1b')],moment(EXTRACTED_REPORT[_0xb48f('0x1c')])[_0xb48f('0x1d')](FORMAT),moment(EXTRACTED_REPORT[_0xb48f('0x1e')])[_0xb48f('0x1d')](FORMAT));var _0x5262a3=[];for(var _0x24172a=0x0;_0x24172a<_0xfcc177[_0xb48f('0x14')];_0x24172a++){var _0x426ab2=[];if(_0x24172a===0x0){_0x426ab2[_0xb48f('0x19')]({'text':_0x19a217,'style':_0xb48f('0x1f')});}var _0x166c2d={'table':_0xfcc177[_0x24172a]};if(_0x24172a>0x0){_0x166c2d[_0xb48f('0x20')]=_0xb48f('0x21');_0x166c2d['margin']=[0x0,0x46,0x0,0x0];}_0x426ab2['push'](_0x166c2d);_0x5262a3[_0xb48f('0x19')](_0x426ab2);}return{'pageSize':'A4','pageOrientation':'landscape','content':_0x5262a3,'footer':function(_0x2161f8,_0x31998e){return{'text':_0x2161f8[_0xb48f('0x11')]()+_0xb48f('0x22')+_0x31998e,'style':_0xb48f('0x23')};},'defaultStyle':{'font':'Arial'},'styles':{'header':{'fontSize':0x12,'bold':!![],'margin':[0x0,0x0,0x0,0xa]},'tableHeader':{'bold':!![],'fontSize':0xd,'color':_0xb48f('0x24')},'footer':{'alignment':'right','margin':[0x0,0x0,0x28,0x0]}}};}function extractReport(_0x140006){var _0x254fe1=0x1388;var _0x37610d;if(!_0x140006[0x0]['num']){return analyticExtractedReport(_0xb48f('0x25'));}return db['Setting']['find']({'where':{'id':0x1},'raw':!![],'attributes':['id',_0xb48f('0x26'),_0xb48f('0x27')]})['then'](function(_0x5f5d81){if(_0x5f5d81){_0x37610d=_0x5f5d81;_0x254fe1=_0x37610d[_0xb48f('0x27')]||0x3e8;}})[_0xb48f('0x28')](function(){var _0xfe0e4d=[];var _0x2148df=0x0;if(_0x37610d[_0xb48f('0x26')]){if(_0x140006&&_0x140006[_0xb48f('0x14')]){var _0xe81926=_['range'](_0x140006[0x0][_0xb48f('0x29')]/_0x254fe1);var _0x49140f=Number[_0xb48f('0x2a')](_0x140006[0x0][_0xb48f('0x29')]/_0x254fe1)?_0x140006[0x0][_0xb48f('0x29')]%_0x254fe1:0x0;_0xe81926[_0xb48f('0x18')](function(_0x30a943){if(_0x30a943>0x0){_0x2148df+=_0x254fe1;}_0xfe0e4d[_0xb48f('0x19')](dbH[_0xb48f('0x2b')][_0xb48f('0x2c')](util[_0xb48f('0x1d')]('%s\x20limit\x20%d\x20OFFSET\x20%d',QUERY,_0x254fe1,_0x2148df),{'type':dbH[_0xb48f('0x2b')][_0xb48f('0x2d')]['SELECT']}));});if(_0x49140f>0x0){_0x2148df+=_0x254fe1;_0xfe0e4d[_0xb48f('0x19')](dbH[_0xb48f('0x2b')][_0xb48f('0x2c')](util[_0xb48f('0x1d')](_0xb48f('0x2e'),QUERY,_0x49140f,_0x2148df),{'type':dbH[_0xb48f('0x2b')][_0xb48f('0x2d')][_0xb48f('0x2f')]}));}}}else{_0xfe0e4d[_0xb48f('0x19')](dbH[_0xb48f('0x2b')][_0xb48f('0x2c')](QUERY,{'type':dbH[_0xb48f('0x2b')][_0xb48f('0x2d')][_0xb48f('0x2f')]}));}var _0x3592a6=path['dirname'](PATH);var _0x35f88e=path[_0xb48f('0x30')](PATH,_0xb48f('0x31'));var _0xca788c=_0x37610d[_0xb48f('0x26')]&&_0xfe0e4d[_0xb48f('0x14')]>0x1;var _0x1be508=[];if(!fs['existsSync'](path[_0xb48f('0x32')](_0x3592a6,_0x35f88e))&&_0xca788c){fs[_0xb48f('0x33')](path[_0xb48f('0x32')](_0x3592a6,_0x35f88e));}return BPromise[_0xb48f('0x34')](_0xfe0e4d,function(_0x1ac7db){_0x1be508['push'](_0x1ac7db);})['then'](function(){var _0x1b16b8=[];for(var _0x447fde=0x0;_0x447fde<_0x1be508['length'];_0x447fde+=0x1){var _0xea1410=_0x1be508[_0x447fde];var _0x49d60b=createTables(_[_0xb48f('0x35')](_0xea1410));var _0x47274f;var _0x1b726b=getPDFDocDefinition(_0x49d60b);var _0x14a4ed=getPDFPrinter();var _0x5f2cbf=_0x14a4ed[_0xb48f('0x36')](_0x1b726b);if(_0xca788c){_0x47274f=path[_0xb48f('0x32')](_0x3592a6,_0x35f88e,util[_0xb48f('0x1d')](_0xb48f('0x37'),_0x35f88e,_0x447fde,'pdf'));}else{_0x47274f=path[_0xb48f('0x32')](_0x3592a6,util[_0xb48f('0x1d')](_0xb48f('0x38'),_0x35f88e,'pdf'));}_0x1b16b8[_0xb48f('0x19')](writePDFDocument(_0x5f2cbf,_0x47274f));}return Promise[_0xb48f('0x39')](_0x1b16b8);})[_0xb48f('0x28')](function(){if(_0xca788c){return new Promise(function(_0x126a2a){zipdir(path[_0xb48f('0x32')](_0x3592a6,_0x35f88e),{'saveTo':path[_0xb48f('0x32')](_0x3592a6,util['format'](_0xb48f('0x38'),_0x35f88e,'zip'))},function(){rimraf(path[_0xb48f('0x32')](_0x3592a6,_0x35f88e),function(){});_0x126a2a('zip\x20finished');});});}})[_0xb48f('0x28')](function(){if(!_0xca788c)return;rimraf(path[_0xb48f('0x32')](_0x3592a6,_0x35f88e),function(){});})[_0xb48f('0x28')](function(){logger[_0xb48f('0x3a')](util[_0xb48f('0x1d')]('Extraction\x20report\x20with\x20id\x20%d\x20in\x20%s\x20format\x20completed',EXTRACTED_REPORT_ID,_0xb48f('0x3b')));return analyticExtractedReport(_0xb48f('0x3c'),_0xca788c?util[_0xb48f('0x1d')](_0xb48f('0x38'),_0x35f88e,_0xca788c?'zip':_0xb48f('0x3d')):null);});});}function main(){if(!EXTRACTED_REPORT_ID)return;logger[_0xb48f('0x3a')](util['format'](_0xb48f('0x3e'),EXTRACTED_REPORT_ID,_0xb48f('0x3b')));return db[_0xb48f('0xc')][_0xb48f('0x3f')]({'where':{'id':EXTRACTED_REPORT_ID}})[_0xb48f('0x28')](function(_0x2f4528){EXTRACTED_REPORT=_0x2f4528;return dbH['sequelize']['query'](util[_0xb48f('0x1d')]('SELECT\x20count(*)\x20as\x20num\x20FROM\x20(%s)\x20t',QUERY),{'type':dbH[_0xb48f('0x2b')][_0xb48f('0x2d')]['SELECT']});})['then'](extractReport)['catch'](function(_0x220cbb){logger[_0xb48f('0x3a')](util[_0xb48f('0x1d')](_0xb48f('0x40'),EXTRACTED_REPORT_ID,'PDF'),util['inspect'](_0x220cbb,{'showHidden':![],'depth':null}));EXIT_CODE=0x1;return analyticExtractedReport(_0xb48f('0x41'));})[_0xb48f('0x42')](function(){process[_0xb48f('0x43')](EXIT_CODE);});}main();function getPDFPrinter(){var _0x45efaa=new PdfPrinter({'Arial':{'normal':__dirname+'/fonts/arial-regular.ttf','bold':__dirname+_0xb48f('0x44'),'italics':__dirname+_0xb48f('0x45'),'bolditalics':__dirname+_0xb48f('0x46')}});return _0x45efaa;}function getPDFDocDefinitionFromHTML(_0x127952,_0x5b981d){var _0x55ed57=util[_0xb48f('0x1d')]('%s\x20#%d',_0x5b981d['channel'],_0x5b981d[_0xb48f('0x47')]);var _0x342a12=moment()['format'](_0xb48f('0x48'))['toString']();var _0x12be5a=htmlToPdfmake(_0x127952,{'window':window,'tableAutoSize':!![]});return{'content':[_0x12be5a],'defaultStyle':{'font':_0xb48f('0x49')},'styles':{'header':{'fontSize':0x12,'bold':!![],'alignment':_0xb48f('0x4a'),'margin':[0xa,0xa,0xa,0xa]},'footer':{'fontSize':0x9,'alignment':_0xb48f('0x4a'),'margin':[0xa,0x14,0xa,0xa]},'textblock':{'fontSize':0xb},'textfield':{'bold':!![]},'messageContainer':{'fontSize':0xa},'messageInfo':{'bold':!![]},'interactionData':{'alignment':_0xb48f('0x4a')}},'header':function(){return[{'text':_0xb48f('0x4b'),'style':_0xb48f('0x1f')}];},'footer':function(_0x3d7c9a,_0x2018f1){return[{'text':util[_0xb48f('0x1d')](_0xb48f('0x4c'),_0x55ed57,_0x3d7c9a,_0x2018f1,_0x342a12),'style':_0xb48f('0x23')}];}};}function writePDFDocument(_0x1974e5,_0x2d4f4f){return new Promise(function(_0x3d5fb8,_0x1c9ddf){var _0x577aa3=_0x1974e5[_0xb48f('0x4d')](fs['createWriteStream'](_0x2d4f4f));_0x577aa3['on'](_0xb48f('0x4e'),function(){_0x3d5fb8(_0xb48f('0x4e'));});_0x577aa3['on'](_0xb48f('0x4f'),function(_0x53ddb7){_0x1c9ddf(_0x53ddb7);});_0x1974e5[_0xb48f('0x50')]();});}exports['createPdfFromHTML']=function(_0xb22e5b,_0x4548bc){var _0x55badc=getPDFPrinter();var _0x405f83=getPDFDocDefinitionFromHTML(_0xb22e5b,_0x4548bc);var _0x126e18=_0x55badc['createPdfKitDocument'](_0x405f83);return writePDFDocument(_0x126e18,_0x4548bc[_0xb48f('0x51')])[_0xb48f('0x52')](function(_0x252e34){throw _0x252e34;});}; \ No newline at end of file +var _0x297e=['SELECT\x20count(*)\x20as\x20num\x20FROM\x20(%s)\x20t','catch','Error\x20during\x20extraction\x20report\x20with\x20id\x20%d\x20in\x20%s\x20format','inspect','Failed','finally','exit','/fonts/arial-regular.ttf','/fonts/arial-bold.ttf','/fonts/arial-italic.ttf','/fonts/arial-bold-italic.ttf','channel','interactionId','YYYY-MM-DD','center','Interaction\x20Transcript','header','\x09\x09XCALLY\x20Motion\x20-\x20%s\x09\x09\x09\x09%d/%d\x09\x09\x09\x09%s','pipe','createWriteStream','finish','error','end','createPdfFromHTML','createPdfKitDocument','util','path','html-to-pdfmake','pdfmake/src/printer','zip-dir','rimraf','jsdom','JSDOM','bluebird','../../mysqldb','dbH','analytics','argv','savename','update','map','tableHeader','pick','toString','length','auto','body','push','concat','Name:\x20%s\x0aReport:\x20%s\x0aFrom:\x20%s\x20To:\x20%s','format','endDate','pageBreak','margin','footer','Arial','black','right','Setting','find','split','splitSizePdf','then','range','num','forEach','sequelize','query','%s\x20limit\x20%d\x20OFFSET\x20%d','QueryTypes','SELECT','dirname','basename','.pdf','existsSync','join','mkdirSync','flatten','%s%d.%s','pdf','all','%s.%s','zip','info','Extraction\x20report\x20with\x20id\x20%d\x20in\x20%s\x20format\x20completed','PDF','Start\x20extraction\x20report\x20with\x20id\x20%d\x20in\x20%s\x20format','AnalyticExtractedReport','findOne'];(function(_0x2bf141,_0x31eac7){var _0x48277b=function(_0x9fe560){while(--_0x9fe560){_0x2bf141['push'](_0x2bf141['shift']());}};_0x48277b(++_0x31eac7);}(_0x297e,0x17d));var _0xe297=function(_0x321bb2,_0x202794){_0x321bb2=_0x321bb2-0x0;var _0x9c12ed=_0x297e[_0x321bb2];return _0x9c12ed;};'use strict';var _=require('lodash');var fs=require('fs');var util=require(_0xe297('0x0'));var path=require(_0xe297('0x1'));var moment=require('moment');var htmlToPdfmake=require(_0xe297('0x2'));var PdfPrinter=require(_0xe297('0x3'));var zipdir=require(_0xe297('0x4'));var rimraf=require(_0xe297('0x5'));var JSDOM=require(_0xe297('0x6'))[_0xe297('0x7')];var window=new JSDOM('')['window'];var BPromise=require(_0xe297('0x8'));var db=require(_0xe297('0x9'))['db'];var dbH=require(_0xe297('0x9'))[_0xe297('0xa')];var logger=require('../../config/logger')(_0xe297('0xb'));var EXTRACTED_REPORT_ID=Number(process['argv'][0x2]);var QUERY=process['argv'][0x3];var PATH=process[_0xe297('0xc')][0x4];var NAME=process['argv'][0x5];var FORMAT='MMMM\x20Do\x20YYYY,\x20h:mm:ss\x20a';var EXTRACTED_REPORT;var EXIT_CODE=0x0;function analyticExtractedReport(_0x4bd885,_0x22eed1){var _0x2a78e7={'status':_0x4bd885};var _0x39d8d4={'where':{'id':EXTRACTED_REPORT_ID}};if(_0x22eed1){_0x2a78e7[_0xe297('0xd')]=_0x22eed1;}return db['AnalyticExtractedReport'][_0xe297('0xe')](_0x2a78e7,_0x39d8d4);}function getHeaders(_0x4f4c4e){return _[_0xe297('0xf')](_0x4f4c4e,function(_0x24dbc2){return{'text':_0x24dbc2,'style':_0xe297('0x10')};});}function getRows(_0x28f2eb,_0x5555b3){return _[_0xe297('0xf')](_0x5555b3,function(_0x348f06){return _(_0x348f06)[_0xe297('0x11')](_0x28f2eb)[_0xe297('0xf')](function(_0x231293){return _0x231293?_[_0xe297('0x12')](_0x231293):'';})['value']();});}function createTable(_0x1c94fc,_0x5033a7){var _0x2f7013={'widths':_['fill'](Array(_0x1c94fc[_0xe297('0x13')]),0x91),'heights':function(_0x317d01){return _0x317d01===0x0?_0xe297('0x14'):0x32;},'dontBreakRows':!![],'headerRows':0x1,'body':[]};var _0x429c00=getHeaders(_0x1c94fc);_0x2f7013[_0xe297('0x15')][_0xe297('0x16')](_0x429c00);var _0x255c2f=getRows(_0x1c94fc,_0x5033a7);_0x2f7013[_0xe297('0x15')]=_0x2f7013[_0xe297('0x15')][_0xe297('0x17')](_0x255c2f);return _0x2f7013;}function createTables(_0x2a152a){var _0x2d92d4=[];var _0x103397=_['chunk'](Object['keys'](_0x2a152a[0x0]),0x5);_0x103397['forEach'](function(_0x48cf80){_0x2d92d4[_0xe297('0x16')](createTable(_0x48cf80,_0x2a152a));});return _0x2d92d4;}function getPDFDocDefinition(_0x51fb88){var _0x2b2326=util['format'](_0xe297('0x18'),NAME,EXTRACTED_REPORT['name'],moment(EXTRACTED_REPORT['startDate'])[_0xe297('0x19')](FORMAT),moment(EXTRACTED_REPORT[_0xe297('0x1a')])[_0xe297('0x19')](FORMAT));var _0x422a47=[];for(var _0x46b8c9=0x0;_0x46b8c9<_0x51fb88[_0xe297('0x13')];_0x46b8c9++){var _0x2066bb=[];if(_0x46b8c9===0x0){_0x2066bb[_0xe297('0x16')]({'text':_0x2b2326,'style':'header'});}var _0x6dfb9a={'table':_0x51fb88[_0x46b8c9]};if(_0x46b8c9>0x0){_0x6dfb9a[_0xe297('0x1b')]='before';_0x6dfb9a[_0xe297('0x1c')]=[0x0,0x46,0x0,0x0];}_0x2066bb[_0xe297('0x16')](_0x6dfb9a);_0x422a47[_0xe297('0x16')](_0x2066bb);}return{'pageSize':'A4','pageOrientation':'landscape','content':_0x422a47,'footer':function(_0x409dad,_0x2a297f){return{'text':_0x409dad['toString']()+'\x20/\x20'+_0x2a297f,'style':_0xe297('0x1d')};},'defaultStyle':{'font':_0xe297('0x1e')},'styles':{'header':{'fontSize':0x12,'bold':!![],'margin':[0x0,0x0,0x0,0xa]},'tableHeader':{'bold':!![],'fontSize':0xd,'color':_0xe297('0x1f')},'footer':{'alignment':_0xe297('0x20'),'margin':[0x0,0x0,0x28,0x0]}}};}function extractReport(_0x47823e){var _0x4cc944=0x1388;var _0x37a3cb;if(!_0x47823e[0x0]['num']){return analyticExtractedReport('Empty');}return db[_0xe297('0x21')][_0xe297('0x22')]({'where':{'id':0x1},'raw':!![],'attributes':['id',_0xe297('0x23'),_0xe297('0x24')]})['then'](function(_0x29971b){if(_0x29971b){_0x37a3cb=_0x29971b;_0x4cc944=_0x37a3cb[_0xe297('0x24')]||0x3e8;}})[_0xe297('0x25')](function(){var _0xe4d16=[];var _0x562f68=0x0;if(_0x37a3cb[_0xe297('0x23')]){if(_0x47823e&&_0x47823e[_0xe297('0x13')]){var _0x468581=_[_0xe297('0x26')](_0x47823e[0x0][_0xe297('0x27')]/_0x4cc944);var _0x273b00=Number['isInteger'](_0x47823e[0x0][_0xe297('0x27')]/_0x4cc944)?_0x47823e[0x0]['num']%_0x4cc944:0x0;_0x468581[_0xe297('0x28')](function(_0x54c810){if(_0x54c810>0x0){_0x562f68+=_0x4cc944;}_0xe4d16[_0xe297('0x16')](dbH[_0xe297('0x29')][_0xe297('0x2a')](util[_0xe297('0x19')](_0xe297('0x2b'),QUERY,_0x4cc944,_0x562f68),{'type':dbH[_0xe297('0x29')][_0xe297('0x2c')][_0xe297('0x2d')]}));});if(_0x273b00>0x0){_0x562f68+=_0x4cc944;_0xe4d16[_0xe297('0x16')](dbH['sequelize'][_0xe297('0x2a')](util[_0xe297('0x19')](_0xe297('0x2b'),QUERY,_0x273b00,_0x562f68),{'type':dbH[_0xe297('0x29')][_0xe297('0x2c')][_0xe297('0x2d')]}));}}}else{_0xe4d16['push'](dbH[_0xe297('0x29')][_0xe297('0x2a')](QUERY,{'type':dbH[_0xe297('0x29')]['QueryTypes'][_0xe297('0x2d')]}));}var _0x947981=path[_0xe297('0x2e')](PATH);var _0x15c513=path[_0xe297('0x2f')](PATH,_0xe297('0x30'));var _0x2c6a7e=_0x37a3cb[_0xe297('0x23')]&&_0xe4d16[_0xe297('0x13')]>0x1;var _0x448274=[];if(!fs[_0xe297('0x31')](path[_0xe297('0x32')](_0x947981,_0x15c513))&&_0x2c6a7e){fs[_0xe297('0x33')](path['join'](_0x947981,_0x15c513));}return BPromise['each'](_0xe4d16,function(_0x178ad4){_0x448274['push'](_0x178ad4);})[_0xe297('0x25')](function(){var _0x58b691=[];for(var _0x5cf64=0x0;_0x5cf64<_0x448274[_0xe297('0x13')];_0x5cf64+=0x1){var _0x1cfa11=_0x448274[_0x5cf64];var _0xc3d646=createTables(_[_0xe297('0x34')](_0x1cfa11));var _0x1d66b6;var _0x59fc05=getPDFDocDefinition(_0xc3d646);var _0x58ee8f=getPDFPrinter();var _0x4234b3=_0x58ee8f['createPdfKitDocument'](_0x59fc05);if(_0x2c6a7e){_0x1d66b6=path[_0xe297('0x32')](_0x947981,_0x15c513,util[_0xe297('0x19')](_0xe297('0x35'),_0x15c513,_0x5cf64,_0xe297('0x36')));}else{_0x1d66b6=path[_0xe297('0x32')](_0x947981,util['format']('%s.%s',_0x15c513,_0xe297('0x36')));}_0x58b691[_0xe297('0x16')](writePDFDocument(_0x4234b3,_0x1d66b6));}return Promise[_0xe297('0x37')](_0x58b691);})[_0xe297('0x25')](function(){if(_0x2c6a7e){return new Promise(function(_0x2c3724){zipdir(path['join'](_0x947981,_0x15c513),{'saveTo':path[_0xe297('0x32')](_0x947981,util['format'](_0xe297('0x38'),_0x15c513,_0xe297('0x39')))},function(){rimraf(path[_0xe297('0x32')](_0x947981,_0x15c513),function(){});_0x2c3724('zip\x20finished');});});}})[_0xe297('0x25')](function(){if(!_0x2c6a7e)return;rimraf(path[_0xe297('0x32')](_0x947981,_0x15c513),function(){});})[_0xe297('0x25')](function(){logger[_0xe297('0x3a')](util[_0xe297('0x19')](_0xe297('0x3b'),EXTRACTED_REPORT_ID,_0xe297('0x3c')));return analyticExtractedReport('Completed',_0x2c6a7e?util['format']('%s.%s',_0x15c513,_0x2c6a7e?_0xe297('0x39'):_0xe297('0x36')):null);});});}function main(){if(!EXTRACTED_REPORT_ID)return;logger[_0xe297('0x3a')](util[_0xe297('0x19')](_0xe297('0x3d'),EXTRACTED_REPORT_ID,_0xe297('0x3c')));return db[_0xe297('0x3e')][_0xe297('0x3f')]({'where':{'id':EXTRACTED_REPORT_ID}})[_0xe297('0x25')](function(_0x281128){EXTRACTED_REPORT=_0x281128;return dbH[_0xe297('0x29')][_0xe297('0x2a')](util[_0xe297('0x19')](_0xe297('0x40'),QUERY),{'type':dbH[_0xe297('0x29')][_0xe297('0x2c')]['SELECT']});})[_0xe297('0x25')](extractReport)[_0xe297('0x41')](function(_0x1aae8a){logger[_0xe297('0x3a')](util['format'](_0xe297('0x42'),EXTRACTED_REPORT_ID,_0xe297('0x3c')),util[_0xe297('0x43')](_0x1aae8a,{'showHidden':![],'depth':null}));EXIT_CODE=0x1;return analyticExtractedReport(_0xe297('0x44'));})[_0xe297('0x45')](function(){process[_0xe297('0x46')](EXIT_CODE);});}main();function getPDFPrinter(){var _0x318306=new PdfPrinter({'Arial':{'normal':__dirname+_0xe297('0x47'),'bold':__dirname+_0xe297('0x48'),'italics':__dirname+_0xe297('0x49'),'bolditalics':__dirname+_0xe297('0x4a')}});return _0x318306;}function getPDFDocDefinitionFromHTML(_0x41eb3f,_0x35df5c){var _0x3be1f7=util['format']('%s\x20#%d',_0x35df5c[_0xe297('0x4b')],_0x35df5c[_0xe297('0x4c')]);var _0xebe54e=moment()[_0xe297('0x19')](_0xe297('0x4d'))[_0xe297('0x12')]();var _0x3ff75c=htmlToPdfmake(_0x41eb3f,{'window':window,'tableAutoSize':!![]});return{'content':[_0x3ff75c],'defaultStyle':{'font':_0xe297('0x1e')},'styles':{'header':{'fontSize':0x12,'bold':!![],'alignment':_0xe297('0x4e'),'margin':[0xa,0xa,0xa,0xa]},'footer':{'fontSize':0x9,'alignment':'center','margin':[0xa,0x14,0xa,0xa]},'textblock':{'fontSize':0xb},'textfield':{'bold':!![]},'messageContainer':{'fontSize':0xa},'messageInfo':{'bold':!![]},'interactionData':{'alignment':_0xe297('0x4e')}},'header':function(){return[{'text':_0xe297('0x4f'),'style':_0xe297('0x50')}];},'footer':function(_0x568963,_0x384c15){return[{'text':util['format'](_0xe297('0x51'),_0x3be1f7,_0x568963,_0x384c15,_0xebe54e),'style':_0xe297('0x1d')}];}};}function writePDFDocument(_0x1cfc72,_0x21eebe){return new Promise(function(_0x3840bd,_0x22080d){var _0x25360f=_0x1cfc72[_0xe297('0x52')](fs[_0xe297('0x53')](_0x21eebe));_0x25360f['on']('finish',function(){_0x3840bd(_0xe297('0x54'));});_0x25360f['on'](_0xe297('0x55'),function(_0x2b7373){_0x22080d(_0x2b7373);});_0x1cfc72[_0xe297('0x56')]();});}exports[_0xe297('0x57')]=function(_0x5dfdc7,_0x3ce25d){var _0x4f6fca=getPDFPrinter();var _0x4e2b0c=getPDFDocDefinitionFromHTML(_0x5dfdc7,_0x3ce25d);var _0x44f91c=_0x4f6fca[_0xe297('0x58')](_0x4e2b0c);return writePDFDocument(_0x44f91c,_0x3ce25d[_0xe297('0x1')])[_0xe297('0x41')](function(_0x291eaa){throw _0x291eaa;});}; \ No newline at end of file diff --git a/server/components/export/xlsx.js b/server/components/export/xlsx.js index c12c8b1..59445ec 100644 --- a/server/components/export/xlsx.js +++ b/server/components/export/xlsx.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x0aa8=['length','existsSync','mkdirSync','each','join','%s%d.%s','xlsx','writeFileSync','%s.%s','zip','zip\x20finished','Extraction\x20report\x20with\x20id\x20%d\x20in\x20%s\x20format\x20completed','Completed','catch','Error\x20during\x20extraction\x20report\x20with\x20id\x20%d\x20in\x20%s\x20format','Failed','finally','exit','util','path','lodash','json2xls','zip-dir','rimraf','dbH','analytics','argv','savename','AnalyticExtractedReport','info','Start\x20extraction\x20report\x20with\x20id\x20%d\x20in\x20%s\x20format','XLSX','Setting','find','split','splitSizeXlsx','then','sequelize','query','SELECT\x20count(*)\x20as\x20num\x20FROM\x20(%s)\x20t','QueryTypes','SELECT','num','Empty','range','isInteger','forEach','format','%s\x20limit\x20%d\x20OFFSET\x20%d','push','dirname','basename'];(function(_0x3b7d11,_0x1f7b5b){var _0x4fa85b=function(_0x2a7296){while(--_0x2a7296){_0x3b7d11['push'](_0x3b7d11['shift']());}};_0x4fa85b(++_0x1f7b5b);}(_0x0aa8,0xae));var _0x80aa=function(_0xe5b349,_0x5f06e4){_0xe5b349=_0xe5b349-0x0;var _0x26b0ad=_0x0aa8[_0xe5b349];return _0x26b0ad;};'use strict';var util=require(_0x80aa('0x0'));var path=require(_0x80aa('0x1'));var _=require(_0x80aa('0x2'));var fs=require('fs');var json2xls=require(_0x80aa('0x3'));var BPromise=require('bluebird');var zipdir=require(_0x80aa('0x4'));var rimraf=require(_0x80aa('0x5'));var db=require('../../mysqldb')['db'];var dbH=require('../../mysqldb')[_0x80aa('0x6')];var logger=require('../../config/logger')(_0x80aa('0x7'));var EXTRACTED_REPORT_ID=Number(process[_0x80aa('0x8')][0x2]);var QUERY=process[_0x80aa('0x8')][0x3];var PATH=process['argv'][0x4];var EXIT_CODE=0x0;function analyticExtractedReport(_0x312016,_0x5b2f56){var _0x4da1eb={'status':_0x312016};var _0xab34e0={'where':{'id':EXTRACTED_REPORT_ID}};if(_0x5b2f56){_0x4da1eb[_0x80aa('0x9')]=_0x5b2f56;}return db[_0x80aa('0xa')]['update'](_0x4da1eb,_0xab34e0);}function main(){var _0x57cf56=0x1388;var _0x595aa7;logger[_0x80aa('0xb')](util['format'](_0x80aa('0xc'),EXTRACTED_REPORT_ID,_0x80aa('0xd')));return db[_0x80aa('0xe')][_0x80aa('0xf')]({'where':{'id':0x1},'raw':!![],'attributes':['id',_0x80aa('0x10'),_0x80aa('0x11')]})[_0x80aa('0x12')](function(_0xdc2918){if(_0xdc2918){_0x595aa7=_0xdc2918;_0x57cf56=_0x595aa7[_0x80aa('0x11')]||0x1388;}})[_0x80aa('0x12')](function(){return dbH[_0x80aa('0x13')][_0x80aa('0x14')](util['format'](_0x80aa('0x15'),QUERY),{'type':dbH[_0x80aa('0x13')][_0x80aa('0x16')][_0x80aa('0x17')]});})[_0x80aa('0x12')](function(_0x2d4bfd){if(!_0x2d4bfd[0x0][_0x80aa('0x18')]){return analyticExtractedReport(_0x80aa('0x19'));}var _0x219697=[];var _0x4bdc10=0x0;if(_0x595aa7[_0x80aa('0x10')]){if(_0x2d4bfd&&_0x2d4bfd['length']){var _0x209cd9=_[_0x80aa('0x1a')](_0x2d4bfd[0x0]['num']/_0x57cf56);var _0x456ae2=Number[_0x80aa('0x1b')](_0x2d4bfd[0x0][_0x80aa('0x18')]/_0x57cf56)?_0x2d4bfd[0x0][_0x80aa('0x18')]%_0x57cf56:0x0;_0x209cd9[_0x80aa('0x1c')](function(_0x51b624){if(_0x51b624>0x0){_0x4bdc10+=_0x57cf56;}_0x219697['push'](dbH[_0x80aa('0x13')][_0x80aa('0x14')](util[_0x80aa('0x1d')](_0x80aa('0x1e'),QUERY,_0x57cf56,_0x4bdc10),{'type':dbH[_0x80aa('0x13')][_0x80aa('0x16')][_0x80aa('0x17')]}));});if(_0x456ae2>0x0){_0x4bdc10+=_0x57cf56;_0x219697[_0x80aa('0x1f')](dbH[_0x80aa('0x13')]['query'](util[_0x80aa('0x1d')](_0x80aa('0x1e'),QUERY,_0x456ae2,_0x4bdc10),{'type':dbH['sequelize'][_0x80aa('0x16')]['SELECT']}));}}}else{_0x219697[_0x80aa('0x1f')](dbH[_0x80aa('0x13')][_0x80aa('0x14')](QUERY,{'type':dbH['sequelize'][_0x80aa('0x16')][_0x80aa('0x17')]}));}var _0x2d6d2d=path[_0x80aa('0x20')](PATH);var _0x137fe3=path[_0x80aa('0x21')](PATH,'.xlsx');var _0xf7163e=_0x595aa7['split']&&_0x219697[_0x80aa('0x22')]>0x1;var _0x45f21e=[];if(!fs[_0x80aa('0x23')](path['join'](_0x2d6d2d,_0x137fe3))&&_0xf7163e){fs[_0x80aa('0x24')](path['join'](_0x2d6d2d,_0x137fe3));}return BPromise[_0x80aa('0x25')](_0x219697,function(_0x367944){_0x45f21e[_0x80aa('0x1f')](_0x367944);})['then'](function(){for(var _0x5a36a6=0x0;_0x5a36a6<_0x45f21e[_0x80aa('0x22')];_0x5a36a6+=0x1){var _0x1042d8;var _0x7fcc0a=_0x45f21e[_0x5a36a6];if(_0xf7163e){_0x1042d8=path[_0x80aa('0x26')](_0x2d6d2d,_0x137fe3,util[_0x80aa('0x1d')](_0x80aa('0x27'),_0x137fe3,_0x5a36a6,_0x80aa('0x28')));}else{_0x1042d8=path[_0x80aa('0x26')](_0x2d6d2d,util['format']('%s.%s',_0x137fe3,'xlsx'));}fs[_0x80aa('0x29')](_0x1042d8,json2xls(_0x7fcc0a),'binary');}})[_0x80aa('0x12')](function(){if(_0xf7163e){return new Promise(function(_0x325fd1){zipdir(path[_0x80aa('0x26')](_0x2d6d2d,_0x137fe3),{'saveTo':path[_0x80aa('0x26')](_0x2d6d2d,util[_0x80aa('0x1d')](_0x80aa('0x2a'),_0x137fe3,_0x80aa('0x2b')))},function(_0x18fca0,_0x3856a){rimraf(path[_0x80aa('0x26')](_0x2d6d2d,_0x137fe3),function(){});_0x325fd1(_0x80aa('0x2c'));});});}})['then'](function(){logger[_0x80aa('0xb')](util[_0x80aa('0x1d')](_0x80aa('0x2d'),EXTRACTED_REPORT_ID,_0x80aa('0xd')));return analyticExtractedReport(_0x80aa('0x2e'),_0xf7163e?util[_0x80aa('0x1d')]('%s.%s',_0x137fe3,_0xf7163e?_0x80aa('0x2b'):_0x80aa('0x28')):null);});})[_0x80aa('0x2f')](function(_0x62bb2c){logger['info'](util['format'](_0x80aa('0x30'),EXTRACTED_REPORT_ID,_0x80aa('0xd')),util['inspect'](_0x62bb2c,{'showHidden':![],'depth':null}));EXIT_CODE=0x1;return analyticExtractedReport(_0x80aa('0x31'));})[_0x80aa('0x32')](function(){process[_0x80aa('0x33')](EXIT_CODE);});}main(); \ No newline at end of file +var _0x55cf=['SELECT\x20count(*)\x20as\x20num\x20FROM\x20(%s)\x20t','num','length','isInteger','push','%s\x20limit\x20%d\x20OFFSET\x20%d','QueryTypes','SELECT','basename','.xlsx','join','mkdirSync','each','%s.%s','xlsx','writeFileSync','binary','zip','zip\x20finished','Extraction\x20report\x20with\x20id\x20%d\x20in\x20%s\x20format\x20completed','XLSX','catch','Error\x20during\x20extraction\x20report\x20with\x20id\x20%d\x20in\x20%s\x20format','inspect','Failed','finally','exit','util','path','lodash','zip-dir','rimraf','../../mysqldb','../../config/logger','analytics','argv','AnalyticExtractedReport','update','info','format','Start\x20extraction\x20report\x20with\x20id\x20%d\x20in\x20%s\x20format','Setting','find','split','splitSizeXlsx','then','sequelize','query'];(function(_0x5914a3,_0x22e240){var _0x25af13=function(_0x33c161){while(--_0x33c161){_0x5914a3['push'](_0x5914a3['shift']());}};_0x25af13(++_0x22e240);}(_0x55cf,0xab));var _0xf55c=function(_0x34325b,_0x5e5afe){_0x34325b=_0x34325b-0x0;var _0x3da348=_0x55cf[_0x34325b];return _0x3da348;};'use strict';var util=require(_0xf55c('0x0'));var path=require(_0xf55c('0x1'));var _=require(_0xf55c('0x2'));var fs=require('fs');var json2xls=require('json2xls');var BPromise=require('bluebird');var zipdir=require(_0xf55c('0x3'));var rimraf=require(_0xf55c('0x4'));var db=require(_0xf55c('0x5'))['db'];var dbH=require('../../mysqldb')['dbH'];var logger=require(_0xf55c('0x6'))(_0xf55c('0x7'));var EXTRACTED_REPORT_ID=Number(process[_0xf55c('0x8')][0x2]);var QUERY=process[_0xf55c('0x8')][0x3];var PATH=process[_0xf55c('0x8')][0x4];var EXIT_CODE=0x0;function analyticExtractedReport(_0x1c69a4,_0x6561b7){var _0x26ed34={'status':_0x1c69a4};var _0xc38705={'where':{'id':EXTRACTED_REPORT_ID}};if(_0x6561b7){_0x26ed34['savename']=_0x6561b7;}return db[_0xf55c('0x9')][_0xf55c('0xa')](_0x26ed34,_0xc38705);}function main(){var _0x12717c=0x1388;var _0x581641;logger[_0xf55c('0xb')](util[_0xf55c('0xc')](_0xf55c('0xd'),EXTRACTED_REPORT_ID,'XLSX'));return db[_0xf55c('0xe')][_0xf55c('0xf')]({'where':{'id':0x1},'raw':!![],'attributes':['id',_0xf55c('0x10'),_0xf55c('0x11')]})[_0xf55c('0x12')](function(_0x5eeb54){if(_0x5eeb54){_0x581641=_0x5eeb54;_0x12717c=_0x581641['splitSizeXlsx']||0x1388;}})[_0xf55c('0x12')](function(){return dbH[_0xf55c('0x13')][_0xf55c('0x14')](util[_0xf55c('0xc')](_0xf55c('0x15'),QUERY),{'type':dbH[_0xf55c('0x13')]['QueryTypes']['SELECT']});})[_0xf55c('0x12')](function(_0x2adb0a){if(!_0x2adb0a[0x0][_0xf55c('0x16')]){return analyticExtractedReport('Empty');}var _0x3759cf=[];var _0xa09f6e=0x0;if(_0x581641[_0xf55c('0x10')]){if(_0x2adb0a&&_0x2adb0a[_0xf55c('0x17')]){var _0x43405b=_['range'](_0x2adb0a[0x0][_0xf55c('0x16')]/_0x12717c);var _0xb258f7=Number[_0xf55c('0x18')](_0x2adb0a[0x0]['num']/_0x12717c)?_0x2adb0a[0x0][_0xf55c('0x16')]%_0x12717c:0x0;_0x43405b['forEach'](function(_0x149de0){if(_0x149de0>0x0){_0xa09f6e+=_0x12717c;}_0x3759cf[_0xf55c('0x19')](dbH[_0xf55c('0x13')]['query'](util['format'](_0xf55c('0x1a'),QUERY,_0x12717c,_0xa09f6e),{'type':dbH[_0xf55c('0x13')][_0xf55c('0x1b')]['SELECT']}));});if(_0xb258f7>0x0){_0xa09f6e+=_0x12717c;_0x3759cf[_0xf55c('0x19')](dbH['sequelize']['query'](util[_0xf55c('0xc')]('%s\x20limit\x20%d\x20OFFSET\x20%d',QUERY,_0xb258f7,_0xa09f6e),{'type':dbH['sequelize'][_0xf55c('0x1b')]['SELECT']}));}}}else{_0x3759cf[_0xf55c('0x19')](dbH[_0xf55c('0x13')]['query'](QUERY,{'type':dbH['sequelize'][_0xf55c('0x1b')][_0xf55c('0x1c')]}));}var _0x3c1f95=path['dirname'](PATH);var _0x105499=path[_0xf55c('0x1d')](PATH,_0xf55c('0x1e'));var _0x666d34=_0x581641[_0xf55c('0x10')]&&_0x3759cf[_0xf55c('0x17')]>0x1;var _0x1b330e=[];if(!fs['existsSync'](path[_0xf55c('0x1f')](_0x3c1f95,_0x105499))&&_0x666d34){fs[_0xf55c('0x20')](path[_0xf55c('0x1f')](_0x3c1f95,_0x105499));}return BPromise[_0xf55c('0x21')](_0x3759cf,function(_0x429a99){_0x1b330e[_0xf55c('0x19')](_0x429a99);})[_0xf55c('0x12')](function(){for(var _0x2bc092=0x0;_0x2bc092<_0x1b330e[_0xf55c('0x17')];_0x2bc092+=0x1){var _0x14ea50;var _0x378081=_0x1b330e[_0x2bc092];if(_0x666d34){_0x14ea50=path[_0xf55c('0x1f')](_0x3c1f95,_0x105499,util[_0xf55c('0xc')]('%s%d.%s',_0x105499,_0x2bc092,'xlsx'));}else{_0x14ea50=path[_0xf55c('0x1f')](_0x3c1f95,util[_0xf55c('0xc')](_0xf55c('0x22'),_0x105499,_0xf55c('0x23')));}fs[_0xf55c('0x24')](_0x14ea50,json2xls(_0x378081),_0xf55c('0x25'));}})['then'](function(){if(_0x666d34){return new Promise(function(_0x446184){zipdir(path[_0xf55c('0x1f')](_0x3c1f95,_0x105499),{'saveTo':path[_0xf55c('0x1f')](_0x3c1f95,util[_0xf55c('0xc')](_0xf55c('0x22'),_0x105499,_0xf55c('0x26')))},function(_0x3e5451,_0x530c9d){rimraf(path[_0xf55c('0x1f')](_0x3c1f95,_0x105499),function(){});_0x446184(_0xf55c('0x27'));});});}})['then'](function(){logger['info'](util[_0xf55c('0xc')](_0xf55c('0x28'),EXTRACTED_REPORT_ID,_0xf55c('0x29')));return analyticExtractedReport('Completed',_0x666d34?util[_0xf55c('0xc')]('%s.%s',_0x105499,_0x666d34?_0xf55c('0x26'):_0xf55c('0x23')):null);});})[_0xf55c('0x2a')](function(_0x39e26b){logger[_0xf55c('0xb')](util[_0xf55c('0xc')](_0xf55c('0x2b'),EXTRACTED_REPORT_ID,_0xf55c('0x29')),util[_0xf55c('0x2c')](_0x39e26b,{'showHidden':![],'depth':null}));EXIT_CODE=0x1;return analyticExtractedReport(_0xf55c('0x2d'));})[_0xf55c('0x2e')](function(){process[_0xf55c('0x2f')](EXIT_CODE);});}main(); \ No newline at end of file diff --git a/server/components/extensions/rewrite.js b/server/components/extensions/rewrite.js index f0a54c5..a209f90 100644 --- a/server/components/extensions/rewrite.js +++ b/server/components/extensions/rewrite.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x016e=['VoiceExtensionId','CDR(routeid)=','push','CDR(destination)=','cutdigits','${EXTEN:','context','ExecIf','):Goto(','CDR(prefix)=noprefix','outboundrouteid=','recordingFormat','none','_XCALLY_MIXMONITOR_FORMAT=','wav','XCALLY-MOTION-ANSWER=0','XCALLY-MOTION-PROGRESS=0','MONITOR_OPTIONS=ab','length','toLowerCase','*,*,*,*','interval','tag','CDR(tag)=','outbound','callerID','$[${LEN(${PREFIX-CALLERIDALL})}\x20>\x200]?Set(CALLERID(all)=${PREFIX-CALLERIDALL}):Set(CALLERID(all)=','$[${LEN(${PREFIX-CALLERIDALL})}\x20>\x200]?Set(CALLERID(all)=${PREFIX-CALLERIDALL}):NoOp(No\x20number\x20available)','answer','app','appType','XCALLY-MOTION-ANSWER=1','$[${XCALLY-MOTION-PROGRESS}=0]?Progress','XCALLY-MOTION-PROGRESS=1','splice',',${EXTEN},','last','concat','Hangup','transaction','VoiceExtension','destroy','bulkCreate','sortBy','catch','error','rewrite','util','Interval','then','intervals','models','IntervalId','findAll','uniq','map','exten','filter','groupBy','queue','playback','hasOwnProperty','priority','extensions','extension','find','Set','format','type'];(function(_0x51ac09,_0x383098){var _0x3f827d=function(_0x2d8d0f){while(--_0x2d8d0f){_0x51ac09['push'](_0x51ac09['shift']());}};_0x3f827d(++_0x383098);}(_0x016e,0x74));var _0xe016=function(_0xb8b7ed,_0x3c8900){_0xb8b7ed=_0xb8b7ed-0x0;var _0x5b4989=_0x016e[_0xb8b7ed];return _0x5b4989;};'use strict';var _=require('lodash');var util=require(_0xe016('0x0'));function rewrite(_0x2062a4,_0x51cde4){var _0xe65234=this;return _0x2062a4['models'][_0xe016('0x1')]['findAll']({'raw':!![]})[_0xe016('0x2')](function(_0x1a0285){_0xe65234[_0xe016('0x3')]=_0x1a0285;return _0x2062a4[_0xe016('0x4')]['VoiceExtension']['findAll']({'where':{'IntervalId':_0x51cde4[_0xe016('0x5')]},'raw':!![]});})[_0xe016('0x2')](function(_0x59d5a2){return _0x2062a4['models']['VoiceExtension'][_0xe016('0x6')]({'where':{'exten':{'$in':_[_0xe016('0x7')](_[_0xe016('0x8')](_0x59d5a2,_0xe016('0x9')))}},'order':[{'raw':'CAST(priority\x20AS\x20UNSIGNED)'}],'raw':!![]});})[_0xe016('0x2')](function(_0x5af17d){var _0x1e5d8f=_[_0xe016('0xa')](_0x5af17d,{'priority':'1'});var _0x5323de=_[_0xe016('0xa')](_0x5af17d,{'isApp':0x1});var _0xc23628=_[_0xe016('0xb')](_0x5323de,_0xe016('0x9'));var _0x109869=[_0xe016('0xc'),_0xe016('0xd')];var _0xbea54a=[];var _0x289607=[];for(var _0x47bf1e in _0xc23628){if(_0xc23628[_0xe016('0xe')](_0x47bf1e)){_0xe65234[_0xe016('0xf')]=0x2;_0xe65234[_0xe016('0x10')]=[];_0xe65234[_0xe016('0x11')]=_[_0xe016('0x12')](_0x1e5d8f,{'exten':_0xc23628[_0x47bf1e][0x0]['exten']});_0xe65234[_0xe016('0x10')]['push']({'type':_0xc23628[_0x47bf1e][0x0]['type'],'app':_0xe016('0x13'),'appdata':util[_0xe016('0x14')]('CDR(type)=%s',_0xc23628[_0x47bf1e][0x0][_0xe016('0x15')]),'context':_0xc23628[_0x47bf1e][0x0]['context'],'exten':_0xc23628[_0x47bf1e][0x0][_0xe016('0x9')],'priority':_0xe65234[_0xe016('0xf')]++,'VoiceExtensionId':_0xc23628[_0x47bf1e][0x0][_0xe016('0x16')]});if(_0xc23628[_0x47bf1e][0x0][_0xe016('0x15')]==='inbound'){_0xe65234[_0xe016('0x10')]['push']({'type':_0xc23628[_0x47bf1e][0x0]['type'],'app':_0xe016('0x13'),'appdata':_0xe016('0x17')+_0xc23628[_0x47bf1e][0x0]['VoiceExtensionId'],'context':_0xc23628[_0x47bf1e][0x0]['context'],'exten':_0xc23628[_0x47bf1e][0x0][_0xe016('0x9')],'priority':_0xe65234[_0xe016('0xf')]++,'VoiceExtensionId':_0xc23628[_0x47bf1e][0x0][_0xe016('0x16')]});}else if(_0xc23628[_0x47bf1e][0x0][_0xe016('0x15')]==='outbound'){if(_0xe65234[_0xe016('0x11')]){_0xe65234['extensions'][_0xe016('0x18')]({'type':_0xc23628[_0x47bf1e][0x0][_0xe016('0x15')],'app':'Set','appdata':_0xe016('0x19')+(_0xe65234[_0xe016('0x11')][_0xe016('0x1a')]?_0xe016('0x1b')+_0xe65234[_0xe016('0x11')]['cutdigits']+'}':'${EXTEN}'),'context':_0xc23628[_0x47bf1e][0x0][_0xe016('0x1c')],'exten':_0xc23628[_0x47bf1e][0x0][_0xe016('0x9')],'priority':_0xe65234[_0xe016('0xf')]++,'VoiceExtensionId':_0xc23628[_0x47bf1e][0x0][_0xe016('0x16')]});}_0xe65234[_0xe016('0x10')]['push']({'type':_0xc23628[_0x47bf1e][0x0]['type'],'app':'Set','appdata':_0xe016('0x17')+_0xc23628[_0x47bf1e][0x0][_0xe016('0x16')],'context':_0xc23628[_0x47bf1e][0x0]['context'],'exten':_0xc23628[_0x47bf1e][0x0][_0xe016('0x9')],'priority':_0xe65234['priority']++,'VoiceExtensionId':_0xc23628[_0x47bf1e][0x0][_0xe016('0x16')]});var _0x278c4c=_0xe65234[_0xe016('0xf')]++;_0xe65234['extensions'][_0xe016('0x18')]({'type':_0xc23628[_0x47bf1e][0x0][_0xe016('0x15')],'app':_0xe016('0x1d'),'appdata':'$[${LEN(${CDR(prefix)})}\x20>\x200]?Goto('+(_0x278c4c+0x2)+_0xe016('0x1e')+(_0x278c4c+0x1)+')','context':_0xc23628[_0x47bf1e][0x0][_0xe016('0x1c')],'exten':_0xc23628[_0x47bf1e][0x0]['exten'],'priority':_0x278c4c,'VoiceExtensionId':_0xc23628[_0x47bf1e][0x0][_0xe016('0x16')]});if(_0xe65234['extension']){_0xe65234[_0xe016('0x10')]['push']({'type':_0xc23628[_0x47bf1e][0x0][_0xe016('0x15')],'app':'Set','appdata':_0xe65234[_0xe016('0x11')][_0xe016('0x1a')]?'CDR(prefix)=${EXTEN:0:'+_0xe65234[_0xe016('0x11')][_0xe016('0x1a')]+'}':_0xe016('0x1f'),'context':_0xc23628[_0x47bf1e][0x0][_0xe016('0x1c')],'exten':_0xc23628[_0x47bf1e][0x0]['exten'],'priority':_0xe65234[_0xe016('0xf')]++,'VoiceExtensionId':_0xc23628[_0x47bf1e][0x0]['VoiceExtensionId']});}_0xe65234['extensions'][_0xe016('0x18')]({'type':_0xc23628[_0x47bf1e][0x0]['type'],'app':_0xe016('0x13'),'appdata':_0xe016('0x20')+_0xc23628[_0x47bf1e][0x0][_0xe016('0x16')],'context':_0xc23628[_0x47bf1e][0x0]['context'],'exten':_0xc23628[_0x47bf1e][0x0][_0xe016('0x9')],'priority':_0xe65234[_0xe016('0xf')]++,'VoiceExtensionId':_0xc23628[_0x47bf1e][0x0][_0xe016('0x16')]});if(_0xe65234[_0xe016('0x11')]&&_0xe65234['extension'][_0xe016('0xe')]('recordingFormat')&&_0xe65234[_0xe016('0x11')][_0xe016('0x21')]!==_0xe016('0x22')){_0xe65234[_0xe016('0x10')][_0xe016('0x18')]({'type':_0xc23628[_0x47bf1e][0x0][_0xe016('0x15')],'app':_0xe016('0x13'),'appdata':'_XCALLY_MIXMONITOR_UNIQUEID=${UNIQUEID}','context':_0xc23628[_0x47bf1e][0x0][_0xe016('0x1c')],'exten':_0xc23628[_0x47bf1e][0x0][_0xe016('0x9')],'priority':_0xe65234[_0xe016('0xf')]++,'VoiceExtensionId':_0xc23628[_0x47bf1e][0x0][_0xe016('0x16')]});_0xe65234[_0xe016('0x10')][_0xe016('0x18')]({'type':_0xc23628[_0x47bf1e][0x0][_0xe016('0x15')],'app':'Set','appdata':_0xe016('0x23')+_0xe65234[_0xe016('0x11')][_0xe016('0x21')]||_0xe016('0x24'),'context':_0xc23628[_0x47bf1e][0x0]['context'],'exten':_0xc23628[_0x47bf1e][0x0]['exten'],'priority':_0xe65234[_0xe016('0xf')]++,'VoiceExtensionId':_0xc23628[_0x47bf1e][0x0][_0xe016('0x16')]});}}_0xe65234[_0xe016('0x10')]['push']({'type':_0xc23628[_0x47bf1e][0x0]['type'],'app':_0xe016('0x13'),'appdata':_0xe016('0x25'),'context':_0xc23628[_0x47bf1e][0x0][_0xe016('0x1c')],'exten':_0xc23628[_0x47bf1e][0x0][_0xe016('0x9')],'priority':_0xe65234['priority']++,'VoiceExtensionId':_0xc23628[_0x47bf1e][0x0]['VoiceExtensionId']});_0xe65234[_0xe016('0x10')]['push']({'type':_0xc23628[_0x47bf1e][0x0][_0xe016('0x15')],'app':_0xe016('0x13'),'appdata':_0xe016('0x26'),'context':_0xc23628[_0x47bf1e][0x0][_0xe016('0x1c')],'exten':_0xc23628[_0x47bf1e][0x0][_0xe016('0x9')],'priority':_0xe65234[_0xe016('0xf')]++,'VoiceExtensionId':_0xc23628[_0x47bf1e][0x0]['VoiceExtensionId']});_0xe65234[_0xe016('0x10')]['push']({'type':_0xc23628[_0x47bf1e][0x0][_0xe016('0x15')],'app':_0xe016('0x13'),'appdata':_0xe016('0x27'),'context':_0xc23628[_0x47bf1e][0x0][_0xe016('0x1c')],'exten':_0xc23628[_0x47bf1e][0x0]['exten'],'priority':_0xe65234['priority']++,'VoiceExtensionId':_0xc23628[_0x47bf1e][0x0]['VoiceExtensionId']});for(var _0xdaea38=0x0,_0x26d6c0=0x0;_0xdaea38<_0xc23628[_0x47bf1e][_0xe016('0x28')];_0xdaea38+=0x1,_0x26d6c0=0x0){var _0x4edde6=_0xc23628[_0x47bf1e][_0xdaea38];if(_0x4edde6[_0xe016('0x15')]){_0x4edde6[_0xe016('0x15')]=_0x4edde6['type'][_0xe016('0x29')]();}var _0x5c64b9=[];var _0x4164ef=[];delete _0x4edde6['id'];delete _0x4edde6['createdAt'];delete _0x4edde6['updatedAt'];var _0x40db47=_0x4edde6['interval']!==_0xe016('0x2a')?[_0x4edde6['interval']]:_0x4edde6[_0xe016('0x5')]?_['map'](_[_0xe016('0xa')](_0xe65234[_0xe016('0x3')],{'IntervalId':_0x4edde6['IntervalId']}),_0xe016('0x2b')):[];if(_0x4edde6[_0xe016('0xe')](_0xe016('0x2c'))){if(_0x4edde6[_0xe016('0x2c')]&&_0x4edde6[_0xe016('0x2c')]!=='--'){_0x5c64b9['push']({'type':_0x4edde6['type'],'app':_0xe016('0x13'),'appdata':_0xe016('0x2d')+_0x4edde6[_0xe016('0x2c')],'context':_0x4edde6['context'],'exten':_0x4edde6[_0xe016('0x9')],'priority':_0x40db47[_0xe016('0x28')]+_0xe65234[_0xe016('0xf')]+_0x26d6c0++,'VoiceExtensionId':_0x4edde6[_0xe016('0x16')]});}}if(_0x4edde6[_0xe016('0x15')]===_0xe016('0x2e')&&_0x4edde6[_0xe016('0xe')](_0xe016('0x2f'))){if(_0x4edde6[_0xe016('0x2f')]){_0x5c64b9[_0xe016('0x18')]({'type':_0x4edde6['type'],'app':_0xe016('0x1d'),'appdata':_0xe016('0x30')+_0x4edde6[_0xe016('0x2f')]+')','context':_0x4edde6[_0xe016('0x1c')],'exten':_0x4edde6[_0xe016('0x9')],'priority':_0x40db47['length']+_0xe65234[_0xe016('0xf')]+_0x26d6c0++,'VoiceExtensionId':_0x4edde6[_0xe016('0x16')]});}else{_0x5c64b9[_0xe016('0x18')]({'type':_0x4edde6['type'],'app':_0xe016('0x1d'),'appdata':_0xe016('0x31'),'context':_0x4edde6[_0xe016('0x1c')],'exten':_0x4edde6['exten'],'priority':_0x40db47[_0xe016('0x28')]+_0xe65234[_0xe016('0xf')]+_0x26d6c0++,'VoiceExtensionId':_0x4edde6[_0xe016('0x16')]});}}if(_0x4edde6[_0xe016('0xe')](_0xe016('0x32'))){if(_0x109869['indexOf'](_0x4edde6[_0xe016('0x33')][_0xe016('0x29')]())>=0x0&&_0x4edde6[_0xe016('0x34')]!=='custom'){if(_0x4edde6[_0xe016('0x32')]){_0x5c64b9[_0xe016('0x18')]({'type':_0x4edde6[_0xe016('0x15')],'app':_0xe016('0x1d'),'appdata':'$[${XCALLY-MOTION-ANSWER}=0]?Answer','context':_0x4edde6['context'],'exten':_0x4edde6['exten'],'priority':_0x40db47[_0xe016('0x28')]+_0xe65234[_0xe016('0xf')]+_0x26d6c0++,'VoiceExtensionId':_0x4edde6[_0xe016('0x16')]});_0x5c64b9[_0xe016('0x18')]({'type':_0x4edde6[_0xe016('0x15')],'app':_0xe016('0x13'),'appdata':_0xe016('0x35'),'context':_0x4edde6[_0xe016('0x1c')],'exten':_0x4edde6[_0xe016('0x9')],'priority':_0x40db47[_0xe016('0x28')]+_0xe65234[_0xe016('0xf')]+_0x26d6c0++,'VoiceExtensionId':_0x4edde6['VoiceExtensionId']});}else{_0x5c64b9[_0xe016('0x18')]({'type':_0x4edde6[_0xe016('0x15')],'app':'ExecIf','appdata':_0xe016('0x36'),'context':_0x4edde6[_0xe016('0x1c')],'exten':_0x4edde6[_0xe016('0x9')],'priority':_0x40db47[_0xe016('0x28')]+_0xe65234[_0xe016('0xf')]+_0x26d6c0++,'VoiceExtensionId':_0x4edde6[_0xe016('0x16')]});_0x5c64b9['push']({'type':_0x4edde6[_0xe016('0x15')],'app':'Set','appdata':_0xe016('0x37'),'context':_0x4edde6[_0xe016('0x1c')],'exten':_0x4edde6[_0xe016('0x9')],'priority':_0x40db47['length']+_0xe65234[_0xe016('0xf')]+_0x26d6c0++,'VoiceExtensionId':_0x4edde6[_0xe016('0x16')]});}}}for(var _0x1a9a25=0x0;_0x1a9a25<_0x40db47[_0xe016('0x28')];_0x1a9a25+=0x1){var _0x30522c=_0xe65234['priority']+_0x40db47[_0xe016('0x28')];var _0x5a0115=_0x1a9a25===_0x40db47[_0xe016('0x28')]-0x1?_0xe65234[_0xe016('0xf')]+_0x5c64b9[_0xe016('0x28')]+_0x4164ef[_0xe016('0x28')]+0x2:_0xe65234[_0xe016('0xf')]+_0x1a9a25+0x1;_0x5c64b9[_0xe016('0x38')](_0x1a9a25,0x0,{'type':_0x4edde6[_0xe016('0x15')],'app':'GotoIfTime','appdata':_0x40db47[_0x1a9a25]+'?'+_0x4edde6['context']+_0xe016('0x39')+_0x30522c+':'+_0x4edde6[_0xe016('0x1c')]+_0xe016('0x39')+_0x5a0115,'exten':_0x4edde6[_0xe016('0x9')],'context':_0x4edde6['context'],'priority':_0xe65234['priority']+_0x1a9a25,'VoiceExtensionId':_0xc23628[_0x47bf1e][0x0][_0xe016('0x16')]});}_0x4edde6[_0xe016('0xf')]=_0x5c64b9[_0xe016('0x28')]?_[_0xe016('0x3a')](_0x5c64b9)['priority']+0x1:_0xe65234[_0xe016('0xf')];_0xe65234[_0xe016('0xf')]=(_0x4164ef[_0xe016('0x28')]?_[_0xe016('0x3a')](_0x4164ef)['priority']:_0x4edde6[_0xe016('0xf')])+0x1;_0xe65234[_0xe016('0x10')]=_[_0xe016('0x3b')](_0xe65234[_0xe016('0x10')],_0x5c64b9,[_0x4edde6],_0x4164ef);}_0xe65234[_0xe016('0x10')][_0xe016('0x18')]({'type':_0xc23628[_0x47bf1e][0x0][_0xe016('0x15')],'app':_0xe016('0x3c'),'exten':_0xc23628[_0x47bf1e][0x0][_0xe016('0x9')],'context':_0xc23628[_0x47bf1e][0x0]['context'],'priority':_0xe65234[_0xe016('0xf')],'VoiceExtensionId':_0xc23628[_0x47bf1e][0x0][_0xe016('0x16')]});_0xbea54a[_0xe016('0x18')](_0xc23628[_0x47bf1e][0x0][_0xe016('0x16')]);_0x289607=_[_0xe016('0x3b')](_0x289607,_0xe65234[_0xe016('0x10')]);}}return _0x2062a4[_0xe016('0x3d')](function(_0x3ec3b9){return _0x2062a4[_0xe016('0x4')][_0xe016('0x3e')][_0xe016('0x3f')]({'where':{'VoiceExtensionId':{'$in':_0xbea54a}},'transaction':_0x3ec3b9})[_0xe016('0x2')](function(_0x3e459e){return _0x2062a4['models'][_0xe016('0x3e')][_0xe016('0x40')](_[_0xe016('0x41')](_0x289607,_0xe016('0xf')),{'transaction':_0x3ec3b9});});});})[_0xe016('0x42')](function(_0x57d391){console[_0xe016('0x43')](_0x57d391);});}exports[_0xe016('0x44')]=rewrite; \ No newline at end of file +var _0x0565=['createdAt','updatedAt','interval','tag','CDR(tag)=','callerID','$[${LEN(${PREFIX-CALLERIDALL})}\x20>\x200]?Set(CALLERID(all)=${PREFIX-CALLERIDALL}):Set(CALLERID(all)=','$[${LEN(${PREFIX-CALLERIDALL})}\x20>\x200]?Set(CALLERID(all)=${PREFIX-CALLERIDALL}):NoOp(No\x20number\x20available)','indexOf','app','custom','answer','XCALLY-MOTION-ANSWER=1','$[${XCALLY-MOTION-PROGRESS}=0]?Progress','XCALLY-MOTION-PROGRESS=1','splice',',${EXTEN},','last','concat','transaction','destroy','bulkCreate','sortBy','error','lodash','models','Interval','then','intervals','VoiceExtension','findAll','IntervalId','map','exten','filter','groupBy','playback','hasOwnProperty','priority','extensions','extension','push','type','format','context','VoiceExtensionId','Set','CDR(routeid)=','outbound','CDR(destination)=','cutdigits','${EXTEN}','ExecIf','$[${LEN(${CDR(prefix)})}\x20>\x200]?Goto(','):Goto(','CDR(prefix)=${EXTEN:0:','CDR(prefix)=noprefix','outboundrouteid=','none','_XCALLY_MIXMONITOR_UNIQUEID=${UNIQUEID}','_XCALLY_MIXMONITOR_FORMAT=','recordingFormat','XCALLY-MOTION-PROGRESS=0','length','toLowerCase'];(function(_0x373dee,_0x1a8c45){var _0x46798f=function(_0xc389f0){while(--_0xc389f0){_0x373dee['push'](_0x373dee['shift']());}};_0x46798f(++_0x1a8c45);}(_0x0565,0x1df));var _0x5056=function(_0x2c7618,_0x26be9c){_0x2c7618=_0x2c7618-0x0;var _0x5ce3f0=_0x0565[_0x2c7618];return _0x5ce3f0;};'use strict';var _=require(_0x5056('0x0'));var util=require('util');function rewrite(_0x1ed3c7,_0x2f8bd3){var _0x23d65e=this;return _0x1ed3c7[_0x5056('0x1')][_0x5056('0x2')]['findAll']({'raw':!![]})[_0x5056('0x3')](function(_0x43791f){_0x23d65e[_0x5056('0x4')]=_0x43791f;return _0x1ed3c7[_0x5056('0x1')][_0x5056('0x5')][_0x5056('0x6')]({'where':{'IntervalId':_0x2f8bd3[_0x5056('0x7')]},'raw':!![]});})[_0x5056('0x3')](function(_0x13417f){return _0x1ed3c7[_0x5056('0x1')]['VoiceExtension'][_0x5056('0x6')]({'where':{'exten':{'$in':_['uniq'](_[_0x5056('0x8')](_0x13417f,_0x5056('0x9')))}},'order':[{'raw':'CAST(priority\x20AS\x20UNSIGNED)'}],'raw':!![]});})[_0x5056('0x3')](function(_0x4e22fc){var _0x442c63=_[_0x5056('0xa')](_0x4e22fc,{'priority':'1'});var _0xd841d8=_[_0x5056('0xa')](_0x4e22fc,{'isApp':0x1});var _0x502fa8=_[_0x5056('0xb')](_0xd841d8,'exten');var _0x25e94d=['queue',_0x5056('0xc')];var _0x2cc4d6=[];var _0x2333ab=[];for(var _0x592d8c in _0x502fa8){if(_0x502fa8[_0x5056('0xd')](_0x592d8c)){_0x23d65e[_0x5056('0xe')]=0x2;_0x23d65e[_0x5056('0xf')]=[];_0x23d65e[_0x5056('0x10')]=_['find'](_0x442c63,{'exten':_0x502fa8[_0x592d8c][0x0][_0x5056('0x9')]});_0x23d65e[_0x5056('0xf')][_0x5056('0x11')]({'type':_0x502fa8[_0x592d8c][0x0][_0x5056('0x12')],'app':'Set','appdata':util[_0x5056('0x13')]('CDR(type)=%s',_0x502fa8[_0x592d8c][0x0][_0x5056('0x12')]),'context':_0x502fa8[_0x592d8c][0x0][_0x5056('0x14')],'exten':_0x502fa8[_0x592d8c][0x0][_0x5056('0x9')],'priority':_0x23d65e[_0x5056('0xe')]++,'VoiceExtensionId':_0x502fa8[_0x592d8c][0x0][_0x5056('0x15')]});if(_0x502fa8[_0x592d8c][0x0][_0x5056('0x12')]==='inbound'){_0x23d65e[_0x5056('0xf')]['push']({'type':_0x502fa8[_0x592d8c][0x0][_0x5056('0x12')],'app':_0x5056('0x16'),'appdata':_0x5056('0x17')+_0x502fa8[_0x592d8c][0x0][_0x5056('0x15')],'context':_0x502fa8[_0x592d8c][0x0]['context'],'exten':_0x502fa8[_0x592d8c][0x0][_0x5056('0x9')],'priority':_0x23d65e['priority']++,'VoiceExtensionId':_0x502fa8[_0x592d8c][0x0][_0x5056('0x15')]});}else if(_0x502fa8[_0x592d8c][0x0]['type']===_0x5056('0x18')){if(_0x23d65e[_0x5056('0x10')]){_0x23d65e[_0x5056('0xf')]['push']({'type':_0x502fa8[_0x592d8c][0x0][_0x5056('0x12')],'app':_0x5056('0x16'),'appdata':_0x5056('0x19')+(_0x23d65e['extension'][_0x5056('0x1a')]?'${EXTEN:'+_0x23d65e[_0x5056('0x10')][_0x5056('0x1a')]+'}':_0x5056('0x1b')),'context':_0x502fa8[_0x592d8c][0x0]['context'],'exten':_0x502fa8[_0x592d8c][0x0][_0x5056('0x9')],'priority':_0x23d65e[_0x5056('0xe')]++,'VoiceExtensionId':_0x502fa8[_0x592d8c][0x0]['VoiceExtensionId']});}_0x23d65e[_0x5056('0xf')][_0x5056('0x11')]({'type':_0x502fa8[_0x592d8c][0x0][_0x5056('0x12')],'app':'Set','appdata':_0x5056('0x17')+_0x502fa8[_0x592d8c][0x0][_0x5056('0x15')],'context':_0x502fa8[_0x592d8c][0x0][_0x5056('0x14')],'exten':_0x502fa8[_0x592d8c][0x0][_0x5056('0x9')],'priority':_0x23d65e[_0x5056('0xe')]++,'VoiceExtensionId':_0x502fa8[_0x592d8c][0x0][_0x5056('0x15')]});var _0x546cb9=_0x23d65e['priority']++;_0x23d65e['extensions'][_0x5056('0x11')]({'type':_0x502fa8[_0x592d8c][0x0]['type'],'app':_0x5056('0x1c'),'appdata':_0x5056('0x1d')+(_0x546cb9+0x2)+_0x5056('0x1e')+(_0x546cb9+0x1)+')','context':_0x502fa8[_0x592d8c][0x0][_0x5056('0x14')],'exten':_0x502fa8[_0x592d8c][0x0]['exten'],'priority':_0x546cb9,'VoiceExtensionId':_0x502fa8[_0x592d8c][0x0][_0x5056('0x15')]});if(_0x23d65e[_0x5056('0x10')]){_0x23d65e[_0x5056('0xf')][_0x5056('0x11')]({'type':_0x502fa8[_0x592d8c][0x0][_0x5056('0x12')],'app':'Set','appdata':_0x23d65e[_0x5056('0x10')][_0x5056('0x1a')]?_0x5056('0x1f')+_0x23d65e[_0x5056('0x10')][_0x5056('0x1a')]+'}':_0x5056('0x20'),'context':_0x502fa8[_0x592d8c][0x0][_0x5056('0x14')],'exten':_0x502fa8[_0x592d8c][0x0]['exten'],'priority':_0x23d65e[_0x5056('0xe')]++,'VoiceExtensionId':_0x502fa8[_0x592d8c][0x0]['VoiceExtensionId']});}_0x23d65e[_0x5056('0xf')][_0x5056('0x11')]({'type':_0x502fa8[_0x592d8c][0x0][_0x5056('0x12')],'app':_0x5056('0x16'),'appdata':_0x5056('0x21')+_0x502fa8[_0x592d8c][0x0][_0x5056('0x15')],'context':_0x502fa8[_0x592d8c][0x0][_0x5056('0x14')],'exten':_0x502fa8[_0x592d8c][0x0][_0x5056('0x9')],'priority':_0x23d65e[_0x5056('0xe')]++,'VoiceExtensionId':_0x502fa8[_0x592d8c][0x0]['VoiceExtensionId']});if(_0x23d65e[_0x5056('0x10')]&&_0x23d65e[_0x5056('0x10')][_0x5056('0xd')]('recordingFormat')&&_0x23d65e[_0x5056('0x10')]['recordingFormat']!==_0x5056('0x22')){_0x23d65e[_0x5056('0xf')][_0x5056('0x11')]({'type':_0x502fa8[_0x592d8c][0x0][_0x5056('0x12')],'app':'Set','appdata':_0x5056('0x23'),'context':_0x502fa8[_0x592d8c][0x0][_0x5056('0x14')],'exten':_0x502fa8[_0x592d8c][0x0]['exten'],'priority':_0x23d65e[_0x5056('0xe')]++,'VoiceExtensionId':_0x502fa8[_0x592d8c][0x0][_0x5056('0x15')]});_0x23d65e[_0x5056('0xf')][_0x5056('0x11')]({'type':_0x502fa8[_0x592d8c][0x0]['type'],'app':'Set','appdata':_0x5056('0x24')+_0x23d65e['extension'][_0x5056('0x25')]||'wav','context':_0x502fa8[_0x592d8c][0x0][_0x5056('0x14')],'exten':_0x502fa8[_0x592d8c][0x0][_0x5056('0x9')],'priority':_0x23d65e[_0x5056('0xe')]++,'VoiceExtensionId':_0x502fa8[_0x592d8c][0x0]['VoiceExtensionId']});}}_0x23d65e[_0x5056('0xf')]['push']({'type':_0x502fa8[_0x592d8c][0x0][_0x5056('0x12')],'app':_0x5056('0x16'),'appdata':'XCALLY-MOTION-ANSWER=0','context':_0x502fa8[_0x592d8c][0x0]['context'],'exten':_0x502fa8[_0x592d8c][0x0][_0x5056('0x9')],'priority':_0x23d65e[_0x5056('0xe')]++,'VoiceExtensionId':_0x502fa8[_0x592d8c][0x0]['VoiceExtensionId']});_0x23d65e[_0x5056('0xf')][_0x5056('0x11')]({'type':_0x502fa8[_0x592d8c][0x0][_0x5056('0x12')],'app':'Set','appdata':_0x5056('0x26'),'context':_0x502fa8[_0x592d8c][0x0][_0x5056('0x14')],'exten':_0x502fa8[_0x592d8c][0x0][_0x5056('0x9')],'priority':_0x23d65e[_0x5056('0xe')]++,'VoiceExtensionId':_0x502fa8[_0x592d8c][0x0][_0x5056('0x15')]});_0x23d65e[_0x5056('0xf')][_0x5056('0x11')]({'type':_0x502fa8[_0x592d8c][0x0]['type'],'app':_0x5056('0x16'),'appdata':'MONITOR_OPTIONS=ab','context':_0x502fa8[_0x592d8c][0x0][_0x5056('0x14')],'exten':_0x502fa8[_0x592d8c][0x0][_0x5056('0x9')],'priority':_0x23d65e[_0x5056('0xe')]++,'VoiceExtensionId':_0x502fa8[_0x592d8c][0x0]['VoiceExtensionId']});for(var _0x3f943c=0x0,_0x33add1=0x0;_0x3f943c<_0x502fa8[_0x592d8c][_0x5056('0x27')];_0x3f943c+=0x1,_0x33add1=0x0){var _0x4c9df6=_0x502fa8[_0x592d8c][_0x3f943c];if(_0x4c9df6[_0x5056('0x12')]){_0x4c9df6['type']=_0x4c9df6[_0x5056('0x12')][_0x5056('0x28')]();}var _0x7a7bdc=[];var _0x3f5b3c=[];delete _0x4c9df6['id'];delete _0x4c9df6[_0x5056('0x29')];delete _0x4c9df6[_0x5056('0x2a')];var _0x266148=_0x4c9df6[_0x5056('0x2b')]!=='*,*,*,*'?[_0x4c9df6[_0x5056('0x2b')]]:_0x4c9df6[_0x5056('0x7')]?_[_0x5056('0x8')](_[_0x5056('0xa')](_0x23d65e[_0x5056('0x4')],{'IntervalId':_0x4c9df6['IntervalId']}),_0x5056('0x2b')):[];if(_0x4c9df6['hasOwnProperty'](_0x5056('0x2c'))){if(_0x4c9df6[_0x5056('0x2c')]&&_0x4c9df6[_0x5056('0x2c')]!=='--'){_0x7a7bdc[_0x5056('0x11')]({'type':_0x4c9df6[_0x5056('0x12')],'app':_0x5056('0x16'),'appdata':_0x5056('0x2d')+_0x4c9df6[_0x5056('0x2c')],'context':_0x4c9df6[_0x5056('0x14')],'exten':_0x4c9df6[_0x5056('0x9')],'priority':_0x266148['length']+_0x23d65e[_0x5056('0xe')]+_0x33add1++,'VoiceExtensionId':_0x4c9df6[_0x5056('0x15')]});}}if(_0x4c9df6[_0x5056('0x12')]===_0x5056('0x18')&&_0x4c9df6[_0x5056('0xd')](_0x5056('0x2e'))){if(_0x4c9df6['callerID']){_0x7a7bdc[_0x5056('0x11')]({'type':_0x4c9df6[_0x5056('0x12')],'app':_0x5056('0x1c'),'appdata':_0x5056('0x2f')+_0x4c9df6['callerID']+')','context':_0x4c9df6[_0x5056('0x14')],'exten':_0x4c9df6[_0x5056('0x9')],'priority':_0x266148[_0x5056('0x27')]+_0x23d65e[_0x5056('0xe')]+_0x33add1++,'VoiceExtensionId':_0x4c9df6[_0x5056('0x15')]});}else{_0x7a7bdc['push']({'type':_0x4c9df6[_0x5056('0x12')],'app':_0x5056('0x1c'),'appdata':_0x5056('0x30'),'context':_0x4c9df6['context'],'exten':_0x4c9df6[_0x5056('0x9')],'priority':_0x266148[_0x5056('0x27')]+_0x23d65e['priority']+_0x33add1++,'VoiceExtensionId':_0x4c9df6[_0x5056('0x15')]});}}if(_0x4c9df6[_0x5056('0xd')]('answer')){if(_0x25e94d[_0x5056('0x31')](_0x4c9df6[_0x5056('0x32')][_0x5056('0x28')]())>=0x0&&_0x4c9df6['appType']!==_0x5056('0x33')){if(_0x4c9df6[_0x5056('0x34')]){_0x7a7bdc[_0x5056('0x11')]({'type':_0x4c9df6[_0x5056('0x12')],'app':'ExecIf','appdata':'$[${XCALLY-MOTION-ANSWER}=0]?Answer','context':_0x4c9df6[_0x5056('0x14')],'exten':_0x4c9df6[_0x5056('0x9')],'priority':_0x266148[_0x5056('0x27')]+_0x23d65e['priority']+_0x33add1++,'VoiceExtensionId':_0x4c9df6['VoiceExtensionId']});_0x7a7bdc['push']({'type':_0x4c9df6[_0x5056('0x12')],'app':_0x5056('0x16'),'appdata':_0x5056('0x35'),'context':_0x4c9df6[_0x5056('0x14')],'exten':_0x4c9df6[_0x5056('0x9')],'priority':_0x266148[_0x5056('0x27')]+_0x23d65e['priority']+_0x33add1++,'VoiceExtensionId':_0x4c9df6['VoiceExtensionId']});}else{_0x7a7bdc[_0x5056('0x11')]({'type':_0x4c9df6[_0x5056('0x12')],'app':_0x5056('0x1c'),'appdata':_0x5056('0x36'),'context':_0x4c9df6['context'],'exten':_0x4c9df6['exten'],'priority':_0x266148['length']+_0x23d65e[_0x5056('0xe')]+_0x33add1++,'VoiceExtensionId':_0x4c9df6['VoiceExtensionId']});_0x7a7bdc[_0x5056('0x11')]({'type':_0x4c9df6[_0x5056('0x12')],'app':'Set','appdata':_0x5056('0x37'),'context':_0x4c9df6['context'],'exten':_0x4c9df6[_0x5056('0x9')],'priority':_0x266148[_0x5056('0x27')]+_0x23d65e['priority']+_0x33add1++,'VoiceExtensionId':_0x4c9df6['VoiceExtensionId']});}}}for(var _0x2e70fb=0x0;_0x2e70fb<_0x266148[_0x5056('0x27')];_0x2e70fb+=0x1){var _0x26056d=_0x23d65e[_0x5056('0xe')]+_0x266148[_0x5056('0x27')];var _0x37c264=_0x2e70fb===_0x266148['length']-0x1?_0x23d65e[_0x5056('0xe')]+_0x7a7bdc[_0x5056('0x27')]+_0x3f5b3c[_0x5056('0x27')]+0x2:_0x23d65e[_0x5056('0xe')]+_0x2e70fb+0x1;_0x7a7bdc[_0x5056('0x38')](_0x2e70fb,0x0,{'type':_0x4c9df6[_0x5056('0x12')],'app':'GotoIfTime','appdata':_0x266148[_0x2e70fb]+'?'+_0x4c9df6[_0x5056('0x14')]+',${EXTEN},'+_0x26056d+':'+_0x4c9df6[_0x5056('0x14')]+_0x5056('0x39')+_0x37c264,'exten':_0x4c9df6[_0x5056('0x9')],'context':_0x4c9df6[_0x5056('0x14')],'priority':_0x23d65e[_0x5056('0xe')]+_0x2e70fb,'VoiceExtensionId':_0x502fa8[_0x592d8c][0x0][_0x5056('0x15')]});}_0x4c9df6[_0x5056('0xe')]=_0x7a7bdc[_0x5056('0x27')]?_[_0x5056('0x3a')](_0x7a7bdc)['priority']+0x1:_0x23d65e['priority'];_0x23d65e[_0x5056('0xe')]=(_0x3f5b3c['length']?_[_0x5056('0x3a')](_0x3f5b3c)[_0x5056('0xe')]:_0x4c9df6[_0x5056('0xe')])+0x1;_0x23d65e[_0x5056('0xf')]=_[_0x5056('0x3b')](_0x23d65e[_0x5056('0xf')],_0x7a7bdc,[_0x4c9df6],_0x3f5b3c);}_0x23d65e['extensions'][_0x5056('0x11')]({'type':_0x502fa8[_0x592d8c][0x0][_0x5056('0x12')],'app':'Hangup','exten':_0x502fa8[_0x592d8c][0x0][_0x5056('0x9')],'context':_0x502fa8[_0x592d8c][0x0][_0x5056('0x14')],'priority':_0x23d65e[_0x5056('0xe')],'VoiceExtensionId':_0x502fa8[_0x592d8c][0x0][_0x5056('0x15')]});_0x2cc4d6[_0x5056('0x11')](_0x502fa8[_0x592d8c][0x0][_0x5056('0x15')]);_0x2333ab=_[_0x5056('0x3b')](_0x2333ab,_0x23d65e[_0x5056('0xf')]);}}return _0x1ed3c7[_0x5056('0x3c')](function(_0x271baf){return _0x1ed3c7['models'][_0x5056('0x5')][_0x5056('0x3d')]({'where':{'VoiceExtensionId':{'$in':_0x2cc4d6}},'transaction':_0x271baf})[_0x5056('0x3')](function(_0x2bf12c){return _0x1ed3c7['models']['VoiceExtension'][_0x5056('0x3e')](_[_0x5056('0x3f')](_0x2333ab,_0x5056('0xe')),{'transaction':_0x271baf});});});})['catch'](function(_0x5de4dc){console[_0x5056('0x40')](_0x5de4dc);});}exports['rewrite']=rewrite; \ No newline at end of file diff --git a/server/components/import/cm/csv.js b/server/components/import/cm/csv.js index 2f4ab11..396d46b 100644 --- a/server/components/import/cm/csv.js +++ b/server/components/import/cm/csv.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x04b0=['cm_contacts','where','deletedAt\x20IS\x20NULL','ListId\x20=\x20?','phone\x20IS\x20NOT\x20NULL','id\x20IN\x20?','str','phone\x20NOT\x20IN\x20(?)','calleridnum','from','cm_hopper_final','\x20=\x20?','cm_hopper_black','VoiceQueue','findAll','outbound','dialCheckDuplicateType','CmList','Lists','get','always','sequelize','query','VoiceQueueId','BlackLists','onlyIfOpen','CampaignId','all','cmContact,\x20%s,\x20%s','generalCheckHopper','Error\x20processing\x20rows\x20block:','finally','emit','resume','contact:csv_','unlinkSync','exit','SIGINT','info','CSV\x20import\x20process\x20stopped!','resolve','parse','duplicate','pause','CSV\x20parse\x20error','stringify','util','lodash','papaparse','ioredis','../../../mysqldb','../../../config/logger','api','defaults','redis','localhost','../../../api/cmContact/cmContact.socket','register','argv','Missing\x20filepath\x20parameter!','undefined','null','Missing\x20binding\x20parameters!','zipObject','split','Missing\x20ListId\x20parameter!','Missing\x20socket_timestamp\x20parameter!','error','contact','index','isNil','The\x20row\x20is\x20empty\x20or\x20the\x20number\x20of\x20parameters\x20does\x20not\x20match\x20the\x20columns!','errors','length','map','join','hasOwnProperty','data','firstName\x20not\x20specified!','phone\x20not\x20specified!','birthDate','YYYY-MM-DD','isValid','birthDate\x20format\x20is\x20invalid,\x20YYYY-MM-DD\x20format\x20is\x20supported!','email','email\x20format\x20is\x20not\x20valid!','ListId','CompanyId','find','Duplicate\x20Contact','CmContact','create','keys','then','push','catch','Error\x20while\x20creating\x20contact:\x20','checkHopper','inspect','insert','into','cm_hopper','fromQuery','phone','scheduledAt','createdAt','updatedAt','select','field','ContactId','toString','NOW()'];(function(_0x44d9ab,_0x76bc69){var _0x31485e=function(_0x1e44ce){while(--_0x1e44ce){_0x44d9ab['push'](_0x44d9ab['shift']());}};_0x31485e(++_0x76bc69);}(_0x04b0,0x10e));var _0x004b=function(_0x178b65,_0x2b3a6c){_0x178b65=_0x178b65-0x0;var _0x5102c0=_0x04b0[_0x178b65];return _0x5102c0;};'use strict';var BPromise=require('bluebird');var util=require(_0x004b('0x0'));var _=require(_0x004b('0x1'));var fs=require('fs');var squel=require('squel');var Papa=require(_0x004b('0x2'));var Redis=require(_0x004b('0x3'));var db=require(_0x004b('0x4'))['db'];var config=require('../../../config/environment');var logger=require(_0x004b('0x5'))(_0x004b('0x6'));config['redis']=_[_0x004b('0x7')](config[_0x004b('0x8')],{'host':_0x004b('0x9'),'port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config[_0x004b('0x8')]));require(_0x004b('0xa'))[_0x004b('0xb')](socket);try{if(!process[_0x004b('0xc')][0x2]||process[_0x004b('0xc')][0x2]==='undefined'||process['argv'][0x2]==='null'){throw new Error(_0x004b('0xd'));}var FILEPATH=process[_0x004b('0xc')][0x2];if(!process['argv'][0x3]||process[_0x004b('0xc')][0x3]===_0x004b('0xe')||process[_0x004b('0xc')][0x3]===_0x004b('0xf')||!process['argv'][0x4]||process[_0x004b('0xc')][0x4]===_0x004b('0xe')||process['argv'][0x4]===_0x004b('0xf')){throw new Error(_0x004b('0x10'));}var FIELDS=_[_0x004b('0x11')](process['argv'][0x3][_0x004b('0x12')](','),process[_0x004b('0xc')][0x4][_0x004b('0x12')](','));if(!process['argv'][0x5]||process['argv'][0x5]===_0x004b('0xe')||process[_0x004b('0xc')][0x5]===_0x004b('0xf')){throw new Error(_0x004b('0x13'));}var LISTID=process[_0x004b('0xc')][0x5];var COMPANYID=process[_0x004b('0xc')][0x6]&&process[_0x004b('0xc')][0x6]!==_0x004b('0xe')&&process[_0x004b('0xc')][0x6]!==_0x004b('0xf')?process[_0x004b('0xc')][0x6]:null;var DUPLICATES=process[_0x004b('0xc')][0x7]&&process[_0x004b('0xc')][0x7]!==_0x004b('0xe')&&process[_0x004b('0xc')][0x7]!==_0x004b('0xf')?process[_0x004b('0xc')][0x7]:null;if(!process[_0x004b('0xc')][0x8]||process['argv'][0x8]===_0x004b('0xe')||process[_0x004b('0xc')][0x8]===_0x004b('0xf')){throw new Error(_0x004b('0x14'));}var SOCKET_TIMESTAMP=process[_0x004b('0xc')][0x8];}catch(_0x4a7690){logger[_0x004b('0x15')](_0x4a7690);endCsv();}var total=0x0;var pTotal=0x0;var success=0x0;var errors=0x0;var duplicates=0x0;var rows=[];var hopperContacts='';var promises=[];var index=0x0;var alreadyInvalid=![];function handleCheckRowError(_0x5c1264,_0x180789,_0x19e133,_0x382ab6){var _0x4898a6={'message':_0x180789};_0x4898a6[_0x5c1264]=!![];if(_0x19e133){_0x4898a6[_0x004b('0x16')]=_0x19e133;}if(_0x382ab6){_0x4898a6[_0x004b('0x17')]=_0x382ab6;}return _0x4898a6;}function isEmail(_0x328446){return/^([^\x00-\x20\x22\x28\x29\x2c\x2e\x3a-\x3c\x3e\x40\x5b-\x5d\x7f-\xff]+|\x22([^\x0d\x22\x5c\x80-\xff]|\x5c[\x00-\x7f])*\x22)(\x2e([^\x00-\x20\x22\x28\x29\x2c\x2e\x3a-\x3c\x3e\x40\x5b-\x5d\x7f-\xff]+|\x22([^\x0d\x22\x5c\x80-\xff]|\x5c[\x00-\x7f])*\x22))*\x40([^\x00-\x20\x22\x28\x29\x2c\x2e\x3a-\x3c\x3e\x40\x5b-\x5d\x7f-\xff]+|\x5b([^\x0d\x5b-\x5d\x80-\xff]|\x5c[\x00-\x7f])*\x5d)(\x2e([^\x00-\x20\x22\x28\x29\x2c\x2e\x3a-\x3c\x3e\x40\x5b-\x5d\x7f-\xff]+|\x5b([^\x0d\x5b-\x5d\x80-\xff]|\x5c[\x00-\x7f])*\x5d))*$/['test'](_0x328446);}function checkRow(_0x387e,_0x2943bb,_0x5a8a04){return new BPromise(function(_0x129b3e,_0x335382){if(_[_0x004b('0x18')](_0x387e)){return _0x335382(handleCheckRowError(_0x004b('0x15'),_0x004b('0x19'),null,_0x5a8a04));}if(_0x387e[_0x004b('0x1a')]&&_0x387e[_0x004b('0x1a')][_0x004b('0x1b')]){var _0x2e8d38=_[_0x004b('0x1c')](_0x387e['errors'],'message')[_0x004b('0x1d')](';');return _0x335382(handleCheckRowError(_0x004b('0x15'),_0x2e8d38,null,_0x5a8a04));}var _0x53681f={};for(var _0x34b23f in FIELDS){if(FIELDS[_0x004b('0x1e')](_0x34b23f)&&FIELDS[_0x34b23f]){_0x53681f[_0x34b23f]=_0x387e[_0x004b('0x1f')][0x0][FIELDS[_0x34b23f]]||_0x387e['data'][0x0]['\ufeff'+FIELDS[_0x34b23f]];}}if(!_0x53681f['firstName']){return _0x335382(handleCheckRowError('error',_0x004b('0x20'),null,_0x5a8a04));}if(!_0x53681f['phone']){return _0x335382(handleCheckRowError('error',_0x004b('0x21'),null,_0x5a8a04));}if(_0x53681f[_0x004b('0x22')]){var _0x3f5546=moment(_0x53681f['birthDate'],_0x004b('0x23'));if(!_0x3f5546[_0x004b('0x24')]()){return _0x335382(handleCheckRowError(_0x004b('0x15'),_0x004b('0x25'),null,_0x5a8a04));}}if(_0x53681f['email']){if(!isEmail(_0x53681f[_0x004b('0x26')])){return _0x335382(handleCheckRowError(_0x004b('0x15'),_0x004b('0x27'),null,_0x5a8a04));}}_0x53681f[_0x004b('0x28')]=LISTID;_0x53681f[_0x004b('0x29')]=COMPANYID||undefined;if(DUPLICATES&&DUPLICATES[_0x004b('0x1b')]&&_0x2943bb){var _0x409666={};for(var _0x2e659a=0x0,_0x2cfef0=DUPLICATES[_0x004b('0x1b')];_0x2e659a<_0x2cfef0;_0x2e659a+=0x1){_0x409666[DUPLICATES[_0x2e659a]]=_0x53681f[DUPLICATES[_0x2e659a]];}var _0x229a23=_[_0x004b('0x2a')](_0x2943bb,_0x409666);if(_0x229a23){return _0x335382(handleCheckRowError('duplicate',_0x004b('0x2b'),_0x229a23,_0x5a8a04));}}return db[_0x004b('0x2c')][_0x004b('0x2d')](_0x53681f,{'raw':!![],'hooks':![],'fields':_[_0x004b('0x2e')](_0x53681f)})[_0x004b('0x2f')](function(_0x5db42a){if(DUPLICATES&&DUPLICATES[_0x004b('0x1b')]&&_0x2943bb){_0x2943bb[_0x004b('0x30')](_['pick'](_0x53681f,DUPLICATES));}hopperContacts+=(hopperContacts?',':'')+_0x5db42a['id'];return _0x129b3e();})[_0x004b('0x31')](function(_0x5bddf1){return _0x335382(handleCheckRowError(_0x004b('0x15'),_0x004b('0x32')+(_0x5bddf1['message']||JSON['stringify'](_0x5bddf1)),null,_0x5a8a04));});});}function checkHopper(){function _0x3bcd37(){return function(_0x5081c7){logger[_0x004b('0x15')]('cmContact',_0x004b('0x33'),util[_0x004b('0x34')](_0x5081c7,{'showHidden':![],'depth':null}));};}var _0x13bc33=function(_0xea4a13,_0x1857eb){var _0x383381=squel[_0x004b('0x35')]()[_0x004b('0x36')](_0x004b('0x37'))[_0x004b('0x38')]([_0x004b('0x39'),_0x004b('0x3a'),'ContactId',_0x004b('0x28'),_0x1857eb,_0x004b('0x3b'),_0x004b('0x3c')],squel[_0x004b('0x3d')]()['field']('phone',_0x004b('0x39'))[_0x004b('0x3e')]('NOW()',_0x004b('0x3a'))['field']('id',_0x004b('0x3f'))[_0x004b('0x3e')](LISTID[_0x004b('0x40')](),'ListId')[_0x004b('0x3e')](_0xea4a13['id'][_0x004b('0x40')](),_0x1857eb)[_0x004b('0x3e')]('NOW()',_0x004b('0x3b'))[_0x004b('0x3e')](_0x004b('0x41'),_0x004b('0x3c'))['from'](_0x004b('0x42'))[_0x004b('0x43')](_0x004b('0x44'))[_0x004b('0x43')](_0x004b('0x45'),LISTID[_0x004b('0x40')]())[_0x004b('0x43')](_0x004b('0x46'))[_0x004b('0x43')]('phone\x20NOT\x20IN\x20(?)',squel[_0x004b('0x3d')]()['field'](_0x004b('0x39'))['from'](_0x004b('0x37'))[_0x004b('0x43')](_0x1857eb+'\x20=\x20?',_0xea4a13['id']['toString']())))[_0x004b('0x40')]();return _0x383381;};var _0x1f7412=function(_0xcba2ca,_0x1d4b3c){var _0x1c9210=squel[_0x004b('0x35')]()['into']('cm_hopper')[_0x004b('0x38')]([_0x004b('0x39'),_0x004b('0x3a'),_0x004b('0x3f'),_0x004b('0x28'),_0x1d4b3c,_0x004b('0x3b'),_0x004b('0x3c')],squel[_0x004b('0x3d')]()[_0x004b('0x3e')](_0x004b('0x39'),_0x004b('0x39'))['field'](_0x004b('0x41'),_0x004b('0x3a'))['field']('id',_0x004b('0x3f'))['field'](LISTID[_0x004b('0x40')](),_0x004b('0x28'))[_0x004b('0x3e')](_0xcba2ca['id'][_0x004b('0x40')](),_0x1d4b3c)[_0x004b('0x3e')]('NOW()',_0x004b('0x3b'))[_0x004b('0x3e')]('NOW()',_0x004b('0x3c'))['from'](_0x004b('0x42'))[_0x004b('0x43')](_0x004b('0x44'))['where']('ListId\x20=\x20?',LISTID[_0x004b('0x40')]())[_0x004b('0x43')](_0x004b('0x47'),squel[_0x004b('0x48')](hopperContacts))[_0x004b('0x43')](_0x004b('0x46'))['where'](_0x004b('0x49'),squel[_0x004b('0x3d')]()['field'](_0x004b('0x4a'))[_0x004b('0x4b')](_0x004b('0x4c'))[_0x004b('0x43')](_0x1d4b3c+'\x20=\x20?',_0xcba2ca['id']['toString']()))['where']('phone\x20NOT\x20IN\x20(?)',squel['select']()['field'](_0x004b('0x39'))[_0x004b('0x4b')](_0x004b('0x37'))['where'](_0x1d4b3c+_0x004b('0x4d'),_0xcba2ca['id']['toString']())))['toString']();return _0x1c9210;};function _0x47ed56(_0x3ac3f7,_0xc82332){var _0x49c712=squel['insert']()[_0x004b('0x36')](_0x004b('0x37'))[_0x004b('0x38')](['phone',_0x004b('0x3a'),_0x004b('0x3f'),_0x004b('0x28'),_0xc82332,'createdAt',_0x004b('0x3c')],squel[_0x004b('0x3d')]()['field'](_0x004b('0x39'),_0x004b('0x39'))[_0x004b('0x3e')](_0x004b('0x41'),_0x004b('0x3a'))['field']('id',_0x004b('0x3f'))[_0x004b('0x3e')](LISTID['toString'](),_0x004b('0x28'))[_0x004b('0x3e')](_0x3ac3f7['id'][_0x004b('0x40')](),_0xc82332)[_0x004b('0x3e')](_0x004b('0x41'),_0x004b('0x3b'))['field'](_0x004b('0x41'),_0x004b('0x3c'))[_0x004b('0x4b')](_0x004b('0x42'))[_0x004b('0x43')]('deletedAt\x20IS\x20NULL')[_0x004b('0x43')](_0x004b('0x45'),LISTID[_0x004b('0x40')]())['where'](_0x004b('0x47'),squel[_0x004b('0x48')](hopperContacts))[_0x004b('0x43')](_0x004b('0x46')))[_0x004b('0x40')]();return _0x49c712;}function _0xc3c15e(_0xe12000,_0x4899fc){var _0x2e52fc=squel[_0x004b('0x35')]()[_0x004b('0x36')](_0x004b('0x4e'))[_0x004b('0x38')]([_0x004b('0x39'),'ContactId','ListId',_0x4899fc,_0x004b('0x3b'),_0x004b('0x3c')],squel['select']()[_0x004b('0x3e')](_0x004b('0x39'),_0x004b('0x39'))[_0x004b('0x3e')]('id','ContactId')[_0x004b('0x3e')](LISTID[_0x004b('0x40')](),_0x004b('0x28'))[_0x004b('0x3e')](_0xe12000['id'][_0x004b('0x40')](),_0x4899fc)[_0x004b('0x3e')](_0x004b('0x41'),'createdAt')['field'](_0x004b('0x41'),_0x004b('0x3c'))[_0x004b('0x4b')](_0x004b('0x42'))[_0x004b('0x43')]('deletedAt\x20IS\x20NULL')[_0x004b('0x43')](_0x004b('0x45'),LISTID[_0x004b('0x40')]())['where']('id\x20IN\x20?',squel[_0x004b('0x48')](hopperContacts))[_0x004b('0x43')](_0x004b('0x46')))['toString']();return _0x2e52fc;}return db[_0x004b('0x4f')][_0x004b('0x50')]({'where':{'type':_0x004b('0x51')},'attributes':['id',_0x004b('0x52')],'include':[{'model':db[_0x004b('0x53')],'as':_0x004b('0x54'),'where':{'id':LISTID}}]})['then'](function(_0xf209bd){var _0x1555b1=[];if(_0xf209bd){var _0x4c85bb;for(var _0x260976=0x0,_0x47f0ad;_0x260976<_0xf209bd['length'];_0x260976+=0x1){_0x47f0ad=_0xf209bd[_0x260976][_0x004b('0x55')]({'plain':!![]});switch(_0x47f0ad['dialCheckDuplicateType']){case _0x004b('0x56'):_0x1555b1[_0x004b('0x30')](db[_0x004b('0x57')][_0x004b('0x58')](_0x1f7412(_0x47f0ad,_0x004b('0x59')))[_0x004b('0x2f')](function(){})[_0x004b('0x31')](_0x3bcd37()));break;case'onlyIfOpen':_0x1555b1[_0x004b('0x30')](db[_0x004b('0x57')][_0x004b('0x58')](_0x13bc33(_0x47f0ad,_0x004b('0x59')))[_0x004b('0x2f')](function(){})[_0x004b('0x31')](_0x3bcd37()));break;default:_0x1555b1[_0x004b('0x30')](db['sequelize'][_0x004b('0x58')](_0x47ed56(_0x47f0ad,'VoiceQueueId'))[_0x004b('0x2f')](function(){})['catch'](_0x3bcd37()));}}}return _0x1555b1;})['all']()[_0x004b('0x2f')](function(){return db[_0x004b('0x4f')][_0x004b('0x50')]({'where':{'type':'outbound'},'attributes':['id'],'include':[{'model':db[_0x004b('0x53')],'as':_0x004b('0x5a'),'where':{'id':LISTID}}]})[_0x004b('0x2f')](function(_0x2aff34){var _0x58cfe1=[];if(_0x2aff34){var _0x272fd1;for(var _0x1b5a97=0x0,_0x29c849;_0x1b5a97<_0x2aff34[_0x004b('0x1b')];_0x1b5a97+=0x1){_0x29c849=_0x2aff34[_0x1b5a97][_0x004b('0x55')]({'plain':!![]});_0x58cfe1['push'](db[_0x004b('0x57')]['query'](_0xc3c15e(_0x29c849,_0x004b('0x59')))[_0x004b('0x2f')](function(){})['catch'](_0x3bcd37()));}}return _0x58cfe1;})['all']();})[_0x004b('0x2f')](function(){return db['Campaign']['findAll']({'attributes':['id','dialCheckDuplicateType'],'include':[{'model':db[_0x004b('0x53')],'as':_0x004b('0x54'),'where':{'id':LISTID}}]})[_0x004b('0x2f')](function(_0x4cb9b6){var _0x13c645=[];if(_0x4cb9b6){for(var _0x101753=0x0,_0x53cc4b;_0x101753<_0x4cb9b6[_0x004b('0x1b')];_0x101753+=0x1){_0x53cc4b=_0x4cb9b6[_0x101753]['get']({'plain':!![]});switch(_0x53cc4b[_0x004b('0x52')]){case'always':_0x13c645[_0x004b('0x30')](db['sequelize'][_0x004b('0x58')](_0x1f7412(_0x53cc4b,'CampaignId'))['then'](function(){})['catch'](_0x3bcd37()));break;case _0x004b('0x5b'):_0x13c645[_0x004b('0x30')](db['sequelize']['query'](_0x13bc33(_0x53cc4b,'CampaignId'))[_0x004b('0x2f')](function(){})[_0x004b('0x31')](_0x3bcd37()));break;default:_0x13c645[_0x004b('0x30')](db[_0x004b('0x57')][_0x004b('0x58')](_0x47ed56(_0x53cc4b,_0x004b('0x5c')))[_0x004b('0x2f')](function(){})[_0x004b('0x31')](_0x3bcd37()));}}}return _0x13c645;})[_0x004b('0x5d')]();})[_0x004b('0x2f')](function(){return db['Campaign'][_0x004b('0x50')]({'attributes':['id'],'include':[{'model':db[_0x004b('0x53')],'as':_0x004b('0x5a'),'where':{'id':LISTID}}]})[_0x004b('0x2f')](function(_0x5872d8){var _0x34feb6=[];if(_0x5872d8){for(var _0x19743a=0x0,_0x2ad11c;_0x19743a<_0x5872d8[_0x004b('0x1b')];_0x19743a+=0x1){_0x2ad11c=_0x5872d8[_0x19743a][_0x004b('0x55')]({'plain':!![]});_0x34feb6[_0x004b('0x30')](db[_0x004b('0x57')][_0x004b('0x58')](_0xc3c15e(_0x2ad11c,_0x004b('0x5c')))['then'](function(){})[_0x004b('0x31')](_0x3bcd37()));}}return _0x34feb6;})['all']();})[_0x004b('0x31')](function(_0x12911f){logger['error'](_0x004b('0x5e'),_0x004b('0x5f'),_0x12911f['message']);});}var processPromises=function(_0x5e08c3){return BPromise['all'](promises)[_0x004b('0x2f')](function(_0x192177){})[_0x004b('0x31')](function(_0x4ceee0){logger['error'](_0x004b('0x60'),JSON['stringify'](_0x4ceee0));})[_0x004b('0x61')](function(){socket[_0x004b('0x62')]('contact:csv_'+SOCKET_TIMESTAMP,{'success':success,'errors':errors,'duplicates':duplicates,'rows':rows});promises=[];success=0x0;errors=0x0;duplicates=0x0;rows=[];if(_0x5e08c3){return _0x5e08c3[_0x004b('0x63')]();}});};var endCsv=function(){return BPromise['resolve']()[_0x004b('0x2f')](function(){if(hopperContacts){return checkHopper();}})[_0x004b('0x2f')](function(){socket[_0x004b('0x62')](_0x004b('0x64')+SOCKET_TIMESTAMP,{'finished':!![],'success':success,'errors':errors,'duplicates':duplicates,'rows':rows});try{fs[_0x004b('0x65')](FILEPATH);}catch(_0x335cdf){logger[_0x004b('0x15')]('Unable\x20to\x20delete\x20temp\x20file:',JSON['stringify'](_0x335cdf));}finally{process[_0x004b('0x66')](0x0);}});};process['on'](_0x004b('0x67'),function(){logger[_0x004b('0x68')](_0x004b('0x69'));endCsv();});function main(){return BPromise[_0x004b('0x6a')]()['then'](function(){if(DUPLICATES){DUPLICATES=DUPLICATES[_0x004b('0x12')](',');return db[_0x004b('0x2c')][_0x004b('0x50')]({'where':{'ListId':LISTID},'attributes':DUPLICATES,'raw':!![]});}})[_0x004b('0x2f')](function(_0xf0e016){var _0xfeb879=fs['createReadStream'](FILEPATH,{'highWaterMark':0xf*0x400*0x400});Papa[_0x004b('0x6b')](_0xfeb879,{'header':!![],'skipEmptyLines':!![],'step':function(_0x57711d,_0x14bc93){total+=0x1;var _0x2a0a92=total;promises[_0x004b('0x30')](checkRow(_0x57711d,_0xf0e016,_0x2a0a92)[_0x004b('0x2f')](function(){success+=0x1;})[_0x004b('0x31')](function(_0xc743a7){if(_0xc743a7[_0x004b('0x15')]){errors+=0x1;delete _0xc743a7[_0x004b('0x15')];}else if(_0xc743a7[_0x004b('0x6c')]){duplicates+=0x1;delete _0xc743a7[_0x004b('0x6c')];}rows[_0x004b('0x30')](_0xc743a7);}));if(total%0xc8===0x0){_0x14bc93[_0x004b('0x6d')]();return processPromises(_0x14bc93);}},'complete':function(){return processPromises()[_0x004b('0x2f')](function(){logger[_0x004b('0x68')]('CSV\x20parsed\x20correctly!');endCsv();});},'error':function(_0x5a19a9,_0x279d91){logger[_0x004b('0x68')](_0x004b('0x6e'),JSON[_0x004b('0x6f')](_0x5a19a9));endCsv();}});})[_0x004b('0x31')](function(_0x17ebe0){logger['error']('Error\x20executing\x20contact\x20csv\x20import:',JSON[_0x004b('0x6f')](_0x17ebe0));});}main(); \ No newline at end of file +var _0x6c32=['BlackLists','Campaign','CampaignId','cmContact,\x20%s,\x20%s','generalCheckHopper','Error\x20processing\x20rows\x20block:','finally','contact:csv_','resume','resolve','emit','unlinkSync','Unable\x20to\x20delete\x20temp\x20file:','exit','SIGINT','info','parse','pause','CSV\x20parsed\x20correctly!','Error\x20executing\x20contact\x20csv\x20import:','bluebird','util','lodash','papaparse','../../../mysqldb','../../../config/logger','api','redis','localhost','socket.io-emitter','argv','undefined','null','Missing\x20binding\x20parameters!','zipObject','split','Missing\x20ListId\x20parameter!','Missing\x20socket_timestamp\x20parameter!','error','contact','test','isNil','The\x20row\x20is\x20empty\x20or\x20the\x20number\x20of\x20parameters\x20does\x20not\x20match\x20the\x20columns!','errors','map','message','join','hasOwnProperty','data','firstName','phone','phone\x20not\x20specified!','birthDate','YYYY-MM-DD','isValid','email\x20format\x20is\x20not\x20valid!','ListId','length','find','duplicate','Duplicate\x20Contact','CmContact','create','Error\x20while\x20creating\x20contact:\x20','stringify','cmContact','checkHopper','inspect','insert','into','fromQuery','scheduledAt','createdAt','updatedAt','field','NOW()','ContactId','toString','cm_contacts','where','deletedAt\x20IS\x20NULL','ListId\x20=\x20?','phone\x20IS\x20NOT\x20NULL','phone\x20NOT\x20IN\x20(?)','select','from','cm_hopper','\x20=\x20?','id\x20IN\x20?','str','calleridnum','cm_hopper_final','cm_hopper_black','findAll','outbound','dialCheckDuplicateType','CmList','Lists','then','get','always','push','query','catch','onlyIfOpen','sequelize','VoiceQueueId','all','VoiceQueue'];(function(_0x3512b2,_0x2cb54a){var _0x16c6e8=function(_0x1698d4){while(--_0x1698d4){_0x3512b2['push'](_0x3512b2['shift']());}};_0x16c6e8(++_0x2cb54a);}(_0x6c32,0x81));var _0x26c3=function(_0x20a584,_0xe384a5){_0x20a584=_0x20a584-0x0;var _0x4b41a8=_0x6c32[_0x20a584];return _0x4b41a8;};'use strict';var BPromise=require(_0x26c3('0x0'));var util=require(_0x26c3('0x1'));var _=require(_0x26c3('0x2'));var fs=require('fs');var squel=require('squel');var Papa=require(_0x26c3('0x3'));var Redis=require('ioredis');var db=require(_0x26c3('0x4'))['db'];var config=require('../../../config/environment');var logger=require(_0x26c3('0x5'))(_0x26c3('0x6'));config[_0x26c3('0x7')]=_['defaults'](config[_0x26c3('0x7')],{'host':_0x26c3('0x8'),'port':0x18eb});var socket=require(_0x26c3('0x9'))(new Redis(config[_0x26c3('0x7')]));require('../../../api/cmContact/cmContact.socket')['register'](socket);try{if(!process[_0x26c3('0xa')][0x2]||process['argv'][0x2]===_0x26c3('0xb')||process[_0x26c3('0xa')][0x2]===_0x26c3('0xc')){throw new Error('Missing\x20filepath\x20parameter!');}var FILEPATH=process[_0x26c3('0xa')][0x2];if(!process[_0x26c3('0xa')][0x3]||process['argv'][0x3]===_0x26c3('0xb')||process[_0x26c3('0xa')][0x3]===_0x26c3('0xc')||!process['argv'][0x4]||process[_0x26c3('0xa')][0x4]===_0x26c3('0xb')||process[_0x26c3('0xa')][0x4]===_0x26c3('0xc')){throw new Error(_0x26c3('0xd'));}var FIELDS=_[_0x26c3('0xe')](process[_0x26c3('0xa')][0x3]['split'](','),process['argv'][0x4][_0x26c3('0xf')](','));if(!process['argv'][0x5]||process['argv'][0x5]===_0x26c3('0xb')||process['argv'][0x5]===_0x26c3('0xc')){throw new Error(_0x26c3('0x10'));}var LISTID=process[_0x26c3('0xa')][0x5];var COMPANYID=process[_0x26c3('0xa')][0x6]&&process[_0x26c3('0xa')][0x6]!=='undefined'&&process[_0x26c3('0xa')][0x6]!==_0x26c3('0xc')?process['argv'][0x6]:null;var DUPLICATES=process[_0x26c3('0xa')][0x7]&&process[_0x26c3('0xa')][0x7]!=='undefined'&&process[_0x26c3('0xa')][0x7]!==_0x26c3('0xc')?process['argv'][0x7]:null;if(!process['argv'][0x8]||process[_0x26c3('0xa')][0x8]===_0x26c3('0xb')||process[_0x26c3('0xa')][0x8]==='null'){throw new Error(_0x26c3('0x11'));}var SOCKET_TIMESTAMP=process[_0x26c3('0xa')][0x8];}catch(_0x4d7fe3){logger[_0x26c3('0x12')](_0x4d7fe3);endCsv();}var total=0x0;var pTotal=0x0;var success=0x0;var errors=0x0;var duplicates=0x0;var rows=[];var hopperContacts='';var promises=[];var index=0x0;var alreadyInvalid=![];function handleCheckRowError(_0x3549da,_0x58cfc2,_0x37d8fa,_0x58e84c){var _0x24c39f={'message':_0x58cfc2};_0x24c39f[_0x3549da]=!![];if(_0x37d8fa){_0x24c39f[_0x26c3('0x13')]=_0x37d8fa;}if(_0x58e84c){_0x24c39f['index']=_0x58e84c;}return _0x24c39f;}function isEmail(_0x4acad8){return/^([^\x00-\x20\x22\x28\x29\x2c\x2e\x3a-\x3c\x3e\x40\x5b-\x5d\x7f-\xff]+|\x22([^\x0d\x22\x5c\x80-\xff]|\x5c[\x00-\x7f])*\x22)(\x2e([^\x00-\x20\x22\x28\x29\x2c\x2e\x3a-\x3c\x3e\x40\x5b-\x5d\x7f-\xff]+|\x22([^\x0d\x22\x5c\x80-\xff]|\x5c[\x00-\x7f])*\x22))*\x40([^\x00-\x20\x22\x28\x29\x2c\x2e\x3a-\x3c\x3e\x40\x5b-\x5d\x7f-\xff]+|\x5b([^\x0d\x5b-\x5d\x80-\xff]|\x5c[\x00-\x7f])*\x5d)(\x2e([^\x00-\x20\x22\x28\x29\x2c\x2e\x3a-\x3c\x3e\x40\x5b-\x5d\x7f-\xff]+|\x5b([^\x0d\x5b-\x5d\x80-\xff]|\x5c[\x00-\x7f])*\x5d))*$/[_0x26c3('0x14')](_0x4acad8);}function checkRow(_0x14d40f,_0x2c5f57,_0x1fc571){return new BPromise(function(_0x3e531,_0x49ed09){if(_[_0x26c3('0x15')](_0x14d40f)){return _0x49ed09(handleCheckRowError(_0x26c3('0x12'),_0x26c3('0x16'),null,_0x1fc571));}if(_0x14d40f[_0x26c3('0x17')]&&_0x14d40f[_0x26c3('0x17')]['length']){var _0x4053af=_[_0x26c3('0x18')](_0x14d40f['errors'],_0x26c3('0x19'))[_0x26c3('0x1a')](';');return _0x49ed09(handleCheckRowError('error',_0x4053af,null,_0x1fc571));}var _0x1dc803={};for(var _0x5ab8ed in FIELDS){if(FIELDS[_0x26c3('0x1b')](_0x5ab8ed)&&FIELDS[_0x5ab8ed]){_0x1dc803[_0x5ab8ed]=_0x14d40f['data'][0x0][FIELDS[_0x5ab8ed]]||_0x14d40f[_0x26c3('0x1c')][0x0]['\ufeff'+FIELDS[_0x5ab8ed]];}}if(!_0x1dc803[_0x26c3('0x1d')]){return _0x49ed09(handleCheckRowError('error','firstName\x20not\x20specified!',null,_0x1fc571));}if(!_0x1dc803[_0x26c3('0x1e')]){return _0x49ed09(handleCheckRowError(_0x26c3('0x12'),_0x26c3('0x1f'),null,_0x1fc571));}if(_0x1dc803[_0x26c3('0x20')]){var _0x1215e5=moment(_0x1dc803[_0x26c3('0x20')],_0x26c3('0x21'));if(!_0x1215e5[_0x26c3('0x22')]()){return _0x49ed09(handleCheckRowError(_0x26c3('0x12'),'birthDate\x20format\x20is\x20invalid,\x20YYYY-MM-DD\x20format\x20is\x20supported!',null,_0x1fc571));}}if(_0x1dc803['email']){if(!isEmail(_0x1dc803['email'])){return _0x49ed09(handleCheckRowError(_0x26c3('0x12'),_0x26c3('0x23'),null,_0x1fc571));}}_0x1dc803[_0x26c3('0x24')]=LISTID;_0x1dc803['CompanyId']=COMPANYID||undefined;if(DUPLICATES&&DUPLICATES[_0x26c3('0x25')]&&_0x2c5f57){var _0x23dbc1={};for(var _0x39b9a3=0x0,_0x465f20=DUPLICATES[_0x26c3('0x25')];_0x39b9a3<_0x465f20;_0x39b9a3+=0x1){_0x23dbc1[DUPLICATES[_0x39b9a3]]=_0x1dc803[DUPLICATES[_0x39b9a3]];}var _0x948e31=_[_0x26c3('0x26')](_0x2c5f57,_0x23dbc1);if(_0x948e31){return _0x49ed09(handleCheckRowError(_0x26c3('0x27'),_0x26c3('0x28'),_0x948e31,_0x1fc571));}}return db[_0x26c3('0x29')][_0x26c3('0x2a')](_0x1dc803,{'raw':!![],'hooks':![],'fields':_['keys'](_0x1dc803)})['then'](function(_0x3619d8){if(DUPLICATES&&DUPLICATES[_0x26c3('0x25')]&&_0x2c5f57){_0x2c5f57['push'](_['pick'](_0x1dc803,DUPLICATES));}hopperContacts+=(hopperContacts?',':'')+_0x3619d8['id'];return _0x3e531();})['catch'](function(_0x437c44){return _0x49ed09(handleCheckRowError('error',_0x26c3('0x2b')+(_0x437c44[_0x26c3('0x19')]||JSON[_0x26c3('0x2c')](_0x437c44)),null,_0x1fc571));});});}function checkHopper(){function _0x2a239f(){return function(_0x3d62ad){logger[_0x26c3('0x12')](_0x26c3('0x2d'),_0x26c3('0x2e'),util[_0x26c3('0x2f')](_0x3d62ad,{'showHidden':![],'depth':null}));};}var _0x59afa9=function(_0x386b5e,_0x58f5c2){var _0x1b2e4e=squel[_0x26c3('0x30')]()[_0x26c3('0x31')]('cm_hopper')[_0x26c3('0x32')]([_0x26c3('0x1e'),_0x26c3('0x33'),'ContactId',_0x26c3('0x24'),_0x58f5c2,_0x26c3('0x34'),_0x26c3('0x35')],squel['select']()[_0x26c3('0x36')](_0x26c3('0x1e'),_0x26c3('0x1e'))[_0x26c3('0x36')](_0x26c3('0x37'),_0x26c3('0x33'))[_0x26c3('0x36')]('id',_0x26c3('0x38'))[_0x26c3('0x36')](LISTID[_0x26c3('0x39')](),_0x26c3('0x24'))[_0x26c3('0x36')](_0x386b5e['id'][_0x26c3('0x39')](),_0x58f5c2)[_0x26c3('0x36')](_0x26c3('0x37'),_0x26c3('0x34'))['field']('NOW()',_0x26c3('0x35'))['from'](_0x26c3('0x3a'))[_0x26c3('0x3b')](_0x26c3('0x3c'))[_0x26c3('0x3b')](_0x26c3('0x3d'),LISTID[_0x26c3('0x39')]())[_0x26c3('0x3b')](_0x26c3('0x3e'))['where'](_0x26c3('0x3f'),squel[_0x26c3('0x40')]()[_0x26c3('0x36')]('phone')[_0x26c3('0x41')](_0x26c3('0x42'))[_0x26c3('0x3b')](_0x58f5c2+_0x26c3('0x43'),_0x386b5e['id'][_0x26c3('0x39')]())))[_0x26c3('0x39')]();return _0x1b2e4e;};var _0x3acae3=function(_0x55b7e0,_0x30f3a5){var _0x3ee0e2=squel['insert']()[_0x26c3('0x31')](_0x26c3('0x42'))[_0x26c3('0x32')](['phone',_0x26c3('0x33'),_0x26c3('0x38'),'ListId',_0x30f3a5,'createdAt',_0x26c3('0x35')],squel[_0x26c3('0x40')]()[_0x26c3('0x36')](_0x26c3('0x1e'),_0x26c3('0x1e'))['field']('NOW()',_0x26c3('0x33'))[_0x26c3('0x36')]('id',_0x26c3('0x38'))[_0x26c3('0x36')](LISTID[_0x26c3('0x39')](),_0x26c3('0x24'))[_0x26c3('0x36')](_0x55b7e0['id'][_0x26c3('0x39')](),_0x30f3a5)['field'](_0x26c3('0x37'),_0x26c3('0x34'))[_0x26c3('0x36')](_0x26c3('0x37'),_0x26c3('0x35'))[_0x26c3('0x41')](_0x26c3('0x3a'))[_0x26c3('0x3b')](_0x26c3('0x3c'))['where'](_0x26c3('0x3d'),LISTID[_0x26c3('0x39')]())['where'](_0x26c3('0x44'),squel[_0x26c3('0x45')](hopperContacts))['where']('phone\x20IS\x20NOT\x20NULL')['where']('phone\x20NOT\x20IN\x20(?)',squel[_0x26c3('0x40')]()[_0x26c3('0x36')](_0x26c3('0x46'))[_0x26c3('0x41')](_0x26c3('0x47'))['where'](_0x30f3a5+'\x20=\x20?',_0x55b7e0['id'][_0x26c3('0x39')]()))[_0x26c3('0x3b')]('phone\x20NOT\x20IN\x20(?)',squel[_0x26c3('0x40')]()[_0x26c3('0x36')]('phone')[_0x26c3('0x41')](_0x26c3('0x42'))['where'](_0x30f3a5+_0x26c3('0x43'),_0x55b7e0['id'][_0x26c3('0x39')]())))['toString']();return _0x3ee0e2;};function _0x3dc11c(_0x2efd66,_0x2587a1){var _0x4cd5bc=squel['insert']()['into'](_0x26c3('0x42'))[_0x26c3('0x32')]([_0x26c3('0x1e'),_0x26c3('0x33'),_0x26c3('0x38'),_0x26c3('0x24'),_0x2587a1,_0x26c3('0x34'),_0x26c3('0x35')],squel['select']()['field'](_0x26c3('0x1e'),_0x26c3('0x1e'))[_0x26c3('0x36')]('NOW()','scheduledAt')[_0x26c3('0x36')]('id',_0x26c3('0x38'))[_0x26c3('0x36')](LISTID['toString'](),_0x26c3('0x24'))['field'](_0x2efd66['id'][_0x26c3('0x39')](),_0x2587a1)['field'](_0x26c3('0x37'),_0x26c3('0x34'))[_0x26c3('0x36')](_0x26c3('0x37'),_0x26c3('0x35'))[_0x26c3('0x41')]('cm_contacts')[_0x26c3('0x3b')](_0x26c3('0x3c'))[_0x26c3('0x3b')]('ListId\x20=\x20?',LISTID['toString']())[_0x26c3('0x3b')](_0x26c3('0x44'),squel[_0x26c3('0x45')](hopperContacts))['where'](_0x26c3('0x3e')))[_0x26c3('0x39')]();return _0x4cd5bc;}function _0x1b0fa1(_0xf6e0d5,_0x1cd2c1){var _0x421953=squel[_0x26c3('0x30')]()['into'](_0x26c3('0x48'))['fromQuery']([_0x26c3('0x1e'),_0x26c3('0x38'),_0x26c3('0x24'),_0x1cd2c1,_0x26c3('0x34'),_0x26c3('0x35')],squel['select']()[_0x26c3('0x36')]('phone',_0x26c3('0x1e'))[_0x26c3('0x36')]('id',_0x26c3('0x38'))[_0x26c3('0x36')](LISTID[_0x26c3('0x39')](),_0x26c3('0x24'))[_0x26c3('0x36')](_0xf6e0d5['id'][_0x26c3('0x39')](),_0x1cd2c1)[_0x26c3('0x36')](_0x26c3('0x37'),_0x26c3('0x34'))[_0x26c3('0x36')](_0x26c3('0x37'),_0x26c3('0x35'))['from'](_0x26c3('0x3a'))[_0x26c3('0x3b')](_0x26c3('0x3c'))['where'](_0x26c3('0x3d'),LISTID['toString']())[_0x26c3('0x3b')]('id\x20IN\x20?',squel['str'](hopperContacts))[_0x26c3('0x3b')]('phone\x20IS\x20NOT\x20NULL'))[_0x26c3('0x39')]();return _0x421953;}return db['VoiceQueue'][_0x26c3('0x49')]({'where':{'type':_0x26c3('0x4a')},'attributes':['id',_0x26c3('0x4b')],'include':[{'model':db[_0x26c3('0x4c')],'as':_0x26c3('0x4d'),'where':{'id':LISTID}}]})[_0x26c3('0x4e')](function(_0x607cd3){var _0x247937=[];if(_0x607cd3){var _0x209b30;for(var _0x236ade=0x0,_0x51cbea;_0x236ade<_0x607cd3[_0x26c3('0x25')];_0x236ade+=0x1){_0x51cbea=_0x607cd3[_0x236ade][_0x26c3('0x4f')]({'plain':!![]});switch(_0x51cbea['dialCheckDuplicateType']){case _0x26c3('0x50'):_0x247937[_0x26c3('0x51')](db['sequelize'][_0x26c3('0x52')](_0x3acae3(_0x51cbea,'VoiceQueueId'))[_0x26c3('0x4e')](function(){})[_0x26c3('0x53')](_0x2a239f()));break;case _0x26c3('0x54'):_0x247937[_0x26c3('0x51')](db[_0x26c3('0x55')][_0x26c3('0x52')](_0x59afa9(_0x51cbea,_0x26c3('0x56')))[_0x26c3('0x4e')](function(){})[_0x26c3('0x53')](_0x2a239f()));break;default:_0x247937['push'](db['sequelize'][_0x26c3('0x52')](_0x3dc11c(_0x51cbea,_0x26c3('0x56')))['then'](function(){})[_0x26c3('0x53')](_0x2a239f()));}}}return _0x247937;})[_0x26c3('0x57')]()[_0x26c3('0x4e')](function(){return db[_0x26c3('0x58')][_0x26c3('0x49')]({'where':{'type':_0x26c3('0x4a')},'attributes':['id'],'include':[{'model':db[_0x26c3('0x4c')],'as':_0x26c3('0x59'),'where':{'id':LISTID}}]})[_0x26c3('0x4e')](function(_0x30b2bf){var _0x4d176f=[];if(_0x30b2bf){var _0xb397ac;for(var _0x4845da=0x0,_0x2893ac;_0x4845da<_0x30b2bf[_0x26c3('0x25')];_0x4845da+=0x1){_0x2893ac=_0x30b2bf[_0x4845da][_0x26c3('0x4f')]({'plain':!![]});_0x4d176f['push'](db[_0x26c3('0x55')][_0x26c3('0x52')](_0x1b0fa1(_0x2893ac,_0x26c3('0x56')))[_0x26c3('0x4e')](function(){})[_0x26c3('0x53')](_0x2a239f()));}}return _0x4d176f;})[_0x26c3('0x57')]();})['then'](function(){return db[_0x26c3('0x5a')]['findAll']({'attributes':['id',_0x26c3('0x4b')],'include':[{'model':db[_0x26c3('0x4c')],'as':_0x26c3('0x4d'),'where':{'id':LISTID}}]})['then'](function(_0x1eafb1){var _0x2afe4c=[];if(_0x1eafb1){for(var _0x30ecf8=0x0,_0x34cca6;_0x30ecf8<_0x1eafb1[_0x26c3('0x25')];_0x30ecf8+=0x1){_0x34cca6=_0x1eafb1[_0x30ecf8][_0x26c3('0x4f')]({'plain':!![]});switch(_0x34cca6[_0x26c3('0x4b')]){case'always':_0x2afe4c[_0x26c3('0x51')](db[_0x26c3('0x55')]['query'](_0x3acae3(_0x34cca6,'CampaignId'))[_0x26c3('0x4e')](function(){})[_0x26c3('0x53')](_0x2a239f()));break;case _0x26c3('0x54'):_0x2afe4c['push'](db[_0x26c3('0x55')][_0x26c3('0x52')](_0x59afa9(_0x34cca6,'CampaignId'))['then'](function(){})[_0x26c3('0x53')](_0x2a239f()));break;default:_0x2afe4c['push'](db[_0x26c3('0x55')][_0x26c3('0x52')](_0x3dc11c(_0x34cca6,_0x26c3('0x5b')))[_0x26c3('0x4e')](function(){})[_0x26c3('0x53')](_0x2a239f()));}}}return _0x2afe4c;})[_0x26c3('0x57')]();})['then'](function(){return db[_0x26c3('0x5a')][_0x26c3('0x49')]({'attributes':['id'],'include':[{'model':db[_0x26c3('0x4c')],'as':_0x26c3('0x59'),'where':{'id':LISTID}}]})['then'](function(_0xe6a084){var _0x4fbc1d=[];if(_0xe6a084){for(var _0x550d5d=0x0,_0x39f4bf;_0x550d5d<_0xe6a084[_0x26c3('0x25')];_0x550d5d+=0x1){_0x39f4bf=_0xe6a084[_0x550d5d][_0x26c3('0x4f')]({'plain':!![]});_0x4fbc1d[_0x26c3('0x51')](db[_0x26c3('0x55')][_0x26c3('0x52')](_0x1b0fa1(_0x39f4bf,'CampaignId'))[_0x26c3('0x4e')](function(){})[_0x26c3('0x53')](_0x2a239f()));}}return _0x4fbc1d;})['all']();})['catch'](function(_0x3ca4d5){logger[_0x26c3('0x12')](_0x26c3('0x5c'),_0x26c3('0x5d'),_0x3ca4d5[_0x26c3('0x19')]);});}var processPromises=function(_0x4a7696){return BPromise[_0x26c3('0x57')](promises)['then'](function(_0x576525){})[_0x26c3('0x53')](function(_0x433d15){logger[_0x26c3('0x12')](_0x26c3('0x5e'),JSON[_0x26c3('0x2c')](_0x433d15));})[_0x26c3('0x5f')](function(){socket['emit'](_0x26c3('0x60')+SOCKET_TIMESTAMP,{'success':success,'errors':errors,'duplicates':duplicates,'rows':rows});promises=[];success=0x0;errors=0x0;duplicates=0x0;rows=[];if(_0x4a7696){return _0x4a7696[_0x26c3('0x61')]();}});};var endCsv=function(){return BPromise[_0x26c3('0x62')]()[_0x26c3('0x4e')](function(){if(hopperContacts){return checkHopper();}})['then'](function(){socket[_0x26c3('0x63')](_0x26c3('0x60')+SOCKET_TIMESTAMP,{'finished':!![],'success':success,'errors':errors,'duplicates':duplicates,'rows':rows});try{fs[_0x26c3('0x64')](FILEPATH);}catch(_0x264ae3){logger['error'](_0x26c3('0x65'),JSON[_0x26c3('0x2c')](_0x264ae3));}finally{process[_0x26c3('0x66')](0x0);}});};process['on'](_0x26c3('0x67'),function(){logger[_0x26c3('0x68')]('CSV\x20import\x20process\x20stopped!');endCsv();});function main(){return BPromise[_0x26c3('0x62')]()[_0x26c3('0x4e')](function(){if(DUPLICATES){DUPLICATES=DUPLICATES[_0x26c3('0xf')](',');return db[_0x26c3('0x29')]['findAll']({'where':{'ListId':LISTID},'attributes':DUPLICATES,'raw':!![]});}})[_0x26c3('0x4e')](function(_0x31f759){var _0x35f1cd=fs['createReadStream'](FILEPATH,{'highWaterMark':0xf*0x400*0x400});Papa[_0x26c3('0x69')](_0x35f1cd,{'header':!![],'skipEmptyLines':!![],'step':function(_0x579716,_0x26dfd4){total+=0x1;var _0x141027=total;promises[_0x26c3('0x51')](checkRow(_0x579716,_0x31f759,_0x141027)[_0x26c3('0x4e')](function(){success+=0x1;})['catch'](function(_0x3acce2){if(_0x3acce2[_0x26c3('0x12')]){errors+=0x1;delete _0x3acce2[_0x26c3('0x12')];}else if(_0x3acce2[_0x26c3('0x27')]){duplicates+=0x1;delete _0x3acce2['duplicate'];}rows[_0x26c3('0x51')](_0x3acce2);}));if(total%0xc8===0x0){_0x26dfd4[_0x26c3('0x6a')]();return processPromises(_0x26dfd4);}},'complete':function(){return processPromises()[_0x26c3('0x4e')](function(){logger[_0x26c3('0x68')](_0x26c3('0x6b'));endCsv();});},'error':function(_0x28a79c,_0x21d5b3){logger[_0x26c3('0x68')]('CSV\x20parse\x20error',JSON[_0x26c3('0x2c')](_0x28a79c));endCsv();}});})[_0x26c3('0x53')](function(_0x2301b7){logger['error'](_0x26c3('0x6c'),JSON[_0x26c3('0x2c')](_0x2301b7));});}main(); \ No newline at end of file diff --git a/server/components/import/cm/csv2.js b/server/components/import/cm/csv2.js index 9a00721..3fedf05 100644 --- a/server/components/import/cm/csv2.js +++ b/server/components/import/cm/csv2.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x5395=['cm_contacts','.CmListId','.CmListId\x20=\x20?','cm_contacts.createdAt\x20=\x20?','cm_contacts.phone\x20NOT\x20IN\x20(?)','\x22always\x22','\x22onlyIfOpen\x22','into','cm_hopper_black','ListId','select','cm_contacts.ListId\x20=\x20','ListId\x20=\x20?','\x20=\x20','toString','.offset-cm_contacts.utcOffset\x20minute)','priority','UserId','cm_contacts.id','fields','cm_hopper.id','cm_contact_has_items.item','cm_contact_has_items.OrderBy','cm_contact_has_items.createdAt','cm_contact_has_items.updatedAt','cm_hopper_additional_phones','CmHopperId','cm_contact_has_items','cm_contacts.id\x20=\x20cm_contact_has_items.CmContactId','cm_hopper.ListId\x20=\x20?','keys','CompanyId','scheduledAt',')\x20NOT\x20IN\x20?','deletedAt\x20IS\x20NULL','min_id','Received\x20SIGINT','error','code','message','info','sequelize','campaigns.id','campaigns.dialTimezone','campaigns','query','spread','voice_queues.id','voice_queues.id\x20=\x20voice_queues_has_cm_lists.VoiceQueueId','voice_queues_has_cm_lists.CmListId=','catch','timezones','dialTimezone','utcOffset','set','offset','main','stringify','binding','socket_timestamp','root','server/files/tmp','includes','header','findAll','name','_description','writeFileSync','parse','data','rows','errors','hasOwnProperty','replace','scheduledat\x20wrong\x20format\x20(YYYY-MM-DD\x20HH:mm:ss)','isNaN','isNumber','agent\x20not\x20exists','email','email\x20wrong\x20format','dateOfBirth','YYYY-MM-DD','dateOfBirth\x20wrong\x20format\x20(YYYY-MM-DD)','firstName','\x20not\x20specified','find','itemTypeId','trim','SystemRow','appendFileSync','emit','contact:import:','Abort\x20parser','SystemError','step','duplicates','CREATE\x20TABLE\x20','campaigns_','voice_queues_','(id\x20int,dialTimezone\x20varchar(255),offset\x20int);','each','LOAD\x20DATA\x20LOCAL\x20INFILE\x20\x27%s\x27\x20INTO\x20TABLE\x20%s\x20CHARACTER\x20SET\x20UTF8\x20FIELDS\x20TERMINATED\x20BY\x20\x27,\x27\x20ENCLOSED\x20BY\x20\x27\x22\x27\x20LINES\x20TERMINATED\x20BY\x20\x27\x0a\x27\x20IGNORE\x201\x20ROWS\x20(%s)\x20SET\x20id\x20=\x20NULL,\x20ListId\x20=\x20%s,\x20CompanyId\x20=\x20%s,\x20createdAt\x20=\x20\x27%s\x27,\x20updatedAt\x20=\x20\x27%s\x27',',\x20scheduledAt\x20=\x20NOW()','DROP\x20TABLE\x20','contactId','contactTypeId','orderBy','voice_queues','VoiceQueueId','campaigns_has_cm_lists','CampaignId','voice_queues_has_cm_lists','voice_queues_has_cm_blacklists','campaigns_has_cm_blacklists','finish','affectedRows','unlink','exit','complete','argv','existsSync','file\x20doesn\x27t\x20exists','binding\x20doesn\x27t\x20exists','phone\x20is\x20mandatory','firstName\x20is\x20mandatory','ListId\x20is\x20mandatory','body\x20id\x20mandatory','map','No\x20agent\x20available','uncaughtException','path','lodash','papaparse','util','bluebird','moment','squel','ioredis','../../../mysqldb','../../../config/environment/shared','../../../config/logger','import','redis','defaults','localhost','socket.io-emitter','format','YYYY-MM-DD\x20HH:mm:ss','test','field','phone','from','join','.id\x20=\x20','where','.dialCheckDuplicateType\x20IN\x20(','CmContact','AdditionalPhones','then','length','push','split','all','isNil','filter','CmContactHasItem','findOne','create','PHONE','inserted','cm_contacts.phone','cm_contacts.scheduledat','cm_contacts.ListId','cm_contacts.createdAt','cm_contacts.updatedAt','cm_contacts.priority','cm_contacts.UserId','insert','cm_hopper','fromQuery','scheduledat','ContactId','createdAt','updatedAt','recallme'];(function(_0x4f749f,_0x27cc25){var _0x4d7344=function(_0x4942ab){while(--_0x4942ab){_0x4f749f['push'](_0x4f749f['shift']());}};_0x4d7344(++_0x27cc25);}(_0x5395,0x1f4));var _0x5539=function(_0x46e363,_0x45d7e2){_0x46e363=_0x46e363-0x0;var _0x3fb059=_0x5395[_0x46e363];return _0x3fb059;};'use strict';var fs=require('fs');var path=require(_0x5539('0x0'));var _=require(_0x5539('0x1'));var Papa=require(_0x5539('0x2'));var util=require(_0x5539('0x3'));var BPromise=require(_0x5539('0x4'));var moment=require(_0x5539('0x5'));var squel=require(_0x5539('0x6'));var Redis=require(_0x5539('0x7'));var db=require(_0x5539('0x8'))['db'];var config=require('../../../config/environment');var shared=require(_0x5539('0x9'));var logger=require(_0x5539('0xa'))(_0x5539('0xb'));config[_0x5539('0xc')]=_[_0x5539('0xd')](config['redis'],{'host':_0x5539('0xe'),'port':0x18eb});var socket=require(_0x5539('0xf'))(new Redis(config[_0x5539('0xc')]));var stats={'finish':![],'errors':[],'rows':0x0,'affectedRows':0x0};var results=[];var promisesAdditionalPhones=[];var orderBy=0x0;var stopped=![];var NOW=moment()[_0x5539('0x10')](_0x5539('0x11'));var contactItemTypes=[];var phoneDescriptions=[];var hasAdditionalPhones=![];var tmp_voice_queues;var tmp_campaigns;var tzOffset=0x0;var hasTZ;var NOW=moment()[_0x5539('0x10')]('YYYY-MM-DD\x20HH:mm:ss');function isEmail(_0x488140){return/^([^\x00-\x20\x22\x28\x29\x2c\x2e\x3a-\x3c\x3e\x40\x5b-\x5d\x7f-\xff]+|\x22([^\x0d\x22\x5c\x80-\xff]|\x5c[\x00-\x7f])*\x22)(\x2e([^\x00-\x20\x22\x28\x29\x2c\x2e\x3a-\x3c\x3e\x40\x5b-\x5d\x7f-\xff]+|\x22([^\x0d\x22\x5c\x80-\xff]|\x5c[\x00-\x7f])*\x22))*\x40([^\x00-\x20\x22\x28\x29\x2c\x2e\x3a-\x3c\x3e\x40\x5b-\x5d\x7f-\xff]+|\x5b([^\x0d\x5b-\x5d\x80-\xff]|\x5c[\x00-\x7f])*\x5d)(\x2e([^\x00-\x20\x22\x28\x29\x2c\x2e\x3a-\x3c\x3e\x40\x5b-\x5d\x7f-\xff]+|\x5b([^\x0d\x5b-\x5d\x80-\xff]|\x5c[\x00-\x7f])*\x5d))*$/[_0x5539('0x12')](_0x488140);}function selectNotIn(_0x396c03,_0x4875b1,_0x4d0afd,_0x55fd98,_0x1e2a93){return squel['select']()[_0x5539('0x13')](_0x5539('0x14'))[_0x5539('0x15')](_0x55fd98)[_0x5539('0x16')](_0x4875b1,null,_0x4875b1+_0x5539('0x17')+_0x55fd98+'.'+_0x4d0afd)[_0x5539('0x18')](_0x55fd98+'.'+_0x4d0afd+'\x20=\x20'+_0x396c03+'.'+_0x4d0afd)[_0x5539('0x18')](_0x4875b1+_0x5539('0x19')+_0x1e2a93['join']()+')');}function handleAdditionalPhones(){return new Promise(function(_0x3fb92b,_0x105882){promisesAdditionalPhones=[];return db[_0x5539('0x1a')]['findAll']({'raw':!![],'attributes':['id',_0x5539('0x1b')],'where':{'createdAt':NOW,'AdditionalPhones':{'$ne':null}}})[_0x5539('0x1c')](function(_0x5224ab){if(_0x5224ab!==null){var _0x459cc3=[];for(var _0x4fe737=0x0;_0x4fe737<_0x5224ab[_0x5539('0x1d')];_0x4fe737++){var _0x2e4f1d=_0x5224ab[_0x4fe737];_0x459cc3[_0x5539('0x1e')](insertAdditionalPhones(_0x2e4f1d));}}Promise['all'](_0x459cc3)[_0x5539('0x1c')](function(){_0x3fb92b({'val':0x1});});});});}function insertAdditionalPhones(_0x5c606f){return new Promise(function(_0x2c4bbd,_0x7b331c){var _0x45510d=_0x5c606f['AdditionalPhones'];var _0x21094c=_0x45510d[_0x5539('0x1f')](';');var _0xe9a00b=[];orderBy=0x0;for(var _0x3f90fb=0x0;_0x3f90fb<_0x21094c['length'];_0x3f90fb++){_0xe9a00b[_0x5539('0x1e')](splitAdditionalPhone(_0x5c606f['id'],_0x21094c[_0x3f90fb]));}Promise[_0x5539('0x20')](_0xe9a00b)[_0x5539('0x1c')](function(){_0x2c4bbd({'val':_0x21094c['length']});});});}function splitAdditionalPhone(_0x2185d9,_0x1781ec){return new Promise(function(_0x4f8f64,_0x2cae21){var _0x5b89fa=_0x1781ec['split'](':');var _0x34d7aa=_0x5b89fa[0x0];var _0x344369=_0x5b89fa[0x1];if(!_[_0x5539('0x21')](_0x344369)){var _0x345838=_0x344369[_0x5539('0x1f')]('|');var _0x31f406=[];for(var _0x13ed8f=0x0;_0x13ed8f<_0x345838['length'];_0x13ed8f++){if(_0x345838[_0x13ed8f]!==''){var _0x3ffe57=_[_0x5539('0x22')](promisesAdditionalPhones,{'contactId':_0x2185d9,'phone':_0x345838[_0x13ed8f]});if(_0x3ffe57[_0x5539('0x1d')]==0x0){orderBy++;promisesAdditionalPhones['push']({'contactId':_0x2185d9,'contactTypeId':_0x34d7aa,'phone':_0x345838[_0x13ed8f],'orderBy':orderBy});}}}_0x4f8f64({'ok':0x1});}else _0x4f8f64({'res':0x0});});}function createAdditionalPhone(_0x13b308,_0x574c86,_0xbc4337,_0x84b45d){var _0x2c746d='';var _0x4788ff='';var _0x5f0581=_0xbc4337['split']('§');_0x2c746d=_0x5f0581[0x0];if(_0x5f0581[_0x5539('0x1d')]==0x2)_0x4788ff=_0x5f0581[0x1];return new Promise(function(_0xab2909,_0x2d196c){return db[_0x5539('0x23')][_0x5539('0x24')]({'where':{'CmContactId':_0x13b308,'item':_0x2c746d}})['then'](function(_0x3f73e8){if(_0x3f73e8){return db[_0x5539('0x23')]['update']({'ItemTypeId':_0x574c86,'description':_0x4788ff,'OrderBy':_0x84b45d},{'where':{'CmContactId':_0x13b308,'item':_0x2c746d}})[_0x5539('0x1c')](function(_0x403dd6){_0xab2909({'res':'updated'});});}else{return db[_0x5539('0x23')][_0x5539('0x25')]({'CmContactId':_0x13b308,'item':_0x2c746d,'description':_0x4788ff,'ItemTypeId':_0x574c86,'OrderBy':_0x84b45d,'ItemClass':_0x5539('0x26')})[_0x5539('0x1c')](function(_0x5e949b){_0xab2909({'res':_0x5539('0x27')});});}});});}function insertCmHopper(_0x26cc51,_0x1733f2,_0x55a35a,_0x5896c5,_0x102785){var _0x50796d=[_0x5539('0x28'),_0x5539('0x29'),'cm_contacts.id',_0x5539('0x2a'),_0x1733f2+'.'+_0x5896c5,_0x5539('0x2b'),_0x5539('0x2c'),_0x5539('0x2d'),_0x5539('0x2e'),'\x22'+_0x102785+'\x22'];return squel[_0x5539('0x2f')]()['into'](_0x5539('0x30'))[_0x5539('0x31')]([_0x5539('0x14'),_0x5539('0x32'),_0x5539('0x33'),'ListId',_0x5896c5,_0x5539('0x34'),_0x5539('0x35'),'priority','UserId',_0x5539('0x36')],squel['select']()['fields'](_0x50796d)[_0x5539('0x15')](_0x1733f2)[_0x5539('0x16')](_0x5539('0x37'),null,'cm_contacts.ListId\x20=\x20'+_0x1733f2+_0x5539('0x38'))['join'](_0x55a35a,null,_0x55a35a+_0x5539('0x17')+_0x1733f2+'.'+_0x5896c5)[_0x5539('0x18')](_0x1733f2+_0x5539('0x39'),_0x26cc51)[_0x5539('0x18')](_0x5539('0x3a'),NOW)[_0x5539('0x18')](_0x5539('0x3b'),selectNotIn(_0x1733f2,_0x55a35a,_0x5896c5,_0x5539('0x30'),[_0x5539('0x3c'),_0x5539('0x3d')]))[_0x5539('0x18')]('cm_contacts.phone\x20NOT\x20IN\x20(?)',selectNotIn(_0x1733f2,_0x55a35a,_0x5896c5,_0x5539('0x30'),[_0x5539('0x3c')])))['toString']();}function insertCmHopperBlack(_0x432842,_0x1c8d93,_0x1cf1d4,_0x40d896){var _0x340b19=[_0x5539('0x28'),'cm_contacts.id',_0x5539('0x2a'),_0x1c8d93+'.'+_0x40d896,_0x5539('0x2b'),_0x5539('0x2c')];return squel[_0x5539('0x2f')]()[_0x5539('0x3e')](_0x5539('0x3f'))[_0x5539('0x31')]([_0x5539('0x14'),'ContactId',_0x5539('0x40'),_0x40d896,_0x5539('0x34'),_0x5539('0x35')],squel[_0x5539('0x41')]()['fields'](_0x340b19)[_0x5539('0x15')](_0x1c8d93)['join'](_0x5539('0x37'),null,_0x5539('0x42')+_0x1c8d93+'.CmListId')[_0x5539('0x16')](_0x1cf1d4,null,_0x1cf1d4+'.id\x20=\x20'+_0x1c8d93+'.'+_0x40d896)[_0x5539('0x18')](_0x1c8d93+_0x5539('0x39'),_0x432842)[_0x5539('0x18')](_0x5539('0x3a'),NOW)[_0x5539('0x18')]('cm_contacts.phone\x20NOT\x20IN\x20(?)',squel[_0x5539('0x41')]()['field'](_0x5539('0x14'))[_0x5539('0x15')](_0x5539('0x3f'))[_0x5539('0x18')](_0x5539('0x43'),_0x432842)[_0x5539('0x18')](_0x40d896+_0x5539('0x44')+_0x1c8d93+'.'+_0x40d896)))[_0x5539('0x45')]();}function insertTzCmHopper(_0x9857ad,_0x4e662b,_0x552bd9,_0x3c4835,_0xed1f40,_0x1eb80c){var _0x149aab=[_0x5539('0x28'),'date_add(cm_contacts.scheduledat,interval\x20'+_0x1eb80c+_0x5539('0x46'),'cm_contacts.id','cm_contacts.ListId',_0x4e662b+'.'+_0x3c4835,_0x5539('0x2b'),'cm_contacts.updatedAt',_0x5539('0x2d'),_0x5539('0x2e'),'\x22'+_0xed1f40+'\x22'];var _0x5cde59=squel['insert']()[_0x5539('0x3e')](_0x5539('0x30'))[_0x5539('0x31')]([_0x5539('0x14'),_0x5539('0x32'),'ContactId',_0x5539('0x40'),_0x3c4835,_0x5539('0x34'),_0x5539('0x35'),_0x5539('0x47'),_0x5539('0x48'),_0x5539('0x36')],squel[_0x5539('0x41')]()['fields'](_0x149aab)['from'](_0x4e662b)['join'](_0x5539('0x37'),null,_0x5539('0x42')+_0x4e662b+_0x5539('0x38'))[_0x5539('0x16')](_0x552bd9,null,_0x552bd9+'.id\x20=\x20'+_0x4e662b+'.'+_0x3c4835)[_0x5539('0x16')](_0x1eb80c,null,_0x1eb80c+'.id\x20=\x20'+_0x4e662b+'.'+_0x3c4835)[_0x5539('0x18')](_0x4e662b+_0x5539('0x39'),_0x9857ad)[_0x5539('0x18')](_0x5539('0x3a'),NOW)[_0x5539('0x18')](_0x5539('0x3b'),selectNotIn(_0x4e662b,_0x552bd9,_0x3c4835,_0x5539('0x30'),[_0x5539('0x3c'),'\x22onlyIfOpen\x22']))[_0x5539('0x18')](_0x5539('0x3b'),selectNotIn(_0x4e662b,_0x552bd9,_0x3c4835,_0x5539('0x30'),['\x22always\x22'])))[_0x5539('0x45')]();return _0x5cde59;}function insertTzCmHopperBlack(_0x1446c6,_0x339f00,_0x47d0e0,_0x450a17){var _0x5d9af2=['cm_contacts.phone',_0x5539('0x49'),'cm_contacts.ListId',_0x339f00+'.'+_0x450a17,_0x5539('0x2b'),_0x5539('0x2c')];return squel[_0x5539('0x2f')]()[_0x5539('0x3e')](_0x5539('0x3f'))[_0x5539('0x31')]([_0x5539('0x14'),'ContactId',_0x5539('0x40'),_0x450a17,_0x5539('0x34'),_0x5539('0x35')],squel[_0x5539('0x41')]()[_0x5539('0x4a')](_0x5d9af2)['from'](_0x339f00)['join'](_0x5539('0x37'),null,_0x5539('0x42')+_0x339f00+_0x5539('0x38'))[_0x5539('0x16')](_0x47d0e0,null,_0x47d0e0+_0x5539('0x17')+_0x339f00+'.'+_0x450a17)['where'](_0x339f00+_0x5539('0x39'),_0x1446c6)[_0x5539('0x18')](_0x5539('0x3a'),NOW)[_0x5539('0x18')](_0x5539('0x3b'),squel[_0x5539('0x41')]()['field'](_0x5539('0x14'))[_0x5539('0x15')](_0x5539('0x3f'))[_0x5539('0x18')](_0x5539('0x43'),_0x1446c6)[_0x5539('0x18')](_0x450a17+_0x5539('0x44')+_0x339f00+'.'+_0x450a17)))[_0x5539('0x45')]();}function insertCmHopperAdditionalPhones(_0x560dd8){var _0x31b392=[_0x5539('0x4b'),_0x5539('0x4c'),_0x5539('0x4d'),_0x5539('0x4e'),_0x5539('0x4f')];return squel[_0x5539('0x2f')]()[_0x5539('0x3e')](_0x5539('0x50'))['fromQuery']([_0x5539('0x51'),_0x5539('0x14'),'OrderBy','createdAt',_0x5539('0x35')],squel[_0x5539('0x41')]()[_0x5539('0x4a')](_0x31b392)['from'](_0x5539('0x30'))[_0x5539('0x16')](_0x5539('0x37'),null,'cm_contacts.id\x20=\x20cm_hopper.ContactId')[_0x5539('0x16')](_0x5539('0x52'),null,_0x5539('0x53'))['where'](_0x5539('0x54'),_0x560dd8)[_0x5539('0x18')](_0x5539('0x3a'),NOW))['toString']();}function insertCmContact(_0xdf9ed4,_0x47fc92,_0x13146b,_0x51ce56){var _0xeed484=_['concat'](_[_0x5539('0x55')](_0x51ce56),[_0x5539('0x40'),_0x5539('0x56'),_0x5539('0x34'),_0x5539('0x35'),_0x5539('0x57')]);return squel[_0x5539('0x2f')]()['into'](_0x5539('0x37'))[_0x5539('0x31')](_0xeed484,squel[_0x5539('0x41')]()[_0x5539('0x4a')](_0xeed484)['from'](_0x47fc92)['where']('('+_0x13146b[_0x5539('0x16')](',')+_0x5539('0x58'),squel[_0x5539('0x41')]()[_0x5539('0x4a')](_0x13146b)[_0x5539('0x15')](_0x5539('0x37'))[_0x5539('0x18')]('ListId\x20=\x20?',_0xdf9ed4)[_0x5539('0x18')](_0x5539('0x59')))[_0x5539('0x18')]('id\x20IN\x20?',squel['select']()[_0x5539('0x13')]('MIN(id)',_0x5539('0x5a'))['from'](_0x47fc92)['group'](_0x13146b['join'](','))))[_0x5539('0x45')]();}function handleStop(){logger['info'](_0x5539('0x5b'));stopped=!![];}function handleUncaughtException(_0x41f723){logger[_0x5539('0x5c')](_0x41f723['message']);process['exit'](0x1);}function handleError(_0x3f57f6,_0x23c020){stats['errors'][_0x5539('0x1e')]({'name':_0x23c020[_0x5539('0x5d')],'message':_0x23c020[_0x5539('0x5e')],'row':_0x3f57f6});}function handleQuery(_0x4e3e34){logger[_0x5539('0x5f')](_0x4e3e34);return db[_0x5539('0x60')]['query'](_0x4e3e34)['spread'](function(_0x4827f1){results['push'](_0x4827f1);})['catch'](function(_0x537ae2){logger['error'](_0x537ae2[_0x5539('0x5e')]);});}function updateTzCampaigns(_0x4268ed){return new Promise(function(_0x260f7e,_0x54d2df){var _0x3346a0=squel[_0x5539('0x41')]()[_0x5539('0x4a')]([_0x5539('0x61'),_0x5539('0x62')])[_0x5539('0x15')](_0x5539('0x63'))['join']('campaigns_has_cm_lists',null,'campaigns.id\x20=\x20campaigns_has_cm_lists.CampaignId')['where']('campaigns_has_cm_lists.CmListId='+_0x4268ed);db[_0x5539('0x60')][_0x5539('0x64')](_0x3346a0['toString']())[_0x5539('0x65')](function(_0x4c62df){var _0x60a00d=[];for(var _0x5b037a=0x0;_0x5b037a<_0x4c62df[_0x5539('0x1d')];_0x5b037a++){_0x60a00d[_0x5539('0x1e')](getTimezoneData(_0x4c62df[_0x5b037a],tmp_campaigns));}BPromise[_0x5539('0x20')](_0x60a00d)['then'](function(){_0x260f7e({'val':0x1});});})['catch'](function(_0x113f8e){logger['error'](_0x113f8e['message']);_0x260f7e({'val':0x0});});});}function updateTzVoiceQueues(_0x1b7dd3){return new Promise(function(_0x1eb397,_0x472e9a){var _0x171e96=squel[_0x5539('0x41')]()[_0x5539('0x4a')]([_0x5539('0x66'),'voice_queues.dialTimezone'])[_0x5539('0x15')]('voice_queues')['join']('voice_queues_has_cm_lists',null,_0x5539('0x67'))[_0x5539('0x18')](_0x5539('0x68')+_0x1b7dd3);db[_0x5539('0x60')][_0x5539('0x64')](_0x171e96[_0x5539('0x45')]())[_0x5539('0x65')](function(_0x3ed728){var _0x43153c=[];for(var _0x587b9a=0x0;_0x587b9a<_0x3ed728[_0x5539('0x1d')];_0x587b9a++){_0x43153c[_0x5539('0x1e')](getTimezoneData(_0x3ed728[_0x587b9a],tmp_voice_queues));}BPromise[_0x5539('0x20')](_0x43153c)[_0x5539('0x1c')](function(){_0x1eb397({'val':0x1});});})[_0x5539('0x69')](function(_0x195a2f){logger[_0x5539('0x5c')](_0x195a2f[_0x5539('0x5e')]);_0x1eb397({'val':0x0});});});}function getTimezoneData(_0x10d427,_0x403754){return new Promise(function(_0x21ad50,_0xd48dc5){var _0x14e93a=shared[_0x5539('0x6a')];var _0x4e7000=_0x14e93a[_0x10d427[_0x5539('0x6b')]];if(_[_0x5539('0x21')](_0x4e7000)){_0x21ad50({'ret':0x1});}else{var _0xfb70dc=_0x4e7000[_0x5539('0x6c')];var _0x452b08=squel[_0x5539('0x2f')]()[_0x5539('0x3e')](_0x403754)['set']('id',_0x10d427['id'])[_0x5539('0x6d')](_0x5539('0x6e'),_0xfb70dc)[_0x5539('0x6d')](_0x5539('0x6b'),_0x10d427[_0x5539('0x6b')])[_0x5539('0x45')]();return db[_0x5539('0x60')]['query'](_0x452b08)[_0x5539('0x65')](function(_0x503242){_0x21ad50({'ret':0x1});})['catch'](function(_0x37cc32){logger[_0x5539('0x5c')](_0x37cc32[_0x5539('0x5e')]);_0xd48dc5({'ret':0x1});});}});}function handleTZQuery(_0x187840){logger[_0x5539('0x5f')](_0x187840);return db[_0x5539('0x60')][_0x5539('0x64')](_0x187840)['spread'](function(_0x2617e5){})[_0x5539('0x69')](function(_0xf08d9){logger['error'](_0xf08d9['message']);});}function main(_0x4b520c,_0x5a8d0c,_0x35a0b5,_0xec814e){logger['info'](_0x5539('0x6f'),_0x4b520c,JSON[_0x5539('0x70')](_0x5a8d0c));process['send']('start');var _0x2614ed=_0x5a8d0c[_0x5539('0x71')];var _0x294f54=_['clone'](_0x2614ed);var _0x5b7eae=_0x5a8d0c[_0x5539('0x72')];var _0x22a902=path['join'](config[_0x5539('0x73')],_0x5539('0x74'),_0x5b7eae+'.csv');hasTZ=_[_0x5539('0x55')](_0x2614ed)[_0x5539('0x75')](_0x5539('0x6b'));var _0x2f6ca2=_['keys'](_0x2614ed)[_0x5539('0x16')]();logger['info'](_0x5539('0x76'),_0x2f6ca2);db['ContactItemType'][_0x5539('0x77')]({'raw':!![],'attributes':['id',_0x5539('0x78')]})['then'](function(_0x402e73){for(var _0x3ca45d=0x0;_0x3ca45d<_0x402e73[_0x5539('0x1d')];_0x3ca45d++){if(_0x402e73[_0x3ca45d][_0x5539('0x78')]in _0x2614ed){contactItemTypes[_0x5539('0x1e')](_0x402e73[_0x3ca45d]);delete _0x294f54[_0x402e73[_0x3ca45d][_0x5539('0x78')]];hasAdditionalPhones=!![];}for(var _0x327c4e in _0x2614ed){if(_0x402e73[_0x3ca45d][_0x5539('0x78')]+_0x5539('0x79')===_0x327c4e){phoneDescriptions[_0x5539('0x1e')]({'itemTypeId':_0x402e73[_0x3ca45d]['id'],'description':_0x327c4e});delete _0x294f54[_0x327c4e];}}}if(hasAdditionalPhones)_0x294f54['AdditionalPhones']='';var _0x4e88b3=_[_0x5539('0x55')](_0x294f54)['join']();logger['info']('header',_0x4e88b3);fs[_0x5539('0x7a')](_0x22a902,_0x4e88b3+'\x0a');Papa[_0x5539('0x7b')](fs['createReadStream'](_0x4b520c),{'header':!![],'skipEmptyLines':!![],'step':function(_0x48aa08,_0x3fc78f){try{for(var _0x547873=0x0,_0x2cf857=[];_0x547873<_0x48aa08[_0x5539('0x7c')][_0x5539('0x1d')];_0x547873++){stats[_0x5539('0x7d')]+=0x1;if(_0x48aa08[_0x5539('0x7e')][_0x547873]){handleError(_0x48aa08[_0x5539('0x7c')][_0x547873],_0x48aa08[_0x5539('0x7e')][_0x547873]);}else{var _0x2ea190=[];var _0x50228b=[];var _0x5f4efa={};for(var _0x975ed1 in _0x2614ed){let _0x21b016=contactItemTypes['find'](_0x4ed014=>_0x4ed014['name']===_0x975ed1);let _0x355388=contactItemTypes['find'](_0x31563c=>_0x31563c[_0x5539('0x78')]+_0x5539('0x79')===_0x975ed1);if(_[_0x5539('0x21')](_0x21b016)&&_[_0x5539('0x21')](_0x355388)){if(_0x2614ed[_0x5539('0x7f')](_0x975ed1)){if(_0x48aa08['data'][_0x547873][_0x2614ed[_0x975ed1]]){var _0x4569df=_['trim'](_0x48aa08[_0x5539('0x7c')][_0x547873][_0x2614ed[_0x975ed1]][_0x5539('0x80')](/"/g,'\x27'));switch(_0x975ed1){case'scheduledat':var _0x5b8de4=moment(_0x4569df,_0x5539('0x11'),!![]);if(_0x5b8de4['isValid']()){_0x2cf857[_0x5539('0x1e')]('\x22'+_0x4569df+'\x22');}else{_0x2ea190[_0x5539('0x1e')](_0x5539('0x81'));}break;case _0x5539('0x47'):var _0x423378=parseInt(_0x4569df);_0x4569df=_[_0x5539('0x82')](_0x423378)||_0x423378<0x0||_0x423378>0x4?_0xec814e?0x3:0x2:_0x423378;_0x2cf857['push']('\x22'+_0x4569df+'\x22');break;case _0x5539('0x48'):var _0x5ecb5a=parseInt(_0x4569df);if(_[_0x5539('0x83')](_0x5ecb5a)&&_[_0x5539('0x75')](_0x35a0b5,_0x5ecb5a)){_0x2cf857[_0x5539('0x1e')]('\x22'+_0x5ecb5a+'\x22');}else{_0x2ea190['push'](_0x5539('0x84'));}break;case _0x5539('0x85'):if(isEmail(_0x4569df)){_0x2cf857['push']('\x22'+_0x4569df+'\x22');}else{_0x2ea190[_0x5539('0x1e')](_0x5539('0x86'));}break;case _0x5539('0x87'):var _0x2ac8d9=moment(_0x4569df,_0x5539('0x88'),!![]);if(_0x2ac8d9['isValid']()){_0x2cf857[_0x5539('0x1e')]('\x22'+_0x4569df+'\x22');}else{_0x2ea190['push'](_0x5539('0x89'));}break;case _0x5539('0x6b'):var _0x1a429b=shared[_0x5539('0x6a')];var _0x37459d=_0x1a429b[_0x4569df];if(!_[_0x5539('0x21')](_0x37459d)){var _0x99d90d=_0x37459d[_0x5539('0x6c')];_0x2cf857[_0x5539('0x1e')]('\x22'+_0x4569df+'\x22');_0x2cf857['push']('\x22'+_0x99d90d+'\x22');}break;default:_0x2cf857[_0x5539('0x1e')]('\x22'+_0x4569df+'\x22');}}else{switch(_0x975ed1){case _0x5539('0x8a'):case _0x5539('0x14'):_0x2ea190['push'](_0x975ed1+_0x5539('0x8b'));break;default:_0x2cf857[_0x5539('0x1e')]('\x22\x22');}}}}else{var _0x578339='';if(!_[_0x5539('0x21')](_0x21b016)){if(!_0x5f4efa['hasOwnProperty'](_0x21b016['id'])){if(!_[_0x5539('0x21')](_0x48aa08['data'][_0x547873][_0x2614ed[_0x975ed1]])){var _0x4569df=_['trim'](_0x48aa08[_0x5539('0x7c')][_0x547873][_0x2614ed[_0x975ed1]][_0x5539('0x80')](/"/g,'\x27'));var _0x2ef257=phoneDescriptions[_0x5539('0x8c')](_0x232c93=>_0x232c93[_0x5539('0x8d')]===_0x21b016['id']);if(!_[_0x5539('0x21')](_0x2ef257)){var _0x28490f=_[_0x5539('0x8e')](_0x48aa08['data'][_0x547873][_0x2614ed[_0x2ef257['description']]][_0x5539('0x80')](/"/g,'\x27'));if(!_[_0x5539('0x21')](_0x28490f))_0x4569df=_0x4569df+'§'+_0x28490f;}if(_0x578339=='')_0x578339=_0x4569df;else _0x578339+='|'+_0x4569df;}_0x50228b[_0x5539('0x1e')](_0x21b016['id']+':'+_0x578339);_0x5f4efa[_0x21b016['id']]=0x1;}}}}if(hasAdditionalPhones){_0x2cf857['push']('\x22'+_0x50228b[_0x5539('0x16')](';')+'\x22');}if(_0x2ea190[_0x5539('0x1d')]){handleError(_0x48aa08[_0x5539('0x7c')][_0x547873],{'code':_0x5539('0x8f'),'message':_0x2ea190['join']()});}else{fs[_0x5539('0x90')](_0x22a902,_0x2cf857[_0x5539('0x16')]()+'\x0a');}_0x2cf857=[];}if(!(stats[_0x5539('0x7d')]%0xc8)){socket[_0x5539('0x91')](_0x5539('0x92')+_0x5b7eae,stats);stats['errors']=[];}}if(stopped){logger['info'](_0x5539('0x93'));_0x3fc78f['abort']();}}catch(_0x32deff){handleError(_0x48aa08[_0x5539('0x7c')][_0x547873],{'code':_0x5539('0x94'),'message':_0x32deff['message']});logger['error'](_0x5539('0x95'),_0x32deff[_0x5539('0x5e')]);}},'complete':function(){try{var _0x308804=[];var _0x51421a=[];var _0x4b11ea=_0x5539('0x37');if(_0x5a8d0c[_0x5539('0x96')]&&_0x5a8d0c['duplicates'][_0x5539('0x1d')]){_0x4b11ea='cm_contacts_'+_0x5b7eae;_0x308804[_0x5539('0x1e')](_0x5539('0x97')+_0x4b11ea+'\x20LIKE\x20cm_contacts;');}tmp_campaigns=_0x5539('0x98')+_0x5b7eae;tmp_voice_queues=_0x5539('0x99')+_0x5b7eae;_0x51421a[_0x5539('0x1e')](_0x5539('0x97')+tmp_campaigns+_0x5539('0x9a'));_0x51421a[_0x5539('0x1e')](_0x5539('0x97')+tmp_voice_queues+'(id\x20int,dialTimezone\x20varchar(255),offset\x20int);');BPromise[_0x5539('0x9b')](_0x51421a,handleTZQuery)[_0x5539('0x1c')](function(_0xaefcc0){updateTzCampaigns(_0x5a8d0c[_0x5539('0x40')])['then'](function(_0x2cb991){updateTzVoiceQueues(_0x5a8d0c[_0x5539('0x40')])[_0x5539('0x1c')](function(_0x35c0f2){if(hasTZ)_0x4e88b3=_0x4e88b3['replace'](_0x5539('0x6b'),'dialTimezone,utcOffset');var _0x582aa9=util['format'](_0x5539('0x9c'),_0x22a902,_0x4b11ea,_0x4e88b3,_0x5a8d0c[_0x5539('0x40')],_0x5a8d0c[_0x5539('0x56')]||null,NOW,NOW);if(_[_0x5539('0x21')](_0x2614ed[_0x5539('0x32')])){_0x582aa9+=_0x5539('0x9d');}_0x308804['push'](_0x582aa9);if(_0x5a8d0c[_0x5539('0x96')]&&_0x5a8d0c[_0x5539('0x96')]['length']){_0x308804['push'](insertCmContact(_0x5a8d0c[_0x5539('0x40')],_0x4b11ea,_0x5a8d0c[_0x5539('0x96')],_0x2614ed));_0x308804[_0x5539('0x1e')](_0x5539('0x9e')+_0x4b11ea+';');}BPromise[_0x5539('0x9b')](_0x308804,handleQuery)[_0x5539('0x1c')](function(_0xca727f){BPromise[_0x5539('0x20')]([handleAdditionalPhones()])['then'](function(){_0x308804=[];for(var _0x53956f=0x0;_0x53956f\x20\x20');}var _0x37e1e7=path['join'](config[_0x5539('0x73')],_0x5539('0x74'),process[_0x5539('0xae')][0x2]);if(!fs[_0x5539('0xaf')](_0x37e1e7)){throw new Error(_0x5539('0xb0'));}var _0x1d15f8={};try{_0x1d15f8=JSON[_0x5539('0x7b')](process['argv'][0x3]);if(!_0x1d15f8[_0x5539('0x71')]){throw new Error(_0x5539('0xb1'));}if(!_0x1d15f8[_0x5539('0x71')]['phone']){throw new Error(_0x5539('0xb2'));}if(!_0x1d15f8['binding'][_0x5539('0x8a')]){throw new Error(_0x5539('0xb3'));}var _0x4fd482=0x0;if(_0x1d15f8[_0x5539('0x71')][_0x5539('0x48')]){_0x4fd482=0x1;}if(!_0x1d15f8[_0x5539('0x40')]){throw new Error(_0x5539('0xb4'));}}catch(_0x1ac61f){throw new Error(_0x5539('0xb5'));}var _0x2481e4=[];try{_0x2481e4=_[_0x5539('0xb6')](JSON[_0x5539('0x7b')](process[_0x5539('0xae')][0x4]),'id');}catch(_0x22819f){logger['info'](_0x5539('0xb7'));}main(_0x37e1e7,_0x1d15f8,_0x2481e4,_0x4fd482);}validate();process['on']('SIGINT',handleStop);process['on'](_0x5539('0xb8'),handleUncaughtException); \ No newline at end of file +var _0x0f6c=['existsSync','file\x20doesn\x27t\x20exists','binding\x20doesn\x27t\x20exists','phone\x20is\x20mandatory','firstName','firstName\x20is\x20mandatory','body\x20id\x20mandatory','map','No\x20agent\x20available','path','util','bluebird','moment','ioredis','../../../mysqldb','../../../config/environment','../../../config/environment/shared','../../../config/logger','import','redis','defaults','localhost','socket.io-emitter','format','YYYY-MM-DD\x20HH:mm:ss','test','select','field','from','.id\x20=\x20','where','.dialCheckDuplicateType\x20IN\x20(','CmContact','findAll','AdditionalPhones','then','length','push','all','split','isNil','CmContactHasItem','findOne','update','create','PHONE','cm_contacts.phone','cm_contacts.scheduledat','cm_contacts.id','cm_contacts.ListId','cm_contacts.updatedAt','cm_contacts.priority','cm_contacts.UserId','insert','into','cm_hopper','fromQuery','phone','scheduledat','ContactId','ListId','createdAt','updatedAt','priority','UserId','recallme','fields','cm_contacts.ListId\x20=\x20','.CmListId','join','.CmListId\x20=\x20?','cm_contacts.createdAt\x20=\x20?','cm_contacts.phone\x20NOT\x20IN\x20(?)','\x22always\x22','\x22onlyIfOpen\x22','toString','cm_contacts.createdAt','cm_hopper_black','cm_contacts','ListId\x20=\x20?','\x20=\x20','date_add(cm_contacts.scheduledat,interval\x20','cm_hopper.id','cm_contact_has_items.createdAt','cm_contact_has_items.updatedAt','CmHopperId','cm_contacts.id\x20=\x20cm_hopper.ContactId','cm_contacts.id\x20=\x20cm_contact_has_items.CmContactId','concat','keys','scheduledAt',')\x20NOT\x20IN\x20?','id\x20IN\x20?','Received\x20SIGINT','error','message','exit','info','sequelize','query','spread','catch','campaigns.id','campaigns.dialTimezone','campaigns','campaigns.id\x20=\x20campaigns_has_cm_lists.CampaignId','campaigns_has_cm_lists.CmListId=','voice_queues.id','voice_queues.dialTimezone','voice_queues','voice_queues_has_cm_lists','voice_queues_has_cm_lists.CmListId=','dialTimezone','utcOffset','set','offset','stringify','send','start','binding','socket_timestamp','server/files/tmp','includes','header','name','_description','parse','data','errors','find','hasOwnProperty','trim','replace','isValid','scheduledat\x20wrong\x20format\x20(YYYY-MM-DD\x20HH:mm:ss)','isNaN','isNumber','agent\x20not\x20exists','email','email\x20wrong\x20format','dateOfBirth','dateOfBirth\x20wrong\x20format\x20(YYYY-MM-DD)','timezones','\x20not\x20specified','description','rows','emit','Abort\x20parser','SystemError','step','cm_contacts_','CREATE\x20TABLE\x20','\x20LIKE\x20cm_contacts;','voice_queues_','each','dialTimezone,utcOffset','LOAD\x20DATA\x20LOCAL\x20INFILE\x20\x27%s\x27\x20INTO\x20TABLE\x20%s\x20CHARACTER\x20SET\x20UTF8\x20FIELDS\x20TERMINATED\x20BY\x20\x27,\x27\x20ENCLOSED\x20BY\x20\x27\x22\x27\x20LINES\x20TERMINATED\x20BY\x20\x27\x0a\x27\x20IGNORE\x201\x20ROWS\x20(%s)\x20SET\x20id\x20=\x20NULL,\x20ListId\x20=\x20%s,\x20CompanyId\x20=\x20%s,\x20createdAt\x20=\x20\x27%s\x27,\x20updatedAt\x20=\x20\x27%s\x27','CompanyId',',\x20scheduledAt\x20=\x20NOW()','duplicates','DROP\x20TABLE\x20','contactId','contactTypeId','orderBy','VoiceQueueId','voice_queues_has_cm_blacklists','campaigns_has_cm_lists','CampaignId','campaigns_has_cm_blacklists','affectedRows','unlink','argv','root'];(function(_0x5d9efa,_0x5a0f17){var _0x11bb09=function(_0x495866){while(--_0x495866){_0x5d9efa['push'](_0x5d9efa['shift']());}};_0x11bb09(++_0x5a0f17);}(_0x0f6c,0x163));var _0xc0f6=function(_0x501510,_0x61caa9){_0x501510=_0x501510-0x0;var _0x1e6ee5=_0x0f6c[_0x501510];return _0x1e6ee5;};'use strict';var fs=require('fs');var path=require(_0xc0f6('0x0'));var _=require('lodash');var Papa=require('papaparse');var util=require(_0xc0f6('0x1'));var BPromise=require(_0xc0f6('0x2'));var moment=require(_0xc0f6('0x3'));var squel=require('squel');var Redis=require(_0xc0f6('0x4'));var db=require(_0xc0f6('0x5'))['db'];var config=require(_0xc0f6('0x6'));var shared=require(_0xc0f6('0x7'));var logger=require(_0xc0f6('0x8'))(_0xc0f6('0x9'));config[_0xc0f6('0xa')]=_[_0xc0f6('0xb')](config[_0xc0f6('0xa')],{'host':_0xc0f6('0xc'),'port':0x18eb});var socket=require(_0xc0f6('0xd'))(new Redis(config[_0xc0f6('0xa')]));var stats={'finish':![],'errors':[],'rows':0x0,'affectedRows':0x0};var results=[];var promisesAdditionalPhones=[];var orderBy=0x0;var stopped=![];var NOW=moment()[_0xc0f6('0xe')]('YYYY-MM-DD\x20HH:mm:ss');var contactItemTypes=[];var phoneDescriptions=[];var hasAdditionalPhones=![];var tmp_voice_queues;var tmp_campaigns;var tzOffset=0x0;var hasTZ;var NOW=moment()['format'](_0xc0f6('0xf'));function isEmail(_0x18d3ee){return/^([^\x00-\x20\x22\x28\x29\x2c\x2e\x3a-\x3c\x3e\x40\x5b-\x5d\x7f-\xff]+|\x22([^\x0d\x22\x5c\x80-\xff]|\x5c[\x00-\x7f])*\x22)(\x2e([^\x00-\x20\x22\x28\x29\x2c\x2e\x3a-\x3c\x3e\x40\x5b-\x5d\x7f-\xff]+|\x22([^\x0d\x22\x5c\x80-\xff]|\x5c[\x00-\x7f])*\x22))*\x40([^\x00-\x20\x22\x28\x29\x2c\x2e\x3a-\x3c\x3e\x40\x5b-\x5d\x7f-\xff]+|\x5b([^\x0d\x5b-\x5d\x80-\xff]|\x5c[\x00-\x7f])*\x5d)(\x2e([^\x00-\x20\x22\x28\x29\x2c\x2e\x3a-\x3c\x3e\x40\x5b-\x5d\x7f-\xff]+|\x5b([^\x0d\x5b-\x5d\x80-\xff]|\x5c[\x00-\x7f])*\x5d))*$/[_0xc0f6('0x10')](_0x18d3ee);}function selectNotIn(_0xeb553,_0x486c75,_0x5db78e,_0x4633e5,_0x6034a0){return squel[_0xc0f6('0x11')]()[_0xc0f6('0x12')]('phone')[_0xc0f6('0x13')](_0x4633e5)['join'](_0x486c75,null,_0x486c75+_0xc0f6('0x14')+_0x4633e5+'.'+_0x5db78e)['where'](_0x4633e5+'.'+_0x5db78e+'\x20=\x20'+_0xeb553+'.'+_0x5db78e)[_0xc0f6('0x15')](_0x486c75+_0xc0f6('0x16')+_0x6034a0['join']()+')');}function handleAdditionalPhones(){return new Promise(function(_0x5a5610,_0x115362){promisesAdditionalPhones=[];return db[_0xc0f6('0x17')][_0xc0f6('0x18')]({'raw':!![],'attributes':['id',_0xc0f6('0x19')],'where':{'createdAt':NOW,'AdditionalPhones':{'$ne':null}}})[_0xc0f6('0x1a')](function(_0x204859){if(_0x204859!==null){var _0x3fee30=[];for(var _0x390c0c=0x0;_0x390c0c<_0x204859[_0xc0f6('0x1b')];_0x390c0c++){var _0x7bd174=_0x204859[_0x390c0c];_0x3fee30[_0xc0f6('0x1c')](insertAdditionalPhones(_0x7bd174));}}Promise[_0xc0f6('0x1d')](_0x3fee30)[_0xc0f6('0x1a')](function(){_0x5a5610({'val':0x1});});});});}function insertAdditionalPhones(_0x1fc01a){return new Promise(function(_0x16b720,_0x307ae4){var _0x10df5d=_0x1fc01a['AdditionalPhones'];var _0x21f3c7=_0x10df5d['split'](';');var _0x31e6d4=[];orderBy=0x0;for(var _0x336a58=0x0;_0x336a58<_0x21f3c7[_0xc0f6('0x1b')];_0x336a58++){_0x31e6d4[_0xc0f6('0x1c')](splitAdditionalPhone(_0x1fc01a['id'],_0x21f3c7[_0x336a58]));}Promise[_0xc0f6('0x1d')](_0x31e6d4)[_0xc0f6('0x1a')](function(){_0x16b720({'val':_0x21f3c7[_0xc0f6('0x1b')]});});});}function splitAdditionalPhone(_0x17f724,_0x5f3c1b){return new Promise(function(_0x5e9d2a,_0x3e2065){var _0x9973f=_0x5f3c1b[_0xc0f6('0x1e')](':');var _0x20136c=_0x9973f[0x0];var _0x277389=_0x9973f[0x1];if(!_[_0xc0f6('0x1f')](_0x277389)){var _0x58bef0=_0x277389[_0xc0f6('0x1e')]('|');var _0x4d295d=[];for(var _0x4a9016=0x0;_0x4a9016<_0x58bef0[_0xc0f6('0x1b')];_0x4a9016++){if(_0x58bef0[_0x4a9016]!==''){var _0x5ea66f=_['filter'](promisesAdditionalPhones,{'contactId':_0x17f724,'phone':_0x58bef0[_0x4a9016]});if(_0x5ea66f[_0xc0f6('0x1b')]==0x0){orderBy++;promisesAdditionalPhones[_0xc0f6('0x1c')]({'contactId':_0x17f724,'contactTypeId':_0x20136c,'phone':_0x58bef0[_0x4a9016],'orderBy':orderBy});}}}_0x5e9d2a({'ok':0x1});}else _0x5e9d2a({'res':0x0});});}function createAdditionalPhone(_0x1e0984,_0x1f1c5c,_0x3faad4,_0x552775){var _0x45f553='';var _0x4ccca4='';var _0x169492=_0x3faad4[_0xc0f6('0x1e')]('§');_0x45f553=_0x169492[0x0];if(_0x169492[_0xc0f6('0x1b')]==0x2)_0x4ccca4=_0x169492[0x1];return new Promise(function(_0x3b9e9f,_0x56f23a){return db[_0xc0f6('0x20')][_0xc0f6('0x21')]({'where':{'CmContactId':_0x1e0984,'item':_0x45f553}})['then'](function(_0x3f2dcd){if(_0x3f2dcd){return db[_0xc0f6('0x20')][_0xc0f6('0x22')]({'ItemTypeId':_0x1f1c5c,'description':_0x4ccca4,'OrderBy':_0x552775},{'where':{'CmContactId':_0x1e0984,'item':_0x45f553}})[_0xc0f6('0x1a')](function(_0x6467dc){_0x3b9e9f({'res':'updated'});});}else{return db[_0xc0f6('0x20')][_0xc0f6('0x23')]({'CmContactId':_0x1e0984,'item':_0x45f553,'description':_0x4ccca4,'ItemTypeId':_0x1f1c5c,'OrderBy':_0x552775,'ItemClass':_0xc0f6('0x24')})[_0xc0f6('0x1a')](function(_0x2ae124){_0x3b9e9f({'res':'inserted'});});}});});}function insertCmHopper(_0x323226,_0x4bae32,_0x3f8f22,_0x48d6b2,_0x543940){var _0xfef7=[_0xc0f6('0x25'),_0xc0f6('0x26'),_0xc0f6('0x27'),_0xc0f6('0x28'),_0x4bae32+'.'+_0x48d6b2,'cm_contacts.createdAt',_0xc0f6('0x29'),_0xc0f6('0x2a'),_0xc0f6('0x2b'),'\x22'+_0x543940+'\x22'];return squel[_0xc0f6('0x2c')]()[_0xc0f6('0x2d')](_0xc0f6('0x2e'))[_0xc0f6('0x2f')]([_0xc0f6('0x30'),_0xc0f6('0x31'),_0xc0f6('0x32'),_0xc0f6('0x33'),_0x48d6b2,_0xc0f6('0x34'),_0xc0f6('0x35'),_0xc0f6('0x36'),_0xc0f6('0x37'),_0xc0f6('0x38')],squel['select']()[_0xc0f6('0x39')](_0xfef7)[_0xc0f6('0x13')](_0x4bae32)['join']('cm_contacts',null,_0xc0f6('0x3a')+_0x4bae32+_0xc0f6('0x3b'))[_0xc0f6('0x3c')](_0x3f8f22,null,_0x3f8f22+_0xc0f6('0x14')+_0x4bae32+'.'+_0x48d6b2)['where'](_0x4bae32+_0xc0f6('0x3d'),_0x323226)[_0xc0f6('0x15')](_0xc0f6('0x3e'),NOW)['where'](_0xc0f6('0x3f'),selectNotIn(_0x4bae32,_0x3f8f22,_0x48d6b2,_0xc0f6('0x2e'),[_0xc0f6('0x40'),_0xc0f6('0x41')]))[_0xc0f6('0x15')](_0xc0f6('0x3f'),selectNotIn(_0x4bae32,_0x3f8f22,_0x48d6b2,_0xc0f6('0x2e'),[_0xc0f6('0x40')])))[_0xc0f6('0x42')]();}function insertCmHopperBlack(_0x421f62,_0x57fbac,_0x539d2a,_0x5f243d){var _0x1e050d=[_0xc0f6('0x25'),_0xc0f6('0x27'),_0xc0f6('0x28'),_0x57fbac+'.'+_0x5f243d,_0xc0f6('0x43'),_0xc0f6('0x29')];return squel[_0xc0f6('0x2c')]()[_0xc0f6('0x2d')](_0xc0f6('0x44'))[_0xc0f6('0x2f')](['phone',_0xc0f6('0x32'),_0xc0f6('0x33'),_0x5f243d,'createdAt',_0xc0f6('0x35')],squel[_0xc0f6('0x11')]()[_0xc0f6('0x39')](_0x1e050d)['from'](_0x57fbac)[_0xc0f6('0x3c')](_0xc0f6('0x45'),null,_0xc0f6('0x3a')+_0x57fbac+_0xc0f6('0x3b'))[_0xc0f6('0x3c')](_0x539d2a,null,_0x539d2a+_0xc0f6('0x14')+_0x57fbac+'.'+_0x5f243d)[_0xc0f6('0x15')](_0x57fbac+'.CmListId\x20=\x20?',_0x421f62)[_0xc0f6('0x15')](_0xc0f6('0x3e'),NOW)[_0xc0f6('0x15')](_0xc0f6('0x3f'),squel['select']()[_0xc0f6('0x12')](_0xc0f6('0x30'))[_0xc0f6('0x13')]('cm_hopper_black')[_0xc0f6('0x15')](_0xc0f6('0x46'),_0x421f62)['where'](_0x5f243d+_0xc0f6('0x47')+_0x57fbac+'.'+_0x5f243d)))['toString']();}function insertTzCmHopper(_0xfdbdf4,_0x43c425,_0x2b7fb1,_0x858593,_0x33dcf1,_0x33c60c){var _0xa4efcb=[_0xc0f6('0x25'),_0xc0f6('0x48')+_0x33c60c+'.offset-cm_contacts.utcOffset\x20minute)',_0xc0f6('0x27'),_0xc0f6('0x28'),_0x43c425+'.'+_0x858593,'cm_contacts.createdAt','cm_contacts.updatedAt','cm_contacts.priority','cm_contacts.UserId','\x22'+_0x33dcf1+'\x22'];var _0x31c328=squel['insert']()['into']('cm_hopper')[_0xc0f6('0x2f')]([_0xc0f6('0x30'),'scheduledat',_0xc0f6('0x32'),'ListId',_0x858593,_0xc0f6('0x34'),_0xc0f6('0x35'),_0xc0f6('0x36'),_0xc0f6('0x37'),'recallme'],squel[_0xc0f6('0x11')]()[_0xc0f6('0x39')](_0xa4efcb)[_0xc0f6('0x13')](_0x43c425)[_0xc0f6('0x3c')](_0xc0f6('0x45'),null,_0xc0f6('0x3a')+_0x43c425+_0xc0f6('0x3b'))[_0xc0f6('0x3c')](_0x2b7fb1,null,_0x2b7fb1+_0xc0f6('0x14')+_0x43c425+'.'+_0x858593)[_0xc0f6('0x3c')](_0x33c60c,null,_0x33c60c+_0xc0f6('0x14')+_0x43c425+'.'+_0x858593)['where'](_0x43c425+'.CmListId\x20=\x20?',_0xfdbdf4)[_0xc0f6('0x15')]('cm_contacts.createdAt\x20=\x20?',NOW)['where'](_0xc0f6('0x3f'),selectNotIn(_0x43c425,_0x2b7fb1,_0x858593,'cm_hopper',[_0xc0f6('0x40'),_0xc0f6('0x41')]))[_0xc0f6('0x15')](_0xc0f6('0x3f'),selectNotIn(_0x43c425,_0x2b7fb1,_0x858593,_0xc0f6('0x2e'),['\x22always\x22'])))['toString']();return _0x31c328;}function insertTzCmHopperBlack(_0xe344fa,_0x3542da,_0x1c69f8,_0x40c14f){var _0x2e4129=[_0xc0f6('0x25'),_0xc0f6('0x27'),'cm_contacts.ListId',_0x3542da+'.'+_0x40c14f,_0xc0f6('0x43'),'cm_contacts.updatedAt'];return squel[_0xc0f6('0x2c')]()[_0xc0f6('0x2d')](_0xc0f6('0x44'))[_0xc0f6('0x2f')]([_0xc0f6('0x30'),_0xc0f6('0x32'),_0xc0f6('0x33'),_0x40c14f,_0xc0f6('0x34'),_0xc0f6('0x35')],squel[_0xc0f6('0x11')]()[_0xc0f6('0x39')](_0x2e4129)[_0xc0f6('0x13')](_0x3542da)[_0xc0f6('0x3c')](_0xc0f6('0x45'),null,'cm_contacts.ListId\x20=\x20'+_0x3542da+'.CmListId')[_0xc0f6('0x3c')](_0x1c69f8,null,_0x1c69f8+_0xc0f6('0x14')+_0x3542da+'.'+_0x40c14f)[_0xc0f6('0x15')](_0x3542da+_0xc0f6('0x3d'),_0xe344fa)[_0xc0f6('0x15')](_0xc0f6('0x3e'),NOW)[_0xc0f6('0x15')]('cm_contacts.phone\x20NOT\x20IN\x20(?)',squel[_0xc0f6('0x11')]()[_0xc0f6('0x12')]('phone')[_0xc0f6('0x13')](_0xc0f6('0x44'))[_0xc0f6('0x15')](_0xc0f6('0x46'),_0xe344fa)[_0xc0f6('0x15')](_0x40c14f+'\x20=\x20'+_0x3542da+'.'+_0x40c14f)))[_0xc0f6('0x42')]();}function insertCmHopperAdditionalPhones(_0x5395e2){var _0x1f7f3e=[_0xc0f6('0x49'),'cm_contact_has_items.item','cm_contact_has_items.OrderBy',_0xc0f6('0x4a'),_0xc0f6('0x4b')];return squel[_0xc0f6('0x2c')]()[_0xc0f6('0x2d')]('cm_hopper_additional_phones')[_0xc0f6('0x2f')]([_0xc0f6('0x4c'),_0xc0f6('0x30'),'OrderBy',_0xc0f6('0x34'),_0xc0f6('0x35')],squel[_0xc0f6('0x11')]()[_0xc0f6('0x39')](_0x1f7f3e)[_0xc0f6('0x13')]('cm_hopper')[_0xc0f6('0x3c')](_0xc0f6('0x45'),null,_0xc0f6('0x4d'))['join']('cm_contact_has_items',null,_0xc0f6('0x4e'))[_0xc0f6('0x15')]('cm_hopper.ListId\x20=\x20?',_0x5395e2)[_0xc0f6('0x15')]('cm_contacts.createdAt\x20=\x20?',NOW))[_0xc0f6('0x42')]();}function insertCmContact(_0x1df7db,_0x1ae0e6,_0x2f0c4e,_0x1281d9){var _0x1fd11b=_[_0xc0f6('0x4f')](_[_0xc0f6('0x50')](_0x1281d9),[_0xc0f6('0x33'),'CompanyId',_0xc0f6('0x34'),_0xc0f6('0x35'),_0xc0f6('0x51')]);return squel[_0xc0f6('0x2c')]()['into']('cm_contacts')[_0xc0f6('0x2f')](_0x1fd11b,squel[_0xc0f6('0x11')]()[_0xc0f6('0x39')](_0x1fd11b)[_0xc0f6('0x13')](_0x1ae0e6)[_0xc0f6('0x15')]('('+_0x2f0c4e[_0xc0f6('0x3c')](',')+_0xc0f6('0x52'),squel[_0xc0f6('0x11')]()[_0xc0f6('0x39')](_0x2f0c4e)[_0xc0f6('0x13')](_0xc0f6('0x45'))['where'](_0xc0f6('0x46'),_0x1df7db)[_0xc0f6('0x15')]('deletedAt\x20IS\x20NULL'))[_0xc0f6('0x15')](_0xc0f6('0x53'),squel['select']()[_0xc0f6('0x12')]('MIN(id)','min_id')[_0xc0f6('0x13')](_0x1ae0e6)['group'](_0x2f0c4e['join'](','))))['toString']();}function handleStop(){logger['info'](_0xc0f6('0x54'));stopped=!![];}function handleUncaughtException(_0x49c782){logger[_0xc0f6('0x55')](_0x49c782[_0xc0f6('0x56')]);process[_0xc0f6('0x57')](0x1);}function handleError(_0x6b3847,_0x266708){stats['errors'][_0xc0f6('0x1c')]({'name':_0x266708['code'],'message':_0x266708[_0xc0f6('0x56')],'row':_0x6b3847});}function handleQuery(_0x4445cc){logger[_0xc0f6('0x58')](_0x4445cc);return db[_0xc0f6('0x59')][_0xc0f6('0x5a')](_0x4445cc)[_0xc0f6('0x5b')](function(_0x32b817){results[_0xc0f6('0x1c')](_0x32b817);})[_0xc0f6('0x5c')](function(_0x2c05a0){logger['error'](_0x2c05a0[_0xc0f6('0x56')]);});}function updateTzCampaigns(_0x9dd6e4){return new Promise(function(_0x597d11,_0x2a0995){var _0x1bfe7a=squel[_0xc0f6('0x11')]()[_0xc0f6('0x39')]([_0xc0f6('0x5d'),_0xc0f6('0x5e')])['from'](_0xc0f6('0x5f'))[_0xc0f6('0x3c')]('campaigns_has_cm_lists',null,_0xc0f6('0x60'))[_0xc0f6('0x15')](_0xc0f6('0x61')+_0x9dd6e4);db[_0xc0f6('0x59')][_0xc0f6('0x5a')](_0x1bfe7a[_0xc0f6('0x42')]())[_0xc0f6('0x5b')](function(_0x1b5981){var _0x209c1d=[];for(var _0x2f6d2e=0x0;_0x2f6d2e<_0x1b5981[_0xc0f6('0x1b')];_0x2f6d2e++){_0x209c1d[_0xc0f6('0x1c')](getTimezoneData(_0x1b5981[_0x2f6d2e],tmp_campaigns));}BPromise['all'](_0x209c1d)['then'](function(){_0x597d11({'val':0x1});});})['catch'](function(_0x61c134){logger['error'](_0x61c134['message']);_0x597d11({'val':0x0});});});}function updateTzVoiceQueues(_0x22b17a){return new Promise(function(_0x3950f1,_0x4bfa7c){var _0x4fd470=squel[_0xc0f6('0x11')]()[_0xc0f6('0x39')]([_0xc0f6('0x62'),_0xc0f6('0x63')])['from'](_0xc0f6('0x64'))[_0xc0f6('0x3c')](_0xc0f6('0x65'),null,'voice_queues.id\x20=\x20voice_queues_has_cm_lists.VoiceQueueId')[_0xc0f6('0x15')](_0xc0f6('0x66')+_0x22b17a);db[_0xc0f6('0x59')][_0xc0f6('0x5a')](_0x4fd470[_0xc0f6('0x42')]())[_0xc0f6('0x5b')](function(_0x355d55){var _0x5d3ef1=[];for(var _0x3c2cff=0x0;_0x3c2cff<_0x355d55[_0xc0f6('0x1b')];_0x3c2cff++){_0x5d3ef1['push'](getTimezoneData(_0x355d55[_0x3c2cff],tmp_voice_queues));}BPromise['all'](_0x5d3ef1)['then'](function(){_0x3950f1({'val':0x1});});})[_0xc0f6('0x5c')](function(_0x1b4a72){logger[_0xc0f6('0x55')](_0x1b4a72[_0xc0f6('0x56')]);_0x3950f1({'val':0x0});});});}function getTimezoneData(_0xf9846f,_0x1ff4a6){return new Promise(function(_0x3082e9,_0x50abd3){var _0x4b46f0=shared['timezones'];var _0x568330=_0x4b46f0[_0xf9846f[_0xc0f6('0x67')]];if(_[_0xc0f6('0x1f')](_0x568330)){_0x3082e9({'ret':0x1});}else{var _0x1556fd=_0x568330[_0xc0f6('0x68')];var _0x3c7f30=squel[_0xc0f6('0x2c')]()[_0xc0f6('0x2d')](_0x1ff4a6)[_0xc0f6('0x69')]('id',_0xf9846f['id'])[_0xc0f6('0x69')](_0xc0f6('0x6a'),_0x1556fd)['set'](_0xc0f6('0x67'),_0xf9846f['dialTimezone'])['toString']();return db[_0xc0f6('0x59')][_0xc0f6('0x5a')](_0x3c7f30)['spread'](function(_0x15ddaa){_0x3082e9({'ret':0x1});})[_0xc0f6('0x5c')](function(_0x247be9){logger[_0xc0f6('0x55')](_0x247be9[_0xc0f6('0x56')]);_0x50abd3({'ret':0x1});});}});}function handleTZQuery(_0x222f9b){logger[_0xc0f6('0x58')](_0x222f9b);return db['sequelize'][_0xc0f6('0x5a')](_0x222f9b)[_0xc0f6('0x5b')](function(_0x440cf4){})['catch'](function(_0x30a6a9){logger['error'](_0x30a6a9['message']);});}function main(_0x579e6a,_0x139fd7,_0x3f9524,_0x4f3c70){logger[_0xc0f6('0x58')]('main',_0x579e6a,JSON[_0xc0f6('0x6b')](_0x139fd7));process[_0xc0f6('0x6c')](_0xc0f6('0x6d'));var _0x10c4f4=_0x139fd7[_0xc0f6('0x6e')];var _0x1cd761=_['clone'](_0x10c4f4);var _0xf3d1d4=_0x139fd7[_0xc0f6('0x6f')];var _0x18e61f=path['join'](config['root'],_0xc0f6('0x70'),_0xf3d1d4+'.csv');hasTZ=_[_0xc0f6('0x50')](_0x10c4f4)[_0xc0f6('0x71')](_0xc0f6('0x67'));var _0x42a5ef=_[_0xc0f6('0x50')](_0x10c4f4)['join']();logger['info'](_0xc0f6('0x72'),_0x42a5ef);db['ContactItemType'][_0xc0f6('0x18')]({'raw':!![],'attributes':['id','name']})[_0xc0f6('0x1a')](function(_0x329918){for(var _0x6e37b1=0x0;_0x6e37b1<_0x329918[_0xc0f6('0x1b')];_0x6e37b1++){if(_0x329918[_0x6e37b1][_0xc0f6('0x73')]in _0x10c4f4){contactItemTypes['push'](_0x329918[_0x6e37b1]);delete _0x1cd761[_0x329918[_0x6e37b1][_0xc0f6('0x73')]];hasAdditionalPhones=!![];}for(var _0x76e0a6 in _0x10c4f4){if(_0x329918[_0x6e37b1][_0xc0f6('0x73')]+_0xc0f6('0x74')===_0x76e0a6){phoneDescriptions[_0xc0f6('0x1c')]({'itemTypeId':_0x329918[_0x6e37b1]['id'],'description':_0x76e0a6});delete _0x1cd761[_0x76e0a6];}}}if(hasAdditionalPhones)_0x1cd761['AdditionalPhones']='';var _0x391d9e=_[_0xc0f6('0x50')](_0x1cd761)[_0xc0f6('0x3c')]();logger[_0xc0f6('0x58')]('header',_0x391d9e);fs['writeFileSync'](_0x18e61f,_0x391d9e+'\x0a');Papa[_0xc0f6('0x75')](fs['createReadStream'](_0x579e6a),{'header':!![],'skipEmptyLines':!![],'step':function(_0x563ff8,_0x1a18b4){try{for(var _0x5cb165=0x0,_0x3bfdc0=[];_0x5cb165<_0x563ff8[_0xc0f6('0x76')][_0xc0f6('0x1b')];_0x5cb165++){stats['rows']+=0x1;if(_0x563ff8['errors'][_0x5cb165]){handleError(_0x563ff8['data'][_0x5cb165],_0x563ff8[_0xc0f6('0x77')][_0x5cb165]);}else{var _0x45a2ee=[];var _0x39d7ce=[];var _0x404d7a={};for(var _0x3d7d49 in _0x10c4f4){let _0x1b99e6=contactItemTypes['find'](_0x2907e7=>_0x2907e7[_0xc0f6('0x73')]===_0x3d7d49);let _0x2d8735=contactItemTypes[_0xc0f6('0x78')](_0x2d6da2=>_0x2d6da2['name']+_0xc0f6('0x74')===_0x3d7d49);if(_[_0xc0f6('0x1f')](_0x1b99e6)&&_[_0xc0f6('0x1f')](_0x2d8735)){if(_0x10c4f4[_0xc0f6('0x79')](_0x3d7d49)){if(_0x563ff8[_0xc0f6('0x76')][_0x5cb165][_0x10c4f4[_0x3d7d49]]){var _0x2a47a2=_[_0xc0f6('0x7a')](_0x563ff8[_0xc0f6('0x76')][_0x5cb165][_0x10c4f4[_0x3d7d49]][_0xc0f6('0x7b')](/"/g,'\x27'));switch(_0x3d7d49){case'scheduledat':var _0x8d74a5=moment(_0x2a47a2,_0xc0f6('0xf'),!![]);if(_0x8d74a5[_0xc0f6('0x7c')]()){_0x3bfdc0[_0xc0f6('0x1c')]('\x22'+_0x2a47a2+'\x22');}else{_0x45a2ee['push'](_0xc0f6('0x7d'));}break;case _0xc0f6('0x36'):var _0x2f4532=parseInt(_0x2a47a2);_0x2a47a2=_[_0xc0f6('0x7e')](_0x2f4532)||_0x2f4532<0x0||_0x2f4532>0x4?_0x4f3c70?0x3:0x2:_0x2f4532;_0x3bfdc0[_0xc0f6('0x1c')]('\x22'+_0x2a47a2+'\x22');break;case _0xc0f6('0x37'):var _0x4eb28a=parseInt(_0x2a47a2);if(_[_0xc0f6('0x7f')](_0x4eb28a)&&_[_0xc0f6('0x71')](_0x3f9524,_0x4eb28a)){_0x3bfdc0[_0xc0f6('0x1c')]('\x22'+_0x4eb28a+'\x22');}else{_0x45a2ee['push'](_0xc0f6('0x80'));}break;case _0xc0f6('0x81'):if(isEmail(_0x2a47a2)){_0x3bfdc0[_0xc0f6('0x1c')]('\x22'+_0x2a47a2+'\x22');}else{_0x45a2ee[_0xc0f6('0x1c')](_0xc0f6('0x82'));}break;case _0xc0f6('0x83'):var _0x328ff2=moment(_0x2a47a2,'YYYY-MM-DD',!![]);if(_0x328ff2['isValid']()){_0x3bfdc0[_0xc0f6('0x1c')]('\x22'+_0x2a47a2+'\x22');}else{_0x45a2ee[_0xc0f6('0x1c')](_0xc0f6('0x84'));}break;case _0xc0f6('0x67'):var _0x59e093=shared[_0xc0f6('0x85')];var _0x4fe659=_0x59e093[_0x2a47a2];if(!_[_0xc0f6('0x1f')](_0x4fe659)){var _0x10a5fc=_0x4fe659[_0xc0f6('0x68')];_0x3bfdc0[_0xc0f6('0x1c')]('\x22'+_0x2a47a2+'\x22');_0x3bfdc0[_0xc0f6('0x1c')]('\x22'+_0x10a5fc+'\x22');}break;default:_0x3bfdc0[_0xc0f6('0x1c')]('\x22'+_0x2a47a2+'\x22');}}else{switch(_0x3d7d49){case'firstName':case _0xc0f6('0x30'):_0x45a2ee['push'](_0x3d7d49+_0xc0f6('0x86'));break;default:_0x3bfdc0[_0xc0f6('0x1c')]('\x22\x22');}}}}else{var _0x244539='';if(!_['isNil'](_0x1b99e6)){if(!_0x404d7a[_0xc0f6('0x79')](_0x1b99e6['id'])){if(!_['isNil'](_0x563ff8['data'][_0x5cb165][_0x10c4f4[_0x3d7d49]])){var _0x2a47a2=_[_0xc0f6('0x7a')](_0x563ff8[_0xc0f6('0x76')][_0x5cb165][_0x10c4f4[_0x3d7d49]][_0xc0f6('0x7b')](/"/g,'\x27'));var _0x21f325=phoneDescriptions['find'](_0x9e7d5f=>_0x9e7d5f['itemTypeId']===_0x1b99e6['id']);if(!_['isNil'](_0x21f325)){var _0x3a613a=_[_0xc0f6('0x7a')](_0x563ff8['data'][_0x5cb165][_0x10c4f4[_0x21f325[_0xc0f6('0x87')]]]['replace'](/"/g,'\x27'));if(!_['isNil'](_0x3a613a))_0x2a47a2=_0x2a47a2+'§'+_0x3a613a;}if(_0x244539=='')_0x244539=_0x2a47a2;else _0x244539+='|'+_0x2a47a2;}_0x39d7ce[_0xc0f6('0x1c')](_0x1b99e6['id']+':'+_0x244539);_0x404d7a[_0x1b99e6['id']]=0x1;}}}}if(hasAdditionalPhones){_0x3bfdc0[_0xc0f6('0x1c')]('\x22'+_0x39d7ce[_0xc0f6('0x3c')](';')+'\x22');}if(_0x45a2ee[_0xc0f6('0x1b')]){handleError(_0x563ff8[_0xc0f6('0x76')][_0x5cb165],{'code':'SystemRow','message':_0x45a2ee['join']()});}else{fs['appendFileSync'](_0x18e61f,_0x3bfdc0[_0xc0f6('0x3c')]()+'\x0a');}_0x3bfdc0=[];}if(!(stats[_0xc0f6('0x88')]%0xc8)){socket[_0xc0f6('0x89')]('contact:import:'+_0xf3d1d4,stats);stats[_0xc0f6('0x77')]=[];}}if(stopped){logger['info'](_0xc0f6('0x8a'));_0x1a18b4['abort']();}}catch(_0x4ca103){handleError(_0x563ff8[_0xc0f6('0x76')][_0x5cb165],{'code':_0xc0f6('0x8b'),'message':_0x4ca103['message']});logger['error'](_0xc0f6('0x8c'),_0x4ca103['message']);}},'complete':function(){try{var _0x494c8f=[];var _0x18dcd6=[];var _0x2ab069=_0xc0f6('0x45');if(_0x139fd7['duplicates']&&_0x139fd7['duplicates'][_0xc0f6('0x1b')]){_0x2ab069=_0xc0f6('0x8d')+_0xf3d1d4;_0x494c8f[_0xc0f6('0x1c')](_0xc0f6('0x8e')+_0x2ab069+_0xc0f6('0x8f'));}tmp_campaigns='campaigns_'+_0xf3d1d4;tmp_voice_queues=_0xc0f6('0x90')+_0xf3d1d4;_0x18dcd6[_0xc0f6('0x1c')]('CREATE\x20TABLE\x20'+tmp_campaigns+'(id\x20int,dialTimezone\x20varchar(255),offset\x20int);');_0x18dcd6[_0xc0f6('0x1c')](_0xc0f6('0x8e')+tmp_voice_queues+'(id\x20int,dialTimezone\x20varchar(255),offset\x20int);');BPromise[_0xc0f6('0x91')](_0x18dcd6,handleTZQuery)['then'](function(_0x49daec){updateTzCampaigns(_0x139fd7[_0xc0f6('0x33')])[_0xc0f6('0x1a')](function(_0x4ce570){updateTzVoiceQueues(_0x139fd7[_0xc0f6('0x33')])[_0xc0f6('0x1a')](function(_0xfa9663){if(hasTZ)_0x391d9e=_0x391d9e['replace'](_0xc0f6('0x67'),_0xc0f6('0x92'));var _0x14ec7c=util['format'](_0xc0f6('0x93'),_0x18e61f,_0x2ab069,_0x391d9e,_0x139fd7[_0xc0f6('0x33')],_0x139fd7[_0xc0f6('0x94')]||null,NOW,NOW);if(_[_0xc0f6('0x1f')](_0x10c4f4['scheduledat'])){_0x14ec7c+=_0xc0f6('0x95');}_0x494c8f[_0xc0f6('0x1c')](_0x14ec7c);if(_0x139fd7['duplicates']&&_0x139fd7[_0xc0f6('0x96')][_0xc0f6('0x1b')]){_0x494c8f[_0xc0f6('0x1c')](insertCmContact(_0x139fd7['ListId'],_0x2ab069,_0x139fd7['duplicates'],_0x10c4f4));_0x494c8f[_0xc0f6('0x1c')](_0xc0f6('0x97')+_0x2ab069+';');}BPromise['each'](_0x494c8f,handleQuery)[_0xc0f6('0x1a')](function(_0x461722){BPromise['all']([handleAdditionalPhones()])[_0xc0f6('0x1a')](function(){_0x494c8f=[];for(var _0x42769f=0x0;_0x42769f\x20\x20');}var _0x3f1104=path['join'](config[_0xc0f6('0xa3')],_0xc0f6('0x70'),process[_0xc0f6('0xa2')][0x2]);if(!fs[_0xc0f6('0xa4')](_0x3f1104)){throw new Error(_0xc0f6('0xa5'));}var _0x23a1b6={};try{_0x23a1b6=JSON[_0xc0f6('0x75')](process[_0xc0f6('0xa2')][0x3]);if(!_0x23a1b6['binding']){throw new Error(_0xc0f6('0xa6'));}if(!_0x23a1b6[_0xc0f6('0x6e')]['phone']){throw new Error(_0xc0f6('0xa7'));}if(!_0x23a1b6[_0xc0f6('0x6e')][_0xc0f6('0xa8')]){throw new Error(_0xc0f6('0xa9'));}var _0x21bc4d=0x0;if(_0x23a1b6[_0xc0f6('0x6e')][_0xc0f6('0x37')]){_0x21bc4d=0x1;}if(!_0x23a1b6['ListId']){throw new Error('ListId\x20is\x20mandatory');}}catch(_0x298276){throw new Error(_0xc0f6('0xaa'));}var _0x4a8bad=[];try{_0x4a8bad=_[_0xc0f6('0xab')](JSON['parse'](process[_0xc0f6('0xa2')][0x4]),'id');}catch(_0x37d712){logger[_0xc0f6('0x58')](_0xc0f6('0xac'));}main(_0x3f1104,_0x23a1b6,_0x4a8bad,_0x21bc4d);}validate();process['on']('SIGINT',handleStop);process['on']('uncaughtException',handleUncaughtException); \ No newline at end of file diff --git a/server/components/import/cm/csvUpdates.js b/server/components/import/cm/csvUpdates.js index 3885d9d..b3752db 100644 --- a/server/components/import/cm/csvUpdates.js +++ b/server/components/import/cm/csvUpdates.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xda2d=['from','cm_contacts','cm_contacts.ListId\x20=\x20','.CmListId\x20=\x20?','cm_contacts.createdAt\x20=\x20?','cm_contacts.phone\x20NOT\x20IN\x20(?)','\x22always\x22','\x22onlyIfOpen\x22','cm_contacts.phone','cm_contacts.updatedAt','ListId','createdAt','fields','.CmListId','ListId\x20=\x20?','\x20=\x20?','cm_contact_has_items.OrderBy','cm_contact_has_items.createdAt','cm_contact_has_items.updatedAt','cm_hopper_additional_phones','CmHopperId','OrderBy','cm_contacts.id\x20=\x20cm_hopper.ContactId','cm_contacts.id\x20=\x20cm_contact_has_items.CmContactId','cm_hopper.ListId\x20=\x20?','concat','keys',')\x20NOT\x20IN\x20?','field','MIN(id)','group','info','Received\x20SIGINT','exit','code','sequelize','stringify','send','start','binding','clone','socket_timestamp','server/files/tmp','.csv','body','ContactItemType','name','_description','header','writeFileSync','parse','errors','data','find','hasOwnProperty','replace','YYYY-MM-DD\x20HH:mm:ss','isValid','scheduledat\x20wrong\x20format\x20(YYYY-MM-DD\x20HH:mm:ss)','isNaN','isNumber','includes','agent\x20not\x20exists','email','email\x20wrong\x20format','dateOfBirth','YYYY-MM-DD','dateOfBirth\x20wrong\x20format\x20(YYYY-MM-DD)','\x20not\x20specified','trim','itemTypeId','SystemRow','appendFileSync','rows','emit','contact:import:','Abort\x20parser','step','CREATE\x20TABLE\x20','\x20LIKE\x20cm_contacts;','CIS\x20len','LOAD\x20DATA\x20LOCAL\x20INFILE\x20\x27%s\x27\x20INTO\x20TABLE\x20%s\x20CHARACTER\x20SET\x20UTF8\x20FIELDS\x20TERMINATED\x20BY\x20\x27,\x27\x20ENCLOSED\x20BY\x20\x27\x22\x27\x20LINES\x20TERMINATED\x20BY\x20\x27\x0a\x27\x20IGNORE\x201\x20ROWS\x20(%s)\x20SET\x20ListId\x20=\x20%s,\x20CompanyId\x20=\x20%s,\x20createdAt\x20=\x20\x27%s\x27,\x20updatedAt\x20=\x20\x27%s\x27','CompanyId',',\x20scheduledAt\x20=\x20NOW()','each','contact','contactId','contactTypeId','orderBy','DROP\x20TABLE\x20','unlink','argv','arguments\x20\x20\x20','root','file\x20doesn\x27t\x20exists','binding\x20doesn\x27t\x20exists','ListId\x20is\x20mandatory','body\x20id\x20mandatory','map','No\x20agent\x20available','SIGINT','lodash','papaparse','util','bluebird','moment','../../../config/environment','../../../config/logger','import','redis','defaults','localhost','socket.io-emitter','format','cm_contacts_temp_','test','select','join','.id\x20=\x20','where','\x20=\x20','.dialCheckDuplicateType\x20IN\x20(','query','select\x20*\x20from\x20','spread','phone','isNil','AdditionalPhones','push','all','then','catch','error','message','length','split','filter','findOne','CmContactHasItem','create','CmContact','update','CmHopper','cm_contacts.id','cm_contacts.ListId','cm_contacts.createdAt','cm_contacts.UserId','insert','into','cm_hopper','fromQuery','scheduledat','ContactId','updatedAt','priority','UserId','recallme'];(function(_0x3c989f,_0x4a0d20){var _0x240960=function(_0x531460){while(--_0x531460){_0x3c989f['push'](_0x3c989f['shift']());}};_0x240960(++_0x4a0d20);}(_0xda2d,0x102));var _0xdda2=function(_0x2d259c,_0x1304cc){_0x2d259c=_0x2d259c-0x0;var _0x1f4169=_0xda2d[_0x2d259c];return _0x1f4169;};'use strict';var fs=require('fs');var path=require('path');var _=require(_0xdda2('0x0'));var Papa=require(_0xdda2('0x1'));var util=require(_0xdda2('0x2'));var BPromise=require(_0xdda2('0x3'));var moment=require(_0xdda2('0x4'));var squel=require('squel');var Redis=require('ioredis');var db=require('../../../mysqldb')['db'];var config=require(_0xdda2('0x5'));var logger=require(_0xdda2('0x6'))(_0xdda2('0x7'));config[_0xdda2('0x8')]=_[_0xdda2('0x9')](config[_0xdda2('0x8')],{'host':_0xdda2('0xa'),'port':0x18eb});var socket=require(_0xdda2('0xb'))(new Redis(config[_0xdda2('0x8')]));var stats={'finish':![],'errors':[],'rows':0x0,'affectedRows':0x0};var results=[];var promisesAdditionalPhones=[];var promisesContact=[];var orderBy=0x0;var updatedRows=0x0;var stopped=![];var NOW=moment()[_0xdda2('0xc')]('YYYY-MM-DD\x20HH:mm:ss');var tempTableName=_0xdda2('0xd')+moment()[_0xdda2('0xc')]('YYYYMMDDHHmmss');var contactItemTypes=[];var phoneDescriptions=[];var hasAdditionalPhones=![];function isEmail(_0x1c11b2){return/^([^\x00-\x20\x22\x28\x29\x2c\x2e\x3a-\x3c\x3e\x40\x5b-\x5d\x7f-\xff]+|\x22([^\x0d\x22\x5c\x80-\xff]|\x5c[\x00-\x7f])*\x22)(\x2e([^\x00-\x20\x22\x28\x29\x2c\x2e\x3a-\x3c\x3e\x40\x5b-\x5d\x7f-\xff]+|\x22([^\x0d\x22\x5c\x80-\xff]|\x5c[\x00-\x7f])*\x22))*\x40([^\x00-\x20\x22\x28\x29\x2c\x2e\x3a-\x3c\x3e\x40\x5b-\x5d\x7f-\xff]+|\x5b([^\x0d\x5b-\x5d\x80-\xff]|\x5c[\x00-\x7f])*\x5d)(\x2e([^\x00-\x20\x22\x28\x29\x2c\x2e\x3a-\x3c\x3e\x40\x5b-\x5d\x7f-\xff]+|\x5b([^\x0d\x5b-\x5d\x80-\xff]|\x5c[\x00-\x7f])*\x5d))*$/[_0xdda2('0xe')](_0x1c11b2);}function selectNotIn(_0x42d990,_0x346119,_0x171123,_0x30ca9a,_0x26fe81){return squel[_0xdda2('0xf')]()['field']('phone')['from'](_0x30ca9a)[_0xdda2('0x10')](_0x346119,null,_0x346119+_0xdda2('0x11')+_0x30ca9a+'.'+_0x171123)[_0xdda2('0x12')](_0x30ca9a+'.'+_0x171123+_0xdda2('0x13')+_0x42d990+'.'+_0x171123)[_0xdda2('0x12')](_0x346119+_0xdda2('0x14')+_0x26fe81[_0xdda2('0x10')]()+')');}function handleAdditionalPhones(){return new Promise(function(_0x4df902,_0x79c6d4){promisesAdditionalPhones=[];promisesContact=[];return db['sequelize'][_0xdda2('0x15')](_0xdda2('0x16')+tempTableName)[_0xdda2('0x17')](function(_0x457764){if(_0x457764!==null){var _0x1922b1=[];for(var _0x5d8a83=0x0;_0x5d8a83<_0x457764['length'];_0x5d8a83++){var _0x43f67b=_0x457764[_0x5d8a83];if(!_['isNil'](_0x43f67b[_0xdda2('0x18')])){if(!_[_0xdda2('0x19')](_0x43f67b[_0xdda2('0x1a')]))_0x1922b1[_0xdda2('0x1b')](insertAdditionalPhones(_0x43f67b));promisesContact[_0xdda2('0x1b')]({'contact':_0x43f67b});}}}Promise[_0xdda2('0x1c')](_0x1922b1)[_0xdda2('0x1d')](function(){_0x4df902({'val':0x1});});})[_0xdda2('0x1e')](function(_0x3c02a4){logger[_0xdda2('0x1f')](_0x3c02a4[_0xdda2('0x20')]);});});}function insertAdditionalPhones(_0x6fdede){return new Promise(function(_0x4eed30,_0x41fe7d){var _0x5dfce7=_0x6fdede[_0xdda2('0x1a')];if(_[_0xdda2('0x19')](_0x5dfce7))_0x41fe7d({'val':0x0});else{var _0xf994dc=_0x5dfce7['split'](';');var _0x347ee6=[];orderBy=0x0;for(var _0x5a9bb8=0x0;_0x5a9bb8<_0xf994dc[_0xdda2('0x21')];_0x5a9bb8++){_0x347ee6[_0xdda2('0x1b')](splitAdditionalPhone(_0x6fdede['id'],_0xf994dc[_0x5a9bb8]));}Promise['all'](_0x347ee6)[_0xdda2('0x1d')](function(){_0x4eed30({'val':_0xf994dc[_0xdda2('0x21')]});});}});}function splitAdditionalPhone(_0x2528d7,_0x13b0f3){return new Promise(function(_0x45ee9d,_0x5739ad){var _0x38cdf=_0x13b0f3[_0xdda2('0x22')](':');var _0x2391a5=_0x38cdf[0x0];var _0x31d48b=_0x38cdf[0x1];if(_0x31d48b!==''){var _0x5436d1=_0x31d48b['split']('|');var _0x28da54=[];for(var _0x4567e7=0x0;_0x4567e7<_0x5436d1[_0xdda2('0x21')];_0x4567e7++){if(_0x5436d1[_0x4567e7]!==''){var _0x5e9e74=_[_0xdda2('0x23')](promisesAdditionalPhones,{'contactId':_0x2528d7,'phone':_0x5436d1[_0x4567e7]});if(_0x5e9e74[_0xdda2('0x21')]==0x0){orderBy++;promisesAdditionalPhones[_0xdda2('0x1b')]({'contactId':_0x2528d7,'contactTypeId':_0x2391a5,'phone':_0x5436d1[_0x4567e7],'orderBy':orderBy});}}}_0x45ee9d({'ok':0x1});}else _0x45ee9d({'res':0x0});});}function createAdditionalPhone(_0xe53dee,_0xe16ec7,_0x91b41a,_0x4bb8a4){var _0x24c37d='';var _0x255bbc='';var _0x53acb5=_0x91b41a[_0xdda2('0x22')]('§');_0x24c37d=_0x53acb5[0x0];if(_0x53acb5[_0xdda2('0x21')]==0x2)_0x255bbc=_0x53acb5[0x1];return new Promise(function(_0x3b18b8,_0x15e511){return db['CmContactHasItem'][_0xdda2('0x24')]({'where':{'CmContactId':_0xe53dee,'item':_0x24c37d}})[_0xdda2('0x1d')](function(_0x4b19b7){if(_0x4b19b7){return db[_0xdda2('0x25')]['update']({'ItemTypeId':_0xe16ec7,'description':_0x255bbc,'OrderBy':_0x4bb8a4},{'where':{'CmContactId':_0xe53dee,'item':_0x24c37d}})[_0xdda2('0x1d')](function(_0x55809a){_0x3b18b8({'res':'updated'});});}else{return db['CmContactHasItem'][_0xdda2('0x26')]({'CmContactId':_0xe53dee,'item':_0x24c37d,'ItemTypeId':_0xe16ec7,'description':_0x255bbc,'OrderBy':_0x4bb8a4,'ItemClass':'PHONE'})[_0xdda2('0x1d')](function(_0x508664){_0x3b18b8({'res':'inserted'});});}});});}function updateContact(_0x52a509){return new Promise(function(_0x4637c1,_0x567717){var _0xca6046=_0x52a509['id'];delete _0x52a509['id'];return db[_0xdda2('0x27')][_0xdda2('0x28')](_0x52a509,{'where':{'id':_0xca6046}})[_0xdda2('0x1d')](function(_0x2bcfba){updatedRows+=0x1;return db[_0xdda2('0x29')][_0xdda2('0x28')]({'phone':_0x52a509[_0xdda2('0x18')]},{'where':{'ContactId':_0xca6046}})['then'](function(_0x461621){_0x4637c1({'ret':'OK'});});});});}function insertCmHopper(_0x4212da,_0x2f8674,_0x3d510c,_0x392373,_0x33c4b0){var _0x45d3ad=['cm_contacts.phone','cm_contacts.scheduledat',_0xdda2('0x2a'),_0xdda2('0x2b'),_0x2f8674+'.'+_0x392373,_0xdda2('0x2c'),'cm_contacts.updatedAt','cm_contacts.priority',_0xdda2('0x2d'),'\x22'+_0x33c4b0+'\x22'];return squel[_0xdda2('0x2e')]()[_0xdda2('0x2f')](_0xdda2('0x30'))[_0xdda2('0x31')](['phone',_0xdda2('0x32'),_0xdda2('0x33'),'ListId',_0x392373,'createdAt',_0xdda2('0x34'),_0xdda2('0x35'),_0xdda2('0x36'),_0xdda2('0x37')],squel[_0xdda2('0xf')]()['fields'](_0x45d3ad)[_0xdda2('0x38')](_0x2f8674)[_0xdda2('0x10')](_0xdda2('0x39'),null,_0xdda2('0x3a')+_0x2f8674+'.CmListId')['join'](_0x3d510c,null,_0x3d510c+_0xdda2('0x11')+_0x2f8674+'.'+_0x392373)[_0xdda2('0x12')](_0x2f8674+_0xdda2('0x3b'),_0x4212da)['where'](_0xdda2('0x3c'),NOW)['where'](_0xdda2('0x3d'),selectNotIn(_0x2f8674,_0x3d510c,_0x392373,'cm_hopper',[_0xdda2('0x3e'),_0xdda2('0x3f')]))[_0xdda2('0x12')](_0xdda2('0x3d'),selectNotIn(_0x2f8674,_0x3d510c,_0x392373,'cm_hopper',[_0xdda2('0x3e')])))['toString']();}function insertCmHopperBlack(_0x392f70,_0x4d3b78,_0x1d1678,_0x12589b){var _0x153acf=[_0xdda2('0x40'),_0xdda2('0x2a'),'cm_contacts.ListId',_0x4d3b78+'.'+_0x12589b,_0xdda2('0x2c'),_0xdda2('0x41')];return squel['insert']()[_0xdda2('0x2f')]('cm_hopper_black')[_0xdda2('0x31')]([_0xdda2('0x18'),_0xdda2('0x33'),_0xdda2('0x42'),_0x12589b,_0xdda2('0x43'),_0xdda2('0x34')],squel[_0xdda2('0xf')]()[_0xdda2('0x44')](_0x153acf)[_0xdda2('0x38')](_0x4d3b78)[_0xdda2('0x10')](_0xdda2('0x39'),null,_0xdda2('0x3a')+_0x4d3b78+_0xdda2('0x45'))['join'](_0x1d1678,null,_0x1d1678+'.id\x20=\x20'+_0x4d3b78+'.'+_0x12589b)['where'](_0x4d3b78+_0xdda2('0x3b'),_0x392f70)[_0xdda2('0x12')]('cm_contacts.createdAt\x20=\x20?',NOW)[_0xdda2('0x12')](_0xdda2('0x3d'),squel[_0xdda2('0xf')]()['field'](_0xdda2('0x18'))[_0xdda2('0x38')]('cm_hopper_black')['where'](_0xdda2('0x46'),_0x392f70)['where'](_0x12589b+_0xdda2('0x47'),_0x4d3b78+'.'+_0x12589b)))['toString']();}function insertCmHopperAdditionalPhones(_0x306596){var _0x4300c1=['cm_hopper.id','cm_contact_has_items.item',_0xdda2('0x48'),_0xdda2('0x49'),_0xdda2('0x4a')];return squel[_0xdda2('0x2e')]()['into'](_0xdda2('0x4b'))[_0xdda2('0x31')]([_0xdda2('0x4c'),_0xdda2('0x18'),_0xdda2('0x4d'),'createdAt',_0xdda2('0x34')],squel[_0xdda2('0xf')]()['fields'](_0x4300c1)[_0xdda2('0x38')](_0xdda2('0x30'))[_0xdda2('0x10')](_0xdda2('0x39'),null,_0xdda2('0x4e'))[_0xdda2('0x10')]('cm_contact_has_items',null,_0xdda2('0x4f'))['where'](_0xdda2('0x50'),_0x306596)['where'](_0xdda2('0x3c'),NOW))['toString']();}function insertCmContact(_0x3b5bbf,_0x11c8b1,_0xbb30b8,_0x119f70){var _0xfc7dd7=_[_0xdda2('0x51')](_[_0xdda2('0x52')](_0x119f70),[_0xdda2('0x42'),'CompanyId',_0xdda2('0x43'),_0xdda2('0x34')]);return squel[_0xdda2('0x2e')]()['into'](_0xdda2('0x39'))[_0xdda2('0x31')](_0xfc7dd7,squel['select']()[_0xdda2('0x44')](_0xfc7dd7)['from'](_0x11c8b1)[_0xdda2('0x12')]('('+_0xbb30b8[_0xdda2('0x10')](',')+_0xdda2('0x53'),squel[_0xdda2('0xf')]()[_0xdda2('0x44')](_0xbb30b8)['from']('cm_contacts')['where'](_0xdda2('0x46'),_0x3b5bbf))[_0xdda2('0x12')]('id\x20IN\x20?',squel[_0xdda2('0xf')]()[_0xdda2('0x54')](_0xdda2('0x55'),'min_id')[_0xdda2('0x38')](_0x11c8b1)[_0xdda2('0x56')](_0xbb30b8[_0xdda2('0x10')](','))))['toString']();}function handleStop(){logger[_0xdda2('0x57')](_0xdda2('0x58'));stopped=!![];}function handleUncaughtException(_0x7eb83f){logger[_0xdda2('0x1f')](_0x7eb83f['message']);process[_0xdda2('0x59')](0x1);}function handleError(_0x4c94a3,_0x494b81){stats['errors'][_0xdda2('0x1b')]({'name':_0x494b81[_0xdda2('0x5a')],'message':_0x494b81[_0xdda2('0x20')],'row':_0x4c94a3});}function handleQuery(_0x433cb0){logger[_0xdda2('0x57')](_0x433cb0);return db[_0xdda2('0x5b')][_0xdda2('0x15')](_0x433cb0)[_0xdda2('0x17')](function(_0x269ad1){results[_0xdda2('0x1b')](_0x269ad1);})[_0xdda2('0x1e')](function(_0x5e6dcf){logger[_0xdda2('0x1f')](_0x5e6dcf[_0xdda2('0x20')]);});}function main(_0x266ec0,_0xd8c180,_0x90bb5c,_0x21a630){logger[_0xdda2('0x57')]('main',_0x266ec0,JSON[_0xdda2('0x5c')](_0xd8c180));process[_0xdda2('0x5d')](_0xdda2('0x5e'));var _0xe8d81a=_0xd8c180[_0xdda2('0x5f')];var _0x5c9b02=_[_0xdda2('0x60')](_0xe8d81a);var _0x145d45=_0xd8c180[_0xdda2('0x61')];var _0x2c442e=path[_0xdda2('0x10')](config['root'],_0xdda2('0x62'),_0x145d45+_0xdda2('0x63'));logger[_0xdda2('0x57')](_0xdda2('0x64'),_0xd8c180);db[_0xdda2('0x65')]['findAll']({'raw':!![],'attributes':['id',_0xdda2('0x66')]})[_0xdda2('0x1d')](function(_0x20e5ab){for(var _0x54ac4b=0x0;_0x54ac4b<_0x20e5ab[_0xdda2('0x21')];_0x54ac4b++){if(_0x20e5ab[_0x54ac4b]['name']in _0xe8d81a){contactItemTypes[_0xdda2('0x1b')](_0x20e5ab[_0x54ac4b]);delete _0x5c9b02[_0x20e5ab[_0x54ac4b][_0xdda2('0x66')]];hasAdditionalPhones=!![];}for(var _0x646bab in _0xe8d81a){if(_0x20e5ab[_0x54ac4b]['name']+_0xdda2('0x67')===_0x646bab){phoneDescriptions[_0xdda2('0x1b')]({'itemTypeId':_0x20e5ab[_0x54ac4b]['id'],'description':_0x646bab});delete _0x5c9b02[_0x646bab];}}}if(hasAdditionalPhones)_0x5c9b02['AdditionalPhones']='';var _0x13c0d9=_['keys'](_0x5c9b02)[_0xdda2('0x10')]();logger[_0xdda2('0x57')](_0xdda2('0x68'),_0x13c0d9);fs[_0xdda2('0x69')](_0x2c442e,_0x13c0d9+'\x0a');Papa[_0xdda2('0x6a')](fs['createReadStream'](_0x266ec0),{'header':!![],'skipEmptyLines':!![],'step':function(_0x586ca1,_0x42fe90){try{for(var _0x25cf60=0x0,_0x547fbd=[];_0x25cf60<_0x586ca1['data'][_0xdda2('0x21')];_0x25cf60++){stats['rows']+=0x1;if(_0x586ca1[_0xdda2('0x6b')][_0x25cf60]){handleError(_0x586ca1[_0xdda2('0x6c')][_0x25cf60],_0x586ca1['errors'][_0x25cf60]);}else{var _0x263f6d=[];var _0x156c00=[];var _0xdcd08c={};for(var _0x4739c4 in _0xe8d81a){let _0x694386=contactItemTypes[_0xdda2('0x6d')](_0x4eebb0=>_0x4eebb0[_0xdda2('0x66')]===_0x4739c4);let _0x22de37=contactItemTypes[_0xdda2('0x6d')](_0x533880=>_0x533880[_0xdda2('0x66')]+_0xdda2('0x67')===_0x4739c4);if(_['isNil'](_0x694386)&&_['isNil'](_0x22de37)){if(_0xe8d81a[_0xdda2('0x6e')](_0x4739c4)){if(_0x586ca1[_0xdda2('0x6c')][_0x25cf60][_0xe8d81a[_0x4739c4]]){var _0x152ba3=_['trim'](_0x586ca1['data'][_0x25cf60][_0xe8d81a[_0x4739c4]][_0xdda2('0x6f')](/"/g,'\x27'));switch(_0x4739c4){case'scheduledat':var _0x18edab=moment(_0x152ba3,_0xdda2('0x70'),!![]);if(_0x18edab[_0xdda2('0x71')]()){_0x547fbd[_0xdda2('0x1b')]('\x22'+_0x152ba3+'\x22');}else{_0x263f6d[_0xdda2('0x1b')](_0xdda2('0x72'));}break;case'priority':var _0x5170b7=parseInt(_0x152ba3);_0x152ba3=_[_0xdda2('0x73')](_0x5170b7)||_0x5170b7<0x0||_0x5170b7>0x4?_0x21a630?0x3:0x2:_0x5170b7;_0x547fbd['push']('\x22'+_0x152ba3+'\x22');break;case _0xdda2('0x36'):var _0x2de4f5=parseInt(_0x152ba3);if(_[_0xdda2('0x74')](_0x2de4f5)&&_[_0xdda2('0x75')](_0x90bb5c,_0x2de4f5)){_0x547fbd[_0xdda2('0x1b')]('\x22'+_0x2de4f5+'\x22');}else{_0x263f6d[_0xdda2('0x1b')](_0xdda2('0x76'));}break;case _0xdda2('0x77'):if(isEmail(_0x152ba3)){_0x547fbd[_0xdda2('0x1b')]('\x22'+_0x152ba3+'\x22');}else{_0x263f6d['push'](_0xdda2('0x78'));}break;case _0xdda2('0x79'):var _0x181d9b=moment(_0x152ba3,_0xdda2('0x7a'),!![]);if(_0x181d9b['isValid']()){_0x547fbd[_0xdda2('0x1b')]('\x22'+_0x152ba3+'\x22');}else{_0x263f6d[_0xdda2('0x1b')](_0xdda2('0x7b'));}break;default:_0x547fbd[_0xdda2('0x1b')]('\x22'+_0x152ba3+'\x22');}}else{switch(_0x4739c4){case'firstName':case'phone':_0x263f6d[_0xdda2('0x1b')](_0x4739c4+_0xdda2('0x7c'));break;default:_0x547fbd[_0xdda2('0x1b')]('\x22\x22');}}}}else{var _0xe1c6e6='';if(!_['isNil'](_0x694386)){if(!_0xdcd08c[_0xdda2('0x6e')](_0x694386['id'])){for(var _0x5c2d5c=0x0;_0x5c2d5c<_0xe8d81a[_0x4739c4][_0xdda2('0x21')];_0x5c2d5c++){var _0x152ba3=_[_0xdda2('0x7d')](_0x586ca1[_0xdda2('0x6c')][_0x25cf60][_0xe8d81a[_0x4739c4][_0x5c2d5c]][_0xdda2('0x6f')](/"/g,'\x27'));var _0x103e37=phoneDescriptions[_0xdda2('0x6d')](_0x10bc49=>_0x10bc49[_0xdda2('0x7e')]===_0x694386['id']);if(!_[_0xdda2('0x19')](_0x103e37)){var _0x285cb2=_[_0xdda2('0x7d')](_0x586ca1[_0xdda2('0x6c')][_0x25cf60][_0xe8d81a[_0x103e37['description']][0x0]][_0xdda2('0x6f')](/"/g,'\x27'));if(!_[_0xdda2('0x19')](_0x285cb2))_0x152ba3=_0x152ba3+'§'+_0x285cb2;}if(_0xe1c6e6=='')_0xe1c6e6=_0x152ba3;else _0xe1c6e6+='|'+_0x152ba3;}_0x156c00['push'](_0x694386['id']+':'+_0xe1c6e6);_0xdcd08c[_0x694386['id']]=0x1;}}}}if(hasAdditionalPhones){_0x547fbd['push']('\x22'+_0x156c00[_0xdda2('0x10')](';')+'\x22');}if(_0x263f6d[_0xdda2('0x21')]){handleError(_0x586ca1[_0xdda2('0x6c')][_0x25cf60],{'code':_0xdda2('0x7f'),'message':_0x263f6d[_0xdda2('0x10')]()});}else{fs[_0xdda2('0x80')](_0x2c442e,_0x547fbd['join']()+'\x0a');}_0x547fbd=[];}if(!(stats[_0xdda2('0x81')]%0xc8)){socket[_0xdda2('0x82')](_0xdda2('0x83')+_0x145d45,stats);stats[_0xdda2('0x6b')]=[];}}if(stopped){logger['info'](_0xdda2('0x84'));_0x42fe90['abort']();}}catch(_0x20ebf7){handleError(_0x586ca1[_0xdda2('0x6c')][_0x25cf60],{'code':'SystemError','message':_0x20ebf7[_0xdda2('0x20')]});logger[_0xdda2('0x1f')](_0xdda2('0x85'),_0x20ebf7[_0xdda2('0x20')]);}},'complete':function(){try{var _0x222099=[];var _0x313138=tempTableName;_0x222099[_0xdda2('0x1b')](_0xdda2('0x86')+_0x313138+_0xdda2('0x87'));logger[_0xdda2('0x57')](_0xdda2('0x88'),contactItemTypes['length']);var _0x574680=util[_0xdda2('0xc')](_0xdda2('0x89'),_0x2c442e,_0x313138,_0x13c0d9,_0xd8c180[_0xdda2('0x42')],_0xd8c180[_0xdda2('0x8a')]||null,NOW,NOW);if(_['isNil'](_0xe8d81a[_0xdda2('0x32')])){_0x574680+=_0xdda2('0x8b');}_0x222099['push'](_0x574680);BPromise[_0xdda2('0x8c')](_0x222099,handleQuery)[_0xdda2('0x1d')](function(_0x4bde71){BPromise['all']([handleAdditionalPhones()])[_0xdda2('0x1d')](function(){_0x222099=[];for(var _0x304609=0x0;_0x304609\x20\x20','root','existsSync','file\x20doesn\x27t\x20exists','binding\x20doesn\x27t\x20exists','ListId\x20is\x20mandatory','body\x20id\x20mandatory','No\x20agent\x20available','uncaughtException','util','squel','ioredis','../../../mysqldb','../../../config/environment','../../../config/logger','import','defaults','redis','socket.io-emitter','format','YYYY-MM-DD\x20HH:mm:ss','cm_contacts_temp_','YYYYMMDDHHmmss','test','field','from','join','.id\x20=\x20','where','.dialCheckDuplicateType\x20IN\x20(','sequelize','query','select\x20*\x20from\x20','spread','length','isNil','phone','AdditionalPhones','push','all','then','catch','error','message','split','findOne','CmContactHasItem','updated','PHONE','CmContact'];(function(_0x17d9e3,_0x1f969c){var _0x14192d=function(_0x159745){while(--_0x159745){_0x17d9e3['push'](_0x17d9e3['shift']());}};_0x14192d(++_0x1f969c);}(_0x117c,0x71));var _0xc117=function(_0x4a9beb,_0x159482){_0x4a9beb=_0x4a9beb-0x0;var _0x2d4c58=_0x117c[_0x4a9beb];return _0x2d4c58;};'use strict';var fs=require('fs');var path=require('path');var _=require('lodash');var Papa=require('papaparse');var util=require(_0xc117('0x0'));var BPromise=require('bluebird');var moment=require('moment');var squel=require(_0xc117('0x1'));var Redis=require(_0xc117('0x2'));var db=require(_0xc117('0x3'))['db'];var config=require(_0xc117('0x4'));var logger=require(_0xc117('0x5'))(_0xc117('0x6'));config['redis']=_[_0xc117('0x7')](config[_0xc117('0x8')],{'host':'localhost','port':0x18eb});var socket=require(_0xc117('0x9'))(new Redis(config['redis']));var stats={'finish':![],'errors':[],'rows':0x0,'affectedRows':0x0};var results=[];var promisesAdditionalPhones=[];var promisesContact=[];var orderBy=0x0;var updatedRows=0x0;var stopped=![];var NOW=moment()[_0xc117('0xa')](_0xc117('0xb'));var tempTableName=_0xc117('0xc')+moment()[_0xc117('0xa')](_0xc117('0xd'));var contactItemTypes=[];var phoneDescriptions=[];var hasAdditionalPhones=![];function isEmail(_0x4a1e04){return/^([^\x00-\x20\x22\x28\x29\x2c\x2e\x3a-\x3c\x3e\x40\x5b-\x5d\x7f-\xff]+|\x22([^\x0d\x22\x5c\x80-\xff]|\x5c[\x00-\x7f])*\x22)(\x2e([^\x00-\x20\x22\x28\x29\x2c\x2e\x3a-\x3c\x3e\x40\x5b-\x5d\x7f-\xff]+|\x22([^\x0d\x22\x5c\x80-\xff]|\x5c[\x00-\x7f])*\x22))*\x40([^\x00-\x20\x22\x28\x29\x2c\x2e\x3a-\x3c\x3e\x40\x5b-\x5d\x7f-\xff]+|\x5b([^\x0d\x5b-\x5d\x80-\xff]|\x5c[\x00-\x7f])*\x5d)(\x2e([^\x00-\x20\x22\x28\x29\x2c\x2e\x3a-\x3c\x3e\x40\x5b-\x5d\x7f-\xff]+|\x5b([^\x0d\x5b-\x5d\x80-\xff]|\x5c[\x00-\x7f])*\x5d))*$/[_0xc117('0xe')](_0x4a1e04);}function selectNotIn(_0x574c99,_0x44d812,_0x597df9,_0x41b20e,_0x25d4ff){return squel['select']()[_0xc117('0xf')]('phone')[_0xc117('0x10')](_0x41b20e)[_0xc117('0x11')](_0x44d812,null,_0x44d812+_0xc117('0x12')+_0x41b20e+'.'+_0x597df9)[_0xc117('0x13')](_0x41b20e+'.'+_0x597df9+'\x20=\x20'+_0x574c99+'.'+_0x597df9)[_0xc117('0x13')](_0x44d812+_0xc117('0x14')+_0x25d4ff[_0xc117('0x11')]()+')');}function handleAdditionalPhones(){return new Promise(function(_0x9dec18,_0x534955){promisesAdditionalPhones=[];promisesContact=[];return db[_0xc117('0x15')][_0xc117('0x16')](_0xc117('0x17')+tempTableName)[_0xc117('0x18')](function(_0x58bce8){if(_0x58bce8!==null){var _0x5350e9=[];for(var _0x1dfaa6=0x0;_0x1dfaa6<_0x58bce8[_0xc117('0x19')];_0x1dfaa6++){var _0x3eaf68=_0x58bce8[_0x1dfaa6];if(!_[_0xc117('0x1a')](_0x3eaf68[_0xc117('0x1b')])){if(!_[_0xc117('0x1a')](_0x3eaf68[_0xc117('0x1c')]))_0x5350e9[_0xc117('0x1d')](insertAdditionalPhones(_0x3eaf68));promisesContact[_0xc117('0x1d')]({'contact':_0x3eaf68});}}}Promise[_0xc117('0x1e')](_0x5350e9)[_0xc117('0x1f')](function(){_0x9dec18({'val':0x1});});})[_0xc117('0x20')](function(_0x547deb){logger[_0xc117('0x21')](_0x547deb[_0xc117('0x22')]);});});}function insertAdditionalPhones(_0xf5307f){return new Promise(function(_0x1a5ba0,_0x3946cb){var _0x37d9de=_0xf5307f[_0xc117('0x1c')];if(_['isNil'](_0x37d9de))_0x3946cb({'val':0x0});else{var _0x4f7594=_0x37d9de[_0xc117('0x23')](';');var _0x24bb40=[];orderBy=0x0;for(var _0x1492d0=0x0;_0x1492d0<_0x4f7594[_0xc117('0x19')];_0x1492d0++){_0x24bb40[_0xc117('0x1d')](splitAdditionalPhone(_0xf5307f['id'],_0x4f7594[_0x1492d0]));}Promise[_0xc117('0x1e')](_0x24bb40)['then'](function(){_0x1a5ba0({'val':_0x4f7594['length']});});}});}function splitAdditionalPhone(_0x3d670e,_0x481e10){return new Promise(function(_0xa0ee6b,_0x7545d){var _0x216370=_0x481e10['split'](':');var _0x3d71f8=_0x216370[0x0];var _0xfefce5=_0x216370[0x1];if(_0xfefce5!==''){var _0x41e376=_0xfefce5[_0xc117('0x23')]('|');var _0x2cc134=[];for(var _0x28575b=0x0;_0x28575b<_0x41e376['length'];_0x28575b++){if(_0x41e376[_0x28575b]!==''){var _0x334041=_['filter'](promisesAdditionalPhones,{'contactId':_0x3d670e,'phone':_0x41e376[_0x28575b]});if(_0x334041['length']==0x0){orderBy++;promisesAdditionalPhones[_0xc117('0x1d')]({'contactId':_0x3d670e,'contactTypeId':_0x3d71f8,'phone':_0x41e376[_0x28575b],'orderBy':orderBy});}}}_0xa0ee6b({'ok':0x1});}else _0xa0ee6b({'res':0x0});});}function createAdditionalPhone(_0x35efea,_0x280c72,_0x52c152,_0x211fb1){var _0x5db129='';var _0x4a2a10='';var _0x459b8a=_0x52c152[_0xc117('0x23')]('§');_0x5db129=_0x459b8a[0x0];if(_0x459b8a[_0xc117('0x19')]==0x2)_0x4a2a10=_0x459b8a[0x1];return new Promise(function(_0x4e8630,_0x416074){return db['CmContactHasItem'][_0xc117('0x24')]({'where':{'CmContactId':_0x35efea,'item':_0x5db129}})[_0xc117('0x1f')](function(_0x21eb0f){if(_0x21eb0f){return db[_0xc117('0x25')]['update']({'ItemTypeId':_0x280c72,'description':_0x4a2a10,'OrderBy':_0x211fb1},{'where':{'CmContactId':_0x35efea,'item':_0x5db129}})[_0xc117('0x1f')](function(_0x3aaf53){_0x4e8630({'res':_0xc117('0x26')});});}else{return db[_0xc117('0x25')]['create']({'CmContactId':_0x35efea,'item':_0x5db129,'ItemTypeId':_0x280c72,'description':_0x4a2a10,'OrderBy':_0x211fb1,'ItemClass':_0xc117('0x27')})['then'](function(_0x29ab11){_0x4e8630({'res':'inserted'});});}});});}function updateContact(_0x3e8ce7){return new Promise(function(_0x5a00ae,_0x450583){var _0x5ae0d6=_0x3e8ce7['id'];delete _0x3e8ce7['id'];return db[_0xc117('0x28')][_0xc117('0x29')](_0x3e8ce7,{'where':{'id':_0x5ae0d6}})[_0xc117('0x1f')](function(_0x4ede76){updatedRows+=0x1;return db[_0xc117('0x2a')][_0xc117('0x29')]({'phone':_0x3e8ce7[_0xc117('0x1b')]},{'where':{'ContactId':_0x5ae0d6}})[_0xc117('0x1f')](function(_0x44942a){_0x5a00ae({'ret':'OK'});});});});}function insertCmHopper(_0x31e654,_0x36cd65,_0x3302b9,_0x4c0135,_0x1222d6){var _0x15858e=[_0xc117('0x2b'),'cm_contacts.scheduledat',_0xc117('0x2c'),_0xc117('0x2d'),_0x36cd65+'.'+_0x4c0135,_0xc117('0x2e'),_0xc117('0x2f'),_0xc117('0x30'),_0xc117('0x31'),'\x22'+_0x1222d6+'\x22'];return squel[_0xc117('0x32')]()['into'](_0xc117('0x33'))[_0xc117('0x34')](['phone',_0xc117('0x35'),_0xc117('0x36'),_0xc117('0x37'),_0x4c0135,'createdAt','updatedAt','priority',_0xc117('0x38'),'recallme'],squel[_0xc117('0x39')]()[_0xc117('0x3a')](_0x15858e)[_0xc117('0x10')](_0x36cd65)[_0xc117('0x11')](_0xc117('0x3b'),null,_0xc117('0x3c')+_0x36cd65+'.CmListId')[_0xc117('0x11')](_0x3302b9,null,_0x3302b9+_0xc117('0x12')+_0x36cd65+'.'+_0x4c0135)['where'](_0x36cd65+_0xc117('0x3d'),_0x31e654)['where'](_0xc117('0x3e'),NOW)[_0xc117('0x13')](_0xc117('0x3f'),selectNotIn(_0x36cd65,_0x3302b9,_0x4c0135,'cm_hopper',[_0xc117('0x40'),_0xc117('0x41')]))[_0xc117('0x13')](_0xc117('0x3f'),selectNotIn(_0x36cd65,_0x3302b9,_0x4c0135,'cm_hopper',[_0xc117('0x40')])))[_0xc117('0x42')]();}function insertCmHopperBlack(_0x4e6c89,_0x2880b8,_0x2066cf,_0x5128ef){var _0x180af9=['cm_contacts.phone',_0xc117('0x2c'),_0xc117('0x2d'),_0x2880b8+'.'+_0x5128ef,_0xc117('0x2e'),_0xc117('0x2f')];return squel['insert']()['into']('cm_hopper_black')[_0xc117('0x34')]([_0xc117('0x1b'),'ContactId','ListId',_0x5128ef,'createdAt',_0xc117('0x43')],squel[_0xc117('0x39')]()[_0xc117('0x3a')](_0x180af9)[_0xc117('0x10')](_0x2880b8)[_0xc117('0x11')](_0xc117('0x3b'),null,'cm_contacts.ListId\x20=\x20'+_0x2880b8+'.CmListId')[_0xc117('0x11')](_0x2066cf,null,_0x2066cf+_0xc117('0x12')+_0x2880b8+'.'+_0x5128ef)['where'](_0x2880b8+'.CmListId\x20=\x20?',_0x4e6c89)[_0xc117('0x13')]('cm_contacts.createdAt\x20=\x20?',NOW)[_0xc117('0x13')](_0xc117('0x3f'),squel[_0xc117('0x39')]()[_0xc117('0xf')]('phone')[_0xc117('0x10')](_0xc117('0x44'))['where'](_0xc117('0x45'),_0x4e6c89)[_0xc117('0x13')](_0x5128ef+'\x20=\x20?',_0x2880b8+'.'+_0x5128ef)))['toString']();}function insertCmHopperAdditionalPhones(_0x4bb482){var _0x21d80e=[_0xc117('0x46'),_0xc117('0x47'),_0xc117('0x48'),_0xc117('0x49'),_0xc117('0x4a')];return squel['insert']()['into'](_0xc117('0x4b'))[_0xc117('0x34')]([_0xc117('0x4c'),_0xc117('0x1b'),_0xc117('0x4d'),_0xc117('0x4e'),'updatedAt'],squel[_0xc117('0x39')]()[_0xc117('0x3a')](_0x21d80e)[_0xc117('0x10')](_0xc117('0x33'))[_0xc117('0x11')](_0xc117('0x3b'),null,_0xc117('0x4f'))[_0xc117('0x11')](_0xc117('0x50'),null,_0xc117('0x51'))['where'](_0xc117('0x52'),_0x4bb482)['where'](_0xc117('0x3e'),NOW))['toString']();}function insertCmContact(_0x3e6ae5,_0x42b55b,_0x932653,_0xdca56a){var _0x3374fe=_['concat'](_[_0xc117('0x53')](_0xdca56a),[_0xc117('0x37'),'CompanyId',_0xc117('0x4e'),_0xc117('0x43')]);return squel['insert']()[_0xc117('0x54')]('cm_contacts')[_0xc117('0x34')](_0x3374fe,squel['select']()[_0xc117('0x3a')](_0x3374fe)['from'](_0x42b55b)[_0xc117('0x13')]('('+_0x932653[_0xc117('0x11')](',')+_0xc117('0x55'),squel[_0xc117('0x39')]()[_0xc117('0x3a')](_0x932653)[_0xc117('0x10')]('cm_contacts')['where'](_0xc117('0x45'),_0x3e6ae5))['where'](_0xc117('0x56'),squel[_0xc117('0x39')]()[_0xc117('0xf')]('MIN(id)',_0xc117('0x57'))[_0xc117('0x10')](_0x42b55b)['group'](_0x932653[_0xc117('0x11')](','))))[_0xc117('0x42')]();}function handleStop(){logger[_0xc117('0x58')](_0xc117('0x59'));stopped=!![];}function handleUncaughtException(_0x14529d){logger[_0xc117('0x21')](_0x14529d[_0xc117('0x22')]);process[_0xc117('0x5a')](0x1);}function handleError(_0x23c4b0,_0x26a8f5){stats[_0xc117('0x5b')][_0xc117('0x1d')]({'name':_0x26a8f5[_0xc117('0x5c')],'message':_0x26a8f5['message'],'row':_0x23c4b0});}function handleQuery(_0x56706a){logger[_0xc117('0x58')](_0x56706a);return db[_0xc117('0x15')]['query'](_0x56706a)[_0xc117('0x18')](function(_0x45d86e){results[_0xc117('0x1d')](_0x45d86e);})[_0xc117('0x20')](function(_0x21d5ac){logger[_0xc117('0x21')](_0x21d5ac[_0xc117('0x22')]);});}function main(_0x33587a,_0xf040d1,_0x7f7504,_0x25ff8c){logger['info'](_0xc117('0x5d'),_0x33587a,JSON[_0xc117('0x5e')](_0xf040d1));process[_0xc117('0x5f')](_0xc117('0x60'));var _0x31f81e=_0xf040d1[_0xc117('0x61')];var _0x28901b=_[_0xc117('0x62')](_0x31f81e);var _0x1a010e=_0xf040d1[_0xc117('0x63')];var _0x59df9f=path[_0xc117('0x11')](config['root'],_0xc117('0x64'),_0x1a010e+_0xc117('0x65'));logger[_0xc117('0x58')](_0xc117('0x66'),_0xf040d1);db[_0xc117('0x67')][_0xc117('0x68')]({'raw':!![],'attributes':['id','name']})[_0xc117('0x1f')](function(_0x45ea48){for(var _0xea89d2=0x0;_0xea89d2<_0x45ea48[_0xc117('0x19')];_0xea89d2++){if(_0x45ea48[_0xea89d2][_0xc117('0x69')]in _0x31f81e){contactItemTypes[_0xc117('0x1d')](_0x45ea48[_0xea89d2]);delete _0x28901b[_0x45ea48[_0xea89d2][_0xc117('0x69')]];hasAdditionalPhones=!![];}for(var _0xcdc443 in _0x31f81e){if(_0x45ea48[_0xea89d2][_0xc117('0x69')]+_0xc117('0x6a')===_0xcdc443){phoneDescriptions[_0xc117('0x1d')]({'itemTypeId':_0x45ea48[_0xea89d2]['id'],'description':_0xcdc443});delete _0x28901b[_0xcdc443];}}}if(hasAdditionalPhones)_0x28901b['AdditionalPhones']='';var _0x2aebbd=_[_0xc117('0x53')](_0x28901b)['join']();logger[_0xc117('0x58')]('header',_0x2aebbd);fs['writeFileSync'](_0x59df9f,_0x2aebbd+'\x0a');Papa[_0xc117('0x6b')](fs[_0xc117('0x6c')](_0x33587a),{'header':!![],'skipEmptyLines':!![],'step':function(_0x3b45ba,_0x5e92ec){try{for(var _0x5300a0=0x0,_0x2b5061=[];_0x5300a0<_0x3b45ba[_0xc117('0x6d')]['length'];_0x5300a0++){stats[_0xc117('0x6e')]+=0x1;if(_0x3b45ba[_0xc117('0x5b')][_0x5300a0]){handleError(_0x3b45ba[_0xc117('0x6d')][_0x5300a0],_0x3b45ba['errors'][_0x5300a0]);}else{var _0x1bfc80=[];var _0x54100c=[];var _0x3a6327={};for(var _0x549690 in _0x31f81e){let _0x488f16=contactItemTypes[_0xc117('0x6f')](_0x120df9=>_0x120df9[_0xc117('0x69')]===_0x549690);let _0x24f523=contactItemTypes[_0xc117('0x6f')](_0x29e084=>_0x29e084[_0xc117('0x69')]+_0xc117('0x6a')===_0x549690);if(_[_0xc117('0x1a')](_0x488f16)&&_[_0xc117('0x1a')](_0x24f523)){if(_0x31f81e[_0xc117('0x70')](_0x549690)){if(_0x3b45ba[_0xc117('0x6d')][_0x5300a0][_0x31f81e[_0x549690]]){var _0x1466b9=_[_0xc117('0x71')](_0x3b45ba[_0xc117('0x6d')][_0x5300a0][_0x31f81e[_0x549690]][_0xc117('0x72')](/"/g,'\x27'));switch(_0x549690){case _0xc117('0x35'):var _0x1514b2=moment(_0x1466b9,_0xc117('0xb'),!![]);if(_0x1514b2[_0xc117('0x73')]()){_0x2b5061['push']('\x22'+_0x1466b9+'\x22');}else{_0x1bfc80[_0xc117('0x1d')]('scheduledat\x20wrong\x20format\x20(YYYY-MM-DD\x20HH:mm:ss)');}break;case _0xc117('0x74'):var _0x3aa02f=parseInt(_0x1466b9);_0x1466b9=_[_0xc117('0x75')](_0x3aa02f)||_0x3aa02f<0x0||_0x3aa02f>0x4?_0x25ff8c?0x3:0x2:_0x3aa02f;_0x2b5061[_0xc117('0x1d')]('\x22'+_0x1466b9+'\x22');break;case _0xc117('0x38'):var _0x2f7ac7=parseInt(_0x1466b9);if(_[_0xc117('0x76')](_0x2f7ac7)&&_[_0xc117('0x77')](_0x7f7504,_0x2f7ac7)){_0x2b5061['push']('\x22'+_0x2f7ac7+'\x22');}else{_0x1bfc80[_0xc117('0x1d')](_0xc117('0x78'));}break;case'email':if(isEmail(_0x1466b9)){_0x2b5061[_0xc117('0x1d')]('\x22'+_0x1466b9+'\x22');}else{_0x1bfc80['push'](_0xc117('0x79'));}break;case _0xc117('0x7a'):var _0x16f04e=moment(_0x1466b9,'YYYY-MM-DD',!![]);if(_0x16f04e['isValid']()){_0x2b5061[_0xc117('0x1d')]('\x22'+_0x1466b9+'\x22');}else{_0x1bfc80[_0xc117('0x1d')](_0xc117('0x7b'));}break;default:_0x2b5061['push']('\x22'+_0x1466b9+'\x22');}}else{switch(_0x549690){case _0xc117('0x7c'):case _0xc117('0x1b'):_0x1bfc80[_0xc117('0x1d')](_0x549690+'\x20not\x20specified');break;default:_0x2b5061['push']('\x22\x22');}}}}else{var _0x5edc3f='';if(!_[_0xc117('0x1a')](_0x488f16)){if(!_0x3a6327[_0xc117('0x70')](_0x488f16['id'])){for(var _0x278195=0x0;_0x278195<_0x31f81e[_0x549690][_0xc117('0x19')];_0x278195++){var _0x1466b9=_[_0xc117('0x71')](_0x3b45ba[_0xc117('0x6d')][_0x5300a0][_0x31f81e[_0x549690][_0x278195]][_0xc117('0x72')](/"/g,'\x27'));var _0x872ecb=phoneDescriptions['find'](_0x3b0d94=>_0x3b0d94[_0xc117('0x7d')]===_0x488f16['id']);if(!_[_0xc117('0x1a')](_0x872ecb)){var _0x406f9f=_[_0xc117('0x71')](_0x3b45ba['data'][_0x5300a0][_0x31f81e[_0x872ecb[_0xc117('0x7e')]][0x0]][_0xc117('0x72')](/"/g,'\x27'));if(!_[_0xc117('0x1a')](_0x406f9f))_0x1466b9=_0x1466b9+'§'+_0x406f9f;}if(_0x5edc3f=='')_0x5edc3f=_0x1466b9;else _0x5edc3f+='|'+_0x1466b9;}_0x54100c['push'](_0x488f16['id']+':'+_0x5edc3f);_0x3a6327[_0x488f16['id']]=0x1;}}}}if(hasAdditionalPhones){_0x2b5061[_0xc117('0x1d')]('\x22'+_0x54100c[_0xc117('0x11')](';')+'\x22');}if(_0x1bfc80[_0xc117('0x19')]){handleError(_0x3b45ba['data'][_0x5300a0],{'code':'SystemRow','message':_0x1bfc80[_0xc117('0x11')]()});}else{fs[_0xc117('0x7f')](_0x59df9f,_0x2b5061['join']()+'\x0a');}_0x2b5061=[];}if(!(stats['rows']%0xc8)){socket['emit']('contact:import:'+_0x1a010e,stats);stats[_0xc117('0x5b')]=[];}}if(stopped){logger[_0xc117('0x58')](_0xc117('0x80'));_0x5e92ec['abort']();}}catch(_0x39d014){handleError(_0x3b45ba['data'][_0x5300a0],{'code':'SystemError','message':_0x39d014['message']});logger['error'](_0xc117('0x81'),_0x39d014[_0xc117('0x22')]);}},'complete':function(){try{var _0x9f271a=[];var _0x504f5c=tempTableName;_0x9f271a[_0xc117('0x1d')]('CREATE\x20TABLE\x20'+_0x504f5c+_0xc117('0x82'));logger['info'](_0xc117('0x83'),contactItemTypes[_0xc117('0x19')]);var _0x4bd6fa=util[_0xc117('0xa')](_0xc117('0x84'),_0x59df9f,_0x504f5c,_0x2aebbd,_0xf040d1['ListId'],_0xf040d1[_0xc117('0x85')]||null,NOW,NOW);if(_[_0xc117('0x1a')](_0x31f81e[_0xc117('0x35')])){_0x4bd6fa+=_0xc117('0x86');}_0x9f271a[_0xc117('0x1d')](_0x4bd6fa);BPromise[_0xc117('0x87')](_0x9f271a,handleQuery)[_0xc117('0x1f')](function(_0x284a87){BPromise[_0xc117('0x1e')]([handleAdditionalPhones()])['then'](function(){_0x9f271a=[];for(var _0x4a7a81=0x0;_0x4a7a81\x20\x27\x27\x20THEN\x20i.from\x20WHEN\x20(c.firstName\x20IS\x20NOT\x20NULL\x20AND\x20c.firstName\x20<>\x20\x27\x27)\x20OR\x20(c.lastName\x20IS\x20NOT\x20NULL\x20AND\x20c.lastName\x20<>\x20\x27\x27)\x20THEN\x20CONCAT(IFNULL(c.firstName,\x20\x27\x27),\x20\x27\x20\x27,\x20IFNULL(c.lastName,\x20\x27\x27))\x20ELSE\x20\x27Unknown\x27\x20END','CASE\x20WHEN\x20(c.firstName\x20IS\x20NOT\x20NULL\x20AND\x20c.firstName\x20<>\x20\x27\x27)\x20OR\x20(c.lastName\x20IS\x20NOT\x20NULL\x20AND\x20c.lastName\x20<>\x20\x27\x27)\x20THEN\x20CONCAT(IFNULL(c.firstName,\x20\x27\x27),\x20\x27\x20\x27,\x20IFNULL(c.lastName,\x20\x27\x27))\x20ELSE\x20\x27Unknown\x27\x20END','i.*','c.firstName','Contact.firstName'];(function(_0x3c36aa,_0x5265e9){var _0x37d7d1=function(_0x100df8){while(--_0x100df8){_0x3c36aa['push'](_0x3c36aa['shift']());}};_0x37d7d1(++_0x5265e9);}(_0x5692,0x154));var _0x2569=function(_0x126558,_0x143c9a){_0x126558=_0x126558-0x0;var _0x1f6d14=_0x5692[_0x126558];return _0x1f6d14;};'use strict';var _=require(_0x2569('0x0'));var squel=require('squel');var as=require(_0x2569('0x1'));var qs=require('../parsers/qs');var updateInteraction=require('./update-interaction')[_0x2569('0x2')];var utils=require(_0x2569('0x3'));var db=require(_0x2569('0x4'))['db'];function skipInteractionsQuery(_0x470817,_0x4e0497,_0x290a44){var _0x59222d=![];var _0x548a14=utils[_0x2569('0x5')](_0x470817);if(_0x4e0497[_0x2569('0x6')]==='agent'&&!_0x290a44[_0x2569('0x7')]&&!_0x290a44[_0x548a14]){_0x59222d=!![];}return _0x59222d;}function getTagsQuery(){return squel['select']()[_0x2569('0x8')]('id')[_0x2569('0x8')]('name')[_0x2569('0x8')](_0x2569('0x9'))['from'](_0x2569('0xa'));}function getUsersQuery(_0x574aef,_0x140ffd){var _0x203788=utils['getInteractionFK'](_0x574aef);var _0x47d967=_0x2569('0xb')+_0x574aef+'_interactions';var _0x4ab51c=squel[_0x2569('0xc')]()['field'](_0x2569('0xd'))[_0x2569('0x8')](_0x2569('0xe'))[_0x2569('0x8')](_0x2569('0xf')+_0x203788)[_0x2569('0x10')](_0x47d967,'ui')['left_join'](_0x2569('0x11'),'u','u.id\x20=\x20ui.UserId');if(_0x140ffd[_0x2569('0x12')]>0x0){_0x4ab51c[_0x2569('0x13')](_0x2569('0xf')+_0x203788+_0x2569('0x14'),_[_0x2569('0x15')](_0x140ffd,'id'));}return _0x4ab51c;}function getInteractionsQuery(_0x593f78){var _0x405055=utils['getInteractionsTables'](_0x593f78);var _0x55cf21=utils[_0x2569('0x5')](_0x593f78);var _0x1d22cb=utils[_0x2569('0x16')](_0x593f78);return squel[_0x2569('0xc')]()[_0x2569('0x10')](_0x405055[_0x2569('0x17')],'i')[_0x2569('0x18')](_0x2569('0x19'),'c',_0x2569('0x1a'))[_0x2569('0x18')](_0x2569('0x11'),'o',_0x2569('0x1b'))[_0x2569('0x18')](_0x405055[_0x2569('0x1c')],'a',_0x2569('0x1d')+_0x55cf21)[_0x2569('0x18')](_0x405055['messages'],'me',_0x2569('0x1e')+_0x1d22cb+_0x2569('0x1f'))[_0x2569('0x18')](_0x405055['interactionsTags'],'it',_0x2569('0x20')+_0x1d22cb+_0x2569('0x1f'))['left_join'](_0x2569('0xa'),'t','t.id\x20=\x20it.TagId');}function getSqlClauses(){var _0x5c0c0c={'body':squel[_0x2569('0x21')](),'contact':squel[_0x2569('0x21')](),'default':squel[_0x2569('0x21')](),'fields':squel[_0x2569('0x21')](),'filter':squel[_0x2569('0x21')](),'read':squel[_0x2569('0x21')](),'tags':{'clause':squel['expr'](),'ids':null},'user':squel[_0x2569('0x21')]()};return _0x5c0c0c;}function parseTagParameter(_0x43ba65){var _0x2258d6=squel[_0x2569('0x21')]();if(_0x43ba65){var _0x21dac9=utils[_0x2569('0x22')](_0x43ba65);_0x21dac9[_0x2569('0x23')](function(_0x29a438){_0x2258d6['or'](_0x2569('0x24'),'%,'+_0x29a438+',%');});}return _0x2258d6;}function parseReadParameter(_0x549b91){var _0x4ba617='';if(_0x549b91){_0x4ba617=_0x2569('0x25');if(_0x549b91==='1'){_0x4ba617=_0x4ba617['replace']('{OPERATOR}','=');}else{_0x4ba617=_0x4ba617[_0x2569('0x26')](_0x2569('0x27'),'>');}}return _0x4ba617;}function parseSearchFilter(_0x28f127,_0x4bdb66){var _0x147bd7=squel[_0x2569('0x21')]();if(_0x4bdb66){var _0x5b83f3=_0x4bdb66[_0x2569('0x26')]('\x5c','\x5c\x5c')['replace'](/'/g,'\x27\x27');if(qs[_0x2569('0x28')](_0x5b83f3)){_0x147bd7['or'](_0x2569('0x29'),_0x5b83f3+'%');if([_0x2569('0x2a'),_0x2569('0x2b')]['includes'](_0x28f127)){_0x147bd7['or']('i.phone\x20LIKE\x20?',_0x5b83f3+'%');}else if(_0x28f127==='fax'){_0x147bd7['or'](_0x2569('0x2c'),_0x5b83f3+'%');}else if(_0x28f127===_0x2569('0x2d')){_0x147bd7['or'](_0x2569('0x2e'),_0x5b83f3+'%');}}else if(_0x28f127===_0x2569('0x2f')&&qs[_0x2569('0x30')](_0x5b83f3)){_0x147bd7['or'](_0x2569('0x31'),_0x5b83f3+'%');}else{if(_0x28f127===_0x2569('0x2f')){_0x147bd7['or'](_0x2569('0x32'),qs[_0x2569('0x33')](_0x5b83f3,!![]))['or'](_0x2569('0x34'),qs[_0x2569('0x33')](_0x5b83f3));}else if(_0x28f127!==_0x2569('0x35')){_0x147bd7['or'](_0x2569('0x36'),qs[_0x2569('0x33')](_0x5b83f3));}_0x147bd7['or'](_0x2569('0x37'),qs[_0x2569('0x33')](_0x5b83f3,!![]),null);}}return _0x147bd7;}function parseAdvancedSearchFilter(_0xaef639,_0x2b259e){var _0x16db1a=getSqlClauses();var _0x500139=as[_0x2569('0x38')](_0xaef639);var _0x3196d8=_0x500139[_0x2569('0x39')];for(var _0x340ca1=0x0;_0x340ca1<_0x500139['conditions'][_0x2569('0x12')];_0x340ca1++){var _0x3a732b=_0x500139['conditions'][_0x340ca1];var _0x2072e5='i';var _0x3d1574=_[_0x2569('0x3a')](_0x2b259e,[_0x2569('0x3b'),_0x3a732b['field']]);if(_0x3d1574){var _0x262578=as['buildExpression'](_0x2072e5,_0x3d1574[_0x2569('0x3c')],_0x3a732b);_0x16db1a[_0x2569('0x3d')][_0x3196d8](_0x262578[_0x2569('0x3e')],_0x262578['value'][_0x2569('0x3f')],_0x262578[_0x2569('0x40')][_0x2569('0x41')]);}else{switch(_0x3a732b[_0x2569('0x8')]){case _0x2569('0x42'):var _0x5d7b38=parseReadParameter(_0x3a732b[_0x2569('0x40')]);_0x16db1a[_0x2569('0x43')][_0x2569('0x44')](_0x5d7b38);break;case'Contact':if(_0x3a732b[_0x2569('0x45')]==='$substring'){if(_0x3a732b['value'][_0x2569('0x46')]('\x20')[_0x2569('0x12')]>0x1){_0x16db1a['contact'][_0x3196d8](_0x2569('0x37'),qs[_0x2569('0x33')](_0x3a732b['value'],!![]),null);}else{var _0x4a9698='%'+_0x3a732b[_0x2569('0x40')]+'%';_0x16db1a['contact'][_0x3196d8]('c.firstName\x20LIKE\x20?\x20OR\x20c.lastName\x20LIKE\x20?\x20OR\x20c.email\x20LIKE\x20?',_0x4a9698,_0x4a9698,_0x4a9698);}}else{_0x3d1574=_[_0x2569('0x3a')](_0x2b259e,['name',_0x2569('0x47')]);_0x3a732b[_0x2569('0x8')]=_0x2569('0x47');_0x262578=as[_0x2569('0x48')](_0x2072e5,_0x3d1574[_0x2569('0x3c')],_0x3a732b);_0x16db1a['contact'][_0x3196d8](_0x262578[_0x2569('0x3e')],_0x262578[_0x2569('0x40')]['start'],_0x262578[_0x2569('0x40')]['end']);}break;case _0x2569('0x49'):var _0x25227c=_0x3a732b[_0x2569('0x40')][_0x2569('0x46')](',')[_0x2569('0x15')](function(_0xf97407){return Number(_0xf97407);});var _0x431768=parseTagParameter(_0x25227c);_0x16db1a['tags'][_0x2569('0x4a')][_0x2569('0x44')](_0x431768);_0x16db1a['tags'][_0x2569('0x4b')]=_0x25227c;break;case _0x2569('0x4c'):if(_0x3a732b['operator']===_0x2569('0x4d')){_0x16db1a[_0x2569('0x4e')][_0x3196d8](_0x2569('0x4f'),'%'+_0x3a732b['value']+'%',null);}else{_0x3d1574=_['find'](_0x2b259e,['name','UserId']);_0x3a732b[_0x2569('0x8')]=_0x2569('0x50');_0x262578=as['buildExpression'](_0x2072e5,_0x3d1574[_0x2569('0x3c')],_0x3a732b);_0x16db1a[_0x2569('0x4e')][_0x3196d8](_0x262578[_0x2569('0x3e')],_0x262578[_0x2569('0x40')][_0x2569('0x3f')],_0x262578[_0x2569('0x40')]['end']);}break;case'body':case _0x2569('0x51'):_0x262578=as['buildExpression']('me',null,_0x3a732b);_0x16db1a[_0x2569('0x52')][_0x3196d8](_0x262578[_0x2569('0x3e')],_0x262578[_0x2569('0x40')][_0x2569('0x3f')],_0x262578[_0x2569('0x40')]['end']);break;}}}return _0x16db1a;}function parseModelFields(_0x5bc5b6,_0x5b1747,_0xdad127){var _0x35b89d=utils[_0x2569('0x5')](_0x5bc5b6);var _0x4f11e4=squel['expr']();var _0x5dde11=_(_0x5b1747)[_0x2569('0x53')]()[_0x2569('0x15')](function(_0x5e4f47){return _[_0x2569('0x54')](_0xdad127,[_0x2569('0x3b'),_0x5e4f47])?_0x5e4f47:undefined;})[_0x2569('0x55')]()[_0x2569('0x40')]();if(_0x5dde11['length']>0x0){_0x5dde11[_0x2569('0x23')](function(_0x536f5e){if(_0x536f5e===_0x35b89d){_0x4f11e4[_0x2569('0x44')]('i.'+_0x35b89d+'\x20IN\x20?',[][_0x2569('0x56')](_0x5b1747[_0x536f5e]));}else if(_0x536f5e===_0x2569('0x57')){var _0x52ed4e=JSON[_0x2569('0x58')](_0x5b1747[_0x536f5e])[_0x2569('0x59')];var _0x3d6825=JSON[_0x2569('0x58')](_0x5b1747[_0x536f5e])['$lte'];_0x4f11e4[_0x2569('0x44')](_0x2569('0x5a'),_0x52ed4e,_0x3d6825);}else{if(_0x5b1747[_0x536f5e]===_0x2569('0x5b')){_0x4f11e4[_0x2569('0x44')]('i.'+_0x536f5e+_0x2569('0x5c'));}else{_0x4f11e4[_0x2569('0x44')]('i.'+_0x536f5e+_0x2569('0x5d'),_0x5b1747[_0x536f5e]);}}});}return _0x4f11e4;}function parseQueryParameters(_0x4209b7,_0x487cf2,_0x4e3717){var _0xc98d3c=getSqlClauses();return Promise['resolve']()[_0x2569('0x5e')](function(){return parseModelFields(_0x4209b7,_0x487cf2,_0x4e3717);})[_0x2569('0x5e')](function(_0x4a6d6b){_0xc98d3c[_0x2569('0x5f')]['and'](_0x4a6d6b);return parseReadParameter(_0x487cf2[_0x2569('0x43')]);})['then'](function(_0x1ada67){_0xc98d3c[_0x2569('0x43')][_0x2569('0x44')](_0x1ada67);return parseTagParameter(_0x487cf2[_0x2569('0x60')]);})[_0x2569('0x5e')](function(_0x21ccc3){_0xc98d3c['tags'][_0x2569('0x4a')][_0x2569('0x44')](_0x21ccc3);return parseSearchFilter(_0x4209b7,_0x487cf2[_0x2569('0x61')]);})[_0x2569('0x5e')](function(_0x10851a){_0xc98d3c[_0x2569('0x61')]=_0x10851a;return _0xc98d3c;});}function checkAccountsRestrictions(_0x32e09c,_0x454a2a,_0xf7952b){var _0x39e665=utils[_0x2569('0x5')](_0x32e09c);var _0x1e909f='get'+_['capitalize'](_0x32e09c)+(_0x32e09c===_0x2569('0x62')?_0x2569('0x63'):_0x2569('0x64'));var _0x5aa162=squel['expr']();return Promise[_0x2569('0x65')]()[_0x2569('0x5e')](function(){if(_0xf7952b[_0x2569('0x7')]&&_0x454a2a['role']===_0x2569('0x66')){return _0x454a2a[_0x1e909f]({'attributes':['id'],'raw':!![]});}})[_0x2569('0x5e')](function(_0x33cb15){if(_0x33cb15){if(_0x33cb15[_0x2569('0x12')]===0x0){_0x5aa162[_0x2569('0x44')]('i.'+_0x39e665+_0x2569('0x5c'));}else{_0x5aa162[_0x2569('0x44')]('i.'+_0x39e665+'\x20IN\x20?',_[_0x2569('0x15')](_0x33cb15,'id'));}}else if(!_0xf7952b[_0x39e665]){_0x5aa162[_0x2569('0x44')]('i.'+_0x39e665+'\x20IS\x20NOT\x20NULL');}})[_0x2569('0x5e')](function(){return _0x5aa162;});}function getClosedOrderClause(_0x178191,_0x4e595c){var _0x279e90='';var _0x3f5cff=[_0x2569('0x67'),_0x2569('0x68'),_0x2569('0x69')];if(_0x178191===_0x2569('0x2f')){_0x3f5cff['unshift'](_0x2569('0x6a'));}if(_0x4e595c[_0x2569('0x6b')]==='0'&&_0x178191===_0x2569('0x2f')){_0x279e90=_0x2569('0x6a');}else{if(_0x4e595c['closed']==='1'){_0x3f5cff[_0x2569('0x6c')]();}_0x279e90=_0x2569('0x6d')+_0x3f5cff['join'](',\x20')+')';}return _0x279e90;}function getFilteredInteractions(_0x584f39,_0x489bf5,_0x2f5e5c,_0xfdaa2f){var _0xc7dd28=utils['getInteractionFK'](_0x584f39);var _0x46060a=_[_0x2569('0x6e')](_0x584f39)+'Interaction';var _0x934a93=[];var _0x43e816=getTagsQuery();var _0xed50={'type':db[_0x2569('0x6f')][_0x2569('0x70')][_0x2569('0x71')],'raw':!![]};var _0x1ad07a=[];var _0x430aa4=[];return db[_0x2569('0x72')][_0x2569('0x73')](_0x43e816[_0x2569('0x74')](),_0xed50)[_0x2569('0x5e')](function(_0x2925e6){_0x934a93=_[_0x2569('0x75')](_0x2925e6,'id');_0xed50=_[_0x2569('0x76')](_0xed50,{'model':db[_0x46060a],'mapToModel':!![],'nest':!![]});if(_0x2f5e5c['fields']){_0xfdaa2f['attributes']['forEach'](function(_0x4a04fb){_0x489bf5[_0x2569('0x8')]('i.'+_0x4a04fb);});}else{_0x489bf5[_0x2569('0x8')](_0x2569('0x77'),_0x2569('0x42'));_0x489bf5[_0x2569('0x8')](_0x2569('0x78'),'Account.key');_0x489bf5[_0x2569('0x8')](_0x2569('0x79'),_0x2569('0x7a'));if(_0x584f39==='mail'){_0x489bf5['field'](_0x2569('0x7b'),_0x2569('0x7c'));_0x489bf5[_0x2569('0x8')]('CASE\x20WHEN\x20i.to\x20IS\x20NOT\x20NULL\x20AND\x20i.to\x20<>\x20\x27\x27\x20AND\x20i.to\x20NOT\x20LIKE\x20CONCAT(\x27%\x27,\x20a.email,\x20\x27%\x27)\x20THEN\x20TRIM(SUBSTRING_INDEX(i.to,\x20\x27<\x27,\x201))\x20WHEN\x20(c.firstName\x20IS\x20NOT\x20NULL\x20AND\x20c.firstName\x20<>\x20\x27\x27)\x20OR\x20(c.lastName\x20IS\x20NOT\x20NULL\x20AND\x20c.lastName\x20<>\x20\x27\x27)\x20THEN\x20CONCAT(IFNULL(c.firstName,\x20\x27\x27),\x20\x27\x20\x27,\x20IFNULL(c.lastName,\x20\x27\x27))\x20ELSE\x20\x27Unknown\x27\x20END',_0x2569('0x7d'));_0x489bf5[_0x2569('0x8')](_0x2569('0x7e'));_0x489bf5['field']('i.createdAt');_0x489bf5[_0x2569('0x8')](_0x2569('0x7f'));_0x489bf5[_0x2569('0x8')]('i.closed');_0x489bf5['field']('i.closedAt');_0x489bf5[_0x2569('0x8')](_0x2569('0x80'));_0x489bf5[_0x2569('0x8')]('i.lastMsgAt');_0x489bf5[_0x2569('0x8')](_0x2569('0x81'));_0x489bf5['field'](_0x2569('0x82'));_0x489bf5[_0x2569('0x8')](_0x2569('0x69'));_0x489bf5[_0x2569('0x8')](_0x2569('0x68'));_0x489bf5[_0x2569('0x8')](_0x2569('0x67'));_0x489bf5[_0x2569('0x8')](_0x2569('0x6a'));_0x489bf5['field']('i.to');_0x489bf5[_0x2569('0x8')]('i.ContactId');_0x489bf5[_0x2569('0x8')]('i.MailAccountId');_0x489bf5[_0x2569('0x8')](_0x2569('0x83'));}else if(_0x584f39===_0x2569('0x2d')){_0x489bf5['field'](_0x2569('0x84'),_0x2569('0x7d'));}else{_0x489bf5['field'](_0x2569('0x85'),_0x2569('0x7d'));}if(_0x584f39!==_0x2569('0x2f')){_0x489bf5[_0x2569('0x8')](_0x2569('0x86'));}_0x489bf5[_0x2569('0x8')](_0x2569('0x87'),_0x2569('0x88'));_0x489bf5['field'](_0x2569('0x89'),_0x2569('0x8a'));_0x489bf5[_0x2569('0x8')](_0x2569('0x8b'),_0x2569('0x8c'));_0x489bf5[_0x2569('0x8')]('c.phone',_0x2569('0x8d'));_0x489bf5[_0x2569('0x8')](_0x2569('0x8e'),_0x2569('0x8f'));_0x489bf5[_0x2569('0x8')]('c.fax',_0x2569('0x90'));_0x489bf5[_0x2569('0x8')](_0x2569('0x91'),'Owner.fullname');_0x489bf5[_0x2569('0x8')](_0x2569('0x92'),_0x2569('0x93'));_0x489bf5[_0x2569('0x8')](_0x2569('0x94'),'TagIds');}if(_0xfdaa2f[_0x2569('0x95')]){_0x489bf5['limit'](_0xfdaa2f[_0x2569('0x95')]);}if(_0xfdaa2f[_0x2569('0x96')]){_0x489bf5[_0x2569('0x96')](_0xfdaa2f[_0x2569('0x96')]);}return db[_0x2569('0x72')][_0x2569('0x73')](_0x489bf5[_0x2569('0x74')](),_0xed50);})[_0x2569('0x5e')](function(_0x323da7){_0x1ad07a=_0x323da7;var _0x364c70=getUsersQuery(_0x584f39,_0x1ad07a);return db[_0x2569('0x72')][_0x2569('0x73')](_0x364c70['toString'](),_0xed50);})[_0x2569('0x5e')](function(_0xce0ec6){_0x430aa4=_[_0x2569('0x97')](_0xce0ec6,_0xc7dd28);if(_0x584f39===_0x2569('0x2f')){return db[_0x2569('0x98')][_0x2569('0x99')]({'attributes':[_0x2569('0x9a')],'raw':!![]});}})[_0x2569('0x5e')](function(_0x3c98b5){var _0x21c2a0=_0x3c98b5?_0x3c98b5[_0x2569('0x9a')]:undefined;var _0x446cc6=_0x1ad07a[_0x2569('0x15')](function(_0x1e3504){return updateInteraction(_0x1e3504,_0x934a93,_0x430aa4,_0x21c2a0);});return Promise[_0x2569('0x9b')](_0x446cc6);});}function countFilteredInteractions(_0x3e55fa,_0x3a3bea){var _0x4faf30=_0x3e55fa[_0x2569('0x9c')]();_0x4faf30['field'](_0x2569('0x9d'));_0x4faf30[_0x2569('0x8')](_0x2569('0x77'),_0x2569('0x42'));var _0x1e833e=utils['getSelectedTags'](_0x3a3bea);if(!_['isEmpty'](_0x1e833e)){_0x4faf30[_0x2569('0x13')]('t.id\x20IN\x20?',_0x1e833e);}var _0x58d8a9={'type':db[_0x2569('0x6f')][_0x2569('0x70')][_0x2569('0x71')],'raw':!![]};return db[_0x2569('0x72')]['query'](_0x4faf30[_0x2569('0x74')](),_0x58d8a9);}module[_0x2569('0x9e')]={'checkAccountsRestrictions':checkAccountsRestrictions,'countFilteredInteractions':countFilteredInteractions,'getClosedOrderClause':getClosedOrderClause,'getFilteredInteractions':getFilteredInteractions,'getInteractionsQuery':getInteractionsQuery,'parseAdvancedSearchFilter':parseAdvancedSearchFilter,'parseQueryParameters':parseQueryParameters,'skipInteractionsQuery':skipInteractionsQuery}; \ No newline at end of file +var _0x27c2=['left_join','users','u.id\x20=\x20ui.UserId','length','\x20IN\x20?','map','interactions','cm_contacts','o.id\x20=\x20i.UserId','a.id\x20=\x20i.','messages','me.','interactionsTags','\x20=\x20i.id','expr','getSelectedTags','forEach','replace','{OPERATOR}','i.id\x20LIKE\x20?','sms','includes','i.phone\x20LIKE\x20?','fax','i.fax\x20LIKE\x20?','openchannel','i.from\x20LIKE\x20?','isEmail','c.email\x20LIKE\x20?','MATCH\x20(i.to,\x20i.subject)\x20AGAINST\x20(?\x20IN\x20BOOLEAN\x20MODE)','getFullTextValue','parseSearch','conditions','find','type','default','start','value','end','unreadMessages','and','Contact','operator','$substring','contact','MATCH\x20(c.firstName,\x20c.lastName,\x20c.phone,\x20c.mobile,\x20c.fax,\x20c.email)\x20AGAINST\x20(?\x20IN\x20BOOLEAN\x20MODE)','c.firstName\x20LIKE\x20?\x20OR\x20c.lastName\x20LIKE\x20?\x20OR\x20c.email\x20LIKE\x20?','ContactId','buildExpression','text','split','tags','ids','User','UserId','user','plainBody','body','keys','some','compact','concat','$gte','parse','$lte','i.createdAt\x20BETWEEN\x20?\x20AND\x20?','null','\x20IS\x20NULL','\x20=\x20?','resolve','then','fields','read','tag','clause','filter','get','capitalize','chat','Websites','\x20IS\x20NOT\x20NULL','i.thirdDisposition','i.secondDisposition','mail','i.substatus','closed','shift','join','getInteractionFK','Interaction','Sequelize','QueryTypes','SELECT','sequelize','query','toString','keyBy','merge','SUM(me.read\x20=\x200\x20AND\x20me.direction\x20=\x20\x27in\x27)','Account.key','a.mandatoryDisposition','Account.mandatoryDisposition','a.email','Account.email','i.id','i.createdAt','i.closed','i.closedAt','i.attach','i.subject','i.to','i.ContactId','CASE\x20WHEN\x20i.from\x20IS\x20NOT\x20NULL\x20AND\x20i.from\x20<>\x20\x27\x27\x20THEN\x20i.from\x20WHEN\x20(c.firstName\x20IS\x20NOT\x20NULL\x20AND\x20c.firstName\x20<>\x20\x27\x27)\x20OR\x20(c.lastName\x20IS\x20NOT\x20NULL\x20AND\x20c.lastName\x20<>\x20\x27\x27)\x20THEN\x20CONCAT(IFNULL(c.firstName,\x20\x27\x27),\x20\x27\x20\x27,\x20IFNULL(c.lastName,\x20\x27\x27))\x20ELSE\x20\x27Unknown\x27\x20END','contactName','CASE\x20WHEN\x20(c.firstName\x20IS\x20NOT\x20NULL\x20AND\x20c.firstName\x20<>\x20\x27\x27)\x20OR\x20(c.lastName\x20IS\x20NOT\x20NULL\x20AND\x20c.lastName\x20<>\x20\x27\x27)\x20THEN\x20CONCAT(IFNULL(c.firstName,\x20\x27\x27),\x20\x27\x20\x27,\x20IFNULL(c.lastName,\x20\x27\x27))\x20ELSE\x20\x27Unknown\x27\x20END','i.*','Contact.firstName','c.phone','Contact.phone','Contact.mobile','c.fax','Contact.fax','Owner.fullname','o.internal','Owner.internal','limit','offset','Setting','enableEmailPreview','all','clone','COUNT(*)','isEmpty','where','t.id\x20IN\x20?','exports','lodash','squel','../parsers/advancedSearch','../parsers/qs','./update-interaction','updateInteraction','./utils','getAccountFK','role','agent','search','field','name','color','from','tools_tags','user_has_','_interactions','u.id','ui.'];(function(_0x2926f0,_0x1d78f3){var _0x5cc712=function(_0x3f925b){while(--_0x3f925b){_0x2926f0['push'](_0x2926f0['shift']());}};_0x5cc712(++_0x1d78f3);}(_0x27c2,0x1c0));var _0x227c=function(_0x14add3,_0x13ce8d){_0x14add3=_0x14add3-0x0;var _0x4a174f=_0x27c2[_0x14add3];return _0x4a174f;};'use strict';var _=require(_0x227c('0x0'));var squel=require(_0x227c('0x1'));var as=require(_0x227c('0x2'));var qs=require(_0x227c('0x3'));var updateInteraction=require(_0x227c('0x4'))[_0x227c('0x5')];var utils=require(_0x227c('0x6'));var db=require('../../mysqldb')['db'];function skipInteractionsQuery(_0x656478,_0x1c0546,_0x82715f){var _0x4df048=![];var _0x41252a=utils[_0x227c('0x7')](_0x656478);if(_0x1c0546[_0x227c('0x8')]===_0x227c('0x9')&&!_0x82715f[_0x227c('0xa')]&&!_0x82715f[_0x41252a]){_0x4df048=!![];}return _0x4df048;}function getTagsQuery(){return squel['select']()['field']('id')[_0x227c('0xb')](_0x227c('0xc'))[_0x227c('0xb')](_0x227c('0xd'))[_0x227c('0xe')](_0x227c('0xf'));}function getUsersQuery(_0x46a0ea,_0x3741b6){var _0x49aa88=utils['getInteractionFK'](_0x46a0ea);var _0x1ad50c=_0x227c('0x10')+_0x46a0ea+_0x227c('0x11');var _0x49a146=squel['select']()[_0x227c('0xb')](_0x227c('0x12'))[_0x227c('0xb')]('u.fullname')[_0x227c('0xb')](_0x227c('0x13')+_0x49aa88)['from'](_0x1ad50c,'ui')[_0x227c('0x14')](_0x227c('0x15'),'u',_0x227c('0x16'));if(_0x3741b6[_0x227c('0x17')]>0x0){_0x49a146['where']('ui.'+_0x49aa88+_0x227c('0x18'),_[_0x227c('0x19')](_0x3741b6,'id'));}return _0x49a146;}function getInteractionsQuery(_0x3a369f){var _0x43f440=utils['getInteractionsTables'](_0x3a369f);var _0x5ac322=utils[_0x227c('0x7')](_0x3a369f);var _0x418e76=utils['getInteractionFK'](_0x3a369f);return squel['select']()[_0x227c('0xe')](_0x43f440[_0x227c('0x1a')],'i')[_0x227c('0x14')](_0x227c('0x1b'),'c','c.id\x20=\x20i.ContactId\x20AND\x20c.deletedAt\x20IS\x20NULL')[_0x227c('0x14')](_0x227c('0x15'),'o',_0x227c('0x1c'))['left_join'](_0x43f440['accounts'],'a',_0x227c('0x1d')+_0x5ac322)[_0x227c('0x14')](_0x43f440[_0x227c('0x1e')],'me',_0x227c('0x1f')+_0x418e76+'\x20=\x20i.id')['left_join'](_0x43f440[_0x227c('0x20')],'it','it.'+_0x418e76+_0x227c('0x21'))['left_join'](_0x227c('0xf'),'t','t.id\x20=\x20it.TagId');}function getSqlClauses(){var _0x143865={'body':squel[_0x227c('0x22')](),'contact':squel[_0x227c('0x22')](),'default':squel[_0x227c('0x22')](),'fields':squel['expr'](),'filter':squel[_0x227c('0x22')](),'read':squel[_0x227c('0x22')](),'tags':{'clause':squel[_0x227c('0x22')](),'ids':null},'user':squel[_0x227c('0x22')]()};return _0x143865;}function parseTagParameter(_0x1cc4f2){var _0x81fd54=squel[_0x227c('0x22')]();if(_0x1cc4f2){var _0x24d8fe=utils[_0x227c('0x23')](_0x1cc4f2);_0x24d8fe[_0x227c('0x24')](function(_0x10f0cd){_0x81fd54['or']('CONCAT(\x27,\x27,\x20`TagIds`,\x20\x27,\x27)\x20LIKE\x20?','%,'+_0x10f0cd+',%');});}return _0x81fd54;}function parseReadParameter(_0x30aa7b){var _0xdb8fea='';if(_0x30aa7b){_0xdb8fea='unreadMessages\x20{OPERATOR}\x200';if(_0x30aa7b==='1'){_0xdb8fea=_0xdb8fea[_0x227c('0x25')](_0x227c('0x26'),'=');}else{_0xdb8fea=_0xdb8fea[_0x227c('0x25')](_0x227c('0x26'),'>');}}return _0xdb8fea;}function parseSearchFilter(_0x29b70b,_0x47157b){var _0x2d74de=squel[_0x227c('0x22')]();if(_0x47157b){var _0x4e0f20=_0x47157b[_0x227c('0x25')]('\x5c','\x5c\x5c')['replace'](/'/g,'\x27\x27');if(qs['isNumeric'](_0x4e0f20)){_0x2d74de['or'](_0x227c('0x27'),_0x4e0f20+'%');if([_0x227c('0x28'),'whatsapp'][_0x227c('0x29')](_0x29b70b)){_0x2d74de['or'](_0x227c('0x2a'),_0x4e0f20+'%');}else if(_0x29b70b===_0x227c('0x2b')){_0x2d74de['or'](_0x227c('0x2c'),_0x4e0f20+'%');}else if(_0x29b70b===_0x227c('0x2d')){_0x2d74de['or'](_0x227c('0x2e'),_0x4e0f20+'%');}}else if(_0x29b70b==='mail'&&qs[_0x227c('0x2f')](_0x4e0f20)){_0x2d74de['or'](_0x227c('0x30'),_0x4e0f20+'%');}else{if(_0x29b70b==='mail'){_0x2d74de['or'](_0x227c('0x31'),qs[_0x227c('0x32')](_0x4e0f20,!![]))['or']('MATCH\x20(me.plainBody,\x20me.subject)\x20AGAINST\x20(?\x20IN\x20BOOLEAN\x20MODE)',qs['getFullTextValue'](_0x4e0f20));}else if(_0x29b70b!=='fax'){_0x2d74de['or']('MATCH\x20(me.body)\x20AGAINST\x20(?\x20IN\x20BOOLEAN\x20MODE)',qs['getFullTextValue'](_0x4e0f20));}_0x2d74de['or']('MATCH\x20(c.firstName,\x20c.lastName,\x20c.phone,\x20c.mobile,\x20c.fax,\x20c.email)\x20AGAINST\x20(?\x20IN\x20BOOLEAN\x20MODE)',qs[_0x227c('0x32')](_0x4e0f20,!![]),null);}}return _0x2d74de;}function parseAdvancedSearchFilter(_0x1a4f0c,_0x5376f8){var _0xc559e3=getSqlClauses();var _0x391e8c=as[_0x227c('0x33')](_0x1a4f0c);var _0x4f9515=_0x391e8c['sqlOperator'];for(var _0x462fcc=0x0;_0x462fcc<_0x391e8c[_0x227c('0x34')][_0x227c('0x17')];_0x462fcc++){var _0x52973d=_0x391e8c[_0x227c('0x34')][_0x462fcc];var _0x51f365='i';var _0x53cbe7=_[_0x227c('0x35')](_0x5376f8,[_0x227c('0xc'),_0x52973d[_0x227c('0xb')]]);if(_0x53cbe7){var _0x5be2d4=as['buildExpression'](_0x51f365,_0x53cbe7[_0x227c('0x36')],_0x52973d);_0xc559e3[_0x227c('0x37')][_0x4f9515](_0x5be2d4['text'],_0x5be2d4['value'][_0x227c('0x38')],_0x5be2d4[_0x227c('0x39')][_0x227c('0x3a')]);}else{switch(_0x52973d[_0x227c('0xb')]){case _0x227c('0x3b'):var _0x5691a0=parseReadParameter(_0x52973d[_0x227c('0x39')]);_0xc559e3['read'][_0x227c('0x3c')](_0x5691a0);break;case _0x227c('0x3d'):if(_0x52973d[_0x227c('0x3e')]===_0x227c('0x3f')){if(_0x52973d[_0x227c('0x39')]['split']('\x20')['length']>0x1){_0xc559e3[_0x227c('0x40')][_0x4f9515](_0x227c('0x41'),qs[_0x227c('0x32')](_0x52973d[_0x227c('0x39')],!![]),null);}else{var _0x480e7f='%'+_0x52973d[_0x227c('0x39')]+'%';_0xc559e3[_0x227c('0x40')][_0x4f9515](_0x227c('0x42'),_0x480e7f,_0x480e7f,_0x480e7f);}}else{_0x53cbe7=_['find'](_0x5376f8,[_0x227c('0xc'),_0x227c('0x43')]);_0x52973d['field']=_0x227c('0x43');_0x5be2d4=as[_0x227c('0x44')](_0x51f365,_0x53cbe7['type'],_0x52973d);_0xc559e3[_0x227c('0x40')][_0x4f9515](_0x5be2d4[_0x227c('0x45')],_0x5be2d4[_0x227c('0x39')]['start'],_0x5be2d4[_0x227c('0x39')]['end']);}break;case'Tag':var _0x8a2cf5=_0x52973d[_0x227c('0x39')][_0x227c('0x46')](',')[_0x227c('0x19')](function(_0x1681cd){return Number(_0x1681cd);});var _0x2cfa5f=parseTagParameter(_0x8a2cf5);_0xc559e3[_0x227c('0x47')]['clause']['and'](_0x2cfa5f);_0xc559e3[_0x227c('0x47')][_0x227c('0x48')]=_0x8a2cf5;break;case _0x227c('0x49'):if(_0x52973d[_0x227c('0x3e')]===_0x227c('0x3f')){_0xc559e3['user'][_0x4f9515]('CONCAT_WS(\x27\x20\x27,\x20o.name,\x20o.fullname)\x20LIKE\x20?','%'+_0x52973d[_0x227c('0x39')]+'%',null);}else{_0x53cbe7=_[_0x227c('0x35')](_0x5376f8,[_0x227c('0xc'),_0x227c('0x4a')]);_0x52973d[_0x227c('0xb')]=_0x227c('0x4a');_0x5be2d4=as[_0x227c('0x44')](_0x51f365,_0x53cbe7['type'],_0x52973d);_0xc559e3[_0x227c('0x4b')][_0x4f9515](_0x5be2d4[_0x227c('0x45')],_0x5be2d4[_0x227c('0x39')][_0x227c('0x38')],_0x5be2d4['value'][_0x227c('0x3a')]);}break;case'body':case _0x227c('0x4c'):_0x5be2d4=as[_0x227c('0x44')]('me',null,_0x52973d);_0xc559e3[_0x227c('0x4d')][_0x4f9515](_0x5be2d4[_0x227c('0x45')],_0x5be2d4[_0x227c('0x39')][_0x227c('0x38')],_0x5be2d4[_0x227c('0x39')][_0x227c('0x3a')]);break;}}}return _0xc559e3;}function parseModelFields(_0x861f25,_0x58b3d3,_0xa38a5d){var _0xb92d6d=utils[_0x227c('0x7')](_0x861f25);var _0x5e4db3=squel[_0x227c('0x22')]();var _0x433f13=_(_0x58b3d3)[_0x227c('0x4e')]()[_0x227c('0x19')](function(_0x473a6b){return _[_0x227c('0x4f')](_0xa38a5d,[_0x227c('0xc'),_0x473a6b])?_0x473a6b:undefined;})[_0x227c('0x50')]()['value']();if(_0x433f13['length']>0x0){_0x433f13[_0x227c('0x24')](function(_0x5ecb06){if(_0x5ecb06===_0xb92d6d){_0x5e4db3[_0x227c('0x3c')]('i.'+_0xb92d6d+_0x227c('0x18'),[][_0x227c('0x51')](_0x58b3d3[_0x5ecb06]));}else if(_0x5ecb06==='createdAt'){var _0x2e725e=JSON['parse'](_0x58b3d3[_0x5ecb06])[_0x227c('0x52')];var _0x1e88c9=JSON[_0x227c('0x53')](_0x58b3d3[_0x5ecb06])[_0x227c('0x54')];_0x5e4db3[_0x227c('0x3c')](_0x227c('0x55'),_0x2e725e,_0x1e88c9);}else{if(_0x58b3d3[_0x5ecb06]===_0x227c('0x56')){_0x5e4db3[_0x227c('0x3c')]('i.'+_0x5ecb06+_0x227c('0x57'));}else{_0x5e4db3[_0x227c('0x3c')]('i.'+_0x5ecb06+_0x227c('0x58'),_0x58b3d3[_0x5ecb06]);}}});}return _0x5e4db3;}function parseQueryParameters(_0x5e6889,_0x1bf4da,_0x51eee0){var _0x353d4d=getSqlClauses();return Promise[_0x227c('0x59')]()[_0x227c('0x5a')](function(){return parseModelFields(_0x5e6889,_0x1bf4da,_0x51eee0);})[_0x227c('0x5a')](function(_0x20c0b9){_0x353d4d[_0x227c('0x5b')][_0x227c('0x3c')](_0x20c0b9);return parseReadParameter(_0x1bf4da['read']);})[_0x227c('0x5a')](function(_0x116102){_0x353d4d[_0x227c('0x5c')][_0x227c('0x3c')](_0x116102);return parseTagParameter(_0x1bf4da[_0x227c('0x5d')]);})[_0x227c('0x5a')](function(_0x104edf){_0x353d4d[_0x227c('0x47')][_0x227c('0x5e')]['and'](_0x104edf);return parseSearchFilter(_0x5e6889,_0x1bf4da[_0x227c('0x5f')]);})[_0x227c('0x5a')](function(_0x51bc85){_0x353d4d['filter']=_0x51bc85;return _0x353d4d;});}function checkAccountsRestrictions(_0x476acb,_0x37cd55,_0x5b0e35){var _0x467ec9=utils[_0x227c('0x7')](_0x476acb);var _0x3b1a5d=_0x227c('0x60')+_[_0x227c('0x61')](_0x476acb)+(_0x476acb===_0x227c('0x62')?_0x227c('0x63'):'Accounts');var _0x203e7c=squel[_0x227c('0x22')]();return Promise[_0x227c('0x59')]()[_0x227c('0x5a')](function(){if(_0x5b0e35[_0x227c('0xa')]&&_0x37cd55[_0x227c('0x8')]===_0x227c('0x9')){return _0x37cd55[_0x3b1a5d]({'attributes':['id'],'raw':!![]});}})[_0x227c('0x5a')](function(_0x558f01){if(_0x558f01){if(_0x558f01[_0x227c('0x17')]===0x0){_0x203e7c[_0x227c('0x3c')]('i.'+_0x467ec9+_0x227c('0x57'));}else{_0x203e7c[_0x227c('0x3c')]('i.'+_0x467ec9+_0x227c('0x18'),_[_0x227c('0x19')](_0x558f01,'id'));}}else if(!_0x5b0e35[_0x467ec9]){_0x203e7c[_0x227c('0x3c')]('i.'+_0x467ec9+_0x227c('0x64'));}})[_0x227c('0x5a')](function(){return _0x203e7c;});}function getClosedOrderClause(_0x14c18c,_0xfb4aae){var _0x395a18='';var _0x5912d9=[_0x227c('0x65'),_0x227c('0x66'),'i.disposition'];if(_0x14c18c===_0x227c('0x67')){_0x5912d9['unshift'](_0x227c('0x68'));}if(_0xfb4aae[_0x227c('0x69')]==='0'&&_0x14c18c===_0x227c('0x67')){_0x395a18=_0x227c('0x68');}else{if(_0xfb4aae[_0x227c('0x69')]==='1'){_0x5912d9[_0x227c('0x6a')]();}_0x395a18='CONCAT_WS(\x27\x27,\x20'+_0x5912d9[_0x227c('0x6b')](',\x20')+')';}return _0x395a18;}function getFilteredInteractions(_0x4d73dc,_0x149930,_0x57cafe,_0x2563ee){var _0x2c78da=utils[_0x227c('0x6c')](_0x4d73dc);var _0x5a187a=_[_0x227c('0x61')](_0x4d73dc)+_0x227c('0x6d');var _0x39f540=[];var _0xc40388=getTagsQuery();var _0x4bb86f={'type':db[_0x227c('0x6e')][_0x227c('0x6f')][_0x227c('0x70')],'raw':!![]};var _0x49d2b1=[];var _0x362401=[];return db[_0x227c('0x71')][_0x227c('0x72')](_0xc40388[_0x227c('0x73')](),_0x4bb86f)[_0x227c('0x5a')](function(_0x460e3e){_0x39f540=_[_0x227c('0x74')](_0x460e3e,'id');_0x4bb86f=_[_0x227c('0x75')](_0x4bb86f,{'model':db[_0x5a187a],'mapToModel':!![],'nest':!![]});if(_0x57cafe['fields']){_0x2563ee['attributes'][_0x227c('0x24')](function(_0x569289){_0x149930[_0x227c('0xb')]('i.'+_0x569289);});}else{_0x149930[_0x227c('0xb')](_0x227c('0x76'),_0x227c('0x3b'));_0x149930[_0x227c('0xb')]('a.key',_0x227c('0x77'));_0x149930['field'](_0x227c('0x78'),_0x227c('0x79'));if(_0x4d73dc===_0x227c('0x67')){_0x149930[_0x227c('0xb')](_0x227c('0x7a'),_0x227c('0x7b'));_0x149930[_0x227c('0xb')]('CASE\x20WHEN\x20i.to\x20IS\x20NOT\x20NULL\x20AND\x20i.to\x20<>\x20\x27\x27\x20AND\x20i.to\x20NOT\x20LIKE\x20CONCAT(\x27%\x27,\x20a.email,\x20\x27%\x27)\x20THEN\x20TRIM(SUBSTRING_INDEX(i.to,\x20\x27<\x27,\x201))\x20WHEN\x20(c.firstName\x20IS\x20NOT\x20NULL\x20AND\x20c.firstName\x20<>\x20\x27\x27)\x20OR\x20(c.lastName\x20IS\x20NOT\x20NULL\x20AND\x20c.lastName\x20<>\x20\x27\x27)\x20THEN\x20CONCAT(IFNULL(c.firstName,\x20\x27\x27),\x20\x27\x20\x27,\x20IFNULL(c.lastName,\x20\x27\x27))\x20ELSE\x20\x27Unknown\x27\x20END','contactName');_0x149930[_0x227c('0xb')](_0x227c('0x7c'));_0x149930[_0x227c('0xb')](_0x227c('0x7d'));_0x149930[_0x227c('0xb')]('i.updatedAt');_0x149930['field'](_0x227c('0x7e'));_0x149930[_0x227c('0xb')](_0x227c('0x7f'));_0x149930['field'](_0x227c('0x80'));_0x149930['field']('i.lastMsgAt');_0x149930['field']('i.lastMsgDirection');_0x149930[_0x227c('0xb')](_0x227c('0x81'));_0x149930[_0x227c('0xb')]('i.disposition');_0x149930[_0x227c('0xb')](_0x227c('0x66'));_0x149930[_0x227c('0xb')](_0x227c('0x65'));_0x149930[_0x227c('0xb')](_0x227c('0x68'));_0x149930['field'](_0x227c('0x82'));_0x149930[_0x227c('0xb')](_0x227c('0x83'));_0x149930[_0x227c('0xb')]('i.MailAccountId');_0x149930[_0x227c('0xb')]('i.UserId');}else if(_0x4d73dc===_0x227c('0x2d')){_0x149930[_0x227c('0xb')](_0x227c('0x84'),_0x227c('0x85'));}else{_0x149930[_0x227c('0xb')](_0x227c('0x86'),_0x227c('0x85'));}if(_0x4d73dc!==_0x227c('0x67')){_0x149930[_0x227c('0xb')](_0x227c('0x87'));}_0x149930[_0x227c('0xb')]('c.firstName',_0x227c('0x88'));_0x149930[_0x227c('0xb')]('c.lastName','Contact.lastName');_0x149930['field']('c.email','Contact.email');_0x149930[_0x227c('0xb')](_0x227c('0x89'),_0x227c('0x8a'));_0x149930['field']('c.mobile',_0x227c('0x8b'));_0x149930['field'](_0x227c('0x8c'),_0x227c('0x8d'));_0x149930[_0x227c('0xb')]('o.fullname',_0x227c('0x8e'));_0x149930['field'](_0x227c('0x8f'),_0x227c('0x90'));_0x149930['field']('GROUP_CONCAT(DISTINCT\x20t.id)','TagIds');}if(_0x2563ee[_0x227c('0x91')]){_0x149930[_0x227c('0x91')](_0x2563ee[_0x227c('0x91')]);}if(_0x2563ee[_0x227c('0x92')]){_0x149930['offset'](_0x2563ee['offset']);}return db[_0x227c('0x71')][_0x227c('0x72')](_0x149930[_0x227c('0x73')](),_0x4bb86f);})['then'](function(_0x27ce67){_0x49d2b1=_0x27ce67;var _0x1b4274=getUsersQuery(_0x4d73dc,_0x49d2b1);return db['sequelize'][_0x227c('0x72')](_0x1b4274['toString'](),_0x4bb86f);})[_0x227c('0x5a')](function(_0x2338a5){_0x362401=_['groupBy'](_0x2338a5,_0x2c78da);if(_0x4d73dc===_0x227c('0x67')){return db[_0x227c('0x93')]['findOne']({'attributes':[_0x227c('0x94')],'raw':!![]});}})[_0x227c('0x5a')](function(_0x3a30a0){var _0x22bb81=_0x3a30a0?_0x3a30a0[_0x227c('0x94')]:undefined;var _0x2bb7fa=_0x49d2b1[_0x227c('0x19')](function(_0xe22c8b){return updateInteraction(_0xe22c8b,_0x39f540,_0x362401,_0x22bb81);});return Promise[_0x227c('0x95')](_0x2bb7fa);});}function countFilteredInteractions(_0x4717f1,_0x413102){var _0x463869=_0x4717f1[_0x227c('0x96')]();_0x463869[_0x227c('0xb')](_0x227c('0x97'));_0x463869['field'](_0x227c('0x76'),_0x227c('0x3b'));var _0x391162=utils[_0x227c('0x23')](_0x413102);if(!_[_0x227c('0x98')](_0x391162)){_0x463869[_0x227c('0x99')](_0x227c('0x9a'),_0x391162);}var _0x3044c4={'type':db[_0x227c('0x6e')][_0x227c('0x6f')][_0x227c('0x70')],'raw':!![]};return db[_0x227c('0x71')]['query'](_0x463869['toString'](),_0x3044c4);}module[_0x227c('0x9b')]={'checkAccountsRestrictions':checkAccountsRestrictions,'countFilteredInteractions':countFilteredInteractions,'getClosedOrderClause':getClosedOrderClause,'getFilteredInteractions':getFilteredInteractions,'getInteractionsQuery':getInteractionsQuery,'parseAdvancedSearchFilter':parseAdvancedSearchFilter,'parseQueryParameters':parseQueryParameters,'skipInteractionsQuery':skipInteractionsQuery}; \ No newline at end of file diff --git a/server/components/interaction/update-interaction.js b/server/components/interaction/update-interaction.js index b61d632..176d683 100644 --- a/server/components/interaction/update-interaction.js +++ b/server/components/interaction/update-interaction.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x5326=['fullname','push','waiting','talking','unmanaged','abandoned','total','closed','UserId','answered','MailMessage','out','then','plainBody','lastMsgText','trimStart','updateInteraction','Users','TagIds','Tags','../../mysqldb','map'];(function(_0x5692bc,_0x13b52d){var _0x49c4ae=function(_0x8525b3){while(--_0x8525b3){_0x5692bc['push'](_0x5692bc['shift']());}};_0x49c4ae(++_0x13b52d);}(_0x5326,0x82));var _0x6532=function(_0xf911e5,_0x2909ee){_0xf911e5=_0xf911e5-0x0;var _0x26e8f4=_0x5326[_0xf911e5];return _0x26e8f4;};'use strict';var _=require('lodash');var db=require(_0x6532('0x0'))['db'];function getInteractionUsers(_0x32b408,_0x5a2a66){return new Promise(function(_0x11fa10,_0x387614){try{var _0x10ae12=[];if(_0x5a2a66[_0x32b408]){_0x10ae12=_0x5a2a66[_0x32b408][_0x6532('0x1')](function(_0xf64e89){return{'id':_0xf64e89['id'],'fullname':_0xf64e89[_0x6532('0x2')]};});}return _0x11fa10(_0x10ae12);}catch(_0x3c0b84){_0x387614(_0x3c0b84);}});}function getInteractionTags(_0xd3a33d,_0x14498f){var _0x166984=[];if(_0xd3a33d){_0xd3a33d['split'](',')['forEach'](function(_0x5b57ee){_0x166984[_0x6532('0x3')](_0x14498f[_0x5b57ee]);});}return _0x166984;}function updateWaitingCounter(_0x2e41da){if(_0x2e41da[_0x6532('0x4')]){_0x2e41da['waiting']-=0x1;}}function updateInteractionCounters(_0x1948d8){_0x1948d8['waiting']=0x0;_0x1948d8[_0x6532('0x5')]=0x0;_0x1948d8['answered']=0x0;_0x1948d8[_0x6532('0x6')]=0x0;_0x1948d8[_0x6532('0x7')]=0x0;_0x1948d8[_0x6532('0x8')]=0x0;if(_0x1948d8[_0x6532('0x9')]){if(_0x1948d8['disposition']===_0x6532('0x7')){_0x1948d8[_0x6532('0x7')]+=0x1;updateWaitingCounter(_0x1948d8);}if(_0x1948d8[_0x6532('0xa')]){_0x1948d8[_0x6532('0xb')]+=0x1;if(_0x1948d8[_0x6532('0x5')]){_0x1948d8[_0x6532('0x5')]-=0x1;}}else{if(_0x1948d8['disposition']){_0x1948d8[_0x6532('0x6')]+=0x1;updateWaitingCounter(_0x1948d8);}}}else{if(!_0x1948d8[_0x6532('0xa')]){_0x1948d8['waiting']+=0x1;}if(_0x1948d8[_0x6532('0xa')]){_0x1948d8[_0x6532('0x5')]+=0x1;updateWaitingCounter(_0x1948d8);}}_0x1948d8[_0x6532('0x8')]+=0x1;return _0x1948d8;}function getLastMessageText(_0x48e761){return db[_0x6532('0xc')]['findOne']({'where':{'$and':[{'MailInteractionId':_0x48e761['id']},{'$or':[{'direction':'in'},{'$and':[{'direction':_0x6532('0xd')},{'secret':![]},{'UserId':{'$ne':null}}]}]}]},'attributes':['plainBody'],'order':'-id','raw':!![]})[_0x6532('0xe')](function(_0x2290fc){if(_0x2290fc&&_0x2290fc[_0x6532('0xf')]){_0x48e761[_0x6532('0x10')]=_[_0x6532('0x11')](_0x2290fc[_0x6532('0xf')]);}return _0x48e761;})['catch'](function(_0x33066a){throw _0x33066a;});}exports[_0x6532('0x12')]=function(_0xad7cde,_0x20f023,_0x210bfd,_0x51b8e2){return new Promise(function(_0x445afb,_0x32d9cd){return getInteractionUsers(_0xad7cde['id'],_0x210bfd)[_0x6532('0xe')](function(_0x45d58d){_0xad7cde[_0x6532('0x13')]=_0x45d58d;return getInteractionTags(_0xad7cde[_0x6532('0x14')],_0x20f023);})[_0x6532('0xe')](function(_0x3edc91){_0xad7cde[_0x6532('0x15')]=_0x3edc91;delete _0xad7cde[_0x6532('0x14')];return updateInteractionCounters(_0xad7cde);})['then'](function(_0x5b9d05){if(_0x51b8e2){return getLastMessageText(_0x5b9d05);}else{return _0x5b9d05;}})[_0x6532('0xe')](function(_0x4c9584){_0x445afb(_0x4c9584);})['catch'](function(_0x2569d2){_0x32d9cd(_0x2569d2);});});}; \ No newline at end of file +var _0x394d=['split','forEach','push','waiting','talking','answered','unmanaged','abandoned','total','closed','disposition','UserId','MailMessage','findOne','plainBody','-id','then','lastMsgText','trimStart','updateInteraction','TagIds','Tags','catch','../../mysqldb','map'];(function(_0x4c0165,_0x4e5fc7){var _0x10359d=function(_0x1bfc5f){while(--_0x1bfc5f){_0x4c0165['push'](_0x4c0165['shift']());}};_0x10359d(++_0x4e5fc7);}(_0x394d,0x1f2));var _0xd394=function(_0x42bdad,_0x12836c){_0x42bdad=_0x42bdad-0x0;var _0x122626=_0x394d[_0x42bdad];return _0x122626;};'use strict';var _=require('lodash');var db=require(_0xd394('0x0'))['db'];function getInteractionUsers(_0x1777ca,_0x3d359b){return new Promise(function(_0x47a7b5,_0x1caa98){try{var _0xcf28c=[];if(_0x3d359b[_0x1777ca]){_0xcf28c=_0x3d359b[_0x1777ca][_0xd394('0x1')](function(_0x1f0b20){return{'id':_0x1f0b20['id'],'fullname':_0x1f0b20['fullname']};});}return _0x47a7b5(_0xcf28c);}catch(_0x117fa8){_0x1caa98(_0x117fa8);}});}function getInteractionTags(_0x22213e,_0x4285ed){var _0x4b81be=[];if(_0x22213e){_0x22213e[_0xd394('0x2')](',')[_0xd394('0x3')](function(_0x3eb256){_0x4b81be[_0xd394('0x4')](_0x4285ed[_0x3eb256]);});}return _0x4b81be;}function updateWaitingCounter(_0x33c6d3){if(_0x33c6d3[_0xd394('0x5')]){_0x33c6d3[_0xd394('0x5')]-=0x1;}}function updateInteractionCounters(_0xf1beca){_0xf1beca[_0xd394('0x5')]=0x0;_0xf1beca[_0xd394('0x6')]=0x0;_0xf1beca[_0xd394('0x7')]=0x0;_0xf1beca[_0xd394('0x8')]=0x0;_0xf1beca[_0xd394('0x9')]=0x0;_0xf1beca[_0xd394('0xa')]=0x0;if(_0xf1beca[_0xd394('0xb')]){if(_0xf1beca[_0xd394('0xc')]===_0xd394('0x9')){_0xf1beca[_0xd394('0x9')]+=0x1;updateWaitingCounter(_0xf1beca);}if(_0xf1beca[_0xd394('0xd')]){_0xf1beca['answered']+=0x1;if(_0xf1beca[_0xd394('0x6')]){_0xf1beca['talking']-=0x1;}}else{if(_0xf1beca[_0xd394('0xc')]){_0xf1beca[_0xd394('0x8')]+=0x1;updateWaitingCounter(_0xf1beca);}}}else{if(!_0xf1beca['UserId']){_0xf1beca[_0xd394('0x5')]+=0x1;}if(_0xf1beca[_0xd394('0xd')]){_0xf1beca[_0xd394('0x6')]+=0x1;updateWaitingCounter(_0xf1beca);}}_0xf1beca['total']+=0x1;return _0xf1beca;}function getLastMessageText(_0x3fe91b){return db[_0xd394('0xe')][_0xd394('0xf')]({'where':{'$and':[{'MailInteractionId':_0x3fe91b['id']},{'$or':[{'direction':'in'},{'$and':[{'direction':'out'},{'secret':![]},{'UserId':{'$ne':null}}]}]}]},'attributes':[_0xd394('0x10')],'order':_0xd394('0x11'),'raw':!![]})[_0xd394('0x12')](function(_0x531917){if(_0x531917&&_0x531917['plainBody']){_0x3fe91b[_0xd394('0x13')]=_[_0xd394('0x14')](_0x531917[_0xd394('0x10')]);}return _0x3fe91b;})['catch'](function(_0x5abe17){throw _0x5abe17;});}exports[_0xd394('0x15')]=function(_0x4d1db8,_0x13faf3,_0x41e12f,_0x49a56e){return new Promise(function(_0x191f23,_0x369c82){return getInteractionUsers(_0x4d1db8['id'],_0x41e12f)[_0xd394('0x12')](function(_0x5db2d9){_0x4d1db8['Users']=_0x5db2d9;return getInteractionTags(_0x4d1db8[_0xd394('0x16')],_0x13faf3);})[_0xd394('0x12')](function(_0x1e195a){_0x4d1db8[_0xd394('0x17')]=_0x1e195a;delete _0x4d1db8[_0xd394('0x16')];return updateInteractionCounters(_0x4d1db8);})[_0xd394('0x12')](function(_0x545cb9){if(_0x49a56e){return getLastMessageText(_0x545cb9);}else{return _0x545cb9;}})['then'](function(_0x2bb3a5){_0x191f23(_0x2bb3a5);})[_0xd394('0x18')](function(_0x1ed0db){_0x369c82(_0x1ed0db);});});}; \ No newline at end of file diff --git a/server/components/interaction/utils.js b/server/components/interaction/utils.js index 03fb0c9..1d342a8 100644 --- a/server/components/interaction/utils.js +++ b/server/components/interaction/utils.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x0f6a=['toLowerCase','[%s]\x20id=%s\x20name=%s\x20role=%s\x20interaction=%s\x20body=%s','toUpperCase','name','role','stringify','null','Interaction','then','update','info','catch','exports','../../mysqldb','../../config/logger','openchannel-interactions','fax-interactions','sms-interactions','chat-interactions','whatsapp-interactions','capitalize','chat','Account','upperFirst','InteractionId','unknown','accounts','_interactions','_messages','isArray'];(function(_0x5ac53a,_0x3be4d2){var _0x4bdc0b=function(_0x3817c2){while(--_0x3817c2){_0x5ac53a['push'](_0x5ac53a['shift']());}};_0x4bdc0b(++_0x3be4d2);}(_0x0f6a,0x1cf));var _0xa0f6=function(_0x23aa39,_0x4f4f2c){_0x23aa39=_0x23aa39-0x0;var _0x26e995=_0x0f6a[_0x23aa39];return _0x26e995;};'use strict';var _=require('lodash');var db=require(_0xa0f6('0x0'))['db'];var loggers={'openchannel':require(_0xa0f6('0x1'))(_0xa0f6('0x2')),'mail':require(_0xa0f6('0x1'))('mail-interactions'),'fax':require(_0xa0f6('0x1'))(_0xa0f6('0x3')),'sms':require(_0xa0f6('0x1'))(_0xa0f6('0x4')),'chat':require('../../config/logger')(_0xa0f6('0x5')),'whatsapp':require(_0xa0f6('0x1'))(_0xa0f6('0x6'))};function getAccountFK(_0x3c63ed){return _[_0xa0f6('0x7')](_0x3c63ed)+(_0x3c63ed===_0xa0f6('0x8')?'Website':_0xa0f6('0x9'))+'Id';}function getInteractionFK(_0x240e46){return _[_0xa0f6('0x7')](_0x240e46)+'InteractionId';}function getInteractionId(_0x2c2b6a,_0x4b8c85,_0xbe42de){if(_0x2c2b6a&&_0x2c2b6a[_[_0xa0f6('0xa')](_0xbe42de)+_0xa0f6('0xb')]){return _0x2c2b6a[_[_0xa0f6('0xa')](_0xbe42de)+'InteractionId'];}else if(_0x2c2b6a&&_0x2c2b6a['id']){return _0x2c2b6a['id'];}else if(_0x4b8c85&&_0x4b8c85['id']){return _0x4b8c85['id'];}else{return _0xa0f6('0xc');}}function getInteractionsTables(_0x42de20){return{'accounts':_0x42de20+'_'+(_0x42de20===_0xa0f6('0x8')?'websites':_0xa0f6('0xd')),'interactions':_0x42de20+_0xa0f6('0xe'),'interactionsTags':_0x42de20+'_interaction_has_tags','messages':_0x42de20+_0xa0f6('0xf'),'userInteractions':'user_has_'+_0x42de20+_0xa0f6('0xe')};}function getSelectedTags(_0x39316a){var _0x122a4a=[];if(_0x39316a){_0x122a4a=Array[_0xa0f6('0x10')](_0x39316a)?_0x39316a:[_0x39316a];}return _0x122a4a;}function log(_0x2d9ec0,_0x156632,_0x5b55ce,_0x4a21a4,_0xfbfcab,_0x3cc279){loggers[_0xfbfcab[_0xa0f6('0x11')]()][_0x2d9ec0](_0xa0f6('0x12'),_0x3cc279[_0xa0f6('0x13')](),_0x156632?_0x156632['id']:null,_0x156632?_0x156632[_0xa0f6('0x14')]:null,_0x156632?_0x156632[_0xa0f6('0x15')]:null,getInteractionId(_0x5b55ce,_0x4a21a4,_0xfbfcab),_0x5b55ce?JSON[_0xa0f6('0x16')](_0x5b55ce):_0xa0f6('0x17'));}function updateUser(_0x56780a,_0x28c9ee,_0x374ba6,_0x2e7d2e,_0x571a73){db[_[_0xa0f6('0xa')](_0x2e7d2e)+_0xa0f6('0x18')]['findOne']({'where':{'id':getInteractionId(_0x28c9ee,_0x374ba6,_0x2e7d2e)}})[_0xa0f6('0x19')](function(_0x22ae75){if(_0x22ae75){return _0x22ae75[_0xa0f6('0x1a')]({'UserId':_0x56780a?_0x56780a['id']:null});}})[_0xa0f6('0x19')](function(_0x39e2e3){if(_0x39e2e3){log(_0xa0f6('0x1b'),_0x56780a,_0x28c9ee,_0x374ba6,_0x2e7d2e,_0x571a73);}})[_0xa0f6('0x1c')](function(){log('error',_0x56780a,_0x28c9ee,_0x374ba6,_0x2e7d2e,_0x571a73);});}module[_0xa0f6('0x1d')]={'getAccountFK':getAccountFK,'getInteractionFK':getInteractionFK,'getInteractionsTables':getInteractionsTables,'getSelectedTags':getSelectedTags,'updateUser':updateUser}; \ No newline at end of file +var _0xa5b8=['update','info','catch','error','exports','lodash','../../mysqldb','../../config/logger','openchannel-interactions','fax-interactions','sms-interactions','chat-interactions','capitalize','Account','upperFirst','InteractionId','unknown','chat','websites','accounts','_interactions','_messages','user_has_','isArray','toLowerCase','[%s]\x20id=%s\x20name=%s\x20role=%s\x20interaction=%s\x20body=%s','toUpperCase','name','role','stringify','null','Interaction','findOne','then'];(function(_0x15cdcb,_0x4340e9){var _0x37b069=function(_0x304cfb){while(--_0x304cfb){_0x15cdcb['push'](_0x15cdcb['shift']());}};_0x37b069(++_0x4340e9);}(_0xa5b8,0xaf));var _0x8a5b=function(_0x258bde,_0x1d81c9){_0x258bde=_0x258bde-0x0;var _0xa17e86=_0xa5b8[_0x258bde];return _0xa17e86;};'use strict';var _=require(_0x8a5b('0x0'));var db=require(_0x8a5b('0x1'))['db'];var loggers={'openchannel':require(_0x8a5b('0x2'))(_0x8a5b('0x3')),'mail':require('../../config/logger')('mail-interactions'),'fax':require(_0x8a5b('0x2'))(_0x8a5b('0x4')),'sms':require(_0x8a5b('0x2'))(_0x8a5b('0x5')),'chat':require(_0x8a5b('0x2'))(_0x8a5b('0x6')),'whatsapp':require(_0x8a5b('0x2'))('whatsapp-interactions')};function getAccountFK(_0x1c0d9e){return _[_0x8a5b('0x7')](_0x1c0d9e)+(_0x1c0d9e==='chat'?'Website':_0x8a5b('0x8'))+'Id';}function getInteractionFK(_0x4c94c7){return _['capitalize'](_0x4c94c7)+'InteractionId';}function getInteractionId(_0x4ef1fc,_0x4e53f9,_0xa55c78){if(_0x4ef1fc&&_0x4ef1fc[_[_0x8a5b('0x9')](_0xa55c78)+_0x8a5b('0xa')]){return _0x4ef1fc[_[_0x8a5b('0x9')](_0xa55c78)+_0x8a5b('0xa')];}else if(_0x4ef1fc&&_0x4ef1fc['id']){return _0x4ef1fc['id'];}else if(_0x4e53f9&&_0x4e53f9['id']){return _0x4e53f9['id'];}else{return _0x8a5b('0xb');}}function getInteractionsTables(_0x4a2933){return{'accounts':_0x4a2933+'_'+(_0x4a2933===_0x8a5b('0xc')?_0x8a5b('0xd'):_0x8a5b('0xe')),'interactions':_0x4a2933+_0x8a5b('0xf'),'interactionsTags':_0x4a2933+'_interaction_has_tags','messages':_0x4a2933+_0x8a5b('0x10'),'userInteractions':_0x8a5b('0x11')+_0x4a2933+_0x8a5b('0xf')};}function getSelectedTags(_0x216d94){var _0x3a88cf=[];if(_0x216d94){_0x3a88cf=Array[_0x8a5b('0x12')](_0x216d94)?_0x216d94:[_0x216d94];}return _0x3a88cf;}function log(_0x56af3c,_0x5d19d4,_0x4208b9,_0xd56c2b,_0x183f47,_0x3efbfb){loggers[_0x183f47[_0x8a5b('0x13')]()][_0x56af3c](_0x8a5b('0x14'),_0x3efbfb[_0x8a5b('0x15')](),_0x5d19d4?_0x5d19d4['id']:null,_0x5d19d4?_0x5d19d4[_0x8a5b('0x16')]:null,_0x5d19d4?_0x5d19d4[_0x8a5b('0x17')]:null,getInteractionId(_0x4208b9,_0xd56c2b,_0x183f47),_0x4208b9?JSON[_0x8a5b('0x18')](_0x4208b9):_0x8a5b('0x19'));}function updateUser(_0x5979ce,_0x37148a,_0x207bc9,_0x4c7c3a,_0x423629){db[_['upperFirst'](_0x4c7c3a)+_0x8a5b('0x1a')][_0x8a5b('0x1b')]({'where':{'id':getInteractionId(_0x37148a,_0x207bc9,_0x4c7c3a)}})[_0x8a5b('0x1c')](function(_0x409f6e){if(_0x409f6e){return _0x409f6e[_0x8a5b('0x1d')]({'UserId':_0x5979ce?_0x5979ce['id']:null});}})[_0x8a5b('0x1c')](function(_0x466429){if(_0x466429){log(_0x8a5b('0x1e'),_0x5979ce,_0x37148a,_0x207bc9,_0x4c7c3a,_0x423629);}})[_0x8a5b('0x1f')](function(){log(_0x8a5b('0x20'),_0x5979ce,_0x37148a,_0x207bc9,_0x4c7c3a,_0x423629);});}module[_0x8a5b('0x21')]={'getAccountFK':getAccountFK,'getInteractionFK':getInteractionFK,'getInteractionsTables':getInteractionsTables,'getSelectedTags':getSelectedTags,'updateUser':updateUser}; \ No newline at end of file diff --git a/server/components/license/service.js b/server/components/license/service.js index 4c7bb9f..e613091 100644 --- a/server/components/license/service.js +++ b/server/components/license/service.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x9096=['%s:%s:%s','update','utf8','final','parse','hasOwnProperty','use','License','findOne','then','count','status','json','catch','users','User','isUserLimit','license','split','createDecipher','format'];(function(_0x4912e0,_0x10c2be){var _0x38f4d0=function(_0x2601a7){while(--_0x2601a7){_0x4912e0['push'](_0x4912e0['shift']());}};_0x38f4d0(++_0x10c2be);}(_0x9096,0x176));var _0x6909=function(_0x2da7b8,_0x5000a7){_0x2da7b8=_0x2da7b8-0x0;var _0x1cfa7d=_0x9096[_0x2da7b8];return _0x1cfa7d;};'use strict';var crypto=require('crypto');var util=require('util');var compose=require('composable-middleware');var db=require('../../mysqldb')['db'];var config=require('../../config/environment');function getValueFromLicense(_0x16bd77,_0x8f31ad){if(_0x16bd77&&_0x8f31ad){if(_0x8f31ad['data1']&&_0x8f31ad['license']){var _0x22abdc=_0x8f31ad['data1'];var _0x3ed8fa=_0x8f31ad[_0x6909('0x0')];var _0x2cf23a=_0x22abdc[_0x6909('0x1')]('-')[0x4];var _0x20dad4=_0x22abdc[_0x6909('0x1')]('-')[0x0];var _0xf6eb90=crypto[_0x6909('0x2')]('aes-256-ctr',util[_0x6909('0x3')](_0x6909('0x4'),_0x2cf23a,_0x22abdc,_0x20dad4));var _0x561d85=_0xf6eb90[_0x6909('0x5')](_0x3ed8fa,'base64',_0x6909('0x6'));_0x561d85+=_0xf6eb90[_0x6909('0x7')](_0x6909('0x6'));var _0x1b3e5b=JSON[_0x6909('0x8')](_0x561d85);return _0x1b3e5b[_0x6909('0x9')](_0x16bd77)?_0x1b3e5b[_0x16bd77]:null;}}return null;}function isLimit(_0x8eb82d,_0x2cdaa6,_0x576c8c,_0x7fb29){var _0x18f352=_0x2cdaa6;return compose()[_0x6909('0xa')](function(_0x117e32,_0x1c6a0a,_0x240964){return db[_0x6909('0xb')][_0x6909('0xc')]({'where':{'id':0x1},'raw':!![]})[_0x6909('0xd')](function(_0x3c2d66){var _0x4c2c45=getValueFromLicense(_0x8eb82d,_0x3c2d66);return _0x4c2c45?_0x4c2c45:_0x18f352;})[_0x6909('0xd')](function(_0x41b865){_0x18f352=_0x41b865;return _0x576c8c[_0x6909('0xe')](_0x7fb29);})[_0x6909('0xd')](function(_0x2a6a96){if(_0x2a6a96>=_0x18f352){return _0x1c6a0a[_0x6909('0xf')](0x193)[_0x6909('0x10')]({'message':util['format']('Maximum\x20%s\x20limit\x20have\x20been\x20reached',_0x8eb82d)});}_0x240964();})[_0x6909('0x11')](function(_0x460918){_0x240964(_0x460918);});});}function isUserLimit(){return isLimit(_0x6909('0x12'),0x1,db[_0x6909('0x13')],{'where':{'$or':[{'role':'admin'},{'role':'user'}]}});}exports[_0x6909('0x14')]=isUserLimit; \ No newline at end of file +var _0x2f3e=['createDecipher','aes-256-ctr','format','update','base64','utf8','parse','use','License','then','count','status','Maximum\x20%s\x20limit\x20have\x20been\x20reached','catch','users','admin','user','isUserLimit','crypto','util','../../mysqldb','../../config/environment','data1','license','split'];(function(_0x304d27,_0xbc9864){var _0x47ee12=function(_0x4de8dd){while(--_0x4de8dd){_0x304d27['push'](_0x304d27['shift']());}};_0x47ee12(++_0xbc9864);}(_0x2f3e,0x157));var _0xe2f3=function(_0x1e4150,_0x55b02a){_0x1e4150=_0x1e4150-0x0;var _0x1ce3ee=_0x2f3e[_0x1e4150];return _0x1ce3ee;};'use strict';var crypto=require(_0xe2f3('0x0'));var util=require(_0xe2f3('0x1'));var compose=require('composable-middleware');var db=require(_0xe2f3('0x2'))['db'];var config=require(_0xe2f3('0x3'));function getValueFromLicense(_0xeb347c,_0x31a060){if(_0xeb347c&&_0x31a060){if(_0x31a060[_0xe2f3('0x4')]&&_0x31a060[_0xe2f3('0x5')]){var _0x2af0dd=_0x31a060['data1'];var _0x5e5bdf=_0x31a060['license'];var _0x15a34d=_0x2af0dd[_0xe2f3('0x6')]('-')[0x4];var _0x392621=_0x2af0dd['split']('-')[0x0];var _0x1c5316=crypto[_0xe2f3('0x7')](_0xe2f3('0x8'),util[_0xe2f3('0x9')]('%s:%s:%s',_0x15a34d,_0x2af0dd,_0x392621));var _0x5a9465=_0x1c5316[_0xe2f3('0xa')](_0x5e5bdf,_0xe2f3('0xb'),'utf8');_0x5a9465+=_0x1c5316['final'](_0xe2f3('0xc'));var _0x46eca7=JSON[_0xe2f3('0xd')](_0x5a9465);return _0x46eca7['hasOwnProperty'](_0xeb347c)?_0x46eca7[_0xeb347c]:null;}}return null;}function isLimit(_0x50232d,_0x47943e,_0x304f16,_0x48a8eb){var _0x4dbe54=_0x47943e;return compose()[_0xe2f3('0xe')](function(_0x8bf863,_0x3199fe,_0x5623d5){return db[_0xe2f3('0xf')]['findOne']({'where':{'id':0x1},'raw':!![]})['then'](function(_0x488bbf){var _0x40b26d=getValueFromLicense(_0x50232d,_0x488bbf);return _0x40b26d?_0x40b26d:_0x4dbe54;})[_0xe2f3('0x10')](function(_0x65a82d){_0x4dbe54=_0x65a82d;return _0x304f16[_0xe2f3('0x11')](_0x48a8eb);})[_0xe2f3('0x10')](function(_0x47cba0){if(_0x47cba0>=_0x4dbe54){return _0x3199fe[_0xe2f3('0x12')](0x193)['json']({'message':util[_0xe2f3('0x9')](_0xe2f3('0x13'),_0x50232d)});}_0x5623d5();})[_0xe2f3('0x14')](function(_0x2fed10){_0x5623d5(_0x2fed10);});});}function isUserLimit(){return isLimit(_0xe2f3('0x15'),0x1,db['User'],{'where':{'$or':[{'role':_0xe2f3('0x16')},{'role':_0xe2f3('0x17')}]}});}exports[_0xe2f3('0x18')]=isUserLimit; \ No newline at end of file diff --git a/server/components/parsers/advancedSearch.js b/server/components/parsers/advancedSearch.js index 5aae224..4b2c66e 100644 --- a/server/components/parsers/advancedSearch.js +++ b/server/components/parsers/advancedSearch.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x6cdb=['and','[$and]','split','length','slice','forEach','shift','match','filter','indexOf','map','push','buildExpression','DATE','$eq','operator','value','includes','add','days','format','YYYY-MM-DD','castTo','text','field','\x20AS\x20','$ne','$notIn','\x20OR\x20','\x20IS\x20NULL)','$in','IN\x20?','NOT\x20IN\x20?','=\x20?','<>\x20?','$substring','$startsWith','$endsWith','$lt','<\x20?','$gt','>\x20?','$gte','>=\x20?','$between','BETWEEN\x20?\x20AND\x20?','start','pop','utcOffset','hours','seconds','lodash','moment','parseSearch','[$or]'];(function(_0x258779,_0x3d3b13){var _0x367ce2=function(_0x2cfda2){while(--_0x2cfda2){_0x258779['push'](_0x258779['shift']());}};_0x367ce2(++_0x3d3b13);}(_0x6cdb,0xd8));var _0xb6cd=function(_0x36a944,_0x5b269d){_0x36a944=_0x36a944-0x0;var _0x555677=_0x6cdb[_0x36a944];return _0x555677;};'use strict';var _=require(_0xb6cd('0x0'));var moment=require(_0xb6cd('0x1'));exports[_0xb6cd('0x2')]=function(_0x32117e){var _0x204d1d={'conditions':[]};_0x204d1d['sqlOperator']=_['startsWith'](_0x32117e,_0xb6cd('0x3'))?'or':_0xb6cd('0x4');var _0x328109=_0x32117e['replace'](_0xb6cd('0x5'),'')['replace']('[$or]','')[_0xb6cd('0x6')]('||');for(var _0x3eb685=0x0;_0x3eb685<_0x328109[_0xb6cd('0x7')];_0x3eb685++){var _0x5f5278=_0x328109[_0x3eb685]['split'](':=');var _0x276132=_0x5f5278[0x0];var _0x58ec8f=_0x5f5278[_0xb6cd('0x8')](0x1);_0x58ec8f[_0xb6cd('0x9')](function(_0x153988){var _0x3d0dc5=_0x153988[_0xb6cd('0x6')]('[')[_0xb6cd('0xa')]();var _0x16b48a=_0x153988[_0xb6cd('0xb')](/\[(.*?)\]/g);_0x16b48a[_0xb6cd('0x9')](function(_0x3c394a){var _0x4ea08c=_0x3c394a[_0xb6cd('0x6')]('[')[_0xb6cd('0xc')](function(_0xdb7e7b){return _0xdb7e7b[_0xb6cd('0xd')](']')>-0x1;})[_0xb6cd('0xe')](function(_0x162122){return _0x162122[_0xb6cd('0x6')](']')[0x0];})[0x0];_0x204d1d['conditions'][_0xb6cd('0xf')]({'field':_0x276132,'operator':_0x3d0dc5,'value':_0x4ea08c});});});}return _0x204d1d;};exports[_0xb6cd('0x10')]=function(_0x7fb061,_0xc791ea,_0x8aae33){var _0x36975a={};if(_0xc791ea===_0xb6cd('0x11')){if(_0x8aae33['operator']===_0xb6cd('0x12')){_0x8aae33[_0xb6cd('0x13')]='$between';_0x8aae33[_0xb6cd('0x14')]+=','+_0x8aae33[_0xb6cd('0x14')];}else if(_[_0xb6cd('0x15')](['$gt','$lte'],_0x8aae33['operator'])){_0x8aae33[_0xb6cd('0x14')]=moment(_0x8aae33[_0xb6cd('0x14')])[_0xb6cd('0x16')](0x1,_0xb6cd('0x17'))[_0xb6cd('0x18')](_0xb6cd('0x19'));}}if(_0x8aae33[_0xb6cd('0x1a')]){_0xc791ea=_0x8aae33[_0xb6cd('0x1a')];_0x36975a[_0xb6cd('0x1b')]='CAST('+_0x7fb061+'.'+_0x8aae33[_0xb6cd('0x1c')]+_0xb6cd('0x1d')+_0x8aae33['castTo']+')\x20'+parseOperator(_0x8aae33['operator']);}else{_0x36975a[_0xb6cd('0x1b')]=_0x7fb061+'.'+_0x8aae33['field']+'\x20'+parseOperator(_0x8aae33[_0xb6cd('0x13')]);}if(_[_0xb6cd('0x15')]([_0xb6cd('0x1e'),_0xb6cd('0x1f')],_0x8aae33['operator']))_0x36975a[_0xb6cd('0x1b')]='('+_0x36975a['text']+_0xb6cd('0x20')+_0x7fb061+'.'+_0x8aae33[_0xb6cd('0x1c')]+_0xb6cd('0x21');_0x36975a[_0xb6cd('0x14')]=parseValue(_0xc791ea,_0x8aae33['operator'],_0x8aae33[_0xb6cd('0x14')]);return _0x36975a;};function parseOperator(_0x3a6994){var _0x7e5ea;switch(_0x3a6994){case _0xb6cd('0x22'):_0x7e5ea=_0xb6cd('0x23');break;case _0xb6cd('0x1f'):_0x7e5ea=_0xb6cd('0x24');break;case _0xb6cd('0x12'):_0x7e5ea=_0xb6cd('0x25');break;case _0xb6cd('0x1e'):_0x7e5ea=_0xb6cd('0x26');break;case _0xb6cd('0x27'):case _0xb6cd('0x28'):case _0xb6cd('0x29'):_0x7e5ea='LIKE\x20?';break;case _0xb6cd('0x2a'):_0x7e5ea=_0xb6cd('0x2b');break;case _0xb6cd('0x2c'):_0x7e5ea=_0xb6cd('0x2d');break;case'$lte':_0x7e5ea='<=\x20?';break;case _0xb6cd('0x2e'):_0x7e5ea=_0xb6cd('0x2f');break;case _0xb6cd('0x30'):_0x7e5ea=_0xb6cd('0x31');break;}return _0x7e5ea;}function parseValue(_0x49d662,_0x4af7be,_0x22c4fb){var _0x126548={'start':undefined,'end':undefined};switch(_0x4af7be){case _0xb6cd('0x22'):case _0xb6cd('0x1f'):_0x126548[_0xb6cd('0x32')]=_0x22c4fb['split'](',');break;case _0xb6cd('0x27'):_0x126548[_0xb6cd('0x32')]='%'+_0x22c4fb+'%';break;case _0xb6cd('0x28'):_0x126548[_0xb6cd('0x32')]=_0x22c4fb+'%';break;case _0xb6cd('0x29'):_0x126548['start']='%'+_0x22c4fb;break;case _0xb6cd('0x30'):var _0x40e155=_0x22c4fb[_0xb6cd('0x6')](',');var _0x22c4fb=_0x40e155['shift']();var _0xfa76a4=_0x40e155[_0xb6cd('0x33')]();if(_0x49d662===_0xb6cd('0x11')){_0x22c4fb=moment(_0x22c4fb)[_0xb6cd('0x34')](0x0,!![])['format']();_0xfa76a4=moment(_0xfa76a4)[_0xb6cd('0x34')](0x0,!![])[_0xb6cd('0x16')](0x17,_0xb6cd('0x35'))[_0xb6cd('0x16')](0x3b,'minutes')[_0xb6cd('0x16')](0x3b,_0xb6cd('0x36'))[_0xb6cd('0x18')]();}_0x126548={'start':_0x22c4fb,'end':_0xfa76a4};break;default:_0x126548[_0xb6cd('0x32')]=_0x22c4fb;break;}return _0x126548;} \ No newline at end of file +var _0x7553=['$ne','$notIn','\x20IS\x20NULL)','$in','IN\x20?','NOT\x20IN\x20?','<>\x20?','$substring','$startsWith','$endsWith','LIKE\x20?','<\x20?','$gt','$gte','>=\x20?','BETWEEN\x20?\x20AND\x20?','start','shift','pop','utcOffset','lodash','moment','parseSearch','sqlOperator','startsWith','[$or]','and','replace','split','length','slice','forEach','match','filter','indexOf','map','conditions','push','buildExpression','DATE','$eq','operator','$between','value','$lte','add','format','YYYY-MM-DD','castTo','text','field','\x20AS\x20','includes'];(function(_0x45f22a,_0x8224ab){var _0x29cf5c=function(_0x31d80b){while(--_0x31d80b){_0x45f22a['push'](_0x45f22a['shift']());}};_0x29cf5c(++_0x8224ab);}(_0x7553,0x1bc));var _0x3755=function(_0x6b4e41,_0x3ed208){_0x6b4e41=_0x6b4e41-0x0;var _0x346877=_0x7553[_0x6b4e41];return _0x346877;};'use strict';var _=require(_0x3755('0x0'));var moment=require(_0x3755('0x1'));exports[_0x3755('0x2')]=function(_0x4a3743){var _0x27a176={'conditions':[]};_0x27a176[_0x3755('0x3')]=_[_0x3755('0x4')](_0x4a3743,_0x3755('0x5'))?'or':_0x3755('0x6');var _0x42e49b=_0x4a3743[_0x3755('0x7')]('[$and]','')['replace'](_0x3755('0x5'),'')[_0x3755('0x8')]('||');for(var _0x9cf69d=0x0;_0x9cf69d<_0x42e49b[_0x3755('0x9')];_0x9cf69d++){var _0x4e343d=_0x42e49b[_0x9cf69d][_0x3755('0x8')](':=');var _0x2fd4d1=_0x4e343d[0x0];var _0x4ace9b=_0x4e343d[_0x3755('0xa')](0x1);_0x4ace9b[_0x3755('0xb')](function(_0x491a35){var _0x3b9a4b=_0x491a35[_0x3755('0x8')]('[')['shift']();var _0x5c5fb1=_0x491a35[_0x3755('0xc')](/\[(.*?)\]/g);_0x5c5fb1[_0x3755('0xb')](function(_0x535b95){var _0x49cb8f=_0x535b95[_0x3755('0x8')]('[')[_0x3755('0xd')](function(_0x299180){return _0x299180[_0x3755('0xe')](']')>-0x1;})[_0x3755('0xf')](function(_0x4fae10){return _0x4fae10[_0x3755('0x8')](']')[0x0];})[0x0];_0x27a176[_0x3755('0x10')][_0x3755('0x11')]({'field':_0x2fd4d1,'operator':_0x3b9a4b,'value':_0x49cb8f});});});}return _0x27a176;};exports[_0x3755('0x12')]=function(_0x2d675c,_0x31b55d,_0x38bbbc){var _0x4e77c8={};if(_0x31b55d===_0x3755('0x13')){if(_0x38bbbc['operator']===_0x3755('0x14')){_0x38bbbc[_0x3755('0x15')]=_0x3755('0x16');_0x38bbbc[_0x3755('0x17')]+=','+_0x38bbbc[_0x3755('0x17')];}else if(_['includes'](['$gt',_0x3755('0x18')],_0x38bbbc[_0x3755('0x15')])){_0x38bbbc[_0x3755('0x17')]=moment(_0x38bbbc[_0x3755('0x17')])[_0x3755('0x19')](0x1,'days')[_0x3755('0x1a')](_0x3755('0x1b'));}}if(_0x38bbbc[_0x3755('0x1c')]){_0x31b55d=_0x38bbbc[_0x3755('0x1c')];_0x4e77c8[_0x3755('0x1d')]='CAST('+_0x2d675c+'.'+_0x38bbbc[_0x3755('0x1e')]+_0x3755('0x1f')+_0x38bbbc[_0x3755('0x1c')]+')\x20'+parseOperator(_0x38bbbc[_0x3755('0x15')]);}else{_0x4e77c8['text']=_0x2d675c+'.'+_0x38bbbc[_0x3755('0x1e')]+'\x20'+parseOperator(_0x38bbbc[_0x3755('0x15')]);}if(_[_0x3755('0x20')]([_0x3755('0x21'),_0x3755('0x22')],_0x38bbbc['operator']))_0x4e77c8['text']='('+_0x4e77c8[_0x3755('0x1d')]+'\x20OR\x20'+_0x2d675c+'.'+_0x38bbbc['field']+_0x3755('0x23');_0x4e77c8[_0x3755('0x17')]=parseValue(_0x31b55d,_0x38bbbc['operator'],_0x38bbbc[_0x3755('0x17')]);return _0x4e77c8;};function parseOperator(_0x33e5c5){var _0x4d0e36;switch(_0x33e5c5){case _0x3755('0x24'):_0x4d0e36=_0x3755('0x25');break;case _0x3755('0x22'):_0x4d0e36=_0x3755('0x26');break;case _0x3755('0x14'):_0x4d0e36='=\x20?';break;case _0x3755('0x21'):_0x4d0e36=_0x3755('0x27');break;case _0x3755('0x28'):case _0x3755('0x29'):case _0x3755('0x2a'):_0x4d0e36=_0x3755('0x2b');break;case'$lt':_0x4d0e36=_0x3755('0x2c');break;case _0x3755('0x2d'):_0x4d0e36='>\x20?';break;case'$lte':_0x4d0e36='<=\x20?';break;case _0x3755('0x2e'):_0x4d0e36=_0x3755('0x2f');break;case _0x3755('0x16'):_0x4d0e36=_0x3755('0x30');break;}return _0x4d0e36;}function parseValue(_0x3eb8fd,_0x2f7afc,_0x12f13d){var _0x197484={'start':undefined,'end':undefined};switch(_0x2f7afc){case'$in':case _0x3755('0x22'):_0x197484[_0x3755('0x31')]=_0x12f13d[_0x3755('0x8')](',');break;case _0x3755('0x28'):_0x197484['start']='%'+_0x12f13d+'%';break;case _0x3755('0x29'):_0x197484[_0x3755('0x31')]=_0x12f13d+'%';break;case _0x3755('0x2a'):_0x197484['start']='%'+_0x12f13d;break;case _0x3755('0x16'):var _0x3d06ea=_0x12f13d[_0x3755('0x8')](',');var _0x12f13d=_0x3d06ea[_0x3755('0x32')]();var _0xf419af=_0x3d06ea[_0x3755('0x33')]();if(_0x3eb8fd===_0x3755('0x13')){_0x12f13d=moment(_0x12f13d)['utcOffset'](0x0,!![])[_0x3755('0x1a')]();_0xf419af=moment(_0xf419af)[_0x3755('0x34')](0x0,!![])[_0x3755('0x19')](0x17,'hours')[_0x3755('0x19')](0x3b,'minutes')[_0x3755('0x19')](0x3b,'seconds')[_0x3755('0x1a')]();}_0x197484={'start':_0x12f13d,'end':_0xf419af};break;default:_0x197484[_0x3755('0x31')]=_0x12f13d;break;}return _0x197484;} \ No newline at end of file diff --git a/server/components/parsers/qs.js b/server/components/parsers/qs.js index a9f0810..2cbb2c2 100644 --- a/server/components/parsers/qs.js +++ b/server/components/parsers/qs.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x47f8=['sequelize','parse','keys','includes','fields','split','isEmpty','forOwn','find','type','isPlainObject','YYYY-MM-DD','utc','format','subtract','uniqueid','isArray','offset','sort','map','indexOf','priority','cast','col','unsigned','ASC','omit','length','unset','isNumeric','getFullTextValue','\x22{EXPR}\x22','forEach','replace','push','join','getOptions','query','$id','model','filters','intersection','attributes','hasOwnProperty','nolimit','limit','order','pick','filter','columns','name','value','where','VIRTUAL','lower','merge','options','lodash'];(function(_0xac2de7,_0x3542da){var _0x99e8db=function(_0x25e2a3){while(--_0x25e2a3){_0xac2de7['push'](_0xac2de7['shift']());}};_0x99e8db(++_0x3542da);}(_0x47f8,0x121));var _0x847f=function(_0x2507fa,_0x2c826b){_0x2507fa=_0x2507fa-0x0;var _0x4977f7=_0x47f8[_0x2507fa];return _0x4977f7;};'use strict';var _=require(_0x847f('0x0'));var sequelize=require(_0x847f('0x1'));var moment=require('moment');var LIMIT_VALUE=0xfa;function hasSequelizeOperator(_0x5a3816){var _0x29130f=['ne'];try{var _0x1592af=JSON[_0x847f('0x2')](_0x5a3816);var _0x2fa086=Object[_0x847f('0x3')](_0x1592af)[0x0];return _0x29130f[_0x847f('0x4')](_0x2fa086);}catch(_0x130e5c){return![];}}function getOperatorValue(_0x3959c0){var _0x3b3371=JSON[_0x847f('0x2')](_0x3959c0);var _0x5f0a2a=Object['keys'](_0x3b3371)[0x0];var _0x2f5848=_0x3b3371[_0x5f0a2a];return{['$'+_0x5f0a2a]:_0x2f5848};}exports[_0x847f('0x5')]=function(_0x5ee892){var _0x323e71=null;if(_0x5ee892){_0x323e71=_0x5ee892[_0x847f('0x6')](',');}return _0x323e71;};exports['filters']=function(_0x3abc63,_0xe94eb7){var _0xa00108={};if(!_[_0x847f('0x7')](_0x3abc63)){_[_0x847f('0x8')](_0x3abc63,function(_0x3b5325,_0x15cb14){try{if(_0xe94eb7){var _0xb5e183=_[_0x847f('0x9')](_0xe94eb7,{'name':_0x15cb14})||{};if(hasSequelizeOperator(_0x3b5325)){_0xa00108[_0x15cb14]=getOperatorValue(_0x3b5325);}else if(_0xb5e183[_0x847f('0xa')]==='DATE'&&_[_0x847f('0xb')](_0x3b5325)){var _0x3717be=JSON[_0x847f('0x2')](_0x3b5325);var _0x5ee0e6={'$gte':moment(moment(_0x3717be['$gte'])['format'](_0x847f('0xc')))[_0x847f('0xd')]()[_0x847f('0xe')](),'$lte':moment(moment(_0x3717be['$lte'])['format'](_0x847f('0xc')))[_0x847f('0xd')]()[_0x847f('0xf')](0x1,'s')[_0x847f('0xe')]()};_0xa00108[_0x15cb14]=_0x5ee0e6;}else if(_0xb5e183['name']===_0x847f('0x10')){_0xa00108[_0x15cb14]=_0x3b5325;}else{_0xa00108[_0x15cb14]=_['isArray'](_0x3b5325)?_0x3b5325:JSON[_0x847f('0x2')](_0x3b5325);}}else{_0xa00108[_0x15cb14]=_[_0x847f('0x11')](_0x3b5325)?_0x3b5325:JSON[_0x847f('0x2')](_0x3b5325);}}catch(_0x1008ab){_0xa00108[_0x15cb14]=_0x3b5325['split'](',');}});}return _0xa00108;};exports['limit']=function(_0x62fcb7){_0x62fcb7=parseInt(_0x62fcb7,0xa);if(!_0x62fcb7||_0x62fcb7<0x0){_0x62fcb7=LIMIT_VALUE;}return _0x62fcb7;};exports[_0x847f('0x12')]=function(_0x4e8c65){_0x4e8c65=parseInt(_0x4e8c65,0xa);if(!_0x4e8c65||_0x4e8c65<0x0){_0x4e8c65=0x0;}return _0x4e8c65;};exports[_0x847f('0x13')]=function(_0x178c30){var _0x952094,_0x4998be=null;if(_0x178c30){_0x952094=_0x178c30[_0x847f('0x6')](',');_0x4998be=_[_0x847f('0x14')](_0x952094,function(_0x15467b){if(_0x15467b[_0x847f('0x15')]('-')===0x0){return[_0x15467b===_0x847f('0x16')?sequelize[_0x847f('0x17')](sequelize[_0x847f('0x18')]('priority'),_0x847f('0x19')):_0x15467b['substr'](0x1),'DESC'];}else{return[_0x15467b===_0x847f('0x16')?sequelize[_0x847f('0x17')](sequelize[_0x847f('0x18')]('priority'),_0x847f('0x19')):_0x15467b,_0x847f('0x1a')];}});}return _0x4998be;};exports[_0x847f('0x1b')]=function(_0x130f23,_0x43d9f4){if(_['isEmpty'](_0x130f23)){return _0x130f23;}if(_['isArray'](_0x130f23)){for(var _0x4954f6=0x0;_0x4954f6<_0x130f23[_0x847f('0x1c')];_0x4954f6+=0x1){_0x130f23[_0x4954f6]=this[_0x847f('0x1b')](_0x130f23[_0x4954f6],_0x43d9f4);}return _0x130f23;}if(!_['isObject'](_0x130f23)){return _0x130f23;}if(_['isString'](_0x43d9f4)){_0x43d9f4=[_0x43d9f4];}if(!_[_0x847f('0x11')](_0x43d9f4)){return _0x130f23;}for(var _0x1fd979=0x0;_0x1fd979<_0x43d9f4[_0x847f('0x1c')];_0x1fd979+=0x1){_[_0x847f('0x1d')](_0x130f23,_0x43d9f4[_0x1fd979]);}for(var _0x4ea9e7 in _0x130f23){if(_0x130f23['hasOwnProperty'](_0x4ea9e7)){_0x130f23[_0x4ea9e7]=this['omit'](_0x130f23[_0x4ea9e7],_0x43d9f4);}}return _0x130f23;};exports[_0x847f('0x1e')]=function(_0x1ba2f7){return _0x1ba2f7['match'](RegExp('^[+]?[0-9]*$'))?!![]:![];};exports['isEmail']=function(_0x27bc77){return _0x27bc77['match'](/^\S+@\S+$/)?!![]:![];};exports[_0x847f('0x1f')]=function(_0x326fe0,_0x4c0c3d){var _0x22c81d=[];var _0x194b25=/[ `!@#$%^&*()_\-?~]/;var _0x388925=_0x4c0c3d?_0x847f('0x20'):'{EXPR}';_0x326fe0[_0x847f('0x6')](/[ ,]+/)[_0x847f('0x21')](function(_0x1ad8dd){_0x1ad8dd=_0x1ad8dd[_0x847f('0x22')](/([^:]")"+/g,'$1');_0x1ad8dd='+'+_0x1ad8dd+'*';var _0x2dfc6c=_0x1ad8dd['match'](_0x194b25);if(_0x2dfc6c){_0x1ad8dd='\x22'+_0x1ad8dd+'\x22';}_0x22c81d[_0x847f('0x23')](_0x1ad8dd);});_0x388925=_0x388925['replace']('{EXPR}',_0x22c81d[_0x847f('0x24')]('\x20'));return _0x388925;};exports[_0x847f('0x25')]=function(_0x4afa6b,_0x5c44a8,_0x52a0a5){var _0x17d903={},_0x298304={};if(_0x5c44a8[_0x847f('0x26')][_0x847f('0x27')]){_0x5c44a8[_0x847f('0x26')]['id']=_0x5c44a8[_0x847f('0x26')][_0x847f('0x27')];delete _0x5c44a8['query']['$id'];}_0x17d903[_0x847f('0x28')]=_[_0x847f('0x14')](_0x4afa6b,'name');_0x17d903[_0x847f('0x26')]=_[_0x847f('0x3')](_0x5c44a8[_0x847f('0x26')]);_0x17d903[_0x847f('0x29')]=_[_0x847f('0x2a')](_0x17d903[_0x847f('0x28')],_0x17d903['query']);_0x298304[_0x847f('0x2b')]=_[_0x847f('0x2a')](_0x17d903[_0x847f('0x28')],this['fields'](_0x5c44a8[_0x847f('0x26')]['fields']));_0x298304[_0x847f('0x2b')]=_0x298304[_0x847f('0x2b')]['length']?_0x298304['attributes']:_0x17d903[_0x847f('0x28')];if(!_0x5c44a8['query'][_0x847f('0x2c')](_0x847f('0x2d'))){_0x298304[_0x847f('0x2e')]=this[_0x847f('0x2e')](_0x5c44a8[_0x847f('0x26')][_0x847f('0x2e')]);_0x298304['offset']=this['offset'](_0x5c44a8[_0x847f('0x26')][_0x847f('0x12')]);}_0x298304[_0x847f('0x2f')]=this[_0x847f('0x13')](_0x5c44a8[_0x847f('0x26')][_0x847f('0x13')]);_0x298304['where']=this[_0x847f('0x29')](_[_0x847f('0x30')](_0x5c44a8['query'],_0x17d903[_0x847f('0x29')]),_0x4afa6b);if(_0x5c44a8[_0x847f('0x26')][_0x847f('0x31')]){var _0xf5a125=_0x4afa6b;var _0x4e7d0c=_0x5c44a8[_0x847f('0x26')][_0x847f('0x31')];if(typeof _0x4e7d0c==='object'){_0xf5a125=_['filter'](_0x4afa6b,function(_0x3733e7){return _[_0x847f('0x4')](_0x4e7d0c[_0x847f('0x32')],_0x3733e7[_0x847f('0x33')]);});_0x4e7d0c=_0x4e7d0c[_0x847f('0x34')];}_0x298304['where']=_['merge'](_0x298304[_0x847f('0x35')],{'$or':_[_0x847f('0x14')](_0xf5a125,function(_0x205db3){if(_0x205db3[_0x847f('0xa')]!==_0x847f('0x36')){if(_0x52a0a5){return sequelize[_0x847f('0x35')](sequelize['fn'](_0x847f('0x37'),sequelize['col'](_0x205db3[_0x847f('0x33')])),{'$like':sequelize['fn'](_0x847f('0x37'),'%'+_0x5c44a8[_0x847f('0x26')][_0x847f('0x31')]+'%')});}else{var _0x38d381={};_0x38d381[_0x205db3[_0x847f('0x33')]]={'$like':'%'+_0x5c44a8['query'][_0x847f('0x31')]+'%'};return _0x38d381;}}})});}_0x298304=_[_0x847f('0x38')]({},_0x298304,_0x5c44a8[_0x847f('0x39')]);return _0x298304;}; \ No newline at end of file +var _0x4113=['filters','forOwn','type','DATE','isPlainObject','format','YYYY-MM-DD','utc','$lte','name','isArray','split','limit','sort','indexOf','priority','cast','col','unsigned','substr','ASC','omit','isEmpty','length','isObject','unset','isNumeric','^[+]?[0-9]*$','isEmail','match','\x22{EXPR}\x22','{EXPR}','forEach','replace','join','getOptions','$id','query','map','intersection','model','attributes','hasOwnProperty','nolimit','offset','order','where','pick','filter','object','columns','value','merge','VIRTUAL','lower','options','sequelize','moment','parse','keys','includes','fields'];(function(_0x44bb3e,_0x458c33){var _0x253d53=function(_0x52a507){while(--_0x52a507){_0x44bb3e['push'](_0x44bb3e['shift']());}};_0x253d53(++_0x458c33);}(_0x4113,0x16e));var _0x3411=function(_0x5f16b9,_0x40721e){_0x5f16b9=_0x5f16b9-0x0;var _0x2abdf4=_0x4113[_0x5f16b9];return _0x2abdf4;};'use strict';var _=require('lodash');var sequelize=require(_0x3411('0x0'));var moment=require(_0x3411('0x1'));var LIMIT_VALUE=0xfa;function hasSequelizeOperator(_0x29115e){var _0x45af5f=['ne'];try{var _0x12f787=JSON[_0x3411('0x2')](_0x29115e);var _0x5503cd=Object[_0x3411('0x3')](_0x12f787)[0x0];return _0x45af5f[_0x3411('0x4')](_0x5503cd);}catch(_0x589dfa){return![];}}function getOperatorValue(_0x57e27d){var _0x4c6fcc=JSON[_0x3411('0x2')](_0x57e27d);var _0x4d053c=Object['keys'](_0x4c6fcc)[0x0];var _0x52047d=_0x4c6fcc[_0x4d053c];return{['$'+_0x4d053c]:_0x52047d};}exports[_0x3411('0x5')]=function(_0x560cea){var _0x3177b0=null;if(_0x560cea){_0x3177b0=_0x560cea['split'](',');}return _0x3177b0;};exports[_0x3411('0x6')]=function(_0x15df9b,_0x51a007){var _0x35611d={};if(!_['isEmpty'](_0x15df9b)){_[_0x3411('0x7')](_0x15df9b,function(_0x44f96b,_0x30f8cd){try{if(_0x51a007){var _0x166011=_['find'](_0x51a007,{'name':_0x30f8cd})||{};if(hasSequelizeOperator(_0x44f96b)){_0x35611d[_0x30f8cd]=getOperatorValue(_0x44f96b);}else if(_0x166011[_0x3411('0x8')]===_0x3411('0x9')&&_[_0x3411('0xa')](_0x44f96b)){var _0x2ee6de=JSON[_0x3411('0x2')](_0x44f96b);var _0x4fd7f6={'$gte':moment(moment(_0x2ee6de['$gte'])[_0x3411('0xb')](_0x3411('0xc')))[_0x3411('0xd')]()[_0x3411('0xb')](),'$lte':moment(moment(_0x2ee6de[_0x3411('0xe')])[_0x3411('0xb')](_0x3411('0xc')))[_0x3411('0xd')]()['subtract'](0x1,'s')[_0x3411('0xb')]()};_0x35611d[_0x30f8cd]=_0x4fd7f6;}else if(_0x166011[_0x3411('0xf')]==='uniqueid'){_0x35611d[_0x30f8cd]=_0x44f96b;}else{_0x35611d[_0x30f8cd]=_[_0x3411('0x10')](_0x44f96b)?_0x44f96b:JSON[_0x3411('0x2')](_0x44f96b);}}else{_0x35611d[_0x30f8cd]=_['isArray'](_0x44f96b)?_0x44f96b:JSON[_0x3411('0x2')](_0x44f96b);}}catch(_0x201513){_0x35611d[_0x30f8cd]=_0x44f96b[_0x3411('0x11')](',');}});}return _0x35611d;};exports[_0x3411('0x12')]=function(_0x4032d9){_0x4032d9=parseInt(_0x4032d9,0xa);if(!_0x4032d9||_0x4032d9<0x0){_0x4032d9=LIMIT_VALUE;}return _0x4032d9;};exports['offset']=function(_0x21b6a8){_0x21b6a8=parseInt(_0x21b6a8,0xa);if(!_0x21b6a8||_0x21b6a8<0x0){_0x21b6a8=0x0;}return _0x21b6a8;};exports[_0x3411('0x13')]=function(_0x42ad24){var _0x26ea54,_0x21cfd5=null;if(_0x42ad24){_0x26ea54=_0x42ad24[_0x3411('0x11')](',');_0x21cfd5=_['map'](_0x26ea54,function(_0x19a997){if(_0x19a997[_0x3411('0x14')]('-')===0x0){return[_0x19a997===_0x3411('0x15')?sequelize[_0x3411('0x16')](sequelize[_0x3411('0x17')](_0x3411('0x15')),_0x3411('0x18')):_0x19a997[_0x3411('0x19')](0x1),'DESC'];}else{return[_0x19a997==='priority'?sequelize[_0x3411('0x16')](sequelize[_0x3411('0x17')]('priority'),_0x3411('0x18')):_0x19a997,_0x3411('0x1a')];}});}return _0x21cfd5;};exports[_0x3411('0x1b')]=function(_0x2413cb,_0x5dd74d){if(_[_0x3411('0x1c')](_0x2413cb)){return _0x2413cb;}if(_[_0x3411('0x10')](_0x2413cb)){for(var _0x122a7e=0x0;_0x122a7e<_0x2413cb[_0x3411('0x1d')];_0x122a7e+=0x1){_0x2413cb[_0x122a7e]=this[_0x3411('0x1b')](_0x2413cb[_0x122a7e],_0x5dd74d);}return _0x2413cb;}if(!_[_0x3411('0x1e')](_0x2413cb)){return _0x2413cb;}if(_['isString'](_0x5dd74d)){_0x5dd74d=[_0x5dd74d];}if(!_[_0x3411('0x10')](_0x5dd74d)){return _0x2413cb;}for(var _0x463875=0x0;_0x463875<_0x5dd74d[_0x3411('0x1d')];_0x463875+=0x1){_[_0x3411('0x1f')](_0x2413cb,_0x5dd74d[_0x463875]);}for(var _0x253a43 in _0x2413cb){if(_0x2413cb['hasOwnProperty'](_0x253a43)){_0x2413cb[_0x253a43]=this['omit'](_0x2413cb[_0x253a43],_0x5dd74d);}}return _0x2413cb;};exports[_0x3411('0x20')]=function(_0x2144b0){return _0x2144b0['match'](RegExp(_0x3411('0x21')))?!![]:![];};exports[_0x3411('0x22')]=function(_0x3bbb2f){return _0x3bbb2f[_0x3411('0x23')](/^\S+@\S+$/)?!![]:![];};exports['getFullTextValue']=function(_0x52743d,_0x21abee){var _0x47270b=[];var _0x3223ef=/[ `!@#$%^&*()_\-?~]/;var _0x14e668=_0x21abee?_0x3411('0x24'):_0x3411('0x25');_0x52743d[_0x3411('0x11')](/[ ,]+/)[_0x3411('0x26')](function(_0x3e0dba){_0x3e0dba=_0x3e0dba[_0x3411('0x27')](/([^:]")"+/g,'$1');_0x3e0dba='+'+_0x3e0dba+'*';var _0x2183e0=_0x3e0dba['match'](_0x3223ef);if(_0x2183e0){_0x3e0dba='\x22'+_0x3e0dba+'\x22';}_0x47270b['push'](_0x3e0dba);});_0x14e668=_0x14e668['replace'](_0x3411('0x25'),_0x47270b[_0x3411('0x28')]('\x20'));return _0x14e668;};exports[_0x3411('0x29')]=function(_0x448c7a,_0x3ed2b5,_0x269523){var _0x4bd8cf={},_0x488c5d={};if(_0x3ed2b5['query'][_0x3411('0x2a')]){_0x3ed2b5[_0x3411('0x2b')]['id']=_0x3ed2b5[_0x3411('0x2b')]['$id'];delete _0x3ed2b5['query'][_0x3411('0x2a')];}_0x4bd8cf['model']=_[_0x3411('0x2c')](_0x448c7a,_0x3411('0xf'));_0x4bd8cf[_0x3411('0x2b')]=_[_0x3411('0x3')](_0x3ed2b5[_0x3411('0x2b')]);_0x4bd8cf[_0x3411('0x6')]=_[_0x3411('0x2d')](_0x4bd8cf[_0x3411('0x2e')],_0x4bd8cf['query']);_0x488c5d[_0x3411('0x2f')]=_[_0x3411('0x2d')](_0x4bd8cf[_0x3411('0x2e')],this[_0x3411('0x5')](_0x3ed2b5[_0x3411('0x2b')][_0x3411('0x5')]));_0x488c5d['attributes']=_0x488c5d[_0x3411('0x2f')][_0x3411('0x1d')]?_0x488c5d['attributes']:_0x4bd8cf[_0x3411('0x2e')];if(!_0x3ed2b5[_0x3411('0x2b')][_0x3411('0x30')](_0x3411('0x31'))){_0x488c5d[_0x3411('0x12')]=this[_0x3411('0x12')](_0x3ed2b5[_0x3411('0x2b')][_0x3411('0x12')]);_0x488c5d[_0x3411('0x32')]=this['offset'](_0x3ed2b5[_0x3411('0x2b')][_0x3411('0x32')]);}_0x488c5d[_0x3411('0x33')]=this[_0x3411('0x13')](_0x3ed2b5[_0x3411('0x2b')][_0x3411('0x13')]);_0x488c5d[_0x3411('0x34')]=this['filters'](_[_0x3411('0x35')](_0x3ed2b5[_0x3411('0x2b')],_0x4bd8cf[_0x3411('0x6')]),_0x448c7a);if(_0x3ed2b5['query'][_0x3411('0x36')]){var _0x4fdea0=_0x448c7a;var _0x162e84=_0x3ed2b5[_0x3411('0x2b')][_0x3411('0x36')];if(typeof _0x162e84===_0x3411('0x37')){_0x4fdea0=_[_0x3411('0x36')](_0x448c7a,function(_0x2ceae8){return _['includes'](_0x162e84[_0x3411('0x38')],_0x2ceae8[_0x3411('0xf')]);});_0x162e84=_0x162e84[_0x3411('0x39')];}_0x488c5d[_0x3411('0x34')]=_[_0x3411('0x3a')](_0x488c5d[_0x3411('0x34')],{'$or':_[_0x3411('0x2c')](_0x4fdea0,function(_0x326240){if(_0x326240[_0x3411('0x8')]!==_0x3411('0x3b')){if(_0x269523){return sequelize['where'](sequelize['fn'](_0x3411('0x3c'),sequelize[_0x3411('0x17')](_0x326240[_0x3411('0xf')])),{'$like':sequelize['fn'](_0x3411('0x3c'),'%'+_0x3ed2b5[_0x3411('0x2b')][_0x3411('0x36')]+'%')});}else{var _0x3f4f2c={};_0x3f4f2c[_0x326240[_0x3411('0xf')]]={'$like':'%'+_0x3ed2b5[_0x3411('0x2b')]['filter']+'%'};return _0x3f4f2c;}}})});}_0x488c5d=_[_0x3411('0x3a')]({},_0x488c5d,_0x3ed2b5[_0x3411('0x3d')]);return _0x488c5d;}; \ No newline at end of file diff --git a/server/components/realtime/agents.js b/server/components/realtime/agents.js index 760d1ea..de53861 100644 --- a/server/components/realtime/agents.js +++ b/server/components/realtime/agents.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x2bc0=['openchannelPause','chatCapacity','openchannelCapacity','mailCapacity','whatsappCapacity','faxCapacity','chatCurrentCapacity','openchannelCurrentCapacity','mailCurrentCapacity','whatsappCurrentCapacity','faxCurrentCapacity','chatStatusTime','openchannelStatusTime','mailStatusTime','smsStatusTime','whatsappStatusTime','faxStatusTime','voiceStatusTime','queue','destconnectedlinenum','screenrecording','phoneBarEnableScreenRecordingByAgent','phoneBarEnableAutomaticScreenRecording','omit','pick','filterAgentAttributes','lodash','jayson/promise','client','http','chatPause','faxPause','mailPause','smsPause','voicePause','whatsappPause','every','filter','length','idle','unavailable','voiceStatus','pause','chatStatus','faxStatus','mailStatus','openchannelStatus','smsStatus','request','Agents','then','error','Unable\x20to\x20retrieve\x20RPC\x20agents\x20(AMI)','result','Unable\x20to\x20retrieve\x20RPC\x20agents\x20(Routing)','merge','catch','getRealtimeAgents','unknown','*pause','busy','getAgentStatus','Queue','map','findOne','getAgents','all','value','getAgentIdsByQueues','includes','getAgentIdsByStatus','findAll','name','fullname','globalStatus','getSortedAgentsIdsByStatus','split','fields','DESC','ASC','getUpdatedSortOptions','internal','validateSortParameter','sort','pauseType','toLowerCase','sortAgentsByStatus','online','lastLoginAt','lastPauseAt','address'];(function(_0xf57573,_0x3657b8){var _0xc0e1b0=function(_0xb9082){while(--_0xb9082){_0xf57573['push'](_0xf57573['shift']());}};_0xc0e1b0(++_0x3657b8);}(_0x2bc0,0x1e1));var _0x02bc=function(_0x3947c9,_0x4d6c97){_0x3947c9=_0x3947c9-0x0;var _0x2e7871=_0x2bc0[_0x3947c9];return _0x2e7871;};'use strict';var _=require(_0x02bc('0x0'));var jayson=require(_0x02bc('0x1'));var db=require('../../mysqldb')['db'];var amiClient=jayson[_0x02bc('0x2')][_0x02bc('0x3')]({'port':0x232a});var routingClient=jayson[_0x02bc('0x2')]['http']({'port':0x232c});function isAgentPaused(_0x4b973f,_0x19e86b){var _0xccd92c=[_0x4b973f[_0x02bc('0x4')],_0x4b973f[_0x02bc('0x5')],_0x4b973f[_0x02bc('0x6')],_0x4b973f['openchannelPause'],_0x4b973f[_0x02bc('0x7')],_0x4b973f[_0x02bc('0x8')],_0x4b973f[_0x02bc('0x9')]];if(!_0x19e86b)return _[_0x02bc('0xa')](_0xccd92c);var _0x1ad279=_[_0x02bc('0xb')](_0xccd92c);return _0x1ad279[_0x02bc('0xc')]>0x0&&_0x1ad279[_0x02bc('0xc')]<_0xccd92c[_0x02bc('0xc')]?!![]:![];}function isIdle(_0x2610de){return _0x2610de===_0x02bc('0xd')||_0x2610de==='unknown'||_0x2610de===_0x02bc('0xe')||_0x2610de==='ringing'||_['isNil'](_0x2610de);}function isAgentIdle(_0x5076a3){if(_0x5076a3[_0x02bc('0xf')]!==_0x02bc('0xd')&&_0x5076a3[_0x02bc('0x8')]){_0x5076a3['voiceStatus']=_0x02bc('0x10');return![];}return _[_0x02bc('0xa')]([_0x5076a3[_0x02bc('0x11')],_0x5076a3[_0x02bc('0x12')],_0x5076a3[_0x02bc('0x13')],_0x5076a3[_0x02bc('0x14')],_0x5076a3[_0x02bc('0x15')],_0x5076a3['voiceStatus'],_0x5076a3['whatsappStatus']],isIdle);}function getRealtimeAgents(){return amiClient[_0x02bc('0x16')](_0x02bc('0x17'),{})[_0x02bc('0x18')](function(_0x4f6f27){if(_0x4f6f27[_0x02bc('0x19')]){throw new Error(_0x02bc('0x1a'));}var _0x52f531=_0x4f6f27[_0x02bc('0x1b')];return routingClient['request'](_0x02bc('0x17'),{})[_0x02bc('0x18')](function(_0x599f11){if(_0x599f11['error']){throw new Error(_0x02bc('0x1c'));}var _0x49fe16=_0x599f11['result'];return _[_0x02bc('0x1d')]({},_0x52f531,_0x49fe16);});})[_0x02bc('0x1e')](function(_0x7b0876){throw _0x7b0876;});}exports[_0x02bc('0x1f')]=getRealtimeAgents;function getAgentStatus(_0x4128d2){var _0x180849=_0x02bc('0x20');if(isAgentPaused(_0x4128d2))_0x180849=_0x02bc('0x10');else if(isAgentPaused(_0x4128d2,!![]))_0x180849=_0x02bc('0x21');else if(isAgentIdle(_0x4128d2))_0x180849=_0x02bc('0xd');else _0x180849=_0x02bc('0x22');return _0x180849;}exports[_0x02bc('0x23')]=getAgentStatus;function getAgentIdsByQueues(_0x3ae364,_0x29710b){var _0x1d1b1c=_['isArray'](_0x3ae364)?_0x3ae364:[_0x3ae364];var _0xc6e162=_['startCase'](_0x29710b)+_0x02bc('0x24');var _0x4919a8=_[_0x02bc('0x25')](_0x1d1b1c,function(_0x4ea140){return db[_0xc6e162][_0x02bc('0x26')]({'where':{'id':_0x4ea140}})[_0x02bc('0x18')](function(_0x4d525c){if(!_0x4d525c)return[];return _0x4d525c[_0x02bc('0x27')]({'attributes':['id'],'raw':!![]});});});return Promise[_0x02bc('0x28')](_0x4919a8)[_0x02bc('0x18')](function(_0x21c92f){var _0x548191=_(_0x21c92f)['flatten']()['map']('id')['uniq']()[_0x02bc('0x29')]();return _0x548191;});}exports[_0x02bc('0x2a')]=getAgentIdsByQueues;function getAgentIdsByStatus(_0x4f3b71,_0x22cfc2,_0x35ae58){try{if(_0x22cfc2['length']>0x0){_0x4f3b71=_0x4f3b71[_0x02bc('0xb')](function(_0xb64084){return _0x22cfc2[_0x02bc('0x2b')](_0xb64084['id']);});}var _0x18e4cf=_0x4f3b71[_0x02bc('0xb')](function(_0x131e9b){var _0x337146='busy';if(isAgentIdle(_0x131e9b)){_0x337146=_0x02bc('0xd');}return _0x337146===_0x35ae58;});return _[_0x02bc('0x25')](_0x18e4cf,'id');}catch(_0x245af9){throw _0x245af9;}}exports[_0x02bc('0x2c')]=getAgentIdsByStatus;function getSortedAgentsIdsByStatus(_0x39173d,_0x73af42,_0x44271e){return Promise['resolve']()[_0x02bc('0x18')](function(){if(_0x73af42[_0x02bc('0xc')]>0x0){_0x39173d=_0x39173d['filter'](function(_0x17f69e){return _0x73af42[_0x02bc('0x2b')](_0x17f69e['id']);});}return _0x39173d;})['then'](function(){return db['User'][_0x02bc('0x2d')]({'attributes':['id',_0x02bc('0x2e'),_0x02bc('0x2f'),_0x02bc('0x4'),_0x02bc('0x5'),_0x02bc('0x6'),'openchannelPause',_0x02bc('0x7'),_0x02bc('0x8'),'whatsappPause','pauseType'],'where':{'id':{'$in':_[_0x02bc('0x25')](_0x39173d,'id')}},'raw':!![]});})[_0x02bc('0x18')](function(_0x2ee814){return _0x2ee814[_0x02bc('0x25')](function(_0x2e54da){var _0x447a03=_['find'](_0x39173d,['id',_0x2e54da['id']]);var _0x4359f4=filterAgentAttributes(_0x447a03);_[_0x02bc('0x1d')](_0x2e54da,_0x4359f4);_0x2e54da[_0x02bc('0x30')]=getAgentStatus(_0x2e54da);return _0x2e54da;});})[_0x02bc('0x18')](function(_0xfe2efe){var _0x3de5c3=sortAgentsByStatus(_0xfe2efe,_0x44271e);return _[_0x02bc('0x25')](_0x3de5c3,'id');})[_0x02bc('0x1e')](function(_0x5d52a9){throw _0x5d52a9;});}exports[_0x02bc('0x31')]=getSortedAgentsIdsByStatus;function getUpdatedSortOptions(_0x17391c){var _0x3c7602={'fields':[],'order':null};var _0x580f88=_0x17391c[_0x02bc('0x32')](',');_0x3c7602[_0x02bc('0x33')]=_['filter'](_0x580f88,function(_0x2352d6){if(!_0x2352d6[_0x02bc('0x2b')](_0x02bc('0x30'))){return!![];}_0x3c7602['order']=_['startsWith'](_0x2352d6,'-')?_0x02bc('0x34'):_0x02bc('0x35');return![];});return _0x3c7602;}exports[_0x02bc('0x36')]=getUpdatedSortOptions;function validateSortParameter(_0x380b0d){if(_0x380b0d[_0x02bc('0x2b')](_0x02bc('0x2f'))&&!_0x380b0d[_0x02bc('0x2b')]('internal')){var _0x414a12=_0x380b0d['substring'](0x0,_0x380b0d['indexOf'](_0x02bc('0x2f')));_0x380b0d+=','+_0x414a12+_0x02bc('0x37');}return _0x380b0d;}exports[_0x02bc('0x38')]=validateSortParameter;function sortAgentsByStatus(_0x2d8047,_0x2de534){var _0x25aa13=_0x2d8047[_0x02bc('0x39')](function(_0xa17c40,_0x1cec37){if(_0xa17c40[_0x02bc('0x30')]===_0x1cec37['globalStatus']){if(_0xa17c40['globalStatus']===_0x02bc('0x10')){if(_0x2de534===_0x02bc('0x34')){return(_0xa17c40[_0x02bc('0x3a')]||'')<(_0x1cec37[_0x02bc('0x3a')]||'')||_0xa17c40[_0x02bc('0x2f')][_0x02bc('0x3b')]()>_0x1cec37['fullname']['toLowerCase']()?0x1:-0x1;}else{return(_0xa17c40[_0x02bc('0x3a')]||'')<(_0x1cec37['pauseType']||'')||_0xa17c40[_0x02bc('0x2f')][_0x02bc('0x3b')]()>_0x1cec37['fullname']['toLowerCase']()?-0x1:0x1;}}else{if(_0x2de534===_0x02bc('0x34')){return _0xa17c40[_0x02bc('0x2f')][_0x02bc('0x3b')]()<_0x1cec37['fullname'][_0x02bc('0x3b')]()?0x1:-0x1;}else{return _0xa17c40[_0x02bc('0x2f')][_0x02bc('0x3b')]()<_0x1cec37['fullname'][_0x02bc('0x3b')]()?-0x1:0x1;}}}else{if(_0x2de534===_0x02bc('0x34')){return _0xa17c40[_0x02bc('0x30')]<_0x1cec37[_0x02bc('0x30')]?0x1:-0x1;}else{return _0xa17c40[_0x02bc('0x30')]<_0x1cec37[_0x02bc('0x30')]?-0x1:0x1;}}});return _0x25aa13;}exports[_0x02bc('0x3c')]=sortAgentsByStatus;function filterAgentAttributes(_0x41e32e){var _0x36d4c3=['userpic',_0x02bc('0x3d'),_0x02bc('0x3e'),_0x02bc('0x3f'),_0x02bc('0x3a'),_0x02bc('0x3f'),_0x02bc('0x37'),_0x02bc('0x40'),_0x02bc('0x4'),_0x02bc('0x41'),'mailPause',_0x02bc('0x7'),_0x02bc('0x9'),'faxPause',_0x02bc('0x8'),_0x02bc('0x42'),_0x02bc('0x43'),_0x02bc('0x44'),'smsCapacity',_0x02bc('0x45'),_0x02bc('0x46'),_0x02bc('0x47'),_0x02bc('0x48'),_0x02bc('0x49'),'smsCurrentCapacity',_0x02bc('0x4a'),_0x02bc('0x4b'),'chatStatus',_0x02bc('0x14'),'mailStatus','smsStatus','whatsappStatus','faxStatus',_0x02bc('0xf'),_0x02bc('0x4c'),_0x02bc('0x4d'),_0x02bc('0x4e'),_0x02bc('0x4f'),_0x02bc('0x50'),_0x02bc('0x51'),_0x02bc('0x52'),_0x02bc('0x53'),_0x02bc('0x54'),_0x02bc('0x55'),_0x02bc('0x56'),_0x02bc('0x57'),'routealias'];var _0x353112=[_0x02bc('0x4'),'openchannelPause',_0x02bc('0x6'),_0x02bc('0x7'),'whatsappPause','faxPause',_0x02bc('0x8'),_0x02bc('0x3d')];var _0x565b6e=_(_0x41e32e)[_0x02bc('0x58')](_0x353112)[_0x02bc('0x59')](_0x36d4c3)[_0x02bc('0x29')]();return _0x565b6e;}exports[_0x02bc('0x5a')]=filterAgentAttributes; \ No newline at end of file +var _0x4313=['openchannelStatusTime','mailStatusTime','smsStatusTime','faxStatusTime','voiceStatusTime','destconnectedlinenum','phoneBarEnableScreenRecordingByAgent','phoneBarEnableAutomaticScreenRecording','routealias','omit','pick','filterAgentAttributes','jayson/promise','http','client','chatPause','mailPause','openchannelPause','smsPause','voicePause','whatsappPause','every','filter','length','idle','unknown','unavailable','isNil','voiceStatus','faxStatus','openchannelStatus','smsStatus','whatsappStatus','request','Agents','error','Unable\x20to\x20retrieve\x20RPC\x20agents\x20(AMI)','result','Unable\x20to\x20retrieve\x20RPC\x20agents\x20(Routing)','catch','getRealtimeAgents','pause','busy','getAgentStatus','startCase','Queue','map','findOne','then','getAgents','all','flatten','uniq','getAgentIdsByQueues','includes','getAgentIdsByStatus','resolve','User','findAll','name','fullname','find','merge','globalStatus','getSortedAgentsIdsByStatus','split','fields','startsWith','DESC','getUpdatedSortOptions','substring','indexOf','internal','validateSortParameter','sort','toLowerCase','pauseType','sortAgentsByStatus','userpic','online','lastLoginAt','lastPauseAt','address','faxPause','chatCapacity','openchannelCapacity','mailCapacity','faxCapacity','chatCurrentCapacity','openchannelCurrentCapacity','mailCurrentCapacity','smsCurrentCapacity','faxCurrentCapacity','mailStatus'];(function(_0x1e6c62,_0x65e0ee){var _0x497c62=function(_0x26f769){while(--_0x26f769){_0x1e6c62['push'](_0x1e6c62['shift']());}};_0x497c62(++_0x65e0ee);}(_0x4313,0x6a));var _0x3431=function(_0x3f2bbe,_0x2cd704){_0x3f2bbe=_0x3f2bbe-0x0;var _0x24b363=_0x4313[_0x3f2bbe];return _0x24b363;};'use strict';var _=require('lodash');var jayson=require(_0x3431('0x0'));var db=require('../../mysqldb')['db'];var amiClient=jayson['client'][_0x3431('0x1')]({'port':0x232a});var routingClient=jayson[_0x3431('0x2')][_0x3431('0x1')]({'port':0x232c});function isAgentPaused(_0x79892d,_0x34f49a){var _0x57bf39=[_0x79892d[_0x3431('0x3')],_0x79892d['faxPause'],_0x79892d[_0x3431('0x4')],_0x79892d[_0x3431('0x5')],_0x79892d[_0x3431('0x6')],_0x79892d[_0x3431('0x7')],_0x79892d[_0x3431('0x8')]];if(!_0x34f49a)return _[_0x3431('0x9')](_0x57bf39);var _0x355dba=_[_0x3431('0xa')](_0x57bf39);return _0x355dba[_0x3431('0xb')]>0x0&&_0x355dba['length']<_0x57bf39['length']?!![]:![];}function isIdle(_0x4aaac3){return _0x4aaac3===_0x3431('0xc')||_0x4aaac3===_0x3431('0xd')||_0x4aaac3===_0x3431('0xe')||_0x4aaac3==='ringing'||_[_0x3431('0xf')](_0x4aaac3);}function isAgentIdle(_0x32eab9){if(_0x32eab9[_0x3431('0x10')]!==_0x3431('0xc')&&_0x32eab9[_0x3431('0x7')]){_0x32eab9[_0x3431('0x10')]='pause';return![];}return _[_0x3431('0x9')]([_0x32eab9['chatStatus'],_0x32eab9[_0x3431('0x11')],_0x32eab9['mailStatus'],_0x32eab9[_0x3431('0x12')],_0x32eab9[_0x3431('0x13')],_0x32eab9['voiceStatus'],_0x32eab9[_0x3431('0x14')]],isIdle);}function getRealtimeAgents(){return amiClient[_0x3431('0x15')](_0x3431('0x16'),{})['then'](function(_0x257086){if(_0x257086[_0x3431('0x17')]){throw new Error(_0x3431('0x18'));}var _0x80446e=_0x257086[_0x3431('0x19')];return routingClient[_0x3431('0x15')](_0x3431('0x16'),{})['then'](function(_0x590b1c){if(_0x590b1c[_0x3431('0x17')]){throw new Error(_0x3431('0x1a'));}var _0x3dc7ec=_0x590b1c[_0x3431('0x19')];return _['merge']({},_0x80446e,_0x3dc7ec);});})[_0x3431('0x1b')](function(_0x3d34c5){throw _0x3d34c5;});}exports[_0x3431('0x1c')]=getRealtimeAgents;function getAgentStatus(_0x177014){var _0x21fa40=_0x3431('0xd');if(isAgentPaused(_0x177014))_0x21fa40=_0x3431('0x1d');else if(isAgentPaused(_0x177014,!![]))_0x21fa40='*pause';else if(isAgentIdle(_0x177014))_0x21fa40='idle';else _0x21fa40=_0x3431('0x1e');return _0x21fa40;}exports[_0x3431('0x1f')]=getAgentStatus;function getAgentIdsByQueues(_0x23be4c,_0x20c26b){var _0x43f187=_['isArray'](_0x23be4c)?_0x23be4c:[_0x23be4c];var _0x83915a=_[_0x3431('0x20')](_0x20c26b)+_0x3431('0x21');var _0x3c3ec5=_[_0x3431('0x22')](_0x43f187,function(_0x1e7d18){return db[_0x83915a][_0x3431('0x23')]({'where':{'id':_0x1e7d18}})[_0x3431('0x24')](function(_0x26c5cf){if(!_0x26c5cf)return[];return _0x26c5cf[_0x3431('0x25')]({'attributes':['id'],'raw':!![]});});});return Promise[_0x3431('0x26')](_0x3c3ec5)[_0x3431('0x24')](function(_0x5e03c6){var _0x46b650=_(_0x5e03c6)[_0x3431('0x27')]()[_0x3431('0x22')]('id')[_0x3431('0x28')]()['value']();return _0x46b650;});}exports[_0x3431('0x29')]=getAgentIdsByQueues;function getAgentIdsByStatus(_0x2e655d,_0x5507c5,_0xa86bd0){try{if(_0x5507c5[_0x3431('0xb')]>0x0){_0x2e655d=_0x2e655d[_0x3431('0xa')](function(_0x106fec){return _0x5507c5[_0x3431('0x2a')](_0x106fec['id']);});}var _0x1de19a=_0x2e655d[_0x3431('0xa')](function(_0x15ce48){var _0x1835a2=_0x3431('0x1e');if(isAgentIdle(_0x15ce48)){_0x1835a2=_0x3431('0xc');}return _0x1835a2===_0xa86bd0;});return _[_0x3431('0x22')](_0x1de19a,'id');}catch(_0x4a2c81){throw _0x4a2c81;}}exports[_0x3431('0x2b')]=getAgentIdsByStatus;function getSortedAgentsIdsByStatus(_0x308db5,_0x158c7f,_0x4ecfcd){return Promise[_0x3431('0x2c')]()['then'](function(){if(_0x158c7f[_0x3431('0xb')]>0x0){_0x308db5=_0x308db5[_0x3431('0xa')](function(_0x34cbad){return _0x158c7f[_0x3431('0x2a')](_0x34cbad['id']);});}return _0x308db5;})[_0x3431('0x24')](function(){return db[_0x3431('0x2d')][_0x3431('0x2e')]({'attributes':['id',_0x3431('0x2f'),_0x3431('0x30'),_0x3431('0x3'),'faxPause',_0x3431('0x4'),_0x3431('0x5'),_0x3431('0x6'),'voicePause',_0x3431('0x8'),'pauseType'],'where':{'id':{'$in':_[_0x3431('0x22')](_0x308db5,'id')}},'raw':!![]});})[_0x3431('0x24')](function(_0x47e9c8){return _0x47e9c8[_0x3431('0x22')](function(_0x33bfb9){var _0x5aca4c=_[_0x3431('0x31')](_0x308db5,['id',_0x33bfb9['id']]);var _0x55377c=filterAgentAttributes(_0x5aca4c);_[_0x3431('0x32')](_0x33bfb9,_0x55377c);_0x33bfb9[_0x3431('0x33')]=getAgentStatus(_0x33bfb9);return _0x33bfb9;});})[_0x3431('0x24')](function(_0x58c21d){var _0xabfcf=sortAgentsByStatus(_0x58c21d,_0x4ecfcd);return _[_0x3431('0x22')](_0xabfcf,'id');})[_0x3431('0x1b')](function(_0x1885cf){throw _0x1885cf;});}exports[_0x3431('0x34')]=getSortedAgentsIdsByStatus;function getUpdatedSortOptions(_0x574795){var _0x48be73={'fields':[],'order':null};var _0x1c5982=_0x574795[_0x3431('0x35')](',');_0x48be73[_0x3431('0x36')]=_[_0x3431('0xa')](_0x1c5982,function(_0x3eb8c3){if(!_0x3eb8c3[_0x3431('0x2a')](_0x3431('0x33'))){return!![];}_0x48be73['order']=_[_0x3431('0x37')](_0x3eb8c3,'-')?_0x3431('0x38'):'ASC';return![];});return _0x48be73;}exports[_0x3431('0x39')]=getUpdatedSortOptions;function validateSortParameter(_0x42349c){if(_0x42349c[_0x3431('0x2a')](_0x3431('0x30'))&&!_0x42349c['includes']('internal')){var _0x43551f=_0x42349c[_0x3431('0x3a')](0x0,_0x42349c[_0x3431('0x3b')](_0x3431('0x30')));_0x42349c+=','+_0x43551f+_0x3431('0x3c');}return _0x42349c;}exports[_0x3431('0x3d')]=validateSortParameter;function sortAgentsByStatus(_0x9f2e99,_0x115737){var _0x19084e=_0x9f2e99[_0x3431('0x3e')](function(_0x4f9d7c,_0x58f9f3){if(_0x4f9d7c[_0x3431('0x33')]===_0x58f9f3[_0x3431('0x33')]){if(_0x4f9d7c['globalStatus']==='pause'){if(_0x115737===_0x3431('0x38')){return(_0x4f9d7c['pauseType']||'')<(_0x58f9f3['pauseType']||'')||_0x4f9d7c[_0x3431('0x30')][_0x3431('0x3f')]()>_0x58f9f3[_0x3431('0x30')][_0x3431('0x3f')]()?0x1:-0x1;}else{return(_0x4f9d7c[_0x3431('0x40')]||'')<(_0x58f9f3['pauseType']||'')||_0x4f9d7c[_0x3431('0x30')][_0x3431('0x3f')]()>_0x58f9f3[_0x3431('0x30')]['toLowerCase']()?-0x1:0x1;}}else{if(_0x115737===_0x3431('0x38')){return _0x4f9d7c['fullname'][_0x3431('0x3f')]()<_0x58f9f3[_0x3431('0x30')][_0x3431('0x3f')]()?0x1:-0x1;}else{return _0x4f9d7c[_0x3431('0x30')][_0x3431('0x3f')]()<_0x58f9f3[_0x3431('0x30')][_0x3431('0x3f')]()?-0x1:0x1;}}}else{if(_0x115737===_0x3431('0x38')){return _0x4f9d7c['globalStatus']<_0x58f9f3[_0x3431('0x33')]?0x1:-0x1;}else{return _0x4f9d7c['globalStatus']<_0x58f9f3[_0x3431('0x33')]?-0x1:0x1;}}});return _0x19084e;}exports[_0x3431('0x41')]=sortAgentsByStatus;function filterAgentAttributes(_0xd175ae){var _0x42c392=[_0x3431('0x42'),_0x3431('0x43'),_0x3431('0x44'),_0x3431('0x45'),_0x3431('0x40'),'lastPauseAt',_0x3431('0x3c'),_0x3431('0x46'),_0x3431('0x3'),_0x3431('0x5'),_0x3431('0x4'),_0x3431('0x6'),_0x3431('0x8'),_0x3431('0x47'),_0x3431('0x7'),_0x3431('0x48'),_0x3431('0x49'),_0x3431('0x4a'),'smsCapacity','whatsappCapacity',_0x3431('0x4b'),_0x3431('0x4c'),_0x3431('0x4d'),_0x3431('0x4e'),_0x3431('0x4f'),'whatsappCurrentCapacity',_0x3431('0x50'),'chatStatus',_0x3431('0x12'),_0x3431('0x51'),_0x3431('0x13'),_0x3431('0x14'),'faxStatus',_0x3431('0x10'),'chatStatusTime',_0x3431('0x52'),_0x3431('0x53'),_0x3431('0x54'),'whatsappStatusTime',_0x3431('0x55'),_0x3431('0x56'),'queue',_0x3431('0x57'),'screenrecording',_0x3431('0x58'),_0x3431('0x59'),_0x3431('0x5a')];var _0x21b233=[_0x3431('0x3'),_0x3431('0x5'),_0x3431('0x4'),_0x3431('0x6'),'whatsappPause','faxPause',_0x3431('0x7'),_0x3431('0x43')];var _0x1dd9ab=_(_0xd175ae)[_0x3431('0x5b')](_0x21b233)[_0x3431('0x5c')](_0x42c392)['value']();return _0x1dd9ab;}exports[_0x3431('0x5d')]=filterAgentAttributes; \ No newline at end of file diff --git a/server/components/realtime/queues.js b/server/components/realtime/queues.js index 9adc473..c0684fb 100644 --- a/server/components/realtime/queues.js +++ b/server/components/realtime/queues.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x16aa=['getRealtimeQueues','inbound','concat','outbound','get','paused','waiting','pTalking','find','initializeQueues','lodash','jayson/promise','util','http','client','available','loggedIn','busy','inUse','invalid','loggedInDb','notInUse','onHold','ringing','ringInUse','unavailable','unknown','originated','message','statusMessage','dialActive','dialMethod','Trunk','startPredictive','startProgressive','erlangCallToSecond','erlangAbandonmentRate','erlangBusyFactor','predictiveIntervalAvailable','predictiveIntervalTotalCalls','predictiveIntervalAnsweredCalls','predictiveIntervalAvgHoldtime','predictiveIntervalAvgTalktime','voice','request','startCase','Queues','then','error','format','Unable\x20to\x20retrieve\x20RPC\x20%s\x20queues','result','catch'];(function(_0x58afd5,_0x534a48){var _0x3e503b=function(_0x27ba44){while(--_0x27ba44){_0x58afd5['push'](_0x58afd5['shift']());}};_0x3e503b(++_0x534a48);}(_0x16aa,0x74));var _0xa16a=function(_0x55403e,_0x35bc43){_0x55403e=_0x55403e-0x0;var _0x366b58=_0x16aa[_0x55403e];return _0x366b58;};'use strict';var _=require(_0xa16a('0x0'));var jayson=require(_0xa16a('0x1'));var util=require(_0xa16a('0x2'));var amiClient=jayson['client'][_0xa16a('0x3')]({'port':0x232a});var routingClient=jayson[_0xa16a('0x4')]['http']({'port':0x232c});var DEFAULT_QUEUE_ATTRIBUTES=[_0xa16a('0x5'),_0xa16a('0x6'),'paused','waiting'];var VOICE_QUEUE_ATTRIBUTES=[_0xa16a('0x7'),_0xa16a('0x8'),_0xa16a('0x9'),_0xa16a('0xa'),_0xa16a('0xb'),_0xa16a('0xc'),_0xa16a('0xd'),_0xa16a('0xe'),'talking',_0xa16a('0xf'),_0xa16a('0x10')];var OUTBOUND_QUEUE_ATTRIBUTES=['pTalking',_0xa16a('0x11'),_0xa16a('0x12'),_0xa16a('0x13'),_0xa16a('0x14'),_0xa16a('0x15'),_0xa16a('0x16'),_0xa16a('0x17'),_0xa16a('0x18'),'erlangCalls',_0xa16a('0x19'),_0xa16a('0x1a'),_0xa16a('0x1b'),'dialPredictiveInterval','dialPredictiveIntervalMaxThreshold','dialPredictiveIntervalMinThreshold',_0xa16a('0x1c'),_0xa16a('0x1d'),_0xa16a('0x1e'),'predictiveIntervalDroppedCallsTimeout','predictiveIntervalDroppedCallsCallersExit',_0xa16a('0x1f'),_0xa16a('0x20')];function getRealtimeQueues(_0x27d300,_0x28c156){var _0x735ad3=_0x28c156===_0xa16a('0x21')?amiClient:routingClient;return _0x735ad3[_0xa16a('0x22')](_[_0xa16a('0x23')](_0x28c156)+_0xa16a('0x24'),_0x27d300)[_0xa16a('0x25')](function(_0x31e3ce){if(_0x31e3ce[_0xa16a('0x26')])throw new Error(util[_0xa16a('0x27')](_0xa16a('0x28'),_0x28c156));return _0x31e3ce[_0xa16a('0x29')];})[_0xa16a('0x2a')](function(_0x18d751){throw _0x18d751;});}exports[_0xa16a('0x2b')]=getRealtimeQueues;function initializeQueues(_0x592250,_0x5b4588,_0x488775,_0x30dd76){var _0x2a1d06=DEFAULT_QUEUE_ATTRIBUTES;if(_0x488775==='voice'){if(_0x30dd76===_0xa16a('0x2c')){_0x2a1d06=_0x2a1d06[_0xa16a('0x2d')](VOICE_QUEUE_ATTRIBUTES);}else if(_0x30dd76===_0xa16a('0x2e')){_0x2a1d06=_0x2a1d06['concat'](VOICE_QUEUE_ATTRIBUTES,OUTBOUND_QUEUE_ATTRIBUTES);}}return _0x592250['map'](function(_0x1c2b55){var _0x3218c5=_0x1c2b55[_0xa16a('0x2f')]({'plain':!![]});_0x3218c5[_0xa16a('0x30')]=0x0;_0x3218c5[_0xa16a('0xa')]=0x0;_0x3218c5[_0xa16a('0x6')]=0x0;_0x3218c5[_0xa16a('0x5')]=0x0;_0x3218c5[_0xa16a('0x31')]=0x0;if(_0x488775===_0xa16a('0x21')){_0x3218c5['talking']=0x0;_0x3218c5['busy']=0x0;if(_0x30dd76==='outbound'){_0x3218c5[_0xa16a('0x32')]=0x0;_0x3218c5[_0xa16a('0x11')]=0x0;}}var _0x4c6092=_[_0xa16a('0x33')](_0x5b4588,['id',_0x3218c5['id']]);if(_0x4c6092){_['merge'](_0x3218c5,_['pick'](_0x4c6092,_0x2a1d06));}return _0x3218c5;});}exports[_0xa16a('0x34')]=initializeQueues; \ No newline at end of file +var _0xae87=['predictiveIntervalAvgHoldtime','predictiveIntervalAvgTalktime','voice','request','then','error','format','Unable\x20to\x20retrieve\x20RPC\x20%s\x20queues','result','catch','getRealtimeQueues','inbound','concat','outbound','map','paused','loggedInDb','available','talking','find','merge','pick','initializeQueues','jayson/promise','client','http','loggedIn','waiting','busy','invalid','onHold','ringInUse','unavailable','unknown','pTalking','originated','statusMessage','dialMethod','erlangCalls','erlangCallToSecond','erlangAbandonmentRate','erlangBusyFactor','dialPredictiveInterval','dialPredictiveIntervalMaxThreshold','predictiveIntervalAvailable','predictiveIntervalAnsweredCalls','predictiveIntervalDroppedCallsCallersExit'];(function(_0x2e9e35,_0x4a8b9c){var _0xe465af=function(_0x1303fb){while(--_0x1303fb){_0x2e9e35['push'](_0x2e9e35['shift']());}};_0xe465af(++_0x4a8b9c);}(_0xae87,0xd3));var _0x7ae8=function(_0x3e8cae,_0x4cb96a){_0x3e8cae=_0x3e8cae-0x0;var _0x45c4d6=_0xae87[_0x3e8cae];return _0x45c4d6;};'use strict';var _=require('lodash');var jayson=require(_0x7ae8('0x0'));var util=require('util');var amiClient=jayson[_0x7ae8('0x1')][_0x7ae8('0x2')]({'port':0x232a});var routingClient=jayson[_0x7ae8('0x1')][_0x7ae8('0x2')]({'port':0x232c});var DEFAULT_QUEUE_ATTRIBUTES=['available',_0x7ae8('0x3'),'paused',_0x7ae8('0x4')];var VOICE_QUEUE_ATTRIBUTES=[_0x7ae8('0x5'),'inUse',_0x7ae8('0x6'),'loggedInDb','notInUse',_0x7ae8('0x7'),'ringing',_0x7ae8('0x8'),'talking',_0x7ae8('0x9'),_0x7ae8('0xa')];var OUTBOUND_QUEUE_ATTRIBUTES=[_0x7ae8('0xb'),_0x7ae8('0xc'),'message',_0x7ae8('0xd'),'dialActive',_0x7ae8('0xe'),'Trunk','startPredictive','startProgressive',_0x7ae8('0xf'),_0x7ae8('0x10'),_0x7ae8('0x11'),_0x7ae8('0x12'),_0x7ae8('0x13'),_0x7ae8('0x14'),'dialPredictiveIntervalMinThreshold',_0x7ae8('0x15'),'predictiveIntervalTotalCalls',_0x7ae8('0x16'),'predictiveIntervalDroppedCallsTimeout',_0x7ae8('0x17'),_0x7ae8('0x18'),_0x7ae8('0x19')];function getRealtimeQueues(_0x5d4805,_0x1049b3){var _0x510818=_0x1049b3===_0x7ae8('0x1a')?amiClient:routingClient;return _0x510818[_0x7ae8('0x1b')](_['startCase'](_0x1049b3)+'Queues',_0x5d4805)[_0x7ae8('0x1c')](function(_0x348f50){if(_0x348f50[_0x7ae8('0x1d')])throw new Error(util[_0x7ae8('0x1e')](_0x7ae8('0x1f'),_0x1049b3));return _0x348f50[_0x7ae8('0x20')];})[_0x7ae8('0x21')](function(_0x199ac8){throw _0x199ac8;});}exports[_0x7ae8('0x22')]=getRealtimeQueues;function initializeQueues(_0x282414,_0xdbcecf,_0x5a9607,_0x55ea33){var _0x57cca2=DEFAULT_QUEUE_ATTRIBUTES;if(_0x5a9607===_0x7ae8('0x1a')){if(_0x55ea33===_0x7ae8('0x23')){_0x57cca2=_0x57cca2[_0x7ae8('0x24')](VOICE_QUEUE_ATTRIBUTES);}else if(_0x55ea33===_0x7ae8('0x25')){_0x57cca2=_0x57cca2[_0x7ae8('0x24')](VOICE_QUEUE_ATTRIBUTES,OUTBOUND_QUEUE_ATTRIBUTES);}}return _0x282414[_0x7ae8('0x26')](function(_0x42e547){var _0x3dde26=_0x42e547['get']({'plain':!![]});_0x3dde26[_0x7ae8('0x27')]=0x0;_0x3dde26[_0x7ae8('0x28')]=0x0;_0x3dde26[_0x7ae8('0x3')]=0x0;_0x3dde26[_0x7ae8('0x29')]=0x0;_0x3dde26[_0x7ae8('0x4')]=0x0;if(_0x5a9607===_0x7ae8('0x1a')){_0x3dde26[_0x7ae8('0x2a')]=0x0;_0x3dde26[_0x7ae8('0x5')]=0x0;if(_0x55ea33===_0x7ae8('0x25')){_0x3dde26[_0x7ae8('0xb')]=0x0;_0x3dde26['originated']=0x0;}}var _0x9ac817=_[_0x7ae8('0x2b')](_0xdbcecf,['id',_0x3dde26['id']]);if(_0x9ac817){_[_0x7ae8('0x2c')](_0x3dde26,_[_0x7ae8('0x2d')](_0x9ac817,_0x57cca2));}return _0x3dde26;});}exports[_0x7ae8('0x2e')]=initializeQueues; \ No newline at end of file diff --git a/server/config/express.js b/server/config/express.js index f7ddf19..dc6dcb1 100644 --- a/server/config/express.js +++ b/server/config/express.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x9957=['root','public','test','join','client','use','json\x20replacer','toISOString','split','static','/server/views','engine','html','ejs','renderFile','view\x20engine','urlencoded','json','50mb','express','method-override','cookie-parser','errorhandler','passport','cors','./environment','default','get','env','production','set','appPath'];(function(_0x3c97e3,_0x321677){var _0x9bb0ed=function(_0x3a0cb6){while(--_0x3a0cb6){_0x3c97e3['push'](_0x3c97e3['shift']());}};_0x9bb0ed(++_0x321677);}(_0x9957,0x93));var _0x7995=function(_0x5ddb1c,_0x5ea4df){_0x5ddb1c=_0x5ddb1c-0x0;var _0x354adc=_0x9957[_0x5ddb1c];return _0x354adc;};'use strict';var express=require(_0x7995('0x0'));var methodOverride=require(_0x7995('0x1'));var cookieParser=require(_0x7995('0x2'));var errorHandler=require(_0x7995('0x3'));var path=require('path');var passport=require(_0x7995('0x4'));var cors=require(_0x7995('0x5'));var config=require(_0x7995('0x6'));exports[_0x7995('0x7')]=function(_0x576d89){var _0x744bea=_0x576d89[_0x7995('0x8')](_0x7995('0x9'));if(_0x744bea===_0x7995('0xa')){_0x576d89[_0x7995('0xb')](_0x7995('0xc'),path['join'](config[_0x7995('0xd')],_0x7995('0xe')));}if(_0x744bea==='development'||_0x744bea===_0x7995('0xf')){_0x576d89[_0x7995('0xb')](_0x7995('0xc'),path[_0x7995('0x10')](config[_0x7995('0xd')],_0x7995('0x11')));_0x576d89[_0x7995('0x12')](errorHandler());}_0x576d89['set'](_0x7995('0x13'),function(_0x41c652,_0x581f22){if(this[_0x41c652]instanceof Date){_0x581f22=this[_0x41c652][_0x7995('0x14')]()[_0x7995('0x15')]('.')[0x0]+'Z';}return _0x581f22;});_0x576d89[_0x7995('0x12')](express[_0x7995('0x16')](_0x576d89[_0x7995('0x8')](_0x7995('0xc'))));_0x576d89[_0x7995('0xb')]('views',config['root']+_0x7995('0x17'));_0x576d89[_0x7995('0x18')](_0x7995('0x19'),require(_0x7995('0x1a'))[_0x7995('0x1b')]);_0x576d89[_0x7995('0xb')](_0x7995('0x1c'),_0x7995('0x19'));_0x576d89['use'](express[_0x7995('0x1d')]({'limit':'50mb','extended':!![]}));_0x576d89[_0x7995('0x12')](express[_0x7995('0x1e')]({'limit':_0x7995('0x1f')}));_0x576d89[_0x7995('0x12')](cors());_0x576d89[_0x7995('0x12')](methodOverride());_0x576d89[_0x7995('0x12')](cookieParser());_0x576d89['use'](passport['initialize']());}; \ No newline at end of file +var _0x9957=['root','public','test','join','client','use','json\x20replacer','toISOString','split','static','/server/views','engine','html','ejs','renderFile','view\x20engine','urlencoded','json','50mb','express','method-override','cookie-parser','errorhandler','passport','cors','./environment','default','get','env','production','set','appPath'];(function(_0x51fd25,_0x2fcbb){var _0x4529ae=function(_0x17ed81){while(--_0x17ed81){_0x51fd25['push'](_0x51fd25['shift']());}};_0x4529ae(++_0x2fcbb);}(_0x9957,0x93));var _0x7995=function(_0x4cf98e,_0xba4b79){_0x4cf98e=_0x4cf98e-0x0;var _0x1623ac=_0x9957[_0x4cf98e];return _0x1623ac;};'use strict';var express=require(_0x7995('0x0'));var methodOverride=require(_0x7995('0x1'));var cookieParser=require(_0x7995('0x2'));var errorHandler=require(_0x7995('0x3'));var path=require('path');var passport=require(_0x7995('0x4'));var cors=require(_0x7995('0x5'));var config=require(_0x7995('0x6'));exports[_0x7995('0x7')]=function(_0x576d89){var _0x744bea=_0x576d89[_0x7995('0x8')](_0x7995('0x9'));if(_0x744bea===_0x7995('0xa')){_0x576d89[_0x7995('0xb')](_0x7995('0xc'),path['join'](config[_0x7995('0xd')],_0x7995('0xe')));}if(_0x744bea==='development'||_0x744bea===_0x7995('0xf')){_0x576d89[_0x7995('0xb')](_0x7995('0xc'),path[_0x7995('0x10')](config[_0x7995('0xd')],_0x7995('0x11')));_0x576d89[_0x7995('0x12')](errorHandler());}_0x576d89['set'](_0x7995('0x13'),function(_0x41c652,_0x581f22){if(this[_0x41c652]instanceof Date){_0x581f22=this[_0x41c652][_0x7995('0x14')]()[_0x7995('0x15')]('.')[0x0]+'Z';}return _0x581f22;});_0x576d89[_0x7995('0x12')](express[_0x7995('0x16')](_0x576d89[_0x7995('0x8')](_0x7995('0xc'))));_0x576d89[_0x7995('0xb')]('views',config['root']+_0x7995('0x17'));_0x576d89[_0x7995('0x18')](_0x7995('0x19'),require(_0x7995('0x1a'))[_0x7995('0x1b')]);_0x576d89[_0x7995('0xb')](_0x7995('0x1c'),_0x7995('0x19'));_0x576d89['use'](express[_0x7995('0x1d')]({'limit':'50mb','extended':!![]}));_0x576d89[_0x7995('0x12')](express[_0x7995('0x1e')]({'limit':_0x7995('0x1f')}));_0x576d89[_0x7995('0x12')](cors());_0x576d89[_0x7995('0x12')](methodOverride());_0x576d89[_0x7995('0x12')](cookieParser());_0x576d89['use'](passport['initialize']());}; \ No newline at end of file diff --git a/server/config/license/hardware.js b/server/config/license/hardware.js index 9476f2b..968c0ae 100644 --- a/server/config/license/hardware.js +++ b/server/config/license/hardware.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xf491=['cpus','map','model','join','createHash','md5','digest','hex','getUuid','platform','licenseToken','win32','dmidecode\x20--string\x20system-uuid','replace','macAddress','ipAddress','update','substring','lodash','crypto','child_process','networkInterfaces','orderBy','keys','IPv4','internal','concat','head','mac','address','127.0.0.1','getFirstInterface'];(function(_0x2b80e5,_0x1f9a64){var _0x2e86b5=function(_0x2d8f29){while(--_0x2d8f29){_0x2b80e5['push'](_0x2b80e5['shift']());}};_0x2e86b5(++_0x1f9a64);}(_0xf491,0x192));var _0x1f49=function(_0x3d8942,_0x2029be){_0x3d8942=_0x3d8942-0x0;var _0x399047=_0xf491[_0x3d8942];return _0x399047;};'use strict';var _=require(_0x1f49('0x0'));var os=require('os');var crypto=require(_0x1f49('0x1'));var machine=require('bimedia-machine-uuid');var exec=require(_0x1f49('0x2'))['execSync'];var config=require('../environment');function getInterfaces(){var _0x23a69f=[];var _0x139995=os[_0x1f49('0x3')]();var _0x98094=_[_0x1f49('0x4')](_[_0x1f49('0x5')](_0x139995));for(var _0x140aa7=0x0;_0x140aa7<_0x98094['length'];_0x140aa7++){var _0x225ebc=_0x139995[_0x98094[_0x140aa7]]['filter'](function(_0xb31975){return _0xb31975['family']===_0x1f49('0x6')&&_0xb31975[_0x1f49('0x7')]===![];});_0x23a69f=_0x23a69f[_0x1f49('0x8')](_0x225ebc);}return _0x23a69f;}function getFirstInterface(){var _0x3f938a=_[_0x1f49('0x9')](getInterfaces());return{'macAddress':_0x3f938a&&_0x3f938a[_0x1f49('0xa')]?_0x3f938a[_0x1f49('0xa')]:'00:00:00:00:00:00','ipAddress':_0x3f938a&&_0x3f938a['address']?_0x3f938a[_0x1f49('0xb')]:_0x1f49('0xc')};}exports[_0x1f49('0xd')]=getFirstInterface;function getCPUhash(){var _0xd5786f=_[_0x1f49('0x4')](os[_0x1f49('0xe')]()[_0x1f49('0xf')](function(_0x54604b){return _0x54604b[_0x1f49('0x10')];}))[_0x1f49('0x11')](':');return crypto[_0x1f49('0x12')](_0x1f49('0x13'))['update'](_0xd5786f)[_0x1f49('0x14')](_0x1f49('0x15'));}exports[_0x1f49('0x16')]=function(){var _0x4b35fc=os[_0x1f49('0x17')]();var _0xb8470d=/[0-9a-f-]{36}/;if(config[_0x1f49('0x18')]&&_0xb8470d['test'](config['licenseToken'])){return config[_0x1f49('0x18')];}else if(_0x4b35fc===_0x1f49('0x19')){return exec(_0x1f49('0x1a'),{'encoding':'utf8'})[_0x1f49('0x1b')]('\x0d\x0a','');}else{var _0x4863b4=getFirstInterface();var _0x116ca3=getCPUhash();var _0x5b78d1=_0x116ca3+'|'+os['hostname']()+'|'+_0x4863b4[_0x1f49('0x1c')]+'|'+_0x4863b4[_0x1f49('0x1d')];var _0xe14408=crypto[_0x1f49('0x12')](_0x1f49('0x13'))[_0x1f49('0x1e')](_0x5b78d1)[_0x1f49('0x14')]('hex');return _0xe14408['substring'](0x0,0x8)+'-'+_0xe14408[_0x1f49('0x1f')](0x8,0xc)+'-'+_0xe14408['substring'](0xc,0x10)+'-'+_0xe14408[_0x1f49('0x1f')](0x10,0x14)+'-'+_0xe14408['substring'](0x14);}}; \ No newline at end of file +var _0x89c0=['internal','concat','address','127.0.0.1','getFirstInterface','cpus','map','join','createHash','md5','hex','getUuid','licenseToken','test','win32','utf8','replace','ipAddress','digest','substring','lodash','bimedia-machine-uuid','child_process','orderBy','keys','length','family','IPv4'];(function(_0x500419,_0x549162){var _0x241c1a=function(_0x3bea1a){while(--_0x3bea1a){_0x500419['push'](_0x500419['shift']());}};_0x241c1a(++_0x549162);}(_0x89c0,0x164));var _0x089c=function(_0x4ea0f5,_0x112a50){_0x4ea0f5=_0x4ea0f5-0x0;var _0x1c7f4d=_0x89c0[_0x4ea0f5];return _0x1c7f4d;};'use strict';var _=require(_0x089c('0x0'));var os=require('os');var crypto=require('crypto');var machine=require(_0x089c('0x1'));var exec=require(_0x089c('0x2'))['execSync'];var config=require('../environment');function getInterfaces(){var _0x42b080=[];var _0x3df623=os['networkInterfaces']();var _0x25c96c=_[_0x089c('0x3')](_[_0x089c('0x4')](_0x3df623));for(var _0x48c2b8=0x0;_0x48c2b8<_0x25c96c[_0x089c('0x5')];_0x48c2b8++){var _0x22f465=_0x3df623[_0x25c96c[_0x48c2b8]]['filter'](function(_0x37081c){return _0x37081c[_0x089c('0x6')]===_0x089c('0x7')&&_0x37081c[_0x089c('0x8')]===![];});_0x42b080=_0x42b080[_0x089c('0x9')](_0x22f465);}return _0x42b080;}function getFirstInterface(){var _0x26f88d=_['head'](getInterfaces());return{'macAddress':_0x26f88d&&_0x26f88d['mac']?_0x26f88d['mac']:'00:00:00:00:00:00','ipAddress':_0x26f88d&&_0x26f88d[_0x089c('0xa')]?_0x26f88d[_0x089c('0xa')]:_0x089c('0xb')};}exports[_0x089c('0xc')]=getFirstInterface;function getCPUhash(){var _0x3102e7=_['orderBy'](os[_0x089c('0xd')]()[_0x089c('0xe')](function(_0xb214e6){return _0xb214e6['model'];}))[_0x089c('0xf')](':');return crypto[_0x089c('0x10')](_0x089c('0x11'))['update'](_0x3102e7)['digest'](_0x089c('0x12'));}exports[_0x089c('0x13')]=function(){var _0x4d5019=os['platform']();var _0x154829=/[0-9a-f-]{36}/;if(config[_0x089c('0x14')]&&_0x154829[_0x089c('0x15')](config[_0x089c('0x14')])){return config[_0x089c('0x14')];}else if(_0x4d5019===_0x089c('0x16')){return exec('dmidecode\x20--string\x20system-uuid',{'encoding':_0x089c('0x17')})[_0x089c('0x18')]('\x0d\x0a','');}else{var _0x591ec0=getFirstInterface();var _0x9639b6=getCPUhash();var _0x1c391d=_0x9639b6+'|'+os['hostname']()+'|'+_0x591ec0['macAddress']+'|'+_0x591ec0[_0x089c('0x19')];var _0x1f7d8c=crypto[_0x089c('0x10')](_0x089c('0x11'))['update'](_0x1c391d)[_0x089c('0x1a')](_0x089c('0x12'));return _0x1f7d8c[_0x089c('0x1b')](0x0,0x8)+'-'+_0x1f7d8c['substring'](0x8,0xc)+'-'+_0x1f7d8c[_0x089c('0x1b')](0xc,0x10)+'-'+_0x1f7d8c[_0x089c('0x1b')](0x10,0x14)+'-'+_0x1f7d8c[_0x089c('0x1b')](0x14);}}; \ No newline at end of file diff --git a/server/config/license/index.js b/server/config/license/index.js index f2f83f4..9a69228 100644 --- a/server/config/license/index.js +++ b/server/config/license/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x6e1c=['THE\x20LICENSE\x20HAS\x20BEEN\x20UPDATED','update','Disabled','THE\x20LICENSE\x20HAS\x20BEEN\x20DISABLED','Changed','NEW\x20UUID\x20DETECTED:\x20FROM\x20%s\x20TO\x20%s','toUpperCase','YYYY-MM-DD\x20HH:mm','encryptString','diff','decryptString','then','error','message','finally','getUuid','findOrCreate','spread','SERVICE\x20LICENSE\x20STARTED\x20%s','default','util','moment','request-promise','pkginfo','version','../../mysqldb','../../components/encryptor','./hardware','../logger','license','https://www.xcallymotion.com','format','%s/api/servers/%s/check?version=%s','%s/api/servers/%s/check?version=%s&oldtoken=%s','GET','catch','get','data1','data2','info','THE\x20LICENSE\x20HAS\x20BEEN\x20ENABLED'];(function(_0x3e986a,_0x50bf90){var _0x4ff216=function(_0x346bcf){while(--_0x346bcf){_0x3e986a['push'](_0x3e986a['shift']());}};_0x4ff216(++_0x50bf90);}(_0x6e1c,0x1d7));var _0xc6e1=function(_0x20a584,_0xe384a5){_0x20a584=_0x20a584-0x0;var _0x4b41a8=_0x6e1c[_0x20a584];return _0x4b41a8;};'use strict';var util=require(_0xc6e1('0x0'));var moment=require(_0xc6e1('0x1'));var rp=require(_0xc6e1('0x2'));var BPromise=require('bluebird');var pkginfo=require(_0xc6e1('0x3'))(module,_0xc6e1('0x4'));var db=require(_0xc6e1('0x5'))['db'];var encryptor=require(_0xc6e1('0x6'));var hardware=require(_0xc6e1('0x7'));var logger=require(_0xc6e1('0x8'))(_0xc6e1('0x9'));var HOST=_0xc6e1('0xa');var TIME=0x3c*0x1388;var DAYS=0x7;var GRAY_PERIOD_REASON;var oldToken;var isOldTokenSent=![];function httpRequest(_0x11f69f){return new BPromise(function(_0x46048d,_0x26c091){var _0x1dd552=util[_0xc6e1('0xb')](_0xc6e1('0xc'),HOST,_0x11f69f,module['exports']['version']);if(oldToken){_0x1dd552=util['format'](_0xc6e1('0xd'),HOST,_0x11f69f,module['exports'][_0xc6e1('0x4')],oldToken);}var _0x27f3c4={'uri':_0x1dd552,'method':_0xc6e1('0xe'),'timeout':0xea60,'json':!![]};return rp(_0x27f3c4)['then'](function(_0x22839e){_0x46048d(_0x22839e);})[_0xc6e1('0xf')](function(_0xdf714e){_0x26c091(_0xdf714e);});});}function manageLicense(_0x1f7f8b,_0x2f2f89){var _0xadb844=_0x2f2f89[_0xc6e1('0x10')]({'plain':!![]});if(!isOldTokenSent&&_0xadb844[_0xc6e1('0x11')]!==_0x1f7f8b&&!_0xadb844[_0xc6e1('0x12')]){oldToken=_0xadb844['data1'];}httpRequest(_0x1f7f8b)['then'](function(_0x4425ec){if(oldToken){oldToken=undefined;isOldTokenSent=!![];}if(_0x4425ec['active']){isOldTokenSent=![];if(!_0xadb844['license']&&_0xadb844[_0xc6e1('0x9')]!=_0x4425ec[_0xc6e1('0x9')]||_0xadb844[_0xc6e1('0x9')]&&_0xadb844[_0xc6e1('0x12')]){logger[_0xc6e1('0x13')](_0xc6e1('0x14'));}if(_0xadb844['license']&&!_0xadb844['data2']&&_0xadb844[_0xc6e1('0x9')]!=_0x4425ec['license']){logger[_0xc6e1('0x13')](_0xc6e1('0x15'));}if(_0xadb844[_0xc6e1('0x9')]&&!_0xadb844[_0xc6e1('0x12')]&&_0xadb844[_0xc6e1('0x9')]==_0x4425ec[_0xc6e1('0x9')]){return _0x2f2f89;}return _0x2f2f89[_0xc6e1('0x16')]({'data1':_0x1f7f8b,'data2':null,'license':_0x4425ec[_0xc6e1('0x9')]});}else{if(_0x4425ec[_0xc6e1('0x9')]||_0xadb844[_0xc6e1('0x9')]){if(!_0xadb844[_0xc6e1('0x12')]){if(_0xadb844[_0xc6e1('0x11')]==_0x1f7f8b){GRAY_PERIOD_REASON=_0xc6e1('0x17');logger[_0xc6e1('0x13')](_0xc6e1('0x18'));}else{GRAY_PERIOD_REASON=_0xc6e1('0x19');logger[_0xc6e1('0x13')](_0xc6e1('0x1a'),_0xadb844[_0xc6e1('0x11')],_0x1f7f8b);}logger[_0xc6e1('0x13')]('%s\x20-\x20GRAY\x20PERIOD\x20STARTED\x20AT\x20%s',GRAY_PERIOD_REASON[_0xc6e1('0x1b')](),moment()['format'](_0xc6e1('0x1c')));return _0x2f2f89[_0xc6e1('0x16')]({'data2':encryptor[_0xc6e1('0x1d')](moment()[_0xc6e1('0xb')](_0xc6e1('0x1c')))});}else{if(moment()[_0xc6e1('0x1e')](encryptor[_0xc6e1('0x1f')](_0xadb844[_0xc6e1('0x12')]),'days')>DAYS){logger['info']('DEMO\x20START\x20AT\x20%s',moment()['format'](_0xc6e1('0x1c')));isOldTokenSent=![];return _0x2f2f89[_0xc6e1('0x16')]({'data1':_0x1f7f8b,'data2':null,'license':null});}}}else{if(_0xadb844[_0xc6e1('0x11')]!=_0x1f7f8b){logger[_0xc6e1('0x13')](_0xc6e1('0x1a'),_0xadb844[_0xc6e1('0x11')],_0x1f7f8b);return _0x2f2f89['update']({'data1':_0x1f7f8b,'data2':null,'license':null});}}}return _0x2f2f89;})[_0xc6e1('0x20')](function(_0x12adef){_0x2f2f89=_0x12adef;})[_0xc6e1('0xf')](function(_0x3416a8){logger[_0xc6e1('0x21')](_0x3416a8[_0xc6e1('0x22')]);})[_0xc6e1('0x23')](function(){setTimeout(function(){manageLicense(hardware[_0xc6e1('0x24')](),_0x2f2f89);},TIME);});}function defaultLicense(){var _0x42c80e=hardware[_0xc6e1('0x24')]();if(_0x42c80e){return db['License'][_0xc6e1('0x25')]({'where':{'id':0x1},'defaults':{'data1':_0x42c80e}})[_0xc6e1('0x26')](function(_0x399f98,_0x3eae7d){logger[_0xc6e1('0x13')](_0xc6e1('0x27'),_0x42c80e);manageLicense(_0x42c80e,_0x399f98);})[_0xc6e1('0xf')](function(_0x2f9bba){logger[_0xc6e1('0x21')](_0x2f9bba[_0xc6e1('0x22')]);});}}exports[_0xc6e1('0x28')]=defaultLicense; \ No newline at end of file +var _0x44cb=['moment','request-promise','bluebird','version','../../mysqldb','../../components/encryptor','./hardware','../logger','license','https://www.xcallymotion.com','format','%s/api/servers/%s/check?version=%s','exports','%s/api/servers/%s/check?version=%s&oldtoken=%s','GET','then','catch','get','data1','data2','active','info','update','Changed','NEW\x20UUID\x20DETECTED:\x20FROM\x20%s\x20TO\x20%s','%s\x20-\x20GRAY\x20PERIOD\x20STARTED\x20AT\x20%s','YYYY-MM-DD\x20HH:mm','encryptString','diff','decryptString','days','DEMO\x20START\x20AT\x20%s','error','message','getUuid','SERVICE\x20LICENSE\x20STARTED\x20%s','default','util'];(function(_0x519756,_0x288785){var _0x37047e=function(_0x3d64a7){while(--_0x3d64a7){_0x519756['push'](_0x519756['shift']());}};_0x37047e(++_0x288785);}(_0x44cb,0x155));var _0xb44c=function(_0x20a584,_0xe384a5){_0x20a584=_0x20a584-0x0;var _0x4b41a8=_0x44cb[_0x20a584];return _0x4b41a8;};'use strict';var util=require(_0xb44c('0x0'));var moment=require(_0xb44c('0x1'));var rp=require(_0xb44c('0x2'));var BPromise=require(_0xb44c('0x3'));var pkginfo=require('pkginfo')(module,_0xb44c('0x4'));var db=require(_0xb44c('0x5'))['db'];var encryptor=require(_0xb44c('0x6'));var hardware=require(_0xb44c('0x7'));var logger=require(_0xb44c('0x8'))(_0xb44c('0x9'));var HOST=_0xb44c('0xa');var TIME=0x3c*0x1388;var DAYS=0x7;var GRAY_PERIOD_REASON;var oldToken;var isOldTokenSent=![];function httpRequest(_0x5a4614){return new BPromise(function(_0xf4f353,_0x50ad44){var _0xa39e65=util[_0xb44c('0xb')](_0xb44c('0xc'),HOST,_0x5a4614,module[_0xb44c('0xd')][_0xb44c('0x4')]);if(oldToken){_0xa39e65=util[_0xb44c('0xb')](_0xb44c('0xe'),HOST,_0x5a4614,module[_0xb44c('0xd')]['version'],oldToken);}var _0x5f4674={'uri':_0xa39e65,'method':_0xb44c('0xf'),'timeout':0xea60,'json':!![]};return rp(_0x5f4674)[_0xb44c('0x10')](function(_0x344026){_0xf4f353(_0x344026);})[_0xb44c('0x11')](function(_0x5bf5a8){_0x50ad44(_0x5bf5a8);});});}function manageLicense(_0x738660,_0x25d369){var _0x308dc1=_0x25d369[_0xb44c('0x12')]({'plain':!![]});if(!isOldTokenSent&&_0x308dc1[_0xb44c('0x13')]!==_0x738660&&!_0x308dc1[_0xb44c('0x14')]){oldToken=_0x308dc1['data1'];}httpRequest(_0x738660)['then'](function(_0x31fb20){if(oldToken){oldToken=undefined;isOldTokenSent=!![];}if(_0x31fb20[_0xb44c('0x15')]){isOldTokenSent=![];if(!_0x308dc1[_0xb44c('0x9')]&&_0x308dc1[_0xb44c('0x9')]!=_0x31fb20['license']||_0x308dc1[_0xb44c('0x9')]&&_0x308dc1[_0xb44c('0x14')]){logger[_0xb44c('0x16')]('THE\x20LICENSE\x20HAS\x20BEEN\x20ENABLED');}if(_0x308dc1[_0xb44c('0x9')]&&!_0x308dc1[_0xb44c('0x14')]&&_0x308dc1[_0xb44c('0x9')]!=_0x31fb20[_0xb44c('0x9')]){logger[_0xb44c('0x16')]('THE\x20LICENSE\x20HAS\x20BEEN\x20UPDATED');}if(_0x308dc1[_0xb44c('0x9')]&&!_0x308dc1['data2']&&_0x308dc1['license']==_0x31fb20['license']){return _0x25d369;}return _0x25d369[_0xb44c('0x17')]({'data1':_0x738660,'data2':null,'license':_0x31fb20[_0xb44c('0x9')]});}else{if(_0x31fb20['license']||_0x308dc1[_0xb44c('0x9')]){if(!_0x308dc1[_0xb44c('0x14')]){if(_0x308dc1['data1']==_0x738660){GRAY_PERIOD_REASON='Disabled';logger[_0xb44c('0x16')]('THE\x20LICENSE\x20HAS\x20BEEN\x20DISABLED');}else{GRAY_PERIOD_REASON=_0xb44c('0x18');logger[_0xb44c('0x16')](_0xb44c('0x19'),_0x308dc1[_0xb44c('0x13')],_0x738660);}logger[_0xb44c('0x16')](_0xb44c('0x1a'),GRAY_PERIOD_REASON['toUpperCase'](),moment()['format'](_0xb44c('0x1b')));return _0x25d369[_0xb44c('0x17')]({'data2':encryptor[_0xb44c('0x1c')](moment()['format'](_0xb44c('0x1b')))});}else{if(moment()[_0xb44c('0x1d')](encryptor[_0xb44c('0x1e')](_0x308dc1['data2']),_0xb44c('0x1f'))>DAYS){logger['info'](_0xb44c('0x20'),moment()['format'](_0xb44c('0x1b')));isOldTokenSent=![];return _0x25d369['update']({'data1':_0x738660,'data2':null,'license':null});}}}else{if(_0x308dc1[_0xb44c('0x13')]!=_0x738660){logger[_0xb44c('0x16')](_0xb44c('0x19'),_0x308dc1[_0xb44c('0x13')],_0x738660);return _0x25d369[_0xb44c('0x17')]({'data1':_0x738660,'data2':null,'license':null});}}}return _0x25d369;})[_0xb44c('0x10')](function(_0x523c78){_0x25d369=_0x523c78;})['catch'](function(_0x59e2bf){logger[_0xb44c('0x21')](_0x59e2bf[_0xb44c('0x22')]);})['finally'](function(){setTimeout(function(){manageLicense(hardware[_0xb44c('0x23')](),_0x25d369);},TIME);});}function defaultLicense(){var _0x50954c=hardware[_0xb44c('0x23')]();if(_0x50954c){return db['License']['findOrCreate']({'where':{'id':0x1},'defaults':{'data1':_0x50954c}})['spread'](function(_0x96360e,_0x53c6ef){logger[_0xb44c('0x16')](_0xb44c('0x24'),_0x50954c);manageLicense(_0x50954c,_0x96360e);})[_0xb44c('0x11')](function(_0x37826c){logger[_0xb44c('0x21')](_0x37826c[_0xb44c('0x22')]);});}}exports[_0xb44c('0x25')]=defaultLicense; \ No newline at end of file diff --git a/server/config/license/util.js b/server/config/license/util.js index 9a2528a..9bbd78b 100644 --- a/server/config/license/util.js +++ b/server/config/license/util.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x03ab=['2027-01-01T00:00:00.000Z','Breaking\x20license','getUuid','defaults','then','catch','uuid','data1','license','isEmpty','License\x20key\x20value\x20not\x20found','split','decryptString','%s:%s:%s','demo','machineUuid','gray','deadline','add','format','changed','disabled','User','findAll','COUNT','col','role','count','admin','users','forEach','pick','countBy','user','telephone','License\x20limit\x20reached\x20for\x20users','License\x20limit\x20reached\x20for\x20telephones','exports','util','lodash','bluebird','../../components/encryptor','../../mysqldb','Demo\x20license'];(function(_0x2bece8,_0x27c181){var _0xc01f33=function(_0x343e2b){while(--_0x343e2b){_0x2bece8['push'](_0x2bece8['shift']());}};_0xc01f33(++_0x27c181);}(_0x03ab,0x102));var _0xb03a=function(_0x3594e9,_0x1d6a28){_0x3594e9=_0x3594e9-0x0;var _0x1136ad=_0x03ab[_0x3594e9];return _0x1136ad;};'use strict';var util=require(_0xb03a('0x0'));var _=require(_0xb03a('0x1'));var moment=require('moment');var BPromise=require(_0xb03a('0x2'));var hardware=require('./hardware');var encryptor=require(_0xb03a('0x3'));var db=require(_0xb03a('0x4'))['db'];const demoLicense={'demo':!![],'agents':0x2,'telephones':0x0,'users':0x1,'expiration':'2027-01-01T00:00:00.000Z','chat':![],'mail':![],'fax':![],'messaging':![],'whatsapp':![],'cm':![],'dialer':![],'jscripty':![],'openchannel':![],'callysquare':0x2,'webrtc':![],'jaws':![],'custom':![],'description':_0xb03a('0x5'),'machineUuid':hardware['getUuid'](),'virtual':0x0,'voice':!![],'screenrecording':![],'preferred':![],'ai':![]};const breakingLicense={'breaking':!![],'demo':!![],'agents':0x2,'telephones':0x0,'users':0x1,'expiration':_0xb03a('0x6'),'chat':![],'mail':![],'fax':![],'messaging':![],'whatsapp':![],'cm':![],'dialer':![],'jscripty':![],'openchannel':![],'callysquare':0x2,'webrtc':![],'jaws':![],'custom':![],'update':![],'description':_0xb03a('0x7'),'machineUuid':hardware[_0xb03a('0x8')](),'virtual':0x0,'voice':!![],'screenrecording':![],'preferred':![],'ai':![]};function getLicense(_0x299b3b){return new BPromise(function(_0x5d7529,_0x36a48f){return db['License']['find'](_[_0xb03a('0x9')](_0x299b3b,{'raw':!![],'where':{'id':0x1}}))[_0xb03a('0xa')](function(_0x5f5a58){return checkLicense(_0x5f5a58,null);})[_0xb03a('0xa')](function(_0x152d02){_0x5d7529(_0x152d02);return;})[_0xb03a('0xb')](function(_0x2259fc){_0x36a48f(_0x2259fc);});});}function checkLicense(_0x4f455f,_0x132dbe){if(!_0x4f455f){demoLicense[_0xb03a('0xc')]=_0x4f455f[_0xb03a('0xd')];return demoLicense;}try{var _0x355d33=_0x132dbe||_0x4f455f[_0xb03a('0xe')];if(_[_0xb03a('0xf')](_0x355d33)){throw new Error(_0xb03a('0x10'));}var _0x442861=_0x4f455f[_0xb03a('0xd')];var _0x4a7cff=_0x4f455f['data2'];var _0x28456c=_0x442861[_0xb03a('0x11')]('-')[0x4];var _0x1cc317=_0x442861[_0xb03a('0x11')]('-')[0x0];var _0x185bb9=encryptor[_0xb03a('0x12')](_0x355d33,util['format'](_0xb03a('0x13'),_0x28456c,_0x442861,_0x1cc317));var _0x5c4d65=JSON['parse'](_0x185bb9);_0x5c4d65[_0xb03a('0x14')]=![];_0x5c4d65[_0xb03a('0xc')]=_0x442861;_0x5c4d65[_0xb03a('0x15')]=hardware[_0xb03a('0x8')]();if(_0x4a7cff){var _0x48407d=encryptor['decryptString'](_0x4a7cff);_0x5c4d65[_0xb03a('0x16')]=_0x48407d;_0x5c4d65[_0xb03a('0x17')]=moment(_0x48407d)[_0xb03a('0x18')](0x7,'days')[_0xb03a('0x19')]();_0x5c4d65['grayReason']=_0x5c4d65[_0xb03a('0xc')]!=_0x5c4d65[_0xb03a('0x15')]?_0xb03a('0x1a'):_0xb03a('0x1b');}return _0x5c4d65;}catch(_0x495710){breakingLicense[_0xb03a('0xc')]=_0x4f455f[_0xb03a('0xd')];breakingLicense['message']=_0x495710['message'];return breakingLicense;}}function getLimits(){return new BPromise(function(_0x41afe9,_0x402cb3){getLicense()[_0xb03a('0xa')](function(_0x5f5a99){return db[_0xb03a('0x1c')][_0xb03a('0x1d')]({'attributes':['role',[db['sequelize']['fn'](_0xb03a('0x1e'),db['sequelize'][_0xb03a('0x1f')](_0xb03a('0x20'))),_0xb03a('0x21')]],'group':'role','where':{'role':{'$or':[_0xb03a('0x22'),'user','telephone']}},'raw':!![]})[_0xb03a('0xa')](function(_0x40210e){var _0x3a6239={'user':_0x5f5a99[_0xb03a('0x23')]||0x0,'telephone':_0x5f5a99['telephones']||0x0};_0x40210e[_0xb03a('0x24')](function(_0x388af2){var _0x81e15a=_0x388af2['role']==='admin'?'user':_0x388af2[_0xb03a('0x20')];_0x3a6239[_0x81e15a]-=_0x388af2[_0xb03a('0x21')];if(_0x3a6239[_0x81e15a]<0x0)_0x3a6239[_0x81e15a]=0x0;});_0x41afe9(_0x3a6239);return;});})[_0xb03a('0xb')](function(_0xb9db33){_0x402cb3(_0xb9db33);});});}function checkUserLimits(_0x2bb81c){return new BPromise(function(_0x3517a4,_0x40e87b){getLimits()[_0xb03a('0xa')](function(_0x1b0364){var _0x4735d7=_[_0xb03a('0x25')](_[_0xb03a('0x26')](_0x2bb81c,'role'),['admin',_0xb03a('0x27'),_0xb03a('0x28')]);var _0x437a1d=(_0x4735d7[_0xb03a('0x22')]||0x0)+(_0x4735d7[_0xb03a('0x27')]||0x0);var _0x17a0f9=_0x4735d7['telephone']||0x0;if(_0x437a1d>_0x1b0364[_0xb03a('0x27')])return _0x40e87b(_0xb03a('0x29'));if(_0x17a0f9>_0x1b0364[_0xb03a('0x28')])return _0x40e87b(_0xb03a('0x2a'));return _0x3517a4();})[_0xb03a('0xb')](function(_0x3cc0c0){_0x40e87b(_0x3cc0c0);});});}module[_0xb03a('0x2b')]={'checkLicense':checkLicense,'checkUserLimits':checkUserLimits,'getLicense':getLicense}; \ No newline at end of file +var _0xa53f=['./hardware','../../components/encryptor','2027-01-01T00:00:00.000Z','getUuid','License','defaults','then','uuid','data1','license','License\x20key\x20value\x20not\x20found','data2','split','decryptString','format','%s:%s:%s','parse','demo','machineUuid','gray','days','grayReason','disabled','message','User','findAll','role','sequelize','count','admin','telephone','users','forEach','catch','pick','countBy','user','License\x20limit\x20reached\x20for\x20users','util','lodash','moment','bluebird'];(function(_0x5b08c2,_0x41410f){var _0x5df3f3=function(_0x2a9073){while(--_0x2a9073){_0x5b08c2['push'](_0x5b08c2['shift']());}};_0x5df3f3(++_0x41410f);}(_0xa53f,0x7a));var _0xfa53=function(_0x1c90bc,_0x3d6e2c){_0x1c90bc=_0x1c90bc-0x0;var _0xed5f9a=_0xa53f[_0x1c90bc];return _0xed5f9a;};'use strict';var util=require(_0xfa53('0x0'));var _=require(_0xfa53('0x1'));var moment=require(_0xfa53('0x2'));var BPromise=require(_0xfa53('0x3'));var hardware=require(_0xfa53('0x4'));var encryptor=require(_0xfa53('0x5'));var db=require('../../mysqldb')['db'];const demoLicense={'demo':!![],'agents':0x2,'telephones':0x0,'users':0x1,'expiration':_0xfa53('0x6'),'chat':![],'mail':![],'fax':![],'messaging':![],'whatsapp':![],'cm':![],'dialer':![],'jscripty':![],'openchannel':![],'callysquare':0x2,'webrtc':![],'jaws':![],'custom':![],'description':'Demo\x20license','machineUuid':hardware[_0xfa53('0x7')](),'virtual':0x0,'voice':!![],'screenrecording':![],'preferred':![],'ai':![]};const breakingLicense={'breaking':!![],'demo':!![],'agents':0x2,'telephones':0x0,'users':0x1,'expiration':_0xfa53('0x6'),'chat':![],'mail':![],'fax':![],'messaging':![],'whatsapp':![],'cm':![],'dialer':![],'jscripty':![],'openchannel':![],'callysquare':0x2,'webrtc':![],'jaws':![],'custom':![],'update':![],'description':'Breaking\x20license','machineUuid':hardware[_0xfa53('0x7')](),'virtual':0x0,'voice':!![],'screenrecording':![],'preferred':![],'ai':![]};function getLicense(_0x44f115){return new BPromise(function(_0x5c3122,_0x161ed7){return db[_0xfa53('0x8')]['find'](_[_0xfa53('0x9')](_0x44f115,{'raw':!![],'where':{'id':0x1}}))[_0xfa53('0xa')](function(_0x1f4359){return checkLicense(_0x1f4359,null);})[_0xfa53('0xa')](function(_0x5c466f){_0x5c3122(_0x5c466f);return;})['catch'](function(_0x405a0d){_0x161ed7(_0x405a0d);});});}function checkLicense(_0x361c1f,_0x5b9aca){if(!_0x361c1f){demoLicense[_0xfa53('0xb')]=_0x361c1f[_0xfa53('0xc')];return demoLicense;}try{var _0x5daa06=_0x5b9aca||_0x361c1f[_0xfa53('0xd')];if(_['isEmpty'](_0x5daa06)){throw new Error(_0xfa53('0xe'));}var _0x45927e=_0x361c1f[_0xfa53('0xc')];var _0x2e8b4c=_0x361c1f[_0xfa53('0xf')];var _0x3f1079=_0x45927e[_0xfa53('0x10')]('-')[0x4];var _0x188c80=_0x45927e[_0xfa53('0x10')]('-')[0x0];var _0x3ebbd7=encryptor[_0xfa53('0x11')](_0x5daa06,util[_0xfa53('0x12')](_0xfa53('0x13'),_0x3f1079,_0x45927e,_0x188c80));var _0x3fc2a7=JSON[_0xfa53('0x14')](_0x3ebbd7);_0x3fc2a7[_0xfa53('0x15')]=![];_0x3fc2a7[_0xfa53('0xb')]=_0x45927e;_0x3fc2a7[_0xfa53('0x16')]=hardware[_0xfa53('0x7')]();if(_0x2e8b4c){var _0x5deb0c=encryptor['decryptString'](_0x2e8b4c);_0x3fc2a7[_0xfa53('0x17')]=_0x5deb0c;_0x3fc2a7['deadline']=moment(_0x5deb0c)['add'](0x7,_0xfa53('0x18'))['format']();_0x3fc2a7[_0xfa53('0x19')]=_0x3fc2a7[_0xfa53('0xb')]!=_0x3fc2a7[_0xfa53('0x16')]?'changed':_0xfa53('0x1a');}return _0x3fc2a7;}catch(_0xa70c19){breakingLicense['uuid']=_0x361c1f[_0xfa53('0xc')];breakingLicense['message']=_0xa70c19[_0xfa53('0x1b')];return breakingLicense;}}function getLimits(){return new BPromise(function(_0x3df11e,_0x50bd7c){getLicense()[_0xfa53('0xa')](function(_0xa65baf){return db[_0xfa53('0x1c')][_0xfa53('0x1d')]({'attributes':[_0xfa53('0x1e'),[db[_0xfa53('0x1f')]['fn']('COUNT',db[_0xfa53('0x1f')]['col'](_0xfa53('0x1e'))),_0xfa53('0x20')]],'group':'role','where':{'role':{'$or':[_0xfa53('0x21'),'user',_0xfa53('0x22')]}},'raw':!![]})[_0xfa53('0xa')](function(_0x477479){var _0x291e2a={'user':_0xa65baf[_0xfa53('0x23')]||0x0,'telephone':_0xa65baf['telephones']||0x0};_0x477479[_0xfa53('0x24')](function(_0x4b06b2){var _0x208a5e=_0x4b06b2[_0xfa53('0x1e')]==='admin'?'user':_0x4b06b2[_0xfa53('0x1e')];_0x291e2a[_0x208a5e]-=_0x4b06b2['count'];if(_0x291e2a[_0x208a5e]<0x0)_0x291e2a[_0x208a5e]=0x0;});_0x3df11e(_0x291e2a);return;});})[_0xfa53('0x25')](function(_0x59b8a2){_0x50bd7c(_0x59b8a2);});});}function checkUserLimits(_0x1e6970){return new BPromise(function(_0x4dc21f,_0x1d8c0a){getLimits()[_0xfa53('0xa')](function(_0x560c87){var _0x5ee025=_[_0xfa53('0x26')](_[_0xfa53('0x27')](_0x1e6970,_0xfa53('0x1e')),[_0xfa53('0x21'),_0xfa53('0x28'),_0xfa53('0x22')]);var _0x4678c7=(_0x5ee025[_0xfa53('0x21')]||0x0)+(_0x5ee025[_0xfa53('0x28')]||0x0);var _0x4d7f40=_0x5ee025[_0xfa53('0x22')]||0x0;if(_0x4678c7>_0x560c87[_0xfa53('0x28')])return _0x1d8c0a(_0xfa53('0x29'));if(_0x4d7f40>_0x560c87[_0xfa53('0x22')])return _0x1d8c0a('License\x20limit\x20reached\x20for\x20telephones');return _0x4dc21f();})[_0xfa53('0x25')](function(_0x67721){_0x1d8c0a(_0x67721);});});}module['exports']={'checkLicense':checkLicense,'checkUserLimits':checkUserLimits,'getLicense':getLicense}; \ No newline at end of file diff --git a/server/config/local.env.js b/server/config/local.env.js index 7097caf..cf67311 100644 --- a/server/config/local.env.js +++ b/server/config/local.env.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xb44a=['myappanuglar-secret','secret'];(function(_0xd95342,_0xb75bf6){var _0x54d694=function(_0x1190c1){while(--_0x1190c1){_0xd95342['push'](_0xd95342['shift']());}};_0x54d694(++_0xb75bf6);}(_0xb44a,0x1c2));var _0xab44=function(_0x52121d,_0x1d1704){_0x52121d=_0x52121d-0x0;var _0x448627=_0xb44a[_0x52121d];return _0x448627;};'use strict';module['exports']={'DOMAIN':'http://localhost:9000','SESSION_SECRET':_0xab44('0x0'),'GOOGLE_ID':'app-id','GOOGLE_SECRET':_0xab44('0x1'),'DEBUG':''}; \ No newline at end of file +var _0x1eba=['secret','exports','http://localhost:9000','myappanuglar-secret','app-id'];(function(_0x59b8f9,_0x4d00c8){var _0x3cb01d=function(_0x581b96){while(--_0x581b96){_0x59b8f9['push'](_0x59b8f9['shift']());}};_0x3cb01d(++_0x4d00c8);}(_0x1eba,0x1d7));var _0xa1eb=function(_0x562362,_0x5d54f4){_0x562362=_0x562362-0x0;var _0x3a18ce=_0x1eba[_0x562362];return _0x3a18ce;};'use strict';module[_0xa1eb('0x0')]={'DOMAIN':_0xa1eb('0x1'),'SESSION_SECRET':_0xa1eb('0x2'),'GOOGLE_ID':_0xa1eb('0x3'),'GOOGLE_SECRET':_0xa1eb('0x4'),'DEBUG':''}; \ No newline at end of file diff --git a/server/config/logger.js b/server/config/logger.js index e392a73..0e4679c 100644 --- a/server/config/logger.js +++ b/server/config/logger.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xb2a4=['../utils/loggers','fileLogger','exports'];(function(_0x5df54c,_0x54da8d){var _0x3e2fdd=function(_0x2affaf){while(--_0x2affaf){_0x5df54c['push'](_0x5df54c['shift']());}};_0x3e2fdd(++_0x54da8d);}(_0xb2a4,0x1bc));var _0x4b2a=function(_0x412f2e,_0x18003f){_0x412f2e=_0x412f2e-0x0;var _0x19af1f=_0xb2a4[_0x412f2e];return _0x19af1f;};'use strict';var fileLogger=require(_0x4b2a('0x0'))[_0x4b2a('0x1')];module[_0x4b2a('0x2')]=fileLogger; \ No newline at end of file +var _0xc43e=['../utils/loggers'];(function(_0x3ca072,_0x96b71b){var _0x5c865f=function(_0x3889e5){while(--_0x3889e5){_0x3ca072['push'](_0x3ca072['shift']());}};_0x5c865f(++_0x96b71b);}(_0xc43e,0x19e));var _0xec43=function(_0xb8ee06,_0x4327f4){_0xb8ee06=_0xb8ee06-0x0;var _0x3b0200=_0xc43e[_0xb8ee06];return _0x3b0200;};'use strict';var fileLogger=require(_0xec43('0x0'))['fileLogger'];module['exports']=fileLogger; \ No newline at end of file diff --git a/server/config/pm2/config.js b/server/config/pm2/config.js index e204379..2db5111 100644 --- a/server/config/pm2/config.js +++ b/server/config/pm2/config.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x093c=['ami','join','../../services/ami/index.js','agi','../../services/agi/index.js','../../services/email/index.js','../../services/routing/index.js','../../services/xdr/index.js','path','resolve','root','../../services/express/index.js'];(function(_0x44d722,_0x5eca93){var _0x38c9e9=function(_0x284e41){while(--_0x284e41){_0x44d722['push'](_0x44d722['shift']());}};_0x38c9e9(++_0x5eca93);}(_0x093c,0x80));var _0xc093=function(_0x57a30d,_0x490bc0){_0x57a30d=_0x57a30d-0x0;var _0x231591=_0x093c[_0x57a30d];return _0x231591;};'use strict';var path=require(_0xc093('0x0'));var cfg=require('../../config/environment');var env={'NODE_PATH':path[_0xc093('0x1')](path['join'](cfg[_0xc093('0x2')],'legacy-libs'))};var pm2config={'apps':[{'name':'express','script':path['join'](__dirname,_0xc093('0x3')),'env':env},{'name':_0xc093('0x4'),'script':path[_0xc093('0x5')](__dirname,_0xc093('0x6')),'env':env},{'name':_0xc093('0x7'),'script':path[_0xc093('0x5')](__dirname,_0xc093('0x8')),'env':env},{'name':'email','script':path[_0xc093('0x5')](__dirname,_0xc093('0x9')),'env':env},{'name':'routing','script':path[_0xc093('0x5')](__dirname,_0xc093('0xa')),'env':env},{'name':'xdr','script':path['join'](__dirname,_0xc093('0xb')),'env':env}]};module['exports']=pm2config; \ No newline at end of file +var _0x24cc=['routing','../../services/routing/index.js','xdr','../../services/xdr/index.js','join','root','ami','agi','../../services/agi/index.js','email'];(function(_0x432682,_0x253044){var _0x463d05=function(_0xa73403){while(--_0xa73403){_0x432682['push'](_0x432682['shift']());}};_0x463d05(++_0x253044);}(_0x24cc,0x86));var _0xc24c=function(_0x50b1ec,_0x33e277){_0x50b1ec=_0x50b1ec-0x0;var _0x2a5e8b=_0x24cc[_0x50b1ec];return _0x2a5e8b;};'use strict';var path=require('path');var cfg=require('../../config/environment');var env={'NODE_PATH':path['resolve'](path[_0xc24c('0x0')](cfg[_0xc24c('0x1')],'legacy-libs'))};var pm2config={'apps':[{'name':'express','script':path[_0xc24c('0x0')](__dirname,'../../services/express/index.js'),'env':env},{'name':_0xc24c('0x2'),'script':path[_0xc24c('0x0')](__dirname,'../../services/ami/index.js'),'env':env},{'name':_0xc24c('0x3'),'script':path[_0xc24c('0x0')](__dirname,_0xc24c('0x4')),'env':env},{'name':_0xc24c('0x5'),'script':path[_0xc24c('0x0')](__dirname,'../../services/email/index.js'),'env':env},{'name':_0xc24c('0x6'),'script':path['join'](__dirname,_0xc24c('0x7')),'env':env},{'name':_0xc24c('0x8'),'script':path[_0xc24c('0x0')](__dirname,_0xc24c('0x9')),'env':env}]};module['exports']=pm2config; \ No newline at end of file diff --git a/server/config/pm2/index.js b/server/config/pm2/index.js index 6d126ac..f14959b 100644 --- a/server/config/pm2/index.js +++ b/server/config/pm2/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xd899=['stop','restart','list','then','describe','delete','saved','bluebird','./config','connect','connected','disconnect'];(function(_0x4c43a8,_0x3491b1){var _0x3177f2=function(_0x533908){while(--_0x533908){_0x4c43a8['push'](_0x4c43a8['shift']());}};_0x3177f2(++_0x3491b1);}(_0xd899,0x14b));var _0x9d89=function(_0x35e558,_0x100f0a){_0x35e558=_0x35e558-0x0;var _0x25ee43=_0xd899[_0x35e558];return _0x25ee43;};'use strict';var pm2=require('pm2');var BPromise=require(_0x9d89('0x0'));var config=require(_0x9d89('0x1'));function connect(){return new BPromise(function(_0xe5d541,_0x291603){return pm2[_0x9d89('0x2')](function(_0x4b7409){if(_0x4b7409){return _0x291603(_0x4b7409);}return _0xe5d541(_0x9d89('0x3'));});});};exports['start']=function(_0x1b71b2){return connect()['then'](function(){return new BPromise(function(_0x2c07c5,_0x1479b3){return pm2['start'](_0x1b71b2,function(_0x17e2c1,_0xba7a74){if(_0x17e2c1){return _0x1479b3(_0x17e2c1);}pm2[_0x9d89('0x4')]();return _0x2c07c5(_0xba7a74);});});});};exports[_0x9d89('0x5')]=function(_0x175010){return connect()['then'](function(){return new BPromise(function(_0x397bb8,_0x23ea99){return pm2[_0x9d89('0x5')](_0x175010,function(_0x2eb4be,_0xf12161){if(_0x2eb4be){return _0x23ea99(_0x2eb4be);}pm2['disconnect']();return _0x397bb8(_0xf12161);});});});};exports[_0x9d89('0x6')]=function(_0x18536a){return connect()['then'](function(){return new BPromise(function(_0x5cc875,_0x383e25){return pm2[_0x9d89('0x6')](_0x18536a,function(_0xebefce,_0x2c0cc5){if(_0xebefce){return _0x383e25(_0xebefce);}pm2['disconnect']();return _0x5cc875(_0x2c0cc5);});});});};exports[_0x9d89('0x7')]=function(){return connect()[_0x9d89('0x8')](function(){return new BPromise(function(_0x566d02,_0x5def1e){return pm2[_0x9d89('0x7')](function(_0x5f02bb,_0x417cd1){if(_0x5f02bb){return _0x5def1e(_0x5f02bb);}pm2[_0x9d89('0x4')]();return _0x566d02(_0x417cd1);});});});};exports['describe']=function(_0x51c8f1){return connect()['then'](function(){return new BPromise(function(_0x158ba5,_0x34e2d5){return pm2[_0x9d89('0x9')](_0x51c8f1,function(_0xb2f2a6,_0x504c31){if(_0xb2f2a6){return _0x34e2d5(_0xb2f2a6);}pm2[_0x9d89('0x4')]();return _0x158ba5(_0x504c31);});});});};exports[_0x9d89('0xa')]=function(_0x226b9b){return connect()[_0x9d89('0x8')](function(){return new BPromise(function(_0x317120,_0x5a147a){return pm2[_0x9d89('0xa')](_0x226b9b,function(_0x541f64,_0x14b1de){if(_0x541f64){return _0x5a147a(_0x541f64);}pm2[_0x9d89('0x4')]();return _0x317120(_0x14b1de);});});});};exports['dump']=function(){return connect()[_0x9d89('0x8')](function(){return new BPromise(function(_0x49559c,_0x465993){return pm2['dump'](function(_0x4acda4){if(_0x4acda4){return _0x465993(_0x4acda4);}return _0x49559c(_0x9d89('0xb'));});});});}; \ No newline at end of file +var _0x58e0=['delete','dump','saved','./config','connect','connected','then','start','disconnect','stop','restart','list','describe'];(function(_0x3c9bb5,_0x3ce41d){var _0x3e99e5=function(_0x4f9ed9){while(--_0x4f9ed9){_0x3c9bb5['push'](_0x3c9bb5['shift']());}};_0x3e99e5(++_0x3ce41d);}(_0x58e0,0x9f));var _0x058e=function(_0x4e7d25,_0x58285f){_0x4e7d25=_0x4e7d25-0x0;var _0x526fe6=_0x58e0[_0x4e7d25];return _0x526fe6;};'use strict';var pm2=require('pm2');var BPromise=require('bluebird');var config=require(_0x058e('0x0'));function connect(){return new BPromise(function(_0x582ad9,_0x19a65f){return pm2[_0x058e('0x1')](function(_0x307f44){if(_0x307f44){return _0x19a65f(_0x307f44);}return _0x582ad9(_0x058e('0x2'));});});};exports['start']=function(_0x2b3148){return connect()[_0x058e('0x3')](function(){return new BPromise(function(_0x2f82fd,_0x27a120){return pm2[_0x058e('0x4')](_0x2b3148,function(_0x217f6a,_0xf63297){if(_0x217f6a){return _0x27a120(_0x217f6a);}pm2[_0x058e('0x5')]();return _0x2f82fd(_0xf63297);});});});};exports[_0x058e('0x6')]=function(_0x49a308){return connect()[_0x058e('0x3')](function(){return new BPromise(function(_0x25bd1b,_0x3869b8){return pm2[_0x058e('0x6')](_0x49a308,function(_0x5dd375,_0x379409){if(_0x5dd375){return _0x3869b8(_0x5dd375);}pm2[_0x058e('0x5')]();return _0x25bd1b(_0x379409);});});});};exports['restart']=function(_0x1c38d6){return connect()[_0x058e('0x3')](function(){return new BPromise(function(_0x2fffd6,_0x287e5b){return pm2[_0x058e('0x7')](_0x1c38d6,function(_0x5afda5,_0xa07ce0){if(_0x5afda5){return _0x287e5b(_0x5afda5);}pm2[_0x058e('0x5')]();return _0x2fffd6(_0xa07ce0);});});});};exports[_0x058e('0x8')]=function(){return connect()[_0x058e('0x3')](function(){return new BPromise(function(_0x5e240b,_0x39d80d){return pm2['list'](function(_0x26556f,_0x11a96c){if(_0x26556f){return _0x39d80d(_0x26556f);}pm2['disconnect']();return _0x5e240b(_0x11a96c);});});});};exports[_0x058e('0x9')]=function(_0x3a8875){return connect()['then'](function(){return new BPromise(function(_0x64b839,_0x2bc383){return pm2['describe'](_0x3a8875,function(_0x43e8b0,_0xa17f2d){if(_0x43e8b0){return _0x2bc383(_0x43e8b0);}pm2['disconnect']();return _0x64b839(_0xa17f2d);});});});};exports[_0x058e('0xa')]=function(_0x3e55fe){return connect()[_0x058e('0x3')](function(){return new BPromise(function(_0x191b7d,_0x56cf66){return pm2[_0x058e('0xa')](_0x3e55fe,function(_0x113256,_0x1317fa){if(_0x113256){return _0x56cf66(_0x113256);}pm2[_0x058e('0x5')]();return _0x191b7d(_0x1317fa);});});});};exports[_0x058e('0xb')]=function(){return connect()[_0x058e('0x3')](function(){return new BPromise(function(_0x47f704,_0x15fa2c){return pm2[_0x058e('0xb')](function(_0x28c104){if(_0x28c104){return _0x15fa2c(_0x28c104);}return _0x47f704(_0x058e('0xc'));});});});}; \ No newline at end of file diff --git a/server/config/schedule/chat.js b/server/config/schedule/chat.js index 0b6e666..59da59b 100644 --- a/server/config/schedule/chat.js +++ b/server/config/schedule/chat.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xcf3e=['ChatInteraction','findAll','lastMsgAt','subtract','[CHAT]\x20Interactions\x20to\x20close:','update','system','timeout','length','info','[CHAT]\x20Sending\x20updates\x20for\x20interactions:','join','emit','chatInteraction:update','catch','error','[CHAT]\x20Error\x20closing\x20interactions','inspect','lodash','moment','ioredis','util','../../config/environment','../../mysqldb','../logger','schedule','defaults','redis','localhost','Setting','find','chatTimeout','then'];(function(_0x64770b,_0x3cbda9){var _0x8649c2=function(_0x263e78){while(--_0x263e78){_0x64770b['push'](_0x64770b['shift']());}};_0x8649c2(++_0x3cbda9);}(_0xcf3e,0x75));var _0xecf3=function(_0x575a19,_0x37b9ca){_0x575a19=_0x575a19-0x0;var _0x493ec5=_0xcf3e[_0x575a19];return _0x493ec5;};'use strict';var _=require(_0xecf3('0x0'));var moment=require(_0xecf3('0x1'));var Redis=require(_0xecf3('0x2'));var util=require(_0xecf3('0x3'));var config=require(_0xecf3('0x4'));var db=require(_0xecf3('0x5'))['db'];var logger=require(_0xecf3('0x6'))(_0xecf3('0x7'));config['redis']=_[_0xecf3('0x8')](config[_0xecf3('0x9')],{'host':_0xecf3('0xa'),'port':0x18eb});var io=require('socket.io-emitter')(new Redis(config['redis']));function closeInteractions(){var _0x5741ed=0x0;var _0x44ee00=[];return db[_0xecf3('0xb')][_0xecf3('0xc')]({'raw':!![],'attributes':['id',_0xecf3('0xd')],'where':{'id':0x1}})[_0xecf3('0xe')](function(_0xd40e28){_0x5741ed=_0xd40e28[_0xecf3('0xd')];if(_0x5741ed){return db[_0xecf3('0xf')][_0xecf3('0x10')]({'raw':!![],'attributes':['id',_0xecf3('0x11')],'where':{'closed':![],'lastMsgAt':{'$lt':moment()[_0xecf3('0x12')](_0xd40e28[_0xecf3('0xd')],'minutes')}}});}else{return[];}})[_0xecf3('0xe')](function(_0xec6cae){if(_0xec6cae&&_0xec6cae['length']){_0x44ee00=_['map'](_0xec6cae||[],'id');logger['info'](_0xecf3('0x13'),_0x44ee00['join']());return db[_0xecf3('0xf')][_0xecf3('0x14')]({'closeReason':_0xecf3('0x15'),'disposition':_0xecf3('0x16'),'closed':!![],'closedAt':moment()['format']('YYYY-MM-DD\x20HH:mm:ss')},{'where':{'id':_0x44ee00}});}})[_0xecf3('0xe')](function(){if(_0x44ee00&&_0x44ee00[_0xecf3('0x17')]){logger[_0xecf3('0x18')](_0xecf3('0x19'),_0x44ee00[_0xecf3('0x1a')]());for(var _0x2940ca=0x0;_0x2940ca<_0x44ee00['length'];_0x2940ca++){io[_0xecf3('0x1b')](_0xecf3('0x1c'),{'id':_0x44ee00[_0x2940ca],'closed':!![]});}}})[_0xecf3('0x1d')](function(_0x269064){logger[_0xecf3('0x1e')](_0xecf3('0x1f'),_0x269064?util[_0xecf3('0x20')](_0x269064,{'showHidden':![],'depth':null}):'');});}exports['start']=function(){setInterval(function(){return closeInteractions();},0x3c*0x3e8);return closeInteractions();}; \ No newline at end of file +var _0x9c77=['util','schedule','redis','defaults','localhost','Setting','find','chatTimeout','then','ChatInteraction','findAll','lastMsgAt','subtract','minutes','length','map','info','[CHAT]\x20Interactions\x20to\x20close:','join','update','system','timeout','YYYY-MM-DD\x20HH:mm:ss','emit','chatInteraction:update','catch','[CHAT]\x20Error\x20closing\x20interactions','start','lodash','moment'];(function(_0x430535,_0x2caab6){var _0x1c0171=function(_0x28de2b){while(--_0x28de2b){_0x430535['push'](_0x430535['shift']());}};_0x1c0171(++_0x2caab6);}(_0x9c77,0x12a));var _0x79c7=function(_0x5a3384,_0x50fc8a){_0x5a3384=_0x5a3384-0x0;var _0xf2a968=_0x9c77[_0x5a3384];return _0xf2a968;};'use strict';var _=require(_0x79c7('0x0'));var moment=require(_0x79c7('0x1'));var Redis=require('ioredis');var util=require(_0x79c7('0x2'));var config=require('../../config/environment');var db=require('../../mysqldb')['db'];var logger=require('../logger')(_0x79c7('0x3'));config[_0x79c7('0x4')]=_[_0x79c7('0x5')](config[_0x79c7('0x4')],{'host':_0x79c7('0x6'),'port':0x18eb});var io=require('socket.io-emitter')(new Redis(config[_0x79c7('0x4')]));function closeInteractions(){var _0x59ae8a=0x0;var _0x23ca6d=[];return db[_0x79c7('0x7')][_0x79c7('0x8')]({'raw':!![],'attributes':['id',_0x79c7('0x9')],'where':{'id':0x1}})[_0x79c7('0xa')](function(_0x13fa7c){_0x59ae8a=_0x13fa7c[_0x79c7('0x9')];if(_0x59ae8a){return db[_0x79c7('0xb')][_0x79c7('0xc')]({'raw':!![],'attributes':['id',_0x79c7('0xd')],'where':{'closed':![],'lastMsgAt':{'$lt':moment()[_0x79c7('0xe')](_0x13fa7c[_0x79c7('0x9')],_0x79c7('0xf'))}}});}else{return[];}})[_0x79c7('0xa')](function(_0x8d30ad){if(_0x8d30ad&&_0x8d30ad[_0x79c7('0x10')]){_0x23ca6d=_[_0x79c7('0x11')](_0x8d30ad||[],'id');logger[_0x79c7('0x12')](_0x79c7('0x13'),_0x23ca6d[_0x79c7('0x14')]());return db[_0x79c7('0xb')][_0x79c7('0x15')]({'closeReason':_0x79c7('0x16'),'disposition':_0x79c7('0x17'),'closed':!![],'closedAt':moment()['format'](_0x79c7('0x18'))},{'where':{'id':_0x23ca6d}});}})['then'](function(){if(_0x23ca6d&&_0x23ca6d['length']){logger[_0x79c7('0x12')]('[CHAT]\x20Sending\x20updates\x20for\x20interactions:',_0x23ca6d['join']());for(var _0xa85a52=0x0;_0xa85a52<_0x23ca6d[_0x79c7('0x10')];_0xa85a52++){io[_0x79c7('0x19')](_0x79c7('0x1a'),{'id':_0x23ca6d[_0xa85a52],'closed':!![]});}}})[_0x79c7('0x1b')](function(_0x521011){logger['error'](_0x79c7('0x1c'),_0x521011?util['inspect'](_0x521011,{'showHidden':![],'depth':null}):'');});}exports[_0x79c7('0x1d')]=function(){setInterval(function(){return closeInteractions();},0x3c*0x3e8);return closeInteractions();}; \ No newline at end of file diff --git a/server/config/schedule/cloud-provider.js b/server/config/schedule/cloud-provider.js index 88c5835..fe0c60c 100644 --- a/server/config/schedule/cloud-provider.js +++ b/server/config/schedule/cloud-provider.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x5736=['startAllRefreshIntervals','exports','../../api/cloudProvider/cloudProvider.oauth.js'];(function(_0x189d3c,_0x5efebf){var _0x485959=function(_0x1161da){while(--_0x1161da){_0x189d3c['push'](_0x189d3c['shift']());}};_0x485959(++_0x5efebf);}(_0x5736,0x161));var _0x6573=function(_0x3b0310,_0x5e383e){_0x3b0310=_0x3b0310-0x0;var _0x31d9e4=_0x5736[_0x3b0310];return _0x31d9e4;};'use strict';function start(){var _0x54ceff=require(_0x6573('0x0'));return _0x54ceff[_0x6573('0x1')]();}module[_0x6573('0x2')]={'intervals':{},'start':start}; \ No newline at end of file +var _0xee9d=['startAllRefreshIntervals','../../api/cloudProvider/cloudProvider.oauth.js'];(function(_0x11dc4b,_0x424520){var _0x16706d=function(_0xee9253){while(--_0xee9253){_0x11dc4b['push'](_0x11dc4b['shift']());}};_0x16706d(++_0x424520);}(_0xee9d,0x121));var _0xdee9=function(_0x4a015e,_0x4ff892){_0x4a015e=_0x4a015e-0x0;var _0x5d7f5f=_0xee9d[_0x4a015e];return _0x5d7f5f;};'use strict';function start(){var _0x13a69c=require(_0xdee9('0x0'));return _0x13a69c[_0xdee9('0x1')]();}module['exports']={'intervals':{},'start':start}; \ No newline at end of file diff --git a/server/config/schedule/index.js b/server/config/schedule/index.js index 74cdc31..4dd91ee 100644 --- a/server/config/schedule/index.js +++ b/server/config/schedule/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x1cd2=['subtractNumber','../../files/reports','savename','%s.%s','extname','zip','join','existsSync','status','Sent','attachments','message','text','Report\x20empty\x0aThis\x20is\x20an\x20automatically\x20generated\x20email\x20–\x20please\x20do\x20not\x20reply\x20to\x20this\x20email.\x0a\x0a','sendIfEmpty','info','empty\x20file,\x20email\x20not\x20sent','request','SendMail','error','error\x20mail','stringify','email\x20sent','catch','isNil','subtractNumber\x20null\x20or\x20undefined','subtractUnit','subtractUnit\x20null\x20or\x20undefined','subtract','YYYY-MM-DD\x20HH:mm:ss','scheduled','output','DefaultReportId','runReport','then','exec\x20custom\x20report\x20id:%s','CustomReportId','no\x20report\x20id','Schedule','findAll','MailServerOut','Smtp','CloudProvider','keys','jobs','toString','keyBy','difference','intersection','length','exists','deleteJob','delete\x20cron','toRun','index','my\x20id','resolve','cron','isBetween','startAt','endAt','add','start','stop\x20cron','stop','run','util','path','lodash','moment','cron-job-manager','jayson/promise','bluebird','../../mysqldb','../../api/analyticCustomReport/analyticCustomReport.controller','../../api/analyticDefaultReport/analyticDefaultReport.controller','Try\x20to\x20send\x20a\x20mail\x20to','MailAccount','getSmtpOptions','format','\x22%s\x22\x20<%s>','name','user','email','Report\x20%s\x20last\x20%s\x20%s'];(function(_0x451545,_0x24521b){var _0x333828=function(_0x2c3de3){while(--_0x2c3de3){_0x451545['push'](_0x451545['shift']());}};_0x333828(++_0x24521b);}(_0x1cd2,0x141));var _0x21cd=function(_0x5b33b0,_0x276310){_0x5b33b0=_0x5b33b0-0x0;var _0x5d7150=_0x1cd2[_0x5b33b0];return _0x5d7150;};'use strict';var fs=require('fs');var util=require(_0x21cd('0x0'));var path=require(_0x21cd('0x1'));var _=require(_0x21cd('0x2'));var moment=require(_0x21cd('0x3'));var CronJobManager=require(_0x21cd('0x4'));var jayson=require(_0x21cd('0x5'));var BPromise=require(_0x21cd('0x6'));var logger=require('../logger')('schedule');var db=require(_0x21cd('0x7'))['db'];var analyticCustomReportController=require(_0x21cd('0x8'));var analyticDefaultReportController=require(_0x21cd('0x9'));var client=jayson['client']['http']({'port':0x232b});var manager=new CronJobManager();function handleSendEmail(_0x393e51,_0x31193d){return function(){logger['info'](_0x21cd('0xa'),_0x393e51['email']);var _0x17a172=!![];var _0x42a9a2=_0x393e51[_0x21cd('0xb')][_0x21cd('0xc')]();var _0x460927={'account':_0x42a9a2,'message':{'from':util[_0x21cd('0xd')](_0x21cd('0xe'),_0x393e51[_0x21cd('0xb')][_0x21cd('0xf')],_0x393e51['MailAccount']['email']||_0x393e51[_0x21cd('0xb')]['Smtp'][_0x21cd('0x10')]),'to':_0x393e51[_0x21cd('0x11')],'cc':_0x393e51['cc'],'bcc':_0x393e51['bcc'],'subject':util[_0x21cd('0xd')](_0x21cd('0x12'),_0x31193d[_0x21cd('0xf')],_0x393e51[_0x21cd('0x13')],_0x393e51['subtractUnit'])}};var _0x31c76e=path['join'](__dirname,_0x21cd('0x14'));var _0x37c0c6=_0x31193d[_0x21cd('0x15')];var _0x20f5c7=util[_0x21cd('0xd')](_0x21cd('0x16'),path['basename'](_0x31193d[_0x21cd('0x15')],path[_0x21cd('0x17')](_0x31193d[_0x21cd('0x15')])),_0x21cd('0x18'));var _0x514dec=path['join'](_0x31c76e,_0x37c0c6);var _0x1bdaa5=path[_0x21cd('0x19')](_0x31c76e,_0x20f5c7);if(fs[_0x21cd('0x1a')](_0x514dec)){_0x31193d[_0x21cd('0x1b')]=_0x21cd('0x1c');_0x460927['message'][_0x21cd('0x1d')]=[{'filename':_0x37c0c6,'path':_0x514dec}];_0x460927[_0x21cd('0x1e')][_0x21cd('0x1f')]=util[_0x21cd('0xd')]('Info\x20report:\x0a%s\x0aPlease\x20see\x20the\x20attachments\x0aThis\x20is\x20an\x20automatically\x20generated\x20email\x20–\x20please\x20do\x20not\x20reply\x20to\x20it.\x0a\x0a',JSON['stringify'](_0x31193d,null,0x2));}else if(fs[_0x21cd('0x1a')](_0x1bdaa5)){_0x31193d[_0x21cd('0x1b')]=_0x21cd('0x1c');_0x460927[_0x21cd('0x1e')]['attachments']=[{'filename':_0x20f5c7,'path':_0x1bdaa5}];}else{_0x460927[_0x21cd('0x1e')][_0x21cd('0x1f')]=_0x21cd('0x20');if(!_0x393e51[_0x21cd('0x21')]){_0x17a172=![];logger[_0x21cd('0x22')](_0x21cd('0x23'));}}if(_0x17a172){return client[_0x21cd('0x24')](_0x21cd('0x25'),_0x460927)['then'](function(_0x4386aa){if(_0x4386aa['error']){return logger[_0x21cd('0x26')](_0x21cd('0x27'),JSON[_0x21cd('0x28')](_0x4386aa));}return logger[_0x21cd('0x22')](_0x21cd('0x29'));})[_0x21cd('0x2a')](function(_0x2ce1be){return logger[_0x21cd('0x26')](_0x21cd('0x27'),JSON[_0x21cd('0x28')](_0x2ce1be));});}};}function handleError(){return function(_0x37f130){return logger[_0x21cd('0x26')](JSON[_0x21cd('0x28')](_0x37f130));};}function handleResult(_0x3ed45e){return function(_0x57e8b7){logger[_0x21cd('0x22')]('data',JSON['stringify'](_0x57e8b7));if(_0x3ed45e['MailAccount']&&_0x3ed45e[_0x21cd('0xb')]['Smtp']&&!_[_0x21cd('0x2b')](_0x3ed45e[_0x21cd('0x11')])){setTimeout(handleSendEmail(_0x3ed45e,_0x57e8b7),0x3c*0x3e8);}};}function handleJob(_0x77b94f){return function(){try{if(_[_0x21cd('0x2b')](_0x77b94f['subtractNumber'])){return logger[_0x21cd('0x22')](_0x21cd('0x2c'));}if(_[_0x21cd('0x2b')](_0x77b94f[_0x21cd('0x2d')])){return logger[_0x21cd('0x22')](_0x21cd('0x2e'));}var _0x1cafe1={'startDate':moment()[_0x21cd('0x2f')](_0x77b94f[_0x21cd('0x13')],_0x77b94f[_0x21cd('0x2d')])[_0x21cd('0xd')]('YYYY-MM-DD\x20HH:mm:ss'),'endDate':moment()[_0x21cd('0xd')](_0x21cd('0x30')),'type':_0x21cd('0x31'),'output':_0x77b94f[_0x21cd('0x32')],'name':_0x77b94f[_0x21cd('0xf')]};if(!_['isNil'](_0x77b94f[_0x21cd('0x33')])){logger['info']('exec\x20defaul\x20report\x20id:%s',_0x77b94f[_0x21cd('0x33')]);return analyticDefaultReportController[_0x21cd('0x34')]({'id':_0x77b94f[_0x21cd('0x33')]},_0x1cafe1)[_0x21cd('0x35')](handleResult(_0x77b94f))['catch'](handleError());}if(!_[_0x21cd('0x2b')](_0x77b94f['CustomReportId'])){logger[_0x21cd('0x22')](_0x21cd('0x36'),_0x77b94f[_0x21cd('0x37')]);return analyticCustomReportController[_0x21cd('0x34')]({'id':_0x77b94f[_0x21cd('0x37')]},_0x1cafe1)[_0x21cd('0x35')](handleResult(_0x77b94f))['catch'](handleError());}}catch(_0x55ffa2){logger[_0x21cd('0x26')](JSON['stringify'](_0x55ffa2));}return logger[_0x21cd('0x22')](_0x21cd('0x38'));};}function getJobs(_0x30b968){var _0x562ca5={};if(_0x30b968){_0x562ca5['id']=_0x30b968;}return db[_0x21cd('0x39')][_0x21cd('0x3a')]({'where':_0x562ca5,'include':[{'model':db[_0x21cd('0xb')],'attributes':['id','name',_0x21cd('0x11')],'include':[{'model':db[_0x21cd('0x3b')],'as':_0x21cd('0x3c'),'include':[{'model':db[_0x21cd('0x3d')],'as':_0x21cd('0x3d')}]}]}]})[_0x21cd('0x35')](function(_0x53c03e){var _0x29b20=_[_0x21cd('0x3e')](manager[_0x21cd('0x3f')]);var _0xf45851=_['map'](_0x53c03e,function(_0x52b070){return _0x52b070['id'][_0x21cd('0x40')]();});var _0x10775f=_[_0x21cd('0x41')](_0x53c03e,function(_0x597335){return _0x597335['id'][_0x21cd('0x40')]();});var _0x58db2e=_0x30b968?_0xf45851:_[_0x21cd('0x42')](_0xf45851,_0x29b20);var _0x538013=_[_0x21cd('0x43')](_0xf45851,_0x29b20);var _0x46df90=_[_0x21cd('0x42')](_0x29b20,_0xf45851);var _0x3f200c;var _0x5d994c;for(_0x3f200c=0x0;_0x3f200c<_0x46df90[_0x21cd('0x44')]&&!_0x30b968;_0x3f200c+=0x1){_0x5d994c=_0x46df90[_0x3f200c][_0x21cd('0x40')]();if(manager[_0x21cd('0x45')](_0x5d994c)){manager['stop'](_0x5d994c);manager[_0x21cd('0x46')](_0x5d994c);logger[_0x21cd('0x22')](_0x21cd('0x47'),_0x5d994c);}}logger[_0x21cd('0x22')](_0x21cd('0x48'),JSON[_0x21cd('0x28')](_0x58db2e));for(_0x3f200c=0x0;_0x3f200c<_0x58db2e[_0x21cd('0x44')];_0x3f200c+=0x1){_0x5d994c=_0x58db2e[_0x3f200c][_0x21cd('0x40')]();logger[_0x21cd('0x22')](_0x21cd('0x49'),_0x5d994c);if(_0x30b968){logger[_0x21cd('0x22')](_0x21cd('0x4a'),_0x30b968);logger[_0x21cd('0x22')](JSON['stringify'](_0x10775f[_0x5d994c]));BPromise[_0x21cd('0x4b')]()[_0x21cd('0x35')](handleJob(_0x10775f[_0x5d994c]));logger[_0x21cd('0x22')]('run\x20job',_0x10775f[_0x5d994c][_0x21cd('0xf')],_0x10775f[_0x5d994c][_0x21cd('0x4c')]);}else if(_0x10775f[_0x5d994c][_0x21cd('0x4c')]&&_0x10775f[_0x5d994c]['active']&&moment()[_0x21cd('0x4d')](_0x10775f[_0x5d994c][_0x21cd('0x4e')],_0x10775f[_0x5d994c][_0x21cd('0x4f')])){manager[_0x21cd('0x50')](_0x5d994c,_0x10775f[_0x5d994c][_0x21cd('0x4c')],handleJob(_0x10775f[_0x5d994c]));manager[_0x21cd('0x51')](_0x5d994c);logger[_0x21cd('0x22')]('add\x20cron',_0x10775f[_0x5d994c][_0x21cd('0xf')],_0x10775f[_0x5d994c][_0x21cd('0x4c')]);}else if(manager[_0x21cd('0x45')](_0x5d994c)){manager['stop'](_0x5d994c);manager[_0x21cd('0x46')](_0x5d994c);logger[_0x21cd('0x22')](_0x21cd('0x52'),_0x10775f[_0x5d994c][_0x21cd('0xf')],_0x10775f[_0x5d994c]['cron']);}}for(_0x3f200c=0x0,_0x5d994c;_0x3f200c<_0x538013[_0x21cd('0x44')]&&!_0x30b968;_0x3f200c+=0x1){_0x5d994c=_0x538013[_0x3f200c][_0x21cd('0x40')]();if(manager['exists'](_0x5d994c)){if(_0x10775f[_0x5d994c][_0x21cd('0x4c')]&&_0x10775f[_0x5d994c]['active']&&moment()[_0x21cd('0x4d')](_0x10775f[_0x5d994c]['startAt'],_0x10775f[_0x5d994c][_0x21cd('0x4f')])){manager['update'](_0x5d994c,_0x10775f[_0x5d994c][_0x21cd('0x4c')],handleJob(_0x10775f[_0x5d994c]));logger[_0x21cd('0x22')]('update\x20cron',_0x10775f[_0x5d994c][_0x21cd('0xf')],_0x10775f[_0x5d994c][_0x21cd('0x4c')]);}else{manager[_0x21cd('0x53')](_0x5d994c);manager['deleteJob'](_0x5d994c);logger[_0x21cd('0x22')](_0x21cd('0x52'),_0x10775f[_0x5d994c][_0x21cd('0xf')],_0x10775f[_0x5d994c][_0x21cd('0x4c')]);}}}})[_0x21cd('0x2a')](function(_0x1d0834){logger[_0x21cd('0x26')](JSON[_0x21cd('0x28')](_0x1d0834));});}exports[_0x21cd('0x54')]=function(_0x17d89f){return getJobs(_0x17d89f);};exports[_0x21cd('0x51')]=function(){setInterval(function(){return getJobs();},0x3c*0x3e8);return getJobs();}; \ No newline at end of file +var _0x5a2b=['isBetween','startAt','endAt','start','add\x20cron','stop\x20cron','active','update','update\x20cron','run','util','moment','cron-job-manager','jayson/promise','bluebird','../logger','schedule','../../mysqldb','../../api/analyticCustomReport/analyticCustomReport.controller','../../api/analyticDefaultReport/analyticDefaultReport.controller','client','info','Try\x20to\x20send\x20a\x20mail\x20to','email','MailAccount','format','name','Smtp','user','bcc','Report\x20%s\x20last\x20%s\x20%s','subtractUnit','../../files/reports','savename','%s.%s','extname','zip','join','existsSync','status','Sent','message','text','attachments','Report\x20empty\x0aThis\x20is\x20an\x20automatically\x20generated\x20email\x20–\x20please\x20do\x20not\x20reply\x20to\x20this\x20email.\x0a\x0a','sendIfEmpty','empty\x20file,\x20email\x20not\x20sent','then','error','error\x20mail','stringify','email\x20sent','catch','data','isNil','subtractNumber','subtractNumber\x20null\x20or\x20undefined','subtractUnit\x20null\x20or\x20undefined','scheduled','output','DefaultReportId','exec\x20defaul\x20report\x20id:%s','runReport','CustomReportId','no\x20report\x20id','Schedule','MailServerOut','CloudProvider','keys','jobs','map','toString','keyBy','difference','intersection','exists','stop','deleteJob','toRun','length','index','my\x20id','resolve','run\x20job','cron'];(function(_0x24061a,_0x1c9f4d){var _0x82054e=function(_0x2ec346){while(--_0x2ec346){_0x24061a['push'](_0x24061a['shift']());}};_0x82054e(++_0x1c9f4d);}(_0x5a2b,0x1b3));var _0xb5a2=function(_0x472a9b,_0x8dfe68){_0x472a9b=_0x472a9b-0x0;var _0x44038e=_0x5a2b[_0x472a9b];return _0x44038e;};'use strict';var fs=require('fs');var util=require(_0xb5a2('0x0'));var path=require('path');var _=require('lodash');var moment=require(_0xb5a2('0x1'));var CronJobManager=require(_0xb5a2('0x2'));var jayson=require(_0xb5a2('0x3'));var BPromise=require(_0xb5a2('0x4'));var logger=require(_0xb5a2('0x5'))(_0xb5a2('0x6'));var db=require(_0xb5a2('0x7'))['db'];var analyticCustomReportController=require(_0xb5a2('0x8'));var analyticDefaultReportController=require(_0xb5a2('0x9'));var client=jayson[_0xb5a2('0xa')]['http']({'port':0x232b});var manager=new CronJobManager();function handleSendEmail(_0x1829f5,_0x420fa7){return function(){logger[_0xb5a2('0xb')](_0xb5a2('0xc'),_0x1829f5[_0xb5a2('0xd')]);var _0x54c2a0=!![];var _0x14d6e5=_0x1829f5[_0xb5a2('0xe')]['getSmtpOptions']();var _0x4d3f76={'account':_0x14d6e5,'message':{'from':util[_0xb5a2('0xf')]('\x22%s\x22\x20<%s>',_0x1829f5[_0xb5a2('0xe')][_0xb5a2('0x10')],_0x1829f5['MailAccount'][_0xb5a2('0xd')]||_0x1829f5[_0xb5a2('0xe')][_0xb5a2('0x11')][_0xb5a2('0x12')]),'to':_0x1829f5[_0xb5a2('0xd')],'cc':_0x1829f5['cc'],'bcc':_0x1829f5[_0xb5a2('0x13')],'subject':util[_0xb5a2('0xf')](_0xb5a2('0x14'),_0x420fa7['name'],_0x1829f5['subtractNumber'],_0x1829f5[_0xb5a2('0x15')])}};var _0x64b3c1=path['join'](__dirname,_0xb5a2('0x16'));var _0x4d5a17=_0x420fa7[_0xb5a2('0x17')];var _0x5666d0=util[_0xb5a2('0xf')](_0xb5a2('0x18'),path['basename'](_0x420fa7['savename'],path[_0xb5a2('0x19')](_0x420fa7[_0xb5a2('0x17')])),_0xb5a2('0x1a'));var _0x3d6496=path[_0xb5a2('0x1b')](_0x64b3c1,_0x4d5a17);var _0x2f6284=path['join'](_0x64b3c1,_0x5666d0);if(fs[_0xb5a2('0x1c')](_0x3d6496)){_0x420fa7[_0xb5a2('0x1d')]=_0xb5a2('0x1e');_0x4d3f76[_0xb5a2('0x1f')]['attachments']=[{'filename':_0x4d5a17,'path':_0x3d6496}];_0x4d3f76['message'][_0xb5a2('0x20')]=util[_0xb5a2('0xf')]('Info\x20report:\x0a%s\x0aPlease\x20see\x20the\x20attachments\x0aThis\x20is\x20an\x20automatically\x20generated\x20email\x20–\x20please\x20do\x20not\x20reply\x20to\x20it.\x0a\x0a',JSON['stringify'](_0x420fa7,null,0x2));}else if(fs['existsSync'](_0x2f6284)){_0x420fa7['status']=_0xb5a2('0x1e');_0x4d3f76[_0xb5a2('0x1f')][_0xb5a2('0x21')]=[{'filename':_0x5666d0,'path':_0x2f6284}];}else{_0x4d3f76[_0xb5a2('0x1f')][_0xb5a2('0x20')]=_0xb5a2('0x22');if(!_0x1829f5[_0xb5a2('0x23')]){_0x54c2a0=![];logger[_0xb5a2('0xb')](_0xb5a2('0x24'));}}if(_0x54c2a0){return client['request']('SendMail',_0x4d3f76)[_0xb5a2('0x25')](function(_0x2e9ed7){if(_0x2e9ed7[_0xb5a2('0x26')]){return logger[_0xb5a2('0x26')](_0xb5a2('0x27'),JSON[_0xb5a2('0x28')](_0x2e9ed7));}return logger[_0xb5a2('0xb')](_0xb5a2('0x29'));})[_0xb5a2('0x2a')](function(_0x101083){return logger[_0xb5a2('0x26')](_0xb5a2('0x27'),JSON[_0xb5a2('0x28')](_0x101083));});}};}function handleError(){return function(_0x5b5bf2){return logger[_0xb5a2('0x26')](JSON['stringify'](_0x5b5bf2));};}function handleResult(_0x4ed94b){return function(_0x99d295){logger[_0xb5a2('0xb')](_0xb5a2('0x2b'),JSON[_0xb5a2('0x28')](_0x99d295));if(_0x4ed94b[_0xb5a2('0xe')]&&_0x4ed94b[_0xb5a2('0xe')][_0xb5a2('0x11')]&&!_[_0xb5a2('0x2c')](_0x4ed94b[_0xb5a2('0xd')])){setTimeout(handleSendEmail(_0x4ed94b,_0x99d295),0x3c*0x3e8);}};}function handleJob(_0x49fdf9){return function(){try{if(_[_0xb5a2('0x2c')](_0x49fdf9[_0xb5a2('0x2d')])){return logger[_0xb5a2('0xb')](_0xb5a2('0x2e'));}if(_[_0xb5a2('0x2c')](_0x49fdf9[_0xb5a2('0x15')])){return logger['info'](_0xb5a2('0x2f'));}var _0x4af16a={'startDate':moment()['subtract'](_0x49fdf9[_0xb5a2('0x2d')],_0x49fdf9['subtractUnit'])[_0xb5a2('0xf')]('YYYY-MM-DD\x20HH:mm:ss'),'endDate':moment()[_0xb5a2('0xf')]('YYYY-MM-DD\x20HH:mm:ss'),'type':_0xb5a2('0x30'),'output':_0x49fdf9[_0xb5a2('0x31')],'name':_0x49fdf9['name']};if(!_[_0xb5a2('0x2c')](_0x49fdf9[_0xb5a2('0x32')])){logger[_0xb5a2('0xb')](_0xb5a2('0x33'),_0x49fdf9['DefaultReportId']);return analyticDefaultReportController[_0xb5a2('0x34')]({'id':_0x49fdf9['DefaultReportId']},_0x4af16a)[_0xb5a2('0x25')](handleResult(_0x49fdf9))[_0xb5a2('0x2a')](handleError());}if(!_[_0xb5a2('0x2c')](_0x49fdf9[_0xb5a2('0x35')])){logger[_0xb5a2('0xb')]('exec\x20custom\x20report\x20id:%s',_0x49fdf9[_0xb5a2('0x35')]);return analyticCustomReportController[_0xb5a2('0x34')]({'id':_0x49fdf9[_0xb5a2('0x35')]},_0x4af16a)[_0xb5a2('0x25')](handleResult(_0x49fdf9))[_0xb5a2('0x2a')](handleError());}}catch(_0x5e079f){logger[_0xb5a2('0x26')](JSON[_0xb5a2('0x28')](_0x5e079f));}return logger[_0xb5a2('0xb')](_0xb5a2('0x36'));};}function getJobs(_0x75b066){var _0x83fa4f={};if(_0x75b066){_0x83fa4f['id']=_0x75b066;}return db[_0xb5a2('0x37')]['findAll']({'where':_0x83fa4f,'include':[{'model':db[_0xb5a2('0xe')],'attributes':['id',_0xb5a2('0x10'),_0xb5a2('0xd')],'include':[{'model':db[_0xb5a2('0x38')],'as':_0xb5a2('0x11'),'include':[{'model':db[_0xb5a2('0x39')],'as':'CloudProvider'}]}]}]})[_0xb5a2('0x25')](function(_0x27c13c){var _0x1af951=_[_0xb5a2('0x3a')](manager[_0xb5a2('0x3b')]);var _0x49c119=_[_0xb5a2('0x3c')](_0x27c13c,function(_0x5966e4){return _0x5966e4['id'][_0xb5a2('0x3d')]();});var _0x4a6de3=_[_0xb5a2('0x3e')](_0x27c13c,function(_0x398bd5){return _0x398bd5['id'][_0xb5a2('0x3d')]();});var _0x10cf97=_0x75b066?_0x49c119:_[_0xb5a2('0x3f')](_0x49c119,_0x1af951);var _0x36d1eb=_[_0xb5a2('0x40')](_0x49c119,_0x1af951);var _0x3addd5=_['difference'](_0x1af951,_0x49c119);var _0x39f353;var _0x1181ea;for(_0x39f353=0x0;_0x39f353<_0x3addd5['length']&&!_0x75b066;_0x39f353+=0x1){_0x1181ea=_0x3addd5[_0x39f353][_0xb5a2('0x3d')]();if(manager[_0xb5a2('0x41')](_0x1181ea)){manager[_0xb5a2('0x42')](_0x1181ea);manager[_0xb5a2('0x43')](_0x1181ea);logger[_0xb5a2('0xb')]('delete\x20cron',_0x1181ea);}}logger[_0xb5a2('0xb')](_0xb5a2('0x44'),JSON[_0xb5a2('0x28')](_0x10cf97));for(_0x39f353=0x0;_0x39f353<_0x10cf97[_0xb5a2('0x45')];_0x39f353+=0x1){_0x1181ea=_0x10cf97[_0x39f353][_0xb5a2('0x3d')]();logger[_0xb5a2('0xb')](_0xb5a2('0x46'),_0x1181ea);if(_0x75b066){logger[_0xb5a2('0xb')](_0xb5a2('0x47'),_0x75b066);logger[_0xb5a2('0xb')](JSON[_0xb5a2('0x28')](_0x4a6de3[_0x1181ea]));BPromise[_0xb5a2('0x48')]()['then'](handleJob(_0x4a6de3[_0x1181ea]));logger[_0xb5a2('0xb')](_0xb5a2('0x49'),_0x4a6de3[_0x1181ea][_0xb5a2('0x10')],_0x4a6de3[_0x1181ea][_0xb5a2('0x4a')]);}else if(_0x4a6de3[_0x1181ea]['cron']&&_0x4a6de3[_0x1181ea]['active']&&moment()[_0xb5a2('0x4b')](_0x4a6de3[_0x1181ea][_0xb5a2('0x4c')],_0x4a6de3[_0x1181ea][_0xb5a2('0x4d')])){manager['add'](_0x1181ea,_0x4a6de3[_0x1181ea][_0xb5a2('0x4a')],handleJob(_0x4a6de3[_0x1181ea]));manager[_0xb5a2('0x4e')](_0x1181ea);logger[_0xb5a2('0xb')](_0xb5a2('0x4f'),_0x4a6de3[_0x1181ea][_0xb5a2('0x10')],_0x4a6de3[_0x1181ea][_0xb5a2('0x4a')]);}else if(manager[_0xb5a2('0x41')](_0x1181ea)){manager[_0xb5a2('0x42')](_0x1181ea);manager[_0xb5a2('0x43')](_0x1181ea);logger['info'](_0xb5a2('0x50'),_0x4a6de3[_0x1181ea][_0xb5a2('0x10')],_0x4a6de3[_0x1181ea][_0xb5a2('0x4a')]);}}for(_0x39f353=0x0,_0x1181ea;_0x39f353<_0x36d1eb[_0xb5a2('0x45')]&&!_0x75b066;_0x39f353+=0x1){_0x1181ea=_0x36d1eb[_0x39f353]['toString']();if(manager[_0xb5a2('0x41')](_0x1181ea)){if(_0x4a6de3[_0x1181ea]['cron']&&_0x4a6de3[_0x1181ea][_0xb5a2('0x51')]&&moment()[_0xb5a2('0x4b')](_0x4a6de3[_0x1181ea][_0xb5a2('0x4c')],_0x4a6de3[_0x1181ea][_0xb5a2('0x4d')])){manager[_0xb5a2('0x52')](_0x1181ea,_0x4a6de3[_0x1181ea]['cron'],handleJob(_0x4a6de3[_0x1181ea]));logger[_0xb5a2('0xb')](_0xb5a2('0x53'),_0x4a6de3[_0x1181ea][_0xb5a2('0x10')],_0x4a6de3[_0x1181ea][_0xb5a2('0x4a')]);}else{manager[_0xb5a2('0x42')](_0x1181ea);manager[_0xb5a2('0x43')](_0x1181ea);logger['info'](_0xb5a2('0x50'),_0x4a6de3[_0x1181ea][_0xb5a2('0x10')],_0x4a6de3[_0x1181ea][_0xb5a2('0x4a')]);}}}})[_0xb5a2('0x2a')](function(_0x2797cf){logger[_0xb5a2('0x26')](JSON[_0xb5a2('0x28')](_0x2797cf));});}exports[_0xb5a2('0x54')]=function(_0x29792d){return getJobs(_0x29792d);};exports[_0xb5a2('0x4e')]=function(){setInterval(function(){return getJobs();},0x3c*0x3e8);return getJobs();}; \ No newline at end of file diff --git a/server/config/schedule/transcribe.js b/server/config/schedule/transcribe.js index 101b1f2..ea785ee 100644 --- a/server/config/schedule/transcribe.js +++ b/server/config/schedule/transcribe.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x457b=['data1','data2','transcribeRegion','then','format','[RECORDING:%d]\x20Status\x20of\x20transcript\x20job\x20(%s):\x20%s','TranscriptionJob','TranscriptionJobStatus','COMPLETED','Transcript','TranscriptFileUri','[RECORDING:%d]\x20Get\x20transcript','[RECORDING:%d]\x20Transcript\x20downloaded','results','length','fileText','transcripts','transcript','update','[RECORDING:%d]\x20Voice\x20Recording\x20entry\x20updated','Sequelize','ValidationError','sentiment','sentimentAccountId','sentimentRegion','language','bucket','Transcript\x20not\x20available','CloudProvider','findOne','Cloud\x20Provider\x20not\x20available','Cloud\x20Provider\x20not\x20configured','[RECORDING:%d]\x20Requesting\x20sentiment\x20analysis','[RECORDING:%d]\x20Sentiment\x20Analysis\x20available','Positive','Negative','SentimentScore','Mixed','Neutral','FAILED','FailureReason','[RECORDING:%d]\x20Transcript\x20Job\x20status\x20not\x20managed','Sentiment\x20Analysis\x20not\x20requested','Sentiment','catch','name','SequelizeValidationError','error','inspect','VoiceRecording','findAll','No\x20transcribe\x20job\x20to\x20check','Setting','Settings\x20not\x20available','transcribeAccountId','Transcribe\x20not\x20configured','forEach','start','lodash','aws-sdk','util','bluebird','../../mysqldb','../../config/logger','transcribe','TranscribeService','getTranscriptionJob','Comprehend','detectSentiment','substring','info','transcribeName'];(function(_0xfae23b,_0x2be4ba){var _0x200640=function(_0x4ae258){while(--_0x4ae258){_0xfae23b['push'](_0xfae23b['shift']());}};_0x200640(++_0x2be4ba);}(_0x457b,0xca));var _0xb457=function(_0x46f7fe,_0x40ecd3){_0x46f7fe=_0x46f7fe-0x0;var _0x276f00=_0x457b[_0x46f7fe];return _0x276f00;};var _=require(_0xb457('0x0'));var AWS=require(_0xb457('0x1'));var rp=require('request-promise');var util=require(_0xb457('0x2'));var BPromise=require(_0xb457('0x3'));var db=require(_0xb457('0x4'))['db'];var logger=require(_0xb457('0x5'))(_0xb457('0x6'));function getTranscriptionJob(_0x54eddd,_0x156af3,_0x100f37,_0x23a9db){return new Promise(function(_0x3823c7,_0x3cefc3){var _0x523e05=new AWS[(_0xb457('0x7'))]({'accessKeyId':_0x156af3,'secretAccessKey':_0x54eddd,'region':_0x100f37});_0x523e05[_0xb457('0x8')]({'TranscriptionJobName':_0x23a9db},function(_0x2182d6,_0x48388c){if(_0x2182d6){return _0x3cefc3(_0x2182d6);}else{return _0x3823c7(_0x48388c);}});});}function sentiment(_0x5bfe2c,_0x24374,_0x3baee8,_0x537ec4,_0x19afe8){return new Promise(function(_0x1cc258,_0x810aed){var _0x485de2=new AWS[(_0xb457('0x9'))]({'accessKeyId':_0x24374,'secretAccessKey':_0x5bfe2c,'region':_0x3baee8});_0x485de2[_0xb457('0xa')]({'Text':_0x537ec4,'LanguageCode':_0x19afe8[_0xb457('0xb')](0x0,0x2)},function(_0x78d980,_0x58609){if(_0x78d980){return _0x810aed(_0x78d980);}else{return _0x1cc258(_0x58609);}});});}function checkTranscribeJob(_0x48eec3,_0x595609,_0x1c9f97){var _0x992b23;return new BPromise(function(_0x3e207c,_0x469be3){logger[_0xb457('0xc')](util['format']('[RECORDING:%d]\x20Get\x20status\x20for\x20transcript\x20job\x20(%s)',_0x48eec3['id'],_0x48eec3[_0xb457('0xd')]));return getTranscriptionJob(_0x1c9f97[_0xb457('0xe')],_0x1c9f97[_0xb457('0xf')],_0x595609[_0xb457('0x10')],_0x48eec3['transcribeName'])[_0xb457('0x11')](function(_0xbbfda5){logger[_0xb457('0xc')](util[_0xb457('0x12')](_0xb457('0x13'),_0x48eec3['id'],_0x48eec3[_0xb457('0xd')],_0xbbfda5[_0xb457('0x14')][_0xb457('0x15')]));if(!_0x48eec3['fileText']){switch(_0xbbfda5[_0xb457('0x14')][_0xb457('0x15')]){case _0xb457('0x16'):var _0x554c8a={'transcribeStatus':_0xbbfda5['TranscriptionJob'][_0xb457('0x15')],'fileUri':_0xbbfda5[_0xb457('0x14')][_0xb457('0x17')][_0xb457('0x18')]};logger[_0xb457('0xc')](util[_0xb457('0x12')](_0xb457('0x19'),_0x48eec3['id']));return rp({'uri':_0xbbfda5['TranscriptionJob']['Transcript'][_0xb457('0x18')],'json':!![]})[_0xb457('0x11')](function(_0x1f85ab){logger['info'](util[_0xb457('0x12')](_0xb457('0x1a'),_0x48eec3['id']));if(_0x1f85ab&&_0x1f85ab[_0xb457('0x1b')]&&_0x1f85ab['results']['transcripts']&&_0x1f85ab[_0xb457('0x1b')]['transcripts'][_0xb457('0x1c')]){_0x554c8a[_0xb457('0x1d')]='';for(var _0x179ef1=0x0;_0x179ef1<_0x1f85ab[_0xb457('0x1b')]['transcripts'][_0xb457('0x1c')];_0x179ef1++){_0x554c8a[_0xb457('0x1d')]+=_0x1f85ab['results'][_0xb457('0x1e')][_0x179ef1][_0xb457('0x1f')]+'';}}return _0x48eec3[_0xb457('0x20')](_0x554c8a);})[_0xb457('0x11')](function(){logger[_0xb457('0xc')](util[_0xb457('0x12')](_0xb457('0x21'),_0x48eec3['id']));if(!_0x48eec3['tempSentiment']){throw new db[(_0xb457('0x22'))][(_0xb457('0x23'))]('Sentiment\x20Analysis\x20not\x20requested');}if(!_0x595609[_0xb457('0x24')]||!_0x595609[_0xb457('0x25')]||!_0x595609[_0xb457('0x26')]||!_0x595609[_0xb457('0x27')]||!_0x595609[_0xb457('0x28')]){throw new db['Sequelize'][(_0xb457('0x23'))]('Sentiment\x20Analysis\x20not\x20configured');}if(!_0x554c8a[_0xb457('0x1d')]){throw new Error(_0xb457('0x29'));}if(_0x595609['sentimentAccountId']===_0x1c9f97['id']){return _0x1c9f97;}else{return db[_0xb457('0x2a')][_0xb457('0x2b')]({'where':{'id':_settings['sentimentAccountId']}});}})[_0xb457('0x11')](function(_0x5ef0fe){if(!_0x5ef0fe){throw new db[(_0xb457('0x22'))]['ValidationError'](_0xb457('0x2c'));}if(!_0x5ef0fe[_0xb457('0xe')]||!_0x5ef0fe['data2']){throw new db[(_0xb457('0x22'))][(_0xb457('0x23'))](_0xb457('0x2d'));}_0x992b23=_0x5ef0fe;logger[_0xb457('0xc')](util['format'](_0xb457('0x2e'),_0x48eec3['id']));return sentiment(_0x992b23[_0xb457('0xe')],_0x992b23[_0xb457('0xf')],_0x595609[_0xb457('0x26')],_0x554c8a[_0xb457('0x1d')],_0x595609[_0xb457('0x27')]);})['then'](function(_0x2d72ca){logger[_0xb457('0xc')](util[_0xb457('0x12')](_0xb457('0x2f'),_0x48eec3['id']));return _0x48eec3[_0xb457('0x20')]({'sentiment':_0x2d72ca['Sentiment'],'sPositive':_0x2d72ca['SentimentScore'][_0xb457('0x30')],'sNegative':_0x2d72ca['SentimentScore'][_0xb457('0x31')],'sMixed':_0x2d72ca[_0xb457('0x32')][_0xb457('0x33')],'sNeutral':_0x2d72ca[_0xb457('0x32')][_0xb457('0x34')]});})[_0xb457('0x11')](function(){logger[_0xb457('0xc')](util['format']('[RECORDING:%d]\x20Voice\x20Recording\x20entry\x20updated',_0x48eec3['id']));_0x3e207c();});case _0xb457('0x35'):return _0x48eec3[_0xb457('0x20')]({'transcribeStatus':'FAILED','failureReason':_0xbbfda5[_0xb457('0x14')][_0xb457('0x36')]})[_0xb457('0x11')](function(){logger[_0xb457('0xc')](util[_0xb457('0x12')](_0xb457('0x21'),_0x48eec3['id']));_0x3e207c();});default:logger[_0xb457('0xc')](util[_0xb457('0x12')](_0xb457('0x37'),_0x48eec3['id']));break;}}else{return BPromise['resolve']()[_0xb457('0x11')](function(){if(!_0x48eec3['tempSentiment']){throw new db[(_0xb457('0x22'))]['ValidationError'](_0xb457('0x38'));}if(!_0x595609[_0xb457('0x24')]||!_0x595609[_0xb457('0x25')]||!_0x595609[_0xb457('0x26')]||!_0x595609[_0xb457('0x27')]||!_0x595609[_0xb457('0x28')]){throw new db[(_0xb457('0x22'))][(_0xb457('0x23'))]('Sentiment\x20Analysis\x20not\x20configured');}if(!_0x48eec3['fileText']){throw new Error(_0xb457('0x29'));}if(_0x595609[_0xb457('0x25')]===_0x1c9f97['id']){return _0x1c9f97;}else{return db[_0xb457('0x2a')][_0xb457('0x2b')]({'where':{'id':_settings[_0xb457('0x25')]}});}})[_0xb457('0x11')](function(_0x3ee398){if(!_0x3ee398){throw new db[(_0xb457('0x22'))]['ValidationError'](_0xb457('0x2c'));}if(!_0x3ee398['data1']||!_0x3ee398[_0xb457('0xf')]){throw new db[(_0xb457('0x22'))][(_0xb457('0x23'))](_0xb457('0x2d'));}_0x992b23=_0x3ee398;logger['info'](util[_0xb457('0x12')](_0xb457('0x2e'),_0x48eec3['id']));return sentiment(_0x992b23['data1'],_0x992b23['data2'],_0x595609[_0xb457('0x26')],_0x48eec3[_0xb457('0x1d')],_0x595609['language']);})[_0xb457('0x11')](function(_0x26424){logger[_0xb457('0xc')](util[_0xb457('0x12')]('[RECORDING:%d]\x20Sentiment\x20Analysis\x20available',_0x48eec3['id']));return _0x48eec3[_0xb457('0x20')]({'sentiment':_0x26424[_0xb457('0x39')],'sPositive':_0x26424[_0xb457('0x32')]['Positive'],'sNegative':_0x26424[_0xb457('0x32')][_0xb457('0x31')],'sMixed':_0x26424[_0xb457('0x32')][_0xb457('0x33')],'sNeutral':_0x26424['SentimentScore'][_0xb457('0x34')],'transcribeStatus':_0xb457('0x16')});})[_0xb457('0x11')](function(){logger['info'](util[_0xb457('0x12')](_0xb457('0x21'),_0x48eec3['id']));_0x3e207c();});}})[_0xb457('0x3a')](function(_0xc050ec){if(_0xc050ec){if(!_0xc050ec[_0xb457('0x3b')]||_0xc050ec[_0xb457('0x3b')]!==_0xb457('0x3c')){logger[_0xb457('0x3d')](util['format']('[RECORDING:%d]\x20Error\x20running\x20Transcribe\x20&\x20Sentiment\x20Analysis',_0x48eec3['id']),util[_0xb457('0x3e')](_0xc050ec,{'showHidden':![],'depth':null}));}}_0x3e207c();});});}function checkTranscribe(){var _0x2359e3;var _0x5ee561;var _0xaa7254;return db[_0xb457('0x3f')][_0xb457('0x40')]({'where':{'transcribeStatus':'IN_PROGRESS'}})[_0xb457('0x11')](function(_0x40b496){if(!_0x40b496||!_0x40b496['length']){throw new db[(_0xb457('0x22'))][(_0xb457('0x23'))](_0xb457('0x41'));}_0x2359e3=_0x40b496;return db[_0xb457('0x42')][_0xb457('0x2b')]({'where':{'id':0x1}});})[_0xb457('0x11')](function(_0x132860){if(!_0x132860){throw new db[(_0xb457('0x22'))][(_0xb457('0x23'))](_0xb457('0x43'));}_0x5ee561=_0x132860;if(!_0x5ee561['transcribe']||!_0x5ee561[_0xb457('0x44')]||!_0x5ee561['transcribeRegion']||!_0x5ee561[_0xb457('0x27')]||!_0x5ee561['bucket']){throw new db['Sequelize'][(_0xb457('0x23'))](_0xb457('0x45'));}return db['CloudProvider'][_0xb457('0x2b')]({'where':{'id':_0x5ee561[_0xb457('0x44')]}});})[_0xb457('0x11')](function(_0x396109){if(!_0x396109){throw new db['Sequelize'][(_0xb457('0x23'))]('Cloud\x20Provider\x20not\x20available');}if(!_0x396109[_0xb457('0xe')]||!_0x396109[_0xb457('0xf')]){throw new db['Sequelize'][(_0xb457('0x23'))](_0xb457('0x2d'));}_0xaa7254=_0x396109;var _0x26d97d=[];_0x2359e3[_0xb457('0x46')](function(_0x137ba4){_0x26d97d['push'](checkTranscribeJob(_0x137ba4,_0x5ee561,_0xaa7254));});return BPromise['all'](_0x26d97d);})['catch'](function(_0x8bcbd1){if(_0x8bcbd1){if(!_0x8bcbd1[_0xb457('0x3b')]||_0x8bcbd1[_0xb457('0x3b')]!==_0xb457('0x3c')){logger[_0xb457('0x3d')](util[_0xb457('0x3e')](_0x8bcbd1,{'showHidden':![],'depth':null}));}}});}exports[_0xb457('0x47')]=function(){setInterval(function(){return checkTranscribe();},0x3c*0x3e8);return checkTranscribe();}; \ No newline at end of file +var _0xf17f=['TranscribeService','getTranscriptionJob','Comprehend','detectSentiment','substring','format','[RECORDING:%d]\x20Get\x20status\x20for\x20transcript\x20job\x20(%s)','transcribeRegion','then','info','[RECORDING:%d]\x20Status\x20of\x20transcript\x20job\x20(%s):\x20%s','TranscriptionJob','TranscriptionJobStatus','fileText','COMPLETED','[RECORDING:%d]\x20Get\x20transcript','Transcript','[RECORDING:%d]\x20Transcript\x20downloaded','results','transcripts','length','update','[RECORDING:%d]\x20Voice\x20Recording\x20entry\x20updated','tempSentiment','Sequelize','ValidationError','Sentiment\x20Analysis\x20not\x20requested','sentiment','sentimentAccountId','sentimentRegion','language','bucket','Sentiment\x20Analysis\x20not\x20configured','Transcript\x20not\x20available','CloudProvider','findOne','Cloud\x20Provider\x20not\x20available','data1','data2','Cloud\x20Provider\x20not\x20configured','Sentiment','Positive','SentimentScore','Negative','Neutral','resolve','[RECORDING:%d]\x20Requesting\x20sentiment\x20analysis','[RECORDING:%d]\x20Sentiment\x20Analysis\x20available','catch','SequelizeValidationError','error','[RECORDING:%d]\x20Error\x20running\x20Transcribe\x20&\x20Sentiment\x20Analysis','inspect','VoiceRecording','findAll','IN_PROGRESS','Setting','Settings\x20not\x20available','Transcribe\x20not\x20configured','transcribeAccountId','forEach','push','all','name','start','lodash','aws-sdk','request-promise','bluebird','transcribe'];(function(_0x1b8dd8,_0x102322){var _0x1365fa=function(_0x3b9893){while(--_0x3b9893){_0x1b8dd8['push'](_0x1b8dd8['shift']());}};_0x1365fa(++_0x102322);}(_0xf17f,0x113));var _0xff17=function(_0x31b2d3,_0x2a787){_0x31b2d3=_0x31b2d3-0x0;var _0x583cfc=_0xf17f[_0x31b2d3];return _0x583cfc;};var _=require(_0xff17('0x0'));var AWS=require(_0xff17('0x1'));var rp=require(_0xff17('0x2'));var util=require('util');var BPromise=require(_0xff17('0x3'));var db=require('../../mysqldb')['db'];var logger=require('../../config/logger')(_0xff17('0x4'));function getTranscriptionJob(_0x33cd78,_0x103662,_0x112477,_0x5700e7){return new Promise(function(_0x1d3d31,_0xb22fe2){var _0x53788c=new AWS[(_0xff17('0x5'))]({'accessKeyId':_0x103662,'secretAccessKey':_0x33cd78,'region':_0x112477});_0x53788c[_0xff17('0x6')]({'TranscriptionJobName':_0x5700e7},function(_0x58e9f8,_0x23d331){if(_0x58e9f8){return _0xb22fe2(_0x58e9f8);}else{return _0x1d3d31(_0x23d331);}});});}function sentiment(_0xcf807e,_0x24ae2a,_0x4faa51,_0x406e27,_0x1dbb25){return new Promise(function(_0xbbca1f,_0x4b3502){var _0x273aa2=new AWS[(_0xff17('0x7'))]({'accessKeyId':_0x24ae2a,'secretAccessKey':_0xcf807e,'region':_0x4faa51});_0x273aa2[_0xff17('0x8')]({'Text':_0x406e27,'LanguageCode':_0x1dbb25[_0xff17('0x9')](0x0,0x2)},function(_0x5cf50f,_0x4e6283){if(_0x5cf50f){return _0x4b3502(_0x5cf50f);}else{return _0xbbca1f(_0x4e6283);}});});}function checkTranscribeJob(_0x6dd95d,_0x13bc09,_0x1b2a62){var _0x54dc3c;return new BPromise(function(_0x1ea9b4,_0x40e5fb){logger['info'](util[_0xff17('0xa')](_0xff17('0xb'),_0x6dd95d['id'],_0x6dd95d['transcribeName']));return getTranscriptionJob(_0x1b2a62['data1'],_0x1b2a62['data2'],_0x13bc09[_0xff17('0xc')],_0x6dd95d['transcribeName'])[_0xff17('0xd')](function(_0x2a6d05){logger[_0xff17('0xe')](util[_0xff17('0xa')](_0xff17('0xf'),_0x6dd95d['id'],_0x6dd95d['transcribeName'],_0x2a6d05[_0xff17('0x10')][_0xff17('0x11')]));if(!_0x6dd95d[_0xff17('0x12')]){switch(_0x2a6d05['TranscriptionJob']['TranscriptionJobStatus']){case _0xff17('0x13'):var _0x347567={'transcribeStatus':_0x2a6d05[_0xff17('0x10')]['TranscriptionJobStatus'],'fileUri':_0x2a6d05['TranscriptionJob']['Transcript']['TranscriptFileUri']};logger[_0xff17('0xe')](util['format'](_0xff17('0x14'),_0x6dd95d['id']));return rp({'uri':_0x2a6d05[_0xff17('0x10')][_0xff17('0x15')]['TranscriptFileUri'],'json':!![]})[_0xff17('0xd')](function(_0x244330){logger['info'](util['format'](_0xff17('0x16'),_0x6dd95d['id']));if(_0x244330&&_0x244330[_0xff17('0x17')]&&_0x244330[_0xff17('0x17')]['transcripts']&&_0x244330['results'][_0xff17('0x18')][_0xff17('0x19')]){_0x347567[_0xff17('0x12')]='';for(var _0x464d5c=0x0;_0x464d5c<_0x244330['results'][_0xff17('0x18')][_0xff17('0x19')];_0x464d5c++){_0x347567['fileText']+=_0x244330[_0xff17('0x17')][_0xff17('0x18')][_0x464d5c]['transcript']+'';}}return _0x6dd95d[_0xff17('0x1a')](_0x347567);})['then'](function(){logger['info'](util['format'](_0xff17('0x1b'),_0x6dd95d['id']));if(!_0x6dd95d[_0xff17('0x1c')]){throw new db[(_0xff17('0x1d'))][(_0xff17('0x1e'))](_0xff17('0x1f'));}if(!_0x13bc09[_0xff17('0x20')]||!_0x13bc09[_0xff17('0x21')]||!_0x13bc09[_0xff17('0x22')]||!_0x13bc09[_0xff17('0x23')]||!_0x13bc09[_0xff17('0x24')]){throw new db['Sequelize'][(_0xff17('0x1e'))](_0xff17('0x25'));}if(!_0x347567[_0xff17('0x12')]){throw new Error(_0xff17('0x26'));}if(_0x13bc09[_0xff17('0x21')]===_0x1b2a62['id']){return _0x1b2a62;}else{return db[_0xff17('0x27')][_0xff17('0x28')]({'where':{'id':_settings[_0xff17('0x21')]}});}})[_0xff17('0xd')](function(_0x4305f2){if(!_0x4305f2){throw new db[(_0xff17('0x1d'))][(_0xff17('0x1e'))](_0xff17('0x29'));}if(!_0x4305f2[_0xff17('0x2a')]||!_0x4305f2[_0xff17('0x2b')]){throw new db[(_0xff17('0x1d'))][(_0xff17('0x1e'))](_0xff17('0x2c'));}_0x54dc3c=_0x4305f2;logger[_0xff17('0xe')](util[_0xff17('0xa')]('[RECORDING:%d]\x20Requesting\x20sentiment\x20analysis',_0x6dd95d['id']));return sentiment(_0x54dc3c[_0xff17('0x2a')],_0x54dc3c[_0xff17('0x2b')],_0x13bc09[_0xff17('0x22')],_0x347567['fileText'],_0x13bc09['language']);})['then'](function(_0x579006){logger[_0xff17('0xe')](util[_0xff17('0xa')]('[RECORDING:%d]\x20Sentiment\x20Analysis\x20available',_0x6dd95d['id']));return _0x6dd95d[_0xff17('0x1a')]({'sentiment':_0x579006[_0xff17('0x2d')],'sPositive':_0x579006['SentimentScore'][_0xff17('0x2e')],'sNegative':_0x579006[_0xff17('0x2f')][_0xff17('0x30')],'sMixed':_0x579006['SentimentScore']['Mixed'],'sNeutral':_0x579006[_0xff17('0x2f')][_0xff17('0x31')]});})[_0xff17('0xd')](function(){logger[_0xff17('0xe')](util[_0xff17('0xa')]('[RECORDING:%d]\x20Voice\x20Recording\x20entry\x20updated',_0x6dd95d['id']));_0x1ea9b4();});case'FAILED':return _0x6dd95d[_0xff17('0x1a')]({'transcribeStatus':'FAILED','failureReason':_0x2a6d05[_0xff17('0x10')]['FailureReason']})[_0xff17('0xd')](function(){logger[_0xff17('0xe')](util[_0xff17('0xa')](_0xff17('0x1b'),_0x6dd95d['id']));_0x1ea9b4();});default:logger[_0xff17('0xe')](util[_0xff17('0xa')]('[RECORDING:%d]\x20Transcript\x20Job\x20status\x20not\x20managed',_0x6dd95d['id']));break;}}else{return BPromise[_0xff17('0x32')]()[_0xff17('0xd')](function(){if(!_0x6dd95d['tempSentiment']){throw new db[(_0xff17('0x1d'))][(_0xff17('0x1e'))](_0xff17('0x1f'));}if(!_0x13bc09[_0xff17('0x20')]||!_0x13bc09[_0xff17('0x21')]||!_0x13bc09['sentimentRegion']||!_0x13bc09['language']||!_0x13bc09['bucket']){throw new db['Sequelize'][(_0xff17('0x1e'))](_0xff17('0x25'));}if(!_0x6dd95d[_0xff17('0x12')]){throw new Error('Transcript\x20not\x20available');}if(_0x13bc09['sentimentAccountId']===_0x1b2a62['id']){return _0x1b2a62;}else{return db[_0xff17('0x27')][_0xff17('0x28')]({'where':{'id':_settings['sentimentAccountId']}});}})[_0xff17('0xd')](function(_0x29c0fa){if(!_0x29c0fa){throw new db[(_0xff17('0x1d'))][(_0xff17('0x1e'))](_0xff17('0x29'));}if(!_0x29c0fa[_0xff17('0x2a')]||!_0x29c0fa[_0xff17('0x2b')]){throw new db[(_0xff17('0x1d'))]['ValidationError'](_0xff17('0x2c'));}_0x54dc3c=_0x29c0fa;logger[_0xff17('0xe')](util[_0xff17('0xa')](_0xff17('0x33'),_0x6dd95d['id']));return sentiment(_0x54dc3c[_0xff17('0x2a')],_0x54dc3c[_0xff17('0x2b')],_0x13bc09[_0xff17('0x22')],_0x6dd95d['fileText'],_0x13bc09[_0xff17('0x23')]);})['then'](function(_0x4c0f87){logger[_0xff17('0xe')](util[_0xff17('0xa')](_0xff17('0x34'),_0x6dd95d['id']));return _0x6dd95d[_0xff17('0x1a')]({'sentiment':_0x4c0f87[_0xff17('0x2d')],'sPositive':_0x4c0f87[_0xff17('0x2f')]['Positive'],'sNegative':_0x4c0f87[_0xff17('0x2f')][_0xff17('0x30')],'sMixed':_0x4c0f87[_0xff17('0x2f')]['Mixed'],'sNeutral':_0x4c0f87['SentimentScore'][_0xff17('0x31')],'transcribeStatus':_0xff17('0x13')});})[_0xff17('0xd')](function(){logger[_0xff17('0xe')](util[_0xff17('0xa')](_0xff17('0x1b'),_0x6dd95d['id']));_0x1ea9b4();});}})[_0xff17('0x35')](function(_0x405d77){if(_0x405d77){if(!_0x405d77['name']||_0x405d77['name']!==_0xff17('0x36')){logger[_0xff17('0x37')](util[_0xff17('0xa')](_0xff17('0x38'),_0x6dd95d['id']),util[_0xff17('0x39')](_0x405d77,{'showHidden':![],'depth':null}));}}_0x1ea9b4();});});}function checkTranscribe(){var _0x502d83;var _0x71c8d6;var _0x3433b8;return db[_0xff17('0x3a')][_0xff17('0x3b')]({'where':{'transcribeStatus':_0xff17('0x3c')}})['then'](function(_0x1c804f){if(!_0x1c804f||!_0x1c804f[_0xff17('0x19')]){throw new db[(_0xff17('0x1d'))][(_0xff17('0x1e'))]('No\x20transcribe\x20job\x20to\x20check');}_0x502d83=_0x1c804f;return db[_0xff17('0x3d')][_0xff17('0x28')]({'where':{'id':0x1}});})[_0xff17('0xd')](function(_0x455f24){if(!_0x455f24){throw new db['Sequelize'][(_0xff17('0x1e'))](_0xff17('0x3e'));}_0x71c8d6=_0x455f24;if(!_0x71c8d6[_0xff17('0x4')]||!_0x71c8d6['transcribeAccountId']||!_0x71c8d6[_0xff17('0xc')]||!_0x71c8d6['language']||!_0x71c8d6['bucket']){throw new db[(_0xff17('0x1d'))]['ValidationError'](_0xff17('0x3f'));}return db[_0xff17('0x27')][_0xff17('0x28')]({'where':{'id':_0x71c8d6[_0xff17('0x40')]}});})[_0xff17('0xd')](function(_0x12b81e){if(!_0x12b81e){throw new db[(_0xff17('0x1d'))][(_0xff17('0x1e'))]('Cloud\x20Provider\x20not\x20available');}if(!_0x12b81e[_0xff17('0x2a')]||!_0x12b81e['data2']){throw new db[(_0xff17('0x1d'))]['ValidationError'](_0xff17('0x2c'));}_0x3433b8=_0x12b81e;var _0x10719c=[];_0x502d83[_0xff17('0x41')](function(_0x4d189a){_0x10719c[_0xff17('0x42')](checkTranscribeJob(_0x4d189a,_0x71c8d6,_0x3433b8));});return BPromise[_0xff17('0x43')](_0x10719c);})[_0xff17('0x35')](function(_0x468439){if(_0x468439){if(!_0x468439[_0xff17('0x44')]||_0x468439['name']!=='SequelizeValidationError'){logger[_0xff17('0x37')](util[_0xff17('0x39')](_0x468439,{'showHidden':![],'depth':null}));}}});}exports[_0xff17('0x45')]=function(){setInterval(function(){return checkTranscribe();},0x3c*0x3e8);return checkTranscribe();}; \ No newline at end of file diff --git a/server/config/schedule/whatsapp.js b/server/config/schedule/whatsapp.js index 7dcd2fd..44da8c9 100644 --- a/server/config/schedule/whatsapp.js +++ b/server/config/schedule/whatsapp.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x2076=['join','whatsappInteraction:update','catch','error','[WHATSAPP]\x20Error\x20closing\x20interactions','start','lodash','ioredis','../../config/environment','../../mysqldb','../logger','schedule','redis','defaults','localhost','socket.io-emitter','WhatsappInteraction','findAll','subtract','hours','length','map','info','[WHATSAPP]\x20Interactions\x20to\x20close:','update','system','timeout','format','YYYY-MM-DD\x20HH:mm:ss','then','[WHATSAPP]\x20Sending\x20updates\x20for\x20interactions:'];(function(_0x13502b,_0x53b33c){var _0x3d7763=function(_0x350ef0){while(--_0x350ef0){_0x13502b['push'](_0x13502b['shift']());}};_0x3d7763(++_0x53b33c);}(_0x2076,0x13c));var _0x6207=function(_0x12f06c,_0x5aabd6){_0x12f06c=_0x12f06c-0x0;var _0x8f5851=_0x2076[_0x12f06c];return _0x8f5851;};'use strict';var _=require(_0x6207('0x0'));var moment=require('moment');var Redis=require(_0x6207('0x1'));var util=require('util');var config=require(_0x6207('0x2'));var db=require(_0x6207('0x3'))['db'];var logger=require(_0x6207('0x4'))(_0x6207('0x5'));config[_0x6207('0x6')]=_[_0x6207('0x7')](config[_0x6207('0x6')],{'host':_0x6207('0x8'),'port':0x18eb});var io=require(_0x6207('0x9'))(new Redis(config['redis']));function closeInteractions(){var _0x766b82=[];return db[_0x6207('0xa')][_0x6207('0xb')]({'raw':!![],'attributes':['id','lastMsgAt'],'where':{'closed':![],'lastMsgDirection':'in','lastMsgAt':{'$lt':moment()[_0x6207('0xc')](0x18,_0x6207('0xd'))}}})['then'](function(_0x2644cc){if(_0x2644cc&&_0x2644cc[_0x6207('0xe')]){_0x766b82=_[_0x6207('0xf')](_0x2644cc||[],'id');logger[_0x6207('0x10')](_0x6207('0x11'),_0x766b82['join']());return db[_0x6207('0xa')][_0x6207('0x12')]({'closeReason':_0x6207('0x13'),'disposition':_0x6207('0x14'),'closed':!![],'closedAt':moment()[_0x6207('0x15')](_0x6207('0x16'))},{'where':{'id':_0x766b82}});}})[_0x6207('0x17')](function(){if(_0x766b82&&_0x766b82[_0x6207('0xe')]){logger['info'](_0x6207('0x18'),_0x766b82[_0x6207('0x19')]());for(var _0x37dad2=0x0;_0x37dad2<_0x766b82['length'];_0x37dad2++){io['emit'](_0x6207('0x1a'),{'id':_0x766b82[_0x37dad2],'closed':!![]});}}})[_0x6207('0x1b')](function(_0x5b16f6){logger[_0x6207('0x1c')](_0x6207('0x1d'),_0x5b16f6?util['inspect'](_0x5b16f6,{'showHidden':![],'depth':null}):'');});}exports[_0x6207('0x1e')]=function(){setInterval(function(){return closeInteractions();},0x3c*0x3e8);return closeInteractions();}; \ No newline at end of file +var _0x2168=['[WHATSAPP]\x20Error\x20closing\x20interactions','inspect','lodash','moment','util','../../config/environment','../../mysqldb','../logger','schedule','redis','defaults','localhost','socket.io-emitter','WhatsappInteraction','findAll','lastMsgAt','subtract','hours','then','length','map','[WHATSAPP]\x20Interactions\x20to\x20close:','join','update','system','timeout','format','YYYY-MM-DD\x20HH:mm:ss','info','[WHATSAPP]\x20Sending\x20updates\x20for\x20interactions:','emit','whatsappInteraction:update','catch','error'];(function(_0x2829d1,_0x370040){var _0x52afec=function(_0x41e0b1){while(--_0x41e0b1){_0x2829d1['push'](_0x2829d1['shift']());}};_0x52afec(++_0x370040);}(_0x2168,0x112));var _0x8216=function(_0xcd2618,_0x4ce5a3){_0xcd2618=_0xcd2618-0x0;var _0x54848f=_0x2168[_0xcd2618];return _0x54848f;};'use strict';var _=require(_0x8216('0x0'));var moment=require(_0x8216('0x1'));var Redis=require('ioredis');var util=require(_0x8216('0x2'));var config=require(_0x8216('0x3'));var db=require(_0x8216('0x4'))['db'];var logger=require(_0x8216('0x5'))(_0x8216('0x6'));config[_0x8216('0x7')]=_[_0x8216('0x8')](config[_0x8216('0x7')],{'host':_0x8216('0x9'),'port':0x18eb});var io=require(_0x8216('0xa'))(new Redis(config[_0x8216('0x7')]));function closeInteractions(){var _0x4c87f1=[];return db[_0x8216('0xb')][_0x8216('0xc')]({'raw':!![],'attributes':['id',_0x8216('0xd')],'where':{'closed':![],'lastMsgDirection':'in','lastMsgAt':{'$lt':moment()[_0x8216('0xe')](0x18,_0x8216('0xf'))}}})[_0x8216('0x10')](function(_0x5267a6){if(_0x5267a6&&_0x5267a6[_0x8216('0x11')]){_0x4c87f1=_[_0x8216('0x12')](_0x5267a6||[],'id');logger['info'](_0x8216('0x13'),_0x4c87f1[_0x8216('0x14')]());return db['WhatsappInteraction'][_0x8216('0x15')]({'closeReason':_0x8216('0x16'),'disposition':_0x8216('0x17'),'closed':!![],'closedAt':moment()[_0x8216('0x18')](_0x8216('0x19'))},{'where':{'id':_0x4c87f1}});}})['then'](function(){if(_0x4c87f1&&_0x4c87f1['length']){logger[_0x8216('0x1a')](_0x8216('0x1b'),_0x4c87f1[_0x8216('0x14')]());for(var _0x59ccef=0x0;_0x59ccef<_0x4c87f1[_0x8216('0x11')];_0x59ccef++){io[_0x8216('0x1c')](_0x8216('0x1d'),{'id':_0x4c87f1[_0x59ccef],'closed':!![]});}}})[_0x8216('0x1e')](function(_0x373fa8){logger[_0x8216('0x1f')](_0x8216('0x20'),_0x373fa8?util[_0x8216('0x21')](_0x373fa8,{'showHidden':![],'depth':null}):'');});}exports['start']=function(){setInterval(function(){return closeInteractions();},0x3c*0x3e8);return closeInteractions();}; \ No newline at end of file diff --git a/server/config/seedContact.js b/server/config/seedContact.js index 7e12293..2e0e952 100644 --- a/server/config/seedContact.js +++ b/server/config/seedContact.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xa5a6=['Innocenzo','Biondo','innocenzo.biondo','@xcally.com','now','CmContact','then','contacts1','CmHopper','bulkCreate','log','finished\x20populating','contacts2','hopper2','catch','../mysqldb','push'];(function(_0x2ef44b,_0x553359){var _0x2405b9=function(_0x278290){while(--_0x278290){_0x2ef44b['push'](_0x2ef44b['shift']());}};_0x2405b9(++_0x553359);}(_0xa5a6,0x10e));var _0x6a5a=function(_0x1cbcf1,_0x3f9fd9){_0x1cbcf1=_0x1cbcf1-0x0;var _0x3a06f0=_0xa5a6[_0x1cbcf1];return _0x3a06f0;};'use strict';var util=require('util');var db=require(_0x6a5a('0x0'))['db'];var contacts=[];var hopper=[];var contacts2=[];var hopper2=[];for(var i=0x1;i<=0x4b0;i+=0x1){contacts[_0x6a5a('0x1')]({'id':i,'firstName':_0x6a5a('0x2')+i,'lastName':_0x6a5a('0x3')+i,'phone':0xf879fb460+i,'email':_0x6a5a('0x4')+i+_0x6a5a('0x5')});}for(var i=0x1;i<=0x4b0;i+=0x1){hopper[_0x6a5a('0x1')]({'id':i,'active':![],'scheduledat':Date[_0x6a5a('0x6')](),'countbusyretry':0x0,'countcongestionretry':0x0,'countnoanswerretry':0x0,'ContactId':i,'ListId':0x1,'UserId':0x1,'VoiceQueueId':0x3fd,'createdAt':Date['now'](),'updatedAt':Date['now']()});}for(var i=0x4b1;i<=0x960;i+=0x1){contacts2['push']({'id':i,'firstName':_0x6a5a('0x2')+i,'lastName':_0x6a5a('0x3')+i,'phone':0xf879fb460+i,'email':_0x6a5a('0x4')+i+_0x6a5a('0x5')});}for(var i=0x4b1;i<=0x960;i+=0x1){hopper2[_0x6a5a('0x1')]({'id':i,'active':![],'scheduledat':Date[_0x6a5a('0x6')](),'countbusyretry':0x0,'countcongestionretry':0x0,'countnoanswerretry':0x0,'ContactId':i,'ListId':0x1,'UserId':0x1,'VoiceQueueId':0x3fd,'createdAt':Date['now'](),'updatedAt':Date[_0x6a5a('0x6')]()});}db[_0x6a5a('0x7')]['destroy']({'where':{}})[_0x6a5a('0x8')](function(){return db[_0x6a5a('0x7')]['bulkCreate'](contacts);})[_0x6a5a('0x8')](function(){console['log']('finished\x20populating',_0x6a5a('0x9'));return db[_0x6a5a('0xa')]['destroy']({'where':{}});})[_0x6a5a('0x8')](function(){return db['CmHopper'][_0x6a5a('0xb')](hopper);})[_0x6a5a('0x8')](function(){console[_0x6a5a('0xc')](_0x6a5a('0xd'),'hopper1');return db[_0x6a5a('0x7')][_0x6a5a('0xb')](contacts2);})['then'](function(){console[_0x6a5a('0xc')]('finished\x20populating',_0x6a5a('0xe'));return db[_0x6a5a('0xa')][_0x6a5a('0xb')](hopper2);})['then'](function(){console[_0x6a5a('0xc')](_0x6a5a('0xd'),_0x6a5a('0xf'));})[_0x6a5a('0x10')](function(_0x57e746){console['log'](_0x57e746);}); \ No newline at end of file +var _0x140e=['@xcally.com','CmContact','then','log','finished\x20populating','contacts1','destroy','CmHopper','bulkCreate','contacts2','hopper2','catch','util','push','Innocenzo','Biondo','now','innocenzo.biondo'];(function(_0x321bb2,_0x202794){var _0x9c12ed=function(_0x263dd3){while(--_0x263dd3){_0x321bb2['push'](_0x321bb2['shift']());}};_0x9c12ed(++_0x202794);}(_0x140e,0x174));var _0xe140=function(_0x24b932,_0x4e4e96){_0x24b932=_0x24b932-0x0;var _0x39b930=_0x140e[_0x24b932];return _0x39b930;};'use strict';var util=require(_0xe140('0x0'));var db=require('../mysqldb')['db'];var contacts=[];var hopper=[];var contacts2=[];var hopper2=[];for(var i=0x1;i<=0x4b0;i+=0x1){contacts[_0xe140('0x1')]({'id':i,'firstName':_0xe140('0x2')+i,'lastName':_0xe140('0x3')+i,'phone':0xf879fb460+i,'email':'innocenzo.biondo'+i+'@xcally.com'});}for(var i=0x1;i<=0x4b0;i+=0x1){hopper['push']({'id':i,'active':![],'scheduledat':Date[_0xe140('0x4')](),'countbusyretry':0x0,'countcongestionretry':0x0,'countnoanswerretry':0x0,'ContactId':i,'ListId':0x1,'UserId':0x1,'VoiceQueueId':0x3fd,'createdAt':Date[_0xe140('0x4')](),'updatedAt':Date['now']()});}for(var i=0x4b1;i<=0x960;i+=0x1){contacts2[_0xe140('0x1')]({'id':i,'firstName':_0xe140('0x2')+i,'lastName':_0xe140('0x3')+i,'phone':0xf879fb460+i,'email':_0xe140('0x5')+i+_0xe140('0x6')});}for(var i=0x4b1;i<=0x960;i+=0x1){hopper2['push']({'id':i,'active':![],'scheduledat':Date[_0xe140('0x4')](),'countbusyretry':0x0,'countcongestionretry':0x0,'countnoanswerretry':0x0,'ContactId':i,'ListId':0x1,'UserId':0x1,'VoiceQueueId':0x3fd,'createdAt':Date[_0xe140('0x4')](),'updatedAt':Date[_0xe140('0x4')]()});}db[_0xe140('0x7')]['destroy']({'where':{}})[_0xe140('0x8')](function(){return db[_0xe140('0x7')]['bulkCreate'](contacts);})[_0xe140('0x8')](function(){console[_0xe140('0x9')](_0xe140('0xa'),_0xe140('0xb'));return db['CmHopper'][_0xe140('0xc')]({'where':{}});})[_0xe140('0x8')](function(){return db[_0xe140('0xd')][_0xe140('0xe')](hopper);})[_0xe140('0x8')](function(){console['log']('finished\x20populating','hopper1');return db[_0xe140('0x7')]['bulkCreate'](contacts2);})['then'](function(){console[_0xe140('0x9')]('finished\x20populating',_0xe140('0xf'));return db[_0xe140('0xd')][_0xe140('0xe')](hopper2);})[_0xe140('0x8')](function(){console['log'](_0xe140('0xa'),_0xe140('0x10'));})[_0xe140('0x11')](function(_0x1cbadc){console['log'](_0x1cbadc);}); \ No newline at end of file diff --git a/server/config/seedUsers.js b/server/config/seedUsers.js index 917cdd5..9272e81 100644 --- a/server/config/seedUsers.js +++ b/server/config/seedUsers.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x906f=['../mysqldb','push','format','%s%s','agent','%s%s@xcally.com','password','friend','udp','wss','all','yes','/etc/pki/tls/certs/motion.crt','/etc/pki/tls/private/motion.key','User','add\x20user','catch','log','util'];(function(_0x14add3,_0x13ce8d){var _0x4a174f=function(_0x2b3ed7){while(--_0x2b3ed7){_0x14add3['push'](_0x14add3['shift']());}};_0x4a174f(++_0x13ce8d);}(_0x906f,0x84));var _0xf906=function(_0x4ccbd8,_0x51828c){_0x4ccbd8=_0x4ccbd8-0x0;var _0x14eb2b=_0x906f[_0x4ccbd8];return _0x14eb2b;};'use strict';var util=require(_0xf906('0x0'));var db=require(_0xf906('0x1'))['db'];var users=[];for(var i=0x1;i<=0xc8;i+=0x1){users[_0xf906('0x2')]({'name':util[_0xf906('0x3')](_0xf906('0x4'),_0xf906('0x5'),i),'fullname':util[_0xf906('0x3')](_0xf906('0x4'),'agent',i),'email':util[_0xf906('0x3')](_0xf906('0x6'),'agent',i),'role':_0xf906('0x5'),'password':_0xf906('0x7'),'internal':0xfa0+i,'type':_0xf906('0x8'),'transport':[_0xf906('0x9'),'ws',_0xf906('0xa')],'disallow':[_0xf906('0xb')],'allow':['ulaw'],'defaultuser':util[_0xf906('0x3')](_0xf906('0x4'),'agent',i),'encryption':'yes','avpf':_0xf906('0xc'),'force_avp':_0xf906('0xc'),'icesupport':_0xf906('0xc'),'dtlsenable':_0xf906('0xc'),'dtlsverify':'no','dtlscertfile':_0xf906('0xd'),'dtlsprivatekey':_0xf906('0xe'),'dtlssetup':'actpass','callerid':util[_0xf906('0x3')]('\x22%s\x22\x20<%s>',util[_0xf906('0x3')](_0xf906('0x4'),_0xf906('0x5'),i),0xfa0+i)});}db[_0xf906('0xf')]['bulkCreate'](users)['then'](function(){console['log'](_0xf906('0x10'));})[_0xf906('0x11')](function(_0x44a9d3){console[_0xf906('0x12')](_0x44a9d3);}); \ No newline at end of file +var _0x3f11=['wss','all','yes','/etc/pki/tls/certs/motion.crt','/etc/pki/tls/private/motion.key','\x22%s\x22\x20<%s>','User','bulkCreate','then','log','add\x20user','catch','util','push','%s%s','agent','format','%s%s@xcally.com','password','friend','udp'];(function(_0x29d9d5,_0x5a1bd8){var _0x1be395=function(_0x54e84f){while(--_0x54e84f){_0x29d9d5['push'](_0x29d9d5['shift']());}};_0x1be395(++_0x5a1bd8);}(_0x3f11,0x1da));var _0x13f1=function(_0x43139b,_0x1d704c){_0x43139b=_0x43139b-0x0;var _0x2de4de=_0x3f11[_0x43139b];return _0x2de4de;};'use strict';var util=require(_0x13f1('0x0'));var db=require('../mysqldb')['db'];var users=[];for(var i=0x1;i<=0xc8;i+=0x1){users[_0x13f1('0x1')]({'name':util['format']('%s%s','agent',i),'fullname':util['format'](_0x13f1('0x2'),_0x13f1('0x3'),i),'email':util[_0x13f1('0x4')](_0x13f1('0x5'),_0x13f1('0x3'),i),'role':_0x13f1('0x3'),'password':_0x13f1('0x6'),'internal':0xfa0+i,'type':_0x13f1('0x7'),'transport':[_0x13f1('0x8'),'ws',_0x13f1('0x9')],'disallow':[_0x13f1('0xa')],'allow':['ulaw'],'defaultuser':util[_0x13f1('0x4')](_0x13f1('0x2'),_0x13f1('0x3'),i),'encryption':_0x13f1('0xb'),'avpf':_0x13f1('0xb'),'force_avp':'yes','icesupport':_0x13f1('0xb'),'dtlsenable':_0x13f1('0xb'),'dtlsverify':'no','dtlscertfile':_0x13f1('0xc'),'dtlsprivatekey':_0x13f1('0xd'),'dtlssetup':'actpass','callerid':util[_0x13f1('0x4')](_0x13f1('0xe'),util['format'](_0x13f1('0x2'),_0x13f1('0x3'),i),0xfa0+i)});}db[_0x13f1('0xf')][_0x13f1('0x10')](users)[_0x13f1('0x11')](function(){console[_0x13f1('0x12')](_0x13f1('0x13'));})[_0x13f1('0x14')](function(_0x23f977){console[_0x13f1('0x12')](_0x23f977);}); \ No newline at end of file diff --git a/server/config/socketio.js b/server/config/socketio.js index fbef328..b77ec6c 100644 --- a/server/config/socketio.js +++ b/server/config/socketio.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x47d6=['request','remotePort','connectedAt','nsp','disconnect','DISCONNECTED','CONNECTED','lodash','util','bluebird','../mysqldb','./environment','name','Agents','User','role','agent','telephone','type','ivr','UserProfileSection','findOne','then','autoAssociation','VoiceQueues','ChatQueues','MailQueues','OpenchannelQueues','WhatsappQueues','findAll','Telephones','Trunks','UserProfileResource','resourceId','where','Campaign','%s:queue:%s','length','format','handshake','find','userProfileId','query','ChatInteraction','ChatInteractions','MailInteraction','MailInteractions','FaxInteraction','FaxInteractions','SmsInteraction','SmsInteractions','OpenchannelInteraction','user:%s','admin','voice:outbound','hasOwnProperty','include','VoiceQueue','push','FaxQueue','SmsQueue','MailQueue','WhatsappQueue','user','ChatQueue','FaxQueues','SmsQueues','OpenchannelQueue','IvrCampaigns','voice:inbound','getChatQueues','getFaxQueues','getMailQueues','getOpenchannelQueues','getWhatsappQueues','voice','chat','fax','sms','mail','openchannel','telephone:%s','trunk:%s','campaign:%s:%s','leave','map','removeChatInteractions','user_has_chat_interactions:remove','emit','user_has_mail_interactions:remove','removeFaxInteractions','user_has_fax_interactions:remove','removeSmsInteractions','user_has_sms_interactions:remove','OpenchannelInteractions','user_has_openchannel_interactions:remove','WhatsappInteractions','removeWhatsappInteractions','catch','log','join','connection','address','remoteAddress'];(function(_0x591a84,_0x4379c7){var _0xfcafbe=function(_0x1c8df3){while(--_0x1c8df3){_0x591a84['push'](_0x591a84['shift']());}};_0xfcafbe(++_0x4379c7);}(_0x47d6,0x13f));var _0x647d=function(_0x48fcbe,_0x593a7b){_0x48fcbe=_0x48fcbe-0x0;var _0x3d95b1=_0x47d6[_0x48fcbe];return _0x3d95b1;};'use strict';var _=require(_0x647d('0x0'));var util=require(_0x647d('0x1'));var BPromise=require(_0x647d('0x2'));var db=require(_0x647d('0x3'))['db'];var config=require(_0x647d('0x4'));var queryQueues={'attributes':['id',_0x647d('0x5')],'include':[{'as':_0x647d('0x6'),'model':db[_0x647d('0x7')],'attributes':['id',_0x647d('0x5'),_0x647d('0x8')],'raw':!![],'where':{'role':_0x647d('0x9')},'required':![]}]};var queryTelephones={'raw':!![],'attributes':['id',_0x647d('0x5')],'where':{'role':_0x647d('0xa')}};var queryTrunks={'raw':!![],'attributes':['id',_0x647d('0x5')]};var queryAgents={'raw':!![],'attributes':['id',_0x647d('0x5')],'where':{'role':_0x647d('0x9')}};var queryCampaigns={'raw':!![],'attributes':['id','name',_0x647d('0xb')],'where':{'type':_0x647d('0xc')}};function getAssociatedResources(_0x317585,_0x3060a3,_0x414518){return db[_0x647d('0xd')][_0x647d('0xe')]({'where':{'name':_0x317585,'userProfileId':_0x3060a3},'raw':!![]})[_0x647d('0xf')](function(_0x16ff20){if(_0x16ff20){if(_0x16ff20[_0x647d('0x10')]){switch(_0x317585){case _0x647d('0x11'):case _0x647d('0x12'):case'FaxQueues':case'SmsQueues':case _0x647d('0x13'):case _0x647d('0x14'):case _0x647d('0x15'):return db[_0x414518][_0x647d('0x16')](queryQueues);case _0x647d('0x17'):return db[_0x414518][_0x647d('0x16')](queryTelephones);case _0x647d('0x18'):return db[_0x414518][_0x647d('0x16')](queryTrunks);case'IvrCampaigns':return db[_0x414518][_0x647d('0x16')](queryCampaigns);}}else{return db[_0x647d('0x19')]['findAll']({'attributes':[_0x647d('0x1a')],'where':{'sectionId':_0x16ff20['id']},'raw':!![]})[_0x647d('0xf')](function(_0x3f805b){if(_0x3f805b){var _0x53297a={'where':{'id':_['map'](_0x3f805b,_0x647d('0x1a'))},'raw':!![]};switch(_0x414518){case _0x647d('0x7'):_0x53297a[_0x647d('0x1b')]['role']=_0x647d('0xa');break;case _0x647d('0x1c'):_0x53297a['where'][_0x647d('0xb')]=_0x647d('0xc');break;}return db[_0x414518][_0x647d('0x16')](_0x53297a);}else{return[];}});}}else{return[];}})['then'](function(_0x5a3a99){return _0x5a3a99;});}function joinOrLeaveQueues(_0x4cee65,_0x1515b4,_0x3954c5,_0xd64335){_0x4cee65[_0x1515b4](util['format'](_0x647d('0x1d'),_0x3954c5,_0xd64335[_0x647d('0x5')]));if(_0xd64335['Agents']){for(var _0x50d41b=0x0;_0x50d41b<_0xd64335['Agents'][_0x647d('0x1e')];_0x50d41b+=0x1){_0x4cee65[_0x1515b4](util[_0x647d('0x1f')]('user:%s',_0xd64335[_0x647d('0x6')][_0x50d41b][_0x647d('0x5')]));}}}function joinOrLeave(_0x26a1bc,_0x373ecf,_0x5e9c0f){var _0x5e43e7;if(_0x26a1bc[_0x647d('0x20')]['query']['id']){db[_0x647d('0x7')][_0x647d('0x21')]({'attributes':['id',_0x647d('0x5'),_0x647d('0x8'),_0x647d('0x22')],'where':{'id':_0x26a1bc[_0x647d('0x20')][_0x647d('0x23')]['id']},'include':[{'model':db[_0x647d('0x24')],'as':_0x647d('0x25'),'attributes':['id'],'raw':!![]},{'model':db[_0x647d('0x26')],'as':_0x647d('0x27'),'attributes':['id'],'raw':!![]},{'model':db[_0x647d('0x28')],'as':_0x647d('0x29'),'attributes':['id'],'raw':!![]},{'model':db[_0x647d('0x2a')],'as':_0x647d('0x2b'),'attributes':['id'],'raw':!![]},{'model':db[_0x647d('0x2c')],'as':'OpenchannelInteractions','attributes':['id'],'raw':!![]},{'model':db['WhatsappInteraction'],'as':'WhatsappInteractions','attributes':['id'],'raw':!![]}]})[_0x647d('0xf')](function(_0x58c102){if(_0x58c102){_0x5e43e7=_0x58c102;_0x26a1bc[_0x373ecf](util[_0x647d('0x1f')](_0x647d('0x2d'),_0x58c102['name']));var _0x1600d1=[];switch(_0x58c102[_0x647d('0x8')]){case _0x647d('0x2e'):_0x26a1bc[_0x373ecf]('voice:inbound');_0x26a1bc[_0x373ecf](_0x647d('0x2f'));if(queryQueues[_0x647d('0x30')](_0x647d('0x31'))){delete queryQueues['include'];}_0x1600d1['push'](db[_0x647d('0x32')][_0x647d('0x16')](queryQueues));_0x1600d1[_0x647d('0x33')](db['ChatQueue'][_0x647d('0x16')](queryQueues));_0x1600d1[_0x647d('0x33')](db[_0x647d('0x34')][_0x647d('0x16')](queryQueues));_0x1600d1[_0x647d('0x33')](db[_0x647d('0x35')][_0x647d('0x16')](queryQueues));_0x1600d1[_0x647d('0x33')](db[_0x647d('0x36')][_0x647d('0x16')](queryQueues));_0x1600d1[_0x647d('0x33')](db['OpenchannelQueue'][_0x647d('0x16')](queryQueues));_0x1600d1[_0x647d('0x33')](db[_0x647d('0x37')][_0x647d('0x16')](queryQueues));_0x1600d1[_0x647d('0x33')](db[_0x647d('0x7')][_0x647d('0x16')](queryTelephones));_0x1600d1[_0x647d('0x33')](db['Trunk']['findAll'](queryTrunks));_0x1600d1[_0x647d('0x33')](db[_0x647d('0x1c')][_0x647d('0x16')](queryCampaigns));_0x1600d1[_0x647d('0x33')](db['User'][_0x647d('0x16')](queryAgents));break;case _0x647d('0x38'):_0x26a1bc[_0x373ecf]('voice:inbound');_0x26a1bc[_0x373ecf](_0x647d('0x2f'));_0x1600d1[_0x647d('0x33')](getAssociatedResources('VoiceQueues',_0x58c102[_0x647d('0x22')],_0x647d('0x32')));_0x1600d1[_0x647d('0x33')](getAssociatedResources(_0x647d('0x12'),_0x58c102[_0x647d('0x22')],_0x647d('0x39')));_0x1600d1[_0x647d('0x33')](getAssociatedResources(_0x647d('0x3a'),_0x58c102[_0x647d('0x22')],_0x647d('0x34')));_0x1600d1[_0x647d('0x33')](getAssociatedResources(_0x647d('0x3b'),_0x58c102[_0x647d('0x22')],_0x647d('0x35')));_0x1600d1[_0x647d('0x33')](getAssociatedResources(_0x647d('0x13'),_0x58c102['userProfileId'],'MailQueue'));_0x1600d1['push'](getAssociatedResources(_0x647d('0x14'),_0x58c102['userProfileId'],_0x647d('0x3c')));_0x1600d1[_0x647d('0x33')](getAssociatedResources('WhatsappQueues',_0x58c102[_0x647d('0x22')],_0x647d('0x37')));_0x1600d1[_0x647d('0x33')](getAssociatedResources('Telephones',_0x58c102['userProfileId'],_0x647d('0x7')));_0x1600d1[_0x647d('0x33')](getAssociatedResources(_0x647d('0x18'),_0x58c102[_0x647d('0x22')],'Trunk'));_0x1600d1['push'](getAssociatedResources(_0x647d('0x3d'),_0x58c102[_0x647d('0x22')],_0x647d('0x1c')));_0x1600d1[_0x647d('0x33')](db[_0x647d('0x7')]['findAll'](queryAgents));break;case _0x647d('0x9'):_0x26a1bc[_0x373ecf](_0x647d('0x3e'));_0x26a1bc[_0x373ecf](_0x647d('0x2f'));_0x1600d1['push'](_0x58c102['getVoiceQueues']({'attributes':['id','name']}));_0x1600d1[_0x647d('0x33')](_0x58c102[_0x647d('0x3f')]({'attributes':['id',_0x647d('0x5')]}));_0x1600d1[_0x647d('0x33')](_0x58c102[_0x647d('0x40')]({'attributes':['id',_0x647d('0x5')]}));_0x1600d1[_0x647d('0x33')](_0x58c102['getSmsQueues']({'attributes':['id',_0x647d('0x5')]}));_0x1600d1[_0x647d('0x33')](_0x58c102[_0x647d('0x41')]({'attributes':['id',_0x647d('0x5')]}));_0x1600d1[_0x647d('0x33')](_0x58c102[_0x647d('0x42')]({'attributes':['id',_0x647d('0x5')]}));_0x1600d1[_0x647d('0x33')](_0x58c102[_0x647d('0x43')]({'attributes':['id',_0x647d('0x5')]}));break;}return BPromise['all'](_0x1600d1);}})[_0x647d('0xf')](function(_0x263c5d){if(_0x263c5d&&_0x263c5d['length']){for(var _0x3eaf17=0x0;_0x3eaf17<_0x263c5d[_0x647d('0x1e')];_0x3eaf17+=0x1){for(var _0x12c326=0x0;_0x12c326<_0x263c5d[_0x3eaf17][_0x647d('0x1e')];_0x12c326+=0x1){switch(_0x3eaf17){case 0x0:joinOrLeaveQueues(_0x26a1bc,_0x373ecf,_0x647d('0x44'),_0x263c5d[_0x3eaf17][_0x12c326]);break;case 0x1:joinOrLeaveQueues(_0x26a1bc,_0x373ecf,_0x647d('0x45'),_0x263c5d[_0x3eaf17][_0x12c326]);break;case 0x2:joinOrLeaveQueues(_0x26a1bc,_0x373ecf,_0x647d('0x46'),_0x263c5d[_0x3eaf17][_0x12c326]);break;case 0x3:joinOrLeaveQueues(_0x26a1bc,_0x373ecf,_0x647d('0x47'),_0x263c5d[_0x3eaf17][_0x12c326]);break;case 0x4:joinOrLeaveQueues(_0x26a1bc,_0x373ecf,_0x647d('0x48'),_0x263c5d[_0x3eaf17][_0x12c326]);break;case 0x5:joinOrLeaveQueues(_0x26a1bc,_0x373ecf,_0x647d('0x49'),_0x263c5d[_0x3eaf17][_0x12c326]);break;case 0x6:joinOrLeaveQueues(_0x26a1bc,_0x373ecf,'whatsapp',_0x263c5d[_0x3eaf17][_0x12c326]);break;case 0x7:if(_0x5e43e7[_0x647d('0x8')]!==_0x647d('0x9'))_0x26a1bc[_0x373ecf](util[_0x647d('0x1f')](_0x647d('0x4a'),_0x263c5d[_0x3eaf17][_0x12c326]['name']));break;case 0x8:if(_0x5e43e7[_0x647d('0x8')]!==_0x647d('0x9'))_0x26a1bc[_0x373ecf](util[_0x647d('0x1f')](_0x647d('0x4b'),_0x263c5d[_0x3eaf17][_0x12c326][_0x647d('0x5')]));break;case 0x9:if(_0x5e43e7[_0x647d('0x8')]!==_0x647d('0x9'))_0x26a1bc[_0x373ecf](util[_0x647d('0x1f')](_0x647d('0x4c'),_0x263c5d[_0x3eaf17][_0x12c326][_0x647d('0xb')],_0x263c5d[_0x3eaf17][_0x12c326]['name']));break;case 0xa:_0x26a1bc[_0x373ecf](util['format'](_0x647d('0x2d'),_0x263c5d[_0x3eaf17][_0x12c326][_0x647d('0x5')]));break;}}}}})[_0x647d('0xf')](function(){if(_0x373ecf===_0x647d('0x4d')){var _0x55a42f=_[_0x647d('0x4e')](_0x5e43e7['ChatInteractions'],'id');return _0x5e43e7[_0x647d('0x4f')](_0x55a42f)[_0x647d('0xf')](function(){for(var _0x81f867=0x0;_0x81f867<_0x55a42f[_0x647d('0x1e')];_0x81f867+=0x1){_0x5e9c0f['emit'](_0x647d('0x50'),{'ChatInteractionId':Number(_0x55a42f[_0x81f867]),'UserId':Number(_0x5e43e7['id'])});}});}})[_0x647d('0xf')](function(){if(_0x373ecf==='leave'){var _0x3ff3e2=_[_0x647d('0x4e')](_0x5e43e7[_0x647d('0x27')],'id');return _0x5e43e7['removeMailInteractions'](_0x3ff3e2)['then'](function(){for(var _0xf213d3=0x0;_0xf213d3<_0x3ff3e2[_0x647d('0x1e')];_0xf213d3+=0x1){_0x5e9c0f[_0x647d('0x51')](_0x647d('0x52'),{'MailInteractionId':Number(_0x3ff3e2[_0xf213d3]),'UserId':Number(_0x5e43e7['id'])});}});}})[_0x647d('0xf')](function(){if(_0x373ecf===_0x647d('0x4d')){var _0x2245dc=_[_0x647d('0x4e')](_0x5e43e7[_0x647d('0x29')],'id');return _0x5e43e7[_0x647d('0x53')](_0x2245dc)[_0x647d('0xf')](function(){for(var _0x3ab733=0x0;_0x3ab733<_0x2245dc[_0x647d('0x1e')];_0x3ab733+=0x1){_0x5e9c0f[_0x647d('0x51')](_0x647d('0x54'),{'FaxInteractionId':Number(_0x2245dc[_0x3ab733]),'UserId':Number(_0x5e43e7['id'])});}});}})[_0x647d('0xf')](function(){if(_0x373ecf===_0x647d('0x4d')){var _0x378ae4=_['map'](_0x5e43e7[_0x647d('0x2b')],'id');return _0x5e43e7[_0x647d('0x55')](_0x378ae4)['then'](function(){for(var _0x3da109=0x0;_0x3da109<_0x378ae4[_0x647d('0x1e')];_0x3da109+=0x1){_0x5e9c0f[_0x647d('0x51')](_0x647d('0x56'),{'SmsInteractionId':Number(_0x378ae4[_0x3da109]),'UserId':Number(_0x5e43e7['id'])});}});}})[_0x647d('0xf')](function(){if(_0x373ecf===_0x647d('0x4d')){var _0x1c3824=_[_0x647d('0x4e')](_0x5e43e7[_0x647d('0x57')],'id');return _0x5e43e7['removeOpenchannelInteractions'](_0x1c3824)[_0x647d('0xf')](function(){for(var _0x573a90=0x0;_0x573a90<_0x1c3824[_0x647d('0x1e')];_0x573a90+=0x1){_0x5e9c0f[_0x647d('0x51')](_0x647d('0x58'),{'OpenchannelInteractionId':Number(_0x1c3824[_0x573a90]),'UserId':Number(_0x5e43e7['id'])});}});}})[_0x647d('0xf')](function(){if(_0x373ecf===_0x647d('0x4d')){var _0x2d4298=_[_0x647d('0x4e')](_0x5e43e7[_0x647d('0x59')],'id');return _0x5e43e7[_0x647d('0x5a')](_0x2d4298)[_0x647d('0xf')](function(){for(var _0x46e44a=0x0;_0x46e44a<_0x2d4298['length'];_0x46e44a+=0x1){_0x5e9c0f[_0x647d('0x51')]('user_has_whatsapp_interactions:remove',{'WhatsappInteractionId':Number(_0x2d4298[_0x46e44a]),'UserId':Number(_0x5e43e7['id'])});}});}})[_0x647d('0x5b')](function(_0x47c38e){_0x26a1bc[_0x647d('0x5c')](_0x47c38e);});}}function onDisconnect(_0x4bd950,_0x1c4d4f){joinOrLeave(_0x4bd950,'leave',_0x1c4d4f);}function onConnect(_0x32f6e9){joinOrLeave(_0x32f6e9,_0x647d('0x5d'));}exports['default']=function(_0x58df25){_0x58df25['on'](_0x647d('0x5e'),function(_0x4cb491){_0x4cb491['setMaxListeners'](0x0);_0x4cb491[_0x647d('0x5f')]=_0x4cb491['request']['connection'][_0x647d('0x60')]+':'+_0x4cb491[_0x647d('0x61')][_0x647d('0x5e')][_0x647d('0x62')];_0x4cb491[_0x647d('0x63')]=new Date();_0x4cb491['log']=function(_0x532c27){console[_0x647d('0x5c')]('SocketIO\x20'+_0x4cb491[_0x647d('0x64')][_0x647d('0x5')]+'['+_0x4cb491[_0x647d('0x5f')]+']',_0x532c27);};_0x4cb491['on'](_0x647d('0x65'),function(){onDisconnect(_0x4cb491,_0x58df25);_0x4cb491[_0x647d('0x5c')](_0x647d('0x66'));});onConnect(_0x4cb491);_0x4cb491[_0x647d('0x5c')](_0x647d('0x67'));});}; \ No newline at end of file +var _0x5732=['address','request','remoteAddress','remotePort','connectedAt','log','SocketIO\x20','nsp','disconnect','CONNECTED','util','bluebird','../mysqldb','name','Agents','User','role','agent','type','UserProfileSection','findOne','then','autoAssociation','VoiceQueues','ChatQueues','FaxQueues','SmsQueues','MailQueues','WhatsappQueues','Telephones','findAll','IvrCampaigns','UserProfileResource','resourceId','map','where','telephone','Campaign','%s:queue:%s','format','user:%s','handshake','query','find','ChatInteraction','ChatInteractions','MailInteraction','MailInteractions','FaxInteraction','FaxInteractions','SmsInteraction','OpenchannelInteraction','OpenchannelInteractions','WhatsappInteraction','WhatsappInteractions','admin','voice:inbound','hasOwnProperty','include','push','VoiceQueue','FaxQueue','SmsQueue','MailQueue','OpenchannelQueue','WhatsappQueue','Trunk','user','voice:outbound','userProfileId','ChatQueue','OpenchannelQueues','getVoiceQueues','getChatQueues','getFaxQueues','getSmsQueues','getMailQueues','getOpenchannelQueues','getWhatsappQueues','all','length','voice','fax','sms','mail','openchannel','whatsapp','telephone:%s','campaign:%s:%s','user_has_chat_interactions:remove','removeMailInteractions','emit','leave','removeFaxInteractions','user_has_fax_interactions:remove','SmsInteractions','removeOpenchannelInteractions','user_has_openchannel_interactions:remove','removeWhatsappInteractions','user_has_whatsapp_interactions:remove','catch','join','default','connection','setMaxListeners'];(function(_0x32d457,_0x1a39c9){var _0x338386=function(_0x199d7a){while(--_0x199d7a){_0x32d457['push'](_0x32d457['shift']());}};_0x338386(++_0x1a39c9);}(_0x5732,0xdc));var _0x2573=function(_0x20c8c7,_0x2a072b){_0x20c8c7=_0x20c8c7-0x0;var _0x2a5e51=_0x5732[_0x20c8c7];return _0x2a5e51;};'use strict';var _=require('lodash');var util=require(_0x2573('0x0'));var BPromise=require(_0x2573('0x1'));var db=require(_0x2573('0x2'))['db'];var config=require('./environment');var queryQueues={'attributes':['id',_0x2573('0x3')],'include':[{'as':_0x2573('0x4'),'model':db[_0x2573('0x5')],'attributes':['id',_0x2573('0x3'),_0x2573('0x6')],'raw':!![],'where':{'role':_0x2573('0x7')},'required':![]}]};var queryTelephones={'raw':!![],'attributes':['id',_0x2573('0x3')],'where':{'role':'telephone'}};var queryTrunks={'raw':!![],'attributes':['id','name']};var queryAgents={'raw':!![],'attributes':['id','name'],'where':{'role':_0x2573('0x7')}};var queryCampaigns={'raw':!![],'attributes':['id',_0x2573('0x3'),_0x2573('0x8')],'where':{'type':'ivr'}};function getAssociatedResources(_0x51d00c,_0x1d1728,_0x51609c){return db[_0x2573('0x9')][_0x2573('0xa')]({'where':{'name':_0x51d00c,'userProfileId':_0x1d1728},'raw':!![]})[_0x2573('0xb')](function(_0x302706){if(_0x302706){if(_0x302706[_0x2573('0xc')]){switch(_0x51d00c){case _0x2573('0xd'):case _0x2573('0xe'):case _0x2573('0xf'):case _0x2573('0x10'):case _0x2573('0x11'):case'OpenchannelQueues':case _0x2573('0x12'):return db[_0x51609c]['findAll'](queryQueues);case _0x2573('0x13'):return db[_0x51609c][_0x2573('0x14')](queryTelephones);case'Trunks':return db[_0x51609c][_0x2573('0x14')](queryTrunks);case _0x2573('0x15'):return db[_0x51609c]['findAll'](queryCampaigns);}}else{return db[_0x2573('0x16')][_0x2573('0x14')]({'attributes':[_0x2573('0x17')],'where':{'sectionId':_0x302706['id']},'raw':!![]})[_0x2573('0xb')](function(_0x5e3ee2){if(_0x5e3ee2){var _0x530f01={'where':{'id':_[_0x2573('0x18')](_0x5e3ee2,'resourceId')},'raw':!![]};switch(_0x51609c){case _0x2573('0x5'):_0x530f01[_0x2573('0x19')]['role']=_0x2573('0x1a');break;case _0x2573('0x1b'):_0x530f01[_0x2573('0x19')][_0x2573('0x8')]='ivr';break;}return db[_0x51609c][_0x2573('0x14')](_0x530f01);}else{return[];}});}}else{return[];}})[_0x2573('0xb')](function(_0x6d2bea){return _0x6d2bea;});}function joinOrLeaveQueues(_0x4089b8,_0x3d88d8,_0x36e8f6,_0x3f7887){_0x4089b8[_0x3d88d8](util['format'](_0x2573('0x1c'),_0x36e8f6,_0x3f7887[_0x2573('0x3')]));if(_0x3f7887[_0x2573('0x4')]){for(var _0x48a4bc=0x0;_0x48a4bc<_0x3f7887['Agents']['length'];_0x48a4bc+=0x1){_0x4089b8[_0x3d88d8](util[_0x2573('0x1d')](_0x2573('0x1e'),_0x3f7887[_0x2573('0x4')][_0x48a4bc][_0x2573('0x3')]));}}}function joinOrLeave(_0x54fbe3,_0x13f67d,_0x17adc1){var _0x360c1b;if(_0x54fbe3[_0x2573('0x1f')][_0x2573('0x20')]['id']){db['User'][_0x2573('0x21')]({'attributes':['id',_0x2573('0x3'),_0x2573('0x6'),'userProfileId'],'where':{'id':_0x54fbe3[_0x2573('0x1f')][_0x2573('0x20')]['id']},'include':[{'model':db[_0x2573('0x22')],'as':_0x2573('0x23'),'attributes':['id'],'raw':!![]},{'model':db[_0x2573('0x24')],'as':_0x2573('0x25'),'attributes':['id'],'raw':!![]},{'model':db[_0x2573('0x26')],'as':_0x2573('0x27'),'attributes':['id'],'raw':!![]},{'model':db[_0x2573('0x28')],'as':'SmsInteractions','attributes':['id'],'raw':!![]},{'model':db[_0x2573('0x29')],'as':_0x2573('0x2a'),'attributes':['id'],'raw':!![]},{'model':db[_0x2573('0x2b')],'as':_0x2573('0x2c'),'attributes':['id'],'raw':!![]}]})[_0x2573('0xb')](function(_0x79215a){if(_0x79215a){_0x360c1b=_0x79215a;_0x54fbe3[_0x13f67d](util[_0x2573('0x1d')]('user:%s',_0x79215a[_0x2573('0x3')]));var _0x2410e6=[];switch(_0x79215a[_0x2573('0x6')]){case _0x2573('0x2d'):_0x54fbe3[_0x13f67d](_0x2573('0x2e'));_0x54fbe3[_0x13f67d]('voice:outbound');if(queryQueues[_0x2573('0x2f')](_0x2573('0x30'))){delete queryQueues[_0x2573('0x30')];}_0x2410e6[_0x2573('0x31')](db[_0x2573('0x32')][_0x2573('0x14')](queryQueues));_0x2410e6[_0x2573('0x31')](db['ChatQueue']['findAll'](queryQueues));_0x2410e6[_0x2573('0x31')](db[_0x2573('0x33')][_0x2573('0x14')](queryQueues));_0x2410e6['push'](db[_0x2573('0x34')][_0x2573('0x14')](queryQueues));_0x2410e6[_0x2573('0x31')](db[_0x2573('0x35')][_0x2573('0x14')](queryQueues));_0x2410e6[_0x2573('0x31')](db[_0x2573('0x36')]['findAll'](queryQueues));_0x2410e6[_0x2573('0x31')](db[_0x2573('0x37')]['findAll'](queryQueues));_0x2410e6[_0x2573('0x31')](db[_0x2573('0x5')][_0x2573('0x14')](queryTelephones));_0x2410e6[_0x2573('0x31')](db[_0x2573('0x38')][_0x2573('0x14')](queryTrunks));_0x2410e6[_0x2573('0x31')](db['Campaign'][_0x2573('0x14')](queryCampaigns));_0x2410e6['push'](db['User'][_0x2573('0x14')](queryAgents));break;case _0x2573('0x39'):_0x54fbe3[_0x13f67d](_0x2573('0x2e'));_0x54fbe3[_0x13f67d](_0x2573('0x3a'));_0x2410e6[_0x2573('0x31')](getAssociatedResources(_0x2573('0xd'),_0x79215a[_0x2573('0x3b')],'VoiceQueue'));_0x2410e6[_0x2573('0x31')](getAssociatedResources(_0x2573('0xe'),_0x79215a['userProfileId'],_0x2573('0x3c')));_0x2410e6[_0x2573('0x31')](getAssociatedResources(_0x2573('0xf'),_0x79215a[_0x2573('0x3b')],_0x2573('0x33')));_0x2410e6[_0x2573('0x31')](getAssociatedResources(_0x2573('0x10'),_0x79215a['userProfileId'],_0x2573('0x34')));_0x2410e6[_0x2573('0x31')](getAssociatedResources(_0x2573('0x11'),_0x79215a[_0x2573('0x3b')],'MailQueue'));_0x2410e6[_0x2573('0x31')](getAssociatedResources(_0x2573('0x3d'),_0x79215a[_0x2573('0x3b')],_0x2573('0x36')));_0x2410e6['push'](getAssociatedResources('WhatsappQueues',_0x79215a[_0x2573('0x3b')],_0x2573('0x37')));_0x2410e6[_0x2573('0x31')](getAssociatedResources(_0x2573('0x13'),_0x79215a[_0x2573('0x3b')],'User'));_0x2410e6[_0x2573('0x31')](getAssociatedResources('Trunks',_0x79215a[_0x2573('0x3b')],_0x2573('0x38')));_0x2410e6[_0x2573('0x31')](getAssociatedResources('IvrCampaigns',_0x79215a[_0x2573('0x3b')],_0x2573('0x1b')));_0x2410e6['push'](db[_0x2573('0x5')][_0x2573('0x14')](queryAgents));break;case _0x2573('0x7'):_0x54fbe3[_0x13f67d](_0x2573('0x2e'));_0x54fbe3[_0x13f67d](_0x2573('0x3a'));_0x2410e6[_0x2573('0x31')](_0x79215a[_0x2573('0x3e')]({'attributes':['id',_0x2573('0x3')]}));_0x2410e6[_0x2573('0x31')](_0x79215a[_0x2573('0x3f')]({'attributes':['id',_0x2573('0x3')]}));_0x2410e6[_0x2573('0x31')](_0x79215a[_0x2573('0x40')]({'attributes':['id',_0x2573('0x3')]}));_0x2410e6[_0x2573('0x31')](_0x79215a[_0x2573('0x41')]({'attributes':['id','name']}));_0x2410e6[_0x2573('0x31')](_0x79215a[_0x2573('0x42')]({'attributes':['id',_0x2573('0x3')]}));_0x2410e6[_0x2573('0x31')](_0x79215a[_0x2573('0x43')]({'attributes':['id','name']}));_0x2410e6['push'](_0x79215a[_0x2573('0x44')]({'attributes':['id',_0x2573('0x3')]}));break;}return BPromise[_0x2573('0x45')](_0x2410e6);}})[_0x2573('0xb')](function(_0x11902e){if(_0x11902e&&_0x11902e['length']){for(var _0x1c8ec8=0x0;_0x1c8ec8<_0x11902e[_0x2573('0x46')];_0x1c8ec8+=0x1){for(var _0x4109cf=0x0;_0x4109cf<_0x11902e[_0x1c8ec8][_0x2573('0x46')];_0x4109cf+=0x1){switch(_0x1c8ec8){case 0x0:joinOrLeaveQueues(_0x54fbe3,_0x13f67d,_0x2573('0x47'),_0x11902e[_0x1c8ec8][_0x4109cf]);break;case 0x1:joinOrLeaveQueues(_0x54fbe3,_0x13f67d,'chat',_0x11902e[_0x1c8ec8][_0x4109cf]);break;case 0x2:joinOrLeaveQueues(_0x54fbe3,_0x13f67d,_0x2573('0x48'),_0x11902e[_0x1c8ec8][_0x4109cf]);break;case 0x3:joinOrLeaveQueues(_0x54fbe3,_0x13f67d,_0x2573('0x49'),_0x11902e[_0x1c8ec8][_0x4109cf]);break;case 0x4:joinOrLeaveQueues(_0x54fbe3,_0x13f67d,_0x2573('0x4a'),_0x11902e[_0x1c8ec8][_0x4109cf]);break;case 0x5:joinOrLeaveQueues(_0x54fbe3,_0x13f67d,_0x2573('0x4b'),_0x11902e[_0x1c8ec8][_0x4109cf]);break;case 0x6:joinOrLeaveQueues(_0x54fbe3,_0x13f67d,_0x2573('0x4c'),_0x11902e[_0x1c8ec8][_0x4109cf]);break;case 0x7:if(_0x360c1b[_0x2573('0x6')]!==_0x2573('0x7'))_0x54fbe3[_0x13f67d](util['format'](_0x2573('0x4d'),_0x11902e[_0x1c8ec8][_0x4109cf][_0x2573('0x3')]));break;case 0x8:if(_0x360c1b[_0x2573('0x6')]!==_0x2573('0x7'))_0x54fbe3[_0x13f67d](util[_0x2573('0x1d')]('trunk:%s',_0x11902e[_0x1c8ec8][_0x4109cf]['name']));break;case 0x9:if(_0x360c1b[_0x2573('0x6')]!==_0x2573('0x7'))_0x54fbe3[_0x13f67d](util['format'](_0x2573('0x4e'),_0x11902e[_0x1c8ec8][_0x4109cf][_0x2573('0x8')],_0x11902e[_0x1c8ec8][_0x4109cf][_0x2573('0x3')]));break;case 0xa:_0x54fbe3[_0x13f67d](util[_0x2573('0x1d')](_0x2573('0x1e'),_0x11902e[_0x1c8ec8][_0x4109cf][_0x2573('0x3')]));break;}}}}})['then'](function(){if(_0x13f67d==='leave'){var _0x1903e9=_[_0x2573('0x18')](_0x360c1b['ChatInteractions'],'id');return _0x360c1b['removeChatInteractions'](_0x1903e9)[_0x2573('0xb')](function(){for(var _0x3987b4=0x0;_0x3987b4<_0x1903e9[_0x2573('0x46')];_0x3987b4+=0x1){_0x17adc1['emit'](_0x2573('0x4f'),{'ChatInteractionId':Number(_0x1903e9[_0x3987b4]),'UserId':Number(_0x360c1b['id'])});}});}})[_0x2573('0xb')](function(){if(_0x13f67d==='leave'){var _0x28f666=_[_0x2573('0x18')](_0x360c1b[_0x2573('0x25')],'id');return _0x360c1b[_0x2573('0x50')](_0x28f666)[_0x2573('0xb')](function(){for(var _0x14b1e3=0x0;_0x14b1e3<_0x28f666[_0x2573('0x46')];_0x14b1e3+=0x1){_0x17adc1[_0x2573('0x51')]('user_has_mail_interactions:remove',{'MailInteractionId':Number(_0x28f666[_0x14b1e3]),'UserId':Number(_0x360c1b['id'])});}});}})[_0x2573('0xb')](function(){if(_0x13f67d===_0x2573('0x52')){var _0x5f16f7=_[_0x2573('0x18')](_0x360c1b[_0x2573('0x27')],'id');return _0x360c1b[_0x2573('0x53')](_0x5f16f7)[_0x2573('0xb')](function(){for(var _0x47d9b3=0x0;_0x47d9b3<_0x5f16f7[_0x2573('0x46')];_0x47d9b3+=0x1){_0x17adc1[_0x2573('0x51')](_0x2573('0x54'),{'FaxInteractionId':Number(_0x5f16f7[_0x47d9b3]),'UserId':Number(_0x360c1b['id'])});}});}})[_0x2573('0xb')](function(){if(_0x13f67d===_0x2573('0x52')){var _0x22e8a4=_['map'](_0x360c1b[_0x2573('0x55')],'id');return _0x360c1b['removeSmsInteractions'](_0x22e8a4)[_0x2573('0xb')](function(){for(var _0x294c86=0x0;_0x294c86<_0x22e8a4[_0x2573('0x46')];_0x294c86+=0x1){_0x17adc1[_0x2573('0x51')]('user_has_sms_interactions:remove',{'SmsInteractionId':Number(_0x22e8a4[_0x294c86]),'UserId':Number(_0x360c1b['id'])});}});}})[_0x2573('0xb')](function(){if(_0x13f67d==='leave'){var _0x58394b=_[_0x2573('0x18')](_0x360c1b[_0x2573('0x2a')],'id');return _0x360c1b[_0x2573('0x56')](_0x58394b)[_0x2573('0xb')](function(){for(var _0x413ba2=0x0;_0x413ba2<_0x58394b['length'];_0x413ba2+=0x1){_0x17adc1[_0x2573('0x51')](_0x2573('0x57'),{'OpenchannelInteractionId':Number(_0x58394b[_0x413ba2]),'UserId':Number(_0x360c1b['id'])});}});}})[_0x2573('0xb')](function(){if(_0x13f67d==='leave'){var _0x4e98f1=_['map'](_0x360c1b[_0x2573('0x2c')],'id');return _0x360c1b[_0x2573('0x58')](_0x4e98f1)[_0x2573('0xb')](function(){for(var _0x2d4eb9=0x0;_0x2d4eb9<_0x4e98f1[_0x2573('0x46')];_0x2d4eb9+=0x1){_0x17adc1[_0x2573('0x51')](_0x2573('0x59'),{'WhatsappInteractionId':Number(_0x4e98f1[_0x2d4eb9]),'UserId':Number(_0x360c1b['id'])});}});}})[_0x2573('0x5a')](function(_0x5f0f0b){_0x54fbe3['log'](_0x5f0f0b);});}}function onDisconnect(_0x36de0c,_0x4e4508){joinOrLeave(_0x36de0c,_0x2573('0x52'),_0x4e4508);}function onConnect(_0x3500f8){joinOrLeave(_0x3500f8,_0x2573('0x5b'));}exports[_0x2573('0x5c')]=function(_0x2cff8b){_0x2cff8b['on'](_0x2573('0x5d'),function(_0x33004d){_0x33004d[_0x2573('0x5e')](0x0);_0x33004d[_0x2573('0x5f')]=_0x33004d[_0x2573('0x60')][_0x2573('0x5d')][_0x2573('0x61')]+':'+_0x33004d['request'][_0x2573('0x5d')][_0x2573('0x62')];_0x33004d[_0x2573('0x63')]=new Date();_0x33004d[_0x2573('0x64')]=function(_0x286f10){console[_0x2573('0x64')](_0x2573('0x65')+_0x33004d[_0x2573('0x66')][_0x2573('0x3')]+'['+_0x33004d['address']+']',_0x286f10);};_0x33004d['on'](_0x2573('0x67'),function(){onDisconnect(_0x33004d,_0x2cff8b);_0x33004d['log']('DISCONNECTED');});onConnect(_0x33004d);_0x33004d[_0x2573('0x64')](_0x2573('0x68'));});}; \ No newline at end of file diff --git a/server/config/triggers/index.js b/server/config/triggers/index.js index 5572879..0a94712 100644 --- a/server/config/triggers/index.js +++ b/server/config/triggers/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x47fa=['ChatMessage','newmessage','ChatOfflineMessage','Sms','SmsInteraction','SmsMessage','Whatsapp','WhatsappInteraction','WhatsappMessage','Fax','FaxInteraction','FaxMessage','Mail','MailInteraction','MailMessage','OpenchannelInteraction','Openchannel','OpenchannelMessage','request','EventManager','then','info','Trigger,\x20%s','error','code','catch','get','channel','motionChannel','event','direction','resolve','ContactId','undefined','SELECT\x20*\x20FROM\x20cm_contacts\x20WHERE\x20id\x20=\x20','Sequelize','QueryTypes','SELECT','UserId','interface','SIP/%s','agent','incomingmessage','outgoingmessage','offlineMessage','opened','sequelize','query','name','AfterCreate','changed','closed','substatus','contact','format','AfterUpdate','User','find','email','internal','default','length','model','callback','condition','triggers','http','Chat','ChatInteraction','afterCreate','newinteraction','afterUpdate','closedinteraction'];(function(_0xbaecdc,_0x5c3598){var _0x131154=function(_0xc3e060){while(--_0xc3e060){_0xbaecdc['push'](_0xbaecdc['shift']());}};_0x131154(++_0x5c3598);}(_0x47fa,0x165));var _0xa47f=function(_0x41bfa8,_0x2222f0){_0x41bfa8=_0x41bfa8-0x0;var _0x5a689e=_0x47fa[_0x41bfa8];return _0x5a689e;};'use strict';var util=require('util');var db=require('../../mysqldb')['db'];var jayson=require('jayson/promise');var logger=require('../logger')(_0xa47f('0x0'));var client=jayson['client'][_0xa47f('0x1')]({'port':0x232a});var triggers=[{'channel':_0xa47f('0x2'),'model':_0xa47f('0x3'),'event':_0xa47f('0x4'),'condition':_0xa47f('0x5'),'callback':afterCreate},{'channel':'Chat','model':'ChatInteraction','event':_0xa47f('0x6'),'condition':_0xa47f('0x7'),'callback':afterUpdate},{'channel':_0xa47f('0x2'),'model':_0xa47f('0x8'),'event':_0xa47f('0x4'),'condition':_0xa47f('0x9'),'callback':afterCreateMessage},{'channel':_0xa47f('0x2'),'model':_0xa47f('0xa'),'event':'afterCreate','condition':'newmessage','callback':afterCreateOfflineMessage},{'channel':_0xa47f('0xb'),'model':_0xa47f('0xc'),'event':_0xa47f('0x4'),'condition':_0xa47f('0x5'),'callback':afterCreate},{'channel':_0xa47f('0xb'),'model':_0xa47f('0xc'),'event':_0xa47f('0x6'),'condition':_0xa47f('0x7'),'callback':afterUpdate},{'channel':_0xa47f('0xb'),'model':_0xa47f('0xd'),'event':_0xa47f('0x4'),'condition':'newmessage','callback':afterCreateMessage},{'channel':_0xa47f('0xe'),'model':_0xa47f('0xf'),'event':'afterCreate','condition':_0xa47f('0x5'),'callback':afterCreate},{'channel':'Whatsapp','model':_0xa47f('0xf'),'event':_0xa47f('0x6'),'condition':'closedinteraction','callback':afterUpdate},{'channel':'Whatsapp','model':_0xa47f('0x10'),'event':_0xa47f('0x4'),'condition':_0xa47f('0x9'),'callback':afterCreateMessage},{'channel':_0xa47f('0x11'),'model':_0xa47f('0x12'),'event':_0xa47f('0x4'),'condition':'newinteraction','callback':afterCreate},{'channel':_0xa47f('0x11'),'model':_0xa47f('0x12'),'event':_0xa47f('0x6'),'condition':_0xa47f('0x7'),'callback':afterUpdate},{'channel':'Fax','model':_0xa47f('0x13'),'event':_0xa47f('0x4'),'condition':_0xa47f('0x9'),'callback':afterCreateMessage},{'channel':_0xa47f('0x14'),'model':_0xa47f('0x15'),'event':_0xa47f('0x4'),'condition':_0xa47f('0x5'),'callback':afterCreate},{'channel':_0xa47f('0x14'),'model':_0xa47f('0x15'),'event':_0xa47f('0x6'),'condition':'closedinteraction','callback':afterUpdate},{'channel':_0xa47f('0x14'),'model':_0xa47f('0x16'),'event':'afterCreate','condition':_0xa47f('0x9'),'callback':afterCreateMessage},{'channel':'Openchannel','model':_0xa47f('0x17'),'event':_0xa47f('0x4'),'condition':_0xa47f('0x5'),'callback':afterCreate},{'channel':_0xa47f('0x18'),'model':_0xa47f('0x17'),'event':_0xa47f('0x6'),'condition':_0xa47f('0x7'),'callback':afterUpdate},{'channel':'Openchannel','model':_0xa47f('0x19'),'event':'afterCreate','condition':_0xa47f('0x9'),'callback':afterCreateMessage}];function request(_0x92ebe4){return client[_0xa47f('0x1a')](_0xa47f('0x1b'),_0x92ebe4)[_0xa47f('0x1c')](function(_0x5c42a1){logger[_0xa47f('0x1d')](_0xa47f('0x1e'),_0xa47f('0x1b'),_0x5c42a1);if(_0x5c42a1[_0xa47f('0x1f')]){if(_0x5c42a1[_0xa47f('0x1f')][_0xa47f('0x20')]===0x1f4){logger[_0xa47f('0x1f')](_0xa47f('0x1e'),_0xa47f('0x1b'),_0x5c42a1['error']);}}})[_0xa47f('0x21')](function(_0x120438){logger[_0xa47f('0x1f')](_0xa47f('0x1e'),_0xa47f('0x1b'),_0x120438);});}function afterCreateMessage(_0x31da35){return function(_0x677f08){_0x677f08=_0x677f08[_0xa47f('0x22')]({'plain':!![]});_0x677f08[_0xa47f('0x23')]=_0x31da35;_0x677f08[_0xa47f('0x24')]=_0x31da35;_0x677f08[_0xa47f('0x25')]=_0x677f08[_0xa47f('0x26')];Promise[_0xa47f('0x27')]()[_0xa47f('0x1c')](function(){if(typeof _0x677f08[_0xa47f('0x28')]===_0xa47f('0x29'))return null;var _0x564576=_0xa47f('0x2a')+_0x677f08[_0xa47f('0x28')];return db['sequelize']['query'](_0x564576,{'type':db[_0xa47f('0x2b')][_0xa47f('0x2c')][_0xa47f('0x2d')],'raw':!![]});})['then'](function(_0x27e298){if(_0x27e298){_0x677f08['contact']=_0x27e298[0x0];}if(typeof _0x677f08[_0xa47f('0x2e')]===_0xa47f('0x29'))return;return getAgent(_0x677f08[_0xa47f('0x2e')]);})[_0xa47f('0x1c')](function(_0x3942de){if(_0x3942de){_0x677f08[_0xa47f('0x2f')]=util['format'](_0xa47f('0x30'),_0x3942de['name']);_0x677f08[_0xa47f('0x31')]=_0x3942de;_0x677f08[_0xa47f('0x23')]=_0x31da35;return request({'event':_0xa47f('0x32'),'message':_0x677f08});}else{return request({'event':_0xa47f('0x33'),'message':_0x677f08});}})[_0xa47f('0x21')](function(_0x5ee8f9){logger[_0xa47f('0x1f')](_0xa47f('0x1e'),'AfterCreateMessage',_0x5ee8f9);});};}function afterCreateOfflineMessage(_0x413d8c){return function(_0x4ebb68){_0x4ebb68=_0x4ebb68[_0xa47f('0x22')]({'plain':!![]});_0x4ebb68[_0xa47f('0x23')]=_0x413d8c;_0x4ebb68[_0xa47f('0x24')]=_0x413d8c;_0x4ebb68['event']=_0xa47f('0x34');return request({'event':_0x4ebb68[_0xa47f('0x25')],'message':_0x4ebb68});};}function afterCreate(_0x39ff8e,_0x4a24ca){return function(_0x4ca96c){_0x4ca96c=_0x4ca96c['get']({'plain':!![]});_0x4ca96c[_0xa47f('0x23')]=_0x39ff8e;_0x4ca96c[_0xa47f('0x24')]=_0x39ff8e;_0x4ca96c['event']=_0xa47f('0x35');Promise[_0xa47f('0x27')]()['then'](function(){var _0x1d884e=_0xa47f('0x2a')+_0x4ca96c[_0xa47f('0x28')];return db[_0xa47f('0x36')][_0xa47f('0x37')](_0x1d884e,{'type':db[_0xa47f('0x2b')][_0xa47f('0x2c')]['SELECT'],'raw':!![]});})[_0xa47f('0x1c')](function(_0x1e91e9){if(_0x1e91e9){_0x4ca96c['contact']=_0x1e91e9[0x0];}if(typeof _0x4ca96c['UserId']===_0xa47f('0x29'))return;return getAgent(_0x4ca96c['UserId']);})[_0xa47f('0x1c')](function(_0x424d5f){if(_0x424d5f){_0x4ca96c['interface']=util['format']('SIP/%s',_0x424d5f[_0xa47f('0x38')]);_0x4ca96c[_0xa47f('0x31')]=_0x424d5f;}return request({'event':_0x4a24ca,'message':_0x4ca96c});})['catch'](function(_0x281c6a){logger[_0xa47f('0x1f')](_0xa47f('0x1e'),_0xa47f('0x39'),_0x281c6a);});};}function afterUpdate(_0x1f5225){return function(_0x5a387b){var _0x21da6d=_0x5a387b[_0xa47f('0x3a')](_0xa47f('0x3b'))&&_0x5a387b[_0xa47f('0x3b')];var _0xd97c07=_0x5a387b['changed'](_0xa47f('0x3c'));if(_0x21da6d||_0xd97c07){var _0x5518db=_0x21da6d?_0xa47f('0x7'):'substatus';var _0xed6d7=_0x5a387b['get']({'plain':!![]});_0xed6d7[_0xa47f('0x23')]=_0x1f5225;_0xed6d7[_0xa47f('0x24')]=_0x1f5225;_0xed6d7['event']=_0x21da6d?'closed':_0xa47f('0x3c');var _0x449136='SELECT\x20*\x20FROM\x20cm_contacts\x20WHERE\x20id\x20=\x20'+_0xed6d7['ContactId'];return db[_0xa47f('0x36')][_0xa47f('0x37')](_0x449136,{'type':db['Sequelize']['QueryTypes'][_0xa47f('0x2d')],'raw':!![]})[_0xa47f('0x1c')](function(_0x493a19){if(_0x493a19){_0xed6d7[_0xa47f('0x3d')]=_0x493a19[0x0];}if(typeof _0xed6d7[_0xa47f('0x2e')]===_0xa47f('0x29'))return;return getAgent(_0xed6d7[_0xa47f('0x2e')]);})[_0xa47f('0x1c')](function(_0x10e8f3){if(_0x10e8f3){_0xed6d7[_0xa47f('0x2f')]=util[_0xa47f('0x3e')]('SIP/%s',_0x10e8f3['name']);_0xed6d7['agent']=_0x10e8f3;}return request({'event':_0x5518db,'message':_0xed6d7});})[_0xa47f('0x21')](function(_0x1316be){logger[_0xa47f('0x1f')](_0xa47f('0x1e'),_0xa47f('0x3f'),_0x1316be);});}};}function getAgent(_0x40577a){return db[_0xa47f('0x40')][_0xa47f('0x41')]({'where':{'id':_0x40577a},'attributes':['id',_0xa47f('0x38'),'fullname',_0xa47f('0x42'),_0xa47f('0x43')],'raw':!![]})[_0xa47f('0x1c')](function(_0x11bd8a){return _0x11bd8a;});}exports[_0xa47f('0x44')]=function(){for(var _0x47cb65=0x0;_0x47cb65=_0x19f96f[_0x4a3e('0x13')]){throw Error(_0x4a3e('0x14'));}_0x265154(_0x2c9737);})[_0x4a3e('0x15')](function(_0x1d6df3){_0x3d2af3(_0x1d6df3);});});}; \ No newline at end of file +var _0x1bde=['./license/util','mail','chat','fax','sms','whatsapp','openchannel','getChannels','toLowerCase','clearBlockUser','isUndefined','blockedAt','getLicense','role','agent','User','count','then','agents','Maximum\x20login\x20has\x20been\x20reached','catch','bluebird','../mysqldb'];(function(_0x14add3,_0x13ce8d){var _0x4a174f=function(_0x2b3ed7){while(--_0x2b3ed7){_0x14add3['push'](_0x14add3['shift']());}};_0x4a174f(++_0x13ce8d);}(_0x1bde,0x185));var _0xe1bd=function(_0x2abb6e,_0x3f1e01){_0x2abb6e=_0x2abb6e-0x0;var _0x3de460=_0x1bde[_0x2abb6e];return _0x3de460;};'use strict';var _=require('lodash');var BPromise=require(_0xe1bd('0x0'));var db=require(_0xe1bd('0x1'))['db'];var util=require(_0xe1bd('0x2'));var channels=['voice',_0xe1bd('0x3'),_0xe1bd('0x4'),_0xe1bd('0x5'),_0xe1bd('0x6'),_0xe1bd('0x7'),_0xe1bd('0x8')];exports[_0xe1bd('0x9')]=function(){return channels;};exports['isValidChannel']=function(_0xf0948e){_0xf0948e=_0xf0948e[_0xe1bd('0xa')]();return _['includes'](channels,_0xf0948e);};exports[_0xe1bd('0xb')]=function(_0x5ac2a1,_0x44dfe2,_0x4dda44,_0x4a9960){var _0x5678ce={'loginAttempts':_0x44dfe2,'blocked':_0x4dda44};if(!_[_0xe1bd('0xc')](_0x4a9960)){_0x5678ce[_0xe1bd('0xd')]=_0x4a9960;}return _0x5ac2a1['updateAttributes'](_0x5678ce);};exports[_0xe1bd('0xe')]=function(_0x452cf3){return new BPromise(function(_0x3d455e,_0x7831e1){var _0x5abb42=0x0;if(_0x452cf3[_0xe1bd('0xf')]!==_0xe1bd('0x10')){_0x3d455e(_0x452cf3);}db[_0xe1bd('0x11')][_0xe1bd('0x12')]({'where':{'role':_0xe1bd('0x10'),'online':!![],'id':{'$ne':_0x452cf3['id']}}})[_0xe1bd('0x13')](function(_0x3217dd){_0x5abb42=_0x3217dd;return util[_0xe1bd('0xe')]();})[_0xe1bd('0x13')](function(_0x1ca655){if(_0x1ca655&&_0x1ca655[_0xe1bd('0x14')]&&_0x5abb42>=_0x1ca655[_0xe1bd('0x14')]){throw Error(_0xe1bd('0x15'));}_0x3d455e(_0x452cf3);})[_0xe1bd('0x16')](function(_0xf95ab8){_0x7831e1(_0xf95ab8);});});}; \ No newline at end of file diff --git a/server/errors/api.js b/server/errors/api.js index 8b82224..419f742 100644 --- a/server/errors/api.js +++ b/server/errors/api.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x6f0d=['../config/logger','api','Internal\x20Server\x20Error','name','Error','inherits','Bad\x20Request','message','Not\x20Found','Forbidden','error','status','send','exports'];(function(_0x3ab51d,_0x2fa01d){var _0x29a04e=function(_0x7807b0){while(--_0x7807b0){_0x3ab51d['push'](_0x3ab51d['shift']());}};_0x29a04e(++_0x2fa01d);}(_0x6f0d,0x16c));var _0xd6f0=function(_0xbdb8c5,_0x5c1026){_0xbdb8c5=_0xbdb8c5-0x0;var _0x425468=_0x6f0d[_0xbdb8c5];return _0x425468;};'use strict';var util=require('util');var logger=require(_0xd6f0('0x0'))(_0xd6f0('0x1'));var APIError=function(_0xd1480,_0x107a8c){this['message']=_0xd1480||_0xd6f0('0x2');this[_0xd6f0('0x3')]=_0x107a8c||_0xd6f0('0x4');util[_0xd6f0('0x5')](APIError,Error);};var APIBadRequestError=function(_0x3a757f){this['message']=_0x3a757f||_0xd6f0('0x6');this['name']=_0xd6f0('0x6');util[_0xd6f0('0x5')](APIBadRequestError,APIError);};var APINotFoundError=function(_0x8b89a9){this[_0xd6f0('0x7')]=_0x8b89a9||'Entity\x20not\x20found';this['name']=_0xd6f0('0x8');util[_0xd6f0('0x5')](APINotFoundError,APIError);};function getStatusCode(_0x2854cd){switch(_0x2854cd){case _0xd6f0('0x6'):return 0x190;case _0xd6f0('0x9'),'OutOfInterval':return 0x193;case _0xd6f0('0x8'):return 0x194;default:return 0x1f4;}}function handleError(_0xee144c){return function(_0x329f69){logger[_0xd6f0('0xa')](_0x329f69['stack']);var _0x1ce8d5=getStatusCode(_0x329f69[_0xd6f0('0x3')]);if(_0x329f69[_0xd6f0('0x3')])delete _0x329f69[_0xd6f0('0x3')];return _0xee144c[_0xd6f0('0xb')](_0x1ce8d5)[_0xd6f0('0xc')](_0x329f69);};}module[_0xd6f0('0xd')]={'APIError':APIError,'APIBadRequestError':APIBadRequestError,'APINotFoundError':APINotFoundError,'handleError':handleError}; \ No newline at end of file +var _0xb688=['status','send','exports','../config/logger','api','message','Internal\x20Server\x20Error','Error','inherits','name','Entity\x20not\x20found','Not\x20Found','Bad\x20Request','Forbidden','OutOfInterval','error','stack'];(function(_0x2d460c,_0x4f08c0){var _0xf6fc4c=function(_0x4fb81c){while(--_0x4fb81c){_0x2d460c['push'](_0x2d460c['shift']());}};_0xf6fc4c(++_0x4f08c0);}(_0xb688,0xcf));var _0x8b68=function(_0x47e31e,_0xdebb04){_0x47e31e=_0x47e31e-0x0;var _0x556f36=_0xb688[_0x47e31e];return _0x556f36;};'use strict';var util=require('util');var logger=require(_0x8b68('0x0'))(_0x8b68('0x1'));var APIError=function(_0x266285,_0x1080e8){this[_0x8b68('0x2')]=_0x266285||_0x8b68('0x3');this['name']=_0x1080e8||_0x8b68('0x4');util[_0x8b68('0x5')](APIError,Error);};var APIBadRequestError=function(_0x30f33d){this[_0x8b68('0x2')]=_0x30f33d||'Bad\x20Request';this[_0x8b68('0x6')]='Bad\x20Request';util[_0x8b68('0x5')](APIBadRequestError,APIError);};var APINotFoundError=function(_0x2bbffd){this[_0x8b68('0x2')]=_0x2bbffd||_0x8b68('0x7');this[_0x8b68('0x6')]=_0x8b68('0x8');util[_0x8b68('0x5')](APINotFoundError,APIError);};function getStatusCode(_0x21d944){switch(_0x21d944){case _0x8b68('0x9'):return 0x190;case _0x8b68('0xa'),_0x8b68('0xb'):return 0x193;case _0x8b68('0x8'):return 0x194;default:return 0x1f4;}}function handleError(_0x2a852a){return function(_0x502727){logger[_0x8b68('0xc')](_0x502727[_0x8b68('0xd')]);var _0x5e76c=getStatusCode(_0x502727[_0x8b68('0x6')]);if(_0x502727[_0x8b68('0x6')])delete _0x502727[_0x8b68('0x6')];return _0x2a852a[_0x8b68('0xe')](_0x5e76c)[_0x8b68('0xf')](_0x502727);};}module[_0x8b68('0x10')]={'APIError':APIError,'APIBadRequestError':APIBadRequestError,'APINotFoundError':APINotFoundError,'handleError':handleError}; \ No newline at end of file diff --git a/server/errors/index.js b/server/errors/index.js index a57376d..99f97c4 100644 --- a/server/errors/index.js +++ b/server/errors/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x9720=['render','send','404','status'];(function(_0x1cce9e,_0x454da0){var _0x139bac=function(_0x2b35ce){while(--_0x2b35ce){_0x1cce9e['push'](_0x1cce9e['shift']());}};_0x139bac(++_0x454da0);}(_0x9720,0x86));var _0x0972=function(_0x500419,_0x549162){_0x500419=_0x500419-0x0;var _0x241c1a=_0x9720[_0x500419];return _0x241c1a;};'use strict';module['exports'][0x194]=function pageNotFound(_0x31223c,_0x4e376d){var _0x2128cf=_0x0972('0x0');var _0x224935=0x194;var _0x2eaa16={'status':_0x224935};_0x4e376d[_0x0972('0x1')](_0x2eaa16[_0x0972('0x1')]);_0x4e376d[_0x0972('0x2')](_0x2128cf,{},function(_0xf19859,_0x5aea6a){if(_0xf19859){return _0x4e376d[_0x0972('0x1')](_0x2eaa16['status'])['json'](_0x2eaa16);}_0x4e376d[_0x0972('0x3')](_0x5aea6a);});}; \ No newline at end of file +var _0x8d33=['404','status','json','send','exports'];(function(_0x175bfd,_0x4d47b5){var _0x2753f2=function(_0x4b0a71){while(--_0x4b0a71){_0x175bfd['push'](_0x175bfd['shift']());}};_0x2753f2(++_0x4d47b5);}(_0x8d33,0x144));var _0x38d3=function(_0xd06e94,_0x1c136d){_0xd06e94=_0xd06e94-0x0;var _0x1006dc=_0x8d33[_0xd06e94];return _0x1006dc;};'use strict';module[_0x38d3('0x0')][0x194]=function pageNotFound(_0x329cb0,_0x535c28){var _0x43d6a1=_0x38d3('0x1');var _0x43d7cb=0x194;var _0x4f2d11={'status':_0x43d7cb};_0x535c28[_0x38d3('0x2')](_0x4f2d11[_0x38d3('0x2')]);_0x535c28['render'](_0x43d6a1,{},function(_0x2d7643,_0x2c4538){if(_0x2d7643){return _0x535c28[_0x38d3('0x2')](_0x4f2d11[_0x38d3('0x2')])[_0x38d3('0x3')](_0x4f2d11);}_0x535c28[_0x38d3('0x4')](_0x2c4538);});}; \ No newline at end of file diff --git a/server/mysqldb/index.js b/server/mysqldb/index.js index e617410..0d0cba2 100644 --- a/server/mysqldb/index.js +++ b/server/mysqldb/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xa9e0=['SquareRecording','../api/squareRecording/squareRecording.model','SquareMessage','../api/squareMessage/squareMessage.model','License','Migration','../api/migration/migration.model','Attachment','../api/attachment/attachment.model','Plugin','../api/plugin/plugin.model','ChatTransferReport','../api/chatTransferReport/chatTransferReport.model','FaxTransferReport','../api/faxTransferReport/faxTransferReport.model','OpenchannelTransferReport','../api/openchannelTransferReport/openchannelTransferReport.model','SmsTransferReport','../api/smsTransferReport/smsTransferReport.model','../api/cmList/cmList.model','VoicePrefix','UserProfile','UserProfileSection','UserProfileResource','UserNotification','../api/userNotification/userNotification.model','WhatsappAccount','../api/whatsappAccount/whatsappAccount.model','WhatsappApplication','../api/whatsappApplication/whatsappApplication.model','WhatsappInteraction','../api/whatsappInteraction/whatsappInteraction.model','WhatsappMessage','WhatsappQueueReport','../api/whatsappQueueReport/whatsappQueueReport.model','../api/whatsappTransferReport/whatsappTransferReport.model','WhatsappQueue','../api/whatsappQueue/whatsappQueue.model','CloudProvider','../api/cloudProvider/cloudProvider.model','TeamVoiceQueue','../api/teamVoiceQueue/teamVoiceQueue.model','TeamVoicePrefix','../api/teamVoicePrefix/teamVoicePrefix.model','UserVoicePrefix','../api/userVoicePrefix/userVoicePrefix.model','hasOne','VoiceMail','userSetting','cascade','UserId','hasMany','VoiceRecording','Recordings','VoiceQueuesRt','Extensions','HopperFinals','CmHopperHistory','HopperHistory','OpenchannelInteractions','ChatInteractions','SmsInteractions','FaxInteraction','MailInteraction','MailInteractions','WhatsappInteractions','UserNotifications','SenderId','belongsToMany','Groups','chat_group_has_users','CmContact','Contacts','cm_user_has_contacts','Lists','cm_user_has_lists','Team','user_has_teams','user_has_mail_interactions','FaxInteractions','user_has_fax_interactions','user_has_sms_interactions','user_has_openchannel_interactions','user_has_whatsapp_interactions','VoiceQueues','VoicePrefixes','ChatQueues','UserChatQueue','FaxQueues','SmsQueues','OpenchannelQueue','WhatsappQueues','CmList','ChatWebsites','user_has_chat_websites','user_has_fax_accounts','MailAccounts','user_has_mail_accounts','OpenchannelAccounts','user_has_openchannel_accounts','SmsAccounts','user_has_sms_accounts','WhatsappAccounts','user_has_whatsapp_accounts','ChanSpyId','VoiceContext','Applications','Sounds','moh_has_sounds','Members','VoiceQueueId','Hoppers','HopperBlacks','JscriptySessions','TrunkId','belongsTo','TrunkBackup','TrunkBackupId','IntervalId','mandatoryDispositionPauseId','Teams','BlackLists','voice_queues_has_cm_blacklists','Messages','mailbox','mailboxuser','VoiceCallReport','QueueCalls','uniqueid','VoiceAgentReport','AgentReports','Contact','MailAccountId','CloudProviderId','MailServerOut','restrict','Imap','Smtp','Disposition','Dispositions','Answers','Interactions','MailApplication','List','ListId','TemplateId','mandatoryDispositionPause','Agents','team_has_mail_queues','ContactId','mail_interaction_has_tags','Tags','ThroughTags','Users','MailInteractionId','Attachments','Interaction','ChatWebsiteId','Interval','MailQueueReport','Dashboard','CannedAnswer','FaxAccountId','Exntensions','TagId','FaxInteractionId','Account','Owner','fax_interaction_has_tags','AttachmentId','team_has_fax_queues','SmsAccountId','SmsInteractionId','sms_interaction_has_tags','SmsQueueId','team_has_sms_queues','OpenchannelAccountId','OpenchannelQueueId','OpenchannelInteractionId','team_has_openchannel_queues','ChatProactiveAction','ProactiveActions','Agent','Queue','ChatQueueId','Website','ChatInteractionId','chat_interaction_has_tags','user_has_chat_interactions','ChatOfflineMessageId','team_has_chat_queues','ChatGroupId','CmContactId','HopperHistories','CmCompany','Company','cm_contact_has_tags','CmHopperAdditionalPhone','AdditionalPhones','CmHopperId','Campaign','OwnerId','CampaignId','All','OneAll','OneAny','Actions','ParentId','Intervals','MailApplications','ChatApplications','FaxApplications','SmsApplications','DefaultReportId','CustomReportId','openchannel_interaction_has_tags','whatsapp_interaction_has_tags','CmContactHasItem','ItemType','ItemTypeId','Hopper','AllConditions','AllCondition','TriggerAllId','AnyConditions','AnyCondition','TriggerAnyId','AnalyticCustomReport','Fields','MetricId','Configurations','Subjects','DescriptionId','FieldId','AccountId','Subject','SubjectId','Description','Field','SugarcrmField','Descriptions','VariableId','DeskAccount','ZendeskConfiguration','int_zendesk_configuration_has_tags','FreshdeskAccount','FreshdeskConfiguration','int_freshdesk_configuration_has_tags','VtigerAccount','ServicenowField','ToId','JscriptyQuestionReport','JscriptyProject','ProjectId','MailQueues','OpenchannelQueues','team_has_whatsapp_queues','SquareProjectId','campaigns_has_cm_lists','campaigns_has_cm_blacklists','MailTransferReport','FromMailAccountId','FromAccount','FromAgent','ToUserId','ToAgent','ToMailAccountId','ToAccount','FromChatWebsiteId','FromUserId','ToChatQueueId','ToChatWebsiteId','FromFaxAccountId','ToFaxQueueId','ToQueue','FromSmsAccountId','CmCustomField','CustomFields','voice_queues_has_cm_lists','userProfileId','UserProfileSections','Resources','sectionId','WhatsappAccountId','WhatsappInteractionId','WhatsappTransferReport','FromWhatsappAccountId','ToWhatsappAccountId','ToQueueId','UserSetting','user','../config/environment','sequelize','lodash','motion2','xcall','xC@LL1234','127.0.0.1','utf8mb4','name','utf8','defaultsDeep','mysql','username','password','options','database','sequelizeHistory','User','import','VoiceChanSpy','../api/voiceChanSpy/voiceChanSpy.model','../api/voiceContext/voiceContext.model','VoiceExtension','../api/voiceExtension/voiceExtension.model','VoiceMusicOnHold','../api/voiceMusicOnHold/voiceMusicOnHold.model','VoiceQueue','../api/voiceQueue/voiceQueue.model','ScreenRecording','../api/screenRecording/screenRecording.model','../api/voiceMail/voiceMail.model','VoiceMailMessage','../api/voiceMailMessage/voiceMailMessage.model','../api/voiceCallReport/voiceCallReport.model','VoiceDialReport','../api/voiceDialReport/voiceDialReport.model','../api/voiceAgentReport/voiceAgentReport.model','VoiceQueueReport','../api/voiceQueueReport/voiceQueueReport.model','MemberReport','Trunk','../api/trunk/trunk.model','../api/voiceTransferReport/voiceTransferReport.model','UserVoiceQueueRt','../api/userVoiceQueueRt/userVoiceQueueRt.model','UserVoiceQueue','../api/userVoiceQueue/userVoiceQueue.model','../api/userChatQueue/userChatQueue.model','UserMailQueue','../api/userMailQueue/userMailQueue.model','UserFaxQueue','../api/userFaxQueue/userFaxQueue.model','UserSmsQueue','UserOpenchannelQueue','../api/userOpenchannelQueue/userOpenchannelQueue.model','UserWhatsappQueue','../api/userWhatsappQueue/userWhatsappQueue.model','MailServerIn','../api/mailServerOut/mailServerOut.model','MailAccount','MailQueue','MailSubstatus','MailMessage','../api/mailMessage/mailMessage.model','../api/mailApplication/mailApplication.model','../api/mailQueueReport/mailQueueReport.model','../api/dashboard/dashboard.model','DashboardItem','../api/dashboardItem/dashboardItem.model','FaxAccount','../api/faxAccount/faxAccount.model','FaxApplication','../api/faxApplication/faxApplication.model','../api/faxInteraction/faxInteraction.model','FaxMessage','../api/faxMessage/faxMessage.model','FaxQueue','../api/faxQueue/faxQueue.model','FaxQueueReport','../api/faxQueueReport/faxQueueReport.model','SmsAccount','../api/smsAccount/smsAccount.model','SmsApplication','SmsInteraction','../api/smsInteraction/smsInteraction.model','SmsMessage','../api/smsMessage/smsMessage.model','SmsQueue','../api/smsQueue/smsQueue.model','OpenchannelAccount','../api/openchannelAccount/openchannelAccount.model','OpenchannelApplication','../api/openchannelApplication/openchannelApplication.model','OpenchannelInteraction','OpenchannelMessage','../api/openchannelQueue/openchannelQueue.model','ChatWebsite','../api/chatWebsite/chatWebsite.model','OpenchannelQueueReport','ChatApplication','ChatInteraction','ChatMessage','ChatOfflineMessage','ChatQueue','ChatGroup','../api/chatGroup/chatGroup.model','../api/chatProactiveAction/chatProactiveAction.model','../api/cmCompany/cmCompany.model','../api/cmContact/cmContact.model','CmHopper','../api/cmHopper/cmHopper.model','CmHopperBlack','../api/cmHopperBlack/cmHopperBlack.model','CmHopperFinal','../api/cmHopperFinal/cmHopperFinal.model','ReportAgentPreview','Action','../api/action/action.model','Automation','../api/automation/automation.model','../api/cannedAnswer/cannedAnswer.model','../api/disposition/disposition.model','Condition','../api/condition/condition.model','../api/interval/interval.model','Pause','../api/pause/pause.model','Cdr','../api/cdr/cdr.model','../api/voiceQueuesLog/voiceQueuesLog.model','Schedule','../api/schedule/schedule.model','Sound','../api/sound/sound.model','Tag','../api/tag/tag.model','ContactItemType','../api/contactItemType/contactItemType.model','../api/cmContactHasItem/cmContactHasItem.model','Template','../api/template/template.model','Trigger','Variable','../api/variable/variable.model','Integration','../api/integration/integration.model','../api/integrationReport/integrationReport.model','../api/analyticCustomReport/analyticCustomReport.model','AnalyticDefaultReport','../api/analyticDefaultReport/analyticDefaultReport.model','AnalyticExtractedReport','../api/analyticExtractedReport/analyticExtractedReport.model','AnalyticMetric','AnalyticFieldReport','../api/analyticFieldReport/analyticFieldReport.model','../api/analyticTreeReport/analyticTreeReport.model','SalesforceAccount','../api/intSalesforceAccount/intSalesforceAccount.model','SalesforceConfiguration','../api/intSalesforceConfiguration/intSalesforceConfiguration.model','SalesforceField','SugarcrmAccount','SugarcrmConfiguration','../api/intSugarcrmConfiguration/intSugarcrmConfiguration.model','../api/intSugarcrmField/intSugarcrmField.model','../api/intDeskAccount/intDeskAccount.model','DeskConfiguration','../api/intDeskConfiguration/intDeskConfiguration.model','DeskField','../api/intDeskField/intDeskField.model','ZohoAccount','../api/intZohoAccount/intZohoAccount.model','ZohoConfiguration','../api/intZohoConfiguration/intZohoConfiguration.model','ZohoField','ZendeskAccount','../api/intZendeskAccount/intZendeskAccount.model','../api/intZendeskConfiguration/intZendeskConfiguration.model','ZendeskField','../api/intZendeskField/intZendeskField.model','../api/intFreshdeskConfiguration/intFreshdeskConfiguration.model','FreshdeskField','../api/intFreshdeskField/intFreshdeskField.model','../api/intVtigerAccount/intVtigerAccount.model','VtigerConfiguration','VtigerField','ServicenowAccount','../api/intServicenowAccount/intServicenowAccount.model','ServicenowConfiguration','../api/intServicenowConfiguration/intServicenowConfiguration.model','Dynamics365Account','Dynamics365Configuration','../api/intDynamics365Configuration/intDynamics365Configuration.model','Dynamics365Field','../api/intDynamics365Field/intDynamics365Field.model','FreshsalesAccount','../api/intFreshsalesAccount/intFreshsalesAccount.model','FreshsalesConfiguration','../api/intFreshsalesConfiguration/intFreshsalesConfiguration.model','FreshsalesField','../api/intFreshsalesField/intFreshsalesField.model','../api/network/network.model','ChatQueueReport','../api/chatQueueReport/chatQueueReport.model','ChatInternalMessage','JscriptyAnswerReport','../api/jscriptyAnswerReport/jscriptyAnswerReport.model','../api/jscriptyQuestionReport/jscriptyQuestionReport.model','JscriptySessionReport','../api/jscriptySessionReport/jscriptySessionReport.model','SmsQueueReport','../api/smsQueueReport/smsQueueReport.model','SquareReport','../api/squareReport/squareReport.model','SquareDetailsReport','../api/squareReportDetail/squareReportDetail.model','../api/jscriptyProject/jscriptyProject.model','Setting','../api/setting/setting.model','../api/squareOdbc/squareOdbc.model','SquareProject'];(function(_0x226ad1,_0x2858e2){var _0x16b625=function(_0x4dc555){while(--_0x4dc555){_0x226ad1['push'](_0x226ad1['shift']());}};_0x16b625(++_0x2858e2);}(_0xa9e0,0x123));var _0x0a9e=function(_0x28947d,_0x4cc9c6){_0x28947d=_0x28947d-0x0;var _0x12d2ee=_0xa9e0[_0x28947d];return _0x12d2ee;};'use strict';var config=require(_0x0a9e('0x0'));var Sequelize=require(_0x0a9e('0x1'));var _=require(_0x0a9e('0x2'));var jstz=require('jstz');var timezone=jstz['determine']();config[_0x0a9e('0x1')]=_['defaultsDeep'](config[_0x0a9e('0x1')],{'database':_0x0a9e('0x3'),'username':_0x0a9e('0x4'),'password':_0x0a9e('0x5'),'options':{'host':_0x0a9e('0x6'),'port':0xcea,'dialect':'mysql','dialectOptions':{'charset':_0x0a9e('0x7')},'logging':![],'timezone':timezone[_0x0a9e('0x8')](),'define':{'charset':_0x0a9e('0x9'),'collate':'utf8_general_ci'}}});config['sequelizeHistory']=_[_0x0a9e('0xa')](config['sequelizeHistory'],{'database':'motion2','username':_0x0a9e('0x4'),'password':_0x0a9e('0x5'),'options':{'host':_0x0a9e('0x6'),'port':0xcea,'dialect':_0x0a9e('0xb'),'dialectOptions':{'charset':_0x0a9e('0x7')},'logging':![],'timezone':timezone[_0x0a9e('0x8')](),'define':{'charset':'utf8','collate':'utf8_general_ci'}}});var db={'Sequelize':Sequelize,'sequelize':new Sequelize(config['sequelize']['database'],config[_0x0a9e('0x1')][_0x0a9e('0xc')],config[_0x0a9e('0x1')][_0x0a9e('0xd')],config[_0x0a9e('0x1')][_0x0a9e('0xe')])};var dbH={'Sequelize':Sequelize,'sequelize':new Sequelize(config['sequelizeHistory'][_0x0a9e('0xf')],config[_0x0a9e('0x10')][_0x0a9e('0xc')],config[_0x0a9e('0x10')][_0x0a9e('0xd')],config[_0x0a9e('0x10')]['options'])};db[_0x0a9e('0x11')]=db['sequelize'][_0x0a9e('0x12')]('../api/user/user.model');db[_0x0a9e('0x13')]=db[_0x0a9e('0x1')]['import'](_0x0a9e('0x14'));db['VoiceContext']=db[_0x0a9e('0x1')][_0x0a9e('0x12')](_0x0a9e('0x15'));db[_0x0a9e('0x16')]=db[_0x0a9e('0x1')][_0x0a9e('0x12')](_0x0a9e('0x17'));db[_0x0a9e('0x18')]=db[_0x0a9e('0x1')][_0x0a9e('0x12')](_0x0a9e('0x19'));db[_0x0a9e('0x1a')]=db['sequelize'][_0x0a9e('0x12')](_0x0a9e('0x1b'));db['VoiceRecording']=db[_0x0a9e('0x1')]['import']('../api/voiceRecording/voiceRecording.model');db[_0x0a9e('0x1c')]=db[_0x0a9e('0x1')][_0x0a9e('0x12')](_0x0a9e('0x1d'));db['VoiceMail']=db[_0x0a9e('0x1')][_0x0a9e('0x12')](_0x0a9e('0x1e'));db[_0x0a9e('0x1f')]=db[_0x0a9e('0x1')][_0x0a9e('0x12')](_0x0a9e('0x20'));db['VoiceCallReport']=db['sequelize'][_0x0a9e('0x12')](_0x0a9e('0x21'));db[_0x0a9e('0x22')]=db[_0x0a9e('0x1')]['import'](_0x0a9e('0x23'));db['VoiceAgentReport']=db[_0x0a9e('0x1')]['import'](_0x0a9e('0x24'));db[_0x0a9e('0x25')]=db[_0x0a9e('0x1')][_0x0a9e('0x12')](_0x0a9e('0x26'));db[_0x0a9e('0x27')]=db[_0x0a9e('0x1')][_0x0a9e('0x12')]('../api/memberReport/memberReport.model');db[_0x0a9e('0x28')]=db[_0x0a9e('0x1')][_0x0a9e('0x12')](_0x0a9e('0x29'));db['VoiceTransferReport']=db[_0x0a9e('0x1')][_0x0a9e('0x12')](_0x0a9e('0x2a'));db[_0x0a9e('0x2b')]=db[_0x0a9e('0x1')][_0x0a9e('0x12')](_0x0a9e('0x2c'));db[_0x0a9e('0x2d')]=db[_0x0a9e('0x1')]['import'](_0x0a9e('0x2e'));db['UserChatQueue']=db[_0x0a9e('0x1')][_0x0a9e('0x12')](_0x0a9e('0x2f'));db[_0x0a9e('0x30')]=db[_0x0a9e('0x1')]['import'](_0x0a9e('0x31'));db[_0x0a9e('0x32')]=db[_0x0a9e('0x1')][_0x0a9e('0x12')](_0x0a9e('0x33'));db[_0x0a9e('0x34')]=db[_0x0a9e('0x1')][_0x0a9e('0x12')]('../api/userSmsQueue/userSmsQueue.model');db[_0x0a9e('0x35')]=db['sequelize'][_0x0a9e('0x12')](_0x0a9e('0x36'));db[_0x0a9e('0x37')]=db[_0x0a9e('0x1')]['import'](_0x0a9e('0x38'));db[_0x0a9e('0x39')]=db[_0x0a9e('0x1')][_0x0a9e('0x12')]('../api/mailServerIn/mailServerIn.model');db['MailServerOut']=db[_0x0a9e('0x1')]['import'](_0x0a9e('0x3a'));db[_0x0a9e('0x3b')]=db[_0x0a9e('0x1')][_0x0a9e('0x12')]('../api/mailAccount/mailAccount.model');db[_0x0a9e('0x3c')]=db[_0x0a9e('0x1')][_0x0a9e('0x12')]('../api/mailQueue/mailQueue.model');db[_0x0a9e('0x3d')]=db[_0x0a9e('0x1')][_0x0a9e('0x12')]('../api/mailSubstatus/mailSubstatus.model');db['MailInteraction']=db[_0x0a9e('0x1')][_0x0a9e('0x12')]('../api/mailInteraction/mailInteraction.model');db[_0x0a9e('0x3e')]=db[_0x0a9e('0x1')][_0x0a9e('0x12')](_0x0a9e('0x3f'));db['MailApplication']=db['sequelize'][_0x0a9e('0x12')](_0x0a9e('0x40'));db['MailQueueReport']=db[_0x0a9e('0x1')][_0x0a9e('0x12')](_0x0a9e('0x41'));db['Dashboard']=db[_0x0a9e('0x1')][_0x0a9e('0x12')](_0x0a9e('0x42'));db[_0x0a9e('0x43')]=db[_0x0a9e('0x1')][_0x0a9e('0x12')](_0x0a9e('0x44'));db[_0x0a9e('0x45')]=db[_0x0a9e('0x1')][_0x0a9e('0x12')](_0x0a9e('0x46'));db[_0x0a9e('0x47')]=db[_0x0a9e('0x1')][_0x0a9e('0x12')](_0x0a9e('0x48'));db['FaxInteraction']=db['sequelize'][_0x0a9e('0x12')](_0x0a9e('0x49'));db[_0x0a9e('0x4a')]=db[_0x0a9e('0x1')][_0x0a9e('0x12')](_0x0a9e('0x4b'));db[_0x0a9e('0x4c')]=db[_0x0a9e('0x1')][_0x0a9e('0x12')](_0x0a9e('0x4d'));db[_0x0a9e('0x4e')]=db[_0x0a9e('0x1')]['import'](_0x0a9e('0x4f'));db[_0x0a9e('0x50')]=db[_0x0a9e('0x1')][_0x0a9e('0x12')](_0x0a9e('0x51'));db[_0x0a9e('0x52')]=db[_0x0a9e('0x1')][_0x0a9e('0x12')]('../api/smsApplication/smsApplication.model');db[_0x0a9e('0x53')]=db['sequelize'][_0x0a9e('0x12')](_0x0a9e('0x54'));db[_0x0a9e('0x55')]=db['sequelize'][_0x0a9e('0x12')](_0x0a9e('0x56'));db[_0x0a9e('0x57')]=db[_0x0a9e('0x1')][_0x0a9e('0x12')](_0x0a9e('0x58'));db[_0x0a9e('0x59')]=db['sequelize'][_0x0a9e('0x12')](_0x0a9e('0x5a'));db[_0x0a9e('0x5b')]=db[_0x0a9e('0x1')][_0x0a9e('0x12')](_0x0a9e('0x5c'));db[_0x0a9e('0x5d')]=db[_0x0a9e('0x1')][_0x0a9e('0x12')]('../api/openchannelInteraction/openchannelInteraction.model');db[_0x0a9e('0x5e')]=db[_0x0a9e('0x1')]['import']('../api/openchannelMessage/openchannelMessage.model');db['OpenchannelQueue']=db[_0x0a9e('0x1')][_0x0a9e('0x12')](_0x0a9e('0x5f'));db[_0x0a9e('0x60')]=db[_0x0a9e('0x1')][_0x0a9e('0x12')](_0x0a9e('0x61'));db[_0x0a9e('0x62')]=db['sequelize']['import']('../api/openchannelQueueReport/openchannelQueueReport.model');db[_0x0a9e('0x63')]=db[_0x0a9e('0x1')][_0x0a9e('0x12')]('../api/chatApplication/chatApplication.model');db[_0x0a9e('0x64')]=db[_0x0a9e('0x1')]['import']('../api/chatInteraction/chatInteraction.model');db[_0x0a9e('0x65')]=db['sequelize'][_0x0a9e('0x12')]('../api/chatMessage/chatMessage.model');db[_0x0a9e('0x66')]=db[_0x0a9e('0x1')][_0x0a9e('0x12')]('../api/chatOfflineMessage/chatOfflineMessage.model');db[_0x0a9e('0x67')]=db[_0x0a9e('0x1')]['import']('../api/chatQueue/chatQueue.model');db[_0x0a9e('0x68')]=db[_0x0a9e('0x1')]['import'](_0x0a9e('0x69'));db['ChatProactiveAction']=db[_0x0a9e('0x1')]['import'](_0x0a9e('0x6a'));db['CmCompany']=db['sequelize']['import'](_0x0a9e('0x6b'));db['CmContact']=db[_0x0a9e('0x1')][_0x0a9e('0x12')](_0x0a9e('0x6c'));db[_0x0a9e('0x6d')]=db[_0x0a9e('0x1')][_0x0a9e('0x12')](_0x0a9e('0x6e'));db[_0x0a9e('0x6f')]=db['sequelize'][_0x0a9e('0x12')](_0x0a9e('0x70'));db[_0x0a9e('0x71')]=db[_0x0a9e('0x1')][_0x0a9e('0x12')](_0x0a9e('0x72'));db['CmHopperHistory']=db[_0x0a9e('0x1')][_0x0a9e('0x12')]('../api/cmHopperHistory/cmHopperHistory.model');db[_0x0a9e('0x73')]=db['sequelize'][_0x0a9e('0x12')]('../api/reportAgentPreview/reportAgentPreview.model');db['CmCustomField']=db['sequelize'][_0x0a9e('0x12')]('../api/cmCustomField/cmCustomField.model');db[_0x0a9e('0x74')]=db[_0x0a9e('0x1')][_0x0a9e('0x12')](_0x0a9e('0x75'));db[_0x0a9e('0x76')]=db[_0x0a9e('0x1')]['import'](_0x0a9e('0x77'));db['CannedAnswer']=db[_0x0a9e('0x1')][_0x0a9e('0x12')](_0x0a9e('0x78'));db['Disposition']=db[_0x0a9e('0x1')][_0x0a9e('0x12')](_0x0a9e('0x79'));db[_0x0a9e('0x7a')]=db['sequelize'][_0x0a9e('0x12')](_0x0a9e('0x7b'));db['Interval']=db[_0x0a9e('0x1')][_0x0a9e('0x12')](_0x0a9e('0x7c'));db[_0x0a9e('0x7d')]=db[_0x0a9e('0x1')]['import'](_0x0a9e('0x7e'));db[_0x0a9e('0x7f')]=db[_0x0a9e('0x1')]['import'](_0x0a9e('0x80'));db['VoiceQueuesLog']=db['sequelize'][_0x0a9e('0x12')](_0x0a9e('0x81'));db[_0x0a9e('0x82')]=db[_0x0a9e('0x1')][_0x0a9e('0x12')](_0x0a9e('0x83'));db[_0x0a9e('0x84')]=db[_0x0a9e('0x1')][_0x0a9e('0x12')](_0x0a9e('0x85'));db[_0x0a9e('0x86')]=db[_0x0a9e('0x1')][_0x0a9e('0x12')](_0x0a9e('0x87'));db[_0x0a9e('0x88')]=db[_0x0a9e('0x1')][_0x0a9e('0x12')](_0x0a9e('0x89'));db['CmContactHasItem']=db[_0x0a9e('0x1')][_0x0a9e('0x12')](_0x0a9e('0x8a'));db['CmHopperAdditionalPhone']=db[_0x0a9e('0x1')][_0x0a9e('0x12')]('../api/cmHopperAdditionalPhone/cmHopperAdditionalPhone.model');db[_0x0a9e('0x8b')]=db[_0x0a9e('0x1')][_0x0a9e('0x12')](_0x0a9e('0x8c'));db[_0x0a9e('0x8d')]=db['sequelize']['import']('../api/trigger/trigger.model');db[_0x0a9e('0x8e')]=db[_0x0a9e('0x1')][_0x0a9e('0x12')](_0x0a9e('0x8f'));db[_0x0a9e('0x90')]=db[_0x0a9e('0x1')][_0x0a9e('0x12')](_0x0a9e('0x91'));db['IntegrationReport']=db[_0x0a9e('0x1')][_0x0a9e('0x12')](_0x0a9e('0x92'));db['AnalyticCustomReport']=db[_0x0a9e('0x1')]['import'](_0x0a9e('0x93'));db[_0x0a9e('0x94')]=db['sequelize'][_0x0a9e('0x12')](_0x0a9e('0x95'));db[_0x0a9e('0x96')]=db[_0x0a9e('0x1')]['import'](_0x0a9e('0x97'));db[_0x0a9e('0x98')]=db[_0x0a9e('0x1')][_0x0a9e('0x12')]('../api/analyticMetric/analyticMetric.model');db[_0x0a9e('0x99')]=db[_0x0a9e('0x1')][_0x0a9e('0x12')](_0x0a9e('0x9a'));db['AnalyticTreeReport']=db[_0x0a9e('0x1')][_0x0a9e('0x12')](_0x0a9e('0x9b'));db[_0x0a9e('0x9c')]=db[_0x0a9e('0x1')][_0x0a9e('0x12')](_0x0a9e('0x9d'));db[_0x0a9e('0x9e')]=db[_0x0a9e('0x1')][_0x0a9e('0x12')](_0x0a9e('0x9f'));db[_0x0a9e('0xa0')]=db[_0x0a9e('0x1')][_0x0a9e('0x12')]('../api/intSalesforceField/intSalesforceField.model');db[_0x0a9e('0xa1')]=db[_0x0a9e('0x1')][_0x0a9e('0x12')]('../api/intSugarcrmAccount/intSugarcrmAccount.model');db[_0x0a9e('0xa2')]=db[_0x0a9e('0x1')][_0x0a9e('0x12')](_0x0a9e('0xa3'));db['SugarcrmField']=db['sequelize'][_0x0a9e('0x12')](_0x0a9e('0xa4'));db['DeskAccount']=db[_0x0a9e('0x1')]['import'](_0x0a9e('0xa5'));db[_0x0a9e('0xa6')]=db['sequelize'][_0x0a9e('0x12')](_0x0a9e('0xa7'));db[_0x0a9e('0xa8')]=db[_0x0a9e('0x1')][_0x0a9e('0x12')](_0x0a9e('0xa9'));db[_0x0a9e('0xaa')]=db['sequelize'][_0x0a9e('0x12')](_0x0a9e('0xab'));db[_0x0a9e('0xac')]=db[_0x0a9e('0x1')]['import'](_0x0a9e('0xad'));db[_0x0a9e('0xae')]=db['sequelize'][_0x0a9e('0x12')]('../api/intZohoField/intZohoField.model');db[_0x0a9e('0xaf')]=db[_0x0a9e('0x1')][_0x0a9e('0x12')](_0x0a9e('0xb0'));db['ZendeskConfiguration']=db['sequelize'][_0x0a9e('0x12')](_0x0a9e('0xb1'));db[_0x0a9e('0xb2')]=db['sequelize'][_0x0a9e('0x12')](_0x0a9e('0xb3'));db['FreshdeskAccount']=db['sequelize'][_0x0a9e('0x12')]('../api/intFreshdeskAccount/intFreshdeskAccount.model');db['FreshdeskConfiguration']=db['sequelize'][_0x0a9e('0x12')](_0x0a9e('0xb4'));db[_0x0a9e('0xb5')]=db[_0x0a9e('0x1')][_0x0a9e('0x12')](_0x0a9e('0xb6'));db['VtigerAccount']=db[_0x0a9e('0x1')]['import'](_0x0a9e('0xb7'));db[_0x0a9e('0xb8')]=db[_0x0a9e('0x1')][_0x0a9e('0x12')]('../api/intVtigerConfiguration/intVtigerConfiguration.model');db[_0x0a9e('0xb9')]=db[_0x0a9e('0x1')][_0x0a9e('0x12')]('../api/intVtigerField/intVtigerField.model');db[_0x0a9e('0xba')]=db[_0x0a9e('0x1')][_0x0a9e('0x12')](_0x0a9e('0xbb'));db[_0x0a9e('0xbc')]=db[_0x0a9e('0x1')][_0x0a9e('0x12')](_0x0a9e('0xbd'));db['ServicenowField']=db[_0x0a9e('0x1')][_0x0a9e('0x12')]('../api/intServicenowField/intServicenowField.model');db[_0x0a9e('0xbe')]=db[_0x0a9e('0x1')][_0x0a9e('0x12')]('../api/intDynamics365Account/intDynamics365Account.model');db[_0x0a9e('0xbf')]=db['sequelize'][_0x0a9e('0x12')](_0x0a9e('0xc0'));db[_0x0a9e('0xc1')]=db[_0x0a9e('0x1')][_0x0a9e('0x12')](_0x0a9e('0xc2'));db[_0x0a9e('0xc3')]=db[_0x0a9e('0x1')]['import'](_0x0a9e('0xc4'));db[_0x0a9e('0xc5')]=db[_0x0a9e('0x1')][_0x0a9e('0x12')](_0x0a9e('0xc6'));db[_0x0a9e('0xc7')]=db[_0x0a9e('0x1')][_0x0a9e('0x12')](_0x0a9e('0xc8'));db[_0x0a9e('0x90')]=db[_0x0a9e('0x1')][_0x0a9e('0x12')](_0x0a9e('0x91'));db['Network']=db[_0x0a9e('0x1')][_0x0a9e('0x12')](_0x0a9e('0xc9'));db[_0x0a9e('0xca')]=db[_0x0a9e('0x1')]['import'](_0x0a9e('0xcb'));db[_0x0a9e('0xcc')]=db['sequelize'][_0x0a9e('0x12')]('../api/chatInternalMessage/chatInternalMessage.model');db[_0x0a9e('0xcd')]=db[_0x0a9e('0x1')][_0x0a9e('0x12')](_0x0a9e('0xce'));db['JscriptyQuestionReport']=db[_0x0a9e('0x1')]['import'](_0x0a9e('0xcf'));db[_0x0a9e('0xd0')]=db['sequelize'][_0x0a9e('0x12')](_0x0a9e('0xd1'));db[_0x0a9e('0xd2')]=db['sequelize']['import'](_0x0a9e('0xd3'));db[_0x0a9e('0xd4')]=db[_0x0a9e('0x1')][_0x0a9e('0x12')](_0x0a9e('0xd5'));db[_0x0a9e('0xd6')]=db[_0x0a9e('0x1')][_0x0a9e('0x12')](_0x0a9e('0xd7'));db['JscriptyProject']=db[_0x0a9e('0x1')]['import'](_0x0a9e('0xd8'));db[_0x0a9e('0xd9')]=db[_0x0a9e('0x1')][_0x0a9e('0x12')](_0x0a9e('0xda'));db['SquareOdbc']=db[_0x0a9e('0x1')][_0x0a9e('0x12')](_0x0a9e('0xdb'));db[_0x0a9e('0xdc')]=db[_0x0a9e('0x1')]['import']('../api/squareProject/squareProject.model');db[_0x0a9e('0xdd')]=db['sequelize'][_0x0a9e('0x12')](_0x0a9e('0xde'));db[_0x0a9e('0xdf')]=db[_0x0a9e('0x1')][_0x0a9e('0x12')](_0x0a9e('0xe0'));db['Team']=db['sequelize'][_0x0a9e('0x12')]('../api/team/team.model');db[_0x0a9e('0xe1')]=db['sequelize'][_0x0a9e('0x12')]('../api/license/license.model');db['Campaign']=db[_0x0a9e('0x1')][_0x0a9e('0x12')]('../api/campaign/campaign.model');db[_0x0a9e('0xe2')]=db[_0x0a9e('0x1')][_0x0a9e('0x12')](_0x0a9e('0xe3'));db[_0x0a9e('0xe4')]=db['sequelize']['import'](_0x0a9e('0xe5'));db[_0x0a9e('0xe6')]=db[_0x0a9e('0x1')][_0x0a9e('0x12')](_0x0a9e('0xe7'));db['MailTransferReport']=db[_0x0a9e('0x1')][_0x0a9e('0x12')]('../api/mailTransferReport/mailTransferReport.model');db[_0x0a9e('0xe8')]=db[_0x0a9e('0x1')][_0x0a9e('0x12')](_0x0a9e('0xe9'));db[_0x0a9e('0xea')]=db[_0x0a9e('0x1')][_0x0a9e('0x12')](_0x0a9e('0xeb'));db[_0x0a9e('0xec')]=db[_0x0a9e('0x1')]['import'](_0x0a9e('0xed'));db[_0x0a9e('0xee')]=db[_0x0a9e('0x1')][_0x0a9e('0x12')](_0x0a9e('0xef'));db['CmList']=db['sequelize'][_0x0a9e('0x12')](_0x0a9e('0xf0'));db[_0x0a9e('0xf1')]=db[_0x0a9e('0x1')][_0x0a9e('0x12')]('../api/voicePrefix/voicePrefix.model');db[_0x0a9e('0xf2')]=db[_0x0a9e('0x1')][_0x0a9e('0x12')]('../api/userProfile/userProfile.model');db[_0x0a9e('0xf3')]=db['sequelize'][_0x0a9e('0x12')]('../api/userProfileSection/userProfileSection.model');db[_0x0a9e('0xf4')]=db[_0x0a9e('0x1')][_0x0a9e('0x12')]('../api/userProfileResource/userProfileResource.model');db[_0x0a9e('0xf5')]=db['sequelize'][_0x0a9e('0x12')](_0x0a9e('0xf6'));db[_0x0a9e('0xf7')]=db[_0x0a9e('0x1')][_0x0a9e('0x12')](_0x0a9e('0xf8'));db[_0x0a9e('0xf9')]=db[_0x0a9e('0x1')][_0x0a9e('0x12')](_0x0a9e('0xfa'));db[_0x0a9e('0xfb')]=db[_0x0a9e('0x1')][_0x0a9e('0x12')](_0x0a9e('0xfc'));db[_0x0a9e('0xfd')]=db[_0x0a9e('0x1')]['import']('../api/whatsappMessage/whatsappMessage.model');db[_0x0a9e('0xfe')]=db['sequelize'][_0x0a9e('0x12')](_0x0a9e('0xff'));db['WhatsappTransferReport']=db[_0x0a9e('0x1')][_0x0a9e('0x12')](_0x0a9e('0x100'));db[_0x0a9e('0x101')]=db['sequelize'][_0x0a9e('0x12')](_0x0a9e('0x102'));db[_0x0a9e('0x103')]=db[_0x0a9e('0x1')]['import'](_0x0a9e('0x104'));db[_0x0a9e('0x105')]=db[_0x0a9e('0x1')]['import'](_0x0a9e('0x106'));db[_0x0a9e('0x107')]=db[_0x0a9e('0x1')]['import'](_0x0a9e('0x108'));db[_0x0a9e('0x109')]=db[_0x0a9e('0x1')][_0x0a9e('0x12')](_0x0a9e('0x10a'));db['UserSetting']=db[_0x0a9e('0x1')][_0x0a9e('0x12')]('../api/user-setting/user-setting.model');db[_0x0a9e('0x11')][_0x0a9e('0x10b')](db[_0x0a9e('0x10c')],{'as':'VoiceMail','onDelete':'cascade','foreignKey':'UserId'});db[_0x0a9e('0x11')][_0x0a9e('0x10b')](db['UserSetting'],{'as':_0x0a9e('0x10d'),'onDelete':_0x0a9e('0x10e'),'foreignKey':_0x0a9e('0x10f')});db['User'][_0x0a9e('0x110')](db[_0x0a9e('0x111')],{'as':_0x0a9e('0x112'),'foreignKey':_0x0a9e('0x10f')});db[_0x0a9e('0x11')][_0x0a9e('0x110')](db[_0x0a9e('0x2b')],{'as':_0x0a9e('0x113'),'foreignKey':_0x0a9e('0x10f')});db['User'][_0x0a9e('0x110')](db['VoiceExtension'],{'as':_0x0a9e('0x114'),'onDelete':_0x0a9e('0x10e'),'hooks':!![]});db[_0x0a9e('0x11')][_0x0a9e('0x110')](db[_0x0a9e('0x71')],{'as':_0x0a9e('0x115'),'foreignKey':'UserId'});db[_0x0a9e('0x11')][_0x0a9e('0x110')](db[_0x0a9e('0x116')],{'as':_0x0a9e('0x117'),'foreignKey':'UserId'});db[_0x0a9e('0x11')][_0x0a9e('0x110')](db[_0x0a9e('0x73')],{'as':_0x0a9e('0x73'),'foreignKey':_0x0a9e('0x10f')});db[_0x0a9e('0x11')][_0x0a9e('0x110')](db[_0x0a9e('0x5d')],{'as':_0x0a9e('0x118'),'foreignKey':_0x0a9e('0x10f')});db['User'][_0x0a9e('0x110')](db[_0x0a9e('0x64')],{'as':_0x0a9e('0x119'),'foreignKey':_0x0a9e('0x10f')});db[_0x0a9e('0x11')][_0x0a9e('0x110')](db[_0x0a9e('0x53')],{'as':_0x0a9e('0x11a'),'foreignKey':'UserId'});db[_0x0a9e('0x11')][_0x0a9e('0x110')](db[_0x0a9e('0x11b')],{'as':'FaxInteractions','foreignKey':_0x0a9e('0x10f')});db[_0x0a9e('0x11')][_0x0a9e('0x110')](db[_0x0a9e('0x11c')],{'as':_0x0a9e('0x11d'),'foreignKey':_0x0a9e('0x10f')});db[_0x0a9e('0x11')][_0x0a9e('0x110')](db[_0x0a9e('0xfb')],{'as':_0x0a9e('0x11e'),'foreignKey':'UserId'});db[_0x0a9e('0x11')][_0x0a9e('0x110')](db[_0x0a9e('0xf5')],{'as':_0x0a9e('0x11f'),'foreignKey':_0x0a9e('0x120')});db[_0x0a9e('0x11')]['belongsTo'](db[_0x0a9e('0xf2')],{'as':'UserProfile','foreignKey':'userProfileId'});db['User'][_0x0a9e('0x121')](db[_0x0a9e('0x68')],{'as':_0x0a9e('0x122'),'through':_0x0a9e('0x123')});db['User'][_0x0a9e('0x121')](db[_0x0a9e('0x124')],{'as':_0x0a9e('0x125'),'through':_0x0a9e('0x126')});db[_0x0a9e('0x11')]['belongsToMany'](db['CmList'],{'as':_0x0a9e('0x127'),'through':_0x0a9e('0x128')});db[_0x0a9e('0x11')]['belongsToMany'](db[_0x0a9e('0x129')],{'through':_0x0a9e('0x12a')});db[_0x0a9e('0x11')]['belongsToMany'](db[_0x0a9e('0x11c')],{'as':_0x0a9e('0x11d'),'through':_0x0a9e('0x12b')});db['User'][_0x0a9e('0x121')](db[_0x0a9e('0x64')],{'as':_0x0a9e('0x119'),'through':'user_has_chat_interactions'});db['User']['belongsToMany'](db[_0x0a9e('0x11b')],{'as':_0x0a9e('0x12c'),'through':_0x0a9e('0x12d')});db[_0x0a9e('0x11')]['belongsToMany'](db[_0x0a9e('0x53')],{'as':'SmsInteractions','through':_0x0a9e('0x12e')});db[_0x0a9e('0x11')][_0x0a9e('0x121')](db['OpenchannelInteraction'],{'as':_0x0a9e('0x118'),'through':_0x0a9e('0x12f')});db[_0x0a9e('0x11')]['belongsToMany'](db[_0x0a9e('0xfb')],{'as':'WhatsappInteractions','through':_0x0a9e('0x130')});db['User'][_0x0a9e('0x121')](db['VoiceQueue'],{'as':_0x0a9e('0x131'),'through':_0x0a9e('0x2d'),'required':![]});db[_0x0a9e('0x11')][_0x0a9e('0x121')](db[_0x0a9e('0xf1')],{'as':_0x0a9e('0x132'),'through':_0x0a9e('0x109'),'required':![]});db['User'][_0x0a9e('0x121')](db[_0x0a9e('0x3c')],{'as':'MailQueues','through':_0x0a9e('0x30'),'required':![]});db[_0x0a9e('0x11')]['belongsToMany'](db[_0x0a9e('0x67')],{'as':_0x0a9e('0x133'),'through':_0x0a9e('0x134'),'required':![],'hooks':!![]});db['User'][_0x0a9e('0x121')](db[_0x0a9e('0x4c')],{'as':_0x0a9e('0x135'),'through':_0x0a9e('0x32'),'required':![]});db[_0x0a9e('0x11')][_0x0a9e('0x121')](db[_0x0a9e('0x57')],{'as':_0x0a9e('0x136'),'through':_0x0a9e('0x34'),'required':![]});db[_0x0a9e('0x11')]['belongsToMany'](db[_0x0a9e('0x137')],{'as':'OpenchannelQueues','through':_0x0a9e('0x35'),'required':![]});db[_0x0a9e('0x11')][_0x0a9e('0x121')](db[_0x0a9e('0x101')],{'as':_0x0a9e('0x138'),'through':_0x0a9e('0x37'),'required':![]});db['User'][_0x0a9e('0x121')](db[_0x0a9e('0x139')],{'through':_0x0a9e('0x128')});db['User'][_0x0a9e('0x121')](db[_0x0a9e('0x60')],{'as':_0x0a9e('0x13a'),'through':_0x0a9e('0x13b')});db[_0x0a9e('0x11')][_0x0a9e('0x121')](db[_0x0a9e('0x45')],{'as':'FaxAccounts','through':_0x0a9e('0x13c')});db[_0x0a9e('0x11')][_0x0a9e('0x121')](db[_0x0a9e('0x3b')],{'as':_0x0a9e('0x13d'),'through':_0x0a9e('0x13e')});db[_0x0a9e('0x11')]['belongsToMany'](db['OpenchannelAccount'],{'as':_0x0a9e('0x13f'),'through':_0x0a9e('0x140')});db[_0x0a9e('0x11')][_0x0a9e('0x121')](db[_0x0a9e('0x50')],{'as':_0x0a9e('0x141'),'through':_0x0a9e('0x142')});db['User'][_0x0a9e('0x121')](db[_0x0a9e('0xf7')],{'as':_0x0a9e('0x143'),'through':_0x0a9e('0x144')});db[_0x0a9e('0x13')][_0x0a9e('0x110')](db[_0x0a9e('0x16')],{'as':'SpiedAgents','onDelete':_0x0a9e('0x10e'),'foreignKey':_0x0a9e('0x145')});db[_0x0a9e('0x146')]['hasMany'](db[_0x0a9e('0x16')],{'onDelete':_0x0a9e('0x10e')});db[_0x0a9e('0x16')][_0x0a9e('0x110')](db['VoiceExtension'],{'as':_0x0a9e('0x147'),'onDelete':_0x0a9e('0x10e')});db[_0x0a9e('0x18')][_0x0a9e('0x121')](db[_0x0a9e('0x84')],{'as':_0x0a9e('0x148'),'through':_0x0a9e('0x149')});db[_0x0a9e('0x1a')]['hasMany'](db[_0x0a9e('0x2b')],{'as':_0x0a9e('0x14a'),'foreignKey':_0x0a9e('0x14b')});db[_0x0a9e('0x1a')]['hasMany'](db['CmHopper'],{'as':_0x0a9e('0x14c'),'foreignKey':_0x0a9e('0x14b')});db[_0x0a9e('0x1a')]['hasMany'](db[_0x0a9e('0x71')],{'as':_0x0a9e('0x115'),'foreignKey':'VoiceQueueId'});db[_0x0a9e('0x1a')]['hasMany'](db[_0x0a9e('0x116')],{'as':'HopperHistories','foreignKey':'VoiceQueueId'});db['VoiceQueue'][_0x0a9e('0x110')](db[_0x0a9e('0x73')],{'as':_0x0a9e('0x73'),'foreignKey':_0x0a9e('0x14b')});db[_0x0a9e('0x1a')][_0x0a9e('0x110')](db['CmHopperBlack'],{'as':_0x0a9e('0x14d'),'foreignKey':_0x0a9e('0x14b')});db[_0x0a9e('0x1a')][_0x0a9e('0x110')](db[_0x0a9e('0xd0')],{'as':_0x0a9e('0x14e'),'foreignKey':_0x0a9e('0x14b')});db['VoiceQueue']['belongsTo'](db[_0x0a9e('0x28')],{'as':'Trunk','foreignKey':_0x0a9e('0x14f')});db[_0x0a9e('0x1a')][_0x0a9e('0x150')](db[_0x0a9e('0x28')],{'as':_0x0a9e('0x151'),'foreignKey':_0x0a9e('0x152')});db['VoiceQueue'][_0x0a9e('0x150')](db['Interval'],{'as':'Interval','foreignKey':_0x0a9e('0x153')});db['VoiceQueue'][_0x0a9e('0x150')](db['Pause'],{'as':'mandatoryDispositionPause','foreignKey':_0x0a9e('0x154')});db['VoiceQueue'][_0x0a9e('0x121')](db[_0x0a9e('0x139')],{'as':_0x0a9e('0x127'),'through':'voice_queues_has_cm_lists'});db[_0x0a9e('0x1a')][_0x0a9e('0x121')](db[_0x0a9e('0x11')],{'as':'Agents','through':'UserVoiceQueue'});db[_0x0a9e('0x1a')][_0x0a9e('0x121')](db[_0x0a9e('0x129')],{'as':_0x0a9e('0x155'),'through':_0x0a9e('0x105')});db[_0x0a9e('0x1a')][_0x0a9e('0x121')](db[_0x0a9e('0x139')],{'as':_0x0a9e('0x156'),'through':_0x0a9e('0x157')});db['VoiceRecording']['belongsTo'](db['User'],{'as':_0x0a9e('0x11'),'foreignKey':_0x0a9e('0x10f')});db[_0x0a9e('0x1c')][_0x0a9e('0x150')](db[_0x0a9e('0x11')],{'as':_0x0a9e('0x11'),'foreignKey':_0x0a9e('0x10f')});db[_0x0a9e('0x10c')]['hasMany'](db['VoiceMailMessage'],{'as':_0x0a9e('0x158'),'onDelete':_0x0a9e('0x10e'),'foreignKey':'mailboxuser','sourceKey':_0x0a9e('0x159')});db[_0x0a9e('0x1f')][_0x0a9e('0x150')](db[_0x0a9e('0x10c')],{'foreignKey':_0x0a9e('0x15a'),'targetKey':_0x0a9e('0x159')});db[_0x0a9e('0x15b')][_0x0a9e('0x110')](db[_0x0a9e('0x25')],{'as':_0x0a9e('0x15c'),'foreignKey':_0x0a9e('0x15d'),'constraints':![]});db[_0x0a9e('0x15b')]['hasMany'](db[_0x0a9e('0x15e')],{'as':_0x0a9e('0x15f'),'foreignKey':_0x0a9e('0x15d'),'constraints':![]});db[_0x0a9e('0x15b')][_0x0a9e('0x150')](db[_0x0a9e('0x11')],{'as':_0x0a9e('0x11'),'foreignKey':_0x0a9e('0x10f')});db[_0x0a9e('0x15b')][_0x0a9e('0x150')](db[_0x0a9e('0x124')],{'as':_0x0a9e('0x160'),'foreignKey':'ContactId'});db['MailServerIn'][_0x0a9e('0x150')](db[_0x0a9e('0x3b')],{'as':_0x0a9e('0x3b'),'foreignKey':_0x0a9e('0x161')});db[_0x0a9e('0x39')][_0x0a9e('0x150')](db[_0x0a9e('0x103')],{'as':'CloudProvider','foreignKey':_0x0a9e('0x162'),'onDelete':'restrict'});db[_0x0a9e('0x163')][_0x0a9e('0x150')](db[_0x0a9e('0x3b')],{'as':_0x0a9e('0x3b'),'foreignKey':_0x0a9e('0x161')});db[_0x0a9e('0x163')][_0x0a9e('0x150')](db[_0x0a9e('0x103')],{'as':_0x0a9e('0x103'),'foreignKey':_0x0a9e('0x162'),'onDelete':_0x0a9e('0x164')});db[_0x0a9e('0x3b')][_0x0a9e('0x10b')](db[_0x0a9e('0x39')],{'as':_0x0a9e('0x165'),'onDelete':_0x0a9e('0x10e')});db['MailAccount']['hasOne'](db[_0x0a9e('0x163')],{'as':_0x0a9e('0x166'),'onDelete':'cascade'});db['MailAccount'][_0x0a9e('0x110')](db[_0x0a9e('0x167')],{'as':_0x0a9e('0x168'),'foreignKey':'MailAccountId','onDelete':_0x0a9e('0x10e')});db['MailAccount'][_0x0a9e('0x110')](db['CannedAnswer'],{'as':_0x0a9e('0x169'),'foreignKey':'MailAccountId'});db[_0x0a9e('0x3b')][_0x0a9e('0x110')](db[_0x0a9e('0x3e')],{'as':'Messages','foreignKey':_0x0a9e('0x161')});db['MailAccount']['hasMany'](db[_0x0a9e('0x11c')],{'as':_0x0a9e('0x16a')});db[_0x0a9e('0x3b')][_0x0a9e('0x110')](db[_0x0a9e('0x16b')],{'as':_0x0a9e('0x147'),'foreignKey':_0x0a9e('0x161'),'onDelete':_0x0a9e('0x10e')});db[_0x0a9e('0x3b')][_0x0a9e('0x150')](db[_0x0a9e('0x139')],{'as':_0x0a9e('0x16c'),'foreignKey':_0x0a9e('0x16d')});db[_0x0a9e('0x3b')][_0x0a9e('0x150')](db[_0x0a9e('0x8b')],{'as':_0x0a9e('0x8b'),'foreignKey':_0x0a9e('0x16e')});db[_0x0a9e('0x3b')]['belongsTo'](db[_0x0a9e('0x7d')],{'as':_0x0a9e('0x16f'),'foreignKey':_0x0a9e('0x154')});db[_0x0a9e('0x3b')]['belongsToMany'](db['User'],{'as':'Agents','through':_0x0a9e('0x13e')});db['MailQueue'][_0x0a9e('0x121')](db[_0x0a9e('0x11')],{'as':_0x0a9e('0x170'),'through':_0x0a9e('0x30')});db[_0x0a9e('0x3c')][_0x0a9e('0x121')](db[_0x0a9e('0x129')],{'through':_0x0a9e('0x171'),'as':_0x0a9e('0x155')});db[_0x0a9e('0x11c')]['hasMany'](db[_0x0a9e('0x3e')],{'as':'Messages','onDelete':_0x0a9e('0x10e'),'foreignKey':'MailInteractionId'});db[_0x0a9e('0x11c')][_0x0a9e('0x150')](db[_0x0a9e('0x3b')],{'as':'Account','foreignKey':_0x0a9e('0x161')});db[_0x0a9e('0x11c')]['belongsTo'](db['CmContact'],{'as':_0x0a9e('0x160'),'foreignKey':_0x0a9e('0x172')});db[_0x0a9e('0x11c')]['belongsTo'](db['User'],{'as':'Owner','foreignKey':_0x0a9e('0x10f')});db[_0x0a9e('0x11c')][_0x0a9e('0x121')](db[_0x0a9e('0x86')],{'through':_0x0a9e('0x173'),'as':_0x0a9e('0x174')});db[_0x0a9e('0x11c')][_0x0a9e('0x121')](db[_0x0a9e('0x86')],{'through':_0x0a9e('0x173'),'as':_0x0a9e('0x175')});db[_0x0a9e('0x11c')][_0x0a9e('0x121')](db[_0x0a9e('0x11')],{'as':_0x0a9e('0x176'),'through':_0x0a9e('0x12b'),'foreignKey':_0x0a9e('0x177')});db[_0x0a9e('0x3e')]['hasMany'](db[_0x0a9e('0xe4')],{'as':_0x0a9e('0x178'),'onDelete':_0x0a9e('0x10e')});db[_0x0a9e('0x3e')][_0x0a9e('0x150')](db[_0x0a9e('0x11')],{'as':'User'});db[_0x0a9e('0x3e')][_0x0a9e('0x150')](db[_0x0a9e('0x124')],{'onDelete':_0x0a9e('0x10e'),'as':_0x0a9e('0x160')});db[_0x0a9e('0x3e')][_0x0a9e('0x150')](db[_0x0a9e('0x11c')],{'as':_0x0a9e('0x179'),'foreignKey':'MailInteractionId'});db['MailMessage'][_0x0a9e('0x150')](db[_0x0a9e('0x3b')],{'as':'Account','foreignKey':_0x0a9e('0x161')});db[_0x0a9e('0x3e')]['belongsTo'](db[_0x0a9e('0x60')],{'as':'ChatWebsite','foreignKey':_0x0a9e('0x17a')});db[_0x0a9e('0x3e')]['belongsTo'](db[_0x0a9e('0x66')],{'as':_0x0a9e('0x66'),'foreignKey':'ChatOfflineMessageId'});db[_0x0a9e('0x16b')][_0x0a9e('0x150')](db['User'],{'onDelete':_0x0a9e('0x164')});db[_0x0a9e('0x16b')][_0x0a9e('0x150')](db[_0x0a9e('0x3c')],{'onDelete':_0x0a9e('0x164')});db[_0x0a9e('0x16b')]['belongsTo'](db[_0x0a9e('0x3b')],{'onDelete':_0x0a9e('0x164')});db['MailApplication'][_0x0a9e('0x150')](db[_0x0a9e('0x17b')],{'onDelete':_0x0a9e('0x164'),'foreignKey':_0x0a9e('0x153')});db[_0x0a9e('0x16b')][_0x0a9e('0x150')](db[_0x0a9e('0x86')],{'onDelete':'restrict','foreignKey':'TagId'});db['MailQueueReport']['belongsTo'](db['MailAccount'],{});db[_0x0a9e('0x17c')][_0x0a9e('0x150')](db['CmList'],{'as':'List','foreignKey':_0x0a9e('0x16d')});db['MailQueueReport'][_0x0a9e('0x150')](db[_0x0a9e('0x124')],{'as':_0x0a9e('0x160'),'foreignKey':_0x0a9e('0x172')});db[_0x0a9e('0x17c')][_0x0a9e('0x150')](db['MailInteraction'],{});db[_0x0a9e('0x17c')][_0x0a9e('0x150')](db['MailMessage'],{});db[_0x0a9e('0x17c')][_0x0a9e('0x150')](db[_0x0a9e('0x11')],{});db[_0x0a9e('0x17c')][_0x0a9e('0x150')](db[_0x0a9e('0x3c')],{});db[_0x0a9e('0x17d')]['hasMany'](db[_0x0a9e('0x43')],{'as':'Items','onDelete':_0x0a9e('0x10e')});db[_0x0a9e('0x45')]['hasMany'](db[_0x0a9e('0x167')],{'as':_0x0a9e('0x168'),'foreignKey':'FaxAccountId','onDelete':_0x0a9e('0x10e')});db['FaxAccount'][_0x0a9e('0x110')](db[_0x0a9e('0x17e')],{'as':'Answers','foreignKey':_0x0a9e('0x17f')});db['FaxAccount'][_0x0a9e('0x110')](db[_0x0a9e('0x11b')],{'as':_0x0a9e('0x16a')});db[_0x0a9e('0x45')][_0x0a9e('0x110')](db[_0x0a9e('0x47')],{'as':_0x0a9e('0x147'),'foreignKey':'FaxAccountId','onDelete':_0x0a9e('0x10e')});db[_0x0a9e('0x45')][_0x0a9e('0x110')](db[_0x0a9e('0x16')],{'as':_0x0a9e('0x180'),'onDelete':'cascade'});db[_0x0a9e('0x45')]['hasMany'](db['FaxMessage'],{'as':_0x0a9e('0x158')});db['FaxAccount'][_0x0a9e('0x150')](db[_0x0a9e('0x28')],{'as':'Trunk'});db[_0x0a9e('0x45')][_0x0a9e('0x150')](db[_0x0a9e('0x139')],{'as':_0x0a9e('0x16c'),'foreignKey':_0x0a9e('0x16d')});db[_0x0a9e('0x45')][_0x0a9e('0x150')](db[_0x0a9e('0x7d')],{'as':_0x0a9e('0x16f'),'foreignKey':'mandatoryDispositionPauseId'});db[_0x0a9e('0x45')][_0x0a9e('0x121')](db[_0x0a9e('0x11')],{'as':_0x0a9e('0x170'),'through':'user_has_fax_accounts'});db[_0x0a9e('0x47')][_0x0a9e('0x150')](db[_0x0a9e('0x11')],{'onDelete':'restrict'});db[_0x0a9e('0x47')][_0x0a9e('0x150')](db[_0x0a9e('0x4c')],{'onDelete':'restrict'});db[_0x0a9e('0x47')]['belongsTo'](db[_0x0a9e('0x45')],{'onDelete':_0x0a9e('0x164')});db[_0x0a9e('0x47')][_0x0a9e('0x150')](db[_0x0a9e('0x86')],{'onDelete':_0x0a9e('0x164'),'foreignKey':_0x0a9e('0x181')});db['FaxInteraction'][_0x0a9e('0x110')](db[_0x0a9e('0x4a')],{'as':_0x0a9e('0x158'),'onDelete':_0x0a9e('0x10e'),'foreignKey':_0x0a9e('0x182')});db[_0x0a9e('0x11b')][_0x0a9e('0x150')](db[_0x0a9e('0x45')],{'as':_0x0a9e('0x183'),'foreignKey':_0x0a9e('0x17f')});db[_0x0a9e('0x11b')][_0x0a9e('0x150')](db[_0x0a9e('0x124')],{'as':_0x0a9e('0x160'),'foreignKey':_0x0a9e('0x172')});db[_0x0a9e('0x11b')][_0x0a9e('0x150')](db[_0x0a9e('0x11')],{'as':_0x0a9e('0x184'),'foreignKey':_0x0a9e('0x10f')});db[_0x0a9e('0x11b')][_0x0a9e('0x121')](db[_0x0a9e('0x86')],{'through':'fax_interaction_has_tags','as':_0x0a9e('0x174')});db[_0x0a9e('0x11b')][_0x0a9e('0x121')](db['Tag'],{'through':_0x0a9e('0x185'),'as':'ThroughTags'});db[_0x0a9e('0x11b')][_0x0a9e('0x121')](db[_0x0a9e('0x11')],{'as':_0x0a9e('0x176'),'through':_0x0a9e('0x12d'),'foreignKey':_0x0a9e('0x182')});db[_0x0a9e('0x4a')][_0x0a9e('0x150')](db['User'],{'onDelete':_0x0a9e('0x10e'),'as':_0x0a9e('0x11')});db['FaxMessage'][_0x0a9e('0x150')](db[_0x0a9e('0x11b')],{'as':_0x0a9e('0x179'),'foreignKey':'FaxInteractionId'});db[_0x0a9e('0x4a')][_0x0a9e('0x150')](db[_0x0a9e('0x124')],{'onDelete':_0x0a9e('0x10e'),'as':'Contact'});db[_0x0a9e('0x4a')][_0x0a9e('0x150')](db[_0x0a9e('0xe4')],{'as':_0x0a9e('0xe4'),'foreignKey':_0x0a9e('0x186')});db['FaxMessage'][_0x0a9e('0x150')](db[_0x0a9e('0x45')],{'as':'Account','foreignKey':_0x0a9e('0x17f')});db[_0x0a9e('0x4c')][_0x0a9e('0x121')](db['User'],{'as':'Agents','through':_0x0a9e('0x32')});db[_0x0a9e('0x4c')][_0x0a9e('0x121')](db[_0x0a9e('0x129')],{'through':_0x0a9e('0x187'),'as':_0x0a9e('0x155')});db[_0x0a9e('0x4e')][_0x0a9e('0x150')](db['FaxAccount'],{});db['FaxQueueReport'][_0x0a9e('0x150')](db['CmList'],{'as':_0x0a9e('0x16c'),'foreignKey':_0x0a9e('0x16d')});db[_0x0a9e('0x4e')][_0x0a9e('0x150')](db['CmContact'],{'as':_0x0a9e('0x160'),'foreignKey':_0x0a9e('0x172')});db['FaxQueueReport'][_0x0a9e('0x150')](db['FaxInteraction'],{});db[_0x0a9e('0x4e')][_0x0a9e('0x150')](db[_0x0a9e('0x4a')],{});db[_0x0a9e('0x4e')][_0x0a9e('0x150')](db[_0x0a9e('0x11')],{});db['FaxQueueReport'][_0x0a9e('0x150')](db['FaxQueue'],{});db[_0x0a9e('0x50')][_0x0a9e('0x110')](db[_0x0a9e('0x167')],{'as':_0x0a9e('0x168'),'foreignKey':_0x0a9e('0x188'),'onDelete':_0x0a9e('0x10e')});db[_0x0a9e('0x50')]['hasMany'](db[_0x0a9e('0x17e')],{'as':_0x0a9e('0x169'),'foreignKey':_0x0a9e('0x188')});db[_0x0a9e('0x50')][_0x0a9e('0x110')](db['SmsMessage'],{'as':_0x0a9e('0x158'),'foreignKey':_0x0a9e('0x188')});db['SmsAccount']['hasMany'](db[_0x0a9e('0x53')],{'as':_0x0a9e('0x16a')});db[_0x0a9e('0x50')][_0x0a9e('0x110')](db[_0x0a9e('0x52')],{'as':_0x0a9e('0x147'),'foreignKey':'SmsAccountId','onDelete':_0x0a9e('0x10e')});db[_0x0a9e('0x50')][_0x0a9e('0x150')](db['CmList'],{'as':_0x0a9e('0x16c'),'foreignKey':_0x0a9e('0x16d')});db[_0x0a9e('0x50')][_0x0a9e('0x150')](db['Pause'],{'as':'mandatoryDispositionPause','foreignKey':_0x0a9e('0x154')});db[_0x0a9e('0x50')][_0x0a9e('0x121')](db[_0x0a9e('0x11')],{'as':_0x0a9e('0x170'),'through':_0x0a9e('0x142')});db[_0x0a9e('0x52')][_0x0a9e('0x150')](db['User'],{'onDelete':_0x0a9e('0x164')});db['SmsApplication'][_0x0a9e('0x150')](db[_0x0a9e('0x57')],{'onDelete':_0x0a9e('0x164')});db['SmsApplication']['belongsTo'](db[_0x0a9e('0x50')],{'onDelete':'restrict'});db[_0x0a9e('0x52')]['belongsTo'](db['Interval'],{'onDelete':_0x0a9e('0x164'),'foreignKey':_0x0a9e('0x153')});db[_0x0a9e('0x52')][_0x0a9e('0x150')](db[_0x0a9e('0x86')],{'onDelete':_0x0a9e('0x164'),'foreignKey':_0x0a9e('0x181')});db[_0x0a9e('0x53')][_0x0a9e('0x110')](db[_0x0a9e('0x55')],{'as':_0x0a9e('0x158'),'onDelete':_0x0a9e('0x10e'),'foreignKey':_0x0a9e('0x189')});db['SmsInteraction']['belongsTo'](db[_0x0a9e('0x50')],{'as':'Account','foreignKey':_0x0a9e('0x188')});db[_0x0a9e('0x53')][_0x0a9e('0x150')](db['CmContact'],{'as':'Contact','foreignKey':_0x0a9e('0x172')});db[_0x0a9e('0x53')][_0x0a9e('0x150')](db[_0x0a9e('0x11')],{'as':_0x0a9e('0x184'),'foreignKey':_0x0a9e('0x10f')});db[_0x0a9e('0x53')]['belongsToMany'](db[_0x0a9e('0x86')],{'through':'sms_interaction_has_tags','as':_0x0a9e('0x174')});db[_0x0a9e('0x53')]['belongsToMany'](db[_0x0a9e('0x86')],{'through':_0x0a9e('0x18a'),'as':_0x0a9e('0x175')});db[_0x0a9e('0x53')][_0x0a9e('0x121')](db[_0x0a9e('0x11')],{'as':'Users','through':_0x0a9e('0x12e'),'foreignKey':_0x0a9e('0x189')});db[_0x0a9e('0x55')]['belongsTo'](db[_0x0a9e('0x11')],{'as':_0x0a9e('0x11')});db[_0x0a9e('0x55')]['belongsTo'](db[_0x0a9e('0x124')],{'onDelete':_0x0a9e('0x10e'),'as':_0x0a9e('0x160')});db[_0x0a9e('0x55')][_0x0a9e('0x150')](db[_0x0a9e('0x53')],{'onDelete':'cascade','as':'Interaction','foreignKey':_0x0a9e('0x189')});db[_0x0a9e('0x55')]['belongsTo'](db[_0x0a9e('0x50')],{'as':_0x0a9e('0x183'),'foreignKey':_0x0a9e('0x188')});db[_0x0a9e('0x57')][_0x0a9e('0x121')](db[_0x0a9e('0x11')],{'as':'Agents','through':_0x0a9e('0x34'),'foreignKey':_0x0a9e('0x18b')});db[_0x0a9e('0x57')]['belongsToMany'](db[_0x0a9e('0x129')],{'through':_0x0a9e('0x18c'),'as':_0x0a9e('0x155')});db[_0x0a9e('0x59')]['hasMany'](db['Disposition'],{'as':_0x0a9e('0x168'),'foreignKey':_0x0a9e('0x18d'),'onDelete':_0x0a9e('0x10e')});db['OpenchannelAccount'][_0x0a9e('0x110')](db[_0x0a9e('0x17e')],{'as':_0x0a9e('0x169'),'foreignKey':_0x0a9e('0x18d')});db[_0x0a9e('0x59')][_0x0a9e('0x110')](db[_0x0a9e('0x5d')],{'as':_0x0a9e('0x16a'),'foreignKey':'OpenchannelAccountId'});db['OpenchannelAccount'][_0x0a9e('0x110')](db[_0x0a9e('0x5e')],{'as':'Messages','foreignKey':_0x0a9e('0x18d')});db['OpenchannelAccount'][_0x0a9e('0x110')](db[_0x0a9e('0x5b')],{'as':'Applications','foreignKey':_0x0a9e('0x18d'),'onDelete':_0x0a9e('0x10e')});db['OpenchannelAccount'][_0x0a9e('0x150')](db[_0x0a9e('0x139')],{'as':_0x0a9e('0x16c'),'foreignKey':_0x0a9e('0x16d')});db[_0x0a9e('0x59')][_0x0a9e('0x150')](db[_0x0a9e('0x7d')],{'as':'mandatoryDispositionPause','foreignKey':_0x0a9e('0x154')});db[_0x0a9e('0x59')][_0x0a9e('0x121')](db[_0x0a9e('0x11')],{'as':_0x0a9e('0x170'),'through':_0x0a9e('0x140')});db[_0x0a9e('0x5b')]['belongsTo'](db['User'],{'onDelete':_0x0a9e('0x164')});db[_0x0a9e('0x5b')][_0x0a9e('0x150')](db['OpenchannelQueue'],{'onDelete':'restrict','foreignKey':_0x0a9e('0x18e')});db['OpenchannelApplication'][_0x0a9e('0x150')](db[_0x0a9e('0x59')],{'onDelete':_0x0a9e('0x164'),'foreignKey':_0x0a9e('0x18d')});db[_0x0a9e('0x5b')][_0x0a9e('0x150')](db[_0x0a9e('0x17b')],{'onDelete':_0x0a9e('0x164'),'foreignKey':_0x0a9e('0x153')});db['OpenchannelApplication']['belongsTo'](db[_0x0a9e('0x86')],{'onDelete':'restrict','foreignKey':_0x0a9e('0x181')});db[_0x0a9e('0x5d')][_0x0a9e('0x110')](db[_0x0a9e('0x5e')],{'as':'Messages','onDelete':_0x0a9e('0x10e'),'foreignKey':_0x0a9e('0x18f')});db[_0x0a9e('0x5d')]['belongsTo'](db[_0x0a9e('0x59')],{'as':_0x0a9e('0x183'),'foreignKey':_0x0a9e('0x18d')});db['OpenchannelInteraction'][_0x0a9e('0x150')](db[_0x0a9e('0x124')],{'as':_0x0a9e('0x160'),'foreignKey':_0x0a9e('0x172')});db[_0x0a9e('0x5d')][_0x0a9e('0x150')](db['User'],{'as':'Owner','foreignKey':_0x0a9e('0x10f')});db[_0x0a9e('0x5d')][_0x0a9e('0x121')](db['Tag'],{'through':'openchannel_interaction_has_tags','as':_0x0a9e('0x174')});db[_0x0a9e('0x5d')][_0x0a9e('0x121')](db['Tag'],{'through':'openchannel_interaction_has_tags','as':_0x0a9e('0x175')});db[_0x0a9e('0x5d')][_0x0a9e('0x121')](db[_0x0a9e('0x11')],{'as':_0x0a9e('0x176'),'through':'user_has_openchannel_interactions','foreignKey':_0x0a9e('0x18f')});db['OpenchannelMessage'][_0x0a9e('0x150')](db[_0x0a9e('0x11')],{'onDelete':'cascade','as':_0x0a9e('0x11')});db['OpenchannelMessage'][_0x0a9e('0x150')](db[_0x0a9e('0x124')],{'onDelete':_0x0a9e('0x10e'),'as':_0x0a9e('0x160')});db[_0x0a9e('0x5e')]['belongsTo'](db[_0x0a9e('0x5d')],{'onDelete':_0x0a9e('0x10e'),'as':_0x0a9e('0x179'),'foreignKey':'OpenchannelInteractionId'});db[_0x0a9e('0x5e')]['belongsTo'](db[_0x0a9e('0xe4')],{'as':_0x0a9e('0xe4'),'foreignKey':_0x0a9e('0x186')});db['OpenchannelMessage'][_0x0a9e('0x150')](db[_0x0a9e('0x59')],{'as':_0x0a9e('0x183'),'foreignKey':_0x0a9e('0x18d')});db[_0x0a9e('0x137')][_0x0a9e('0x121')](db['User'],{'as':_0x0a9e('0x170'),'through':_0x0a9e('0x35'),'foreignKey':_0x0a9e('0x18e')});db[_0x0a9e('0x137')][_0x0a9e('0x121')](db[_0x0a9e('0x129')],{'through':_0x0a9e('0x190'),'as':_0x0a9e('0x155')});db['ChatWebsite'][_0x0a9e('0x110')](db[_0x0a9e('0x167')],{'as':_0x0a9e('0x168'),'foreignKey':_0x0a9e('0x17a'),'onDelete':'cascade'});db[_0x0a9e('0x60')]['hasMany'](db[_0x0a9e('0x17e')],{'as':_0x0a9e('0x169'),'foreignKey':_0x0a9e('0x17a')});db['ChatWebsite'][_0x0a9e('0x110')](db[_0x0a9e('0x191')],{'as':_0x0a9e('0x192')});db[_0x0a9e('0x60')]['hasMany'](db[_0x0a9e('0x64')],{'as':_0x0a9e('0x16a')});db[_0x0a9e('0x60')][_0x0a9e('0x110')](db[_0x0a9e('0x63')],{'as':_0x0a9e('0x147'),'foreignKey':_0x0a9e('0x17a'),'onDelete':'cascade'});db[_0x0a9e('0x60')][_0x0a9e('0x110')](db[_0x0a9e('0x65')],{'as':_0x0a9e('0x158')});db['ChatWebsite'][_0x0a9e('0x150')](db['CmList'],{'as':_0x0a9e('0x16c'),'foreignKey':_0x0a9e('0x16d')});db[_0x0a9e('0x60')][_0x0a9e('0x150')](db[_0x0a9e('0x17b')],{'as':_0x0a9e('0x17b'),'foreignKey':_0x0a9e('0x153')});db['ChatWebsite'][_0x0a9e('0x150')](db['MailAccount'],{'as':_0x0a9e('0x3b'),'foreignKey':_0x0a9e('0x161')});db['ChatWebsite'][_0x0a9e('0x150')](db[_0x0a9e('0x7d')],{'as':_0x0a9e('0x16f'),'foreignKey':_0x0a9e('0x154')});db['ChatWebsite'][_0x0a9e('0x121')](db[_0x0a9e('0x11')],{'as':'Agents','through':_0x0a9e('0x13b')});db['OpenchannelQueueReport']['belongsTo'](db['OpenchannelAccount'],{});db[_0x0a9e('0x62')][_0x0a9e('0x150')](db['CmList'],{'as':_0x0a9e('0x16c'),'foreignKey':_0x0a9e('0x16d')});db['OpenchannelQueueReport'][_0x0a9e('0x150')](db[_0x0a9e('0x124')],{'as':_0x0a9e('0x160'),'foreignKey':_0x0a9e('0x172')});db[_0x0a9e('0x62')][_0x0a9e('0x150')](db[_0x0a9e('0x5d')],{});db['OpenchannelQueueReport'][_0x0a9e('0x150')](db['OpenchannelMessage'],{});db[_0x0a9e('0x62')][_0x0a9e('0x150')](db[_0x0a9e('0x11')],{});db[_0x0a9e('0x62')][_0x0a9e('0x150')](db[_0x0a9e('0x137')],{});db['ChatApplication'][_0x0a9e('0x150')](db[_0x0a9e('0x11')],{'as':_0x0a9e('0x193'),'foreignKey':'UserId','onDelete':_0x0a9e('0x164')});db[_0x0a9e('0x63')][_0x0a9e('0x150')](db[_0x0a9e('0x67')],{'as':_0x0a9e('0x194'),'foreignKey':_0x0a9e('0x195'),'onDelete':_0x0a9e('0x164')});db[_0x0a9e('0x63')][_0x0a9e('0x150')](db[_0x0a9e('0x60')],{'as':_0x0a9e('0x196'),'foreignKey':_0x0a9e('0x17a'),'onDelete':_0x0a9e('0x164')});db[_0x0a9e('0x63')][_0x0a9e('0x150')](db[_0x0a9e('0x86')],{'onDelete':'restrict','foreignKey':_0x0a9e('0x181')});db[_0x0a9e('0x64')][_0x0a9e('0x110')](db['ChatMessage'],{'as':_0x0a9e('0x158'),'onDelete':_0x0a9e('0x10e'),'foreignKey':_0x0a9e('0x197')});db[_0x0a9e('0x64')]['belongsTo'](db[_0x0a9e('0x60')],{'as':_0x0a9e('0x183'),'foreignKey':_0x0a9e('0x17a')});db[_0x0a9e('0x64')]['belongsTo'](db[_0x0a9e('0x124')],{'as':_0x0a9e('0x160'),'foreignKey':_0x0a9e('0x172')});db[_0x0a9e('0x64')]['belongsTo'](db['User'],{'as':_0x0a9e('0x184'),'foreignKey':_0x0a9e('0x10f')});db[_0x0a9e('0x64')][_0x0a9e('0x121')](db[_0x0a9e('0x86')],{'through':_0x0a9e('0x198'),'as':_0x0a9e('0x174')});db[_0x0a9e('0x64')][_0x0a9e('0x121')](db[_0x0a9e('0x86')],{'through':_0x0a9e('0x198'),'as':_0x0a9e('0x175')});db[_0x0a9e('0x64')][_0x0a9e('0x121')](db['User'],{'as':_0x0a9e('0x176'),'through':_0x0a9e('0x199'),'foreignKey':_0x0a9e('0x197')});db['ChatMessage']['belongsTo'](db[_0x0a9e('0x11')],{'onDelete':'cascade','as':_0x0a9e('0x11')});db[_0x0a9e('0x65')][_0x0a9e('0x150')](db[_0x0a9e('0x124')],{'onDelete':'cascade','as':'Contact','foreignKey':_0x0a9e('0x172')});db[_0x0a9e('0x65')][_0x0a9e('0x150')](db[_0x0a9e('0x64')],{'onDelete':'cascade','as':_0x0a9e('0x179'),'foreignKey':_0x0a9e('0x197')});db[_0x0a9e('0x65')][_0x0a9e('0x150')](db[_0x0a9e('0xe4')],{'as':'Attachment','foreignKey':'AttachmentId'});db[_0x0a9e('0x65')][_0x0a9e('0x150')](db[_0x0a9e('0x60')],{'as':_0x0a9e('0x183'),'foreignKey':_0x0a9e('0x17a')});db[_0x0a9e('0x66')][_0x0a9e('0x110')](db['Attachment'],{'as':_0x0a9e('0x178'),'foreignKey':_0x0a9e('0x19a'),'onDelete':_0x0a9e('0x10e'),'hooks':!![]});db['ChatOfflineMessage']['belongsTo'](db['CmContact'],{'onDelete':_0x0a9e('0x10e'),'as':_0x0a9e('0x160'),'foreignKey':'ContactId'});db[_0x0a9e('0x66')][_0x0a9e('0x150')](db[_0x0a9e('0x60')],{'as':'Account','foreignKey':'ChatWebsiteId'});db[_0x0a9e('0x67')][_0x0a9e('0x121')](db[_0x0a9e('0x11')],{'as':_0x0a9e('0x170'),'through':'UserChatQueue','hooks':!![]});db[_0x0a9e('0x67')]['belongsToMany'](db['Team'],{'through':_0x0a9e('0x19b'),'as':'Teams'});db[_0x0a9e('0x68')][_0x0a9e('0x110')](db[_0x0a9e('0xcc')],{'as':'Messages','foreignKey':_0x0a9e('0x19c'),'onDelete':_0x0a9e('0x10e')});db[_0x0a9e('0x68')]['belongsToMany'](db['User'],{'as':_0x0a9e('0x14a'),'through':_0x0a9e('0x123')});db[_0x0a9e('0x191')][_0x0a9e('0x150')](db[_0x0a9e('0x60')],{'as':_0x0a9e('0x196'),'foreignKey':'ChatWebsiteId'});db['CmCompany'][_0x0a9e('0x110')](db[_0x0a9e('0x124')],{'as':'Contacts','foreignKey':'CompanyId'});db['CmContact']['hasMany'](db['CmContactHasItem'],{'as':'Phones','foreignKey':_0x0a9e('0x19d')});db['CmContact'][_0x0a9e('0x110')](db[_0x0a9e('0x6d')],{'as':_0x0a9e('0x14c'),'foreignKey':_0x0a9e('0x172')});db[_0x0a9e('0x124')][_0x0a9e('0x110')](db[_0x0a9e('0x71')],{'as':'HopperFinals','foreignKey':_0x0a9e('0x172')});db[_0x0a9e('0x124')][_0x0a9e('0x110')](db[_0x0a9e('0x116')],{'as':_0x0a9e('0x19e'),'foreignKey':_0x0a9e('0x172')});db[_0x0a9e('0x124')][_0x0a9e('0x110')](db[_0x0a9e('0x73')],{'as':_0x0a9e('0x73'),'foreignKey':_0x0a9e('0x172')});db['CmContact'][_0x0a9e('0x110')](db[_0x0a9e('0xd0')],{'as':'JscriptySessions','foreignKey':_0x0a9e('0x172')});db['CmContact'][_0x0a9e('0x110')](db[_0x0a9e('0x5d')],{'as':'OpenchannelInteractions','foreignKey':'ContactId','onDelete':_0x0a9e('0x164')});db['CmContact'][_0x0a9e('0x110')](db[_0x0a9e('0x64')],{'as':_0x0a9e('0x119'),'foreignKey':_0x0a9e('0x172'),'onDelete':_0x0a9e('0x164')});db['CmContact'][_0x0a9e('0x110')](db['SmsInteraction'],{'as':'SmsInteractions','foreignKey':_0x0a9e('0x172'),'onDelete':_0x0a9e('0x164')});db[_0x0a9e('0x124')][_0x0a9e('0x110')](db[_0x0a9e('0x11b')],{'as':'FaxInteractions','foreignKey':_0x0a9e('0x172'),'onDelete':_0x0a9e('0x164')});db[_0x0a9e('0x124')][_0x0a9e('0x110')](db['MailInteraction'],{'as':_0x0a9e('0x11d'),'foreignKey':_0x0a9e('0x172'),'onDelete':'restrict'});db[_0x0a9e('0x124')][_0x0a9e('0x150')](db[_0x0a9e('0x19f')],{'as':_0x0a9e('0x1a0'),'foreignKey':'CompanyId'});db[_0x0a9e('0x124')][_0x0a9e('0x150')](db[_0x0a9e('0x139')],{'as':_0x0a9e('0x16c'),'foreignKey':_0x0a9e('0x16d'),'onDelete':'cascade'});db[_0x0a9e('0x124')][_0x0a9e('0x121')](db['User'],{'as':_0x0a9e('0x176'),'through':'cm_user_has_contacts'});db[_0x0a9e('0x124')][_0x0a9e('0x121')](db[_0x0a9e('0x86')],{'as':_0x0a9e('0x174'),'through':_0x0a9e('0x1a1')});db[_0x0a9e('0x124')][_0x0a9e('0x121')](db[_0x0a9e('0x86')],{'through':_0x0a9e('0x1a1'),'as':_0x0a9e('0x175')});db[_0x0a9e('0x6d')][_0x0a9e('0x110')](db[_0x0a9e('0x1a2')],{'as':_0x0a9e('0x1a3'),'foreignKey':_0x0a9e('0x1a4')});db['CmHopper'][_0x0a9e('0x150')](db[_0x0a9e('0x124')],{'as':_0x0a9e('0x160'),'foreignKey':_0x0a9e('0x172'),'onDelete':_0x0a9e('0x10e')});db[_0x0a9e('0x6d')][_0x0a9e('0x150')](db[_0x0a9e('0x139')],{'as':'List','foreignKey':'ListId','onDelete':'cascade'});db['CmHopper'][_0x0a9e('0x150')](db['User'],{'as':'Agent','foreignKey':'UserId'});db[_0x0a9e('0x6d')][_0x0a9e('0x150')](db[_0x0a9e('0x1a')],{'as':_0x0a9e('0x194'),'foreignKey':'VoiceQueueId','onDelete':'cascade'});db[_0x0a9e('0x6d')][_0x0a9e('0x150')](db[_0x0a9e('0x1a5')],{'as':_0x0a9e('0x1a5'),'foreignKey':'CampaignId','onDelete':_0x0a9e('0x10e')});db[_0x0a9e('0x6d')][_0x0a9e('0x150')](db[_0x0a9e('0x11')],{'as':_0x0a9e('0x184'),'foreignKey':_0x0a9e('0x1a6')});db['CmHopperBlack'][_0x0a9e('0x150')](db['CmContact'],{'as':'Contact','foreignKey':_0x0a9e('0x172'),'onDelete':'cascade'});db[_0x0a9e('0x6f')][_0x0a9e('0x150')](db[_0x0a9e('0x139')],{'as':_0x0a9e('0x16c'),'foreignKey':_0x0a9e('0x16d'),'onDelete':_0x0a9e('0x10e')});db[_0x0a9e('0x6f')][_0x0a9e('0x150')](db[_0x0a9e('0x1a')],{'as':'Queue','foreignKey':_0x0a9e('0x14b'),'onDelete':_0x0a9e('0x10e')});db['CmHopperBlack'][_0x0a9e('0x150')](db[_0x0a9e('0x1a5')],{'as':_0x0a9e('0x1a5'),'foreignKey':_0x0a9e('0x1a7'),'onDelete':'cascade'});db[_0x0a9e('0x76')][_0x0a9e('0x110')](db[_0x0a9e('0x7a')],{'as':{'plural':_0x0a9e('0x1a8'),'singular':_0x0a9e('0x1a9')},'foreignKey':'AutomationAllId','onDelete':'cascade','hooks':!![]});db[_0x0a9e('0x76')]['hasMany'](db[_0x0a9e('0x7a')],{'as':{'plural':'Any','singular':_0x0a9e('0x1aa')},'foreignKey':'AutomationAnyId','onDelete':_0x0a9e('0x10e'),'hooks':!![]});db['Automation'][_0x0a9e('0x110')](db[_0x0a9e('0x74')],{'as':_0x0a9e('0x1ab'),'foreignKey':'AutomationId','onDelete':'cascade','hooks':!![]});db[_0x0a9e('0x167')]['hasMany'](db[_0x0a9e('0x167')],{'as':'Dispositions','foreignKey':_0x0a9e('0x1ac'),'onDelete':'cascade'});db[_0x0a9e('0x17b')][_0x0a9e('0x110')](db['Interval'],{'as':_0x0a9e('0x1ad'),'foreignKey':_0x0a9e('0x153'),'onDelete':_0x0a9e('0x10e'),'hooks':!![],'required':![]});db[_0x0a9e('0x17b')][_0x0a9e('0x110')](db[_0x0a9e('0x16')],{'as':_0x0a9e('0x114'),'foreignKey':_0x0a9e('0x153'),'onDelete':_0x0a9e('0x164')});db['Interval'][_0x0a9e('0x110')](db[_0x0a9e('0x16b')],{'as':_0x0a9e('0x1ae'),'foreignKey':_0x0a9e('0x153')});db[_0x0a9e('0x17b')]['hasMany'](db['ChatApplication'],{'as':_0x0a9e('0x1af'),'foreignKey':'IntervalId'});db[_0x0a9e('0x17b')]['hasMany'](db[_0x0a9e('0x47')],{'as':_0x0a9e('0x1b0'),'foreignKey':_0x0a9e('0x153')});db[_0x0a9e('0x17b')][_0x0a9e('0x110')](db[_0x0a9e('0x52')],{'as':_0x0a9e('0x1b1'),'foreignKey':'IntervalId'});db['Schedule'][_0x0a9e('0x150')](db[_0x0a9e('0x3b')],{});db['Schedule'][_0x0a9e('0x150')](db[_0x0a9e('0x94')],{'foreignKey':_0x0a9e('0x1b2')});db['Schedule']['belongsTo'](db['AnalyticCustomReport'],{'foreignKey':_0x0a9e('0x1b3')});db[_0x0a9e('0x84')][_0x0a9e('0x121')](db[_0x0a9e('0x18')],{'as':'Mohs','through':_0x0a9e('0x149'),'onDelete':_0x0a9e('0x164')});db[_0x0a9e('0x86')]['belongsToMany'](db[_0x0a9e('0x124')],{'through':'cm_contact_has_tags'});db['Tag'][_0x0a9e('0x121')](db[_0x0a9e('0x64')],{'through':'chat_interaction_has_tags'});db['Tag'][_0x0a9e('0x121')](db['MailInteraction'],{'through':_0x0a9e('0x173')});db['Tag'][_0x0a9e('0x121')](db[_0x0a9e('0x53')],{'through':_0x0a9e('0x18a')});db['Tag']['belongsToMany'](db[_0x0a9e('0x11b')],{'through':_0x0a9e('0x185')});db[_0x0a9e('0x86')][_0x0a9e('0x121')](db['OpenchannelInteraction'],{'through':_0x0a9e('0x1b4')});db[_0x0a9e('0x86')]['belongsToMany'](db[_0x0a9e('0xfb')],{'through':_0x0a9e('0x1b5')});db[_0x0a9e('0x1b6')]['belongsTo'](db[_0x0a9e('0x88')],{'as':_0x0a9e('0x1b7'),'foreignKey':_0x0a9e('0x1b8')});db[_0x0a9e('0x1a2')][_0x0a9e('0x150')](db[_0x0a9e('0x6d')],{'as':_0x0a9e('0x1b9'),'foreignKey':_0x0a9e('0x1a4')});db[_0x0a9e('0x1b6')][_0x0a9e('0x150')](db[_0x0a9e('0x124')],{'as':_0x0a9e('0x160'),'foreignKey':_0x0a9e('0x19d')});db[_0x0a9e('0x8d')][_0x0a9e('0x110')](db[_0x0a9e('0x7a')],{'as':{'plural':_0x0a9e('0x1ba'),'singular':_0x0a9e('0x1bb')},'foreignKey':_0x0a9e('0x1bc'),'onDelete':_0x0a9e('0x10e'),'hooks':!![]});db[_0x0a9e('0x8d')][_0x0a9e('0x110')](db['Condition'],{'as':{'plural':_0x0a9e('0x1bd'),'singular':_0x0a9e('0x1be')},'foreignKey':_0x0a9e('0x1bf'),'onDelete':'cascade','hooks':!![]});db[_0x0a9e('0x8d')][_0x0a9e('0x110')](db[_0x0a9e('0x74')],{'as':_0x0a9e('0x1ab'),'foreignKey':'TriggerId','onDelete':_0x0a9e('0x10e'),'hooks':!![]});db[_0x0a9e('0x1c0')]['hasMany'](db[_0x0a9e('0x99')],{'as':_0x0a9e('0x1c1'),'onDelete':_0x0a9e('0x10e'),'foreignKey':'CustomReportId','hooks':!![]});db['AnalyticDefaultReport'][_0x0a9e('0x110')](db[_0x0a9e('0x99')],{'as':_0x0a9e('0x1c1'),'onDelete':'cascade','foreignKey':'DefaultReportId'});db[_0x0a9e('0x98')][_0x0a9e('0x110')](db[_0x0a9e('0x99')],{'as':_0x0a9e('0x1c1'),'onDelete':'cascade','foreignKey':_0x0a9e('0x1c2')});db['AnalyticFieldReport']['belongsTo'](db[_0x0a9e('0x98')],{'foreignKey':_0x0a9e('0x1c2')});db[_0x0a9e('0x9c')]['hasMany'](db[_0x0a9e('0x9e')],{'as':_0x0a9e('0x1c3'),'onDelete':_0x0a9e('0x10e'),'foreignKey':'AccountId'});db['SalesforceConfiguration'][_0x0a9e('0x110')](db[_0x0a9e('0xa0')],{'as':_0x0a9e('0x1c4'),'onDelete':'cascade','foreignKey':'SubjectId'});db[_0x0a9e('0x9e')]['hasMany'](db['SalesforceField'],{'as':'Descriptions','onDelete':_0x0a9e('0x10e'),'foreignKey':_0x0a9e('0x1c5')});db[_0x0a9e('0x9e')]['hasMany'](db[_0x0a9e('0xa0')],{'as':_0x0a9e('0x1c1'),'onDelete':'cascade','foreignKey':_0x0a9e('0x1c6')});db['SalesforceConfiguration'][_0x0a9e('0x150')](db[_0x0a9e('0x9c')],{'as':'Account','foreignKey':_0x0a9e('0x1c7')});db[_0x0a9e('0xa0')][_0x0a9e('0x110')](db['SalesforceField'],{'as':_0x0a9e('0x1c8'),'foreignKey':_0x0a9e('0x1c9')});db[_0x0a9e('0xa0')]['hasMany'](db[_0x0a9e('0xa0')],{'as':_0x0a9e('0x1ca'),'foreignKey':_0x0a9e('0x1c5')});db['SalesforceField'][_0x0a9e('0x110')](db[_0x0a9e('0xa0')],{'as':_0x0a9e('0x1cb'),'foreignKey':_0x0a9e('0x1c6')});db[_0x0a9e('0xa0')][_0x0a9e('0x150')](db[_0x0a9e('0x8e')],{'as':_0x0a9e('0x8e'),'foreignKey':'VariableId'});db[_0x0a9e('0xa1')][_0x0a9e('0x110')](db[_0x0a9e('0xa2')],{'as':_0x0a9e('0x1c3'),'onDelete':'cascade','foreignKey':_0x0a9e('0x1c7')});db[_0x0a9e('0xa2')]['hasMany'](db[_0x0a9e('0x1cc')],{'as':_0x0a9e('0x1c4'),'onDelete':_0x0a9e('0x10e'),'foreignKey':_0x0a9e('0x1c9')});db[_0x0a9e('0xa2')][_0x0a9e('0x110')](db[_0x0a9e('0x1cc')],{'as':_0x0a9e('0x1cd'),'onDelete':'cascade','foreignKey':_0x0a9e('0x1c5')});db['SugarcrmConfiguration'][_0x0a9e('0x110')](db[_0x0a9e('0x1cc')],{'as':'Fields','onDelete':_0x0a9e('0x10e'),'foreignKey':_0x0a9e('0x1c6')});db['SugarcrmConfiguration'][_0x0a9e('0x150')](db[_0x0a9e('0xa1')],{'as':'Account','foreignKey':_0x0a9e('0x1c7')});db['SugarcrmField']['hasMany'](db['SugarcrmField'],{'as':_0x0a9e('0x1c8'),'foreignKey':_0x0a9e('0x1c9')});db['SugarcrmField'][_0x0a9e('0x110')](db[_0x0a9e('0x1cc')],{'as':'Description','foreignKey':_0x0a9e('0x1c5')});db[_0x0a9e('0x1cc')]['hasMany'](db[_0x0a9e('0x1cc')],{'as':_0x0a9e('0x1cb'),'foreignKey':_0x0a9e('0x1c6')});db['SugarcrmField'][_0x0a9e('0x150')](db[_0x0a9e('0x8e')],{'as':_0x0a9e('0x8e'),'foreignKey':_0x0a9e('0x1ce')});db[_0x0a9e('0x1cf')]['hasMany'](db[_0x0a9e('0xa6')],{'as':'Configurations','onDelete':_0x0a9e('0x10e'),'foreignKey':_0x0a9e('0x1c7')});db[_0x0a9e('0xa6')][_0x0a9e('0x110')](db[_0x0a9e('0xa8')],{'as':_0x0a9e('0x1c4'),'onDelete':_0x0a9e('0x10e'),'foreignKey':_0x0a9e('0x1c9')});db[_0x0a9e('0xa6')]['hasMany'](db[_0x0a9e('0xa8')],{'as':_0x0a9e('0x1cd'),'onDelete':_0x0a9e('0x10e'),'foreignKey':'DescriptionId'});db['DeskConfiguration']['hasMany'](db['DeskField'],{'as':'Fields','onDelete':_0x0a9e('0x10e'),'foreignKey':'FieldId'});db[_0x0a9e('0xa6')][_0x0a9e('0x150')](db[_0x0a9e('0x1cf')],{'as':_0x0a9e('0x183'),'foreignKey':_0x0a9e('0x1c7')});db[_0x0a9e('0xa6')]['belongsToMany'](db[_0x0a9e('0x86')],{'through':'int_desk_configuration_has_tags'});db['DeskField'][_0x0a9e('0x110')](db['DeskField'],{'as':_0x0a9e('0x1c8'),'foreignKey':'SubjectId'});db[_0x0a9e('0xa8')][_0x0a9e('0x110')](db[_0x0a9e('0xa8')],{'as':_0x0a9e('0x1ca'),'foreignKey':_0x0a9e('0x1c5')});db['DeskField'][_0x0a9e('0x110')](db[_0x0a9e('0xa8')],{'as':'Field','foreignKey':_0x0a9e('0x1c6')});db[_0x0a9e('0xa8')]['belongsTo'](db[_0x0a9e('0x8e')],{'as':_0x0a9e('0x8e'),'foreignKey':_0x0a9e('0x1ce')});db[_0x0a9e('0xaa')][_0x0a9e('0x110')](db[_0x0a9e('0xac')],{'as':_0x0a9e('0x1c3'),'onDelete':'cascade','foreignKey':_0x0a9e('0x1c7')});db[_0x0a9e('0xac')][_0x0a9e('0x110')](db[_0x0a9e('0xae')],{'as':'Subjects','onDelete':_0x0a9e('0x10e'),'foreignKey':_0x0a9e('0x1c9')});db[_0x0a9e('0xac')][_0x0a9e('0x110')](db[_0x0a9e('0xae')],{'as':_0x0a9e('0x1cd'),'onDelete':_0x0a9e('0x10e'),'foreignKey':_0x0a9e('0x1c5')});db['ZohoConfiguration'][_0x0a9e('0x110')](db[_0x0a9e('0xae')],{'as':_0x0a9e('0x1c1'),'onDelete':'cascade','foreignKey':_0x0a9e('0x1c6')});db[_0x0a9e('0xac')][_0x0a9e('0x150')](db[_0x0a9e('0xaa')],{'as':_0x0a9e('0x183'),'foreignKey':_0x0a9e('0x1c7')});db[_0x0a9e('0xae')][_0x0a9e('0x110')](db[_0x0a9e('0xae')],{'as':_0x0a9e('0x1c8'),'foreignKey':'SubjectId'});db[_0x0a9e('0xae')][_0x0a9e('0x110')](db[_0x0a9e('0xae')],{'as':'Description','foreignKey':'DescriptionId'});db[_0x0a9e('0xae')][_0x0a9e('0x110')](db[_0x0a9e('0xae')],{'as':_0x0a9e('0x1cb'),'foreignKey':_0x0a9e('0x1c6')});db[_0x0a9e('0xae')][_0x0a9e('0x150')](db[_0x0a9e('0x8e')],{'as':_0x0a9e('0x8e'),'foreignKey':'VariableId'});db[_0x0a9e('0xaf')][_0x0a9e('0x110')](db['ZendeskConfiguration'],{'as':_0x0a9e('0x1c3'),'onDelete':_0x0a9e('0x10e'),'foreignKey':'AccountId'});db['ZendeskConfiguration'][_0x0a9e('0x110')](db[_0x0a9e('0xb2')],{'as':_0x0a9e('0x1c4'),'foreignKey':_0x0a9e('0x1c9')});db[_0x0a9e('0x1d0')]['hasMany'](db[_0x0a9e('0xb2')],{'as':'Descriptions','foreignKey':'DescriptionId'});db['ZendeskConfiguration'][_0x0a9e('0x110')](db['ZendeskField'],{'as':'Fields','foreignKey':'FieldId'});db[_0x0a9e('0x1d0')][_0x0a9e('0x150')](db[_0x0a9e('0xaf')],{'as':_0x0a9e('0x183'),'foreignKey':'AccountId'});db[_0x0a9e('0x1d0')]['belongsToMany'](db['Tag'],{'through':_0x0a9e('0x1d1')});db[_0x0a9e('0xb2')][_0x0a9e('0x110')](db['ZendeskField'],{'as':'Subject','foreignKey':'SubjectId'});db[_0x0a9e('0xb2')][_0x0a9e('0x110')](db[_0x0a9e('0xb2')],{'as':_0x0a9e('0x1ca'),'foreignKey':_0x0a9e('0x1c5')});db['ZendeskField'][_0x0a9e('0x110')](db[_0x0a9e('0xb2')],{'as':_0x0a9e('0x1cb'),'foreignKey':_0x0a9e('0x1c6')});db[_0x0a9e('0xb2')][_0x0a9e('0x150')](db['Variable'],{'as':_0x0a9e('0x8e'),'foreignKey':_0x0a9e('0x1ce')});db[_0x0a9e('0x1d2')][_0x0a9e('0x110')](db[_0x0a9e('0x1d3')],{'as':_0x0a9e('0x1c3'),'onDelete':_0x0a9e('0x10e'),'foreignKey':_0x0a9e('0x1c7')});db[_0x0a9e('0x1d3')][_0x0a9e('0x110')](db[_0x0a9e('0xb5')],{'as':_0x0a9e('0x1c4'),'onDelete':_0x0a9e('0x10e'),'foreignKey':_0x0a9e('0x1c9')});db[_0x0a9e('0x1d3')][_0x0a9e('0x110')](db[_0x0a9e('0xb5')],{'as':_0x0a9e('0x1cd'),'onDelete':'cascade','foreignKey':_0x0a9e('0x1c5')});db[_0x0a9e('0x1d3')]['hasMany'](db['FreshdeskField'],{'as':'Fields','onDelete':_0x0a9e('0x10e'),'foreignKey':_0x0a9e('0x1c6')});db['FreshdeskConfiguration'][_0x0a9e('0x150')](db[_0x0a9e('0x1d2')],{'as':'Account','foreignKey':_0x0a9e('0x1c7')});db['FreshdeskConfiguration'][_0x0a9e('0x121')](db['Tag'],{'through':_0x0a9e('0x1d4')});db[_0x0a9e('0xb5')][_0x0a9e('0x110')](db[_0x0a9e('0xb5')],{'as':'Subject','foreignKey':_0x0a9e('0x1c9')});db[_0x0a9e('0xb5')][_0x0a9e('0x110')](db['FreshdeskField'],{'as':'Description','foreignKey':'DescriptionId'});db['FreshdeskField'][_0x0a9e('0x110')](db[_0x0a9e('0xb5')],{'as':_0x0a9e('0x1cb'),'foreignKey':_0x0a9e('0x1c6')});db[_0x0a9e('0xb5')]['belongsTo'](db[_0x0a9e('0x8e')],{'as':_0x0a9e('0x8e'),'foreignKey':_0x0a9e('0x1ce')});db[_0x0a9e('0x1d5')]['hasMany'](db[_0x0a9e('0xb8')],{'as':_0x0a9e('0x1c3'),'onDelete':_0x0a9e('0x10e'),'foreignKey':_0x0a9e('0x1c7')});db[_0x0a9e('0xb8')]['hasMany'](db[_0x0a9e('0xb9')],{'as':_0x0a9e('0x1c4'),'foreignKey':_0x0a9e('0x1c9')});db['VtigerConfiguration'][_0x0a9e('0x110')](db['VtigerField'],{'as':_0x0a9e('0x1cd'),'foreignKey':_0x0a9e('0x1c5')});db[_0x0a9e('0xb8')][_0x0a9e('0x110')](db[_0x0a9e('0xb9')],{'as':'Fields','foreignKey':_0x0a9e('0x1c6')});db[_0x0a9e('0xb8')][_0x0a9e('0x150')](db[_0x0a9e('0x1d5')],{'as':_0x0a9e('0x183'),'foreignKey':'AccountId'});db[_0x0a9e('0xb9')][_0x0a9e('0x110')](db[_0x0a9e('0xb9')],{'as':'Subject','foreignKey':_0x0a9e('0x1c9')});db['VtigerField']['hasMany'](db[_0x0a9e('0xb9')],{'as':'Description','foreignKey':_0x0a9e('0x1c5')});db[_0x0a9e('0xb9')][_0x0a9e('0x110')](db['VtigerField'],{'as':_0x0a9e('0x1cb'),'foreignKey':_0x0a9e('0x1c6')});db[_0x0a9e('0xb9')][_0x0a9e('0x150')](db[_0x0a9e('0x8e')],{'as':_0x0a9e('0x8e'),'foreignKey':_0x0a9e('0x1ce')});db[_0x0a9e('0xba')]['hasMany'](db[_0x0a9e('0xbc')],{'as':_0x0a9e('0x1c3'),'onDelete':_0x0a9e('0x10e'),'foreignKey':_0x0a9e('0x1c7')});db[_0x0a9e('0xbc')]['hasMany'](db['ServicenowField'],{'as':_0x0a9e('0x1c4'),'foreignKey':'SubjectId'});db[_0x0a9e('0xbc')][_0x0a9e('0x110')](db['ServicenowField'],{'as':_0x0a9e('0x1cd'),'foreignKey':_0x0a9e('0x1c5')});db[_0x0a9e('0xbc')]['hasMany'](db[_0x0a9e('0x1d6')],{'as':_0x0a9e('0x1c1'),'foreignKey':_0x0a9e('0x1c6')});db[_0x0a9e('0xbc')][_0x0a9e('0x150')](db[_0x0a9e('0xba')],{'as':_0x0a9e('0x183'),'foreignKey':_0x0a9e('0x1c7')});db['ServicenowField'][_0x0a9e('0x110')](db[_0x0a9e('0x1d6')],{'as':_0x0a9e('0x1c8'),'foreignKey':_0x0a9e('0x1c9')});db[_0x0a9e('0x1d6')]['hasMany'](db[_0x0a9e('0x1d6')],{'as':'Description','foreignKey':_0x0a9e('0x1c5')});db[_0x0a9e('0x1d6')][_0x0a9e('0x110')](db['ServicenowField'],{'as':_0x0a9e('0x1cb'),'foreignKey':'FieldId'});db[_0x0a9e('0x1d6')][_0x0a9e('0x150')](db[_0x0a9e('0x8e')],{'as':_0x0a9e('0x8e'),'foreignKey':'VariableId'});db[_0x0a9e('0xbe')]['hasMany'](db[_0x0a9e('0xbf')],{'as':_0x0a9e('0x1c3'),'onDelete':'cascade','foreignKey':_0x0a9e('0x1c7')});db[_0x0a9e('0xbe')][_0x0a9e('0x150')](db['CloudProvider'],{'as':_0x0a9e('0x103'),'foreignKey':'CloudProviderId'});db[_0x0a9e('0xbf')][_0x0a9e('0x110')](db['Dynamics365Field'],{'as':'Subjects','onDelete':'cascade','foreignKey':'SubjectId'});db[_0x0a9e('0xbf')][_0x0a9e('0x110')](db[_0x0a9e('0xc1')],{'as':_0x0a9e('0x1cd'),'onDelete':'cascade','foreignKey':_0x0a9e('0x1c5')});db['Dynamics365Configuration'][_0x0a9e('0x110')](db[_0x0a9e('0xc1')],{'as':'Fields','onDelete':_0x0a9e('0x10e'),'foreignKey':_0x0a9e('0x1c6')});db[_0x0a9e('0xbf')][_0x0a9e('0x150')](db[_0x0a9e('0xbe')],{'as':_0x0a9e('0x183'),'foreignKey':_0x0a9e('0x1c7')});db['Dynamics365Field'][_0x0a9e('0x110')](db[_0x0a9e('0xc1')],{'as':_0x0a9e('0x1c8'),'foreignKey':_0x0a9e('0x1c9')});db[_0x0a9e('0xc1')][_0x0a9e('0x110')](db[_0x0a9e('0xc1')],{'as':_0x0a9e('0x1ca'),'foreignKey':_0x0a9e('0x1c5')});db[_0x0a9e('0xc1')][_0x0a9e('0x110')](db['Dynamics365Field'],{'as':_0x0a9e('0x1cb'),'foreignKey':_0x0a9e('0x1c6')});db[_0x0a9e('0xc1')][_0x0a9e('0x150')](db[_0x0a9e('0x8e')],{'as':_0x0a9e('0x8e'),'foreignKey':_0x0a9e('0x1ce')});db['FreshsalesAccount'][_0x0a9e('0x110')](db[_0x0a9e('0xc5')],{'as':_0x0a9e('0x1c3'),'onDelete':'cascade','foreignKey':_0x0a9e('0x1c7')});db[_0x0a9e('0xc5')][_0x0a9e('0x110')](db['FreshsalesField'],{'as':'Subjects','foreignKey':_0x0a9e('0x1c9')});db[_0x0a9e('0xc5')][_0x0a9e('0x110')](db[_0x0a9e('0xc7')],{'as':_0x0a9e('0x1cd'),'foreignKey':'DescriptionId'});db[_0x0a9e('0xc5')]['hasMany'](db[_0x0a9e('0xc7')],{'as':_0x0a9e('0x1c1'),'foreignKey':'FieldId'});db[_0x0a9e('0xc5')]['belongsTo'](db[_0x0a9e('0xc3')],{'as':_0x0a9e('0x183'),'foreignKey':'AccountId'});db[_0x0a9e('0xc7')][_0x0a9e('0x110')](db[_0x0a9e('0xc7')],{'as':'Subject','foreignKey':_0x0a9e('0x1c9')});db[_0x0a9e('0xc7')][_0x0a9e('0x110')](db[_0x0a9e('0xc7')],{'as':_0x0a9e('0x1ca'),'foreignKey':_0x0a9e('0x1c5')});db['FreshsalesField'][_0x0a9e('0x110')](db[_0x0a9e('0xc7')],{'as':_0x0a9e('0x1cb'),'foreignKey':_0x0a9e('0x1c6')});db['FreshsalesField']['belongsTo'](db[_0x0a9e('0x8e')],{'as':_0x0a9e('0x8e'),'foreignKey':_0x0a9e('0x1ce')});db['ChatQueueReport']['belongsTo'](db[_0x0a9e('0x60')],{});db['ChatQueueReport']['belongsTo'](db[_0x0a9e('0x139')],{'as':_0x0a9e('0x16c'),'foreignKey':'ListId'});db[_0x0a9e('0xca')][_0x0a9e('0x150')](db[_0x0a9e('0x124')],{'as':_0x0a9e('0x160'),'foreignKey':_0x0a9e('0x172')});db['ChatQueueReport'][_0x0a9e('0x150')](db[_0x0a9e('0x64')],{});db['ChatQueueReport'][_0x0a9e('0x150')](db[_0x0a9e('0x65')],{});db[_0x0a9e('0xca')][_0x0a9e('0x150')](db[_0x0a9e('0x11')],{});db['ChatQueueReport'][_0x0a9e('0x150')](db[_0x0a9e('0x67')],{});db['ChatInternalMessage']['belongsTo'](db[_0x0a9e('0x11')],{'onDelete':_0x0a9e('0x10e'),'foreignKey':'FromId'});db['ChatInternalMessage'][_0x0a9e('0x150')](db[_0x0a9e('0x11')],{'onDelete':_0x0a9e('0x10e'),'foreignKey':_0x0a9e('0x1d7')});db[_0x0a9e('0xd0')]['hasMany'](db[_0x0a9e('0x1d8')],{'foreignKey':'SessionId','onDelete':'cascade'});db[_0x0a9e('0xd0')]['hasMany'](db[_0x0a9e('0xcd')],{'foreignKey':'SessionId','onDelete':_0x0a9e('0x10e')});db['SmsQueueReport']['belongsTo'](db[_0x0a9e('0x50')],{});db[_0x0a9e('0xd2')][_0x0a9e('0x150')](db['CmList'],{'as':'List','foreignKey':'ListId'});db[_0x0a9e('0xd2')][_0x0a9e('0x150')](db['CmContact'],{'as':_0x0a9e('0x160'),'foreignKey':'ContactId'});db[_0x0a9e('0xd2')]['belongsTo'](db[_0x0a9e('0x53')],{});db[_0x0a9e('0xd2')]['belongsTo'](db['SmsMessage'],{});db['SmsQueueReport'][_0x0a9e('0x150')](db[_0x0a9e('0x11')],{});db[_0x0a9e('0xd2')][_0x0a9e('0x150')](db[_0x0a9e('0x57')],{});db[_0x0a9e('0x1d9')][_0x0a9e('0x110')](db[_0x0a9e('0xd0')],{'foreignKey':_0x0a9e('0x1da')});db[_0x0a9e('0x1d9')][_0x0a9e('0x110')](db[_0x0a9e('0x1d8')],{'foreignKey':_0x0a9e('0x1da')});db[_0x0a9e('0x1d9')][_0x0a9e('0x110')](db['JscriptyAnswerReport'],{'foreignKey':'ProjectId'});db[_0x0a9e('0x129')][_0x0a9e('0x121')](db[_0x0a9e('0x11')],{'as':_0x0a9e('0x170'),'through':'user_has_teams'});db[_0x0a9e('0x129')]['belongsToMany'](db[_0x0a9e('0x1a')],{'through':'TeamVoiceQueue','as':_0x0a9e('0x131')});db['Team']['belongsToMany'](db[_0x0a9e('0x3c')],{'through':_0x0a9e('0x171'),'as':_0x0a9e('0x1db')});db[_0x0a9e('0x129')]['belongsToMany'](db['ChatQueue'],{'through':_0x0a9e('0x19b'),'as':'ChatQueues'});db[_0x0a9e('0x129')][_0x0a9e('0x121')](db['FaxQueue'],{'through':_0x0a9e('0x187'),'as':'FaxQueues'});db[_0x0a9e('0x129')][_0x0a9e('0x121')](db[_0x0a9e('0x57')],{'through':_0x0a9e('0x18c'),'as':_0x0a9e('0x136')});db[_0x0a9e('0x129')][_0x0a9e('0x121')](db[_0x0a9e('0x137')],{'through':_0x0a9e('0x190'),'as':_0x0a9e('0x1dc')});db[_0x0a9e('0x129')][_0x0a9e('0x121')](db[_0x0a9e('0x101')],{'through':_0x0a9e('0x1dd'),'as':_0x0a9e('0x138')});db[_0x0a9e('0x129')]['belongsToMany'](db[_0x0a9e('0xf1')],{'through':_0x0a9e('0x107'),'as':_0x0a9e('0x132')});db['Campaign'][_0x0a9e('0x110')](db[_0x0a9e('0x6d')],{'as':_0x0a9e('0x14c'),'foreignKey':_0x0a9e('0x1a7')});db[_0x0a9e('0x1a5')][_0x0a9e('0x110')](db[_0x0a9e('0x71')],{'as':_0x0a9e('0x115'),'foreignKey':_0x0a9e('0x1a7')});db[_0x0a9e('0x1a5')][_0x0a9e('0x110')](db['CmHopperHistory'],{'as':_0x0a9e('0x19e'),'foreignKey':_0x0a9e('0x1a7')});db[_0x0a9e('0x1a5')]['hasMany'](db[_0x0a9e('0x6f')],{'as':'HopperBlacks','foreignKey':'CampaignId'});db[_0x0a9e('0x1a5')]['belongsTo'](db[_0x0a9e('0x28')],{'as':'Trunk','foreignKey':_0x0a9e('0x14f')});db[_0x0a9e('0x1a5')][_0x0a9e('0x150')](db['Trunk'],{'as':_0x0a9e('0x151'),'foreignKey':'TrunkBackupId'});db['Campaign'][_0x0a9e('0x150')](db[_0x0a9e('0x17b')],{'as':_0x0a9e('0x17b'),'foreignKey':_0x0a9e('0x153')});db[_0x0a9e('0x1a5')][_0x0a9e('0x150')](db['SquareProject'],{'as':_0x0a9e('0xdc'),'foreignKey':_0x0a9e('0x1de')});db[_0x0a9e('0x1a5')][_0x0a9e('0x121')](db[_0x0a9e('0x139')],{'as':'Lists','through':_0x0a9e('0x1df')});db[_0x0a9e('0x1a5')][_0x0a9e('0x121')](db[_0x0a9e('0x139')],{'as':_0x0a9e('0x156'),'through':_0x0a9e('0x1e0')});db[_0x0a9e('0xe4')][_0x0a9e('0x150')](db[_0x0a9e('0x66')],{'as':_0x0a9e('0x66'),'foreignKey':_0x0a9e('0x19a')});db[_0x0a9e('0x1e1')][_0x0a9e('0x150')](db['MailMessage'],{});db['MailTransferReport'][_0x0a9e('0x150')](db[_0x0a9e('0x11c')],{});db['MailTransferReport'][_0x0a9e('0x150')](db[_0x0a9e('0x3b')],{'foreignKey':_0x0a9e('0x1e2'),'as':_0x0a9e('0x1e3')});db[_0x0a9e('0x1e1')]['belongsTo'](db['User'],{'foreignKey':'FromUserId','as':_0x0a9e('0x1e4')});db[_0x0a9e('0x1e1')][_0x0a9e('0x150')](db[_0x0a9e('0x11')],{'foreignKey':_0x0a9e('0x1e5'),'as':_0x0a9e('0x1e6')});db[_0x0a9e('0x1e1')][_0x0a9e('0x150')](db[_0x0a9e('0x3c')],{'foreignKey':'ToMailQueueId','as':'ToQueue'});db[_0x0a9e('0x1e1')][_0x0a9e('0x150')](db[_0x0a9e('0x3b')],{'foreignKey':_0x0a9e('0x1e7'),'as':_0x0a9e('0x1e8')});db[_0x0a9e('0xe8')][_0x0a9e('0x150')](db[_0x0a9e('0x65')],{});db[_0x0a9e('0xe8')][_0x0a9e('0x150')](db['ChatInteraction'],{});db[_0x0a9e('0xe8')]['belongsTo'](db['ChatWebsite'],{'foreignKey':_0x0a9e('0x1e9'),'as':_0x0a9e('0x1e3')});db[_0x0a9e('0xe8')][_0x0a9e('0x150')](db[_0x0a9e('0x11')],{'foreignKey':_0x0a9e('0x1ea'),'as':_0x0a9e('0x1e4')});db[_0x0a9e('0xe8')][_0x0a9e('0x150')](db['User'],{'foreignKey':_0x0a9e('0x1e5'),'as':_0x0a9e('0x1e6')});db[_0x0a9e('0xe8')]['belongsTo'](db[_0x0a9e('0x67')],{'foreignKey':_0x0a9e('0x1eb'),'as':'ToQueue'});db['ChatTransferReport']['belongsTo'](db['ChatWebsite'],{'foreignKey':_0x0a9e('0x1ec'),'as':_0x0a9e('0x1e8')});db['FaxTransferReport'][_0x0a9e('0x150')](db['FaxMessage'],{});db[_0x0a9e('0xea')][_0x0a9e('0x150')](db[_0x0a9e('0x11b')],{});db['FaxTransferReport']['belongsTo'](db[_0x0a9e('0x45')],{'foreignKey':_0x0a9e('0x1ed'),'as':_0x0a9e('0x1e3')});db[_0x0a9e('0xea')][_0x0a9e('0x150')](db[_0x0a9e('0x11')],{'foreignKey':_0x0a9e('0x1ea'),'as':_0x0a9e('0x1e4')});db[_0x0a9e('0xea')][_0x0a9e('0x150')](db[_0x0a9e('0x11')],{'foreignKey':'ToUserId','as':_0x0a9e('0x1e6')});db[_0x0a9e('0xea')]['belongsTo'](db['FaxQueue'],{'foreignKey':_0x0a9e('0x1ee'),'as':_0x0a9e('0x1ef')});db[_0x0a9e('0xea')][_0x0a9e('0x150')](db[_0x0a9e('0x45')],{'foreignKey':'ToFaxAccountId','as':_0x0a9e('0x1e8')});db[_0x0a9e('0xec')]['belongsTo'](db[_0x0a9e('0x5e')],{});db['OpenchannelTransferReport']['belongsTo'](db['OpenchannelInteraction'],{});db[_0x0a9e('0xec')][_0x0a9e('0x150')](db['OpenchannelAccount'],{'foreignKey':'FromOpenchannelAccountId','as':_0x0a9e('0x1e3')});db[_0x0a9e('0xec')][_0x0a9e('0x150')](db[_0x0a9e('0x11')],{'foreignKey':'FromUserId','as':_0x0a9e('0x1e4')});db[_0x0a9e('0xec')][_0x0a9e('0x150')](db['User'],{'foreignKey':_0x0a9e('0x1e5'),'as':_0x0a9e('0x1e6')});db[_0x0a9e('0xec')][_0x0a9e('0x150')](db[_0x0a9e('0x137')],{'foreignKey':'ToOpenchannelQueueId','as':'ToQueue'});db[_0x0a9e('0xec')][_0x0a9e('0x150')](db[_0x0a9e('0x59')],{'foreignKey':'ToOpenchannelAccountId','as':'ToAccount'});db['SmsTransferReport']['belongsTo'](db[_0x0a9e('0x55')],{});db[_0x0a9e('0xee')][_0x0a9e('0x150')](db[_0x0a9e('0x53')],{});db[_0x0a9e('0xee')]['belongsTo'](db[_0x0a9e('0x50')],{'foreignKey':_0x0a9e('0x1f0'),'as':_0x0a9e('0x1e3')});db[_0x0a9e('0xee')][_0x0a9e('0x150')](db['User'],{'foreignKey':_0x0a9e('0x1ea'),'as':_0x0a9e('0x1e4')});db[_0x0a9e('0xee')][_0x0a9e('0x150')](db[_0x0a9e('0x11')],{'foreignKey':'ToUserId','as':_0x0a9e('0x1e6')});db[_0x0a9e('0xee')]['belongsTo'](db['SmsQueue'],{'foreignKey':'ToSmsQueueId','as':_0x0a9e('0x1ef')});db[_0x0a9e('0xee')]['belongsTo'](db[_0x0a9e('0x50')],{'foreignKey':'ToSmsAccountId','as':'ToAccount'});db['CmList']['hasMany'](db[_0x0a9e('0x167')],{'as':_0x0a9e('0x168'),'foreignKey':_0x0a9e('0x16d'),'onDelete':_0x0a9e('0x10e')});db[_0x0a9e('0x139')][_0x0a9e('0x110')](db[_0x0a9e('0x1f1')],{'as':_0x0a9e('0x1f2'),'foreignKey':_0x0a9e('0x16d')});db[_0x0a9e('0x139')][_0x0a9e('0x110')](db['CmContact'],{'as':_0x0a9e('0x125'),'onDelete':'cascade','foreignKey':_0x0a9e('0x16d')});db[_0x0a9e('0x139')][_0x0a9e('0x110')](db[_0x0a9e('0x71')],{'as':_0x0a9e('0x115'),'foreignKey':_0x0a9e('0x16d')});db[_0x0a9e('0x139')][_0x0a9e('0x110')](db[_0x0a9e('0x116')],{'as':'HopperHistory','foreignKey':'ListId'});db['CmList'][_0x0a9e('0x110')](db[_0x0a9e('0x73')],{'as':_0x0a9e('0x73'),'foreignKey':'ListId'});db[_0x0a9e('0x139')][_0x0a9e('0x121')](db[_0x0a9e('0x1a')],{'as':'Queues','through':_0x0a9e('0x1f3')});db[_0x0a9e('0x139')][_0x0a9e('0x121')](db[_0x0a9e('0x11')],{'as':'Agents','through':_0x0a9e('0x128')});db[_0x0a9e('0xf1')][_0x0a9e('0x110')](db[_0x0a9e('0x16')],{'as':_0x0a9e('0x114'),'onDelete':_0x0a9e('0x10e')});db[_0x0a9e('0xf1')][_0x0a9e('0x121')](db[_0x0a9e('0x11')],{'as':_0x0a9e('0x170'),'through':'UserVoicePrefix'});db[_0x0a9e('0xf1')]['belongsToMany'](db[_0x0a9e('0x129')],{'through':'TeamVoicePrefix','as':_0x0a9e('0x155')});db[_0x0a9e('0xf2')][_0x0a9e('0x110')](db[_0x0a9e('0x11')],{'as':_0x0a9e('0x176'),'foreignKey':_0x0a9e('0x1f4')});db['UserProfile'][_0x0a9e('0x110')](db['UserProfileSection'],{'as':_0x0a9e('0x1f5'),'foreignKey':_0x0a9e('0x1f4'),'onDelete':_0x0a9e('0x10e')});db['UserProfileSection']['hasMany'](db['UserProfileResource'],{'as':_0x0a9e('0x1f6'),'foreignKey':_0x0a9e('0x1f7'),'onDelete':_0x0a9e('0x10e')});db[_0x0a9e('0xf7')][_0x0a9e('0x110')](db[_0x0a9e('0x167')],{'as':'Dispositions','foreignKey':_0x0a9e('0x1f8'),'onDelete':_0x0a9e('0x10e')});db[_0x0a9e('0xf7')][_0x0a9e('0x110')](db['CannedAnswer'],{'as':_0x0a9e('0x169'),'foreignKey':_0x0a9e('0x1f8')});db['WhatsappAccount'][_0x0a9e('0x110')](db[_0x0a9e('0xfd')],{'as':_0x0a9e('0x158'),'foreignKey':'WhatsappAccountId'});db[_0x0a9e('0xf7')]['hasMany'](db[_0x0a9e('0xfb')],{'as':'Interactions'});db[_0x0a9e('0xf7')][_0x0a9e('0x110')](db['WhatsappApplication'],{'as':_0x0a9e('0x147'),'foreignKey':_0x0a9e('0x1f8'),'onDelete':_0x0a9e('0x10e')});db['WhatsappAccount'][_0x0a9e('0x150')](db['CmList'],{'as':_0x0a9e('0x16c'),'foreignKey':_0x0a9e('0x16d')});db[_0x0a9e('0xf7')][_0x0a9e('0x150')](db[_0x0a9e('0x7d')],{'as':'mandatoryDispositionPause','foreignKey':_0x0a9e('0x154')});db[_0x0a9e('0xf7')][_0x0a9e('0x121')](db[_0x0a9e('0x11')],{'as':_0x0a9e('0x170'),'through':_0x0a9e('0x144')});db[_0x0a9e('0xf9')][_0x0a9e('0x150')](db[_0x0a9e('0x11')],{'onDelete':_0x0a9e('0x164')});db[_0x0a9e('0xf9')][_0x0a9e('0x150')](db[_0x0a9e('0x101')],{'onDelete':_0x0a9e('0x164')});db[_0x0a9e('0xf9')][_0x0a9e('0x150')](db['WhatsappAccount'],{'onDelete':_0x0a9e('0x164')});db['WhatsappApplication'][_0x0a9e('0x150')](db[_0x0a9e('0x17b')],{'onDelete':'restrict','foreignKey':_0x0a9e('0x153')});db[_0x0a9e('0xf9')]['belongsTo'](db[_0x0a9e('0x86')],{'onDelete':_0x0a9e('0x164'),'foreignKey':_0x0a9e('0x181')});db['WhatsappInteraction'][_0x0a9e('0x110')](db['WhatsappMessage'],{'as':'Messages','onDelete':'cascade','foreignKey':_0x0a9e('0x1f9')});db[_0x0a9e('0xfb')][_0x0a9e('0x150')](db[_0x0a9e('0xf7')],{'as':_0x0a9e('0x183'),'foreignKey':_0x0a9e('0x1f8')});db[_0x0a9e('0xfb')][_0x0a9e('0x150')](db[_0x0a9e('0x124')],{'as':_0x0a9e('0x160'),'foreignKey':_0x0a9e('0x172')});db[_0x0a9e('0xfb')][_0x0a9e('0x150')](db[_0x0a9e('0x11')],{'as':_0x0a9e('0x184'),'foreignKey':_0x0a9e('0x10f')});db[_0x0a9e('0xfb')][_0x0a9e('0x121')](db[_0x0a9e('0x86')],{'through':_0x0a9e('0x1b5'),'as':_0x0a9e('0x174')});db['WhatsappInteraction'][_0x0a9e('0x121')](db['Tag'],{'through':_0x0a9e('0x1b5'),'as':_0x0a9e('0x175')});db[_0x0a9e('0xfb')]['belongsToMany'](db[_0x0a9e('0x11')],{'as':_0x0a9e('0x176'),'through':_0x0a9e('0x130'),'foreignKey':'WhatsappInteractionId'});db[_0x0a9e('0xfd')][_0x0a9e('0x150')](db[_0x0a9e('0x11')],{'as':_0x0a9e('0x11')});db[_0x0a9e('0xfd')][_0x0a9e('0x150')](db[_0x0a9e('0x124')],{'onDelete':'cascade','as':_0x0a9e('0x160')});db[_0x0a9e('0xfd')][_0x0a9e('0x150')](db['WhatsappInteraction'],{'onDelete':'cascade','as':_0x0a9e('0x179'),'foreignKey':_0x0a9e('0x1f9')});db[_0x0a9e('0xfd')]['belongsTo'](db[_0x0a9e('0xf7')],{'as':_0x0a9e('0x183'),'foreignKey':_0x0a9e('0x1f8')});db[_0x0a9e('0xfe')][_0x0a9e('0x150')](db[_0x0a9e('0xf7')],{});db['WhatsappQueueReport'][_0x0a9e('0x150')](db[_0x0a9e('0x139')],{'as':_0x0a9e('0x16c'),'foreignKey':_0x0a9e('0x16d')});db[_0x0a9e('0xfe')][_0x0a9e('0x150')](db[_0x0a9e('0x124')],{'as':_0x0a9e('0x160'),'foreignKey':_0x0a9e('0x172')});db[_0x0a9e('0xfe')][_0x0a9e('0x150')](db['WhatsappInteraction'],{});db['WhatsappQueueReport']['belongsTo'](db[_0x0a9e('0x101')],{});db[_0x0a9e('0xfe')]['belongsTo'](db['WhatsappMessage'],{});db[_0x0a9e('0xfe')][_0x0a9e('0x150')](db['User'],{});db['WhatsappTransferReport'][_0x0a9e('0x150')](db[_0x0a9e('0xfd')],{});db['WhatsappTransferReport'][_0x0a9e('0x150')](db[_0x0a9e('0xfb')],{});db[_0x0a9e('0x1fa')]['belongsTo'](db['WhatsappAccount'],{'foreignKey':_0x0a9e('0x1fb'),'as':_0x0a9e('0x1e3')});db['WhatsappTransferReport']['belongsTo'](db[_0x0a9e('0xf7')],{'foreignKey':_0x0a9e('0x1fc'),'as':'ToAccount'});db[_0x0a9e('0x1fa')]['belongsTo'](db['WhatsappQueue'],{'foreignKey':_0x0a9e('0x1fd'),'as':_0x0a9e('0x1ef')});db['WhatsappTransferReport']['belongsTo'](db['User'],{'foreignKey':_0x0a9e('0x1ea'),'as':'FromAgent'});db[_0x0a9e('0x1fa')][_0x0a9e('0x150')](db['User'],{'foreignKey':'ToUserId','as':_0x0a9e('0x1e6')});db[_0x0a9e('0x101')][_0x0a9e('0x121')](db[_0x0a9e('0x11')],{'as':_0x0a9e('0x170'),'through':_0x0a9e('0x37'),'foreignKey':'WhatsappQueueId'});db[_0x0a9e('0x101')][_0x0a9e('0x121')](db[_0x0a9e('0x129')],{'through':_0x0a9e('0x1dd'),'as':'Teams'});db[_0x0a9e('0x1fe')][_0x0a9e('0x150')](db[_0x0a9e('0x11')],{'as':_0x0a9e('0x1ff'),'foreignKey':_0x0a9e('0x10f'),'onDelete':_0x0a9e('0x10e'),'hooks':!![]});db[_0x0a9e('0x103')][_0x0a9e('0x10b')](db['Dynamics365Account'],{'as':_0x0a9e('0xbe'),'onDelete':_0x0a9e('0x164')});db['CloudProvider'][_0x0a9e('0x10b')](db['MailServerIn'],{'as':'Imap','onDelete':_0x0a9e('0x164')});db['CloudProvider']['hasOne'](db['MailServerOut'],{'as':'Smtp','onDelete':_0x0a9e('0x164')});module['exports']={'db':db,'dbH':dbH}; \ No newline at end of file +var _0xa9e0=['SquareRecording','../api/squareRecording/squareRecording.model','SquareMessage','../api/squareMessage/squareMessage.model','License','Migration','../api/migration/migration.model','Attachment','../api/attachment/attachment.model','Plugin','../api/plugin/plugin.model','ChatTransferReport','../api/chatTransferReport/chatTransferReport.model','FaxTransferReport','../api/faxTransferReport/faxTransferReport.model','OpenchannelTransferReport','../api/openchannelTransferReport/openchannelTransferReport.model','SmsTransferReport','../api/smsTransferReport/smsTransferReport.model','../api/cmList/cmList.model','VoicePrefix','UserProfile','UserProfileSection','UserProfileResource','UserNotification','../api/userNotification/userNotification.model','WhatsappAccount','../api/whatsappAccount/whatsappAccount.model','WhatsappApplication','../api/whatsappApplication/whatsappApplication.model','WhatsappInteraction','../api/whatsappInteraction/whatsappInteraction.model','WhatsappMessage','WhatsappQueueReport','../api/whatsappQueueReport/whatsappQueueReport.model','../api/whatsappTransferReport/whatsappTransferReport.model','WhatsappQueue','../api/whatsappQueue/whatsappQueue.model','CloudProvider','../api/cloudProvider/cloudProvider.model','TeamVoiceQueue','../api/teamVoiceQueue/teamVoiceQueue.model','TeamVoicePrefix','../api/teamVoicePrefix/teamVoicePrefix.model','UserVoicePrefix','../api/userVoicePrefix/userVoicePrefix.model','hasOne','VoiceMail','userSetting','cascade','UserId','hasMany','VoiceRecording','Recordings','VoiceQueuesRt','Extensions','HopperFinals','CmHopperHistory','HopperHistory','OpenchannelInteractions','ChatInteractions','SmsInteractions','FaxInteraction','MailInteraction','MailInteractions','WhatsappInteractions','UserNotifications','SenderId','belongsToMany','Groups','chat_group_has_users','CmContact','Contacts','cm_user_has_contacts','Lists','cm_user_has_lists','Team','user_has_teams','user_has_mail_interactions','FaxInteractions','user_has_fax_interactions','user_has_sms_interactions','user_has_openchannel_interactions','user_has_whatsapp_interactions','VoiceQueues','VoicePrefixes','ChatQueues','UserChatQueue','FaxQueues','SmsQueues','OpenchannelQueue','WhatsappQueues','CmList','ChatWebsites','user_has_chat_websites','user_has_fax_accounts','MailAccounts','user_has_mail_accounts','OpenchannelAccounts','user_has_openchannel_accounts','SmsAccounts','user_has_sms_accounts','WhatsappAccounts','user_has_whatsapp_accounts','ChanSpyId','VoiceContext','Applications','Sounds','moh_has_sounds','Members','VoiceQueueId','Hoppers','HopperBlacks','JscriptySessions','TrunkId','belongsTo','TrunkBackup','TrunkBackupId','IntervalId','mandatoryDispositionPauseId','Teams','BlackLists','voice_queues_has_cm_blacklists','Messages','mailbox','mailboxuser','VoiceCallReport','QueueCalls','uniqueid','VoiceAgentReport','AgentReports','Contact','MailAccountId','CloudProviderId','MailServerOut','restrict','Imap','Smtp','Disposition','Dispositions','Answers','Interactions','MailApplication','List','ListId','TemplateId','mandatoryDispositionPause','Agents','team_has_mail_queues','ContactId','mail_interaction_has_tags','Tags','ThroughTags','Users','MailInteractionId','Attachments','Interaction','ChatWebsiteId','Interval','MailQueueReport','Dashboard','CannedAnswer','FaxAccountId','Exntensions','TagId','FaxInteractionId','Account','Owner','fax_interaction_has_tags','AttachmentId','team_has_fax_queues','SmsAccountId','SmsInteractionId','sms_interaction_has_tags','SmsQueueId','team_has_sms_queues','OpenchannelAccountId','OpenchannelQueueId','OpenchannelInteractionId','team_has_openchannel_queues','ChatProactiveAction','ProactiveActions','Agent','Queue','ChatQueueId','Website','ChatInteractionId','chat_interaction_has_tags','user_has_chat_interactions','ChatOfflineMessageId','team_has_chat_queues','ChatGroupId','CmContactId','HopperHistories','CmCompany','Company','cm_contact_has_tags','CmHopperAdditionalPhone','AdditionalPhones','CmHopperId','Campaign','OwnerId','CampaignId','All','OneAll','OneAny','Actions','ParentId','Intervals','MailApplications','ChatApplications','FaxApplications','SmsApplications','DefaultReportId','CustomReportId','openchannel_interaction_has_tags','whatsapp_interaction_has_tags','CmContactHasItem','ItemType','ItemTypeId','Hopper','AllConditions','AllCondition','TriggerAllId','AnyConditions','AnyCondition','TriggerAnyId','AnalyticCustomReport','Fields','MetricId','Configurations','Subjects','DescriptionId','FieldId','AccountId','Subject','SubjectId','Description','Field','SugarcrmField','Descriptions','VariableId','DeskAccount','ZendeskConfiguration','int_zendesk_configuration_has_tags','FreshdeskAccount','FreshdeskConfiguration','int_freshdesk_configuration_has_tags','VtigerAccount','ServicenowField','ToId','JscriptyQuestionReport','JscriptyProject','ProjectId','MailQueues','OpenchannelQueues','team_has_whatsapp_queues','SquareProjectId','campaigns_has_cm_lists','campaigns_has_cm_blacklists','MailTransferReport','FromMailAccountId','FromAccount','FromAgent','ToUserId','ToAgent','ToMailAccountId','ToAccount','FromChatWebsiteId','FromUserId','ToChatQueueId','ToChatWebsiteId','FromFaxAccountId','ToFaxQueueId','ToQueue','FromSmsAccountId','CmCustomField','CustomFields','voice_queues_has_cm_lists','userProfileId','UserProfileSections','Resources','sectionId','WhatsappAccountId','WhatsappInteractionId','WhatsappTransferReport','FromWhatsappAccountId','ToWhatsappAccountId','ToQueueId','UserSetting','user','../config/environment','sequelize','lodash','motion2','xcall','xC@LL1234','127.0.0.1','utf8mb4','name','utf8','defaultsDeep','mysql','username','password','options','database','sequelizeHistory','User','import','VoiceChanSpy','../api/voiceChanSpy/voiceChanSpy.model','../api/voiceContext/voiceContext.model','VoiceExtension','../api/voiceExtension/voiceExtension.model','VoiceMusicOnHold','../api/voiceMusicOnHold/voiceMusicOnHold.model','VoiceQueue','../api/voiceQueue/voiceQueue.model','ScreenRecording','../api/screenRecording/screenRecording.model','../api/voiceMail/voiceMail.model','VoiceMailMessage','../api/voiceMailMessage/voiceMailMessage.model','../api/voiceCallReport/voiceCallReport.model','VoiceDialReport','../api/voiceDialReport/voiceDialReport.model','../api/voiceAgentReport/voiceAgentReport.model','VoiceQueueReport','../api/voiceQueueReport/voiceQueueReport.model','MemberReport','Trunk','../api/trunk/trunk.model','../api/voiceTransferReport/voiceTransferReport.model','UserVoiceQueueRt','../api/userVoiceQueueRt/userVoiceQueueRt.model','UserVoiceQueue','../api/userVoiceQueue/userVoiceQueue.model','../api/userChatQueue/userChatQueue.model','UserMailQueue','../api/userMailQueue/userMailQueue.model','UserFaxQueue','../api/userFaxQueue/userFaxQueue.model','UserSmsQueue','UserOpenchannelQueue','../api/userOpenchannelQueue/userOpenchannelQueue.model','UserWhatsappQueue','../api/userWhatsappQueue/userWhatsappQueue.model','MailServerIn','../api/mailServerOut/mailServerOut.model','MailAccount','MailQueue','MailSubstatus','MailMessage','../api/mailMessage/mailMessage.model','../api/mailApplication/mailApplication.model','../api/mailQueueReport/mailQueueReport.model','../api/dashboard/dashboard.model','DashboardItem','../api/dashboardItem/dashboardItem.model','FaxAccount','../api/faxAccount/faxAccount.model','FaxApplication','../api/faxApplication/faxApplication.model','../api/faxInteraction/faxInteraction.model','FaxMessage','../api/faxMessage/faxMessage.model','FaxQueue','../api/faxQueue/faxQueue.model','FaxQueueReport','../api/faxQueueReport/faxQueueReport.model','SmsAccount','../api/smsAccount/smsAccount.model','SmsApplication','SmsInteraction','../api/smsInteraction/smsInteraction.model','SmsMessage','../api/smsMessage/smsMessage.model','SmsQueue','../api/smsQueue/smsQueue.model','OpenchannelAccount','../api/openchannelAccount/openchannelAccount.model','OpenchannelApplication','../api/openchannelApplication/openchannelApplication.model','OpenchannelInteraction','OpenchannelMessage','../api/openchannelQueue/openchannelQueue.model','ChatWebsite','../api/chatWebsite/chatWebsite.model','OpenchannelQueueReport','ChatApplication','ChatInteraction','ChatMessage','ChatOfflineMessage','ChatQueue','ChatGroup','../api/chatGroup/chatGroup.model','../api/chatProactiveAction/chatProactiveAction.model','../api/cmCompany/cmCompany.model','../api/cmContact/cmContact.model','CmHopper','../api/cmHopper/cmHopper.model','CmHopperBlack','../api/cmHopperBlack/cmHopperBlack.model','CmHopperFinal','../api/cmHopperFinal/cmHopperFinal.model','ReportAgentPreview','Action','../api/action/action.model','Automation','../api/automation/automation.model','../api/cannedAnswer/cannedAnswer.model','../api/disposition/disposition.model','Condition','../api/condition/condition.model','../api/interval/interval.model','Pause','../api/pause/pause.model','Cdr','../api/cdr/cdr.model','../api/voiceQueuesLog/voiceQueuesLog.model','Schedule','../api/schedule/schedule.model','Sound','../api/sound/sound.model','Tag','../api/tag/tag.model','ContactItemType','../api/contactItemType/contactItemType.model','../api/cmContactHasItem/cmContactHasItem.model','Template','../api/template/template.model','Trigger','Variable','../api/variable/variable.model','Integration','../api/integration/integration.model','../api/integrationReport/integrationReport.model','../api/analyticCustomReport/analyticCustomReport.model','AnalyticDefaultReport','../api/analyticDefaultReport/analyticDefaultReport.model','AnalyticExtractedReport','../api/analyticExtractedReport/analyticExtractedReport.model','AnalyticMetric','AnalyticFieldReport','../api/analyticFieldReport/analyticFieldReport.model','../api/analyticTreeReport/analyticTreeReport.model','SalesforceAccount','../api/intSalesforceAccount/intSalesforceAccount.model','SalesforceConfiguration','../api/intSalesforceConfiguration/intSalesforceConfiguration.model','SalesforceField','SugarcrmAccount','SugarcrmConfiguration','../api/intSugarcrmConfiguration/intSugarcrmConfiguration.model','../api/intSugarcrmField/intSugarcrmField.model','../api/intDeskAccount/intDeskAccount.model','DeskConfiguration','../api/intDeskConfiguration/intDeskConfiguration.model','DeskField','../api/intDeskField/intDeskField.model','ZohoAccount','../api/intZohoAccount/intZohoAccount.model','ZohoConfiguration','../api/intZohoConfiguration/intZohoConfiguration.model','ZohoField','ZendeskAccount','../api/intZendeskAccount/intZendeskAccount.model','../api/intZendeskConfiguration/intZendeskConfiguration.model','ZendeskField','../api/intZendeskField/intZendeskField.model','../api/intFreshdeskConfiguration/intFreshdeskConfiguration.model','FreshdeskField','../api/intFreshdeskField/intFreshdeskField.model','../api/intVtigerAccount/intVtigerAccount.model','VtigerConfiguration','VtigerField','ServicenowAccount','../api/intServicenowAccount/intServicenowAccount.model','ServicenowConfiguration','../api/intServicenowConfiguration/intServicenowConfiguration.model','Dynamics365Account','Dynamics365Configuration','../api/intDynamics365Configuration/intDynamics365Configuration.model','Dynamics365Field','../api/intDynamics365Field/intDynamics365Field.model','FreshsalesAccount','../api/intFreshsalesAccount/intFreshsalesAccount.model','FreshsalesConfiguration','../api/intFreshsalesConfiguration/intFreshsalesConfiguration.model','FreshsalesField','../api/intFreshsalesField/intFreshsalesField.model','../api/network/network.model','ChatQueueReport','../api/chatQueueReport/chatQueueReport.model','ChatInternalMessage','JscriptyAnswerReport','../api/jscriptyAnswerReport/jscriptyAnswerReport.model','../api/jscriptyQuestionReport/jscriptyQuestionReport.model','JscriptySessionReport','../api/jscriptySessionReport/jscriptySessionReport.model','SmsQueueReport','../api/smsQueueReport/smsQueueReport.model','SquareReport','../api/squareReport/squareReport.model','SquareDetailsReport','../api/squareReportDetail/squareReportDetail.model','../api/jscriptyProject/jscriptyProject.model','Setting','../api/setting/setting.model','../api/squareOdbc/squareOdbc.model','SquareProject'];(function(_0x40dd56,_0x726ca5){var _0x4f850f=function(_0x5f899e){while(--_0x5f899e){_0x40dd56['push'](_0x40dd56['shift']());}};_0x4f850f(++_0x726ca5);}(_0xa9e0,0x123));var _0x0a9e=function(_0x3947c9,_0x4d6c97){_0x3947c9=_0x3947c9-0x0;var _0x2e7871=_0xa9e0[_0x3947c9];return _0x2e7871;};'use strict';var config=require(_0x0a9e('0x0'));var Sequelize=require(_0x0a9e('0x1'));var _=require(_0x0a9e('0x2'));var jstz=require('jstz');var timezone=jstz['determine']();config[_0x0a9e('0x1')]=_['defaultsDeep'](config[_0x0a9e('0x1')],{'database':_0x0a9e('0x3'),'username':_0x0a9e('0x4'),'password':_0x0a9e('0x5'),'options':{'host':_0x0a9e('0x6'),'port':0xcea,'dialect':'mysql','dialectOptions':{'charset':_0x0a9e('0x7')},'logging':![],'timezone':timezone[_0x0a9e('0x8')](),'define':{'charset':_0x0a9e('0x9'),'collate':'utf8_general_ci'}}});config['sequelizeHistory']=_[_0x0a9e('0xa')](config['sequelizeHistory'],{'database':'motion2','username':_0x0a9e('0x4'),'password':_0x0a9e('0x5'),'options':{'host':_0x0a9e('0x6'),'port':0xcea,'dialect':_0x0a9e('0xb'),'dialectOptions':{'charset':_0x0a9e('0x7')},'logging':![],'timezone':timezone[_0x0a9e('0x8')](),'define':{'charset':'utf8','collate':'utf8_general_ci'}}});var db={'Sequelize':Sequelize,'sequelize':new Sequelize(config['sequelize']['database'],config[_0x0a9e('0x1')][_0x0a9e('0xc')],config[_0x0a9e('0x1')][_0x0a9e('0xd')],config[_0x0a9e('0x1')][_0x0a9e('0xe')])};var dbH={'Sequelize':Sequelize,'sequelize':new Sequelize(config['sequelizeHistory'][_0x0a9e('0xf')],config[_0x0a9e('0x10')][_0x0a9e('0xc')],config[_0x0a9e('0x10')][_0x0a9e('0xd')],config[_0x0a9e('0x10')]['options'])};db[_0x0a9e('0x11')]=db['sequelize'][_0x0a9e('0x12')]('../api/user/user.model');db[_0x0a9e('0x13')]=db[_0x0a9e('0x1')]['import'](_0x0a9e('0x14'));db['VoiceContext']=db[_0x0a9e('0x1')][_0x0a9e('0x12')](_0x0a9e('0x15'));db[_0x0a9e('0x16')]=db[_0x0a9e('0x1')][_0x0a9e('0x12')](_0x0a9e('0x17'));db[_0x0a9e('0x18')]=db[_0x0a9e('0x1')][_0x0a9e('0x12')](_0x0a9e('0x19'));db[_0x0a9e('0x1a')]=db['sequelize'][_0x0a9e('0x12')](_0x0a9e('0x1b'));db['VoiceRecording']=db[_0x0a9e('0x1')]['import']('../api/voiceRecording/voiceRecording.model');db[_0x0a9e('0x1c')]=db[_0x0a9e('0x1')][_0x0a9e('0x12')](_0x0a9e('0x1d'));db['VoiceMail']=db[_0x0a9e('0x1')][_0x0a9e('0x12')](_0x0a9e('0x1e'));db[_0x0a9e('0x1f')]=db[_0x0a9e('0x1')][_0x0a9e('0x12')](_0x0a9e('0x20'));db['VoiceCallReport']=db['sequelize'][_0x0a9e('0x12')](_0x0a9e('0x21'));db[_0x0a9e('0x22')]=db[_0x0a9e('0x1')]['import'](_0x0a9e('0x23'));db['VoiceAgentReport']=db[_0x0a9e('0x1')]['import'](_0x0a9e('0x24'));db[_0x0a9e('0x25')]=db[_0x0a9e('0x1')][_0x0a9e('0x12')](_0x0a9e('0x26'));db[_0x0a9e('0x27')]=db[_0x0a9e('0x1')][_0x0a9e('0x12')]('../api/memberReport/memberReport.model');db[_0x0a9e('0x28')]=db[_0x0a9e('0x1')][_0x0a9e('0x12')](_0x0a9e('0x29'));db['VoiceTransferReport']=db[_0x0a9e('0x1')][_0x0a9e('0x12')](_0x0a9e('0x2a'));db[_0x0a9e('0x2b')]=db[_0x0a9e('0x1')][_0x0a9e('0x12')](_0x0a9e('0x2c'));db[_0x0a9e('0x2d')]=db[_0x0a9e('0x1')]['import'](_0x0a9e('0x2e'));db['UserChatQueue']=db[_0x0a9e('0x1')][_0x0a9e('0x12')](_0x0a9e('0x2f'));db[_0x0a9e('0x30')]=db[_0x0a9e('0x1')]['import'](_0x0a9e('0x31'));db[_0x0a9e('0x32')]=db[_0x0a9e('0x1')][_0x0a9e('0x12')](_0x0a9e('0x33'));db[_0x0a9e('0x34')]=db[_0x0a9e('0x1')][_0x0a9e('0x12')]('../api/userSmsQueue/userSmsQueue.model');db[_0x0a9e('0x35')]=db['sequelize'][_0x0a9e('0x12')](_0x0a9e('0x36'));db[_0x0a9e('0x37')]=db[_0x0a9e('0x1')]['import'](_0x0a9e('0x38'));db[_0x0a9e('0x39')]=db[_0x0a9e('0x1')][_0x0a9e('0x12')]('../api/mailServerIn/mailServerIn.model');db['MailServerOut']=db[_0x0a9e('0x1')]['import'](_0x0a9e('0x3a'));db[_0x0a9e('0x3b')]=db[_0x0a9e('0x1')][_0x0a9e('0x12')]('../api/mailAccount/mailAccount.model');db[_0x0a9e('0x3c')]=db[_0x0a9e('0x1')][_0x0a9e('0x12')]('../api/mailQueue/mailQueue.model');db[_0x0a9e('0x3d')]=db[_0x0a9e('0x1')][_0x0a9e('0x12')]('../api/mailSubstatus/mailSubstatus.model');db['MailInteraction']=db[_0x0a9e('0x1')][_0x0a9e('0x12')]('../api/mailInteraction/mailInteraction.model');db[_0x0a9e('0x3e')]=db[_0x0a9e('0x1')][_0x0a9e('0x12')](_0x0a9e('0x3f'));db['MailApplication']=db['sequelize'][_0x0a9e('0x12')](_0x0a9e('0x40'));db['MailQueueReport']=db[_0x0a9e('0x1')][_0x0a9e('0x12')](_0x0a9e('0x41'));db['Dashboard']=db[_0x0a9e('0x1')][_0x0a9e('0x12')](_0x0a9e('0x42'));db[_0x0a9e('0x43')]=db[_0x0a9e('0x1')][_0x0a9e('0x12')](_0x0a9e('0x44'));db[_0x0a9e('0x45')]=db[_0x0a9e('0x1')][_0x0a9e('0x12')](_0x0a9e('0x46'));db[_0x0a9e('0x47')]=db[_0x0a9e('0x1')][_0x0a9e('0x12')](_0x0a9e('0x48'));db['FaxInteraction']=db['sequelize'][_0x0a9e('0x12')](_0x0a9e('0x49'));db[_0x0a9e('0x4a')]=db[_0x0a9e('0x1')][_0x0a9e('0x12')](_0x0a9e('0x4b'));db[_0x0a9e('0x4c')]=db[_0x0a9e('0x1')][_0x0a9e('0x12')](_0x0a9e('0x4d'));db[_0x0a9e('0x4e')]=db[_0x0a9e('0x1')]['import'](_0x0a9e('0x4f'));db[_0x0a9e('0x50')]=db[_0x0a9e('0x1')][_0x0a9e('0x12')](_0x0a9e('0x51'));db[_0x0a9e('0x52')]=db[_0x0a9e('0x1')][_0x0a9e('0x12')]('../api/smsApplication/smsApplication.model');db[_0x0a9e('0x53')]=db['sequelize'][_0x0a9e('0x12')](_0x0a9e('0x54'));db[_0x0a9e('0x55')]=db['sequelize'][_0x0a9e('0x12')](_0x0a9e('0x56'));db[_0x0a9e('0x57')]=db[_0x0a9e('0x1')][_0x0a9e('0x12')](_0x0a9e('0x58'));db[_0x0a9e('0x59')]=db['sequelize'][_0x0a9e('0x12')](_0x0a9e('0x5a'));db[_0x0a9e('0x5b')]=db[_0x0a9e('0x1')][_0x0a9e('0x12')](_0x0a9e('0x5c'));db[_0x0a9e('0x5d')]=db[_0x0a9e('0x1')][_0x0a9e('0x12')]('../api/openchannelInteraction/openchannelInteraction.model');db[_0x0a9e('0x5e')]=db[_0x0a9e('0x1')]['import']('../api/openchannelMessage/openchannelMessage.model');db['OpenchannelQueue']=db[_0x0a9e('0x1')][_0x0a9e('0x12')](_0x0a9e('0x5f'));db[_0x0a9e('0x60')]=db[_0x0a9e('0x1')][_0x0a9e('0x12')](_0x0a9e('0x61'));db[_0x0a9e('0x62')]=db['sequelize']['import']('../api/openchannelQueueReport/openchannelQueueReport.model');db[_0x0a9e('0x63')]=db[_0x0a9e('0x1')][_0x0a9e('0x12')]('../api/chatApplication/chatApplication.model');db[_0x0a9e('0x64')]=db[_0x0a9e('0x1')]['import']('../api/chatInteraction/chatInteraction.model');db[_0x0a9e('0x65')]=db['sequelize'][_0x0a9e('0x12')]('../api/chatMessage/chatMessage.model');db[_0x0a9e('0x66')]=db[_0x0a9e('0x1')][_0x0a9e('0x12')]('../api/chatOfflineMessage/chatOfflineMessage.model');db[_0x0a9e('0x67')]=db[_0x0a9e('0x1')]['import']('../api/chatQueue/chatQueue.model');db[_0x0a9e('0x68')]=db[_0x0a9e('0x1')]['import'](_0x0a9e('0x69'));db['ChatProactiveAction']=db[_0x0a9e('0x1')]['import'](_0x0a9e('0x6a'));db['CmCompany']=db['sequelize']['import'](_0x0a9e('0x6b'));db['CmContact']=db[_0x0a9e('0x1')][_0x0a9e('0x12')](_0x0a9e('0x6c'));db[_0x0a9e('0x6d')]=db[_0x0a9e('0x1')][_0x0a9e('0x12')](_0x0a9e('0x6e'));db[_0x0a9e('0x6f')]=db['sequelize'][_0x0a9e('0x12')](_0x0a9e('0x70'));db[_0x0a9e('0x71')]=db[_0x0a9e('0x1')][_0x0a9e('0x12')](_0x0a9e('0x72'));db['CmHopperHistory']=db[_0x0a9e('0x1')][_0x0a9e('0x12')]('../api/cmHopperHistory/cmHopperHistory.model');db[_0x0a9e('0x73')]=db['sequelize'][_0x0a9e('0x12')]('../api/reportAgentPreview/reportAgentPreview.model');db['CmCustomField']=db['sequelize'][_0x0a9e('0x12')]('../api/cmCustomField/cmCustomField.model');db[_0x0a9e('0x74')]=db[_0x0a9e('0x1')][_0x0a9e('0x12')](_0x0a9e('0x75'));db[_0x0a9e('0x76')]=db[_0x0a9e('0x1')]['import'](_0x0a9e('0x77'));db['CannedAnswer']=db[_0x0a9e('0x1')][_0x0a9e('0x12')](_0x0a9e('0x78'));db['Disposition']=db[_0x0a9e('0x1')][_0x0a9e('0x12')](_0x0a9e('0x79'));db[_0x0a9e('0x7a')]=db['sequelize'][_0x0a9e('0x12')](_0x0a9e('0x7b'));db['Interval']=db[_0x0a9e('0x1')][_0x0a9e('0x12')](_0x0a9e('0x7c'));db[_0x0a9e('0x7d')]=db[_0x0a9e('0x1')]['import'](_0x0a9e('0x7e'));db[_0x0a9e('0x7f')]=db[_0x0a9e('0x1')]['import'](_0x0a9e('0x80'));db['VoiceQueuesLog']=db['sequelize'][_0x0a9e('0x12')](_0x0a9e('0x81'));db[_0x0a9e('0x82')]=db[_0x0a9e('0x1')][_0x0a9e('0x12')](_0x0a9e('0x83'));db[_0x0a9e('0x84')]=db[_0x0a9e('0x1')][_0x0a9e('0x12')](_0x0a9e('0x85'));db[_0x0a9e('0x86')]=db[_0x0a9e('0x1')][_0x0a9e('0x12')](_0x0a9e('0x87'));db[_0x0a9e('0x88')]=db[_0x0a9e('0x1')][_0x0a9e('0x12')](_0x0a9e('0x89'));db['CmContactHasItem']=db[_0x0a9e('0x1')][_0x0a9e('0x12')](_0x0a9e('0x8a'));db['CmHopperAdditionalPhone']=db[_0x0a9e('0x1')][_0x0a9e('0x12')]('../api/cmHopperAdditionalPhone/cmHopperAdditionalPhone.model');db[_0x0a9e('0x8b')]=db[_0x0a9e('0x1')][_0x0a9e('0x12')](_0x0a9e('0x8c'));db[_0x0a9e('0x8d')]=db['sequelize']['import']('../api/trigger/trigger.model');db[_0x0a9e('0x8e')]=db[_0x0a9e('0x1')][_0x0a9e('0x12')](_0x0a9e('0x8f'));db[_0x0a9e('0x90')]=db[_0x0a9e('0x1')][_0x0a9e('0x12')](_0x0a9e('0x91'));db['IntegrationReport']=db[_0x0a9e('0x1')][_0x0a9e('0x12')](_0x0a9e('0x92'));db['AnalyticCustomReport']=db[_0x0a9e('0x1')]['import'](_0x0a9e('0x93'));db[_0x0a9e('0x94')]=db['sequelize'][_0x0a9e('0x12')](_0x0a9e('0x95'));db[_0x0a9e('0x96')]=db[_0x0a9e('0x1')]['import'](_0x0a9e('0x97'));db[_0x0a9e('0x98')]=db[_0x0a9e('0x1')][_0x0a9e('0x12')]('../api/analyticMetric/analyticMetric.model');db[_0x0a9e('0x99')]=db[_0x0a9e('0x1')][_0x0a9e('0x12')](_0x0a9e('0x9a'));db['AnalyticTreeReport']=db[_0x0a9e('0x1')][_0x0a9e('0x12')](_0x0a9e('0x9b'));db[_0x0a9e('0x9c')]=db[_0x0a9e('0x1')][_0x0a9e('0x12')](_0x0a9e('0x9d'));db[_0x0a9e('0x9e')]=db[_0x0a9e('0x1')][_0x0a9e('0x12')](_0x0a9e('0x9f'));db[_0x0a9e('0xa0')]=db[_0x0a9e('0x1')][_0x0a9e('0x12')]('../api/intSalesforceField/intSalesforceField.model');db[_0x0a9e('0xa1')]=db[_0x0a9e('0x1')][_0x0a9e('0x12')]('../api/intSugarcrmAccount/intSugarcrmAccount.model');db[_0x0a9e('0xa2')]=db[_0x0a9e('0x1')][_0x0a9e('0x12')](_0x0a9e('0xa3'));db['SugarcrmField']=db['sequelize'][_0x0a9e('0x12')](_0x0a9e('0xa4'));db['DeskAccount']=db[_0x0a9e('0x1')]['import'](_0x0a9e('0xa5'));db[_0x0a9e('0xa6')]=db['sequelize'][_0x0a9e('0x12')](_0x0a9e('0xa7'));db[_0x0a9e('0xa8')]=db[_0x0a9e('0x1')][_0x0a9e('0x12')](_0x0a9e('0xa9'));db[_0x0a9e('0xaa')]=db['sequelize'][_0x0a9e('0x12')](_0x0a9e('0xab'));db[_0x0a9e('0xac')]=db[_0x0a9e('0x1')]['import'](_0x0a9e('0xad'));db[_0x0a9e('0xae')]=db['sequelize'][_0x0a9e('0x12')]('../api/intZohoField/intZohoField.model');db[_0x0a9e('0xaf')]=db[_0x0a9e('0x1')][_0x0a9e('0x12')](_0x0a9e('0xb0'));db['ZendeskConfiguration']=db['sequelize'][_0x0a9e('0x12')](_0x0a9e('0xb1'));db[_0x0a9e('0xb2')]=db['sequelize'][_0x0a9e('0x12')](_0x0a9e('0xb3'));db['FreshdeskAccount']=db['sequelize'][_0x0a9e('0x12')]('../api/intFreshdeskAccount/intFreshdeskAccount.model');db['FreshdeskConfiguration']=db['sequelize'][_0x0a9e('0x12')](_0x0a9e('0xb4'));db[_0x0a9e('0xb5')]=db[_0x0a9e('0x1')][_0x0a9e('0x12')](_0x0a9e('0xb6'));db['VtigerAccount']=db[_0x0a9e('0x1')]['import'](_0x0a9e('0xb7'));db[_0x0a9e('0xb8')]=db[_0x0a9e('0x1')][_0x0a9e('0x12')]('../api/intVtigerConfiguration/intVtigerConfiguration.model');db[_0x0a9e('0xb9')]=db[_0x0a9e('0x1')][_0x0a9e('0x12')]('../api/intVtigerField/intVtigerField.model');db[_0x0a9e('0xba')]=db[_0x0a9e('0x1')][_0x0a9e('0x12')](_0x0a9e('0xbb'));db[_0x0a9e('0xbc')]=db[_0x0a9e('0x1')][_0x0a9e('0x12')](_0x0a9e('0xbd'));db['ServicenowField']=db[_0x0a9e('0x1')][_0x0a9e('0x12')]('../api/intServicenowField/intServicenowField.model');db[_0x0a9e('0xbe')]=db[_0x0a9e('0x1')][_0x0a9e('0x12')]('../api/intDynamics365Account/intDynamics365Account.model');db[_0x0a9e('0xbf')]=db['sequelize'][_0x0a9e('0x12')](_0x0a9e('0xc0'));db[_0x0a9e('0xc1')]=db[_0x0a9e('0x1')][_0x0a9e('0x12')](_0x0a9e('0xc2'));db[_0x0a9e('0xc3')]=db[_0x0a9e('0x1')]['import'](_0x0a9e('0xc4'));db[_0x0a9e('0xc5')]=db[_0x0a9e('0x1')][_0x0a9e('0x12')](_0x0a9e('0xc6'));db[_0x0a9e('0xc7')]=db[_0x0a9e('0x1')][_0x0a9e('0x12')](_0x0a9e('0xc8'));db[_0x0a9e('0x90')]=db[_0x0a9e('0x1')][_0x0a9e('0x12')](_0x0a9e('0x91'));db['Network']=db[_0x0a9e('0x1')][_0x0a9e('0x12')](_0x0a9e('0xc9'));db[_0x0a9e('0xca')]=db[_0x0a9e('0x1')]['import'](_0x0a9e('0xcb'));db[_0x0a9e('0xcc')]=db['sequelize'][_0x0a9e('0x12')]('../api/chatInternalMessage/chatInternalMessage.model');db[_0x0a9e('0xcd')]=db[_0x0a9e('0x1')][_0x0a9e('0x12')](_0x0a9e('0xce'));db['JscriptyQuestionReport']=db[_0x0a9e('0x1')]['import'](_0x0a9e('0xcf'));db[_0x0a9e('0xd0')]=db['sequelize'][_0x0a9e('0x12')](_0x0a9e('0xd1'));db[_0x0a9e('0xd2')]=db['sequelize']['import'](_0x0a9e('0xd3'));db[_0x0a9e('0xd4')]=db[_0x0a9e('0x1')][_0x0a9e('0x12')](_0x0a9e('0xd5'));db[_0x0a9e('0xd6')]=db[_0x0a9e('0x1')][_0x0a9e('0x12')](_0x0a9e('0xd7'));db['JscriptyProject']=db[_0x0a9e('0x1')]['import'](_0x0a9e('0xd8'));db[_0x0a9e('0xd9')]=db[_0x0a9e('0x1')][_0x0a9e('0x12')](_0x0a9e('0xda'));db['SquareOdbc']=db[_0x0a9e('0x1')][_0x0a9e('0x12')](_0x0a9e('0xdb'));db[_0x0a9e('0xdc')]=db[_0x0a9e('0x1')]['import']('../api/squareProject/squareProject.model');db[_0x0a9e('0xdd')]=db['sequelize'][_0x0a9e('0x12')](_0x0a9e('0xde'));db[_0x0a9e('0xdf')]=db[_0x0a9e('0x1')][_0x0a9e('0x12')](_0x0a9e('0xe0'));db['Team']=db['sequelize'][_0x0a9e('0x12')]('../api/team/team.model');db[_0x0a9e('0xe1')]=db['sequelize'][_0x0a9e('0x12')]('../api/license/license.model');db['Campaign']=db[_0x0a9e('0x1')][_0x0a9e('0x12')]('../api/campaign/campaign.model');db[_0x0a9e('0xe2')]=db[_0x0a9e('0x1')][_0x0a9e('0x12')](_0x0a9e('0xe3'));db[_0x0a9e('0xe4')]=db['sequelize']['import'](_0x0a9e('0xe5'));db[_0x0a9e('0xe6')]=db[_0x0a9e('0x1')][_0x0a9e('0x12')](_0x0a9e('0xe7'));db['MailTransferReport']=db[_0x0a9e('0x1')][_0x0a9e('0x12')]('../api/mailTransferReport/mailTransferReport.model');db[_0x0a9e('0xe8')]=db[_0x0a9e('0x1')][_0x0a9e('0x12')](_0x0a9e('0xe9'));db[_0x0a9e('0xea')]=db[_0x0a9e('0x1')][_0x0a9e('0x12')](_0x0a9e('0xeb'));db[_0x0a9e('0xec')]=db[_0x0a9e('0x1')]['import'](_0x0a9e('0xed'));db[_0x0a9e('0xee')]=db[_0x0a9e('0x1')][_0x0a9e('0x12')](_0x0a9e('0xef'));db['CmList']=db['sequelize'][_0x0a9e('0x12')](_0x0a9e('0xf0'));db[_0x0a9e('0xf1')]=db[_0x0a9e('0x1')][_0x0a9e('0x12')]('../api/voicePrefix/voicePrefix.model');db[_0x0a9e('0xf2')]=db[_0x0a9e('0x1')][_0x0a9e('0x12')]('../api/userProfile/userProfile.model');db[_0x0a9e('0xf3')]=db['sequelize'][_0x0a9e('0x12')]('../api/userProfileSection/userProfileSection.model');db[_0x0a9e('0xf4')]=db[_0x0a9e('0x1')][_0x0a9e('0x12')]('../api/userProfileResource/userProfileResource.model');db[_0x0a9e('0xf5')]=db['sequelize'][_0x0a9e('0x12')](_0x0a9e('0xf6'));db[_0x0a9e('0xf7')]=db[_0x0a9e('0x1')][_0x0a9e('0x12')](_0x0a9e('0xf8'));db[_0x0a9e('0xf9')]=db[_0x0a9e('0x1')][_0x0a9e('0x12')](_0x0a9e('0xfa'));db[_0x0a9e('0xfb')]=db[_0x0a9e('0x1')][_0x0a9e('0x12')](_0x0a9e('0xfc'));db[_0x0a9e('0xfd')]=db[_0x0a9e('0x1')]['import']('../api/whatsappMessage/whatsappMessage.model');db[_0x0a9e('0xfe')]=db['sequelize'][_0x0a9e('0x12')](_0x0a9e('0xff'));db['WhatsappTransferReport']=db[_0x0a9e('0x1')][_0x0a9e('0x12')](_0x0a9e('0x100'));db[_0x0a9e('0x101')]=db['sequelize'][_0x0a9e('0x12')](_0x0a9e('0x102'));db[_0x0a9e('0x103')]=db[_0x0a9e('0x1')]['import'](_0x0a9e('0x104'));db[_0x0a9e('0x105')]=db[_0x0a9e('0x1')]['import'](_0x0a9e('0x106'));db[_0x0a9e('0x107')]=db[_0x0a9e('0x1')]['import'](_0x0a9e('0x108'));db[_0x0a9e('0x109')]=db[_0x0a9e('0x1')][_0x0a9e('0x12')](_0x0a9e('0x10a'));db['UserSetting']=db[_0x0a9e('0x1')][_0x0a9e('0x12')]('../api/user-setting/user-setting.model');db[_0x0a9e('0x11')][_0x0a9e('0x10b')](db[_0x0a9e('0x10c')],{'as':'VoiceMail','onDelete':'cascade','foreignKey':'UserId'});db[_0x0a9e('0x11')][_0x0a9e('0x10b')](db['UserSetting'],{'as':_0x0a9e('0x10d'),'onDelete':_0x0a9e('0x10e'),'foreignKey':_0x0a9e('0x10f')});db['User'][_0x0a9e('0x110')](db[_0x0a9e('0x111')],{'as':_0x0a9e('0x112'),'foreignKey':_0x0a9e('0x10f')});db[_0x0a9e('0x11')][_0x0a9e('0x110')](db[_0x0a9e('0x2b')],{'as':_0x0a9e('0x113'),'foreignKey':_0x0a9e('0x10f')});db['User'][_0x0a9e('0x110')](db['VoiceExtension'],{'as':_0x0a9e('0x114'),'onDelete':_0x0a9e('0x10e'),'hooks':!![]});db[_0x0a9e('0x11')][_0x0a9e('0x110')](db[_0x0a9e('0x71')],{'as':_0x0a9e('0x115'),'foreignKey':'UserId'});db[_0x0a9e('0x11')][_0x0a9e('0x110')](db[_0x0a9e('0x116')],{'as':_0x0a9e('0x117'),'foreignKey':'UserId'});db[_0x0a9e('0x11')][_0x0a9e('0x110')](db[_0x0a9e('0x73')],{'as':_0x0a9e('0x73'),'foreignKey':_0x0a9e('0x10f')});db[_0x0a9e('0x11')][_0x0a9e('0x110')](db[_0x0a9e('0x5d')],{'as':_0x0a9e('0x118'),'foreignKey':_0x0a9e('0x10f')});db['User'][_0x0a9e('0x110')](db[_0x0a9e('0x64')],{'as':_0x0a9e('0x119'),'foreignKey':_0x0a9e('0x10f')});db[_0x0a9e('0x11')][_0x0a9e('0x110')](db[_0x0a9e('0x53')],{'as':_0x0a9e('0x11a'),'foreignKey':'UserId'});db[_0x0a9e('0x11')][_0x0a9e('0x110')](db[_0x0a9e('0x11b')],{'as':'FaxInteractions','foreignKey':_0x0a9e('0x10f')});db[_0x0a9e('0x11')][_0x0a9e('0x110')](db[_0x0a9e('0x11c')],{'as':_0x0a9e('0x11d'),'foreignKey':_0x0a9e('0x10f')});db[_0x0a9e('0x11')][_0x0a9e('0x110')](db[_0x0a9e('0xfb')],{'as':_0x0a9e('0x11e'),'foreignKey':'UserId'});db[_0x0a9e('0x11')][_0x0a9e('0x110')](db[_0x0a9e('0xf5')],{'as':_0x0a9e('0x11f'),'foreignKey':_0x0a9e('0x120')});db[_0x0a9e('0x11')]['belongsTo'](db[_0x0a9e('0xf2')],{'as':'UserProfile','foreignKey':'userProfileId'});db['User'][_0x0a9e('0x121')](db[_0x0a9e('0x68')],{'as':_0x0a9e('0x122'),'through':_0x0a9e('0x123')});db['User'][_0x0a9e('0x121')](db[_0x0a9e('0x124')],{'as':_0x0a9e('0x125'),'through':_0x0a9e('0x126')});db[_0x0a9e('0x11')]['belongsToMany'](db['CmList'],{'as':_0x0a9e('0x127'),'through':_0x0a9e('0x128')});db[_0x0a9e('0x11')]['belongsToMany'](db[_0x0a9e('0x129')],{'through':_0x0a9e('0x12a')});db[_0x0a9e('0x11')]['belongsToMany'](db[_0x0a9e('0x11c')],{'as':_0x0a9e('0x11d'),'through':_0x0a9e('0x12b')});db['User'][_0x0a9e('0x121')](db[_0x0a9e('0x64')],{'as':_0x0a9e('0x119'),'through':'user_has_chat_interactions'});db['User']['belongsToMany'](db[_0x0a9e('0x11b')],{'as':_0x0a9e('0x12c'),'through':_0x0a9e('0x12d')});db[_0x0a9e('0x11')]['belongsToMany'](db[_0x0a9e('0x53')],{'as':'SmsInteractions','through':_0x0a9e('0x12e')});db[_0x0a9e('0x11')][_0x0a9e('0x121')](db['OpenchannelInteraction'],{'as':_0x0a9e('0x118'),'through':_0x0a9e('0x12f')});db[_0x0a9e('0x11')]['belongsToMany'](db[_0x0a9e('0xfb')],{'as':'WhatsappInteractions','through':_0x0a9e('0x130')});db['User'][_0x0a9e('0x121')](db['VoiceQueue'],{'as':_0x0a9e('0x131'),'through':_0x0a9e('0x2d'),'required':![]});db[_0x0a9e('0x11')][_0x0a9e('0x121')](db[_0x0a9e('0xf1')],{'as':_0x0a9e('0x132'),'through':_0x0a9e('0x109'),'required':![]});db['User'][_0x0a9e('0x121')](db[_0x0a9e('0x3c')],{'as':'MailQueues','through':_0x0a9e('0x30'),'required':![]});db[_0x0a9e('0x11')]['belongsToMany'](db[_0x0a9e('0x67')],{'as':_0x0a9e('0x133'),'through':_0x0a9e('0x134'),'required':![],'hooks':!![]});db['User'][_0x0a9e('0x121')](db[_0x0a9e('0x4c')],{'as':_0x0a9e('0x135'),'through':_0x0a9e('0x32'),'required':![]});db[_0x0a9e('0x11')][_0x0a9e('0x121')](db[_0x0a9e('0x57')],{'as':_0x0a9e('0x136'),'through':_0x0a9e('0x34'),'required':![]});db[_0x0a9e('0x11')]['belongsToMany'](db[_0x0a9e('0x137')],{'as':'OpenchannelQueues','through':_0x0a9e('0x35'),'required':![]});db[_0x0a9e('0x11')][_0x0a9e('0x121')](db[_0x0a9e('0x101')],{'as':_0x0a9e('0x138'),'through':_0x0a9e('0x37'),'required':![]});db['User'][_0x0a9e('0x121')](db[_0x0a9e('0x139')],{'through':_0x0a9e('0x128')});db['User'][_0x0a9e('0x121')](db[_0x0a9e('0x60')],{'as':_0x0a9e('0x13a'),'through':_0x0a9e('0x13b')});db[_0x0a9e('0x11')][_0x0a9e('0x121')](db[_0x0a9e('0x45')],{'as':'FaxAccounts','through':_0x0a9e('0x13c')});db[_0x0a9e('0x11')][_0x0a9e('0x121')](db[_0x0a9e('0x3b')],{'as':_0x0a9e('0x13d'),'through':_0x0a9e('0x13e')});db[_0x0a9e('0x11')]['belongsToMany'](db['OpenchannelAccount'],{'as':_0x0a9e('0x13f'),'through':_0x0a9e('0x140')});db[_0x0a9e('0x11')][_0x0a9e('0x121')](db[_0x0a9e('0x50')],{'as':_0x0a9e('0x141'),'through':_0x0a9e('0x142')});db['User'][_0x0a9e('0x121')](db[_0x0a9e('0xf7')],{'as':_0x0a9e('0x143'),'through':_0x0a9e('0x144')});db[_0x0a9e('0x13')][_0x0a9e('0x110')](db[_0x0a9e('0x16')],{'as':'SpiedAgents','onDelete':_0x0a9e('0x10e'),'foreignKey':_0x0a9e('0x145')});db[_0x0a9e('0x146')]['hasMany'](db[_0x0a9e('0x16')],{'onDelete':_0x0a9e('0x10e')});db[_0x0a9e('0x16')][_0x0a9e('0x110')](db['VoiceExtension'],{'as':_0x0a9e('0x147'),'onDelete':_0x0a9e('0x10e')});db[_0x0a9e('0x18')][_0x0a9e('0x121')](db[_0x0a9e('0x84')],{'as':_0x0a9e('0x148'),'through':_0x0a9e('0x149')});db[_0x0a9e('0x1a')]['hasMany'](db[_0x0a9e('0x2b')],{'as':_0x0a9e('0x14a'),'foreignKey':_0x0a9e('0x14b')});db[_0x0a9e('0x1a')]['hasMany'](db['CmHopper'],{'as':_0x0a9e('0x14c'),'foreignKey':_0x0a9e('0x14b')});db[_0x0a9e('0x1a')]['hasMany'](db[_0x0a9e('0x71')],{'as':_0x0a9e('0x115'),'foreignKey':'VoiceQueueId'});db[_0x0a9e('0x1a')]['hasMany'](db[_0x0a9e('0x116')],{'as':'HopperHistories','foreignKey':'VoiceQueueId'});db['VoiceQueue'][_0x0a9e('0x110')](db[_0x0a9e('0x73')],{'as':_0x0a9e('0x73'),'foreignKey':_0x0a9e('0x14b')});db[_0x0a9e('0x1a')][_0x0a9e('0x110')](db['CmHopperBlack'],{'as':_0x0a9e('0x14d'),'foreignKey':_0x0a9e('0x14b')});db[_0x0a9e('0x1a')][_0x0a9e('0x110')](db[_0x0a9e('0xd0')],{'as':_0x0a9e('0x14e'),'foreignKey':_0x0a9e('0x14b')});db['VoiceQueue']['belongsTo'](db[_0x0a9e('0x28')],{'as':'Trunk','foreignKey':_0x0a9e('0x14f')});db[_0x0a9e('0x1a')][_0x0a9e('0x150')](db[_0x0a9e('0x28')],{'as':_0x0a9e('0x151'),'foreignKey':_0x0a9e('0x152')});db['VoiceQueue'][_0x0a9e('0x150')](db['Interval'],{'as':'Interval','foreignKey':_0x0a9e('0x153')});db['VoiceQueue'][_0x0a9e('0x150')](db['Pause'],{'as':'mandatoryDispositionPause','foreignKey':_0x0a9e('0x154')});db['VoiceQueue'][_0x0a9e('0x121')](db[_0x0a9e('0x139')],{'as':_0x0a9e('0x127'),'through':'voice_queues_has_cm_lists'});db[_0x0a9e('0x1a')][_0x0a9e('0x121')](db[_0x0a9e('0x11')],{'as':'Agents','through':'UserVoiceQueue'});db[_0x0a9e('0x1a')][_0x0a9e('0x121')](db[_0x0a9e('0x129')],{'as':_0x0a9e('0x155'),'through':_0x0a9e('0x105')});db[_0x0a9e('0x1a')][_0x0a9e('0x121')](db[_0x0a9e('0x139')],{'as':_0x0a9e('0x156'),'through':_0x0a9e('0x157')});db['VoiceRecording']['belongsTo'](db['User'],{'as':_0x0a9e('0x11'),'foreignKey':_0x0a9e('0x10f')});db[_0x0a9e('0x1c')][_0x0a9e('0x150')](db[_0x0a9e('0x11')],{'as':_0x0a9e('0x11'),'foreignKey':_0x0a9e('0x10f')});db[_0x0a9e('0x10c')]['hasMany'](db['VoiceMailMessage'],{'as':_0x0a9e('0x158'),'onDelete':_0x0a9e('0x10e'),'foreignKey':'mailboxuser','sourceKey':_0x0a9e('0x159')});db[_0x0a9e('0x1f')][_0x0a9e('0x150')](db[_0x0a9e('0x10c')],{'foreignKey':_0x0a9e('0x15a'),'targetKey':_0x0a9e('0x159')});db[_0x0a9e('0x15b')][_0x0a9e('0x110')](db[_0x0a9e('0x25')],{'as':_0x0a9e('0x15c'),'foreignKey':_0x0a9e('0x15d'),'constraints':![]});db[_0x0a9e('0x15b')]['hasMany'](db[_0x0a9e('0x15e')],{'as':_0x0a9e('0x15f'),'foreignKey':_0x0a9e('0x15d'),'constraints':![]});db[_0x0a9e('0x15b')][_0x0a9e('0x150')](db[_0x0a9e('0x11')],{'as':_0x0a9e('0x11'),'foreignKey':_0x0a9e('0x10f')});db[_0x0a9e('0x15b')][_0x0a9e('0x150')](db[_0x0a9e('0x124')],{'as':_0x0a9e('0x160'),'foreignKey':'ContactId'});db['MailServerIn'][_0x0a9e('0x150')](db[_0x0a9e('0x3b')],{'as':_0x0a9e('0x3b'),'foreignKey':_0x0a9e('0x161')});db[_0x0a9e('0x39')][_0x0a9e('0x150')](db[_0x0a9e('0x103')],{'as':'CloudProvider','foreignKey':_0x0a9e('0x162'),'onDelete':'restrict'});db[_0x0a9e('0x163')][_0x0a9e('0x150')](db[_0x0a9e('0x3b')],{'as':_0x0a9e('0x3b'),'foreignKey':_0x0a9e('0x161')});db[_0x0a9e('0x163')][_0x0a9e('0x150')](db[_0x0a9e('0x103')],{'as':_0x0a9e('0x103'),'foreignKey':_0x0a9e('0x162'),'onDelete':_0x0a9e('0x164')});db[_0x0a9e('0x3b')][_0x0a9e('0x10b')](db[_0x0a9e('0x39')],{'as':_0x0a9e('0x165'),'onDelete':_0x0a9e('0x10e')});db['MailAccount']['hasOne'](db[_0x0a9e('0x163')],{'as':_0x0a9e('0x166'),'onDelete':'cascade'});db['MailAccount'][_0x0a9e('0x110')](db[_0x0a9e('0x167')],{'as':_0x0a9e('0x168'),'foreignKey':'MailAccountId','onDelete':_0x0a9e('0x10e')});db['MailAccount'][_0x0a9e('0x110')](db['CannedAnswer'],{'as':_0x0a9e('0x169'),'foreignKey':'MailAccountId'});db[_0x0a9e('0x3b')][_0x0a9e('0x110')](db[_0x0a9e('0x3e')],{'as':'Messages','foreignKey':_0x0a9e('0x161')});db['MailAccount']['hasMany'](db[_0x0a9e('0x11c')],{'as':_0x0a9e('0x16a')});db[_0x0a9e('0x3b')][_0x0a9e('0x110')](db[_0x0a9e('0x16b')],{'as':_0x0a9e('0x147'),'foreignKey':_0x0a9e('0x161'),'onDelete':_0x0a9e('0x10e')});db[_0x0a9e('0x3b')][_0x0a9e('0x150')](db[_0x0a9e('0x139')],{'as':_0x0a9e('0x16c'),'foreignKey':_0x0a9e('0x16d')});db[_0x0a9e('0x3b')][_0x0a9e('0x150')](db[_0x0a9e('0x8b')],{'as':_0x0a9e('0x8b'),'foreignKey':_0x0a9e('0x16e')});db[_0x0a9e('0x3b')]['belongsTo'](db[_0x0a9e('0x7d')],{'as':_0x0a9e('0x16f'),'foreignKey':_0x0a9e('0x154')});db[_0x0a9e('0x3b')]['belongsToMany'](db['User'],{'as':'Agents','through':_0x0a9e('0x13e')});db['MailQueue'][_0x0a9e('0x121')](db[_0x0a9e('0x11')],{'as':_0x0a9e('0x170'),'through':_0x0a9e('0x30')});db[_0x0a9e('0x3c')][_0x0a9e('0x121')](db[_0x0a9e('0x129')],{'through':_0x0a9e('0x171'),'as':_0x0a9e('0x155')});db[_0x0a9e('0x11c')]['hasMany'](db[_0x0a9e('0x3e')],{'as':'Messages','onDelete':_0x0a9e('0x10e'),'foreignKey':'MailInteractionId'});db[_0x0a9e('0x11c')][_0x0a9e('0x150')](db[_0x0a9e('0x3b')],{'as':'Account','foreignKey':_0x0a9e('0x161')});db[_0x0a9e('0x11c')]['belongsTo'](db['CmContact'],{'as':_0x0a9e('0x160'),'foreignKey':_0x0a9e('0x172')});db[_0x0a9e('0x11c')]['belongsTo'](db['User'],{'as':'Owner','foreignKey':_0x0a9e('0x10f')});db[_0x0a9e('0x11c')][_0x0a9e('0x121')](db[_0x0a9e('0x86')],{'through':_0x0a9e('0x173'),'as':_0x0a9e('0x174')});db[_0x0a9e('0x11c')][_0x0a9e('0x121')](db[_0x0a9e('0x86')],{'through':_0x0a9e('0x173'),'as':_0x0a9e('0x175')});db[_0x0a9e('0x11c')][_0x0a9e('0x121')](db[_0x0a9e('0x11')],{'as':_0x0a9e('0x176'),'through':_0x0a9e('0x12b'),'foreignKey':_0x0a9e('0x177')});db[_0x0a9e('0x3e')]['hasMany'](db[_0x0a9e('0xe4')],{'as':_0x0a9e('0x178'),'onDelete':_0x0a9e('0x10e')});db[_0x0a9e('0x3e')][_0x0a9e('0x150')](db[_0x0a9e('0x11')],{'as':'User'});db[_0x0a9e('0x3e')][_0x0a9e('0x150')](db[_0x0a9e('0x124')],{'onDelete':_0x0a9e('0x10e'),'as':_0x0a9e('0x160')});db[_0x0a9e('0x3e')][_0x0a9e('0x150')](db[_0x0a9e('0x11c')],{'as':_0x0a9e('0x179'),'foreignKey':'MailInteractionId'});db['MailMessage'][_0x0a9e('0x150')](db[_0x0a9e('0x3b')],{'as':'Account','foreignKey':_0x0a9e('0x161')});db[_0x0a9e('0x3e')]['belongsTo'](db[_0x0a9e('0x60')],{'as':'ChatWebsite','foreignKey':_0x0a9e('0x17a')});db[_0x0a9e('0x3e')]['belongsTo'](db[_0x0a9e('0x66')],{'as':_0x0a9e('0x66'),'foreignKey':'ChatOfflineMessageId'});db[_0x0a9e('0x16b')][_0x0a9e('0x150')](db['User'],{'onDelete':_0x0a9e('0x164')});db[_0x0a9e('0x16b')][_0x0a9e('0x150')](db[_0x0a9e('0x3c')],{'onDelete':_0x0a9e('0x164')});db[_0x0a9e('0x16b')]['belongsTo'](db[_0x0a9e('0x3b')],{'onDelete':_0x0a9e('0x164')});db['MailApplication'][_0x0a9e('0x150')](db[_0x0a9e('0x17b')],{'onDelete':_0x0a9e('0x164'),'foreignKey':_0x0a9e('0x153')});db[_0x0a9e('0x16b')][_0x0a9e('0x150')](db[_0x0a9e('0x86')],{'onDelete':'restrict','foreignKey':'TagId'});db['MailQueueReport']['belongsTo'](db['MailAccount'],{});db[_0x0a9e('0x17c')][_0x0a9e('0x150')](db['CmList'],{'as':'List','foreignKey':_0x0a9e('0x16d')});db['MailQueueReport'][_0x0a9e('0x150')](db[_0x0a9e('0x124')],{'as':_0x0a9e('0x160'),'foreignKey':_0x0a9e('0x172')});db[_0x0a9e('0x17c')][_0x0a9e('0x150')](db['MailInteraction'],{});db[_0x0a9e('0x17c')][_0x0a9e('0x150')](db['MailMessage'],{});db[_0x0a9e('0x17c')][_0x0a9e('0x150')](db[_0x0a9e('0x11')],{});db[_0x0a9e('0x17c')][_0x0a9e('0x150')](db[_0x0a9e('0x3c')],{});db[_0x0a9e('0x17d')]['hasMany'](db[_0x0a9e('0x43')],{'as':'Items','onDelete':_0x0a9e('0x10e')});db[_0x0a9e('0x45')]['hasMany'](db[_0x0a9e('0x167')],{'as':_0x0a9e('0x168'),'foreignKey':'FaxAccountId','onDelete':_0x0a9e('0x10e')});db['FaxAccount'][_0x0a9e('0x110')](db[_0x0a9e('0x17e')],{'as':'Answers','foreignKey':_0x0a9e('0x17f')});db['FaxAccount'][_0x0a9e('0x110')](db[_0x0a9e('0x11b')],{'as':_0x0a9e('0x16a')});db[_0x0a9e('0x45')][_0x0a9e('0x110')](db[_0x0a9e('0x47')],{'as':_0x0a9e('0x147'),'foreignKey':'FaxAccountId','onDelete':_0x0a9e('0x10e')});db[_0x0a9e('0x45')][_0x0a9e('0x110')](db[_0x0a9e('0x16')],{'as':_0x0a9e('0x180'),'onDelete':'cascade'});db[_0x0a9e('0x45')]['hasMany'](db['FaxMessage'],{'as':_0x0a9e('0x158')});db['FaxAccount'][_0x0a9e('0x150')](db[_0x0a9e('0x28')],{'as':'Trunk'});db[_0x0a9e('0x45')][_0x0a9e('0x150')](db[_0x0a9e('0x139')],{'as':_0x0a9e('0x16c'),'foreignKey':_0x0a9e('0x16d')});db[_0x0a9e('0x45')][_0x0a9e('0x150')](db[_0x0a9e('0x7d')],{'as':_0x0a9e('0x16f'),'foreignKey':'mandatoryDispositionPauseId'});db[_0x0a9e('0x45')][_0x0a9e('0x121')](db[_0x0a9e('0x11')],{'as':_0x0a9e('0x170'),'through':'user_has_fax_accounts'});db[_0x0a9e('0x47')][_0x0a9e('0x150')](db[_0x0a9e('0x11')],{'onDelete':'restrict'});db[_0x0a9e('0x47')][_0x0a9e('0x150')](db[_0x0a9e('0x4c')],{'onDelete':'restrict'});db[_0x0a9e('0x47')]['belongsTo'](db[_0x0a9e('0x45')],{'onDelete':_0x0a9e('0x164')});db[_0x0a9e('0x47')][_0x0a9e('0x150')](db[_0x0a9e('0x86')],{'onDelete':_0x0a9e('0x164'),'foreignKey':_0x0a9e('0x181')});db['FaxInteraction'][_0x0a9e('0x110')](db[_0x0a9e('0x4a')],{'as':_0x0a9e('0x158'),'onDelete':_0x0a9e('0x10e'),'foreignKey':_0x0a9e('0x182')});db[_0x0a9e('0x11b')][_0x0a9e('0x150')](db[_0x0a9e('0x45')],{'as':_0x0a9e('0x183'),'foreignKey':_0x0a9e('0x17f')});db[_0x0a9e('0x11b')][_0x0a9e('0x150')](db[_0x0a9e('0x124')],{'as':_0x0a9e('0x160'),'foreignKey':_0x0a9e('0x172')});db[_0x0a9e('0x11b')][_0x0a9e('0x150')](db[_0x0a9e('0x11')],{'as':_0x0a9e('0x184'),'foreignKey':_0x0a9e('0x10f')});db[_0x0a9e('0x11b')][_0x0a9e('0x121')](db[_0x0a9e('0x86')],{'through':'fax_interaction_has_tags','as':_0x0a9e('0x174')});db[_0x0a9e('0x11b')][_0x0a9e('0x121')](db['Tag'],{'through':_0x0a9e('0x185'),'as':'ThroughTags'});db[_0x0a9e('0x11b')][_0x0a9e('0x121')](db[_0x0a9e('0x11')],{'as':_0x0a9e('0x176'),'through':_0x0a9e('0x12d'),'foreignKey':_0x0a9e('0x182')});db[_0x0a9e('0x4a')][_0x0a9e('0x150')](db['User'],{'onDelete':_0x0a9e('0x10e'),'as':_0x0a9e('0x11')});db['FaxMessage'][_0x0a9e('0x150')](db[_0x0a9e('0x11b')],{'as':_0x0a9e('0x179'),'foreignKey':'FaxInteractionId'});db[_0x0a9e('0x4a')][_0x0a9e('0x150')](db[_0x0a9e('0x124')],{'onDelete':_0x0a9e('0x10e'),'as':'Contact'});db[_0x0a9e('0x4a')][_0x0a9e('0x150')](db[_0x0a9e('0xe4')],{'as':_0x0a9e('0xe4'),'foreignKey':_0x0a9e('0x186')});db['FaxMessage'][_0x0a9e('0x150')](db[_0x0a9e('0x45')],{'as':'Account','foreignKey':_0x0a9e('0x17f')});db[_0x0a9e('0x4c')][_0x0a9e('0x121')](db['User'],{'as':'Agents','through':_0x0a9e('0x32')});db[_0x0a9e('0x4c')][_0x0a9e('0x121')](db[_0x0a9e('0x129')],{'through':_0x0a9e('0x187'),'as':_0x0a9e('0x155')});db[_0x0a9e('0x4e')][_0x0a9e('0x150')](db['FaxAccount'],{});db['FaxQueueReport'][_0x0a9e('0x150')](db['CmList'],{'as':_0x0a9e('0x16c'),'foreignKey':_0x0a9e('0x16d')});db[_0x0a9e('0x4e')][_0x0a9e('0x150')](db['CmContact'],{'as':_0x0a9e('0x160'),'foreignKey':_0x0a9e('0x172')});db['FaxQueueReport'][_0x0a9e('0x150')](db['FaxInteraction'],{});db[_0x0a9e('0x4e')][_0x0a9e('0x150')](db[_0x0a9e('0x4a')],{});db[_0x0a9e('0x4e')][_0x0a9e('0x150')](db[_0x0a9e('0x11')],{});db['FaxQueueReport'][_0x0a9e('0x150')](db['FaxQueue'],{});db[_0x0a9e('0x50')][_0x0a9e('0x110')](db[_0x0a9e('0x167')],{'as':_0x0a9e('0x168'),'foreignKey':_0x0a9e('0x188'),'onDelete':_0x0a9e('0x10e')});db[_0x0a9e('0x50')]['hasMany'](db[_0x0a9e('0x17e')],{'as':_0x0a9e('0x169'),'foreignKey':_0x0a9e('0x188')});db[_0x0a9e('0x50')][_0x0a9e('0x110')](db['SmsMessage'],{'as':_0x0a9e('0x158'),'foreignKey':_0x0a9e('0x188')});db['SmsAccount']['hasMany'](db[_0x0a9e('0x53')],{'as':_0x0a9e('0x16a')});db[_0x0a9e('0x50')][_0x0a9e('0x110')](db[_0x0a9e('0x52')],{'as':_0x0a9e('0x147'),'foreignKey':'SmsAccountId','onDelete':_0x0a9e('0x10e')});db[_0x0a9e('0x50')][_0x0a9e('0x150')](db['CmList'],{'as':_0x0a9e('0x16c'),'foreignKey':_0x0a9e('0x16d')});db[_0x0a9e('0x50')][_0x0a9e('0x150')](db['Pause'],{'as':'mandatoryDispositionPause','foreignKey':_0x0a9e('0x154')});db[_0x0a9e('0x50')][_0x0a9e('0x121')](db[_0x0a9e('0x11')],{'as':_0x0a9e('0x170'),'through':_0x0a9e('0x142')});db[_0x0a9e('0x52')][_0x0a9e('0x150')](db['User'],{'onDelete':_0x0a9e('0x164')});db['SmsApplication'][_0x0a9e('0x150')](db[_0x0a9e('0x57')],{'onDelete':_0x0a9e('0x164')});db['SmsApplication']['belongsTo'](db[_0x0a9e('0x50')],{'onDelete':'restrict'});db[_0x0a9e('0x52')]['belongsTo'](db['Interval'],{'onDelete':_0x0a9e('0x164'),'foreignKey':_0x0a9e('0x153')});db[_0x0a9e('0x52')][_0x0a9e('0x150')](db[_0x0a9e('0x86')],{'onDelete':_0x0a9e('0x164'),'foreignKey':_0x0a9e('0x181')});db[_0x0a9e('0x53')][_0x0a9e('0x110')](db[_0x0a9e('0x55')],{'as':_0x0a9e('0x158'),'onDelete':_0x0a9e('0x10e'),'foreignKey':_0x0a9e('0x189')});db['SmsInteraction']['belongsTo'](db[_0x0a9e('0x50')],{'as':'Account','foreignKey':_0x0a9e('0x188')});db[_0x0a9e('0x53')][_0x0a9e('0x150')](db['CmContact'],{'as':'Contact','foreignKey':_0x0a9e('0x172')});db[_0x0a9e('0x53')][_0x0a9e('0x150')](db[_0x0a9e('0x11')],{'as':_0x0a9e('0x184'),'foreignKey':_0x0a9e('0x10f')});db[_0x0a9e('0x53')]['belongsToMany'](db[_0x0a9e('0x86')],{'through':'sms_interaction_has_tags','as':_0x0a9e('0x174')});db[_0x0a9e('0x53')]['belongsToMany'](db[_0x0a9e('0x86')],{'through':_0x0a9e('0x18a'),'as':_0x0a9e('0x175')});db[_0x0a9e('0x53')][_0x0a9e('0x121')](db[_0x0a9e('0x11')],{'as':'Users','through':_0x0a9e('0x12e'),'foreignKey':_0x0a9e('0x189')});db[_0x0a9e('0x55')]['belongsTo'](db[_0x0a9e('0x11')],{'as':_0x0a9e('0x11')});db[_0x0a9e('0x55')]['belongsTo'](db[_0x0a9e('0x124')],{'onDelete':_0x0a9e('0x10e'),'as':_0x0a9e('0x160')});db[_0x0a9e('0x55')][_0x0a9e('0x150')](db[_0x0a9e('0x53')],{'onDelete':'cascade','as':'Interaction','foreignKey':_0x0a9e('0x189')});db[_0x0a9e('0x55')]['belongsTo'](db[_0x0a9e('0x50')],{'as':_0x0a9e('0x183'),'foreignKey':_0x0a9e('0x188')});db[_0x0a9e('0x57')][_0x0a9e('0x121')](db[_0x0a9e('0x11')],{'as':'Agents','through':_0x0a9e('0x34'),'foreignKey':_0x0a9e('0x18b')});db[_0x0a9e('0x57')]['belongsToMany'](db[_0x0a9e('0x129')],{'through':_0x0a9e('0x18c'),'as':_0x0a9e('0x155')});db[_0x0a9e('0x59')]['hasMany'](db['Disposition'],{'as':_0x0a9e('0x168'),'foreignKey':_0x0a9e('0x18d'),'onDelete':_0x0a9e('0x10e')});db['OpenchannelAccount'][_0x0a9e('0x110')](db[_0x0a9e('0x17e')],{'as':_0x0a9e('0x169'),'foreignKey':_0x0a9e('0x18d')});db[_0x0a9e('0x59')][_0x0a9e('0x110')](db[_0x0a9e('0x5d')],{'as':_0x0a9e('0x16a'),'foreignKey':'OpenchannelAccountId'});db['OpenchannelAccount'][_0x0a9e('0x110')](db[_0x0a9e('0x5e')],{'as':'Messages','foreignKey':_0x0a9e('0x18d')});db['OpenchannelAccount'][_0x0a9e('0x110')](db[_0x0a9e('0x5b')],{'as':'Applications','foreignKey':_0x0a9e('0x18d'),'onDelete':_0x0a9e('0x10e')});db['OpenchannelAccount'][_0x0a9e('0x150')](db[_0x0a9e('0x139')],{'as':_0x0a9e('0x16c'),'foreignKey':_0x0a9e('0x16d')});db[_0x0a9e('0x59')][_0x0a9e('0x150')](db[_0x0a9e('0x7d')],{'as':'mandatoryDispositionPause','foreignKey':_0x0a9e('0x154')});db[_0x0a9e('0x59')][_0x0a9e('0x121')](db[_0x0a9e('0x11')],{'as':_0x0a9e('0x170'),'through':_0x0a9e('0x140')});db[_0x0a9e('0x5b')]['belongsTo'](db['User'],{'onDelete':_0x0a9e('0x164')});db[_0x0a9e('0x5b')][_0x0a9e('0x150')](db['OpenchannelQueue'],{'onDelete':'restrict','foreignKey':_0x0a9e('0x18e')});db['OpenchannelApplication'][_0x0a9e('0x150')](db[_0x0a9e('0x59')],{'onDelete':_0x0a9e('0x164'),'foreignKey':_0x0a9e('0x18d')});db[_0x0a9e('0x5b')][_0x0a9e('0x150')](db[_0x0a9e('0x17b')],{'onDelete':_0x0a9e('0x164'),'foreignKey':_0x0a9e('0x153')});db['OpenchannelApplication']['belongsTo'](db[_0x0a9e('0x86')],{'onDelete':'restrict','foreignKey':_0x0a9e('0x181')});db[_0x0a9e('0x5d')][_0x0a9e('0x110')](db[_0x0a9e('0x5e')],{'as':'Messages','onDelete':_0x0a9e('0x10e'),'foreignKey':_0x0a9e('0x18f')});db[_0x0a9e('0x5d')]['belongsTo'](db[_0x0a9e('0x59')],{'as':_0x0a9e('0x183'),'foreignKey':_0x0a9e('0x18d')});db['OpenchannelInteraction'][_0x0a9e('0x150')](db[_0x0a9e('0x124')],{'as':_0x0a9e('0x160'),'foreignKey':_0x0a9e('0x172')});db[_0x0a9e('0x5d')][_0x0a9e('0x150')](db['User'],{'as':'Owner','foreignKey':_0x0a9e('0x10f')});db[_0x0a9e('0x5d')][_0x0a9e('0x121')](db['Tag'],{'through':'openchannel_interaction_has_tags','as':_0x0a9e('0x174')});db[_0x0a9e('0x5d')][_0x0a9e('0x121')](db['Tag'],{'through':'openchannel_interaction_has_tags','as':_0x0a9e('0x175')});db[_0x0a9e('0x5d')][_0x0a9e('0x121')](db[_0x0a9e('0x11')],{'as':_0x0a9e('0x176'),'through':'user_has_openchannel_interactions','foreignKey':_0x0a9e('0x18f')});db['OpenchannelMessage'][_0x0a9e('0x150')](db[_0x0a9e('0x11')],{'onDelete':'cascade','as':_0x0a9e('0x11')});db['OpenchannelMessage'][_0x0a9e('0x150')](db[_0x0a9e('0x124')],{'onDelete':_0x0a9e('0x10e'),'as':_0x0a9e('0x160')});db[_0x0a9e('0x5e')]['belongsTo'](db[_0x0a9e('0x5d')],{'onDelete':_0x0a9e('0x10e'),'as':_0x0a9e('0x179'),'foreignKey':'OpenchannelInteractionId'});db[_0x0a9e('0x5e')]['belongsTo'](db[_0x0a9e('0xe4')],{'as':_0x0a9e('0xe4'),'foreignKey':_0x0a9e('0x186')});db['OpenchannelMessage'][_0x0a9e('0x150')](db[_0x0a9e('0x59')],{'as':_0x0a9e('0x183'),'foreignKey':_0x0a9e('0x18d')});db[_0x0a9e('0x137')][_0x0a9e('0x121')](db['User'],{'as':_0x0a9e('0x170'),'through':_0x0a9e('0x35'),'foreignKey':_0x0a9e('0x18e')});db[_0x0a9e('0x137')][_0x0a9e('0x121')](db[_0x0a9e('0x129')],{'through':_0x0a9e('0x190'),'as':_0x0a9e('0x155')});db['ChatWebsite'][_0x0a9e('0x110')](db[_0x0a9e('0x167')],{'as':_0x0a9e('0x168'),'foreignKey':_0x0a9e('0x17a'),'onDelete':'cascade'});db[_0x0a9e('0x60')]['hasMany'](db[_0x0a9e('0x17e')],{'as':_0x0a9e('0x169'),'foreignKey':_0x0a9e('0x17a')});db['ChatWebsite'][_0x0a9e('0x110')](db[_0x0a9e('0x191')],{'as':_0x0a9e('0x192')});db[_0x0a9e('0x60')]['hasMany'](db[_0x0a9e('0x64')],{'as':_0x0a9e('0x16a')});db[_0x0a9e('0x60')][_0x0a9e('0x110')](db[_0x0a9e('0x63')],{'as':_0x0a9e('0x147'),'foreignKey':_0x0a9e('0x17a'),'onDelete':'cascade'});db[_0x0a9e('0x60')][_0x0a9e('0x110')](db[_0x0a9e('0x65')],{'as':_0x0a9e('0x158')});db['ChatWebsite'][_0x0a9e('0x150')](db['CmList'],{'as':_0x0a9e('0x16c'),'foreignKey':_0x0a9e('0x16d')});db[_0x0a9e('0x60')][_0x0a9e('0x150')](db[_0x0a9e('0x17b')],{'as':_0x0a9e('0x17b'),'foreignKey':_0x0a9e('0x153')});db['ChatWebsite'][_0x0a9e('0x150')](db['MailAccount'],{'as':_0x0a9e('0x3b'),'foreignKey':_0x0a9e('0x161')});db['ChatWebsite'][_0x0a9e('0x150')](db[_0x0a9e('0x7d')],{'as':_0x0a9e('0x16f'),'foreignKey':_0x0a9e('0x154')});db['ChatWebsite'][_0x0a9e('0x121')](db[_0x0a9e('0x11')],{'as':'Agents','through':_0x0a9e('0x13b')});db['OpenchannelQueueReport']['belongsTo'](db['OpenchannelAccount'],{});db[_0x0a9e('0x62')][_0x0a9e('0x150')](db['CmList'],{'as':_0x0a9e('0x16c'),'foreignKey':_0x0a9e('0x16d')});db['OpenchannelQueueReport'][_0x0a9e('0x150')](db[_0x0a9e('0x124')],{'as':_0x0a9e('0x160'),'foreignKey':_0x0a9e('0x172')});db[_0x0a9e('0x62')][_0x0a9e('0x150')](db[_0x0a9e('0x5d')],{});db['OpenchannelQueueReport'][_0x0a9e('0x150')](db['OpenchannelMessage'],{});db[_0x0a9e('0x62')][_0x0a9e('0x150')](db[_0x0a9e('0x11')],{});db[_0x0a9e('0x62')][_0x0a9e('0x150')](db[_0x0a9e('0x137')],{});db['ChatApplication'][_0x0a9e('0x150')](db[_0x0a9e('0x11')],{'as':_0x0a9e('0x193'),'foreignKey':'UserId','onDelete':_0x0a9e('0x164')});db[_0x0a9e('0x63')][_0x0a9e('0x150')](db[_0x0a9e('0x67')],{'as':_0x0a9e('0x194'),'foreignKey':_0x0a9e('0x195'),'onDelete':_0x0a9e('0x164')});db[_0x0a9e('0x63')][_0x0a9e('0x150')](db[_0x0a9e('0x60')],{'as':_0x0a9e('0x196'),'foreignKey':_0x0a9e('0x17a'),'onDelete':_0x0a9e('0x164')});db[_0x0a9e('0x63')][_0x0a9e('0x150')](db[_0x0a9e('0x86')],{'onDelete':'restrict','foreignKey':_0x0a9e('0x181')});db[_0x0a9e('0x64')][_0x0a9e('0x110')](db['ChatMessage'],{'as':_0x0a9e('0x158'),'onDelete':_0x0a9e('0x10e'),'foreignKey':_0x0a9e('0x197')});db[_0x0a9e('0x64')]['belongsTo'](db[_0x0a9e('0x60')],{'as':_0x0a9e('0x183'),'foreignKey':_0x0a9e('0x17a')});db[_0x0a9e('0x64')]['belongsTo'](db[_0x0a9e('0x124')],{'as':_0x0a9e('0x160'),'foreignKey':_0x0a9e('0x172')});db[_0x0a9e('0x64')]['belongsTo'](db['User'],{'as':_0x0a9e('0x184'),'foreignKey':_0x0a9e('0x10f')});db[_0x0a9e('0x64')][_0x0a9e('0x121')](db[_0x0a9e('0x86')],{'through':_0x0a9e('0x198'),'as':_0x0a9e('0x174')});db[_0x0a9e('0x64')][_0x0a9e('0x121')](db[_0x0a9e('0x86')],{'through':_0x0a9e('0x198'),'as':_0x0a9e('0x175')});db[_0x0a9e('0x64')][_0x0a9e('0x121')](db['User'],{'as':_0x0a9e('0x176'),'through':_0x0a9e('0x199'),'foreignKey':_0x0a9e('0x197')});db['ChatMessage']['belongsTo'](db[_0x0a9e('0x11')],{'onDelete':'cascade','as':_0x0a9e('0x11')});db[_0x0a9e('0x65')][_0x0a9e('0x150')](db[_0x0a9e('0x124')],{'onDelete':'cascade','as':'Contact','foreignKey':_0x0a9e('0x172')});db[_0x0a9e('0x65')][_0x0a9e('0x150')](db[_0x0a9e('0x64')],{'onDelete':'cascade','as':_0x0a9e('0x179'),'foreignKey':_0x0a9e('0x197')});db[_0x0a9e('0x65')][_0x0a9e('0x150')](db[_0x0a9e('0xe4')],{'as':'Attachment','foreignKey':'AttachmentId'});db[_0x0a9e('0x65')][_0x0a9e('0x150')](db[_0x0a9e('0x60')],{'as':_0x0a9e('0x183'),'foreignKey':_0x0a9e('0x17a')});db[_0x0a9e('0x66')][_0x0a9e('0x110')](db['Attachment'],{'as':_0x0a9e('0x178'),'foreignKey':_0x0a9e('0x19a'),'onDelete':_0x0a9e('0x10e'),'hooks':!![]});db['ChatOfflineMessage']['belongsTo'](db['CmContact'],{'onDelete':_0x0a9e('0x10e'),'as':_0x0a9e('0x160'),'foreignKey':'ContactId'});db[_0x0a9e('0x66')][_0x0a9e('0x150')](db[_0x0a9e('0x60')],{'as':'Account','foreignKey':'ChatWebsiteId'});db[_0x0a9e('0x67')][_0x0a9e('0x121')](db[_0x0a9e('0x11')],{'as':_0x0a9e('0x170'),'through':'UserChatQueue','hooks':!![]});db[_0x0a9e('0x67')]['belongsToMany'](db['Team'],{'through':_0x0a9e('0x19b'),'as':'Teams'});db[_0x0a9e('0x68')][_0x0a9e('0x110')](db[_0x0a9e('0xcc')],{'as':'Messages','foreignKey':_0x0a9e('0x19c'),'onDelete':_0x0a9e('0x10e')});db[_0x0a9e('0x68')]['belongsToMany'](db['User'],{'as':_0x0a9e('0x14a'),'through':_0x0a9e('0x123')});db[_0x0a9e('0x191')][_0x0a9e('0x150')](db[_0x0a9e('0x60')],{'as':_0x0a9e('0x196'),'foreignKey':'ChatWebsiteId'});db['CmCompany'][_0x0a9e('0x110')](db[_0x0a9e('0x124')],{'as':'Contacts','foreignKey':'CompanyId'});db['CmContact']['hasMany'](db['CmContactHasItem'],{'as':'Phones','foreignKey':_0x0a9e('0x19d')});db['CmContact'][_0x0a9e('0x110')](db[_0x0a9e('0x6d')],{'as':_0x0a9e('0x14c'),'foreignKey':_0x0a9e('0x172')});db[_0x0a9e('0x124')][_0x0a9e('0x110')](db[_0x0a9e('0x71')],{'as':'HopperFinals','foreignKey':_0x0a9e('0x172')});db[_0x0a9e('0x124')][_0x0a9e('0x110')](db[_0x0a9e('0x116')],{'as':_0x0a9e('0x19e'),'foreignKey':_0x0a9e('0x172')});db[_0x0a9e('0x124')][_0x0a9e('0x110')](db[_0x0a9e('0x73')],{'as':_0x0a9e('0x73'),'foreignKey':_0x0a9e('0x172')});db['CmContact'][_0x0a9e('0x110')](db[_0x0a9e('0xd0')],{'as':'JscriptySessions','foreignKey':_0x0a9e('0x172')});db['CmContact'][_0x0a9e('0x110')](db[_0x0a9e('0x5d')],{'as':'OpenchannelInteractions','foreignKey':'ContactId','onDelete':_0x0a9e('0x164')});db['CmContact'][_0x0a9e('0x110')](db[_0x0a9e('0x64')],{'as':_0x0a9e('0x119'),'foreignKey':_0x0a9e('0x172'),'onDelete':_0x0a9e('0x164')});db['CmContact'][_0x0a9e('0x110')](db['SmsInteraction'],{'as':'SmsInteractions','foreignKey':_0x0a9e('0x172'),'onDelete':_0x0a9e('0x164')});db[_0x0a9e('0x124')][_0x0a9e('0x110')](db[_0x0a9e('0x11b')],{'as':'FaxInteractions','foreignKey':_0x0a9e('0x172'),'onDelete':_0x0a9e('0x164')});db[_0x0a9e('0x124')][_0x0a9e('0x110')](db['MailInteraction'],{'as':_0x0a9e('0x11d'),'foreignKey':_0x0a9e('0x172'),'onDelete':'restrict'});db[_0x0a9e('0x124')][_0x0a9e('0x150')](db[_0x0a9e('0x19f')],{'as':_0x0a9e('0x1a0'),'foreignKey':'CompanyId'});db[_0x0a9e('0x124')][_0x0a9e('0x150')](db[_0x0a9e('0x139')],{'as':_0x0a9e('0x16c'),'foreignKey':_0x0a9e('0x16d'),'onDelete':'cascade'});db[_0x0a9e('0x124')][_0x0a9e('0x121')](db['User'],{'as':_0x0a9e('0x176'),'through':'cm_user_has_contacts'});db[_0x0a9e('0x124')][_0x0a9e('0x121')](db[_0x0a9e('0x86')],{'as':_0x0a9e('0x174'),'through':_0x0a9e('0x1a1')});db[_0x0a9e('0x124')][_0x0a9e('0x121')](db[_0x0a9e('0x86')],{'through':_0x0a9e('0x1a1'),'as':_0x0a9e('0x175')});db[_0x0a9e('0x6d')][_0x0a9e('0x110')](db[_0x0a9e('0x1a2')],{'as':_0x0a9e('0x1a3'),'foreignKey':_0x0a9e('0x1a4')});db['CmHopper'][_0x0a9e('0x150')](db[_0x0a9e('0x124')],{'as':_0x0a9e('0x160'),'foreignKey':_0x0a9e('0x172'),'onDelete':_0x0a9e('0x10e')});db[_0x0a9e('0x6d')][_0x0a9e('0x150')](db[_0x0a9e('0x139')],{'as':'List','foreignKey':'ListId','onDelete':'cascade'});db['CmHopper'][_0x0a9e('0x150')](db['User'],{'as':'Agent','foreignKey':'UserId'});db[_0x0a9e('0x6d')][_0x0a9e('0x150')](db[_0x0a9e('0x1a')],{'as':_0x0a9e('0x194'),'foreignKey':'VoiceQueueId','onDelete':'cascade'});db[_0x0a9e('0x6d')][_0x0a9e('0x150')](db[_0x0a9e('0x1a5')],{'as':_0x0a9e('0x1a5'),'foreignKey':'CampaignId','onDelete':_0x0a9e('0x10e')});db[_0x0a9e('0x6d')][_0x0a9e('0x150')](db[_0x0a9e('0x11')],{'as':_0x0a9e('0x184'),'foreignKey':_0x0a9e('0x1a6')});db['CmHopperBlack'][_0x0a9e('0x150')](db['CmContact'],{'as':'Contact','foreignKey':_0x0a9e('0x172'),'onDelete':'cascade'});db[_0x0a9e('0x6f')][_0x0a9e('0x150')](db[_0x0a9e('0x139')],{'as':_0x0a9e('0x16c'),'foreignKey':_0x0a9e('0x16d'),'onDelete':_0x0a9e('0x10e')});db[_0x0a9e('0x6f')][_0x0a9e('0x150')](db[_0x0a9e('0x1a')],{'as':'Queue','foreignKey':_0x0a9e('0x14b'),'onDelete':_0x0a9e('0x10e')});db['CmHopperBlack'][_0x0a9e('0x150')](db[_0x0a9e('0x1a5')],{'as':_0x0a9e('0x1a5'),'foreignKey':_0x0a9e('0x1a7'),'onDelete':'cascade'});db[_0x0a9e('0x76')][_0x0a9e('0x110')](db[_0x0a9e('0x7a')],{'as':{'plural':_0x0a9e('0x1a8'),'singular':_0x0a9e('0x1a9')},'foreignKey':'AutomationAllId','onDelete':'cascade','hooks':!![]});db[_0x0a9e('0x76')]['hasMany'](db[_0x0a9e('0x7a')],{'as':{'plural':'Any','singular':_0x0a9e('0x1aa')},'foreignKey':'AutomationAnyId','onDelete':_0x0a9e('0x10e'),'hooks':!![]});db['Automation'][_0x0a9e('0x110')](db[_0x0a9e('0x74')],{'as':_0x0a9e('0x1ab'),'foreignKey':'AutomationId','onDelete':'cascade','hooks':!![]});db[_0x0a9e('0x167')]['hasMany'](db[_0x0a9e('0x167')],{'as':'Dispositions','foreignKey':_0x0a9e('0x1ac'),'onDelete':'cascade'});db[_0x0a9e('0x17b')][_0x0a9e('0x110')](db['Interval'],{'as':_0x0a9e('0x1ad'),'foreignKey':_0x0a9e('0x153'),'onDelete':_0x0a9e('0x10e'),'hooks':!![],'required':![]});db[_0x0a9e('0x17b')][_0x0a9e('0x110')](db[_0x0a9e('0x16')],{'as':_0x0a9e('0x114'),'foreignKey':_0x0a9e('0x153'),'onDelete':_0x0a9e('0x164')});db['Interval'][_0x0a9e('0x110')](db[_0x0a9e('0x16b')],{'as':_0x0a9e('0x1ae'),'foreignKey':_0x0a9e('0x153')});db[_0x0a9e('0x17b')]['hasMany'](db['ChatApplication'],{'as':_0x0a9e('0x1af'),'foreignKey':'IntervalId'});db[_0x0a9e('0x17b')]['hasMany'](db[_0x0a9e('0x47')],{'as':_0x0a9e('0x1b0'),'foreignKey':_0x0a9e('0x153')});db[_0x0a9e('0x17b')][_0x0a9e('0x110')](db[_0x0a9e('0x52')],{'as':_0x0a9e('0x1b1'),'foreignKey':'IntervalId'});db['Schedule'][_0x0a9e('0x150')](db[_0x0a9e('0x3b')],{});db['Schedule'][_0x0a9e('0x150')](db[_0x0a9e('0x94')],{'foreignKey':_0x0a9e('0x1b2')});db['Schedule']['belongsTo'](db['AnalyticCustomReport'],{'foreignKey':_0x0a9e('0x1b3')});db[_0x0a9e('0x84')][_0x0a9e('0x121')](db[_0x0a9e('0x18')],{'as':'Mohs','through':_0x0a9e('0x149'),'onDelete':_0x0a9e('0x164')});db[_0x0a9e('0x86')]['belongsToMany'](db[_0x0a9e('0x124')],{'through':'cm_contact_has_tags'});db['Tag'][_0x0a9e('0x121')](db[_0x0a9e('0x64')],{'through':'chat_interaction_has_tags'});db['Tag'][_0x0a9e('0x121')](db['MailInteraction'],{'through':_0x0a9e('0x173')});db['Tag'][_0x0a9e('0x121')](db[_0x0a9e('0x53')],{'through':_0x0a9e('0x18a')});db['Tag']['belongsToMany'](db[_0x0a9e('0x11b')],{'through':_0x0a9e('0x185')});db[_0x0a9e('0x86')][_0x0a9e('0x121')](db['OpenchannelInteraction'],{'through':_0x0a9e('0x1b4')});db[_0x0a9e('0x86')]['belongsToMany'](db[_0x0a9e('0xfb')],{'through':_0x0a9e('0x1b5')});db[_0x0a9e('0x1b6')]['belongsTo'](db[_0x0a9e('0x88')],{'as':_0x0a9e('0x1b7'),'foreignKey':_0x0a9e('0x1b8')});db[_0x0a9e('0x1a2')][_0x0a9e('0x150')](db[_0x0a9e('0x6d')],{'as':_0x0a9e('0x1b9'),'foreignKey':_0x0a9e('0x1a4')});db[_0x0a9e('0x1b6')][_0x0a9e('0x150')](db[_0x0a9e('0x124')],{'as':_0x0a9e('0x160'),'foreignKey':_0x0a9e('0x19d')});db[_0x0a9e('0x8d')][_0x0a9e('0x110')](db[_0x0a9e('0x7a')],{'as':{'plural':_0x0a9e('0x1ba'),'singular':_0x0a9e('0x1bb')},'foreignKey':_0x0a9e('0x1bc'),'onDelete':_0x0a9e('0x10e'),'hooks':!![]});db[_0x0a9e('0x8d')][_0x0a9e('0x110')](db['Condition'],{'as':{'plural':_0x0a9e('0x1bd'),'singular':_0x0a9e('0x1be')},'foreignKey':_0x0a9e('0x1bf'),'onDelete':'cascade','hooks':!![]});db[_0x0a9e('0x8d')][_0x0a9e('0x110')](db[_0x0a9e('0x74')],{'as':_0x0a9e('0x1ab'),'foreignKey':'TriggerId','onDelete':_0x0a9e('0x10e'),'hooks':!![]});db[_0x0a9e('0x1c0')]['hasMany'](db[_0x0a9e('0x99')],{'as':_0x0a9e('0x1c1'),'onDelete':_0x0a9e('0x10e'),'foreignKey':'CustomReportId','hooks':!![]});db['AnalyticDefaultReport'][_0x0a9e('0x110')](db[_0x0a9e('0x99')],{'as':_0x0a9e('0x1c1'),'onDelete':'cascade','foreignKey':'DefaultReportId'});db[_0x0a9e('0x98')][_0x0a9e('0x110')](db[_0x0a9e('0x99')],{'as':_0x0a9e('0x1c1'),'onDelete':'cascade','foreignKey':_0x0a9e('0x1c2')});db['AnalyticFieldReport']['belongsTo'](db[_0x0a9e('0x98')],{'foreignKey':_0x0a9e('0x1c2')});db[_0x0a9e('0x9c')]['hasMany'](db[_0x0a9e('0x9e')],{'as':_0x0a9e('0x1c3'),'onDelete':_0x0a9e('0x10e'),'foreignKey':'AccountId'});db['SalesforceConfiguration'][_0x0a9e('0x110')](db[_0x0a9e('0xa0')],{'as':_0x0a9e('0x1c4'),'onDelete':'cascade','foreignKey':'SubjectId'});db[_0x0a9e('0x9e')]['hasMany'](db['SalesforceField'],{'as':'Descriptions','onDelete':_0x0a9e('0x10e'),'foreignKey':_0x0a9e('0x1c5')});db[_0x0a9e('0x9e')]['hasMany'](db[_0x0a9e('0xa0')],{'as':_0x0a9e('0x1c1'),'onDelete':'cascade','foreignKey':_0x0a9e('0x1c6')});db['SalesforceConfiguration'][_0x0a9e('0x150')](db[_0x0a9e('0x9c')],{'as':'Account','foreignKey':_0x0a9e('0x1c7')});db[_0x0a9e('0xa0')][_0x0a9e('0x110')](db['SalesforceField'],{'as':_0x0a9e('0x1c8'),'foreignKey':_0x0a9e('0x1c9')});db[_0x0a9e('0xa0')]['hasMany'](db[_0x0a9e('0xa0')],{'as':_0x0a9e('0x1ca'),'foreignKey':_0x0a9e('0x1c5')});db['SalesforceField'][_0x0a9e('0x110')](db[_0x0a9e('0xa0')],{'as':_0x0a9e('0x1cb'),'foreignKey':_0x0a9e('0x1c6')});db[_0x0a9e('0xa0')][_0x0a9e('0x150')](db[_0x0a9e('0x8e')],{'as':_0x0a9e('0x8e'),'foreignKey':'VariableId'});db[_0x0a9e('0xa1')][_0x0a9e('0x110')](db[_0x0a9e('0xa2')],{'as':_0x0a9e('0x1c3'),'onDelete':'cascade','foreignKey':_0x0a9e('0x1c7')});db[_0x0a9e('0xa2')]['hasMany'](db[_0x0a9e('0x1cc')],{'as':_0x0a9e('0x1c4'),'onDelete':_0x0a9e('0x10e'),'foreignKey':_0x0a9e('0x1c9')});db[_0x0a9e('0xa2')][_0x0a9e('0x110')](db[_0x0a9e('0x1cc')],{'as':_0x0a9e('0x1cd'),'onDelete':'cascade','foreignKey':_0x0a9e('0x1c5')});db['SugarcrmConfiguration'][_0x0a9e('0x110')](db[_0x0a9e('0x1cc')],{'as':'Fields','onDelete':_0x0a9e('0x10e'),'foreignKey':_0x0a9e('0x1c6')});db['SugarcrmConfiguration'][_0x0a9e('0x150')](db[_0x0a9e('0xa1')],{'as':'Account','foreignKey':_0x0a9e('0x1c7')});db['SugarcrmField']['hasMany'](db['SugarcrmField'],{'as':_0x0a9e('0x1c8'),'foreignKey':_0x0a9e('0x1c9')});db['SugarcrmField'][_0x0a9e('0x110')](db[_0x0a9e('0x1cc')],{'as':'Description','foreignKey':_0x0a9e('0x1c5')});db[_0x0a9e('0x1cc')]['hasMany'](db[_0x0a9e('0x1cc')],{'as':_0x0a9e('0x1cb'),'foreignKey':_0x0a9e('0x1c6')});db['SugarcrmField'][_0x0a9e('0x150')](db[_0x0a9e('0x8e')],{'as':_0x0a9e('0x8e'),'foreignKey':_0x0a9e('0x1ce')});db[_0x0a9e('0x1cf')]['hasMany'](db[_0x0a9e('0xa6')],{'as':'Configurations','onDelete':_0x0a9e('0x10e'),'foreignKey':_0x0a9e('0x1c7')});db[_0x0a9e('0xa6')][_0x0a9e('0x110')](db[_0x0a9e('0xa8')],{'as':_0x0a9e('0x1c4'),'onDelete':_0x0a9e('0x10e'),'foreignKey':_0x0a9e('0x1c9')});db[_0x0a9e('0xa6')]['hasMany'](db[_0x0a9e('0xa8')],{'as':_0x0a9e('0x1cd'),'onDelete':_0x0a9e('0x10e'),'foreignKey':'DescriptionId'});db['DeskConfiguration']['hasMany'](db['DeskField'],{'as':'Fields','onDelete':_0x0a9e('0x10e'),'foreignKey':'FieldId'});db[_0x0a9e('0xa6')][_0x0a9e('0x150')](db[_0x0a9e('0x1cf')],{'as':_0x0a9e('0x183'),'foreignKey':_0x0a9e('0x1c7')});db[_0x0a9e('0xa6')]['belongsToMany'](db[_0x0a9e('0x86')],{'through':'int_desk_configuration_has_tags'});db['DeskField'][_0x0a9e('0x110')](db['DeskField'],{'as':_0x0a9e('0x1c8'),'foreignKey':'SubjectId'});db[_0x0a9e('0xa8')][_0x0a9e('0x110')](db[_0x0a9e('0xa8')],{'as':_0x0a9e('0x1ca'),'foreignKey':_0x0a9e('0x1c5')});db['DeskField'][_0x0a9e('0x110')](db[_0x0a9e('0xa8')],{'as':'Field','foreignKey':_0x0a9e('0x1c6')});db[_0x0a9e('0xa8')]['belongsTo'](db[_0x0a9e('0x8e')],{'as':_0x0a9e('0x8e'),'foreignKey':_0x0a9e('0x1ce')});db[_0x0a9e('0xaa')][_0x0a9e('0x110')](db[_0x0a9e('0xac')],{'as':_0x0a9e('0x1c3'),'onDelete':'cascade','foreignKey':_0x0a9e('0x1c7')});db[_0x0a9e('0xac')][_0x0a9e('0x110')](db[_0x0a9e('0xae')],{'as':'Subjects','onDelete':_0x0a9e('0x10e'),'foreignKey':_0x0a9e('0x1c9')});db[_0x0a9e('0xac')][_0x0a9e('0x110')](db[_0x0a9e('0xae')],{'as':_0x0a9e('0x1cd'),'onDelete':_0x0a9e('0x10e'),'foreignKey':_0x0a9e('0x1c5')});db['ZohoConfiguration'][_0x0a9e('0x110')](db[_0x0a9e('0xae')],{'as':_0x0a9e('0x1c1'),'onDelete':'cascade','foreignKey':_0x0a9e('0x1c6')});db[_0x0a9e('0xac')][_0x0a9e('0x150')](db[_0x0a9e('0xaa')],{'as':_0x0a9e('0x183'),'foreignKey':_0x0a9e('0x1c7')});db[_0x0a9e('0xae')][_0x0a9e('0x110')](db[_0x0a9e('0xae')],{'as':_0x0a9e('0x1c8'),'foreignKey':'SubjectId'});db[_0x0a9e('0xae')][_0x0a9e('0x110')](db[_0x0a9e('0xae')],{'as':'Description','foreignKey':'DescriptionId'});db[_0x0a9e('0xae')][_0x0a9e('0x110')](db[_0x0a9e('0xae')],{'as':_0x0a9e('0x1cb'),'foreignKey':_0x0a9e('0x1c6')});db[_0x0a9e('0xae')][_0x0a9e('0x150')](db[_0x0a9e('0x8e')],{'as':_0x0a9e('0x8e'),'foreignKey':'VariableId'});db[_0x0a9e('0xaf')][_0x0a9e('0x110')](db['ZendeskConfiguration'],{'as':_0x0a9e('0x1c3'),'onDelete':_0x0a9e('0x10e'),'foreignKey':'AccountId'});db['ZendeskConfiguration'][_0x0a9e('0x110')](db[_0x0a9e('0xb2')],{'as':_0x0a9e('0x1c4'),'foreignKey':_0x0a9e('0x1c9')});db[_0x0a9e('0x1d0')]['hasMany'](db[_0x0a9e('0xb2')],{'as':'Descriptions','foreignKey':'DescriptionId'});db['ZendeskConfiguration'][_0x0a9e('0x110')](db['ZendeskField'],{'as':'Fields','foreignKey':'FieldId'});db[_0x0a9e('0x1d0')][_0x0a9e('0x150')](db[_0x0a9e('0xaf')],{'as':_0x0a9e('0x183'),'foreignKey':'AccountId'});db[_0x0a9e('0x1d0')]['belongsToMany'](db['Tag'],{'through':_0x0a9e('0x1d1')});db[_0x0a9e('0xb2')][_0x0a9e('0x110')](db['ZendeskField'],{'as':'Subject','foreignKey':'SubjectId'});db[_0x0a9e('0xb2')][_0x0a9e('0x110')](db[_0x0a9e('0xb2')],{'as':_0x0a9e('0x1ca'),'foreignKey':_0x0a9e('0x1c5')});db['ZendeskField'][_0x0a9e('0x110')](db[_0x0a9e('0xb2')],{'as':_0x0a9e('0x1cb'),'foreignKey':_0x0a9e('0x1c6')});db[_0x0a9e('0xb2')][_0x0a9e('0x150')](db['Variable'],{'as':_0x0a9e('0x8e'),'foreignKey':_0x0a9e('0x1ce')});db[_0x0a9e('0x1d2')][_0x0a9e('0x110')](db[_0x0a9e('0x1d3')],{'as':_0x0a9e('0x1c3'),'onDelete':_0x0a9e('0x10e'),'foreignKey':_0x0a9e('0x1c7')});db[_0x0a9e('0x1d3')][_0x0a9e('0x110')](db[_0x0a9e('0xb5')],{'as':_0x0a9e('0x1c4'),'onDelete':_0x0a9e('0x10e'),'foreignKey':_0x0a9e('0x1c9')});db[_0x0a9e('0x1d3')][_0x0a9e('0x110')](db[_0x0a9e('0xb5')],{'as':_0x0a9e('0x1cd'),'onDelete':'cascade','foreignKey':_0x0a9e('0x1c5')});db[_0x0a9e('0x1d3')]['hasMany'](db['FreshdeskField'],{'as':'Fields','onDelete':_0x0a9e('0x10e'),'foreignKey':_0x0a9e('0x1c6')});db['FreshdeskConfiguration'][_0x0a9e('0x150')](db[_0x0a9e('0x1d2')],{'as':'Account','foreignKey':_0x0a9e('0x1c7')});db['FreshdeskConfiguration'][_0x0a9e('0x121')](db['Tag'],{'through':_0x0a9e('0x1d4')});db[_0x0a9e('0xb5')][_0x0a9e('0x110')](db[_0x0a9e('0xb5')],{'as':'Subject','foreignKey':_0x0a9e('0x1c9')});db[_0x0a9e('0xb5')][_0x0a9e('0x110')](db['FreshdeskField'],{'as':'Description','foreignKey':'DescriptionId'});db['FreshdeskField'][_0x0a9e('0x110')](db[_0x0a9e('0xb5')],{'as':_0x0a9e('0x1cb'),'foreignKey':_0x0a9e('0x1c6')});db[_0x0a9e('0xb5')]['belongsTo'](db[_0x0a9e('0x8e')],{'as':_0x0a9e('0x8e'),'foreignKey':_0x0a9e('0x1ce')});db[_0x0a9e('0x1d5')]['hasMany'](db[_0x0a9e('0xb8')],{'as':_0x0a9e('0x1c3'),'onDelete':_0x0a9e('0x10e'),'foreignKey':_0x0a9e('0x1c7')});db[_0x0a9e('0xb8')]['hasMany'](db[_0x0a9e('0xb9')],{'as':_0x0a9e('0x1c4'),'foreignKey':_0x0a9e('0x1c9')});db['VtigerConfiguration'][_0x0a9e('0x110')](db['VtigerField'],{'as':_0x0a9e('0x1cd'),'foreignKey':_0x0a9e('0x1c5')});db[_0x0a9e('0xb8')][_0x0a9e('0x110')](db[_0x0a9e('0xb9')],{'as':'Fields','foreignKey':_0x0a9e('0x1c6')});db[_0x0a9e('0xb8')][_0x0a9e('0x150')](db[_0x0a9e('0x1d5')],{'as':_0x0a9e('0x183'),'foreignKey':'AccountId'});db[_0x0a9e('0xb9')][_0x0a9e('0x110')](db[_0x0a9e('0xb9')],{'as':'Subject','foreignKey':_0x0a9e('0x1c9')});db['VtigerField']['hasMany'](db[_0x0a9e('0xb9')],{'as':'Description','foreignKey':_0x0a9e('0x1c5')});db[_0x0a9e('0xb9')][_0x0a9e('0x110')](db['VtigerField'],{'as':_0x0a9e('0x1cb'),'foreignKey':_0x0a9e('0x1c6')});db[_0x0a9e('0xb9')][_0x0a9e('0x150')](db[_0x0a9e('0x8e')],{'as':_0x0a9e('0x8e'),'foreignKey':_0x0a9e('0x1ce')});db[_0x0a9e('0xba')]['hasMany'](db[_0x0a9e('0xbc')],{'as':_0x0a9e('0x1c3'),'onDelete':_0x0a9e('0x10e'),'foreignKey':_0x0a9e('0x1c7')});db[_0x0a9e('0xbc')]['hasMany'](db['ServicenowField'],{'as':_0x0a9e('0x1c4'),'foreignKey':'SubjectId'});db[_0x0a9e('0xbc')][_0x0a9e('0x110')](db['ServicenowField'],{'as':_0x0a9e('0x1cd'),'foreignKey':_0x0a9e('0x1c5')});db[_0x0a9e('0xbc')]['hasMany'](db[_0x0a9e('0x1d6')],{'as':_0x0a9e('0x1c1'),'foreignKey':_0x0a9e('0x1c6')});db[_0x0a9e('0xbc')][_0x0a9e('0x150')](db[_0x0a9e('0xba')],{'as':_0x0a9e('0x183'),'foreignKey':_0x0a9e('0x1c7')});db['ServicenowField'][_0x0a9e('0x110')](db[_0x0a9e('0x1d6')],{'as':_0x0a9e('0x1c8'),'foreignKey':_0x0a9e('0x1c9')});db[_0x0a9e('0x1d6')]['hasMany'](db[_0x0a9e('0x1d6')],{'as':'Description','foreignKey':_0x0a9e('0x1c5')});db[_0x0a9e('0x1d6')][_0x0a9e('0x110')](db['ServicenowField'],{'as':_0x0a9e('0x1cb'),'foreignKey':'FieldId'});db[_0x0a9e('0x1d6')][_0x0a9e('0x150')](db[_0x0a9e('0x8e')],{'as':_0x0a9e('0x8e'),'foreignKey':'VariableId'});db[_0x0a9e('0xbe')]['hasMany'](db[_0x0a9e('0xbf')],{'as':_0x0a9e('0x1c3'),'onDelete':'cascade','foreignKey':_0x0a9e('0x1c7')});db[_0x0a9e('0xbe')][_0x0a9e('0x150')](db['CloudProvider'],{'as':_0x0a9e('0x103'),'foreignKey':'CloudProviderId'});db[_0x0a9e('0xbf')][_0x0a9e('0x110')](db['Dynamics365Field'],{'as':'Subjects','onDelete':'cascade','foreignKey':'SubjectId'});db[_0x0a9e('0xbf')][_0x0a9e('0x110')](db[_0x0a9e('0xc1')],{'as':_0x0a9e('0x1cd'),'onDelete':'cascade','foreignKey':_0x0a9e('0x1c5')});db['Dynamics365Configuration'][_0x0a9e('0x110')](db[_0x0a9e('0xc1')],{'as':'Fields','onDelete':_0x0a9e('0x10e'),'foreignKey':_0x0a9e('0x1c6')});db[_0x0a9e('0xbf')][_0x0a9e('0x150')](db[_0x0a9e('0xbe')],{'as':_0x0a9e('0x183'),'foreignKey':_0x0a9e('0x1c7')});db['Dynamics365Field'][_0x0a9e('0x110')](db[_0x0a9e('0xc1')],{'as':_0x0a9e('0x1c8'),'foreignKey':_0x0a9e('0x1c9')});db[_0x0a9e('0xc1')][_0x0a9e('0x110')](db[_0x0a9e('0xc1')],{'as':_0x0a9e('0x1ca'),'foreignKey':_0x0a9e('0x1c5')});db[_0x0a9e('0xc1')][_0x0a9e('0x110')](db['Dynamics365Field'],{'as':_0x0a9e('0x1cb'),'foreignKey':_0x0a9e('0x1c6')});db[_0x0a9e('0xc1')][_0x0a9e('0x150')](db[_0x0a9e('0x8e')],{'as':_0x0a9e('0x8e'),'foreignKey':_0x0a9e('0x1ce')});db['FreshsalesAccount'][_0x0a9e('0x110')](db[_0x0a9e('0xc5')],{'as':_0x0a9e('0x1c3'),'onDelete':'cascade','foreignKey':_0x0a9e('0x1c7')});db[_0x0a9e('0xc5')][_0x0a9e('0x110')](db['FreshsalesField'],{'as':'Subjects','foreignKey':_0x0a9e('0x1c9')});db[_0x0a9e('0xc5')][_0x0a9e('0x110')](db[_0x0a9e('0xc7')],{'as':_0x0a9e('0x1cd'),'foreignKey':'DescriptionId'});db[_0x0a9e('0xc5')]['hasMany'](db[_0x0a9e('0xc7')],{'as':_0x0a9e('0x1c1'),'foreignKey':'FieldId'});db[_0x0a9e('0xc5')]['belongsTo'](db[_0x0a9e('0xc3')],{'as':_0x0a9e('0x183'),'foreignKey':'AccountId'});db[_0x0a9e('0xc7')][_0x0a9e('0x110')](db[_0x0a9e('0xc7')],{'as':'Subject','foreignKey':_0x0a9e('0x1c9')});db[_0x0a9e('0xc7')][_0x0a9e('0x110')](db[_0x0a9e('0xc7')],{'as':_0x0a9e('0x1ca'),'foreignKey':_0x0a9e('0x1c5')});db['FreshsalesField'][_0x0a9e('0x110')](db[_0x0a9e('0xc7')],{'as':_0x0a9e('0x1cb'),'foreignKey':_0x0a9e('0x1c6')});db['FreshsalesField']['belongsTo'](db[_0x0a9e('0x8e')],{'as':_0x0a9e('0x8e'),'foreignKey':_0x0a9e('0x1ce')});db['ChatQueueReport']['belongsTo'](db[_0x0a9e('0x60')],{});db['ChatQueueReport']['belongsTo'](db[_0x0a9e('0x139')],{'as':_0x0a9e('0x16c'),'foreignKey':'ListId'});db[_0x0a9e('0xca')][_0x0a9e('0x150')](db[_0x0a9e('0x124')],{'as':_0x0a9e('0x160'),'foreignKey':_0x0a9e('0x172')});db['ChatQueueReport'][_0x0a9e('0x150')](db[_0x0a9e('0x64')],{});db['ChatQueueReport'][_0x0a9e('0x150')](db[_0x0a9e('0x65')],{});db[_0x0a9e('0xca')][_0x0a9e('0x150')](db[_0x0a9e('0x11')],{});db['ChatQueueReport'][_0x0a9e('0x150')](db[_0x0a9e('0x67')],{});db['ChatInternalMessage']['belongsTo'](db[_0x0a9e('0x11')],{'onDelete':_0x0a9e('0x10e'),'foreignKey':'FromId'});db['ChatInternalMessage'][_0x0a9e('0x150')](db[_0x0a9e('0x11')],{'onDelete':_0x0a9e('0x10e'),'foreignKey':_0x0a9e('0x1d7')});db[_0x0a9e('0xd0')]['hasMany'](db[_0x0a9e('0x1d8')],{'foreignKey':'SessionId','onDelete':'cascade'});db[_0x0a9e('0xd0')]['hasMany'](db[_0x0a9e('0xcd')],{'foreignKey':'SessionId','onDelete':_0x0a9e('0x10e')});db['SmsQueueReport']['belongsTo'](db[_0x0a9e('0x50')],{});db[_0x0a9e('0xd2')][_0x0a9e('0x150')](db['CmList'],{'as':'List','foreignKey':'ListId'});db[_0x0a9e('0xd2')][_0x0a9e('0x150')](db['CmContact'],{'as':_0x0a9e('0x160'),'foreignKey':'ContactId'});db[_0x0a9e('0xd2')]['belongsTo'](db[_0x0a9e('0x53')],{});db[_0x0a9e('0xd2')]['belongsTo'](db['SmsMessage'],{});db['SmsQueueReport'][_0x0a9e('0x150')](db[_0x0a9e('0x11')],{});db[_0x0a9e('0xd2')][_0x0a9e('0x150')](db[_0x0a9e('0x57')],{});db[_0x0a9e('0x1d9')][_0x0a9e('0x110')](db[_0x0a9e('0xd0')],{'foreignKey':_0x0a9e('0x1da')});db[_0x0a9e('0x1d9')][_0x0a9e('0x110')](db[_0x0a9e('0x1d8')],{'foreignKey':_0x0a9e('0x1da')});db[_0x0a9e('0x1d9')][_0x0a9e('0x110')](db['JscriptyAnswerReport'],{'foreignKey':'ProjectId'});db[_0x0a9e('0x129')][_0x0a9e('0x121')](db[_0x0a9e('0x11')],{'as':_0x0a9e('0x170'),'through':'user_has_teams'});db[_0x0a9e('0x129')]['belongsToMany'](db[_0x0a9e('0x1a')],{'through':'TeamVoiceQueue','as':_0x0a9e('0x131')});db['Team']['belongsToMany'](db[_0x0a9e('0x3c')],{'through':_0x0a9e('0x171'),'as':_0x0a9e('0x1db')});db[_0x0a9e('0x129')]['belongsToMany'](db['ChatQueue'],{'through':_0x0a9e('0x19b'),'as':'ChatQueues'});db[_0x0a9e('0x129')][_0x0a9e('0x121')](db['FaxQueue'],{'through':_0x0a9e('0x187'),'as':'FaxQueues'});db[_0x0a9e('0x129')][_0x0a9e('0x121')](db[_0x0a9e('0x57')],{'through':_0x0a9e('0x18c'),'as':_0x0a9e('0x136')});db[_0x0a9e('0x129')][_0x0a9e('0x121')](db[_0x0a9e('0x137')],{'through':_0x0a9e('0x190'),'as':_0x0a9e('0x1dc')});db[_0x0a9e('0x129')][_0x0a9e('0x121')](db[_0x0a9e('0x101')],{'through':_0x0a9e('0x1dd'),'as':_0x0a9e('0x138')});db[_0x0a9e('0x129')]['belongsToMany'](db[_0x0a9e('0xf1')],{'through':_0x0a9e('0x107'),'as':_0x0a9e('0x132')});db['Campaign'][_0x0a9e('0x110')](db[_0x0a9e('0x6d')],{'as':_0x0a9e('0x14c'),'foreignKey':_0x0a9e('0x1a7')});db[_0x0a9e('0x1a5')][_0x0a9e('0x110')](db[_0x0a9e('0x71')],{'as':_0x0a9e('0x115'),'foreignKey':_0x0a9e('0x1a7')});db[_0x0a9e('0x1a5')][_0x0a9e('0x110')](db['CmHopperHistory'],{'as':_0x0a9e('0x19e'),'foreignKey':_0x0a9e('0x1a7')});db[_0x0a9e('0x1a5')]['hasMany'](db[_0x0a9e('0x6f')],{'as':'HopperBlacks','foreignKey':'CampaignId'});db[_0x0a9e('0x1a5')]['belongsTo'](db[_0x0a9e('0x28')],{'as':'Trunk','foreignKey':_0x0a9e('0x14f')});db[_0x0a9e('0x1a5')][_0x0a9e('0x150')](db['Trunk'],{'as':_0x0a9e('0x151'),'foreignKey':'TrunkBackupId'});db['Campaign'][_0x0a9e('0x150')](db[_0x0a9e('0x17b')],{'as':_0x0a9e('0x17b'),'foreignKey':_0x0a9e('0x153')});db[_0x0a9e('0x1a5')][_0x0a9e('0x150')](db['SquareProject'],{'as':_0x0a9e('0xdc'),'foreignKey':_0x0a9e('0x1de')});db[_0x0a9e('0x1a5')][_0x0a9e('0x121')](db[_0x0a9e('0x139')],{'as':'Lists','through':_0x0a9e('0x1df')});db[_0x0a9e('0x1a5')][_0x0a9e('0x121')](db[_0x0a9e('0x139')],{'as':_0x0a9e('0x156'),'through':_0x0a9e('0x1e0')});db[_0x0a9e('0xe4')][_0x0a9e('0x150')](db[_0x0a9e('0x66')],{'as':_0x0a9e('0x66'),'foreignKey':_0x0a9e('0x19a')});db[_0x0a9e('0x1e1')][_0x0a9e('0x150')](db['MailMessage'],{});db['MailTransferReport'][_0x0a9e('0x150')](db[_0x0a9e('0x11c')],{});db['MailTransferReport'][_0x0a9e('0x150')](db[_0x0a9e('0x3b')],{'foreignKey':_0x0a9e('0x1e2'),'as':_0x0a9e('0x1e3')});db[_0x0a9e('0x1e1')]['belongsTo'](db['User'],{'foreignKey':'FromUserId','as':_0x0a9e('0x1e4')});db[_0x0a9e('0x1e1')][_0x0a9e('0x150')](db[_0x0a9e('0x11')],{'foreignKey':_0x0a9e('0x1e5'),'as':_0x0a9e('0x1e6')});db[_0x0a9e('0x1e1')][_0x0a9e('0x150')](db[_0x0a9e('0x3c')],{'foreignKey':'ToMailQueueId','as':'ToQueue'});db[_0x0a9e('0x1e1')][_0x0a9e('0x150')](db[_0x0a9e('0x3b')],{'foreignKey':_0x0a9e('0x1e7'),'as':_0x0a9e('0x1e8')});db[_0x0a9e('0xe8')][_0x0a9e('0x150')](db[_0x0a9e('0x65')],{});db[_0x0a9e('0xe8')][_0x0a9e('0x150')](db['ChatInteraction'],{});db[_0x0a9e('0xe8')]['belongsTo'](db['ChatWebsite'],{'foreignKey':_0x0a9e('0x1e9'),'as':_0x0a9e('0x1e3')});db[_0x0a9e('0xe8')][_0x0a9e('0x150')](db[_0x0a9e('0x11')],{'foreignKey':_0x0a9e('0x1ea'),'as':_0x0a9e('0x1e4')});db[_0x0a9e('0xe8')][_0x0a9e('0x150')](db['User'],{'foreignKey':_0x0a9e('0x1e5'),'as':_0x0a9e('0x1e6')});db[_0x0a9e('0xe8')]['belongsTo'](db[_0x0a9e('0x67')],{'foreignKey':_0x0a9e('0x1eb'),'as':'ToQueue'});db['ChatTransferReport']['belongsTo'](db['ChatWebsite'],{'foreignKey':_0x0a9e('0x1ec'),'as':_0x0a9e('0x1e8')});db['FaxTransferReport'][_0x0a9e('0x150')](db['FaxMessage'],{});db[_0x0a9e('0xea')][_0x0a9e('0x150')](db[_0x0a9e('0x11b')],{});db['FaxTransferReport']['belongsTo'](db[_0x0a9e('0x45')],{'foreignKey':_0x0a9e('0x1ed'),'as':_0x0a9e('0x1e3')});db[_0x0a9e('0xea')][_0x0a9e('0x150')](db[_0x0a9e('0x11')],{'foreignKey':_0x0a9e('0x1ea'),'as':_0x0a9e('0x1e4')});db[_0x0a9e('0xea')][_0x0a9e('0x150')](db[_0x0a9e('0x11')],{'foreignKey':'ToUserId','as':_0x0a9e('0x1e6')});db[_0x0a9e('0xea')]['belongsTo'](db['FaxQueue'],{'foreignKey':_0x0a9e('0x1ee'),'as':_0x0a9e('0x1ef')});db[_0x0a9e('0xea')][_0x0a9e('0x150')](db[_0x0a9e('0x45')],{'foreignKey':'ToFaxAccountId','as':_0x0a9e('0x1e8')});db[_0x0a9e('0xec')]['belongsTo'](db[_0x0a9e('0x5e')],{});db['OpenchannelTransferReport']['belongsTo'](db['OpenchannelInteraction'],{});db[_0x0a9e('0xec')][_0x0a9e('0x150')](db['OpenchannelAccount'],{'foreignKey':'FromOpenchannelAccountId','as':_0x0a9e('0x1e3')});db[_0x0a9e('0xec')][_0x0a9e('0x150')](db[_0x0a9e('0x11')],{'foreignKey':'FromUserId','as':_0x0a9e('0x1e4')});db[_0x0a9e('0xec')][_0x0a9e('0x150')](db['User'],{'foreignKey':_0x0a9e('0x1e5'),'as':_0x0a9e('0x1e6')});db[_0x0a9e('0xec')][_0x0a9e('0x150')](db[_0x0a9e('0x137')],{'foreignKey':'ToOpenchannelQueueId','as':'ToQueue'});db[_0x0a9e('0xec')][_0x0a9e('0x150')](db[_0x0a9e('0x59')],{'foreignKey':'ToOpenchannelAccountId','as':'ToAccount'});db['SmsTransferReport']['belongsTo'](db[_0x0a9e('0x55')],{});db[_0x0a9e('0xee')][_0x0a9e('0x150')](db[_0x0a9e('0x53')],{});db[_0x0a9e('0xee')]['belongsTo'](db[_0x0a9e('0x50')],{'foreignKey':_0x0a9e('0x1f0'),'as':_0x0a9e('0x1e3')});db[_0x0a9e('0xee')][_0x0a9e('0x150')](db['User'],{'foreignKey':_0x0a9e('0x1ea'),'as':_0x0a9e('0x1e4')});db[_0x0a9e('0xee')][_0x0a9e('0x150')](db[_0x0a9e('0x11')],{'foreignKey':'ToUserId','as':_0x0a9e('0x1e6')});db[_0x0a9e('0xee')]['belongsTo'](db['SmsQueue'],{'foreignKey':'ToSmsQueueId','as':_0x0a9e('0x1ef')});db[_0x0a9e('0xee')]['belongsTo'](db[_0x0a9e('0x50')],{'foreignKey':'ToSmsAccountId','as':'ToAccount'});db['CmList']['hasMany'](db[_0x0a9e('0x167')],{'as':_0x0a9e('0x168'),'foreignKey':_0x0a9e('0x16d'),'onDelete':_0x0a9e('0x10e')});db[_0x0a9e('0x139')][_0x0a9e('0x110')](db[_0x0a9e('0x1f1')],{'as':_0x0a9e('0x1f2'),'foreignKey':_0x0a9e('0x16d')});db[_0x0a9e('0x139')][_0x0a9e('0x110')](db['CmContact'],{'as':_0x0a9e('0x125'),'onDelete':'cascade','foreignKey':_0x0a9e('0x16d')});db[_0x0a9e('0x139')][_0x0a9e('0x110')](db[_0x0a9e('0x71')],{'as':_0x0a9e('0x115'),'foreignKey':_0x0a9e('0x16d')});db[_0x0a9e('0x139')][_0x0a9e('0x110')](db[_0x0a9e('0x116')],{'as':'HopperHistory','foreignKey':'ListId'});db['CmList'][_0x0a9e('0x110')](db[_0x0a9e('0x73')],{'as':_0x0a9e('0x73'),'foreignKey':'ListId'});db[_0x0a9e('0x139')][_0x0a9e('0x121')](db[_0x0a9e('0x1a')],{'as':'Queues','through':_0x0a9e('0x1f3')});db[_0x0a9e('0x139')][_0x0a9e('0x121')](db[_0x0a9e('0x11')],{'as':'Agents','through':_0x0a9e('0x128')});db[_0x0a9e('0xf1')][_0x0a9e('0x110')](db[_0x0a9e('0x16')],{'as':_0x0a9e('0x114'),'onDelete':_0x0a9e('0x10e')});db[_0x0a9e('0xf1')][_0x0a9e('0x121')](db[_0x0a9e('0x11')],{'as':_0x0a9e('0x170'),'through':'UserVoicePrefix'});db[_0x0a9e('0xf1')]['belongsToMany'](db[_0x0a9e('0x129')],{'through':'TeamVoicePrefix','as':_0x0a9e('0x155')});db[_0x0a9e('0xf2')][_0x0a9e('0x110')](db[_0x0a9e('0x11')],{'as':_0x0a9e('0x176'),'foreignKey':_0x0a9e('0x1f4')});db['UserProfile'][_0x0a9e('0x110')](db['UserProfileSection'],{'as':_0x0a9e('0x1f5'),'foreignKey':_0x0a9e('0x1f4'),'onDelete':_0x0a9e('0x10e')});db['UserProfileSection']['hasMany'](db['UserProfileResource'],{'as':_0x0a9e('0x1f6'),'foreignKey':_0x0a9e('0x1f7'),'onDelete':_0x0a9e('0x10e')});db[_0x0a9e('0xf7')][_0x0a9e('0x110')](db[_0x0a9e('0x167')],{'as':'Dispositions','foreignKey':_0x0a9e('0x1f8'),'onDelete':_0x0a9e('0x10e')});db[_0x0a9e('0xf7')][_0x0a9e('0x110')](db['CannedAnswer'],{'as':_0x0a9e('0x169'),'foreignKey':_0x0a9e('0x1f8')});db['WhatsappAccount'][_0x0a9e('0x110')](db[_0x0a9e('0xfd')],{'as':_0x0a9e('0x158'),'foreignKey':'WhatsappAccountId'});db[_0x0a9e('0xf7')]['hasMany'](db[_0x0a9e('0xfb')],{'as':'Interactions'});db[_0x0a9e('0xf7')][_0x0a9e('0x110')](db['WhatsappApplication'],{'as':_0x0a9e('0x147'),'foreignKey':_0x0a9e('0x1f8'),'onDelete':_0x0a9e('0x10e')});db['WhatsappAccount'][_0x0a9e('0x150')](db['CmList'],{'as':_0x0a9e('0x16c'),'foreignKey':_0x0a9e('0x16d')});db[_0x0a9e('0xf7')][_0x0a9e('0x150')](db[_0x0a9e('0x7d')],{'as':'mandatoryDispositionPause','foreignKey':_0x0a9e('0x154')});db[_0x0a9e('0xf7')][_0x0a9e('0x121')](db[_0x0a9e('0x11')],{'as':_0x0a9e('0x170'),'through':_0x0a9e('0x144')});db[_0x0a9e('0xf9')][_0x0a9e('0x150')](db[_0x0a9e('0x11')],{'onDelete':_0x0a9e('0x164')});db[_0x0a9e('0xf9')][_0x0a9e('0x150')](db[_0x0a9e('0x101')],{'onDelete':_0x0a9e('0x164')});db[_0x0a9e('0xf9')][_0x0a9e('0x150')](db['WhatsappAccount'],{'onDelete':_0x0a9e('0x164')});db['WhatsappApplication'][_0x0a9e('0x150')](db[_0x0a9e('0x17b')],{'onDelete':'restrict','foreignKey':_0x0a9e('0x153')});db[_0x0a9e('0xf9')]['belongsTo'](db[_0x0a9e('0x86')],{'onDelete':_0x0a9e('0x164'),'foreignKey':_0x0a9e('0x181')});db['WhatsappInteraction'][_0x0a9e('0x110')](db['WhatsappMessage'],{'as':'Messages','onDelete':'cascade','foreignKey':_0x0a9e('0x1f9')});db[_0x0a9e('0xfb')][_0x0a9e('0x150')](db[_0x0a9e('0xf7')],{'as':_0x0a9e('0x183'),'foreignKey':_0x0a9e('0x1f8')});db[_0x0a9e('0xfb')][_0x0a9e('0x150')](db[_0x0a9e('0x124')],{'as':_0x0a9e('0x160'),'foreignKey':_0x0a9e('0x172')});db[_0x0a9e('0xfb')][_0x0a9e('0x150')](db[_0x0a9e('0x11')],{'as':_0x0a9e('0x184'),'foreignKey':_0x0a9e('0x10f')});db[_0x0a9e('0xfb')][_0x0a9e('0x121')](db[_0x0a9e('0x86')],{'through':_0x0a9e('0x1b5'),'as':_0x0a9e('0x174')});db['WhatsappInteraction'][_0x0a9e('0x121')](db['Tag'],{'through':_0x0a9e('0x1b5'),'as':_0x0a9e('0x175')});db[_0x0a9e('0xfb')]['belongsToMany'](db[_0x0a9e('0x11')],{'as':_0x0a9e('0x176'),'through':_0x0a9e('0x130'),'foreignKey':'WhatsappInteractionId'});db[_0x0a9e('0xfd')][_0x0a9e('0x150')](db[_0x0a9e('0x11')],{'as':_0x0a9e('0x11')});db[_0x0a9e('0xfd')][_0x0a9e('0x150')](db[_0x0a9e('0x124')],{'onDelete':'cascade','as':_0x0a9e('0x160')});db[_0x0a9e('0xfd')][_0x0a9e('0x150')](db['WhatsappInteraction'],{'onDelete':'cascade','as':_0x0a9e('0x179'),'foreignKey':_0x0a9e('0x1f9')});db[_0x0a9e('0xfd')]['belongsTo'](db[_0x0a9e('0xf7')],{'as':_0x0a9e('0x183'),'foreignKey':_0x0a9e('0x1f8')});db[_0x0a9e('0xfe')][_0x0a9e('0x150')](db[_0x0a9e('0xf7')],{});db['WhatsappQueueReport'][_0x0a9e('0x150')](db[_0x0a9e('0x139')],{'as':_0x0a9e('0x16c'),'foreignKey':_0x0a9e('0x16d')});db[_0x0a9e('0xfe')][_0x0a9e('0x150')](db[_0x0a9e('0x124')],{'as':_0x0a9e('0x160'),'foreignKey':_0x0a9e('0x172')});db[_0x0a9e('0xfe')][_0x0a9e('0x150')](db['WhatsappInteraction'],{});db['WhatsappQueueReport']['belongsTo'](db[_0x0a9e('0x101')],{});db[_0x0a9e('0xfe')]['belongsTo'](db['WhatsappMessage'],{});db[_0x0a9e('0xfe')][_0x0a9e('0x150')](db['User'],{});db['WhatsappTransferReport'][_0x0a9e('0x150')](db[_0x0a9e('0xfd')],{});db['WhatsappTransferReport'][_0x0a9e('0x150')](db[_0x0a9e('0xfb')],{});db[_0x0a9e('0x1fa')]['belongsTo'](db['WhatsappAccount'],{'foreignKey':_0x0a9e('0x1fb'),'as':_0x0a9e('0x1e3')});db['WhatsappTransferReport']['belongsTo'](db[_0x0a9e('0xf7')],{'foreignKey':_0x0a9e('0x1fc'),'as':'ToAccount'});db[_0x0a9e('0x1fa')]['belongsTo'](db['WhatsappQueue'],{'foreignKey':_0x0a9e('0x1fd'),'as':_0x0a9e('0x1ef')});db['WhatsappTransferReport']['belongsTo'](db['User'],{'foreignKey':_0x0a9e('0x1ea'),'as':'FromAgent'});db[_0x0a9e('0x1fa')][_0x0a9e('0x150')](db['User'],{'foreignKey':'ToUserId','as':_0x0a9e('0x1e6')});db[_0x0a9e('0x101')][_0x0a9e('0x121')](db[_0x0a9e('0x11')],{'as':_0x0a9e('0x170'),'through':_0x0a9e('0x37'),'foreignKey':'WhatsappQueueId'});db[_0x0a9e('0x101')][_0x0a9e('0x121')](db[_0x0a9e('0x129')],{'through':_0x0a9e('0x1dd'),'as':'Teams'});db[_0x0a9e('0x1fe')][_0x0a9e('0x150')](db[_0x0a9e('0x11')],{'as':_0x0a9e('0x1ff'),'foreignKey':_0x0a9e('0x10f'),'onDelete':_0x0a9e('0x10e'),'hooks':!![]});db[_0x0a9e('0x103')][_0x0a9e('0x10b')](db['Dynamics365Account'],{'as':_0x0a9e('0xbe'),'onDelete':_0x0a9e('0x164')});db['CloudProvider'][_0x0a9e('0x10b')](db['MailServerIn'],{'as':'Imap','onDelete':_0x0a9e('0x164')});db['CloudProvider']['hasOne'](db['MailServerOut'],{'as':'Smtp','onDelete':_0x0a9e('0x164')});module['exports']={'db':db,'dbH':dbH}; \ No newline at end of file diff --git a/server/routes.js b/server/routes.js index a7ddd2b..28ec181 100644 --- a/server/routes.js +++ b/server/routes.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xfe44=['./api/contactItemType','/api/cm_contact_has_items','./api/cmContactHasItem','./api/cmHopperAdditionalPhone','/api/templates','./api/template','/api/triggers','./api/trigger','/api/variables','./api/variable','/api/integrations','./api/integration','./api/integrationReport','/api/analytics/custom_reports','./api/analyticDefaultReport','/api/analytics/extracted_reports','./api/analyticExtractedReport','/api/analytics/metrics','./api/analyticMetric','/api/analytics/field_reports','./api/analyticFieldReport','/api/analytics/tree_reports','./api/analyticTreeReport','/api/integrations/salesforce/accounts','./api/intSalesforceAccount','./api/intSalesforceConfiguration','/api/integrations/salesforce/fields','./api/intSalesforceField','/api/integrations/sugarcrm/accounts','./api/intSugarcrmAccount','/api/integrations/sugarcrm/fields','/api/integrations/desk/accounts','./api/intDeskAccount','/api/integrations/desk/configurations','./api/intDeskConfiguration','/api/integrations/desk/fields','./api/intZohoAccount','/api/integrations/zoho/configurations','/api/integrations/zoho/fields','./api/intZohoField','./api/intZendeskConfiguration','./api/intZendeskField','/api/integrations/freshdesk/accounts','./api/intFreshdeskAccount','/api/integrations/freshdesk/configurations','./api/intFreshdeskConfiguration','/api/integrations/freshdesk/fields','./api/intFreshdeskField','/api/integrations/vtiger/accounts','./api/intVtigerConfiguration','/api/integrations/vtiger/fields','/api/integrations/servicenow/accounts','/api/integrations/servicenow/fields','./api/intDynamics365Account','./api/intDynamics365Configuration','./api/intDynamics365Field','./api/intFreshsalesAccount','/api/integrations/freshsales/configurations','./api/intFreshsalesConfiguration','/api/integrations/freshsales/fields','./api/intFreshsalesField','/api/networks','./api/network','/api/chat/reports/queue','./api/chatQueueReport','/api/chat/internal/messages','./api/chatInternalMessage','./api/jscriptyAnswerReport','./api/jscriptyQuestionReport','/api/jscripty/sessions/reports','./api/jscriptySessionReport','/api/sms/reports/queue','/api/square/reports','./api/squareReport','/api/square/details/reports','./api/jscriptyProject','/api/square/odbc','./api/squareOdbc','/api/square/projects','./api/squareProject','/api/square/recordings','./api/squareRecording','/api/square/messages','./api/squareMessage','/api/teams','./api/team','./api/license','/api/campaigns','./api/campaign','/api/migrations','./api/migration','/api/attachments','./api/attachment','./api/plugin','/api/chat/reports/transfer','./api/chatTransferReport','/api/fax/reports/transfer','./api/faxTransferReport','/api/openchannel/reports/transfer','./api/openchannelTransferReport','./api/smsTransferReport','/api/cm/lists','./api/cmList','/api/userProfiles','./api/userProfile','/api/userProfile/sections','./api/userProfileSection','/api/userProfile/resources','./api/userProfileResource','/api/userNotifications','/api/whatsapp/accounts','./api/whatsappAccount','/api/whatsapp/applications','./api/whatsappApplication','/api/whatsapp/interactions','./api/whatsappInteraction','./api/whatsappMessage','/api/whatsapp/reports/queue','./api/whatsappQueueReport','/api/whatsapp/reports/transfer','./api/whatsappTransferReport','/api/whatsapp/queues','./api/whatsappQueue','/api/cloudProviders','./api/cloudProvider','/api/realtime','./api/realtime','./api/user-setting','./api/authLocal','/api/auth/google','/api/auth/activedirectory','/api/jira','/api/rpc','./api/rpc','/api/version','./api/version','/api/system','./api/system','/api/pm2','./api/pm2','/api/webbar','./api/webbar','/api/logs','/apidoc','static','join','root','/www','/demo','/snippet','snippet','3.2.0','/plugins','/server/files/plugins','route','/:url(api|auth|components|app|bower_components|assets)/*','sendFile','resolve','appPath','/index.html','path','express','./config/environment','./utils/client-side-logger','setupLoggers','./api/client-side-logs','default','then','use','/api/users','./api/user','/api/voice/chanspy','./api/voiceChanSpy','./api/voiceContext','/api/voice/extensions','/api/voice/mohs','./api/voiceMusicOnHold','/api/voice/queues','./api/voiceQueue','/api/voice/recordings','./api/voiceRecording','/api/screen/recordings','./api/voiceMail','./api/voiceMailMessage','/api/voice/calls/reports','./api/voiceCallReport','/api/voice/dials/reports','./api/voiceDialReport','/api/voice/agents/reports','/api/voice/queues/reports','/api/members/reports','./api/memberReport','./api/trunk','/api/voice/transfers/reports','./api/voiceTransferReport','/api/mail/out_servers','./api/mailServerOut','/api/mail/accounts','./api/mailAccount','/api/mail/queues','./api/mailQueue','./api/mailSubstatus','/api/mail/interactions','./api/mailInteraction','/api/mail/messages','./api/mailMessage','./api/mailApplication','/api/mail/reports/queue','./api/mailQueueReport','/api/dashboards','./api/dashboard','./api/dashboardItem','/api/fax/accounts','./api/faxAccount','/api/fax/applications','/api/fax/interactions','./api/faxInteraction','/api/fax/messages','./api/faxMessage','/api/fax/reports/queue','./api/faxQueueReport','/api/sms/accounts','./api/smsAccount','/api/sms/interactions','/api/sms/messages','./api/smsMessage','/api/sms/queues','./api/smsQueue','./api/openchannelAccount','/api/openchannel/applications','/api/openchannel/interactions','./api/openchannelInteraction','/api/openchannel/messages','./api/openchannelMessage','./api/openchannelQueue','/api/chat/websites','/api/openchannel/reports/queue','./api/openchannelQueueReport','/api/chat/applications','./api/chatApplication','/api/chat/interactions','./api/chatInteraction','./api/chatMessage','/api/chat/offline_messages','/api/chat/queues','./api/chatQueue','/api/chat/groups','./api/chatGroup','/api/chat/proactive_actions','./api/cmCompany','/api/cm/contacts','./api/cmContact','/api/cm/hopper','./api/cmHopper','/api/cm/hopper_black','./api/cmHopperBlack','/api/cm/hopper_final','./api/cmHopperFinal','/api/cm/hopper_history','./api/cmHopperHistory','./api/cmCustomField','./api/automation','/api/canned_answers','/api/dispositions','./api/disposition','./api/condition','./api/interval','/api/cdr','./api/cdr','/api/voiceQueuesLog','./api/voiceQueuesLog','/api/schedules','./api/schedule','/api/sounds','/api/tags','./api/tag','/api/contact_item_types'];(function(_0x4a9433,_0x5337cb){var _0x434947=function(_0x3ab6cd){while(--_0x3ab6cd){_0x4a9433['push'](_0x4a9433['shift']());}};_0x434947(++_0x5337cb);}(_0xfe44,0x1b5));var _0x4fe4=function(_0x38cbbd,_0x3a700c){_0x38cbbd=_0x38cbbd-0x0;var _0x904098=_0xfe44[_0x38cbbd];return _0x904098;};'use strict';var path=require(_0x4fe4('0x0'));var express=require(_0x4fe4('0x1'));var errors=require('./errors');var config=require(_0x4fe4('0x2'));var setupLoggers=require(_0x4fe4('0x3'))[_0x4fe4('0x4')];var clientSideLogs=require(_0x4fe4('0x5'));exports[_0x4fe4('0x6')]=function(_0x1d4afe){return setupLoggers(_0x1d4afe)[_0x4fe4('0x7')](function(){_0x1d4afe[_0x4fe4('0x8')](_0x4fe4('0x9'),require(_0x4fe4('0xa')));_0x1d4afe[_0x4fe4('0x8')](_0x4fe4('0xb'),require(_0x4fe4('0xc')));_0x1d4afe[_0x4fe4('0x8')]('/api/voice/contexts',require(_0x4fe4('0xd')));_0x1d4afe[_0x4fe4('0x8')](_0x4fe4('0xe'),require('./api/voiceExtension'));_0x1d4afe[_0x4fe4('0x8')](_0x4fe4('0xf'),require(_0x4fe4('0x10')));_0x1d4afe[_0x4fe4('0x8')](_0x4fe4('0x11'),require(_0x4fe4('0x12')));_0x1d4afe[_0x4fe4('0x8')](_0x4fe4('0x13'),require(_0x4fe4('0x14')));_0x1d4afe[_0x4fe4('0x8')](_0x4fe4('0x15'),require('./api/screenRecording'));_0x1d4afe[_0x4fe4('0x8')]('/api/voice/mails',require(_0x4fe4('0x16')));_0x1d4afe[_0x4fe4('0x8')]('/api/voice/mails/messages',require(_0x4fe4('0x17')));_0x1d4afe[_0x4fe4('0x8')](_0x4fe4('0x18'),require(_0x4fe4('0x19')));_0x1d4afe['use'](_0x4fe4('0x1a'),require(_0x4fe4('0x1b')));_0x1d4afe[_0x4fe4('0x8')](_0x4fe4('0x1c'),require('./api/voiceAgentReport'));_0x1d4afe['use'](_0x4fe4('0x1d'),require('./api/voiceQueueReport'));_0x1d4afe[_0x4fe4('0x8')](_0x4fe4('0x1e'),require(_0x4fe4('0x1f')));_0x1d4afe[_0x4fe4('0x8')]('/api/trunks',require(_0x4fe4('0x20')));_0x1d4afe[_0x4fe4('0x8')](_0x4fe4('0x21'),require(_0x4fe4('0x22')));_0x1d4afe[_0x4fe4('0x8')](_0x4fe4('0x23'),require(_0x4fe4('0x24')));_0x1d4afe[_0x4fe4('0x8')](_0x4fe4('0x25'),require(_0x4fe4('0x26')));_0x1d4afe['use'](_0x4fe4('0x27'),require(_0x4fe4('0x28')));_0x1d4afe[_0x4fe4('0x8')]('/api/mail/substatuses',require(_0x4fe4('0x29')));_0x1d4afe[_0x4fe4('0x8')](_0x4fe4('0x2a'),require(_0x4fe4('0x2b')));_0x1d4afe[_0x4fe4('0x8')](_0x4fe4('0x2c'),require(_0x4fe4('0x2d')));_0x1d4afe[_0x4fe4('0x8')]('/api/mail/applications',require(_0x4fe4('0x2e')));_0x1d4afe[_0x4fe4('0x8')](_0x4fe4('0x2f'),require(_0x4fe4('0x30')));_0x1d4afe[_0x4fe4('0x8')](_0x4fe4('0x31'),require(_0x4fe4('0x32')));_0x1d4afe[_0x4fe4('0x8')]('/api/dashboards/items',require(_0x4fe4('0x33')));_0x1d4afe['use'](_0x4fe4('0x34'),require(_0x4fe4('0x35')));_0x1d4afe[_0x4fe4('0x8')](_0x4fe4('0x36'),require('./api/faxApplication'));_0x1d4afe[_0x4fe4('0x8')](_0x4fe4('0x37'),require(_0x4fe4('0x38')));_0x1d4afe[_0x4fe4('0x8')](_0x4fe4('0x39'),require(_0x4fe4('0x3a')));_0x1d4afe[_0x4fe4('0x8')]('/api/fax/queues',require('./api/faxQueue'));_0x1d4afe['use'](_0x4fe4('0x3b'),require(_0x4fe4('0x3c')));_0x1d4afe['use'](_0x4fe4('0x3d'),require(_0x4fe4('0x3e')));_0x1d4afe['use']('/api/sms/applications',require('./api/smsApplication'));_0x1d4afe[_0x4fe4('0x8')](_0x4fe4('0x3f'),require('./api/smsInteraction'));_0x1d4afe[_0x4fe4('0x8')](_0x4fe4('0x40'),require(_0x4fe4('0x41')));_0x1d4afe[_0x4fe4('0x8')](_0x4fe4('0x42'),require(_0x4fe4('0x43')));_0x1d4afe[_0x4fe4('0x8')]('/api/openchannel/accounts',require(_0x4fe4('0x44')));_0x1d4afe[_0x4fe4('0x8')](_0x4fe4('0x45'),require('./api/openchannelApplication'));_0x1d4afe[_0x4fe4('0x8')](_0x4fe4('0x46'),require(_0x4fe4('0x47')));_0x1d4afe['use'](_0x4fe4('0x48'),require(_0x4fe4('0x49')));_0x1d4afe[_0x4fe4('0x8')]('/api/openchannel/queues',require(_0x4fe4('0x4a')));_0x1d4afe['use'](_0x4fe4('0x4b'),require('./api/chatWebsite'));_0x1d4afe[_0x4fe4('0x8')](_0x4fe4('0x4c'),require(_0x4fe4('0x4d')));_0x1d4afe[_0x4fe4('0x8')](_0x4fe4('0x4e'),require(_0x4fe4('0x4f')));_0x1d4afe[_0x4fe4('0x8')](_0x4fe4('0x50'),require(_0x4fe4('0x51')));_0x1d4afe['use']('/api/chat/messages',require(_0x4fe4('0x52')));_0x1d4afe[_0x4fe4('0x8')](_0x4fe4('0x53'),require('./api/chatOfflineMessage'));_0x1d4afe[_0x4fe4('0x8')](_0x4fe4('0x54'),require(_0x4fe4('0x55')));_0x1d4afe[_0x4fe4('0x8')](_0x4fe4('0x56'),require(_0x4fe4('0x57')));_0x1d4afe[_0x4fe4('0x8')](_0x4fe4('0x58'),require('./api/chatProactiveAction'));_0x1d4afe[_0x4fe4('0x8')]('/api/cm/companies',require(_0x4fe4('0x59')));_0x1d4afe['use'](_0x4fe4('0x5a'),require(_0x4fe4('0x5b')));_0x1d4afe[_0x4fe4('0x8')](_0x4fe4('0x5c'),require(_0x4fe4('0x5d')));_0x1d4afe[_0x4fe4('0x8')](_0x4fe4('0x5e'),require(_0x4fe4('0x5f')));_0x1d4afe[_0x4fe4('0x8')](_0x4fe4('0x60'),require(_0x4fe4('0x61')));_0x1d4afe[_0x4fe4('0x8')](_0x4fe4('0x62'),require(_0x4fe4('0x63')));_0x1d4afe[_0x4fe4('0x8')]('/api/cm/custom_fields',require(_0x4fe4('0x64')));_0x1d4afe['use']('/api/actions',require('./api/action'));_0x1d4afe[_0x4fe4('0x8')]('/api/automations',require(_0x4fe4('0x65')));_0x1d4afe[_0x4fe4('0x8')](_0x4fe4('0x66'),require('./api/cannedAnswer'));_0x1d4afe[_0x4fe4('0x8')](_0x4fe4('0x67'),require(_0x4fe4('0x68')));_0x1d4afe['use']('/api/conditions',require(_0x4fe4('0x69')));_0x1d4afe[_0x4fe4('0x8')]('/api/intervals',require(_0x4fe4('0x6a')));_0x1d4afe[_0x4fe4('0x8')]('/api/pauses',require('./api/pause'));_0x1d4afe[_0x4fe4('0x8')](_0x4fe4('0x6b'),require(_0x4fe4('0x6c')));_0x1d4afe[_0x4fe4('0x8')](_0x4fe4('0x6d'),require(_0x4fe4('0x6e')));_0x1d4afe[_0x4fe4('0x8')](_0x4fe4('0x6f'),require(_0x4fe4('0x70')));_0x1d4afe[_0x4fe4('0x8')](_0x4fe4('0x71'),require('./api/sound'));_0x1d4afe[_0x4fe4('0x8')](_0x4fe4('0x72'),require(_0x4fe4('0x73')));_0x1d4afe[_0x4fe4('0x8')](_0x4fe4('0x74'),require(_0x4fe4('0x75')));_0x1d4afe[_0x4fe4('0x8')](_0x4fe4('0x76'),require(_0x4fe4('0x77')));_0x1d4afe[_0x4fe4('0x8')]('/api/cm_hopper_additional_phones',require(_0x4fe4('0x78')));_0x1d4afe['use'](_0x4fe4('0x79'),require(_0x4fe4('0x7a')));_0x1d4afe['use'](_0x4fe4('0x7b'),require(_0x4fe4('0x7c')));_0x1d4afe[_0x4fe4('0x8')](_0x4fe4('0x7d'),require(_0x4fe4('0x7e')));_0x1d4afe[_0x4fe4('0x8')](_0x4fe4('0x7f'),require(_0x4fe4('0x80')));_0x1d4afe[_0x4fe4('0x8')]('/api/integrations/reports',require(_0x4fe4('0x81')));_0x1d4afe[_0x4fe4('0x8')](_0x4fe4('0x82'),require('./api/analyticCustomReport'));_0x1d4afe['use']('/api/analytics/default_reports',require(_0x4fe4('0x83')));_0x1d4afe[_0x4fe4('0x8')](_0x4fe4('0x84'),require(_0x4fe4('0x85')));_0x1d4afe['use'](_0x4fe4('0x86'),require(_0x4fe4('0x87')));_0x1d4afe['use'](_0x4fe4('0x88'),require(_0x4fe4('0x89')));_0x1d4afe['use'](_0x4fe4('0x8a'),require(_0x4fe4('0x8b')));_0x1d4afe[_0x4fe4('0x8')](_0x4fe4('0x8c'),require(_0x4fe4('0x8d')));_0x1d4afe[_0x4fe4('0x8')]('/api/integrations/salesforce/configurations',require(_0x4fe4('0x8e')));_0x1d4afe[_0x4fe4('0x8')](_0x4fe4('0x8f'),require(_0x4fe4('0x90')));_0x1d4afe[_0x4fe4('0x8')](_0x4fe4('0x91'),require(_0x4fe4('0x92')));_0x1d4afe[_0x4fe4('0x8')]('/api/integrations/sugarcrm/configurations',require('./api/intSugarcrmConfiguration'));_0x1d4afe['use'](_0x4fe4('0x93'),require('./api/intSugarcrmField'));_0x1d4afe[_0x4fe4('0x8')](_0x4fe4('0x94'),require(_0x4fe4('0x95')));_0x1d4afe[_0x4fe4('0x8')](_0x4fe4('0x96'),require(_0x4fe4('0x97')));_0x1d4afe[_0x4fe4('0x8')](_0x4fe4('0x98'),require('./api/intDeskField'));_0x1d4afe['use']('/api/integrations/zoho/accounts',require(_0x4fe4('0x99')));_0x1d4afe[_0x4fe4('0x8')](_0x4fe4('0x9a'),require('./api/intZohoConfiguration'));_0x1d4afe[_0x4fe4('0x8')](_0x4fe4('0x9b'),require(_0x4fe4('0x9c')));_0x1d4afe['use']('/api/integrations/zendesk/accounts',require('./api/intZendeskAccount'));_0x1d4afe['use']('/api/integrations/zendesk/configurations',require(_0x4fe4('0x9d')));_0x1d4afe[_0x4fe4('0x8')]('/api/integrations/zendesk/fields',require(_0x4fe4('0x9e')));_0x1d4afe[_0x4fe4('0x8')](_0x4fe4('0x9f'),require(_0x4fe4('0xa0')));_0x1d4afe[_0x4fe4('0x8')](_0x4fe4('0xa1'),require(_0x4fe4('0xa2')));_0x1d4afe[_0x4fe4('0x8')](_0x4fe4('0xa3'),require(_0x4fe4('0xa4')));_0x1d4afe[_0x4fe4('0x8')](_0x4fe4('0xa5'),require('./api/intVtigerAccount'));_0x1d4afe[_0x4fe4('0x8')]('/api/integrations/vtiger/configurations',require(_0x4fe4('0xa6')));_0x1d4afe[_0x4fe4('0x8')](_0x4fe4('0xa7'),require('./api/intVtigerField'));_0x1d4afe[_0x4fe4('0x8')](_0x4fe4('0xa8'),require('./api/intServicenowAccount'));_0x1d4afe[_0x4fe4('0x8')]('/api/integrations/servicenow/configurations',require('./api/intServicenowConfiguration'));_0x1d4afe[_0x4fe4('0x8')](_0x4fe4('0xa9'),require('./api/intServicenowField'));_0x1d4afe['use']('/api/integrations/dynamics365/accounts',require(_0x4fe4('0xaa')));_0x1d4afe[_0x4fe4('0x8')]('/api/integrations/dynamics365/configurations',require(_0x4fe4('0xab')));_0x1d4afe[_0x4fe4('0x8')]('/api/integrations/dynamics365/fields',require(_0x4fe4('0xac')));_0x1d4afe[_0x4fe4('0x8')]('/api/integrations/freshsales/accounts',require(_0x4fe4('0xad')));_0x1d4afe[_0x4fe4('0x8')](_0x4fe4('0xae'),require(_0x4fe4('0xaf')));_0x1d4afe[_0x4fe4('0x8')](_0x4fe4('0xb0'),require(_0x4fe4('0xb1')));_0x1d4afe['use'](_0x4fe4('0xb2'),require(_0x4fe4('0xb3')));_0x1d4afe[_0x4fe4('0x8')](_0x4fe4('0xb4'),require(_0x4fe4('0xb5')));_0x1d4afe[_0x4fe4('0x8')](_0x4fe4('0xb6'),require(_0x4fe4('0xb7')));_0x1d4afe['use']('/api/jscripty/answers/reports',require(_0x4fe4('0xb8')));_0x1d4afe[_0x4fe4('0x8')]('/api/jscripty/questions/reports',require(_0x4fe4('0xb9')));_0x1d4afe[_0x4fe4('0x8')](_0x4fe4('0xba'),require(_0x4fe4('0xbb')));_0x1d4afe[_0x4fe4('0x8')](_0x4fe4('0xbc'),require('./api/smsQueueReport'));_0x1d4afe[_0x4fe4('0x8')](_0x4fe4('0xbd'),require(_0x4fe4('0xbe')));_0x1d4afe[_0x4fe4('0x8')](_0x4fe4('0xbf'),require('./api/squareReportDetail'));_0x1d4afe[_0x4fe4('0x8')]('/api/jscripty/projects',require(_0x4fe4('0xc0')));_0x1d4afe[_0x4fe4('0x8')]('/api/settings',require('./api/setting'));_0x1d4afe[_0x4fe4('0x8')](_0x4fe4('0xc1'),require(_0x4fe4('0xc2')));_0x1d4afe['use'](_0x4fe4('0xc3'),require(_0x4fe4('0xc4')));_0x1d4afe[_0x4fe4('0x8')](_0x4fe4('0xc5'),require(_0x4fe4('0xc6')));_0x1d4afe['use'](_0x4fe4('0xc7'),require(_0x4fe4('0xc8')));_0x1d4afe['use'](_0x4fe4('0xc9'),require(_0x4fe4('0xca')));_0x1d4afe[_0x4fe4('0x8')]('/api/license',require(_0x4fe4('0xcb')));_0x1d4afe[_0x4fe4('0x8')](_0x4fe4('0xcc'),require(_0x4fe4('0xcd')));_0x1d4afe['use'](_0x4fe4('0xce'),require(_0x4fe4('0xcf')));_0x1d4afe[_0x4fe4('0x8')](_0x4fe4('0xd0'),require(_0x4fe4('0xd1')));_0x1d4afe[_0x4fe4('0x8')]('/api/plugins',require(_0x4fe4('0xd2')));_0x1d4afe['use']('/api/mail/reports/transfer',require('./api/mailTransferReport'));_0x1d4afe['use'](_0x4fe4('0xd3'),require(_0x4fe4('0xd4')));_0x1d4afe[_0x4fe4('0x8')](_0x4fe4('0xd5'),require(_0x4fe4('0xd6')));_0x1d4afe['use'](_0x4fe4('0xd7'),require(_0x4fe4('0xd8')));_0x1d4afe[_0x4fe4('0x8')]('/api/sms/reports/transfer',require(_0x4fe4('0xd9')));_0x1d4afe['use'](_0x4fe4('0xda'),require(_0x4fe4('0xdb')));_0x1d4afe['use']('/api/voice/prefixes',require('./api/voicePrefix'));_0x1d4afe[_0x4fe4('0x8')](_0x4fe4('0xdc'),require(_0x4fe4('0xdd')));_0x1d4afe['use'](_0x4fe4('0xde'),require(_0x4fe4('0xdf')));_0x1d4afe['use'](_0x4fe4('0xe0'),require(_0x4fe4('0xe1')));_0x1d4afe['use'](_0x4fe4('0xe2'),require('./api/userNotification'));_0x1d4afe['use'](_0x4fe4('0xe3'),require(_0x4fe4('0xe4')));_0x1d4afe[_0x4fe4('0x8')](_0x4fe4('0xe5'),require(_0x4fe4('0xe6')));_0x1d4afe[_0x4fe4('0x8')](_0x4fe4('0xe7'),require(_0x4fe4('0xe8')));_0x1d4afe['use']('/api/whatsapp/messages',require(_0x4fe4('0xe9')));_0x1d4afe[_0x4fe4('0x8')](_0x4fe4('0xea'),require(_0x4fe4('0xeb')));_0x1d4afe[_0x4fe4('0x8')](_0x4fe4('0xec'),require(_0x4fe4('0xed')));_0x1d4afe[_0x4fe4('0x8')](_0x4fe4('0xee'),require(_0x4fe4('0xef')));_0x1d4afe['use'](_0x4fe4('0xf0'),require(_0x4fe4('0xf1')));_0x1d4afe[_0x4fe4('0x8')](_0x4fe4('0xf2'),require(_0x4fe4('0xf3')));_0x1d4afe[_0x4fe4('0x8')]('/api/user-settings',require(_0x4fe4('0xf4')));_0x1d4afe[_0x4fe4('0x8')]('/api/auth/local',require(_0x4fe4('0xf5')));_0x1d4afe['use'](_0x4fe4('0xf6'),require('./api/authGoogle'));_0x1d4afe[_0x4fe4('0x8')](_0x4fe4('0xf7'),require('./api/authActiveDirectory'));_0x1d4afe[_0x4fe4('0x8')](_0x4fe4('0xf8'),require('./api/jira'));_0x1d4afe['use'](_0x4fe4('0xf9'),require(_0x4fe4('0xfa')));_0x1d4afe[_0x4fe4('0x8')](_0x4fe4('0xfb'),require(_0x4fe4('0xfc')));_0x1d4afe['use'](_0x4fe4('0xfd'),require(_0x4fe4('0xfe')));_0x1d4afe[_0x4fe4('0x8')](_0x4fe4('0xff'),require(_0x4fe4('0x100')));_0x1d4afe[_0x4fe4('0x8')](_0x4fe4('0x101'),require(_0x4fe4('0x102')));_0x1d4afe[_0x4fe4('0x8')](_0x4fe4('0x103'),clientSideLogs);_0x1d4afe['use'](_0x4fe4('0x104'),express[_0x4fe4('0x105')](path[_0x4fe4('0x106')](config[_0x4fe4('0x107')],'/apidoc')));_0x1d4afe['use'](_0x4fe4('0x108'),express[_0x4fe4('0x105')](path['join'](config[_0x4fe4('0x107')],_0x4fe4('0x108'))));_0x1d4afe[_0x4fe4('0x8')](_0x4fe4('0x109'),express[_0x4fe4('0x105')](path[_0x4fe4('0x106')](config[_0x4fe4('0x107')],'/demo')));_0x1d4afe[_0x4fe4('0x8')](_0x4fe4('0x10a'),express['static'](path[_0x4fe4('0x106')](config[_0x4fe4('0x107')],_0x4fe4('0x10b'),_0x4fe4('0x10c'))));_0x1d4afe[_0x4fe4('0x8')](_0x4fe4('0x10d'),express[_0x4fe4('0x105')](path['join'](config[_0x4fe4('0x107')],_0x4fe4('0x10e'))));_0x1d4afe[_0x4fe4('0x10f')](_0x4fe4('0x110'))['get'](errors[0x194]);_0x1d4afe['route']('/*')['get'](function(_0x562338,_0x29902b){_0x29902b[_0x4fe4('0x111')](path[_0x4fe4('0x112')](_0x1d4afe['get'](_0x4fe4('0x113'))+_0x4fe4('0x114')));});return _0x1d4afe;});}; \ No newline at end of file +var _0xbf1d=['./api/voiceMusicOnHold','/api/voice/queues','./api/voiceQueue','/api/voice/recordings','./api/voiceRecording','/api/screen/recordings','/api/voice/mails','./api/voiceMail','/api/voice/mails/messages','./api/voiceMailMessage','/api/voice/calls/reports','./api/voiceCallReport','/api/voice/agents/reports','./api/voiceAgentReport','/api/voice/queues/reports','./api/voiceQueueReport','/api/members/reports','/api/trunks','./api/trunk','/api/voice/transfers/reports','/api/mail/out_servers','/api/mail/accounts','/api/mail/queues','./api/mailQueue','./api/mailSubstatus','/api/mail/interactions','./api/mailInteraction','/api/mail/messages','/api/mail/applications','./api/mailApplication','/api/mail/reports/queue','./api/mailQueueReport','./api/dashboard','./api/dashboardItem','/api/fax/accounts','./api/faxAccount','/api/fax/applications','./api/faxApplication','./api/faxInteraction','/api/fax/messages','./api/faxMessage','/api/fax/queues','./api/faxQueue','/api/fax/reports/queue','./api/faxQueueReport','/api/sms/accounts','./api/smsAccount','/api/sms/applications','/api/sms/interactions','./api/smsMessage','/api/sms/queues','/api/openchannel/accounts','./api/openchannelAccount','/api/openchannel/applications','./api/openchannelApplication','./api/openchannelInteraction','/api/openchannel/messages','./api/openchannelMessage','./api/openchannelQueue','/api/chat/websites','./api/chatWebsite','/api/openchannel/reports/queue','./api/openchannelQueueReport','/api/chat/applications','/api/chat/messages','./api/chatOfflineMessage','/api/chat/groups','./api/chatGroup','/api/chat/proactive_actions','./api/chatProactiveAction','/api/cm/companies','/api/cm/contacts','./api/cmHopper','/api/cm/hopper_black','/api/cm/hopper_final','/api/cm/hopper_history','./api/cmHopperHistory','/api/cm/custom_fields','/api/actions','./api/action','/api/automations','./api/automation','/api/canned_answers','./api/cannedAnswer','/api/dispositions','./api/disposition','./api/condition','/api/intervals','./api/interval','/api/pauses','./api/pause','./api/cdr','./api/voiceQueuesLog','/api/schedules','./api/schedule','./api/sound','./api/tag','/api/contact_item_types','./api/contactItemType','/api/cm_contact_has_items','./api/cmContactHasItem','/api/cm_hopper_additional_phones','./api/cmHopperAdditionalPhone','/api/templates','./api/template','/api/integrations','./api/integration','/api/integrations/reports','./api/integrationReport','/api/analytics/custom_reports','/api/analytics/default_reports','./api/analyticDefaultReport','/api/analytics/extracted_reports','/api/analytics/metrics','/api/analytics/field_reports','./api/analyticFieldReport','/api/analytics/tree_reports','./api/analyticTreeReport','/api/integrations/salesforce/accounts','./api/intSalesforceAccount','/api/integrations/salesforce/configurations','/api/integrations/salesforce/fields','/api/integrations/sugarcrm/accounts','./api/intSugarcrmAccount','./api/intSugarcrmConfiguration','/api/integrations/sugarcrm/fields','./api/intSugarcrmField','/api/integrations/desk/accounts','./api/intDeskAccount','/api/integrations/desk/configurations','/api/integrations/desk/fields','./api/intDeskField','/api/integrations/zoho/accounts','./api/intZohoAccount','/api/integrations/zoho/configurations','./api/intZohoConfiguration','./api/intZohoField','/api/integrations/zendesk/accounts','./api/intZendeskAccount','/api/integrations/zendesk/configurations','/api/integrations/zendesk/fields','/api/integrations/freshdesk/accounts','./api/intFreshdeskAccount','/api/integrations/freshdesk/configurations','./api/intFreshdeskConfiguration','./api/intFreshdeskField','/api/integrations/vtiger/accounts','/api/integrations/vtiger/configurations','./api/intVtigerConfiguration','/api/integrations/vtiger/fields','./api/intVtigerField','/api/integrations/servicenow/configurations','./api/intServicenowConfiguration','/api/integrations/servicenow/fields','./api/intServicenowField','./api/intDynamics365Account','/api/integrations/dynamics365/configurations','/api/integrations/freshsales/accounts','/api/integrations/freshsales/configurations','./api/intFreshsalesField','/api/networks','./api/network','/api/chat/reports/queue','./api/chatQueueReport','/api/chat/internal/messages','./api/chatInternalMessage','/api/jscripty/answers/reports','./api/jscriptyAnswerReport','./api/jscriptyQuestionReport','/api/jscripty/sessions/reports','/api/sms/reports/queue','./api/smsQueueReport','/api/square/reports','./api/squareReport','/api/square/details/reports','/api/jscripty/projects','/api/square/odbc','/api/square/projects','/api/square/recordings','./api/squareRecording','/api/square/messages','./api/squareMessage','/api/teams','/api/campaigns','./api/campaign','/api/migrations','/api/attachments','./api/attachment','/api/plugins','./api/plugin','/api/mail/reports/transfer','/api/chat/reports/transfer','./api/chatTransferReport','/api/fax/reports/transfer','./api/faxTransferReport','./api/openchannelTransferReport','/api/sms/reports/transfer','/api/cm/lists','./api/cmList','/api/voice/prefixes','./api/voicePrefix','/api/userProfiles','/api/userProfile/sections','./api/userProfileSection','/api/userProfile/resources','./api/userProfileResource','/api/userNotifications','./api/userNotification','/api/whatsapp/accounts','./api/whatsappAccount','./api/whatsappApplication','/api/whatsapp/interactions','./api/whatsappInteraction','/api/whatsapp/messages','./api/whatsappMessage','/api/whatsapp/reports/queue','./api/whatsappQueueReport','/api/whatsapp/reports/transfer','/api/whatsapp/queues','./api/whatsappQueue','/api/cloudProviders','./api/cloudProvider','./api/realtime','./api/authLocal','./api/authGoogle','/api/auth/activedirectory','/api/jira','./api/jira','/api/rpc','./api/version','/api/system','./api/system','/api/pm2','./api/webbar','/api/logs','/apidoc','static','join','root','/www','/demo','/snippet','/plugins','route','get','sendFile','resolve','appPath','/index.html','path','express','./errors','./config/environment','then','./api/user','use','/api/voice/contexts','./api/voiceContext','/api/voice/extensions','./api/voiceExtension','/api/voice/mohs'];(function(_0xbca1b1,_0x33f0ce){var _0x4e1686=function(_0x58a80c){while(--_0x58a80c){_0xbca1b1['push'](_0xbca1b1['shift']());}};_0x4e1686(++_0x33f0ce);}(_0xbf1d,0xf9));var _0xdbf1=function(_0x222378,_0x27b379){_0x222378=_0x222378-0x0;var _0x45f2d4=_0xbf1d[_0x222378];return _0x45f2d4;};'use strict';var path=require(_0xdbf1('0x0'));var express=require(_0xdbf1('0x1'));var errors=require(_0xdbf1('0x2'));var config=require(_0xdbf1('0x3'));var setupLoggers=require('./utils/client-side-logger')['setupLoggers'];var clientSideLogs=require('./api/client-side-logs');exports['default']=function(_0x1151eb){return setupLoggers(_0x1151eb)[_0xdbf1('0x4')](function(){_0x1151eb['use']('/api/users',require(_0xdbf1('0x5')));_0x1151eb[_0xdbf1('0x6')]('/api/voice/chanspy',require('./api/voiceChanSpy'));_0x1151eb[_0xdbf1('0x6')](_0xdbf1('0x7'),require(_0xdbf1('0x8')));_0x1151eb['use'](_0xdbf1('0x9'),require(_0xdbf1('0xa')));_0x1151eb[_0xdbf1('0x6')](_0xdbf1('0xb'),require(_0xdbf1('0xc')));_0x1151eb[_0xdbf1('0x6')](_0xdbf1('0xd'),require(_0xdbf1('0xe')));_0x1151eb[_0xdbf1('0x6')](_0xdbf1('0xf'),require(_0xdbf1('0x10')));_0x1151eb[_0xdbf1('0x6')](_0xdbf1('0x11'),require('./api/screenRecording'));_0x1151eb['use'](_0xdbf1('0x12'),require(_0xdbf1('0x13')));_0x1151eb[_0xdbf1('0x6')](_0xdbf1('0x14'),require(_0xdbf1('0x15')));_0x1151eb[_0xdbf1('0x6')](_0xdbf1('0x16'),require(_0xdbf1('0x17')));_0x1151eb[_0xdbf1('0x6')]('/api/voice/dials/reports',require('./api/voiceDialReport'));_0x1151eb[_0xdbf1('0x6')](_0xdbf1('0x18'),require(_0xdbf1('0x19')));_0x1151eb[_0xdbf1('0x6')](_0xdbf1('0x1a'),require(_0xdbf1('0x1b')));_0x1151eb[_0xdbf1('0x6')](_0xdbf1('0x1c'),require('./api/memberReport'));_0x1151eb[_0xdbf1('0x6')](_0xdbf1('0x1d'),require(_0xdbf1('0x1e')));_0x1151eb['use'](_0xdbf1('0x1f'),require('./api/voiceTransferReport'));_0x1151eb['use'](_0xdbf1('0x20'),require('./api/mailServerOut'));_0x1151eb[_0xdbf1('0x6')](_0xdbf1('0x21'),require('./api/mailAccount'));_0x1151eb[_0xdbf1('0x6')](_0xdbf1('0x22'),require(_0xdbf1('0x23')));_0x1151eb[_0xdbf1('0x6')]('/api/mail/substatuses',require(_0xdbf1('0x24')));_0x1151eb[_0xdbf1('0x6')](_0xdbf1('0x25'),require(_0xdbf1('0x26')));_0x1151eb[_0xdbf1('0x6')](_0xdbf1('0x27'),require('./api/mailMessage'));_0x1151eb[_0xdbf1('0x6')](_0xdbf1('0x28'),require(_0xdbf1('0x29')));_0x1151eb[_0xdbf1('0x6')](_0xdbf1('0x2a'),require(_0xdbf1('0x2b')));_0x1151eb[_0xdbf1('0x6')]('/api/dashboards',require(_0xdbf1('0x2c')));_0x1151eb[_0xdbf1('0x6')]('/api/dashboards/items',require(_0xdbf1('0x2d')));_0x1151eb[_0xdbf1('0x6')](_0xdbf1('0x2e'),require(_0xdbf1('0x2f')));_0x1151eb[_0xdbf1('0x6')](_0xdbf1('0x30'),require(_0xdbf1('0x31')));_0x1151eb[_0xdbf1('0x6')]('/api/fax/interactions',require(_0xdbf1('0x32')));_0x1151eb[_0xdbf1('0x6')](_0xdbf1('0x33'),require(_0xdbf1('0x34')));_0x1151eb[_0xdbf1('0x6')](_0xdbf1('0x35'),require(_0xdbf1('0x36')));_0x1151eb[_0xdbf1('0x6')](_0xdbf1('0x37'),require(_0xdbf1('0x38')));_0x1151eb[_0xdbf1('0x6')](_0xdbf1('0x39'),require(_0xdbf1('0x3a')));_0x1151eb['use'](_0xdbf1('0x3b'),require('./api/smsApplication'));_0x1151eb[_0xdbf1('0x6')](_0xdbf1('0x3c'),require('./api/smsInteraction'));_0x1151eb[_0xdbf1('0x6')]('/api/sms/messages',require(_0xdbf1('0x3d')));_0x1151eb[_0xdbf1('0x6')](_0xdbf1('0x3e'),require('./api/smsQueue'));_0x1151eb[_0xdbf1('0x6')](_0xdbf1('0x3f'),require(_0xdbf1('0x40')));_0x1151eb[_0xdbf1('0x6')](_0xdbf1('0x41'),require(_0xdbf1('0x42')));_0x1151eb['use']('/api/openchannel/interactions',require(_0xdbf1('0x43')));_0x1151eb[_0xdbf1('0x6')](_0xdbf1('0x44'),require(_0xdbf1('0x45')));_0x1151eb[_0xdbf1('0x6')]('/api/openchannel/queues',require(_0xdbf1('0x46')));_0x1151eb['use'](_0xdbf1('0x47'),require(_0xdbf1('0x48')));_0x1151eb[_0xdbf1('0x6')](_0xdbf1('0x49'),require(_0xdbf1('0x4a')));_0x1151eb['use'](_0xdbf1('0x4b'),require('./api/chatApplication'));_0x1151eb[_0xdbf1('0x6')]('/api/chat/interactions',require('./api/chatInteraction'));_0x1151eb[_0xdbf1('0x6')](_0xdbf1('0x4c'),require('./api/chatMessage'));_0x1151eb[_0xdbf1('0x6')]('/api/chat/offline_messages',require(_0xdbf1('0x4d')));_0x1151eb[_0xdbf1('0x6')]('/api/chat/queues',require('./api/chatQueue'));_0x1151eb[_0xdbf1('0x6')](_0xdbf1('0x4e'),require(_0xdbf1('0x4f')));_0x1151eb['use'](_0xdbf1('0x50'),require(_0xdbf1('0x51')));_0x1151eb['use'](_0xdbf1('0x52'),require('./api/cmCompany'));_0x1151eb['use'](_0xdbf1('0x53'),require('./api/cmContact'));_0x1151eb[_0xdbf1('0x6')]('/api/cm/hopper',require(_0xdbf1('0x54')));_0x1151eb[_0xdbf1('0x6')](_0xdbf1('0x55'),require('./api/cmHopperBlack'));_0x1151eb[_0xdbf1('0x6')](_0xdbf1('0x56'),require('./api/cmHopperFinal'));_0x1151eb[_0xdbf1('0x6')](_0xdbf1('0x57'),require(_0xdbf1('0x58')));_0x1151eb['use'](_0xdbf1('0x59'),require('./api/cmCustomField'));_0x1151eb[_0xdbf1('0x6')](_0xdbf1('0x5a'),require(_0xdbf1('0x5b')));_0x1151eb[_0xdbf1('0x6')](_0xdbf1('0x5c'),require(_0xdbf1('0x5d')));_0x1151eb[_0xdbf1('0x6')](_0xdbf1('0x5e'),require(_0xdbf1('0x5f')));_0x1151eb['use'](_0xdbf1('0x60'),require(_0xdbf1('0x61')));_0x1151eb[_0xdbf1('0x6')]('/api/conditions',require(_0xdbf1('0x62')));_0x1151eb[_0xdbf1('0x6')](_0xdbf1('0x63'),require(_0xdbf1('0x64')));_0x1151eb[_0xdbf1('0x6')](_0xdbf1('0x65'),require(_0xdbf1('0x66')));_0x1151eb[_0xdbf1('0x6')]('/api/cdr',require(_0xdbf1('0x67')));_0x1151eb[_0xdbf1('0x6')]('/api/voiceQueuesLog',require(_0xdbf1('0x68')));_0x1151eb[_0xdbf1('0x6')](_0xdbf1('0x69'),require(_0xdbf1('0x6a')));_0x1151eb[_0xdbf1('0x6')]('/api/sounds',require(_0xdbf1('0x6b')));_0x1151eb[_0xdbf1('0x6')]('/api/tags',require(_0xdbf1('0x6c')));_0x1151eb[_0xdbf1('0x6')](_0xdbf1('0x6d'),require(_0xdbf1('0x6e')));_0x1151eb[_0xdbf1('0x6')](_0xdbf1('0x6f'),require(_0xdbf1('0x70')));_0x1151eb[_0xdbf1('0x6')](_0xdbf1('0x71'),require(_0xdbf1('0x72')));_0x1151eb[_0xdbf1('0x6')](_0xdbf1('0x73'),require(_0xdbf1('0x74')));_0x1151eb[_0xdbf1('0x6')]('/api/triggers',require('./api/trigger'));_0x1151eb[_0xdbf1('0x6')]('/api/variables',require('./api/variable'));_0x1151eb['use'](_0xdbf1('0x75'),require(_0xdbf1('0x76')));_0x1151eb[_0xdbf1('0x6')](_0xdbf1('0x77'),require(_0xdbf1('0x78')));_0x1151eb[_0xdbf1('0x6')](_0xdbf1('0x79'),require('./api/analyticCustomReport'));_0x1151eb[_0xdbf1('0x6')](_0xdbf1('0x7a'),require(_0xdbf1('0x7b')));_0x1151eb['use'](_0xdbf1('0x7c'),require('./api/analyticExtractedReport'));_0x1151eb['use'](_0xdbf1('0x7d'),require('./api/analyticMetric'));_0x1151eb[_0xdbf1('0x6')](_0xdbf1('0x7e'),require(_0xdbf1('0x7f')));_0x1151eb['use'](_0xdbf1('0x80'),require(_0xdbf1('0x81')));_0x1151eb['use'](_0xdbf1('0x82'),require(_0xdbf1('0x83')));_0x1151eb[_0xdbf1('0x6')](_0xdbf1('0x84'),require('./api/intSalesforceConfiguration'));_0x1151eb[_0xdbf1('0x6')](_0xdbf1('0x85'),require('./api/intSalesforceField'));_0x1151eb[_0xdbf1('0x6')](_0xdbf1('0x86'),require(_0xdbf1('0x87')));_0x1151eb['use']('/api/integrations/sugarcrm/configurations',require(_0xdbf1('0x88')));_0x1151eb[_0xdbf1('0x6')](_0xdbf1('0x89'),require(_0xdbf1('0x8a')));_0x1151eb[_0xdbf1('0x6')](_0xdbf1('0x8b'),require(_0xdbf1('0x8c')));_0x1151eb[_0xdbf1('0x6')](_0xdbf1('0x8d'),require('./api/intDeskConfiguration'));_0x1151eb['use'](_0xdbf1('0x8e'),require(_0xdbf1('0x8f')));_0x1151eb[_0xdbf1('0x6')](_0xdbf1('0x90'),require(_0xdbf1('0x91')));_0x1151eb[_0xdbf1('0x6')](_0xdbf1('0x92'),require(_0xdbf1('0x93')));_0x1151eb[_0xdbf1('0x6')]('/api/integrations/zoho/fields',require(_0xdbf1('0x94')));_0x1151eb[_0xdbf1('0x6')](_0xdbf1('0x95'),require(_0xdbf1('0x96')));_0x1151eb[_0xdbf1('0x6')](_0xdbf1('0x97'),require('./api/intZendeskConfiguration'));_0x1151eb[_0xdbf1('0x6')](_0xdbf1('0x98'),require('./api/intZendeskField'));_0x1151eb[_0xdbf1('0x6')](_0xdbf1('0x99'),require(_0xdbf1('0x9a')));_0x1151eb['use'](_0xdbf1('0x9b'),require(_0xdbf1('0x9c')));_0x1151eb[_0xdbf1('0x6')]('/api/integrations/freshdesk/fields',require(_0xdbf1('0x9d')));_0x1151eb[_0xdbf1('0x6')](_0xdbf1('0x9e'),require('./api/intVtigerAccount'));_0x1151eb[_0xdbf1('0x6')](_0xdbf1('0x9f'),require(_0xdbf1('0xa0')));_0x1151eb['use'](_0xdbf1('0xa1'),require(_0xdbf1('0xa2')));_0x1151eb[_0xdbf1('0x6')]('/api/integrations/servicenow/accounts',require('./api/intServicenowAccount'));_0x1151eb[_0xdbf1('0x6')](_0xdbf1('0xa3'),require(_0xdbf1('0xa4')));_0x1151eb[_0xdbf1('0x6')](_0xdbf1('0xa5'),require(_0xdbf1('0xa6')));_0x1151eb[_0xdbf1('0x6')]('/api/integrations/dynamics365/accounts',require(_0xdbf1('0xa7')));_0x1151eb['use'](_0xdbf1('0xa8'),require('./api/intDynamics365Configuration'));_0x1151eb[_0xdbf1('0x6')]('/api/integrations/dynamics365/fields',require('./api/intDynamics365Field'));_0x1151eb[_0xdbf1('0x6')](_0xdbf1('0xa9'),require('./api/intFreshsalesAccount'));_0x1151eb[_0xdbf1('0x6')](_0xdbf1('0xaa'),require('./api/intFreshsalesConfiguration'));_0x1151eb[_0xdbf1('0x6')]('/api/integrations/freshsales/fields',require(_0xdbf1('0xab')));_0x1151eb[_0xdbf1('0x6')](_0xdbf1('0xac'),require(_0xdbf1('0xad')));_0x1151eb['use'](_0xdbf1('0xae'),require(_0xdbf1('0xaf')));_0x1151eb[_0xdbf1('0x6')](_0xdbf1('0xb0'),require(_0xdbf1('0xb1')));_0x1151eb[_0xdbf1('0x6')](_0xdbf1('0xb2'),require(_0xdbf1('0xb3')));_0x1151eb[_0xdbf1('0x6')]('/api/jscripty/questions/reports',require(_0xdbf1('0xb4')));_0x1151eb[_0xdbf1('0x6')](_0xdbf1('0xb5'),require('./api/jscriptySessionReport'));_0x1151eb['use'](_0xdbf1('0xb6'),require(_0xdbf1('0xb7')));_0x1151eb[_0xdbf1('0x6')](_0xdbf1('0xb8'),require(_0xdbf1('0xb9')));_0x1151eb[_0xdbf1('0x6')](_0xdbf1('0xba'),require('./api/squareReportDetail'));_0x1151eb[_0xdbf1('0x6')](_0xdbf1('0xbb'),require('./api/jscriptyProject'));_0x1151eb['use']('/api/settings',require('./api/setting'));_0x1151eb[_0xdbf1('0x6')](_0xdbf1('0xbc'),require('./api/squareOdbc'));_0x1151eb[_0xdbf1('0x6')](_0xdbf1('0xbd'),require('./api/squareProject'));_0x1151eb[_0xdbf1('0x6')](_0xdbf1('0xbe'),require(_0xdbf1('0xbf')));_0x1151eb['use'](_0xdbf1('0xc0'),require(_0xdbf1('0xc1')));_0x1151eb[_0xdbf1('0x6')](_0xdbf1('0xc2'),require('./api/team'));_0x1151eb[_0xdbf1('0x6')]('/api/license',require('./api/license'));_0x1151eb[_0xdbf1('0x6')](_0xdbf1('0xc3'),require(_0xdbf1('0xc4')));_0x1151eb['use'](_0xdbf1('0xc5'),require('./api/migration'));_0x1151eb[_0xdbf1('0x6')](_0xdbf1('0xc6'),require(_0xdbf1('0xc7')));_0x1151eb[_0xdbf1('0x6')](_0xdbf1('0xc8'),require(_0xdbf1('0xc9')));_0x1151eb[_0xdbf1('0x6')](_0xdbf1('0xca'),require('./api/mailTransferReport'));_0x1151eb['use'](_0xdbf1('0xcb'),require(_0xdbf1('0xcc')));_0x1151eb[_0xdbf1('0x6')](_0xdbf1('0xcd'),require(_0xdbf1('0xce')));_0x1151eb[_0xdbf1('0x6')]('/api/openchannel/reports/transfer',require(_0xdbf1('0xcf')));_0x1151eb['use'](_0xdbf1('0xd0'),require('./api/smsTransferReport'));_0x1151eb[_0xdbf1('0x6')](_0xdbf1('0xd1'),require(_0xdbf1('0xd2')));_0x1151eb[_0xdbf1('0x6')](_0xdbf1('0xd3'),require(_0xdbf1('0xd4')));_0x1151eb['use'](_0xdbf1('0xd5'),require('./api/userProfile'));_0x1151eb[_0xdbf1('0x6')](_0xdbf1('0xd6'),require(_0xdbf1('0xd7')));_0x1151eb['use'](_0xdbf1('0xd8'),require(_0xdbf1('0xd9')));_0x1151eb[_0xdbf1('0x6')](_0xdbf1('0xda'),require(_0xdbf1('0xdb')));_0x1151eb[_0xdbf1('0x6')](_0xdbf1('0xdc'),require(_0xdbf1('0xdd')));_0x1151eb[_0xdbf1('0x6')]('/api/whatsapp/applications',require(_0xdbf1('0xde')));_0x1151eb['use'](_0xdbf1('0xdf'),require(_0xdbf1('0xe0')));_0x1151eb['use'](_0xdbf1('0xe1'),require(_0xdbf1('0xe2')));_0x1151eb['use'](_0xdbf1('0xe3'),require(_0xdbf1('0xe4')));_0x1151eb['use'](_0xdbf1('0xe5'),require('./api/whatsappTransferReport'));_0x1151eb[_0xdbf1('0x6')](_0xdbf1('0xe6'),require(_0xdbf1('0xe7')));_0x1151eb[_0xdbf1('0x6')](_0xdbf1('0xe8'),require(_0xdbf1('0xe9')));_0x1151eb[_0xdbf1('0x6')]('/api/realtime',require(_0xdbf1('0xea')));_0x1151eb[_0xdbf1('0x6')]('/api/user-settings',require('./api/user-setting'));_0x1151eb['use']('/api/auth/local',require(_0xdbf1('0xeb')));_0x1151eb[_0xdbf1('0x6')]('/api/auth/google',require(_0xdbf1('0xec')));_0x1151eb[_0xdbf1('0x6')](_0xdbf1('0xed'),require('./api/authActiveDirectory'));_0x1151eb[_0xdbf1('0x6')](_0xdbf1('0xee'),require(_0xdbf1('0xef')));_0x1151eb[_0xdbf1('0x6')](_0xdbf1('0xf0'),require('./api/rpc'));_0x1151eb['use']('/api/version',require(_0xdbf1('0xf1')));_0x1151eb[_0xdbf1('0x6')](_0xdbf1('0xf2'),require(_0xdbf1('0xf3')));_0x1151eb[_0xdbf1('0x6')](_0xdbf1('0xf4'),require('./api/pm2'));_0x1151eb[_0xdbf1('0x6')]('/api/webbar',require(_0xdbf1('0xf5')));_0x1151eb['use'](_0xdbf1('0xf6'),clientSideLogs);_0x1151eb['use'](_0xdbf1('0xf7'),express[_0xdbf1('0xf8')](path[_0xdbf1('0xf9')](config[_0xdbf1('0xfa')],_0xdbf1('0xf7'))));_0x1151eb[_0xdbf1('0x6')](_0xdbf1('0xfb'),express[_0xdbf1('0xf8')](path[_0xdbf1('0xf9')](config[_0xdbf1('0xfa')],_0xdbf1('0xfb'))));_0x1151eb[_0xdbf1('0x6')](_0xdbf1('0xfc'),express[_0xdbf1('0xf8')](path[_0xdbf1('0xf9')](config['root'],'/demo')));_0x1151eb[_0xdbf1('0x6')](_0xdbf1('0xfd'),express[_0xdbf1('0xf8')](path[_0xdbf1('0xf9')](config['root'],'snippet','3.1.0')));_0x1151eb[_0xdbf1('0x6')](_0xdbf1('0xfe'),express[_0xdbf1('0xf8')](path[_0xdbf1('0xf9')](config[_0xdbf1('0xfa')],'/server/files/plugins')));_0x1151eb[_0xdbf1('0xff')]('/:url(api|auth|components|app|bower_components|assets)/*')[_0xdbf1('0x100')](errors[0x194]);_0x1151eb[_0xdbf1('0xff')]('/*')[_0xdbf1('0x100')](function(_0x7b17df,_0x3b1f1d){_0x3b1f1d[_0xdbf1('0x101')](path[_0xdbf1('0x102')](_0x1151eb['get'](_0xdbf1('0x103'))+_0xdbf1('0x104')));});return _0x1151eb;});}; \ No newline at end of file diff --git a/server/rpc/index.js b/server/rpc/index.js index 4cc2722..16fd7ae 100644 --- a/server/rpc/index.js +++ b/server/rpc/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x7070=['../api/chatQueue/chatQueue.rpc','../api/cmContact/cmContact.rpc','../api/cmHopperBlack/cmHopperBlack.rpc','../api/cmHopperFinal/cmHopperFinal.rpc','../api/cmHopperHistory/cmHopperHistory.rpc','../api/interval/interval.rpc','../api/pause/pause.rpc','../api/sound/sound.rpc','../api/trigger/trigger.rpc','../api/variable/variable.rpc','../api/intSugarcrmAccount/intSugarcrmAccount.rpc','../api/intDeskAccount/intDeskAccount.rpc','../api/intZohoAccount/intZohoAccount.rpc','../api/intZendeskAccount/intZendeskAccount.rpc','../api/intFreshdeskAccount/intFreshdeskAccount.rpc','../api/intVtigerAccount/intVtigerAccount.rpc','../api/intServicenowAccount/intServicenowAccount.rpc','../api/intDynamics365Account/intDynamics365Account.rpc','../api/smsQueueReport/smsQueueReport.rpc','../api/squareReport/squareReport.rpc','../api/squareReportDetail/squareReportDetail.rpc','../api/setting/setting.rpc','../api/squareRecording/squareRecording.rpc','../api/campaign/campaign.rpc','../api/attachment/attachment.rpc','../api/plugin/plugin.rpc','../api/whatsappAccount/whatsappAccount.rpc','../api/whatsappInteraction/whatsappInteraction.rpc','../api/whatsappQueueReport/whatsappQueueReport.rpc','../api/whatsappQueue/whatsappQueue.rpc','server','port','localhost','error','listen','Express\x20RPC\x20server\x20listening\x20on\x20%s:%d!','../config/triggers','RPC\x20listening\x20on\x20','../config/environment','merge','../api/user/user.rpc','../api/voiceQueue/voiceQueue.rpc','../api/voiceRecording/voiceRecording.rpc','../api/voiceDialReport/voiceDialReport.rpc','../api/voiceAgentReport/voiceAgentReport.rpc','../api/voiceQueueReport/voiceQueueReport.rpc','../api/memberReport/memberReport.rpc','../api/trunk/trunk.rpc','../api/voiceTransferReport/voiceTransferReport.rpc','../api/mailQueue/mailQueue.rpc','../api/mailInteraction/mailInteraction.rpc','../api/mailMessage/mailMessage.rpc','../api/mailApplication/mailApplication.rpc','../api/faxInteraction/faxInteraction.rpc','../api/faxQueue/faxQueue.rpc','../api/faxQueueReport/faxQueueReport.rpc','../api/smsAccount/smsAccount.rpc','../api/smsInteraction/smsInteraction.rpc','../api/smsMessage/smsMessage.rpc','../api/openchannelQueue/openchannelQueue.rpc','../api/openchannelQueueReport/openchannelQueueReport.rpc','../api/chatInteraction/chatInteraction.rpc','../api/chatMessage/chatMessage.rpc'];(function(_0x19b981,_0x50edd4){var _0x1cd2d3=function(_0x15324c){while(--_0x15324c){_0x19b981['push'](_0x19b981['shift']());}};_0x1cd2d3(++_0x50edd4);}(_0x7070,0xa4));var _0x0707=function(_0x44a7d0,_0x28f931){_0x44a7d0=_0x44a7d0-0x0;var _0x1e0f2e=_0x7070[_0x44a7d0];return _0x1e0f2e;};'use strict';var jayson=require('jayson/promise');var _=require('lodash');var config=require(_0x0707('0x0'));exports['listen']=function(){return new Promise(function(_0x46694c,_0x4cc190){var _0xaca874={};_0xaca874=_[_0x0707('0x1')](_0xaca874,require(_0x0707('0x2')));_0xaca874=_[_0x0707('0x1')](_0xaca874,require('../api/voiceExtension/voiceExtension.rpc'));_0xaca874=_[_0x0707('0x1')](_0xaca874,require(_0x0707('0x3')));_0xaca874=_[_0x0707('0x1')](_0xaca874,require(_0x0707('0x4')));_0xaca874=_['merge'](_0xaca874,require('../api/voiceCallReport/voiceCallReport.rpc'));_0xaca874=_[_0x0707('0x1')](_0xaca874,require(_0x0707('0x5')));_0xaca874=_[_0x0707('0x1')](_0xaca874,require(_0x0707('0x6')));_0xaca874=_[_0x0707('0x1')](_0xaca874,require(_0x0707('0x7')));_0xaca874=_[_0x0707('0x1')](_0xaca874,require(_0x0707('0x8')));_0xaca874=_[_0x0707('0x1')](_0xaca874,require(_0x0707('0x9')));_0xaca874=_[_0x0707('0x1')](_0xaca874,require(_0x0707('0xa')));_0xaca874=_['merge'](_0xaca874,require('../api/userVoiceQueueRt/userVoiceQueueRt.rpc'));_0xaca874=_[_0x0707('0x1')](_0xaca874,require('../api/mailServerIn/mailServerIn.rpc'));_0xaca874=_[_0x0707('0x1')](_0xaca874,require('../api/mailAccount/mailAccount.rpc'));_0xaca874=_[_0x0707('0x1')](_0xaca874,require(_0x0707('0xb')));_0xaca874=_[_0x0707('0x1')](_0xaca874,require(_0x0707('0xc')));_0xaca874=_[_0x0707('0x1')](_0xaca874,require(_0x0707('0xd')));_0xaca874=_[_0x0707('0x1')](_0xaca874,require(_0x0707('0xe')));_0xaca874=_['merge'](_0xaca874,require('../api/mailQueueReport/mailQueueReport.rpc'));_0xaca874=_[_0x0707('0x1')](_0xaca874,require('../api/faxAccount/faxAccount.rpc'));_0xaca874=_[_0x0707('0x1')](_0xaca874,require('../api/faxApplication/faxApplication.rpc'));_0xaca874=_[_0x0707('0x1')](_0xaca874,require(_0x0707('0xf')));_0xaca874=_[_0x0707('0x1')](_0xaca874,require('../api/faxMessage/faxMessage.rpc'));_0xaca874=_[_0x0707('0x1')](_0xaca874,require(_0x0707('0x10')));_0xaca874=_[_0x0707('0x1')](_0xaca874,require(_0x0707('0x11')));_0xaca874=_[_0x0707('0x1')](_0xaca874,require(_0x0707('0x12')));_0xaca874=_[_0x0707('0x1')](_0xaca874,require(_0x0707('0x13')));_0xaca874=_['merge'](_0xaca874,require(_0x0707('0x14')));_0xaca874=_['merge'](_0xaca874,require('../api/smsQueue/smsQueue.rpc'));_0xaca874=_['merge'](_0xaca874,require('../api/openchannelApplication/openchannelApplication.rpc'));_0xaca874=_[_0x0707('0x1')](_0xaca874,require('../api/openchannelInteraction/openchannelInteraction.rpc'));_0xaca874=_[_0x0707('0x1')](_0xaca874,require('../api/openchannelMessage/openchannelMessage.rpc'));_0xaca874=_[_0x0707('0x1')](_0xaca874,require(_0x0707('0x15')));_0xaca874=_[_0x0707('0x1')](_0xaca874,require(_0x0707('0x16')));_0xaca874=_[_0x0707('0x1')](_0xaca874,require(_0x0707('0x17')));_0xaca874=_[_0x0707('0x1')](_0xaca874,require(_0x0707('0x18')));_0xaca874=_[_0x0707('0x1')](_0xaca874,require(_0x0707('0x19')));_0xaca874=_[_0x0707('0x1')](_0xaca874,require(_0x0707('0x1a')));_0xaca874=_[_0x0707('0x1')](_0xaca874,require('../api/cmHopper/cmHopper.rpc'));_0xaca874=_[_0x0707('0x1')](_0xaca874,require(_0x0707('0x1b')));_0xaca874=_['merge'](_0xaca874,require(_0x0707('0x1c')));_0xaca874=_[_0x0707('0x1')](_0xaca874,require(_0x0707('0x1d')));_0xaca874=_[_0x0707('0x1')](_0xaca874,require('../api/reportAgentPreview/reportAgentPreview.rpc'));_0xaca874=_['merge'](_0xaca874,require(_0x0707('0x1e')));_0xaca874=_['merge'](_0xaca874,require(_0x0707('0x1f')));_0xaca874=_[_0x0707('0x1')](_0xaca874,require(_0x0707('0x20')));_0xaca874=_[_0x0707('0x1')](_0xaca874,require('../api/cmHopperAdditionalPhone/cmHopperAdditionalPhone.rpc'));_0xaca874=_[_0x0707('0x1')](_0xaca874,require('../api/template/template.rpc'));_0xaca874=_['merge'](_0xaca874,require(_0x0707('0x21')));_0xaca874=_[_0x0707('0x1')](_0xaca874,require(_0x0707('0x22')));_0xaca874=_[_0x0707('0x1')](_0xaca874,require('../api/intSalesforceAccount/intSalesforceAccount.rpc'));_0xaca874=_[_0x0707('0x1')](_0xaca874,require(_0x0707('0x23')));_0xaca874=_[_0x0707('0x1')](_0xaca874,require(_0x0707('0x24')));_0xaca874=_['merge'](_0xaca874,require(_0x0707('0x25')));_0xaca874=_['merge'](_0xaca874,require(_0x0707('0x26')));_0xaca874=_[_0x0707('0x1')](_0xaca874,require(_0x0707('0x27')));_0xaca874=_['merge'](_0xaca874,require(_0x0707('0x28')));_0xaca874=_[_0x0707('0x1')](_0xaca874,require(_0x0707('0x29')));_0xaca874=_['merge'](_0xaca874,require(_0x0707('0x2a')));_0xaca874=_[_0x0707('0x1')](_0xaca874,require('../api/intFreshsalesAccount/intFreshsalesAccount.rpc'));_0xaca874=_[_0x0707('0x1')](_0xaca874,require('../api/chatQueueReport/chatQueueReport.rpc'));_0xaca874=_[_0x0707('0x1')](_0xaca874,require(_0x0707('0x2b')));_0xaca874=_[_0x0707('0x1')](_0xaca874,require(_0x0707('0x2c')));_0xaca874=_['merge'](_0xaca874,require(_0x0707('0x2d')));_0xaca874=_['merge'](_0xaca874,require(_0x0707('0x2e')));_0xaca874=_[_0x0707('0x1')](_0xaca874,require('../api/squareOdbc/squareOdbc.rpc'));_0xaca874=_[_0x0707('0x1')](_0xaca874,require('../api/squareProject/squareProject.rpc'));_0xaca874=_[_0x0707('0x1')](_0xaca874,require(_0x0707('0x2f')));_0xaca874=_[_0x0707('0x1')](_0xaca874,require('../api/squareMessage/squareMessage.rpc'));_0xaca874=_['merge'](_0xaca874,require(_0x0707('0x30')));_0xaca874=_[_0x0707('0x1')](_0xaca874,require(_0x0707('0x31')));_0xaca874=_[_0x0707('0x1')](_0xaca874,require(_0x0707('0x32')));_0xaca874=_[_0x0707('0x1')](_0xaca874,require(_0x0707('0x33')));_0xaca874=_[_0x0707('0x1')](_0xaca874,require(_0x0707('0x34')));_0xaca874=_['merge'](_0xaca874,require('../api/whatsappMessage/whatsappMessage.rpc'));_0xaca874=_['merge'](_0xaca874,require(_0x0707('0x35')));_0xaca874=_[_0x0707('0x1')](_0xaca874,require(_0x0707('0x36')));var _0x240873=jayson[_0x0707('0x37')](_0xaca874)['http']();var _0x2e0d5e=config['rpc']['port']||config[_0x0707('0x38')]+0x1;var _0x5a964f=config['rpc']['ip']||_0x0707('0x39');_0x240873['on'](_0x0707('0x3a'),function(_0x4ad95a){return _0x4cc190(_0x4ad95a);});_0x240873[_0x0707('0x3b')](_0x2e0d5e,_0x5a964f,function(){console['log'](_0x0707('0x3c'),_0x5a964f,_0x2e0d5e);require(_0x0707('0x3d'))['default']();return _0x46694c(_0x0707('0x3e')+_0x5a964f+':'+_0x2e0d5e);});});}; \ No newline at end of file +var _0x8adb=['../api/smsInteraction/smsInteraction.rpc','../api/smsMessage/smsMessage.rpc','../api/smsQueue/smsQueue.rpc','../api/openchannelApplication/openchannelApplication.rpc','../api/openchannelInteraction/openchannelInteraction.rpc','../api/openchannelMessage/openchannelMessage.rpc','../api/openchannelQueue/openchannelQueue.rpc','../api/openchannelQueueReport/openchannelQueueReport.rpc','../api/chatMessage/chatMessage.rpc','../api/chatQueue/chatQueue.rpc','../api/cmContact/cmContact.rpc','../api/cmHopperBlack/cmHopperBlack.rpc','../api/cmHopperFinal/cmHopperFinal.rpc','../api/reportAgentPreview/reportAgentPreview.rpc','../api/interval/interval.rpc','../api/pause/pause.rpc','../api/sound/sound.rpc','../api/cmHopperAdditionalPhone/cmHopperAdditionalPhone.rpc','../api/template/template.rpc','../api/trigger/trigger.rpc','../api/intSalesforceAccount/intSalesforceAccount.rpc','../api/intSugarcrmAccount/intSugarcrmAccount.rpc','../api/intDeskAccount/intDeskAccount.rpc','../api/intZohoAccount/intZohoAccount.rpc','../api/intZendeskAccount/intZendeskAccount.rpc','../api/intFreshdeskAccount/intFreshdeskAccount.rpc','../api/intDynamics365Account/intDynamics365Account.rpc','../api/intFreshsalesAccount/intFreshsalesAccount.rpc','../api/chatQueueReport/chatQueueReport.rpc','../api/smsQueueReport/smsQueueReport.rpc','../api/squareReport/squareReport.rpc','../api/squareOdbc/squareOdbc.rpc','../api/squareRecording/squareRecording.rpc','../api/squareMessage/squareMessage.rpc','../api/campaign/campaign.rpc','../api/attachment/attachment.rpc','../api/whatsappInteraction/whatsappInteraction.rpc','../api/whatsappMessage/whatsappMessage.rpc','../api/whatsappQueueReport/whatsappQueueReport.rpc','../api/whatsappQueue/whatsappQueue.rpc','server','http','port','rpc','log','Express\x20RPC\x20server\x20listening\x20on\x20%s:%d!','../config/triggers','default','jayson/promise','lodash','listen','../api/user/user.rpc','merge','../api/voiceQueue/voiceQueue.rpc','../api/voiceRecording/voiceRecording.rpc','../api/voiceQueueReport/voiceQueueReport.rpc','../api/memberReport/memberReport.rpc','../api/trunk/trunk.rpc','../api/mailServerIn/mailServerIn.rpc','../api/mailAccount/mailAccount.rpc','../api/mailQueue/mailQueue.rpc','../api/mailInteraction/mailInteraction.rpc','../api/mailMessage/mailMessage.rpc','../api/mailApplication/mailApplication.rpc','../api/mailQueueReport/mailQueueReport.rpc','../api/faxAccount/faxAccount.rpc','../api/faxApplication/faxApplication.rpc','../api/faxInteraction/faxInteraction.rpc','../api/faxMessage/faxMessage.rpc','../api/faxQueueReport/faxQueueReport.rpc','../api/smsAccount/smsAccount.rpc'];(function(_0x5c93a0,_0x388f5a){var _0x5ddbea=function(_0x27ff0b){while(--_0x27ff0b){_0x5c93a0['push'](_0x5c93a0['shift']());}};_0x5ddbea(++_0x388f5a);}(_0x8adb,0x105));var _0xb8ad=function(_0x2ede3f,_0x3f46fe){_0x2ede3f=_0x2ede3f-0x0;var _0x37ef76=_0x8adb[_0x2ede3f];return _0x37ef76;};'use strict';var jayson=require(_0xb8ad('0x0'));var _=require(_0xb8ad('0x1'));var config=require('../config/environment');exports[_0xb8ad('0x2')]=function(){return new Promise(function(_0x2b6793,_0x605323){var _0x6fc409={};_0x6fc409=_['merge'](_0x6fc409,require(_0xb8ad('0x3')));_0x6fc409=_[_0xb8ad('0x4')](_0x6fc409,require('../api/voiceExtension/voiceExtension.rpc'));_0x6fc409=_['merge'](_0x6fc409,require(_0xb8ad('0x5')));_0x6fc409=_['merge'](_0x6fc409,require(_0xb8ad('0x6')));_0x6fc409=_['merge'](_0x6fc409,require('../api/voiceCallReport/voiceCallReport.rpc'));_0x6fc409=_[_0xb8ad('0x4')](_0x6fc409,require('../api/voiceDialReport/voiceDialReport.rpc'));_0x6fc409=_[_0xb8ad('0x4')](_0x6fc409,require('../api/voiceAgentReport/voiceAgentReport.rpc'));_0x6fc409=_[_0xb8ad('0x4')](_0x6fc409,require(_0xb8ad('0x7')));_0x6fc409=_[_0xb8ad('0x4')](_0x6fc409,require(_0xb8ad('0x8')));_0x6fc409=_[_0xb8ad('0x4')](_0x6fc409,require(_0xb8ad('0x9')));_0x6fc409=_[_0xb8ad('0x4')](_0x6fc409,require('../api/voiceTransferReport/voiceTransferReport.rpc'));_0x6fc409=_[_0xb8ad('0x4')](_0x6fc409,require('../api/userVoiceQueueRt/userVoiceQueueRt.rpc'));_0x6fc409=_[_0xb8ad('0x4')](_0x6fc409,require(_0xb8ad('0xa')));_0x6fc409=_['merge'](_0x6fc409,require(_0xb8ad('0xb')));_0x6fc409=_[_0xb8ad('0x4')](_0x6fc409,require(_0xb8ad('0xc')));_0x6fc409=_['merge'](_0x6fc409,require(_0xb8ad('0xd')));_0x6fc409=_['merge'](_0x6fc409,require(_0xb8ad('0xe')));_0x6fc409=_['merge'](_0x6fc409,require(_0xb8ad('0xf')));_0x6fc409=_[_0xb8ad('0x4')](_0x6fc409,require(_0xb8ad('0x10')));_0x6fc409=_[_0xb8ad('0x4')](_0x6fc409,require(_0xb8ad('0x11')));_0x6fc409=_[_0xb8ad('0x4')](_0x6fc409,require(_0xb8ad('0x12')));_0x6fc409=_[_0xb8ad('0x4')](_0x6fc409,require(_0xb8ad('0x13')));_0x6fc409=_['merge'](_0x6fc409,require(_0xb8ad('0x14')));_0x6fc409=_['merge'](_0x6fc409,require('../api/faxQueue/faxQueue.rpc'));_0x6fc409=_[_0xb8ad('0x4')](_0x6fc409,require(_0xb8ad('0x15')));_0x6fc409=_['merge'](_0x6fc409,require(_0xb8ad('0x16')));_0x6fc409=_['merge'](_0x6fc409,require(_0xb8ad('0x17')));_0x6fc409=_[_0xb8ad('0x4')](_0x6fc409,require(_0xb8ad('0x18')));_0x6fc409=_[_0xb8ad('0x4')](_0x6fc409,require(_0xb8ad('0x19')));_0x6fc409=_[_0xb8ad('0x4')](_0x6fc409,require(_0xb8ad('0x1a')));_0x6fc409=_[_0xb8ad('0x4')](_0x6fc409,require(_0xb8ad('0x1b')));_0x6fc409=_[_0xb8ad('0x4')](_0x6fc409,require(_0xb8ad('0x1c')));_0x6fc409=_[_0xb8ad('0x4')](_0x6fc409,require(_0xb8ad('0x1d')));_0x6fc409=_['merge'](_0x6fc409,require(_0xb8ad('0x1e')));_0x6fc409=_[_0xb8ad('0x4')](_0x6fc409,require('../api/chatInteraction/chatInteraction.rpc'));_0x6fc409=_['merge'](_0x6fc409,require(_0xb8ad('0x1f')));_0x6fc409=_[_0xb8ad('0x4')](_0x6fc409,require(_0xb8ad('0x20')));_0x6fc409=_['merge'](_0x6fc409,require(_0xb8ad('0x21')));_0x6fc409=_[_0xb8ad('0x4')](_0x6fc409,require('../api/cmHopper/cmHopper.rpc'));_0x6fc409=_[_0xb8ad('0x4')](_0x6fc409,require(_0xb8ad('0x22')));_0x6fc409=_['merge'](_0x6fc409,require(_0xb8ad('0x23')));_0x6fc409=_[_0xb8ad('0x4')](_0x6fc409,require('../api/cmHopperHistory/cmHopperHistory.rpc'));_0x6fc409=_[_0xb8ad('0x4')](_0x6fc409,require(_0xb8ad('0x24')));_0x6fc409=_[_0xb8ad('0x4')](_0x6fc409,require(_0xb8ad('0x25')));_0x6fc409=_[_0xb8ad('0x4')](_0x6fc409,require(_0xb8ad('0x26')));_0x6fc409=_[_0xb8ad('0x4')](_0x6fc409,require(_0xb8ad('0x27')));_0x6fc409=_[_0xb8ad('0x4')](_0x6fc409,require(_0xb8ad('0x28')));_0x6fc409=_['merge'](_0x6fc409,require(_0xb8ad('0x29')));_0x6fc409=_[_0xb8ad('0x4')](_0x6fc409,require(_0xb8ad('0x2a')));_0x6fc409=_[_0xb8ad('0x4')](_0x6fc409,require('../api/variable/variable.rpc'));_0x6fc409=_[_0xb8ad('0x4')](_0x6fc409,require(_0xb8ad('0x2b')));_0x6fc409=_['merge'](_0x6fc409,require(_0xb8ad('0x2c')));_0x6fc409=_[_0xb8ad('0x4')](_0x6fc409,require(_0xb8ad('0x2d')));_0x6fc409=_[_0xb8ad('0x4')](_0x6fc409,require(_0xb8ad('0x2e')));_0x6fc409=_[_0xb8ad('0x4')](_0x6fc409,require(_0xb8ad('0x2f')));_0x6fc409=_[_0xb8ad('0x4')](_0x6fc409,require(_0xb8ad('0x30')));_0x6fc409=_['merge'](_0x6fc409,require('../api/intVtigerAccount/intVtigerAccount.rpc'));_0x6fc409=_[_0xb8ad('0x4')](_0x6fc409,require('../api/intServicenowAccount/intServicenowAccount.rpc'));_0x6fc409=_['merge'](_0x6fc409,require(_0xb8ad('0x31')));_0x6fc409=_[_0xb8ad('0x4')](_0x6fc409,require(_0xb8ad('0x32')));_0x6fc409=_[_0xb8ad('0x4')](_0x6fc409,require(_0xb8ad('0x33')));_0x6fc409=_[_0xb8ad('0x4')](_0x6fc409,require(_0xb8ad('0x34')));_0x6fc409=_[_0xb8ad('0x4')](_0x6fc409,require(_0xb8ad('0x35')));_0x6fc409=_[_0xb8ad('0x4')](_0x6fc409,require('../api/squareReportDetail/squareReportDetail.rpc'));_0x6fc409=_[_0xb8ad('0x4')](_0x6fc409,require('../api/setting/setting.rpc'));_0x6fc409=_['merge'](_0x6fc409,require(_0xb8ad('0x36')));_0x6fc409=_[_0xb8ad('0x4')](_0x6fc409,require('../api/squareProject/squareProject.rpc'));_0x6fc409=_['merge'](_0x6fc409,require(_0xb8ad('0x37')));_0x6fc409=_[_0xb8ad('0x4')](_0x6fc409,require(_0xb8ad('0x38')));_0x6fc409=_[_0xb8ad('0x4')](_0x6fc409,require(_0xb8ad('0x39')));_0x6fc409=_[_0xb8ad('0x4')](_0x6fc409,require(_0xb8ad('0x3a')));_0x6fc409=_[_0xb8ad('0x4')](_0x6fc409,require('../api/plugin/plugin.rpc'));_0x6fc409=_[_0xb8ad('0x4')](_0x6fc409,require('../api/whatsappAccount/whatsappAccount.rpc'));_0x6fc409=_[_0xb8ad('0x4')](_0x6fc409,require(_0xb8ad('0x3b')));_0x6fc409=_[_0xb8ad('0x4')](_0x6fc409,require(_0xb8ad('0x3c')));_0x6fc409=_['merge'](_0x6fc409,require(_0xb8ad('0x3d')));_0x6fc409=_[_0xb8ad('0x4')](_0x6fc409,require(_0xb8ad('0x3e')));var _0x45739c=jayson[_0xb8ad('0x3f')](_0x6fc409)[_0xb8ad('0x40')]();var _0x5cce47=config['rpc']['port']||config[_0xb8ad('0x41')]+0x1;var _0x58ac59=config[_0xb8ad('0x42')]['ip']||'localhost';_0x45739c['on']('error',function(_0x353987){return _0x605323(_0x353987);});_0x45739c[_0xb8ad('0x2')](_0x5cce47,_0x58ac59,function(){console[_0xb8ad('0x43')](_0xb8ad('0x44'),_0x58ac59,_0x5cce47);require(_0xb8ad('0x45'))[_0xb8ad('0x46')]();return _0x2b6793('RPC\x20listening\x20on\x20'+_0x58ac59+':'+_0x5cce47);});});}; \ No newline at end of file diff --git a/server/services/agi/channel.js b/server/services/agi/channel.js index 3ff7944..d56a930 100644 --- a/server/services/agi/channel.js +++ b/server/services/agi/channel.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x4cb5=['search','520\x20End\x20of\x20proper','function','substring','no\x20code','replace','result=','indexOf','startsWith','split','length','match','error','E_AGI_SOCKET_ERROR','code','close','E_AGI_SOCKET_CLOSE','timeout','E_AGI_SOCKET_TIMEOUT','destroy','command','write','inherits','prototype','sendRequest','sync','answer','ANSWER','beep','format','noop','NO\x20MESSAGE','VERBOSE\x20\x22%s\x22','exec','isArray','join','EXEC\x20%s\x20%s','setExtension','setPriority','SET\x20PRIORITY\x20%s','HANGUP','setVariable','isBoolean','toString','SET\x20VARIABLE\x20%s\x20\x22%s\x22','sayDigits','SAY\x20DIGITS\x20%s\x20%s','sayPhonetic','SAY\x20PHONETIC\x20\x22%s\x22\x20%s','continueAt','extension','setContext','getVariable','GET\x20VARIABLE\x20\x22%s\x22','recordFile','wav','BEEP','RECORD\x20FILE\x20\x22%s\x22\x20\x22%s\x22\x20\x22%s\x22\x20%s\x20%s\x20%s','streamFile','STREAM\x20FILE\x20\x22%s\x22\x20\x22%s\x22','agi','AGI','WAIT','ID:%s\x20-\x20LABEL:\x20%s\x20-\x20MSG:\x20%s','exports','util','lodash','events','EventEmitter','./error','call','utf8','setTimeout','emit','ready','line','hangup','520-Invalid'];(function(_0x1bc0ae,_0x439dfe){var _0x501104=function(_0x2ade0d){while(--_0x2ade0d){_0x1bc0ae['push'](_0x1bc0ae['shift']());}};_0x501104(++_0x439dfe);}(_0x4cb5,0x8f));var _0x54cb=function(_0x1c37f5,_0x5d7cc3){_0x1c37f5=_0x1c37f5-0x0;var _0x4c1805=_0x4cb5[_0x1c37f5];return _0x4c1805;};'use strict';var util=require(_0x54cb('0x0'));var _=require(_0x54cb('0x1'));var EventEmitter=require(_0x54cb('0x2'))[_0x54cb('0x3')];var AGIReply=require('./reply');var AGIError=require(_0x54cb('0x4'));function AGIChannel(_0x1fa46a){var _0x240a36=this,_0xe3fc36=new AGIReply(),_0x297dd8=![],_0xf3461f={};EventEmitter[_0x54cb('0x5')](_0x240a36);_0x1fa46a['setEncoding'](_0x54cb('0x6'));_0x1fa46a[_0x54cb('0x7')](0x8*0x3c*0x3c*0x3e8);_0xe3fc36['setEncoding'](_0x54cb('0x6'));_0xe3fc36['on']('headers',function(_0x3c2861){for(var _0x2babe8 in _0x3c2861){_0x240a36[_0x2babe8]=_0x3c2861[_0x2babe8];}_0x240a36[_0x54cb('0x8')](_0x54cb('0x9'));});_0xe3fc36['on'](_0x54cb('0xa'),function(_0x305358){if(_0x305358['toLowerCase']()=='hangup'){_0x240a36[_0x54cb('0x8')](_0x54cb('0xb'));return;}if(_0x305358['substring'](0x0,0xb)==_0x54cb('0xc')){_0x297dd8=!![];}if(_0x297dd8){_0xf3461f['rx']+=_0x305358+'\x0a';if(_0x305358[_0x54cb('0xd')](_0x54cb('0xe'))!=-0x1){_0x297dd8=![];}}else{_0xf3461f['rx']=_0x305358;}if(_0x297dd8){return;}if(typeof _0xf3461f['cb']==_0x54cb('0xf')){var _0x3c836d=_0xf3461f['rx'][_0x54cb('0x10')](0x0,0x3),_0x23df44=null,_0x5f0986=null;_0x3c836d=parseInt(_0x3c836d);if(isNaN(_0x3c836d)){_0xf3461f['cb'](null,{'code':0x1f4,'result':-0x1,'extra':_0x54cb('0x11')});return;}if(_0x3c836d!=0xc8){_0xf3461f['cb'](null,{'code':_0x3c836d,'result':-0x1,'extra':'KO'});return;}_0x23df44=_0xf3461f['rx'][_0x54cb('0x10')](0x4)[_0x54cb('0x12')](_0x54cb('0x13'),'');if(_0x23df44[_0x54cb('0x14')]('\x20')!=-0x1){_0x23df44=_0x23df44['substr'](0x0,_0x23df44[_0x54cb('0x14')]('\x20'));}if(_[_0x54cb('0x15')](_0x23df44,'-1')){_0x23df44=parseInt(_0x23df44);}_0x5f0986=_0xf3461f['rx'][_0x54cb('0x16')]('\x20');if(_0x5f0986[_0x54cb('0x17')]==0x3){_0x5f0986=_0x5f0986[0x2][_0x54cb('0x10')](0x1,_0x5f0986[0x2]['length']-0x1);}else if(_0x5f0986[_0x54cb('0x17')]>0x3){var _0x256cf7=/\((.+)\)/;var _0x16fc13=_0xf3461f['rx'][_0x54cb('0x18')](_0x256cf7);if(_0x16fc13){_0x5f0986=_0x16fc13[0x1];}else{_0x5f0986=null;}}else{_0x5f0986=null;}_0xf3461f['cb'](null,{'code':_0x3c836d,'result':_0x23df44,'extra':_0x5f0986});}});_0x1fa46a['on'](_0x54cb('0x19'),function(_0x4b4bef){_0x240a36['emit'](_0x54cb('0x19'),new AGIError(_0x54cb('0x1a'),_0x4b4bef[_0x54cb('0x1b')]));});_0x1fa46a['on'](_0x54cb('0x1c'),function(){_0x240a36[_0x54cb('0x8')](_0x54cb('0x1c'),new AGIError(_0x54cb('0x1d')));});_0x1fa46a['on'](_0x54cb('0x1e'),function(){_0x240a36['emit']('timeout',new AGIError(_0x54cb('0x1f')));_0x1fa46a[_0x54cb('0x20')]();});_0x1fa46a['pipe'](_0xe3fc36);this[_0x54cb('0x21')]=function(_0x23458e,_0x725204){var _0x23458e=_0x23458e||'',_0x725204=typeof _0x725204==_0x54cb('0xf')?_0x725204:new Function();_0xf3461f={'tx':_0x23458e,'rx':'','cb':_0x725204};_0x1fa46a[_0x54cb('0x22')](_0x23458e+'\x0a');},this['close']=function(){_0x1fa46a['destroy']();};}util[_0x54cb('0x23')](AGIChannel,EventEmitter);AGIChannel[_0x54cb('0x24')][_0x54cb('0x25')]=function(_0x2fd475){return this['command'][_0x54cb('0x26')](this,_0x2fd475);};AGIChannel[_0x54cb('0x24')][_0x54cb('0x27')]=function(){return this[_0x54cb('0x25')](_0x54cb('0x28'));};AGIChannel[_0x54cb('0x24')]['getData']=function(_0x4d6746,_0x555953,_0x128872){_0x4d6746=_0x4d6746===undefined?_0x54cb('0x29'):_0x4d6746;_0x555953=_0x555953===undefined?'5':_0x555953;_0x128872=_0x128872===undefined?'1':_0x128872;return this[_0x54cb('0x25')](util[_0x54cb('0x2a')]('GET\x20DATA\x20\x22%s\x22\x20%s\x20%s',_0x4d6746,_0x555953*0x3e8,_0x128872));};AGIChannel[_0x54cb('0x24')][_0x54cb('0x2b')]=function(_0x490fb0){_0x490fb0=_0x490fb0||_0x54cb('0x2c');return this[_0x54cb('0x25')](util[_0x54cb('0x2a')](_0x54cb('0x2d'),_0x490fb0));};AGIChannel[_0x54cb('0x24')][_0x54cb('0x2e')]=function(_0x4303b0,_0x489599){if(_[_0x54cb('0x2f')](_0x489599)){return this[_0x54cb('0x25')](util[_0x54cb('0x2a')]('EXEC\x20%s\x20%s',_0x4303b0,_0x489599[_0x54cb('0x30')](',')));}return this[_0x54cb('0x25')](util[_0x54cb('0x2a')](_0x54cb('0x31'),_0x4303b0,_0x489599));};AGIChannel['prototype']['setContext']=function(_0x2803d8){return this[_0x54cb('0x25')](util['format']('SET\x20CONTEXT\x20%s',_0x2803d8));};AGIChannel[_0x54cb('0x24')][_0x54cb('0x32')]=function(_0x500223){return this['sendRequest'](util[_0x54cb('0x2a')]('SET\x20EXTENSION\x20%s',_0x500223));};AGIChannel[_0x54cb('0x24')][_0x54cb('0x33')]=function(_0x5da9a4){return this[_0x54cb('0x25')](util[_0x54cb('0x2a')](_0x54cb('0x34'),_0x5da9a4));};AGIChannel['prototype']['hangup']=function(){return this[_0x54cb('0x25')](_0x54cb('0x35'));};AGIChannel[_0x54cb('0x24')][_0x54cb('0x36')]=function(_0x8f108a,_0x1819f3){var _0x50a814=_[_0x54cb('0x37')](_0x1819f3)||_['isNumber'](_0x1819f3)?_0x1819f3[_0x54cb('0x38')]():_0x1819f3;return this['sendRequest'](util[_0x54cb('0x2a')](_0x54cb('0x39'),_0x8f108a,_0x50a814?_0x50a814['toString']()[_0x54cb('0x12')](/(\r\n|\n|\r)/gm,'\x20'):''));};AGIChannel[_0x54cb('0x24')]['sayNumber']=function(_0x254805,_0x5e6cb1){return this['sendRequest'](util[_0x54cb('0x2a')]('SAY\x20NUMBER\x20%s\x20%s',_0x254805,_0x5e6cb1));};AGIChannel['prototype'][_0x54cb('0x3a')]=function(_0x4673cf,_0x1066b7){return this[_0x54cb('0x25')](util[_0x54cb('0x2a')](_0x54cb('0x3b'),_0x4673cf,_0x1066b7));};AGIChannel[_0x54cb('0x24')][_0x54cb('0x3c')]=function(_0x213f57,_0x4629cc){return this[_0x54cb('0x25')](util[_0x54cb('0x2a')](_0x54cb('0x3d'),_0x213f57,_0x4629cc));};AGIChannel[_0x54cb('0x24')][_0x54cb('0x3e')]=function(_0x5c01ff,_0x3aa0e2,_0x5366d7){_0x3aa0e2=_0x3aa0e2||this[_0x54cb('0x3f')];_0x5366d7=_0x5366d7||0x1;this[_0x54cb('0x40')](_0x5c01ff);this[_0x54cb('0x32')](_0x3aa0e2);this[_0x54cb('0x33')](_0x5366d7);return this['noop'](util[_0x54cb('0x2a')]('GOTO\x20%s\x20%s\x20%s',_0x5c01ff,_0x3aa0e2,_0x5366d7));};AGIChannel['prototype'][_0x54cb('0x41')]=function(_0x1cfd40){return this[_0x54cb('0x25')](util['format'](_0x54cb('0x42'),_0x1cfd40));};AGIChannel[_0x54cb('0x24')][_0x54cb('0x43')]=function(_0x56dc0b,_0x354366,_0x2f0f1a,_0x2aaf91,_0x5dd10a,_0x463cee){_0x354366=_0x354366||_0x54cb('0x44');_0x2f0f1a=_0x2f0f1a||'';_0x2aaf91=_0x2aaf91===undefined?-0x1:_0x2aaf91==='-1'?-0x1:_0x2aaf91*0x3e8;_0x5dd10a=_0x5dd10a===undefined?'':'s='+_0x5dd10a;_0x463cee=_0x463cee?_0x54cb('0x45'):'';return this[_0x54cb('0x25')](util[_0x54cb('0x2a')](_0x54cb('0x46'),_0x56dc0b,_0x354366,_0x2f0f1a,_0x2aaf91,_0x463cee,_0x5dd10a));};AGIChannel[_0x54cb('0x24')][_0x54cb('0x47')]=function(_0x1bc262,_0x431f57){_0x431f57=_0x431f57||'';return this[_0x54cb('0x25')](util['format'](_0x54cb('0x48'),_0x1bc262,_0x431f57));};AGIChannel['prototype'][_0x54cb('0x49')]=function(_0x354644){return this[_0x54cb('0x2e')](_0x54cb('0x4a'),_0x354644);};AGIChannel[_0x54cb('0x24')]['wait']=function(_0x368abe){return this[_0x54cb('0x2e')](_0x54cb('0x4b'),_0x368abe);};AGIChannel[_0x54cb('0x24')][_0x54cb('0x19')]=function(_0x3dec55,_0x28dba9){this[_0x54cb('0x2b')](util['format'](_0x54cb('0x4c'),_0x3dec55['id'],_0x3dec55['label'],_0x28dba9));return{'code':0x1f4,'result':'-1','extra':''};};module[_0x54cb('0x4d')]=AGIChannel; \ No newline at end of file +var _0x3cb7=['hangup','substring','520-Invalid','search','520\x20End\x20of\x20proper','function','replace','result=','indexOf','length','error','close','E_AGI_SOCKET_CLOSE','timeout','E_AGI_SOCKET_TIMEOUT','destroy','pipe','command','write','inherits','answer','ANSWER','prototype','getData','beep','sendRequest','format','GET\x20DATA\x20\x22%s\x22\x20%s\x20%s','noop','NO\x20MESSAGE','VERBOSE\x20\x22%s\x22','exec','isArray','EXEC\x20%s\x20%s','join','setContext','setExtension','SET\x20EXTENSION\x20%s','SET\x20PRIORITY\x20%s','HANGUP','setVariable','isBoolean','toString','SET\x20VARIABLE\x20%s\x20\x22%s\x22','sayNumber','sayDigits','SAY\x20DIGITS\x20%s\x20%s','sayPhonetic','continueAt','setPriority','GOTO\x20%s\x20%s\x20%s','getVariable','GET\x20VARIABLE\x20\x22%s\x22','wav','BEEP','STREAM\x20FILE\x20\x22%s\x22\x20\x22%s\x22','AGI','wait','WAIT','ID:%s\x20-\x20LABEL:\x20%s\x20-\x20MSG:\x20%s','util','lodash','EventEmitter','./reply','./error','call','setEncoding','utf8','setTimeout','headers','emit','ready','line','toLowerCase'];(function(_0x202771,_0xcace9c){var _0x3612ef=function(_0x485c83){while(--_0x485c83){_0x202771['push'](_0x202771['shift']());}};_0x3612ef(++_0xcace9c);}(_0x3cb7,0x1ae));var _0x73cb=function(_0x2bae67,_0x1077b2){_0x2bae67=_0x2bae67-0x0;var _0x5f29ed=_0x3cb7[_0x2bae67];return _0x5f29ed;};'use strict';var util=require(_0x73cb('0x0'));var _=require(_0x73cb('0x1'));var EventEmitter=require('events')[_0x73cb('0x2')];var AGIReply=require(_0x73cb('0x3'));var AGIError=require(_0x73cb('0x4'));function AGIChannel(_0x181662){var _0x5b1c9d=this,_0x5f923d=new AGIReply(),_0x2b16b7=![],_0x1e72e0={};EventEmitter[_0x73cb('0x5')](_0x5b1c9d);_0x181662[_0x73cb('0x6')](_0x73cb('0x7'));_0x181662[_0x73cb('0x8')](0x8*0x3c*0x3c*0x3e8);_0x5f923d[_0x73cb('0x6')](_0x73cb('0x7'));_0x5f923d['on'](_0x73cb('0x9'),function(_0x2d0206){for(var _0x5a6f61 in _0x2d0206){_0x5b1c9d[_0x5a6f61]=_0x2d0206[_0x5a6f61];}_0x5b1c9d[_0x73cb('0xa')](_0x73cb('0xb'));});_0x5f923d['on'](_0x73cb('0xc'),function(_0x35ddb5){if(_0x35ddb5[_0x73cb('0xd')]()==_0x73cb('0xe')){_0x5b1c9d['emit'](_0x73cb('0xe'));return;}if(_0x35ddb5[_0x73cb('0xf')](0x0,0xb)==_0x73cb('0x10')){_0x2b16b7=!![];}if(_0x2b16b7){_0x1e72e0['rx']+=_0x35ddb5+'\x0a';if(_0x35ddb5[_0x73cb('0x11')](_0x73cb('0x12'))!=-0x1){_0x2b16b7=![];}}else{_0x1e72e0['rx']=_0x35ddb5;}if(_0x2b16b7){return;}if(typeof _0x1e72e0['cb']==_0x73cb('0x13')){var _0xc6baa8=_0x1e72e0['rx']['substring'](0x0,0x3),_0x115cfa=null,_0x28600e=null;_0xc6baa8=parseInt(_0xc6baa8);if(isNaN(_0xc6baa8)){_0x1e72e0['cb'](null,{'code':0x1f4,'result':-0x1,'extra':'no\x20code'});return;}if(_0xc6baa8!=0xc8){_0x1e72e0['cb'](null,{'code':_0xc6baa8,'result':-0x1,'extra':'KO'});return;}_0x115cfa=_0x1e72e0['rx']['substring'](0x4)[_0x73cb('0x14')](_0x73cb('0x15'),'');if(_0x115cfa[_0x73cb('0x16')]('\x20')!=-0x1){_0x115cfa=_0x115cfa['substr'](0x0,_0x115cfa[_0x73cb('0x16')]('\x20'));}if(_['startsWith'](_0x115cfa,'-1')){_0x115cfa=parseInt(_0x115cfa);}_0x28600e=_0x1e72e0['rx']['split']('\x20');if(_0x28600e['length']==0x3){_0x28600e=_0x28600e[0x2][_0x73cb('0xf')](0x1,_0x28600e[0x2][_0x73cb('0x17')]-0x1);}else if(_0x28600e['length']>0x3){var _0x4554f2=/\((.+)\)/;var _0x5df3af=_0x1e72e0['rx']['match'](_0x4554f2);if(_0x5df3af){_0x28600e=_0x5df3af[0x1];}else{_0x28600e=null;}}else{_0x28600e=null;}_0x1e72e0['cb'](null,{'code':_0xc6baa8,'result':_0x115cfa,'extra':_0x28600e});}});_0x181662['on'](_0x73cb('0x18'),function(_0x4fda15){_0x5b1c9d[_0x73cb('0xa')]('error',new AGIError('E_AGI_SOCKET_ERROR',_0x4fda15['code']));});_0x181662['on']('close',function(){_0x5b1c9d[_0x73cb('0xa')](_0x73cb('0x19'),new AGIError(_0x73cb('0x1a')));});_0x181662['on'](_0x73cb('0x1b'),function(){_0x5b1c9d[_0x73cb('0xa')]('timeout',new AGIError(_0x73cb('0x1c')));_0x181662[_0x73cb('0x1d')]();});_0x181662[_0x73cb('0x1e')](_0x5f923d);this[_0x73cb('0x1f')]=function(_0x2e74fe,_0x3613f6){var _0x2e74fe=_0x2e74fe||'',_0x3613f6=typeof _0x3613f6==_0x73cb('0x13')?_0x3613f6:new Function();_0x1e72e0={'tx':_0x2e74fe,'rx':'','cb':_0x3613f6};_0x181662[_0x73cb('0x20')](_0x2e74fe+'\x0a');},this[_0x73cb('0x19')]=function(){_0x181662[_0x73cb('0x1d')]();};}util[_0x73cb('0x21')](AGIChannel,EventEmitter);AGIChannel['prototype']['sendRequest']=function(_0x5869cf){return this[_0x73cb('0x1f')]['sync'](this,_0x5869cf);};AGIChannel['prototype'][_0x73cb('0x22')]=function(){return this['sendRequest'](_0x73cb('0x23'));};AGIChannel[_0x73cb('0x24')][_0x73cb('0x25')]=function(_0x53f172,_0x2e9d1f,_0xc713aa){_0x53f172=_0x53f172===undefined?_0x73cb('0x26'):_0x53f172;_0x2e9d1f=_0x2e9d1f===undefined?'5':_0x2e9d1f;_0xc713aa=_0xc713aa===undefined?'1':_0xc713aa;return this[_0x73cb('0x27')](util[_0x73cb('0x28')](_0x73cb('0x29'),_0x53f172,_0x2e9d1f*0x3e8,_0xc713aa));};AGIChannel[_0x73cb('0x24')][_0x73cb('0x2a')]=function(_0x3e4903){_0x3e4903=_0x3e4903||_0x73cb('0x2b');return this[_0x73cb('0x27')](util[_0x73cb('0x28')](_0x73cb('0x2c'),_0x3e4903));};AGIChannel[_0x73cb('0x24')][_0x73cb('0x2d')]=function(_0x34686e,_0xbde9fb){if(_[_0x73cb('0x2e')](_0xbde9fb)){return this[_0x73cb('0x27')](util[_0x73cb('0x28')](_0x73cb('0x2f'),_0x34686e,_0xbde9fb[_0x73cb('0x30')](',')));}return this['sendRequest'](util[_0x73cb('0x28')](_0x73cb('0x2f'),_0x34686e,_0xbde9fb));};AGIChannel['prototype'][_0x73cb('0x31')]=function(_0x3d557c){return this[_0x73cb('0x27')](util[_0x73cb('0x28')]('SET\x20CONTEXT\x20%s',_0x3d557c));};AGIChannel['prototype'][_0x73cb('0x32')]=function(_0xa30703){return this['sendRequest'](util[_0x73cb('0x28')](_0x73cb('0x33'),_0xa30703));};AGIChannel[_0x73cb('0x24')]['setPriority']=function(_0x47da90){return this[_0x73cb('0x27')](util['format'](_0x73cb('0x34'),_0x47da90));};AGIChannel[_0x73cb('0x24')][_0x73cb('0xe')]=function(){return this[_0x73cb('0x27')](_0x73cb('0x35'));};AGIChannel[_0x73cb('0x24')][_0x73cb('0x36')]=function(_0x1d5671,_0x5861d6){var _0x56a758=_[_0x73cb('0x37')](_0x5861d6)||_['isNumber'](_0x5861d6)?_0x5861d6[_0x73cb('0x38')]():_0x5861d6;return this[_0x73cb('0x27')](util['format'](_0x73cb('0x39'),_0x1d5671,_0x56a758?_0x56a758[_0x73cb('0x38')]()['replace'](/(\r\n|\n|\r)/gm,'\x20'):''));};AGIChannel[_0x73cb('0x24')][_0x73cb('0x3a')]=function(_0x4516cd,_0x467096){return this[_0x73cb('0x27')](util[_0x73cb('0x28')]('SAY\x20NUMBER\x20%s\x20%s',_0x4516cd,_0x467096));};AGIChannel[_0x73cb('0x24')][_0x73cb('0x3b')]=function(_0xf24e,_0x5a3768){return this[_0x73cb('0x27')](util['format'](_0x73cb('0x3c'),_0xf24e,_0x5a3768));};AGIChannel[_0x73cb('0x24')][_0x73cb('0x3d')]=function(_0x8fbcdf,_0x309419){return this[_0x73cb('0x27')](util[_0x73cb('0x28')]('SAY\x20PHONETIC\x20\x22%s\x22\x20%s',_0x8fbcdf,_0x309419));};AGIChannel['prototype'][_0x73cb('0x3e')]=function(_0x5e98df,_0x3a6266,_0x4ef9aa){_0x3a6266=_0x3a6266||this['extension'];_0x4ef9aa=_0x4ef9aa||0x1;this[_0x73cb('0x31')](_0x5e98df);this[_0x73cb('0x32')](_0x3a6266);this[_0x73cb('0x3f')](_0x4ef9aa);return this[_0x73cb('0x2a')](util[_0x73cb('0x28')](_0x73cb('0x40'),_0x5e98df,_0x3a6266,_0x4ef9aa));};AGIChannel['prototype'][_0x73cb('0x41')]=function(_0x2d8352){return this[_0x73cb('0x27')](util['format'](_0x73cb('0x42'),_0x2d8352));};AGIChannel[_0x73cb('0x24')]['recordFile']=function(_0x14ecba,_0x2bbfd0,_0x3a3581,_0x9cca50,_0x42b6e8,_0x3f0052){_0x2bbfd0=_0x2bbfd0||_0x73cb('0x43');_0x3a3581=_0x3a3581||'';_0x9cca50=_0x9cca50===undefined?-0x1:_0x9cca50==='-1'?-0x1:_0x9cca50*0x3e8;_0x42b6e8=_0x42b6e8===undefined?'':'s='+_0x42b6e8;_0x3f0052=_0x3f0052?_0x73cb('0x44'):'';return this['sendRequest'](util[_0x73cb('0x28')]('RECORD\x20FILE\x20\x22%s\x22\x20\x22%s\x22\x20\x22%s\x22\x20%s\x20%s\x20%s',_0x14ecba,_0x2bbfd0,_0x3a3581,_0x9cca50,_0x3f0052,_0x42b6e8));};AGIChannel[_0x73cb('0x24')]['streamFile']=function(_0x40ae36,_0x1c1584){_0x1c1584=_0x1c1584||'';return this[_0x73cb('0x27')](util[_0x73cb('0x28')](_0x73cb('0x45'),_0x40ae36,_0x1c1584));};AGIChannel[_0x73cb('0x24')]['agi']=function(_0x994984){return this[_0x73cb('0x2d')](_0x73cb('0x46'),_0x994984);};AGIChannel['prototype'][_0x73cb('0x47')]=function(_0x329238){return this[_0x73cb('0x2d')](_0x73cb('0x48'),_0x329238);};AGIChannel['prototype'][_0x73cb('0x18')]=function(_0x17381e,_0x152c20){this[_0x73cb('0x2a')](util[_0x73cb('0x28')](_0x73cb('0x49'),_0x17381e['id'],_0x17381e['label'],_0x152c20));return{'code':0x1f4,'result':'-1','extra':''};};module['exports']=AGIChannel; \ No newline at end of file diff --git a/server/services/agi/error.js b/server/services/agi/error.js index 397b71b..d0e2c6c 100644 --- a/server/services/agi/error.js +++ b/server/services/agi/error.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xebfb=['exports','util','Argument\x20\x27port\x27\x20missing\x20in\x20function\x20call.','Server\x20error.\x20Code:\x20%s.','Server\x20closed.','[LICENSE]\x20Server\x20max\x20connection.\x20Count:\x20%s.','[LICENSE\x20VOICE]\x20Server\x20license\x20voice\x20disabled.','Socket\x20error.\x20Code:\x20%s.','Socket\x20closed.','Empty\x20command.','Missing\x20\x27ivr.agi_network_script\x27.','Missing\x20\x27ivr.entry\x27\x20menu.','E_AGI_UNDEFINED','push','message'];(function(_0xc9f9b,_0x575d38){var _0x2fd884=function(_0x1d6e31){while(--_0x1d6e31){_0xc9f9b['push'](_0xc9f9b['shift']());}};_0x2fd884(++_0x575d38);}(_0xebfb,0x88));var _0xbebf=function(_0x16330c,_0x5c4e2b){_0x16330c=_0x16330c-0x0;var _0x58ee65=_0xebfb[_0x16330c];return _0x58ee65;};'use strict';var util=require(_0xbebf('0x0'));var error={'E_AGI_UNDEFINED':'Undefined\x20error.','E_AGI_ARGUMENT_PORT':_0xbebf('0x1'),'E_AGI_SERVER_ERROR':_0xbebf('0x2'),'E_AGI_SERVER_CLOSE':_0xbebf('0x3'),'E_AGI_SERVER_MAXCONNECTION':_0xbebf('0x4'),'E_AGI_SERVER_VOICE_DISABLED':_0xbebf('0x5'),'E_AGI_SOCKET_ERROR':_0xbebf('0x6'),'E_AGI_SOCKET_CLOSE':_0xbebf('0x7'),'E_AGI_SOCKET_TIMEOUT':'Socket\x20timeout.','E_AGI_COMMAND_EMPTY':_0xbebf('0x8'),'E_AGI_IVR_AGI_NETWORK_SCRIPT':_0xbebf('0x9'),'E_AGI_IVR_ENTRY':_0xbebf('0xa')};function AGIError(_0x2c6b31){var _0x2c6b31=_0x2c6b31||null,_0x8141cd=_0x8141cd||[],_0x33b6f2=0x1,_0x2942e2='';if(!error[_0x2c6b31]){_0x2c6b31=_0xbebf('0xb');}_0x8141cd[_0xbebf('0xc')](error[_0x2c6b31]);while(arguments[_0x33b6f2]){_0x8141cd[_0xbebf('0xc')](arguments[_0x33b6f2]);_0x33b6f2++;}_0x2942e2=util['format']['apply'](util,_0x8141cd);this[_0xbebf('0xd')]=_0x2942e2;this['name']=_0x2c6b31;}module[_0xbebf('0xe')]=AGIError; \ No newline at end of file +var _0x3b0f=['Empty\x20command.','Missing\x20\x27ivr.agi_network_script\x27.','Missing\x20\x27ivr.entry\x27\x20menu.','E_AGI_UNDEFINED','push','format','apply','exports','util','Undefined\x20error.','Argument\x20\x27port\x27\x20missing\x20in\x20function\x20call.','[LICENSE]\x20Server\x20max\x20connection.\x20Count:\x20%s.','Socket\x20error.\x20Code:\x20%s.','Socket\x20closed.','Socket\x20timeout.'];(function(_0xf60cd0,_0x34bf81){var _0x32ad56=function(_0x44cf0b){while(--_0x44cf0b){_0xf60cd0['push'](_0xf60cd0['shift']());}};_0x32ad56(++_0x34bf81);}(_0x3b0f,0x116));var _0xf3b0=function(_0x45bbca,_0x50ffb9){_0x45bbca=_0x45bbca-0x0;var _0x595847=_0x3b0f[_0x45bbca];return _0x595847;};'use strict';var util=require(_0xf3b0('0x0'));var error={'E_AGI_UNDEFINED':_0xf3b0('0x1'),'E_AGI_ARGUMENT_PORT':_0xf3b0('0x2'),'E_AGI_SERVER_ERROR':'Server\x20error.\x20Code:\x20%s.','E_AGI_SERVER_CLOSE':'Server\x20closed.','E_AGI_SERVER_MAXCONNECTION':_0xf3b0('0x3'),'E_AGI_SERVER_VOICE_DISABLED':'[LICENSE\x20VOICE]\x20Server\x20license\x20voice\x20disabled.','E_AGI_SOCKET_ERROR':_0xf3b0('0x4'),'E_AGI_SOCKET_CLOSE':_0xf3b0('0x5'),'E_AGI_SOCKET_TIMEOUT':_0xf3b0('0x6'),'E_AGI_COMMAND_EMPTY':_0xf3b0('0x7'),'E_AGI_IVR_AGI_NETWORK_SCRIPT':_0xf3b0('0x8'),'E_AGI_IVR_ENTRY':_0xf3b0('0x9')};function AGIError(_0x2d2768){var _0x2d2768=_0x2d2768||null,_0x3d6285=_0x3d6285||[],_0x194257=0x1,_0x52ce28='';if(!error[_0x2d2768]){_0x2d2768=_0xf3b0('0xa');}_0x3d6285[_0xf3b0('0xb')](error[_0x2d2768]);while(arguments[_0x194257]){_0x3d6285[_0xf3b0('0xb')](arguments[_0x194257]);_0x194257++;}_0x52ce28=util[_0xf3b0('0xc')][_0xf3b0('0xd')](util,_0x3d6285);this['message']=_0x52ce28;this['name']=_0x2d2768;}module[_0xf3b0('0xe')]=AGIError; \ No newline at end of file diff --git a/server/services/agi/events.js b/server/services/agi/events.js index 5cc2f79..3bb82a4 100644 --- a/server/services/agi/events.js +++ b/server/services/agi/events.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x8adf=['./error','../../config/environment','defaults','redis','localhost','subscribe','emit','E_AGI_SERVER_ERROR','message','agi','parse','projectUpdate','error','lodash','events','ioredis'];(function(_0x263af1,_0x529283){var _0x52efd8=function(_0x2f218d){while(--_0x2f218d){_0x263af1['push'](_0x263af1['shift']());}};_0x52efd8(++_0x529283);}(_0x8adf,0x11d));var _0xf8ad=function(_0x54e467,_0x28ce9a){_0x54e467=_0x54e467-0x0;var _0x57d66c=_0x8adf[_0x54e467];return _0x57d66c;};'use strict';var _=require(_0xf8ad('0x0'));var EventEmitter=require(_0xf8ad('0x1'))['EventEmitter'];var Redis=require(_0xf8ad('0x2'));var AGIError=require(_0xf8ad('0x3'));var config=require(_0xf8ad('0x4'));config['redis']=_[_0xf8ad('0x5')](config[_0xf8ad('0x6')],{'host':_0xf8ad('0x7'),'port':0x18eb});var eventEmitter=new EventEmitter();var sub=new Redis(config['redis']);sub[_0xf8ad('0x8')]('agi',function(_0x3e6d1e){if(_0x3e6d1e)return eventEmitter[_0xf8ad('0x9')]('error',new AGIError(_0xf8ad('0xa'),_0x3e6d1e));});sub['on'](_0xf8ad('0xb'),function(_0x142cb9,_0x18d871){if(_0x142cb9!==_0xf8ad('0xc'))return;try{var _0x1f3bed=JSON[_0xf8ad('0xd')](_0x18d871);eventEmitter[_0xf8ad('0x9')](_0xf8ad('0xe'),_0x1f3bed);}catch(_0x5763d6){eventEmitter[_0xf8ad('0x9')](_0xf8ad('0xf'),new AGIError('E_AGI_SERVER_ERROR',_0x5763d6));}});module['exports']={'EventEmitter':eventEmitter}; \ No newline at end of file +var _0x5475=['emit','error','E_AGI_SERVER_ERROR','message','projectUpdate','exports','ioredis','redis','defaults','localhost','agi'];(function(_0x35b03b,_0xf5673){var _0x335cbe=function(_0xaa7793){while(--_0xaa7793){_0x35b03b['push'](_0x35b03b['shift']());}};_0x335cbe(++_0xf5673);}(_0x5475,0x69));var _0x5547=function(_0x2e4aa2,_0x11956a){_0x2e4aa2=_0x2e4aa2-0x0;var _0x5e6092=_0x5475[_0x2e4aa2];return _0x5e6092;};'use strict';var _=require('lodash');var EventEmitter=require('events')['EventEmitter'];var Redis=require(_0x5547('0x0'));var AGIError=require('./error');var config=require('../../config/environment');config[_0x5547('0x1')]=_[_0x5547('0x2')](config['redis'],{'host':_0x5547('0x3'),'port':0x18eb});var eventEmitter=new EventEmitter();var sub=new Redis(config[_0x5547('0x1')]);sub['subscribe'](_0x5547('0x4'),function(_0x1f953b){if(_0x1f953b)return eventEmitter[_0x5547('0x5')](_0x5547('0x6'),new AGIError(_0x5547('0x7'),_0x1f953b));});sub['on'](_0x5547('0x8'),function(_0x43a5d7,_0x442ddd){if(_0x43a5d7!==_0x5547('0x4'))return;try{var _0xfb7e3=JSON['parse'](_0x442ddd);eventEmitter[_0x5547('0x5')](_0x5547('0x9'),_0xfb7e3);}catch(_0x343834){eventEmitter[_0x5547('0x5')](_0x5547('0x6'),new AGIError('E_AGI_SERVER_ERROR',_0x343834));}});module[_0x5547('0xa')]={'EventEmitter':eventEmitter}; \ No newline at end of file diff --git a/server/services/agi/graph/index.js b/server/services/agi/graph/index.js index 8dd68e3..5c685e4 100644 --- a/server/services/agi/graph/index.js +++ b/server/services/agi/graph/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x670f=['relations','getVertex','traverseBFS','info','stop\x20traverse','length','no\x20edge/s\x20available','condition','split','agicommand','vswitch','target','default','invalid','default\x20on\x20switch\x20not\x20found','includes','max\x20retry\x20reach','condition\x20not\x20found','exports','lodash','../../../config/logger','agi','menu','getsecretdigits','vertices','numberOfEdges','addVertex','edges','prototype','push','size'];(function(_0x2d2258,_0x2ce510){var _0x18e155=function(_0x11949e){while(--_0x11949e){_0x2d2258['push'](_0x2d2258['shift']());}};_0x18e155(++_0x2ce510);}(_0x670f,0xcd));var _0xf670=function(_0x5baf41,_0x51a4d8){_0x5baf41=_0x5baf41-0x0;var _0xcefbd2=_0x670f[_0x5baf41];return _0xcefbd2;};'use strict';var _=require(_0xf670('0x0'));var logger=require(_0xf670('0x1'))(_0xf670('0x2'));var verticesWithRetry=[_0xf670('0x3'),'getdigits',_0xf670('0x4')];var Graph=function(){this[_0xf670('0x5')]={};this['edges']={};this[_0xf670('0x6')]=0x0;};Graph['prototype'][_0xf670('0x7')]=function(_0x5200fa){this[_0xf670('0x5')][_0x5200fa['id']]=_0x5200fa;this[_0xf670('0x8')][_0x5200fa['id']]=[];};Graph[_0xf670('0x9')]['addEdge']=function(_0x346992,_0x1cb471,_0x4bb792){this[_0xf670('0x8')][_0x346992][_0xf670('0xa')]({'target':_0x1cb471,'condition':_0x4bb792});this['numberOfEdges']+=0x1;};Graph[_0xf670('0x9')][_0xf670('0xb')]=function(){return _['size'](this[_0xf670('0x5')]);};Graph[_0xf670('0x9')][_0xf670('0xc')]=function(){return this[_0xf670('0x6')];};Graph[_0xf670('0x9')][_0xf670('0xd')]=function(_0x3bfcae){return this[_0xf670('0x5')][_0x3bfcae];};Graph[_0xf670('0x9')][_0xf670('0xe')]=function(_0x91553,_0x35e7df){if(!this[_0xf670('0x5')][_0x91553]){return logger[_0xf670('0xf')]('no\x20vertex\x20found');}var _0x3f7212=_0x35e7df(this[_0xf670('0x5')][_0x91553]);if(!_0x3f7212){return logger[_0xf670('0xf')](_0xf670('0x10'));}if(this[_0xf670('0x8')][_0x91553][_0xf670('0x11')]===0x0){return logger[_0xf670('0xf')](_0xf670('0x12'));}for(var _0xb08af1=0x0,_0x7a74b1=[],_0x3a545b=![];_0xb08af1\x20to\x20extension\x20%s\x20with\x20uniqueid\x20%s','arg_1','callerid','uniqueid','[TIMEOUT]\x20%s\x20project:\x20from\x20\x22%s\x22\x20<%s>\x20to\x20extension\x20%s\x20with\x20uniqueid\x20%s','[HANGUP]\x20%s\x20project:\x20from\x20\x22%s\x22\x20<%s>\x20to\x20extension\x20%s\x20with\x20uniqueid\x20%s','calleridname','dnid','evtHangup','createSquareReport','then','hasOwnProperty','indexOf','agi_','substring','debug','variables','stringify','[START]\x20%s\x20project:\x20from\x20\x22%s\x22\x20<%s>\x20to\x20extension\x20%s\x20with\x20uniqueid\x20%s','timeout','hangup','find','handleNotFound','production','handleUnpublished','initialize','getLicense','voice','callysquare','[LICENSE]\x20VOICE\x20IS\x20DISABLED','getAll','catch','[LICENSE]','finally','./server','listening','connection','close','lodash','syncho','../../config/environment','../../config/logger','agi','./rpc','./project','./events','EventEmitter','127.0.0.1','nextTick','error','findIndex','splice','push','stack','log','Cally\x20Square\x20server\x20listening\x20on\x20port\x20%d!','port','info','format','[LISTENING]\x20Cally\x20Square\x20listening\x20%s:%d','name'];(function(_0x2965aa,_0x42dc0f){var _0x5347a2=function(_0x5dd9b0){while(--_0x5dd9b0){_0x2965aa['push'](_0x2965aa['shift']());}};_0x5347a2(++_0x42dc0f);}(_0x8ecd,0x1e1));var _0xd8ec=function(_0x449acc,_0x416458){_0x449acc=_0x449acc-0x0;var _0x15d15d=_0x8ecd[_0x449acc];return _0x15d15d;};'use strict';var _=require(_0xd8ec('0x0'));var syncho=require(_0xd8ec('0x1'));var util=require('util');var config=require(_0xd8ec('0x2'));var logger=require(_0xd8ec('0x3'))(_0xd8ec('0x4'));var utilLicense=require('../../config/license/util');var rpc=require(_0xd8ec('0x5'));var Project=require(_0xd8ec('0x6'));var AGIEmitter=require(_0xd8ec('0x7'))[_0xd8ec('0x8')];var projects=[];config['agi']=_['defaults'](config[_0xd8ec('0x4')],{'ip':_0xd8ec('0x9'),'port':0x11dd});AGIEmitter['on']('projectUpdate',projectUpdateHandler);function connectionHandler(_0x5492a2){process[_0xd8ec('0xa')](function(){syncho(function(){try{setChannelVariables(_0x5492a2);agiHandler(_0x5492a2);}catch(_0x349f18){logger[_0xd8ec('0xb')](_0x349f18['stack']);}});});}function projectUpdateHandler(_0x7e75b0){try{var _0x35d3fc=_[_0xd8ec('0xc')](projects,['id',_0x7e75b0['id']]);if(_0x35d3fc>-0x1){if(_0x7e75b0['deleted']===!![]){projects[_0xd8ec('0xd')](_0x35d3fc,0x1);}else{projects[_0x35d3fc]=_0x7e75b0;}}else{projects[_0xd8ec('0xe')](_0x7e75b0);}}catch(_0x284860){logger[_0xd8ec('0xb')](_0x284860[_0xd8ec('0xf')]);}}function listeningHandler(){console[_0xd8ec('0x10')](_0xd8ec('0x11'),config[_0xd8ec('0x4')][_0xd8ec('0x12')]);logger[_0xd8ec('0x13')](util[_0xd8ec('0x14')](_0xd8ec('0x15'),config[_0xd8ec('0x4')]['ip'],config[_0xd8ec('0x4')][_0xd8ec('0x12')]));}function errorHandler(_0x71b060){if(_0x71b060&&_0x71b060[_0xd8ec('0x16')]&&_0x71b060[_0xd8ec('0x17')]){logger['error'](util[_0xd8ec('0x14')]('[%s]\x20%s',_0x71b060[_0xd8ec('0x16')],_0x71b060['message']));}else{logger['error'](util[_0xd8ec('0x14')](_0xd8ec('0x18'),_0x71b060[_0xd8ec('0xf')]));}}function closeHandler(){logger[_0xd8ec('0x13')](util['format'](_0xd8ec('0x19'),this[_0xd8ec('0x1a')],this['calleridname'],this[_0xd8ec('0x1b')],this['dnid'],this[_0xd8ec('0x1c')]));try{createSquareReport(this);}catch(_0x4d975b){logger[_0xd8ec('0xb')](_0x4d975b[_0xd8ec('0xf')]);}}function timeoutHandler(){logger['info'](util[_0xd8ec('0x14')](_0xd8ec('0x1d'),this[_0xd8ec('0x1a')],this['calleridname'],this[_0xd8ec('0x1b')],this['dnid'],this[_0xd8ec('0x1c')]));}function hangupHandler(){logger['info'](util[_0xd8ec('0x14')](_0xd8ec('0x1e'),this[_0xd8ec('0x1a')],this[_0xd8ec('0x1f')],this['callerid'],this[_0xd8ec('0x20')],this[_0xd8ec('0x1c')]));this[_0xd8ec('0x21')]=!![];}function createSquareReport(_0xb9a84c,_0x32d096){rpc[_0xd8ec('0x22')](_0xb9a84c)[_0xd8ec('0x23')](function(_0x41232b){if(_0x32d096){_0x32d096(null,_0x41232b);}})['catch'](function(_0x35d894){if(_0x32d096){_0x32d096(null,_0x35d894);}});}function setChannelVariables(_0x3369dc){for(var _0x3f52e3 in _0x3369dc){if(_0x3369dc[_0xd8ec('0x24')](_0x3f52e3)){if(_0x3f52e3[_0xd8ec('0x25')](_0xd8ec('0x26'))===0x0){_0x3369dc[_0x3f52e3[_0xd8ec('0x27')](0x4)]=_0x3369dc[_0x3f52e3];delete _0x3369dc[_0x3f52e3];}}}}function agiHandler(_0x44bfab){logger[_0xd8ec('0x28')](_0xd8ec('0x29'),JSON[_0xd8ec('0x2a')](_0x44bfab,null,0x2));logger[_0xd8ec('0x13')](util[_0xd8ec('0x14')](_0xd8ec('0x2b'),_0x44bfab[_0xd8ec('0x1a')],_0x44bfab[_0xd8ec('0x1f')],_0x44bfab[_0xd8ec('0x1b')],_0x44bfab[_0xd8ec('0x20')],_0x44bfab[_0xd8ec('0x1c')]));_0x44bfab['on'](_0xd8ec('0xb'),errorHandler);_0x44bfab['on']('close',closeHandler);_0x44bfab['on'](_0xd8ec('0x2c'),timeoutHandler);_0x44bfab[_0xd8ec('0x21')]=![];_0x44bfab['on'](_0xd8ec('0x2d'),hangupHandler);var _0x5dcd7b=_[_0xd8ec('0x2e')](projects,['name',_0x44bfab[_0xd8ec('0x1a')]]);if(!_0x5dcd7b)return Project[_0xd8ec('0x2f')](_0x44bfab);if(!_0x5dcd7b[_0xd8ec('0x30')])return Project[_0xd8ec('0x31')](_0x44bfab);return Project[_0xd8ec('0x32')](_0x5dcd7b,_0x44bfab);}function main(){var _0x6eb7f3;return utilLicense[_0xd8ec('0x33')]()['then'](function(_0x3d87bb){if(!_0x3d87bb)return;if(_0x3d87bb[_0xd8ec('0x34')]){if(_0x3d87bb[_0xd8ec('0x35')]&&_0x3d87bb[_0xd8ec('0x35')]>0x0){logger[_0xd8ec('0x13')](util['format']('[LICENSE]\x20CHANNELS:\x20%s',_0x3d87bb['callysquare']));_0x6eb7f3=_0x3d87bb[_0xd8ec('0x35')];}else{logger[_0xd8ec('0x13')]('[LICENSE]\x20CHANNELS:\x20UNLIMITED');}}else{logger['info'](_0xd8ec('0x36'));_0x6eb7f3=-0x1;}})[_0xd8ec('0x23')](function(){return Project[_0xd8ec('0x37')]();})[_0xd8ec('0x23')](function(_0x588165){projects=_0x588165;return;})[_0xd8ec('0x38')](function(_0x5f40b0){logger['error'](_0xd8ec('0x39'),_0x5f40b0['stack']);})[_0xd8ec('0x3a')](function(){var _0x20af63=require(_0xd8ec('0x3b'))(config[_0xd8ec('0x4')][_0xd8ec('0x12')],config[_0xd8ec('0x4')]['ip'],_0x6eb7f3);_0x20af63['on'](_0xd8ec('0xb'),errorHandler);_0x20af63['on'](_0xd8ec('0x3c'),listeningHandler);_0x20af63['on'](_0xd8ec('0x3d'),connectionHandler);_0x20af63['on'](_0xd8ec('0x3e'),closeHandler);});}main(); \ No newline at end of file +var _0x1a23=['splice','push','stack','log','port','info','format','[LISTENING]\x20Cally\x20Square\x20listening\x20%s:%d','name','message','error','[%s]\x20%s','[ERROR]\x20%s','arg_1','calleridname','dnid','uniqueid','[TIMEOUT]\x20%s\x20project:\x20from\x20\x22%s\x22\x20<%s>\x20to\x20extension\x20%s\x20with\x20uniqueid\x20%s','callerid','[HANGUP]\x20%s\x20project:\x20from\x20\x22%s\x22\x20<%s>\x20to\x20extension\x20%s\x20with\x20uniqueid\x20%s','evtHangup','createSquareReport','then','hasOwnProperty','debug','variables','stringify','[START]\x20%s\x20project:\x20from\x20\x22%s\x22\x20<%s>\x20to\x20extension\x20%s\x20with\x20uniqueid\x20%s','close','timeout','find','handleNotFound','production','handleUnpublished','initialize','callysquare','[LICENSE]\x20CHANNELS:\x20UNLIMITED','[LICENSE]\x20VOICE\x20IS\x20DISABLED','getAll','[LICENSE]','finally','./server','listening','connection','lodash','util','../../config/environment','../../config/logger','agi','../../config/license/util','./rpc','./project','./events','defaults','127.0.0.1','projectUpdate','nextTick','deleted'];(function(_0x5b6bf3,_0x55f459){var _0x507293=function(_0xdae043){while(--_0xdae043){_0x5b6bf3['push'](_0x5b6bf3['shift']());}};_0x507293(++_0x55f459);}(_0x1a23,0xa0));var _0x31a2=function(_0x49afd9,_0x41f39d){_0x49afd9=_0x49afd9-0x0;var _0x19a830=_0x1a23[_0x49afd9];return _0x19a830;};'use strict';var _=require(_0x31a2('0x0'));var syncho=require('syncho');var util=require(_0x31a2('0x1'));var config=require(_0x31a2('0x2'));var logger=require(_0x31a2('0x3'))(_0x31a2('0x4'));var utilLicense=require(_0x31a2('0x5'));var rpc=require(_0x31a2('0x6'));var Project=require(_0x31a2('0x7'));var AGIEmitter=require(_0x31a2('0x8'))['EventEmitter'];var projects=[];config[_0x31a2('0x4')]=_[_0x31a2('0x9')](config[_0x31a2('0x4')],{'ip':_0x31a2('0xa'),'port':0x11dd});AGIEmitter['on'](_0x31a2('0xb'),projectUpdateHandler);function connectionHandler(_0x1c7de3){process[_0x31a2('0xc')](function(){syncho(function(){try{setChannelVariables(_0x1c7de3);agiHandler(_0x1c7de3);}catch(_0x56aa17){logger['error'](_0x56aa17['stack']);}});});}function projectUpdateHandler(_0x5e1f63){try{var _0x1c72eb=_['findIndex'](projects,['id',_0x5e1f63['id']]);if(_0x1c72eb>-0x1){if(_0x5e1f63[_0x31a2('0xd')]===!![]){projects[_0x31a2('0xe')](_0x1c72eb,0x1);}else{projects[_0x1c72eb]=_0x5e1f63;}}else{projects[_0x31a2('0xf')](_0x5e1f63);}}catch(_0x7200a0){logger['error'](_0x7200a0[_0x31a2('0x10')]);}}function listeningHandler(){console[_0x31a2('0x11')]('Cally\x20Square\x20server\x20listening\x20on\x20port\x20%d!',config[_0x31a2('0x4')][_0x31a2('0x12')]);logger[_0x31a2('0x13')](util[_0x31a2('0x14')](_0x31a2('0x15'),config[_0x31a2('0x4')]['ip'],config[_0x31a2('0x4')][_0x31a2('0x12')]));}function errorHandler(_0x26ed9f){if(_0x26ed9f&&_0x26ed9f[_0x31a2('0x16')]&&_0x26ed9f[_0x31a2('0x17')]){logger[_0x31a2('0x18')](util[_0x31a2('0x14')](_0x31a2('0x19'),_0x26ed9f[_0x31a2('0x16')],_0x26ed9f[_0x31a2('0x17')]));}else{logger[_0x31a2('0x18')](util[_0x31a2('0x14')](_0x31a2('0x1a'),_0x26ed9f[_0x31a2('0x10')]));}}function closeHandler(){logger[_0x31a2('0x13')](util[_0x31a2('0x14')]('[CLOSE]\x20%s\x20project:\x20from\x20\x22%s\x22\x20<%s>\x20to\x20extension\x20%s\x20with\x20uniqueid\x20%s',this[_0x31a2('0x1b')],this[_0x31a2('0x1c')],this['callerid'],this[_0x31a2('0x1d')],this[_0x31a2('0x1e')]));try{createSquareReport(this);}catch(_0x4ad070){logger[_0x31a2('0x18')](_0x4ad070[_0x31a2('0x10')]);}}function timeoutHandler(){logger['info'](util[_0x31a2('0x14')](_0x31a2('0x1f'),this['arg_1'],this[_0x31a2('0x1c')],this[_0x31a2('0x20')],this['dnid'],this[_0x31a2('0x1e')]));}function hangupHandler(){logger[_0x31a2('0x13')](util[_0x31a2('0x14')](_0x31a2('0x21'),this[_0x31a2('0x1b')],this[_0x31a2('0x1c')],this['callerid'],this['dnid'],this[_0x31a2('0x1e')]));this[_0x31a2('0x22')]=!![];}function createSquareReport(_0x2c7258,_0x1c8bdc){rpc[_0x31a2('0x23')](_0x2c7258)[_0x31a2('0x24')](function(_0x3eb02b){if(_0x1c8bdc){_0x1c8bdc(null,_0x3eb02b);}})['catch'](function(_0x4484ba){if(_0x1c8bdc){_0x1c8bdc(null,_0x4484ba);}});}function setChannelVariables(_0x10dbec){for(var _0x3a72b3 in _0x10dbec){if(_0x10dbec[_0x31a2('0x25')](_0x3a72b3)){if(_0x3a72b3['indexOf']('agi_')===0x0){_0x10dbec[_0x3a72b3['substring'](0x4)]=_0x10dbec[_0x3a72b3];delete _0x10dbec[_0x3a72b3];}}}}function agiHandler(_0x57ebf3){logger[_0x31a2('0x26')](_0x31a2('0x27'),JSON[_0x31a2('0x28')](_0x57ebf3,null,0x2));logger[_0x31a2('0x13')](util[_0x31a2('0x14')](_0x31a2('0x29'),_0x57ebf3[_0x31a2('0x1b')],_0x57ebf3[_0x31a2('0x1c')],_0x57ebf3[_0x31a2('0x20')],_0x57ebf3[_0x31a2('0x1d')],_0x57ebf3[_0x31a2('0x1e')]));_0x57ebf3['on'](_0x31a2('0x18'),errorHandler);_0x57ebf3['on'](_0x31a2('0x2a'),closeHandler);_0x57ebf3['on'](_0x31a2('0x2b'),timeoutHandler);_0x57ebf3[_0x31a2('0x22')]=![];_0x57ebf3['on']('hangup',hangupHandler);var _0x397f33=_[_0x31a2('0x2c')](projects,['name',_0x57ebf3[_0x31a2('0x1b')]]);if(!_0x397f33)return Project[_0x31a2('0x2d')](_0x57ebf3);if(!_0x397f33[_0x31a2('0x2e')])return Project[_0x31a2('0x2f')](_0x57ebf3);return Project[_0x31a2('0x30')](_0x397f33,_0x57ebf3);}function main(){var _0x293874;return utilLicense['getLicense']()[_0x31a2('0x24')](function(_0x2e00a2){if(!_0x2e00a2)return;if(_0x2e00a2['voice']){if(_0x2e00a2[_0x31a2('0x31')]&&_0x2e00a2[_0x31a2('0x31')]>0x0){logger[_0x31a2('0x13')](util['format']('[LICENSE]\x20CHANNELS:\x20%s',_0x2e00a2['callysquare']));_0x293874=_0x2e00a2['callysquare'];}else{logger[_0x31a2('0x13')](_0x31a2('0x32'));}}else{logger[_0x31a2('0x13')](_0x31a2('0x33'));_0x293874=-0x1;}})[_0x31a2('0x24')](function(){return Project[_0x31a2('0x34')]();})[_0x31a2('0x24')](function(_0xf9e289){projects=_0xf9e289;return;})['catch'](function(_0x76d600){logger[_0x31a2('0x18')](_0x31a2('0x35'),_0x76d600[_0x31a2('0x10')]);})[_0x31a2('0x36')](function(){var _0x4b7481=require(_0x31a2('0x37'))(config[_0x31a2('0x4')][_0x31a2('0x12')],config[_0x31a2('0x4')]['ip'],_0x293874);_0x4b7481['on'](_0x31a2('0x18'),errorHandler);_0x4b7481['on'](_0x31a2('0x38'),listeningHandler);_0x4b7481['on'](_0x31a2('0x39'),connectionHandler);_0x4b7481['on']('close',closeHandler);});}main(); \ No newline at end of file diff --git a/server/services/agi/mailRpc/index.js b/server/services/agi/mailRpc/index.js index 23f7929..393d2b9 100644 --- a/server/services/agi/mailRpc/index.js +++ b/server/services/agi/mailRpc/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x99c3=['bluebird','jayson/promise','client','http','request','then','error','message','result','catch','sendMailMessage','SendMail'];(function(_0x3bddab,_0x3f5cad){var _0x57c9ce=function(_0x339a63){while(--_0x339a63){_0x3bddab['push'](_0x3bddab['shift']());}};_0x57c9ce(++_0x3f5cad);}(_0x99c3,0x18c));var _0x399c=function(_0x42cae2,_0x284ef8){_0x42cae2=_0x42cae2-0x0;var _0x5f256f=_0x99c3[_0x42cae2];return _0x5f256f;};'use strict';var BPromise=require(_0x399c('0x0'));var jayson=require(_0x399c('0x1'));var client=jayson[_0x399c('0x2')][_0x399c('0x3')]({'port':0x232b});function request(_0xfdc530,_0x1cdcc6){return new BPromise(function(_0x13e31d,_0x26421e){return client[_0x399c('0x4')](_0xfdc530,_0x1cdcc6)[_0x399c('0x5')](function(_0x13db9e){if(_0x13db9e['error']){return _0x26421e(_0x13db9e[_0x399c('0x6')][_0x399c('0x7')]);}else{return _0x13e31d(_0x13db9e[_0x399c('0x8')]);}})[_0x399c('0x9')](function(_0x39e8f2){return _0x26421e(_0x39e8f2);});});}exports[_0x399c('0xa')]=function(_0x3d515a,_0xa0a7d){return request(_0x399c('0xb'),{'account':_0x3d515a,'message':_0xa0a7d});}; \ No newline at end of file +var _0xe5aa=['client','http','then','error','message','catch','sendMailMessage','SendMail','bluebird'];(function(_0x337e64,_0x20833c){var _0x505629=function(_0x258ac8){while(--_0x258ac8){_0x337e64['push'](_0x337e64['shift']());}};_0x505629(++_0x20833c);}(_0xe5aa,0x14c));var _0xae5a=function(_0x2e0602,_0x59eee5){_0x2e0602=_0x2e0602-0x0;var _0x2a3aa1=_0xe5aa[_0x2e0602];return _0x2a3aa1;};'use strict';var BPromise=require(_0xae5a('0x0'));var jayson=require('jayson/promise');var client=jayson[_0xae5a('0x1')][_0xae5a('0x2')]({'port':0x232b});function request(_0x47dddd,_0x104a63){return new BPromise(function(_0x336c56,_0x368d1a){return client['request'](_0x47dddd,_0x104a63)[_0xae5a('0x3')](function(_0xf9be37){if(_0xf9be37[_0xae5a('0x4')]){return _0x368d1a(_0xf9be37[_0xae5a('0x4')][_0xae5a('0x5')]);}else{return _0x336c56(_0xf9be37['result']);}})[_0xae5a('0x6')](function(_0x44fa8a){return _0x368d1a(_0x44fa8a);});});}exports[_0xae5a('0x7')]=function(_0x44d98d,_0xbf396c){return request(_0xae5a('0x8'),{'account':_0x44d98d,'message':_0xbf396c});}; \ No newline at end of file diff --git a/server/services/agi/project.js b/server/services/agi/project.js index 8eb08e7..e99b7c6 100644 --- a/server/services/agi/project.js +++ b/server/services/agi/project.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xe876=['Unable\x20to\x20download\x20CallySquare\x20projects','stack','retry','maxRetry','mxCell','hasOwnProperty','isArray','length','source','target','addEdge','value','toJson','root','production','start','debug','joinAt','format','YYYY-MM-DD\x20HH:mm:ss','omit','arg_1','calleridname','callerid','dnid','uniqueid','traverseBFS','clear','stringify','gotoc','info','context','extension','priority','agicommand','response','code','evtHangup','isUndefined','result','toString','agicommand\x20not\x20found','[FINALLY\x20TRAVERSE]\x20%s\x20project:\x20from\x20\x22%s\x22\x20<%s>\x20to\x20extension\x20%s\x20with\x20uniqueid\x20%s','[END]\x20%s\x20project:\x20from\x20\x22%s\x22\x20<%s>\x20to\x20extension\x20%s\x20with\x20uniqueid\x20%s','[GOTO]\x20context:\x20%s\x20extension:\x20%s\x20priority:\x20%s','close','Project\x20%s\x20not\x20found','continueAt','Project\x20%s\x20not\x20published','exports','lodash','xml2json','util','../../config/logger','agi','./rpc','getSquareProjects','error'];(function(_0x293224,_0x459e4d){var _0x31db31=function(_0x8343ab){while(--_0x8343ab){_0x293224['push'](_0x293224['shift']());}};_0x31db31(++_0x459e4d);}(_0xe876,0x154));var _0x6e87=function(_0x61761c,_0x2a6a89){_0x61761c=_0x61761c-0x0;var _0xb125e1=_0xe876[_0x61761c];return _0xb125e1;};'use strict';var _=require(_0x6e87('0x0'));var moment=require('moment');var parser=require(_0x6e87('0x1'));var util=require(_0x6e87('0x2'));var logger=require(_0x6e87('0x3'))(_0x6e87('0x4'));var rpc=require(_0x6e87('0x5'));var mailRpc=require('./mailRpc');var Graph=require('./graph');var Vertices=require('./vertices');var AGI_CODE_SUCCESS=0xc8;var AGI_RESULT_ERROR=-0x1;function getAll(){return rpc[_0x6e87('0x6')]()['catch'](function(_0x9f3660){logger[_0x6e87('0x7')](_0x6e87('0x8'),_0x9f3660[_0x6e87('0x9')]);return[];});}function addVertex(_0x376124,_0xfb10df,_0xd559db){_0xfb10df['agicommand']=_0xd559db;if(_0xfb10df['hasOwnProperty'](_0x6e87('0xa'))){_0xfb10df[_0x6e87('0xb')]=parseInt(_0xfb10df[_0x6e87('0xa')],0xa);}_0x376124['addVertex'](_['omit'](_0xfb10df,_0x6e87('0xc')));}function initGraph(_0x30214f,_0x5172b9){var _0x4e5fc4=new Graph();for(var _0x17d76f in _0x30214f){if(_0x30214f[_0x6e87('0xd')](_0x17d76f)){if(_[_0x6e87('0xe')](_0x30214f[_0x17d76f])){for(var _0x3b6e3d=0x0;_0x3b6e3d<_0x30214f[_0x17d76f][_0x6e87('0xf')];_0x3b6e3d+=0x1){addVertex(_0x4e5fc4,_0x30214f[_0x17d76f][_0x3b6e3d],_0x17d76f);}}else{addVertex(_0x4e5fc4,_0x30214f[_0x17d76f],_0x17d76f);}}}for(var _0x56dfaa=0x0;_0x56dfaa<_0x5172b9[_0x6e87('0xf')];_0x56dfaa+=0x1){if(_0x5172b9[_0x56dfaa][_0x6e87('0x10')]&&_0x5172b9[_0x56dfaa][_0x6e87('0x11')]){_0x4e5fc4[_0x6e87('0x12')](_0x5172b9[_0x56dfaa]['source'],_0x5172b9[_0x56dfaa][_0x6e87('0x11')],_0x5172b9[_0x56dfaa][_0x6e87('0x13')]);}}return _0x4e5fc4;}function getRoot(_0x5b91a4){return parser[_0x6e87('0x14')](_0x5b91a4,{'object':!![]})['mxGraphModel'][_0x6e87('0x15')];}function inspect(_0x4a689d){return util['inspect'](_0x4a689d,{'showHidden':![],'depth':null});}function initialize(_0x16e7be,_0xc300b2){var _0x516030=getRoot(_0x16e7be[_0x6e87('0x16')]);if(!_0x516030||!_0x516030[_0x6e87('0x17')])return;var _0x53b6d2,_0x5ceb42,_0x8c9b2f;logger[_0x6e87('0x18')](_0x6e87('0x15'),JSON['stringify'](_0x516030,null,0x2));_0xc300b2[_0x6e87('0x19')]=moment()[_0x6e87('0x1a')](_0x6e87('0x1b'));_0x53b6d2=initGraph(_[_0x6e87('0x1c')](_0x516030,_0x6e87('0xc')),_0x516030[_0x6e87('0xc')]);_0x5ceb42=new Vertices(_0xc300b2,rpc,mailRpc);logger['info'](util[_0x6e87('0x1a')]('[START\x20TRAVERSE]\x20%s\x20project:\x20from\x20\x22%s\x22\x20<%s>\x20to\x20extension\x20%s\x20with\x20uniqueid\x20%s',_0xc300b2[_0x6e87('0x1d')],_0xc300b2[_0x6e87('0x1e')],_0xc300b2[_0x6e87('0x1f')],_0xc300b2[_0x6e87('0x20')],_0xc300b2[_0x6e87('0x21')]));_0x53b6d2[_0x6e87('0x22')](_0x516030[_0x6e87('0x17')]['id'],function(_0x43210a){try{_0x43210a=_0x5ceb42[_0x6e87('0x23')](_0x43210a);logger[_0x6e87('0x18')]('vertex',JSON[_0x6e87('0x24')](_0x43210a,null,0x2));if(_0x43210a['agicommand']===_0x6e87('0x25')){logger[_0x6e87('0x26')]('gotoc\x20block\x20stop\x20traverse\x20BFS');_0xc300b2['context']=_0x43210a[_0x6e87('0x27')]||_0xc300b2['context'];_0xc300b2[_0x6e87('0x28')]=_0x43210a[_0x6e87('0x28')];_0xc300b2[_0x6e87('0x29')]=_0x43210a[_0x6e87('0x29')]?_0x43210a['priority']-0x1:0x1;return null;}else if(_0x43210a&&_0x5ceb42[_0x43210a[_0x6e87('0x2a')]]){_0x8c9b2f=_0x5ceb42[_0x43210a['agicommand']](_0x43210a);logger[_0x6e87('0x26')](_0x6e87('0x2b'),JSON[_0x6e87('0x24')](_0x8c9b2f,null,0x2));if(_0x8c9b2f&&_0x8c9b2f[_0x6e87('0x2c')]===AGI_CODE_SUCCESS&&_0x8c9b2f['result']!==AGI_RESULT_ERROR&&!_0xc300b2[_0x6e87('0x2d')]){logger['debug'](_0x6e87('0x2b'),inspect(_0x8c9b2f));return _[_0x6e87('0x2e')](_0x8c9b2f[_0x6e87('0x2f')])?null:_0x8c9b2f[_0x6e87('0x2f')][_0x6e87('0x30')]();}else{logger['error'](_0x6e87('0x2b'),inspect(_0x8c9b2f));return null;}}else{logger[_0x6e87('0x7')](_0x6e87('0x31'));return null;}}catch(_0x2ffc5c){logger[_0x6e87('0x7')](_0x2ffc5c['stack']);return null;}});if(_0x516030['finally']){logger['info'](util[_0x6e87('0x1a')](_0x6e87('0x32'),_0xc300b2[_0x6e87('0x1d')],_0xc300b2[_0x6e87('0x1e')],_0xc300b2['callerid'],_0xc300b2['dnid'],_0xc300b2['uniqueid']));_0x53b6d2[_0x6e87('0x22')](_0x516030['finally']['id'],function(_0xeb1120){try{_0xeb1120=_0x5ceb42[_0x6e87('0x23')](_0xeb1120);logger[_0x6e87('0x18')]('vertex',JSON[_0x6e87('0x24')](_0xeb1120,null,0x2));if(_0xeb1120&&_0x5ceb42[_0xeb1120['agicommand']]){_0x8c9b2f=_0x5ceb42[_0xeb1120[_0x6e87('0x2a')]](_0xeb1120);if(_0x8c9b2f){logger[_0x6e87('0x18')](_0x6e87('0x2b'),inspect(_0x8c9b2f));return _['isUndefined'](_0x8c9b2f[_0x6e87('0x2f')])?null:_0x8c9b2f[_0x6e87('0x2f')][_0x6e87('0x30')]();}else{logger[_0x6e87('0x7')](_0x6e87('0x2b'),inspect(_0x8c9b2f));return null;}}else{logger[_0x6e87('0x7')](_0x6e87('0x31'));return null;}}catch(_0x148d2f){logger[_0x6e87('0x7')](_0x148d2f[_0x6e87('0x9')]);return null;}});}logger[_0x6e87('0x26')](util[_0x6e87('0x1a')](_0x6e87('0x33'),_0xc300b2[_0x6e87('0x1d')],_0xc300b2[_0x6e87('0x1e')],_0xc300b2[_0x6e87('0x1f')],_0xc300b2[_0x6e87('0x20')],_0xc300b2[_0x6e87('0x21')]));logger[_0x6e87('0x26')](util[_0x6e87('0x1a')](_0x6e87('0x34'),_0xc300b2['context'],_0xc300b2[_0x6e87('0x28')],parseInt(_0xc300b2[_0x6e87('0x29')],0xa)+0x1));_0xc300b2['continueAt'](_0xc300b2['context'],_0xc300b2['extension'],parseInt(_0xc300b2[_0x6e87('0x29')],0xa)+0x1);_0xc300b2[_0x6e87('0x35')]();}function handleNotFound(_0x3c81f3){logger[_0x6e87('0x7')](util[_0x6e87('0x1a')](_0x6e87('0x36'),_0x3c81f3[_0x6e87('0x1d')]));_0x3c81f3[_0x6e87('0x37')](_0x3c81f3[_0x6e87('0x27')],_0x3c81f3['extension'],parseInt(_0x3c81f3[_0x6e87('0x29')],0xa)+0x1);_0x3c81f3['close']();}function handleUnpublished(_0x172490){logger[_0x6e87('0x7')](util[_0x6e87('0x1a')](_0x6e87('0x38'),_0x172490['arg_1']));_0x172490[_0x6e87('0x37')](_0x172490[_0x6e87('0x27')],_0x172490['extension'],parseInt(_0x172490[_0x6e87('0x29')],0xa)+0x1);_0x172490[_0x6e87('0x35')]();}module[_0x6e87('0x39')]={'getAll':getAll,'handleNotFound':handleNotFound,'handleUnpublished':handleUnpublished,'initialize':initialize}; \ No newline at end of file +var _0xa4b7=['result','evtHangup','toString','finally','[FINALLY\x20TRAVERSE]\x20%s\x20project:\x20from\x20\x22%s\x22\x20<%s>\x20to\x20extension\x20%s\x20with\x20uniqueid\x20%s','callerid','clear','isUndefined','[END]\x20%s\x20project:\x20from\x20\x22%s\x22\x20<%s>\x20to\x20extension\x20%s\x20with\x20uniqueid\x20%s','[GOTO]\x20context:\x20%s\x20extension:\x20%s\x20priority:\x20%s','continueAt','close','Project\x20%s\x20not\x20found','Project\x20%s\x20not\x20published','exports','moment','util','../../config/logger','./rpc','./mailRpc','./vertices','getSquareProjects','catch','error','Unable\x20to\x20download\x20CallySquare\x20projects','stack','agicommand','hasOwnProperty','retry','addVertex','omit','mxCell','length','source','target','addEdge','value','toJson','inspect','start','stringify','format','info','[START\x20TRAVERSE]\x20%s\x20project:\x20from\x20\x22%s\x22\x20<%s>\x20to\x20extension\x20%s\x20with\x20uniqueid\x20%s','arg_1','calleridname','dnid','uniqueid','traverseBFS','debug','gotoc\x20block\x20stop\x20traverse\x20BFS','context','extension','priority','response','code'];(function(_0x231e16,_0x67347b){var _0x570a7c=function(_0x2c35b4){while(--_0x2c35b4){_0x231e16['push'](_0x231e16['shift']());}};_0x570a7c(++_0x67347b);}(_0xa4b7,0xb7));var _0x7a4b=function(_0x3f63b7,_0x36b7d2){_0x3f63b7=_0x3f63b7-0x0;var _0x201dd8=_0xa4b7[_0x3f63b7];return _0x201dd8;};'use strict';var _=require('lodash');var moment=require(_0x7a4b('0x0'));var parser=require('xml2json');var util=require(_0x7a4b('0x1'));var logger=require(_0x7a4b('0x2'))('agi');var rpc=require(_0x7a4b('0x3'));var mailRpc=require(_0x7a4b('0x4'));var Graph=require('./graph');var Vertices=require(_0x7a4b('0x5'));var AGI_CODE_SUCCESS=0xc8;var AGI_RESULT_ERROR=-0x1;function getAll(){return rpc[_0x7a4b('0x6')]()[_0x7a4b('0x7')](function(_0x5c9da1){logger[_0x7a4b('0x8')](_0x7a4b('0x9'),_0x5c9da1[_0x7a4b('0xa')]);return[];});}function addVertex(_0x5e4291,_0x4675aa,_0x4e5f1d){_0x4675aa[_0x7a4b('0xb')]=_0x4e5f1d;if(_0x4675aa[_0x7a4b('0xc')]('retry')){_0x4675aa['maxRetry']=parseInt(_0x4675aa[_0x7a4b('0xd')],0xa);}_0x5e4291[_0x7a4b('0xe')](_[_0x7a4b('0xf')](_0x4675aa,_0x7a4b('0x10')));}function initGraph(_0x4c6bab,_0x49e163){var _0x31be1c=new Graph();for(var _0xcf78bb in _0x4c6bab){if(_0x4c6bab[_0x7a4b('0xc')](_0xcf78bb)){if(_['isArray'](_0x4c6bab[_0xcf78bb])){for(var _0x508900=0x0;_0x508900<_0x4c6bab[_0xcf78bb][_0x7a4b('0x11')];_0x508900+=0x1){addVertex(_0x31be1c,_0x4c6bab[_0xcf78bb][_0x508900],_0xcf78bb);}}else{addVertex(_0x31be1c,_0x4c6bab[_0xcf78bb],_0xcf78bb);}}}for(var _0x16cd18=0x0;_0x16cd18<_0x49e163[_0x7a4b('0x11')];_0x16cd18+=0x1){if(_0x49e163[_0x16cd18][_0x7a4b('0x12')]&&_0x49e163[_0x16cd18][_0x7a4b('0x13')]){_0x31be1c[_0x7a4b('0x14')](_0x49e163[_0x16cd18][_0x7a4b('0x12')],_0x49e163[_0x16cd18][_0x7a4b('0x13')],_0x49e163[_0x16cd18][_0x7a4b('0x15')]);}}return _0x31be1c;}function getRoot(_0x3513c5){return parser[_0x7a4b('0x16')](_0x3513c5,{'object':!![]})['mxGraphModel']['root'];}function inspect(_0x4397ff){return util[_0x7a4b('0x17')](_0x4397ff,{'showHidden':![],'depth':null});}function initialize(_0x1e0a74,_0x3eb7ad){var _0x5af167=getRoot(_0x1e0a74['production']);if(!_0x5af167||!_0x5af167[_0x7a4b('0x18')])return;var _0x53a418,_0x21867e,_0x1d4e3c;logger['debug']('root',JSON[_0x7a4b('0x19')](_0x5af167,null,0x2));_0x3eb7ad['joinAt']=moment()[_0x7a4b('0x1a')]('YYYY-MM-DD\x20HH:mm:ss');_0x53a418=initGraph(_['omit'](_0x5af167,_0x7a4b('0x10')),_0x5af167[_0x7a4b('0x10')]);_0x21867e=new Vertices(_0x3eb7ad,rpc,mailRpc);logger[_0x7a4b('0x1b')](util[_0x7a4b('0x1a')](_0x7a4b('0x1c'),_0x3eb7ad[_0x7a4b('0x1d')],_0x3eb7ad[_0x7a4b('0x1e')],_0x3eb7ad['callerid'],_0x3eb7ad[_0x7a4b('0x1f')],_0x3eb7ad[_0x7a4b('0x20')]));_0x53a418[_0x7a4b('0x21')](_0x5af167[_0x7a4b('0x18')]['id'],function(_0x1163f6){try{_0x1163f6=_0x21867e['clear'](_0x1163f6);logger[_0x7a4b('0x22')]('vertex',JSON[_0x7a4b('0x19')](_0x1163f6,null,0x2));if(_0x1163f6[_0x7a4b('0xb')]==='gotoc'){logger[_0x7a4b('0x1b')](_0x7a4b('0x23'));_0x3eb7ad['context']=_0x1163f6[_0x7a4b('0x24')]||_0x3eb7ad[_0x7a4b('0x24')];_0x3eb7ad[_0x7a4b('0x25')]=_0x1163f6[_0x7a4b('0x25')];_0x3eb7ad['priority']=_0x1163f6['priority']?_0x1163f6[_0x7a4b('0x26')]-0x1:0x1;return null;}else if(_0x1163f6&&_0x21867e[_0x1163f6[_0x7a4b('0xb')]]){_0x1d4e3c=_0x21867e[_0x1163f6[_0x7a4b('0xb')]](_0x1163f6);logger[_0x7a4b('0x1b')](_0x7a4b('0x27'),JSON[_0x7a4b('0x19')](_0x1d4e3c,null,0x2));if(_0x1d4e3c&&_0x1d4e3c[_0x7a4b('0x28')]===AGI_CODE_SUCCESS&&_0x1d4e3c[_0x7a4b('0x29')]!==AGI_RESULT_ERROR&&!_0x3eb7ad[_0x7a4b('0x2a')]){logger[_0x7a4b('0x22')]('response',inspect(_0x1d4e3c));return _['isUndefined'](_0x1d4e3c[_0x7a4b('0x29')])?null:_0x1d4e3c[_0x7a4b('0x29')][_0x7a4b('0x2b')]();}else{logger['error'](_0x7a4b('0x27'),inspect(_0x1d4e3c));return null;}}else{logger[_0x7a4b('0x8')]('agicommand\x20not\x20found');return null;}}catch(_0x194147){logger[_0x7a4b('0x8')](_0x194147[_0x7a4b('0xa')]);return null;}});if(_0x5af167[_0x7a4b('0x2c')]){logger[_0x7a4b('0x1b')](util['format'](_0x7a4b('0x2d'),_0x3eb7ad['arg_1'],_0x3eb7ad['calleridname'],_0x3eb7ad[_0x7a4b('0x2e')],_0x3eb7ad[_0x7a4b('0x1f')],_0x3eb7ad[_0x7a4b('0x20')]));_0x53a418['traverseBFS'](_0x5af167[_0x7a4b('0x2c')]['id'],function(_0x559ae3){try{_0x559ae3=_0x21867e[_0x7a4b('0x2f')](_0x559ae3);logger['debug']('vertex',JSON[_0x7a4b('0x19')](_0x559ae3,null,0x2));if(_0x559ae3&&_0x21867e[_0x559ae3[_0x7a4b('0xb')]]){_0x1d4e3c=_0x21867e[_0x559ae3['agicommand']](_0x559ae3);if(_0x1d4e3c){logger['debug'](_0x7a4b('0x27'),inspect(_0x1d4e3c));return _[_0x7a4b('0x30')](_0x1d4e3c[_0x7a4b('0x29')])?null:_0x1d4e3c[_0x7a4b('0x29')][_0x7a4b('0x2b')]();}else{logger[_0x7a4b('0x8')](_0x7a4b('0x27'),inspect(_0x1d4e3c));return null;}}else{logger[_0x7a4b('0x8')]('agicommand\x20not\x20found');return null;}}catch(_0x23faef){logger[_0x7a4b('0x8')](_0x23faef[_0x7a4b('0xa')]);return null;}});}logger[_0x7a4b('0x1b')](util[_0x7a4b('0x1a')](_0x7a4b('0x31'),_0x3eb7ad[_0x7a4b('0x1d')],_0x3eb7ad[_0x7a4b('0x1e')],_0x3eb7ad['callerid'],_0x3eb7ad[_0x7a4b('0x1f')],_0x3eb7ad['uniqueid']));logger[_0x7a4b('0x1b')](util[_0x7a4b('0x1a')](_0x7a4b('0x32'),_0x3eb7ad[_0x7a4b('0x24')],_0x3eb7ad['extension'],parseInt(_0x3eb7ad[_0x7a4b('0x26')],0xa)+0x1));_0x3eb7ad[_0x7a4b('0x33')](_0x3eb7ad[_0x7a4b('0x24')],_0x3eb7ad[_0x7a4b('0x25')],parseInt(_0x3eb7ad[_0x7a4b('0x26')],0xa)+0x1);_0x3eb7ad[_0x7a4b('0x34')]();}function handleNotFound(_0x5eb720){logger[_0x7a4b('0x8')](util['format'](_0x7a4b('0x35'),_0x5eb720['arg_1']));_0x5eb720[_0x7a4b('0x33')](_0x5eb720[_0x7a4b('0x24')],_0x5eb720[_0x7a4b('0x25')],parseInt(_0x5eb720[_0x7a4b('0x26')],0xa)+0x1);_0x5eb720['close']();}function handleUnpublished(_0x53504c){logger['error'](util[_0x7a4b('0x1a')](_0x7a4b('0x36'),_0x53504c[_0x7a4b('0x1d')]));_0x53504c[_0x7a4b('0x33')](_0x53504c[_0x7a4b('0x24')],_0x53504c[_0x7a4b('0x25')],parseInt(_0x53504c['priority'],0xa)+0x1);_0x53504c[_0x7a4b('0x34')]();}module[_0x7a4b('0x37')]={'getAll':getAll,'handleNotFound':handleNotFound,'handleUnpublished':handleUnpublished,'initialize':initialize}; \ No newline at end of file diff --git a/server/services/agi/reply.js b/server/services/agi/reply.js index 324c50e..812cc75 100644 --- a/server/services/agi/reply.js +++ b/server/services/agi/reply.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xc91b=['indexOf','slice','trim','headers','emit','line','exports','util','stream','Transform','call','_localBuffer','_inBody','inherits','_transform','\x0d\x0a\x0d\x0a','toString','substring','length','split'];(function(_0x1b349a,_0x22222c){var _0x5d1f7c=function(_0x368d7c){while(--_0x368d7c){_0x1b349a['push'](_0x1b349a['shift']());}};_0x5d1f7c(++_0x22222c);}(_0xc91b,0x16f));var _0xbc91=function(_0x3b60bf,_0x1f34bd){_0x3b60bf=_0x3b60bf-0x0;var _0x233b02=_0xc91b[_0x3b60bf];return _0x233b02;};'use strict';var util=require(_0xbc91('0x0'));var Transform=require(_0xbc91('0x1'))[_0xbc91('0x2')];function AGIReply(_0xaca0fa){Transform[_0xbc91('0x3')](this,_0xaca0fa);this[_0xbc91('0x4')]='';this[_0xbc91('0x5')]=![];}util[_0xbc91('0x6')](AGIReply,Transform);AGIReply['prototype'][_0xbc91('0x7')]=function(_0x24a895,_0x4a88e3,_0x222ed7){var _0x1e295b='\x0a',_0x535cb9=['\x0a\x0a',_0xbc91('0x8')],_0xf88d45=-0x1,_0x43731a=-0x1,_0x36e15f='',_0x34f079=0x0,_0x3f9299='',_0xb3668d='';this['_localBuffer']+=_0x24a895[_0xbc91('0x9')]();_0x3f9299=this[_0xbc91('0x4')];if(!this[_0xbc91('0x5')]){_0x34f079=0x0;while(_0x535cb9[_0x34f079]){while((_0x43731a=_0x3f9299['indexOf'](_0x535cb9[_0x34f079]))!=-0x1){_0x36e15f=_0x535cb9[_0x34f079];_0xb3668d=_0x3f9299['substring'](0x0,_0x43731a);_0x3f9299=_0x3f9299[_0xbc91('0xa')](_0x43731a+_0x36e15f[_0xbc91('0xb')]);var _0x47d618=_0xb3668d[_0xbc91('0xc')](_0x1e295b),_0x5808ea=0x0,_0x12d6df={},_0x5211a2='',_0x4a7e33='',_0x235bef=-0x1;while(_0x47d618[_0x5808ea]){_0x235bef=_0x47d618[_0x5808ea][_0xbc91('0xd')](':');if(_0x235bef!=-0x1){_0x5211a2=_0x47d618[_0x5808ea][_0xbc91('0xe')](0x0,_0x235bef)['trim']();_0x4a7e33=_0x47d618[_0x5808ea]['slice'](_0x235bef+0x1)[_0xbc91('0xf')]();if(_0x5211a2[_0xbc91('0xb')]>0x0){_0x12d6df[_0x5211a2]=_0x4a7e33;}}else{}_0x5808ea++;}this['emit'](_0xbc91('0x10'),_0x12d6df);this[_0xbc91('0x5')]=!![];}_0x34f079++;}this[_0xbc91('0x4')]=_0x3f9299;}else{while((_0xf88d45=_0x3f9299[_0xbc91('0xd')](_0x1e295b))!=-0x1){_0xb3668d=_0x3f9299[_0xbc91('0xa')](0x0,_0xf88d45);this[_0xbc91('0x11')](_0xbc91('0x12'),_0xb3668d);_0x3f9299=_0x3f9299[_0xbc91('0xa')](_0xf88d45+_0x1e295b[_0xbc91('0xb')]);}this['_localBuffer']=_0x3f9299;}_0x222ed7();};module[_0xbc91('0x13')]=AGIReply; \ No newline at end of file +var _0x579c=['call','_inBody','prototype','_transform','\x0d\x0a\x0d\x0a','_localBuffer','toString','indexOf','substring','length','trim','emit','line','exports','util','stream','Transform'];(function(_0x3947c9,_0x4d6c97){var _0x2e7871=function(_0x1236cc){while(--_0x1236cc){_0x3947c9['push'](_0x3947c9['shift']());}};_0x2e7871(++_0x4d6c97);}(_0x579c,0xda));var _0xc579=function(_0x3aaf5d,_0x2b5189){_0x3aaf5d=_0x3aaf5d-0x0;var _0x522b20=_0x579c[_0x3aaf5d];return _0x522b20;};'use strict';var util=require(_0xc579('0x0'));var Transform=require(_0xc579('0x1'))[_0xc579('0x2')];function AGIReply(_0x1db849){Transform[_0xc579('0x3')](this,_0x1db849);this['_localBuffer']='';this[_0xc579('0x4')]=![];}util['inherits'](AGIReply,Transform);AGIReply[_0xc579('0x5')][_0xc579('0x6')]=function(_0x1ce62b,_0x14f261,_0x124ee5){var _0x1bd276='\x0a',_0x2e451b=['\x0a\x0a',_0xc579('0x7')],_0x585167=-0x1,_0x1c6d9c=-0x1,_0x293c4a='',_0x2ce949=0x0,_0x2361fc='',_0x224f84='';this[_0xc579('0x8')]+=_0x1ce62b[_0xc579('0x9')]();_0x2361fc=this['_localBuffer'];if(!this[_0xc579('0x4')]){_0x2ce949=0x0;while(_0x2e451b[_0x2ce949]){while((_0x1c6d9c=_0x2361fc[_0xc579('0xa')](_0x2e451b[_0x2ce949]))!=-0x1){_0x293c4a=_0x2e451b[_0x2ce949];_0x224f84=_0x2361fc[_0xc579('0xb')](0x0,_0x1c6d9c);_0x2361fc=_0x2361fc[_0xc579('0xb')](_0x1c6d9c+_0x293c4a[_0xc579('0xc')]);var _0x4577a2=_0x224f84['split'](_0x1bd276),_0x2a8e70=0x0,_0x1905b7={},_0x421812='',_0x441028='',_0x448d51=-0x1;while(_0x4577a2[_0x2a8e70]){_0x448d51=_0x4577a2[_0x2a8e70][_0xc579('0xa')](':');if(_0x448d51!=-0x1){_0x421812=_0x4577a2[_0x2a8e70]['slice'](0x0,_0x448d51)[_0xc579('0xd')]();_0x441028=_0x4577a2[_0x2a8e70]['slice'](_0x448d51+0x1)[_0xc579('0xd')]();if(_0x421812['length']>0x0){_0x1905b7[_0x421812]=_0x441028;}}else{}_0x2a8e70++;}this[_0xc579('0xe')]('headers',_0x1905b7);this[_0xc579('0x4')]=!![];}_0x2ce949++;}this[_0xc579('0x8')]=_0x2361fc;}else{while((_0x585167=_0x2361fc['indexOf'](_0x1bd276))!=-0x1){_0x224f84=_0x2361fc['substring'](0x0,_0x585167);this[_0xc579('0xe')](_0xc579('0xf'),_0x224f84);_0x2361fc=_0x2361fc[_0xc579('0xb')](_0x585167+_0x1bd276[_0xc579('0xc')]);}this[_0xc579('0x8')]=_0x2361fc;}_0x124ee5();};module[_0xc579('0x10')]=AGIReply; \ No newline at end of file diff --git a/server/services/agi/rpc/index.js b/server/services/agi/rpc/index.js index e05806d..ef758d0 100644 --- a/server/services/agi/rpc/index.js +++ b/server/services/agi/rpc/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x25b0=['ShowMailAccount','MailServerOut','Smtp','CloudProvider','email','getSquareProjectById','getVoiceQueueById','ShowVoiceQueue','getVariableById','ShowVariable','getSquareOdbcById','ShowSquareOdbc','dsn','getUserById','ShowUser','getContactByPhone','GetContactByPhone','phone','getTrunkById','ShowTrunk','getSoundById','save_name','getIntervalById','ShowInterval','getSmsAccountById','ShowSmsAccount','CreateSmsMessage','createSquareDetailsReport','CreateSquareDetailsReport','createSquareReport','CreateSquareReport','merge','arg_1','arg_2','format','YYYY-MM-DD\x20HH:mm:ss','CreateSquareRecording','createSquareMessage','createCmContact','ShowCmHopper','ListId','then','CreateCmContact','getPauseById','ShowPause','agentLogin','LoginUser','PauseUser','agentUnpause','UnpauseUser','agentLogout','LogoutUser','lodash','moment','jayson/promise','client','http','request','error','result','catch','getSquareProjects','GetSquareProjects','name','production','ShowSquareProject','getMailAccountById'];(function(_0x19e35c,_0x29cd1e){var _0x3e1fe8=function(_0x17258b){while(--_0x17258b){_0x19e35c['push'](_0x19e35c['shift']());}};_0x3e1fe8(++_0x29cd1e);}(_0x25b0,0x140));var _0x025b=function(_0x1ac5e1,_0x43a483){_0x1ac5e1=_0x1ac5e1-0x0;var _0x3ae80e=_0x25b0[_0x1ac5e1];return _0x3ae80e;};'use strict';var _=require(_0x025b('0x0'));var moment=require(_0x025b('0x1'));var jayson=require(_0x025b('0x2'));var client=jayson[_0x025b('0x3')][_0x025b('0x4')]({'port':0x2329});function request(_0x34015d,_0x4c1b58){return new Promise(function(_0x1c2c48,_0x86752b){return client[_0x025b('0x5')](_0x34015d,_0x4c1b58)['then'](function(_0xf0bd10){if(_0xf0bd10[_0x025b('0x6')]){return _0x86752b(_0xf0bd10[_0x025b('0x6')]['message']);}else{return _0x1c2c48(_0xf0bd10[_0x025b('0x7')]);}})[_0x025b('0x8')](function(_0x1add20){return _0x86752b(_0x1add20);});});}exports[_0x025b('0x9')]=function(){return request(_0x025b('0xa'),{'options':{'raw':![],'attributes':['id',_0x025b('0xb'),_0x025b('0xc')]}});};exports['getSquareProject']=function(_0xd885bd){return request(_0x025b('0xd'),{'options':{'raw':![],'where':{'name':_0xd885bd},'attributes':[_0x025b('0xc')]}});};exports[_0x025b('0xe')]=function(_0x2bc2d5){return request(_0x025b('0xf'),{'options':{'raw':![],'where':{'id':_0x2bc2d5},'include':[{'model':_0x025b('0x10'),'as':_0x025b('0x11'),'include':[{'model':_0x025b('0x12'),'as':'CloudProvider'}]}],'attributes':['id',_0x025b('0xb'),_0x025b('0x13')],'smtp':!![]}});};exports[_0x025b('0x14')]=function(_0xe1f393){return request(_0x025b('0xd'),{'options':{'where':{'id':_0xe1f393},'attributes':['name']}});};exports[_0x025b('0x15')]=function(_0x4347ec){return request(_0x025b('0x16'),{'options':{'where':{'id':_0x4347ec},'attributes':[_0x025b('0xb')]}});};exports[_0x025b('0x17')]=function(_0x263191){return request(_0x025b('0x18'),{'options':{'where':{'id':_0x263191},'attributes':['name']}});};exports[_0x025b('0x19')]=function(_0x360856){return request(_0x025b('0x1a'),{'options':{'where':{'id':_0x360856},'attributes':[_0x025b('0x1b')]}});};exports[_0x025b('0x1c')]=function(_0x795cac){return request(_0x025b('0x1d'),{'options':{'where':{'id':_0x795cac},'attributes':['name']}});};exports[_0x025b('0x1e')]=function(_0x3c1a58){return request(_0x025b('0x1f'),{'options':{'where':{'phone':_0x3c1a58[_0x025b('0x20')]},'attributes':['id']}});};exports[_0x025b('0x21')]=function(_0x102b89){return request(_0x025b('0x22'),{'options':{'where':{'id':_0x102b89},'attributes':[_0x025b('0xb')]}});};exports[_0x025b('0x23')]=function(_0x3c26f7){return request('ShowSound',{'options':{'where':{'id':_0x3c26f7},'attributes':[_0x025b('0x24')]}});};exports[_0x025b('0x25')]=function(_0x7430fd){return request(_0x025b('0x26'),{'options':{'raw':![],'where':{'id':_0x7430fd},'include':[{'model':'Interval','as':'Intervals'}]}});};exports[_0x025b('0x27')]=function(_0x415655){return request(_0x025b('0x28'),{'options':{'where':{'id':_0x415655},'attributes':['id',_0x025b('0xb')]}});};exports['createSmsMessage']=function(_0x1c65fc){return request(_0x025b('0x29'),{'body':_0x1c65fc});};exports[_0x025b('0x2a')]=function(_0x1b000c){return request(_0x025b('0x2b'),{'body':_0x1b000c});};exports[_0x025b('0x2c')]=function(_0x18e786){return request(_0x025b('0x2d'),{'body':_[_0x025b('0x2e')](_0x18e786,{'project_name':_0x18e786[_0x025b('0x2f')],'prev_project_name':_0x18e786[_0x025b('0x30')]||'','is_subproject':_0x18e786[_0x025b('0x30')]?!![]:![],'leaveAt':moment()[_0x025b('0x31')](_0x025b('0x32'))})});};exports['createSquareRecording']=function(_0x227e6b){return request(_0x025b('0x33'),{'body':_0x227e6b});};exports[_0x025b('0x34')]=function(_0x2f8a74){return request('CreateSquareMessage',{'body':_0x2f8a74});};exports[_0x025b('0x35')]=function(_0x503aaf){return request(_0x025b('0x36'),{'options':{'raw':![],'where':{'phone':_0x503aaf[_0x025b('0x20')],'ListId':_0x503aaf[_0x025b('0x37')]}}})[_0x025b('0x38')](function(_0x2d074f){if(_0x2d074f){return _0x2d074f;}return request(_0x025b('0x39'),{'body':_0x503aaf});});};exports[_0x025b('0x3a')]=function(_0x562be1){return request(_0x025b('0x3b'),{'options':{'where':{'id':_0x562be1},'attributes':['name']}});};exports[_0x025b('0x3c')]=function(_0xa3a5ab,_0x4646c2){return request(_0x025b('0x3d'),{'body':{'interface':_0x4646c2},'options':{'where':_0xa3a5ab}});};exports['agentPause']=function(_0x2459d3,_0x2d8ffe,_0x3078ea){return request(_0x025b('0x3e'),{'body':{'type':_0x2d8ffe,'uniqueid':_0x3078ea},'options':{'where':_0x2459d3}});};exports[_0x025b('0x3f')]=function(_0x2743e5){return request(_0x025b('0x40'),{'body':{},'options':{'where':_0x2743e5}});};exports[_0x025b('0x41')]=function(_0x5bb39f){return request(_0x025b('0x42'),{'body':{},'options':{'where':_0x5bb39f}});}; \ No newline at end of file +var _0xea89=['getIntervalById','ShowInterval','Intervals','ShowSmsAccount','createSmsMessage','createSquareDetailsReport','CreateSquareDetailsReport','createSquareReport','CreateSquareReport','merge','arg_2','format','createSquareRecording','CreateSquareRecording','CreateSquareMessage','createCmContact','ShowCmHopper','CreateCmContact','getPauseById','ShowPause','agentLogin','LoginUser','agentPause','PauseUser','agentUnpause','UnpauseUser','LogoutUser','lodash','moment','jayson/promise','client','http','then','error','message','result','catch','getSquareProjects','GetSquareProjects','production','getSquareProject','getMailAccountById','ShowMailAccount','MailServerOut','Smtp','CloudProvider','name','email','getSquareProjectById','ShowSquareProject','getVoiceQueueById','ShowVoiceQueue','getVariableById','ShowVariable','getSquareOdbcById','ShowSquareOdbc','getUserById','ShowUser','getContactByPhone','GetContactByPhone','getTrunkById','ShowTrunk','getSoundById','ShowSound','save_name'];(function(_0x30d87a,_0xf3a07f){var _0x48f64b=function(_0x2078b7){while(--_0x2078b7){_0x30d87a['push'](_0x30d87a['shift']());}};_0x48f64b(++_0xf3a07f);}(_0xea89,0x1e2));var _0x9ea8=function(_0x3cc1bf,_0x34455c){_0x3cc1bf=_0x3cc1bf-0x0;var _0x3e867d=_0xea89[_0x3cc1bf];return _0x3e867d;};'use strict';var _=require(_0x9ea8('0x0'));var moment=require(_0x9ea8('0x1'));var jayson=require(_0x9ea8('0x2'));var client=jayson[_0x9ea8('0x3')][_0x9ea8('0x4')]({'port':0x2329});function request(_0x58dc99,_0x41e322){return new Promise(function(_0x520915,_0x226d05){return client['request'](_0x58dc99,_0x41e322)[_0x9ea8('0x5')](function(_0x3ec628){if(_0x3ec628[_0x9ea8('0x6')]){return _0x226d05(_0x3ec628[_0x9ea8('0x6')][_0x9ea8('0x7')]);}else{return _0x520915(_0x3ec628[_0x9ea8('0x8')]);}})[_0x9ea8('0x9')](function(_0x4889de){return _0x226d05(_0x4889de);});});}exports[_0x9ea8('0xa')]=function(){return request(_0x9ea8('0xb'),{'options':{'raw':![],'attributes':['id','name',_0x9ea8('0xc')]}});};exports[_0x9ea8('0xd')]=function(_0x2de710){return request('ShowSquareProject',{'options':{'raw':![],'where':{'name':_0x2de710},'attributes':[_0x9ea8('0xc')]}});};exports[_0x9ea8('0xe')]=function(_0xe888c6){return request(_0x9ea8('0xf'),{'options':{'raw':![],'where':{'id':_0xe888c6},'include':[{'model':_0x9ea8('0x10'),'as':_0x9ea8('0x11'),'include':[{'model':_0x9ea8('0x12'),'as':'CloudProvider'}]}],'attributes':['id',_0x9ea8('0x13'),_0x9ea8('0x14')],'smtp':!![]}});};exports[_0x9ea8('0x15')]=function(_0x4c894d){return request(_0x9ea8('0x16'),{'options':{'where':{'id':_0x4c894d},'attributes':[_0x9ea8('0x13')]}});};exports[_0x9ea8('0x17')]=function(_0x1b8bd6){return request(_0x9ea8('0x18'),{'options':{'where':{'id':_0x1b8bd6},'attributes':[_0x9ea8('0x13')]}});};exports[_0x9ea8('0x19')]=function(_0x5866f3){return request(_0x9ea8('0x1a'),{'options':{'where':{'id':_0x5866f3},'attributes':[_0x9ea8('0x13')]}});};exports[_0x9ea8('0x1b')]=function(_0x5c17fe){return request(_0x9ea8('0x1c'),{'options':{'where':{'id':_0x5c17fe},'attributes':['dsn']}});};exports[_0x9ea8('0x1d')]=function(_0x26de62){return request(_0x9ea8('0x1e'),{'options':{'where':{'id':_0x26de62},'attributes':[_0x9ea8('0x13')]}});};exports[_0x9ea8('0x1f')]=function(_0xe844a5){return request(_0x9ea8('0x20'),{'options':{'where':{'phone':_0xe844a5['phone']},'attributes':['id']}});};exports[_0x9ea8('0x21')]=function(_0x400e8e){return request(_0x9ea8('0x22'),{'options':{'where':{'id':_0x400e8e},'attributes':[_0x9ea8('0x13')]}});};exports[_0x9ea8('0x23')]=function(_0xbafa7){return request(_0x9ea8('0x24'),{'options':{'where':{'id':_0xbafa7},'attributes':[_0x9ea8('0x25')]}});};exports[_0x9ea8('0x26')]=function(_0x14f411){return request(_0x9ea8('0x27'),{'options':{'raw':![],'where':{'id':_0x14f411},'include':[{'model':'Interval','as':_0x9ea8('0x28')}]}});};exports['getSmsAccountById']=function(_0x40451f){return request(_0x9ea8('0x29'),{'options':{'where':{'id':_0x40451f},'attributes':['id',_0x9ea8('0x13')]}});};exports[_0x9ea8('0x2a')]=function(_0x1bfd77){return request('CreateSmsMessage',{'body':_0x1bfd77});};exports[_0x9ea8('0x2b')]=function(_0x25b74d){return request(_0x9ea8('0x2c'),{'body':_0x25b74d});};exports[_0x9ea8('0x2d')]=function(_0x2e621e){return request(_0x9ea8('0x2e'),{'body':_[_0x9ea8('0x2f')](_0x2e621e,{'project_name':_0x2e621e['arg_1'],'prev_project_name':_0x2e621e['arg_2']||'','is_subproject':_0x2e621e[_0x9ea8('0x30')]?!![]:![],'leaveAt':moment()[_0x9ea8('0x31')]('YYYY-MM-DD\x20HH:mm:ss')})});};exports[_0x9ea8('0x32')]=function(_0x30a032){return request(_0x9ea8('0x33'),{'body':_0x30a032});};exports['createSquareMessage']=function(_0x494211){return request(_0x9ea8('0x34'),{'body':_0x494211});};exports[_0x9ea8('0x35')]=function(_0x462f2){return request(_0x9ea8('0x36'),{'options':{'raw':![],'where':{'phone':_0x462f2['phone'],'ListId':_0x462f2['ListId']}}})[_0x9ea8('0x5')](function(_0x1f90bf){if(_0x1f90bf){return _0x1f90bf;}return request(_0x9ea8('0x37'),{'body':_0x462f2});});};exports[_0x9ea8('0x38')]=function(_0x3576c7){return request(_0x9ea8('0x39'),{'options':{'where':{'id':_0x3576c7},'attributes':['name']}});};exports[_0x9ea8('0x3a')]=function(_0x298944,_0x2fe23e){return request(_0x9ea8('0x3b'),{'body':{'interface':_0x2fe23e},'options':{'where':_0x298944}});};exports[_0x9ea8('0x3c')]=function(_0x199353,_0xb99172,_0x29e785){return request(_0x9ea8('0x3d'),{'body':{'type':_0xb99172,'uniqueid':_0x29e785},'options':{'where':_0x199353}});};exports[_0x9ea8('0x3e')]=function(_0x1816b9){return request(_0x9ea8('0x3f'),{'body':{},'options':{'where':_0x1816b9}});};exports['agentLogout']=function(_0x4e6ddd){return request(_0x9ea8('0x40'),{'body':{},'options':{'where':_0x4e6ddd}});}; \ No newline at end of file diff --git a/server/services/agi/scripts/aws/index.js b/server/services/agi/scripts/aws/index.js index b40bb18..1d5d537 100644 --- a/server/services/agi/scripts/aws/index.js +++ b/server/services/agi/scripts/aws/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x042a=['exports','./polly'];(function(_0x35cb76,_0x270c53){var _0x300483=function(_0x334ca7){while(--_0x334ca7){_0x35cb76['push'](_0x35cb76['shift']());}};_0x300483(++_0x270c53);}(_0x042a,0x1d9));var _0xa042=function(_0x131694,_0x56c2b3){_0x131694=_0x131694-0x0;var _0x51bbbc=_0x042a[_0x131694];return _0x51bbbc;};var polly=require(_0xa042('0x0'));var lex=require('./lex');module[_0xa042('0x1')]={'polly':polly,'lex':lex}; \ No newline at end of file +var _0x2d95=['./polly','exports'];(function(_0x472c0b,_0x5a8dfd){var _0x22f403=function(_0x14d507){while(--_0x14d507){_0x472c0b['push'](_0x472c0b['shift']());}};_0x22f403(++_0x5a8dfd);}(_0x2d95,0xca));var _0x52d9=function(_0x2c9b1a,_0x1fcbb9){_0x2c9b1a=_0x2c9b1a-0x0;var _0x19c335=_0x2d95[_0x2c9b1a];return _0x19c335;};var polly=require(_0x52d9('0x0'));var lex=require('./lex');module[_0x52d9('0x1')]={'polly':polly,'lex':lex}; \ No newline at end of file diff --git a/server/services/agi/scripts/aws/lex/index.js b/server/services/agi/scripts/aws/lex/index.js index 75e7f36..c262e87 100644 --- a/server/services/agi/scripts/aws/lex/index.js +++ b/server/services/agi/scripts/aws/lex/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x6c76=['./lib/api','exports'];(function(_0x586276,_0x43a98b){var _0x5e2ab4=function(_0xe246a7){while(--_0xe246a7){_0x586276['push'](_0x586276['shift']());}};_0x5e2ab4(++_0x43a98b);}(_0x6c76,0x184));var _0x66c7=function(_0x118503,_0x534758){_0x118503=_0x118503-0x0;var _0x3507cf=_0x6c76[_0x118503];return _0x3507cf;};'use strict';var lex=require(_0x66c7('0x0'));module[_0x66c7('0x1')]=function(_0x10a050,_0x55604c,_0x203e75,_0xd49f21,_0x519756,_0x572a2b){return lex(_0x10a050,_0x55604c,_0x203e75,_0xd49f21,_0x519756,_0x572a2b);}; \ No newline at end of file +var _0x6f0d=['exports'];(function(_0x224ebe,_0x1180af){var _0x198652=function(_0x1ad5e7){while(--_0x1ad5e7){_0x224ebe['push'](_0x224ebe['shift']());}};_0x198652(++_0x1180af);}(_0x6f0d,0x16c));var _0xd6f0=function(_0x1e6b82,_0x401404){_0x1e6b82=_0x1e6b82-0x0;var _0x500461=_0x6f0d[_0x1e6b82];return _0x500461;};'use strict';var lex=require('./lib/api');module[_0xd6f0('0x0')]=function(_0x64ebf2,_0xd1480,_0x107a8c,_0x573473,_0x275230,_0x135a93){return lex(_0x64ebf2,_0xd1480,_0x107a8c,_0x573473,_0x275230,_0x135a93);}; \ No newline at end of file diff --git a/server/services/agi/scripts/aws/lex/lib/api.js b/server/services/agi/scripts/aws/lex/lib/api.js index 1bee3de..4b95102 100644 --- a/server/services/agi/scripts/aws/lex/lib/api.js +++ b/server/services/agi/scripts/aws/lex/lib/api.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xa9e0=['LexRuntime','bluebird','aws-sdk','slots','hasOwnProperty'];(function(_0x362933,_0x367669){var _0xaaddae=function(_0x4cd07a){while(--_0x4cd07a){_0x362933['push'](_0x362933['shift']());}};_0xaaddae(++_0x367669);}(_0xa9e0,0x123));var _0x0a9e=function(_0x49ca18,_0x5e6d05){_0x49ca18=_0x49ca18-0x0;var _0x145d54=_0xa9e0[_0x49ca18];return _0x145d54;};'use strict';var BPromise=require(_0x0a9e('0x0'));var AWS=require(_0x0a9e('0x1'));function lexResult(_0x29929c,_0x5dd881){return new BPromise(function(_0x550fbc,_0x18d5c9){_0x29929c['postText'](_0x5dd881,function(_0x333808,_0x432180){if(_0x333808){_0x18d5c9(_0x333808);}if(_0x432180[_0x0a9e('0x2')]){for(const _0x991246 in _0x432180[_0x0a9e('0x2')]){if(_0x432180['slots'][_0x0a9e('0x3')](_0x991246)){var _0x441e3a=_0x432180[_0x0a9e('0x2')][_0x991246];_0x432180['slot_'+_0x991246]=_0x441e3a;}}}_0x550fbc(_0x432180);});});}module['exports']=function(_0xe42b77,_0x56465b,_0x52cace,_0x39753a,_0xf81284,_0x307b3e){var _0x3ab53f=new AWS[(_0x0a9e('0x4'))]({'accessKeyId':_0x56465b,'secretAccessKey':_0x52cace,'region':_0x39753a});var _0xbd1168={'botAlias':'$LATEST','botName':_0x307b3e,'inputText':_0xf81284,'userId':_0xe42b77};return lexResult(_0x3ab53f,_0xbd1168);}; \ No newline at end of file +var _0xa9e0=['LexRuntime','bluebird','aws-sdk','slots','hasOwnProperty'];(function(_0x5d5f36,_0x32fb55){var _0x1b77ce=function(_0x4e0edd){while(--_0x4e0edd){_0x5d5f36['push'](_0x5d5f36['shift']());}};_0x1b77ce(++_0x32fb55);}(_0xa9e0,0x123));var _0x0a9e=function(_0xa1e3e3,_0x29fe0e){_0xa1e3e3=_0xa1e3e3-0x0;var _0xc980e9=_0xa9e0[_0xa1e3e3];return _0xc980e9;};'use strict';var BPromise=require(_0x0a9e('0x0'));var AWS=require(_0x0a9e('0x1'));function lexResult(_0x29929c,_0x5dd881){return new BPromise(function(_0x550fbc,_0x18d5c9){_0x29929c['postText'](_0x5dd881,function(_0x333808,_0x432180){if(_0x333808){_0x18d5c9(_0x333808);}if(_0x432180[_0x0a9e('0x2')]){for(const _0x991246 in _0x432180[_0x0a9e('0x2')]){if(_0x432180['slots'][_0x0a9e('0x3')](_0x991246)){var _0x441e3a=_0x432180[_0x0a9e('0x2')][_0x991246];_0x432180['slot_'+_0x991246]=_0x441e3a;}}}_0x550fbc(_0x432180);});});}module['exports']=function(_0xe42b77,_0x56465b,_0x52cace,_0x39753a,_0xf81284,_0x307b3e){var _0x3ab53f=new AWS[(_0x0a9e('0x4'))]({'accessKeyId':_0x56465b,'secretAccessKey':_0x52cace,'region':_0x39753a});var _0xbd1168={'botAlias':'$LATEST','botName':_0x307b3e,'inputText':_0xf81284,'userId':_0xe42b77};return lexResult(_0x3ab53f,_0xbd1168);}; \ No newline at end of file diff --git a/server/services/agi/scripts/aws/polly/index.js b/server/services/agi/scripts/aws/polly/index.js index afe6e73..f6ff91e 100644 --- a/server/services/agi/scripts/aws/polly/index.js +++ b/server/services/agi/scripts/aws/polly/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x222a=['./lib/api','exports'];(function(_0x39f849,_0x296f21){var _0x519013=function(_0x5ce784){while(--_0x5ce784){_0x39f849['push'](_0x39f849['shift']());}};_0x519013(++_0x296f21);}(_0x222a,0x8a));var _0xa222=function(_0x104d1e,_0x4c4941){_0x104d1e=_0x104d1e-0x0;var _0x599efa=_0x222a[_0x104d1e];return _0x599efa;};'use strict';var polly=require(_0xa222('0x0'));module[_0xa222('0x1')]=function(_0x5139f4,_0x179518,_0x374460,_0x5691cb,_0x1a97cb,_0x3f301b,_0x2e1dff){return polly(_0x5139f4,_0x179518,_0x374460,_0x5691cb,_0x1a97cb,_0x3f301b,_0x2e1dff);}; \ No newline at end of file +'use strict';var polly=require('./lib/api');module['exports']=function(_0x54f01e,_0x577dec,_0x312d3f,_0x58ebcf,_0x19c230,_0x271f3d,_0x109c83){return polly(_0x54f01e,_0x577dec,_0x312d3f,_0x58ebcf,_0x19c230,_0x271f3d,_0x109c83);}; \ No newline at end of file diff --git a/server/services/agi/scripts/aws/polly/lib/api.js b/server/services/agi/scripts/aws/polly/lib/api.js index a74acea..c9369f8 100644 --- a/server/services/agi/scripts/aws/polly/lib/api.js +++ b/server/services/agi/scripts/aws/polly/lib/api.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x656f=['path','bluebird','randomstring','synthesizeSpeech','writeFile','Invalid\x20data\x20response\x20from\x20aws\x20Polly!','No\x20data\x20response\x20from\x20aws\x20Polly!','text','mp3'];(function(_0x488b85,_0x10ec23){var _0x59d07d=function(_0x16838b){while(--_0x16838b){_0x488b85['push'](_0x488b85['shift']());}};_0x59d07d(++_0x10ec23);}(_0x656f,0x1b0));var _0xf656=function(_0x540154,_0x2d9916){_0x540154=_0x540154-0x0;var _0x4926b7=_0x656f[_0x540154];return _0x4926b7;};'use strict';var fs=require('fs');var path=require(_0xf656('0x0'));var BPromise=require(_0xf656('0x1'));var rs=require(_0xf656('0x2'));var AWS=require('aws-sdk');function pollyResult(_0xaba512,_0xb6fa99,_0xaef75e){return new BPromise(function(_0x48c6c3,_0x1f2272){_0xaba512[_0xf656('0x3')](_0xb6fa99,function(_0x6dac31,_0x5347a3){if(_0x6dac31){_0x1f2272(_0x6dac31);}else if(_0x5347a3){if(_0x5347a3['AudioStream']instanceof Buffer){fs[_0xf656('0x4')](_0xaef75e,_0x5347a3['AudioStream'],function(_0xdcbf18){if(_0xdcbf18){_0x1f2272(_0xdcbf18);}else{_0x48c6c3();}});}else{_0x1f2272(new Error(_0xf656('0x5')));}}else{_0x1f2272(new Error(_0xf656('0x6')));}});});}module['exports']=function(_0x9df632,_0x59b00f,_0x5376b1,_0xf4d9dc,_0x29b96e,_0x23fce6,_0x351132){var _0x32ee6d=new AWS['Polly']({'accessKeyId':_0x9df632,'secretAccessKey':_0x59b00f,'region':_0x5376b1});var _0x30c30f={'Text':_0x29b96e,'TextType':_0x23fce6||_0xf656('0x7'),'OutputFormat':_0xf656('0x8'),'VoiceId':_0xf4d9dc};return pollyResult(_0x32ee6d,_0x30c30f,_0x351132);}; \ No newline at end of file +var _0x6295=['path','bluebird','aws-sdk','synthesizeSpeech','AudioStream','Invalid\x20data\x20response\x20from\x20aws\x20Polly!','exports','text','mp3'];(function(_0x24a711,_0x2c44e7){var _0x24dad5=function(_0x530840){while(--_0x530840){_0x24a711['push'](_0x24a711['shift']());}};_0x24dad5(++_0x2c44e7);}(_0x6295,0x129));var _0x5629=function(_0x15bc81,_0x4d4f77){_0x15bc81=_0x15bc81-0x0;var _0x59440e=_0x6295[_0x15bc81];return _0x59440e;};'use strict';var fs=require('fs');var path=require(_0x5629('0x0'));var BPromise=require(_0x5629('0x1'));var rs=require('randomstring');var AWS=require(_0x5629('0x2'));function pollyResult(_0xae45b4,_0x31f9c1,_0x523f7a){return new BPromise(function(_0x48fff5,_0xb50677){_0xae45b4[_0x5629('0x3')](_0x31f9c1,function(_0x51525f,_0x230809){if(_0x51525f){_0xb50677(_0x51525f);}else if(_0x230809){if(_0x230809[_0x5629('0x4')]instanceof Buffer){fs['writeFile'](_0x523f7a,_0x230809[_0x5629('0x4')],function(_0x261768){if(_0x261768){_0xb50677(_0x261768);}else{_0x48fff5();}});}else{_0xb50677(new Error(_0x5629('0x5')));}}else{_0xb50677(new Error('No\x20data\x20response\x20from\x20aws\x20Polly!'));}});});}module[_0x5629('0x6')]=function(_0x34de86,_0x215b42,_0x4433e2,_0xb9aed8,_0x4a05e7,_0x3a9cbf,_0x57cf59){var _0x12c3f5=new AWS['Polly']({'accessKeyId':_0x34de86,'secretAccessKey':_0x215b42,'region':_0x4433e2});var _0x36ae1b={'Text':_0x4a05e7,'TextType':_0x3a9cbf||_0x5629('0x7'),'OutputFormat':_0x5629('0x8'),'VoiceId':_0xb9aed8};return pollyResult(_0x12c3f5,_0x36ae1b,_0x57cf59);}; \ No newline at end of file diff --git a/server/services/agi/scripts/google/asr/index.js b/server/services/agi/scripts/google/asr/index.js index 50affe3..6e46bd1 100644 --- a/server/services/agi/scripts/google/asr/index.js +++ b/server/services/agi/scripts/google/asr/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xfe17=['exports','./lib/api'];(function(_0x3d8be5,_0x4054c1){var _0x301093=function(_0x5676c5){while(--_0x5676c5){_0x3d8be5['push'](_0x3d8be5['shift']());}};_0x301093(++_0x4054c1);}(_0xfe17,0x145));var _0x7fe1=function(_0x43e9c6,_0x27b700){_0x43e9c6=_0x43e9c6-0x0;var _0xaa063=_0xfe17[_0x43e9c6];return _0xaa063;};'use strict';var asr=require(_0x7fe1('0x0'));module[_0x7fe1('0x1')]=function(_0x599074,_0x34ad4a,_0x393612,_0x23348b){return asr(_0x599074,_0x34ad4a,_0x393612);}; \ No newline at end of file +var _0x23f3=['./lib/api','exports'];(function(_0x2967ac,_0x568836){var _0x37a954=function(_0x336243){while(--_0x336243){_0x2967ac['push'](_0x2967ac['shift']());}};_0x37a954(++_0x568836);}(_0x23f3,0x98));var _0x323f=function(_0x416d21,_0x55e886){_0x416d21=_0x416d21-0x0;var _0x308678=_0x23f3[_0x416d21];return _0x308678;};'use strict';var asr=require(_0x323f('0x0'));module[_0x323f('0x1')]=function(_0x1f178d,_0x483bd4,_0x2d5c97,_0x23ba49){return asr(_0x1f178d,_0x483bd4,_0x2d5c97);}; \ No newline at end of file diff --git a/server/services/agi/scripts/google/asr/lib/api.js b/server/services/agi/scripts/google/asr/lib/api.js index aa7e0f9..4011926 100644 --- a/server/services/agi/scripts/google/asr/lib/api.js +++ b/server/services/agi/scripts/google/asr/lib/api.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xaf93=['length','filepath\x20should\x20be\x20a\x20string','key\x20should\x20be\x20a\x20string','readFileSync','POST','/v1/speech:recognize?key=','LINEAR16','url','bluebird','string'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0xaf93,0x151));var _0x3af9=function(_0x2380cb,_0x3503e7){_0x2380cb=_0x2380cb-0x0;var _0x42e80b=_0xaf93[_0x2380cb];return _0x42e80b;};'use strict';var url=require(_0x3af9('0x0'));var BPromise=require(_0x3af9('0x1'));var fs=require('fs');var host='https://speech.googleapis.com';module['exports']=function(_0x13f5d7,_0x3e84b6,_0x528aa0){return new BPromise(function(_0x1319bc,_0x44ae6e){var _0x5add3;if(typeof _0x13f5d7!==_0x3af9('0x2')||_0x13f5d7[_0x3af9('0x3')]===0x0){return _0x44ae6e(_0x3af9('0x4'));}if(typeof _0x3e84b6!==_0x3af9('0x2')||_0x3e84b6['length']===0x0){return _0x44ae6e(_0x3af9('0x5'));}if(typeof _0x528aa0!=='undefined'&&(typeof _0x528aa0!==_0x3af9('0x2')||_0x528aa0['length']===0x0)){return _0x44ae6e('lang\x20should\x20be\x20a\x20string');}try{_0x5add3=fs[_0x3af9('0x6')](_0x13f5d7)['toString']('base64');}catch(_0x1313eb){return _0x44ae6e(_0x1313eb);}return _0x1319bc({'method':_0x3af9('0x7'),'uri':host+_0x3af9('0x8')+_0x3e84b6,'body':{'config':{'encoding':_0x3af9('0x9'),'sampleRateHertz':'8000','languageCode':_0x528aa0},'audio':{'content':_0x5add3}},'json':!![]});});}; \ No newline at end of file +var _0x5645=['https://speech.googleapis.com','exports','string','length','filepath\x20should\x20be\x20a\x20string','lang\x20should\x20be\x20a\x20string','readFileSync','toString','POST','LINEAR16','8000','url','bluebird'];(function(_0x216f4a,_0x5206b3){var _0x429901=function(_0x281370){while(--_0x281370){_0x216f4a['push'](_0x216f4a['shift']());}};_0x429901(++_0x5206b3);}(_0x5645,0x19e));var _0x5564=function(_0x3f5d48,_0x1f64bd){_0x3f5d48=_0x3f5d48-0x0;var _0x4576e8=_0x5645[_0x3f5d48];return _0x4576e8;};'use strict';var url=require(_0x5564('0x0'));var BPromise=require(_0x5564('0x1'));var fs=require('fs');var host=_0x5564('0x2');module[_0x5564('0x3')]=function(_0x26c54d,_0x5ecd66,_0x241816){return new BPromise(function(_0x64ae4d,_0x1240cd){var _0x821a1a;if(typeof _0x26c54d!==_0x5564('0x4')||_0x26c54d[_0x5564('0x5')]===0x0){return _0x1240cd(_0x5564('0x6'));}if(typeof _0x5ecd66!==_0x5564('0x4')||_0x5ecd66[_0x5564('0x5')]===0x0){return _0x1240cd('key\x20should\x20be\x20a\x20string');}if(typeof _0x241816!=='undefined'&&(typeof _0x241816!==_0x5564('0x4')||_0x241816[_0x5564('0x5')]===0x0)){return _0x1240cd(_0x5564('0x7'));}try{_0x821a1a=fs[_0x5564('0x8')](_0x26c54d)[_0x5564('0x9')]('base64');}catch(_0x1ba45a){return _0x1240cd(_0x1ba45a);}return _0x64ae4d({'method':_0x5564('0xa'),'uri':host+'/v1/speech:recognize?key='+_0x5ecd66,'body':{'config':{'encoding':_0x5564('0xb'),'sampleRateHertz':_0x5564('0xc'),'languageCode':_0x241816},'audio':{'content':_0x821a1a}},'json':!![]});});}; \ No newline at end of file diff --git a/server/services/agi/scripts/google/index.js b/server/services/agi/scripts/google/index.js index 3201bd6..be8af2d 100644 --- a/server/services/agi/scripts/google/index.js +++ b/server/services/agi/scripts/google/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x54c4=['./asr','exports'];(function(_0x2af077,_0x32c868){var _0x310158=function(_0x511cd2){while(--_0x511cd2){_0x2af077['push'](_0x2af077['shift']());}};_0x310158(++_0x32c868);}(_0x54c4,0xf4));var _0x454c=function(_0x48dba0,_0x43269d){_0x48dba0=_0x48dba0-0x0;var _0x18c2fc=_0x54c4[_0x48dba0];return _0x18c2fc;};var asr=require(_0x454c('0x0'));module[_0x454c('0x1')]={'asr':asr}; \ No newline at end of file +var _0x551f=['./asr'];(function(_0x3f36c3,_0x2de571){var _0x18bbe3=function(_0xa344f4){while(--_0xa344f4){_0x3f36c3['push'](_0x3f36c3['shift']());}};_0x18bbe3(++_0x2de571);}(_0x551f,0x70));var _0xf551=function(_0x392ca2,_0x2ddc48){_0x392ca2=_0x392ca2-0x0;var _0x582879=_0x551f[_0x392ca2];return _0x582879;};var asr=require(_0xf551('0x0'));module['exports']={'asr':asr}; \ No newline at end of file diff --git a/server/services/agi/scripts/index.js b/server/services/agi/scripts/index.js index 5dd5439..9f94a8b 100644 --- a/server/services/agi/scripts/index.js +++ b/server/services/agi/scripts/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x76ae=['channelData','CustomAction','CustomActionData','AudioFromTts','Data','audiofile','dirName','apiai-promise','bluebird','dialogflow','https','md5','path','request-promise','randomstring','sox','google-tts-api','url','parse','util','./google','./tilde','../../../config/logger','agi','https://api.ispeech.org/api/rest','protocol','https:','host','get','error','request\x20to\x20','\x20failed,\x20status\x20code\x20=\x20','statusMessage','createWriteStream','finish','info','finish\x20download\x20file','download\x20error','pipe','end','WHAT_EVER','statusCode','data','transcode','error\x20convert','resolve','tmp','generate','.wav','writeFileSync','base64','then','chmodSync','777','split','readFileSync','toString','googleCloudTTS','?key=','ssml','input','voice','audioConfig','MP3','text:synthesize','.mp3','from','audioContent','writeFile','googleTTS','utf8','POST','application/x-www-form-urlencoded','f.req=','null','generic','slice','parse\x20response\x20failed:\x0a','length','text\x20length\x20limit\x20reached','lang\x20\x22','\x22\x20might\x20not\x20exist','unlink','goggleTTS\x20path','googleASR','asr','uri','results','map','alternatives','transcript','join','confidence','googleASR\x20transcription','googleASR\x20confidence','catch','name','message','textRequest','result','source','action','actionIncomplete','fulfillment','speech','score','status','endConversation','metadata','isFallbackIntent','googleDialogflowV2','replace','SessionsClient','sessionPath','detectIntent','Dialogflow\x20V2\x20response:','queryResult','diagnosticInfo','end_conversation','boolValue','fulfillmentText','intent','displayName','languageCode','queryText','responseId','intentDetectionConfidence','stringify','Tilde\x20ASR\x20transcription','awsPolly','awsLex','lex','format','%s?apikey=%s&action=convert&text=%s&voice=%s&speed=%s&format=mp3','ispeechASR','%s?apikey=%s&action=recognize&locale=%s&content-type=audio/x-wav&audio=%s&%s','nda','text'];(function(_0x527a9d,_0x22824d){var _0x50105a=function(_0x2406f7){while(--_0x2406f7){_0x527a9d['push'](_0x527a9d['shift']());}};_0x50105a(++_0x22824d);}(_0x76ae,0x91));var _0xe76a=function(_0x37a8b5,_0x142eb2){_0x37a8b5=_0x37a8b5-0x0;var _0x51697f=_0x76ae[_0x37a8b5];return _0x51697f;};'use strict';var apiai=require(_0xe76a('0x0'));var BPromise=require(_0xe76a('0x1'));var dialogflow=require(_0xe76a('0x2'));var fs=require('fs');var http=require('http');var https=require(_0xe76a('0x3'));var md5=require(_0xe76a('0x4'));var path=require(_0xe76a('0x5'));var querystring=require('querystring');var rp=require(_0xe76a('0x6'));var rs=require(_0xe76a('0x7'));var sox=require(_0xe76a('0x8'));var tts=require(_0xe76a('0x9'));var urlParse=require(_0xe76a('0xa'))[_0xe76a('0xb')];var util=require(_0xe76a('0xc'));var aws=require('./aws');var google=require(_0xe76a('0xd'));var sestek=require('./sestek');var tilde=require(_0xe76a('0xe'));var logger=require(_0xe76a('0xf'))(_0xe76a('0x10'));var ISPEECH_API=_0xe76a('0x11');function downloadFile(_0x186738,_0x190f34){return new BPromise(function(_0x3d955e,_0x521135){var _0xec3179=urlParse(_0x186738);var _0x352c8d=_0xec3179[_0xe76a('0x12')]===_0xe76a('0x13')?https:http;var _0x1eddaa={'host':_0xec3179[_0xe76a('0x14')],'path':_0xec3179['path'],'headers':{'user-agent':'WHAT_EVER'}};_0x352c8d[_0xe76a('0x15')](_0x1eddaa,function(_0x43d1fe){if(_0x43d1fe['statusCode']!==0xc8){logger[_0xe76a('0x16')](_0xe76a('0x17')+_0x186738+_0xe76a('0x18')+_0x43d1fe['statusCode']+'\x20('+_0x43d1fe[_0xe76a('0x19')]+')');_0x521135(new Error(_0xe76a('0x17')+_0x186738+'\x20failed,\x20status\x20code\x20=\x20'+_0x43d1fe['statusCode']+'\x20('+_0x43d1fe[_0xe76a('0x19')]+')'));return;}var _0x584cd3=fs[_0xe76a('0x1a')](_0x190f34);_0x584cd3['on'](_0xe76a('0x1b'),function(){logger[_0xe76a('0x1c')](_0xe76a('0x1d'));_0x584cd3['close'](_0x3d955e);});_0x584cd3['on'](_0xe76a('0x16'),function(_0x5ff33e){fs['unlink'](_0x190f34);logger[_0xe76a('0x16')](_0xe76a('0x1e'),_0x5ff33e);_0x521135(_0x5ff33e);});_0x43d1fe[_0xe76a('0x1f')](_0x584cd3);})['on'](_0xe76a('0x16'),function(_0x5e4ec5){logger[_0xe76a('0x16')](_0x5e4ec5);_0x521135(_0x5e4ec5);})[_0xe76a('0x20')]();});}function uploadFile(_0x29d9e3){return new BPromise(function(_0x1007f0,_0x5c5ecf){var _0x3b0249=urlParse(_0x29d9e3);var _0x28eddc=_0x3b0249[_0xe76a('0x12')]==='https:'?https:http;var _0x2399b3={'host':_0x3b0249[_0xe76a('0x14')],'path':_0x3b0249[_0xe76a('0x5')],'headers':{'user-agent':_0xe76a('0x21')}};_0x28eddc[_0xe76a('0x15')](_0x2399b3,function(_0x3d523d){if(_0x3d523d[_0xe76a('0x22')]!==0xc8){_0x5c5ecf(new Error(_0xe76a('0x17')+_0x29d9e3+_0xe76a('0x18')+_0x3d523d[_0xe76a('0x22')]+'\x20('+_0x3d523d[_0xe76a('0x19')]+')'));return;}var _0x21bad0='';_0x3d523d['on'](_0xe76a('0x23'),function(_0x372ca8){_0x21bad0+=_0x372ca8;});_0x3d523d['on'](_0xe76a('0x20'),function(){_0x1007f0(_0x21bad0);});})['on'](_0xe76a('0x16'),function(_0x4c53b4){_0x5c5ecf(_0x4c53b4);})['end']();});}function convertFile(_0x2f4a44,_0x5703b8){return new BPromise(function(_0x252545,_0x33b700){var _0x4792d1=sox[_0xe76a('0x24')](_0x2f4a44,_0x5703b8,{'sampleRate':0x1f40,'format':'wav','channelCount':0x1,'bitRate':0xc0*0x400,'compressionQuality':0x5});_0x4792d1['on']('error',function(_0x32cfdb){logger[_0xe76a('0x16')](_0xe76a('0x25'),_0x32cfdb);_0x33b700(_0x32cfdb);});_0x4792d1['on']('end',function(){logger[_0xe76a('0x1c')]('finish\x20to\x20convert');_0x252545();});_0x4792d1['start']();});}function base64Decode(_0x357b03,_0x27411d){var _0x50a8bc=path[_0xe76a('0x26')](__dirname,_0xe76a('0x27'),rs[_0xe76a('0x28')](0x4)+_0xe76a('0x29'));fs[_0xe76a('0x2a')](_0x50a8bc,_0x357b03,_0xe76a('0x2b'));return convertFile(_0x50a8bc,_0x27411d)[_0xe76a('0x2c')](function(){try{fs['unlink'](_0x50a8bc);fs[_0xe76a('0x2d')](_0x27411d,_0xe76a('0x2e'));}catch(_0x2c0a73){logger[_0xe76a('0x16')](_0x2c0a73);}return _0x27411d[_0xe76a('0x2f')]('.')[0x0];});}function base64Encode(_0xc8947e){var _0x446b22=fs[_0xe76a('0x30')](_0xc8947e);return new Buffer(_0x446b22)[_0xe76a('0x31')](_0xe76a('0x2b'));}exports[_0xe76a('0x32')]=function(_0x3c8e20,_0x8c75e2,_0x386398,_0x56538c,_0x475e14,_0x588091){var _0x5aaf69,_0x573386;var _0x29e63a='https://texttospeech.googleapis.com/v1/';var _0x47bf30=_0xe76a('0x33')+_0x3c8e20;var _0x210def={};if(_0x8c75e2===_0xe76a('0x34')){_0x210def[_0xe76a('0x35')]={'ssml':_0x386398};}else{_0x210def[_0xe76a('0x35')]={'text':_0x386398};};_0x210def[_0xe76a('0x36')]={'languageCode':_0x56538c,'ssmlGender':_0x475e14};_0x210def[_0xe76a('0x37')]={'audioEncoding':_0xe76a('0x38'),'sampleRateHertz':0x1f40};var _0x5e06f1={'url':_0x29e63a+_0xe76a('0x39')+_0x47bf30,'method':'POST','json':!![],'body':_0x210def};return rp(_0x5e06f1)['then'](function(_0x47b26e){return new BPromise(function(_0x736e79,_0xb9df06){_0x5aaf69=path['resolve'](__dirname,'tmp',rs['generate'](0x4)+_0xe76a('0x3a'));var _0x5657e2=Buffer[_0xe76a('0x3b')](_0x47b26e[_0xe76a('0x3c')],_0xe76a('0x2b'));return fs[_0xe76a('0x3d')](_0x5aaf69,_0x5657e2,function(_0x17707f){_0xb9df06(_0x17707f);},function(_0x43336e){fs[_0xe76a('0x2d')](_0x5aaf69,'777');_0x736e79(_0x43336e);});});})[_0xe76a('0x2c')](function(_0xcc87){_0x573386=path['resolve'](__dirname,_0xe76a('0x27'),rs['generate'](0x4)+'.wav');return convertFile(_0x5aaf69,_0x573386);})[_0xe76a('0x2c')](function(){try{fs['unlink'](_0x5aaf69);fs[_0xe76a('0x2d')](_0x573386,_0xe76a('0x2e'));}catch(_0x358c88){logger['error'](_0x358c88);}logger[_0xe76a('0x1c')]('googleCloudTTS\x20path',_0x573386[_0xe76a('0x2f')]('.')[0x0]);return _0x573386[_0xe76a('0x2f')]('.')[0x0];});};exports[_0xe76a('0x3e')]=function(_0xc9c813,_0x110268){var _0x5734fe='https://translate.google.com/_/TranslateWebserverUi/data/batchexecute';var _0x2f16b0,_0x2a516a;var _0x1e7d12;var _0xa46889={'encoding':_0xe76a('0x3f'),'method':_0xe76a('0x40'),'timeout':0x2710,'url':_0x5734fe,'headers':{'Content-Type':_0xe76a('0x41')},'body':_0xe76a('0x42')+encodeURIComponent(JSON['stringify']([[['jQ1olc',JSON['stringify']([_0xc9c813,_0x110268||'en',![],_0xe76a('0x43')]),null,_0xe76a('0x44')]]]))};return rp(_0xa46889)[_0xe76a('0x2c')](function(_0x40b98e){try{_0x1e7d12=eval(_0x40b98e[_0xe76a('0x45')](0x5))[0x0][0x2];}catch(_0x15641f){throw new Error(_0xe76a('0x46')+_0x40b98e[_0xe76a('0x23')]);}if(!_0x1e7d12){if(_0xc9c813[_0xe76a('0x47')]>0xc8){throw new Error(_0xe76a('0x48'));}else{throw new Error(_0xe76a('0x49')+_0x110268+_0xe76a('0x4a'));}}try{_0x1e7d12=eval(_0x1e7d12)[0x0];}catch(_0x1c9e4e){throw new Error(_0xe76a('0x46')+res[_0xe76a('0x23')]);}const _0x359f29=_0x1e7d12;_0x2f16b0=path[_0xe76a('0x26')](__dirname,_0xe76a('0x27'),rs[_0xe76a('0x28')](0x4)+_0xe76a('0x3a'));fs['writeFileSync'](_0x2f16b0,_0x1e7d12,{'encoding':_0xe76a('0x2b')});_0x2a516a=path[_0xe76a('0x26')](__dirname,_0xe76a('0x27'),rs[_0xe76a('0x28')](0x4)+'.wav');return convertFile(_0x2f16b0,_0x2a516a);})[_0xe76a('0x2c')](function(){try{fs[_0xe76a('0x4b')](_0x2f16b0);fs[_0xe76a('0x2d')](_0x2a516a,_0xe76a('0x2e'));}catch(_0x5aa3e9){logger[_0xe76a('0x16')](_0x5aa3e9);}logger['info'](_0xe76a('0x4c'),_0x2a516a[_0xe76a('0x2f')]('.')[0x0]);return _0x2a516a[_0xe76a('0x2f')]('.')[0x0];});};exports[_0xe76a('0x4d')]=function(_0x59e07b,_0x589ac0,_0x4cda98){return google[_0xe76a('0x4e')](_0x59e07b,_0x589ac0,_0x4cda98)['then'](function(_0x1a234c){logger[_0xe76a('0x1c')](_0x1a234c[_0xe76a('0x4f')]);return rp(_0x1a234c);})[_0xe76a('0x2c')](function(_0x68fa98){var _0x4e49d5='';var _0x3f7202=0x0;try{fs[_0xe76a('0x4b')](_0x59e07b);}catch(_0x4ecf71){logger[_0xe76a('0x16')](_0x4ecf71);}if(_0x68fa98&&_0x68fa98[_0xe76a('0x50')]){_0x4e49d5=_0x68fa98['results'][_0xe76a('0x51')](function(_0x50f298){return _0x50f298&&_0x50f298[_0xe76a('0x52')][0x0]&&_0x50f298[_0xe76a('0x52')][0x0][_0xe76a('0x53')]?_0x50f298[_0xe76a('0x52')][0x0][_0xe76a('0x53')]:'';})[_0xe76a('0x54')]('\x0a');_0x3f7202=_0x68fa98[_0xe76a('0x50')]['map'](function(_0x288512){return _0x288512&&_0x288512[_0xe76a('0x52')][0x0]&&_0x288512['alternatives'][0x0][_0xe76a('0x55')]?_0x288512[_0xe76a('0x52')][0x0]['confidence']:0x0;})[_0xe76a('0x54')]('\x0a');}logger[_0xe76a('0x1c')](_0xe76a('0x56'),_0x4e49d5);logger['info'](_0xe76a('0x57'),_0x3f7202);return{'transcript':_0x4e49d5,'confidence':_0x3f7202};})[_0xe76a('0x58')](function(_0x204489){logger[_0xe76a('0x16')]('[%s]\x20%s:%s',_0x204489[_0xe76a('0x22')],_0x204489[_0xe76a('0x59')],_0x204489[_0xe76a('0x5a')]);});};exports['googleDialogflow']=function(_0xedbb03,_0x42646c,_0x10d7d8,_0x44d067){var _0x1c079f=apiai(_0x42646c,{'language':_0x44d067||'en'});return _0x1c079f[_0xe76a('0x5b')](_0x10d7d8,{'sessionId':md5(_0xedbb03)})[_0xe76a('0x2c')](function(_0x1eb974){logger[_0xe76a('0x1c')](JSON['stringify'](_0x1eb974));return{'source':_0x1eb974[_0xe76a('0x5c')][_0xe76a('0x5d')],'resolvedQuery':_0x1eb974['result']['resolvedQuery'],'action':_0x1eb974['result'][_0xe76a('0x5e')],'actionIncomplete':_0x1eb974[_0xe76a('0x5c')][_0xe76a('0x5f')],'speech':_0x1eb974[_0xe76a('0x5c')][_0xe76a('0x60')][_0xe76a('0x61')],'score':_0x1eb974['result'][_0xe76a('0x62')],'statusCode':_0x1eb974[_0xe76a('0x63')]['code'],'endConversation':_0x1eb974['result']['metadata'][_0xe76a('0x64')]||![],'isFallbackIntent':_0x1eb974[_0xe76a('0x5c')][_0xe76a('0x65')][_0xe76a('0x66')]};});};exports[_0xe76a('0x67')]=function(_0x3c7e6e,_0x1dd916,_0x35ad46,_0x155c9a,_0x2a021e,_0x575862){var _0x171835=_0x155c9a[_0xe76a('0x68')](/\\n/g,'\x0a');var _0x4e28a4={'credentials':{'private_key':_0x171835,'client_email':_0x35ad46}};var _0x371a3b=new dialogflow[(_0xe76a('0x69'))](_0x4e28a4);var _0x40d2fa=_0x371a3b[_0xe76a('0x6a')](_0x1dd916,md5(_0x3c7e6e));var _0x1a26e5={'session':_0x40d2fa,'queryInput':{'text':{'text':_0x2a021e,'languageCode':_0x575862}}};return _0x371a3b[_0xe76a('0x6b')](_0x1a26e5)['then'](function(_0x314451){if(_0x314451&&_0x314451[_0xe76a('0x47')]){logger[_0xe76a('0x1c')](_0xe76a('0x6c'),JSON['stringify'](_0x314451));var _0x5aabc5=_0x314451[0x0];if(_0x5aabc5){var _0x4c847c={'action':_0x5aabc5[_0xe76a('0x6d')][_0xe76a('0x5e')],'allRequiredParamsPresent':_0x5aabc5[_0xe76a('0x6d')]['allRequiredParamsPresent'],'endConversation':_0x5aabc5[_0xe76a('0x6d')][_0xe76a('0x6e')]&&_0x5aabc5[_0xe76a('0x6d')][_0xe76a('0x6e')]['fields']?_0x5aabc5[_0xe76a('0x6d')][_0xe76a('0x6e')]['fields'][_0xe76a('0x6f')][_0xe76a('0x70')]:![],'fulfillmentText':_0x5aabc5['queryResult'][_0xe76a('0x71')],'intentName':_0x5aabc5[_0xe76a('0x6d')][_0xe76a('0x72')][_0xe76a('0x59')],'intentDisplayName':_0x5aabc5[_0xe76a('0x6d')]['intent'][_0xe76a('0x73')],'isFallbackIntent':_0x5aabc5['queryResult'][_0xe76a('0x72')]['isFallback'],'languageCode':_0x5aabc5['queryResult'][_0xe76a('0x74')],'queryText':_0x5aabc5[_0xe76a('0x6d')][_0xe76a('0x75')],'responseId':_0x5aabc5[_0xe76a('0x76')],'score':_0x5aabc5[_0xe76a('0x6d')][_0xe76a('0x77')],'speech':_0x5aabc5[_0xe76a('0x6d')][_0xe76a('0x71')],'providerResponse':JSON[_0xe76a('0x78')](_0x314451)};return _0x4c847c;}}});};exports['tildeASR']=function(_0xa18937,_0x9d7a04,_0x50abf9,_0x12c37b){return tilde[_0xe76a('0x4e')](_0xa18937,_0x9d7a04,_0x50abf9,_0x12c37b)[_0xe76a('0x2c')](function(_0x16332e){try{fs['unlink'](_0xa18937);}catch(_0x393c03){logger[_0xe76a('0x16')](_0x393c03);}logger[_0xe76a('0x1c')](_0xe76a('0x79'),_0x16332e[_0xe76a('0x53')]);logger[_0xe76a('0x1c')]('Tilde\x20ASR\x20confidence',_0x16332e[_0xe76a('0x55')]);return _0x16332e;});};exports[_0xe76a('0x7a')]=function(_0x405c2e,_0x1444c1,_0x5be4fc,_0x255edb,_0x2d77bd,_0xa4c638){var _0x3091c8=path[_0xe76a('0x26')](__dirname,_0xe76a('0x27'),rs['generate'](0x4)+_0xe76a('0x3a'));var _0x19cb97;return aws['polly'](_0x405c2e,_0x1444c1,_0x5be4fc,_0x255edb,_0x2d77bd,_0xa4c638,_0x3091c8)[_0xe76a('0x2c')](function(){_0x19cb97=path[_0xe76a('0x26')](__dirname,_0xe76a('0x27'),rs[_0xe76a('0x28')](0x4)+'.wav');return convertFile(_0x3091c8,_0x19cb97);})[_0xe76a('0x2c')](function(){try{fs['unlink'](_0x3091c8);fs[_0xe76a('0x2d')](_0x19cb97,_0xe76a('0x2e'));}catch(_0x5dbf43){logger[_0xe76a('0x16')](_0x5dbf43);}return _0x19cb97[_0xe76a('0x2f')]('.')[0x0];});};exports[_0xe76a('0x7b')]=function(_0x3632b9,_0xb49cd4,_0x3a8d86,_0x30c776,_0x7f5c2e,_0x359487){return aws[_0xe76a('0x7c')](_0x3632b9,_0xb49cd4,_0x3a8d86,_0x30c776,_0x7f5c2e,_0x359487)['then'](function(_0xa9752){logger[_0xe76a('0x1c')](JSON[_0xe76a('0x78')](_0xa9752));return _0xa9752;});};exports['ispeechTTS']=function(_0x39ab95,_0x202ce4,_0x4ee9a7,_0x574ec9){var _0x4b9772=util[_0xe76a('0x7d')](_0xe76a('0x7e'),ISPEECH_API,_0x39ab95,encodeURIComponent(_0x202ce4),_0x4ee9a7,_0x574ec9);var _0x27a6f1=path[_0xe76a('0x26')](__dirname,_0xe76a('0x27'),rs[_0xe76a('0x28')](0x4)+_0xe76a('0x3a'));var _0x167348;return downloadFile(_0x4b9772,_0x27a6f1)[_0xe76a('0x2c')](function(){_0x167348=path[_0xe76a('0x26')](__dirname,_0xe76a('0x27'),rs['generate'](0x4)+'.wav');return convertFile(_0x27a6f1,_0x167348);})[_0xe76a('0x2c')](function(){try{fs[_0xe76a('0x4b')](_0x27a6f1);fs[_0xe76a('0x2d')](_0x167348,_0xe76a('0x2e'));}catch(_0x4f2e3a){logger[_0xe76a('0x16')](_0x4f2e3a);}return _0x167348[_0xe76a('0x2f')]('.')[0x0];});};exports[_0xe76a('0x7f')]=function(_0xc2163a,_0x5d7be2,_0x52c7e0,_0x1230da){var _0x2ec7c7=util[_0xe76a('0x7d')](_0xe76a('0x80'),ISPEECH_API,_0x5d7be2,_0x52c7e0,base64Encode(_0xc2163a),_0x1230da?util[_0xe76a('0x7d')]('model=%s',encodeURIComponent(_0x1230da)):'freeform=3');return uploadFile(_0x2ec7c7)[_0xe76a('0x2c')](function(_0x438876){return querystring[_0xe76a('0xb')](_0x438876);});};exports['sestekNDA']=function(_0x2b727f,_0x12be75){return sestek[_0xe76a('0x81')](_0x2b727f,_0x12be75)[_0xe76a('0x2c')](function(_0x4cc835){logger['info'](JSON[_0xe76a('0x78')](_0x4cc835));var _0x33224c={'speech':_0x4cc835[_0xe76a('0x82')],'action':_0x4cc835[_0xe76a('0x83')]?_0x4cc835['channelData'][_0xe76a('0x84')]:undefined,'actiondata':_0x4cc835[_0xe76a('0x83')]?_0x4cc835[_0xe76a('0x83')][_0xe76a('0x85')]:undefined};if(_0x4cc835[_0xe76a('0x83')]&&_0x4cc835[_0xe76a('0x83')][_0xe76a('0x86')]){return base64Decode(_0x4cc835[_0xe76a('0x83')]['AudioFromTts'][_0xe76a('0x87')],path[_0xe76a('0x26')](__dirname,_0xe76a('0x27'),rs[_0xe76a('0x28')](0x4)+_0xe76a('0x29')))[_0xe76a('0x2c')](function(_0x175b21){_0x33224c[_0xe76a('0x88')]=_0x175b21;return _0x33224c;});}return _0x33224c;});};exports[_0xe76a('0x89')]=function(){return __dirname;}; \ No newline at end of file +var _0x277d=['statusCode','error','request\x20to\x20','\x20failed,\x20status\x20code\x20=\x20','statusMessage','createWriteStream','finish','finish\x20download\x20file','close','unlink','download\x20error','pipe','end','data','transcode','wav','error\x20convert','info','finish\x20to\x20convert','resolve','tmp','generate','.wav','writeFileSync','base64','then','777','split','readFileSync','toString','googleCloudTTS','?key=','ssml','input','audioConfig','MP3','text:synthesize','.mp3','audioContent','writeFile','chmodSync','googleCloudTTS\x20path','googleTTS','utf8','POST','f.req=','stringify','jQ1olc','null','slice','length','text\x20length\x20limit\x20reached','lang\x20\x22','parse\x20response\x20failed:\x0a','googleASR','results','map','transcript','alternatives','join','confidence','googleASR\x20transcription','catch','[%s]\x20%s:%s','name','googleDialogflow','textRequest','result','resolvedQuery','action','fulfillment','score','code','metadata','endConversation','replace','sessionPath','detectIntent','queryResult','diagnosticInfo','fields','end_conversation','boolValue','fulfillmentText','intent','isFallback','languageCode','queryText','responseId','intentDetectionConfidence','tildeASR','Tilde\x20ASR\x20transcription','Tilde\x20ASR\x20confidence','awsPolly','polly','awsLex','format','%s?apikey=%s&action=convert&text=%s&voice=%s&speed=%s&format=mp3','ispeechASR','%s?apikey=%s&action=recognize&locale=%s&content-type=audio/x-wav&audio=%s&%s','model=%s','freeform=3','text','channelData','CustomAction','CustomActionData','AudioFromTts','Data','audiofile','dirName','apiai-promise','bluebird','dialogflow','http','https','md5','path','querystring','request-promise','sox','google-tts-api','parse','util','./aws','./google','./sestek','./tilde','../../../config/logger','https://api.ispeech.org/api/rest','protocol','https:','host','WHAT_EVER','get'];(function(_0x169ec2,_0x47b763){var _0x59a4e1=function(_0x2a7ac4){while(--_0x2a7ac4){_0x169ec2['push'](_0x169ec2['shift']());}};_0x59a4e1(++_0x47b763);}(_0x277d,0x17a));var _0xd277=function(_0x59ee6f,_0x450239){_0x59ee6f=_0x59ee6f-0x0;var _0x4c0979=_0x277d[_0x59ee6f];return _0x4c0979;};'use strict';var apiai=require(_0xd277('0x0'));var BPromise=require(_0xd277('0x1'));var dialogflow=require(_0xd277('0x2'));var fs=require('fs');var http=require(_0xd277('0x3'));var https=require(_0xd277('0x4'));var md5=require(_0xd277('0x5'));var path=require(_0xd277('0x6'));var querystring=require(_0xd277('0x7'));var rp=require(_0xd277('0x8'));var rs=require('randomstring');var sox=require(_0xd277('0x9'));var tts=require(_0xd277('0xa'));var urlParse=require('url')[_0xd277('0xb')];var util=require(_0xd277('0xc'));var aws=require(_0xd277('0xd'));var google=require(_0xd277('0xe'));var sestek=require(_0xd277('0xf'));var tilde=require(_0xd277('0x10'));var logger=require(_0xd277('0x11'))('agi');var ISPEECH_API=_0xd277('0x12');function downloadFile(_0x229777,_0x169ba5){return new BPromise(function(_0xb78f17,_0x1fa225){var _0x3f1f99=urlParse(_0x229777);var _0xfe5a0b=_0x3f1f99[_0xd277('0x13')]===_0xd277('0x14')?https:http;var _0x52046a={'host':_0x3f1f99[_0xd277('0x15')],'path':_0x3f1f99['path'],'headers':{'user-agent':_0xd277('0x16')}};_0xfe5a0b[_0xd277('0x17')](_0x52046a,function(_0x38e568){if(_0x38e568[_0xd277('0x18')]!==0xc8){logger[_0xd277('0x19')](_0xd277('0x1a')+_0x229777+_0xd277('0x1b')+_0x38e568[_0xd277('0x18')]+'\x20('+_0x38e568[_0xd277('0x1c')]+')');_0x1fa225(new Error(_0xd277('0x1a')+_0x229777+_0xd277('0x1b')+_0x38e568[_0xd277('0x18')]+'\x20('+_0x38e568[_0xd277('0x1c')]+')'));return;}var _0x309223=fs[_0xd277('0x1d')](_0x169ba5);_0x309223['on'](_0xd277('0x1e'),function(){logger['info'](_0xd277('0x1f'));_0x309223[_0xd277('0x20')](_0xb78f17);});_0x309223['on'](_0xd277('0x19'),function(_0x40e20a){fs[_0xd277('0x21')](_0x169ba5);logger[_0xd277('0x19')](_0xd277('0x22'),_0x40e20a);_0x1fa225(_0x40e20a);});_0x38e568[_0xd277('0x23')](_0x309223);})['on'](_0xd277('0x19'),function(_0xe0ef45){logger[_0xd277('0x19')](_0xe0ef45);_0x1fa225(_0xe0ef45);})[_0xd277('0x24')]();});}function uploadFile(_0x11f93f){return new BPromise(function(_0x4a194b,_0x3bc174){var _0x14dfbb=urlParse(_0x11f93f);var _0x19d90d=_0x14dfbb[_0xd277('0x13')]==='https:'?https:http;var _0x45715a={'host':_0x14dfbb[_0xd277('0x15')],'path':_0x14dfbb['path'],'headers':{'user-agent':_0xd277('0x16')}};_0x19d90d[_0xd277('0x17')](_0x45715a,function(_0x5df7da){if(_0x5df7da[_0xd277('0x18')]!==0xc8){_0x3bc174(new Error(_0xd277('0x1a')+_0x11f93f+'\x20failed,\x20status\x20code\x20=\x20'+_0x5df7da[_0xd277('0x18')]+'\x20('+_0x5df7da[_0xd277('0x1c')]+')'));return;}var _0x21bf73='';_0x5df7da['on'](_0xd277('0x25'),function(_0x589471){_0x21bf73+=_0x589471;});_0x5df7da['on'](_0xd277('0x24'),function(){_0x4a194b(_0x21bf73);});})['on'](_0xd277('0x19'),function(_0x10bad6){_0x3bc174(_0x10bad6);})['end']();});}function convertFile(_0x300136,_0x49b4e2){return new BPromise(function(_0x2d8cd8,_0x8fdfe0){var _0x4a2488=sox[_0xd277('0x26')](_0x300136,_0x49b4e2,{'sampleRate':0x1f40,'format':_0xd277('0x27'),'channelCount':0x1,'bitRate':0xc0*0x400,'compressionQuality':0x5});_0x4a2488['on']('error',function(_0x227a64){logger[_0xd277('0x19')](_0xd277('0x28'),_0x227a64);_0x8fdfe0(_0x227a64);});_0x4a2488['on'](_0xd277('0x24'),function(){logger[_0xd277('0x29')](_0xd277('0x2a'));_0x2d8cd8();});_0x4a2488['start']();});}function base64Decode(_0x516f08,_0x560fd0){var _0x181c4a=path[_0xd277('0x2b')](__dirname,_0xd277('0x2c'),rs[_0xd277('0x2d')](0x4)+_0xd277('0x2e'));fs[_0xd277('0x2f')](_0x181c4a,_0x516f08,_0xd277('0x30'));return convertFile(_0x181c4a,_0x560fd0)[_0xd277('0x31')](function(){try{fs[_0xd277('0x21')](_0x181c4a);fs['chmodSync'](_0x560fd0,_0xd277('0x32'));}catch(_0x4888b6){logger[_0xd277('0x19')](_0x4888b6);}return _0x560fd0[_0xd277('0x33')]('.')[0x0];});}function base64Encode(_0x4e3e8c){var _0xc5ac38=fs[_0xd277('0x34')](_0x4e3e8c);return new Buffer(_0xc5ac38)[_0xd277('0x35')](_0xd277('0x30'));}exports[_0xd277('0x36')]=function(_0x59064d,_0x1a7d34,_0x5e4035,_0x1fbb79,_0x3d847e,_0x27c80f){var _0x24b058,_0x51d57d;var _0x16a598='https://texttospeech.googleapis.com/v1/';var _0x50b2b1=_0xd277('0x37')+_0x59064d;var _0x4bf28f={};if(_0x1a7d34===_0xd277('0x38')){_0x4bf28f[_0xd277('0x39')]={'ssml':_0x5e4035};}else{_0x4bf28f['input']={'text':_0x5e4035};};_0x4bf28f['voice']={'languageCode':_0x1fbb79,'ssmlGender':_0x3d847e};_0x4bf28f[_0xd277('0x3a')]={'audioEncoding':_0xd277('0x3b'),'sampleRateHertz':0x1f40};var _0x1469a8={'url':_0x16a598+_0xd277('0x3c')+_0x50b2b1,'method':'POST','json':!![],'body':_0x4bf28f};return rp(_0x1469a8)[_0xd277('0x31')](function(_0x341801){return new BPromise(function(_0xde3e3f,_0x59ce6c){_0x24b058=path[_0xd277('0x2b')](__dirname,_0xd277('0x2c'),rs[_0xd277('0x2d')](0x4)+_0xd277('0x3d'));var _0x379d3f=Buffer['from'](_0x341801[_0xd277('0x3e')],_0xd277('0x30'));return fs[_0xd277('0x3f')](_0x24b058,_0x379d3f,function(_0x5e157d){_0x59ce6c(_0x5e157d);},function(_0x24066e){fs[_0xd277('0x40')](_0x24b058,_0xd277('0x32'));_0xde3e3f(_0x24066e);});});})[_0xd277('0x31')](function(_0x1e0778){_0x51d57d=path[_0xd277('0x2b')](__dirname,_0xd277('0x2c'),rs['generate'](0x4)+_0xd277('0x2e'));return convertFile(_0x24b058,_0x51d57d);})[_0xd277('0x31')](function(){try{fs[_0xd277('0x21')](_0x24b058);fs[_0xd277('0x40')](_0x51d57d,_0xd277('0x32'));}catch(_0x363c38){logger[_0xd277('0x19')](_0x363c38);}logger[_0xd277('0x29')](_0xd277('0x41'),_0x51d57d[_0xd277('0x33')]('.')[0x0]);return _0x51d57d[_0xd277('0x33')]('.')[0x0];});};exports[_0xd277('0x42')]=function(_0x4ff865,_0x2f6305){var _0x3914fe='https://translate.google.com/_/TranslateWebserverUi/data/batchexecute';var _0x24f255,_0x5c3247;var _0x359e7e;var _0x2ac591={'encoding':_0xd277('0x43'),'method':_0xd277('0x44'),'timeout':0x2710,'url':_0x3914fe,'headers':{'Content-Type':'application/x-www-form-urlencoded'},'body':_0xd277('0x45')+encodeURIComponent(JSON[_0xd277('0x46')]([[[_0xd277('0x47'),JSON['stringify']([_0x4ff865,_0x2f6305||'en',![],_0xd277('0x48')]),null,'generic']]]))};return rp(_0x2ac591)[_0xd277('0x31')](function(_0x4bb8d9){try{_0x359e7e=eval(_0x4bb8d9[_0xd277('0x49')](0x5))[0x0][0x2];}catch(_0x518441){throw new Error('parse\x20response\x20failed:\x0a'+_0x4bb8d9[_0xd277('0x25')]);}if(!_0x359e7e){if(_0x4ff865[_0xd277('0x4a')]>0xc8){throw new Error(_0xd277('0x4b'));}else{throw new Error(_0xd277('0x4c')+_0x2f6305+'\x22\x20might\x20not\x20exist');}}try{_0x359e7e=eval(_0x359e7e)[0x0];}catch(_0xf3aaa3){throw new Error(_0xd277('0x4d')+res[_0xd277('0x25')]);}const _0x2c3026=_0x359e7e;_0x24f255=path[_0xd277('0x2b')](__dirname,_0xd277('0x2c'),rs['generate'](0x4)+_0xd277('0x3d'));fs['writeFileSync'](_0x24f255,_0x359e7e,{'encoding':_0xd277('0x30')});_0x5c3247=path[_0xd277('0x2b')](__dirname,'tmp',rs[_0xd277('0x2d')](0x4)+'.wav');return convertFile(_0x24f255,_0x5c3247);})[_0xd277('0x31')](function(){try{fs[_0xd277('0x21')](_0x24f255);fs[_0xd277('0x40')](_0x5c3247,'777');}catch(_0x28c3c1){logger[_0xd277('0x19')](_0x28c3c1);}logger[_0xd277('0x29')]('goggleTTS\x20path',_0x5c3247[_0xd277('0x33')]('.')[0x0]);return _0x5c3247[_0xd277('0x33')]('.')[0x0];});};exports[_0xd277('0x4e')]=function(_0x3a0454,_0x307502,_0x50e23d){return google['asr'](_0x3a0454,_0x307502,_0x50e23d)['then'](function(_0x256ad5){logger[_0xd277('0x29')](_0x256ad5['uri']);return rp(_0x256ad5);})[_0xd277('0x31')](function(_0x12ca34){var _0x132bfa='';var _0x4e6fe0=0x0;try{fs['unlink'](_0x3a0454);}catch(_0x9c3174){logger[_0xd277('0x19')](_0x9c3174);}if(_0x12ca34&&_0x12ca34[_0xd277('0x4f')]){_0x132bfa=_0x12ca34[_0xd277('0x4f')][_0xd277('0x50')](function(_0x30bbc2){return _0x30bbc2&&_0x30bbc2['alternatives'][0x0]&&_0x30bbc2['alternatives'][0x0][_0xd277('0x51')]?_0x30bbc2[_0xd277('0x52')][0x0][_0xd277('0x51')]:'';})[_0xd277('0x53')]('\x0a');_0x4e6fe0=_0x12ca34[_0xd277('0x4f')]['map'](function(_0x29e949){return _0x29e949&&_0x29e949[_0xd277('0x52')][0x0]&&_0x29e949[_0xd277('0x52')][0x0][_0xd277('0x54')]?_0x29e949['alternatives'][0x0][_0xd277('0x54')]:0x0;})['join']('\x0a');}logger[_0xd277('0x29')](_0xd277('0x55'),_0x132bfa);logger[_0xd277('0x29')]('googleASR\x20confidence',_0x4e6fe0);return{'transcript':_0x132bfa,'confidence':_0x4e6fe0};})[_0xd277('0x56')](function(_0x303fb6){logger[_0xd277('0x19')](_0xd277('0x57'),_0x303fb6[_0xd277('0x18')],_0x303fb6[_0xd277('0x58')],_0x303fb6['message']);});};exports[_0xd277('0x59')]=function(_0x41dd7c,_0x1b935d,_0x49ef19,_0x11a670){var _0x4b535c=apiai(_0x1b935d,{'language':_0x11a670||'en'});return _0x4b535c[_0xd277('0x5a')](_0x49ef19,{'sessionId':md5(_0x41dd7c)})[_0xd277('0x31')](function(_0x2cdc28){logger['info'](JSON[_0xd277('0x46')](_0x2cdc28));return{'source':_0x2cdc28[_0xd277('0x5b')]['source'],'resolvedQuery':_0x2cdc28[_0xd277('0x5b')][_0xd277('0x5c')],'action':_0x2cdc28['result'][_0xd277('0x5d')],'actionIncomplete':_0x2cdc28[_0xd277('0x5b')]['actionIncomplete'],'speech':_0x2cdc28['result'][_0xd277('0x5e')]['speech'],'score':_0x2cdc28[_0xd277('0x5b')][_0xd277('0x5f')],'statusCode':_0x2cdc28['status'][_0xd277('0x60')],'endConversation':_0x2cdc28[_0xd277('0x5b')][_0xd277('0x61')][_0xd277('0x62')]||![],'isFallbackIntent':_0x2cdc28['result']['metadata']['isFallbackIntent']};});};exports['googleDialogflowV2']=function(_0xeb842d,_0xeeab28,_0x90353c,_0x4a6e67,_0x248d7d,_0x470948){var _0x406b58=_0x4a6e67[_0xd277('0x63')](/\\n/g,'\x0a');var _0x152035={'credentials':{'private_key':_0x406b58,'client_email':_0x90353c}};var _0x4e68ed=new dialogflow['SessionsClient'](_0x152035);var _0x17b470=_0x4e68ed[_0xd277('0x64')](_0xeeab28,md5(_0xeb842d));var _0x26b938={'session':_0x17b470,'queryInput':{'text':{'text':_0x248d7d,'languageCode':_0x470948}}};return _0x4e68ed[_0xd277('0x65')](_0x26b938)[_0xd277('0x31')](function(_0x2736b1){if(_0x2736b1&&_0x2736b1['length']){logger[_0xd277('0x29')]('Dialogflow\x20V2\x20response:',JSON[_0xd277('0x46')](_0x2736b1));var _0x7babe=_0x2736b1[0x0];if(_0x7babe){var _0x4aea7a={'action':_0x7babe['queryResult'][_0xd277('0x5d')],'allRequiredParamsPresent':_0x7babe[_0xd277('0x66')]['allRequiredParamsPresent'],'endConversation':_0x7babe[_0xd277('0x66')][_0xd277('0x67')]&&_0x7babe[_0xd277('0x66')][_0xd277('0x67')][_0xd277('0x68')]?_0x7babe[_0xd277('0x66')][_0xd277('0x67')][_0xd277('0x68')][_0xd277('0x69')][_0xd277('0x6a')]:![],'fulfillmentText':_0x7babe[_0xd277('0x66')][_0xd277('0x6b')],'intentName':_0x7babe[_0xd277('0x66')][_0xd277('0x6c')][_0xd277('0x58')],'intentDisplayName':_0x7babe[_0xd277('0x66')]['intent']['displayName'],'isFallbackIntent':_0x7babe[_0xd277('0x66')][_0xd277('0x6c')][_0xd277('0x6d')],'languageCode':_0x7babe[_0xd277('0x66')][_0xd277('0x6e')],'queryText':_0x7babe[_0xd277('0x66')][_0xd277('0x6f')],'responseId':_0x7babe[_0xd277('0x70')],'score':_0x7babe[_0xd277('0x66')][_0xd277('0x71')],'speech':_0x7babe['queryResult'][_0xd277('0x6b')],'providerResponse':JSON[_0xd277('0x46')](_0x2736b1)};return _0x4aea7a;}}});};exports[_0xd277('0x72')]=function(_0x7e4f65,_0x9e3596,_0x4d6566,_0xa9013a){return tilde['asr'](_0x7e4f65,_0x9e3596,_0x4d6566,_0xa9013a)[_0xd277('0x31')](function(_0xf7d5b5){try{fs['unlink'](_0x7e4f65);}catch(_0x42f307){logger[_0xd277('0x19')](_0x42f307);}logger[_0xd277('0x29')](_0xd277('0x73'),_0xf7d5b5['transcript']);logger['info'](_0xd277('0x74'),_0xf7d5b5['confidence']);return _0xf7d5b5;});};exports[_0xd277('0x75')]=function(_0x245ca0,_0xf139b5,_0x356035,_0x4a1037,_0x4878be,_0x260c88){var _0xefb0f3=path['resolve'](__dirname,_0xd277('0x2c'),rs[_0xd277('0x2d')](0x4)+_0xd277('0x3d'));var _0x27e572;return aws[_0xd277('0x76')](_0x245ca0,_0xf139b5,_0x356035,_0x4a1037,_0x4878be,_0x260c88,_0xefb0f3)[_0xd277('0x31')](function(){_0x27e572=path[_0xd277('0x2b')](__dirname,_0xd277('0x2c'),rs[_0xd277('0x2d')](0x4)+'.wav');return convertFile(_0xefb0f3,_0x27e572);})[_0xd277('0x31')](function(){try{fs[_0xd277('0x21')](_0xefb0f3);fs[_0xd277('0x40')](_0x27e572,'777');}catch(_0x287ba3){logger[_0xd277('0x19')](_0x287ba3);}return _0x27e572[_0xd277('0x33')]('.')[0x0];});};exports[_0xd277('0x77')]=function(_0x32bbff,_0x1c2867,_0x1f4ed3,_0x5c68a9,_0x2e619e,_0x4813e0){return aws['lex'](_0x32bbff,_0x1c2867,_0x1f4ed3,_0x5c68a9,_0x2e619e,_0x4813e0)[_0xd277('0x31')](function(_0x14693d){logger['info'](JSON[_0xd277('0x46')](_0x14693d));return _0x14693d;});};exports['ispeechTTS']=function(_0x28296e,_0x78bce2,_0x2eb87d,_0x46204e){var _0x547403=util[_0xd277('0x78')](_0xd277('0x79'),ISPEECH_API,_0x28296e,encodeURIComponent(_0x78bce2),_0x2eb87d,_0x46204e);var _0x3eb5c0=path[_0xd277('0x2b')](__dirname,_0xd277('0x2c'),rs[_0xd277('0x2d')](0x4)+_0xd277('0x3d'));var _0x45825b;return downloadFile(_0x547403,_0x3eb5c0)[_0xd277('0x31')](function(){_0x45825b=path[_0xd277('0x2b')](__dirname,_0xd277('0x2c'),rs['generate'](0x4)+_0xd277('0x2e'));return convertFile(_0x3eb5c0,_0x45825b);})[_0xd277('0x31')](function(){try{fs[_0xd277('0x21')](_0x3eb5c0);fs[_0xd277('0x40')](_0x45825b,_0xd277('0x32'));}catch(_0x4668b6){logger['error'](_0x4668b6);}return _0x45825b[_0xd277('0x33')]('.')[0x0];});};exports[_0xd277('0x7a')]=function(_0x1c0344,_0x346131,_0xe7be3e,_0x439ce9){var _0x2db40e=util[_0xd277('0x78')](_0xd277('0x7b'),ISPEECH_API,_0x346131,_0xe7be3e,base64Encode(_0x1c0344),_0x439ce9?util[_0xd277('0x78')](_0xd277('0x7c'),encodeURIComponent(_0x439ce9)):_0xd277('0x7d'));return uploadFile(_0x2db40e)['then'](function(_0x359868){return querystring[_0xd277('0xb')](_0x359868);});};exports['sestekNDA']=function(_0x123adb,_0x57ea29){return sestek['nda'](_0x123adb,_0x57ea29)[_0xd277('0x31')](function(_0x3d3d4f){logger['info'](JSON['stringify'](_0x3d3d4f));var _0x499d38={'speech':_0x3d3d4f[_0xd277('0x7e')],'action':_0x3d3d4f[_0xd277('0x7f')]?_0x3d3d4f[_0xd277('0x7f')][_0xd277('0x80')]:undefined,'actiondata':_0x3d3d4f[_0xd277('0x7f')]?_0x3d3d4f[_0xd277('0x7f')][_0xd277('0x81')]:undefined};if(_0x3d3d4f[_0xd277('0x7f')]&&_0x3d3d4f[_0xd277('0x7f')]['AudioFromTts']){return base64Decode(_0x3d3d4f['channelData'][_0xd277('0x82')][_0xd277('0x83')],path[_0xd277('0x2b')](__dirname,'tmp',rs['generate'](0x4)+_0xd277('0x2e')))[_0xd277('0x31')](function(_0x5a41e4){_0x499d38[_0xd277('0x84')]=_0x5a41e4;return _0x499d38;});}return _0x499d38;});};exports[_0xd277('0x85')]=function(){return __dirname;}; \ No newline at end of file diff --git a/server/services/agi/scripts/sestek/index.js b/server/services/agi/scripts/sestek/index.js index 4857f74..58cb98c 100644 --- a/server/services/agi/scripts/sestek/index.js +++ b/server/services/agi/scripts/sestek/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xbbdb=['exports','./nda'];(function(_0x3337cd,_0x2b44f7){var _0x118205=function(_0x269eb6){while(--_0x269eb6){_0x3337cd['push'](_0x3337cd['shift']());}};_0x118205(++_0x2b44f7);}(_0xbbdb,0x1dd));var _0xbbbd=function(_0x156a0d,_0x3946ce){_0x156a0d=_0x156a0d-0x0;var _0x98a9ba=_0xbbdb[_0x156a0d];return _0x98a9ba;};var nda=require(_0xbbbd('0x0'));module[_0xbbbd('0x1')]={'nda':nda}; \ No newline at end of file +var _0xd4ee=['exports','./nda'];(function(_0x108327,_0x38833c){var _0x3d5df9=function(_0x540e5b){while(--_0x540e5b){_0x108327['push'](_0x108327['shift']());}};_0x3d5df9(++_0x38833c);}(_0xd4ee,0xaf));var _0xed4e=function(_0x39fc40,_0x1319e8){_0x39fc40=_0x39fc40-0x0;var _0x329605=_0xd4ee[_0x39fc40];return _0x329605;};var nda=require(_0xed4e('0x0'));module[_0xed4e('0x1')]={'nda':nda}; \ No newline at end of file diff --git a/server/services/agi/scripts/sestek/nda/index.js b/server/services/agi/scripts/sestek/nda/index.js index 7601419..f37cbdf 100644 --- a/server/services/agi/scripts/sestek/nda/index.js +++ b/server/services/agi/scripts/sestek/nda/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x76bc=['../../../../../config/logger','agi','exports','POST','resolve','ndauth_url','/token','password','username','then','ndassistant_url','/api/NaturalDialogAssistant/v1/Run','ndaactivity_type','Nda','uniqueid','callerid','calleridname','dnid','extension','Bearer\x20','access_token','project','body','channelData','ProjectName','AudioOutputSettings','audio/wav','custom_action','CustomAction','custom_action_data','CustomActionData','info','stringify','request-promise','url'];(function(_0xa4c482,_0x4b7207){var _0x502476=function(_0x3d925d){while(--_0x3d925d){_0xa4c482['push'](_0xa4c482['shift']());}};_0x502476(++_0x4b7207);}(_0x76bc,0x17f));var _0xc76b=function(_0x202d24,_0x5e8641){_0x202d24=_0x202d24-0x0;var _0x2b3a8e=_0x76bc[_0x202d24];return _0x2b3a8e;};'use strict';var rp=require(_0xc76b('0x0'));var url=require(_0xc76b('0x1'));var logger=require(_0xc76b('0x2'))(_0xc76b('0x3'));module[_0xc76b('0x4')]=function(_0x5a265d,_0x5ce5d4){var _0x28fb54={'method':_0xc76b('0x5'),'uri':url[_0xc76b('0x6')](_0x5ce5d4[_0xc76b('0x7')],_0xc76b('0x8')),'form':{'grant_type':_0xc76b('0x9'),'username':_0x5ce5d4[_0xc76b('0xa')],'password':_0x5ce5d4[_0xc76b('0x9')]},'json':!![]};return rp(_0x28fb54)[_0xc76b('0xb')](function(_0x1cb174){var _0x235ff3={'method':_0xc76b('0x5'),'uri':url[_0xc76b('0x6')](_0x5ce5d4[_0xc76b('0xc')],_0xc76b('0xd')),'body':{'type':_0x5ce5d4[_0xc76b('0xe')]||'message','channelId':_0xc76b('0xf'),'conversation':{'id':_0x5a265d[_0xc76b('0x10')]},'from':{'id':_0x5a265d[_0xc76b('0x11')],'name':_0x5a265d[_0xc76b('0x12')]},'recipient':{'id':_0x5a265d[_0xc76b('0x13')],'name':_0x5a265d[_0xc76b('0x14')]},'text':_0x5ce5d4['text'],'channelData':{}},'headers':{'Authorization':_0xc76b('0x15')+_0x1cb174[_0xc76b('0x16')]},'json':!![]};if(_0x5ce5d4[_0xc76b('0x17')]){_0x235ff3[_0xc76b('0x18')][_0xc76b('0x19')][_0xc76b('0x1a')]=_0x5ce5d4[_0xc76b('0x17')];}if(_0x5ce5d4['ndagenerate_audio']=='1'){_0x235ff3['body'][_0xc76b('0x19')][_0xc76b('0x1b')]={'Generate':!![],'PutInStructuredPart':![],'ExpectedFormat':_0xc76b('0x1c')};}if(_0x5ce5d4[_0xc76b('0x1d')]){_0x235ff3[_0xc76b('0x18')]['channelData'][_0xc76b('0x1e')]=_0x5ce5d4[_0xc76b('0x1d')];if(_0x5ce5d4[_0xc76b('0x1f')]){_0x235ff3['body']['channelData'][_0xc76b('0x20')]=_0x5ce5d4[_0xc76b('0x1f')];}}logger[_0xc76b('0x21')](JSON[_0xc76b('0x22')](_0x235ff3));return rp(_0x235ff3);});}; \ No newline at end of file +var _0x50c1=['message','Nda','uniqueid','callerid','dnid','Bearer\x20','access_token','project','body','channelData','ProjectName','ndagenerate_audio','custom_action','CustomAction','custom_action_data','CustomActionData','info','stringify','request-promise','../../../../../config/logger','exports','POST','resolve','ndauth_url','password','username','then','ndassistant_url','/api/NaturalDialogAssistant/v1/Run','ndaactivity_type'];(function(_0x5d5ff9,_0x5c4997){var _0x5dc6d6=function(_0x19aebd){while(--_0x19aebd){_0x5d5ff9['push'](_0x5d5ff9['shift']());}};_0x5dc6d6(++_0x5c4997);}(_0x50c1,0x1b6));var _0x150c=function(_0x27f5c7,_0x323649){_0x27f5c7=_0x27f5c7-0x0;var _0x5844de=_0x50c1[_0x27f5c7];return _0x5844de;};'use strict';var rp=require(_0x150c('0x0'));var url=require('url');var logger=require(_0x150c('0x1'))('agi');module[_0x150c('0x2')]=function(_0x786960,_0x4fdcdf){var _0x11216a={'method':_0x150c('0x3'),'uri':url[_0x150c('0x4')](_0x4fdcdf[_0x150c('0x5')],'/token'),'form':{'grant_type':_0x150c('0x6'),'username':_0x4fdcdf[_0x150c('0x7')],'password':_0x4fdcdf['password']},'json':!![]};return rp(_0x11216a)[_0x150c('0x8')](function(_0x19abd2){var _0x316817={'method':_0x150c('0x3'),'uri':url['resolve'](_0x4fdcdf[_0x150c('0x9')],_0x150c('0xa')),'body':{'type':_0x4fdcdf[_0x150c('0xb')]||_0x150c('0xc'),'channelId':_0x150c('0xd'),'conversation':{'id':_0x786960[_0x150c('0xe')]},'from':{'id':_0x786960[_0x150c('0xf')],'name':_0x786960['calleridname']},'recipient':{'id':_0x786960[_0x150c('0x10')],'name':_0x786960['extension']},'text':_0x4fdcdf['text'],'channelData':{}},'headers':{'Authorization':_0x150c('0x11')+_0x19abd2[_0x150c('0x12')]},'json':!![]};if(_0x4fdcdf[_0x150c('0x13')]){_0x316817[_0x150c('0x14')][_0x150c('0x15')][_0x150c('0x16')]=_0x4fdcdf[_0x150c('0x13')];}if(_0x4fdcdf[_0x150c('0x17')]=='1'){_0x316817[_0x150c('0x14')]['channelData']['AudioOutputSettings']={'Generate':!![],'PutInStructuredPart':![],'ExpectedFormat':'audio/wav'};}if(_0x4fdcdf[_0x150c('0x18')]){_0x316817[_0x150c('0x14')][_0x150c('0x15')][_0x150c('0x19')]=_0x4fdcdf[_0x150c('0x18')];if(_0x4fdcdf[_0x150c('0x1a')]){_0x316817['body'][_0x150c('0x15')][_0x150c('0x1b')]=_0x4fdcdf['custom_action_data'];}}logger[_0x150c('0x1c')](JSON[_0x150c('0x1d')](_0x316817));return rp(_0x316817);});}; \ No newline at end of file diff --git a/server/services/agi/scripts/tilde/asr/index.js b/server/services/agi/scripts/tilde/asr/index.js index 9cef31a..f8107f8 100644 --- a/server/services/agi/scripts/tilde/asr/index.js +++ b/server/services/agi/scripts/tilde/asr/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xef64=['./lib/api'];(function(_0x553150,_0x589ff3){var _0x18193d=function(_0x3a5ae6){while(--_0x3a5ae6){_0x553150['push'](_0x553150['shift']());}};_0x18193d(++_0x589ff3);}(_0xef64,0x199));var _0x4ef6=function(_0x38537f,_0x252124){_0x38537f=_0x38537f-0x0;var _0x141e23=_0xef64[_0x38537f];return _0x141e23;};'use strict';var asr=require(_0x4ef6('0x0'));module['exports']=function(_0x104479,_0x58685e,_0x22ef4c,_0x392811){return asr(_0x104479,_0x58685e,_0x22ef4c,_0x392811);}; \ No newline at end of file +var _0x0b01=['./lib/api','exports'];(function(_0x19a81e,_0x47df69){var _0x1c5d4e=function(_0x1680a5){while(--_0x1680a5){_0x19a81e['push'](_0x19a81e['shift']());}};_0x1c5d4e(++_0x47df69);}(_0x0b01,0x158));var _0x10b0=function(_0x37736a,_0x272110){_0x37736a=_0x37736a-0x0;var _0x8add8c=_0x0b01[_0x37736a];return _0x8add8c;};'use strict';var asr=require(_0x10b0('0x0'));module[_0x10b0('0x1')]=function(_0x7cfe06,_0x503590,_0x40b980,_0x5d6109){return asr(_0x7cfe06,_0x503590,_0x40b980,_0x5d6109);}; \ No newline at end of file diff --git a/server/services/agi/scripts/tilde/asr/lib/api.js b/server/services/agi/scripts/tilde/asr/lib/api.js index 65d9f9e..0f8d9bf 100644 --- a/server/services/agi/scripts/tilde/asr/lib/api.js +++ b/server/services/agi/scripts/tilde/asr/lib/api.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x97f1=['close','EOS','error','Tilde\x20ASR\x20send\x20error','terminate','parse','status','result','final','Tilde\x20ASR\x20hypoteses','hypotheses','transcript','Success.','Aborted.\x20Recognition\x20was\x20aborted\x20for\x20some\x20reason.','Not\x20available.\x20Max\x20load\x20limit\x20reached.','Authentication\x20failed.','All\x20recognition\x20workers\x20are\x20currently\x20in\x20use\x20and\x20real-time\x20recognition\x20is\x20not\x20possible.','Tilde\x20ASR\x20parse\x20error','isNil','isObject','open','bluebird','lodash','crypto','../../../../../../config/logger','info','Tilde\x20URI','wss://runa.tilde.lv/client/ws/speech/LVASR-ONLINE','No\x20speech.\x20Sent\x20when\x20the\x20incoming\x20audio\x20contains\x20a\x20large\x20portion\x20of\x20silence\x20or\x20non-speech','createHash','sha1','update','hex','unix','send','stringify','data'];(function(_0x265d31,_0x5dbbb0){var _0x162f48=function(_0x3b314d){while(--_0x3b314d){_0x265d31['push'](_0x265d31['shift']());}};_0x162f48(++_0x5dbbb0);}(_0x97f1,0x118));var _0x197f=function(_0x50063f,_0x47b68f){_0x50063f=_0x50063f-0x0;var _0x15f3b1=_0x97f1[_0x50063f];return _0x15f3b1;};'use strict';var BPromise=require(_0x197f('0x0'));var _=require(_0x197f('0x1'));var fs=require('fs');var WebSocket=require('ws');var moment=require('moment');var crypto=require(_0x197f('0x2'));var logger=require(_0x197f('0x3'))('agi');module['exports']=function(_0x5e91cc,_0x4bd07c,_0x148264,_0x1f16f5){return new BPromise(function(_0x5c7e18,_0x1ae81c){logger[_0x197f('0x4')](_0x197f('0x5'),_0x1f16f5||_0x197f('0x6'));var _0x1e1164=new WebSocket(_0x1f16f5||_0x197f('0x6'),{'perMessageDeflate':![]});var _0x518989='';var _0x27d035='0';var _0x3786ac='1';var _0x28de52=_0x197f('0x7');function _0x11aec4(_0x151919){var _0x48866b=crypto[_0x197f('0x8')](_0x197f('0x9'));_0x48866b[_0x197f('0xa')](_0x151919);return _0x48866b['digest'](_0x197f('0xb'));}function _0x45e1db(){try{logger[_0x197f('0x4')]('Open\x20Tilde\x20ASR\x20socket');var _0x1a6602=moment()[_0x197f('0xc')]();var _0x5013c6=_0x11aec4(_0x1a6602+_0x4bd07c+_0x148264);_0x1e1164[_0x197f('0xd')](JSON[_0x197f('0xe')]({'appID':_0x4bd07c,'timestamp':_0x1a6602,'appKey':_0x5013c6}));var _0x4c8f27=fs['createReadStream'](_0x5e91cc);_0x4c8f27['on'](_0x197f('0xf'),function(_0x57b514){_0x1e1164[_0x197f('0xd')](_0x57b514);});_0x4c8f27['on'](_0x197f('0x10'),function(){_0x1e1164[_0x197f('0xd')](_0x197f('0x11'));});}catch(_0x1528f5){logger[_0x197f('0x12')](_0x197f('0x13'),JSON['stringify'](_0x1528f5));_0x1e1164[_0x197f('0x14')]();}}function _0x4469a3(_0x26832e){try{if(_0x26832e){var _0x5aa1dc=JSON[_0x197f('0x15')](_0x26832e);switch(_0x5aa1dc[_0x197f('0x16')]){case 0x0:if(_0x5aa1dc[_0x197f('0x17')]){if(_0x5aa1dc[_0x197f('0x17')][_0x197f('0x18')]){logger['info'](_0x197f('0x19'),JSON['stringify'](_0x5aa1dc['result'][_0x197f('0x1a')]));_0x518989=_0x5aa1dc['result'][_0x197f('0x1a')][0x0][_0x197f('0x1b')];_0x27d035=_0x5aa1dc[_0x197f('0x17')][_0x197f('0x1a')][0x0]['likelihood'];_0x3786ac='0';_0x28de52=_0x197f('0x1c');_0x1e1164[_0x197f('0x14')]();}}break;case 0x1:logger[_0x197f('0x4')](_0x197f('0x7'));_0x3786ac='1';_0x28de52=_0x197f('0x7');break;case 0x2:logger[_0x197f('0x4')](_0x197f('0x1d'));_0x3786ac='2';_0x28de52=_0x197f('0x1d');break;case 0x9:logger[_0x197f('0x4')](_0x197f('0x1e'));_0x3786ac='9';_0x28de52=_0x197f('0x1e');break;case 0xa:logger[_0x197f('0x4')](_0x197f('0x1f'));_0x3786ac='10';_0x28de52='Authentication\x20failed.';break;case 0xb:logger[_0x197f('0x4')](_0x197f('0x20'));_0x3786ac='11';_0x28de52=_0x197f('0x20');}}}catch(_0x5068c8){logger['error'](_0x197f('0x21'),JSON[_0x197f('0xe')](_0x5068c8));_0x1e1164[_0x197f('0x14')]();}}function _0xf7536a(){logger['info']('Close\x20Tilde\x20ASR\x20socket');_0x5c7e18({'transcript':_0x518989,'confidence':_0x27d035,'status':_0x3786ac,'status_message':_0x28de52});}function _0x1934cd(_0xd75ff5){logger[_0x197f('0x12')]('Error\x20Tilde\x20ASR\x20socket');if(!_[_0x197f('0x22')](_0xd75ff5)){logger[_0x197f('0x12')](_[_0x197f('0x23')](_0xd75ff5)?JSON[_0x197f('0xe')](_0xd75ff5):_0xd75ff5);}}_0x1e1164['on'](_0x197f('0x24'),_0x45e1db);_0x1e1164['on']('message',_0x4469a3);_0x1e1164['on']('close',_0xf7536a);_0x1e1164['on']('error',_0x1934cd);});}; \ No newline at end of file +var _0x309b=['close','EOS','error','terminate','parse','status','result','final','Tilde\x20ASR\x20hypoteses','hypotheses','transcript','likelihood','Success.','Aborted.\x20Recognition\x20was\x20aborted\x20for\x20some\x20reason.','Not\x20available.\x20Max\x20load\x20limit\x20reached.','Authentication\x20failed.','All\x20recognition\x20workers\x20are\x20currently\x20in\x20use\x20and\x20real-time\x20recognition\x20is\x20not\x20possible.','Tilde\x20ASR\x20parse\x20error','Error\x20Tilde\x20ASR\x20socket','isNil','isObject','message','lodash','moment','crypto','agi','exports','info','Tilde\x20URI','wss://runa.tilde.lv/client/ws/speech/LVASR-ONLINE','No\x20speech.\x20Sent\x20when\x20the\x20incoming\x20audio\x20contains\x20a\x20large\x20portion\x20of\x20silence\x20or\x20non-speech','createHash','update','Open\x20Tilde\x20ASR\x20socket','unix','send','stringify','data'];(function(_0x13e2b5,_0x17f086){var _0x470e5c=function(_0x296607){while(--_0x296607){_0x13e2b5['push'](_0x13e2b5['shift']());}};_0x470e5c(++_0x17f086);}(_0x309b,0x120));var _0xb309=function(_0x30fbbb,_0xcd31cf){_0x30fbbb=_0x30fbbb-0x0;var _0x41f1b7=_0x309b[_0x30fbbb];return _0x41f1b7;};'use strict';var BPromise=require('bluebird');var _=require(_0xb309('0x0'));var fs=require('fs');var WebSocket=require('ws');var moment=require(_0xb309('0x1'));var crypto=require(_0xb309('0x2'));var logger=require('../../../../../../config/logger')(_0xb309('0x3'));module[_0xb309('0x4')]=function(_0x10b217,_0x571c53,_0x6c7a88,_0x7963cf){return new BPromise(function(_0x2b6764,_0x5e23a8){logger[_0xb309('0x5')](_0xb309('0x6'),_0x7963cf||'wss://runa.tilde.lv/client/ws/speech/LVASR-ONLINE');var _0x3440a7=new WebSocket(_0x7963cf||_0xb309('0x7'),{'perMessageDeflate':![]});var _0x16141f='';var _0xd87e0a='0';var _0x1ac670='1';var _0x1ebab4=_0xb309('0x8');function _0x4fb6d9(_0x264e6e){var _0x215d68=crypto[_0xb309('0x9')]('sha1');_0x215d68[_0xb309('0xa')](_0x264e6e);return _0x215d68['digest']('hex');}function _0x2c11a6(){try{logger['info'](_0xb309('0xb'));var _0x5caa9d=moment()[_0xb309('0xc')]();var _0x142bbd=_0x4fb6d9(_0x5caa9d+_0x571c53+_0x6c7a88);_0x3440a7[_0xb309('0xd')](JSON[_0xb309('0xe')]({'appID':_0x571c53,'timestamp':_0x5caa9d,'appKey':_0x142bbd}));var _0x13a16f=fs['createReadStream'](_0x10b217);_0x13a16f['on'](_0xb309('0xf'),function(_0x118da2){_0x3440a7[_0xb309('0xd')](_0x118da2);});_0x13a16f['on'](_0xb309('0x10'),function(){_0x3440a7[_0xb309('0xd')](_0xb309('0x11'));});}catch(_0x5d63cc){logger[_0xb309('0x12')]('Tilde\x20ASR\x20send\x20error',JSON[_0xb309('0xe')](_0x5d63cc));_0x3440a7[_0xb309('0x13')]();}}function _0x399d70(_0x4f4c4e){try{if(_0x4f4c4e){var _0x482d3c=JSON[_0xb309('0x14')](_0x4f4c4e);switch(_0x482d3c[_0xb309('0x15')]){case 0x0:if(_0x482d3c[_0xb309('0x16')]){if(_0x482d3c[_0xb309('0x16')][_0xb309('0x17')]){logger[_0xb309('0x5')](_0xb309('0x18'),JSON['stringify'](_0x482d3c[_0xb309('0x16')][_0xb309('0x19')]));_0x16141f=_0x482d3c['result'][_0xb309('0x19')][0x0][_0xb309('0x1a')];_0xd87e0a=_0x482d3c[_0xb309('0x16')][_0xb309('0x19')][0x0][_0xb309('0x1b')];_0x1ac670='0';_0x1ebab4=_0xb309('0x1c');_0x3440a7[_0xb309('0x13')]();}}break;case 0x1:logger[_0xb309('0x5')](_0xb309('0x8'));_0x1ac670='1';_0x1ebab4=_0xb309('0x8');break;case 0x2:logger[_0xb309('0x5')](_0xb309('0x1d'));_0x1ac670='2';_0x1ebab4='Aborted.\x20Recognition\x20was\x20aborted\x20for\x20some\x20reason.';break;case 0x9:logger[_0xb309('0x5')](_0xb309('0x1e'));_0x1ac670='9';_0x1ebab4=_0xb309('0x1e');break;case 0xa:logger[_0xb309('0x5')](_0xb309('0x1f'));_0x1ac670='10';_0x1ebab4=_0xb309('0x1f');break;case 0xb:logger[_0xb309('0x5')](_0xb309('0x20'));_0x1ac670='11';_0x1ebab4=_0xb309('0x20');}}}catch(_0x25e321){logger[_0xb309('0x12')](_0xb309('0x21'),JSON[_0xb309('0xe')](_0x25e321));_0x3440a7[_0xb309('0x13')]();}}function _0x46f347(){logger['info']('Close\x20Tilde\x20ASR\x20socket');_0x2b6764({'transcript':_0x16141f,'confidence':_0xd87e0a,'status':_0x1ac670,'status_message':_0x1ebab4});}function _0x3352e0(_0x59655f){logger[_0xb309('0x12')](_0xb309('0x22'));if(!_[_0xb309('0x23')](_0x59655f)){logger['error'](_[_0xb309('0x24')](_0x59655f)?JSON[_0xb309('0xe')](_0x59655f):_0x59655f);}}_0x3440a7['on']('open',_0x2c11a6);_0x3440a7['on'](_0xb309('0x25'),_0x399d70);_0x3440a7['on'](_0xb309('0x10'),_0x46f347);_0x3440a7['on'](_0xb309('0x12'),_0x3352e0);});}; \ No newline at end of file diff --git a/server/services/agi/scripts/tilde/index.js b/server/services/agi/scripts/tilde/index.js index f7b3397..cbef06b 100644 --- a/server/services/agi/scripts/tilde/index.js +++ b/server/services/agi/scripts/tilde/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x4918=['exports'];(function(_0x5447aa,_0x3afc00){var _0xb21e53=function(_0x2d05f6){while(--_0x2d05f6){_0x5447aa['push'](_0x5447aa['shift']());}};_0xb21e53(++_0x3afc00);}(_0x4918,0xbd));var _0x8491=function(_0x3f5dca,_0x59472b){_0x3f5dca=_0x3f5dca-0x0;var _0x5b833a=_0x4918[_0x3f5dca];return _0x5b833a;};var asr=require('./asr');module[_0x8491('0x0')]={'asr':asr}; \ No newline at end of file +var _0x9721=['./asr','exports'];(function(_0x5f4cd7,_0x459c44){var _0x47c93f=function(_0x11f384){while(--_0x11f384){_0x5f4cd7['push'](_0x5f4cd7['shift']());}};_0x47c93f(++_0x459c44);}(_0x9721,0x154));var _0x1972=function(_0x4ee263,_0x371ae6){_0x4ee263=_0x4ee263-0x0;var _0x2310a2=_0x9721[_0x4ee263];return _0x2310a2;};var asr=require(_0x1972('0x0'));module[_0x1972('0x1')]={'asr':asr}; \ No newline at end of file diff --git a/server/services/agi/server.js b/server/services/agi/server.js index 7a2d99c..e445fda 100644 --- a/server/services/agi/server.js +++ b/server/services/agi/server.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x9c44=['./error','./channel','127.0.0.1','call','emit','error','createServer','listen','listening','getConnections','destroy','E_AGI_SERVER_MAXCONNECTION','ready','connection','E_AGI_SERVER_ERROR','code','close','E_AGI_SERVER_CLOSE','nextTick','events','EventEmitter'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0x9c44,0x178));var _0x49c4=function(_0x15bc81,_0x4d4f77){_0x15bc81=_0x15bc81-0x0;var _0x59440e=_0x9c44[_0x15bc81];return _0x59440e;};'use strict';var util=require('util');var net=require('net');var EventEmitter=require(_0x49c4('0x0'))[_0x49c4('0x1')];var AGIError=require(_0x49c4('0x2'));var AGIChannel=require(_0x49c4('0x3'));var AGIServer=function(_0x455700,_0x2ad237,_0x4e0313){var _0x4941f1=this;var _0x41a183=null;var _0x57effd=0x0;if(!_0x455700)_0x455700=0x11dd;if(!_0x2ad237)_0x2ad237=_0x49c4('0x4');EventEmitter[_0x49c4('0x5')](_0x4941f1);function _0x69bc41(){if(!_0x455700){_0x4941f1[_0x49c4('0x6')](_0x49c4('0x7'),new AGIError('E_AGI_ARGUMENT_PORT'));return![];}_0x41a183=net[_0x49c4('0x8')]();_0x41a183[_0x49c4('0x9')](_0x455700,_0x2ad237);_0x41a183['on'](_0x49c4('0xa'),function(){_0x4941f1[_0x49c4('0x6')]('listening');});_0x41a183['on']('connection',function(_0x451ea6){_0x41a183[_0x49c4('0xb')](function(_0x58cad7,_0xb611a1){if(_0x58cad7){_0x4941f1[_0x49c4('0x6')]('error',new AGIError('E_AGI_SERVER_ERROR',_0x58cad7));}else if(_0x4e0313&&_0x4e0313<0x0){_0x4941f1[_0x49c4('0x6')](_0x49c4('0x7'),new AGIError('E_AGI_SERVER_VOICE_DISABLED'));_0x451ea6[_0x49c4('0xc')]();}else if(_0x4e0313&&_0x4e0313>0x0&&_0x4e0313<_0xb611a1){_0x57effd+=0x1;_0x4941f1[_0x49c4('0x6')]('error',new AGIError(_0x49c4('0xd'),_0x57effd));_0x451ea6[_0x49c4('0xc')]();}else{var _0x21f15a=new AGIChannel(_0x451ea6);_0x21f15a['on'](_0x49c4('0xe'),function(){_0x4941f1[_0x49c4('0x6')](_0x49c4('0xf'),_0x21f15a);});}});});_0x41a183['on'](_0x49c4('0x7'),function(_0x3de397){_0x4941f1['emit'](_0x49c4('0x7'),new AGIError(_0x49c4('0x10'),_0x3de397[_0x49c4('0x11')]));});_0x41a183['on'](_0x49c4('0x12'),function(){_0x4941f1[_0x49c4('0x6')]('close',new AGIError(_0x49c4('0x13')));});}process[_0x49c4('0x14')](function(){_0x69bc41();});};util['inherits'](AGIServer,EventEmitter);module['exports']=function(_0x3c782d,_0x2f82d5,_0x3addb2){return new AGIServer(_0x3c782d,_0x2f82d5,_0x3addb2);}; \ No newline at end of file +var _0x9c44=['./error','./channel','127.0.0.1','call','emit','error','createServer','listen','listening','getConnections','destroy','E_AGI_SERVER_MAXCONNECTION','ready','connection','E_AGI_SERVER_ERROR','code','close','E_AGI_SERVER_CLOSE','nextTick','events','EventEmitter'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0x9c44,0x178));var _0x49c4=function(_0x2064e5,_0x4f6fa2){_0x2064e5=_0x2064e5-0x0;var _0x21a233=_0x9c44[_0x2064e5];return _0x21a233;};'use strict';var util=require('util');var net=require('net');var EventEmitter=require(_0x49c4('0x0'))[_0x49c4('0x1')];var AGIError=require(_0x49c4('0x2'));var AGIChannel=require(_0x49c4('0x3'));var AGIServer=function(_0x455700,_0x2ad237,_0x4e0313){var _0x4941f1=this;var _0x41a183=null;var _0x57effd=0x0;if(!_0x455700)_0x455700=0x11dd;if(!_0x2ad237)_0x2ad237=_0x49c4('0x4');EventEmitter[_0x49c4('0x5')](_0x4941f1);function _0x69bc41(){if(!_0x455700){_0x4941f1[_0x49c4('0x6')](_0x49c4('0x7'),new AGIError('E_AGI_ARGUMENT_PORT'));return![];}_0x41a183=net[_0x49c4('0x8')]();_0x41a183[_0x49c4('0x9')](_0x455700,_0x2ad237);_0x41a183['on'](_0x49c4('0xa'),function(){_0x4941f1[_0x49c4('0x6')]('listening');});_0x41a183['on']('connection',function(_0x451ea6){_0x41a183[_0x49c4('0xb')](function(_0x58cad7,_0xb611a1){if(_0x58cad7){_0x4941f1[_0x49c4('0x6')]('error',new AGIError('E_AGI_SERVER_ERROR',_0x58cad7));}else if(_0x4e0313&&_0x4e0313<0x0){_0x4941f1[_0x49c4('0x6')](_0x49c4('0x7'),new AGIError('E_AGI_SERVER_VOICE_DISABLED'));_0x451ea6[_0x49c4('0xc')]();}else if(_0x4e0313&&_0x4e0313>0x0&&_0x4e0313<_0xb611a1){_0x57effd+=0x1;_0x4941f1[_0x49c4('0x6')]('error',new AGIError(_0x49c4('0xd'),_0x57effd));_0x451ea6[_0x49c4('0xc')]();}else{var _0x21f15a=new AGIChannel(_0x451ea6);_0x21f15a['on'](_0x49c4('0xe'),function(){_0x4941f1[_0x49c4('0x6')](_0x49c4('0xf'),_0x21f15a);});}});});_0x41a183['on'](_0x49c4('0x7'),function(_0x3de397){_0x4941f1['emit'](_0x49c4('0x7'),new AGIError(_0x49c4('0x10'),_0x3de397[_0x49c4('0x11')]));});_0x41a183['on'](_0x49c4('0x12'),function(){_0x4941f1[_0x49c4('0x6')]('close',new AGIError(_0x49c4('0x13')));});}process[_0x49c4('0x14')](function(){_0x69bc41();});};util['inherits'](AGIServer,EventEmitter);module['exports']=function(_0x3c782d,_0x2f82d5,_0x3addb2){return new AGIServer(_0x3c782d,_0x2f82d5,_0x3addb2);}; \ No newline at end of file diff --git a/server/services/agi/vertices.js b/server/services/agi/vertices.js index 79646d2..4dff868 100644 --- a/server/services/agi/vertices.js +++ b/server/services/agi/vertices.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x570f=['An\x20incorrect\x20formatted\x20json\x20has\x20been\x20passed\x20to\x20the\x20function','message','500\x20-\x20Internal\x20Server\x20Error','options','googleDialogflow','key','googleDialogflowV2','dialogflowV2_project_id','sestekNDA','ispeechTTS','ispeech_tts_language','speed','ispeechASR','ispeech_asr_language','isConfigured','model','awsPolly','aws_secret_access_key','aws_text_type','awsLex','aws_access_key_id','aws_lex_region','aws_bot_name','googleASR','tildeASR','appid','appsecret','uri','clear','hasOwnProperty','isString','replaceObjectAllVariables','replaceAllVariables','recursiveNodeIndex','isArray','length','saveRestApiResult','isPlainObject','%s.%s','setVariable','split','replaceAll','getVariable','extra','getAndSetVariable','result','maxRetry','retry','Enter\x20in\x20MRCPSynth\x20(%s)\x20block','noop','no\x20text\x20configured','MRCPSynth','Executed\x20command\x20MRCPSynth\x20%s','mrcprecog','Enter\x20in\x20MRCPRecog\x20(%s)\x20block','no\x20grammar\x20configured','MRCPRecog','RECOG_CONFIDENCE()','MRCP_RECOG_CONFIDENCE','RECOG_INPUT()','MRCP_RECOG_TRANSCRIPT','RECOG_INSTANCE()','Executed\x20command\x20MRCPRecog\x20%s','command','args','answer','Wait\x20%s\x20seconds\x20before\x20answer','wait','Enter\x20in\x20CALLBACK\x20(%s)\x20block','no\x20list\x20selected','add','minutes','callback_priority','CALLBACK\x20added\x20phone:\x20%s\x20on\x20list:\x20%s\x20at\x20%s','custom_app','Enter\x20in\x20CUSTOM\x20APP\x20(%s)\x20block','application','Executed\x20command\x20%s\x20%s','lumenvoxtts','Enter\x20in\x20LUMENVOXTTS\x20(%s)\x20block','sestektts','Enter\x20in\x20SESTEKTTS\x20(%s)\x20block','lumenvoxasr','Enter\x20in\x20LUMENVOXASR\x20(%s)\x20block','grammar','LUMENVOX_ASR_CONFIDENCE','LUMENVOX_ASR_TRANSCRIPT','LUMENVOX_ASR_INSTANCE','sestekasr','Enter\x20in\x20SESTEKASR\x20(%s)\x20block','SESTEK_ASR_CONFIDENCE','SESTEK_ASR_TRANSCRIPT','SESTEK_ASR_INSTANCE','database','Enter\x20in\x20DATABASE\x20(%s)\x20block','odbc_id','no\x20odbc\x20database\x20found','no\x20query\x20configured','query:\x20%s','variable_id','no\x20variable\x20selected\x20for\x20the\x20result','no\x20variable\x20found','keys','forEach','%s_ROWS_COUNT','variable\x20%s\x20set','dial','debug','Enter\x20in\x20DIAL\x20(%s)\x20block','sip_id','no\x20user\x20selected','no\x20user\x20found','DIAL','opts','Executed\x20command\x20%s','Enter\x20in\x20DIALOGFLOW\x20(%s)\x20block','no\x20key\x20configured','bot','Trying\x20Dialogflow:\x20%s','speech','out','dialogflow','Dialogflow\x20is\x20unreachable','dialogflowV2','no\x20project_id\x20configured','client_email','no\x20client_email\x20configured','private_key','dialogflowV2_language','providerResponse','DialogflowV2\x20Result\x20%s','DialogflowV2\x20is\x20unreachable','sesteknda','Enter\x20in\x20SESTEKNDA\x20(%s)\x20block','username','no\x20username\x20configured','password','no\x20password\x20configured','ndassistant_url','Trying\x20SestekNDA:\x20%s','audiofile','Sestek\x20NDA\x20%s\x20file\x20created','streamFile','.wav','SestekNDA\x20Result\x20%s','SestekNDA\x20is\x20unreachable','end','Enter\x20in\x20END\x20(%s)\x20block','ext_dial','Enter\x20in\x20EXTERNAL\x20DIAL\x20(%s)\x20block','trunk_id','no\x20trunk\x20selected','no\x20trunk\x20found','trunk_name','SIP/%s/%s','Enter\x20in\x20FINALLY\x20(%s)\x20block','finally','file_id','no\x20file\x20audio\x20selected','no\x20file\x20audio\x20found','getData','response','test','mindigit','maxdigit','hiddendigitsnum','generate','first','substr','Enter\x20in\x20GETSECRETDIGITS\x20(%s)\x20block','goal','goalname','GOAL\x20%s','awspolly','[AGI]\x20Enter\x20in\x20AWSPOLLY\x20(%s)\x20block','no\x20valid\x20credentials\x20configured','Trying\x20aws\x20Polly\x20%s','aws\x20Polly\x20%s\x20file\x20created','unlink','awslex','Enter\x20in\x20Amazon\x20Lex\x20(%s)\x20block','no\x20bot\x20name\x20configured','Trying\x20Amazon\x20Lex:\x20%s','AWS_LEX_%s','Amazon\x20Lex\x20ready\x20for\x20fulfillment','amazonlex','Amazon\x20Lex\x20Result\x20%s','Amazon\x20Lex\x20is\x20unreachable','googleasr','wav','NOBEEP','recordFile','intKey','google\x20%s\x20file\x20created','GoogleASR\x20Result\x20%s','tildeasr','Enter\x20in\x20TILDEASR\x20(%s)\x20block','no\x20appid\x20configured','no\x20appsecret\x20configured','beep','tilde\x20%s\x20file\x20created','TILDE_ASR_%s','gotoc','Enter\x20in\x20GOTO\x20(%s)\x20block','continueAt','gotoif','Enter\x20in\x20GOTOIF\x20(%s)\x20block','condition','no\x20condition\x20configured','false','EVAL\x20CONDITION\x20%s\x20%s','gotoiftime','interval_id','getIntervals','true','IFTIME\x20%s\x20%s','hangup','Enter\x20in\x20HANGUP\x20(%s)\x20block','ispeechasr','Enter\x20in\x20ISPEECHASR\x20(%s)\x20block','%s/recordings/%s','ISPEECH_ASR_%s','IspeechASR\x20Result\x20%s','ispeechtts','Enter\x20in\x20ISPEECHTTS\x20(%s)\x20block','Trying\x20ispeech\x20TTS\x20%s','ispeech\x20TTS\x20is\x20unreachable','login','Enter\x20in\x20LOGIN\x20(%s)\x20block','findBy','no\x20find\x20by\x20configured','FIND\x20AGENT\x20%s\x20BY\x20%s','AGENT\x20%s\x20FOUND\x20BY','AGENT\x20%s\x20NOT\x20FOUND\x20BY','failure','logout','Enter\x20in\x20LOGOUT\x20(%s)\x20block','math','Enter\x20in\x20MATH\x20(%s)\x20block','no\x20operation\x20configured','operation','%s[%s]','variable\x20%s[key]\x20set','Enter\x20in\x20MENU\x20(%s)\x20block','Enter\x20in\x20NOOP\x20(%s)\x20block','output','playback','Enter\x20in\x20PLAYBACK\x20(%s)\x20block','PLAYBACK','queue','Enter\x20in\x20QUEUE\x20(%s)\x20block','queue_id','no\x20queue\x20selected','indexOf','toLowerCase','macro','gosub','position','record','Enter\x20in\x20RECORD\x20(%s)\x20block','recordingFormat','%s/recordings/%s.%s','Recording\x20%s\x20%s\x20%s\x20%s','escape_digits','restapi','Enter\x20in\x20RESTAPI\x20(%s)\x20block','inspect','no\x20variable\x20selected\x20for\x20the\x20response','%s_STATUS_CODE','statusCode','200','%s_STATUS_MESSAGE','statusMessage','Unable\x20to\x20set\x20result\x20in\x20variable\x20%s','saydigits','Enter\x20in\x20SAYDIGITS\x20(%s)\x20block','sayDigits','digits','saynumber','sayphonetic','Enter\x20in\x20SAYPHONETIC\x20(%s)\x20block','sendMail','Enter\x20in\x20SENDMAIL\x20(%s)\x20block','account_id','no\x20mail\x20account\x20configured','Smtp','no\x20mail\x20account\x20found','\x22%s\x22\x20<%s>','user','bcc','template_id','Trying\x20SendMail\x20with\x20account\x20%s','smtpOptions','Mail\x20message\x20added\x20to\x20outgoing\x20process','sendFax','Enter\x20in\x20SENDFAX\x20(%s)\x20block','SENDFAX\x20block\x20not\x20implemented','sendSMS','Enter\x20in\x20SENDSMS\x20(%s)\x20block','sms_account_id','no\x20sms\x20account\x20configured','no\x20sms\x20account\x20found','sms_text','sendSMS\x20message','Trying\x20SendSMS\x20with\x20account\x20%s','Sms\x20message\x20added\x20to\x20outgoing\x20process','no\x20variable\x20selected','variable_value','start','Enter\x20in\x20START\x20(%s)\x20block','yes','Answer','Skipped\x20Answer','Enter\x20in\x20SUBPROJECT\x20(%s)\x20block','project_id','no\x20subproject\x20found\x20with\x20id\x20%d','project\x20in\x20subproject\x20must\x20be\x20different\x20from\x20the\x20called\x20project','AGI','host','system','Enter\x20in\x20SYSTEM\x20(%s)\x20block','sh\x20command:\x20%s\x20result\x20on\x20variable:\x20%s','Trying\x20Google\x20Cloud\x20TTS\x20%s','Google\x20Cloud\x20TTS\x20%s\x20file\x20created','Google\x20Cloud\x20TTS\x20is\x20unreachable','Enter\x20in\x20GOOGLETTS\x20(%s)\x20block','Trying\x20Google\x20TTS\x20%s','Google\x20TTS\x20%s\x20file\x20created','unpause','Enter\x20in\x20UNPAUSE\x20(%s)\x20block','success','voicemail','Enter\x20in\x20VOICEMAIL\x20(%s)\x20block','VOICEMAIL','mailbox','vswitch','Enter\x20in\x20SWITCH\x20(%s)\x20block','join','util','lodash','shelljs','moment','mustache','request-promise','../../config/logger','agi','../../config/environment','../../config/environment/shared','/var/opt/motion2/server/files','rawBody','getdigits','channel','rpc','mailRpc','prototype','then','name','getVoiceQueue','getVoiceQueueById','catch','getSquareProject','getSquareProjectById','getSquareOdbc','getSquareOdbcById','getUser','getUserById','getTrunk','getTrunkById','getSound','getSoundPath','save_name','getMailAccount','getMailAccountById','sendMailMessage','getIntervalById','IntervalId','interval','format','getQueryOdbc','open','error','Error\x20getting\x20ODBC\x20connection\x20%s','info','ODBC\x20connection\x20successfully','query','Error\x20executing\x20query\x20%s','close','getSmsAccount','getSmsAccountById','createSmsMessage','createSquareDetailsReport','uniqueid','label','agicommand','callerid','createSquareRecording','context','extension','priority','accountcode','dnid','arg_1','createSquareMessage','createCmContact','isEmpty','isNil','random','lastName','phone','list_id','scheduledAt','callback','toString','getPause','getPauseById','agentPause','agent','agentUnpause','agentLogout','agentLogin','internal','%s/%s@from-sip/n','LOCAL','exec','trim','replace','googleCloudTTS','apiKey','text','languageCode','en-US','ssmlGender','MALE','MP3','google_tts_language','restAPI','url','method','timeout','number','includes','POST','PUT','toUpperCase','body','parse','An\x20incorrect\x20formatted\x20json\x20body\x20has\x20been\x20passed\x20to\x20the\x20function','headers','rawHeaders','computedVariables','sync','render','stringify'];(function(_0x5e7f1f,_0x74fce9){var _0x205a70=function(_0x4a0147){while(--_0x4a0147){_0x5e7f1f['push'](_0x5e7f1f['shift']());}};_0x205a70(++_0x74fce9);}(_0x570f,0x152));var _0xf570=function(_0x46c882,_0x54c2e1){_0x46c882=_0x46c882-0x0;var _0x22c031=_0x570f[_0x46c882];return _0x22c031;};'use strict';var fs=require('fs');var util=require(_0xf570('0x0'));var _=require(_0xf570('0x1'));var sh=require(_0xf570('0x2'));var odbc=require('odbc')();var rs=require('randomstring');var moment=require(_0xf570('0x3'));var Mustache=require(_0xf570('0x4'));var rp=require(_0xf570('0x5'));var logger=require(_0xf570('0x6'))(_0xf570('0x7'));var config=require(_0xf570('0x8'));var shared=require(_0xf570('0x9'));var scripts=require('./scripts');var FILES_PATH=_0xf570('0xa');var recursiveMapAttributes=['rawHeaders',_0xf570('0xb')];var verticesWithRetry=['menu',_0xf570('0xc'),'getsecretdigits'];var AGIVertices=function(_0x350a32,_0x49b42f,_0x19bee1){this[_0xf570('0xd')]=_0x350a32;this[_0xf570('0xe')]=_0x49b42f;this[_0xf570('0xf')]=_0x19bee1;};AGIVertices[_0xf570('0x10')]['getVariable']=function(_0x46e6dd,_0xe4d52d){this[_0xf570('0xe')]['getVariableById'](_0x46e6dd)[_0xf570('0x11')](function(_0x3c689c){_0xe4d52d(null,_0x3c689c?_0x3c689c[_0xf570('0x12')]:![]);})['catch'](function(_0x32e0b0){_0xe4d52d(_0x32e0b0);});};AGIVertices[_0xf570('0x10')][_0xf570('0x13')]=function(_0x5242d6,_0x4c6917){this[_0xf570('0xe')][_0xf570('0x14')](_0x5242d6)[_0xf570('0x11')](function(_0x38d03e){_0x4c6917(null,_0x38d03e?_0x38d03e[_0xf570('0x12')]:![]);})[_0xf570('0x15')](function(_0x2531f9){_0x4c6917(_0x2531f9);});};AGIVertices[_0xf570('0x10')][_0xf570('0x16')]=function(_0x43e760,_0x46a3aa){this['rpc'][_0xf570('0x17')](_0x43e760)[_0xf570('0x11')](function(_0x23aa99){_0x46a3aa(null,_0x23aa99?_0x23aa99[_0xf570('0x12')]:![]);})[_0xf570('0x15')](function(_0x5cde47){_0x46a3aa(_0x5cde47);});};AGIVertices[_0xf570('0x10')][_0xf570('0x18')]=function(_0x29c3f4,_0x4e2649){this[_0xf570('0xe')][_0xf570('0x19')](_0x29c3f4)[_0xf570('0x11')](function(_0x1a3e91){_0x4e2649(null,_0x1a3e91?_0x1a3e91['dsn']:![]);})[_0xf570('0x15')](function(_0xd2058e){_0x4e2649(_0xd2058e);});};AGIVertices[_0xf570('0x10')][_0xf570('0x1a')]=function(_0x2488bd,_0x570703){this[_0xf570('0xe')][_0xf570('0x1b')](_0x2488bd)[_0xf570('0x11')](function(_0x1151d1){_0x570703(null,_0x1151d1?_0x1151d1['name']:![]);})[_0xf570('0x15')](function(_0x40c4f1){_0x570703(_0x40c4f1);});};AGIVertices[_0xf570('0x10')][_0xf570('0x1c')]=function(_0x45cb29,_0x210425){this['rpc'][_0xf570('0x1d')](_0x45cb29)[_0xf570('0x11')](function(_0x2a8701){_0x210425(null,_0x2a8701?_0x2a8701[_0xf570('0x12')]:![]);})[_0xf570('0x15')](function(_0x268be7){_0x210425(_0x268be7);});};AGIVertices[_0xf570('0x10')][_0xf570('0x1e')]=function(_0xdf8fae,_0x33a603){var _0x2278b8=this;this[_0xf570('0xe')]['getSoundById'](_0xdf8fae)['then'](function(_0x2eece8){_0x33a603(null,_0x2eece8?_0x2278b8[_0xf570('0x1f')](_0x2eece8[_0xf570('0x20')]):![]);})[_0xf570('0x15')](function(_0x170eca){_0x33a603(_0x170eca);});};AGIVertices[_0xf570('0x10')][_0xf570('0x21')]=function(_0x204f06,_0x951c82){this['rpc'][_0xf570('0x22')](_0x204f06)['then'](function(_0x474faa){_0x951c82(null,_0x474faa?_0x474faa:![]);})[_0xf570('0x15')](function(_0x23ada6){_0x951c82(_0x23ada6);});};AGIVertices['prototype'][_0xf570('0x23')]=function(_0x3c1a25,_0x59c756,_0x422767){this['mailRpc'][_0xf570('0x23')](_0x3c1a25,_0x59c756)[_0xf570('0x11')](function(){_0x422767(null);})[_0xf570('0x15')](function(_0x2f21f6){_0x422767(_0x2f21f6);});};AGIVertices['prototype']['getIntervals']=function(_0x17ddf9,_0x3b1a68){this[_0xf570('0xe')][_0xf570('0x24')](_0x17ddf9)[_0xf570('0x11')](function(_0x5edb32){if(_0x5edb32){if(_0x5edb32[_0xf570('0x25')]){_0x3b1a68(null,[_0x5edb32['interval']]);}else{_0x3b1a68(null,_['map'](_0x5edb32['Intervals'],_0xf570('0x26')));}}else{_0x3b1a68(null,![]);}})['catch'](function(_0x196ac7){_0x3b1a68(_0x196ac7);});};AGIVertices[_0xf570('0x10')]['getSoundPath']=function(_0x4a9df0){return util[_0xf570('0x27')]('%s/sounds/converted/%s',FILES_PATH,_0x4a9df0);};AGIVertices['prototype'][_0xf570('0x28')]=function(_0x4ee429,_0x533291,_0x58b3d2){odbc[_0xf570('0x29')](_0x4ee429,function(_0x4120e9){if(_0x4120e9){logger[_0xf570('0x2a')](_0xf570('0x2b'),_0x4120e9);_0x58b3d2(_0x4120e9);}else{logger[_0xf570('0x2c')](_0xf570('0x2d'));odbc[_0xf570('0x2e')](_0x533291,function(_0x1af395,_0x27e956){if(_0x1af395){logger[_0xf570('0x2c')](_0xf570('0x2f'),_0x533291);_0x58b3d2(_0x1af395);}else{logger[_0xf570('0x2c')]('Query\x20executed\x20correctly\x20%s',_0x533291);odbc[_0xf570('0x30')](function(_0x404d8f){if(_0x404d8f){logger[_0xf570('0x2a')]('Error\x20closing\x20connection\x20to\x20odbc\x20%s',_0x404d8f);}_0x58b3d2(null,_0x27e956);});}});}});};AGIVertices[_0xf570('0x10')][_0xf570('0x31')]=function(_0x22b201,_0x1b2f1d){this[_0xf570('0xe')][_0xf570('0x32')](_0x22b201)[_0xf570('0x11')](function(_0x3ae19e){_0x1b2f1d(null,_0x3ae19e?_0x3ae19e:![]);})[_0xf570('0x15')](function(_0x1164f3){_0x1b2f1d(_0x1164f3);});};AGIVertices[_0xf570('0x10')][_0xf570('0x33')]=function(_0x3f2cfd,_0x4bab28){this[_0xf570('0xe')][_0xf570('0x33')](_0x3f2cfd)['then'](function(_0x851844){_0x4bab28(null,_0x851844);})[_0xf570('0x15')](function(_0x436689){_0x4bab28(_0x436689);});};AGIVertices[_0xf570('0x10')][_0xf570('0x34')]=function(_0xabf891,_0x4a337,_0x5cbfb3){this[_0xf570('0xe')][_0xf570('0x34')]({'uniqueid':this[_0xf570('0xd')][_0xf570('0x35')],'node':_0xabf891[_0xf570('0x36')],'application':_0xabf891[_0xf570('0x37')],'data':_0x4a337||null,'project_name':this['channel']['arg_1'],'callerid':this[_0xf570('0xd')][_0xf570('0x38')]})[_0xf570('0x11')](function(_0x81e6ca){if(_0x5cbfb3){_0x5cbfb3(null,_0x81e6ca);}})['catch'](function(_0x1d199f){if(_0x5cbfb3){_0x5cbfb3(_0x1d199f);}});};AGIVertices[_0xf570('0x10')][_0xf570('0x39')]=function(_0x4cf025,_0x3a74c9,_0x548eb0,_0x863f87){this[_0xf570('0xe')][_0xf570('0x39')]({'uniqueid':this[_0xf570('0xd')][_0xf570('0x35')],'callerid':this[_0xf570('0xd')][_0xf570('0x38')],'calleridname':this[_0xf570('0xd')]['calleridname'],'context':this['channel'][_0xf570('0x3a')],'extension':this['channel'][_0xf570('0x3b')],'priority':this[_0xf570('0xd')][_0xf570('0x3c')],'accountcode':this[_0xf570('0xd')][_0xf570('0x3d')],'dnid':this[_0xf570('0xd')][_0xf570('0x3e')],'projectName':this[_0xf570('0xd')][_0xf570('0x3f')],'saveName':_0x3a74c9,'filename':_0x4cf025['file']||_0x3a74c9,'savePath':_0x548eb0})[_0xf570('0x11')](function(_0x5b9858){_0x863f87(null,_0x5b9858);})[_0xf570('0x15')](function(_0x53d9fb){_0x863f87(_0x53d9fb);});};AGIVertices[_0xf570('0x10')]['createSquareMessage']=function(_0x4d2d28,_0x144da0,_0x598848,_0x406949,_0x4b2295){this['rpc'][_0xf570('0x40')]({'uniqueid':this[_0xf570('0xd')][_0xf570('0x35')],'body':_0x4d2d28,'direction':_0x144da0,'providerName':_0x598848,'providerResponse':_0x406949})[_0xf570('0x11')](function(_0x2d1f3e){if(_0x4b2295){_0x4b2295(null,_0x2d1f3e);}})['catch'](function(_0x3c2aef){if(_0x4b2295){_0x4b2295(_0x3c2aef);}});};AGIVertices[_0xf570('0x10')]['createCmContact']=function(_0x2050a1,_0x4d442d){this[_0xf570('0xe')][_0xf570('0x41')]({'firstName':_[_0xf570('0x42')](_0x2050a1[_0xf570('0x12')])||_[_0xf570('0x43')](_0x2050a1['name'])?'callback_'+Math[_0xf570('0x44')]():_0x2050a1[_0xf570('0x12')],'lastName':_[_0xf570('0x42')](_0x2050a1[_0xf570('0x45')])||_['isNil'](_0x2050a1[_0xf570('0x45')])?null:_0x2050a1['lastName'],'phone':_0x2050a1[_0xf570('0x46')],'ListId':_0x2050a1[_0xf570('0x47')],'scheduledat':_0x2050a1[_0xf570('0x48')],'callbackUniqueid':this[_0xf570('0xd')]['uniqueid'],'tags':_0xf570('0x49'),'description':'Callback\x20scheduled\x20at\x20'+_0x2050a1['scheduledAt'][_0xf570('0x4a')](),'priority':_0x2050a1['callback_priority']})['then'](function(_0xb93df3){_0x4d442d(null,_0xb93df3);})[_0xf570('0x15')](function(_0x4db669){_0x4d442d(_0x4db669);});};AGIVertices[_0xf570('0x10')][_0xf570('0x4b')]=function(_0x537319,_0x31aa0f){this['rpc'][_0xf570('0x4c')](_0x537319)[_0xf570('0x11')](function(_0x1f4752){_0x31aa0f(null,_0x1f4752?_0x1f4752[_0xf570('0x12')]:![]);})[_0xf570('0x15')](function(_0x512b0b){_0x31aa0f(_0x512b0b);});};AGIVertices[_0xf570('0x10')][_0xf570('0x4d')]=function(_0x535b31,_0xef9b59,_0x4e595e){var _0x4333d0={'role':_0xf570('0x4e')};_0x4333d0[_0x535b31]=this['channel'][_0xf570('0x38')];this['rpc'][_0xf570('0x4d')](_0x4333d0,_0xef9b59,this[_0xf570('0xd')][_0xf570('0x35')])[_0xf570('0x11')](function(_0x7eb8b1){_0x4e595e(null,_[_0xf570('0x43')](_0x7eb8b1)?![]:!![]);})['catch'](function(_0x5a49c8){logger['error'](_0x5a49c8);_0x4e595e(null,![]);});};AGIVertices['prototype']['agentUnpause']=function(_0xe9ac6e,_0x4158ac){var _0x46da28={'role':'agent'};_0x46da28[_0xe9ac6e]=this[_0xf570('0xd')][_0xf570('0x38')];this[_0xf570('0xe')][_0xf570('0x4f')](_0x46da28)['then'](function(_0x3d7f3d){_0x4158ac(null,_[_0xf570('0x43')](_0x3d7f3d)?![]:!![]);})[_0xf570('0x15')](function(_0x5380a4){logger['error'](_0x5380a4);_0x4158ac(null,![]);});};AGIVertices[_0xf570('0x10')][_0xf570('0x50')]=function(_0x4d46cc,_0x11c1d4){var _0x4efc54={'role':'agent'};_0x4efc54[_0x4d46cc]=this['channel']['callerid'];this[_0xf570('0xe')]['agentLogout'](_0x4efc54)[_0xf570('0x11')](function(_0x418893){_0x11c1d4(null,_[_0xf570('0x43')](_0x418893)?![]:!![]);})['catch'](function(_0x36d8e0){logger[_0xf570('0x2a')](_0x36d8e0);_0x11c1d4(null,![]);});};AGIVertices['prototype'][_0xf570('0x51')]=function(_0x12becd,_0x22c8d9){var _0x57df8b={'role':_0xf570('0x4e')};_0x57df8b[_0x12becd]=this[_0xf570('0xd')][_0xf570('0x38')];var _0x275151=_0x12becd!=_0xf570('0x52')?util[_0xf570('0x27')](_0xf570('0x53'),_0xf570('0x54'),this['channel'][_0xf570('0x38')]):undefined;this[_0xf570('0xe')][_0xf570('0x51')](_0x57df8b,_0x275151)[_0xf570('0x11')](function(_0x5135d4){_0x22c8d9(null,_[_0xf570('0x43')](_0x5135d4)?![]:!![]);})[_0xf570('0x15')](function(_0x57683b){logger[_0xf570('0x2a')](_0x57683b);_0x22c8d9(null,![]);});};AGIVertices['prototype']['shellCommand']=function(_0x5b0abd,_0x172c88){sh[_0xf570('0x55')](_[_0xf570('0x56')](_0x5b0abd),function(_0x17cf44,_0x12df8a){var _0x2106bc=_0x12df8a[_0xf570('0x57')](/(\r\n|\n|\r)/gm,'');_0x172c88(null,_0x2106bc);});};AGIVertices['prototype'][_0xf570('0x58')]=function(_0x5c1372,_0x1adb8a){scripts[_0xf570('0x58')](_0x5c1372[_0xf570('0x59')],_0x5c1372['google_cloud_tts_text_type']||'text',_0x5c1372[_0xf570('0x5a')],_0x5c1372[_0xf570('0x5b')]||_0xf570('0x5c'),_0x5c1372[_0xf570('0x5d')]||_0xf570('0x5e'),_0x5c1372['audioEncoding']||_0xf570('0x5f'))[_0xf570('0x11')](function(_0x2800af){_0x1adb8a(null,_0x2800af);})[_0xf570('0x15')](function(_0x193cb9){_0x1adb8a(_0x193cb9);});};AGIVertices['prototype']['googleTTS']=function(_0x43be69,_0x35b470){scripts['googleTTS'](_0x43be69[_0xf570('0x5a')],_0x43be69[_0xf570('0x60')]||'en',0x1)[_0xf570('0x11')](function(_0x569d79){_0x35b470(null,_0x569d79);})[_0xf570('0x15')](function(_0xa73978){_0x35b470(_0xa73978);});};AGIVertices['prototype'][_0xf570('0x61')]=function(_0x317dd3,_0xfa55e){var _0x4b3118={'uri':_0x317dd3[_0xf570('0x62')],'method':_0x317dd3[_0xf570('0x63')],'json':!![],'resolveWithFullResponse':!![],'strictSSL':![],'timeout':typeof parseInt(_0x317dd3[_0xf570('0x64')])===_0xf570('0x65')&&parseInt(_0x317dd3[_0xf570('0x64')])>=0x1?parseInt(_0x317dd3['timeout'])*0x3e8:0x5*0x3e8};if(_[_0xf570('0x66')]([_0xf570('0x67'),_0xf570('0x68')],_0x4b3118[_0xf570('0x63')][_0xf570('0x69')]())){try{_0x4b3118[_0xf570('0x6a')]=_0x317dd3[_0xf570('0xb')]?JSON[_0xf570('0x6b')](_0x317dd3[_0xf570('0xb')]):{};}catch(_0x58cbcf){logger[_0xf570('0x2a')](_0xf570('0x6c'),_0x58cbcf);}}try{_0x4b3118[_0xf570('0x6d')]=_0x317dd3[_0xf570('0x6e')]?JSON[_0xf570('0x6b')](_0x317dd3['rawHeaders']):{};}catch(_0x5bbe77){logger['error']('An\x20incorrect\x20formatted\x20json\x20headers\x20has\x20been\x20passed\x20to\x20the\x20function',_0x5bbe77);}if(_0x317dd3[_0xf570('0x6f')]){try{var _0x127303=require(_0x317dd3[_0xf570('0x6f')])[_0xf570('0x70')](this,_0x4b3118);_0x4b3118['uri']=Mustache[_0xf570('0x71')](_0x317dd3['url'],_0x127303,{},['$$','$$']);if(_0x4b3118[_0xf570('0x6d')]){_0x4b3118[_0xf570('0x6d')]=JSON[_0xf570('0x6b')](Mustache[_0xf570('0x71')](JSON[_0xf570('0x72')](_0x4b3118[_0xf570('0x6d')]),_0x127303,{},['$$','$$']));}if(_0x4b3118['body']){_0x4b3118[_0xf570('0x6a')]=JSON[_0xf570('0x6b')](Mustache[_0xf570('0x71')](JSON[_0xf570('0x72')](_0x4b3118[_0xf570('0x6a')]),_0x127303,{},['$$','$$']));}}catch(_0x8591d7){logger[_0xf570('0x2a')](_0xf570('0x73'),_0x8591d7);}}rp(_0x4b3118)['then'](function(_0x1bf5b9){var _0xa1f33a={'statusCode':_0x1bf5b9['statusCode']||0xc8,'statusMessage':_0x1bf5b9['statusMessage']||'OK','headers':_0x1bf5b9['headers']||{},'body':_0x1bf5b9[_0xf570('0x6a')]||{}};_0xfa55e(null,_0xa1f33a);})[_0xf570('0x15')](function(_0x30c54d){var _0x2b24da={'statusCode':_0x30c54d['statusCode']||0x1f4,'statusMessage':_0x30c54d[_0xf570('0x74')]||_0xf570('0x75'),'headers':_0x30c54d[_0xf570('0x76')][_0xf570('0x6d')]||{},'body':_0x30c54d['options'][_0xf570('0x6a')]||{}};_0xfa55e(null,_0x2b24da);});};AGIVertices[_0xf570('0x10')][_0xf570('0x77')]=function(_0x3d76b2,_0xc1e6f){scripts[_0xf570('0x77')](this['channel'][_0xf570('0x35')],_0x3d76b2[_0xf570('0x78')],_0x3d76b2[_0xf570('0x5a')],_0x3d76b2['dialogflow_language']||'en')['then'](function(_0x3fd265){_0xc1e6f(null,_0x3fd265);})[_0xf570('0x15')](function(_0x143a92){_0xc1e6f(_0x143a92);});};AGIVertices[_0xf570('0x10')][_0xf570('0x79')]=function(_0x3c69b6,_0x247123){scripts[_0xf570('0x79')](this[_0xf570('0xd')][_0xf570('0x35')],_0x3c69b6[_0xf570('0x7a')],_0x3c69b6['client_email'],_0x3c69b6['private_key'],_0x3c69b6[_0xf570('0x5a')],_0x3c69b6['dialogflowV2_language']||'en')[_0xf570('0x11')](function(_0xe414e7){_0x247123(null,_0xe414e7);})[_0xf570('0x15')](function(_0x2d96db){_0x247123(_0x2d96db);});};AGIVertices[_0xf570('0x10')][_0xf570('0x7b')]=function(_0x5f4af3,_0x3053b2){scripts[_0xf570('0x7b')](this['channel'],_0x5f4af3)[_0xf570('0x11')](function(_0x2ef7c4){_0x3053b2(null,_0x2ef7c4);})[_0xf570('0x15')](function(_0x422194){_0x3053b2(_0x422194);});};AGIVertices[_0xf570('0x10')][_0xf570('0x7c')]=function(_0x2c55e8,_0x5b4f62){scripts[_0xf570('0x7c')](_0x2c55e8[_0xf570('0x78')],_0x2c55e8['text'],_0x2c55e8[_0xf570('0x7d')]||_0xf570('0x5c'),_0x2c55e8[_0xf570('0x7e')])[_0xf570('0x11')](function(_0x48f2d6){_0x5b4f62(null,_0x48f2d6);})[_0xf570('0x15')](function(_0x4f9587){_0x5b4f62(_0x4f9587);});};AGIVertices[_0xf570('0x10')][_0xf570('0x7f')]=function(_0x530347,_0x3f0fc9,_0x5bf82a){scripts[_0xf570('0x7f')](_0x3f0fc9,_0x530347['key'],_0x530347[_0xf570('0x80')]||'en-US',this[_0xf570('0x81')](_0x530347[_0xf570('0x82')])?_0x530347['model']:undefined)[_0xf570('0x11')](function(_0x354b04){_0x5bf82a(null,_0x354b04);})[_0xf570('0x15')](function(_0x2c57bb){_0x5bf82a(_0x2c57bb);});};AGIVertices[_0xf570('0x10')][_0xf570('0x83')]=function(_0x39d9cc,_0x53811c){scripts['awsPolly'](_0x39d9cc['aws_access_key_id'],_0x39d9cc[_0xf570('0x84')],_0x39d9cc['aws_polly_region'],_0x39d9cc['aws_polly_voice']||'Amy',_0x39d9cc['text'],_0x39d9cc[_0xf570('0x85')]||_0xf570('0x5a'))['then'](function(_0x1e0e6a){_0x53811c(null,_0x1e0e6a);})[_0xf570('0x15')](function(_0x441c22){_0x53811c(_0x441c22);});};AGIVertices['prototype']['awsLex']=function(_0x4b8a51,_0x1a74cc){scripts[_0xf570('0x86')](this[_0xf570('0xd')]['uniqueid'],_0x4b8a51[_0xf570('0x87')],_0x4b8a51[_0xf570('0x84')],_0x4b8a51[_0xf570('0x88')],_0x4b8a51['text'],_0x4b8a51[_0xf570('0x89')])[_0xf570('0x11')](function(_0xfdb7be){_0x1a74cc(null,_0xfdb7be);})[_0xf570('0x15')](function(_0x5db039){_0x1a74cc(_0x5db039);});};AGIVertices[_0xf570('0x10')][_0xf570('0x8a')]=function(_0xce1615,_0x1826e8,_0x4211c3){scripts[_0xf570('0x8a')](_0x1826e8,_0xce1615['key'],_0xce1615['google_asr_language']||_0xf570('0x5c'))[_0xf570('0x11')](function(_0x4c43e2){_0x4211c3(null,_0x4c43e2);})[_0xf570('0x15')](function(_0x508371){_0x4211c3(_0x508371);});};AGIVertices[_0xf570('0x10')][_0xf570('0x8b')]=function(_0x4cf38d,_0x584afc,_0x2a3c93){scripts[_0xf570('0x8b')](_0x584afc,_0x4cf38d[_0xf570('0x8c')],_0x4cf38d[_0xf570('0x8d')],_0x4cf38d[_0xf570('0x8e')])[_0xf570('0x11')](function(_0x33f5bc){_0x2a3c93(null,_0x33f5bc);})[_0xf570('0x15')](function(_0x27d204){_0x2a3c93(_0x27d204);});};AGIVertices['prototype'][_0xf570('0x8f')]=function(_0x19cfe0){var _0x2c4bc8=_[_0xf570('0x66')](verticesWithRetry,_0x19cfe0[_0xf570('0x37')])?_0x19cfe0:_['clone'](_0x19cfe0);for(var _0x2d16dd in _0x2c4bc8){if(_0x2c4bc8[_0xf570('0x90')](_0x2d16dd)){if(_0x2c4bc8[_0x2d16dd]&&_[_0xf570('0x91')](_0x2c4bc8[_0x2d16dd])){if(_[_0xf570('0x66')](recursiveMapAttributes,_0x2d16dd)){_0x2c4bc8[_0x2d16dd]=this[_0xf570('0x92')](_0x2c4bc8[_0x2d16dd]);}else{_0x2c4bc8[_0x2d16dd]=this[_0xf570('0x93')](_0x2c4bc8[_0x2d16dd]);}}}}return _0x2c4bc8;};AGIVertices[_0xf570('0x10')][_0xf570('0x94')]=function(_0x10c3bc){for(var _0x43422a in _0x10c3bc){if(_0x10c3bc['hasOwnProperty'](_0x43422a)){if(_['isPlainObject'](_0x10c3bc[_0x43422a])){this[_0xf570('0x94')](_0x10c3bc[_0x43422a]);}else if(_[_0xf570('0x95')](_0x10c3bc[_0x43422a])){for(var _0x25057c=0x0;_0x25057c<_0x10c3bc[_0x43422a][_0xf570('0x96')];_0x25057c++){this[_0xf570('0x94')](_0x10c3bc[_0x43422a][_0x25057c]);}}else if(_[_0xf570('0x91')](_0x10c3bc[_0x43422a])){_0x10c3bc[_0x43422a]=this['replaceAllVariables'](_0x10c3bc[_0x43422a]);}}}};AGIVertices['prototype'][_0xf570('0x97')]=function(_0x1eb18f,_0xe57970){for(var _0x6c1269 in _0x1eb18f){if(_0x1eb18f['hasOwnProperty'](_0x6c1269)){if(_[_0xf570('0x98')](_0x1eb18f[_0x6c1269])){if(!_[_0xf570('0x42')](_0x1eb18f[_0x6c1269])){this[_0xf570('0x97')](_0x1eb18f[_0x6c1269],util[_0xf570('0x27')]('%s.%s',_0xe57970,_0x6c1269));}}else if(_[_0xf570('0x95')](_0x1eb18f[_0x6c1269])){for(var _0xf4e6ca=0x0;_0xf4e6ca<_0x1eb18f[_0x6c1269]['length'];_0xf4e6ca++){this[_0xf570('0x97')](_0x1eb18f[_0x6c1269][_0xf4e6ca],util['format'](_0xf570('0x99'),_0xe57970,_0x6c1269+'['+_0xf4e6ca+']'));}}else{if(!_[_0xf570('0x43')](_0x1eb18f[_0x6c1269])){this[_0xf570('0xd')][_0xf570('0x9a')](util[_0xf570('0x27')]('%s.%s',_0xe57970,_0x6c1269),_0x1eb18f[_0x6c1269]);}}}}};AGIVertices[_0xf570('0x10')][_0xf570('0x92')]=function(_0x320a7e){try{var _0x20af63=JSON[_0xf570('0x6b')](_0x320a7e);this['recursiveNodeIndex'](_0x20af63);return JSON['stringify'](_0x20af63);}catch(_0x1f44db){return this[_0xf570('0x93')](_0x320a7e);}};AGIVertices[_0xf570('0x10')]['replaceAllVariables']=function(_0x9fdfef){var _0x365310=_0x9fdfef[_0xf570('0x9b')]('{');for(var _0x40d916=0x1;_0x40d916<_0x365310['length'];_0x40d916+=0x1){var _0x2f5d66=_0x365310[_0x40d916][_0xf570('0x9b')]('}');if(_0x2f5d66['length']>0x1){_0x9fdfef=_0x9fdfef[_0xf570('0x9c')]('{'+_0x2f5d66[0x0]+'}',this[_0xf570('0xd')][_0xf570('0x9d')](_0x2f5d66[0x0])[_0xf570('0x9e')]||_0x2f5d66[0x0]);}}if(_0x365310[_0xf570('0x96')]===0x1){return _0x9fdfef['toString']();}return this[_0xf570('0x93')](_0x9fdfef);};AGIVertices[_0xf570('0x10')][_0xf570('0x9f')]=function(_0x7612f2,_0x1e4847){var _0x5b7144=this[_0xf570('0xd')][_0xf570('0x9d')](_0x7612f2);if(_0x5b7144[_0xf570('0xa0')]===-0x1){return _0x5b7144;}logger['info'](util[_0xf570('0x27')]('The\x20\x22%s\x22\x20variable\x20value\x20is:\x20%s',_0x1e4847,_0x5b7144[_0xf570('0x9e')]));return this['channel']['setVariable'](_0x1e4847,_0x5b7144['extra']);};AGIVertices[_0xf570('0x10')][_0xf570('0x81')]=function(_0x2b7dae){return _0x2b7dae&&_0x2b7dae!=='0'&&_0x2b7dae!=='-1'&&_0x2b7dae!=='';};AGIVertices['prototype'][_0xf570('0xa1')]=function(_0x7c7006){this[_0xf570('0x34')][_0xf570('0x70')](this,_0x7c7006,'-');_0x7c7006[_0xf570('0xa2')]=_0x7c7006['maxRetry'];return{'code':0xc8,'result':'-'};};AGIVertices[_0xf570('0x10')]['mrcpsynth']=function(_0x511591){logger[_0xf570('0x2c')](util[_0xf570('0x27')](_0xf570('0xa3'),_0x511591[_0xf570('0x36')]));if(!this['isConfigured'](_0x511591[_0xf570('0x5a')])){return this[_0xf570('0xd')][_0xf570('0xa4')](_0xf570('0xa5'));}var _0x2b061b='\x22'+_0x511591['text']+'\x22';if(this[_0xf570('0x81')](_0x511591['options'])){_0x2b061b+=','+_0x511591[_0xf570('0x76')];}var _0xcb9572=this[_0xf570('0xd')][_0xf570('0x55')](_0xf570('0xa6'),_0x2b061b);if(_0xcb9572['result']===-0x1){return _0xcb9572;}return this[_0xf570('0xd')][_0xf570('0xa4')](util[_0xf570('0x27')](_0xf570('0xa7'),_0x2b061b));};AGIVertices[_0xf570('0x10')][_0xf570('0xa8')]=function(_0x5d0fec){logger['info'](util[_0xf570('0x27')](_0xf570('0xa9'),_0x5d0fec[_0xf570('0x36')]));if(!this['isConfigured'](_0x5d0fec['grammar'])){return this[_0xf570('0xd')]['noop'](_0xf570('0xaa'));}var _0x81222f=_0x5d0fec['grammar'];if(this[_0xf570('0x81')](_0x5d0fec[_0xf570('0x76')])){_0x81222f+=','+_0x5d0fec['options'];}var _0x1d6da8=this['channel'][_0xf570('0x55')](_0xf570('0xab'),_0x81222f);if(_0x1d6da8[_0xf570('0xa0')]===-0x1){return _0x1d6da8;}var _0x57a156=this[_0xf570('0x9f')](_0xf570('0xac'),_0xf570('0xad'));if(_0x57a156[_0xf570('0xa0')]===-0x1){return _0x57a156;}var _0x308f02=this[_0xf570('0x9f')](_0xf570('0xae'),_0xf570('0xaf'));if(_0x308f02[_0xf570('0xa0')]===-0x1){return _0x308f02;}var _0x17919a=this['getAndSetVariable'](_0xf570('0xb0'),'MRCP_RECOG_INSTANCE');if(_0x17919a[_0xf570('0xa0')]===-0x1){return _0x17919a;}return this[_0xf570('0xd')][_0xf570('0xa4')](util['format'](_0xf570('0xb1'),_0x81222f));};AGIVertices[_0xf570('0x10')]['agi']=function(_0x3201ce){logger[_0xf570('0x2c')](util['format']('Enter\x20in\x20AGI\x20(%s)\x20block',_0x3201ce[_0xf570('0x36')]));return this[_0xf570('0xd')][_0xf570('0x7')]([_0x3201ce[_0xf570('0xb2')],_0x3201ce[_0xf570('0xb3')]]);};AGIVertices[_0xf570('0x10')][_0xf570('0xb4')]=function(_0x24228d){logger['info'](util[_0xf570('0x27')]('Enter\x20in\x20ANSWER\x20(%s)\x20block',_0x24228d[_0xf570('0x36')]));if(this[_0xf570('0x81')](_0x24228d['timeout'])){logger[_0xf570('0x2c')](util[_0xf570('0x27')](_0xf570('0xb5'),_0x24228d[_0xf570('0x64')]));var _0x18afc=this['channel'][_0xf570('0xb6')](_0x24228d['timeout']);if(_0x18afc[_0xf570('0xa0')]===-0x1){return _0x18afc;}}return this[_0xf570('0xd')][_0xf570('0xb4')]();};AGIVertices['prototype'][_0xf570('0x49')]=function(_0x16a90c){logger[_0xf570('0x2c')](util[_0xf570('0x27')](_0xf570('0xb7'),_0x16a90c['label']));if(!this[_0xf570('0x81')](_0x16a90c['list_id'])){return this[_0xf570('0xd')]['error'](_0x16a90c,_0xf570('0xb8'));}_0x16a90c[_0xf570('0x48')]=moment();if(this[_0xf570('0x81')](_0x16a90c['delay'])){_0x16a90c['scheduledAt']=moment()[_0xf570('0xb9')](_0x16a90c['delay'],_0xf570('0xba'));}if(!this[_0xf570('0x81')](_0x16a90c['callback_priority'])){_0x16a90c[_0xf570('0xbb')]=0x2;}this['createCmContact'][_0xf570('0x70')](this,_0x16a90c);return this[_0xf570('0xd')][_0xf570('0xa4')](util['format'](_0xf570('0xbc'),_0x16a90c[_0xf570('0x46')],_0x16a90c['list_id'],_0x16a90c['scheduledAt']));};AGIVertices['prototype'][_0xf570('0xbd')]=function(_0x12e086){logger[_0xf570('0x2c')](util[_0xf570('0x27')](_0xf570('0xbe'),_0x12e086[_0xf570('0x36')]));var _0x39b09a=this[_0xf570('0xd')]['exec'](_0x12e086[_0xf570('0xbf')],_0x12e086[_0xf570('0x76')]);if(_0x39b09a['result']===-0x1){return _0x39b09a;}return this[_0xf570('0xd')][_0xf570('0xa4')](util[_0xf570('0x27')](_0xf570('0xc0'),_0x12e086[_0xf570('0xbf')],_0x12e086[_0xf570('0x76')]));};AGIVertices[_0xf570('0x10')][_0xf570('0xc1')]=function(_0x3b254c){logger[_0xf570('0x2c')](util[_0xf570('0x27')](_0xf570('0xc2'),_0x3b254c['label']));if(!this[_0xf570('0x81')](_0x3b254c[_0xf570('0x5a')])){return this[_0xf570('0xd')][_0xf570('0xa4')](_0xf570('0xa5'));}var _0x31e24a='\x22'+_0x3b254c['text']+'\x22';if(this[_0xf570('0x81')](_0x3b254c[_0xf570('0x76')])){_0x31e24a+=','+_0x3b254c[_0xf570('0x76')];}var _0x42d6aa=this[_0xf570('0xd')][_0xf570('0x55')](_0xf570('0xa6'),_0x31e24a);if(_0x42d6aa['result']===-0x1){return _0x42d6aa;}return this[_0xf570('0xd')][_0xf570('0xa4')](util[_0xf570('0x27')](_0xf570('0xa7'),_0x31e24a));};AGIVertices[_0xf570('0x10')][_0xf570('0xc3')]=function(_0x40cddb){logger[_0xf570('0x2c')](util[_0xf570('0x27')](_0xf570('0xc4'),_0x40cddb[_0xf570('0x36')]));if(!this[_0xf570('0x81')](_0x40cddb[_0xf570('0x5a')])){return this[_0xf570('0xd')][_0xf570('0xa4')](_0xf570('0xa5'));}var _0xcd50f6='\x22'+_0x40cddb[_0xf570('0x5a')]+'\x22';if(this[_0xf570('0x81')](_0x40cddb[_0xf570('0x76')])){_0xcd50f6+=','+_0x40cddb[_0xf570('0x76')];}var _0x35fb09=this[_0xf570('0xd')]['exec'](_0xf570('0xa6'),_0xcd50f6);if(_0x35fb09[_0xf570('0xa0')]===-0x1){return _0x35fb09;}return this[_0xf570('0xd')][_0xf570('0xa4')](util[_0xf570('0x27')]('Executed\x20command\x20MRCPSynth\x20%s',_0xcd50f6));};AGIVertices[_0xf570('0x10')][_0xf570('0xc5')]=function(_0x5e7326){logger[_0xf570('0x2c')](util[_0xf570('0x27')](_0xf570('0xc6'),_0x5e7326[_0xf570('0x36')]));if(!this[_0xf570('0x81')](_0x5e7326[_0xf570('0xc7')])){return this[_0xf570('0xd')]['noop']('no\x20grammar\x20configured');}var _0x596e5e=_0x5e7326[_0xf570('0xc7')];if(this['isConfigured'](_0x5e7326[_0xf570('0x76')])){_0x596e5e+=','+_0x5e7326[_0xf570('0x76')];}var _0x5e4a27=this[_0xf570('0xd')]['exec'](_0xf570('0xab'),_0x596e5e);if(_0x5e4a27[_0xf570('0xa0')]===-0x1){return _0x5e4a27;}var _0xbf4363=this[_0xf570('0x9f')]('RECOG_CONFIDENCE()',_0xf570('0xc8'));if(_0xbf4363[_0xf570('0xa0')]===-0x1){return _0xbf4363;}var _0x4737ab=this['getAndSetVariable'](_0xf570('0xae'),_0xf570('0xc9'));if(_0x4737ab['result']===-0x1){return _0x4737ab;}var _0x568cd0=this[_0xf570('0x9f')](_0xf570('0xb0'),_0xf570('0xca'));if(_0x568cd0[_0xf570('0xa0')]===-0x1){return _0x568cd0;}return this[_0xf570('0xd')][_0xf570('0xa4')](util[_0xf570('0x27')](_0xf570('0xb1'),_0x596e5e));};AGIVertices[_0xf570('0x10')][_0xf570('0xcb')]=function(_0x421401){logger[_0xf570('0x2c')](util[_0xf570('0x27')](_0xf570('0xcc'),_0x421401['label']));if(!this[_0xf570('0x81')](_0x421401[_0xf570('0xc7')])){return this[_0xf570('0xd')][_0xf570('0xa4')](_0xf570('0xaa'));}var _0x30a964=_0x421401[_0xf570('0xc7')];if(this[_0xf570('0x81')](_0x421401[_0xf570('0x76')])){_0x30a964+=','+_0x421401[_0xf570('0x76')];}var _0x480777=this[_0xf570('0xd')][_0xf570('0x55')]('MRCPRecog',_0x30a964);if(_0x480777['result']===-0x1){return _0x480777;}var _0x15da0b=this[_0xf570('0x9f')](_0xf570('0xac'),_0xf570('0xcd'));if(_0x15da0b[_0xf570('0xa0')]===-0x1){return _0x15da0b;}var _0x2a2d47=this[_0xf570('0x9f')]('RECOG_INPUT()',_0xf570('0xce'));if(_0x2a2d47[_0xf570('0xa0')]===-0x1){return _0x2a2d47;}var _0x42045a=this[_0xf570('0x9f')](_0xf570('0xb0'),_0xf570('0xcf'));if(_0x42045a[_0xf570('0xa0')]===-0x1){return _0x42045a;}return this[_0xf570('0xd')][_0xf570('0xa4')](util[_0xf570('0x27')](_0xf570('0xb1'),_0x30a964));};AGIVertices[_0xf570('0x10')][_0xf570('0xd0')]=function(_0x28dfb9){logger[_0xf570('0x2c')](util['format'](_0xf570('0xd1'),_0x28dfb9[_0xf570('0x36')]));if(!this[_0xf570('0x81')](_0x28dfb9[_0xf570('0xd2')])){return this[_0xf570('0xd')][_0xf570('0x2a')](_0x28dfb9,'no\x20database\x20selected');}var _0x455e08=this[_0xf570('0x18')][_0xf570('0x70')](this,_0x28dfb9[_0xf570('0xd2')]);if(!_0x455e08){return this[_0xf570('0xd')][_0xf570('0x2a')](_0x28dfb9,_0xf570('0xd3'));}if(!this[_0xf570('0x81')](_0x28dfb9[_0xf570('0x2e')])){return this['channel'][_0xf570('0x2a')](_0x28dfb9,_0xf570('0xd4'));}var _0xc70a04=_0x28dfb9[_0xf570('0x2e')][_0xf570('0x57')](/(\r\n|\n|\r)/gm,'\x20');this[_0xf570('0xd')][_0xf570('0xa4')](util[_0xf570('0x27')](_0xf570('0xd5'),_0xc70a04));var _0x54aac0=this[_0xf570('0x28')][_0xf570('0x70')](this,_0x455e08,_0xc70a04);this[_0xf570('0x34')][_0xf570('0x70')](this,_0x28dfb9,_0xc70a04);if(!this[_0xf570('0x81')](_0x28dfb9[_0xf570('0xd6')])){return this[_0xf570('0xd')][_0xf570('0xa4')](_0xf570('0xd7'));}var _0x34b059=this[_0xf570('0x9d')][_0xf570('0x70')](this,_0x28dfb9[_0xf570('0xd6')]);if(!_0x34b059){return this[_0xf570('0xd')][_0xf570('0x2a')](_0x28dfb9,_0xf570('0xd8'));}var _0xfecfd2=this;_0x54aac0['forEach'](function(_0x2823a6,_0x4ac239){Object[_0xf570('0xd9')](_0x2823a6)[_0xf570('0xda')](function(_0x4fdd50){_0xfecfd2[_0xf570('0xd')][_0xf570('0x9a')](util[_0xf570('0x27')]('%s[%s][%s]',_0x34b059,_0x4ac239,_0x4fdd50),_0x2823a6[_0x4fdd50]);});});this['channel'][_0xf570('0x9a')](util['format'](_0xf570('0xdb'),_0x34b059),_0x54aac0[_0xf570('0x96')]);return this[_0xf570('0xd')]['noop'](util[_0xf570('0x27')](_0xf570('0xdc'),_0x34b059));};AGIVertices['prototype'][_0xf570('0xdd')]=function(_0x3b8e24){logger[_0xf570('0xde')](util[_0xf570('0x27')](_0xf570('0xdf'),_0x3b8e24[_0xf570('0x36')]));if(!this[_0xf570('0x81')](_0x3b8e24[_0xf570('0xe0')])){return this[_0xf570('0xd')][_0xf570('0x2a')](_0x3b8e24,_0xf570('0xe1'));}var _0x17de57=this[_0xf570('0x1a')]['sync'](this,_0x3b8e24[_0xf570('0xe0')]);if(!_0x17de57){return this['channel'][_0xf570('0x2a')](_0x3b8e24,_0xf570('0xe2'));}var _0x103487=this['channel'][_0xf570('0x55')](_0xf570('0xe3'),[util[_0xf570('0x27')]('SIP/%s',_0x17de57),_0x3b8e24[_0xf570('0x64')],_0x3b8e24[_0xf570('0xe4')],_0x3b8e24['url']]);if(_0x103487[_0xf570('0xa0')]===-0x1){return _0x103487;}return this['channel'][_0xf570('0xa4')](util['format'](_0xf570('0xe5'),'DIAL'));};AGIVertices[_0xf570('0x10')]['dialogflow']=function(_0x58f9a0){logger[_0xf570('0x2c')](util[_0xf570('0x27')](_0xf570('0xe6'),_0x58f9a0['label']));if(!this[_0xf570('0x81')](_0x58f9a0[_0xf570('0x78')])){return this[_0xf570('0xd')]['noop'](_0xf570('0xe7'));}if(!this[_0xf570('0x81')](_0x58f9a0[_0xf570('0x5a')])){return this[_0xf570('0xd')][_0xf570('0xa4')]('no\x20text\x20configured');}this[_0xf570('0xd')][_0xf570('0xe8')]=!![];this[_0xf570('0x34')](_0x58f9a0);this['createSquareMessage'](_0x58f9a0[_0xf570('0x5a')],'in','','');this[_0xf570('0xd')][_0xf570('0xa4')](util['format'](_0xf570('0xe9'),_0x58f9a0[_0xf570('0x5a')]));var _0x5923a0=this[_0xf570('0x77')][_0xf570('0x70')](this,_0x58f9a0);if(_0x5923a0){for(var _0x4cc196 in _0x5923a0){if(_0x5923a0['hasOwnProperty'](_0x4cc196)){this[_0xf570('0xd')][_0xf570('0x9a')](util['format']('DIALOGFLOW_%s',_0x4cc196['toUpperCase']()),_0x5923a0[_0x4cc196]);}}this[_0xf570('0x40')](_0x5923a0[_0xf570('0xea')],_0xf570('0xeb'),_0xf570('0xec'),'');return this[_0xf570('0xd')][_0xf570('0xa4')](util[_0xf570('0x27')]('Dialogflow\x20Result\x20%s',_0x5923a0['speech']));}return this['channel'][_0xf570('0x2a')](_0x58f9a0,_0xf570('0xed'));};AGIVertices['prototype'][_0xf570('0xee')]=function(_0x5bfa1a){logger[_0xf570('0x2c')](util[_0xf570('0x27')]('Enter\x20in\x20DIALOGFLOW\x20V2\x20(%s)\x20block',_0x5bfa1a[_0xf570('0x36')]));if(!this[_0xf570('0x81')](_0x5bfa1a[_0xf570('0x7a')])){return this[_0xf570('0xd')][_0xf570('0xa4')](_0xf570('0xef'));}if(!this[_0xf570('0x81')](_0x5bfa1a[_0xf570('0xf0')])){return this['channel']['noop'](_0xf570('0xf1'));}if(!this[_0xf570('0x81')](_0x5bfa1a[_0xf570('0xf2')])){return this[_0xf570('0xd')][_0xf570('0xa4')]('no\x20private_key\x20configured');}if(!this[_0xf570('0x81')](_0x5bfa1a[_0xf570('0xf3')])){return this[_0xf570('0xd')][_0xf570('0xa4')]('no\x20anguage\x20configured');}if(!this[_0xf570('0x81')](_0x5bfa1a[_0xf570('0x5a')])){return this[_0xf570('0xd')]['noop'](_0xf570('0xa5'));}this[_0xf570('0xd')][_0xf570('0xe8')]=!![];this[_0xf570('0x34')](_0x5bfa1a);this[_0xf570('0x40')](_0x5bfa1a[_0xf570('0x5a')],'in','','');this[_0xf570('0xd')][_0xf570('0xa4')](util['format']('Trying\x20DialogflowV2:\x20%s',_0x5bfa1a[_0xf570('0x5a')]));var _0x3b82f0=this[_0xf570('0x79')]['sync'](this,_0x5bfa1a);if(_0x3b82f0){for(var _0x5cd73d in _0x3b82f0){if(_0x3b82f0[_0xf570('0x90')](_0x5cd73d)){if(_0x5cd73d!==_0xf570('0xf4')){this['channel'][_0xf570('0x9a')](util['format']('DIALOGFLOW_%s',_0x5cd73d[_0xf570('0x69')]()),_0x3b82f0[_0x5cd73d]);}}}this[_0xf570('0x40')](_0x3b82f0[_0xf570('0xea')],_0xf570('0xeb'),_0xf570('0xee'),_0x3b82f0[_0xf570('0xf4')]);return this[_0xf570('0xd')][_0xf570('0xa4')](util[_0xf570('0x27')](_0xf570('0xf5'),_0x3b82f0['speech']));}return this[_0xf570('0xd')][_0xf570('0x2a')](_0x5bfa1a,_0xf570('0xf6'));};AGIVertices[_0xf570('0x10')][_0xf570('0xf7')]=function(_0x3a963d){logger[_0xf570('0x2c')](util[_0xf570('0x27')](_0xf570('0xf8'),_0x3a963d[_0xf570('0x36')]));if(!this[_0xf570('0x81')](_0x3a963d['ndauth_url'])){return this[_0xf570('0xd')][_0xf570('0xa4')]('no\x20ndauth\x20url\x20configured');}if(!this['isConfigured'](_0x3a963d[_0xf570('0xf9')])){return this['channel'][_0xf570('0xa4')](_0xf570('0xfa'));}if(!this[_0xf570('0x81')](_0x3a963d[_0xf570('0xfb')])){return this[_0xf570('0xd')][_0xf570('0xa4')](_0xf570('0xfc'));}if(!this[_0xf570('0x81')](_0x3a963d[_0xf570('0xfd')])){return this['channel'][_0xf570('0xa4')](_0xf570('0xa5'));}this[_0xf570('0xd')][_0xf570('0xe8')]=!![];this[_0xf570('0x34')](_0x3a963d);this[_0xf570('0x40')](_0x3a963d[_0xf570('0x5a')],'in','','');this[_0xf570('0xd')][_0xf570('0xa4')](util['format'](_0xf570('0xfe'),_0x3a963d['text']));var _0x40afac=this[_0xf570('0x7b')][_0xf570('0x70')](this,_0x3a963d);if(_0x40afac){for(var _0x5d0f4c in _0x40afac){if(_0x40afac[_0xf570('0x90')](_0x5d0f4c)){this[_0xf570('0xd')][_0xf570('0x9a')](util[_0xf570('0x27')]('SESTEK_NDA_%s',_0x5d0f4c[_0xf570('0x69')]()),_0x40afac[_0x5d0f4c]);}}this[_0xf570('0x40')](_0x40afac['speech'],'out',_0xf570('0xf7'),'');if(_0x40afac[_0xf570('0xff')]){this[_0xf570('0xd')]['noop'](util['format'](_0xf570('0x100'),_0x40afac['audiofile']));var _0x5c5154=this['channel'][_0xf570('0x101')](_0x40afac[_0xf570('0xff')]);try{fs['unlink'](_0x40afac['audiofile']+_0xf570('0x102'));}catch(_0x39f8e7){logger[_0xf570('0x2a')](_0x39f8e7);}return _0x5c5154;}else{return this[_0xf570('0xd')][_0xf570('0xa4')](util['format'](_0xf570('0x103'),_0x40afac[_0xf570('0xea')]));}}return this[_0xf570('0xd')]['error'](_0x3a963d,_0xf570('0x104'));};AGIVertices[_0xf570('0x10')][_0xf570('0x105')]=function(_0x3e3670){logger[_0xf570('0x2c')](util[_0xf570('0x27')](_0xf570('0x106'),_0x3e3670['label']));return this[_0xf570('0xd')][_0xf570('0xa4')](_0xf570('0x105'));};AGIVertices[_0xf570('0x10')][_0xf570('0x107')]=function(_0x263922){logger[_0xf570('0x2c')](util['format'](_0xf570('0x108'),_0x263922[_0xf570('0x36')]));var _0x463d59='';if(_0x263922['trunk_id']){if(!this[_0xf570('0x81')](_0x263922[_0xf570('0x109')])){return this[_0xf570('0xd')][_0xf570('0x2a')](_0x263922,_0xf570('0x10a'));}else{var _0xc63c1c=parseInt(_0x263922['trunk_id'],0xa);if(isNaN(_0xc63c1c)){_0x463d59=_0x263922[_0xf570('0x109')];}else{_0x463d59=this['getTrunk'][_0xf570('0x70')](this,_0x263922[_0xf570('0x109')]);if(!_0x463d59){return this[_0xf570('0xd')][_0xf570('0x2a')](_0x263922,_0xf570('0x10b'));}}}}else if(_0x263922[_0xf570('0x10c')]){_0x463d59=_0x263922['trunk_name'];}else{return this[_0xf570('0xd')][_0xf570('0x2a')](_0x263922,_0xf570('0x10a'));}var _0x44c2ac=this['channel'][_0xf570('0x55')](_0xf570('0xe3'),[util[_0xf570('0x27')](_0xf570('0x10d'),_0x463d59,_0x263922[_0xf570('0x46')]),_0x263922[_0xf570('0x64')],_0x263922['opts'],_0x263922['url']]);if(_0x44c2ac['result']===-0x1){return _0x44c2ac;}return this['channel'][_0xf570('0xa4')](util[_0xf570('0x27')](_0xf570('0xe5'),_0xf570('0xe3')));};AGIVertices['prototype']['finally']=function(_0x415676){logger[_0xf570('0x2c')](util['format'](_0xf570('0x10e'),_0x415676[_0xf570('0x36')]));return this[_0xf570('0xd')][_0xf570('0xa4')](_0xf570('0x10f'));};AGIVertices[_0xf570('0x10')][_0xf570('0xc')]=function(_0x49333d){logger[_0xf570('0x2c')](util[_0xf570('0x27')]('Enter\x20in\x20GETDIGITS\x20(%s)\x20block',_0x49333d[_0xf570('0x36')]));if(_0x49333d['retry']===0x0){return this[_0xf570('0xa1')](_0x49333d);}_0x49333d[_0xf570('0xa2')]-=0x1;if(!this[_0xf570('0x81')](_0x49333d[_0xf570('0x110')])){return this[_0xf570('0xd')][_0xf570('0x2a')](_0x49333d,_0xf570('0x111'));}var _0x103558=this[_0xf570('0x1e')][_0xf570('0x70')](this,_0x49333d[_0xf570('0x110')]);if(!_0x103558){return this[_0xf570('0xd')][_0xf570('0x2a')](_0x49333d,_0xf570('0x112'));}if(!this[_0xf570('0x81')](_0x49333d[_0xf570('0xd6')])){return this[_0xf570('0xd')][_0xf570('0x2a')](_0xf570('0xd7'));}var _0x3d1bca=this[_0xf570('0xd')][_0xf570('0x113')](_0x103558,_0x49333d[_0xf570('0x114')],_0x49333d['maxdigit']);var _0x427cd0=_0x3d1bca[_0xf570('0xa0')]?_0x3d1bca[_0xf570('0xa0')][_0xf570('0x4a')]():'';logger[_0xf570('0x2c')](_0xf570('0x115'),JSON[_0xf570('0x72')](_0x3d1bca));if(_0x3d1bca[_0xf570('0xa0')]===-0x1){this[_0xf570('0x34')][_0xf570('0x70')](this,_0x49333d,_0x427cd0);return _0x3d1bca;}else if(_0x3d1bca[_0xf570('0x9e')]===_0xf570('0x64')){_0x3d1bca[_0xf570('0xa0')]=_0x427cd0['length']>=parseInt(_0x49333d[_0xf570('0x116')])?'x':'i';}else{_0x3d1bca[_0xf570('0xa0')]=_0x427cd0[_0xf570('0x96')]>=parseInt(_0x49333d['mindigit'])&&_0x427cd0[_0xf570('0x96')]<=parseInt(_0x49333d[_0xf570('0x117')])?'x':'i';}var _0x40e359=this[_0xf570('0x9d')][_0xf570('0x70')](this,_0x49333d['variable_id']);if(!_0x40e359){return this[_0xf570('0xd')][_0xf570('0x2a')](_0x49333d,_0xf570('0xd8'));}this['channel'][_0xf570('0x9a')](_0x40e359,_0x427cd0);if(this[_0xf570('0x81')](_0x49333d['hiddendigitsnum'])){var _0x44988e=parseInt(_0x49333d[_0xf570('0x118')],0xa);var _0x3c0c51=rs[_0xf570('0x119')]({'charset':'*','length':_0x44988e});var _0x318f45=_0x427cd0[_0xf570('0x96')];if(_0x318f45>0x0){if(_0x318f45>_0x44988e){this['createSquareDetailsReport'][_0xf570('0x70')](this,_0x49333d,_0x49333d['hiddendigitspos']===_0xf570('0x11a')?_0x3c0c51+_0x427cd0[_0xf570('0x11b')](_0x44988e):_0x427cd0['substr'](0x0,_0x318f45-_0x44988e)+_0x3c0c51);}else{this[_0xf570('0x34')][_0xf570('0x70')](this,_0x49333d,rs[_0xf570('0x119')]({'charset':'*','length':_0x318f45}));}}else{this['createSquareDetailsReport'][_0xf570('0x70')](this,_0x49333d,'');}}else{this[_0xf570('0x34')][_0xf570('0x70')](this,_0x49333d,_0x427cd0);}return _0x3d1bca;};AGIVertices['prototype']['getsecretdigits']=function(_0x2b6928){logger[_0xf570('0x2c')](util[_0xf570('0x27')](_0xf570('0x11c'),_0x2b6928['label']));return this[_0xf570('0xc')](_0x2b6928);};AGIVertices['prototype'][_0xf570('0x11d')]=function(_0x502ae6){logger['info'](util[_0xf570('0x27')]('Enter\x20in\x20GOAL\x20(%s)\x20block',_0x502ae6[_0xf570('0x36')]));this[_0xf570('0x34')][_0xf570('0x70')](this,_0x502ae6,_0x502ae6[_0xf570('0x11e')]);return this[_0xf570('0xd')][_0xf570('0xa4')](util[_0xf570('0x27')](_0xf570('0x11f'),_0x502ae6[_0xf570('0x11e')]));};AGIVertices['prototype'][_0xf570('0x120')]=function(_0x95dcaf){logger[_0xf570('0x2c')](util[_0xf570('0x27')](_0xf570('0x121'),_0x95dcaf[_0xf570('0x36')]));if(!this[_0xf570('0x81')](_0x95dcaf[_0xf570('0x87')])||!this[_0xf570('0x81')](_0x95dcaf[_0xf570('0x84')])){return this[_0xf570('0xd')]['noop'](_0xf570('0x122'));}if(!this[_0xf570('0x81')](_0x95dcaf[_0xf570('0x5a')])){return this[_0xf570('0xd')]['noop']('no\x20text\x20configured');}this[_0xf570('0xd')][_0xf570('0xa4')](util[_0xf570('0x27')](_0xf570('0x123'),_0x95dcaf[_0xf570('0x5a')]));var _0xed2a35=this['awsPolly'][_0xf570('0x70')](this,_0x95dcaf);if(_0xed2a35){this[_0xf570('0xd')][_0xf570('0xa4')](util[_0xf570('0x27')](_0xf570('0x124'),_0xed2a35));var _0x48012d=this[_0xf570('0xd')][_0xf570('0x101')](_0xed2a35);try{fs[_0xf570('0x125')](_0xed2a35+_0xf570('0x102'));}catch(_0x2e18d7){logger[_0xf570('0x2a')](_0x2e18d7);}return _0x48012d;}return this[_0xf570('0xd')]['error'](_0x95dcaf,'aws\x20Polly\x20is\x20unreachable');};AGIVertices[_0xf570('0x10')][_0xf570('0x126')]=function(_0x3ed942){logger[_0xf570('0x2c')](util['format'](_0xf570('0x127'),_0x3ed942[_0xf570('0x36')]));if(!this[_0xf570('0x81')](_0x3ed942[_0xf570('0x87')])||!this[_0xf570('0x81')](_0x3ed942[_0xf570('0x84')])){return this[_0xf570('0xd')][_0xf570('0xa4')](_0xf570('0x122'));}if(!this[_0xf570('0x81')](_0x3ed942[_0xf570('0x89')])){return this[_0xf570('0xd')][_0xf570('0xa4')](_0xf570('0x128'));}if(!this[_0xf570('0x81')](_0x3ed942['text'])){return this[_0xf570('0xd')][_0xf570('0xa4')](_0xf570('0xa5'));}this['channel'][_0xf570('0xe8')]=!![];this[_0xf570('0x34')](_0x3ed942);this[_0xf570('0x40')](_0x3ed942[_0xf570('0x5a')],'in','','');this[_0xf570('0xd')]['noop'](util['format'](_0xf570('0x129'),_0x3ed942[_0xf570('0x5a')]));var _0x28498a=this[_0xf570('0x86')][_0xf570('0x70')](this,_0x3ed942);if(_0x28498a){for(var _0x41f333 in _0x28498a){if(_0x28498a[_0xf570('0x90')](_0x41f333)&&_[_0xf570('0x91')](_0x28498a[_0x41f333])){this[_0xf570('0xd')][_0xf570('0x9a')](util[_0xf570('0x27')](_0xf570('0x12a'),_0x41f333['toUpperCase']()),_0x28498a[_0x41f333]);}}if(_['isNil'](_0x28498a[_0xf570('0x74')])){return this[_0xf570('0xd')][_0xf570('0xa4')](_0xf570('0x12b'));}else{this['createSquareMessage'](_0x28498a[_0xf570('0x74')],'out',_0xf570('0x12c'),'');return this[_0xf570('0xd')][_0xf570('0xa4')](util[_0xf570('0x27')](_0xf570('0x12d'),_0x28498a[_0xf570('0x74')]));}}return this[_0xf570('0xd')][_0xf570('0x2a')](_0x3ed942,_0xf570('0x12e'));};AGIVertices[_0xf570('0x10')][_0xf570('0x12f')]=function(_0x2659aa){logger[_0xf570('0x2c')](util['format']('Enter\x20in\x20GOOGLEASR\x20(%s)\x20block\x20%s',_0x2659aa[_0xf570('0x36')],_0x2659aa[_0xf570('0x64')]));if(!this[_0xf570('0x81')](_0x2659aa['key'])){return this['channel']['noop'](_0xf570('0xe7'));}var _0x5798e0=_0xf570('0x130');var _0x3bdad4=util['format']('%s/recordings/%s',FILES_PATH,rs[_0xf570('0x119')](0x4));var _0xd88a09=util[_0xf570('0x27')](_0xf570('0x99'),_0x3bdad4,_0x5798e0);var _0x1d077a=!![];if(_0x2659aa['beep']===_0xf570('0x131')){_0x1d077a=![];}var _0x396bce=this['channel'][_0xf570('0x132')](_0x3bdad4,_0x5798e0,_0x2659aa[_0xf570('0x133')],_0x2659aa[_0xf570('0x64')],undefined,_0x1d077a);if(_0x396bce[_0xf570('0xa0')]!==-0x1){this[_0xf570('0xd')]['noop'](util[_0xf570('0x27')](_0xf570('0x134'),_0xd88a09));var _0x3a106b=this[_0xf570('0x8a')]['sync'](this,_0x2659aa,_0xd88a09);if(_0x3a106b){for(var _0x37ed00 in _0x3a106b){if(_0x3a106b[_0xf570('0x90')](_0x37ed00)){this[_0xf570('0xd')][_0xf570('0x9a')](util[_0xf570('0x27')]('GOOGLE_ASR_%s',_0x37ed00[_0xf570('0x69')]()),_0x3a106b[_0x37ed00]);}}return this[_0xf570('0xd')][_0xf570('0xa4')](util[_0xf570('0x27')](_0xf570('0x135'),JSON[_0xf570('0x72')](_0x3a106b)));}}return _0x396bce;};AGIVertices[_0xf570('0x10')][_0xf570('0x136')]=function(_0x46fe1d){logger[_0xf570('0x2c')](util[_0xf570('0x27')](_0xf570('0x137'),_0x46fe1d[_0xf570('0x36')]));if(!this[_0xf570('0x81')](_0x46fe1d['appid'])){return this['channel'][_0xf570('0xa4')](_0xf570('0x138'));}if(!this[_0xf570('0x81')](_0x46fe1d[_0xf570('0x8d')])){return this['channel'][_0xf570('0xa4')](_0xf570('0x139'));}var _0x25f740='wav';var _0x16c63d=util[_0xf570('0x27')]('%s/recordings/%s',FILES_PATH,rs['generate'](0x4));var _0x2b7042=util['format'](_0xf570('0x99'),_0x16c63d,_0x25f740);var _0x1cdf4f=!![];if(_0x46fe1d[_0xf570('0x13a')]===_0xf570('0x131')){_0x1cdf4f=![];}var _0x5973fe=this['channel'][_0xf570('0x132')](_0x16c63d,_0x25f740,_0x46fe1d[_0xf570('0x133')],_0x46fe1d[_0xf570('0x64')],undefined,_0x1cdf4f);if(_0x5973fe[_0xf570('0xa0')]!==-0x1){this[_0xf570('0xd')][_0xf570('0xa4')](util['format'](_0xf570('0x13b'),_0x2b7042));var _0x98b7bd=this[_0xf570('0x8b')]['sync'](this,_0x46fe1d,_0x2b7042);if(_0x98b7bd){for(var _0x20a79b in _0x98b7bd){if(_0x98b7bd[_0xf570('0x90')](_0x20a79b)){this[_0xf570('0xd')][_0xf570('0x9a')](util[_0xf570('0x27')](_0xf570('0x13c'),_0x20a79b[_0xf570('0x69')]()),_0x98b7bd[_0x20a79b]);}}return this['channel'][_0xf570('0xa4')](util['format']('TildeASR\x20Result\x20%s',JSON[_0xf570('0x72')](_0x98b7bd)));}}return _0x5973fe;};AGIVertices['prototype'][_0xf570('0x13d')]=function(_0x24af2d){logger['info'](util['format'](_0xf570('0x13e'),_0x24af2d[_0xf570('0x36')]));return this[_0xf570('0xd')][_0xf570('0x13f')](_0x24af2d['context'],_0x24af2d[_0xf570('0x3b')],_0x24af2d['priority']);};AGIVertices[_0xf570('0x10')][_0xf570('0x140')]=function(_0x21afa7){logger['info'](util[_0xf570('0x27')](_0xf570('0x141'),_0x21afa7[_0xf570('0x36')]));if(!this[_0xf570('0x81')](_0x21afa7[_0xf570('0x142')])){return this[_0xf570('0xd')][_0xf570('0x2a')](_0x21afa7,_0xf570('0x143'));}try{var _0x365a3e=eval(_0x21afa7[_0xf570('0x142')])?'true':_0xf570('0x144');this[_0xf570('0xd')]['noop'](util[_0xf570('0x27')](_0xf570('0x145'),_0x21afa7[_0xf570('0x142')],_0x365a3e));return{'code':0xc8,'result':_0x365a3e};}catch(_0xdad3b9){return{'code':0xc8,'result':_0xf570('0x144')};}};AGIVertices[_0xf570('0x10')][_0xf570('0x146')]=function(_0xf9ab02){logger[_0xf570('0x2c')](util[_0xf570('0x27')]('Enter\x20in\x20GOTOIFTIME\x20(%s)\x20block',_0xf9ab02[_0xf570('0x36')]));if(!this['isConfigured'](_0xf9ab02[_0xf570('0x147')])){return this[_0xf570('0xd')][_0xf570('0x2a')](_0xf9ab02,'no\x20interval\x20configured');}var _0x51e09f=this[_0xf570('0x148')][_0xf570('0x70')](this,_0xf9ab02[_0xf570('0x147')]);if(!_0x51e09f){return this[_0xf570('0xd')][_0xf570('0x2a')](_0xf9ab02,'no\x20intervals\x20found');}for(var _0x25ba15=0x0;_0x25ba15<_0x51e09f[_0xf570('0x96')];_0x25ba15+=0x1){var _0x57c80e=this['channel'][_0xf570('0x9d')](util[_0xf570('0x27')]('IFTIME(%s?true:false)',_0x51e09f[_0x25ba15]));if(_0x57c80e[_0xf570('0xa0')]===-0x1){return _0x57c80e;}logger[_0xf570('0x2c')](util['format']('IFTIME\x20%s\x20%s',_0x51e09f[_0x25ba15],_0x57c80e[_0xf570('0x9e')]));if(_0x57c80e[_0xf570('0x9e')]==='true'){logger[_0xf570('0x2c')](util[_0xf570('0x27')]('IFTIME\x20%s\x20%s',_0x51e09f[_0x25ba15],_0xf570('0x149')));this[_0xf570('0xd')][_0xf570('0xa4')](util[_0xf570('0x27')](_0xf570('0x14a'),_0x51e09f[_0x25ba15],'true'));return{'code':0xc8,'result':_0xf570('0x149')};}else{logger[_0xf570('0x2c')](util[_0xf570('0x27')]('IFTIME\x20%s\x20%s',_0x51e09f[_0x25ba15],_0xf570('0x144')));this['channel'][_0xf570('0xa4')](util[_0xf570('0x27')](_0xf570('0x14a'),_0x51e09f[_0x25ba15],_0xf570('0x144')));}}return{'code':0xc8,'result':_0xf570('0x144')};};AGIVertices[_0xf570('0x10')][_0xf570('0x14b')]=function(_0xb48bfc){logger[_0xf570('0x2c')](util[_0xf570('0x27')](_0xf570('0x14c'),_0xb48bfc['label']));return this[_0xf570('0xd')][_0xf570('0x14b')]();};AGIVertices[_0xf570('0x10')][_0xf570('0x14d')]=function(_0x42dda3){logger[_0xf570('0x2c')](util[_0xf570('0x27')](_0xf570('0x14e'),_0x42dda3[_0xf570('0x36')]));if(!this[_0xf570('0x81')](_0x42dda3[_0xf570('0x78')])){return this[_0xf570('0xd')]['noop'](_0xf570('0xe7'));}var _0x2e0f3d='wav';var _0xc82015=util['format'](_0xf570('0x14f'),FILES_PATH,rs['generate'](0x4));var _0xe6a21f=util[_0xf570('0x27')](_0xf570('0x99'),_0xc82015,_0x2e0f3d);var _0x2684e5=!![];if(_0x42dda3[_0xf570('0x13a')]===_0xf570('0x131')){_0x2684e5=![];}var _0x140efb=this['channel']['recordFile'](_0xc82015,_0x2e0f3d,_0x42dda3[_0xf570('0x133')],_0x42dda3['timeout'],undefined,_0x2684e5);if(_0x140efb['result']!==-0x1){this[_0xf570('0xd')][_0xf570('0xa4')](util[_0xf570('0x27')]('ispeech\x20%s\x20file\x20created',_0xe6a21f));var _0x12653e=this[_0xf570('0x7f')][_0xf570('0x70')](this,_0x42dda3,_0xe6a21f);if(_0x12653e){for(var _0x3ee6a8 in _0x12653e){if(_0x12653e[_0xf570('0x90')](_0x3ee6a8)){this[_0xf570('0xd')]['setVariable'](util[_0xf570('0x27')](_0xf570('0x150'),_0x3ee6a8[_0xf570('0x69')]()),_0x12653e[_0x3ee6a8]);}}return this[_0xf570('0xd')][_0xf570('0xa4')](util[_0xf570('0x27')](_0xf570('0x151'),JSON[_0xf570('0x72')](_0x12653e)));}}return _0x140efb;};AGIVertices[_0xf570('0x10')][_0xf570('0x152')]=function(_0x5e41fe){logger[_0xf570('0x2c')](util[_0xf570('0x27')](_0xf570('0x153'),_0x5e41fe[_0xf570('0x36')]));if(!this[_0xf570('0x81')](_0x5e41fe[_0xf570('0x78')])){return this[_0xf570('0xd')][_0xf570('0xa4')](_0xf570('0xe7'));}if(!this[_0xf570('0x81')](_0x5e41fe['text'])){return this[_0xf570('0xd')][_0xf570('0xa4')](_0xf570('0xa5'));}this[_0xf570('0xd')][_0xf570('0xa4')](util['format'](_0xf570('0x154'),_0x5e41fe[_0xf570('0x5a')]));var _0x4189ff=this['ispeechTTS'][_0xf570('0x70')](this,_0x5e41fe);if(_0x4189ff){this['channel'][_0xf570('0xa4')](util[_0xf570('0x27')]('ispeech\x20%s\x20file\x20created',_0x4189ff));var _0x420107=this['channel'][_0xf570('0x101')](_0x4189ff,_0x5e41fe[_0xf570('0x133')]);try{fs[_0xf570('0x125')](_0x4189ff+_0xf570('0x102'));}catch(_0x2a62b2){logger[_0xf570('0x2a')](_0x2a62b2);}return _0x420107;}return this[_0xf570('0xd')]['error'](_0x5e41fe,_0xf570('0x155'));};AGIVertices[_0xf570('0x10')][_0xf570('0x156')]=function(_0x216a81){logger[_0xf570('0x2c')](util[_0xf570('0x27')](_0xf570('0x157'),_0x216a81[_0xf570('0x36')]));if(!this[_0xf570('0x81')](_0x216a81[_0xf570('0x158')])){return this[_0xf570('0xd')][_0xf570('0x2a')](_0x216a81,_0xf570('0x159'));}logger['info'](util[_0xf570('0x27')](_0xf570('0x15a'),this[_0xf570('0xd')][_0xf570('0x38')],_0x216a81['findBy']));var _0x24eef8=this[_0xf570('0x51')][_0xf570('0x70')](this,_0x216a81['findBy']);if(_0x24eef8){logger['info'](util['format']('AGENT\x20%s\x20FOUND\x20BY',this[_0xf570('0xd')][_0xf570('0x38')],_0x216a81[_0xf570('0x158')]));this[_0xf570('0xd')][_0xf570('0xa4')](util[_0xf570('0x27')](_0xf570('0x15b'),this['channel']['callerid'],_0x216a81[_0xf570('0x158')]));return{'code':0xc8,'result':'success'};}else{logger[_0xf570('0x2c')](util['format'](_0xf570('0x15c'),this[_0xf570('0xd')][_0xf570('0x38')],_0x216a81['findBy']));this[_0xf570('0xd')][_0xf570('0xa4')](util[_0xf570('0x27')](_0xf570('0x15c'),this[_0xf570('0xd')][_0xf570('0x38')],_0x216a81[_0xf570('0x158')]));return{'code':0xc8,'result':_0xf570('0x15d')};}};AGIVertices['prototype'][_0xf570('0x15e')]=function(_0x4ece4f){logger[_0xf570('0x2c')](util[_0xf570('0x27')](_0xf570('0x15f'),_0x4ece4f[_0xf570('0x36')]));if(!this[_0xf570('0x81')](_0x4ece4f[_0xf570('0x158')])){return this[_0xf570('0xd')][_0xf570('0x2a')](_0x4ece4f,_0xf570('0x159'));}logger[_0xf570('0x2c')](util[_0xf570('0x27')](_0xf570('0x15a'),this[_0xf570('0xd')][_0xf570('0x38')],_0x4ece4f['findBy']));var _0x33f61f=this[_0xf570('0x50')][_0xf570('0x70')](this,_0x4ece4f[_0xf570('0x158')]);if(_0x33f61f){logger['info'](util[_0xf570('0x27')](_0xf570('0x15b'),this['channel']['callerid'],_0x4ece4f[_0xf570('0x158')]));this[_0xf570('0xd')][_0xf570('0xa4')](util[_0xf570('0x27')](_0xf570('0x15b'),this[_0xf570('0xd')][_0xf570('0x38')],_0x4ece4f[_0xf570('0x158')]));return{'code':0xc8,'result':'success'};}else{logger[_0xf570('0x2c')](util['format'](_0xf570('0x15c'),this['channel'][_0xf570('0x38')],_0x4ece4f[_0xf570('0x158')]));this['channel'][_0xf570('0xa4')](util['format'](_0xf570('0x15c'),this['channel'][_0xf570('0x38')],_0x4ece4f[_0xf570('0x158')]));return{'code':0xc8,'result':_0xf570('0x15d')};}};AGIVertices[_0xf570('0x10')][_0xf570('0x160')]=function(_0x2badd1){logger['info'](util['format'](_0xf570('0x161'),_0x2badd1[_0xf570('0x36')]));if(!this[_0xf570('0x81')](_0x2badd1['operation'])){return this[_0xf570('0xd')][_0xf570('0x2a')](_0x2badd1,_0xf570('0x162'));}this['channel'][_0xf570('0xa4')](util[_0xf570('0x27')]('math\x20%s',_0x2badd1[_0xf570('0x163')]));var _0xc561d3=eval(_0x2badd1[_0xf570('0x163')]);if(!this['isConfigured'](_0x2badd1['variable_id'])){return this[_0xf570('0xd')][_0xf570('0xa4')]('no\x20variable\x20selected\x20for\x20the\x20result');}var _0xe495c=this[_0xf570('0x9d')][_0xf570('0x70')](this,_0x2badd1[_0xf570('0xd6')]);if(!_0xe495c){return this['channel']['error'](_0x2badd1,_0xf570('0xd8'));}if(_[_0xf570('0x95')](_0xc561d3)){var _0x2f048c=this;_0xc561d3['forEach'](function(_0x49e4e5,_0x2ebe05){_0x2f048c[_0xf570('0xd')][_0xf570('0x9a')](util[_0xf570('0x27')](_0xf570('0x164'),_0xe495c,_0x2ebe05),_0x49e4e5);});return this[_0xf570('0xd')]['noop'](util['format'](_0xf570('0x165'),_0xe495c));}else{return this[_0xf570('0xd')][_0xf570('0x9a')](_0xe495c,_0xc561d3);}};AGIVertices[_0xf570('0x10')]['menu']=function(_0x521f6c){logger[_0xf570('0x2c')](util[_0xf570('0x27')](_0xf570('0x166'),_0x521f6c[_0xf570('0x36')]));if(_0x521f6c[_0xf570('0xa2')]===0x0){return this[_0xf570('0xa1')](_0x521f6c);}_0x521f6c[_0xf570('0xa2')]-=0x1;if(!this['isConfigured'](_0x521f6c[_0xf570('0x110')])){return this[_0xf570('0xd')]['error'](_0x521f6c,_0xf570('0x111'));}var _0x50880b=this[_0xf570('0x1e')][_0xf570('0x70')](this,_0x521f6c[_0xf570('0x110')]);if(!_0x50880b){return this[_0xf570('0xd')][_0xf570('0x2a')](_0x521f6c,_0xf570('0x112'));}var _0x38ed76=this[_0xf570('0xd')][_0xf570('0x113')](_0x50880b,_0x521f6c[_0xf570('0x114')],_0x521f6c['digit']);var _0x55cd8a=_0x38ed76[_0xf570('0xa0')];if(_0x38ed76['result']===-0x1){this[_0xf570('0x34')][_0xf570('0x70')](this,_0x521f6c,'-1');return _0x38ed76;}else if(_0x38ed76[_0xf570('0x9e')]===_0xf570('0x64')){_0x38ed76[_0xf570('0xa0')]=_0x38ed76['result'][_0xf570('0x96')]>0x0?_0x38ed76['result']:'t';}else if(_[_0xf570('0x42')](_0x38ed76[_0xf570('0xa0')])){_0x38ed76[_0xf570('0xa0')]='#';_0x55cd8a='#';}if(!this['isConfigured'](_0x521f6c[_0xf570('0xd6')])){this['channel'][_0xf570('0xa4')]('no\x20variable\x20selected\x20for\x20the\x20result');}else{var _0x199bc9=this[_0xf570('0x9d')][_0xf570('0x70')](this,_0x521f6c[_0xf570('0xd6')]);if(!_0x199bc9){return this[_0xf570('0xd')][_0xf570('0x2a')](_0x521f6c,_0xf570('0xd8'));}this['channel'][_0xf570('0x9a')](_0x199bc9,_0x55cd8a);}this[_0xf570('0x34')][_0xf570('0x70')](this,_0x521f6c,_0x55cd8a);return _0x38ed76;};AGIVertices['prototype'][_0xf570('0xa4')]=function(_0x394ce3){logger[_0xf570('0x2c')](util[_0xf570('0x27')](_0xf570('0x167'),_0x394ce3[_0xf570('0x36')]));return this['channel']['noop'](_0x394ce3[_0xf570('0x168')]||_0x394ce3[_0xf570('0x36')]);};AGIVertices[_0xf570('0x10')]['pause']=function(_0x35637c){logger[_0xf570('0x2c')](util['format']('Enter\x20in\x20PAUSE\x20(%s)\x20block',_0x35637c[_0xf570('0x36')]));if(!this[_0xf570('0x81')](_0x35637c[_0xf570('0x158')])){return this[_0xf570('0xd')][_0xf570('0x2a')](_0x35637c,_0xf570('0x159'));}logger[_0xf570('0x2c')](util[_0xf570('0x27')]('FIND\x20AGENT\x20%s\x20BY\x20%s',this[_0xf570('0xd')][_0xf570('0x38')],_0x35637c[_0xf570('0x158')]));var _0x22ccb1=this[_0xf570('0x4b')]['sync'](this,_0x35637c['pause_id']);var _0x370e73=this['agentPause'][_0xf570('0x70')](this,_0x35637c[_0xf570('0x158')],_0x22ccb1);if(_0x370e73){logger[_0xf570('0x2c')](util[_0xf570('0x27')]('AGENT\x20%s\x20FOUND\x20BY',this[_0xf570('0xd')][_0xf570('0x38')],_0x35637c['findBy']));this[_0xf570('0xd')][_0xf570('0xa4')](util[_0xf570('0x27')]('AGENT\x20%s\x20FOUND\x20BY',this['channel']['callerid'],_0x35637c[_0xf570('0x158')]));return{'code':0xc8,'result':'success'};}else{logger['info'](util[_0xf570('0x27')](_0xf570('0x15c'),this[_0xf570('0xd')][_0xf570('0x38')],_0x35637c[_0xf570('0x158')]));this['channel'][_0xf570('0xa4')](util[_0xf570('0x27')](_0xf570('0x15b'),this[_0xf570('0xd')][_0xf570('0x38')],_0x35637c['findBy']));return{'code':0xc8,'result':'failure'};}};AGIVertices['prototype'][_0xf570('0x169')]=function(_0x295921){logger[_0xf570('0x2c')](util[_0xf570('0x27')](_0xf570('0x16a'),_0x295921[_0xf570('0x36')]));if(!this['isConfigured'](_0x295921[_0xf570('0x110')])){return this['channel']['error'](_0x295921,'no\x20file\x20audio\x20selected');}var _0x557f19=this[_0xf570('0x1e')][_0xf570('0x70')](this,_0x295921[_0xf570('0x110')]);if(!_0x557f19){return this[_0xf570('0xd')]['error'](_0x295921,'no\x20file\x20audio\x20found');}var _0x580203=this['channel'][_0xf570('0x55')](_0xf570('0x16b'),[_0x557f19,_0x295921[_0xf570('0xe4')]]);if(_0x580203[_0xf570('0xa0')]===-0x1){return _0x580203;}return this[_0xf570('0xd')][_0xf570('0xa4')](util['format'](_0xf570('0xc0'),_0xf570('0x16b'),_0x557f19));};AGIVertices[_0xf570('0x10')][_0xf570('0x16c')]=function(_0x11c482){logger[_0xf570('0x2c')](util[_0xf570('0x27')](_0xf570('0x16d'),_0x11c482[_0xf570('0x36')]));if(!this[_0xf570('0x81')](_0x11c482[_0xf570('0x16e')])){return this[_0xf570('0xd')][_0xf570('0x2a')](_0x11c482,_0xf570('0x16f'));}var _0x4c2190='';var _0x6494c2=parseInt(_0x11c482[_0xf570('0x16e')],0xa);if(isNaN(_0x6494c2)){_0x4c2190=_0x11c482[_0xf570('0x16e')];}else{_0x4c2190=this[_0xf570('0x13')][_0xf570('0x70')](this,_0x11c482[_0xf570('0x16e')]);if(!_0x4c2190){return this['channel'][_0xf570('0x2a')](_0x11c482,'no\x20queue\x20found');}}var _0x29d9d9='';if(this[_0xf570('0x81')](_0x11c482[_0xf570('0x110')])){var _0x3f7404=this['getSound'][_0xf570('0x70')](this,_0x11c482[_0xf570('0x110')]);if(_0x3f7404){_0x29d9d9=_0x3f7404;}}this['createSquareDetailsReport'][_0xf570('0x70')](this,_0x11c482,_0x4c2190);if(_0x11c482[_0xf570('0xe4')][_0xf570('0x170')]('x')<0x0){_0x11c482[_0xf570('0xe4')]+='x';}if(_0x11c482[_0xf570('0xe4')][_0xf570('0x170')]('X')<0x0){_0x11c482[_0xf570('0xe4')]+='X';}this[_0xf570('0xd')]['setVariable']('XMCS-QUEUE',_0x4c2190?_0x4c2190[_0xf570('0x171')]():'');var _0x56327f=this[_0xf570('0xd')][_0xf570('0x55')]('QUEUE',[_0x4c2190,_0x11c482['opts'],_0x11c482['url'],_0x29d9d9,_0x11c482[_0xf570('0x64')],_0x11c482[_0xf570('0x7')],_0x11c482[_0xf570('0x172')],_0x11c482[_0xf570('0x173')],'',_0x11c482[_0xf570('0x174')]]);if(_0x56327f['result']===-0x1){return _0x56327f;}return this[_0xf570('0xd')][_0xf570('0xa4')](util[_0xf570('0x27')](_0xf570('0xc0'),'QUEUE',_0x4c2190));};AGIVertices['prototype'][_0xf570('0x175')]=function(_0x1ef107){logger[_0xf570('0x2c')](util['format'](_0xf570('0x176'),_0x1ef107['label']));var _0x390dcf=_0x1ef107[_0xf570('0x177')]||_0xf570('0x130');var _0x135beb=util['format']('%s_%s',this['channel'][_0xf570('0x35')],rs['generate'](0x5));var _0x273a56=util[_0xf570('0x27')](_0xf570('0x178'),FILES_PATH,_0x135beb,_0x390dcf);var _0x22f01b=util[_0xf570('0x27')](_0xf570('0x14f'),FILES_PATH,_0x135beb);this[_0xf570('0x39')][_0xf570('0x70')](this,_0x1ef107,_0x135beb,_0x273a56);this[_0xf570('0xd')][_0xf570('0x9a')]('RECORDING_SAVENAME',_0x135beb);logger[_0xf570('0x2c')](_0xf570('0x179'),_0x22f01b,_0x390dcf,_0x1ef107[_0xf570('0x17a')],_0x1ef107['timeout']);return this['channel'][_0xf570('0x132')](_0x22f01b,_0x390dcf,_0x1ef107['escape_digits'],_0x1ef107[_0xf570('0x64')],undefined,!![]);};AGIVertices['prototype'][_0xf570('0x17b')]=function(_0x3b08b){logger[_0xf570('0x2c')](util[_0xf570('0x27')](_0xf570('0x17c'),_0x3b08b['label']));if(!this['isConfigured'](_0x3b08b['url'])){return this[_0xf570('0xd')][_0xf570('0xa4')]('no\x20url\x20configured');}var _0xaefaa3=this[_0xf570('0x61')][_0xf570('0x70')](this,_0x3b08b);logger[_0xf570('0x2c')](util[_0xf570('0x27')]('Response:',util[_0xf570('0x17d')](_0xaefaa3,{'showHidden':![],'depth':null})));if(!this['isConfigured'](_0x3b08b[_0xf570('0xd6')])){return this['channel'][_0xf570('0xa4')](_0xf570('0x17e'));}var _0xf63099=this[_0xf570('0x9d')][_0xf570('0x70')](this,_0x3b08b[_0xf570('0xd6')]);if(!_0xf63099){return this[_0xf570('0xd')][_0xf570('0x2a')](_0x3b08b,_0xf570('0xd8'));}this['channel'][_0xf570('0x9a')](util[_0xf570('0x27')](_0xf570('0x17f'),_0xf63099),_0xaefaa3['statusCode']?_0xaefaa3[_0xf570('0x180')]:_0xf570('0x181'));this[_0xf570('0xd')][_0xf570('0x9a')](util[_0xf570('0x27')](_0xf570('0x182'),_0xf63099),_0xaefaa3[_0xf570('0x183')]?_0xaefaa3[_0xf570('0x183')]:'OK');if(_0xaefaa3[_0xf570('0x6a')]){try{this['saveRestApiResult'](_0xaefaa3[_0xf570('0x6a')],_0xf63099);}catch(_0x280851){logger['error'](util[_0xf570('0x27')](_0xf570('0x184'),_0xf63099));}}return this[_0xf570('0xd')][_0xf570('0xa4')](util[_0xf570('0x27')](_0xf570('0xdc'),_0xf63099));};AGIVertices[_0xf570('0x10')][_0xf570('0x185')]=function(_0x5b418f){logger['info'](util['format'](_0xf570('0x186'),_0x5b418f['label']));return this[_0xf570('0xd')][_0xf570('0x187')](_0x5b418f[_0xf570('0x188')][_0xf570('0x57')](/\s+/g,''),_0x5b418f[_0xf570('0x17a')]);};AGIVertices['prototype'][_0xf570('0x189')]=function(_0x24a0c0){logger['info'](util['format']('Enter\x20in\x20SAYNUMBER\x20(%s)\x20block',_0x24a0c0[_0xf570('0x36')]));return this['channel']['sayNumber'](_0x24a0c0[_0xf570('0x65')][_0xf570('0x57')](/\s+/g,''),_0x24a0c0[_0xf570('0x17a')]);};AGIVertices[_0xf570('0x10')][_0xf570('0x18a')]=function(_0xd3052f){logger[_0xf570('0x2c')](util[_0xf570('0x27')](_0xf570('0x18b'),_0xd3052f['label']));return this[_0xf570('0xd')]['sayPhonetic'](_0xd3052f[_0xf570('0x5a')],_0xd3052f[_0xf570('0x17a')]);};AGIVertices['prototype'][_0xf570('0x18c')]=function(_0x4f886c){logger[_0xf570('0x2c')](util['format'](_0xf570('0x18d'),_0x4f886c['label']));if(!this[_0xf570('0x81')](_0x4f886c[_0xf570('0x18e')])){return this['channel']['noop'](_0xf570('0x18f'));}var _0x5ab007=this[_0xf570('0x21')][_0xf570('0x70')](this,_0x4f886c[_0xf570('0x18e')]);if(!_0x5ab007||!_0x5ab007[_0xf570('0x190')]){return this['channel'][_0xf570('0x2a')](_0x4f886c,_0xf570('0x191'));}var _0x221628={'from':util[_0xf570('0x27')](_0xf570('0x192'),_0x5ab007['name'],_0x5ab007['email']||_0x5ab007[_0xf570('0x190')][_0xf570('0x193')]),'to':_0x4f886c['to']||'','cc':_0x4f886c['cc']||'','bcc':_0x4f886c[_0xf570('0x194')]||'','subject':_0x4f886c['subject'],'html':_0x4f886c['text'],'text':_0x4f886c[_0xf570('0x5a')]};if(this[_0xf570('0x81')](_0x4f886c[_0xf570('0x195')])){}logger['debug']('sendMail\x20message',JSON[_0xf570('0x72')](_0x221628));this[_0xf570('0x34')][_0xf570('0x70')](this,_0x4f886c,_0x4f886c[_0xf570('0x18e')]);this[_0xf570('0xd')][_0xf570('0xa4')](util['format'](_0xf570('0x196'),_0x5ab007['name']));this[_0xf570('0x23')][_0xf570('0x70')](this,_0x5ab007[_0xf570('0x197')],_0x221628);return this[_0xf570('0xd')][_0xf570('0xa4')](_0xf570('0x198'));};AGIVertices[_0xf570('0x10')][_0xf570('0x199')]=function(_0x5f3c48){logger[_0xf570('0x2c')](util['format'](_0xf570('0x19a'),_0x5f3c48['label']));return this[_0xf570('0xd')][_0xf570('0xa4')](_0xf570('0x19b'));};AGIVertices[_0xf570('0x10')][_0xf570('0x19c')]=function(_0xc247a9){logger[_0xf570('0x2c')](util[_0xf570('0x27')](_0xf570('0x19d'),_0xc247a9[_0xf570('0x36')]));if(!this[_0xf570('0x81')](_0xc247a9[_0xf570('0x19e')])){return this[_0xf570('0xd')][_0xf570('0xa4')](_0xf570('0x19f'));}var _0x31d27f=this[_0xf570('0x31')]['sync'](this,_0xc247a9[_0xf570('0x19e')]);if(!_0x31d27f){return this['channel'][_0xf570('0x2a')](_0xc247a9,_0xf570('0x1a0'));}var _0x2bddd2={'body':_0xc247a9[_0xf570('0x1a1')],'phone':_0xc247a9['to']||'','SmsAccountId':_0x31d27f['id']};logger[_0xf570('0xde')](_0xf570('0x1a2'),JSON['stringify'](_0x2bddd2));this[_0xf570('0x34')]['sync'](this,_0xc247a9,_0xc247a9['sms_account_id']);this[_0xf570('0xd')][_0xf570('0xa4')](util[_0xf570('0x27')](_0xf570('0x1a3'),_0x31d27f['name']));this[_0xf570('0x33')]['sync'](this,_0x2bddd2);return this[_0xf570('0xd')][_0xf570('0xa4')](_0xf570('0x1a4'));};AGIVertices[_0xf570('0x10')]['set']=function(_0x7e9514){logger[_0xf570('0x2c')](util['format']('Enter\x20in\x20SET\x20(%s)\x20block',_0x7e9514[_0xf570('0x36')]));if(!this['isConfigured'](_0x7e9514[_0xf570('0xd6')])){return this[_0xf570('0xd')][_0xf570('0x2a')](_0x7e9514,_0xf570('0x1a5'));}var _0x1d6540=this[_0xf570('0x9d')]['sync'](this,_0x7e9514[_0xf570('0xd6')]);if(!_0x1d6540){return this[_0xf570('0xd')][_0xf570('0x2a')](_0x7e9514,_0xf570('0xd8'));}return this[_0xf570('0xd')][_0xf570('0x9a')](_0x1d6540,_0x7e9514[_0xf570('0x1a6')]);};AGIVertices[_0xf570('0x10')][_0xf570('0x1a7')]=function(_0x3712c7){logger[_0xf570('0x2c')](util[_0xf570('0x27')](_0xf570('0x1a8'),_0x3712c7[_0xf570('0x36')]));this['channel'][_0xf570('0xa4')]('START\x20CALLY\x20SQUARE');if(_0x3712c7[_0xf570('0xb4')]===_0xf570('0x1a9')){this[_0xf570('0xd')][_0xf570('0xa4')](_0xf570('0x1aa'));return this['channel']['answer']();}return this[_0xf570('0xd')]['noop'](_0xf570('0x1ab'));};AGIVertices[_0xf570('0x10')]['subproject']=function(_0x1969f0){logger[_0xf570('0x2c')](util[_0xf570('0x27')](_0xf570('0x1ac'),_0x1969f0['label']));if(!this[_0xf570('0x81')](_0x1969f0[_0xf570('0x1ad')])){return this[_0xf570('0xd')]['error'](_0x1969f0,'no\x20subproject\x20selected');}var _0x5a42d7=this[_0xf570('0x16')]['sync'](this,_0x1969f0['project_id']);if(!this['isConfigured'](_0x5a42d7)){return this['channel'][_0xf570('0x2a')](_0x1969f0,util[_0xf570('0x27')](_0xf570('0x1ae'),_0x1969f0[_0xf570('0x1ad')]));}if(_0x5a42d7===this[_0xf570('0xd')][_0xf570('0x3f')]){return this[_0xf570('0xd')][_0xf570('0x2a')](_0x1969f0,_0xf570('0x1af'));}this[_0xf570('0x34')][_0xf570('0x70')](this,_0x1969f0,_0x5a42d7);var _0x3869e7=this[_0xf570('0xd')]['exec'](_0xf570('0x1b0'),util[_0xf570('0x27')]('agi://%s/square,\x22%s\x22,\x22%s\x22',config['agi'][_0xf570('0x1b1')]||'127.0.0.1',_0x5a42d7,this[_0xf570('0xd')][_0xf570('0x3f')]));if(_0x3869e7[_0xf570('0xa0')]===-0x1){return _0x3869e7;}return this['channel']['noop'](util[_0xf570('0x27')](_0xf570('0xc0'),'AGI',_0x5a42d7));};AGIVertices[_0xf570('0x10')][_0xf570('0x1b2')]=function(_0xa3d504){logger[_0xf570('0x2c')](util[_0xf570('0x27')](_0xf570('0x1b3'),_0xa3d504[_0xf570('0x36')]));var _0x14441a=this['shellCommand'][_0xf570('0x70')](this,_0xa3d504[_0xf570('0xb2')]);this[_0xf570('0x34')][_0xf570('0x70')](this,_0xa3d504,_0xa3d504[_0xf570('0xb2')]);if(this[_0xf570('0x81')](_0xa3d504[_0xf570('0xd6')])){var _0x39fc82=this[_0xf570('0x9d')][_0xf570('0x70')](this,_0xa3d504[_0xf570('0xd6')]);if(_0x39fc82){this['channel']['setVariable'](_0x39fc82,_0x14441a);return this[_0xf570('0xd')][_0xf570('0xa4')](util[_0xf570('0x27')](_0xf570('0x1b4'),_0xa3d504[_0xf570('0xb2')],_0x39fc82));}}return this[_0xf570('0xd')][_0xf570('0xa4')](util[_0xf570('0x27')]('sh\x20command:\x20%s\x20result\x20no\x20stored',_0xa3d504[_0xf570('0xb2')]));};AGIVertices['prototype']['google_cloud_tts']=function(_0x320d4d){logger['info'](util['format']('Enter\x20in\x20Google\x20Cloud\x20TTS\x20(%s)\x20block',_0x320d4d[_0xf570('0x36')]));_0x320d4d['text']=_0x320d4d[_0xf570('0x5a')][_0xf570('0x57')](/(\r\n|\n|\r)/gm,'\x20');if(!this[_0xf570('0x81')](_0x320d4d['apiKey'])){return this[_0xf570('0xd')][_0xf570('0xa4')]('no\x20apiKey\x20configured');}if(!this[_0xf570('0x81')](_0x320d4d[_0xf570('0x5a')])){return this[_0xf570('0xd')][_0xf570('0xa4')](_0xf570('0xa5'));}this[_0xf570('0xd')][_0xf570('0xa4')](util[_0xf570('0x27')](_0xf570('0x1b5'),_0x320d4d[_0xf570('0x5a')]));var _0x50dcad=this[_0xf570('0x58')][_0xf570('0x70')](this,_0x320d4d);if(_0x50dcad){this['channel']['noop'](util[_0xf570('0x27')](_0xf570('0x1b6'),_0x50dcad));var _0x45692a=this[_0xf570('0xd')][_0xf570('0x101')](_0x50dcad);try{fs[_0xf570('0x125')](_0x50dcad+_0xf570('0x102'));}catch(_0x1b1210){logger[_0xf570('0x2a')](_0x1b1210);}return _0x45692a;}return this['channel'][_0xf570('0x2a')](_0x320d4d,_0xf570('0x1b7'));};AGIVertices[_0xf570('0x10')]['tts']=function(_0x2e7bf8){logger[_0xf570('0x2c')](util[_0xf570('0x27')](_0xf570('0x1b8'),_0x2e7bf8[_0xf570('0x36')]));_0x2e7bf8['text']=_0x2e7bf8[_0xf570('0x5a')]['replace'](/(\r\n|\n|\r)/gm,'\x20');if(!this[_0xf570('0x81')](_0x2e7bf8[_0xf570('0x5a')])){return this['channel'][_0xf570('0xa4')]('no\x20text\x20configured');}this['channel'][_0xf570('0xa4')](util[_0xf570('0x27')](_0xf570('0x1b9'),_0x2e7bf8['text']));var _0x397866=this['googleTTS'][_0xf570('0x70')](this,_0x2e7bf8);if(_0x397866){this[_0xf570('0xd')][_0xf570('0xa4')](util[_0xf570('0x27')](_0xf570('0x1ba'),_0x397866));var _0xc45351=this[_0xf570('0xd')][_0xf570('0x101')](_0x397866);try{fs['unlink'](_0x397866+'.wav');}catch(_0x5727f5){logger['error'](_0x5727f5);}return _0xc45351;}return this['channel']['error'](_0x2e7bf8,'Google\x20TTS\x20is\x20unreachable');};AGIVertices['prototype'][_0xf570('0x1bb')]=function(_0x5b9c86){logger[_0xf570('0x2c')](util[_0xf570('0x27')](_0xf570('0x1bc'),_0x5b9c86[_0xf570('0x36')]));if(!this[_0xf570('0x81')](_0x5b9c86[_0xf570('0x158')])){return this[_0xf570('0xd')][_0xf570('0x2a')](_0x5b9c86,_0xf570('0x159'));}logger[_0xf570('0x2c')](util[_0xf570('0x27')](_0xf570('0x15a'),this[_0xf570('0xd')][_0xf570('0x38')],_0x5b9c86[_0xf570('0x158')]));var _0x39b7a1=this[_0xf570('0x4f')][_0xf570('0x70')](this,_0x5b9c86[_0xf570('0x158')]);if(_0x39b7a1){logger['info'](util[_0xf570('0x27')](_0xf570('0x15b'),this[_0xf570('0xd')][_0xf570('0x38')],_0x5b9c86[_0xf570('0x158')]));this['channel'][_0xf570('0xa4')](util[_0xf570('0x27')](_0xf570('0x15b'),this[_0xf570('0xd')]['callerid'],_0x5b9c86[_0xf570('0x158')]));return{'code':0xc8,'result':_0xf570('0x1bd')};}else{logger[_0xf570('0x2c')](util[_0xf570('0x27')](_0xf570('0x15c'),this['channel'][_0xf570('0x38')],_0x5b9c86[_0xf570('0x158')]));this[_0xf570('0xd')]['noop'](util[_0xf570('0x27')](_0xf570('0x15c'),this['channel'][_0xf570('0x38')],_0x5b9c86[_0xf570('0x158')]));return{'code':0xc8,'result':_0xf570('0x15d')};}};AGIVertices['prototype'][_0xf570('0x1be')]=function(_0x1f85f2){logger['info'](util[_0xf570('0x27')](_0xf570('0x1bf'),_0x1f85f2[_0xf570('0x36')]));var _0x5a2a23=this[_0xf570('0xd')][_0xf570('0x55')](_0xf570('0x1c0'),[_0x1f85f2[_0xf570('0x1c1')],_0x1f85f2[_0xf570('0x76')]]);if(_0x5a2a23[_0xf570('0xa0')]===-0x1){return _0x5a2a23;}return this['channel'][_0xf570('0xa4')](util[_0xf570('0x27')](_0xf570('0xc0'),_0xf570('0x1c0'),_0x1f85f2[_0xf570('0x1c1')]));};AGIVertices['prototype'][_0xf570('0x1c2')]=function(_0x395feb){logger[_0xf570('0x2c')](util[_0xf570('0x27')](_0xf570('0x1c3'),_0x395feb[_0xf570('0x36')]));if(!this['isConfigured'](_0x395feb[_0xf570('0xd6')])){return this[_0xf570('0xd')]['error'](_0x395feb,_0xf570('0x1a5'));}var _0x18fd12=this[_0xf570('0x9d')][_0xf570('0x70')](this,_0x395feb[_0xf570('0xd6')]);if(!_0x18fd12){return this[_0xf570('0xd')][_0xf570('0x2a')](_0x395feb,_0xf570('0xd8'));}var _0x23f8f2=this['channel'][_0xf570('0x9d')](_0x18fd12);return{'code':0xc8,'result':_0x23f8f2[_0xf570('0x9e')]?_0x23f8f2[_0xf570('0x9e')]:'-'};};String['prototype'][_0xf570('0x9c')]=function(_0xb2063c,_0x58679d){return this[_0xf570('0x9b')](_0xb2063c)[_0xf570('0x1c4')](_0x58679d);};module['exports']=AGIVertices; \ No newline at end of file +var _0x61a5=['Intervals','format','%s/sounds/converted/%s','open','error','Error\x20getting\x20ODBC\x20connection\x20%s','info','ODBC\x20connection\x20successfully','query','Error\x20executing\x20query\x20%s','Query\x20executed\x20correctly\x20%s','close','Error\x20closing\x20connection\x20to\x20odbc\x20%s','getSmsAccount','getSmsAccountById','createSmsMessage','createSquareDetailsReport','uniqueid','label','agicommand','channel','createSquareRecording','calleridname','context','priority','accountcode','arg_1','createSquareMessage','createCmContact','isEmpty','isNil','random','lastName','phone','list_id','callback','Callback\x20scheduled\x20at\x20','toString','callback_priority','getPause','getPauseById','agentPause','agent','callerid','agentUnpause','agentLogout','agentLogin','internal','%s/%s@from-sip/n','LOCAL','shellCommand','exec','trim','replace','googleCloudTTS','google_cloud_tts_text_type','text','languageCode','en-US','MALE','audioEncoding','MP3','googleTTS','google_tts_language','method','timeout','number','includes','POST','PUT','toUpperCase','body','rawBody','parse','An\x20incorrect\x20formatted\x20json\x20body\x20has\x20been\x20passed\x20to\x20the\x20function','headers','An\x20incorrect\x20formatted\x20json\x20headers\x20has\x20been\x20passed\x20to\x20the\x20function','computedVariables','sync','uri','render','url','stringify','An\x20incorrect\x20formatted\x20json\x20has\x20been\x20passed\x20to\x20the\x20function','statusCode','statusMessage','message','500\x20-\x20Internal\x20Server\x20Error','options','googleDialogflow','key','dialogflow_language','googleDialogflowV2','client_email','private_key','ispeechTTS','ispeech_tts_language','speed','ispeechASR','ispeech_asr_language','isConfigured','model','awsPolly','aws_access_key_id','aws_secret_access_key','aws_polly_region','aws_polly_voice','aws_text_type','awsLex','aws_lex_region','googleASR','google_asr_language','tildeASR','appid','clone','hasOwnProperty','isString','replaceObjectAllVariables','replaceAllVariables','recursiveNodeIndex','isArray','length','isPlainObject','saveRestApiResult','%s.%s','setVariable','split','replaceAll','extra','getAndSetVariable','result','The\x20\x22%s\x22\x20variable\x20value\x20is:\x20%s','retry','maxRetry','mrcpsynth','noop','no\x20text\x20configured','MRCPSynth','Executed\x20command\x20MRCPSynth\x20%s','mrcprecog','Enter\x20in\x20MRCPRecog\x20(%s)\x20block','grammar','no\x20grammar\x20configured','MRCPRecog','RECOG_CONFIDENCE()','MRCP_RECOG_CONFIDENCE','RECOG_INPUT()','MRCP_RECOG_TRANSCRIPT','RECOG_INSTANCE()','Enter\x20in\x20AGI\x20(%s)\x20block','command','args','answer','Wait\x20%s\x20seconds\x20before\x20answer','Enter\x20in\x20CALLBACK\x20(%s)\x20block','no\x20list\x20selected','scheduledAt','delay','add','minutes','CALLBACK\x20added\x20phone:\x20%s\x20on\x20list:\x20%s\x20at\x20%s','custom_app','Executed\x20command\x20%s\x20%s','application','lumenvoxtts','sestektts','Enter\x20in\x20SESTEKTTS\x20(%s)\x20block','lumenvoxasr','Enter\x20in\x20LUMENVOXASR\x20(%s)\x20block','LUMENVOX_ASR_CONFIDENCE','LUMENVOX_ASR_TRANSCRIPT','LUMENVOX_ASR_INSTANCE','Executed\x20command\x20MRCPRecog\x20%s','SESTEK_ASR_CONFIDENCE','SESTEK_ASR_TRANSCRIPT','database','no\x20database\x20selected','getSquareOdbc','odbc_id','no\x20odbc\x20database\x20found','no\x20query\x20configured','query:\x20%s','variable_id','no\x20variable\x20selected\x20for\x20the\x20result','no\x20variable\x20found','forEach','%s[%s][%s]','%s_ROWS_COUNT','debug','sip_id','DIAL','SIP/%s','opts','Executed\x20command\x20%s','Enter\x20in\x20DIALOGFLOW\x20(%s)\x20block','bot','DIALOGFLOW_%s','speech','out','dialogflow','Dialogflow\x20Result\x20%s','dialogflowV2','Enter\x20in\x20DIALOGFLOW\x20V2\x20(%s)\x20block','dialogflowV2_project_id','no\x20project_id\x20configured','no\x20private_key\x20configured','dialogflowV2_language','no\x20anguage\x20configured','providerResponse','DialogflowV2\x20Result\x20%s','sesteknda','Enter\x20in\x20SESTEKNDA\x20(%s)\x20block','ndauth_url','no\x20ndauth\x20url\x20configured','username','password','no\x20password\x20configured','Trying\x20SestekNDA:\x20%s','sestekNDA','SESTEK_NDA_%s','audiofile','streamFile','.wav','SestekNDA\x20Result\x20%s','end','Enter\x20in\x20END\x20(%s)\x20block','ext_dial','Enter\x20in\x20EXTERNAL\x20DIAL\x20(%s)\x20block','trunk_id','no\x20trunk\x20selected','getTrunk','no\x20trunk\x20found','trunk_name','SIP/%s/%s','finally','Enter\x20in\x20FINALLY\x20(%s)\x20block','file_id','no\x20file\x20audio\x20selected','no\x20file\x20audio\x20found','getData','response','maxdigit','test','mindigit','hiddendigitsnum','generate','hiddendigitspos','first','substr','goal','Enter\x20in\x20GOAL\x20(%s)\x20block','goalname','awspolly','[AGI]\x20Enter\x20in\x20AWSPOLLY\x20(%s)\x20block','no\x20valid\x20credentials\x20configured','aws\x20Polly\x20%s\x20file\x20created','unlink','aws\x20Polly\x20is\x20unreachable','awslex','Enter\x20in\x20Amazon\x20Lex\x20(%s)\x20block','no\x20bot\x20name\x20configured','Trying\x20Amazon\x20Lex:\x20%s','AWS_LEX_%s','Amazon\x20Lex\x20ready\x20for\x20fulfillment','amazonlex','Amazon\x20Lex\x20is\x20unreachable','googleasr','Enter\x20in\x20GOOGLEASR\x20(%s)\x20block\x20%s','no\x20key\x20configured','wav','%s/recordings/%s','beep','NOBEEP','intKey','GOOGLE_ASR_%s','GoogleASR\x20Result\x20%s','tildeasr','Enter\x20in\x20TILDEASR\x20(%s)\x20block','no\x20appid\x20configured','appsecret','no\x20appsecret\x20configured','recordFile','tilde\x20%s\x20file\x20created','TILDE_ASR_%s','TildeASR\x20Result\x20%s','gotoc','continueAt','extension','Enter\x20in\x20GOTOIF\x20(%s)\x20block','condition','EVAL\x20CONDITION\x20%s\x20%s','false','interval_id','IFTIME(%s?true:false)','true','IFTIME\x20%s\x20%s','Enter\x20in\x20HANGUP\x20(%s)\x20block','hangup','ispeechasr','Enter\x20in\x20ISPEECHASR\x20(%s)\x20block','ispeech\x20%s\x20file\x20created','IspeechASR\x20Result\x20%s','ispeechtts','Enter\x20in\x20ISPEECHTTS\x20(%s)\x20block','Trying\x20ispeech\x20TTS\x20%s','ispeech\x20TTS\x20is\x20unreachable','login','Enter\x20in\x20LOGIN\x20(%s)\x20block','findBy','FIND\x20AGENT\x20%s\x20BY\x20%s','AGENT\x20%s\x20FOUND\x20BY','success','AGENT\x20%s\x20NOT\x20FOUND\x20BY','failure','Enter\x20in\x20LOGOUT\x20(%s)\x20block','no\x20find\x20by\x20configured','math','no\x20operation\x20configured','math\x20%s','operation','%s[%s]','variable\x20%s[key]\x20set','Enter\x20in\x20MENU\x20(%s)\x20block','digit','Enter\x20in\x20NOOP\x20(%s)\x20block','output','pause','pause_id','Enter\x20in\x20PLAYBACK\x20(%s)\x20block','PLAYBACK','queue','queue_id','no\x20queue\x20selected','getVoiceQueue','indexOf','XMCS-QUEUE','toLowerCase','QUEUE','macro','gosub','position','record','Enter\x20in\x20RECORD\x20(%s)\x20block','recordingFormat','%s_%s','%s/recordings/%s.%s','Recording\x20%s\x20%s\x20%s\x20%s','restapi','no\x20url\x20configured','restAPI','Response:','inspect','%s_STATUS_MESSAGE','sayDigits','escape_digits','saynumber','Enter\x20in\x20SAYNUMBER\x20(%s)\x20block','sayNumber','sayphonetic','sayPhonetic','sendMail','Enter\x20in\x20SENDMAIL\x20(%s)\x20block','account_id','Smtp','no\x20mail\x20account\x20found','\x22%s\x22\x20<%s>','email','user','bcc','subject','template_id','Trying\x20SendMail\x20with\x20account\x20%s','Mail\x20message\x20added\x20to\x20outgoing\x20process','sendFax','SENDFAX\x20block\x20not\x20implemented','sms_account_id','no\x20sms\x20account\x20configured','no\x20sms\x20account\x20found','sms_text','sendSMS\x20message','Trying\x20SendSMS\x20with\x20account\x20%s','Sms\x20message\x20added\x20to\x20outgoing\x20process','set','Enter\x20in\x20SET\x20(%s)\x20block','no\x20variable\x20selected','variable_value','start','Enter\x20in\x20START\x20(%s)\x20block','yes','Answer','Skipped\x20Answer','subproject','Enter\x20in\x20SUBPROJECT\x20(%s)\x20block','project_id','host','127.0.0.1','Enter\x20in\x20SYSTEM\x20(%s)\x20block','sh\x20command:\x20%s\x20result\x20on\x20variable:\x20%s','sh\x20command:\x20%s\x20result\x20no\x20stored','google_cloud_tts','Enter\x20in\x20Google\x20Cloud\x20TTS\x20(%s)\x20block','apiKey','no\x20apiKey\x20configured','Google\x20Cloud\x20TTS\x20%s\x20file\x20created','Google\x20Cloud\x20TTS\x20is\x20unreachable','tts','Google\x20TTS\x20%s\x20file\x20created','unpause','Enter\x20in\x20UNPAUSE\x20(%s)\x20block','voicemail','VOICEMAIL','mailbox','join','exports','util','shelljs','odbc','moment','request-promise','../../config/logger','agi','../../config/environment','../../config/environment/shared','./scripts','/var/opt/motion2/server/files','rawHeaders','menu','getdigits','getsecretdigits','rpc','mailRpc','prototype','getVariable','getVariableById','then','name','catch','getVoiceQueueById','getSquareProject','getSquareOdbcById','getUser','getUserById','getSound','getSoundById','getSoundPath','save_name','getMailAccount','sendMailMessage','getIntervalById','IntervalId','interval'];(function(_0x96602e,_0x3d75d4){var _0x5c004d=function(_0x1432ba){while(--_0x1432ba){_0x96602e['push'](_0x96602e['shift']());}};_0x5c004d(++_0x3d75d4);}(_0x61a5,0x19e));var _0x561a=function(_0x65c0bb,_0x82e7b8){_0x65c0bb=_0x65c0bb-0x0;var _0x320bd5=_0x61a5[_0x65c0bb];return _0x320bd5;};'use strict';var fs=require('fs');var util=require(_0x561a('0x0'));var _=require('lodash');var sh=require(_0x561a('0x1'));var odbc=require(_0x561a('0x2'))();var rs=require('randomstring');var moment=require(_0x561a('0x3'));var Mustache=require('mustache');var rp=require(_0x561a('0x4'));var logger=require(_0x561a('0x5'))(_0x561a('0x6'));var config=require(_0x561a('0x7'));var shared=require(_0x561a('0x8'));var scripts=require(_0x561a('0x9'));var FILES_PATH=_0x561a('0xa');var recursiveMapAttributes=[_0x561a('0xb'),'rawBody'];var verticesWithRetry=[_0x561a('0xc'),_0x561a('0xd'),_0x561a('0xe')];var AGIVertices=function(_0x5cd4f6,_0x95e2a0,_0x2a0fdb){this['channel']=_0x5cd4f6;this[_0x561a('0xf')]=_0x95e2a0;this[_0x561a('0x10')]=_0x2a0fdb;};AGIVertices[_0x561a('0x11')][_0x561a('0x12')]=function(_0x5f1a15,_0x52759e){this[_0x561a('0xf')][_0x561a('0x13')](_0x5f1a15)[_0x561a('0x14')](function(_0x2ea318){_0x52759e(null,_0x2ea318?_0x2ea318[_0x561a('0x15')]:![]);})[_0x561a('0x16')](function(_0x6ab4df){_0x52759e(_0x6ab4df);});};AGIVertices[_0x561a('0x11')]['getVoiceQueue']=function(_0x15aa0b,_0x29c9c0){this[_0x561a('0xf')][_0x561a('0x17')](_0x15aa0b)['then'](function(_0xd35ad0){_0x29c9c0(null,_0xd35ad0?_0xd35ad0['name']:![]);})[_0x561a('0x16')](function(_0x3a06d3){_0x29c9c0(_0x3a06d3);});};AGIVertices[_0x561a('0x11')][_0x561a('0x18')]=function(_0x340dbc,_0xb777ee){this['rpc']['getSquareProjectById'](_0x340dbc)['then'](function(_0x536472){_0xb777ee(null,_0x536472?_0x536472[_0x561a('0x15')]:![]);})[_0x561a('0x16')](function(_0x1f920e){_0xb777ee(_0x1f920e);});};AGIVertices['prototype']['getSquareOdbc']=function(_0x574430,_0x4552c0){this[_0x561a('0xf')][_0x561a('0x19')](_0x574430)[_0x561a('0x14')](function(_0x42e60b){_0x4552c0(null,_0x42e60b?_0x42e60b['dsn']:![]);})[_0x561a('0x16')](function(_0x374469){_0x4552c0(_0x374469);});};AGIVertices['prototype'][_0x561a('0x1a')]=function(_0xbf17c6,_0x4a038b){this['rpc'][_0x561a('0x1b')](_0xbf17c6)['then'](function(_0x593515){_0x4a038b(null,_0x593515?_0x593515['name']:![]);})['catch'](function(_0x22dfb4){_0x4a038b(_0x22dfb4);});};AGIVertices['prototype']['getTrunk']=function(_0x437bab,_0xcb0e3c){this['rpc']['getTrunkById'](_0x437bab)['then'](function(_0x30657a){_0xcb0e3c(null,_0x30657a?_0x30657a[_0x561a('0x15')]:![]);})['catch'](function(_0x35a1f4){_0xcb0e3c(_0x35a1f4);});};AGIVertices['prototype'][_0x561a('0x1c')]=function(_0x3412b6,_0x19f5e5){var _0x1eea93=this;this[_0x561a('0xf')][_0x561a('0x1d')](_0x3412b6)[_0x561a('0x14')](function(_0x310d40){_0x19f5e5(null,_0x310d40?_0x1eea93[_0x561a('0x1e')](_0x310d40[_0x561a('0x1f')]):![]);})[_0x561a('0x16')](function(_0x1d8948){_0x19f5e5(_0x1d8948);});};AGIVertices['prototype'][_0x561a('0x20')]=function(_0x39fee8,_0x3f98bd){this[_0x561a('0xf')]['getMailAccountById'](_0x39fee8)[_0x561a('0x14')](function(_0x17d557){_0x3f98bd(null,_0x17d557?_0x17d557:![]);})[_0x561a('0x16')](function(_0x264f5f){_0x3f98bd(_0x264f5f);});};AGIVertices[_0x561a('0x11')][_0x561a('0x21')]=function(_0x490cd3,_0x3d5a62,_0x82f608){this[_0x561a('0x10')][_0x561a('0x21')](_0x490cd3,_0x3d5a62)[_0x561a('0x14')](function(){_0x82f608(null);})[_0x561a('0x16')](function(_0x2f81e6){_0x82f608(_0x2f81e6);});};AGIVertices[_0x561a('0x11')]['getIntervals']=function(_0x97a2c7,_0x1131c3){this[_0x561a('0xf')][_0x561a('0x22')](_0x97a2c7)['then'](function(_0x5e8c86){if(_0x5e8c86){if(_0x5e8c86[_0x561a('0x23')]){_0x1131c3(null,[_0x5e8c86[_0x561a('0x24')]]);}else{_0x1131c3(null,_['map'](_0x5e8c86[_0x561a('0x25')],_0x561a('0x24')));}}else{_0x1131c3(null,![]);}})[_0x561a('0x16')](function(_0x3bb322){_0x1131c3(_0x3bb322);});};AGIVertices[_0x561a('0x11')][_0x561a('0x1e')]=function(_0x28e667){return util[_0x561a('0x26')](_0x561a('0x27'),FILES_PATH,_0x28e667);};AGIVertices['prototype']['getQueryOdbc']=function(_0x5b4add,_0x3d3d11,_0x12a631){odbc[_0x561a('0x28')](_0x5b4add,function(_0x52f435){if(_0x52f435){logger[_0x561a('0x29')](_0x561a('0x2a'),_0x52f435);_0x12a631(_0x52f435);}else{logger[_0x561a('0x2b')](_0x561a('0x2c'));odbc[_0x561a('0x2d')](_0x3d3d11,function(_0x3071df,_0x5c59db){if(_0x3071df){logger[_0x561a('0x2b')](_0x561a('0x2e'),_0x3d3d11);_0x12a631(_0x3071df);}else{logger[_0x561a('0x2b')](_0x561a('0x2f'),_0x3d3d11);odbc[_0x561a('0x30')](function(_0x274a7a){if(_0x274a7a){logger[_0x561a('0x29')](_0x561a('0x31'),_0x274a7a);}_0x12a631(null,_0x5c59db);});}});}});};AGIVertices['prototype'][_0x561a('0x32')]=function(_0x4a54ad,_0x4536e8){this[_0x561a('0xf')][_0x561a('0x33')](_0x4a54ad)[_0x561a('0x14')](function(_0x3f28fb){_0x4536e8(null,_0x3f28fb?_0x3f28fb:![]);})['catch'](function(_0x293051){_0x4536e8(_0x293051);});};AGIVertices[_0x561a('0x11')]['createSmsMessage']=function(_0x24076b,_0x4be816){this[_0x561a('0xf')][_0x561a('0x34')](_0x24076b)[_0x561a('0x14')](function(_0x2720b0){_0x4be816(null,_0x2720b0);})[_0x561a('0x16')](function(_0x116031){_0x4be816(_0x116031);});};AGIVertices[_0x561a('0x11')][_0x561a('0x35')]=function(_0x566cda,_0x1ec09c,_0x362f63){this[_0x561a('0xf')][_0x561a('0x35')]({'uniqueid':this['channel'][_0x561a('0x36')],'node':_0x566cda[_0x561a('0x37')],'application':_0x566cda[_0x561a('0x38')],'data':_0x1ec09c||null,'project_name':this[_0x561a('0x39')]['arg_1'],'callerid':this[_0x561a('0x39')]['callerid']})[_0x561a('0x14')](function(_0x4847e7){if(_0x362f63){_0x362f63(null,_0x4847e7);}})[_0x561a('0x16')](function(_0x2f814d){if(_0x362f63){_0x362f63(_0x2f814d);}});};AGIVertices[_0x561a('0x11')]['createSquareRecording']=function(_0x5d41f1,_0x3315d1,_0x3c2bb7,_0x1bd528){this[_0x561a('0xf')][_0x561a('0x3a')]({'uniqueid':this[_0x561a('0x39')]['uniqueid'],'callerid':this[_0x561a('0x39')]['callerid'],'calleridname':this[_0x561a('0x39')][_0x561a('0x3b')],'context':this[_0x561a('0x39')][_0x561a('0x3c')],'extension':this[_0x561a('0x39')]['extension'],'priority':this[_0x561a('0x39')][_0x561a('0x3d')],'accountcode':this[_0x561a('0x39')][_0x561a('0x3e')],'dnid':this[_0x561a('0x39')]['dnid'],'projectName':this[_0x561a('0x39')][_0x561a('0x3f')],'saveName':_0x3315d1,'filename':_0x5d41f1['file']||_0x3315d1,'savePath':_0x3c2bb7})[_0x561a('0x14')](function(_0x1b96dd){_0x1bd528(null,_0x1b96dd);})['catch'](function(_0x426c71){_0x1bd528(_0x426c71);});};AGIVertices['prototype'][_0x561a('0x40')]=function(_0x21f0ba,_0x4dea87,_0x34ea92,_0x80b59e,_0x168135){this['rpc'][_0x561a('0x40')]({'uniqueid':this['channel'][_0x561a('0x36')],'body':_0x21f0ba,'direction':_0x4dea87,'providerName':_0x34ea92,'providerResponse':_0x80b59e})[_0x561a('0x14')](function(_0x3f4757){if(_0x168135){_0x168135(null,_0x3f4757);}})['catch'](function(_0x41c75a){if(_0x168135){_0x168135(_0x41c75a);}});};AGIVertices[_0x561a('0x11')][_0x561a('0x41')]=function(_0x3d2acc,_0x1f9ccb){this[_0x561a('0xf')][_0x561a('0x41')]({'firstName':_[_0x561a('0x42')](_0x3d2acc['name'])||_[_0x561a('0x43')](_0x3d2acc[_0x561a('0x15')])?'callback_'+Math[_0x561a('0x44')]():_0x3d2acc[_0x561a('0x15')],'lastName':_['isEmpty'](_0x3d2acc[_0x561a('0x45')])||_[_0x561a('0x43')](_0x3d2acc[_0x561a('0x45')])?null:_0x3d2acc[_0x561a('0x45')],'phone':_0x3d2acc[_0x561a('0x46')],'ListId':_0x3d2acc[_0x561a('0x47')],'scheduledat':_0x3d2acc['scheduledAt'],'callbackUniqueid':this[_0x561a('0x39')][_0x561a('0x36')],'tags':_0x561a('0x48'),'description':_0x561a('0x49')+_0x3d2acc['scheduledAt'][_0x561a('0x4a')](),'priority':_0x3d2acc[_0x561a('0x4b')]})[_0x561a('0x14')](function(_0xa0ac76){_0x1f9ccb(null,_0xa0ac76);})[_0x561a('0x16')](function(_0x5bd19c){_0x1f9ccb(_0x5bd19c);});};AGIVertices[_0x561a('0x11')][_0x561a('0x4c')]=function(_0x58ba32,_0xff6f00){this[_0x561a('0xf')][_0x561a('0x4d')](_0x58ba32)[_0x561a('0x14')](function(_0x43c90c){_0xff6f00(null,_0x43c90c?_0x43c90c[_0x561a('0x15')]:![]);})[_0x561a('0x16')](function(_0x262056){_0xff6f00(_0x262056);});};AGIVertices[_0x561a('0x11')][_0x561a('0x4e')]=function(_0x4159af,_0x29f1ed,_0x1dad4a){var _0x5b9452={'role':_0x561a('0x4f')};_0x5b9452[_0x4159af]=this[_0x561a('0x39')][_0x561a('0x50')];this[_0x561a('0xf')][_0x561a('0x4e')](_0x5b9452,_0x29f1ed,this[_0x561a('0x39')]['uniqueid'])[_0x561a('0x14')](function(_0x4c0e69){_0x1dad4a(null,_[_0x561a('0x43')](_0x4c0e69)?![]:!![]);})[_0x561a('0x16')](function(_0x3ca5fe){logger[_0x561a('0x29')](_0x3ca5fe);_0x1dad4a(null,![]);});};AGIVertices[_0x561a('0x11')][_0x561a('0x51')]=function(_0x4ff7a7,_0x5b27b5){var _0x1f8f44={'role':_0x561a('0x4f')};_0x1f8f44[_0x4ff7a7]=this[_0x561a('0x39')][_0x561a('0x50')];this[_0x561a('0xf')][_0x561a('0x51')](_0x1f8f44)[_0x561a('0x14')](function(_0x2c23b8){_0x5b27b5(null,_['isNil'](_0x2c23b8)?![]:!![]);})['catch'](function(_0x37bf48){logger[_0x561a('0x29')](_0x37bf48);_0x5b27b5(null,![]);});};AGIVertices['prototype'][_0x561a('0x52')]=function(_0x1dcaa1,_0x5842fd){var _0x4c2753={'role':_0x561a('0x4f')};_0x4c2753[_0x1dcaa1]=this[_0x561a('0x39')]['callerid'];this[_0x561a('0xf')][_0x561a('0x52')](_0x4c2753)['then'](function(_0x5ea01f){_0x5842fd(null,_[_0x561a('0x43')](_0x5ea01f)?![]:!![]);})[_0x561a('0x16')](function(_0x506815){logger[_0x561a('0x29')](_0x506815);_0x5842fd(null,![]);});};AGIVertices[_0x561a('0x11')][_0x561a('0x53')]=function(_0x518836,_0x27e3b7){var _0x507388={'role':'agent'};_0x507388[_0x518836]=this[_0x561a('0x39')]['callerid'];var _0x5365b1=_0x518836!=_0x561a('0x54')?util[_0x561a('0x26')](_0x561a('0x55'),_0x561a('0x56'),this[_0x561a('0x39')]['callerid']):undefined;this[_0x561a('0xf')]['agentLogin'](_0x507388,_0x5365b1)['then'](function(_0x1fea6e){_0x27e3b7(null,_[_0x561a('0x43')](_0x1fea6e)?![]:!![]);})[_0x561a('0x16')](function(_0x4a8d07){logger[_0x561a('0x29')](_0x4a8d07);_0x27e3b7(null,![]);});};AGIVertices['prototype'][_0x561a('0x57')]=function(_0x24c819,_0x5bf6ee){sh[_0x561a('0x58')](_[_0x561a('0x59')](_0x24c819),function(_0x41596e,_0xcf2109){var _0xd0ee36=_0xcf2109[_0x561a('0x5a')](/(\r\n|\n|\r)/gm,'');_0x5bf6ee(null,_0xd0ee36);});};AGIVertices[_0x561a('0x11')][_0x561a('0x5b')]=function(_0x28f36b,_0x1c3def){scripts[_0x561a('0x5b')](_0x28f36b['apiKey'],_0x28f36b[_0x561a('0x5c')]||'text',_0x28f36b[_0x561a('0x5d')],_0x28f36b[_0x561a('0x5e')]||_0x561a('0x5f'),_0x28f36b['ssmlGender']||_0x561a('0x60'),_0x28f36b[_0x561a('0x61')]||_0x561a('0x62'))[_0x561a('0x14')](function(_0x180060){_0x1c3def(null,_0x180060);})['catch'](function(_0x1c7537){_0x1c3def(_0x1c7537);});};AGIVertices['prototype'][_0x561a('0x63')]=function(_0x38856d,_0x5f1c33){scripts[_0x561a('0x63')](_0x38856d['text'],_0x38856d[_0x561a('0x64')]||'en',0x1)[_0x561a('0x14')](function(_0x31df02){_0x5f1c33(null,_0x31df02);})[_0x561a('0x16')](function(_0x2820d1){_0x5f1c33(_0x2820d1);});};AGIVertices[_0x561a('0x11')]['restAPI']=function(_0x592ef7,_0x175b8b){var _0xe3a568={'uri':_0x592ef7['url'],'method':_0x592ef7[_0x561a('0x65')],'json':!![],'resolveWithFullResponse':!![],'strictSSL':![],'timeout':typeof parseInt(_0x592ef7[_0x561a('0x66')])===_0x561a('0x67')&&parseInt(_0x592ef7[_0x561a('0x66')])>=0x1?parseInt(_0x592ef7['timeout'])*0x3e8:0x5*0x3e8};if(_[_0x561a('0x68')]([_0x561a('0x69'),_0x561a('0x6a')],_0xe3a568[_0x561a('0x65')][_0x561a('0x6b')]())){try{_0xe3a568[_0x561a('0x6c')]=_0x592ef7[_0x561a('0x6d')]?JSON[_0x561a('0x6e')](_0x592ef7[_0x561a('0x6d')]):{};}catch(_0x2ddb55){logger['error'](_0x561a('0x6f'),_0x2ddb55);}}try{_0xe3a568[_0x561a('0x70')]=_0x592ef7[_0x561a('0xb')]?JSON[_0x561a('0x6e')](_0x592ef7['rawHeaders']):{};}catch(_0x2c7991){logger[_0x561a('0x29')](_0x561a('0x71'),_0x2c7991);}if(_0x592ef7[_0x561a('0x72')]){try{var _0x57ca83=require(_0x592ef7[_0x561a('0x72')])[_0x561a('0x73')](this,_0xe3a568);_0xe3a568[_0x561a('0x74')]=Mustache[_0x561a('0x75')](_0x592ef7[_0x561a('0x76')],_0x57ca83,{},['$$','$$']);if(_0xe3a568[_0x561a('0x70')]){_0xe3a568[_0x561a('0x70')]=JSON[_0x561a('0x6e')](Mustache['render'](JSON[_0x561a('0x77')](_0xe3a568[_0x561a('0x70')]),_0x57ca83,{},['$$','$$']));}if(_0xe3a568[_0x561a('0x6c')]){_0xe3a568[_0x561a('0x6c')]=JSON[_0x561a('0x6e')](Mustache[_0x561a('0x75')](JSON[_0x561a('0x77')](_0xe3a568['body']),_0x57ca83,{},['$$','$$']));}}catch(_0x1a8d3d){logger[_0x561a('0x29')](_0x561a('0x78'),_0x1a8d3d);}}rp(_0xe3a568)[_0x561a('0x14')](function(_0x593158){var _0x76a34={'statusCode':_0x593158[_0x561a('0x79')]||0xc8,'statusMessage':_0x593158[_0x561a('0x7a')]||'OK','headers':_0x593158['headers']||{},'body':_0x593158[_0x561a('0x6c')]||{}};_0x175b8b(null,_0x76a34);})[_0x561a('0x16')](function(_0x5aacbe){var _0xf591be={'statusCode':_0x5aacbe['statusCode']||0x1f4,'statusMessage':_0x5aacbe[_0x561a('0x7b')]||_0x561a('0x7c'),'headers':_0x5aacbe['options'][_0x561a('0x70')]||{},'body':_0x5aacbe[_0x561a('0x7d')]['body']||{}};_0x175b8b(null,_0xf591be);});};AGIVertices[_0x561a('0x11')][_0x561a('0x7e')]=function(_0x2da59f,_0x322316){scripts[_0x561a('0x7e')](this[_0x561a('0x39')]['uniqueid'],_0x2da59f[_0x561a('0x7f')],_0x2da59f[_0x561a('0x5d')],_0x2da59f[_0x561a('0x80')]||'en')[_0x561a('0x14')](function(_0x4e7514){_0x322316(null,_0x4e7514);})[_0x561a('0x16')](function(_0x528917){_0x322316(_0x528917);});};AGIVertices[_0x561a('0x11')]['googleDialogflowV2']=function(_0x1abad8,_0x109736){scripts[_0x561a('0x81')](this[_0x561a('0x39')][_0x561a('0x36')],_0x1abad8['dialogflowV2_project_id'],_0x1abad8[_0x561a('0x82')],_0x1abad8[_0x561a('0x83')],_0x1abad8['text'],_0x1abad8['dialogflowV2_language']||'en')['then'](function(_0x503c09){_0x109736(null,_0x503c09);})[_0x561a('0x16')](function(_0x849b26){_0x109736(_0x849b26);});};AGIVertices[_0x561a('0x11')]['sestekNDA']=function(_0x164450,_0x1bef28){scripts['sestekNDA'](this['channel'],_0x164450)[_0x561a('0x14')](function(_0x2d6245){_0x1bef28(null,_0x2d6245);})[_0x561a('0x16')](function(_0x4f9806){_0x1bef28(_0x4f9806);});};AGIVertices[_0x561a('0x11')][_0x561a('0x84')]=function(_0x22bfd6,_0x239dcf){scripts[_0x561a('0x84')](_0x22bfd6[_0x561a('0x7f')],_0x22bfd6[_0x561a('0x5d')],_0x22bfd6[_0x561a('0x85')]||'en-US',_0x22bfd6[_0x561a('0x86')])[_0x561a('0x14')](function(_0x2fb47a){_0x239dcf(null,_0x2fb47a);})[_0x561a('0x16')](function(_0x3f742f){_0x239dcf(_0x3f742f);});};AGIVertices[_0x561a('0x11')][_0x561a('0x87')]=function(_0x38680c,_0x2957b7,_0x369e96){scripts[_0x561a('0x87')](_0x2957b7,_0x38680c[_0x561a('0x7f')],_0x38680c[_0x561a('0x88')]||_0x561a('0x5f'),this[_0x561a('0x89')](_0x38680c[_0x561a('0x8a')])?_0x38680c[_0x561a('0x8a')]:undefined)[_0x561a('0x14')](function(_0x40dcd0){_0x369e96(null,_0x40dcd0);})[_0x561a('0x16')](function(_0x477c83){_0x369e96(_0x477c83);});};AGIVertices[_0x561a('0x11')][_0x561a('0x8b')]=function(_0x82ac18,_0x523913){scripts[_0x561a('0x8b')](_0x82ac18[_0x561a('0x8c')],_0x82ac18[_0x561a('0x8d')],_0x82ac18[_0x561a('0x8e')],_0x82ac18[_0x561a('0x8f')]||'Amy',_0x82ac18[_0x561a('0x5d')],_0x82ac18[_0x561a('0x90')]||_0x561a('0x5d'))['then'](function(_0x2aed47){_0x523913(null,_0x2aed47);})[_0x561a('0x16')](function(_0x189069){_0x523913(_0x189069);});};AGIVertices['prototype'][_0x561a('0x91')]=function(_0x47fb84,_0x41e763){scripts[_0x561a('0x91')](this[_0x561a('0x39')][_0x561a('0x36')],_0x47fb84[_0x561a('0x8c')],_0x47fb84[_0x561a('0x8d')],_0x47fb84[_0x561a('0x92')],_0x47fb84['text'],_0x47fb84['aws_bot_name'])[_0x561a('0x14')](function(_0x3dfa1b){_0x41e763(null,_0x3dfa1b);})[_0x561a('0x16')](function(_0x1fae80){_0x41e763(_0x1fae80);});};AGIVertices[_0x561a('0x11')][_0x561a('0x93')]=function(_0x2ca44e,_0x2107e3,_0x356d17){scripts[_0x561a('0x93')](_0x2107e3,_0x2ca44e[_0x561a('0x7f')],_0x2ca44e[_0x561a('0x94')]||_0x561a('0x5f'))['then'](function(_0x154de8){_0x356d17(null,_0x154de8);})[_0x561a('0x16')](function(_0x370633){_0x356d17(_0x370633);});};AGIVertices[_0x561a('0x11')][_0x561a('0x95')]=function(_0x44a132,_0x154c6b,_0x8043c6){scripts[_0x561a('0x95')](_0x154c6b,_0x44a132[_0x561a('0x96')],_0x44a132['appsecret'],_0x44a132[_0x561a('0x74')])[_0x561a('0x14')](function(_0xb265b5){_0x8043c6(null,_0xb265b5);})[_0x561a('0x16')](function(_0x733610){_0x8043c6(_0x733610);});};AGIVertices['prototype']['clear']=function(_0x4e3593){var _0x540b93=_[_0x561a('0x68')](verticesWithRetry,_0x4e3593[_0x561a('0x38')])?_0x4e3593:_[_0x561a('0x97')](_0x4e3593);for(var _0x4025b1 in _0x540b93){if(_0x540b93[_0x561a('0x98')](_0x4025b1)){if(_0x540b93[_0x4025b1]&&_[_0x561a('0x99')](_0x540b93[_0x4025b1])){if(_[_0x561a('0x68')](recursiveMapAttributes,_0x4025b1)){_0x540b93[_0x4025b1]=this[_0x561a('0x9a')](_0x540b93[_0x4025b1]);}else{_0x540b93[_0x4025b1]=this[_0x561a('0x9b')](_0x540b93[_0x4025b1]);}}}}return _0x540b93;};AGIVertices['prototype']['recursiveNodeIndex']=function(_0x14f0bc){for(var _0x476e1f in _0x14f0bc){if(_0x14f0bc[_0x561a('0x98')](_0x476e1f)){if(_['isPlainObject'](_0x14f0bc[_0x476e1f])){this[_0x561a('0x9c')](_0x14f0bc[_0x476e1f]);}else if(_[_0x561a('0x9d')](_0x14f0bc[_0x476e1f])){for(var _0x277201=0x0;_0x277201<_0x14f0bc[_0x476e1f][_0x561a('0x9e')];_0x277201++){this[_0x561a('0x9c')](_0x14f0bc[_0x476e1f][_0x277201]);}}else if(_[_0x561a('0x99')](_0x14f0bc[_0x476e1f])){_0x14f0bc[_0x476e1f]=this[_0x561a('0x9b')](_0x14f0bc[_0x476e1f]);}}}};AGIVertices[_0x561a('0x11')]['saveRestApiResult']=function(_0x5a3839,_0x3f44fc){for(var _0x3c5b36 in _0x5a3839){if(_0x5a3839[_0x561a('0x98')](_0x3c5b36)){if(_[_0x561a('0x9f')](_0x5a3839[_0x3c5b36])){if(!_['isEmpty'](_0x5a3839[_0x3c5b36])){this['saveRestApiResult'](_0x5a3839[_0x3c5b36],util[_0x561a('0x26')]('%s.%s',_0x3f44fc,_0x3c5b36));}}else if(_[_0x561a('0x9d')](_0x5a3839[_0x3c5b36])){for(var _0x34d739=0x0;_0x34d739<_0x5a3839[_0x3c5b36][_0x561a('0x9e')];_0x34d739++){this[_0x561a('0xa0')](_0x5a3839[_0x3c5b36][_0x34d739],util[_0x561a('0x26')](_0x561a('0xa1'),_0x3f44fc,_0x3c5b36+'['+_0x34d739+']'));}}else{if(!_[_0x561a('0x43')](_0x5a3839[_0x3c5b36])){this[_0x561a('0x39')][_0x561a('0xa2')](util[_0x561a('0x26')]('%s.%s',_0x3f44fc,_0x3c5b36),_0x5a3839[_0x3c5b36]);}}}}};AGIVertices[_0x561a('0x11')][_0x561a('0x9a')]=function(_0x501673){try{var _0x4ceab1=JSON['parse'](_0x501673);this[_0x561a('0x9c')](_0x4ceab1);return JSON[_0x561a('0x77')](_0x4ceab1);}catch(_0x4717ac){return this[_0x561a('0x9b')](_0x501673);}};AGIVertices[_0x561a('0x11')][_0x561a('0x9b')]=function(_0x3c1089){var _0x2b1b38=_0x3c1089[_0x561a('0xa3')]('{');for(var _0x330faa=0x1;_0x330faa<_0x2b1b38['length'];_0x330faa+=0x1){var _0x53edd0=_0x2b1b38[_0x330faa]['split']('}');if(_0x53edd0['length']>0x1){_0x3c1089=_0x3c1089[_0x561a('0xa4')]('{'+_0x53edd0[0x0]+'}',this[_0x561a('0x39')][_0x561a('0x12')](_0x53edd0[0x0])[_0x561a('0xa5')]||_0x53edd0[0x0]);}}if(_0x2b1b38[_0x561a('0x9e')]===0x1){return _0x3c1089[_0x561a('0x4a')]();}return this['replaceAllVariables'](_0x3c1089);};AGIVertices[_0x561a('0x11')][_0x561a('0xa6')]=function(_0x5e9bc9,_0x512749){var _0x101760=this['channel']['getVariable'](_0x5e9bc9);if(_0x101760[_0x561a('0xa7')]===-0x1){return _0x101760;}logger['info'](util[_0x561a('0x26')](_0x561a('0xa8'),_0x512749,_0x101760[_0x561a('0xa5')]));return this['channel']['setVariable'](_0x512749,_0x101760[_0x561a('0xa5')]);};AGIVertices[_0x561a('0x11')][_0x561a('0x89')]=function(_0x2e10f3){return _0x2e10f3&&_0x2e10f3!=='0'&&_0x2e10f3!=='-1'&&_0x2e10f3!=='';};AGIVertices[_0x561a('0x11')]['maxRetry']=function(_0x1c51f7){this[_0x561a('0x35')][_0x561a('0x73')](this,_0x1c51f7,'-');_0x1c51f7[_0x561a('0xa9')]=_0x1c51f7[_0x561a('0xaa')];return{'code':0xc8,'result':'-'};};AGIVertices[_0x561a('0x11')][_0x561a('0xab')]=function(_0x244587){logger[_0x561a('0x2b')](util['format']('Enter\x20in\x20MRCPSynth\x20(%s)\x20block',_0x244587[_0x561a('0x37')]));if(!this['isConfigured'](_0x244587[_0x561a('0x5d')])){return this['channel'][_0x561a('0xac')](_0x561a('0xad'));}var _0x23c838='\x22'+_0x244587['text']+'\x22';if(this[_0x561a('0x89')](_0x244587[_0x561a('0x7d')])){_0x23c838+=','+_0x244587[_0x561a('0x7d')];}var _0x2c84d5=this[_0x561a('0x39')][_0x561a('0x58')](_0x561a('0xae'),_0x23c838);if(_0x2c84d5['result']===-0x1){return _0x2c84d5;}return this[_0x561a('0x39')][_0x561a('0xac')](util[_0x561a('0x26')](_0x561a('0xaf'),_0x23c838));};AGIVertices[_0x561a('0x11')][_0x561a('0xb0')]=function(_0x409c29){logger[_0x561a('0x2b')](util[_0x561a('0x26')](_0x561a('0xb1'),_0x409c29['label']));if(!this[_0x561a('0x89')](_0x409c29[_0x561a('0xb2')])){return this[_0x561a('0x39')][_0x561a('0xac')](_0x561a('0xb3'));}var _0x55990d=_0x409c29['grammar'];if(this[_0x561a('0x89')](_0x409c29['options'])){_0x55990d+=','+_0x409c29['options'];}var _0x2e89f6=this[_0x561a('0x39')][_0x561a('0x58')](_0x561a('0xb4'),_0x55990d);if(_0x2e89f6[_0x561a('0xa7')]===-0x1){return _0x2e89f6;}var _0x4541c0=this[_0x561a('0xa6')](_0x561a('0xb5'),_0x561a('0xb6'));if(_0x4541c0[_0x561a('0xa7')]===-0x1){return _0x4541c0;}var _0x18ae66=this[_0x561a('0xa6')](_0x561a('0xb7'),_0x561a('0xb8'));if(_0x18ae66[_0x561a('0xa7')]===-0x1){return _0x18ae66;}var _0x5956b6=this[_0x561a('0xa6')](_0x561a('0xb9'),'MRCP_RECOG_INSTANCE');if(_0x5956b6[_0x561a('0xa7')]===-0x1){return _0x5956b6;}return this['channel']['noop'](util['format']('Executed\x20command\x20MRCPRecog\x20%s',_0x55990d));};AGIVertices['prototype'][_0x561a('0x6')]=function(_0x55a6f2){logger[_0x561a('0x2b')](util[_0x561a('0x26')](_0x561a('0xba'),_0x55a6f2[_0x561a('0x37')]));return this[_0x561a('0x39')]['agi']([_0x55a6f2[_0x561a('0xbb')],_0x55a6f2[_0x561a('0xbc')]]);};AGIVertices[_0x561a('0x11')][_0x561a('0xbd')]=function(_0x1992ce){logger[_0x561a('0x2b')](util[_0x561a('0x26')]('Enter\x20in\x20ANSWER\x20(%s)\x20block',_0x1992ce[_0x561a('0x37')]));if(this[_0x561a('0x89')](_0x1992ce['timeout'])){logger[_0x561a('0x2b')](util[_0x561a('0x26')](_0x561a('0xbe'),_0x1992ce[_0x561a('0x66')]));var _0x393f4=this[_0x561a('0x39')]['wait'](_0x1992ce[_0x561a('0x66')]);if(_0x393f4['result']===-0x1){return _0x393f4;}}return this[_0x561a('0x39')][_0x561a('0xbd')]();};AGIVertices[_0x561a('0x11')][_0x561a('0x48')]=function(_0x2cb78d){logger[_0x561a('0x2b')](util[_0x561a('0x26')](_0x561a('0xbf'),_0x2cb78d[_0x561a('0x37')]));if(!this[_0x561a('0x89')](_0x2cb78d[_0x561a('0x47')])){return this[_0x561a('0x39')]['error'](_0x2cb78d,_0x561a('0xc0'));}_0x2cb78d[_0x561a('0xc1')]=moment();if(this[_0x561a('0x89')](_0x2cb78d[_0x561a('0xc2')])){_0x2cb78d['scheduledAt']=moment()[_0x561a('0xc3')](_0x2cb78d[_0x561a('0xc2')],_0x561a('0xc4'));}if(!this[_0x561a('0x89')](_0x2cb78d[_0x561a('0x4b')])){_0x2cb78d[_0x561a('0x4b')]=0x2;}this[_0x561a('0x41')]['sync'](this,_0x2cb78d);return this['channel'][_0x561a('0xac')](util[_0x561a('0x26')](_0x561a('0xc5'),_0x2cb78d['phone'],_0x2cb78d[_0x561a('0x47')],_0x2cb78d[_0x561a('0xc1')]));};AGIVertices[_0x561a('0x11')][_0x561a('0xc6')]=function(_0x39f349){logger[_0x561a('0x2b')](util[_0x561a('0x26')]('Enter\x20in\x20CUSTOM\x20APP\x20(%s)\x20block',_0x39f349[_0x561a('0x37')]));var _0x1da3b4=this[_0x561a('0x39')]['exec'](_0x39f349['application'],_0x39f349[_0x561a('0x7d')]);if(_0x1da3b4[_0x561a('0xa7')]===-0x1){return _0x1da3b4;}return this[_0x561a('0x39')]['noop'](util['format'](_0x561a('0xc7'),_0x39f349[_0x561a('0xc8')],_0x39f349[_0x561a('0x7d')]));};AGIVertices[_0x561a('0x11')][_0x561a('0xc9')]=function(_0x53b68e){logger['info'](util[_0x561a('0x26')]('Enter\x20in\x20LUMENVOXTTS\x20(%s)\x20block',_0x53b68e[_0x561a('0x37')]));if(!this[_0x561a('0x89')](_0x53b68e[_0x561a('0x5d')])){return this[_0x561a('0x39')][_0x561a('0xac')]('no\x20text\x20configured');}var _0x584a0c='\x22'+_0x53b68e['text']+'\x22';if(this[_0x561a('0x89')](_0x53b68e[_0x561a('0x7d')])){_0x584a0c+=','+_0x53b68e[_0x561a('0x7d')];}var _0x51e958=this[_0x561a('0x39')][_0x561a('0x58')](_0x561a('0xae'),_0x584a0c);if(_0x51e958[_0x561a('0xa7')]===-0x1){return _0x51e958;}return this[_0x561a('0x39')][_0x561a('0xac')](util[_0x561a('0x26')](_0x561a('0xaf'),_0x584a0c));};AGIVertices[_0x561a('0x11')][_0x561a('0xca')]=function(_0x38ef71){logger[_0x561a('0x2b')](util[_0x561a('0x26')](_0x561a('0xcb'),_0x38ef71[_0x561a('0x37')]));if(!this[_0x561a('0x89')](_0x38ef71['text'])){return this[_0x561a('0x39')][_0x561a('0xac')]('no\x20text\x20configured');}var _0x342ea1='\x22'+_0x38ef71[_0x561a('0x5d')]+'\x22';if(this['isConfigured'](_0x38ef71[_0x561a('0x7d')])){_0x342ea1+=','+_0x38ef71[_0x561a('0x7d')];}var _0x431999=this['channel'][_0x561a('0x58')](_0x561a('0xae'),_0x342ea1);if(_0x431999[_0x561a('0xa7')]===-0x1){return _0x431999;}return this[_0x561a('0x39')]['noop'](util['format'](_0x561a('0xaf'),_0x342ea1));};AGIVertices[_0x561a('0x11')][_0x561a('0xcc')]=function(_0x373928){logger[_0x561a('0x2b')](util[_0x561a('0x26')](_0x561a('0xcd'),_0x373928['label']));if(!this[_0x561a('0x89')](_0x373928['grammar'])){return this[_0x561a('0x39')][_0x561a('0xac')](_0x561a('0xb3'));}var _0x1217f3=_0x373928['grammar'];if(this[_0x561a('0x89')](_0x373928[_0x561a('0x7d')])){_0x1217f3+=','+_0x373928[_0x561a('0x7d')];}var _0x5496ac=this[_0x561a('0x39')]['exec'](_0x561a('0xb4'),_0x1217f3);if(_0x5496ac['result']===-0x1){return _0x5496ac;}var _0x4fa237=this[_0x561a('0xa6')]('RECOG_CONFIDENCE()',_0x561a('0xce'));if(_0x4fa237[_0x561a('0xa7')]===-0x1){return _0x4fa237;}var _0x22f276=this[_0x561a('0xa6')](_0x561a('0xb7'),_0x561a('0xcf'));if(_0x22f276[_0x561a('0xa7')]===-0x1){return _0x22f276;}var _0x3295bf=this[_0x561a('0xa6')](_0x561a('0xb9'),_0x561a('0xd0'));if(_0x3295bf['result']===-0x1){return _0x3295bf;}return this[_0x561a('0x39')][_0x561a('0xac')](util[_0x561a('0x26')](_0x561a('0xd1'),_0x1217f3));};AGIVertices[_0x561a('0x11')]['sestekasr']=function(_0x574707){logger['info'](util['format']('Enter\x20in\x20SESTEKASR\x20(%s)\x20block',_0x574707[_0x561a('0x37')]));if(!this['isConfigured'](_0x574707[_0x561a('0xb2')])){return this[_0x561a('0x39')][_0x561a('0xac')](_0x561a('0xb3'));}var _0x25fa6e=_0x574707[_0x561a('0xb2')];if(this[_0x561a('0x89')](_0x574707[_0x561a('0x7d')])){_0x25fa6e+=','+_0x574707[_0x561a('0x7d')];}var _0x956e62=this[_0x561a('0x39')][_0x561a('0x58')](_0x561a('0xb4'),_0x25fa6e);if(_0x956e62['result']===-0x1){return _0x956e62;}var _0x4add75=this['getAndSetVariable'](_0x561a('0xb5'),_0x561a('0xd2'));if(_0x4add75[_0x561a('0xa7')]===-0x1){return _0x4add75;}var _0xe6ae42=this[_0x561a('0xa6')](_0x561a('0xb7'),_0x561a('0xd3'));if(_0xe6ae42[_0x561a('0xa7')]===-0x1){return _0xe6ae42;}var _0x317b8a=this[_0x561a('0xa6')](_0x561a('0xb9'),'SESTEK_ASR_INSTANCE');if(_0x317b8a[_0x561a('0xa7')]===-0x1){return _0x317b8a;}return this['channel'][_0x561a('0xac')](util[_0x561a('0x26')](_0x561a('0xd1'),_0x25fa6e));};AGIVertices['prototype'][_0x561a('0xd4')]=function(_0x1012c){logger[_0x561a('0x2b')](util[_0x561a('0x26')]('Enter\x20in\x20DATABASE\x20(%s)\x20block',_0x1012c[_0x561a('0x37')]));if(!this[_0x561a('0x89')](_0x1012c['odbc_id'])){return this[_0x561a('0x39')]['error'](_0x1012c,_0x561a('0xd5'));}var _0x562299=this[_0x561a('0xd6')][_0x561a('0x73')](this,_0x1012c[_0x561a('0xd7')]);if(!_0x562299){return this[_0x561a('0x39')][_0x561a('0x29')](_0x1012c,_0x561a('0xd8'));}if(!this['isConfigured'](_0x1012c[_0x561a('0x2d')])){return this['channel'][_0x561a('0x29')](_0x1012c,_0x561a('0xd9'));}var _0x24724c=_0x1012c[_0x561a('0x2d')]['replace'](/(\r\n|\n|\r)/gm,'\x20');this[_0x561a('0x39')][_0x561a('0xac')](util[_0x561a('0x26')](_0x561a('0xda'),_0x24724c));var _0x6030a1=this['getQueryOdbc'][_0x561a('0x73')](this,_0x562299,_0x24724c);this[_0x561a('0x35')][_0x561a('0x73')](this,_0x1012c,_0x24724c);if(!this[_0x561a('0x89')](_0x1012c[_0x561a('0xdb')])){return this[_0x561a('0x39')][_0x561a('0xac')](_0x561a('0xdc'));}var _0x47df54=this['getVariable'][_0x561a('0x73')](this,_0x1012c[_0x561a('0xdb')]);if(!_0x47df54){return this[_0x561a('0x39')]['error'](_0x1012c,_0x561a('0xdd'));}var _0x2053e1=this;_0x6030a1[_0x561a('0xde')](function(_0x57b298,_0x1abec9){Object['keys'](_0x57b298)[_0x561a('0xde')](function(_0x331679){_0x2053e1['channel'][_0x561a('0xa2')](util[_0x561a('0x26')](_0x561a('0xdf'),_0x47df54,_0x1abec9,_0x331679),_0x57b298[_0x331679]);});});this[_0x561a('0x39')][_0x561a('0xa2')](util['format'](_0x561a('0xe0'),_0x47df54),_0x6030a1[_0x561a('0x9e')]);return this[_0x561a('0x39')]['noop'](util[_0x561a('0x26')]('variable\x20%s\x20set',_0x47df54));};AGIVertices['prototype']['dial']=function(_0x1a23e2){logger[_0x561a('0xe1')](util[_0x561a('0x26')]('Enter\x20in\x20DIAL\x20(%s)\x20block',_0x1a23e2[_0x561a('0x37')]));if(!this[_0x561a('0x89')](_0x1a23e2[_0x561a('0xe2')])){return this['channel'][_0x561a('0x29')](_0x1a23e2,'no\x20user\x20selected');}var _0x9458=this[_0x561a('0x1a')][_0x561a('0x73')](this,_0x1a23e2[_0x561a('0xe2')]);if(!_0x9458){return this[_0x561a('0x39')][_0x561a('0x29')](_0x1a23e2,'no\x20user\x20found');}var _0x197735=this[_0x561a('0x39')][_0x561a('0x58')](_0x561a('0xe3'),[util[_0x561a('0x26')](_0x561a('0xe4'),_0x9458),_0x1a23e2[_0x561a('0x66')],_0x1a23e2[_0x561a('0xe5')],_0x1a23e2[_0x561a('0x76')]]);if(_0x197735[_0x561a('0xa7')]===-0x1){return _0x197735;}return this[_0x561a('0x39')]['noop'](util[_0x561a('0x26')](_0x561a('0xe6'),_0x561a('0xe3')));};AGIVertices['prototype']['dialogflow']=function(_0x59bcd4){logger['info'](util['format'](_0x561a('0xe7'),_0x59bcd4[_0x561a('0x37')]));if(!this[_0x561a('0x89')](_0x59bcd4[_0x561a('0x7f')])){return this[_0x561a('0x39')]['noop']('no\x20key\x20configured');}if(!this[_0x561a('0x89')](_0x59bcd4[_0x561a('0x5d')])){return this[_0x561a('0x39')][_0x561a('0xac')](_0x561a('0xad'));}this[_0x561a('0x39')][_0x561a('0xe8')]=!![];this[_0x561a('0x35')](_0x59bcd4);this['createSquareMessage'](_0x59bcd4[_0x561a('0x5d')],'in','','');this[_0x561a('0x39')]['noop'](util[_0x561a('0x26')]('Trying\x20Dialogflow:\x20%s',_0x59bcd4[_0x561a('0x5d')]));var _0xab9fb1=this[_0x561a('0x7e')][_0x561a('0x73')](this,_0x59bcd4);if(_0xab9fb1){for(var _0x25d955 in _0xab9fb1){if(_0xab9fb1[_0x561a('0x98')](_0x25d955)){this[_0x561a('0x39')][_0x561a('0xa2')](util[_0x561a('0x26')](_0x561a('0xe9'),_0x25d955[_0x561a('0x6b')]()),_0xab9fb1[_0x25d955]);}}this['createSquareMessage'](_0xab9fb1[_0x561a('0xea')],_0x561a('0xeb'),_0x561a('0xec'),'');return this[_0x561a('0x39')][_0x561a('0xac')](util[_0x561a('0x26')](_0x561a('0xed'),_0xab9fb1['speech']));}return this[_0x561a('0x39')]['error'](_0x59bcd4,'Dialogflow\x20is\x20unreachable');};AGIVertices[_0x561a('0x11')][_0x561a('0xee')]=function(_0x3b556e){logger[_0x561a('0x2b')](util[_0x561a('0x26')](_0x561a('0xef'),_0x3b556e[_0x561a('0x37')]));if(!this[_0x561a('0x89')](_0x3b556e[_0x561a('0xf0')])){return this[_0x561a('0x39')]['noop'](_0x561a('0xf1'));}if(!this[_0x561a('0x89')](_0x3b556e[_0x561a('0x82')])){return this[_0x561a('0x39')][_0x561a('0xac')]('no\x20client_email\x20configured');}if(!this[_0x561a('0x89')](_0x3b556e[_0x561a('0x83')])){return this[_0x561a('0x39')][_0x561a('0xac')](_0x561a('0xf2'));}if(!this['isConfigured'](_0x3b556e[_0x561a('0xf3')])){return this[_0x561a('0x39')][_0x561a('0xac')](_0x561a('0xf4'));}if(!this[_0x561a('0x89')](_0x3b556e[_0x561a('0x5d')])){return this['channel'][_0x561a('0xac')](_0x561a('0xad'));}this['channel'][_0x561a('0xe8')]=!![];this[_0x561a('0x35')](_0x3b556e);this['createSquareMessage'](_0x3b556e[_0x561a('0x5d')],'in','','');this[_0x561a('0x39')][_0x561a('0xac')](util[_0x561a('0x26')]('Trying\x20DialogflowV2:\x20%s',_0x3b556e['text']));var _0x2b146d=this['googleDialogflowV2'][_0x561a('0x73')](this,_0x3b556e);if(_0x2b146d){for(var _0x1970cd in _0x2b146d){if(_0x2b146d[_0x561a('0x98')](_0x1970cd)){if(_0x1970cd!==_0x561a('0xf5')){this[_0x561a('0x39')]['setVariable'](util[_0x561a('0x26')](_0x561a('0xe9'),_0x1970cd[_0x561a('0x6b')]()),_0x2b146d[_0x1970cd]);}}}this[_0x561a('0x40')](_0x2b146d[_0x561a('0xea')],_0x561a('0xeb'),_0x561a('0xee'),_0x2b146d[_0x561a('0xf5')]);return this[_0x561a('0x39')][_0x561a('0xac')](util[_0x561a('0x26')](_0x561a('0xf6'),_0x2b146d['speech']));}return this['channel']['error'](_0x3b556e,'DialogflowV2\x20is\x20unreachable');};AGIVertices[_0x561a('0x11')][_0x561a('0xf7')]=function(_0x1decc5){logger['info'](util[_0x561a('0x26')](_0x561a('0xf8'),_0x1decc5[_0x561a('0x37')]));if(!this[_0x561a('0x89')](_0x1decc5[_0x561a('0xf9')])){return this[_0x561a('0x39')][_0x561a('0xac')](_0x561a('0xfa'));}if(!this['isConfigured'](_0x1decc5[_0x561a('0xfb')])){return this[_0x561a('0x39')][_0x561a('0xac')]('no\x20username\x20configured');}if(!this[_0x561a('0x89')](_0x1decc5[_0x561a('0xfc')])){return this[_0x561a('0x39')][_0x561a('0xac')](_0x561a('0xfd'));}if(!this[_0x561a('0x89')](_0x1decc5['ndassistant_url'])){return this[_0x561a('0x39')]['noop']('no\x20text\x20configured');}this['channel']['bot']=!![];this[_0x561a('0x35')](_0x1decc5);this[_0x561a('0x40')](_0x1decc5[_0x561a('0x5d')],'in','','');this[_0x561a('0x39')][_0x561a('0xac')](util['format'](_0x561a('0xfe'),_0x1decc5[_0x561a('0x5d')]));var _0x4900b5=this[_0x561a('0xff')][_0x561a('0x73')](this,_0x1decc5);if(_0x4900b5){for(var _0xe8a5af in _0x4900b5){if(_0x4900b5[_0x561a('0x98')](_0xe8a5af)){this[_0x561a('0x39')]['setVariable'](util[_0x561a('0x26')](_0x561a('0x100'),_0xe8a5af['toUpperCase']()),_0x4900b5[_0xe8a5af]);}}this[_0x561a('0x40')](_0x4900b5[_0x561a('0xea')],'out','sesteknda','');if(_0x4900b5[_0x561a('0x101')]){this[_0x561a('0x39')]['noop'](util[_0x561a('0x26')]('Sestek\x20NDA\x20%s\x20file\x20created',_0x4900b5['audiofile']));var _0x2abf3c=this[_0x561a('0x39')][_0x561a('0x102')](_0x4900b5[_0x561a('0x101')]);try{fs['unlink'](_0x4900b5[_0x561a('0x101')]+_0x561a('0x103'));}catch(_0x2a00b7){logger[_0x561a('0x29')](_0x2a00b7);}return _0x2abf3c;}else{return this[_0x561a('0x39')]['noop'](util[_0x561a('0x26')](_0x561a('0x104'),_0x4900b5[_0x561a('0xea')]));}}return this['channel'][_0x561a('0x29')](_0x1decc5,'SestekNDA\x20is\x20unreachable');};AGIVertices[_0x561a('0x11')][_0x561a('0x105')]=function(_0x5d2651){logger[_0x561a('0x2b')](util[_0x561a('0x26')](_0x561a('0x106'),_0x5d2651[_0x561a('0x37')]));return this['channel'][_0x561a('0xac')](_0x561a('0x105'));};AGIVertices['prototype'][_0x561a('0x107')]=function(_0x1db2ac){logger[_0x561a('0x2b')](util[_0x561a('0x26')](_0x561a('0x108'),_0x1db2ac[_0x561a('0x37')]));var _0x20af28='';if(_0x1db2ac[_0x561a('0x109')]){if(!this['isConfigured'](_0x1db2ac[_0x561a('0x109')])){return this[_0x561a('0x39')][_0x561a('0x29')](_0x1db2ac,_0x561a('0x10a'));}else{var _0x46c928=parseInt(_0x1db2ac[_0x561a('0x109')],0xa);if(isNaN(_0x46c928)){_0x20af28=_0x1db2ac[_0x561a('0x109')];}else{_0x20af28=this[_0x561a('0x10b')][_0x561a('0x73')](this,_0x1db2ac[_0x561a('0x109')]);if(!_0x20af28){return this[_0x561a('0x39')]['error'](_0x1db2ac,_0x561a('0x10c'));}}}}else if(_0x1db2ac[_0x561a('0x10d')]){_0x20af28=_0x1db2ac['trunk_name'];}else{return this[_0x561a('0x39')]['error'](_0x1db2ac,_0x561a('0x10a'));}var _0x50ab0e=this['channel'][_0x561a('0x58')](_0x561a('0xe3'),[util['format'](_0x561a('0x10e'),_0x20af28,_0x1db2ac['phone']),_0x1db2ac[_0x561a('0x66')],_0x1db2ac[_0x561a('0xe5')],_0x1db2ac['url']]);if(_0x50ab0e[_0x561a('0xa7')]===-0x1){return _0x50ab0e;}return this[_0x561a('0x39')][_0x561a('0xac')](util['format'](_0x561a('0xe6'),_0x561a('0xe3')));};AGIVertices['prototype'][_0x561a('0x10f')]=function(_0x29a1a2){logger['info'](util[_0x561a('0x26')](_0x561a('0x110'),_0x29a1a2['label']));return this[_0x561a('0x39')][_0x561a('0xac')]('finally');};AGIVertices[_0x561a('0x11')][_0x561a('0xd')]=function(_0x528d6b){logger[_0x561a('0x2b')](util[_0x561a('0x26')]('Enter\x20in\x20GETDIGITS\x20(%s)\x20block',_0x528d6b[_0x561a('0x37')]));if(_0x528d6b[_0x561a('0xa9')]===0x0){return this[_0x561a('0xaa')](_0x528d6b);}_0x528d6b['retry']-=0x1;if(!this[_0x561a('0x89')](_0x528d6b[_0x561a('0x111')])){return this[_0x561a('0x39')][_0x561a('0x29')](_0x528d6b,_0x561a('0x112'));}var _0x44c831=this['getSound']['sync'](this,_0x528d6b['file_id']);if(!_0x44c831){return this[_0x561a('0x39')]['error'](_0x528d6b,_0x561a('0x113'));}if(!this[_0x561a('0x89')](_0x528d6b[_0x561a('0xdb')])){return this[_0x561a('0x39')][_0x561a('0x29')]('no\x20variable\x20selected\x20for\x20the\x20result');}var _0x127520=this[_0x561a('0x39')][_0x561a('0x114')](_0x44c831,_0x528d6b[_0x561a('0x115')],_0x528d6b[_0x561a('0x116')]);var _0x322b10=_0x127520[_0x561a('0xa7')]?_0x127520[_0x561a('0xa7')][_0x561a('0x4a')]():'';logger[_0x561a('0x2b')](_0x561a('0x117'),JSON['stringify'](_0x127520));if(_0x127520[_0x561a('0xa7')]===-0x1){this[_0x561a('0x35')]['sync'](this,_0x528d6b,_0x322b10);return _0x127520;}else if(_0x127520['extra']===_0x561a('0x66')){_0x127520[_0x561a('0xa7')]=_0x322b10['length']>=parseInt(_0x528d6b[_0x561a('0x118')])?'x':'i';}else{_0x127520[_0x561a('0xa7')]=_0x322b10[_0x561a('0x9e')]>=parseInt(_0x528d6b[_0x561a('0x118')])&&_0x322b10['length']<=parseInt(_0x528d6b[_0x561a('0x116')])?'x':'i';}var _0x15cc3b=this[_0x561a('0x12')][_0x561a('0x73')](this,_0x528d6b['variable_id']);if(!_0x15cc3b){return this['channel']['error'](_0x528d6b,_0x561a('0xdd'));}this[_0x561a('0x39')]['setVariable'](_0x15cc3b,_0x322b10);if(this[_0x561a('0x89')](_0x528d6b[_0x561a('0x119')])){var _0x3fa0a4=parseInt(_0x528d6b[_0x561a('0x119')],0xa);var _0x4be70b=rs[_0x561a('0x11a')]({'charset':'*','length':_0x3fa0a4});var _0xc28b58=_0x322b10[_0x561a('0x9e')];if(_0xc28b58>0x0){if(_0xc28b58>_0x3fa0a4){this['createSquareDetailsReport'][_0x561a('0x73')](this,_0x528d6b,_0x528d6b[_0x561a('0x11b')]===_0x561a('0x11c')?_0x4be70b+_0x322b10[_0x561a('0x11d')](_0x3fa0a4):_0x322b10[_0x561a('0x11d')](0x0,_0xc28b58-_0x3fa0a4)+_0x4be70b);}else{this['createSquareDetailsReport'][_0x561a('0x73')](this,_0x528d6b,rs[_0x561a('0x11a')]({'charset':'*','length':_0xc28b58}));}}else{this[_0x561a('0x35')][_0x561a('0x73')](this,_0x528d6b,'');}}else{this['createSquareDetailsReport'][_0x561a('0x73')](this,_0x528d6b,_0x322b10);}return _0x127520;};AGIVertices[_0x561a('0x11')][_0x561a('0xe')]=function(_0x2aafac){logger['info'](util[_0x561a('0x26')]('Enter\x20in\x20GETSECRETDIGITS\x20(%s)\x20block',_0x2aafac[_0x561a('0x37')]));return this[_0x561a('0xd')](_0x2aafac);};AGIVertices[_0x561a('0x11')][_0x561a('0x11e')]=function(_0x421ea2){logger[_0x561a('0x2b')](util['format'](_0x561a('0x11f'),_0x421ea2[_0x561a('0x37')]));this[_0x561a('0x35')][_0x561a('0x73')](this,_0x421ea2,_0x421ea2[_0x561a('0x120')]);return this[_0x561a('0x39')][_0x561a('0xac')](util[_0x561a('0x26')]('GOAL\x20%s',_0x421ea2[_0x561a('0x120')]));};AGIVertices['prototype'][_0x561a('0x121')]=function(_0x32c5b6){logger[_0x561a('0x2b')](util[_0x561a('0x26')](_0x561a('0x122'),_0x32c5b6[_0x561a('0x37')]));if(!this['isConfigured'](_0x32c5b6['aws_access_key_id'])||!this[_0x561a('0x89')](_0x32c5b6['aws_secret_access_key'])){return this[_0x561a('0x39')][_0x561a('0xac')](_0x561a('0x123'));}if(!this[_0x561a('0x89')](_0x32c5b6[_0x561a('0x5d')])){return this[_0x561a('0x39')][_0x561a('0xac')](_0x561a('0xad'));}this[_0x561a('0x39')][_0x561a('0xac')](util['format']('Trying\x20aws\x20Polly\x20%s',_0x32c5b6[_0x561a('0x5d')]));var _0xc2746a=this['awsPolly'][_0x561a('0x73')](this,_0x32c5b6);if(_0xc2746a){this[_0x561a('0x39')][_0x561a('0xac')](util[_0x561a('0x26')](_0x561a('0x124'),_0xc2746a));var _0x36ff7d=this[_0x561a('0x39')][_0x561a('0x102')](_0xc2746a);try{fs[_0x561a('0x125')](_0xc2746a+'.wav');}catch(_0x23eb5e){logger['error'](_0x23eb5e);}return _0x36ff7d;}return this['channel'][_0x561a('0x29')](_0x32c5b6,_0x561a('0x126'));};AGIVertices[_0x561a('0x11')][_0x561a('0x127')]=function(_0x1f7a81){logger[_0x561a('0x2b')](util[_0x561a('0x26')](_0x561a('0x128'),_0x1f7a81[_0x561a('0x37')]));if(!this['isConfigured'](_0x1f7a81[_0x561a('0x8c')])||!this[_0x561a('0x89')](_0x1f7a81[_0x561a('0x8d')])){return this[_0x561a('0x39')][_0x561a('0xac')]('no\x20valid\x20credentials\x20configured');}if(!this[_0x561a('0x89')](_0x1f7a81['aws_bot_name'])){return this[_0x561a('0x39')][_0x561a('0xac')](_0x561a('0x129'));}if(!this[_0x561a('0x89')](_0x1f7a81['text'])){return this[_0x561a('0x39')][_0x561a('0xac')](_0x561a('0xad'));}this['channel']['bot']=!![];this[_0x561a('0x35')](_0x1f7a81);this[_0x561a('0x40')](_0x1f7a81[_0x561a('0x5d')],'in','','');this['channel'][_0x561a('0xac')](util[_0x561a('0x26')](_0x561a('0x12a'),_0x1f7a81[_0x561a('0x5d')]));var _0x1ba591=this['awsLex'][_0x561a('0x73')](this,_0x1f7a81);if(_0x1ba591){for(var _0x3dda45 in _0x1ba591){if(_0x1ba591[_0x561a('0x98')](_0x3dda45)&&_[_0x561a('0x99')](_0x1ba591[_0x3dda45])){this['channel'][_0x561a('0xa2')](util[_0x561a('0x26')](_0x561a('0x12b'),_0x3dda45[_0x561a('0x6b')]()),_0x1ba591[_0x3dda45]);}}if(_['isNil'](_0x1ba591[_0x561a('0x7b')])){return this['channel'][_0x561a('0xac')](_0x561a('0x12c'));}else{this['createSquareMessage'](_0x1ba591[_0x561a('0x7b')],'out',_0x561a('0x12d'),'');return this['channel'][_0x561a('0xac')](util[_0x561a('0x26')]('Amazon\x20Lex\x20Result\x20%s',_0x1ba591['message']));}}return this[_0x561a('0x39')][_0x561a('0x29')](_0x1f7a81,_0x561a('0x12e'));};AGIVertices[_0x561a('0x11')][_0x561a('0x12f')]=function(_0xe39733){logger[_0x561a('0x2b')](util[_0x561a('0x26')](_0x561a('0x130'),_0xe39733[_0x561a('0x37')],_0xe39733['timeout']));if(!this[_0x561a('0x89')](_0xe39733[_0x561a('0x7f')])){return this[_0x561a('0x39')][_0x561a('0xac')](_0x561a('0x131'));}var _0x3abc38=_0x561a('0x132');var _0x1160f5=util[_0x561a('0x26')](_0x561a('0x133'),FILES_PATH,rs[_0x561a('0x11a')](0x4));var _0x2c8aca=util[_0x561a('0x26')](_0x561a('0xa1'),_0x1160f5,_0x3abc38);var _0x4242f2=!![];if(_0xe39733[_0x561a('0x134')]===_0x561a('0x135')){_0x4242f2=![];}var _0x4cc759=this[_0x561a('0x39')]['recordFile'](_0x1160f5,_0x3abc38,_0xe39733[_0x561a('0x136')],_0xe39733['timeout'],undefined,_0x4242f2);if(_0x4cc759[_0x561a('0xa7')]!==-0x1){this[_0x561a('0x39')][_0x561a('0xac')](util[_0x561a('0x26')]('google\x20%s\x20file\x20created',_0x2c8aca));var _0x59ac25=this[_0x561a('0x93')][_0x561a('0x73')](this,_0xe39733,_0x2c8aca);if(_0x59ac25){for(var _0x164688 in _0x59ac25){if(_0x59ac25[_0x561a('0x98')](_0x164688)){this['channel'][_0x561a('0xa2')](util[_0x561a('0x26')](_0x561a('0x137'),_0x164688[_0x561a('0x6b')]()),_0x59ac25[_0x164688]);}}return this['channel'][_0x561a('0xac')](util[_0x561a('0x26')](_0x561a('0x138'),JSON[_0x561a('0x77')](_0x59ac25)));}}return _0x4cc759;};AGIVertices[_0x561a('0x11')][_0x561a('0x139')]=function(_0x2ebba3){logger[_0x561a('0x2b')](util[_0x561a('0x26')](_0x561a('0x13a'),_0x2ebba3[_0x561a('0x37')]));if(!this[_0x561a('0x89')](_0x2ebba3['appid'])){return this[_0x561a('0x39')][_0x561a('0xac')](_0x561a('0x13b'));}if(!this[_0x561a('0x89')](_0x2ebba3[_0x561a('0x13c')])){return this['channel'][_0x561a('0xac')](_0x561a('0x13d'));}var _0xf12178=_0x561a('0x132');var _0x1d16da=util[_0x561a('0x26')](_0x561a('0x133'),FILES_PATH,rs[_0x561a('0x11a')](0x4));var _0x1dec1c=util['format'](_0x561a('0xa1'),_0x1d16da,_0xf12178);var _0x3361a0=!![];if(_0x2ebba3[_0x561a('0x134')]==='NOBEEP'){_0x3361a0=![];}var _0x1309f4=this[_0x561a('0x39')][_0x561a('0x13e')](_0x1d16da,_0xf12178,_0x2ebba3[_0x561a('0x136')],_0x2ebba3[_0x561a('0x66')],undefined,_0x3361a0);if(_0x1309f4[_0x561a('0xa7')]!==-0x1){this[_0x561a('0x39')][_0x561a('0xac')](util['format'](_0x561a('0x13f'),_0x1dec1c));var _0x390652=this['tildeASR'][_0x561a('0x73')](this,_0x2ebba3,_0x1dec1c);if(_0x390652){for(var _0x2e8d7a in _0x390652){if(_0x390652[_0x561a('0x98')](_0x2e8d7a)){this['channel'][_0x561a('0xa2')](util['format'](_0x561a('0x140'),_0x2e8d7a[_0x561a('0x6b')]()),_0x390652[_0x2e8d7a]);}}return this[_0x561a('0x39')][_0x561a('0xac')](util['format'](_0x561a('0x141'),JSON[_0x561a('0x77')](_0x390652)));}}return _0x1309f4;};AGIVertices['prototype'][_0x561a('0x142')]=function(_0x23e18d){logger[_0x561a('0x2b')](util[_0x561a('0x26')]('Enter\x20in\x20GOTO\x20(%s)\x20block',_0x23e18d[_0x561a('0x37')]));return this[_0x561a('0x39')][_0x561a('0x143')](_0x23e18d[_0x561a('0x3c')],_0x23e18d[_0x561a('0x144')],_0x23e18d[_0x561a('0x3d')]);};AGIVertices[_0x561a('0x11')]['gotoif']=function(_0x359899){logger['info'](util['format'](_0x561a('0x145'),_0x359899[_0x561a('0x37')]));if(!this[_0x561a('0x89')](_0x359899[_0x561a('0x146')])){return this[_0x561a('0x39')][_0x561a('0x29')](_0x359899,'no\x20condition\x20configured');}try{var _0x3f9115=eval(_0x359899[_0x561a('0x146')])?'true':'false';this['channel'][_0x561a('0xac')](util[_0x561a('0x26')](_0x561a('0x147'),_0x359899[_0x561a('0x146')],_0x3f9115));return{'code':0xc8,'result':_0x3f9115};}catch(_0x34a0e0){return{'code':0xc8,'result':_0x561a('0x148')};}};AGIVertices['prototype']['gotoiftime']=function(_0xb8c0d4){logger[_0x561a('0x2b')](util[_0x561a('0x26')]('Enter\x20in\x20GOTOIFTIME\x20(%s)\x20block',_0xb8c0d4[_0x561a('0x37')]));if(!this[_0x561a('0x89')](_0xb8c0d4[_0x561a('0x149')])){return this[_0x561a('0x39')][_0x561a('0x29')](_0xb8c0d4,'no\x20interval\x20configured');}var _0xa42fb3=this['getIntervals'][_0x561a('0x73')](this,_0xb8c0d4[_0x561a('0x149')]);if(!_0xa42fb3){return this[_0x561a('0x39')][_0x561a('0x29')](_0xb8c0d4,'no\x20intervals\x20found');}for(var _0xef922f=0x0;_0xef922f<_0xa42fb3[_0x561a('0x9e')];_0xef922f+=0x1){var _0x377026=this[_0x561a('0x39')][_0x561a('0x12')](util[_0x561a('0x26')](_0x561a('0x14a'),_0xa42fb3[_0xef922f]));if(_0x377026[_0x561a('0xa7')]===-0x1){return _0x377026;}logger[_0x561a('0x2b')](util[_0x561a('0x26')]('IFTIME\x20%s\x20%s',_0xa42fb3[_0xef922f],_0x377026['extra']));if(_0x377026['extra']===_0x561a('0x14b')){logger[_0x561a('0x2b')](util[_0x561a('0x26')](_0x561a('0x14c'),_0xa42fb3[_0xef922f],_0x561a('0x14b')));this[_0x561a('0x39')][_0x561a('0xac')](util[_0x561a('0x26')](_0x561a('0x14c'),_0xa42fb3[_0xef922f],_0x561a('0x14b')));return{'code':0xc8,'result':_0x561a('0x14b')};}else{logger[_0x561a('0x2b')](util[_0x561a('0x26')](_0x561a('0x14c'),_0xa42fb3[_0xef922f],'false'));this[_0x561a('0x39')]['noop'](util[_0x561a('0x26')](_0x561a('0x14c'),_0xa42fb3[_0xef922f],'false'));}}return{'code':0xc8,'result':_0x561a('0x148')};};AGIVertices[_0x561a('0x11')]['hangup']=function(_0x51a9f5){logger[_0x561a('0x2b')](util[_0x561a('0x26')](_0x561a('0x14d'),_0x51a9f5[_0x561a('0x37')]));return this[_0x561a('0x39')][_0x561a('0x14e')]();};AGIVertices[_0x561a('0x11')][_0x561a('0x14f')]=function(_0x5c405a){logger[_0x561a('0x2b')](util[_0x561a('0x26')](_0x561a('0x150'),_0x5c405a[_0x561a('0x37')]));if(!this[_0x561a('0x89')](_0x5c405a['key'])){return this[_0x561a('0x39')]['noop'](_0x561a('0x131'));}var _0x1ce434=_0x561a('0x132');var _0x207af5=util[_0x561a('0x26')]('%s/recordings/%s',FILES_PATH,rs[_0x561a('0x11a')](0x4));var _0x10e123=util[_0x561a('0x26')](_0x561a('0xa1'),_0x207af5,_0x1ce434);var _0x25457d=!![];if(_0x5c405a[_0x561a('0x134')]===_0x561a('0x135')){_0x25457d=![];}var _0x10c02a=this[_0x561a('0x39')][_0x561a('0x13e')](_0x207af5,_0x1ce434,_0x5c405a[_0x561a('0x136')],_0x5c405a[_0x561a('0x66')],undefined,_0x25457d);if(_0x10c02a[_0x561a('0xa7')]!==-0x1){this[_0x561a('0x39')][_0x561a('0xac')](util[_0x561a('0x26')](_0x561a('0x151'),_0x10e123));var _0x4cc34b=this[_0x561a('0x87')]['sync'](this,_0x5c405a,_0x10e123);if(_0x4cc34b){for(var _0x2f8816 in _0x4cc34b){if(_0x4cc34b[_0x561a('0x98')](_0x2f8816)){this[_0x561a('0x39')][_0x561a('0xa2')](util['format']('ISPEECH_ASR_%s',_0x2f8816[_0x561a('0x6b')]()),_0x4cc34b[_0x2f8816]);}}return this[_0x561a('0x39')][_0x561a('0xac')](util[_0x561a('0x26')](_0x561a('0x152'),JSON[_0x561a('0x77')](_0x4cc34b)));}}return _0x10c02a;};AGIVertices['prototype'][_0x561a('0x153')]=function(_0x10b1fe){logger[_0x561a('0x2b')](util[_0x561a('0x26')](_0x561a('0x154'),_0x10b1fe['label']));if(!this[_0x561a('0x89')](_0x10b1fe[_0x561a('0x7f')])){return this[_0x561a('0x39')]['noop'](_0x561a('0x131'));}if(!this['isConfigured'](_0x10b1fe[_0x561a('0x5d')])){return this[_0x561a('0x39')][_0x561a('0xac')](_0x561a('0xad'));}this[_0x561a('0x39')]['noop'](util['format'](_0x561a('0x155'),_0x10b1fe['text']));var _0x13c565=this['ispeechTTS'][_0x561a('0x73')](this,_0x10b1fe);if(_0x13c565){this[_0x561a('0x39')][_0x561a('0xac')](util[_0x561a('0x26')](_0x561a('0x151'),_0x13c565));var _0xc4137d=this[_0x561a('0x39')]['streamFile'](_0x13c565,_0x10b1fe['intKey']);try{fs[_0x561a('0x125')](_0x13c565+_0x561a('0x103'));}catch(_0x185a54){logger['error'](_0x185a54);}return _0xc4137d;}return this['channel'][_0x561a('0x29')](_0x10b1fe,_0x561a('0x156'));};AGIVertices['prototype'][_0x561a('0x157')]=function(_0x1cd60e){logger[_0x561a('0x2b')](util[_0x561a('0x26')](_0x561a('0x158'),_0x1cd60e[_0x561a('0x37')]));if(!this[_0x561a('0x89')](_0x1cd60e[_0x561a('0x159')])){return this['channel']['error'](_0x1cd60e,'no\x20find\x20by\x20configured');}logger[_0x561a('0x2b')](util[_0x561a('0x26')](_0x561a('0x15a'),this['channel'][_0x561a('0x50')],_0x1cd60e[_0x561a('0x159')]));var _0x136f5f=this['agentLogin'][_0x561a('0x73')](this,_0x1cd60e[_0x561a('0x159')]);if(_0x136f5f){logger[_0x561a('0x2b')](util[_0x561a('0x26')](_0x561a('0x15b'),this[_0x561a('0x39')][_0x561a('0x50')],_0x1cd60e['findBy']));this[_0x561a('0x39')][_0x561a('0xac')](util['format'](_0x561a('0x15b'),this[_0x561a('0x39')][_0x561a('0x50')],_0x1cd60e[_0x561a('0x159')]));return{'code':0xc8,'result':_0x561a('0x15c')};}else{logger['info'](util[_0x561a('0x26')](_0x561a('0x15d'),this[_0x561a('0x39')][_0x561a('0x50')],_0x1cd60e[_0x561a('0x159')]));this['channel']['noop'](util[_0x561a('0x26')](_0x561a('0x15d'),this[_0x561a('0x39')][_0x561a('0x50')],_0x1cd60e[_0x561a('0x159')]));return{'code':0xc8,'result':_0x561a('0x15e')};}};AGIVertices[_0x561a('0x11')]['logout']=function(_0x856958){logger[_0x561a('0x2b')](util['format'](_0x561a('0x15f'),_0x856958['label']));if(!this[_0x561a('0x89')](_0x856958['findBy'])){return this[_0x561a('0x39')][_0x561a('0x29')](_0x856958,_0x561a('0x160'));}logger['info'](util['format'](_0x561a('0x15a'),this[_0x561a('0x39')][_0x561a('0x50')],_0x856958['findBy']));var _0xc134c9=this['agentLogout'][_0x561a('0x73')](this,_0x856958['findBy']);if(_0xc134c9){logger[_0x561a('0x2b')](util[_0x561a('0x26')](_0x561a('0x15b'),this[_0x561a('0x39')][_0x561a('0x50')],_0x856958[_0x561a('0x159')]));this[_0x561a('0x39')][_0x561a('0xac')](util[_0x561a('0x26')](_0x561a('0x15b'),this[_0x561a('0x39')]['callerid'],_0x856958[_0x561a('0x159')]));return{'code':0xc8,'result':_0x561a('0x15c')};}else{logger[_0x561a('0x2b')](util['format'](_0x561a('0x15d'),this[_0x561a('0x39')][_0x561a('0x50')],_0x856958['findBy']));this[_0x561a('0x39')]['noop'](util[_0x561a('0x26')]('AGENT\x20%s\x20NOT\x20FOUND\x20BY',this[_0x561a('0x39')][_0x561a('0x50')],_0x856958[_0x561a('0x159')]));return{'code':0xc8,'result':'failure'};}};AGIVertices[_0x561a('0x11')][_0x561a('0x161')]=function(_0x239be4){logger['info'](util[_0x561a('0x26')]('Enter\x20in\x20MATH\x20(%s)\x20block',_0x239be4[_0x561a('0x37')]));if(!this[_0x561a('0x89')](_0x239be4['operation'])){return this[_0x561a('0x39')]['error'](_0x239be4,_0x561a('0x162'));}this['channel']['noop'](util[_0x561a('0x26')](_0x561a('0x163'),_0x239be4['operation']));var _0x257536=eval(_0x239be4[_0x561a('0x164')]);if(!this[_0x561a('0x89')](_0x239be4['variable_id'])){return this[_0x561a('0x39')]['noop']('no\x20variable\x20selected\x20for\x20the\x20result');}var _0x7dd2ff=this['getVariable'][_0x561a('0x73')](this,_0x239be4[_0x561a('0xdb')]);if(!_0x7dd2ff){return this[_0x561a('0x39')]['error'](_0x239be4,_0x561a('0xdd'));}if(_[_0x561a('0x9d')](_0x257536)){var _0x322f64=this;_0x257536[_0x561a('0xde')](function(_0x5d2032,_0x3faaf1){_0x322f64['channel'][_0x561a('0xa2')](util[_0x561a('0x26')](_0x561a('0x165'),_0x7dd2ff,_0x3faaf1),_0x5d2032);});return this['channel'][_0x561a('0xac')](util[_0x561a('0x26')](_0x561a('0x166'),_0x7dd2ff));}else{return this[_0x561a('0x39')][_0x561a('0xa2')](_0x7dd2ff,_0x257536);}};AGIVertices[_0x561a('0x11')][_0x561a('0xc')]=function(_0x16b827){logger[_0x561a('0x2b')](util[_0x561a('0x26')](_0x561a('0x167'),_0x16b827[_0x561a('0x37')]));if(_0x16b827['retry']===0x0){return this[_0x561a('0xaa')](_0x16b827);}_0x16b827[_0x561a('0xa9')]-=0x1;if(!this[_0x561a('0x89')](_0x16b827[_0x561a('0x111')])){return this[_0x561a('0x39')]['error'](_0x16b827,_0x561a('0x112'));}var _0x292595=this[_0x561a('0x1c')][_0x561a('0x73')](this,_0x16b827[_0x561a('0x111')]);if(!_0x292595){return this['channel']['error'](_0x16b827,_0x561a('0x113'));}var _0x21c04e=this['channel'][_0x561a('0x114')](_0x292595,_0x16b827[_0x561a('0x115')],_0x16b827[_0x561a('0x168')]);var _0x30e862=_0x21c04e[_0x561a('0xa7')];if(_0x21c04e[_0x561a('0xa7')]===-0x1){this[_0x561a('0x35')]['sync'](this,_0x16b827,'-1');return _0x21c04e;}else if(_0x21c04e[_0x561a('0xa5')]===_0x561a('0x66')){_0x21c04e[_0x561a('0xa7')]=_0x21c04e[_0x561a('0xa7')][_0x561a('0x9e')]>0x0?_0x21c04e['result']:'t';}else if(_['isEmpty'](_0x21c04e[_0x561a('0xa7')])){_0x21c04e[_0x561a('0xa7')]='#';_0x30e862='#';}if(!this[_0x561a('0x89')](_0x16b827[_0x561a('0xdb')])){this[_0x561a('0x39')][_0x561a('0xac')]('no\x20variable\x20selected\x20for\x20the\x20result');}else{var _0x3fa6d9=this[_0x561a('0x12')][_0x561a('0x73')](this,_0x16b827[_0x561a('0xdb')]);if(!_0x3fa6d9){return this['channel'][_0x561a('0x29')](_0x16b827,_0x561a('0xdd'));}this[_0x561a('0x39')][_0x561a('0xa2')](_0x3fa6d9,_0x30e862);}this[_0x561a('0x35')][_0x561a('0x73')](this,_0x16b827,_0x30e862);return _0x21c04e;};AGIVertices[_0x561a('0x11')]['noop']=function(_0x45d9d2){logger[_0x561a('0x2b')](util[_0x561a('0x26')](_0x561a('0x169'),_0x45d9d2[_0x561a('0x37')]));return this[_0x561a('0x39')][_0x561a('0xac')](_0x45d9d2[_0x561a('0x16a')]||_0x45d9d2['label']);};AGIVertices['prototype'][_0x561a('0x16b')]=function(_0x37ab0f){logger['info'](util[_0x561a('0x26')]('Enter\x20in\x20PAUSE\x20(%s)\x20block',_0x37ab0f[_0x561a('0x37')]));if(!this[_0x561a('0x89')](_0x37ab0f['findBy'])){return this[_0x561a('0x39')]['error'](_0x37ab0f,_0x561a('0x160'));}logger[_0x561a('0x2b')](util[_0x561a('0x26')]('FIND\x20AGENT\x20%s\x20BY\x20%s',this[_0x561a('0x39')][_0x561a('0x50')],_0x37ab0f[_0x561a('0x159')]));var _0x140457=this[_0x561a('0x4c')][_0x561a('0x73')](this,_0x37ab0f[_0x561a('0x16c')]);var _0x172335=this['agentPause']['sync'](this,_0x37ab0f['findBy'],_0x140457);if(_0x172335){logger[_0x561a('0x2b')](util[_0x561a('0x26')]('AGENT\x20%s\x20FOUND\x20BY',this[_0x561a('0x39')][_0x561a('0x50')],_0x37ab0f[_0x561a('0x159')]));this[_0x561a('0x39')][_0x561a('0xac')](util[_0x561a('0x26')](_0x561a('0x15b'),this[_0x561a('0x39')]['callerid'],_0x37ab0f['findBy']));return{'code':0xc8,'result':_0x561a('0x15c')};}else{logger[_0x561a('0x2b')](util[_0x561a('0x26')](_0x561a('0x15d'),this['channel'][_0x561a('0x50')],_0x37ab0f['findBy']));this[_0x561a('0x39')][_0x561a('0xac')](util[_0x561a('0x26')](_0x561a('0x15b'),this[_0x561a('0x39')]['callerid'],_0x37ab0f[_0x561a('0x159')]));return{'code':0xc8,'result':_0x561a('0x15e')};}};AGIVertices[_0x561a('0x11')]['playback']=function(_0x2670b6){logger[_0x561a('0x2b')](util[_0x561a('0x26')](_0x561a('0x16d'),_0x2670b6['label']));if(!this['isConfigured'](_0x2670b6[_0x561a('0x111')])){return this['channel'][_0x561a('0x29')](_0x2670b6,_0x561a('0x112'));}var _0x4b3e35=this[_0x561a('0x1c')][_0x561a('0x73')](this,_0x2670b6['file_id']);if(!_0x4b3e35){return this['channel'][_0x561a('0x29')](_0x2670b6,_0x561a('0x113'));}var _0xa72dba=this[_0x561a('0x39')][_0x561a('0x58')](_0x561a('0x16e'),[_0x4b3e35,_0x2670b6[_0x561a('0xe5')]]);if(_0xa72dba[_0x561a('0xa7')]===-0x1){return _0xa72dba;}return this[_0x561a('0x39')][_0x561a('0xac')](util[_0x561a('0x26')](_0x561a('0xc7'),_0x561a('0x16e'),_0x4b3e35));};AGIVertices[_0x561a('0x11')][_0x561a('0x16f')]=function(_0x477664){logger['info'](util[_0x561a('0x26')]('Enter\x20in\x20QUEUE\x20(%s)\x20block',_0x477664[_0x561a('0x37')]));if(!this[_0x561a('0x89')](_0x477664[_0x561a('0x170')])){return this[_0x561a('0x39')][_0x561a('0x29')](_0x477664,_0x561a('0x171'));}var _0xf915c3='';var _0x41c280=parseInt(_0x477664[_0x561a('0x170')],0xa);if(isNaN(_0x41c280)){_0xf915c3=_0x477664[_0x561a('0x170')];}else{_0xf915c3=this[_0x561a('0x172')]['sync'](this,_0x477664[_0x561a('0x170')]);if(!_0xf915c3){return this[_0x561a('0x39')]['error'](_0x477664,'no\x20queue\x20found');}}var _0x155c72='';if(this['isConfigured'](_0x477664['file_id'])){var _0x3cec7a=this[_0x561a('0x1c')]['sync'](this,_0x477664[_0x561a('0x111')]);if(_0x3cec7a){_0x155c72=_0x3cec7a;}}this[_0x561a('0x35')][_0x561a('0x73')](this,_0x477664,_0xf915c3);if(_0x477664[_0x561a('0xe5')][_0x561a('0x173')]('x')<0x0){_0x477664[_0x561a('0xe5')]+='x';}if(_0x477664['opts']['indexOf']('X')<0x0){_0x477664[_0x561a('0xe5')]+='X';}this[_0x561a('0x39')][_0x561a('0xa2')](_0x561a('0x174'),_0xf915c3?_0xf915c3[_0x561a('0x175')]():'');var _0x4226f4=this[_0x561a('0x39')][_0x561a('0x58')](_0x561a('0x176'),[_0xf915c3,_0x477664[_0x561a('0xe5')],_0x477664[_0x561a('0x76')],_0x155c72,_0x477664[_0x561a('0x66')],_0x477664['agi'],_0x477664[_0x561a('0x177')],_0x477664[_0x561a('0x178')],'',_0x477664[_0x561a('0x179')]]);if(_0x4226f4[_0x561a('0xa7')]===-0x1){return _0x4226f4;}return this['channel'][_0x561a('0xac')](util['format'](_0x561a('0xc7'),'QUEUE',_0xf915c3));};AGIVertices[_0x561a('0x11')][_0x561a('0x17a')]=function(_0x4aa9f3){logger[_0x561a('0x2b')](util['format'](_0x561a('0x17b'),_0x4aa9f3['label']));var _0x5323ff=_0x4aa9f3[_0x561a('0x17c')]||_0x561a('0x132');var _0x82e124=util[_0x561a('0x26')](_0x561a('0x17d'),this[_0x561a('0x39')][_0x561a('0x36')],rs[_0x561a('0x11a')](0x5));var _0x11999e=util['format'](_0x561a('0x17e'),FILES_PATH,_0x82e124,_0x5323ff);var _0x2904c2=util['format'](_0x561a('0x133'),FILES_PATH,_0x82e124);this[_0x561a('0x3a')][_0x561a('0x73')](this,_0x4aa9f3,_0x82e124,_0x11999e);this['channel']['setVariable']('RECORDING_SAVENAME',_0x82e124);logger[_0x561a('0x2b')](_0x561a('0x17f'),_0x2904c2,_0x5323ff,_0x4aa9f3['escape_digits'],_0x4aa9f3[_0x561a('0x66')]);return this[_0x561a('0x39')][_0x561a('0x13e')](_0x2904c2,_0x5323ff,_0x4aa9f3['escape_digits'],_0x4aa9f3[_0x561a('0x66')],undefined,!![]);};AGIVertices[_0x561a('0x11')][_0x561a('0x180')]=function(_0x50e3f5){logger['info'](util[_0x561a('0x26')]('Enter\x20in\x20RESTAPI\x20(%s)\x20block',_0x50e3f5[_0x561a('0x37')]));if(!this[_0x561a('0x89')](_0x50e3f5[_0x561a('0x76')])){return this[_0x561a('0x39')][_0x561a('0xac')](_0x561a('0x181'));}var _0x425d96=this[_0x561a('0x182')][_0x561a('0x73')](this,_0x50e3f5);logger[_0x561a('0x2b')](util[_0x561a('0x26')](_0x561a('0x183'),util[_0x561a('0x184')](_0x425d96,{'showHidden':![],'depth':null})));if(!this[_0x561a('0x89')](_0x50e3f5[_0x561a('0xdb')])){return this['channel'][_0x561a('0xac')]('no\x20variable\x20selected\x20for\x20the\x20response');}var _0xa88469=this[_0x561a('0x12')][_0x561a('0x73')](this,_0x50e3f5[_0x561a('0xdb')]);if(!_0xa88469){return this[_0x561a('0x39')][_0x561a('0x29')](_0x50e3f5,_0x561a('0xdd'));}this[_0x561a('0x39')][_0x561a('0xa2')](util[_0x561a('0x26')]('%s_STATUS_CODE',_0xa88469),_0x425d96[_0x561a('0x79')]?_0x425d96[_0x561a('0x79')]:'200');this[_0x561a('0x39')][_0x561a('0xa2')](util[_0x561a('0x26')](_0x561a('0x185'),_0xa88469),_0x425d96[_0x561a('0x7a')]?_0x425d96[_0x561a('0x7a')]:'OK');if(_0x425d96[_0x561a('0x6c')]){try{this[_0x561a('0xa0')](_0x425d96[_0x561a('0x6c')],_0xa88469);}catch(_0x63f06f){logger[_0x561a('0x29')](util['format']('Unable\x20to\x20set\x20result\x20in\x20variable\x20%s',_0xa88469));}}return this[_0x561a('0x39')]['noop'](util[_0x561a('0x26')]('variable\x20%s\x20set',_0xa88469));};AGIVertices[_0x561a('0x11')]['saydigits']=function(_0x1b91a6){logger[_0x561a('0x2b')](util[_0x561a('0x26')]('Enter\x20in\x20SAYDIGITS\x20(%s)\x20block',_0x1b91a6[_0x561a('0x37')]));return this['channel'][_0x561a('0x186')](_0x1b91a6['digits']['replace'](/\s+/g,''),_0x1b91a6[_0x561a('0x187')]);};AGIVertices[_0x561a('0x11')][_0x561a('0x188')]=function(_0x191ef5){logger[_0x561a('0x2b')](util[_0x561a('0x26')](_0x561a('0x189'),_0x191ef5[_0x561a('0x37')]));return this[_0x561a('0x39')][_0x561a('0x18a')](_0x191ef5['number'][_0x561a('0x5a')](/\s+/g,''),_0x191ef5['escape_digits']);};AGIVertices[_0x561a('0x11')][_0x561a('0x18b')]=function(_0x2768bf){logger[_0x561a('0x2b')](util[_0x561a('0x26')]('Enter\x20in\x20SAYPHONETIC\x20(%s)\x20block',_0x2768bf[_0x561a('0x37')]));return this[_0x561a('0x39')][_0x561a('0x18c')](_0x2768bf[_0x561a('0x5d')],_0x2768bf['escape_digits']);};AGIVertices['prototype'][_0x561a('0x18d')]=function(_0x131209){logger[_0x561a('0x2b')](util['format'](_0x561a('0x18e'),_0x131209['label']));if(!this[_0x561a('0x89')](_0x131209[_0x561a('0x18f')])){return this[_0x561a('0x39')][_0x561a('0xac')]('no\x20mail\x20account\x20configured');}var _0x3286ab=this[_0x561a('0x20')][_0x561a('0x73')](this,_0x131209['account_id']);if(!_0x3286ab||!_0x3286ab[_0x561a('0x190')]){return this[_0x561a('0x39')][_0x561a('0x29')](_0x131209,_0x561a('0x191'));}var _0x2eafda={'from':util['format'](_0x561a('0x192'),_0x3286ab[_0x561a('0x15')],_0x3286ab[_0x561a('0x193')]||_0x3286ab[_0x561a('0x190')][_0x561a('0x194')]),'to':_0x131209['to']||'','cc':_0x131209['cc']||'','bcc':_0x131209[_0x561a('0x195')]||'','subject':_0x131209[_0x561a('0x196')],'html':_0x131209[_0x561a('0x5d')],'text':_0x131209[_0x561a('0x5d')]};if(this[_0x561a('0x89')](_0x131209[_0x561a('0x197')])){}logger[_0x561a('0xe1')]('sendMail\x20message',JSON[_0x561a('0x77')](_0x2eafda));this[_0x561a('0x35')][_0x561a('0x73')](this,_0x131209,_0x131209[_0x561a('0x18f')]);this[_0x561a('0x39')][_0x561a('0xac')](util[_0x561a('0x26')](_0x561a('0x198'),_0x3286ab[_0x561a('0x15')]));this['sendMailMessage'][_0x561a('0x73')](this,_0x3286ab['smtpOptions'],_0x2eafda);return this['channel'][_0x561a('0xac')](_0x561a('0x199'));};AGIVertices[_0x561a('0x11')][_0x561a('0x19a')]=function(_0x19b5ad){logger[_0x561a('0x2b')](util[_0x561a('0x26')]('Enter\x20in\x20SENDFAX\x20(%s)\x20block',_0x19b5ad[_0x561a('0x37')]));return this['channel'][_0x561a('0xac')](_0x561a('0x19b'));};AGIVertices[_0x561a('0x11')]['sendSMS']=function(_0x393674){logger[_0x561a('0x2b')](util[_0x561a('0x26')]('Enter\x20in\x20SENDSMS\x20(%s)\x20block',_0x393674[_0x561a('0x37')]));if(!this['isConfigured'](_0x393674[_0x561a('0x19c')])){return this[_0x561a('0x39')][_0x561a('0xac')](_0x561a('0x19d'));}var _0x2ea0db=this[_0x561a('0x32')][_0x561a('0x73')](this,_0x393674[_0x561a('0x19c')]);if(!_0x2ea0db){return this[_0x561a('0x39')]['error'](_0x393674,_0x561a('0x19e'));}var _0x2869d8={'body':_0x393674[_0x561a('0x19f')],'phone':_0x393674['to']||'','SmsAccountId':_0x2ea0db['id']};logger[_0x561a('0xe1')](_0x561a('0x1a0'),JSON[_0x561a('0x77')](_0x2869d8));this[_0x561a('0x35')][_0x561a('0x73')](this,_0x393674,_0x393674[_0x561a('0x19c')]);this[_0x561a('0x39')][_0x561a('0xac')](util[_0x561a('0x26')](_0x561a('0x1a1'),_0x2ea0db['name']));this['createSmsMessage'][_0x561a('0x73')](this,_0x2869d8);return this['channel'][_0x561a('0xac')](_0x561a('0x1a2'));};AGIVertices[_0x561a('0x11')][_0x561a('0x1a3')]=function(_0x53a503){logger[_0x561a('0x2b')](util[_0x561a('0x26')](_0x561a('0x1a4'),_0x53a503[_0x561a('0x37')]));if(!this[_0x561a('0x89')](_0x53a503[_0x561a('0xdb')])){return this[_0x561a('0x39')][_0x561a('0x29')](_0x53a503,_0x561a('0x1a5'));}var _0x15c6b1=this[_0x561a('0x12')][_0x561a('0x73')](this,_0x53a503['variable_id']);if(!_0x15c6b1){return this[_0x561a('0x39')][_0x561a('0x29')](_0x53a503,_0x561a('0xdd'));}return this['channel'][_0x561a('0xa2')](_0x15c6b1,_0x53a503[_0x561a('0x1a6')]);};AGIVertices[_0x561a('0x11')][_0x561a('0x1a7')]=function(_0xdb8e3c){logger[_0x561a('0x2b')](util[_0x561a('0x26')](_0x561a('0x1a8'),_0xdb8e3c[_0x561a('0x37')]));this[_0x561a('0x39')][_0x561a('0xac')]('START\x20CALLY\x20SQUARE');if(_0xdb8e3c[_0x561a('0xbd')]===_0x561a('0x1a9')){this[_0x561a('0x39')]['noop'](_0x561a('0x1aa'));return this[_0x561a('0x39')]['answer']();}return this['channel'][_0x561a('0xac')](_0x561a('0x1ab'));};AGIVertices[_0x561a('0x11')][_0x561a('0x1ac')]=function(_0x2653fb){logger[_0x561a('0x2b')](util['format'](_0x561a('0x1ad'),_0x2653fb[_0x561a('0x37')]));if(!this[_0x561a('0x89')](_0x2653fb['project_id'])){return this[_0x561a('0x39')][_0x561a('0x29')](_0x2653fb,'no\x20subproject\x20selected');}var _0x13e0d4=this[_0x561a('0x18')]['sync'](this,_0x2653fb[_0x561a('0x1ae')]);if(!this[_0x561a('0x89')](_0x13e0d4)){return this[_0x561a('0x39')][_0x561a('0x29')](_0x2653fb,util[_0x561a('0x26')]('no\x20subproject\x20found\x20with\x20id\x20%d',_0x2653fb[_0x561a('0x1ae')]));}if(_0x13e0d4===this['channel'][_0x561a('0x3f')]){return this[_0x561a('0x39')][_0x561a('0x29')](_0x2653fb,'project\x20in\x20subproject\x20must\x20be\x20different\x20from\x20the\x20called\x20project');}this[_0x561a('0x35')]['sync'](this,_0x2653fb,_0x13e0d4);var _0x24e078=this[_0x561a('0x39')][_0x561a('0x58')]('AGI',util[_0x561a('0x26')]('agi://%s/square,\x22%s\x22,\x22%s\x22',config[_0x561a('0x6')][_0x561a('0x1af')]||_0x561a('0x1b0'),_0x13e0d4,this[_0x561a('0x39')][_0x561a('0x3f')]));if(_0x24e078['result']===-0x1){return _0x24e078;}return this[_0x561a('0x39')][_0x561a('0xac')](util[_0x561a('0x26')](_0x561a('0xc7'),'AGI',_0x13e0d4));};AGIVertices[_0x561a('0x11')]['system']=function(_0xef83ad){logger['info'](util[_0x561a('0x26')](_0x561a('0x1b1'),_0xef83ad['label']));var _0x2486b0=this[_0x561a('0x57')][_0x561a('0x73')](this,_0xef83ad[_0x561a('0xbb')]);this['createSquareDetailsReport'][_0x561a('0x73')](this,_0xef83ad,_0xef83ad[_0x561a('0xbb')]);if(this[_0x561a('0x89')](_0xef83ad[_0x561a('0xdb')])){var _0x12dd49=this[_0x561a('0x12')]['sync'](this,_0xef83ad[_0x561a('0xdb')]);if(_0x12dd49){this[_0x561a('0x39')][_0x561a('0xa2')](_0x12dd49,_0x2486b0);return this['channel'][_0x561a('0xac')](util['format'](_0x561a('0x1b2'),_0xef83ad['command'],_0x12dd49));}}return this[_0x561a('0x39')][_0x561a('0xac')](util[_0x561a('0x26')](_0x561a('0x1b3'),_0xef83ad[_0x561a('0xbb')]));};AGIVertices[_0x561a('0x11')][_0x561a('0x1b4')]=function(_0x2ec8f0){logger['info'](util['format'](_0x561a('0x1b5'),_0x2ec8f0[_0x561a('0x37')]));_0x2ec8f0[_0x561a('0x5d')]=_0x2ec8f0['text'][_0x561a('0x5a')](/(\r\n|\n|\r)/gm,'\x20');if(!this['isConfigured'](_0x2ec8f0[_0x561a('0x1b6')])){return this['channel'][_0x561a('0xac')](_0x561a('0x1b7'));}if(!this[_0x561a('0x89')](_0x2ec8f0[_0x561a('0x5d')])){return this[_0x561a('0x39')][_0x561a('0xac')](_0x561a('0xad'));}this[_0x561a('0x39')][_0x561a('0xac')](util['format']('Trying\x20Google\x20Cloud\x20TTS\x20%s',_0x2ec8f0[_0x561a('0x5d')]));var _0xc1d490=this[_0x561a('0x5b')]['sync'](this,_0x2ec8f0);if(_0xc1d490){this[_0x561a('0x39')][_0x561a('0xac')](util['format'](_0x561a('0x1b8'),_0xc1d490));var _0x4c5c51=this[_0x561a('0x39')][_0x561a('0x102')](_0xc1d490);try{fs[_0x561a('0x125')](_0xc1d490+_0x561a('0x103'));}catch(_0x84d2e5){logger[_0x561a('0x29')](_0x84d2e5);}return _0x4c5c51;}return this[_0x561a('0x39')][_0x561a('0x29')](_0x2ec8f0,_0x561a('0x1b9'));};AGIVertices[_0x561a('0x11')][_0x561a('0x1ba')]=function(_0x1ebca8){logger[_0x561a('0x2b')](util[_0x561a('0x26')]('Enter\x20in\x20GOOGLETTS\x20(%s)\x20block',_0x1ebca8[_0x561a('0x37')]));_0x1ebca8[_0x561a('0x5d')]=_0x1ebca8[_0x561a('0x5d')][_0x561a('0x5a')](/(\r\n|\n|\r)/gm,'\x20');if(!this[_0x561a('0x89')](_0x1ebca8[_0x561a('0x5d')])){return this[_0x561a('0x39')][_0x561a('0xac')](_0x561a('0xad'));}this['channel']['noop'](util['format']('Trying\x20Google\x20TTS\x20%s',_0x1ebca8[_0x561a('0x5d')]));var _0x1d9f46=this[_0x561a('0x63')][_0x561a('0x73')](this,_0x1ebca8);if(_0x1d9f46){this['channel'][_0x561a('0xac')](util['format'](_0x561a('0x1bb'),_0x1d9f46));var _0x3e90b8=this[_0x561a('0x39')][_0x561a('0x102')](_0x1d9f46);try{fs[_0x561a('0x125')](_0x1d9f46+_0x561a('0x103'));}catch(_0x2ea3e8){logger[_0x561a('0x29')](_0x2ea3e8);}return _0x3e90b8;}return this[_0x561a('0x39')][_0x561a('0x29')](_0x1ebca8,'Google\x20TTS\x20is\x20unreachable');};AGIVertices[_0x561a('0x11')][_0x561a('0x1bc')]=function(_0x32a242){logger['info'](util[_0x561a('0x26')](_0x561a('0x1bd'),_0x32a242[_0x561a('0x37')]));if(!this['isConfigured'](_0x32a242[_0x561a('0x159')])){return this[_0x561a('0x39')][_0x561a('0x29')](_0x32a242,'no\x20find\x20by\x20configured');}logger['info'](util[_0x561a('0x26')](_0x561a('0x15a'),this['channel'][_0x561a('0x50')],_0x32a242['findBy']));var _0x402bc7=this[_0x561a('0x51')][_0x561a('0x73')](this,_0x32a242[_0x561a('0x159')]);if(_0x402bc7){logger[_0x561a('0x2b')](util[_0x561a('0x26')]('AGENT\x20%s\x20FOUND\x20BY',this['channel'][_0x561a('0x50')],_0x32a242[_0x561a('0x159')]));this[_0x561a('0x39')][_0x561a('0xac')](util['format']('AGENT\x20%s\x20FOUND\x20BY',this['channel']['callerid'],_0x32a242[_0x561a('0x159')]));return{'code':0xc8,'result':'success'};}else{logger[_0x561a('0x2b')](util['format'](_0x561a('0x15d'),this['channel'][_0x561a('0x50')],_0x32a242[_0x561a('0x159')]));this[_0x561a('0x39')][_0x561a('0xac')](util[_0x561a('0x26')]('AGENT\x20%s\x20NOT\x20FOUND\x20BY',this[_0x561a('0x39')][_0x561a('0x50')],_0x32a242['findBy']));return{'code':0xc8,'result':_0x561a('0x15e')};}};AGIVertices['prototype'][_0x561a('0x1be')]=function(_0x147096){logger[_0x561a('0x2b')](util['format']('Enter\x20in\x20VOICEMAIL\x20(%s)\x20block',_0x147096['label']));var _0x3ebbb4=this[_0x561a('0x39')][_0x561a('0x58')](_0x561a('0x1bf'),[_0x147096['mailbox'],_0x147096['options']]);if(_0x3ebbb4[_0x561a('0xa7')]===-0x1){return _0x3ebbb4;}return this['channel'][_0x561a('0xac')](util[_0x561a('0x26')](_0x561a('0xc7'),_0x561a('0x1bf'),_0x147096[_0x561a('0x1c0')]));};AGIVertices['prototype']['vswitch']=function(_0x4d2b55){logger[_0x561a('0x2b')](util[_0x561a('0x26')]('Enter\x20in\x20SWITCH\x20(%s)\x20block',_0x4d2b55[_0x561a('0x37')]));if(!this[_0x561a('0x89')](_0x4d2b55['variable_id'])){return this[_0x561a('0x39')][_0x561a('0x29')](_0x4d2b55,_0x561a('0x1a5'));}var _0x3f649c=this[_0x561a('0x12')][_0x561a('0x73')](this,_0x4d2b55['variable_id']);if(!_0x3f649c){return this[_0x561a('0x39')][_0x561a('0x29')](_0x4d2b55,'no\x20variable\x20found');}var _0x35c22a=this[_0x561a('0x39')][_0x561a('0x12')](_0x3f649c);return{'code':0xc8,'result':_0x35c22a[_0x561a('0xa5')]?_0x35c22a[_0x561a('0xa5')]:'-'};};String[_0x561a('0x11')]['replaceAll']=function(_0x1eca19,_0x442ac4){return this[_0x561a('0xa3')](_0x1eca19)[_0x561a('0x1c1')](_0x442ac4);};module[_0x561a('0x1c2')]=AGIVertices; \ No newline at end of file diff --git a/server/services/ami/acw/index.js b/server/services/ami/acw/index.js index 952f5b9..9f38115 100644 --- a/server/services/ami/acw/index.js +++ b/server/services/ami/acw/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xe3da=['uniqueid','[ACW][syncAgentConnect]\x20%s','syncAgentConnectPreview','[ACW][syncAgentConnectPreview]\x20%s','isUndefined','attended','[%s][HANGUP:UNIQUEID]','linkedid','[%s][HANGUP:LINKEDID]','[%s][HANGUPATTENDEDTRANSFER:UNIQUEID]','[%s][HANGUPATTENDEDTRANSFER:LINKEDID]','[ACW][syncHangup]\x20%s','isNil','transfereeuniqueid','secondtransfereruniqueid','transfertargetuniqueid','origtransfereruniqueid','transfereruniqueid','[%s][BLINDTRANSFER:UNIQUEID]','transfererlinkedid','[%s][BLINDTRANSFER:LINKEDID]','[ACW][syncBlindTransfer]\x20%s','autopause','all','Auto-Pause','[ACW][syncAgentRingNoAnswer]\x20%s','lodash','moment','../ami','../../../config/logger','acw','../rpc/user','../rpc/voiceAgentReport','voiceQueues','agents','timers','channels','agentconnect','bind','hanguprequest','hangup','syncHangup','agentringnoanswer','syncAgentRingNoAnswer','syncAttendedTransfer','blindtransfer','syncBlindTransfer','custom:agentConnectPreview','milliseconds','diff','prototype','updateAcw','lastPauseAt','timer','update','then','info','[%s][UPDATE][ACWTIME:%s]','catch','error','finally','startAcw','interface','queue','ACW','mandatoryDisposition','mandatoryDispositionPause','name','resolve','getAgent','[%s][INPAUSE][AGENT:%s][QUEUE:%s]','[%s][START][AGENT:%s][QUEUE:%s]','destlinkedid','savePause','acwTimeout','stopAcw','format','YYYY-MM-DD\x20HH:mm:ss','[%s][TIMER:%s][AGENT:%s][QUEUE:%s]','[ACW][START]\x20%s','message','[%s][TIMER][STOP][AGENT:%s]','saveUnpause','[ACW][STOP]\x20Interface\x20%s\x20doesn\x27t\x20have\x20timer','[ACW][TIMERS]','stringify','syncAgentConnect'];(function(_0x4c9380,_0x2fefc0){var _0x49a523=function(_0x165e85){while(--_0x165e85){_0x4c9380['push'](_0x4c9380['shift']());}};_0x49a523(++_0x2fefc0);}(_0xe3da,0x1cd));var _0xae3d=function(_0x42cae2,_0x284ef8){_0x42cae2=_0x42cae2-0x0;var _0x5f256f=_0xe3da[_0x42cae2];return _0x5f256f;};'use strict';var _=require(_0xae3d('0x0'));var moment=require(_0xae3d('0x1'));var ami=require(_0xae3d('0x2'));var logger=require(_0xae3d('0x3'))(_0xae3d('0x4'));var RpcUser=require(_0xae3d('0x5'));var RpcVoiceAgentReport=require(_0xae3d('0x6'));function Acw(_0x17952f){this[_0xae3d('0x7')]=_0x17952f[_0xae3d('0x7')];this[_0xae3d('0x8')]=_0x17952f[_0xae3d('0x8')];this[_0xae3d('0x9')]=_0x17952f[_0xae3d('0x9')];this[_0xae3d('0xa')]={};ami['on'](_0xae3d('0xb'),this['syncAgentConnect'][_0xae3d('0xc')](this));ami['on'](_0xae3d('0xd'),this['syncHangupRequest']['bind'](this));ami['on'](_0xae3d('0xe'),this[_0xae3d('0xf')][_0xae3d('0xc')](this));ami['on'](_0xae3d('0x10'),this[_0xae3d('0x11')][_0xae3d('0xc')](this));ami['on']('attendedtransfer',this[_0xae3d('0x12')]['bind'](this));ami['on'](_0xae3d('0x13'),this[_0xae3d('0x14')][_0xae3d('0xc')](this));ami['on'](_0xae3d('0x15'),this['syncAgentConnectPreview'][_0xae3d('0xc')](this));}function getDiff(_0x27561c){var _0x16fd19=moment()[_0xae3d('0x16')](0x0);var _0x2afdd3=moment(_0x27561c)[_0xae3d('0x16')](0x0);return _0x16fd19[_0xae3d('0x17')](_0x2afdd3,'seconds');}Acw[_0xae3d('0x18')][_0xae3d('0x19')]=function(_0x46295b,_0x230afb){var _0x192c13=this;var _0x2da957=getDiff(_0x192c13['timers'][_0x46295b][_0xae3d('0x1a')]);clearTimeout(_0x192c13[_0xae3d('0x9')][_0x46295b][_0xae3d('0x1b')]);_0x192c13['timers'][_0x46295b][_0xae3d('0x1b')]=![];return RpcVoiceAgentReport[_0xae3d('0x1c')]({'acwtime':_0x2da957},_0x192c13['timers'][_0x46295b]['uniqueid'],_0x46295b)[_0xae3d('0x1d')](function(_0x46a6d7){logger[_0xae3d('0x1e')](_0xae3d('0x1f'),_0x230afb,_0x2da957,_0x46a6d7);})[_0xae3d('0x20')](function(_0x577f62){logger[_0xae3d('0x21')]('[%s][UPDATE][ERRORS:%s]',_0x230afb,_0x577f62);})[_0xae3d('0x22')](function(){delete _0x192c13[_0xae3d('0x9')][_0x46295b];});};Acw[_0xae3d('0x18')][_0xae3d('0x23')]=function(_0x1facc1){try{var _0x3e7afc=this;var _0x26c419=this[_0xae3d('0xa')][_0x1facc1][_0xae3d('0x24')];var _0x11ecf7=this[_0xae3d('0xa')][_0x1facc1][_0xae3d('0x25')];var _0x37f5ff=this[_0xae3d('0x7')][_0x11ecf7];var _0x44a4e0=![];var _0x1fe90f=_0xae3d('0x26');if(_0x37f5ff[_0xae3d('0x27')]&&_0x37f5ff[_0xae3d('0x28')][_0xae3d('0x29')]){_0x44a4e0=!![];_0x1fe90f=_0x37f5ff['mandatoryDispositionPause'][_0xae3d('0x29')];}if(!_0x3e7afc[_0xae3d('0x8')][_0x26c419]){return Promise[_0xae3d('0x2a')]();}return RpcUser[_0xae3d('0x2b')](_0x3e7afc[_0xae3d('0x8')][_0x26c419]['id'])[_0xae3d('0x1d')](function(_0x8de288){if(!_0x8de288||_0x8de288['voicePause']){logger['info'](_0xae3d('0x2c'),_0x1facc1,_0x26c419,_0x11ecf7);return;}logger[_0xae3d('0x1e')](_0xae3d('0x2d'),_0x1facc1,_0x26c419,_0x11ecf7);var _0x3114f9=_0x3e7afc[_0xae3d('0xa')][_0x1facc1]['attended']&&_0x3e7afc[_0xae3d('0xa')][_0x1facc1][_0xae3d('0x2e')]?_0x3e7afc['channels'][_0x1facc1][_0xae3d('0x2e')]:_0x1facc1;return RpcUser[_0xae3d('0x2f')](_0x3e7afc[_0xae3d('0x8')][_0x26c419],_0x1fe90f,_0x3114f9);})[_0xae3d('0x1d')](function(_0x432c04){if(_0x44a4e0||!_0x432c04){return;}_0x3e7afc[_0xae3d('0x9')][_0x26c419]={};logger['info']('[%s][TIMER:%s][AGENT:%s][QUEUE:%s]',_0x1facc1,_0x3e7afc['voiceQueues'][_0x11ecf7][_0xae3d('0x30')],_0x26c419,_0x11ecf7);_0x3e7afc[_0xae3d('0x9')][_0x26c419][_0xae3d('0x1b')]=setTimeout(_0x3e7afc[_0xae3d('0x31')]['bind'](_0x3e7afc,_0x26c419),_0x3e7afc[_0xae3d('0x7')][_0x11ecf7][_0xae3d('0x30')]*0x3e8);_0x3e7afc[_0xae3d('0x9')][_0x26c419][_0xae3d('0x1a')]=moment()[_0xae3d('0x32')](_0xae3d('0x33'));_0x3e7afc[_0xae3d('0x9')][_0x26c419]['uniqueid']=_0x1facc1;_0x3e7afc[_0xae3d('0x9')][_0x26c419]['queue']=_0x11ecf7;_0x3e7afc['timers'][_0x26c419][_0xae3d('0x19')]=_0x3e7afc['updateAcw'][_0xae3d('0xc')](_0x3e7afc,_0x26c419,_0x1facc1);})['catch'](function(){logger['error'](_0xae3d('0x34'),_0x1facc1,_0x3e7afc[_0xae3d('0x7')][_0x11ecf7][_0xae3d('0x30')],_0x26c419,_0x11ecf7);})['finally'](function(){delete _0x3e7afc[_0xae3d('0xa')][_0x1facc1];});}catch(_0x58ea2f){logger[_0xae3d('0x21')](_0xae3d('0x35'),_0x58ea2f[_0xae3d('0x36')]);}};Acw[_0xae3d('0x18')][_0xae3d('0x31')]=function(_0x3fc3c0){try{var _0x33a319=this;if(_0x33a319[_0xae3d('0x9')][_0x3fc3c0]){_0x33a319[_0xae3d('0x9')][_0x3fc3c0][_0xae3d('0x1b')]=![];var _0x18855c=_0x33a319['timers'][_0x3fc3c0]['uniqueid'];var _0x3992eb=_0x33a319['timers'][_0x3fc3c0][_0xae3d('0x25')];var _0xccbd06=_0x33a319[_0xae3d('0x7')][_0x3992eb][_0xae3d('0x30')];logger[_0xae3d('0x1e')](_0xae3d('0x37'),_0x18855c,_0x3fc3c0);RpcUser[_0xae3d('0x38')](this[_0xae3d('0x8')][_0x3fc3c0]);RpcVoiceAgentReport[_0xae3d('0x1c')]({'acwtime':_0xccbd06,'agentacw':!![]},_0x18855c,_0x3fc3c0)[_0xae3d('0x1d')](function(_0x1de8da){logger['info'](_0xae3d('0x1f'),_0x18855c,_0xccbd06,_0x1de8da);})[_0xae3d('0x20')](function(_0xb82d5d){logger['error']('[%s][UPDATE][ERRORS:%s]',_0x18855c,_0xb82d5d);});}else{logger[_0xae3d('0x21')](_0xae3d('0x39'),_0x3fc3c0);if(_0x33a319['timers']){logger[_0xae3d('0x1e')](_0xae3d('0x3a'),JSON[_0xae3d('0x3b')](_0x33a319[_0xae3d('0x9')]));}}}catch(_0x436a04){logger[_0xae3d('0x21')]('[ACW][STOP]\x20%s',_0x436a04[_0xae3d('0x36')]);}};Acw[_0xae3d('0x18')][_0xae3d('0x3c')]=function(_0x938811){try{if(this[_0xae3d('0x7')][_0x938811['queue']]&&(this[_0xae3d('0x7')][_0x938811['queue']][_0xae3d('0x4')]||this[_0xae3d('0x7')][_0x938811[_0xae3d('0x25')]][_0xae3d('0x27')])){if(this['agents'][_0x938811['interface']]){this['channels'][_0x938811[_0xae3d('0x3d')]]={'queue':_0x938811[_0xae3d('0x25')],'interface':_0x938811['interface'],'destlinkedid':_0x938811['destlinkedid']};}}}catch(_0x5b5650){logger[_0xae3d('0x21')](_0xae3d('0x3e'),_0x5b5650[_0xae3d('0x36')]);}};Acw[_0xae3d('0x18')][_0xae3d('0x3f')]=function(_0x20d217){try{if(this[_0xae3d('0x7')][_0x20d217['queue']]&&(this['voiceQueues'][_0x20d217['queue']][_0xae3d('0x4')]||this['voiceQueues'][_0x20d217[_0xae3d('0x25')]][_0xae3d('0x27')])){if(this[_0xae3d('0x8')][_0x20d217[_0xae3d('0x24')]]){this[_0xae3d('0xa')][_0x20d217[_0xae3d('0x3d')]]={'queue':_0x20d217[_0xae3d('0x25')],'interface':_0x20d217[_0xae3d('0x24')]};}}}catch(_0x38f92d){logger[_0xae3d('0x21')](_0xae3d('0x40'),_0x38f92d['message']);}};Acw['prototype']['syncHangupRequest']=function(_0x154b23){try{if(this[_0xae3d('0xa')][_0x154b23[_0xae3d('0x3d')]]&&_[_0xae3d('0x41')](this['channels'][_0x154b23['uniqueid']][_0xae3d('0x42')])){logger[_0xae3d('0x1e')](_0xae3d('0x43'),_0x154b23[_0xae3d('0x3d')]);this['startAcw'](_0x154b23[_0xae3d('0x3d')]);}else if(this[_0xae3d('0xa')][_0x154b23[_0xae3d('0x44')]]&&_[_0xae3d('0x41')](this[_0xae3d('0xa')][_0x154b23[_0xae3d('0x44')]][_0xae3d('0x42')])){logger[_0xae3d('0x1e')](_0xae3d('0x45'),_0x154b23[_0xae3d('0x44')]);this[_0xae3d('0x23')](_0x154b23[_0xae3d('0x44')]);}}catch(_0x5bd3fb){logger['error']('[ACW][syncHangupRequest]\x20%s',_0x5bd3fb[_0xae3d('0x36')]);}};Acw[_0xae3d('0x18')]['syncHangup']=function(_0x198247){try{if(this['channels'][_0x198247['uniqueid']]&&this[_0xae3d('0xa')][_0x198247[_0xae3d('0x3d')]][_0xae3d('0x42')]){logger[_0xae3d('0x1e')](_0xae3d('0x46'),_0x198247[_0xae3d('0x3d')]);this[_0xae3d('0x23')](_0x198247['uniqueid']);}else if(this[_0xae3d('0xa')][_0x198247[_0xae3d('0x44')]]&&this[_0xae3d('0xa')][_0x198247[_0xae3d('0x44')]]['attended']){logger[_0xae3d('0x1e')](_0xae3d('0x47'),_0x198247[_0xae3d('0x44')]);this[_0xae3d('0x23')](_0x198247['linkedid']);}}catch(_0x5279a0){logger['error'](_0xae3d('0x48'),_0x5279a0['message']);}};Acw['prototype'][_0xae3d('0x12')]=function(_0x1e8f2f){try{if(!_[_0xae3d('0x49')](this[_0xae3d('0xa')][_0x1e8f2f[_0xae3d('0x4a')]])){this[_0xae3d('0x23')](_0x1e8f2f['transfereeuniqueid']);if(this[_0xae3d('0xa')][_0x1e8f2f[_0xae3d('0x4b')]]){this[_0xae3d('0xa')][_0x1e8f2f[_0xae3d('0x4b')]][_0xae3d('0x42')]=!![];this[_0xae3d('0xa')][_0x1e8f2f['transfertargetuniqueid']]=this[_0xae3d('0xa')][_0x1e8f2f[_0xae3d('0x4b')]];delete this[_0xae3d('0xa')][_0x1e8f2f['secondtransfereruniqueid']];}}else if(!_['isNil'](this['channels'][_0x1e8f2f[_0xae3d('0x4c')]])){this[_0xae3d('0x23')](_0x1e8f2f['transfertargetuniqueid']);if(this[_0xae3d('0xa')][_0x1e8f2f[_0xae3d('0x4d')]]){this[_0xae3d('0xa')][_0x1e8f2f['origtransfereruniqueid']][_0xae3d('0x42')]=!![];this[_0xae3d('0xa')][_0x1e8f2f[_0xae3d('0x4a')]]=this[_0xae3d('0xa')][_0x1e8f2f[_0xae3d('0x4d')]];delete this[_0xae3d('0xa')][_0x1e8f2f[_0xae3d('0x4d')]];}}}catch(_0x8df577){logger['error']('[ACW][syncAttendedTransfer]\x20%s',_0x8df577[_0xae3d('0x36')]);}};Acw[_0xae3d('0x18')][_0xae3d('0x14')]=function(_0x529d2d){try{if(this['channels'][_0x529d2d[_0xae3d('0x4e')]]){logger[_0xae3d('0x1e')](_0xae3d('0x4f'),JSON[_0xae3d('0x3b')](_0x529d2d['transfereruniqueid']));this[_0xae3d('0x23')](_0x529d2d[_0xae3d('0x4e')]);}else if(this['channels'][_0x529d2d[_0xae3d('0x50')]]){logger[_0xae3d('0x1e')](_0xae3d('0x51'),JSON[_0xae3d('0x3b')](_0x529d2d[_0xae3d('0x50')]));this[_0xae3d('0x23')](_0x529d2d[_0xae3d('0x50')]);}}catch(_0x551269){logger[_0xae3d('0x21')](_0xae3d('0x52'),_0x551269[_0xae3d('0x36')]);}};Acw[_0xae3d('0x18')][_0xae3d('0x11')]=function(_0x5b8333){try{if(this[_0xae3d('0x7')][_0x5b8333[_0xae3d('0x25')]]&&this[_0xae3d('0x7')][_0x5b8333[_0xae3d('0x25')]][_0xae3d('0x53')]===_0xae3d('0x54')){if(this['agents'][_0x5b8333[_0xae3d('0x24')]]){logger[_0xae3d('0x1e')]('[%s][AUTOPAUSE][AGENT:%s][QUEUE:%]',_0x5b8333[_0xae3d('0x3d')],_0x5b8333[_0xae3d('0x24')],_0x5b8333[_0xae3d('0x25')]);return RpcUser['savePause'](this['agents'][_0x5b8333[_0xae3d('0x24')]],_0xae3d('0x55'),_0x5b8333[_0xae3d('0x3d')]);}}}catch(_0x3c5464){logger[_0xae3d('0x21')](_0xae3d('0x56'),_0x3c5464[_0xae3d('0x36')]);}};module['exports']=Acw; \ No newline at end of file +var _0x02a7=['ACW','mandatoryDisposition','name','mandatoryDispositionPause','resolve','getAgent','info','[%s][INPAUSE][AGENT:%s][QUEUE:%s]','[%s][START][AGENT:%s][QUEUE:%s]','attended','destlinkedid','savePause','acwTimeout','stopAcw','lastPauseAt','YYYY-MM-DD\x20HH:mm:ss','updateAcw','[%s][TIMER:%s][AGENT:%s][QUEUE:%s]','message','[%s][TIMER][STOP][AGENT:%s]','saveUnpause','[ACW][STOP]\x20Interface\x20%s\x20doesn\x27t\x20have\x20timer','stringify','[ACW][STOP]\x20%s','[ACW][syncAgentConnectPreview]\x20%s','isUndefined','linkedid','[%s][HANGUP:LINKEDID]','[ACW][syncHangupRequest]\x20%s','[ACW][syncHangup]\x20%s','isNil','transfereeuniqueid','secondtransfereruniqueid','transfertargetuniqueid','origtransfereruniqueid','[ACW][syncAttendedTransfer]\x20%s','transfereruniqueid','[%s][BLINDTRANSFER:UNIQUEID]','transfererlinkedid','[%s][BLINDTRANSFER:LINKEDID]','[ACW][syncBlindTransfer]\x20%s','all','[%s][AUTOPAUSE][AGENT:%s][QUEUE:%]','[ACW][syncAgentRingNoAnswer]\x20%s','moment','acw','../rpc/user','../rpc/voiceAgentReport','voiceQueues','agents','timers','channels','agentconnect','syncAgentConnect','bind','hanguprequest','syncHangupRequest','syncHangup','syncAgentRingNoAnswer','attendedtransfer','syncAttendedTransfer','blindtransfer','syncBlindTransfer','custom:agentConnectPreview','syncAgentConnectPreview','timer','update','uniqueid','then','[%s][UPDATE][ACWTIME:%s]','catch','error','[%s][UPDATE][ERRORS:%s]','finally','prototype','startAcw','interface','queue'];(function(_0x2d7f0e,_0x3e6fbd){var _0x110b07=function(_0x557b00){while(--_0x557b00){_0x2d7f0e['push'](_0x2d7f0e['shift']());}};_0x110b07(++_0x3e6fbd);}(_0x02a7,0x7a));var _0x702a=function(_0x193cbe,_0x25a258){_0x193cbe=_0x193cbe-0x0;var _0x45697e=_0x02a7[_0x193cbe];return _0x45697e;};'use strict';var _=require('lodash');var moment=require(_0x702a('0x0'));var ami=require('../ami');var logger=require('../../../config/logger')(_0x702a('0x1'));var RpcUser=require(_0x702a('0x2'));var RpcVoiceAgentReport=require(_0x702a('0x3'));function Acw(_0xd65b34){this[_0x702a('0x4')]=_0xd65b34[_0x702a('0x4')];this[_0x702a('0x5')]=_0xd65b34['agents'];this[_0x702a('0x6')]=_0xd65b34['timers'];this[_0x702a('0x7')]={};ami['on'](_0x702a('0x8'),this[_0x702a('0x9')][_0x702a('0xa')](this));ami['on'](_0x702a('0xb'),this[_0x702a('0xc')][_0x702a('0xa')](this));ami['on']('hangup',this[_0x702a('0xd')]['bind'](this));ami['on']('agentringnoanswer',this[_0x702a('0xe')][_0x702a('0xa')](this));ami['on'](_0x702a('0xf'),this[_0x702a('0x10')]['bind'](this));ami['on'](_0x702a('0x11'),this[_0x702a('0x12')][_0x702a('0xa')](this));ami['on'](_0x702a('0x13'),this[_0x702a('0x14')][_0x702a('0xa')](this));}function getDiff(_0x34b608){var _0x4b690c=moment()['milliseconds'](0x0);var _0x38139d=moment(_0x34b608)['milliseconds'](0x0);return _0x4b690c['diff'](_0x38139d,'seconds');}Acw['prototype']['updateAcw']=function(_0x44f7fd,_0x3c9770){var _0xa124dd=this;var _0x57c2ba=getDiff(_0xa124dd['timers'][_0x44f7fd]['lastPauseAt']);clearTimeout(_0xa124dd[_0x702a('0x6')][_0x44f7fd][_0x702a('0x15')]);_0xa124dd[_0x702a('0x6')][_0x44f7fd]['timer']=![];return RpcVoiceAgentReport[_0x702a('0x16')]({'acwtime':_0x57c2ba},_0xa124dd['timers'][_0x44f7fd][_0x702a('0x17')],_0x44f7fd)[_0x702a('0x18')](function(_0x4f55ca){logger['info'](_0x702a('0x19'),_0x3c9770,_0x57c2ba,_0x4f55ca);})[_0x702a('0x1a')](function(_0x1845a2){logger[_0x702a('0x1b')](_0x702a('0x1c'),_0x3c9770,_0x1845a2);})[_0x702a('0x1d')](function(){delete _0xa124dd[_0x702a('0x6')][_0x44f7fd];});};Acw[_0x702a('0x1e')][_0x702a('0x1f')]=function(_0xd5ac07){try{var _0x47d0f5=this;var _0x1ecd28=this[_0x702a('0x7')][_0xd5ac07][_0x702a('0x20')];var _0xd5b93a=this[_0x702a('0x7')][_0xd5ac07][_0x702a('0x21')];var _0x2aede0=this[_0x702a('0x4')][_0xd5b93a];var _0x2308ae=![];var _0x4e8511=_0x702a('0x22');if(_0x2aede0[_0x702a('0x23')]&&_0x2aede0['mandatoryDispositionPause'][_0x702a('0x24')]){_0x2308ae=!![];_0x4e8511=_0x2aede0[_0x702a('0x25')][_0x702a('0x24')];}if(!_0x47d0f5[_0x702a('0x5')][_0x1ecd28]){return Promise[_0x702a('0x26')]();}return RpcUser[_0x702a('0x27')](_0x47d0f5['agents'][_0x1ecd28]['id'])[_0x702a('0x18')](function(_0x1047c4){if(!_0x1047c4||_0x1047c4['voicePause']){logger[_0x702a('0x28')](_0x702a('0x29'),_0xd5ac07,_0x1ecd28,_0xd5b93a);return;}logger[_0x702a('0x28')](_0x702a('0x2a'),_0xd5ac07,_0x1ecd28,_0xd5b93a);var _0x1973c7=_0x47d0f5[_0x702a('0x7')][_0xd5ac07][_0x702a('0x2b')]&&_0x47d0f5['channels'][_0xd5ac07][_0x702a('0x2c')]?_0x47d0f5[_0x702a('0x7')][_0xd5ac07][_0x702a('0x2c')]:_0xd5ac07;return RpcUser[_0x702a('0x2d')](_0x47d0f5[_0x702a('0x5')][_0x1ecd28],_0x4e8511,_0x1973c7);})[_0x702a('0x18')](function(_0x5cc44b){if(_0x2308ae||!_0x5cc44b){return;}_0x47d0f5[_0x702a('0x6')][_0x1ecd28]={};logger[_0x702a('0x28')]('[%s][TIMER:%s][AGENT:%s][QUEUE:%s]',_0xd5ac07,_0x47d0f5['voiceQueues'][_0xd5b93a][_0x702a('0x2e')],_0x1ecd28,_0xd5b93a);_0x47d0f5[_0x702a('0x6')][_0x1ecd28]['timer']=setTimeout(_0x47d0f5[_0x702a('0x2f')]['bind'](_0x47d0f5,_0x1ecd28),_0x47d0f5['voiceQueues'][_0xd5b93a][_0x702a('0x2e')]*0x3e8);_0x47d0f5[_0x702a('0x6')][_0x1ecd28][_0x702a('0x30')]=moment()['format'](_0x702a('0x31'));_0x47d0f5[_0x702a('0x6')][_0x1ecd28][_0x702a('0x17')]=_0xd5ac07;_0x47d0f5[_0x702a('0x6')][_0x1ecd28][_0x702a('0x21')]=_0xd5b93a;_0x47d0f5[_0x702a('0x6')][_0x1ecd28][_0x702a('0x32')]=_0x47d0f5[_0x702a('0x32')][_0x702a('0xa')](_0x47d0f5,_0x1ecd28,_0xd5ac07);})[_0x702a('0x1a')](function(){logger[_0x702a('0x1b')](_0x702a('0x33'),_0xd5ac07,_0x47d0f5[_0x702a('0x4')][_0xd5b93a][_0x702a('0x2e')],_0x1ecd28,_0xd5b93a);})[_0x702a('0x1d')](function(){delete _0x47d0f5[_0x702a('0x7')][_0xd5ac07];});}catch(_0x48250f){logger[_0x702a('0x1b')]('[ACW][START]\x20%s',_0x48250f[_0x702a('0x34')]);}};Acw[_0x702a('0x1e')][_0x702a('0x2f')]=function(_0x2eb2dd){try{var _0x927fd7=this;if(_0x927fd7[_0x702a('0x6')][_0x2eb2dd]){_0x927fd7[_0x702a('0x6')][_0x2eb2dd][_0x702a('0x15')]=![];var _0x5e69d0=_0x927fd7[_0x702a('0x6')][_0x2eb2dd][_0x702a('0x17')];var _0xc199d6=_0x927fd7[_0x702a('0x6')][_0x2eb2dd][_0x702a('0x21')];var _0x1b65bf=_0x927fd7[_0x702a('0x4')][_0xc199d6][_0x702a('0x2e')];logger[_0x702a('0x28')](_0x702a('0x35'),_0x5e69d0,_0x2eb2dd);RpcUser[_0x702a('0x36')](this[_0x702a('0x5')][_0x2eb2dd]);RpcVoiceAgentReport[_0x702a('0x16')]({'acwtime':_0x1b65bf,'agentacw':!![]},_0x5e69d0,_0x2eb2dd)[_0x702a('0x18')](function(_0x55f71b){logger[_0x702a('0x28')](_0x702a('0x19'),_0x5e69d0,_0x1b65bf,_0x55f71b);})[_0x702a('0x1a')](function(_0x4c096f){logger[_0x702a('0x1b')](_0x702a('0x1c'),_0x5e69d0,_0x4c096f);});}else{logger[_0x702a('0x1b')](_0x702a('0x37'),_0x2eb2dd);if(_0x927fd7[_0x702a('0x6')]){logger[_0x702a('0x28')]('[ACW][TIMERS]',JSON[_0x702a('0x38')](_0x927fd7[_0x702a('0x6')]));}}}catch(_0x34a26f){logger[_0x702a('0x1b')](_0x702a('0x39'),_0x34a26f[_0x702a('0x34')]);}};Acw[_0x702a('0x1e')][_0x702a('0x9')]=function(_0x5a67df){try{if(this[_0x702a('0x4')][_0x5a67df['queue']]&&(this[_0x702a('0x4')][_0x5a67df[_0x702a('0x21')]][_0x702a('0x1')]||this['voiceQueues'][_0x5a67df[_0x702a('0x21')]][_0x702a('0x23')])){if(this[_0x702a('0x5')][_0x5a67df[_0x702a('0x20')]]){this[_0x702a('0x7')][_0x5a67df[_0x702a('0x17')]]={'queue':_0x5a67df[_0x702a('0x21')],'interface':_0x5a67df['interface'],'destlinkedid':_0x5a67df['destlinkedid']};}}}catch(_0x12f49f){logger[_0x702a('0x1b')]('[ACW][syncAgentConnect]\x20%s',_0x12f49f['message']);}};Acw['prototype'][_0x702a('0x14')]=function(_0x25e011){try{if(this[_0x702a('0x4')][_0x25e011[_0x702a('0x21')]]&&(this[_0x702a('0x4')][_0x25e011[_0x702a('0x21')]][_0x702a('0x1')]||this[_0x702a('0x4')][_0x25e011[_0x702a('0x21')]][_0x702a('0x23')])){if(this[_0x702a('0x5')][_0x25e011[_0x702a('0x20')]]){this[_0x702a('0x7')][_0x25e011['uniqueid']]={'queue':_0x25e011['queue'],'interface':_0x25e011[_0x702a('0x20')]};}}}catch(_0x919678){logger['error'](_0x702a('0x3a'),_0x919678[_0x702a('0x34')]);}};Acw['prototype'][_0x702a('0xc')]=function(_0x415960){try{if(this[_0x702a('0x7')][_0x415960['uniqueid']]&&_[_0x702a('0x3b')](this[_0x702a('0x7')][_0x415960['uniqueid']][_0x702a('0x2b')])){logger[_0x702a('0x28')]('[%s][HANGUP:UNIQUEID]',_0x415960[_0x702a('0x17')]);this[_0x702a('0x1f')](_0x415960[_0x702a('0x17')]);}else if(this[_0x702a('0x7')][_0x415960[_0x702a('0x3c')]]&&_[_0x702a('0x3b')](this[_0x702a('0x7')][_0x415960[_0x702a('0x3c')]][_0x702a('0x2b')])){logger['info'](_0x702a('0x3d'),_0x415960[_0x702a('0x3c')]);this[_0x702a('0x1f')](_0x415960[_0x702a('0x3c')]);}}catch(_0x538b92){logger[_0x702a('0x1b')](_0x702a('0x3e'),_0x538b92[_0x702a('0x34')]);}};Acw[_0x702a('0x1e')][_0x702a('0xd')]=function(_0x4d2387){try{if(this[_0x702a('0x7')][_0x4d2387[_0x702a('0x17')]]&&this[_0x702a('0x7')][_0x4d2387[_0x702a('0x17')]][_0x702a('0x2b')]){logger['info']('[%s][HANGUPATTENDEDTRANSFER:UNIQUEID]',_0x4d2387[_0x702a('0x17')]);this[_0x702a('0x1f')](_0x4d2387[_0x702a('0x17')]);}else if(this[_0x702a('0x7')][_0x4d2387[_0x702a('0x3c')]]&&this[_0x702a('0x7')][_0x4d2387[_0x702a('0x3c')]][_0x702a('0x2b')]){logger['info']('[%s][HANGUPATTENDEDTRANSFER:LINKEDID]',_0x4d2387[_0x702a('0x3c')]);this['startAcw'](_0x4d2387['linkedid']);}}catch(_0x22ae4a){logger['error'](_0x702a('0x3f'),_0x22ae4a[_0x702a('0x34')]);}};Acw[_0x702a('0x1e')][_0x702a('0x10')]=function(_0x467a6c){try{if(!_[_0x702a('0x40')](this[_0x702a('0x7')][_0x467a6c[_0x702a('0x41')]])){this[_0x702a('0x1f')](_0x467a6c['transfereeuniqueid']);if(this[_0x702a('0x7')][_0x467a6c[_0x702a('0x42')]]){this['channels'][_0x467a6c[_0x702a('0x42')]][_0x702a('0x2b')]=!![];this[_0x702a('0x7')][_0x467a6c[_0x702a('0x43')]]=this[_0x702a('0x7')][_0x467a6c[_0x702a('0x42')]];delete this[_0x702a('0x7')][_0x467a6c['secondtransfereruniqueid']];}}else if(!_[_0x702a('0x40')](this[_0x702a('0x7')][_0x467a6c['transfertargetuniqueid']])){this[_0x702a('0x1f')](_0x467a6c['transfertargetuniqueid']);if(this[_0x702a('0x7')][_0x467a6c['origtransfereruniqueid']]){this[_0x702a('0x7')][_0x467a6c[_0x702a('0x44')]]['attended']=!![];this[_0x702a('0x7')][_0x467a6c[_0x702a('0x41')]]=this[_0x702a('0x7')][_0x467a6c[_0x702a('0x44')]];delete this['channels'][_0x467a6c[_0x702a('0x44')]];}}}catch(_0x232591){logger[_0x702a('0x1b')](_0x702a('0x45'),_0x232591[_0x702a('0x34')]);}};Acw[_0x702a('0x1e')][_0x702a('0x12')]=function(_0xcd2fc4){try{if(this[_0x702a('0x7')][_0xcd2fc4[_0x702a('0x46')]]){logger['info'](_0x702a('0x47'),JSON[_0x702a('0x38')](_0xcd2fc4[_0x702a('0x46')]));this['startAcw'](_0xcd2fc4[_0x702a('0x46')]);}else if(this[_0x702a('0x7')][_0xcd2fc4[_0x702a('0x48')]]){logger[_0x702a('0x28')](_0x702a('0x49'),JSON[_0x702a('0x38')](_0xcd2fc4[_0x702a('0x48')]));this['startAcw'](_0xcd2fc4['transfererlinkedid']);}}catch(_0x530bca){logger[_0x702a('0x1b')](_0x702a('0x4a'),_0x530bca[_0x702a('0x34')]);}};Acw['prototype'][_0x702a('0xe')]=function(_0x227f2e){try{if(this[_0x702a('0x4')][_0x227f2e[_0x702a('0x21')]]&&this['voiceQueues'][_0x227f2e[_0x702a('0x21')]]['autopause']===_0x702a('0x4b')){if(this[_0x702a('0x5')][_0x227f2e['interface']]){logger[_0x702a('0x28')](_0x702a('0x4c'),_0x227f2e[_0x702a('0x17')],_0x227f2e[_0x702a('0x20')],_0x227f2e['queue']);return RpcUser[_0x702a('0x2d')](this[_0x702a('0x5')][_0x227f2e['interface']],'Auto-Pause',_0x227f2e[_0x702a('0x17')]);}}}catch(_0x47b7be){logger[_0x702a('0x1b')](_0x702a('0x4d'),_0x47b7be[_0x702a('0x34')]);}};module['exports']=Acw; \ No newline at end of file diff --git a/server/services/ami/ami.js b/server/services/ami/ami.js index 404c31a..ab9ae26 100644 --- a/server/services/ami/ami.js +++ b/server/services/ami/ami.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xbe0c=['actionSipShowRegistry','then','actionCoreShowChannels','[ami.js][fullybooted]','util','../../config/logger','ami','asterisk','port','username','password','keepConnected','Action','format','Manager\x20\x22%s\x22\x20error\x20to\x20%s:%s\x20with:\x0a%s','error','Manager\x20\x22%s\x22\x20closed\x20to\x20%s:%s','sipshowregistry','actionDeviceStateList','actionSipPeerStatus','sippeerstatus','actionQueueSummary','coreshowchannels','info','once','close','connect','shutdown','Shutdown\x20\x22%s\x22\x20to\x20%s:%s\x20with:\x0a%s','inspect','fullybooted','resolve'];(function(_0x3992c8,_0x36e469){var _0x5297ef=function(_0x410b71){while(--_0x410b71){_0x3992c8['push'](_0x3992c8['shift']());}};_0x5297ef(++_0x36e469);}(_0xbe0c,0x184));var _0xcbe0=function(_0x34986b,_0x56fb4a){_0x34986b=_0x34986b-0x0;var _0x28a0d1=_0xbe0c[_0x34986b];return _0x28a0d1;};'use strict';var Manager=require('asterisk-manager');var BPromise=require('bluebird');var util=require(_0xcbe0('0x0'));var logger=require(_0xcbe0('0x1'))(_0xcbe0('0x2'));var config=require('../../config/environment');var ami=new Manager(config[_0xcbe0('0x3')][_0xcbe0('0x4')],config[_0xcbe0('0x3')]['ip'],config[_0xcbe0('0x3')][_0xcbe0('0x5')],config['asterisk'][_0xcbe0('0x6')],!![]);ami[_0xcbe0('0x7')]();ami[_0xcbe0('0x8')]=BPromise['promisify'](ami['action']);function error(_0x451f62){logger['error'](util[_0xcbe0('0x9')](_0xcbe0('0xa'),config[_0xcbe0('0x3')]['username'],config[_0xcbe0('0x3')]['ip'],config[_0xcbe0('0x3')][_0xcbe0('0x4')],util['inspect'](_0x451f62,![],null)));}function close(){logger[_0xcbe0('0xb')](util[_0xcbe0('0x9')](_0xcbe0('0xc'),config[_0xcbe0('0x3')]['username'],config[_0xcbe0('0x3')]['ip'],config['asterisk'][_0xcbe0('0x4')]));}ami['actionSipShowRegistry']=function(){return function(){return ami[_0xcbe0('0x8')]({'action':_0xcbe0('0xd')});};};ami[_0xcbe0('0xe')]=function(){return function(){return ami[_0xcbe0('0x8')]({'action':'devicestatelist'});};};ami[_0xcbe0('0xf')]=function(){return function(){return ami[_0xcbe0('0x8')]({'action':_0xcbe0('0x10')});};};ami[_0xcbe0('0x11')]=function(){return function(){return ami[_0xcbe0('0x8')]({'action':'queuesummary'});};};ami['actionCoreShowChannels']=function(){return function(){return ami[_0xcbe0('0x8')]({'action':_0xcbe0('0x12')});};};function connect(){logger[_0xcbe0('0x13')](util['format']('Manager\x20\x22%s\x22\x20logged\x20on\x20to\x20%s:%s',config['asterisk'][_0xcbe0('0x5')],config['asterisk']['ip'],config[_0xcbe0('0x3')][_0xcbe0('0x4')]));ami[_0xcbe0('0x14')](_0xcbe0('0xb'),error);ami['once'](_0xcbe0('0x15'),close);}ami['on'](_0xcbe0('0x16'),connect);ami['on'](_0xcbe0('0x17'),function(_0x4a4664){logger[_0xcbe0('0x13')](util['format'](_0xcbe0('0x18'),config[_0xcbe0('0x3')][_0xcbe0('0x5')],config[_0xcbe0('0x3')]['ip'],config[_0xcbe0('0x3')][_0xcbe0('0x4')],util[_0xcbe0('0x19')](_0x4a4664,![],null)));});ami['on'](_0xcbe0('0x1a'),function(){logger[_0xcbe0('0x13')](util[_0xcbe0('0x9')]('Fullybooted\x20\x22%s\x22\x20to\x20%s:%s',config[_0xcbe0('0x3')][_0xcbe0('0x5')],config[_0xcbe0('0x3')]['ip'],config['asterisk'][_0xcbe0('0x4')]));return Promise[_0xcbe0('0x1b')]()['then'](ami[_0xcbe0('0x1c')]())[_0xcbe0('0x1d')](ami[_0xcbe0('0xe')]())['then'](ami[_0xcbe0('0xf')]())[_0xcbe0('0x1d')](ami[_0xcbe0('0x11')]())['then'](ami[_0xcbe0('0x1e')]())['catch'](function(_0x2ac261){logger['error'](_0xcbe0('0x1f'),util[_0xcbe0('0x19')](_0x2ac261,{'showHidden':![],'depth':null}));});});ami['once'](_0xcbe0('0xb'),error);ami[_0xcbe0('0x14')](_0xcbe0('0x15'),close);module['exports']=ami; \ No newline at end of file +var _0x57fa=['actionSipShowRegistry','sipshowregistry','actionDeviceStateList','devicestatelist','actionSipPeerStatus','sippeerstatus','actionCoreShowChannels','coreshowchannels','info','Manager\x20\x22%s\x22\x20logged\x20on\x20to\x20%s:%s','once','connect','shutdown','Shutdown\x20\x22%s\x22\x20to\x20%s:%s\x20with:\x0a%s','fullybooted','Fullybooted\x20\x22%s\x22\x20to\x20%s:%s','resolve','then','catch','exports','bluebird','../../config/environment','asterisk','port','username','password','keepConnected','Action','promisify','error','format','Manager\x20\x22%s\x22\x20error\x20to\x20%s:%s\x20with:\x0a%s','inspect','Manager\x20\x22%s\x22\x20closed\x20to\x20%s:%s'];(function(_0x4f59bf,_0x2cb46e){var _0x375826=function(_0x701087){while(--_0x701087){_0x4f59bf['push'](_0x4f59bf['shift']());}};_0x375826(++_0x2cb46e);}(_0x57fa,0x9c));var _0xa57f=function(_0x1d0988,_0x5a24ba){_0x1d0988=_0x1d0988-0x0;var _0x3d5a09=_0x57fa[_0x1d0988];return _0x3d5a09;};'use strict';var Manager=require('asterisk-manager');var BPromise=require(_0xa57f('0x0'));var util=require('util');var logger=require('../../config/logger')('ami');var config=require(_0xa57f('0x1'));var ami=new Manager(config[_0xa57f('0x2')][_0xa57f('0x3')],config[_0xa57f('0x2')]['ip'],config[_0xa57f('0x2')][_0xa57f('0x4')],config[_0xa57f('0x2')][_0xa57f('0x5')],!![]);ami[_0xa57f('0x6')]();ami[_0xa57f('0x7')]=BPromise[_0xa57f('0x8')](ami['action']);function error(_0x1f2bb9){logger[_0xa57f('0x9')](util[_0xa57f('0xa')](_0xa57f('0xb'),config['asterisk'][_0xa57f('0x4')],config[_0xa57f('0x2')]['ip'],config[_0xa57f('0x2')]['port'],util[_0xa57f('0xc')](_0x1f2bb9,![],null)));}function close(){logger[_0xa57f('0x9')](util[_0xa57f('0xa')](_0xa57f('0xd'),config[_0xa57f('0x2')]['username'],config['asterisk']['ip'],config[_0xa57f('0x2')][_0xa57f('0x3')]));}ami[_0xa57f('0xe')]=function(){return function(){return ami['Action']({'action':_0xa57f('0xf')});};};ami[_0xa57f('0x10')]=function(){return function(){return ami[_0xa57f('0x7')]({'action':_0xa57f('0x11')});};};ami[_0xa57f('0x12')]=function(){return function(){return ami[_0xa57f('0x7')]({'action':_0xa57f('0x13')});};};ami['actionQueueSummary']=function(){return function(){return ami[_0xa57f('0x7')]({'action':'queuesummary'});};};ami[_0xa57f('0x14')]=function(){return function(){return ami[_0xa57f('0x7')]({'action':_0xa57f('0x15')});};};function connect(){logger[_0xa57f('0x16')](util[_0xa57f('0xa')](_0xa57f('0x17'),config['asterisk'][_0xa57f('0x4')],config[_0xa57f('0x2')]['ip'],config['asterisk'][_0xa57f('0x3')]));ami[_0xa57f('0x18')](_0xa57f('0x9'),error);ami[_0xa57f('0x18')]('close',close);}ami['on'](_0xa57f('0x19'),connect);ami['on'](_0xa57f('0x1a'),function(_0x4b1dd6){logger['info'](util['format'](_0xa57f('0x1b'),config[_0xa57f('0x2')][_0xa57f('0x4')],config[_0xa57f('0x2')]['ip'],config[_0xa57f('0x2')][_0xa57f('0x3')],util[_0xa57f('0xc')](_0x4b1dd6,![],null)));});ami['on'](_0xa57f('0x1c'),function(){logger['info'](util[_0xa57f('0xa')](_0xa57f('0x1d'),config[_0xa57f('0x2')][_0xa57f('0x4')],config[_0xa57f('0x2')]['ip'],config[_0xa57f('0x2')][_0xa57f('0x3')]));return Promise[_0xa57f('0x1e')]()['then'](ami[_0xa57f('0xe')]())[_0xa57f('0x1f')](ami['actionDeviceStateList']())[_0xa57f('0x1f')](ami[_0xa57f('0x12')]())['then'](ami['actionQueueSummary']())[_0xa57f('0x1f')](ami[_0xa57f('0x14')]())[_0xa57f('0x20')](function(_0x3babe3){logger[_0xa57f('0x9')]('[ami.js][fullybooted]',util[_0xa57f('0xc')](_0x3babe3,{'showHidden':![],'depth':null}));});});ami['once']('error',error);ami['once']('close',close);module[_0xa57f('0x21')]=ami; \ No newline at end of file diff --git a/server/services/ami/client.js b/server/services/ami/client.js index 4549ee4..8cb1a84 100644 --- a/server/services/ami/client.js +++ b/server/services/ami/client.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xcb91=['request','debug','memberReport','error','rpc','message','result','catch','exports','../../config/logger','ami','client','http'];(function(_0x234ae1,_0x42bdd6){var _0x227ba0=function(_0x1f6531){while(--_0x1f6531){_0x234ae1['push'](_0x234ae1['shift']());}};_0x227ba0(++_0x42bdd6);}(_0xcb91,0x1a9));var _0x1cb9=function(_0x31eb67,_0x9bc8c0){_0x31eb67=_0x31eb67-0x0;var _0x2a8cb8=_0xcb91[_0x31eb67];return _0x2a8cb8;};'use strict';var jayson=require('jayson/promise');var BPromise=require('bluebird');var logger=require(_0x1cb9('0x0'))(_0x1cb9('0x1'));var client=jayson[_0x1cb9('0x2')][_0x1cb9('0x3')]({'port':0x2329});client['Request']=function(_0x8c392f,_0x2c17b8){return new BPromise(function(_0x545a34,_0x13d5fd){return client[_0x1cb9('0x4')](_0x8c392f,_0x2c17b8)['then'](function(_0x226b69){logger[_0x1cb9('0x5')]('rpc',_0x1cb9('0x6'),_0x8c392f,_0x2c17b8,_0x226b69);if(_0x226b69[_0x1cb9('0x7')]){logger['error'](_0x1cb9('0x8'),'memberReport',_0x8c392f,_0x226b69['error'][_0x1cb9('0x9')],_0x2c17b8);return _0x13d5fd(_0x226b69[_0x1cb9('0x7')][_0x1cb9('0x9')]);}else{return _0x545a34(_0x226b69[_0x1cb9('0xa')]);}})[_0x1cb9('0xb')](function(_0x50ce71){logger[_0x1cb9('0x7')](_0x1cb9('0x8'),_0x1cb9('0x6'),_0x8c392f,_0x50ce71,_0x2c17b8);return _0x13d5fd(_0x50ce71);});});};module[_0x1cb9('0xc')]=client; \ No newline at end of file +var _0xac4a=['ami','client','http','then','debug','memberReport','error','message','result','catch','rpc','jayson/promise','bluebird','../../config/logger'];(function(_0x28d391,_0x1357b3){var _0x3c8bf0=function(_0x55bac9){while(--_0x55bac9){_0x28d391['push'](_0x28d391['shift']());}};_0x3c8bf0(++_0x1357b3);}(_0xac4a,0x13f));var _0xaac4=function(_0x42407b,_0x15e832){_0x42407b=_0x42407b-0x0;var _0x245e74=_0xac4a[_0x42407b];return _0x245e74;};'use strict';var jayson=require(_0xaac4('0x0'));var BPromise=require(_0xaac4('0x1'));var logger=require(_0xaac4('0x2'))(_0xaac4('0x3'));var client=jayson[_0xaac4('0x4')][_0xaac4('0x5')]({'port':0x2329});client['Request']=function(_0x58626e,_0x2af0f6){return new BPromise(function(_0x2a5762,_0x32d34c){return client['request'](_0x58626e,_0x2af0f6)[_0xaac4('0x6')](function(_0x53d03a){logger[_0xaac4('0x7')]('rpc',_0xaac4('0x8'),_0x58626e,_0x2af0f6,_0x53d03a);if(_0x53d03a[_0xaac4('0x9')]){logger['error']('rpc',_0xaac4('0x8'),_0x58626e,_0x53d03a['error'][_0xaac4('0xa')],_0x2af0f6);return _0x32d34c(_0x53d03a['error']['message']);}else{return _0x2a5762(_0x53d03a[_0xaac4('0xb')]);}})[_0xaac4('0xc')](function(_0x38d1d0){logger[_0xaac4('0x9')](_0xaac4('0xd'),'memberReport',_0x58626e,_0x38d1d0,_0x2af0f6);return _0x32d34c(_0x38d1d0);});});};module['exports']=client; \ No newline at end of file diff --git a/server/services/ami/dialer/index.js b/server/services/ami/dialer/index.js index a162e4a..10a034a 100644 --- a/server/services/ami/dialer/index.js +++ b/server/services/ami/dialer/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x8906=['[syncAgentComplete][createHistory][5]','reason\x205\x20busy','Congestion','custom:agentcongestion','congestion','[syncAgentComplete][createHistory][8]','dialCongestionMaxRetry','reason\x208\x20congestion','reason\x2011\x20abandoned','AgentReject','custom:agentreject','agentreject','[syncAgentComplete][createHistory][20]','reason\x2020\x20agentreject','[syncAgentComplete][createHistory][?]','[moveContactManagedDialer][0]','contact\x20not\x20moved','dialPredictiveOptimizationPercentage','outboundDropCallsDayTimeout','round','predictiveIntervalAvailable','predictiveIntervalMaxThreshold','available','predictiveIntervalHitRate','[startMethodPredictive][StartProgressive]','check\x20predictive\x20is\x20not\x20undefine','check\x20handlePredictive\x20is\x20not\x20undefine','collection\x20data\x20in\x20progressive\x20at','dialPredictiveInterval','[startMethodPredictive][StartProgressive][Loop]','erlangCalls','dialPredictiveOptimization','dropRate','[stopMethodPredictive][ReStartProgressive][ExceededDropDay]','Dropped\x20calls\x20day','[stopMethodPredictive][ReStartProgressive][ExceededDropInterval]','Drop\x20in\x20this\x20interval','started\x20in\x20predictive\x20at','startMethodPredictive','Predictive\x20after\x20first\x20interval','recalculate\x20predictive\x20at','avgHandleTime','getDataPredictive','Predictive\x20for\x20every\x20interval','switch\x20in\x20progressive\x20because\x20available\x20agents\x20(',')\x20are\x20more\x20than\x20threshold\x20(','predictiveIntervalAvgTalktime','predictiveIntervalDroppedCallsTimeout','predictiveIntervalDroppedCallsCallersExit','abandonmentRate','agentBusyFactor','busyFactor','[getDataPredictive]','Unknown\x20Predictive','check\x20failure','getDataPredictiveOld','loggedIn','outboundQueuePauses','predictiveIntervalPauses','[CatchErlangB]','floor','[handlePredictive]','fail\x20to\x20scheduled\x20calls','checkContactBlack','recallme','[booked][checkContactBlack]','queueStatusComplete:\x20','Queue:\x20','[unlockOriginate][syncQueueStatusComplete]','[booked][checkContactBlack][else]','actionOriginate','scheduledat','dialRecallMeTimeout','unlockContact','outboundReCallsDay','dialRecallInQueue','RecallInQueue','[Originate][HistoryDialRecallInQueue][historyCatch]','saveInDb','RECALL_TIMEOUT','[Originate][HistoryRecallClose][historyCatch]','[Originate][HistoryRecallClose]','outboundBlacklistCallsDay','BLACKLIST','[Originate][MoveBlacklist]','inBlackList','limitCalls','temp','checkContactEmpty','[getContactCampaign2][Empty]','RUNNING','ivrTotalCallsDays','[actionOriginate]\x20','checkIsBlackListIvr','[actionOriginateIvr]\x20','[getContactCampaign2]','dialLimitQueue','pTalking','getContactDialer','countReScheduled','[countReScheduled]\x20','checkIsBlackList','[getContactDialer2]','tryOriginatePredictive','[handlePredictive][limitChannel]','not_inuse','dialOrderByScheduledAt','[actionOriginatePredictive]\x20','[getContactDialerPredictive]','M:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','Interval:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','Ts:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','P:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','Amax:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','[abandonmentRate]','m\x20=\x20','Ts\x20=\x20','p\x20=\x20','interval\x20=\x20','erlangb','----\x20Agent\x20Busy\x20Factor\x20----','[busyFactor]','Umin\x20=\x20','util','lodash','uuid','ioredis','./utils','../preview/util/util','../../../config/environment/','../../../config/logger','dialer','booked','predictive','syncQueueSummary','../ami','redis','defaults','localhost','socket.io-emitter','../rpc/cmHopper','../rpc/setting','./models/history','./models/final','./models/agentComplete','./models/queueCallerAbandon','./models/hangup','env','XCALLY_IP_AGI','127.0.0.1','tail','sequence','preview','voiceQueues','campaigns','agents','trunks','maxNumberOriginate','channels','contactsId','uniqueId','optionPredictive','startProgressive','ivrOriginated','queueBooked','queueBookedRR','queuesSummary','agentconnect','syncAgentConnect','bind','queuecallerabandon','syncQueueCallerAbandon','originateresponse','agentcomplete','custom:queuesummary','custom:queuesummarycomplete','syncQueueSummaryComplete','hangup','syncHangup','newexten','syncNewExten','varset','syncVarSet','queuestatuscomplete','syncQueueStatusComplete','loopClearZombieChannels','getSettings','then','previewRecallmeReminderInterval','isUndefined','emit','type','debug','[voiceQueueReport][queuesummary]\x20sending\x20voice_queue:save\x20event:','inspect','voice:queue:%s','name','voice_queue:save','isEmpty','info','Total\x20Calls:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','predictiveIntervalTotalCalls','Answered\x20Calls:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','predictiveIntervalAnsweredCalls','Dropped\x20Timeout:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','Dropped\x20Exit:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','AVG\x20Hold\x20Time:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','predictiveIntervalAvgHoldtime','AVG\x20Talk\x20Time:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','---------------------------','Avg\x20Talk\x20Time\x20is\x20not\x20enough\x20for\x20predictive','Total\x20Calls\x20are\x20not\x20enough\x20for\x20predictive','History\x20information\x20are\x20empty','---------\x20ErlangB\x20---------','Scheduled\x20Calls:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','One\x20call\x20every:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','erlangCallToSecond','Drop\x20Rate:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','erlangAbandonmentRate','Agent\x20Busy\x20Factor:\x20\x20\x20\x20\x20\x20\x20\x20\x20','erlangBusyFactor','merge','getSeconds','startProgressive\x20value\x20cleared','startPredictive','startPredictive\x20value\x20cleared','handlePredictive','handlePredictive\x20interval\x20cleared','error','stack','checkContactLowerLimitOriginate','contactsRescheduled','CAMPAIGN_STATUS','message','NO_AVAILABLE_CONTACTS','endtime','queueStatusComplete','[unlockQueueStatus][undefined]','[booked][unlockQueueStatus]','stringify','pick','Interval','NULL_INTERVAL','\x20INTERVAL_IS_NULL','Intervals','isIVRCampaignActive','INACTIVE','\x20NOT\x20Active','isIVRCampaign','format','campaign:ivr:%s','campaign:save','originated','sendMessageOneNotActive','[syncQueueSummary]\x20Campaign\x20Ivr:\x20','is\x20not\x20active','[ifTime][Action]','Error','isTrunkReachable','active','status','reachable','SIP/%s','prototype','TrunkBackup','\x20trunk\x20is\x20not\x20reachable','checkIfTime','ifTimeIvr','checkIfTimeIntervals','ifTime','Failure','\x20Intervals\x20is\x20null\x20','EMPTY_INTERVAL','\x20Intervals\x20is\x20empty\x20','\x20Timezone\x20unknow\x20','length','push','Action','command','iftime\x20%s,%s','timezones','indexOf','true','catch','all','some','OVERTIME_GLOBAL_INTERVAL','OVERTIME_INTERVAL','[ifTime][promiseAll]','Global:\x20','resetActiveCalls','syncCampaigns','undefined','checkIsTrunkReachable','dialGlobalInterval','dialTimezone','launchHandleIvr','[syncCampaigns]','checkDialMethod','dialMethod','progressive','handlePower','power','dialPowerLevel','Queue','method\x20not\x20recognized','silly','Dialer::ifTime()','Voice\x20Queue\x20%s\x20$s','intervalIftime','\x20Interval\x20is\x20overtime:\x20','Timezone:\x20','Dialer::ifTime()\x20errResponse\x20NOT\x20NULL:','isGlobal','AMI\x20IfTime','queue','uniqueid','ivr','updateOriginated','answertime','YYYY-MM-DD\x20HH:mm:ss','syncAgentComplete','reason','agent','agiafterat','dialQueueProject2','dialAgiAfterHangupAgent','createHistory','[syncAgentComplete][createHistory]','moveContactManagedDialer','[syncAgentComplete]','droptime','responsetime','dialQueueTimeout','predictiveIntervalErlangCallsDroppedCalls','state','statedesc','dropreason','countglobal','verifyAdditionalPhones','countdropretry','queueCallerAbandonCreateState','additional','rescheduleContact','add','dialDropRetryFrequency','minutes','ContactId','VoiceQueueId','CampaignId','[rescheduleContact][Drop]','Drop','starttime','calleridname','calleridnum','[syncAgentComplete][createHistory][10]','swapAdditionalPhones','outboundDropCallsDayCallersExit','Abandoned','CALLEREXIT','countabandonedretry','dialAbandonedRetryFrequency','callAdditionalPhoneAfterMin','ListId','[rescheduleContact][Abandoned]','[syncAgentComplete][createHistory][11]','actions','channel','strategy','rrmemory','roundrobin','actionid','isNil','paused','stateinterface','locked','idHopper','run','[Catch][Preview][syncQueueStatusComplete]','finally','[unlock][syncQueueStatusComplete]','_rr','unlockRR','Agent:\x20','contactAgent-idHopper:\x20','[booked][RR][finaly]','[booked][unlock]','[booked][unlock2]','[unlock2][syncQueueStatusComplete]','[booked][unlock3]','[unlock3][syncQueueStatusComplete]','getQueue','Success','callProgressDetecting','[callProgressDetecting]\x20','variable','exten','dialAMDActive','value','HANGUP','outboundAnswerCallsDay','outboundAnswerAgiCallsDay','HangupInAMD','AMD','amd','[syncHangupInAMD][createHistory]','[syncHangupInAMD]','MACHINE','Machine','membername','countmachineretry','buildObj','countbusyretry','countcongestionretry','countnoanswerretry','dialGlobalMaxRetry','stateGlobal','dialMachineMaxRetry','createStateFinal','reason\x2019\x20machine....','[rescheduleContact][Machine]','custom:amd','[syncHangupInAMDIvr][createHistory]','[syncHangupInAMDIvr]','[syncAgentComplete][createHistory][0]','reason19\x20machine....','dialMachineRetryFrequency','ivrAnswerCallsDay','AnswerAGI','[syncHangupIvr][createHistory]','[syncHangupIvr]','dialQueueProject','outboundUnknownCallsDay','Unknow','running','getQueueCampaignStatusMessage','resolve','statusMessage','talking','ACTIVE','[syncQueueSummary]','compareToOutboundQueue','queueSummaryCountersUpdated','updateReportFromOutboundQueue','assign','filter','dialPreviewRecallmeReminder','map','Agent','user:%s','clearZombieChannels','[uniqueid]','No\x20such\x20channel','[Dialer][checkChannel]','[Dialer][checkChannel][ivr]','getVoiceQueueRtPauses','[updateOriginated]\x20object\x20originated\x20is\x20negative','[updateOriginated]\x20is\x20null\x20or\x20undefined','loggerHandler','emptyContact','notFound','UserId','[emptyContact][createHistory]','[emptyContact]','[syncQueueCallerAbandon]\x20[Drop]','handlePreviewRecallNotifications','user:dialPreviewRecallReminder','handleIvr','object','originate','voiceQueue\x20is\x20undefine','phone','contact\x20is\x20undefine','\x22agi://%s/square,%s\x22','NONE','isOutboundQueue','\x22%s,%s%s,,,%s\x22','getCaller','xcally-motion-dialer','XMD-AMDINITIALSILENCE','dialAMDGreeting','XMD-AMDAFTERGREETINGSILENCE','dialAMDAfterGreetingSilence','XMD-AMDTOTALANALYSISTIME','dialAMDTotalAnalysisTime','XMD-AMDMINWORDLENGTH','XMD-AMDBETWEENWORDSSILENCE','dialAMDBetweenWordsSilence','dialAMDMaximumNumberOfWords','XMD-AMDSILENCETHRESHOLD','XMD-AMDMAXIMUMWORDLENGTH','XMD-VOICEQUEUEID','setXMDContactVariables','Contact','Trunk','getCallerId','callerid','dialOriginateCallerIdName','dialRandomLastDigitCallerIdNumber','dialOriginateCallerIdNumber','getCallerIdRandom','XMD-ORIGINATECALLERIDNAME','XMD-ORIGINATECALLERIDNUM','variables','dialPrefix','trim','SIP/%s/%s%s','dialCutDigit','dialOriginateTimeout','outboundOriginateFailureCallsDay','[originateError]:\x20%s','OriginateError','[originate][error]','originate\x20action\x20Error','checkRetriveMax','countnosuchnumberretry','countagentrejectretry','dialNoAnswerMaxRetry','dialNoAnswerRetryFrequency','dialBusyMaxRetry','dialBusyRetryFrequency','dialCongestionRetryFrequency','[rescheduleContact]\x20[Congestion]','dialNoSuchNumberMaxRetry','dialNoSuchNumberRetryFrequency','[rescheduleContact][NoSuchNumber]','dialDropMaxRetry','dialAbandonedMaxRetry','dialAgentRejectMaxRetry','[rescheduleContact][AgentReject]','[callProgressDetecting]','entity\x20is\x20undefine','evt\x20is\x20undefine','NoSuchNumber','custom:agentnosuchnumber','nosuchnumber','reason\x200\x20no\x20such\x20number....','outboundNoAnswerCallsDay','NoAnswer','custom:agentnoanswer','[syncAgentComplete][createHistory][3]','outboundBusyCallsDay','Busy','custom:agentbusy','busy'];(function(_0x455c6c,_0x1e78b7){var _0x488242=function(_0x3e8fb0){while(--_0x3e8fb0){_0x455c6c['push'](_0x455c6c['shift']());}};_0x488242(++_0x1e78b7);}(_0x8906,0x7b));var _0x6890=function(_0x475b1d,_0x175ee8){_0x475b1d=_0x475b1d-0x0;var _0x44ad70=_0x8906[_0x475b1d];return _0x44ad70;};'use strict';var util=require(_0x6890('0x0'));var _=require(_0x6890('0x1'));var uuid=require(_0x6890('0x2'));var moment=require('moment');var rr=require('rr');var Redis=require(_0x6890('0x3'));var utils=require(_0x6890('0x4'));var hopperUtils=require('./utils/hopper');var ut=require(_0x6890('0x5'));var config=require(_0x6890('0x6'));var logger=require(_0x6890('0x7'))(_0x6890('0x8'));var loggerBooked=require(_0x6890('0x7'))(_0x6890('0x9'));var loggerPredictive=require(_0x6890('0x7'))(_0x6890('0xa'));var loggerPredictiveCalls=require('../../../config/logger')('predictiveCalls');var loggerSyncQueueSummary=require('../../../config/logger')(_0x6890('0xb'));var ami=require(_0x6890('0xc'));config[_0x6890('0xd')]=_[_0x6890('0xe')](config[_0x6890('0xd')],{'host':_0x6890('0xf'),'port':0x18eb});var io=require(_0x6890('0x10'))(new Redis(config[_0x6890('0xd')]));var cmHopper=require(_0x6890('0x11'));var voiceQueueRt=require('../rpc/voiceQueueRt');var RpcSetting=require(_0x6890('0x12'));var Interval=require('../rpc/interval');var Action=require('./models/action');var History=require(_0x6890('0x13'));var Final=require(_0x6890('0x14'));var AgentComplete=require(_0x6890('0x15'));var QueueCallerAbandon=require(_0x6890('0x16'));var Hangup=require(_0x6890('0x17'));var ipAgi=process[_0x6890('0x18')][_0x6890('0x19')]||_0x6890('0x1a');var previewRecallmeReminderInterval=0x1;var Sequence=function(){};Sequence['prototype']['enqueue']=function(_0x5db0ff){this[_0x6890('0x1b')]=this[_0x6890('0x1b')]?this[_0x6890('0x1b')]['finally'](_0x5db0ff):_0x5db0ff();};function Dialer(_0x16d9c7,_0x4e17d5){this[_0x6890('0x1c')]=new Sequence();this[_0x6890('0x1d')]=_0x4e17d5;this[_0x6890('0x1e')]=_0x16d9c7['voiceQueues'];this[_0x6890('0x1f')]=_0x16d9c7['campaigns'];this['agents']=_0x16d9c7[_0x6890('0x20')];this['trunks']=_0x16d9c7[_0x6890('0x21')];this[_0x6890('0x22')]=config[_0x6890('0x22')]||0x2;this[_0x6890('0x23')]={};this['actions']={};this[_0x6890('0x24')]={};this[_0x6890('0x25')]={};this[_0x6890('0x26')]={};this['startPredictive']={};this[_0x6890('0x27')]={};this[_0x6890('0x28')]={};this[_0x6890('0x29')]={};this[_0x6890('0x2a')]={};this[_0x6890('0x2b')]={};ami['on'](_0x6890('0x2c'),this[_0x6890('0x2d')][_0x6890('0x2e')](this));ami['on'](_0x6890('0x2f'),this[_0x6890('0x30')][_0x6890('0x2e')](this));ami['on'](_0x6890('0x31'),this['syncOriginateResponse'][_0x6890('0x2e')](this));ami['on'](_0x6890('0x32'),this['syncAgentComplete'][_0x6890('0x2e')](this));ami['on'](_0x6890('0x33'),this[_0x6890('0xb')][_0x6890('0x2e')](this));ami['on'](_0x6890('0x34'),this[_0x6890('0x35')][_0x6890('0x2e')](this));ami['on'](_0x6890('0x36'),this[_0x6890('0x37')][_0x6890('0x2e')](this));ami['on'](_0x6890('0x38'),this[_0x6890('0x39')]['bind'](this));ami['on'](_0x6890('0x3a'),this[_0x6890('0x3b')][_0x6890('0x2e')](this));ami['on']('queuemember',this['syncQueueMember'][_0x6890('0x2e')](this));ami['on'](_0x6890('0x3c'),this[_0x6890('0x3d')]['bind'](this));this['loopCampaigns']();this[_0x6890('0x3e')]();RpcSetting[_0x6890('0x3f')]()[_0x6890('0x40')](function(_0x15599b){previewRecallmeReminderInterval=_0x15599b[_0x6890('0x41')];});}function isNotNull(_0xa5a594){return _0xa5a594!==null&&!_[_0x6890('0x42')](_0xa5a594);}function msgResponse(_0xaeb0a2,_0x214679,_0x42cf81){return{'action':_0xaeb0a2,'response':_0x214679,'message':_0x42cf81,'stack':_0x42cf81};}function emit(_0xba733e,_0x48bf1f,_0x267d23){io['to'](_0xba733e)[_0x6890('0x43')](_0x48bf1f,_0x267d23);}function emitOutboundVoiceQueueSummary(_0x3116d3){if(_0x3116d3[_0x6890('0x44')]==='outbound'){logger[_0x6890('0x45')](_0x6890('0x46'),util[_0x6890('0x47')](_0x3116d3,{'showHidden':![],'depth':null}));emit(util['format'](_0x6890('0x48'),_0x3116d3[_0x6890('0x49')]),_0x6890('0x4a'),_0x3116d3);}}function checkGetDataPredictive(_0x44c17c){if(isNotNull(_0x44c17c)&&!_[_0x6890('0x4b')](_0x44c17c)){loggerPredictive['info']('-----\x20Stats\x20Predictive\x20---');loggerPredictive[_0x6890('0x4c')](_0x6890('0x4d'),_0x44c17c[_0x6890('0x4e')]);loggerPredictive[_0x6890('0x4c')](_0x6890('0x4f'),_0x44c17c[_0x6890('0x50')]);loggerPredictive[_0x6890('0x4c')](_0x6890('0x51'),_0x44c17c['predictiveIntervalDroppedCallsTimeout']);loggerPredictive[_0x6890('0x4c')](_0x6890('0x52'),_0x44c17c['predictiveIntervalDroppedCallsCallersExit']);loggerPredictive[_0x6890('0x4c')](_0x6890('0x53'),_0x44c17c[_0x6890('0x54')]);loggerPredictive[_0x6890('0x4c')](_0x6890('0x55'),_0x44c17c['predictiveIntervalAvgTalktime']);loggerPredictive[_0x6890('0x4c')](_0x6890('0x56'));if(_0x44c17c[_0x6890('0x4e')]>0x0){if(!_[_0x6890('0x42')](_0x44c17c['predictiveIntervalAvgTalktime'])&&_0x44c17c['predictiveIntervalAvgTalktime']>0x0){return!![];}loggerPredictive['info'](_0x6890('0x57'));if(!_[_0x6890('0x42')](_0x44c17c[_0x6890('0x54')])&&_0x44c17c['predictiveIntervalAvgHoldtime']>0x0){return!![];}loggerPredictive['info']('Avg\x20Hold\x20Time\x20is\x20not\x20enough\x20for\x20predictive');}else{loggerPredictive[_0x6890('0x4c')](_0x6890('0x58'));}}else{loggerPredictive[_0x6890('0x4c')](_0x6890('0x59'));}return![];}function mergeDataErlangB(_0x1dd5cc){return function(_0x2bd4bc){loggerPredictive['info'](_0x6890('0x5a'));loggerPredictive['info'](_0x6890('0x5b'),_0x2bd4bc['erlangCalls']);loggerPredictive[_0x6890('0x4c')](_0x6890('0x5c'),_0x2bd4bc[_0x6890('0x5d')]);loggerPredictive['info'](_0x6890('0x5e'),_0x2bd4bc[_0x6890('0x5f')]);loggerPredictive[_0x6890('0x4c')](_0x6890('0x60'),_0x2bd4bc[_0x6890('0x61')]);loggerPredictive[_0x6890('0x4c')](_0x6890('0x5e'),_0x2bd4bc[_0x6890('0x5f')]);loggerPredictive[_0x6890('0x4c')](_0x6890('0x56'));_[_0x6890('0x62')](_0x1dd5cc,_0x2bd4bc);};}function ifInterval(_0x269ec1,_0x5214ae){if(_[_0x6890('0x42')](_0x5214ae)){return![];}return utils[_0x6890('0x63')](undefined,_0x5214ae)<_0x269ec1*0x3c;}function clearPredictiveAttributes(_0x10a6b6){if(_0x10a6b6[_0x6890('0x27')]){_0x10a6b6[_0x6890('0x27')]=undefined;loggerPredictive[_0x6890('0x45')](_0x10a6b6['name'],_0x6890('0x64'));}if(_0x10a6b6[_0x6890('0x65')]){_0x10a6b6['startPredictive']=undefined;loggerPredictive['debug'](_0x10a6b6[_0x6890('0x49')],_0x6890('0x66'));}if(_0x10a6b6[_0x6890('0x67')]){clearInterval(_0x10a6b6[_0x6890('0x67')]);_0x10a6b6[_0x6890('0x67')]=undefined;loggerPredictive['debug'](_0x10a6b6[_0x6890('0x49')],_0x6890('0x68'));}}function loggerCatchPredictive(_0x4567c1,_0x41d41e){return function(_0x567584){loggerPredictive[_0x6890('0x69')](_0x41d41e[_0x6890('0x49')],_0x4567c1);loggerPredictive[_0x6890('0x69')](_0x567584[_0x6890('0x6a')]);clearPredictiveAttributes(_0x41d41e);};}function loggerCatch(_0x2f5437){return function(_0xcbf9b0){logger['error'](_0x2f5437,util[_0x6890('0x47')](_0xcbf9b0,{'showHidden':![],'depth':null}));};}function loggerGetContactDialer(_0xbe38a4,_0x5c5552,_0x4419e7){return function(_0x26aec9){utils[_0x6890('0x6b')](_0x5c5552,_0x4419e7,0x0);logger[_0x6890('0x69')](_0xbe38a4,util['inspect'](_0x26aec9,{'showHidden':![],'depth':null}));};}function sendMessageReschedule(_0x3cb6b4){return function(_0x133c18){if(isNotNull(_0x133c18)&&isNotNull(_0x133c18[0x0])){if(_0x133c18[0x0][_0x6890('0x6c')]>0x0){_0x3cb6b4['message']=utils[_0x6890('0x6d')]['CONTACTS_RESCHEDULED'];logger[_0x6890('0x4c')]('[getContactDialer2][ReScheduled]'+_0x3cb6b4[_0x6890('0x49')],_0x133c18[0x0][_0x6890('0x6c')],'contacts');}else{_0x3cb6b4[_0x6890('0x6e')]=utils['CAMPAIGN_STATUS'][_0x6890('0x6f')];logger[_0x6890('0x4c')]('[getContactDialer2][Empty]'+_0x3cb6b4[_0x6890('0x49')]);}}};}function createObjHistory(_0x48f838,_0x4e7094,_0x2d2a53,_0x4b0280,_0x2d4566){_0x48f838[_0x6890('0x6e')]=_0x2d2a53;var _0x2171f6=new Action(_0x48f838,_0x4e7094);var _0x30d82e=new History(_0x2171f6);_0x30d82e['state']=_0x4b0280;_0x30d82e['statedesc']=_0x2d4566;_0x30d82e[_0x6890('0x70')]=_0x2171f6['starttime'];return _0x30d82e;}function unlockQueueStatus(_0x2d2577,_0x34f796){setTimeout(function(){if(_['isUndefined'](_0x2d2577[_0x6890('0x71')])){loggerBooked[_0x6890('0x69')](_0x6890('0x72'),_0x34f796);}_0x2d2577['queueStatusComplete']=!![];loggerBooked[_0x6890('0x4c')](_0x6890('0x73'),_0x34f796,JSON[_0x6890('0x74')](_[_0x6890('0x75')](_0x2d2577,[_0x6890('0x49'),_0x6890('0x71')])));},0x1f3);}function checkInterval(_0x1d24ba){return function(){if(!isNotNull(_0x1d24ba[_0x6890('0x76')])){_0x1d24ba[_0x6890('0x6e')]=utils[_0x6890('0x6d')][_0x6890('0x77')];throw _0x1d24ba[_0x6890('0x49')]+_0x6890('0x78');}if(!isNotNull(_0x1d24ba[_0x6890('0x76')]['Intervals'])){_0x1d24ba[_0x6890('0x6e')]=utils[_0x6890('0x6d')]['NULL_INTERVAL'];throw _0x1d24ba[_0x6890('0x49')]+_0x6890('0x78');}if(!isNotNull(_[_0x6890('0x4b')](_0x1d24ba[_0x6890('0x76')][_0x6890('0x79')]))){_0x1d24ba[_0x6890('0x6e')]=utils[_0x6890('0x6d')][_0x6890('0x77')];throw _0x1d24ba['name']+_0x6890('0x78');}};}function checkIsIVRCampaignActive(_0x4ebe68){return function(){if(!utils[_0x6890('0x7a')](_0x4ebe68)){_0x4ebe68[_0x6890('0x6e')]=utils[_0x6890('0x6d')][_0x6890('0x7b')];throw _0x4ebe68[_0x6890('0x49')]+_0x6890('0x7c');}};}function emitCampaignSummary(_0x4da525){if(utils[_0x6890('0x7d')](_0x4da525)){emit(util[_0x6890('0x7e')](_0x6890('0x7f'),_0x4da525[_0x6890('0x49')]),_0x6890('0x80'),_0x4da525);}}function loggerCatchQueueSummary(_0x16e2cd,_0x56822c){return function(_0x1abd08){clearPredictiveAttributes(_0x56822c);emitCampaignSummary(_0x56822c);loggerSyncQueueSummary[_0x6890('0x45')](_0x16e2cd,util['inspect'](_0x1abd08,{'showHidden':![],'depth':null}));};}function notSendMessagesCampaign(_0x466e73){if(_0x466e73['sendMessageOneNotActive']){if(_0x466e73[_0x6890('0x81')]===0x0){_0x466e73[_0x6890('0x82')]=![];_0x466e73[_0x6890('0x6e')]=utils[_0x6890('0x6d')][_0x6890('0x7b')];loggerSyncQueueSummary[_0x6890('0x45')](_0x6890('0x83'),_0x466e73[_0x6890('0x49')],_0x6890('0x84'));}else{_0x466e73[_0x6890('0x6e')]=utils['CAMPAIGN_STATUS']['DISACTIVED'];loggerSyncQueueSummary[_0x6890('0x45')](_0x6890('0x83'),_0x466e73['name'],'is\x20disactive');}emitCampaignSummary(_0x466e73);}}function myreject(_0x294df8){return function(_0x56a2a5){return _0x294df8(msgResponse(_0x6890('0x85'),_0x6890('0x86'),JSON[_0x6890('0x74')](_0x56a2a5)));};}Dialer['prototype'][_0x6890('0x87')]=function(_0x12c117){return!_[_0x6890('0x42')](_0x12c117)&&_0x12c117&&!_[_0x6890('0x42')](_0x12c117[_0x6890('0x49')])&&!_[_0x6890('0x42')](_0x12c117[_0x6890('0x88')])&&_0x12c117['active']&&(this[_0x6890('0x21')][util[_0x6890('0x7e')]('SIP/%s',_0x12c117[_0x6890('0x49')])][_0x6890('0x89')]===_0x6890('0x8a')||this[_0x6890('0x21')][util[_0x6890('0x7e')](_0x6890('0x8b'),_0x12c117[_0x6890('0x49')])]['status']==='unmonitored');};Dialer[_0x6890('0x8c')]['checkIsTrunkReachable']=function(_0x2ef292){var _0x546350=this;return function(){if(!_0x546350['isTrunkReachable'](_0x2ef292['Trunk'])){if(!_0x546350['isTrunkReachable'](_0x2ef292[_0x6890('0x8d')])){_0x2ef292[_0x6890('0x6e')]=utils['CAMPAIGN_STATUS']['TRUNK_NOT_REACHABLE'];throw _0x2ef292[_0x6890('0x49')]+_0x6890('0x8e');}}};};Dialer[_0x6890('0x8c')][_0x6890('0x8f')]=function(_0x4e9bf0,_0x30f12f,_0x1fd422,_0x4e8a87){var _0x58bf8f=this;return function(){var _0x45151f=!![];return _0x58bf8f[_0x6890('0x90')](_0x4e9bf0,_0x30f12f,_0x1fd422,_0x4e8a87,_0x45151f);};};Dialer[_0x6890('0x8c')][_0x6890('0x91')]=function(_0x5d50e8,_0xda9495,_0x443d8c,_0xce5697){var _0x4bcb92=this;return function(){var _0x40b96b=![];return _0x4bcb92[_0x6890('0x90')](_0x5d50e8[_0x6890('0x79')],_0xda9495,_0x443d8c,_0xce5697,_0x40b96b);};};Dialer[_0x6890('0x8c')][_0x6890('0x90')]=function(_0x1d9687,_0x10793f,_0x329aa4,_0x4a1547,_0x202742){var _0x19a034=[];return new Promise(function(_0x336ccf,_0x2530c8){if(!isNotNull(_0x1d9687)){_0x4a1547[_0x6890('0x6e')]=utils['CAMPAIGN_STATUS'][_0x6890('0x77')];return _0x2530c8(msgResponse(_0x6890('0x92'),_0x6890('0x93'),_0x329aa4+_0x6890('0x94')));}if(_[_0x6890('0x4b')](_0x1d9687)){_0x4a1547['message']=utils['CAMPAIGN_STATUS'][_0x6890('0x95')];return _0x2530c8(msgResponse(_0x6890('0x92'),'Failure',_0x329aa4+_0x6890('0x96')));}if(_0x10793f&&_['isUndefined'](config['timezones'][_0x10793f])){_0x4a1547[_0x6890('0x6e')]=utils[_0x6890('0x6d')]['UNKNOWN_TIMEZONE'];return _0x2530c8(msgResponse(_0x6890('0x92'),_0x6890('0x93'),_0x329aa4+_0x6890('0x97')+_0x10793f));}if(_['isArray'](_0x1d9687)){for(var _0x2000f4=0x0;_0x2000f4<_0x1d9687[_0x6890('0x98')];_0x2000f4+=0x1){_0x19a034[_0x6890('0x99')](ami[_0x6890('0x9a')]({'action':_0x6890('0x9b'),'command':util[_0x6890('0x7e')](_0x6890('0x9c'),_0x1d9687[_0x2000f4]['interval'],!_['isUndefined'](config[_0x6890('0x9d')][_0x10793f])?_0x10793f:'')})['then'](function(_0x2b89f0){return _0x2b89f0['content'][_0x6890('0x9e')](_0x6890('0x9f'))>=0x0;})[_0x6890('0xa0')](myreject(_0x2530c8)));}}else{_0x19a034[_0x6890('0x99')](ami[_0x6890('0x9a')]({'action':_0x6890('0x9b'),'command':util[_0x6890('0x7e')](_0x6890('0x9c'),_0x1d9687,!_[_0x6890('0x42')](config['timezones'][_0x10793f])?_0x10793f:'')})[_0x6890('0x40')](function(_0x395268){return _0x395268['content'][_0x6890('0x9e')]('true')>=0x0;})[_0x6890('0xa0')](myreject(_0x2530c8)));}Promise[_0x6890('0xa1')](_0x19a034)['then'](function(_0x5ae5e4){var _0x511f6f=_[_0x6890('0xa2')](_0x5ae5e4);if(_0x511f6f){return _0x336ccf(_0x511f6f);}else{_0x4a1547['message']=_0x202742?utils['CAMPAIGN_STATUS'][_0x6890('0xa3')]:utils[_0x6890('0x6d')][_0x6890('0xa4')];return _0x2530c8(msgResponse(_0x6890('0xa5'),_0x6890('0x93'),_0x6890('0xa6')+_0x202742+'\x20'+_0x329aa4+'\x20Interval\x20is\x20overtime:\x20'+util[_0x6890('0x47')](_0x1d9687,{'showHidden':![],'depth':null})+'Timezone:\x20'+_0x10793f));}})[_0x6890('0xa0')](function(_0x4157e0){return _0x2530c8(msgResponse(_0x6890('0x92'),_0x6890('0x93'),JSON['stringify'](_0x4157e0)));});});};Dialer['prototype']['loopCampaigns']=function(){var _0x5684c2=this;return cmHopper[_0x6890('0xa7')]({'active':![]},{'where':{'active':!![]}})['then'](function(){setInterval(function(){_0x5684c2['syncCampaigns']();},0x3e8);});};Dialer[_0x6890('0x8c')][_0x6890('0xa8')]=function(){var _0x5ce660=this;var _0x431c27;for(var _0x454403 in this[_0x6890('0x1f')]){if(typeof this[_0x6890('0x1f')][_0x454403]!==_0x6890('0xa9')){_0x431c27=this['campaigns'][_0x454403];if(utils[_0x6890('0x7d')](_0x431c27)&&utils['isIVRCampaignActive'](_0x431c27)){_0x431c27['sendMessageOneNotActive']=!![];Promise['resolve']()[_0x6890('0x40')](checkIsIVRCampaignActive(_0x431c27))[_0x6890('0x40')](checkInterval(_0x431c27))['then'](_0x5ce660[_0x6890('0xaa')](_0x431c27))['then'](_0x5ce660[_0x6890('0x8f')](_0x431c27[_0x6890('0xab')],_0x431c27['dialTimezone'],_0x431c27['name'],_0x431c27))[_0x6890('0x40')](_0x5ce660[_0x6890('0x91')](_0x431c27[_0x6890('0x76')],_0x431c27[_0x6890('0xac')],_0x431c27[_0x6890('0x49')],_0x431c27))[_0x6890('0x40')](_0x5ce660[_0x6890('0xad')](_0x431c27))[_0x6890('0xa0')](loggerCatchQueueSummary(_0x6890('0xae'),_0x431c27));}else{notSendMessagesCampaign(_0x431c27);}}}};Dialer[_0x6890('0x8c')][_0x6890('0xaf')]=function(_0x5c69d7){if(_0x5c69d7['dialMethod']!==_0x6890('0xa')){clearPredictiveAttributes(_0x5c69d7);}switch(_0x5c69d7[_0x6890('0xb0')]){case _0x6890('0xb1'):this[_0x6890('0xb2')](_0x5c69d7,0x1);break;case _0x6890('0xb3'):this['handlePower'](_0x5c69d7,_0x5c69d7[_0x6890('0xb4')]);break;case _0x6890('0xa'):this[_0x6890('0xa')](_0x5c69d7);break;case _0x6890('0x9'):this[_0x6890('0xb2')](_0x5c69d7,0x1);break;default:logger[_0x6890('0x69')](_0x6890('0xb5'),_0x5c69d7[_0x6890('0x49')],_0x6890('0xb6'));}};Dialer['prototype']['ifTime']=function(_0x33d89c,_0x113ce5){var _0x5d4991=_0x33d89c[_0x6890('0xac')];var _0x209bb5=_0x113ce5?_0x33d89c['dialGlobalInterval']:_0x33d89c[_0x6890('0x76')][_0x6890('0x79')];logger[_0x6890('0xb7')](_0x6890('0xb8'),_0x209bb5,_0x5d4991,_0x33d89c[_0x6890('0x49')],util['format'](_0x6890('0xb9'),_0x33d89c[_0x6890('0x49')],_0x33d89c['id']));var _0x12c66a=null;return Interval[_0x6890('0xba')](_0x209bb5,_0x5d4991)[_0x6890('0x40')](function(_0x94ecd7){if(_0x94ecd7===!![]){return _0x94ecd7;}else{_0x33d89c[_0x6890('0x6e')]=_0x113ce5?utils[_0x6890('0x6d')][_0x6890('0xa3')]:utils[_0x6890('0x6d')][_0x6890('0xa4')];_0x12c66a=msgResponse('[ifTime][promiseAll]',_0x6890('0x93'),_0x6890('0xa6')+_0x113ce5+'\x20'+_0x33d89c[_0x6890('0x49')]+_0x6890('0xbb')+util['inspect'](_0x209bb5,{'showHidden':![],'depth':null})+_0x6890('0xbc')+_0x5d4991);}if(_0x12c66a!==null){logger[_0x6890('0xb7')](_0x6890('0xbd'),_0x12c66a);_0x12c66a[_0x6890('0xbe')]=_0x113ce5;throw _0x12c66a;}})[_0x6890('0xa0')](function(_0x315549){logger[_0x6890('0x69')](_0x6890('0xbf'),_0x315549);throw msgResponse('[ifTime][Action]',_0x6890('0x86'),util[_0x6890('0x47')](_0x315549,{'showHidden':![],'depth':null}));});};Dialer[_0x6890('0x8c')][_0x6890('0x2d')]=function(_0x484266){if(this[_0x6890('0x1e')][_0x484266[_0x6890('0xc0')]]){if(this['uniqueId'][_0x484266['uniqueid']]&&this[_0x6890('0x25')][_0x484266[_0x6890('0xc1')]]['type']!==_0x6890('0xc2')){this[_0x6890('0xc3')](this[_0x6890('0x1e')][_0x484266['queue']]);this[_0x6890('0x25')][_0x484266[_0x6890('0xc1')]][_0x6890('0xc4')]=moment()[_0x6890('0x7e')](_0x6890('0xc5'));}}};Dialer[_0x6890('0x8c')][_0x6890('0xc6')]=function(_0x1fa666){var _0x1a2dde=this[_0x6890('0x25')][_0x1fa666[_0x6890('0xc1')]];if(this[_0x6890('0x1e')][_0x1fa666[_0x6890('0xc0')]]){if(_0x1a2dde&&_0x1a2dde[_0x6890('0x44')]!==_0x6890('0xc2')){delete this[_0x6890('0x25')][_0x1fa666[_0x6890('0xc1')]];this['voiceQueues'][_0x1fa666[_0x6890('0xc0')]]['outboundAnswerCallsDay']+=0x1;var _0x129216=new AgentComplete(_0x1a2dde,_0x1fa666);if(_0x1fa666[_0x6890('0xc7')]===_0x6890('0xc8')){_0x129216[_0x6890('0xc9')]=this['voiceQueues'][_0x1fa666[_0x6890('0xc0')]][_0x6890('0xca')]&&this[_0x6890('0x1e')][_0x1fa666[_0x6890('0xc0')]][_0x6890('0xcb')]?moment()[_0x6890('0x7e')](_0x6890('0xc5')):undefined;}hopperUtils[_0x6890('0xcc')](_0x129216)[_0x6890('0xa0')](loggerCatch(_0x6890('0xcd')));hopperUtils[_0x6890('0xce')](_0x129216)[_0x6890('0xa0')](loggerCatch(_0x6890('0xcf')));}}};Dialer[_0x6890('0x8c')]['syncQueueCallerAbandon']=function(_0x3863db){var _0x25f48b=this['uniqueId'][_0x3863db[_0x6890('0xc1')]];var _0x5ce08d=this;var _0x4f7a85=![];var _0x4c72ca;var _0x146e12;if(this['voiceQueues'][_0x3863db['queue']]){if(_0x25f48b&&_0x25f48b[_0x6890('0x44')]!==_0x6890('0xc2')){delete this[_0x6890('0x25')][_0x3863db['uniqueid']];this['updateOriginated'](this[_0x6890('0x1e')][_0x3863db[_0x6890('0xc0')]]);_0x25f48b[_0x6890('0xd0')]=moment()[_0x6890('0x7e')]('YYYY-MM-DD\x20HH:mm:ss');var _0x388399=new QueueCallerAbandon(_0x25f48b,_0x3863db);if(utils[_0x6890('0x63')](_0x25f48b['droptime'],_0x25f48b[_0x6890('0xd1')])>=_0x25f48b[_0x6890('0xd2')]){this[_0x6890('0x1e')][_0x3863db[_0x6890('0xc0')]]['predictiveIntervalDroppedCallsTimeout']+=0x1;this[_0x6890('0x1e')][_0x3863db['queue']]['outboundDropCallsDayTimeout']+=0x1;this['voiceQueues'][_0x3863db[_0x6890('0xc0')]][_0x6890('0xd3')]+=0x1;_0x388399[_0x6890('0xd4')]=0xa;_0x388399[_0x6890('0xd5')]='Drop';_0x388399[_0x6890('0xd6')]='TIMEOUT';_0x388399[_0x6890('0xc9')]=this[_0x6890('0x1e')][_0x3863db[_0x6890('0xc0')]][_0x6890('0xca')]?moment()[_0x6890('0x7e')](_0x6890('0xc5')):undefined;_0x388399['countdropretry']+=0x1;_0x388399[_0x6890('0xd7')]+=0x1;_0x4c72ca=this[_0x6890('0x1e')][_0x3863db['queue']]['dialDropRetryFrequency'];_0x146e12=this[_0x6890('0x1e')][_0x3863db['queue']]['callAdditionalPhoneAfterMin'];hopperUtils[_0x6890('0xd8')](_0x388399,_0x388399[_0x6890('0xd4')],_0x25f48b['voiceQueue'])[_0x6890('0x40')](function(_0x252f46){_0x4f7a85=_0x252f46['additional']==0x1;if(_0x388399[_0x6890('0xd9')]>=_0x5ce08d[_0x6890('0x1e')][_0x3863db[_0x6890('0xc0')]]['dialDropMaxRetry']){_0x5ce08d[_0x6890('0xda')](_0x388399,_0x252f46[_0x6890('0xdb')]);}else{hopperUtils[_0x6890('0xdc')]({'active':![],'countdropretry':_0x388399[_0x6890('0xd9')],'scheduledat':moment()[_0x6890('0xdd')](_0x5ce08d[_0x6890('0x1e')][_0x3863db[_0x6890('0xc0')]][_0x6890('0xde')],_0x6890('0xdf'))[_0x6890('0x7e')](_0x6890('0xc5')),'ContactId':_0x25f48b[_0x6890('0xe0')],'ListId':_0x25f48b['ListId'],'VoiceQueueId':_0x25f48b[_0x6890('0xe1')]||undefined,'CampaignId':_0x25f48b[_0x6890('0xe2')]||undefined})['catch'](loggerCatch(_0x6890('0xe3')));var _0x19596e=new History(_0x388399);_0x19596e[_0x6890('0xd4')]=0xa;_0x19596e[_0x6890('0xd5')]=_0x6890('0xe4');_0x19596e[_0x6890('0xe5')]=moment()['format'](_0x6890('0xc5'));_0x19596e[_0x6890('0x70')]=_0x19596e[_0x6890('0xe5')];_0x19596e['calleridname']=_0x388399[_0x6890('0xe6')];_0x19596e['calleridnum']=_0x388399[_0x6890('0xe7')];hopperUtils['createHistory'](_0x19596e)['catch'](loggerCatch(_0x6890('0xe8')));}})[_0x6890('0x40')](function(){if(_0x4f7a85)hopperUtils[_0x6890('0xe9')](_0x388399,_0x4c72ca,_0x146e12)[_0x6890('0x40')](function(){return 0x1;});});}else{this[_0x6890('0x1e')][_0x3863db[_0x6890('0xc0')]]['predictiveIntervalDroppedCallsCallersExit']+=0x1;this['voiceQueues'][_0x3863db['queue']][_0x6890('0xea')]+=0x1;_0x388399[_0x6890('0xd4')]=0xb;_0x388399[_0x6890('0xd5')]=_0x6890('0xeb');_0x388399[_0x6890('0xd6')]=_0x6890('0xec');_0x388399[_0x6890('0xed')]+=0x1;_0x388399[_0x6890('0xd7')]+=0x1;_0x4c72ca=this[_0x6890('0x1e')][_0x3863db[_0x6890('0xc0')]][_0x6890('0xee')];_0x146e12=this[_0x6890('0x1e')][_0x3863db['queue']][_0x6890('0xef')];hopperUtils[_0x6890('0xd8')](_0x388399,_0x388399[_0x6890('0xd4')],_0x25f48b['voiceQueue'])[_0x6890('0x40')](function(_0x38ede6){if(_0x388399[_0x6890('0xed')]>=_0x5ce08d['voiceQueues'][_0x3863db[_0x6890('0xc0')]]['dialAbandonedMaxRetry']){_0x5ce08d[_0x6890('0xda')](_0x388399,_0x38ede6[_0x6890('0xdb')]);}else{hopperUtils[_0x6890('0xdc')]({'active':![],'countabandonedretry':_0x388399['countabandonedretry'],'scheduledat':moment()[_0x6890('0xdd')](_0x5ce08d[_0x6890('0x1e')][_0x3863db[_0x6890('0xc0')]][_0x6890('0xee')],_0x6890('0xdf'))['format']('YYYY-MM-DD\x20HH:mm:ss'),'ContactId':_0x25f48b['ContactId'],'ListId':_0x25f48b[_0x6890('0xf0')],'VoiceQueueId':_0x25f48b['VoiceQueueId']||undefined,'CampaignId':_0x25f48b['CampaignId']||undefined})[_0x6890('0xa0')](loggerCatch(_0x6890('0xf1')));var _0x237e3e=new History(_0x388399);_0x237e3e[_0x6890('0xd4')]=0xb;_0x237e3e[_0x6890('0xd5')]=_0x6890('0xeb');_0x237e3e[_0x6890('0xe5')]=moment()[_0x6890('0x7e')]('YYYY-MM-DD\x20HH:mm:ss');_0x237e3e[_0x6890('0x70')]=_0x237e3e['starttime'];_0x237e3e[_0x6890('0xe6')]=_0x388399[_0x6890('0xe6')];_0x237e3e[_0x6890('0xe7')]=_0x388399['calleridnum'];hopperUtils[_0x6890('0xcc')](_0x237e3e)[_0x6890('0xa0')](loggerCatch(_0x6890('0xf2')));}})[_0x6890('0x40')](function(){if(_0x4f7a85)hopperUtils[_0x6890('0xe9')](_0x388399,_0x4c72ca,_0x146e12)[_0x6890('0x40')](function(){return 0x1;});});}}}};Dialer[_0x6890('0x8c')][_0x6890('0x39')]=function(_0x3ee741){if(this['actions'][_0x3ee741[_0x6890('0xc1')]]){this[_0x6890('0xf3')][_0x3ee741[_0x6890('0xc1')]][_0x6890('0xf4')]=_0x3ee741['channel'];}if(this[_0x6890('0x25')][_0x3ee741['uniqueid']]){this['uniqueId'][_0x3ee741[_0x6890('0xc1')]][_0x6890('0xf4')]=_0x3ee741['channel'];}};Dialer['prototype']['syncQueueMember']=function(_0x29abcb){if(!this[_0x6890('0xf3')][_0x29abcb['actionid']]){return;}var _0x498a2b=this[_0x6890('0x1e')][this['actions'][_0x29abcb['actionid']]['queue']][_0x6890('0xf5')]||_0x6890('0xf6');if(_0x498a2b===_0x6890('0xf7')){if(this[_0x6890('0xf3')][_0x29abcb[_0x6890('0xf8')]]&&_[_0x6890('0xf9')](this[_0x6890('0xf3')][_0x29abcb[_0x6890('0xf8')]]['locked'])&&_0x29abcb[_0x6890('0x89')]==='1'&&_0x29abcb[_0x6890('0xfa')]==='0'){if(this['agents'][_0x29abcb[_0x6890('0xfb')]]){if(!this[_0x6890('0x20')][_0x29abcb[_0x6890('0xfb')]]['locked']){this['agents'][_0x29abcb[_0x6890('0xfb')]][_0x6890('0xfc')]=!![];this[_0x6890('0xf3')][_0x29abcb[_0x6890('0xf8')]]['locked']=!![];this[_0x6890('0xf3')][_0x29abcb[_0x6890('0xf8')]][_0x6890('0xfb')]=_0x29abcb[_0x6890('0xfb')];}}}}else if(_0x498a2b===_0x6890('0xf6')){if(this[_0x6890('0xf3')][_0x29abcb[_0x6890('0xf8')]]){if(this[_0x6890('0x20')][_0x29abcb[_0x6890('0xfb')]]){this[_0x6890('0xf3')][_0x29abcb[_0x6890('0xf8')]][_0x6890('0xfb')]=_0x29abcb[_0x6890('0xfb')];if(_[_0x6890('0xf9')](this[_0x6890('0x29')][this[_0x6890('0xf3')][_0x29abcb[_0x6890('0xf8')]][_0x6890('0xc0')]])){this[_0x6890('0x29')][this[_0x6890('0xf3')][_0x29abcb[_0x6890('0xf8')]]['queue']]=[];}this[_0x6890('0x29')][this[_0x6890('0xf3')][_0x29abcb['actionid']][_0x6890('0xc0')]][_0x6890('0x99')](_['merge'](_[_0x6890('0x75')](this[_0x6890('0xf3')][_0x29abcb[_0x6890('0xf8')]],[_0x6890('0xfd'),_0x6890('0xfb')]),{'status':_0x29abcb['status'],'paused':_0x29abcb['paused']}));}}}};Dialer[_0x6890('0x8c')][_0x6890('0x3d')]=function(_0x85ddd9){if(!this[_0x6890('0xf3')][_0x85ddd9[_0x6890('0xf8')]]){return;}var _0x2eab80=this;var _0xa2ff71=this['voiceQueues'][this['actions'][_0x85ddd9[_0x6890('0xf8')]][_0x6890('0xc0')]];var _0x16db89=_0xa2ff71[_0x6890('0xf5')]||'rrmemory';if(_0x16db89===_0x6890('0xf7')){if(this['actions'][_0x85ddd9[_0x6890('0xf8')]]&&this['actions'][_0x85ddd9[_0x6890('0xf8')]]['stateinterface']){this[_0x6890('0x1d')][_0x6890('0xfe')](this['actions'][_0x85ddd9['actionid']][_0x6890('0xfd')],this[_0x6890('0xf3')][_0x85ddd9['actionid']]['stateinterface'])[_0x6890('0xa0')](function(_0x2851c0){logger[_0x6890('0x69')](_0x6890('0xff'),util[_0x6890('0x47')](_0x2851c0,{'showHidden':![],'depth':null}));})[_0x6890('0x100')](function(){_0x2eab80[_0x6890('0xc3')](_0x2eab80[_0x6890('0x1e')][_0x2eab80[_0x6890('0xf3')][_0x85ddd9['actionid']][_0x6890('0xc0')]]);_0x2eab80[_0x6890('0x20')][_0x2eab80[_0x6890('0xf3')][_0x85ddd9[_0x6890('0xf8')]]['stateinterface']]['locked']=![];delete _0x2eab80[_0x6890('0xf3')][_0x85ddd9[_0x6890('0xf8')]];unlockQueueStatus(_0xa2ff71);});}else{this[_0x6890('0xc3')](this[_0x6890('0x1e')][this[_0x6890('0xf3')][_0x85ddd9[_0x6890('0xf8')]][_0x6890('0xc0')]]);hopperUtils[_0x6890('0xdc')]({'active':![],'ContactId':this[_0x6890('0xf3')][_0x85ddd9[_0x6890('0xf8')]][_0x6890('0xe0')],'ListId':this[_0x6890('0xf3')][_0x85ddd9[_0x6890('0xf8')]]['ListId'],'VoiceQueueId':this[_0x6890('0xf3')][_0x85ddd9['actionid']][_0x6890('0xe1')]||undefined,'CampaignId':this['actions'][_0x85ddd9[_0x6890('0xf8')]][_0x6890('0xe2')]||undefined})[_0x6890('0xa0')](loggerCatch(_0x6890('0x101')));delete this[_0x6890('0xf3')][_0x85ddd9[_0x6890('0xf8')]];unlockQueueStatus(_0xa2ff71);}}else if(_0x16db89===_0x6890('0xf6')){var _0x253589;if(this[_0x6890('0xf3')][_0x85ddd9[_0x6890('0xf8')]]&&!_['isEmpty'](this[_0x6890('0x29')][this[_0x6890('0xf3')][_0x85ddd9[_0x6890('0xf8')]][_0x6890('0xc0')]])){if(this[_0x6890('0x2a')][_0x2eab80[_0x6890('0xf3')][_0x85ddd9[_0x6890('0xf8')]][_0x6890('0xc0')]]){this['queueBookedRR'][_0x2eab80[_0x6890('0xf3')][_0x85ddd9[_0x6890('0xf8')]][_0x6890('0xc0')]]=this[_0x6890('0x2a')][this[_0x6890('0xf3')][_0x85ddd9['actionid']][_0x6890('0xc0')]]?this[_0x6890('0x2a')][this[_0x6890('0xf3')][_0x85ddd9['actionid']][_0x6890('0xc0')]]:this[_0x6890('0x29')][this[_0x6890('0xf3')][_0x85ddd9[_0x6890('0xf8')]][_0x6890('0xc0')]]?this[_0x6890('0x29')][this[_0x6890('0xf3')][_0x85ddd9[_0x6890('0xf8')]][_0x6890('0xc0')]][_0x6890('0x102')]||0x0:0x0;}this['queueBooked'][this[_0x6890('0xf3')][_0x85ddd9[_0x6890('0xf8')]][_0x6890('0xc0')]]['_rr']=this[_0x6890('0x2a')][this[_0x6890('0xf3')][_0x85ddd9['actionid']][_0x6890('0xc0')]];for(var _0x4b3bf8=0x0;_0x4b3bf8=_0x202fbe[_0x6890('0x124')]){_0x4a43ac[_0x6890('0x125')](_0x12b859,_0x2cccf0,_0x2b85f3,'reason19\x20machine....');}else{if(_0x12b859[_0x6890('0x11f')]>=_0x202fbe[_0x6890('0x126')]){_0x4a43ac[_0x6890('0x127')](_0x12b859,_0x2cccf0,_0x2b85f3,_0x6890('0x128'));}else{hopperUtils[_0x6890('0xdc')]({'active':![],'countmachineretry':_0x12b859[_0x6890('0x11f')],'scheduledat':moment()['add'](_0x202fbe['dialMachineRetryFrequency'],_0x6890('0xdf'))[_0x6890('0x7e')](_0x6890('0xc5')),'ContactId':_0x12b859[_0x6890('0xe0')],'ListId':_0x12b859[_0x6890('0xf0')],'VoiceQueueId':_0x12b859[_0x6890('0xe1')]||undefined,'CampaignId':_0x12b859[_0x6890('0xe2')]||undefined})[_0x6890('0xa0')](loggerCatch(_0x6890('0x129')));_0x2cccf0({'reschedule':0x1});}}});}if(_0x4c91a3[_0x6890('0x44')]===_0x6890('0xc2')&&this[_0x6890('0x1f')][_0x4c91a3[_0x6890('0xc0')]][_0x6890('0x112')]&&_0x1556cf[_0x6890('0x113')]==='HANGUP'){delete this['uniqueId'][_0x1556cf[_0x6890('0xc1')]];this['updateOriginated'](this[_0x6890('0x1f')][_0x4c91a3[_0x6890('0xc0')]]);_0x129d56=new Hangup(_0x4c91a3,_0x1556cf);_0x129d56[_0x6890('0xd4')]=0x12;_0x129d56['statedesc']=_0x6890('0x117');_0x129d56['membername']='AMD';ami[_0x6890('0x43')](_0x6890('0x12a'),ut[_0x6890('0x120')](_0x129d56,_0x6890('0x119')));this['saveInDb'](_0x129d56,_0x6890('0x12b'),_0x6890('0x12c'));}if(_0x4c91a3[_0x6890('0x44')]===_0x6890('0xc2')&&this['campaigns'][_0x4c91a3['queue']]['dialAMDActive']&&_0x1556cf[_0x6890('0x113')]===_0x6890('0x11c')){return new Promise(function(_0x19a9db,_0x2067df){delete _0x4a43ac[_0x6890('0x25')][_0x1556cf[_0x6890('0xc1')]];_0x4a43ac['updateOriginated'](_0x4a43ac[_0x6890('0x1f')][_0x4c91a3[_0x6890('0xc0')]]);_0x4a43ac[_0x6890('0x1f')][_0x4c91a3['queue']]['outboundAnswerCallsDay']+=0x1;_0x4a43ac[_0x6890('0x1f')][_0x4c91a3[_0x6890('0xc0')]][_0x6890('0x116')]+=0x1;var _0x3a765f=_0x4a43ac[_0x6890('0x1f')][_0x4c91a3[_0x6890('0xc0')]];var _0x2876a5=new Hangup(_0x4c91a3,_0x1556cf);_0x2876a5[_0x6890('0xd4')]=0x13;_0x2876a5[_0x6890('0xd5')]=_0x6890('0x11d');_0x2876a5[_0x6890('0x11e')]=_0x6890('0x118');_0x2876a5['countmachineretry']+=0x1;_0x2876a5[_0x6890('0xd7')]+=0x1;_0x2876a5[_0x6890('0x119')]=!![];ami[_0x6890('0x43')](_0x6890('0x12a'),ut[_0x6890('0x120')](_0x2876a5,_0x6890('0x119')));hopperUtils[_0x6890('0xcc')](_0x2876a5)['catch'](loggerCatch(_0x6890('0x12d')));if(_0x2876a5[_0x6890('0x121')]+_0x2876a5[_0x6890('0x122')]+_0x2876a5[_0x6890('0x123')]+_0x2876a5['countnosuchnumberretry']+_0x2876a5[_0x6890('0xd9')]+_0x2876a5['countabandonedretry']+_0x2876a5[_0x6890('0x11f')]+_0x2876a5['countagentrejectretry']>=_0x3a765f[_0x6890('0x124')]){_0x4a43ac['stateGlobal'](_0x2876a5,_0x19a9db,_0x2067df,_0x6890('0x12e'));}else{if(_0x2876a5[_0x6890('0x11f')]>=_0x3a765f['dialMachineMaxRetry']){_0x4a43ac[_0x6890('0x127')](_0x2876a5,_0x19a9db,_0x2067df,_0x6890('0x128'));}else{hopperUtils['rescheduleContact']({'active':![],'countmachineretry':_0x2876a5[_0x6890('0x11f')],'scheduledat':moment()[_0x6890('0xdd')](_0x3a765f[_0x6890('0x12f')],_0x6890('0xdf'))['format']('YYYY-MM-DD\x20HH:mm:ss'),'ContactId':_0x2876a5[_0x6890('0xe0')],'ListId':_0x2876a5[_0x6890('0xf0')],'VoiceQueueId':_0x2876a5['VoiceQueueId']||undefined,'CampaignId':_0x2876a5[_0x6890('0xe2')]||undefined})['catch'](loggerCatch(_0x6890('0x129')));_0x19a9db({'reschedule':0x1});}}});}}};Dialer['prototype']['syncHangup']=function(_0x13b871){var _0x16001f=this['uniqueId'][_0x13b871['uniqueid']];var _0x574bb9;if(_0x16001f&&_0x16001f['type']===_0x6890('0xc2')){delete this['uniqueId'][_0x13b871[_0x6890('0xc1')]];this[_0x6890('0xc3')](this[_0x6890('0x1f')][_0x16001f[_0x6890('0xc0')]]);this[_0x6890('0x1f')][_0x16001f[_0x6890('0xc0')]][_0x6890('0x130')]+=0x1;_0x574bb9=new Hangup(_0x16001f,_0x13b871);hopperUtils[_0x6890('0xcc')](_0x574bb9)['catch'](loggerCatch('[syncHangupIvr][createHistory]'));hopperUtils[_0x6890('0xce')](_0x574bb9)['catch'](loggerCatch('[syncHangupIvr]'));}if(_0x16001f&&_0x16001f[_0x6890('0x44')]!=='ivr'&&isNotNull(this[_0x6890('0x1e')][_0x16001f['queue']]['dialQueueProject'])){delete this[_0x6890('0x25')][_0x13b871[_0x6890('0xc1')]];this[_0x6890('0xc3')](this[_0x6890('0x1e')][_0x16001f[_0x6890('0xc0')]]);this['voiceQueues'][_0x16001f[_0x6890('0xc0')]][_0x6890('0x115')]+=0x1;this[_0x6890('0x1e')][_0x16001f['queue']][_0x6890('0x116')]+=0x1;_0x574bb9=new Hangup(_0x16001f,_0x13b871);_0x574bb9['state']=0x10;_0x574bb9['statedesc']=_0x6890('0x131');_0x574bb9['membername']='AGI';hopperUtils[_0x6890('0xcc')](_0x574bb9)['catch'](loggerCatch(_0x6890('0x132')));hopperUtils[_0x6890('0xce')](_0x574bb9)[_0x6890('0xa0')](loggerCatch(_0x6890('0x133')));}if(_0x16001f&&_0x16001f[_0x6890('0x44')]!==_0x6890('0xc2')&&!isNotNull(this['voiceQueues'][_0x16001f[_0x6890('0xc0')]][_0x6890('0x134')])){delete this[_0x6890('0x25')][_0x13b871[_0x6890('0xc1')]];this[_0x6890('0xc3')](this[_0x6890('0x1e')][_0x16001f[_0x6890('0xc0')]]);this['voiceQueues'][_0x16001f[_0x6890('0xc0')]][_0x6890('0x135')]+=0x1;_0x574bb9=new Hangup(_0x16001f,_0x13b871);_0x574bb9[_0x6890('0xd4')]=0xc;_0x574bb9['statedesc']=_0x13b871['cause-txt'];_0x574bb9[_0x6890('0x11e')]=_0x6890('0x136');hopperUtils[_0x6890('0xcc')](_0x574bb9)[_0x6890('0xa0')](loggerCatch('[syncHangupIvr][createHistory]'));hopperUtils[_0x6890('0xce')](_0x574bb9)[_0x6890('0xa0')](loggerCatch('[syncHangupIvr]'));}};Dialer[_0x6890('0x8c')]['syncQueueSummary']=function(_0x2e6734){var _0x26773d=this;if(!_0x26773d[_0x6890('0x2b')][_0x2e6734[_0x6890('0x49')]]){_0x26773d[_0x6890('0x2b')][_0x2e6734[_0x6890('0x49')]]={'running':![]};}else if(_0x26773d[_0x6890('0x2b')][_0x2e6734[_0x6890('0x49')]][_0x6890('0x137')]===!![]){return;}else if(_0x26773d[_0x6890('0x2b')][_0x2e6734[_0x6890('0x49')]]['running']===![]){_0x26773d[_0x6890('0x2b')][_0x2e6734[_0x6890('0x49')]][_0x6890('0x137')]=!![];}var _0x103a40=_0x26773d[_0x6890('0x1e')][_0x2e6734['name']];var _0x13dbc3=_0x103a40[_0x6890('0x6e')]!==utils['CAMPAIGN_STATUS'][_0x6890('0x7b')];var _0x4d994d=utils['isPreviewCampaign'](_0x103a40);_0x103a40['statusMessage']=utils[_0x6890('0x138')](_0x103a40,_0x26773d['trunks']);Promise[_0x6890('0x139')]()[_0x6890('0x40')](function(){if(_0x103a40[_0x6890('0x13a')]===utils['CAMPAIGN_STATUS']['INACTIVE']){if(_0x13dbc3){clearPredictiveAttributes(_0x103a40);_0x2e6734[_0x6890('0x65')]=undefined;_0x2e6734[_0x6890('0x27')]=undefined;}if(_0x103a40['statusMessage']===utils['CAMPAIGN_STATUS']['INACTIVE']){_0x2e6734['available']=0x0;_0x2e6734[_0x6890('0xfa')]=0x0;_0x2e6734['inUse']=0x0;_0x2e6734[_0x6890('0x13b')]=0x0;_0x2e6734['pTalking']=0x0;}}else if(_0x103a40[_0x6890('0x13a')]===utils[_0x6890('0x6d')][_0x6890('0x13c')]&&!_0x4d994d){return _0x26773d[_0x6890('0x92')](_0x103a40,!![])[_0x6890('0x40')](function(){return _0x26773d[_0x6890('0x92')](_0x103a40,![]);})[_0x6890('0x40')](function(){return _0x26773d[_0x6890('0xaf')](_0x103a40);})[_0x6890('0xa0')](function(_0x3af79d){loggerSyncQueueSummary[_0x6890('0x45')](_0x6890('0x13d'),util[_0x6890('0x47')](_0x3af79d,{'showHidden':![],'depth':null}));clearPredictiveAttributes(_0x103a40);});}else{clearPredictiveAttributes(_0x103a40);}})[_0x6890('0x40')](function(){var _0x505bef=_0x2e6734[_0x6890('0x13e')](_0x103a40);if(_0x505bef||_0x103a40[_0x6890('0x13f')]){_0x103a40[_0x6890('0x13f')]=![];_0x2e6734[_0x6890('0x140')](_0x103a40);Object[_0x6890('0x141')](_0x103a40,_0x2e6734);emitOutboundVoiceQueueSummary(_0x2e6734);}_0x26773d[_0x6890('0x2b')][_0x103a40[_0x6890('0x49')]][_0x6890('0x137')]=![];})[_0x6890('0xa0')](function(_0x460bce){logger[_0x6890('0x69')](_0x6890('0x13d'),util[_0x6890('0x47')](_0x460bce,{'showHidden':![],'depth':null}));_0x26773d['queuesSummary'][_0x103a40[_0x6890('0x49')]]['running']=![];});};Dialer[_0x6890('0x8c')][_0x6890('0x35')]=_['throttle'](function(){var _0x1dee28=_[_0x6890('0x142')](this[_0x6890('0x1e')],function(_0x5bc70b){return _0x5bc70b[_0x6890('0x143')];});var _0x46540b=_[_0x6890('0x142')](this[_0x6890('0x20')],function(_0x18abe5){return _0x18abe5['online']&&_0x18abe5[_0x6890('0x89')]===_0x6890('0x8a');});if(_0x1dee28['length']>0x0&&_0x46540b[_0x6890('0x98')]>0x0){return Promise['resolve']()['then'](cmHopper['handlePreviewRecallNotifications'](_[_0x6890('0x144')](_0x1dee28,'id'),previewRecallmeReminderInterval,_[_0x6890('0x144')](_0x46540b,'id')))[_0x6890('0x40')](function(_0x59827f){for(var _0x4f632b=0x0;_0x4f632b<_0x59827f[_0x6890('0x98')];_0x4f632b++){var _0x35a3b3=_0x59827f[_0x4f632b][_0x6890('0x145')]['name'];if(_0x35a3b3)io['to'](util['format'](_0x6890('0x146'),_0x35a3b3))[_0x6890('0x43')]('user:dialPreviewRecallReminder',{'hopper':_0x59827f[_0x4f632b]});}})['catch'](function(_0x310d24){logger[_0x6890('0x69')]('checkPreviewRecallReminder',_0x310d24);});}},0x3c*0x3e8,{'leading':!![]});Dialer[_0x6890('0x8c')]['loopClearZombieChannels']=function(){var _0xec6236=this;setInterval(function(){_0xec6236[_0x6890('0x147')](_0xec6236[_0x6890('0x25')],_0x6890('0x148'));_0xec6236[_0x6890('0x147')](_0xec6236[_0x6890('0xf3')],'[actions]');},0x32c8);};Dialer[_0x6890('0x8c')][_0x6890('0x147')]=function(_0x16e246,_0x3449bb){var _0x481ab9=this;for(var _0x1b6962 in _0x16e246){if(typeof _0x16e246[_0x1b6962]!==_0x6890('0xa9')){this[_0x6890('0x1c')]['enqueue'](function(){if(!_['isNil'](_0x16e246[_0x1b6962])){return ami[_0x6890('0x9a')]({'action':_0x6890('0x89'),'channel':_0x16e246[_0x1b6962][_0x6890('0xf4')]})[_0x6890('0xa0')](function(_0x48c5b0){if(_0x48c5b0['message']===_0x6890('0x149')){setTimeout(function(){if(_0x16e246[_0x1b6962]&&_0x16e246[_0x1b6962]['type']!==_0x6890('0xc2')){_0x481ab9[_0x6890('0xc3')](_0x481ab9[_0x6890('0x1e')][_0x16e246[_0x1b6962][_0x6890('0xc0')]]);logger[_0x6890('0x69')](_0x6890('0x14a'),_0x3449bb,_0x1b6962,_0x16e246[_0x1b6962][_0x6890('0xc0')]);delete _0x16e246[_0x1b6962];}if(_0x16e246[_0x1b6962]&&_0x16e246[_0x1b6962]['type']===_0x6890('0xc2')){_0x481ab9[_0x6890('0xc3')](_0x481ab9[_0x6890('0x1f')][_0x16e246[_0x1b6962][_0x6890('0xc0')]]);logger['error'](_0x6890('0x14b'),_0x3449bb,_0x1b6962,_0x16e246[_0x1b6962]['queue']);delete _0x16e246[_0x1b6962];}},0x2328);}});}});}}};Dialer['prototype'][_0x6890('0x14c')]=function(_0x4949fa){return Promise['resolve']()[_0x6890('0x40')](voiceQueueRt['getVoiceQueueRtPauses'](_0x4949fa))['catch'](loggerCatch('[getVoiceQueueRtPauses]\x20'));};Dialer['prototype'][_0x6890('0xc3')]=function(_0x1eaacc){if(!_[_0x6890('0x42')](_0x1eaacc)&&_0x1eaacc!==null){if(typeof _0x1eaacc['originated']!==_0x6890('0xa9')){if(_0x1eaacc['originated']>0x0){_0x1eaacc[_0x6890('0x81')]-=0x1;}else{logger[_0x6890('0x69')](_0x6890('0x14d'));}}}else{logger['error'](_0x6890('0x14e'));}};Dialer['prototype'][_0x6890('0x14f')]=function(_0x7bc8bb,_0x56a85b){var _0x76b761=this;return function(_0x47740a){_0x76b761[_0x6890('0xc3')](_0x56a85b);logger[_0x6890('0x69')](_0x7bc8bb,util['inspect'](_0x47740a,{'showHidden':![],'depth':null}));};};Dialer[_0x6890('0x8c')][_0x6890('0x150')]=function(_0x15c4e5,_0xde9a75,_0x5cf30a){var _0x48ba67={'state':0x19,'statedesc':_0x6890('0x151')};this[_0x6890('0xc3')](_0xde9a75);this['saveInDb'](_['merge'](_0x48ba67,_[_0x6890('0x75')](_0x5cf30a,[_0x6890('0xe0'),_0x6890('0xf0'),_0x6890('0x152'),_0x6890('0xe1'),_0x6890('0xe2')])),_0x6890('0x153'),_0x6890('0x154'));logger[_0x6890('0x69')](_0x15c4e5);};Dialer[_0x6890('0x8c')]['saveInDb']=function(_0x1f547d,_0x2cfd68,_0x4b0ae9){hopperUtils[_0x6890('0xcc')](_0x1f547d)['catch'](loggerCatch(_0x2cfd68));hopperUtils['moveContactManagedDialer'](_0x1f547d)[_0x6890('0xa0')](loggerCatch(_0x4b0ae9));};Dialer[_0x6890('0x8c')]['queueCallerAbandonCreateState']=function(_0x212296,_0x3b1718){hopperUtils[_0x6890('0xcc')](_0x212296)[_0x6890('0xa0')](loggerCatch(_0x6890('0xcd')));if(_0x3b1718==0x0){hopperUtils[_0x6890('0xce')](_0x212296)[_0x6890('0xa0')](loggerCatch(_0x6890('0x155')));}};Dialer['prototype']['checkPreviewRecallReminder']=function(_0x454b70){return Promise[_0x6890('0x139')]()[_0x6890('0x40')](cmHopper[_0x6890('0x156')](_0x454b70['id'],previewRecallmeReminderInterval))[_0x6890('0x40')](function(_0x49a01d){for(var _0x26e37f=0x0;_0x26e37f<_0x49a01d[_0x6890('0x98')];_0x26e37f++){var _0x42168a=_0x49a01d[_0x26e37f]['Agent'][_0x6890('0x49')];if(_0x42168a)io['to'](util[_0x6890('0x7e')](_0x6890('0x146'),_0x42168a))[_0x6890('0x43')](_0x6890('0x157'),{'hopper':_0x49a01d[_0x26e37f]});}})[_0x6890('0xa0')](function(){});};Dialer[_0x6890('0x8c')][_0x6890('0xad')]=function(_0x11e972){var _0x5cc4b1=this;return function(){_0x5cc4b1[_0x6890('0x158')](_0x11e972);};};Dialer[_0x6890('0x8c')]['actionOriginate']=function(_0x5bcf56,_0x4599c3){var _0x3a1500=this;var _0x24f2bf=uuid['v4']();this[_0x6890('0xf3')][_0x24f2bf]=new Action(_0x5bcf56,_0x4599c3,_0x24f2bf);return new Promise(function(_0x2ff73e,_0x51c61e){if(_['isUndefined'](_0x5bcf56)&&typeof _0x5bcf56!==_0x6890('0x159')){return _0x51c61e(msgResponse(_0x6890('0x15a'),_0x6890('0x93'),_0x6890('0x15b')));}if(_[_0x6890('0x42')](_0x4599c3[_0x6890('0x15c')])||_0x4599c3[_0x6890('0x15c')]===null){return _0x51c61e(msgResponse('originate','Failure',_0x6890('0x15d')));}var _0x4c31fa={'XMD-CALLERID':_0x3a1500['actions'][_0x24f2bf]['getCaller'](),'XMD-AGI':_0x5bcf56[_0x6890('0x134')]?util['format'](_0x6890('0x15e'),ipAgi,_0x5bcf56[_0x6890('0x134')]):'NONE','XMD-AGIAFTER':_0x5bcf56[_0x6890('0xca')]?util[_0x6890('0x7e')](_0x6890('0x15e'),ipAgi,_0x5bcf56[_0x6890('0xca')]):_0x6890('0x15f'),'XMD-QUEUE':utils[_0x6890('0x160')](_0x5bcf56)?util[_0x6890('0x7e')](_0x6890('0x161'),_0x5bcf56[_0x6890('0x49')],_0x5bcf56['dialQueueOptions']||'',_0x5bcf56[_0x6890('0xcb')]?'c':'',_0x5bcf56[_0x6890('0xd2')]||0x3):'NONE','XMD-CONTACTID':_0x4599c3[_0x6890('0xe0')],'XMD-CDRTYPE':_0x6890('0x8'),'CALLERID(all)':_0x3a1500['actions'][_0x24f2bf][_0x6890('0x162')](),'XMD-AMD':_0x5bcf56[_0x6890('0x112')]?_0x6890('0x13c'):'NONE','XMD-DESTINATION':_0x6890('0x163')};if(_0x5bcf56['dialAMDActive']){_0x4c31fa[_0x6890('0x164')]=_0x5bcf56['dialAMDInitialSilence']||0x9c4;_0x4c31fa['XMD-AMDGREETING']=_0x5bcf56[_0x6890('0x165')]||0x5dc;_0x4c31fa[_0x6890('0x166')]=_0x5bcf56[_0x6890('0x167')]||0x320;_0x4c31fa[_0x6890('0x168')]=_0x5bcf56[_0x6890('0x169')]||0x1388;_0x4c31fa[_0x6890('0x16a')]=_0x5bcf56['dialAMDMinWordLength']||0x64;_0x4c31fa[_0x6890('0x16b')]=_0x5bcf56[_0x6890('0x16c')]||0x32;_0x4c31fa['XMD-AMDMAXIMUMNUMBEROFWORDS']=_0x5bcf56[_0x6890('0x16d')]||0x3;_0x4c31fa[_0x6890('0x16e')]=_0x5bcf56['dialAMDSilenceThreshold']||0x100;_0x4c31fa[_0x6890('0x16f')]=_0x5bcf56['dialAMDMaximumWordLength']||0x1388;}if(utils[_0x6890('0x160')](_0x5bcf56)){_0x4c31fa[_0x6890('0x170')]=_0x4599c3[_0x6890('0xe1')];}else{_0x4c31fa['XMD-CAMPAIGNID']=_0x4599c3['CampaignId'];}var _0x2abc30=utils[_0x6890('0x171')](_0x4599c3[_0x6890('0x172')]);Object[_0x6890('0x141')](_0x4c31fa,_0x2abc30);var _0x5d9025=_0x3a1500['isTrunkReachable'](_0x5bcf56[_0x6890('0x173')])?utils[_0x6890('0x174')](_0x5bcf56[_0x6890('0x173')][_0x6890('0x175')],_0x5bcf56[_0x6890('0x176')],_0x5bcf56[_0x6890('0x177')]>0x0?utils['getCallerIdRandom'](_0x5bcf56[_0x6890('0x178')],_0x5bcf56['dialRandomLastDigitCallerIdNumber']):_0x5bcf56[_0x6890('0x178')]):utils[_0x6890('0x174')](_['isNil'](_0x5bcf56[_0x6890('0x8d')])?_0x5bcf56[_0x6890('0x173')][_0x6890('0x175')]:_0x5bcf56[_0x6890('0x8d')][_0x6890('0x175')],_0x5bcf56[_0x6890('0x176')],_0x5bcf56[_0x6890('0x177')]>0x0?utils[_0x6890('0x179')](_0x5bcf56[_0x6890('0x178')],_0x5bcf56[_0x6890('0x177')]):_0x5bcf56[_0x6890('0x178')]);if(_0x5d9025){_0x4c31fa[_0x6890('0x17a')]=_0x3a1500[_0x6890('0xf3')][_0x24f2bf]['originatecalleridname']=utils['extractCalleridName'](_0x5d9025);_0x4c31fa[_0x6890('0x17b')]=_0x4599c3[_0x6890('0x15c')];}_0x5bcf56[_0x6890('0x17c')]=_0x4c31fa;return ami[_0x6890('0x9a')]({'actionid':_0x24f2bf,'action':_0x6890('0x15a'),'channel':_0x3a1500[_0x6890('0x87')](_0x5bcf56['Trunk'])?util['format']('SIP/%s/%s%s',_0x5bcf56[_0x6890('0x173')][_0x6890('0x49')],isNotNull(_0x5bcf56['dialPrefix'])?_0x5bcf56[_0x6890('0x17d')][_0x6890('0x17e')]()||'':'',_0x5bcf56['dialCutDigit']>0x0?_0x4599c3[_0x6890('0x15c')]['substring'](_0x5bcf56['dialCutDigit']):_0x4599c3[_0x6890('0x15c')]):util[_0x6890('0x7e')](_0x6890('0x17f'),_['isNil'](_0x5bcf56[_0x6890('0x8d')])?_0x5bcf56[_0x6890('0x173')][_0x6890('0x49')]:_0x5bcf56['TrunkBackup'][_0x6890('0x49')],isNotNull(_0x5bcf56[_0x6890('0x17d')])?_0x5bcf56[_0x6890('0x17d')][_0x6890('0x17e')]()||'':'',_0x5bcf56[_0x6890('0x180')]>0x0?_0x4599c3[_0x6890('0x15c')]['substring'](_0x5bcf56[_0x6890('0x180')]):_0x4599c3[_0x6890('0x15c')]),'callerid':_0x5d9025,'Exten':'xcally-motion-dialer','Context':'from-sip','Priority':'1','variable':_0x4c31fa,'timeout':(_0x5bcf56[_0x6890('0x181')]||0x1e)*0x3e8,'async':!![],'channelid':_0x24f2bf})[_0x6890('0x40')](function(_0x4126eb){return _0x2ff73e(_0x4126eb);})[_0x6890('0xa0')](function(_0x231e75){_0x5bcf56[_0x6890('0x182')]+=0x1;var _0x52f93f=new History(_0x3a1500['actions'][_0x24f2bf]);logger[_0x6890('0x69')](util[_0x6890('0x7e')](_0x6890('0x183'),JSON[_0x6890('0x74')](_0x231e75)));_0x52f93f[_0x6890('0xd4')]=0xe;_0x52f93f[_0x6890('0xd5')]=_0x6890('0x184');_0x52f93f['starttime']=moment()[_0x6890('0x7e')]('YYYY-MM-DD\x20HH:mm:ss');_0x52f93f[_0x6890('0x70')]=_0x52f93f[_0x6890('0xe5')];hopperUtils[_0x6890('0xcc')](_0x52f93f)[_0x6890('0xa0')](loggerCatch(_0x6890('0x185')));_0x3a1500[_0x6890('0xce')](_0x52f93f)[_0x6890('0xa0')](loggerCatch(_0x6890('0x185')))[_0x6890('0x100')](function(){delete _0x3a1500[_0x6890('0xf3')][_0x24f2bf];return _0x51c61e(msgResponse('originate',_0x6890('0x86'),_0x6890('0x186')));});});});};Dialer['prototype'][_0x6890('0x187')]=function(_0x4267e5,_0x56f001,_0x36d459){var _0x5a641d=new History(_0x56f001);if(_0x5a641d[_0x6890('0x121')]+_0x5a641d[_0x6890('0x122')]+_0x5a641d[_0x6890('0x123')]+_0x5a641d[_0x6890('0x188')]+_0x5a641d[_0x6890('0xd9')]+_0x5a641d[_0x6890('0xed')]+_0x5a641d[_0x6890('0x11f')]+_0x5a641d[_0x6890('0x189')]>=_0x36d459[_0x6890('0x124')]-0x1){return!![];}switch(_0x4267e5){case 0x3:if(_0x5a641d['countnoanswerretry']>=_0x36d459[_0x6890('0x18a')]-0x1){return!![];}hopperUtils[_0x6890('0xdc')]({'active':![],'countnoanswerretry':_0x5a641d[_0x6890('0x123')]+=0x1,'scheduledat':moment()['add'](_0x36d459[_0x6890('0x18b')],'minutes')['format'](_0x6890('0xc5')),'ContactId':_0x5a641d[_0x6890('0xe0')],'ListId':_0x5a641d[_0x6890('0xf0')],'VoiceQueueId':_0x5a641d[_0x6890('0xe1')]||undefined,'CampaignId':_0x5a641d[_0x6890('0xe2')]||undefined})[_0x6890('0xa0')](loggerCatch('[rescheduleContact][NoAnswer]'));break;case 0x5:if(_0x5a641d['countbusyretry']>=_0x36d459[_0x6890('0x18c')]-0x1){return!![];}hopperUtils[_0x6890('0xdc')]({'active':![],'countbusyretry':_0x5a641d[_0x6890('0x121')]+=0x1,'scheduledat':moment()[_0x6890('0xdd')](_0x36d459[_0x6890('0x18d')],_0x6890('0xdf'))[_0x6890('0x7e')]('YYYY-MM-DD\x20HH:mm:ss'),'ContactId':_0x5a641d[_0x6890('0xe0')],'ListId':_0x5a641d[_0x6890('0xf0')],'VoiceQueueId':_0x5a641d[_0x6890('0xe1')]||undefined,'CampaignId':_0x5a641d[_0x6890('0xe2')]||undefined})[_0x6890('0xa0')](loggerCatch('[rescheduleContact]\x20[Busy]'));break;case 0x8:if(_0x5a641d[_0x6890('0x122')]>=_0x36d459['dialCongestionMaxRetry']-0x1){return!![];}hopperUtils[_0x6890('0xdc')]({'active':![],'countcongestionretry':_0x5a641d[_0x6890('0x122')]+=0x1,'scheduledat':moment()[_0x6890('0xdd')](_0x36d459[_0x6890('0x18e')],'minutes')[_0x6890('0x7e')](_0x6890('0xc5')),'ContactId':_0x5a641d[_0x6890('0xe0')],'ListId':_0x5a641d['ListId'],'VoiceQueueId':_0x5a641d[_0x6890('0xe1')]||undefined,'CampaignId':_0x5a641d[_0x6890('0xe2')]||undefined})['catch'](loggerCatch(_0x6890('0x18f')));break;case 0x0:if(_0x5a641d['countnosuchnumberretry']>=_0x36d459[_0x6890('0x190')]-0x1){return!![];}else{hopperUtils['rescheduleContact']({'active':![],'countnosuchnumberretry':_0x5a641d['countnosuchnumberretry']+=0x1,'scheduledat':moment()[_0x6890('0xdd')](_0x36d459[_0x6890('0x191')],_0x6890('0xdf'))[_0x6890('0x7e')](_0x6890('0xc5')),'ContactId':_0x5a641d[_0x6890('0xe0')],'ListId':_0x5a641d[_0x6890('0xf0')],'VoiceQueueId':_0x5a641d[_0x6890('0xe1')]||undefined,'CampaignId':_0x5a641d[_0x6890('0xe2')]||undefined})[_0x6890('0xa0')](loggerCatch(_0x6890('0x192')));}break;case 0xa:if(_0x5a641d[_0x6890('0xd9')]>=_0x36d459[_0x6890('0x193')]-0x1){return!![];}hopperUtils[_0x6890('0xdc')]({'active':![],'countdropretry':_0x5a641d[_0x6890('0xd9')]+=0x1,'scheduledat':moment()['add'](_0x36d459[_0x6890('0xde')],'minutes')[_0x6890('0x7e')](_0x6890('0xc5')),'ContactId':_0x5a641d[_0x6890('0xe0')],'ListId':_0x5a641d['ListId'],'VoiceQueueId':_0x5a641d['VoiceQueueId']||undefined,'CampaignId':_0x5a641d[_0x6890('0xe2')]||undefined})[_0x6890('0xa0')](loggerCatch(_0x6890('0xe3')));break;case 0xb:if(_0x5a641d[_0x6890('0xed')]>=_0x36d459[_0x6890('0x194')]-0x1){return!![];}hopperUtils['rescheduleContact']({'active':![],'countabandonedretry':_0x5a641d[_0x6890('0xed')]+=0x1,'scheduledat':moment()['add'](_0x36d459[_0x6890('0xee')],_0x6890('0xdf'))[_0x6890('0x7e')](_0x6890('0xc5')),'ContactId':_0x5a641d['ContactId'],'ListId':_0x5a641d[_0x6890('0xf0')],'VoiceQueueId':_0x5a641d['VoiceQueueId']||undefined,'CampaignId':_0x5a641d['CampaignId']||undefined})['catch'](loggerCatch(_0x6890('0xf1')));break;case 0x13:if(_0x5a641d[_0x6890('0x11f')]>=_0x36d459[_0x6890('0x126')]-0x1){return!![];}hopperUtils[_0x6890('0xdc')]({'active':![],'countmachineretry':_0x5a641d[_0x6890('0x11f')]+=0x1,'scheduledat':moment()['add'](_0x36d459[_0x6890('0x12f')],_0x6890('0xdf'))[_0x6890('0x7e')]('YYYY-MM-DD\x20HH:mm:ss'),'ContactId':_0x5a641d['ContactId'],'ListId':_0x5a641d['ListId'],'VoiceQueueId':_0x5a641d[_0x6890('0xe1')]||undefined,'CampaignId':_0x5a641d[_0x6890('0xe2')]||undefined})[_0x6890('0xa0')](loggerCatch(_0x6890('0x129')));break;case 0x14:if(_0x5a641d['countagentrejectretry']>=_0x36d459[_0x6890('0x195')]-0x1){return!![];}hopperUtils[_0x6890('0xdc')]({'active':![],'countagentrejectretry':_0x5a641d[_0x6890('0x189')]+=0x1,'scheduledat':moment()[_0x6890('0xdd')](_0x36d459['dialAgentRejectRetryFrequency'],_0x6890('0xdf'))['format'](_0x6890('0xc5')),'ContactId':_0x5a641d[_0x6890('0xe0')],'ListId':_0x5a641d['ListId'],'VoiceQueueId':_0x5a641d['VoiceQueueId']||undefined,'CampaignId':_0x5a641d['CampaignId']||undefined})[_0x6890('0xa0')](loggerCatch(_0x6890('0x196')));break;default:return!![];}};Dialer[_0x6890('0x8c')][_0x6890('0x10e')]=function(_0x325367,_0x232a45,_0xe552b3){var _0x2c56de=this;var _0x51c0d5=new History(_0x325367);var _0x34a7d2=![];var _0x28ecb3;var _0x366230;return new Promise(function(_0x3d9b98,_0x465447){if(_[_0x6890('0x42')](_0x232a45)&&typeof _0x232a45!==_0x6890('0x159')){return _0x465447(msgResponse(_0x6890('0x197'),'Failure',_0x6890('0x198')));}if(_[_0x6890('0x42')](_0xe552b3)&&typeof _0xe552b3!==_0x6890('0x159')){return _0x465447(msgResponse('[callProgressDetecting]',_0x6890('0x93'),_0x6890('0x199')));}hopperUtils['verifyAdditionalPhones'](_0x51c0d5,_0xe552b3['reason'],_0x232a45)[_0x6890('0x40')](function(_0x5e9d68){if(_0x5e9d68[_0x6890('0xdb')]==0x1)_0x34a7d2=!![];switch(_0xe552b3[_0x6890('0xc7')]){case'0':_0x232a45['outboundNoSuchCallsDay']+=0x1;_0x51c0d5[_0x6890('0xd4')]=0x0;_0x51c0d5[_0x6890('0xd5')]=_0x6890('0x19a');_0x51c0d5[_0x6890('0x188')]+=0x1;_0x51c0d5['countglobal']+=0x1;ami[_0x6890('0x43')](_0x6890('0x19b'),ut['buildObj'](_0x325367,_0x6890('0x19c')));_0x28ecb3=_0x232a45[_0x6890('0x191')];_0x366230=_0x232a45[_0x6890('0xef')];hopperUtils['createHistory'](_0x51c0d5)[_0x6890('0xa0')](loggerCatch(_0x6890('0x12d')));if(_0x2c56de[_0x6890('0x187')](0x0,_0x325367,_0x232a45)&&!_0x34a7d2){if(_0x51c0d5[_0x6890('0x188')]>=_0x232a45[_0x6890('0x190')]){_0x2c56de[_0x6890('0x127')](_0x51c0d5,_0x3d9b98,_0x465447,'reason\x200\x20no\x20such\x20number....');}else{_0x2c56de[_0x6890('0x125')](_0x51c0d5,_0x3d9b98,_0x465447,_0x6890('0x19d'));}}break;case'3':_0x232a45[_0x6890('0x19e')]+=0x1;_0x51c0d5[_0x6890('0xd4')]=0x3;_0x51c0d5['statedesc']=_0x6890('0x19f');_0x51c0d5[_0x6890('0x123')]+=0x1;_0x51c0d5[_0x6890('0xd7')]+=0x1;var _0x29411f=ut['buildNoAnswerEventPayload'](_0x325367,_0x232a45);ami[_0x6890('0x43')](_0x6890('0x1a0'),_0x29411f);_0x28ecb3=_0x232a45[_0x6890('0x18b')];_0x366230=_0x232a45['callAdditionalPhoneAfterMin'];hopperUtils[_0x6890('0xcc')](_0x51c0d5)[_0x6890('0xa0')](loggerCatch(_0x6890('0x1a1')));if(_0x2c56de['checkRetriveMax'](0x3,_0x325367,_0x232a45)&&!_0x34a7d2){if(_0x51c0d5[_0x6890('0x123')]>=_0x232a45['dialNoAnswerMaxRetry']){_0x2c56de[_0x6890('0x127')](_0x51c0d5,_0x3d9b98,_0x465447,'reason\x203\x20ringing\x20no\x20answer');}else{_0x2c56de[_0x6890('0x125')](_0x51c0d5,_0x3d9b98,_0x465447,'reason\x203\x20ringing\x20no\x20answer');}}break;case'5':_0x232a45[_0x6890('0x1a2')]+=0x1;_0x51c0d5[_0x6890('0xd4')]=0x5;_0x51c0d5['statedesc']=_0x6890('0x1a3');_0x51c0d5['countbusyretry']+=0x1;_0x51c0d5['countglobal']+=0x1;ami[_0x6890('0x43')](_0x6890('0x1a4'),ut[_0x6890('0x120')](_0x325367,_0x6890('0x1a5')));_0x28ecb3=_0x232a45[_0x6890('0x18d')];_0x366230=_0x232a45[_0x6890('0xef')];hopperUtils[_0x6890('0xcc')](_0x51c0d5)[_0x6890('0xa0')](loggerCatch(_0x6890('0x1a6')));if(_0x2c56de[_0x6890('0x187')](0x5,_0x325367,_0x232a45)&&!_0x34a7d2){if(_0x51c0d5[_0x6890('0x121')]>=_0x232a45[_0x6890('0x18c')]){_0x2c56de[_0x6890('0x127')](_0x51c0d5,_0x3d9b98,_0x465447,_0x6890('0x1a7'));}else{_0x2c56de['stateGlobal'](_0x51c0d5,_0x3d9b98,_0x465447,_0x6890('0x1a7'));}}break;case'8':_0x232a45['outboundCongestionCallsDay']+=0x1;_0x51c0d5[_0x6890('0xd4')]=0x8;_0x51c0d5[_0x6890('0xd5')]=_0x6890('0x1a8');_0x51c0d5[_0x6890('0x122')]+=0x1;_0x51c0d5['countglobal']+=0x1;_0x28ecb3=_0x232a45['dialCongestionRetryFrequency'];_0x366230=_0x232a45[_0x6890('0xef')];ami[_0x6890('0x43')](_0x6890('0x1a9'),ut[_0x6890('0x120')](_0x325367,_0x6890('0x1aa')));hopperUtils[_0x6890('0xcc')](_0x51c0d5)['catch'](loggerCatch(_0x6890('0x1ab')));if(_0x2c56de[_0x6890('0x187')](0x8,_0x325367,_0x232a45)&&!_0x34a7d2){if(_0x51c0d5['countcongestionretry']>=_0x232a45[_0x6890('0x1ac')]){_0x2c56de[_0x6890('0x127')](_0x51c0d5,_0x3d9b98,_0x465447,_0x6890('0x1ad'));}else{_0x2c56de['stateGlobal'](_0x51c0d5,_0x3d9b98,_0x465447,'reason\x208\x20congestion');}}break;case'11':_0x232a45['outboundAbandonedCallsDay']+=0x1;_0x51c0d5[_0x6890('0xd4')]=0xb;_0x51c0d5[_0x6890('0xd5')]=_0x6890('0xeb');_0x51c0d5[_0x6890('0xed')]+=0x1;_0x51c0d5['countglobal']+=0x1;_0x28ecb3=_0x232a45[_0x6890('0xee')];_0x366230=_0x232a45[_0x6890('0xef')];hopperUtils[_0x6890('0xcc')](_0x51c0d5)[_0x6890('0xa0')](loggerCatch(_0x6890('0xf2')));if(_0x2c56de[_0x6890('0x187')](0xb,_0x325367,_0x232a45)&&!_0x34a7d2){if(_0x51c0d5[_0x6890('0xed')]>=_0x232a45[_0x6890('0x194')]){_0x2c56de[_0x6890('0x127')](_0x51c0d5,_0x3d9b98,_0x465447,_0x6890('0x1ae'));}else{_0x2c56de[_0x6890('0x125')](_0x51c0d5,_0x3d9b98,_0x465447,_0x6890('0x1ae'));}}break;case'20':_0x232a45['outboundRejectCallsDay']+=0x1;_0x51c0d5[_0x6890('0xd4')]=0x14;_0x51c0d5[_0x6890('0xd5')]=_0x6890('0x1af');_0x51c0d5[_0x6890('0x189')]+=0x1;_0x51c0d5['countglobal']+=0x1;_0x28ecb3=_0x232a45['dialAgentRejectRetryFrequency'];_0x366230=_0x232a45[_0x6890('0xef')];ami['emit'](_0x6890('0x1b0'),ut['buildObj'](_0x325367,_0x6890('0x1b1')));hopperUtils[_0x6890('0xcc')](_0x51c0d5)['catch'](loggerCatch(_0x6890('0x1b2')));if(_0x2c56de[_0x6890('0x187')](0x14,_0x325367,_0x232a45)&&!_0x34a7d2){if(_0x51c0d5[_0x6890('0x189')]>=_0x232a45['dialAgentRejectMaxRetry']){_0x2c56de[_0x6890('0x127')](_0x51c0d5,_0x3d9b98,_0x465447,_0x6890('0x1b3'));}else{_0x2c56de[_0x6890('0x125')](_0x51c0d5,_0x3d9b98,_0x465447,_0x6890('0x1b3'));}}break;default:_0x232a45['outboundUnknownCallsDay']+=0x1;_0x51c0d5[_0x6890('0xd4')]=0xc;_0x51c0d5['statedesc']=_0xe552b3['reason'];_0x28ecb3=_0x232a45['dialAgentRejectRetryFrequency'];_0x366230=_0x232a45[_0x6890('0xef')];hopperUtils[_0x6890('0xcc')](_0x51c0d5)[_0x6890('0xa0')](loggerCatch(_0x6890('0x1b4')));if(_0x2c56de[_0x6890('0x187')](_0xe552b3['reason'],_0x325367,_0x232a45)&&!_0x34a7d2){if(_0x51c0d5[_0x6890('0x121')]+_0x51c0d5[_0x6890('0x122')]+_0x51c0d5[_0x6890('0x123')]+_0x51c0d5[_0x6890('0x188')]+_0x51c0d5[_0x6890('0xd9')]+_0x51c0d5['countabandonedretry']+_0x51c0d5[_0x6890('0x11f')]+_0x51c0d5['countagentrejectretry']>=_0x232a45[_0x6890('0x124')]){_0x2c56de[_0x6890('0x125')](_0x51c0d5,_0x3d9b98,_0x465447,_0xe552b3[_0x6890('0xc7')]);}else{_0x2c56de[_0x6890('0x127')](_0x51c0d5,_0x3d9b98,_0x465447,_0xe552b3[_0x6890('0xc7')]);}}}})[_0x6890('0x40')](function(){if(_0x34a7d2){hopperUtils[_0x6890('0xe9')](_0x51c0d5,_0x28ecb3,_0x366230)[_0x6890('0x40')](function(){return _0x3d9b98(0x1);});}});});};Dialer[_0x6890('0x8c')][_0x6890('0x125')]=function(_0x569b5b,_0x3a783c,_0x4700e1,_0x3bdd15){var _0x47e2dd=new Final(_0x569b5b);_0x47e2dd[_0x6890('0xd4')]=0xf;_0x47e2dd['statedesc']='Global';this['createStateFinal'](_0x47e2dd,_0x3a783c,_0x4700e1,_0x3bdd15);};Dialer[_0x6890('0x8c')]['createStateFinal']=function(_0xb4f4a3,_0x3d2ff3,_0x426af6,_0x11a6f4){hopperUtils[_0x6890('0xce')](_0xb4f4a3)[_0x6890('0x40')](function(){return _0x3d2ff3(msgResponse(_0x6890('0x197'),'Success',_0x11a6f4));})[_0x6890('0xa0')](function(){return _0x426af6(msgResponse(_0x6890('0x1b5'),'Failure',_0x6890('0x1b6')));});};Dialer[_0x6890('0x8c')][_0x6890('0xa')]=function(_0x8cdafd){var _0x556167=_0x8cdafd[_0x6890('0x1b7')]/0x64;var _0x30692c=_0x8cdafd[_0x6890('0x1b8')]/(_0x8cdafd[_0x6890('0x1b8')]+_0x8cdafd[_0x6890('0x115')]);var _0x4a6d1a=Math[_0x6890('0x1b9')](_0x8cdafd[_0x6890('0x1ba')]*(_0x8cdafd[_0x6890('0x1bb')]/0x64));var _0x23f479=Math[_0x6890('0x1b9')](_0x8cdafd['predictiveIntervalAvailable']*(_0x8cdafd['predictiveIntervalMinThreshold']/0x64));var _0x9c18b4=_0x8cdafd[_0x6890('0x1bc')]+_0x8cdafd['talking'];var _0x24425a=Math['floor'](_0x8cdafd['erlangCalls']*_0x8cdafd[_0x6890('0x5f')]*_0x8cdafd[_0x6890('0x1bd')]*_0x8cdafd['predictiveIntervalMultiplicativeFactor']);if(_['isUndefined'](_0x8cdafd[_0x6890('0x27')])){if(!_['isUndefined'](_0x8cdafd[_0x6890('0x65')])){_0x8cdafd[_0x6890('0x65')]=undefined;loggerPredictive['error'](_0x6890('0x1be'),_0x6890('0x1bf'));}if(!_['isUndefined'](_0x8cdafd[_0x6890('0x67')])){loggerPredictive['error'](_0x6890('0x1be'),_0x6890('0x1c0'));clearInterval(_0x8cdafd[_0x6890('0x67')]);_0x8cdafd[_0x6890('0x67')]=undefined;}_0x8cdafd[_0x6890('0x27')]=moment()[_0x6890('0x7e')](_0x6890('0xc5'));loggerPredictive['info'](_0x8cdafd[_0x6890('0x49')],_0x6890('0x1c1'),_0x8cdafd['startProgressive']);this['handlePower'](_0x8cdafd,0x1);}else if(ifInterval(_0x8cdafd[_0x6890('0x1c2')],_0x8cdafd[_0x6890('0x27')])){this[_0x6890('0xb2')](_0x8cdafd,0x1);loggerPredictiveCalls['info'](_0x6890('0x1c3'),_0x8cdafd[_0x6890('0x27')],_0x8cdafd[_0x6890('0x49')]);_0x8cdafd[_0x6890('0x1c4')]=0x0;_0x8cdafd['predictiveIntervalErlangCallsDroppedCalls']=0x0;}else if(_0x556167<_0x30692c&&_0x8cdafd[_0x6890('0x1c5')]===_0x6890('0x1c6')){clearPredictiveAttributes(_0x8cdafd);loggerPredictive['info'](_0x6890('0x1c7'),_0x6890('0x1c8'),_0x30692c,'startProgressive',_0x8cdafd[_0x6890('0x49')]);}else if(_0x24425a<_0x8cdafd[_0x6890('0xd3')]&&_0x8cdafd[_0x6890('0x1c5')]==='dropRate'){clearPredictiveAttributes(_0x8cdafd);loggerPredictive[_0x6890('0x4c')](_0x6890('0x1c9'),'Max\x20Drop\x20',_0x24425a,_0x6890('0x1ca'),_0x8cdafd[_0x6890('0xd3')],_0x6890('0x27'),_0x8cdafd['name']);}else if(!ifInterval(_0x8cdafd[_0x6890('0x1c2')],_0x8cdafd['startProgressive'])&&_[_0x6890('0x42')](_0x8cdafd[_0x6890('0x65')])&&!_[_0x6890('0x42')](_0x8cdafd['startProgressive'])){_0x8cdafd['startPredictive']=moment()[_0x6890('0x7e')](_0x6890('0xc5'));loggerPredictive[_0x6890('0x4c')](_0x8cdafd[_0x6890('0x49')],_0x6890('0x1cb'),_0x8cdafd[_0x6890('0x65')]);hopperUtils['avgHandleTime'](_0x8cdafd['dialPredictiveInterval'])[_0x6890('0x40')](this['getDataPredictive'](_0x8cdafd))[_0x6890('0x40')](mergeDataErlangB(_0x8cdafd))[_0x6890('0x40')](this[_0x6890('0x1cc')](_0x8cdafd))['catch'](loggerCatchPredictive(_0x6890('0x1cd'),_0x8cdafd));}else if(!ifInterval(_0x8cdafd[_0x6890('0x1c2')],_0x8cdafd[_0x6890('0x65')])){_0x8cdafd[_0x6890('0xd3')]=0x0;_0x8cdafd['startPredictive']=moment()[_0x6890('0x7e')](_0x6890('0xc5'));loggerPredictive['info'](_0x8cdafd[_0x6890('0x49')],_0x6890('0x1ce'),_0x8cdafd[_0x6890('0x65')]);clearInterval(_0x8cdafd[_0x6890('0x67')]);_0x8cdafd[_0x6890('0x67')]=undefined;hopperUtils[_0x6890('0x1cf')](_0x8cdafd['dialPredictiveInterval'])[_0x6890('0x40')](this[_0x6890('0x1d0')](_0x8cdafd))['then'](mergeDataErlangB(_0x8cdafd))['then'](this['startMethodPredictive'](_0x8cdafd))[_0x6890('0xa0')](loggerCatchPredictive(_0x6890('0x1d1'),_0x8cdafd));}else if(_0x8cdafd[_0x6890('0x1ba')]&&_0x9c18b4<_0x8cdafd[_0x6890('0x1ba')]-_0x23f479){clearPredictiveAttributes(_0x8cdafd);loggerPredictive[_0x6890('0x4c')](_0x8cdafd[_0x6890('0x49')],_0x6890('0x1d2'),_0x9c18b4,')\x20are\x20less\x20than\x20threshold\x20(',_0x8cdafd[_0x6890('0x1ba')],'-',_0x23f479,'=',_0x8cdafd[_0x6890('0x1ba')]-_0x23f479,')');}else if(_0x8cdafd[_0x6890('0x1ba')]&&_0x9c18b4>_0x8cdafd[_0x6890('0x1ba')]+_0x4a6d1a){clearPredictiveAttributes(_0x8cdafd);loggerPredictive['info'](_0x8cdafd['name'],_0x6890('0x1d2'),_0x9c18b4,_0x6890('0x1d3'),_0x8cdafd[_0x6890('0x1ba')],'+',_0x4a6d1a,'=',_0x8cdafd[_0x6890('0x1ba')]+_0x4a6d1a,')');}};Dialer[_0x6890('0x8c')]['getDataPredictive']=function(_0x45f7a3){var _0x56f897=this;return function(_0x32a28b){return new Promise(function(_0x165751,_0x809e4e){_[_0x6890('0x62')](_0x45f7a3,_0x32a28b[0x0]);if(checkGetDataPredictive(_0x32a28b[0x0])){var _0x1b9bcf=_0x45f7a3['predictiveIntervalAvailable']=_0x45f7a3[_0x6890('0x13b')]+_0x45f7a3[_0x6890('0x1bc')];var _0xbc1152=_0x45f7a3[_0x6890('0x1c2')]*0x3c;var _0x498ece=_0x32a28b[0x0][_0x6890('0x1d4')]+_0x32a28b[0x0]['predictiveIntervalAvgHoldtime'];var _0x35c778=(_0x32a28b[0x0][_0x6890('0x50')]+_0x32a28b[0x0][_0x6890('0x1d5')]+_0x32a28b[0x0][_0x6890('0x1d6')])/_0x32a28b[0x0][_0x6890('0x4e')];_0x45f7a3[_0x6890('0x1bd')]=_0x35c778>0x0?_0x35c778:0x1;switch(_0x45f7a3[_0x6890('0x1c5')]){case _0x6890('0x1c6'):var _0x4983cb=_0x45f7a3[_0x6890('0x1b7')]/0x64;return _0x56f897[_0x6890('0x1d7')](_0x1b9bcf,_0xbc1152,_0x498ece,_0x35c778,_0x4983cb)['then'](function(_0x3666d0){return _0x165751(_0x3666d0);});case _0x6890('0x1d8'):var _0xcc9197=_0x45f7a3[_0x6890('0x1b7')]/0x64;return _0x56f897[_0x6890('0x1d9')](_0x1b9bcf,_0xbc1152,_0x498ece,_0x35c778,_0xcc9197)['then'](function(_0x4bfee2){return _0x165751(_0x4bfee2);});default:return _0x809e4e(msgResponse(_0x6890('0x1da'),_0x6890('0x93'),_0x6890('0x1db')));}}else{return _0x809e4e(msgResponse('[getDataPredictive]',_0x6890('0x93'),_0x6890('0x1dc')));}});};};Dialer[_0x6890('0x8c')][_0x6890('0x1dd')]=function(_0x40f9c7){var _0x202005=this;return function(_0x44e918){return new Promise(function(_0x105ecd,_0x4763cb){_[_0x6890('0x62')](_0x40f9c7,_0x44e918[0x0]);if(checkGetDataPredictive(_0x44e918[0x0])){loggerPredictive[_0x6890('0x4c')](JSON[_0x6890('0x74')](_0x44e918[0x0]));if(_0x40f9c7['dialPredictiveOptimization']===_0x6890('0x1c6')){return _0x202005[_0x6890('0x14c')](_0x40f9c7['id'])[_0x6890('0x40')](function(_0x565c12){var _0x1568b7=_0x40f9c7[_0x6890('0x1de')]-_0x565c12[0x0][_0x6890('0x1df')];var _0x2b8ec=_0x40f9c7[_0x6890('0x1c2')]*0x3c;var _0x271faa=_0x44e918[0x0][_0x6890('0x1d4')]+_0x44e918[0x0][_0x6890('0x54')];var _0x4341e7=(_0x44e918[0x0][_0x6890('0x50')]+_0x44e918[0x0][_0x6890('0x1d5')]+_0x44e918[0x0][_0x6890('0x1d6')])/_0x44e918[0x0]['predictiveIntervalTotalCalls'];var _0xb7619b=_0x40f9c7['dialPredictiveOptimizationPercentage']/0x64;_0x40f9c7[_0x6890('0x1e0')]=_0x565c12[0x0][_0x6890('0x1df')]||0x0;_0x40f9c7[_0x6890('0x1bd')]=_0x4341e7>0x0?_0x4341e7:0x1;return _0x202005[_0x6890('0x1d7')](_0x1568b7,_0x2b8ec,_0x271faa,_0x4341e7,_0xb7619b);})[_0x6890('0x40')](function(_0x24e126){return _0x105ecd(_0x24e126);})[_0x6890('0xa0')](function(_0x4d1249){return _0x4763cb(msgResponse(_0x6890('0x1e1'),_0x6890('0x93'),JSON[_0x6890('0x74')](_0x4d1249)));});}if(_0x40f9c7[_0x6890('0x1c5')]==='agentBusyFactor'){return _0x202005[_0x6890('0x14c')](_0x40f9c7['id'])[_0x6890('0x40')](function(_0x27aa5b){var _0x1d6df3=_0x40f9c7['loggedIn']-_0x27aa5b[0x0][_0x6890('0x1df')];var _0x2f9b85=_0x40f9c7[_0x6890('0x1c2')]*0x3c;var _0x4419a5=_0x44e918[0x0][_0x6890('0x1d4')]+_0x44e918[0x0][_0x6890('0x54')];var _0x29209f=(_0x44e918[0x0][_0x6890('0x50')]+_0x44e918[0x0][_0x6890('0x1d5')]+_0x44e918[0x0][_0x6890('0x1d6')])/_0x44e918[0x0][_0x6890('0x4e')];var _0x4ab96e=_0x40f9c7[_0x6890('0x1b7')]/0x64;_0x40f9c7[_0x6890('0x1e0')]=_0x27aa5b[0x0][_0x6890('0x1df')]||0x0;_0x40f9c7[_0x6890('0x1bd')]=_0x29209f>0x0?_0x29209f:0x1;return _0x202005[_0x6890('0x1d9')](_0x1d6df3,_0x2f9b85,_0x4419a5,_0x29209f,_0x4ab96e);})[_0x6890('0x40')](function(_0x16bf81){return _0x105ecd(_0x16bf81);})['catch'](function(_0x398791){return _0x4763cb(msgResponse(_0x6890('0x1e1'),'Failure',JSON['stringify'](_0x398791)));});}}else{return _0x4763cb(msgResponse('[getDataPredictive]',_0x6890('0x93'),_0x6890('0x1dc')));}});};};Dialer[_0x6890('0x8c')]['startMethodPredictive']=function(_0x1dd90c){var _0x2e77e0=this;return function(){var _0x1725ec=0x0;var _0x134d17=Math[_0x6890('0x1e2')](_0x1dd90c[_0x6890('0x5d')]*0x3e8);if(_0x134d17>0x0){_0x134d17=_0x134d17<0x64?0x64:_0x134d17;loggerPredictive[_0x6890('0x4c')](_0x1dd90c['name'],'one\x20call\x20every:',_0x134d17,'milliseconds');_0x1dd90c['handlePredictive']=setInterval(function(){_0x2e77e0[_0x6890('0x67')](_0x1dd90c);loggerPredictiveCalls[_0x6890('0x4c')](_0x6890('0x1e3'),_0x1725ec+=0x1);},_0x134d17);}else{loggerPredictive[_0x6890('0x4c')](_0x1dd90c['name'],_0x6890('0x1e4'));}};};Dialer['prototype'][_0x6890('0x1e5')]=function(_0x195a32,_0x3be3fa){var _0x2304de=this;return function(_0x410405){if(_[_0x6890('0x4b')](_0x410405)){if(_['isNil'](_0x3be3fa['UserId'])||!_0x3be3fa[_0x6890('0x1e6')]){if(_0x195a32['dialMethod']===_0x6890('0x9')){_0x195a32[_0x6890('0x71')]=_[_0x6890('0x42')](_0x195a32[_0x6890('0x71')])?!![]:_0x195a32[_0x6890('0x71')];var _0x5069d6=uuid['v4']();_0x2304de['actions'][_0x5069d6]=new Action(_0x195a32,_0x3be3fa,_0x5069d6);loggerBooked['info'](_0x6890('0x1e7'),_0x5069d6,_0x6890('0x1e8'),JSON[_0x6890('0x74')](_0x195a32[_0x6890('0x71')]),_0x6890('0x1e9'),_0x195a32[_0x6890('0x49')]);if(_0x195a32[_0x6890('0x71')]){_0x195a32[_0x6890('0x71')]=![];_0x2304de[_0x6890('0x29')][_0x2304de[_0x6890('0xf3')][_0x5069d6][_0x6890('0xc0')]]=[];ami['Action']({'actionid':_0x5069d6,'action':'queuestatus','queue':_0x195a32['name']})['catch'](function(){_0x2304de[_0x6890('0xc3')](_0x195a32);hopperUtils['rescheduleContact']({'active':![],'ContactId':_0x2304de[_0x6890('0xf3')][_0x5069d6][_0x6890('0xe0')],'ListId':_0x2304de[_0x6890('0xf3')][_0x5069d6][_0x6890('0xf0')],'VoiceQueueId':_0x2304de[_0x6890('0xf3')][_0x5069d6][_0x6890('0xe1')]||undefined,'CampaignId':_0x2304de['actions'][_0x5069d6][_0x6890('0xe2')]||undefined})[_0x6890('0xa0')](loggerCatch(_0x6890('0x1ea')));delete _0x2304de[_0x6890('0xf3')][_0x5069d6];});}else{loggerBooked[_0x6890('0x4c')](_0x6890('0x1eb'),JSON[_0x6890('0x74')](_0x195a32[_0x6890('0x71')]),_0x6890('0x1e9'),_0x195a32[_0x6890('0x49')]);_0x2304de[_0x6890('0xc3')](_0x195a32);hopperUtils[_0x6890('0xdc')]({'active':![],'ContactId':_0x2304de[_0x6890('0xf3')][_0x5069d6][_0x6890('0xe0')],'ListId':_0x2304de[_0x6890('0xf3')][_0x5069d6]['ListId'],'VoiceQueueId':_0x2304de[_0x6890('0xf3')][_0x5069d6][_0x6890('0xe1')]||undefined,'CampaignId':_0x2304de[_0x6890('0xf3')][_0x5069d6][_0x6890('0xe2')]||undefined})[_0x6890('0xa0')](loggerCatch(_0x6890('0x1ea')));delete _0x2304de[_0x6890('0xf3')][_0x5069d6];}}else{return _0x2304de[_0x6890('0x1ec')](_0x195a32,_0x3be3fa);}}else{if(utils['getSeconds'](undefined,_0x3be3fa[_0x6890('0x1ed')])<_0x195a32[_0x6890('0x1ee')]*0x3c){if(_0x3be3fa['Agent']&&!_0x3be3fa[_0x6890('0x145')]['voicePause']){_0x2304de[_0x6890('0x1d')][_0x6890('0xfe')](_0x3be3fa['id'])[_0x6890('0x100')](function(){_0x2304de[_0x6890('0xc3')](_0x195a32);});}else{hopperUtils[_0x6890('0x1ef')]({'active':![]},_0x3be3fa['id'],0x1)[_0x6890('0x100')](function(){_0x2304de[_0x6890('0xc3')](_0x195a32);});}}else{_0x195a32[_0x6890('0x1f0')]+=0x1;_0x2304de[_0x6890('0xc3')](_0x195a32);if(_0x195a32[_0x6890('0x1f1')]){hopperUtils[_0x6890('0xdc')]({'active':![],'recallme':![],'UserId':null,'ContactId':_0x3be3fa[_0x6890('0xe0')],'ListId':_0x3be3fa[_0x6890('0xf0')],'VoiceQueueId':_0x3be3fa[_0x6890('0xe1')]||undefined,'CampaignId':_0x3be3fa[_0x6890('0xe2')]||undefined})[_0x6890('0xa0')](loggerCatch('[rescheduleContact][dialRecallInQueue]'));hopperUtils[_0x6890('0xcc')](createObjHistory(_0x195a32,_0x3be3fa,utils['CAMPAIGN_STATUS']['QUEUE_RECALL'],0x17,_0x6890('0x1f2')))[_0x6890('0xa0')](loggerCatch(_0x6890('0x1f3')));}else{_0x2304de[_0x6890('0x1f4')](createObjHistory(_0x195a32,_0x3be3fa,utils[_0x6890('0x6d')][_0x6890('0x1f5')],0x16,'RecallFailedTimeout'),_0x6890('0x1f6'),_0x6890('0x1f7'));}}}}else{_0x195a32[_0x6890('0x1f8')]+=0x1;_0x2304de['saveInDb'](createObjHistory(_0x195a32,_0x3be3fa,utils['CAMPAIGN_STATUS'][_0x6890('0x1f9')],0xd,'Blacklist'),'[Originate][historyBlacklist]',_0x6890('0x1fa'));throw _0x6890('0x1fb');}};};Dialer[_0x6890('0x8c')][_0x6890('0x158')]=function(_0x3f0561){var _0x237ff8=this;var _0x14a5a0=_0x3f0561[_0x6890('0x1fc')]-_0x3f0561[_0x6890('0x81')];emitCampaignSummary(_0x3f0561);if(_0x14a5a0>0x0&&_0x3f0561['temp']==0x0){if(_0x14a5a0>this[_0x6890('0x22')]){_0x14a5a0=this[_0x6890('0x22')];}_0x3f0561['temp']=0x1;hopperUtils['getContactDialerIvr'](_0x3f0561,_0x14a5a0)[_0x6890('0x40')](function(_0x554774){_0x3f0561[_0x6890('0x1fd')]=0x0;if(_0x554774){if(!utils[_0x6890('0x1fe')](_0x554774)){_0x3f0561[_0x6890('0x6e')]=utils[_0x6890('0x6d')][_0x6890('0x6f')];logger[_0x6890('0x4c')](_0x6890('0x1ff')+_0x3f0561['name']);}else{_0x3f0561[_0x6890('0x81')]+=_0x554774[_0x6890('0x98')];_0x3f0561[_0x6890('0x6e')]=utils[_0x6890('0x6d')][_0x6890('0x200')];for(var _0xfecdff=0x0;_0xfecdff<_0x554774['length'];_0xfecdff+=0x1){_0x3f0561[_0x6890('0x201')]+=0x1;if(_[_0x6890('0xf9')](_0x554774[_0xfecdff])||_['isNil'](_0x554774[_0xfecdff][_0x6890('0x172')])||_[_0x6890('0xf9')](_0x554774[_0xfecdff][_0x6890('0x15c')])){_0x237ff8['emptyContact'](_0x6890('0x202'),_0x3f0561,_0x554774[_0xfecdff]);}else{hopperUtils[_0x6890('0x203')](_[_0x6890('0x75')](_0x554774[_0xfecdff],[_0x6890('0xe2'),_0x6890('0x15c')]))[_0x6890('0x40')](_0x237ff8[_0x6890('0x1e5')](_0x3f0561,_0x554774[_0xfecdff]))[_0x6890('0xa0')](_0x237ff8[_0x6890('0x14f')](_0x6890('0x204'),_0x3f0561));}}}}})[_0x6890('0xa0')](loggerGetContactDialer(_0x6890('0x205'),_0x3f0561,_0x14a5a0));}};Dialer[_0x6890('0x8c')]['handlePower']=function(_0x432dbe,_0x209ad7){var _0x1fb870=this;var _0x8e46bb=[];if(_0x209ad7<0x1||_0x432dbe['dialMethod']===_0x6890('0x9')){_0x209ad7=0x1;}var _0x3db01a=Math[_0x6890('0x1e2')](_0x432dbe[_0x6890('0x1bc')]*_0x209ad7)-_0x432dbe[_0x6890('0x81')];if(_0x432dbe[_0x6890('0x206')]>0x0){var _0x2ca8a5=_0x432dbe[_0x6890('0x206')]-_0x432dbe[_0x6890('0x81')]-_0x432dbe[_0x6890('0x13b')]-_0x432dbe[_0x6890('0x207')];if(_0x3db01a>_0x2ca8a5){_0x3db01a=_0x2ca8a5;}}if(_0x3db01a>0x0&&_0x432dbe[_0x6890('0x1fd')]==0x0){if(_0x432dbe[_0x6890('0xb0')]===_0x6890('0x9')){_0x3db01a=0x1;}if(_0x3db01a>this[_0x6890('0x22')]){_0x3db01a=this[_0x6890('0x22')];}for(var _0x5d52de in this[_0x6890('0x20')]){if(typeof this[_0x6890('0x20')][_0x5d52de]!==_0x6890('0xa9')){if(this[_0x6890('0x20')][_0x5d52de][_0x6890('0xd4')]==='not_inuse'&&this[_0x6890('0x20')][_0x5d52de][_0x6890('0x89')]===_0x6890('0x8a')){_0x8e46bb[_0x6890('0x99')](this[_0x6890('0x20')][_0x5d52de]['id']);}}}_0x432dbe[_0x6890('0x1fd')]=0x1;hopperUtils[_0x6890('0x208')](_0x432dbe,_0x8e46bb,_0x3db01a)[_0x6890('0x40')](function(_0x94a9a4){_0x432dbe['temp']=0x0;if(_0x94a9a4){if(!utils[_0x6890('0x1fe')](_0x94a9a4)){hopperUtils[_0x6890('0x209')](_0x432dbe)['then'](sendMessageReschedule(_0x432dbe))[_0x6890('0xa0')](loggerCatch(_0x6890('0x20a')));}else{_0x432dbe[_0x6890('0x81')]+=_0x94a9a4[_0x6890('0x98')];_0x432dbe[_0x6890('0x6e')]=_0x432dbe[_0x6890('0xb0')]==='booked'?utils[_0x6890('0x6d')]['ACTIVE']:utils['CAMPAIGN_STATUS']['RUNNING'];for(var _0x17162c=0x0;_0x17162c<_0x94a9a4[_0x6890('0x98')];_0x17162c+=0x1){if(_['isNil'](_0x94a9a4[_0x17162c])||_[_0x6890('0xf9')](_0x94a9a4[_0x17162c]['Contact'])||_[_0x6890('0xf9')](_0x94a9a4[_0x17162c]['phone'])){_0x1fb870[_0x6890('0x150')]('[actionOriginate]\x20',_0x432dbe,_0x94a9a4[_0x17162c]);}else{hopperUtils[_0x6890('0x20b')](_[_0x6890('0x75')](_0x94a9a4[_0x17162c],[_0x6890('0xe1'),_0x6890('0x15c')]))[_0x6890('0x40')](_0x1fb870[_0x6890('0x1e5')](_0x432dbe,_0x94a9a4[_0x17162c]))[_0x6890('0xa0')](_0x1fb870[_0x6890('0x14f')](_0x6890('0x202'),_0x432dbe));}}}}})[_0x6890('0xa0')](loggerGetContactDialer(_0x6890('0x20c'),_0x432dbe,_0x3db01a));}};Dialer[_0x6890('0x8c')][_0x6890('0x67')]=function(_0x17de0f){if(_0x17de0f[_0x6890('0x206')]>0x0){var _0x69b450=_0x17de0f[_0x6890('0x206')]-_0x17de0f['originated']-_0x17de0f[_0x6890('0x13b')];if(_0x69b450>0x0&&_0x17de0f[_0x6890('0x1fd')]==0x0){this[_0x6890('0x20d')](_0x17de0f);}else{loggerPredictiveCalls[_0x6890('0x4c')](_0x6890('0x20e'));}}else{this[_0x6890('0x20d')](_0x17de0f);}};Dialer[_0x6890('0x8c')][_0x6890('0x20d')]=function(_0x2fa90f){var _0x1ccb08=this;var _0x458454=[];_0x2fa90f['originated']+=0x1;for(var _0x3ab1a3 in this['agents']){if(typeof this[_0x6890('0x20')][_0x3ab1a3]!=='undefined'){if(this[_0x6890('0x20')][_0x3ab1a3][_0x6890('0xd4')]===_0x6890('0x20f')&&this[_0x6890('0x20')][_0x3ab1a3][_0x6890('0x89')]===_0x6890('0x8a')){_0x458454[_0x6890('0x99')](this[_0x6890('0x20')][_0x3ab1a3]['id']);}}}_0x2fa90f[_0x6890('0x1fd')]=0x1;return this['getContactDialer'](_0x2fa90f['id'],_0x458454,0x1,_0x2fa90f[_0x6890('0x210')],_0x2fa90f)[_0x6890('0x40')](function(_0x340d12){_0x2fa90f[_0x6890('0x1fd')]=0x1;if(_0x340d12){if(!utils[_0x6890('0x1fe')](_0x340d12)){utils[_0x6890('0x6b')](_0x2fa90f,0x1,0x0);return hopperUtils[_0x6890('0x209')](_0x2fa90f)['then'](sendMessageReschedule(_0x2fa90f))[_0x6890('0xa0')](loggerCatch(_0x6890('0x20a')));}else{_0x2fa90f[_0x6890('0x6e')]=utils[_0x6890('0x6d')][_0x6890('0x200')];if(_[_0x6890('0xf9')](_0x340d12[0x0])||_[_0x6890('0xf9')](_0x340d12[0x0][_0x6890('0x172')])||_[_0x6890('0xf9')](_0x340d12[0x0][_0x6890('0x15c')])){_0x1ccb08[_0x6890('0x150')](_0x6890('0x202'),_0x2fa90f,_0x340d12[0x0]);}else{return hopperUtils[_0x6890('0x20b')](_[_0x6890('0x75')](_0x340d12[0x0],['VoiceQueueId',_0x6890('0x15c')]))['then'](_0x1ccb08[_0x6890('0x1e5')](_0x2fa90f,_0x340d12[0x0]))[_0x6890('0xa0')](_0x1ccb08[_0x6890('0x14f')](_0x6890('0x211'),_0x2fa90f));}}}})['catch'](loggerGetContactDialer(_0x6890('0x212'),_0x2fa90f,0x1));};Dialer[_0x6890('0x8c')][_0x6890('0x1d7')]=function(_0x1e178a,_0x219fb0,_0x3edd9d,_0x500549,_0x5d93e4,_0x3d2a7e){loggerPredictive[_0x6890('0x4c')]('--------\x20Drop\x20Rate\x20--------');loggerPredictive[_0x6890('0x4c')](_0x6890('0x213'),_0x1e178a);loggerPredictive[_0x6890('0x4c')](_0x6890('0x214'),_0x219fb0);loggerPredictive[_0x6890('0x4c')](_0x6890('0x215'),_0x3edd9d);loggerPredictive[_0x6890('0x4c')](_0x6890('0x216'),_0x500549);loggerPredictive[_0x6890('0x4c')](_0x6890('0x217'),_0x5d93e4);loggerPredictive[_0x6890('0x4c')](_0x6890('0x56'));return new Promise(function(_0x17a917,_0x3de2b7){if(_0x1e178a<=0x0||isNaN(_0x1e178a)){return _0x3de2b7(msgResponse(_0x6890('0x218'),_0x6890('0x86'),_0x6890('0x219')+_0x1e178a));}if(_0x3edd9d<=0x0||isNaN(_0x3edd9d)){return _0x3de2b7(msgResponse('[abandonmentRate]','Error',_0x6890('0x21a')+_0x3edd9d));}if(_0x500549<=0x0||isNaN(_0x500549)){return _0x3de2b7(msgResponse(_0x6890('0x218'),'Error',_0x6890('0x21b')+_0x500549));}if(_0x219fb0<=0x0||isNaN(_0x219fb0)){return _0x3de2b7(msgResponse(_0x6890('0x218'),_0x6890('0x86'),_0x6890('0x21c')+_0x219fb0));}if(_0x5d93e4<=0x0||isNaN(_0x5d93e4)){return _0x3de2b7(msgResponse(_0x6890('0x218'),_0x6890('0x86'),'Amax\x20=\x20'+_0x5d93e4));}_0x3d2a7e=_0x3d2a7e||0x0;var _0x7ab689=0x1/_0x3edd9d;var _0x520afe=0x0;var _0x52062c=0x0;var _0x3879b4=0x0;var _0x140fab=0x0;for(var _0x1c6d6e=0x0;_0x3879b4<_0x5d93e4;_0x1c6d6e+=0x1){_0x52062c=_0x1c6d6e/_0x219fb0;_0x520afe=(_0x500549*_0x52062c+_0x3d2a7e)/_0x7ab689;_0x3879b4=utils[_0x6890('0x21d')](_0x520afe,_0x1e178a);_0x140fab=_0x520afe/_0x1e178a*(0x1-utils['erlangb'](_0x520afe,_0x1e178a));}return _0x17a917({'erlangCalls':_0x1c6d6e,'erlangCallToSecond':_0x219fb0/_0x1c6d6e,'erlangAbandonmentRate':_0x3879b4,'erlangBusyFactor':_0x140fab});});};Dialer[_0x6890('0x8c')]['busyFactor']=function(_0x21a5de,_0x190c76,_0x2855b6,_0xec788e,_0x54e86b,_0x4ce541){loggerPredictive[_0x6890('0x4c')](_0x6890('0x21e'));loggerPredictive[_0x6890('0x4c')](_0x6890('0x213'),_0x21a5de);loggerPredictive[_0x6890('0x4c')](_0x6890('0x214'),_0x190c76);loggerPredictive[_0x6890('0x4c')](_0x6890('0x215'),_0x2855b6);loggerPredictive['info']('P:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20',_0xec788e);loggerPredictive[_0x6890('0x4c')]('Umin:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20',_0x54e86b);loggerPredictive['info'](_0x6890('0x56'));return new Promise(function(_0x24b3a0,_0x267850){if(_0x21a5de<=0x0||isNaN(_0x21a5de)){return _0x267850(msgResponse(_0x6890('0x21f'),_0x6890('0x86'),'m\x20=\x20'+_0x21a5de));}if(_0x2855b6<=0x0||isNaN(_0x2855b6)){return _0x267850(msgResponse(_0x6890('0x21f'),_0x6890('0x86'),'Ts\x20=\x20'+_0x2855b6));}if(_0xec788e<=0x0||isNaN(_0xec788e)){return _0x267850(msgResponse(_0x6890('0x21f'),_0x6890('0x86'),_0x6890('0x21b')+_0xec788e));}if(_0x190c76<=0x0||isNaN(_0x190c76)){return _0x267850(msgResponse(_0x6890('0x21f'),'Error',_0x6890('0x21c')+_0x190c76));}if(_0x54e86b<=0x0||isNaN(_0x54e86b)){return _0x267850(msgResponse('[busyFactor]',_0x6890('0x86'),_0x6890('0x220')+_0x54e86b));}_0x4ce541=_0x4ce541||0x0;var _0x1b5264=0x1/_0x2855b6;var _0x2fa64f=0x0;var _0x221a5a=0x0;var _0x3e1f61=0x0;var _0x208b83=0x0;for(var _0x31433d=0x0;_0x208b83<_0x54e86b;_0x31433d+=0x1){_0x221a5a=_0x31433d/_0x190c76;_0x2fa64f=(_0xec788e*_0x221a5a+_0x4ce541)/_0x1b5264;_0x3e1f61=utils['erlangb'](_0x2fa64f,_0x21a5de);_0x208b83=_0x2fa64f/_0x21a5de*(0x1-utils['erlangb'](_0x2fa64f,_0x21a5de));}return _0x24b3a0({'erlangCalls':_0x31433d,'erlangCallToSecond':_0x190c76/_0x31433d,'erlangAbandonmentRate':_0x3e1f61,'erlangBusyFactor':_0x208b83});});};module['exports']=Dialer; \ No newline at end of file +var _0x5c5d=['available','inUse','talking','pTalking','ACTIVE','checkDialMethod','[syncQueueSummary]','compareToOutboundQueue','queueSummaryCountersUpdated','updateReportFromOutboundQueue','assign','throttle','filter','online','map','Agent','user:%s','user:dialPreviewRecallReminder','checkPreviewRecallReminder','clearZombieChannels','[uniqueid]','[actions]','[Dialer][checkChannel]','[Dialer][checkChannel][ivr]','getVoiceQueueRtPauses','[getVoiceQueueRtPauses]\x20','undefined','[updateOriginated]\x20object\x20originated\x20is\x20negative','[updateOriginated]\x20is\x20null\x20or\x20undefined','emptyContact','UserId','[emptyContact][createHistory]','[emptyContact]','[syncQueueCallerAbandon]\x20[Drop]','handlePreviewRecallNotifications','handleIvr','actionOriginate','object','originate','voiceQueue\x20is\x20undefine','phone','\x22agi://%s/square,%s\x22','NONE','dialQueueOptions','getCaller','dialAMDInitialSilence','XMD-AMDGREETING','dialAMDGreeting','XMD-AMDAFTERGREETINGSILENCE','dialAMDAfterGreetingSilence','XMD-AMDTOTALANALYSISTIME','dialAMDTotalAnalysisTime','XMD-AMDMINWORDLENGTH','XMD-AMDBETWEENWORDSSILENCE','dialAMDBetweenWordsSilence','XMD-AMDMAXIMUMNUMBEROFWORDS','dialAMDMaximumNumberOfWords','dialAMDSilenceThreshold','XMD-AMDMAXIMUMWORDLENGTH','XMD-CAMPAIGNID','setXMDContactVariables','Contact','getCallerId','callerid','dialOriginateCallerIdName','dialRandomLastDigitCallerIdNumber','dialOriginateCallerIdNumber','getCallerIdRandom','XMD-ORIGINATECALLERIDNAME','originatecalleridname','extractCalleridName','XMD-ORIGINATECALLERIDNUM','variables','dialPrefix','substring','dialCutDigit','from-sip','dialOriginateTimeout','outboundOriginateFailureCallsDay','[originate][error]','originate\x20action\x20Error','checkRetriveMax','dialNoAnswerMaxRetry','dialNoAnswerRetryFrequency','dialBusyMaxRetry','dialBusyRetryFrequency','[rescheduleContact]\x20[Busy]','dialCongestionRetryFrequency','[rescheduleContact]\x20[Congestion]','dialNoSuchNumberRetryFrequency','[rescheduleContact][NoSuchNumber]','dialAgentRejectMaxRetry','[rescheduleContact][AgentReject]','[callProgressDetecting]','entity\x20is\x20undefine','outboundNoSuchCallsDay','NoSuchNumber','custom:agentnosuchnumber','dialNoSuchNumberMaxRetry','reason\x200\x20no\x20such\x20number....','outboundNoAnswerCallsDay','custom:agentnoanswer','[syncAgentComplete][createHistory][3]','reason\x203\x20ringing\x20no\x20answer','outboundBusyCallsDay','Busy','custom:agentbusy','busy','[syncAgentComplete][createHistory][5]','reason\x205\x20busy','outboundCongestionCallsDay','congestion','[syncAgentComplete][createHistory][8]','dialCongestionMaxRetry','reason\x208\x20congestion','Abandoned','reason\x2011\x20abandoned','outboundRejectCallsDay','AgentReject','dialAgentRejectRetryFrequency','custom:agentreject','agentreject','[syncAgentComplete][createHistory][20]','reason\x2020\x20agentreject','Global','[moveContactManagedDialer][0]','contact\x20not\x20moved','dialPredictiveOptimizationPercentage','round','predictiveIntervalAvailable','predictiveIntervalMaxThreshold','predictiveIntervalMinThreshold','predictiveIntervalHitRate','predictiveIntervalMultiplicativeFactor','[startMethodPredictive][StartProgressive]','check\x20predictive\x20is\x20not\x20undefine','check\x20handlePredictive\x20is\x20not\x20undefine','collection\x20data\x20in\x20progressive\x20at','dialPredictiveInterval','dialPredictiveOptimization','[stopMethodPredictive][ReStartProgressive][ExceededDropDay]','Dropped\x20calls\x20day','dropRate','[stopMethodPredictive][ReStartProgressive][ExceededDropInterval]','started\x20in\x20predictive\x20at','avgHandleTime','getDataPredictive','startMethodPredictive','Predictive\x20after\x20first\x20interval','Predictive\x20for\x20every\x20interval','switch\x20in\x20progressive\x20because\x20available\x20agents\x20(',')\x20are\x20less\x20than\x20threshold\x20(',')\x20are\x20more\x20than\x20threshold\x20(','predictiveIntervalAnsweredCalls','abandonmentRate','busyFactor','[getDataPredictive]','Unknown\x20Predictive','check\x20failure','getDataPredictiveOld','loggedIn','outboundQueuePauses','agentBusyFactor','predictiveIntervalPauses','[CatchErlangB]','one\x20call\x20every:','milliseconds','fail\x20to\x20scheduled\x20calls','recallme','queueStatusComplete:\x20','Queue:\x20','queuestatus','dialRecallMeTimeout','voicePause','unlockContact','dialRecallInQueue','[rescheduleContact][dialRecallInQueue]','QUEUE_RECALL','RecallInQueue','[Originate][HistoryDialRecallInQueue][historyCatch]','RECALL_TIMEOUT','RecallFailedTimeout','outboundBlacklistCallsDay','BLACKLIST','Blacklist','[Originate][MoveBlacklist]','inBlackList','limitCalls','temp','getContactDialerIvr','checkContactEmpty','RUNNING','[actionOriginate]\x20','checkIsBlackListIvr','checkContactBlack','loggerHandler','[actionOriginateIvr]\x20','[getContactCampaign2]','floor','dialLimitQueue','not_inuse','getContactDialer','countReScheduled','[countReScheduled]\x20','[getContactDialer2]','[handlePredictive][limitChannel]','tryOriginatePredictive','dialOrderByScheduledAt','checkIsBlackList','[getContactDialerPredictive]','--------\x20Drop\x20Rate\x20--------','Interval:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','Ts:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','P:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','[abandonmentRate]','Ts\x20=\x20','p\x20=\x20','interval\x20=\x20','erlangb','----\x20Agent\x20Busy\x20Factor\x20----','[busyFactor]','m\x20=\x20','Umin\x20=\x20','exports','util','lodash','ioredis','./utils','./utils/hopper','../preview/util/util','../../../config/logger','dialer','booked','predictive','predictiveCalls','syncQueueSummary','redis','defaults','socket.io-emitter','../rpc/cmHopper','../rpc/voiceQueueRt','../rpc/setting','../rpc/interval','./models/action','./models/history','./models/final','./models/queueCallerAbandon','./models/hangup','prototype','enqueue','tail','finally','sequence','voiceQueues','campaigns','agents','trunks','maxNumberOriginate','channels','contactsId','uniqueId','optionPredictive','startPredictive','startProgressive','ivrOriginated','syncAgentConnect','queuecallerabandon','bind','originateresponse','agentcomplete','syncAgentComplete','custom:queuesummarycomplete','syncQueueSummaryComplete','hangup','syncHangup','syncNewExten','varset','syncVarSet','queuemember','syncQueueMember','queuestatuscomplete','syncQueueStatusComplete','loopCampaigns','loopClearZombieChannels','getSettings','then','previewRecallmeReminderInterval','isUndefined','emit','type','outbound','debug','[voiceQueueReport][queuesummary]\x20sending\x20voice_queue:save\x20event:','format','voice:queue:%s','voice_queue:save','isEmpty','info','-----\x20Stats\x20Predictive\x20---','Total\x20Calls:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','predictiveIntervalTotalCalls','Answered\x20Calls:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','Dropped\x20Timeout:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','predictiveIntervalDroppedCallsTimeout','predictiveIntervalDroppedCallsCallersExit','AVG\x20Hold\x20Time:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','AVG\x20Talk\x20Time:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','predictiveIntervalAvgTalktime','---------------------------','predictiveIntervalAvgHoldtime','Avg\x20Hold\x20Time\x20is\x20not\x20enough\x20for\x20predictive','Total\x20Calls\x20are\x20not\x20enough\x20for\x20predictive','History\x20information\x20are\x20empty','---------\x20ErlangB\x20---------','Scheduled\x20Calls:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','erlangCalls','erlangCallToSecond','Drop\x20Rate:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','erlangAbandonmentRate','Agent\x20Busy\x20Factor:\x20\x20\x20\x20\x20\x20\x20\x20\x20','erlangBusyFactor','merge','getSeconds','name','startProgressive\x20value\x20cleared','handlePredictive','error','stack','inspect','checkContactLowerLimitOriginate','contactsRescheduled','message','CAMPAIGN_STATUS','CONTACTS_RESCHEDULED','[getContactDialer2][ReScheduled]','contacts','NO_AVAILABLE_CONTACTS','state','statedesc','starttime','queueStatusComplete','[unlockQueueStatus][undefined]','stringify','pick','NULL_INTERVAL','\x20INTERVAL_IS_NULL','Intervals','Interval','\x20NOT\x20Active','isIVRCampaign','campaign:ivr:%s','campaign:save','sendMessageOneNotActive','originated','INACTIVE','[syncQueueSummary]\x20Campaign\x20Ivr:\x20','[ifTime][Action]','Error','SIP/%s','status','reachable','unmonitored','checkIsTrunkReachable','Trunk','isTrunkReachable','TrunkBackup','TRUNK_NOT_REACHABLE','\x20trunk\x20is\x20not\x20reachable','checkIfTime','ifTimeIvr','ifTime','Failure','\x20Intervals\x20is\x20null\x20','EMPTY_INTERVAL','\x20Intervals\x20is\x20empty\x20','timezones','UNKNOWN_TIMEZONE','\x20Timezone\x20unknow\x20','isArray','push','Action','command','interval','content','indexOf','true','catch','iftime\x20%s,%s','all','some','OVERTIME_GLOBAL_INTERVAL','OVERTIME_INTERVAL','[ifTime][promiseAll]','Global:\x20','\x20Interval\x20is\x20overtime:\x20','Timezone:\x20','resetActiveCalls','syncCampaigns','isIVRCampaignActive','resolve','dialTimezone','checkIfTimeIntervals','launchHandleIvr','[syncCampaigns]','dialMethod','progressive','handlePower','power','Queue','method\x20not\x20recognized','dialGlobalInterval','silly','Dialer::ifTime()','intervalIftime','isGlobal','AMI\x20IfTime','queue','uniqueid','ivr','outboundAnswerCallsDay','reason','agent','agiafterat','dialQueueProject2','dialAgiAfterHangupAgent','YYYY-MM-DD\x20HH:mm:ss','createHistory','[syncAgentComplete][createHistory]','moveContactManagedDialer','[syncAgentComplete]','updateOriginated','droptime','dialQueueTimeout','outboundDropCallsDayTimeout','predictiveIntervalErlangCallsDroppedCalls','Drop','dropreason','TIMEOUT','countglobal','dialDropRetryFrequency','callAdditionalPhoneAfterMin','voiceQueue','additional','countdropretry','dialDropMaxRetry','queueCallerAbandonCreateState','rescheduleContact','add','minutes','ContactId','ListId','VoiceQueueId','CampaignId','[rescheduleContact][Drop]','endtime','calleridname','calleridnum','[syncAgentComplete][createHistory][10]','swapAdditionalPhones','outboundDropCallsDayCallersExit','CALLEREXIT','dialAbandonedRetryFrequency','verifyAdditionalPhones','countabandonedretry','dialAbandonedMaxRetry','[syncAgentComplete][createHistory][11]','actions','channel','actionid','strategy','rrmemory','roundrobin','locked','stateinterface','isNil','queueBooked','idHopper','paused','preview','run','[Catch][Preview][syncQueueStatusComplete]','queueBookedRR','_rr','length','unlockRR','[booked][RR]','Agent:\x20','contactAgent-idHopper:\x20','[booked][RR][finaly]','[booked][unlock2]','[unlock2][syncQueueStatusComplete]','[booked][unlock3]','[unlock3][syncQueueStatusComplete]','syncOriginateResponse','responsetime','getQueue','response','Success','callProgressDetecting','[callProgressDetecting]\x20','variable','amdstatus','exten','xcally-motion-dialer','dialAMDActive','value','HANGUP','outboundAnswerAgiCallsDay','HangupInAMD','membername','AMD','custom:amd','buildObj','amd','saveInDb','[syncHangupInAMD][createHistory]','MACHINE','Machine','countmachineretry','[syncAgentComplete][createHistory][0]','countbusyretry','countcongestionretry','countnoanswerretry','countnosuchnumberretry','dialGlobalMaxRetry','stateGlobal','reason19\x20machine....','dialMachineMaxRetry','createStateFinal','reason\x2019\x20machine....','dialMachineRetryFrequency','[syncHangupInAMDIvr][createHistory]','countagentrejectretry','[rescheduleContact][Machine]','ivrAnswerCallsDay','[syncHangupIvr][createHistory]','[syncHangupIvr]','dialQueueProject','AnswerAGI','AGI','outboundUnknownCallsDay','cause-txt','Unknow','queuesSummary','running','statusMessage'];(function(_0x1872f7,_0x1e3e1b){var _0x2714ef=function(_0x4e67ed){while(--_0x4e67ed){_0x1872f7['push'](_0x1872f7['shift']());}};_0x2714ef(++_0x1e3e1b);}(_0x5c5d,0xe0));var _0xd5c5=function(_0xa1e3e3,_0x29fe0e){_0xa1e3e3=_0xa1e3e3-0x0;var _0xc980e9=_0x5c5d[_0xa1e3e3];return _0xc980e9;};'use strict';var util=require(_0xd5c5('0x0'));var _=require(_0xd5c5('0x1'));var uuid=require('uuid');var moment=require('moment');var rr=require('rr');var Redis=require(_0xd5c5('0x2'));var utils=require(_0xd5c5('0x3'));var hopperUtils=require(_0xd5c5('0x4'));var ut=require(_0xd5c5('0x5'));var config=require('../../../config/environment/');var logger=require(_0xd5c5('0x6'))(_0xd5c5('0x7'));var loggerBooked=require('../../../config/logger')(_0xd5c5('0x8'));var loggerPredictive=require(_0xd5c5('0x6'))(_0xd5c5('0x9'));var loggerPredictiveCalls=require('../../../config/logger')(_0xd5c5('0xa'));var loggerSyncQueueSummary=require('../../../config/logger')(_0xd5c5('0xb'));var ami=require('../ami');config[_0xd5c5('0xc')]=_[_0xd5c5('0xd')](config[_0xd5c5('0xc')],{'host':'localhost','port':0x18eb});var io=require(_0xd5c5('0xe'))(new Redis(config[_0xd5c5('0xc')]));var cmHopper=require(_0xd5c5('0xf'));var voiceQueueRt=require(_0xd5c5('0x10'));var RpcSetting=require(_0xd5c5('0x11'));var Interval=require(_0xd5c5('0x12'));var Action=require(_0xd5c5('0x13'));var History=require(_0xd5c5('0x14'));var Final=require(_0xd5c5('0x15'));var AgentComplete=require('./models/agentComplete');var QueueCallerAbandon=require(_0xd5c5('0x16'));var Hangup=require(_0xd5c5('0x17'));var ipAgi=process['env']['XCALLY_IP_AGI']||'127.0.0.1';var previewRecallmeReminderInterval=0x1;var Sequence=function(){};Sequence[_0xd5c5('0x18')][_0xd5c5('0x19')]=function(_0x545573){this[_0xd5c5('0x1a')]=this[_0xd5c5('0x1a')]?this[_0xd5c5('0x1a')][_0xd5c5('0x1b')](_0x545573):_0x545573();};function Dialer(_0x5067ae,_0x225c71){this[_0xd5c5('0x1c')]=new Sequence();this['preview']=_0x225c71;this[_0xd5c5('0x1d')]=_0x5067ae[_0xd5c5('0x1d')];this[_0xd5c5('0x1e')]=_0x5067ae[_0xd5c5('0x1e')];this[_0xd5c5('0x1f')]=_0x5067ae[_0xd5c5('0x1f')];this['trunks']=_0x5067ae[_0xd5c5('0x20')];this[_0xd5c5('0x21')]=config[_0xd5c5('0x21')]||0x2;this[_0xd5c5('0x22')]={};this['actions']={};this[_0xd5c5('0x23')]={};this[_0xd5c5('0x24')]={};this[_0xd5c5('0x25')]={};this[_0xd5c5('0x26')]={};this[_0xd5c5('0x27')]={};this[_0xd5c5('0x28')]={};this['queueBooked']={};this['queueBookedRR']={};this['queuesSummary']={};ami['on']('agentconnect',this[_0xd5c5('0x29')]['bind'](this));ami['on'](_0xd5c5('0x2a'),this['syncQueueCallerAbandon'][_0xd5c5('0x2b')](this));ami['on'](_0xd5c5('0x2c'),this['syncOriginateResponse']['bind'](this));ami['on'](_0xd5c5('0x2d'),this[_0xd5c5('0x2e')]['bind'](this));ami['on']('custom:queuesummary',this[_0xd5c5('0xb')][_0xd5c5('0x2b')](this));ami['on'](_0xd5c5('0x2f'),this[_0xd5c5('0x30')][_0xd5c5('0x2b')](this));ami['on'](_0xd5c5('0x31'),this[_0xd5c5('0x32')][_0xd5c5('0x2b')](this));ami['on']('newexten',this[_0xd5c5('0x33')][_0xd5c5('0x2b')](this));ami['on'](_0xd5c5('0x34'),this[_0xd5c5('0x35')][_0xd5c5('0x2b')](this));ami['on'](_0xd5c5('0x36'),this[_0xd5c5('0x37')]['bind'](this));ami['on'](_0xd5c5('0x38'),this[_0xd5c5('0x39')]['bind'](this));this[_0xd5c5('0x3a')]();this[_0xd5c5('0x3b')]();RpcSetting[_0xd5c5('0x3c')]()[_0xd5c5('0x3d')](function(_0x58b742){previewRecallmeReminderInterval=_0x58b742[_0xd5c5('0x3e')];});}function isNotNull(_0x1357fe){return _0x1357fe!==null&&!_[_0xd5c5('0x3f')](_0x1357fe);}function msgResponse(_0x4ba001,_0x3e4788,_0x2def99){return{'action':_0x4ba001,'response':_0x3e4788,'message':_0x2def99,'stack':_0x2def99};}function emit(_0x4e624e,_0x22b97e,_0x44660c){io['to'](_0x4e624e)[_0xd5c5('0x40')](_0x22b97e,_0x44660c);}function emitOutboundVoiceQueueSummary(_0x5d5c24){if(_0x5d5c24[_0xd5c5('0x41')]===_0xd5c5('0x42')){logger[_0xd5c5('0x43')](_0xd5c5('0x44'),util['inspect'](_0x5d5c24,{'showHidden':![],'depth':null}));emit(util[_0xd5c5('0x45')](_0xd5c5('0x46'),_0x5d5c24['name']),_0xd5c5('0x47'),_0x5d5c24);}}function checkGetDataPredictive(_0x35be6f){if(isNotNull(_0x35be6f)&&!_[_0xd5c5('0x48')](_0x35be6f)){loggerPredictive[_0xd5c5('0x49')](_0xd5c5('0x4a'));loggerPredictive['info'](_0xd5c5('0x4b'),_0x35be6f[_0xd5c5('0x4c')]);loggerPredictive[_0xd5c5('0x49')](_0xd5c5('0x4d'),_0x35be6f['predictiveIntervalAnsweredCalls']);loggerPredictive[_0xd5c5('0x49')](_0xd5c5('0x4e'),_0x35be6f[_0xd5c5('0x4f')]);loggerPredictive[_0xd5c5('0x49')]('Dropped\x20Exit:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20',_0x35be6f[_0xd5c5('0x50')]);loggerPredictive[_0xd5c5('0x49')](_0xd5c5('0x51'),_0x35be6f['predictiveIntervalAvgHoldtime']);loggerPredictive[_0xd5c5('0x49')](_0xd5c5('0x52'),_0x35be6f[_0xd5c5('0x53')]);loggerPredictive[_0xd5c5('0x49')](_0xd5c5('0x54'));if(_0x35be6f[_0xd5c5('0x4c')]>0x0){if(!_[_0xd5c5('0x3f')](_0x35be6f[_0xd5c5('0x53')])&&_0x35be6f[_0xd5c5('0x53')]>0x0){return!![];}loggerPredictive[_0xd5c5('0x49')]('Avg\x20Talk\x20Time\x20is\x20not\x20enough\x20for\x20predictive');if(!_['isUndefined'](_0x35be6f[_0xd5c5('0x55')])&&_0x35be6f[_0xd5c5('0x55')]>0x0){return!![];}loggerPredictive[_0xd5c5('0x49')](_0xd5c5('0x56'));}else{loggerPredictive[_0xd5c5('0x49')](_0xd5c5('0x57'));}}else{loggerPredictive['info'](_0xd5c5('0x58'));}return![];}function mergeDataErlangB(_0x448210){return function(_0x3a38ab){loggerPredictive['info'](_0xd5c5('0x59'));loggerPredictive[_0xd5c5('0x49')](_0xd5c5('0x5a'),_0x3a38ab[_0xd5c5('0x5b')]);loggerPredictive[_0xd5c5('0x49')]('One\x20call\x20every:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20',_0x3a38ab[_0xd5c5('0x5c')]);loggerPredictive[_0xd5c5('0x49')](_0xd5c5('0x5d'),_0x3a38ab[_0xd5c5('0x5e')]);loggerPredictive[_0xd5c5('0x49')](_0xd5c5('0x5f'),_0x3a38ab[_0xd5c5('0x60')]);loggerPredictive[_0xd5c5('0x49')](_0xd5c5('0x5d'),_0x3a38ab[_0xd5c5('0x5e')]);loggerPredictive[_0xd5c5('0x49')](_0xd5c5('0x54'));_[_0xd5c5('0x61')](_0x448210,_0x3a38ab);};}function ifInterval(_0x1dc716,_0x1b7702){if(_[_0xd5c5('0x3f')](_0x1b7702)){return![];}return utils[_0xd5c5('0x62')](undefined,_0x1b7702)<_0x1dc716*0x3c;}function clearPredictiveAttributes(_0x4deb8e){if(_0x4deb8e[_0xd5c5('0x27')]){_0x4deb8e['startProgressive']=undefined;loggerPredictive[_0xd5c5('0x43')](_0x4deb8e[_0xd5c5('0x63')],_0xd5c5('0x64'));}if(_0x4deb8e[_0xd5c5('0x26')]){_0x4deb8e[_0xd5c5('0x26')]=undefined;loggerPredictive['debug'](_0x4deb8e[_0xd5c5('0x63')],'startPredictive\x20value\x20cleared');}if(_0x4deb8e[_0xd5c5('0x65')]){clearInterval(_0x4deb8e[_0xd5c5('0x65')]);_0x4deb8e[_0xd5c5('0x65')]=undefined;loggerPredictive[_0xd5c5('0x43')](_0x4deb8e[_0xd5c5('0x63')],'handlePredictive\x20interval\x20cleared');}}function loggerCatchPredictive(_0x23462c,_0x272c60){return function(_0x21dbdd){loggerPredictive['error'](_0x272c60[_0xd5c5('0x63')],_0x23462c);loggerPredictive[_0xd5c5('0x66')](_0x21dbdd[_0xd5c5('0x67')]);clearPredictiveAttributes(_0x272c60);};}function loggerCatch(_0x41acd4){return function(_0xb8454b){logger[_0xd5c5('0x66')](_0x41acd4,util[_0xd5c5('0x68')](_0xb8454b,{'showHidden':![],'depth':null}));};}function loggerGetContactDialer(_0x35100a,_0x54d540,_0x13b020){return function(_0x5bf67e){utils[_0xd5c5('0x69')](_0x54d540,_0x13b020,0x0);logger[_0xd5c5('0x66')](_0x35100a,util['inspect'](_0x5bf67e,{'showHidden':![],'depth':null}));};}function sendMessageReschedule(_0x344032){return function(_0x1defb3){if(isNotNull(_0x1defb3)&&isNotNull(_0x1defb3[0x0])){if(_0x1defb3[0x0][_0xd5c5('0x6a')]>0x0){_0x344032[_0xd5c5('0x6b')]=utils[_0xd5c5('0x6c')][_0xd5c5('0x6d')];logger[_0xd5c5('0x49')](_0xd5c5('0x6e')+_0x344032['name'],_0x1defb3[0x0]['contactsRescheduled'],_0xd5c5('0x6f'));}else{_0x344032['message']=utils[_0xd5c5('0x6c')][_0xd5c5('0x70')];logger[_0xd5c5('0x49')]('[getContactDialer2][Empty]'+_0x344032[_0xd5c5('0x63')]);}}};}function createObjHistory(_0x3c8baa,_0x25bf2b,_0x449ad4,_0x3e942b,_0x450904){_0x3c8baa[_0xd5c5('0x6b')]=_0x449ad4;var _0x4e6f3b=new Action(_0x3c8baa,_0x25bf2b);var _0x585dea=new History(_0x4e6f3b);_0x585dea[_0xd5c5('0x71')]=_0x3e942b;_0x585dea[_0xd5c5('0x72')]=_0x450904;_0x585dea['endtime']=_0x4e6f3b[_0xd5c5('0x73')];return _0x585dea;}function unlockQueueStatus(_0x56ecef,_0x5356f1){setTimeout(function(){if(_[_0xd5c5('0x3f')](_0x56ecef[_0xd5c5('0x74')])){loggerBooked[_0xd5c5('0x66')](_0xd5c5('0x75'),_0x5356f1);}_0x56ecef[_0xd5c5('0x74')]=!![];loggerBooked['info']('[booked][unlockQueueStatus]',_0x5356f1,JSON[_0xd5c5('0x76')](_[_0xd5c5('0x77')](_0x56ecef,[_0xd5c5('0x63'),'queueStatusComplete'])));},0x1f3);}function checkInterval(_0x5d5fef){return function(){if(!isNotNull(_0x5d5fef['Interval'])){_0x5d5fef[_0xd5c5('0x6b')]=utils[_0xd5c5('0x6c')][_0xd5c5('0x78')];throw _0x5d5fef[_0xd5c5('0x63')]+_0xd5c5('0x79');}if(!isNotNull(_0x5d5fef['Interval'][_0xd5c5('0x7a')])){_0x5d5fef[_0xd5c5('0x6b')]=utils['CAMPAIGN_STATUS'][_0xd5c5('0x78')];throw _0x5d5fef[_0xd5c5('0x63')]+_0xd5c5('0x79');}if(!isNotNull(_[_0xd5c5('0x48')](_0x5d5fef[_0xd5c5('0x7b')][_0xd5c5('0x7a')]))){_0x5d5fef[_0xd5c5('0x6b')]=utils[_0xd5c5('0x6c')][_0xd5c5('0x78')];throw _0x5d5fef[_0xd5c5('0x63')]+'\x20INTERVAL_IS_NULL';}};}function checkIsIVRCampaignActive(_0x5a694c){return function(){if(!utils['isIVRCampaignActive'](_0x5a694c)){_0x5a694c[_0xd5c5('0x6b')]=utils['CAMPAIGN_STATUS']['INACTIVE'];throw _0x5a694c['name']+_0xd5c5('0x7c');}};}function emitCampaignSummary(_0xfe011d){if(utils[_0xd5c5('0x7d')](_0xfe011d)){emit(util[_0xd5c5('0x45')](_0xd5c5('0x7e'),_0xfe011d['name']),_0xd5c5('0x7f'),_0xfe011d);}}function loggerCatchQueueSummary(_0x448524,_0x1f3537){return function(_0xde2b08){clearPredictiveAttributes(_0x1f3537);emitCampaignSummary(_0x1f3537);loggerSyncQueueSummary[_0xd5c5('0x43')](_0x448524,util['inspect'](_0xde2b08,{'showHidden':![],'depth':null}));};}function notSendMessagesCampaign(_0x252d56){if(_0x252d56[_0xd5c5('0x80')]){if(_0x252d56[_0xd5c5('0x81')]===0x0){_0x252d56['sendMessageOneNotActive']=![];_0x252d56[_0xd5c5('0x6b')]=utils[_0xd5c5('0x6c')][_0xd5c5('0x82')];loggerSyncQueueSummary['debug'](_0xd5c5('0x83'),_0x252d56[_0xd5c5('0x63')],'is\x20not\x20active');}else{_0x252d56[_0xd5c5('0x6b')]=utils[_0xd5c5('0x6c')]['DISACTIVED'];loggerSyncQueueSummary['debug'](_0xd5c5('0x83'),_0x252d56['name'],'is\x20disactive');}emitCampaignSummary(_0x252d56);}}function myreject(_0x3a5596){return function(_0x3cc7d5){return _0x3a5596(msgResponse(_0xd5c5('0x84'),_0xd5c5('0x85'),JSON[_0xd5c5('0x76')](_0x3cc7d5)));};}Dialer[_0xd5c5('0x18')]['isTrunkReachable']=function(_0x3fa6dd){return!_['isUndefined'](_0x3fa6dd)&&_0x3fa6dd&&!_[_0xd5c5('0x3f')](_0x3fa6dd[_0xd5c5('0x63')])&&!_[_0xd5c5('0x3f')](_0x3fa6dd['active'])&&_0x3fa6dd['active']&&(this[_0xd5c5('0x20')][util[_0xd5c5('0x45')](_0xd5c5('0x86'),_0x3fa6dd[_0xd5c5('0x63')])][_0xd5c5('0x87')]===_0xd5c5('0x88')||this['trunks'][util[_0xd5c5('0x45')]('SIP/%s',_0x3fa6dd[_0xd5c5('0x63')])][_0xd5c5('0x87')]===_0xd5c5('0x89'));};Dialer[_0xd5c5('0x18')][_0xd5c5('0x8a')]=function(_0x2a27d2){var _0x37a7ec=this;return function(){if(!_0x37a7ec['isTrunkReachable'](_0x2a27d2[_0xd5c5('0x8b')])){if(!_0x37a7ec[_0xd5c5('0x8c')](_0x2a27d2[_0xd5c5('0x8d')])){_0x2a27d2['message']=utils[_0xd5c5('0x6c')][_0xd5c5('0x8e')];throw _0x2a27d2['name']+_0xd5c5('0x8f');}}};};Dialer[_0xd5c5('0x18')][_0xd5c5('0x90')]=function(_0x298bed,_0x33c65a,_0x4fc7b0,_0x15519e){var _0x422e2d=this;return function(){var _0x3f0041=!![];return _0x422e2d[_0xd5c5('0x91')](_0x298bed,_0x33c65a,_0x4fc7b0,_0x15519e,_0x3f0041);};};Dialer[_0xd5c5('0x18')]['checkIfTimeIntervals']=function(_0x3cd2fb,_0x5a8a2d,_0x42ec78,_0x4a59ce){var _0x44bd35=this;return function(){var _0x345c85=![];return _0x44bd35['ifTimeIvr'](_0x3cd2fb[_0xd5c5('0x7a')],_0x5a8a2d,_0x42ec78,_0x4a59ce,_0x345c85);};};Dialer['prototype']['ifTimeIvr']=function(_0x50d3ae,_0x37cbf9,_0x11df79,_0x25e594,_0xeb47ae){var _0x377a9b=[];return new Promise(function(_0x5d69ea,_0x2b3c79){if(!isNotNull(_0x50d3ae)){_0x25e594[_0xd5c5('0x6b')]=utils[_0xd5c5('0x6c')]['NULL_INTERVAL'];return _0x2b3c79(msgResponse(_0xd5c5('0x92'),_0xd5c5('0x93'),_0x11df79+_0xd5c5('0x94')));}if(_['isEmpty'](_0x50d3ae)){_0x25e594[_0xd5c5('0x6b')]=utils['CAMPAIGN_STATUS'][_0xd5c5('0x95')];return _0x2b3c79(msgResponse(_0xd5c5('0x92'),'Failure',_0x11df79+_0xd5c5('0x96')));}if(_0x37cbf9&&_[_0xd5c5('0x3f')](config[_0xd5c5('0x97')][_0x37cbf9])){_0x25e594['message']=utils[_0xd5c5('0x6c')][_0xd5c5('0x98')];return _0x2b3c79(msgResponse('ifTime','Failure',_0x11df79+_0xd5c5('0x99')+_0x37cbf9));}if(_[_0xd5c5('0x9a')](_0x50d3ae)){for(var _0xe9f20=0x0;_0xe9f20<_0x50d3ae['length'];_0xe9f20+=0x1){_0x377a9b[_0xd5c5('0x9b')](ami[_0xd5c5('0x9c')]({'action':_0xd5c5('0x9d'),'command':util[_0xd5c5('0x45')]('iftime\x20%s,%s',_0x50d3ae[_0xe9f20][_0xd5c5('0x9e')],!_['isUndefined'](config[_0xd5c5('0x97')][_0x37cbf9])?_0x37cbf9:'')})[_0xd5c5('0x3d')](function(_0xc421e3){return _0xc421e3[_0xd5c5('0x9f')][_0xd5c5('0xa0')](_0xd5c5('0xa1'))>=0x0;})[_0xd5c5('0xa2')](myreject(_0x2b3c79)));}}else{_0x377a9b[_0xd5c5('0x9b')](ami[_0xd5c5('0x9c')]({'action':_0xd5c5('0x9d'),'command':util[_0xd5c5('0x45')](_0xd5c5('0xa3'),_0x50d3ae,!_[_0xd5c5('0x3f')](config[_0xd5c5('0x97')][_0x37cbf9])?_0x37cbf9:'')})[_0xd5c5('0x3d')](function(_0xef2fed){return _0xef2fed[_0xd5c5('0x9f')][_0xd5c5('0xa0')](_0xd5c5('0xa1'))>=0x0;})['catch'](myreject(_0x2b3c79)));}Promise[_0xd5c5('0xa4')](_0x377a9b)[_0xd5c5('0x3d')](function(_0x245c36){var _0x2b3532=_[_0xd5c5('0xa5')](_0x245c36);if(_0x2b3532){return _0x5d69ea(_0x2b3532);}else{_0x25e594['message']=_0xeb47ae?utils[_0xd5c5('0x6c')][_0xd5c5('0xa6')]:utils[_0xd5c5('0x6c')][_0xd5c5('0xa7')];return _0x2b3c79(msgResponse(_0xd5c5('0xa8'),_0xd5c5('0x93'),_0xd5c5('0xa9')+_0xeb47ae+'\x20'+_0x11df79+_0xd5c5('0xaa')+util['inspect'](_0x50d3ae,{'showHidden':![],'depth':null})+_0xd5c5('0xab')+_0x37cbf9));}})[_0xd5c5('0xa2')](function(_0x14f6fd){return _0x2b3c79(msgResponse(_0xd5c5('0x92'),_0xd5c5('0x93'),JSON[_0xd5c5('0x76')](_0x14f6fd)));});});};Dialer['prototype'][_0xd5c5('0x3a')]=function(){var _0x5eb9be=this;return cmHopper[_0xd5c5('0xac')]({'active':![]},{'where':{'active':!![]}})[_0xd5c5('0x3d')](function(){setInterval(function(){_0x5eb9be[_0xd5c5('0xad')]();},0x3e8);});};Dialer[_0xd5c5('0x18')]['syncCampaigns']=function(){var _0x59f128=this;var _0x2221a6;for(var _0x558267 in this[_0xd5c5('0x1e')]){if(typeof this[_0xd5c5('0x1e')][_0x558267]!=='undefined'){_0x2221a6=this[_0xd5c5('0x1e')][_0x558267];if(utils[_0xd5c5('0x7d')](_0x2221a6)&&utils[_0xd5c5('0xae')](_0x2221a6)){_0x2221a6[_0xd5c5('0x80')]=!![];Promise[_0xd5c5('0xaf')]()['then'](checkIsIVRCampaignActive(_0x2221a6))['then'](checkInterval(_0x2221a6))['then'](_0x59f128[_0xd5c5('0x8a')](_0x2221a6))[_0xd5c5('0x3d')](_0x59f128[_0xd5c5('0x90')](_0x2221a6['dialGlobalInterval'],_0x2221a6[_0xd5c5('0xb0')],_0x2221a6[_0xd5c5('0x63')],_0x2221a6))[_0xd5c5('0x3d')](_0x59f128[_0xd5c5('0xb1')](_0x2221a6[_0xd5c5('0x7b')],_0x2221a6[_0xd5c5('0xb0')],_0x2221a6[_0xd5c5('0x63')],_0x2221a6))['then'](_0x59f128[_0xd5c5('0xb2')](_0x2221a6))['catch'](loggerCatchQueueSummary(_0xd5c5('0xb3'),_0x2221a6));}else{notSendMessagesCampaign(_0x2221a6);}}}};Dialer[_0xd5c5('0x18')]['checkDialMethod']=function(_0x565762){if(_0x565762[_0xd5c5('0xb4')]!=='predictive'){clearPredictiveAttributes(_0x565762);}switch(_0x565762['dialMethod']){case _0xd5c5('0xb5'):this[_0xd5c5('0xb6')](_0x565762,0x1);break;case _0xd5c5('0xb7'):this[_0xd5c5('0xb6')](_0x565762,_0x565762['dialPowerLevel']);break;case'predictive':this[_0xd5c5('0x9')](_0x565762);break;case _0xd5c5('0x8'):this[_0xd5c5('0xb6')](_0x565762,0x1);break;default:logger['error'](_0xd5c5('0xb8'),_0x565762[_0xd5c5('0x63')],_0xd5c5('0xb9'));}};Dialer['prototype'][_0xd5c5('0x92')]=function(_0x35c62c,_0x454da9){var _0x250441=_0x35c62c[_0xd5c5('0xb0')];var _0x52d821=_0x454da9?_0x35c62c[_0xd5c5('0xba')]:_0x35c62c[_0xd5c5('0x7b')]['Intervals'];logger[_0xd5c5('0xbb')](_0xd5c5('0xbc'),_0x52d821,_0x250441,_0x35c62c[_0xd5c5('0x63')],util[_0xd5c5('0x45')]('Voice\x20Queue\x20%s\x20$s',_0x35c62c[_0xd5c5('0x63')],_0x35c62c['id']));var _0x1754b5=null;return Interval[_0xd5c5('0xbd')](_0x52d821,_0x250441)[_0xd5c5('0x3d')](function(_0xc1225f){if(_0xc1225f===!![]){return _0xc1225f;}else{_0x35c62c[_0xd5c5('0x6b')]=_0x454da9?utils[_0xd5c5('0x6c')]['OVERTIME_GLOBAL_INTERVAL']:utils[_0xd5c5('0x6c')][_0xd5c5('0xa7')];_0x1754b5=msgResponse('[ifTime][promiseAll]',_0xd5c5('0x93'),'Global:\x20'+_0x454da9+'\x20'+_0x35c62c[_0xd5c5('0x63')]+_0xd5c5('0xaa')+util[_0xd5c5('0x68')](_0x52d821,{'showHidden':![],'depth':null})+_0xd5c5('0xab')+_0x250441);}if(_0x1754b5!==null){logger[_0xd5c5('0xbb')]('Dialer::ifTime()\x20errResponse\x20NOT\x20NULL:',_0x1754b5);_0x1754b5[_0xd5c5('0xbe')]=_0x454da9;throw _0x1754b5;}})['catch'](function(_0x5c258e){logger[_0xd5c5('0x66')](_0xd5c5('0xbf'),_0x5c258e);throw msgResponse(_0xd5c5('0x84'),_0xd5c5('0x85'),util[_0xd5c5('0x68')](_0x5c258e,{'showHidden':![],'depth':null}));});};Dialer[_0xd5c5('0x18')][_0xd5c5('0x29')]=function(_0x236982){if(this['voiceQueues'][_0x236982[_0xd5c5('0xc0')]]){if(this[_0xd5c5('0x24')][_0x236982['uniqueid']]&&this[_0xd5c5('0x24')][_0x236982[_0xd5c5('0xc1')]][_0xd5c5('0x41')]!==_0xd5c5('0xc2')){this['updateOriginated'](this[_0xd5c5('0x1d')][_0x236982['queue']]);this[_0xd5c5('0x24')][_0x236982[_0xd5c5('0xc1')]]['answertime']=moment()[_0xd5c5('0x45')]('YYYY-MM-DD\x20HH:mm:ss');}}};Dialer['prototype'][_0xd5c5('0x2e')]=function(_0x1575a2){var _0x4a6f82=this[_0xd5c5('0x24')][_0x1575a2['uniqueid']];if(this[_0xd5c5('0x1d')][_0x1575a2[_0xd5c5('0xc0')]]){if(_0x4a6f82&&_0x4a6f82['type']!==_0xd5c5('0xc2')){delete this[_0xd5c5('0x24')][_0x1575a2['uniqueid']];this[_0xd5c5('0x1d')][_0x1575a2[_0xd5c5('0xc0')]][_0xd5c5('0xc3')]+=0x1;var _0x2e10ae=new AgentComplete(_0x4a6f82,_0x1575a2);if(_0x1575a2[_0xd5c5('0xc4')]===_0xd5c5('0xc5')){_0x2e10ae[_0xd5c5('0xc6')]=this[_0xd5c5('0x1d')][_0x1575a2['queue']][_0xd5c5('0xc7')]&&this[_0xd5c5('0x1d')][_0x1575a2[_0xd5c5('0xc0')]][_0xd5c5('0xc8')]?moment()['format'](_0xd5c5('0xc9')):undefined;}hopperUtils[_0xd5c5('0xca')](_0x2e10ae)['catch'](loggerCatch(_0xd5c5('0xcb')));hopperUtils[_0xd5c5('0xcc')](_0x2e10ae)[_0xd5c5('0xa2')](loggerCatch(_0xd5c5('0xcd')));}}};Dialer[_0xd5c5('0x18')]['syncQueueCallerAbandon']=function(_0x43b473){var _0x124ca5=this[_0xd5c5('0x24')][_0x43b473[_0xd5c5('0xc1')]];var _0x58b375=this;var _0x4c8278=![];var _0x491a98;var _0xa3dcbc;if(this[_0xd5c5('0x1d')][_0x43b473[_0xd5c5('0xc0')]]){if(_0x124ca5&&_0x124ca5['type']!==_0xd5c5('0xc2')){delete this['uniqueId'][_0x43b473[_0xd5c5('0xc1')]];this[_0xd5c5('0xce')](this[_0xd5c5('0x1d')][_0x43b473[_0xd5c5('0xc0')]]);_0x124ca5['droptime']=moment()[_0xd5c5('0x45')]('YYYY-MM-DD\x20HH:mm:ss');var _0x112bd0=new QueueCallerAbandon(_0x124ca5,_0x43b473);if(utils['getSeconds'](_0x124ca5[_0xd5c5('0xcf')],_0x124ca5['responsetime'])>=_0x124ca5[_0xd5c5('0xd0')]){this[_0xd5c5('0x1d')][_0x43b473[_0xd5c5('0xc0')]][_0xd5c5('0x4f')]+=0x1;this[_0xd5c5('0x1d')][_0x43b473[_0xd5c5('0xc0')]][_0xd5c5('0xd1')]+=0x1;this[_0xd5c5('0x1d')][_0x43b473[_0xd5c5('0xc0')]][_0xd5c5('0xd2')]+=0x1;_0x112bd0[_0xd5c5('0x71')]=0xa;_0x112bd0[_0xd5c5('0x72')]=_0xd5c5('0xd3');_0x112bd0[_0xd5c5('0xd4')]=_0xd5c5('0xd5');_0x112bd0[_0xd5c5('0xc6')]=this[_0xd5c5('0x1d')][_0x43b473['queue']][_0xd5c5('0xc7')]?moment()[_0xd5c5('0x45')](_0xd5c5('0xc9')):undefined;_0x112bd0['countdropretry']+=0x1;_0x112bd0[_0xd5c5('0xd6')]+=0x1;_0x491a98=this['voiceQueues'][_0x43b473[_0xd5c5('0xc0')]][_0xd5c5('0xd7')];_0xa3dcbc=this[_0xd5c5('0x1d')][_0x43b473['queue']][_0xd5c5('0xd8')];hopperUtils['verifyAdditionalPhones'](_0x112bd0,_0x112bd0['state'],_0x124ca5[_0xd5c5('0xd9')])['then'](function(_0x4b5b03){_0x4c8278=_0x4b5b03[_0xd5c5('0xda')]==0x1;if(_0x112bd0[_0xd5c5('0xdb')]>=_0x58b375['voiceQueues'][_0x43b473['queue']][_0xd5c5('0xdc')]){_0x58b375[_0xd5c5('0xdd')](_0x112bd0,_0x4b5b03[_0xd5c5('0xda')]);}else{hopperUtils[_0xd5c5('0xde')]({'active':![],'countdropretry':_0x112bd0[_0xd5c5('0xdb')],'scheduledat':moment()[_0xd5c5('0xdf')](_0x58b375[_0xd5c5('0x1d')][_0x43b473[_0xd5c5('0xc0')]]['dialDropRetryFrequency'],_0xd5c5('0xe0'))[_0xd5c5('0x45')](_0xd5c5('0xc9')),'ContactId':_0x124ca5[_0xd5c5('0xe1')],'ListId':_0x124ca5[_0xd5c5('0xe2')],'VoiceQueueId':_0x124ca5[_0xd5c5('0xe3')]||undefined,'CampaignId':_0x124ca5[_0xd5c5('0xe4')]||undefined})['catch'](loggerCatch(_0xd5c5('0xe5')));var _0x4e49d2=new History(_0x112bd0);_0x4e49d2[_0xd5c5('0x71')]=0xa;_0x4e49d2['statedesc']=_0xd5c5('0xd3');_0x4e49d2[_0xd5c5('0x73')]=moment()[_0xd5c5('0x45')](_0xd5c5('0xc9'));_0x4e49d2[_0xd5c5('0xe6')]=_0x4e49d2[_0xd5c5('0x73')];_0x4e49d2[_0xd5c5('0xe7')]=_0x112bd0[_0xd5c5('0xe7')];_0x4e49d2[_0xd5c5('0xe8')]=_0x112bd0[_0xd5c5('0xe8')];hopperUtils[_0xd5c5('0xca')](_0x4e49d2)[_0xd5c5('0xa2')](loggerCatch(_0xd5c5('0xe9')));}})[_0xd5c5('0x3d')](function(){if(_0x4c8278)hopperUtils[_0xd5c5('0xea')](_0x112bd0,_0x491a98,_0xa3dcbc)[_0xd5c5('0x3d')](function(){return 0x1;});});}else{this[_0xd5c5('0x1d')][_0x43b473['queue']][_0xd5c5('0x50')]+=0x1;this['voiceQueues'][_0x43b473[_0xd5c5('0xc0')]][_0xd5c5('0xeb')]+=0x1;_0x112bd0['state']=0xb;_0x112bd0[_0xd5c5('0x72')]='Abandoned';_0x112bd0[_0xd5c5('0xd4')]=_0xd5c5('0xec');_0x112bd0['countabandonedretry']+=0x1;_0x112bd0['countglobal']+=0x1;_0x491a98=this[_0xd5c5('0x1d')][_0x43b473[_0xd5c5('0xc0')]][_0xd5c5('0xed')];_0xa3dcbc=this[_0xd5c5('0x1d')][_0x43b473['queue']][_0xd5c5('0xd8')];hopperUtils[_0xd5c5('0xee')](_0x112bd0,_0x112bd0[_0xd5c5('0x71')],_0x124ca5[_0xd5c5('0xd9')])[_0xd5c5('0x3d')](function(_0x111680){if(_0x112bd0[_0xd5c5('0xef')]>=_0x58b375['voiceQueues'][_0x43b473[_0xd5c5('0xc0')]][_0xd5c5('0xf0')]){_0x58b375[_0xd5c5('0xdd')](_0x112bd0,_0x111680[_0xd5c5('0xda')]);}else{hopperUtils[_0xd5c5('0xde')]({'active':![],'countabandonedretry':_0x112bd0[_0xd5c5('0xef')],'scheduledat':moment()['add'](_0x58b375[_0xd5c5('0x1d')][_0x43b473['queue']]['dialAbandonedRetryFrequency'],_0xd5c5('0xe0'))[_0xd5c5('0x45')](_0xd5c5('0xc9')),'ContactId':_0x124ca5[_0xd5c5('0xe1')],'ListId':_0x124ca5[_0xd5c5('0xe2')],'VoiceQueueId':_0x124ca5[_0xd5c5('0xe3')]||undefined,'CampaignId':_0x124ca5[_0xd5c5('0xe4')]||undefined})['catch'](loggerCatch('[rescheduleContact][Abandoned]'));var _0xb981ee=new History(_0x112bd0);_0xb981ee[_0xd5c5('0x71')]=0xb;_0xb981ee[_0xd5c5('0x72')]='Abandoned';_0xb981ee[_0xd5c5('0x73')]=moment()[_0xd5c5('0x45')](_0xd5c5('0xc9'));_0xb981ee[_0xd5c5('0xe6')]=_0xb981ee[_0xd5c5('0x73')];_0xb981ee[_0xd5c5('0xe7')]=_0x112bd0[_0xd5c5('0xe7')];_0xb981ee['calleridnum']=_0x112bd0[_0xd5c5('0xe8')];hopperUtils[_0xd5c5('0xca')](_0xb981ee)[_0xd5c5('0xa2')](loggerCatch(_0xd5c5('0xf1')));}})[_0xd5c5('0x3d')](function(){if(_0x4c8278)hopperUtils['swapAdditionalPhones'](_0x112bd0,_0x491a98,_0xa3dcbc)[_0xd5c5('0x3d')](function(){return 0x1;});});}}}};Dialer[_0xd5c5('0x18')][_0xd5c5('0x33')]=function(_0xc4afb4){if(this[_0xd5c5('0xf2')][_0xc4afb4['uniqueid']]){this[_0xd5c5('0xf2')][_0xc4afb4[_0xd5c5('0xc1')]][_0xd5c5('0xf3')]=_0xc4afb4['channel'];}if(this[_0xd5c5('0x24')][_0xc4afb4[_0xd5c5('0xc1')]]){this[_0xd5c5('0x24')][_0xc4afb4[_0xd5c5('0xc1')]][_0xd5c5('0xf3')]=_0xc4afb4['channel'];}};Dialer[_0xd5c5('0x18')]['syncQueueMember']=function(_0x5783f7){if(!this[_0xd5c5('0xf2')][_0x5783f7[_0xd5c5('0xf4')]]){return;}var _0x3221b6=this[_0xd5c5('0x1d')][this[_0xd5c5('0xf2')][_0x5783f7['actionid']][_0xd5c5('0xc0')]][_0xd5c5('0xf5')]||_0xd5c5('0xf6');if(_0x3221b6===_0xd5c5('0xf7')){if(this['actions'][_0x5783f7[_0xd5c5('0xf4')]]&&_['isNil'](this[_0xd5c5('0xf2')][_0x5783f7[_0xd5c5('0xf4')]][_0xd5c5('0xf8')])&&_0x5783f7[_0xd5c5('0x87')]==='1'&&_0x5783f7['paused']==='0'){if(this[_0xd5c5('0x1f')][_0x5783f7['stateinterface']]){if(!this[_0xd5c5('0x1f')][_0x5783f7[_0xd5c5('0xf9')]]['locked']){this['agents'][_0x5783f7[_0xd5c5('0xf9')]][_0xd5c5('0xf8')]=!![];this[_0xd5c5('0xf2')][_0x5783f7['actionid']][_0xd5c5('0xf8')]=!![];this[_0xd5c5('0xf2')][_0x5783f7[_0xd5c5('0xf4')]][_0xd5c5('0xf9')]=_0x5783f7[_0xd5c5('0xf9')];}}}}else if(_0x3221b6===_0xd5c5('0xf6')){if(this['actions'][_0x5783f7[_0xd5c5('0xf4')]]){if(this[_0xd5c5('0x1f')][_0x5783f7[_0xd5c5('0xf9')]]){this[_0xd5c5('0xf2')][_0x5783f7['actionid']][_0xd5c5('0xf9')]=_0x5783f7[_0xd5c5('0xf9')];if(_[_0xd5c5('0xfa')](this[_0xd5c5('0xfb')][this['actions'][_0x5783f7['actionid']][_0xd5c5('0xc0')]])){this[_0xd5c5('0xfb')][this[_0xd5c5('0xf2')][_0x5783f7[_0xd5c5('0xf4')]]['queue']]=[];}this[_0xd5c5('0xfb')][this[_0xd5c5('0xf2')][_0x5783f7['actionid']]['queue']]['push'](_[_0xd5c5('0x61')](_[_0xd5c5('0x77')](this[_0xd5c5('0xf2')][_0x5783f7[_0xd5c5('0xf4')]],[_0xd5c5('0xfc'),_0xd5c5('0xf9')]),{'status':_0x5783f7[_0xd5c5('0x87')],'paused':_0x5783f7[_0xd5c5('0xfd')]}));}}}};Dialer[_0xd5c5('0x18')]['syncQueueStatusComplete']=function(_0x4f1cfe){if(!this[_0xd5c5('0xf2')][_0x4f1cfe[_0xd5c5('0xf4')]]){return;}var _0x15aec9=this;var _0x1b4bf3=this['voiceQueues'][this[_0xd5c5('0xf2')][_0x4f1cfe[_0xd5c5('0xf4')]][_0xd5c5('0xc0')]];var _0x23b789=_0x1b4bf3[_0xd5c5('0xf5')]||_0xd5c5('0xf6');if(_0x23b789===_0xd5c5('0xf7')){if(this[_0xd5c5('0xf2')][_0x4f1cfe['actionid']]&&this[_0xd5c5('0xf2')][_0x4f1cfe['actionid']][_0xd5c5('0xf9')]){this[_0xd5c5('0xfe')][_0xd5c5('0xff')](this[_0xd5c5('0xf2')][_0x4f1cfe['actionid']][_0xd5c5('0xfc')],this[_0xd5c5('0xf2')][_0x4f1cfe[_0xd5c5('0xf4')]]['stateinterface'])['catch'](function(_0x100366){logger[_0xd5c5('0x66')](_0xd5c5('0x100'),util[_0xd5c5('0x68')](_0x100366,{'showHidden':![],'depth':null}));})[_0xd5c5('0x1b')](function(){_0x15aec9[_0xd5c5('0xce')](_0x15aec9[_0xd5c5('0x1d')][_0x15aec9['actions'][_0x4f1cfe['actionid']]['queue']]);_0x15aec9[_0xd5c5('0x1f')][_0x15aec9[_0xd5c5('0xf2')][_0x4f1cfe[_0xd5c5('0xf4')]]['stateinterface']]['locked']=![];delete _0x15aec9[_0xd5c5('0xf2')][_0x4f1cfe[_0xd5c5('0xf4')]];unlockQueueStatus(_0x1b4bf3);});}else{this[_0xd5c5('0xce')](this[_0xd5c5('0x1d')][this[_0xd5c5('0xf2')][_0x4f1cfe[_0xd5c5('0xf4')]][_0xd5c5('0xc0')]]);hopperUtils[_0xd5c5('0xde')]({'active':![],'ContactId':this['actions'][_0x4f1cfe[_0xd5c5('0xf4')]][_0xd5c5('0xe1')],'ListId':this[_0xd5c5('0xf2')][_0x4f1cfe[_0xd5c5('0xf4')]][_0xd5c5('0xe2')],'VoiceQueueId':this[_0xd5c5('0xf2')][_0x4f1cfe['actionid']][_0xd5c5('0xe3')]||undefined,'CampaignId':this[_0xd5c5('0xf2')][_0x4f1cfe['actionid']][_0xd5c5('0xe4')]||undefined})[_0xd5c5('0xa2')](loggerCatch('[unlock][syncQueueStatusComplete]'));delete this[_0xd5c5('0xf2')][_0x4f1cfe[_0xd5c5('0xf4')]];unlockQueueStatus(_0x1b4bf3);}}else if(_0x23b789===_0xd5c5('0xf6')){var _0x2c2139;if(this[_0xd5c5('0xf2')][_0x4f1cfe['actionid']]&&!_['isEmpty'](this[_0xd5c5('0xfb')][this[_0xd5c5('0xf2')][_0x4f1cfe[_0xd5c5('0xf4')]]['queue']])){if(this['queueBookedRR'][_0x15aec9[_0xd5c5('0xf2')][_0x4f1cfe[_0xd5c5('0xf4')]][_0xd5c5('0xc0')]]){this[_0xd5c5('0x101')][_0x15aec9[_0xd5c5('0xf2')][_0x4f1cfe[_0xd5c5('0xf4')]][_0xd5c5('0xc0')]]=this['queueBookedRR'][this[_0xd5c5('0xf2')][_0x4f1cfe[_0xd5c5('0xf4')]][_0xd5c5('0xc0')]]?this[_0xd5c5('0x101')][this['actions'][_0x4f1cfe[_0xd5c5('0xf4')]][_0xd5c5('0xc0')]]:this['queueBooked'][this['actions'][_0x4f1cfe[_0xd5c5('0xf4')]][_0xd5c5('0xc0')]]?this[_0xd5c5('0xfb')][this['actions'][_0x4f1cfe[_0xd5c5('0xf4')]][_0xd5c5('0xc0')]][_0xd5c5('0x102')]||0x0:0x0;}this[_0xd5c5('0xfb')][this[_0xd5c5('0xf2')][_0x4f1cfe[_0xd5c5('0xf4')]][_0xd5c5('0xc0')]][_0xd5c5('0x102')]=this[_0xd5c5('0x101')][this[_0xd5c5('0xf2')][_0x4f1cfe[_0xd5c5('0xf4')]][_0xd5c5('0xc0')]];for(var _0x5bf46f=0x0;_0x5bf46f=_0x4fff1d[_0xd5c5('0x12c')]){_0x4e1e71[_0xd5c5('0x12d')](_0x300d2e,_0x1dfaf3,_0x5e4145,_0xd5c5('0x12e'));}else{if(_0x300d2e['countmachineretry']>=_0x4fff1d[_0xd5c5('0x12f')]){_0x4e1e71[_0xd5c5('0x130')](_0x300d2e,_0x1dfaf3,_0x5e4145,_0xd5c5('0x131'));}else{hopperUtils[_0xd5c5('0xde')]({'active':![],'countmachineretry':_0x300d2e['countmachineretry'],'scheduledat':moment()[_0xd5c5('0xdf')](_0x4fff1d[_0xd5c5('0x132')],_0xd5c5('0xe0'))[_0xd5c5('0x45')](_0xd5c5('0xc9')),'ContactId':_0x300d2e['ContactId'],'ListId':_0x300d2e[_0xd5c5('0xe2')],'VoiceQueueId':_0x300d2e[_0xd5c5('0xe3')]||undefined,'CampaignId':_0x300d2e[_0xd5c5('0xe4')]||undefined})['catch'](loggerCatch('[rescheduleContact][Machine]'));_0x1dfaf3({'reschedule':0x1});}}});}if(_0x9f0eff['type']===_0xd5c5('0xc2')&&this[_0xd5c5('0x1e')][_0x9f0eff[_0xd5c5('0xc0')]][_0xd5c5('0x118')]&&_0x3d2f38[_0xd5c5('0x119')]===_0xd5c5('0x11a')){delete this[_0xd5c5('0x24')][_0x3d2f38[_0xd5c5('0xc1')]];this['updateOriginated'](this[_0xd5c5('0x1e')][_0x9f0eff[_0xd5c5('0xc0')]]);_0x3442ee=new Hangup(_0x9f0eff,_0x3d2f38);_0x3442ee[_0xd5c5('0x71')]=0x12;_0x3442ee[_0xd5c5('0x72')]=_0xd5c5('0x11c');_0x3442ee['membername']='AMD';ami['emit'](_0xd5c5('0x11f'),ut['buildObj'](_0x3442ee,'amd'));this['saveInDb'](_0x3442ee,_0xd5c5('0x133'),'[syncHangupInAMDIvr]');}if(_0x9f0eff['type']===_0xd5c5('0xc2')&&this[_0xd5c5('0x1e')][_0x9f0eff['queue']][_0xd5c5('0x118')]&&_0x3d2f38[_0xd5c5('0x119')]===_0xd5c5('0x124')){return new Promise(function(_0x5685ad,_0xfb3816){delete _0x4e1e71[_0xd5c5('0x24')][_0x3d2f38[_0xd5c5('0xc1')]];_0x4e1e71['updateOriginated'](_0x4e1e71[_0xd5c5('0x1e')][_0x9f0eff[_0xd5c5('0xc0')]]);_0x4e1e71[_0xd5c5('0x1e')][_0x9f0eff['queue']][_0xd5c5('0xc3')]+=0x1;_0x4e1e71[_0xd5c5('0x1e')][_0x9f0eff[_0xd5c5('0xc0')]][_0xd5c5('0x11b')]+=0x1;var _0x382b35=_0x4e1e71[_0xd5c5('0x1e')][_0x9f0eff['queue']];var _0x154c3b=new Hangup(_0x9f0eff,_0x3d2f38);_0x154c3b[_0xd5c5('0x71')]=0x13;_0x154c3b[_0xd5c5('0x72')]=_0xd5c5('0x125');_0x154c3b[_0xd5c5('0x11d')]=_0xd5c5('0x11e');_0x154c3b[_0xd5c5('0x126')]+=0x1;_0x154c3b[_0xd5c5('0xd6')]+=0x1;_0x154c3b['amd']=!![];ami[_0xd5c5('0x40')](_0xd5c5('0x11f'),ut[_0xd5c5('0x120')](_0x154c3b,_0xd5c5('0x121')));hopperUtils['createHistory'](_0x154c3b)[_0xd5c5('0xa2')](loggerCatch(_0xd5c5('0x127')));if(_0x154c3b['countbusyretry']+_0x154c3b[_0xd5c5('0x129')]+_0x154c3b[_0xd5c5('0x12a')]+_0x154c3b[_0xd5c5('0x12b')]+_0x154c3b[_0xd5c5('0xdb')]+_0x154c3b[_0xd5c5('0xef')]+_0x154c3b['countmachineretry']+_0x154c3b[_0xd5c5('0x134')]>=_0x382b35[_0xd5c5('0x12c')]){_0x4e1e71[_0xd5c5('0x12d')](_0x154c3b,_0x5685ad,_0xfb3816,_0xd5c5('0x12e'));}else{if(_0x154c3b[_0xd5c5('0x126')]>=_0x382b35[_0xd5c5('0x12f')]){_0x4e1e71[_0xd5c5('0x130')](_0x154c3b,_0x5685ad,_0xfb3816,_0xd5c5('0x131'));}else{hopperUtils['rescheduleContact']({'active':![],'countmachineretry':_0x154c3b[_0xd5c5('0x126')],'scheduledat':moment()[_0xd5c5('0xdf')](_0x382b35['dialMachineRetryFrequency'],_0xd5c5('0xe0'))[_0xd5c5('0x45')](_0xd5c5('0xc9')),'ContactId':_0x154c3b[_0xd5c5('0xe1')],'ListId':_0x154c3b['ListId'],'VoiceQueueId':_0x154c3b[_0xd5c5('0xe3')]||undefined,'CampaignId':_0x154c3b[_0xd5c5('0xe4')]||undefined})[_0xd5c5('0xa2')](loggerCatch(_0xd5c5('0x135')));_0x5685ad({'reschedule':0x1});}}});}}};Dialer[_0xd5c5('0x18')][_0xd5c5('0x32')]=function(_0x338c2c){var _0x27d7c6=this[_0xd5c5('0x24')][_0x338c2c['uniqueid']];var _0x49855d;if(_0x27d7c6&&_0x27d7c6['type']===_0xd5c5('0xc2')){delete this[_0xd5c5('0x24')][_0x338c2c['uniqueid']];this[_0xd5c5('0xce')](this['campaigns'][_0x27d7c6[_0xd5c5('0xc0')]]);this[_0xd5c5('0x1e')][_0x27d7c6['queue']][_0xd5c5('0x136')]+=0x1;_0x49855d=new Hangup(_0x27d7c6,_0x338c2c);hopperUtils[_0xd5c5('0xca')](_0x49855d)[_0xd5c5('0xa2')](loggerCatch(_0xd5c5('0x137')));hopperUtils['moveContactManagedDialer'](_0x49855d)[_0xd5c5('0xa2')](loggerCatch(_0xd5c5('0x138')));}if(_0x27d7c6&&_0x27d7c6[_0xd5c5('0x41')]!=='ivr'&&isNotNull(this[_0xd5c5('0x1d')][_0x27d7c6[_0xd5c5('0xc0')]][_0xd5c5('0x139')])){delete this[_0xd5c5('0x24')][_0x338c2c[_0xd5c5('0xc1')]];this['updateOriginated'](this[_0xd5c5('0x1d')][_0x27d7c6['queue']]);this[_0xd5c5('0x1d')][_0x27d7c6[_0xd5c5('0xc0')]][_0xd5c5('0xc3')]+=0x1;this[_0xd5c5('0x1d')][_0x27d7c6[_0xd5c5('0xc0')]][_0xd5c5('0x11b')]+=0x1;_0x49855d=new Hangup(_0x27d7c6,_0x338c2c);_0x49855d[_0xd5c5('0x71')]=0x10;_0x49855d[_0xd5c5('0x72')]=_0xd5c5('0x13a');_0x49855d[_0xd5c5('0x11d')]=_0xd5c5('0x13b');hopperUtils[_0xd5c5('0xca')](_0x49855d)[_0xd5c5('0xa2')](loggerCatch('[syncHangupIvr][createHistory]'));hopperUtils[_0xd5c5('0xcc')](_0x49855d)['catch'](loggerCatch(_0xd5c5('0x138')));}if(_0x27d7c6&&_0x27d7c6[_0xd5c5('0x41')]!==_0xd5c5('0xc2')&&!isNotNull(this[_0xd5c5('0x1d')][_0x27d7c6['queue']][_0xd5c5('0x139')])){delete this[_0xd5c5('0x24')][_0x338c2c[_0xd5c5('0xc1')]];this[_0xd5c5('0xce')](this['voiceQueues'][_0x27d7c6[_0xd5c5('0xc0')]]);this['voiceQueues'][_0x27d7c6[_0xd5c5('0xc0')]][_0xd5c5('0x13c')]+=0x1;_0x49855d=new Hangup(_0x27d7c6,_0x338c2c);_0x49855d[_0xd5c5('0x71')]=0xc;_0x49855d['statedesc']=_0x338c2c[_0xd5c5('0x13d')];_0x49855d[_0xd5c5('0x11d')]=_0xd5c5('0x13e');hopperUtils['createHistory'](_0x49855d)[_0xd5c5('0xa2')](loggerCatch(_0xd5c5('0x137')));hopperUtils[_0xd5c5('0xcc')](_0x49855d)[_0xd5c5('0xa2')](loggerCatch('[syncHangupIvr]'));}};Dialer[_0xd5c5('0x18')][_0xd5c5('0xb')]=function(_0x1f9f2d){var _0x435fac=this;if(!_0x435fac[_0xd5c5('0x13f')][_0x1f9f2d['name']]){_0x435fac['queuesSummary'][_0x1f9f2d[_0xd5c5('0x63')]]={'running':![]};}else if(_0x435fac[_0xd5c5('0x13f')][_0x1f9f2d['name']][_0xd5c5('0x140')]===!![]){return;}else if(_0x435fac[_0xd5c5('0x13f')][_0x1f9f2d['name']][_0xd5c5('0x140')]===![]){_0x435fac[_0xd5c5('0x13f')][_0x1f9f2d['name']]['running']=!![];}var _0x10b622=_0x435fac[_0xd5c5('0x1d')][_0x1f9f2d[_0xd5c5('0x63')]];var _0x3aa855=_0x10b622[_0xd5c5('0x6b')]!==utils['CAMPAIGN_STATUS'][_0xd5c5('0x82')];var _0x45fb89=utils['isPreviewCampaign'](_0x10b622);_0x10b622[_0xd5c5('0x141')]=utils['getQueueCampaignStatusMessage'](_0x10b622,_0x435fac[_0xd5c5('0x20')]);Promise[_0xd5c5('0xaf')]()['then'](function(){if(_0x10b622[_0xd5c5('0x141')]===utils[_0xd5c5('0x6c')][_0xd5c5('0x82')]){if(_0x3aa855){clearPredictiveAttributes(_0x10b622);_0x1f9f2d['startPredictive']=undefined;_0x1f9f2d[_0xd5c5('0x27')]=undefined;}if(_0x10b622[_0xd5c5('0x141')]===utils[_0xd5c5('0x6c')][_0xd5c5('0x82')]){_0x1f9f2d[_0xd5c5('0x142')]=0x0;_0x1f9f2d['paused']=0x0;_0x1f9f2d[_0xd5c5('0x143')]=0x0;_0x1f9f2d[_0xd5c5('0x144')]=0x0;_0x1f9f2d[_0xd5c5('0x145')]=0x0;}}else if(_0x10b622[_0xd5c5('0x141')]===utils[_0xd5c5('0x6c')][_0xd5c5('0x146')]&&!_0x45fb89){return _0x435fac[_0xd5c5('0x92')](_0x10b622,!![])[_0xd5c5('0x3d')](function(){return _0x435fac[_0xd5c5('0x92')](_0x10b622,![]);})[_0xd5c5('0x3d')](function(){return _0x435fac[_0xd5c5('0x147')](_0x10b622);})[_0xd5c5('0xa2')](function(_0x1b6abc){loggerSyncQueueSummary[_0xd5c5('0x43')](_0xd5c5('0x148'),util[_0xd5c5('0x68')](_0x1b6abc,{'showHidden':![],'depth':null}));clearPredictiveAttributes(_0x10b622);});}else{clearPredictiveAttributes(_0x10b622);}})[_0xd5c5('0x3d')](function(){var _0x841f22=_0x1f9f2d[_0xd5c5('0x149')](_0x10b622);if(_0x841f22||_0x10b622[_0xd5c5('0x14a')]){_0x10b622[_0xd5c5('0x14a')]=![];_0x1f9f2d[_0xd5c5('0x14b')](_0x10b622);Object[_0xd5c5('0x14c')](_0x10b622,_0x1f9f2d);emitOutboundVoiceQueueSummary(_0x1f9f2d);}_0x435fac['queuesSummary'][_0x10b622[_0xd5c5('0x63')]][_0xd5c5('0x140')]=![];})['catch'](function(_0x340012){logger[_0xd5c5('0x66')]('[syncQueueSummary]',util[_0xd5c5('0x68')](_0x340012,{'showHidden':![],'depth':null}));_0x435fac[_0xd5c5('0x13f')][_0x10b622['name']][_0xd5c5('0x140')]=![];});};Dialer[_0xd5c5('0x18')][_0xd5c5('0x30')]=_[_0xd5c5('0x14d')](function(){var _0x5c6fce=_[_0xd5c5('0x14e')](this[_0xd5c5('0x1d')],function(_0x1b2c59){return _0x1b2c59['dialPreviewRecallmeReminder'];});var _0xa4326a=_['filter'](this[_0xd5c5('0x1f')],function(_0x3b1b8f){return _0x3b1b8f[_0xd5c5('0x14f')]&&_0x3b1b8f['status']===_0xd5c5('0x88');});if(_0x5c6fce['length']>0x0&&_0xa4326a[_0xd5c5('0x103')]>0x0){return Promise['resolve']()[_0xd5c5('0x3d')](cmHopper['handlePreviewRecallNotifications'](_[_0xd5c5('0x150')](_0x5c6fce,'id'),previewRecallmeReminderInterval,_[_0xd5c5('0x150')](_0xa4326a,'id')))[_0xd5c5('0x3d')](function(_0x14109e){for(var _0x4eeff3=0x0;_0x4eeff3<_0x14109e[_0xd5c5('0x103')];_0x4eeff3++){var _0x3caa34=_0x14109e[_0x4eeff3][_0xd5c5('0x151')][_0xd5c5('0x63')];if(_0x3caa34)io['to'](util[_0xd5c5('0x45')](_0xd5c5('0x152'),_0x3caa34))[_0xd5c5('0x40')](_0xd5c5('0x153'),{'hopper':_0x14109e[_0x4eeff3]});}})[_0xd5c5('0xa2')](function(_0x5abd15){logger[_0xd5c5('0x66')](_0xd5c5('0x154'),_0x5abd15);});}},0x3c*0x3e8,{'leading':!![]});Dialer[_0xd5c5('0x18')]['loopClearZombieChannels']=function(){var _0x4c3c26=this;setInterval(function(){_0x4c3c26[_0xd5c5('0x155')](_0x4c3c26['uniqueId'],_0xd5c5('0x156'));_0x4c3c26['clearZombieChannels'](_0x4c3c26[_0xd5c5('0xf2')],_0xd5c5('0x157'));},0x32c8);};Dialer[_0xd5c5('0x18')][_0xd5c5('0x155')]=function(_0x404090,_0x1ef721){var _0x144685=this;for(var _0x2e1685 in _0x404090){if(typeof _0x404090[_0x2e1685]!=='undefined'){this['sequence'][_0xd5c5('0x19')](function(){if(!_[_0xd5c5('0xfa')](_0x404090[_0x2e1685])){return ami[_0xd5c5('0x9c')]({'action':_0xd5c5('0x87'),'channel':_0x404090[_0x2e1685][_0xd5c5('0xf3')]})[_0xd5c5('0xa2')](function(_0x1e945f){if(_0x1e945f['message']==='No\x20such\x20channel'){setTimeout(function(){if(_0x404090[_0x2e1685]&&_0x404090[_0x2e1685][_0xd5c5('0x41')]!==_0xd5c5('0xc2')){_0x144685[_0xd5c5('0xce')](_0x144685[_0xd5c5('0x1d')][_0x404090[_0x2e1685][_0xd5c5('0xc0')]]);logger[_0xd5c5('0x66')](_0xd5c5('0x158'),_0x1ef721,_0x2e1685,_0x404090[_0x2e1685][_0xd5c5('0xc0')]);delete _0x404090[_0x2e1685];}if(_0x404090[_0x2e1685]&&_0x404090[_0x2e1685][_0xd5c5('0x41')]===_0xd5c5('0xc2')){_0x144685['updateOriginated'](_0x144685[_0xd5c5('0x1e')][_0x404090[_0x2e1685][_0xd5c5('0xc0')]]);logger[_0xd5c5('0x66')](_0xd5c5('0x159'),_0x1ef721,_0x2e1685,_0x404090[_0x2e1685][_0xd5c5('0xc0')]);delete _0x404090[_0x2e1685];}},0x2328);}});}});}}};Dialer['prototype'][_0xd5c5('0x15a')]=function(_0x2eb711){return Promise[_0xd5c5('0xaf')]()[_0xd5c5('0x3d')](voiceQueueRt[_0xd5c5('0x15a')](_0x2eb711))[_0xd5c5('0xa2')](loggerCatch(_0xd5c5('0x15b')));};Dialer[_0xd5c5('0x18')][_0xd5c5('0xce')]=function(_0x1164f7){if(!_[_0xd5c5('0x3f')](_0x1164f7)&&_0x1164f7!==null){if(typeof _0x1164f7[_0xd5c5('0x81')]!==_0xd5c5('0x15c')){if(_0x1164f7[_0xd5c5('0x81')]>0x0){_0x1164f7[_0xd5c5('0x81')]-=0x1;}else{logger['error'](_0xd5c5('0x15d'));}}}else{logger[_0xd5c5('0x66')](_0xd5c5('0x15e'));}};Dialer[_0xd5c5('0x18')]['loggerHandler']=function(_0x3ee506,_0xbb3f17){var _0x48f3ab=this;return function(_0xc66b20){_0x48f3ab[_0xd5c5('0xce')](_0xbb3f17);logger[_0xd5c5('0x66')](_0x3ee506,util[_0xd5c5('0x68')](_0xc66b20,{'showHidden':![],'depth':null}));};};Dialer[_0xd5c5('0x18')][_0xd5c5('0x15f')]=function(_0xefbc8e,_0x5868d0,_0x143317){var _0x4085df={'state':0x19,'statedesc':'notFound'};this[_0xd5c5('0xce')](_0x5868d0);this[_0xd5c5('0x122')](_['merge'](_0x4085df,_['pick'](_0x143317,[_0xd5c5('0xe1'),_0xd5c5('0xe2'),_0xd5c5('0x160'),'VoiceQueueId',_0xd5c5('0xe4')])),_0xd5c5('0x161'),_0xd5c5('0x162'));logger[_0xd5c5('0x66')](_0xefbc8e);};Dialer[_0xd5c5('0x18')][_0xd5c5('0x122')]=function(_0x427fdc,_0x37241e,_0x573698){hopperUtils[_0xd5c5('0xca')](_0x427fdc)['catch'](loggerCatch(_0x37241e));hopperUtils[_0xd5c5('0xcc')](_0x427fdc)[_0xd5c5('0xa2')](loggerCatch(_0x573698));};Dialer[_0xd5c5('0x18')][_0xd5c5('0xdd')]=function(_0x5adc59,_0x2af9e6){hopperUtils[_0xd5c5('0xca')](_0x5adc59)[_0xd5c5('0xa2')](loggerCatch('[syncAgentComplete][createHistory]'));if(_0x2af9e6==0x0){hopperUtils['moveContactManagedDialer'](_0x5adc59)[_0xd5c5('0xa2')](loggerCatch(_0xd5c5('0x163')));}};Dialer[_0xd5c5('0x18')][_0xd5c5('0x154')]=function(_0x1ea923){return Promise['resolve']()[_0xd5c5('0x3d')](cmHopper[_0xd5c5('0x164')](_0x1ea923['id'],previewRecallmeReminderInterval))[_0xd5c5('0x3d')](function(_0x41a33e){for(var _0x2a5dc1=0x0;_0x2a5dc1<_0x41a33e['length'];_0x2a5dc1++){var _0x1e772b=_0x41a33e[_0x2a5dc1]['Agent']['name'];if(_0x1e772b)io['to'](util[_0xd5c5('0x45')]('user:%s',_0x1e772b))['emit']('user:dialPreviewRecallReminder',{'hopper':_0x41a33e[_0x2a5dc1]});}})['catch'](function(){});};Dialer[_0xd5c5('0x18')][_0xd5c5('0xb2')]=function(_0x42c80d){var _0x1eaad6=this;return function(){_0x1eaad6[_0xd5c5('0x165')](_0x42c80d);};};Dialer[_0xd5c5('0x18')][_0xd5c5('0x166')]=function(_0x5714d4,_0x2520bf){var _0x4cb102=this;var _0x5c7fcf=uuid['v4']();this['actions'][_0x5c7fcf]=new Action(_0x5714d4,_0x2520bf,_0x5c7fcf);return new Promise(function(_0x478e94,_0x314a38){if(_['isUndefined'](_0x5714d4)&&typeof _0x5714d4!==_0xd5c5('0x167')){return _0x314a38(msgResponse(_0xd5c5('0x168'),_0xd5c5('0x93'),_0xd5c5('0x169')));}if(_[_0xd5c5('0x3f')](_0x2520bf[_0xd5c5('0x16a')])||_0x2520bf[_0xd5c5('0x16a')]===null){return _0x314a38(msgResponse(_0xd5c5('0x168'),_0xd5c5('0x93'),'contact\x20is\x20undefine'));}var _0x23b96a={'XMD-CALLERID':_0x4cb102[_0xd5c5('0xf2')][_0x5c7fcf]['getCaller'](),'XMD-AGI':_0x5714d4[_0xd5c5('0x139')]?util[_0xd5c5('0x45')](_0xd5c5('0x16b'),ipAgi,_0x5714d4[_0xd5c5('0x139')]):_0xd5c5('0x16c'),'XMD-AGIAFTER':_0x5714d4[_0xd5c5('0xc7')]?util['format'](_0xd5c5('0x16b'),ipAgi,_0x5714d4[_0xd5c5('0xc7')]):'NONE','XMD-QUEUE':utils['isOutboundQueue'](_0x5714d4)?util[_0xd5c5('0x45')]('\x22%s,%s%s,,,%s\x22',_0x5714d4[_0xd5c5('0x63')],_0x5714d4[_0xd5c5('0x16d')]||'',_0x5714d4['dialAgiAfterHangupAgent']?'c':'',_0x5714d4[_0xd5c5('0xd0')]||0x3):_0xd5c5('0x16c'),'XMD-CONTACTID':_0x2520bf['ContactId'],'XMD-CDRTYPE':_0xd5c5('0x7'),'CALLERID(all)':_0x4cb102[_0xd5c5('0xf2')][_0x5c7fcf][_0xd5c5('0x16e')](),'XMD-AMD':_0x5714d4[_0xd5c5('0x118')]?_0xd5c5('0x146'):'NONE','XMD-DESTINATION':_0xd5c5('0x117')};if(_0x5714d4[_0xd5c5('0x118')]){_0x23b96a['XMD-AMDINITIALSILENCE']=_0x5714d4[_0xd5c5('0x16f')]||0x9c4;_0x23b96a[_0xd5c5('0x170')]=_0x5714d4[_0xd5c5('0x171')]||0x5dc;_0x23b96a[_0xd5c5('0x172')]=_0x5714d4[_0xd5c5('0x173')]||0x320;_0x23b96a[_0xd5c5('0x174')]=_0x5714d4[_0xd5c5('0x175')]||0x1388;_0x23b96a[_0xd5c5('0x176')]=_0x5714d4['dialAMDMinWordLength']||0x64;_0x23b96a[_0xd5c5('0x177')]=_0x5714d4[_0xd5c5('0x178')]||0x32;_0x23b96a[_0xd5c5('0x179')]=_0x5714d4[_0xd5c5('0x17a')]||0x3;_0x23b96a['XMD-AMDSILENCETHRESHOLD']=_0x5714d4[_0xd5c5('0x17b')]||0x100;_0x23b96a[_0xd5c5('0x17c')]=_0x5714d4['dialAMDMaximumWordLength']||0x1388;}if(utils['isOutboundQueue'](_0x5714d4)){_0x23b96a['XMD-VOICEQUEUEID']=_0x2520bf[_0xd5c5('0xe3')];}else{_0x23b96a[_0xd5c5('0x17d')]=_0x2520bf[_0xd5c5('0xe4')];}var _0x31627c=utils[_0xd5c5('0x17e')](_0x2520bf[_0xd5c5('0x17f')]);Object['assign'](_0x23b96a,_0x31627c);var _0x28b6ef=_0x4cb102['isTrunkReachable'](_0x5714d4['Trunk'])?utils[_0xd5c5('0x180')](_0x5714d4['Trunk'][_0xd5c5('0x181')],_0x5714d4[_0xd5c5('0x182')],_0x5714d4[_0xd5c5('0x183')]>0x0?utils['getCallerIdRandom'](_0x5714d4[_0xd5c5('0x184')],_0x5714d4['dialRandomLastDigitCallerIdNumber']):_0x5714d4[_0xd5c5('0x184')]):utils[_0xd5c5('0x180')](_[_0xd5c5('0xfa')](_0x5714d4[_0xd5c5('0x8d')])?_0x5714d4['Trunk']['callerid']:_0x5714d4[_0xd5c5('0x8d')][_0xd5c5('0x181')],_0x5714d4[_0xd5c5('0x182')],_0x5714d4[_0xd5c5('0x183')]>0x0?utils[_0xd5c5('0x185')](_0x5714d4['dialOriginateCallerIdNumber'],_0x5714d4['dialRandomLastDigitCallerIdNumber']):_0x5714d4[_0xd5c5('0x184')]);if(_0x28b6ef){_0x23b96a[_0xd5c5('0x186')]=_0x4cb102[_0xd5c5('0xf2')][_0x5c7fcf][_0xd5c5('0x187')]=utils[_0xd5c5('0x188')](_0x28b6ef);_0x23b96a[_0xd5c5('0x189')]=_0x2520bf['phone'];}_0x5714d4[_0xd5c5('0x18a')]=_0x23b96a;return ami[_0xd5c5('0x9c')]({'actionid':_0x5c7fcf,'action':_0xd5c5('0x168'),'channel':_0x4cb102[_0xd5c5('0x8c')](_0x5714d4['Trunk'])?util[_0xd5c5('0x45')]('SIP/%s/%s%s',_0x5714d4[_0xd5c5('0x8b')][_0xd5c5('0x63')],isNotNull(_0x5714d4[_0xd5c5('0x18b')])?_0x5714d4[_0xd5c5('0x18b')]['trim']()||'':'',_0x5714d4['dialCutDigit']>0x0?_0x2520bf[_0xd5c5('0x16a')][_0xd5c5('0x18c')](_0x5714d4['dialCutDigit']):_0x2520bf[_0xd5c5('0x16a')]):util[_0xd5c5('0x45')]('SIP/%s/%s%s',_[_0xd5c5('0xfa')](_0x5714d4['TrunkBackup'])?_0x5714d4[_0xd5c5('0x8b')][_0xd5c5('0x63')]:_0x5714d4[_0xd5c5('0x8d')][_0xd5c5('0x63')],isNotNull(_0x5714d4[_0xd5c5('0x18b')])?_0x5714d4[_0xd5c5('0x18b')]['trim']()||'':'',_0x5714d4[_0xd5c5('0x18d')]>0x0?_0x2520bf[_0xd5c5('0x16a')]['substring'](_0x5714d4['dialCutDigit']):_0x2520bf[_0xd5c5('0x16a')]),'callerid':_0x28b6ef,'Exten':_0xd5c5('0x117'),'Context':_0xd5c5('0x18e'),'Priority':'1','variable':_0x23b96a,'timeout':(_0x5714d4[_0xd5c5('0x18f')]||0x1e)*0x3e8,'async':!![],'channelid':_0x5c7fcf})[_0xd5c5('0x3d')](function(_0x5d478d){return _0x478e94(_0x5d478d);})['catch'](function(_0x59e25a){_0x5714d4[_0xd5c5('0x190')]+=0x1;var _0x32d6f4=new History(_0x4cb102[_0xd5c5('0xf2')][_0x5c7fcf]);logger[_0xd5c5('0x66')](util[_0xd5c5('0x45')]('[originateError]:\x20%s',JSON[_0xd5c5('0x76')](_0x59e25a)));_0x32d6f4[_0xd5c5('0x71')]=0xe;_0x32d6f4['statedesc']='OriginateError';_0x32d6f4['starttime']=moment()[_0xd5c5('0x45')](_0xd5c5('0xc9'));_0x32d6f4[_0xd5c5('0xe6')]=_0x32d6f4['starttime'];hopperUtils[_0xd5c5('0xca')](_0x32d6f4)[_0xd5c5('0xa2')](loggerCatch(_0xd5c5('0x191')));_0x4cb102[_0xd5c5('0xcc')](_0x32d6f4)[_0xd5c5('0xa2')](loggerCatch('[originate][error]'))[_0xd5c5('0x1b')](function(){delete _0x4cb102[_0xd5c5('0xf2')][_0x5c7fcf];return _0x314a38(msgResponse(_0xd5c5('0x168'),_0xd5c5('0x85'),_0xd5c5('0x192')));});});});};Dialer[_0xd5c5('0x18')][_0xd5c5('0x193')]=function(_0x37d8f9,_0x1b98a6,_0xdc468a){var _0x1626e9=new History(_0x1b98a6);if(_0x1626e9[_0xd5c5('0x128')]+_0x1626e9[_0xd5c5('0x129')]+_0x1626e9[_0xd5c5('0x12a')]+_0x1626e9[_0xd5c5('0x12b')]+_0x1626e9['countdropretry']+_0x1626e9[_0xd5c5('0xef')]+_0x1626e9['countmachineretry']+_0x1626e9['countagentrejectretry']>=_0xdc468a[_0xd5c5('0x12c')]-0x1){return!![];}switch(_0x37d8f9){case 0x3:if(_0x1626e9[_0xd5c5('0x12a')]>=_0xdc468a[_0xd5c5('0x194')]-0x1){return!![];}hopperUtils['rescheduleContact']({'active':![],'countnoanswerretry':_0x1626e9[_0xd5c5('0x12a')]+=0x1,'scheduledat':moment()[_0xd5c5('0xdf')](_0xdc468a[_0xd5c5('0x195')],'minutes')[_0xd5c5('0x45')]('YYYY-MM-DD\x20HH:mm:ss'),'ContactId':_0x1626e9[_0xd5c5('0xe1')],'ListId':_0x1626e9[_0xd5c5('0xe2')],'VoiceQueueId':_0x1626e9['VoiceQueueId']||undefined,'CampaignId':_0x1626e9['CampaignId']||undefined})['catch'](loggerCatch('[rescheduleContact][NoAnswer]'));break;case 0x5:if(_0x1626e9['countbusyretry']>=_0xdc468a[_0xd5c5('0x196')]-0x1){return!![];}hopperUtils[_0xd5c5('0xde')]({'active':![],'countbusyretry':_0x1626e9[_0xd5c5('0x128')]+=0x1,'scheduledat':moment()['add'](_0xdc468a[_0xd5c5('0x197')],'minutes')[_0xd5c5('0x45')]('YYYY-MM-DD\x20HH:mm:ss'),'ContactId':_0x1626e9[_0xd5c5('0xe1')],'ListId':_0x1626e9[_0xd5c5('0xe2')],'VoiceQueueId':_0x1626e9[_0xd5c5('0xe3')]||undefined,'CampaignId':_0x1626e9[_0xd5c5('0xe4')]||undefined})[_0xd5c5('0xa2')](loggerCatch(_0xd5c5('0x198')));break;case 0x8:if(_0x1626e9['countcongestionretry']>=_0xdc468a['dialCongestionMaxRetry']-0x1){return!![];}hopperUtils['rescheduleContact']({'active':![],'countcongestionretry':_0x1626e9[_0xd5c5('0x129')]+=0x1,'scheduledat':moment()[_0xd5c5('0xdf')](_0xdc468a[_0xd5c5('0x199')],_0xd5c5('0xe0'))[_0xd5c5('0x45')]('YYYY-MM-DD\x20HH:mm:ss'),'ContactId':_0x1626e9[_0xd5c5('0xe1')],'ListId':_0x1626e9[_0xd5c5('0xe2')],'VoiceQueueId':_0x1626e9[_0xd5c5('0xe3')]||undefined,'CampaignId':_0x1626e9[_0xd5c5('0xe4')]||undefined})[_0xd5c5('0xa2')](loggerCatch(_0xd5c5('0x19a')));break;case 0x0:if(_0x1626e9[_0xd5c5('0x12b')]>=_0xdc468a['dialNoSuchNumberMaxRetry']-0x1){return!![];}else{hopperUtils['rescheduleContact']({'active':![],'countnosuchnumberretry':_0x1626e9[_0xd5c5('0x12b')]+=0x1,'scheduledat':moment()[_0xd5c5('0xdf')](_0xdc468a[_0xd5c5('0x19b')],_0xd5c5('0xe0'))['format'](_0xd5c5('0xc9')),'ContactId':_0x1626e9[_0xd5c5('0xe1')],'ListId':_0x1626e9[_0xd5c5('0xe2')],'VoiceQueueId':_0x1626e9[_0xd5c5('0xe3')]||undefined,'CampaignId':_0x1626e9[_0xd5c5('0xe4')]||undefined})[_0xd5c5('0xa2')](loggerCatch(_0xd5c5('0x19c')));}break;case 0xa:if(_0x1626e9[_0xd5c5('0xdb')]>=_0xdc468a[_0xd5c5('0xdc')]-0x1){return!![];}hopperUtils[_0xd5c5('0xde')]({'active':![],'countdropretry':_0x1626e9['countdropretry']+=0x1,'scheduledat':moment()[_0xd5c5('0xdf')](_0xdc468a['dialDropRetryFrequency'],_0xd5c5('0xe0'))[_0xd5c5('0x45')](_0xd5c5('0xc9')),'ContactId':_0x1626e9[_0xd5c5('0xe1')],'ListId':_0x1626e9[_0xd5c5('0xe2')],'VoiceQueueId':_0x1626e9[_0xd5c5('0xe3')]||undefined,'CampaignId':_0x1626e9[_0xd5c5('0xe4')]||undefined})[_0xd5c5('0xa2')](loggerCatch(_0xd5c5('0xe5')));break;case 0xb:if(_0x1626e9[_0xd5c5('0xef')]>=_0xdc468a[_0xd5c5('0xf0')]-0x1){return!![];}hopperUtils[_0xd5c5('0xde')]({'active':![],'countabandonedretry':_0x1626e9[_0xd5c5('0xef')]+=0x1,'scheduledat':moment()['add'](_0xdc468a[_0xd5c5('0xed')],_0xd5c5('0xe0'))[_0xd5c5('0x45')](_0xd5c5('0xc9')),'ContactId':_0x1626e9[_0xd5c5('0xe1')],'ListId':_0x1626e9['ListId'],'VoiceQueueId':_0x1626e9[_0xd5c5('0xe3')]||undefined,'CampaignId':_0x1626e9[_0xd5c5('0xe4')]||undefined})[_0xd5c5('0xa2')](loggerCatch('[rescheduleContact][Abandoned]'));break;case 0x13:if(_0x1626e9[_0xd5c5('0x126')]>=_0xdc468a[_0xd5c5('0x12f')]-0x1){return!![];}hopperUtils['rescheduleContact']({'active':![],'countmachineretry':_0x1626e9[_0xd5c5('0x126')]+=0x1,'scheduledat':moment()['add'](_0xdc468a[_0xd5c5('0x132')],_0xd5c5('0xe0'))[_0xd5c5('0x45')](_0xd5c5('0xc9')),'ContactId':_0x1626e9[_0xd5c5('0xe1')],'ListId':_0x1626e9['ListId'],'VoiceQueueId':_0x1626e9['VoiceQueueId']||undefined,'CampaignId':_0x1626e9[_0xd5c5('0xe4')]||undefined})[_0xd5c5('0xa2')](loggerCatch('[rescheduleContact][Machine]'));break;case 0x14:if(_0x1626e9['countagentrejectretry']>=_0xdc468a[_0xd5c5('0x19d')]-0x1){return!![];}hopperUtils['rescheduleContact']({'active':![],'countagentrejectretry':_0x1626e9[_0xd5c5('0x134')]+=0x1,'scheduledat':moment()['add'](_0xdc468a['dialAgentRejectRetryFrequency'],_0xd5c5('0xe0'))[_0xd5c5('0x45')]('YYYY-MM-DD\x20HH:mm:ss'),'ContactId':_0x1626e9[_0xd5c5('0xe1')],'ListId':_0x1626e9[_0xd5c5('0xe2')],'VoiceQueueId':_0x1626e9[_0xd5c5('0xe3')]||undefined,'CampaignId':_0x1626e9[_0xd5c5('0xe4')]||undefined})[_0xd5c5('0xa2')](loggerCatch(_0xd5c5('0x19e')));break;default:return!![];}};Dialer[_0xd5c5('0x18')][_0xd5c5('0x112')]=function(_0x522d3a,_0x25c33a,_0x1fbcef){var _0x183d42=this;var _0x1382d0=new History(_0x522d3a);var _0x373491=![];var _0x39737c;var _0x1ba498;return new Promise(function(_0x3f3653,_0x414d1d){if(_[_0xd5c5('0x3f')](_0x25c33a)&&typeof _0x25c33a!==_0xd5c5('0x167')){return _0x414d1d(msgResponse(_0xd5c5('0x19f'),'Failure',_0xd5c5('0x1a0')));}if(_['isUndefined'](_0x1fbcef)&&typeof _0x1fbcef!==_0xd5c5('0x167')){return _0x414d1d(msgResponse('[callProgressDetecting]',_0xd5c5('0x93'),'evt\x20is\x20undefine'));}hopperUtils[_0xd5c5('0xee')](_0x1382d0,_0x1fbcef[_0xd5c5('0xc4')],_0x25c33a)[_0xd5c5('0x3d')](function(_0x4691cb){if(_0x4691cb[_0xd5c5('0xda')]==0x1)_0x373491=!![];switch(_0x1fbcef[_0xd5c5('0xc4')]){case'0':_0x25c33a[_0xd5c5('0x1a1')]+=0x1;_0x1382d0[_0xd5c5('0x71')]=0x0;_0x1382d0['statedesc']=_0xd5c5('0x1a2');_0x1382d0[_0xd5c5('0x12b')]+=0x1;_0x1382d0[_0xd5c5('0xd6')]+=0x1;ami[_0xd5c5('0x40')](_0xd5c5('0x1a3'),ut[_0xd5c5('0x120')](_0x522d3a,'nosuchnumber'));_0x39737c=_0x25c33a[_0xd5c5('0x19b')];_0x1ba498=_0x25c33a[_0xd5c5('0xd8')];hopperUtils[_0xd5c5('0xca')](_0x1382d0)[_0xd5c5('0xa2')](loggerCatch(_0xd5c5('0x127')));if(_0x183d42[_0xd5c5('0x193')](0x0,_0x522d3a,_0x25c33a)&&!_0x373491){if(_0x1382d0[_0xd5c5('0x12b')]>=_0x25c33a[_0xd5c5('0x1a4')]){_0x183d42[_0xd5c5('0x130')](_0x1382d0,_0x3f3653,_0x414d1d,_0xd5c5('0x1a5'));}else{_0x183d42[_0xd5c5('0x12d')](_0x1382d0,_0x3f3653,_0x414d1d,_0xd5c5('0x1a5'));}}break;case'3':_0x25c33a[_0xd5c5('0x1a6')]+=0x1;_0x1382d0[_0xd5c5('0x71')]=0x3;_0x1382d0[_0xd5c5('0x72')]='NoAnswer';_0x1382d0['countnoanswerretry']+=0x1;_0x1382d0[_0xd5c5('0xd6')]+=0x1;var _0x2b6910=ut['buildNoAnswerEventPayload'](_0x522d3a,_0x25c33a);ami['emit'](_0xd5c5('0x1a7'),_0x2b6910);_0x39737c=_0x25c33a[_0xd5c5('0x195')];_0x1ba498=_0x25c33a[_0xd5c5('0xd8')];hopperUtils[_0xd5c5('0xca')](_0x1382d0)[_0xd5c5('0xa2')](loggerCatch(_0xd5c5('0x1a8')));if(_0x183d42[_0xd5c5('0x193')](0x3,_0x522d3a,_0x25c33a)&&!_0x373491){if(_0x1382d0[_0xd5c5('0x12a')]>=_0x25c33a[_0xd5c5('0x194')]){_0x183d42[_0xd5c5('0x130')](_0x1382d0,_0x3f3653,_0x414d1d,_0xd5c5('0x1a9'));}else{_0x183d42[_0xd5c5('0x12d')](_0x1382d0,_0x3f3653,_0x414d1d,_0xd5c5('0x1a9'));}}break;case'5':_0x25c33a[_0xd5c5('0x1aa')]+=0x1;_0x1382d0[_0xd5c5('0x71')]=0x5;_0x1382d0[_0xd5c5('0x72')]=_0xd5c5('0x1ab');_0x1382d0['countbusyretry']+=0x1;_0x1382d0[_0xd5c5('0xd6')]+=0x1;ami[_0xd5c5('0x40')](_0xd5c5('0x1ac'),ut[_0xd5c5('0x120')](_0x522d3a,_0xd5c5('0x1ad')));_0x39737c=_0x25c33a[_0xd5c5('0x197')];_0x1ba498=_0x25c33a[_0xd5c5('0xd8')];hopperUtils['createHistory'](_0x1382d0)[_0xd5c5('0xa2')](loggerCatch(_0xd5c5('0x1ae')));if(_0x183d42[_0xd5c5('0x193')](0x5,_0x522d3a,_0x25c33a)&&!_0x373491){if(_0x1382d0[_0xd5c5('0x128')]>=_0x25c33a[_0xd5c5('0x196')]){_0x183d42[_0xd5c5('0x130')](_0x1382d0,_0x3f3653,_0x414d1d,_0xd5c5('0x1af'));}else{_0x183d42[_0xd5c5('0x12d')](_0x1382d0,_0x3f3653,_0x414d1d,_0xd5c5('0x1af'));}}break;case'8':_0x25c33a[_0xd5c5('0x1b0')]+=0x1;_0x1382d0[_0xd5c5('0x71')]=0x8;_0x1382d0[_0xd5c5('0x72')]='Congestion';_0x1382d0[_0xd5c5('0x129')]+=0x1;_0x1382d0[_0xd5c5('0xd6')]+=0x1;_0x39737c=_0x25c33a[_0xd5c5('0x199')];_0x1ba498=_0x25c33a['callAdditionalPhoneAfterMin'];ami[_0xd5c5('0x40')]('custom:agentcongestion',ut[_0xd5c5('0x120')](_0x522d3a,_0xd5c5('0x1b1')));hopperUtils[_0xd5c5('0xca')](_0x1382d0)[_0xd5c5('0xa2')](loggerCatch(_0xd5c5('0x1b2')));if(_0x183d42['checkRetriveMax'](0x8,_0x522d3a,_0x25c33a)&&!_0x373491){if(_0x1382d0[_0xd5c5('0x129')]>=_0x25c33a[_0xd5c5('0x1b3')]){_0x183d42[_0xd5c5('0x130')](_0x1382d0,_0x3f3653,_0x414d1d,_0xd5c5('0x1b4'));}else{_0x183d42[_0xd5c5('0x12d')](_0x1382d0,_0x3f3653,_0x414d1d,_0xd5c5('0x1b4'));}}break;case'11':_0x25c33a['outboundAbandonedCallsDay']+=0x1;_0x1382d0[_0xd5c5('0x71')]=0xb;_0x1382d0[_0xd5c5('0x72')]=_0xd5c5('0x1b5');_0x1382d0[_0xd5c5('0xef')]+=0x1;_0x1382d0['countglobal']+=0x1;_0x39737c=_0x25c33a[_0xd5c5('0xed')];_0x1ba498=_0x25c33a['callAdditionalPhoneAfterMin'];hopperUtils[_0xd5c5('0xca')](_0x1382d0)[_0xd5c5('0xa2')](loggerCatch(_0xd5c5('0xf1')));if(_0x183d42[_0xd5c5('0x193')](0xb,_0x522d3a,_0x25c33a)&&!_0x373491){if(_0x1382d0['countabandonedretry']>=_0x25c33a[_0xd5c5('0xf0')]){_0x183d42[_0xd5c5('0x130')](_0x1382d0,_0x3f3653,_0x414d1d,'reason\x2011\x20abandoned');}else{_0x183d42['stateGlobal'](_0x1382d0,_0x3f3653,_0x414d1d,_0xd5c5('0x1b6'));}}break;case'20':_0x25c33a[_0xd5c5('0x1b7')]+=0x1;_0x1382d0[_0xd5c5('0x71')]=0x14;_0x1382d0[_0xd5c5('0x72')]=_0xd5c5('0x1b8');_0x1382d0[_0xd5c5('0x134')]+=0x1;_0x1382d0['countglobal']+=0x1;_0x39737c=_0x25c33a[_0xd5c5('0x1b9')];_0x1ba498=_0x25c33a[_0xd5c5('0xd8')];ami[_0xd5c5('0x40')](_0xd5c5('0x1ba'),ut[_0xd5c5('0x120')](_0x522d3a,_0xd5c5('0x1bb')));hopperUtils[_0xd5c5('0xca')](_0x1382d0)[_0xd5c5('0xa2')](loggerCatch(_0xd5c5('0x1bc')));if(_0x183d42[_0xd5c5('0x193')](0x14,_0x522d3a,_0x25c33a)&&!_0x373491){if(_0x1382d0['countagentrejectretry']>=_0x25c33a[_0xd5c5('0x19d')]){_0x183d42[_0xd5c5('0x130')](_0x1382d0,_0x3f3653,_0x414d1d,_0xd5c5('0x1bd'));}else{_0x183d42[_0xd5c5('0x12d')](_0x1382d0,_0x3f3653,_0x414d1d,_0xd5c5('0x1bd'));}}break;default:_0x25c33a[_0xd5c5('0x13c')]+=0x1;_0x1382d0['state']=0xc;_0x1382d0['statedesc']=_0x1fbcef[_0xd5c5('0xc4')];_0x39737c=_0x25c33a[_0xd5c5('0x1b9')];_0x1ba498=_0x25c33a['callAdditionalPhoneAfterMin'];hopperUtils[_0xd5c5('0xca')](_0x1382d0)[_0xd5c5('0xa2')](loggerCatch('[syncAgentComplete][createHistory][?]'));if(_0x183d42[_0xd5c5('0x193')](_0x1fbcef[_0xd5c5('0xc4')],_0x522d3a,_0x25c33a)&&!_0x373491){if(_0x1382d0[_0xd5c5('0x128')]+_0x1382d0['countcongestionretry']+_0x1382d0[_0xd5c5('0x12a')]+_0x1382d0[_0xd5c5('0x12b')]+_0x1382d0['countdropretry']+_0x1382d0['countabandonedretry']+_0x1382d0[_0xd5c5('0x126')]+_0x1382d0[_0xd5c5('0x134')]>=_0x25c33a[_0xd5c5('0x12c')]){_0x183d42['stateGlobal'](_0x1382d0,_0x3f3653,_0x414d1d,_0x1fbcef[_0xd5c5('0xc4')]);}else{_0x183d42[_0xd5c5('0x130')](_0x1382d0,_0x3f3653,_0x414d1d,_0x1fbcef[_0xd5c5('0xc4')]);}}}})[_0xd5c5('0x3d')](function(){if(_0x373491){hopperUtils[_0xd5c5('0xea')](_0x1382d0,_0x39737c,_0x1ba498)[_0xd5c5('0x3d')](function(){return _0x3f3653(0x1);});}});});};Dialer['prototype'][_0xd5c5('0x12d')]=function(_0x3b9187,_0x26d635,_0x21c662,_0x1de301){var _0x4fea09=new Final(_0x3b9187);_0x4fea09['state']=0xf;_0x4fea09[_0xd5c5('0x72')]=_0xd5c5('0x1be');this[_0xd5c5('0x130')](_0x4fea09,_0x26d635,_0x21c662,_0x1de301);};Dialer[_0xd5c5('0x18')][_0xd5c5('0x130')]=function(_0x2d81d8,_0x48e847,_0x5aff03,_0x58ced3){hopperUtils[_0xd5c5('0xcc')](_0x2d81d8)['then'](function(){return _0x48e847(msgResponse('[callProgressDetecting]',_0xd5c5('0x111'),_0x58ced3));})[_0xd5c5('0xa2')](function(){return _0x5aff03(msgResponse(_0xd5c5('0x1bf'),_0xd5c5('0x93'),_0xd5c5('0x1c0')));});};Dialer[_0xd5c5('0x18')][_0xd5c5('0x9')]=function(_0x20fd46){var _0x45038b=_0x20fd46[_0xd5c5('0x1c1')]/0x64;var _0x586eea=_0x20fd46[_0xd5c5('0xd1')]/(_0x20fd46[_0xd5c5('0xd1')]+_0x20fd46[_0xd5c5('0xc3')]);var _0x3eff38=Math[_0xd5c5('0x1c2')](_0x20fd46[_0xd5c5('0x1c3')]*(_0x20fd46[_0xd5c5('0x1c4')]/0x64));var _0x597835=Math['round'](_0x20fd46[_0xd5c5('0x1c3')]*(_0x20fd46[_0xd5c5('0x1c5')]/0x64));var _0x2d9848=_0x20fd46[_0xd5c5('0x142')]+_0x20fd46[_0xd5c5('0x144')];var _0x3b5fd1=Math['floor'](_0x20fd46[_0xd5c5('0x5b')]*_0x20fd46['erlangAbandonmentRate']*_0x20fd46[_0xd5c5('0x1c6')]*_0x20fd46[_0xd5c5('0x1c7')]);if(_[_0xd5c5('0x3f')](_0x20fd46[_0xd5c5('0x27')])){if(!_['isUndefined'](_0x20fd46['startPredictive'])){_0x20fd46[_0xd5c5('0x26')]=undefined;loggerPredictive[_0xd5c5('0x66')](_0xd5c5('0x1c8'),_0xd5c5('0x1c9'));}if(!_['isUndefined'](_0x20fd46[_0xd5c5('0x65')])){loggerPredictive[_0xd5c5('0x66')](_0xd5c5('0x1c8'),_0xd5c5('0x1ca'));clearInterval(_0x20fd46[_0xd5c5('0x65')]);_0x20fd46[_0xd5c5('0x65')]=undefined;}_0x20fd46['startProgressive']=moment()[_0xd5c5('0x45')](_0xd5c5('0xc9'));loggerPredictive[_0xd5c5('0x49')](_0x20fd46[_0xd5c5('0x63')],_0xd5c5('0x1cb'),_0x20fd46[_0xd5c5('0x27')]);this[_0xd5c5('0xb6')](_0x20fd46,0x1);}else if(ifInterval(_0x20fd46[_0xd5c5('0x1cc')],_0x20fd46[_0xd5c5('0x27')])){this[_0xd5c5('0xb6')](_0x20fd46,0x1);loggerPredictiveCalls[_0xd5c5('0x49')]('[startMethodPredictive][StartProgressive][Loop]',_0x20fd46['startProgressive'],_0x20fd46[_0xd5c5('0x63')]);_0x20fd46[_0xd5c5('0x5b')]=0x0;_0x20fd46[_0xd5c5('0xd2')]=0x0;}else if(_0x45038b<_0x586eea&&_0x20fd46[_0xd5c5('0x1cd')]==='dropRate'){clearPredictiveAttributes(_0x20fd46);loggerPredictive[_0xd5c5('0x49')](_0xd5c5('0x1ce'),_0xd5c5('0x1cf'),_0x586eea,'startProgressive',_0x20fd46[_0xd5c5('0x63')]);}else if(_0x3b5fd1<_0x20fd46['predictiveIntervalErlangCallsDroppedCalls']&&_0x20fd46[_0xd5c5('0x1cd')]===_0xd5c5('0x1d0')){clearPredictiveAttributes(_0x20fd46);loggerPredictive[_0xd5c5('0x49')](_0xd5c5('0x1d1'),'Max\x20Drop\x20',_0x3b5fd1,'Drop\x20in\x20this\x20interval',_0x20fd46['predictiveIntervalErlangCallsDroppedCalls'],_0xd5c5('0x27'),_0x20fd46[_0xd5c5('0x63')]);}else if(!ifInterval(_0x20fd46[_0xd5c5('0x1cc')],_0x20fd46[_0xd5c5('0x27')])&&_[_0xd5c5('0x3f')](_0x20fd46[_0xd5c5('0x26')])&&!_[_0xd5c5('0x3f')](_0x20fd46[_0xd5c5('0x27')])){_0x20fd46[_0xd5c5('0x26')]=moment()[_0xd5c5('0x45')](_0xd5c5('0xc9'));loggerPredictive[_0xd5c5('0x49')](_0x20fd46[_0xd5c5('0x63')],_0xd5c5('0x1d2'),_0x20fd46['startPredictive']);hopperUtils[_0xd5c5('0x1d3')](_0x20fd46[_0xd5c5('0x1cc')])['then'](this[_0xd5c5('0x1d4')](_0x20fd46))['then'](mergeDataErlangB(_0x20fd46))[_0xd5c5('0x3d')](this[_0xd5c5('0x1d5')](_0x20fd46))[_0xd5c5('0xa2')](loggerCatchPredictive(_0xd5c5('0x1d6'),_0x20fd46));}else if(!ifInterval(_0x20fd46[_0xd5c5('0x1cc')],_0x20fd46[_0xd5c5('0x26')])){_0x20fd46[_0xd5c5('0xd2')]=0x0;_0x20fd46[_0xd5c5('0x26')]=moment()[_0xd5c5('0x45')](_0xd5c5('0xc9'));loggerPredictive['info'](_0x20fd46['name'],'recalculate\x20predictive\x20at',_0x20fd46[_0xd5c5('0x26')]);clearInterval(_0x20fd46['handlePredictive']);_0x20fd46['handlePredictive']=undefined;hopperUtils['avgHandleTime'](_0x20fd46[_0xd5c5('0x1cc')])[_0xd5c5('0x3d')](this[_0xd5c5('0x1d4')](_0x20fd46))['then'](mergeDataErlangB(_0x20fd46))['then'](this[_0xd5c5('0x1d5')](_0x20fd46))[_0xd5c5('0xa2')](loggerCatchPredictive(_0xd5c5('0x1d7'),_0x20fd46));}else if(_0x20fd46[_0xd5c5('0x1c3')]&&_0x2d9848<_0x20fd46[_0xd5c5('0x1c3')]-_0x597835){clearPredictiveAttributes(_0x20fd46);loggerPredictive[_0xd5c5('0x49')](_0x20fd46[_0xd5c5('0x63')],_0xd5c5('0x1d8'),_0x2d9848,_0xd5c5('0x1d9'),_0x20fd46[_0xd5c5('0x1c3')],'-',_0x597835,'=',_0x20fd46[_0xd5c5('0x1c3')]-_0x597835,')');}else if(_0x20fd46[_0xd5c5('0x1c3')]&&_0x2d9848>_0x20fd46[_0xd5c5('0x1c3')]+_0x3eff38){clearPredictiveAttributes(_0x20fd46);loggerPredictive['info'](_0x20fd46[_0xd5c5('0x63')],_0xd5c5('0x1d8'),_0x2d9848,_0xd5c5('0x1da'),_0x20fd46['predictiveIntervalAvailable'],'+',_0x3eff38,'=',_0x20fd46[_0xd5c5('0x1c3')]+_0x3eff38,')');}};Dialer[_0xd5c5('0x18')][_0xd5c5('0x1d4')]=function(_0x51a5e6){var _0x59b651=this;return function(_0x44b000){return new Promise(function(_0x43d37b,_0x12f33b){_['merge'](_0x51a5e6,_0x44b000[0x0]);if(checkGetDataPredictive(_0x44b000[0x0])){var _0x4e7abd=_0x51a5e6[_0xd5c5('0x1c3')]=_0x51a5e6['talking']+_0x51a5e6['available'];var _0x3d0948=_0x51a5e6['dialPredictiveInterval']*0x3c;var _0x4bb2c2=_0x44b000[0x0]['predictiveIntervalAvgTalktime']+_0x44b000[0x0][_0xd5c5('0x55')];var _0x320678=(_0x44b000[0x0][_0xd5c5('0x1db')]+_0x44b000[0x0][_0xd5c5('0x4f')]+_0x44b000[0x0][_0xd5c5('0x50')])/_0x44b000[0x0][_0xd5c5('0x4c')];_0x51a5e6[_0xd5c5('0x1c6')]=_0x320678>0x0?_0x320678:0x1;switch(_0x51a5e6['dialPredictiveOptimization']){case _0xd5c5('0x1d0'):var _0x5e25c6=_0x51a5e6[_0xd5c5('0x1c1')]/0x64;return _0x59b651[_0xd5c5('0x1dc')](_0x4e7abd,_0x3d0948,_0x4bb2c2,_0x320678,_0x5e25c6)[_0xd5c5('0x3d')](function(_0x1f366c){return _0x43d37b(_0x1f366c);});case'agentBusyFactor':var _0x30a77b=_0x51a5e6[_0xd5c5('0x1c1')]/0x64;return _0x59b651[_0xd5c5('0x1dd')](_0x4e7abd,_0x3d0948,_0x4bb2c2,_0x320678,_0x30a77b)['then'](function(_0x417dbd){return _0x43d37b(_0x417dbd);});default:return _0x12f33b(msgResponse(_0xd5c5('0x1de'),_0xd5c5('0x93'),_0xd5c5('0x1df')));}}else{return _0x12f33b(msgResponse(_0xd5c5('0x1de'),_0xd5c5('0x93'),_0xd5c5('0x1e0')));}});};};Dialer['prototype'][_0xd5c5('0x1e1')]=function(_0x1ec720){var _0x1fa3ff=this;return function(_0x39130a){return new Promise(function(_0x139961,_0x584daa){_[_0xd5c5('0x61')](_0x1ec720,_0x39130a[0x0]);if(checkGetDataPredictive(_0x39130a[0x0])){loggerPredictive[_0xd5c5('0x49')](JSON[_0xd5c5('0x76')](_0x39130a[0x0]));if(_0x1ec720[_0xd5c5('0x1cd')]===_0xd5c5('0x1d0')){return _0x1fa3ff[_0xd5c5('0x15a')](_0x1ec720['id'])[_0xd5c5('0x3d')](function(_0x4914bf){var _0x5ddaea=_0x1ec720[_0xd5c5('0x1e2')]-_0x4914bf[0x0][_0xd5c5('0x1e3')];var _0xe88626=_0x1ec720[_0xd5c5('0x1cc')]*0x3c;var _0x447787=_0x39130a[0x0]['predictiveIntervalAvgTalktime']+_0x39130a[0x0]['predictiveIntervalAvgHoldtime'];var _0x150771=(_0x39130a[0x0][_0xd5c5('0x1db')]+_0x39130a[0x0][_0xd5c5('0x4f')]+_0x39130a[0x0]['predictiveIntervalDroppedCallsCallersExit'])/_0x39130a[0x0][_0xd5c5('0x4c')];var _0x57bc98=_0x1ec720[_0xd5c5('0x1c1')]/0x64;_0x1ec720['predictiveIntervalPauses']=_0x4914bf[0x0][_0xd5c5('0x1e3')]||0x0;_0x1ec720[_0xd5c5('0x1c6')]=_0x150771>0x0?_0x150771:0x1;return _0x1fa3ff[_0xd5c5('0x1dc')](_0x5ddaea,_0xe88626,_0x447787,_0x150771,_0x57bc98);})['then'](function(_0x303b45){return _0x139961(_0x303b45);})[_0xd5c5('0xa2')](function(_0x227bf8){return _0x584daa(msgResponse('[CatchErlangB]',_0xd5c5('0x93'),JSON['stringify'](_0x227bf8)));});}if(_0x1ec720['dialPredictiveOptimization']===_0xd5c5('0x1e4')){return _0x1fa3ff[_0xd5c5('0x15a')](_0x1ec720['id'])['then'](function(_0x1be39d){var _0x5876b5=_0x1ec720[_0xd5c5('0x1e2')]-_0x1be39d[0x0][_0xd5c5('0x1e3')];var _0x44ccd6=_0x1ec720[_0xd5c5('0x1cc')]*0x3c;var _0x225fd0=_0x39130a[0x0][_0xd5c5('0x53')]+_0x39130a[0x0][_0xd5c5('0x55')];var _0x158faa=(_0x39130a[0x0][_0xd5c5('0x1db')]+_0x39130a[0x0][_0xd5c5('0x4f')]+_0x39130a[0x0][_0xd5c5('0x50')])/_0x39130a[0x0][_0xd5c5('0x4c')];var _0x42579a=_0x1ec720[_0xd5c5('0x1c1')]/0x64;_0x1ec720[_0xd5c5('0x1e5')]=_0x1be39d[0x0]['outboundQueuePauses']||0x0;_0x1ec720[_0xd5c5('0x1c6')]=_0x158faa>0x0?_0x158faa:0x1;return _0x1fa3ff['busyFactor'](_0x5876b5,_0x44ccd6,_0x225fd0,_0x158faa,_0x42579a);})[_0xd5c5('0x3d')](function(_0x47da0c){return _0x139961(_0x47da0c);})['catch'](function(_0x2b1965){return _0x584daa(msgResponse(_0xd5c5('0x1e6'),_0xd5c5('0x93'),JSON[_0xd5c5('0x76')](_0x2b1965)));});}}else{return _0x584daa(msgResponse(_0xd5c5('0x1de'),_0xd5c5('0x93'),_0xd5c5('0x1e0')));}});};};Dialer[_0xd5c5('0x18')][_0xd5c5('0x1d5')]=function(_0x5b691d){var _0xe3e8e7=this;return function(){var _0x1cb06c=0x0;var _0x472cd8=Math['floor'](_0x5b691d[_0xd5c5('0x5c')]*0x3e8);if(_0x472cd8>0x0){_0x472cd8=_0x472cd8<0x64?0x64:_0x472cd8;loggerPredictive[_0xd5c5('0x49')](_0x5b691d[_0xd5c5('0x63')],_0xd5c5('0x1e7'),_0x472cd8,_0xd5c5('0x1e8'));_0x5b691d[_0xd5c5('0x65')]=setInterval(function(){_0xe3e8e7[_0xd5c5('0x65')](_0x5b691d);loggerPredictiveCalls[_0xd5c5('0x49')]('[handlePredictive]',_0x1cb06c+=0x1);},_0x472cd8);}else{loggerPredictive[_0xd5c5('0x49')](_0x5b691d['name'],_0xd5c5('0x1e9'));}};};Dialer['prototype']['checkContactBlack']=function(_0x47d4c2,_0x28e5e5){var _0x12e987=this;return function(_0x3c5175){if(_[_0xd5c5('0x48')](_0x3c5175)){if(_[_0xd5c5('0xfa')](_0x28e5e5[_0xd5c5('0x160')])||!_0x28e5e5[_0xd5c5('0x1ea')]){if(_0x47d4c2[_0xd5c5('0xb4')]==='booked'){_0x47d4c2[_0xd5c5('0x74')]=_['isUndefined'](_0x47d4c2['queueStatusComplete'])?!![]:_0x47d4c2[_0xd5c5('0x74')];var _0x140a6c=uuid['v4']();_0x12e987[_0xd5c5('0xf2')][_0x140a6c]=new Action(_0x47d4c2,_0x28e5e5,_0x140a6c);loggerBooked[_0xd5c5('0x49')]('[booked][checkContactBlack]',_0x140a6c,_0xd5c5('0x1eb'),JSON[_0xd5c5('0x76')](_0x47d4c2[_0xd5c5('0x74')]),_0xd5c5('0x1ec'),_0x47d4c2[_0xd5c5('0x63')]);if(_0x47d4c2[_0xd5c5('0x74')]){_0x47d4c2[_0xd5c5('0x74')]=![];_0x12e987[_0xd5c5('0xfb')][_0x12e987[_0xd5c5('0xf2')][_0x140a6c][_0xd5c5('0xc0')]]=[];ami['Action']({'actionid':_0x140a6c,'action':_0xd5c5('0x1ed'),'queue':_0x47d4c2['name']})[_0xd5c5('0xa2')](function(){_0x12e987['updateOriginated'](_0x47d4c2);hopperUtils['rescheduleContact']({'active':![],'ContactId':_0x12e987[_0xd5c5('0xf2')][_0x140a6c]['ContactId'],'ListId':_0x12e987[_0xd5c5('0xf2')][_0x140a6c][_0xd5c5('0xe2')],'VoiceQueueId':_0x12e987['actions'][_0x140a6c][_0xd5c5('0xe3')]||undefined,'CampaignId':_0x12e987[_0xd5c5('0xf2')][_0x140a6c]['CampaignId']||undefined})[_0xd5c5('0xa2')](loggerCatch('[unlockOriginate][syncQueueStatusComplete]'));delete _0x12e987[_0xd5c5('0xf2')][_0x140a6c];});}else{loggerBooked[_0xd5c5('0x49')]('[booked][checkContactBlack][else]',JSON[_0xd5c5('0x76')](_0x47d4c2[_0xd5c5('0x74')]),_0xd5c5('0x1ec'),_0x47d4c2[_0xd5c5('0x63')]);_0x12e987[_0xd5c5('0xce')](_0x47d4c2);hopperUtils['rescheduleContact']({'active':![],'ContactId':_0x12e987[_0xd5c5('0xf2')][_0x140a6c][_0xd5c5('0xe1')],'ListId':_0x12e987[_0xd5c5('0xf2')][_0x140a6c][_0xd5c5('0xe2')],'VoiceQueueId':_0x12e987[_0xd5c5('0xf2')][_0x140a6c][_0xd5c5('0xe3')]||undefined,'CampaignId':_0x12e987[_0xd5c5('0xf2')][_0x140a6c][_0xd5c5('0xe4')]||undefined})[_0xd5c5('0xa2')](loggerCatch('[unlockOriginate][syncQueueStatusComplete]'));delete _0x12e987[_0xd5c5('0xf2')][_0x140a6c];}}else{return _0x12e987['actionOriginate'](_0x47d4c2,_0x28e5e5);}}else{if(utils['getSeconds'](undefined,_0x28e5e5['scheduledat'])<_0x47d4c2[_0xd5c5('0x1ee')]*0x3c){if(_0x28e5e5[_0xd5c5('0x151')]&&!_0x28e5e5['Agent'][_0xd5c5('0x1ef')]){_0x12e987[_0xd5c5('0xfe')][_0xd5c5('0xff')](_0x28e5e5['id'])[_0xd5c5('0x1b')](function(){_0x12e987[_0xd5c5('0xce')](_0x47d4c2);});}else{hopperUtils[_0xd5c5('0x1f0')]({'active':![]},_0x28e5e5['id'],0x1)['finally'](function(){_0x12e987['updateOriginated'](_0x47d4c2);});}}else{_0x47d4c2['outboundReCallsDay']+=0x1;_0x12e987[_0xd5c5('0xce')](_0x47d4c2);if(_0x47d4c2[_0xd5c5('0x1f1')]){hopperUtils[_0xd5c5('0xde')]({'active':![],'recallme':![],'UserId':null,'ContactId':_0x28e5e5['ContactId'],'ListId':_0x28e5e5[_0xd5c5('0xe2')],'VoiceQueueId':_0x28e5e5[_0xd5c5('0xe3')]||undefined,'CampaignId':_0x28e5e5[_0xd5c5('0xe4')]||undefined})[_0xd5c5('0xa2')](loggerCatch(_0xd5c5('0x1f2')));hopperUtils[_0xd5c5('0xca')](createObjHistory(_0x47d4c2,_0x28e5e5,utils['CAMPAIGN_STATUS'][_0xd5c5('0x1f3')],0x17,_0xd5c5('0x1f4')))['catch'](loggerCatch(_0xd5c5('0x1f5')));}else{_0x12e987[_0xd5c5('0x122')](createObjHistory(_0x47d4c2,_0x28e5e5,utils[_0xd5c5('0x6c')][_0xd5c5('0x1f6')],0x16,_0xd5c5('0x1f7')),'[Originate][HistoryRecallClose][historyCatch]','[Originate][HistoryRecallClose]');}}}}else{_0x47d4c2[_0xd5c5('0x1f8')]+=0x1;_0x12e987[_0xd5c5('0x122')](createObjHistory(_0x47d4c2,_0x28e5e5,utils[_0xd5c5('0x6c')][_0xd5c5('0x1f9')],0xd,_0xd5c5('0x1fa')),'[Originate][historyBlacklist]',_0xd5c5('0x1fb'));throw _0xd5c5('0x1fc');}};};Dialer[_0xd5c5('0x18')][_0xd5c5('0x165')]=function(_0xcbab89){var _0x61f89=this;var _0x1b485d=_0xcbab89[_0xd5c5('0x1fd')]-_0xcbab89['originated'];emitCampaignSummary(_0xcbab89);if(_0x1b485d>0x0&&_0xcbab89[_0xd5c5('0x1fe')]==0x0){if(_0x1b485d>this[_0xd5c5('0x21')]){_0x1b485d=this['maxNumberOriginate'];}_0xcbab89[_0xd5c5('0x1fe')]=0x1;hopperUtils[_0xd5c5('0x1ff')](_0xcbab89,_0x1b485d)['then'](function(_0x55493e){_0xcbab89[_0xd5c5('0x1fe')]=0x0;if(_0x55493e){if(!utils[_0xd5c5('0x200')](_0x55493e)){_0xcbab89['message']=utils['CAMPAIGN_STATUS'][_0xd5c5('0x70')];logger['info']('[getContactCampaign2][Empty]'+_0xcbab89[_0xd5c5('0x63')]);}else{_0xcbab89[_0xd5c5('0x81')]+=_0x55493e[_0xd5c5('0x103')];_0xcbab89[_0xd5c5('0x6b')]=utils['CAMPAIGN_STATUS'][_0xd5c5('0x201')];for(var _0x4a7cbe=0x0;_0x4a7cbe<_0x55493e[_0xd5c5('0x103')];_0x4a7cbe+=0x1){_0xcbab89['ivrTotalCallsDays']+=0x1;if(_[_0xd5c5('0xfa')](_0x55493e[_0x4a7cbe])||_[_0xd5c5('0xfa')](_0x55493e[_0x4a7cbe][_0xd5c5('0x17f')])||_['isNil'](_0x55493e[_0x4a7cbe]['phone'])){_0x61f89['emptyContact'](_0xd5c5('0x202'),_0xcbab89,_0x55493e[_0x4a7cbe]);}else{hopperUtils[_0xd5c5('0x203')](_['pick'](_0x55493e[_0x4a7cbe],[_0xd5c5('0xe4'),_0xd5c5('0x16a')]))[_0xd5c5('0x3d')](_0x61f89[_0xd5c5('0x204')](_0xcbab89,_0x55493e[_0x4a7cbe]))[_0xd5c5('0xa2')](_0x61f89[_0xd5c5('0x205')](_0xd5c5('0x206'),_0xcbab89));}}}}})[_0xd5c5('0xa2')](loggerGetContactDialer(_0xd5c5('0x207'),_0xcbab89,_0x1b485d));}};Dialer[_0xd5c5('0x18')]['handlePower']=function(_0x313d82,_0x4fdd80){var _0xef3587=this;var _0x408aef=[];if(_0x4fdd80<0x1||_0x313d82[_0xd5c5('0xb4')]==='booked'){_0x4fdd80=0x1;}var _0x3b5d84=Math[_0xd5c5('0x208')](_0x313d82[_0xd5c5('0x142')]*_0x4fdd80)-_0x313d82[_0xd5c5('0x81')];if(_0x313d82[_0xd5c5('0x209')]>0x0){var _0x494d2d=_0x313d82['dialLimitQueue']-_0x313d82[_0xd5c5('0x81')]-_0x313d82[_0xd5c5('0x144')]-_0x313d82[_0xd5c5('0x145')];if(_0x3b5d84>_0x494d2d){_0x3b5d84=_0x494d2d;}}if(_0x3b5d84>0x0&&_0x313d82[_0xd5c5('0x1fe')]==0x0){if(_0x313d82[_0xd5c5('0xb4')]===_0xd5c5('0x8')){_0x3b5d84=0x1;}if(_0x3b5d84>this[_0xd5c5('0x21')]){_0x3b5d84=this[_0xd5c5('0x21')];}for(var _0x142b47 in this[_0xd5c5('0x1f')]){if(typeof this[_0xd5c5('0x1f')][_0x142b47]!=='undefined'){if(this['agents'][_0x142b47][_0xd5c5('0x71')]===_0xd5c5('0x20a')&&this['agents'][_0x142b47]['status']==='reachable'){_0x408aef[_0xd5c5('0x9b')](this[_0xd5c5('0x1f')][_0x142b47]['id']);}}}_0x313d82[_0xd5c5('0x1fe')]=0x1;hopperUtils[_0xd5c5('0x20b')](_0x313d82,_0x408aef,_0x3b5d84)[_0xd5c5('0x3d')](function(_0x1d3909){_0x313d82[_0xd5c5('0x1fe')]=0x0;if(_0x1d3909){if(!utils['checkContactEmpty'](_0x1d3909)){hopperUtils[_0xd5c5('0x20c')](_0x313d82)['then'](sendMessageReschedule(_0x313d82))['catch'](loggerCatch(_0xd5c5('0x20d')));}else{_0x313d82[_0xd5c5('0x81')]+=_0x1d3909[_0xd5c5('0x103')];_0x313d82[_0xd5c5('0x6b')]=_0x313d82[_0xd5c5('0xb4')]===_0xd5c5('0x8')?utils['CAMPAIGN_STATUS'][_0xd5c5('0x146')]:utils[_0xd5c5('0x6c')]['RUNNING'];for(var _0x136b20=0x0;_0x136b20<_0x1d3909['length'];_0x136b20+=0x1){if(_[_0xd5c5('0xfa')](_0x1d3909[_0x136b20])||_[_0xd5c5('0xfa')](_0x1d3909[_0x136b20][_0xd5c5('0x17f')])||_[_0xd5c5('0xfa')](_0x1d3909[_0x136b20][_0xd5c5('0x16a')])){_0xef3587['emptyContact'](_0xd5c5('0x202'),_0x313d82,_0x1d3909[_0x136b20]);}else{hopperUtils['checkIsBlackList'](_[_0xd5c5('0x77')](_0x1d3909[_0x136b20],[_0xd5c5('0xe3'),_0xd5c5('0x16a')]))[_0xd5c5('0x3d')](_0xef3587[_0xd5c5('0x204')](_0x313d82,_0x1d3909[_0x136b20]))['catch'](_0xef3587[_0xd5c5('0x205')](_0xd5c5('0x202'),_0x313d82));}}}}})['catch'](loggerGetContactDialer(_0xd5c5('0x20e'),_0x313d82,_0x3b5d84));}};Dialer[_0xd5c5('0x18')][_0xd5c5('0x65')]=function(_0x2c439f){if(_0x2c439f[_0xd5c5('0x209')]>0x0){var _0x44ef72=_0x2c439f[_0xd5c5('0x209')]-_0x2c439f['originated']-_0x2c439f[_0xd5c5('0x144')];if(_0x44ef72>0x0&&_0x2c439f[_0xd5c5('0x1fe')]==0x0){this['tryOriginatePredictive'](_0x2c439f);}else{loggerPredictiveCalls['info'](_0xd5c5('0x20f'));}}else{this[_0xd5c5('0x210')](_0x2c439f);}};Dialer[_0xd5c5('0x18')][_0xd5c5('0x210')]=function(_0x3f514e){var _0x2088ad=this;var _0x5e5fac=[];_0x3f514e['originated']+=0x1;for(var _0xedd75e in this[_0xd5c5('0x1f')]){if(typeof this[_0xd5c5('0x1f')][_0xedd75e]!=='undefined'){if(this[_0xd5c5('0x1f')][_0xedd75e][_0xd5c5('0x71')]===_0xd5c5('0x20a')&&this[_0xd5c5('0x1f')][_0xedd75e]['status']===_0xd5c5('0x88')){_0x5e5fac[_0xd5c5('0x9b')](this[_0xd5c5('0x1f')][_0xedd75e]['id']);}}}_0x3f514e['temp']=0x1;return this['getContactDialer'](_0x3f514e['id'],_0x5e5fac,0x1,_0x3f514e[_0xd5c5('0x211')],_0x3f514e)[_0xd5c5('0x3d')](function(_0x3f34cd){_0x3f514e['temp']=0x1;if(_0x3f34cd){if(!utils[_0xd5c5('0x200')](_0x3f34cd)){utils[_0xd5c5('0x69')](_0x3f514e,0x1,0x0);return hopperUtils[_0xd5c5('0x20c')](_0x3f514e)[_0xd5c5('0x3d')](sendMessageReschedule(_0x3f514e))[_0xd5c5('0xa2')](loggerCatch(_0xd5c5('0x20d')));}else{_0x3f514e[_0xd5c5('0x6b')]=utils[_0xd5c5('0x6c')][_0xd5c5('0x201')];if(_[_0xd5c5('0xfa')](_0x3f34cd[0x0])||_['isNil'](_0x3f34cd[0x0][_0xd5c5('0x17f')])||_['isNil'](_0x3f34cd[0x0][_0xd5c5('0x16a')])){_0x2088ad[_0xd5c5('0x15f')]('[actionOriginate]\x20',_0x3f514e,_0x3f34cd[0x0]);}else{return hopperUtils[_0xd5c5('0x212')](_[_0xd5c5('0x77')](_0x3f34cd[0x0],[_0xd5c5('0xe3'),_0xd5c5('0x16a')]))[_0xd5c5('0x3d')](_0x2088ad[_0xd5c5('0x204')](_0x3f514e,_0x3f34cd[0x0]))['catch'](_0x2088ad['loggerHandler']('[actionOriginatePredictive]\x20',_0x3f514e));}}}})[_0xd5c5('0xa2')](loggerGetContactDialer(_0xd5c5('0x213'),_0x3f514e,0x1));};Dialer[_0xd5c5('0x18')][_0xd5c5('0x1dc')]=function(_0x180c1f,_0x27e18f,_0x54cbc7,_0x558b7c,_0x4c7d3a,_0x559951){loggerPredictive[_0xd5c5('0x49')](_0xd5c5('0x214'));loggerPredictive['info']('M:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20',_0x180c1f);loggerPredictive['info'](_0xd5c5('0x215'),_0x27e18f);loggerPredictive['info'](_0xd5c5('0x216'),_0x54cbc7);loggerPredictive[_0xd5c5('0x49')](_0xd5c5('0x217'),_0x558b7c);loggerPredictive[_0xd5c5('0x49')]('Amax:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20',_0x4c7d3a);loggerPredictive['info'](_0xd5c5('0x54'));return new Promise(function(_0x42872c,_0xba0e91){if(_0x180c1f<=0x0||isNaN(_0x180c1f)){return _0xba0e91(msgResponse(_0xd5c5('0x218'),'Error','m\x20=\x20'+_0x180c1f));}if(_0x54cbc7<=0x0||isNaN(_0x54cbc7)){return _0xba0e91(msgResponse(_0xd5c5('0x218'),_0xd5c5('0x85'),_0xd5c5('0x219')+_0x54cbc7));}if(_0x558b7c<=0x0||isNaN(_0x558b7c)){return _0xba0e91(msgResponse(_0xd5c5('0x218'),_0xd5c5('0x85'),_0xd5c5('0x21a')+_0x558b7c));}if(_0x27e18f<=0x0||isNaN(_0x27e18f)){return _0xba0e91(msgResponse(_0xd5c5('0x218'),_0xd5c5('0x85'),_0xd5c5('0x21b')+_0x27e18f));}if(_0x4c7d3a<=0x0||isNaN(_0x4c7d3a)){return _0xba0e91(msgResponse('[abandonmentRate]','Error','Amax\x20=\x20'+_0x4c7d3a));}_0x559951=_0x559951||0x0;var _0x13f1fe=0x1/_0x54cbc7;var _0x4c4b75=0x0;var _0x40a343=0x0;var _0x57a701=0x0;var _0x576cb9=0x0;for(var _0x2d325d=0x0;_0x57a701<_0x4c7d3a;_0x2d325d+=0x1){_0x40a343=_0x2d325d/_0x27e18f;_0x4c4b75=(_0x558b7c*_0x40a343+_0x559951)/_0x13f1fe;_0x57a701=utils['erlangb'](_0x4c4b75,_0x180c1f);_0x576cb9=_0x4c4b75/_0x180c1f*(0x1-utils[_0xd5c5('0x21c')](_0x4c4b75,_0x180c1f));}return _0x42872c({'erlangCalls':_0x2d325d,'erlangCallToSecond':_0x27e18f/_0x2d325d,'erlangAbandonmentRate':_0x57a701,'erlangBusyFactor':_0x576cb9});});};Dialer[_0xd5c5('0x18')]['busyFactor']=function(_0x12f534,_0x158517,_0xf7d749,_0x29397d,_0x204431,_0x34fb83){loggerPredictive[_0xd5c5('0x49')](_0xd5c5('0x21d'));loggerPredictive[_0xd5c5('0x49')]('M:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20',_0x12f534);loggerPredictive['info'](_0xd5c5('0x215'),_0x158517);loggerPredictive['info']('Ts:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20',_0xf7d749);loggerPredictive[_0xd5c5('0x49')](_0xd5c5('0x217'),_0x29397d);loggerPredictive[_0xd5c5('0x49')]('Umin:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20',_0x204431);loggerPredictive[_0xd5c5('0x49')](_0xd5c5('0x54'));return new Promise(function(_0x5afd9b,_0x4556d1){if(_0x12f534<=0x0||isNaN(_0x12f534)){return _0x4556d1(msgResponse(_0xd5c5('0x21e'),_0xd5c5('0x85'),_0xd5c5('0x21f')+_0x12f534));}if(_0xf7d749<=0x0||isNaN(_0xf7d749)){return _0x4556d1(msgResponse('[busyFactor]',_0xd5c5('0x85'),'Ts\x20=\x20'+_0xf7d749));}if(_0x29397d<=0x0||isNaN(_0x29397d)){return _0x4556d1(msgResponse(_0xd5c5('0x21e'),_0xd5c5('0x85'),_0xd5c5('0x21a')+_0x29397d));}if(_0x158517<=0x0||isNaN(_0x158517)){return _0x4556d1(msgResponse(_0xd5c5('0x21e'),_0xd5c5('0x85'),_0xd5c5('0x21b')+_0x158517));}if(_0x204431<=0x0||isNaN(_0x204431)){return _0x4556d1(msgResponse(_0xd5c5('0x21e'),_0xd5c5('0x85'),_0xd5c5('0x220')+_0x204431));}_0x34fb83=_0x34fb83||0x0;var _0x3a7218=0x1/_0xf7d749;var _0x4d0203=0x0;var _0x3e71b4=0x0;var _0x1ec7b8=0x0;var _0x416bb4=0x0;for(var _0x229e84=0x0;_0x416bb4<_0x204431;_0x229e84+=0x1){_0x3e71b4=_0x229e84/_0x158517;_0x4d0203=(_0x29397d*_0x3e71b4+_0x34fb83)/_0x3a7218;_0x1ec7b8=utils['erlangb'](_0x4d0203,_0x12f534);_0x416bb4=_0x4d0203/_0x12f534*(0x1-utils[_0xd5c5('0x21c')](_0x4d0203,_0x12f534));}return _0x5afd9b({'erlangCalls':_0x229e84,'erlangCallToSecond':_0x158517/_0x229e84,'erlangAbandonmentRate':_0x1ec7b8,'erlangBusyFactor':_0x416bb4});});};module[_0xd5c5('0x221')]=Dialer; \ No newline at end of file diff --git a/server/services/ami/dialer/models/action.js b/server/services/ami/dialer/models/action.js index 084cc70..22d93b5 100644 --- a/server/services/ami/dialer/models/action.js +++ b/server/services/ami/dialer/models/action.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x5c50=['callbackat','recallme','originatecalleridnum','prototype','\x22%s\x22\x20<%s>','dialCutDigit','number','substring','getQueue','queue','exports','util','lodash','moment','isNil','voiceQueue','uniqueid','name','Contact','phone','firstName','type','dialQueueTimeout','scheduledat','countbusyretry','countcongestionretry','countnoanswerretry','countnosuchnumberretry','countdropretry','countabandonedretry','countagentrejectretry','ContactId','ListId','UserId','VoiceQueueId','CampaignId','ContactFirstName','starttime','format','YYYY-MM-DD\x20HH:mm:ss','callback','callbackuniqueid'];(function(_0xb0039d,_0x514b8d){var _0x408420=function(_0x19123a){while(--_0x19123a){_0xb0039d['push'](_0xb0039d['shift']());}};_0x408420(++_0x514b8d);}(_0x5c50,0xdd));var _0x05c5=function(_0x286f2b,_0x171c07){_0x286f2b=_0x286f2b-0x0;var _0x33d6f4=_0x5c50[_0x286f2b];return _0x33d6f4;};'use strict';var util=require(_0x05c5('0x0'));var _=require(_0x05c5('0x1'));var moment=require(_0x05c5('0x2'));function checkNameSurname(_0x1d9662,_0x510a99,_0x30b3b3){var _0x5c243a='';if(!_['isNil'](_0x510a99)&&'string'===typeof _0x510a99){_0x5c243a+=_0x510a99;}if(!_[_0x05c5('0x3')](_0x30b3b3)&&'string'===typeof _0x30b3b3){_0x5c243a+='\x20'+_0x30b3b3;}if(_0x5c243a!==''){return _0x5c243a;}return _0x1d9662;}function Action(_0x44db1a,_0x3f0643,_0x17437f){this[_0x05c5('0x4')]=_0x44db1a;this[_0x05c5('0x5')]=_0x17437f||undefined;this[_0x05c5('0x6')]=checkNameSurname(_0x3f0643[_0x05c5('0x7')][_0x05c5('0x8')],_0x3f0643[_0x05c5('0x7')][_0x05c5('0x9')],_0x3f0643[_0x05c5('0x7')]['lastName']);this['number']=_0x3f0643[_0x05c5('0x8')];this['queue']=_0x44db1a[_0x05c5('0x6')];this['active']=_0x3f0643['active']||![];this['type']=_0x44db1a[_0x05c5('0xa')];this['dialQueueTimeout']=_0x44db1a[_0x05c5('0xb')]||0x3;this[_0x05c5('0xc')]=_0x3f0643['scheduledat'];this[_0x05c5('0xd')]=_0x3f0643['countbusyretry'];this[_0x05c5('0xe')]=_0x3f0643[_0x05c5('0xe')];this[_0x05c5('0xf')]=_0x3f0643[_0x05c5('0xf')];this[_0x05c5('0x10')]=_0x3f0643[_0x05c5('0x10')];this[_0x05c5('0x11')]=_0x3f0643[_0x05c5('0x11')];this['countabandonedretry']=_0x3f0643[_0x05c5('0x12')];this['countmachineretry']=_0x3f0643['countmachineretry'];this[_0x05c5('0x13')]=_0x3f0643[_0x05c5('0x13')];this[_0x05c5('0x14')]=_0x3f0643[_0x05c5('0x14')];this[_0x05c5('0x15')]=_0x3f0643[_0x05c5('0x15')];this[_0x05c5('0x16')]=_0x3f0643[_0x05c5('0x16')];this[_0x05c5('0x17')]=_0x3f0643[_0x05c5('0x17')];this[_0x05c5('0x18')]=_0x3f0643[_0x05c5('0x18')];this['idHopper']=_0x3f0643['id'];this[_0x05c5('0x19')]=_0x3f0643[_0x05c5('0x7')]['firstName']||'';this[_0x05c5('0x1a')]=moment()[_0x05c5('0x1b')](_0x05c5('0x1c'));this[_0x05c5('0x1d')]=_0x3f0643[_0x05c5('0x1d')];this[_0x05c5('0x1e')]=_0x3f0643[_0x05c5('0x1e')];this['callbackat']=_0x3f0643[_0x05c5('0x1f')];this[_0x05c5('0x20')]=_0x3f0643[_0x05c5('0x20')];this[_0x05c5('0x21')]='';this['originatecalleridname']='';}Action[_0x05c5('0x22')]['getCaller']=function(){return util[_0x05c5('0x1b')](_0x05c5('0x23'),this[_0x05c5('0x6')],this[_0x05c5('0x4')][_0x05c5('0x24')]>0x0?this[_0x05c5('0x25')][_0x05c5('0x26')](this[_0x05c5('0x4')][_0x05c5('0x24')]):this[_0x05c5('0x25')]);};Action[_0x05c5('0x22')][_0x05c5('0x27')]=function(){return this[_0x05c5('0x28')];};module[_0x05c5('0x29')]=Action; \ No newline at end of file +var _0xe529=['countabandonedretry','countmachineretry','ContactId','ListId','UserId','VoiceQueueId','CampaignId','idHopper','ContactFirstName','format','YYYY-MM-DD\x20HH:mm:ss','callback','callbackuniqueid','callbackat','recallme','originatecalleridnum','prototype','getCaller','\x22%s\x22\x20<%s>','substring','dialCutDigit','util','lodash','moment','isNil','voiceQueue','uniqueid','name','Contact','phone','firstName','lastName','number','queue','type','dialQueueTimeout','scheduledat','countbusyretry','countnoanswerretry','countnosuchnumberretry','countdropretry'];(function(_0x2c91e9,_0x2fb965){var _0x13f0ff=function(_0xb39edf){while(--_0xb39edf){_0x2c91e9['push'](_0x2c91e9['shift']());}};_0x13f0ff(++_0x2fb965);}(_0xe529,0xb9));var _0x9e52=function(_0x1e55d9,_0x5ce14a){_0x1e55d9=_0x1e55d9-0x0;var _0x6dc799=_0xe529[_0x1e55d9];return _0x6dc799;};'use strict';var util=require(_0x9e52('0x0'));var _=require(_0x9e52('0x1'));var moment=require(_0x9e52('0x2'));function checkNameSurname(_0x1e5e1f,_0x35f747,_0x4b2c6b){var _0x430a12='';if(!_[_0x9e52('0x3')](_0x35f747)&&'string'===typeof _0x35f747){_0x430a12+=_0x35f747;}if(!_[_0x9e52('0x3')](_0x4b2c6b)&&'string'===typeof _0x4b2c6b){_0x430a12+='\x20'+_0x4b2c6b;}if(_0x430a12!==''){return _0x430a12;}return _0x1e5e1f;}function Action(_0x23dd2d,_0x13de9e,_0x41eb3d){this[_0x9e52('0x4')]=_0x23dd2d;this[_0x9e52('0x5')]=_0x41eb3d||undefined;this[_0x9e52('0x6')]=checkNameSurname(_0x13de9e[_0x9e52('0x7')][_0x9e52('0x8')],_0x13de9e[_0x9e52('0x7')][_0x9e52('0x9')],_0x13de9e['Contact'][_0x9e52('0xa')]);this[_0x9e52('0xb')]=_0x13de9e['phone'];this[_0x9e52('0xc')]=_0x23dd2d['name'];this['active']=_0x13de9e['active']||![];this[_0x9e52('0xd')]=_0x23dd2d['type'];this[_0x9e52('0xe')]=_0x23dd2d[_0x9e52('0xe')]||0x3;this[_0x9e52('0xf')]=_0x13de9e['scheduledat'];this[_0x9e52('0x10')]=_0x13de9e['countbusyretry'];this['countcongestionretry']=_0x13de9e['countcongestionretry'];this[_0x9e52('0x11')]=_0x13de9e['countnoanswerretry'];this[_0x9e52('0x12')]=_0x13de9e[_0x9e52('0x12')];this[_0x9e52('0x13')]=_0x13de9e['countdropretry'];this[_0x9e52('0x14')]=_0x13de9e[_0x9e52('0x14')];this[_0x9e52('0x15')]=_0x13de9e[_0x9e52('0x15')];this['countagentrejectretry']=_0x13de9e['countagentrejectretry'];this['ContactId']=_0x13de9e[_0x9e52('0x16')];this[_0x9e52('0x17')]=_0x13de9e[_0x9e52('0x17')];this[_0x9e52('0x18')]=_0x13de9e[_0x9e52('0x18')];this[_0x9e52('0x19')]=_0x13de9e[_0x9e52('0x19')];this[_0x9e52('0x1a')]=_0x13de9e[_0x9e52('0x1a')];this[_0x9e52('0x1b')]=_0x13de9e['id'];this[_0x9e52('0x1c')]=_0x13de9e[_0x9e52('0x7')][_0x9e52('0x9')]||'';this['starttime']=moment()[_0x9e52('0x1d')](_0x9e52('0x1e'));this[_0x9e52('0x1f')]=_0x13de9e[_0x9e52('0x1f')];this[_0x9e52('0x20')]=_0x13de9e[_0x9e52('0x20')];this[_0x9e52('0x21')]=_0x13de9e['callbackat'];this[_0x9e52('0x22')]=_0x13de9e[_0x9e52('0x22')];this[_0x9e52('0x23')]='';this['originatecalleridname']='';}Action[_0x9e52('0x24')][_0x9e52('0x25')]=function(){return util[_0x9e52('0x1d')](_0x9e52('0x26'),this[_0x9e52('0x6')],this[_0x9e52('0x4')]['dialCutDigit']>0x0?this[_0x9e52('0xb')][_0x9e52('0x27')](this['voiceQueue'][_0x9e52('0x28')]):this[_0x9e52('0xb')]);};Action[_0x9e52('0x24')]['getQueue']=function(){return this[_0x9e52('0xc')];};module['exports']=Action; \ No newline at end of file diff --git a/server/services/ami/dialer/models/agentComplete.js b/server/services/ami/dialer/models/agentComplete.js index 0bb4868..df42614 100644 --- a/server/services/ami/dialer/models/agentComplete.js +++ b/server/services/ami/dialer/models/agentComplete.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x7398=['CampaignId','originatecalleridnum','originatecalleridname','agiafterat','../utils','state','Answer','scheduledat','campaigntype','type','outbound','countbusyretry','countcongestionretry','countnoanswerretry','countnosuchnumberretry','countdropretry','countabandonedretry','countmachineretry','countagentrejectretry','uniqueid','name','calleridnum','number','starttime','responsetime','endtime','format','YYYY-MM-DD\x20HH:mm:ss','ringtime','holdtime','getSeconds','answertime','queue','reason','callback','callbackuniqueid','callbackat','recallme','ContactId','ListId','UserId','VoiceQueueId'];(function(_0x341e0f,_0x4a09d0){var _0x59555a=function(_0x4343a8){while(--_0x4343a8){_0x341e0f['push'](_0x341e0f['shift']());}};_0x59555a(++_0x4a09d0);}(_0x7398,0x82));var _0x8739=function(_0x209941,_0x5c9988){_0x209941=_0x209941-0x0;var _0x1e8729=_0x7398[_0x209941];return _0x1e8729;};'use strict';var moment=require('moment');var utils=require(_0x8739('0x0'));function AgentComplete(_0x50c2f1,_0x362a95){this[_0x8739('0x1')]=0x4;this['statedesc']=_0x8739('0x2');this['scheduledat']=_0x50c2f1[_0x8739('0x3')];this['type']=_0x50c2f1['type'];this[_0x8739('0x4')]=_0x50c2f1[_0x8739('0x5')]===_0x8739('0x6')?'queue':_0x50c2f1[_0x8739('0x5')];this[_0x8739('0x7')]=_0x50c2f1[_0x8739('0x7')];this[_0x8739('0x8')]=_0x50c2f1[_0x8739('0x8')];this[_0x8739('0x9')]=_0x50c2f1[_0x8739('0x9')];this['countglobal']=_0x50c2f1[_0x8739('0x7')]+_0x50c2f1['countcongestionretry']+_0x50c2f1[_0x8739('0x9')]+_0x50c2f1[_0x8739('0xa')]+_0x50c2f1[_0x8739('0xb')]+_0x50c2f1[_0x8739('0xc')]+_0x50c2f1[_0x8739('0xd')]+_0x50c2f1[_0x8739('0xe')];this[_0x8739('0xa')]=_0x50c2f1[_0x8739('0xa')];this[_0x8739('0xb')]=_0x50c2f1[_0x8739('0xb')];this[_0x8739('0xc')]=_0x50c2f1['countabandonedretry'];this[_0x8739('0xd')]=_0x50c2f1['countmachineretry'];this[_0x8739('0xe')]=_0x50c2f1['countagentrejectretry'];this[_0x8739('0xf')]=_0x362a95['uniqueid'];this['calleridname']=_0x50c2f1[_0x8739('0x10')];this[_0x8739('0x11')]=_0x50c2f1[_0x8739('0x12')];this[_0x8739('0x13')]=_0x50c2f1[_0x8739('0x13')];this[_0x8739('0x14')]=_0x50c2f1['responsetime'];this['answertime']=_0x50c2f1['answertime'];this[_0x8739('0x15')]=moment()[_0x8739('0x16')](_0x8739('0x17'));this[_0x8739('0x18')]=utils['getSeconds'](_0x50c2f1[_0x8739('0x14')],_0x50c2f1[_0x8739('0x13')]);this[_0x8739('0x19')]=utils[_0x8739('0x1a')](_0x50c2f1[_0x8739('0x1b')],_0x50c2f1[_0x8739('0x14')]);this['talktime']=utils['getSeconds'](this[_0x8739('0x15')],_0x50c2f1['answertime']);this[_0x8739('0x1c')]=_0x362a95['queue'];this['membername']=_0x362a95['membername'];this[_0x8739('0x1d')]=_0x362a95[_0x8739('0x1d')];this['callback']=_0x50c2f1[_0x8739('0x1e')];this[_0x8739('0x1f')]=_0x50c2f1[_0x8739('0x1f')];this[_0x8739('0x20')]=_0x50c2f1[_0x8739('0x20')];this[_0x8739('0x21')]=_0x50c2f1[_0x8739('0x21')];this[_0x8739('0x22')]=_0x50c2f1['ContactId'];this[_0x8739('0x23')]=_0x50c2f1['ListId'];this[_0x8739('0x24')]=_0x50c2f1[_0x8739('0x24')];this[_0x8739('0x25')]=_0x50c2f1[_0x8739('0x25')];this[_0x8739('0x26')]=_0x50c2f1[_0x8739('0x26')];this[_0x8739('0x27')]=_0x50c2f1[_0x8739('0x27')]||'';this[_0x8739('0x28')]=_0x50c2f1[_0x8739('0x28')]||'';this[_0x8739('0x29')]=_0x50c2f1[_0x8739('0x29')];}module['exports']=AgentComplete; \ No newline at end of file +var _0x5ff8=['callbackuniqueid','callbackat','recallme','ContactId','UserId','CampaignId','originatecalleridnum','originatecalleridname','agiafterat','../utils','statedesc','Answer','scheduledat','type','outbound','countbusyretry','countcongestionretry','countnoanswerretry','countglobal','countabandonedretry','countmachineretry','countnosuchnumberretry','countdropretry','countagentrejectretry','uniqueid','calleridname','calleridnum','number','starttime','responsetime','answertime','endtime','format','ringtime','getSeconds','queue','reason','callback'];(function(_0x1a538c,_0x17903d){var _0x340782=function(_0x4d2ff1){while(--_0x4d2ff1){_0x1a538c['push'](_0x1a538c['shift']());}};_0x340782(++_0x17903d);}(_0x5ff8,0x113));var _0x85ff=function(_0x4e8f91,_0x3df863){_0x4e8f91=_0x4e8f91-0x0;var _0x4ac8c2=_0x5ff8[_0x4e8f91];return _0x4ac8c2;};'use strict';var moment=require('moment');var utils=require(_0x85ff('0x0'));function AgentComplete(_0x171ed1,_0x45a176){this['state']=0x4;this[_0x85ff('0x1')]=_0x85ff('0x2');this[_0x85ff('0x3')]=_0x171ed1[_0x85ff('0x3')];this[_0x85ff('0x4')]=_0x171ed1[_0x85ff('0x4')];this['campaigntype']=_0x171ed1['type']===_0x85ff('0x5')?'queue':_0x171ed1[_0x85ff('0x4')];this[_0x85ff('0x6')]=_0x171ed1[_0x85ff('0x6')];this[_0x85ff('0x7')]=_0x171ed1['countcongestionretry'];this['countnoanswerretry']=_0x171ed1[_0x85ff('0x8')];this[_0x85ff('0x9')]=_0x171ed1[_0x85ff('0x6')]+_0x171ed1['countcongestionretry']+_0x171ed1['countnoanswerretry']+_0x171ed1['countnosuchnumberretry']+_0x171ed1['countdropretry']+_0x171ed1[_0x85ff('0xa')]+_0x171ed1[_0x85ff('0xb')]+_0x171ed1['countagentrejectretry'];this[_0x85ff('0xc')]=_0x171ed1[_0x85ff('0xc')];this[_0x85ff('0xd')]=_0x171ed1[_0x85ff('0xd')];this['countabandonedretry']=_0x171ed1[_0x85ff('0xa')];this[_0x85ff('0xb')]=_0x171ed1['countmachineretry'];this['countagentrejectretry']=_0x171ed1[_0x85ff('0xe')];this[_0x85ff('0xf')]=_0x45a176[_0x85ff('0xf')];this[_0x85ff('0x10')]=_0x171ed1['name'];this[_0x85ff('0x11')]=_0x171ed1[_0x85ff('0x12')];this[_0x85ff('0x13')]=_0x171ed1[_0x85ff('0x13')];this[_0x85ff('0x14')]=_0x171ed1['responsetime'];this['answertime']=_0x171ed1[_0x85ff('0x15')];this[_0x85ff('0x16')]=moment()[_0x85ff('0x17')]('YYYY-MM-DD\x20HH:mm:ss');this[_0x85ff('0x18')]=utils[_0x85ff('0x19')](_0x171ed1[_0x85ff('0x14')],_0x171ed1[_0x85ff('0x13')]);this['holdtime']=utils[_0x85ff('0x19')](_0x171ed1[_0x85ff('0x15')],_0x171ed1['responsetime']);this['talktime']=utils['getSeconds'](this[_0x85ff('0x16')],_0x171ed1[_0x85ff('0x15')]);this[_0x85ff('0x1a')]=_0x45a176[_0x85ff('0x1a')];this['membername']=_0x45a176['membername'];this['reason']=_0x45a176[_0x85ff('0x1b')];this['callback']=_0x171ed1[_0x85ff('0x1c')];this['callbackuniqueid']=_0x171ed1[_0x85ff('0x1d')];this[_0x85ff('0x1e')]=_0x171ed1['callbackat'];this['recallme']=_0x171ed1[_0x85ff('0x1f')];this[_0x85ff('0x20')]=_0x171ed1[_0x85ff('0x20')];this['ListId']=_0x171ed1['ListId'];this[_0x85ff('0x21')]=_0x171ed1[_0x85ff('0x21')];this['VoiceQueueId']=_0x171ed1['VoiceQueueId'];this['CampaignId']=_0x171ed1[_0x85ff('0x22')];this[_0x85ff('0x23')]=_0x171ed1[_0x85ff('0x23')]||'';this['originatecalleridname']=_0x171ed1[_0x85ff('0x24')]||'';this[_0x85ff('0x25')]=_0x171ed1[_0x85ff('0x25')];}module['exports']=AgentComplete; \ No newline at end of file diff --git a/server/services/ami/dialer/models/final.js b/server/services/ami/dialer/models/final.js index 08b3b74..c2488a9 100644 --- a/server/services/ami/dialer/models/final.js +++ b/server/services/ami/dialer/models/final.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x1e55=['countbusyretry','countcongestionretry','countnoanswerretry','countnosuchnumberretry','countdropretry','countabandonedretry','countmachineretry','countagentrejectretry','calleridname','calleridnum','starttime','responsetime','endtime','ringtime','holdtime','talktime','callback','callbackuniqueid','callbackat','recallme','ContactId','UserId','VoiceQueueId','CampaignId','originatecalleridnum','originatecalleridname','state','statedesc','exports','uniqueid','scheduledat','type','campaigntype','outbound','queue'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0x1e55,0x17b));var _0x51e5=function(_0x361bfa,_0x989c84){_0x361bfa=_0x361bfa-0x0;var _0x4b0a4b=_0x1e55[_0x361bfa];return _0x4b0a4b;};'use strict';function Final(_0x4d6dbc){this[_0x51e5('0x0')]=_0x4d6dbc[_0x51e5('0x0')];this[_0x51e5('0x1')]=_0x4d6dbc[_0x51e5('0x1')];this['type']=_0x4d6dbc[_0x51e5('0x2')];this[_0x51e5('0x3')]=_0x4d6dbc['type']===_0x51e5('0x4')?_0x51e5('0x5'):_0x4d6dbc['type'];this[_0x51e5('0x6')]=_0x4d6dbc[_0x51e5('0x6')];this[_0x51e5('0x7')]=_0x4d6dbc[_0x51e5('0x7')];this['countnoanswerretry']=_0x4d6dbc[_0x51e5('0x8')];this['countglobal']=_0x4d6dbc[_0x51e5('0x6')]+_0x4d6dbc[_0x51e5('0x7')]+_0x4d6dbc[_0x51e5('0x8')]+_0x4d6dbc[_0x51e5('0x9')]+_0x4d6dbc[_0x51e5('0xa')]+_0x4d6dbc['countabandonedretry']+_0x4d6dbc['countmachineretry']+_0x4d6dbc['countagentrejectretry'];this[_0x51e5('0x9')]=_0x4d6dbc['countnosuchnumberretry'];this['countdropretry']=_0x4d6dbc[_0x51e5('0xa')];this[_0x51e5('0xb')]=_0x4d6dbc[_0x51e5('0xb')];this[_0x51e5('0xc')]=_0x4d6dbc[_0x51e5('0xc')];this[_0x51e5('0xd')]=_0x4d6dbc[_0x51e5('0xd')];this['queue']=_0x4d6dbc['queue'];this[_0x51e5('0xe')]=_0x4d6dbc[_0x51e5('0xe')];this['calleridnum']=_0x4d6dbc[_0x51e5('0xf')];this[_0x51e5('0x10')]=_0x4d6dbc[_0x51e5('0x10')];this[_0x51e5('0x11')]=_0x4d6dbc['responsetime'];this[_0x51e5('0x12')]=_0x4d6dbc[_0x51e5('0x11')];this['ringtime']=_0x4d6dbc[_0x51e5('0x13')]||0x0;this[_0x51e5('0x14')]=_0x4d6dbc[_0x51e5('0x14')]||0x0;this[_0x51e5('0x15')]=_0x4d6dbc[_0x51e5('0x15')]||0x0;this[_0x51e5('0x16')]=_0x4d6dbc['callback'];this[_0x51e5('0x17')]=_0x4d6dbc['callbackuniqueid'];this['callbackat']=_0x4d6dbc[_0x51e5('0x18')];this[_0x51e5('0x19')]=_0x4d6dbc[_0x51e5('0x19')];this[_0x51e5('0x1a')]=_0x4d6dbc[_0x51e5('0x1a')];this['ListId']=_0x4d6dbc['ListId'];this[_0x51e5('0x1b')]=_0x4d6dbc[_0x51e5('0x1b')];this[_0x51e5('0x1c')]=_0x4d6dbc[_0x51e5('0x1c')];this[_0x51e5('0x1d')]=_0x4d6dbc[_0x51e5('0x1d')];this[_0x51e5('0x1e')]=_0x4d6dbc[_0x51e5('0x1e')]||'';this[_0x51e5('0x1f')]=_0x4d6dbc[_0x51e5('0x1f')]||'';this[_0x51e5('0x20')]=_0x4d6dbc[_0x51e5('0x20')];this[_0x51e5('0x21')]=_0x4d6dbc[_0x51e5('0x21')];}module[_0x51e5('0x22')]=Final; \ No newline at end of file +var _0x3a93=['countagentrejectretry','queue','calleridname','calleridnum','starttime','responsetime','endtime','ringtime','holdtime','talktime','callback','callbackuniqueid','callbackat','recallme','ContactId','ListId','UserId','VoiceQueueId','CampaignId','originatecalleridname','state','statedesc','uniqueid','scheduledat','type','campaigntype','countbusyretry','countcongestionretry','countnoanswerretry','countglobal','countnosuchnumberretry','countdropretry','countabandonedretry','countmachineretry'];(function(_0x556cd9,_0x2f12fb){var _0x393325=function(_0x510ddc){while(--_0x510ddc){_0x556cd9['push'](_0x556cd9['shift']());}};_0x393325(++_0x2f12fb);}(_0x3a93,0xe2));var _0x33a9=function(_0x1e87d2,_0x177a91){_0x1e87d2=_0x1e87d2-0x0;var _0x3f6de9=_0x3a93[_0x1e87d2];return _0x3f6de9;};'use strict';function Final(_0x744371){this[_0x33a9('0x0')]=_0x744371[_0x33a9('0x0')];this[_0x33a9('0x1')]=_0x744371[_0x33a9('0x1')];this[_0x33a9('0x2')]=_0x744371[_0x33a9('0x2')];this[_0x33a9('0x3')]=_0x744371[_0x33a9('0x2')]==='outbound'?'queue':_0x744371[_0x33a9('0x2')];this['countbusyretry']=_0x744371[_0x33a9('0x4')];this[_0x33a9('0x5')]=_0x744371['countcongestionretry'];this[_0x33a9('0x6')]=_0x744371[_0x33a9('0x6')];this[_0x33a9('0x7')]=_0x744371[_0x33a9('0x4')]+_0x744371[_0x33a9('0x5')]+_0x744371[_0x33a9('0x6')]+_0x744371[_0x33a9('0x8')]+_0x744371[_0x33a9('0x9')]+_0x744371[_0x33a9('0xa')]+_0x744371[_0x33a9('0xb')]+_0x744371['countagentrejectretry'];this[_0x33a9('0x8')]=_0x744371[_0x33a9('0x8')];this[_0x33a9('0x9')]=_0x744371['countdropretry'];this[_0x33a9('0xa')]=_0x744371[_0x33a9('0xa')];this[_0x33a9('0xb')]=_0x744371['countmachineretry'];this[_0x33a9('0xc')]=_0x744371['countagentrejectretry'];this[_0x33a9('0xd')]=_0x744371[_0x33a9('0xd')];this[_0x33a9('0xe')]=_0x744371[_0x33a9('0xe')];this['calleridnum']=_0x744371[_0x33a9('0xf')];this[_0x33a9('0x10')]=_0x744371[_0x33a9('0x10')];this[_0x33a9('0x11')]=_0x744371[_0x33a9('0x11')];this[_0x33a9('0x12')]=_0x744371[_0x33a9('0x11')];this[_0x33a9('0x13')]=_0x744371['ringtime']||0x0;this['holdtime']=_0x744371[_0x33a9('0x14')]||0x0;this[_0x33a9('0x15')]=_0x744371['talktime']||0x0;this['callback']=_0x744371[_0x33a9('0x16')];this[_0x33a9('0x17')]=_0x744371['callbackuniqueid'];this[_0x33a9('0x18')]=_0x744371[_0x33a9('0x18')];this['recallme']=_0x744371[_0x33a9('0x19')];this[_0x33a9('0x1a')]=_0x744371[_0x33a9('0x1a')];this[_0x33a9('0x1b')]=_0x744371[_0x33a9('0x1b')];this['UserId']=_0x744371[_0x33a9('0x1c')];this['VoiceQueueId']=_0x744371[_0x33a9('0x1d')];this[_0x33a9('0x1e')]=_0x744371[_0x33a9('0x1e')];this['originatecalleridnum']=_0x744371['originatecalleridnum']||'';this[_0x33a9('0x1f')]=_0x744371['originatecalleridname']||'';this[_0x33a9('0x20')]=_0x744371[_0x33a9('0x20')];this[_0x33a9('0x21')]=_0x744371[_0x33a9('0x21')];}module['exports']=Final; \ No newline at end of file diff --git a/server/services/ami/dialer/models/hangup.js b/server/services/ami/dialer/models/hangup.js index c3fff5e..3d14616 100644 --- a/server/services/ami/dialer/models/hangup.js +++ b/server/services/ami/dialer/models/hangup.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x8d3a=['recallme','ContactId','ListId','UserId','VoiceQueueId','CampaignId','moment','../utils','state','statedesc','scheduledat','type','campaigntype','queue','amd','countbusyretry','countcongestionretry','countnoanswerretry','countnosuchnumberretry','countdropretry','countmachineretry','countabandonedretry','countagentrejectretry','uniqueid','calleridnum','number','starttime','responsetime','endtime','format','ringtime','getSeconds','holdtime','talktime','membername','reason','callback','callbackuniqueid','callbackat'];(function(_0x24c45c,_0x516f51){var _0x3e3ccb=function(_0x4abdb9){while(--_0x4abdb9){_0x24c45c['push'](_0x24c45c['shift']());}};_0x3e3ccb(++_0x516f51);}(_0x8d3a,0xc9));var _0xa8d3=function(_0x4581ea,_0x223f54){_0x4581ea=_0x4581ea-0x0;var _0x166de8=_0x8d3a[_0x4581ea];return _0x166de8;};'use strict';var moment=require(_0xa8d3('0x0'));var utils=require(_0xa8d3('0x1'));function Hangup(_0x220cb4,_0x1c3f97){this[_0xa8d3('0x2')]=0x4;this[_0xa8d3('0x3')]='Answer';this[_0xa8d3('0x4')]=_0x220cb4[_0xa8d3('0x4')];this[_0xa8d3('0x5')]=_0x220cb4[_0xa8d3('0x5')];this[_0xa8d3('0x6')]=_0x220cb4[_0xa8d3('0x5')]==='outbound'?_0xa8d3('0x7'):_0x220cb4['type'];this[_0xa8d3('0x8')]=_0x220cb4[_0xa8d3('0x8')]||![];this[_0xa8d3('0x9')]=_0x220cb4['countbusyretry'];this[_0xa8d3('0xa')]=_0x220cb4[_0xa8d3('0xa')];this[_0xa8d3('0xb')]=_0x220cb4['countnoanswerretry'];this['countglobal']=_0x220cb4[_0xa8d3('0x9')]+_0x220cb4['countcongestionretry']+_0x220cb4['countnoanswerretry']+_0x220cb4[_0xa8d3('0xc')]+_0x220cb4[_0xa8d3('0xd')]+_0x220cb4['countabandonedretry']+_0x220cb4[_0xa8d3('0xe')]+_0x220cb4['countagentrejectretry'];this[_0xa8d3('0xc')]=_0x220cb4['countnosuchnumberretry'];this[_0xa8d3('0xd')]=_0x220cb4[_0xa8d3('0xd')];this[_0xa8d3('0xf')]=_0x220cb4[_0xa8d3('0xf')];this[_0xa8d3('0xe')]=_0x220cb4[_0xa8d3('0xe')];this[_0xa8d3('0x10')]=_0x220cb4[_0xa8d3('0x10')];this[_0xa8d3('0x11')]=_0x1c3f97[_0xa8d3('0x11')];this['calleridname']=_0x220cb4['name'];this[_0xa8d3('0x12')]=_0x220cb4[_0xa8d3('0x13')];this[_0xa8d3('0x14')]=_0x220cb4[_0xa8d3('0x14')];this[_0xa8d3('0x15')]=_0x220cb4[_0xa8d3('0x15')];this[_0xa8d3('0x16')]=moment()[_0xa8d3('0x17')]('YYYY-MM-DD\x20HH:mm:ss');this[_0xa8d3('0x18')]=utils[_0xa8d3('0x19')](_0x220cb4[_0xa8d3('0x15')],_0x220cb4[_0xa8d3('0x14')]);this[_0xa8d3('0x1a')]=0x0;this[_0xa8d3('0x1b')]=utils['getSeconds'](this[_0xa8d3('0x16')],_0x220cb4[_0xa8d3('0x15')]);this['queue']=_0x220cb4[_0xa8d3('0x7')];this[_0xa8d3('0x1c')]='IVR';this[_0xa8d3('0x1d')]=_0x1c3f97['cause-txt'];this['callback']=_0x220cb4[_0xa8d3('0x1e')];this[_0xa8d3('0x1f')]=_0x220cb4[_0xa8d3('0x1f')];this[_0xa8d3('0x20')]=_0x220cb4[_0xa8d3('0x20')];this[_0xa8d3('0x21')]=_0x220cb4['recallme'];this['ContactId']=_0x220cb4[_0xa8d3('0x22')];this[_0xa8d3('0x23')]=_0x220cb4[_0xa8d3('0x23')];this['UserId']=_0x220cb4[_0xa8d3('0x24')];this[_0xa8d3('0x25')]=_0x220cb4[_0xa8d3('0x25')];this[_0xa8d3('0x26')]=_0x220cb4['CampaignId'];}module['exports']=Hangup; \ No newline at end of file +var _0x20f1=['countabandonedretry','countmachineretry','countagentrejectretry','uniqueid','calleridname','name','number','starttime','responsetime','endtime','format','ringtime','getSeconds','holdtime','talktime','queue','membername','IVR','reason','cause-txt','callback','callbackuniqueid','callbackat','recallme','ContactId','ListId','UserId','VoiceQueueId','CampaignId','exports','../utils','state','Answer','scheduledat','type','campaigntype','outbound','amd','countbusyretry','countcongestionretry','countnoanswerretry','countnosuchnumberretry','countdropretry'];(function(_0x5ef81c,_0x3710b7){var _0xf3e42a=function(_0x1f9536){while(--_0x1f9536){_0x5ef81c['push'](_0x5ef81c['shift']());}};_0xf3e42a(++_0x3710b7);}(_0x20f1,0x120));var _0x120f=function(_0x520741,_0x4a7981){_0x520741=_0x520741-0x0;var _0x136761=_0x20f1[_0x520741];return _0x136761;};'use strict';var moment=require('moment');var utils=require(_0x120f('0x0'));function Hangup(_0x4abe87,_0x30a0bd){this[_0x120f('0x1')]=0x4;this['statedesc']=_0x120f('0x2');this[_0x120f('0x3')]=_0x4abe87[_0x120f('0x3')];this[_0x120f('0x4')]=_0x4abe87['type'];this[_0x120f('0x5')]=_0x4abe87[_0x120f('0x4')]===_0x120f('0x6')?'queue':_0x4abe87[_0x120f('0x4')];this[_0x120f('0x7')]=_0x4abe87['amd']||![];this[_0x120f('0x8')]=_0x4abe87['countbusyretry'];this[_0x120f('0x9')]=_0x4abe87[_0x120f('0x9')];this[_0x120f('0xa')]=_0x4abe87['countnoanswerretry'];this['countglobal']=_0x4abe87[_0x120f('0x8')]+_0x4abe87[_0x120f('0x9')]+_0x4abe87['countnoanswerretry']+_0x4abe87[_0x120f('0xb')]+_0x4abe87[_0x120f('0xc')]+_0x4abe87[_0x120f('0xd')]+_0x4abe87[_0x120f('0xe')]+_0x4abe87[_0x120f('0xf')];this['countnosuchnumberretry']=_0x4abe87[_0x120f('0xb')];this[_0x120f('0xc')]=_0x4abe87[_0x120f('0xc')];this[_0x120f('0xd')]=_0x4abe87[_0x120f('0xd')];this['countmachineretry']=_0x4abe87[_0x120f('0xe')];this[_0x120f('0xf')]=_0x4abe87[_0x120f('0xf')];this[_0x120f('0x10')]=_0x30a0bd[_0x120f('0x10')];this[_0x120f('0x11')]=_0x4abe87[_0x120f('0x12')];this['calleridnum']=_0x4abe87[_0x120f('0x13')];this[_0x120f('0x14')]=_0x4abe87[_0x120f('0x14')];this[_0x120f('0x15')]=_0x4abe87['responsetime'];this[_0x120f('0x16')]=moment()[_0x120f('0x17')]('YYYY-MM-DD\x20HH:mm:ss');this[_0x120f('0x18')]=utils[_0x120f('0x19')](_0x4abe87[_0x120f('0x15')],_0x4abe87[_0x120f('0x14')]);this[_0x120f('0x1a')]=0x0;this[_0x120f('0x1b')]=utils['getSeconds'](this[_0x120f('0x16')],_0x4abe87[_0x120f('0x15')]);this[_0x120f('0x1c')]=_0x4abe87[_0x120f('0x1c')];this[_0x120f('0x1d')]=_0x120f('0x1e');this[_0x120f('0x1f')]=_0x30a0bd[_0x120f('0x20')];this[_0x120f('0x21')]=_0x4abe87['callback'];this[_0x120f('0x22')]=_0x4abe87[_0x120f('0x22')];this[_0x120f('0x23')]=_0x4abe87[_0x120f('0x23')];this[_0x120f('0x24')]=_0x4abe87[_0x120f('0x24')];this[_0x120f('0x25')]=_0x4abe87[_0x120f('0x25')];this[_0x120f('0x26')]=_0x4abe87[_0x120f('0x26')];this[_0x120f('0x27')]=_0x4abe87[_0x120f('0x27')];this['VoiceQueueId']=_0x4abe87[_0x120f('0x28')];this[_0x120f('0x29')]=_0x4abe87[_0x120f('0x29')];}module[_0x120f('0x2a')]=Hangup; \ No newline at end of file diff --git a/server/services/ami/dialer/models/history.js b/server/services/ami/dialer/models/history.js index 28c573e..0db0203 100644 --- a/server/services/ami/dialer/models/history.js +++ b/server/services/ami/dialer/models/history.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xe88d=['callback','callbackuniqueid','callbackat','ContactId','ListId','UserId','VoiceQueueId','CampaignId','originatecalleridnum','originatecalleridname','state','statedesc','exports','scheduledat','type','outbound','queue','countcongestionretry','countnoanswerretry','countnosuchnumberretry','countdropretry','countabandonedretry','countagentrejectretry','countmachineretry','calleridname','name','calleridnum','starttime','responsetime','ringtime','getSeconds','holdtime'];(function(_0x282f52,_0x14a6e4){var _0xe866a3=function(_0x3d1889){while(--_0x3d1889){_0x282f52['push'](_0x282f52['shift']());}};_0xe866a3(++_0x14a6e4);}(_0xe88d,0x10d));var _0xde88=function(_0x71b765,_0x3053f8){_0x71b765=_0x71b765-0x0;var _0x34cb24=_0xe88d[_0x71b765];return _0x34cb24;};'use strict';var utils=require('../utils');function History(_0x36b61b){this['uniqueid']=_0x36b61b['uniqueid'];this[_0xde88('0x0')]=_0x36b61b[_0xde88('0x0')]||undefined;this[_0xde88('0x1')]=_0x36b61b[_0xde88('0x1')];this['campaigntype']=_0x36b61b[_0xde88('0x1')]===_0xde88('0x2')?_0xde88('0x3'):_0x36b61b['type'];this['countbusyretry']=_0x36b61b['countbusyretry'];this[_0xde88('0x4')]=_0x36b61b[_0xde88('0x4')];this[_0xde88('0x5')]=_0x36b61b[_0xde88('0x5')];this['countglobal']=_0x36b61b['countbusyretry']+_0x36b61b[_0xde88('0x4')]+_0x36b61b[_0xde88('0x5')]+_0x36b61b[_0xde88('0x6')]+_0x36b61b[_0xde88('0x7')]+_0x36b61b[_0xde88('0x8')]+_0x36b61b['countmachineretry']+_0x36b61b[_0xde88('0x9')];this[_0xde88('0x6')]=_0x36b61b[_0xde88('0x6')];this[_0xde88('0x7')]=_0x36b61b['countdropretry'];this[_0xde88('0x8')]=_0x36b61b[_0xde88('0x8')];this[_0xde88('0xa')]=_0x36b61b[_0xde88('0xa')];this[_0xde88('0x9')]=_0x36b61b[_0xde88('0x9')];this[_0xde88('0x3')]=_0x36b61b[_0xde88('0x3')];this[_0xde88('0xb')]=_0x36b61b[_0xde88('0xc')];this[_0xde88('0xd')]=_0x36b61b['number'];this[_0xde88('0xe')]=_0x36b61b[_0xde88('0xe')];this['responsetime']=_0x36b61b[_0xde88('0xf')];this['endtime']=_0x36b61b[_0xde88('0xf')];this[_0xde88('0x10')]=utils[_0xde88('0x11')](_0x36b61b[_0xde88('0xf')],_0x36b61b[_0xde88('0xe')]);this[_0xde88('0x12')]=0x0;this['talktime']=0x0;this[_0xde88('0x13')]=_0x36b61b[_0xde88('0x13')];this[_0xde88('0x14')]=_0x36b61b[_0xde88('0x14')];this[_0xde88('0x15')]=_0x36b61b[_0xde88('0x15')];this['recallme']=_0x36b61b['recallme'];this['ContactId']=_0x36b61b[_0xde88('0x16')];this[_0xde88('0x17')]=_0x36b61b[_0xde88('0x17')];this[_0xde88('0x18')]=_0x36b61b[_0xde88('0x18')];this[_0xde88('0x19')]=_0x36b61b[_0xde88('0x19')];this[_0xde88('0x1a')]=_0x36b61b['CampaignId'];this[_0xde88('0x1b')]=_0x36b61b[_0xde88('0x1b')]||'';this[_0xde88('0x1c')]=_0x36b61b[_0xde88('0x1c')]||'';this['state']=_0x36b61b[_0xde88('0x1d')];this[_0xde88('0x1e')]=_0x36b61b[_0xde88('0x1e')];}module[_0xde88('0x1f')]=History; \ No newline at end of file +var _0xfa0d=['scheduledat','campaigntype','type','outbound','countbusyretry','countcongestionretry','countnoanswerretry','countdropretry','countnosuchnumberretry','countabandonedretry','countmachineretry','countagentrejectretry','queue','name','calleridnum','number','starttime','responsetime','endtime','holdtime','callback','callbackuniqueid','recallme','ContactId','UserId','VoiceQueueId','CampaignId','originatecalleridnum','originatecalleridname','state','statedesc','exports','../utils','uniqueid'];(function(_0x23de3c,_0x51aa07){var _0x2666f9=function(_0x459ead){while(--_0x459ead){_0x23de3c['push'](_0x23de3c['shift']());}};_0x2666f9(++_0x51aa07);}(_0xfa0d,0x64));var _0xdfa0=function(_0x40189f,_0x3c10da){_0x40189f=_0x40189f-0x0;var _0x40e4aa=_0xfa0d[_0x40189f];return _0x40e4aa;};'use strict';var utils=require(_0xdfa0('0x0'));function History(_0x543dd6){this[_0xdfa0('0x1')]=_0x543dd6[_0xdfa0('0x1')];this[_0xdfa0('0x2')]=_0x543dd6['scheduledat']||undefined;this['type']=_0x543dd6['type'];this[_0xdfa0('0x3')]=_0x543dd6[_0xdfa0('0x4')]===_0xdfa0('0x5')?'queue':_0x543dd6[_0xdfa0('0x4')];this[_0xdfa0('0x6')]=_0x543dd6['countbusyretry'];this[_0xdfa0('0x7')]=_0x543dd6[_0xdfa0('0x7')];this[_0xdfa0('0x8')]=_0x543dd6[_0xdfa0('0x8')];this['countglobal']=_0x543dd6[_0xdfa0('0x6')]+_0x543dd6[_0xdfa0('0x7')]+_0x543dd6['countnoanswerretry']+_0x543dd6['countnosuchnumberretry']+_0x543dd6[_0xdfa0('0x9')]+_0x543dd6['countabandonedretry']+_0x543dd6['countmachineretry']+_0x543dd6['countagentrejectretry'];this[_0xdfa0('0xa')]=_0x543dd6[_0xdfa0('0xa')];this[_0xdfa0('0x9')]=_0x543dd6[_0xdfa0('0x9')];this['countabandonedretry']=_0x543dd6[_0xdfa0('0xb')];this[_0xdfa0('0xc')]=_0x543dd6['countmachineretry'];this[_0xdfa0('0xd')]=_0x543dd6[_0xdfa0('0xd')];this[_0xdfa0('0xe')]=_0x543dd6[_0xdfa0('0xe')];this['calleridname']=_0x543dd6[_0xdfa0('0xf')];this[_0xdfa0('0x10')]=_0x543dd6[_0xdfa0('0x11')];this[_0xdfa0('0x12')]=_0x543dd6[_0xdfa0('0x12')];this['responsetime']=_0x543dd6[_0xdfa0('0x13')];this[_0xdfa0('0x14')]=_0x543dd6['responsetime'];this['ringtime']=utils['getSeconds'](_0x543dd6[_0xdfa0('0x13')],_0x543dd6['starttime']);this[_0xdfa0('0x15')]=0x0;this['talktime']=0x0;this[_0xdfa0('0x16')]=_0x543dd6[_0xdfa0('0x16')];this['callbackuniqueid']=_0x543dd6[_0xdfa0('0x17')];this['callbackat']=_0x543dd6['callbackat'];this[_0xdfa0('0x18')]=_0x543dd6[_0xdfa0('0x18')];this[_0xdfa0('0x19')]=_0x543dd6[_0xdfa0('0x19')];this['ListId']=_0x543dd6['ListId'];this['UserId']=_0x543dd6[_0xdfa0('0x1a')];this[_0xdfa0('0x1b')]=_0x543dd6[_0xdfa0('0x1b')];this[_0xdfa0('0x1c')]=_0x543dd6['CampaignId'];this[_0xdfa0('0x1d')]=_0x543dd6[_0xdfa0('0x1d')]||'';this[_0xdfa0('0x1e')]=_0x543dd6[_0xdfa0('0x1e')]||'';this[_0xdfa0('0x1f')]=_0x543dd6[_0xdfa0('0x1f')];this[_0xdfa0('0x20')]=_0x543dd6['statedesc'];}module[_0xdfa0('0x21')]=History; \ No newline at end of file diff --git a/server/services/ami/dialer/models/queueCallerAbandon.js b/server/services/ami/dialer/models/queueCallerAbandon.js index 9de7aec..fdd6efa 100644 --- a/server/services/ami/dialer/models/queueCallerAbandon.js +++ b/server/services/ami/dialer/models/queueCallerAbandon.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x586c=['holdtime','membername','connectedlinename','reason','callback','callbackuniqueid','callbackat','recallme','ContactId','ListId','UserId','VoiceQueueId','CampaignId','originatecalleridnum','originatecalleridname','agiafterat','state','statedesc','exports','scheduledat','campaigntype','type','outbound','queue','countbusyretry','countcongestionretry','countnoanswerretry','countglobal','countnosuchnumberretry','countabandonedretry','countmachineretry','countagentrejectretry','uniqueid','calleridname','name','calleridnum','starttime','responsetime','droptime','endtime','ringtime','getSeconds'];(function(_0x109e2b,_0x24d971){var _0x318302=function(_0x4f94b3){while(--_0x4f94b3){_0x109e2b['push'](_0x109e2b['shift']());}};_0x318302(++_0x24d971);}(_0x586c,0x18d));var _0xc586=function(_0x260859,_0x3cfcff){_0x260859=_0x260859-0x0;var _0x4b77f8=_0x586c[_0x260859];return _0x4b77f8;};'use strict';var utils=require('../utils');function QueueCallerAbandon(_0x380c2a,_0x5f50e8){this[_0xc586('0x0')]=_0x380c2a['scheduledat'];this['type']=_0x380c2a['type'];this[_0xc586('0x1')]=_0x380c2a[_0xc586('0x2')]===_0xc586('0x3')?_0xc586('0x4'):_0x380c2a[_0xc586('0x2')];this[_0xc586('0x5')]=_0x380c2a[_0xc586('0x5')];this['countcongestionretry']=_0x380c2a[_0xc586('0x6')];this[_0xc586('0x7')]=_0x380c2a['countnoanswerretry'];this[_0xc586('0x8')]=_0x380c2a[_0xc586('0x5')]+_0x380c2a[_0xc586('0x6')]+_0x380c2a['countnoanswerretry']+_0x380c2a[_0xc586('0x9')]+_0x380c2a['countdropretry']+_0x380c2a[_0xc586('0xa')]+_0x380c2a[_0xc586('0xb')]+_0x380c2a['countagentrejectretry'];this['countnosuchnumberretry']=_0x380c2a['countnosuchnumberretry'];this['countdropretry']=_0x380c2a['countdropretry'];this[_0xc586('0xa')]=_0x380c2a[_0xc586('0xa')];this[_0xc586('0xb')]=_0x380c2a[_0xc586('0xb')];this[_0xc586('0xc')]=_0x380c2a[_0xc586('0xc')];this[_0xc586('0xd')]=_0x5f50e8[_0xc586('0xd')];this[_0xc586('0xe')]=_0x380c2a[_0xc586('0xf')];this[_0xc586('0x10')]=_0x380c2a['number'];this[_0xc586('0x11')]=_0x380c2a[_0xc586('0x11')];this[_0xc586('0x12')]=_0x380c2a['responsetime'];this['droptime']=_0x380c2a[_0xc586('0x13')];this['dropreason']=_0x380c2a['dropreason'];this[_0xc586('0x14')]=this['droptime'];this[_0xc586('0x15')]=utils[_0xc586('0x16')](_0x380c2a[_0xc586('0x12')],_0x380c2a['starttime']);this[_0xc586('0x17')]=utils['getSeconds'](this[_0xc586('0x13')],_0x380c2a[_0xc586('0x12')]);this['talktime']=0x0;this['queue']=_0x5f50e8['queue'];this[_0xc586('0x18')]=_0x5f50e8[_0xc586('0x19')];this['reason']=_0x5f50e8[_0xc586('0x1a')];this[_0xc586('0x1b')]=_0x380c2a[_0xc586('0x1b')];this[_0xc586('0x1c')]=_0x380c2a[_0xc586('0x1c')];this['callbackat']=_0x380c2a[_0xc586('0x1d')];this[_0xc586('0x1e')]=_0x380c2a['recallme'];this[_0xc586('0x1f')]=_0x380c2a['ContactId'];this[_0xc586('0x20')]=_0x380c2a[_0xc586('0x20')];this[_0xc586('0x21')]=_0x380c2a[_0xc586('0x21')];this['VoiceQueueId']=_0x380c2a[_0xc586('0x22')];this[_0xc586('0x23')]=_0x380c2a[_0xc586('0x23')];this['originatecalleridnum']=_0x380c2a[_0xc586('0x24')]||'';this[_0xc586('0x25')]=_0x380c2a['originatecalleridname']||'';this[_0xc586('0x26')]=_0x380c2a[_0xc586('0x26')];this['state']=_0x380c2a[_0xc586('0x27')];this[_0xc586('0x28')]=_0x380c2a['statedesc'];}module[_0xc586('0x29')]=QueueCallerAbandon; \ No newline at end of file +var _0xe1c3=['originatecalleridnum','originatecalleridname','agiafterat','state','statedesc','scheduledat','type','outbound','queue','countbusyretry','countcongestionretry','countnoanswerretry','countglobal','countdropretry','countagentrejectretry','countabandonedretry','countmachineretry','uniqueid','calleridname','name','calleridnum','responsetime','droptime','dropreason','ringtime','getSeconds','starttime','holdtime','talktime','membername','reason','callback','callbackuniqueid','callbackat','recallme','ContactId','ListId','UserId','VoiceQueueId'];(function(_0x4e676e,_0x2a7c6d){var _0x336a3c=function(_0x4767c4){while(--_0x4767c4){_0x4e676e['push'](_0x4e676e['shift']());}};_0x336a3c(++_0x2a7c6d);}(_0xe1c3,0x116));var _0x3e1c=function(_0x5ebc5c,_0x42da81){_0x5ebc5c=_0x5ebc5c-0x0;var _0x1a0d9f=_0xe1c3[_0x5ebc5c];return _0x1a0d9f;};'use strict';var utils=require('../utils');function QueueCallerAbandon(_0x47cd3b,_0x1904c2){this[_0x3e1c('0x0')]=_0x47cd3b[_0x3e1c('0x0')];this['type']=_0x47cd3b[_0x3e1c('0x1')];this['campaigntype']=_0x47cd3b[_0x3e1c('0x1')]===_0x3e1c('0x2')?_0x3e1c('0x3'):_0x47cd3b[_0x3e1c('0x1')];this[_0x3e1c('0x4')]=_0x47cd3b[_0x3e1c('0x4')];this[_0x3e1c('0x5')]=_0x47cd3b[_0x3e1c('0x5')];this[_0x3e1c('0x6')]=_0x47cd3b[_0x3e1c('0x6')];this[_0x3e1c('0x7')]=_0x47cd3b[_0x3e1c('0x4')]+_0x47cd3b[_0x3e1c('0x5')]+_0x47cd3b['countnoanswerretry']+_0x47cd3b['countnosuchnumberretry']+_0x47cd3b[_0x3e1c('0x8')]+_0x47cd3b['countabandonedretry']+_0x47cd3b['countmachineretry']+_0x47cd3b[_0x3e1c('0x9')];this['countnosuchnumberretry']=_0x47cd3b['countnosuchnumberretry'];this['countdropretry']=_0x47cd3b['countdropretry'];this['countabandonedretry']=_0x47cd3b[_0x3e1c('0xa')];this[_0x3e1c('0xb')]=_0x47cd3b[_0x3e1c('0xb')];this['countagentrejectretry']=_0x47cd3b['countagentrejectretry'];this[_0x3e1c('0xc')]=_0x1904c2[_0x3e1c('0xc')];this[_0x3e1c('0xd')]=_0x47cd3b[_0x3e1c('0xe')];this[_0x3e1c('0xf')]=_0x47cd3b['number'];this['starttime']=_0x47cd3b['starttime'];this['responsetime']=_0x47cd3b[_0x3e1c('0x10')];this[_0x3e1c('0x11')]=_0x47cd3b[_0x3e1c('0x11')];this[_0x3e1c('0x12')]=_0x47cd3b['dropreason'];this['endtime']=this['droptime'];this[_0x3e1c('0x13')]=utils[_0x3e1c('0x14')](_0x47cd3b[_0x3e1c('0x10')],_0x47cd3b[_0x3e1c('0x15')]);this[_0x3e1c('0x16')]=utils[_0x3e1c('0x14')](this['droptime'],_0x47cd3b['responsetime']);this[_0x3e1c('0x17')]=0x0;this['queue']=_0x1904c2['queue'];this[_0x3e1c('0x18')]=_0x1904c2['connectedlinename'];this[_0x3e1c('0x19')]=_0x1904c2[_0x3e1c('0x19')];this[_0x3e1c('0x1a')]=_0x47cd3b['callback'];this['callbackuniqueid']=_0x47cd3b[_0x3e1c('0x1b')];this[_0x3e1c('0x1c')]=_0x47cd3b['callbackat'];this[_0x3e1c('0x1d')]=_0x47cd3b['recallme'];this[_0x3e1c('0x1e')]=_0x47cd3b[_0x3e1c('0x1e')];this[_0x3e1c('0x1f')]=_0x47cd3b['ListId'];this[_0x3e1c('0x20')]=_0x47cd3b[_0x3e1c('0x20')];this[_0x3e1c('0x21')]=_0x47cd3b[_0x3e1c('0x21')];this['CampaignId']=_0x47cd3b['CampaignId'];this[_0x3e1c('0x22')]=_0x47cd3b[_0x3e1c('0x22')]||'';this[_0x3e1c('0x23')]=_0x47cd3b[_0x3e1c('0x23')]||'';this[_0x3e1c('0x24')]=_0x47cd3b[_0x3e1c('0x24')];this[_0x3e1c('0x25')]=_0x47cd3b[_0x3e1c('0x25')];this[_0x3e1c('0x26')]=_0x47cd3b['statedesc'];}module['exports']=QueueCallerAbandon; \ No newline at end of file diff --git a/server/services/ami/dialer/utils/hopper.js b/server/services/ami/dialer/utils/hopper.js index a42daa1..76c8ccf 100644 --- a/server/services/ami/dialer/utils/hopper.js +++ b/server/services/ami/dialer/utils/hopper.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xbff5=['moveContactManagedDialer','checkIsBlackList','[checkIsBlackList]','checkIsBlackListIvr','verifyAdditionalPhones','swapAdditionalPhones','[swapAdditionalPhone]','avgHandleTime','[createHistory]','createHistory','util','../../../../config/logger','dialer','../../rpc/cmHopper','../../rpc/cmHopperAdditionalPhone','../../rpc/cmHopperBlack','../../rpc/cmHopperHistory','inspect','getContactDialer','dialOrderByScheduledAt','catch','temp','error','[getContactDialer]','[getContactDialerIvr]','countReScheduled','[countReScheduled]','rescheduleContact','[rescheduleContact]','unlockContact','[unlockContact]'];(function(_0xe4d1f3,_0x432892){var _0xacd26b=function(_0x3024de){while(--_0x3024de){_0xe4d1f3['push'](_0xe4d1f3['shift']());}};_0xacd26b(++_0x432892);}(_0xbff5,0x1bc));var _0x5bff=function(_0x50815c,_0x4c2fb6){_0x50815c=_0x50815c-0x0;var _0x3bd342=_0xbff5[_0x50815c];return _0x3bd342;};'use strict';var util=require(_0x5bff('0x0'));var logger=require(_0x5bff('0x1'))(_0x5bff('0x2'));var cmHopper=require(_0x5bff('0x3'));var cmHopperAdditionalPhone=require(_0x5bff('0x4'));var cmHopperBlack=require(_0x5bff('0x5'));var cmHopperHistory=require(_0x5bff('0x6'));function inspectError(_0x4dccf3){return util[_0x5bff('0x7')](_0x4dccf3,{'showHidden':![],'depth':null});}function getContactDialer(_0x486083,_0x4c567d,_0x16ed7b){return cmHopper[_0x5bff('0x8')](_0x486083['id'],_0x4c567d,_0x16ed7b,_0x486083[_0x5bff('0x9')])[_0x5bff('0xa')](function(_0x43605a){_0x486083[_0x5bff('0xb')]=0x0;logger[_0x5bff('0xc')](_0x5bff('0xd'),inspectError(_0x43605a));});}exports[_0x5bff('0x8')]=getContactDialer;function getContactDialerIvr(_0x4a1be2,_0x20e26f){return cmHopper['getContactDialerIvr'](_0x4a1be2['id'],_0x20e26f,_0x4a1be2[_0x5bff('0x9')])[_0x5bff('0xa')](function(_0x4fc146){_0x4a1be2[_0x5bff('0xb')]=0x0;logger['error'](_0x5bff('0xe'),inspectError(_0x4fc146));});}exports['getContactDialerIvr']=getContactDialerIvr;function countReScheduled(_0x207835){return cmHopper[_0x5bff('0xf')](_0x207835)['catch'](function(_0x132dc9){logger['error'](_0x5bff('0x10'),inspectError(_0x132dc9));});}exports[_0x5bff('0xf')]=countReScheduled;function rescheduleContact(_0x548128){return cmHopper[_0x5bff('0x11')](_0x548128)[_0x5bff('0xa')](function(_0x5b0d2d){logger['error'](_0x5bff('0x12'),inspectError(_0x5b0d2d));});}exports[_0x5bff('0x11')]=rescheduleContact;function unlockContact(_0x3a507c,_0x4d883e,_0x2d22ab){return cmHopper[_0x5bff('0x13')](_0x3a507c,_0x4d883e,_0x2d22ab)[_0x5bff('0xa')](function(_0x56c7b2){logger[_0x5bff('0xc')](_0x5bff('0x14'),inspectError(_0x56c7b2));});}exports[_0x5bff('0x13')]=unlockContact;function moveContactManagedDialer(_0x546351){return cmHopper[_0x5bff('0x15')](_0x546351)[_0x5bff('0xa')](function(_0x36653b){logger[_0x5bff('0xc')]('[moveContactManagedDialer]',inspectError(_0x36653b));});}exports[_0x5bff('0x15')]=moveContactManagedDialer;function checkIsBlackList(_0x5357d4){return cmHopperBlack[_0x5bff('0x16')](_0x5357d4)['catch'](function(_0x1fc4cf){logger[_0x5bff('0xc')](_0x5bff('0x17'),inspectError(_0x1fc4cf));});}exports[_0x5bff('0x16')]=checkIsBlackList;function checkIsBlackListIvr(_0x12d018){return cmHopperBlack[_0x5bff('0x18')](_0x12d018)[_0x5bff('0xa')](function(_0x13ee8f){logger[_0x5bff('0xc')]('[checkIsBlackListIvr]',inspectError(_0x13ee8f));});}exports[_0x5bff('0x18')]=checkIsBlackListIvr;function verifyAdditionalPhones(_0x263cf5,_0x4369b0,_0x1e7f8a){return cmHopperAdditionalPhone[_0x5bff('0x19')](_0x263cf5,_0x4369b0,_0x1e7f8a)[_0x5bff('0xa')](function(_0x3913fd){logger[_0x5bff('0xc')]('[verifyAdditionalPhone]',inspectError(_0x3913fd));});}exports['verifyAdditionalPhones']=verifyAdditionalPhones;function swapAdditionalPhones(_0x9a69de,_0x53bd97,_0x220c8f){return cmHopperAdditionalPhone[_0x5bff('0x1a')](_0x9a69de,_0x53bd97,_0x220c8f)[_0x5bff('0xa')](function(_0x6f18f1){logger[_0x5bff('0xc')](_0x5bff('0x1b'),inspectError(_0x6f18f1));});}exports[_0x5bff('0x1a')]=swapAdditionalPhones;function avgHandleTime(_0xedba9d){return cmHopperHistory['avgHandleTime'](_0xedba9d)['catch'](function(_0x20d750){logger[_0x5bff('0xc')]('[avgHandleTime]',inspectError(_0x20d750));});}exports[_0x5bff('0x1c')]=avgHandleTime;function createHistory(_0x588078){return cmHopperHistory['createHistory'](_0x588078)[_0x5bff('0xa')](function(_0x5cf207){logger[_0x5bff('0xc')](_0x5bff('0x1d'),inspectError(_0x5cf207));});}exports[_0x5bff('0x1e')]=createHistory; \ No newline at end of file +var _0x8ca9=['../../rpc/cmHopperAdditionalPhone','../../rpc/cmHopperBlack','../../rpc/cmHopperHistory','dialOrderByScheduledAt','catch','temp','error','[getContactDialer]','getContactDialer','getContactDialerIvr','[getContactDialerIvr]','[countReScheduled]','rescheduleContact','[rescheduleContact]','unlockContact','[unlockContact]','moveContactManagedDialer','[moveContactManagedDialer]','[checkIsBlackList]','checkIsBlackListIvr','[checkIsBlackListIvr]','verifyAdditionalPhones','[verifyAdditionalPhone]','[swapAdditionalPhone]','[avgHandleTime]','avgHandleTime','createHistory','[createHistory]','util','../../../../config/logger','dialer','../../rpc/cmHopper'];(function(_0x583d6b,_0x509fdf){var _0x14d631=function(_0x774c56){while(--_0x774c56){_0x583d6b['push'](_0x583d6b['shift']());}};_0x14d631(++_0x509fdf);}(_0x8ca9,0x9c));var _0x98ca=function(_0x5cfbb4,_0x527795){_0x5cfbb4=_0x5cfbb4-0x0;var _0x3f6c32=_0x8ca9[_0x5cfbb4];return _0x3f6c32;};'use strict';var util=require(_0x98ca('0x0'));var logger=require(_0x98ca('0x1'))(_0x98ca('0x2'));var cmHopper=require(_0x98ca('0x3'));var cmHopperAdditionalPhone=require(_0x98ca('0x4'));var cmHopperBlack=require(_0x98ca('0x5'));var cmHopperHistory=require(_0x98ca('0x6'));function inspectError(_0x4af83a){return util['inspect'](_0x4af83a,{'showHidden':![],'depth':null});}function getContactDialer(_0x142793,_0x5671b9,_0x442519){return cmHopper['getContactDialer'](_0x142793['id'],_0x5671b9,_0x442519,_0x142793[_0x98ca('0x7')])[_0x98ca('0x8')](function(_0x18c349){_0x142793[_0x98ca('0x9')]=0x0;logger[_0x98ca('0xa')](_0x98ca('0xb'),inspectError(_0x18c349));});}exports[_0x98ca('0xc')]=getContactDialer;function getContactDialerIvr(_0x210234,_0x277c29){return cmHopper[_0x98ca('0xd')](_0x210234['id'],_0x277c29,_0x210234[_0x98ca('0x7')])[_0x98ca('0x8')](function(_0x25b06a){_0x210234[_0x98ca('0x9')]=0x0;logger[_0x98ca('0xa')](_0x98ca('0xe'),inspectError(_0x25b06a));});}exports[_0x98ca('0xd')]=getContactDialerIvr;function countReScheduled(_0x17ee87){return cmHopper['countReScheduled'](_0x17ee87)[_0x98ca('0x8')](function(_0x44b65b){logger[_0x98ca('0xa')](_0x98ca('0xf'),inspectError(_0x44b65b));});}exports['countReScheduled']=countReScheduled;function rescheduleContact(_0xf78589){return cmHopper[_0x98ca('0x10')](_0xf78589)[_0x98ca('0x8')](function(_0xa2bab4){logger[_0x98ca('0xa')](_0x98ca('0x11'),inspectError(_0xa2bab4));});}exports[_0x98ca('0x10')]=rescheduleContact;function unlockContact(_0x4940ca,_0x330713,_0x29df1b){return cmHopper[_0x98ca('0x12')](_0x4940ca,_0x330713,_0x29df1b)[_0x98ca('0x8')](function(_0x52e9c8){logger[_0x98ca('0xa')](_0x98ca('0x13'),inspectError(_0x52e9c8));});}exports[_0x98ca('0x12')]=unlockContact;function moveContactManagedDialer(_0x1ce43a){return cmHopper[_0x98ca('0x14')](_0x1ce43a)[_0x98ca('0x8')](function(_0x28c8a6){logger[_0x98ca('0xa')](_0x98ca('0x15'),inspectError(_0x28c8a6));});}exports[_0x98ca('0x14')]=moveContactManagedDialer;function checkIsBlackList(_0x1b2c69){return cmHopperBlack['checkIsBlackList'](_0x1b2c69)[_0x98ca('0x8')](function(_0x49298d){logger[_0x98ca('0xa')](_0x98ca('0x16'),inspectError(_0x49298d));});}exports['checkIsBlackList']=checkIsBlackList;function checkIsBlackListIvr(_0x5ca905){return cmHopperBlack[_0x98ca('0x17')](_0x5ca905)[_0x98ca('0x8')](function(_0x130544){logger['error'](_0x98ca('0x18'),inspectError(_0x130544));});}exports[_0x98ca('0x17')]=checkIsBlackListIvr;function verifyAdditionalPhones(_0x56f799,_0x6651c8,_0x5dc400){return cmHopperAdditionalPhone[_0x98ca('0x19')](_0x56f799,_0x6651c8,_0x5dc400)[_0x98ca('0x8')](function(_0x430d16){logger[_0x98ca('0xa')](_0x98ca('0x1a'),inspectError(_0x430d16));});}exports[_0x98ca('0x19')]=verifyAdditionalPhones;function swapAdditionalPhones(_0x2a59e3,_0x50b1a2,_0x2029cb){return cmHopperAdditionalPhone['swapAdditionalPhones'](_0x2a59e3,_0x50b1a2,_0x2029cb)[_0x98ca('0x8')](function(_0x1bdb75){logger['error'](_0x98ca('0x1b'),inspectError(_0x1bdb75));});}exports['swapAdditionalPhones']=swapAdditionalPhones;function avgHandleTime(_0x214649){return cmHopperHistory['avgHandleTime'](_0x214649)['catch'](function(_0x14bfb4){logger['error'](_0x98ca('0x1c'),inspectError(_0x14bfb4));});}exports[_0x98ca('0x1d')]=avgHandleTime;function createHistory(_0x13f766){return cmHopperHistory[_0x98ca('0x1e')](_0x13f766)[_0x98ca('0x8')](function(_0x1e7fcf){logger[_0x98ca('0xa')](_0x98ca('0x1f'),inspectError(_0x1e7fcf));});}exports[_0x98ca('0x1e')]=createHistory; \ No newline at end of file diff --git a/server/services/ami/dialer/utils/index.js b/server/services/ami/dialer/utils/index.js index 9397d2f..7a25d78 100644 --- a/server/services/ami/dialer/utils/index.js +++ b/server/services/ami/dialer/utils/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xe050=['isEmpty','format','\x22%s\x22\x20<%s>','\x22\x22\x20<>','\x5cw{0,','pow','random','getCallerIdRandom','error','[decrementOriginate]\x20queue\x20originate\x20value\x20is\x20negative','decrementOriginate','length','checkContactEmpty','erlangb','checkContactLowerLimitOriginate','createdAt','description','tags','undefined','%s%s','setXMDContactVariables','lodash','moment','../../../../config/logger','dialer','../../../../config/environment/shared','timezones','ACTIVE','BLACKLIST','RESCHEDULED_CONTACTS','DEACTIVATED','INTERVAL_IS_EMPTY','NOT_ACTIVE','AGENTS_NOT_LOGGED','INTERVAL_IS_NULL','GLOBAL_INTERVAL_IS_OVERTIME','RECALLINQUEUE','RECALLFAILEDTIMEOUT','RUNNING','TRUNK_IS_NOT_REACHABLE','CAMPAIGN_STATUS','dialMethod','preview','isPreviewCampaign','type','isOutboundQueue','dialActive','isQueueCampaignActive','active','milliseconds','diff','getSeconds','message','available','loggedIn','loggedInDb','paused','pTalking','waiting','inUse','originated','Trunk','name','hasQueueCampaignDataChanged','dialTimezone','isNil','dialGlobalInterval','Interval','Intervals','NULL_INTERVAL','EMPTY_INTERVAL','SIP/','TrunkBackup','includes','INACTIVE','talking','DISACTIVED','NO_AGENTS_LOGGED','getQueueCampaignStatusMessage','extractCalleridName','isUndefined','string'];(function(_0x4cba56,_0x5b2c44){var _0x3cc9f3=function(_0x5bb80a){while(--_0x5bb80a){_0x4cba56['push'](_0x4cba56['shift']());}};_0x3cc9f3(++_0x5b2c44);}(_0xe050,0xb9));var _0x0e05=function(_0x3181ff,_0x33ee3c){_0x3181ff=_0x3181ff-0x0;var _0x5d486e=_0xe050[_0x3181ff];return _0x5d486e;};'use strict';var _=require(_0x0e05('0x0'));var moment=require(_0x0e05('0x1'));var util=require('util');var logger=require(_0x0e05('0x2'))(_0x0e05('0x3'));var timezones=require(_0x0e05('0x4'))[_0x0e05('0x5')];var CAMPAIGN_STATUS={'ACTIVE':_0x0e05('0x6'),'BLACKLIST':_0x0e05('0x7'),'CONTACTS_RESCHEDULED':_0x0e05('0x8'),'DEACTIVATED':_0x0e05('0x9'),'DISACTIVED':'IS_DISACTIVED','EMPTY_INTERVAL':_0x0e05('0xa'),'INACTIVE':_0x0e05('0xb'),'NO_AGENTS_LOGGED':_0x0e05('0xc'),'NO_AVAILABLE_CONTACTS':'AVAILABLE_CONTACTS_FINISHED','NULL_INTERVAL':_0x0e05('0xd'),'OVERTIME_INTERVAL':'INTERVAL_IS_OVERTIME','OVERTIME_GLOBAL_INTERVAL':_0x0e05('0xe'),'QUEUE_RECALL':_0x0e05('0xf'),'RECALL_TIMEOUT':_0x0e05('0x10'),'RUNNING':_0x0e05('0x11'),'UNKNOWN_TIMEZONE':'TIMEZONE_UNKNOW','UNREACHABLE_TRUNK':_0x0e05('0x12')};exports[_0x0e05('0x13')]=CAMPAIGN_STATUS;function isPreviewCampaign(_0x325477){return _0x325477[_0x0e05('0x14')]===_0x0e05('0x15');}exports[_0x0e05('0x16')]=isPreviewCampaign;function isIVRCampaign(_0x59e577){return _0x59e577[_0x0e05('0x17')]==='ivr';}exports['isIVRCampaign']=isIVRCampaign;function isOutboundQueue(_0x5ea38f){return _0x5ea38f[_0x0e05('0x17')]==='outbound';}exports[_0x0e05('0x18')]=isOutboundQueue;function isQueueCampaignActive(_0x81ceb){return _0x81ceb[_0x0e05('0x19')];}exports[_0x0e05('0x1a')]=isQueueCampaignActive;function isIVRCampaignActive(_0x3e724a){return _0x3e724a[_0x0e05('0x1b')];}exports['isIVRCampaignActive']=isIVRCampaignActive;function getSeconds(_0xc152ac,_0xf2c821){var _0x4ea691=moment(_0xc152ac)[_0x0e05('0x1c')](0x0);var _0x1dc057=moment(_0xf2c821)[_0x0e05('0x1c')](0x0);return _0x4ea691[_0x0e05('0x1d')](_0x1dc057,'seconds');}exports[_0x0e05('0x1e')]=getSeconds;function hasQueueCampaignDataChanged(_0x3dee1f,_0x4db86e){var _0x46d2c5=![];var _0x2cdc23=_0x3dee1f[_0x0e05('0x14')]!==_0x4db86e[_0x0e05('0x14')]||_0x3dee1f[_0x0e05('0x19')]!==_0x4db86e['dialActive']||_0x3dee1f[_0x0e05('0x1f')]!==_0x4db86e[_0x0e05('0x1f')];var _0x3aa2f7=_0x3dee1f[_0x0e05('0x20')]!==_0x4db86e[_0x0e05('0x20')]||_0x3dee1f['loggedIn']!==_0x4db86e[_0x0e05('0x21')]||_0x3dee1f['loggedInDb']!==_0x4db86e[_0x0e05('0x22')]||_0x3dee1f[_0x0e05('0x23')]!==_0x4db86e[_0x0e05('0x23')]||_0x3dee1f['talking']!==_0x4db86e['talking']||_0x3dee1f[_0x0e05('0x24')]!==_0x4db86e[_0x0e05('0x24')]||_0x3dee1f[_0x0e05('0x25')]!==_0x4db86e['waiting']||_0x3dee1f[_0x0e05('0x26')]!==_0x4db86e['inUse']||_0x3dee1f[_0x0e05('0x27')]!==_0x4db86e[_0x0e05('0x27')];if(_0x3dee1f[_0x0e05('0x28')]&&_0x4db86e['Trunk']){_0x46d2c5=_0x3dee1f[_0x0e05('0x28')]['name']!==_0x4db86e[_0x0e05('0x28')][_0x0e05('0x29')]||_0x3dee1f[_0x0e05('0x28')]['active']!==_0x4db86e['Trunk'][_0x0e05('0x1b')];}return _0x2cdc23||_0x3aa2f7||_0x46d2c5;}exports[_0x0e05('0x2a')]=hasQueueCampaignDataChanged;function checkAnyValidQueueCampaignInterval(_0x5500a9){var _0x382058=null;var _0x2670b3=_0x5500a9[_0x0e05('0x2b')];if(_[_0x0e05('0x2c')](_0x5500a9[_0x0e05('0x2d')])||_[_0x0e05('0x2c')](_0x5500a9[_0x0e05('0x2e')])||_[_0x0e05('0x2c')](_0x5500a9[_0x0e05('0x2e')][_0x0e05('0x2f')])){_0x382058=CAMPAIGN_STATUS[_0x0e05('0x30')];}else if(_['isEmpty'](_0x5500a9[_0x0e05('0x2d')])||_['isEmpty'](_0x5500a9[_0x0e05('0x2e')][_0x0e05('0x2f')])){_0x382058=CAMPAIGN_STATUS[_0x0e05('0x31')];}else if(_0x2670b3&&!timezones[_0x2670b3]){_0x382058=CAMPAIGN_STATUS['UNKNOWN_TIMEZONE'];}return _0x382058;}function checkAnyValidTrunk(_0x2b28b1,_0x2963f2){var _0xdca8be=null;var _0x8c46f2=_0x0e05('0x32');var _0x9e5fd7=['reachable','unmonitored'];var _0x4bf8be=!![];if(_0x2b28b1[_0x0e05('0x28')]&&_0x2b28b1['Trunk'][_0x0e05('0x1b')]){_0x8c46f2+=_0x2b28b1['Trunk'][_0x0e05('0x29')];_0xdca8be=_0x2963f2[_0x8c46f2];_0x4bf8be=_0x9e5fd7['includes'](_0xdca8be['status']);}else if(_0x2b28b1[_0x0e05('0x33')]&&_0x2b28b1['TrunkBackup'][_0x0e05('0x1b')]){_0x8c46f2+=_0x2b28b1[_0x0e05('0x33')][_0x0e05('0x29')];_0xdca8be=_0x2963f2[_0x8c46f2];_0x4bf8be=_0x9e5fd7[_0x0e05('0x34')](_0xdca8be['status']);}return _0x4bf8be;}function getQueueCampaignStatusMessage(_0x130946,_0x2d6616){var _0xa16398=CAMPAIGN_STATUS[_0x0e05('0x6')];var _0x4aff57=isPreviewCampaign(_0x130946);if(!isQueueCampaignActive(_0x130946)){if(_0x4aff57){_0xa16398=CAMPAIGN_STATUS[_0x0e05('0x35')];}else{if(_0x130946[_0x0e05('0x27')]===0x0&&_0x130946[_0x0e05('0x36')]===0x0&&_0x130946['waiting']===0x0&&(_0x130946[_0x0e05('0x24')]||0x0)===0x0){_0xa16398=CAMPAIGN_STATUS[_0x0e05('0x35')];}else{_0xa16398=CAMPAIGN_STATUS[_0x0e05('0x37')];}}}else if(_0x130946[_0x0e05('0x21')]===0x0){_0xa16398=CAMPAIGN_STATUS[_0x0e05('0x38')];}else if(!checkAnyValidTrunk(_0x130946,_0x2d6616)){_0xa16398=CAMPAIGN_STATUS['UNREACHABLE_TRUNK'];}else if(!isPreviewCampaign(_0x130946)){var _0x52e727=checkAnyValidQueueCampaignInterval(_0x130946);if(_0x52e727){_0xa16398=_0x52e727;}}return _0xa16398;}exports[_0x0e05('0x39')]=getQueueCampaignStatusMessage;function getQueueCampaignActiveStatusMessage(_0x4daa02){var _0x1f4fc3=CAMPAIGN_STATUS[_0x0e05('0x37')];if(_0x4daa02[_0x0e05('0x27')]===0x0&&_0x4daa02[_0x0e05('0x36')]===0x0&&_0x4daa02['waiting']===0x0&&(_0x4daa02[_0x0e05('0x24')]||0x0)===0x0){_0x1f4fc3=CAMPAIGN_STATUS['INACTIVE'];}return _0x1f4fc3;}exports['getQueueCampaignActiveStatusMessage']=getQueueCampaignActiveStatusMessage;function extractCalleridName(_0x118785){var _0x559150=_0x118785['match'](/"(.*?)"/);return _0x559150?_0x559150[0x1]:_0x118785;}exports[_0x0e05('0x3a')]=extractCalleridName;function getCallerId(_0x15849c,_0x584919,_0x5c48fc){if(!_[_0x0e05('0x3b')](_0x5c48fc)&&typeof _0x5c48fc===_0x0e05('0x3c')&&!_[_0x0e05('0x3d')](_0x5c48fc)){if(!_[_0x0e05('0x3b')](_0x584919)&&typeof _0x584919===_0x0e05('0x3c')&&!_['isEmpty'](_0x584919)){return util[_0x0e05('0x3e')](_0x0e05('0x3f'),_0x584919,_0x5c48fc);}return util['format']('\x22%s\x22\x20<%s>',_0x5c48fc,_0x5c48fc);}if(!_[_0x0e05('0x3b')](_0x15849c)&&typeof _0x15849c===_0x0e05('0x3c')&&!_['isEmpty'](_0x15849c)){return _0x15849c;}return _0x0e05('0x40');}exports['getCallerId']=getCallerId;function getCallerIdRandom(_0x5bf3e1,_0x2e48a8){var _0x37a759;var _0x53498e;var _0x5a88e4;if(_0x2e48a8<=0x0){_0x2e48a8=0x1;}_0x37a759=new RegExp(_0x0e05('0x41')+_0x2e48a8+'}$');_0x53498e=Math['pow'](0xa,_0x2e48a8-0x1);_0x5a88e4=Math[_0x0e05('0x42')](0xa,_0x2e48a8)-0x1;return util[_0x0e05('0x3e')]('%s',_['replace'](_0x5bf3e1,_0x37a759,_[_0x0e05('0x43')](_0x53498e,_0x5a88e4)['toString']()));}exports[_0x0e05('0x44')]=getCallerIdRandom;function decrementOriginate(_0x17545e){if(_0x17545e[_0x0e05('0x27')]&&_0x17545e[_0x0e05('0x27')]>0x0){_0x17545e[_0x0e05('0x27')]-=0x1;}else{logger[_0x0e05('0x45')](_0x0e05('0x46'));}}exports[_0x0e05('0x47')]=decrementOriginate;function checkContactEmpty(_0x4e2632){return _0x4e2632&&_0x4e2632[_0x0e05('0x48')]>0x0;}exports[_0x0e05('0x49')]=checkContactEmpty;function erlangb(_0x5e61e4,_0x165d52){if(_0x165d52===0x0){return 0x0;}var _0x32634c=0x1;for(var _0x21bef2=0x1;_0x21bef2<=_0x165d52;_0x21bef2+=0x1){_0x32634c=0x1+_0x32634c*_0x21bef2/_0x5e61e4;}return 0x1/_0x32634c;}exports[_0x0e05('0x4a')]=erlangb;function checkContactLowerLimitOriginate(_0x21a314,_0x258572,_0x137c7c){if(_0x258572>_0x137c7c){for(var _0x150414=0x0;_0x150414<_0x258572-_0x137c7c;_0x150414+=0x1){decrementOriginate(_0x21a314);}}}exports[_0x0e05('0x4b')]=checkContactLowerLimitOriginate;function setXMDContactVariables(_0x6a35b5){var _0x2a7f08={};var _0x53d851=['id',_0x0e05('0x4c'),_0x0e05('0x4d'),_0x0e05('0x4e'),'updatedAt'];if(_0x6a35b5){for(var _0x3eb45c in _0x6a35b5){if(typeof _0x6a35b5[_0x3eb45c]!==_0x0e05('0x4f')){if(!_[_0x0e05('0x2c')](_0x6a35b5[_0x3eb45c])&&!_0x53d851[_0x0e05('0x34')](_0x3eb45c)){_0x2a7f08[util['format'](_0x0e05('0x50'),'XMD-',_0x3eb45c['toUpperCase']())]=_0x6a35b5[_0x3eb45c];}}}}return _0x2a7f08;}exports[_0x0e05('0x51')]=setXMDContactVariables; \ No newline at end of file +var _0x99e2=['Trunk','name','active','hasQueueCampaignDataChanged','dialTimezone','isNil','Interval','NULL_INTERVAL','isEmpty','UNKNOWN_TIMEZONE','SIP/','unmonitored','includes','status','TrunkBackup','INACTIVE','DISACTIVED','NO_AGENTS_LOGGED','UNREACHABLE_TRUNK','getQueueCampaignActiveStatusMessage','match','extractCalleridName','string','isUndefined','format','\x22%s\x22\x20<%s>','\x22\x22\x20<>','getCallerId','\x5cw{0,','pow','replace','toString','decrementOriginate','length','checkContactEmpty','erlangb','checkContactLowerLimitOriginate','description','tags','updatedAt','undefined','%s%s','XMD-','setXMDContactVariables','lodash','../../../../config/logger','dialer','timezones','ACTIVE','BLACKLIST','DEACTIVATED','IS_DISACTIVED','INTERVAL_IS_EMPTY','AGENTS_NOT_LOGGED','INTERVAL_IS_NULL','INTERVAL_IS_OVERTIME','GLOBAL_INTERVAL_IS_OVERTIME','RECALLINQUEUE','RECALLFAILEDTIMEOUT','RUNNING','TIMEZONE_UNKNOW','TRUNK_IS_NOT_REACHABLE','CAMPAIGN_STATUS','preview','type','ivr','isIVRCampaign','outbound','isOutboundQueue','dialActive','isIVRCampaignActive','milliseconds','diff','seconds','getSeconds','dialMethod','message','loggedIn','loggedInDb','paused','talking','pTalking','waiting','inUse','originated'];(function(_0x1ae4a9,_0x4c0ed9){var _0x54d0b0=function(_0x4fff20){while(--_0x4fff20){_0x1ae4a9['push'](_0x1ae4a9['shift']());}};_0x54d0b0(++_0x4c0ed9);}(_0x99e2,0x180));var _0x299e=function(_0x525bfb,_0x28ab29){_0x525bfb=_0x525bfb-0x0;var _0x735ef9=_0x99e2[_0x525bfb];return _0x735ef9;};'use strict';var _=require(_0x299e('0x0'));var moment=require('moment');var util=require('util');var logger=require(_0x299e('0x1'))(_0x299e('0x2'));var timezones=require('../../../../config/environment/shared')[_0x299e('0x3')];var CAMPAIGN_STATUS={'ACTIVE':_0x299e('0x4'),'BLACKLIST':_0x299e('0x5'),'CONTACTS_RESCHEDULED':'RESCHEDULED_CONTACTS','DEACTIVATED':_0x299e('0x6'),'DISACTIVED':_0x299e('0x7'),'EMPTY_INTERVAL':_0x299e('0x8'),'INACTIVE':'NOT_ACTIVE','NO_AGENTS_LOGGED':_0x299e('0x9'),'NO_AVAILABLE_CONTACTS':'AVAILABLE_CONTACTS_FINISHED','NULL_INTERVAL':_0x299e('0xa'),'OVERTIME_INTERVAL':_0x299e('0xb'),'OVERTIME_GLOBAL_INTERVAL':_0x299e('0xc'),'QUEUE_RECALL':_0x299e('0xd'),'RECALL_TIMEOUT':_0x299e('0xe'),'RUNNING':_0x299e('0xf'),'UNKNOWN_TIMEZONE':_0x299e('0x10'),'UNREACHABLE_TRUNK':_0x299e('0x11')};exports[_0x299e('0x12')]=CAMPAIGN_STATUS;function isPreviewCampaign(_0x1261fe){return _0x1261fe['dialMethod']===_0x299e('0x13');}exports['isPreviewCampaign']=isPreviewCampaign;function isIVRCampaign(_0x5ea926){return _0x5ea926[_0x299e('0x14')]===_0x299e('0x15');}exports[_0x299e('0x16')]=isIVRCampaign;function isOutboundQueue(_0x5270cb){return _0x5270cb[_0x299e('0x14')]===_0x299e('0x17');}exports[_0x299e('0x18')]=isOutboundQueue;function isQueueCampaignActive(_0xe2b311){return _0xe2b311[_0x299e('0x19')];}exports['isQueueCampaignActive']=isQueueCampaignActive;function isIVRCampaignActive(_0x5a2f98){return _0x5a2f98['active'];}exports[_0x299e('0x1a')]=isIVRCampaignActive;function getSeconds(_0x3e2561,_0x16be59){var _0x2b300d=moment(_0x3e2561)[_0x299e('0x1b')](0x0);var _0x26cb0e=moment(_0x16be59)[_0x299e('0x1b')](0x0);return _0x2b300d[_0x299e('0x1c')](_0x26cb0e,_0x299e('0x1d'));}exports[_0x299e('0x1e')]=getSeconds;function hasQueueCampaignDataChanged(_0x12d5ad,_0x9ed8d0){var _0x1fee2c=![];var _0x1763cf=_0x12d5ad['dialMethod']!==_0x9ed8d0[_0x299e('0x1f')]||_0x12d5ad[_0x299e('0x19')]!==_0x9ed8d0[_0x299e('0x19')]||_0x12d5ad[_0x299e('0x20')]!==_0x9ed8d0['message'];var _0x3a00fa=_0x12d5ad['available']!==_0x9ed8d0['available']||_0x12d5ad[_0x299e('0x21')]!==_0x9ed8d0[_0x299e('0x21')]||_0x12d5ad[_0x299e('0x22')]!==_0x9ed8d0[_0x299e('0x22')]||_0x12d5ad['paused']!==_0x9ed8d0[_0x299e('0x23')]||_0x12d5ad['talking']!==_0x9ed8d0[_0x299e('0x24')]||_0x12d5ad['pTalking']!==_0x9ed8d0[_0x299e('0x25')]||_0x12d5ad['waiting']!==_0x9ed8d0[_0x299e('0x26')]||_0x12d5ad[_0x299e('0x27')]!==_0x9ed8d0[_0x299e('0x27')]||_0x12d5ad[_0x299e('0x28')]!==_0x9ed8d0[_0x299e('0x28')];if(_0x12d5ad[_0x299e('0x29')]&&_0x9ed8d0[_0x299e('0x29')]){_0x1fee2c=_0x12d5ad[_0x299e('0x29')][_0x299e('0x2a')]!==_0x9ed8d0[_0x299e('0x29')][_0x299e('0x2a')]||_0x12d5ad[_0x299e('0x29')]['active']!==_0x9ed8d0[_0x299e('0x29')][_0x299e('0x2b')];}return _0x1763cf||_0x3a00fa||_0x1fee2c;}exports[_0x299e('0x2c')]=hasQueueCampaignDataChanged;function checkAnyValidQueueCampaignInterval(_0x1528bd){var _0x48fc06=null;var _0x5bf1e3=_0x1528bd[_0x299e('0x2d')];if(_[_0x299e('0x2e')](_0x1528bd['dialGlobalInterval'])||_[_0x299e('0x2e')](_0x1528bd['Interval'])||_[_0x299e('0x2e')](_0x1528bd[_0x299e('0x2f')]['Intervals'])){_0x48fc06=CAMPAIGN_STATUS[_0x299e('0x30')];}else if(_[_0x299e('0x31')](_0x1528bd['dialGlobalInterval'])||_[_0x299e('0x31')](_0x1528bd['Interval']['Intervals'])){_0x48fc06=CAMPAIGN_STATUS['EMPTY_INTERVAL'];}else if(_0x5bf1e3&&!timezones[_0x5bf1e3]){_0x48fc06=CAMPAIGN_STATUS[_0x299e('0x32')];}return _0x48fc06;}function checkAnyValidTrunk(_0x38036c,_0x59aa2b){var _0x4aac5d=null;var _0x552d2a=_0x299e('0x33');var _0x385745=['reachable',_0x299e('0x34')];var _0x3abbcf=!![];if(_0x38036c[_0x299e('0x29')]&&_0x38036c[_0x299e('0x29')][_0x299e('0x2b')]){_0x552d2a+=_0x38036c['Trunk']['name'];_0x4aac5d=_0x59aa2b[_0x552d2a];_0x3abbcf=_0x385745[_0x299e('0x35')](_0x4aac5d[_0x299e('0x36')]);}else if(_0x38036c[_0x299e('0x37')]&&_0x38036c[_0x299e('0x37')][_0x299e('0x2b')]){_0x552d2a+=_0x38036c[_0x299e('0x37')][_0x299e('0x2a')];_0x4aac5d=_0x59aa2b[_0x552d2a];_0x3abbcf=_0x385745['includes'](_0x4aac5d[_0x299e('0x36')]);}return _0x3abbcf;}function getQueueCampaignStatusMessage(_0x5b1825,_0x2933a7){var _0x4bf5a9=CAMPAIGN_STATUS[_0x299e('0x4')];var _0x5a1c71=isPreviewCampaign(_0x5b1825);if(!isQueueCampaignActive(_0x5b1825)){if(_0x5a1c71){_0x4bf5a9=CAMPAIGN_STATUS[_0x299e('0x38')];}else{if(_0x5b1825['originated']===0x0&&_0x5b1825[_0x299e('0x24')]===0x0&&_0x5b1825[_0x299e('0x26')]===0x0&&(_0x5b1825[_0x299e('0x25')]||0x0)===0x0){_0x4bf5a9=CAMPAIGN_STATUS[_0x299e('0x38')];}else{_0x4bf5a9=CAMPAIGN_STATUS[_0x299e('0x39')];}}}else if(_0x5b1825[_0x299e('0x21')]===0x0){_0x4bf5a9=CAMPAIGN_STATUS[_0x299e('0x3a')];}else if(!checkAnyValidTrunk(_0x5b1825,_0x2933a7)){_0x4bf5a9=CAMPAIGN_STATUS[_0x299e('0x3b')];}else if(!isPreviewCampaign(_0x5b1825)){var _0x1e5c73=checkAnyValidQueueCampaignInterval(_0x5b1825);if(_0x1e5c73){_0x4bf5a9=_0x1e5c73;}}return _0x4bf5a9;}exports['getQueueCampaignStatusMessage']=getQueueCampaignStatusMessage;function getQueueCampaignActiveStatusMessage(_0x9bc06c){var _0x3aa6f4=CAMPAIGN_STATUS[_0x299e('0x39')];if(_0x9bc06c[_0x299e('0x28')]===0x0&&_0x9bc06c[_0x299e('0x24')]===0x0&&_0x9bc06c['waiting']===0x0&&(_0x9bc06c[_0x299e('0x25')]||0x0)===0x0){_0x3aa6f4=CAMPAIGN_STATUS[_0x299e('0x38')];}return _0x3aa6f4;}exports[_0x299e('0x3c')]=getQueueCampaignActiveStatusMessage;function extractCalleridName(_0x4b9528){var _0x55d1cc=_0x4b9528[_0x299e('0x3d')](/"(.*?)"/);return _0x55d1cc?_0x55d1cc[0x1]:_0x4b9528;}exports[_0x299e('0x3e')]=extractCalleridName;function getCallerId(_0x147795,_0x17b9bb,_0x50c95e){if(!_['isUndefined'](_0x50c95e)&&typeof _0x50c95e===_0x299e('0x3f')&&!_[_0x299e('0x31')](_0x50c95e)){if(!_[_0x299e('0x40')](_0x17b9bb)&&typeof _0x17b9bb===_0x299e('0x3f')&&!_[_0x299e('0x31')](_0x17b9bb)){return util[_0x299e('0x41')](_0x299e('0x42'),_0x17b9bb,_0x50c95e);}return util[_0x299e('0x41')](_0x299e('0x42'),_0x50c95e,_0x50c95e);}if(!_[_0x299e('0x40')](_0x147795)&&typeof _0x147795===_0x299e('0x3f')&&!_[_0x299e('0x31')](_0x147795)){return _0x147795;}return _0x299e('0x43');}exports[_0x299e('0x44')]=getCallerId;function getCallerIdRandom(_0x417005,_0x281df9){var _0x214337;var _0x5648e2;var _0x4b5e68;if(_0x281df9<=0x0){_0x281df9=0x1;}_0x214337=new RegExp(_0x299e('0x45')+_0x281df9+'}$');_0x5648e2=Math[_0x299e('0x46')](0xa,_0x281df9-0x1);_0x4b5e68=Math['pow'](0xa,_0x281df9)-0x1;return util['format']('%s',_[_0x299e('0x47')](_0x417005,_0x214337,_['random'](_0x5648e2,_0x4b5e68)[_0x299e('0x48')]()));}exports['getCallerIdRandom']=getCallerIdRandom;function decrementOriginate(_0x4aeb53){if(_0x4aeb53[_0x299e('0x28')]&&_0x4aeb53['originated']>0x0){_0x4aeb53[_0x299e('0x28')]-=0x1;}else{logger['error']('[decrementOriginate]\x20queue\x20originate\x20value\x20is\x20negative');}}exports[_0x299e('0x49')]=decrementOriginate;function checkContactEmpty(_0x5bf5db){return _0x5bf5db&&_0x5bf5db[_0x299e('0x4a')]>0x0;}exports[_0x299e('0x4b')]=checkContactEmpty;function erlangb(_0x487d3d,_0x3c59bb){if(_0x3c59bb===0x0){return 0x0;}var _0xae3db7=0x1;for(var _0x8518d0=0x1;_0x8518d0<=_0x3c59bb;_0x8518d0+=0x1){_0xae3db7=0x1+_0xae3db7*_0x8518d0/_0x487d3d;}return 0x1/_0xae3db7;}exports[_0x299e('0x4c')]=erlangb;function checkContactLowerLimitOriginate(_0x2449ee,_0x2ebcde,_0x3651f4){if(_0x2ebcde>_0x3651f4){for(var _0x46f087=0x0;_0x46f087<_0x2ebcde-_0x3651f4;_0x46f087+=0x1){decrementOriginate(_0x2449ee);}}}exports[_0x299e('0x4d')]=checkContactLowerLimitOriginate;function setXMDContactVariables(_0xd9e557){var _0x14cd9c={};var _0x2f9fef=['id','createdAt',_0x299e('0x4e'),_0x299e('0x4f'),_0x299e('0x50')];if(_0xd9e557){for(var _0x7dbc39 in _0xd9e557){if(typeof _0xd9e557[_0x7dbc39]!==_0x299e('0x51')){if(!_['isNil'](_0xd9e557[_0x7dbc39])&&!_0x2f9fef[_0x299e('0x35')](_0x7dbc39)){_0x14cd9c[util[_0x299e('0x41')](_0x299e('0x52'),_0x299e('0x53'),_0x7dbc39['toUpperCase']())]=_0xd9e557[_0x7dbc39];}}}}return _0x14cd9c;}exports[_0x299e('0x54')]=setXMDContactVariables; \ No newline at end of file diff --git a/server/services/ami/fax/action.js b/server/services/ami/fax/action.js index 7e584cd..b52fb3b 100644 --- a/server/services/ami/fax/action.js +++ b/server/services/ami/fax/action.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xa9e0=['fax','localstationid','path','AttachmentId','exports','util','lodash','moment','channel','format','%s/%s/%s','tech','Trunk'];(function(_0x5da0d3,_0x1d946e){var _0x2a10c7=function(_0xa9b2e9){while(--_0xa9b2e9){_0x5da0d3['push'](_0x5da0d3['shift']());}};_0x2a10c7(++_0x1d946e);}(_0xa9e0,0x123));var _0x0a9e=function(_0x373dee,_0x1a8c45){_0x373dee=_0x373dee-0x0;var _0x46798f=_0xa9e0[_0x373dee];return _0x46798f;};'use strict';var util=require(_0x0a9e('0x0'));var _=require(_0x0a9e('0x1'));var moment=require(_0x0a9e('0x2'));function Action(_0x5dd881,_0x550fbc,_0x18d5c9){this['uniqueid']=_0x5dd881||undefined;this[_0x0a9e('0x3')]=util[_0x0a9e('0x4')](_0x0a9e('0x5'),_0x550fbc[_0x0a9e('0x6')],_0x550fbc[_0x0a9e('0x7')]['name'],_0x18d5c9[_0x0a9e('0x8')]);this[_0x0a9e('0x9')]=_0x550fbc[_0x0a9e('0x9')];this['headerinfo']=_0x550fbc['headerinfo'];this[_0x0a9e('0xa')]=_0x18d5c9['path'];this['AttachmentId']=_0x18d5c9[_0x0a9e('0xb')];}module[_0x0a9e('0xc')]=Action; \ No newline at end of file +var _0xa9e0=['fax','localstationid','path','AttachmentId','exports','util','lodash','moment','channel','format','%s/%s/%s','tech','Trunk'];(function(_0x2f183e,_0x1f720e){var _0x5dd8a3=function(_0x53c6ba){while(--_0x53c6ba){_0x2f183e['push'](_0x2f183e['shift']());}};_0x5dd8a3(++_0x1f720e);}(_0xa9e0,0x123));var _0x0a9e=function(_0x24237f,_0x4cf32c){_0x24237f=_0x24237f-0x0;var _0x48298e=_0xa9e0[_0x24237f];return _0x48298e;};'use strict';var util=require(_0x0a9e('0x0'));var _=require(_0x0a9e('0x1'));var moment=require(_0x0a9e('0x2'));function Action(_0x5dd881,_0x550fbc,_0x18d5c9){this['uniqueid']=_0x5dd881||undefined;this[_0x0a9e('0x3')]=util[_0x0a9e('0x4')](_0x0a9e('0x5'),_0x550fbc[_0x0a9e('0x6')],_0x550fbc[_0x0a9e('0x7')]['name'],_0x18d5c9[_0x0a9e('0x8')]);this[_0x0a9e('0x9')]=_0x550fbc[_0x0a9e('0x9')];this['headerinfo']=_0x550fbc['headerinfo'];this[_0x0a9e('0xa')]=_0x18d5c9['path'];this['AttachmentId']=_0x18d5c9[_0x0a9e('0xb')];}module[_0x0a9e('0xc')]=Action; \ No newline at end of file diff --git a/server/services/ami/fax/index.js b/server/services/ami/fax/index.js index e4e7598..634cfee 100644 --- a/server/services/ami/fax/index.js +++ b/server/services/ami/fax/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x19d1=['channelstate','channelstatedesc','operation','status','filename','\x20syncFaxStatus\x20','remotestationid','pagestransferred','transferrate','calleridnum','/var/opt/motion2/server/files/attachments/','\x20result\x20conversion\x20file\x20','message','create','parse','.pdf','application/pdf','then','notify','error','\x20notify\x20','stringify','catch','\x20receiveFax\x20','merge','pick','response','AttachmentId','update','SENDING\x20FAILED\x20','logger','[Fax][Message][Error][Updated]','[Fax][Message][Error][NoUpdate1]','[Fax][Message][Error][NoUpdate2]','updateStatus','[Fax][Message][Updated]','[Fax][Message][NoUpdate1]','finally','[Fax][Message][NoUpdate2]','faxpages','faxstatus','SENDING\x20FAILED:\x20','faxstatusstring','send','FaxAccountId','[Fax][execOriginate][success]','Fax\x20received','[Fax][execOriginate][failure]','Fax\x20failed','checkTrunk','isValid','Trunk\x20Reachable','format','gs\x20-q\x20-dNOPAUSE\x20-dBATCH\x20-sDEVICE=tiffg4\x20-sPAPERSIZE=letter\x20-sOutputFile=/var/opt/motion2/server/files/attachments/%s.tif\x20\x20%s\x20-c\x20quit','execute','dir','XMF-PATH','Convert\x20pdf\x20to\x20tif','Action','variablesAction','addVariables','isNil','active','SIP/%s','reachable','isTrunkReachable','[Fax][checkTrunk][Trunk\x20not\x20working\x20correctly]','\x20Trunk\x20is\x20not\x20active','Trunk\x20not\x20working\x20correctly','Empty\x20Fax','Empty\x20path','Is\x20Valid','exports','util','lodash','bluebird','uuid','path','tiff2pdf','./util/gs','../../../config/logger','fax','../ami','./rpcDb','./util/util','./action','../rpc/attachment','../rpc/faxMessage','faxAccounts','trunks','actions','newchannel','bind','newstate','syncNewState','syncNewExten','syncFaxStatus','receivefax','syncReceiveFax','hangup','syncHangup','originateresponse','syncOriginateResponse','prototype','from-voip-provider','hasOwnProperty','exten','localstationid','channels','uniqueid','name','info','\x20syncNewchannel\x20','syncVarSet','variable','value'];(function(_0x560655,_0x36df98){var _0x539dc1=function(_0x330f05){while(--_0x330f05){_0x560655['push'](_0x560655['shift']());}};_0x539dc1(++_0x36df98);}(_0x19d1,0x1a5));var _0x119d=function(_0x13ebed,_0x10db85){_0x13ebed=_0x13ebed-0x0;var _0x196aa7=_0x19d1[_0x13ebed];return _0x196aa7;};'use strict';var util=require(_0x119d('0x0'));var _=require(_0x119d('0x1'));var BPromise=require(_0x119d('0x2'));var uuid=require(_0x119d('0x3'));var moment=require('moment');var path=require(_0x119d('0x4'));var tiff2pdf=require(_0x119d('0x5'));var gs=require(_0x119d('0x6'));var logger=require(_0x119d('0x7'))(_0x119d('0x8'));var ami=require(_0x119d('0x9'));var rpcDb=require(_0x119d('0xa'));var Channel=require('./channel');var ut=require(_0x119d('0xb'));var Action=require(_0x119d('0xc'));var faxAccount=require('../rpc/faxAccount');var attachment=require(_0x119d('0xd'));var faxMessage=require(_0x119d('0xe'));function Fax(_0x20d8e2){this['channels']={};this[_0x119d('0xf')]=_0x20d8e2[_0x119d('0xf')];this[_0x119d('0x10')]=_0x20d8e2[_0x119d('0x10')];this[_0x119d('0x11')]={};ami['on'](_0x119d('0x12'),this['syncNewchannel'][_0x119d('0x13')](this));ami['on']('varset',this['syncVarSet'][_0x119d('0x13')](this));ami['on'](_0x119d('0x14'),this[_0x119d('0x15')][_0x119d('0x13')](this));ami['on']('newexten',this[_0x119d('0x16')]['bind'](this));ami['on']('faxstatus',this[_0x119d('0x17')][_0x119d('0x13')](this));ami['on'](_0x119d('0x18'),this[_0x119d('0x19')][_0x119d('0x13')](this));ami['on'](_0x119d('0x1a'),this[_0x119d('0x1b')][_0x119d('0x13')](this));ami['on'](_0x119d('0x1c'),this[_0x119d('0x1d')][_0x119d('0x13')](this));}Fax[_0x119d('0x1e')]['syncNewchannel']=function(_0x59b8c1){if(_0x59b8c1['context']===_0x119d('0x1f')){for(var _0x1e5ef8 in this[_0x119d('0xf')]){if(this[_0x119d('0xf')][_0x119d('0x20')](_0x1e5ef8)){if(_0x59b8c1[_0x119d('0x21')]===this['faxAccounts'][_0x1e5ef8][_0x119d('0x22')]){this[_0x119d('0x23')][_0x59b8c1[_0x119d('0x24')]]={};this['channels'][_0x59b8c1[_0x119d('0x24')]]['channel']=_0x59b8c1['channel'];this[_0x119d('0x23')][_0x59b8c1['uniqueid']]['id']=this[_0x119d('0xf')][_0x1e5ef8]['id'];this[_0x119d('0x23')][_0x59b8c1['uniqueid']][_0x119d('0x25')]=this['faxAccounts'][_0x1e5ef8][_0x119d('0x25')];logger[_0x119d('0x26')](_0x59b8c1[_0x119d('0x24')],_0x119d('0x27'));}}}}if(this['actions'][_0x59b8c1[_0x119d('0x24')]]){this[_0x119d('0x23')][_0x59b8c1[_0x119d('0x24')]]={};this[_0x119d('0x23')][_0x59b8c1[_0x119d('0x24')]]['channel']=_0x59b8c1['channel'];logger['info'](_0x59b8c1['uniqueid'],_0x119d('0x27'));}};Fax[_0x119d('0x1e')][_0x119d('0x28')]=function(_0x2d4db1){if(this[_0x119d('0x23')][_0x2d4db1[_0x119d('0x24')]]){for(var _0x2f5598 in _0x2d4db1['variable']){if(_0x2d4db1[_0x119d('0x29')]['hasOwnProperty'](_0x2f5598)){this[_0x119d('0x23')][_0x2d4db1[_0x119d('0x24')]][_0x2f5598]=_0x2d4db1[_0x119d('0x2a')];}}}};Fax[_0x119d('0x1e')]['syncNewState']=function(_0x36037a){if(this[_0x119d('0x23')][_0x36037a[_0x119d('0x24')]]){this[_0x119d('0x23')][_0x36037a[_0x119d('0x24')]][_0x119d('0x2b')]=_0x36037a[_0x119d('0x2b')];this[_0x119d('0x23')][_0x36037a[_0x119d('0x24')]][_0x119d('0x2c')]=_0x36037a[_0x119d('0x2c')];}};Fax[_0x119d('0x1e')][_0x119d('0x16')]=function(_0x207de1){if(this['channels'][_0x207de1['uniqueid']]){for(var _0x301fe7 in _0x207de1['variable']){if(_0x207de1['variable'][_0x119d('0x20')](_0x301fe7)){this[_0x119d('0x23')][_0x207de1['uniqueid']][_0x301fe7]=_0x207de1[_0x119d('0x2a')];}}}};Fax[_0x119d('0x1e')][_0x119d('0x17')]=function(_0xaafe8){if(this[_0x119d('0x23')][_0xaafe8[_0x119d('0x24')]]){this['channels'][_0xaafe8['uniqueid']][_0x119d('0x2d')]=_0xaafe8['operation'];this['channels'][_0xaafe8[_0x119d('0x24')]][_0x119d('0x2e')]=_0xaafe8[_0x119d('0x2e')];this[_0x119d('0x23')][_0xaafe8['uniqueid']][_0x119d('0x22')]=_0xaafe8[_0x119d('0x22')];this[_0x119d('0x23')][_0xaafe8[_0x119d('0x24')]][_0x119d('0x2f')]=_0xaafe8[_0x119d('0x2f')];logger[_0x119d('0x26')](_0xaafe8['uniqueid'],_0x119d('0x30'));}};Fax[_0x119d('0x1e')]['syncReceiveFax']=function(_0x15d0a8){var _0x508adb=this;if(this[_0x119d('0x23')][_0x15d0a8[_0x119d('0x24')]]){var _0x4e5a3d=this[_0x119d('0x23')][_0x15d0a8[_0x119d('0x24')]]['id'];this[_0x119d('0x23')][_0x15d0a8[_0x119d('0x24')]][_0x119d('0x31')]=_0x15d0a8[_0x119d('0x31')];this[_0x119d('0x23')][_0x15d0a8[_0x119d('0x24')]][_0x119d('0x32')]=_0x15d0a8['pagestransferred'];this['channels'][_0x15d0a8['uniqueid']][_0x119d('0x22')]=_0x15d0a8[_0x119d('0x22')];this[_0x119d('0x23')][_0x15d0a8[_0x119d('0x24')]]['resolution']=_0x15d0a8['resolution'];this[_0x119d('0x23')][_0x15d0a8['uniqueid']][_0x119d('0x33')]=_0x15d0a8[_0x119d('0x33')];this[_0x119d('0x23')][_0x15d0a8[_0x119d('0x24')]]['filename']=_0x15d0a8[_0x119d('0x2f')];this[_0x119d('0x23')][_0x15d0a8[_0x119d('0x24')]][_0x119d('0x34')]=_0x15d0a8[_0x119d('0x34')];if(this['channels'][_0x15d0a8[_0x119d('0x24')]][_0x119d('0x32')]>0x0){tiff2pdf(_0x15d0a8[_0x119d('0x2f')],_0x119d('0x35'),function(_0x59d347){logger[_0x119d('0x26')](_0x15d0a8[_0x119d('0x24')],_0x119d('0x36'),_0x59d347[_0x119d('0x37')]);attachment[_0x119d('0x38')]({'name':path[_0x119d('0x39')](_0x15d0a8['filename'])['name'],'basename':path['parse'](_0x15d0a8['filename'])['name']+_0x119d('0x3a'),'type':_0x119d('0x3b')})[_0x119d('0x3c')](function(_0x14f8f6){faxAccount[_0x119d('0x3d')](_0x4e5a3d,{'from':_0x15d0a8[_0x119d('0x34')],'mapKey':'fax','body':path['parse'](_0x15d0a8[_0x119d('0x2f')])[_0x119d('0x25')]+_0x119d('0x3a'),'AttachmentId':_0x14f8f6['id']})['catch'](function(_0x49a70b){logger[_0x119d('0x3e')](_0x15d0a8[_0x119d('0x24')],_0x119d('0x3f'),JSON[_0x119d('0x40')](_0x49a70b));});})[_0x119d('0x41')](function(_0x486548){logger[_0x119d('0x3e')](_0x15d0a8[_0x119d('0x24')],'\x20receiveFax\x20',JSON[_0x119d('0x40')](_0x486548));});});}logger[_0x119d('0x26')](_0x15d0a8[_0x119d('0x24')],_0x119d('0x42'));}};Fax[_0x119d('0x1e')]['syncOriginateResponse']=function(_0x15ef59){if(this['actions'][_0x15ef59[_0x119d('0x24')]]){_[_0x119d('0x43')](this['channels'][_0x15ef59[_0x119d('0x24')]],_[_0x119d('0x44')](_0x15ef59,[_0x119d('0x45'),'reason']));}};function updateStatus(_0x2bf8f9){if(_0x2bf8f9[_0x119d('0x46')]){faxMessage[_0x119d('0x47')](_0x2bf8f9[_0x119d('0x46')],{'failMessage':_0x119d('0x48')})[_0x119d('0x3c')](function(_0x1743a0){ut[_0x119d('0x49')](_0x119d('0x4a'),_0x1743a0);})['catch'](function(_0x5ef959){ut[_0x119d('0x49')](_0x119d('0x4b'),_0x5ef959);});}else{ut[_0x119d('0x49')](_0x119d('0x4c'));}}Fax[_0x119d('0x1e')][_0x119d('0x4d')]=function(_0x4a2ed0,_0x5d99ed,_0xca84b2){var _0x6beef5=this;var _0x45dd52={};if(_0x5d99ed){_0x45dd52={'read':_0x5d99ed};}else{_0x45dd52={'failMessage':_0xca84b2};}if(this['actions'][_0x4a2ed0][_0x119d('0x46')]){faxMessage['update'](this[_0x119d('0x11')][_0x4a2ed0][_0x119d('0x46')],_0x45dd52)['then'](function(_0x134fc2){ut['logger'](_0x119d('0x4e'),_0x134fc2);})[_0x119d('0x41')](function(_0x31b35c){ut[_0x119d('0x49')](_0x119d('0x4f'),_0x31b35c);})[_0x119d('0x50')](function(){delete _0x6beef5[_0x119d('0x23')][_0x4a2ed0];delete _0x6beef5['actions'][_0x4a2ed0];});}else{ut[_0x119d('0x49')](_0x119d('0x51'));delete this[_0x119d('0x23')][_0x4a2ed0];delete this['actions'][_0x4a2ed0];}};Fax[_0x119d('0x1e')][_0x119d('0x1b')]=function(_0x227728){var _0x2597c4=this;if(this['channels'][_0x227728[_0x119d('0x24')]]){if(this[_0x119d('0x11')][_0x227728[_0x119d('0x24')]]){this[_0x119d('0x23')][_0x227728[_0x119d('0x24')]]['id']=this['actions'][_0x227728[_0x119d('0x24')]]['id'];this[_0x119d('0x23')][_0x227728[_0x119d('0x24')]][_0x119d('0x25')]=this[_0x119d('0x11')][_0x227728[_0x119d('0x24')]][_0x119d('0x25')];}logger[_0x119d('0x26')](_0x227728[_0x119d('0x24')],this[_0x119d('0x11')][_0x227728['uniqueid']]?'\x20hangup\x20sendFile\x20':'\x20hangup\x20faxRiceive\x20',JSON[_0x119d('0x40')](this['channels'][_0x227728[_0x119d('0x24')]]));if(this[_0x119d('0x11')][_0x227728[_0x119d('0x24')]]){if(this[_0x119d('0x23')][_0x227728[_0x119d('0x24')]][_0x119d('0x52')]>0x0&&this[_0x119d('0x23')][_0x227728['uniqueid']][_0x119d('0x53')]==='SUCCESS'){this[_0x119d('0x4d')](_0x227728[_0x119d('0x24')],!![]);}else{this[_0x119d('0x4d')](_0x227728[_0x119d('0x24')],![],this[_0x119d('0x23')][_0x227728[_0x119d('0x24')]]['faxstatusstring']?_0x119d('0x54')+this[_0x119d('0x23')][_0x227728[_0x119d('0x24')]][_0x119d('0x55')]:'SENDING\x20FAILED');}}}};Fax[_0x119d('0x1e')][_0x119d('0x56')]=function(_0xe30ad1){var _0xbfbc59=this;return new BPromise(function(_0x3881a1,_0x2e2877){_0xbfbc59['execOriginate'](_0xe30ad1,_0xbfbc59[_0x119d('0xf')][_0xe30ad1[_0x119d('0x57')]])[_0x119d('0x3c')](function(_0x284399){ut[_0x119d('0x49')](_0x119d('0x58'),_0x284399);_0x3881a1(ut[_0x119d('0x37')](_0x119d('0x59')));})['catch'](function(_0x3244e5){ut['logger'](_0x119d('0x5a'),_0x3244e5);updateStatus(_0xe30ad1);_0x2e2877(ut['message'](_0x119d('0x5b')));});});};Fax[_0x119d('0x1e')]['checkAfterSend']=function(_0x2c138e){var _0xf8d750=this;return new BPromise(function(_0x14ce78,_0x3b84f9){var _0x2c1b63=_0xf8d750[_0x119d('0x5c')](_0xf8d750[_0x119d('0xf')][_0x2c138e['FaxAccountId']]['Trunk'],_0x2c138e);if(_0x2c1b63[_0x119d('0x5d')]){_0x14ce78(ut['message'](_0x119d('0x5e')));}else{_0x3b84f9(ut[_0x119d('0x37')](_0x2c1b63[_0x119d('0x37')]));}});};function originate(_0x24d744,_0x32d6f7,_0x12d3ee){return new BPromise(function(_0x67095b,_0x1de754){if(_0x12d3ee){var _0x1242c6=util[_0x119d('0x5f')](_0x119d('0x60'),path[_0x119d('0x39')](_0x24d744[_0x119d('0x4')])[_0x119d('0x25')],_0x24d744[_0x119d('0x4')]);gs[_0x119d('0x61')](_0x1242c6)[_0x119d('0x3c')](function(){_0x24d744[_0x119d('0x4')]=util['format']('%s/%s.tif',path[_0x119d('0x39')](_0x24d744[_0x119d('0x4')])[_0x119d('0x62')],path[_0x119d('0x39')](_0x24d744[_0x119d('0x4')])[_0x119d('0x25')]);_0x32d6f7[_0x119d('0x63')]=_0x24d744['path'];ut[_0x119d('0x49')](_0x119d('0x64'),'');ami[_0x119d('0x65')](ut[_0x119d('0x66')](_0x24d744,_0x32d6f7))[_0x119d('0x3c')](function(_0x264be6){_0x67095b(_0x264be6);})[_0x119d('0x41')](function(_0x3e1987){_0x1de754(_0x3e1987);});})[_0x119d('0x41')](function(_0x908f26){_0x1de754(_0x908f26);});}else{ami[_0x119d('0x65')](ut[_0x119d('0x66')](_0x24d744,_0x32d6f7))['then'](function(_0x29b214){_0x67095b(_0x29b214);})[_0x119d('0x41')](function(_0x4c2e9d){_0x1de754(_0x4c2e9d);});}});}Fax[_0x119d('0x1e')]['execOriginate']=function(_0x58180e,_0x20175){var _0xd49ffa=this;return new BPromise(function(_0x56d808,_0x9d4465){var _0x3add1a=uuid['v4']();var _0x3d9002=ut[_0x119d('0x67')](_0x58180e,_0x20175);_0xd49ffa[_0x119d('0x11')][_0x3add1a]=new Action(_0x3add1a,_0x20175,_0x58180e);var _0x5b5cec=_0xd49ffa[_0x119d('0x11')][_0x3add1a];if(path[_0x119d('0x39')](_0x58180e[_0x119d('0x4')])['ext']===_0x119d('0x3a')){originate(_0x5b5cec,_0x3d9002,!![])[_0x119d('0x3c')](function(_0x2ba7b5){_0x56d808(_0x2ba7b5);})[_0x119d('0x41')](function(_0x3f27c4){_0x9d4465(_0x3f27c4);});}else{originate(_0x5b5cec,_0x3d9002,![])['then'](function(_0x4a14b7){_0x56d808(_0x4a14b7);})['catch'](function(_0x363391){_0x9d4465(_0x363391);});}});};Fax[_0x119d('0x1e')]['isTrunkReachable']=function(_0xcb879f){return!_[_0x119d('0x68')](_0xcb879f)&&!_[_0x119d('0x68')](_0xcb879f[_0x119d('0x25')])&&!_[_0x119d('0x68')](_0xcb879f[_0x119d('0x69')])&&_0xcb879f['active']&&!_[_0x119d('0x68')](this['trunks'][util[_0x119d('0x5f')](_0x119d('0x6a'),_0xcb879f['name'])])&&!_[_0x119d('0x68')](this[_0x119d('0x10')][util[_0x119d('0x5f')]('SIP/%s',_0xcb879f[_0x119d('0x25')])]['status'])&&(this[_0x119d('0x10')][util[_0x119d('0x5f')]('SIP/%s',_0xcb879f[_0x119d('0x25')])][_0x119d('0x2e')]===_0x119d('0x6b')||this['trunks'][util[_0x119d('0x5f')](_0x119d('0x6a'),_0xcb879f['name'])][_0x119d('0x2e')]==='unmonitored');};Fax[_0x119d('0x1e')][_0x119d('0x5c')]=function(_0x522f26,_0x1855f2){if(!this[_0x119d('0x6c')](_0x522f26)){ut['logger'](_0x119d('0x6d'),_[_0x119d('0x68')](_0x522f26)?'':_0x522f26[_0x119d('0x25')]+_0x119d('0x6e'));return{'isValid':![],'message':_0x119d('0x6f')};}if(_[_0x119d('0x68')](_0x1855f2[_0x119d('0x8')])){ut['logger']('[Fax][checkTrunk][Empty\x20Fax]',JSON[_0x119d('0x40')](_0x1855f2));return{'isValid':![],'message':_0x119d('0x70')};}if(_[_0x119d('0x68')](_0x1855f2[_0x119d('0x4')])){ut['logger']('[Fax][checkTrunk][Empty\x20path]',JSON[_0x119d('0x40')](_0x1855f2));return{'isValid':![],'message':_0x119d('0x71')};}return{'isValid':!![],'message':_0x119d('0x72')};};module[_0x119d('0x73')]=Fax; \ No newline at end of file +var _0x3e62=['ext','isTrunkReachable','isNil','active','SIP/%s','reachable','\x20Trunk\x20is\x20not\x20active','Trunk\x20not\x20working\x20correctly','[Fax][checkTrunk][Empty\x20Fax]','Empty\x20Fax','Empty\x20path','Is\x20Valid','exports','util','bluebird','uuid','moment','tiff2pdf','./util/gs','../../../config/logger','fax','../ami','./rpcDb','../rpc/faxAccount','../rpc/attachment','../rpc/faxMessage','faxAccounts','trunks','newchannel','syncNewchannel','bind','varset','syncVarSet','newstate','syncNewState','newexten','syncNewExten','faxstatus','syncFaxStatus','receivefax','hangup','syncHangup','originateresponse','syncOriginateResponse','prototype','context','hasOwnProperty','localstationid','uniqueid','channels','channel','info','\x20syncNewchannel\x20','actions','variable','channelstatedesc','value','operation','status','filename','\x20syncFaxStatus\x20','syncReceiveFax','remotestationid','pagestransferred','resolution','transferrate','calleridnum','/var/opt/motion2/server/files/attachments/','message','name','parse','.pdf','application/pdf','notify','catch','error','\x20notify\x20','stringify','\x20receiveFax\x20','merge','pick','response','reason','AttachmentId','update','then','[Fax][Message][Error][Updated]','logger','[Fax][Message][Error][NoUpdate1]','[Fax][Message][Error][NoUpdate2]','updateStatus','[Fax][Message][Updated]','[Fax][Message][NoUpdate1]','finally','[Fax][Message][NoUpdate2]','\x20hangup\x20sendFile\x20','\x20hangup\x20faxRiceive\x20','faxpages','SUCCESS','faxstatusstring','SENDING\x20FAILED:\x20','SENDING\x20FAILED','send','execOriginate','FaxAccountId','Fax\x20received','[Fax][execOriginate][failure]','Fax\x20failed','checkAfterSend','checkTrunk','Trunk','isValid','Trunk\x20Reachable','gs\x20-q\x20-dNOPAUSE\x20-dBATCH\x20-sDEVICE=tiffg4\x20-sPAPERSIZE=letter\x20-sOutputFile=/var/opt/motion2/server/files/attachments/%s.tif\x20\x20%s\x20-c\x20quit','path','execute','format','%s/%s.tif','dir','Convert\x20pdf\x20to\x20tif','Action','variablesAction','addVariables'];(function(_0x13e447,_0x182089){var _0x5aa6e4=function(_0x53304b){while(--_0x53304b){_0x13e447['push'](_0x13e447['shift']());}};_0x5aa6e4(++_0x182089);}(_0x3e62,0x17e));var _0x23e6=function(_0x2e50ab,_0x3929fb){_0x2e50ab=_0x2e50ab-0x0;var _0x5e09ac=_0x3e62[_0x2e50ab];return _0x5e09ac;};'use strict';var util=require(_0x23e6('0x0'));var _=require('lodash');var BPromise=require(_0x23e6('0x1'));var uuid=require(_0x23e6('0x2'));var moment=require(_0x23e6('0x3'));var path=require('path');var tiff2pdf=require(_0x23e6('0x4'));var gs=require(_0x23e6('0x5'));var logger=require(_0x23e6('0x6'))(_0x23e6('0x7'));var ami=require(_0x23e6('0x8'));var rpcDb=require(_0x23e6('0x9'));var Channel=require('./channel');var ut=require('./util/util');var Action=require('./action');var faxAccount=require(_0x23e6('0xa'));var attachment=require(_0x23e6('0xb'));var faxMessage=require(_0x23e6('0xc'));function Fax(_0x585b17){this['channels']={};this[_0x23e6('0xd')]=_0x585b17[_0x23e6('0xd')];this[_0x23e6('0xe')]=_0x585b17['trunks'];this['actions']={};ami['on'](_0x23e6('0xf'),this[_0x23e6('0x10')][_0x23e6('0x11')](this));ami['on'](_0x23e6('0x12'),this[_0x23e6('0x13')][_0x23e6('0x11')](this));ami['on'](_0x23e6('0x14'),this[_0x23e6('0x15')][_0x23e6('0x11')](this));ami['on'](_0x23e6('0x16'),this[_0x23e6('0x17')]['bind'](this));ami['on'](_0x23e6('0x18'),this[_0x23e6('0x19')][_0x23e6('0x11')](this));ami['on'](_0x23e6('0x1a'),this['syncReceiveFax']['bind'](this));ami['on'](_0x23e6('0x1b'),this[_0x23e6('0x1c')][_0x23e6('0x11')](this));ami['on'](_0x23e6('0x1d'),this[_0x23e6('0x1e')][_0x23e6('0x11')](this));}Fax[_0x23e6('0x1f')]['syncNewchannel']=function(_0x4daeec){if(_0x4daeec[_0x23e6('0x20')]==='from-voip-provider'){for(var _0x263784 in this[_0x23e6('0xd')]){if(this[_0x23e6('0xd')][_0x23e6('0x21')](_0x263784)){if(_0x4daeec['exten']===this[_0x23e6('0xd')][_0x263784][_0x23e6('0x22')]){this['channels'][_0x4daeec[_0x23e6('0x23')]]={};this[_0x23e6('0x24')][_0x4daeec[_0x23e6('0x23')]][_0x23e6('0x25')]=_0x4daeec[_0x23e6('0x25')];this[_0x23e6('0x24')][_0x4daeec[_0x23e6('0x23')]]['id']=this[_0x23e6('0xd')][_0x263784]['id'];this[_0x23e6('0x24')][_0x4daeec[_0x23e6('0x23')]]['name']=this[_0x23e6('0xd')][_0x263784]['name'];logger[_0x23e6('0x26')](_0x4daeec['uniqueid'],_0x23e6('0x27'));}}}}if(this[_0x23e6('0x28')][_0x4daeec[_0x23e6('0x23')]]){this[_0x23e6('0x24')][_0x4daeec[_0x23e6('0x23')]]={};this[_0x23e6('0x24')][_0x4daeec[_0x23e6('0x23')]][_0x23e6('0x25')]=_0x4daeec[_0x23e6('0x25')];logger[_0x23e6('0x26')](_0x4daeec[_0x23e6('0x23')],_0x23e6('0x27'));}};Fax[_0x23e6('0x1f')][_0x23e6('0x13')]=function(_0x3f563c){if(this[_0x23e6('0x24')][_0x3f563c[_0x23e6('0x23')]]){for(var _0x28bfd7 in _0x3f563c[_0x23e6('0x29')]){if(_0x3f563c[_0x23e6('0x29')]['hasOwnProperty'](_0x28bfd7)){this['channels'][_0x3f563c[_0x23e6('0x23')]][_0x28bfd7]=_0x3f563c['value'];}}}};Fax['prototype'][_0x23e6('0x15')]=function(_0x10f6c5){if(this[_0x23e6('0x24')][_0x10f6c5['uniqueid']]){this['channels'][_0x10f6c5[_0x23e6('0x23')]]['channelstate']=_0x10f6c5['channelstate'];this[_0x23e6('0x24')][_0x10f6c5['uniqueid']][_0x23e6('0x2a')]=_0x10f6c5['channelstatedesc'];}};Fax[_0x23e6('0x1f')]['syncNewExten']=function(_0x571273){if(this[_0x23e6('0x24')][_0x571273[_0x23e6('0x23')]]){for(var _0x574b1e in _0x571273['variable']){if(_0x571273[_0x23e6('0x29')][_0x23e6('0x21')](_0x574b1e)){this[_0x23e6('0x24')][_0x571273[_0x23e6('0x23')]][_0x574b1e]=_0x571273[_0x23e6('0x2b')];}}}};Fax[_0x23e6('0x1f')][_0x23e6('0x19')]=function(_0x3ecf4f){if(this['channels'][_0x3ecf4f['uniqueid']]){this[_0x23e6('0x24')][_0x3ecf4f[_0x23e6('0x23')]][_0x23e6('0x2c')]=_0x3ecf4f[_0x23e6('0x2c')];this[_0x23e6('0x24')][_0x3ecf4f['uniqueid']][_0x23e6('0x2d')]=_0x3ecf4f[_0x23e6('0x2d')];this['channels'][_0x3ecf4f[_0x23e6('0x23')]][_0x23e6('0x22')]=_0x3ecf4f[_0x23e6('0x22')];this[_0x23e6('0x24')][_0x3ecf4f[_0x23e6('0x23')]]['filename']=_0x3ecf4f[_0x23e6('0x2e')];logger[_0x23e6('0x26')](_0x3ecf4f[_0x23e6('0x23')],_0x23e6('0x2f'));}};Fax[_0x23e6('0x1f')][_0x23e6('0x30')]=function(_0x5a1fb1){var _0x4e7645=this;if(this[_0x23e6('0x24')][_0x5a1fb1['uniqueid']]){var _0x3b1e66=this['channels'][_0x5a1fb1[_0x23e6('0x23')]]['id'];this[_0x23e6('0x24')][_0x5a1fb1[_0x23e6('0x23')]][_0x23e6('0x31')]=_0x5a1fb1[_0x23e6('0x31')];this['channels'][_0x5a1fb1[_0x23e6('0x23')]]['pagestransferred']=_0x5a1fb1[_0x23e6('0x32')];this[_0x23e6('0x24')][_0x5a1fb1[_0x23e6('0x23')]][_0x23e6('0x22')]=_0x5a1fb1[_0x23e6('0x22')];this[_0x23e6('0x24')][_0x5a1fb1['uniqueid']][_0x23e6('0x33')]=_0x5a1fb1[_0x23e6('0x33')];this[_0x23e6('0x24')][_0x5a1fb1[_0x23e6('0x23')]][_0x23e6('0x34')]=_0x5a1fb1[_0x23e6('0x34')];this['channels'][_0x5a1fb1[_0x23e6('0x23')]][_0x23e6('0x2e')]=_0x5a1fb1['filename'];this[_0x23e6('0x24')][_0x5a1fb1[_0x23e6('0x23')]]['calleridnum']=_0x5a1fb1[_0x23e6('0x35')];if(this['channels'][_0x5a1fb1[_0x23e6('0x23')]][_0x23e6('0x32')]>0x0){tiff2pdf(_0x5a1fb1[_0x23e6('0x2e')],_0x23e6('0x36'),function(_0x2f648a){logger['info'](_0x5a1fb1[_0x23e6('0x23')],'\x20result\x20conversion\x20file\x20',_0x2f648a[_0x23e6('0x37')]);attachment['create']({'name':path['parse'](_0x5a1fb1['filename'])[_0x23e6('0x38')],'basename':path[_0x23e6('0x39')](_0x5a1fb1[_0x23e6('0x2e')])[_0x23e6('0x38')]+_0x23e6('0x3a'),'type':_0x23e6('0x3b')})['then'](function(_0x39f50f){faxAccount[_0x23e6('0x3c')](_0x3b1e66,{'from':_0x5a1fb1[_0x23e6('0x35')],'mapKey':_0x23e6('0x7'),'body':path[_0x23e6('0x39')](_0x5a1fb1['filename'])[_0x23e6('0x38')]+_0x23e6('0x3a'),'AttachmentId':_0x39f50f['id']})[_0x23e6('0x3d')](function(_0x1c6c33){logger[_0x23e6('0x3e')](_0x5a1fb1[_0x23e6('0x23')],_0x23e6('0x3f'),JSON[_0x23e6('0x40')](_0x1c6c33));});})['catch'](function(_0x201ebd){logger['error'](_0x5a1fb1['uniqueid'],'\x20receiveFax\x20',JSON[_0x23e6('0x40')](_0x201ebd));});});}logger['info'](_0x5a1fb1[_0x23e6('0x23')],_0x23e6('0x41'));}};Fax[_0x23e6('0x1f')][_0x23e6('0x1e')]=function(_0x566e02){if(this['actions'][_0x566e02[_0x23e6('0x23')]]){_[_0x23e6('0x42')](this[_0x23e6('0x24')][_0x566e02[_0x23e6('0x23')]],_[_0x23e6('0x43')](_0x566e02,[_0x23e6('0x44'),_0x23e6('0x45')]));}};function updateStatus(_0x44b8df){if(_0x44b8df[_0x23e6('0x46')]){faxMessage[_0x23e6('0x47')](_0x44b8df['AttachmentId'],{'failMessage':'SENDING\x20FAILED\x20'})[_0x23e6('0x48')](function(_0x19d358){ut['logger'](_0x23e6('0x49'),_0x19d358);})[_0x23e6('0x3d')](function(_0x2676fa){ut[_0x23e6('0x4a')](_0x23e6('0x4b'),_0x2676fa);});}else{ut[_0x23e6('0x4a')](_0x23e6('0x4c'));}}Fax[_0x23e6('0x1f')][_0x23e6('0x4d')]=function(_0xed4403,_0x346fd1,_0x5032e9){var _0x5cb70f=this;var _0xdce225={};if(_0x346fd1){_0xdce225={'read':_0x346fd1};}else{_0xdce225={'failMessage':_0x5032e9};}if(this[_0x23e6('0x28')][_0xed4403][_0x23e6('0x46')]){faxMessage[_0x23e6('0x47')](this[_0x23e6('0x28')][_0xed4403]['AttachmentId'],_0xdce225)[_0x23e6('0x48')](function(_0xa206c){ut['logger'](_0x23e6('0x4e'),_0xa206c);})[_0x23e6('0x3d')](function(_0x1276c8){ut[_0x23e6('0x4a')](_0x23e6('0x4f'),_0x1276c8);})[_0x23e6('0x50')](function(){delete _0x5cb70f[_0x23e6('0x24')][_0xed4403];delete _0x5cb70f[_0x23e6('0x28')][_0xed4403];});}else{ut['logger'](_0x23e6('0x51'));delete this['channels'][_0xed4403];delete this[_0x23e6('0x28')][_0xed4403];}};Fax[_0x23e6('0x1f')][_0x23e6('0x1c')]=function(_0x26523e){var _0x50170f=this;if(this[_0x23e6('0x24')][_0x26523e['uniqueid']]){if(this['actions'][_0x26523e[_0x23e6('0x23')]]){this['channels'][_0x26523e['uniqueid']]['id']=this[_0x23e6('0x28')][_0x26523e[_0x23e6('0x23')]]['id'];this['channels'][_0x26523e['uniqueid']][_0x23e6('0x38')]=this['actions'][_0x26523e[_0x23e6('0x23')]]['name'];}logger[_0x23e6('0x26')](_0x26523e[_0x23e6('0x23')],this[_0x23e6('0x28')][_0x26523e[_0x23e6('0x23')]]?_0x23e6('0x52'):_0x23e6('0x53'),JSON[_0x23e6('0x40')](this['channels'][_0x26523e[_0x23e6('0x23')]]));if(this[_0x23e6('0x28')][_0x26523e[_0x23e6('0x23')]]){if(this[_0x23e6('0x24')][_0x26523e['uniqueid']][_0x23e6('0x54')]>0x0&&this[_0x23e6('0x24')][_0x26523e['uniqueid']][_0x23e6('0x18')]===_0x23e6('0x55')){this[_0x23e6('0x4d')](_0x26523e[_0x23e6('0x23')],!![]);}else{this['updateStatus'](_0x26523e[_0x23e6('0x23')],![],this[_0x23e6('0x24')][_0x26523e[_0x23e6('0x23')]][_0x23e6('0x56')]?_0x23e6('0x57')+this['channels'][_0x26523e[_0x23e6('0x23')]][_0x23e6('0x56')]:_0x23e6('0x58'));}}}};Fax[_0x23e6('0x1f')][_0x23e6('0x59')]=function(_0xb544b3){var _0x5355c6=this;return new BPromise(function(_0x5cd024,_0xf01eb6){_0x5355c6[_0x23e6('0x5a')](_0xb544b3,_0x5355c6[_0x23e6('0xd')][_0xb544b3[_0x23e6('0x5b')]])[_0x23e6('0x48')](function(_0x4eb56d){ut['logger']('[Fax][execOriginate][success]',_0x4eb56d);_0x5cd024(ut[_0x23e6('0x37')](_0x23e6('0x5c')));})[_0x23e6('0x3d')](function(_0x13f98d){ut['logger'](_0x23e6('0x5d'),_0x13f98d);updateStatus(_0xb544b3);_0xf01eb6(ut[_0x23e6('0x37')](_0x23e6('0x5e')));});});};Fax[_0x23e6('0x1f')][_0x23e6('0x5f')]=function(_0xc2a499){var _0x8f918=this;return new BPromise(function(_0x189390,_0x3d44a9){var _0x48594b=_0x8f918[_0x23e6('0x60')](_0x8f918[_0x23e6('0xd')][_0xc2a499[_0x23e6('0x5b')]][_0x23e6('0x61')],_0xc2a499);if(_0x48594b[_0x23e6('0x62')]){_0x189390(ut[_0x23e6('0x37')](_0x23e6('0x63')));}else{_0x3d44a9(ut[_0x23e6('0x37')](_0x48594b[_0x23e6('0x37')]));}});};function originate(_0x57bba5,_0x429de7,_0x527eab){return new BPromise(function(_0x511904,_0x277b43){if(_0x527eab){var _0x386a5c=util['format'](_0x23e6('0x64'),path['parse'](_0x57bba5[_0x23e6('0x65')])['name'],_0x57bba5[_0x23e6('0x65')]);gs[_0x23e6('0x66')](_0x386a5c)[_0x23e6('0x48')](function(){_0x57bba5[_0x23e6('0x65')]=util[_0x23e6('0x67')](_0x23e6('0x68'),path[_0x23e6('0x39')](_0x57bba5['path'])[_0x23e6('0x69')],path[_0x23e6('0x39')](_0x57bba5[_0x23e6('0x65')])[_0x23e6('0x38')]);_0x429de7['XMF-PATH']=_0x57bba5['path'];ut[_0x23e6('0x4a')](_0x23e6('0x6a'),'');ami[_0x23e6('0x6b')](ut[_0x23e6('0x6c')](_0x57bba5,_0x429de7))[_0x23e6('0x48')](function(_0x281c5f){_0x511904(_0x281c5f);})[_0x23e6('0x3d')](function(_0x86cc18){_0x277b43(_0x86cc18);});})[_0x23e6('0x3d')](function(_0x4d1f35){_0x277b43(_0x4d1f35);});}else{ami['Action'](ut['variablesAction'](_0x57bba5,_0x429de7))['then'](function(_0x272c95){_0x511904(_0x272c95);})[_0x23e6('0x3d')](function(_0x5cd6ca){_0x277b43(_0x5cd6ca);});}});}Fax['prototype'][_0x23e6('0x5a')]=function(_0x15d737,_0x4c5554){var _0x543926=this;return new BPromise(function(_0x4ec3a6,_0x298c2d){var _0x490b75=uuid['v4']();var _0x5e0934=ut[_0x23e6('0x6d')](_0x15d737,_0x4c5554);_0x543926[_0x23e6('0x28')][_0x490b75]=new Action(_0x490b75,_0x4c5554,_0x15d737);var _0x4dba80=_0x543926[_0x23e6('0x28')][_0x490b75];if(path['parse'](_0x15d737[_0x23e6('0x65')])[_0x23e6('0x6e')]===_0x23e6('0x3a')){originate(_0x4dba80,_0x5e0934,!![])[_0x23e6('0x48')](function(_0x2b697e){_0x4ec3a6(_0x2b697e);})[_0x23e6('0x3d')](function(_0x49c9da){_0x298c2d(_0x49c9da);});}else{originate(_0x4dba80,_0x5e0934,![])[_0x23e6('0x48')](function(_0x5b7f06){_0x4ec3a6(_0x5b7f06);})['catch'](function(_0x1f907f){_0x298c2d(_0x1f907f);});}});};Fax[_0x23e6('0x1f')][_0x23e6('0x6f')]=function(_0x4ae843){return!_['isNil'](_0x4ae843)&&!_[_0x23e6('0x70')](_0x4ae843['name'])&&!_['isNil'](_0x4ae843[_0x23e6('0x71')])&&_0x4ae843[_0x23e6('0x71')]&&!_[_0x23e6('0x70')](this['trunks'][util[_0x23e6('0x67')](_0x23e6('0x72'),_0x4ae843[_0x23e6('0x38')])])&&!_[_0x23e6('0x70')](this['trunks'][util[_0x23e6('0x67')]('SIP/%s',_0x4ae843[_0x23e6('0x38')])][_0x23e6('0x2d')])&&(this[_0x23e6('0xe')][util[_0x23e6('0x67')]('SIP/%s',_0x4ae843[_0x23e6('0x38')])]['status']===_0x23e6('0x73')||this[_0x23e6('0xe')][util[_0x23e6('0x67')](_0x23e6('0x72'),_0x4ae843[_0x23e6('0x38')])][_0x23e6('0x2d')]==='unmonitored');};Fax['prototype'][_0x23e6('0x60')]=function(_0x35124c,_0x52cb3c){if(!this[_0x23e6('0x6f')](_0x35124c)){ut['logger']('[Fax][checkTrunk][Trunk\x20not\x20working\x20correctly]',_[_0x23e6('0x70')](_0x35124c)?'':_0x35124c[_0x23e6('0x38')]+_0x23e6('0x74'));return{'isValid':![],'message':_0x23e6('0x75')};}if(_[_0x23e6('0x70')](_0x52cb3c[_0x23e6('0x7')])){ut[_0x23e6('0x4a')](_0x23e6('0x76'),JSON['stringify'](_0x52cb3c));return{'isValid':![],'message':_0x23e6('0x77')};}if(_[_0x23e6('0x70')](_0x52cb3c[_0x23e6('0x65')])){ut[_0x23e6('0x4a')]('[Fax][checkTrunk][Empty\x20path]',JSON[_0x23e6('0x40')](_0x52cb3c));return{'isValid':![],'message':_0x23e6('0x78')};}return{'isValid':!![],'message':_0x23e6('0x79')};};module[_0x23e6('0x7a')]=Fax; \ No newline at end of file diff --git a/server/services/ami/fax/rpcDb.js b/server/services/ami/fax/rpcDb.js index 53c25e5..883caad 100644 --- a/server/services/ami/fax/rpcDb.js +++ b/server/services/ami/fax/rpcDb.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xd3d6=['resolve','then','catch','bluebird','../../../config/logger','preview','lodash','../rpc/faxAccount','error','inspect','notify'];(function(_0x20a584,_0xe384a5){var _0x4b41a8=function(_0x2127c6){while(--_0x2127c6){_0x20a584['push'](_0x20a584['shift']());}};_0x4b41a8(++_0xe384a5);}(_0xd3d6,0x7c));var _0x6d3d=function(_0xc13896,_0xf3cf62){_0xc13896=_0xc13896-0x0;var _0x5d91de=_0xd3d6[_0xc13896];return _0x5d91de;};'use strict';var util=require('util');var BPromise=require(_0x6d3d('0x0'));var logger=require(_0x6d3d('0x1'))(_0x6d3d('0x2'));var _=require(_0x6d3d('0x3'));var faxAccount=require(_0x6d3d('0x4'));function loggerCatch(_0x40ec5d){return function(_0x123cd6){logger[_0x6d3d('0x5')](_0x40ec5d,util[_0x6d3d('0x6')](_0x123cd6,{'showHidden':![],'depth':null}));};}exports[_0x6d3d('0x7')]=function(_0x5a8a5d,_0x42e2ca){return BPromise[_0x6d3d('0x8')]()[_0x6d3d('0x9')](faxAccount[_0x6d3d('0x7')](_0x5a8a5d,_0x42e2ca))[_0x6d3d('0xa')](loggerCatch('[Notify]\x20'));}; \ No newline at end of file +var _0xa011=['preview','lodash','../rpc/faxAccount','error','inspect','notify','catch','bluebird','../../../config/logger'];(function(_0x459616,_0x360dc3){var _0x40558a=function(_0x41e84b){while(--_0x41e84b){_0x459616['push'](_0x459616['shift']());}};_0x40558a(++_0x360dc3);}(_0xa011,0xfa));var _0x1a01=function(_0x36956e,_0x518e4c){_0x36956e=_0x36956e-0x0;var _0xeb762f=_0xa011[_0x36956e];return _0xeb762f;};'use strict';var util=require('util');var BPromise=require(_0x1a01('0x0'));var logger=require(_0x1a01('0x1'))(_0x1a01('0x2'));var _=require(_0x1a01('0x3'));var faxAccount=require(_0x1a01('0x4'));function loggerCatch(_0x14b6dc){return function(_0x57e64b){logger[_0x1a01('0x5')](_0x14b6dc,util[_0x1a01('0x6')](_0x57e64b,{'showHidden':![],'depth':null}));};}exports[_0x1a01('0x7')]=function(_0x19e2a7,_0x860f44){return BPromise['resolve']()['then'](faxAccount[_0x1a01('0x7')](_0x19e2a7,_0x860f44))[_0x1a01('0x8')](loggerCatch('[Notify]\x20'));}; \ No newline at end of file diff --git a/server/services/ami/fax/util/gs.js b/server/services/ami/fax/util/gs.js index ced4cb0..c235adf 100644 --- a/server/services/ami/fax/util/gs.js +++ b/server/services/ami/fax/util/gs.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xf570=['bluebird','child_process','exec','Exec\x20gs','info','\x20Error\x20:','fax'];(function(_0x929c7e,_0x38c4cc){var _0x5de099=function(_0xc4e8d8){while(--_0xc4e8d8){_0x929c7e['push'](_0x929c7e['shift']());}};_0x5de099(++_0x38c4cc);}(_0xf570,0xbc));var _0x0f57=function(_0x250eac,_0x5ba51f){_0x250eac=_0x250eac-0x0;var _0x5993cb=_0xf570[_0x250eac];return _0x5993cb;};'use strict';var util=require('util');var logger=require('../../../../config/logger')(_0x0f57('0x0'));var BPromise=require(_0x0f57('0x1'));var exec=require(_0x0f57('0x2'))[_0x0f57('0x3')];exports['execute']=function(_0x4abbfb){return new BPromise(function(_0x51edad,_0x41bc8c){exec(_0x4abbfb,function(_0x5445dc,_0x52d2ab,_0x47ef96){logger['info'](_0x0f57('0x4'),_0x52d2ab);if(_0x5445dc){logger[_0x0f57('0x5')](_0x0f57('0x4'),_0x0f57('0x6'),util['inspect'](_0x5445dc,{'showHidden':![],'depth':null}),_0x52d2ab,_0x47ef96);_0x41bc8c(_0x5445dc);}_0x51edad(_0x52d2ab);});});}; \ No newline at end of file +var _0x0015=['inspect','util','../../../../config/logger','fax','bluebird','exec','info','Exec\x20gs','\x20Error\x20:'];(function(_0x58719b,_0x1cb622){var _0x13b76c=function(_0x31c0f1){while(--_0x31c0f1){_0x58719b['push'](_0x58719b['shift']());}};_0x13b76c(++_0x1cb622);}(_0x0015,0x7f));var _0x5001=function(_0x20efe0,_0x307808){_0x20efe0=_0x20efe0-0x0;var _0x2a93c3=_0x0015[_0x20efe0];return _0x2a93c3;};'use strict';var util=require(_0x5001('0x0'));var logger=require(_0x5001('0x1'))(_0x5001('0x2'));var BPromise=require(_0x5001('0x3'));var exec=require('child_process')[_0x5001('0x4')];exports['execute']=function(_0x3450ab){return new BPromise(function(_0x390c25,_0x3b8dbe){exec(_0x3450ab,function(_0x10b7ad,_0x5e9a36,_0x7435ac){logger[_0x5001('0x5')]('Exec\x20gs',_0x5e9a36);if(_0x10b7ad){logger['info'](_0x5001('0x6'),_0x5001('0x7'),util[_0x5001('0x8')](_0x10b7ad,{'showHidden':![],'depth':null}),_0x5e9a36,_0x7435ac);_0x3b8dbe(_0x10b7ad);}_0x390c25(_0x5e9a36);});});}; \ No newline at end of file diff --git a/server/services/ami/fax/util/util.js b/server/services/ami/fax/util/util.js index d538b2b..3d0dfbe 100644 --- a/server/services/ami/fax/util/util.js +++ b/server/services/ami/fax/util/util.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x367c=['variablesAction','uniqueid','channel','from-sip','lodash','moment','../../../../config/logger','fax','message','logger','info','inspect','addVariables','ecm','headerinfo','minrate','maxrate','format','\x22%s\x22','modem','faxdetect','t38timeout','localstationid','path'];(function(_0x2e4e19,_0x493b50){var _0x9ba20b=function(_0x2f6456){while(--_0x2f6456){_0x2e4e19['push'](_0x2e4e19['shift']());}};_0x9ba20b(++_0x493b50);}(_0x367c,0x1b4));var _0xc367=function(_0xb7a459,_0xc13228){_0xb7a459=_0xb7a459-0x0;var _0x104ab5=_0x367c[_0xb7a459];return _0x104ab5;};'use strict';var util=require('util');var _=require(_0xc367('0x0'));var moment=require(_0xc367('0x1'));var logger=require(_0xc367('0x2'))(_0xc367('0x3'));exports[_0xc367('0x4')]=function(_0x2467ba){return{'message':_0x2467ba};};exports[_0xc367('0x5')]=function(_0x43abd6,_0x104731){logger[_0xc367('0x6')](_0x43abd6,util[_0xc367('0x7')](_0x104731,{'showHidden':![],'depth':null}));};exports[_0xc367('0x8')]=function(_0x4f8967,_0x53153c){var _0x422a99={'XMF-ECM':_0x53153c[_0xc367('0x9')],'XMF-HEADERINFO':_0x53153c[_0xc367('0xa')],'XMF-MINRATE':_0x53153c[_0xc367('0xb')],'XMF-MAXRATE':_0x53153c[_0xc367('0xc')],'XMF-MODEM':util[_0xc367('0xd')](_0xc367('0xe'),_0x53153c[_0xc367('0xf')]),'XMF-GATEWAY':_0x53153c['gateway'],'XMF-FAXDETECT':_0x53153c[_0xc367('0x10')],'XMF-T38TIMEOUT':_0x53153c[_0xc367('0x11')],'XMF-LOCALSTATIONID':_0x53153c[_0xc367('0x12')],'XMF-PATH':_0x4f8967[_0xc367('0x13')]};return _0x422a99;};exports[_0xc367('0x14')]=function(_0x9c3e2e,_0x24858f){return{'actionid':_0x9c3e2e[_0xc367('0x15')],'action':'originate','channel':_0x9c3e2e[_0xc367('0x16')],'Exten':'xcally-motion-fax','Context':_0xc367('0x17'),'Priority':'1','callerid':util[_0xc367('0xd')]('\x22%s\x22\x20<%s>',_0x9c3e2e[_0xc367('0xa')]?_0x9c3e2e[_0xc367('0xa')]:'',_0x9c3e2e[_0xc367('0x12')]),'variable':_0x24858f,'timeout':0x1e*0x3e8,'async':!![],'channelid':_0x9c3e2e[_0xc367('0x15')]};}; \ No newline at end of file +var _0xbdab=['t38timeout','localstationid','path','variablesAction','originate','channel','xcally-motion-fax','\x22%s\x22\x20<%s>','util','lodash','moment','../../../../config/logger','fax','message','logger','info','inspect','ecm','headerinfo','minrate','maxrate','format','modem'];(function(_0xa464c9,_0x7c86d8){var _0x3d73c4=function(_0x5c2056){while(--_0x5c2056){_0xa464c9['push'](_0xa464c9['shift']());}};_0x3d73c4(++_0x7c86d8);}(_0xbdab,0x1eb));var _0xbbda=function(_0x391bf8,_0x4bc842){_0x391bf8=_0x391bf8-0x0;var _0x2239b4=_0xbdab[_0x391bf8];return _0x2239b4;};'use strict';var util=require(_0xbbda('0x0'));var _=require(_0xbbda('0x1'));var moment=require(_0xbbda('0x2'));var logger=require(_0xbbda('0x3'))(_0xbbda('0x4'));exports[_0xbbda('0x5')]=function(_0x1cea7b){return{'message':_0x1cea7b};};exports[_0xbbda('0x6')]=function(_0x3c5934,_0x8a92f2){logger[_0xbbda('0x7')](_0x3c5934,util[_0xbbda('0x8')](_0x8a92f2,{'showHidden':![],'depth':null}));};exports['addVariables']=function(_0x21ddb,_0x131f2d){var _0x2a0932={'XMF-ECM':_0x131f2d[_0xbbda('0x9')],'XMF-HEADERINFO':_0x131f2d[_0xbbda('0xa')],'XMF-MINRATE':_0x131f2d[_0xbbda('0xb')],'XMF-MAXRATE':_0x131f2d[_0xbbda('0xc')],'XMF-MODEM':util[_0xbbda('0xd')]('\x22%s\x22',_0x131f2d[_0xbbda('0xe')]),'XMF-GATEWAY':_0x131f2d['gateway'],'XMF-FAXDETECT':_0x131f2d['faxdetect'],'XMF-T38TIMEOUT':_0x131f2d[_0xbbda('0xf')],'XMF-LOCALSTATIONID':_0x131f2d[_0xbbda('0x10')],'XMF-PATH':_0x21ddb[_0xbbda('0x11')]};return _0x2a0932;};exports[_0xbbda('0x12')]=function(_0x30107e,_0x2af293){return{'actionid':_0x30107e['uniqueid'],'action':_0xbbda('0x13'),'channel':_0x30107e[_0xbbda('0x14')],'Exten':_0xbbda('0x15'),'Context':'from-sip','Priority':'1','callerid':util[_0xbbda('0xd')](_0xbbda('0x16'),_0x30107e[_0xbbda('0xa')]?_0x30107e[_0xbbda('0xa')]:'',_0x30107e[_0xbbda('0x10')]),'variable':_0x2af293,'timeout':0x1e*0x3e8,'async':!![],'channelid':_0x30107e['uniqueid']};}; \ No newline at end of file diff --git a/server/services/ami/index.js b/server/services/ami/index.js index 0f1bff5..5940f46 100644 --- a/server/services/ami/index.js +++ b/server/services/ami/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x9b72=['./rpc/cmHopperHistory','./rpc/campaign','./rpc/integrations/zendesk','./rpc/integrations/freshdesk','./rpc/integrations/zoho','./rpc/integrations/vtiger','./rpc/integrations/freshsales','./rpc/integrations/servicenow','./rpc/integrations/dynamics365','../../config/logger','ami','hour','get','resolve','then','getAgents','initAgents','getTelephones','initTelephones','getTrunks','initTrunks','getVoiceQueues','getTriggers','initTriggers','getTemplates','initTemplates','initZendeskAccounts','getSalesforceAccounts','initSalesforceAccounts','getSugarcrmAccounts','initSugarcrmAccounts','initFreshdeskAccounts','getDeskAccounts','initDeskAccounts','getZohoAccounts','initZohoAccounts','initVtigerAccounts','initServicenowAccounts','getDynamics365Accounts','initDynamics365Accounts','getCampaigns','initCampaigns','getFaxAccounts','initFaxAccounts','getVoiceQueueReports','initVoiceQueueReports','getVoiceQueueHopperHistory','getCampaignHopperHistory','initCampaignHopperHistory','getVoiceCallReports','initVoiceCallReports','catch','[index.js][initParams]','inspect','listen','sync','[index.js][main]','util','moment','./server','./realtime','./report','./acw','./trigger','./preview','./fax','./rpc/user','./rpc/voiceQueue','./rpc/voiceCallReport','./rpc/trunk','./rpc/trigger','./rpc/template'];(function(_0x79835a,_0xbc2732){var _0x6c102=function(_0x445e30){while(--_0x445e30){_0x79835a['push'](_0x79835a['shift']());}};_0x6c102(++_0xbc2732);}(_0x9b72,0xc9));var _0x29b7=function(_0x42cfed,_0x315548){_0x42cfed=_0x42cfed-0x0;var _0x2d8b7c=_0x9b72[_0x42cfed];return _0x2d8b7c;};'use strict';var util=require(_0x29b7('0x0'));var moment=require(_0x29b7('0x1'));var server=require(_0x29b7('0x2'));var Realtime=require(_0x29b7('0x3'));var Report=require(_0x29b7('0x4'));var Acw=require(_0x29b7('0x5'));var Trigger=require(_0x29b7('0x6'));var Dialer=require('./dialer');var Preview=require(_0x29b7('0x7'));var Fax=require(_0x29b7('0x8'));var user=require(_0x29b7('0x9'));var voiceQueue=require(_0x29b7('0xa'));var voiceQueueReport=require('./rpc/voiceQueueReport');var voiceCallReport=require(_0x29b7('0xb'));var trunk=require(_0x29b7('0xc'));var trigger=require(_0x29b7('0xd'));var template=require(_0x29b7('0xe'));var cmHopperHistory=require(_0x29b7('0xf'));var campaign=require(_0x29b7('0x10'));var voiceExtension=require('./rpc/voiceExtension');var faxAccount=require('./rpc/faxAccount');var zendesk=require(_0x29b7('0x11'));var salesforce=require('./rpc/integrations/salesforce');var sugarcrm=require('./rpc/integrations/sugarcrm');var freshdesk=require(_0x29b7('0x12'));var desk=require('./rpc/integrations/desk');var zoho=require(_0x29b7('0x13'));var vtiger=require(_0x29b7('0x14'));var freshsales=require(_0x29b7('0x15'));var servicenow=require(_0x29b7('0x16'));var dynamics365=require(_0x29b7('0x17'));var realtime=new Realtime();var report=new Report(realtime);var acw=new Acw(realtime);var channelTrigger=new Trigger(realtime);var preview=new Preview(realtime);var dialer=new Dialer(realtime,preview);var fax=new Fax(realtime);var logger=require(_0x29b7('0x18'))(_0x29b7('0x19'));var isTrue=!![];var initP=!![];function ifMidnight(){if(moment()['get'](_0x29b7('0x1a'))===0x0&&initP){initP=![];isTrue=!![];initParams();}if(moment()[_0x29b7('0x1b')](_0x29b7('0x1a'))===0x1&&isTrue){isTrue=![];initP=!![];}}function initRealtime(){ifMidnight();return Promise[_0x29b7('0x1c')]()[_0x29b7('0x1d')](user[_0x29b7('0x1e')]())[_0x29b7('0x1d')](realtime[_0x29b7('0x1f')]())[_0x29b7('0x1d')](user[_0x29b7('0x20')]())[_0x29b7('0x1d')](realtime[_0x29b7('0x21')]())[_0x29b7('0x1d')](trunk[_0x29b7('0x22')]())[_0x29b7('0x1d')](realtime[_0x29b7('0x23')]())[_0x29b7('0x1d')](voiceQueue[_0x29b7('0x24')]())['then'](realtime['initVoiceQueues']())[_0x29b7('0x1d')](trigger[_0x29b7('0x25')]())[_0x29b7('0x1d')](realtime[_0x29b7('0x26')]())[_0x29b7('0x1d')](template[_0x29b7('0x27')]())['then'](realtime[_0x29b7('0x28')]())['then'](zendesk['getZendeskAccounts']())[_0x29b7('0x1d')](realtime[_0x29b7('0x29')]())[_0x29b7('0x1d')](salesforce[_0x29b7('0x2a')]())[_0x29b7('0x1d')](realtime[_0x29b7('0x2b')]())[_0x29b7('0x1d')](sugarcrm[_0x29b7('0x2c')]())[_0x29b7('0x1d')](realtime[_0x29b7('0x2d')]())[_0x29b7('0x1d')](freshdesk['getFreshdeskAccounts']())['then'](realtime[_0x29b7('0x2e')]())[_0x29b7('0x1d')](desk[_0x29b7('0x2f')]())['then'](realtime[_0x29b7('0x30')]())[_0x29b7('0x1d')](zoho[_0x29b7('0x31')]())['then'](realtime[_0x29b7('0x32')]())[_0x29b7('0x1d')](vtiger['getVtigerAccounts']())[_0x29b7('0x1d')](realtime[_0x29b7('0x33')]())[_0x29b7('0x1d')](freshsales['getFreshsalesAccounts']())['then'](realtime['initFreshsalesAccounts']())[_0x29b7('0x1d')](servicenow['getServicenowAccounts']())[_0x29b7('0x1d')](realtime[_0x29b7('0x34')]())['then'](dynamics365[_0x29b7('0x35')]())[_0x29b7('0x1d')](realtime[_0x29b7('0x36')]())[_0x29b7('0x1d')](campaign[_0x29b7('0x37')]())[_0x29b7('0x1d')](realtime[_0x29b7('0x38')]())[_0x29b7('0x1d')](voiceExtension['getVoiceExtensions']())[_0x29b7('0x1d')](realtime['initVoiceExtensions']())[_0x29b7('0x1d')](faxAccount[_0x29b7('0x39')]())['then'](realtime[_0x29b7('0x3a')]())['then'](function(){return realtime;});}function initParams(){return Promise[_0x29b7('0x1c')]()[_0x29b7('0x1d')](voiceQueueReport[_0x29b7('0x3b')]())['then'](realtime[_0x29b7('0x3c')]())['then'](cmHopperHistory[_0x29b7('0x3d')]())[_0x29b7('0x1d')](realtime['initVoiceQueueHopperHistory']())[_0x29b7('0x1d')](cmHopperHistory[_0x29b7('0x3e')]())['then'](realtime[_0x29b7('0x3f')]())[_0x29b7('0x1d')](voiceCallReport[_0x29b7('0x40')]())[_0x29b7('0x1d')](realtime[_0x29b7('0x41')]())[_0x29b7('0x42')](function(_0x2e2213){logger['error'](_0x29b7('0x43'),util[_0x29b7('0x44')](_0x2e2213,{'showHidden':![],'depth':null}));});}function main(){return server[_0x29b7('0x45')](realtime,preview,fax)['then'](function(){return initRealtime();})['then'](function(){return initParams();})[_0x29b7('0x1d')](function(){report[_0x29b7('0x46')]();setInterval(initRealtime,0x1388);})[_0x29b7('0x42')](function(_0x48970a){logger['error'](_0x29b7('0x47'),util[_0x29b7('0x44')](_0x48970a,{'showHidden':![],'depth':null}));});}main(); \ No newline at end of file +var _0xa030=['ami','get','hour','resolve','getAgents','then','getTelephones','getTrunks','initTrunks','getVoiceQueues','getTriggers','initTriggers','getZendeskAccounts','initZendeskAccounts','getSalesforceAccounts','initSugarcrmAccounts','getFreshdeskAccounts','initFreshdeskAccounts','initDeskAccounts','getZohoAccounts','initZohoAccounts','getVtigerAccounts','initVtigerAccounts','getFreshsalesAccounts','initFreshsalesAccounts','getServicenowAccounts','initServicenowAccounts','getDynamics365Accounts','initDynamics365Accounts','getCampaigns','getVoiceExtensions','getFaxAccounts','initFaxAccounts','getVoiceQueueReports','initVoiceQueueReports','getVoiceQueueHopperHistory','initVoiceQueueHopperHistory','getCampaignHopperHistory','initCampaignHopperHistory','getVoiceCallReports','catch','[index.js][initParams]','inspect','listen','sync','[index.js][main]','util','moment','./server','./acw','./trigger','./dialer','./fax','./rpc/voiceQueue','./rpc/voiceQueueReport','./rpc/voiceCallReport','./rpc/trigger','./rpc/template','./rpc/campaign','./rpc/voiceExtension','./rpc/faxAccount','./rpc/integrations/zendesk','./rpc/integrations/salesforce','./rpc/integrations/sugarcrm','./rpc/integrations/freshdesk','./rpc/integrations/desk','./rpc/integrations/zoho','./rpc/integrations/freshsales','./rpc/integrations/servicenow','./rpc/integrations/dynamics365'];(function(_0x32e649,_0x228649){var _0x14d386=function(_0x3fb3ed){while(--_0x3fb3ed){_0x32e649['push'](_0x32e649['shift']());}};_0x14d386(++_0x228649);}(_0xa030,0x18c));var _0x0a03=function(_0x1eb0a2,_0x553c6d){_0x1eb0a2=_0x1eb0a2-0x0;var _0x18c57e=_0xa030[_0x1eb0a2];return _0x18c57e;};'use strict';var util=require(_0x0a03('0x0'));var moment=require(_0x0a03('0x1'));var server=require(_0x0a03('0x2'));var Realtime=require('./realtime');var Report=require('./report');var Acw=require(_0x0a03('0x3'));var Trigger=require(_0x0a03('0x4'));var Dialer=require(_0x0a03('0x5'));var Preview=require('./preview');var Fax=require(_0x0a03('0x6'));var user=require('./rpc/user');var voiceQueue=require(_0x0a03('0x7'));var voiceQueueReport=require(_0x0a03('0x8'));var voiceCallReport=require(_0x0a03('0x9'));var trunk=require('./rpc/trunk');var trigger=require(_0x0a03('0xa'));var template=require(_0x0a03('0xb'));var cmHopperHistory=require('./rpc/cmHopperHistory');var campaign=require(_0x0a03('0xc'));var voiceExtension=require(_0x0a03('0xd'));var faxAccount=require(_0x0a03('0xe'));var zendesk=require(_0x0a03('0xf'));var salesforce=require(_0x0a03('0x10'));var sugarcrm=require(_0x0a03('0x11'));var freshdesk=require(_0x0a03('0x12'));var desk=require(_0x0a03('0x13'));var zoho=require(_0x0a03('0x14'));var vtiger=require('./rpc/integrations/vtiger');var freshsales=require(_0x0a03('0x15'));var servicenow=require(_0x0a03('0x16'));var dynamics365=require(_0x0a03('0x17'));var realtime=new Realtime();var report=new Report(realtime);var acw=new Acw(realtime);var channelTrigger=new Trigger(realtime);var preview=new Preview(realtime);var dialer=new Dialer(realtime,preview);var fax=new Fax(realtime);var logger=require('../../config/logger')(_0x0a03('0x18'));var isTrue=!![];var initP=!![];function ifMidnight(){if(moment()[_0x0a03('0x19')](_0x0a03('0x1a'))===0x0&&initP){initP=![];isTrue=!![];initParams();}if(moment()[_0x0a03('0x19')]('hour')===0x1&&isTrue){isTrue=![];initP=!![];}}function initRealtime(){ifMidnight();return Promise[_0x0a03('0x1b')]()['then'](user[_0x0a03('0x1c')]())['then'](realtime['initAgents']())[_0x0a03('0x1d')](user[_0x0a03('0x1e')]())[_0x0a03('0x1d')](realtime['initTelephones']())[_0x0a03('0x1d')](trunk[_0x0a03('0x1f')]())[_0x0a03('0x1d')](realtime[_0x0a03('0x20')]())['then'](voiceQueue[_0x0a03('0x21')]())[_0x0a03('0x1d')](realtime['initVoiceQueues']())[_0x0a03('0x1d')](trigger[_0x0a03('0x22')]())[_0x0a03('0x1d')](realtime[_0x0a03('0x23')]())[_0x0a03('0x1d')](template['getTemplates']())[_0x0a03('0x1d')](realtime['initTemplates']())[_0x0a03('0x1d')](zendesk[_0x0a03('0x24')]())[_0x0a03('0x1d')](realtime[_0x0a03('0x25')]())[_0x0a03('0x1d')](salesforce[_0x0a03('0x26')]())[_0x0a03('0x1d')](realtime['initSalesforceAccounts']())[_0x0a03('0x1d')](sugarcrm['getSugarcrmAccounts']())[_0x0a03('0x1d')](realtime[_0x0a03('0x27')]())[_0x0a03('0x1d')](freshdesk[_0x0a03('0x28')]())['then'](realtime[_0x0a03('0x29')]())[_0x0a03('0x1d')](desk['getDeskAccounts']())[_0x0a03('0x1d')](realtime[_0x0a03('0x2a')]())[_0x0a03('0x1d')](zoho[_0x0a03('0x2b')]())['then'](realtime[_0x0a03('0x2c')]())[_0x0a03('0x1d')](vtiger[_0x0a03('0x2d')]())[_0x0a03('0x1d')](realtime[_0x0a03('0x2e')]())['then'](freshsales[_0x0a03('0x2f')]())[_0x0a03('0x1d')](realtime[_0x0a03('0x30')]())[_0x0a03('0x1d')](servicenow[_0x0a03('0x31')]())['then'](realtime[_0x0a03('0x32')]())[_0x0a03('0x1d')](dynamics365[_0x0a03('0x33')]())[_0x0a03('0x1d')](realtime[_0x0a03('0x34')]())[_0x0a03('0x1d')](campaign[_0x0a03('0x35')]())[_0x0a03('0x1d')](realtime['initCampaigns']())[_0x0a03('0x1d')](voiceExtension[_0x0a03('0x36')]())[_0x0a03('0x1d')](realtime['initVoiceExtensions']())['then'](faxAccount[_0x0a03('0x37')]())['then'](realtime[_0x0a03('0x38')]())['then'](function(){return realtime;});}function initParams(){return Promise[_0x0a03('0x1b')]()['then'](voiceQueueReport[_0x0a03('0x39')]())[_0x0a03('0x1d')](realtime[_0x0a03('0x3a')]())['then'](cmHopperHistory[_0x0a03('0x3b')]())[_0x0a03('0x1d')](realtime[_0x0a03('0x3c')]())[_0x0a03('0x1d')](cmHopperHistory[_0x0a03('0x3d')]())[_0x0a03('0x1d')](realtime[_0x0a03('0x3e')]())[_0x0a03('0x1d')](voiceCallReport[_0x0a03('0x3f')]())[_0x0a03('0x1d')](realtime['initVoiceCallReports']())[_0x0a03('0x40')](function(_0x55d142){logger['error'](_0x0a03('0x41'),util[_0x0a03('0x42')](_0x55d142,{'showHidden':![],'depth':null}));});}function main(){return server[_0x0a03('0x43')](realtime,preview,fax)[_0x0a03('0x1d')](function(){return initRealtime();})[_0x0a03('0x1d')](function(){return initParams();})['then'](function(){report[_0x0a03('0x44')]();setInterval(initRealtime,0x1388);})[_0x0a03('0x40')](function(_0x4ad343){logger['error'](_0x0a03('0x45'),util[_0x0a03('0x42')](_0x4ad343,{'showHidden':![],'depth':null}));});}main(); \ No newline at end of file diff --git a/server/services/ami/model/agent.js b/server/services/ami/model/agent.js index eb47a50..0c02b26 100644 --- a/server/services/ami/model/agent.js +++ b/server/services/ami/model/agent.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x1ff7=['mobile','online','voiceStatus','voiceStatusTime','voiceStatusCallerIdNumber','voiceStatusQueue','onhold','prototype','state','toLowerCase','not_inuse','idle','statePause','toNumber','format','stateTime','status','stringify','user:%s','user:save','emit','user:presence','exports','lodash','util','md5','ioredis','redis','localhost','socket.io-emitter','name','email','accountcode','fullname','unknown','address','phone'];(function(_0x2689b2,_0x1f29c4){var _0x3e0ab4=function(_0x15246c){while(--_0x15246c){_0x2689b2['push'](_0x2689b2['shift']());}};_0x3e0ab4(++_0x1f29c4);}(_0x1ff7,0x189));var _0x71ff=function(_0x35b352,_0x25edc4){_0x35b352=_0x35b352-0x0;var _0x40a327=_0x1ff7[_0x35b352];return _0x40a327;};'use strict';var _=require(_0x71ff('0x0'));var util=require(_0x71ff('0x1'));var moment=require('moment');var md5=require(_0x71ff('0x2'));var Redis=require(_0x71ff('0x3'));var config=require('../../../config/environment');config[_0x71ff('0x4')]=_['defaults'](config[_0x71ff('0x4')],{'host':_0x71ff('0x5'),'port':0x18eb});var io=require(_0x71ff('0x6'))(new Redis(config['redis']));function Agent(_0x4cb2e3){this['id']=_0x4cb2e3['id']||0x0;this[_0x71ff('0x7')]=_0x4cb2e3['name']||'';this[_0x71ff('0x8')]=_0x4cb2e3[_0x71ff('0x8')]||'';this[_0x71ff('0x9')]=_0x4cb2e3['accountcode']||'';this[_0x71ff('0xa')]=_0x4cb2e3[_0x71ff('0xa')]||'';this['state']=_0x71ff('0xb');this['stateTime']=0x0;this['status']='unknown';this[_0x71ff('0xc')]='';this[_0x71ff('0xd')]='';this[_0x71ff('0xe')]='';this['interface']='';this[_0x71ff('0xf')]=_0x4cb2e3[_0x71ff('0xf')]||![];this[_0x71ff('0x10')]='unknown';this[_0x71ff('0x11')]=0x0;this[_0x71ff('0x12')]='';this[_0x71ff('0x13')]='';this[_0x71ff('0x14')]=![];this['local']=![];this['md5']='';}Agent[_0x71ff('0x15')]['updateStatusRealtime']=function(_0x3f46b0){var _0x413ecb;if(_0x3f46b0&&_0x3f46b0[_0x71ff('0x16')]){_0x413ecb=_0x3f46b0[_0x71ff('0x16')][_0x71ff('0x17')]();switch(_0x413ecb){case _0x71ff('0x18'):_0x413ecb=_0x71ff('0x19');break;case'inuse':_0x413ecb='talking';break;}}if(_0x413ecb&&this['voiceStatus']!==_0x413ecb||_0x3f46b0[_0x71ff('0x1a')]){this[_0x71ff('0x11')]=_[_0x71ff('0x1b')](moment()[_0x71ff('0x1c')]('x'));}if(_0x413ecb){this[_0x71ff('0x10')]=_0x413ecb;}var _0x5530af={'id':this['id'],'name':this[_0x71ff('0x7')],'email':this['email'],'accountcode':this[_0x71ff('0x9')],'fullname':this[_0x71ff('0xa')],'state':this['state'],'stateTime':this[_0x71ff('0x1d')],'status':this[_0x71ff('0x1e')],'address':this[_0x71ff('0xc')],'online':this[_0x71ff('0xf')],'voiceStatus':this[_0x71ff('0x10')],'voiceStatusTime':this[_0x71ff('0x11')],'voiceStatusCallerIdNumber':this[_0x71ff('0x12')],'voiceStatusQueue':this[_0x71ff('0x13')],'interface':this['interface'],'onhold':this['onhold']};var _0x471310=md5(JSON[_0x71ff('0x1f')](_0x5530af));if(this['md5']!==_0x471310){this[_0x71ff('0x2')]=_0x471310;io['to'](util[_0x71ff('0x1c')](_0x71ff('0x20'),_0x5530af[_0x71ff('0x7')]))['emit'](_0x71ff('0x21'),_0x5530af);io[_0x71ff('0x22')](_0x71ff('0x23'),_0x5530af);}};module[_0x71ff('0x24')]=Agent; \ No newline at end of file +var _0xd3c5=['name','email','accountcode','fullname','state','unknown','stateTime','address','mobile','interface','online','voiceStatus','voiceStatusTime','voiceStatusQueue','onhold','local','prototype','updateStatusRealtime','toLowerCase','idle','inuse','talking','toNumber','format','status','voiceStatusCallerIdNumber','user:%s','emit','user:save','user:presence','exports','lodash','util','moment','md5','ioredis','../../../config/environment','redis','defaults','localhost','socket.io-emitter'];(function(_0xd1d19a,_0x1933f0){var _0x52a79d=function(_0x5199e2){while(--_0x5199e2){_0xd1d19a['push'](_0xd1d19a['shift']());}};_0x52a79d(++_0x1933f0);}(_0xd3c5,0x9a));var _0x5d3c=function(_0x20a584,_0xe384a5){_0x20a584=_0x20a584-0x0;var _0x4b41a8=_0xd3c5[_0x20a584];return _0x4b41a8;};'use strict';var _=require(_0x5d3c('0x0'));var util=require(_0x5d3c('0x1'));var moment=require(_0x5d3c('0x2'));var md5=require(_0x5d3c('0x3'));var Redis=require(_0x5d3c('0x4'));var config=require(_0x5d3c('0x5'));config[_0x5d3c('0x6')]=_[_0x5d3c('0x7')](config['redis'],{'host':_0x5d3c('0x8'),'port':0x18eb});var io=require(_0x5d3c('0x9'))(new Redis(config['redis']));function Agent(_0x4c8e0d){this['id']=_0x4c8e0d['id']||0x0;this['name']=_0x4c8e0d[_0x5d3c('0xa')]||'';this[_0x5d3c('0xb')]=_0x4c8e0d[_0x5d3c('0xb')]||'';this['accountcode']=_0x4c8e0d[_0x5d3c('0xc')]||'';this['fullname']=_0x4c8e0d[_0x5d3c('0xd')]||'';this[_0x5d3c('0xe')]=_0x5d3c('0xf');this[_0x5d3c('0x10')]=0x0;this['status']=_0x5d3c('0xf');this[_0x5d3c('0x11')]='';this['phone']='';this[_0x5d3c('0x12')]='';this[_0x5d3c('0x13')]='';this[_0x5d3c('0x14')]=_0x4c8e0d['online']||![];this[_0x5d3c('0x15')]=_0x5d3c('0xf');this[_0x5d3c('0x16')]=0x0;this['voiceStatusCallerIdNumber']='';this[_0x5d3c('0x17')]='';this[_0x5d3c('0x18')]=![];this[_0x5d3c('0x19')]=![];this[_0x5d3c('0x3')]='';}Agent[_0x5d3c('0x1a')][_0x5d3c('0x1b')]=function(_0x11cb51){var _0x328309;if(_0x11cb51&&_0x11cb51[_0x5d3c('0xe')]){_0x328309=_0x11cb51['state'][_0x5d3c('0x1c')]();switch(_0x328309){case'not_inuse':_0x328309=_0x5d3c('0x1d');break;case _0x5d3c('0x1e'):_0x328309=_0x5d3c('0x1f');break;}}if(_0x328309&&this[_0x5d3c('0x15')]!==_0x328309||_0x11cb51['statePause']){this[_0x5d3c('0x16')]=_[_0x5d3c('0x20')](moment()[_0x5d3c('0x21')]('x'));}if(_0x328309){this[_0x5d3c('0x15')]=_0x328309;}var _0x59166a={'id':this['id'],'name':this['name'],'email':this[_0x5d3c('0xb')],'accountcode':this['accountcode'],'fullname':this['fullname'],'state':this[_0x5d3c('0xe')],'stateTime':this[_0x5d3c('0x10')],'status':this[_0x5d3c('0x22')],'address':this[_0x5d3c('0x11')],'online':this['online'],'voiceStatus':this[_0x5d3c('0x15')],'voiceStatusTime':this[_0x5d3c('0x16')],'voiceStatusCallerIdNumber':this[_0x5d3c('0x23')],'voiceStatusQueue':this[_0x5d3c('0x17')],'interface':this[_0x5d3c('0x13')],'onhold':this['onhold']};var _0xcde6bf=md5(JSON['stringify'](_0x59166a));if(this[_0x5d3c('0x3')]!==_0xcde6bf){this['md5']=_0xcde6bf;io['to'](util[_0x5d3c('0x21')](_0x5d3c('0x24'),_0x59166a[_0x5d3c('0xa')]))[_0x5d3c('0x25')](_0x5d3c('0x26'),_0x59166a);io[_0x5d3c('0x25')](_0x5d3c('0x27'),_0x59166a);}};module[_0x5d3c('0x28')]=Agent; \ No newline at end of file diff --git a/server/services/ami/model/campaign.js b/server/services/ami/model/campaign.js index 6ceec9f..dc87424 100644 --- a/server/services/ami/model/campaign.js +++ b/server/services/ami/model/campaign.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xa77d=['name','type','campaign','originated','ivrAnswerCallsDay','message','active','dialTimezone','dialGlobalInterval','dialOriginateCallerIdNumber','dialOriginateTimeout','dialCongestionMaxRetry','dialCongestionRetryFrequency','dialBusyMaxRetry','dialBusyRetryFrequency','dialNoAnswerMaxRetry','dialNoAnswerRetryFrequency','dialGlobalMaxRetry','dialNoSuchNumberMaxRetry','dialNoSuchNumberRetryFrequency','dialDropMaxRetry','dialDropRetryFrequency','dialAbandonedMaxRetry','dialAbandonedRetryFrequency','dialMachineMaxRetry','dialMachineRetryFrequency','dialAgentRejectMaxRetry','dialAgentRejectRetryFrequency','dialOrderByScheduledAt','DESC','dialPrefix','dialRandomLastDigitCallerIdNumber','dialCutDigit','TrunkBackup','Trunk','Interval','SquareProject','dialQueueProject','dialAMDActive','dialAMDInitialSilence','dialAMDGreeting','dialAMDTotalAnalysisTime','dialAMDMinWordLength','dialAMDBetweenWordsSilence','dialAMDMaximumNumberOfWords','dialAMDSilenceThreshold','dialAMDMaximumWordLength'];(function(_0x17df49,_0x377381){var _0xdb4f2b=function(_0xd984fa){while(--_0xd984fa){_0x17df49['push'](_0x17df49['shift']());}};_0xdb4f2b(++_0x377381);}(_0xa77d,0xbc));var _0xda77=function(_0x2c8c52,_0x2e5989){_0x2c8c52=_0x2c8c52-0x0;var _0x327cb0=_0xa77d[_0x2c8c52];return _0x327cb0;};'use strict';function Campaign(_0x2e51c6){this['id']=_0x2e51c6['id']||0x0;this[_0xda77('0x0')]=_0x2e51c6[_0xda77('0x0')]||'';this[_0xda77('0x1')]=_0x2e51c6[_0xda77('0x1')]||_0xda77('0x2');this[_0xda77('0x3')]=0x0;this['temp']=0x0;this[_0xda77('0x4')]=0x0;this['ivrTotalCallsDays']=0x0;this[_0xda77('0x5')]='';this['sendMessageOneNotActive']=!![];this['active']=_0x2e51c6[_0xda77('0x6')];this['limitCalls']=_0x2e51c6['limitCalls'];this[_0xda77('0x7')]=_0x2e51c6[_0xda77('0x7')]||null;this[_0xda77('0x8')]=_0x2e51c6[_0xda77('0x8')]?_0x2e51c6[_0xda77('0x8')]:null;this['dialOriginateCallerIdName']=_0x2e51c6['dialOriginateCallerIdName'];this[_0xda77('0x9')]=_0x2e51c6[_0xda77('0x9')];this[_0xda77('0xa')]=_0x2e51c6[_0xda77('0xa')]||0x1e;this[_0xda77('0xb')]=_0x2e51c6[_0xda77('0xb')];this[_0xda77('0xc')]=_0x2e51c6[_0xda77('0xc')];this[_0xda77('0xd')]=_0x2e51c6[_0xda77('0xd')];this[_0xda77('0xe')]=_0x2e51c6[_0xda77('0xe')];this[_0xda77('0xf')]=_0x2e51c6[_0xda77('0xf')];this[_0xda77('0x10')]=_0x2e51c6[_0xda77('0x10')];this['dialGlobalMaxRetry']=_0x2e51c6[_0xda77('0x11')];this[_0xda77('0x12')]=_0x2e51c6[_0xda77('0x12')]||0x3;this[_0xda77('0x13')]=_0x2e51c6[_0xda77('0x13')]||0x96;this[_0xda77('0x14')]=_0x2e51c6[_0xda77('0x14')]||0x3;this[_0xda77('0x15')]=_0x2e51c6[_0xda77('0x15')]||0x96;this[_0xda77('0x16')]=_0x2e51c6[_0xda77('0x16')]||0x3;this[_0xda77('0x17')]=_0x2e51c6[_0xda77('0x17')]||0x96;this[_0xda77('0x18')]=_0x2e51c6['dialMachineMaxRetry']||0x3;this['dialMachineRetryFrequency']=_0x2e51c6[_0xda77('0x19')]||0x96;this[_0xda77('0x1a')]=_0x2e51c6[_0xda77('0x1a')]||0x3;this['dialAgentRejectRetryFrequency']=_0x2e51c6[_0xda77('0x1b')]||0x96;this[_0xda77('0x1c')]=_0x2e51c6[_0xda77('0x1c')]||_0xda77('0x1d');this[_0xda77('0x1e')]=_0x2e51c6[_0xda77('0x1e')]||undefined;this[_0xda77('0x1f')]=_0x2e51c6[_0xda77('0x1f')]||undefined;this[_0xda77('0x20')]=_0x2e51c6[_0xda77('0x20')]||undefined;this['TrunkBackup']=_0x2e51c6[_0xda77('0x21')]?_0x2e51c6['TrunkBackup']:undefined;this['Trunk']=_0x2e51c6[_0xda77('0x22')]?_0x2e51c6['Trunk']:undefined;this[_0xda77('0x23')]=_0x2e51c6[_0xda77('0x23')]?_0x2e51c6['Interval']:undefined;this[_0xda77('0x24')]=_0x2e51c6['SquareProject']?_0x2e51c6[_0xda77('0x24')]:undefined;this[_0xda77('0x25')]=_0x2e51c6[_0xda77('0x24')]?_0x2e51c6[_0xda77('0x24')][_0xda77('0x0')]:undefined;this[_0xda77('0x26')]=_0x2e51c6[_0xda77('0x26')]||![];this[_0xda77('0x27')]=_0x2e51c6[_0xda77('0x27')];this[_0xda77('0x28')]=_0x2e51c6[_0xda77('0x28')];this['dialAMDAfterGreetingSilence']=_0x2e51c6['dialAMDAfterGreetingSilence'];this[_0xda77('0x29')]=_0x2e51c6[_0xda77('0x29')];this[_0xda77('0x2a')]=_0x2e51c6[_0xda77('0x2a')];this[_0xda77('0x2b')]=_0x2e51c6[_0xda77('0x2b')];this[_0xda77('0x2c')]=_0x2e51c6[_0xda77('0x2c')];this[_0xda77('0x2d')]=_0x2e51c6[_0xda77('0x2d')];this[_0xda77('0x2e')]=_0x2e51c6[_0xda77('0x2e')];}module['exports']=Campaign; \ No newline at end of file +var _0x1c7d=['dialBusyMaxRetry','dialBusyRetryFrequency','dialNoAnswerMaxRetry','dialNoAnswerRetryFrequency','dialGlobalMaxRetry','dialNoSuchNumberMaxRetry','dialNoSuchNumberRetryFrequency','dialDropMaxRetry','dialDropRetryFrequency','dialAbandonedMaxRetry','dialAbandonedRetryFrequency','dialMachineMaxRetry','dialMachineRetryFrequency','dialAgentRejectMaxRetry','dialAgentRejectRetryFrequency','dialOrderByScheduledAt','dialPrefix','dialRandomLastDigitCallerIdNumber','dialCutDigit','TrunkBackup','Trunk','Interval','SquareProject','dialQueueProject','name','dialAMDActive','dialAMDGreeting','dialAMDTotalAnalysisTime','dialAMDBetweenWordsSilence','dialAMDMaximumNumberOfWords','dialAMDSilenceThreshold','dialAMDMaximumWordLength','exports','type','campaign','originated','temp','ivrTotalCallsDays','sendMessageOneNotActive','active','limitCalls','dialTimezone','dialGlobalInterval','dialOriginateCallerIdName','dialOriginateTimeout','dialCongestionMaxRetry','dialCongestionRetryFrequency'];(function(_0x596a34,_0x33452a){var _0xdde740=function(_0x1722da){while(--_0x1722da){_0x596a34['push'](_0x596a34['shift']());}};_0xdde740(++_0x33452a);}(_0x1c7d,0x13b));var _0xd1c7=function(_0x26fd3b,_0x2023c9){_0x26fd3b=_0x26fd3b-0x0;var _0x3c8c4e=_0x1c7d[_0x26fd3b];return _0x3c8c4e;};'use strict';function Campaign(_0x2f7b2a){this['id']=_0x2f7b2a['id']||0x0;this['name']=_0x2f7b2a['name']||'';this[_0xd1c7('0x0')]=_0x2f7b2a['type']||_0xd1c7('0x1');this[_0xd1c7('0x2')]=0x0;this[_0xd1c7('0x3')]=0x0;this['ivrAnswerCallsDay']=0x0;this[_0xd1c7('0x4')]=0x0;this['message']='';this[_0xd1c7('0x5')]=!![];this[_0xd1c7('0x6')]=_0x2f7b2a[_0xd1c7('0x6')];this[_0xd1c7('0x7')]=_0x2f7b2a[_0xd1c7('0x7')];this[_0xd1c7('0x8')]=_0x2f7b2a['dialTimezone']||null;this[_0xd1c7('0x9')]=_0x2f7b2a[_0xd1c7('0x9')]?_0x2f7b2a['dialGlobalInterval']:null;this[_0xd1c7('0xa')]=_0x2f7b2a[_0xd1c7('0xa')];this['dialOriginateCallerIdNumber']=_0x2f7b2a['dialOriginateCallerIdNumber'];this[_0xd1c7('0xb')]=_0x2f7b2a[_0xd1c7('0xb')]||0x1e;this[_0xd1c7('0xc')]=_0x2f7b2a[_0xd1c7('0xc')];this[_0xd1c7('0xd')]=_0x2f7b2a['dialCongestionRetryFrequency'];this[_0xd1c7('0xe')]=_0x2f7b2a['dialBusyMaxRetry'];this['dialBusyRetryFrequency']=_0x2f7b2a[_0xd1c7('0xf')];this[_0xd1c7('0x10')]=_0x2f7b2a[_0xd1c7('0x10')];this[_0xd1c7('0x11')]=_0x2f7b2a[_0xd1c7('0x11')];this[_0xd1c7('0x12')]=_0x2f7b2a[_0xd1c7('0x12')];this['dialNoSuchNumberMaxRetry']=_0x2f7b2a[_0xd1c7('0x13')]||0x3;this[_0xd1c7('0x14')]=_0x2f7b2a[_0xd1c7('0x14')]||0x96;this[_0xd1c7('0x15')]=_0x2f7b2a['dialDropMaxRetry']||0x3;this['dialDropRetryFrequency']=_0x2f7b2a[_0xd1c7('0x16')]||0x96;this['dialAbandonedMaxRetry']=_0x2f7b2a[_0xd1c7('0x17')]||0x3;this[_0xd1c7('0x18')]=_0x2f7b2a[_0xd1c7('0x18')]||0x96;this[_0xd1c7('0x19')]=_0x2f7b2a[_0xd1c7('0x19')]||0x3;this[_0xd1c7('0x1a')]=_0x2f7b2a[_0xd1c7('0x1a')]||0x96;this['dialAgentRejectMaxRetry']=_0x2f7b2a[_0xd1c7('0x1b')]||0x3;this[_0xd1c7('0x1c')]=_0x2f7b2a[_0xd1c7('0x1c')]||0x96;this[_0xd1c7('0x1d')]=_0x2f7b2a['dialOrderByScheduledAt']||'DESC';this['dialPrefix']=_0x2f7b2a[_0xd1c7('0x1e')]||undefined;this['dialRandomLastDigitCallerIdNumber']=_0x2f7b2a[_0xd1c7('0x1f')]||undefined;this[_0xd1c7('0x20')]=_0x2f7b2a[_0xd1c7('0x20')]||undefined;this[_0xd1c7('0x21')]=_0x2f7b2a['TrunkBackup']?_0x2f7b2a['TrunkBackup']:undefined;this[_0xd1c7('0x22')]=_0x2f7b2a['Trunk']?_0x2f7b2a[_0xd1c7('0x22')]:undefined;this[_0xd1c7('0x23')]=_0x2f7b2a['Interval']?_0x2f7b2a[_0xd1c7('0x23')]:undefined;this[_0xd1c7('0x24')]=_0x2f7b2a[_0xd1c7('0x24')]?_0x2f7b2a[_0xd1c7('0x24')]:undefined;this[_0xd1c7('0x25')]=_0x2f7b2a['SquareProject']?_0x2f7b2a['SquareProject'][_0xd1c7('0x26')]:undefined;this['dialAMDActive']=_0x2f7b2a[_0xd1c7('0x27')]||![];this['dialAMDInitialSilence']=_0x2f7b2a['dialAMDInitialSilence'];this[_0xd1c7('0x28')]=_0x2f7b2a[_0xd1c7('0x28')];this['dialAMDAfterGreetingSilence']=_0x2f7b2a['dialAMDAfterGreetingSilence'];this[_0xd1c7('0x29')]=_0x2f7b2a[_0xd1c7('0x29')];this['dialAMDMinWordLength']=_0x2f7b2a['dialAMDMinWordLength'];this[_0xd1c7('0x2a')]=_0x2f7b2a[_0xd1c7('0x2a')];this[_0xd1c7('0x2b')]=_0x2f7b2a['dialAMDMaximumNumberOfWords'];this[_0xd1c7('0x2c')]=_0x2f7b2a[_0xd1c7('0x2c')];this[_0xd1c7('0x2d')]=_0x2f7b2a[_0xd1c7('0x2d')];}module[_0xd1c7('0x2e')]=Campaign; \ No newline at end of file diff --git a/server/services/ami/model/channel.js b/server/services/ami/model/channel.js index f2cc31a..81f43b5 100644 --- a/server/services/ami/model/channel.js +++ b/server/services/ami/model/channel.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xd2ed=['tag','disposition','monitorFilename','monitors','transfercalleridnum','transferconnectedlinenum','mohtime','exports','starttime','channel','destinationchannel','calleridnum','calleridname','connectedlinenum','connectedlinename','accountcode','uniqueid','exten','answered','answertime','endtime','abandoned','lastapplication','lastdata','holdtime'];(function(_0x5be401,_0x53457d){var _0x2eced9=function(_0x438486){while(--_0x438486){_0x5be401['push'](_0x5be401['shift']());}};_0x2eced9(++_0x53457d);}(_0xd2ed,0x14d));var _0xdd2e=function(_0x3d85ca,_0x502f0e){_0x3d85ca=_0x3d85ca-0x0;var _0x4f51a9=_0xd2ed[_0x3d85ca];return _0x4f51a9;};'use strict';function Channel(){this[_0xdd2e('0x0')]=null;this[_0xdd2e('0x1')]='';this[_0xdd2e('0x2')]='';this[_0xdd2e('0x3')]=0x0;this[_0xdd2e('0x4')]='';this[_0xdd2e('0x5')]=undefined;this[_0xdd2e('0x6')]=undefined;this[_0xdd2e('0x7')]=0x0;this['context']='';this[_0xdd2e('0x8')]=0x0;this['linkedid']=0x0;this[_0xdd2e('0x9')]=0x0;this[_0xdd2e('0xa')]=![];this[_0xdd2e('0xb')]=null;this[_0xdd2e('0xc')]=null;this['unmanaged']=![];this[_0xdd2e('0xd')]=![];this[_0xdd2e('0xe')]='';this[_0xdd2e('0xf')]='';this['duration']=0x0;this['billableseconds']=0x0;this[_0xdd2e('0x10')]=0x0;this['type']=null;this[_0xdd2e('0x11')]=null;this[_0xdd2e('0x12')]=null;this['monitor']=![];this[_0xdd2e('0x13')]=null;this['queue']=null;this[_0xdd2e('0x14')]=[];this[_0xdd2e('0x15')]=undefined;this[_0xdd2e('0x16')]=undefined;this['transferType']=undefined;this[_0xdd2e('0x17')]=0x0;}module[_0xdd2e('0x18')]=Channel; \ No newline at end of file +var _0xce2f=['transfercalleridnum','transferconnectedlinenum','mohtime','channel','destinationchannel','calleridnum','calleridname','connectedlinenum','connectedlinename','context','linkedid','answered','answertime','endtime','unmanaged','abandoned','lastapplication','lastdata','duration','type','disposition','monitorFilename','monitors'];(function(_0x1e2e21,_0x3b5030){var _0x4be6e3=function(_0x33b009){while(--_0x33b009){_0x1e2e21['push'](_0x1e2e21['shift']());}};_0x4be6e3(++_0x3b5030);}(_0xce2f,0x18a));var _0xfce2=function(_0x56ed9a,_0x1cbf69){_0x56ed9a=_0x56ed9a-0x0;var _0x50d7e8=_0xce2f[_0x56ed9a];return _0x50d7e8;};'use strict';function Channel(){this['starttime']=null;this[_0xfce2('0x0')]='';this[_0xfce2('0x1')]='';this[_0xfce2('0x2')]=0x0;this[_0xfce2('0x3')]='';this[_0xfce2('0x4')]=undefined;this[_0xfce2('0x5')]=undefined;this['accountcode']=0x0;this[_0xfce2('0x6')]='';this['uniqueid']=0x0;this[_0xfce2('0x7')]=0x0;this['exten']=0x0;this[_0xfce2('0x8')]=![];this[_0xfce2('0x9')]=null;this[_0xfce2('0xa')]=null;this[_0xfce2('0xb')]=![];this[_0xfce2('0xc')]=![];this[_0xfce2('0xd')]='';this[_0xfce2('0xe')]='';this[_0xfce2('0xf')]=0x0;this['billableseconds']=0x0;this['holdtime']=0x0;this[_0xfce2('0x10')]=null;this['tag']=null;this[_0xfce2('0x11')]=null;this['monitor']=![];this[_0xfce2('0x12')]=null;this['queue']=null;this[_0xfce2('0x13')]=[];this[_0xfce2('0x14')]=undefined;this[_0xfce2('0x15')]=undefined;this['transferType']=undefined;this[_0xfce2('0x16')]=0x0;}module['exports']=Channel; \ No newline at end of file diff --git a/server/services/ami/model/deskAccount.js b/server/services/ami/model/deskAccount.js index cd802a2..e14a217 100644 --- a/server/services/ami/model/deskAccount.js +++ b/server/services/ami/model/deskAccount.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x2179=['type','serverUrl','Configurations','exports','name','username','remoteUri','authType','password','consumerKey','consumerSecret','token','tokenSecret'];(function(_0x4a53d,_0x58a95e){var _0x27410e=function(_0x38fc90){while(--_0x38fc90){_0x4a53d['push'](_0x4a53d['shift']());}};_0x27410e(++_0x58a95e);}(_0x2179,0x122));var _0x9217=function(_0x493cea,_0x144c6a){_0x493cea=_0x493cea-0x0;var _0x1c32ba=_0x2179[_0x493cea];return _0x1c32ba;};'use strict';function DeskAccount(_0x131a18){this['id']=_0x131a18['id']||0x0;this[_0x9217('0x0')]=_0x131a18['name']||'';this[_0x9217('0x1')]=_0x131a18[_0x9217('0x1')]||'';this[_0x9217('0x2')]=_0x131a18[_0x9217('0x2')]||'';this['authType']=_0x131a18[_0x9217('0x3')]||'';this[_0x9217('0x4')]=_0x131a18[_0x9217('0x4')]||'';this[_0x9217('0x5')]=_0x131a18[_0x9217('0x5')]||'';this['consumerSecret']=_0x131a18[_0x9217('0x6')]||'';this[_0x9217('0x7')]=_0x131a18[_0x9217('0x7')]||'';this[_0x9217('0x8')]=_0x131a18[_0x9217('0x8')]||'';this[_0x9217('0x9')]=_0x131a18[_0x9217('0x9')]||'';this[_0x9217('0xa')]=_0x131a18[_0x9217('0xa')]||'';this['Configurations']=_0x131a18[_0x9217('0xb')]||{};}module[_0x9217('0xc')]=DeskAccount; \ No newline at end of file +var _0x6a44=['serverUrl','Configurations','exports','name','username','remoteUri','authType','consumerKey','token','tokenSecret','type'];(function(_0x2b7c49,_0x3c27f4){var _0x42d9c4=function(_0x19a36a){while(--_0x19a36a){_0x2b7c49['push'](_0x2b7c49['shift']());}};_0x42d9c4(++_0x3c27f4);}(_0x6a44,0x66));var _0x46a4=function(_0x4344a2,_0x51e1c2){_0x4344a2=_0x4344a2-0x0;var _0xbc5ff4=_0x6a44[_0x4344a2];return _0xbc5ff4;};'use strict';function DeskAccount(_0x54fbd6){this['id']=_0x54fbd6['id']||0x0;this[_0x46a4('0x0')]=_0x54fbd6[_0x46a4('0x0')]||'';this[_0x46a4('0x1')]=_0x54fbd6[_0x46a4('0x1')]||'';this[_0x46a4('0x2')]=_0x54fbd6[_0x46a4('0x2')]||'';this[_0x46a4('0x3')]=_0x54fbd6[_0x46a4('0x3')]||'';this['password']=_0x54fbd6['password']||'';this[_0x46a4('0x4')]=_0x54fbd6[_0x46a4('0x4')]||'';this['consumerSecret']=_0x54fbd6['consumerSecret']||'';this[_0x46a4('0x5')]=_0x54fbd6[_0x46a4('0x5')]||'';this[_0x46a4('0x6')]=_0x54fbd6['tokenSecret']||'';this[_0x46a4('0x7')]=_0x54fbd6['type']||'';this[_0x46a4('0x8')]=_0x54fbd6[_0x46a4('0x8')]||'';this[_0x46a4('0x9')]=_0x54fbd6[_0x46a4('0x9')]||{};}module[_0x46a4('0xa')]=DeskAccount; \ No newline at end of file diff --git a/server/services/ami/model/dynamics365Account.js b/server/services/ami/model/dynamics365Account.js index 1b8b593..5ff6556 100644 --- a/server/services/ami/model/dynamics365Account.js +++ b/server/services/ami/model/dynamics365Account.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xf9fa=['password','remoteUri','tenantId','clientId','clientSecret','serverUrl','modernAuthentication','Configurations','CloudProvider','exports','username'];(function(_0x4a9fb1,_0x273043){var _0x348672=function(_0x142b69){while(--_0x142b69){_0x4a9fb1['push'](_0x4a9fb1['shift']());}};_0x348672(++_0x273043);}(_0xf9fa,0x180));var _0xaf9f=function(_0x522015,_0x1cd316){_0x522015=_0x522015-0x0;var _0x4569fd=_0xf9fa[_0x522015];return _0x4569fd;};'use strict';function Dynamics365Account(_0x3c40c7){this['id']=_0x3c40c7['id']||0x0;this['name']=_0x3c40c7['name']||'';this['username']=_0x3c40c7[_0xaf9f('0x0')]||'';this[_0xaf9f('0x1')]=_0x3c40c7[_0xaf9f('0x1')]||'';this[_0xaf9f('0x2')]=_0x3c40c7['remoteUri']||'';this[_0xaf9f('0x3')]=_0x3c40c7['tenantId']||'';this[_0xaf9f('0x4')]=_0x3c40c7[_0xaf9f('0x4')]||'';this[_0xaf9f('0x5')]=_0x3c40c7[_0xaf9f('0x5')]||{};this[_0xaf9f('0x6')]=_0x3c40c7[_0xaf9f('0x6')]||'';this[_0xaf9f('0x7')]=_0x3c40c7['modernAuthentication']||![];this[_0xaf9f('0x8')]=_0x3c40c7['Configurations']||{};this['CloudProvider']=_0x3c40c7[_0xaf9f('0x9')]||{};}module[_0xaf9f('0xa')]=Dynamics365Account; \ No newline at end of file +var _0x5a7d=['password','remoteUri','tenantId','clientId','clientSecret','serverUrl','modernAuthentication','Configurations','CloudProvider','exports','name'];(function(_0x35cd12,_0x562113){var _0x48bf30=function(_0x1251ea){while(--_0x1251ea){_0x35cd12['push'](_0x35cd12['shift']());}};_0x48bf30(++_0x562113);}(_0x5a7d,0xc5));var _0xd5a7=function(_0xdefbc3,_0x1ea49a){_0xdefbc3=_0xdefbc3-0x0;var _0x367798=_0x5a7d[_0xdefbc3];return _0x367798;};'use strict';function Dynamics365Account(_0x36fcd2){this['id']=_0x36fcd2['id']||0x0;this['name']=_0x36fcd2[_0xd5a7('0x0')]||'';this['username']=_0x36fcd2['username']||'';this[_0xd5a7('0x1')]=_0x36fcd2[_0xd5a7('0x1')]||'';this[_0xd5a7('0x2')]=_0x36fcd2['remoteUri']||'';this[_0xd5a7('0x3')]=_0x36fcd2[_0xd5a7('0x3')]||'';this[_0xd5a7('0x4')]=_0x36fcd2[_0xd5a7('0x4')]||'';this['clientSecret']=_0x36fcd2[_0xd5a7('0x5')]||{};this[_0xd5a7('0x6')]=_0x36fcd2[_0xd5a7('0x6')]||'';this[_0xd5a7('0x7')]=_0x36fcd2['modernAuthentication']||![];this[_0xd5a7('0x8')]=_0x36fcd2['Configurations']||{};this['CloudProvider']=_0x36fcd2[_0xd5a7('0x9')]||{};}module[_0xd5a7('0xa')]=Dynamics365Account; \ No newline at end of file diff --git a/server/services/ami/model/faxAccount.js b/server/services/ami/model/faxAccount.js index 32e6b67..c60b056 100644 --- a/server/services/ami/model/faxAccount.js +++ b/server/services/ami/model/faxAccount.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xe596=['headerinfo','localstationid','minrate','maxrate','modem','v17,v27,v29','gateway','faxdetect','t38timeout','tech','SIP','Trunk','ListId','key','exports','name','description','ecm'];(function(_0x432682,_0x253044){var _0x463d05=function(_0xa73403){while(--_0xa73403){_0x432682['push'](_0x432682['shift']());}};_0x463d05(++_0x253044);}(_0xe596,0xb1));var _0x6e59=function(_0x46698a,_0x8de1e4){_0x46698a=_0x46698a-0x0;var _0x356db0=_0xe596[_0x46698a];return _0x356db0;};'use strict';function FaxAccount(_0x847c24){this['id']=_0x847c24['id']||0x0;this[_0x6e59('0x0')]=_0x847c24[_0x6e59('0x0')]||'';this[_0x6e59('0x1')]=_0x847c24['description'];this[_0x6e59('0x2')]=_0x847c24[_0x6e59('0x2')];this[_0x6e59('0x3')]=_0x847c24[_0x6e59('0x3')];this[_0x6e59('0x4')]=_0x847c24[_0x6e59('0x4')];this[_0x6e59('0x5')]=_0x847c24[_0x6e59('0x5')]||0x960;this['maxrate']=_0x847c24[_0x6e59('0x6')]||0x3840;this[_0x6e59('0x7')]=_0x847c24['modem']||_0x6e59('0x8');this[_0x6e59('0x9')]=_0x847c24[_0x6e59('0x9')]||'no';this[_0x6e59('0xa')]=_0x847c24['faxdetect']||'no';this[_0x6e59('0xb')]=_0x847c24[_0x6e59('0xb')]||0x1388;this[_0x6e59('0xc')]=_0x847c24[_0x6e59('0xc')]||_0x6e59('0xd');this[_0x6e59('0xe')]=_0x847c24[_0x6e59('0xe')]?_0x847c24['Trunk']:undefined;this[_0x6e59('0xf')]=_0x847c24['ListId'];this[_0x6e59('0x10')]=_0x847c24['key'];}module[_0x6e59('0x11')]=FaxAccount; \ No newline at end of file +var _0x796b=['headerinfo','localstationid','minrate','maxrate','modem','v17,v27,v29','gateway','faxdetect','t38timeout','tech','SIP','Trunk','ListId','key','exports','name','ecm'];(function(_0x19d832,_0x277ecc){var _0x411df6=function(_0x1473df){while(--_0x1473df){_0x19d832['push'](_0x19d832['shift']());}};_0x411df6(++_0x277ecc);}(_0x796b,0xa8));var _0xb796=function(_0x4e4f0e,_0x1c3892){_0x4e4f0e=_0x4e4f0e-0x0;var _0x1a7219=_0x796b[_0x4e4f0e];return _0x1a7219;};'use strict';function FaxAccount(_0x31eabf){this['id']=_0x31eabf['id']||0x0;this[_0xb796('0x0')]=_0x31eabf['name']||'';this['description']=_0x31eabf['description'];this[_0xb796('0x1')]=_0x31eabf[_0xb796('0x1')];this[_0xb796('0x2')]=_0x31eabf[_0xb796('0x2')];this[_0xb796('0x3')]=_0x31eabf['localstationid'];this['minrate']=_0x31eabf[_0xb796('0x4')]||0x960;this[_0xb796('0x5')]=_0x31eabf[_0xb796('0x5')]||0x3840;this['modem']=_0x31eabf[_0xb796('0x6')]||_0xb796('0x7');this[_0xb796('0x8')]=_0x31eabf[_0xb796('0x8')]||'no';this[_0xb796('0x9')]=_0x31eabf[_0xb796('0x9')]||'no';this[_0xb796('0xa')]=_0x31eabf[_0xb796('0xa')]||0x1388;this[_0xb796('0xb')]=_0x31eabf[_0xb796('0xb')]||_0xb796('0xc');this[_0xb796('0xd')]=_0x31eabf[_0xb796('0xd')]?_0x31eabf['Trunk']:undefined;this[_0xb796('0xe')]=_0x31eabf['ListId'];this['key']=_0x31eabf[_0xb796('0xf')];}module[_0xb796('0x10')]=FaxAccount; \ No newline at end of file diff --git a/server/services/ami/model/freshdeskAccount.js b/server/services/ami/model/freshdeskAccount.js index da47a50..afb8fbc 100644 --- a/server/services/ami/model/freshdeskAccount.js +++ b/server/services/ami/model/freshdeskAccount.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x921b=['remoteUri','Configurations','exports','name','username','token'];(function(_0x476c6f,_0x5dc8b9){var _0x53e534=function(_0x344f0d){while(--_0x344f0d){_0x476c6f['push'](_0x476c6f['shift']());}};_0x53e534(++_0x5dc8b9);}(_0x921b,0x13b));var _0xb921=function(_0x2f2ead,_0x5a0eb5){_0x2f2ead=_0x2f2ead-0x0;var _0x108ee9=_0x921b[_0x2f2ead];return _0x108ee9;};'use strict';function FreshdeskAccount(_0x3650e9){this['id']=_0x3650e9['id']||0x0;this[_0xb921('0x0')]=_0x3650e9[_0xb921('0x0')]||'';this[_0xb921('0x1')]=_0x3650e9['username']||'';this['apiKey']=_0x3650e9[_0xb921('0x2')]||'';this[_0xb921('0x3')]=_0x3650e9['remoteUri']||'';this['serverUrl']=_0x3650e9['serverUrl']||'';this[_0xb921('0x4')]=_0x3650e9[_0xb921('0x4')]||{};}module[_0xb921('0x5')]=FreshdeskAccount; \ No newline at end of file +var _0xb209=['name','username','token','serverUrl','Configurations'];(function(_0x2ded58,_0x579620){var _0x414afe=function(_0x42b803){while(--_0x42b803){_0x2ded58['push'](_0x2ded58['shift']());}};_0x414afe(++_0x579620);}(_0xb209,0x1d1));var _0x9b20=function(_0x132da2,_0x77cab5){_0x132da2=_0x132da2-0x0;var _0x1ace76=_0xb209[_0x132da2];return _0x1ace76;};'use strict';function FreshdeskAccount(_0x55977b){this['id']=_0x55977b['id']||0x0;this[_0x9b20('0x0')]=_0x55977b['name']||'';this[_0x9b20('0x1')]=_0x55977b[_0x9b20('0x1')]||'';this['apiKey']=_0x55977b[_0x9b20('0x2')]||'';this['remoteUri']=_0x55977b['remoteUri']||'';this[_0x9b20('0x3')]=_0x55977b[_0x9b20('0x3')]||'';this[_0x9b20('0x4')]=_0x55977b[_0x9b20('0x4')]||{};}module['exports']=FreshdeskAccount; \ No newline at end of file diff --git a/server/services/ami/model/freshsalesAccount.js b/server/services/ami/model/freshsalesAccount.js index a8d2833..91308b6 100644 --- a/server/services/ami/model/freshsalesAccount.js +++ b/server/services/ami/model/freshsalesAccount.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xa630=['token','remoteUri','serverUrl','Configurations','name','username'];(function(_0x59ee6f,_0x450239){var _0x4c0979=function(_0x565e92){while(--_0x565e92){_0x59ee6f['push'](_0x59ee6f['shift']());}};_0x4c0979(++_0x450239);}(_0xa630,0xbe));var _0x0a63=function(_0x49ba01,_0x1e59af){_0x49ba01=_0x49ba01-0x0;var _0x536c89=_0xa630[_0x49ba01];return _0x536c89;};'use strict';function FreshsalesAccount(_0x40cf11){this['id']=_0x40cf11['id']||0x0;this[_0x0a63('0x0')]=_0x40cf11['name']||'';this['username']=_0x40cf11[_0x0a63('0x1')]||'';this['apiKey']=_0x40cf11[_0x0a63('0x2')]||'';this['remoteUri']=_0x40cf11[_0x0a63('0x3')]||'';this[_0x0a63('0x4')]=_0x40cf11[_0x0a63('0x4')]||'';this[_0x0a63('0x5')]=_0x40cf11[_0x0a63('0x5')]||{};}module['exports']=FreshsalesAccount; \ No newline at end of file +var _0x1928=['name','username','apiKey','token','remoteUri','serverUrl','Configurations','exports'];(function(_0x20a584,_0xe384a5){var _0x4b41a8=function(_0x2127c6){while(--_0x2127c6){_0x20a584['push'](_0x20a584['shift']());}};_0x4b41a8(++_0xe384a5);}(_0x1928,0x138));var _0x8192=function(_0x129c46,_0x310abf){_0x129c46=_0x129c46-0x0;var _0x7ec3ee=_0x1928[_0x129c46];return _0x7ec3ee;};'use strict';function FreshsalesAccount(_0x4f1a64){this['id']=_0x4f1a64['id']||0x0;this[_0x8192('0x0')]=_0x4f1a64[_0x8192('0x0')]||'';this['username']=_0x4f1a64[_0x8192('0x1')]||'';this[_0x8192('0x2')]=_0x4f1a64[_0x8192('0x3')]||'';this[_0x8192('0x4')]=_0x4f1a64[_0x8192('0x4')]||'';this[_0x8192('0x5')]=_0x4f1a64[_0x8192('0x5')]||'';this[_0x8192('0x6')]=_0x4f1a64[_0x8192('0x6')]||{};}module[_0x8192('0x7')]=FreshsalesAccount; \ No newline at end of file diff --git a/server/services/ami/model/queueReport.js b/server/services/ami/model/queueReport.js index 9b6705e..c01299b 100644 --- a/server/services/ami/model/queueReport.js +++ b/server/services/ami/model/queueReport.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x374d=['variables','exports','type','inbound','calleridnum','calleridname','queuecallerjoinAt','position','count','queuecallerabandon','queuecallerabandonAt','queuecallercomplete','queuecallerexit','queuecallerexitAt','originalposition','channel','accountcode','context','exten','holdtime','motionChannel','voice','mohtime'];(function(_0x4b5394,_0x3b7687){var _0x21b298=function(_0x9ef6bf){while(--_0x9ef6bf){_0x4b5394['push'](_0x4b5394['shift']());}};_0x21b298(++_0x3b7687);}(_0x374d,0xba));var _0xd374=function(_0x491a7f,_0x28bb80){_0x491a7f=_0x491a7f-0x0;var _0x3d8f44=_0x374d[_0x491a7f];return _0x3d8f44;};'use strict';function QueueReport(){this[_0xd374('0x0')]=_0xd374('0x1');this['uniqueid']='';this[_0xd374('0x2')]='';this[_0xd374('0x3')]='';this['queue']='';this[_0xd374('0x4')]=null;this['queuecallerleaveAt']=null;this[_0xd374('0x5')]=0x1;this[_0xd374('0x6')]=0x1;this[_0xd374('0x7')]=![];this[_0xd374('0x8')]=null;this[_0xd374('0x9')]=![];this['queuecallercompleteAt']=null;this[_0xd374('0xa')]=![];this[_0xd374('0xb')]=null;this[_0xd374('0xc')]=0x1;this[_0xd374('0xd')]='';this['connectedlinenum']='';this['connectedlinename']='';this[_0xd374('0xe')]='';this[_0xd374('0xf')]='';this[_0xd374('0x10')]='';this['priority']='';this[_0xd374('0x11')]=0x0;this['assigned']=![];this['lastAssignedTo']='';this[_0xd374('0x12')]=_0xd374('0x13');this['routealias']=null;this[_0xd374('0x14')]=0x0;this[_0xd374('0x15')]={};}module[_0xd374('0x16')]=QueueReport; \ No newline at end of file +var _0x8f06=['queuecallerexitAt','originalposition','channel','connectedlinenum','connectedlinename','accountcode','context','holdtime','assigned','lastAssignedTo','motionChannel','voice','variables','type','calleridnum','calleridname','queue','queuecallerjoinAt','position','count','queuecallerabandonAt','queuecallercompleteAt','queuecallerexit'];(function(_0x257166,_0x2640ae){var _0x50cddc=function(_0x266557){while(--_0x266557){_0x257166['push'](_0x257166['shift']());}};_0x50cddc(++_0x2640ae);}(_0x8f06,0x10a));var _0x68f0=function(_0x2dafbe,_0x5d04de){_0x2dafbe=_0x2dafbe-0x0;var _0x58a45a=_0x8f06[_0x2dafbe];return _0x58a45a;};'use strict';function QueueReport(){this[_0x68f0('0x0')]='inbound';this['uniqueid']='';this[_0x68f0('0x1')]='';this[_0x68f0('0x2')]='';this[_0x68f0('0x3')]='';this[_0x68f0('0x4')]=null;this['queuecallerleaveAt']=null;this[_0x68f0('0x5')]=0x1;this[_0x68f0('0x6')]=0x1;this['queuecallerabandon']=![];this[_0x68f0('0x7')]=null;this['queuecallercomplete']=![];this[_0x68f0('0x8')]=null;this[_0x68f0('0x9')]=![];this[_0x68f0('0xa')]=null;this[_0x68f0('0xb')]=0x1;this[_0x68f0('0xc')]='';this[_0x68f0('0xd')]='';this[_0x68f0('0xe')]='';this[_0x68f0('0xf')]='';this[_0x68f0('0x10')]='';this['exten']='';this['priority']='';this[_0x68f0('0x11')]=0x0;this[_0x68f0('0x12')]=![];this[_0x68f0('0x13')]='';this[_0x68f0('0x14')]=_0x68f0('0x15');this['routealias']=null;this['mohtime']=0x0;this[_0x68f0('0x16')]={};}module['exports']=QueueReport; \ No newline at end of file diff --git a/server/services/ami/model/salesforceAccount.js b/server/services/ami/model/salesforceAccount.js index c609bfa..7299c0b 100644 --- a/server/services/ami/model/salesforceAccount.js +++ b/server/services/ami/model/salesforceAccount.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xc84b=['Configurations','exports','name','username','password','clientSecret','securityToken','type','serverUrl'];(function(_0x43cba5,_0x4a2f83){var _0x359d1a=function(_0x888a02){while(--_0x888a02){_0x43cba5['push'](_0x43cba5['shift']());}};_0x359d1a(++_0x4a2f83);}(_0xc84b,0xbf));var _0xbc84=function(_0x59befa,_0x4af99b){_0x59befa=_0x59befa-0x0;var _0x1dd63d=_0xc84b[_0x59befa];return _0x1dd63d;};'use strict';function SalesforceAccount(_0x1509f5){this['id']=_0x1509f5['id']||0x0;this['name']=_0x1509f5[_0xbc84('0x0')]||'';this[_0xbc84('0x1')]=_0x1509f5[_0xbc84('0x1')]||'';this['remoteUri']=_0x1509f5['remoteUri']||'';this[_0xbc84('0x2')]=_0x1509f5[_0xbc84('0x2')]||'';this['clientId']=_0x1509f5['clientId']||'';this[_0xbc84('0x3')]=_0x1509f5[_0xbc84('0x3')]||'';this[_0xbc84('0x4')]=_0x1509f5[_0xbc84('0x4')]||'';this[_0xbc84('0x5')]=_0x1509f5[_0xbc84('0x5')]||'integrationTab';this[_0xbc84('0x6')]=_0x1509f5[_0xbc84('0x6')]||'';this[_0xbc84('0x7')]=_0x1509f5[_0xbc84('0x7')]||{};}module[_0xbc84('0x8')]=SalesforceAccount; \ No newline at end of file +var _0xf777=['securityToken','type','integrationTab','serverUrl','Configurations','name','username','remoteUri','password','clientId','clientSecret'];(function(_0x101e7b,_0x4ef05b){var _0x4995c0=function(_0x1a6488){while(--_0x1a6488){_0x101e7b['push'](_0x101e7b['shift']());}};_0x4995c0(++_0x4ef05b);}(_0xf777,0x1e9));var _0x7f77=function(_0x20a584,_0xe384a5){_0x20a584=_0x20a584-0x0;var _0x4b41a8=_0xf777[_0x20a584];return _0x4b41a8;};'use strict';function SalesforceAccount(_0x4113a4){this['id']=_0x4113a4['id']||0x0;this[_0x7f77('0x0')]=_0x4113a4[_0x7f77('0x0')]||'';this[_0x7f77('0x1')]=_0x4113a4[_0x7f77('0x1')]||'';this[_0x7f77('0x2')]=_0x4113a4[_0x7f77('0x2')]||'';this[_0x7f77('0x3')]=_0x4113a4[_0x7f77('0x3')]||'';this['clientId']=_0x4113a4[_0x7f77('0x4')]||'';this[_0x7f77('0x5')]=_0x4113a4['clientSecret']||'';this[_0x7f77('0x6')]=_0x4113a4['securityToken']||'';this[_0x7f77('0x7')]=_0x4113a4['type']||_0x7f77('0x8');this[_0x7f77('0x9')]=_0x4113a4[_0x7f77('0x9')]||'';this[_0x7f77('0xa')]=_0x4113a4[_0x7f77('0xa')]||{};}module['exports']=SalesforceAccount; \ No newline at end of file diff --git a/server/services/ami/model/servicenowAccount.js b/server/services/ami/model/servicenowAccount.js index c068903..9f4cdc3 100644 --- a/server/services/ami/model/servicenowAccount.js +++ b/server/services/ami/model/servicenowAccount.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x56a4=['remoteUri','serverUrl','Configurations','exports','name','username','password'];(function(_0x5147e7,_0x514475){var _0x36a96e=function(_0x51be9d){while(--_0x51be9d){_0x5147e7['push'](_0x5147e7['shift']());}};_0x36a96e(++_0x514475);}(_0x56a4,0x89));var _0x456a=function(_0x372ee1,_0x45c637){_0x372ee1=_0x372ee1-0x0;var _0x31ea06=_0x56a4[_0x372ee1];return _0x31ea06;};'use strict';function ServicenowAccount(_0x3b0dea){this['id']=_0x3b0dea['id']||0x0;this[_0x456a('0x0')]=_0x3b0dea['name']||'';this[_0x456a('0x1')]=_0x3b0dea[_0x456a('0x1')]||'';this['password']=_0x3b0dea[_0x456a('0x2')]||'';this['remoteUri']=_0x3b0dea[_0x456a('0x3')]||'';this[_0x456a('0x4')]=_0x3b0dea['serverUrl']||'';this['Configurations']=_0x3b0dea[_0x456a('0x5')]||{};}module[_0x456a('0x6')]=ServicenowAccount; \ No newline at end of file +var _0xe6e0=['remoteUri','serverUrl','exports','name','username'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0xe6e0,0x139));var _0x0e6e=function(_0x5f1391,_0x19c132){_0x5f1391=_0x5f1391-0x0;var _0x50ebe3=_0xe6e0[_0x5f1391];return _0x50ebe3;};'use strict';function ServicenowAccount(_0x3e9108){this['id']=_0x3e9108['id']||0x0;this[_0x0e6e('0x0')]=_0x3e9108['name']||'';this[_0x0e6e('0x1')]=_0x3e9108[_0x0e6e('0x1')]||'';this['password']=_0x3e9108['password']||'';this[_0x0e6e('0x2')]=_0x3e9108[_0x0e6e('0x2')]||'';this[_0x0e6e('0x3')]=_0x3e9108[_0x0e6e('0x3')]||'';this['Configurations']=_0x3e9108['Configurations']||{};}module[_0x0e6e('0x4')]=ServicenowAccount; \ No newline at end of file diff --git a/server/services/ami/model/sugarcrmAccount.js b/server/services/ami/model/sugarcrmAccount.js index 09623e9..3dbbaf6 100644 --- a/server/services/ami/model/sugarcrmAccount.js +++ b/server/services/ami/model/sugarcrmAccount.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x8d33=['remoteUri','serverUrl','Configurations','exports','name','username','password'];(function(_0x23ffec,_0x43f490){var _0x413265=function(_0x438b36){while(--_0x438b36){_0x23ffec['push'](_0x23ffec['shift']());}};_0x413265(++_0x43f490);}(_0x8d33,0x162));var _0x38d3=function(_0x36c955,_0x56c8c6){_0x36c955=_0x36c955-0x0;var _0x1bf3e4=_0x8d33[_0x36c955];return _0x1bf3e4;};'use strict';function SugarcrmAccount(_0x3011bd){this['id']=_0x3011bd['id']||0x0;this['name']=_0x3011bd[_0x38d3('0x0')]||'';this[_0x38d3('0x1')]=_0x3011bd[_0x38d3('0x1')]||'';this[_0x38d3('0x2')]=_0x3011bd[_0x38d3('0x2')]||'';this[_0x38d3('0x3')]=_0x3011bd[_0x38d3('0x3')]||'';this[_0x38d3('0x4')]=_0x3011bd['serverUrl']||'';this[_0x38d3('0x5')]=_0x3011bd['Configurations']||{};}module[_0x38d3('0x6')]=SugarcrmAccount; \ No newline at end of file +var _0x22ce=['exports','name','username','password','remoteUri','serverUrl','Configurations'];(function(_0xb29bef,_0x45aff1){var _0x878163=function(_0xa270a1){while(--_0xa270a1){_0xb29bef['push'](_0xb29bef['shift']());}};_0x878163(++_0x45aff1);}(_0x22ce,0xd3));var _0xe22c=function(_0x1c3373,_0x28acd6){_0x1c3373=_0x1c3373-0x0;var _0x55614e=_0x22ce[_0x1c3373];return _0x55614e;};'use strict';function SugarcrmAccount(_0x3d556c){this['id']=_0x3d556c['id']||0x0;this[_0xe22c('0x0')]=_0x3d556c[_0xe22c('0x0')]||'';this[_0xe22c('0x1')]=_0x3d556c[_0xe22c('0x1')]||'';this[_0xe22c('0x2')]=_0x3d556c[_0xe22c('0x2')]||'';this[_0xe22c('0x3')]=_0x3d556c['remoteUri']||'';this[_0xe22c('0x4')]=_0x3d556c[_0xe22c('0x4')]||'';this['Configurations']=_0x3d556c[_0xe22c('0x5')]||{};}module[_0xe22c('0x6')]=SugarcrmAccount; \ No newline at end of file diff --git a/server/services/ami/model/telephone.js b/server/services/ami/model/telephone.js index 7205639..334cac7 100644 --- a/server/services/ami/model/telephone.js +++ b/server/services/ami/model/telephone.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x4d6e=['unknown','stateTime','status','address','exports','name'];(function(_0x16cb03,_0x43ea58){var _0x10944e=function(_0x27ebaa){while(--_0x27ebaa){_0x16cb03['push'](_0x16cb03['shift']());}};_0x10944e(++_0x43ea58);}(_0x4d6e,0x119));var _0xe4d6=function(_0x468b0f,_0x408566){_0x468b0f=_0x468b0f-0x0;var _0x3e74d9=_0x4d6e[_0x468b0f];return _0x3e74d9;};'use strict';function Telephone(_0x26de69){this['id']=_0x26de69['id']||0x0;this[_0xe4d6('0x0')]=_0x26de69[_0xe4d6('0x0')]||'';this['accountcode']=_0x26de69['accountcode']||'';this['state']=_0xe4d6('0x1');this[_0xe4d6('0x2')]=0x0;this[_0xe4d6('0x3')]=_0xe4d6('0x1');this[_0xe4d6('0x4')]='';}module[_0xe4d6('0x5')]=Telephone; \ No newline at end of file +var _0x3612=['exports','name','accountcode','state','unknown','stateTime','status'];(function(_0x2d05dc,_0x328d03){var _0x2d9ebe=function(_0x578a7e){while(--_0x578a7e){_0x2d05dc['push'](_0x2d05dc['shift']());}};_0x2d9ebe(++_0x328d03);}(_0x3612,0x189));var _0x2361=function(_0x4f74a5,_0x1fd979){_0x4f74a5=_0x4f74a5-0x0;var _0x5be8b2=_0x3612[_0x4f74a5];return _0x5be8b2;};'use strict';function Telephone(_0x1601be){this['id']=_0x1601be['id']||0x0;this['name']=_0x1601be[_0x2361('0x0')]||'';this[_0x2361('0x1')]=_0x1601be[_0x2361('0x1')]||'';this[_0x2361('0x2')]=_0x2361('0x3');this[_0x2361('0x4')]=0x0;this[_0x2361('0x5')]=_0x2361('0x3');this['address']='';}module[_0x2361('0x6')]=Telephone; \ No newline at end of file diff --git a/server/services/ami/model/template.js b/server/services/ami/model/template.js index b2485d2..1206e60 100644 --- a/server/services/ami/model/template.js +++ b/server/services/ami/model/template.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xa9e0=['exports','name'];(function(_0x1db258,_0x154fb6){var _0x15b8b3=function(_0xdc7117){while(--_0xdc7117){_0x1db258['push'](_0x1db258['shift']());}};_0x15b8b3(++_0x154fb6);}(_0xa9e0,0x123));var _0x0a9e=function(_0x491a7f,_0x28bb80){_0x491a7f=_0x491a7f-0x0;var _0x3d8f44=_0xa9e0[_0x491a7f];return _0x3d8f44;};'use strict';function template(_0x1f0015){this['id']=_0x1f0015['id']||0x0;this[_0x0a9e('0x0')]=_0x1f0015[_0x0a9e('0x0')]||'';this['html']=_0x1f0015['html']||'';}module[_0x0a9e('0x1')]=template; \ No newline at end of file +var _0xa9e0=['exports','name'];(function(_0x232bd5,_0x4d1bd5){var _0x9e4a57=function(_0x17d5d9){while(--_0x17d5d9){_0x232bd5['push'](_0x232bd5['shift']());}};_0x9e4a57(++_0x4d1bd5);}(_0xa9e0,0x123));var _0x0a9e=function(_0x6131cd,_0x4c26a1){_0x6131cd=_0x6131cd-0x0;var _0x47e916=_0xa9e0[_0x6131cd];return _0x47e916;};'use strict';function template(_0x1f0015){this['id']=_0x1f0015['id']||0x0;this[_0x0a9e('0x0')]=_0x1f0015[_0x0a9e('0x0')]||'';this['html']=_0x1f0015['html']||'';}module[_0x0a9e('0x1')]=template; \ No newline at end of file diff --git a/server/services/ami/model/trigger.js b/server/services/ami/model/trigger.js index 8350edf..fc833da 100644 --- a/server/services/ami/model/trigger.js +++ b/server/services/ami/model/trigger.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x4fc2=['name','channel','voice','status','AllConditions','AnyConditions','Actions'];(function(_0x38c2f8,_0x4c75bb){var _0x358762=function(_0x1d42ec){while(--_0x1d42ec){_0x38c2f8['push'](_0x38c2f8['shift']());}};_0x358762(++_0x4c75bb);}(_0x4fc2,0x111));var _0x24fc=function(_0x4ec612,_0x57dfd6){_0x4ec612=_0x4ec612-0x0;var _0x52a015=_0x4fc2[_0x4ec612];return _0x52a015;};'use strict';function Trigger(_0x5ea3ab){this['id']=_0x5ea3ab['id']||0x0;this[_0x24fc('0x0')]=_0x5ea3ab[_0x24fc('0x0')]||'';this[_0x24fc('0x1')]=_0x5ea3ab['channel']||_0x24fc('0x2');this[_0x24fc('0x3')]=_0x5ea3ab[_0x24fc('0x3')]||![];this['AllConditions']=_0x5ea3ab[_0x24fc('0x4')]||[];this[_0x24fc('0x5')]=_0x5ea3ab['AnyConditions']||[];this[_0x24fc('0x6')]=_0x5ea3ab[_0x24fc('0x6')]||[];}module['exports']=Trigger; \ No newline at end of file +var _0x1a85=['status','AllConditions','AnyConditions','Actions','name','channel'];(function(_0x1035c1,_0x2d8583){var _0x308d67=function(_0x58ddb6){while(--_0x58ddb6){_0x1035c1['push'](_0x1035c1['shift']());}};_0x308d67(++_0x2d8583);}(_0x1a85,0x178));var _0x51a8=function(_0x119cd8,_0x556b73){_0x119cd8=_0x119cd8-0x0;var _0x7072a3=_0x1a85[_0x119cd8];return _0x7072a3;};'use strict';function Trigger(_0x4570ac){this['id']=_0x4570ac['id']||0x0;this['name']=_0x4570ac[_0x51a8('0x0')]||'';this[_0x51a8('0x1')]=_0x4570ac[_0x51a8('0x1')]||'voice';this['status']=_0x4570ac[_0x51a8('0x2')]||![];this[_0x51a8('0x3')]=_0x4570ac[_0x51a8('0x3')]||[];this['AnyConditions']=_0x4570ac[_0x51a8('0x4')]||[];this['Actions']=_0x4570ac[_0x51a8('0x5')]||[];}module['exports']=Trigger; \ No newline at end of file diff --git a/server/services/ami/model/trunk.js b/server/services/ami/model/trunk.js index eb76c79..483a848 100644 --- a/server/services/ami/model/trunk.js +++ b/server/services/ami/model/trunk.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x88c4=['host','port','domain','domainport','refresh','stateRegistry','registrationtime','address','exports','active','name','state','unknown','status','registry','indexOf','split'];(function(_0x46698a,_0x8de1e4){var _0x356db0=function(_0x19e83c){while(--_0x19e83c){_0x46698a['push'](_0x46698a['shift']());}};_0x356db0(++_0x8de1e4);}(_0x88c4,0x13b));var _0x488c=function(_0x2442b9,_0x3d87e9){_0x2442b9=_0x2442b9-0x0;var _0x31b571=_0x88c4[_0x2442b9];return _0x31b571;};'use strict';function Trunk(_0x2e1921){this['id']=_0x2e1921['id']||0x0;this[_0x488c('0x0')]=_0x2e1921[_0x488c('0x0')]||![];this['name']=_0x2e1921[_0x488c('0x1')]||'';this[_0x488c('0x2')]=_0x488c('0x3');this['stateTime']=0x0;this[_0x488c('0x4')]=_0x488c('0x3');this[_0x488c('0x5')]=_0x2e1921[_0x488c('0x5')]&&_0x2e1921['registry'][_0x488c('0x6')](':')?_0x2e1921[_0x488c('0x5')][_0x488c('0x7')](':')[0x0]:'';this[_0x488c('0x8')]='';this[_0x488c('0x9')]='';this[_0x488c('0xa')]='';this[_0x488c('0xb')]='';this[_0x488c('0xc')]='';this[_0x488c('0xd')]=_0x488c('0x3');this[_0x488c('0xe')]='';this[_0x488c('0xf')]='';this['defaultuser']=_0x2e1921['defaultuser']||'';}module[_0x488c('0x10')]=Trunk; \ No newline at end of file +var _0xd47c=['name','state','stateTime','status','unknown','registry','indexOf','port','domain','domainport','registrationtime','defaultuser','active'];(function(_0x5eab61,_0x20bdc7){var _0x39276a=function(_0x49ffcd){while(--_0x49ffcd){_0x5eab61['push'](_0x5eab61['shift']());}};_0x39276a(++_0x20bdc7);}(_0xd47c,0x1ac));var _0xcd47=function(_0xb02f94,_0x2cf97a){_0xb02f94=_0xb02f94-0x0;var _0x3b481e=_0xd47c[_0xb02f94];return _0x3b481e;};'use strict';function Trunk(_0x6f3477){this['id']=_0x6f3477['id']||0x0;this[_0xcd47('0x0')]=_0x6f3477[_0xcd47('0x0')]||![];this[_0xcd47('0x1')]=_0x6f3477[_0xcd47('0x1')]||'';this[_0xcd47('0x2')]='unknown';this[_0xcd47('0x3')]=0x0;this[_0xcd47('0x4')]=_0xcd47('0x5');this[_0xcd47('0x6')]=_0x6f3477[_0xcd47('0x6')]&&_0x6f3477[_0xcd47('0x6')][_0xcd47('0x7')](':')?_0x6f3477['registry']['split'](':')[0x0]:'';this['host']='';this[_0xcd47('0x8')]='';this[_0xcd47('0x9')]='';this[_0xcd47('0xa')]='';this['refresh']='';this['stateRegistry']=_0xcd47('0x5');this[_0xcd47('0xb')]='';this['address']='';this['defaultuser']=_0x6f3477[_0xcd47('0xc')]||'';}module['exports']=Trunk; \ No newline at end of file diff --git a/server/services/ami/model/voiceExtension.js b/server/services/ami/model/voiceExtension.js index 80f51ba..5c03878 100644 --- a/server/services/ami/model/voiceExtension.js +++ b/server/services/ami/model/voiceExtension.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x7696=['exten','recordingFormat','none','exports'];(function(_0x4698cb,_0xfe5e4d){var _0xd335e2=function(_0x5220a7){while(--_0x5220a7){_0x4698cb['push'](_0x4698cb['shift']());}};_0xd335e2(++_0xfe5e4d);}(_0x7696,0x68));var _0x6769=function(_0xb1e73d,_0x8306af){_0xb1e73d=_0xb1e73d-0x0;var _0x4a7735=_0x7696[_0xb1e73d];return _0x4a7735;};'use strict';function voiceExtension(_0xb1c949){this['id']=_0xb1c949['id']||0x0;this[_0x6769('0x0')]=_0xb1c949['exten']||'';this[_0x6769('0x1')]=_0xb1c949['recordingFormat']||_0x6769('0x2');this['mandatoryDisposition']=_0xb1c949['mandatoryDisposition']||![];}module[_0x6769('0x3')]=voiceExtension; \ No newline at end of file +var _0x06ec=['recordingFormat','none','mandatoryDisposition','exports','exten'];(function(_0x426677,_0x54e1ec){var _0xd3af03=function(_0x4afa6b){while(--_0x4afa6b){_0x426677['push'](_0x426677['shift']());}};_0xd3af03(++_0x54e1ec);}(_0x06ec,0x176));var _0xc06e=function(_0x1a43bf,_0xc4b431){_0x1a43bf=_0x1a43bf-0x0;var _0x5e733f=_0x06ec[_0x1a43bf];return _0x5e733f;};'use strict';function voiceExtension(_0x5bf2d4){this['id']=_0x5bf2d4['id']||0x0;this['exten']=_0x5bf2d4[_0xc06e('0x0')]||'';this[_0xc06e('0x1')]=_0x5bf2d4[_0xc06e('0x1')]||_0xc06e('0x2');this['mandatoryDisposition']=_0x5bf2d4[_0xc06e('0x3')]||![];}module[_0xc06e('0x4')]=voiceExtension; \ No newline at end of file diff --git a/server/services/ami/model/voiceQueue.js b/server/services/ami/model/voiceQueue.js index c4ff948..b6894c2 100644 --- a/server/services/ami/model/voiceQueue.js +++ b/server/services/ami/model/voiceQueue.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x714c=['predictiveIntervalDroppedCallsTimeout','predictiveIntervalAvgTalktime','predictiveIntervalPauses','predictiveIntervalAvailable','predictiveIntervalMaxThreshold','predictiveIntervalMinThreshold','predictiveIntervalErlangCalls','predictiveIntervalErlangCallsDroppedCalls','erlangCalls','erlangCallToSecond','dialRecallMeTimeout','dialRecallInQueue','dialPreviewAutoRecallMe','dialPreviewRecallmeReminder','dialQueueProject2','dialAgiAfterHangupClient','dialAgiAfterHangupAgent','monitor_format','mandatoryDisposition','mandatoryDispositionPause','queueSummaryCountersUpdated','exports','wav49','gsm','fewestcalls','leastrecent','linear','ringall','roundrobin','wrandom','name','type','inbound','waiting','total','sumDuration','sumHoldTime','sumBillable','unmanaged','abandoned','busy','inUse','notInUse','paused','ringing','ringInUse','talking','unknown','acw','acwTimeout','autopause','sendMessageOneNotActive','originated','temp','dialTimezone','dialGlobalInterval','dialActive','dialMethod','progressive','dialLimitChannel','dialLimitQueue','dialPowerLevel','dialPredictiveOptimization','dropRate','dialPredictiveOptimizationPercentage','dialPredictiveInterval','dialOriginateCallerIdName','dialOriginateCallerIdNumber','dialOriginateTimeout','tTxX','dialQueueTimeout','dialQueueProject','dialCongestionMaxRetry','dialCongestionRetryFrequency','dialBusyMaxRetry','dialBusyRetryFrequency','dialNoAnswerMaxRetry','dialNoAnswerRetryFrequency','dialNoSuchNumberMaxRetry','dialNoSuchNumberRetryFrequency','dialDropMaxRetry','dialDropRetryFrequency','dialAbandonedMaxRetry','dialAbandonedRetryFrequency','dialMachineMaxRetry','dialMachineRetryFrequency','dialAgentRejectMaxRetry','dialAgentRejectRetryFrequency','callAdditionalPhoneAfterMin','dialGlobalMaxRetry','Trunk','TrunkBackup','dialPrefix','Interval','dialOrderByScheduledAt','DESC','dialRandomLastDigitCallerIdNumber','dialCutDigit','strategy','queueStatusComplete','dialAMDInitialSilence','dialAMDGreeting','dialAMDAfterGreetingSilence','dialAMDTotalAnalysisTime','dialAMDMinWordLength','dialAMDMaximumNumberOfWords','dialAMDSilenceThreshold','dialAMDMaximumWordLength','outboundRejectCallsDay','pTalking','timeout','outboundAnswerCallsDay','outboundNoAnswerCallsDay','outboundBusyCallsDay','outboundCongestionCallsDay','outboundUnknownCallsDay','outboundBlacklistCallsDay','outboundDropCallsDayTimeout','outboundDropCallsDayACS','outboundReCallsDay','outboundAbandonedDay','startProgressive','startPredictive','predictiveIntervalAnsweredCalls','predictiveIntervalDroppedCallsCallersExit'];(function(_0x2b3c67,_0x17ee21){var _0xf48dad=function(_0x1e6a30){while(--_0x1e6a30){_0x2b3c67['push'](_0x2b3c67['shift']());}};_0xf48dad(++_0x17ee21);}(_0x714c,0x18d));var _0xc714=function(_0x33c70e,_0xd8cb0b){_0x33c70e=_0x33c70e-0x0;var _0x5a33e5=_0x714c[_0x33c70e];return _0x5a33e5;};'use strict';var monitorFormat={'wav':'wav','wav49':_0xc714('0x0'),'gsm':_0xc714('0x1')};var strategy={'fewestcalls':_0xc714('0x2'),'leastrecent':_0xc714('0x3'),'linear':_0xc714('0x4'),'random':'random','ringall':_0xc714('0x5'),'rr':_0xc714('0x6'),'rrmemory':'rrmemory','rrordered':'rrordered','wrandom':_0xc714('0x7')};function VoiceQueue(_0xf624fc){this['id']=_0xf624fc['id']||0x0;this[_0xc714('0x8')]=_0xf624fc[_0xc714('0x8')]||'';this['monitor_format']=_0xf624fc['monitor_format']||'';this[_0xc714('0x9')]=_0xf624fc[_0xc714('0x9')]||_0xc714('0xa');this[_0xc714('0xb')]=0x0;this[_0xc714('0xc')]=0x0;this['answered']=0x0;this[_0xc714('0xd')]=0x0;this[_0xc714('0xe')]=0x0;this[_0xc714('0xf')]=0x0;this[_0xc714('0x10')]=0x0;this[_0xc714('0x11')]=0x0;this['available']=0x0;this[_0xc714('0x12')]=0x0;this[_0xc714('0x13')]=0x0;this['invalid']=0x0;this['loggedIn']=0x0;this[_0xc714('0x14')]=0x0;this['onHold']=0x0;this[_0xc714('0x15')]=0x0;this[_0xc714('0x16')]=0x0;this[_0xc714('0x17')]=0x0;this[_0xc714('0x18')]=0x0;this['unavailable']=0x0;this[_0xc714('0x19')]=0x0;this[_0xc714('0x1a')]=_0xf624fc[_0xc714('0x1a')]||![];this[_0xc714('0x1b')]=_0xf624fc[_0xc714('0x1b')]||0xa;this[_0xc714('0x1c')]=_0xf624fc[_0xc714('0x1c')]||'no';this[_0xc714('0x1d')]=!![];this['message']='';this['statusMessage']='';this[_0xc714('0x1e')]=0x0;this[_0xc714('0x1f')]=0x0;this[_0xc714('0x20')]=_0xf624fc[_0xc714('0x20')]||null;this[_0xc714('0x21')]=_0xf624fc[_0xc714('0x21')]?_0xf624fc[_0xc714('0x21')]:null;this[_0xc714('0x22')]=_0xf624fc['dialActive'];this[_0xc714('0x23')]=_0xf624fc[_0xc714('0x23')]||_0xc714('0x24');this[_0xc714('0x25')]=_0xf624fc['dialLimitChannel']||0x0;this[_0xc714('0x26')]=_0xf624fc[_0xc714('0x26')]||0x0;this[_0xc714('0x27')]=_0xf624fc[_0xc714('0x27')]||0x1;this[_0xc714('0x28')]=_0xf624fc['dialPredictiveOptimization']||_0xc714('0x29');this['dialPredictiveOptimizationPercentage']=_0xf624fc[_0xc714('0x2a')]||0.03;this[_0xc714('0x2b')]=_0xf624fc[_0xc714('0x2b')]||0x258;this[_0xc714('0x2c')]=_0xf624fc[_0xc714('0x2c')]||'anonymous';this['dialOriginateCallerIdNumber']=_0xf624fc[_0xc714('0x2d')]||'anonymous';this[_0xc714('0x2e')]=_0xf624fc[_0xc714('0x2e')]||0x1e;this['dialQueueOptions']=_0xf624fc['dialQueueOptions']||_0xc714('0x2f');this[_0xc714('0x30')]=_0xf624fc[_0xc714('0x30')]||0x3;this[_0xc714('0x31')]=_0xf624fc[_0xc714('0x31')]||undefined;this['dialCongestionMaxRetry']=_0xf624fc[_0xc714('0x32')]||0x3;this[_0xc714('0x33')]=_0xf624fc['dialCongestionRetryFrequency']||0x96;this[_0xc714('0x34')]=_0xf624fc[_0xc714('0x34')]||0x3;this[_0xc714('0x35')]=_0xf624fc['dialBusyRetryFrequency']||0x96;this['dialNoAnswerMaxRetry']=_0xf624fc[_0xc714('0x36')]||0x3;this['dialNoAnswerRetryFrequency']=_0xf624fc[_0xc714('0x37')]||0x96;this[_0xc714('0x38')]=_0xf624fc['dialNoSuchNumberMaxRetry']||0x3;this[_0xc714('0x39')]=_0xf624fc[_0xc714('0x39')]||0x96;this['dialDropMaxRetry']=_0xf624fc[_0xc714('0x3a')]||0x3;this[_0xc714('0x3b')]=_0xf624fc['dialDropRetryFrequency']||0x96;this[_0xc714('0x3c')]=_0xf624fc[_0xc714('0x3c')]||0x3;this[_0xc714('0x3d')]=_0xf624fc[_0xc714('0x3d')]||0x96;this[_0xc714('0x3e')]=_0xf624fc[_0xc714('0x3e')]||0x3;this[_0xc714('0x3f')]=_0xf624fc['dialMachineRetryFrequency']||0x96;this[_0xc714('0x40')]=_0xf624fc[_0xc714('0x40')]||0x3;this[_0xc714('0x41')]=_0xf624fc[_0xc714('0x41')]||0x96;this[_0xc714('0x42')]=_0xf624fc[_0xc714('0x42')]||0x3;this[_0xc714('0x43')]=_0xf624fc[_0xc714('0x43')]||0x4;this[_0xc714('0x44')]=_0xf624fc[_0xc714('0x44')]?_0xf624fc[_0xc714('0x44')]:undefined;this[_0xc714('0x45')]=_0xf624fc[_0xc714('0x45')]?_0xf624fc[_0xc714('0x45')]:undefined;this['dialPrefix']=_0xf624fc[_0xc714('0x46')]||undefined;this[_0xc714('0x47')]=_0xf624fc[_0xc714('0x47')]?_0xf624fc[_0xc714('0x47')]:undefined;this[_0xc714('0x48')]=_0xf624fc[_0xc714('0x48')]||_0xc714('0x49');this[_0xc714('0x4a')]=_0xf624fc[_0xc714('0x4a')]||undefined;this['dialCutDigit']=_0xf624fc[_0xc714('0x4b')]||undefined;this['strategy']=strategy[_0xf624fc[_0xc714('0x4c')]];this[_0xc714('0x4d')]=!![];this['dialAMDActive']=_0xf624fc['dialAMDActive']||![];this[_0xc714('0x4e')]=_0xf624fc[_0xc714('0x4e')];this[_0xc714('0x4f')]=_0xf624fc[_0xc714('0x4f')];this[_0xc714('0x50')]=_0xf624fc['dialAMDAfterGreetingSilence'];this[_0xc714('0x51')]=_0xf624fc[_0xc714('0x51')];this[_0xc714('0x52')]=_0xf624fc['dialAMDMinWordLength'];this['dialAMDBetweenWordsSilence']=_0xf624fc['dialAMDBetweenWordsSilence'];this['dialAMDMaximumNumberOfWords']=_0xf624fc[_0xc714('0x53')];this[_0xc714('0x54')]=_0xf624fc[_0xc714('0x54')];this[_0xc714('0x55')]=_0xf624fc[_0xc714('0x55')];this[_0xc714('0x56')]=0x0;this[_0xc714('0x57')]=0x0;this[_0xc714('0x58')]=_0xf624fc[_0xc714('0x58')];this[_0xc714('0x59')]=0x0;this['outboundAnswerAgiCallsDay']=0x0;this[_0xc714('0x5a')]=0x0;this[_0xc714('0x5b')]=0x0;this[_0xc714('0x5c')]=0x0;this['outboundNoSuchCallsDay']=0x0;this[_0xc714('0x5d')]=0x0;this[_0xc714('0x5e')]=0x0;this['outboundOriginateFailureCallsDay']=0x0;this['outboundDropCallsDayCallersExit']=0x0;this[_0xc714('0x5f')]=0x0;this[_0xc714('0x60')]=0x0;this[_0xc714('0x61')]=0x0;this[_0xc714('0x62')]=0x0;this[_0xc714('0x63')]=undefined;this[_0xc714('0x64')]=undefined;this['handlePredictive']=undefined;this['predictiveIntervalMultiplicativeFactor']=1.05;this['predictiveIntervalTotalCalls']=0x0;this[_0xc714('0x65')]=0x0;this[_0xc714('0x66')]=0x0;this[_0xc714('0x67')]=0x0;this['predictiveIntervalAvgHoldtime']=0x0;this[_0xc714('0x68')]=0x0;this[_0xc714('0x69')]=0x0;this[_0xc714('0x6a')]=0x0;this[_0xc714('0x6b')]=_0xf624fc['dialPredictiveIntervalMaxThreshold']||0x14;this[_0xc714('0x6c')]=_0xf624fc['dialPredictiveIntervalMaxThreshold']||0xa;this[_0xc714('0x6d')]=0x0;this[_0xc714('0x6e')]=0x0;this['predictiveIntervalHitRate']=0x1;this[_0xc714('0x6f')]=0x0;this[_0xc714('0x70')]=0x0;this['erlangAbandonmentRate']=0x0;this['erlangBusyFactor']=0x0;this[_0xc714('0x71')]=_0xf624fc[_0xc714('0x71')]||0x1e;this['dialRecallInQueue']=_0xf624fc[_0xc714('0x72')]||![];this['dialPreviewAutoRecallMe']=!!_0xf624fc[_0xc714('0x73')]||![];this[_0xc714('0x74')]=!!_0xf624fc[_0xc714('0x74')]||![];this[_0xc714('0x75')]=_0xf624fc['dialQueueProject2']||undefined;this[_0xc714('0x76')]=_0xf624fc[_0xc714('0x76')]||![];this[_0xc714('0x77')]=_0xf624fc[_0xc714('0x77')]||![];this[_0xc714('0x78')]=monitorFormat[_0xf624fc[_0xc714('0x78')]]?monitorFormat[_0xf624fc[_0xc714('0x78')]]:undefined;this[_0xc714('0x79')]=_0xf624fc[_0xc714('0x79')]||![];this['mandatoryDispositionPause']=_0xf624fc[_0xc714('0x7a')]?_0xf624fc[_0xc714('0x7a')]:undefined;this[_0xc714('0x7b')]=![];}module[_0xc714('0x7c')]=VoiceQueue; \ No newline at end of file +var _0x6851=['dialOriginateCallerIdName','anonymous','dialOriginateCallerIdNumber','dialOriginateTimeout','dialQueueOptions','tTxX','dialQueueTimeout','dialQueueProject','dialCongestionMaxRetry','dialCongestionRetryFrequency','dialBusyMaxRetry','dialBusyRetryFrequency','dialNoAnswerMaxRetry','dialNoAnswerRetryFrequency','dialNoSuchNumberMaxRetry','dialNoSuchNumberRetryFrequency','dialDropMaxRetry','dialDropRetryFrequency','dialAbandonedMaxRetry','dialAbandonedRetryFrequency','dialMachineMaxRetry','dialMachineRetryFrequency','dialAgentRejectMaxRetry','dialAgentRejectRetryFrequency','callAdditionalPhoneAfterMin','dialGlobalMaxRetry','Trunk','TrunkBackup','dialPrefix','Interval','dialOrderByScheduledAt','DESC','dialRandomLastDigitCallerIdNumber','dialCutDigit','strategy','queueStatusComplete','dialAMDActive','dialAMDInitialSilence','dialAMDGreeting','dialAMDTotalAnalysisTime','dialAMDMinWordLength','dialAMDBetweenWordsSilence','dialAMDMaximumNumberOfWords','dialAMDSilenceThreshold','dialAMDMaximumWordLength','outboundRejectCallsDay','pTalking','timeout','outboundAnswerCallsDay','outboundBusyCallsDay','outboundCongestionCallsDay','outboundUnknownCallsDay','outboundBlacklistCallsDay','outboundDropCallsDayCallersExit','outboundDropCallsDayTimeout','outboundReCallsDay','outboundAbandonedDay','startProgressive','startPredictive','handlePredictive','predictiveIntervalMultiplicativeFactor','predictiveIntervalTotalCalls','predictiveIntervalAnsweredCalls','predictiveIntervalDroppedCallsCallersExit','predictiveIntervalDroppedCallsTimeout','predictiveIntervalAvgHoldtime','predictiveIntervalAvgTalktime','predictiveIntervalAvailable','predictiveIntervalMaxThreshold','dialPredictiveIntervalMaxThreshold','predictiveIntervalMinThreshold','predictiveIntervalErlangCallsDroppedCalls','predictiveIntervalHitRate','erlangCallToSecond','erlangAbandonmentRate','erlangBusyFactor','dialRecallMeTimeout','dialRecallInQueue','dialPreviewAutoRecallMe','dialPreviewRecallmeReminder','dialQueueProject2','dialAgiAfterHangupClient','dialAgiAfterHangupAgent','mandatoryDispositionPause','queueSummaryCountersUpdated','exports','wav','gsm','fewestcalls','leastrecent','linear','random','ringall','rrordered','wrandom','name','monitor_format','type','inbound','waiting','total','answered','sumBillable','abandoned','available','busy','inUse','invalid','loggedIn','onHold','paused','ringing','ringInUse','talking','unavailable','unknown','acw','acwTimeout','autopause','statusMessage','originated','dialGlobalInterval','dialActive','dialMethod','dialLimitChannel','dialLimitQueue','dialPowerLevel','dialPredictiveOptimization','dropRate','dialPredictiveOptimizationPercentage','dialPredictiveInterval'];(function(_0x1422d0,_0x57f03c){var _0x3d5850=function(_0x1d211c){while(--_0x1d211c){_0x1422d0['push'](_0x1422d0['shift']());}};_0x3d5850(++_0x57f03c);}(_0x6851,0x1df));var _0x1685=function(_0x1d3541,_0xc5a50a){_0x1d3541=_0x1d3541-0x0;var _0x2e047a=_0x6851[_0x1d3541];return _0x2e047a;};'use strict';var monitorFormat={'wav':_0x1685('0x0'),'wav49':'wav49','gsm':_0x1685('0x1')};var strategy={'fewestcalls':_0x1685('0x2'),'leastrecent':_0x1685('0x3'),'linear':_0x1685('0x4'),'random':_0x1685('0x5'),'ringall':_0x1685('0x6'),'rr':'roundrobin','rrmemory':'rrmemory','rrordered':_0x1685('0x7'),'wrandom':_0x1685('0x8')};function VoiceQueue(_0x590a99){this['id']=_0x590a99['id']||0x0;this[_0x1685('0x9')]=_0x590a99[_0x1685('0x9')]||'';this[_0x1685('0xa')]=_0x590a99['monitor_format']||'';this['type']=_0x590a99[_0x1685('0xb')]||_0x1685('0xc');this[_0x1685('0xd')]=0x0;this[_0x1685('0xe')]=0x0;this[_0x1685('0xf')]=0x0;this['sumDuration']=0x0;this['sumHoldTime']=0x0;this[_0x1685('0x10')]=0x0;this['unmanaged']=0x0;this[_0x1685('0x11')]=0x0;this[_0x1685('0x12')]=0x0;this[_0x1685('0x13')]=0x0;this[_0x1685('0x14')]=0x0;this[_0x1685('0x15')]=0x0;this[_0x1685('0x16')]=0x0;this['notInUse']=0x0;this[_0x1685('0x17')]=0x0;this[_0x1685('0x18')]=0x0;this[_0x1685('0x19')]=0x0;this[_0x1685('0x1a')]=0x0;this[_0x1685('0x1b')]=0x0;this[_0x1685('0x1c')]=0x0;this[_0x1685('0x1d')]=0x0;this[_0x1685('0x1e')]=_0x590a99[_0x1685('0x1e')]||![];this[_0x1685('0x1f')]=_0x590a99[_0x1685('0x1f')]||0xa;this[_0x1685('0x20')]=_0x590a99[_0x1685('0x20')]||'no';this['sendMessageOneNotActive']=!![];this['message']='';this[_0x1685('0x21')]='';this[_0x1685('0x22')]=0x0;this['temp']=0x0;this['dialTimezone']=_0x590a99['dialTimezone']||null;this[_0x1685('0x23')]=_0x590a99[_0x1685('0x23')]?_0x590a99[_0x1685('0x23')]:null;this['dialActive']=_0x590a99[_0x1685('0x24')];this['dialMethod']=_0x590a99[_0x1685('0x25')]||'progressive';this['dialLimitChannel']=_0x590a99[_0x1685('0x26')]||0x0;this[_0x1685('0x27')]=_0x590a99[_0x1685('0x27')]||0x0;this[_0x1685('0x28')]=_0x590a99[_0x1685('0x28')]||0x1;this[_0x1685('0x29')]=_0x590a99['dialPredictiveOptimization']||_0x1685('0x2a');this[_0x1685('0x2b')]=_0x590a99['dialPredictiveOptimizationPercentage']||0.03;this['dialPredictiveInterval']=_0x590a99[_0x1685('0x2c')]||0x258;this['dialOriginateCallerIdName']=_0x590a99[_0x1685('0x2d')]||_0x1685('0x2e');this[_0x1685('0x2f')]=_0x590a99[_0x1685('0x2f')]||_0x1685('0x2e');this[_0x1685('0x30')]=_0x590a99[_0x1685('0x30')]||0x1e;this['dialQueueOptions']=_0x590a99[_0x1685('0x31')]||_0x1685('0x32');this['dialQueueTimeout']=_0x590a99[_0x1685('0x33')]||0x3;this[_0x1685('0x34')]=_0x590a99[_0x1685('0x34')]||undefined;this[_0x1685('0x35')]=_0x590a99['dialCongestionMaxRetry']||0x3;this['dialCongestionRetryFrequency']=_0x590a99[_0x1685('0x36')]||0x96;this[_0x1685('0x37')]=_0x590a99[_0x1685('0x37')]||0x3;this[_0x1685('0x38')]=_0x590a99[_0x1685('0x38')]||0x96;this[_0x1685('0x39')]=_0x590a99['dialNoAnswerMaxRetry']||0x3;this[_0x1685('0x3a')]=_0x590a99['dialNoAnswerRetryFrequency']||0x96;this[_0x1685('0x3b')]=_0x590a99[_0x1685('0x3b')]||0x3;this['dialNoSuchNumberRetryFrequency']=_0x590a99[_0x1685('0x3c')]||0x96;this[_0x1685('0x3d')]=_0x590a99['dialDropMaxRetry']||0x3;this['dialDropRetryFrequency']=_0x590a99[_0x1685('0x3e')]||0x96;this[_0x1685('0x3f')]=_0x590a99[_0x1685('0x3f')]||0x3;this['dialAbandonedRetryFrequency']=_0x590a99[_0x1685('0x40')]||0x96;this[_0x1685('0x41')]=_0x590a99[_0x1685('0x41')]||0x3;this[_0x1685('0x42')]=_0x590a99[_0x1685('0x42')]||0x96;this[_0x1685('0x43')]=_0x590a99[_0x1685('0x43')]||0x3;this[_0x1685('0x44')]=_0x590a99[_0x1685('0x44')]||0x96;this['callAdditionalPhoneAfterMin']=_0x590a99[_0x1685('0x45')]||0x3;this[_0x1685('0x46')]=_0x590a99['dialGlobalMaxRetry']||0x4;this['Trunk']=_0x590a99[_0x1685('0x47')]?_0x590a99[_0x1685('0x47')]:undefined;this[_0x1685('0x48')]=_0x590a99['TrunkBackup']?_0x590a99[_0x1685('0x48')]:undefined;this['dialPrefix']=_0x590a99[_0x1685('0x49')]||undefined;this['Interval']=_0x590a99['Interval']?_0x590a99[_0x1685('0x4a')]:undefined;this[_0x1685('0x4b')]=_0x590a99[_0x1685('0x4b')]||_0x1685('0x4c');this[_0x1685('0x4d')]=_0x590a99['dialRandomLastDigitCallerIdNumber']||undefined;this[_0x1685('0x4e')]=_0x590a99[_0x1685('0x4e')]||undefined;this['strategy']=strategy[_0x590a99[_0x1685('0x4f')]];this[_0x1685('0x50')]=!![];this[_0x1685('0x51')]=_0x590a99[_0x1685('0x51')]||![];this[_0x1685('0x52')]=_0x590a99['dialAMDInitialSilence'];this[_0x1685('0x53')]=_0x590a99[_0x1685('0x53')];this['dialAMDAfterGreetingSilence']=_0x590a99['dialAMDAfterGreetingSilence'];this['dialAMDTotalAnalysisTime']=_0x590a99[_0x1685('0x54')];this['dialAMDMinWordLength']=_0x590a99[_0x1685('0x55')];this[_0x1685('0x56')]=_0x590a99['dialAMDBetweenWordsSilence'];this[_0x1685('0x57')]=_0x590a99['dialAMDMaximumNumberOfWords'];this[_0x1685('0x58')]=_0x590a99[_0x1685('0x58')];this[_0x1685('0x59')]=_0x590a99[_0x1685('0x59')];this[_0x1685('0x5a')]=0x0;this[_0x1685('0x5b')]=0x0;this[_0x1685('0x5c')]=_0x590a99[_0x1685('0x5c')];this[_0x1685('0x5d')]=0x0;this['outboundAnswerAgiCallsDay']=0x0;this['outboundNoAnswerCallsDay']=0x0;this[_0x1685('0x5e')]=0x0;this[_0x1685('0x5f')]=0x0;this['outboundNoSuchCallsDay']=0x0;this[_0x1685('0x60')]=0x0;this[_0x1685('0x61')]=0x0;this['outboundOriginateFailureCallsDay']=0x0;this[_0x1685('0x62')]=0x0;this[_0x1685('0x63')]=0x0;this['outboundDropCallsDayACS']=0x0;this[_0x1685('0x64')]=0x0;this[_0x1685('0x65')]=0x0;this[_0x1685('0x66')]=undefined;this[_0x1685('0x67')]=undefined;this[_0x1685('0x68')]=undefined;this[_0x1685('0x69')]=1.05;this[_0x1685('0x6a')]=0x0;this[_0x1685('0x6b')]=0x0;this[_0x1685('0x6c')]=0x0;this[_0x1685('0x6d')]=0x0;this[_0x1685('0x6e')]=0x0;this[_0x1685('0x6f')]=0x0;this['predictiveIntervalPauses']=0x0;this[_0x1685('0x70')]=0x0;this[_0x1685('0x71')]=_0x590a99[_0x1685('0x72')]||0x14;this[_0x1685('0x73')]=_0x590a99[_0x1685('0x72')]||0xa;this['predictiveIntervalErlangCalls']=0x0;this[_0x1685('0x74')]=0x0;this[_0x1685('0x75')]=0x1;this['erlangCalls']=0x0;this[_0x1685('0x76')]=0x0;this[_0x1685('0x77')]=0x0;this[_0x1685('0x78')]=0x0;this[_0x1685('0x79')]=_0x590a99[_0x1685('0x79')]||0x1e;this[_0x1685('0x7a')]=_0x590a99[_0x1685('0x7a')]||![];this[_0x1685('0x7b')]=!!_0x590a99['dialPreviewAutoRecallMe']||![];this['dialPreviewRecallmeReminder']=!!_0x590a99[_0x1685('0x7c')]||![];this[_0x1685('0x7d')]=_0x590a99['dialQueueProject2']||undefined;this[_0x1685('0x7e')]=_0x590a99[_0x1685('0x7e')]||![];this[_0x1685('0x7f')]=_0x590a99[_0x1685('0x7f')]||![];this[_0x1685('0xa')]=monitorFormat[_0x590a99[_0x1685('0xa')]]?monitorFormat[_0x590a99[_0x1685('0xa')]]:undefined;this['mandatoryDisposition']=_0x590a99['mandatoryDisposition']||![];this[_0x1685('0x80')]=_0x590a99[_0x1685('0x80')]?_0x590a99[_0x1685('0x80')]:undefined;this[_0x1685('0x81')]=![];}module[_0x1685('0x82')]=VoiceQueue; \ No newline at end of file diff --git a/server/services/ami/model/voiceQueueSummary.js b/server/services/ami/model/voiceQueueSummary.js index 9c594e3..ec62d1d 100644 --- a/server/services/ami/model/voiceQueueSummary.js +++ b/server/services/ami/model/voiceQueueSummary.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x27c5=['outboundAnswerAgiCallsDay','outboundBlacklistCallsDay','outboundCongestionCallsDay','outboundDropCallsDayCallersExit','outboundDropCallsDayTimeout','outboundOriginateFailureCallsDay','outboundRejectCallsDay','predictiveIntervalAnsweredCalls','predictiveIntervalAvgTalktime','predictiveIntervalDroppedCallsCallersExit','predictiveIntervalDroppedCallsTimeout','predictiveIntervalErlangCallsDroppedCalls','predictiveIntervalHitRate','predictiveIntervalMultiplicativeFactor','predictiveIntervalPauses','predictiveIntervalAvailable','predictiveIntervalTotalCalls','erlangCalls','erlangCallToSecond','erlangAbandonmentRate','erlangBusyFactor','startPredictive','startProgressive','message','statusMessage','Trunk','invalid','loggedin','length','includes','status','queue','dialer','exten','compareToInboundQueue','some','prototype','compareToOutboundQueue','active','updateReportFromOutboundQueue','outboundAbandonedCallsDay','preview','exports','loggedInDb','paused','ringing','waiting','available','answered','inUse','loggedIn','originated','outboundAnswerCallsDay','outboundBusyCallsDay','outboundNoAnswerCallsDay','outboundNoSuchCallsDay','outboundReCallsDay','outboundUnknownCallsDay','pTalking','talking','sumBillable','sumDuration','total','name','abandoned','busy','onHold','notInUse','ringInUse','sumHoldTime','type','unavailable','unknown','unmanaged','outbound','dialActive','dialMethod','dialOriginateCallerIdName','dialOriginateCallerIdNumber','dialOriginateTimeout','dialPrefix','temp'];(function(_0x501510,_0x61caa9){var _0x1e6ee5=function(_0x32845b){while(--_0x32845b){_0x501510['push'](_0x501510['shift']());}};_0x1e6ee5(++_0x61caa9);}(_0x27c5,0x173));var _0x527c=function(_0xd3bdab,_0x5d784a){_0xd3bdab=_0xd3bdab-0x0;var _0x1c3178=_0x27c5[_0xd3bdab];return _0x1c3178;};'use strict';var INBOUND_COUNTERS=['available','loggedIn',_0x527c('0x0'),_0x527c('0x1'),_0x527c('0x2'),'talking',_0x527c('0x3')];var OUTBOUND_COUNTERS=[_0x527c('0x4'),_0x527c('0x5'),_0x527c('0x6'),_0x527c('0x7'),_0x527c('0x0'),_0x527c('0x8'),'outboundAbandonedCallsDay',_0x527c('0x9'),'outboundBlacklistCallsDay',_0x527c('0xa'),'outboundCongestionCallsDay',_0x527c('0xb'),_0x527c('0xc'),_0x527c('0xd'),'outboundRejectCallsDay',_0x527c('0xe'),_0x527c('0x1'),_0x527c('0xf'),_0x527c('0x10'),_0x527c('0x11'),_0x527c('0x12'),_0x527c('0x13'),_0x527c('0x3')];function VoiceQueueSummary(_0x17224d){this['id']=_0x17224d['id'];this[_0x527c('0x14')]=_0x17224d[_0x527c('0x14')];this['strategy']=_0x17224d['strategy'];this[_0x527c('0x15')]=_0x17224d[_0x527c('0x15')]||0x0;this[_0x527c('0x5')]=_0x17224d[_0x527c('0x5')]||0x0;this['available']=_0x17224d[_0x527c('0x4')]||0x0;this[_0x527c('0x16')]=_0x17224d['busy']||0x0;this['inUse']=_0x17224d[_0x527c('0x6')]||0x0;this['invalid']=_0x17224d['invalid']||0x0;this[_0x527c('0x7')]=_0x17224d[_0x527c('0x7')]||0x0;this[_0x527c('0x0')]=_0x17224d['loggedInDb']||0x0;this[_0x527c('0x17')]=_0x17224d[_0x527c('0x17')]||0x0;this['notInUse']=_0x17224d[_0x527c('0x18')]||0x0;this['paused']=_0x17224d[_0x527c('0x1')]||0x0;this[_0x527c('0x2')]=_0x17224d['ringing']||0x0;this['ringInUse']=_0x17224d[_0x527c('0x19')];this[_0x527c('0x11')]=_0x17224d[_0x527c('0x11')];this[_0x527c('0x12')]=_0x17224d['sumDuration'];this[_0x527c('0x1a')]=_0x17224d['sumHoldTime']||0x0;this[_0x527c('0x10')]=_0x17224d['talking']||0x0;this[_0x527c('0x13')]=_0x17224d['total']||0x0;this[_0x527c('0x1b')]=_0x17224d[_0x527c('0x1b')];this[_0x527c('0x1c')]=_0x17224d['unavailable']||0x0;this[_0x527c('0x1d')]=_0x17224d['unknown']||0x0;this[_0x527c('0x1e')]=_0x17224d[_0x527c('0x1e')]||0x0;this[_0x527c('0x3')]=_0x17224d[_0x527c('0x3')]||0x0;if(_0x17224d[_0x527c('0x1b')]===_0x527c('0x1f')){this[_0x527c('0xf')]=_0x17224d[_0x527c('0xf')]||0x0;this['dialActive']=_0x17224d[_0x527c('0x20')];this[_0x527c('0x21')]=_0x17224d['dialMethod'];this[_0x527c('0x22')]=_0x17224d['dialOriginateCallerIdName'];this[_0x527c('0x23')]=_0x17224d[_0x527c('0x23')];this[_0x527c('0x24')]=_0x17224d['dialOriginateTimeout'];this['dialPrefix']=_0x17224d[_0x527c('0x25')];this['temp']=_0x17224d[_0x527c('0x26')];this[_0x527c('0x27')]=_0x17224d[_0x527c('0x27')];this['outboundAnswerCallsDay']=_0x17224d[_0x527c('0x9')];this[_0x527c('0x28')]=_0x17224d['outboundBlacklistCallsDay'];this[_0x527c('0xa')]=_0x17224d['outboundBusyCallsDay'];this[_0x527c('0x29')]=_0x17224d[_0x527c('0x29')];this['outboundDropCallsDayACS']=_0x17224d['outboundDropCallsDayACS'];this[_0x527c('0x2a')]=_0x17224d[_0x527c('0x2a')];this[_0x527c('0x2b')]=_0x17224d[_0x527c('0x2b')];this['outboundNoAnswerCallsDay']=_0x17224d[_0x527c('0xb')];this['outboundNoSuchCallsDay']=_0x17224d[_0x527c('0xc')];this[_0x527c('0x2c')]=_0x17224d[_0x527c('0x2c')];this[_0x527c('0xd')]=_0x17224d[_0x527c('0xd')];this[_0x527c('0x2d')]=_0x17224d[_0x527c('0x2d')];this[_0x527c('0xe')]=_0x17224d[_0x527c('0xe')];this['predictiveIntervalAnsweredCalls']=_0x17224d[_0x527c('0x2e')];this['predictiveIntervalAvgHoldtime']=_0x17224d['predictiveIntervalAvgHoldtime'];this[_0x527c('0x2f')]=_0x17224d[_0x527c('0x2f')];this[_0x527c('0x30')]=_0x17224d['predictiveIntervalDroppedCallsCallersExit'];this[_0x527c('0x31')]=_0x17224d[_0x527c('0x31')];this['predictiveIntervalErlangCalls']=_0x17224d['predictiveIntervalErlangCalls'];this[_0x527c('0x32')]=_0x17224d[_0x527c('0x32')];this[_0x527c('0x33')]=_0x17224d['predictiveIntervalHitRate'];this['predictiveIntervalMultiplicativeFactor']=_0x17224d[_0x527c('0x34')];this[_0x527c('0x35')]=_0x17224d['predictiveIntervalPauses'];this['predictiveIntervalAvailable']=_0x17224d[_0x527c('0x36')];this[_0x527c('0x37')]=_0x17224d[_0x527c('0x37')];this['originated']=_0x17224d[_0x527c('0x8')];this[_0x527c('0x38')]=_0x17224d[_0x527c('0x38')];this[_0x527c('0x39')]=_0x17224d[_0x527c('0x39')];this[_0x527c('0x3a')]=_0x17224d[_0x527c('0x3a')];this[_0x527c('0x3b')]=_0x17224d[_0x527c('0x3b')];this[_0x527c('0x3c')]=_0x17224d['startPredictive'];this[_0x527c('0x3d')]=_0x17224d[_0x527c('0x3d')];this[_0x527c('0x3e')]=_0x17224d['message'];this[_0x527c('0x3f')]=_0x17224d[_0x527c('0x3f')];}if(_0x17224d[_0x527c('0x40')]){this['Trunk']={'id':_0x17224d[_0x527c('0x40')]['id'],'name':_0x17224d['Trunk'][_0x527c('0x14')],'active':_0x17224d[_0x527c('0x40')]['active'],'callerid':_0x17224d[_0x527c('0x40')]['callerid']};}}VoiceQueueSummary['prototype']['createReport']=function(_0x32ac87,_0x20a352,_0x588f45,_0x34aeaf){this[_0x527c('0x0')]=0x0;this[_0x527c('0x10')]=0x0;this[_0x527c('0x1')]=0x0;this[_0x527c('0x1d')]=0x0;this[_0x527c('0x18')]=0x0;this[_0x527c('0x6')]=0x0;this['busy']=0x0;this[_0x527c('0x41')]=0x0;this[_0x527c('0x1c')]=0x0;this[_0x527c('0x2')]=0x0;this[_0x527c('0x19')]=0x0;this[_0x527c('0x17')]=0x0;if(_0x588f45){if(_0x588f45[_0x527c('0x4')]){this[_0x527c('0x4')]=Number(_0x588f45[_0x527c('0x4')]);}if(_0x588f45[_0x527c('0x42')]){this[_0x527c('0x7')]=Number(_0x588f45[_0x527c('0x42')]);}if(_0x588f45['callers']){this['waiting']=Number(_0x588f45['callers']);}}for(var _0x448e9e=0x0;_0x448e9e<_0x32ac87[_0x527c('0x43')];_0x448e9e++){var _0x4a0c0b=_0x20a352['SIP/'+_0x32ac87[_0x448e9e]['name']];if(_0x4a0c0b&&_0x4a0c0b['online']){this['loggedInDb']+=0x1;}if(_0x32ac87[_0x448e9e]['incall']==='1'){this[_0x527c('0x10')]+=0x1;}if(_0x32ac87[_0x448e9e][_0x527c('0x1')]==='1'&&!['2','7','8'][_0x527c('0x44')](_0x32ac87[_0x448e9e][_0x527c('0x45')])){this['paused']+=0x1;}switch(_0x32ac87[_0x448e9e][_0x527c('0x45')]){case'0':this[_0x527c('0x1d')]+=0x1;break;case'1':this[_0x527c('0x18')]+=0x1;break;case'2':this[_0x527c('0x6')]+=0x1;break;case'3':this[_0x527c('0x16')]+=0x1;break;case'4':this[_0x527c('0x41')]+=0x1;break;case'5':this['unavailable']+=0x1;break;case'6':this['ringing']+=0x1;break;case'7':this[_0x527c('0x19')]+=0x1;break;case'8':this[_0x527c('0x17')]+=0x1;break;}}if(this[_0x527c('0x21')]==='booked'){var _0x19c523=Object['keys'](_0x34aeaf);for(var _0x57c0fe=0x0;_0x57c0fe<_0x19c523['length'];_0x57c0fe++){var _0x2f1e4f=_0x19c523[_0x57c0fe];var _0x525e07=_0x34aeaf[_0x2f1e4f];if(_0x525e07[_0x527c('0x46')]===this['name']&&_0x525e07[_0x527c('0x1b')]===_0x527c('0x47')&&_0x525e07[_0x527c('0x48')]==='xcally-motion-preview'){this['talking']+=0x1;}}if(this[_0x527c('0x10')]>this[_0x527c('0x6')]){this[_0x527c('0x10')]=this[_0x527c('0x6')];}this['pTalking']=0x0;}return this;};VoiceQueueSummary['prototype'][_0x527c('0x49')]=function(_0x3a574b){var _0xfa300b=![];if(_0x3a574b){_0xfa300b=INBOUND_COUNTERS[_0x527c('0x4a')](function(_0x53ce7e){return this[_0x53ce7e]!==_0x3a574b[_0x53ce7e];},this);}return _0xfa300b;};VoiceQueueSummary[_0x527c('0x4b')][_0x527c('0x4c')]=function(_0x303ab2){var _0x50bfd7=![];var _0x31448d=![];var _0x45fd76=![];if(_0x303ab2){_0x50bfd7=this[_0x527c('0x21')]!==_0x303ab2[_0x527c('0x21')]||this[_0x527c('0x20')]!==_0x303ab2[_0x527c('0x20')]||this[_0x527c('0x3e')]!==_0x303ab2[_0x527c('0x3e')]||this['statusMessage']!==_0x303ab2['statusMessage'];_0x31448d=OUTBOUND_COUNTERS[_0x527c('0x4a')](function(_0x3240bd){return this[_0x3240bd]!==_0x303ab2[_0x3240bd];},this);if(this[_0x527c('0x40')]&&_0x303ab2[_0x527c('0x40')]){_0x45fd76=this[_0x527c('0x40')][_0x527c('0x14')]!==_0x303ab2[_0x527c('0x40')][_0x527c('0x14')]||this[_0x527c('0x40')][_0x527c('0x4d')]!==_0x303ab2[_0x527c('0x40')]['active'];}}return _0x50bfd7||_0x31448d||_0x45fd76;};VoiceQueueSummary[_0x527c('0x4b')][_0x527c('0x4e')]=function(_0x5dc3c5){this[_0x527c('0x5')]=_0x5dc3c5['answered'];this[_0x527c('0x3e')]=_0x5dc3c5['message'];this[_0x527c('0x3f')]=_0x5dc3c5[_0x527c('0x3f')];this[_0x527c('0x8')]=_0x5dc3c5[_0x527c('0x8')];this[_0x527c('0x4f')]=_0x5dc3c5[_0x527c('0x4f')];this[_0x527c('0x9')]=_0x5dc3c5[_0x527c('0x9')];this[_0x527c('0x28')]=_0x5dc3c5[_0x527c('0x28')];this[_0x527c('0xa')]=_0x5dc3c5[_0x527c('0xa')];this[_0x527c('0x29')]=_0x5dc3c5['outboundCongestionCallsDay'];this[_0x527c('0xb')]=_0x5dc3c5[_0x527c('0xb')];this[_0x527c('0xc')]=_0x5dc3c5[_0x527c('0xc')];this['outboundReCallsDay']=_0x5dc3c5['outboundReCallsDay'];this[_0x527c('0x2d')]=_0x5dc3c5['outboundRejectCallsDay'];this[_0x527c('0xe')]=_0x5dc3c5[_0x527c('0xe')];this[_0x527c('0x11')]=_0x5dc3c5[_0x527c('0x11')];this[_0x527c('0x12')]=_0x5dc3c5['sumDuration'];this['total']=_0x5dc3c5[_0x527c('0x13')];if(this['dialMethod']===_0x527c('0x50')){this[_0x527c('0xf')]=_0x5dc3c5['pTalking'];}};module[_0x527c('0x51')]=VoiceQueueSummary; \ No newline at end of file +var _0xab29=['outboundAbandonedCallsDay','outboundAnswerCallsDay','outboundBlacklistCallsDay','outboundBusyCallsDay','outboundCongestionCallsDay','outboundNoSuchCallsDay','outboundReCallsDay','outboundRejectCallsDay','outboundUnknownCallsDay','pTalking','sumBillable','sumDuration','waiting','strategy','abandoned','busy','invalid','onHold','notInUse','ringing','ringInUse','sumHoldTime','total','type','unavailable','unknown','unmanaged','dialActive','dialMethod','dialOriginateCallerIdName','dialOriginateCallerIdNumber','dialPrefix','temp','outboundAnswerAgiCallsDay','outboundDropCallsDayACS','outboundDropCallsDayCallersExit','outboundDropCallsDayTimeout','outboundNoAnswerCallsDay','outboundOriginateFailureCallsDay','predictiveIntervalAnsweredCalls','predictiveIntervalAvgTalktime','predictiveIntervalDroppedCallsCallersExit','predictiveIntervalDroppedCallsTimeout','predictiveIntervalErlangCalls','predictiveIntervalErlangCallsDroppedCalls','predictiveIntervalHitRate','predictiveIntervalMultiplicativeFactor','predictiveIntervalPauses','predictiveIntervalAvailable','predictiveIntervalTotalCalls','originated','erlangCalls','erlangCallToSecond','erlangAbandonmentRate','erlangBusyFactor','startPredictive','startProgressive','message','statusMessage','Trunk','callerid','loggedin','callers','length','SIP/','name','incall','includes','status','keys','exten','xcally-motion-preview','prototype','compareToInboundQueue','some','preview','available','loggedIn','loggedInDb','paused','talking','answered','inUse'];(function(_0x2b7836,_0x277d03){var _0x5c0a66=function(_0x4b3a01){while(--_0x4b3a01){_0x2b7836['push'](_0x2b7836['shift']());}};_0x5c0a66(++_0x277d03);}(_0xab29,0x145));var _0x9ab2=function(_0x132e71,_0x373182){_0x132e71=_0x132e71-0x0;var _0x288901=_0xab29[_0x132e71];return _0x288901;};'use strict';var INBOUND_COUNTERS=[_0x9ab2('0x0'),_0x9ab2('0x1'),_0x9ab2('0x2'),_0x9ab2('0x3'),'ringing',_0x9ab2('0x4'),'waiting'];var OUTBOUND_COUNTERS=[_0x9ab2('0x0'),_0x9ab2('0x5'),_0x9ab2('0x6'),_0x9ab2('0x1'),_0x9ab2('0x2'),'originated',_0x9ab2('0x7'),_0x9ab2('0x8'),_0x9ab2('0x9'),_0x9ab2('0xa'),_0x9ab2('0xb'),'outboundNoAnswerCallsDay',_0x9ab2('0xc'),_0x9ab2('0xd'),_0x9ab2('0xe'),_0x9ab2('0xf'),_0x9ab2('0x3'),_0x9ab2('0x10'),_0x9ab2('0x4'),_0x9ab2('0x11'),_0x9ab2('0x12'),'total',_0x9ab2('0x13')];function VoiceQueueSummary(_0x40aa20){this['id']=_0x40aa20['id'];this['name']=_0x40aa20['name'];this[_0x9ab2('0x14')]=_0x40aa20[_0x9ab2('0x14')];this[_0x9ab2('0x15')]=_0x40aa20['abandoned']||0x0;this[_0x9ab2('0x5')]=_0x40aa20[_0x9ab2('0x5')]||0x0;this['available']=_0x40aa20[_0x9ab2('0x0')]||0x0;this[_0x9ab2('0x16')]=_0x40aa20[_0x9ab2('0x16')]||0x0;this[_0x9ab2('0x6')]=_0x40aa20[_0x9ab2('0x6')]||0x0;this[_0x9ab2('0x17')]=_0x40aa20[_0x9ab2('0x17')]||0x0;this[_0x9ab2('0x1')]=_0x40aa20['loggedIn']||0x0;this[_0x9ab2('0x2')]=_0x40aa20[_0x9ab2('0x2')]||0x0;this[_0x9ab2('0x18')]=_0x40aa20[_0x9ab2('0x18')]||0x0;this[_0x9ab2('0x19')]=_0x40aa20[_0x9ab2('0x19')]||0x0;this['paused']=_0x40aa20['paused']||0x0;this[_0x9ab2('0x1a')]=_0x40aa20['ringing']||0x0;this[_0x9ab2('0x1b')]=_0x40aa20[_0x9ab2('0x1b')];this['sumBillable']=_0x40aa20[_0x9ab2('0x11')];this[_0x9ab2('0x12')]=_0x40aa20['sumDuration'];this[_0x9ab2('0x1c')]=_0x40aa20[_0x9ab2('0x1c')]||0x0;this[_0x9ab2('0x4')]=_0x40aa20[_0x9ab2('0x4')]||0x0;this[_0x9ab2('0x1d')]=_0x40aa20[_0x9ab2('0x1d')]||0x0;this[_0x9ab2('0x1e')]=_0x40aa20[_0x9ab2('0x1e')];this[_0x9ab2('0x1f')]=_0x40aa20[_0x9ab2('0x1f')]||0x0;this[_0x9ab2('0x20')]=_0x40aa20[_0x9ab2('0x20')]||0x0;this[_0x9ab2('0x21')]=_0x40aa20['unmanaged']||0x0;this[_0x9ab2('0x13')]=_0x40aa20[_0x9ab2('0x13')]||0x0;if(_0x40aa20[_0x9ab2('0x1e')]==='outbound'){this[_0x9ab2('0x10')]=_0x40aa20[_0x9ab2('0x10')]||0x0;this[_0x9ab2('0x22')]=_0x40aa20[_0x9ab2('0x22')];this[_0x9ab2('0x23')]=_0x40aa20[_0x9ab2('0x23')];this[_0x9ab2('0x24')]=_0x40aa20[_0x9ab2('0x24')];this[_0x9ab2('0x25')]=_0x40aa20['dialOriginateCallerIdNumber'];this['dialOriginateTimeout']=_0x40aa20['dialOriginateTimeout'];this[_0x9ab2('0x26')]=_0x40aa20[_0x9ab2('0x26')];this[_0x9ab2('0x27')]=_0x40aa20[_0x9ab2('0x27')];this[_0x9ab2('0x28')]=_0x40aa20[_0x9ab2('0x28')];this[_0x9ab2('0x8')]=_0x40aa20[_0x9ab2('0x8')];this[_0x9ab2('0x9')]=_0x40aa20[_0x9ab2('0x9')];this['outboundBusyCallsDay']=_0x40aa20[_0x9ab2('0xa')];this['outboundCongestionCallsDay']=_0x40aa20[_0x9ab2('0xb')];this[_0x9ab2('0x29')]=_0x40aa20['outboundDropCallsDayACS'];this[_0x9ab2('0x2a')]=_0x40aa20['outboundDropCallsDayCallersExit'];this[_0x9ab2('0x2b')]=_0x40aa20[_0x9ab2('0x2b')];this[_0x9ab2('0x2c')]=_0x40aa20[_0x9ab2('0x2c')];this[_0x9ab2('0xc')]=_0x40aa20[_0x9ab2('0xc')];this[_0x9ab2('0x2d')]=_0x40aa20[_0x9ab2('0x2d')];this[_0x9ab2('0xd')]=_0x40aa20['outboundReCallsDay'];this['outboundRejectCallsDay']=_0x40aa20[_0x9ab2('0xe')];this[_0x9ab2('0xf')]=_0x40aa20[_0x9ab2('0xf')];this[_0x9ab2('0x2e')]=_0x40aa20[_0x9ab2('0x2e')];this['predictiveIntervalAvgHoldtime']=_0x40aa20['predictiveIntervalAvgHoldtime'];this[_0x9ab2('0x2f')]=_0x40aa20['predictiveIntervalAvgTalktime'];this[_0x9ab2('0x30')]=_0x40aa20[_0x9ab2('0x30')];this[_0x9ab2('0x31')]=_0x40aa20[_0x9ab2('0x31')];this[_0x9ab2('0x32')]=_0x40aa20[_0x9ab2('0x32')];this[_0x9ab2('0x33')]=_0x40aa20[_0x9ab2('0x33')];this[_0x9ab2('0x34')]=_0x40aa20[_0x9ab2('0x34')];this[_0x9ab2('0x35')]=_0x40aa20[_0x9ab2('0x35')];this[_0x9ab2('0x36')]=_0x40aa20[_0x9ab2('0x36')];this[_0x9ab2('0x37')]=_0x40aa20['predictiveIntervalAvailable'];this[_0x9ab2('0x38')]=_0x40aa20[_0x9ab2('0x38')];this[_0x9ab2('0x39')]=_0x40aa20[_0x9ab2('0x39')];this[_0x9ab2('0x3a')]=_0x40aa20[_0x9ab2('0x3a')];this[_0x9ab2('0x3b')]=_0x40aa20['erlangCallToSecond'];this[_0x9ab2('0x3c')]=_0x40aa20[_0x9ab2('0x3c')];this['erlangBusyFactor']=_0x40aa20[_0x9ab2('0x3d')];this[_0x9ab2('0x3e')]=_0x40aa20[_0x9ab2('0x3e')];this[_0x9ab2('0x3f')]=_0x40aa20[_0x9ab2('0x3f')];this[_0x9ab2('0x40')]=_0x40aa20[_0x9ab2('0x40')];this[_0x9ab2('0x41')]=_0x40aa20[_0x9ab2('0x41')];}if(_0x40aa20[_0x9ab2('0x42')]){this[_0x9ab2('0x42')]={'id':_0x40aa20[_0x9ab2('0x42')]['id'],'name':_0x40aa20[_0x9ab2('0x42')]['name'],'active':_0x40aa20[_0x9ab2('0x42')]['active'],'callerid':_0x40aa20[_0x9ab2('0x42')][_0x9ab2('0x43')]};}}VoiceQueueSummary['prototype']['createReport']=function(_0x40595c,_0xe0e9bb,_0x5020db,_0x2308a0){this['loggedInDb']=0x0;this[_0x9ab2('0x4')]=0x0;this[_0x9ab2('0x3')]=0x0;this[_0x9ab2('0x20')]=0x0;this['notInUse']=0x0;this[_0x9ab2('0x6')]=0x0;this['busy']=0x0;this[_0x9ab2('0x17')]=0x0;this[_0x9ab2('0x1f')]=0x0;this[_0x9ab2('0x1a')]=0x0;this[_0x9ab2('0x1b')]=0x0;this[_0x9ab2('0x18')]=0x0;if(_0x5020db){if(_0x5020db['available']){this['available']=Number(_0x5020db['available']);}if(_0x5020db['loggedin']){this[_0x9ab2('0x1')]=Number(_0x5020db[_0x9ab2('0x44')]);}if(_0x5020db['callers']){this[_0x9ab2('0x13')]=Number(_0x5020db[_0x9ab2('0x45')]);}}for(var _0x1e21f2=0x0;_0x1e21f2<_0x40595c[_0x9ab2('0x46')];_0x1e21f2++){var _0x54f816=_0xe0e9bb[_0x9ab2('0x47')+_0x40595c[_0x1e21f2][_0x9ab2('0x48')]];if(_0x54f816&&_0x54f816['online']){this[_0x9ab2('0x2')]+=0x1;}if(_0x40595c[_0x1e21f2][_0x9ab2('0x49')]==='1'){this[_0x9ab2('0x4')]+=0x1;}if(_0x40595c[_0x1e21f2][_0x9ab2('0x3')]==='1'&&!['2','7','8'][_0x9ab2('0x4a')](_0x40595c[_0x1e21f2][_0x9ab2('0x4b')])){this['paused']+=0x1;}switch(_0x40595c[_0x1e21f2][_0x9ab2('0x4b')]){case'0':this[_0x9ab2('0x20')]+=0x1;break;case'1':this[_0x9ab2('0x19')]+=0x1;break;case'2':this[_0x9ab2('0x6')]+=0x1;break;case'3':this[_0x9ab2('0x16')]+=0x1;break;case'4':this[_0x9ab2('0x17')]+=0x1;break;case'5':this['unavailable']+=0x1;break;case'6':this[_0x9ab2('0x1a')]+=0x1;break;case'7':this['ringInUse']+=0x1;break;case'8':this[_0x9ab2('0x18')]+=0x1;break;}}if(this[_0x9ab2('0x23')]==='booked'){var _0x4833bd=Object[_0x9ab2('0x4c')](_0x2308a0);for(var _0x4e867c=0x0;_0x4e867c<_0x4833bd[_0x9ab2('0x46')];_0x4e867c++){var _0x12472a=_0x4833bd[_0x4e867c];var _0x59f923=_0x2308a0[_0x12472a];if(_0x59f923['queue']===this['name']&&_0x59f923[_0x9ab2('0x1e')]==='dialer'&&_0x59f923[_0x9ab2('0x4d')]===_0x9ab2('0x4e')){this[_0x9ab2('0x4')]+=0x1;}}if(this[_0x9ab2('0x4')]>this['inUse']){this[_0x9ab2('0x4')]=this[_0x9ab2('0x6')];}this[_0x9ab2('0x10')]=0x0;}return this;};VoiceQueueSummary[_0x9ab2('0x4f')][_0x9ab2('0x50')]=function(_0x5ebe13){var _0x6e7986=![];if(_0x5ebe13){_0x6e7986=INBOUND_COUNTERS[_0x9ab2('0x51')](function(_0x13f97b){return this[_0x13f97b]!==_0x5ebe13[_0x13f97b];},this);}return _0x6e7986;};VoiceQueueSummary[_0x9ab2('0x4f')]['compareToOutboundQueue']=function(_0x1363c7){var _0x26ae98=![];var _0x5a2f64=![];var _0x47db6f=![];if(_0x1363c7){_0x26ae98=this[_0x9ab2('0x23')]!==_0x1363c7[_0x9ab2('0x23')]||this[_0x9ab2('0x22')]!==_0x1363c7[_0x9ab2('0x22')]||this['message']!==_0x1363c7[_0x9ab2('0x40')]||this[_0x9ab2('0x41')]!==_0x1363c7['statusMessage'];_0x5a2f64=OUTBOUND_COUNTERS['some'](function(_0x41c33a){return this[_0x41c33a]!==_0x1363c7[_0x41c33a];},this);if(this['Trunk']&&_0x1363c7[_0x9ab2('0x42')]){_0x47db6f=this[_0x9ab2('0x42')][_0x9ab2('0x48')]!==_0x1363c7['Trunk'][_0x9ab2('0x48')]||this[_0x9ab2('0x42')]['active']!==_0x1363c7[_0x9ab2('0x42')]['active'];}}return _0x26ae98||_0x5a2f64||_0x47db6f;};VoiceQueueSummary['prototype']['updateReportFromOutboundQueue']=function(_0x524f14){this[_0x9ab2('0x5')]=_0x524f14[_0x9ab2('0x5')];this[_0x9ab2('0x40')]=_0x524f14[_0x9ab2('0x40')];this['statusMessage']=_0x524f14['statusMessage'];this[_0x9ab2('0x39')]=_0x524f14[_0x9ab2('0x39')];this[_0x9ab2('0x7')]=_0x524f14[_0x9ab2('0x7')];this[_0x9ab2('0x8')]=_0x524f14[_0x9ab2('0x8')];this[_0x9ab2('0x9')]=_0x524f14[_0x9ab2('0x9')];this['outboundBusyCallsDay']=_0x524f14['outboundBusyCallsDay'];this[_0x9ab2('0xb')]=_0x524f14[_0x9ab2('0xb')];this[_0x9ab2('0x2c')]=_0x524f14[_0x9ab2('0x2c')];this['outboundNoSuchCallsDay']=_0x524f14[_0x9ab2('0xc')];this['outboundReCallsDay']=_0x524f14[_0x9ab2('0xd')];this[_0x9ab2('0xe')]=_0x524f14['outboundRejectCallsDay'];this[_0x9ab2('0xf')]=_0x524f14['outboundUnknownCallsDay'];this[_0x9ab2('0x11')]=_0x524f14[_0x9ab2('0x11')];this['sumDuration']=_0x524f14[_0x9ab2('0x12')];this['total']=_0x524f14[_0x9ab2('0x1d')];if(this['dialMethod']===_0x9ab2('0x52')){this[_0x9ab2('0x10')]=_0x524f14[_0x9ab2('0x10')];}};module['exports']=VoiceQueueSummary; \ No newline at end of file diff --git a/server/services/ami/model/vtigerAccount.js b/server/services/ami/model/vtigerAccount.js index bbb33ab..70e20e6 100644 --- a/server/services/ami/model/vtigerAccount.js +++ b/server/services/ami/model/vtigerAccount.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xbe4d=['serverUrl','Configurations','exports','name','username','accessKey','remoteUri'];(function(_0x20a584,_0xe384a5){var _0x4b41a8=function(_0x2127c6){while(--_0x2127c6){_0x20a584['push'](_0x20a584['shift']());}};_0x4b41a8(++_0xe384a5);}(_0xbe4d,0xff));var _0xdbe4=function(_0x1b9f1e,_0x4275b8){_0x1b9f1e=_0x1b9f1e-0x0;var _0x236619=_0xbe4d[_0x1b9f1e];return _0x236619;};'use strict';function VtigerAccount(_0x8eceb){this['id']=_0x8eceb['id']||0x0;this[_0xdbe4('0x0')]=_0x8eceb[_0xdbe4('0x0')]||'';this[_0xdbe4('0x1')]=_0x8eceb['username']||'';this[_0xdbe4('0x2')]=_0x8eceb[_0xdbe4('0x2')]||'';this[_0xdbe4('0x3')]=_0x8eceb[_0xdbe4('0x3')]||'';this['serverUrl']=_0x8eceb[_0xdbe4('0x4')]||'';this[_0xdbe4('0x5')]=_0x8eceb[_0xdbe4('0x5')]||{};}module[_0xdbe4('0x6')]=VtigerAccount; \ No newline at end of file +var _0xae0e=['username','accessKey','remoteUri','serverUrl','Configurations','name'];(function(_0x4d4682,_0x1e8d8e){var _0x58d25b=function(_0x1be006){while(--_0x1be006){_0x4d4682['push'](_0x4d4682['shift']());}};_0x58d25b(++_0x1e8d8e);}(_0xae0e,0x149));var _0xeae0=function(_0x36c0f8,_0x1b5961){_0x36c0f8=_0x36c0f8-0x0;var _0x4b0698=_0xae0e[_0x36c0f8];return _0x4b0698;};'use strict';function VtigerAccount(_0x383c8f){this['id']=_0x383c8f['id']||0x0;this['name']=_0x383c8f[_0xeae0('0x0')]||'';this[_0xeae0('0x1')]=_0x383c8f[_0xeae0('0x1')]||'';this['accessKey']=_0x383c8f[_0xeae0('0x2')]||'';this[_0xeae0('0x3')]=_0x383c8f[_0xeae0('0x3')]||'';this[_0xeae0('0x4')]=_0x383c8f[_0xeae0('0x4')]||'';this[_0xeae0('0x5')]=_0x383c8f[_0xeae0('0x5')]||{};}module['exports']=VtigerAccount; \ No newline at end of file diff --git a/server/services/ami/model/zendeskAccount.js b/server/services/ami/model/zendeskAccount.js index 7a6be8f..7b7955f 100644 --- a/server/services/ami/model/zendeskAccount.js +++ b/server/services/ami/model/zendeskAccount.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xfe56=['serverUrl','Configurations','exports','name','username','password','token','remoteUri','authType','type'];(function(_0x2be8c2,_0x14a4b5){var _0x97f531=function(_0xcee58d){while(--_0xcee58d){_0x2be8c2['push'](_0x2be8c2['shift']());}};_0x97f531(++_0x14a4b5);}(_0xfe56,0x16b));var _0x6fe5=function(_0x14add3,_0x13ce8d){_0x14add3=_0x14add3-0x0;var _0x4a174f=_0xfe56[_0x14add3];return _0x4a174f;};'use strict';function ZendeskAccount(_0x76fd94){this['id']=_0x76fd94['id']||0x0;this['name']=_0x76fd94[_0x6fe5('0x0')]||'';this['username']=_0x76fd94[_0x6fe5('0x1')]||'';this['password']=_0x76fd94[_0x6fe5('0x2')]||'';this[_0x6fe5('0x3')]=_0x76fd94[_0x6fe5('0x3')]||'';this[_0x6fe5('0x4')]=_0x76fd94[_0x6fe5('0x4')]||'';this[_0x6fe5('0x5')]=_0x76fd94[_0x6fe5('0x5')]||'';this[_0x6fe5('0x6')]=_0x76fd94[_0x6fe5('0x6')]||'integrationTab';this[_0x6fe5('0x7')]=_0x76fd94[_0x6fe5('0x7')]||'';this[_0x6fe5('0x8')]=_0x76fd94[_0x6fe5('0x8')]||{};}module[_0x6fe5('0x9')]=ZendeskAccount; \ No newline at end of file +var _0x6d9d=['Configurations','exports','name','username','password','token','remoteUri','authType','type','serverUrl'];(function(_0x59390f,_0x4c609c){var _0x3a962d=function(_0x2c0381){while(--_0x2c0381){_0x59390f['push'](_0x59390f['shift']());}};_0x3a962d(++_0x4c609c);}(_0x6d9d,0x106));var _0xd6d9=function(_0x15d6ad,_0x38e307){_0x15d6ad=_0x15d6ad-0x0;var _0x49d78a=_0x6d9d[_0x15d6ad];return _0x49d78a;};'use strict';function ZendeskAccount(_0xedfdf4){this['id']=_0xedfdf4['id']||0x0;this[_0xd6d9('0x0')]=_0xedfdf4['name']||'';this[_0xd6d9('0x1')]=_0xedfdf4[_0xd6d9('0x1')]||'';this[_0xd6d9('0x2')]=_0xedfdf4[_0xd6d9('0x2')]||'';this[_0xd6d9('0x3')]=_0xedfdf4['token']||'';this[_0xd6d9('0x4')]=_0xedfdf4[_0xd6d9('0x4')]||'';this[_0xd6d9('0x5')]=_0xedfdf4['authType']||'';this['type']=_0xedfdf4[_0xd6d9('0x6')]||'integrationTab';this[_0xd6d9('0x7')]=_0xedfdf4[_0xd6d9('0x7')]||'';this[_0xd6d9('0x8')]=_0xedfdf4['Configurations']||{};}module[_0xd6d9('0x9')]=ZendeskAccount; \ No newline at end of file diff --git a/server/services/ami/model/zohoAccount.js b/server/services/ami/model/zohoAccount.js index 60b03eb..19114da 100644 --- a/server/services/ami/model/zohoAccount.js +++ b/server/services/ami/model/zohoAccount.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x7adb=['serverUrl','code','Configurations','exports','name','description','host','zone','clientId','clientSecret'];(function(_0xc3591f,_0x1363ba){var _0x5ccc6b=function(_0x5a3417){while(--_0x5a3417){_0xc3591f['push'](_0xc3591f['shift']());}};_0x5ccc6b(++_0x1363ba);}(_0x7adb,0x194));var _0xb7ad=function(_0x1b5c07,_0x18f64e){_0x1b5c07=_0x1b5c07-0x0;var _0x472d4f=_0x7adb[_0x1b5c07];return _0x472d4f;};'use strict';function ZohoAccount(_0x50b382){this['id']=_0x50b382['id']||0x0;this[_0xb7ad('0x0')]=_0x50b382[_0xb7ad('0x0')]||'';this[_0xb7ad('0x1')]=_0x50b382[_0xb7ad('0x1')]||'';this[_0xb7ad('0x2')]=_0x50b382[_0xb7ad('0x2')]||'';this[_0xb7ad('0x3')]=_0x50b382['zone']||'';this[_0xb7ad('0x4')]=_0x50b382[_0xb7ad('0x4')]||'';this['clientSecret']=_0x50b382[_0xb7ad('0x5')]||'';this[_0xb7ad('0x6')]=_0x50b382[_0xb7ad('0x6')]||'';this[_0xb7ad('0x7')]=_0x50b382[_0xb7ad('0x7')]||'';this['refreshToken']=_0x50b382['refreshToken']||'';this[_0xb7ad('0x8')]=_0x50b382[_0xb7ad('0x8')]||{};}module[_0xb7ad('0x9')]=ZohoAccount; \ No newline at end of file +var _0xece3=['exports','name','description','host','zone','clientId','clientSecret','code','refreshToken'];(function(_0x23be51,_0xc02a1b){var _0x47a26d=function(_0xa92395){while(--_0xa92395){_0x23be51['push'](_0x23be51['shift']());}};_0x47a26d(++_0xc02a1b);}(_0xece3,0x1c3));var _0x3ece=function(_0x2ae8b5,_0x2a2cb6){_0x2ae8b5=_0x2ae8b5-0x0;var _0x29def1=_0xece3[_0x2ae8b5];return _0x29def1;};'use strict';function ZohoAccount(_0xc49c37){this['id']=_0xc49c37['id']||0x0;this[_0x3ece('0x0')]=_0xc49c37[_0x3ece('0x0')]||'';this['description']=_0xc49c37[_0x3ece('0x1')]||'';this[_0x3ece('0x2')]=_0xc49c37[_0x3ece('0x2')]||'';this[_0x3ece('0x3')]=_0xc49c37['zone']||'';this['clientId']=_0xc49c37[_0x3ece('0x4')]||'';this[_0x3ece('0x5')]=_0xc49c37[_0x3ece('0x5')]||'';this['serverUrl']=_0xc49c37['serverUrl']||'';this[_0x3ece('0x6')]=_0xc49c37[_0x3ece('0x6')]||'';this[_0x3ece('0x7')]=_0xc49c37[_0x3ece('0x7')]||'';this['Configurations']=_0xc49c37['Configurations']||{};}module[_0x3ece('0x8')]=ZohoAccount; \ No newline at end of file diff --git a/server/services/ami/preview/action.js b/server/services/ami/preview/action.js index fe8aeb5..9da7ebd 100644 --- a/server/services/ami/preview/action.js +++ b/server/services/ami/preview/action.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xd914=['format','SIP/%s','phone','Contact','firstName','lastName','active','scheduledat','countbusyretry','countcongestionretry','countnoanswerretry','countglobal','countnosuchnumberretry','countabandonedretry','countmachineretry','countagentrejectretry','countdropretry','callback','callbackuniqueid','callbackat','recallme','ContactId','ListId','UserId','Agent','VoiceQueueId','originatecalleridnum','originatecalleridname','prototype','\x22%s\x22\x20<%s>','calleridname','util','lodash','isNil','string','uniqueid','idContact','queue','name','type','campaigntype','dialAnswer','membername','channelAgent'];(function(_0x497d8e,_0x3a2dae){var _0x3a4344=function(_0x284b43){while(--_0x284b43){_0x497d8e['push'](_0x497d8e['shift']());}};_0x3a4344(++_0x3a2dae);}(_0xd914,0x17f));var _0x4d91=function(_0x34bf97,_0xc60f9d){_0x34bf97=_0x34bf97-0x0;var _0x292719=_0xd914[_0x34bf97];return _0x292719;};'use strict';var util=require(_0x4d91('0x0'));var _=require(_0x4d91('0x1'));var moment=require('moment');function checkNameSurname(_0x212202,_0x17d4ce,_0x3b8cae){var _0x2314d1='';if(!_[_0x4d91('0x2')](_0x17d4ce)&&_0x4d91('0x3')===typeof _0x17d4ce){_0x2314d1+=_0x17d4ce;}if(!_['isNil'](_0x3b8cae)&&_0x4d91('0x3')===typeof _0x3b8cae){_0x2314d1+='\x20'+_0x3b8cae;}if(_0x2314d1!==''){return _0x2314d1;}return _0x212202;}function Action(_0x5d8af4,_0x3ab6f8,_0x42d7ae,_0x175ce3,_0x27c0d5){this[_0x4d91('0x4')]=_0x42d7ae||undefined;this[_0x4d91('0x5')]=_0x5d8af4['id'];this[_0x4d91('0x6')]=_0x3ab6f8[_0x4d91('0x7')];this['type']=_0x3ab6f8[_0x4d91('0x8')];this[_0x4d91('0x9')]=_0x4d91('0x6');this[_0x4d91('0xa')]=![];this[_0x4d91('0xb')]=_[_0x4d91('0x2')](_0x5d8af4['Agent'])?undefined:_0x5d8af4['Agent'][_0x4d91('0x7')];this[_0x4d91('0xc')]=this[_0x4d91('0xb')]?util[_0x4d91('0xd')](_0x4d91('0xe'),this[_0x4d91('0xb')]):_0x175ce3||undefined;this['calleridname']=checkNameSurname(_0x5d8af4['Contact'][_0x4d91('0xf')],_0x5d8af4[_0x4d91('0x10')][_0x4d91('0x11')],_0x5d8af4[_0x4d91('0x10')][_0x4d91('0x12')]);this[_0x4d91('0x13')]=_0x5d8af4[_0x4d91('0x13')]||![];this['calleridnum']=_0x5d8af4[_0x4d91('0xf')];this[_0x4d91('0x14')]=_0x5d8af4[_0x4d91('0x14')];this[_0x4d91('0x15')]=_0x5d8af4[_0x4d91('0x15')]||0x0;this['countcongestionretry']=_0x5d8af4[_0x4d91('0x16')]||0x0;this[_0x4d91('0x17')]=_0x5d8af4[_0x4d91('0x17')]||0x0;this[_0x4d91('0x18')]=(_0x5d8af4['countbusyretry']||0x0)+(_0x5d8af4[_0x4d91('0x16')]||0x0)+(_0x5d8af4[_0x4d91('0x17')]||0x0)+(_0x5d8af4[_0x4d91('0x19')]||0x0)+(_0x5d8af4['countdropretry']||0x0)+(_0x5d8af4[_0x4d91('0x1a')]||0x0)+(_0x5d8af4[_0x4d91('0x1b')]||0x0)+(_0x5d8af4[_0x4d91('0x1c')]||0x0);this[_0x4d91('0x19')]=_0x5d8af4[_0x4d91('0x19')]||0x0;this[_0x4d91('0x1d')]=_0x5d8af4[_0x4d91('0x1d')]||0x0;this[_0x4d91('0x1a')]=_0x5d8af4[_0x4d91('0x1a')]||0x0;this[_0x4d91('0x1b')]=_0x5d8af4['countmachineretry']||0x0;this[_0x4d91('0x1c')]=_0x5d8af4['countagentrejectretry']||0x0;this['callback']=_0x5d8af4[_0x4d91('0x1e')];this[_0x4d91('0x1f')]=_0x5d8af4[_0x4d91('0x1f')];this[_0x4d91('0x20')]=_0x5d8af4[_0x4d91('0x20')];this[_0x4d91('0x21')]=_0x5d8af4[_0x4d91('0x21')];this[_0x4d91('0x22')]=_0x5d8af4['ContactId'];this['ListId']=_0x5d8af4[_0x4d91('0x23')];this[_0x4d91('0x24')]=_[_0x4d91('0x2')](_0x5d8af4[_0x4d91('0x25')])?_0x5d8af4[_0x4d91('0x24')]:_0x5d8af4[_0x4d91('0x25')]['id'];this[_0x4d91('0x26')]=_0x5d8af4['VoiceQueueId'];this[_0x4d91('0x27')]='';this[_0x4d91('0x28')]='';}Action[_0x4d91('0x29')]['getCaller']=function(){return util['format'](_0x4d91('0x2a'),this[_0x4d91('0x2b')],this['number']);};module['exports']=Action; \ No newline at end of file +var _0xa456=['originatecalleridnum','originatecalleridname','getCaller','format','\x22%s\x22\x20<%s>','number','exports','util','lodash','moment','isNil','string','uniqueid','idContact','queue','type','campaigntype','dialAnswer','membername','name','channelAgent','calleridname','Contact','phone','lastName','active','calleridnum','scheduledat','countcongestionretry','countnoanswerretry','countbusyretry','countmachineretry','countagentrejectretry','countnosuchnumberretry','countdropretry','countabandonedretry','callback','callbackuniqueid','callbackat','recallme','ContactId','ListId','UserId','Agent','VoiceQueueId'];(function(_0x167cc1,_0x56ef5a){var _0x10bc4b=function(_0xd6a255){while(--_0xd6a255){_0x167cc1['push'](_0x167cc1['shift']());}};_0x10bc4b(++_0x56ef5a);}(_0xa456,0x142));var _0x6a45=function(_0x341e0f,_0x4a09d0){_0x341e0f=_0x341e0f-0x0;var _0x59555a=_0xa456[_0x341e0f];return _0x59555a;};'use strict';var util=require(_0x6a45('0x0'));var _=require(_0x6a45('0x1'));var moment=require(_0x6a45('0x2'));function checkNameSurname(_0xd5464e,_0x587626,_0x3bfbe6){var _0x206f6b='';if(!_[_0x6a45('0x3')](_0x587626)&&'string'===typeof _0x587626){_0x206f6b+=_0x587626;}if(!_[_0x6a45('0x3')](_0x3bfbe6)&&_0x6a45('0x4')===typeof _0x3bfbe6){_0x206f6b+='\x20'+_0x3bfbe6;}if(_0x206f6b!==''){return _0x206f6b;}return _0xd5464e;}function Action(_0x1e5882,_0x14da6b,_0x4dfbfa,_0x25cf8d,_0x26bfc0){this[_0x6a45('0x5')]=_0x4dfbfa||undefined;this[_0x6a45('0x6')]=_0x1e5882['id'];this[_0x6a45('0x7')]=_0x14da6b['name'];this[_0x6a45('0x8')]=_0x14da6b['type'];this[_0x6a45('0x9')]=_0x6a45('0x7');this[_0x6a45('0xa')]=![];this[_0x6a45('0xb')]=_[_0x6a45('0x3')](_0x1e5882['Agent'])?undefined:_0x1e5882['Agent'][_0x6a45('0xc')];this[_0x6a45('0xd')]=this['membername']?util['format']('SIP/%s',this[_0x6a45('0xb')]):_0x25cf8d||undefined;this[_0x6a45('0xe')]=checkNameSurname(_0x1e5882[_0x6a45('0xf')][_0x6a45('0x10')],_0x1e5882[_0x6a45('0xf')]['firstName'],_0x1e5882['Contact'][_0x6a45('0x11')]);this[_0x6a45('0x12')]=_0x1e5882['active']||![];this[_0x6a45('0x13')]=_0x1e5882[_0x6a45('0x10')];this[_0x6a45('0x14')]=_0x1e5882[_0x6a45('0x14')];this['countbusyretry']=_0x1e5882['countbusyretry']||0x0;this['countcongestionretry']=_0x1e5882[_0x6a45('0x15')]||0x0;this[_0x6a45('0x16')]=_0x1e5882[_0x6a45('0x16')]||0x0;this['countglobal']=(_0x1e5882[_0x6a45('0x17')]||0x0)+(_0x1e5882[_0x6a45('0x15')]||0x0)+(_0x1e5882[_0x6a45('0x16')]||0x0)+(_0x1e5882['countnosuchnumberretry']||0x0)+(_0x1e5882['countdropretry']||0x0)+(_0x1e5882['countabandonedretry']||0x0)+(_0x1e5882[_0x6a45('0x18')]||0x0)+(_0x1e5882[_0x6a45('0x19')]||0x0);this['countnosuchnumberretry']=_0x1e5882[_0x6a45('0x1a')]||0x0;this[_0x6a45('0x1b')]=_0x1e5882['countdropretry']||0x0;this[_0x6a45('0x1c')]=_0x1e5882[_0x6a45('0x1c')]||0x0;this[_0x6a45('0x18')]=_0x1e5882[_0x6a45('0x18')]||0x0;this[_0x6a45('0x19')]=_0x1e5882['countagentrejectretry']||0x0;this['callback']=_0x1e5882[_0x6a45('0x1d')];this[_0x6a45('0x1e')]=_0x1e5882[_0x6a45('0x1e')];this[_0x6a45('0x1f')]=_0x1e5882[_0x6a45('0x1f')];this[_0x6a45('0x20')]=_0x1e5882[_0x6a45('0x20')];this[_0x6a45('0x21')]=_0x1e5882[_0x6a45('0x21')];this[_0x6a45('0x22')]=_0x1e5882[_0x6a45('0x22')];this[_0x6a45('0x23')]=_['isNil'](_0x1e5882[_0x6a45('0x24')])?_0x1e5882['UserId']:_0x1e5882[_0x6a45('0x24')]['id'];this[_0x6a45('0x25')]=_0x1e5882[_0x6a45('0x25')];this[_0x6a45('0x26')]='';this[_0x6a45('0x27')]='';}Action['prototype'][_0x6a45('0x28')]=function(){return util[_0x6a45('0x29')](_0x6a45('0x2a'),this[_0x6a45('0xe')],this[_0x6a45('0x2b')]);};module[_0x6a45('0x2c')]=Action; \ No newline at end of file diff --git a/server/services/ami/preview/index.js b/server/services/ami/preview/index.js index 573cc54..747e199 100644 --- a/server/services/ami/preview/index.js +++ b/server/services/ami/preview/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x0142=['localhost','socket.io-emitter','prototype','tail','finally','sequence','trunks','actions','agents','clockClearZombieChannels','originateresponse','syncOriginateResponse','bind','syncHangup','hanguprequest','syncHangupRequest','dialend','newexten','syncNewExten','varset','syncVarSet','attendedtransfer','syncAttendedTransfer','blindtransfer','syncBlindTransfer','loopCampaigns','campaignsPreview','info','[DEBUG]\x20Emit\x20voice_queue_channel:remove\x20event','stringify','voice:queue:%s','name','voice_queue_channel:remove','emit','voice_queue_presence:remove','sendMessageOneNotActive','originated','pTalking','paused','message','INACTIVE','logger','[CampaignPreview]\x20Campaign\x20Queue:\x20','DEACTIVATED','\x20is\x20deactivated','syncCampaigns','hasOwnProperty','dialMethod','outbound','clearZombieChannels','preview','type','dialActive','setMessage','dialPreviewAutoRecallMe','recallMe','enqueue','isNil','Queue','queue','originated:\x20','dialAnswer','pick','VoiceQueueId','ListId','status','channel','No\x20such\x20channel','updateOriginated','[clearZombieChannel]','decrementTalkink','loggerError','[Dialer][checkChannel][Preview]','[action]','size','clearZombieChannel','agentReadyId','then','length','getDiff','scheduledat','dialRecallMeTimeout','Agent','voicePause','logger2','catch','[RecallMe]','disableContact','starttime','format','YYYY-MM-DD\x20HH:mm:ss','logCustomer','dialRecallInQueue','rescheduleContactInQueue','createBody','RecallFailedTimeout','[HistoryRecallClose]','createCustomerFinal','[getContactRecallMe]','IsNotLoggedIn','CAMPAIGN_STATUS','NO_AGENTS_LOGGED','isActive','Trunk','isTrunkReachable','TrunkBackup','UNREACHABLE_TRUNK','ACTIVE','callProgressDetectingCustomer','countnosuchnumberretry','countglobal','totalGlobal','NoSuchNumber','custom:agentnosuchnumber','createCustomerHistory','[callProgressDetectingCustomer][logNoSuch]','verifyAdditionalPhones','additional','dialNoSuchNumberRetryFrequency','callAdditionalPhoneAfterMin','dialGlobalMaxRetry','cloneAction','Global','[callProgressDetectingCustomer][logNoSuchGlobal]','dialNoSuchNumberMaxRetry','rescheduleContact','unlockAgent','activeContact','actioncountonusuch','incrementPreviewCounters','swapAdditionalPhones','ANSWER','responsetime','answertime','[syncHangup][talking][increment]','uniqueid','pTalking:\x20','custom:agentconnect','connect','acw','custom:agentConnectPreview','custom:agentcomplete','buildObj','complete','answered','[16]','Answer','[callProgressDetectingCustomer][logAnswer]','[callProgressDetectingCustomer][logAnswerGlobal]','crateCustomerReportQueue','sumDuration','sumBillable','talktime','\x20Queue','linkedid','BUSY','countbusyretry','Busy','dialBusyRetryFrequency','custom:agentbusy','busy','[callProgressDetectingCustomer][logBusyGlobal]','[callProgressDetectingCustomer][logBusy]','idContact','outboundNoAnswerCallsDay','countnoanswerretry','NoAnswer','custom:agentnoanswer','[callProgressDetectingCustomer][logNoAnswer]','[callProgressDetectingCustomer][logNoAnswerGlobal]','dialNoAnswerMaxRetry','dialNoAnswerRetryFrequency','CONGESTION','outboundCongestionCallsDay','Congestion','dialCongestionRetryFrequency','congestion','[callProgressDetectingCustomer][logCongestion]','[callProgressDetectingCustomer][logCongestionGlobal]','countcongestionretry','CANCEL','countagentrejectretry','AgentReject','dialAgentRejectRetryFrequency','custom:agentreject','[callProgressDetectingCustomer][logAgentReject]','dialAgentRejectMaxRetry','scheduledAt','ABANDONED','outboundAbandonedCallsDay','[callProgressDetectingCustomer][logAbandoned]','countabandonedetry','dialAbandonedMaxRety','dialAbandonedRetryFrequency','outboundUnknownCallsDay','cause-txt','dialstatus','[callProgressDetectingCustomer][hangupInAMD]','[callProgressDetectingCustomer][machine]','[default]','[Dialer][decrementTalkink][no\x20Hangup][Preview]','[callProgressDetectingCustomer][logUnknown]','[callProgressDetectingCustomer][logUnknownGlobal]','[callProgressDetectingCustomer]','[originated][decrement][callProgressDetectingCustomer]','destlinkedid','queueSummaryCountersUpdated','callProgressDetectingAgent','isUndefined','object','reason','createAgentHistory','[callProgressDetectingAgent][logNoSuch]','logAgent','[callProgressDetectingAgent][logNoAnswer]','[callProgressDetectingAgent][logCongestion]','[callProgressDetectingAgent][logAnswerAGI]','[callProgressDetectingAgent]','[originated][decrement][callProgressDetectingAgent]','[verifyAdditionalPhone]\x20','[swapAdditionalPhone]\x20','resolve','checkInBlack','Contact','phone','isEmpty','execCall','[Preview][execCall][success]','\x20IdHopper:\x20','called','Calling','[Preview][execCall][failure]','Call\x20failed','outboundBlacklistCallsDay','logBlacklist','createHistory','[Blacklist][error]','Contact\x20in\x20black\x20List','SIP/%s','reachable','unmonitored','run','unlock','execRun','getContactPreview','recallme','validateContact','isValid','checkIsBlackList','[Preview][checkIsBlackList]','[Preview][getContactPreview]','Call\x20unsuccessful','[Preview][validateContact][Empty\x20Campaign]','Empty\x20Campaign','campaign\x20Name:\x20','\x20Trunk\x20is\x20not\x20active','\x20Trunk\x20Backup\x20is\x20not\x20active','Trunk\x20not\x20working\x20correctly','[Preview][validateContact][Campaign\x20Active]','\x20Not\x20Active','Is\x20Valid','SIP/%s/%s%s','dialPrefix','trim','dialCutDigit','substring','getCallerId','callerid','getCallerIdRandom','dialOriginateCallerIdNumber','dialRandomLastDigitCallerIdNumber','dialOriginateCallerIdName','originatecalleridnum','addVariables','setXMDContactVariables','assign','toLowerVariables','variables','variablesAction','Action','[originated][increment]','OriginateError','[originateFailure][logOriginateFailure]','actionid','lookAgent','logLookAgent','clone','isFailure','response','unlockContact','custom:agentringnoanswer','rejected','[callProgressDetectingAgent][logAnswer]','[syncHangup][talking]','cause','[syncHangup][talking][cause]','statedesc','channelstate','transfer','syncDialEnd','destuniqueid','filterKey','keys','variable','addVariable','value','error','[syncVarSet][Preview]','inspect','transfertargetlinkedid','transfererlinkedid','exports','util','lodash','uuid','ioredis','../../../config/environment','../../../config/logger','actionPreview','./rpcDb','../rpc/cmHopperAdditionalPhone','./action','./util/util','../dialer/utils','redis','defaults'];(function(_0x5467e9,_0x348f1d){var _0x205620=function(_0x14784e){while(--_0x14784e){_0x5467e9['push'](_0x5467e9['shift']());}};_0x205620(++_0x348f1d);}(_0x0142,0x138));var _0x2014=function(_0x177fb0,_0x210ea7){_0x177fb0=_0x177fb0-0x0;var _0xeb5ec5=_0x0142[_0x177fb0];return _0xeb5ec5;};'use strict';var util=require(_0x2014('0x0'));var _=require(_0x2014('0x1'));var uuid=require(_0x2014('0x2'));var moment=require('moment');var Redis=require(_0x2014('0x3'));var config=require(_0x2014('0x4'));var logger=require(_0x2014('0x5'))('preview');var loggerAction=require(_0x2014('0x5'))(_0x2014('0x6'));var ami=require('../ami');var rpcDb=require(_0x2014('0x7'));var cmHopperAdditionalPhone=require(_0x2014('0x8'));var Action=require(_0x2014('0x9'));var ut=require(_0x2014('0xa'));var utils=require(_0x2014('0xb'));config[_0x2014('0xc')]=_[_0x2014('0xd')](config['redis'],{'host':_0x2014('0xe'),'port':0x18eb});var io=require(_0x2014('0xf'))(new Redis(config['redis']));var Sequence=function(){};Sequence[_0x2014('0x10')]['enqueue']=function(_0x42d344){this[_0x2014('0x11')]=this['tail']?this['tail'][_0x2014('0x12')](_0x42d344):_0x42d344();};function Preview(_0x5592cd){this[_0x2014('0x13')]=new Sequence();this['campaignsPreview']=_0x5592cd['voiceQueues'];this[_0x2014('0x14')]=_0x5592cd[_0x2014('0x14')];this[_0x2014('0x15')]={};this[_0x2014('0x16')]=_0x5592cd[_0x2014('0x16')];this[_0x2014('0x17')]=0x0;ami['on'](_0x2014('0x18'),this[_0x2014('0x19')][_0x2014('0x1a')](this));ami['on']('hangup',this[_0x2014('0x1b')]['bind'](this));ami['on'](_0x2014('0x1c'),this[_0x2014('0x1d')]['bind'](this));ami['on'](_0x2014('0x1e'),this['syncDialEnd'][_0x2014('0x1a')](this));ami['on'](_0x2014('0x1f'),this[_0x2014('0x20')]['bind'](this));ami['on'](_0x2014('0x21'),this[_0x2014('0x22')][_0x2014('0x1a')](this));ami['on'](_0x2014('0x23'),this[_0x2014('0x24')][_0x2014('0x1a')](this));ami['on'](_0x2014('0x25'),this[_0x2014('0x26')]['bind'](this));this[_0x2014('0x27')](this[_0x2014('0x28')]);}function emit(_0x75030c,_0x2f74b1,_0x34ba0f){io['to'](_0x75030c)['emit'](_0x2f74b1,_0x34ba0f);}function emitVoiceQueueChannelRemove(_0x21b64d){logger[_0x2014('0x29')](_0x2014('0x2a'),JSON[_0x2014('0x2b')](_0x21b64d));emit(util['format'](_0x2014('0x2c'),_0x21b64d[_0x2014('0x2d')]),_0x2014('0x2e'),_0x21b64d);io[_0x2014('0x2f')](_0x2014('0x30'),_0x21b64d);}function notSendMessagesQueue(_0x701c36){if(_0x701c36[_0x2014('0x31')]){if(_0x701c36[_0x2014('0x32')]===0x0&&_0x701c36[_0x2014('0x33')]===0x0){_0x701c36[_0x2014('0x31')]=![];_0x701c36['available']=0x0;_0x701c36[_0x2014('0x34')]=0x0;_0x701c36[_0x2014('0x35')]=utils['CAMPAIGN_STATUS'][_0x2014('0x36')];ut[_0x2014('0x37')](_0x2014('0x38'),_0x701c36[_0x2014('0x2d')]+'\x20is\x20not\x20active');}else{_0x701c36[_0x2014('0x35')]=utils['CAMPAIGN_STATUS'][_0x2014('0x39')];ut[_0x2014('0x37')](_0x2014('0x38'),_0x701c36['name']+_0x2014('0x3a'));}}}Preview[_0x2014('0x10')][_0x2014('0x27')]=function(){var _0x10a954=this;setInterval(function(){_0x10a954[_0x2014('0x3b')]();},0x7cf);};Preview[_0x2014('0x10')][_0x2014('0x3b')]=function(){var _0x198b8d=this[_0x2014('0x28')];this['clockClearZombieChannels']+=0x1;for(var _0x3004d3 in _0x198b8d){if(_0x198b8d[_0x2014('0x3c')](_0x3004d3)&&(_0x198b8d[_0x3004d3][_0x2014('0x3d')]==='preview'||_0x198b8d[_0x3004d3]['dialMethod']==='booked')&&_0x198b8d[_0x3004d3]['type']===_0x2014('0x3e')){if(this[_0x2014('0x17')]>0x7){this['clockClearZombieChannels']=0x0;this[_0x2014('0x3f')]();}}if(_0x198b8d['hasOwnProperty'](_0x3004d3)&&_0x198b8d[_0x3004d3][_0x2014('0x3d')]===_0x2014('0x40')&&_0x198b8d[_0x3004d3][_0x2014('0x41')]===_0x2014('0x3e')){if(_0x198b8d[_0x3004d3][_0x2014('0x42')]){this[_0x2014('0x43')](_0x198b8d[_0x3004d3]);if(_0x198b8d[_0x3004d3][_0x2014('0x44')])this[_0x2014('0x45')](_0x198b8d[_0x3004d3]);}else{notSendMessagesQueue(_0x198b8d[_0x3004d3]);}}}};Preview['prototype']['clearZombieChannel']=function(_0x5c819f){var _0x199a4d=this;this[_0x2014('0x13')][_0x2014('0x46')](function(){if(!_[_0x2014('0x47')](_0x199a4d[_0x2014('0x15')][_0x5c819f])){loggerAction[_0x2014('0x29')]('[clearZombieChannels][talking]',_0x5c819f,_0x2014('0x48'),_0x199a4d[_0x2014('0x15')][_0x5c819f][_0x2014('0x49')],_0x2014('0x4a'),JSON[_0x2014('0x2b')](_0x199a4d[_0x2014('0x28')][_0x199a4d['actions'][_0x5c819f][_0x2014('0x49')]][_0x2014('0x32')]),'pTalking:\x20',JSON['stringify'](_0x199a4d[_0x2014('0x28')][_0x199a4d[_0x2014('0x15')][_0x5c819f][_0x2014('0x49')]][_0x2014('0x33')]),JSON[_0x2014('0x2b')](_0x199a4d[_0x2014('0x15')][_0x5c819f][_0x2014('0x4b')]),JSON[_0x2014('0x2b')](_[_0x2014('0x4c')](_0x199a4d[_0x2014('0x15')][_0x5c819f],['contactId','UserId',_0x2014('0x4d'),_0x2014('0x4e')])));return ami['Action']({'action':_0x2014('0x4f'),'channel':_0x199a4d['actions'][_0x5c819f][_0x2014('0x50')]})['catch'](function(_0x479d99){if(_0x479d99[_0x2014('0x35')]===_0x2014('0x51')){setTimeout(function(){if(_0x199a4d[_0x2014('0x15')][_0x5c819f]){ut[_0x2014('0x52')](_0x199a4d['campaignsPreview'][_0x199a4d[_0x2014('0x15')][_0x5c819f]['queue']],_0x2014('0x53'));if(_0x199a4d['actions'][_0x5c819f][_0x2014('0x4b')]===!![]){ut[_0x2014('0x54')](_0x199a4d[_0x2014('0x28')][_0x199a4d['actions'][_0x5c819f][_0x2014('0x49')]],_0x2014('0x53'));ut[_0x2014('0x55')]('[Dialer][checkChannel][pTalking][Preview]'+_0x5c819f,_0x199a4d['actions'][_0x5c819f][_0x2014('0x49')]);}ut[_0x2014('0x55')](_0x2014('0x56')+_0x5c819f,_0x199a4d[_0x2014('0x15')][_0x5c819f][_0x2014('0x49')]);delete _0x199a4d[_0x2014('0x15')][_0x5c819f];}},0x2328);}});}});};Preview[_0x2014('0x10')][_0x2014('0x3f')]=function(){var _0x440c7d=this;loggerAction[_0x2014('0x29')](_0x2014('0x57'),_[_0x2014('0x58')](this[_0x2014('0x15')]));for(var _0x3c553f in this['actions']){if(_0x440c7d[_0x2014('0x15')][_0x2014('0x3c')](_0x3c553f)){_0x440c7d[_0x2014('0x59')](_0x3c553f);}}};Preview[_0x2014('0x10')][_0x2014('0x45')]=function(_0x26335a){var _0x14e311=this;rpcDb['getContactRecallMe'](_0x26335a['id'],ut[_0x2014('0x5a')](this[_0x2014('0x16')]))[_0x2014('0x5b')](function(_0x55ec3b){if(!_[_0x2014('0x47')](_0x55ec3b)){for(var _0x311856=0x0;_0x311856<_0x55ec3b[_0x2014('0x5c')];_0x311856+=0x1){if(ut[_0x2014('0x5d')](_0x55ec3b[_0x311856][_0x2014('0x5e')])<_0x26335a[_0x2014('0x5f')]*0x3c){if(_0x55ec3b[_0x311856]['Agent']&&!_0x55ec3b[_0x311856][_0x2014('0x60')][_0x2014('0x61')]){_0x14e311['run'](_0x55ec3b[_0x311856]['id'])[_0x2014('0x5b')](ut[_0x2014('0x62')]('[RecallMe]'))[_0x2014('0x63')](ut[_0x2014('0x62')](_0x2014('0x64')));}else{rpcDb[_0x2014('0x65')](_0x55ec3b[_0x311856]['id']);}}else{var _0x5364f1=new Action(_0x55ec3b[_0x311856],_0x26335a);_0x5364f1[_0x2014('0x66')]=moment()[_0x2014('0x67')](_0x2014('0x68'));_0x26335a['outboundReCallsDay']+=0x1;ut[_0x2014('0x69')](_0x5364f1,0x17,'RecallInQueue');if(_0x26335a[_0x2014('0x6a')]){rpcDb[_0x2014('0x6b')](ut[_0x2014('0x6c')](_0x55ec3b[_0x311856]));rpcDb['createCustomerHistory'](_0x5364f1,'[HistoryDialRecallInQueue][historyCatch]');}else{ut[_0x2014('0x69')](_0x5364f1,0x16,_0x2014('0x6d'));rpcDb['createCustomerHistory'](_0x5364f1,_0x2014('0x6e'));rpcDb[_0x2014('0x6f')](_0x5364f1,_0x2014('0x6e'));}}}}})[_0x2014('0x63')](ut[_0x2014('0x62')](_0x2014('0x70')));};Preview[_0x2014('0x10')]['setMessage']=function(_0x38a41e){_0x38a41e[_0x2014('0x31')]=!![];if(ut[_0x2014('0x71')](_0x38a41e['loggedIn'])){_0x38a41e['message']=utils[_0x2014('0x72')][_0x2014('0x73')];}else if(!ut[_0x2014('0x74')](_0x38a41e[_0x2014('0x42')])){_0x38a41e[_0x2014('0x35')]=utils[_0x2014('0x72')][_0x2014('0x36')];}else if(!this['isTrunkReachable'](_0x38a41e[_0x2014('0x75')])){if(!this[_0x2014('0x76')](_0x38a41e[_0x2014('0x77')])){_0x38a41e['message']=utils[_0x2014('0x72')][_0x2014('0x78')];}else{_0x38a41e[_0x2014('0x35')]=utils['CAMPAIGN_STATUS'][_0x2014('0x79')];}}else{_0x38a41e[_0x2014('0x35')]=utils[_0x2014('0x72')][_0x2014('0x79')];}};Preview['prototype'][_0x2014('0x7a')]=function(_0x28584a,_0x13fe48,_0x39af69){var _0x1c7a43=this;var _0x3ef194=this['actions'][_0x13fe48];var _0x478c47=this['campaignsPreview'][_0x3ef194[_0x2014('0x49')]];var _0x4c5fcd;var _0x2262c0=![];var _0x7d181f=0x2;var _0x43e493=0x3;if(_0x478c47){switch(_0x39af69){case'1':_0x478c47['outboundNoSuchCallsDay']+=0x1;_0x3ef194[_0x2014('0x7b')]+=0x1;_0x3ef194[_0x2014('0x7c')]=ut[_0x2014('0x7d')](_0x3ef194);ut[_0x2014('0x69')](_0x3ef194,0x0,_0x2014('0x7e'));ami['emit'](_0x2014('0x7f'),ut['buildObj'](_0x3ef194,'nosuchnumber'));rpcDb[_0x2014('0x80')](_0x3ef194,_0x2014('0x81'));_0x1c7a43[_0x2014('0x82')](_0x3ef194,'0',_0x478c47)[_0x2014('0x5b')](function(_0x5f40d1){_0x2262c0=_0x5f40d1[_0x2014('0x83')]==0x1;_0x7d181f=_0x478c47[_0x2014('0x84')];_0x43e493=_0x478c47[_0x2014('0x85')];if(!_0x2262c0){if(ut[_0x2014('0x7d')](_0x3ef194)>=_0x478c47[_0x2014('0x86')]){_0x4c5fcd=ut[_0x2014('0x87')](_0x3ef194,0xf,_0x2014('0x88'));rpcDb[_0x2014('0x6f')](_0x4c5fcd,_0x2014('0x89'));}else{if(_0x3ef194[_0x2014('0x7b')]>=_0x478c47[_0x2014('0x8a')]){rpcDb[_0x2014('0x6f')](_0x3ef194,_0x2014('0x89'));}else{rpcDb[_0x2014('0x8b')](ut['scheduledAt'](_0x3ef194,'countnosuchnumberretry',_0x478c47['dialNoSuchNumberRetryFrequency']),_0x3ef194[_0x2014('0x8c')],_0x3ef194[_0x2014('0x8d')]);}}delete this['actions'][_0x28584a['linkedid']];}else{_0x3ef194[_0x2014('0x7b')]++;logger[_0x2014('0x29')](_0x2014('0x8e'),_0x3ef194['countnosuchnumberretry']);logger['info']('id',_0x3ef194['idContact']);_0x1c7a43[_0x2014('0x8f')]({'id':_0x3ef194['idContact'],'field':{'countnosuchnumberretry':_0x3ef194[_0x2014('0x7b')]}})[_0x2014('0x5b')](function(){_0x1c7a43[_0x2014('0x90')](_0x3ef194,_0x7d181f,_0x43e493)[_0x2014('0x5b')](function(){});});}});break;case _0x2014('0x91'):var _0x2dcfee=moment()[_0x2014('0x67')](_0x2014('0x68'));_0x3ef194[_0x2014('0x92')]=_0x2dcfee;_0x3ef194[_0x2014('0x93')]=_0x2dcfee;_0x3ef194[_0x2014('0x4b')]=!![];_0x478c47[_0x2014('0x33')]+=0x1;logger['info'](_0x2014('0x94'),_0x3ef194[_0x2014('0x95')],'\x20Queue',_0x478c47['name'],_0x2014('0x96'),_0x478c47[_0x2014('0x33')]);ami['emit'](_0x2014('0x97'),ut['buildObj'](_0x3ef194,_0x2014('0x98'),this[_0x2014('0x28')][_0x3ef194[_0x2014('0x49')]]));if(_0x478c47[_0x2014('0x99')]){ami['emit'](_0x2014('0x9a'),ut['buildAcw'](_0x3ef194));}break;case'16':ami[_0x2014('0x2f')](_0x2014('0x9b'),ut['buildObj'](_0x3ef194,'complete',this[_0x2014('0x28')][_0x3ef194[_0x2014('0x49')]]));emitVoiceQueueChannelRemove(ut[_0x2014('0x9c')](_0x3ef194,_0x2014('0x9d')));_0x478c47['outboundAnswerCallsDay']+=0x1;_0x478c47['total']+=0x1;_0x478c47[_0x2014('0x9e')]+=0x1;ut[_0x2014('0x54')](_0x478c47,_0x2014('0x9f'));_0x3ef194[_0x2014('0x7c')]=ut[_0x2014('0x7d')](_0x3ef194);ut[_0x2014('0x69')](_0x3ef194,0x4,_0x2014('0xa0'));rpcDb[_0x2014('0x80')](_0x3ef194,_0x2014('0xa1'));rpcDb[_0x2014('0x6f')](_0x3ef194,_0x2014('0xa2'));rpcDb[_0x2014('0xa3')](_0x3ef194);_0x478c47[_0x2014('0xa4')]+=_0x3ef194['talktime'];_0x478c47[_0x2014('0xa5')]+=_0x3ef194[_0x2014('0xa6')];logger[_0x2014('0x29')]('[syncHangup][talking][decrement]',_0x3ef194[_0x2014('0x95')],_0x2014('0xa7'),_0x478c47[_0x2014('0x2d')],'pTalking:\x20',_0x478c47['pTalking']);delete this[_0x2014('0x15')][_0x28584a[_0x2014('0xa8')]];break;case _0x2014('0xa9'):_0x478c47['outboundBusyCallsDay']+=0x1;_0x3ef194[_0x2014('0xaa')]+=0x1;_0x3ef194['countglobal']=ut[_0x2014('0x7d')](_0x3ef194);ut['logCustomer'](_0x3ef194,0x5,_0x2014('0xab'));_0x7d181f=_0x478c47[_0x2014('0xac')];_0x43e493=_0x478c47[_0x2014('0x85')];ami[_0x2014('0x2f')](_0x2014('0xad'),ut[_0x2014('0x9c')](_0x3ef194,_0x2014('0xae')));rpcDb[_0x2014('0x80')](_0x3ef194,'[callProgressDetectingCustomer][logBusy]');_0x1c7a43['verifyAdditionalPhones'](_0x3ef194,'5',_0x478c47)[_0x2014('0x5b')](function(_0x85d799){_0x2262c0=_0x85d799[_0x2014('0x83')]==0x1;if(!_0x2262c0){if(ut['totalGlobal'](_0x3ef194)>=_0x478c47[_0x2014('0x86')]){_0x4c5fcd=ut[_0x2014('0x87')](_0x3ef194,0xf,_0x2014('0x88'));rpcDb[_0x2014('0x6f')](_0x4c5fcd,_0x2014('0xaf'));}else{if(_0x3ef194['countbusyretry']>=_0x478c47['dialBusyMaxRetry']){rpcDb[_0x2014('0x6f')](_0x3ef194,_0x2014('0xb0'));}else{rpcDb['rescheduleContact'](ut['scheduledAt'](_0x3ef194,'countbusyretry',_0x478c47[_0x2014('0xac')]),_0x3ef194['unlockAgent'],_0x3ef194['activeContact']);}}}else{_0x3ef194['countbusyretry']++;_0x1c7a43[_0x2014('0x8f')]({'id':_0x3ef194[_0x2014('0xb1')],'field':{'countbusyretry':_0x3ef194[_0x2014('0xaa')]}})[_0x2014('0x5b')](function(){_0x1c7a43[_0x2014('0x90')](_0x3ef194,_0x7d181f,_0x43e493)[_0x2014('0x5b')](function(){});});}});break;case'NOANSWER':_0x478c47[_0x2014('0xb2')]+=0x1;_0x3ef194[_0x2014('0xb3')]+=0x1;_0x3ef194['countglobal']=ut['totalGlobal'](_0x3ef194);ut['logCustomer'](_0x3ef194,0x3,_0x2014('0xb4'));_0x7d181f=_0x478c47['dialNoAnswerRetryFrequency'];_0x43e493=_0x478c47[_0x2014('0x85')];var _0x3594ad=ut['buildNoAnswerEventPayload'](_0x3ef194,_0x478c47);ami[_0x2014('0x2f')](_0x2014('0xb5'),_0x3594ad);rpcDb[_0x2014('0x80')](_0x3ef194,_0x2014('0xb6'));_0x1c7a43[_0x2014('0x82')](_0x3ef194,'3',_0x478c47)[_0x2014('0x5b')](function(_0x23ba99){_0x2262c0=_0x23ba99['additional']==0x1;if(!_0x2262c0){if(ut[_0x2014('0x7d')](_0x3ef194)>=_0x478c47[_0x2014('0x86')]){_0x4c5fcd=ut[_0x2014('0x87')](_0x3ef194,0xf,_0x2014('0x88'));rpcDb[_0x2014('0x6f')](_0x4c5fcd,_0x2014('0xb7'));}else{if(_0x3ef194['countnoanswerretry']>=_0x478c47[_0x2014('0xb8')]){rpcDb[_0x2014('0x6f')](_0x3ef194,'[callProgressDetectingCustomer][logNoAnswer]');}else{rpcDb[_0x2014('0x8b')](ut['scheduledAt'](_0x3ef194,_0x2014('0xb3'),_0x478c47[_0x2014('0xb9')]),_0x3ef194[_0x2014('0x8c')],_0x3ef194[_0x2014('0x8d')]);}}}else{_0x3ef194[_0x2014('0xb3')]++;_0x1c7a43[_0x2014('0x8f')]({'id':_0x3ef194[_0x2014('0xb1')],'field':{'countnoanswerretry':_0x3ef194[_0x2014('0xb3')]}})[_0x2014('0x5b')](function(){_0x1c7a43[_0x2014('0x90')](_0x3ef194,_0x7d181f,_0x43e493)[_0x2014('0x5b')](function(){});});}});break;case _0x2014('0xba'):_0x478c47[_0x2014('0xbb')]+=0x1;_0x3ef194['countcongestionretry']+=0x1;_0x3ef194[_0x2014('0x7c')]=ut[_0x2014('0x7d')](_0x3ef194);ut['logCustomer'](_0x3ef194,0x8,_0x2014('0xbc'));_0x7d181f=_0x478c47[_0x2014('0xbd')];_0x43e493=_0x478c47[_0x2014('0x85')];ami[_0x2014('0x2f')]('custom:agentcongestion',ut[_0x2014('0x9c')](_0x3ef194,_0x2014('0xbe')));rpcDb[_0x2014('0x80')](_0x3ef194,_0x2014('0xbf'));_0x1c7a43[_0x2014('0x82')](_0x3ef194,'8',_0x478c47)['then'](function(_0x3f20e9){_0x2262c0=_0x3f20e9[_0x2014('0x83')]==0x1;if(!_0x2262c0){if(ut[_0x2014('0x7d')](_0x3ef194)>=_0x478c47[_0x2014('0x86')]){_0x4c5fcd=ut[_0x2014('0x87')](_0x3ef194,0xf,_0x2014('0x88'));rpcDb[_0x2014('0x6f')](_0x4c5fcd,_0x2014('0xc0'));}else{if(_0x3ef194[_0x2014('0xc1')]>=_0x478c47['dialCongestionMaxRetry']){rpcDb[_0x2014('0x6f')](_0x3ef194,'[callProgressDetectingCustomer][logCongestion]');}else{rpcDb['rescheduleContact'](ut['scheduledAt'](_0x3ef194,_0x2014('0xc1'),_0x478c47['dialBusyRetryFrequency']),_0x3ef194[_0x2014('0x8c')],_0x3ef194[_0x2014('0x8d')]);}}}else{_0x3ef194[_0x2014('0xc1')]++;_0x1c7a43[_0x2014('0x8f')]({'id':_0x3ef194[_0x2014('0xb1')],'field':{'countcongestionretry':_0x3ef194[_0x2014('0xc1')]}})[_0x2014('0x5b')](function(){_0x1c7a43['swapAdditionalPhones'](_0x3ef194,_0x7d181f,_0x43e493)[_0x2014('0x5b')](function(){});});}});break;case _0x2014('0xc2'):_0x478c47['outboundRejectCallsDay']+=0x1;_0x3ef194[_0x2014('0xc3')]+=0x1;_0x3ef194['countglobal']=ut[_0x2014('0x7d')](_0x3ef194);ut[_0x2014('0x69')](_0x3ef194,0x14,_0x2014('0xc4'));_0x7d181f=_0x478c47[_0x2014('0xc5')];_0x43e493=_0x478c47[_0x2014('0x85')];ami[_0x2014('0x2f')](_0x2014('0xc6'),ut[_0x2014('0x9c')](_0x3ef194,'agentreject'));rpcDb[_0x2014('0x80')](_0x3ef194,'[syncHangupRequest][logAgentReject]');_0x1c7a43[_0x2014('0x82')](_0x3ef194,'20',_0x478c47)[_0x2014('0x5b')](function(_0xaa8ab5){_0x2262c0=_0xaa8ab5[_0x2014('0x83')]==0x1;if(!_0x2262c0){if(ut['totalGlobal'](_0x3ef194)>=_0x478c47[_0x2014('0x86')]){_0x4c5fcd=ut[_0x2014('0x87')](_0x3ef194,0x14,_0x2014('0xc4'));rpcDb['createCustomerFinal'](_0x4c5fcd,_0x2014('0xc7'));}else{if(_0x3ef194[_0x2014('0xc3')]>=_0x478c47[_0x2014('0xc8')]){rpcDb[_0x2014('0x6f')](_0x3ef194,_0x2014('0xc7'));}else{rpcDb[_0x2014('0x8b')](ut[_0x2014('0xc9')](_0x3ef194,_0x2014('0xc3'),_0x478c47[_0x2014('0xc5')]),_0x3ef194[_0x2014('0x8c')],_0x3ef194[_0x2014('0x8d')]);}}}else{_0x3ef194[_0x2014('0xb3')]++;_0x1c7a43[_0x2014('0x8f')]({'id':_0x3ef194[_0x2014('0xb1')],'field':{'countnoanswerretry':_0x3ef194[_0x2014('0xb3')]}})[_0x2014('0x5b')](function(){_0x1c7a43[_0x2014('0x90')](_0x3ef194,_0x7d181f,_0x43e493)[_0x2014('0x5b')](function(){});});}});break;case _0x2014('0xca'):_0x478c47[_0x2014('0xcb')]+=0x1;_0x3ef194['countabandonedretry']+=0x1;_0x3ef194['countglobal']=ut[_0x2014('0x7d')](_0x3ef194);ut[_0x2014('0x69')](_0x3ef194,0xb,'Abandoned');rpcDb[_0x2014('0x80')](_0x3ef194,'[callProgressDetectingCustomer][logAbandoned]');_0x1c7a43[_0x2014('0x82')](_0x3ef194,'11',_0x478c47)['then'](function(_0x42aa61){_0x2262c0=_0x42aa61[_0x2014('0x83')]==0x1;if(!_0x2262c0){if(ut[_0x2014('0x7d')](_0x3ef194)>=_0x478c47[_0x2014('0x86')]){_0x4c5fcd=ut[_0x2014('0x87')](_0x3ef194,0xf,_0x2014('0x88'));rpcDb['createCustomerFinal'](_0x4c5fcd,_0x2014('0xcc'));}else{if(_0x3ef194[_0x2014('0xcd')]>=_0x478c47[_0x2014('0xce')]){rpcDb[_0x2014('0x6f')](_0x3ef194,'[callProgressDetectingCustomer][logAbandoned]');}else{rpcDb[_0x2014('0x8b')](ut[_0x2014('0xc9')](_0x3ef194,'countabandonedretry',_0x478c47[_0x2014('0xcf')]),_0x3ef194['unlockAgent'],_0x3ef194[_0x2014('0x8d')]);}}}else{_0x3ef194['countnoanswerretry']++;_0x1c7a43[_0x2014('0x8f')]({'id':_0x3ef194[_0x2014('0xb1')],'field':{'countnoanswerretry':_0x3ef194[_0x2014('0xb3')]}})[_0x2014('0x5b')](function(){_0x1c7a43[_0x2014('0x90')](_0x3ef194,_0x7d181f,_0x43e493)['then'](function(){});});}});break;case'18':_0x478c47[_0x2014('0xd0')]+=0x1;_0x3ef194['countmachineretry']+=0x1;_0x3ef194[_0x2014('0x7c')]=ut['totalGlobal'](_0x3ef194);ut['logCustomer'](_0x3ef194,0x12,_0x28584a[_0x2014('0xd1')]||_0x28584a[_0x2014('0xd2')]);ami[_0x2014('0x2f')]('custom:amd',ut[_0x2014('0x9c')](_0x3ef194,'amd'));rpcDb['createCustomerHistory'](_0x3ef194,_0x2014('0xd3'));_0x1c7a43[_0x2014('0x82')](_0x3ef194,'18',_0x478c47)[_0x2014('0x5b')](function(_0x4bc545){_0x2262c0=_0x4bc545[_0x2014('0x83')]==0x1;if(!_0x2262c0){if(ut['totalGlobal'](_0x3ef194)>=_0x478c47['dialGlobalMaxRetry']){_0x4c5fcd=ut[_0x2014('0x87')](_0x3ef194,0x12,'Global');rpcDb[_0x2014('0x6f')](_0x4c5fcd,_0x2014('0xd3'));}else{rpcDb[_0x2014('0x6f')](_0x3ef194,_0x2014('0xd3'));}}else{_0x3ef194[_0x2014('0xb3')]++;_0x1c7a43['incrementPreviewCounters']({'id':_0x3ef194[_0x2014('0xb1')],'field':{'countnoanswerretry':_0x3ef194[_0x2014('0xb3')]}})['then'](function(){_0x1c7a43[_0x2014('0x90')](_0x3ef194,_0x7d181f,_0x43e493)['then'](function(){});});}});delete this[_0x2014('0x15')][_0x28584a['linkedid']];break;case'19':_0x478c47[_0x2014('0xd0')]+=0x1;_0x3ef194['countglobal']=ut[_0x2014('0x7d')](_0x3ef194);ut['logCustomer'](_0x3ef194,0x13,_0x28584a[_0x2014('0xd1')]||_0x28584a['dialstatus']);ami['emit']('custom:amd',ut[_0x2014('0x9c')](_0x3ef194,'amd'));rpcDb[_0x2014('0x80')](_0x3ef194,'[callProgressDetectingCustomer][machine]');_0x1c7a43[_0x2014('0x82')](_0x3ef194,'18',_0x478c47)[_0x2014('0x5b')](function(_0x101b1e){_0x2262c0=_0x101b1e[_0x2014('0x83')]==0x1;if(!_0x2262c0){if(ut['totalGlobal'](_0x3ef194)>=_0x478c47['dialGlobalMaxRetry']){_0x4c5fcd=ut['cloneAction'](_0x3ef194,0xf,_0x2014('0x88'));rpcDb['createCustomerFinal'](_0x4c5fcd,_0x2014('0xd4'));}else{rpcDb['createCustomerFinal'](_0x3ef194,_0x2014('0xd4'));}}else{_0x3ef194['countnoanswerretry']++;_0x1c7a43['incrementPreviewCounters']({'id':_0x3ef194[_0x2014('0xb1')],'field':{'countnoanswerretry':_0x3ef194['countnoanswerretry']}})['then'](function(){_0x1c7a43[_0x2014('0x90')](_0x3ef194,_0x7d181f,_0x43e493)[_0x2014('0x5b')](function(){});});}});delete this[_0x2014('0x15')][_0x28584a[_0x2014('0xa8')]];break;default:if(_0x3ef194[_0x2014('0x4b')]){ut[_0x2014('0x54')](_0x478c47,_0x2014('0xd5'));ut[_0x2014('0x55')](_0x2014('0xd6')+_0x478c47['name'],_0x28584a);}_0x478c47['outboundUnknownCallsDay']+=0x1;_0x3ef194[_0x2014('0x7c')]=ut[_0x2014('0x7d')](_0x3ef194);ut['logCustomer'](_0x3ef194,0xc,_0x28584a[_0x2014('0xd1')]||_0x28584a[_0x2014('0xd2')]);_0x7d181f=_0x478c47[_0x2014('0xc5')];_0x43e493=_0x478c47[_0x2014('0x85')];rpcDb[_0x2014('0x80')](_0x3ef194,_0x2014('0xd7'));_0x1c7a43[_0x2014('0x82')](_0x3ef194,'20',_0x478c47)[_0x2014('0x5b')](function(_0x30ae8e){_0x2262c0=_0x30ae8e[_0x2014('0x83')]==0x1;if(!_0x2262c0){if(ut['totalGlobal'](_0x3ef194)>=_0x478c47[_0x2014('0x86')]){_0x4c5fcd=ut['cloneAction'](_0x3ef194,0xf,_0x2014('0x88'));rpcDb[_0x2014('0x6f')](_0x4c5fcd,_0x2014('0xd8'));}else{rpcDb[_0x2014('0x6f')](_0x3ef194,_0x2014('0xd8'));}delete this[_0x2014('0x15')][_0x28584a[_0x2014('0xa8')]];}else{_0x1c7a43[_0x2014('0x90')](_0x3ef194,_0x7d181f,_0x43e493)[_0x2014('0x5b')](function(){});}});}if(!(_0x3ef194[_0x2014('0x4b')]&&_0x39af69==='16')){ut['updateOriginated'](_0x478c47,_0x2014('0xd9'));logger[_0x2014('0x29')](_0x2014('0xda'),_0x3ef194[_0x2014('0x95')],_0x2014('0xa7'),_0x478c47[_0x2014('0x2d')],_0x2014('0x4a'),_0x478c47['originated']);}if(_0x39af69!==_0x2014('0x91')){delete this[_0x2014('0x15')][_0x28584a[_0x2014('0xa8')]];delete this[_0x2014('0x15')][_0x28584a[_0x2014('0xdb')]];}_0x478c47[_0x2014('0xdc')]=!![];}};Preview['prototype'][_0x2014('0xdd')]=function(_0x35c9ab,_0x56959e,_0xcce126){if(_[_0x2014('0xde')](_0x56959e)&&'object'!==typeof _0x56959e){return;}if(_[_0x2014('0xde')](_0xcce126)&&_0x2014('0xdf')!==typeof _0xcce126){return;}switch(_0xcce126[_0x2014('0xe0')]){case'0':ut['logAgent'](_0x35c9ab,0x0,_0x2014('0x7e'));rpcDb[_0x2014('0xe1')](_0x35c9ab,_0x2014('0xe2'));break;case'3':ut[_0x2014('0xe3')](_0x35c9ab,0x3,_0x2014('0xb4'));rpcDb[_0x2014('0xe1')](_0x35c9ab,_0x2014('0xe4'));break;case'5':ut[_0x2014('0xe3')](_0x35c9ab,0x5,_0x2014('0xab'));rpcDb[_0x2014('0xe1')](_0x35c9ab,'[callProgressDetectingAgent][logBusy]');break;case'8':ut[_0x2014('0xe3')](_0x35c9ab,0x8,_0x2014('0xbc'));rpcDb[_0x2014('0xe1')](_0x35c9ab,_0x2014('0xe5'));break;case'22':ut['logAgent'](_0x35c9ab,0x16,'AnswerAGI');rpcDb[_0x2014('0xe1')](_0x35c9ab,_0x2014('0xe6'));break;default:ut[_0x2014('0xe3')](_0x35c9ab,0xc,_0xcce126[_0x2014('0xe0')]);rpcDb[_0x2014('0xe1')](_0x35c9ab,_0x2014('0xe5'));}ut[_0x2014('0x52')](_0x56959e,_0x2014('0xe7'));logger[_0x2014('0x29')](_0x2014('0xe8'),_0x35c9ab['uniqueid'],_0x2014('0xa7'),_0x56959e[_0x2014('0x2d')],_0x2014('0x4a'),_0x56959e['originated']);delete this['actions'][_0x35c9ab[_0x2014('0x95')]];};Preview[_0x2014('0x10')][_0x2014('0x82')]=function(_0x32ccf5,_0xb8f5f3,_0x99e0a7){return cmHopperAdditionalPhone['verifyAdditionalPhones'](_0x32ccf5,_0xb8f5f3,_0x99e0a7)['catch'](logger['info'](_0x2014('0xe9')));};Preview[_0x2014('0x10')]['swapAdditionalPhones']=function(_0x3017bf,_0x446320,_0x3d5a66){return cmHopperAdditionalPhone['swapAdditionalPhones'](_0x3017bf,_0x446320,_0x3d5a66)[_0x2014('0x63')](logger[_0x2014('0x29')](_0x2014('0xea')));};Preview[_0x2014('0x10')][_0x2014('0x8f')]=function(_0x28e442){return Promise[_0x2014('0xeb')]()[_0x2014('0x5b')](cmHopperAdditionalPhone['incrementPreviewCounters'](_0x28e442))[_0x2014('0x63')](logger[_0x2014('0x29')]('[incrementPreviewCounters]\x20'));};Preview[_0x2014('0x10')][_0x2014('0xec')]=function(_0x1c04c2,_0x390bdd,_0x5ca6b0,_0x3f5bd4,_0x2febbe){var _0x397bd7=this;return new Promise(function(_0xb13822,_0x49d7df){if(_['isNil'](_0x390bdd)||_['isNil'](_0x390bdd[_0x2014('0xed')])||_[_0x2014('0x47')](_0x390bdd[_0x2014('0xee')])||_[_0x2014('0x47')](_0x390bdd[_0x2014('0x4d')])){_0x49d7df(ut[_0x2014('0x35')]('Contact\x20is\x20undefined',_0x3f5bd4,_0x2febbe));return;}var _0x3d80ec=uuid['v4']();var _0x2e0a36=_0x397bd7['campaignsPreview'][_0x390bdd[_0x2014('0x48')]['name']];var _0x24fd38=_0x5ca6b0?_0x397bd7['agents'][_0x5ca6b0]['id']:undefined;_0x397bd7['actions'][_0x3d80ec]=new Action(_0x390bdd,_0x2e0a36,_0x3d80ec,_0x5ca6b0,_0x24fd38);var _0x227c36=_0x397bd7['actions'][_0x3d80ec];_0x227c36[_0x2014('0x8c')]=_0x3f5bd4;_0x227c36[_0x2014('0x8d')]=_0x2febbe;_0x227c36['lookAgent']=_0x5ca6b0;if(_[_0x2014('0xef')](_0x1c04c2)){_0x397bd7[_0x2014('0xf0')](_0x227c36,_0x2e0a36,_0x390bdd,_0x5ca6b0)[_0x2014('0x5b')](function(_0x4e96c6){logger[_0x2014('0x29')](_0x2014('0xf1'),'Queue:\x20'+_0x227c36['queue']+_0x2014('0xf2')+_0x227c36[_0x2014('0xb1')],JSON[_0x2014('0x2b')](_0x4e96c6));ami[_0x2014('0x2f')]('custom:agentcalled',ut[_0x2014('0x9c')](_0x227c36,_0x2014('0xf3'),_0x397bd7['campaignsPreview'][_0x227c36[_0x2014('0x49')]]));_0xb13822(ut['message'](_0x2014('0xf4')));})[_0x2014('0x63')](function(_0x161d0f){ut[_0x2014('0x37')](_0x2014('0xf5'),_0x161d0f);_0x49d7df(ut[_0x2014('0x35')](_0x2014('0xf6'),_0x3f5bd4,_0x2febbe));});}else{_0x2e0a36[_0x2014('0xf7')]+=0x1;ut[_0x2014('0xf8')](_0x227c36);rpcDb[_0x2014('0xf9')](_0x227c36,_0x2014('0xfa'));delete _0x397bd7[_0x2014('0x15')][_0x3d80ec];_0x49d7df(ut[_0x2014('0x35')](_0x2014('0xfb'),_0x3f5bd4,_0x2febbe));}});};Preview[_0x2014('0x10')][_0x2014('0x76')]=function(_0x54b1fd){return!_[_0x2014('0x47')](_0x54b1fd)&&!_[_0x2014('0x47')](_0x54b1fd[_0x2014('0x2d')])&&!_[_0x2014('0x47')](_0x54b1fd['active'])&&_0x54b1fd['active']&&!_[_0x2014('0x47')](this[_0x2014('0x14')][util[_0x2014('0x67')](_0x2014('0xfc'),_0x54b1fd[_0x2014('0x2d')])])&&!_['isNil'](this[_0x2014('0x14')][util[_0x2014('0x67')]('SIP/%s',_0x54b1fd[_0x2014('0x2d')])][_0x2014('0x4f')])&&(this['trunks'][util[_0x2014('0x67')]('SIP/%s',_0x54b1fd['name'])][_0x2014('0x4f')]===_0x2014('0xfd')||this[_0x2014('0x14')][util[_0x2014('0x67')](_0x2014('0xfc'),_0x54b1fd['name'])]['status']===_0x2014('0xfe'));};Preview[_0x2014('0x10')][_0x2014('0xff')]=function(_0x33068a,_0x5b16d2){return this['execRun'](_0x33068a,_0x5b16d2)[_0x2014('0x5b')](function(_0x5f044e){return _['pick'](_0x5f044e,['message']);})[_0x2014('0x63')](function(_0x167e71){if(_0x167e71[_0x2014('0x100')]){rpcDb['unlockContact'](_0x33068a);}if(_0x167e71['active']){rpcDb[_0x2014('0x65')](_0x33068a);}throw _[_0x2014('0x4c')](_0x167e71,[_0x2014('0x35')]);});};Preview[_0x2014('0x10')][_0x2014('0x101')]=function(_0x296f97,_0x4d9f78){var _0x578d61=this;var _0x57ba7a,_0x108591;return rpcDb[_0x2014('0x102')](_0x296f97)[_0x2014('0x5b')](function(_0xbe9aba){if(!_[_0x2014('0x47')](_0xbe9aba[0x0])){_0x108591=_0xbe9aba[0x0][_0x2014('0x103')]?![]:!![];_0x57ba7a=_0xbe9aba[0x0][_0x2014('0x103')]?!![]:![];_0x57ba7a=_0x4d9f78?!![]:_0x57ba7a;}var _0x471803=_0x578d61[_0x2014('0x104')](_0xbe9aba);if(_0x471803[_0x2014('0x105')]){rpcDb[_0x2014('0x106')](_[_0x2014('0x4c')](_0xbe9aba[0x0],[_0x2014('0x4d'),_0x2014('0xee')]))[_0x2014('0x5b')](function(_0x1e5fbc){_0x578d61[_0x2014('0xec')](_0x1e5fbc,_0xbe9aba[0x0],_0x4d9f78,_0x108591,_0x57ba7a)[_0x2014('0x5b')](function(_0x42c3dc){return _0x42c3dc;})['catch'](function(_0x32da54){throw _0x32da54;});})['catch'](function(_0x261d8b){ut[_0x2014('0x37')](_0x2014('0x107'),_0x261d8b);throw ut[_0x2014('0x35')]('Call\x20unsuccessful',_0x108591,_0x57ba7a);});}else{throw ut[_0x2014('0x35')](_0x471803[_0x2014('0x35')],_0x108591,_0x57ba7a);}})[_0x2014('0x63')](function(_0x4da848){ut[_0x2014('0x37')](_0x2014('0x108'),_0x4da848);throw ut[_0x2014('0x35')](_0x2014('0x109'),![],!![]);});};Preview['prototype'][_0x2014('0x104')]=function(_0x31f6d8){if(_[_0x2014('0x47')](_0x31f6d8)||_[_0x2014('0xef')](_0x31f6d8)||!_['isNil'](_0x31f6d8[0x0]['Agent'])&&_['isNil'](_0x31f6d8[0x0][_0x2014('0x60')][_0x2014('0x2d')])){ut[_0x2014('0x37')]('[Preview][validateContact][Empty\x20Contact]',_0x31f6d8);return{'isValid':![],'message':'Empty\x20Contact'};}var _0x3a9c9a=this[_0x2014('0x28')][_0x31f6d8[0x0][_0x2014('0x48')]['name']];_0x3a9c9a[_0x2014('0x35')]=utils[_0x2014('0x72')]['ACTIVE'];if(_[_0x2014('0x47')](_0x3a9c9a)){ut[_0x2014('0x37')](_0x2014('0x10a'),_0x3a9c9a);return{'isValid':![],'message':_0x2014('0x10b')};}if(!this[_0x2014('0x76')](_0x3a9c9a[_0x2014('0x75')])){ut['logger']('[Preview][validateContact][Trunk\x20not\x20working\x20correctly]',_0x2014('0x10c')+_0x3a9c9a['name']+_0x2014('0x10d'));if(!this[_0x2014('0x76')](_0x3a9c9a[_0x2014('0x77')])){ut[_0x2014('0x37')]('[Preview][validateContact][Trunk\x20not\x20working\x20correctly]',_0x3a9c9a[_0x2014('0x2d')]+_0x2014('0x10e'));return{'isValid':![],'message':_0x2014('0x10f')};}}if(!ut[_0x2014('0x74')](_0x3a9c9a[_0x2014('0x42')])){ut[_0x2014('0x37')](_0x2014('0x110'),_0x3a9c9a[_0x2014('0x2d')]+'\x20Not\x20Active');return{'isValid':![],'message':_0x2014('0x10c')+_0x3a9c9a['name']+_0x2014('0x111')};}return{'isValid':!![],'message':_0x2014('0x112')};};Preview[_0x2014('0x10')][_0x2014('0xf0')]=function(_0x1054e0,_0x3567b1,_0x11c19e,_0xce844c){var _0x2a3fae=this;return new Promise(function(_0x4dace7,_0x59f0e3){var _0x2935b4=_0x1054e0[_0x2014('0x95')];var _0x51a3b0=_0x2a3fae[_0x2014('0x76')](_0x3567b1[_0x2014('0x75')])?util[_0x2014('0x67')](_0x2014('0x113'),_0x3567b1[_0x2014('0x75')][_0x2014('0x2d')],_['isNil'](_0x3567b1['dialPrefix'])?'':_0x3567b1[_0x2014('0x114')][_0x2014('0x115')]()||'',_0x3567b1[_0x2014('0x116')]>0x0?_0x11c19e[_0x2014('0xee')]['substring'](_0x3567b1[_0x2014('0x116')]):_0x11c19e[_0x2014('0xee')]):util[_0x2014('0x67')]('SIP/%s/%s%s',_['isNil'](_0x3567b1[_0x2014('0x77')])?_0x3567b1[_0x2014('0x75')]['name']:_0x3567b1[_0x2014('0x77')][_0x2014('0x2d')],_[_0x2014('0x47')](_0x3567b1['dialPrefix'])?'':_0x3567b1['dialPrefix'][_0x2014('0x115')]()||'',_0x3567b1[_0x2014('0x116')]>0x0?_0x11c19e['phone'][_0x2014('0x117')](_0x3567b1[_0x2014('0x116')]):_0x11c19e[_0x2014('0xee')]);var _0xb6c46f=_0x2a3fae['isTrunkReachable'](_0x3567b1[_0x2014('0x75')])?ut[_0x2014('0x118')](_0x3567b1['Trunk'][_0x2014('0x119')],_0x3567b1['dialOriginateCallerIdName'],_0x3567b1['dialRandomLastDigitCallerIdNumber']>0x0?ut[_0x2014('0x11a')](_0x3567b1[_0x2014('0x11b')],_0x3567b1[_0x2014('0x11c')]):_0x3567b1['dialOriginateCallerIdNumber']):ut[_0x2014('0x118')](_[_0x2014('0x47')](_0x3567b1[_0x2014('0x77')])?_0x3567b1['Trunk']['callerid']:_0x3567b1[_0x2014('0x77')][_0x2014('0x119')],_0x3567b1[_0x2014('0x11d')],_0x3567b1[_0x2014('0x11c')]>0x0?ut[_0x2014('0x11a')](_0x3567b1[_0x2014('0x11b')],_0x3567b1[_0x2014('0x11c')]):_0x3567b1[_0x2014('0x11b')]);if(_0xb6c46f){_0x1054e0['originatecalleridname']=ut['extractCalleridName'](_0xb6c46f);_0x1054e0[_0x2014('0x11e')]=ut['extractCalleridNumber'](_0xb6c46f);}var _0xd1edfc=ut[_0x2014('0x11f')](_0x3567b1,_0x11c19e,_0x51a3b0,_0xb6c46f,_0x2935b4,_0x1054e0);var _0x16d92f=utils[_0x2014('0x120')](_0x11c19e[_0x2014('0xed')]);Object[_0x2014('0x121')](_0xd1edfc,_0x16d92f);_['merge'](_0x1054e0,ut[_0x2014('0x122')](_0xd1edfc));_0x1054e0[_0x2014('0x66')]=moment()[_0x2014('0x67')](_0x2014('0x68'));_0x3567b1[_0x2014('0x123')]=_0xd1edfc;var _0x72f94d=ut[_0x2014('0x124')](_0x1054e0,_0x3567b1,_0xd1edfc,_0x1054e0[_0x2014('0x8d')],_0xce844c);return ami[_0x2014('0x125')](_0x72f94d)[_0x2014('0x5b')](function(_0x407d07){_0x3567b1[_0x2014('0x32')]+=0x1;logger[_0x2014('0x29')](_0x2014('0x126'),_0x2935b4,_0x2014('0xa7'),_0x3567b1[_0x2014('0x2d')],_0x2014('0x4a'),_0x3567b1['originated']);_0x4dace7(_0x407d07);})[_0x2014('0x63')](function(_0x11afe1){ut[_0x2014('0xe3')](_0x1054e0,0xe,_0x2014('0x127'));rpcDb[_0x2014('0xe1')](_0x1054e0,_0x2014('0x128'));_0x59f0e3(_0x11afe1);});});};Preview[_0x2014('0x10')][_0x2014('0x20')]=function(_0x3d75b9){if(this[_0x2014('0x15')][_0x3d75b9[_0x2014('0xa8')]]){this[_0x2014('0x15')][_0x3d75b9[_0x2014('0xa8')]][_0x2014('0x50')]=_0x3d75b9[_0x2014('0x50')];}};Preview[_0x2014('0x10')][_0x2014('0x19')]=function(_0x568ea4){var _0x447229=this;var _0x47abc0=this[_0x2014('0x15')][_0x568ea4[_0x2014('0x129')]];if(_0x47abc0){if(_0x47abc0[_0x2014('0x12a')]&&this[_0x2014('0x16')][_0x47abc0[_0x2014('0x12a')]]){ut[_0x2014('0x12b')](_0x47abc0,this[_0x2014('0x16')][_0x47abc0['lookAgent']][_0x2014('0x2d')],this[_0x2014('0x16')][_0x47abc0['lookAgent']]['id']);}var _0x542dcf=_[_0x2014('0x12c')](_0x47abc0);_0x542dcf[_0x2014('0x92')]=moment()[_0x2014('0x67')]('YYYY-MM-DD\x20HH:mm:ss');var _0x41a0e6=_0x447229[_0x2014('0x28')][_0x47abc0[_0x2014('0x49')]];if(ut[_0x2014('0x12d')](_0x568ea4[_0x2014('0x12e')])){if(_0x47abc0['unlockAgent']){rpcDb[_0x2014('0x12f')](_0x47abc0[_0x2014('0xb1')]);}if(_0x47abc0[_0x2014('0x8d')]){rpcDb[_0x2014('0x65')](_0x47abc0['idContact']);}ami[_0x2014('0x2f')](_0x2014('0x130'),ut['buildObj'](_0x47abc0,_0x2014('0x131'),this[_0x2014('0x28')][_0x47abc0[_0x2014('0x49')]]));this[_0x2014('0xdd')](_0x542dcf,_0x41a0e6,_0x568ea4);}else{_0x47abc0[_0x2014('0x66')]=moment()[_0x2014('0x67')]('YYYY-MM-DD\x20HH:mm:ss');ut[_0x2014('0xe3')](_0x542dcf,0x4,_0x2014('0xa0'));rpcDb[_0x2014('0xe1')](_0x542dcf,_0x2014('0x132'));}}};Preview[_0x2014('0x10')][_0x2014('0x1b')]=function(_0x165b97){var _0x9c2f1b=this[_0x2014('0x15')][_0x165b97['linkedid']];var _0x213948;if(_0x9c2f1b){_0x213948=this[_0x2014('0x28')][_0x9c2f1b['queue']];logger[_0x2014('0x29')](_0x2014('0x133'),_0x165b97[_0x2014('0xa8')],_0x2014('0xa7'),_0x213948['name'],_0x2014('0x96'),_0x213948[_0x2014('0x33')]);}if(this[_0x2014('0x15')][_0x165b97[_0x2014('0xa8')]]&&_0x165b97[_0x2014('0xa8')]!==_0x165b97[_0x2014('0x95')]){if(_0x165b97[_0x2014('0x134')]==='16'&&this['actions'][_0x165b97[_0x2014('0xa8')]][_0x2014('0x4b')]){this[_0x2014('0x7a')](_0x165b97,_0x165b97[_0x2014('0xa8')],_0x165b97[_0x2014('0x134')]);}else if(this[_0x2014('0x15')][_0x165b97['linkedid']][_0x2014('0x4b')]){logger[_0x2014('0x29')](_0x2014('0x135'),_0x165b97['linkedid'],_0x165b97[_0x2014('0x134')],'\x20Queue',_0x213948[_0x2014('0x2d')],_0x2014('0x96'),_0x213948[_0x2014('0x33')]);this[_0x2014('0x7a')](_0x165b97,_0x165b97[_0x2014('0xa8')],_0x165b97[_0x2014('0x134')]);}}else if(_0x9c2f1b&&_[_0x2014('0x47')](_0x9c2f1b[_0x2014('0x136')])&&_0x213948['dialQueueProject']&&_0x165b97[_0x2014('0xa8')]===_0x165b97[_0x2014('0x95')]&&_[_0x2014('0x47')](_0x165b97[_0x2014('0xe0')])&&_0x165b97[_0x2014('0x134')]==='16'&&_0x165b97[_0x2014('0x137')]==='6'&&_[_0x2014('0xde')](_0x9c2f1b['transfer'])){if(_0x9c2f1b[_0x2014('0x8c')]){rpcDb[_0x2014('0x12f')](_0x9c2f1b[_0x2014('0xb1')]);}if(_0x9c2f1b[_0x2014('0x8d')]){rpcDb[_0x2014('0x65')](_0x9c2f1b[_0x2014('0xb1')]);}_0x165b97[_0x2014('0xe0')]='22';this[_0x2014('0xdd')](_0x9c2f1b,_0x213948,_0x165b97);}else if(_0x9c2f1b&&_0x9c2f1b[_0x2014('0x138')]){if(_0x165b97['cause']==='16'&&this[_0x2014('0x15')][_0x165b97['linkedid']][_0x2014('0x4b')]){logger['info']('[syncHangup][talking][transfer]',_0x165b97[_0x2014('0xa8')],_0x165b97[_0x2014('0x134')],'\x20Queue',_0x213948[_0x2014('0x2d')],_0x2014('0x96'),_0x213948[_0x2014('0x33')]);this[_0x2014('0x7a')](_0x165b97,_0x165b97['linkedid'],_0x165b97[_0x2014('0x134')]);}else if(this[_0x2014('0x15')][_0x165b97[_0x2014('0xa8')]][_0x2014('0x4b')]){logger['info'](_0x2014('0x135'),_0x165b97['linkedid'],_0x165b97[_0x2014('0x134')],_0x2014('0xa7'),_0x213948['name'],'pTalking:\x20',_0x213948[_0x2014('0x33')]);this['callProgressDetectingCustomer'](_0x165b97,_0x165b97[_0x2014('0xa8')],_0x165b97[_0x2014('0x134')]);}}};Preview['prototype'][_0x2014('0x139')]=function(_0x41ff53){if(this['actions'][_0x41ff53[_0x2014('0xdb')]]&&_0x41ff53['destlinkedid']!==_0x41ff53[_0x2014('0x13a')]){this['callProgressDetectingCustomer'](_0x41ff53,_0x41ff53[_0x2014('0xdb')],_0x41ff53['dialstatus']);}};Preview[_0x2014('0x10')][_0x2014('0x1d')]=function(_0x32f055){if(this[_0x2014('0x15')][_0x32f055[_0x2014('0xa8')]]&&_0x32f055[_0x2014('0xa8')]!==_0x32f055['uniqueid']&&!this[_0x2014('0x15')][_0x32f055['linkedid']][_0x2014('0x4b')]){if(_0x32f055[_0x2014('0x134')]==='1'){this[_0x2014('0x7a')](_0x32f055,_0x32f055[_0x2014('0xa8')],_0x32f055[_0x2014('0x134')]);}}};Preview[_0x2014('0x10')]['addVariable']=function(_0x418402,_0x2012e2,_0x1d2d39){if(this['actions'][_0x418402]){if(_['isNil'](this['actions'][_0x418402][_0x2014('0x123')])){this[_0x2014('0x15')][_0x418402][_0x2014('0x123')]={};}this[_0x2014('0x15')][_0x418402][_0x2014('0x123')][_0x2012e2]=_0x1d2d39;}};Preview[_0x2014('0x10')][_0x2014('0x22')]=function(_0x5a010f){try{if(!_[_0x2014('0x47')](_0x5a010f)){if(ut[_0x2014('0x13b')](_[_0x2014('0x13c')](_0x5a010f[_0x2014('0x13d')])[0x0])){this[_0x2014('0x13e')](_0x5a010f[_0x2014('0x95')],_[_0x2014('0x13c')](_0x5a010f[_0x2014('0x13d')])[0x0],_0x5a010f[_0x2014('0x13f')]);}}}catch(_0x48be0f){logger[_0x2014('0x140')](_0x2014('0x141'),util[_0x2014('0x142')](_0x48be0f,{'showHidden':![],'depth':null}));}};Preview[_0x2014('0x10')][_0x2014('0x24')]=function(_0x196670){if(_0x196670){if(this[_0x2014('0x15')][_0x196670['transfertargetlinkedid']]){this[_0x2014('0x15')][_0x196670[_0x2014('0x143')]]['transfer']=!![];}}};Preview['prototype'][_0x2014('0x26')]=function(_0x3c9fc7){if(_0x3c9fc7){if(this[_0x2014('0x15')][_0x3c9fc7[_0x2014('0x144')]]){this[_0x2014('0x15')][_0x3c9fc7[_0x2014('0x144')]][_0x2014('0x138')]=!![];}}};module[_0x2014('0x145')]=Preview; \ No newline at end of file +var _0x95fe=['toLowerVariables','variables','variablesAction','OriginateError','logLookAgent','isFailure','rejected','[callProgressDetectingAgent][logAnswer]','[syncHangup][talking]','cause','[syncHangup][talking][cause]','dialQueueProject','channelstate','transfer','callProgressDetectingAgent','destlinkedid','destuniqueid','addVariable','filterKey','keys','variable','value','syncAttendedTransfer','transfertargetlinkedid','transfererlinkedid','exports','lodash','uuid','ioredis','../../../config/environment','../../../config/logger','../ami','../rpc/cmHopperAdditionalPhone','./action','./util/util','redis','defaults','tail','finally','campaignsPreview','voiceQueues','trunks','actions','agents','originateresponse','syncOriginateResponse','bind','hangup','syncHangup','hanguprequest','dialend','syncDialEnd','newexten','syncNewExten','syncVarSet','blindtransfer','syncBlindTransfer','emit','info','[DEBUG]\x20Emit\x20voice_queue_channel:remove\x20event','stringify','format','voice:queue:%s','name','voice_queue_channel:remove','sendMessageOneNotActive','originated','pTalking','available','paused','message','CAMPAIGN_STATUS','INACTIVE','\x20is\x20not\x20active','DEACTIVATED','logger','[CampaignPreview]\x20Campaign\x20Queue:\x20','\x20is\x20deactivated','prototype','syncCampaigns','clockClearZombieChannels','hasOwnProperty','dialMethod','preview','booked','type','outbound','clearZombieChannels','dialActive','setMessage','dialPreviewAutoRecallMe','recallMe','sequence','enqueue','isNil','[clearZombieChannels][talking]','originated:\x20','queue','pTalking:\x20','pick','contactId','UserId','VoiceQueueId','ListId','Action','status','channel','catch','No\x20such\x20channel','updateOriginated','[clearZombieChannel]','dialAnswer','[Dialer][checkChannel][Preview]','[action]','size','getContactRecallMe','then','length','getDiff','scheduledat','dialRecallMeTimeout','voicePause','run','logger2','[RecallMe]','disableContact','starttime','YYYY-MM-DD\x20HH:mm:ss','outboundReCallsDay','logCustomer','RecallInQueue','dialRecallInQueue','rescheduleContactInQueue','createBody','createCustomerHistory','[HistoryDialRecallInQueue][historyCatch]','RecallFailedTimeout','[HistoryRecallClose]','createCustomerFinal','IsNotLoggedIn','loggedIn','NO_AGENTS_LOGGED','isActive','isTrunkReachable','Trunk','TrunkBackup','UNREACHABLE_TRUNK','ACTIVE','callProgressDetectingCustomer','outboundNoSuchCallsDay','countnosuchnumberretry','countglobal','totalGlobal','custom:agentnosuchnumber','buildObj','nosuchnumber','[callProgressDetectingCustomer][logNoSuch]','verifyAdditionalPhones','additional','dialNoSuchNumberRetryFrequency','callAdditionalPhoneAfterMin','[callProgressDetectingCustomer][logNoSuchGlobal]','dialNoSuchNumberMaxRetry','rescheduleContact','scheduledAt','idContact','incrementPreviewCounters','swapAdditionalPhones','ANSWER','responsetime','answertime','[syncHangup][talking][increment]','uniqueid','\x20Queue','connect','acw','custom:agentConnectPreview','custom:agentcomplete','complete','outboundAnswerCallsDay','total','answered','[16]','Answer','[callProgressDetectingCustomer][logAnswer]','[callProgressDetectingCustomer][logAnswerGlobal]','sumDuration','sumBillable','talktime','[syncHangup][talking][decrement]','linkedid','countbusyretry','Busy','dialBusyRetryFrequency','busy','[callProgressDetectingCustomer][logBusy]','Global','[callProgressDetectingCustomer][logBusyGlobal]','dialBusyMaxRetry','unlockAgent','activeContact','NOANSWER','outboundNoAnswerCallsDay','dialNoAnswerRetryFrequency','buildNoAnswerEventPayload','custom:agentnoanswer','dialGlobalMaxRetry','cloneAction','[callProgressDetectingCustomer][logNoAnswerGlobal]','countnoanswerretry','CONGESTION','countcongestionretry','Congestion','dialCongestionRetryFrequency','custom:agentcongestion','congestion','[callProgressDetectingCustomer][logCongestion]','CANCEL','dialAgentRejectRetryFrequency','custom:agentreject','[syncHangupRequest][logAgentReject]','[callProgressDetectingCustomer][logAgentReject]','countagentrejectretry','ABANDONED','[callProgressDetectingCustomer][logAbandoned]','dialAbandonedMaxRety','countabandonedretry','dialAbandonedRetryFrequency','outboundUnknownCallsDay','countmachineretry','cause-txt','dialstatus','amd','[callProgressDetectingCustomer][hangupInAMD]','custom:amd','[callProgressDetectingCustomer][machine]','loggerError','[callProgressDetectingCustomer][logUnknown]','[callProgressDetectingCustomer][logUnknownGlobal]','[callProgressDetectingCustomer]','queueSummaryCountersUpdated','isUndefined','reason','logAgent','NoSuchNumber','createAgentHistory','[callProgressDetectingAgent][logNoSuch]','NoAnswer','[callProgressDetectingAgent][logNoAnswer]','[callProgressDetectingAgent][logBusy]','[callProgressDetectingAgent][logCongestion]','AnswerAGI','[callProgressDetectingAgent][logAnswerAGI]','[originated][decrement][callProgressDetectingAgent]','[verifyAdditionalPhone]\x20','[swapAdditionalPhone]\x20','[incrementPreviewCounters]\x20','checkInBlack','Contact','phone','Contact\x20is\x20undefined','lookAgent','execCall','[Preview][execCall][success]','\x20IdHopper:\x20','custom:agentcalled','called','Calling','Call\x20failed','outboundBlacklistCallsDay','logBlacklist','createHistory','[Blacklist][error]','Contact\x20in\x20black\x20List','active','SIP/%s','execRun','unlockContact','getContactPreview','recallme','validateContact','isValid','checkIsBlackList','[Preview][checkIsBlackList]','Call\x20unsuccessful','[Preview][getContactPreview]','Agent','[Preview][validateContact][Empty\x20Contact]','Empty\x20Contact','Empty\x20Campaign','[Preview][validateContact][Trunk\x20not\x20working\x20correctly]','campaign\x20Name:\x20','\x20Trunk\x20is\x20not\x20active','\x20Trunk\x20Backup\x20is\x20not\x20active','[Preview][validateContact][Campaign\x20Active]','\x20Not\x20Active','SIP/%s/%s%s','dialPrefix','trim','dialCutDigit','substring','getCallerId','callerid','dialOriginateCallerIdName','dialRandomLastDigitCallerIdNumber','getCallerIdRandom','dialOriginateCallerIdNumber','originatecalleridname','originatecalleridnum','extractCalleridNumber','addVariables','setXMDContactVariables','assign','merge'];(function(_0x5f4e93,_0x5ce1fc){var _0x10cae5=function(_0x1defdf){while(--_0x1defdf){_0x5f4e93['push'](_0x5f4e93['shift']());}};_0x10cae5(++_0x5ce1fc);}(_0x95fe,0x154));var _0xe95f=function(_0x287c21,_0x1b7be5){_0x287c21=_0x287c21-0x0;var _0x145e31=_0x95fe[_0x287c21];return _0x145e31;};'use strict';var util=require('util');var _=require(_0xe95f('0x0'));var uuid=require(_0xe95f('0x1'));var moment=require('moment');var Redis=require(_0xe95f('0x2'));var config=require(_0xe95f('0x3'));var logger=require('../../../config/logger')('preview');var loggerAction=require(_0xe95f('0x4'))('actionPreview');var ami=require(_0xe95f('0x5'));var rpcDb=require('./rpcDb');var cmHopperAdditionalPhone=require(_0xe95f('0x6'));var Action=require(_0xe95f('0x7'));var ut=require(_0xe95f('0x8'));var utils=require('../dialer/utils');config[_0xe95f('0x9')]=_[_0xe95f('0xa')](config['redis'],{'host':'localhost','port':0x18eb});var io=require('socket.io-emitter')(new Redis(config[_0xe95f('0x9')]));var Sequence=function(){};Sequence['prototype']['enqueue']=function(_0x2f3f40){this[_0xe95f('0xb')]=this[_0xe95f('0xb')]?this[_0xe95f('0xb')][_0xe95f('0xc')](_0x2f3f40):_0x2f3f40();};function Preview(_0x1d6b74){this['sequence']=new Sequence();this[_0xe95f('0xd')]=_0x1d6b74[_0xe95f('0xe')];this[_0xe95f('0xf')]=_0x1d6b74[_0xe95f('0xf')];this[_0xe95f('0x10')]={};this[_0xe95f('0x11')]=_0x1d6b74[_0xe95f('0x11')];this['clockClearZombieChannels']=0x0;ami['on'](_0xe95f('0x12'),this[_0xe95f('0x13')][_0xe95f('0x14')](this));ami['on'](_0xe95f('0x15'),this[_0xe95f('0x16')][_0xe95f('0x14')](this));ami['on'](_0xe95f('0x17'),this['syncHangupRequest'][_0xe95f('0x14')](this));ami['on'](_0xe95f('0x18'),this[_0xe95f('0x19')][_0xe95f('0x14')](this));ami['on'](_0xe95f('0x1a'),this[_0xe95f('0x1b')]['bind'](this));ami['on']('varset',this[_0xe95f('0x1c')][_0xe95f('0x14')](this));ami['on']('attendedtransfer',this['syncAttendedTransfer']['bind'](this));ami['on'](_0xe95f('0x1d'),this[_0xe95f('0x1e')]['bind'](this));this['loopCampaigns'](this[_0xe95f('0xd')]);}function emit(_0x58cff2,_0x21c372,_0x180de2){io['to'](_0x58cff2)[_0xe95f('0x1f')](_0x21c372,_0x180de2);}function emitVoiceQueueChannelRemove(_0x16e060){logger[_0xe95f('0x20')](_0xe95f('0x21'),JSON[_0xe95f('0x22')](_0x16e060));emit(util[_0xe95f('0x23')](_0xe95f('0x24'),_0x16e060[_0xe95f('0x25')]),_0xe95f('0x26'),_0x16e060);io[_0xe95f('0x1f')]('voice_queue_presence:remove',_0x16e060);}function notSendMessagesQueue(_0x495e5e){if(_0x495e5e[_0xe95f('0x27')]){if(_0x495e5e[_0xe95f('0x28')]===0x0&&_0x495e5e[_0xe95f('0x29')]===0x0){_0x495e5e['sendMessageOneNotActive']=![];_0x495e5e[_0xe95f('0x2a')]=0x0;_0x495e5e[_0xe95f('0x2b')]=0x0;_0x495e5e[_0xe95f('0x2c')]=utils[_0xe95f('0x2d')][_0xe95f('0x2e')];ut['logger']('[CampaignPreview]\x20Campaign\x20Queue:\x20',_0x495e5e[_0xe95f('0x25')]+_0xe95f('0x2f'));}else{_0x495e5e[_0xe95f('0x2c')]=utils['CAMPAIGN_STATUS'][_0xe95f('0x30')];ut[_0xe95f('0x31')](_0xe95f('0x32'),_0x495e5e['name']+_0xe95f('0x33'));}}}Preview[_0xe95f('0x34')]['loopCampaigns']=function(){var _0x57ff39=this;setInterval(function(){_0x57ff39[_0xe95f('0x35')]();},0x7cf);};Preview[_0xe95f('0x34')][_0xe95f('0x35')]=function(){var _0x502c57=this[_0xe95f('0xd')];this[_0xe95f('0x36')]+=0x1;for(var _0x1ef0df in _0x502c57){if(_0x502c57[_0xe95f('0x37')](_0x1ef0df)&&(_0x502c57[_0x1ef0df][_0xe95f('0x38')]===_0xe95f('0x39')||_0x502c57[_0x1ef0df]['dialMethod']===_0xe95f('0x3a'))&&_0x502c57[_0x1ef0df][_0xe95f('0x3b')]===_0xe95f('0x3c')){if(this[_0xe95f('0x36')]>0x7){this[_0xe95f('0x36')]=0x0;this[_0xe95f('0x3d')]();}}if(_0x502c57[_0xe95f('0x37')](_0x1ef0df)&&_0x502c57[_0x1ef0df][_0xe95f('0x38')]===_0xe95f('0x39')&&_0x502c57[_0x1ef0df][_0xe95f('0x3b')]==='outbound'){if(_0x502c57[_0x1ef0df][_0xe95f('0x3e')]){this[_0xe95f('0x3f')](_0x502c57[_0x1ef0df]);if(_0x502c57[_0x1ef0df][_0xe95f('0x40')])this[_0xe95f('0x41')](_0x502c57[_0x1ef0df]);}else{notSendMessagesQueue(_0x502c57[_0x1ef0df]);}}}};Preview[_0xe95f('0x34')]['clearZombieChannel']=function(_0x3d41aa){var _0x256e4a=this;this[_0xe95f('0x42')][_0xe95f('0x43')](function(){if(!_[_0xe95f('0x44')](_0x256e4a[_0xe95f('0x10')][_0x3d41aa])){loggerAction[_0xe95f('0x20')](_0xe95f('0x45'),_0x3d41aa,'Queue',_0x256e4a[_0xe95f('0x10')][_0x3d41aa]['queue'],_0xe95f('0x46'),JSON[_0xe95f('0x22')](_0x256e4a['campaignsPreview'][_0x256e4a[_0xe95f('0x10')][_0x3d41aa][_0xe95f('0x47')]][_0xe95f('0x28')]),_0xe95f('0x48'),JSON['stringify'](_0x256e4a[_0xe95f('0xd')][_0x256e4a['actions'][_0x3d41aa]['queue']][_0xe95f('0x29')]),JSON[_0xe95f('0x22')](_0x256e4a[_0xe95f('0x10')][_0x3d41aa]['dialAnswer']),JSON[_0xe95f('0x22')](_[_0xe95f('0x49')](_0x256e4a[_0xe95f('0x10')][_0x3d41aa],[_0xe95f('0x4a'),_0xe95f('0x4b'),_0xe95f('0x4c'),_0xe95f('0x4d')])));return ami[_0xe95f('0x4e')]({'action':_0xe95f('0x4f'),'channel':_0x256e4a[_0xe95f('0x10')][_0x3d41aa][_0xe95f('0x50')]})[_0xe95f('0x51')](function(_0x1cea1c){if(_0x1cea1c[_0xe95f('0x2c')]===_0xe95f('0x52')){setTimeout(function(){if(_0x256e4a['actions'][_0x3d41aa]){ut[_0xe95f('0x53')](_0x256e4a[_0xe95f('0xd')][_0x256e4a[_0xe95f('0x10')][_0x3d41aa][_0xe95f('0x47')]],_0xe95f('0x54'));if(_0x256e4a[_0xe95f('0x10')][_0x3d41aa][_0xe95f('0x55')]===!![]){ut['decrementTalkink'](_0x256e4a[_0xe95f('0xd')][_0x256e4a[_0xe95f('0x10')][_0x3d41aa][_0xe95f('0x47')]],_0xe95f('0x54'));ut['loggerError']('[Dialer][checkChannel][pTalking][Preview]'+_0x3d41aa,_0x256e4a[_0xe95f('0x10')][_0x3d41aa][_0xe95f('0x47')]);}ut['loggerError'](_0xe95f('0x56')+_0x3d41aa,_0x256e4a[_0xe95f('0x10')][_0x3d41aa][_0xe95f('0x47')]);delete _0x256e4a['actions'][_0x3d41aa];}},0x2328);}});}});};Preview[_0xe95f('0x34')][_0xe95f('0x3d')]=function(){var _0x238697=this;loggerAction[_0xe95f('0x20')](_0xe95f('0x57'),_[_0xe95f('0x58')](this[_0xe95f('0x10')]));for(var _0x49e969 in this[_0xe95f('0x10')]){if(_0x238697[_0xe95f('0x10')]['hasOwnProperty'](_0x49e969)){_0x238697['clearZombieChannel'](_0x49e969);}}};Preview['prototype']['recallMe']=function(_0x459e70){var _0x2e1708=this;rpcDb[_0xe95f('0x59')](_0x459e70['id'],ut['agentReadyId'](this[_0xe95f('0x11')]))[_0xe95f('0x5a')](function(_0x3c9d5d){if(!_[_0xe95f('0x44')](_0x3c9d5d)){for(var _0x2030ad=0x0;_0x2030ad<_0x3c9d5d[_0xe95f('0x5b')];_0x2030ad+=0x1){if(ut[_0xe95f('0x5c')](_0x3c9d5d[_0x2030ad][_0xe95f('0x5d')])<_0x459e70[_0xe95f('0x5e')]*0x3c){if(_0x3c9d5d[_0x2030ad]['Agent']&&!_0x3c9d5d[_0x2030ad]['Agent'][_0xe95f('0x5f')]){_0x2e1708[_0xe95f('0x60')](_0x3c9d5d[_0x2030ad]['id'])[_0xe95f('0x5a')](ut[_0xe95f('0x61')](_0xe95f('0x62')))[_0xe95f('0x51')](ut[_0xe95f('0x61')]('[RecallMe]'));}else{rpcDb[_0xe95f('0x63')](_0x3c9d5d[_0x2030ad]['id']);}}else{var _0x56acb4=new Action(_0x3c9d5d[_0x2030ad],_0x459e70);_0x56acb4[_0xe95f('0x64')]=moment()[_0xe95f('0x23')](_0xe95f('0x65'));_0x459e70[_0xe95f('0x66')]+=0x1;ut[_0xe95f('0x67')](_0x56acb4,0x17,_0xe95f('0x68'));if(_0x459e70[_0xe95f('0x69')]){rpcDb[_0xe95f('0x6a')](ut[_0xe95f('0x6b')](_0x3c9d5d[_0x2030ad]));rpcDb[_0xe95f('0x6c')](_0x56acb4,_0xe95f('0x6d'));}else{ut['logCustomer'](_0x56acb4,0x16,_0xe95f('0x6e'));rpcDb[_0xe95f('0x6c')](_0x56acb4,_0xe95f('0x6f'));rpcDb[_0xe95f('0x70')](_0x56acb4,_0xe95f('0x6f'));}}}}})[_0xe95f('0x51')](ut[_0xe95f('0x61')]('[getContactRecallMe]'));};Preview[_0xe95f('0x34')][_0xe95f('0x3f')]=function(_0x517ef5){_0x517ef5[_0xe95f('0x27')]=!![];if(ut[_0xe95f('0x71')](_0x517ef5[_0xe95f('0x72')])){_0x517ef5[_0xe95f('0x2c')]=utils[_0xe95f('0x2d')][_0xe95f('0x73')];}else if(!ut[_0xe95f('0x74')](_0x517ef5[_0xe95f('0x3e')])){_0x517ef5[_0xe95f('0x2c')]=utils[_0xe95f('0x2d')]['INACTIVE'];}else if(!this[_0xe95f('0x75')](_0x517ef5[_0xe95f('0x76')])){if(!this[_0xe95f('0x75')](_0x517ef5[_0xe95f('0x77')])){_0x517ef5[_0xe95f('0x2c')]=utils[_0xe95f('0x2d')][_0xe95f('0x78')];}else{_0x517ef5[_0xe95f('0x2c')]=utils[_0xe95f('0x2d')]['ACTIVE'];}}else{_0x517ef5[_0xe95f('0x2c')]=utils[_0xe95f('0x2d')][_0xe95f('0x79')];}};Preview[_0xe95f('0x34')][_0xe95f('0x7a')]=function(_0x2d6e60,_0x1c56f2,_0x2ccba8){var _0x45e3da=this;var _0x1829e6=this[_0xe95f('0x10')][_0x1c56f2];var _0x5cb215=this[_0xe95f('0xd')][_0x1829e6[_0xe95f('0x47')]];var _0x47a65d;var _0xc7195=![];var _0x58cece=0x2;var _0x3a2026=0x3;if(_0x5cb215){switch(_0x2ccba8){case'1':_0x5cb215[_0xe95f('0x7b')]+=0x1;_0x1829e6[_0xe95f('0x7c')]+=0x1;_0x1829e6[_0xe95f('0x7d')]=ut[_0xe95f('0x7e')](_0x1829e6);ut[_0xe95f('0x67')](_0x1829e6,0x0,'NoSuchNumber');ami[_0xe95f('0x1f')](_0xe95f('0x7f'),ut[_0xe95f('0x80')](_0x1829e6,_0xe95f('0x81')));rpcDb[_0xe95f('0x6c')](_0x1829e6,_0xe95f('0x82'));_0x45e3da[_0xe95f('0x83')](_0x1829e6,'0',_0x5cb215)[_0xe95f('0x5a')](function(_0x2a43f8){_0xc7195=_0x2a43f8[_0xe95f('0x84')]==0x1;_0x58cece=_0x5cb215[_0xe95f('0x85')];_0x3a2026=_0x5cb215[_0xe95f('0x86')];if(!_0xc7195){if(ut[_0xe95f('0x7e')](_0x1829e6)>=_0x5cb215['dialGlobalMaxRetry']){_0x47a65d=ut['cloneAction'](_0x1829e6,0xf,'Global');rpcDb[_0xe95f('0x70')](_0x47a65d,_0xe95f('0x87'));}else{if(_0x1829e6[_0xe95f('0x7c')]>=_0x5cb215[_0xe95f('0x88')]){rpcDb[_0xe95f('0x70')](_0x1829e6,'[callProgressDetectingCustomer][logNoSuchGlobal]');}else{rpcDb[_0xe95f('0x89')](ut[_0xe95f('0x8a')](_0x1829e6,_0xe95f('0x7c'),_0x5cb215[_0xe95f('0x85')]),_0x1829e6['unlockAgent'],_0x1829e6['activeContact']);}}delete this[_0xe95f('0x10')][_0x2d6e60['linkedid']];}else{_0x1829e6['countnosuchnumberretry']++;logger[_0xe95f('0x20')]('actioncountonusuch',_0x1829e6[_0xe95f('0x7c')]);logger['info']('id',_0x1829e6[_0xe95f('0x8b')]);_0x45e3da[_0xe95f('0x8c')]({'id':_0x1829e6[_0xe95f('0x8b')],'field':{'countnosuchnumberretry':_0x1829e6['countnosuchnumberretry']}})[_0xe95f('0x5a')](function(){_0x45e3da[_0xe95f('0x8d')](_0x1829e6,_0x58cece,_0x3a2026)[_0xe95f('0x5a')](function(){});});}});break;case _0xe95f('0x8e'):var _0x236fea=moment()['format'](_0xe95f('0x65'));_0x1829e6[_0xe95f('0x8f')]=_0x236fea;_0x1829e6[_0xe95f('0x90')]=_0x236fea;_0x1829e6['dialAnswer']=!![];_0x5cb215[_0xe95f('0x29')]+=0x1;logger[_0xe95f('0x20')](_0xe95f('0x91'),_0x1829e6[_0xe95f('0x92')],_0xe95f('0x93'),_0x5cb215[_0xe95f('0x25')],_0xe95f('0x48'),_0x5cb215['pTalking']);ami[_0xe95f('0x1f')]('custom:agentconnect',ut[_0xe95f('0x80')](_0x1829e6,_0xe95f('0x94'),this[_0xe95f('0xd')][_0x1829e6[_0xe95f('0x47')]]));if(_0x5cb215[_0xe95f('0x95')]){ami['emit'](_0xe95f('0x96'),ut['buildAcw'](_0x1829e6));}break;case'16':ami[_0xe95f('0x1f')](_0xe95f('0x97'),ut[_0xe95f('0x80')](_0x1829e6,_0xe95f('0x98'),this[_0xe95f('0xd')][_0x1829e6[_0xe95f('0x47')]]));emitVoiceQueueChannelRemove(ut[_0xe95f('0x80')](_0x1829e6,_0xe95f('0x98')));_0x5cb215[_0xe95f('0x99')]+=0x1;_0x5cb215[_0xe95f('0x9a')]+=0x1;_0x5cb215[_0xe95f('0x9b')]+=0x1;ut['decrementTalkink'](_0x5cb215,_0xe95f('0x9c'));_0x1829e6['countglobal']=ut[_0xe95f('0x7e')](_0x1829e6);ut[_0xe95f('0x67')](_0x1829e6,0x4,_0xe95f('0x9d'));rpcDb[_0xe95f('0x6c')](_0x1829e6,_0xe95f('0x9e'));rpcDb[_0xe95f('0x70')](_0x1829e6,_0xe95f('0x9f'));rpcDb['crateCustomerReportQueue'](_0x1829e6);_0x5cb215[_0xe95f('0xa0')]+=_0x1829e6['talktime'];_0x5cb215[_0xe95f('0xa1')]+=_0x1829e6[_0xe95f('0xa2')];logger[_0xe95f('0x20')](_0xe95f('0xa3'),_0x1829e6[_0xe95f('0x92')],_0xe95f('0x93'),_0x5cb215[_0xe95f('0x25')],'pTalking:\x20',_0x5cb215[_0xe95f('0x29')]);delete this[_0xe95f('0x10')][_0x2d6e60[_0xe95f('0xa4')]];break;case'BUSY':_0x5cb215['outboundBusyCallsDay']+=0x1;_0x1829e6[_0xe95f('0xa5')]+=0x1;_0x1829e6[_0xe95f('0x7d')]=ut[_0xe95f('0x7e')](_0x1829e6);ut['logCustomer'](_0x1829e6,0x5,_0xe95f('0xa6'));_0x58cece=_0x5cb215[_0xe95f('0xa7')];_0x3a2026=_0x5cb215[_0xe95f('0x86')];ami[_0xe95f('0x1f')]('custom:agentbusy',ut[_0xe95f('0x80')](_0x1829e6,_0xe95f('0xa8')));rpcDb['createCustomerHistory'](_0x1829e6,_0xe95f('0xa9'));_0x45e3da[_0xe95f('0x83')](_0x1829e6,'5',_0x5cb215)['then'](function(_0x5c9186){_0xc7195=_0x5c9186['additional']==0x1;if(!_0xc7195){if(ut[_0xe95f('0x7e')](_0x1829e6)>=_0x5cb215['dialGlobalMaxRetry']){_0x47a65d=ut['cloneAction'](_0x1829e6,0xf,_0xe95f('0xaa'));rpcDb[_0xe95f('0x70')](_0x47a65d,_0xe95f('0xab'));}else{if(_0x1829e6[_0xe95f('0xa5')]>=_0x5cb215[_0xe95f('0xac')]){rpcDb[_0xe95f('0x70')](_0x1829e6,_0xe95f('0xa9'));}else{rpcDb['rescheduleContact'](ut[_0xe95f('0x8a')](_0x1829e6,_0xe95f('0xa5'),_0x5cb215[_0xe95f('0xa7')]),_0x1829e6[_0xe95f('0xad')],_0x1829e6[_0xe95f('0xae')]);}}}else{_0x1829e6[_0xe95f('0xa5')]++;_0x45e3da[_0xe95f('0x8c')]({'id':_0x1829e6[_0xe95f('0x8b')],'field':{'countbusyretry':_0x1829e6[_0xe95f('0xa5')]}})[_0xe95f('0x5a')](function(){_0x45e3da[_0xe95f('0x8d')](_0x1829e6,_0x58cece,_0x3a2026)[_0xe95f('0x5a')](function(){});});}});break;case _0xe95f('0xaf'):_0x5cb215[_0xe95f('0xb0')]+=0x1;_0x1829e6['countnoanswerretry']+=0x1;_0x1829e6[_0xe95f('0x7d')]=ut['totalGlobal'](_0x1829e6);ut['logCustomer'](_0x1829e6,0x3,'NoAnswer');_0x58cece=_0x5cb215[_0xe95f('0xb1')];_0x3a2026=_0x5cb215[_0xe95f('0x86')];var _0x43d569=ut[_0xe95f('0xb2')](_0x1829e6,_0x5cb215);ami[_0xe95f('0x1f')](_0xe95f('0xb3'),_0x43d569);rpcDb[_0xe95f('0x6c')](_0x1829e6,'[callProgressDetectingCustomer][logNoAnswer]');_0x45e3da['verifyAdditionalPhones'](_0x1829e6,'3',_0x5cb215)[_0xe95f('0x5a')](function(_0x36a311){_0xc7195=_0x36a311['additional']==0x1;if(!_0xc7195){if(ut[_0xe95f('0x7e')](_0x1829e6)>=_0x5cb215[_0xe95f('0xb4')]){_0x47a65d=ut[_0xe95f('0xb5')](_0x1829e6,0xf,'Global');rpcDb[_0xe95f('0x70')](_0x47a65d,_0xe95f('0xb6'));}else{if(_0x1829e6[_0xe95f('0xb7')]>=_0x5cb215['dialNoAnswerMaxRetry']){rpcDb['createCustomerFinal'](_0x1829e6,'[callProgressDetectingCustomer][logNoAnswer]');}else{rpcDb['rescheduleContact'](ut[_0xe95f('0x8a')](_0x1829e6,'countnoanswerretry',_0x5cb215['dialNoAnswerRetryFrequency']),_0x1829e6[_0xe95f('0xad')],_0x1829e6[_0xe95f('0xae')]);}}}else{_0x1829e6[_0xe95f('0xb7')]++;_0x45e3da[_0xe95f('0x8c')]({'id':_0x1829e6[_0xe95f('0x8b')],'field':{'countnoanswerretry':_0x1829e6[_0xe95f('0xb7')]}})[_0xe95f('0x5a')](function(){_0x45e3da['swapAdditionalPhones'](_0x1829e6,_0x58cece,_0x3a2026)['then'](function(){});});}});break;case _0xe95f('0xb8'):_0x5cb215['outboundCongestionCallsDay']+=0x1;_0x1829e6[_0xe95f('0xb9')]+=0x1;_0x1829e6['countglobal']=ut[_0xe95f('0x7e')](_0x1829e6);ut[_0xe95f('0x67')](_0x1829e6,0x8,_0xe95f('0xba'));_0x58cece=_0x5cb215[_0xe95f('0xbb')];_0x3a2026=_0x5cb215[_0xe95f('0x86')];ami[_0xe95f('0x1f')](_0xe95f('0xbc'),ut[_0xe95f('0x80')](_0x1829e6,_0xe95f('0xbd')));rpcDb['createCustomerHistory'](_0x1829e6,'[callProgressDetectingCustomer][logCongestion]');_0x45e3da[_0xe95f('0x83')](_0x1829e6,'8',_0x5cb215)[_0xe95f('0x5a')](function(_0x427932){_0xc7195=_0x427932[_0xe95f('0x84')]==0x1;if(!_0xc7195){if(ut[_0xe95f('0x7e')](_0x1829e6)>=_0x5cb215[_0xe95f('0xb4')]){_0x47a65d=ut[_0xe95f('0xb5')](_0x1829e6,0xf,'Global');rpcDb['createCustomerFinal'](_0x47a65d,'[callProgressDetectingCustomer][logCongestionGlobal]');}else{if(_0x1829e6[_0xe95f('0xb9')]>=_0x5cb215['dialCongestionMaxRetry']){rpcDb[_0xe95f('0x70')](_0x1829e6,_0xe95f('0xbe'));}else{rpcDb[_0xe95f('0x89')](ut[_0xe95f('0x8a')](_0x1829e6,_0xe95f('0xb9'),_0x5cb215[_0xe95f('0xa7')]),_0x1829e6[_0xe95f('0xad')],_0x1829e6[_0xe95f('0xae')]);}}}else{_0x1829e6['countcongestionretry']++;_0x45e3da['incrementPreviewCounters']({'id':_0x1829e6['idContact'],'field':{'countcongestionretry':_0x1829e6['countcongestionretry']}})['then'](function(){_0x45e3da[_0xe95f('0x8d')](_0x1829e6,_0x58cece,_0x3a2026)['then'](function(){});});}});break;case _0xe95f('0xbf'):_0x5cb215['outboundRejectCallsDay']+=0x1;_0x1829e6['countagentrejectretry']+=0x1;_0x1829e6['countglobal']=ut['totalGlobal'](_0x1829e6);ut[_0xe95f('0x67')](_0x1829e6,0x14,'AgentReject');_0x58cece=_0x5cb215[_0xe95f('0xc0')];_0x3a2026=_0x5cb215[_0xe95f('0x86')];ami[_0xe95f('0x1f')](_0xe95f('0xc1'),ut[_0xe95f('0x80')](_0x1829e6,'agentreject'));rpcDb['createCustomerHistory'](_0x1829e6,_0xe95f('0xc2'));_0x45e3da[_0xe95f('0x83')](_0x1829e6,'20',_0x5cb215)[_0xe95f('0x5a')](function(_0x5cc848){_0xc7195=_0x5cc848['additional']==0x1;if(!_0xc7195){if(ut[_0xe95f('0x7e')](_0x1829e6)>=_0x5cb215[_0xe95f('0xb4')]){_0x47a65d=ut[_0xe95f('0xb5')](_0x1829e6,0x14,'AgentReject');rpcDb[_0xe95f('0x70')](_0x47a65d,_0xe95f('0xc3'));}else{if(_0x1829e6[_0xe95f('0xc4')]>=_0x5cb215['dialAgentRejectMaxRetry']){rpcDb[_0xe95f('0x70')](_0x1829e6,'[callProgressDetectingCustomer][logAgentReject]');}else{rpcDb[_0xe95f('0x89')](ut[_0xe95f('0x8a')](_0x1829e6,_0xe95f('0xc4'),_0x5cb215[_0xe95f('0xc0')]),_0x1829e6[_0xe95f('0xad')],_0x1829e6[_0xe95f('0xae')]);}}}else{_0x1829e6[_0xe95f('0xb7')]++;_0x45e3da[_0xe95f('0x8c')]({'id':_0x1829e6[_0xe95f('0x8b')],'field':{'countnoanswerretry':_0x1829e6['countnoanswerretry']}})[_0xe95f('0x5a')](function(){_0x45e3da[_0xe95f('0x8d')](_0x1829e6,_0x58cece,_0x3a2026)[_0xe95f('0x5a')](function(){});});}});break;case _0xe95f('0xc5'):_0x5cb215['outboundAbandonedCallsDay']+=0x1;_0x1829e6['countabandonedretry']+=0x1;_0x1829e6['countglobal']=ut[_0xe95f('0x7e')](_0x1829e6);ut['logCustomer'](_0x1829e6,0xb,'Abandoned');rpcDb['createCustomerHistory'](_0x1829e6,_0xe95f('0xc6'));_0x45e3da[_0xe95f('0x83')](_0x1829e6,'11',_0x5cb215)['then'](function(_0x298e5e){_0xc7195=_0x298e5e[_0xe95f('0x84')]==0x1;if(!_0xc7195){if(ut[_0xe95f('0x7e')](_0x1829e6)>=_0x5cb215[_0xe95f('0xb4')]){_0x47a65d=ut['cloneAction'](_0x1829e6,0xf,_0xe95f('0xaa'));rpcDb[_0xe95f('0x70')](_0x47a65d,_0xe95f('0xc6'));}else{if(_0x1829e6['countabandonedetry']>=_0x5cb215[_0xe95f('0xc7')]){rpcDb[_0xe95f('0x70')](_0x1829e6,'[callProgressDetectingCustomer][logAbandoned]');}else{rpcDb['rescheduleContact'](ut[_0xe95f('0x8a')](_0x1829e6,_0xe95f('0xc8'),_0x5cb215[_0xe95f('0xc9')]),_0x1829e6[_0xe95f('0xad')],_0x1829e6[_0xe95f('0xae')]);}}}else{_0x1829e6[_0xe95f('0xb7')]++;_0x45e3da['incrementPreviewCounters']({'id':_0x1829e6[_0xe95f('0x8b')],'field':{'countnoanswerretry':_0x1829e6[_0xe95f('0xb7')]}})['then'](function(){_0x45e3da[_0xe95f('0x8d')](_0x1829e6,_0x58cece,_0x3a2026)[_0xe95f('0x5a')](function(){});});}});break;case'18':_0x5cb215[_0xe95f('0xca')]+=0x1;_0x1829e6[_0xe95f('0xcb')]+=0x1;_0x1829e6['countglobal']=ut[_0xe95f('0x7e')](_0x1829e6);ut[_0xe95f('0x67')](_0x1829e6,0x12,_0x2d6e60[_0xe95f('0xcc')]||_0x2d6e60[_0xe95f('0xcd')]);ami[_0xe95f('0x1f')]('custom:amd',ut[_0xe95f('0x80')](_0x1829e6,_0xe95f('0xce')));rpcDb[_0xe95f('0x6c')](_0x1829e6,_0xe95f('0xcf'));_0x45e3da[_0xe95f('0x83')](_0x1829e6,'18',_0x5cb215)[_0xe95f('0x5a')](function(_0x1b3dcf){_0xc7195=_0x1b3dcf['additional']==0x1;if(!_0xc7195){if(ut[_0xe95f('0x7e')](_0x1829e6)>=_0x5cb215[_0xe95f('0xb4')]){_0x47a65d=ut['cloneAction'](_0x1829e6,0x12,'Global');rpcDb['createCustomerFinal'](_0x47a65d,_0xe95f('0xcf'));}else{rpcDb[_0xe95f('0x70')](_0x1829e6,_0xe95f('0xcf'));}}else{_0x1829e6['countnoanswerretry']++;_0x45e3da[_0xe95f('0x8c')]({'id':_0x1829e6[_0xe95f('0x8b')],'field':{'countnoanswerretry':_0x1829e6[_0xe95f('0xb7')]}})['then'](function(){_0x45e3da[_0xe95f('0x8d')](_0x1829e6,_0x58cece,_0x3a2026)[_0xe95f('0x5a')](function(){});});}});delete this[_0xe95f('0x10')][_0x2d6e60[_0xe95f('0xa4')]];break;case'19':_0x5cb215[_0xe95f('0xca')]+=0x1;_0x1829e6[_0xe95f('0x7d')]=ut[_0xe95f('0x7e')](_0x1829e6);ut['logCustomer'](_0x1829e6,0x13,_0x2d6e60[_0xe95f('0xcc')]||_0x2d6e60[_0xe95f('0xcd')]);ami[_0xe95f('0x1f')](_0xe95f('0xd0'),ut[_0xe95f('0x80')](_0x1829e6,_0xe95f('0xce')));rpcDb[_0xe95f('0x6c')](_0x1829e6,_0xe95f('0xd1'));_0x45e3da[_0xe95f('0x83')](_0x1829e6,'18',_0x5cb215)[_0xe95f('0x5a')](function(_0x8c17fe){_0xc7195=_0x8c17fe[_0xe95f('0x84')]==0x1;if(!_0xc7195){if(ut[_0xe95f('0x7e')](_0x1829e6)>=_0x5cb215['dialGlobalMaxRetry']){_0x47a65d=ut['cloneAction'](_0x1829e6,0xf,_0xe95f('0xaa'));rpcDb[_0xe95f('0x70')](_0x47a65d,_0xe95f('0xd1'));}else{rpcDb['createCustomerFinal'](_0x1829e6,_0xe95f('0xd1'));}}else{_0x1829e6['countnoanswerretry']++;_0x45e3da['incrementPreviewCounters']({'id':_0x1829e6['idContact'],'field':{'countnoanswerretry':_0x1829e6[_0xe95f('0xb7')]}})['then'](function(){_0x45e3da[_0xe95f('0x8d')](_0x1829e6,_0x58cece,_0x3a2026)[_0xe95f('0x5a')](function(){});});}});delete this[_0xe95f('0x10')][_0x2d6e60[_0xe95f('0xa4')]];break;default:if(_0x1829e6['dialAnswer']){ut['decrementTalkink'](_0x5cb215,'[default]');ut[_0xe95f('0xd2')]('[Dialer][decrementTalkink][no\x20Hangup][Preview]'+_0x5cb215[_0xe95f('0x25')],_0x2d6e60);}_0x5cb215[_0xe95f('0xca')]+=0x1;_0x1829e6[_0xe95f('0x7d')]=ut[_0xe95f('0x7e')](_0x1829e6);ut[_0xe95f('0x67')](_0x1829e6,0xc,_0x2d6e60[_0xe95f('0xcc')]||_0x2d6e60[_0xe95f('0xcd')]);_0x58cece=_0x5cb215['dialAgentRejectRetryFrequency'];_0x3a2026=_0x5cb215[_0xe95f('0x86')];rpcDb[_0xe95f('0x6c')](_0x1829e6,_0xe95f('0xd3'));_0x45e3da[_0xe95f('0x83')](_0x1829e6,'20',_0x5cb215)[_0xe95f('0x5a')](function(_0x1b8562){_0xc7195=_0x1b8562[_0xe95f('0x84')]==0x1;if(!_0xc7195){if(ut['totalGlobal'](_0x1829e6)>=_0x5cb215[_0xe95f('0xb4')]){_0x47a65d=ut[_0xe95f('0xb5')](_0x1829e6,0xf,_0xe95f('0xaa'));rpcDb[_0xe95f('0x70')](_0x47a65d,_0xe95f('0xd4'));}else{rpcDb[_0xe95f('0x70')](_0x1829e6,_0xe95f('0xd4'));}delete this[_0xe95f('0x10')][_0x2d6e60[_0xe95f('0xa4')]];}else{_0x45e3da['swapAdditionalPhones'](_0x1829e6,_0x58cece,_0x3a2026)[_0xe95f('0x5a')](function(){});}});}if(!(_0x1829e6['dialAnswer']&&_0x2ccba8==='16')){ut[_0xe95f('0x53')](_0x5cb215,_0xe95f('0xd5'));logger[_0xe95f('0x20')]('[originated][decrement][callProgressDetectingCustomer]',_0x1829e6[_0xe95f('0x92')],_0xe95f('0x93'),_0x5cb215[_0xe95f('0x25')],_0xe95f('0x46'),_0x5cb215[_0xe95f('0x28')]);}if(_0x2ccba8!==_0xe95f('0x8e')){delete this[_0xe95f('0x10')][_0x2d6e60[_0xe95f('0xa4')]];delete this[_0xe95f('0x10')][_0x2d6e60['destlinkedid']];}_0x5cb215[_0xe95f('0xd6')]=!![];}};Preview[_0xe95f('0x34')]['callProgressDetectingAgent']=function(_0x24b393,_0x92e538,_0x590576){if(_[_0xe95f('0xd7')](_0x92e538)&&'object'!==typeof _0x92e538){return;}if(_[_0xe95f('0xd7')](_0x590576)&&'object'!==typeof _0x590576){return;}switch(_0x590576[_0xe95f('0xd8')]){case'0':ut[_0xe95f('0xd9')](_0x24b393,0x0,_0xe95f('0xda'));rpcDb[_0xe95f('0xdb')](_0x24b393,_0xe95f('0xdc'));break;case'3':ut[_0xe95f('0xd9')](_0x24b393,0x3,_0xe95f('0xdd'));rpcDb[_0xe95f('0xdb')](_0x24b393,_0xe95f('0xde'));break;case'5':ut[_0xe95f('0xd9')](_0x24b393,0x5,_0xe95f('0xa6'));rpcDb[_0xe95f('0xdb')](_0x24b393,_0xe95f('0xdf'));break;case'8':ut['logAgent'](_0x24b393,0x8,_0xe95f('0xba'));rpcDb['createAgentHistory'](_0x24b393,_0xe95f('0xe0'));break;case'22':ut['logAgent'](_0x24b393,0x16,_0xe95f('0xe1'));rpcDb[_0xe95f('0xdb')](_0x24b393,_0xe95f('0xe2'));break;default:ut[_0xe95f('0xd9')](_0x24b393,0xc,_0x590576[_0xe95f('0xd8')]);rpcDb[_0xe95f('0xdb')](_0x24b393,_0xe95f('0xe0'));}ut[_0xe95f('0x53')](_0x92e538,'[callProgressDetectingAgent]');logger[_0xe95f('0x20')](_0xe95f('0xe3'),_0x24b393[_0xe95f('0x92')],_0xe95f('0x93'),_0x92e538[_0xe95f('0x25')],_0xe95f('0x46'),_0x92e538['originated']);delete this['actions'][_0x24b393[_0xe95f('0x92')]];};Preview[_0xe95f('0x34')][_0xe95f('0x83')]=function(_0x116be5,_0x2dae42,_0x32e71d){return cmHopperAdditionalPhone[_0xe95f('0x83')](_0x116be5,_0x2dae42,_0x32e71d)[_0xe95f('0x51')](logger['info'](_0xe95f('0xe4')));};Preview[_0xe95f('0x34')][_0xe95f('0x8d')]=function(_0x44eb30,_0xd1bf26,_0x4a6aa){return cmHopperAdditionalPhone[_0xe95f('0x8d')](_0x44eb30,_0xd1bf26,_0x4a6aa)['catch'](logger['info'](_0xe95f('0xe5')));};Preview['prototype']['incrementPreviewCounters']=function(_0x547db8){return Promise['resolve']()[_0xe95f('0x5a')](cmHopperAdditionalPhone[_0xe95f('0x8c')](_0x547db8))['catch'](logger[_0xe95f('0x20')](_0xe95f('0xe6')));};Preview[_0xe95f('0x34')][_0xe95f('0xe7')]=function(_0x5dd159,_0x339133,_0xba5930,_0x5cb18b,_0x2f7b84){var _0x9bcb52=this;return new Promise(function(_0xef1016,_0x26da19){if(_[_0xe95f('0x44')](_0x339133)||_['isNil'](_0x339133[_0xe95f('0xe8')])||_[_0xe95f('0x44')](_0x339133[_0xe95f('0xe9')])||_[_0xe95f('0x44')](_0x339133[_0xe95f('0x4c')])){_0x26da19(ut['message'](_0xe95f('0xea'),_0x5cb18b,_0x2f7b84));return;}var _0xd84e8b=uuid['v4']();var _0x1f93af=_0x9bcb52[_0xe95f('0xd')][_0x339133['Queue'][_0xe95f('0x25')]];var _0x22f150=_0xba5930?_0x9bcb52[_0xe95f('0x11')][_0xba5930]['id']:undefined;_0x9bcb52[_0xe95f('0x10')][_0xd84e8b]=new Action(_0x339133,_0x1f93af,_0xd84e8b,_0xba5930,_0x22f150);var _0x382ebb=_0x9bcb52[_0xe95f('0x10')][_0xd84e8b];_0x382ebb[_0xe95f('0xad')]=_0x5cb18b;_0x382ebb[_0xe95f('0xae')]=_0x2f7b84;_0x382ebb[_0xe95f('0xeb')]=_0xba5930;if(_['isEmpty'](_0x5dd159)){_0x9bcb52[_0xe95f('0xec')](_0x382ebb,_0x1f93af,_0x339133,_0xba5930)[_0xe95f('0x5a')](function(_0x48b830){logger['info'](_0xe95f('0xed'),'Queue:\x20'+_0x382ebb[_0xe95f('0x47')]+_0xe95f('0xee')+_0x382ebb[_0xe95f('0x8b')],JSON[_0xe95f('0x22')](_0x48b830));ami[_0xe95f('0x1f')](_0xe95f('0xef'),ut[_0xe95f('0x80')](_0x382ebb,_0xe95f('0xf0'),_0x9bcb52[_0xe95f('0xd')][_0x382ebb[_0xe95f('0x47')]]));_0xef1016(ut[_0xe95f('0x2c')](_0xe95f('0xf1')));})[_0xe95f('0x51')](function(_0x1682e5){ut['logger']('[Preview][execCall][failure]',_0x1682e5);_0x26da19(ut[_0xe95f('0x2c')](_0xe95f('0xf2'),_0x5cb18b,_0x2f7b84));});}else{_0x1f93af[_0xe95f('0xf3')]+=0x1;ut[_0xe95f('0xf4')](_0x382ebb);rpcDb[_0xe95f('0xf5')](_0x382ebb,_0xe95f('0xf6'));delete _0x9bcb52[_0xe95f('0x10')][_0xd84e8b];_0x26da19(ut[_0xe95f('0x2c')](_0xe95f('0xf7'),_0x5cb18b,_0x2f7b84));}});};Preview['prototype'][_0xe95f('0x75')]=function(_0x1ec36c){return!_[_0xe95f('0x44')](_0x1ec36c)&&!_[_0xe95f('0x44')](_0x1ec36c['name'])&&!_['isNil'](_0x1ec36c[_0xe95f('0xf8')])&&_0x1ec36c['active']&&!_[_0xe95f('0x44')](this[_0xe95f('0xf')][util[_0xe95f('0x23')](_0xe95f('0xf9'),_0x1ec36c['name'])])&&!_[_0xe95f('0x44')](this[_0xe95f('0xf')][util[_0xe95f('0x23')](_0xe95f('0xf9'),_0x1ec36c[_0xe95f('0x25')])][_0xe95f('0x4f')])&&(this['trunks'][util['format'](_0xe95f('0xf9'),_0x1ec36c[_0xe95f('0x25')])]['status']==='reachable'||this[_0xe95f('0xf')][util[_0xe95f('0x23')](_0xe95f('0xf9'),_0x1ec36c['name'])]['status']==='unmonitored');};Preview[_0xe95f('0x34')][_0xe95f('0x60')]=function(_0x3e8f6a,_0x35bc77){return this[_0xe95f('0xfa')](_0x3e8f6a,_0x35bc77)[_0xe95f('0x5a')](function(_0x2ba7f8){return _[_0xe95f('0x49')](_0x2ba7f8,[_0xe95f('0x2c')]);})['catch'](function(_0x5c586b){if(_0x5c586b['unlock']){rpcDb[_0xe95f('0xfb')](_0x3e8f6a);}if(_0x5c586b[_0xe95f('0xf8')]){rpcDb['disableContact'](_0x3e8f6a);}throw _[_0xe95f('0x49')](_0x5c586b,[_0xe95f('0x2c')]);});};Preview[_0xe95f('0x34')][_0xe95f('0xfa')]=function(_0x36a26e,_0x27db69){var _0x3637db=this;var _0x5d2328,_0x2f41ae;return rpcDb[_0xe95f('0xfc')](_0x36a26e)['then'](function(_0x257638){if(!_[_0xe95f('0x44')](_0x257638[0x0])){_0x2f41ae=_0x257638[0x0]['recallme']?![]:!![];_0x5d2328=_0x257638[0x0][_0xe95f('0xfd')]?!![]:![];_0x5d2328=_0x27db69?!![]:_0x5d2328;}var _0x52dbf3=_0x3637db[_0xe95f('0xfe')](_0x257638);if(_0x52dbf3[_0xe95f('0xff')]){rpcDb[_0xe95f('0x100')](_[_0xe95f('0x49')](_0x257638[0x0],[_0xe95f('0x4c'),_0xe95f('0xe9')]))[_0xe95f('0x5a')](function(_0x53cada){_0x3637db['checkInBlack'](_0x53cada,_0x257638[0x0],_0x27db69,_0x2f41ae,_0x5d2328)[_0xe95f('0x5a')](function(_0xd1fe69){return _0xd1fe69;})[_0xe95f('0x51')](function(_0x5c0c60){throw _0x5c0c60;});})[_0xe95f('0x51')](function(_0x1ec230){ut[_0xe95f('0x31')](_0xe95f('0x101'),_0x1ec230);throw ut['message'](_0xe95f('0x102'),_0x2f41ae,_0x5d2328);});}else{throw ut['message'](_0x52dbf3[_0xe95f('0x2c')],_0x2f41ae,_0x5d2328);}})[_0xe95f('0x51')](function(_0xd396ab){ut['logger'](_0xe95f('0x103'),_0xd396ab);throw ut[_0xe95f('0x2c')](_0xe95f('0x102'),![],!![]);});};Preview['prototype']['validateContact']=function(_0x13139b){if(_[_0xe95f('0x44')](_0x13139b)||_['isEmpty'](_0x13139b)||!_[_0xe95f('0x44')](_0x13139b[0x0]['Agent'])&&_[_0xe95f('0x44')](_0x13139b[0x0][_0xe95f('0x104')][_0xe95f('0x25')])){ut[_0xe95f('0x31')](_0xe95f('0x105'),_0x13139b);return{'isValid':![],'message':_0xe95f('0x106')};}var _0x226cba=this[_0xe95f('0xd')][_0x13139b[0x0]['Queue'][_0xe95f('0x25')]];_0x226cba[_0xe95f('0x2c')]=utils[_0xe95f('0x2d')]['ACTIVE'];if(_[_0xe95f('0x44')](_0x226cba)){ut[_0xe95f('0x31')]('[Preview][validateContact][Empty\x20Campaign]',_0x226cba);return{'isValid':![],'message':_0xe95f('0x107')};}if(!this[_0xe95f('0x75')](_0x226cba['Trunk'])){ut[_0xe95f('0x31')](_0xe95f('0x108'),_0xe95f('0x109')+_0x226cba[_0xe95f('0x25')]+_0xe95f('0x10a'));if(!this[_0xe95f('0x75')](_0x226cba[_0xe95f('0x77')])){ut[_0xe95f('0x31')](_0xe95f('0x108'),_0x226cba['name']+_0xe95f('0x10b'));return{'isValid':![],'message':'Trunk\x20not\x20working\x20correctly'};}}if(!ut[_0xe95f('0x74')](_0x226cba[_0xe95f('0x3e')])){ut[_0xe95f('0x31')](_0xe95f('0x10c'),_0x226cba[_0xe95f('0x25')]+'\x20Not\x20Active');return{'isValid':![],'message':'campaign\x20Name:\x20'+_0x226cba[_0xe95f('0x25')]+_0xe95f('0x10d')};}return{'isValid':!![],'message':'Is\x20Valid'};};Preview['prototype'][_0xe95f('0xec')]=function(_0x1c7a24,_0x23f657,_0x2265cb,_0x338432){var _0x341c86=this;return new Promise(function(_0x8261fa,_0x362ca3){var _0x320fa5=_0x1c7a24['uniqueid'];var _0x26372a=_0x341c86[_0xe95f('0x75')](_0x23f657[_0xe95f('0x76')])?util['format'](_0xe95f('0x10e'),_0x23f657[_0xe95f('0x76')][_0xe95f('0x25')],_[_0xe95f('0x44')](_0x23f657[_0xe95f('0x10f')])?'':_0x23f657[_0xe95f('0x10f')][_0xe95f('0x110')]()||'',_0x23f657['dialCutDigit']>0x0?_0x2265cb[_0xe95f('0xe9')]['substring'](_0x23f657['dialCutDigit']):_0x2265cb['phone']):util[_0xe95f('0x23')]('SIP/%s/%s%s',_[_0xe95f('0x44')](_0x23f657[_0xe95f('0x77')])?_0x23f657['Trunk'][_0xe95f('0x25')]:_0x23f657[_0xe95f('0x77')]['name'],_['isNil'](_0x23f657[_0xe95f('0x10f')])?'':_0x23f657['dialPrefix'][_0xe95f('0x110')]()||'',_0x23f657[_0xe95f('0x111')]>0x0?_0x2265cb[_0xe95f('0xe9')][_0xe95f('0x112')](_0x23f657['dialCutDigit']):_0x2265cb['phone']);var _0x5cdc70=_0x341c86[_0xe95f('0x75')](_0x23f657[_0xe95f('0x76')])?ut[_0xe95f('0x113')](_0x23f657[_0xe95f('0x76')][_0xe95f('0x114')],_0x23f657[_0xe95f('0x115')],_0x23f657[_0xe95f('0x116')]>0x0?ut[_0xe95f('0x117')](_0x23f657['dialOriginateCallerIdNumber'],_0x23f657['dialRandomLastDigitCallerIdNumber']):_0x23f657[_0xe95f('0x118')]):ut['getCallerId'](_[_0xe95f('0x44')](_0x23f657[_0xe95f('0x77')])?_0x23f657['Trunk']['callerid']:_0x23f657[_0xe95f('0x77')]['callerid'],_0x23f657[_0xe95f('0x115')],_0x23f657[_0xe95f('0x116')]>0x0?ut[_0xe95f('0x117')](_0x23f657[_0xe95f('0x118')],_0x23f657[_0xe95f('0x116')]):_0x23f657[_0xe95f('0x118')]);if(_0x5cdc70){_0x1c7a24[_0xe95f('0x119')]=ut['extractCalleridName'](_0x5cdc70);_0x1c7a24[_0xe95f('0x11a')]=ut[_0xe95f('0x11b')](_0x5cdc70);}var _0x570d10=ut[_0xe95f('0x11c')](_0x23f657,_0x2265cb,_0x26372a,_0x5cdc70,_0x320fa5,_0x1c7a24);var _0x23182=utils[_0xe95f('0x11d')](_0x2265cb[_0xe95f('0xe8')]);Object[_0xe95f('0x11e')](_0x570d10,_0x23182);_[_0xe95f('0x11f')](_0x1c7a24,ut[_0xe95f('0x120')](_0x570d10));_0x1c7a24['starttime']=moment()[_0xe95f('0x23')](_0xe95f('0x65'));_0x23f657[_0xe95f('0x121')]=_0x570d10;var _0x2ce90b=ut[_0xe95f('0x122')](_0x1c7a24,_0x23f657,_0x570d10,_0x1c7a24[_0xe95f('0xae')],_0x338432);return ami[_0xe95f('0x4e')](_0x2ce90b)[_0xe95f('0x5a')](function(_0x71b2ce){_0x23f657[_0xe95f('0x28')]+=0x1;logger['info']('[originated][increment]',_0x320fa5,_0xe95f('0x93'),_0x23f657[_0xe95f('0x25')],_0xe95f('0x46'),_0x23f657[_0xe95f('0x28')]);_0x8261fa(_0x71b2ce);})['catch'](function(_0x31b57a){ut[_0xe95f('0xd9')](_0x1c7a24,0xe,_0xe95f('0x123'));rpcDb[_0xe95f('0xdb')](_0x1c7a24,'[originateFailure][logOriginateFailure]');_0x362ca3(_0x31b57a);});});};Preview['prototype'][_0xe95f('0x1b')]=function(_0x5bfa21){if(this['actions'][_0x5bfa21[_0xe95f('0xa4')]]){this[_0xe95f('0x10')][_0x5bfa21[_0xe95f('0xa4')]][_0xe95f('0x50')]=_0x5bfa21[_0xe95f('0x50')];}};Preview[_0xe95f('0x34')][_0xe95f('0x13')]=function(_0x36dfef){var _0x2e334d=this;var _0x17c8ad=this['actions'][_0x36dfef['actionid']];if(_0x17c8ad){if(_0x17c8ad[_0xe95f('0xeb')]&&this['agents'][_0x17c8ad['lookAgent']]){ut[_0xe95f('0x124')](_0x17c8ad,this[_0xe95f('0x11')][_0x17c8ad[_0xe95f('0xeb')]][_0xe95f('0x25')],this[_0xe95f('0x11')][_0x17c8ad[_0xe95f('0xeb')]]['id']);}var _0x1b9b6c=_['clone'](_0x17c8ad);_0x1b9b6c[_0xe95f('0x8f')]=moment()[_0xe95f('0x23')](_0xe95f('0x65'));var _0x11167b=_0x2e334d[_0xe95f('0xd')][_0x17c8ad[_0xe95f('0x47')]];if(ut[_0xe95f('0x125')](_0x36dfef['response'])){if(_0x17c8ad['unlockAgent']){rpcDb[_0xe95f('0xfb')](_0x17c8ad[_0xe95f('0x8b')]);}if(_0x17c8ad['activeContact']){rpcDb[_0xe95f('0x63')](_0x17c8ad[_0xe95f('0x8b')]);}ami['emit']('custom:agentringnoanswer',ut[_0xe95f('0x80')](_0x17c8ad,_0xe95f('0x126'),this['campaignsPreview'][_0x17c8ad[_0xe95f('0x47')]]));this['callProgressDetectingAgent'](_0x1b9b6c,_0x11167b,_0x36dfef);}else{_0x17c8ad[_0xe95f('0x64')]=moment()[_0xe95f('0x23')]('YYYY-MM-DD\x20HH:mm:ss');ut['logAgent'](_0x1b9b6c,0x4,_0xe95f('0x9d'));rpcDb[_0xe95f('0xdb')](_0x1b9b6c,_0xe95f('0x127'));}}};Preview[_0xe95f('0x34')][_0xe95f('0x16')]=function(_0x45b35d){var _0x6770a2=this[_0xe95f('0x10')][_0x45b35d[_0xe95f('0xa4')]];var _0x14452e;if(_0x6770a2){_0x14452e=this[_0xe95f('0xd')][_0x6770a2[_0xe95f('0x47')]];logger[_0xe95f('0x20')](_0xe95f('0x128'),_0x45b35d[_0xe95f('0xa4')],_0xe95f('0x93'),_0x14452e[_0xe95f('0x25')],_0xe95f('0x48'),_0x14452e[_0xe95f('0x29')]);}if(this[_0xe95f('0x10')][_0x45b35d['linkedid']]&&_0x45b35d[_0xe95f('0xa4')]!==_0x45b35d[_0xe95f('0x92')]){if(_0x45b35d[_0xe95f('0x129')]==='16'&&this[_0xe95f('0x10')][_0x45b35d[_0xe95f('0xa4')]][_0xe95f('0x55')]){this[_0xe95f('0x7a')](_0x45b35d,_0x45b35d[_0xe95f('0xa4')],_0x45b35d['cause']);}else if(this[_0xe95f('0x10')][_0x45b35d[_0xe95f('0xa4')]]['dialAnswer']){logger[_0xe95f('0x20')](_0xe95f('0x12a'),_0x45b35d[_0xe95f('0xa4')],_0x45b35d[_0xe95f('0x129')],'\x20Queue',_0x14452e[_0xe95f('0x25')],_0xe95f('0x48'),_0x14452e[_0xe95f('0x29')]);this['callProgressDetectingCustomer'](_0x45b35d,_0x45b35d[_0xe95f('0xa4')],_0x45b35d[_0xe95f('0x129')]);}}else if(_0x6770a2&&_[_0xe95f('0x44')](_0x6770a2['statedesc'])&&_0x14452e[_0xe95f('0x12b')]&&_0x45b35d[_0xe95f('0xa4')]===_0x45b35d[_0xe95f('0x92')]&&_['isNil'](_0x45b35d['reason'])&&_0x45b35d[_0xe95f('0x129')]==='16'&&_0x45b35d[_0xe95f('0x12c')]==='6'&&_['isUndefined'](_0x6770a2[_0xe95f('0x12d')])){if(_0x6770a2[_0xe95f('0xad')]){rpcDb[_0xe95f('0xfb')](_0x6770a2['idContact']);}if(_0x6770a2[_0xe95f('0xae')]){rpcDb['disableContact'](_0x6770a2[_0xe95f('0x8b')]);}_0x45b35d[_0xe95f('0xd8')]='22';this[_0xe95f('0x12e')](_0x6770a2,_0x14452e,_0x45b35d);}else if(_0x6770a2&&_0x6770a2[_0xe95f('0x12d')]){if(_0x45b35d[_0xe95f('0x129')]==='16'&&this['actions'][_0x45b35d['linkedid']][_0xe95f('0x55')]){logger[_0xe95f('0x20')]('[syncHangup][talking][transfer]',_0x45b35d['linkedid'],_0x45b35d[_0xe95f('0x129')],_0xe95f('0x93'),_0x14452e[_0xe95f('0x25')],'pTalking:\x20',_0x14452e[_0xe95f('0x29')]);this['callProgressDetectingCustomer'](_0x45b35d,_0x45b35d['linkedid'],_0x45b35d[_0xe95f('0x129')]);}else if(this[_0xe95f('0x10')][_0x45b35d[_0xe95f('0xa4')]]['dialAnswer']){logger[_0xe95f('0x20')](_0xe95f('0x12a'),_0x45b35d[_0xe95f('0xa4')],_0x45b35d['cause'],_0xe95f('0x93'),_0x14452e[_0xe95f('0x25')],'pTalking:\x20',_0x14452e[_0xe95f('0x29')]);this[_0xe95f('0x7a')](_0x45b35d,_0x45b35d['linkedid'],_0x45b35d[_0xe95f('0x129')]);}}};Preview[_0xe95f('0x34')][_0xe95f('0x19')]=function(_0x308453){if(this[_0xe95f('0x10')][_0x308453[_0xe95f('0x12f')]]&&_0x308453[_0xe95f('0x12f')]!==_0x308453[_0xe95f('0x130')]){this[_0xe95f('0x7a')](_0x308453,_0x308453[_0xe95f('0x12f')],_0x308453[_0xe95f('0xcd')]);}};Preview['prototype']['syncHangupRequest']=function(_0x1b9974){if(this[_0xe95f('0x10')][_0x1b9974[_0xe95f('0xa4')]]&&_0x1b9974['linkedid']!==_0x1b9974[_0xe95f('0x92')]&&!this['actions'][_0x1b9974[_0xe95f('0xa4')]][_0xe95f('0x55')]){if(_0x1b9974['cause']==='1'){this[_0xe95f('0x7a')](_0x1b9974,_0x1b9974[_0xe95f('0xa4')],_0x1b9974[_0xe95f('0x129')]);}}};Preview[_0xe95f('0x34')][_0xe95f('0x131')]=function(_0x2aee2a,_0x5dc0c4,_0x43d4d1){if(this[_0xe95f('0x10')][_0x2aee2a]){if(_['isNil'](this['actions'][_0x2aee2a]['variables'])){this[_0xe95f('0x10')][_0x2aee2a]['variables']={};}this['actions'][_0x2aee2a]['variables'][_0x5dc0c4]=_0x43d4d1;}};Preview[_0xe95f('0x34')][_0xe95f('0x1c')]=function(_0x10d529){try{if(!_[_0xe95f('0x44')](_0x10d529)){if(ut[_0xe95f('0x132')](_[_0xe95f('0x133')](_0x10d529[_0xe95f('0x134')])[0x0])){this[_0xe95f('0x131')](_0x10d529['uniqueid'],_[_0xe95f('0x133')](_0x10d529[_0xe95f('0x134')])[0x0],_0x10d529[_0xe95f('0x135')]);}}}catch(_0x151089){logger['error']('[syncVarSet][Preview]',util['inspect'](_0x151089,{'showHidden':![],'depth':null}));}};Preview[_0xe95f('0x34')][_0xe95f('0x136')]=function(_0x4d0b25){if(_0x4d0b25){if(this[_0xe95f('0x10')][_0x4d0b25[_0xe95f('0x137')]]){this['actions'][_0x4d0b25['transfertargetlinkedid']][_0xe95f('0x12d')]=!![];}}};Preview[_0xe95f('0x34')][_0xe95f('0x1e')]=function(_0xc13c24){if(_0xc13c24){if(this[_0xe95f('0x10')][_0xc13c24[_0xe95f('0x138')]]){this[_0xe95f('0x10')][_0xc13c24[_0xe95f('0x138')]][_0xe95f('0x12d')]=!![];}}};module[_0xe95f('0x139')]=Preview; \ No newline at end of file diff --git a/server/services/ami/preview/rpcDb.js b/server/services/ami/preview/rpcDb.js index faf3e24..0f20f2a 100644 --- a/server/services/ami/preview/rpcDb.js +++ b/server/services/ami/preview/rpcDb.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x5872=['type','uniqueid','calleridname','queue','queuecallerjoinAt','answertime','queuecallercompleteAt','endtime','membername','context','from-sip','exten','assigned','queuecallerexitreason','COMPLETED','create','[voiceQueueReport]\x20','getContactRecallMe','util','bluebird','../../../config/logger','preview','../rpc/cmHopperHistory','../rpc/cmHopperBlack','../rpc/voiceQueueReport','error','inspect','createHistory','resolve','then','catch','[createHistory]\x20','moveContactManagedDialer','checkIsBlackList','[checkIsBlackList]\x20','getContactPreview','createCustomerHistory','createCustomerFinal','UserId','active','rescheduleContact','[rescheduleContact]\x20','countReScheduled','[countReScheduled]\x20','unlockContact','[unlockContact]\x20','disableContact','[activeContact]\x20'];(function(_0x1f2042,_0x17c949){var _0x10592c=function(_0x3859e7){while(--_0x3859e7){_0x1f2042['push'](_0x1f2042['shift']());}};_0x10592c(++_0x17c949);}(_0x5872,0x1f2));var _0x2587=function(_0x4b055c,_0x4b870b){_0x4b055c=_0x4b055c-0x0;var _0x4b62bb=_0x5872[_0x4b055c];return _0x4b62bb;};'use strict';var util=require(_0x2587('0x0'));var BPromise=require(_0x2587('0x1'));var logger=require(_0x2587('0x2'))(_0x2587('0x3'));var cmHopper=require('../rpc/cmHopper');var cmHopperHistory=require(_0x2587('0x4'));var cmHopperBlack=require(_0x2587('0x5'));var agentReportPreview=require('../rpc/agentReportPreview');var voiceQueueReport=require(_0x2587('0x6'));function loggerCatch(_0x33c541){return function(_0x366be5){logger[_0x2587('0x7')](_0x33c541,util[_0x2587('0x8')](_0x366be5,{'showHidden':![],'depth':null}));};}function create(_0x22158a){return cmHopperHistory[_0x2587('0x9')](_0x22158a)['catch'](loggerCatch('[createHistory]\x20'));}function createAgent(_0x130e7e){return BPromise[_0x2587('0xa')]()[_0x2587('0xb')](agentReportPreview['createHistory'](_0x130e7e))[_0x2587('0xc')](loggerCatch(_0x2587('0xd')));}function moveContact(_0x201bc4){return cmHopper[_0x2587('0xe')](_0x201bc4,!![])[_0x2587('0xc')](loggerCatch('[moveContactManagedDialer]\x20'));}exports[_0x2587('0xf')]=function(_0x37dde1){return cmHopperBlack[_0x2587('0xf')](_0x37dde1)['catch'](loggerCatch(_0x2587('0x10')));};exports[_0x2587('0x11')]=function(_0x44d7e8){return BPromise['resolve']()[_0x2587('0xb')](cmHopper[_0x2587('0x11')](_0x44d7e8))[_0x2587('0xc')](loggerCatch('[getContactPreview]\x20'));};exports['createHistory']=function(_0x4e8c9b,_0x714fac){create(_0x4e8c9b)[_0x2587('0xc')](loggerCatch(_0x714fac));moveContact(_0x4e8c9b)['catch'](loggerCatch(_0x714fac));};exports['createAgentHistory']=function(_0x423232,_0x1dbbaa){createAgent(_0x423232)['catch'](loggerCatch(_0x1dbbaa));};exports[_0x2587('0x12')]=function(_0x5db8fc,_0x3ed2d6){create(_0x5db8fc)[_0x2587('0xc')](loggerCatch(_0x3ed2d6));};exports[_0x2587('0x13')]=function(_0x306138,_0x478cb0){moveContact(_0x306138)[_0x2587('0xc')](loggerCatch(_0x478cb0));};exports['rescheduleContact']=function(_0x2479d0,_0x14ed76,_0x354474){if(_0x14ed76){_0x2479d0[_0x2587('0x14')]=null;}if(_0x354474){_0x2479d0[_0x2587('0x15')]=![];}return cmHopper[_0x2587('0x16')](_0x2479d0)[_0x2587('0xc')](loggerCatch(_0x2587('0x17')));};exports[_0x2587('0x18')]=function(_0x15f858){return cmHopper[_0x2587('0x18')](_0x15f858)[_0x2587('0xc')](loggerCatch(_0x2587('0x19')));};exports[_0x2587('0x1a')]=function(_0x32b0af){return cmHopper[_0x2587('0x1a')]({'UserId':null},_0x32b0af,0x1)[_0x2587('0xc')](loggerCatch(_0x2587('0x1b')));};exports[_0x2587('0x1c')]=function(_0xd7c4ee){return cmHopper[_0x2587('0x1a')]({'active':![]},_0xd7c4ee,0x1)[_0x2587('0xc')](loggerCatch(_0x2587('0x1d')));};exports['crateCustomerReportQueue']=function(_0x2a7c57){var _0xacb699={};_0xacb699[_0x2587('0x1e')]=_0x2a7c57[_0x2587('0x1e')];_0xacb699[_0x2587('0x1f')]=_0x2a7c57[_0x2587('0x1f')];_0xacb699['calleridnum']=_0x2a7c57['calleridnum'];_0xacb699[_0x2587('0x20')]=_0x2a7c57[_0x2587('0x20')];_0xacb699[_0x2587('0x21')]=_0x2a7c57[_0x2587('0x21')];_0xacb699[_0x2587('0x22')]=_0x2a7c57['answertime'];_0xacb699['queuecallerleaveAt']=_0x2a7c57[_0x2587('0x23')];_0xacb699['queuecallercomplete']=0x1;_0xacb699[_0x2587('0x24')]=_0x2a7c57[_0x2587('0x25')];_0xacb699['connectedlinename']=_0x2a7c57[_0x2587('0x26')];_0xacb699[_0x2587('0x27')]=_0x2587('0x28');_0xacb699[_0x2587('0x29')]='xcally-motion-preview';_0xacb699['holdtime']=0x0;_0xacb699[_0x2587('0x2a')]=0x1;_0xacb699['lastAssignedTo']=_0x2a7c57[_0x2587('0x26')];_0xacb699[_0x2587('0x2b')]=_0x2587('0x2c');return BPromise[_0x2587('0xa')]()[_0x2587('0xb')](voiceQueueReport[_0x2587('0x2d')](_0xacb699))[_0x2587('0xc')](loggerCatch(_0x2587('0x2e')));};exports[_0x2587('0x2f')]=function(_0x2e8cab,_0x53d9c6){return BPromise[_0x2587('0xa')]()['then'](cmHopper['getContactRecallMe'](_0x2e8cab,_0x53d9c6))[_0x2587('0xc')](loggerCatch('[GetContactRecallMe]\x20'));};exports['rescheduleContactInQueue']=function(_0x41a378){return cmHopper[_0x2587('0x16')](_0x41a378,!![],!![])[_0x2587('0xc')](loggerCatch('[rescheduleContactInQueue]\x20'));}; \ No newline at end of file +var _0xda63=['inspect','createHistory','catch','[createHistory]\x20','resolve','then','moveContactManagedDialer','[moveContactManagedDialer]\x20','checkIsBlackList','[checkIsBlackList]\x20','getContactPreview','[getContactPreview]\x20','createAgentHistory','createCustomerHistory','createCustomerFinal','rescheduleContact','UserId','active','[rescheduleContact]\x20','countReScheduled','[countReScheduled]\x20','unlockContact','[unlockContact]\x20','disableContact','[activeContact]\x20','type','uniqueid','calleridnum','calleridname','queue','answertime','queuecallerleaveAt','queuecallercomplete','queuecallercompleteAt','endtime','membername','from-sip','exten','xcally-motion-preview','holdtime','assigned','queuecallerexitreason','COMPLETED','create','[voiceQueueReport]\x20','getContactRecallMe','[GetContactRecallMe]\x20','rescheduleContactInQueue','util','../rpc/cmHopperBlack','error'];(function(_0x3f2de8,_0x53ea99){var _0x6a1c58=function(_0x205db2){while(--_0x205db2){_0x3f2de8['push'](_0x3f2de8['shift']());}};_0x6a1c58(++_0x53ea99);}(_0xda63,0x12f));var _0x3da6=function(_0x52991d,_0x429d72){_0x52991d=_0x52991d-0x0;var _0x5b9004=_0xda63[_0x52991d];return _0x5b9004;};'use strict';var util=require(_0x3da6('0x0'));var BPromise=require('bluebird');var logger=require('../../../config/logger')('preview');var cmHopper=require('../rpc/cmHopper');var cmHopperHistory=require('../rpc/cmHopperHistory');var cmHopperBlack=require(_0x3da6('0x1'));var agentReportPreview=require('../rpc/agentReportPreview');var voiceQueueReport=require('../rpc/voiceQueueReport');function loggerCatch(_0xaa10aa){return function(_0x1be5e6){logger[_0x3da6('0x2')](_0xaa10aa,util[_0x3da6('0x3')](_0x1be5e6,{'showHidden':![],'depth':null}));};}function create(_0x568470){return cmHopperHistory[_0x3da6('0x4')](_0x568470)[_0x3da6('0x5')](loggerCatch(_0x3da6('0x6')));}function createAgent(_0x4183b5){return BPromise[_0x3da6('0x7')]()[_0x3da6('0x8')](agentReportPreview[_0x3da6('0x4')](_0x4183b5))[_0x3da6('0x5')](loggerCatch('[createHistory]\x20'));}function moveContact(_0x120a66){return cmHopper[_0x3da6('0x9')](_0x120a66,!![])[_0x3da6('0x5')](loggerCatch(_0x3da6('0xa')));}exports['checkIsBlackList']=function(_0x3a824d){return cmHopperBlack[_0x3da6('0xb')](_0x3a824d)['catch'](loggerCatch(_0x3da6('0xc')));};exports['getContactPreview']=function(_0x33e7de){return BPromise[_0x3da6('0x7')]()['then'](cmHopper[_0x3da6('0xd')](_0x33e7de))[_0x3da6('0x5')](loggerCatch(_0x3da6('0xe')));};exports[_0x3da6('0x4')]=function(_0x318851,_0x367c4f){create(_0x318851)['catch'](loggerCatch(_0x367c4f));moveContact(_0x318851)['catch'](loggerCatch(_0x367c4f));};exports[_0x3da6('0xf')]=function(_0x1749bc,_0x4f1f37){createAgent(_0x1749bc)[_0x3da6('0x5')](loggerCatch(_0x4f1f37));};exports[_0x3da6('0x10')]=function(_0x72c609,_0x2f9c12){create(_0x72c609)[_0x3da6('0x5')](loggerCatch(_0x2f9c12));};exports[_0x3da6('0x11')]=function(_0x2097e1,_0xc6d56d){moveContact(_0x2097e1)['catch'](loggerCatch(_0xc6d56d));};exports[_0x3da6('0x12')]=function(_0x17329e,_0x498978,_0x51794a){if(_0x498978){_0x17329e[_0x3da6('0x13')]=null;}if(_0x51794a){_0x17329e[_0x3da6('0x14')]=![];}return cmHopper['rescheduleContact'](_0x17329e)[_0x3da6('0x5')](loggerCatch(_0x3da6('0x15')));};exports[_0x3da6('0x16')]=function(_0x196b4a){return cmHopper[_0x3da6('0x16')](_0x196b4a)[_0x3da6('0x5')](loggerCatch(_0x3da6('0x17')));};exports[_0x3da6('0x18')]=function(_0x700cbf){return cmHopper[_0x3da6('0x18')]({'UserId':null},_0x700cbf,0x1)[_0x3da6('0x5')](loggerCatch(_0x3da6('0x19')));};exports[_0x3da6('0x1a')]=function(_0x46b34d){return cmHopper[_0x3da6('0x18')]({'active':![]},_0x46b34d,0x1)[_0x3da6('0x5')](loggerCatch(_0x3da6('0x1b')));};exports['crateCustomerReportQueue']=function(_0x1d3d73){var _0x3dccca={};_0x3dccca[_0x3da6('0x1c')]=_0x1d3d73[_0x3da6('0x1c')];_0x3dccca[_0x3da6('0x1d')]=_0x1d3d73[_0x3da6('0x1d')];_0x3dccca[_0x3da6('0x1e')]=_0x1d3d73[_0x3da6('0x1e')];_0x3dccca[_0x3da6('0x1f')]=_0x1d3d73[_0x3da6('0x1f')];_0x3dccca[_0x3da6('0x20')]=_0x1d3d73[_0x3da6('0x20')];_0x3dccca['queuecallerjoinAt']=_0x1d3d73[_0x3da6('0x21')];_0x3dccca[_0x3da6('0x22')]=_0x1d3d73[_0x3da6('0x21')];_0x3dccca[_0x3da6('0x23')]=0x1;_0x3dccca[_0x3da6('0x24')]=_0x1d3d73[_0x3da6('0x25')];_0x3dccca['connectedlinename']=_0x1d3d73[_0x3da6('0x26')];_0x3dccca['context']=_0x3da6('0x27');_0x3dccca[_0x3da6('0x28')]=_0x3da6('0x29');_0x3dccca[_0x3da6('0x2a')]=0x0;_0x3dccca[_0x3da6('0x2b')]=0x1;_0x3dccca['lastAssignedTo']=_0x1d3d73[_0x3da6('0x26')];_0x3dccca[_0x3da6('0x2c')]=_0x3da6('0x2d');return BPromise[_0x3da6('0x7')]()[_0x3da6('0x8')](voiceQueueReport[_0x3da6('0x2e')](_0x3dccca))[_0x3da6('0x5')](loggerCatch(_0x3da6('0x2f')));};exports[_0x3da6('0x30')]=function(_0x48dccf,_0x5cb76c){return BPromise[_0x3da6('0x7')]()[_0x3da6('0x8')](cmHopper['getContactRecallMe'](_0x48dccf,_0x5cb76c))[_0x3da6('0x5')](loggerCatch(_0x3da6('0x31')));};exports[_0x3da6('0x32')]=function(_0x254825){return cmHopper[_0x3da6('0x12')](_0x254825,!![],!![])[_0x3da6('0x5')](loggerCatch('[rescheduleContactInQueue]\x20'));}; \ No newline at end of file diff --git a/server/services/ami/preview/util/util.js b/server/services/ami/preview/util/util.js index 8590070..008ecf5 100644 --- a/server/services/ami/preview/util/util.js +++ b/server/services/ami/preview/util/util.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x47aa=['loggerCatch','error','inspect','logger','info','loggerError','message','getCallerId','isUndefined','string','isEmpty','format','\x22%s\x22\x20<%s>','\x22\x22\x20<>','isActive','isNil','addVariables','Queue','name','calleridname','calleridnum','ContactId','dialOriginateTimeout','monitor_format','U(xcally-mixmonitor-context)','dialPreviewUrl','dialQueueProject','\x22agi://%s/square,%s\x22','NONE','dialQueueProject2','originatecalleridnum','originatecalleridname','xcally-motion-preview','Call-Type:\x20PREVIEW','_XCALLY_MIXMONITOR_FORMAT','toLowerVariables','updateOriginated','originated','[updateOriginated]\x20object\x20originated\x20is\x20negative','[updateOriginated]\x20is\x20null\x20or\x20undefined','logBlacklist','state','statedesc','Blacklist','starttime','endtime','logAgent','YYYY-MM-DD\x20HH:mm:ss','ringtime','responsetime','logLookAgent','UserId','logCustomer','getSeconds','talktime','isFailure','Failure','variablesAction','BOOKED','uniqueid','originate','channelAgent','timeout','totalGlobal','countnoanswerretry','countagentrejectretry','cloneAction','scheduledAt','active','scheduledat','add','ListId','VoiceQueueId','decrementTalkink','pTalking','[decrementTalkink]\x20is\x20null\x20or\x20undefined','IsNotLoggedIn','voice','mandatoryDisposition','buildObj','buildAcw','queue','interface','hasOwnProperty','not_inuse','status','reachable','push','milliseconds','diff','seconds','createBody','CampaignId','filterKey','idContact','campaigntype','countbusyretry','callback','callbackuniqueid','callbackat','recallme','sipcallid','xmd-queue','xmd-phone','xmd-listid','xmd-dialurl','xmd-dialtimeout','xmd-dialid','xmd-cdrtype','xmd-callerid','xmd-agi','rtpaudioqos','rtpaudioqosbridged','rtpaudioqosjitter','rtpaudioqosjitterbridged','rtpaudioqosloss','rtpaudioqoslossbridged','rtpaudioqosrtt','getCallerIdRandom','\x5cw{0,','replace','random','extractCalleridNumber','match','noanswer','variables','keys','toLowerCase','buildNoAnswerEventPayload','util','lodash','moment','../../../../config/logger','XCALLY_IP_AGI'];(function(_0x29aec6,_0x3a8ec4){var _0x4c923e=function(_0x3f4d9b){while(--_0x3f4d9b){_0x29aec6['push'](_0x29aec6['shift']());}};_0x4c923e(++_0x3a8ec4);}(_0x47aa,0x81));var _0xa47a=function(_0x4a6126,_0x2e57fc){_0x4a6126=_0x4a6126-0x0;var _0x78e730=_0x47aa[_0x4a6126];return _0x78e730;};'use strict';var util=require(_0xa47a('0x0'));var _=require(_0xa47a('0x1'));var moment=require(_0xa47a('0x2'));var logger=require(_0xa47a('0x3'))('preview');var ipAgi=process['env'][_0xa47a('0x4')]||'127.0.0.1';var utils=require('../../dialer/utils');exports[_0xa47a('0x5')]=function(_0x2e4c09){return function(_0x3eb3eb){logger[_0xa47a('0x6')](_0x2e4c09,util[_0xa47a('0x7')](_0x3eb3eb,{'showHidden':![],'depth':null}));};};exports[_0xa47a('0x8')]=function(_0x11f4b7,_0x1f75ae){logger[_0xa47a('0x9')](_0x11f4b7,util[_0xa47a('0x7')](_0x1f75ae,{'showHidden':![],'depth':null}));};exports[_0xa47a('0xa')]=function(_0x2ee52b,_0x171370){logger['error'](_0x2ee52b,util[_0xa47a('0x7')](_0x171370,{'showHidden':![],'depth':null}));};exports['logger2']=function(_0xdd9539){return function(_0x6edddc){logger[_0xa47a('0x9')](_0xdd9539,util['inspect'](_0x6edddc,{'showHidden':![],'depth':null}));};};exports[_0xa47a('0xb')]=function(_0x219cd8,_0x37b28b,_0x263b21){return{'message':_0x219cd8,'unlock':_0x37b28b,'active':_0x263b21};};exports[_0xa47a('0xc')]=function(_0x10eb5f,_0x3e8aa6,_0x45301d){if(!_[_0xa47a('0xd')](_0x45301d)&&_0xa47a('0xe')===typeof _0x45301d&&!_[_0xa47a('0xf')](_0x45301d)){if(!_[_0xa47a('0xd')](_0x3e8aa6)&&_0xa47a('0xe')===typeof _0x3e8aa6&&!_[_0xa47a('0xf')](_0x3e8aa6)){return util['format']('\x22%s\x22\x20<%s>',_0x3e8aa6,_0x45301d);}return util[_0xa47a('0x10')](_0xa47a('0x11'),_0x45301d,_0x45301d);}if(!_[_0xa47a('0xd')](_0x10eb5f)&&_0xa47a('0xe')===typeof _0x10eb5f&&!_['isEmpty'](_0x10eb5f)){return _0x10eb5f;}return _0xa47a('0x12');};exports[_0xa47a('0x13')]=function(_0x180189){if(_[_0xa47a('0x14')](_0x180189)){return![];}return _0x180189;};exports[_0xa47a('0x15')]=function(_0x4ef6e1,_0x4e3aee,_0x4b0487,_0x46925e,_0x1b6e57,_0x138100){var _0x4c7bb5={'XMD-QUEUE':_0x4e3aee['Queue']?_0x4e3aee[_0xa47a('0x16')][_0xa47a('0x17')]:'','XMD-CALLERID':_0x46925e,'XMD-CALLERID-PREVIEW':_0x138100?util[_0xa47a('0x10')]('\x22%s\x22\x20<%s>',_0x138100[_0xa47a('0x18')],_0x138100[_0xa47a('0x19')]):_0x46925e,'XMD-DIALID':_0x1b6e57,'XMD-CONTACTID':_0x4e3aee[_0xa47a('0x1a')],'XMD-CDRTYPE':'dialer','CALLERID(all)':_0x46925e,'XMD-VOICEQUEUEID':_0x4e3aee['VoiceQueueId'],'XMD-DIALCHANNEL':_0x4b0487,'XMD-DIALTIMEOUT':_0x4ef6e1[_0xa47a('0x1b')]||0x1e,'XMD-DIALOPTIONS':util[_0xa47a('0x10')]('\x22rtTxX%s%s\x22',_0x4ef6e1['dialQueueProject2']?'g':'',_[_0xa47a('0xf')](_0x4ef6e1[_0xa47a('0x1c')])?'':_0xa47a('0x1d')),'XMD-DIALURL':_0x4ef6e1[_0xa47a('0x1e')]||'','XMD-AGI':_0x4ef6e1[_0xa47a('0x1f')]?util[_0xa47a('0x10')](_0xa47a('0x20'),ipAgi,_0x4ef6e1['dialQueueProject']):_0xa47a('0x21'),'XMD-AGIAFTER':_0x4ef6e1[_0xa47a('0x22')]?util[_0xa47a('0x10')](_0xa47a('0x20'),ipAgi,_0x4ef6e1[_0xa47a('0x22')]):_0xa47a('0x21'),'XMD-ORIGINATECALLERIDNUM':_0x138100?_0x138100[_0xa47a('0x23')]:'','XMD-ORIGINATECALLERIDNAME':_0x138100?_0x138100[_0xa47a('0x24')]:'','XMD-DESTINATION':_0xa47a('0x25'),'SIPADDHEADER':_0xa47a('0x26')};if(!_[_0xa47a('0xf')](_0x4ef6e1[_0xa47a('0x1c')])){_0x4c7bb5[util['format']('%s',_0xa47a('0x27'))]=_0x4ef6e1[_0xa47a('0x1c')];_0x4c7bb5[util[_0xa47a('0x10')]('%s','_XCALLY_MIXMONITOR_UNIQUEID')]=_0x1b6e57;}return _0x4c7bb5;};exports[_0xa47a('0x28')]=function(_0x367c95){var _0xfefce2={};for(var _0x21b3fb in _0x367c95){if(_0x367c95['hasOwnProperty'](_0x21b3fb)){_0xfefce2[util[_0xa47a('0x10')]('%s',_['toLower'](_0x21b3fb))]=_0x367c95[_0x21b3fb];}}return{'variables':_0xfefce2};};exports[_0xa47a('0x29')]=function(_0x21e6c0,_0x38c0fa){if(!_[_0xa47a('0x14')](_0x21e6c0)){if(_0x21e6c0['hasOwnProperty'](_0xa47a('0x2a'))){if(_0x21e6c0[_0xa47a('0x2a')]>0x0){_0x21e6c0['originated']-=0x1;}else{logger[_0xa47a('0x6')](_0xa47a('0x2b'),_0x38c0fa);}}}else{logger[_0xa47a('0x6')](_0xa47a('0x2c'),_0x38c0fa);}};exports[_0xa47a('0x2d')]=function(_0x3d7804){var _0x2e04ca=moment()[_0xa47a('0x10')]('YYYY-MM-DD\x20HH:mm:ss');_0x3d7804[_0xa47a('0x2e')]=0xd;_0x3d7804[_0xa47a('0x2f')]=_0xa47a('0x30');_0x3d7804[_0xa47a('0x31')]=_0x2e04ca;_0x3d7804['responsetime']=_0x2e04ca;_0x3d7804[_0xa47a('0x32')]=_0x2e04ca;};exports[_0xa47a('0x33')]=function(_0x54b074,_0x1a58c9,_0x3479e9){var _0x3aa091=moment()[_0xa47a('0x10')](_0xa47a('0x34'));_0x54b074[_0xa47a('0x2e')]=_0x1a58c9;_0x54b074[_0xa47a('0x2f')]=_0x3479e9;_0x54b074['responsetime']=_0x3aa091;_0x54b074[_0xa47a('0x35')]=utils['getSeconds'](_0x54b074[_0xa47a('0x36')],_0x54b074['starttime']);};exports[_0xa47a('0x37')]=function(_0x1f44df,_0x212af7,_0x4bf11c){_0x1f44df['membername']=_0x212af7;_0x1f44df[_0xa47a('0x38')]=_0x4bf11c;};exports[_0xa47a('0x39')]=function(_0x5515bc,_0x4e11ae,_0x1d63ed){var _0x4cbd98=moment()['format'](_0xa47a('0x34'));_0x5515bc[_0xa47a('0x2e')]=_0x4e11ae;_0x5515bc[_0xa47a('0x2f')]=_0x1d63ed;_0x5515bc[_0xa47a('0x36')]=_0x5515bc[_0xa47a('0x36')]?_0x5515bc[_0xa47a('0x36')]:_0x4cbd98;_0x5515bc[_0xa47a('0x32')]=_0x5515bc['endtime']?_0x5515bc[_0xa47a('0x32')]:_0x4cbd98;_0x5515bc[_0xa47a('0x35')]=utils[_0xa47a('0x3a')](_0x5515bc['responsetime']||0x0,_0x5515bc[_0xa47a('0x31')]||0x0);_0x5515bc[_0xa47a('0x3b')]=_0x5515bc['answertime']?utils['getSeconds'](_0x5515bc[_0xa47a('0x32')],_0x5515bc['answertime']):0x0;};exports[_0xa47a('0x3c')]=function(_0x2a8e6a){return _0x2a8e6a===_0xa47a('0x3d');};exports[_0xa47a('0x3e')]=function(_0x5853bb,_0x58b3dc,_0x477f3f,_0x1fa2cc,_0x42870b){var _0x43a6e3=_0x1fa2cc?'RECALL':_0x5853bb[_0xa47a('0x18')];_0x43a6e3=_0x42870b?_0xa47a('0x3f'):_0x43a6e3;return{'actionid':_0x5853bb[_0xa47a('0x40')],'action':_0xa47a('0x41'),'channel':_0x5853bb[_0xa47a('0x42')],'callerid':util[_0xa47a('0x10')]('\x22%s\x22\x20<%s>',_0x43a6e3,_0x5853bb[_0xa47a('0x19')]),'Exten':_0xa47a('0x25'),'Context':'from-sip','Priority':'1','variable':_0x477f3f,'timeout':(_0x58b3dc[_0xa47a('0x43')]||0x1e)*0x3e8,'async':!![],'channelid':_0x5853bb[_0xa47a('0x40')]};};exports[_0xa47a('0x44')]=function(_0x56f425){return _0x56f425['countbusyretry']+_0x56f425['countcongestionretry']+_0x56f425[_0xa47a('0x45')]+_0x56f425[_0xa47a('0x46')]+_0x56f425['countnosuchnumberretry'];};exports[_0xa47a('0x47')]=function(_0x433626){var _0x44516a=_['clone'](_0x433626);_0x44516a[_0xa47a('0x2e')]=0xf;_0x44516a[_0xa47a('0x2f')]='Global';return _0x44516a;};exports[_0xa47a('0x48')]=function(_0x598e9f,_0x581507,_0x3f6a1b){var _0x2df05d={};_0x2df05d[_0x581507]=_0x598e9f[_0x581507];_0x2df05d[_0xa47a('0x49')]=![];_0x2df05d[_0xa47a('0x4a')]=moment()[_0xa47a('0x4b')](_0x3f6a1b,'minutes')[_0xa47a('0x10')](_0xa47a('0x34'));_0x2df05d[_0xa47a('0x1a')]=_0x598e9f[_0xa47a('0x1a')];_0x2df05d['ListId']=_0x598e9f[_0xa47a('0x4c')];_0x2df05d[_0xa47a('0x4d')]=_0x598e9f['VoiceQueueId']||undefined;return _0x2df05d;};exports[_0xa47a('0x4e')]=function(_0xd1a157,_0x12247e){if(!_['isNil'](_0xd1a157)){if(_0xd1a157[_0xa47a('0x4f')]>0x0){_0xd1a157[_0xa47a('0x4f')]-=0x1;}else{logger[_0xa47a('0x6')](_0x12247e,'[decrementTalkink]\x20object\x20talking\x20is\x20negative');}}else{logger[_0xa47a('0x6')](_0x12247e,_0xa47a('0x50'));}};exports[_0xa47a('0x51')]=function(_0x43f1bc){if(_0x43f1bc<=0x0){return!![];}return![];};function buildObj(_0x2b47e2,_0x5a35b9,_0x518fe1){_0x2b47e2['lastevent']=_0x5a35b9;_0x2b47e2['name']=_0x2b47e2['queue'];_0x2b47e2['interface']=_0x2b47e2[_0xa47a('0x42')];_0x2b47e2['motionChannel']=_0xa47a('0x52');if(_0x518fe1){_0x2b47e2[_0xa47a('0x53')]=_0x518fe1['mandatoryDisposition'];}return _0x2b47e2;}exports[_0xa47a('0x54')]=buildObj;exports[_0xa47a('0x55')]=function(_0x475b2a){var _0x425707={};_0x425707[_0xa47a('0x56')]=_0x475b2a['queue'];_0x425707[_0xa47a('0x57')]=_0x475b2a[_0xa47a('0x42')];_0x425707[_0xa47a('0x40')]=_0x475b2a[_0xa47a('0x40')];return _0x425707;};exports['agentReadyId']=function(_0x401d68){var _0x27972a=[];for(var _0x2cae7e in _0x401d68){if(_0x401d68[_0xa47a('0x58')](_0x2cae7e)){if(!_[_0xa47a('0x14')](_0x401d68[_0x2cae7e])&&_0x401d68[_0x2cae7e][_0xa47a('0x2e')]===_0xa47a('0x59')&&_0x401d68[_0x2cae7e][_0xa47a('0x5a')]===_0xa47a('0x5b')){_0x27972a[_0xa47a('0x5c')](_0x401d68[_0x2cae7e]['id']);}}}return _0x27972a;};exports['getDiff']=function(_0x5843e8){var _0x2de9dc=moment()[_0xa47a('0x5d')](0x0);var _0x18f667=moment(_0x5843e8)['milliseconds'](0x0);return _0x2de9dc[_0xa47a('0x5e')](_0x18f667,_0xa47a('0x5f'));};exports[_0xa47a('0x60')]=function(_0x596dab){return{'active':![],'recallme':![],'UserId':null,'ContactId':_0x596dab[_0xa47a('0x1a')],'ListId':_0x596dab[_0xa47a('0x4c')],'VoiceQueueId':_0x596dab[_0xa47a('0x4d')]||undefined,'CampaignId':_0x596dab[_0xa47a('0x61')]||undefined};};exports[_0xa47a('0x62')]=function(_0x469c7b){if(_0x469c7b===_0xa47a('0x40')||_0x469c7b===_0xa47a('0x63')||_0x469c7b===_0xa47a('0x56')||_0x469c7b==='type'||_0x469c7b===_0xa47a('0x64')||_0x469c7b==='dialAnswer'||_0x469c7b==='membername'||_0x469c7b===_0xa47a('0x42')||_0x469c7b===_0xa47a('0x18')||_0x469c7b==='active'||_0x469c7b===_0xa47a('0x19')||_0x469c7b===_0xa47a('0x4a')||_0x469c7b===_0xa47a('0x65')||_0x469c7b==='countcongestionretry'||_0x469c7b==='countnoanswerretry'||_0x469c7b==='countglobal'||_0x469c7b===_0xa47a('0x66')||_0x469c7b===_0xa47a('0x67')||_0x469c7b===_0xa47a('0x68')||_0x469c7b===_0xa47a('0x69')||_0x469c7b==='ContactId'||_0x469c7b===_0xa47a('0x4c')||_0x469c7b===_0xa47a('0x38')||_0x469c7b===_0xa47a('0x4d')||_0x469c7b===_0xa47a('0x6a')||_0x469c7b==='xmd-voicequeueid'||_0x469c7b===_0xa47a('0x6b')||_0x469c7b===_0xa47a('0x6c')||_0x469c7b===_0xa47a('0x6d')||_0x469c7b===_0xa47a('0x6e')||_0x469c7b===_0xa47a('0x6f')||_0x469c7b==='xmd-dialoptions'||_0x469c7b===_0xa47a('0x70')||_0x469c7b==='xmd-dialchannel'||_0x469c7b==='xmd-contactid'||_0x469c7b===_0xa47a('0x71')||_0x469c7b===_0xa47a('0x72')||_0x469c7b==='xmd-agiafter'||_0x469c7b===_0xa47a('0x73')||_0x469c7b===_0xa47a('0x74')||_0x469c7b===_0xa47a('0x75')||_0x469c7b===_0xa47a('0x76')||_0x469c7b===_0xa47a('0x77')||_0x469c7b===_0xa47a('0x78')||_0x469c7b===_0xa47a('0x79')||_0x469c7b===_0xa47a('0x7a')||_0x469c7b==='rtpaudioqosrttbridged'||_0x469c7b===_0xa47a('0x74')||_0x469c7b===_0xa47a('0x75')||_0x469c7b==='rtpaudioqosjitter'||_0x469c7b===_0xa47a('0x77')||_0x469c7b===_0xa47a('0x78')||_0x469c7b===_0xa47a('0x79')||_0x469c7b===_0xa47a('0x7a')||_0x469c7b==='rtpaudioqosrttbridged'||_0x469c7b==='bridgepeer'||_0x469c7b==='bridgepvtcallid'||_0x469c7b===_0xa47a('0x2e')||_0x469c7b===_0xa47a('0x2f')){return![];}return!![];};exports[_0xa47a('0x7b')]=function(_0x1cb776,_0x22a007){var _0x5cd7ac,_0x409549,_0x3bf9b2;if(_0x22a007<=0x0){_0x22a007=0x1;}_0x5cd7ac=new RegExp(_0xa47a('0x7c')+_0x22a007+'}$');_0x409549=Math['pow'](0xa,_0x22a007-0x1);_0x3bf9b2=Math['pow'](0xa,_0x22a007)-0x1;return util['format']('%s',_[_0xa47a('0x7d')](_0x1cb776,_0x5cd7ac,_[_0xa47a('0x7e')](_0x409549,_0x3bf9b2)));};exports['extractCalleridName']=function(_0x4d47fd){var _0xcc18e2=_0x4d47fd['match'](/"(.*?)"/);return _0xcc18e2?_0xcc18e2[0x1]:_0x4d47fd;};exports[_0xa47a('0x7f')]=function(_0x67c9bf){var _0x218397=_0x67c9bf[_0xa47a('0x80')](/<(.*?)>/);return _0x218397?_0x218397[0x1]:_0x67c9bf;};function buildNoAnswerEventPayload(_0x1b1ab8,_0x2b20b6){var _0x476a9d=buildObj(_0x1b1ab8,_0xa47a('0x81'));if(!_['isEmpty'](_0x2b20b6[_0xa47a('0x82')])){Object[_0xa47a('0x83')](_0x2b20b6[_0xa47a('0x82')])['forEach'](function(_0x1b03e6){_0x476a9d[_0x1b03e6[_0xa47a('0x84')]()]=_0x2b20b6[_0xa47a('0x82')][_0x1b03e6];});}return _0x476a9d;}exports[_0xa47a('0x85')]=buildNoAnswerEventPayload; \ No newline at end of file +var _0x55f2=['xmd-dialtimeout','xmd-dialoptions','xmd-dialid','xmd-dialchannel','xmd-contactid','xmd-cdrtype','xmd-callerid','xmd-agiafter','xmd-agi','rtpaudioqos','rtpaudioqosjitter','rtpaudioqosjitterbridged','rtpaudioqoslossbridged','rtpaudioqosrtt','rtpaudioqosrttbridged','rtpaudioqosbridged','rtpaudioqosloss','bridgepeer','bridgepvtcallid','getCallerIdRandom','\x5cw{0,','pow','extractCalleridName','match','noanswer','variables','keys','buildNoAnswerEventPayload','util','lodash','moment','../../../../config/logger','preview','env','XCALLY_IP_AGI','../../dialer/utils','error','logger','info','loggerError','inspect','logger2','message','getCallerId','string','isEmpty','format','\x22%s\x22\x20<%s>','isUndefined','\x22\x22\x20<>','isActive','isNil','Queue','name','calleridname','calleridnum','VoiceQueueId','dialOriginateTimeout','\x22rtTxX%s%s\x22','dialQueueProject2','monitor_format','dialPreviewUrl','dialQueueProject','\x22agi://%s/square,%s\x22','NONE','originatecalleridnum','xcally-motion-preview','Call-Type:\x20PREVIEW','_XCALLY_MIXMONITOR_FORMAT','_XCALLY_MIXMONITOR_UNIQUEID','toLowerVariables','hasOwnProperty','toLower','updateOriginated','originated','[updateOriginated]\x20object\x20originated\x20is\x20negative','[updateOriginated]\x20is\x20null\x20or\x20undefined','logBlacklist','state','statedesc','Blacklist','starttime','endtime','logAgent','YYYY-MM-DD\x20HH:mm:ss','responsetime','getSeconds','logLookAgent','UserId','talktime','answertime','isFailure','Failure','variablesAction','RECALL','uniqueid','originate','channelAgent','from-sip','timeout','totalGlobal','countbusyretry','countcongestionretry','countagentrejectretry','cloneAction','clone','active','add','minutes','ContactId','decrementTalkink','pTalking','[decrementTalkink]\x20object\x20talking\x20is\x20negative','[decrementTalkink]\x20is\x20null\x20or\x20undefined','lastevent','interface','mandatoryDisposition','buildObj','buildAcw','queue','agentReadyId','not_inuse','status','reachable','push','getDiff','milliseconds','diff','seconds','createBody','ListId','filterKey','type','campaigntype','dialAnswer','membername','countnoanswerretry','callbackuniqueid','callbackat','recallme','sipcallid','xmd-queue','xmd-listid'];(function(_0x1b6186,_0x1ec7f2){var _0x186121=function(_0x1748a8){while(--_0x1748a8){_0x1b6186['push'](_0x1b6186['shift']());}};_0x186121(++_0x1ec7f2);}(_0x55f2,0x13a));var _0x255f=function(_0xe50408,_0x1a1142){_0xe50408=_0xe50408-0x0;var _0x193a45=_0x55f2[_0xe50408];return _0x193a45;};'use strict';var util=require(_0x255f('0x0'));var _=require(_0x255f('0x1'));var moment=require(_0x255f('0x2'));var logger=require(_0x255f('0x3'))(_0x255f('0x4'));var ipAgi=process[_0x255f('0x5')][_0x255f('0x6')]||'127.0.0.1';var utils=require(_0x255f('0x7'));exports['loggerCatch']=function(_0x2b0ab5){return function(_0x173130){logger[_0x255f('0x8')](_0x2b0ab5,util['inspect'](_0x173130,{'showHidden':![],'depth':null}));};};exports[_0x255f('0x9')]=function(_0x324e50,_0x43214b){logger[_0x255f('0xa')](_0x324e50,util['inspect'](_0x43214b,{'showHidden':![],'depth':null}));};exports[_0x255f('0xb')]=function(_0x41f609,_0xc4d01){logger[_0x255f('0x8')](_0x41f609,util[_0x255f('0xc')](_0xc4d01,{'showHidden':![],'depth':null}));};exports[_0x255f('0xd')]=function(_0x2758bd){return function(_0xb4a6e3){logger[_0x255f('0xa')](_0x2758bd,util[_0x255f('0xc')](_0xb4a6e3,{'showHidden':![],'depth':null}));};};exports[_0x255f('0xe')]=function(_0x591f23,_0x2c9bf2,_0x32f2ce){return{'message':_0x591f23,'unlock':_0x2c9bf2,'active':_0x32f2ce};};exports[_0x255f('0xf')]=function(_0x214640,_0x578078,_0x1ceea4){if(!_['isUndefined'](_0x1ceea4)&&_0x255f('0x10')===typeof _0x1ceea4&&!_['isEmpty'](_0x1ceea4)){if(!_['isUndefined'](_0x578078)&&_0x255f('0x10')===typeof _0x578078&&!_[_0x255f('0x11')](_0x578078)){return util[_0x255f('0x12')]('\x22%s\x22\x20<%s>',_0x578078,_0x1ceea4);}return util[_0x255f('0x12')](_0x255f('0x13'),_0x1ceea4,_0x1ceea4);}if(!_[_0x255f('0x14')](_0x214640)&&_0x255f('0x10')===typeof _0x214640&&!_[_0x255f('0x11')](_0x214640)){return _0x214640;}return _0x255f('0x15');};exports[_0x255f('0x16')]=function(_0x5ebc9d){if(_[_0x255f('0x17')](_0x5ebc9d)){return![];}return _0x5ebc9d;};exports['addVariables']=function(_0x44fc3f,_0x425a4c,_0x2b3790,_0xe3707a,_0x48ca5a,_0x4f9b47){var _0x8f60b={'XMD-QUEUE':_0x425a4c[_0x255f('0x18')]?_0x425a4c[_0x255f('0x18')][_0x255f('0x19')]:'','XMD-CALLERID':_0xe3707a,'XMD-CALLERID-PREVIEW':_0x4f9b47?util['format'](_0x255f('0x13'),_0x4f9b47[_0x255f('0x1a')],_0x4f9b47[_0x255f('0x1b')]):_0xe3707a,'XMD-DIALID':_0x48ca5a,'XMD-CONTACTID':_0x425a4c['ContactId'],'XMD-CDRTYPE':'dialer','CALLERID(all)':_0xe3707a,'XMD-VOICEQUEUEID':_0x425a4c[_0x255f('0x1c')],'XMD-DIALCHANNEL':_0x2b3790,'XMD-DIALTIMEOUT':_0x44fc3f[_0x255f('0x1d')]||0x1e,'XMD-DIALOPTIONS':util[_0x255f('0x12')](_0x255f('0x1e'),_0x44fc3f[_0x255f('0x1f')]?'g':'',_[_0x255f('0x11')](_0x44fc3f[_0x255f('0x20')])?'':'U(xcally-mixmonitor-context)'),'XMD-DIALURL':_0x44fc3f[_0x255f('0x21')]||'','XMD-AGI':_0x44fc3f[_0x255f('0x22')]?util[_0x255f('0x12')](_0x255f('0x23'),ipAgi,_0x44fc3f[_0x255f('0x22')]):_0x255f('0x24'),'XMD-AGIAFTER':_0x44fc3f[_0x255f('0x1f')]?util[_0x255f('0x12')](_0x255f('0x23'),ipAgi,_0x44fc3f['dialQueueProject2']):_0x255f('0x24'),'XMD-ORIGINATECALLERIDNUM':_0x4f9b47?_0x4f9b47[_0x255f('0x25')]:'','XMD-ORIGINATECALLERIDNAME':_0x4f9b47?_0x4f9b47['originatecalleridname']:'','XMD-DESTINATION':_0x255f('0x26'),'SIPADDHEADER':_0x255f('0x27')};if(!_[_0x255f('0x11')](_0x44fc3f[_0x255f('0x20')])){_0x8f60b[util[_0x255f('0x12')]('%s',_0x255f('0x28'))]=_0x44fc3f[_0x255f('0x20')];_0x8f60b[util[_0x255f('0x12')]('%s',_0x255f('0x29'))]=_0x48ca5a;}return _0x8f60b;};exports[_0x255f('0x2a')]=function(_0x58bde8){var _0x4ec01c={};for(var _0x1886d3 in _0x58bde8){if(_0x58bde8[_0x255f('0x2b')](_0x1886d3)){_0x4ec01c[util[_0x255f('0x12')]('%s',_[_0x255f('0x2c')](_0x1886d3))]=_0x58bde8[_0x1886d3];}}return{'variables':_0x4ec01c};};exports[_0x255f('0x2d')]=function(_0x25461a,_0xb5b58e){if(!_[_0x255f('0x17')](_0x25461a)){if(_0x25461a['hasOwnProperty']('originated')){if(_0x25461a['originated']>0x0){_0x25461a[_0x255f('0x2e')]-=0x1;}else{logger[_0x255f('0x8')](_0x255f('0x2f'),_0xb5b58e);}}}else{logger[_0x255f('0x8')](_0x255f('0x30'),_0xb5b58e);}};exports[_0x255f('0x31')]=function(_0x6d47b7){var _0x87fe38=moment()[_0x255f('0x12')]('YYYY-MM-DD\x20HH:mm:ss');_0x6d47b7[_0x255f('0x32')]=0xd;_0x6d47b7[_0x255f('0x33')]=_0x255f('0x34');_0x6d47b7[_0x255f('0x35')]=_0x87fe38;_0x6d47b7['responsetime']=_0x87fe38;_0x6d47b7[_0x255f('0x36')]=_0x87fe38;};exports[_0x255f('0x37')]=function(_0x39e71b,_0x4a1048,_0x3430eb){var _0x42eb47=moment()[_0x255f('0x12')](_0x255f('0x38'));_0x39e71b['state']=_0x4a1048;_0x39e71b['statedesc']=_0x3430eb;_0x39e71b[_0x255f('0x39')]=_0x42eb47;_0x39e71b['ringtime']=utils[_0x255f('0x3a')](_0x39e71b[_0x255f('0x39')],_0x39e71b[_0x255f('0x35')]);};exports[_0x255f('0x3b')]=function(_0x3bb9bd,_0x27d3fd,_0x21bf04){_0x3bb9bd['membername']=_0x27d3fd;_0x3bb9bd[_0x255f('0x3c')]=_0x21bf04;};exports['logCustomer']=function(_0x22f59e,_0xe96672,_0x202cbc){var _0x3caaad=moment()['format'](_0x255f('0x38'));_0x22f59e[_0x255f('0x32')]=_0xe96672;_0x22f59e[_0x255f('0x33')]=_0x202cbc;_0x22f59e[_0x255f('0x39')]=_0x22f59e['responsetime']?_0x22f59e[_0x255f('0x39')]:_0x3caaad;_0x22f59e[_0x255f('0x36')]=_0x22f59e[_0x255f('0x36')]?_0x22f59e[_0x255f('0x36')]:_0x3caaad;_0x22f59e['ringtime']=utils[_0x255f('0x3a')](_0x22f59e[_0x255f('0x39')]||0x0,_0x22f59e[_0x255f('0x35')]||0x0);_0x22f59e[_0x255f('0x3d')]=_0x22f59e[_0x255f('0x3e')]?utils[_0x255f('0x3a')](_0x22f59e[_0x255f('0x36')],_0x22f59e[_0x255f('0x3e')]):0x0;};exports[_0x255f('0x3f')]=function(_0x249a9f){return _0x249a9f===_0x255f('0x40');};exports[_0x255f('0x41')]=function(_0x50707d,_0x14ec9b,_0x42846b,_0x23aca0,_0x74ab39){var _0x35ed22=_0x23aca0?_0x255f('0x42'):_0x50707d[_0x255f('0x1a')];_0x35ed22=_0x74ab39?'BOOKED':_0x35ed22;return{'actionid':_0x50707d[_0x255f('0x43')],'action':_0x255f('0x44'),'channel':_0x50707d[_0x255f('0x45')],'callerid':util[_0x255f('0x12')](_0x255f('0x13'),_0x35ed22,_0x50707d['calleridnum']),'Exten':'xcally-motion-preview','Context':_0x255f('0x46'),'Priority':'1','variable':_0x42846b,'timeout':(_0x14ec9b[_0x255f('0x47')]||0x1e)*0x3e8,'async':!![],'channelid':_0x50707d[_0x255f('0x43')]};};exports[_0x255f('0x48')]=function(_0x447485){return _0x447485[_0x255f('0x49')]+_0x447485[_0x255f('0x4a')]+_0x447485['countnoanswerretry']+_0x447485[_0x255f('0x4b')]+_0x447485['countnosuchnumberretry'];};exports[_0x255f('0x4c')]=function(_0x48329a){var _0x4984c7=_[_0x255f('0x4d')](_0x48329a);_0x4984c7[_0x255f('0x32')]=0xf;_0x4984c7[_0x255f('0x33')]='Global';return _0x4984c7;};exports['scheduledAt']=function(_0x1e1a02,_0x5813fa,_0x22b663){var _0x3532e0={};_0x3532e0[_0x5813fa]=_0x1e1a02[_0x5813fa];_0x3532e0[_0x255f('0x4e')]=![];_0x3532e0['scheduledat']=moment()[_0x255f('0x4f')](_0x22b663,_0x255f('0x50'))['format'](_0x255f('0x38'));_0x3532e0[_0x255f('0x51')]=_0x1e1a02['ContactId'];_0x3532e0['ListId']=_0x1e1a02['ListId'];_0x3532e0[_0x255f('0x1c')]=_0x1e1a02[_0x255f('0x1c')]||undefined;return _0x3532e0;};exports[_0x255f('0x52')]=function(_0x12d11c,_0x226e7c){if(!_[_0x255f('0x17')](_0x12d11c)){if(_0x12d11c['pTalking']>0x0){_0x12d11c[_0x255f('0x53')]-=0x1;}else{logger[_0x255f('0x8')](_0x226e7c,_0x255f('0x54'));}}else{logger['error'](_0x226e7c,_0x255f('0x55'));}};exports['IsNotLoggedIn']=function(_0x5d2a51){if(_0x5d2a51<=0x0){return!![];}return![];};function buildObj(_0x1e8d74,_0x12ecbd,_0x1c87d4){_0x1e8d74[_0x255f('0x56')]=_0x12ecbd;_0x1e8d74[_0x255f('0x19')]=_0x1e8d74['queue'];_0x1e8d74[_0x255f('0x57')]=_0x1e8d74[_0x255f('0x45')];_0x1e8d74['motionChannel']='voice';if(_0x1c87d4){_0x1e8d74[_0x255f('0x58')]=_0x1c87d4[_0x255f('0x58')];}return _0x1e8d74;}exports[_0x255f('0x59')]=buildObj;exports[_0x255f('0x5a')]=function(_0x1e8923){var _0x49987c={};_0x49987c[_0x255f('0x5b')]=_0x1e8923['queue'];_0x49987c['interface']=_0x1e8923[_0x255f('0x45')];_0x49987c[_0x255f('0x43')]=_0x1e8923[_0x255f('0x43')];return _0x49987c;};exports[_0x255f('0x5c')]=function(_0x53e4fc){var _0x432bfe=[];for(var _0x541169 in _0x53e4fc){if(_0x53e4fc[_0x255f('0x2b')](_0x541169)){if(!_[_0x255f('0x17')](_0x53e4fc[_0x541169])&&_0x53e4fc[_0x541169][_0x255f('0x32')]===_0x255f('0x5d')&&_0x53e4fc[_0x541169][_0x255f('0x5e')]===_0x255f('0x5f')){_0x432bfe[_0x255f('0x60')](_0x53e4fc[_0x541169]['id']);}}}return _0x432bfe;};exports[_0x255f('0x61')]=function(_0x1d6861){var _0xac1c31=moment()[_0x255f('0x62')](0x0);var _0x101835=moment(_0x1d6861)[_0x255f('0x62')](0x0);return _0xac1c31[_0x255f('0x63')](_0x101835,_0x255f('0x64'));};exports[_0x255f('0x65')]=function(_0x2de2e2){return{'active':![],'recallme':![],'UserId':null,'ContactId':_0x2de2e2[_0x255f('0x51')],'ListId':_0x2de2e2[_0x255f('0x66')],'VoiceQueueId':_0x2de2e2['VoiceQueueId']||undefined,'CampaignId':_0x2de2e2['CampaignId']||undefined};};exports[_0x255f('0x67')]=function(_0x46f5ab){if(_0x46f5ab===_0x255f('0x43')||_0x46f5ab==='idContact'||_0x46f5ab===_0x255f('0x5b')||_0x46f5ab===_0x255f('0x68')||_0x46f5ab===_0x255f('0x69')||_0x46f5ab===_0x255f('0x6a')||_0x46f5ab===_0x255f('0x6b')||_0x46f5ab===_0x255f('0x45')||_0x46f5ab==='calleridname'||_0x46f5ab===_0x255f('0x4e')||_0x46f5ab==='calleridnum'||_0x46f5ab==='scheduledat'||_0x46f5ab===_0x255f('0x49')||_0x46f5ab===_0x255f('0x4a')||_0x46f5ab===_0x255f('0x6c')||_0x46f5ab==='countglobal'||_0x46f5ab==='callback'||_0x46f5ab===_0x255f('0x6d')||_0x46f5ab===_0x255f('0x6e')||_0x46f5ab===_0x255f('0x6f')||_0x46f5ab===_0x255f('0x51')||_0x46f5ab===_0x255f('0x66')||_0x46f5ab===_0x255f('0x3c')||_0x46f5ab===_0x255f('0x1c')||_0x46f5ab===_0x255f('0x70')||_0x46f5ab==='xmd-voicequeueid'||_0x46f5ab===_0x255f('0x71')||_0x46f5ab==='xmd-phone'||_0x46f5ab===_0x255f('0x72')||_0x46f5ab==='xmd-dialurl'||_0x46f5ab===_0x255f('0x73')||_0x46f5ab===_0x255f('0x74')||_0x46f5ab===_0x255f('0x75')||_0x46f5ab===_0x255f('0x76')||_0x46f5ab===_0x255f('0x77')||_0x46f5ab===_0x255f('0x78')||_0x46f5ab===_0x255f('0x79')||_0x46f5ab===_0x255f('0x7a')||_0x46f5ab===_0x255f('0x7b')||_0x46f5ab===_0x255f('0x7c')||_0x46f5ab==='rtpaudioqosbridged'||_0x46f5ab===_0x255f('0x7d')||_0x46f5ab===_0x255f('0x7e')||_0x46f5ab==='rtpaudioqosloss'||_0x46f5ab===_0x255f('0x7f')||_0x46f5ab===_0x255f('0x80')||_0x46f5ab===_0x255f('0x81')||_0x46f5ab===_0x255f('0x7c')||_0x46f5ab===_0x255f('0x82')||_0x46f5ab===_0x255f('0x7d')||_0x46f5ab===_0x255f('0x7e')||_0x46f5ab===_0x255f('0x83')||_0x46f5ab===_0x255f('0x7f')||_0x46f5ab===_0x255f('0x80')||_0x46f5ab==='rtpaudioqosrttbridged'||_0x46f5ab===_0x255f('0x84')||_0x46f5ab===_0x255f('0x85')||_0x46f5ab===_0x255f('0x32')||_0x46f5ab===_0x255f('0x33')){return![];}return!![];};exports[_0x255f('0x86')]=function(_0x22465b,_0x1d23ae){var _0x119242,_0x4adf6e,_0x1a456b;if(_0x1d23ae<=0x0){_0x1d23ae=0x1;}_0x119242=new RegExp(_0x255f('0x87')+_0x1d23ae+'}$');_0x4adf6e=Math[_0x255f('0x88')](0xa,_0x1d23ae-0x1);_0x1a456b=Math['pow'](0xa,_0x1d23ae)-0x1;return util[_0x255f('0x12')]('%s',_['replace'](_0x22465b,_0x119242,_['random'](_0x4adf6e,_0x1a456b)));};exports[_0x255f('0x89')]=function(_0x38e44a){var _0xd36eb7=_0x38e44a['match'](/"(.*?)"/);return _0xd36eb7?_0xd36eb7[0x1]:_0x38e44a;};exports['extractCalleridNumber']=function(_0x45b4e6){var _0x1138fa=_0x45b4e6[_0x255f('0x8a')](/<(.*?)>/);return _0x1138fa?_0x1138fa[0x1]:_0x45b4e6;};function buildNoAnswerEventPayload(_0x2073c2,_0x52975f){var _0x5d65ad=buildObj(_0x2073c2,_0x255f('0x8b'));if(!_[_0x255f('0x11')](_0x52975f[_0x255f('0x8c')])){Object[_0x255f('0x8d')](_0x52975f['variables'])['forEach'](function(_0x1a1917){_0x5d65ad[_0x1a1917['toLowerCase']()]=_0x52975f[_0x255f('0x8c')][_0x1a1917];});}return _0x5d65ad;}exports[_0x255f('0x8e')]=buildNoAnswerEventPayload; \ No newline at end of file diff --git a/server/services/ami/properties.js b/server/services/ami/properties.js index 6ccbe64..f2889ee 100644 --- a/server/services/ami/properties.js +++ b/server/services/ami/properties.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x1850=['queuepause','reload','voicequeuechannel','queueadd','string','number','boolean','queueremove'];(function(_0x4fc3e1,_0x46dfda){var _0x68ada2=function(_0x285675){while(--_0x285675){_0x4fc3e1['push'](_0x4fc3e1['shift']());}};_0x68ada2(++_0x46dfda);}(_0x1850,0x133));var _0x0185=function(_0x2dafbe,_0x5d04de){_0x2dafbe=_0x2dafbe-0x0;var _0x58a45a=_0x1850[_0x2dafbe];return _0x58a45a;};'use strict';exports[_0x0185('0x0')]={'queue':{'type':_0x0185('0x1'),'required':!![]},'interface':{'type':'string','required':!![]},'membername':{'type':_0x0185('0x1'),'required':!![]},'penalty':{'type':_0x0185('0x2'),'required':![]},'paused':{'type':_0x0185('0x3'),'required':![]}};exports[_0x0185('0x4')]={'queue':{'type':_0x0185('0x1'),'required':!![]},'interface':{'type':'string','required':!![]}};exports[_0x0185('0x5')]={'interface':{'type':_0x0185('0x1'),'required':!![]},'paused':{'type':_0x0185('0x3')},'reason':{'type':_0x0185('0x1'),'required':![]}};exports[_0x0185('0x6')]={'module':{'type':_0x0185('0x1'),'required':![]}};exports[_0x0185('0x7')]={'uniqueid':{'type':_0x0185('0x1'),'required':!![]}};exports['voicechannel']={'uniqueid':{'type':_0x0185('0x1'),'required':!![]},'filename':{'type':'string'},'format':{'type':'string'},'mixmonitorid':{'type':_0x0185('0x1')}};exports['voicequeuechannelhangup']={'uniqueid':{'type':_0x0185('0x1'),'required':!![]}};exports['voicequeuechannelredirect']={'uniqueid':{'type':_0x0185('0x1'),'required':!![]},'exten':{'type':_0x0185('0x1'),'required':!![]},'context':{'type':_0x0185('0x1')}}; \ No newline at end of file +var _0x2498=['voicequeuechannel','voicechannel','voicequeuechannelredirect','queueadd','string','number','boolean','reload'];(function(_0x34a86f,_0x4d5b26){var _0x9453e7=function(_0x22d2ce){while(--_0x22d2ce){_0x34a86f['push'](_0x34a86f['shift']());}};_0x9453e7(++_0x4d5b26);}(_0x2498,0x1eb));var _0x8249=function(_0x3119af,_0xf0676c){_0x3119af=_0x3119af-0x0;var _0x1c587f=_0x2498[_0x3119af];return _0x1c587f;};'use strict';exports[_0x8249('0x0')]={'queue':{'type':'string','required':!![]},'interface':{'type':_0x8249('0x1'),'required':!![]},'membername':{'type':_0x8249('0x1'),'required':!![]},'penalty':{'type':_0x8249('0x2'),'required':![]},'paused':{'type':_0x8249('0x3'),'required':![]}};exports['queueremove']={'queue':{'type':_0x8249('0x1'),'required':!![]},'interface':{'type':'string','required':!![]}};exports['queuepause']={'interface':{'type':'string','required':!![]},'paused':{'type':'boolean'},'reason':{'type':_0x8249('0x1'),'required':![]}};exports[_0x8249('0x4')]={'module':{'type':_0x8249('0x1'),'required':![]}};exports[_0x8249('0x5')]={'uniqueid':{'type':_0x8249('0x1'),'required':!![]}};exports[_0x8249('0x6')]={'uniqueid':{'type':'string','required':!![]},'filename':{'type':'string'},'format':{'type':_0x8249('0x1')},'mixmonitorid':{'type':_0x8249('0x1')}};exports['voicequeuechannelhangup']={'uniqueid':{'type':'string','required':!![]}};exports[_0x8249('0x7')]={'uniqueid':{'type':_0x8249('0x1'),'required':!![]},'exten':{'type':_0x8249('0x1'),'required':!![]},'context':{'type':_0x8249('0x1')}}; \ No newline at end of file diff --git a/server/services/ami/realtime/index.js b/server/services/ami/realtime/index.js index fb71fbd..205e404 100644 --- a/server/services/ami/realtime/index.js +++ b/server/services/ami/realtime/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x5f66=['diff','seconds','disposition','ANSWERED','outbound','duration','billableseconds','initCampaigns','campaigns','dialQueueProject','SquareProject','voiceExtensions','initCampaignHopperHistory','initFaxAccounts','initVoiceQueues','exports','moment','../model/agent','../model/telephone','../model/trunk','../model/voiceQueue','../model/trigger','../model/campaign','../model/zendeskAccount','../model/salesforceAccount','../model/zohoAccount','../model/deskAccount','../model/vtigerAccount','../model/servicenowAccount','../model/dynamics365Account','../model/freshsalesAccount','telephones','trunks','voiceQueues','triggers','templates','channels','outboundChannels','settings','zendeskAccounts','salesforceAccounts','sugarcrmAccounts','freshdeskAccounts','zohoAccounts','deskAccounts','vtigerAccounts','servicenowAccounts','dynamics365Accounts','faxAccounts','mapKeys','hasOwnProperty','isNil','format','interface','total','answered','sumHoldTime','sumBillable','isEmpty','ivrAnswerCallsDay','unmanaged','abandoned','outboundAnswerAgiCallsDay','outboundNoAnswerCallsDay','outboundBusyCallsDay','outboundCongestionCallsDay','outboundNoSuchCallsDay','outboundUnknownCallsDay','outboundDropCallsDayTimeout','outboundOriginateFailureCallsDay','outboundRejectCallsDay','outboundAnswerCallsDay','queueStatusComplete','prototype','mergeFromDatabase','initAgents','agents','length','name','isUndefined','initTelephones','SIP/%s','initTriggers','initSalesforceAccounts','initFreshdeskAccounts','initDeskAccounts','initSugarcrmAccounts','initVtigerAccounts','initServicenowAccounts','freshsalesAccounts','initVoiceQueueHopperHistory','initVoiceQueueReports','groupBy','queuecallerexit','queuecallerabandon','queuecallerleaveAt','queuecallerjoinAt','sumDuration','queuecallercompleteAt','queuecallerexitAt'];(function(_0x43eb2b,_0x28dac4){var _0x37f5e0=function(_0x15c837){while(--_0x15c837){_0x43eb2b['push'](_0x43eb2b['shift']());}};_0x37f5e0(++_0x28dac4);}(_0x5f66,0x1a0));var _0x65f6=function(_0x432682,_0x253044){_0x432682=_0x432682-0x0;var _0x463d05=_0x5f66[_0x432682];return _0x463d05;};'use strict';var _=require('lodash');var moment=require(_0x65f6('0x0'));var util=require('util');var Agent=require(_0x65f6('0x1'));var Telephone=require(_0x65f6('0x2'));var Trunk=require(_0x65f6('0x3'));var VoiceQueue=require(_0x65f6('0x4'));var Trigger=require(_0x65f6('0x5'));var Template=require('../model/template');var Campaign=require(_0x65f6('0x6'));var VoiceExtension=require('../model/voiceExtension');var ZendeskAccount=require(_0x65f6('0x7'));var SalesforceAccount=require(_0x65f6('0x8'));var FreshdeskAccount=require('../model/freshdeskAccount');var SugarcrmAccount=require('../model/sugarcrmAccount');var ZohoAccount=require(_0x65f6('0x9'));var DeskAccount=require(_0x65f6('0xa'));var VtigerAccount=require(_0x65f6('0xb'));var ServicenowAccount=require(_0x65f6('0xc'));var Dynamics365Account=require(_0x65f6('0xd'));var FreshsalesAccount=require(_0x65f6('0xe'));var FaxAccount=require('../model/faxAccount');function Realtime(){this['agents']={};this[_0x65f6('0xf')]={};this[_0x65f6('0x10')]={};this[_0x65f6('0x11')]={};this[_0x65f6('0x12')]={};this['campaigns']={};this[_0x65f6('0x13')]={};this['outbound']={'total':0x0,'answered':0x0,'sumHoldTime':0x0,'sumDuration':0x0,'sumBillable':0x0};this['voiceExtensions']={};this[_0x65f6('0x14')]={};this['queueChannels']={};this[_0x65f6('0x15')]={};this['timers']={};this[_0x65f6('0x16')]={};this[_0x65f6('0x17')]={};this[_0x65f6('0x18')]={};this[_0x65f6('0x19')]={};this[_0x65f6('0x1a')]={};this[_0x65f6('0x1b')]={};this[_0x65f6('0x1c')]={};this[_0x65f6('0x1d')]={};this[_0x65f6('0x1e')]={};this[_0x65f6('0x1f')]={};this['freshsalesAccounts']={};this[_0x65f6('0x20')]={};}function freeIsNotKey(_0x49a913,_0x5dd324,_0x1693e6){var _0x5c69f8=_[_0x65f6('0x21')](_0x49a913,function(_0x1c955c){return _0x1c955c[_0x1693e6];});for(var _0x1b1cbb in _0x5dd324){if(_0x5dd324[_0x65f6('0x22')](_0x1b1cbb)){if(!_0x5c69f8[_0x1b1cbb]){delete _0x5dd324[_0x1b1cbb];}}}}function freeIsNotKeySip(_0xc8660c,_0x18380e){var _0x495dd6=_['mapKeys'](_0xc8660c,function(_0x2d538c){return util['format']('SIP/%s',_0x2d538c['name']);});for(var _0x365159 in _0x18380e){if(_0x18380e[_0x65f6('0x22')](_0x365159)){if(!_0x495dd6[_0x365159]){delete _0x18380e[_0x365159];}}}}function freeIsNotKeyAgent(_0x5114a4,_0x39e19f){var _0x270893=_[_0x65f6('0x21')](_0x5114a4,function(_0x3876ed){var _0x219ab2=_[_0x65f6('0x23')](_0x3876ed['interface'])?util[_0x65f6('0x24')]('SIP/%s',_0x3876ed['name']):_0x3876ed[_0x65f6('0x25')];return _0x219ab2;});for(var _0xd173f4 in _0x39e19f){if(_0x39e19f['hasOwnProperty'](_0xd173f4)){if(!_0x270893[_0xd173f4]){delete _0x39e19f[_0xd173f4];}}}}function clearVoiceCallReports(_0x1eeaaa){_0x1eeaaa[_0x65f6('0x26')]=0x0;_0x1eeaaa[_0x65f6('0x27')]=0x0;_0x1eeaaa[_0x65f6('0x28')]=0x0;_0x1eeaaa['sumDuration']=0x0;_0x1eeaaa[_0x65f6('0x29')]=0x0;}function clearCampaigns(_0x59ea32){if(!_[_0x65f6('0x2a')](_0x59ea32)){for(var _0x5963e0 in _0x59ea32){if(_0x59ea32['hasOwnProperty'](_0x5963e0)){_0x59ea32[_0x5963e0]['ivrTotalCallsDays']=0x0;_0x59ea32[_0x5963e0][_0x65f6('0x2b')]=0x0;}}}}function clearVoiceQueues(_0x16cde8){if(!_['isEmpty'](_0x16cde8)){for(var _0x296cd9 in _0x16cde8){if(_0x16cde8[_0x65f6('0x22')](_0x296cd9)){_0x16cde8[_0x296cd9]['total']=0x0;_0x16cde8[_0x296cd9][_0x65f6('0x27')]=0x0;_0x16cde8[_0x296cd9][_0x65f6('0x2c')]=0x0;_0x16cde8[_0x296cd9][_0x65f6('0x2d')]=0x0;_0x16cde8[_0x296cd9]['sumHoldTime']=0x0;_0x16cde8[_0x296cd9]['sumDuration']=0x0;_0x16cde8[_0x296cd9]['sumBillable']=0x0;_0x16cde8[_0x296cd9][_0x65f6('0x2e')]=0x0;_0x16cde8[_0x296cd9][_0x65f6('0x2f')]=0x0;_0x16cde8[_0x296cd9][_0x65f6('0x30')]=0x0;_0x16cde8[_0x296cd9][_0x65f6('0x31')]=0x0;_0x16cde8[_0x296cd9][_0x65f6('0x32')]=0x0;_0x16cde8[_0x296cd9][_0x65f6('0x33')]=0x0;_0x16cde8[_0x296cd9][_0x65f6('0x34')]=0x0;_0x16cde8[_0x296cd9]['outboundDropCallsDayCallersExit']=0x0;_0x16cde8[_0x296cd9]['outboundBlacklistCallsDay']=0x0;_0x16cde8[_0x296cd9][_0x65f6('0x35')]=0x0;_0x16cde8[_0x296cd9][_0x65f6('0x36')]=0x0;_0x16cde8[_0x296cd9]['outboundReCallsDay']=0x0;_0x16cde8[_0x296cd9]['outboundAnswerAgiCallsDay']=0x0;_0x16cde8[_0x296cd9][_0x65f6('0x37')]=0x0;_0x16cde8[_0x296cd9][_0x65f6('0x38')]=!![];}}}}Realtime[_0x65f6('0x39')][_0x65f6('0x3a')]=function(_0x1217fd,_0x2d32be){for(var _0x5792a0 in _0x2d32be){if(_0x1217fd[_0x65f6('0x22')](_0x5792a0)){_0x1217fd[_0x5792a0]=_0x2d32be[_0x5792a0];}}};Realtime[_0x65f6('0x39')][_0x65f6('0x3b')]=function(){var _0x4bc037=this;return function(_0x217f35){if(_0x217f35){freeIsNotKeyAgent(_0x217f35,_0x4bc037[_0x65f6('0x3c')]);for(var _0xbaed3c=0x0,_0x45510a={};_0xbaed3c<_0x217f35[_0x65f6('0x3d')];_0xbaed3c+=0x1){_0x45510a=_0x217f35[_0xbaed3c];var _0x2f054c=_['isNil'](_0x45510a[_0x65f6('0x25')])?util[_0x65f6('0x24')]('SIP/%s',_0x45510a[_0x65f6('0x3e')]):_0x45510a['interface'];if(_[_0x65f6('0x3f')](_0x4bc037['agents'][_0x2f054c])){_0x4bc037[_0x65f6('0x3c')][_0x2f054c]=new Agent(_0x45510a);}else{_0x4bc037[_0x65f6('0x3a')](_0x4bc037['agents'][_0x2f054c],_0x45510a);}}}return _0x4bc037[_0x65f6('0x3c')];};};Realtime[_0x65f6('0x39')][_0x65f6('0x40')]=function(){var _0x515648=this;return function(_0x582c7e){if(_0x582c7e){freeIsNotKeySip(_0x582c7e,_0x515648[_0x65f6('0xf')]);for(var _0x4c0df4=0x0,_0x26de30={};_0x4c0df4<_0x582c7e['length'];_0x4c0df4+=0x1){_0x26de30=_0x582c7e[_0x4c0df4];if(_[_0x65f6('0x3f')](_0x515648[_0x65f6('0xf')][util['format'](_0x65f6('0x41'),_0x26de30['name'])])){_0x515648['telephones'][util[_0x65f6('0x24')](_0x65f6('0x41'),_0x26de30[_0x65f6('0x3e')])]=new Telephone(_0x26de30);}else{_0x515648[_0x65f6('0x3a')](_0x515648[_0x65f6('0xf')][util[_0x65f6('0x24')](_0x65f6('0x41'),_0x26de30[_0x65f6('0x3e')])],_0x26de30);}}}return _0x515648['telephones'];};};Realtime[_0x65f6('0x39')]['initTrunks']=function(){var _0x12a589=this;return function(_0xa4394a){if(_0xa4394a){freeIsNotKeySip(_0xa4394a,_0x12a589[_0x65f6('0x10')]);for(var _0x2ea7f7=0x0,_0x5ef5c2={};_0x2ea7f7<_0xa4394a[_0x65f6('0x3d')];_0x2ea7f7+=0x1){_0x5ef5c2=_0xa4394a[_0x2ea7f7];if(_[_0x65f6('0x3f')](_0x12a589[_0x65f6('0x10')][util[_0x65f6('0x24')](_0x65f6('0x41'),_0x5ef5c2[_0x65f6('0x3e')])])){_0x12a589[_0x65f6('0x10')][util[_0x65f6('0x24')](_0x65f6('0x41'),_0x5ef5c2['name'])]=new Trunk(_0x5ef5c2);}else{_0x12a589[_0x65f6('0x3a')](_0x12a589[_0x65f6('0x10')][util[_0x65f6('0x24')](_0x65f6('0x41'),_0x5ef5c2[_0x65f6('0x3e')])],_0x5ef5c2);}}}return _0x12a589[_0x65f6('0x10')];};};Realtime[_0x65f6('0x39')][_0x65f6('0x42')]=function(){var _0x461393=this;return function(_0x2abbed){if(_0x2abbed){freeIsNotKey(_0x2abbed,_0x461393[_0x65f6('0x12')],'id');for(var _0x2c008a=0x0,_0x6c4d94={};_0x2c008a<_0x2abbed[_0x65f6('0x3d')];_0x2c008a+=0x1){_0x6c4d94=_0x2abbed[_0x2c008a];if(_[_0x65f6('0x3f')](_0x461393[_0x65f6('0x12')][_0x6c4d94['id']])){_0x461393['triggers'][_0x6c4d94['id']]=new Trigger(_0x6c4d94);}else{_0x461393[_0x65f6('0x3a')](_0x461393[_0x65f6('0x12')][_0x6c4d94['id']],_0x6c4d94);}}}return _0x461393[_0x65f6('0x12')];};};Realtime[_0x65f6('0x39')]['initTemplates']=function(){var _0x1bf5bf=this;return function(_0x2d0dac){if(_0x2d0dac){freeIsNotKey(_0x2d0dac,_0x1bf5bf[_0x65f6('0x13')],'id');for(var _0x5e69b4=0x0,_0x2dbab3={};_0x5e69b4<_0x2d0dac[_0x65f6('0x3d')];_0x5e69b4+=0x1){_0x2dbab3=_0x2d0dac[_0x5e69b4];if(_[_0x65f6('0x3f')](_0x1bf5bf[_0x65f6('0x13')][_0x2dbab3['id']])){_0x1bf5bf['templates'][_0x2dbab3['id']]=new Template(_0x2dbab3);}else{_0x1bf5bf[_0x65f6('0x3a')](_0x1bf5bf['templates'][_0x2dbab3['id']],_0x2dbab3);}}}return _0x1bf5bf[_0x65f6('0x13')];};};Realtime[_0x65f6('0x39')]['initZendeskAccounts']=function(){var _0xf754ee=this;return function(_0x5085db){if(_0x5085db){freeIsNotKey(_0x5085db,_0xf754ee[_0x65f6('0x17')],'id');for(var _0x4d9b76=0x0,_0x2d1706={};_0x4d9b76<_0x5085db[_0x65f6('0x3d')];_0x4d9b76+=0x1){_0x2d1706=_0x5085db[_0x4d9b76];if(_[_0x65f6('0x3f')](_0xf754ee[_0x65f6('0x17')][_0x2d1706['id']])){_0xf754ee['zendeskAccounts'][_0x2d1706['id']]=new ZendeskAccount(_0x2d1706);}else{_0xf754ee['mergeFromDatabase'](_0xf754ee[_0x65f6('0x17')][_0x2d1706['id']],_0x2d1706);}}}return _0xf754ee[_0x65f6('0x17')];};};Realtime[_0x65f6('0x39')][_0x65f6('0x43')]=function(){var _0x3b907c=this;return function(_0x2d6ab9){if(_0x2d6ab9){freeIsNotKey(_0x2d6ab9,_0x3b907c[_0x65f6('0x18')],'id');for(var _0x41690c=0x0,_0x414f49={};_0x41690c<_0x2d6ab9['length'];_0x41690c+=0x1){_0x414f49=_0x2d6ab9[_0x41690c];if(_[_0x65f6('0x3f')](_0x3b907c[_0x65f6('0x18')][_0x414f49['id']])){_0x3b907c[_0x65f6('0x18')][_0x414f49['id']]=new SalesforceAccount(_0x414f49);}else{_0x3b907c['mergeFromDatabase'](_0x3b907c[_0x65f6('0x18')][_0x414f49['id']],_0x414f49);}}}return _0x3b907c[_0x65f6('0x18')];};};Realtime['prototype'][_0x65f6('0x44')]=function(){var _0x253d52=this;return function(_0x57eb04){if(_0x57eb04){freeIsNotKey(_0x57eb04,_0x253d52[_0x65f6('0x1a')],'id');for(var _0x4f96c4=0x0,_0x247be3={};_0x4f96c4<_0x57eb04[_0x65f6('0x3d')];_0x4f96c4+=0x1){_0x247be3=_0x57eb04[_0x4f96c4];if(_[_0x65f6('0x3f')](_0x253d52['freshdeskAccounts'][_0x247be3['id']])){_0x253d52[_0x65f6('0x1a')][_0x247be3['id']]=new FreshdeskAccount(_0x247be3);}else{_0x253d52[_0x65f6('0x3a')](_0x253d52['freshdeskAccounts'][_0x247be3['id']],_0x247be3);}}}return _0x253d52[_0x65f6('0x1a')];};};Realtime[_0x65f6('0x39')]['initZohoAccounts']=function(){var _0x34d6a9=this;return function(_0x344c0e){if(_0x344c0e){freeIsNotKey(_0x344c0e,_0x34d6a9[_0x65f6('0x1b')],'id');for(var _0x25d504=0x0,_0x234fa7={};_0x25d504<_0x344c0e[_0x65f6('0x3d')];_0x25d504+=0x1){_0x234fa7=_0x344c0e[_0x25d504];if(_[_0x65f6('0x3f')](_0x34d6a9[_0x65f6('0x1b')][_0x234fa7['id']])){_0x34d6a9['zohoAccounts'][_0x234fa7['id']]=new ZohoAccount(_0x234fa7);}else{_0x34d6a9['mergeFromDatabase'](_0x34d6a9['zohoAccounts'][_0x234fa7['id']],_0x234fa7);}}}return _0x34d6a9[_0x65f6('0x1b')];};};Realtime[_0x65f6('0x39')][_0x65f6('0x45')]=function(){var _0x20c322=this;return function(_0x545445){if(_0x545445){freeIsNotKey(_0x545445,_0x20c322[_0x65f6('0x1c')],'id');for(var _0x2032b9=0x0,_0x9ff849={};_0x2032b9<_0x545445['length'];_0x2032b9+=0x1){_0x9ff849=_0x545445[_0x2032b9];if(_[_0x65f6('0x3f')](_0x20c322[_0x65f6('0x1c')][_0x9ff849['id']])){_0x20c322[_0x65f6('0x1c')][_0x9ff849['id']]=new DeskAccount(_0x9ff849);}else{_0x20c322['mergeFromDatabase'](_0x20c322['deskAccounts'][_0x9ff849['id']],_0x9ff849);}}}return _0x20c322[_0x65f6('0x1c')];};};Realtime[_0x65f6('0x39')][_0x65f6('0x46')]=function(){var _0x39364f=this;return function(_0x2a76b3){if(_0x2a76b3){freeIsNotKey(_0x2a76b3,_0x39364f[_0x65f6('0x19')],'id');for(var _0x35d77f=0x0,_0x138334={};_0x35d77f<_0x2a76b3[_0x65f6('0x3d')];_0x35d77f+=0x1){_0x138334=_0x2a76b3[_0x35d77f];if(_[_0x65f6('0x3f')](_0x39364f[_0x65f6('0x19')][_0x138334['id']])){_0x39364f[_0x65f6('0x19')][_0x138334['id']]=new SugarcrmAccount(_0x138334);}else{_0x39364f[_0x65f6('0x3a')](_0x39364f[_0x65f6('0x19')][_0x138334['id']],_0x138334);}}}return _0x39364f['sugarcrmAccounts'];};};Realtime[_0x65f6('0x39')][_0x65f6('0x47')]=function(){var _0x42a805=this;return function(_0x4b4efe){if(_0x4b4efe){freeIsNotKey(_0x4b4efe,_0x42a805[_0x65f6('0x1d')],'id');for(var _0x16dec0=0x0,_0x4638c9={};_0x16dec0<_0x4b4efe[_0x65f6('0x3d')];_0x16dec0+=0x1){_0x4638c9=_0x4b4efe[_0x16dec0];if(_['isUndefined'](_0x42a805[_0x65f6('0x1d')][_0x4638c9['id']])){_0x42a805[_0x65f6('0x1d')][_0x4638c9['id']]=new VtigerAccount(_0x4638c9);}else{_0x42a805[_0x65f6('0x3a')](_0x42a805[_0x65f6('0x1d')][_0x4638c9['id']],_0x4638c9);}}}return _0x42a805['vtigerAccounts'];};};Realtime[_0x65f6('0x39')][_0x65f6('0x48')]=function(){var _0x5c55e4=this;return function(_0x28682b){if(_0x28682b){freeIsNotKey(_0x28682b,_0x5c55e4[_0x65f6('0x1e')],'id');for(var _0x36c316=0x0,_0x51549d={};_0x36c316<_0x28682b[_0x65f6('0x3d')];_0x36c316+=0x1){_0x51549d=_0x28682b[_0x36c316];if(_[_0x65f6('0x3f')](_0x5c55e4[_0x65f6('0x1e')][_0x51549d['id']])){_0x5c55e4[_0x65f6('0x1e')][_0x51549d['id']]=new ServicenowAccount(_0x51549d);}else{_0x5c55e4[_0x65f6('0x3a')](_0x5c55e4[_0x65f6('0x1e')][_0x51549d['id']],_0x51549d);}}}return _0x5c55e4['servicenowAccounts'];};};Realtime['prototype']['initDynamics365Accounts']=function(){var _0x336a7d=this;return function(_0x367d95){if(_0x367d95){freeIsNotKey(_0x367d95,_0x336a7d[_0x65f6('0x1f')],'id');for(var _0x471bec=0x0,_0xab6f0={};_0x471bec<_0x367d95[_0x65f6('0x3d')];_0x471bec+=0x1){_0xab6f0=_0x367d95[_0x471bec];if(_['isUndefined'](_0x336a7d[_0x65f6('0x1f')][_0xab6f0['id']])){_0x336a7d[_0x65f6('0x1f')][_0xab6f0['id']]=new Dynamics365Account(_0xab6f0);}else{_0x336a7d['mergeFromDatabase'](_0x336a7d[_0x65f6('0x1f')][_0xab6f0['id']],_0xab6f0);}}}return _0x336a7d[_0x65f6('0x1f')];};};Realtime[_0x65f6('0x39')]['initFreshsalesAccounts']=function(){var _0x23c441=this;return function(_0x448c9a){if(_0x448c9a){freeIsNotKey(_0x448c9a,_0x23c441['freshsalesAccounts'],'id');for(var _0x271d76=0x0,_0x3edc6b={};_0x271d76<_0x448c9a[_0x65f6('0x3d')];_0x271d76+=0x1){_0x3edc6b=_0x448c9a[_0x271d76];if(_[_0x65f6('0x3f')](_0x23c441[_0x65f6('0x49')][_0x3edc6b['id']])){_0x23c441[_0x65f6('0x49')][_0x3edc6b['id']]=new FreshsalesAccount(_0x3edc6b);}else{_0x23c441[_0x65f6('0x3a')](_0x23c441['freshsalesAccounts'][_0x3edc6b['id']],_0x3edc6b);}}}return _0x23c441['freshsalesAccounts'];};};Realtime[_0x65f6('0x39')][_0x65f6('0x4a')]=function(){var _0x4a9524=this;return function(_0x417ba5){for(var _0x5f3df9=0x0;_0x5f3df9<_0x417ba5[_0x65f6('0x3d')];_0x5f3df9+=0x1){_['merge'](_0x4a9524[_0x65f6('0x11')][_0x417ba5[_0x5f3df9][_0x65f6('0x3e')]],_0x417ba5[_0x5f3df9]);}return _0x4a9524[_0x65f6('0x11')];};};Realtime[_0x65f6('0x39')][_0x65f6('0x4b')]=function(){var _0x264e6c=this;return function(_0x1aaf75){clearVoiceQueues(_0x264e6c[_0x65f6('0x11')]);if(_0x1aaf75){_0x1aaf75=_[_0x65f6('0x4c')](_0x1aaf75,'uniqueid');for(var _0x480190 in _0x1aaf75){if(_0x1aaf75[_0x65f6('0x22')](_0x480190)){for(var _0x13ee4b=0x0;_0x13ee4b<_0x1aaf75[_0x480190][_0x65f6('0x3d')];_0x13ee4b+=0x1){var _0x51497f=_0x1aaf75[_0x480190][_0x13ee4b]['queue'];if(_0x264e6c[_0x65f6('0x11')][_0x51497f]){if(_0x1aaf75[_0x480190][_0x13ee4b][_0x65f6('0x4d')]){_0x264e6c[_0x65f6('0x11')][_0x51497f][_0x65f6('0x2c')]+=0x1;}if(_0x1aaf75[_0x480190][_0x13ee4b][_0x65f6('0x4e')]){_0x264e6c[_0x65f6('0x11')][_0x51497f]['abandoned']+=0x1;}_0x264e6c['voiceQueues'][_0x51497f][_0x65f6('0x28')]+=moment(_0x1aaf75[_0x480190][_0x13ee4b][_0x65f6('0x4f')])['diff'](moment(_0x1aaf75[_0x480190][_0x13ee4b][_0x65f6('0x50')]),'seconds')||0x0;if(_0x13ee4b===_0x1aaf75[_0x480190][_0x65f6('0x3d')]-0x1){_0x264e6c[_0x65f6('0x11')][_0x51497f][_0x65f6('0x51')]+=moment(_0x1aaf75[_0x480190][_0x13ee4b][_0x65f6('0x52')]||_0x1aaf75[_0x480190][_0x13ee4b]['queuecallerabandonAt']||_0x1aaf75[_0x480190][_0x13ee4b][_0x65f6('0x53')])[_0x65f6('0x54')](moment(_0x1aaf75[_0x480190][_0x13ee4b][_0x65f6('0x50')]),'seconds')||0x0;_0x264e6c['voiceQueues'][_0x51497f][_0x65f6('0x26')]+=0x1;if(_0x1aaf75[_0x480190][_0x13ee4b]['queuecallercomplete']){_0x264e6c[_0x65f6('0x11')][_0x51497f][_0x65f6('0x27')]+=0x1;_0x264e6c[_0x65f6('0x11')][_0x51497f][_0x65f6('0x29')]+=moment(_0x1aaf75[_0x480190][_0x13ee4b]['queuecallercompleteAt'])['diff'](moment(_0x1aaf75[_0x480190][_0x13ee4b]['queuecallerleaveAt']),_0x65f6('0x55'))||0x0;}}else{_0x264e6c[_0x65f6('0x11')][_0x51497f][_0x65f6('0x51')]+=_0x264e6c['voiceQueues'][_0x51497f][_0x65f6('0x28')]||0x0;}}}}}}return _0x264e6c[_0x65f6('0x11')];};};Realtime[_0x65f6('0x39')]['initVoiceCallReports']=function(){var _0x40d0f7=this;return function(_0x15809e){clearVoiceCallReports(_0x40d0f7['outbound']);if(_0x15809e){for(var _0x758e80=0x0;_0x758e80<_0x15809e[_0x65f6('0x3d')];_0x758e80+=0x1){_0x40d0f7['outbound'][_0x65f6('0x26')]+=0x1;_0x40d0f7['outbound'][_0x65f6('0x51')]+=_0x15809e[_0x758e80]['duration'];if(_0x15809e[_0x758e80][_0x65f6('0x56')]===_0x65f6('0x57')){_0x40d0f7['outbound'][_0x65f6('0x27')]+=0x1;_0x40d0f7[_0x65f6('0x58')][_0x65f6('0x28')]+=_0x15809e[_0x758e80][_0x65f6('0x59')]-_0x15809e[_0x758e80][_0x65f6('0x5a')]||0x0;_0x40d0f7[_0x65f6('0x58')][_0x65f6('0x29')]+=_0x15809e[_0x758e80][_0x65f6('0x5a')];}}}return _0x40d0f7[_0x65f6('0x58')];};};Realtime[_0x65f6('0x39')][_0x65f6('0x5b')]=function(){var _0x574d84=this;return function(_0x10a661){if(_0x10a661){freeIsNotKey(_0x10a661,_0x574d84[_0x65f6('0x5c')],_0x65f6('0x3e'));for(var _0x219e42=0x0,_0x5694f9={};_0x219e42<_0x10a661[_0x65f6('0x3d')];_0x219e42+=0x1){_0x5694f9=_0x10a661[_0x219e42];if(_[_0x65f6('0x3f')](_0x574d84['campaigns'][_0x5694f9[_0x65f6('0x3e')]])){_0x574d84['campaigns'][_0x5694f9[_0x65f6('0x3e')]]=new Campaign(_0x5694f9);}else{_0x574d84['mergeFromDatabase'](_0x574d84[_0x65f6('0x5c')][_0x5694f9[_0x65f6('0x3e')]],_0x5694f9);_0x574d84['campaigns'][_0x5694f9['name']][_0x65f6('0x5d')]=_0x5694f9[_0x65f6('0x5e')]?_0x5694f9['SquareProject'][_0x65f6('0x3e')]:undefined;}}}return _0x574d84[_0x65f6('0x5c')];};};Realtime[_0x65f6('0x39')]['initVoiceExtensions']=function(){var _0x1348ec=this;return function(_0x246510){if(_0x246510){freeIsNotKey(_0x246510,_0x1348ec['voiceExtensions'],'id');for(var _0x36b8de=0x0,_0x504b39={};_0x36b8de<_0x246510[_0x65f6('0x3d')];_0x36b8de+=0x1){_0x504b39=_0x246510[_0x36b8de];if(_['isUndefined'](_0x1348ec['voiceExtensions'][_0x504b39['id']])){_0x1348ec[_0x65f6('0x5f')][_0x504b39['id']]=new VoiceExtension(_0x504b39);}else{_0x1348ec[_0x65f6('0x3a')](_0x1348ec[_0x65f6('0x5f')][_0x504b39['id']],_0x504b39);}}}return _0x1348ec[_0x65f6('0x5f')];};};Realtime[_0x65f6('0x39')][_0x65f6('0x60')]=function(){var _0x1ac46f=this;return function(_0x1f4e2c){clearCampaigns(_0x1ac46f['campaigns']);for(var _0x494904=0x0;_0x494904<_0x1f4e2c[_0x65f6('0x3d')];_0x494904+=0x1){_['merge'](_0x1ac46f[_0x65f6('0x5c')][_0x1f4e2c[_0x494904][_0x65f6('0x3e')]],_0x1f4e2c[_0x494904]);}return _0x1ac46f[_0x65f6('0x5c')];};};Realtime[_0x65f6('0x39')][_0x65f6('0x61')]=function(){var _0x56bd9d=this;return function(_0x398cac){if(_0x398cac){freeIsNotKey(_0x398cac,_0x56bd9d[_0x65f6('0x20')],'id');for(var _0x14c908=0x0,_0x576ecd={};_0x14c908<_0x398cac[_0x65f6('0x3d')];_0x14c908+=0x1){_0x576ecd=_0x398cac[_0x14c908];if(_[_0x65f6('0x3f')](_0x56bd9d[_0x65f6('0x20')][_0x576ecd['id']])){_0x56bd9d[_0x65f6('0x20')][_0x576ecd['id']]=new FaxAccount(_0x576ecd);}else{_0x56bd9d[_0x65f6('0x3a')](_0x56bd9d[_0x65f6('0x20')][_0x576ecd['id']],_0x576ecd);}}}return _0x56bd9d['faxAccounts'];};};Realtime['prototype'][_0x65f6('0x62')]=function(){var _0x10d744=this;return function(_0x10c916){if(_0x10c916){freeIsNotKey(_0x10c916,_0x10d744[_0x65f6('0x11')],'name');for(var _0x4bda86=0x0,_0x336076={};_0x4bda86<_0x10c916[_0x65f6('0x3d')];_0x4bda86+=0x1){_0x336076=_0x10c916[_0x4bda86];if(_[_0x65f6('0x3f')](_0x10d744[_0x65f6('0x11')][_0x336076[_0x65f6('0x3e')]])){_0x10d744[_0x65f6('0x11')][_0x336076['name']]=new VoiceQueue(_0x336076);}else{_0x10d744['mergeFromDatabase'](_0x10d744['voiceQueues'][_0x336076[_0x65f6('0x3e')]],_0x336076);}}}return _0x10d744[_0x65f6('0x11')];};};module[_0x65f6('0x63')]=Realtime; \ No newline at end of file +var _0x5f66=['diff','seconds','disposition','ANSWERED','outbound','duration','billableseconds','initCampaigns','campaigns','dialQueueProject','SquareProject','voiceExtensions','initCampaignHopperHistory','initFaxAccounts','initVoiceQueues','exports','moment','../model/agent','../model/telephone','../model/trunk','../model/voiceQueue','../model/trigger','../model/campaign','../model/zendeskAccount','../model/salesforceAccount','../model/zohoAccount','../model/deskAccount','../model/vtigerAccount','../model/servicenowAccount','../model/dynamics365Account','../model/freshsalesAccount','telephones','trunks','voiceQueues','triggers','templates','channels','outboundChannels','settings','zendeskAccounts','salesforceAccounts','sugarcrmAccounts','freshdeskAccounts','zohoAccounts','deskAccounts','vtigerAccounts','servicenowAccounts','dynamics365Accounts','faxAccounts','mapKeys','hasOwnProperty','isNil','format','interface','total','answered','sumHoldTime','sumBillable','isEmpty','ivrAnswerCallsDay','unmanaged','abandoned','outboundAnswerAgiCallsDay','outboundNoAnswerCallsDay','outboundBusyCallsDay','outboundCongestionCallsDay','outboundNoSuchCallsDay','outboundUnknownCallsDay','outboundDropCallsDayTimeout','outboundOriginateFailureCallsDay','outboundRejectCallsDay','outboundAnswerCallsDay','queueStatusComplete','prototype','mergeFromDatabase','initAgents','agents','length','name','isUndefined','initTelephones','SIP/%s','initTriggers','initSalesforceAccounts','initFreshdeskAccounts','initDeskAccounts','initSugarcrmAccounts','initVtigerAccounts','initServicenowAccounts','freshsalesAccounts','initVoiceQueueHopperHistory','initVoiceQueueReports','groupBy','queuecallerexit','queuecallerabandon','queuecallerleaveAt','queuecallerjoinAt','sumDuration','queuecallercompleteAt','queuecallerexitAt'];(function(_0x35d939,_0x1cc31f){var _0x519031=function(_0x4c9876){while(--_0x4c9876){_0x35d939['push'](_0x35d939['shift']());}};_0x519031(++_0x1cc31f);}(_0x5f66,0x1a0));var _0x65f6=function(_0x5d4607,_0x6b5e7b){_0x5d4607=_0x5d4607-0x0;var _0x5e4a86=_0x5f66[_0x5d4607];return _0x5e4a86;};'use strict';var _=require('lodash');var moment=require(_0x65f6('0x0'));var util=require('util');var Agent=require(_0x65f6('0x1'));var Telephone=require(_0x65f6('0x2'));var Trunk=require(_0x65f6('0x3'));var VoiceQueue=require(_0x65f6('0x4'));var Trigger=require(_0x65f6('0x5'));var Template=require('../model/template');var Campaign=require(_0x65f6('0x6'));var VoiceExtension=require('../model/voiceExtension');var ZendeskAccount=require(_0x65f6('0x7'));var SalesforceAccount=require(_0x65f6('0x8'));var FreshdeskAccount=require('../model/freshdeskAccount');var SugarcrmAccount=require('../model/sugarcrmAccount');var ZohoAccount=require(_0x65f6('0x9'));var DeskAccount=require(_0x65f6('0xa'));var VtigerAccount=require(_0x65f6('0xb'));var ServicenowAccount=require(_0x65f6('0xc'));var Dynamics365Account=require(_0x65f6('0xd'));var FreshsalesAccount=require(_0x65f6('0xe'));var FaxAccount=require('../model/faxAccount');function Realtime(){this['agents']={};this[_0x65f6('0xf')]={};this[_0x65f6('0x10')]={};this[_0x65f6('0x11')]={};this[_0x65f6('0x12')]={};this['campaigns']={};this[_0x65f6('0x13')]={};this['outbound']={'total':0x0,'answered':0x0,'sumHoldTime':0x0,'sumDuration':0x0,'sumBillable':0x0};this['voiceExtensions']={};this[_0x65f6('0x14')]={};this['queueChannels']={};this[_0x65f6('0x15')]={};this['timers']={};this[_0x65f6('0x16')]={};this[_0x65f6('0x17')]={};this[_0x65f6('0x18')]={};this[_0x65f6('0x19')]={};this[_0x65f6('0x1a')]={};this[_0x65f6('0x1b')]={};this[_0x65f6('0x1c')]={};this[_0x65f6('0x1d')]={};this[_0x65f6('0x1e')]={};this[_0x65f6('0x1f')]={};this['freshsalesAccounts']={};this[_0x65f6('0x20')]={};}function freeIsNotKey(_0x49a913,_0x5dd324,_0x1693e6){var _0x5c69f8=_[_0x65f6('0x21')](_0x49a913,function(_0x1c955c){return _0x1c955c[_0x1693e6];});for(var _0x1b1cbb in _0x5dd324){if(_0x5dd324[_0x65f6('0x22')](_0x1b1cbb)){if(!_0x5c69f8[_0x1b1cbb]){delete _0x5dd324[_0x1b1cbb];}}}}function freeIsNotKeySip(_0xc8660c,_0x18380e){var _0x495dd6=_['mapKeys'](_0xc8660c,function(_0x2d538c){return util['format']('SIP/%s',_0x2d538c['name']);});for(var _0x365159 in _0x18380e){if(_0x18380e[_0x65f6('0x22')](_0x365159)){if(!_0x495dd6[_0x365159]){delete _0x18380e[_0x365159];}}}}function freeIsNotKeyAgent(_0x5114a4,_0x39e19f){var _0x270893=_[_0x65f6('0x21')](_0x5114a4,function(_0x3876ed){var _0x219ab2=_[_0x65f6('0x23')](_0x3876ed['interface'])?util[_0x65f6('0x24')]('SIP/%s',_0x3876ed['name']):_0x3876ed[_0x65f6('0x25')];return _0x219ab2;});for(var _0xd173f4 in _0x39e19f){if(_0x39e19f['hasOwnProperty'](_0xd173f4)){if(!_0x270893[_0xd173f4]){delete _0x39e19f[_0xd173f4];}}}}function clearVoiceCallReports(_0x1eeaaa){_0x1eeaaa[_0x65f6('0x26')]=0x0;_0x1eeaaa[_0x65f6('0x27')]=0x0;_0x1eeaaa[_0x65f6('0x28')]=0x0;_0x1eeaaa['sumDuration']=0x0;_0x1eeaaa[_0x65f6('0x29')]=0x0;}function clearCampaigns(_0x59ea32){if(!_[_0x65f6('0x2a')](_0x59ea32)){for(var _0x5963e0 in _0x59ea32){if(_0x59ea32['hasOwnProperty'](_0x5963e0)){_0x59ea32[_0x5963e0]['ivrTotalCallsDays']=0x0;_0x59ea32[_0x5963e0][_0x65f6('0x2b')]=0x0;}}}}function clearVoiceQueues(_0x16cde8){if(!_['isEmpty'](_0x16cde8)){for(var _0x296cd9 in _0x16cde8){if(_0x16cde8[_0x65f6('0x22')](_0x296cd9)){_0x16cde8[_0x296cd9]['total']=0x0;_0x16cde8[_0x296cd9][_0x65f6('0x27')]=0x0;_0x16cde8[_0x296cd9][_0x65f6('0x2c')]=0x0;_0x16cde8[_0x296cd9][_0x65f6('0x2d')]=0x0;_0x16cde8[_0x296cd9]['sumHoldTime']=0x0;_0x16cde8[_0x296cd9]['sumDuration']=0x0;_0x16cde8[_0x296cd9]['sumBillable']=0x0;_0x16cde8[_0x296cd9][_0x65f6('0x2e')]=0x0;_0x16cde8[_0x296cd9][_0x65f6('0x2f')]=0x0;_0x16cde8[_0x296cd9][_0x65f6('0x30')]=0x0;_0x16cde8[_0x296cd9][_0x65f6('0x31')]=0x0;_0x16cde8[_0x296cd9][_0x65f6('0x32')]=0x0;_0x16cde8[_0x296cd9][_0x65f6('0x33')]=0x0;_0x16cde8[_0x296cd9][_0x65f6('0x34')]=0x0;_0x16cde8[_0x296cd9]['outboundDropCallsDayCallersExit']=0x0;_0x16cde8[_0x296cd9]['outboundBlacklistCallsDay']=0x0;_0x16cde8[_0x296cd9][_0x65f6('0x35')]=0x0;_0x16cde8[_0x296cd9][_0x65f6('0x36')]=0x0;_0x16cde8[_0x296cd9]['outboundReCallsDay']=0x0;_0x16cde8[_0x296cd9]['outboundAnswerAgiCallsDay']=0x0;_0x16cde8[_0x296cd9][_0x65f6('0x37')]=0x0;_0x16cde8[_0x296cd9][_0x65f6('0x38')]=!![];}}}}Realtime[_0x65f6('0x39')][_0x65f6('0x3a')]=function(_0x1217fd,_0x2d32be){for(var _0x5792a0 in _0x2d32be){if(_0x1217fd[_0x65f6('0x22')](_0x5792a0)){_0x1217fd[_0x5792a0]=_0x2d32be[_0x5792a0];}}};Realtime[_0x65f6('0x39')][_0x65f6('0x3b')]=function(){var _0x4bc037=this;return function(_0x217f35){if(_0x217f35){freeIsNotKeyAgent(_0x217f35,_0x4bc037[_0x65f6('0x3c')]);for(var _0xbaed3c=0x0,_0x45510a={};_0xbaed3c<_0x217f35[_0x65f6('0x3d')];_0xbaed3c+=0x1){_0x45510a=_0x217f35[_0xbaed3c];var _0x2f054c=_['isNil'](_0x45510a[_0x65f6('0x25')])?util[_0x65f6('0x24')]('SIP/%s',_0x45510a[_0x65f6('0x3e')]):_0x45510a['interface'];if(_[_0x65f6('0x3f')](_0x4bc037['agents'][_0x2f054c])){_0x4bc037[_0x65f6('0x3c')][_0x2f054c]=new Agent(_0x45510a);}else{_0x4bc037[_0x65f6('0x3a')](_0x4bc037['agents'][_0x2f054c],_0x45510a);}}}return _0x4bc037[_0x65f6('0x3c')];};};Realtime[_0x65f6('0x39')][_0x65f6('0x40')]=function(){var _0x515648=this;return function(_0x582c7e){if(_0x582c7e){freeIsNotKeySip(_0x582c7e,_0x515648[_0x65f6('0xf')]);for(var _0x4c0df4=0x0,_0x26de30={};_0x4c0df4<_0x582c7e['length'];_0x4c0df4+=0x1){_0x26de30=_0x582c7e[_0x4c0df4];if(_[_0x65f6('0x3f')](_0x515648[_0x65f6('0xf')][util['format'](_0x65f6('0x41'),_0x26de30['name'])])){_0x515648['telephones'][util[_0x65f6('0x24')](_0x65f6('0x41'),_0x26de30[_0x65f6('0x3e')])]=new Telephone(_0x26de30);}else{_0x515648[_0x65f6('0x3a')](_0x515648[_0x65f6('0xf')][util[_0x65f6('0x24')](_0x65f6('0x41'),_0x26de30[_0x65f6('0x3e')])],_0x26de30);}}}return _0x515648['telephones'];};};Realtime[_0x65f6('0x39')]['initTrunks']=function(){var _0x12a589=this;return function(_0xa4394a){if(_0xa4394a){freeIsNotKeySip(_0xa4394a,_0x12a589[_0x65f6('0x10')]);for(var _0x2ea7f7=0x0,_0x5ef5c2={};_0x2ea7f7<_0xa4394a[_0x65f6('0x3d')];_0x2ea7f7+=0x1){_0x5ef5c2=_0xa4394a[_0x2ea7f7];if(_[_0x65f6('0x3f')](_0x12a589[_0x65f6('0x10')][util[_0x65f6('0x24')](_0x65f6('0x41'),_0x5ef5c2[_0x65f6('0x3e')])])){_0x12a589[_0x65f6('0x10')][util[_0x65f6('0x24')](_0x65f6('0x41'),_0x5ef5c2['name'])]=new Trunk(_0x5ef5c2);}else{_0x12a589[_0x65f6('0x3a')](_0x12a589[_0x65f6('0x10')][util[_0x65f6('0x24')](_0x65f6('0x41'),_0x5ef5c2[_0x65f6('0x3e')])],_0x5ef5c2);}}}return _0x12a589[_0x65f6('0x10')];};};Realtime[_0x65f6('0x39')][_0x65f6('0x42')]=function(){var _0x461393=this;return function(_0x2abbed){if(_0x2abbed){freeIsNotKey(_0x2abbed,_0x461393[_0x65f6('0x12')],'id');for(var _0x2c008a=0x0,_0x6c4d94={};_0x2c008a<_0x2abbed[_0x65f6('0x3d')];_0x2c008a+=0x1){_0x6c4d94=_0x2abbed[_0x2c008a];if(_[_0x65f6('0x3f')](_0x461393[_0x65f6('0x12')][_0x6c4d94['id']])){_0x461393['triggers'][_0x6c4d94['id']]=new Trigger(_0x6c4d94);}else{_0x461393[_0x65f6('0x3a')](_0x461393[_0x65f6('0x12')][_0x6c4d94['id']],_0x6c4d94);}}}return _0x461393[_0x65f6('0x12')];};};Realtime[_0x65f6('0x39')]['initTemplates']=function(){var _0x1bf5bf=this;return function(_0x2d0dac){if(_0x2d0dac){freeIsNotKey(_0x2d0dac,_0x1bf5bf[_0x65f6('0x13')],'id');for(var _0x5e69b4=0x0,_0x2dbab3={};_0x5e69b4<_0x2d0dac[_0x65f6('0x3d')];_0x5e69b4+=0x1){_0x2dbab3=_0x2d0dac[_0x5e69b4];if(_[_0x65f6('0x3f')](_0x1bf5bf[_0x65f6('0x13')][_0x2dbab3['id']])){_0x1bf5bf['templates'][_0x2dbab3['id']]=new Template(_0x2dbab3);}else{_0x1bf5bf[_0x65f6('0x3a')](_0x1bf5bf['templates'][_0x2dbab3['id']],_0x2dbab3);}}}return _0x1bf5bf[_0x65f6('0x13')];};};Realtime[_0x65f6('0x39')]['initZendeskAccounts']=function(){var _0xf754ee=this;return function(_0x5085db){if(_0x5085db){freeIsNotKey(_0x5085db,_0xf754ee[_0x65f6('0x17')],'id');for(var _0x4d9b76=0x0,_0x2d1706={};_0x4d9b76<_0x5085db[_0x65f6('0x3d')];_0x4d9b76+=0x1){_0x2d1706=_0x5085db[_0x4d9b76];if(_[_0x65f6('0x3f')](_0xf754ee[_0x65f6('0x17')][_0x2d1706['id']])){_0xf754ee['zendeskAccounts'][_0x2d1706['id']]=new ZendeskAccount(_0x2d1706);}else{_0xf754ee['mergeFromDatabase'](_0xf754ee[_0x65f6('0x17')][_0x2d1706['id']],_0x2d1706);}}}return _0xf754ee[_0x65f6('0x17')];};};Realtime[_0x65f6('0x39')][_0x65f6('0x43')]=function(){var _0x3b907c=this;return function(_0x2d6ab9){if(_0x2d6ab9){freeIsNotKey(_0x2d6ab9,_0x3b907c[_0x65f6('0x18')],'id');for(var _0x41690c=0x0,_0x414f49={};_0x41690c<_0x2d6ab9['length'];_0x41690c+=0x1){_0x414f49=_0x2d6ab9[_0x41690c];if(_[_0x65f6('0x3f')](_0x3b907c[_0x65f6('0x18')][_0x414f49['id']])){_0x3b907c[_0x65f6('0x18')][_0x414f49['id']]=new SalesforceAccount(_0x414f49);}else{_0x3b907c['mergeFromDatabase'](_0x3b907c[_0x65f6('0x18')][_0x414f49['id']],_0x414f49);}}}return _0x3b907c[_0x65f6('0x18')];};};Realtime['prototype'][_0x65f6('0x44')]=function(){var _0x253d52=this;return function(_0x57eb04){if(_0x57eb04){freeIsNotKey(_0x57eb04,_0x253d52[_0x65f6('0x1a')],'id');for(var _0x4f96c4=0x0,_0x247be3={};_0x4f96c4<_0x57eb04[_0x65f6('0x3d')];_0x4f96c4+=0x1){_0x247be3=_0x57eb04[_0x4f96c4];if(_[_0x65f6('0x3f')](_0x253d52['freshdeskAccounts'][_0x247be3['id']])){_0x253d52[_0x65f6('0x1a')][_0x247be3['id']]=new FreshdeskAccount(_0x247be3);}else{_0x253d52[_0x65f6('0x3a')](_0x253d52['freshdeskAccounts'][_0x247be3['id']],_0x247be3);}}}return _0x253d52[_0x65f6('0x1a')];};};Realtime[_0x65f6('0x39')]['initZohoAccounts']=function(){var _0x34d6a9=this;return function(_0x344c0e){if(_0x344c0e){freeIsNotKey(_0x344c0e,_0x34d6a9[_0x65f6('0x1b')],'id');for(var _0x25d504=0x0,_0x234fa7={};_0x25d504<_0x344c0e[_0x65f6('0x3d')];_0x25d504+=0x1){_0x234fa7=_0x344c0e[_0x25d504];if(_[_0x65f6('0x3f')](_0x34d6a9[_0x65f6('0x1b')][_0x234fa7['id']])){_0x34d6a9['zohoAccounts'][_0x234fa7['id']]=new ZohoAccount(_0x234fa7);}else{_0x34d6a9['mergeFromDatabase'](_0x34d6a9['zohoAccounts'][_0x234fa7['id']],_0x234fa7);}}}return _0x34d6a9[_0x65f6('0x1b')];};};Realtime[_0x65f6('0x39')][_0x65f6('0x45')]=function(){var _0x20c322=this;return function(_0x545445){if(_0x545445){freeIsNotKey(_0x545445,_0x20c322[_0x65f6('0x1c')],'id');for(var _0x2032b9=0x0,_0x9ff849={};_0x2032b9<_0x545445['length'];_0x2032b9+=0x1){_0x9ff849=_0x545445[_0x2032b9];if(_[_0x65f6('0x3f')](_0x20c322[_0x65f6('0x1c')][_0x9ff849['id']])){_0x20c322[_0x65f6('0x1c')][_0x9ff849['id']]=new DeskAccount(_0x9ff849);}else{_0x20c322['mergeFromDatabase'](_0x20c322['deskAccounts'][_0x9ff849['id']],_0x9ff849);}}}return _0x20c322[_0x65f6('0x1c')];};};Realtime[_0x65f6('0x39')][_0x65f6('0x46')]=function(){var _0x39364f=this;return function(_0x2a76b3){if(_0x2a76b3){freeIsNotKey(_0x2a76b3,_0x39364f[_0x65f6('0x19')],'id');for(var _0x35d77f=0x0,_0x138334={};_0x35d77f<_0x2a76b3[_0x65f6('0x3d')];_0x35d77f+=0x1){_0x138334=_0x2a76b3[_0x35d77f];if(_[_0x65f6('0x3f')](_0x39364f[_0x65f6('0x19')][_0x138334['id']])){_0x39364f[_0x65f6('0x19')][_0x138334['id']]=new SugarcrmAccount(_0x138334);}else{_0x39364f[_0x65f6('0x3a')](_0x39364f[_0x65f6('0x19')][_0x138334['id']],_0x138334);}}}return _0x39364f['sugarcrmAccounts'];};};Realtime[_0x65f6('0x39')][_0x65f6('0x47')]=function(){var _0x42a805=this;return function(_0x4b4efe){if(_0x4b4efe){freeIsNotKey(_0x4b4efe,_0x42a805[_0x65f6('0x1d')],'id');for(var _0x16dec0=0x0,_0x4638c9={};_0x16dec0<_0x4b4efe[_0x65f6('0x3d')];_0x16dec0+=0x1){_0x4638c9=_0x4b4efe[_0x16dec0];if(_['isUndefined'](_0x42a805[_0x65f6('0x1d')][_0x4638c9['id']])){_0x42a805[_0x65f6('0x1d')][_0x4638c9['id']]=new VtigerAccount(_0x4638c9);}else{_0x42a805[_0x65f6('0x3a')](_0x42a805[_0x65f6('0x1d')][_0x4638c9['id']],_0x4638c9);}}}return _0x42a805['vtigerAccounts'];};};Realtime[_0x65f6('0x39')][_0x65f6('0x48')]=function(){var _0x5c55e4=this;return function(_0x28682b){if(_0x28682b){freeIsNotKey(_0x28682b,_0x5c55e4[_0x65f6('0x1e')],'id');for(var _0x36c316=0x0,_0x51549d={};_0x36c316<_0x28682b[_0x65f6('0x3d')];_0x36c316+=0x1){_0x51549d=_0x28682b[_0x36c316];if(_[_0x65f6('0x3f')](_0x5c55e4[_0x65f6('0x1e')][_0x51549d['id']])){_0x5c55e4[_0x65f6('0x1e')][_0x51549d['id']]=new ServicenowAccount(_0x51549d);}else{_0x5c55e4[_0x65f6('0x3a')](_0x5c55e4[_0x65f6('0x1e')][_0x51549d['id']],_0x51549d);}}}return _0x5c55e4['servicenowAccounts'];};};Realtime['prototype']['initDynamics365Accounts']=function(){var _0x336a7d=this;return function(_0x367d95){if(_0x367d95){freeIsNotKey(_0x367d95,_0x336a7d[_0x65f6('0x1f')],'id');for(var _0x471bec=0x0,_0xab6f0={};_0x471bec<_0x367d95[_0x65f6('0x3d')];_0x471bec+=0x1){_0xab6f0=_0x367d95[_0x471bec];if(_['isUndefined'](_0x336a7d[_0x65f6('0x1f')][_0xab6f0['id']])){_0x336a7d[_0x65f6('0x1f')][_0xab6f0['id']]=new Dynamics365Account(_0xab6f0);}else{_0x336a7d['mergeFromDatabase'](_0x336a7d[_0x65f6('0x1f')][_0xab6f0['id']],_0xab6f0);}}}return _0x336a7d[_0x65f6('0x1f')];};};Realtime[_0x65f6('0x39')]['initFreshsalesAccounts']=function(){var _0x23c441=this;return function(_0x448c9a){if(_0x448c9a){freeIsNotKey(_0x448c9a,_0x23c441['freshsalesAccounts'],'id');for(var _0x271d76=0x0,_0x3edc6b={};_0x271d76<_0x448c9a[_0x65f6('0x3d')];_0x271d76+=0x1){_0x3edc6b=_0x448c9a[_0x271d76];if(_[_0x65f6('0x3f')](_0x23c441[_0x65f6('0x49')][_0x3edc6b['id']])){_0x23c441[_0x65f6('0x49')][_0x3edc6b['id']]=new FreshsalesAccount(_0x3edc6b);}else{_0x23c441[_0x65f6('0x3a')](_0x23c441['freshsalesAccounts'][_0x3edc6b['id']],_0x3edc6b);}}}return _0x23c441['freshsalesAccounts'];};};Realtime[_0x65f6('0x39')][_0x65f6('0x4a')]=function(){var _0x4a9524=this;return function(_0x417ba5){for(var _0x5f3df9=0x0;_0x5f3df9<_0x417ba5[_0x65f6('0x3d')];_0x5f3df9+=0x1){_['merge'](_0x4a9524[_0x65f6('0x11')][_0x417ba5[_0x5f3df9][_0x65f6('0x3e')]],_0x417ba5[_0x5f3df9]);}return _0x4a9524[_0x65f6('0x11')];};};Realtime[_0x65f6('0x39')][_0x65f6('0x4b')]=function(){var _0x264e6c=this;return function(_0x1aaf75){clearVoiceQueues(_0x264e6c[_0x65f6('0x11')]);if(_0x1aaf75){_0x1aaf75=_[_0x65f6('0x4c')](_0x1aaf75,'uniqueid');for(var _0x480190 in _0x1aaf75){if(_0x1aaf75[_0x65f6('0x22')](_0x480190)){for(var _0x13ee4b=0x0;_0x13ee4b<_0x1aaf75[_0x480190][_0x65f6('0x3d')];_0x13ee4b+=0x1){var _0x51497f=_0x1aaf75[_0x480190][_0x13ee4b]['queue'];if(_0x264e6c[_0x65f6('0x11')][_0x51497f]){if(_0x1aaf75[_0x480190][_0x13ee4b][_0x65f6('0x4d')]){_0x264e6c[_0x65f6('0x11')][_0x51497f][_0x65f6('0x2c')]+=0x1;}if(_0x1aaf75[_0x480190][_0x13ee4b][_0x65f6('0x4e')]){_0x264e6c[_0x65f6('0x11')][_0x51497f]['abandoned']+=0x1;}_0x264e6c['voiceQueues'][_0x51497f][_0x65f6('0x28')]+=moment(_0x1aaf75[_0x480190][_0x13ee4b][_0x65f6('0x4f')])['diff'](moment(_0x1aaf75[_0x480190][_0x13ee4b][_0x65f6('0x50')]),'seconds')||0x0;if(_0x13ee4b===_0x1aaf75[_0x480190][_0x65f6('0x3d')]-0x1){_0x264e6c[_0x65f6('0x11')][_0x51497f][_0x65f6('0x51')]+=moment(_0x1aaf75[_0x480190][_0x13ee4b][_0x65f6('0x52')]||_0x1aaf75[_0x480190][_0x13ee4b]['queuecallerabandonAt']||_0x1aaf75[_0x480190][_0x13ee4b][_0x65f6('0x53')])[_0x65f6('0x54')](moment(_0x1aaf75[_0x480190][_0x13ee4b][_0x65f6('0x50')]),'seconds')||0x0;_0x264e6c['voiceQueues'][_0x51497f][_0x65f6('0x26')]+=0x1;if(_0x1aaf75[_0x480190][_0x13ee4b]['queuecallercomplete']){_0x264e6c[_0x65f6('0x11')][_0x51497f][_0x65f6('0x27')]+=0x1;_0x264e6c[_0x65f6('0x11')][_0x51497f][_0x65f6('0x29')]+=moment(_0x1aaf75[_0x480190][_0x13ee4b]['queuecallercompleteAt'])['diff'](moment(_0x1aaf75[_0x480190][_0x13ee4b]['queuecallerleaveAt']),_0x65f6('0x55'))||0x0;}}else{_0x264e6c[_0x65f6('0x11')][_0x51497f][_0x65f6('0x51')]+=_0x264e6c['voiceQueues'][_0x51497f][_0x65f6('0x28')]||0x0;}}}}}}return _0x264e6c[_0x65f6('0x11')];};};Realtime[_0x65f6('0x39')]['initVoiceCallReports']=function(){var _0x40d0f7=this;return function(_0x15809e){clearVoiceCallReports(_0x40d0f7['outbound']);if(_0x15809e){for(var _0x758e80=0x0;_0x758e80<_0x15809e[_0x65f6('0x3d')];_0x758e80+=0x1){_0x40d0f7['outbound'][_0x65f6('0x26')]+=0x1;_0x40d0f7['outbound'][_0x65f6('0x51')]+=_0x15809e[_0x758e80]['duration'];if(_0x15809e[_0x758e80][_0x65f6('0x56')]===_0x65f6('0x57')){_0x40d0f7['outbound'][_0x65f6('0x27')]+=0x1;_0x40d0f7[_0x65f6('0x58')][_0x65f6('0x28')]+=_0x15809e[_0x758e80][_0x65f6('0x59')]-_0x15809e[_0x758e80][_0x65f6('0x5a')]||0x0;_0x40d0f7[_0x65f6('0x58')][_0x65f6('0x29')]+=_0x15809e[_0x758e80][_0x65f6('0x5a')];}}}return _0x40d0f7[_0x65f6('0x58')];};};Realtime[_0x65f6('0x39')][_0x65f6('0x5b')]=function(){var _0x574d84=this;return function(_0x10a661){if(_0x10a661){freeIsNotKey(_0x10a661,_0x574d84[_0x65f6('0x5c')],_0x65f6('0x3e'));for(var _0x219e42=0x0,_0x5694f9={};_0x219e42<_0x10a661[_0x65f6('0x3d')];_0x219e42+=0x1){_0x5694f9=_0x10a661[_0x219e42];if(_[_0x65f6('0x3f')](_0x574d84['campaigns'][_0x5694f9[_0x65f6('0x3e')]])){_0x574d84['campaigns'][_0x5694f9[_0x65f6('0x3e')]]=new Campaign(_0x5694f9);}else{_0x574d84['mergeFromDatabase'](_0x574d84[_0x65f6('0x5c')][_0x5694f9[_0x65f6('0x3e')]],_0x5694f9);_0x574d84['campaigns'][_0x5694f9['name']][_0x65f6('0x5d')]=_0x5694f9[_0x65f6('0x5e')]?_0x5694f9['SquareProject'][_0x65f6('0x3e')]:undefined;}}}return _0x574d84[_0x65f6('0x5c')];};};Realtime[_0x65f6('0x39')]['initVoiceExtensions']=function(){var _0x1348ec=this;return function(_0x246510){if(_0x246510){freeIsNotKey(_0x246510,_0x1348ec['voiceExtensions'],'id');for(var _0x36b8de=0x0,_0x504b39={};_0x36b8de<_0x246510[_0x65f6('0x3d')];_0x36b8de+=0x1){_0x504b39=_0x246510[_0x36b8de];if(_['isUndefined'](_0x1348ec['voiceExtensions'][_0x504b39['id']])){_0x1348ec[_0x65f6('0x5f')][_0x504b39['id']]=new VoiceExtension(_0x504b39);}else{_0x1348ec[_0x65f6('0x3a')](_0x1348ec[_0x65f6('0x5f')][_0x504b39['id']],_0x504b39);}}}return _0x1348ec[_0x65f6('0x5f')];};};Realtime[_0x65f6('0x39')][_0x65f6('0x60')]=function(){var _0x1ac46f=this;return function(_0x1f4e2c){clearCampaigns(_0x1ac46f['campaigns']);for(var _0x494904=0x0;_0x494904<_0x1f4e2c[_0x65f6('0x3d')];_0x494904+=0x1){_['merge'](_0x1ac46f[_0x65f6('0x5c')][_0x1f4e2c[_0x494904][_0x65f6('0x3e')]],_0x1f4e2c[_0x494904]);}return _0x1ac46f[_0x65f6('0x5c')];};};Realtime[_0x65f6('0x39')][_0x65f6('0x61')]=function(){var _0x56bd9d=this;return function(_0x398cac){if(_0x398cac){freeIsNotKey(_0x398cac,_0x56bd9d[_0x65f6('0x20')],'id');for(var _0x14c908=0x0,_0x576ecd={};_0x14c908<_0x398cac[_0x65f6('0x3d')];_0x14c908+=0x1){_0x576ecd=_0x398cac[_0x14c908];if(_[_0x65f6('0x3f')](_0x56bd9d[_0x65f6('0x20')][_0x576ecd['id']])){_0x56bd9d[_0x65f6('0x20')][_0x576ecd['id']]=new FaxAccount(_0x576ecd);}else{_0x56bd9d[_0x65f6('0x3a')](_0x56bd9d[_0x65f6('0x20')][_0x576ecd['id']],_0x576ecd);}}}return _0x56bd9d['faxAccounts'];};};Realtime['prototype'][_0x65f6('0x62')]=function(){var _0x10d744=this;return function(_0x10c916){if(_0x10c916){freeIsNotKey(_0x10c916,_0x10d744[_0x65f6('0x11')],'name');for(var _0x4bda86=0x0,_0x336076={};_0x4bda86<_0x10c916[_0x65f6('0x3d')];_0x4bda86+=0x1){_0x336076=_0x10c916[_0x4bda86];if(_[_0x65f6('0x3f')](_0x10d744[_0x65f6('0x11')][_0x336076[_0x65f6('0x3e')]])){_0x10d744[_0x65f6('0x11')][_0x336076['name']]=new VoiceQueue(_0x336076);}else{_0x10d744['mergeFromDatabase'](_0x10d744['voiceQueues'][_0x336076[_0x65f6('0x3e')]],_0x336076);}}}return _0x10d744[_0x65f6('0x11')];};};module[_0x65f6('0x63')]=Realtime; \ No newline at end of file diff --git a/server/services/ami/realtime/utils.js b/server/services/ami/realtime/utils.js index 7a4e885..f65e139 100644 --- a/server/services/ami/realtime/utils.js +++ b/server/services/ami/realtime/utils.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x746c=['mergeDBDataToRealtime','hasOwnProperty'];(function(_0x26d521,_0x3280c0){var _0x5cfce2=function(_0x51bbc8){while(--_0x51bbc8){_0x26d521['push'](_0x26d521['shift']());}};_0x5cfce2(++_0x3280c0);}(_0x746c,0x107));var _0xc746=function(_0x47242d,_0x13f993){_0x47242d=_0x47242d-0x0;var _0x30273a=_0x746c[_0x47242d];return _0x30273a;};'use strict';function mergeDBDataToRealtime(_0x1abf95,_0x394d6b){var _0x13c647=Object['assign']({},_0x1abf95);for(var _0x2c1387 in _0x394d6b){if(_0x13c647[_0xc746('0x0')](_0x2c1387)){_0x13c647[_0x2c1387]=_0x394d6b[_0x2c1387];}}return _0x13c647;}exports[_0xc746('0x1')]=mergeDBDataToRealtime; \ No newline at end of file +var _0x1d7d=['mergeDBDataToRealtime'];(function(_0x13b442,_0x448c33){var _0x49d09c=function(_0x477277){while(--_0x477277){_0x13b442['push'](_0x13b442['shift']());}};_0x49d09c(++_0x448c33);}(_0x1d7d,0x18f));var _0xd1d7=function(_0x33b8fd,_0x5bb9e6){_0x33b8fd=_0x33b8fd-0x0;var _0x46bd51=_0x1d7d[_0x33b8fd];return _0x46bd51;};'use strict';function mergeDBDataToRealtime(_0x5d5fce,_0x464ef9){var _0x16c085=Object['assign']({},_0x5d5fce);for(var _0x1fedfd in _0x464ef9){if(_0x16c085['hasOwnProperty'](_0x1fedfd)){_0x16c085[_0x1fedfd]=_0x464ef9[_0x1fedfd];}}return _0x16c085;}exports[_0xd1d7('0x0')]=mergeDBDataToRealtime; \ No newline at end of file diff --git a/server/services/ami/report/index.js b/server/services/ami/report/index.js index bc22535..ae01336 100644 --- a/server/services/ami/report/index.js +++ b/server/services/ami/report/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x175a=['\x22%s\x22\x20<%s>','calleridname','transfers','linkedid','uniqueid','UserId','membername','create','monitorFilename','filename','createdAt','connectedlinename','exten','xcally-motion-dialer','isArray','forEach','startsWith','Local','substring','indexOf','mobile','lastIndexOf','transfererlinkedid','exports','lodash','moment','util','../../../config/environment','../ami','../rpc/voiceAgentReport','../rpc/voiceDialReport','../rpc/voiceQueueReport','../rpc/voiceRecording','../rpc/voiceTransferReport','./voiceDialReport','./userReport','realtime','agents','telephones','prototype','sync','xdr','disabled','custom:voiceQueueReport','voiceQueueReport','bind','custom:voiceCallReport','voiceCallReport','custom:voiceAgentReport','voiceAgentReport','custom:voiceDialReport','voiceDialReport','blindTransfer','attendedtransfer','attendedTransfer','findAgent','find','accountcode','isNil','name','interface','format','SIP/%s','length','connectedlinenum','assigned','queuecallercomplete','queuecallercompleteAt','YYYY-MM-DD\x20HH:mm:ss','queuecallerexit','queuecallerexitAt','match','getAgentByInternal','keys','getCallType','channel','split','internal','type','lastapplication','queue','lastdata','context','from-voip-provider','destination','callerid','xcally-motion-preview','calleridpreview','calleridnum','originatecalleridnum','destinationchannel','disposition','ANSWERED'];(function(_0x402c8f,_0x30cc1d){var _0x11e809=function(_0x4ccfa3){while(--_0x4ccfa3){_0x402c8f['push'](_0x402c8f['shift']());}};_0x11e809(++_0x30cc1d);}(_0x175a,0x18c));var _0xa175=function(_0x9ba678,_0x2589bc){_0x9ba678=_0x9ba678-0x0;var _0x2d116d=_0x175a[_0x9ba678];return _0x2d116d;};'use strict';var _=require(_0xa175('0x0'));var moment=require(_0xa175('0x1'));var util=require(_0xa175('0x2'));var config=require(_0xa175('0x3'));var ami=require(_0xa175('0x4'));var RpcVoiceAgentReport=require(_0xa175('0x5'));var RpcVoiceCallReport=require('../rpc/voiceCallReport');var RpcVoiceDialReport=require(_0xa175('0x6'));var RpcMemberReport=require('../rpc/memberReport');var RpcVoiceQueueReport=require(_0xa175('0x7'));var RpcVoiceRecording=require(_0xa175('0x8'));var RpcVoiceTransferReport=require(_0xa175('0x9'));var VoiceQueueReport=require('./voiceQueueReport');var VoiceCallReport=require('./voiceCallReport');var VoiceAgentReport=require('./voiceAgentReport');var VoiceDialReport=require(_0xa175('0xa'));var UserReport=require(_0xa175('0xb'));function Report(_0x1e4691){this[_0xa175('0xc')]=_0x1e4691;this[_0xa175('0xd')]=_0x1e4691[_0xa175('0xd')];this[_0xa175('0xe')]=_0x1e4691[_0xa175('0xe')];}Report[_0xa175('0xf')][_0xa175('0x10')]=function(_0x6c1d5){var _0x459316=new VoiceQueueReport(this[_0xa175('0xc')]);var _0x3bd67a=new VoiceAgentReport(this[_0xa175('0xc')]);var _0x1fff80=new VoiceDialReport(this[_0xa175('0xc')]);var _0xf58c67=new VoiceCallReport(this[_0xa175('0xc')]);var _0x59559a=new UserReport(this['realtime']);if(config['xdr']&&config[_0xa175('0x11')][_0xa175('0x12')]){ami['on'](_0xa175('0x13'),this[_0xa175('0x14')][_0xa175('0x15')](this));ami['on'](_0xa175('0x16'),this[_0xa175('0x17')][_0xa175('0x15')](this));ami['on'](_0xa175('0x18'),this[_0xa175('0x19')][_0xa175('0x15')](this));ami['on'](_0xa175('0x1a'),this[_0xa175('0x1b')][_0xa175('0x15')](this));ami['on']('blindtransfer',this[_0xa175('0x1c')][_0xa175('0x15')](this));ami['on'](_0xa175('0x1d'),this[_0xa175('0x1e')][_0xa175('0x15')](this));}};Report['prototype'][_0xa175('0x1f')]=function(_0x58a226){var _0x59797f;_0x59797f=_[_0xa175('0x20')](this[_0xa175('0xd')],function(_0x48f010){return _0x48f010[_0xa175('0x21')]==_0x58a226||_0x48f010['name']==_0x58a226;});if(_[_0xa175('0x22')](_0x59797f)){var _0x22c145=_[_0xa175('0x20')](this[_0xa175('0xe')],function(_0x1cf331){return _0x1cf331[_0xa175('0x21')]==_0x58a226||_0x1cf331[_0xa175('0x23')]==_0x58a226;});if(_0x22c145){_0x59797f=_[_0xa175('0x20')](this[_0xa175('0xd')],function(_0x3b465d){return _0x3b465d[_0xa175('0x24')]==util[_0xa175('0x25')](_0xa175('0x26'),_0x22c145[_0xa175('0x23')]);});}}return _0x59797f;};Report[_0xa175('0xf')][_0xa175('0x14')]=function(_0x5a91bc){for(var _0x63db0e=0x0;_0x63db0e<_0x5a91bc[_0xa175('0x27')];_0x63db0e+=0x1){var _0x52f400=this[_0xa175('0x1f')](_0x5a91bc[_0x63db0e][_0xa175('0x28')]);if(_0x52f400){_0x5a91bc[_0x63db0e][_0xa175('0x21')]=_0x52f400[_0xa175('0x21')];_0x5a91bc[_0x63db0e][_0xa175('0x29')]=!![];_0x5a91bc[_0x63db0e]['lastAssignedTo']=_0x52f400['name'];_0x5a91bc[_0x63db0e]['interface']=_[_0xa175('0x22')](_0x52f400['interface'])?util[_0xa175('0x25')](_0xa175('0x26'),_0x52f400[_0xa175('0x23')]):_0x52f400[_0xa175('0x24')];if(_0x5a91bc[_0x63db0e][_0xa175('0x2a')]){_0x5a91bc[_0x63db0e][_0xa175('0x2b')]=moment()[_0xa175('0x25')](_0xa175('0x2c'));}if(_0x5a91bc[_0x63db0e][_0xa175('0x2d')]){_0x5a91bc[_0x63db0e][_0xa175('0x2e')]=moment()[_0xa175('0x25')](_0xa175('0x2c'));}RpcMemberReport[_0xa175('0x14')](_0x5a91bc[_0x63db0e]);}RpcVoiceQueueReport['create'](_0x5a91bc[_0x63db0e]);}};function extractCalleridNumber(_0x167071){var _0x2c673e=_0x167071[_0xa175('0x2f')](/<(.*?)>/);return _0x2c673e?_0x2c673e[0x1]:_0x167071;}Report['prototype'][_0xa175('0x30')]=function(_0x69249d){for(var _0x5ed128=0x0;_0x5ed128/);return _0x2cb91e?_0x2cb91e[0x1]:_0x324434;}Report[_0x1baa('0xf')][_0x1baa('0x2e')]=function(_0x36a531){for(var _0x3eb0ce=0x0;_0x3eb0ce',_0x2ee574['calleridname'],_0x2ee574[_0x1baa('0x3e')]);}if(RpcVoiceTransferReport['transfers'][_0x2ee574[_0x1baa('0x44')]]){var _0x578058=RpcVoiceTransferReport[_0x1baa('0x45')][_0x2ee574[_0x1baa('0x44')]];_0x578058[_0x1baa('0x46')]=_0x2ee574[_0x1baa('0x47')];RpcVoiceTransferReport[_0x1baa('0x1b')](_0x578058);delete RpcVoiceTransferReport[_0x1baa('0x45')][_0x2ee574[_0x1baa('0x44')]];}if(_[_0x1baa('0x21')](_0x2ee574[_0x1baa('0x35')])){_0x2ee574[_0x1baa('0x35')]=this['getCallType'](_0x2ee574);}if(_[_0x1baa('0x21')](_0x2ee574[_0x1baa('0x48')])){var _0x46653b=_0x2ee574[_0x1baa('0x31')]['split']('-')[0x0];var _0xc2c0ba=this[_0x1baa('0xd')][_0x46653b];if(!_0xc2c0ba)_0xc2c0ba=this['getAgentByInternal'](_0x2ee574[_0x1baa('0x1f')]);if(_0xc2c0ba){_0x2ee574[_0x1baa('0x48')]=_0xc2c0ba['id'];_0x2ee574['membername']=_0xc2c0ba[_0x1baa('0x20')];}}RpcVoiceCallReport['create'](_0x2ee574);if(_0x2ee574[_0x1baa('0x49')]){for(var _0x197419=0x0;_0x197419<_0x2ee574['monitors'][_0x1baa('0x26')];_0x197419+=0x1){_0x2ee574[_0x1baa('0x4a')]=_0x2ee574['monitors'][_0x197419][_0x1baa('0x4b')];_0x2ee574['createdAt']=_0x2ee574[_0x1baa('0x4c')][_0x197419]['createdAt'];if(_0x2ee574[_0x1baa('0x34')]=='xcally-motion-preview'){_0x2ee574[_0x1baa('0x3e')]=_0x2ee574['connectedlinenum'];_0x2ee574['calleridname']=_0x2ee574[_0x1baa('0x4d')];_0x2ee574['connectedlinenum']=_0x2ee574[_0x1baa('0x1f')];_0x2ee574['connectedlinename']=_0x2ee574[_0x1baa('0x4e')];_0x2ee574[_0x1baa('0x34')]=_0x2ee574['originatecalleridnum'];}else if(_0x2ee574[_0x1baa('0x34')]=='xcally-motion-dialer'){_0x2ee574[_0x1baa('0x3e')]=_0x2ee574[_0x1baa('0x33')];_0x2ee574[_0x1baa('0x34')]=_0x2ee574[_0x1baa('0x3f')];}RpcVoiceRecording[_0x1baa('0x4f')](_0x2ee574);}}};Report[_0x1baa('0xf')]['voiceAgentReport']=function(_0x43786f){if(_[_0x1baa('0x50')](_0x43786f)){_0x43786f[_0x1baa('0x51')](function(_0xc0384b){RpcVoiceAgentReport[_0x1baa('0x4f')](_0xc0384b);});}else{RpcVoiceAgentReport[_0x1baa('0x4f')](_0x43786f);}};Report[_0x1baa('0xf')][_0x1baa('0x19')]=function(_0xac3f9d){RpcVoiceDialReport['create'](_0xac3f9d);var _0x523174;var _0x161268;var _0x13fd71=_0xac3f9d[_0x1baa('0x31')];if(_[_0x1baa('0x52')](_0x13fd71,'Local')){_0x161268=_0x13fd71[_0x1baa('0x53')](_0x13fd71[_0x1baa('0x54')]('/')+0x1,_0x13fd71[_0x1baa('0x54')]('@'));_0x523174=_[_0x1baa('0x22')](this[_0x1baa('0xd')],function(_0x29f0c8){return _0x29f0c8['mobile']==_0x161268||_0x29f0c8[_0x1baa('0x55')]==_0x161268||_0x29f0c8[_0x1baa('0x1f')]==_0x161268;});}else{_0x161268=_0x13fd71[_0x1baa('0x53')](_0x13fd71[_0x1baa('0x54')]('/')+0x1,_0x13fd71[_0x1baa('0x56')]('-'));_0x523174=this['findAgent'](_0x161268);}if(_0x523174){_0xac3f9d[_0x1baa('0x23')]=_[_0x1baa('0x21')](_0x523174[_0x1baa('0x23')])?util['format'](_0x1baa('0x25'),_0x523174['name']):_0x523174[_0x1baa('0x23')];_0xac3f9d[_0x1baa('0x4e')]=_0x523174[_0x1baa('0x20')];_0xac3f9d['accountcode']=_0x523174['accountcode'];RpcMemberReport['voiceDialReport'](_0xac3f9d);}};Report[_0x1baa('0xf')]['blindTransfer']=function(_0x49cc22){RpcVoiceTransferReport[_0x1baa('0x45')][_0x49cc22[_0x1baa('0x57')]]=_0x49cc22;};Report['prototype'][_0x1baa('0x1d')]=function(_0x50bddc){RpcVoiceTransferReport[_0x1baa('0x1d')](_0x50bddc);};module['exports']=Report; \ No newline at end of file diff --git a/server/services/ami/report/userReport.js b/server/services/ami/report/userReport.js index 8b283a3..bae1358 100644 --- a/server/services/ami/report/userReport.js +++ b/server/services/ami/report/userReport.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x3f8d=['trunks','agents','registryentry','syncRegistry','bind','devicestatechange','syncDeviceState','peerstatus','syncPeerStatus','syncRealtimeShow','resolve','actionSipShowRegistry','error','[userReport][sipshowregistry]','inspect','actionDeviceStateList','catch','[userReport][devicestatelist]','then','actionSipPeerStatus','[userReport][sippeerstatus]','prototype','isNotNull','isUndefined','emit','info','username','state','debug','[userReport][registry]','find','stateRegistry','merge','omit','event','actionid','[userReport][registry]\x20sending\x20trunk:save\x20event:','format','name','trunk:save','[userReport][devicestatechange]\x20device:%s\x20state:%s','device','local','toLowerCase','inuse','stateTime','telephones','toNumber','[userReport][devicestatechange]\x20sending\x20telephone:save\x20event:','telephone:%s','[userReport][devicestatechange]\x20sending\x20trunk:save\x20event:','trunk:%s','startsWith','substring','mobile','phone','accountcode','updateStatusRealtime','[userReport][devicestatechange]','[userReport][peerstatus]\x20peer:%s\x20address:%s\x20status:%s','address','peer','status','[userReport][peerstatus]\x20sending\x20telephone:save\x20event:','telephone:save','[userReport][peerstatus]\x20sending\x20trunk:save\x20event:','exports','lodash','moment','ioredis','bluebird','../../../config/environment','../../../config/logger','ami','../ami','redis','defaults','localhost','socket.io-emitter'];(function(_0xbf9c4,_0x571f42){var _0x102d62=function(_0x3ec0e6){while(--_0x3ec0e6){_0xbf9c4['push'](_0xbf9c4['shift']());}};_0x102d62(++_0x571f42);}(_0x3f8d,0x130));var _0xd3f8=function(_0x1d128e,_0x2c87de){_0x1d128e=_0x1d128e-0x0;var _0x3d5236=_0x3f8d[_0x1d128e];return _0x3d5236;};'use strict';var _=require(_0xd3f8('0x0'));var moment=require(_0xd3f8('0x1'));var util=require('util');var Redis=require(_0xd3f8('0x2'));var BPromise=require(_0xd3f8('0x3'));var config=require(_0xd3f8('0x4'));var logger=require(_0xd3f8('0x5'))(_0xd3f8('0x6'));var ami=require(_0xd3f8('0x7'));config[_0xd3f8('0x8')]=_[_0xd3f8('0x9')](config[_0xd3f8('0x8')],{'host':_0xd3f8('0xa'),'port':0x18eb});var io=require(_0xd3f8('0xb'))(new Redis(config[_0xd3f8('0x8')]));function UserReport(_0x20c694){this[_0xd3f8('0xc')]=_0x20c694[_0xd3f8('0xc')];this[_0xd3f8('0xd')]=_0x20c694['agents'];this['telephones']=_0x20c694['telephones'];ami['on'](_0xd3f8('0xe'),this[_0xd3f8('0xf')][_0xd3f8('0x10')](this));ami['on']('registry',this[_0xd3f8('0xf')][_0xd3f8('0x10')](this));ami['on'](_0xd3f8('0x11'),this[_0xd3f8('0x12')][_0xd3f8('0x10')](this));ami['on'](_0xd3f8('0x13'),this[_0xd3f8('0x14')][_0xd3f8('0x10')](this));return this[_0xd3f8('0x15')]();}function showSipRegistrations(){Promise[_0xd3f8('0x16')]()['then'](ami[_0xd3f8('0x17')]())['catch'](function(_0x4dcf0d){logger[_0xd3f8('0x18')](_0xd3f8('0x19'),util[_0xd3f8('0x1a')](_0x4dcf0d,{'showHidden':![],'depth':null}));});}function listDeviceStates(){Promise['resolve']()['then'](ami[_0xd3f8('0x1b')]())[_0xd3f8('0x1c')](function(_0x589bd2){logger[_0xd3f8('0x18')](_0xd3f8('0x1d'),util[_0xd3f8('0x1a')](_0x589bd2,{'showHidden':![],'depth':null}));});}function showPeersStatus(){Promise[_0xd3f8('0x16')]()[_0xd3f8('0x1e')](ami[_0xd3f8('0x1f')]())[_0xd3f8('0x1c')](function(_0x35e212){logger[_0xd3f8('0x18')](_0xd3f8('0x20'),util[_0xd3f8('0x1a')](_0x35e212,{'showHidden':![],'depth':null}));});}UserReport['prototype'][_0xd3f8('0x15')]=function(){setInterval(function(){BPromise[_0xd3f8('0x16')]()[_0xd3f8('0x1e')](showSipRegistrations())[_0xd3f8('0x1e')](listDeviceStates())[_0xd3f8('0x1e')](showPeersStatus());},0x32c8);};UserReport[_0xd3f8('0x21')][_0xd3f8('0x22')]=function(_0x267128){return _0x267128!==null&&!_[_0xd3f8('0x23')](_0x267128);};UserReport[_0xd3f8('0x21')][_0xd3f8('0x24')]=function(_0x52d298,_0x1d0fbd,_0x5564cb){io['to'](_0x52d298)[_0xd3f8('0x24')](_0x1d0fbd,_0x5564cb);};UserReport['prototype'][_0xd3f8('0xf')]=function(_0x49a27b){try{if(this[_0xd3f8('0x22')](_0x49a27b)){logger[_0xd3f8('0x25')]('[userReport][registry]\x20registry:%s\x20state:%s',_0x49a27b[_0xd3f8('0x26')],_0x49a27b[_0xd3f8('0x27')]);logger[_0xd3f8('0x28')](_0xd3f8('0x29'),util[_0xd3f8('0x1a')](_0x49a27b,{'showHidden':![],'depth':null}));var _0x45c5d0=_[_0xd3f8('0x2a')](this[_0xd3f8('0xc')],{'defaultuser':_0x49a27b['username']});if(_0x45c5d0){_0x49a27b[_0xd3f8('0x2b')]=_0x49a27b[_0xd3f8('0x27')];_[_0xd3f8('0x2c')](_0x45c5d0,_[_0xd3f8('0x2d')](_0x49a27b,[_0xd3f8('0x2e'),_0xd3f8('0x2f'),_0xd3f8('0x26'),_0xd3f8('0x27')]));logger[_0xd3f8('0x28')](_0xd3f8('0x30'),util[_0xd3f8('0x1a')](_0x45c5d0,{'showHidden':![],'depth':null}));this[_0xd3f8('0x24')](util[_0xd3f8('0x31')]('trunk:%s',_0x45c5d0[_0xd3f8('0x32')]),_0xd3f8('0x33'),_0x45c5d0);}}}catch(_0xd985c1){logger[_0xd3f8('0x18')](_0xd3f8('0x29'),util[_0xd3f8('0x1a')](_0xd985c1,{'showHidden':![],'depth':null}));}};UserReport[_0xd3f8('0x21')][_0xd3f8('0x12')]=function(_0x260d4e){try{if(this['isNotNull'](_0x260d4e)){logger['info'](_0xd3f8('0x34'),_0x260d4e['device'],_0x260d4e[_0xd3f8('0x27')]);logger['debug']('[userReport][devicestatechange]',util[_0xd3f8('0x1a')](_0x260d4e,{'showHidden':![],'depth':null}));if(this[_0xd3f8('0xd')][_0x260d4e[_0xd3f8('0x35')]]){if(!this[_0xd3f8('0xd')][_0x260d4e[_0xd3f8('0x35')]][_0xd3f8('0x36')]||_0x260d4e[_0xd3f8('0x27')][_0xd3f8('0x37')]()==_0xd3f8('0x38')){this[_0xd3f8('0xd')][_0x260d4e[_0xd3f8('0x35')]][_0xd3f8('0x36')]=![];if(this['agents'][_0x260d4e[_0xd3f8('0x35')]][_0xd3f8('0x27')]!==_0x260d4e['state']['toLowerCase']()){this['agents'][_0x260d4e['device']][_0xd3f8('0x39')]=_['toNumber'](moment()[_0xd3f8('0x31')]('x'));}this[_0xd3f8('0xd')][_0x260d4e[_0xd3f8('0x35')]][_0xd3f8('0x27')]=_0x260d4e[_0xd3f8('0x27')][_0xd3f8('0x37')]();this[_0xd3f8('0xd')][_0x260d4e[_0xd3f8('0x35')]]['updateStatusRealtime'](_0x260d4e);}}else if(this[_0xd3f8('0x3a')][_0x260d4e[_0xd3f8('0x35')]]){if(this[_0xd3f8('0x3a')][_0x260d4e[_0xd3f8('0x35')]][_0xd3f8('0x27')]!==_0x260d4e[_0xd3f8('0x27')][_0xd3f8('0x37')]()){this['telephones'][_0x260d4e[_0xd3f8('0x35')]]['stateTime']=_[_0xd3f8('0x3b')](moment()[_0xd3f8('0x31')]('x'));}this[_0xd3f8('0x3a')][_0x260d4e[_0xd3f8('0x35')]]['state']=_0x260d4e[_0xd3f8('0x27')][_0xd3f8('0x37')]();logger[_0xd3f8('0x28')](_0xd3f8('0x3c'),util[_0xd3f8('0x1a')](this[_0xd3f8('0x3a')][_0x260d4e[_0xd3f8('0x35')]],{'showHidden':![],'depth':null}));this['emit'](util[_0xd3f8('0x31')](_0xd3f8('0x3d'),this[_0xd3f8('0x3a')][_0x260d4e[_0xd3f8('0x35')]][_0xd3f8('0x32')]),'telephone:save',this['telephones'][_0x260d4e[_0xd3f8('0x35')]]);}else if(this[_0xd3f8('0xc')][_0x260d4e['device']]){if(this[_0xd3f8('0xc')][_0x260d4e[_0xd3f8('0x35')]][_0xd3f8('0x27')]!==_0x260d4e[_0xd3f8('0x27')][_0xd3f8('0x37')]()){this[_0xd3f8('0xc')][_0x260d4e['device']]['stateTime']=_[_0xd3f8('0x3b')](moment()[_0xd3f8('0x31')]('x'));}this[_0xd3f8('0xc')][_0x260d4e[_0xd3f8('0x35')]][_0xd3f8('0x27')]=_0x260d4e[_0xd3f8('0x27')][_0xd3f8('0x37')]();logger[_0xd3f8('0x28')](_0xd3f8('0x3e'),util['inspect'](this[_0xd3f8('0xc')][_0x260d4e[_0xd3f8('0x35')]],{'showHidden':![],'depth':null}));this[_0xd3f8('0x24')](util[_0xd3f8('0x31')](_0xd3f8('0x3f'),this[_0xd3f8('0xc')][_0x260d4e['device']][_0xd3f8('0x32')]),_0xd3f8('0x33'),this[_0xd3f8('0xc')][_0x260d4e[_0xd3f8('0x35')]]);}else if(_[_0xd3f8('0x40')](_0x260d4e[_0xd3f8('0x35')],'Local')){var _0x30ea93=_0x260d4e[_0xd3f8('0x35')];var _0x2e7446=_0x30ea93[_0xd3f8('0x41')](_0x30ea93['indexOf']('/')+0x1,_0x30ea93['indexOf']('@'));var _0x24768f=_[_0xd3f8('0x2a')](this['agents'],function(_0x5c993e){return _0x5c993e[_0xd3f8('0x42')]==_0x2e7446||_0x5c993e[_0xd3f8('0x43')]==_0x2e7446||_0x5c993e[_0xd3f8('0x44')]==_0x2e7446;});if(_0x24768f){if(_0x24768f[_0xd3f8('0x27')]!==_0x260d4e[_0xd3f8('0x27')]['toLowerCase']()){_0x24768f[_0xd3f8('0x39')]=_['toNumber'](moment()['format']('x'));}_0x24768f[_0xd3f8('0x27')]=_0x260d4e['state'][_0xd3f8('0x37')]();_0x24768f[_0xd3f8('0x36')]=!![];_0x24768f[_0xd3f8('0x45')](_0x260d4e);}}}}catch(_0x3b5284){logger[_0xd3f8('0x18')](_0xd3f8('0x46'),util['inspect'](_0x3b5284,{'showHidden':![],'depth':null}));}};UserReport[_0xd3f8('0x21')]['syncPeerStatus']=function(_0x212683){try{if(this[_0xd3f8('0x22')](_0x212683)&&this[_0xd3f8('0x22')](_0x212683[_0xd3f8('0x13')])){logger[_0xd3f8('0x25')](_0xd3f8('0x47'),_0x212683['peer'],_0x212683[_0xd3f8('0x48')],_0x212683[_0xd3f8('0x13')]);logger[_0xd3f8('0x28')]('[userReport][peerstatus]',util[_0xd3f8('0x1a')](_0x212683,{'showHidden':![],'depth':null}));if(this[_0xd3f8('0xd')][_0x212683[_0xd3f8('0x49')]]){if(!this[_0xd3f8('0xd')][_0x212683[_0xd3f8('0x49')]]['local']||_0x212683[_0xd3f8('0x13')][_0xd3f8('0x37')]()=='registered'){this[_0xd3f8('0xd')][_0x212683[_0xd3f8('0x49')]]['local']=![];this[_0xd3f8('0xd')][_0x212683['peer']]['status']=_0x212683[_0xd3f8('0x13')][_0xd3f8('0x37')]();this[_0xd3f8('0xd')][_0x212683[_0xd3f8('0x49')]][_0xd3f8('0x48')]=_0x212683[_0xd3f8('0x48')];this[_0xd3f8('0xd')][_0x212683[_0xd3f8('0x49')]]['updateStatusRealtime'](_0x212683);}}else if(this[_0xd3f8('0x3a')][_0x212683['peer']]){this[_0xd3f8('0x3a')][_0x212683[_0xd3f8('0x49')]][_0xd3f8('0x4a')]=_0x212683[_0xd3f8('0x13')][_0xd3f8('0x37')]();this[_0xd3f8('0x3a')][_0x212683[_0xd3f8('0x49')]][_0xd3f8('0x48')]=_0x212683['address'];logger['debug'](_0xd3f8('0x4b'),util[_0xd3f8('0x1a')](this[_0xd3f8('0x3a')][_0x212683['peer']],{'showHidden':![],'depth':null}));this[_0xd3f8('0x24')](util[_0xd3f8('0x31')]('telephone:%s',this[_0xd3f8('0x3a')][_0x212683['peer']][_0xd3f8('0x32')]),_0xd3f8('0x4c'),this[_0xd3f8('0x3a')][_0x212683['peer']]);}else if(this[_0xd3f8('0xc')][_0x212683[_0xd3f8('0x49')]]){this[_0xd3f8('0xc')][_0x212683[_0xd3f8('0x49')]][_0xd3f8('0x4a')]=_0x212683['peerstatus'][_0xd3f8('0x37')]();this['trunks'][_0x212683[_0xd3f8('0x49')]]['address']=_0x212683[_0xd3f8('0x48')];logger[_0xd3f8('0x28')](_0xd3f8('0x4d'),util[_0xd3f8('0x1a')](this['trunks'][_0x212683[_0xd3f8('0x49')]],{'showHidden':![],'depth':null}));this[_0xd3f8('0x24')](util['format'](_0xd3f8('0x3f'),this['trunks'][_0x212683['peer']]['name']),'trunk:save',this[_0xd3f8('0xc')][_0x212683[_0xd3f8('0x49')]]);}}}catch(_0x347578){logger[_0xd3f8('0x18')]('[userReport][peerstatus]',util[_0xd3f8('0x1a')](_0x347578,{'showHidden':![],'depth':null}));}};module[_0xd3f8('0x4e')]=UserReport; \ No newline at end of file +var _0xd330=['debug','[userReport][registry]','stateRegistry','merge','omit','event','actionid','[userReport][registry]\x20sending\x20trunk:save\x20event:','format','name','trunk:save','[userReport][devicestatechange]\x20device:%s\x20state:%s','device','[userReport][devicestatechange]','local','toLowerCase','toNumber','updateStatusRealtime','stateTime','telephone:%s','[userReport][devicestatechange]\x20sending\x20trunk:save\x20event:','trunk:%s','Local','substring','indexOf','find','mobile','phone','accountcode','syncPeerStatus','[userReport][peerstatus]\x20peer:%s\x20address:%s\x20status:%s','peer','address','[userReport][peerstatus]','status','[userReport][peerstatus]\x20sending\x20telephone:save\x20event:','telephone:save','[userReport][peerstatus]\x20sending\x20trunk:save\x20event:','exports','lodash','moment','ioredis','../../../config/environment','ami','../ami','redis','defaults','localhost','socket.io-emitter','trunks','agents','telephones','registryentry','syncRegistry','bind','devicestatechange','syncDeviceState','peerstatus','syncRealtimeShow','then','actionSipShowRegistry','catch','[userReport][sipshowregistry]','inspect','actionDeviceStateList','error','[userReport][devicestatelist]','actionSipPeerStatus','[userReport][sippeerstatus]','prototype','resolve','isNotNull','isUndefined','emit','info','[userReport][registry]\x20registry:%s\x20state:%s','username','state'];(function(_0x3c4f01,_0x1102ed){var _0x3b1752=function(_0x3fd967){while(--_0x3fd967){_0x3c4f01['push'](_0x3c4f01['shift']());}};_0x3b1752(++_0x1102ed);}(_0xd330,0x1ad));var _0x0d33=function(_0x5149c9,_0x5e7788){_0x5149c9=_0x5149c9-0x0;var _0x4d50e9=_0xd330[_0x5149c9];return _0x4d50e9;};'use strict';var _=require(_0x0d33('0x0'));var moment=require(_0x0d33('0x1'));var util=require('util');var Redis=require(_0x0d33('0x2'));var BPromise=require('bluebird');var config=require(_0x0d33('0x3'));var logger=require('../../../config/logger')(_0x0d33('0x4'));var ami=require(_0x0d33('0x5'));config[_0x0d33('0x6')]=_[_0x0d33('0x7')](config['redis'],{'host':_0x0d33('0x8'),'port':0x18eb});var io=require(_0x0d33('0x9'))(new Redis(config['redis']));function UserReport(_0x3826ff){this['trunks']=_0x3826ff[_0x0d33('0xa')];this[_0x0d33('0xb')]=_0x3826ff[_0x0d33('0xb')];this[_0x0d33('0xc')]=_0x3826ff[_0x0d33('0xc')];ami['on'](_0x0d33('0xd'),this[_0x0d33('0xe')][_0x0d33('0xf')](this));ami['on']('registry',this[_0x0d33('0xe')][_0x0d33('0xf')](this));ami['on'](_0x0d33('0x10'),this[_0x0d33('0x11')]['bind'](this));ami['on'](_0x0d33('0x12'),this['syncPeerStatus']['bind'](this));return this[_0x0d33('0x13')]();}function showSipRegistrations(){Promise['resolve']()[_0x0d33('0x14')](ami[_0x0d33('0x15')]())[_0x0d33('0x16')](function(_0x2f0c8a){logger['error'](_0x0d33('0x17'),util[_0x0d33('0x18')](_0x2f0c8a,{'showHidden':![],'depth':null}));});}function listDeviceStates(){Promise['resolve']()[_0x0d33('0x14')](ami[_0x0d33('0x19')]())['catch'](function(_0x4c5469){logger[_0x0d33('0x1a')](_0x0d33('0x1b'),util[_0x0d33('0x18')](_0x4c5469,{'showHidden':![],'depth':null}));});}function showPeersStatus(){Promise['resolve']()[_0x0d33('0x14')](ami[_0x0d33('0x1c')]())['catch'](function(_0x1adb55){logger[_0x0d33('0x1a')](_0x0d33('0x1d'),util['inspect'](_0x1adb55,{'showHidden':![],'depth':null}));});}UserReport[_0x0d33('0x1e')][_0x0d33('0x13')]=function(){setInterval(function(){BPromise[_0x0d33('0x1f')]()[_0x0d33('0x14')](showSipRegistrations())[_0x0d33('0x14')](listDeviceStates())['then'](showPeersStatus());},0x32c8);};UserReport[_0x0d33('0x1e')][_0x0d33('0x20')]=function(_0x47a555){return _0x47a555!==null&&!_[_0x0d33('0x21')](_0x47a555);};UserReport[_0x0d33('0x1e')][_0x0d33('0x22')]=function(_0x25577c,_0x56f47c,_0x4c05d4){io['to'](_0x25577c)[_0x0d33('0x22')](_0x56f47c,_0x4c05d4);};UserReport['prototype']['syncRegistry']=function(_0x4cf076){try{if(this[_0x0d33('0x20')](_0x4cf076)){logger[_0x0d33('0x23')](_0x0d33('0x24'),_0x4cf076[_0x0d33('0x25')],_0x4cf076[_0x0d33('0x26')]);logger[_0x0d33('0x27')](_0x0d33('0x28'),util[_0x0d33('0x18')](_0x4cf076,{'showHidden':![],'depth':null}));var _0x260341=_['find'](this[_0x0d33('0xa')],{'defaultuser':_0x4cf076['username']});if(_0x260341){_0x4cf076[_0x0d33('0x29')]=_0x4cf076[_0x0d33('0x26')];_[_0x0d33('0x2a')](_0x260341,_[_0x0d33('0x2b')](_0x4cf076,[_0x0d33('0x2c'),_0x0d33('0x2d'),_0x0d33('0x25'),_0x0d33('0x26')]));logger['debug'](_0x0d33('0x2e'),util['inspect'](_0x260341,{'showHidden':![],'depth':null}));this[_0x0d33('0x22')](util[_0x0d33('0x2f')]('trunk:%s',_0x260341[_0x0d33('0x30')]),_0x0d33('0x31'),_0x260341);}}}catch(_0x348a94){logger['error'](_0x0d33('0x28'),util[_0x0d33('0x18')](_0x348a94,{'showHidden':![],'depth':null}));}};UserReport[_0x0d33('0x1e')][_0x0d33('0x11')]=function(_0x86ac13){try{if(this['isNotNull'](_0x86ac13)){logger['info'](_0x0d33('0x32'),_0x86ac13[_0x0d33('0x33')],_0x86ac13[_0x0d33('0x26')]);logger[_0x0d33('0x27')](_0x0d33('0x34'),util[_0x0d33('0x18')](_0x86ac13,{'showHidden':![],'depth':null}));if(this[_0x0d33('0xb')][_0x86ac13['device']]){if(!this[_0x0d33('0xb')][_0x86ac13[_0x0d33('0x33')]][_0x0d33('0x35')]||_0x86ac13['state'][_0x0d33('0x36')]()=='inuse'){this[_0x0d33('0xb')][_0x86ac13[_0x0d33('0x33')]][_0x0d33('0x35')]=![];if(this[_0x0d33('0xb')][_0x86ac13[_0x0d33('0x33')]][_0x0d33('0x26')]!==_0x86ac13[_0x0d33('0x26')][_0x0d33('0x36')]()){this['agents'][_0x86ac13['device']]['stateTime']=_[_0x0d33('0x37')](moment()[_0x0d33('0x2f')]('x'));}this[_0x0d33('0xb')][_0x86ac13['device']][_0x0d33('0x26')]=_0x86ac13[_0x0d33('0x26')][_0x0d33('0x36')]();this[_0x0d33('0xb')][_0x86ac13[_0x0d33('0x33')]][_0x0d33('0x38')](_0x86ac13);}}else if(this[_0x0d33('0xc')][_0x86ac13['device']]){if(this[_0x0d33('0xc')][_0x86ac13['device']]['state']!==_0x86ac13[_0x0d33('0x26')]['toLowerCase']()){this[_0x0d33('0xc')][_0x86ac13[_0x0d33('0x33')]][_0x0d33('0x39')]=_[_0x0d33('0x37')](moment()[_0x0d33('0x2f')]('x'));}this['telephones'][_0x86ac13['device']][_0x0d33('0x26')]=_0x86ac13[_0x0d33('0x26')][_0x0d33('0x36')]();logger['debug']('[userReport][devicestatechange]\x20sending\x20telephone:save\x20event:',util[_0x0d33('0x18')](this[_0x0d33('0xc')][_0x86ac13[_0x0d33('0x33')]],{'showHidden':![],'depth':null}));this[_0x0d33('0x22')](util[_0x0d33('0x2f')](_0x0d33('0x3a'),this[_0x0d33('0xc')][_0x86ac13[_0x0d33('0x33')]]['name']),'telephone:save',this[_0x0d33('0xc')][_0x86ac13['device']]);}else if(this['trunks'][_0x86ac13[_0x0d33('0x33')]]){if(this[_0x0d33('0xa')][_0x86ac13['device']][_0x0d33('0x26')]!==_0x86ac13[_0x0d33('0x26')][_0x0d33('0x36')]()){this[_0x0d33('0xa')][_0x86ac13[_0x0d33('0x33')]][_0x0d33('0x39')]=_[_0x0d33('0x37')](moment()['format']('x'));}this[_0x0d33('0xa')][_0x86ac13[_0x0d33('0x33')]][_0x0d33('0x26')]=_0x86ac13[_0x0d33('0x26')][_0x0d33('0x36')]();logger[_0x0d33('0x27')](_0x0d33('0x3b'),util[_0x0d33('0x18')](this[_0x0d33('0xa')][_0x86ac13[_0x0d33('0x33')]],{'showHidden':![],'depth':null}));this['emit'](util[_0x0d33('0x2f')](_0x0d33('0x3c'),this['trunks'][_0x86ac13[_0x0d33('0x33')]][_0x0d33('0x30')]),_0x0d33('0x31'),this[_0x0d33('0xa')][_0x86ac13['device']]);}else if(_['startsWith'](_0x86ac13[_0x0d33('0x33')],_0x0d33('0x3d'))){var _0x1adb60=_0x86ac13[_0x0d33('0x33')];var _0x55503c=_0x1adb60[_0x0d33('0x3e')](_0x1adb60[_0x0d33('0x3f')]('/')+0x1,_0x1adb60[_0x0d33('0x3f')]('@'));var _0x2c5846=_[_0x0d33('0x40')](this[_0x0d33('0xb')],function(_0x2a0078){return _0x2a0078[_0x0d33('0x41')]==_0x55503c||_0x2a0078[_0x0d33('0x42')]==_0x55503c||_0x2a0078[_0x0d33('0x43')]==_0x55503c;});if(_0x2c5846){if(_0x2c5846[_0x0d33('0x26')]!==_0x86ac13['state'][_0x0d33('0x36')]()){_0x2c5846['stateTime']=_[_0x0d33('0x37')](moment()[_0x0d33('0x2f')]('x'));}_0x2c5846[_0x0d33('0x26')]=_0x86ac13[_0x0d33('0x26')][_0x0d33('0x36')]();_0x2c5846['local']=!![];_0x2c5846['updateStatusRealtime'](_0x86ac13);}}}}catch(_0x16b87d){logger[_0x0d33('0x1a')](_0x0d33('0x34'),util[_0x0d33('0x18')](_0x16b87d,{'showHidden':![],'depth':null}));}};UserReport[_0x0d33('0x1e')][_0x0d33('0x44')]=function(_0xfb9f5b){try{if(this['isNotNull'](_0xfb9f5b)&&this[_0x0d33('0x20')](_0xfb9f5b[_0x0d33('0x12')])){logger[_0x0d33('0x23')](_0x0d33('0x45'),_0xfb9f5b[_0x0d33('0x46')],_0xfb9f5b[_0x0d33('0x47')],_0xfb9f5b[_0x0d33('0x12')]);logger['debug'](_0x0d33('0x48'),util[_0x0d33('0x18')](_0xfb9f5b,{'showHidden':![],'depth':null}));if(this[_0x0d33('0xb')][_0xfb9f5b[_0x0d33('0x46')]]){if(!this[_0x0d33('0xb')][_0xfb9f5b[_0x0d33('0x46')]]['local']||_0xfb9f5b[_0x0d33('0x12')]['toLowerCase']()=='registered'){this[_0x0d33('0xb')][_0xfb9f5b[_0x0d33('0x46')]][_0x0d33('0x35')]=![];this[_0x0d33('0xb')][_0xfb9f5b['peer']][_0x0d33('0x49')]=_0xfb9f5b[_0x0d33('0x12')]['toLowerCase']();this[_0x0d33('0xb')][_0xfb9f5b[_0x0d33('0x46')]][_0x0d33('0x47')]=_0xfb9f5b[_0x0d33('0x47')];this['agents'][_0xfb9f5b[_0x0d33('0x46')]][_0x0d33('0x38')](_0xfb9f5b);}}else if(this['telephones'][_0xfb9f5b['peer']]){this[_0x0d33('0xc')][_0xfb9f5b[_0x0d33('0x46')]][_0x0d33('0x49')]=_0xfb9f5b['peerstatus'][_0x0d33('0x36')]();this['telephones'][_0xfb9f5b[_0x0d33('0x46')]][_0x0d33('0x47')]=_0xfb9f5b['address'];logger[_0x0d33('0x27')](_0x0d33('0x4a'),util['inspect'](this[_0x0d33('0xc')][_0xfb9f5b[_0x0d33('0x46')]],{'showHidden':![],'depth':null}));this[_0x0d33('0x22')](util[_0x0d33('0x2f')](_0x0d33('0x3a'),this[_0x0d33('0xc')][_0xfb9f5b[_0x0d33('0x46')]]['name']),_0x0d33('0x4b'),this[_0x0d33('0xc')][_0xfb9f5b[_0x0d33('0x46')]]);}else if(this[_0x0d33('0xa')][_0xfb9f5b[_0x0d33('0x46')]]){this[_0x0d33('0xa')][_0xfb9f5b['peer']][_0x0d33('0x49')]=_0xfb9f5b['peerstatus'][_0x0d33('0x36')]();this[_0x0d33('0xa')][_0xfb9f5b['peer']][_0x0d33('0x47')]=_0xfb9f5b[_0x0d33('0x47')];logger[_0x0d33('0x27')](_0x0d33('0x4c'),util[_0x0d33('0x18')](this[_0x0d33('0xa')][_0xfb9f5b['peer']],{'showHidden':![],'depth':null}));this[_0x0d33('0x22')](util[_0x0d33('0x2f')]('trunk:%s',this['trunks'][_0xfb9f5b['peer']][_0x0d33('0x30')]),'trunk:save',this[_0x0d33('0xa')][_0xfb9f5b['peer']]);}}}catch(_0x2c64a6){logger[_0x0d33('0x1a')](_0x0d33('0x48'),util['inspect'](_0x2c64a6,{'showHidden':![],'depth':null}));}};module[_0x0d33('0x4d')]=UserReport; \ No newline at end of file diff --git a/server/services/ami/report/voiceAgentReport.js b/server/services/ami/report/voiceAgentReport.js index ea824f5..216d5a1 100644 --- a/server/services/ami/report/voiceAgentReport.js +++ b/server/services/ami/report/voiceAgentReport.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x65dc=['acw','acwtime','acwTimeout','agentacw','destconnectedlinenum','[%s][voiceAgentReport][agentcomplete]\x20sending\x20agentcomplete\x20event:','custom:agentcomplete','[%s][voiceAgentReport][agentcomplete]\x20sending\x20user:agentcomplete\x20event:','destaccountcode','[%s][voiceAgentReport][agentcomplete]','[%s][voiceAgentReport][varset]\x20event:','keys','variable','value','[%s][voiceAgentReport][varset]\x20destuniqueid:%s\x20variable:%s\x20value:%s','[%s][voiceAgentReport][varset]','addVariable','rtpaudioqos','rtpaudioqosbridged','rtpaudioqosloss','rtpaudioqosrtt','rtpaudioqosrttbridged','bridgepeer','membercalls','memberinterface','memberlastcall','memberpenalty','memberrealtime','isNil','agentcompleteAt','[%s][voiceAgentReport][hangup]\x20sending\x20voiceAgentReport\x20event:','values','[%s][voiceAgentReport][attendedtransfer]\x20event:','transfereeuniqueid','origtransfereruniqueid','diff','secondtransfereruniqueid','[%s][voiceAgentReport][attendedtransfer]','[%s][voiceAgentReport][blindtransfer]\x20event:','seconds','[%s][voiceAgentReport][blindtransfer]','[%s][voiceAgentReport][musiconholdstart]\x20event:','channel','[%s][voiceAgentReport][musiconholdstart]\x20interface:%s','onhold','[%s][voiceAgentReport][musiconholdstop]\x20event:','lastIndexOf','[%s][voiceAgentReport][musiconholdstop]\x20interface:%s','[%s][voiceAgentReport][musiconholdstop]','lodash','moment','util','../../../config/environment','../ami','redis','localhost','socket.io-emitter','channels','voiceQueues','agents','syncAgentConnect','bind','agentringnoanswer','syncAgentRingNoAnswer','queuecallerabandon','syncQueueCallerAbandon','agentcomplete','syncAgentComplete','hangup','syncHangup','musiconholdstart','syncMusicOnHoldStart','musiconholdstop','syncMusicOnHoldStop','syncAttendedTransfer','syncBlindTransfer','prototype','emit','isNotNull','isUndefined','syncAgentCalled','info','[%s][voiceAgentReport][agentcalled]\x20agent:%s\x20destuniqueid:%s\x20lastevent:called','membername','destuniqueid','debug','[%s][voiceAgentReport][agentcalled]\x20event:','uniqueid','inspect','interface','variables','format','YYYY-MM-DD\x20HH:mm:ss','called','mandatoryDisposition','assign','event','privilege','[%s][voiceAgentReport][agentcalled]\x20sending\x20agentcalled\x20event:','custom:agentcalled','calleridnum','[%s][voiceAgentReport][agentcalled]\x20sending\x20user:called\x20event:','user:%s','error','[%s][voiceAgentReport][agentcalled]','hasOwnProperty','[%s][voiceAgentReport][agentconnect]\x20agent:%s\x20destuniqueid:%s\x20lastevent:connect','agentconnectAt','connectedlinename','connectedlinenum','destchannelstate','destchannelstatedesc','holdtime','lastevent','voiceChannels','routealias','pick','queue','name','exten','custom:agentconnect','user:agentconnect','[%s][voiceAgentReport][agentconnect]\x20agent:%s\x20destuniqueid:%s\x20lastevent:answered_elsewhere','agentringnoanswerAt','answeredelsewheredestinationuniqueid','answeredelsewheremembername','answered_elsewhere','[%s][voiceAgentReport][agentconnect]\x20sending\x20agentansweredelsewhere\x20event:','custom:agentansweredelsewhere','[%s][voiceAgentReport][agentconnect]','[%s][voiceAgentReport][agentringnoanswer]\x20event:','rejected','reason','user:agentringnoanswer','abandoned','[%s][voiceAgentReport][queuecallerabandon]\x20sending\x20agentqueuecallerabandon\x20event:','custom:agentqueuecallerabandon','[%s][voiceAgentReport][queuecallerabandon]','[%s][voiceAgentReport][agentcomplete]\x20event:','complete','transfer','agent','talktime'];(function(_0x1ed053,_0x52418f){var _0xa90de3=function(_0x389ebd){while(--_0x389ebd){_0x1ed053['push'](_0x1ed053['shift']());}};_0xa90de3(++_0x52418f);}(_0x65dc,0xc0));var _0xc65d=function(_0x6c9b2c,_0x2e1e98){_0x6c9b2c=_0x6c9b2c-0x0;var _0x2dbb9c=_0x65dc[_0x6c9b2c];return _0x2dbb9c;};'use strict';var _=require(_0xc65d('0x0'));var moment=require(_0xc65d('0x1'));var util=require(_0xc65d('0x2'));var Redis=require('ioredis');var config=require(_0xc65d('0x3'));var logger=require('../../../config/logger')('ami');var ami=require(_0xc65d('0x4'));config[_0xc65d('0x5')]=_['defaults'](config['redis'],{'host':_0xc65d('0x6'),'port':0x18eb});var io=require(_0xc65d('0x7'))(new Redis(config['redis']));function VoiceAgentReport(_0x43569e){this[_0xc65d('0x8')]={};this['voiceChannels']=_0x43569e['channels'];this[_0xc65d('0x9')]=_0x43569e[_0xc65d('0x9')];this[_0xc65d('0xa')]=_0x43569e[_0xc65d('0xa')];this['variables']={};ami['on']('agentcalled',this['syncAgentCalled']['bind'](this));ami['on']('agentconnect',this[_0xc65d('0xb')][_0xc65d('0xc')](this));ami['on'](_0xc65d('0xd'),this[_0xc65d('0xe')]['bind'](this));ami['on'](_0xc65d('0xf'),this[_0xc65d('0x10')][_0xc65d('0xc')](this));ami['on'](_0xc65d('0x11'),this[_0xc65d('0x12')][_0xc65d('0xc')](this));ami['on']('varset',this['syncVarSet'][_0xc65d('0xc')](this));ami['on'](_0xc65d('0x13'),this[_0xc65d('0x14')][_0xc65d('0xc')](this));ami['on'](_0xc65d('0x15'),this[_0xc65d('0x16')][_0xc65d('0xc')](this));ami['on'](_0xc65d('0x17'),this[_0xc65d('0x18')][_0xc65d('0xc')](this));ami['on']('attendedtransfer',this[_0xc65d('0x19')][_0xc65d('0xc')](this));ami['on']('blindtransfer',this[_0xc65d('0x1a')][_0xc65d('0xc')](this));}VoiceAgentReport[_0xc65d('0x1b')][_0xc65d('0x1c')]=function(_0xb02b21,_0x3e9b08,_0x2562ff){io['to'](_0xb02b21)[_0xc65d('0x1c')](_0x3e9b08,_0x2562ff);};VoiceAgentReport[_0xc65d('0x1b')][_0xc65d('0x1d')]=function(_0x2f1839){return _0x2f1839!==null&&!_[_0xc65d('0x1e')](_0x2f1839);};VoiceAgentReport['prototype'][_0xc65d('0x1f')]=function(_0x31cf24){try{if(this[_0xc65d('0x1d')](_0x31cf24)){logger[_0xc65d('0x20')](_0xc65d('0x21'),_0x31cf24['uniqueid'],_0x31cf24[_0xc65d('0x22')],_0x31cf24[_0xc65d('0x23')]);logger[_0xc65d('0x24')](_0xc65d('0x25'),_0x31cf24[_0xc65d('0x26')],util[_0xc65d('0x27')](_0x31cf24,{'showHidden':![],'depth':null}));if(_[_0xc65d('0x1e')](this['channels'][_0x31cf24[_0xc65d('0x26')]])){this[_0xc65d('0x8')][_0x31cf24[_0xc65d('0x26')]]={};}var _0x502d33=this[_0xc65d('0xa')][_0x31cf24[_0xc65d('0x28')]];var _0x5ede2a=this[_0xc65d('0x8')][_0x31cf24[_0xc65d('0x26')]][_0x31cf24[_0xc65d('0x23')]];var _0x1ecd90=this['voiceQueues'][_0x31cf24['queue']];var _0x4e6ad4=this[_0xc65d('0x29')][_0x31cf24[_0xc65d('0x26')]];if(_[_0xc65d('0x1e')](_0x5ede2a)){_0x5ede2a={'agentcalledAt':moment()[_0xc65d('0x2a')](_0xc65d('0x2b')),'lastevent':_0xc65d('0x2c'),'mandatoryDisposition':_0x1ecd90&&_0x1ecd90[_0xc65d('0x2d')]?_0x1ecd90['mandatoryDisposition']:![],'type':_0x1ecd90&&_0x1ecd90['type']?_0x1ecd90['type']:'inbound','variables':_0x4e6ad4,'motionChannel':'voice'};}Object[_0xc65d('0x2e')](_0x5ede2a,_['omit'](_0x31cf24,[_0xc65d('0x2f'),_0xc65d('0x30')]));this['channels'][_0x31cf24[_0xc65d('0x26')]][_0x31cf24[_0xc65d('0x23')]]=_0x5ede2a;logger[_0xc65d('0x24')](_0xc65d('0x31'),_0x31cf24['uniqueid'],util[_0xc65d('0x27')](_0x5ede2a,{'showHidden':![],'depth':null}));ami['emit'](_0xc65d('0x32'),_0x5ede2a);var _0x57b51e={'id':_0x502d33['id'],'calleridnum':_0x5ede2a[_0xc65d('0x33')],'queue':_0x5ede2a['queue'],'variables':_0x5ede2a[_0xc65d('0x29')],'uniqueid':_0x31cf24[_0xc65d('0x26')]};logger['debug'](_0xc65d('0x34'),_0x31cf24[_0xc65d('0x26')],util['inspect'](_0x57b51e,{'showHidden':![],'depth':null}));this[_0xc65d('0x1c')](util[_0xc65d('0x2a')](_0xc65d('0x35'),_0x31cf24[_0xc65d('0x22')]),'user:called',_0x57b51e);}}catch(_0x41740e){logger[_0xc65d('0x36')](_0xc65d('0x37'),_0x31cf24[_0xc65d('0x26')],util[_0xc65d('0x27')](_0x41740e,{'showHidden':![],'depth':null}));}};VoiceAgentReport['prototype'][_0xc65d('0xb')]=function(_0x1f7f8a){try{if(this[_0xc65d('0x1d')](_0x1f7f8a)){if(this[_0xc65d('0x8')][_0x1f7f8a[_0xc65d('0x26')]]){for(var _0x13aff0 in this['channels'][_0x1f7f8a['uniqueid']]){if(this['channels'][_0x1f7f8a[_0xc65d('0x26')]][_0xc65d('0x38')](_0x13aff0)){if(_0x1f7f8a[_0xc65d('0x23')]===_0x13aff0){logger['info'](_0xc65d('0x39'),_0x1f7f8a[_0xc65d('0x26')],_0x1f7f8a[_0xc65d('0x22')],_0x1f7f8a[_0xc65d('0x23')]);this['channels'][_0x1f7f8a[_0xc65d('0x26')]][_0x13aff0][_0xc65d('0x3a')]=moment()[_0xc65d('0x2a')](_0xc65d('0x2b'));this['channels'][_0x1f7f8a['uniqueid']][_0x13aff0]['connectedlinename']=_0x1f7f8a[_0xc65d('0x3b')];this[_0xc65d('0x8')][_0x1f7f8a['uniqueid']][_0x13aff0]['connectedlinenum']=_0x1f7f8a[_0xc65d('0x3c')];this[_0xc65d('0x8')][_0x1f7f8a[_0xc65d('0x26')]][_0x13aff0][_0xc65d('0x3d')]=_0x1f7f8a[_0xc65d('0x3d')];this[_0xc65d('0x8')][_0x1f7f8a[_0xc65d('0x26')]][_0x13aff0][_0xc65d('0x3e')]=_0x1f7f8a[_0xc65d('0x3e')];this[_0xc65d('0x8')][_0x1f7f8a[_0xc65d('0x26')]][_0x13aff0][_0xc65d('0x3f')]=_0x1f7f8a['holdtime'];this[_0xc65d('0x8')][_0x1f7f8a[_0xc65d('0x26')]][_0x13aff0][_0xc65d('0x40')]='connect';if(this[_0xc65d('0x41')][this[_0xc65d('0x8')][_0x1f7f8a[_0xc65d('0x26')]][_0x13aff0][_0xc65d('0x26')]]){var _0x20ec42=this[_0xc65d('0x41')][this[_0xc65d('0x8')][_0x1f7f8a[_0xc65d('0x26')]][_0x13aff0][_0xc65d('0x26')]][_0xc65d('0x42')];this[_0xc65d('0x8')][_0x1f7f8a[_0xc65d('0x26')]][_0x13aff0][_0xc65d('0x42')]=_0x20ec42;_0x1f7f8a[_0xc65d('0x42')]=_0x20ec42;}_['merge'](this[_0xc65d('0xa')][_0x1f7f8a['interface']],_[_0xc65d('0x43')](_0x1f7f8a,[_0xc65d('0x44'),'destconnectedlinenum',_0xc65d('0x42')]));var _0x5a0b6f=this[_0xc65d('0xa')][_0x1f7f8a[_0xc65d('0x28')]];var _0x10b2d3={'id':_0x5a0b6f['id'],'name':_0x5a0b6f[_0xc65d('0x45')],'agentconnected':!![],'destaccountcode':_0x5a0b6f['accountcode'],'destconnectedlinenum':this[_0xc65d('0x8')][_0x1f7f8a[_0xc65d('0x26')]][_0x1f7f8a[_0xc65d('0x23')]][_0xc65d('0x46')],'queue':this[_0xc65d('0x8')][_0x1f7f8a[_0xc65d('0x26')]][_0x1f7f8a[_0xc65d('0x23')]][_0xc65d('0x44')],'routealias':this[_0xc65d('0x8')][_0x1f7f8a[_0xc65d('0x26')]][_0x1f7f8a[_0xc65d('0x23')]]['routealias'],'uniqueid':this[_0xc65d('0x8')][_0x1f7f8a['uniqueid']][_0x1f7f8a[_0xc65d('0x23')]]['uniqueid']};ami[_0xc65d('0x1c')](_0xc65d('0x47'),this[_0xc65d('0x8')][_0x1f7f8a['uniqueid']][_0x1f7f8a[_0xc65d('0x23')]]);this[_0xc65d('0x1c')](util[_0xc65d('0x2a')](_0xc65d('0x35'),_0x1f7f8a[_0xc65d('0x22')]),_0xc65d('0x48'),_0x10b2d3);}else if(!this[_0xc65d('0x8')][_0x1f7f8a[_0xc65d('0x26')]][_0x13aff0][_0xc65d('0xd')]&&!this['channels'][_0x1f7f8a[_0xc65d('0x26')]][_0x13aff0]['agentcomplete']){logger[_0xc65d('0x20')](_0xc65d('0x49'),_0x1f7f8a[_0xc65d('0x26')],this[_0xc65d('0x8')][_0x1f7f8a[_0xc65d('0x26')]][_0x13aff0][_0xc65d('0x22')],_0x13aff0);this[_0xc65d('0x8')][_0x1f7f8a[_0xc65d('0x26')]][_0x13aff0][_0xc65d('0xd')]=!![];this['channels'][_0x1f7f8a['uniqueid']][_0x13aff0][_0xc65d('0x4a')]=moment()[_0xc65d('0x2a')](_0xc65d('0x2b'));this[_0xc65d('0x8')][_0x1f7f8a[_0xc65d('0x26')]][_0x13aff0][_0xc65d('0x4b')]=_0x1f7f8a['destuniqueid'];this[_0xc65d('0x8')][_0x1f7f8a[_0xc65d('0x26')]][_0x13aff0][_0xc65d('0x4c')]=_0x1f7f8a[_0xc65d('0x22')];this['channels'][_0x1f7f8a['uniqueid']][_0x13aff0]['lastevent']=_0xc65d('0x4d');this[_0xc65d('0x8')][_0x1f7f8a[_0xc65d('0x26')]][_0x13aff0]['reason']=_0xc65d('0x4d');logger[_0xc65d('0x24')](_0xc65d('0x4e'),_0x1f7f8a[_0xc65d('0x26')],util[_0xc65d('0x27')](this['channels'][_0x1f7f8a[_0xc65d('0x26')]][_0x13aff0],{'showHidden':![],'depth':null}));ami['emit'](_0xc65d('0x4f'),this['channels'][_0x1f7f8a['uniqueid']][_0x13aff0]);}else{logger['debug']('[%s][voiceAgentReport][agentconnect]\x20Else\x20path\x20should\x20never\x20be\x20taken',_0x1f7f8a['uniqueid']);}}}}}}catch(_0x3e3a20){logger[_0xc65d('0x36')](_0xc65d('0x50'),_0x1f7f8a['uniqueid'],util['inspect'](_0x3e3a20,{'showHidden':![],'depth':null}));}};VoiceAgentReport[_0xc65d('0x1b')][_0xc65d('0xe')]=function(_0x59f1c7){try{if(this[_0xc65d('0x1d')](_0x59f1c7)){logger[_0xc65d('0x24')](_0xc65d('0x51'),_0x59f1c7['uniqueid'],util[_0xc65d('0x27')](_0x59f1c7,{'showHidden':![],'depth':null}));if(this['channels'][_0x59f1c7[_0xc65d('0x26')]]&&this['channels'][_0x59f1c7[_0xc65d('0x26')]][_0x59f1c7[_0xc65d('0x23')]]){logger[_0xc65d('0x20')]('[%s][voiceAgentReport][agentringnoanswer]\x20agent:%s\x20destuniqueid:%s\x20lastevent:rejected',_0x59f1c7[_0xc65d('0x26')],_0x59f1c7['membername'],_0x59f1c7[_0xc65d('0x23')]);var _0x1d8639=this[_0xc65d('0xa')][_0x59f1c7[_0xc65d('0x28')]];var _0x58aeb8=this[_0xc65d('0x8')][_0x59f1c7['uniqueid']][_0x59f1c7[_0xc65d('0x23')]];_0x58aeb8[_0xc65d('0xd')]=!![];_0x58aeb8[_0xc65d('0x4a')]=moment()['format'](_0xc65d('0x2b'));_0x58aeb8[_0xc65d('0x40')]=_0xc65d('0x52');_0x58aeb8[_0xc65d('0x53')]=_0xc65d('0x52');var _0xa78ba3={'id':_0x1d8639['id'],'name':_0x1d8639[_0xc65d('0x45')],'queue':_0x58aeb8[_0xc65d('0x44')],'uniqueid':_0x58aeb8['uniqueid']};logger[_0xc65d('0x24')]('[%s][voiceAgentReport][agentringnoanswer]\x20sending\x20agentringnoanswer\x20event:',_0x59f1c7[_0xc65d('0x26')],util[_0xc65d('0x27')](_0xa78ba3,{'showHidden':![],'depth':null}));this['emit'](util[_0xc65d('0x2a')](_0xc65d('0x35'),_0x1d8639[_0xc65d('0x45')]),_0xc65d('0x54'),_0xa78ba3);ami[_0xc65d('0x1c')]('custom:agentringnoanswer',_0x58aeb8);this[_0xc65d('0x8')][_0x59f1c7['uniqueid']][_0x59f1c7['destuniqueid']]=Object[_0xc65d('0x2e')]({},_0x58aeb8);}}}catch(_0x537cc3){logger['error']('[%s][voiceAgentReport][agentringnoanswer]',_0x59f1c7[_0xc65d('0x26')],util['inspect'](_0x537cc3,{'showHidden':![],'depth':null}));}};VoiceAgentReport[_0xc65d('0x1b')][_0xc65d('0x10')]=function(_0x44b952){try{if(this[_0xc65d('0x1d')](_0x44b952)){logger[_0xc65d('0x24')]('[%s][voiceAgentReport][queuecallerabandon]\x20event:',_0x44b952[_0xc65d('0x26')],util[_0xc65d('0x27')](_0x44b952,{'showHidden':![],'depth':null}));if(this[_0xc65d('0x8')][_0x44b952[_0xc65d('0x26')]]){for(var _0x322d3c in this['channels'][_0x44b952[_0xc65d('0x26')]]){if(this[_0xc65d('0x8')][_0x44b952[_0xc65d('0x26')]]['hasOwnProperty'](_0x322d3c)&&!this[_0xc65d('0x8')][_0x44b952['uniqueid']][_0x322d3c][_0xc65d('0xd')]&&!this[_0xc65d('0x8')][_0x44b952['uniqueid']][_0x322d3c]['agentcomplete']){logger[_0xc65d('0x20')]('[%s][voiceAgentReport][queuecallerabandon]\x20agent:%s\x20destuniqueid:%s\x20lastevent:abandoned',_0x44b952[_0xc65d('0x26')],this[_0xc65d('0x8')][_0x44b952[_0xc65d('0x26')]][_0x322d3c][_0xc65d('0x22')],_0x322d3c);this[_0xc65d('0x8')][_0x44b952[_0xc65d('0x26')]][_0x322d3c][_0xc65d('0xd')]=!![];this['channels'][_0x44b952[_0xc65d('0x26')]][_0x322d3c][_0xc65d('0x4a')]=moment()[_0xc65d('0x2a')](_0xc65d('0x2b'));this['channels'][_0x44b952[_0xc65d('0x26')]][_0x322d3c][_0xc65d('0x40')]='abandoned';this[_0xc65d('0x8')][_0x44b952[_0xc65d('0x26')]][_0x322d3c]['reason']=_0xc65d('0x55');logger[_0xc65d('0x24')](_0xc65d('0x56'),_0x44b952[_0xc65d('0x26')],util['inspect'](this['channels'][_0x44b952[_0xc65d('0x26')]][_0x322d3c],{'showHidden':![],'depth':null}));ami['emit'](_0xc65d('0x57'),this[_0xc65d('0x8')][_0x44b952[_0xc65d('0x26')]][_0x322d3c]);}}}}}catch(_0x525fc4){logger[_0xc65d('0x36')](_0xc65d('0x58'),_0x44b952[_0xc65d('0x26')],util[_0xc65d('0x27')](_0x525fc4,{'showHidden':![],'depth':null}));}};VoiceAgentReport[_0xc65d('0x1b')][_0xc65d('0x12')]=function(_0xe6d1fb){try{if(this[_0xc65d('0x1d')](_0xe6d1fb)){logger[_0xc65d('0x24')](_0xc65d('0x59'),_0xe6d1fb[_0xc65d('0x26')],util[_0xc65d('0x27')](_0xe6d1fb,{'showHidden':![],'depth':null}));if(this[_0xc65d('0x8')][_0xe6d1fb[_0xc65d('0x26')]]){for(var _0x34c697 in this['channels'][_0xe6d1fb[_0xc65d('0x26')]]){if(this[_0xc65d('0x8')][_0xe6d1fb[_0xc65d('0x26')]]['hasOwnProperty'](_0x34c697)){if(this['channels'][_0xe6d1fb['uniqueid']][_0x34c697]['agentconnectAt']&&!this[_0xc65d('0x8')][_0xe6d1fb[_0xc65d('0x26')]][_0x34c697][_0xc65d('0x11')]){logger['info']('[%s][voiceAgentReport][agentcomplete]\x20agent:%s\x20destuniqueid:%s\x20lastevent:complete',_0xe6d1fb[_0xc65d('0x26')],this[_0xc65d('0x8')][_0xe6d1fb['uniqueid']][_0x34c697][_0xc65d('0x22')],_0x34c697);this[_0xc65d('0x8')][_0xe6d1fb[_0xc65d('0x26')]][_0x34c697][_0xc65d('0x11')]=!![];this[_0xc65d('0x8')][_0xe6d1fb[_0xc65d('0x26')]][_0x34c697]['agentcompleteAt']=moment()[_0xc65d('0x2a')]('YYYY-MM-DD\x20HH:mm:ss');this[_0xc65d('0x8')][_0xe6d1fb[_0xc65d('0x26')]][_0x34c697][_0xc65d('0x40')]=_0xc65d('0x5a');this[_0xc65d('0x8')][_0xe6d1fb[_0xc65d('0x26')]][_0x34c697][_0xc65d('0x53')]=_0xe6d1fb[_0xc65d('0x53')]==_0xc65d('0x5b')?_0xc65d('0x5c'):_0xe6d1fb['reason'];this['channels'][_0xe6d1fb[_0xc65d('0x26')]][_0x34c697][_0xc65d('0x5d')]=_0xe6d1fb[_0xc65d('0x5d')];if(this[_0xc65d('0x9')][_0xe6d1fb[_0xc65d('0x44')]]&&this[_0xc65d('0x9')][_0xe6d1fb[_0xc65d('0x44')]][_0xc65d('0x5e')]){this[_0xc65d('0x8')][_0xe6d1fb['uniqueid']][_0x34c697][_0xc65d('0x5f')]=this[_0xc65d('0x9')][_0xe6d1fb[_0xc65d('0x44')]][_0xc65d('0x60')];this[_0xc65d('0x8')][_0xe6d1fb['uniqueid']][_0x34c697][_0xc65d('0x61')]=!![];}this[_0xc65d('0xa')][_0xe6d1fb['interface']]=_['omit'](this[_0xc65d('0xa')][_0xe6d1fb[_0xc65d('0x28')]],['queue',_0xc65d('0x62')]);logger[_0xc65d('0x24')](_0xc65d('0x63'),_0xe6d1fb[_0xc65d('0x26')],util[_0xc65d('0x27')](this[_0xc65d('0x8')][_0xe6d1fb['uniqueid']][_0x34c697],{'showHidden':![],'depth':null}));ami[_0xc65d('0x1c')](_0xc65d('0x64'),this['channels'][_0xe6d1fb['uniqueid']][_0x34c697]);logger['debug'](_0xc65d('0x65'),_0xe6d1fb[_0xc65d('0x26')],util[_0xc65d('0x27')]({'id':this[_0xc65d('0xa')][_0xe6d1fb[_0xc65d('0x28')]]['id'],'destaccountcode':_0xe6d1fb['destaccountcode']},{'showHidden':![],'depth':null}));this['emit'](util['format'](_0xc65d('0x35'),_0xe6d1fb['membername']),'user:agentcomplete',{'id':this[_0xc65d('0xa')][_0xe6d1fb[_0xc65d('0x28')]]['id'],'destaccountcode':Number(_0xe6d1fb[_0xc65d('0x66')])});}}}}}}catch(_0x4595dc){logger['error'](_0xc65d('0x67'),_0xe6d1fb['uniqueid'],util['inspect'](_0x4595dc,{'showHidden':![],'depth':null}));}};VoiceAgentReport[_0xc65d('0x1b')]['syncVarSet']=function(_0x3eebf0){try{if(this[_0xc65d('0x1d')](_0x3eebf0)){logger[_0xc65d('0x24')](_0xc65d('0x68'),_0x3eebf0['uniqueid'],util['inspect'](_0x3eebf0,{'showHidden':![],'depth':null}));this['addVariable'](_0x3eebf0[_0xc65d('0x26')],_[_0xc65d('0x69')](_0x3eebf0[_0xc65d('0x6a')])[0x0],_0x3eebf0[_0xc65d('0x6b')]);if(this[_0xc65d('0x8')][_0x3eebf0[_0xc65d('0x26')]]){for(var _0xa0d0e2 in this['channels'][_0x3eebf0[_0xc65d('0x26')]]){if(this[_0xc65d('0x8')][_0x3eebf0[_0xc65d('0x26')]]['hasOwnProperty'](_0xa0d0e2)){logger['info'](_0xc65d('0x6c'),_0x3eebf0[_0xc65d('0x26')],_0xa0d0e2,_[_0xc65d('0x69')](_0x3eebf0[_0xc65d('0x6a')])[0x0],_0x3eebf0[_0xc65d('0x6b')]);if(_['isUndefined'](this[_0xc65d('0x8')][_0x3eebf0['uniqueid']][_0xa0d0e2][_0xc65d('0x29')])){this[_0xc65d('0x8')][_0x3eebf0[_0xc65d('0x26')]][_0xa0d0e2]['variables']={};}this[_0xc65d('0x8')][_0x3eebf0[_0xc65d('0x26')]][_0xa0d0e2][_0xc65d('0x29')]=this[_0xc65d('0x29')][_0x3eebf0[_0xc65d('0x26')]];}}}}}catch(_0x554c8a){logger['error'](_0xc65d('0x6d'),_0x3eebf0['uniqueid'],util[_0xc65d('0x27')](_0x554c8a,{'showHidden':![],'depth':null}));}};VoiceAgentReport[_0xc65d('0x1b')][_0xc65d('0x6e')]=function(_0x4ed5ff,_0x4eb12e,_0x49f6c8){var _0x471ec7=[_0xc65d('0x6f'),_0xc65d('0x70'),'rtpaudioqosjitter','rtpaudioqosjitterbridged',_0xc65d('0x71'),'rtpaudioqoslossbridged',_0xc65d('0x72'),_0xc65d('0x73'),'sipcallid','sipuri',_0xc65d('0x74'),'bridgepvtcallid',_0xc65d('0x75'),'memberdynamic',_0xc65d('0x76'),_0xc65d('0x77'),'membername',_0xc65d('0x78'),_0xc65d('0x79')];if(!_[_0xc65d('0x7a')](_0x4eb12e)&&!_['includes'](_0x471ec7,_0x4eb12e)){if(_[_0xc65d('0x1e')](this['variables'][_0x4ed5ff])){this[_0xc65d('0x29')][_0x4ed5ff]={};}this[_0xc65d('0x29')][_0x4ed5ff][_0x4eb12e]=_0x49f6c8;}};VoiceAgentReport[_0xc65d('0x1b')][_0xc65d('0x14')]=function(_0x57391f){try{if(this[_0xc65d('0x1d')](_0x57391f)){logger[_0xc65d('0x24')]('[%s][voiceAgentReport][hangup]\x20event:',_0x57391f['uniqueid'],util[_0xc65d('0x27')](_0x57391f,{'showHidden':![],'depth':null}));if(this[_0xc65d('0x8')][_0x57391f[_0xc65d('0x26')]]){for(var _0x2c1dba in this[_0xc65d('0x8')][_0x57391f['uniqueid']]){if(this['channels'][_0x57391f['uniqueid']][_0xc65d('0x38')](_0x2c1dba)){if(this[_0xc65d('0x8')][_0x57391f['uniqueid']][_0x2c1dba][_0xc65d('0x53')]=='transfer'&&this['channels'][_0x57391f[_0xc65d('0x26')]][_0x2c1dba]['agentcomplete']){logger[_0xc65d('0x20')]('[%s][voiceAgentReport][hangup]\x20destuniqueid:%s',_0x57391f[_0xc65d('0x26')],_0x2c1dba);this[_0xc65d('0x8')][_0x57391f[_0xc65d('0x26')]][_0x2c1dba][_0xc65d('0x7b')]=moment()[_0xc65d('0x2a')](_0xc65d('0x2b'));}}}logger[_0xc65d('0x24')](_0xc65d('0x7c'),_0x57391f[_0xc65d('0x26')],util[_0xc65d('0x27')](_[_0xc65d('0x7d')](this[_0xc65d('0x8')][_0x57391f[_0xc65d('0x26')]]),{'showHidden':![],'depth':null}));ami[_0xc65d('0x1c')]('custom:voiceAgentReport',_[_0xc65d('0x7d')](this[_0xc65d('0x8')][_0x57391f['uniqueid']]));delete this['channels'][_0x57391f[_0xc65d('0x26')]];}if(this['variables'][_0x57391f[_0xc65d('0x26')]]){delete this[_0xc65d('0x29')][_0x57391f[_0xc65d('0x26')]];}}}catch(_0x1f3522){logger['error']('[%s][voiceAgentReport][hangup]',_0x57391f[_0xc65d('0x26')],util[_0xc65d('0x27')](_0x1f3522,{'showHidden':![],'depth':null}));}};VoiceAgentReport[_0xc65d('0x1b')][_0xc65d('0x19')]=function(_0xc7e0be){try{if(this[_0xc65d('0x1d')](_0xc7e0be)){logger[_0xc65d('0x24')](_0xc65d('0x7e'),_0xc7e0be['uniqueid'],util[_0xc65d('0x27')](_0xc7e0be,{'showHidden':![],'depth':null}));if(this[_0xc65d('0x8')][_0xc7e0be[_0xc65d('0x7f')]]){for(var _0x281478 in this[_0xc65d('0x8')][_0xc7e0be[_0xc65d('0x7f')]]){if(this[_0xc65d('0x8')][_0xc7e0be[_0xc65d('0x7f')]][_0xc65d('0x38')](_0x281478)){if(_0xc7e0be[_0xc65d('0x80')]===_0x281478){logger[_0xc65d('0x20')]('[%s][voiceAgentReport][attendedtransfer]\x20agent:%s\x20destuniqueid:%s\x20lastevent:complete',_0xc7e0be[_0xc65d('0x26')],this[_0xc65d('0x8')][_0xc7e0be[_0xc65d('0x7f')]][_0x281478]['membername'],_0x281478);var _0x6549d1=moment();this[_0xc65d('0x8')][_0xc7e0be[_0xc65d('0x7f')]][_0x281478]['agentcomplete']=!![];this['channels'][_0xc7e0be['transfereeuniqueid']][_0x281478][_0xc65d('0x7b')]=moment()['format'](_0xc65d('0x2b'));this['channels'][_0xc7e0be[_0xc65d('0x7f')]][_0x281478][_0xc65d('0x40')]=_0xc65d('0x5a');this[_0xc65d('0x8')][_0xc7e0be[_0xc65d('0x7f')]][_0x281478]['reason']=_0xc65d('0x5b');this[_0xc65d('0x8')][_0xc7e0be[_0xc65d('0x7f')]][_0x281478][_0xc65d('0x5d')]=_0x6549d1[_0xc65d('0x81')](this['channels'][_0xc7e0be[_0xc65d('0x7f')]][_0x281478][_0xc65d('0x3a')],'seconds');}}}}if(this[_0xc65d('0x8')][_0xc7e0be[_0xc65d('0x82')]]){var _0x3fc9ef=this[_0xc65d('0x8')][_0xc7e0be[_0xc65d('0x82')]];this['channels'][_0xc7e0be[_0xc65d('0x82')]]=this[_0xc65d('0x8')][_0xc7e0be['transfereeuniqueid']];this[_0xc65d('0x8')][_0xc7e0be[_0xc65d('0x7f')]]=_0x3fc9ef;}}}catch(_0x263c67){logger['error'](_0xc65d('0x83'),_0xc7e0be['uniqueid'],util[_0xc65d('0x27')](_0x263c67,{'showHidden':![],'depth':null}));}};VoiceAgentReport['prototype'][_0xc65d('0x1a')]=function(_0x3cc42c){try{if(this[_0xc65d('0x1d')](_0x3cc42c)){logger[_0xc65d('0x24')](_0xc65d('0x84'),_0x3cc42c[_0xc65d('0x26')],util[_0xc65d('0x27')](_0x3cc42c,{'showHidden':![],'depth':null}));if(this[_0xc65d('0x8')][_0x3cc42c['transfereeuniqueid']]){for(var _0xc44eef in this['channels'][_0x3cc42c[_0xc65d('0x7f')]]){if(this[_0xc65d('0x8')][_0x3cc42c[_0xc65d('0x7f')]][_0xc65d('0x38')](_0xc44eef)){if(_0x3cc42c['transfereruniqueid']===_0xc44eef){logger[_0xc65d('0x20')]('[%s][voiceAgentReport][blindtransfer]\x20agent:%s\x20destuniqueid:%s\x20lastevent:complete',_0x3cc42c[_0xc65d('0x26')],this[_0xc65d('0x8')][_0x3cc42c[_0xc65d('0x7f')]][_0xc44eef][_0xc65d('0x22')],_0xc44eef);var _0x49de0e=moment();this[_0xc65d('0x8')][_0x3cc42c['transfereeuniqueid']][_0xc44eef][_0xc65d('0x11')]=!![];this['channels'][_0x3cc42c[_0xc65d('0x7f')]][_0xc44eef][_0xc65d('0x7b')]=_0x49de0e;this[_0xc65d('0x8')][_0x3cc42c['transfereeuniqueid']][_0xc44eef][_0xc65d('0x40')]=_0xc65d('0x5a');this[_0xc65d('0x8')][_0x3cc42c[_0xc65d('0x7f')]][_0xc44eef][_0xc65d('0x53')]=_0xc65d('0x5b');this[_0xc65d('0x8')][_0x3cc42c[_0xc65d('0x7f')]][_0xc44eef][_0xc65d('0x5d')]=_0x49de0e[_0xc65d('0x81')](this[_0xc65d('0x8')][_0x3cc42c[_0xc65d('0x7f')]][_0xc44eef][_0xc65d('0x3a')],_0xc65d('0x85'));}}}}}}catch(_0x54e2bf){logger[_0xc65d('0x36')](_0xc65d('0x86'),_0x3cc42c['uniqueid'],util[_0xc65d('0x27')](_0x54e2bf,{'showHidden':![],'depth':null}));}};VoiceAgentReport[_0xc65d('0x1b')][_0xc65d('0x16')]=function(_0x590247){var _0x5ec2ac='';try{if(this['isNotNull'](_0x590247)){logger[_0xc65d('0x24')](_0xc65d('0x87'),_0x590247[_0xc65d('0x26')],util[_0xc65d('0x27')](_0x590247,{'showHidden':![],'depth':null}));if(_0x590247[_0xc65d('0x88')]){_0x5ec2ac=_0x590247[_0xc65d('0x88')]['substring'](0x0,_0x590247[_0xc65d('0x88')]['lastIndexOf']('-'));if(this[_0xc65d('0xa')][_0x5ec2ac]){logger[_0xc65d('0x20')](_0xc65d('0x89'),_0x590247[_0xc65d('0x26')],_0x5ec2ac);this['agents'][_0x5ec2ac][_0xc65d('0x8a')]=!![];}}}}catch(_0x36384b){logger['error']('[%s][voiceAgentReport][musiconholdstart]',_0x590247[_0xc65d('0x26')],util[_0xc65d('0x27')](_0x36384b,{'showHidden':![],'depth':null}));}};VoiceAgentReport[_0xc65d('0x1b')]['syncMusicOnHoldStop']=function(_0x5f4b89){var _0x5251d6='';try{if(this[_0xc65d('0x1d')](_0x5f4b89)){logger[_0xc65d('0x24')](_0xc65d('0x8b'),_0x5f4b89['uniqueid'],util['inspect'](_0x5f4b89,{'showHidden':![],'depth':null}));if(_0x5f4b89[_0xc65d('0x88')]){_0x5251d6=_0x5f4b89['channel']['substring'](0x0,_0x5f4b89[_0xc65d('0x88')][_0xc65d('0x8c')]('-'));if(this[_0xc65d('0xa')][_0x5251d6]){logger['info'](_0xc65d('0x8d'),_0x5f4b89[_0xc65d('0x26')],_0x5251d6);this[_0xc65d('0xa')][_0x5251d6][_0xc65d('0x8a')]=![];}}}}catch(_0x3fe1b8){logger[_0xc65d('0x36')](_0xc65d('0x8e'),_0x5f4b89[_0xc65d('0x26')],util[_0xc65d('0x27')](_0x3fe1b8,{'showHidden':![],'depth':null}));}};module['exports']=VoiceAgentReport; \ No newline at end of file +var _0xf8c4=['[%s][voiceAgentReport][musiconholdstop]\x20event:','substring','[%s][voiceAgentReport][musiconholdstop]\x20interface:%s','[%s][voiceAgentReport][musiconholdstop]','exports','util','ioredis','../../../config/environment','../../../config/logger','ami','redis','defaults','localhost','socket.io-emitter','channels','voiceQueues','agents','variables','agentcalled','syncAgentCalled','agentconnect','syncAgentConnect','agentringnoanswer','syncAgentRingNoAnswer','bind','queuecallerabandon','syncQueueCallerAbandon','agentcomplete','syncAgentComplete','syncVarSet','hangup','musiconholdstop','syncMusicOnHoldStop','attendedtransfer','syncAttendedTransfer','blindtransfer','syncBlindTransfer','emit','prototype','isNotNull','isUndefined','[%s][voiceAgentReport][agentcalled]\x20agent:%s\x20destuniqueid:%s\x20lastevent:called','uniqueid','membername','debug','[%s][voiceAgentReport][agentcalled]\x20event:','inspect','queue','format','YYYY-MM-DD\x20HH:mm:ss','called','mandatoryDisposition','type','assign','omit','event','privilege','destuniqueid','[%s][voiceAgentReport][agentcalled]\x20sending\x20agentcalled\x20event:','custom:agentcalled','user:%s','user:called','error','[%s][voiceAgentReport][agentcalled]','info','connectedlinenum','destchannelstate','destchannelstatedesc','holdtime','connect','voiceChannels','routealias','merge','interface','destconnectedlinenum','name','accountcode','exten','user:agentconnect','[%s][voiceAgentReport][agentconnect]\x20agent:%s\x20destuniqueid:%s\x20lastevent:answered_elsewhere','agentringnoanswerAt','answeredelsewheredestinationuniqueid','lastevent','answered_elsewhere','[%s][voiceAgentReport][agentconnect]\x20sending\x20agentansweredelsewhere\x20event:','custom:agentansweredelsewhere','[%s][voiceAgentReport][agentconnect]','rejected','reason','[%s][voiceAgentReport][agentringnoanswer]\x20sending\x20agentringnoanswer\x20event:','custom:agentringnoanswer','[%s][voiceAgentReport][agentringnoanswer]','hasOwnProperty','abandoned','custom:agentqueuecallerabandon','[%s][voiceAgentReport][agentcomplete]\x20agent:%s\x20destuniqueid:%s\x20lastevent:complete','complete','transfer','agent','talktime','acw','acwtime','acwTimeout','agentacw','[%s][voiceAgentReport][agentcomplete]\x20sending\x20agentcomplete\x20event:','custom:agentcomplete','[%s][voiceAgentReport][agentcomplete]\x20sending\x20user:agentcomplete\x20event:','destaccountcode','user:agentcomplete','[%s][voiceAgentReport][agentcomplete]','addVariable','keys','variable','value','[%s][voiceAgentReport][varset]\x20destuniqueid:%s\x20variable:%s\x20value:%s','rtpaudioqosbridged','rtpaudioqosjitter','rtpaudioqosloss','rtpaudioqoslossbridged','rtpaudioqosrtt','rtpaudioqosrttbridged','sipcallid','sipuri','bridgepeer','bridgepvtcallid','membercalls','memberdynamic','memberinterface','memberlastcall','memberpenalty','memberrealtime','isNil','syncHangup','[%s][voiceAgentReport][hangup]\x20event:','agentcompleteAt','[%s][voiceAgentReport][hangup]\x20sending\x20voiceAgentReport\x20event:','values','custom:voiceAgentReport','[%s][voiceAgentReport][hangup]','[%s][voiceAgentReport][attendedtransfer]\x20event:','transfereeuniqueid','origtransfereruniqueid','diff','agentconnectAt','secondtransfereruniqueid','[%s][voiceAgentReport][attendedtransfer]','[%s][voiceAgentReport][blindtransfer]\x20event:','transfereruniqueid','seconds','syncMusicOnHoldStart','[%s][voiceAgentReport][musiconholdstart]\x20event:','channel','lastIndexOf','[%s][voiceAgentReport][musiconholdstart]\x20interface:%s','[%s][voiceAgentReport][musiconholdstart]'];(function(_0x49ff11,_0xfadf3e){var _0x34eb5f=function(_0x118422){while(--_0x118422){_0x49ff11['push'](_0x49ff11['shift']());}};_0x34eb5f(++_0xfadf3e);}(_0xf8c4,0xa0));var _0x4f8c=function(_0x17d9e3,_0x1f969c){_0x17d9e3=_0x17d9e3-0x0;var _0x14192d=_0xf8c4[_0x17d9e3];return _0x14192d;};'use strict';var _=require('lodash');var moment=require('moment');var util=require(_0x4f8c('0x0'));var Redis=require(_0x4f8c('0x1'));var config=require(_0x4f8c('0x2'));var logger=require(_0x4f8c('0x3'))(_0x4f8c('0x4'));var ami=require('../ami');config[_0x4f8c('0x5')]=_[_0x4f8c('0x6')](config['redis'],{'host':_0x4f8c('0x7'),'port':0x18eb});var io=require(_0x4f8c('0x8'))(new Redis(config['redis']));function VoiceAgentReport(_0x3ba3dd){this[_0x4f8c('0x9')]={};this['voiceChannels']=_0x3ba3dd[_0x4f8c('0x9')];this[_0x4f8c('0xa')]=_0x3ba3dd['voiceQueues'];this[_0x4f8c('0xb')]=_0x3ba3dd[_0x4f8c('0xb')];this[_0x4f8c('0xc')]={};ami['on'](_0x4f8c('0xd'),this[_0x4f8c('0xe')]['bind'](this));ami['on'](_0x4f8c('0xf'),this[_0x4f8c('0x10')]['bind'](this));ami['on'](_0x4f8c('0x11'),this[_0x4f8c('0x12')][_0x4f8c('0x13')](this));ami['on'](_0x4f8c('0x14'),this[_0x4f8c('0x15')][_0x4f8c('0x13')](this));ami['on'](_0x4f8c('0x16'),this[_0x4f8c('0x17')][_0x4f8c('0x13')](this));ami['on']('varset',this[_0x4f8c('0x18')][_0x4f8c('0x13')](this));ami['on'](_0x4f8c('0x19'),this['syncHangup']['bind'](this));ami['on']('musiconholdstart',this['syncMusicOnHoldStart'][_0x4f8c('0x13')](this));ami['on'](_0x4f8c('0x1a'),this[_0x4f8c('0x1b')]['bind'](this));ami['on'](_0x4f8c('0x1c'),this[_0x4f8c('0x1d')][_0x4f8c('0x13')](this));ami['on'](_0x4f8c('0x1e'),this[_0x4f8c('0x1f')][_0x4f8c('0x13')](this));}VoiceAgentReport['prototype']['emit']=function(_0x1e3c63,_0x1fbdb8,_0x4d087b){io['to'](_0x1e3c63)[_0x4f8c('0x20')](_0x1fbdb8,_0x4d087b);};VoiceAgentReport[_0x4f8c('0x21')][_0x4f8c('0x22')]=function(_0x2e351a){return _0x2e351a!==null&&!_[_0x4f8c('0x23')](_0x2e351a);};VoiceAgentReport['prototype'][_0x4f8c('0xe')]=function(_0x8cf66c){try{if(this[_0x4f8c('0x22')](_0x8cf66c)){logger['info'](_0x4f8c('0x24'),_0x8cf66c[_0x4f8c('0x25')],_0x8cf66c[_0x4f8c('0x26')],_0x8cf66c['destuniqueid']);logger[_0x4f8c('0x27')](_0x4f8c('0x28'),_0x8cf66c[_0x4f8c('0x25')],util[_0x4f8c('0x29')](_0x8cf66c,{'showHidden':![],'depth':null}));if(_[_0x4f8c('0x23')](this['channels'][_0x8cf66c[_0x4f8c('0x25')]])){this[_0x4f8c('0x9')][_0x8cf66c[_0x4f8c('0x25')]]={};}var _0x31f7a1=this[_0x4f8c('0xb')][_0x8cf66c['interface']];var _0x5a7f80=this[_0x4f8c('0x9')][_0x8cf66c['uniqueid']][_0x8cf66c['destuniqueid']];var _0xb8f8d7=this[_0x4f8c('0xa')][_0x8cf66c[_0x4f8c('0x2a')]];var _0xc195cf=this[_0x4f8c('0xc')][_0x8cf66c['uniqueid']];if(_[_0x4f8c('0x23')](_0x5a7f80)){_0x5a7f80={'agentcalledAt':moment()[_0x4f8c('0x2b')](_0x4f8c('0x2c')),'lastevent':_0x4f8c('0x2d'),'mandatoryDisposition':_0xb8f8d7&&_0xb8f8d7[_0x4f8c('0x2e')]?_0xb8f8d7[_0x4f8c('0x2e')]:![],'type':_0xb8f8d7&&_0xb8f8d7[_0x4f8c('0x2f')]?_0xb8f8d7[_0x4f8c('0x2f')]:'inbound','variables':_0xc195cf,'motionChannel':'voice'};}Object[_0x4f8c('0x30')](_0x5a7f80,_[_0x4f8c('0x31')](_0x8cf66c,[_0x4f8c('0x32'),_0x4f8c('0x33')]));this[_0x4f8c('0x9')][_0x8cf66c[_0x4f8c('0x25')]][_0x8cf66c[_0x4f8c('0x34')]]=_0x5a7f80;logger[_0x4f8c('0x27')](_0x4f8c('0x35'),_0x8cf66c[_0x4f8c('0x25')],util[_0x4f8c('0x29')](_0x5a7f80,{'showHidden':![],'depth':null}));ami[_0x4f8c('0x20')](_0x4f8c('0x36'),_0x5a7f80);var _0x293971={'id':_0x31f7a1['id'],'calleridnum':_0x5a7f80['calleridnum'],'queue':_0x5a7f80['queue'],'variables':_0x5a7f80[_0x4f8c('0xc')],'uniqueid':_0x8cf66c[_0x4f8c('0x25')]};logger['debug']('[%s][voiceAgentReport][agentcalled]\x20sending\x20user:called\x20event:',_0x8cf66c[_0x4f8c('0x25')],util['inspect'](_0x293971,{'showHidden':![],'depth':null}));this[_0x4f8c('0x20')](util['format'](_0x4f8c('0x37'),_0x8cf66c[_0x4f8c('0x26')]),_0x4f8c('0x38'),_0x293971);}}catch(_0x56c62f){logger[_0x4f8c('0x39')](_0x4f8c('0x3a'),_0x8cf66c[_0x4f8c('0x25')],util[_0x4f8c('0x29')](_0x56c62f,{'showHidden':![],'depth':null}));}};VoiceAgentReport[_0x4f8c('0x21')][_0x4f8c('0x10')]=function(_0x409089){try{if(this[_0x4f8c('0x22')](_0x409089)){if(this[_0x4f8c('0x9')][_0x409089[_0x4f8c('0x25')]]){for(var _0x516841 in this['channels'][_0x409089[_0x4f8c('0x25')]]){if(this[_0x4f8c('0x9')][_0x409089[_0x4f8c('0x25')]]['hasOwnProperty'](_0x516841)){if(_0x409089[_0x4f8c('0x34')]===_0x516841){logger[_0x4f8c('0x3b')]('[%s][voiceAgentReport][agentconnect]\x20agent:%s\x20destuniqueid:%s\x20lastevent:connect',_0x409089[_0x4f8c('0x25')],_0x409089[_0x4f8c('0x26')],_0x409089[_0x4f8c('0x34')]);this['channels'][_0x409089['uniqueid']][_0x516841]['agentconnectAt']=moment()[_0x4f8c('0x2b')](_0x4f8c('0x2c'));this[_0x4f8c('0x9')][_0x409089[_0x4f8c('0x25')]][_0x516841]['connectedlinename']=_0x409089['connectedlinename'];this[_0x4f8c('0x9')][_0x409089['uniqueid']][_0x516841][_0x4f8c('0x3c')]=_0x409089[_0x4f8c('0x3c')];this['channels'][_0x409089[_0x4f8c('0x25')]][_0x516841][_0x4f8c('0x3d')]=_0x409089['destchannelstate'];this[_0x4f8c('0x9')][_0x409089[_0x4f8c('0x25')]][_0x516841][_0x4f8c('0x3e')]=_0x409089[_0x4f8c('0x3e')];this[_0x4f8c('0x9')][_0x409089['uniqueid']][_0x516841][_0x4f8c('0x3f')]=_0x409089[_0x4f8c('0x3f')];this[_0x4f8c('0x9')][_0x409089[_0x4f8c('0x25')]][_0x516841]['lastevent']=_0x4f8c('0x40');if(this[_0x4f8c('0x41')][this[_0x4f8c('0x9')][_0x409089[_0x4f8c('0x25')]][_0x516841]['uniqueid']]){var _0x21d3a3=this[_0x4f8c('0x41')][this['channels'][_0x409089[_0x4f8c('0x25')]][_0x516841][_0x4f8c('0x25')]][_0x4f8c('0x42')];this[_0x4f8c('0x9')][_0x409089[_0x4f8c('0x25')]][_0x516841][_0x4f8c('0x42')]=_0x21d3a3;_0x409089[_0x4f8c('0x42')]=_0x21d3a3;}_[_0x4f8c('0x43')](this[_0x4f8c('0xb')][_0x409089[_0x4f8c('0x44')]],_['pick'](_0x409089,[_0x4f8c('0x2a'),_0x4f8c('0x45'),_0x4f8c('0x42')]));var _0xc88372=this[_0x4f8c('0xb')][_0x409089['interface']];var _0xf64710={'id':_0xc88372['id'],'name':_0xc88372[_0x4f8c('0x46')],'agentconnected':!![],'destaccountcode':_0xc88372[_0x4f8c('0x47')],'destconnectedlinenum':this['channels'][_0x409089[_0x4f8c('0x25')]][_0x409089[_0x4f8c('0x34')]][_0x4f8c('0x48')],'queue':this['channels'][_0x409089[_0x4f8c('0x25')]][_0x409089[_0x4f8c('0x34')]]['queue'],'routealias':this[_0x4f8c('0x9')][_0x409089[_0x4f8c('0x25')]][_0x409089[_0x4f8c('0x34')]][_0x4f8c('0x42')],'uniqueid':this['channels'][_0x409089[_0x4f8c('0x25')]][_0x409089[_0x4f8c('0x34')]]['uniqueid']};ami['emit']('custom:agentconnect',this[_0x4f8c('0x9')][_0x409089[_0x4f8c('0x25')]][_0x409089[_0x4f8c('0x34')]]);this[_0x4f8c('0x20')](util[_0x4f8c('0x2b')]('user:%s',_0x409089[_0x4f8c('0x26')]),_0x4f8c('0x49'),_0xf64710);}else if(!this['channels'][_0x409089[_0x4f8c('0x25')]][_0x516841][_0x4f8c('0x11')]&&!this[_0x4f8c('0x9')][_0x409089[_0x4f8c('0x25')]][_0x516841][_0x4f8c('0x16')]){logger['info'](_0x4f8c('0x4a'),_0x409089[_0x4f8c('0x25')],this[_0x4f8c('0x9')][_0x409089[_0x4f8c('0x25')]][_0x516841][_0x4f8c('0x26')],_0x516841);this['channels'][_0x409089[_0x4f8c('0x25')]][_0x516841][_0x4f8c('0x11')]=!![];this[_0x4f8c('0x9')][_0x409089[_0x4f8c('0x25')]][_0x516841][_0x4f8c('0x4b')]=moment()['format'](_0x4f8c('0x2c'));this[_0x4f8c('0x9')][_0x409089['uniqueid']][_0x516841][_0x4f8c('0x4c')]=_0x409089[_0x4f8c('0x34')];this[_0x4f8c('0x9')][_0x409089[_0x4f8c('0x25')]][_0x516841]['answeredelsewheremembername']=_0x409089[_0x4f8c('0x26')];this[_0x4f8c('0x9')][_0x409089[_0x4f8c('0x25')]][_0x516841][_0x4f8c('0x4d')]=_0x4f8c('0x4e');this['channels'][_0x409089['uniqueid']][_0x516841]['reason']='answered_elsewhere';logger[_0x4f8c('0x27')](_0x4f8c('0x4f'),_0x409089[_0x4f8c('0x25')],util[_0x4f8c('0x29')](this['channels'][_0x409089[_0x4f8c('0x25')]][_0x516841],{'showHidden':![],'depth':null}));ami[_0x4f8c('0x20')](_0x4f8c('0x50'),this[_0x4f8c('0x9')][_0x409089[_0x4f8c('0x25')]][_0x516841]);}else{logger['debug']('[%s][voiceAgentReport][agentconnect]\x20Else\x20path\x20should\x20never\x20be\x20taken',_0x409089[_0x4f8c('0x25')]);}}}}}}catch(_0x374c14){logger[_0x4f8c('0x39')](_0x4f8c('0x51'),_0x409089['uniqueid'],util[_0x4f8c('0x29')](_0x374c14,{'showHidden':![],'depth':null}));}};VoiceAgentReport['prototype'][_0x4f8c('0x12')]=function(_0x8138cd){try{if(this['isNotNull'](_0x8138cd)){logger[_0x4f8c('0x27')]('[%s][voiceAgentReport][agentringnoanswer]\x20event:',_0x8138cd[_0x4f8c('0x25')],util[_0x4f8c('0x29')](_0x8138cd,{'showHidden':![],'depth':null}));if(this[_0x4f8c('0x9')][_0x8138cd[_0x4f8c('0x25')]]&&this['channels'][_0x8138cd[_0x4f8c('0x25')]][_0x8138cd[_0x4f8c('0x34')]]){logger[_0x4f8c('0x3b')]('[%s][voiceAgentReport][agentringnoanswer]\x20agent:%s\x20destuniqueid:%s\x20lastevent:rejected',_0x8138cd[_0x4f8c('0x25')],_0x8138cd[_0x4f8c('0x26')],_0x8138cd[_0x4f8c('0x34')]);var _0x546eb6=this[_0x4f8c('0xb')][_0x8138cd[_0x4f8c('0x44')]];var _0x2d800b=this['channels'][_0x8138cd[_0x4f8c('0x25')]][_0x8138cd[_0x4f8c('0x34')]];_0x2d800b[_0x4f8c('0x11')]=!![];_0x2d800b[_0x4f8c('0x4b')]=moment()['format']('YYYY-MM-DD\x20HH:mm:ss');_0x2d800b['lastevent']=_0x4f8c('0x52');_0x2d800b[_0x4f8c('0x53')]=_0x4f8c('0x52');var _0x2322e7={'id':_0x546eb6['id'],'name':_0x546eb6['name'],'queue':_0x2d800b[_0x4f8c('0x2a')],'uniqueid':_0x2d800b['uniqueid']};logger[_0x4f8c('0x27')](_0x4f8c('0x54'),_0x8138cd[_0x4f8c('0x25')],util[_0x4f8c('0x29')](_0x2322e7,{'showHidden':![],'depth':null}));this[_0x4f8c('0x20')](util[_0x4f8c('0x2b')](_0x4f8c('0x37'),_0x546eb6['name']),'user:agentringnoanswer',_0x2322e7);ami[_0x4f8c('0x20')](_0x4f8c('0x55'),_0x2d800b);this[_0x4f8c('0x9')][_0x8138cd[_0x4f8c('0x25')]][_0x8138cd[_0x4f8c('0x34')]]=Object[_0x4f8c('0x30')]({},_0x2d800b);}}}catch(_0x3822b3){logger[_0x4f8c('0x39')](_0x4f8c('0x56'),_0x8138cd[_0x4f8c('0x25')],util[_0x4f8c('0x29')](_0x3822b3,{'showHidden':![],'depth':null}));}};VoiceAgentReport[_0x4f8c('0x21')][_0x4f8c('0x15')]=function(_0x2a8a00){try{if(this[_0x4f8c('0x22')](_0x2a8a00)){logger[_0x4f8c('0x27')]('[%s][voiceAgentReport][queuecallerabandon]\x20event:',_0x2a8a00[_0x4f8c('0x25')],util['inspect'](_0x2a8a00,{'showHidden':![],'depth':null}));if(this[_0x4f8c('0x9')][_0x2a8a00[_0x4f8c('0x25')]]){for(var _0xa6d688 in this[_0x4f8c('0x9')][_0x2a8a00['uniqueid']]){if(this[_0x4f8c('0x9')][_0x2a8a00[_0x4f8c('0x25')]][_0x4f8c('0x57')](_0xa6d688)&&!this[_0x4f8c('0x9')][_0x2a8a00[_0x4f8c('0x25')]][_0xa6d688][_0x4f8c('0x11')]&&!this['channels'][_0x2a8a00[_0x4f8c('0x25')]][_0xa6d688][_0x4f8c('0x16')]){logger[_0x4f8c('0x3b')]('[%s][voiceAgentReport][queuecallerabandon]\x20agent:%s\x20destuniqueid:%s\x20lastevent:abandoned',_0x2a8a00[_0x4f8c('0x25')],this[_0x4f8c('0x9')][_0x2a8a00[_0x4f8c('0x25')]][_0xa6d688]['membername'],_0xa6d688);this['channels'][_0x2a8a00[_0x4f8c('0x25')]][_0xa6d688][_0x4f8c('0x11')]=!![];this['channels'][_0x2a8a00['uniqueid']][_0xa6d688][_0x4f8c('0x4b')]=moment()['format']('YYYY-MM-DD\x20HH:mm:ss');this['channels'][_0x2a8a00[_0x4f8c('0x25')]][_0xa6d688][_0x4f8c('0x4d')]='abandoned';this[_0x4f8c('0x9')][_0x2a8a00['uniqueid']][_0xa6d688][_0x4f8c('0x53')]=_0x4f8c('0x58');logger[_0x4f8c('0x27')]('[%s][voiceAgentReport][queuecallerabandon]\x20sending\x20agentqueuecallerabandon\x20event:',_0x2a8a00['uniqueid'],util[_0x4f8c('0x29')](this[_0x4f8c('0x9')][_0x2a8a00[_0x4f8c('0x25')]][_0xa6d688],{'showHidden':![],'depth':null}));ami[_0x4f8c('0x20')](_0x4f8c('0x59'),this[_0x4f8c('0x9')][_0x2a8a00[_0x4f8c('0x25')]][_0xa6d688]);}}}}}catch(_0x353a51){logger[_0x4f8c('0x39')]('[%s][voiceAgentReport][queuecallerabandon]',_0x2a8a00[_0x4f8c('0x25')],util[_0x4f8c('0x29')](_0x353a51,{'showHidden':![],'depth':null}));}};VoiceAgentReport[_0x4f8c('0x21')][_0x4f8c('0x17')]=function(_0x32c418){try{if(this[_0x4f8c('0x22')](_0x32c418)){logger[_0x4f8c('0x27')]('[%s][voiceAgentReport][agentcomplete]\x20event:',_0x32c418[_0x4f8c('0x25')],util[_0x4f8c('0x29')](_0x32c418,{'showHidden':![],'depth':null}));if(this[_0x4f8c('0x9')][_0x32c418[_0x4f8c('0x25')]]){for(var _0x35957a in this[_0x4f8c('0x9')][_0x32c418[_0x4f8c('0x25')]]){if(this[_0x4f8c('0x9')][_0x32c418['uniqueid']][_0x4f8c('0x57')](_0x35957a)){if(this['channels'][_0x32c418[_0x4f8c('0x25')]][_0x35957a]['agentconnectAt']&&!this['channels'][_0x32c418[_0x4f8c('0x25')]][_0x35957a][_0x4f8c('0x16')]){logger[_0x4f8c('0x3b')](_0x4f8c('0x5a'),_0x32c418[_0x4f8c('0x25')],this[_0x4f8c('0x9')][_0x32c418[_0x4f8c('0x25')]][_0x35957a][_0x4f8c('0x26')],_0x35957a);this[_0x4f8c('0x9')][_0x32c418[_0x4f8c('0x25')]][_0x35957a]['agentcomplete']=!![];this[_0x4f8c('0x9')][_0x32c418[_0x4f8c('0x25')]][_0x35957a]['agentcompleteAt']=moment()[_0x4f8c('0x2b')](_0x4f8c('0x2c'));this[_0x4f8c('0x9')][_0x32c418['uniqueid']][_0x35957a][_0x4f8c('0x4d')]=_0x4f8c('0x5b');this[_0x4f8c('0x9')][_0x32c418[_0x4f8c('0x25')]][_0x35957a][_0x4f8c('0x53')]=_0x32c418[_0x4f8c('0x53')]==_0x4f8c('0x5c')?_0x4f8c('0x5d'):_0x32c418[_0x4f8c('0x53')];this[_0x4f8c('0x9')][_0x32c418['uniqueid']][_0x35957a][_0x4f8c('0x5e')]=_0x32c418['talktime'];if(this[_0x4f8c('0xa')][_0x32c418[_0x4f8c('0x2a')]]&&this[_0x4f8c('0xa')][_0x32c418['queue']][_0x4f8c('0x5f')]){this['channels'][_0x32c418[_0x4f8c('0x25')]][_0x35957a][_0x4f8c('0x60')]=this[_0x4f8c('0xa')][_0x32c418[_0x4f8c('0x2a')]][_0x4f8c('0x61')];this[_0x4f8c('0x9')][_0x32c418[_0x4f8c('0x25')]][_0x35957a][_0x4f8c('0x62')]=!![];}this[_0x4f8c('0xb')][_0x32c418[_0x4f8c('0x44')]]=_[_0x4f8c('0x31')](this['agents'][_0x32c418[_0x4f8c('0x44')]],['queue',_0x4f8c('0x45')]);logger[_0x4f8c('0x27')](_0x4f8c('0x63'),_0x32c418[_0x4f8c('0x25')],util[_0x4f8c('0x29')](this[_0x4f8c('0x9')][_0x32c418['uniqueid']][_0x35957a],{'showHidden':![],'depth':null}));ami[_0x4f8c('0x20')](_0x4f8c('0x64'),this[_0x4f8c('0x9')][_0x32c418['uniqueid']][_0x35957a]);logger[_0x4f8c('0x27')](_0x4f8c('0x65'),_0x32c418[_0x4f8c('0x25')],util['inspect']({'id':this[_0x4f8c('0xb')][_0x32c418['interface']]['id'],'destaccountcode':_0x32c418[_0x4f8c('0x66')]},{'showHidden':![],'depth':null}));this[_0x4f8c('0x20')](util[_0x4f8c('0x2b')](_0x4f8c('0x37'),_0x32c418['membername']),_0x4f8c('0x67'),{'id':this['agents'][_0x32c418[_0x4f8c('0x44')]]['id'],'destaccountcode':Number(_0x32c418[_0x4f8c('0x66')])});}}}}}}catch(_0xc9e5a6){logger[_0x4f8c('0x39')](_0x4f8c('0x68'),_0x32c418[_0x4f8c('0x25')],util[_0x4f8c('0x29')](_0xc9e5a6,{'showHidden':![],'depth':null}));}};VoiceAgentReport[_0x4f8c('0x21')][_0x4f8c('0x18')]=function(_0x131a6d){try{if(this[_0x4f8c('0x22')](_0x131a6d)){logger['debug']('[%s][voiceAgentReport][varset]\x20event:',_0x131a6d['uniqueid'],util['inspect'](_0x131a6d,{'showHidden':![],'depth':null}));this[_0x4f8c('0x69')](_0x131a6d[_0x4f8c('0x25')],_[_0x4f8c('0x6a')](_0x131a6d[_0x4f8c('0x6b')])[0x0],_0x131a6d[_0x4f8c('0x6c')]);if(this[_0x4f8c('0x9')][_0x131a6d[_0x4f8c('0x25')]]){for(var _0xc6f508 in this[_0x4f8c('0x9')][_0x131a6d[_0x4f8c('0x25')]]){if(this[_0x4f8c('0x9')][_0x131a6d[_0x4f8c('0x25')]][_0x4f8c('0x57')](_0xc6f508)){logger[_0x4f8c('0x3b')](_0x4f8c('0x6d'),_0x131a6d[_0x4f8c('0x25')],_0xc6f508,_['keys'](_0x131a6d[_0x4f8c('0x6b')])[0x0],_0x131a6d['value']);if(_[_0x4f8c('0x23')](this['channels'][_0x131a6d['uniqueid']][_0xc6f508][_0x4f8c('0xc')])){this['channels'][_0x131a6d[_0x4f8c('0x25')]][_0xc6f508][_0x4f8c('0xc')]={};}this[_0x4f8c('0x9')][_0x131a6d[_0x4f8c('0x25')]][_0xc6f508][_0x4f8c('0xc')]=this['variables'][_0x131a6d[_0x4f8c('0x25')]];}}}}}catch(_0x698cf2){logger['error']('[%s][voiceAgentReport][varset]',_0x131a6d[_0x4f8c('0x25')],util[_0x4f8c('0x29')](_0x698cf2,{'showHidden':![],'depth':null}));}};VoiceAgentReport[_0x4f8c('0x21')]['addVariable']=function(_0x2315ff,_0x33eed2,_0x2b6edd){var _0x424bdf=['rtpaudioqos',_0x4f8c('0x6e'),_0x4f8c('0x6f'),'rtpaudioqosjitterbridged',_0x4f8c('0x70'),_0x4f8c('0x71'),_0x4f8c('0x72'),_0x4f8c('0x73'),_0x4f8c('0x74'),_0x4f8c('0x75'),_0x4f8c('0x76'),_0x4f8c('0x77'),_0x4f8c('0x78'),_0x4f8c('0x79'),_0x4f8c('0x7a'),_0x4f8c('0x7b'),_0x4f8c('0x26'),_0x4f8c('0x7c'),_0x4f8c('0x7d')];if(!_[_0x4f8c('0x7e')](_0x33eed2)&&!_['includes'](_0x424bdf,_0x33eed2)){if(_[_0x4f8c('0x23')](this[_0x4f8c('0xc')][_0x2315ff])){this['variables'][_0x2315ff]={};}this[_0x4f8c('0xc')][_0x2315ff][_0x33eed2]=_0x2b6edd;}};VoiceAgentReport[_0x4f8c('0x21')][_0x4f8c('0x7f')]=function(_0x50a277){try{if(this[_0x4f8c('0x22')](_0x50a277)){logger[_0x4f8c('0x27')](_0x4f8c('0x80'),_0x50a277[_0x4f8c('0x25')],util[_0x4f8c('0x29')](_0x50a277,{'showHidden':![],'depth':null}));if(this[_0x4f8c('0x9')][_0x50a277['uniqueid']]){for(var _0x5c17f1 in this[_0x4f8c('0x9')][_0x50a277[_0x4f8c('0x25')]]){if(this[_0x4f8c('0x9')][_0x50a277[_0x4f8c('0x25')]]['hasOwnProperty'](_0x5c17f1)){if(this[_0x4f8c('0x9')][_0x50a277[_0x4f8c('0x25')]][_0x5c17f1][_0x4f8c('0x53')]==_0x4f8c('0x5c')&&this['channels'][_0x50a277['uniqueid']][_0x5c17f1][_0x4f8c('0x16')]){logger[_0x4f8c('0x3b')]('[%s][voiceAgentReport][hangup]\x20destuniqueid:%s',_0x50a277[_0x4f8c('0x25')],_0x5c17f1);this['channels'][_0x50a277[_0x4f8c('0x25')]][_0x5c17f1][_0x4f8c('0x81')]=moment()['format'](_0x4f8c('0x2c'));}}}logger[_0x4f8c('0x27')](_0x4f8c('0x82'),_0x50a277[_0x4f8c('0x25')],util[_0x4f8c('0x29')](_[_0x4f8c('0x83')](this[_0x4f8c('0x9')][_0x50a277['uniqueid']]),{'showHidden':![],'depth':null}));ami[_0x4f8c('0x20')](_0x4f8c('0x84'),_['values'](this[_0x4f8c('0x9')][_0x50a277['uniqueid']]));delete this[_0x4f8c('0x9')][_0x50a277[_0x4f8c('0x25')]];}if(this[_0x4f8c('0xc')][_0x50a277['uniqueid']]){delete this[_0x4f8c('0xc')][_0x50a277[_0x4f8c('0x25')]];}}}catch(_0x4d2e89){logger[_0x4f8c('0x39')](_0x4f8c('0x85'),_0x50a277['uniqueid'],util[_0x4f8c('0x29')](_0x4d2e89,{'showHidden':![],'depth':null}));}};VoiceAgentReport[_0x4f8c('0x21')][_0x4f8c('0x1d')]=function(_0x5d8bb0){try{if(this[_0x4f8c('0x22')](_0x5d8bb0)){logger[_0x4f8c('0x27')](_0x4f8c('0x86'),_0x5d8bb0[_0x4f8c('0x25')],util[_0x4f8c('0x29')](_0x5d8bb0,{'showHidden':![],'depth':null}));if(this['channels'][_0x5d8bb0[_0x4f8c('0x87')]]){for(var _0x307095 in this[_0x4f8c('0x9')][_0x5d8bb0[_0x4f8c('0x87')]]){if(this[_0x4f8c('0x9')][_0x5d8bb0[_0x4f8c('0x87')]][_0x4f8c('0x57')](_0x307095)){if(_0x5d8bb0[_0x4f8c('0x88')]===_0x307095){logger[_0x4f8c('0x3b')]('[%s][voiceAgentReport][attendedtransfer]\x20agent:%s\x20destuniqueid:%s\x20lastevent:complete',_0x5d8bb0['uniqueid'],this[_0x4f8c('0x9')][_0x5d8bb0['transfereeuniqueid']][_0x307095][_0x4f8c('0x26')],_0x307095);var _0x3662c0=moment();this[_0x4f8c('0x9')][_0x5d8bb0[_0x4f8c('0x87')]][_0x307095][_0x4f8c('0x16')]=!![];this[_0x4f8c('0x9')][_0x5d8bb0[_0x4f8c('0x87')]][_0x307095][_0x4f8c('0x81')]=moment()[_0x4f8c('0x2b')](_0x4f8c('0x2c'));this[_0x4f8c('0x9')][_0x5d8bb0[_0x4f8c('0x87')]][_0x307095][_0x4f8c('0x4d')]=_0x4f8c('0x5b');this[_0x4f8c('0x9')][_0x5d8bb0[_0x4f8c('0x87')]][_0x307095][_0x4f8c('0x53')]=_0x4f8c('0x5c');this[_0x4f8c('0x9')][_0x5d8bb0[_0x4f8c('0x87')]][_0x307095][_0x4f8c('0x5e')]=_0x3662c0[_0x4f8c('0x89')](this[_0x4f8c('0x9')][_0x5d8bb0[_0x4f8c('0x87')]][_0x307095][_0x4f8c('0x8a')],'seconds');}}}}if(this[_0x4f8c('0x9')][_0x5d8bb0[_0x4f8c('0x8b')]]){var _0x1e1952=this[_0x4f8c('0x9')][_0x5d8bb0['secondtransfereruniqueid']];this[_0x4f8c('0x9')][_0x5d8bb0[_0x4f8c('0x8b')]]=this[_0x4f8c('0x9')][_0x5d8bb0['transfereeuniqueid']];this[_0x4f8c('0x9')][_0x5d8bb0[_0x4f8c('0x87')]]=_0x1e1952;}}}catch(_0x597fb7){logger[_0x4f8c('0x39')](_0x4f8c('0x8c'),_0x5d8bb0[_0x4f8c('0x25')],util['inspect'](_0x597fb7,{'showHidden':![],'depth':null}));}};VoiceAgentReport[_0x4f8c('0x21')][_0x4f8c('0x1f')]=function(_0x4fad7c){try{if(this[_0x4f8c('0x22')](_0x4fad7c)){logger[_0x4f8c('0x27')](_0x4f8c('0x8d'),_0x4fad7c[_0x4f8c('0x25')],util[_0x4f8c('0x29')](_0x4fad7c,{'showHidden':![],'depth':null}));if(this['channels'][_0x4fad7c[_0x4f8c('0x87')]]){for(var _0x532aaf in this['channels'][_0x4fad7c[_0x4f8c('0x87')]]){if(this[_0x4f8c('0x9')][_0x4fad7c[_0x4f8c('0x87')]][_0x4f8c('0x57')](_0x532aaf)){if(_0x4fad7c[_0x4f8c('0x8e')]===_0x532aaf){logger[_0x4f8c('0x3b')]('[%s][voiceAgentReport][blindtransfer]\x20agent:%s\x20destuniqueid:%s\x20lastevent:complete',_0x4fad7c[_0x4f8c('0x25')],this[_0x4f8c('0x9')][_0x4fad7c[_0x4f8c('0x87')]][_0x532aaf][_0x4f8c('0x26')],_0x532aaf);var _0x58cdf1=moment();this[_0x4f8c('0x9')][_0x4fad7c[_0x4f8c('0x87')]][_0x532aaf]['agentcomplete']=!![];this[_0x4f8c('0x9')][_0x4fad7c[_0x4f8c('0x87')]][_0x532aaf][_0x4f8c('0x81')]=_0x58cdf1;this['channels'][_0x4fad7c[_0x4f8c('0x87')]][_0x532aaf][_0x4f8c('0x4d')]=_0x4f8c('0x5b');this[_0x4f8c('0x9')][_0x4fad7c['transfereeuniqueid']][_0x532aaf]['reason']=_0x4f8c('0x5c');this['channels'][_0x4fad7c[_0x4f8c('0x87')]][_0x532aaf][_0x4f8c('0x5e')]=_0x58cdf1[_0x4f8c('0x89')](this[_0x4f8c('0x9')][_0x4fad7c['transfereeuniqueid']][_0x532aaf][_0x4f8c('0x8a')],_0x4f8c('0x8f'));}}}}}}catch(_0x3dabfb){logger[_0x4f8c('0x39')]('[%s][voiceAgentReport][blindtransfer]',_0x4fad7c[_0x4f8c('0x25')],util[_0x4f8c('0x29')](_0x3dabfb,{'showHidden':![],'depth':null}));}};VoiceAgentReport[_0x4f8c('0x21')][_0x4f8c('0x90')]=function(_0x2690fa){var _0x2747dc='';try{if(this[_0x4f8c('0x22')](_0x2690fa)){logger[_0x4f8c('0x27')](_0x4f8c('0x91'),_0x2690fa[_0x4f8c('0x25')],util['inspect'](_0x2690fa,{'showHidden':![],'depth':null}));if(_0x2690fa[_0x4f8c('0x92')]){_0x2747dc=_0x2690fa[_0x4f8c('0x92')]['substring'](0x0,_0x2690fa[_0x4f8c('0x92')][_0x4f8c('0x93')]('-'));if(this['agents'][_0x2747dc]){logger[_0x4f8c('0x3b')](_0x4f8c('0x94'),_0x2690fa[_0x4f8c('0x25')],_0x2747dc);this[_0x4f8c('0xb')][_0x2747dc]['onhold']=!![];}}}}catch(_0x3847c6){logger[_0x4f8c('0x39')](_0x4f8c('0x95'),_0x2690fa[_0x4f8c('0x25')],util[_0x4f8c('0x29')](_0x3847c6,{'showHidden':![],'depth':null}));}};VoiceAgentReport[_0x4f8c('0x21')]['syncMusicOnHoldStop']=function(_0x4ebeb4){var _0x534acf='';try{if(this[_0x4f8c('0x22')](_0x4ebeb4)){logger[_0x4f8c('0x27')](_0x4f8c('0x96'),_0x4ebeb4[_0x4f8c('0x25')],util['inspect'](_0x4ebeb4,{'showHidden':![],'depth':null}));if(_0x4ebeb4[_0x4f8c('0x92')]){_0x534acf=_0x4ebeb4['channel'][_0x4f8c('0x97')](0x0,_0x4ebeb4[_0x4f8c('0x92')][_0x4f8c('0x93')]('-'));if(this[_0x4f8c('0xb')][_0x534acf]){logger[_0x4f8c('0x3b')](_0x4f8c('0x98'),_0x4ebeb4[_0x4f8c('0x25')],_0x534acf);this[_0x4f8c('0xb')][_0x534acf]['onhold']=![];}}}}catch(_0x475acf){logger['error'](_0x4f8c('0x99'),_0x4ebeb4[_0x4f8c('0x25')],util[_0x4f8c('0x29')](_0x475acf,{'showHidden':![],'depth':null}));}};module[_0x4f8c('0x9a')]=VoiceAgentReport; \ No newline at end of file diff --git a/server/services/ami/report/voiceCallReport.js b/server/services/ami/report/voiceCallReport.js index 3c7c813..1278988 100644 --- a/server/services/ami/report/voiceCallReport.js +++ b/server/services/ami/report/voiceCallReport.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x1847=['webbar:stopmonitors','event','outbound','[%s][voiceCallReport][hangup]\x20sending\x20hangup\x20event:','[%s][voiceCallReport][attendedtransfer]\x20transfercalleridnum:%s\x20transferconnectedlinenum:%s','origtransferercalleridnum','[%s][voiceCallReport][attendedtransfer]\x20event:','transfereeuniqueid','secondtransfereruniqueid','ATTENDED','transfertargetuniqueid','transferconnectedlinenum','transfertargetcalleridnum','origtransfereruniqueid','some','origtransfererlinkedid','routeid','syncBlindTransfer','transfereecalleridnum','extension','BlindTransfer','transfereruniqueid','transfererchannel','BLIND','[%s][voiceCallReport][blindtransfer]','[%s][voiceCallReport][musiconholdstart]\x20event:','[%s][voiceCallReport][musiconholdstart]\x20mohstarttime:%s','mohstarttime','[%s][voiceCallReport][musiconholdstop]\x20event:','mohtime','milliseconds','[%s][voiceCallReport][musiconholdstop]\x20mohtime:%s','[%s][voiceCallReport][musiconholdstop]','exports','ioredis','../../../config/logger','ami','../ami','../model/channel','../rpc/setting','set','dial','playback','voicemail','NO\x20ANSWER','FAILED','defaults','redis','socket.io-emitter','channels','agents','blindTransfers','syncNewExten','bind','newexten','syncNewChannel','newstate','syncNewState','varset','hangup','syncHangup','newcallerid','syncNewCallerId','attendedtransfer','syncAttendedTransfer','musiconholdstart','syncMusicOnHoldStart','musiconholdstop','syncMusicOnHoldStop','info','[voiceCallReport][coreshowchannels]\x20started','actionCoreShowChannels','error','[voiceCallReport][coreshowchannels]','inspect','isNotNull','prototype','emit','[%s][voiceCallReport][newcallerid]\x20calleridname:%s\x20calleridnum:%s','uniqueid','calleridname','calleridnum','debug','[%s][voiceCallReport][newcallerid]\x20event:','isUndefined','pick','context','from-sip','channel','split','xcally-motion-preview','destconnectedlinenum','user:%s','name','accountcode','connectedlinenum','[%s][voiceCallReport][newcallerid]','[%s][voiceCallReport][newchannel]\x20event:','OutgoingSpoolFailed','linkedid','starttime','format','YYYY-MM-DD\x20HH:mm:ss','disposition','channelstate','merge','keys','undefined','exten','[%s][voiceCallReport][newchannel]\x20sending\x20user:agentconnect\x20event:','user:agentconnect','[%s][voiceCallReport][newexten]\x20event:','application','toLowerCase','applicationdata','appdata','startsWith','CDR(routeAlias)','[%s][voiceCallReport][newexten]\x20application:%s\x20appdata:%s','subtract','duration','seconds','includes','lastapplication','lastdata','cdr(','match','type','isNil','[%s][voiceCallReport][newexten]','[%s][voiceCallReport][newstate]\x20linkedid:%s\x20calleridname:%s\x20calleridnum:%s','[%s][voiceCallReport][newstate]\x20event:','answertime','holdtime','connectedlinename','destinationchannel','UserId','answered','diff','toNumber','membername','queue','routealias','[%s][voiceCallReport][newstate]\x20sending\x20user:agentconnect\x20event:','syncMixMonitorFilename','[%s][voiceCallReport][mixMonitorFilename]\x20monitorFilename:%s','monitor','endsWith','.wav49','replace','.WAV','monitorFilename','find','monitors','push','rec','[%s][voiceCallReport][mixMonitorFilename]','[%s][voiceCallReport][varset]\x20event:','variable','mixmonitor_filename','value','xmd-phone','[%s][voiceCallReport][varset]\x20variable:xmd-phone\x20value:%s','xmd-callerid','callerid','[%s][voiceCallReport][varset]\x20variable:xmd-cdrtype\x20value:%s','xmd-queue','xmd-originatecalleridnum','originatecalleridnum','xmd-destination','[%s][voiceCallReport][varset]\x20variable:xmd-destination\x20value:%s','destination','[%s][voiceCallReport][varset]\x20variable:xmd-callerid-preview\x20value:%s','calleridpreview','sipcallid','[%s][voiceCallReport][varset]\x20variable:sipcallid\x20value:%s','parse','sipcalllinkedid','[%s][voiceCallReport][varset]','[%s][voiceCallReport][hangup]\x20event:','[%s][voiceCallReport][hangup]\x20reason:%s','cause-txt','endtime','billableseconds','omit','[%s][voiceCallReport][hangup]\x20sending\x20user:agentcomplete\x20event:','user:agentcomplete','length','transferType','resolve','then','isEmpty','stopRecordingOnTransfer','Action','StopMixMonitor','catch','finally'];(function(_0x50bf5a,_0x807bba){var _0x4ddc1d=function(_0x349a61){while(--_0x349a61){_0x50bf5a['push'](_0x50bf5a['shift']());}};_0x4ddc1d(++_0x807bba);}(_0x1847,0xe7));var _0x7184=function(_0x441819,_0x5b8d0a){_0x441819=_0x441819-0x0;var _0x478882=_0x1847[_0x441819];return _0x478882;};'use strict';var _=require('lodash');var moment=require('moment');var util=require('util');var path=require('path');var Redis=require(_0x7184('0x0'));var config=require('../../../config/environment');var logger=require(_0x7184('0x1'))(_0x7184('0x2'));var ami=require(_0x7184('0x3'));var Channel=require(_0x7184('0x4'));var RpcSetting=require(_0x7184('0x5'));var applications=[_0x7184('0x6'),'queue','agi',_0x7184('0x7'),_0x7184('0x8'),_0x7184('0x9')];var dispositions=[_0x7184('0xa'),_0x7184('0xb'),_0x7184('0xb'),_0x7184('0xa'),'NO\x20ANSWER',_0x7184('0xa'),'ANSWERED','BUSY','FAILED','FAILED','FAILED'];config['redis']=_[_0x7184('0xc')](config[_0x7184('0xd')],{'host':'localhost','port':0x18eb});var io=require(_0x7184('0xe'))(new Redis(config[_0x7184('0xd')]));function VoiceCallReport(_0x56dacb){this[_0x7184('0xf')]=_0x56dacb['channels'];this[_0x7184('0x10')]=_0x56dacb[_0x7184('0x10')];this[_0x7184('0x11')]={};ami['on']('coreshowchannel',this[_0x7184('0x12')][_0x7184('0x13')](this));ami['on'](_0x7184('0x14'),this[_0x7184('0x12')][_0x7184('0x13')](this));ami['on']('newchannel',this[_0x7184('0x15')][_0x7184('0x13')](this));ami['on'](_0x7184('0x16'),this[_0x7184('0x17')]['bind'](this));ami['on'](_0x7184('0x18'),this['syncVarSet'][_0x7184('0x13')](this));ami['on'](_0x7184('0x19'),this[_0x7184('0x1a')][_0x7184('0x13')](this));ami['on'](_0x7184('0x1b'),this[_0x7184('0x1c')][_0x7184('0x13')](this));ami['on'](_0x7184('0x1d'),this[_0x7184('0x1e')][_0x7184('0x13')](this));ami['on']('blindtransfer',this['syncBlindTransfer'][_0x7184('0x13')](this));ami['on'](_0x7184('0x1f'),this[_0x7184('0x20')][_0x7184('0x13')](this));ami['on'](_0x7184('0x21'),this[_0x7184('0x22')][_0x7184('0x13')](this));try{logger[_0x7184('0x23')](_0x7184('0x24'));ami[_0x7184('0x25')]();}catch(_0x38f996){logger[_0x7184('0x26')](_0x7184('0x27'),util[_0x7184('0x28')](_0x38f996,{'showHidden':![],'depth':null}));}}VoiceCallReport['prototype'][_0x7184('0x29')]=function(_0x259353){return _0x259353!==null&&!_['isUndefined'](_0x259353);};VoiceCallReport[_0x7184('0x2a')][_0x7184('0x2b')]=function(_0x41152d,_0x5183f0,_0xa8964a){io['to'](_0x41152d)[_0x7184('0x2b')](_0x5183f0,_0xa8964a);};VoiceCallReport[_0x7184('0x2a')]['syncNewCallerId']=function(_0x3d22a0){try{if(this[_0x7184('0x29')](_0x3d22a0)){logger[_0x7184('0x23')](_0x7184('0x2c'),_0x3d22a0[_0x7184('0x2d')],_0x3d22a0[_0x7184('0x2e')],_0x3d22a0[_0x7184('0x2f')]);logger[_0x7184('0x30')](_0x7184('0x31'),_0x3d22a0[_0x7184('0x2d')],util[_0x7184('0x28')](_0x3d22a0,{'showHidden':![],'depth':null}));if(_0x3d22a0[_0x7184('0x2d')]===_0x3d22a0['linkedid']){if(!_[_0x7184('0x32')](this[_0x7184('0xf')][_0x3d22a0[_0x7184('0x2d')]])){_['merge'](this['channels'][_0x3d22a0[_0x7184('0x2d')]],_[_0x7184('0x33')](_0x3d22a0,_['keys'](this[_0x7184('0xf')][_0x3d22a0['uniqueid']])));}}if(_0x3d22a0[_0x7184('0x34')]===_0x7184('0x35')){if(this['agents'][_0x3d22a0[_0x7184('0x36')][_0x7184('0x37')]('-')[0x0]]){if(_0x3d22a0['exten']==_0x7184('0x38')){this['agents'][_0x3d22a0[_0x7184('0x36')]['split']('-')[0x0]][_0x7184('0x39')]=_0x3d22a0['connectedlinenum'];this[_0x7184('0x2b')](util['format'](_0x7184('0x3a'),this[_0x7184('0x10')][_0x3d22a0['channel'][_0x7184('0x37')]('-')[0x0]][_0x7184('0x3b')]),'user:agentconnect',{'destaccountcode':this[_0x7184('0x10')][_0x3d22a0[_0x7184('0x36')][_0x7184('0x37')]('-')[0x0]][_0x7184('0x3c')],'destconnectedlinenum':_0x3d22a0[_0x7184('0x3d')]});}}}}}catch(_0x11ee80){logger[_0x7184('0x26')](_0x7184('0x3e'),_0x3d22a0[_0x7184('0x2d')],util[_0x7184('0x28')](_0x11ee80,{'showHidden':![],'depth':null}));}};VoiceCallReport[_0x7184('0x2a')][_0x7184('0x15')]=function(_0x59fd49){try{if(this['isNotNull'](_0x59fd49)){logger[_0x7184('0x30')](_0x7184('0x3f'),_0x59fd49[_0x7184('0x2d')],util['inspect'](_0x59fd49,{'showHidden':![],'depth':null}));if(this['channels'][_0x59fd49['uniqueid']]){return;}if(_0x59fd49[_0x7184('0x36')]===_0x7184('0x40')){return;}if(_0x59fd49['uniqueid']!==_0x59fd49['linkedid']&&!this['blindTransfers'][_0x59fd49[_0x7184('0x41')]]){return;}logger[_0x7184('0x23')]('[%s][voiceCallReport][newchannel]\x20context:%s\x20exten:%s',_0x59fd49['uniqueid'],_0x59fd49[_0x7184('0x34')],_0x59fd49['exten']);this['channels'][_0x59fd49[_0x7184('0x2d')]]=new Channel();this[_0x7184('0xf')][_0x59fd49['uniqueid']][_0x7184('0x42')]=moment()[_0x7184('0x43')](_0x7184('0x44'));this['channels'][_0x59fd49['uniqueid']][_0x7184('0x45')]=dispositions[_['toNumber'](_0x59fd49[_0x7184('0x46')])];_[_0x7184('0x47')](this[_0x7184('0xf')][_0x59fd49[_0x7184('0x2d')]],_[_0x7184('0x33')](_0x59fd49,_[_0x7184('0x48')](this[_0x7184('0xf')][_0x59fd49['uniqueid']])));if(_0x59fd49[_0x7184('0x34')]===_0x7184('0x35')){var _0x404510=this[_0x7184('0x10')][_0x59fd49[_0x7184('0x36')][_0x7184('0x37')]('-')[0x0]];if(_0x404510&&typeof _0x404510['destconnectedlinenum']===_0x7184('0x49')){_0x404510[_0x7184('0x39')]=_0x59fd49[_0x7184('0x4a')];logger['debug'](_0x7184('0x4b'),_0x59fd49[_0x7184('0x2d')],util[_0x7184('0x28')]({'id':_0x404510['id'],'destaccountcode':_0x404510['accountcode'],'destconnectedlinenum':_0x59fd49['exten']},{'showHidden':![],'depth':null}));this[_0x7184('0x2b')](util['format'](_0x7184('0x3a'),_0x404510['name']),_0x7184('0x4c'),{'id':_0x404510['id'],'destaccountcode':_0x404510[_0x7184('0x3c')],'destconnectedlinenum':_0x59fd49[_0x7184('0x4a')]});}}}}catch(_0x376d70){logger['error']('[%s][voiceCallReport][newchannel]',_0x59fd49[_0x7184('0x2d')],util[_0x7184('0x28')](_0x376d70,{'showHidden':![],'depth':null}));}};VoiceCallReport[_0x7184('0x2a')]['syncNewExten']=function(_0x4a212c){try{if(this[_0x7184('0x29')](_0x4a212c)){logger['debug'](_0x7184('0x4d'),_0x4a212c[_0x7184('0x2d')],util['inspect'](_0x4a212c,{'showHidden':![],'depth':null}));if(_0x4a212c[_0x7184('0x36')]==='OutgoingSpoolFailed'||_0x4a212c[_0x7184('0x4a')]==='h')return;if(_0x4a212c[_0x7184('0x2d')]===_0x4a212c['linkedid']||this['blindTransfers'][_0x4a212c['linkedid']]){_0x4a212c[_0x7184('0x4e')]=_0x4a212c[_0x7184('0x4e')]?_0x4a212c[_0x7184('0x4e')][_0x7184('0x4f')]():undefined;_0x4a212c[_0x7184('0x50')]=_0x4a212c[_0x7184('0x51')]||_0x4a212c[_0x7184('0x50')];if(_0x4a212c['appdata']&&!_0x4a212c[_0x7184('0x51')][_0x7184('0x52')](_0x7184('0x53'))&&_0x4a212c['application']!=='queue'){_0x4a212c[_0x7184('0x50')]=_0x4a212c[_0x7184('0x50')][_0x7184('0x4f')]();}logger[_0x7184('0x23')](_0x7184('0x54'),_0x4a212c[_0x7184('0x2d')],_0x4a212c['application'],_0x4a212c['applicationdata']);if(_[_0x7184('0x32')](this[_0x7184('0xf')][_0x4a212c['uniqueid']])){this[_0x7184('0xf')][_0x4a212c[_0x7184('0x2d')]]=new Channel();this[_0x7184('0xf')][_0x4a212c[_0x7184('0x2d')]][_0x7184('0x42')]=_0x4a212c['duration']?moment()[_0x7184('0x55')](moment[_0x7184('0x56')](_0x4a212c[_0x7184('0x56')])[_0x7184('0x57')](),_0x7184('0x57'))[_0x7184('0x43')](_0x7184('0x44')):moment()['format'](_0x7184('0x44'));this['channels'][_0x4a212c['uniqueid']][_0x7184('0x45')]=_0x7184('0xa');}_[_0x7184('0x47')](this['channels'][_0x4a212c['uniqueid']],_[_0x7184('0x33')](_0x4a212c,_[_0x7184('0x48')](this[_0x7184('0xf')][_0x4a212c[_0x7184('0x2d')]])));if(_[_0x7184('0x58')](applications,_0x4a212c[_0x7184('0x4e')])){this[_0x7184('0xf')][_0x4a212c['uniqueid']][_0x7184('0x59')]=_0x4a212c[_0x7184('0x4e')];this[_0x7184('0xf')][_0x4a212c['uniqueid']][_0x7184('0x5a')]=_0x4a212c[_0x7184('0x50')];if(_0x4a212c[_0x7184('0x4e')]===_0x7184('0x6')&&_[_0x7184('0x52')](_0x4a212c['applicationdata'][_0x7184('0x4f')](),_0x7184('0x5b'))){var _0x4289c4=_0x4a212c['applicationdata'][_0x7184('0x37')]('=');var _0x3849c8=_0x4289c4[0x0]['toLowerCase']()[_0x7184('0x5c')](/cdr\((.*)\)/);if(_0x3849c8){if(_0x3849c8[0x1]===_0x7184('0x5d')&&!_[_0x7184('0x5e')](this[_0x7184('0xf')][_0x4a212c[_0x7184('0x2d')]][_0x3849c8[0x1]]))return;this[_0x7184('0xf')][_0x4a212c[_0x7184('0x2d')]][_0x3849c8[0x1]]=_0x4289c4[0x1];}}else if(_0x4a212c[_0x7184('0x4e')]==='queue'){this[_0x7184('0xf')][_0x4a212c[_0x7184('0x2d')]]['queue']=_0x4a212c[_0x7184('0x50')]['split'](',')[0x0];}}}}}catch(_0x345bc8){logger[_0x7184('0x26')](_0x7184('0x5f'),_0x4a212c['uniqueid'],util[_0x7184('0x28')](_0x345bc8,{'showHidden':![],'depth':null}));}};VoiceCallReport[_0x7184('0x2a')][_0x7184('0x17')]=function(_0x31f9fb){try{if(this[_0x7184('0x29')](_0x31f9fb)){logger['info'](_0x7184('0x60'),_0x31f9fb['uniqueid'],_0x31f9fb[_0x7184('0x41')],_0x31f9fb[_0x7184('0x2e')],_0x31f9fb[_0x7184('0x2f')]);logger[_0x7184('0x30')](_0x7184('0x61'),_0x31f9fb[_0x7184('0x2d')],util[_0x7184('0x28')](_0x31f9fb,{'showHidden':![],'depth':null}));if(_0x31f9fb[_0x7184('0x46')]!=='6')return;var _0x48e8e6=this['agents'][_0x31f9fb[_0x7184('0x36')]['split']('-')[0x0]];if(_0x31f9fb[_0x7184('0x2d')]!==_0x31f9fb['linkedid']){var _0x37f3ce=moment();if(this[_0x7184('0xf')][_0x31f9fb[_0x7184('0x41')]]){if(!this[_0x7184('0xf')][_0x31f9fb['linkedid']]['answered']){this[_0x7184('0xf')][_0x31f9fb[_0x7184('0x41')]]['answered']=!![];this[_0x7184('0xf')][_0x31f9fb['linkedid']][_0x7184('0x62')]=_0x37f3ce[_0x7184('0x43')](_0x7184('0x44'));if(this[_0x7184('0xf')][_0x31f9fb[_0x7184('0x41')]][_0x7184('0x42')]){this[_0x7184('0xf')][_0x31f9fb[_0x7184('0x41')]][_0x7184('0x63')]=_0x37f3ce['diff'](this[_0x7184('0xf')][_0x31f9fb[_0x7184('0x41')]][_0x7184('0x42')],_0x7184('0x57'));}}this[_0x7184('0xf')][_0x31f9fb[_0x7184('0x41')]][_0x7184('0x41')]=_0x31f9fb['uniqueid'];if(_0x31f9fb['calleridnum']!=='xcally-motion-preview'){this[_0x7184('0xf')][_0x31f9fb[_0x7184('0x41')]][_0x7184('0x3d')]=_0x31f9fb['calleridnum'];}this[_0x7184('0xf')][_0x31f9fb[_0x7184('0x41')]][_0x7184('0x64')]=_0x31f9fb['calleridname'];this[_0x7184('0xf')][_0x31f9fb[_0x7184('0x41')]][_0x7184('0x65')]=_0x31f9fb['channel'];this[_0x7184('0xf')][_0x31f9fb[_0x7184('0x41')]][_0x7184('0x45')]=dispositions[_['toNumber'](_0x31f9fb[_0x7184('0x46')])];if(_0x48e8e6){this[_0x7184('0xf')][_0x31f9fb[_0x7184('0x41')]][_0x7184('0x66')]=_0x48e8e6['id'];this[_0x7184('0xf')][_0x31f9fb[_0x7184('0x41')]]['membername']=_0x48e8e6[_0x7184('0x3b')];}}if(this['channels'][_0x31f9fb['uniqueid']]){if(!this['channels'][_0x31f9fb['uniqueid']][_0x7184('0x67')]){this[_0x7184('0xf')][_0x31f9fb['uniqueid']]['answered']=!![];this[_0x7184('0xf')][_0x31f9fb[_0x7184('0x2d')]][_0x7184('0x62')]=_0x37f3ce[_0x7184('0x43')]('YYYY-MM-DD\x20HH:mm:ss');if(this[_0x7184('0xf')][_0x31f9fb['uniqueid']][_0x7184('0x42')]){this[_0x7184('0xf')][_0x31f9fb['uniqueid']][_0x7184('0x63')]=_0x37f3ce[_0x7184('0x68')](this[_0x7184('0xf')][_0x31f9fb[_0x7184('0x2d')]]['starttime'],_0x7184('0x57'));}}if(_0x31f9fb[_0x7184('0x2f')]!=='xcally-motion-preview'){this['channels'][_0x31f9fb['uniqueid']]['connectedlinenum']=_0x31f9fb['calleridnum'];}this[_0x7184('0xf')][_0x31f9fb[_0x7184('0x2d')]][_0x7184('0x64')]=_0x31f9fb['calleridname'];this[_0x7184('0xf')][_0x31f9fb[_0x7184('0x2d')]][_0x7184('0x65')]=_0x31f9fb[_0x7184('0x36')];this[_0x7184('0xf')][_0x31f9fb[_0x7184('0x2d')]][_0x7184('0x45')]=dispositions[_[_0x7184('0x69')](_0x31f9fb[_0x7184('0x46')])];}}else{if(this[_0x7184('0xf')][_0x31f9fb[_0x7184('0x2d')]]){if(_0x48e8e6){this[_0x7184('0xf')][_0x31f9fb[_0x7184('0x2d')]][_0x7184('0x66')]=_0x48e8e6['id'];this[_0x7184('0xf')][_0x31f9fb['uniqueid']][_0x7184('0x6a')]=_0x48e8e6[_0x7184('0x3b')];}}}if(_0x31f9fb[_0x7184('0x34')]===_0x7184('0x35')){if(_0x48e8e6){_0x48e8e6['destconnectedlinenum']=_0x31f9fb[_0x7184('0x4a')];var _0x2aa21c,_0x1560b1;if(this[_0x7184('0xf')][_0x31f9fb[_0x7184('0x2d')]]){_0x2aa21c=this[_0x7184('0xf')][_0x31f9fb[_0x7184('0x2d')]]['routealias'];_0x1560b1=this[_0x7184('0xf')][_0x31f9fb[_0x7184('0x2d')]][_0x7184('0x6b')];}else if(this[_0x7184('0xf')][_0x31f9fb[_0x7184('0x41')]]){_0x2aa21c=this['channels'][_0x31f9fb[_0x7184('0x41')]][_0x7184('0x6c')];_0x1560b1=this[_0x7184('0xf')][_0x31f9fb[_0x7184('0x41')]]['queue'];}_0x48e8e6['queue']=_0x1560b1;_0x48e8e6[_0x7184('0x6c')]=_0x2aa21c;var _0x7468b4={'id':_0x48e8e6['id'],'name':_0x48e8e6[_0x7184('0x3b')],'agentconnected':!![],'destaccountcode':_0x48e8e6[_0x7184('0x3c')],'destconnectedlinenum':_0x31f9fb[_0x7184('0x4a')],'queue':_0x1560b1||undefined,'routealias':_0x2aa21c,'uniqueid':_0x31f9fb[_0x7184('0x41')]};logger['debug'](_0x7184('0x6d'),_0x31f9fb[_0x7184('0x2d')],util[_0x7184('0x28')](_0x7468b4,{'showHidden':![],'depth':null}));this[_0x7184('0x2b')](util[_0x7184('0x43')]('user:%s',_0x48e8e6[_0x7184('0x3b')]),_0x7184('0x4c'),_0x7468b4);}}}}catch(_0x5363d7){logger[_0x7184('0x26')]('[%s][voiceCallReport][newstate]',_0x31f9fb[_0x7184('0x2d')],util[_0x7184('0x28')](_0x5363d7,{'showHidden':![],'depth':null}));}};VoiceCallReport[_0x7184('0x2a')][_0x7184('0x6e')]=function(_0x2b30d5,_0x55b335){try{if(this[_0x7184('0xf')][_0x2b30d5]){logger['info'](_0x7184('0x6f'),_0x2b30d5,_0x55b335);this['channels'][_0x2b30d5][_0x7184('0x70')]=!![];if(_[_0x7184('0x71')](_0x55b335,_0x7184('0x72'))){_0x55b335=_0x55b335[_0x7184('0x73')](_0x7184('0x72'),_0x7184('0x74'));}this[_0x7184('0xf')][_0x2b30d5][_0x7184('0x75')]=_0x55b335;var _0x210150=_[_0x7184('0x76')](this[_0x7184('0xf')][_0x2b30d5][_0x7184('0x77')],{'filename':_0x55b335});if(_['isNil'](_0x210150)){this[_0x7184('0xf')][_0x2b30d5][_0x7184('0x77')][_0x7184('0x78')]({'filename':_0x55b335,'createdAt':moment()[_0x7184('0x43')]('YYYY-MM-DD\x20HH:mm:ss'),'mixmonitorid':'','status':_0x7184('0x79')});}}}catch(_0x5e35fa){logger[_0x7184('0x26')](_0x7184('0x7a'),_0x2b30d5,util['inspect'](_0x5e35fa,{'showHidden':![],'depth':null}));}};VoiceCallReport[_0x7184('0x2a')]['syncVarSet']=function(_0x4daa78){try{if(this[_0x7184('0x29')](_0x4daa78)){logger[_0x7184('0x30')](_0x7184('0x7b'),_0x4daa78[_0x7184('0x2d')],util['inspect'](_0x4daa78,{'showHidden':![],'depth':null}));if(this[_0x7184('0xf')][_0x4daa78[_0x7184('0x2d')]]&&_0x4daa78[_0x7184('0x36')]!='OutgoingSpoolFailed'){if(this[_0x7184('0x29')](_0x4daa78[_0x7184('0x7c')])){if(this[_0x7184('0x29')](_0x4daa78[_0x7184('0x7c')][_0x7184('0x7d')])){logger[_0x7184('0x23')]('[%s][voiceCallReport][varset]\x20variable:mixmonitor_filename\x20value:%s',_0x4daa78[_0x7184('0x2d')],_0x4daa78['value']);this['syncMixMonitorFilename'](_0x4daa78[_0x7184('0x2d')],_0x4daa78[_0x7184('0x7e')]);}else if(this[_0x7184('0x29')](_0x4daa78[_0x7184('0x7c')][_0x7184('0x7f')])){logger[_0x7184('0x23')](_0x7184('0x80'),_0x4daa78[_0x7184('0x2d')],_0x4daa78[_0x7184('0x7e')]);this[_0x7184('0xf')][_0x4daa78[_0x7184('0x2d')]][_0x7184('0x2f')]=_0x4daa78[_0x7184('0x7e')];}else if(this['isNotNull'](_0x4daa78[_0x7184('0x7c')][_0x7184('0x81')])){logger[_0x7184('0x23')]('[%s][voiceCallReport][varset]\x20variable:xmd-callerid\x20value:%s',_0x4daa78[_0x7184('0x2d')],_0x4daa78[_0x7184('0x7e')]);this[_0x7184('0xf')][_0x4daa78[_0x7184('0x2d')]][_0x7184('0x82')]=_0x4daa78[_0x7184('0x7e')];}else if(this['isNotNull'](_0x4daa78[_0x7184('0x7c')]['xmd-cdrtype'])){logger['info'](_0x7184('0x83'),_0x4daa78[_0x7184('0x2d')],_0x4daa78[_0x7184('0x7e')]);this[_0x7184('0xf')][_0x4daa78[_0x7184('0x2d')]][_0x7184('0x5d')]=_0x4daa78[_0x7184('0x7e')];}else if(this[_0x7184('0x29')](_0x4daa78[_0x7184('0x7c')][_0x7184('0x84')])){logger[_0x7184('0x23')]('[%s][voiceCallReport][varset]\x20variable:xmd-queue\x20value:%s',_0x4daa78[_0x7184('0x2d')],_0x4daa78['value'][_0x7184('0x37')](',')[0x0]);this[_0x7184('0xf')][_0x4daa78[_0x7184('0x2d')]][_0x7184('0x6b')]=_0x4daa78['value'][_0x7184('0x37')](',')[0x0];}else if(this[_0x7184('0x29')](_0x4daa78[_0x7184('0x7c')][_0x7184('0x85')])){logger['info']('[%s][voiceCallReport][varset]\x20variable:xmd-originatecalleridnum\x20value:%s',_0x4daa78[_0x7184('0x2d')],_0x4daa78[_0x7184('0x7e')]);this['channels'][_0x4daa78[_0x7184('0x2d')]][_0x7184('0x86')]=_0x4daa78[_0x7184('0x7e')];}else if(this[_0x7184('0x29')](_0x4daa78[_0x7184('0x7c')][_0x7184('0x87')])){logger['info'](_0x7184('0x88'),_0x4daa78[_0x7184('0x2d')],_0x4daa78[_0x7184('0x7e')]);this[_0x7184('0xf')][_0x4daa78[_0x7184('0x2d')]][_0x7184('0x89')]=_0x4daa78[_0x7184('0x7e')];}else if(this[_0x7184('0x29')](_0x4daa78[_0x7184('0x7c')]['xmd-callerid-preview'])){logger[_0x7184('0x23')](_0x7184('0x8a'),_0x4daa78[_0x7184('0x2d')],_0x4daa78[_0x7184('0x7e')]);this[_0x7184('0xf')][_0x4daa78[_0x7184('0x2d')]][_0x7184('0x8b')]=_0x4daa78['value'];}else if(this['isNotNull'](_0x4daa78[_0x7184('0x7c')]['xmcs-queue'])){logger[_0x7184('0x23')]('[%s][voiceCallReport][varset]\x20variable:xmcs-queue\x20value:%s',_0x4daa78[_0x7184('0x2d')],_0x4daa78[_0x7184('0x7e')]);this[_0x7184('0xf')][_0x4daa78[_0x7184('0x2d')]]['queue']=_0x4daa78[_0x7184('0x7e')];}else if(this[_0x7184('0x29')](_0x4daa78[_0x7184('0x7c')][_0x7184('0x8c')])){logger['info'](_0x7184('0x8d'),_0x4daa78[_0x7184('0x2d')],_0x4daa78['value']);this[_0x7184('0xf')][_0x4daa78['uniqueid']]['sipcalluniqueid']=_0x4daa78[_0x7184('0x7e')];}}}else if(this[_0x7184('0x29')](_0x4daa78['variable'][_0x7184('0x7d')])){if(_0x4daa78[_0x7184('0x7e')]){var _0x2931a2=path[_0x7184('0x8e')](_0x4daa78[_0x7184('0x7e')])[_0x7184('0x3b')];logger[_0x7184('0x23')]('[%s][voiceCallReport][varset]\x20variable:mixmonitor_filename\x20value:%s',_0x2931a2,_0x4daa78[_0x7184('0x7e')]);this[_0x7184('0x6e')](_0x2931a2,_0x4daa78[_0x7184('0x7e')]);}}else if(this[_0x7184('0xf')][_0x4daa78[_0x7184('0x41')]]){if(this['isNotNull'](_0x4daa78['variable'])){if(this[_0x7184('0x29')](_0x4daa78[_0x7184('0x7c')]['sipcallid'])){logger[_0x7184('0x23')](_0x7184('0x8d'),_0x4daa78['linkedid'],_0x4daa78[_0x7184('0x7e')]);this[_0x7184('0xf')][_0x4daa78[_0x7184('0x41')]][_0x7184('0x8f')]=_0x4daa78[_0x7184('0x7e')];}}}}}catch(_0x2dbf76){logger[_0x7184('0x26')](_0x7184('0x90'),_0x4daa78['uniqueid'],util['inspect'](_0x2dbf76,{'showHidden':![],'depth':null}));}};VoiceCallReport['prototype'][_0x7184('0x1a')]=function(_0xcfb6fb){try{if(this[_0x7184('0x29')](_0xcfb6fb)){logger[_0x7184('0x30')](_0x7184('0x91'),_0xcfb6fb[_0x7184('0x2d')],util[_0x7184('0x28')](_0xcfb6fb,{'showHidden':![],'depth':null}));if(this[_0x7184('0x11')][_0xcfb6fb['linkedid']]){if(this['channels'][this['blindTransfers'][_0xcfb6fb['linkedid']][_0x7184('0x41')]]){this[_0x7184('0xf')][this[_0x7184('0x11')][_0xcfb6fb[_0x7184('0x41')]][_0x7184('0x41')]][_0x7184('0x2d')]=_0xcfb6fb['uniqueid'];this[_0x7184('0xf')][this[_0x7184('0x11')][_0xcfb6fb[_0x7184('0x41')]][_0x7184('0x41')]][_0x7184('0x67')]=this[_0x7184('0xf')][_0xcfb6fb[_0x7184('0x2d')]]['answered'];this[_0x7184('0xf')][this[_0x7184('0x11')][_0xcfb6fb[_0x7184('0x41')]][_0x7184('0x41')]][_0x7184('0x62')]=this[_0x7184('0xf')][_0xcfb6fb['uniqueid']]['answertime'];this[_0x7184('0xf')][this[_0x7184('0x11')][_0xcfb6fb['linkedid']][_0x7184('0x41')]][_0x7184('0x65')]=this[_0x7184('0xf')][this[_0x7184('0x11')][_0xcfb6fb[_0x7184('0x41')]][_0x7184('0x41')]][_0x7184('0x36')];this['channels'][this['blindTransfers'][_0xcfb6fb[_0x7184('0x41')]][_0x7184('0x41')]][_0x7184('0x45')]=this[_0x7184('0xf')][_0xcfb6fb[_0x7184('0x2d')]][_0x7184('0x45')];this['channels'][_0xcfb6fb[_0x7184('0x2d')]]=this[_0x7184('0xf')][this[_0x7184('0x11')][_0xcfb6fb[_0x7184('0x41')]][_0x7184('0x41')]];delete this[_0x7184('0xf')][this[_0x7184('0x11')][_0xcfb6fb['linkedid']]['linkedid']];}else if(this[_0x7184('0xf')][this[_0x7184('0x11')][_0xcfb6fb[_0x7184('0x41')]][_0x7184('0x2d')]]){this[_0x7184('0xf')][this[_0x7184('0x11')][_0xcfb6fb[_0x7184('0x41')]][_0x7184('0x2d')]][_0x7184('0x2d')]=[this[_0x7184('0xf')][this[_0x7184('0x11')][_0xcfb6fb[_0x7184('0x41')]]['uniqueid']]['linkedid'],this[_0x7184('0xf')][this[_0x7184('0x11')][_0xcfb6fb['linkedid']]['uniqueid']][_0x7184('0x41')]=this[_0x7184('0xf')][this[_0x7184('0x11')][_0xcfb6fb['linkedid']]['uniqueid']][_0x7184('0x2d')]][0x0];this[_0x7184('0xf')][this[_0x7184('0x11')][_0xcfb6fb[_0x7184('0x41')]][_0x7184('0x2d')]][_0x7184('0x67')]=this[_0x7184('0xf')][_0xcfb6fb['uniqueid']][_0x7184('0x67')];this['channels'][this[_0x7184('0x11')][_0xcfb6fb[_0x7184('0x41')]][_0x7184('0x2d')]]['answertime']=this[_0x7184('0xf')][_0xcfb6fb[_0x7184('0x2d')]][_0x7184('0x62')];this['channels'][this[_0x7184('0x11')][_0xcfb6fb[_0x7184('0x41')]][_0x7184('0x2d')]][_0x7184('0x65')]=this['channels'][this['blindTransfers'][_0xcfb6fb[_0x7184('0x41')]][_0x7184('0x2d')]][_0x7184('0x36')];this[_0x7184('0xf')][this[_0x7184('0x11')][_0xcfb6fb[_0x7184('0x41')]][_0x7184('0x2d')]][_0x7184('0x45')]=this[_0x7184('0xf')][_0xcfb6fb[_0x7184('0x2d')]][_0x7184('0x45')];this[_0x7184('0xf')][_0xcfb6fb[_0x7184('0x2d')]]=this['channels'][this[_0x7184('0x11')][_0xcfb6fb[_0x7184('0x41')]][_0x7184('0x2d')]];delete this[_0x7184('0xf')][this['blindTransfers'][_0xcfb6fb[_0x7184('0x41')]][_0x7184('0x2d')]];}}if(this['channels'][_0xcfb6fb[_0x7184('0x2d')]]){logger[_0x7184('0x23')](_0x7184('0x92'),_0xcfb6fb[_0x7184('0x2d')],_0xcfb6fb[_0x7184('0x93')]);var _0x8bb50c=moment();this['channels'][_0xcfb6fb['uniqueid']][_0x7184('0x94')]=_0x8bb50c[_0x7184('0x43')](_0x7184('0x44'));this[_0x7184('0xf')][_0xcfb6fb[_0x7184('0x2d')]][_0x7184('0x56')]=_0x8bb50c[_0x7184('0x68')](this['channels'][_0xcfb6fb[_0x7184('0x2d')]]['starttime'],'seconds');if(this[_0x7184('0xf')][_0xcfb6fb[_0x7184('0x2d')]]['answered']){this[_0x7184('0xf')][_0xcfb6fb[_0x7184('0x2d')]][_0x7184('0x95')]=_0x8bb50c[_0x7184('0x68')](this['channels'][_0xcfb6fb[_0x7184('0x2d')]][_0x7184('0x62')],_0x7184('0x57'));this['channels'][_0xcfb6fb[_0x7184('0x2d')]][_0x7184('0x63')]=this[_0x7184('0xf')][_0xcfb6fb[_0x7184('0x2d')]]['duration']-this['channels'][_0xcfb6fb[_0x7184('0x2d')]][_0x7184('0x95')];}if(_0xcfb6fb[_0x7184('0x34')]===_0x7184('0x35')){if(this[_0x7184('0x10')][_0xcfb6fb[_0x7184('0x36')][_0x7184('0x37')]('-')[0x0]]){this[_0x7184('0x10')][_0xcfb6fb['channel'][_0x7184('0x37')]('-')[0x0]]=_[_0x7184('0x96')](this['agents'][_0xcfb6fb[_0x7184('0x36')]['split']('-')[0x0]],[_0x7184('0x39')]);logger[_0x7184('0x30')](_0x7184('0x97'),_0xcfb6fb[_0x7184('0x2d')],util[_0x7184('0x28')]({'id':this[_0x7184('0x10')][_0xcfb6fb[_0x7184('0x36')][_0x7184('0x37')]('-')[0x0]]['id'],'destaccountcode':this['agents'][_0xcfb6fb[_0x7184('0x36')][_0x7184('0x37')]('-')[0x0]][_0x7184('0x3c')]},{'showHidden':![],'depth':null}));this[_0x7184('0x2b')](util['format'](_0x7184('0x3a'),this['agents'][_0xcfb6fb['channel']['split']('-')[0x0]][_0x7184('0x3b')]),_0x7184('0x98'),{'id':this['agents'][_0xcfb6fb['channel'][_0x7184('0x37')]('-')[0x0]]['id'],'destaccountcode':this[_0x7184('0x10')][_0xcfb6fb[_0x7184('0x36')][_0x7184('0x37')]('-')[0x0]][_0x7184('0x3c')]});for(var _0x344f6a=0x0;_0x344f6a0x0?!![]:![];if(!_0x5aec82){return this[_0x8280('0x6c')](this['summary'][_0x8280('0x6d')]);}};VoiceQueueReport[_0x8280('0xb')][_0x8280('0x1b')]=function(_0x1b1911){var _0x2618f3=this[_0x8280('0x17')]['id'];if(this[_0x8280('0x17')][_0x8280('0x61')][_0x2618f3]&&this[_0x8280('0x17')]['queuestatus'][_0x2618f3][_0x1b1911[_0x8280('0x60')]]){this[_0x8280('0x17')][_0x8280('0x61')][_0x2618f3][_0x1b1911[_0x8280('0x60')]][_0x8280('0x12')][_0x8280('0x6e')](_0x1b1911);}};VoiceQueueReport[_0x8280('0xb')][_0x8280('0x6f')]=function(_0x40c10e){var _0x1664f0=this;try{if(this[_0x8280('0x59')](_0x40c10e)&&this[_0x8280('0x59')](_0x40c10e[_0x8280('0x4a')])){logger[_0x8280('0x46')](_0x8280('0x70'),util[_0x8280('0x3f')](_0x40c10e,{'showHidden':![],'depth':null}));var _0x4a5190=this[_0x8280('0x15')][_0x40c10e[_0x8280('0x4a')]];if(_0x4a5190){logger['debug'](_0x8280('0x71'),_0x4a5190[_0x8280('0x57')]);this[_0x8280('0x17')]['queues'][_0x4a5190['name']]={'summaryEvent':_0x40c10e};this[_0x8280('0x17')][_0x8280('0x6b')]+=0x1;return ami[_0x8280('0x5c')]({'action':_0x8280('0x61'),'queue':_0x4a5190[_0x8280('0x57')]})['then'](function(_0x223dcc){if(!_0x1664f0[_0x8280('0x17')]['queuestatus'][_0x40c10e[_0x8280('0x60')]]){_0x1664f0[_0x8280('0x17')][_0x8280('0x61')][_0x40c10e[_0x8280('0x60')]]={};}_0x1664f0['summary']['queuestatus'][_0x40c10e[_0x8280('0x60')]][_0x223dcc[_0x8280('0x60')]]={'queue':_0x4a5190[_0x8280('0x57')],'agents':[]};})[_0x8280('0x3b')](function(_0x259643){throw _0x259643;});}}}catch(_0x1ba883){logger[_0x8280('0x3d')](_0x8280('0x62'),util['inspect'](_0x1ba883,{'showHidden':![],'depth':null}));}};VoiceQueueReport['prototype'][_0x8280('0x6c')]=function(_0x1ef6a8){if(this[_0x8280('0x17')][_0x8280('0x6b')]>0x0){this[_0x8280('0x17')][_0x8280('0x6d')]=_0x1ef6a8;return;}logger[_0x8280('0x46')](_0x8280('0x72'),util[_0x8280('0x3f')](_0x1ef6a8,{'showHidden':![],'depth':null}));this['summary']=initializeSummary();ami['emit'](_0x8280('0x73'),{});};VoiceQueueReport[_0x8280('0xb')][_0x8280('0x1f')]=function(_0xa74ac4){try{if(this[_0x8280('0x59')](_0xa74ac4)){logger[_0x8280('0x46')]('[%s][voiceQueueReport][queuecallerjoin]',_0xa74ac4['uniqueid'],util[_0x8280('0x3f')](_0xa74ac4,{'showHidden':![],'depth':null}));if(_[_0x8280('0x5a')](this['queueReports'][_0xa74ac4[_0x8280('0x49')]])){this[_0x8280('0x10')][_0xa74ac4[_0x8280('0x49')]]=[];}if(_[_0x8280('0x5a')](this['channels'][_0xa74ac4[_0x8280('0x49')]])){this['channels'][_0xa74ac4[_0x8280('0x49')]]={};}var _0x2a5383=new QueueReport();_0x2a5383[_0x8280('0x4a')]=_0xa74ac4['queue'];_0x2a5383[_0x8280('0x53')]=this['voiceQueues'][_0x2a5383[_0x8280('0x4a')]]&&this[_0x8280('0x15')][_0x2a5383['queue']][_0x8280('0x53')]?this[_0x8280('0x15')][_0x2a5383[_0x8280('0x4a')]][_0x8280('0x53')]||'inbound':_0x8280('0x54');_0x2a5383[_0x8280('0x74')]=moment()['format'](_0x8280('0x75'));_0x2a5383[_0x8280('0x76')]=_0xa74ac4['position'];_0x2a5383[_0x8280('0x77')]=_0xa74ac4[_0x8280('0x77')];_0x2a5383[_0x8280('0x49')]=_0xa74ac4[_0x8280('0x49')];_0x2a5383[_0x8280('0x78')]=this[_0x8280('0x13')][_0xa74ac4[_0x8280('0x49')]]['routealias'];logger[_0x8280('0x79')](_0x8280('0x7a'),_0x2a5383['queue'],_0x2a5383['type']);Object[_0x8280('0x68')](_0x2a5383,_['pick'](_0xa74ac4,_[_0x8280('0x7b')](_0x2a5383)));this[_0x8280('0x10')][_0xa74ac4[_0x8280('0x49')]]['push'](_0x2a5383);this[_0x8280('0x13')][_0xa74ac4[_0x8280('0x49')]]=_0x2a5383;this[_0x8280('0x45')](_0x2a5383,_0x8280('0x1e'));}}catch(_0x4aa800){logger[_0x8280('0x3d')]('[%s][voiceQueueReport][queuecallerjoin]',_0xa74ac4[_0x8280('0x49')],util[_0x8280('0x3f')](_0x4aa800,{'showHidden':![],'depth':null}));}};VoiceQueueReport[_0x8280('0xb')]['syncQueueCallerAbandon']=function(_0x4d5560){try{if(this['isNotNull'](_0x4d5560)){logger[_0x8280('0x46')](_0x8280('0x7c'),_0x4d5560['uniqueid'],util[_0x8280('0x3f')](_0x4d5560,{'showHidden':![],'depth':null}));if(this[_0x8280('0x10')][_0x4d5560[_0x8280('0x49')]]){var _0x167203=_[_0x8280('0x7d')](this['queueReports'][_0x4d5560[_0x8280('0x49')]]);_0x167203[_0x8280('0x38')]=![];_0x167203[_0x8280('0x7e')]=null;_0x167203[_0x8280('0x7f')]=_0x4d5560[_0x8280('0x7f')];_0x167203[_0x8280('0x80')]=_0x4d5560[_0x8280('0x80')];_0x167203[_0x8280('0x20')]=!![];_0x167203[_0x8280('0x81')]=moment()[_0x8280('0x56')](_0x8280('0x75'));_0x167203[_0x8280('0x4e')]='ABANDONED';_0x167203[_0x8280('0x82')]=null;logger['info']('[voiceQueueReport][queuecallerabandon]\x20name:%s\x20type:%s',_0x167203['queue'],_0x167203[_0x8280('0x53')]);this[_0x8280('0x13')][_0x4d5560[_0x8280('0x49')]]=_0x167203;this[_0x8280('0x43')](_0x167203,_0x8280('0x20'));}}}catch(_0x107a87){logger['error'](_0x8280('0x7c'),_0x4d5560[_0x8280('0x49')],util['inspect'](_0x107a87,{'showHidden':![],'depth':null}));}};VoiceQueueReport[_0x8280('0xb')]['syncQueueCallerLeave']=function(_0x34e2bb){try{if(this[_0x8280('0x59')](_0x34e2bb)){logger[_0x8280('0x46')]('[%s][voiceQueueReport][queuecallerleave]',_0x34e2bb['uniqueid'],util['inspect'](_0x34e2bb,{'showHidden':![],'depth':null}));if(this[_0x8280('0x10')][_0x34e2bb[_0x8280('0x49')]]){var _0x1458a7=_[_0x8280('0x7d')](this[_0x8280('0x10')][_0x34e2bb[_0x8280('0x49')]]);_0x1458a7['queuecallerleaveAt']=moment()['format']('YYYY-MM-DD\x20HH:mm:ss');_0x1458a7['connectedlinenum']=_0x34e2bb['connectedlinenum'];_0x1458a7[_0x8280('0x83')]=_0x34e2bb[_0x8280('0x83')];logger['info'](_0x8280('0x84'),_0x1458a7[_0x8280('0x4a')],_0x1458a7['type'],_0x34e2bb['connectedlinenum'],_0x34e2bb[_0x8280('0x83')]);this[_0x8280('0x13')][_0x34e2bb['uniqueid']]=_0x1458a7;this[_0x8280('0x45')](_0x1458a7,_0x8280('0x85'));}}}catch(_0x42f3a0){logger[_0x8280('0x3d')](_0x8280('0x86'),_0x34e2bb[_0x8280('0x49')],util[_0x8280('0x3f')](_0x42f3a0,{'showHidden':![],'depth':null}));}};VoiceQueueReport[_0x8280('0xb')][_0x8280('0x25')]=function(_0x25ffcf){try{if(this[_0x8280('0x59')](_0x25ffcf)){logger[_0x8280('0x46')](_0x8280('0x87'),_0x25ffcf[_0x8280('0x49')],util['inspect'](_0x25ffcf,{'showHidden':![],'depth':null}));if(this['queueReports'][_0x25ffcf[_0x8280('0x49')]]){var _0x20de6f=_['last'](this[_0x8280('0x10')][_0x25ffcf[_0x8280('0x49')]]);_0x20de6f['queuecallercomplete']=!![];_0x20de6f[_0x8280('0x4e')]=_0x8280('0x88');logger['info']('[voiceQueueReport][agentconnect]\x20name:%s\x20type:%s\x20queuecallerexitreason:COMPLETEDBYAGENT',_0x20de6f[_0x8280('0x4a')],_0x20de6f[_0x8280('0x53')]);}}}catch(_0x5c87e8){logger['error'](_0x8280('0x87'),_0x25ffcf[_0x8280('0x49')],util[_0x8280('0x3f')](_0x5c87e8,{'showHidden':![],'depth':null}));}};VoiceQueueReport[_0x8280('0xb')][_0x8280('0x23')]=function(_0x2627ea){try{if(this[_0x8280('0x59')](_0x2627ea)){logger[_0x8280('0x46')](_0x8280('0x89'),_0x2627ea['uniqueid'],util['inspect'](_0x2627ea,{'showHidden':![],'depth':null}));if(this[_0x8280('0x10')][_0x2627ea['uniqueid']]){var _0x300d10=_[_0x8280('0x7d')](this[_0x8280('0x10')][_0x2627ea[_0x8280('0x49')]]);_0x300d10[_0x8280('0x20')]=![];_0x300d10[_0x8280('0x81')]=null;_0x300d10[_0x8280('0x8a')]=!![];_0x300d10[_0x8280('0x82')]=_0x2627ea['membername'];_0x300d10[_0x8280('0x7f')]=_0x2627ea['holdtime'];_0x300d10[_0x8280('0x38')]=!![];_0x300d10['queuecallerexit']=![];_0x300d10[_0x8280('0x8b')]=null;if(!_0x300d10[_0x8280('0x8c')]){if(_0x2627ea[_0x8280('0x8d')]==_0x8280('0x8c')){_0x300d10[_0x8280('0x4e')]=_0x8280('0x8e');logger[_0x8280('0x79')](_0x8280('0x8f'),_0x300d10['queue'],_0x300d10[_0x8280('0x53')]);}else{if(_[_0x8280('0x90')](_0x2627ea['channel'][_0x8280('0x91')](),'local/')){if(this[_0x8280('0x10')][_0x2627ea[_0x8280('0x92')]]){var _0x19373a=_['last'](this[_0x8280('0x10')][_0x2627ea[_0x8280('0x92')]]);_0x19373a['queuecallercomplete']=![];_0x19373a[_0x8280('0x93')]=!![];_0x19373a[_0x8280('0x8b')]=moment(_0x300d10[_0x8280('0x74')])[_0x8280('0x94')](_0x2627ea[_0x8280('0x7f')],_0x8280('0x95'))[_0x8280('0x56')](_0x8280('0x75'));_0x19373a[_0x8280('0x4e')]=_0x8280('0x96');_0x19373a['transfer']=!![];_0x19373a[_0x8280('0x97')]=_0x8280('0x98');_0x19373a[_0x8280('0x99')]=_0x2627ea[_0x8280('0x9a')];_0x19373a['transferuniqueid']=_0x2627ea[_0x8280('0x49')];logger['info']('[voiceQueueReport][agentcomplete]\x20name:%s\x20type:%s\x20queuecallerexitreason:FORWARDTRANSFER',_0x19373a[_0x8280('0x4a')],_0x19373a[_0x8280('0x53')]);var _0x1c2959=this[_0x8280('0x10')][_0x2627ea[_0x8280('0x92')]];this[_0x8280('0x10')][_0x2627ea[_0x8280('0x92')]]=this[_0x8280('0x10')][_0x2627ea[_0x8280('0x49')]];this['queueReports'][_0x2627ea[_0x8280('0x49')]]=_0x1c2959;}}else{_0x300d10['queuecallerexitreason']=_0x8280('0x9b')+_0x2627ea[_0x8280('0x8d')][_0x8280('0x9c')]();logger[_0x8280('0x79')](_0x8280('0x9d'),_0x300d10['queue'],_0x300d10[_0x8280('0x53')],_0x300d10['queuecallerexitreason']);}}}this[_0x8280('0x13')][_0x2627ea['uniqueid']]=_0x300d10;}}}catch(_0x5ba0ec){logger[_0x8280('0x3d')]('[%s][voiceQueueReport][agentcomplete]',_0x2627ea['uniqueid'],util[_0x8280('0x3f')](_0x5ba0ec,{'showHidden':![],'depth':null}));}};VoiceQueueReport[_0x8280('0xb')]['syncVarSet']=function(_0x43fb8c){try{if(this[_0x8280('0x59')](_0x43fb8c)){logger[_0x8280('0x46')](_0x8280('0x9e'),_0x43fb8c[_0x8280('0x49')],util[_0x8280('0x3f')](_0x43fb8c,{'showHidden':![],'depth':null}));this[_0x8280('0x9f')](_0x43fb8c['uniqueid'],_['keys'](_0x43fb8c['variable'])[0x0],_0x43fb8c[_0x8280('0xa0')]);if(this[_0x8280('0x10')][_0x43fb8c[_0x8280('0x49')]]){var _0x129789=_[_0x8280('0x7d')](this['queueReports'][_0x43fb8c[_0x8280('0x49')]]);if(_0x129789){if(this[_0x8280('0x59')](_0x43fb8c[_0x8280('0xa1')])&&this[_0x8280('0x59')](_0x43fb8c[_0x8280('0xa1')][_0x8280('0x61')])){switch(_0x43fb8c[_0x8280('0xa0')]){case _0x8280('0xa2'):_0x129789[_0x8280('0x93')]=![];_0x129789['queuecallerexitAt']=null;break;case _0x8280('0xa3'):_0x129789['lastevent']='timeout';_0x129789[_0x8280('0x93')]=!![];_0x129789[_0x8280('0x8b')]=moment()[_0x8280('0x56')](_0x8280('0x75'));_0x129789['queuecallerleaveAt']=moment()['format'](_0x8280('0x75'));logger[_0x8280('0x46')]('[%s][voiceQueueReport][varset]\x20sending\x20timeout\x20event:',_0x43fb8c[_0x8280('0x49')],util['inspect'](_0x129789,{'showHidden':![],'depth':null}));ami[_0x8280('0x44')]('custom:timeout',_0x129789);break;default:_0x129789[_0x8280('0x93')]=!![];_0x129789[_0x8280('0x8b')]=moment()[_0x8280('0x56')](_0x8280('0x75'));_0x129789['queuecallerleaveAt']=moment()[_0x8280('0x56')](_0x8280('0x75'));}_0x129789[_0x8280('0x20')]=![];_0x129789[_0x8280('0x81')]=null;_0x129789['queuecallerexitreason']=_0x43fb8c[_0x8280('0xa0')];this[_0x8280('0x13')][_0x43fb8c['uniqueid']]=_0x129789;this[_0x8280('0x43')](_0x129789,_0x8280('0x26'));}else if(this[_0x8280('0x59')](_0x43fb8c['variable'])&&this[_0x8280('0x59')](_0x43fb8c[_0x8280('0xa1')][_0x8280('0xa4')])){if(!_0x129789['queuecallerabandon']){_0x129789[_0x8280('0x93')]=!![];_0x129789[_0x8280('0x8b')]=moment()['format'](_0x8280('0x75'));_0x129789[_0x8280('0x4e')]=_0x8280('0xa5');_0x129789['queuecallerleaveAt']=moment()['format'](_0x8280('0x75'));this[_0x8280('0x13')][_0x43fb8c[_0x8280('0x49')]]=_0x129789;}}logger['info'](_0x8280('0xa6'),_0x43fb8c[_0x8280('0x49')],_0x129789[_0x8280('0x4a')],_0x129789['type'],_[_0x8280('0x7b')](_0x43fb8c[_0x8280('0xa1')])[0x0],_0x43fb8c['value']);_0x129789[_0x8280('0x18')]=this[_0x8280('0x18')][_0x43fb8c['uniqueid']];}}}}catch(_0x59d409){logger['error']('[%s][voiceQueueReport][varset]',_0x43fb8c['uniqueid'],util[_0x8280('0x3f')](_0x59d409,{'showHidden':![],'depth':null}));}};VoiceQueueReport[_0x8280('0xb')][_0x8280('0x9f')]=function(_0x2fc653,_0x58dfd9,_0x17b4d6){var _0x4bdfe0=['rtpaudioqos',_0x8280('0xa7'),'rtpaudioqosjitter','rtpaudioqosjitterbridged',_0x8280('0xa8'),_0x8280('0xa9'),_0x8280('0xaa'),_0x8280('0xab'),_0x8280('0xac'),_0x8280('0xad'),_0x8280('0xae'),_0x8280('0xaf'),'membercalls','memberdynamic',_0x8280('0xb0'),_0x8280('0xb1'),_0x8280('0xb2'),_0x8280('0xb3'),_0x8280('0xb4')];if(!_[_0x8280('0x3a')](_0x58dfd9)&&!_[_0x8280('0xb5')](_0x4bdfe0,_0x58dfd9)){if(_[_0x8280('0x5a')](this[_0x8280('0x18')][_0x2fc653])){this[_0x8280('0x18')][_0x2fc653]={};}this[_0x8280('0x18')][_0x2fc653][_0x58dfd9]=_0x17b4d6;}};VoiceQueueReport[_0x8280('0xb')][_0x8280('0xb6')]=function(_0xad5f60,_0x3f90e3,_0x168d04){var _0x1e6536={};for(var _0x57e85b=0x0;_0x57e85b0x0?!![]:![];if(!_0x4a4ad7){return this[_0x3e28('0x1b')](this[_0x3e28('0x16')]['completeEvent']);}};VoiceQueueReport[_0x3e28('0xb')]['syncQueueMember']=function(_0x24eea9){var _0x176c13=this[_0x3e28('0x16')]['id'];if(this[_0x3e28('0x16')][_0x3e28('0x65')][_0x176c13]&&this['summary'][_0x3e28('0x65')][_0x176c13][_0x24eea9[_0x3e28('0x64')]]){this[_0x3e28('0x16')][_0x3e28('0x65')][_0x176c13][_0x24eea9[_0x3e28('0x64')]][_0x3e28('0x12')][_0x3e28('0x71')](_0x24eea9);}};VoiceQueueReport[_0x3e28('0xb')][_0x3e28('0x72')]=function(_0x5154a9){var _0x56f177=this;try{if(this['isNotNull'](_0x5154a9)&&this[_0x3e28('0x5c')](_0x5154a9[_0x3e28('0x50')])){logger[_0x3e28('0x4b')](_0x3e28('0x73'),util['inspect'](_0x5154a9,{'showHidden':![],'depth':null}));var _0x330cc4=this[_0x3e28('0x14')][_0x5154a9[_0x3e28('0x50')]];if(_0x330cc4){logger[_0x3e28('0x4b')](_0x3e28('0x74'),_0x330cc4[_0x3e28('0x5a')]);this[_0x3e28('0x16')]['queues'][_0x330cc4['name']]={'summaryEvent':_0x5154a9};this['summary']['statusRequests']+=0x1;return ami[_0x3e28('0x62')]({'action':_0x3e28('0x65'),'queue':_0x330cc4[_0x3e28('0x5a')]})[_0x3e28('0x63')](function(_0x1b2cb7){if(!_0x56f177['summary']['queuestatus'][_0x5154a9[_0x3e28('0x64')]]){_0x56f177['summary'][_0x3e28('0x65')][_0x5154a9[_0x3e28('0x64')]]={};}_0x56f177[_0x3e28('0x16')][_0x3e28('0x65')][_0x5154a9['actionid']][_0x1b2cb7['actionid']]={'queue':_0x330cc4['name'],'agents':[]};})[_0x3e28('0x3e')](function(_0x62589e){throw _0x62589e;});}}}catch(_0x1aa276){logger[_0x3e28('0x41')](_0x3e28('0x66'),util[_0x3e28('0x43')](_0x1aa276,{'showHidden':![],'depth':null}));}};VoiceQueueReport[_0x3e28('0xb')][_0x3e28('0x1b')]=function(_0x473dbd){if(this[_0x3e28('0x16')][_0x3e28('0x70')]>0x0){this['summary'][_0x3e28('0x75')]=_0x473dbd;return;}logger[_0x3e28('0x4b')]('[voiceQueueReport][queuesummarycomplete]\x20event:',util['inspect'](_0x473dbd,{'showHidden':![],'depth':null}));this[_0x3e28('0x16')]=initializeSummary();ami['emit']('custom:queuesummarycomplete',{});};VoiceQueueReport[_0x3e28('0xb')][_0x3e28('0x20')]=function(_0x490332){try{if(this[_0x3e28('0x5c')](_0x490332)){logger['debug']('[%s][voiceQueueReport][queuecallerjoin]',_0x490332['uniqueid'],util[_0x3e28('0x43')](_0x490332,{'showHidden':![],'depth':null}));if(_['isUndefined'](this['queueReports'][_0x490332[_0x3e28('0x4d')]])){this[_0x3e28('0x10')][_0x490332[_0x3e28('0x4d')]]=[];}if(_[_0x3e28('0x76')](this[_0x3e28('0x13')][_0x490332[_0x3e28('0x4d')]])){this[_0x3e28('0x13')][_0x490332[_0x3e28('0x4d')]]={};}var _0x164b9d=new QueueReport();_0x164b9d[_0x3e28('0x50')]=_0x490332[_0x3e28('0x50')];_0x164b9d[_0x3e28('0x57')]=this[_0x3e28('0x14')][_0x164b9d['queue']]&&this[_0x3e28('0x14')][_0x164b9d[_0x3e28('0x50')]][_0x3e28('0x57')]?this[_0x3e28('0x14')][_0x164b9d[_0x3e28('0x50')]][_0x3e28('0x57')]||'inbound':'inbound';_0x164b9d[_0x3e28('0x77')]=moment()['format'](_0x3e28('0x78'));_0x164b9d[_0x3e28('0x79')]=_0x490332[_0x3e28('0x79')];_0x164b9d['count']=_0x490332['count'];_0x164b9d['uniqueid']=_0x490332[_0x3e28('0x4d')];_0x164b9d[_0x3e28('0x7a')]=this['channels'][_0x490332[_0x3e28('0x4d')]][_0x3e28('0x7a')];logger[_0x3e28('0x7b')](_0x3e28('0x7c'),_0x164b9d[_0x3e28('0x50')],_0x164b9d[_0x3e28('0x57')]);Object[_0x3e28('0x6c')](_0x164b9d,_[_0x3e28('0x7d')](_0x490332,_['keys'](_0x164b9d)));this[_0x3e28('0x10')][_0x490332[_0x3e28('0x4d')]][_0x3e28('0x71')](_0x164b9d);this[_0x3e28('0x13')][_0x490332[_0x3e28('0x4d')]]=_0x164b9d;this['emitVoiceQueueChannelSave'](_0x164b9d,_0x3e28('0x7e'));}}catch(_0x55d965){logger[_0x3e28('0x41')](_0x3e28('0x7f'),_0x490332[_0x3e28('0x4d')],util[_0x3e28('0x43')](_0x55d965,{'showHidden':![],'depth':null}));}};VoiceQueueReport[_0x3e28('0xb')]['syncQueueCallerAbandon']=function(_0x32f604){try{if(this[_0x3e28('0x5c')](_0x32f604)){logger[_0x3e28('0x4b')]('[%s][voiceQueueReport][queuecallerabandon]',_0x32f604['uniqueid'],util[_0x3e28('0x43')](_0x32f604,{'showHidden':![],'depth':null}));if(this[_0x3e28('0x10')][_0x32f604['uniqueid']]){var _0x386309=_['last'](this[_0x3e28('0x10')][_0x32f604[_0x3e28('0x4d')]]);_0x386309[_0x3e28('0x3a')]=![];_0x386309[_0x3e28('0x80')]=null;_0x386309[_0x3e28('0x81')]=_0x32f604['holdtime'];_0x386309['originalposition']=_0x32f604[_0x3e28('0x82')];_0x386309[_0x3e28('0x21')]=!![];_0x386309[_0x3e28('0x83')]=moment()['format']('YYYY-MM-DD\x20HH:mm:ss');_0x386309[_0x3e28('0x84')]=_0x3e28('0x85');_0x386309[_0x3e28('0x86')]=null;logger[_0x3e28('0x7b')](_0x3e28('0x87'),_0x386309[_0x3e28('0x50')],_0x386309[_0x3e28('0x57')]);this['channels'][_0x32f604[_0x3e28('0x4d')]]=_0x386309;this[_0x3e28('0x88')](_0x386309,_0x3e28('0x21'));}}}catch(_0x418f49){logger[_0x3e28('0x41')](_0x3e28('0x89'),_0x32f604[_0x3e28('0x4d')],util[_0x3e28('0x43')](_0x418f49,{'showHidden':![],'depth':null}));}};VoiceQueueReport[_0x3e28('0xb')][_0x3e28('0x23')]=function(_0x4042c8){try{if(this[_0x3e28('0x5c')](_0x4042c8)){logger[_0x3e28('0x4b')](_0x3e28('0x8a'),_0x4042c8['uniqueid'],util[_0x3e28('0x43')](_0x4042c8,{'showHidden':![],'depth':null}));if(this[_0x3e28('0x10')][_0x4042c8[_0x3e28('0x4d')]]){var _0x38dcb8=_[_0x3e28('0x8b')](this[_0x3e28('0x10')][_0x4042c8[_0x3e28('0x4d')]]);_0x38dcb8[_0x3e28('0x8c')]=moment()[_0x3e28('0x4e')](_0x3e28('0x78'));_0x38dcb8['connectedlinenum']=_0x4042c8[_0x3e28('0x8d')];_0x38dcb8[_0x3e28('0x8e')]=_0x4042c8['connectedlinename'];logger[_0x3e28('0x7b')](_0x3e28('0x8f'),_0x38dcb8[_0x3e28('0x50')],_0x38dcb8[_0x3e28('0x57')],_0x4042c8[_0x3e28('0x8d')],_0x4042c8[_0x3e28('0x8e')]);this[_0x3e28('0x13')][_0x4042c8[_0x3e28('0x4d')]]=_0x38dcb8;this[_0x3e28('0x4a')](_0x38dcb8,'queuecallerleave');}}}catch(_0x371b2){logger[_0x3e28('0x41')](_0x3e28('0x8a'),_0x4042c8[_0x3e28('0x4d')],util[_0x3e28('0x43')](_0x371b2,{'showHidden':![],'depth':null}));}};VoiceQueueReport['prototype']['syncAgentConnect']=function(_0x247b45){try{if(this[_0x3e28('0x5c')](_0x247b45)){logger[_0x3e28('0x4b')](_0x3e28('0x90'),_0x247b45['uniqueid'],util[_0x3e28('0x43')](_0x247b45,{'showHidden':![],'depth':null}));if(this[_0x3e28('0x10')][_0x247b45['uniqueid']]){var _0x2a8136=_[_0x3e28('0x8b')](this[_0x3e28('0x10')][_0x247b45[_0x3e28('0x4d')]]);_0x2a8136[_0x3e28('0x3a')]=!![];_0x2a8136[_0x3e28('0x84')]=_0x3e28('0x91');logger[_0x3e28('0x7b')]('[voiceQueueReport][agentconnect]\x20name:%s\x20type:%s\x20queuecallerexitreason:COMPLETEDBYAGENT',_0x2a8136[_0x3e28('0x50')],_0x2a8136[_0x3e28('0x57')]);}}}catch(_0x20edb1){logger[_0x3e28('0x41')](_0x3e28('0x90'),_0x247b45['uniqueid'],util[_0x3e28('0x43')](_0x20edb1,{'showHidden':![],'depth':null}));}};VoiceQueueReport['prototype'][_0x3e28('0x24')]=function(_0x2b9d05){try{if(this[_0x3e28('0x5c')](_0x2b9d05)){logger[_0x3e28('0x4b')](_0x3e28('0x92'),_0x2b9d05[_0x3e28('0x4d')],util[_0x3e28('0x43')](_0x2b9d05,{'showHidden':![],'depth':null}));if(this[_0x3e28('0x10')][_0x2b9d05[_0x3e28('0x4d')]]){var _0x69339c=_['last'](this[_0x3e28('0x10')][_0x2b9d05[_0x3e28('0x4d')]]);_0x69339c[_0x3e28('0x21')]=![];_0x69339c['queuecallerabandonAt']=null;_0x69339c[_0x3e28('0x93')]=!![];_0x69339c[_0x3e28('0x86')]=_0x2b9d05[_0x3e28('0x94')];_0x69339c[_0x3e28('0x81')]=_0x2b9d05[_0x3e28('0x81')];_0x69339c[_0x3e28('0x3a')]=!![];_0x69339c['queuecallerexit']=![];_0x69339c[_0x3e28('0x95')]=null;if(!_0x69339c[_0x3e28('0x96')]){if(_0x2b9d05['reason']==_0x3e28('0x96')){_0x69339c[_0x3e28('0x84')]=_0x3e28('0x97');logger['info']('[voiceQueueReport][agentcomplete]\x20name:%s\x20type:%s\x20queuecallerexitreason:COMPLETED',_0x69339c['queue'],_0x69339c[_0x3e28('0x57')]);}else{if(_[_0x3e28('0x98')](_0x2b9d05[_0x3e28('0x3d')]['toLowerCase'](),_0x3e28('0x99'))){if(this['queueReports'][_0x2b9d05[_0x3e28('0x9a')]]){var _0x2e1693=_['last'](this[_0x3e28('0x10')][_0x2b9d05[_0x3e28('0x9a')]]);_0x2e1693[_0x3e28('0x3a')]=![];_0x2e1693[_0x3e28('0x9b')]=!![];_0x2e1693[_0x3e28('0x95')]=moment(_0x69339c[_0x3e28('0x77')])[_0x3e28('0x9c')](_0x2b9d05[_0x3e28('0x81')],_0x3e28('0x9d'))[_0x3e28('0x4e')]('YYYY-MM-DD\x20HH:mm:ss');_0x2e1693[_0x3e28('0x84')]=_0x3e28('0x9e');_0x2e1693[_0x3e28('0x96')]=!![];_0x2e1693[_0x3e28('0x9f')]='FORWARD';_0x2e1693['transferexten']=_0x2b9d05['destexten'];_0x2e1693[_0x3e28('0xa0')]=_0x2b9d05['uniqueid'];logger[_0x3e28('0x7b')](_0x3e28('0xa1'),_0x2e1693[_0x3e28('0x50')],_0x2e1693[_0x3e28('0x57')]);var _0x3dd4ae=this['queueReports'][_0x2b9d05['linkedid']];this['queueReports'][_0x2b9d05['linkedid']]=this[_0x3e28('0x10')][_0x2b9d05[_0x3e28('0x4d')]];this[_0x3e28('0x10')][_0x2b9d05[_0x3e28('0x4d')]]=_0x3dd4ae;}}else{_0x69339c[_0x3e28('0x84')]=_0x3e28('0xa2')+_0x2b9d05[_0x3e28('0xa3')]['toUpperCase']();logger[_0x3e28('0x7b')]('[voiceQueueReport][agentcomplete]\x20name:%s\x20type:%s\x20queuecallerexitreason:%s',_0x69339c[_0x3e28('0x50')],_0x69339c['type'],_0x69339c[_0x3e28('0x84')]);}}}this[_0x3e28('0x13')][_0x2b9d05[_0x3e28('0x4d')]]=_0x69339c;}}}catch(_0x380744){logger[_0x3e28('0x41')](_0x3e28('0x92'),_0x2b9d05['uniqueid'],util[_0x3e28('0x43')](_0x380744,{'showHidden':![],'depth':null}));}};VoiceQueueReport[_0x3e28('0xb')]['syncVarSet']=function(_0x44d8db){try{if(this['isNotNull'](_0x44d8db)){logger[_0x3e28('0x4b')](_0x3e28('0xa4'),_0x44d8db[_0x3e28('0x4d')],util['inspect'](_0x44d8db,{'showHidden':![],'depth':null}));this[_0x3e28('0xa5')](_0x44d8db[_0x3e28('0x4d')],_['keys'](_0x44d8db['variable'])[0x0],_0x44d8db[_0x3e28('0xa6')]);if(this[_0x3e28('0x10')][_0x44d8db[_0x3e28('0x4d')]]){var _0x2b4402=_[_0x3e28('0x8b')](this[_0x3e28('0x10')][_0x44d8db['uniqueid']]);if(_0x2b4402){if(this[_0x3e28('0x5c')](_0x44d8db['variable'])&&this[_0x3e28('0x5c')](_0x44d8db[_0x3e28('0xa7')][_0x3e28('0x65')])){switch(_0x44d8db['value']){case _0x3e28('0xa8'):_0x2b4402[_0x3e28('0x9b')]=![];_0x2b4402[_0x3e28('0x95')]=null;break;case _0x3e28('0xa9'):_0x2b4402[_0x3e28('0xaa')]=_0x3e28('0xab');_0x2b4402['queuecallerexit']=!![];_0x2b4402['queuecallerexitAt']=moment()[_0x3e28('0x4e')](_0x3e28('0x78'));_0x2b4402[_0x3e28('0x8c')]=moment()['format'](_0x3e28('0x78'));logger[_0x3e28('0x4b')](_0x3e28('0xac'),_0x44d8db[_0x3e28('0x4d')],util[_0x3e28('0x43')](_0x2b4402,{'showHidden':![],'depth':null}));ami[_0x3e28('0x49')](_0x3e28('0xad'),_0x2b4402);break;default:_0x2b4402['queuecallerexit']=!![];_0x2b4402[_0x3e28('0x95')]=moment()[_0x3e28('0x4e')]('YYYY-MM-DD\x20HH:mm:ss');_0x2b4402['queuecallerleaveAt']=moment()['format'](_0x3e28('0x78'));}_0x2b4402[_0x3e28('0x21')]=![];_0x2b4402[_0x3e28('0x83')]=null;_0x2b4402[_0x3e28('0x84')]=_0x44d8db[_0x3e28('0xa6')];this[_0x3e28('0x13')][_0x44d8db[_0x3e28('0x4d')]]=_0x2b4402;this['emitVoiceQueueChannelRemove'](_0x2b4402,'varset');}else if(this[_0x3e28('0x5c')](_0x44d8db[_0x3e28('0xa7')])&&this[_0x3e28('0x5c')](_0x44d8db['variable'][_0x3e28('0xae')])){if(!_0x2b4402[_0x3e28('0x21')]){_0x2b4402[_0x3e28('0x9b')]=!![];_0x2b4402[_0x3e28('0x95')]=moment()[_0x3e28('0x4e')](_0x3e28('0x78'));_0x2b4402[_0x3e28('0x84')]=_0x3e28('0xaf');_0x2b4402['queuecallerleaveAt']=moment()[_0x3e28('0x4e')](_0x3e28('0x78'));this[_0x3e28('0x13')][_0x44d8db[_0x3e28('0x4d')]]=_0x2b4402;}}logger[_0x3e28('0x7b')]('[%s][voiceQueueReport][varset]\x20name:%s\x20type:%s\x20variable:%s\x20value:%s',_0x44d8db[_0x3e28('0x4d')],_0x2b4402[_0x3e28('0x50')],_0x2b4402[_0x3e28('0x57')],_[_0x3e28('0xb0')](_0x44d8db['variable'])[0x0],_0x44d8db[_0x3e28('0xa6')]);_0x2b4402[_0x3e28('0x17')]=this[_0x3e28('0x17')][_0x44d8db[_0x3e28('0x4d')]];}}}}catch(_0x46ef32){logger[_0x3e28('0x41')](_0x3e28('0xa4'),_0x44d8db[_0x3e28('0x4d')],util[_0x3e28('0x43')](_0x46ef32,{'showHidden':![],'depth':null}));}};VoiceQueueReport['prototype']['addVariable']=function(_0x2eda50,_0x2914a5,_0x405bb6){var _0x167429=[_0x3e28('0xb1'),_0x3e28('0xb2'),'rtpaudioqosjitter','rtpaudioqosjitterbridged','rtpaudioqosloss',_0x3e28('0xb3'),_0x3e28('0xb4'),_0x3e28('0xb5'),_0x3e28('0xb6'),_0x3e28('0xb7'),_0x3e28('0xb8'),_0x3e28('0xb9'),_0x3e28('0xba'),'memberdynamic','memberinterface',_0x3e28('0xbb'),_0x3e28('0x94'),_0x3e28('0xbc'),_0x3e28('0xbd')];if(!_[_0x3e28('0xbe')](_0x2914a5)&&!_['includes'](_0x167429,_0x2914a5)){if(_['isUndefined'](this[_0x3e28('0x17')][_0x2eda50])){this[_0x3e28('0x17')][_0x2eda50]={};}this[_0x3e28('0x17')][_0x2eda50][_0x2914a5]=_0x405bb6;}};VoiceQueueReport[_0x3e28('0xb')][_0x3e28('0xbf')]=function(_0x11447d,_0x80bdf9,_0x125fed){var _0x1930b4={};for(var _0x36654d=0x0;_0x36654d=0x0?moment(_0x5a150c[_0x5e3e('0x1a')])[_0x5e3e('0x1b')](_0x5a150c['starttime'],_0x5e3e('0x10')):null,'data1':'outbound','data2':_0x5a150c[_0x5e3e('0x14')],'data3':_0x5a150c['exten'],'data4':_0x5a150c['dialstring']||null,'role':_0x5e3e('0x1c'),'internal':_0x5a150c[_0x5e3e('0x14')]?_[_0x5e3e('0x15')](_0x5a150c[_0x5e3e('0x14')]):undefined,'uniqueid':_0x5a150c[_0x5e3e('0x16')]},'log':'CreateMemberReport'});}; \ No newline at end of file +var _0xef42=['TALKING','queuecallerleaveAt','seconds','inbound','calleridnum','exten','queue','agent','accountcode','uniqueid','CreateMemberReport','voiceDialReport','membername','endtime','diff','outbound','dialstring','toNumber','moment','lodash','util','queuecallercompleteAt','queuecallerexitAt','Request','voice','lastAssignedTo','isNil','interface','format'];(function(_0x5694cd,_0x2fefe4){var _0x5235d6=function(_0x4cd263){while(--_0x4cd263){_0x5694cd['push'](_0x5694cd['shift']());}};_0x5235d6(++_0x2fefe4);}(_0xef42,0xc0));var _0x2ef4=function(_0x221fbe,_0x16bc47){_0x221fbe=_0x221fbe-0x0;var _0x51c3eb=_0xef42[_0x221fbe];return _0x51c3eb;};'use strict';var moment=require(_0x2ef4('0x0'));var _=require(_0x2ef4('0x1'));var util=require(_0x2ef4('0x2'));var client=require('../client');exports['voiceQueueReport']=function(_0x9976cd){var _0x1e6c40=_0x9976cd[_0x2ef4('0x3')]||_0x9976cd[_0x2ef4('0x4')];return client[_0x2ef4('0x5')]('CreateMemberReport',{'body':{'channel':_0x2ef4('0x6'),'membername':_0x9976cd[_0x2ef4('0x7')],'interface':_[_0x2ef4('0x8')](_0x9976cd[_0x2ef4('0x9')])?util[_0x2ef4('0xa')]('SIP/%s',_0x9976cd['lastAssignedTo']):_0x9976cd[_0x2ef4('0x9')],'type':_0x2ef4('0xb'),'enterAt':_0x9976cd[_0x2ef4('0xc')],'exitAt':_0x1e6c40,'duration':moment(_0x1e6c40)['diff'](_0x9976cd[_0x2ef4('0xc')],_0x2ef4('0xd')),'data1':_0x2ef4('0xe'),'data2':_0x9976cd[_0x2ef4('0xf')],'data3':_0x9976cd[_0x2ef4('0x10')],'data4':null,'data5':_0x9976cd[_0x2ef4('0x11')],'role':_0x2ef4('0x12'),'internal':_0x9976cd[_0x2ef4('0x13')]?_['toNumber'](_0x9976cd[_0x2ef4('0x13')]):undefined,'uniqueid':_0x9976cd[_0x2ef4('0x14')]},'log':_0x2ef4('0x15')});};exports[_0x2ef4('0x16')]=function(_0x1dd270){return client[_0x2ef4('0x5')]('CreateMemberReport',{'body':{'channel':_0x2ef4('0x6'),'membername':_0x1dd270[_0x2ef4('0x17')],'interface':_0x1dd270[_0x2ef4('0x9')],'type':_0x2ef4('0xb'),'enterAt':_0x1dd270['starttime'],'exitAt':_0x1dd270[_0x2ef4('0x18')],'duration':moment(_0x1dd270[_0x2ef4('0x18')])[_0x2ef4('0x19')](_0x1dd270['starttime'],_0x2ef4('0xd'))>=0x0?moment(_0x1dd270[_0x2ef4('0x18')])['diff'](_0x1dd270['starttime'],_0x2ef4('0xd')):null,'data1':_0x2ef4('0x1a'),'data2':_0x1dd270['accountcode'],'data3':_0x1dd270[_0x2ef4('0x10')],'data4':_0x1dd270[_0x2ef4('0x1b')]||null,'role':_0x2ef4('0x12'),'internal':_0x1dd270['accountcode']?_[_0x2ef4('0x1c')](_0x1dd270[_0x2ef4('0x13')]):undefined,'uniqueid':_0x1dd270[_0x2ef4('0x14')]},'log':_0x2ef4('0x15')});}; \ No newline at end of file diff --git a/server/services/ami/rpc/setting.js b/server/services/ami/rpc/setting.js index 22c5d26..14384f8 100644 --- a/server/services/ami/rpc/setting.js +++ b/server/services/ami/rpc/setting.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xf925=['stopRecordingOnTransfer','previewRecallmeReminderInterval','GetSettings','ShowSetting'];(function(_0x5b29aa,_0x5bac10){var _0x52f6b4=function(_0x508851){while(--_0x508851){_0x5b29aa['push'](_0x5b29aa['shift']());}};_0x52f6b4(++_0x5bac10);}(_0xf925,0xb7));var _0x5f92=function(_0x188bcd,_0x52f234){_0x188bcd=_0x188bcd-0x0;var _0x3c4e5b=_0xf925[_0x188bcd];return _0x3c4e5b;};'use strict';var client=require('../client');exports['getSettings']=function(){return client['Request'](_0x5f92('0x0'),{'options':{'raw':!![],'where':{'id':0x1},'attributes':[_0x5f92('0x1'),_0x5f92('0x2')]},'log':_0x5f92('0x3')});}; \ No newline at end of file +var _0x0901=['stopRecordingOnTransfer','previewRecallmeReminderInterval','../client','getSettings','Request','ShowSetting'];(function(_0x191f8d,_0x326010){var _0x3d16d3=function(_0x2aca6a){while(--_0x2aca6a){_0x191f8d['push'](_0x191f8d['shift']());}};_0x3d16d3(++_0x326010);}(_0x0901,0x134));var _0x1090=function(_0x2d979c,_0x471653){_0x2d979c=_0x2d979c-0x0;var _0x3cf0ed=_0x0901[_0x2d979c];return _0x3cf0ed;};'use strict';var client=require(_0x1090('0x0'));exports[_0x1090('0x1')]=function(){return client[_0x1090('0x2')](_0x1090('0x3'),{'options':{'raw':!![],'where':{'id':0x1},'attributes':[_0x1090('0x4'),_0x1090('0x5')]},'log':'GetSettings'});}; \ No newline at end of file diff --git a/server/services/ami/rpc/template.js b/server/services/ami/rpc/template.js index 4434ca0..d7774a7 100644 --- a/server/services/ami/rpc/template.js +++ b/server/services/ami/rpc/template.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xffa5=['getTemplates','GetTemplate','name','html','../client'];(function(_0x8865be,_0x65a2f7){var _0x8da004=function(_0x12f287){while(--_0x12f287){_0x8865be['push'](_0x8865be['shift']());}};_0x8da004(++_0x65a2f7);}(_0xffa5,0x13f));var _0x5ffa=function(_0x264854,_0x1b1fd2){_0x264854=_0x264854-0x0;var _0x4f9edf=_0xffa5[_0x264854];return _0x4f9edf;};'use strict';var client=require(_0x5ffa('0x0'));exports[_0x5ffa('0x1')]=function(_0xdde355){return function(_0x5ab854){return client['Request'](_0x5ffa('0x2'),{'options':{'raw':!![],'attributes':['id',_0x5ffa('0x3'),_0x5ffa('0x4')]},'log':_0x5ffa('0x2')});};}; \ No newline at end of file +var _0x98e5=['html','../client','Request','GetTemplate','name'];(function(_0x3a92e3,_0x417686){var _0x439cd9=function(_0x198621){while(--_0x198621){_0x3a92e3['push'](_0x3a92e3['shift']());}};_0x439cd9(++_0x417686);}(_0x98e5,0xa1));var _0x598e=function(_0x1aaa86,_0x306fbe){_0x1aaa86=_0x1aaa86-0x0;var _0xd0d2bc=_0x98e5[_0x1aaa86];return _0xd0d2bc;};'use strict';var client=require(_0x598e('0x0'));exports['getTemplates']=function(_0x8a3a42){return function(_0x3de04a){return client[_0x598e('0x1')](_0x598e('0x2'),{'options':{'raw':!![],'attributes':['id',_0x598e('0x3'),_0x598e('0x4')]},'log':_0x598e('0x2')});};}; \ No newline at end of file diff --git a/server/services/ami/rpc/trigger.js b/server/services/ami/rpc/trigger.js index 22f2238..a077e83 100644 --- a/server/services/ami/rpc/trigger.js +++ b/server/services/ami/rpc/trigger.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x6d84=['AllConditions','field','operator','value','AnyConditions','Action','Actions','action','data2','data4','data5','data6','../client','GetTrigger','name','channel','status','Condition'];(function(_0x50cb5c,_0x377a47){var _0x361ad4=function(_0x3c8d51){while(--_0x3c8d51){_0x50cb5c['push'](_0x50cb5c['shift']());}};_0x361ad4(++_0x377a47);}(_0x6d84,0x78));var _0x46d8=function(_0x5ea3db,_0x252a24){_0x5ea3db=_0x5ea3db-0x0;var _0x42ff32=_0x6d84[_0x5ea3db];return _0x42ff32;};'use strict';var client=require(_0x46d8('0x0'));exports['getTriggers']=function(_0x360eba){return function(_0x302118){return client['Request'](_0x46d8('0x1'),{'options':{'raw':![],'attributes':['id',_0x46d8('0x2'),_0x46d8('0x3'),_0x46d8('0x4')],'include':[{'model':_0x46d8('0x5'),'as':_0x46d8('0x6'),'attributes':['id',_0x46d8('0x7'),_0x46d8('0x8'),_0x46d8('0x9')]},{'model':'Condition','as':_0x46d8('0xa'),'attributes':['id',_0x46d8('0x7'),'operator','value']},{'model':_0x46d8('0xb'),'as':_0x46d8('0xc'),'attributes':['id',_0x46d8('0xd'),'data1',_0x46d8('0xe'),'data3',_0x46d8('0xf'),_0x46d8('0x10'),_0x46d8('0x11'),'data7']}]},'log':_0x46d8('0x1')});};}; \ No newline at end of file +var _0x0853=['operator','Actions','action','data1','data3','data4','data6','data7','../client','getTriggers','Request','GetTrigger','name','channel','status','Condition','field','value'];(function(_0x5093e9,_0x5154d0){var _0x4c9a22=function(_0x15176d){while(--_0x15176d){_0x5093e9['push'](_0x5093e9['shift']());}};_0x4c9a22(++_0x5154d0);}(_0x0853,0x1ee));var _0x3085=function(_0xaad8f5,_0x39bb11){_0xaad8f5=_0xaad8f5-0x0;var _0x4ab425=_0x0853[_0xaad8f5];return _0x4ab425;};'use strict';var client=require(_0x3085('0x0'));exports[_0x3085('0x1')]=function(_0x3506a2){return function(_0x1b1ade){return client[_0x3085('0x2')](_0x3085('0x3'),{'options':{'raw':![],'attributes':['id',_0x3085('0x4'),_0x3085('0x5'),_0x3085('0x6')],'include':[{'model':_0x3085('0x7'),'as':'AllConditions','attributes':['id',_0x3085('0x8'),'operator',_0x3085('0x9')]},{'model':_0x3085('0x7'),'as':'AnyConditions','attributes':['id',_0x3085('0x8'),_0x3085('0xa'),_0x3085('0x9')]},{'model':'Action','as':_0x3085('0xb'),'attributes':['id',_0x3085('0xc'),_0x3085('0xd'),'data2',_0x3085('0xe'),_0x3085('0xf'),'data5',_0x3085('0x10'),_0x3085('0x11')]}]},'log':_0x3085('0x3')});};}; \ No newline at end of file diff --git a/server/services/ami/rpc/trunk.js b/server/services/ami/rpc/trunk.js index 539df91..d99a45d 100644 --- a/server/services/ami/rpc/trunk.js +++ b/server/services/ami/rpc/trunk.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x5fd1=['GetTrunk','../client','Request','registry','defaultuser'];(function(_0x1233d2,_0x328b47){var _0x4a97c7=function(_0x17fc08){while(--_0x17fc08){_0x1233d2['push'](_0x1233d2['shift']());}};_0x4a97c7(++_0x328b47);}(_0x5fd1,0x155));var _0x15fd=function(_0x312e65,_0x33e961){_0x312e65=_0x312e65-0x0;var _0x1415c9=_0x5fd1[_0x312e65];return _0x1415c9;};'use strict';var client=require(_0x15fd('0x0'));exports['getTrunks']=function(_0x1b4cdd){return function(_0x570048){return client[_0x15fd('0x1')]('GetTrunk',{'options':{'raw':!![],'where':{'active':0x1},'attributes':['id','name',_0x15fd('0x2'),_0x15fd('0x3')]},'log':_0x15fd('0x4')});};}; \ No newline at end of file +var _0x5482=['Request','name','registry','../client','getTrunks'];(function(_0x5a1a51,_0x144c79){var _0x47edd7=function(_0x2259bb){while(--_0x2259bb){_0x5a1a51['push'](_0x5a1a51['shift']());}};_0x47edd7(++_0x144c79);}(_0x5482,0xf8));var _0x2548=function(_0x2370e3,_0x351059){_0x2370e3=_0x2370e3-0x0;var _0x5dd7c1=_0x5482[_0x2370e3];return _0x5dd7c1;};'use strict';var client=require(_0x2548('0x0'));exports[_0x2548('0x1')]=function(_0x30b2c6){return function(_0xb4bfcf){return client[_0x2548('0x2')]('GetTrunk',{'options':{'raw':!![],'where':{'active':0x1},'attributes':['id',_0x2548('0x3'),_0x2548('0x4'),'defaultuser']},'log':'GetTrunk'});};}; \ No newline at end of file diff --git a/server/services/ami/rpc/user.js b/server/services/ami/rpc/user.js index 12e3129..be58aa2 100644 --- a/server/services/ami/rpc/user.js +++ b/server/services/ami/rpc/user.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xa9e0=['agent','lastPauseAt','interface','../client','getAgents','Request','name','accountcode','fullname','online','lastLoginAt','pauseType','voicePause','phone','mobile','getTelephones','telephone','internal','savePause','PauseUser','saveUnpause','UnpauseUser','getAgent','ShowUser'];(function(_0x53ccf2,_0x13cb67){var _0x5a2964=function(_0x3b0514){while(--_0x3b0514){_0x53ccf2['push'](_0x53ccf2['shift']());}};_0x5a2964(++_0x13cb67);}(_0xa9e0,0x123));var _0x0a9e=function(_0x298ed3,_0x4ab5e1){_0x298ed3=_0x298ed3-0x0;var _0x5aad28=_0xa9e0[_0x298ed3];return _0x5aad28;};'use strict';var client=require(_0x0a9e('0x0'));exports[_0x0a9e('0x1')]=function(){return function(){return client[_0x0a9e('0x2')]('GetUser',{'options':{'raw':![],'where':{'role':'agent'},'attributes':['id',_0x0a9e('0x3'),'email',_0x0a9e('0x4'),_0x0a9e('0x5'),_0x0a9e('0x6'),_0x0a9e('0x7'),_0x0a9e('0x8'),'lastPauseAt',_0x0a9e('0x9'),_0x0a9e('0xa'),_0x0a9e('0xb'),'interface']},'log':'getAgents'});};};exports[_0x0a9e('0xc')]=function(){return function(){return client['Request']('GetUser',{'options':{'raw':!![],'where':{'role':_0x0a9e('0xd')},'attributes':['id',_0x0a9e('0x3'),_0x0a9e('0x4'),_0x0a9e('0xe')]},'log':_0x0a9e('0xc')});};};exports[_0x0a9e('0xf')]=function(_0x4a4c56,_0x50dfb2,_0x527cdd){return client['Request'](_0x0a9e('0x10'),{'body':{'type':_0x50dfb2,'uniqueid':_0x527cdd},'options':{'where':{'id':_0x4a4c56['id']}},'log':_0x0a9e('0xf')});};exports[_0x0a9e('0x11')]=function(_0x26d672){return client[_0x0a9e('0x2')](_0x0a9e('0x12'),{'body':{},'options':{'where':{'id':_0x26d672['id']}},'log':'savePause'});};exports[_0x0a9e('0x13')]=function(_0x239b12){return client[_0x0a9e('0x2')](_0x0a9e('0x14'),{'options':{'raw':![],'where':{'role':_0x0a9e('0x15'),'id':_0x239b12},'attributes':['id',_0x0a9e('0x3'),'email',_0x0a9e('0x4'),'fullname',_0x0a9e('0x6'),'lastLoginAt',_0x0a9e('0x8'),_0x0a9e('0x16'),'voicePause',_0x0a9e('0x17')]},'log':'getAgent'});}; \ No newline at end of file +var _0xe706=['internal','savePause','PauseUser','saveUnpause','UnpauseUser','ShowUser','getAgent','../client','getAgents','Request','agent','name','email','accountcode','fullname','online','lastLoginAt','pauseType','lastPauseAt','voicePause','phone','mobile','interface','getTelephones','GetUser','telephone'];(function(_0x2b4411,_0x2625ed){var _0x8e41ef=function(_0x2aa8c1){while(--_0x2aa8c1){_0x2b4411['push'](_0x2b4411['shift']());}};_0x8e41ef(++_0x2625ed);}(_0xe706,0xa3));var _0x6e70=function(_0x58788d,_0x88b74f){_0x58788d=_0x58788d-0x0;var _0x58ceba=_0xe706[_0x58788d];return _0x58ceba;};'use strict';var client=require(_0x6e70('0x0'));exports[_0x6e70('0x1')]=function(){return function(){return client[_0x6e70('0x2')]('GetUser',{'options':{'raw':![],'where':{'role':_0x6e70('0x3')},'attributes':['id',_0x6e70('0x4'),_0x6e70('0x5'),_0x6e70('0x6'),_0x6e70('0x7'),_0x6e70('0x8'),_0x6e70('0x9'),_0x6e70('0xa'),_0x6e70('0xb'),_0x6e70('0xc'),_0x6e70('0xd'),_0x6e70('0xe'),_0x6e70('0xf')]},'log':_0x6e70('0x1')});};};exports[_0x6e70('0x10')]=function(){return function(){return client[_0x6e70('0x2')](_0x6e70('0x11'),{'options':{'raw':!![],'where':{'role':_0x6e70('0x12')},'attributes':['id',_0x6e70('0x4'),_0x6e70('0x6'),_0x6e70('0x13')]},'log':_0x6e70('0x10')});};};exports[_0x6e70('0x14')]=function(_0x4600f9,_0x5b3d07,_0x47f6b2){return client[_0x6e70('0x2')](_0x6e70('0x15'),{'body':{'type':_0x5b3d07,'uniqueid':_0x47f6b2},'options':{'where':{'id':_0x4600f9['id']}},'log':_0x6e70('0x14')});};exports[_0x6e70('0x16')]=function(_0x3b38f3){return client[_0x6e70('0x2')](_0x6e70('0x17'),{'body':{},'options':{'where':{'id':_0x3b38f3['id']}},'log':_0x6e70('0x14')});};exports['getAgent']=function(_0x52737e){return client['Request'](_0x6e70('0x18'),{'options':{'raw':![],'where':{'role':'agent','id':_0x52737e},'attributes':['id','name',_0x6e70('0x5'),_0x6e70('0x6'),'fullname',_0x6e70('0x8'),'lastLoginAt',_0x6e70('0xa'),_0x6e70('0xb'),'voicePause','interface']},'log':_0x6e70('0x19')});}; \ No newline at end of file diff --git a/server/services/ami/rpc/voiceAgentReport.js b/server/services/ami/rpc/voiceAgentReport.js index 219387b..00f5e6d 100644 --- a/server/services/ami/rpc/voiceAgentReport.js +++ b/server/services/ami/rpc/voiceAgentReport.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xba68=['CreateVoiceAgentReport','update','UpdateVoiceAgentReport','create','Request'];(function(_0x25f416,_0x28c240){var _0x348be9=function(_0x405f24){while(--_0x405f24){_0x25f416['push'](_0x25f416['shift']());}};_0x348be9(++_0x28c240);}(_0xba68,0x94));var _0x8ba6=function(_0x580ebc,_0x444dc6){_0x580ebc=_0x580ebc-0x0;var _0x39fe92=_0xba68[_0x580ebc];return _0x39fe92;};'use strict';var client=require('../client');exports[_0x8ba6('0x0')]=function(_0x5cddc7){return client[_0x8ba6('0x1')](_0x8ba6('0x2'),{'body':_0x5cddc7,'log':_0x8ba6('0x2')});};exports[_0x8ba6('0x3')]=function(_0x18e035,_0x22cf06,_0x4d4627){return client[_0x8ba6('0x1')](_0x8ba6('0x4'),{'body':_0x18e035,'options':{'where':{'uniqueid':_0x22cf06,'interface':_0x4d4627,'agentcomplete':!![]}},'log':_0x8ba6('0x4')});}; \ No newline at end of file +var _0x1743=['create','Request','CreateVoiceAgentReport','update','UpdateVoiceAgentReport','../client'];(function(_0xa464c9,_0x7c86d8){var _0x3d73c4=function(_0x5c2056){while(--_0x5c2056){_0xa464c9['push'](_0xa464c9['shift']());}};_0x3d73c4(++_0x7c86d8);}(_0x1743,0x10d));var _0x3174=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0x1743[_0x3dd15e];return _0x231fd0;};'use strict';var client=require(_0x3174('0x0'));exports[_0x3174('0x1')]=function(_0x3e0954){return client[_0x3174('0x2')]('CreateVoiceAgentReport',{'body':_0x3e0954,'log':_0x3174('0x3')});};exports[_0x3174('0x4')]=function(_0x516f62,_0x1653c2,_0x44c3fb){return client[_0x3174('0x2')](_0x3174('0x5'),{'body':_0x516f62,'options':{'where':{'uniqueid':_0x1653c2,'interface':_0x44c3fb,'agentcomplete':!![]}},'log':'UpdateVoiceAgentReport'});}; \ No newline at end of file diff --git a/server/services/ami/rpc/voiceCallReport.js b/server/services/ami/rpc/voiceCallReport.js index 25238e0..8d591ea 100644 --- a/server/services/ami/rpc/voiceCallReport.js +++ b/server/services/ami/rpc/voiceCallReport.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x1df0=['moment','util','lodash','create','CreateVoiceCallReport','merge','calleridnum','getVoiceCallReports','Request','GetVoiceCallReport','outbound','startOf','day','format','YYYY-MM-DD\x20HH:mm:ss','endOf','type','disposition','duration','billableseconds','GetVoiceCallReports'];(function(_0x5e59dc,_0x103d63){var _0x575102=function(_0xbfd4e7){while(--_0xbfd4e7){_0x5e59dc['push'](_0x5e59dc['shift']());}};_0x575102(++_0x103d63);}(_0x1df0,0x1b9));var _0x01df=function(_0x19e35c,_0x29cd1e){_0x19e35c=_0x19e35c-0x0;var _0x3e1fe8=_0x1df0[_0x19e35c];return _0x3e1fe8;};'use strict';var moment=require(_0x01df('0x0'));var util=require(_0x01df('0x1'));var _=require(_0x01df('0x2'));var client=require('../client');exports[_0x01df('0x3')]=function(_0xe82b0c){return client['Request'](_0x01df('0x4'),{'body':_[_0x01df('0x5')](_0xe82b0c,{'source':_0xe82b0c[_0x01df('0x6')],'destinationcontext':_0xe82b0c['context'],'callerid':_0xe82b0c['callerid'],'amaflags':'DOCUMENTATION'}),'log':_0x01df('0x4')});};exports[_0x01df('0x7')]=function(){return function(){return client[_0x01df('0x8')](_0x01df('0x9'),{'options':{'where':{'type':[_0x01df('0xa')],'createdAt':{'$between':[moment()[_0x01df('0xb')](_0x01df('0xc'))[_0x01df('0xd')](_0x01df('0xe')),moment()[_0x01df('0xf')](_0x01df('0xc'))[_0x01df('0xd')](_0x01df('0xe'))]}},'attributes':[_0x01df('0x10'),_0x01df('0x11'),_0x01df('0x12'),_0x01df('0x13')]},'log':_0x01df('0x14')});};}; \ No newline at end of file +var _0x39c2=['GetVoiceCallReports','moment','util','lodash','create','Request','CreateVoiceCallReport','merge','DOCUMENTATION','getVoiceCallReports','GetVoiceCallReport','outbound','startOf','format','YYYY-MM-DD\x20HH:mm:ss','endOf','type','disposition','duration'];(function(_0x5aaeb4,_0xebdb28){var _0x592680=function(_0x28bb4c){while(--_0x28bb4c){_0x5aaeb4['push'](_0x5aaeb4['shift']());}};_0x592680(++_0xebdb28);}(_0x39c2,0x1a3));var _0x239c=function(_0x3fd4bc,_0x202472){_0x3fd4bc=_0x3fd4bc-0x0;var _0x4cd041=_0x39c2[_0x3fd4bc];return _0x4cd041;};'use strict';var moment=require(_0x239c('0x0'));var util=require(_0x239c('0x1'));var _=require(_0x239c('0x2'));var client=require('../client');exports[_0x239c('0x3')]=function(_0x56a59d){return client[_0x239c('0x4')](_0x239c('0x5'),{'body':_[_0x239c('0x6')](_0x56a59d,{'source':_0x56a59d['calleridnum'],'destinationcontext':_0x56a59d['context'],'callerid':_0x56a59d['callerid'],'amaflags':_0x239c('0x7')}),'log':_0x239c('0x5')});};exports[_0x239c('0x8')]=function(){return function(){return client[_0x239c('0x4')](_0x239c('0x9'),{'options':{'where':{'type':[_0x239c('0xa')],'createdAt':{'$between':[moment()[_0x239c('0xb')]('day')[_0x239c('0xc')](_0x239c('0xd')),moment()[_0x239c('0xe')]('day')[_0x239c('0xc')](_0x239c('0xd'))]}},'attributes':[_0x239c('0xf'),_0x239c('0x10'),_0x239c('0x11'),'billableseconds']},'log':_0x239c('0x12')});};}; \ No newline at end of file diff --git a/server/services/ami/rpc/voiceDialReport.js b/server/services/ami/rpc/voiceDialReport.js index e5fca2c..0f1312e 100644 --- a/server/services/ami/rpc/voiceDialReport.js +++ b/server/services/ami/rpc/voiceDialReport.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x5fff=['Request','CreateVoiceDialReport','create'];(function(_0x55565c,_0x313ebf){var _0x452874=function(_0x279e3c){while(--_0x279e3c){_0x55565c['push'](_0x55565c['shift']());}};_0x452874(++_0x313ebf);}(_0x5fff,0x194));var _0xf5ff=function(_0x1589dd,_0x2b9d22){_0x1589dd=_0x1589dd-0x0;var _0x1bddd1=_0x5fff[_0x1589dd];return _0x1bddd1;};'use strict';var client=require('../client');exports[_0xf5ff('0x0')]=function(_0x2e51b0){return client[_0xf5ff('0x1')]('CreateVoiceDialReport',{'body':_0x2e51b0,'log':_0xf5ff('0x2')});}; \ No newline at end of file +var _0xa8a4=['Request','CreateVoiceDialReport','create'];(function(_0x43225e,_0xba1210){var _0x5e6c0d=function(_0x19e910){while(--_0x19e910){_0x43225e['push'](_0x43225e['shift']());}};_0x5e6c0d(++_0xba1210);}(_0xa8a4,0x15e));var _0x4a8a=function(_0x18b5b3,_0x50cf3f){_0x18b5b3=_0x18b5b3-0x0;var _0x3c1040=_0xa8a4[_0x18b5b3];return _0x3c1040;};'use strict';var client=require('../client');exports[_0x4a8a('0x0')]=function(_0x113ab6){return client[_0x4a8a('0x1')](_0x4a8a('0x2'),{'body':_0x113ab6,'log':_0x4a8a('0x2')});}; \ No newline at end of file diff --git a/server/services/ami/rpc/voiceExtension.js b/server/services/ami/rpc/voiceExtension.js index 246637d..d0c2a13 100644 --- a/server/services/ami/rpc/voiceExtension.js +++ b/server/services/ami/rpc/voiceExtension.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x5db8=['exten','recordingFormat','../client','getVoiceExtensions','Request'];(function(_0x1facfa,_0x1acf7d){var _0x9ec701=function(_0x115e37){while(--_0x115e37){_0x1facfa['push'](_0x1facfa['shift']());}};_0x9ec701(++_0x1acf7d);}(_0x5db8,0xbb));var _0x85db=function(_0x7ad6cb,_0xffee6c){_0x7ad6cb=_0x7ad6cb-0x0;var _0x22a0ba=_0x5db8[_0x7ad6cb];return _0x22a0ba;};'use strict';var client=require(_0x85db('0x0'));exports[_0x85db('0x1')]=function(){return function(){return client[_0x85db('0x2')]('GetVoiceExtension',{'options':{'raw':!![],'attributes':['id',_0x85db('0x3'),_0x85db('0x4')],'where':{'VoiceExtensionId':null}},'log':_0x85db('0x1')});};}; \ No newline at end of file +var _0xaa1b=['getVoiceExtensions','Request','exten','../client'];(function(_0x404cde,_0x27b51c){var _0x139882=function(_0x1f31d1){while(--_0x1f31d1){_0x404cde['push'](_0x404cde['shift']());}};_0x139882(++_0x27b51c);}(_0xaa1b,0x123));var _0xbaa1=function(_0x20a584,_0xe384a5){_0x20a584=_0x20a584-0x0;var _0x4b41a8=_0xaa1b[_0x20a584];return _0x4b41a8;};'use strict';var client=require(_0xbaa1('0x0'));exports[_0xbaa1('0x1')]=function(){return function(){return client[_0xbaa1('0x2')]('GetVoiceExtension',{'options':{'raw':!![],'attributes':['id',_0xbaa1('0x3'),'recordingFormat'],'where':{'VoiceExtensionId':null}},'log':_0xbaa1('0x1')});};}; \ No newline at end of file diff --git a/server/services/ami/rpc/voiceQueue.js b/server/services/ami/rpc/voiceQueue.js index 428bf02..b23af37 100644 --- a/server/services/ami/rpc/voiceQueue.js +++ b/server/services/ami/rpc/voiceQueue.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xfe3c=['dialAbandonedMaxRetry','dialMachineMaxRetry','dialAgentRejectMaxRetry','dialAgentRejectRetryFrequency','mandatoryDisposition','dialPredictiveIntervalMinThreshold','dialPreviewRecallmeReminder','Trunk','callerid','active','Pause','mandatoryDispositionPause','TrunkBackup','Interval','Intervals','interval','Request','GetVoiceQueue','name','acwTimeout','autopause','monitor_format','dialMethod','dialPredictiveOptimizationPercentage','dialPredictiveInterval','dialOriginateCallerIdName','dialOriginateCallerIdNumber','dialOriginateTimeout','dialQueueOptions','dialQueueProject','dialCongestionMaxRetry','dialCongestionRetryFrequency','dialBusyMaxRetry','dialBusyRetryFrequency','dialTimezone','dialGlobalInterval','dialAMDActive','dialAMDInitialSilence','dialAMDGreeting','dialAMDAfterGreetingSilence','dialAMDTotalAnalysisTime','dialAMDBetweenWordsSilence','dialAMDMaximumNumberOfWords','dialAMDSilenceThreshold','dialAMDMaximumWordLength','timeout','dialRecallMeTimeout','dialAgiAfterHangupAgent','dialAgiAfterHangupClient','dialQueueProject2','strategy','dialRandomLastDigitCallerIdNumber','dialCutDigit','dialNoSuchNumberMaxRetry','dialDropMaxRetry','dialDropRetryFrequency'];(function(_0x4b627f,_0x139bd4){var _0x2951c2=function(_0x475533){while(--_0x475533){_0x4b627f['push'](_0x4b627f['shift']());}};_0x2951c2(++_0x139bd4);}(_0xfe3c,0xb8));var _0xcfe3=function(_0x51f7b5,_0x43f364){_0x51f7b5=_0x51f7b5-0x0;var _0x24b537=_0xfe3c[_0x51f7b5];return _0x24b537;};'use strict';var client=require('../client');exports['getVoiceQueues']=function(){return function(){return client[_0xcfe3('0x0')](_0xcfe3('0x1'),{'options':{'raw':![],'attributes':['id',_0xcfe3('0x2'),'acw',_0xcfe3('0x3'),_0xcfe3('0x4'),_0xcfe3('0x5'),'type','dialActive',_0xcfe3('0x6'),'dialLimitChannel','dialLimitQueue','dialPowerLevel','dialPredictiveOptimization',_0xcfe3('0x7'),_0xcfe3('0x8'),_0xcfe3('0x9'),_0xcfe3('0xa'),_0xcfe3('0xb'),_0xcfe3('0xc'),'dialQueueTimeout',_0xcfe3('0xd'),_0xcfe3('0xe'),_0xcfe3('0xf'),_0xcfe3('0x10'),_0xcfe3('0x11'),'dialNoAnswerMaxRetry','dialNoAnswerRetryFrequency','dialGlobalMaxRetry',_0xcfe3('0x12'),_0xcfe3('0x13'),'dialPrefix','dialCheckDuplicateType',_0xcfe3('0x14'),_0xcfe3('0x15'),_0xcfe3('0x16'),_0xcfe3('0x17'),_0xcfe3('0x18'),'dialAMDMinWordLength',_0xcfe3('0x19'),_0xcfe3('0x1a'),_0xcfe3('0x1b'),_0xcfe3('0x1c'),_0xcfe3('0x1d'),_0xcfe3('0x1e'),'dialRecallInQueue','dialOrderByScheduledAt',_0xcfe3('0x1f'),_0xcfe3('0x20'),_0xcfe3('0x21'),_0xcfe3('0x5'),_0xcfe3('0x22'),_0xcfe3('0x23'),_0xcfe3('0x24'),_0xcfe3('0x25'),'dialNoSuchNumberRetryFrequency',_0xcfe3('0x26'),_0xcfe3('0x27'),_0xcfe3('0x28'),'dialAbandonedRetryFrequency',_0xcfe3('0x29'),'dialMachineRetryFrequency',_0xcfe3('0x2a'),_0xcfe3('0x2b'),_0xcfe3('0x2c'),'dialPredictiveIntervalMaxThreshold',_0xcfe3('0x2d'),'dialPreviewAutoRecallMe',_0xcfe3('0x2e')],'include':[{'model':'Trunk','as':_0xcfe3('0x2f'),'attributes':['id','name',_0xcfe3('0x30'),_0xcfe3('0x31')]},{'model':_0xcfe3('0x32'),'as':_0xcfe3('0x33'),'attributes':['id',_0xcfe3('0x2')]},{'model':_0xcfe3('0x2f'),'as':_0xcfe3('0x34'),'attributes':['id',_0xcfe3('0x2'),_0xcfe3('0x30'),'active']},{'model':'Interval','as':_0xcfe3('0x35'),'attributes':['id',_0xcfe3('0x2')],'include':[{'model':_0xcfe3('0x35'),'as':_0xcfe3('0x36'),'attributes':['id',_0xcfe3('0x2'),_0xcfe3('0x37')]}]}]},'log':'getVoiceQueues'});};}; \ No newline at end of file +var _0x143b=['acwTimeout','autopause','type','dialLimitChannel','dialLimitQueue','dialPowerLevel','dialPredictiveOptimization','dialPredictiveOptimizationPercentage','dialOriginateCallerIdName','dialOriginateCallerIdNumber','dialQueueOptions','dialQueueTimeout','dialQueueProject','dialCongestionRetryFrequency','dialBusyMaxRetry','dialNoAnswerRetryFrequency','dialTimezone','dialGlobalInterval','dialPrefix','dialCheckDuplicateType','dialAMDActive','dialAMDInitialSilence','dialAMDGreeting','dialAMDAfterGreetingSilence','dialAMDTotalAnalysisTime','dialAMDMinWordLength','dialAMDBetweenWordsSilence','dialAMDMaximumNumberOfWords','dialAMDMaximumWordLength','timeout','dialRecallMeTimeout','dialRecallInQueue','dialAgiAfterHangupAgent','dialAgiAfterHangupClient','dialQueueProject2','strategy','dialRandomLastDigitCallerIdNumber','dialNoSuchNumberRetryFrequency','dialDropMaxRetry','dialDropRetryFrequency','dialAbandonedMaxRetry','dialMachineRetryFrequency','dialAgentRejectMaxRetry','dialAgentRejectRetryFrequency','mandatoryDisposition','dialPredictiveIntervalMaxThreshold','dialPredictiveIntervalMinThreshold','dialPreviewRecallmeReminder','Trunk','active','Pause','mandatoryDispositionPause','TrunkBackup','callerid','Interval','Intervals','../client','getVoiceQueues','Request','name','acw'];(function(_0x330562,_0x19a716){var _0xb12441=function(_0x3df07c){while(--_0x3df07c){_0x330562['push'](_0x330562['shift']());}};_0xb12441(++_0x19a716);}(_0x143b,0xef));var _0xb143=function(_0x267765,_0x4281a9){_0x267765=_0x267765-0x0;var _0x3dbe0b=_0x143b[_0x267765];return _0x3dbe0b;};'use strict';var client=require(_0xb143('0x0'));exports[_0xb143('0x1')]=function(){return function(){return client[_0xb143('0x2')]('GetVoiceQueue',{'options':{'raw':![],'attributes':['id',_0xb143('0x3'),_0xb143('0x4'),_0xb143('0x5'),_0xb143('0x6'),'monitor_format',_0xb143('0x7'),'dialActive','dialMethod',_0xb143('0x8'),_0xb143('0x9'),_0xb143('0xa'),_0xb143('0xb'),_0xb143('0xc'),'dialPredictiveInterval',_0xb143('0xd'),_0xb143('0xe'),'dialOriginateTimeout',_0xb143('0xf'),_0xb143('0x10'),_0xb143('0x11'),'dialCongestionMaxRetry',_0xb143('0x12'),_0xb143('0x13'),'dialBusyRetryFrequency','dialNoAnswerMaxRetry',_0xb143('0x14'),'dialGlobalMaxRetry',_0xb143('0x15'),_0xb143('0x16'),_0xb143('0x17'),_0xb143('0x18'),_0xb143('0x19'),_0xb143('0x1a'),_0xb143('0x1b'),_0xb143('0x1c'),_0xb143('0x1d'),_0xb143('0x1e'),_0xb143('0x1f'),_0xb143('0x20'),'dialAMDSilenceThreshold',_0xb143('0x21'),_0xb143('0x22'),_0xb143('0x23'),_0xb143('0x24'),'dialOrderByScheduledAt',_0xb143('0x25'),_0xb143('0x26'),_0xb143('0x27'),'monitor_format',_0xb143('0x28'),_0xb143('0x29'),'dialCutDigit','dialNoSuchNumberMaxRetry',_0xb143('0x2a'),_0xb143('0x2b'),_0xb143('0x2c'),_0xb143('0x2d'),'dialAbandonedRetryFrequency','dialMachineMaxRetry',_0xb143('0x2e'),_0xb143('0x2f'),_0xb143('0x30'),_0xb143('0x31'),_0xb143('0x32'),_0xb143('0x33'),'dialPreviewAutoRecallMe',_0xb143('0x34')],'include':[{'model':_0xb143('0x35'),'as':_0xb143('0x35'),'attributes':['id',_0xb143('0x3'),'callerid',_0xb143('0x36')]},{'model':_0xb143('0x37'),'as':_0xb143('0x38'),'attributes':['id','name']},{'model':_0xb143('0x35'),'as':_0xb143('0x39'),'attributes':['id','name',_0xb143('0x3a'),_0xb143('0x36')]},{'model':_0xb143('0x3b'),'as':_0xb143('0x3b'),'attributes':['id',_0xb143('0x3')],'include':[{'model':_0xb143('0x3b'),'as':_0xb143('0x3c'),'attributes':['id',_0xb143('0x3'),'interval']}]}]},'log':_0xb143('0x1')});};}; \ No newline at end of file diff --git a/server/services/ami/rpc/voiceQueueReport.js b/server/services/ami/rpc/voiceQueueReport.js index 92f3d08..fe37550 100644 --- a/server/services/ami/rpc/voiceQueueReport.js +++ b/server/services/ami/rpc/voiceQueueReport.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xa9e0=['queuecallerexit','queuecallerexitAt','moment','lodash','../client','Request','CreateVoiceQueueReport','getVoiceQueueReports','GetVoiceQueueReport','startOf','format','YYYY-MM-DD\x20HH:mm:ss','endOf','queuecallerjoinAt','queuecallerleaveAt','queuecallercomplete','queuecallercompleteAt'];(function(_0x23d346,_0x31ac36){var _0x24a198=function(_0x3a2069){while(--_0x3a2069){_0x23d346['push'](_0x23d346['shift']());}};_0x24a198(++_0x31ac36);}(_0xa9e0,0x123));var _0x0a9e=function(_0x298ed3,_0x4ab5e1){_0x298ed3=_0x298ed3-0x0;var _0x5aad28=_0xa9e0[_0x298ed3];return _0x5aad28;};'use strict';var moment=require(_0x0a9e('0x0'));var _=require(_0x0a9e('0x1'));var client=require(_0x0a9e('0x2'));exports['create']=function(_0x550fbc){return client[_0x0a9e('0x3')]('CreateVoiceQueueReport',{'body':_0x550fbc,'log':_0x0a9e('0x4')});};exports[_0x0a9e('0x5')]=function(){return function(){return client[_0x0a9e('0x3')](_0x0a9e('0x6'),{'options':{'where':{'createdAt':{'$between':[moment()[_0x0a9e('0x7')]('day')[_0x0a9e('0x8')](_0x0a9e('0x9')),moment()[_0x0a9e('0xa')]('day')['format'](_0x0a9e('0x9'))]}},'attributes':['uniqueid','queue',_0x0a9e('0xb'),_0x0a9e('0xc'),_0x0a9e('0xd'),_0x0a9e('0xe'),_0x0a9e('0xf'),_0x0a9e('0x10'),'queuecallerabandon','queuecallerabandonAt']},'log':'GetVoiceQueueReports'});};}; \ No newline at end of file +var _0xa9e0=['queuecallerexit','queuecallerexitAt','moment','lodash','../client','Request','CreateVoiceQueueReport','getVoiceQueueReports','GetVoiceQueueReport','startOf','format','YYYY-MM-DD\x20HH:mm:ss','endOf','queuecallerjoinAt','queuecallerleaveAt','queuecallercomplete','queuecallercompleteAt'];(function(_0x593a99,_0x236c1d){var _0x3ebee8=function(_0x1eda93){while(--_0x1eda93){_0x593a99['push'](_0x593a99['shift']());}};_0x3ebee8(++_0x236c1d);}(_0xa9e0,0x123));var _0x0a9e=function(_0x521929,_0x479be5){_0x521929=_0x521929-0x0;var _0x632436=_0xa9e0[_0x521929];return _0x632436;};'use strict';var moment=require(_0x0a9e('0x0'));var _=require(_0x0a9e('0x1'));var client=require(_0x0a9e('0x2'));exports['create']=function(_0x550fbc){return client[_0x0a9e('0x3')]('CreateVoiceQueueReport',{'body':_0x550fbc,'log':_0x0a9e('0x4')});};exports[_0x0a9e('0x5')]=function(){return function(){return client[_0x0a9e('0x3')](_0x0a9e('0x6'),{'options':{'where':{'createdAt':{'$between':[moment()[_0x0a9e('0x7')]('day')[_0x0a9e('0x8')](_0x0a9e('0x9')),moment()[_0x0a9e('0xa')]('day')['format'](_0x0a9e('0x9'))]}},'attributes':['uniqueid','queue',_0x0a9e('0xb'),_0x0a9e('0xc'),_0x0a9e('0xd'),_0x0a9e('0xe'),_0x0a9e('0xf'),_0x0a9e('0x10'),'queuecallerabandon','queuecallerabandonAt']},'log':'GetVoiceQueueReports'});};}; \ No newline at end of file diff --git a/server/services/ami/rpc/voiceQueueRt.js b/server/services/ami/rpc/voiceQueueRt.js index f442132..c8d7238 100644 --- a/server/services/ami/rpc/voiceQueueRt.js +++ b/server/services/ami/rpc/voiceQueueRt.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xecad=['getVoiceQueueRtPauses','../client','Request','GetVoiceQueueRtPauses'];(function(_0x18a8ba,_0x304749){var _0x1b7626=function(_0x147244){while(--_0x147244){_0x18a8ba['push'](_0x18a8ba['shift']());}};_0x1b7626(++_0x304749);}(_0xecad,0x1a9));var _0xdeca=function(_0x2bfe52,_0x43946e){_0x2bfe52=_0x2bfe52-0x0;var _0x1cf649=_0xecad[_0x2bfe52];return _0x1cf649;};'use strict';var client=require(_0xdeca('0x0'));exports['getVoiceQueueRtPauses']=function(_0x437368){return function(){return client[_0xdeca('0x1')](_0xdeca('0x2'),{'options':{'where':{'VoiceQueueId':_0x437368,'paused':!![]},'raw':!![]},'log':_0xdeca('0x3')});};}; \ No newline at end of file +var _0x6b7d=['../client','Request','GetVoiceQueueRtPauses','getVoiceQueueRtPauses'];(function(_0x20a584,_0xe384a5){var _0x4b41a8=function(_0x2127c6){while(--_0x2127c6){_0x20a584['push'](_0x20a584['shift']());}};_0x4b41a8(++_0xe384a5);}(_0x6b7d,0x1c8));var _0xd6b7=function(_0x4cf98e,_0xba4b79){_0x4cf98e=_0x4cf98e-0x0;var _0x1623ac=_0x6b7d[_0x4cf98e];return _0x1623ac;};'use strict';var client=require(_0xd6b7('0x0'));exports['getVoiceQueueRtPauses']=function(_0x90f40f){return function(){return client[_0xd6b7('0x1')](_0xd6b7('0x2'),{'options':{'where':{'VoiceQueueId':_0x90f40f,'paused':!![]},'raw':!![]},'log':_0xd6b7('0x3')});};}; \ No newline at end of file diff --git a/server/services/ami/rpc/voiceRecording.js b/server/services/ami/rpc/voiceRecording.js index 4fc5bb8..8e62778 100644 --- a/server/services/ami/rpc/voiceRecording.js +++ b/server/services/ami/rpc/voiceRecording.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x7a54=['create','Request','CreateVoiceRecording','monitorFilename','lodash','../client'];(function(_0x3342ed,_0x5a4ba4){var _0x539627=function(_0x4c1fd9){while(--_0x4c1fd9){_0x3342ed['push'](_0x3342ed['shift']());}};_0x539627(++_0x5a4ba4);}(_0x7a54,0x106));var _0x47a5=function(_0x47d1b5,_0x19bcde){_0x47d1b5=_0x47d1b5-0x0;var _0x27f7b2=_0x7a54[_0x47d1b5];return _0x27f7b2;};'use strict';var _=require(_0x47a5('0x0'));var client=require(_0x47a5('0x1'));exports[_0x47a5('0x2')]=function(_0x58157c){return client[_0x47a5('0x3')](_0x47a5('0x4'),{'body':_['merge'](_0x58157c,{'value':_0x58157c[_0x47a5('0x5')]}),'log':_0x47a5('0x4')});}; \ No newline at end of file +var _0x9957=['CreateVoiceRecording','merge','monitorFilename','lodash','../client','create'];(function(_0x21c71e,_0x26aac9){var _0x5b4f7b=function(_0x100901){while(--_0x100901){_0x21c71e['push'](_0x21c71e['shift']());}};_0x5b4f7b(++_0x26aac9);}(_0x9957,0x93));var _0x7995=function(_0x2dafbe,_0x5d04de){_0x2dafbe=_0x2dafbe-0x0;var _0x58a45a=_0x9957[_0x2dafbe];return _0x58a45a;};'use strict';var _=require(_0x7995('0x0'));var client=require(_0x7995('0x1'));exports[_0x7995('0x2')]=function(_0x10a05d){return client['Request'](_0x7995('0x3'),{'body':_[_0x7995('0x4')](_0x10a05d,{'value':_0x10a05d[_0x7995('0x5')]}),'log':_0x7995('0x3')});}; \ No newline at end of file diff --git a/server/services/ami/rpc/voiceTransferReport.js b/server/services/ami/rpc/voiceTransferReport.js index faf39cf..4cd5d7a 100644 --- a/server/services/ami/rpc/voiceTransferReport.js +++ b/server/services/ami/rpc/voiceTransferReport.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xcc39=['../client','blindTransfer','Request','CreateVoiceTransferReport','result','transfererconnectedlinenum','transfererconnectedlinename','transfereraccountcode','transferercontext','transfererexten','transfererlinkedid','transfereechannel','transfereecalleridnum','transfereeconnectedlinenum','transfereeconnectedlinename','transfereeexten','isexternal','context','extension','blind','attendedTransfer','origtransfererchannel','origtransferercalleridnum','origtransferercalleridname','secondtransfererconnectedlinenum','origtransfereraccountcode','secondtransferercontext','secondtransfererexten','origtransfererlinkedid','transfertargetchannel','transfertargetcalleridnum','transfertargetcalleridname','transfertargetconnectedlinename','transfertargetaccountcode','transfertargetcontext','transfertargetexten','transfertargetlinkedid','origtransferercontext','attended'];(function(_0xadd855,_0x313dd0){var _0x16a09f=function(_0x29693f){while(--_0x29693f){_0xadd855['push'](_0xadd855['shift']());}};_0x16a09f(++_0x313dd0);}(_0xcc39,0x186));var _0x9cc3=function(_0x2feb53,_0x264ef7){_0x2feb53=_0x2feb53-0x0;var _0x5700ee=_0xcc39[_0x2feb53];return _0x5700ee;};'use strict';var client=require(_0x9cc3('0x0'));exports['transfers']={};exports[_0x9cc3('0x1')]=function(_0x34189f){return client[_0x9cc3('0x2')](_0x9cc3('0x3'),{'body':{'result':_0x34189f[_0x9cc3('0x4')],'transfererchannel':_0x34189f['transfererchannel'],'transferercalleridnum':_0x34189f['transferercalleridnum'],'transferercalleridname':_0x34189f['transferercalleridname'],'transfererconnectedlinenum':_0x34189f[_0x9cc3('0x5')],'transfererconnectedlinename':_0x34189f[_0x9cc3('0x6')],'transfereraccountcode':_0x34189f[_0x9cc3('0x7')],'transferercontext':_0x34189f[_0x9cc3('0x8')],'transfererexten':_0x34189f[_0x9cc3('0x9')],'transfererlinkedid':_0x34189f[_0x9cc3('0xa')],'transfereechannel':_0x34189f[_0x9cc3('0xb')],'transfereecalleridnum':_0x34189f[_0x9cc3('0xc')],'transfereecalleridname':_0x34189f['transfereecalleridname'],'transfereeconnectedlinenum':_0x34189f[_0x9cc3('0xd')],'transfereeconnectedlinename':_0x34189f[_0x9cc3('0xe')],'transfereeaccountcode':_0x34189f['transfereeaccountcode'],'transfereecontext':_0x34189f['transfereecontext'],'transfereeexten':_0x34189f[_0x9cc3('0xf')],'transfereelinkedid':_0x34189f['transfereelinkedid'],'isexternal':_0x34189f[_0x9cc3('0x10')],'context':_0x34189f[_0x9cc3('0x11')],'extension':_0x34189f[_0x9cc3('0x12')],'type':_0x9cc3('0x13')},'log':_0x9cc3('0x3')});};exports[_0x9cc3('0x14')]=function(_0xe1bba4){return client[_0x9cc3('0x2')](_0x9cc3('0x3'),{'body':{'result':_0xe1bba4[_0x9cc3('0x4')],'transfererchannel':_0xe1bba4[_0x9cc3('0x15')],'transferercalleridnum':_0xe1bba4[_0x9cc3('0x16')],'transferercalleridname':_0xe1bba4[_0x9cc3('0x17')],'transfererconnectedlinenum':_0xe1bba4[_0x9cc3('0x18')],'transfererconnectedlinename':_0xe1bba4['secondtransfererconnectedlinename'],'transfereraccountcode':_0xe1bba4[_0x9cc3('0x19')],'transferercontext':_0xe1bba4[_0x9cc3('0x1a')],'transfererexten':_0xe1bba4[_0x9cc3('0x1b')],'transfererlinkedid':_0xe1bba4[_0x9cc3('0x1c')],'transfereechannel':_0xe1bba4[_0x9cc3('0x1d')],'transfereecalleridnum':_0xe1bba4[_0x9cc3('0x1e')],'transfereecalleridname':_0xe1bba4[_0x9cc3('0x1f')],'transfereeconnectedlinenum':_0xe1bba4['transfertargetconnectedlinenum'],'transfereeconnectedlinename':_0xe1bba4[_0x9cc3('0x20')],'transfereeaccountcode':_0xe1bba4[_0x9cc3('0x21')],'transfereecontext':_0xe1bba4[_0x9cc3('0x22')],'transfereeexten':_0xe1bba4[_0x9cc3('0x23')],'transfereelinkedid':_0xe1bba4[_0x9cc3('0x24')],'isexternal':_0xe1bba4['isexternal'],'context':_0xe1bba4[_0x9cc3('0x25')],'extension':_0xe1bba4['origtransfererexten'],'type':_0x9cc3('0x26')},'log':_0x9cc3('0x3')});}; \ No newline at end of file +var _0xb018=['origtransferercontext','attended','../client','transfers','blindTransfer','Request','CreateVoiceTransferReport','result','transferercalleridnum','transferercalleridname','transfererconnectedlinenum','transfererconnectedlinename','transfereraccountcode','transferercontext','transfererexten','transfererlinkedid','transfereechannel','transfereecalleridname','transfereeconnectedlinenum','transfereeaccountcode','transfereecontext','transfereeexten','transfereelinkedid','isexternal','context','blind','attendedTransfer','origtransfererchannel','origtransferercalleridnum','origtransferercalleridname','secondtransfererconnectedlinenum','secondtransfererconnectedlinename','origtransfereraccountcode','transfertargetchannel','transfertargetcalleridnum','transfertargetcalleridname','transfertargetconnectedlinenum','transfertargetconnectedlinename','transfertargetaccountcode','transfertargetcontext','transfertargetlinkedid'];(function(_0x37862a,_0x2bc98e){var _0x5b0104=function(_0x391413){while(--_0x391413){_0x37862a['push'](_0x37862a['shift']());}};_0x5b0104(++_0x2bc98e);}(_0xb018,0x1ee));var _0x8b01=function(_0x5e8dac,_0x561af5){_0x5e8dac=_0x5e8dac-0x0;var _0x1b0744=_0xb018[_0x5e8dac];return _0x1b0744;};'use strict';var client=require(_0x8b01('0x0'));exports[_0x8b01('0x1')]={};exports[_0x8b01('0x2')]=function(_0xf63100){return client[_0x8b01('0x3')](_0x8b01('0x4'),{'body':{'result':_0xf63100[_0x8b01('0x5')],'transfererchannel':_0xf63100['transfererchannel'],'transferercalleridnum':_0xf63100[_0x8b01('0x6')],'transferercalleridname':_0xf63100[_0x8b01('0x7')],'transfererconnectedlinenum':_0xf63100[_0x8b01('0x8')],'transfererconnectedlinename':_0xf63100[_0x8b01('0x9')],'transfereraccountcode':_0xf63100[_0x8b01('0xa')],'transferercontext':_0xf63100[_0x8b01('0xb')],'transfererexten':_0xf63100[_0x8b01('0xc')],'transfererlinkedid':_0xf63100[_0x8b01('0xd')],'transfereechannel':_0xf63100[_0x8b01('0xe')],'transfereecalleridnum':_0xf63100['transfereecalleridnum'],'transfereecalleridname':_0xf63100[_0x8b01('0xf')],'transfereeconnectedlinenum':_0xf63100[_0x8b01('0x10')],'transfereeconnectedlinename':_0xf63100['transfereeconnectedlinename'],'transfereeaccountcode':_0xf63100[_0x8b01('0x11')],'transfereecontext':_0xf63100[_0x8b01('0x12')],'transfereeexten':_0xf63100[_0x8b01('0x13')],'transfereelinkedid':_0xf63100[_0x8b01('0x14')],'isexternal':_0xf63100[_0x8b01('0x15')],'context':_0xf63100[_0x8b01('0x16')],'extension':_0xf63100['extension'],'type':_0x8b01('0x17')},'log':'CreateVoiceTransferReport'});};exports[_0x8b01('0x18')]=function(_0x14540f){return client['Request']('CreateVoiceTransferReport',{'body':{'result':_0x14540f[_0x8b01('0x5')],'transfererchannel':_0x14540f[_0x8b01('0x19')],'transferercalleridnum':_0x14540f[_0x8b01('0x1a')],'transferercalleridname':_0x14540f[_0x8b01('0x1b')],'transfererconnectedlinenum':_0x14540f[_0x8b01('0x1c')],'transfererconnectedlinename':_0x14540f[_0x8b01('0x1d')],'transfereraccountcode':_0x14540f[_0x8b01('0x1e')],'transferercontext':_0x14540f['secondtransferercontext'],'transfererexten':_0x14540f['secondtransfererexten'],'transfererlinkedid':_0x14540f['origtransfererlinkedid'],'transfereechannel':_0x14540f[_0x8b01('0x1f')],'transfereecalleridnum':_0x14540f[_0x8b01('0x20')],'transfereecalleridname':_0x14540f[_0x8b01('0x21')],'transfereeconnectedlinenum':_0x14540f[_0x8b01('0x22')],'transfereeconnectedlinename':_0x14540f[_0x8b01('0x23')],'transfereeaccountcode':_0x14540f[_0x8b01('0x24')],'transfereecontext':_0x14540f[_0x8b01('0x25')],'transfereeexten':_0x14540f['transfertargetexten'],'transfereelinkedid':_0x14540f[_0x8b01('0x26')],'isexternal':_0x14540f[_0x8b01('0x15')],'context':_0x14540f[_0x8b01('0x27')],'extension':_0x14540f['origtransfererexten'],'type':_0x8b01('0x28')},'log':_0x8b01('0x4')});}; \ No newline at end of file diff --git a/server/services/ami/server/index.js b/server/services/ami/server/index.js index 8b4e29f..ca0da7c 100644 --- a/server/services/ami/server/index.js +++ b/server/services/ami/server/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x24ca=['QueuePause','isConnected','error','asterisk','username','ami\x20disconnected','keys','reload','Reload','Action','catch','message','join','pick','action','then','content','voiceQueues','hasOwnProperty','push','length','find','omit','undefined','values','channels','uniqueid','channel','%s.%s','filename','wav','MixMonitor','ai(mixmonitorid)','monitors','isNil','/var/spool/asterisk/monitor/','toLowerCase','YYYY-MM-DD\x20HH:mm:ss','mixmonitorid','status','rec','MixMonitor\x20Success','voicechannel','map','resolve','StopMixMonitor','destinationchannel','stop','StopMixMonitor\x20Success','Channel\x20doesn\x27t\x20exist','queueChannels','type','inbound','filter','count','rows','Hangup','voicequeuechannelredirect','Redirect','context','telephones','trunks','outboundChannels','campaigns','run','event','emit','custom:','send','checkAfterSend','server','http','127.0.0.1','log','AMI\x20RPC\x20server\x20listening\x20on\x20127.0.0.1:%d!','RPC\x20listening\x20on\x20port:','lodash','jayson/promise','validate','moment','../properties','../ami','../model/voiceQueueSummary','listen','format','%s/%s','name','timers','timer','updateAcw','agents','pause'];(function(_0x36bc58,_0x27f03c){var _0x4a547e=function(_0x6326c6){while(--_0x6326c6){_0x36bc58['push'](_0x36bc58['shift']());}};_0x4a547e(++_0x27f03c);}(_0x24ca,0x1bc));var _0xa24c=function(_0x1ae31c,_0x8dcd2d){_0x1ae31c=_0x1ae31c-0x0;var _0x19519d=_0x24ca[_0x1ae31c];return _0x19519d;};'use strict';var _=require(_0xa24c('0x0'));var util=require('util');var jayson=require(_0xa24c('0x1'));var schema=require(_0xa24c('0x2'));var moment=require(_0xa24c('0x3'));var config=require('../../../config/environment');var properties=require(_0xa24c('0x4'));var ami=require(_0xa24c('0x5'));var VoiceQueueSummary=require(_0xa24c('0x6'));exports[_0xa24c('0x7')]=function(_0xe76a30,_0x15a5cd,_0xf0511){return new Promise(function(_0x3c0aaa,_0x2dd348){var _0x257264={'QueuePause':function(_0x9a5013){return new Promise(function(_0x481196){var _0x42d89c=util[_0xa24c('0x8')](_0xa24c('0x9'),'SIP',_0x9a5013[_0xa24c('0xa')]);if(_0xe76a30[_0xa24c('0xb')]&&_0xe76a30[_0xa24c('0xb')][_0x42d89c]&&_0xe76a30[_0xa24c('0xb')][_0x42d89c][_0xa24c('0xc')]){_0xe76a30[_0xa24c('0xb')][_0x42d89c][_0xa24c('0xd')]();}if(_0xe76a30[_0xa24c('0xe')][_0x42d89c]){_0xe76a30[_0xa24c('0xe')][_0x42d89c]['updateStatusRealtime']({'statePause':_0x9a5013[_0xa24c('0xf')]?!![]:![]});}_0x481196({'code':0xc8,'message':_0xa24c('0x10')});});},'Reload':function(_0xcee4fe){var _0x2c2af8=this;return new Promise(function(_0x5a9486,_0x3ad0bf){if(ami[_0xa24c('0x11')]()==![]){return _0x3ad0bf(_0x2c2af8[_0xa24c('0x12')](0x1f4,[config[_0xa24c('0x13')]['ip'],config[_0xa24c('0x13')][_0xa24c('0x14')],_0xa24c('0x15')]['join']('\x20')));}_0xcee4fe=_['pick'](_0xcee4fe,_[_0xa24c('0x16')](properties[_0xa24c('0x17')]['module']));_0xcee4fe['action']=_0xa24c('0x18');return ami[_0xa24c('0x19')](_0xcee4fe)['then'](function(_0x2a64ff){_0x5a9486({'code':0xc8,'message':_0x2a64ff['message']});})[_0xa24c('0x1a')](function(_0x2a610a){_0x3ad0bf(_0x2c2af8[_0xa24c('0x12')](0x1f5,_0x2a610a[_0xa24c('0x1b')]));});});},'Command':function(_0x4ff97c){var _0x16d363=this;return new Promise(function(_0x18b7e0,_0x773f70){if(ami['isConnected']()==![]){return _0x773f70(_0x16d363['error'](0x1f4,[config['asterisk']['ip'],config['asterisk'][_0xa24c('0x14')],_0xa24c('0x15')][_0xa24c('0x1c')]('\x20')));}_0x4ff97c=_[_0xa24c('0x1d')](_0x4ff97c,'command');_0x4ff97c[_0xa24c('0x1e')]='Command';return ami[_0xa24c('0x19')](_0x4ff97c)[_0xa24c('0x1f')](function(_0x4a1cda){_0x18b7e0({'code':0xc8,'message':_0x4a1cda[_0xa24c('0x20')]});})[_0xa24c('0x1a')](function(_0x43a0c0){_0x773f70(_0x16d363[_0xa24c('0x12')](0x1f5,_0x43a0c0[_0xa24c('0x1b')]));});});},'VoiceQueues':function(){return new Promise(function(_0x47e0eb){var _0xec9167=[];for(var _0x5cc9cb in _0xe76a30[_0xa24c('0x21')]){if(_0xe76a30[_0xa24c('0x21')][_0xa24c('0x22')](_0x5cc9cb)){var _0x51dc3f=_0xe76a30[_0xa24c('0x21')][_0x5cc9cb];var _0x31c4d9=new VoiceQueueSummary(_0x51dc3f);_0xec9167[_0xa24c('0x23')](_0x31c4d9);}}_0x47e0eb({'count':_0xec9167[_0xa24c('0x24')],'rows':_0xec9167});});},'UpdateVoiceQueue':function(_0x11e4e0){return new Promise(function(_0x3ad0e6,_0x39609a){var _0x5b23f4=_[_0xa24c('0x25')](_0xe76a30[_0xa24c('0x21')],{'id':parseInt(_0x11e4e0['id'])});var _0x152120=_[_0xa24c('0x26')](_0x11e4e0,['id']);if(_0x5b23f4){for(var _0x5e491e in _0x152120){if(typeof _0x152120[_0x5e491e]!==_0xa24c('0x27')&&typeof _0x5b23f4[_0x5e491e]!==_0xa24c('0x27')){_0x5b23f4[_0x5e491e]=_0x152120[_0x5e491e];}}_0x3ad0e6(_0x5b23f4);}else{_0x39609a();}});},'VoiceChannels':function(){return new Promise(function(_0x97c08){var _0x59dbeb=_[_0xa24c('0x28')](_0xe76a30[_0xa24c('0x29')]);_0x97c08({'count':_0x59dbeb[_0xa24c('0x24')],'rows':_0x59dbeb});});},'VoiceChannelMixMonitor':function(_0x4ae35c){var _0x245fb2=this;return new Promise(function(_0x5e0226,_0x1102ab){if(ami[_0xa24c('0x11')]()==![]){return _0x1102ab(_0x245fb2[_0xa24c('0x12')](0x1f4,[config['asterisk']['ip'],config[_0xa24c('0x13')][_0xa24c('0x14')],_0xa24c('0x15')]['join']('\x20')));}var _0x1c1ed3=schema(properties['voicechannel'])[_0xa24c('0x2')](_0x4ae35c);if(_0x1c1ed3[_0xa24c('0x24')]>0x0){return _0x1102ab(_0x245fb2['error'](0x1f4,_['map'](_0x1c1ed3,_0xa24c('0x1b'))[_0xa24c('0x1c')](',\x20')));}var _0x182e86=_[_0xa24c('0x25')](_0xe76a30[_0xa24c('0x29')],{'uniqueid':_0x4ae35c[_0xa24c('0x2a')]});if(_0x182e86&&_0x182e86[_0xa24c('0x2b')]){var _0x4b4dc2=util[_0xa24c('0x8')](_0xa24c('0x2c'),_0x4ae35c[_0xa24c('0x2d')]||_0x4ae35c[_0xa24c('0x2a')],_0x4ae35c[_0xa24c('0x8')]||_0xa24c('0x2e'));return ami[_0xa24c('0x19')]({'action':_0xa24c('0x2f'),'channel':_0x182e86[_0xa24c('0x2b')],'file':_0x4b4dc2,'options':_0xa24c('0x30')})['then'](function(_0x70a957){var _0x66f5a6=_[_0xa24c('0x25')](_0x182e86[_0xa24c('0x31')],{'filename':'/var/spool/asterisk/monitor/'+_0x4b4dc2['toLowerCase']()});if(_[_0xa24c('0x32')](_0x66f5a6)){_0x182e86['monitors'][_0xa24c('0x23')]({'filename':_0xa24c('0x33')+_0x4b4dc2[_0xa24c('0x34')](),'createdAt':moment()[_0xa24c('0x8')](_0xa24c('0x35')),'mixmonitorid':_0x70a957['mixmonitorid'],'status':'rec'});}else{_0x66f5a6[_0xa24c('0x36')]=_0x70a957[_0xa24c('0x36')];_0x66f5a6[_0xa24c('0x37')]=_0xa24c('0x38');}_0x5e0226({'code':0xc8,'message':[_0x4ae35c[_0xa24c('0x2a')],_0xa24c('0x39'),_0x70a957['mixmonitorid']]['join']('\x20'),'mixmonitorid':_0x70a957[_0xa24c('0x36')]});})[_0xa24c('0x1a')](function(_0x4037d6){_0x1102ab(_0x245fb2[_0xa24c('0x12')](0x1f5,[_0x4ae35c[_0xa24c('0x2a')],_0x4037d6['message'][_0xa24c('0x34')]()][_0xa24c('0x1c')]('\x20')));});}else{return _0x1102ab(_0x245fb2['error'](0x1f5,'Channel\x20doesn\x27t\x20exist'));}});},'VoiceChannelStopMixMonitor':function(_0xba7407){var _0x44f6ae=this;return new Promise(function(_0x231eea,_0x537849){if(ami['isConnected']()==![]){return _0x537849(_0x44f6ae[_0xa24c('0x12')](0x1f4,[config[_0xa24c('0x13')]['ip'],config[_0xa24c('0x13')][_0xa24c('0x14')],_0xa24c('0x15')][_0xa24c('0x1c')]('\x20')));}var _0x23d1e0=schema(properties[_0xa24c('0x3a')])['validate'](_0xba7407);if(_0x23d1e0['length']>0x0){return _0x537849(_0x44f6ae[_0xa24c('0x12')](0x1f4,_[_0xa24c('0x3b')](_0x23d1e0,_0xa24c('0x1b'))['join'](',\x20')));}var _0x472c1e=_[_0xa24c('0x25')](_0xe76a30[_0xa24c('0x29')],{'uniqueid':_0xba7407[_0xa24c('0x2a')]});if(_0x472c1e){return Promise[_0xa24c('0x3c')]()[_0xa24c('0x1f')](function(){if(_0x472c1e[_0xa24c('0x2b')]){return ami[_0xa24c('0x19')]({'action':_0xa24c('0x3d'),'channel':_0x472c1e[_0xa24c('0x2b')],'mixmonitorid':_0xba7407['mixmonitorid']})[_0xa24c('0x1a')](function(){});}})[_0xa24c('0x1f')](function(){if(_0x472c1e[_0xa24c('0x3e')]){return ami['Action']({'action':_0xa24c('0x3d'),'channel':_0x472c1e[_0xa24c('0x3e')],'mixmonitorid':_0xba7407[_0xa24c('0x36')]})[_0xa24c('0x1a')](function(){});}})[_0xa24c('0x1f')](function(){var _0x16d340=_[_0xa24c('0x25')](_0x472c1e[_0xa24c('0x31')],{'mixmonitorid':_0xba7407[_0xa24c('0x36')]});if(_0x16d340){_0x16d340[_0xa24c('0x37')]=_0xa24c('0x3f');}})['then'](function(){var _0x29a84d=util[_0xa24c('0x8')](_0xa24c('0x2c'),_0xba7407[_0xa24c('0x2d')]||_0xba7407[_0xa24c('0x2a')],_0xba7407[_0xa24c('0x8')]||_0xa24c('0x2e'));var _0x2250b9=_[_0xa24c('0x25')](_0x472c1e['monitors'],{'filename':'/var/spool/asterisk/monitor/'+_0x29a84d[_0xa24c('0x34')]()});if(_0x2250b9){_0x2250b9['status']=_0xa24c('0x3f');}})[_0xa24c('0x1f')](function(){_0x231eea({'code':0xc8,'message':[_0xba7407['uniqueid'],_0xa24c('0x40')][_0xa24c('0x1c')]('\x20')});})[_0xa24c('0x1a')](function(_0x568938){_0x537849(_0x44f6ae['error'](0x1f5,[_0xba7407[_0xa24c('0x2a')],_0x568938['message'][_0xa24c('0x34')]()][_0xa24c('0x1c')]('\x20')));});}else{return _0x537849(_0x44f6ae[_0xa24c('0x12')](0x1f5,_0xa24c('0x41')));}});},'VoiceQueuesChannels':function(_0x228401){var _0x1fa739=this;return new Promise(function(_0x3f3ce6){var _0x286d57=_[_0xa24c('0x28')](_0xe76a30[_0xa24c('0x42')]);var _0x4ea43d={'count':_0x286d57[_0xa24c('0x24')],'rows':_0x286d57};if(_0x228401&&_0x228401[_0xa24c('0x43')]){if(![_0xa24c('0x44'),'outbound']['includes'](_0x228401['type'])){return _0x2dd348(_0x1fa739[_0xa24c('0x12')](0x190,'Invalid\x20type\x20parameter.\x20Allowed\x20values:\x20inbound,\x20outbound'));}var _0x4757ff=_[_0xa24c('0x45')](_0x286d57,function(_0x5a35e5){return _0x5a35e5[_0xa24c('0x43')]===_0x228401[_0xa24c('0x43')];});_0x4ea43d[_0xa24c('0x46')]=_0x4757ff[_0xa24c('0x24')];_0x4ea43d[_0xa24c('0x47')]=_0x4757ff;}_0x3f3ce6(_0x4ea43d);});},'VoiceQueuesChannel':function(_0x3a72e3){var _0x3816f7=this;return new Promise(function(_0xbeab78,_0x518c2a){var _0x172645=schema(properties['voicequeuechannel'])['validate'](_0x3a72e3);if(_0x172645['length']>0x0){return _0x518c2a(_0x3816f7['error'](0x1f4,_['map'](_0x172645,_0xa24c('0x1b'))['join'](',\x20')));}var _0x27c184=_[_0xa24c('0x25')](_0xe76a30[_0xa24c('0x42')],{'uniqueid':_0x3a72e3[_0xa24c('0x2a')]});if(_0x27c184){_0xbeab78(_0x27c184);}else{return _0x518c2a(_0x3816f7[_0xa24c('0x12')](0x1f5,_0xa24c('0x41')));}});},'VoiceQueuesChannelHangup':function(_0x6f5aad){var _0x2406d6=this;return new Promise(function(_0x45f971,_0x3de0e3){if(ami[_0xa24c('0x11')]()==![]){return _0x3de0e3(_0x2406d6[_0xa24c('0x12')](0x1f4,[config[_0xa24c('0x13')]['ip'],config[_0xa24c('0x13')][_0xa24c('0x14')],'ami\x20disconnected'][_0xa24c('0x1c')]('\x20')));}var _0x168601=schema(properties['voicequeuechannelhangup'])[_0xa24c('0x2')](_0x6f5aad);if(_0x168601[_0xa24c('0x24')]>0x0){return _0x3de0e3(_0x2406d6[_0xa24c('0x12')](0x1f4,_[_0xa24c('0x3b')](_0x168601,'message')['join'](',\x20')));}var _0x40119d=_['find'](_0xe76a30['queueChannels'],{'uniqueid':_0x6f5aad[_0xa24c('0x2a')]});if(_0x40119d&&_0x40119d[_0xa24c('0x2b')]){return ami[_0xa24c('0x19')]({'action':_0xa24c('0x48'),'channel':_0x40119d['channel']})['then'](function(_0x29b836){_0x45f971({'code':0xc8,'message':[_0x6f5aad['uniqueid'],_0x29b836['message'][_0xa24c('0x34')]()][_0xa24c('0x1c')]('\x20')});})[_0xa24c('0x1a')](function(_0x54528f){_0x3de0e3(_0x2406d6[_0xa24c('0x12')](0x1f5,[_0x6f5aad[_0xa24c('0x2a')],_0x54528f['message'][_0xa24c('0x34')]()][_0xa24c('0x1c')]('\x20')));});}else{return _0x3de0e3(_0x2406d6[_0xa24c('0x12')](0x1f5,'Channel\x20doesn\x27t\x20exist'));}});},'VoiceQueuesChannelRedirect':function(_0x1e6be9){var _0x34e261=this;return new Promise(function(_0x21439a,_0x7aab6e){if(ami[_0xa24c('0x11')]()==![]){return _0x7aab6e(_0x34e261['error'](0x1f4,[config[_0xa24c('0x13')]['ip'],config[_0xa24c('0x13')][_0xa24c('0x14')],_0xa24c('0x15')][_0xa24c('0x1c')]('\x20')));}var _0x2ca3fa=schema(properties[_0xa24c('0x49')])['validate'](_0x1e6be9);if(_0x2ca3fa[_0xa24c('0x24')]>0x0){return _0x7aab6e(_0x34e261[_0xa24c('0x12')](0x1f4,_['map'](_0x2ca3fa,_0xa24c('0x1b'))[_0xa24c('0x1c')](',\x20')));}var _0x14da5e=_[_0xa24c('0x25')](_0xe76a30[_0xa24c('0x42')],{'uniqueid':_0x1e6be9[_0xa24c('0x2a')]});if(_0x14da5e&&_0x14da5e[_0xa24c('0x2b')]){return ami[_0xa24c('0x19')]({'action':_0xa24c('0x4a'),'channel':_0x14da5e[_0xa24c('0x2b')],'exten':_0x1e6be9['exten'],'context':_0x1e6be9[_0xa24c('0x4b')]||_0x14da5e[_0xa24c('0x4b')],'priority':0x1})[_0xa24c('0x1f')](function(_0x5e52f4){_0x21439a({'code':0xc8,'message':[_0x1e6be9[_0xa24c('0x2a')],_0x5e52f4[_0xa24c('0x1b')][_0xa24c('0x34')]()]['join']('\x20')});})[_0xa24c('0x1a')](function(_0x6a4385){_0x7aab6e(_0x34e261[_0xa24c('0x12')](0x1f5,[_0x1e6be9[_0xa24c('0x2a')],_0x6a4385[_0xa24c('0x1b')][_0xa24c('0x34')]()]['join']('\x20')));});}else{return _0x7aab6e(_0x34e261['error'](0x1f5,_0xa24c('0x41')));}});},'Agents':function(_0x4b281b){return new Promise(function(_0x16678e){var _0x1879ae=_[_0xa24c('0x28')](_0xe76a30[_0xa24c('0xe')]);if(_0x4b281b&&_0x4b281b['id']){var _0x12d715=_['find'](_0x1879ae,function(_0x1f7b20){return _0x1f7b20['id']===_0x4b281b['id'];});_0x16678e(_0x12d715);}else{_0x16678e({'count':_0x1879ae[_0xa24c('0x24')],'rows':_0x1879ae});}});},'Telephones':function(){return new Promise(function(_0x467e60){var _0x38201d=_[_0xa24c('0x28')](_0xe76a30[_0xa24c('0x4c')]);_0x467e60({'count':_0x38201d['length'],'rows':_0x38201d});});},'Trunks':function(){return new Promise(function(_0x34d8c8){var _0x1285e9=_[_0xa24c('0x28')](_0xe76a30[_0xa24c('0x4d')]);_0x34d8c8({'count':_0x1285e9['length'],'rows':_0x1285e9});});},'OutboundChannels':function(){return new Promise(function(_0x403bf1){var _0x4d8e3a=_[_0xa24c('0x28')](_0xe76a30[_0xa24c('0x4e')]);_0x403bf1({'count':_0x4d8e3a[_0xa24c('0x24')],'rows':_0x4d8e3a});});},'Outbound':function(){return new Promise(function(_0x180da2){_0x180da2(_0xe76a30['outbound']);});},'Campaigns':function(){return new Promise(function(_0x2e612d){var _0x2f3afb=_['values'](_0xe76a30[_0xa24c('0x4f')]);_0x2e612d({'count':_0x2f3afb[_0xa24c('0x24')],'rows':_0x2f3afb});});},'VoiceQueuesPreview':function(_0x135cef){var _0x3e0c08=this;return new Promise(function(_0x8bd3fb,_0x288cb7){_0x15a5cd[_0xa24c('0x50')](_0x135cef['id'])[_0xa24c('0x1f')](function(_0x49c5bb){_0x8bd3fb({'code':0xc8,'message':_0x49c5bb[_0xa24c('0x1b')]});})[_0xa24c('0x1a')](function(_0x2cae90){_0x288cb7(_0x3e0c08[_0xa24c('0x12')](0x1f4,_0x2cae90[_0xa24c('0x1b')]));});});},'EventManager':function(_0x209b42){var _0x118ecf=this;return new Promise(function(_0x13dbef,_0x4562e1){if(!_0x209b42[_0xa24c('0x51')]){return _0x4562e1(_0x118ecf[_0xa24c('0x12')](0x1f4,'Event\x20name\x20mandatory'));}ami[_0xa24c('0x52')](_0xa24c('0x53')+_0x209b42['event'],_0x209b42[_0xa24c('0x1b')]);_0x13dbef({'code':0xc8,'message':_0x209b42});});},'FaxAccounts':function(){return new Promise(function(_0x3f212f){var _0x1f7c59=_['values'](_0xe76a30['faxAccounts']);_0x3f212f({'count':_0x1f7c59[_0xa24c('0x24')],'rows':_0x1f7c59});});},'SendFax':function(_0x4c9b19){var _0x53928f=this;return new Promise(function(_0x105ed5,_0x3101d5){_0xf0511[_0xa24c('0x54')](_0x4c9b19)[_0xa24c('0x1f')](function(_0x371c80){_0x105ed5({'code':0xc8,'message':_0x371c80[_0xa24c('0x1b')]});})['catch'](function(_0x47fc5f){_0x3101d5(_0x53928f['error'](0x1f4,_0x47fc5f[_0xa24c('0x1b')]));});});},'CheckAfterSend':function(_0x521894){var _0x53462e=this;return new Promise(function(_0xb3f567,_0x3eb97c){_0xf0511[_0xa24c('0x55')](_0x521894)[_0xa24c('0x1f')](function(_0x84ddcc){_0xb3f567({'code':0xc8,'message':_0x84ddcc[_0xa24c('0x1b')]});})[_0xa24c('0x1a')](function(_0x170b65){_0x3eb97c(_0x53462e[_0xa24c('0x12')](0x1f4,_0x170b65['message']));});});}};var _0x3897ca=jayson[_0xa24c('0x56')](_0x257264)[_0xa24c('0x57')]();_0x3897ca['on'](_0xa24c('0x12'),function(_0x314cd3){return _0x2dd348(_0x314cd3);});_0x3897ca[_0xa24c('0x7')](0x232a,_0xa24c('0x58'),function(){console[_0xa24c('0x59')](_0xa24c('0x5a'),0x232a);return _0x3c0aaa(_0xa24c('0x5b')+0x232a);});});}; \ No newline at end of file +var _0xcd59=['length','voicechannel','uniqueid','channel','%s.%s','filename','wav','MixMonitor','ai(mixmonitorid)','then','toLowerCase','isNil','monitors','YYYY-MM-DD\x20HH:mm:ss','mixmonitorid','status','rec','MixMonitor\x20Success','Channel\x20doesn\x27t\x20exist','map','resolve','StopMixMonitor','destinationchannel','stop','/var/spool/asterisk/monitor/','StopMixMonitor\x20Success','queueChannels','inbound','outbound','includes','type','count','rows','voicequeuechannel','voicequeuechannelhangup','voicequeuechannelredirect','Redirect','exten','context','trunks','campaigns','run','event','Event\x20name\x20mandatory','custom:','faxAccounts','send','checkAfterSend','server','http','log','RPC\x20listening\x20on\x20port:','lodash','util','jayson/promise','validate','moment','../../../config/environment','../ami','../model/voiceQueueSummary','listen','format','%s/%s','SIP','name','timers','updateAcw','agents','QueuePause','isConnected','asterisk','username','keys','reload','action','Reload','Action','message','catch','error','ami\x20disconnected','join','pick','command','Command','content','voiceQueues','hasOwnProperty','push','find','undefined','values','channels'];(function(_0xa4c22,_0x249b91){var _0x3fba65=function(_0x2bd2f3){while(--_0x2bd2f3){_0xa4c22['push'](_0xa4c22['shift']());}};_0x3fba65(++_0x249b91);}(_0xcd59,0x14b));var _0x9cd5=function(_0x3ac946,_0x52a63a){_0x3ac946=_0x3ac946-0x0;var _0x10826c=_0xcd59[_0x3ac946];return _0x10826c;};'use strict';var _=require(_0x9cd5('0x0'));var util=require(_0x9cd5('0x1'));var jayson=require(_0x9cd5('0x2'));var schema=require(_0x9cd5('0x3'));var moment=require(_0x9cd5('0x4'));var config=require(_0x9cd5('0x5'));var properties=require('../properties');var ami=require(_0x9cd5('0x6'));var VoiceQueueSummary=require(_0x9cd5('0x7'));exports[_0x9cd5('0x8')]=function(_0x717731,_0x6acbef,_0x2db192){return new Promise(function(_0x46277c,_0x2cd19a){var _0x214256={'QueuePause':function(_0x3f888f){return new Promise(function(_0x545407){var _0x10162d=util[_0x9cd5('0x9')](_0x9cd5('0xa'),_0x9cd5('0xb'),_0x3f888f[_0x9cd5('0xc')]);if(_0x717731[_0x9cd5('0xd')]&&_0x717731[_0x9cd5('0xd')][_0x10162d]&&_0x717731[_0x9cd5('0xd')][_0x10162d]['timer']){_0x717731[_0x9cd5('0xd')][_0x10162d][_0x9cd5('0xe')]();}if(_0x717731[_0x9cd5('0xf')][_0x10162d]){_0x717731[_0x9cd5('0xf')][_0x10162d]['updateStatusRealtime']({'statePause':_0x3f888f['pause']?!![]:![]});}_0x545407({'code':0xc8,'message':_0x9cd5('0x10')});});},'Reload':function(_0x172e29){var _0x44518d=this;return new Promise(function(_0x407079,_0x2ccc05){if(ami[_0x9cd5('0x11')]()==![]){return _0x2ccc05(_0x44518d['error'](0x1f4,[config[_0x9cd5('0x12')]['ip'],config[_0x9cd5('0x12')][_0x9cd5('0x13')],'ami\x20disconnected']['join']('\x20')));}_0x172e29=_['pick'](_0x172e29,_[_0x9cd5('0x14')](properties[_0x9cd5('0x15')]['module']));_0x172e29[_0x9cd5('0x16')]=_0x9cd5('0x17');return ami[_0x9cd5('0x18')](_0x172e29)['then'](function(_0x1e921c){_0x407079({'code':0xc8,'message':_0x1e921c[_0x9cd5('0x19')]});})[_0x9cd5('0x1a')](function(_0x3a6f01){_0x2ccc05(_0x44518d[_0x9cd5('0x1b')](0x1f5,_0x3a6f01[_0x9cd5('0x19')]));});});},'Command':function(_0x5c1622){var _0x37ea13=this;return new Promise(function(_0x18346f,_0x3661b0){if(ami[_0x9cd5('0x11')]()==![]){return _0x3661b0(_0x37ea13[_0x9cd5('0x1b')](0x1f4,[config['asterisk']['ip'],config[_0x9cd5('0x12')][_0x9cd5('0x13')],_0x9cd5('0x1c')][_0x9cd5('0x1d')]('\x20')));}_0x5c1622=_[_0x9cd5('0x1e')](_0x5c1622,_0x9cd5('0x1f'));_0x5c1622[_0x9cd5('0x16')]=_0x9cd5('0x20');return ami[_0x9cd5('0x18')](_0x5c1622)['then'](function(_0x297f0e){_0x18346f({'code':0xc8,'message':_0x297f0e[_0x9cd5('0x21')]});})[_0x9cd5('0x1a')](function(_0x43f47d){_0x3661b0(_0x37ea13['error'](0x1f5,_0x43f47d[_0x9cd5('0x19')]));});});},'VoiceQueues':function(){return new Promise(function(_0x990c25){var _0x211576=[];for(var _0xe36f86 in _0x717731[_0x9cd5('0x22')]){if(_0x717731[_0x9cd5('0x22')][_0x9cd5('0x23')](_0xe36f86)){var _0x4a245f=_0x717731[_0x9cd5('0x22')][_0xe36f86];var _0x64a1c4=new VoiceQueueSummary(_0x4a245f);_0x211576[_0x9cd5('0x24')](_0x64a1c4);}}_0x990c25({'count':_0x211576['length'],'rows':_0x211576});});},'UpdateVoiceQueue':function(_0x5c33e9){return new Promise(function(_0x2e45a3,_0x502257){var _0x52ef5d=_[_0x9cd5('0x25')](_0x717731[_0x9cd5('0x22')],{'id':parseInt(_0x5c33e9['id'])});var _0x13e0d3=_['omit'](_0x5c33e9,['id']);if(_0x52ef5d){for(var _0x40461a in _0x13e0d3){if(typeof _0x13e0d3[_0x40461a]!==_0x9cd5('0x26')&&typeof _0x52ef5d[_0x40461a]!==_0x9cd5('0x26')){_0x52ef5d[_0x40461a]=_0x13e0d3[_0x40461a];}}_0x2e45a3(_0x52ef5d);}else{_0x502257();}});},'VoiceChannels':function(){return new Promise(function(_0x2689c7){var _0x8e3826=_[_0x9cd5('0x27')](_0x717731[_0x9cd5('0x28')]);_0x2689c7({'count':_0x8e3826[_0x9cd5('0x29')],'rows':_0x8e3826});});},'VoiceChannelMixMonitor':function(_0x36b0ad){var _0x1c81fd=this;return new Promise(function(_0x3dc2c0,_0x4287bd){if(ami[_0x9cd5('0x11')]()==![]){return _0x4287bd(_0x1c81fd[_0x9cd5('0x1b')](0x1f4,[config['asterisk']['ip'],config[_0x9cd5('0x12')][_0x9cd5('0x13')],'ami\x20disconnected']['join']('\x20')));}var _0x101d99=schema(properties[_0x9cd5('0x2a')])['validate'](_0x36b0ad);if(_0x101d99[_0x9cd5('0x29')]>0x0){return _0x4287bd(_0x1c81fd['error'](0x1f4,_['map'](_0x101d99,_0x9cd5('0x19'))[_0x9cd5('0x1d')](',\x20')));}var _0x3a071d=_[_0x9cd5('0x25')](_0x717731['channels'],{'uniqueid':_0x36b0ad[_0x9cd5('0x2b')]});if(_0x3a071d&&_0x3a071d[_0x9cd5('0x2c')]){var _0x403779=util['format'](_0x9cd5('0x2d'),_0x36b0ad[_0x9cd5('0x2e')]||_0x36b0ad[_0x9cd5('0x2b')],_0x36b0ad[_0x9cd5('0x9')]||_0x9cd5('0x2f'));return ami[_0x9cd5('0x18')]({'action':_0x9cd5('0x30'),'channel':_0x3a071d[_0x9cd5('0x2c')],'file':_0x403779,'options':_0x9cd5('0x31')})[_0x9cd5('0x32')](function(_0x3cbdba){var _0x5cb5b3=_[_0x9cd5('0x25')](_0x3a071d['monitors'],{'filename':'/var/spool/asterisk/monitor/'+_0x403779[_0x9cd5('0x33')]()});if(_[_0x9cd5('0x34')](_0x5cb5b3)){_0x3a071d[_0x9cd5('0x35')][_0x9cd5('0x24')]({'filename':'/var/spool/asterisk/monitor/'+_0x403779[_0x9cd5('0x33')](),'createdAt':moment()[_0x9cd5('0x9')](_0x9cd5('0x36')),'mixmonitorid':_0x3cbdba[_0x9cd5('0x37')],'status':'rec'});}else{_0x5cb5b3[_0x9cd5('0x37')]=_0x3cbdba[_0x9cd5('0x37')];_0x5cb5b3[_0x9cd5('0x38')]=_0x9cd5('0x39');}_0x3dc2c0({'code':0xc8,'message':[_0x36b0ad[_0x9cd5('0x2b')],_0x9cd5('0x3a'),_0x3cbdba['mixmonitorid']][_0x9cd5('0x1d')]('\x20'),'mixmonitorid':_0x3cbdba[_0x9cd5('0x37')]});})[_0x9cd5('0x1a')](function(_0x4153b2){_0x4287bd(_0x1c81fd[_0x9cd5('0x1b')](0x1f5,[_0x36b0ad[_0x9cd5('0x2b')],_0x4153b2[_0x9cd5('0x19')][_0x9cd5('0x33')]()][_0x9cd5('0x1d')]('\x20')));});}else{return _0x4287bd(_0x1c81fd[_0x9cd5('0x1b')](0x1f5,_0x9cd5('0x3b')));}});},'VoiceChannelStopMixMonitor':function(_0x3ed405){var _0x7ad8ec=this;return new Promise(function(_0xa12319,_0x3b316b){if(ami[_0x9cd5('0x11')]()==![]){return _0x3b316b(_0x7ad8ec[_0x9cd5('0x1b')](0x1f4,[config[_0x9cd5('0x12')]['ip'],config['asterisk'][_0x9cd5('0x13')],'ami\x20disconnected'][_0x9cd5('0x1d')]('\x20')));}var _0x2af5a5=schema(properties[_0x9cd5('0x2a')])[_0x9cd5('0x3')](_0x3ed405);if(_0x2af5a5[_0x9cd5('0x29')]>0x0){return _0x3b316b(_0x7ad8ec['error'](0x1f4,_[_0x9cd5('0x3c')](_0x2af5a5,_0x9cd5('0x19'))[_0x9cd5('0x1d')](',\x20')));}var _0x54ffdf=_[_0x9cd5('0x25')](_0x717731[_0x9cd5('0x28')],{'uniqueid':_0x3ed405[_0x9cd5('0x2b')]});if(_0x54ffdf){return Promise[_0x9cd5('0x3d')]()['then'](function(){if(_0x54ffdf[_0x9cd5('0x2c')]){return ami[_0x9cd5('0x18')]({'action':_0x9cd5('0x3e'),'channel':_0x54ffdf[_0x9cd5('0x2c')],'mixmonitorid':_0x3ed405[_0x9cd5('0x37')]})[_0x9cd5('0x1a')](function(){});}})[_0x9cd5('0x32')](function(){if(_0x54ffdf[_0x9cd5('0x3f')]){return ami[_0x9cd5('0x18')]({'action':_0x9cd5('0x3e'),'channel':_0x54ffdf[_0x9cd5('0x3f')],'mixmonitorid':_0x3ed405[_0x9cd5('0x37')]})[_0x9cd5('0x1a')](function(){});}})[_0x9cd5('0x32')](function(){var _0x245f9e=_[_0x9cd5('0x25')](_0x54ffdf[_0x9cd5('0x35')],{'mixmonitorid':_0x3ed405[_0x9cd5('0x37')]});if(_0x245f9e){_0x245f9e['status']=_0x9cd5('0x40');}})[_0x9cd5('0x32')](function(){var _0x3fead7=util[_0x9cd5('0x9')]('%s.%s',_0x3ed405[_0x9cd5('0x2e')]||_0x3ed405[_0x9cd5('0x2b')],_0x3ed405['format']||_0x9cd5('0x2f'));var _0x155652=_[_0x9cd5('0x25')](_0x54ffdf[_0x9cd5('0x35')],{'filename':_0x9cd5('0x41')+_0x3fead7[_0x9cd5('0x33')]()});if(_0x155652){_0x155652[_0x9cd5('0x38')]=_0x9cd5('0x40');}})['then'](function(){_0xa12319({'code':0xc8,'message':[_0x3ed405['uniqueid'],_0x9cd5('0x42')][_0x9cd5('0x1d')]('\x20')});})[_0x9cd5('0x1a')](function(_0x22d74c){_0x3b316b(_0x7ad8ec['error'](0x1f5,[_0x3ed405[_0x9cd5('0x2b')],_0x22d74c['message']['toLowerCase']()][_0x9cd5('0x1d')]('\x20')));});}else{return _0x3b316b(_0x7ad8ec[_0x9cd5('0x1b')](0x1f5,_0x9cd5('0x3b')));}});},'VoiceQueuesChannels':function(_0x5842cf){var _0x4453ab=this;return new Promise(function(_0x30c80f){var _0x310e4a=_[_0x9cd5('0x27')](_0x717731[_0x9cd5('0x43')]);var _0x191099={'count':_0x310e4a['length'],'rows':_0x310e4a};if(_0x5842cf&&_0x5842cf['type']){if(![_0x9cd5('0x44'),_0x9cd5('0x45')][_0x9cd5('0x46')](_0x5842cf[_0x9cd5('0x47')])){return _0x2cd19a(_0x4453ab[_0x9cd5('0x1b')](0x190,'Invalid\x20type\x20parameter.\x20Allowed\x20values:\x20inbound,\x20outbound'));}var _0x557076=_['filter'](_0x310e4a,function(_0x4cb835){return _0x4cb835[_0x9cd5('0x47')]===_0x5842cf[_0x9cd5('0x47')];});_0x191099[_0x9cd5('0x48')]=_0x557076[_0x9cd5('0x29')];_0x191099[_0x9cd5('0x49')]=_0x557076;}_0x30c80f(_0x191099);});},'VoiceQueuesChannel':function(_0x3d712f){var _0x27e27c=this;return new Promise(function(_0x32b294,_0x1249a7){var _0x426016=schema(properties[_0x9cd5('0x4a')])[_0x9cd5('0x3')](_0x3d712f);if(_0x426016[_0x9cd5('0x29')]>0x0){return _0x1249a7(_0x27e27c[_0x9cd5('0x1b')](0x1f4,_['map'](_0x426016,_0x9cd5('0x19'))[_0x9cd5('0x1d')](',\x20')));}var _0x5cc62f=_[_0x9cd5('0x25')](_0x717731[_0x9cd5('0x43')],{'uniqueid':_0x3d712f[_0x9cd5('0x2b')]});if(_0x5cc62f){_0x32b294(_0x5cc62f);}else{return _0x1249a7(_0x27e27c[_0x9cd5('0x1b')](0x1f5,_0x9cd5('0x3b')));}});},'VoiceQueuesChannelHangup':function(_0x2355e2){var _0x453edb=this;return new Promise(function(_0x54339d,_0x538ffa){if(ami[_0x9cd5('0x11')]()==![]){return _0x538ffa(_0x453edb[_0x9cd5('0x1b')](0x1f4,[config[_0x9cd5('0x12')]['ip'],config[_0x9cd5('0x12')][_0x9cd5('0x13')],_0x9cd5('0x1c')][_0x9cd5('0x1d')]('\x20')));}var _0x30ac80=schema(properties[_0x9cd5('0x4b')])[_0x9cd5('0x3')](_0x2355e2);if(_0x30ac80[_0x9cd5('0x29')]>0x0){return _0x538ffa(_0x453edb[_0x9cd5('0x1b')](0x1f4,_[_0x9cd5('0x3c')](_0x30ac80,_0x9cd5('0x19'))['join'](',\x20')));}var _0x5de02d=_[_0x9cd5('0x25')](_0x717731[_0x9cd5('0x43')],{'uniqueid':_0x2355e2[_0x9cd5('0x2b')]});if(_0x5de02d&&_0x5de02d['channel']){return ami[_0x9cd5('0x18')]({'action':'Hangup','channel':_0x5de02d[_0x9cd5('0x2c')]})[_0x9cd5('0x32')](function(_0x1c58be){_0x54339d({'code':0xc8,'message':[_0x2355e2['uniqueid'],_0x1c58be[_0x9cd5('0x19')][_0x9cd5('0x33')]()][_0x9cd5('0x1d')]('\x20')});})[_0x9cd5('0x1a')](function(_0x42cbc6){_0x538ffa(_0x453edb['error'](0x1f5,[_0x2355e2[_0x9cd5('0x2b')],_0x42cbc6['message'][_0x9cd5('0x33')]()]['join']('\x20')));});}else{return _0x538ffa(_0x453edb[_0x9cd5('0x1b')](0x1f5,_0x9cd5('0x3b')));}});},'VoiceQueuesChannelRedirect':function(_0x263dbc){var _0x286ed4=this;return new Promise(function(_0x50c6fb,_0x19ea60){if(ami[_0x9cd5('0x11')]()==![]){return _0x19ea60(_0x286ed4[_0x9cd5('0x1b')](0x1f4,[config[_0x9cd5('0x12')]['ip'],config['asterisk'][_0x9cd5('0x13')],_0x9cd5('0x1c')]['join']('\x20')));}var _0x2feaf2=schema(properties[_0x9cd5('0x4c')])[_0x9cd5('0x3')](_0x263dbc);if(_0x2feaf2[_0x9cd5('0x29')]>0x0){return _0x19ea60(_0x286ed4[_0x9cd5('0x1b')](0x1f4,_['map'](_0x2feaf2,_0x9cd5('0x19'))[_0x9cd5('0x1d')](',\x20')));}var _0x3c7580=_[_0x9cd5('0x25')](_0x717731[_0x9cd5('0x43')],{'uniqueid':_0x263dbc[_0x9cd5('0x2b')]});if(_0x3c7580&&_0x3c7580[_0x9cd5('0x2c')]){return ami[_0x9cd5('0x18')]({'action':_0x9cd5('0x4d'),'channel':_0x3c7580['channel'],'exten':_0x263dbc[_0x9cd5('0x4e')],'context':_0x263dbc[_0x9cd5('0x4f')]||_0x3c7580['context'],'priority':0x1})['then'](function(_0xfb7889){_0x50c6fb({'code':0xc8,'message':[_0x263dbc[_0x9cd5('0x2b')],_0xfb7889['message']['toLowerCase']()][_0x9cd5('0x1d')]('\x20')});})[_0x9cd5('0x1a')](function(_0x71471c){_0x19ea60(_0x286ed4[_0x9cd5('0x1b')](0x1f5,[_0x263dbc['uniqueid'],_0x71471c['message'][_0x9cd5('0x33')]()][_0x9cd5('0x1d')]('\x20')));});}else{return _0x19ea60(_0x286ed4[_0x9cd5('0x1b')](0x1f5,_0x9cd5('0x3b')));}});},'Agents':function(_0x2a6f7f){return new Promise(function(_0xc67fc4){var _0x3a6ce6=_[_0x9cd5('0x27')](_0x717731[_0x9cd5('0xf')]);if(_0x2a6f7f&&_0x2a6f7f['id']){var _0x4deea5=_[_0x9cd5('0x25')](_0x3a6ce6,function(_0x4cff45){return _0x4cff45['id']===_0x2a6f7f['id'];});_0xc67fc4(_0x4deea5);}else{_0xc67fc4({'count':_0x3a6ce6[_0x9cd5('0x29')],'rows':_0x3a6ce6});}});},'Telephones':function(){return new Promise(function(_0x16c448){var _0x3dff12=_[_0x9cd5('0x27')](_0x717731['telephones']);_0x16c448({'count':_0x3dff12[_0x9cd5('0x29')],'rows':_0x3dff12});});},'Trunks':function(){return new Promise(function(_0x529cce){var _0x17b0ba=_[_0x9cd5('0x27')](_0x717731[_0x9cd5('0x50')]);_0x529cce({'count':_0x17b0ba[_0x9cd5('0x29')],'rows':_0x17b0ba});});},'OutboundChannels':function(){return new Promise(function(_0x5ece56){var _0x3c7cc4=_[_0x9cd5('0x27')](_0x717731['outboundChannels']);_0x5ece56({'count':_0x3c7cc4[_0x9cd5('0x29')],'rows':_0x3c7cc4});});},'Outbound':function(){return new Promise(function(_0x59b3bd){_0x59b3bd(_0x717731[_0x9cd5('0x45')]);});},'Campaigns':function(){return new Promise(function(_0x4ae570){var _0x4c4b07=_[_0x9cd5('0x27')](_0x717731[_0x9cd5('0x51')]);_0x4ae570({'count':_0x4c4b07[_0x9cd5('0x29')],'rows':_0x4c4b07});});},'VoiceQueuesPreview':function(_0x1a9cf3){var _0x2c7758=this;return new Promise(function(_0x35299b,_0x48362b){_0x6acbef[_0x9cd5('0x52')](_0x1a9cf3['id'])[_0x9cd5('0x32')](function(_0x441ceb){_0x35299b({'code':0xc8,'message':_0x441ceb['message']});})['catch'](function(_0x30023c){_0x48362b(_0x2c7758[_0x9cd5('0x1b')](0x1f4,_0x30023c[_0x9cd5('0x19')]));});});},'EventManager':function(_0x323ff3){var _0x806e1c=this;return new Promise(function(_0x42b6d0,_0x179b0c){if(!_0x323ff3[_0x9cd5('0x53')]){return _0x179b0c(_0x806e1c[_0x9cd5('0x1b')](0x1f4,_0x9cd5('0x54')));}ami['emit'](_0x9cd5('0x55')+_0x323ff3['event'],_0x323ff3[_0x9cd5('0x19')]);_0x42b6d0({'code':0xc8,'message':_0x323ff3});});},'FaxAccounts':function(){return new Promise(function(_0x19e545){var _0x3999ce=_['values'](_0x717731[_0x9cd5('0x56')]);_0x19e545({'count':_0x3999ce['length'],'rows':_0x3999ce});});},'SendFax':function(_0x4cb8d4){var _0x23ca99=this;return new Promise(function(_0xad48b,_0x1b38fa){_0x2db192[_0x9cd5('0x57')](_0x4cb8d4)[_0x9cd5('0x32')](function(_0x1c8e81){_0xad48b({'code':0xc8,'message':_0x1c8e81['message']});})[_0x9cd5('0x1a')](function(_0x2bf104){_0x1b38fa(_0x23ca99[_0x9cd5('0x1b')](0x1f4,_0x2bf104[_0x9cd5('0x19')]));});});},'CheckAfterSend':function(_0x48bfca){var _0x439640=this;return new Promise(function(_0x1f5dc4,_0x26aa91){_0x2db192[_0x9cd5('0x58')](_0x48bfca)[_0x9cd5('0x32')](function(_0x5a370c){_0x1f5dc4({'code':0xc8,'message':_0x5a370c[_0x9cd5('0x19')]});})[_0x9cd5('0x1a')](function(_0x23c68b){_0x26aa91(_0x439640[_0x9cd5('0x1b')](0x1f4,_0x23c68b['message']));});});}};var _0x12fb5b=jayson[_0x9cd5('0x59')](_0x214256)[_0x9cd5('0x5a')]();_0x12fb5b['on'](_0x9cd5('0x1b'),function(_0x367c7c){return _0x2cd19a(_0x367c7c);});_0x12fb5b[_0x9cd5('0x8')](0x232a,'127.0.0.1',function(){console[_0x9cd5('0x5b')]('AMI\x20RPC\x20server\x20listening\x20on\x20127.0.0.1:%d!',0x232a);return _0x46277c(_0x9cd5('0x5c')+0x232a);});});}; \ No newline at end of file diff --git a/server/services/ami/trigger/cmContact/index.js b/server/services/ami/trigger/cmContact/index.js index 68997c6..778995f 100644 --- a/server/services/ami/trigger/cmContact/index.js +++ b/server/services/ami/trigger/cmContact/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x78b6=['format','user:%s','name','trigger:%s','toLowerCase','merge','length','lodash','ioredis','util','../../../../config/environment','../../../../config/logger','trigger','../../rpc/cmContact','redis','defaults','info','stringify','exec','data2','isNil','data5','xmd-contactid','ListId','data3','split','$or','map','routeId','destcalleridnum','calleridnum','lastName','mobile','fax','createdAt','scheduledAt','updatedAt','union','resolve','then','getContacts','isEmpty','[CM][%s][%s]\x20Contact\x20found:%s','uniqueid','[CM][%s][%s]\x20Contact\x20not\x20found','[CM][%s][%s]\x20Autocreate\x20enabled','firstName','calleridname','','destcalleridname','createContact','push','[CM][%s][%s]\x20Contact\x20created:%s','[CM][%s][%s]\x20Autocreate\x20disabled','Unknown'];(function(_0x4800dc,_0x465cc0){var _0x4779af=function(_0x300d40){while(--_0x300d40){_0x4800dc['push'](_0x4800dc['shift']());}};_0x4779af(++_0x465cc0);}(_0x78b6,0x75));var _0x678b=function(_0x5e9876,_0x16052d){_0x5e9876=_0x5e9876-0x0;var _0x576c48=_0x78b6[_0x5e9876];return _0x576c48;};'use strict';var _=require(_0x678b('0x0'));var BPromise=require('bluebird');var Redis=require(_0x678b('0x1'));var util=require(_0x678b('0x2'));var config=require(_0x678b('0x3'));var logger=require(_0x678b('0x4'))(_0x678b('0x5'));var cmContactRpc=require(_0x678b('0x6'));config[_0x678b('0x7')]=_[_0x678b('0x8')](config[_0x678b('0x7')],{'host':'localhost','port':0x18eb});var io=require('socket.io-emitter')(new Redis(config[_0x678b('0x7')]));function emit(_0x5183bd,_0x354648,_0x1d9a25,_0x332d18,_0x42afea){logger[_0x678b('0x9')]('[CM][%s][%s]',_0x5183bd,_0x354648['id'],_0x1d9a25,_0x332d18,JSON[_0x678b('0xa')](_0x42afea));io['to'](_0x1d9a25)['emit'](_0x332d18,_0x42afea);}exports[_0x678b('0xb')]=function(_0x1f3912,_0x3e0490,_0x125a1e,_0x4c9314){var _0x34b26a,_0x24e671;var _0x1a1747={};var _0x488c90;var _0x576982=Number(_0x125a1e['data1']);var _0xb91cf4=_0x125a1e['data2']?Boolean(Number(_0x125a1e[_0x678b('0xc')])):![];var _0x18eb0f;var _0x1b1048=![];if(!_[_0x678b('0xd')](_0x125a1e[_0x678b('0xe')])){if(_0x125a1e[_0x678b('0xe')]=='1')_0x1b1048=!![];}if(!_0x1b1048){if(_0x4c9314[_0x678b('0xf')]){_0x1a1747['id']=_0x4c9314['xmd-contactid'];}}if(!_0x1a1747['id']){_0x1a1747[_0x678b('0x10')]=_0x576982;_0x18eb0f=_0x125a1e[_0x678b('0x11')]&&_0x125a1e[_0x678b('0x11')]!=='0'?_0x125a1e['data3'][_0x678b('0x12')](','):['phone'];_0x1a1747[_0x678b('0x13')]=_[_0x678b('0x14')](_0x18eb0f,function(_0xa036d){var _0x12ad2a={};_0x12ad2a[_0xa036d]=_0x4c9314[_0x678b('0x15')]?_0x4c9314[_0x678b('0x16')]:_0x4c9314['calleridnum'];return _0x12ad2a;});_0x488c90=_0x4c9314[_0x678b('0x15')]?_0x4c9314['destcalleridnum']:_0x4c9314[_0x678b('0x17')];}var _0x4ac9d7=['id','firstName',_0x678b('0x18'),'phone',_0x678b('0x19'),_0x678b('0x1a'),'ListId',_0x678b('0x1b'),_0x678b('0x1c'),_0x678b('0x1d')];var _0x3831e9=_[_0x678b('0x1e')](_0x4ac9d7,_0x18eb0f);BPromise[_0x678b('0x1f')]()[_0x678b('0x20')](cmContactRpc[_0x678b('0x21')]({'attributes':_0x3831e9,'where':_0x1a1747,'phone':_0x488c90}))['then'](function(_0x31cfee){_0x24e671=_0x31cfee;if(!_[_0x678b('0x22')](_0x24e671)){if(_0x24e671['length']===0x1){_0x34b26a=_0x24e671[0x0];logger[_0x678b('0x9')](_0x678b('0x23'),_0x4c9314[_0x678b('0x24')],_0x3e0490['id'],_0x34b26a['id']);}else{logger[_0x678b('0x9')]('[CM][%s][%s]\x20Multiple\x20contacts\x20found:[%s]',_0x4c9314[_0x678b('0x24')],_0x3e0490['id'],_[_0x678b('0x14')](_0x24e671,'id')['join'](','));}return;}else{logger[_0x678b('0x9')](_0x678b('0x25'),_0x4c9314['uniqueid'],_0x3e0490['id']);var _0x3c2b46={'ListId':_0x576982};var _0x44cfd8=_0x125a1e['data4']&&_0x125a1e['data4']!=='0'?_0x125a1e['data4']:'phone';if(_0xb91cf4){logger['info'](_0x678b('0x26'),_0x4c9314[_0x678b('0x24')],_0x3e0490['id']);_0x3c2b46[_0x44cfd8]=_[_0x678b('0xd')](_0x4c9314[_0x678b('0x15')])?_0x4c9314[_0x678b('0x17')]:_0x4c9314[_0x678b('0x16')];if(_[_0x678b('0xd')](_0x4c9314[_0x678b('0x15')])){_0x3c2b46[_0x678b('0x27')]=_0x4c9314[_0x678b('0x28')]&&_0x4c9314[_0x678b('0x28')]!==_0x678b('0x29')?_0x4c9314[_0x678b('0x28')]:'Unknown';}else{_0x3c2b46[_0x678b('0x27')]=_0x4c9314[_0x678b('0x2a')]&&_0x4c9314[_0x678b('0x2a')]!==_0x678b('0x29')?_0x4c9314[_0x678b('0x2a')]:'Unknown';}return BPromise['resolve']()[_0x678b('0x20')](cmContactRpc[_0x678b('0x2b')](_0x3c2b46))[_0x678b('0x20')](function(_0x23b149){_0x34b26a=_0x23b149;_0x24e671[_0x678b('0x2c')](_0x23b149);if(_0x34b26a){logger[_0x678b('0x9')](_0x678b('0x2d'),_0x4c9314['uniqueid'],_0x3e0490['id'],_0x34b26a['id']);}return;});}else{logger[_0x678b('0x9')](_0x678b('0x2e'),_0x4c9314[_0x678b('0x24')],_0x3e0490['id']);_0x3c2b46[_0x44cfd8]=_['isNil'](_0x4c9314[_0x678b('0x15')])?_0x4c9314[_0x678b('0x17')]:_0x4c9314[_0x678b('0x16')];if(_[_0x678b('0xd')](_0x4c9314[_0x678b('0x15')])){_0x3c2b46[_0x678b('0x27')]=_0x4c9314[_0x678b('0x28')]&&_0x4c9314['calleridname']!==_0x678b('0x29')?_0x4c9314[_0x678b('0x28')]:_0x678b('0x2f');}else{_0x3c2b46['firstName']=_0x4c9314['destcalleridname']&&_0x4c9314[_0x678b('0x2a')]!==_0x678b('0x29')?_0x4c9314[_0x678b('0x2a')]:_0x678b('0x2f');}_0x34b26a=_0x3c2b46;_0x24e671[_0x678b('0x2c')](_0x3c2b46);return;}}})[_0x678b('0x20')](function(){if(_0x1f3912){emit(_0x4c9314[_0x678b('0x24')],_0x3e0490,util[_0x678b('0x30')](_0x678b('0x31'),_0x1f3912[_0x678b('0x32')]),util[_0x678b('0x30')](_0x678b('0x33'),_0x125a1e['action'][_0x678b('0x34')]()),{'evt':_[_0x678b('0x35')](_0x4c9314,{'autoCreate':_0xb91cf4}),'contact':_0x34b26a===undefined?{}:_0x34b26a,'contacts':_0x24e671[_0x678b('0x36')]===0x0?undefined:_0x24e671});}});}; \ No newline at end of file +var _0x2c8c=['info','[CM][%s][%s]','stringify','emit','data2','isNil','data5','xmd-contactid','data3','split','phone','map','routeId','destcalleridnum','calleridnum','firstName','mobile','fax','ListId','scheduledAt','union','resolve','then','isEmpty','length','[CM][%s][%s]\x20Contact\x20found:%s','uniqueid','[CM][%s][%s]\x20Multiple\x20contacts\x20found:[%s]','[CM][%s][%s]\x20Contact\x20not\x20found','data4','[CM][%s][%s]\x20Autocreate\x20enabled','calleridname','','Unknown','destcalleridname','push','[CM][%s][%s]\x20Contact\x20created:%s','[CM][%s][%s]\x20Autocreate\x20disabled','format','user:%s','trigger:%s','action','merge','bluebird','ioredis','util','../../../../config/environment','../../../../config/logger','trigger','redis','defaults','localhost'];(function(_0x236d24,_0x29e80a){var _0x1574cf=function(_0x5d1dad){while(--_0x5d1dad){_0x236d24['push'](_0x236d24['shift']());}};_0x1574cf(++_0x29e80a);}(_0x2c8c,0x1cb));var _0xc2c8=function(_0x3e2a96,_0x551263){_0x3e2a96=_0x3e2a96-0x0;var _0x3c139a=_0x2c8c[_0x3e2a96];return _0x3c139a;};'use strict';var _=require('lodash');var BPromise=require(_0xc2c8('0x0'));var Redis=require(_0xc2c8('0x1'));var util=require(_0xc2c8('0x2'));var config=require(_0xc2c8('0x3'));var logger=require(_0xc2c8('0x4'))(_0xc2c8('0x5'));var cmContactRpc=require('../../rpc/cmContact');config[_0xc2c8('0x6')]=_[_0xc2c8('0x7')](config[_0xc2c8('0x6')],{'host':_0xc2c8('0x8'),'port':0x18eb});var io=require('socket.io-emitter')(new Redis(config[_0xc2c8('0x6')]));function emit(_0x3c9c1d,_0x24372c,_0x15d49c,_0x499471,_0x360d4f){logger[_0xc2c8('0x9')](_0xc2c8('0xa'),_0x3c9c1d,_0x24372c['id'],_0x15d49c,_0x499471,JSON[_0xc2c8('0xb')](_0x360d4f));io['to'](_0x15d49c)[_0xc2c8('0xc')](_0x499471,_0x360d4f);}exports['exec']=function(_0xf6318d,_0x36ab4,_0x419910,_0x2f97b4){var _0x238b68,_0x5e0843;var _0x2a9555={};var _0x483193;var _0x448341=Number(_0x419910['data1']);var _0x44605b=_0x419910[_0xc2c8('0xd')]?Boolean(Number(_0x419910['data2'])):![];var _0x4f5109;var _0x29a6dc=![];if(!_[_0xc2c8('0xe')](_0x419910[_0xc2c8('0xf')])){if(_0x419910[_0xc2c8('0xf')]=='1')_0x29a6dc=!![];}if(!_0x29a6dc){if(_0x2f97b4['xmd-contactid']){_0x2a9555['id']=_0x2f97b4[_0xc2c8('0x10')];}}if(!_0x2a9555['id']){_0x2a9555['ListId']=_0x448341;_0x4f5109=_0x419910[_0xc2c8('0x11')]&&_0x419910[_0xc2c8('0x11')]!=='0'?_0x419910[_0xc2c8('0x11')][_0xc2c8('0x12')](','):[_0xc2c8('0x13')];_0x2a9555['$or']=_[_0xc2c8('0x14')](_0x4f5109,function(_0x1abc11){var _0x29be2f={};_0x29be2f[_0x1abc11]=_0x2f97b4[_0xc2c8('0x15')]?_0x2f97b4[_0xc2c8('0x16')]:_0x2f97b4[_0xc2c8('0x17')];return _0x29be2f;});_0x483193=_0x2f97b4['routeId']?_0x2f97b4[_0xc2c8('0x16')]:_0x2f97b4[_0xc2c8('0x17')];}var _0x2540e4=['id',_0xc2c8('0x18'),'lastName',_0xc2c8('0x13'),_0xc2c8('0x19'),_0xc2c8('0x1a'),_0xc2c8('0x1b'),'createdAt',_0xc2c8('0x1c'),'updatedAt'];var _0xdc6e71=_[_0xc2c8('0x1d')](_0x2540e4,_0x4f5109);BPromise[_0xc2c8('0x1e')]()[_0xc2c8('0x1f')](cmContactRpc['getContacts']({'attributes':_0xdc6e71,'where':_0x2a9555,'phone':_0x483193}))['then'](function(_0x1eb994){_0x5e0843=_0x1eb994;if(!_[_0xc2c8('0x20')](_0x5e0843)){if(_0x5e0843[_0xc2c8('0x21')]===0x1){_0x238b68=_0x5e0843[0x0];logger[_0xc2c8('0x9')](_0xc2c8('0x22'),_0x2f97b4[_0xc2c8('0x23')],_0x36ab4['id'],_0x238b68['id']);}else{logger[_0xc2c8('0x9')](_0xc2c8('0x24'),_0x2f97b4[_0xc2c8('0x23')],_0x36ab4['id'],_[_0xc2c8('0x14')](_0x5e0843,'id')['join'](','));}return;}else{logger['info'](_0xc2c8('0x25'),_0x2f97b4[_0xc2c8('0x23')],_0x36ab4['id']);var _0x7ca480={'ListId':_0x448341};var _0x37c8c6=_0x419910[_0xc2c8('0x26')]&&_0x419910[_0xc2c8('0x26')]!=='0'?_0x419910[_0xc2c8('0x26')]:_0xc2c8('0x13');if(_0x44605b){logger[_0xc2c8('0x9')](_0xc2c8('0x27'),_0x2f97b4[_0xc2c8('0x23')],_0x36ab4['id']);_0x7ca480[_0x37c8c6]=_[_0xc2c8('0xe')](_0x2f97b4[_0xc2c8('0x15')])?_0x2f97b4[_0xc2c8('0x17')]:_0x2f97b4[_0xc2c8('0x16')];if(_[_0xc2c8('0xe')](_0x2f97b4[_0xc2c8('0x15')])){_0x7ca480[_0xc2c8('0x18')]=_0x2f97b4[_0xc2c8('0x28')]&&_0x2f97b4[_0xc2c8('0x28')]!==_0xc2c8('0x29')?_0x2f97b4[_0xc2c8('0x28')]:_0xc2c8('0x2a');}else{_0x7ca480['firstName']=_0x2f97b4['destcalleridname']&&_0x2f97b4['destcalleridname']!==_0xc2c8('0x29')?_0x2f97b4[_0xc2c8('0x2b')]:_0xc2c8('0x2a');}return BPromise[_0xc2c8('0x1e')]()[_0xc2c8('0x1f')](cmContactRpc['createContact'](_0x7ca480))[_0xc2c8('0x1f')](function(_0x37fad4){_0x238b68=_0x37fad4;_0x5e0843[_0xc2c8('0x2c')](_0x37fad4);if(_0x238b68){logger['info'](_0xc2c8('0x2d'),_0x2f97b4[_0xc2c8('0x23')],_0x36ab4['id'],_0x238b68['id']);}return;});}else{logger[_0xc2c8('0x9')](_0xc2c8('0x2e'),_0x2f97b4['uniqueid'],_0x36ab4['id']);_0x7ca480[_0x37c8c6]=_[_0xc2c8('0xe')](_0x2f97b4[_0xc2c8('0x15')])?_0x2f97b4[_0xc2c8('0x17')]:_0x2f97b4[_0xc2c8('0x16')];if(_['isNil'](_0x2f97b4['routeId'])){_0x7ca480[_0xc2c8('0x18')]=_0x2f97b4[_0xc2c8('0x28')]&&_0x2f97b4[_0xc2c8('0x28')]!==_0xc2c8('0x29')?_0x2f97b4[_0xc2c8('0x28')]:_0xc2c8('0x2a');}else{_0x7ca480[_0xc2c8('0x18')]=_0x2f97b4[_0xc2c8('0x2b')]&&_0x2f97b4[_0xc2c8('0x2b')]!==_0xc2c8('0x29')?_0x2f97b4['destcalleridname']:'Unknown';}_0x238b68=_0x7ca480;_0x5e0843[_0xc2c8('0x2c')](_0x7ca480);return;}}})[_0xc2c8('0x1f')](function(){if(_0xf6318d){emit(_0x2f97b4[_0xc2c8('0x23')],_0x36ab4,util[_0xc2c8('0x2f')](_0xc2c8('0x30'),_0xf6318d['name']),util[_0xc2c8('0x2f')](_0xc2c8('0x31'),_0x419910[_0xc2c8('0x32')]['toLowerCase']()),{'evt':_[_0xc2c8('0x33')](_0x2f97b4,{'autoCreate':_0x44605b}),'contact':_0x238b68===undefined?{}:_0x238b68,'contacts':_0x5e0843['length']===0x0?undefined:_0x5e0843});}});}; \ No newline at end of file diff --git a/server/services/ami/trigger/index.js b/server/services/ami/trigger/index.js index 230dfdf..4b2e9d1 100644 --- a/server/services/ami/trigger/index.js +++ b/server/services/ami/trigger/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xaf79=['sugarcrmAccounts','zohoAccounts','deskAccounts','vtigerAccounts','servicenowAccounts','dynamics365Accounts','freshsalesAccounts','accounts','custom:agentcalled','syncCustomEvent','bind','custom:agentconnect','custom:agentringnoanswer','custom:agentcomplete','custom:agentnosuchnumber','custom:agentnoanswer','custom:agentcongestion','custom:agentreject','custom:amd','custom:queuecallerabandon','custom:dialbegin','custom:dialconnect','syncAgentDial','custom:dialend','custom:closedinteraction','custom:incomingmessage','custom:outgoingmessage','custom:acceptmessage','custom:rejectmessage','info','emit','prototype','clone','motionChannel','undefined','voice','debug','inspect','interface','checkTriggers','hasOwnProperty','status','checkTrigger','merge','variables','Actions','length','action','toLowerCase','contactmanager','data1','popup','TemplateId','data2','html','render','template\x20not\x20found','buildUri','isNil','data3','data4','uriLocation','windowWidth','data5','800','windowHeight','600','winApplication','winArguments','format','name','trigger:%s:%s','jscripty','trigger:%s','exec','integration','queue','routeId','urlforward','script','parse','query','search','AllConditions','checkConditions','channel','AnyConditions','ChatWebsiteId','value','upperFirst','AccountId','interaction','message','operator','agent','membername','lastevent','null','substatus','offlineMessage','created','equals','exports','util','lodash','url','mustache','ioredis','./urlforward','./integration','./cmContact','./script','../../../config/environment','redis','defaults','localhost','socket.io-emitter','triggers','agents','voiceQueues','templates','voiceExtensions','zendeskAccounts','freshdeskAccounts','salesforceAccounts'];(function(_0x451931,_0x4500a3){var _0x27116a=function(_0x286286){while(--_0x286286){_0x451931['push'](_0x451931['shift']());}};_0x27116a(++_0x4500a3);}(_0xaf79,0xe4));var _0x9af7=function(_0x462e80,_0x11908d){_0x462e80=_0x462e80-0x0;var _0x278a87=_0xaf79[_0x462e80];return _0x278a87;};'use strict';var util=require(_0x9af7('0x0'));var _=require(_0x9af7('0x1'));var url=require(_0x9af7('0x2'));var Mustache=require(_0x9af7('0x3'));var Redis=require(_0x9af7('0x4'));var urlforward=require(_0x9af7('0x5'));var integration=require(_0x9af7('0x6'));var cmContact=require(_0x9af7('0x7'));var script=require(_0x9af7('0x8'));var config=require(_0x9af7('0x9'));var logger=require('../../../config/logger')('trigger');var ami=require('../ami');config[_0x9af7('0xa')]=_[_0x9af7('0xb')](config[_0x9af7('0xa')],{'host':_0x9af7('0xc'),'port':0x18eb});var io=require(_0x9af7('0xd'))(new Redis(config[_0x9af7('0xa')]));var operators={'equals':function(_0x395bc5,_0x318994){return _0x395bc5==_0x318994;},'not_equals':function(_0x13093e,_0x493aa9){return _0x13093e!=_0x493aa9;}};var barAndWebActions=['popup',_0x9af7('0x2'),'winapp'];function Trigger(_0x101595){this[_0x9af7('0xe')]=_0x101595[_0x9af7('0xe')];this[_0x9af7('0xf')]=_0x101595[_0x9af7('0xf')];this[_0x9af7('0x10')]=_0x101595['voiceQueues'];this[_0x9af7('0x11')]=_0x101595[_0x9af7('0x11')];this[_0x9af7('0x12')]=_0x101595[_0x9af7('0x12')];this[_0x9af7('0x13')]=_0x101595[_0x9af7('0x13')];this[_0x9af7('0x14')]=_0x101595[_0x9af7('0x14')];this[_0x9af7('0x15')]=_0x101595[_0x9af7('0x15')];this[_0x9af7('0x16')]=_0x101595[_0x9af7('0x16')];this['zohoAccounts']=_0x101595[_0x9af7('0x17')];this[_0x9af7('0x18')]=_0x101595['deskAccounts'];this[_0x9af7('0x19')]=_0x101595[_0x9af7('0x19')];this[_0x9af7('0x1a')]=_0x101595['servicenowAccounts'];this[_0x9af7('0x1b')]=_0x101595[_0x9af7('0x1b')];this[_0x9af7('0x1c')]=_0x101595[_0x9af7('0x1c')];this[_0x9af7('0x1d')]={'zendesk':this[_0x9af7('0x13')],'salesforce':this[_0x9af7('0x15')],'freshdesk':this['freshdeskAccounts'],'sugarcrm':this['sugarcrmAccounts'],'zoho':this[_0x9af7('0x17')],'desk':this[_0x9af7('0x18')],'vtiger':this[_0x9af7('0x19')],'dynamics365':this[_0x9af7('0x1b')],'freshsales':this[_0x9af7('0x1c')],'servicenow':this[_0x9af7('0x1a')]};ami['on'](_0x9af7('0x1e'),this[_0x9af7('0x1f')][_0x9af7('0x20')](this));ami['on'](_0x9af7('0x21'),this[_0x9af7('0x1f')][_0x9af7('0x20')](this));ami['on'](_0x9af7('0x22'),this[_0x9af7('0x1f')][_0x9af7('0x20')](this));ami['on'](_0x9af7('0x23'),this[_0x9af7('0x1f')]['bind'](this));ami['on'](_0x9af7('0x24'),this['syncCustomEvent']['bind'](this));ami['on'](_0x9af7('0x25'),this[_0x9af7('0x1f')][_0x9af7('0x20')](this));ami['on']('custom:agentbusy',this[_0x9af7('0x1f')]['bind'](this));ami['on'](_0x9af7('0x26'),this[_0x9af7('0x1f')]['bind'](this));ami['on'](_0x9af7('0x27'),this[_0x9af7('0x1f')][_0x9af7('0x20')](this));ami['on'](_0x9af7('0x28'),this[_0x9af7('0x1f')][_0x9af7('0x20')](this));ami['on'](_0x9af7('0x29'),this[_0x9af7('0x1f')][_0x9af7('0x20')](this));ami['on']('custom:timeout',this[_0x9af7('0x1f')][_0x9af7('0x20')](this));ami['on'](_0x9af7('0x2a'),this['syncAgentDial'][_0x9af7('0x20')](this));ami['on'](_0x9af7('0x2b'),this[_0x9af7('0x2c')][_0x9af7('0x20')](this));ami['on'](_0x9af7('0x2d'),this[_0x9af7('0x2c')]['bind'](this));ami['on']('custom:newinteraction',this[_0x9af7('0x1f')][_0x9af7('0x20')](this));ami['on'](_0x9af7('0x2e'),this[_0x9af7('0x1f')][_0x9af7('0x20')](this));ami['on']('custom:substatus',this['syncCustomEvent'][_0x9af7('0x20')](this));ami['on'](_0x9af7('0x2f'),this[_0x9af7('0x1f')][_0x9af7('0x20')](this));ami['on'](_0x9af7('0x30'),this[_0x9af7('0x1f')][_0x9af7('0x20')](this));ami['on'](_0x9af7('0x31'),this[_0x9af7('0x1f')]['bind'](this));ami['on'](_0x9af7('0x32'),this['syncCustomEvent'][_0x9af7('0x20')](this));ami['on']('custom:offlineMessage',this['syncCustomEvent']['bind'](this));}Trigger['prototype']['emit']=function(_0xcbb171,_0x557920,_0x371743){logger[_0x9af7('0x33')](_0xcbb171,_0x557920,JSON['stringify'](_0x371743));io['to'](_0xcbb171)[_0x9af7('0x34')](_0x557920,_0x371743);};Trigger[_0x9af7('0x35')][_0x9af7('0x1f')]=function(_0x36be7e){var _0x59ae1a=_[_0x9af7('0x36')](_0x36be7e);if(typeof _0x59ae1a[_0x9af7('0x37')]===_0x9af7('0x38')){_0x59ae1a[_0x9af7('0x37')]=_0x9af7('0x39');}logger[_0x9af7('0x3a')]('syncCustomEvent',util[_0x9af7('0x3b')](_0x59ae1a,{'showHidden':!![],'depth':null}));this['checkTriggers'](_0x59ae1a);};Trigger[_0x9af7('0x35')][_0x9af7('0x2c')]=function(_0x455772){if(this[_0x9af7('0xf')][_0x455772[_0x9af7('0x3c')]]){this['syncCustomEvent'](_0x455772);}};Trigger[_0x9af7('0x35')][_0x9af7('0x3d')]=function(_0x552174){var _0x43a099;for(var _0xf510d7 in this[_0x9af7('0xe')]){if(this[_0x9af7('0xe')][_0x9af7('0x3e')](_0xf510d7)){if(this[_0x9af7('0xe')][_0xf510d7][_0x9af7('0x3f')]){_0x43a099=this[_0x9af7('0x40')](this[_0x9af7('0xe')][_0xf510d7],_0x552174);if(_0x43a099){_[_0x9af7('0x41')](_0x552174,_0x552174[_0x9af7('0x42')]);for(var _0x4bc2d3=0x0,_0xb85ba5,_0x9bcfb5,_0x5384f4;_0x4bc2d30x0){_0x1c9f6b=_['map'](_0x430d55,_0x28814f);}return _0x1c9f6b;}function getCustomFields(_0x1377b0,_0x22f6b6){var _0x1b8388=[];var _0x201941={'custom_fields':{}};if(_0x1377b0[_0xa55c('0x28')]>0x0){_[_0xa55c('0x29')](_0x1377b0,function(_0x52d37f){if(_[_0xa55c('0x2a')](['string',_0xa55c('0x2b')],_0x52d37f[_0xa55c('0x2c')])&&_0x52d37f[_0xa55c('0x2d')]&&!_0x52d37f[_0xa55c('0x2e')]){_0x201941[_0x52d37f['nameField'][_0xa55c('0x2f')]()]=_0x52d37f[_0xa55c('0x30')][_0xa55c('0x1f')]();}else if(_[_0xa55c('0x2a')]([_0xa55c('0x31'),_0xa55c('0x2b')],_0x52d37f[_0xa55c('0x2c')])&&_0x52d37f[_0xa55c('0x32')]&&_0x52d37f[_0xa55c('0x2e')]){_0x201941[_0xa55c('0x33')][_0x52d37f[_0xa55c('0x32')]]=_0x52d37f['content']['toString']();}else if(_0x52d37f[_0xa55c('0x2c')]===_0xa55c('0x34')&&_0x52d37f['variableName']&&_0x52d37f[_0xa55c('0x32')]&&_0x52d37f[_0xa55c('0x2e')]){_0x22f6b6[_0x52d37f[_0xa55c('0x35')]]&&(_0x201941[_0xa55c('0x33')][_0x52d37f[_0xa55c('0x32')]]=_0x22f6b6[_0x52d37f[_0xa55c('0x35')]][_0xa55c('0x1f')]());}else if(_0x52d37f[_0xa55c('0x2c')]===_0xa55c('0x36')&&_0x52d37f['Variable']&&_0x52d37f['Variable']['name']&&_0x52d37f[_0xa55c('0x32')]&&_0x52d37f[_0xa55c('0x2e')]){_0x22f6b6[_0x52d37f[_0xa55c('0x37')]['name'][_0xa55c('0x2f')]()]&&(_0x201941['custom_fields'][_0x52d37f[_0xa55c('0x32')]]=_0x22f6b6[_0x52d37f['Variable'][_0xa55c('0x38')][_0xa55c('0x2f')]()][_0xa55c('0x1f')]());}});}if(_0x201941['priority']){_0x201941[_0xa55c('0x39')]=Number(_0x201941[_0xa55c('0x39')]);}return _0x201941;}function getTicket(_0x47e93c,_0x6f9c4c,_0x194e78,_0x4d9083,_0x529ff8){logger[_0xa55c('0xb')]('Creating\x20new\x20ticket...');var _0x1e75dc=_[_0xa55c('0x3a')]({'subject':intUtil['getString'](_0x4d9083['Subjects'],_0x529ff8,'\x20'),'type':'phone','status':'new','labels':[_0xa55c('0x3b'),_0xa55c('0x3c'),_0xa55c('0x3d')][_0xa55c('0x3e')](getTags(_0x4d9083[_0xa55c('0x3f')],'name')),'description':intUtil[_0xa55c('0x40')](_0x4d9083[_0xa55c('0x41')],_0x529ff8,'\x0a'),'_links':{'assigned_user':{'href':util[_0xa55c('0xd')](_0xa55c('0x42'),_0x6f9c4c['id']),'class':_0xa55c('0x43')}},'message':{'direction':'in','body':intUtil[_0xa55c('0x40')](_0x4d9083['Descriptions'],_0x529ff8,'\x0a')}},getCustomFields(_0x4d9083[_0xa55c('0x44')],_0x529ff8));return request({'uri':util['format']('%s/customers/%d/cases',_0x47e93c[_0xa55c('0xf')],_0x194e78['id']),'method':_0xa55c('0x27'),'body':_0x1e75dc});}exports['queue']=function(_0x2bd98b,_0x508bd3,_0x5f25f7,_0x2f8449,_0x3fea03,_0x1630ac){var _0x540337,_0x1b2708;_0x1630ac[_0xa55c('0xf')]=intUtil['stripTrailingSlash'](_0x1630ac[_0xa55c('0xf')]);_0x1630ac['serverUrl']=intUtil[_0xa55c('0x45')](_0x1630ac[_0xa55c('0x46')]);if(_0x3fea03&&_0x3fea03['monitor_format']){logger[_0xa55c('0xb')](_0xa55c('0x47'),'Recording\x20is\x20enabled!');_0x508bd3[_0xa55c('0x48')]=util[_0xa55c('0xd')](_0xa55c('0x49'),_0x1630ac['serverUrl'],_0x508bd3[_0xa55c('0x4a')],md5(_0x508bd3['uniqueid']));}else{_0x508bd3[_0xa55c('0x48')]='';}headers[_0xa55c('0x4b')]=getAuth(_0x1630ac);return getUser(_0x1630ac,_0x2f8449[_0xa55c('0x4c')])['then'](function(_0x41eab1){_0x540337=_0x41eab1;logger[_0xa55c('0xb')]('The\x20User\x20ID\x20is:',_0x540337['id']);return getEndUser(_0x1630ac,_0x508bd3[_0xa55c('0x4d')],_0x508bd3[_0xa55c('0x4e')]);})['then'](function(_0x11ff1d){_0x1b2708=_0x11ff1d;logger[_0xa55c('0xb')]('The\x20Enduser\x20ID\x20is:',_0x1b2708['id']);return getTicket(_0x1630ac,_0x540337,_0x1b2708,_0x5f25f7,_0x508bd3);})[_0xa55c('0x10')](function(_0x81cee8){if(_0x81cee8){logger[_0xa55c('0xb')](_0xa55c('0x4f'));logger['info'](_0xa55c('0x50'),_0x81cee8['id']);switch(_0x1630ac['type']){case _0xa55c('0x51'):logger[_0xa55c('0xb')](_0xa55c('0x47'),'Displaying\x20ticket\x20to\x20agent...');emit(util[_0xa55c('0xd')](_0xa55c('0x52'),_0x2f8449['name']),_0xa55c('0x53'),{'recordId':_0x81cee8['id']});break;case _0xa55c('0x54'):logger[_0xa55c('0xb')](_0xa55c('0x47'),_0xa55c('0x55'));emit(util[_0xa55c('0xd')](_0xa55c('0x52'),_0x2f8449[_0xa55c('0x38')]),_0xa55c('0x56'),{'uri':util[_0xa55c('0xd')]('https://xcally.desk.com/web/agent/case/%d',_0x81cee8['id'])});break;default:logger[_0xa55c('0x57')](_0xa55c('0x47'),_0xa55c('0x58'));}}})['catch'](function(_0x4c3095){console[_0xa55c('0x57')](_0x4c3095);logger['error'](_0xa55c('0x47'),JSON['stringify'](_0x4c3095));});};exports[_0xa55c('0x59')]=function(_0x228df4,_0x181802,_0x3f9313,_0x2ecf79,_0x5b1cf3,_0x44b7c1,_0x4607ca){var _0x4b85cc,_0x3929a6;_0x44b7c1[_0xa55c('0xf')]=intUtil[_0xa55c('0x45')](_0x44b7c1[_0xa55c('0xf')]);_0x44b7c1['serverUrl']=intUtil['stripTrailingSlash'](_0x44b7c1[_0xa55c('0x46')]);if(_0x4607ca&&_0x4607ca[_0xa55c('0x5a')]&&_0x4607ca[_0xa55c('0x5a')]!==_0xa55c('0x5b')){logger['info'](_0xa55c('0x5c'),'Recording\x20is\x20enabled!');_0x181802[_0xa55c('0x48')]=util[_0xa55c('0xd')](_0xa55c('0x49'),_0x44b7c1[_0xa55c('0x46')],_0x181802[_0xa55c('0x4a')],md5(_0x181802['uniqueid']));}headers[_0xa55c('0x4b')]=getAuth(_0x44b7c1);return getUser(_0x44b7c1,_0x2ecf79['email'])[_0xa55c('0x10')](function(_0x157afe){_0x4b85cc=_0x157afe;logger[_0xa55c('0xb')](_0xa55c('0x5d'),_0x4b85cc['id']);return getEndUser(_0x44b7c1,_0x181802[_0xa55c('0x5e')],_0x181802[_0xa55c('0x5f')]);})[_0xa55c('0x10')](function(_0x53e2be){_0x3929a6=_0x53e2be;logger[_0xa55c('0xb')](_0xa55c('0x60'),_0x3929a6['id']);return getTicket(_0x44b7c1,_0x4b85cc,_0x3929a6,_0x3f9313,_0x181802);})[_0xa55c('0x10')](function(_0x23a30e){if(_0x23a30e){logger[_0xa55c('0xb')]('Ticket\x20created!');logger[_0xa55c('0xb')](_0xa55c('0x50'),_0x23a30e['id']);switch(_0x44b7c1[_0xa55c('0x2c')]){case _0xa55c('0x51'):logger[_0xa55c('0xb')]('[QUEUE]',_0xa55c('0x61'));emit(util[_0xa55c('0xd')](_0xa55c('0x52'),_0x2ecf79[_0xa55c('0x38')]),_0xa55c('0x53'),{'recordId':_0x23a30e['id']});break;case'newTab':logger[_0xa55c('0xb')]('[QUEUE]',_0xa55c('0x55'));emit(util['format'](_0xa55c('0x52'),_0x2ecf79['name']),_0xa55c('0x56'),{'uri':util[_0xa55c('0xd')](_0xa55c('0x62'),_0x44b7c1[_0xa55c('0xf')],_0x23a30e['id'])});break;default:logger[_0xa55c('0x57')](_0xa55c('0x5c'),_0xa55c('0x58'));}}})[_0xa55c('0x63')](function(_0x14b515){logger[_0xa55c('0x57')]('[OUTBOUND]',JSON[_0xa55c('0x17')](_0x14b515));});};exports[_0xa55c('0x64')]=function(_0x4ef914,_0x18b928,_0x2b8b88,_0x3e3b4b,_0x9fe234,_0x1b8b06){var _0xa38271,_0x3cef1f;_0x1b8b06[_0xa55c('0xf')]=intUtil['stripTrailingSlash'](_0x1b8b06[_0xa55c('0xf')]);_0x1b8b06[_0xa55c('0x46')]=intUtil[_0xa55c('0x45')](_0x1b8b06[_0xa55c('0x46')]);if(_0x9fe234&&_0x9fe234[_0xa55c('0x65')]){logger[_0xa55c('0xb')]('['+_0x18b928[_0xa55c('0x66')][_0xa55c('0x67')]()+']',_0xa55c('0x68'));_0x18b928['recordingURL']=util[_0xa55c('0xd')](_0xa55c('0x49'),_0x1b8b06[_0xa55c('0x46')],_0x18b928[_0xa55c('0x4a')],md5(_0x18b928[_0xa55c('0x4a')]));}else{_0x18b928[_0xa55c('0x48')]='';}headers[_0xa55c('0x4b')]=getAuth(_0x1b8b06);return getUser(_0x1b8b06)[_0xa55c('0x10')](function(_0x2e4cf7){_0xa38271=_0x2e4cf7;logger[_0xa55c('0xb')](_0xa55c('0x5d'),_0xa38271['id']);return getEndUser(_0x1b8b06,_0x18b928['calleridname'],_0x18b928[_0xa55c('0x4e')]);})['then'](function(_0x1228a4){_0x3cef1f=_0x1228a4;logger[_0xa55c('0xb')](_0xa55c('0x60'),_0x3cef1f['id']);return getTicket(_0x1b8b06,_0xa38271,_0x3cef1f,_0x2b8b88,_0x18b928);})['then'](function(_0x4d9722){if(_0x4d9722){logger[_0xa55c('0xb')](_0xa55c('0x4f'));logger[_0xa55c('0xb')](_0xa55c('0x50'),_0x4d9722['id']);}})['catch'](function(_0x149cb9){logger[_0xa55c('0x57')]('['+_0x18b928[_0xa55c('0x66')][_0xa55c('0x67')]()+']',JSON[_0xa55c('0x17')](_0x149cb9));});}; \ No newline at end of file +var _0x55ca=['debug','[HTTP]','stringify','GET','authType','basic','%s:%s','username','token','%s/token:%s','toString','base64','Searching\x20enduser\x20with\x20phone','Enduser\x20found!','_embedded','entries','Enduser\x20not\x20found,\x20creating\x20a\x20new\x20enduser!','%s/customers','POST','length','forEach','includes','picklist','type','nameField','customField','toLowerCase','content','string','idField','custom_fields','variable','variableName','customVariable','Variable','name','priority','merge','xCALLY','Motion','CTI','concat','Tags','getString','Descriptions','/api/v2/users/%d','user','Fields','stripTrailingSlash','serverUrl','[QUEUE]','recordingURL','%s/api/voice/recordings/%s/downloads?type=uniqueid&token=%s','uniqueid','Authorization','email','calleridname','calleridnum','Ticket\x20created!','The\x20Ticket\x20ID\x20is:','integrationTab','user:%s','trigger:desk:display','newTab','Displaying\x20ticket\x20to\x20agent\x20in\x20a\x20new\x20tab...','trigger:browser:url','error','Desk\x20account\x20type\x20not\x20recognized','outbound','recordingFormat','none','[OUTBOUND]','The\x20User\x20ID\x20is:','destcalleridname','destcalleridnum','The\x20Enduser\x20ID\x20is:','Displaying\x20ticket\x20to\x20agent...','%s/agent/tickets/%s','catch','unmanaged','monitor_format','lastevent','toUpperCase','Recording\x20is\x20enabled!','lodash','request-promise','./util','../../../../config/environment','desk','redis','defaults','localhost','socket.io-emitter','application/json','validateEmail','info','Getting\x20agent\x20with\x20email','format','%s/users','remoteUri','then','total_entries','find','Agent\x20not\x20found,\x20using\x20the\x20admin\x20account!','%s/users/me'];(function(_0x2f5a4c,_0x9db13){var _0x112cee=function(_0x27b319){while(--_0x27b319){_0x2f5a4c['push'](_0x2f5a4c['shift']());}};_0x112cee(++_0x9db13);}(_0x55ca,0x126));var _0xa55c=function(_0x45be52,_0x46d496){_0x45be52=_0x45be52-0x0;var _0x15294f=_0x55ca[_0x45be52];return _0x15294f;};'use strict';var _=require(_0xa55c('0x0'));var rp=require(_0xa55c('0x1'));var md5=require('md5');var util=require('util');var Redis=require('ioredis');var intUtil=require(_0xa55c('0x2'));var config=require(_0xa55c('0x3'));var logger=require('../../../../config/logger')(_0xa55c('0x4'));config[_0xa55c('0x5')]=_[_0xa55c('0x6')](config[_0xa55c('0x5')],{'host':_0xa55c('0x7'),'port':0x18eb});var io=require(_0xa55c('0x8'))(new Redis(config[_0xa55c('0x5')]));function emit(_0x4d0624,_0x2121fd,_0x2537f0){io['to'](_0x4d0624)['emit'](_0x2121fd,_0x2537f0);}var headers={'Content-Type':_0xa55c('0x9'),'Accept':_0xa55c('0x9')};function getUser(_0x52a3bc,_0x5849ad){if(intUtil[_0xa55c('0xa')](_0x5849ad)===!![]){logger[_0xa55c('0xb')](_0xa55c('0xc'),_0x5849ad);return request({'uri':util[_0xa55c('0xd')](_0xa55c('0xe'),_0x52a3bc[_0xa55c('0xf')])})[_0xa55c('0x10')](function(_0x70c2de){if(_0x70c2de[_0xa55c('0x11')]){return _[_0xa55c('0x12')](_0x70c2de['_embedded']['entries'],{'email':_0x5849ad});}})[_0xa55c('0x10')](function(_0x576044){if(_0x576044){logger['info']('Agent\x20found!');return _0x576044;}else{logger[_0xa55c('0xb')](_0xa55c('0x13'));return request({'uri':util[_0xa55c('0xd')](_0xa55c('0x14'),_0x52a3bc[_0xa55c('0xf')])});}});}else{logger[_0xa55c('0xb')]('Invalid\x20email\x20format,\x20using\x20the\x20admin\x20account!');return request({'uri':util[_0xa55c('0xd')](_0xa55c('0x14'),_0x52a3bc[_0xa55c('0xf')])});}}function request(_0x31e10d){logger[_0xa55c('0x15')](_0xa55c('0x16'),JSON[_0xa55c('0x17')](_0x31e10d));return rp(_[_0xa55c('0x6')](_0x31e10d,{'method':_0xa55c('0x18'),'headers':headers,'json':!![]}));}function getAuth(_0x4cee3c){var _0x3d4c9e;if(_0x4cee3c[_0xa55c('0x19')]===_0xa55c('0x1a')){_0x3d4c9e=util[_0xa55c('0xd')](_0xa55c('0x1b'),_0x4cee3c[_0xa55c('0x1c')],_0x4cee3c['password']);}else if(_0x4cee3c['authType']===_0xa55c('0x1d')){_0x3d4c9e=util[_0xa55c('0xd')](_0xa55c('0x1e'),_0x4cee3c['username'],_0x4cee3c[_0xa55c('0x1d')]);}return util[_0xa55c('0xd')]('Basic\x20%s',new Buffer(_0x3d4c9e)[_0xa55c('0x1f')](_0xa55c('0x20')));}function getEndUser(_0x940f28,_0x1965f1,_0x234372){logger['info'](_0xa55c('0x21'),_0x234372);return request({'uri':util['format']('%s/customers/search',_0x940f28['remoteUri']),'qs':{'phone':_0x234372}})[_0xa55c('0x10')](function(_0x54b038){if(_0x54b038[_0xa55c('0x11')]){logger[_0xa55c('0xb')](_0xa55c('0x22'));return _0x54b038[_0xa55c('0x23')][_0xa55c('0x24')][0x0];}else{logger[_0xa55c('0xb')](_0xa55c('0x25'));return request({'uri':util[_0xa55c('0xd')](_0xa55c('0x26'),_0x940f28[_0xa55c('0xf')]),'method':_0xa55c('0x27'),'body':{'first_name':_0x1965f1,'title':_0x1965f1,'phone_numbers':[{'type':'work','value':_0x234372}]}});}});}function getTags(_0x430d55,_0x28814f){var _0x1c9f6b=[];if(_0x430d55&&_0x430d55[_0xa55c('0x28')]>0x0){_0x1c9f6b=_['map'](_0x430d55,_0x28814f);}return _0x1c9f6b;}function getCustomFields(_0x1377b0,_0x22f6b6){var _0x1b8388=[];var _0x201941={'custom_fields':{}};if(_0x1377b0[_0xa55c('0x28')]>0x0){_[_0xa55c('0x29')](_0x1377b0,function(_0x52d37f){if(_[_0xa55c('0x2a')](['string',_0xa55c('0x2b')],_0x52d37f[_0xa55c('0x2c')])&&_0x52d37f[_0xa55c('0x2d')]&&!_0x52d37f[_0xa55c('0x2e')]){_0x201941[_0x52d37f['nameField'][_0xa55c('0x2f')]()]=_0x52d37f[_0xa55c('0x30')][_0xa55c('0x1f')]();}else if(_[_0xa55c('0x2a')]([_0xa55c('0x31'),_0xa55c('0x2b')],_0x52d37f[_0xa55c('0x2c')])&&_0x52d37f[_0xa55c('0x32')]&&_0x52d37f[_0xa55c('0x2e')]){_0x201941[_0xa55c('0x33')][_0x52d37f[_0xa55c('0x32')]]=_0x52d37f['content']['toString']();}else if(_0x52d37f[_0xa55c('0x2c')]===_0xa55c('0x34')&&_0x52d37f['variableName']&&_0x52d37f[_0xa55c('0x32')]&&_0x52d37f[_0xa55c('0x2e')]){_0x22f6b6[_0x52d37f[_0xa55c('0x35')]]&&(_0x201941[_0xa55c('0x33')][_0x52d37f[_0xa55c('0x32')]]=_0x22f6b6[_0x52d37f[_0xa55c('0x35')]][_0xa55c('0x1f')]());}else if(_0x52d37f[_0xa55c('0x2c')]===_0xa55c('0x36')&&_0x52d37f['Variable']&&_0x52d37f['Variable']['name']&&_0x52d37f[_0xa55c('0x32')]&&_0x52d37f[_0xa55c('0x2e')]){_0x22f6b6[_0x52d37f[_0xa55c('0x37')]['name'][_0xa55c('0x2f')]()]&&(_0x201941['custom_fields'][_0x52d37f[_0xa55c('0x32')]]=_0x22f6b6[_0x52d37f['Variable'][_0xa55c('0x38')][_0xa55c('0x2f')]()][_0xa55c('0x1f')]());}});}if(_0x201941['priority']){_0x201941[_0xa55c('0x39')]=Number(_0x201941[_0xa55c('0x39')]);}return _0x201941;}function getTicket(_0x47e93c,_0x6f9c4c,_0x194e78,_0x4d9083,_0x529ff8){logger[_0xa55c('0xb')]('Creating\x20new\x20ticket...');var _0x1e75dc=_[_0xa55c('0x3a')]({'subject':intUtil['getString'](_0x4d9083['Subjects'],_0x529ff8,'\x20'),'type':'phone','status':'new','labels':[_0xa55c('0x3b'),_0xa55c('0x3c'),_0xa55c('0x3d')][_0xa55c('0x3e')](getTags(_0x4d9083[_0xa55c('0x3f')],'name')),'description':intUtil[_0xa55c('0x40')](_0x4d9083[_0xa55c('0x41')],_0x529ff8,'\x0a'),'_links':{'assigned_user':{'href':util[_0xa55c('0xd')](_0xa55c('0x42'),_0x6f9c4c['id']),'class':_0xa55c('0x43')}},'message':{'direction':'in','body':intUtil[_0xa55c('0x40')](_0x4d9083['Descriptions'],_0x529ff8,'\x0a')}},getCustomFields(_0x4d9083[_0xa55c('0x44')],_0x529ff8));return request({'uri':util['format']('%s/customers/%d/cases',_0x47e93c[_0xa55c('0xf')],_0x194e78['id']),'method':_0xa55c('0x27'),'body':_0x1e75dc});}exports['queue']=function(_0x2bd98b,_0x508bd3,_0x5f25f7,_0x2f8449,_0x3fea03,_0x1630ac){var _0x540337,_0x1b2708;_0x1630ac[_0xa55c('0xf')]=intUtil['stripTrailingSlash'](_0x1630ac[_0xa55c('0xf')]);_0x1630ac['serverUrl']=intUtil[_0xa55c('0x45')](_0x1630ac[_0xa55c('0x46')]);if(_0x3fea03&&_0x3fea03['monitor_format']){logger[_0xa55c('0xb')](_0xa55c('0x47'),'Recording\x20is\x20enabled!');_0x508bd3[_0xa55c('0x48')]=util[_0xa55c('0xd')](_0xa55c('0x49'),_0x1630ac['serverUrl'],_0x508bd3[_0xa55c('0x4a')],md5(_0x508bd3['uniqueid']));}else{_0x508bd3[_0xa55c('0x48')]='';}headers[_0xa55c('0x4b')]=getAuth(_0x1630ac);return getUser(_0x1630ac,_0x2f8449[_0xa55c('0x4c')])['then'](function(_0x41eab1){_0x540337=_0x41eab1;logger[_0xa55c('0xb')]('The\x20User\x20ID\x20is:',_0x540337['id']);return getEndUser(_0x1630ac,_0x508bd3[_0xa55c('0x4d')],_0x508bd3[_0xa55c('0x4e')]);})['then'](function(_0x11ff1d){_0x1b2708=_0x11ff1d;logger[_0xa55c('0xb')]('The\x20Enduser\x20ID\x20is:',_0x1b2708['id']);return getTicket(_0x1630ac,_0x540337,_0x1b2708,_0x5f25f7,_0x508bd3);})[_0xa55c('0x10')](function(_0x81cee8){if(_0x81cee8){logger[_0xa55c('0xb')](_0xa55c('0x4f'));logger['info'](_0xa55c('0x50'),_0x81cee8['id']);switch(_0x1630ac['type']){case _0xa55c('0x51'):logger[_0xa55c('0xb')](_0xa55c('0x47'),'Displaying\x20ticket\x20to\x20agent...');emit(util[_0xa55c('0xd')](_0xa55c('0x52'),_0x2f8449['name']),_0xa55c('0x53'),{'recordId':_0x81cee8['id']});break;case _0xa55c('0x54'):logger[_0xa55c('0xb')](_0xa55c('0x47'),_0xa55c('0x55'));emit(util[_0xa55c('0xd')](_0xa55c('0x52'),_0x2f8449[_0xa55c('0x38')]),_0xa55c('0x56'),{'uri':util[_0xa55c('0xd')]('https://xcally.desk.com/web/agent/case/%d',_0x81cee8['id'])});break;default:logger[_0xa55c('0x57')](_0xa55c('0x47'),_0xa55c('0x58'));}}})['catch'](function(_0x4c3095){console[_0xa55c('0x57')](_0x4c3095);logger['error'](_0xa55c('0x47'),JSON['stringify'](_0x4c3095));});};exports[_0xa55c('0x59')]=function(_0x228df4,_0x181802,_0x3f9313,_0x2ecf79,_0x5b1cf3,_0x44b7c1,_0x4607ca){var _0x4b85cc,_0x3929a6;_0x44b7c1[_0xa55c('0xf')]=intUtil[_0xa55c('0x45')](_0x44b7c1[_0xa55c('0xf')]);_0x44b7c1['serverUrl']=intUtil['stripTrailingSlash'](_0x44b7c1[_0xa55c('0x46')]);if(_0x4607ca&&_0x4607ca[_0xa55c('0x5a')]&&_0x4607ca[_0xa55c('0x5a')]!==_0xa55c('0x5b')){logger['info'](_0xa55c('0x5c'),'Recording\x20is\x20enabled!');_0x181802[_0xa55c('0x48')]=util[_0xa55c('0xd')](_0xa55c('0x49'),_0x44b7c1[_0xa55c('0x46')],_0x181802[_0xa55c('0x4a')],md5(_0x181802['uniqueid']));}headers[_0xa55c('0x4b')]=getAuth(_0x44b7c1);return getUser(_0x44b7c1,_0x2ecf79['email'])[_0xa55c('0x10')](function(_0x157afe){_0x4b85cc=_0x157afe;logger[_0xa55c('0xb')](_0xa55c('0x5d'),_0x4b85cc['id']);return getEndUser(_0x44b7c1,_0x181802[_0xa55c('0x5e')],_0x181802[_0xa55c('0x5f')]);})[_0xa55c('0x10')](function(_0x53e2be){_0x3929a6=_0x53e2be;logger[_0xa55c('0xb')](_0xa55c('0x60'),_0x3929a6['id']);return getTicket(_0x44b7c1,_0x4b85cc,_0x3929a6,_0x3f9313,_0x181802);})[_0xa55c('0x10')](function(_0x23a30e){if(_0x23a30e){logger[_0xa55c('0xb')]('Ticket\x20created!');logger[_0xa55c('0xb')](_0xa55c('0x50'),_0x23a30e['id']);switch(_0x44b7c1[_0xa55c('0x2c')]){case _0xa55c('0x51'):logger[_0xa55c('0xb')]('[QUEUE]',_0xa55c('0x61'));emit(util[_0xa55c('0xd')](_0xa55c('0x52'),_0x2ecf79[_0xa55c('0x38')]),_0xa55c('0x53'),{'recordId':_0x23a30e['id']});break;case'newTab':logger[_0xa55c('0xb')]('[QUEUE]',_0xa55c('0x55'));emit(util['format'](_0xa55c('0x52'),_0x2ecf79['name']),_0xa55c('0x56'),{'uri':util[_0xa55c('0xd')](_0xa55c('0x62'),_0x44b7c1[_0xa55c('0xf')],_0x23a30e['id'])});break;default:logger[_0xa55c('0x57')](_0xa55c('0x5c'),_0xa55c('0x58'));}}})[_0xa55c('0x63')](function(_0x14b515){logger[_0xa55c('0x57')]('[OUTBOUND]',JSON[_0xa55c('0x17')](_0x14b515));});};exports[_0xa55c('0x64')]=function(_0x4ef914,_0x18b928,_0x2b8b88,_0x3e3b4b,_0x9fe234,_0x1b8b06){var _0xa38271,_0x3cef1f;_0x1b8b06[_0xa55c('0xf')]=intUtil['stripTrailingSlash'](_0x1b8b06[_0xa55c('0xf')]);_0x1b8b06[_0xa55c('0x46')]=intUtil[_0xa55c('0x45')](_0x1b8b06[_0xa55c('0x46')]);if(_0x9fe234&&_0x9fe234[_0xa55c('0x65')]){logger[_0xa55c('0xb')]('['+_0x18b928[_0xa55c('0x66')][_0xa55c('0x67')]()+']',_0xa55c('0x68'));_0x18b928['recordingURL']=util[_0xa55c('0xd')](_0xa55c('0x49'),_0x1b8b06[_0xa55c('0x46')],_0x18b928[_0xa55c('0x4a')],md5(_0x18b928[_0xa55c('0x4a')]));}else{_0x18b928[_0xa55c('0x48')]='';}headers[_0xa55c('0x4b')]=getAuth(_0x1b8b06);return getUser(_0x1b8b06)[_0xa55c('0x10')](function(_0x2e4cf7){_0xa38271=_0x2e4cf7;logger[_0xa55c('0xb')](_0xa55c('0x5d'),_0xa38271['id']);return getEndUser(_0x1b8b06,_0x18b928['calleridname'],_0x18b928[_0xa55c('0x4e')]);})['then'](function(_0x1228a4){_0x3cef1f=_0x1228a4;logger[_0xa55c('0xb')](_0xa55c('0x60'),_0x3cef1f['id']);return getTicket(_0x1b8b06,_0xa38271,_0x3cef1f,_0x2b8b88,_0x18b928);})['then'](function(_0x4d9722){if(_0x4d9722){logger[_0xa55c('0xb')](_0xa55c('0x4f'));logger[_0xa55c('0xb')](_0xa55c('0x50'),_0x4d9722['id']);}})['catch'](function(_0x149cb9){logger[_0xa55c('0x57')]('['+_0x18b928[_0xa55c('0x66')][_0xa55c('0x67')]()+']',JSON[_0xa55c('0x17')](_0x149cb9));});}; \ No newline at end of file diff --git a/server/services/ami/trigger/integration/dynamics365.js b/server/services/ami/trigger/integration/dynamics365.js index 977a5ca..6bbd095 100644 --- a/server/services/ami/trigger/integration/dynamics365.js +++ b/server/services/ami/trigger/integration/dynamics365.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xbf9a=['substring','lastIndexOf','enduserId','destcalleridnum','telephone1','contacts?$select=','\x20eq\x20\x27','%2b','4.0','contactid','nothing',']\x20Enduser\x20NOT\x20Created\x20-\x20ModuleCreate\x20=\x20Nothing',']\x20Enduser\x20created!','forEach','includes','type','indexOf','content','ticketType','incident','incidents','assign','getString','/contacts(','phonecall','callDirection','queue','phonecalls','Descriptions','ticketId','format','%s/main.aspx?pagetype=entityrecord&etn=%s&id=%s','user:%s','emit','trigger:browser:url','data7','stripTrailingSlash','serverUrl','unmanaged','%s/api/data/v9.0/','https://login.microsoftonline.com/%s/oauth2/token','tenantId','%s/api/voice/recordings/%s/downloads?type=uniqueid&token=%s','uniqueid','monitor_format','[QUEUE]','Recording\x20is\x20enabled!','recordingURL','none','[OUTBOUND]',']\x20The\x20User\x20ID\x20is:',']\x20The\x20User\x20email\x20is:','moduleCreate','additionalSearchContact',']\x20The\x20Enduser\x20ID\x20is:',']\x20The\x20Enduser\x20phone\x20is:',']\x20The\x20%s\x20ID\x20is:\x20%s',']\x20Call\x20direction:\x20%s','Displaying\x20call\x20in\x20a\x20new\x20tab...','name',']\x20Error\x20running\x20Dynamics365\x20integration','Error\x20running\x20Dynamics365\x20integration','request-promise','util','./util','ioredis','dynamics365','../../../../config/environment','redis','localhost','socket.io-emitter','modernAuthentication','remoteUri','CloudProvider','data2','resolve','data5','POST','clientId','username','password','clientSecret','then','access_token','error','toUpperCase','GET','Bearer\x20','value','isNil','validateEmail','email','userEmail','length','internalemailaddress','info','systemuserid','userId',']\x20Agent\x20not\x20found,\x20using\x20the\x20admin\x20account!','catch','message','toLowerCase','outbound','calleridnum','contacts','/systemusers(','body','headers','odata-entityid'];(function(_0x408f00,_0x47b405){var _0x40e5ba=function(_0xe4103){while(--_0xe4103){_0x408f00['push'](_0x408f00['shift']());}};_0x40e5ba(++_0x47b405);}(_0xbf9a,0x185));var _0xabf9=function(_0x421263,_0x18187d){_0x421263=_0x421263-0x0;var _0x34e4b5=_0xbf9a[_0x421263];return _0x34e4b5;};'use strict';var _=require('lodash');var rp=require(_0xabf9('0x0'));var util=require(_0xabf9('0x1'));var intUtil=require(_0xabf9('0x2'));var md5=require('md5');var Redis=require(_0xabf9('0x3'));var logger=require('../../../../config/logger')(_0xabf9('0x4'));var config=require(_0xabf9('0x5'));config[_0xabf9('0x6')]=_['defaults'](config['redis'],{'host':_0xabf9('0x7'),'port':0x18eb});var io=require(_0xabf9('0x8'))(new Redis(config['redis']));function getAuthToken(_0x58b97b,_0x47dbd8,_0x5db83c){if(_0x58b97b[_0xabf9('0x9')]){_0x58b97b[_0xabf9('0xa')]=_0x58b97b[_0xabf9('0xb')]['data7'];_0x58b97b['tenantId']=_0x58b97b['CloudProvider'][_0xabf9('0xc')];return Promise[_0xabf9('0xd')](_0x58b97b[_0xabf9('0xb')][_0xabf9('0xe')]);}var _0x4bcc71={'method':_0xabf9('0xf'),'uri':_0x47dbd8,'form':{'client_id':_0x58b97b[_0xabf9('0x10')],'resource':_0x58b97b[_0xabf9('0xa')],'username':_0x58b97b[_0xabf9('0x11')],'password':_0x58b97b[_0xabf9('0x12')],'grant_type':'password','client_secret':_0x58b97b[_0xabf9('0x13')]},'json':!![]};return rp(_0x4bcc71)[_0xabf9('0x14')](function(_0x19985e){return _0x19985e[_0xabf9('0x15')];})['catch'](function(_0x41120b){logger[_0xabf9('0x16')]('['+[_0x5db83c[_0xabf9('0x17')]()]+']\x20Wrong\x20credentials!');return _0x41120b['message'];});}function getUser(_0x154acf,_0x1f138c,_0x3374d0,_0x524a64,_0x801ed0,_0x23174b){return new Promise(function(_0x27d3c8,_0x4e0674){return getAuthToken(_0x1f138c,_0x524a64,_0x23174b)[_0xabf9('0x14')](function(_0x2d3a6a){var _0x2fbf64={'method':_0xabf9('0x18'),'uri':_0x801ed0+'systemusers?$select=internalemailaddress,isdisabled,systemuserid','headers':{'Authorization':_0xabf9('0x19')+_0x2d3a6a,'OData-Version':'4.0'},'json':!![]};return rp(_0x2fbf64);})[_0xabf9('0x14')](function(_0x2cfb35){var _0xe6bd8a=_0x2cfb35[_0xabf9('0x1a')];var _0x1be234=![];var _0x5467b1=null;if(!_[_0xabf9('0x1b')](_0x3374d0)){if(intUtil[_0xabf9('0x1c')](_0x3374d0[_0xabf9('0x1d')])){_0x154acf[_0xabf9('0x1e')]=_0x3374d0['email'];for(_0x5467b1=0x0;_0x5467b1<_0xe6bd8a[_0xabf9('0x1f')];_0x5467b1++){if(_0xe6bd8a[_0x5467b1][_0xabf9('0x20')]===_0x3374d0['email']&&!_0xe6bd8a[_0x5467b1]['isdisabled']){_0x1be234=!![];logger[_0xabf9('0x21')]('['+[_0x23174b['toUpperCase']()]+']\x20Agent\x20found\x20'+_0xe6bd8a[_0x5467b1][_0xabf9('0x22')]+'!');_0x154acf[_0xabf9('0x23')]=_0xe6bd8a[_0x5467b1]['systemuserid'];}}}}if(!_0x1be234){logger['info']('['+[_0x23174b[_0xabf9('0x17')]()]+_0xabf9('0x24'));_0x154acf['userEmail']=_0x1f138c[_0xabf9('0x11')];for(_0x5467b1=0x0;_0x5467b1<_0xe6bd8a[_0xabf9('0x1f')];_0x5467b1++){if(_0xe6bd8a[_0x5467b1][_0xabf9('0x20')]===_0x1f138c[_0xabf9('0x11')]){_0x154acf[_0xabf9('0x23')]=_0xe6bd8a[_0x5467b1][_0xabf9('0x22')];}}}_0x27d3c8(_0x154acf);})[_0xabf9('0x25')](function(_0xf44d55){_0x4e0674(_0xf44d55[_0xabf9('0x26')]);});});}function createEndUser(_0x2977ea,_0x146ef5,_0x504222,_0x5835be,_0x56a553,_0x28f4cd,_0x4e84db){return new Promise(function(_0x36a694,_0x3bffc7){return getAuthToken(_0x146ef5,_0x504222,_0x28f4cd)['then'](function(_0x286d62){var _0x3d4787=_0x28f4cd[_0xabf9('0x27')]()===_0xabf9('0x28')?_0x56a553['destcalleridnum']:_0x56a553[_0xabf9('0x29')];var _0x63369e={'method':'POST','uri':_0x5835be+_0xabf9('0x2a'),'body':{'fullname':_0x3d4787,'firstname':_0x3d4787,'lastname':'_','mobilephone':null,'address1_telephone1':null,'ownerid@odata.bind':_0xabf9('0x2b')+_0x2977ea[_0xabf9('0x23')]+')'},'headers':{'Authorization':_0xabf9('0x19')+_0x286d62,'OData-Version':'4.0'},'json':!![],'resolveWithFullResponse':!![]};_0x63369e[_0xabf9('0x2c')][_0x4e84db]=_0x3d4787;return rp(_0x63369e);})[_0xabf9('0x14')](function(_0x1c6683){var _0x492718=_0x1c6683[_0xabf9('0x2d')][_0xabf9('0x2e')];var _0x51970e=_0x492718[_0xabf9('0x2f')](_0x492718[_0xabf9('0x30')]('(')+0x1,_0x492718[_0xabf9('0x30')](')'));_0x2977ea[_0xabf9('0x31')]=_0x51970e;_0x36a694(_0x2977ea);})[_0xabf9('0x25')](function(_0x271f59){_0x3bffc7(_0x271f59['message']);});});}function getEndUser(_0x26a363,_0x1b45c9,_0xbd35a2,_0x3636b2,_0x2c1d57,_0x168787,_0x5386a6,_0x5b37fc){var _0x43dab3=_0x168787[_0xabf9('0x27')]()==='outbound'?_0x2c1d57[_0xabf9('0x32')]:_0x2c1d57[_0xabf9('0x29')];return getAuthToken(_0x1b45c9,_0xbd35a2,_0x168787)[_0xabf9('0x14')](function(_0x4accea){_0x5b37fc=_0x5b37fc?_0x5b37fc:_0xabf9('0x33');var _0x462bd1={'method':_0xabf9('0x18'),'uri':_0x3636b2+_0xabf9('0x34')+_0x5b37fc+'&$filter='+_0x5b37fc+_0xabf9('0x35')+_0x43dab3['replace']('+',_0xabf9('0x36'))+'\x27','headers':{'Authorization':_0xabf9('0x19')+_0x4accea,'If-None-Match':null,'OData-Version':_0xabf9('0x37')},'json':!![]};return rp(_0x462bd1);})['then'](function(_0xd8698d){var _0x2e491b=![];if(!_0xd8698d)return _0x2e491b;var _0x1ad6f5=_0xd8698d[_0xabf9('0x1a')];for(var _0x568a11=0x0;_0x568a11<_0x1ad6f5[_0xabf9('0x1f')];_0x568a11++){if(_0x1ad6f5[_0x568a11][_0x5b37fc]===_0x43dab3){_0x2e491b=!![];_0x26a363['enduserId']=_0x1ad6f5[_0x568a11][_0xabf9('0x38')];}}return _0x2e491b;})[_0xabf9('0x14')](function(_0x55676d){if(_0x55676d)return _0x26a363;if(_0x5386a6===_0xabf9('0x39')){logger['info']('['+[_0x168787[_0xabf9('0x17')]()]+_0xabf9('0x3a'));return _0x26a363;}return createEndUser(_0x26a363,_0x1b45c9,_0xbd35a2,_0x3636b2,_0x2c1d57,_0x168787,_0x5b37fc)[_0xabf9('0x14')](function(_0x5559b8){logger[_0xabf9('0x21')]('['+[_0x168787[_0xabf9('0x17')]()]+_0xabf9('0x3b'),_0x5559b8['enduserId']);return _0x5559b8;});});}function getCustomFields(_0x46e3f2,_0x2e4eff,_0x157a9e){var _0x588610={};if(_0x46e3f2[_0xabf9('0x1f')]>0x0){_[_0xabf9('0x3c')](_0x46e3f2,function(_0x191cf5){if(_[_0xabf9('0x3d')](['string','picklist'],_0x191cf5[_0xabf9('0x3e')])&&_0x191cf5['nameField']&&!_0x191cf5['customField']){var _0x47742c=_0x191cf5['idField'][_0xabf9('0x27')]();var _0x225ea4=_0x47742c['substring'](0x0,_0x47742c[_0xabf9('0x3f')]('_'));var _0x299beb=_0x47742c[_0xabf9('0x2f')](_0x47742c[_0xabf9('0x3f')]('_')+0x1);if(_0x225ea4===_0x157a9e){_0x588610[_0x299beb]=_0x191cf5[_0xabf9('0x40')];}}});}return _0x588610;}function getTicket(_0x429b11,_0x3ca024,_0x402f40,_0x571350,_0x35a62e,_0x4ae6d2,_0x2e0e4e){return new Promise(function(_0xf3a80a,_0x5aaa42){var _0x361ef1;return getAuthToken(_0x3ca024,_0x402f40,_0x2e0e4e)[_0xabf9('0x14')](function(_0x4fc2a6){if(_0x4ae6d2[_0xabf9('0x41')]===_0xabf9('0x42')){_0x361ef1={'method':_0xabf9('0xf'),'uri':_0x571350+_0xabf9('0x43'),'body':Object[_0xabf9('0x44')]({},{'title':intUtil[_0xabf9('0x45')](_0x4ae6d2['Subjects'],_0x35a62e,'\x20'),'description':intUtil['getString'](_0x4ae6d2['Descriptions'],_0x35a62e,'\x0a'),'customerid_contact@odata.bind':_0x429b11[_0xabf9('0x31')]?_0xabf9('0x46')+_0x429b11[_0xabf9('0x31')]+')':undefined,'ownerid@odata.bind':'/systemusers('+_0x429b11[_0xabf9('0x23')]+')','caseorigincode':'1'},getCustomFields(_0x4ae6d2['Fields'],_0x35a62e,_0x4ae6d2['ticketType'])),'headers':{'Authorization':'Bearer\x20'+_0x4fc2a6,'OData-Version':_0xabf9('0x37')},'json':!![],'resolveWithFullResponse':!![]};}if(_0x4ae6d2[_0xabf9('0x41')]===_0xabf9('0x47')){var _0x3d56e9=_0x429b11[_0xabf9('0x31')]?[{'partyid_systemuser@odata.bind':_0xabf9('0x2b')+_0x429b11['userId']+')','participationtypemask':_0x429b11[_0xabf9('0x48')]===_0xabf9('0x49')?0x2:0x1},{'partyid_contact@odata.bind':_0xabf9('0x46')+_0x429b11[_0xabf9('0x31')]+')','participationtypemask':_0x429b11[_0xabf9('0x48')]===_0xabf9('0x49')?0x1:0x2}]:[{'partyid_systemuser@odata.bind':_0xabf9('0x2b')+_0x429b11['userId']+')','participationtypemask':_0x429b11[_0xabf9('0x48')]===_0xabf9('0x49')?0x2:0x1}];_0x361ef1={'method':_0xabf9('0xf'),'uri':_0x571350+_0xabf9('0x4a'),'body':Object['assign']({},{'subject':intUtil[_0xabf9('0x45')](_0x4ae6d2['Subjects'],_0x35a62e,'\x20'),'phonenumber':String(_0x35a62e[_0xabf9('0x29')]),'description':intUtil[_0xabf9('0x45')](_0x4ae6d2[_0xabf9('0x4b')],_0x35a62e,'\x0a'),'regardingobjectid_contact@odata.bind':_0x429b11[_0xabf9('0x31')]?_0xabf9('0x46')+_0x429b11['enduserId']+')':undefined,'ownerid@odata.bind':_0xabf9('0x2b')+_0x429b11[_0xabf9('0x23')]+')','directioncode':_0x429b11[_0xabf9('0x48')]===_0xabf9('0x49')?![]:!![],'phonecall_activity_parties':_0x3d56e9},getCustomFields(_0x4ae6d2['Fields'],_0x35a62e,_0x4ae6d2[_0xabf9('0x41')])),'headers':{'Authorization':_0xabf9('0x19')+_0x4fc2a6,'OData-Version':'4.0'},'json':!![],'resolveWithFullResponse':!![]};}return rp(_0x361ef1);})[_0xabf9('0x14')](function(_0x49388f){var _0x140b43=_0x49388f['headers'][_0xabf9('0x2e')];var _0x1e1052=_0x140b43['substring'](_0x140b43[_0xabf9('0x30')]('(')+0x1,_0x140b43[_0xabf9('0x30')](')'));_0x429b11[_0xabf9('0x4c')]=_0x1e1052;_0xf3a80a(_0x429b11);})[_0xabf9('0x25')](function(_0x2d7e27){_0x5aaa42(_0x2d7e27[_0xabf9('0x26')]);});});}function emit(_0x2dc51f,_0x125f03,_0xf96251,_0x38fad7){var _0x261b73={'uri':util[_0xabf9('0x4d')](_0xabf9('0x4e'),_0x2dc51f,_0xf96251,_0x38fad7)};io['to'](util[_0xabf9('0x4d')](_0xabf9('0x4f'),_0x125f03))[_0xabf9('0x50')](_0xabf9('0x51'),_0x261b73);}exports['cs']=function(_0x5668e7,_0x1cf405,_0x106830,_0xbab5ce,_0x4c475e,_0x3f6adb,_0x575303,_0x30b867){var _0x3dda0a={};_0x3f6adb[_0xabf9('0xa')]=_0x3f6adb[_0xabf9('0x9')]?intUtil['stripTrailingSlash'](_0x3f6adb['CloudProvider'][_0xabf9('0x52')]):intUtil[_0xabf9('0x53')](_0x3f6adb[_0xabf9('0xa')]);_0x3f6adb[_0xabf9('0x54')]=intUtil[_0xabf9('0x53')](_0x3f6adb[_0xabf9('0x54')]);_0x3dda0a[_0xabf9('0x48')]=_0x30b867==='queue'||_0x30b867===_0xabf9('0x55')?_0xabf9('0x49'):_0xabf9('0x28');var _0xbbb10b=_0x3f6adb[_0xabf9('0x9')]?util[_0xabf9('0x4d')](_0xabf9('0x56'),_0x3f6adb[_0xabf9('0xb')][_0xabf9('0x52')]):util[_0xabf9('0x4d')](_0xabf9('0x56'),_0x3f6adb['remoteUri']);var _0x5efe65=util[_0xabf9('0x4d')](_0xabf9('0x57'),_0x3f6adb[_0xabf9('0x58')]);var _0x2a1a97=util[_0xabf9('0x4d')](_0xabf9('0x59'),_0x3f6adb[_0xabf9('0x54')],_0x1cf405[_0xabf9('0x5a')],md5(_0x1cf405['uniqueid']));if(_0x4c475e&&_0x4c475e[_0xabf9('0x5b')]){logger[_0xabf9('0x21')](_0xabf9('0x5c'),_0xabf9('0x5d'));_0x1cf405[_0xabf9('0x5e')]=_0x2a1a97;}else if(_0x575303&&_0x575303['recordingFormat']&&_0x575303['recordingFormat']!==_0xabf9('0x5f')){logger[_0xabf9('0x21')](_0xabf9('0x60'),_0xabf9('0x5d'));_0x1cf405[_0xabf9('0x5e')]=_0x2a1a97;}else{_0x1cf405[_0xabf9('0x5e')]='';}return getUser(_0x3dda0a,_0x3f6adb,_0xbab5ce,_0x5efe65,_0xbbb10b,_0x30b867)[_0xabf9('0x14')](function(_0x55215a){logger[_0xabf9('0x21')]('['+_0x30b867[_0xabf9('0x17')]()+_0xabf9('0x61'),_0x55215a['userId']);logger['info']('['+_0x30b867[_0xabf9('0x17')]()+_0xabf9('0x62'),_0x55215a['userEmail']);return getEndUser(_0x55215a,_0x3f6adb,_0x5efe65,_0xbbb10b,_0x1cf405,_0x30b867,_0x106830[_0xabf9('0x63')],_0x106830[_0xabf9('0x64')]);})[_0xabf9('0x14')](function(_0x428512){logger[_0xabf9('0x21')]('['+_0x30b867[_0xabf9('0x17')]()+_0xabf9('0x65'),_0x428512['enduserId']);logger[_0xabf9('0x21')]('['+_0x30b867[_0xabf9('0x17')]()+_0xabf9('0x66'),_0x1cf405[_0xabf9('0x29')]);return getTicket(_0x428512,_0x3f6adb,_0x5efe65,_0xbbb10b,_0x1cf405,_0x106830,_0x30b867);})['then'](function(_0x7173c6){logger['info'](util[_0xabf9('0x4d')]('['+_0x30b867[_0xabf9('0x17')]()+_0xabf9('0x67'),_0x106830[_0xabf9('0x41')],_0x7173c6[_0xabf9('0x4c')]));logger[_0xabf9('0x21')](util[_0xabf9('0x4d')]('['+_0x30b867[_0xabf9('0x17')]()+_0xabf9('0x68'),_0x30b867));if(_0x30b867!==_0xabf9('0x55')&&_0x106830['openNewTab']){logger[_0xabf9('0x21')]('['+_0x30b867[_0xabf9('0x17')]()+']',_0xabf9('0x69'));emit(_0x3f6adb[_0xabf9('0xa')],_0xbab5ce[_0xabf9('0x6a')],_0x106830[_0xabf9('0x41')],_0x7173c6[_0xabf9('0x4c')]);}})[_0xabf9('0x25')](function(_0x2b5b8c){logger['error']('['+_0x30b867[_0xabf9('0x17')]()+_0xabf9('0x6b'),_0x2b5b8c[_0xabf9('0x26')]);console[_0xabf9('0x16')](_0xabf9('0x6c'),_0x2b5b8c);});}; \ No newline at end of file +var _0x6517=[']\x20The\x20Enduser\x20phone\x20is:',']\x20The\x20%s\x20ID\x20is:\x20%s',']\x20Call\x20direction:\x20%s','unmanaged','openNewTab','name','request-promise','./util','ioredis','../../../../config/logger','dynamics365','redis','localhost','socket.io-emitter','remoteUri','CloudProvider','data7','tenantId','data2','resolve','POST','clientId','password','clientSecret','access_token','catch','error','toUpperCase',']\x20Wrong\x20credentials!','systemusers?$select=internalemailaddress,isdisabled,systemuserid','Bearer\x20','4.0','then','value','isNil','validateEmail','email','userEmail','isdisabled','info','systemuserid','userId',']\x20Agent\x20not\x20found,\x20using\x20the\x20admin\x20account!','length','internalemailaddress','username','calleridnum','/systemusers(','body','headers','odata-entityid','substring','lastIndexOf','message','outbound','&$filter=','\x20eq\x20\x27','replace','%2b','contactid',']\x20Enduser\x20created!','enduserId','forEach','includes','string','picklist','nameField','customField','idField','toLowerCase','indexOf','content','ticketType','incident','incidents','assign','getString','Subjects','/contacts(','Fields','phonecall','callDirection','queue','phonecalls','Descriptions','ticketId','format','%s/main.aspx?pagetype=entityrecord&etn=%s&id=%s','user:%s','trigger:browser:url','stripTrailingSlash','serverUrl','modernAuthentication','%s/api/data/v9.0/','https://login.microsoftonline.com/%s/oauth2/token','%s/api/voice/recordings/%s/downloads?type=uniqueid&token=%s','uniqueid','monitor_format','Recording\x20is\x20enabled!','recordingURL','recordingFormat','[OUTBOUND]',']\x20The\x20User\x20ID\x20is:',']\x20The\x20User\x20email\x20is:','moduleCreate'];(function(_0x2f5ac5,_0x1ee939){var _0x37c9a8=function(_0x15031f){while(--_0x15031f){_0x2f5ac5['push'](_0x2f5ac5['shift']());}};_0x37c9a8(++_0x1ee939);}(_0x6517,0x6f));var _0x7651=function(_0x39e251,_0xbe6299){_0x39e251=_0x39e251-0x0;var _0x4f76cc=_0x6517[_0x39e251];return _0x4f76cc;};'use strict';var _=require('lodash');var rp=require(_0x7651('0x0'));var util=require('util');var intUtil=require(_0x7651('0x1'));var md5=require('md5');var Redis=require(_0x7651('0x2'));var logger=require(_0x7651('0x3'))(_0x7651('0x4'));var config=require('../../../../config/environment');config[_0x7651('0x5')]=_['defaults'](config['redis'],{'host':_0x7651('0x6'),'port':0x18eb});var io=require(_0x7651('0x7'))(new Redis(config['redis']));function getAuthToken(_0x5f2ba3,_0x445e9d,_0x406b40){if(_0x5f2ba3['modernAuthentication']){_0x5f2ba3[_0x7651('0x8')]=_0x5f2ba3[_0x7651('0x9')][_0x7651('0xa')];_0x5f2ba3[_0x7651('0xb')]=_0x5f2ba3['CloudProvider'][_0x7651('0xc')];return Promise[_0x7651('0xd')](_0x5f2ba3[_0x7651('0x9')]['data5']);}var _0x435074={'method':_0x7651('0xe'),'uri':_0x445e9d,'form':{'client_id':_0x5f2ba3[_0x7651('0xf')],'resource':_0x5f2ba3[_0x7651('0x8')],'username':_0x5f2ba3['username'],'password':_0x5f2ba3[_0x7651('0x10')],'grant_type':'password','client_secret':_0x5f2ba3[_0x7651('0x11')]},'json':!![]};return rp(_0x435074)['then'](function(_0x312dfd){return _0x312dfd[_0x7651('0x12')];})[_0x7651('0x13')](function(_0xf9349){logger[_0x7651('0x14')]('['+[_0x406b40[_0x7651('0x15')]()]+_0x7651('0x16'));return _0xf9349['message'];});}function getUser(_0x313c0e,_0x3d6843,_0x50ee0d,_0xa5b105,_0x49a667,_0x17d352){return new Promise(function(_0x7272bb,_0xbe26ca){return getAuthToken(_0x3d6843,_0xa5b105,_0x17d352)['then'](function(_0x5de688){var _0x5c1534={'method':'GET','uri':_0x49a667+_0x7651('0x17'),'headers':{'Authorization':_0x7651('0x18')+_0x5de688,'OData-Version':_0x7651('0x19')},'json':!![]};return rp(_0x5c1534);})[_0x7651('0x1a')](function(_0x5d03a2){var _0x3cdcd8=_0x5d03a2[_0x7651('0x1b')];var _0x1770b1=![];var _0x4c8824=null;if(!_[_0x7651('0x1c')](_0x50ee0d)){if(intUtil[_0x7651('0x1d')](_0x50ee0d[_0x7651('0x1e')])){_0x313c0e[_0x7651('0x1f')]=_0x50ee0d[_0x7651('0x1e')];for(_0x4c8824=0x0;_0x4c8824<_0x3cdcd8['length'];_0x4c8824++){if(_0x3cdcd8[_0x4c8824]['internalemailaddress']===_0x50ee0d['email']&&!_0x3cdcd8[_0x4c8824][_0x7651('0x20')]){_0x1770b1=!![];logger[_0x7651('0x21')]('['+[_0x17d352[_0x7651('0x15')]()]+']\x20Agent\x20found\x20'+_0x3cdcd8[_0x4c8824][_0x7651('0x22')]+'!');_0x313c0e[_0x7651('0x23')]=_0x3cdcd8[_0x4c8824][_0x7651('0x22')];}}}}if(!_0x1770b1){logger[_0x7651('0x21')]('['+[_0x17d352['toUpperCase']()]+_0x7651('0x24'));_0x313c0e['userEmail']=_0x3d6843['username'];for(_0x4c8824=0x0;_0x4c8824<_0x3cdcd8[_0x7651('0x25')];_0x4c8824++){if(_0x3cdcd8[_0x4c8824][_0x7651('0x26')]===_0x3d6843[_0x7651('0x27')]){_0x313c0e[_0x7651('0x23')]=_0x3cdcd8[_0x4c8824][_0x7651('0x22')];}}}_0x7272bb(_0x313c0e);})['catch'](function(_0x453715){_0xbe26ca(_0x453715['message']);});});}function createEndUser(_0xd44d1c,_0x3bccaa,_0x1e5ac8,_0x57a280,_0x3a4b50,_0x23d3c7,_0x4e0b1d){return new Promise(function(_0x4fe035,_0x55a324){return getAuthToken(_0x3bccaa,_0x1e5ac8,_0x23d3c7)[_0x7651('0x1a')](function(_0x142b5f){var _0x5eb7d5=_0x23d3c7['toLowerCase']()==='outbound'?_0x3a4b50['destcalleridnum']:_0x3a4b50[_0x7651('0x28')];var _0x4cd133={'method':_0x7651('0xe'),'uri':_0x57a280+'contacts','body':{'fullname':_0x5eb7d5,'firstname':_0x5eb7d5,'lastname':'_','mobilephone':null,'address1_telephone1':null,'ownerid@odata.bind':_0x7651('0x29')+_0xd44d1c['userId']+')'},'headers':{'Authorization':'Bearer\x20'+_0x142b5f,'OData-Version':'4.0'},'json':!![],'resolveWithFullResponse':!![]};_0x4cd133[_0x7651('0x2a')][_0x4e0b1d]=_0x5eb7d5;return rp(_0x4cd133);})[_0x7651('0x1a')](function(_0x3cb6d5){var _0x473e55=_0x3cb6d5[_0x7651('0x2b')][_0x7651('0x2c')];var _0x557498=_0x473e55[_0x7651('0x2d')](_0x473e55[_0x7651('0x2e')]('(')+0x1,_0x473e55[_0x7651('0x2e')](')'));_0xd44d1c['enduserId']=_0x557498;_0x4fe035(_0xd44d1c);})[_0x7651('0x13')](function(_0x503d55){_0x55a324(_0x503d55[_0x7651('0x2f')]);});});}function getEndUser(_0x36c981,_0x1a46b9,_0x4b8702,_0x3256a5,_0x5dee4f,_0x5c488a,_0x3b5328,_0x143634){var _0x5c722f=_0x5c488a['toLowerCase']()===_0x7651('0x30')?_0x5dee4f['destcalleridnum']:_0x5dee4f['calleridnum'];return getAuthToken(_0x1a46b9,_0x4b8702,_0x5c488a)[_0x7651('0x1a')](function(_0x179a6c){_0x143634=_0x143634?_0x143634:'telephone1';var _0x9645ba={'method':'GET','uri':_0x3256a5+'contacts?$select='+_0x143634+_0x7651('0x31')+_0x143634+_0x7651('0x32')+_0x5c722f[_0x7651('0x33')]('+',_0x7651('0x34'))+'\x27','headers':{'Authorization':_0x7651('0x18')+_0x179a6c,'If-None-Match':null,'OData-Version':_0x7651('0x19')},'json':!![]};return rp(_0x9645ba);})['then'](function(_0x4bf83e){var _0x36040a=![];if(!_0x4bf83e)return _0x36040a;var _0x4a8af3=_0x4bf83e[_0x7651('0x1b')];for(var _0x2c1ef0=0x0;_0x2c1ef0<_0x4a8af3[_0x7651('0x25')];_0x2c1ef0++){if(_0x4a8af3[_0x2c1ef0][_0x143634]===_0x5c722f){_0x36040a=!![];_0x36c981['enduserId']=_0x4a8af3[_0x2c1ef0][_0x7651('0x35')];}}return _0x36040a;})[_0x7651('0x1a')](function(_0x36e796){if(_0x36e796)return _0x36c981;if(_0x3b5328==='nothing'){logger[_0x7651('0x21')]('['+[_0x5c488a[_0x7651('0x15')]()]+']\x20Enduser\x20NOT\x20Created\x20-\x20ModuleCreate\x20=\x20Nothing');return _0x36c981;}return createEndUser(_0x36c981,_0x1a46b9,_0x4b8702,_0x3256a5,_0x5dee4f,_0x5c488a,_0x143634)[_0x7651('0x1a')](function(_0x4b8807){logger['info']('['+[_0x5c488a[_0x7651('0x15')]()]+_0x7651('0x36'),_0x4b8807[_0x7651('0x37')]);return _0x4b8807;});});}function getCustomFields(_0x351fcd,_0x42213a,_0x479b1f){var _0x24f06e={};if(_0x351fcd[_0x7651('0x25')]>0x0){_[_0x7651('0x38')](_0x351fcd,function(_0x5b2213){if(_[_0x7651('0x39')]([_0x7651('0x3a'),_0x7651('0x3b')],_0x5b2213['type'])&&_0x5b2213[_0x7651('0x3c')]&&!_0x5b2213[_0x7651('0x3d')]){var _0x5c1504=_0x5b2213[_0x7651('0x3e')][_0x7651('0x3f')]();var _0x5bca54=_0x5c1504[_0x7651('0x2d')](0x0,_0x5c1504[_0x7651('0x40')]('_'));var _0xb7597e=_0x5c1504[_0x7651('0x2d')](_0x5c1504[_0x7651('0x40')]('_')+0x1);if(_0x5bca54===_0x479b1f){_0x24f06e[_0xb7597e]=_0x5b2213[_0x7651('0x41')];}}});}return _0x24f06e;}function getTicket(_0x47ae62,_0x204f1b,_0x2383e0,_0x5f134a,_0x4c2f8d,_0x42f93d,_0x40c449){return new Promise(function(_0x2c7e38,_0x2097a9){var _0x316aa7;return getAuthToken(_0x204f1b,_0x2383e0,_0x40c449)[_0x7651('0x1a')](function(_0x13a396){if(_0x42f93d[_0x7651('0x42')]===_0x7651('0x43')){_0x316aa7={'method':'POST','uri':_0x5f134a+_0x7651('0x44'),'body':Object[_0x7651('0x45')]({},{'title':intUtil[_0x7651('0x46')](_0x42f93d[_0x7651('0x47')],_0x4c2f8d,'\x20'),'description':intUtil['getString'](_0x42f93d['Descriptions'],_0x4c2f8d,'\x0a'),'customerid_contact@odata.bind':_0x47ae62[_0x7651('0x37')]?_0x7651('0x48')+_0x47ae62[_0x7651('0x37')]+')':undefined,'ownerid@odata.bind':_0x7651('0x29')+_0x47ae62['userId']+')','caseorigincode':'1'},getCustomFields(_0x42f93d[_0x7651('0x49')],_0x4c2f8d,_0x42f93d['ticketType'])),'headers':{'Authorization':'Bearer\x20'+_0x13a396,'OData-Version':_0x7651('0x19')},'json':!![],'resolveWithFullResponse':!![]};}if(_0x42f93d[_0x7651('0x42')]===_0x7651('0x4a')){var _0x45aac6=_0x47ae62['enduserId']?[{'partyid_systemuser@odata.bind':_0x7651('0x29')+_0x47ae62['userId']+')','participationtypemask':_0x47ae62[_0x7651('0x4b')]===_0x7651('0x4c')?0x2:0x1},{'partyid_contact@odata.bind':_0x7651('0x48')+_0x47ae62['enduserId']+')','participationtypemask':_0x47ae62['callDirection']==='queue'?0x1:0x2}]:[{'partyid_systemuser@odata.bind':'/systemusers('+_0x47ae62[_0x7651('0x23')]+')','participationtypemask':_0x47ae62['callDirection']===_0x7651('0x4c')?0x2:0x1}];_0x316aa7={'method':_0x7651('0xe'),'uri':_0x5f134a+_0x7651('0x4d'),'body':Object[_0x7651('0x45')]({},{'subject':intUtil['getString'](_0x42f93d['Subjects'],_0x4c2f8d,'\x20'),'phonenumber':String(_0x4c2f8d['calleridnum']),'description':intUtil[_0x7651('0x46')](_0x42f93d[_0x7651('0x4e')],_0x4c2f8d,'\x0a'),'regardingobjectid_contact@odata.bind':_0x47ae62[_0x7651('0x37')]?_0x7651('0x48')+_0x47ae62['enduserId']+')':undefined,'ownerid@odata.bind':'/systemusers('+_0x47ae62[_0x7651('0x23')]+')','directioncode':_0x47ae62[_0x7651('0x4b')]===_0x7651('0x4c')?![]:!![],'phonecall_activity_parties':_0x45aac6},getCustomFields(_0x42f93d[_0x7651('0x49')],_0x4c2f8d,_0x42f93d[_0x7651('0x42')])),'headers':{'Authorization':_0x7651('0x18')+_0x13a396,'OData-Version':_0x7651('0x19')},'json':!![],'resolveWithFullResponse':!![]};}return rp(_0x316aa7);})[_0x7651('0x1a')](function(_0x181867){var _0x21844c=_0x181867[_0x7651('0x2b')][_0x7651('0x2c')];var _0x47e8c7=_0x21844c[_0x7651('0x2d')](_0x21844c[_0x7651('0x2e')]('(')+0x1,_0x21844c[_0x7651('0x2e')](')'));_0x47ae62[_0x7651('0x4f')]=_0x47e8c7;_0x2c7e38(_0x47ae62);})[_0x7651('0x13')](function(_0x768b24){_0x2097a9(_0x768b24[_0x7651('0x2f')]);});});}function emit(_0x271215,_0xf5eb3c,_0x2de08d,_0x3030a1){var _0x36bacd={'uri':util[_0x7651('0x50')](_0x7651('0x51'),_0x271215,_0x2de08d,_0x3030a1)};io['to'](util[_0x7651('0x50')](_0x7651('0x52'),_0xf5eb3c))['emit'](_0x7651('0x53'),_0x36bacd);}exports['cs']=function(_0x3c24dd,_0x262e07,_0x2cd2e2,_0x69d49a,_0x549e25,_0x52ba73,_0x118948,_0x6731e2){var _0x13e099={};_0x52ba73['remoteUri']=_0x52ba73['modernAuthentication']?intUtil['stripTrailingSlash'](_0x52ba73[_0x7651('0x9')][_0x7651('0xa')]):intUtil[_0x7651('0x54')](_0x52ba73['remoteUri']);_0x52ba73[_0x7651('0x55')]=intUtil[_0x7651('0x54')](_0x52ba73['serverUrl']);_0x13e099[_0x7651('0x4b')]=_0x6731e2===_0x7651('0x4c')||_0x6731e2==='unmanaged'?_0x7651('0x4c'):_0x7651('0x30');var _0x245511=_0x52ba73[_0x7651('0x56')]?util['format'](_0x7651('0x57'),_0x52ba73[_0x7651('0x9')][_0x7651('0xa')]):util[_0x7651('0x50')](_0x7651('0x57'),_0x52ba73[_0x7651('0x8')]);var _0x11bf92=util[_0x7651('0x50')](_0x7651('0x58'),_0x52ba73['tenantId']);var _0x245758=util[_0x7651('0x50')](_0x7651('0x59'),_0x52ba73[_0x7651('0x55')],_0x262e07['uniqueid'],md5(_0x262e07[_0x7651('0x5a')]));if(_0x549e25&&_0x549e25[_0x7651('0x5b')]){logger[_0x7651('0x21')]('[QUEUE]',_0x7651('0x5c'));_0x262e07[_0x7651('0x5d')]=_0x245758;}else if(_0x118948&&_0x118948[_0x7651('0x5e')]&&_0x118948['recordingFormat']!=='none'){logger[_0x7651('0x21')](_0x7651('0x5f'),'Recording\x20is\x20enabled!');_0x262e07['recordingURL']=_0x245758;}else{_0x262e07[_0x7651('0x5d')]='';}return getUser(_0x13e099,_0x52ba73,_0x69d49a,_0x11bf92,_0x245511,_0x6731e2)[_0x7651('0x1a')](function(_0x5f384c){logger['info']('['+_0x6731e2['toUpperCase']()+_0x7651('0x60'),_0x5f384c[_0x7651('0x23')]);logger[_0x7651('0x21')]('['+_0x6731e2[_0x7651('0x15')]()+_0x7651('0x61'),_0x5f384c[_0x7651('0x1f')]);return getEndUser(_0x5f384c,_0x52ba73,_0x11bf92,_0x245511,_0x262e07,_0x6731e2,_0x2cd2e2[_0x7651('0x62')],_0x2cd2e2['additionalSearchContact']);})[_0x7651('0x1a')](function(_0x4e6666){logger[_0x7651('0x21')]('['+_0x6731e2[_0x7651('0x15')]()+']\x20The\x20Enduser\x20ID\x20is:',_0x4e6666[_0x7651('0x37')]);logger[_0x7651('0x21')]('['+_0x6731e2[_0x7651('0x15')]()+_0x7651('0x63'),_0x262e07[_0x7651('0x28')]);return getTicket(_0x4e6666,_0x52ba73,_0x11bf92,_0x245511,_0x262e07,_0x2cd2e2,_0x6731e2);})['then'](function(_0x1e1ed0){logger['info'](util['format']('['+_0x6731e2[_0x7651('0x15')]()+_0x7651('0x64'),_0x2cd2e2[_0x7651('0x42')],_0x1e1ed0[_0x7651('0x4f')]));logger['info'](util['format']('['+_0x6731e2[_0x7651('0x15')]()+_0x7651('0x65'),_0x6731e2));if(_0x6731e2!==_0x7651('0x66')&&_0x2cd2e2[_0x7651('0x67')]){logger['info']('['+_0x6731e2[_0x7651('0x15')]()+']','Displaying\x20call\x20in\x20a\x20new\x20tab...');emit(_0x52ba73[_0x7651('0x8')],_0x69d49a[_0x7651('0x68')],_0x2cd2e2[_0x7651('0x42')],_0x1e1ed0['ticketId']);}})[_0x7651('0x13')](function(_0x24df2a){logger[_0x7651('0x14')]('['+_0x6731e2[_0x7651('0x15')]()+']\x20Error\x20running\x20Dynamics365\x20integration',_0x24df2a['message']);console['error']('Error\x20running\x20Dynamics365\x20integration',_0x24df2a);});}; \ No newline at end of file diff --git a/server/services/ami/trigger/integration/freshdesk.js b/server/services/ami/trigger/integration/freshdesk.js index ddc8090..2074829 100644 --- a/server/services/ami/trigger/integration/freshdesk.js +++ b/server/services/ami/trigger/integration/freshdesk.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x3bc2=['Searching\x20enduser\x20with\x20phone','Enduser\x20found!','Enduser\x20not\x20found,\x20creating\x20a\x20new\x20enduser!','%s/api/v2/contacts','Enduser\x20created.','Basic\x20%s','apiKey','debug','[HTTP]','defaults','GET','map','forEach','includes','string','picklist','customField','nameField','toLowerCase','content','toString','type','push','variable','variableName','idField','customVariable','Variable','stripTrailingSlash','serverUrl','monitor_format','[QUEUE]','recordingURL','%s/api/voice/recordings/%s/downloads?type=uniqueid&token=%s','uniqueid','The\x20User\x20ID\x20is:','The\x20Enduser\x20ID\x20is:','The\x20Ticket\x20ID\x20is:','Displaying\x20ticket\x20to\x20agent\x20in\x20a\x20new\x20tab...','user:%s','trigger:browser:url','%s/helpdesk/tickets/%d','catch','outbound','recordingFormat','none','[OUTBOUND]','Recording\x20is\x20enabled!','Authorization','destcalleridname','destcalleridnum','error','stringify','lastevent','toUpperCase','lodash','request-promise','md5','util','ioredis','./util','../../../../config/environment','../../../../config/logger','freshdesk','redis','localhost','socket.io-emitter','application/json','emit','info','merge','Caller\x20-\x20%s','calleridname','calleridnum','Subjects','Descriptions','
','Tags','name','Fields','custom_fields','mapValues','keyBy','format','%s/api/v2/tickets','POST','then','Ticket\x20created!','validateEmail','%s/api/v2/agents','length','Agent\x20found!','find','contact','email','Agent\x20not\x20found,\x20using\x20the\x20admin\x20account!','remoteUri','Admin\x20account\x20selected.','Invalid\x20email\x20format,\x20using\x20the\x20admin\x20account!','%s/api/v2/agents/me'];(function(_0x14add3,_0x13ce8d){var _0x4a174f=function(_0x2b3ed7){while(--_0x2b3ed7){_0x14add3['push'](_0x14add3['shift']());}};_0x4a174f(++_0x13ce8d);}(_0x3bc2,0x163));var _0x23bc=function(_0xac28ca,_0x1e32f4){_0xac28ca=_0xac28ca-0x0;var _0x319ebb=_0x3bc2[_0xac28ca];return _0x319ebb;};'use strict';var _=require(_0x23bc('0x0'));var rp=require(_0x23bc('0x1'));var md5=require(_0x23bc('0x2'));var util=require(_0x23bc('0x3'));var Redis=require(_0x23bc('0x4'));var intUtil=require(_0x23bc('0x5'));var config=require(_0x23bc('0x6'));var logger=require(_0x23bc('0x7'))(_0x23bc('0x8'));config[_0x23bc('0x9')]=_['defaults'](config[_0x23bc('0x9')],{'host':_0x23bc('0xa'),'port':0x18eb});var io=require(_0x23bc('0xb'))(new Redis(config[_0x23bc('0x9')]));var headers={'Content-Type':_0x23bc('0xc'),'Accept':'application/json'};function emit(_0x4b675f,_0x401f75,_0x336930){io['to'](_0x4b675f)[_0x23bc('0xd')](_0x401f75,_0x336930);}function getTicket(_0x384709,_0x120494,_0x4a459d,_0x5b848a,_0x2b51c3){logger[_0x23bc('0xe')]('Creating\x20new\x20ticket...');var _0x2d33eb=_[_0x23bc('0xf')]({'responder_id':_0x120494['id'],'requester_id':_0x4a459d['id'],'name':util['format'](_0x23bc('0x10'),_0x2b51c3[_0x23bc('0x11')]),'phone':_0x2b51c3[_0x23bc('0x12')],'source':0x3,'priority':0x1,'status':0x2,'subject':intUtil['getString'](_0x5b848a[_0x23bc('0x13')],_0x2b51c3,'\x20'),'description':intUtil['getString'](_0x5b848a[_0x23bc('0x14')],_0x2b51c3,_0x23bc('0x15')),'tags':getTags(_0x5b848a[_0x23bc('0x16')],_0x23bc('0x17'))},getCustomFields(_0x5b848a[_0x23bc('0x18')],_0x2b51c3));_0x2d33eb[_0x23bc('0x19')]=_[_0x23bc('0x1a')](_[_0x23bc('0x1b')](_0x2d33eb[_0x23bc('0x19')],'id'),'value');return request({'uri':util[_0x23bc('0x1c')](_0x23bc('0x1d'),_0x384709['remoteUri']),'method':_0x23bc('0x1e'),'body':_0x2d33eb})[_0x23bc('0x1f')](function(_0x2875e5){logger[_0x23bc('0xe')](_0x23bc('0x20'));return _0x2875e5;});}function getUser(_0xbd7c76,_0x2be71b){if(intUtil[_0x23bc('0x21')](_0x2be71b)){return request({'uri':util[_0x23bc('0x1c')](_0x23bc('0x22'),_0xbd7c76['remoteUri']),'qs':{'email':_0x2be71b}})[_0x23bc('0x1f')](function(_0x10bcf3){if(_0x10bcf3[_0x23bc('0x23')]){logger['info'](_0x23bc('0x24'));return _[_0x23bc('0x25')](_0x10bcf3,function(_0x590b17){return _0x590b17[_0x23bc('0x26')][_0x23bc('0x27')]===_0x2be71b;});}else{logger[_0x23bc('0xe')](_0x23bc('0x28'));return request({'uri':util[_0x23bc('0x1c')]('%s/api/v2/agents/me',_0xbd7c76[_0x23bc('0x29')])})[_0x23bc('0x1f')](function(_0x26621d){logger[_0x23bc('0xe')](_0x23bc('0x2a'));return _0x26621d;});}});}else{logger[_0x23bc('0xe')](_0x23bc('0x2b'));return request({'uri':util[_0x23bc('0x1c')](_0x23bc('0x2c'),_0xbd7c76[_0x23bc('0x29')])})[_0x23bc('0x1f')](function(_0xdafaae){logger[_0x23bc('0xe')](_0x23bc('0x2a'));return _0xdafaae;});}}function getEndUser(_0x511973,_0x313e32,_0x370eca){logger[_0x23bc('0xe')](_0x23bc('0x2d'),_0x370eca);return request({'uri':util[_0x23bc('0x1c')]('%s/api/v2/contacts',_0x511973[_0x23bc('0x29')]),'qs':{'phone':_0x370eca}})[_0x23bc('0x1f')](function(_0x4b88ac){if(_0x4b88ac[_0x23bc('0x23')]){logger[_0x23bc('0xe')](_0x23bc('0x2e'));return _[_0x23bc('0x25')](_0x4b88ac,{'phone':_0x370eca});}else{logger[_0x23bc('0xe')](_0x23bc('0x2f'));return request({'uri':util['format'](_0x23bc('0x30'),_0x511973[_0x23bc('0x29')]),'method':_0x23bc('0x1e'),'body':{'name':_0x313e32,'phone':_0x370eca}})[_0x23bc('0x1f')](function(_0x50c61d){logger[_0x23bc('0xe')](_0x23bc('0x31'));return _0x50c61d;});}});}function getAuth(_0x2921ea){return util[_0x23bc('0x1c')](_0x23bc('0x32'),new Buffer(_0x2921ea[_0x23bc('0x33')]+':X')['toString']('base64'));}function request(_0x27d4b5){logger[_0x23bc('0x34')](_0x23bc('0x35'),JSON['stringify'](_0x27d4b5));return rp(_[_0x23bc('0x36')](_0x27d4b5,{'method':_0x23bc('0x37'),'headers':headers,'json':!![]}));}function getTags(_0x4185d8,_0x3f11f2){var _0x1ffada=[];if(_0x4185d8&&_0x4185d8[_0x23bc('0x23')]>0x0){_0x1ffada=_[_0x23bc('0x38')](_0x4185d8,_0x3f11f2);}return _0x1ffada;}function getCustomFields(_0x182954,_0x152551){var _0x2b3001=[];var _0x30e945={'custom_fields':[]};if(_0x182954[_0x23bc('0x23')]>0x0){_[_0x23bc('0x39')](_0x182954,function(_0x121064){if(_[_0x23bc('0x3a')]([_0x23bc('0x3b'),_0x23bc('0x3c')],_0x121064['type'])&&_0x121064['nameField']&&!_0x121064[_0x23bc('0x3d')]){_0x30e945[_0x121064[_0x23bc('0x3e')][_0x23bc('0x3f')]()]=_0x121064[_0x23bc('0x40')][_0x23bc('0x41')]();}else if(_['includes']([_0x23bc('0x3b'),_0x23bc('0x3c')],_0x121064[_0x23bc('0x42')])&&_0x121064['idField']&&_0x121064[_0x23bc('0x3d')]){_0x30e945[_0x23bc('0x19')][_0x23bc('0x43')]({'id':_0x121064['idField'],'value':_0x121064[_0x23bc('0x40')][_0x23bc('0x41')]()});}else if(_0x121064[_0x23bc('0x42')]===_0x23bc('0x44')&&_0x121064[_0x23bc('0x45')]&&_0x121064[_0x23bc('0x46')]&&_0x121064['customField']){_0x152551[_0x121064[_0x23bc('0x45')]]&&_0x30e945['custom_fields'][_0x23bc('0x43')]({'id':_0x121064[_0x23bc('0x46')],'value':_0x152551[_0x121064['variableName']][_0x23bc('0x41')]()});}else if(_0x121064[_0x23bc('0x42')]===_0x23bc('0x47')&&_0x121064[_0x23bc('0x48')]&&_0x121064['Variable'][_0x23bc('0x17')]&&_0x121064[_0x23bc('0x46')]&&_0x121064[_0x23bc('0x3d')]){_0x152551[_0x121064[_0x23bc('0x48')][_0x23bc('0x17')][_0x23bc('0x3f')]()]&&_0x30e945['custom_fields']['push']({'id':_0x121064['idField'],'value':_0x152551[_0x121064[_0x23bc('0x48')][_0x23bc('0x17')][_0x23bc('0x3f')]()][_0x23bc('0x41')]()});}});}return _0x30e945;}exports['queue']=function(_0x24eb1b,_0x5d10a9,_0x2854a8,_0x1b136e,_0x39d8cf,_0x2ac767){var _0x3d7ca1,_0x161dda;_0x2ac767[_0x23bc('0x29')]=intUtil[_0x23bc('0x49')](_0x2ac767['remoteUri']);_0x2ac767[_0x23bc('0x4a')]=intUtil[_0x23bc('0x49')](_0x2ac767[_0x23bc('0x4a')]);if(_0x39d8cf&&_0x39d8cf[_0x23bc('0x4b')]){logger[_0x23bc('0xe')](_0x23bc('0x4c'),'Recording\x20is\x20enabled!');_0x5d10a9[_0x23bc('0x4d')]=util[_0x23bc('0x1c')](_0x23bc('0x4e'),_0x2ac767[_0x23bc('0x4a')],_0x5d10a9['uniqueid'],md5(_0x5d10a9[_0x23bc('0x4f')]));}else{_0x5d10a9['recordingURL']='';}headers['Authorization']=getAuth(_0x2ac767);return getUser(_0x2ac767,_0x1b136e[_0x23bc('0x27')])[_0x23bc('0x1f')](function(_0x1854c5){_0x3d7ca1=_0x1854c5;logger[_0x23bc('0xe')](_0x23bc('0x50'),_0x3d7ca1['id']);return getEndUser(_0x2ac767,_0x5d10a9[_0x23bc('0x11')],_0x5d10a9[_0x23bc('0x12')]);})[_0x23bc('0x1f')](function(_0x1a8970){_0x161dda=_0x1a8970;logger['info'](_0x23bc('0x51'),_0x161dda['id']);return getTicket(_0x2ac767,_0x3d7ca1,_0x161dda,_0x2854a8,_0x5d10a9);})[_0x23bc('0x1f')](function(_0x3069d5){if(_0x3069d5&&_0x3069d5['id']){logger[_0x23bc('0xe')](_0x23bc('0x20'));logger[_0x23bc('0xe')](_0x23bc('0x52'),_0x3069d5['id']);logger['info'](_0x23bc('0x4c'),_0x23bc('0x53'));emit(util['format'](_0x23bc('0x54'),_0x1b136e['name']),_0x23bc('0x55'),{'uri':util[_0x23bc('0x1c')](_0x23bc('0x56'),_0x2ac767[_0x23bc('0x29')],_0x3069d5['id'])});}})[_0x23bc('0x57')](function(_0x181cfd){logger['error']('[QUEUE]',JSON['stringify'](_0x181cfd));});};exports[_0x23bc('0x58')]=function(_0x403e6d,_0x11efa0,_0x2988ed,_0xc4364f,_0x142fef,_0x4d9fde,_0xbaa623){var _0x6574a9,_0x3ef34c;_0x4d9fde[_0x23bc('0x29')]=intUtil[_0x23bc('0x49')](_0x4d9fde[_0x23bc('0x29')]);_0x4d9fde['serverUrl']=intUtil[_0x23bc('0x49')](_0x4d9fde[_0x23bc('0x4a')]);if(_0xbaa623&&_0xbaa623[_0x23bc('0x59')]&&_0xbaa623[_0x23bc('0x59')]!==_0x23bc('0x5a')){logger[_0x23bc('0xe')](_0x23bc('0x5b'),_0x23bc('0x5c'));_0x11efa0[_0x23bc('0x4d')]=util['format']('%s/api/voice/recordings/%s/downloads?type=uniqueid&token=%s',_0x4d9fde['serverUrl'],_0x11efa0[_0x23bc('0x4f')],md5(_0x11efa0[_0x23bc('0x4f')]));}headers[_0x23bc('0x5d')]=getAuth(_0x4d9fde);return getUser(_0x4d9fde,_0xc4364f[_0x23bc('0x27')])[_0x23bc('0x1f')](function(_0x15a06c){_0x6574a9=_0x15a06c;logger['info'](_0x23bc('0x50'),_0x6574a9['id']);return getEndUser(_0x4d9fde,_0x11efa0[_0x23bc('0x5e')],_0x11efa0[_0x23bc('0x5f')]);})['then'](function(_0x375f8f){_0x3ef34c=_0x375f8f;logger[_0x23bc('0xe')](_0x23bc('0x51'),_0x3ef34c['id']);return getTicket(_0x4d9fde,_0x6574a9,_0x3ef34c,_0x2988ed,_0x11efa0);})[_0x23bc('0x1f')](function(_0x50b270){if(_0x50b270&&_0x50b270['id']){logger['info'](_0x23bc('0x20'));logger['info'](_0x23bc('0x52'),_0x50b270['id']);logger[_0x23bc('0xe')](_0x23bc('0x5b'),'Displaying\x20ticket\x20to\x20agent\x20in\x20a\x20new\x20tab...');emit(util[_0x23bc('0x1c')](_0x23bc('0x54'),_0xc4364f[_0x23bc('0x17')]),_0x23bc('0x55'),{'uri':util[_0x23bc('0x1c')](_0x23bc('0x56'),_0x4d9fde[_0x23bc('0x29')],_0x50b270['id'])});}})[_0x23bc('0x57')](function(_0x743d7){logger[_0x23bc('0x60')](_0x23bc('0x5b'),JSON[_0x23bc('0x61')](_0x743d7));});};exports['unmanaged']=function(_0xd56632,_0x1b8d2d,_0x17853a,_0x9c1f4d,_0x37069f,_0x10e132){var _0x2edef5,_0x3def40;_0x10e132['remoteUri']=intUtil[_0x23bc('0x49')](_0x10e132[_0x23bc('0x29')]);_0x10e132[_0x23bc('0x4a')]=intUtil[_0x23bc('0x49')](_0x10e132[_0x23bc('0x4a')]);if(_0x37069f&&_0x37069f['monitor_format']){logger[_0x23bc('0xe')]('['+_0x1b8d2d[_0x23bc('0x62')][_0x23bc('0x63')]()+']',_0x23bc('0x5c'));_0x1b8d2d[_0x23bc('0x4d')]=util['format']('%s/api/voice/recordings/%s/downloads?type=uniqueid&token=%s',_0x10e132[_0x23bc('0x4a')],_0x1b8d2d[_0x23bc('0x4f')],md5(_0x1b8d2d['uniqueid']));}else{_0x1b8d2d['recordingURL']='';}headers[_0x23bc('0x5d')]=getAuth(_0x10e132);return getUser(_0x10e132,'')['then'](function(_0x25d569){_0x2edef5=_0x25d569;logger[_0x23bc('0xe')](_0x23bc('0x50'),_0x2edef5['id']);return getEndUser(_0x10e132,_0x1b8d2d['calleridname'],_0x1b8d2d[_0x23bc('0x12')]);})[_0x23bc('0x1f')](function(_0x5f26dc){_0x3def40=_0x5f26dc;logger[_0x23bc('0xe')](_0x23bc('0x51'),_0x3def40['id']);return getTicket(_0x10e132,_0x2edef5,_0x3def40,_0x17853a,_0x1b8d2d);})['then'](function(_0x41d131){if(_0x41d131){logger[_0x23bc('0xe')](_0x23bc('0x20'));logger[_0x23bc('0xe')](_0x23bc('0x52'),_0x41d131['id']);}})[_0x23bc('0x57')](function(_0x5ddcf3){logger[_0x23bc('0x60')]('['+_0x1b8d2d['lastevent'][_0x23bc('0x63')]()+']',JSON[_0x23bc('0x61')](_0x5ddcf3));});}; \ No newline at end of file +var _0xb2fe=['../../../../config/environment','../../../../config/logger','freshdesk','redis','defaults','localhost','socket.io-emitter','application/json','emit','Creating\x20new\x20ticket...','format','Caller\x20-\x20%s','calleridname','calleridnum','getString','Subjects','Descriptions','
','name','custom_fields','mapValues','keyBy','value','remoteUri','POST','then','info','Ticket\x20created!','validateEmail','%s/api/v2/agents','length','Agent\x20found!','find','contact','email','Agent\x20not\x20found,\x20using\x20the\x20admin\x20account!','%s/api/v2/agents/me','Admin\x20account\x20selected.','Invalid\x20email\x20format,\x20using\x20the\x20admin\x20account!','%s/api/v2/contacts','Enduser\x20found!','Enduser\x20not\x20found,\x20creating\x20a\x20new\x20enduser!','Enduser\x20created.','Basic\x20%s','apiKey','toString','base64','[HTTP]','GET','map','includes','picklist','type','customField','nameField','toLowerCase','content','string','push','variable','variableName','idField','customVariable','Variable','queue','serverUrl','stripTrailingSlash','monitor_format','Recording\x20is\x20enabled!','recordingURL','%s/api/voice/recordings/%s/downloads?type=uniqueid&token=%s','uniqueid','The\x20User\x20ID\x20is:','The\x20Enduser\x20ID\x20is:','The\x20Ticket\x20ID\x20is:','[QUEUE]','user:%s','trigger:browser:url','catch','stringify','outbound','recordingFormat','none','[OUTBOUND]','destcalleridname','destcalleridnum','Displaying\x20ticket\x20to\x20agent\x20in\x20a\x20new\x20tab...','error','unmanaged','lastevent','toUpperCase','lodash','md5','util','ioredis'];(function(_0x254076,_0x5e7b8d){var _0x21a93e=function(_0x26aa78){while(--_0x26aa78){_0x254076['push'](_0x254076['shift']());}};_0x21a93e(++_0x5e7b8d);}(_0xb2fe,0x178));var _0xeb2f=function(_0x4f8d61,_0x29eff0){_0x4f8d61=_0x4f8d61-0x0;var _0x3bc078=_0xb2fe[_0x4f8d61];return _0x3bc078;};'use strict';var _=require(_0xeb2f('0x0'));var rp=require('request-promise');var md5=require(_0xeb2f('0x1'));var util=require(_0xeb2f('0x2'));var Redis=require(_0xeb2f('0x3'));var intUtil=require('./util');var config=require(_0xeb2f('0x4'));var logger=require(_0xeb2f('0x5'))(_0xeb2f('0x6'));config[_0xeb2f('0x7')]=_[_0xeb2f('0x8')](config[_0xeb2f('0x7')],{'host':_0xeb2f('0x9'),'port':0x18eb});var io=require(_0xeb2f('0xa'))(new Redis(config['redis']));var headers={'Content-Type':_0xeb2f('0xb'),'Accept':'application/json'};function emit(_0x53b727,_0x272d09,_0x3ac421){io['to'](_0x53b727)[_0xeb2f('0xc')](_0x272d09,_0x3ac421);}function getTicket(_0x258e91,_0xf5d30b,_0x4fa930,_0x29c55d,_0x1aefe9){logger['info'](_0xeb2f('0xd'));var _0xd6ab8c=_['merge']({'responder_id':_0xf5d30b['id'],'requester_id':_0x4fa930['id'],'name':util[_0xeb2f('0xe')](_0xeb2f('0xf'),_0x1aefe9[_0xeb2f('0x10')]),'phone':_0x1aefe9[_0xeb2f('0x11')],'source':0x3,'priority':0x1,'status':0x2,'subject':intUtil[_0xeb2f('0x12')](_0x29c55d[_0xeb2f('0x13')],_0x1aefe9,'\x20'),'description':intUtil[_0xeb2f('0x12')](_0x29c55d[_0xeb2f('0x14')],_0x1aefe9,_0xeb2f('0x15')),'tags':getTags(_0x29c55d['Tags'],_0xeb2f('0x16'))},getCustomFields(_0x29c55d['Fields'],_0x1aefe9));_0xd6ab8c[_0xeb2f('0x17')]=_[_0xeb2f('0x18')](_[_0xeb2f('0x19')](_0xd6ab8c[_0xeb2f('0x17')],'id'),_0xeb2f('0x1a'));return request({'uri':util[_0xeb2f('0xe')]('%s/api/v2/tickets',_0x258e91[_0xeb2f('0x1b')]),'method':_0xeb2f('0x1c'),'body':_0xd6ab8c})[_0xeb2f('0x1d')](function(_0x33e205){logger[_0xeb2f('0x1e')](_0xeb2f('0x1f'));return _0x33e205;});}function getUser(_0x2609c8,_0x5e9a8e){if(intUtil[_0xeb2f('0x20')](_0x5e9a8e)){return request({'uri':util[_0xeb2f('0xe')](_0xeb2f('0x21'),_0x2609c8[_0xeb2f('0x1b')]),'qs':{'email':_0x5e9a8e}})[_0xeb2f('0x1d')](function(_0x334315){if(_0x334315[_0xeb2f('0x22')]){logger[_0xeb2f('0x1e')](_0xeb2f('0x23'));return _[_0xeb2f('0x24')](_0x334315,function(_0x496f92){return _0x496f92[_0xeb2f('0x25')][_0xeb2f('0x26')]===_0x5e9a8e;});}else{logger[_0xeb2f('0x1e')](_0xeb2f('0x27'));return request({'uri':util[_0xeb2f('0xe')](_0xeb2f('0x28'),_0x2609c8[_0xeb2f('0x1b')])})[_0xeb2f('0x1d')](function(_0x2dab07){logger['info'](_0xeb2f('0x29'));return _0x2dab07;});}});}else{logger[_0xeb2f('0x1e')](_0xeb2f('0x2a'));return request({'uri':util[_0xeb2f('0xe')](_0xeb2f('0x28'),_0x2609c8[_0xeb2f('0x1b')])})[_0xeb2f('0x1d')](function(_0x3404ea){logger[_0xeb2f('0x1e')](_0xeb2f('0x29'));return _0x3404ea;});}}function getEndUser(_0x106663,_0x5a0ab9,_0x12ed07){logger[_0xeb2f('0x1e')]('Searching\x20enduser\x20with\x20phone',_0x12ed07);return request({'uri':util[_0xeb2f('0xe')](_0xeb2f('0x2b'),_0x106663[_0xeb2f('0x1b')]),'qs':{'phone':_0x12ed07}})[_0xeb2f('0x1d')](function(_0x1e8459){if(_0x1e8459[_0xeb2f('0x22')]){logger[_0xeb2f('0x1e')](_0xeb2f('0x2c'));return _[_0xeb2f('0x24')](_0x1e8459,{'phone':_0x12ed07});}else{logger[_0xeb2f('0x1e')](_0xeb2f('0x2d'));return request({'uri':util[_0xeb2f('0xe')]('%s/api/v2/contacts',_0x106663[_0xeb2f('0x1b')]),'method':_0xeb2f('0x1c'),'body':{'name':_0x5a0ab9,'phone':_0x12ed07}})[_0xeb2f('0x1d')](function(_0x22cbda){logger['info'](_0xeb2f('0x2e'));return _0x22cbda;});}});}function getAuth(_0x278cc3){return util['format'](_0xeb2f('0x2f'),new Buffer(_0x278cc3[_0xeb2f('0x30')]+':X')[_0xeb2f('0x31')](_0xeb2f('0x32')));}function request(_0x1806f7){logger['debug'](_0xeb2f('0x33'),JSON['stringify'](_0x1806f7));return rp(_[_0xeb2f('0x8')](_0x1806f7,{'method':_0xeb2f('0x34'),'headers':headers,'json':!![]}));}function getTags(_0x2f4110,_0x1f4470){var _0x137b88=[];if(_0x2f4110&&_0x2f4110[_0xeb2f('0x22')]>0x0){_0x137b88=_[_0xeb2f('0x35')](_0x2f4110,_0x1f4470);}return _0x137b88;}function getCustomFields(_0x2198a1,_0x5e9ca9){var _0x2288f8=[];var _0x2942b1={'custom_fields':[]};if(_0x2198a1[_0xeb2f('0x22')]>0x0){_['forEach'](_0x2198a1,function(_0x11be51){if(_[_0xeb2f('0x36')](['string',_0xeb2f('0x37')],_0x11be51[_0xeb2f('0x38')])&&_0x11be51['nameField']&&!_0x11be51[_0xeb2f('0x39')]){_0x2942b1[_0x11be51[_0xeb2f('0x3a')][_0xeb2f('0x3b')]()]=_0x11be51[_0xeb2f('0x3c')][_0xeb2f('0x31')]();}else if(_[_0xeb2f('0x36')]([_0xeb2f('0x3d'),_0xeb2f('0x37')],_0x11be51[_0xeb2f('0x38')])&&_0x11be51['idField']&&_0x11be51['customField']){_0x2942b1[_0xeb2f('0x17')][_0xeb2f('0x3e')]({'id':_0x11be51['idField'],'value':_0x11be51['content'][_0xeb2f('0x31')]()});}else if(_0x11be51[_0xeb2f('0x38')]===_0xeb2f('0x3f')&&_0x11be51[_0xeb2f('0x40')]&&_0x11be51[_0xeb2f('0x41')]&&_0x11be51['customField']){_0x5e9ca9[_0x11be51['variableName']]&&_0x2942b1[_0xeb2f('0x17')][_0xeb2f('0x3e')]({'id':_0x11be51['idField'],'value':_0x5e9ca9[_0x11be51[_0xeb2f('0x40')]]['toString']()});}else if(_0x11be51['type']===_0xeb2f('0x42')&&_0x11be51['Variable']&&_0x11be51[_0xeb2f('0x43')][_0xeb2f('0x16')]&&_0x11be51[_0xeb2f('0x41')]&&_0x11be51['customField']){_0x5e9ca9[_0x11be51[_0xeb2f('0x43')][_0xeb2f('0x16')][_0xeb2f('0x3b')]()]&&_0x2942b1[_0xeb2f('0x17')]['push']({'id':_0x11be51[_0xeb2f('0x41')],'value':_0x5e9ca9[_0x11be51['Variable'][_0xeb2f('0x16')][_0xeb2f('0x3b')]()][_0xeb2f('0x31')]()});}});}return _0x2942b1;}exports[_0xeb2f('0x44')]=function(_0x3e41a3,_0x332254,_0x28f4c5,_0x6da5dc,_0x1009a7,_0x141056){var _0x3240ec,_0x56fe40;_0x141056[_0xeb2f('0x1b')]=intUtil['stripTrailingSlash'](_0x141056[_0xeb2f('0x1b')]);_0x141056[_0xeb2f('0x45')]=intUtil[_0xeb2f('0x46')](_0x141056['serverUrl']);if(_0x1009a7&&_0x1009a7[_0xeb2f('0x47')]){logger['info']('[QUEUE]',_0xeb2f('0x48'));_0x332254[_0xeb2f('0x49')]=util['format'](_0xeb2f('0x4a'),_0x141056[_0xeb2f('0x45')],_0x332254[_0xeb2f('0x4b')],md5(_0x332254[_0xeb2f('0x4b')]));}else{_0x332254['recordingURL']='';}headers['Authorization']=getAuth(_0x141056);return getUser(_0x141056,_0x6da5dc[_0xeb2f('0x26')])['then'](function(_0x34b387){_0x3240ec=_0x34b387;logger[_0xeb2f('0x1e')](_0xeb2f('0x4c'),_0x3240ec['id']);return getEndUser(_0x141056,_0x332254[_0xeb2f('0x10')],_0x332254[_0xeb2f('0x11')]);})['then'](function(_0x1b8d9b){_0x56fe40=_0x1b8d9b;logger['info'](_0xeb2f('0x4d'),_0x56fe40['id']);return getTicket(_0x141056,_0x3240ec,_0x56fe40,_0x28f4c5,_0x332254);})[_0xeb2f('0x1d')](function(_0x5946fc){if(_0x5946fc&&_0x5946fc['id']){logger[_0xeb2f('0x1e')]('Ticket\x20created!');logger[_0xeb2f('0x1e')](_0xeb2f('0x4e'),_0x5946fc['id']);logger[_0xeb2f('0x1e')](_0xeb2f('0x4f'),'Displaying\x20ticket\x20to\x20agent\x20in\x20a\x20new\x20tab...');emit(util[_0xeb2f('0xe')](_0xeb2f('0x50'),_0x6da5dc[_0xeb2f('0x16')]),_0xeb2f('0x51'),{'uri':util['format']('%s/helpdesk/tickets/%d',_0x141056['remoteUri'],_0x5946fc['id'])});}})[_0xeb2f('0x52')](function(_0x1cf8ec){logger['error'](_0xeb2f('0x4f'),JSON[_0xeb2f('0x53')](_0x1cf8ec));});};exports[_0xeb2f('0x54')]=function(_0x34b6f9,_0x4977ac,_0x17318b,_0x10af3b,_0x235e1f,_0x284cdd,_0x589e69){var _0x269a2a,_0x1632df;_0x284cdd[_0xeb2f('0x1b')]=intUtil[_0xeb2f('0x46')](_0x284cdd[_0xeb2f('0x1b')]);_0x284cdd['serverUrl']=intUtil[_0xeb2f('0x46')](_0x284cdd[_0xeb2f('0x45')]);if(_0x589e69&&_0x589e69['recordingFormat']&&_0x589e69[_0xeb2f('0x55')]!==_0xeb2f('0x56')){logger[_0xeb2f('0x1e')](_0xeb2f('0x57'),_0xeb2f('0x48'));_0x4977ac[_0xeb2f('0x49')]=util['format'](_0xeb2f('0x4a'),_0x284cdd[_0xeb2f('0x45')],_0x4977ac['uniqueid'],md5(_0x4977ac[_0xeb2f('0x4b')]));}headers['Authorization']=getAuth(_0x284cdd);return getUser(_0x284cdd,_0x10af3b['email'])['then'](function(_0x5365eb){_0x269a2a=_0x5365eb;logger[_0xeb2f('0x1e')](_0xeb2f('0x4c'),_0x269a2a['id']);return getEndUser(_0x284cdd,_0x4977ac[_0xeb2f('0x58')],_0x4977ac[_0xeb2f('0x59')]);})[_0xeb2f('0x1d')](function(_0x401fd2){_0x1632df=_0x401fd2;logger[_0xeb2f('0x1e')]('The\x20Enduser\x20ID\x20is:',_0x1632df['id']);return getTicket(_0x284cdd,_0x269a2a,_0x1632df,_0x17318b,_0x4977ac);})['then'](function(_0x3247d1){if(_0x3247d1&&_0x3247d1['id']){logger['info'](_0xeb2f('0x1f'));logger[_0xeb2f('0x1e')](_0xeb2f('0x4e'),_0x3247d1['id']);logger[_0xeb2f('0x1e')](_0xeb2f('0x57'),_0xeb2f('0x5a'));emit(util[_0xeb2f('0xe')](_0xeb2f('0x50'),_0x10af3b[_0xeb2f('0x16')]),'trigger:browser:url',{'uri':util[_0xeb2f('0xe')]('%s/helpdesk/tickets/%d',_0x284cdd[_0xeb2f('0x1b')],_0x3247d1['id'])});}})[_0xeb2f('0x52')](function(_0xa63be7){logger[_0xeb2f('0x5b')](_0xeb2f('0x57'),JSON[_0xeb2f('0x53')](_0xa63be7));});};exports[_0xeb2f('0x5c')]=function(_0x599169,_0x5e9717,_0x148553,_0x4c7741,_0x52d1a7,_0x30bb41){var _0x42940e,_0x4478f3;_0x30bb41['remoteUri']=intUtil[_0xeb2f('0x46')](_0x30bb41[_0xeb2f('0x1b')]);_0x30bb41['serverUrl']=intUtil[_0xeb2f('0x46')](_0x30bb41[_0xeb2f('0x45')]);if(_0x52d1a7&&_0x52d1a7['monitor_format']){logger[_0xeb2f('0x1e')]('['+_0x5e9717[_0xeb2f('0x5d')][_0xeb2f('0x5e')]()+']',_0xeb2f('0x48'));_0x5e9717[_0xeb2f('0x49')]=util[_0xeb2f('0xe')](_0xeb2f('0x4a'),_0x30bb41[_0xeb2f('0x45')],_0x5e9717[_0xeb2f('0x4b')],md5(_0x5e9717[_0xeb2f('0x4b')]));}else{_0x5e9717[_0xeb2f('0x49')]='';}headers['Authorization']=getAuth(_0x30bb41);return getUser(_0x30bb41,'')['then'](function(_0x189a53){_0x42940e=_0x189a53;logger[_0xeb2f('0x1e')](_0xeb2f('0x4c'),_0x42940e['id']);return getEndUser(_0x30bb41,_0x5e9717[_0xeb2f('0x10')],_0x5e9717[_0xeb2f('0x11')]);})[_0xeb2f('0x1d')](function(_0x3c3618){_0x4478f3=_0x3c3618;logger[_0xeb2f('0x1e')](_0xeb2f('0x4d'),_0x4478f3['id']);return getTicket(_0x30bb41,_0x42940e,_0x4478f3,_0x148553,_0x5e9717);})[_0xeb2f('0x1d')](function(_0x5bac11){if(_0x5bac11){logger[_0xeb2f('0x1e')]('Ticket\x20created!');logger[_0xeb2f('0x1e')](_0xeb2f('0x4e'),_0x5bac11['id']);}})[_0xeb2f('0x52')](function(_0x509f0b){logger[_0xeb2f('0x5b')]('['+_0x5e9717[_0xeb2f('0x5d')]['toUpperCase']()+']',JSON[_0xeb2f('0x53')](_0x509f0b));});}; \ No newline at end of file diff --git a/server/services/ami/trigger/integration/freshsales.js b/server/services/ami/trigger/integration/freshsales.js index e56df3b..0e7d644 100644 --- a/server/services/ami/trigger/integration/freshsales.js +++ b/server/services/ami/trigger/integration/freshsales.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x8f95=['adminEmail','adminId','info','Admin\x20found:','Requested\x20Resource\x20not\x20Found','catch','error','message','Getting\x20user\x20list','users','agentEmail','userEmail','userId','Admin\x20selected','toUpperCase','/api/lookup?q=','&entities=contact','find','contacts','format','Searching\x20contact\x20with\x20phone\x20%s','mobile_number','endUserId','work_number','contactNumber','Contact\x20found\x20work_number:','Contact\x20created:','POST','YYYY-MM-DDTHH:mm:ss','contact','Creating\x20new\x20task','/api/tasks','getString','Descriptions','Contact','add','ticketId','task','Task\x20created:','/contacts/','emit','trigger:browser:url','Token\x20token=','apiKey','remoteUri','stripTrailingSlash','serverUrl','username','toLowerCase','destcalleridnum','calleridnum','callDirection','queue','unmanaged','outbound','uniqueid','monitor_format','[QUEUE]','Recording\x20is\x20enabled!','recordingURL','recordingFormat','none','[OUTBOUND]','The\x20ticket\x20ID\x20is:\x20%s','Displaying\x20task\x20in\x20a\x20new\x20tab...','inspect','lodash','request-promise','md5','util','./util','../../../../config/logger','redis','localhost','GET','/api/selector/owners','headers','then','length','email'];(function(_0x28b4da,_0x4c4fd2){var _0x470027=function(_0x5ce3c7){while(--_0x5ce3c7){_0x28b4da['push'](_0x28b4da['shift']());}};_0x470027(++_0x4c4fd2);}(_0x8f95,0x1d2));var _0x58f9=function(_0x3afa83,_0x90fc0c){_0x3afa83=_0x3afa83-0x0;var _0x4adf4=_0x8f95[_0x3afa83];return _0x4adf4;};'use strict';var _=require(_0x58f9('0x0'));var rp=require(_0x58f9('0x1'));var md5=require(_0x58f9('0x2'));var util=require(_0x58f9('0x3'));var moment=require('moment');var Promise=require('bluebird');var Redis=require('ioredis');var intUtil=require(_0x58f9('0x4'));var config=require('../../../../config/environment');var logger=require(_0x58f9('0x5'))('freshsales');config[_0x58f9('0x6')]=_['defaults'](config[_0x58f9('0x6')],{'host':_0x58f9('0x7'),'port':0x18eb});var io=require('socket.io-emitter')(new Redis(config[_0x58f9('0x6')]));function getAdminId(_0x1c1c00,_0x2bc2b5,_0xeb8ac6,_0xc5b967){return new Promise(function(_0x569994,_0x59ed9d){var _0x20f2c8=![];var _0x55ed96={'method':_0x58f9('0x8'),'uri':_0xc5b967+_0x58f9('0x9'),'json':!![]};_0x55ed96[_0x58f9('0xa')]=_0xeb8ac6;logger['info']('Getting\x20admin\x20information');return rp(_0x55ed96)[_0x58f9('0xb')](function(_0x2670ac){if(_0x2670ac){var _0xfc83ad=_0x2670ac['users'];var _0x31a05a=null;for(_0x31a05a=0x0;_0x31a05a<_0xfc83ad[_0x58f9('0xc')];_0x31a05a++){if(_0xfc83ad[_0x31a05a][_0x58f9('0xd')]===_0x1c1c00[_0x58f9('0xe')]){_0x1c1c00[_0x58f9('0xf')]=_0xfc83ad[_0x31a05a]['id'];_0x20f2c8=!![];}}if(_0x20f2c8){logger[_0x58f9('0x10')](_0x58f9('0x11'),_0x1c1c00[_0x58f9('0xf')]);_0x569994(_0x1c1c00);}else{_0x59ed9d({'statusCode':0x194,'message':'Requested\x20Resource\x20not\x20Found'});}}else{_0x59ed9d({'statusCode':0x194,'message':_0x58f9('0x12')});}})[_0x58f9('0x13')](function(_0xcbc1a1){logger[_0x58f9('0x14')]('['+[_0x2bc2b5['toUpperCase']()]+']',_0xcbc1a1[_0x58f9('0x15')]);_0x59ed9d(_0xcbc1a1);});});}function getUser(_0x28a749,_0x37e01b,_0x9eab39){return function(_0xd86295){return new Promise(function(_0x29871e,_0x17ad1d){var _0x55cd84={'method':_0x58f9('0x8'),'uri':_0x9eab39+'/api/selector/owners','json':!![]};_0x55cd84[_0x58f9('0xa')]=_0x37e01b;logger[_0x58f9('0x10')](_0x58f9('0x16'));return rp(_0x55cd84)['then'](function(_0x5eadca){if(_0x5eadca){var _0x323206=_0x5eadca[_0x58f9('0x17')];var _0xc4468f=![];var _0x30daf9=null;if(_0xd86295['agentEmail']!==null){logger[_0x58f9('0x10')]('Getting\x20user\x20with\x20email',_0xd86295[_0x58f9('0x18')]);_0xd86295[_0x58f9('0x19')]=_0xd86295['agentEmail'];for(_0x30daf9=0x0;_0x30daf9<_0x323206[_0x58f9('0xc')];_0x30daf9++){if(_0x323206[_0x30daf9][_0x58f9('0xd')]===_0xd86295[_0x58f9('0x18')]){_0xc4468f=!![];_0xd86295[_0x58f9('0x1a')]=_0x323206[_0x30daf9]['id'];logger[_0x58f9('0x10')]('User\x20found:',_0xd86295['userId']);}}}if(!_0xc4468f){logger['info'](_0x58f9('0x1b'));_0xd86295[_0x58f9('0x19')]=_0xd86295[_0x58f9('0xe')];_0xd86295[_0x58f9('0x1a')]=_0xd86295['adminId'];_0xc4468f=!![];}if(_0xc4468f){_0x29871e(_0xd86295);}else{_0x17ad1d({'statusCode':0x194,'message':_0x58f9('0x12')});}}else{_0x17ad1d({'statusCode':0x194,'message':_0x58f9('0x12')});}})['catch'](function(_0x5d001d){logger[_0x58f9('0x14')]('['+[_0x28a749[_0x58f9('0x1c')]()]+']',_0x5d001d[_0x58f9('0x15')]);_0x17ad1d(_0x5d001d);});});};}function searchContact(_0x184047,_0x2c26ee,_0xa7df98,_0x5f4177){return new Promise(function(_0x1e48b7,_0x2b939c){var _0x19d568={'method':'GET','headers':_0x2c26ee,'uri':_0x184047+_0x58f9('0x1d')+_0x5f4177+'&f='+_0xa7df98+_0x58f9('0x1e'),'json':!![]};rp(_0x19d568)[_0x58f9('0xb')](function(_0x5d1549){var _0x45050f=_[_0x58f9('0x1f')](_0x5d1549[_0x58f9('0x20')]['contacts'],[_0xa7df98,_0x5f4177]);_0x1e48b7(_0x45050f);})[_0x58f9('0x13')](function(_0x27e932){_0x2b939c(_0x27e932);});});}function getEndUser(_0x5e70e1,_0x125c72,_0x238949){return function(_0x5b7c23){return new Promise(function(_0x58f015,_0xdc338c){logger[_0x58f9('0x10')](util[_0x58f9('0x21')](_0x58f9('0x22'),_0x5b7c23['contactNumber']));searchContact(_0x238949,_0x125c72,_0x58f9('0x23'),_0x5b7c23['contactNumber'])['then'](function(_0x4a5a7){if(_0x4a5a7){_0x5b7c23[_0x58f9('0x24')]=_0x4a5a7['id'];logger['info']('Contact\x20found\x20mobile_number:',_0x5b7c23[_0x58f9('0x24')]);return _0x58f015(_0x5b7c23);}searchContact(_0x238949,_0x125c72,_0x58f9('0x25'),_0x5b7c23[_0x58f9('0x26')])[_0x58f9('0xb')](function(_0x311277){if(_0x311277){_0x5b7c23[_0x58f9('0x24')]=_0x311277['id'];logger['info'](_0x58f9('0x27'),_0x5b7c23[_0x58f9('0x24')]);return _0x58f015(_0x5b7c23);}createEndUser(_0x5b7c23,_0x5e70e1,_0x125c72,_0x238949)[_0x58f9('0xb')](function(_0x270476){logger['info'](_0x58f9('0x28'),_0x270476[_0x58f9('0x24')]);return _0x58f015(_0x270476);});});})[_0x58f9('0x13')](function(_0x5ee9ed){_0xdc338c(_0x5ee9ed);});});};}function createEndUser(_0x4e02a4,_0x224cd1,_0x49468b,_0x36aaf4){return new Promise(function(_0x2ffee5,_0x399fa0){var _0x502f0b=moment();var _0xeb4726={'method':_0x58f9('0x29'),'uri':_0x36aaf4+'/api/contacts','body':{'contact':{'last_name':_0x4e02a4[_0x58f9('0x26')],'work_number':_0x4e02a4[_0x58f9('0x26')],'mobile_number':_0x4e02a4[_0x58f9('0x26')],'owner_id':_0x4e02a4['userId'],'created_at':_0x502f0b[_0x58f9('0x21')](_0x58f9('0x2a'))}},'json':!![]};_0xeb4726[_0x58f9('0xa')]=_0x49468b;logger[_0x58f9('0x10')]('Contact\x20not\x20found,\x20creating\x20a\x20new\x20contact');return rp(_0xeb4726)['then'](function(_0x19d07f){_0x4e02a4[_0x58f9('0x24')]=_0x19d07f[_0x58f9('0x2b')]['id'];_0x2ffee5(_0x4e02a4);})['catch'](function(_0xfa1155){logger[_0x58f9('0x14')]('['+[_0x224cd1[_0x58f9('0x1c')]()]+']',_0xfa1155[_0x58f9('0x15')]);_0x399fa0(_0xfa1155[_0x58f9('0x15')]);});});}function getTicket(_0x468f6f,_0x3926fa,_0xd8daf8,_0x5bc4d3,_0x2d16fe){return function(_0xc7a817){logger['info'](_0x58f9('0x2c'));return new Promise(function(_0x26b9b5,_0x31dc4a){var _0x3f2bf0=moment();var _0x187fab={'method':_0x58f9('0x29'),'uri':_0xd8daf8+_0x58f9('0x2d'),'body':{'title':intUtil[_0x58f9('0x2e')](_0x5bc4d3['Subjects'],_0x2d16fe,'\x20'),'description':intUtil['getString'](_0x5bc4d3[_0x58f9('0x2f')],_0x2d16fe,'\x0a'),'owner_id':_0xc7a817[_0x58f9('0x1a')],'creater_id':_0xc7a817[_0x58f9('0xf')],'targetable_id':_0xc7a817[_0x58f9('0x24')],'targetable_type':_0x58f9('0x30'),'created_at':_0x3f2bf0[_0x58f9('0x21')]('YYYY-MM-DDTHH:mm:ss'),'due_date':_0x3f2bf0[_0x58f9('0x31')](0x1e,'m')['format'](_0x58f9('0x2a'))},'json':!![]};_0x187fab[_0x58f9('0xa')]=_0x3926fa;return rp(_0x187fab)[_0x58f9('0xb')](function(_0x96870f){_0xc7a817[_0x58f9('0x32')]=_0x96870f[_0x58f9('0x33')]['id'];logger[_0x58f9('0x10')](_0x58f9('0x34'),_0xc7a817[_0x58f9('0x32')]);_0x26b9b5(_0xc7a817);})[_0x58f9('0x13')](function(_0x360bc4){logger[_0x58f9('0x14')]('['+[_0x468f6f['toUpperCase']()]+']',_0x360bc4[_0x58f9('0x15')]);_0x31dc4a(_0x360bc4[_0x58f9('0x15')]);});});};}function emit(_0x58f37b,_0x4f90f6,_0x4cca98){var _0x5a86dd={'uri':_0x58f37b+_0x58f9('0x35')+_0x4cca98};io['to'](util[_0x58f9('0x21')]('user:%s',_0x4f90f6))[_0x58f9('0x36')](_0x58f9('0x37'),_0x5a86dd);}exports['cs']=function(_0x45475f,_0x555832,_0x1c10cb,_0x2a63e7,_0x4f4098,_0x5ec1ac,_0x1a7d2f,_0x3ac83a){var _0x3bb115={};var _0x3b0b6e={'Authorization':_0x58f9('0x38')+_0x5ec1ac[_0x58f9('0x39')]};_0x5ec1ac[_0x58f9('0x3a')]=intUtil[_0x58f9('0x3b')](_0x5ec1ac['remoteUri']);_0x5ec1ac[_0x58f9('0x3c')]=intUtil['stripTrailingSlash'](_0x5ec1ac[_0x58f9('0x3c')]);var _0x2c6b99=_0x5ec1ac[_0x58f9('0x3a')];_0x3bb115[_0x58f9('0xe')]=_0x5ec1ac[_0x58f9('0x3d')];_0x3bb115[_0x58f9('0x26')]=_0x3ac83a[_0x58f9('0x3e')]()==='outbound'?_0x555832[_0x58f9('0x3f')]:_0x555832[_0x58f9('0x40')];_0x3bb115[_0x58f9('0x41')]=_0x3ac83a===_0x58f9('0x42')||_0x3ac83a===_0x58f9('0x43')?_0x58f9('0x42'):_0x58f9('0x44');if(_0x2a63e7){_0x3bb115[_0x58f9('0x18')]=_0x2a63e7[_0x58f9('0xd')];}var _0x23ee57=util[_0x58f9('0x21')]('%s/api/voice/recordings/%s/downloads?type=uniqueid&token=%s',_0x5ec1ac['serverUrl'],_0x555832['uniqueid'],md5(_0x555832[_0x58f9('0x45')]));if(_0x4f4098&&_0x4f4098[_0x58f9('0x46')]){logger['info'](_0x58f9('0x47'),_0x58f9('0x48'));_0x555832[_0x58f9('0x49')]=_0x23ee57;}else if(_0x1a7d2f&&_0x1a7d2f[_0x58f9('0x4a')]&&_0x1a7d2f[_0x58f9('0x4a')]!==_0x58f9('0x4b')){logger[_0x58f9('0x10')](_0x58f9('0x4c'),_0x58f9('0x48'));_0x555832[_0x58f9('0x49')]=_0x23ee57;}else{_0x555832[_0x58f9('0x49')]='';}return getAdminId(_0x3bb115,_0x3ac83a,_0x3b0b6e,_0x2c6b99)[_0x58f9('0xb')](getUser(_0x3ac83a,_0x3b0b6e,_0x2c6b99))[_0x58f9('0xb')](getEndUser(_0x3ac83a,_0x3b0b6e,_0x2c6b99))[_0x58f9('0xb')](getTicket(_0x3ac83a,_0x3b0b6e,_0x2c6b99,_0x1c10cb,_0x555832))['then'](function(_0xc346a2){logger[_0x58f9('0x10')](util['format'](_0x58f9('0x4d'),_0xc346a2['ticketId']));if(_0x3ac83a!==_0x58f9('0x43')){logger[_0x58f9('0x10')]('['+[_0x3ac83a[_0x58f9('0x1c')]()]+']',_0x58f9('0x4e'));emit(_0x2c6b99,_0x2a63e7['name'],_0xc346a2['endUserId']);}})[_0x58f9('0x13')](function(_0x2df8ad){logger[_0x58f9('0x14')]('['+[_0x3ac83a['toUpperCase']()]+']\x20Error\x20running\x20Freshsales\x20integration',util[_0x58f9('0x4f')](_0x2df8ad,{'showHidden':!![],'depth':null}));});}; \ No newline at end of file +var _0xd43b=['contactNumber','YYYY-MM-DDTHH:mm:ss','contact','getString','Descriptions','Contact','add','ticketId','task','Task\x20created:','/contacts/','user:%s','emit','trigger:browser:url','Token\x20token=','apiKey','remoteUri','stripTrailingSlash','serverUrl','username','toLowerCase','outbound','calleridnum','queue','unmanaged','%s/api/voice/recordings/%s/downloads?type=uniqueid&token=%s','uniqueid','monitor_format','[QUEUE]','Recording\x20is\x20enabled!','recordingURL','recordingFormat','none','The\x20ticket\x20ID\x20is:\x20%s',']\x20Error\x20running\x20Freshsales\x20integration','inspect','md5','util','moment','bluebird','ioredis','./util','../../../../config/environment','redis','localhost','socket.io-emitter','GET','headers','info','Getting\x20admin\x20information','then','users','adminId','Admin\x20found:','Requested\x20Resource\x20not\x20Found','catch','error','toUpperCase','message','/api/selector/owners','Getting\x20user\x20list','agentEmail','Getting\x20user\x20with\x20email','userEmail','length','email','userId','User\x20found:','Admin\x20selected','/api/lookup?q=','find','contacts','format','Searching\x20contact\x20with\x20phone\x20%s','mobile_number','Contact\x20found\x20mobile_number:','endUserId','work_number','Contact\x20found\x20work_number:','Contact\x20created:','POST','/api/contacts'];(function(_0x2ffa17,_0x35b3a8){var _0x3a783b=function(_0x16d13d){while(--_0x16d13d){_0x2ffa17['push'](_0x2ffa17['shift']());}};_0x3a783b(++_0x35b3a8);}(_0xd43b,0x76));var _0xbd43=function(_0x428355,_0x26c4d5){_0x428355=_0x428355-0x0;var _0x4e0aa7=_0xd43b[_0x428355];return _0x4e0aa7;};'use strict';var _=require('lodash');var rp=require('request-promise');var md5=require(_0xbd43('0x0'));var util=require(_0xbd43('0x1'));var moment=require(_0xbd43('0x2'));var Promise=require(_0xbd43('0x3'));var Redis=require(_0xbd43('0x4'));var intUtil=require(_0xbd43('0x5'));var config=require(_0xbd43('0x6'));var logger=require('../../../../config/logger')('freshsales');config[_0xbd43('0x7')]=_['defaults'](config[_0xbd43('0x7')],{'host':_0xbd43('0x8'),'port':0x18eb});var io=require(_0xbd43('0x9'))(new Redis(config[_0xbd43('0x7')]));function getAdminId(_0x5965a0,_0x520eba,_0x313b74,_0x3b2039){return new Promise(function(_0xe5c66a,_0x27f15f){var _0x4b5e99=![];var _0x1ecb8a={'method':_0xbd43('0xa'),'uri':_0x3b2039+'/api/selector/owners','json':!![]};_0x1ecb8a[_0xbd43('0xb')]=_0x313b74;logger[_0xbd43('0xc')](_0xbd43('0xd'));return rp(_0x1ecb8a)[_0xbd43('0xe')](function(_0x4898c7){if(_0x4898c7){var _0x522631=_0x4898c7[_0xbd43('0xf')];var _0x4073f6=null;for(_0x4073f6=0x0;_0x4073f6<_0x522631['length'];_0x4073f6++){if(_0x522631[_0x4073f6]['email']===_0x5965a0['adminEmail']){_0x5965a0[_0xbd43('0x10')]=_0x522631[_0x4073f6]['id'];_0x4b5e99=!![];}}if(_0x4b5e99){logger[_0xbd43('0xc')](_0xbd43('0x11'),_0x5965a0[_0xbd43('0x10')]);_0xe5c66a(_0x5965a0);}else{_0x27f15f({'statusCode':0x194,'message':'Requested\x20Resource\x20not\x20Found'});}}else{_0x27f15f({'statusCode':0x194,'message':_0xbd43('0x12')});}})[_0xbd43('0x13')](function(_0x1ef4a0){logger[_0xbd43('0x14')]('['+[_0x520eba[_0xbd43('0x15')]()]+']',_0x1ef4a0[_0xbd43('0x16')]);_0x27f15f(_0x1ef4a0);});});}function getUser(_0x47b1e6,_0x462a84,_0x5a008c){return function(_0x5a79cf){return new Promise(function(_0x58a051,_0x18bb9f){var _0x4dfc5d={'method':_0xbd43('0xa'),'uri':_0x5a008c+_0xbd43('0x17'),'json':!![]};_0x4dfc5d[_0xbd43('0xb')]=_0x462a84;logger[_0xbd43('0xc')](_0xbd43('0x18'));return rp(_0x4dfc5d)[_0xbd43('0xe')](function(_0x3b4801){if(_0x3b4801){var _0x4270f7=_0x3b4801[_0xbd43('0xf')];var _0x3b5c60=![];var _0xdde2ec=null;if(_0x5a79cf[_0xbd43('0x19')]!==null){logger[_0xbd43('0xc')](_0xbd43('0x1a'),_0x5a79cf[_0xbd43('0x19')]);_0x5a79cf[_0xbd43('0x1b')]=_0x5a79cf[_0xbd43('0x19')];for(_0xdde2ec=0x0;_0xdde2ec<_0x4270f7[_0xbd43('0x1c')];_0xdde2ec++){if(_0x4270f7[_0xdde2ec][_0xbd43('0x1d')]===_0x5a79cf['agentEmail']){_0x3b5c60=!![];_0x5a79cf[_0xbd43('0x1e')]=_0x4270f7[_0xdde2ec]['id'];logger[_0xbd43('0xc')](_0xbd43('0x1f'),_0x5a79cf[_0xbd43('0x1e')]);}}}if(!_0x3b5c60){logger['info'](_0xbd43('0x20'));_0x5a79cf['userEmail']=_0x5a79cf['adminEmail'];_0x5a79cf[_0xbd43('0x1e')]=_0x5a79cf[_0xbd43('0x10')];_0x3b5c60=!![];}if(_0x3b5c60){_0x58a051(_0x5a79cf);}else{_0x18bb9f({'statusCode':0x194,'message':_0xbd43('0x12')});}}else{_0x18bb9f({'statusCode':0x194,'message':_0xbd43('0x12')});}})['catch'](function(_0x565066){logger[_0xbd43('0x14')]('['+[_0x47b1e6[_0xbd43('0x15')]()]+']',_0x565066[_0xbd43('0x16')]);_0x18bb9f(_0x565066);});});};}function searchContact(_0x4606e1,_0x498786,_0xd9ba9d,_0x2e1624){return new Promise(function(_0x1d5f75,_0x183e0c){var _0x57af9a={'method':_0xbd43('0xa'),'headers':_0x498786,'uri':_0x4606e1+_0xbd43('0x21')+_0x2e1624+'&f='+_0xd9ba9d+'&entities=contact','json':!![]};rp(_0x57af9a)[_0xbd43('0xe')](function(_0x42d3de){var _0x2ec369=_[_0xbd43('0x22')](_0x42d3de['contacts'][_0xbd43('0x23')],[_0xd9ba9d,_0x2e1624]);_0x1d5f75(_0x2ec369);})[_0xbd43('0x13')](function(_0x2f823d){_0x183e0c(_0x2f823d);});});}function getEndUser(_0x52e771,_0xc8b2a3,_0x15dd31){return function(_0x3452d0){return new Promise(function(_0xdf74b5,_0x48cb71){logger['info'](util[_0xbd43('0x24')](_0xbd43('0x25'),_0x3452d0['contactNumber']));searchContact(_0x15dd31,_0xc8b2a3,_0xbd43('0x26'),_0x3452d0['contactNumber'])['then'](function(_0x3a952e){if(_0x3a952e){_0x3452d0['endUserId']=_0x3a952e['id'];logger[_0xbd43('0xc')](_0xbd43('0x27'),_0x3452d0[_0xbd43('0x28')]);return _0xdf74b5(_0x3452d0);}searchContact(_0x15dd31,_0xc8b2a3,_0xbd43('0x29'),_0x3452d0['contactNumber'])[_0xbd43('0xe')](function(_0x3d6800){if(_0x3d6800){_0x3452d0[_0xbd43('0x28')]=_0x3d6800['id'];logger['info'](_0xbd43('0x2a'),_0x3452d0[_0xbd43('0x28')]);return _0xdf74b5(_0x3452d0);}createEndUser(_0x3452d0,_0x52e771,_0xc8b2a3,_0x15dd31)[_0xbd43('0xe')](function(_0x484218){logger[_0xbd43('0xc')](_0xbd43('0x2b'),_0x484218[_0xbd43('0x28')]);return _0xdf74b5(_0x484218);});});})[_0xbd43('0x13')](function(_0x38fc57){_0x48cb71(_0x38fc57);});});};}function createEndUser(_0x1b90d0,_0x3a02dc,_0xd36434,_0x28578d){return new Promise(function(_0x40b2ee,_0xef0c8b){var _0x13ee77=moment();var _0x3a3b95={'method':_0xbd43('0x2c'),'uri':_0x28578d+_0xbd43('0x2d'),'body':{'contact':{'last_name':_0x1b90d0['contactNumber'],'work_number':_0x1b90d0[_0xbd43('0x2e')],'mobile_number':_0x1b90d0['contactNumber'],'owner_id':_0x1b90d0['userId'],'created_at':_0x13ee77[_0xbd43('0x24')](_0xbd43('0x2f'))}},'json':!![]};_0x3a3b95['headers']=_0xd36434;logger[_0xbd43('0xc')]('Contact\x20not\x20found,\x20creating\x20a\x20new\x20contact');return rp(_0x3a3b95)[_0xbd43('0xe')](function(_0x4564b1){_0x1b90d0[_0xbd43('0x28')]=_0x4564b1[_0xbd43('0x30')]['id'];_0x40b2ee(_0x1b90d0);})['catch'](function(_0x2d26a1){logger[_0xbd43('0x14')]('['+[_0x3a02dc[_0xbd43('0x15')]()]+']',_0x2d26a1[_0xbd43('0x16')]);_0xef0c8b(_0x2d26a1['message']);});});}function getTicket(_0x68a659,_0xc30763,_0x382e81,_0x136fd8,_0x558bba){return function(_0xc82a4c){logger['info']('Creating\x20new\x20task');return new Promise(function(_0x461436,_0x2b16b4){var _0x349686=moment();var _0x3757d6={'method':'POST','uri':_0x382e81+'/api/tasks','body':{'title':intUtil[_0xbd43('0x31')](_0x136fd8['Subjects'],_0x558bba,'\x20'),'description':intUtil[_0xbd43('0x31')](_0x136fd8[_0xbd43('0x32')],_0x558bba,'\x0a'),'owner_id':_0xc82a4c[_0xbd43('0x1e')],'creater_id':_0xc82a4c[_0xbd43('0x10')],'targetable_id':_0xc82a4c[_0xbd43('0x28')],'targetable_type':_0xbd43('0x33'),'created_at':_0x349686[_0xbd43('0x24')](_0xbd43('0x2f')),'due_date':_0x349686[_0xbd43('0x34')](0x1e,'m')['format'](_0xbd43('0x2f'))},'json':!![]};_0x3757d6[_0xbd43('0xb')]=_0xc30763;return rp(_0x3757d6)[_0xbd43('0xe')](function(_0x41a3d8){_0xc82a4c[_0xbd43('0x35')]=_0x41a3d8[_0xbd43('0x36')]['id'];logger[_0xbd43('0xc')](_0xbd43('0x37'),_0xc82a4c['ticketId']);_0x461436(_0xc82a4c);})['catch'](function(_0x4f2526){logger[_0xbd43('0x14')]('['+[_0x68a659[_0xbd43('0x15')]()]+']',_0x4f2526[_0xbd43('0x16')]);_0x2b16b4(_0x4f2526[_0xbd43('0x16')]);});});};}function emit(_0x251aa9,_0x565aaf,_0x45c77c){var _0x94bb4d={'uri':_0x251aa9+_0xbd43('0x38')+_0x45c77c};io['to'](util[_0xbd43('0x24')](_0xbd43('0x39'),_0x565aaf))[_0xbd43('0x3a')](_0xbd43('0x3b'),_0x94bb4d);}exports['cs']=function(_0x442e85,_0x2dce48,_0x594862,_0x442ea9,_0x52c2eb,_0x2dbc39,_0x491062,_0x1f3807){var _0x236c3e={};var _0x20bad3={'Authorization':_0xbd43('0x3c')+_0x2dbc39[_0xbd43('0x3d')]};_0x2dbc39[_0xbd43('0x3e')]=intUtil[_0xbd43('0x3f')](_0x2dbc39[_0xbd43('0x3e')]);_0x2dbc39[_0xbd43('0x40')]=intUtil[_0xbd43('0x3f')](_0x2dbc39[_0xbd43('0x40')]);var _0x11ccfc=_0x2dbc39[_0xbd43('0x3e')];_0x236c3e['adminEmail']=_0x2dbc39[_0xbd43('0x41')];_0x236c3e[_0xbd43('0x2e')]=_0x1f3807[_0xbd43('0x42')]()===_0xbd43('0x43')?_0x2dce48['destcalleridnum']:_0x2dce48[_0xbd43('0x44')];_0x236c3e['callDirection']=_0x1f3807===_0xbd43('0x45')||_0x1f3807===_0xbd43('0x46')?'queue':_0xbd43('0x43');if(_0x442ea9){_0x236c3e[_0xbd43('0x19')]=_0x442ea9[_0xbd43('0x1d')];}var _0x1c28ec=util[_0xbd43('0x24')](_0xbd43('0x47'),_0x2dbc39[_0xbd43('0x40')],_0x2dce48[_0xbd43('0x48')],md5(_0x2dce48['uniqueid']));if(_0x52c2eb&&_0x52c2eb[_0xbd43('0x49')]){logger['info'](_0xbd43('0x4a'),_0xbd43('0x4b'));_0x2dce48[_0xbd43('0x4c')]=_0x1c28ec;}else if(_0x491062&&_0x491062['recordingFormat']&&_0x491062[_0xbd43('0x4d')]!==_0xbd43('0x4e')){logger[_0xbd43('0xc')]('[OUTBOUND]',_0xbd43('0x4b'));_0x2dce48[_0xbd43('0x4c')]=_0x1c28ec;}else{_0x2dce48[_0xbd43('0x4c')]='';}return getAdminId(_0x236c3e,_0x1f3807,_0x20bad3,_0x11ccfc)[_0xbd43('0xe')](getUser(_0x1f3807,_0x20bad3,_0x11ccfc))[_0xbd43('0xe')](getEndUser(_0x1f3807,_0x20bad3,_0x11ccfc))[_0xbd43('0xe')](getTicket(_0x1f3807,_0x20bad3,_0x11ccfc,_0x594862,_0x2dce48))['then'](function(_0x4093fb){logger[_0xbd43('0xc')](util['format'](_0xbd43('0x4f'),_0x4093fb['ticketId']));if(_0x1f3807!==_0xbd43('0x46')){logger[_0xbd43('0xc')]('['+[_0x1f3807['toUpperCase']()]+']','Displaying\x20task\x20in\x20a\x20new\x20tab...');emit(_0x11ccfc,_0x442ea9['name'],_0x4093fb[_0xbd43('0x28')]);}})[_0xbd43('0x13')](function(_0xc5cdcc){logger[_0xbd43('0x14')]('['+[_0x1f3807[_0xbd43('0x15')]()]+_0xbd43('0x50'),util[_0xbd43('0x51')](_0xc5cdcc,{'showHidden':!![],'depth':null}));});}; \ No newline at end of file diff --git a/server/services/ami/trigger/integration/index.js b/server/services/ami/trigger/integration/index.js index ce20015..09a82bd 100644 --- a/server/services/ami/trigger/integration/index.js +++ b/server/services/ami/trigger/integration/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x0362=['./desk','./freshsales','zendesk','salesforce','sugarcrm','freshdesk','zoho','vtiger','freshsales','servicenow','exec','includes','data1','toLowerCase','data2','find','Configurations','data3','queue','routeId','log','EVENT\x20UNKNOWN','desk','dynamics365','unknown\x20integration','../../../../config/logger','error','[EXEC]','format','%s\x20configuration\x20#%s\x20not\x20found','util','./zendesk','./salesforce','./sugarcrm','./zoho'];(function(_0x2801c4,_0x3e03f7){var _0x4b16ec=function(_0x223f0b){while(--_0x223f0b){_0x2801c4['push'](_0x2801c4['shift']());}};_0x4b16ec(++_0x3e03f7);}(_0x0362,0x1e5));var _0x2036=function(_0x39efa5,_0x36b923){_0x39efa5=_0x39efa5-0x0;var _0x56e814=_0x0362[_0x39efa5];return _0x56e814;};'use strict';var _=require('lodash');var util=require(_0x2036('0x0'));var zendesk=require(_0x2036('0x1'));var salesforce=require(_0x2036('0x2'));var sugarcrm=require(_0x2036('0x3'));var freshdesk=require('./freshdesk');var zoho=require(_0x2036('0x4'));var desk=require(_0x2036('0x5'));var vtiger=require('./vtiger');var servicenow=require('./servicenow');var dynamics365=require('./dynamics365');var freshsales=require(_0x2036('0x6'));var integrations=[_0x2036('0x7'),_0x2036('0x8'),_0x2036('0x9'),_0x2036('0xa'),_0x2036('0xb'),'desk',_0x2036('0xc'),'dynamics365',_0x2036('0xd'),_0x2036('0xe')];exports[_0x2036('0xf')]=function(_0x27b583,_0x281e5d,_0x34e8d8,_0x2dff2d,_0x5b84fe,_0x46a681){if(_0x34e8d8){if(_[_0x2036('0x10')](integrations,_0x27b583[_0x2036('0x11')]['toLowerCase']())){try{var _0x41c41b=null;var _0x2e49bb='';var _0x2b6a3b=_0x34e8d8[_0x27b583[_0x2036('0x11')][_0x2036('0x12')]()];if(_0x2b6a3b){var _0x401940=_0x2b6a3b[_0x27b583[_0x2036('0x13')]];if(_0x401940){var _0x2b7350=_[_0x2036('0x14')](_0x401940[_0x2036('0x15')],{'id':parseInt(_0x27b583[_0x2036('0x16')],0xa)});if(_0x2b7350){if(_0x2dff2d){if(_0x5b84fe&&_0x281e5d[_0x2036('0x17')]){_0x2e49bb=_0x2036('0x17');}else if(_0x281e5d[_0x2036('0x18')]){_0x2e49bb='outbound';}else{console[_0x2036('0x19')](_0x2036('0x1a'),_0x281e5d);}}else{_0x2e49bb='unmanaged';}switch(_0x27b583[_0x2036('0x11')]['toLowerCase']()){case _0x2036('0x7'):zendesk[_0x2e49bb](_0x27b583,_0x281e5d,_0x2b7350,_0x2dff2d,_0x5b84fe,_0x401940,_0x46a681);break;case'salesforce':salesforce[_0x2e49bb](_0x27b583,_0x281e5d,_0x2b7350,_0x2dff2d,_0x5b84fe,_0x401940,_0x46a681);break;case _0x2036('0x9'):sugarcrm[_0x2e49bb](_0x27b583,_0x281e5d,_0x2b7350,_0x2dff2d,_0x5b84fe,_0x401940,_0x46a681);break;case'freshdesk':freshdesk[_0x2e49bb](_0x27b583,_0x281e5d,_0x2b7350,_0x2dff2d,_0x5b84fe,_0x401940,_0x46a681);break;case _0x2036('0xb'):zoho[_0x2e49bb](_0x27b583,_0x281e5d,_0x2b7350,_0x2dff2d,_0x5b84fe,_0x401940,_0x46a681);break;case _0x2036('0x1b'):desk[_0x2e49bb](_0x27b583,_0x281e5d,_0x2b7350,_0x2dff2d,_0x5b84fe,_0x401940,_0x46a681);break;case _0x2036('0xc'):vtiger[_0x2e49bb](_0x27b583,_0x281e5d,_0x2b7350,_0x2dff2d,_0x5b84fe,_0x401940,_0x46a681);break;case'freshsales':freshsales['cs'](_0x27b583,_0x281e5d,_0x2b7350,_0x2dff2d,_0x5b84fe,_0x401940,_0x46a681,_0x2e49bb);break;case _0x2036('0xe'):servicenow['cs'](_0x27b583,_0x281e5d,_0x2b7350,_0x2dff2d,_0x5b84fe,_0x401940,_0x46a681,_0x2e49bb);break;case _0x2036('0x1c'):dynamics365['cs'](_0x27b583,_0x281e5d,_0x2b7350,_0x2dff2d,_0x5b84fe,_0x401940,_0x46a681,_0x2e49bb);break;default:console[_0x2036('0x19')](_0x2036('0x1d'));}}else{_0x41c41b=require(_0x2036('0x1e'))(_0x27b583[_0x2036('0x11')][_0x2036('0x12')]());_0x41c41b[_0x2036('0x1f')](_0x2036('0x20'),util[_0x2036('0x21')](_0x2036('0x22'),_0x27b583['data1']['toLowerCase'](),_0x27b583[_0x2036('0x16')]));}}else{_0x41c41b=require('../../../../config/logger')(_0x27b583['data1'][_0x2036('0x12')]());_0x41c41b[_0x2036('0x1f')]('[EXEC]',util[_0x2036('0x21')]('%s\x20account\x20#%s\x20not\x20found',_0x27b583['data1'][_0x2036('0x12')](),_0x27b583['data2']));}}else{}}catch(_0x56c376){console['error'](_0x56c376);}}}}; \ No newline at end of file +var _0xe336=['routeId','outbound','log','unmanaged','zendesk','freshdesk','zoho','desk','unknown\x20integration','../../../../config/logger','error','[EXEC]','%s\x20configuration\x20#%s\x20not\x20found','format','%s\x20account\x20#%s\x20not\x20found','./zendesk','./sugarcrm','./freshdesk','./zoho','./desk','./vtiger','./dynamics365','salesforce','sugarcrm','vtiger','freshsales','servicenow','exec','includes','data1','toLowerCase','data2','find','Configurations','data3','queue'];(function(_0x34021d,_0x753aa6){var _0x16597b=function(_0x2d040a){while(--_0x2d040a){_0x34021d['push'](_0x34021d['shift']());}};_0x16597b(++_0x753aa6);}(_0xe336,0x153));var _0x6e33=function(_0x2ae8fa,_0x976ed5){_0x2ae8fa=_0x2ae8fa-0x0;var _0x2b6095=_0xe336[_0x2ae8fa];return _0x2b6095;};'use strict';var _=require('lodash');var util=require('util');var zendesk=require(_0x6e33('0x0'));var salesforce=require('./salesforce');var sugarcrm=require(_0x6e33('0x1'));var freshdesk=require(_0x6e33('0x2'));var zoho=require(_0x6e33('0x3'));var desk=require(_0x6e33('0x4'));var vtiger=require(_0x6e33('0x5'));var servicenow=require('./servicenow');var dynamics365=require(_0x6e33('0x6'));var freshsales=require('./freshsales');var integrations=['zendesk',_0x6e33('0x7'),_0x6e33('0x8'),'freshdesk','zoho','desk',_0x6e33('0x9'),'dynamics365',_0x6e33('0xa'),_0x6e33('0xb')];exports[_0x6e33('0xc')]=function(_0x499874,_0x4fd809,_0x33030e,_0x3eedcb,_0x4c8ad3,_0x51bf37){if(_0x33030e){if(_[_0x6e33('0xd')](integrations,_0x499874[_0x6e33('0xe')][_0x6e33('0xf')]())){try{var _0x49cd72=null;var _0x34702d='';var _0x37a5e8=_0x33030e[_0x499874[_0x6e33('0xe')][_0x6e33('0xf')]()];if(_0x37a5e8){var _0xcec5cd=_0x37a5e8[_0x499874[_0x6e33('0x10')]];if(_0xcec5cd){var _0x153ac4=_[_0x6e33('0x11')](_0xcec5cd[_0x6e33('0x12')],{'id':parseInt(_0x499874[_0x6e33('0x13')],0xa)});if(_0x153ac4){if(_0x3eedcb){if(_0x4c8ad3&&_0x4fd809[_0x6e33('0x14')]){_0x34702d=_0x6e33('0x14');}else if(_0x4fd809[_0x6e33('0x15')]){_0x34702d=_0x6e33('0x16');}else{console[_0x6e33('0x17')]('EVENT\x20UNKNOWN',_0x4fd809);}}else{_0x34702d=_0x6e33('0x18');}switch(_0x499874[_0x6e33('0xe')][_0x6e33('0xf')]()){case _0x6e33('0x19'):zendesk[_0x34702d](_0x499874,_0x4fd809,_0x153ac4,_0x3eedcb,_0x4c8ad3,_0xcec5cd,_0x51bf37);break;case _0x6e33('0x7'):salesforce[_0x34702d](_0x499874,_0x4fd809,_0x153ac4,_0x3eedcb,_0x4c8ad3,_0xcec5cd,_0x51bf37);break;case'sugarcrm':sugarcrm[_0x34702d](_0x499874,_0x4fd809,_0x153ac4,_0x3eedcb,_0x4c8ad3,_0xcec5cd,_0x51bf37);break;case _0x6e33('0x1a'):freshdesk[_0x34702d](_0x499874,_0x4fd809,_0x153ac4,_0x3eedcb,_0x4c8ad3,_0xcec5cd,_0x51bf37);break;case _0x6e33('0x1b'):zoho[_0x34702d](_0x499874,_0x4fd809,_0x153ac4,_0x3eedcb,_0x4c8ad3,_0xcec5cd,_0x51bf37);break;case _0x6e33('0x1c'):desk[_0x34702d](_0x499874,_0x4fd809,_0x153ac4,_0x3eedcb,_0x4c8ad3,_0xcec5cd,_0x51bf37);break;case _0x6e33('0x9'):vtiger[_0x34702d](_0x499874,_0x4fd809,_0x153ac4,_0x3eedcb,_0x4c8ad3,_0xcec5cd,_0x51bf37);break;case _0x6e33('0xa'):freshsales['cs'](_0x499874,_0x4fd809,_0x153ac4,_0x3eedcb,_0x4c8ad3,_0xcec5cd,_0x51bf37,_0x34702d);break;case _0x6e33('0xb'):servicenow['cs'](_0x499874,_0x4fd809,_0x153ac4,_0x3eedcb,_0x4c8ad3,_0xcec5cd,_0x51bf37,_0x34702d);break;case'dynamics365':dynamics365['cs'](_0x499874,_0x4fd809,_0x153ac4,_0x3eedcb,_0x4c8ad3,_0xcec5cd,_0x51bf37,_0x34702d);break;default:console[_0x6e33('0x17')](_0x6e33('0x1d'));}}else{_0x49cd72=require(_0x6e33('0x1e'))(_0x499874['data1']['toLowerCase']());_0x49cd72[_0x6e33('0x1f')](_0x6e33('0x20'),util['format'](_0x6e33('0x21'),_0x499874[_0x6e33('0xe')][_0x6e33('0xf')](),_0x499874[_0x6e33('0x13')]));}}else{_0x49cd72=require(_0x6e33('0x1e'))(_0x499874[_0x6e33('0xe')][_0x6e33('0xf')]());_0x49cd72['error'](_0x6e33('0x20'),util[_0x6e33('0x22')](_0x6e33('0x23'),_0x499874[_0x6e33('0xe')][_0x6e33('0xf')](),_0x499874[_0x6e33('0x10')]));}}else{}}catch(_0x59c69f){console['error'](_0x59c69f);}}}}; \ No newline at end of file diff --git a/server/services/ami/trigger/integration/salesforce.js b/server/services/ami/trigger/integration/salesforce.js index 2c80b9d..de121ec 100644 --- a/server/services/ami/trigger/integration/salesforce.js +++ b/server/services/ami/trigger/integration/salesforce.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xf67d=['WhoId','account','ticketType','Case','ContactId','leadId','info','Association\x20between\x20Case\x20and\x20Lead\x20skipped','sobject','isNil','find','length','Agent\x20%s\x20found.','Name','Agent\x20%s\x20not\x20found.\x20Switch\x20to\x20the\x20admin\x20account.','identity','then','resolve','user_id','display_name','Searching\x20enduser\x20with\x20phone\x20%s.\x20Serching\x20method\x20used\x20%s.','moduleSearch','contact_lead','cloneDeep','additionalSearchContact','merge','$or','Contact','execute','additionalSearchLead','Lead','account_contact_lead','additionalSearchAccount','Account','contact','first','Phone','attributes','type','toLowerCase','Enduser\x20(%s)\x20with\x20phone\x20%s\x20found','Enduser\x20with\x20phone\x20%s\x20not\x20found','moduleCreate','Enduser\x20with\x20phone\x20%s.\x20Creating\x20method\x20used\x20%s.','LastName','format','Caller\x20-\x20%s','','Company','No\x20Company','create','forEach','includes','string','idField','content','variable','toString','customVariable','Variable','name','securityToken','remoteUri','https://login.salesforce.com','clientId','clientSecret','Connection\x20established.','queue','serverUrl','stripTrailingSlash','monitor_format','[QUEUE]','uniqueid','recordingURL','email','calleridname','[QUEUE]\x20Ticket\x20%s\x20created','[QUEUE]\x20Displaying\x20ticket\x20%s\x20to\x20agent\x20%s.\x20Integration\x20account\x20type\x20%s.','user:%s','trigger:salesforce:display','newTab','%s/%s/e','instanceUrl','error','[QUEUE]\x20Salesforce\x20account\x20type\x20not\x20recognized.','catch','outbound','none','Recording\x20is\x20enabled!','destcalleridname','Fields','[OUTBOUND]\x20Ticket\x20%s\x20created.','[OUTBOUND]\x20Displaying\x20ticket\x20%s\x20to\x20agent\x20%s.\x20Integration\x20account\x20type\x20%s.','integrationTab','[OUTBOUND]','Salesforce\x20account\x20type\x20not\x20recognized','unmanaged','lastevent','toUpperCase','%s/api/voice/recordings/%s/downloads?type=uniqueid&token=%s',']\x20Ticket\x20%s\x20created.',']\x20Integration\x20account\x20type\x20%s.','lodash','request-promise','moment','bluebird','md5','ioredis','./util','../../../../config/environment','../../../../config/logger','salesforce','redis','defaults','localhost','emit','assign','getString','Descriptions','ActivityDate','endUserType','lead'];(function(_0x20a584,_0xe384a5){var _0x4b41a8=function(_0x2127c6){while(--_0x2127c6){_0x20a584['push'](_0x20a584['shift']());}};_0x4b41a8(++_0xe384a5);}(_0xf67d,0xe0));var _0xdf67=function(_0x3baef0,_0x2a2ede){_0x3baef0=_0x3baef0-0x0;var _0x5aff45=_0xf67d[_0x3baef0];return _0x5aff45;};'use strict';var _=require(_0xdf67('0x0'));var rp=require(_0xdf67('0x1'));var moment=require(_0xdf67('0x2'));var BPromise=require(_0xdf67('0x3'));var md5=require(_0xdf67('0x4'));var jsforce=require('jsforce');var util=require('util');var Redis=require(_0xdf67('0x5'));var intUtil=require(_0xdf67('0x6'));var config=require(_0xdf67('0x7'));var logger=require(_0xdf67('0x8'))(_0xdf67('0x9'));config[_0xdf67('0xa')]=_[_0xdf67('0xb')](config[_0xdf67('0xa')],{'host':_0xdf67('0xc'),'port':0x18eb});var io=require('socket.io-emitter')(new Redis(config[_0xdf67('0xa')]));function emit(_0x431b8f,_0x2599cc,_0xc9743){io['to'](_0x431b8f)[_0xdf67('0xd')](_0x2599cc,_0xc9743);}function getTicket(_0xcc7295,_0x10ed24,_0x1d9ae1,_0x40c7cc,_0x38695a,_0x3d8b23,_0xd41715,_0x24433d){var _0x12046a=Object[_0xdf67('0xe')]({},{'OwnerId':_0x10ed24['id'],'Subject':intUtil[_0xdf67('0xf')](_0x40c7cc['Subjects'],_0x38695a,'\x20'),'Description':intUtil['getString'](_0x40c7cc[_0xdf67('0x10')],_0x38695a,'\x0a')},getCustomFields(_0x3d8b23,_0x38695a));if(_0x1d9ae1){if(_0x40c7cc['ticketType']==='Task'){_0x12046a[_0xdf67('0x11')]=moment['utc']();_0x12046a['IsReminderSet']=![];_0x12046a['IsRecurrence']=![];if(_0x1d9ae1[_0xdf67('0x12')]==='contact'||_0x1d9ae1[_0xdf67('0x12')]===_0xdf67('0x13')){_0x12046a[_0xdf67('0x14')]=_0x1d9ae1['id'];}else if(_0x1d9ae1[_0xdf67('0x12')]===_0xdf67('0x15')){_0x12046a['WhatId']=_0x1d9ae1['id'];}}else if(_0x40c7cc[_0xdf67('0x16')]===_0xdf67('0x17')){if(_0x1d9ae1[_0xdf67('0x12')]==='contact'){_0x12046a[_0xdf67('0x18')]=_0x1d9ae1['id'];}else if(_0x1d9ae1[_0xdf67('0x12')]===_0xdf67('0x15')){_0x12046a['AccountId']=_0x1d9ae1['id'];}else if(_0x1d9ae1[_0xdf67('0x12')]===_0xdf67('0x13')&&_0x40c7cc[_0xdf67('0x19')]){_0x12046a[_0x40c7cc[_0xdf67('0x19')]]=_0x1d9ae1['id'];}else{logger[_0xdf67('0x1a')](_0xdf67('0x1b'));}}}return _0xd41715[_0xdf67('0x1c')](_0x40c7cc[_0xdf67('0x16')])['create'](_0x12046a);}function getUser(_0x4b04fe,_0x31f6ea,_0x1e5f37){if(!_[_0xdf67('0x1d')](_0x31f6ea)&&intUtil['validateEmail'](_0x31f6ea)){var _0x3abd56={'Email':_0x31f6ea};var _0x4070d2={'Id':!![],'Username':!![],'Name':!![],'Email':!![]};return _0x1e5f37[_0xdf67('0x1c')]('User')[_0xdf67('0x1e')](_0x3abd56,_0x4070d2)['execute']()['then'](function(_0x563729){if(_0x563729[_0xdf67('0x1f')]){var _0x45fa9e=_[_0xdf67('0x1e')](_0x563729,function(_0x444e25){return _0x444e25['Email']===_0x31f6ea;});if(_0x45fa9e){logger[_0xdf67('0x1a')](_0xdf67('0x20'),_0x31f6ea);return BPromise['resolve']({'id':_0x45fa9e['Id'],'name':_0x45fa9e[_0xdf67('0x21')]});}}else{logger[_0xdf67('0x1a')](_0xdf67('0x22'),_0x31f6ea);return _0x1e5f37[_0xdf67('0x23')]()[_0xdf67('0x24')](function(_0x2f3d06){return BPromise[_0xdf67('0x25')]({'id':_0x2f3d06[_0xdf67('0x26')],'name':_0x2f3d06[_0xdf67('0x27')]});});}});}else{logger['info'](_0xdf67('0x22'),_0x31f6ea);return _0x1e5f37[_0xdf67('0x23')]()['then'](function(_0x1b62a9){return BPromise[_0xdf67('0x25')]({'id':_0x1b62a9[_0xdf67('0x26')],'name':_0x1b62a9[_0xdf67('0x27')]});});}}function getEndUser(_0x204cd2,_0x364ae9,_0x2d53de,_0x557d03,_0x2cd78d){var _0x22490c={'$or':{'Phone':_0x557d03}};var _0x2a345f={'Id':!![],'Name':!![],'Phone':!![]};return BPromise['resolve']()[_0xdf67('0x24')](function(){logger[_0xdf67('0x1a')](_0xdf67('0x28'),_0x557d03,_0x364ae9[_0xdf67('0x29')]);switch(_0x364ae9[_0xdf67('0x29')]){case _0xdf67('0x2a'):var _0x155516=_[_0xdf67('0x2b')](_0x22490c);if(_0x364ae9[_0xdf67('0x2c')]){var _0x1bbf10={};_0x1bbf10[_0x364ae9[_0xdf67('0x2c')]]=_0x557d03;_[_0xdf67('0x2d')](_0x155516[_0xdf67('0x2e')],_0x1bbf10);}return _0x2cd78d[_0xdf67('0x1c')](_0xdf67('0x2f'))[_0xdf67('0x1e')](_0x155516,_0x2a345f)[_0xdf67('0x30')]()[_0xdf67('0x24')](function(_0x2e8716){if(_0x2e8716&&_0x2e8716[_0xdf67('0x1f')]){return _0x2e8716;}else{var _0x574326=_[_0xdf67('0x2b')](_0x22490c);if(_0x364ae9[_0xdf67('0x31')]){var _0x56ee66={};_0x56ee66[_0x364ae9[_0xdf67('0x31')]]=_0x557d03;_[_0xdf67('0x2d')](_0x574326[_0xdf67('0x2e')],_0x56ee66);}return _0x2cd78d[_0xdf67('0x1c')](_0xdf67('0x32'))['find'](_0x574326,_0x2a345f);}});case _0xdf67('0x33'):var _0x4fc977=_[_0xdf67('0x2b')](_0x22490c);if(_0x364ae9[_0xdf67('0x34')]){var _0x1bbf10={};_0x1bbf10[_0x364ae9[_0xdf67('0x34')]]=_0x557d03;_[_0xdf67('0x2d')](_0x4fc977[_0xdf67('0x2e')],_0x1bbf10);}return _0x2cd78d[_0xdf67('0x1c')](_0xdf67('0x35'))['find'](_0x4fc977,_0x2a345f)[_0xdf67('0x30')]()[_0xdf67('0x24')](function(_0x3e5023){if(_0x3e5023&&_0x3e5023[_0xdf67('0x1f')]){return _0x3e5023;}else{var _0x952650=_[_0xdf67('0x2b')](_0x22490c);if(_0x364ae9[_0xdf67('0x2c')]){var _0x41db55={};_0x41db55[_0x364ae9[_0xdf67('0x2c')]]=_0x557d03;_[_0xdf67('0x2d')](_0x952650[_0xdf67('0x2e')],_0x41db55);}return _0x2cd78d['sobject'](_0xdf67('0x2f'))[_0xdf67('0x1e')](_0x952650,_0x2a345f)['then'](function(_0x42436c){if(_0x42436c&&_0x42436c['length']){return _0x42436c;}else{var _0x5c47b1=_[_0xdf67('0x2b')](_0x22490c);if(_0x364ae9[_0xdf67('0x31')]){var _0x32fd13={};_0x32fd13[_0x364ae9[_0xdf67('0x31')]]=_0x557d03;_[_0xdf67('0x2d')](_0x5c47b1['$or'],_0x32fd13);}return _0x2cd78d[_0xdf67('0x1c')](_0xdf67('0x32'))[_0xdf67('0x1e')](_0x5c47b1,_0x2a345f);}});}});case _0xdf67('0x36'):var _0x155516=_[_0xdf67('0x2b')](_0x22490c);if(_0x364ae9[_0xdf67('0x2c')]){var _0x1bbf10={};_0x1bbf10[_0x364ae9['additionalSearchContact']]=_0x557d03;_[_0xdf67('0x2d')](_0x155516[_0xdf67('0x2e')],_0x1bbf10);}return _0x2cd78d[_0xdf67('0x1c')](_0xdf67('0x2f'))[_0xdf67('0x1e')](_0x155516,_0x2a345f)[_0xdf67('0x30')]();case _0xdf67('0x13'):var _0x5b35c0=_[_0xdf67('0x2b')](_0x22490c);if(_0x364ae9[_0xdf67('0x31')]){var _0x1bbf10={};_0x1bbf10[_0x364ae9[_0xdf67('0x31')]]=_0x557d03;_[_0xdf67('0x2d')](_0x5b35c0[_0xdf67('0x2e')],_0x1bbf10);}return _0x2cd78d[_0xdf67('0x1c')](_0xdf67('0x32'))[_0xdf67('0x1e')](_0x5b35c0,_0x2a345f);case _0xdf67('0x15'):var _0x4fc977=_[_0xdf67('0x2b')](_0x22490c);if(_0x364ae9[_0xdf67('0x34')]){var _0x1bbf10={};_0x1bbf10[_0x364ae9[_0xdf67('0x34')]]=_0x557d03;_[_0xdf67('0x2d')](_0x4fc977[_0xdf67('0x2e')],_0x1bbf10);}return _0x2cd78d[_0xdf67('0x1c')]('Account')[_0xdf67('0x1e')](_0x4fc977,_0x2a345f);default:return null;}})[_0xdf67('0x24')](function(_0x23dcbf){if(_0x23dcbf&&_0x23dcbf['length']){var _0xeb5ddb=_[_0xdf67('0x37')](_0x23dcbf);if(_0xeb5ddb){return BPromise['resolve']({'id':_0xeb5ddb['Id'],'name':_0xeb5ddb[_0xdf67('0x21')],'phone':_0xeb5ddb[_0xdf67('0x38')],'endUserType':_0xeb5ddb[_0xdf67('0x39')][_0xdf67('0x3a')][_0xdf67('0x3b')]()});}}})[_0xdf67('0x24')](function(_0x2d425d){if(_0x2d425d){logger[_0xdf67('0x1a')](_0xdf67('0x3c'),_0x2d425d['endUserType'],_0x557d03);return BPromise[_0xdf67('0x25')](_0x2d425d);}else{logger[_0xdf67('0x1a')](_0xdf67('0x3d'),_0x557d03);var _0x1b6872={'Phone':_0x557d03};if(_0x364ae9[_0xdf67('0x3e')]){if(_0x364ae9[_0xdf67('0x3e')]===_0xdf67('0x36')){logger[_0xdf67('0x1a')](_0xdf67('0x3f'),_0x557d03,_0x364ae9[_0xdf67('0x3e')]);_0x1b6872[_0xdf67('0x40')]=_0x2d53de!==''?_0x2d53de:util[_0xdf67('0x41')](_0xdf67('0x42'),_0x557d03);}else if(_0x364ae9['moduleCreate']==='lead'){logger[_0xdf67('0x1a')](_0xdf67('0x3f'),_0x557d03,_0x364ae9['moduleCreate']);_0x1b6872['LastName']=_0x2d53de!==_0xdf67('0x43')?_0x2d53de:util['format']('Caller\x20-\x20%s',_0x557d03);_0x1b6872[_0xdf67('0x44')]=_0xdf67('0x45');}else if(_0x364ae9[_0xdf67('0x3e')]===_0xdf67('0x15')){logger[_0xdf67('0x1a')]('Enduser\x20with\x20phone\x20%s.\x20Creating\x20method\x20used\x20%s.',_0x557d03,_0x364ae9[_0xdf67('0x3e')]);_0x1b6872[_0xdf67('0x21')]=_0x2d53de!==''?_0x2d53de:util[_0xdf67('0x41')](_0xdf67('0x42'),_0x557d03);}else{return null;}}return _0x2cd78d[_0xdf67('0x1c')](_['upperFirst'](_0x364ae9[_0xdf67('0x3e')]))[_0xdf67('0x46')](_0x1b6872)[_0xdf67('0x24')](function(_0x18cf4d){return BPromise[_0xdf67('0x25')]({'id':_0x18cf4d['id'],'endUserType':_0x364ae9['moduleCreate']});});}});}function getCustomFields(_0x169881,_0xe74a33){var _0xda027c={};if(_0x169881[_0xdf67('0x1f')]>0x0){_[_0xdf67('0x47')](_0x169881,function(_0x273d48){if(_[_0xdf67('0x48')]([_0xdf67('0x49'),'picklist'],_0x273d48['type'])&&_0x273d48[_0xdf67('0x4a')]){_0xda027c[_0x273d48[_0xdf67('0x4a')]]=_0x273d48[_0xdf67('0x4b')]['toString']();}else if(_0x273d48['type']===_0xdf67('0x4c')&&_0x273d48['variableName']&&_0x273d48['idField']){_0xe74a33[_0x273d48['variableName']]&&(_0xda027c[_0x273d48[_0xdf67('0x4a')]]=_0xe74a33[_0x273d48['variableName']][_0xdf67('0x4d')]());}else if(_0x273d48[_0xdf67('0x3a')]===_0xdf67('0x4e')&&_0x273d48[_0xdf67('0x4f')]&&_0x273d48[_0xdf67('0x4f')][_0xdf67('0x50')]&&_0x273d48[_0xdf67('0x4a')]){_0xe74a33[_0x273d48[_0xdf67('0x4f')][_0xdf67('0x50')][_0xdf67('0x3b')]()]&&(_0xda027c[_0x273d48['idField']]=_0xe74a33[_0x273d48[_0xdf67('0x4f')][_0xdf67('0x50')][_0xdf67('0x3b')]()]['toString']());}});}return _0xda027c;}function getConnection(_0x350ddf){var _0x4445d8=_0x350ddf['password']['concat'](_0x350ddf[_0xdf67('0x51')]);var _0x30f805=new jsforce['Connection']({'oauth2':{'loginUrl':_0x350ddf[_0xdf67('0x52')]||_0xdf67('0x53'),'clientId':_0x350ddf[_0xdf67('0x54')],'clientSecret':_0x350ddf[_0xdf67('0x55')]}});return _0x30f805['login'](_0x350ddf['username'],_0x4445d8)['then'](function(){logger['info'](_0xdf67('0x56'));return _0x30f805;});}exports[_0xdf67('0x57')]=function(_0x2ab562,_0x550f5c,_0x155708,_0x35dd7f,_0x4cc859,_0x9ff41c){var _0x1e936d,_0x4e3dc0,_0x33c60c,_0xefd1e;_0x9ff41c[_0xdf67('0x58')]=intUtil[_0xdf67('0x59')](_0x9ff41c[_0xdf67('0x58')]);_0x9ff41c[_0xdf67('0x52')]=intUtil[_0xdf67('0x59')](_0x9ff41c['remoteUri']);if(_0x4cc859&&_0x4cc859[_0xdf67('0x5a')]){logger[_0xdf67('0x1a')](_0xdf67('0x5b'),'Recording\x20is\x20enabled!');_0x550f5c['recordingURL']=util[_0xdf67('0x41')]('%s/api/voice/recordings/%s/downloads?type=uniqueid&token=%s',_0x9ff41c[_0xdf67('0x58')],_0x550f5c[_0xdf67('0x5c')],md5(_0x550f5c[_0xdf67('0x5c')]));}else{_0x550f5c[_0xdf67('0x5d')]='';}return getConnection(_0x9ff41c)[_0xdf67('0x24')](function(_0xfcbb9d){_0xefd1e=_0xfcbb9d;return getUser(_0x9ff41c,_0x35dd7f[_0xdf67('0x5e')],_0xefd1e);})['then'](function(_0x3f313d){_0x1e936d=_0x3f313d;return getEndUser(_0x9ff41c,_0x155708,_0x550f5c[_0xdf67('0x5f')],_0x550f5c['calleridnum'],_0xefd1e);})['then'](function(_0x48f0cb){_0x4e3dc0=_0x48f0cb;return getTicket(_0x9ff41c,_0x1e936d,_0x4e3dc0,_0x155708,_0x550f5c,_0x155708['Fields'],_0xefd1e,_0xdf67('0x57'));})['then'](function(_0x5e4a9f){_0x33c60c=_0x5e4a9f;logger[_0xdf67('0x1a')](_0xdf67('0x60'),_0x33c60c['id']);logger[_0xdf67('0x1a')](_0xdf67('0x61'),_0x33c60c['id'],_0x35dd7f[_0xdf67('0x50')],_0x9ff41c['type']);switch(_0x9ff41c[_0xdf67('0x3a')]){case'integrationTab':emit(util['format'](_0xdf67('0x62'),_0x35dd7f[_0xdf67('0x50')]),_0xdf67('0x63'),{'recordId':_0x33c60c['id']});break;case _0xdf67('0x64'):emit(util[_0xdf67('0x41')]('user:%s',_0x35dd7f[_0xdf67('0x50')]),'trigger:browser:url',{'uri':util[_0xdf67('0x41')](_0xdf67('0x65'),_0xefd1e[_0xdf67('0x66')],_0x33c60c['id'])});break;default:logger[_0xdf67('0x67')](_0xdf67('0x68'));}})[_0xdf67('0x69')](function(_0x27499a){logger[_0xdf67('0x67')](_0xdf67('0x5b'),_0x27499a);});};exports[_0xdf67('0x6a')]=function(_0x10d0ec,_0x5212b3,_0x1997b2,_0x1462b1,_0x157969,_0x23134b,_0x1ef5a0){var _0x20f0cf,_0x4d80d3,_0x1c1f57,_0x1f08ef;_0x23134b[_0xdf67('0x58')]=intUtil[_0xdf67('0x59')](_0x23134b[_0xdf67('0x58')]);_0x23134b[_0xdf67('0x52')]=intUtil[_0xdf67('0x59')](_0x23134b[_0xdf67('0x52')]);if(_0x1ef5a0&&_0x1ef5a0['recordingFormat']&&_0x1ef5a0['recordingFormat']!==_0xdf67('0x6b')){logger[_0xdf67('0x1a')]('[OUTBOUND]',_0xdf67('0x6c'));_0x5212b3[_0xdf67('0x5d')]=util[_0xdf67('0x41')]('%s/api/voice/recordings/%s/downloads?type=uniqueid&token=%s',_0x23134b['serverUrl'],_0x5212b3[_0xdf67('0x5c')],md5(_0x5212b3['uniqueid']));}return getConnection(_0x23134b)[_0xdf67('0x24')](function(_0x3f8a08){_0x1f08ef=_0x3f8a08;return getUser(_0x23134b,_0x1462b1[_0xdf67('0x5e')],_0x1f08ef);})[_0xdf67('0x24')](function(_0x28c65e){_0x20f0cf=_0x28c65e;return getEndUser(_0x23134b,_0x1997b2,_0x5212b3[_0xdf67('0x6d')],_0x5212b3['destcalleridnum'],_0x1f08ef);})[_0xdf67('0x24')](function(_0x280648){_0x4d80d3=_0x280648;return getTicket(_0x23134b,_0x20f0cf,_0x4d80d3,_0x1997b2,_0x5212b3,_0x1997b2[_0xdf67('0x6e')],_0x1f08ef,_0xdf67('0x6a'));})['then'](function(_0x3c3022){_0x1c1f57=_0x3c3022;logger[_0xdf67('0x1a')](_0xdf67('0x6f'),_0x1c1f57['id']);logger[_0xdf67('0x1a')](_0xdf67('0x70'),_0x1c1f57['id'],_0x1462b1[_0xdf67('0x50')],_0x23134b['type']);switch(_0x23134b[_0xdf67('0x3a')]){case _0xdf67('0x71'):emit(util['format'](_0xdf67('0x62'),_0x1462b1[_0xdf67('0x50')]),_0xdf67('0x63'),{'recordId':_0x1c1f57['id']});break;case'newTab':emit(util[_0xdf67('0x41')](_0xdf67('0x62'),_0x1462b1[_0xdf67('0x50')]),'trigger:browser:url',{'uri':util[_0xdf67('0x41')](_0xdf67('0x65'),_0x1f08ef[_0xdf67('0x66')],_0x1c1f57['id'])});break;default:logger[_0xdf67('0x67')](_0xdf67('0x72'),_0xdf67('0x73'));}})[_0xdf67('0x69')](function(_0x4508f3){logger[_0xdf67('0x67')]('[OUTBOUND]',_0x4508f3);});};exports[_0xdf67('0x74')]=function(_0x3f7b91,_0x1f86a6,_0x1fb96e,_0x884c1a,_0x11d438,_0x1fccc6){var _0x5c634c,_0x5c5952,_0x2ecd5d,_0x4b91dc;_0x1fccc6[_0xdf67('0x58')]=intUtil[_0xdf67('0x59')](_0x1fccc6[_0xdf67('0x58')]);_0x1fccc6[_0xdf67('0x52')]=intUtil[_0xdf67('0x59')](_0x1fccc6['remoteUri']);if(_0x11d438&&_0x11d438[_0xdf67('0x5a')]){logger['info']('['+_0x1f86a6[_0xdf67('0x75')][_0xdf67('0x76')]()+']','Recording\x20is\x20enabled!');_0x1f86a6[_0xdf67('0x5d')]=util[_0xdf67('0x41')](_0xdf67('0x77'),_0x1fccc6[_0xdf67('0x58')],_0x1f86a6['uniqueid'],md5(_0x1f86a6[_0xdf67('0x5c')]));}else{_0x1f86a6['recordingURL']='';}return getConnection(_0x1fccc6)[_0xdf67('0x24')](function(_0x557bf8){_0x4b91dc=_0x557bf8;if(!_[_0xdf67('0x1d')](_0x884c1a)){return getUser(_0x1fccc6,_0x884c1a[_0xdf67('0x50')],_0x4b91dc);}else{return getUser(_0x1fccc6,null,_0x4b91dc);}})[_0xdf67('0x24')](function(_0x158f3b){_0x5c634c=_0x158f3b;return getEndUser(_0x1fccc6,_0x1fb96e,_0x1f86a6[_0xdf67('0x5f')],_0x1f86a6['calleridnum'],_0x4b91dc);})['then'](function(_0x406054){_0x5c5952=_0x406054;return getTicket(_0x1fccc6,_0x5c634c,_0x5c5952,_0x1fb96e,_0x1f86a6,_0x1fb96e[_0xdf67('0x6e')],_0x4b91dc);})[_0xdf67('0x24')](function(_0x4a2087){_0x2ecd5d=_0x4a2087;logger[_0xdf67('0x1a')]('['+_0x1f86a6['lastevent'][_0xdf67('0x76')]()+_0xdf67('0x78'),_0x2ecd5d['id']);logger[_0xdf67('0x1a')]('['+_0x1f86a6[_0xdf67('0x75')][_0xdf67('0x76')]()+_0xdf67('0x79'),_0x1fccc6[_0xdf67('0x3a')]);})[_0xdf67('0x69')](function(_0x550423){logger[_0xdf67('0x67')]('['+_0x1f86a6[_0xdf67('0x75')][_0xdf67('0x76')]()+']',_0x550423);});}; \ No newline at end of file +var _0x7f5a=['ActivityDate','IsRecurrence','endUserType','lead','WhoId','account','AccountId','leadId','info','Association\x20between\x20Case\x20and\x20Lead\x20skipped','sobject','create','isNil','validateEmail','User','then','length','Email','Agent\x20%s\x20found.','Agent\x20%s\x20not\x20found.\x20Switch\x20to\x20the\x20admin\x20account.','identity','resolve','user_id','display_name','Searching\x20enduser\x20with\x20phone\x20%s.\x20Serching\x20method\x20used\x20%s.','moduleSearch','additionalSearchContact','merge','Contact','find','execute','cloneDeep','additionalSearchLead','$or','Lead','account_contact_lead','additionalSearchAccount','Account','contact','first','Phone','attributes','type','Enduser\x20(%s)\x20with\x20phone\x20%s\x20found','Enduser\x20with\x20phone\x20%s\x20not\x20found','moduleCreate','Enduser\x20with\x20phone\x20%s.\x20Creating\x20method\x20used\x20%s.','','Caller\x20-\x20%s','LastName','format','Company','No\x20Company','Name','upperFirst','includes','string','idField','content','toString','variable','variableName','Variable','name','toLowerCase','password','concat','https://login.salesforce.com','clientId','clientSecret','username','Connection\x20established.','serverUrl','remoteUri','stripTrailingSlash','[QUEUE]','Recording\x20is\x20enabled!','recordingURL','%s/api/voice/recordings/%s/downloads?type=uniqueid&token=%s','email','calleridnum','queue','[QUEUE]\x20Ticket\x20%s\x20created','integrationTab','user:%s','trigger:salesforce:display','newTab','trigger:browser:url','error','[QUEUE]\x20Salesforce\x20account\x20type\x20not\x20recognized.','outbound','recordingFormat','none','[OUTBOUND]','uniqueid','destcalleridnum','Fields','[OUTBOUND]\x20Ticket\x20%s\x20created.','instanceUrl','Salesforce\x20account\x20type\x20not\x20recognized','unmanaged','monitor_format','lastevent','toUpperCase','calleridname',']\x20Integration\x20account\x20type\x20%s.','catch','lodash','request-promise','moment','md5','jsforce','util','ioredis','./util','../../../../config/environment','salesforce','redis','localhost','socket.io-emitter','emit','assign','getString','Descriptions','ticketType','Task'];(function(_0x1cd823,_0x5cd14b){var _0x44ba48=function(_0x10f161){while(--_0x10f161){_0x1cd823['push'](_0x1cd823['shift']());}};_0x44ba48(++_0x5cd14b);}(_0x7f5a,0x167));var _0xa7f5=function(_0x277107,_0x3420dc){_0x277107=_0x277107-0x0;var _0x1da046=_0x7f5a[_0x277107];return _0x1da046;};'use strict';var _=require(_0xa7f5('0x0'));var rp=require(_0xa7f5('0x1'));var moment=require(_0xa7f5('0x2'));var BPromise=require('bluebird');var md5=require(_0xa7f5('0x3'));var jsforce=require(_0xa7f5('0x4'));var util=require(_0xa7f5('0x5'));var Redis=require(_0xa7f5('0x6'));var intUtil=require(_0xa7f5('0x7'));var config=require(_0xa7f5('0x8'));var logger=require('../../../../config/logger')(_0xa7f5('0x9'));config[_0xa7f5('0xa')]=_['defaults'](config[_0xa7f5('0xa')],{'host':_0xa7f5('0xb'),'port':0x18eb});var io=require(_0xa7f5('0xc'))(new Redis(config[_0xa7f5('0xa')]));function emit(_0xf20662,_0x20d4c7,_0x1aed63){io['to'](_0xf20662)[_0xa7f5('0xd')](_0x20d4c7,_0x1aed63);}function getTicket(_0x81dd78,_0x308ab3,_0xbc1c17,_0x51c5c1,_0x410a22,_0x2e81cf,_0x4403e0,_0x26230b){var _0x12e8f0=Object[_0xa7f5('0xe')]({},{'OwnerId':_0x308ab3['id'],'Subject':intUtil[_0xa7f5('0xf')](_0x51c5c1['Subjects'],_0x410a22,'\x20'),'Description':intUtil[_0xa7f5('0xf')](_0x51c5c1[_0xa7f5('0x10')],_0x410a22,'\x0a')},getCustomFields(_0x2e81cf,_0x410a22));if(_0xbc1c17){if(_0x51c5c1[_0xa7f5('0x11')]===_0xa7f5('0x12')){_0x12e8f0[_0xa7f5('0x13')]=moment['utc']();_0x12e8f0['IsReminderSet']=![];_0x12e8f0[_0xa7f5('0x14')]=![];if(_0xbc1c17[_0xa7f5('0x15')]==='contact'||_0xbc1c17[_0xa7f5('0x15')]===_0xa7f5('0x16')){_0x12e8f0[_0xa7f5('0x17')]=_0xbc1c17['id'];}else if(_0xbc1c17[_0xa7f5('0x15')]===_0xa7f5('0x18')){_0x12e8f0['WhatId']=_0xbc1c17['id'];}}else if(_0x51c5c1[_0xa7f5('0x11')]==='Case'){if(_0xbc1c17[_0xa7f5('0x15')]==='contact'){_0x12e8f0['ContactId']=_0xbc1c17['id'];}else if(_0xbc1c17[_0xa7f5('0x15')]===_0xa7f5('0x18')){_0x12e8f0[_0xa7f5('0x19')]=_0xbc1c17['id'];}else if(_0xbc1c17[_0xa7f5('0x15')]===_0xa7f5('0x16')&&_0x51c5c1[_0xa7f5('0x1a')]){_0x12e8f0[_0x51c5c1['leadId']]=_0xbc1c17['id'];}else{logger[_0xa7f5('0x1b')](_0xa7f5('0x1c'));}}}return _0x4403e0[_0xa7f5('0x1d')](_0x51c5c1[_0xa7f5('0x11')])[_0xa7f5('0x1e')](_0x12e8f0);}function getUser(_0x127337,_0x341d3c,_0x25a788){if(!_[_0xa7f5('0x1f')](_0x341d3c)&&intUtil[_0xa7f5('0x20')](_0x341d3c)){var _0x453493={'Email':_0x341d3c};var _0x497df9={'Id':!![],'Username':!![],'Name':!![],'Email':!![]};return _0x25a788[_0xa7f5('0x1d')](_0xa7f5('0x21'))['find'](_0x453493,_0x497df9)['execute']()[_0xa7f5('0x22')](function(_0x3a9dda){if(_0x3a9dda[_0xa7f5('0x23')]){var _0x54313d=_['find'](_0x3a9dda,function(_0x3c333a){return _0x3c333a[_0xa7f5('0x24')]===_0x341d3c;});if(_0x54313d){logger[_0xa7f5('0x1b')](_0xa7f5('0x25'),_0x341d3c);return BPromise['resolve']({'id':_0x54313d['Id'],'name':_0x54313d['Name']});}}else{logger[_0xa7f5('0x1b')](_0xa7f5('0x26'),_0x341d3c);return _0x25a788[_0xa7f5('0x27')]()[_0xa7f5('0x22')](function(_0x2314a1){return BPromise[_0xa7f5('0x28')]({'id':_0x2314a1[_0xa7f5('0x29')],'name':_0x2314a1[_0xa7f5('0x2a')]});});}});}else{logger[_0xa7f5('0x1b')]('Agent\x20%s\x20not\x20found.\x20Switch\x20to\x20the\x20admin\x20account.',_0x341d3c);return _0x25a788[_0xa7f5('0x27')]()['then'](function(_0x79f116){return BPromise[_0xa7f5('0x28')]({'id':_0x79f116['user_id'],'name':_0x79f116['display_name']});});}}function getEndUser(_0x18bc7b,_0x57b83b,_0x2675fe,_0x160c17,_0x5e2390){var _0x5e7060={'$or':{'Phone':_0x160c17}};var _0x3e6dd1={'Id':!![],'Name':!![],'Phone':!![]};return BPromise[_0xa7f5('0x28')]()[_0xa7f5('0x22')](function(){logger[_0xa7f5('0x1b')](_0xa7f5('0x2b'),_0x160c17,_0x57b83b[_0xa7f5('0x2c')]);switch(_0x57b83b['moduleSearch']){case'contact_lead':var _0x2ee81f=_['cloneDeep'](_0x5e7060);if(_0x57b83b[_0xa7f5('0x2d')]){var _0x4f3405={};_0x4f3405[_0x57b83b[_0xa7f5('0x2d')]]=_0x160c17;_[_0xa7f5('0x2e')](_0x2ee81f['$or'],_0x4f3405);}return _0x5e2390[_0xa7f5('0x1d')](_0xa7f5('0x2f'))[_0xa7f5('0x30')](_0x2ee81f,_0x3e6dd1)[_0xa7f5('0x31')]()[_0xa7f5('0x22')](function(_0x4036c4){if(_0x4036c4&&_0x4036c4[_0xa7f5('0x23')]){return _0x4036c4;}else{var _0x3437db=_[_0xa7f5('0x32')](_0x5e7060);if(_0x57b83b[_0xa7f5('0x33')]){var _0x52bf31={};_0x52bf31[_0x57b83b[_0xa7f5('0x33')]]=_0x160c17;_[_0xa7f5('0x2e')](_0x3437db[_0xa7f5('0x34')],_0x52bf31);}return _0x5e2390[_0xa7f5('0x1d')](_0xa7f5('0x35'))[_0xa7f5('0x30')](_0x3437db,_0x3e6dd1);}});case _0xa7f5('0x36'):var _0x4b9cb4=_[_0xa7f5('0x32')](_0x5e7060);if(_0x57b83b[_0xa7f5('0x37')]){var _0x4f3405={};_0x4f3405[_0x57b83b[_0xa7f5('0x37')]]=_0x160c17;_[_0xa7f5('0x2e')](_0x4b9cb4['$or'],_0x4f3405);}return _0x5e2390[_0xa7f5('0x1d')](_0xa7f5('0x38'))[_0xa7f5('0x30')](_0x4b9cb4,_0x3e6dd1)['execute']()[_0xa7f5('0x22')](function(_0x4eacf8){if(_0x4eacf8&&_0x4eacf8[_0xa7f5('0x23')]){return _0x4eacf8;}else{var _0x2d38da=_['cloneDeep'](_0x5e7060);if(_0x57b83b[_0xa7f5('0x2d')]){var _0x58d2d7={};_0x58d2d7[_0x57b83b['additionalSearchContact']]=_0x160c17;_[_0xa7f5('0x2e')](_0x2d38da[_0xa7f5('0x34')],_0x58d2d7);}return _0x5e2390[_0xa7f5('0x1d')](_0xa7f5('0x2f'))['find'](_0x2d38da,_0x3e6dd1)[_0xa7f5('0x22')](function(_0x54ec44){if(_0x54ec44&&_0x54ec44[_0xa7f5('0x23')]){return _0x54ec44;}else{var _0x53f6c5=_[_0xa7f5('0x32')](_0x5e7060);if(_0x57b83b['additionalSearchLead']){var _0x1b181d={};_0x1b181d[_0x57b83b[_0xa7f5('0x33')]]=_0x160c17;_['merge'](_0x53f6c5[_0xa7f5('0x34')],_0x1b181d);}return _0x5e2390[_0xa7f5('0x1d')](_0xa7f5('0x35'))['find'](_0x53f6c5,_0x3e6dd1);}});}});case _0xa7f5('0x39'):var _0x2ee81f=_['cloneDeep'](_0x5e7060);if(_0x57b83b['additionalSearchContact']){var _0x4f3405={};_0x4f3405[_0x57b83b[_0xa7f5('0x2d')]]=_0x160c17;_[_0xa7f5('0x2e')](_0x2ee81f[_0xa7f5('0x34')],_0x4f3405);}return _0x5e2390[_0xa7f5('0x1d')]('Contact')[_0xa7f5('0x30')](_0x2ee81f,_0x3e6dd1)['execute']();case'lead':var _0x293780=_[_0xa7f5('0x32')](_0x5e7060);if(_0x57b83b[_0xa7f5('0x33')]){var _0x4f3405={};_0x4f3405[_0x57b83b['additionalSearchLead']]=_0x160c17;_[_0xa7f5('0x2e')](_0x293780[_0xa7f5('0x34')],_0x4f3405);}return _0x5e2390[_0xa7f5('0x1d')](_0xa7f5('0x35'))[_0xa7f5('0x30')](_0x293780,_0x3e6dd1);case _0xa7f5('0x18'):var _0x4b9cb4=_[_0xa7f5('0x32')](_0x5e7060);if(_0x57b83b[_0xa7f5('0x37')]){var _0x4f3405={};_0x4f3405[_0x57b83b[_0xa7f5('0x37')]]=_0x160c17;_['merge'](_0x4b9cb4[_0xa7f5('0x34')],_0x4f3405);}return _0x5e2390[_0xa7f5('0x1d')]('Account')[_0xa7f5('0x30')](_0x4b9cb4,_0x3e6dd1);default:return null;}})[_0xa7f5('0x22')](function(_0x29a6c4){if(_0x29a6c4&&_0x29a6c4['length']){var _0x379f7a=_[_0xa7f5('0x3a')](_0x29a6c4);if(_0x379f7a){return BPromise[_0xa7f5('0x28')]({'id':_0x379f7a['Id'],'name':_0x379f7a['Name'],'phone':_0x379f7a[_0xa7f5('0x3b')],'endUserType':_0x379f7a[_0xa7f5('0x3c')][_0xa7f5('0x3d')]['toLowerCase']()});}}})[_0xa7f5('0x22')](function(_0x2d3adc){if(_0x2d3adc){logger['info'](_0xa7f5('0x3e'),_0x2d3adc[_0xa7f5('0x15')],_0x160c17);return BPromise[_0xa7f5('0x28')](_0x2d3adc);}else{logger[_0xa7f5('0x1b')](_0xa7f5('0x3f'),_0x160c17);var _0x333bb3={'Phone':_0x160c17};if(_0x57b83b[_0xa7f5('0x40')]){if(_0x57b83b[_0xa7f5('0x40')]===_0xa7f5('0x39')){logger[_0xa7f5('0x1b')](_0xa7f5('0x41'),_0x160c17,_0x57b83b[_0xa7f5('0x40')]);_0x333bb3['LastName']=_0x2675fe!==_0xa7f5('0x42')?_0x2675fe:util['format'](_0xa7f5('0x43'),_0x160c17);}else if(_0x57b83b[_0xa7f5('0x40')]===_0xa7f5('0x16')){logger[_0xa7f5('0x1b')](_0xa7f5('0x41'),_0x160c17,_0x57b83b['moduleCreate']);_0x333bb3[_0xa7f5('0x44')]=_0x2675fe!==''?_0x2675fe:util[_0xa7f5('0x45')]('Caller\x20-\x20%s',_0x160c17);_0x333bb3[_0xa7f5('0x46')]=_0xa7f5('0x47');}else if(_0x57b83b['moduleCreate']===_0xa7f5('0x18')){logger[_0xa7f5('0x1b')](_0xa7f5('0x41'),_0x160c17,_0x57b83b[_0xa7f5('0x40')]);_0x333bb3[_0xa7f5('0x48')]=_0x2675fe!==_0xa7f5('0x42')?_0x2675fe:util[_0xa7f5('0x45')]('Caller\x20-\x20%s',_0x160c17);}else{return null;}}return _0x5e2390[_0xa7f5('0x1d')](_[_0xa7f5('0x49')](_0x57b83b['moduleCreate']))[_0xa7f5('0x1e')](_0x333bb3)[_0xa7f5('0x22')](function(_0x3e3953){return BPromise[_0xa7f5('0x28')]({'id':_0x3e3953['id'],'endUserType':_0x57b83b[_0xa7f5('0x40')]});});}});}function getCustomFields(_0x5e6a0a,_0x244b76){var _0x40c39e={};if(_0x5e6a0a[_0xa7f5('0x23')]>0x0){_['forEach'](_0x5e6a0a,function(_0x156877){if(_[_0xa7f5('0x4a')]([_0xa7f5('0x4b'),'picklist'],_0x156877[_0xa7f5('0x3d')])&&_0x156877[_0xa7f5('0x4c')]){_0x40c39e[_0x156877['idField']]=_0x156877[_0xa7f5('0x4d')][_0xa7f5('0x4e')]();}else if(_0x156877[_0xa7f5('0x3d')]===_0xa7f5('0x4f')&&_0x156877[_0xa7f5('0x50')]&&_0x156877['idField']){_0x244b76[_0x156877[_0xa7f5('0x50')]]&&(_0x40c39e[_0x156877['idField']]=_0x244b76[_0x156877[_0xa7f5('0x50')]][_0xa7f5('0x4e')]());}else if(_0x156877['type']==='customVariable'&&_0x156877[_0xa7f5('0x51')]&&_0x156877[_0xa7f5('0x51')][_0xa7f5('0x52')]&&_0x156877[_0xa7f5('0x4c')]){_0x244b76[_0x156877[_0xa7f5('0x51')][_0xa7f5('0x52')][_0xa7f5('0x53')]()]&&(_0x40c39e[_0x156877[_0xa7f5('0x4c')]]=_0x244b76[_0x156877['Variable']['name'][_0xa7f5('0x53')]()][_0xa7f5('0x4e')]());}});}return _0x40c39e;}function getConnection(_0x4c1df0){var _0x1c724c=_0x4c1df0[_0xa7f5('0x54')][_0xa7f5('0x55')](_0x4c1df0['securityToken']);var _0xd89d7a=new jsforce['Connection']({'oauth2':{'loginUrl':_0x4c1df0['remoteUri']||_0xa7f5('0x56'),'clientId':_0x4c1df0[_0xa7f5('0x57')],'clientSecret':_0x4c1df0[_0xa7f5('0x58')]}});return _0xd89d7a['login'](_0x4c1df0[_0xa7f5('0x59')],_0x1c724c)[_0xa7f5('0x22')](function(){logger[_0xa7f5('0x1b')](_0xa7f5('0x5a'));return _0xd89d7a;});}exports['queue']=function(_0x249477,_0x38e025,_0x54ea06,_0xcd06f,_0x3e64bf,_0x55d4a1){var _0x45b3da,_0x2a53fb,_0x2a8b64,_0x451370;_0x55d4a1[_0xa7f5('0x5b')]=intUtil['stripTrailingSlash'](_0x55d4a1[_0xa7f5('0x5b')]);_0x55d4a1[_0xa7f5('0x5c')]=intUtil[_0xa7f5('0x5d')](_0x55d4a1[_0xa7f5('0x5c')]);if(_0x3e64bf&&_0x3e64bf['monitor_format']){logger[_0xa7f5('0x1b')](_0xa7f5('0x5e'),_0xa7f5('0x5f'));_0x38e025[_0xa7f5('0x60')]=util[_0xa7f5('0x45')](_0xa7f5('0x61'),_0x55d4a1[_0xa7f5('0x5b')],_0x38e025['uniqueid'],md5(_0x38e025['uniqueid']));}else{_0x38e025[_0xa7f5('0x60')]='';}return getConnection(_0x55d4a1)[_0xa7f5('0x22')](function(_0x94a157){_0x451370=_0x94a157;return getUser(_0x55d4a1,_0xcd06f[_0xa7f5('0x62')],_0x451370);})['then'](function(_0x1751d5){_0x45b3da=_0x1751d5;return getEndUser(_0x55d4a1,_0x54ea06,_0x38e025['calleridname'],_0x38e025[_0xa7f5('0x63')],_0x451370);})[_0xa7f5('0x22')](function(_0xe4bf7d){_0x2a53fb=_0xe4bf7d;return getTicket(_0x55d4a1,_0x45b3da,_0x2a53fb,_0x54ea06,_0x38e025,_0x54ea06['Fields'],_0x451370,_0xa7f5('0x64'));})[_0xa7f5('0x22')](function(_0x212d82){_0x2a8b64=_0x212d82;logger['info'](_0xa7f5('0x65'),_0x2a8b64['id']);logger[_0xa7f5('0x1b')]('[QUEUE]\x20Displaying\x20ticket\x20%s\x20to\x20agent\x20%s.\x20Integration\x20account\x20type\x20%s.',_0x2a8b64['id'],_0xcd06f[_0xa7f5('0x52')],_0x55d4a1[_0xa7f5('0x3d')]);switch(_0x55d4a1[_0xa7f5('0x3d')]){case _0xa7f5('0x66'):emit(util[_0xa7f5('0x45')](_0xa7f5('0x67'),_0xcd06f['name']),_0xa7f5('0x68'),{'recordId':_0x2a8b64['id']});break;case _0xa7f5('0x69'):emit(util['format']('user:%s',_0xcd06f[_0xa7f5('0x52')]),_0xa7f5('0x6a'),{'uri':util['format']('%s/%s/e',_0x451370['instanceUrl'],_0x2a8b64['id'])});break;default:logger[_0xa7f5('0x6b')](_0xa7f5('0x6c'));}})['catch'](function(_0x5183a1){logger[_0xa7f5('0x6b')]('[QUEUE]',_0x5183a1);});};exports[_0xa7f5('0x6d')]=function(_0x57499c,_0x164566,_0x276273,_0x3ee2c1,_0x3a63a7,_0x20a448,_0x295951){var _0x499b57,_0x631200,_0x2ada51,_0x2b5f7f;_0x20a448[_0xa7f5('0x5b')]=intUtil['stripTrailingSlash'](_0x20a448[_0xa7f5('0x5b')]);_0x20a448[_0xa7f5('0x5c')]=intUtil[_0xa7f5('0x5d')](_0x20a448[_0xa7f5('0x5c')]);if(_0x295951&&_0x295951[_0xa7f5('0x6e')]&&_0x295951[_0xa7f5('0x6e')]!==_0xa7f5('0x6f')){logger['info'](_0xa7f5('0x70'),'Recording\x20is\x20enabled!');_0x164566['recordingURL']=util[_0xa7f5('0x45')](_0xa7f5('0x61'),_0x20a448['serverUrl'],_0x164566[_0xa7f5('0x71')],md5(_0x164566[_0xa7f5('0x71')]));}return getConnection(_0x20a448)[_0xa7f5('0x22')](function(_0x5044dc){_0x2b5f7f=_0x5044dc;return getUser(_0x20a448,_0x3ee2c1[_0xa7f5('0x62')],_0x2b5f7f);})[_0xa7f5('0x22')](function(_0x5d78cc){_0x499b57=_0x5d78cc;return getEndUser(_0x20a448,_0x276273,_0x164566['destcalleridname'],_0x164566[_0xa7f5('0x72')],_0x2b5f7f);})[_0xa7f5('0x22')](function(_0x5a00c8){_0x631200=_0x5a00c8;return getTicket(_0x20a448,_0x499b57,_0x631200,_0x276273,_0x164566,_0x276273[_0xa7f5('0x73')],_0x2b5f7f,_0xa7f5('0x6d'));})['then'](function(_0x336dcd){_0x2ada51=_0x336dcd;logger[_0xa7f5('0x1b')](_0xa7f5('0x74'),_0x2ada51['id']);logger[_0xa7f5('0x1b')]('[OUTBOUND]\x20Displaying\x20ticket\x20%s\x20to\x20agent\x20%s.\x20Integration\x20account\x20type\x20%s.',_0x2ada51['id'],_0x3ee2c1[_0xa7f5('0x52')],_0x20a448[_0xa7f5('0x3d')]);switch(_0x20a448[_0xa7f5('0x3d')]){case _0xa7f5('0x66'):emit(util[_0xa7f5('0x45')](_0xa7f5('0x67'),_0x3ee2c1[_0xa7f5('0x52')]),_0xa7f5('0x68'),{'recordId':_0x2ada51['id']});break;case _0xa7f5('0x69'):emit(util[_0xa7f5('0x45')](_0xa7f5('0x67'),_0x3ee2c1['name']),'trigger:browser:url',{'uri':util['format']('%s/%s/e',_0x2b5f7f[_0xa7f5('0x75')],_0x2ada51['id'])});break;default:logger[_0xa7f5('0x6b')](_0xa7f5('0x70'),_0xa7f5('0x76'));}})['catch'](function(_0x5d6ae8){logger[_0xa7f5('0x6b')](_0xa7f5('0x70'),_0x5d6ae8);});};exports[_0xa7f5('0x77')]=function(_0x175211,_0x1b8812,_0x9c15ce,_0x185f3b,_0x173e1e,_0x3167da){var _0x4ec6f6,_0x10cf52,_0x3eaf43,_0x5b8b54;_0x3167da[_0xa7f5('0x5b')]=intUtil['stripTrailingSlash'](_0x3167da[_0xa7f5('0x5b')]);_0x3167da[_0xa7f5('0x5c')]=intUtil[_0xa7f5('0x5d')](_0x3167da[_0xa7f5('0x5c')]);if(_0x173e1e&&_0x173e1e[_0xa7f5('0x78')]){logger[_0xa7f5('0x1b')]('['+_0x1b8812[_0xa7f5('0x79')][_0xa7f5('0x7a')]()+']',_0xa7f5('0x5f'));_0x1b8812[_0xa7f5('0x60')]=util[_0xa7f5('0x45')](_0xa7f5('0x61'),_0x3167da[_0xa7f5('0x5b')],_0x1b8812['uniqueid'],md5(_0x1b8812[_0xa7f5('0x71')]));}else{_0x1b8812[_0xa7f5('0x60')]='';}return getConnection(_0x3167da)[_0xa7f5('0x22')](function(_0x3a9eb1){_0x5b8b54=_0x3a9eb1;if(!_['isNil'](_0x185f3b)){return getUser(_0x3167da,_0x185f3b['name'],_0x5b8b54);}else{return getUser(_0x3167da,null,_0x5b8b54);}})['then'](function(_0x217583){_0x4ec6f6=_0x217583;return getEndUser(_0x3167da,_0x9c15ce,_0x1b8812[_0xa7f5('0x7b')],_0x1b8812[_0xa7f5('0x63')],_0x5b8b54);})['then'](function(_0x586a32){_0x10cf52=_0x586a32;return getTicket(_0x3167da,_0x4ec6f6,_0x10cf52,_0x9c15ce,_0x1b8812,_0x9c15ce[_0xa7f5('0x73')],_0x5b8b54);})[_0xa7f5('0x22')](function(_0x2aced3){_0x3eaf43=_0x2aced3;logger[_0xa7f5('0x1b')]('['+_0x1b8812[_0xa7f5('0x79')][_0xa7f5('0x7a')]()+']\x20Ticket\x20%s\x20created.',_0x3eaf43['id']);logger['info']('['+_0x1b8812[_0xa7f5('0x79')][_0xa7f5('0x7a')]()+_0xa7f5('0x7c'),_0x3167da['type']);})[_0xa7f5('0x7d')](function(_0x557da6){logger['error']('['+_0x1b8812['lastevent'][_0xa7f5('0x7a')]()+']',_0x557da6);});}; \ No newline at end of file diff --git a/server/services/ami/trigger/integration/servicenow.js b/server/services/ami/trigger/integration/servicenow.js index 0cbe7c7..eb1c2d9 100644 --- a/server/services/ami/trigger/integration/servicenow.js +++ b/server/services/ami/trigger/integration/servicenow.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xad03=['catch','error','message','info','userEmail','],\x20getUser\x20rp\x20obj','true','userId','adminId','],\x20getUser\x20crm',']\x20using\x20admin\x20profile','adminEmail','],\x20createEndUser\x20input\x20crm','sys_user?','endUserNumber','user','System','],\x20EndUser\x20schema','endUserId','],\x20getEndUser\x20input\x20crm','sys_user?sysparm_query=phone%3D','],\x20getEndUser\x20crm','],\x20createEndUser\x20crm','includes','string','picklist','type','nameField','customField','toLowerCase','content','idField','variable','variableName','toString','customVariable','Variable',']\x20getTicket\x20input\x20crm','outbound','POST','incident','assign','getString','Descriptions',']\x20POST\x20incident\x20entity\x20schema','ticketId','ticketNumber','number',']\x20getTicket\x20crm','label_entry','Incident','forEach','push','all',']\x20arrayPromises:\x20IDs\x20in\x20table\x20label','name','%26sysparm_record_target%3Dincident','%26sysparm_record_row%3D1%26sysparm_record_rows%3D39','%255EORDERBYDESCnumber','/nav_to.do?uri=incident.do?sys_id%3D','user:%s','emit','username','password','sysparm_limit=1','sysparm_display_value=true','remoteUri','stripTrailingSlash','serverUrl','email','calleridnum','callDirection','queue','format','%s/api/voice/recordings/%s/downloads?type=uniqueid&token=%s','uniqueid','monitor_format','[QUEUE]','Recording\x20is\x20enabled!','recordingFormat','[OUTBOUND]','recordingURL','call\x20direction:\x20%s','unmanaged','Displaying\x20call\x20in\x20a\x20new\x20tab...',']\x20Error\x20running\x20ServiceNow\x20integration','inspect','lodash','bluebird','./util','../../../../config/environment','../../../../config/logger','servicenow','redis','defaults','localhost','socket.io-emitter','GET','sys_user?sysparm_query=user_name%3Dadmin','then','result','length','sys_id','toUpperCase','],\x20getAdminUser\x20crm'];(function(_0x146dd7,_0x4d877d){var _0x2af0bb=function(_0x2327bc){while(--_0x2327bc){_0x146dd7['push'](_0x146dd7['shift']());}};_0x2af0bb(++_0x4d877d);}(_0xad03,0x192));var _0x3ad0=function(_0x5f1d86,_0x2f3ca7){_0x5f1d86=_0x5f1d86-0x0;var _0x23f17c=_0xad03[_0x5f1d86];return _0x23f17c;};'use strict';var _=require(_0x3ad0('0x0'));var Promise=require(_0x3ad0('0x1'));var rp=require('request-promise');var util=require('util');var md5=require('md5');var Redis=require('ioredis');var intUtil=require(_0x3ad0('0x2'));var config=require(_0x3ad0('0x3'));var logger=require(_0x3ad0('0x4'))(_0x3ad0('0x5'));config[_0x3ad0('0x6')]=_[_0x3ad0('0x7')](config[_0x3ad0('0x6')],{'host':_0x3ad0('0x8'),'port':0x18eb});var io=require(_0x3ad0('0x9'))(new Redis(config[_0x3ad0('0x6')]));function getAdminUser(_0x504501,_0x28674b,_0x4b31cf,_0x3894a8,_0x47bf96,_0x462f53){return new Promise(function(_0x1f266d,_0x55459d){var _0x5b3c4d={'method':_0x3ad0('0xa'),'uri':_0x3894a8+_0x3ad0('0xb')+'&'+_0x47bf96+'&'+_0x462f53,'auth':_0x28674b,'json':!![]};return rp(_0x5b3c4d)[_0x3ad0('0xc')](function(_0x570a79){if(_0x570a79[_0x3ad0('0xd')][_0x3ad0('0xe')]>0x0){_0x4b31cf['adminId']=_0x570a79[_0x3ad0('0xd')][0x0][_0x3ad0('0xf')];}logger['info']('['+[_0x504501[_0x3ad0('0x10')]()]+_0x3ad0('0x11'),_0x4b31cf);_0x1f266d(_0x4b31cf);})[_0x3ad0('0x12')](function(_0x361764){logger[_0x3ad0('0x13')]('['+[_0x504501[_0x3ad0('0x10')]()]+']',_0x361764[_0x3ad0('0x14')]);_0x55459d(_0x361764['message']);});});}function getUser(_0x250795,_0x4b51c4,_0x4af20f,_0x2ed2d0,_0xde05a1){return function(_0x42ce49){logger[_0x3ad0('0x15')]('['+[_0x250795[_0x3ad0('0x10')]()]+'],\x20getUser\x20input\x20crm',_0x42ce49);return new Promise(function(_0x18da09,_0x5b024d){if(intUtil['validateEmail'](_0x42ce49[_0x3ad0('0x16')])){var _0x31d2d4={'method':_0x3ad0('0xa'),'uri':_0x4af20f+'sys_user?sysparm_query=email%3D'+_0x42ce49['userEmail']+'&'+_0x2ed2d0+'&'+_0xde05a1,'auth':_0x4b51c4,'json':!![]};logger[_0x3ad0('0x15')]('['+[_0x250795['toUpperCase']()]+_0x3ad0('0x17'),_0x31d2d4);return rp(_0x31d2d4)[_0x3ad0('0xc')](function(_0x1cd677){logger['info']('['+[_0x250795['toUpperCase']()]+'],\x20getUser\x20entity',_0x1cd677);if(_0x1cd677['result'][_0x3ad0('0xe')]>0x0&&String(_0x1cd677[_0x3ad0('0xd')][0x0]['active'])===_0x3ad0('0x18')){_0x42ce49[_0x3ad0('0x19')]=_0x1cd677['result'][0x0][_0x3ad0('0xf')];}else{_0x42ce49[_0x3ad0('0x19')]=_0x42ce49[_0x3ad0('0x1a')];_0x42ce49[_0x3ad0('0x16')]=_0x42ce49['adminEmail'];}logger[_0x3ad0('0x15')]('['+[_0x250795[_0x3ad0('0x10')]()]+_0x3ad0('0x1b'),_0x42ce49);_0x18da09(_0x42ce49);})[_0x3ad0('0x12')](function(_0x1f4549){logger[_0x3ad0('0x13')]('['+[_0x250795['toUpperCase']()]+']',_0x1f4549[_0x3ad0('0x14')]);_0x5b024d(_0x1f4549['message']);});}else{logger[_0x3ad0('0x15')]('['+[_0x250795[_0x3ad0('0x10')]()]+_0x3ad0('0x1c'));_0x42ce49[_0x3ad0('0x19')]=_0x42ce49[_0x3ad0('0x1a')];_0x42ce49[_0x3ad0('0x16')]=_0x42ce49[_0x3ad0('0x1d')];_0x18da09(_0x42ce49);}});};}function createEndUser(_0x383317,_0x227618,_0x2195a3,_0x3b2dc2,_0x53e4a2){logger[_0x3ad0('0x15')]('['+[_0x383317[_0x3ad0('0x10')]()]+_0x3ad0('0x1e'),_0x2195a3);return new Promise(function(_0x2b6139,_0x27ecc0){var _0x1e3de7={'method':'POST','uri':_0x3b2dc2+_0x3ad0('0x1f')+_0x53e4a2,'body':{'user_name':_0x2195a3[_0x3ad0('0x20')],'roles':_0x3ad0('0x21'),'first_name':_0x2195a3[_0x3ad0('0x20')],'active':_0x3ad0('0x18'),'date_format':_0x3ad0('0x22'),'phone':_0x2195a3[_0x3ad0('0x20')]},'auth':_0x227618,'json':!![]};return rp(_0x1e3de7)[_0x3ad0('0xc')](function(_0x3ebccb){logger[_0x3ad0('0x15')]('['+[_0x383317['toUpperCase']()]+_0x3ad0('0x23'),_0x3ebccb[_0x3ad0('0xd')]);_0x2195a3[_0x3ad0('0x24')]=_0x3ebccb['result'][_0x3ad0('0xf')];_0x2b6139(_0x2195a3);})[_0x3ad0('0x12')](function(_0x24a724){logger['error']('['+[_0x383317['toUpperCase']()]+']',_0x24a724['message']);_0x27ecc0(_0x24a724[_0x3ad0('0x14')]);});});}function getEndUser(_0x31842f,_0x278e13,_0x17882,_0x14feb5,_0x390404){return function(_0xc8a065){logger[_0x3ad0('0x15')]('['+[_0x31842f[_0x3ad0('0x10')]()]+_0x3ad0('0x25'),_0xc8a065);return new Promise(function(_0x356d65,_0x2c6a48){var _0xa842b0={'method':_0x3ad0('0xa'),'uri':_0x17882+_0x3ad0('0x26')+_0xc8a065[_0x3ad0('0x20')]+'&'+_0x14feb5+'&'+_0x390404,'auth':_0x278e13,'json':!![]};return rp(_0xa842b0)[_0x3ad0('0xc')](function(_0x58fc93){if(_0x58fc93[_0x3ad0('0xd')][_0x3ad0('0xe')]>0x0){_0xc8a065[_0x3ad0('0x24')]=_0x58fc93[_0x3ad0('0xd')][0x0][_0x3ad0('0xf')];logger[_0x3ad0('0x15')]('['+[_0x31842f[_0x3ad0('0x10')]()]+_0x3ad0('0x27'),_0xc8a065);_0x356d65(_0xc8a065);}else{return createEndUser(_0x31842f,_0x278e13,_0xc8a065,_0x17882,_0x14feb5)[_0x3ad0('0xc')](function(_0x270e3d){logger[_0x3ad0('0x15')]('['+[_0x31842f[_0x3ad0('0x10')]()]+_0x3ad0('0x28'),_0x270e3d);_0x356d65(_0x270e3d);});}})[_0x3ad0('0x12')](function(_0x712be){logger[_0x3ad0('0x13')]('['+[_0x31842f[_0x3ad0('0x10')]()]+']',_0x712be[_0x3ad0('0x14')]);_0x2c6a48(_0x712be[_0x3ad0('0x14')]);});});};}function getCustomFields(_0x36a66c,_0x1e1559){var _0x4966b2={};if(_0x36a66c['length']>0x0){_['forEach'](_0x36a66c,function(_0x4a7c93){if(_[_0x3ad0('0x29')]([_0x3ad0('0x2a'),_0x3ad0('0x2b')],_0x4a7c93[_0x3ad0('0x2c')])&&_0x4a7c93[_0x3ad0('0x2d')]&&!_0x4a7c93[_0x3ad0('0x2e')]){_0x4966b2[_0x4a7c93[_0x3ad0('0x2d')][_0x3ad0('0x2f')]()]=_0x4a7c93[_0x3ad0('0x30')]['toString']();}else if(_[_0x3ad0('0x29')]([_0x3ad0('0x2a'),_0x3ad0('0x2b')],_0x4a7c93[_0x3ad0('0x2c')])&&_0x4a7c93['idField']&&_0x4a7c93[_0x3ad0('0x2e')]){_0x4966b2[_0x4a7c93[_0x3ad0('0x31')][_0x3ad0('0x2f')]()]=_0x4a7c93[_0x3ad0('0x30')]['toString']();}else if(_0x4a7c93['type']===_0x3ad0('0x32')&&_0x4a7c93[_0x3ad0('0x33')]&&_0x4a7c93['idField']&&_0x4a7c93['customField']){_0x4966b2[_0x4a7c93[_0x3ad0('0x31')][_0x3ad0('0x2f')]()]=_0x1e1559[_0x4a7c93[_0x3ad0('0x33')]][_0x3ad0('0x34')]();}else if(_0x4a7c93[_0x3ad0('0x2c')]===_0x3ad0('0x35')&&_0x4a7c93[_0x3ad0('0x36')]&&_0x4a7c93[_0x3ad0('0x36')]['name']&&_0x4a7c93['idField']&&_0x4a7c93['customField']){_0x4966b2[_0x4a7c93[_0x3ad0('0x31')][_0x3ad0('0x2f')]()]=_0x1e1559[_0x4a7c93[_0x3ad0('0x36')]['name'][_0x3ad0('0x2f')]()]['toString']();}});}return _0x4966b2;}function getTicket(_0x450856,_0x4e252a,_0x39ed1d,_0x1bf83c,_0x5c0abd,_0x50c2a7){return function(_0x533358){logger[_0x3ad0('0x15')]('['+[_0x450856[_0x3ad0('0x10')]()]+_0x3ad0('0x37'),_0x533358);return new Promise(function(_0x41ba8f,_0x4a13f7){var _0x256e49=_0x450856[_0x3ad0('0x2f')]()===_0x3ad0('0x38')?_0x533358[_0x3ad0('0x19')]:_0x533358[_0x3ad0('0x24')];var _0x4d5851={'method':_0x3ad0('0x39'),'uri':_0x39ed1d+_0x3ad0('0x3a')+'?'+_0x50c2a7,'body':Object[_0x3ad0('0x3b')]({},{'active':_0x3ad0('0x18'),'caller_id':_0x256e49,'assigned_to':_0x533358[_0x3ad0('0x19')],'short_description':intUtil[_0x3ad0('0x3c')](_0x1bf83c['Subjects'],_0x5c0abd,'\x20'),'description':intUtil[_0x3ad0('0x3c')](_0x1bf83c[_0x3ad0('0x3d')],_0x5c0abd,'\x0a')},getCustomFields(_0x1bf83c['Fields'],_0x5c0abd)),'auth':_0x4e252a,'json':!![]};return rp(_0x4d5851)[_0x3ad0('0xc')](function(_0x1e3a60){logger[_0x3ad0('0x15')]('['+[_0x450856[_0x3ad0('0x10')]()]+_0x3ad0('0x3e'),_0x1e3a60[_0x3ad0('0xd')]);_0x533358[_0x3ad0('0x3f')]=_0x1e3a60['result'][_0x3ad0('0xf')];_0x533358[_0x3ad0('0x40')]=_0x1e3a60['result'][_0x3ad0('0x41')];logger[_0x3ad0('0x15')]('['+[_0x450856[_0x3ad0('0x10')]()]+_0x3ad0('0x42'),_0x533358);_0x41ba8f(_0x533358);})[_0x3ad0('0x12')](function(_0x619e7c){logger['error']('['+[_0x450856[_0x3ad0('0x10')]()]+']',_0x619e7c[_0x3ad0('0x14')]);_0x4a13f7(_0x619e7c['message']);});});};}function createRemoteTag(_0x191c0e,_0x278ed1,_0x33110d,_0x518b2c){return new Promise(function(_0x18b34a,_0x2e27e3){var _0x3ca9e2={'method':_0x3ad0('0x39'),'uri':_0x33110d+'label'+'?'+_0x518b2c,'body':{'short_description':_0x191c0e,'global':!![],'active':!![],'name':_0x191c0e},'auth':_0x278ed1,'json':!![]};return rp(_0x3ca9e2)[_0x3ad0('0xc')](function(_0x5b75f7){var _0x15465b=_0x5b75f7[_0x3ad0('0xd')][_0x3ad0('0xf')];_0x18b34a(_0x15465b);});});}function getRemoteTag(_0x4a3e48,_0x274938,_0x568adf,_0x5707f3,_0x1ed745){return new Promise(function(_0x1b637b,_0x4b8053){var _0x181f94={'method':_0x3ad0('0xa'),'uri':_0x568adf+'label'+'?sysparm_query=name%3D'+_0x4a3e48+'&'+_0x5707f3,'auth':_0x274938,'json':!![]};return rp(_0x181f94)[_0x3ad0('0xc')](function(_0x52ab49){if(_0x52ab49[_0x3ad0('0xd')][_0x3ad0('0xe')]>0x0){var _0xd8862d=_0x52ab49['result'][0x0][_0x3ad0('0xf')];_0x1b637b(_0xd8862d);}else{return createRemoteTag(_0x4a3e48,_0x274938,_0x568adf,_0x5707f3)['then'](function(_0x2175e9){_0x1b637b(_0x2175e9);});}});});}function assignTagToIncident(_0x3b1c40,_0x1794b5,_0x3a5438,_0x31ccb3,_0x5c1584){return new Promise(function(_0x486147,_0xa9cf25){var _0x5630f3={'method':'POST','uri':_0x3a5438+_0x3ad0('0x43')+'?'+_0x5c1584,'body':{'label':_0x3b1c40,'table':_0x3ad0('0x3a'),'id_type':_0x3ad0('0x44'),'table_key':_0x31ccb3['ticketId'],'title':'Incident\x20-\x20'+_0x31ccb3[_0x3ad0('0x40')],'id_display':_0x31ccb3[_0x3ad0('0x40')]},'auth':_0x1794b5,'json':!![]};return rp(_0x5630f3)['then'](function(_0x48cb03){_0x486147();})[_0x3ad0('0x12')](function(){_0x486147();});});}function manageTags(_0x53ecb3,_0x527807,_0x179f07,_0x5f5634,_0x11a7fc,_0x58bd98,_0x408502){return new Promise(function(_0x5e5b22,_0x4d356d){var _0x60408d=[];_0x527807[_0x3ad0('0x45')](function(_0x56ef82){_0x60408d[_0x3ad0('0x46')](getRemoteTag(_0x56ef82,_0x179f07,_0x5f5634,_0x58bd98,_0x408502));});return Promise[_0x3ad0('0x47')](_0x60408d)[_0x3ad0('0xc')](function(_0x286216){if(_0x286216['length']){logger[_0x3ad0('0x15')]('['+[_0x53ecb3[_0x3ad0('0x10')]()]+_0x3ad0('0x48'),_0x286216);var _0x228216=[];_0x286216[_0x3ad0('0x45')](function(_0x47f008){_0x228216[_0x3ad0('0x46')](assignTagToIncident(_0x47f008,_0x179f07,_0x5f5634,_0x11a7fc,_0x58bd98));});return Promise['all'](_0x228216)[_0x3ad0('0xc')](function(){_0x5e5b22();})[_0x3ad0('0x12')](function(){_0x5e5b22();});}else{_0x5e5b22();}});});}function getTags(_0x151407,_0x55d298,_0x5466ab,_0x3bb04b,_0x2dad34,_0x3bdeee){return function(_0x521c74){return new Promise(function(_0x46f08f,_0x176bd6){var _0x2cbdf7=[];var _0x5623d3=_0x3bb04b['Tags'];if(_0x5623d3&&_0x5623d3[_0x3ad0('0xe')]>0x0){_0x2cbdf7=_['map'](_0x5623d3,_0x3ad0('0x49'));}if(_0x2cbdf7[_0x3ad0('0xe')]>0x0){return manageTags(_0x151407,_0x2cbdf7,_0x55d298,_0x5466ab,_0x521c74,_0x2dad34,_0x3bdeee)[_0x3ad0('0xc')](function(){_0x46f08f(_0x521c74);});}else{_0x46f08f(_0x521c74);}});};}function emit(_0xe55175,_0x14634f,_0x392c61){var _0xee4c77=_0x3ad0('0x4a')+_0x3ad0('0x4b')+'%26sysparm_record_list%3Dactive%253Dtrue'+_0x3ad0('0x4c');var _0x55296e={'uri':_0xe55175+_0x3ad0('0x4d')+_0x392c61+_0xee4c77};io['to'](util['format'](_0x3ad0('0x4e'),_0x14634f))[_0x3ad0('0x4f')]('trigger:browser:url',_0x55296e);}exports['cs']=function(_0x1bc19b,_0x4a7db5,_0x51540b,_0x1dbb28,_0x4ca250,_0x5be011,_0x37e436,_0x17efa4){var _0x2dceeb={};var _0x47640c={'user':_0x5be011[_0x3ad0('0x50')],'pass':_0x5be011[_0x3ad0('0x51')]};var _0x530c99=_0x3ad0('0x52');var _0x8d9045=_0x3ad0('0x53');_0x5be011[_0x3ad0('0x54')]=intUtil[_0x3ad0('0x55')](_0x5be011[_0x3ad0('0x54')]);_0x5be011[_0x3ad0('0x56')]=intUtil[_0x3ad0('0x55')](_0x5be011[_0x3ad0('0x56')]);var _0x33f854=util['format']('%s/api/now/table/',_0x5be011[_0x3ad0('0x54')]);_0x2dceeb['userEmail']=!_['isNil'](_0x1dbb28)?_0x1dbb28['email']:null;_0x2dceeb[_0x3ad0('0x1d')]=_0x5be011[_0x3ad0('0x57')];_0x2dceeb[_0x3ad0('0x20')]=_0x17efa4['toLowerCase']()===_0x3ad0('0x38')?_0x4a7db5['destcalleridnum']:_0x4a7db5[_0x3ad0('0x58')];_0x2dceeb[_0x3ad0('0x59')]=_0x17efa4===_0x3ad0('0x5a')||_0x17efa4==='unmanaged'?_0x3ad0('0x5a'):_0x3ad0('0x38');var _0x5c5662=util[_0x3ad0('0x5b')](_0x3ad0('0x5c'),_0x5be011[_0x3ad0('0x56')],_0x4a7db5[_0x3ad0('0x5d')],md5(_0x4a7db5[_0x3ad0('0x5d')]));if(_0x4ca250&&_0x4ca250[_0x3ad0('0x5e')]){logger[_0x3ad0('0x15')](_0x3ad0('0x5f'),_0x3ad0('0x60'));_0x4a7db5['recordingURL']=_0x5c5662;}else if(_0x37e436&&_0x37e436['recordingFormat']&&_0x37e436[_0x3ad0('0x61')]!=='none'){logger[_0x3ad0('0x15')](_0x3ad0('0x62'),'Recording\x20is\x20enabled!');_0x4a7db5[_0x3ad0('0x63')]=_0x5c5662;}else{_0x4a7db5['recordingURL']='';}return getAdminUser(_0x17efa4,_0x47640c,_0x2dceeb,_0x33f854,_0x8d9045,_0x530c99)[_0x3ad0('0xc')](getUser(_0x17efa4,_0x47640c,_0x33f854,_0x8d9045,_0x530c99))[_0x3ad0('0xc')](getEndUser(_0x17efa4,_0x47640c,_0x33f854,_0x8d9045,_0x530c99))[_0x3ad0('0xc')](getTicket(_0x17efa4,_0x47640c,_0x33f854,_0x51540b,_0x4a7db5,_0x8d9045))[_0x3ad0('0xc')](function(_0x4d44f0){logger[_0x3ad0('0x15')](util[_0x3ad0('0x5b')]('The\x20ticket\x20ID\x20is:\x20%s',_0x4d44f0[_0x3ad0('0x3f')]));logger[_0x3ad0('0x15')](util[_0x3ad0('0x5b')](_0x3ad0('0x64'),_0x17efa4));if(_0x17efa4!==_0x3ad0('0x65')){logger[_0x3ad0('0x15')]('['+[_0x17efa4['toUpperCase']()]+']',_0x3ad0('0x66'));emit(_0x5be011['remoteUri'],_0x1dbb28['name'],_0x4d44f0[_0x3ad0('0x3f')]);}})[_0x3ad0('0x12')](function(_0x5cc21d){logger[_0x3ad0('0x13')]('['+[_0x17efa4[_0x3ad0('0x10')]()]+_0x3ad0('0x67'),util[_0x3ad0('0x68')](_0x5cc21d,{'showHidden':!![],'depth':null}));});}; \ No newline at end of file +var _0x1f11=['%26sysparm_record_list%3Dactive%253Dtrue','%255EORDERBYDESCnumber','/nav_to.do?uri=incident.do?sys_id%3D','user:%s','emit','trigger:browser:url','username','password','sysparm_limit=1','remoteUri','stripTrailingSlash','serverUrl','format','%s/api/now/table/','email','destcalleridnum','calleridnum','callDirection','unmanaged','%s/api/voice/recordings/%s/downloads?type=uniqueid&token=%s','uniqueid','Recording\x20is\x20enabled!','recordingURL','recordingFormat','none','[OUTBOUND]','The\x20ticket\x20ID\x20is:\x20%s','call\x20direction:\x20%s','Displaying\x20call\x20in\x20a\x20new\x20tab...',']\x20Error\x20running\x20ServiceNow\x20integration','inspect','lodash','util','ioredis','./util','../../../../config/logger','servicenow','redis','localhost','socket.io-emitter','GET','sys_user?sysparm_query=user_name%3Dadmin','then','result','length','sys_id','info','toUpperCase','catch','error','message','validateEmail','userEmail','sys_user?sysparm_query=email%3D','],\x20getUser\x20entity','active','userId','adminId','adminEmail',']\x20using\x20admin\x20profile','],\x20createEndUser\x20input\x20crm','POST','sys_user?','endUserNumber','user','System','],\x20EndUser\x20schema','],\x20getEndUser\x20input\x20crm','sys_user?sysparm_query=phone%3D','endUserId','],\x20getEndUser\x20crm','],\x20createEndUser\x20crm','forEach','includes','string','picklist','type','nameField','customField','toString','idField','content','variable','toLowerCase','variableName','Variable','name',']\x20getTicket\x20input\x20crm','outbound','assign','true','getString','Descriptions',']\x20POST\x20incident\x20entity\x20schema','ticketId','number','label','?sysparm_query=name%3D','label_entry','incident','Incident','Incident\x20-\x20','ticketNumber','push','all',']\x20arrayPromises:\x20IDs\x20in\x20table\x20label','map','%26sysparm_record_target%3Dincident','%26sysparm_record_row%3D1%26sysparm_record_rows%3D39'];(function(_0x9f2f3f,_0x55b2d1){var _0x26998b=function(_0x13895f){while(--_0x13895f){_0x9f2f3f['push'](_0x9f2f3f['shift']());}};_0x26998b(++_0x55b2d1);}(_0x1f11,0x1d3));var _0x11f1=function(_0x5a2162,_0x5a90a3){_0x5a2162=_0x5a2162-0x0;var _0x4561a7=_0x1f11[_0x5a2162];return _0x4561a7;};'use strict';var _=require(_0x11f1('0x0'));var Promise=require('bluebird');var rp=require('request-promise');var util=require(_0x11f1('0x1'));var md5=require('md5');var Redis=require(_0x11f1('0x2'));var intUtil=require(_0x11f1('0x3'));var config=require('../../../../config/environment');var logger=require(_0x11f1('0x4'))(_0x11f1('0x5'));config[_0x11f1('0x6')]=_['defaults'](config[_0x11f1('0x6')],{'host':_0x11f1('0x7'),'port':0x18eb});var io=require(_0x11f1('0x8'))(new Redis(config[_0x11f1('0x6')]));function getAdminUser(_0x4e6d9f,_0x1a8ee7,_0x48e549,_0x2643ef,_0x3d34b7,_0x6a1c2){return new Promise(function(_0x39b79b,_0x378ba0){var _0x554f67={'method':_0x11f1('0x9'),'uri':_0x2643ef+_0x11f1('0xa')+'&'+_0x3d34b7+'&'+_0x6a1c2,'auth':_0x1a8ee7,'json':!![]};return rp(_0x554f67)[_0x11f1('0xb')](function(_0x96c16e){if(_0x96c16e[_0x11f1('0xc')][_0x11f1('0xd')]>0x0){_0x48e549['adminId']=_0x96c16e[_0x11f1('0xc')][0x0][_0x11f1('0xe')];}logger[_0x11f1('0xf')]('['+[_0x4e6d9f[_0x11f1('0x10')]()]+'],\x20getAdminUser\x20crm',_0x48e549);_0x39b79b(_0x48e549);})[_0x11f1('0x11')](function(_0x30aaba){logger[_0x11f1('0x12')]('['+[_0x4e6d9f['toUpperCase']()]+']',_0x30aaba[_0x11f1('0x13')]);_0x378ba0(_0x30aaba['message']);});});}function getUser(_0x496bd1,_0x10eb27,_0x20bb68,_0xfed7b1,_0x269362){return function(_0xad5ac0){logger['info']('['+[_0x496bd1[_0x11f1('0x10')]()]+'],\x20getUser\x20input\x20crm',_0xad5ac0);return new Promise(function(_0xea15b6,_0x476f64){if(intUtil[_0x11f1('0x14')](_0xad5ac0[_0x11f1('0x15')])){var _0x3b25cd={'method':_0x11f1('0x9'),'uri':_0x20bb68+_0x11f1('0x16')+_0xad5ac0[_0x11f1('0x15')]+'&'+_0xfed7b1+'&'+_0x269362,'auth':_0x10eb27,'json':!![]};logger[_0x11f1('0xf')]('['+[_0x496bd1[_0x11f1('0x10')]()]+'],\x20getUser\x20rp\x20obj',_0x3b25cd);return rp(_0x3b25cd)[_0x11f1('0xb')](function(_0x53f5e5){logger[_0x11f1('0xf')]('['+[_0x496bd1['toUpperCase']()]+_0x11f1('0x17'),_0x53f5e5);if(_0x53f5e5[_0x11f1('0xc')]['length']>0x0&&String(_0x53f5e5[_0x11f1('0xc')][0x0][_0x11f1('0x18')])==='true'){_0xad5ac0['userId']=_0x53f5e5[_0x11f1('0xc')][0x0][_0x11f1('0xe')];}else{_0xad5ac0[_0x11f1('0x19')]=_0xad5ac0[_0x11f1('0x1a')];_0xad5ac0['userEmail']=_0xad5ac0[_0x11f1('0x1b')];}logger[_0x11f1('0xf')]('['+[_0x496bd1['toUpperCase']()]+'],\x20getUser\x20crm',_0xad5ac0);_0xea15b6(_0xad5ac0);})['catch'](function(_0x3f8d89){logger[_0x11f1('0x12')]('['+[_0x496bd1[_0x11f1('0x10')]()]+']',_0x3f8d89[_0x11f1('0x13')]);_0x476f64(_0x3f8d89[_0x11f1('0x13')]);});}else{logger[_0x11f1('0xf')]('['+[_0x496bd1['toUpperCase']()]+_0x11f1('0x1c'));_0xad5ac0[_0x11f1('0x19')]=_0xad5ac0[_0x11f1('0x1a')];_0xad5ac0[_0x11f1('0x15')]=_0xad5ac0[_0x11f1('0x1b')];_0xea15b6(_0xad5ac0);}});};}function createEndUser(_0x78ed11,_0x1eb621,_0x3fe265,_0x332388,_0x2e28d8){logger[_0x11f1('0xf')]('['+[_0x78ed11[_0x11f1('0x10')]()]+_0x11f1('0x1d'),_0x3fe265);return new Promise(function(_0xabe934,_0x125c52){var _0x43dcfe={'method':_0x11f1('0x1e'),'uri':_0x332388+_0x11f1('0x1f')+_0x2e28d8,'body':{'user_name':_0x3fe265[_0x11f1('0x20')],'roles':_0x11f1('0x21'),'first_name':_0x3fe265['endUserNumber'],'active':'true','date_format':_0x11f1('0x22'),'phone':_0x3fe265[_0x11f1('0x20')]},'auth':_0x1eb621,'json':!![]};return rp(_0x43dcfe)[_0x11f1('0xb')](function(_0x565117){logger[_0x11f1('0xf')]('['+[_0x78ed11[_0x11f1('0x10')]()]+_0x11f1('0x23'),_0x565117[_0x11f1('0xc')]);_0x3fe265['endUserId']=_0x565117[_0x11f1('0xc')][_0x11f1('0xe')];_0xabe934(_0x3fe265);})[_0x11f1('0x11')](function(_0x2c2c4b){logger[_0x11f1('0x12')]('['+[_0x78ed11[_0x11f1('0x10')]()]+']',_0x2c2c4b[_0x11f1('0x13')]);_0x125c52(_0x2c2c4b[_0x11f1('0x13')]);});});}function getEndUser(_0x4513f5,_0x4abd8b,_0x5e16df,_0xae8182,_0x330aff){return function(_0xe8a4ac){logger[_0x11f1('0xf')]('['+[_0x4513f5['toUpperCase']()]+_0x11f1('0x24'),_0xe8a4ac);return new Promise(function(_0x2567a0,_0x4fb119){var _0x5e4c15={'method':_0x11f1('0x9'),'uri':_0x5e16df+_0x11f1('0x25')+_0xe8a4ac[_0x11f1('0x20')]+'&'+_0xae8182+'&'+_0x330aff,'auth':_0x4abd8b,'json':!![]};return rp(_0x5e4c15)[_0x11f1('0xb')](function(_0x486aad){if(_0x486aad['result']['length']>0x0){_0xe8a4ac[_0x11f1('0x26')]=_0x486aad[_0x11f1('0xc')][0x0][_0x11f1('0xe')];logger['info']('['+[_0x4513f5['toUpperCase']()]+_0x11f1('0x27'),_0xe8a4ac);_0x2567a0(_0xe8a4ac);}else{return createEndUser(_0x4513f5,_0x4abd8b,_0xe8a4ac,_0x5e16df,_0xae8182)[_0x11f1('0xb')](function(_0x2cbf62){logger[_0x11f1('0xf')]('['+[_0x4513f5[_0x11f1('0x10')]()]+_0x11f1('0x28'),_0x2cbf62);_0x2567a0(_0x2cbf62);});}})[_0x11f1('0x11')](function(_0x8daed4){logger[_0x11f1('0x12')]('['+[_0x4513f5[_0x11f1('0x10')]()]+']',_0x8daed4[_0x11f1('0x13')]);_0x4fb119(_0x8daed4['message']);});});};}function getCustomFields(_0x33c65c,_0x34888e){var _0x32e453={};if(_0x33c65c['length']>0x0){_[_0x11f1('0x29')](_0x33c65c,function(_0x5d47fb){if(_[_0x11f1('0x2a')]([_0x11f1('0x2b'),_0x11f1('0x2c')],_0x5d47fb[_0x11f1('0x2d')])&&_0x5d47fb[_0x11f1('0x2e')]&&!_0x5d47fb[_0x11f1('0x2f')]){_0x32e453[_0x5d47fb[_0x11f1('0x2e')]['toLowerCase']()]=_0x5d47fb['content'][_0x11f1('0x30')]();}else if(_[_0x11f1('0x2a')]([_0x11f1('0x2b'),_0x11f1('0x2c')],_0x5d47fb[_0x11f1('0x2d')])&&_0x5d47fb['idField']&&_0x5d47fb[_0x11f1('0x2f')]){_0x32e453[_0x5d47fb[_0x11f1('0x31')]['toLowerCase']()]=_0x5d47fb[_0x11f1('0x32')][_0x11f1('0x30')]();}else if(_0x5d47fb[_0x11f1('0x2d')]===_0x11f1('0x33')&&_0x5d47fb['variableName']&&_0x5d47fb[_0x11f1('0x31')]&&_0x5d47fb[_0x11f1('0x2f')]){_0x32e453[_0x5d47fb['idField'][_0x11f1('0x34')]()]=_0x34888e[_0x5d47fb[_0x11f1('0x35')]]['toString']();}else if(_0x5d47fb[_0x11f1('0x2d')]==='customVariable'&&_0x5d47fb[_0x11f1('0x36')]&&_0x5d47fb[_0x11f1('0x36')][_0x11f1('0x37')]&&_0x5d47fb[_0x11f1('0x31')]&&_0x5d47fb['customField']){_0x32e453[_0x5d47fb[_0x11f1('0x31')][_0x11f1('0x34')]()]=_0x34888e[_0x5d47fb['Variable'][_0x11f1('0x37')][_0x11f1('0x34')]()]['toString']();}});}return _0x32e453;}function getTicket(_0x5764a9,_0x47e9cf,_0x6c3cd,_0x47df23,_0x404cd6,_0x559682){return function(_0x4d06f7){logger[_0x11f1('0xf')]('['+[_0x5764a9[_0x11f1('0x10')]()]+_0x11f1('0x38'),_0x4d06f7);return new Promise(function(_0x7d34db,_0x2f2bd8){var _0x34a10b=_0x5764a9[_0x11f1('0x34')]()===_0x11f1('0x39')?_0x4d06f7[_0x11f1('0x19')]:_0x4d06f7['endUserId'];var _0x4f5696={'method':'POST','uri':_0x6c3cd+'incident'+'?'+_0x559682,'body':Object[_0x11f1('0x3a')]({},{'active':_0x11f1('0x3b'),'caller_id':_0x34a10b,'assigned_to':_0x4d06f7['userId'],'short_description':intUtil['getString'](_0x47df23['Subjects'],_0x404cd6,'\x20'),'description':intUtil[_0x11f1('0x3c')](_0x47df23[_0x11f1('0x3d')],_0x404cd6,'\x0a')},getCustomFields(_0x47df23['Fields'],_0x404cd6)),'auth':_0x47e9cf,'json':!![]};return rp(_0x4f5696)[_0x11f1('0xb')](function(_0x5bae95){logger[_0x11f1('0xf')]('['+[_0x5764a9[_0x11f1('0x10')]()]+_0x11f1('0x3e'),_0x5bae95['result']);_0x4d06f7[_0x11f1('0x3f')]=_0x5bae95[_0x11f1('0xc')][_0x11f1('0xe')];_0x4d06f7['ticketNumber']=_0x5bae95[_0x11f1('0xc')][_0x11f1('0x40')];logger['info']('['+[_0x5764a9[_0x11f1('0x10')]()]+']\x20getTicket\x20crm',_0x4d06f7);_0x7d34db(_0x4d06f7);})[_0x11f1('0x11')](function(_0x8415a5){logger[_0x11f1('0x12')]('['+[_0x5764a9[_0x11f1('0x10')]()]+']',_0x8415a5['message']);_0x2f2bd8(_0x8415a5[_0x11f1('0x13')]);});});};}function createRemoteTag(_0x279fab,_0x14f1b4,_0x5cee6e,_0x53b143){return new Promise(function(_0x97776c,_0x425dff){var _0x1b7bf8={'method':_0x11f1('0x1e'),'uri':_0x5cee6e+_0x11f1('0x41')+'?'+_0x53b143,'body':{'short_description':_0x279fab,'global':!![],'active':!![],'name':_0x279fab},'auth':_0x14f1b4,'json':!![]};return rp(_0x1b7bf8)[_0x11f1('0xb')](function(_0x30232e){var _0x34bfbb=_0x30232e['result'][_0x11f1('0xe')];_0x97776c(_0x34bfbb);});});}function getRemoteTag(_0x49c811,_0x437155,_0xb8b996,_0x3e827e,_0x557d1b){return new Promise(function(_0x5007fb,_0x3cc8a5){var _0x215493={'method':'GET','uri':_0xb8b996+_0x11f1('0x41')+_0x11f1('0x42')+_0x49c811+'&'+_0x3e827e,'auth':_0x437155,'json':!![]};return rp(_0x215493)[_0x11f1('0xb')](function(_0x24a6ee){if(_0x24a6ee['result'][_0x11f1('0xd')]>0x0){var _0x569b82=_0x24a6ee[_0x11f1('0xc')][0x0][_0x11f1('0xe')];_0x5007fb(_0x569b82);}else{return createRemoteTag(_0x49c811,_0x437155,_0xb8b996,_0x3e827e)[_0x11f1('0xb')](function(_0xda8f5d){_0x5007fb(_0xda8f5d);});}});});}function assignTagToIncident(_0x10667f,_0x178b55,_0xa7f286,_0x22e85b,_0x35c755){return new Promise(function(_0x465cb9,_0x441ae9){var _0x2ce174={'method':_0x11f1('0x1e'),'uri':_0xa7f286+_0x11f1('0x43')+'?'+_0x35c755,'body':{'label':_0x10667f,'table':_0x11f1('0x44'),'id_type':_0x11f1('0x45'),'table_key':_0x22e85b[_0x11f1('0x3f')],'title':_0x11f1('0x46')+_0x22e85b[_0x11f1('0x47')],'id_display':_0x22e85b['ticketNumber']},'auth':_0x178b55,'json':!![]};return rp(_0x2ce174)[_0x11f1('0xb')](function(_0x20abdf){_0x465cb9();})[_0x11f1('0x11')](function(){_0x465cb9();});});}function manageTags(_0x1c390c,_0x2b1ba5,_0x45eaa0,_0x49b5a0,_0xe5796a,_0x43910b,_0x37fe7b){return new Promise(function(_0x399fa0,_0xf23bab){var _0xaafdeb=[];_0x2b1ba5[_0x11f1('0x29')](function(_0x18fe9a){_0xaafdeb[_0x11f1('0x48')](getRemoteTag(_0x18fe9a,_0x45eaa0,_0x49b5a0,_0x43910b,_0x37fe7b));});return Promise[_0x11f1('0x49')](_0xaafdeb)[_0x11f1('0xb')](function(_0x5bafe8){if(_0x5bafe8[_0x11f1('0xd')]){logger['info']('['+[_0x1c390c[_0x11f1('0x10')]()]+_0x11f1('0x4a'),_0x5bafe8);var _0x399019=[];_0x5bafe8[_0x11f1('0x29')](function(_0x51c775){_0x399019[_0x11f1('0x48')](assignTagToIncident(_0x51c775,_0x45eaa0,_0x49b5a0,_0xe5796a,_0x43910b));});return Promise[_0x11f1('0x49')](_0x399019)[_0x11f1('0xb')](function(){_0x399fa0();})[_0x11f1('0x11')](function(){_0x399fa0();});}else{_0x399fa0();}});});}function getTags(_0x119ddd,_0x351ed7,_0x5191a2,_0xad333,_0xffbbe5,_0x1b5066){return function(_0x419c8e){return new Promise(function(_0xfe79cc,_0x43b8c6){var _0x324840=[];var _0x2bb760=_0xad333['Tags'];if(_0x2bb760&&_0x2bb760[_0x11f1('0xd')]>0x0){_0x324840=_[_0x11f1('0x4b')](_0x2bb760,_0x11f1('0x37'));}if(_0x324840[_0x11f1('0xd')]>0x0){return manageTags(_0x119ddd,_0x324840,_0x351ed7,_0x5191a2,_0x419c8e,_0xffbbe5,_0x1b5066)['then'](function(){_0xfe79cc(_0x419c8e);});}else{_0xfe79cc(_0x419c8e);}});};}function emit(_0x6c683d,_0x493bd1,_0x5bbe0c){var _0x56a2b4=_0x11f1('0x4c')+_0x11f1('0x4d')+_0x11f1('0x4e')+_0x11f1('0x4f');var _0x2f42f2={'uri':_0x6c683d+_0x11f1('0x50')+_0x5bbe0c+_0x56a2b4};io['to'](util['format'](_0x11f1('0x51'),_0x493bd1))[_0x11f1('0x52')](_0x11f1('0x53'),_0x2f42f2);}exports['cs']=function(_0x4414d9,_0x3f8db4,_0x19f584,_0x2b79c6,_0x36fb4f,_0x4ddbdb,_0x2d8c5d,_0x584665){var _0x2f8edf={};var _0xf2617c={'user':_0x4ddbdb[_0x11f1('0x54')],'pass':_0x4ddbdb[_0x11f1('0x55')]};var _0xa1fbd6=_0x11f1('0x56');var _0x5abdf2='sysparm_display_value=true';_0x4ddbdb[_0x11f1('0x57')]=intUtil[_0x11f1('0x58')](_0x4ddbdb[_0x11f1('0x57')]);_0x4ddbdb[_0x11f1('0x59')]=intUtil[_0x11f1('0x58')](_0x4ddbdb[_0x11f1('0x59')]);var _0x28de86=util[_0x11f1('0x5a')](_0x11f1('0x5b'),_0x4ddbdb[_0x11f1('0x57')]);_0x2f8edf[_0x11f1('0x15')]=!_['isNil'](_0x2b79c6)?_0x2b79c6[_0x11f1('0x5c')]:null;_0x2f8edf[_0x11f1('0x1b')]=_0x4ddbdb[_0x11f1('0x5c')];_0x2f8edf[_0x11f1('0x20')]=_0x584665['toLowerCase']()==='outbound'?_0x3f8db4[_0x11f1('0x5d')]:_0x3f8db4[_0x11f1('0x5e')];_0x2f8edf[_0x11f1('0x5f')]=_0x584665==='queue'||_0x584665===_0x11f1('0x60')?'queue':_0x11f1('0x39');var _0x356ceb=util[_0x11f1('0x5a')](_0x11f1('0x61'),_0x4ddbdb[_0x11f1('0x59')],_0x3f8db4['uniqueid'],md5(_0x3f8db4[_0x11f1('0x62')]));if(_0x36fb4f&&_0x36fb4f['monitor_format']){logger['info']('[QUEUE]',_0x11f1('0x63'));_0x3f8db4[_0x11f1('0x64')]=_0x356ceb;}else if(_0x2d8c5d&&_0x2d8c5d[_0x11f1('0x65')]&&_0x2d8c5d[_0x11f1('0x65')]!==_0x11f1('0x66')){logger['info'](_0x11f1('0x67'),_0x11f1('0x63'));_0x3f8db4['recordingURL']=_0x356ceb;}else{_0x3f8db4['recordingURL']='';}return getAdminUser(_0x584665,_0xf2617c,_0x2f8edf,_0x28de86,_0x5abdf2,_0xa1fbd6)[_0x11f1('0xb')](getUser(_0x584665,_0xf2617c,_0x28de86,_0x5abdf2,_0xa1fbd6))[_0x11f1('0xb')](getEndUser(_0x584665,_0xf2617c,_0x28de86,_0x5abdf2,_0xa1fbd6))[_0x11f1('0xb')](getTicket(_0x584665,_0xf2617c,_0x28de86,_0x19f584,_0x3f8db4,_0x5abdf2))[_0x11f1('0xb')](function(_0x1f7b6e){logger[_0x11f1('0xf')](util[_0x11f1('0x5a')](_0x11f1('0x68'),_0x1f7b6e[_0x11f1('0x3f')]));logger[_0x11f1('0xf')](util[_0x11f1('0x5a')](_0x11f1('0x69'),_0x584665));if(_0x584665!=='unmanaged'){logger[_0x11f1('0xf')]('['+[_0x584665['toUpperCase']()]+']',_0x11f1('0x6a'));emit(_0x4ddbdb['remoteUri'],_0x2b79c6['name'],_0x1f7b6e[_0x11f1('0x3f')]);}})[_0x11f1('0x11')](function(_0x37d750){logger[_0x11f1('0x12')]('['+[_0x584665[_0x11f1('0x10')]()]+_0x11f1('0x6b'),util[_0x11f1('0x6c')](_0x37d750,{'showHidden':!![],'depth':null}));});}; \ No newline at end of file diff --git a/server/services/ami/trigger/integration/sugarcrm.js b/server/services/ami/trigger/integration/sugarcrm.js index 2406e9b..36f6f3b 100644 --- a/server/services/ami/trigger/integration/sugarcrm.js +++ b/server/services/ami/trigger/integration/sugarcrm.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x693f=['login','username','password','PLAIN','xCALLY\x20Motion\x20integration','Account\x20%d\x20is\x20not\x20valid','queue','remoteUri','serverUrl','stripTrailingSlash','uri','%s/service/v4_1/rest.php','monitor_format','[QUEUE]','uniqueid','calleridname','calleridnum','Fields','Inbound','Ticket\x20created!','The\x20Ticket\x20ID\x20is:','contacts','version','%s/index.php?action=ajaxui#ajaxUILoc=index.php%3Fmodule%3DCalls%26action%3DEditView%26record%3D%s','Displaying\x20ticket\x20to\x20agent\x20in\x20a\x20new\x20tab...','user:%s','trigger:browser:url','outbound','recordingFormat','none','[OUTBOUND]','Recording\x20is\x20enabled!','recordingURL','destcalleridname','destcalleridnum','The\x20Enduser\x20ID\x20is:','Outbound','users','charAt','catch','unmanaged','lastevent','toUpperCase','%s/api/voice/recordings/%s/downloads?type=uniqueid&token=%s','bluebird','util','../../../../config/environment','../../../../config/logger','sugarcrm','redis','defaults','localhost','socket.io-emitter','emit','info','Creating\x20new\x20ticket...','Subjects','assigned_user_id','created_by','description','Descriptions','date_start','replace','duration_hours','duration_minutes','parent_id','parent_type','parent_name','name','direction','length','variableName','idField','set_entry','JSON','stringify','Calls','format','Basic\x20%s','apiKey','toString','get_server_info','Getting\x20agent\x20with\x20name','get_entry_list','Employees','then','entry_list','find','value','Agent\x20found!','resolve','name_value_list','Agent\x20not\x20found,\x20using\x20the\x20admin\x20account!','user_name','Agent\x20not\x20available,\x20using\x20the\x20admin\x20account!','Searching\x20enduser\x20with\x20phone','Contacts','contacts.phone_home\x20=\x20\x22%s\x22','phone_home','Enduser\x20found!','first_name','Caller\x20-\x20%s','Enduser\x20created.','[HTTP]','merge','map','type','string','nameField','customField','toLowerCase','content','push','variable','custom_fields','customVariable','Variable','POST'];(function(_0x4bb581,_0x6f7037){var _0x316bf5=function(_0x1f6ed0){while(--_0x1f6ed0){_0x4bb581['push'](_0x4bb581['shift']());}};_0x316bf5(++_0x6f7037);}(_0x693f,0x118));var _0xf693=function(_0x20a584,_0xe384a5){_0x20a584=_0x20a584-0x0;var _0x4b41a8=_0x693f[_0x20a584];return _0x4b41a8;};'use strict';var _=require('lodash');var rp=require('request-promise');var BPromise=require(_0xf693('0x0'));var md5=require('md5');var util=require(_0xf693('0x1'));var Redis=require('ioredis');var intUtil=require('./util');var config=require(_0xf693('0x2'));var logger=require(_0xf693('0x3'))(_0xf693('0x4'));config[_0xf693('0x5')]=_[_0xf693('0x6')](config[_0xf693('0x5')],{'host':_0xf693('0x7'),'port':0x18eb});var io=require(_0xf693('0x8'))(new Redis(config[_0xf693('0x5')]));var def={'method':'POST','json':!![]};function emit(_0x35a373,_0x1555cf,_0x1ebbeb){io['to'](_0x35a373)[_0xf693('0x9')](_0x1555cf,_0x1ebbeb);}function getTicket(_0x3eeda9,_0x4159fb,_0x26a8a5,_0x2e35b7,_0x10fc89,_0x19e0b4,_0x3c82f8,_0x4ce79c){logger[_0xf693('0xa')](_0xf693('0xb'));var _0x42db60=new Date();var _0x3d572e=[{'name':'name','value':intUtil['getString'](_0x2e35b7[_0xf693('0xc')],_0x10fc89,'\x20')},{'name':_0xf693('0xd'),'value':_0x4159fb['id']},{'name':_0xf693('0xe'),'value':_0x4159fb['id']},{'name':_0xf693('0xf'),'value':intUtil['getString'](_0x2e35b7[_0xf693('0x10')],_0x10fc89,'\x0a')},{'name':_0xf693('0x11'),'value':_0x42db60['toISOString']()['slice'](0x0,0x13)[_0xf693('0x12')]('T','\x20')},{'name':_0xf693('0x13'),'value':'0'},{'name':_0xf693('0x14'),'value':'15'},{'name':_0xf693('0x15'),'value':_0x26a8a5['id']},{'name':_0xf693('0x16'),'value':'Contacts'},{'name':_0xf693('0x17'),'value':_0x26a8a5[_0xf693('0x18')]},{'name':_0xf693('0x19'),'value':_0x4ce79c}];if(_0x19e0b4[_0xf693('0x1a')]){_['forEach'](_0x19e0b4,function(_0x19d0e2){if(_0x10fc89[_0x19d0e2[_0xf693('0x1b')]]){_0x3d572e['push']({'name':_0x19d0e2[_0xf693('0x1c')],'value':_0x10fc89[_0x19d0e2[_0xf693('0x1b')]]});}});}return request({'form':{'method':_0xf693('0x1d'),'input_type':_0xf693('0x1e'),'response_type':_0xf693('0x1e'),'rest_data':JSON[_0xf693('0x1f')]({'session':_0x3c82f8['id'],'module_name':_0xf693('0x20'),'name_value_list':_0x3d572e})}});}function getAuth(_0x548642){return util[_0xf693('0x21')](_0xf693('0x22'),new Buffer(_0x548642[_0xf693('0x23')]+':X')[_0xf693('0x24')]('base64'));}function getServerInfo(_0x3d2dad){return request({'form':{'method':_0xf693('0x25'),'input_type':'JSON','response_type':_0xf693('0x1e'),'rest_data':JSON[_0xf693('0x1f')]({'session':_0x3d2dad['id']})}});}function getUser(_0x2a15b9,_0x4d3229,_0xb98c97){if(!_['isNil'](_0x4d3229)){logger[_0xf693('0xa')](_0xf693('0x26'),_0x4d3229);return request({'form':{'method':_0xf693('0x27'),'input_type':_0xf693('0x1e'),'response_type':_0xf693('0x1e'),'rest_data':JSON[_0xf693('0x1f')]({'session':_0xb98c97['id'],'module_name':_0xf693('0x28'),'query':util['format']('INSTR\x20(\x20users.user_name,\x20\x22%s\x22)\x20>\x200',_0x4d3229),'order_by':'','offset':'0','select_fields':['id','name','user_name'],'link_name_to_fields_array':[],'max_results':-0x1,'deleted':'0'})}})[_0xf693('0x29')](function(_0x8c7dfc){if(_0x8c7dfc[_0xf693('0x2a')][_0xf693('0x1a')]){var _0x1f5fcb=_[_0xf693('0x2b')](_0x8c7dfc['entry_list'],function(_0x81ada1){return _0x81ada1['name_value_list']['user_name'][_0xf693('0x2c')]===_0x4d3229;});if(_0x1f5fcb){logger[_0xf693('0xa')](_0xf693('0x2d'));return BPromise[_0xf693('0x2e')]({'id':_0x1f5fcb[_0xf693('0x2f')]['id'][_0xf693('0x2c')],'name':_0x1f5fcb[_0xf693('0x2f')]['name'][_0xf693('0x2c')]});}}logger[_0xf693('0xa')](_0xf693('0x30'));return BPromise[_0xf693('0x2e')]({'id':_0xb98c97[_0xf693('0x2f')]['user_id'][_0xf693('0x2c')],'name':_0xb98c97['name_value_list'][_0xf693('0x31')][_0xf693('0x2c')]});});}else{logger[_0xf693('0xa')](_0xf693('0x32'));return BPromise['resolve']({'id':_0xb98c97[_0xf693('0x2f')]['user_id']['value'],'name':_0xb98c97['name_value_list'][_0xf693('0x31')][_0xf693('0x2c')]});}}function getEndUser(_0x377b82,_0x25e544,_0x18eed4,_0x1dfb45){logger['info'](_0xf693('0x33'),_0x18eed4);return request({'form':{'method':'get_entry_list','input_type':_0xf693('0x1e'),'response_type':'JSON','rest_data':JSON[_0xf693('0x1f')]({'session':_0x1dfb45['id'],'module_name':_0xf693('0x34'),'query':util[_0xf693('0x21')](_0xf693('0x35'),_0x18eed4),'order_by':'','offset':'0','select_fields':['id',_0xf693('0x18'),_0xf693('0x36')],'link_name_to_fields_array':[],'max_results':-0x1,'deleted':'0'})}})[_0xf693('0x29')](function(_0x283082){if(_0x283082[_0xf693('0x2a')][_0xf693('0x1a')]){var _0x3a0eb6=_[_0xf693('0x2b')](_0x283082[_0xf693('0x2a')],function(_0x1a05fe){return _0x1a05fe[_0xf693('0x2f')][_0xf693('0x36')][_0xf693('0x2c')]===_0x18eed4;});if(_0x3a0eb6){logger[_0xf693('0xa')](_0xf693('0x37'));return BPromise[_0xf693('0x2e')]({'id':_0x3a0eb6['name_value_list']['id'][_0xf693('0x2c')],'name':_0x3a0eb6[_0xf693('0x2f')]['name'][_0xf693('0x2c')],'phone':_0x3a0eb6['name_value_list'][_0xf693('0x36')][_0xf693('0x2c')]});}}else{logger[_0xf693('0xa')]('Enduser\x20not\x20found,\x20creating\x20a\x20new\x20enduser!');return request({'form':{'method':'set_entry','input_type':'JSON','response_type':_0xf693('0x1e'),'rest_data':JSON[_0xf693('0x1f')]({'session':_0x1dfb45['id'],'module_name':_0xf693('0x34'),'name_value_list':[{'name':_0xf693('0x38'),'value':_0x25e544!==''?_0x25e544:util[_0xf693('0x21')](_0xf693('0x39'),_0x18eed4)},{'name':_0xf693('0x36'),'value':_0x18eed4}]})}})[_0xf693('0x29')](function(_0x12f776){logger[_0xf693('0xa')](_0xf693('0x3a'));return BPromise[_0xf693('0x2e')]({'id':_0x12f776['id'],'name':_0x12f776[_0xf693('0x2a')][_0xf693('0x38')]['value'],'phone':_0x12f776[_0xf693('0x2a')][_0xf693('0x36')]['value']});});}});}function request(_0x4e58a7){logger['debug'](_0xf693('0x3b'),JSON[_0xf693('0x1f')](_0x4e58a7));return rp(_[_0xf693('0x3c')](def,_0x4e58a7));}function getTags(_0x204bbe,_0x4524d6){var _0x1dd635=[];if(_0x204bbe&&_0x204bbe[_0xf693('0x1a')]>0x0){_0x1dd635=_[_0xf693('0x3d')](_0x204bbe,_0x4524d6);}return _0x1dd635;}function getCustomFields(_0x2c0f43,_0xebaefa){var _0x43ad2b=[];var _0x57df1a={'custom_fields':[]};if(_0x2c0f43[_0xf693('0x1a')]>0x0){_['forEach'](_0x2c0f43,function(_0x13c792){if(_0x13c792[_0xf693('0x3e')]===_0xf693('0x3f')&&_0x13c792[_0xf693('0x40')]&&!_0x13c792[_0xf693('0x41')]){_0x57df1a[_0x13c792[_0xf693('0x40')][_0xf693('0x42')]()]=_0x13c792[_0xf693('0x43')][_0xf693('0x24')]();}else if(_0x13c792[_0xf693('0x3e')]===_0xf693('0x3f')&&_0x13c792[_0xf693('0x1c')]&&_0x13c792[_0xf693('0x41')]){_0x57df1a['custom_fields'][_0xf693('0x44')]({'id':_0x13c792['idField'],'value':_0x13c792[_0xf693('0x43')][_0xf693('0x24')]()});}else if(_0x13c792['type']===_0xf693('0x45')&&_0x13c792[_0xf693('0x1b')]&&_0x13c792['idField']&&_0x13c792[_0xf693('0x41')]){_0xebaefa[_0x13c792['variableName']]&&_0x57df1a[_0xf693('0x46')][_0xf693('0x44')]({'id':_0x13c792[_0xf693('0x1c')],'value':_0xebaefa[_0x13c792['variableName']][_0xf693('0x24')]()});}else if(_0x13c792['type']===_0xf693('0x47')&&_0x13c792[_0xf693('0x48')]&&_0x13c792[_0xf693('0x48')][_0xf693('0x18')]&&_0x13c792[_0xf693('0x1c')]&&_0x13c792[_0xf693('0x41')]){_0xebaefa[_0x13c792[_0xf693('0x48')][_0xf693('0x18')][_0xf693('0x42')]()]&&_0x57df1a[_0xf693('0x46')][_0xf693('0x44')]({'id':_0x13c792[_0xf693('0x1c')],'value':_0xebaefa[_0x13c792[_0xf693('0x48')][_0xf693('0x18')][_0xf693('0x42')]()][_0xf693('0x24')]()});}});}return _0x57df1a;}function getConnection(_0x275879){return request({'method':_0xf693('0x49'),'form':{'method':_0xf693('0x4a'),'input_type':_0xf693('0x1e'),'response_type':'JSON','rest_data':JSON[_0xf693('0x1f')]({'user_auth':{'user_name':_0x275879[_0xf693('0x4b')],'password':_0x275879[_0xf693('0x4c')],'encryption':_0xf693('0x4d')},'application':_0xf693('0x4e')})}})['then'](function(_0x28fb58){var _0x50d2bb=_0x28fb58;if(_0x50d2bb['id']){def['sessionID']=_0x50d2bb['id'];return BPromise[_0xf693('0x2e')](_0x50d2bb);}else{throw new Error(util['format'](_0xf693('0x4f'),_0x275879['id']));}});}function setRelationship(_0x216610,_0x2a0134,_0x31c2b8,_0x331c34){return request({'form':{'method':'set_relationship','input_type':_0xf693('0x1e'),'response_type':'JSON','rest_data':JSON[_0xf693('0x1f')]({'session':_0x216610['id'],'module_name':_0xf693('0x20'),'module_id':_0x31c2b8['id'],'link_field_name':_0x331c34,'related_ids':[_0x2a0134['id']],'name_value_list':[],'delete':0x0})}});}exports[_0xf693('0x50')]=function(_0x1561fa,_0x44341d,_0x5cb452,_0x3d69c4,_0x2a1f95,_0x4e8545){var _0x3ea093,_0x21f575,_0xccef1d,_0x21c8f9;_0x4e8545[_0xf693('0x51')]=intUtil['stripTrailingSlash'](_0x4e8545[_0xf693('0x51')]);_0x4e8545[_0xf693('0x52')]=intUtil[_0xf693('0x53')](_0x4e8545[_0xf693('0x52')]);def[_0xf693('0x54')]=util[_0xf693('0x21')](_0xf693('0x55'),_0x4e8545[_0xf693('0x51')]);if(_0x2a1f95&&_0x2a1f95[_0xf693('0x56')]){logger[_0xf693('0xa')](_0xf693('0x57'),'Recording\x20is\x20enabled!');_0x44341d['recordingURL']=util[_0xf693('0x21')]('%s/api/voice/recordings/%s/downloads?type=uniqueid&token=%s',_0x4e8545[_0xf693('0x52')],_0x44341d[_0xf693('0x58')],md5(_0x44341d[_0xf693('0x58')]));}else{_0x44341d['recordingURL']='';}return getConnection(_0x4e8545)[_0xf693('0x29')](function(_0x26a33e){_0x21c8f9=_0x26a33e;return getUser(_0x4e8545,_0x3d69c4[_0xf693('0x18')],_0x21c8f9);})[_0xf693('0x29')](function(_0x529b79){_0x3ea093=_0x529b79;logger[_0xf693('0xa')]('The\x20User\x20ID\x20is:',_0x3ea093['id']);return getEndUser(_0x4e8545,_0x44341d[_0xf693('0x59')],_0x44341d[_0xf693('0x5a')],_0x21c8f9);})['then'](function(_0x58d516){_0x21f575=_0x58d516;logger[_0xf693('0xa')]('The\x20Enduser\x20ID\x20is:',_0x21f575['id']);return getTicket(_0x4e8545,_0x3ea093,_0x21f575,_0x5cb452,_0x44341d,_0x5cb452[_0xf693('0x5b')],_0x21c8f9,_0xf693('0x5c'));})[_0xf693('0x29')](function(_0x602571){_0xccef1d=_0x602571;logger[_0xf693('0xa')](_0xf693('0x5d'));logger[_0xf693('0xa')](_0xf693('0x5e'),_0xccef1d['id']);return setRelationship(_0x21c8f9,_0x3ea093,_0xccef1d,'users');})[_0xf693('0x29')](function(){return setRelationship(_0x21c8f9,_0x21f575,_0xccef1d,_0xf693('0x5f'));})[_0xf693('0x29')](function(){return getServerInfo(_0x21c8f9);})[_0xf693('0x29')](function(_0x1a63f3){var _0x203b1c=parseInt(_0x1a63f3[_0xf693('0x60')]['charAt'](0x0));var _0x3e89b6=util[_0xf693('0x21')](_0xf693('0x61'),_0x4e8545[_0xf693('0x51')],_0xccef1d['id']);if(_0x203b1c>0x6){_0x3e89b6=util[_0xf693('0x21')]('%s/#bwc/index.php?module=Calls&action=EditView&record=%s',_0x4e8545[_0xf693('0x51')],_0xccef1d['id']);}logger[_0xf693('0xa')]('[QUEUE]',_0xf693('0x62'));emit(util[_0xf693('0x21')](_0xf693('0x63'),_0x3d69c4[_0xf693('0x18')]),_0xf693('0x64'),{'uri':_0x3e89b6});})['catch'](function(_0xffc072){logger['error'](_0xf693('0x57'),JSON[_0xf693('0x1f')](_0xffc072));});};exports[_0xf693('0x65')]=function(_0x3ea470,_0x2f14c6,_0x2c4365,_0x5cec96,_0x2dc781,_0x128071,_0x2dd622){var _0x40b5d5,_0x1c6f75,_0x30eb05,_0x4da15c;_0x128071[_0xf693('0x51')]=intUtil[_0xf693('0x53')](_0x128071['remoteUri']);_0x128071['serverUrl']=intUtil[_0xf693('0x53')](_0x128071[_0xf693('0x52')]);def[_0xf693('0x54')]=util[_0xf693('0x21')](_0xf693('0x55'),_0x128071[_0xf693('0x51')]);if(_0x2dd622&&_0x2dd622[_0xf693('0x66')]&&_0x2dd622['recordingFormat']!==_0xf693('0x67')){logger[_0xf693('0xa')](_0xf693('0x68'),_0xf693('0x69'));_0x2f14c6[_0xf693('0x6a')]=util[_0xf693('0x21')]('%s/api/voice/recordings/%s/downloads?type=uniqueid&token=%s',_0x128071[_0xf693('0x52')],_0x2f14c6[_0xf693('0x58')],md5(_0x2f14c6[_0xf693('0x58')]));}return getConnection(_0x128071)[_0xf693('0x29')](function(_0xfcdfe1){_0x4da15c=_0xfcdfe1;return getUser(_0x128071,_0x5cec96[_0xf693('0x18')],_0x4da15c);})[_0xf693('0x29')](function(_0x18ea35){_0x40b5d5=_0x18ea35;logger[_0xf693('0xa')]('The\x20User\x20ID\x20is:',_0x40b5d5['id']);return getEndUser(_0x128071,_0x2f14c6[_0xf693('0x6b')],_0x2f14c6[_0xf693('0x6c')],_0x4da15c);})[_0xf693('0x29')](function(_0x2d14d9){_0x1c6f75=_0x2d14d9;logger['info'](_0xf693('0x6d'),_0x1c6f75['id']);return getTicket(_0x128071,_0x40b5d5,_0x1c6f75,_0x2c4365,_0x2f14c6,_0x2c4365[_0xf693('0x5b')],_0x4da15c,_0xf693('0x6e'));})[_0xf693('0x29')](function(_0x5dab18){_0x30eb05=_0x5dab18;logger[_0xf693('0xa')](_0xf693('0x5d'));logger[_0xf693('0xa')](_0xf693('0x5e'),_0x30eb05['id']);return setRelationship(_0x4da15c,_0x40b5d5,_0x30eb05,_0xf693('0x6f'));})['then'](function(){return setRelationship(_0x4da15c,_0x1c6f75,_0x30eb05,_0xf693('0x5f'));})[_0xf693('0x29')](function(){return getServerInfo(_0x4da15c);})[_0xf693('0x29')](function(_0x83242d){var _0x4aeb58=parseInt(_0x83242d['version'][_0xf693('0x70')](0x0));var _0x105a65=util['format'](_0xf693('0x61'),_0x128071['remoteUri'],_0x30eb05['id']);if(_0x4aeb58>0x6){_0x105a65=util[_0xf693('0x21')]('%s/#bwc/index.php?module=Calls&action=EditView&record=%s',_0x128071[_0xf693('0x51')],_0x30eb05['id']);}logger['info'](_0xf693('0x68'),_0xf693('0x62'));emit(util[_0xf693('0x21')](_0xf693('0x63'),_0x5cec96[_0xf693('0x18')]),_0xf693('0x64'),{'uri':_0x105a65});})[_0xf693('0x71')](function(_0x158761){logger['error'](_0xf693('0x68'),JSON['stringify'](_0x158761));});};exports[_0xf693('0x72')]=function(_0x452476,_0x5bb1f8,_0x41971e,_0x11ff15,_0x13491b,_0xb3d6d6){var _0x49a516,_0x4c8f65,_0x2bed61,_0x2c0a27;_0xb3d6d6[_0xf693('0x51')]=intUtil['stripTrailingSlash'](_0xb3d6d6[_0xf693('0x51')]);_0xb3d6d6[_0xf693('0x52')]=intUtil[_0xf693('0x53')](_0xb3d6d6['serverUrl']);def['uri']=util['format']('%s/service/v4_1/rest.php',_0xb3d6d6['remoteUri']);if(_0x13491b&&_0x13491b[_0xf693('0x56')]){logger[_0xf693('0xa')]('['+_0x5bb1f8[_0xf693('0x73')][_0xf693('0x74')]()+']',_0xf693('0x69'));_0x5bb1f8[_0xf693('0x6a')]=util[_0xf693('0x21')](_0xf693('0x75'),_0xb3d6d6[_0xf693('0x52')],_0x5bb1f8['uniqueid'],md5(_0x5bb1f8[_0xf693('0x58')]));}else{_0x5bb1f8[_0xf693('0x6a')]='';}return getConnection(_0xb3d6d6)[_0xf693('0x29')](function(_0x58d3d1){_0x2c0a27=_0x58d3d1;if(!_['isNil'](_0x11ff15)){return getUser(_0xb3d6d6,_0x11ff15['name'],_0x2c0a27);}else{return getUser(_0xb3d6d6,null,_0x2c0a27);}})['then'](function(_0x2ff2a6){_0x49a516=_0x2ff2a6;logger[_0xf693('0xa')]('The\x20User\x20ID\x20is:',_0x49a516['id']);return getEndUser(_0xb3d6d6,_0x5bb1f8[_0xf693('0x59')],_0x5bb1f8[_0xf693('0x5a')],_0x2c0a27);})[_0xf693('0x29')](function(_0x1078d6){_0x4c8f65=_0x1078d6;logger[_0xf693('0xa')]('The\x20Enduser\x20ID\x20is:',_0x4c8f65['id']);return getTicket(_0xb3d6d6,_0x49a516,_0x4c8f65,_0x41971e,_0x5bb1f8,_0x41971e['Fields'],_0x2c0a27,_0xf693('0x5c'));})['then'](function(_0x311a1e){_0x2bed61=_0x311a1e;logger[_0xf693('0xa')](_0xf693('0x5d'));logger[_0xf693('0xa')](_0xf693('0x5e'),_0x2bed61['id']);return setRelationship(_0x2c0a27,_0x49a516,_0x2bed61,_0xf693('0x6f'));})[_0xf693('0x29')](function(){return setRelationship(_0x2c0a27,_0x4c8f65,_0x2bed61,_0xf693('0x5f'));})[_0xf693('0x29')](function(){return getServerInfo(_0x2c0a27);})[_0xf693('0x71')](function(_0x14bcce){logger['error']('['+_0x5bb1f8[_0xf693('0x73')][_0xf693('0x74')]()+']',JSON[_0xf693('0x1f')](_0x14bcce));});}; \ No newline at end of file +var _0xf929=['socket.io-emitter','POST','Creating\x20new\x20ticket...','name','Subjects','assigned_user_id','getString','Descriptions','date_start','toISOString','duration_hours','parent_id','Contacts','parent_name','direction','length','forEach','variableName','push','JSON','stringify','Calls','Basic\x20%s','apiKey','base64','get_server_info','info','get_entry_list','format','INSTR\x20(\x20users.user_name,\x20\x22%s\x22)\x20>\x200','user_name','then','find','entry_list','name_value_list','value','Agent\x20found!','resolve','Agent\x20not\x20found,\x20using\x20the\x20admin\x20account!','user_id','Agent\x20not\x20available,\x20using\x20the\x20admin\x20account!','Searching\x20enduser\x20with\x20phone','phone_home','Enduser\x20not\x20found,\x20creating\x20a\x20new\x20enduser!','set_entry','first_name','','Caller\x20-\x20%s','debug','[HTTP]','merge','type','nameField','customField','toLowerCase','toString','string','idField','content','variable','custom_fields','customVariable','Variable','login','PLAIN','xCALLY\x20Motion\x20integration','sessionID','set_relationship','queue','stripTrailingSlash','remoteUri','serverUrl','%s/service/v4_1/rest.php','monitor_format','[QUEUE]','%s/api/voice/recordings/%s/downloads?type=uniqueid&token=%s','uniqueid','recordingURL','The\x20User\x20ID\x20is:','calleridname','The\x20Enduser\x20ID\x20is:','Inbound','Ticket\x20created!','The\x20Ticket\x20ID\x20is:','users','contacts','version','charAt','%s/index.php?action=ajaxui#ajaxUILoc=index.php%3Fmodule%3DCalls%26action%3DEditView%26record%3D%s','%s/#bwc/index.php?module=Calls&action=EditView&record=%s','Displaying\x20ticket\x20to\x20agent\x20in\x20a\x20new\x20tab...','user:%s','catch','error','uri','recordingFormat','none','[OUTBOUND]','Recording\x20is\x20enabled!','destcalleridname','destcalleridnum','Fields','Outbound','trigger:browser:url','unmanaged','lastevent','toUpperCase','isNil','calleridnum','lodash','request-promise','md5','util','ioredis','./util','../../../../config/environment','sugarcrm','redis','defaults','localhost'];(function(_0x1da281,_0x2f0276){var _0x281637=function(_0x120088){while(--_0x120088){_0x1da281['push'](_0x1da281['shift']());}};_0x281637(++_0x2f0276);}(_0xf929,0x6d));var _0x9f92=function(_0x406554,_0x2d721b){_0x406554=_0x406554-0x0;var _0x17037c=_0xf929[_0x406554];return _0x17037c;};'use strict';var _=require(_0x9f92('0x0'));var rp=require(_0x9f92('0x1'));var BPromise=require('bluebird');var md5=require(_0x9f92('0x2'));var util=require(_0x9f92('0x3'));var Redis=require(_0x9f92('0x4'));var intUtil=require(_0x9f92('0x5'));var config=require(_0x9f92('0x6'));var logger=require('../../../../config/logger')(_0x9f92('0x7'));config[_0x9f92('0x8')]=_[_0x9f92('0x9')](config['redis'],{'host':_0x9f92('0xa'),'port':0x18eb});var io=require(_0x9f92('0xb'))(new Redis(config['redis']));var def={'method':_0x9f92('0xc'),'json':!![]};function emit(_0x49d8b8,_0x1f5921,_0x21c5e4){io['to'](_0x49d8b8)['emit'](_0x1f5921,_0x21c5e4);}function getTicket(_0x55cf0a,_0x5efa96,_0x5215ad,_0x5cca19,_0x2fafd7,_0x1f4630,_0x35cf3f,_0x956584){logger['info'](_0x9f92('0xd'));var _0x5cf2e8=new Date();var _0x187b41=[{'name':_0x9f92('0xe'),'value':intUtil['getString'](_0x5cca19[_0x9f92('0xf')],_0x2fafd7,'\x20')},{'name':_0x9f92('0x10'),'value':_0x5efa96['id']},{'name':'created_by','value':_0x5efa96['id']},{'name':'description','value':intUtil[_0x9f92('0x11')](_0x5cca19[_0x9f92('0x12')],_0x2fafd7,'\x0a')},{'name':_0x9f92('0x13'),'value':_0x5cf2e8[_0x9f92('0x14')]()['slice'](0x0,0x13)['replace']('T','\x20')},{'name':_0x9f92('0x15'),'value':'0'},{'name':'duration_minutes','value':'15'},{'name':_0x9f92('0x16'),'value':_0x5215ad['id']},{'name':'parent_type','value':_0x9f92('0x17')},{'name':_0x9f92('0x18'),'value':_0x5215ad[_0x9f92('0xe')]},{'name':_0x9f92('0x19'),'value':_0x956584}];if(_0x1f4630[_0x9f92('0x1a')]){_[_0x9f92('0x1b')](_0x1f4630,function(_0xe0c40d){if(_0x2fafd7[_0xe0c40d[_0x9f92('0x1c')]]){_0x187b41[_0x9f92('0x1d')]({'name':_0xe0c40d['idField'],'value':_0x2fafd7[_0xe0c40d[_0x9f92('0x1c')]]});}});}return request({'form':{'method':'set_entry','input_type':_0x9f92('0x1e'),'response_type':_0x9f92('0x1e'),'rest_data':JSON[_0x9f92('0x1f')]({'session':_0x35cf3f['id'],'module_name':_0x9f92('0x20'),'name_value_list':_0x187b41})}});}function getAuth(_0x3a94df){return util['format'](_0x9f92('0x21'),new Buffer(_0x3a94df[_0x9f92('0x22')]+':X')['toString'](_0x9f92('0x23')));}function getServerInfo(_0x1c9983){return request({'form':{'method':_0x9f92('0x24'),'input_type':_0x9f92('0x1e'),'response_type':_0x9f92('0x1e'),'rest_data':JSON['stringify']({'session':_0x1c9983['id']})}});}function getUser(_0x525576,_0x512fa5,_0x1e766f){if(!_['isNil'](_0x512fa5)){logger[_0x9f92('0x25')]('Getting\x20agent\x20with\x20name',_0x512fa5);return request({'form':{'method':_0x9f92('0x26'),'input_type':_0x9f92('0x1e'),'response_type':_0x9f92('0x1e'),'rest_data':JSON[_0x9f92('0x1f')]({'session':_0x1e766f['id'],'module_name':'Employees','query':util[_0x9f92('0x27')](_0x9f92('0x28'),_0x512fa5),'order_by':'','offset':'0','select_fields':['id',_0x9f92('0xe'),_0x9f92('0x29')],'link_name_to_fields_array':[],'max_results':-0x1,'deleted':'0'})}})[_0x9f92('0x2a')](function(_0x442d62){if(_0x442d62['entry_list'][_0x9f92('0x1a')]){var _0x425034=_[_0x9f92('0x2b')](_0x442d62[_0x9f92('0x2c')],function(_0xb4a180){return _0xb4a180[_0x9f92('0x2d')][_0x9f92('0x29')][_0x9f92('0x2e')]===_0x512fa5;});if(_0x425034){logger[_0x9f92('0x25')](_0x9f92('0x2f'));return BPromise[_0x9f92('0x30')]({'id':_0x425034[_0x9f92('0x2d')]['id']['value'],'name':_0x425034[_0x9f92('0x2d')][_0x9f92('0xe')][_0x9f92('0x2e')]});}}logger[_0x9f92('0x25')](_0x9f92('0x31'));return BPromise[_0x9f92('0x30')]({'id':_0x1e766f[_0x9f92('0x2d')][_0x9f92('0x32')][_0x9f92('0x2e')],'name':_0x1e766f['name_value_list'][_0x9f92('0x29')][_0x9f92('0x2e')]});});}else{logger['info'](_0x9f92('0x33'));return BPromise['resolve']({'id':_0x1e766f[_0x9f92('0x2d')][_0x9f92('0x32')]['value'],'name':_0x1e766f[_0x9f92('0x2d')][_0x9f92('0x29')][_0x9f92('0x2e')]});}}function getEndUser(_0x5354f6,_0x41b2e8,_0x31f0e7,_0xf29b34){logger['info'](_0x9f92('0x34'),_0x31f0e7);return request({'form':{'method':_0x9f92('0x26'),'input_type':_0x9f92('0x1e'),'response_type':_0x9f92('0x1e'),'rest_data':JSON[_0x9f92('0x1f')]({'session':_0xf29b34['id'],'module_name':'Contacts','query':util[_0x9f92('0x27')]('contacts.phone_home\x20=\x20\x22%s\x22',_0x31f0e7),'order_by':'','offset':'0','select_fields':['id',_0x9f92('0xe'),'phone_home'],'link_name_to_fields_array':[],'max_results':-0x1,'deleted':'0'})}})['then'](function(_0x559952){if(_0x559952[_0x9f92('0x2c')][_0x9f92('0x1a')]){var _0x222994=_[_0x9f92('0x2b')](_0x559952[_0x9f92('0x2c')],function(_0x591a0e){return _0x591a0e[_0x9f92('0x2d')]['phone_home'][_0x9f92('0x2e')]===_0x31f0e7;});if(_0x222994){logger[_0x9f92('0x25')]('Enduser\x20found!');return BPromise[_0x9f92('0x30')]({'id':_0x222994[_0x9f92('0x2d')]['id'][_0x9f92('0x2e')],'name':_0x222994[_0x9f92('0x2d')][_0x9f92('0xe')][_0x9f92('0x2e')],'phone':_0x222994[_0x9f92('0x2d')][_0x9f92('0x35')][_0x9f92('0x2e')]});}}else{logger['info'](_0x9f92('0x36'));return request({'form':{'method':_0x9f92('0x37'),'input_type':'JSON','response_type':'JSON','rest_data':JSON[_0x9f92('0x1f')]({'session':_0xf29b34['id'],'module_name':_0x9f92('0x17'),'name_value_list':[{'name':_0x9f92('0x38'),'value':_0x41b2e8!==_0x9f92('0x39')?_0x41b2e8:util['format'](_0x9f92('0x3a'),_0x31f0e7)},{'name':_0x9f92('0x35'),'value':_0x31f0e7}]})}})[_0x9f92('0x2a')](function(_0x240873){logger['info']('Enduser\x20created.');return BPromise[_0x9f92('0x30')]({'id':_0x240873['id'],'name':_0x240873[_0x9f92('0x2c')]['first_name']['value'],'phone':_0x240873[_0x9f92('0x2c')][_0x9f92('0x35')][_0x9f92('0x2e')]});});}});}function request(_0x579bc6){logger[_0x9f92('0x3b')](_0x9f92('0x3c'),JSON[_0x9f92('0x1f')](_0x579bc6));return rp(_[_0x9f92('0x3d')](def,_0x579bc6));}function getTags(_0x3c1af1,_0x2fc0f8){var _0x2e4b61=[];if(_0x3c1af1&&_0x3c1af1[_0x9f92('0x1a')]>0x0){_0x2e4b61=_['map'](_0x3c1af1,_0x2fc0f8);}return _0x2e4b61;}function getCustomFields(_0x27d85a,_0x388aa6){var _0x25b22a=[];var _0x208933={'custom_fields':[]};if(_0x27d85a['length']>0x0){_[_0x9f92('0x1b')](_0x27d85a,function(_0x22ec0d){if(_0x22ec0d[_0x9f92('0x3e')]==='string'&&_0x22ec0d[_0x9f92('0x3f')]&&!_0x22ec0d[_0x9f92('0x40')]){_0x208933[_0x22ec0d[_0x9f92('0x3f')][_0x9f92('0x41')]()]=_0x22ec0d['content'][_0x9f92('0x42')]();}else if(_0x22ec0d[_0x9f92('0x3e')]===_0x9f92('0x43')&&_0x22ec0d['idField']&&_0x22ec0d[_0x9f92('0x40')]){_0x208933['custom_fields']['push']({'id':_0x22ec0d[_0x9f92('0x44')],'value':_0x22ec0d[_0x9f92('0x45')][_0x9f92('0x42')]()});}else if(_0x22ec0d[_0x9f92('0x3e')]===_0x9f92('0x46')&&_0x22ec0d[_0x9f92('0x1c')]&&_0x22ec0d[_0x9f92('0x44')]&&_0x22ec0d[_0x9f92('0x40')]){_0x388aa6[_0x22ec0d[_0x9f92('0x1c')]]&&_0x208933[_0x9f92('0x47')]['push']({'id':_0x22ec0d[_0x9f92('0x44')],'value':_0x388aa6[_0x22ec0d['variableName']][_0x9f92('0x42')]()});}else if(_0x22ec0d[_0x9f92('0x3e')]===_0x9f92('0x48')&&_0x22ec0d[_0x9f92('0x49')]&&_0x22ec0d[_0x9f92('0x49')][_0x9f92('0xe')]&&_0x22ec0d['idField']&&_0x22ec0d[_0x9f92('0x40')]){_0x388aa6[_0x22ec0d[_0x9f92('0x49')][_0x9f92('0xe')][_0x9f92('0x41')]()]&&_0x208933['custom_fields'][_0x9f92('0x1d')]({'id':_0x22ec0d[_0x9f92('0x44')],'value':_0x388aa6[_0x22ec0d['Variable']['name']['toLowerCase']()][_0x9f92('0x42')]()});}});}return _0x208933;}function getConnection(_0x42feef){return request({'method':_0x9f92('0xc'),'form':{'method':_0x9f92('0x4a'),'input_type':'JSON','response_type':_0x9f92('0x1e'),'rest_data':JSON[_0x9f92('0x1f')]({'user_auth':{'user_name':_0x42feef['username'],'password':_0x42feef['password'],'encryption':_0x9f92('0x4b')},'application':_0x9f92('0x4c')})}})[_0x9f92('0x2a')](function(_0x429669){var _0x1a94cd=_0x429669;if(_0x1a94cd['id']){def[_0x9f92('0x4d')]=_0x1a94cd['id'];return BPromise['resolve'](_0x1a94cd);}else{throw new Error(util[_0x9f92('0x27')]('Account\x20%d\x20is\x20not\x20valid',_0x42feef['id']));}});}function setRelationship(_0x1e8ec4,_0x56ba7d,_0x24a954,_0x56f899){return request({'form':{'method':_0x9f92('0x4e'),'input_type':_0x9f92('0x1e'),'response_type':_0x9f92('0x1e'),'rest_data':JSON[_0x9f92('0x1f')]({'session':_0x1e8ec4['id'],'module_name':_0x9f92('0x20'),'module_id':_0x24a954['id'],'link_field_name':_0x56f899,'related_ids':[_0x56ba7d['id']],'name_value_list':[],'delete':0x0})}});}exports[_0x9f92('0x4f')]=function(_0x5b1b3c,_0x306968,_0x4c38fc,_0x486b3a,_0x31007a,_0x90f8a5){var _0x4f111f,_0x35736f,_0x224aa2,_0x2f0589;_0x90f8a5['remoteUri']=intUtil[_0x9f92('0x50')](_0x90f8a5[_0x9f92('0x51')]);_0x90f8a5[_0x9f92('0x52')]=intUtil[_0x9f92('0x50')](_0x90f8a5['serverUrl']);def['uri']=util[_0x9f92('0x27')](_0x9f92('0x53'),_0x90f8a5['remoteUri']);if(_0x31007a&&_0x31007a[_0x9f92('0x54')]){logger['info'](_0x9f92('0x55'),'Recording\x20is\x20enabled!');_0x306968['recordingURL']=util[_0x9f92('0x27')](_0x9f92('0x56'),_0x90f8a5['serverUrl'],_0x306968[_0x9f92('0x57')],md5(_0x306968[_0x9f92('0x57')]));}else{_0x306968[_0x9f92('0x58')]='';}return getConnection(_0x90f8a5)[_0x9f92('0x2a')](function(_0x3a37ce){_0x2f0589=_0x3a37ce;return getUser(_0x90f8a5,_0x486b3a[_0x9f92('0xe')],_0x2f0589);})[_0x9f92('0x2a')](function(_0x289866){_0x4f111f=_0x289866;logger[_0x9f92('0x25')](_0x9f92('0x59'),_0x4f111f['id']);return getEndUser(_0x90f8a5,_0x306968[_0x9f92('0x5a')],_0x306968['calleridnum'],_0x2f0589);})['then'](function(_0x2d9b58){_0x35736f=_0x2d9b58;logger[_0x9f92('0x25')](_0x9f92('0x5b'),_0x35736f['id']);return getTicket(_0x90f8a5,_0x4f111f,_0x35736f,_0x4c38fc,_0x306968,_0x4c38fc['Fields'],_0x2f0589,_0x9f92('0x5c'));})[_0x9f92('0x2a')](function(_0x5a5d4f){_0x224aa2=_0x5a5d4f;logger[_0x9f92('0x25')](_0x9f92('0x5d'));logger[_0x9f92('0x25')](_0x9f92('0x5e'),_0x224aa2['id']);return setRelationship(_0x2f0589,_0x4f111f,_0x224aa2,_0x9f92('0x5f'));})[_0x9f92('0x2a')](function(){return setRelationship(_0x2f0589,_0x35736f,_0x224aa2,_0x9f92('0x60'));})[_0x9f92('0x2a')](function(){return getServerInfo(_0x2f0589);})['then'](function(_0x5152f2){var _0x1138a4=parseInt(_0x5152f2[_0x9f92('0x61')][_0x9f92('0x62')](0x0));var _0x528ff7=util[_0x9f92('0x27')](_0x9f92('0x63'),_0x90f8a5[_0x9f92('0x51')],_0x224aa2['id']);if(_0x1138a4>0x6){_0x528ff7=util[_0x9f92('0x27')](_0x9f92('0x64'),_0x90f8a5[_0x9f92('0x51')],_0x224aa2['id']);}logger['info']('[QUEUE]',_0x9f92('0x65'));emit(util['format'](_0x9f92('0x66'),_0x486b3a[_0x9f92('0xe')]),'trigger:browser:url',{'uri':_0x528ff7});})[_0x9f92('0x67')](function(_0x5f47df){logger[_0x9f92('0x68')]('[QUEUE]',JSON[_0x9f92('0x1f')](_0x5f47df));});};exports['outbound']=function(_0x18134e,_0x3c47f1,_0x1ff1a4,_0x8296e,_0x1b34f3,_0x59726a,_0xb9716a){var _0x4ef1da,_0x1dbb5e,_0x250bd7,_0x45893c;_0x59726a[_0x9f92('0x51')]=intUtil['stripTrailingSlash'](_0x59726a[_0x9f92('0x51')]);_0x59726a['serverUrl']=intUtil[_0x9f92('0x50')](_0x59726a[_0x9f92('0x52')]);def[_0x9f92('0x69')]=util[_0x9f92('0x27')](_0x9f92('0x53'),_0x59726a['remoteUri']);if(_0xb9716a&&_0xb9716a['recordingFormat']&&_0xb9716a[_0x9f92('0x6a')]!==_0x9f92('0x6b')){logger[_0x9f92('0x25')](_0x9f92('0x6c'),_0x9f92('0x6d'));_0x3c47f1[_0x9f92('0x58')]=util[_0x9f92('0x27')](_0x9f92('0x56'),_0x59726a['serverUrl'],_0x3c47f1['uniqueid'],md5(_0x3c47f1[_0x9f92('0x57')]));}return getConnection(_0x59726a)[_0x9f92('0x2a')](function(_0x1eb9d3){_0x45893c=_0x1eb9d3;return getUser(_0x59726a,_0x8296e['name'],_0x45893c);})[_0x9f92('0x2a')](function(_0x276890){_0x4ef1da=_0x276890;logger[_0x9f92('0x25')](_0x9f92('0x59'),_0x4ef1da['id']);return getEndUser(_0x59726a,_0x3c47f1[_0x9f92('0x6e')],_0x3c47f1[_0x9f92('0x6f')],_0x45893c);})[_0x9f92('0x2a')](function(_0x2a3f4d){_0x1dbb5e=_0x2a3f4d;logger[_0x9f92('0x25')](_0x9f92('0x5b'),_0x1dbb5e['id']);return getTicket(_0x59726a,_0x4ef1da,_0x1dbb5e,_0x1ff1a4,_0x3c47f1,_0x1ff1a4[_0x9f92('0x70')],_0x45893c,_0x9f92('0x71'));})[_0x9f92('0x2a')](function(_0x847577){_0x250bd7=_0x847577;logger[_0x9f92('0x25')]('Ticket\x20created!');logger[_0x9f92('0x25')](_0x9f92('0x5e'),_0x250bd7['id']);return setRelationship(_0x45893c,_0x4ef1da,_0x250bd7,'users');})[_0x9f92('0x2a')](function(){return setRelationship(_0x45893c,_0x1dbb5e,_0x250bd7,'contacts');})[_0x9f92('0x2a')](function(){return getServerInfo(_0x45893c);})[_0x9f92('0x2a')](function(_0x47855c){var _0x4beeb6=parseInt(_0x47855c['version']['charAt'](0x0));var _0x74f543=util[_0x9f92('0x27')](_0x9f92('0x63'),_0x59726a[_0x9f92('0x51')],_0x250bd7['id']);if(_0x4beeb6>0x6){_0x74f543=util['format'](_0x9f92('0x64'),_0x59726a['remoteUri'],_0x250bd7['id']);}logger[_0x9f92('0x25')](_0x9f92('0x6c'),_0x9f92('0x65'));emit(util[_0x9f92('0x27')](_0x9f92('0x66'),_0x8296e['name']),_0x9f92('0x72'),{'uri':_0x74f543});})[_0x9f92('0x67')](function(_0x1b1499){logger[_0x9f92('0x68')](_0x9f92('0x6c'),JSON['stringify'](_0x1b1499));});};exports[_0x9f92('0x73')]=function(_0xd51d2,_0x4934db,_0x10c612,_0x5795db,_0x39c6dd,_0x4a1887){var _0x38634c,_0x8122ed,_0x2346de,_0xf18bf9;_0x4a1887[_0x9f92('0x51')]=intUtil[_0x9f92('0x50')](_0x4a1887[_0x9f92('0x51')]);_0x4a1887['serverUrl']=intUtil[_0x9f92('0x50')](_0x4a1887[_0x9f92('0x52')]);def['uri']=util[_0x9f92('0x27')](_0x9f92('0x53'),_0x4a1887['remoteUri']);if(_0x39c6dd&&_0x39c6dd['monitor_format']){logger[_0x9f92('0x25')]('['+_0x4934db[_0x9f92('0x74')][_0x9f92('0x75')]()+']',_0x9f92('0x6d'));_0x4934db[_0x9f92('0x58')]=util['format']('%s/api/voice/recordings/%s/downloads?type=uniqueid&token=%s',_0x4a1887[_0x9f92('0x52')],_0x4934db['uniqueid'],md5(_0x4934db['uniqueid']));}else{_0x4934db[_0x9f92('0x58')]='';}return getConnection(_0x4a1887)[_0x9f92('0x2a')](function(_0x572574){_0xf18bf9=_0x572574;if(!_[_0x9f92('0x76')](_0x5795db)){return getUser(_0x4a1887,_0x5795db[_0x9f92('0xe')],_0xf18bf9);}else{return getUser(_0x4a1887,null,_0xf18bf9);}})['then'](function(_0x44aceb){_0x38634c=_0x44aceb;logger[_0x9f92('0x25')](_0x9f92('0x59'),_0x38634c['id']);return getEndUser(_0x4a1887,_0x4934db[_0x9f92('0x5a')],_0x4934db[_0x9f92('0x77')],_0xf18bf9);})[_0x9f92('0x2a')](function(_0x4cd96b){_0x8122ed=_0x4cd96b;logger['info'](_0x9f92('0x5b'),_0x8122ed['id']);return getTicket(_0x4a1887,_0x38634c,_0x8122ed,_0x10c612,_0x4934db,_0x10c612['Fields'],_0xf18bf9,_0x9f92('0x5c'));})['then'](function(_0x104027){_0x2346de=_0x104027;logger[_0x9f92('0x25')](_0x9f92('0x5d'));logger['info']('The\x20Ticket\x20ID\x20is:',_0x2346de['id']);return setRelationship(_0xf18bf9,_0x38634c,_0x2346de,_0x9f92('0x5f'));})['then'](function(){return setRelationship(_0xf18bf9,_0x8122ed,_0x2346de,_0x9f92('0x60'));})[_0x9f92('0x2a')](function(){return getServerInfo(_0xf18bf9);})[_0x9f92('0x67')](function(_0x12950e){logger['error']('['+_0x4934db[_0x9f92('0x74')][_0x9f92('0x75')]()+']',JSON['stringify'](_0x12950e));});}; \ No newline at end of file diff --git a/server/services/ami/trigger/integration/util.js b/server/services/ami/trigger/integration/util.js index 345920c..d20d9f1 100644 --- a/server/services/ami/trigger/integration/util.js +++ b/server/services/ami/trigger/integration/util.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x93bf=['toLowerCase','keyType','key','format','%s:\x20%s','keyContent','stripTrailingSlash','slice','substring','lastIndexOf','validateEmail','isNil','lodash','util','getString','sortBy','type','string','push','variable','variableName','toString','customVariable','Variable','name'];(function(_0x2706d4,_0x5d3ee0){var _0x474dc6=function(_0x1971dc){while(--_0x1971dc){_0x2706d4['push'](_0x2706d4['shift']());}};_0x474dc6(++_0x5d3ee0);}(_0x93bf,0x70));var _0xf93b=function(_0x2b4add,_0x2f77bb){_0x2b4add=_0x2b4add-0x0;var _0x2f1b1a=_0x93bf[_0x2b4add];return _0x2f1b1a;};'use strict';var _=require(_0xf93b('0x0'));var util=require(_0xf93b('0x1'));exports[_0xf93b('0x2')]=function(_0x1d4715,_0x31793e,_0x3b083d){var _0x15a225=[];if(_0x1d4715['length']>0x0){var _0x3b68bf=_[_0xf93b('0x3')](_0x1d4715,['id']);for(var _0x1748ed=0x0;_0x1748ed<_0x3b68bf['length'];_0x1748ed++){var _0x439dda=_0x3b68bf[_0x1748ed];if(_0x439dda[_0xf93b('0x4')]===_0xf93b('0x5')){_0x15a225[_0xf93b('0x6')](_0x439dda['content']);}else if(_0x439dda[_0xf93b('0x4')]===_0xf93b('0x7')&&_0x439dda[_0xf93b('0x8')]){_0x31793e[_0x439dda[_0xf93b('0x8')]]&&_0x15a225[_0xf93b('0x6')](_0x31793e[_0x439dda['variableName']][_0xf93b('0x9')]());}else if(_0x439dda[_0xf93b('0x4')]===_0xf93b('0xa')&&_0x439dda['Variable']&&_0x439dda[_0xf93b('0xb')][_0xf93b('0xc')]){_0x31793e[_0x439dda[_0xf93b('0xb')][_0xf93b('0xc')][_0xf93b('0xd')]()]&&_0x15a225[_0xf93b('0x6')](_0x31793e[_0x439dda[_0xf93b('0xb')][_0xf93b('0xc')][_0xf93b('0xd')]()]['toString']());}else if(_0x439dda[_0xf93b('0x4')]==='keyValue'){if(_0x439dda[_0xf93b('0xe')]==='string'&&_0x439dda[_0xf93b('0xf')]){_0x15a225[_0xf93b('0x6')](util[_0xf93b('0x10')](_0xf93b('0x11'),_0x439dda['key'],_0x439dda[_0xf93b('0x12')]));}else if(_0x439dda[_0xf93b('0xe')]===_0xf93b('0x7')&&_0x439dda[_0xf93b('0x8')]&&_0x439dda['key']){_0x31793e[_0x439dda['variableName']]&&_0x15a225[_0xf93b('0x6')](util['format'](_0xf93b('0x11'),_0x439dda[_0xf93b('0xf')],_0x31793e[_0x439dda[_0xf93b('0x8')]]));}else if(_0x439dda[_0xf93b('0xe')]===_0xf93b('0xa')&&_0x439dda[_0xf93b('0xb')]&&_0x439dda[_0xf93b('0xb')][_0xf93b('0xc')]&&_0x439dda[_0xf93b('0xf')]){_0x31793e[_0x439dda[_0xf93b('0xb')][_0xf93b('0xc')][_0xf93b('0xd')]()]&&_0x15a225['push'](util[_0xf93b('0x10')](_0xf93b('0x11'),_0x439dda[_0xf93b('0xf')],_0x31793e[_0x439dda[_0xf93b('0xb')][_0xf93b('0xc')][_0xf93b('0xd')]()]));}}}}return _0x15a225['join'](_0x3b083d);};exports[_0xf93b('0x13')]=function(_0x40abec){var _0x3b29a3=_0x40abec[_0xf93b('0x14')](-0x1);if(_0x3b29a3==='/'){_0x40abec=_0x40abec[_0xf93b('0x15')](0x0,_0x40abec[_0xf93b('0x16')](_0x3b29a3));}return _0x40abec;};exports[_0xf93b('0x17')]=function(_0xc7bd72){if(!_[_0xf93b('0x18')](_0xc7bd72)&&_0xc7bd72!==''){var _0x1d9b58=/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;return _0x1d9b58['test'](String(_0xc7bd72)[_0xf93b('0xd')]());}else{return![];}}; \ No newline at end of file +var _0xa93f=['type','string','content','variable','variableName','push','toString','customVariable','Variable','name','toLowerCase','keyValue','format','key','keyContent','keyType','%s:\x20%s','stripTrailingSlash','slice','substring','lastIndexOf','validateEmail','isNil','test','lodash','util','getString','length'];(function(_0x2e4d53,_0x3dbbea){var _0x583512=function(_0x192c51){while(--_0x192c51){_0x2e4d53['push'](_0x2e4d53['shift']());}};_0x583512(++_0x3dbbea);}(_0xa93f,0xa4));var _0xfa93=function(_0x45d808,_0x23f546){_0x45d808=_0x45d808-0x0;var _0x3ff5e4=_0xa93f[_0x45d808];return _0x3ff5e4;};'use strict';var _=require(_0xfa93('0x0'));var util=require(_0xfa93('0x1'));exports[_0xfa93('0x2')]=function(_0x318958,_0x53df53,_0x484708){var _0xeea132=[];if(_0x318958[_0xfa93('0x3')]>0x0){var _0x421403=_['sortBy'](_0x318958,['id']);for(var _0x26aa01=0x0;_0x26aa01<_0x421403[_0xfa93('0x3')];_0x26aa01++){var _0x2d23ef=_0x421403[_0x26aa01];if(_0x2d23ef[_0xfa93('0x4')]===_0xfa93('0x5')){_0xeea132['push'](_0x2d23ef[_0xfa93('0x6')]);}else if(_0x2d23ef[_0xfa93('0x4')]===_0xfa93('0x7')&&_0x2d23ef[_0xfa93('0x8')]){_0x53df53[_0x2d23ef[_0xfa93('0x8')]]&&_0xeea132[_0xfa93('0x9')](_0x53df53[_0x2d23ef[_0xfa93('0x8')]][_0xfa93('0xa')]());}else if(_0x2d23ef[_0xfa93('0x4')]===_0xfa93('0xb')&&_0x2d23ef[_0xfa93('0xc')]&&_0x2d23ef['Variable'][_0xfa93('0xd')]){_0x53df53[_0x2d23ef[_0xfa93('0xc')][_0xfa93('0xd')]['toLowerCase']()]&&_0xeea132[_0xfa93('0x9')](_0x53df53[_0x2d23ef[_0xfa93('0xc')][_0xfa93('0xd')][_0xfa93('0xe')]()][_0xfa93('0xa')]());}else if(_0x2d23ef[_0xfa93('0x4')]===_0xfa93('0xf')){if(_0x2d23ef['keyType']===_0xfa93('0x5')&&_0x2d23ef['key']){_0xeea132['push'](util[_0xfa93('0x10')]('%s:\x20%s',_0x2d23ef[_0xfa93('0x11')],_0x2d23ef[_0xfa93('0x12')]));}else if(_0x2d23ef['keyType']===_0xfa93('0x7')&&_0x2d23ef[_0xfa93('0x8')]&&_0x2d23ef[_0xfa93('0x11')]){_0x53df53[_0x2d23ef['variableName']]&&_0xeea132[_0xfa93('0x9')](util['format']('%s:\x20%s',_0x2d23ef[_0xfa93('0x11')],_0x53df53[_0x2d23ef['variableName']]));}else if(_0x2d23ef[_0xfa93('0x13')]===_0xfa93('0xb')&&_0x2d23ef[_0xfa93('0xc')]&&_0x2d23ef[_0xfa93('0xc')]['name']&&_0x2d23ef[_0xfa93('0x11')]){_0x53df53[_0x2d23ef[_0xfa93('0xc')]['name']['toLowerCase']()]&&_0xeea132[_0xfa93('0x9')](util[_0xfa93('0x10')](_0xfa93('0x14'),_0x2d23ef[_0xfa93('0x11')],_0x53df53[_0x2d23ef[_0xfa93('0xc')][_0xfa93('0xd')][_0xfa93('0xe')]()]));}}}}return _0xeea132['join'](_0x484708);};exports[_0xfa93('0x15')]=function(_0xd26b16){var _0x378748=_0xd26b16[_0xfa93('0x16')](-0x1);if(_0x378748==='/'){_0xd26b16=_0xd26b16[_0xfa93('0x17')](0x0,_0xd26b16[_0xfa93('0x18')](_0x378748));}return _0xd26b16;};exports[_0xfa93('0x19')]=function(_0x3b327b){if(!_[_0xfa93('0x1a')](_0x3b327b)&&_0x3b327b!==''){var _0x2acac8=/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;return _0x2acac8[_0xfa93('0x1b')](String(_0x3b327b)[_0xfa93('0xe')]());}else{return![];}}; \ No newline at end of file diff --git a/server/services/ami/trigger/integration/vtiger.js b/server/services/ami/trigger/integration/vtiger.js index 427839f..daca992 100644 --- a/server/services/ami/trigger/integration/vtiger.js +++ b/server/services/ami/trigger/integration/vtiger.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xa9e0=['variable','variableName','customVariable','Variable','name','toLowerCase','info','Creating\x20new\x20ticket...','Normal','Open','Subjects','POST','format','%s/webservice.php','create','username','sessionName','HelpDesk','stringify','then','result','Ticket\x20could\x20not\x20be\x20created\x20due\x20to:\x20%s','catch','error','[vTiger],\x20%s,\x20%s,\x20%s','createTicket','validateEmail','Getting\x20agent\x20with\x20email','GET','query','SELECT\x20first_name,\x20last_name,\x20email1\x20FROM\x20Users\x20WHERE\x20email1=\x27%s\x27;','success','resolve','email1','last_name','Agent\x20not\x20found,\x20using\x20the\x20admin\x20account!','userId','admin','statusCode','getUser','Searching\x20end\x20user\x20with\x20phone','remoteUri','SELECT\x20id,\x20firstname,\x20lastname,\x20email,\x20phone,\x20mobile,\x20homephone,\x20otherphone,\x20assistantphone\x20FROM\x20Contacts\x20WHERE\x20phone\x20=\x20\x27%s\x27\x20OR\x20mobile\x20=\x27%s\x27\x20OR\x20homephone\x20=\x27%s\x27\x20OR\x20otherphone\x20=\x27%s\x27\x20OR\x20assistantphone\x20=\x27%s\x27;','Enduser\x20found!','firstname','lastname','Enduser\x20not\x20found,\x20creating\x20a\x20new\x20enduser!','Contacts','Enduser\x20created.','phone','getEndUser','accessKey','getchallenge','login','token','Account\x20%d\x20is\x20not\x20valid','[HTTP]','queue','stripTrailingSlash','[QUEUE]','recordingURL','%s/api/voice/recordings/%s/downloads?type=uniqueid&token=%s','serverUrl','uniqueid','The\x20User\x20ID\x20is:','calleridnum','Ticket\x20created!','The\x20Ticket\x20ID\x20is:','%s/index.php?module=HelpDesk&view=Detail&record=%s&app=SUPPORT','Displaying\x20ticket\x20to\x20agent\x20in\x20a\x20new\x20tab...','user:%s','outbound','recordingFormat','none','[OUTBOUND]','destcalleridname','The\x20Enduser\x20ID\x20is:','Fields','split','trigger:browser:url','unmanaged','monitor_format','toUpperCase','calleridname','lastevent','lodash','request-promise','bluebird','ioredis','../../../../config/environment','../../../../config/logger','vTiger','redis','defaults','localhost','socket.io-emitter','length','forEach','includes','idField','content','toString','type'];(function(_0x3b380d,_0x4bf247){var _0x54502b=function(_0x35d207){while(--_0x35d207){_0x3b380d['push'](_0x3b380d['shift']());}};_0x54502b(++_0x4bf247);}(_0xa9e0,0x123));var _0x0a9e=function(_0xbe200f,_0x4b50eb){_0xbe200f=_0xbe200f-0x0;var _0x192597=_0xa9e0[_0xbe200f];return _0x192597;};'use strict';var _=require(_0x0a9e('0x0'));var rp=require(_0x0a9e('0x1'));var BPromise=require(_0x0a9e('0x2'));var md5=require('md5');var util=require('util');var Redis=require(_0x0a9e('0x3'));var intUtil=require('./util');var config=require(_0x0a9e('0x4'));var logger=require(_0x0a9e('0x5'))(_0x0a9e('0x6'));config[_0x0a9e('0x7')]=_[_0x0a9e('0x8')](config['redis'],{'host':_0x0a9e('0x9'),'port':0x18eb});var io=require(_0x0a9e('0xa'))(new Redis(config[_0x0a9e('0x7')]));function emit(_0x5f41ea,_0x503809,_0xe42b77){io['to'](_0x5f41ea)['emit'](_0x503809,_0xe42b77);}function getCustomFields(_0x52cace,_0x39753a){var _0xf81284={};if(_0x52cace[_0x0a9e('0xb')]>0x0){_[_0x0a9e('0xc')](_0x52cace,function(_0xfeb75b){if(_[_0x0a9e('0xd')](['string','picklist'],_0xfeb75b['type'])&&_0xfeb75b['idField']){_0xf81284[_0xfeb75b[_0x0a9e('0xe')]]=_0xfeb75b[_0x0a9e('0xf')][_0x0a9e('0x10')]();}else if(_0xfeb75b[_0x0a9e('0x11')]===_0x0a9e('0x12')&&_0xfeb75b[_0x0a9e('0x13')]&&_0xfeb75b['idField']&&_0x39753a[_0xfeb75b[_0x0a9e('0x13')]]){_0xf81284[_0xfeb75b[_0x0a9e('0xe')]]=_0x39753a[_0xfeb75b[_0x0a9e('0x13')]][_0x0a9e('0x10')]();}else if(_0xfeb75b[_0x0a9e('0x11')]===_0x0a9e('0x14')&&_0xfeb75b['Variable']&&_0xfeb75b[_0x0a9e('0x15')]['name']&&_0xfeb75b[_0x0a9e('0xe')]&&_0x39753a[_0xfeb75b['Variable'][_0x0a9e('0x16')][_0x0a9e('0x17')]()]){_0xf81284[_0xfeb75b['idField']]=_0x39753a[_0xfeb75b[_0x0a9e('0x15')]['name'][_0x0a9e('0x17')]()][_0x0a9e('0x10')]();}});}return _0xf81284;}function createTicket(_0x106033,_0x205fd6,_0x31b1ca,_0x2eb11f,_0x530eb7,_0x20559e,_0x1314ae){logger[_0x0a9e('0x18')](_0x0a9e('0x19'));var _0x105080=_['merge']({'parent_id':'','assigned_user_id':_0x205fd6['id'],'ticketpriorities':_0x0a9e('0x1a'),'ticketstatus':_0x0a9e('0x1b'),'ticket_title':intUtil['getString'](_0x2eb11f[_0x0a9e('0x1c')],_0x530eb7,'\x20'),'description':intUtil['getString'](_0x2eb11f['Descriptions'],_0x530eb7,'\x0a'),'contact_id':_0x31b1ca['id']},getCustomFields(_0x20559e,_0x530eb7));var _0x3a02e1={'method':_0x0a9e('0x1d'),'uri':util[_0x0a9e('0x1e')](_0x0a9e('0x1f'),_0x106033['remoteUri']),'form':{'operation':_0x0a9e('0x20'),'username':_0x106033[_0x0a9e('0x21')],'sessionName':_0x1314ae[_0x0a9e('0x22')],'elementType':_0x0a9e('0x23'),'element':JSON[_0x0a9e('0x24')](_0x105080)},'json':!![]};return request(_0x3a02e1)[_0x0a9e('0x25')](function(_0x16b1ca){if(_0x16b1ca['success']){return BPromise['resolve']({'id':_0x16b1ca[_0x0a9e('0x26')]['id']});}else{throw new Error(util[_0x0a9e('0x1e')](_0x0a9e('0x27'),JSON[_0x0a9e('0x24')](_0x16b1ca['error'])));}})[_0x0a9e('0x28')](function(_0x479bc4){var _0x45a1e7=_0x479bc4['statusCode']||0x1f4;logger[_0x0a9e('0x29')](_0x0a9e('0x2a'),_0x0a9e('0x2b'),_0x45a1e7,JSON[_0x0a9e('0x24')](_0x479bc4));});}function getUser(_0x140511,_0x1538a4,_0x11c3b6){if(intUtil[_0x0a9e('0x2c')](_0x1538a4)){logger['info'](_0x0a9e('0x2d'),_0x1538a4);return request({'method':_0x0a9e('0x2e'),'uri':util[_0x0a9e('0x1e')](_0x0a9e('0x1f'),_0x140511['remoteUri']),'qs':{'operation':_0x0a9e('0x2f'),'username':_0x140511[_0x0a9e('0x21')],'sessionName':_0x11c3b6[_0x0a9e('0x22')],'query':util[_0x0a9e('0x1e')](_0x0a9e('0x30'),_0x1538a4)},'json':!![]})[_0x0a9e('0x25')](function(_0x296f41){if(_0x296f41[_0x0a9e('0x31')]&&_0x296f41[_0x0a9e('0x26')]['length']){logger[_0x0a9e('0x18')]('Agent\x20found!');return BPromise[_0x0a9e('0x32')]({'id':_0x296f41[_0x0a9e('0x26')][0x0]['id'],'email':_0x296f41[_0x0a9e('0x26')][0x0][_0x0a9e('0x33')],'name':_0x296f41[_0x0a9e('0x26')][0x0]['first_name']+'\x20'+_0x296f41[_0x0a9e('0x26')][_0x0a9e('0x34')]});}else{logger[_0x0a9e('0x18')](_0x0a9e('0x35'));return BPromise[_0x0a9e('0x32')]({'id':_0x11c3b6[_0x0a9e('0x36')],'email':_0x140511[_0x0a9e('0x21')],'name':_0x0a9e('0x37')});}})['catch'](function(_0x44295a){var _0x5e7238=_0x44295a[_0x0a9e('0x38')]||0x1f4;logger[_0x0a9e('0x29')](_0x0a9e('0x2a'),_0x0a9e('0x39'),_0x5e7238,JSON['stringify'](_0x44295a));});}else{logger[_0x0a9e('0x18')](_0x0a9e('0x35'));return BPromise[_0x0a9e('0x32')]({'id':_0x11c3b6[_0x0a9e('0x36')],'email':_0x140511['username'],'name':'admin'})[_0x0a9e('0x28')](function(_0x5640eb){var _0x24936a=_0x5640eb[_0x0a9e('0x38')]||0x1f4;logger[_0x0a9e('0x29')](_0x0a9e('0x2a'),'getUser',_0x24936a,JSON[_0x0a9e('0x24')](_0x5640eb));});}}function getEndUser(_0x3bfce8,_0x3cae,_0x533942,_0x1dbf74){logger[_0x0a9e('0x18')](_0x0a9e('0x3a'),_0x533942);return request({'method':'GET','uri':util['format'](_0x0a9e('0x1f'),_0x3bfce8[_0x0a9e('0x3b')]),'qs':{'operation':'query','username':_0x3bfce8[_0x0a9e('0x21')],'sessionName':_0x1dbf74[_0x0a9e('0x22')],'query':util[_0x0a9e('0x1e')](_0x0a9e('0x3c'),_0x533942,_0x533942,_0x533942,_0x533942,_0x533942)},'json':!![]})['then'](function(_0x5a594b){if(_0x5a594b[_0x0a9e('0x31')]&&_0x5a594b[_0x0a9e('0x26')]['length']){logger[_0x0a9e('0x18')](_0x0a9e('0x3d'));return BPromise[_0x0a9e('0x32')]({'id':_0x5a594b['result'][0x0]['id'],'name':_0x5a594b[_0x0a9e('0x26')][0x0][_0x0a9e('0x3e')]+'\x20'+_0x5a594b[_0x0a9e('0x26')][0x0][_0x0a9e('0x3f')],'phone':_0x533942});}else{logger[_0x0a9e('0x18')](_0x0a9e('0x40'));return request({'method':_0x0a9e('0x1d'),'uri':util[_0x0a9e('0x1e')](_0x0a9e('0x1f'),_0x3bfce8[_0x0a9e('0x3b')]),'form':{'operation':_0x0a9e('0x20'),'sessionName':_0x1dbf74[_0x0a9e('0x22')],'elementType':_0x0a9e('0x41'),'element':JSON[_0x0a9e('0x24')]({'lastname':_0x3cae,'phone':_0x533942,'assigned_user_id':'\x20'})},'json':!![]})[_0x0a9e('0x25')](function(_0x4d04c8){logger['info'](_0x0a9e('0x42'));return BPromise[_0x0a9e('0x32')]({'id':_0x4d04c8[_0x0a9e('0x26')]['id'],'name':_0x4d04c8[_0x0a9e('0x26')][_0x0a9e('0x3f')],'phone':_0x4d04c8[_0x0a9e('0x26')][_0x0a9e('0x43')]});})[_0x0a9e('0x28')](function(_0x432fcc){var _0x25c6e6=_0x432fcc[_0x0a9e('0x38')]||0x1f4;logger[_0x0a9e('0x29')]('[vTiger],\x20%s,\x20%s,\x20%s',_0x0a9e('0x44'),_0x25c6e6,JSON[_0x0a9e('0x24')](_0x432fcc));});}});}function getConnection(_0xdd268f){var _0xfbd5ad=_0xdd268f[_0x0a9e('0x21')];var _0xbe9d19=_0xdd268f[_0x0a9e('0x45')];return request({'method':_0x0a9e('0x2e'),'uri':util['format'](_0x0a9e('0x1f'),_0xdd268f['remoteUri']),'qs':{'operation':_0x0a9e('0x46'),'username':_0xfbd5ad},'json':!![]})[_0x0a9e('0x25')](function(_0x8d6dd1){if(_0x8d6dd1['success']){return request({'method':_0x0a9e('0x1d'),'uri':util[_0x0a9e('0x1e')](_0x0a9e('0x1f'),_0xdd268f[_0x0a9e('0x3b')]),'form':{'operation':_0x0a9e('0x47'),'username':_0xfbd5ad,'accessKey':md5(_0x8d6dd1[_0x0a9e('0x26')][_0x0a9e('0x48')]+_0xbe9d19)},'json':!![]});}})['then'](function(_0x13f44d){if(_0x13f44d[_0x0a9e('0x31')]){return BPromise[_0x0a9e('0x32')](_0x13f44d[_0x0a9e('0x26')]);}else{throw new Error(util[_0x0a9e('0x1e')](_0x0a9e('0x49'),_0xdd268f['id']));}})[_0x0a9e('0x28')](function(_0x19383e){var _0x34febd=_0x19383e['statusCode']||0x1f4;logger[_0x0a9e('0x29')](_0x0a9e('0x2a'),'getConnection',_0x34febd,JSON['stringify'](_0x19383e));});}function request(_0x5ddf84){logger[_0x0a9e('0x18')](_0x0a9e('0x4a'),JSON[_0x0a9e('0x24')](_0x5ddf84));return rp(_0x5ddf84);}exports[_0x0a9e('0x4b')]=function(_0x61bb17,_0x30decb,_0x2e5165,_0x375c18,_0x5d38ae,_0x4b1b9f){var _0x53975a,_0x39d77d,_0x204173,_0x14d602;_0x4b1b9f['remoteUri']=intUtil[_0x0a9e('0x4c')](_0x4b1b9f[_0x0a9e('0x3b')]);if(_0x5d38ae&&_0x5d38ae['monitor_format']){logger['info'](_0x0a9e('0x4d'),'Recording\x20is\x20enabled!');_0x30decb[_0x0a9e('0x4e')]=util['format'](_0x0a9e('0x4f'),_0x4b1b9f[_0x0a9e('0x50')],_0x30decb[_0x0a9e('0x51')],md5(_0x30decb['uniqueid']));}else{_0x30decb[_0x0a9e('0x4e')]='';}return getConnection(_0x4b1b9f)[_0x0a9e('0x25')](function(_0x508b47){_0x14d602=_0x508b47;return getUser(_0x4b1b9f,_0x375c18['email'],_0x14d602);})[_0x0a9e('0x25')](function(_0x3aedd0){_0x53975a=_0x3aedd0;logger['info'](_0x0a9e('0x52'),_0x53975a['id']);return getEndUser(_0x4b1b9f,_0x30decb['calleridname'],_0x30decb[_0x0a9e('0x53')],_0x14d602);})['then'](function(_0xe22ccc){_0x39d77d=_0xe22ccc;logger['info']('The\x20Enduser\x20ID\x20is:',_0x39d77d['id']);return createTicket(_0x4b1b9f,_0x53975a,_0x39d77d,_0x2e5165,_0x30decb,_0x2e5165['Fields'],_0x14d602);})[_0x0a9e('0x25')](function(_0x47de4c){_0x204173=_0x47de4c;logger[_0x0a9e('0x18')](_0x0a9e('0x54'));logger[_0x0a9e('0x18')](_0x0a9e('0x55'),_0x204173['id']);var _0x232830=util[_0x0a9e('0x1e')](_0x0a9e('0x56'),_0x4b1b9f[_0x0a9e('0x3b')],_['split'](_0x204173['id'],'x')[0x1]);logger[_0x0a9e('0x18')](_0x0a9e('0x4d'),_0x0a9e('0x57'));emit(util[_0x0a9e('0x1e')](_0x0a9e('0x58'),_0x375c18[_0x0a9e('0x16')]),'trigger:browser:url',{'uri':_0x232830});})[_0x0a9e('0x28')](function(_0x26bc80){logger['error'](_0x0a9e('0x4d'),JSON['stringify'](_0x26bc80));});};exports[_0x0a9e('0x59')]=function(_0x5ba1f9,_0x4b3c1a,_0x5674ee,_0x273cb5,_0x49d231,_0x2244d6,_0x1fc70e){var _0x261adb,_0x7be420,_0x1cca9f,_0x26d7db;_0x2244d6['remoteUri']=intUtil[_0x0a9e('0x4c')](_0x2244d6['remoteUri']);_0x2244d6[_0x0a9e('0x50')]=intUtil[_0x0a9e('0x4c')](_0x2244d6[_0x0a9e('0x50')]);if(_0x1fc70e&&_0x1fc70e['recordingFormat']&&_0x1fc70e[_0x0a9e('0x5a')]!==_0x0a9e('0x5b')){logger[_0x0a9e('0x18')](_0x0a9e('0x5c'),'Recording\x20is\x20enabled!');_0x4b3c1a[_0x0a9e('0x4e')]=util[_0x0a9e('0x1e')]('%s/api/voice/recordings/%s/downloads?type=uniqueid&token=%s',_0x2244d6[_0x0a9e('0x50')],_0x4b3c1a[_0x0a9e('0x51')],md5(_0x4b3c1a[_0x0a9e('0x51')]));}return getConnection(_0x2244d6)[_0x0a9e('0x25')](function(_0x401837){_0x26d7db=_0x401837;return getUser(_0x2244d6,_0x273cb5['email'],_0x26d7db);})[_0x0a9e('0x25')](function(_0x2937e0){_0x261adb=_0x2937e0;logger[_0x0a9e('0x18')]('The\x20User\x20ID\x20is:',_0x261adb['id']);return getEndUser(_0x2244d6,_0x4b3c1a[_0x0a9e('0x5d')],_0x4b3c1a['destcalleridnum'],_0x26d7db);})['then'](function(_0x242745){_0x7be420=_0x242745;logger[_0x0a9e('0x18')](_0x0a9e('0x5e'),_0x7be420['id']);return createTicket(_0x2244d6,_0x261adb,_0x7be420,_0x5674ee,_0x4b3c1a,_0x5674ee[_0x0a9e('0x5f')],_0x26d7db);})[_0x0a9e('0x25')](function(_0xc8c264){_0x1cca9f=_0xc8c264;logger[_0x0a9e('0x18')](_0x0a9e('0x54'));logger[_0x0a9e('0x18')](_0x0a9e('0x55'),_0x1cca9f['id']);var _0x2e89b7=util[_0x0a9e('0x1e')](_0x0a9e('0x56'),_0x2244d6[_0x0a9e('0x3b')],_[_0x0a9e('0x60')](_0x1cca9f['id'],'x')[0x1]);logger[_0x0a9e('0x18')](_0x0a9e('0x5c'),_0x0a9e('0x57'));emit(util['format'](_0x0a9e('0x58'),_0x273cb5[_0x0a9e('0x16')]),_0x0a9e('0x61'),{'uri':_0x2e89b7});})['catch'](function(_0x1148a1){logger[_0x0a9e('0x29')]('[OUTBOUND]',JSON[_0x0a9e('0x24')](_0x1148a1));});};exports[_0x0a9e('0x62')]=function(_0x3ef315,_0x427946,_0x13b5c0,_0x4a43a8,_0x50cdce,_0x4a2438){var _0x40fb85,_0x18bf5d,_0x1104ad,_0x23a7d3;_0x4a2438[_0x0a9e('0x3b')]=intUtil[_0x0a9e('0x4c')](_0x4a2438[_0x0a9e('0x3b')]);_0x4a2438[_0x0a9e('0x50')]=intUtil['stripTrailingSlash'](_0x4a2438[_0x0a9e('0x50')]);if(_0x50cdce&&_0x50cdce[_0x0a9e('0x63')]){logger[_0x0a9e('0x18')]('['+_0x427946['lastevent'][_0x0a9e('0x64')]()+']','Recording\x20is\x20enabled!');_0x427946[_0x0a9e('0x4e')]=util[_0x0a9e('0x1e')]('%s/api/voice/recordings/%s/downloads?type=uniqueid&token=%s',_0x4a2438[_0x0a9e('0x50')],_0x427946[_0x0a9e('0x51')],md5(_0x427946[_0x0a9e('0x51')]));}else{_0x427946[_0x0a9e('0x4e')]='';}return getConnection(_0x4a2438)['then'](function(_0x1d442c){_0x23a7d3=_0x1d442c;return getUser(_0x4a2438,'',_0x23a7d3);})[_0x0a9e('0x25')](function(_0x371533){_0x40fb85=_0x371533;logger[_0x0a9e('0x18')]('The\x20User\x20ID\x20is:',_0x40fb85['id']);return getEndUser(_0x4a2438,_0x427946[_0x0a9e('0x65')],_0x427946[_0x0a9e('0x53')],_0x23a7d3);})[_0x0a9e('0x25')](function(_0x361b21){_0x18bf5d=_0x361b21;logger['info'](_0x0a9e('0x5e'),_0x18bf5d['id']);return createTicket(_0x4a2438,_0x40fb85,_0x18bf5d,_0x13b5c0,_0x427946,_0x13b5c0[_0x0a9e('0x5f')],_0x23a7d3);})[_0x0a9e('0x25')](function(_0xf410e5){_0x1104ad=_0xf410e5;logger[_0x0a9e('0x18')](_0x0a9e('0x54'));logger[_0x0a9e('0x18')](_0x0a9e('0x55'),_0x1104ad['id']);})[_0x0a9e('0x28')](function(_0x336dc3){logger[_0x0a9e('0x29')]('['+_0x427946[_0x0a9e('0x66')][_0x0a9e('0x64')]()+']',JSON[_0x0a9e('0x24')](_0x336dc3));});}; \ No newline at end of file +var _0xd8b0=['info','Creating\x20new\x20ticket...','merge','Normal','Subjects','POST','format','%s/webservice.php','remoteUri','create','username','sessionName','HelpDesk','stringify','success','result','Ticket\x20could\x20not\x20be\x20created\x20due\x20to:\x20%s','error','statusCode','[vTiger],\x20%s,\x20%s,\x20%s','validateEmail','Getting\x20agent\x20with\x20email','then','Agent\x20found!','resolve','email1','first_name','Agent\x20not\x20found,\x20using\x20the\x20admin\x20account!','admin','catch','userId','getUser','Searching\x20end\x20user\x20with\x20phone','GET','query','Enduser\x20found!','firstname','Enduser\x20created.','lastname','phone','accessKey','getchallenge','login','token','getConnection','stripTrailingSlash','monitor_format','[QUEUE]','Recording\x20is\x20enabled!','%s/api/voice/recordings/%s/downloads?type=uniqueid&token=%s','serverUrl','recordingURL','email','calleridname','calleridnum','The\x20Enduser\x20ID\x20is:','Fields','Ticket\x20created!','%s/index.php?module=HelpDesk&view=Detail&record=%s&app=SUPPORT','split','Displaying\x20ticket\x20to\x20agent\x20in\x20a\x20new\x20tab...','trigger:browser:url','outbound','recordingFormat','none','[OUTBOUND]','uniqueid','The\x20User\x20ID\x20is:','destcalleridname','destcalleridnum','The\x20Ticket\x20ID\x20is:','user:%s','lastevent','toUpperCase','lodash','request-promise','ioredis','./util','../../../../config/environment','../../../../config/logger','vTiger','redis','localhost','socket.io-emitter','emit','length','forEach','includes','picklist','idField','content','toString','type','variable','variableName','customVariable','Variable','name','toLowerCase'];(function(_0x49052b,_0x3ba709){var _0x48c045=function(_0x41ac38){while(--_0x41ac38){_0x49052b['push'](_0x49052b['shift']());}};_0x48c045(++_0x3ba709);}(_0xd8b0,0xad));var _0x0d8b=function(_0x20a584,_0xe384a5){_0x20a584=_0x20a584-0x0;var _0x4b41a8=_0xd8b0[_0x20a584];return _0x4b41a8;};'use strict';var _=require(_0x0d8b('0x0'));var rp=require(_0x0d8b('0x1'));var BPromise=require('bluebird');var md5=require('md5');var util=require('util');var Redis=require(_0x0d8b('0x2'));var intUtil=require(_0x0d8b('0x3'));var config=require(_0x0d8b('0x4'));var logger=require(_0x0d8b('0x5'))(_0x0d8b('0x6'));config['redis']=_['defaults'](config[_0x0d8b('0x7')],{'host':_0x0d8b('0x8'),'port':0x18eb});var io=require(_0x0d8b('0x9'))(new Redis(config['redis']));function emit(_0x413284,_0x284169,_0x58e4e2){io['to'](_0x413284)[_0x0d8b('0xa')](_0x284169,_0x58e4e2);}function getCustomFields(_0x348e65,_0x3b027f){var _0x1f4800={};if(_0x348e65[_0x0d8b('0xb')]>0x0){_[_0x0d8b('0xc')](_0x348e65,function(_0x2c5e9e){if(_[_0x0d8b('0xd')](['string',_0x0d8b('0xe')],_0x2c5e9e['type'])&&_0x2c5e9e[_0x0d8b('0xf')]){_0x1f4800[_0x2c5e9e[_0x0d8b('0xf')]]=_0x2c5e9e[_0x0d8b('0x10')][_0x0d8b('0x11')]();}else if(_0x2c5e9e[_0x0d8b('0x12')]===_0x0d8b('0x13')&&_0x2c5e9e[_0x0d8b('0x14')]&&_0x2c5e9e[_0x0d8b('0xf')]&&_0x3b027f[_0x2c5e9e[_0x0d8b('0x14')]]){_0x1f4800[_0x2c5e9e[_0x0d8b('0xf')]]=_0x3b027f[_0x2c5e9e[_0x0d8b('0x14')]][_0x0d8b('0x11')]();}else if(_0x2c5e9e[_0x0d8b('0x12')]===_0x0d8b('0x15')&&_0x2c5e9e['Variable']&&_0x2c5e9e[_0x0d8b('0x16')][_0x0d8b('0x17')]&&_0x2c5e9e[_0x0d8b('0xf')]&&_0x3b027f[_0x2c5e9e[_0x0d8b('0x16')][_0x0d8b('0x17')]['toLowerCase']()]){_0x1f4800[_0x2c5e9e[_0x0d8b('0xf')]]=_0x3b027f[_0x2c5e9e[_0x0d8b('0x16')][_0x0d8b('0x17')][_0x0d8b('0x18')]()][_0x0d8b('0x11')]();}});}return _0x1f4800;}function createTicket(_0x18dd2d,_0x264b39,_0xa3612a,_0x4a15bf,_0x27512e,_0x23d58f,_0x196c0a){logger[_0x0d8b('0x19')](_0x0d8b('0x1a'));var _0x5b709c=_[_0x0d8b('0x1b')]({'parent_id':'','assigned_user_id':_0x264b39['id'],'ticketpriorities':_0x0d8b('0x1c'),'ticketstatus':'Open','ticket_title':intUtil['getString'](_0x4a15bf[_0x0d8b('0x1d')],_0x27512e,'\x20'),'description':intUtil['getString'](_0x4a15bf['Descriptions'],_0x27512e,'\x0a'),'contact_id':_0xa3612a['id']},getCustomFields(_0x23d58f,_0x27512e));var _0x5527d8={'method':_0x0d8b('0x1e'),'uri':util[_0x0d8b('0x1f')](_0x0d8b('0x20'),_0x18dd2d[_0x0d8b('0x21')]),'form':{'operation':_0x0d8b('0x22'),'username':_0x18dd2d[_0x0d8b('0x23')],'sessionName':_0x196c0a[_0x0d8b('0x24')],'elementType':_0x0d8b('0x25'),'element':JSON[_0x0d8b('0x26')](_0x5b709c)},'json':!![]};return request(_0x5527d8)['then'](function(_0xe8bbee){if(_0xe8bbee[_0x0d8b('0x27')]){return BPromise['resolve']({'id':_0xe8bbee[_0x0d8b('0x28')]['id']});}else{throw new Error(util['format'](_0x0d8b('0x29'),JSON[_0x0d8b('0x26')](_0xe8bbee[_0x0d8b('0x2a')])));}})['catch'](function(_0x59a905){var _0x28f639=_0x59a905[_0x0d8b('0x2b')]||0x1f4;logger['error'](_0x0d8b('0x2c'),'createTicket',_0x28f639,JSON[_0x0d8b('0x26')](_0x59a905));});}function getUser(_0x4b59e5,_0x97050a,_0x48f24f){if(intUtil[_0x0d8b('0x2d')](_0x97050a)){logger['info'](_0x0d8b('0x2e'),_0x97050a);return request({'method':'GET','uri':util[_0x0d8b('0x1f')](_0x0d8b('0x20'),_0x4b59e5[_0x0d8b('0x21')]),'qs':{'operation':'query','username':_0x4b59e5['username'],'sessionName':_0x48f24f['sessionName'],'query':util[_0x0d8b('0x1f')]('SELECT\x20first_name,\x20last_name,\x20email1\x20FROM\x20Users\x20WHERE\x20email1=\x27%s\x27;',_0x97050a)},'json':!![]})[_0x0d8b('0x2f')](function(_0x54f6f3){if(_0x54f6f3['success']&&_0x54f6f3[_0x0d8b('0x28')][_0x0d8b('0xb')]){logger[_0x0d8b('0x19')](_0x0d8b('0x30'));return BPromise[_0x0d8b('0x31')]({'id':_0x54f6f3[_0x0d8b('0x28')][0x0]['id'],'email':_0x54f6f3[_0x0d8b('0x28')][0x0][_0x0d8b('0x32')],'name':_0x54f6f3['result'][0x0][_0x0d8b('0x33')]+'\x20'+_0x54f6f3[_0x0d8b('0x28')]['last_name']});}else{logger[_0x0d8b('0x19')](_0x0d8b('0x34'));return BPromise[_0x0d8b('0x31')]({'id':_0x48f24f['userId'],'email':_0x4b59e5[_0x0d8b('0x23')],'name':_0x0d8b('0x35')});}})[_0x0d8b('0x36')](function(_0x31ceba){var _0x933e01=_0x31ceba['statusCode']||0x1f4;logger[_0x0d8b('0x2a')](_0x0d8b('0x2c'),'getUser',_0x933e01,JSON[_0x0d8b('0x26')](_0x31ceba));});}else{logger[_0x0d8b('0x19')](_0x0d8b('0x34'));return BPromise[_0x0d8b('0x31')]({'id':_0x48f24f[_0x0d8b('0x37')],'email':_0x4b59e5['username'],'name':'admin'})[_0x0d8b('0x36')](function(_0x5c2c04){var _0x531c55=_0x5c2c04[_0x0d8b('0x2b')]||0x1f4;logger[_0x0d8b('0x2a')](_0x0d8b('0x2c'),_0x0d8b('0x38'),_0x531c55,JSON[_0x0d8b('0x26')](_0x5c2c04));});}}function getEndUser(_0x24c789,_0x579324,_0x6e5bab,_0x6a02ad){logger[_0x0d8b('0x19')](_0x0d8b('0x39'),_0x6e5bab);return request({'method':_0x0d8b('0x3a'),'uri':util[_0x0d8b('0x1f')](_0x0d8b('0x20'),_0x24c789['remoteUri']),'qs':{'operation':_0x0d8b('0x3b'),'username':_0x24c789[_0x0d8b('0x23')],'sessionName':_0x6a02ad[_0x0d8b('0x24')],'query':util[_0x0d8b('0x1f')]('SELECT\x20id,\x20firstname,\x20lastname,\x20email,\x20phone,\x20mobile,\x20homephone,\x20otherphone,\x20assistantphone\x20FROM\x20Contacts\x20WHERE\x20phone\x20=\x20\x27%s\x27\x20OR\x20mobile\x20=\x27%s\x27\x20OR\x20homephone\x20=\x27%s\x27\x20OR\x20otherphone\x20=\x27%s\x27\x20OR\x20assistantphone\x20=\x27%s\x27;',_0x6e5bab,_0x6e5bab,_0x6e5bab,_0x6e5bab,_0x6e5bab)},'json':!![]})[_0x0d8b('0x2f')](function(_0x4b4bde){if(_0x4b4bde[_0x0d8b('0x27')]&&_0x4b4bde[_0x0d8b('0x28')][_0x0d8b('0xb')]){logger[_0x0d8b('0x19')](_0x0d8b('0x3c'));return BPromise[_0x0d8b('0x31')]({'id':_0x4b4bde[_0x0d8b('0x28')][0x0]['id'],'name':_0x4b4bde[_0x0d8b('0x28')][0x0][_0x0d8b('0x3d')]+'\x20'+_0x4b4bde[_0x0d8b('0x28')][0x0]['lastname'],'phone':_0x6e5bab});}else{logger['info']('Enduser\x20not\x20found,\x20creating\x20a\x20new\x20enduser!');return request({'method':'POST','uri':util['format'](_0x0d8b('0x20'),_0x24c789[_0x0d8b('0x21')]),'form':{'operation':_0x0d8b('0x22'),'sessionName':_0x6a02ad['sessionName'],'elementType':'Contacts','element':JSON[_0x0d8b('0x26')]({'lastname':_0x579324,'phone':_0x6e5bab,'assigned_user_id':'\x20'})},'json':!![]})[_0x0d8b('0x2f')](function(_0x344278){logger['info'](_0x0d8b('0x3e'));return BPromise[_0x0d8b('0x31')]({'id':_0x344278['result']['id'],'name':_0x344278['result'][_0x0d8b('0x3f')],'phone':_0x344278['result'][_0x0d8b('0x40')]});})['catch'](function(_0x53f643){var _0x30ccee=_0x53f643[_0x0d8b('0x2b')]||0x1f4;logger['error']('[vTiger],\x20%s,\x20%s,\x20%s','getEndUser',_0x30ccee,JSON['stringify'](_0x53f643));});}});}function getConnection(_0x374d40){var _0x1e0498=_0x374d40[_0x0d8b('0x23')];var _0x490eda=_0x374d40[_0x0d8b('0x41')];return request({'method':_0x0d8b('0x3a'),'uri':util[_0x0d8b('0x1f')](_0x0d8b('0x20'),_0x374d40[_0x0d8b('0x21')]),'qs':{'operation':_0x0d8b('0x42'),'username':_0x1e0498},'json':!![]})[_0x0d8b('0x2f')](function(_0x1d5067){if(_0x1d5067[_0x0d8b('0x27')]){return request({'method':_0x0d8b('0x1e'),'uri':util[_0x0d8b('0x1f')](_0x0d8b('0x20'),_0x374d40[_0x0d8b('0x21')]),'form':{'operation':_0x0d8b('0x43'),'username':_0x1e0498,'accessKey':md5(_0x1d5067[_0x0d8b('0x28')][_0x0d8b('0x44')]+_0x490eda)},'json':!![]});}})[_0x0d8b('0x2f')](function(_0x1e162c){if(_0x1e162c[_0x0d8b('0x27')]){return BPromise['resolve'](_0x1e162c[_0x0d8b('0x28')]);}else{throw new Error(util['format']('Account\x20%d\x20is\x20not\x20valid',_0x374d40['id']));}})[_0x0d8b('0x36')](function(_0x113fb7){var _0x3f943a=_0x113fb7[_0x0d8b('0x2b')]||0x1f4;logger['error'](_0x0d8b('0x2c'),_0x0d8b('0x45'),_0x3f943a,JSON[_0x0d8b('0x26')](_0x113fb7));});}function request(_0x241587){logger[_0x0d8b('0x19')]('[HTTP]',JSON['stringify'](_0x241587));return rp(_0x241587);}exports['queue']=function(_0x573f4f,_0x368ede,_0xf22c3c,_0x5e3bb4,_0x4950a8,_0x44c5c1){var _0x3d3cb6,_0x5c5bd7,_0x5ef6c3,_0x900906;_0x44c5c1[_0x0d8b('0x21')]=intUtil[_0x0d8b('0x46')](_0x44c5c1[_0x0d8b('0x21')]);if(_0x4950a8&&_0x4950a8[_0x0d8b('0x47')]){logger['info'](_0x0d8b('0x48'),_0x0d8b('0x49'));_0x368ede['recordingURL']=util['format'](_0x0d8b('0x4a'),_0x44c5c1[_0x0d8b('0x4b')],_0x368ede['uniqueid'],md5(_0x368ede['uniqueid']));}else{_0x368ede[_0x0d8b('0x4c')]='';}return getConnection(_0x44c5c1)[_0x0d8b('0x2f')](function(_0x377027){_0x900906=_0x377027;return getUser(_0x44c5c1,_0x5e3bb4[_0x0d8b('0x4d')],_0x900906);})['then'](function(_0x356b3d){_0x3d3cb6=_0x356b3d;logger['info']('The\x20User\x20ID\x20is:',_0x3d3cb6['id']);return getEndUser(_0x44c5c1,_0x368ede[_0x0d8b('0x4e')],_0x368ede[_0x0d8b('0x4f')],_0x900906);})['then'](function(_0x4a8f33){_0x5c5bd7=_0x4a8f33;logger[_0x0d8b('0x19')](_0x0d8b('0x50'),_0x5c5bd7['id']);return createTicket(_0x44c5c1,_0x3d3cb6,_0x5c5bd7,_0xf22c3c,_0x368ede,_0xf22c3c[_0x0d8b('0x51')],_0x900906);})[_0x0d8b('0x2f')](function(_0x3afc3a){_0x5ef6c3=_0x3afc3a;logger[_0x0d8b('0x19')](_0x0d8b('0x52'));logger[_0x0d8b('0x19')]('The\x20Ticket\x20ID\x20is:',_0x5ef6c3['id']);var _0x24a859=util[_0x0d8b('0x1f')](_0x0d8b('0x53'),_0x44c5c1[_0x0d8b('0x21')],_[_0x0d8b('0x54')](_0x5ef6c3['id'],'x')[0x1]);logger[_0x0d8b('0x19')](_0x0d8b('0x48'),_0x0d8b('0x55'));emit(util[_0x0d8b('0x1f')]('user:%s',_0x5e3bb4[_0x0d8b('0x17')]),_0x0d8b('0x56'),{'uri':_0x24a859});})[_0x0d8b('0x36')](function(_0x23de9e){logger[_0x0d8b('0x2a')]('[QUEUE]',JSON[_0x0d8b('0x26')](_0x23de9e));});};exports[_0x0d8b('0x57')]=function(_0x181d49,_0x17a87f,_0x1d6cd4,_0x59ada2,_0x4d0e7c,_0x3b1166,_0x291b83){var _0x3e4a41,_0xbbb520,_0x5a70bd,_0x199122;_0x3b1166[_0x0d8b('0x21')]=intUtil[_0x0d8b('0x46')](_0x3b1166['remoteUri']);_0x3b1166[_0x0d8b('0x4b')]=intUtil['stripTrailingSlash'](_0x3b1166[_0x0d8b('0x4b')]);if(_0x291b83&&_0x291b83[_0x0d8b('0x58')]&&_0x291b83[_0x0d8b('0x58')]!==_0x0d8b('0x59')){logger[_0x0d8b('0x19')](_0x0d8b('0x5a'),'Recording\x20is\x20enabled!');_0x17a87f[_0x0d8b('0x4c')]=util['format'](_0x0d8b('0x4a'),_0x3b1166[_0x0d8b('0x4b')],_0x17a87f[_0x0d8b('0x5b')],md5(_0x17a87f[_0x0d8b('0x5b')]));}return getConnection(_0x3b1166)['then'](function(_0x19e097){_0x199122=_0x19e097;return getUser(_0x3b1166,_0x59ada2[_0x0d8b('0x4d')],_0x199122);})[_0x0d8b('0x2f')](function(_0x2332fc){_0x3e4a41=_0x2332fc;logger[_0x0d8b('0x19')](_0x0d8b('0x5c'),_0x3e4a41['id']);return getEndUser(_0x3b1166,_0x17a87f[_0x0d8b('0x5d')],_0x17a87f[_0x0d8b('0x5e')],_0x199122);})[_0x0d8b('0x2f')](function(_0x34affb){_0xbbb520=_0x34affb;logger['info']('The\x20Enduser\x20ID\x20is:',_0xbbb520['id']);return createTicket(_0x3b1166,_0x3e4a41,_0xbbb520,_0x1d6cd4,_0x17a87f,_0x1d6cd4[_0x0d8b('0x51')],_0x199122);})[_0x0d8b('0x2f')](function(_0x53e399){_0x5a70bd=_0x53e399;logger[_0x0d8b('0x19')]('Ticket\x20created!');logger['info'](_0x0d8b('0x5f'),_0x5a70bd['id']);var _0x1c4e96=util['format']('%s/index.php?module=HelpDesk&view=Detail&record=%s&app=SUPPORT',_0x3b1166[_0x0d8b('0x21')],_[_0x0d8b('0x54')](_0x5a70bd['id'],'x')[0x1]);logger[_0x0d8b('0x19')](_0x0d8b('0x5a'),_0x0d8b('0x55'));emit(util[_0x0d8b('0x1f')](_0x0d8b('0x60'),_0x59ada2['name']),_0x0d8b('0x56'),{'uri':_0x1c4e96});})['catch'](function(_0x1a203e){logger[_0x0d8b('0x2a')](_0x0d8b('0x5a'),JSON[_0x0d8b('0x26')](_0x1a203e));});};exports['unmanaged']=function(_0x3fe47d,_0x4a1c4a,_0x3a356b,_0x2c6c5f,_0x1c5fe2,_0x2ebea3){var _0xc5c35f,_0x2b44e5,_0x3e927c,_0x91aa89;_0x2ebea3[_0x0d8b('0x21')]=intUtil[_0x0d8b('0x46')](_0x2ebea3['remoteUri']);_0x2ebea3[_0x0d8b('0x4b')]=intUtil['stripTrailingSlash'](_0x2ebea3[_0x0d8b('0x4b')]);if(_0x1c5fe2&&_0x1c5fe2[_0x0d8b('0x47')]){logger['info']('['+_0x4a1c4a[_0x0d8b('0x61')]['toUpperCase']()+']',_0x0d8b('0x49'));_0x4a1c4a[_0x0d8b('0x4c')]=util[_0x0d8b('0x1f')](_0x0d8b('0x4a'),_0x2ebea3[_0x0d8b('0x4b')],_0x4a1c4a[_0x0d8b('0x5b')],md5(_0x4a1c4a[_0x0d8b('0x5b')]));}else{_0x4a1c4a[_0x0d8b('0x4c')]='';}return getConnection(_0x2ebea3)['then'](function(_0x10eca6){_0x91aa89=_0x10eca6;return getUser(_0x2ebea3,'',_0x91aa89);})[_0x0d8b('0x2f')](function(_0x5b2916){_0xc5c35f=_0x5b2916;logger[_0x0d8b('0x19')](_0x0d8b('0x5c'),_0xc5c35f['id']);return getEndUser(_0x2ebea3,_0x4a1c4a[_0x0d8b('0x4e')],_0x4a1c4a[_0x0d8b('0x4f')],_0x91aa89);})[_0x0d8b('0x2f')](function(_0x9e44b4){_0x2b44e5=_0x9e44b4;logger[_0x0d8b('0x19')](_0x0d8b('0x50'),_0x2b44e5['id']);return createTicket(_0x2ebea3,_0xc5c35f,_0x2b44e5,_0x3a356b,_0x4a1c4a,_0x3a356b[_0x0d8b('0x51')],_0x91aa89);})[_0x0d8b('0x2f')](function(_0xe35028){_0x3e927c=_0xe35028;logger[_0x0d8b('0x19')]('Ticket\x20created!');logger[_0x0d8b('0x19')](_0x0d8b('0x5f'),_0x3e927c['id']);})[_0x0d8b('0x36')](function(_0x58525c){logger['error']('['+_0x4a1c4a[_0x0d8b('0x61')][_0x0d8b('0x62')]()+']',JSON[_0x0d8b('0x26')](_0x58525c));});}; \ No newline at end of file diff --git a/server/services/ami/trigger/integration/zendesk.js b/server/services/ami/trigger/integration/zendesk.js index 8057c96..8f532b4 100644 --- a/server/services/ami/trigger/integration/zendesk.js +++ b/server/services/ami/trigger/integration/zendesk.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x5f43=['unmanaged','lastevent','toUpperCase','md5','util','./util','../../../../config/environment','zendesk','redis','socket.io-emitter','emit','application/json','info','Creating\x20new\x20ticket...','format','%s/tickets.json','POST','merge','Tags','name','getString','Descriptions','Fields','then','ticket','validateEmail','Getting\x20agent\x20with\x20email','remoteUri','type:user\x20role:agent\x20email:%s','count','Agent\x20found!','find','results','agent','Agent\x20not\x20found,\x20using\x20the\x20admin\x20account!','user','%s/users/me.json','Searching\x20enduser\x20with\x20phone','%s/search.json','length','filter','end-user','first','authType','%s:%s','%s/token:%s','username','token','Basic\x20%s','base64','debug','[HTTP]','stringify','defaults','map','forEach','includes','string','picklist','type','nameField','customField','toLowerCase','content','toString','idField','custom_fields','push','variable','variableName','customVariable','Variable','queue','stripTrailingSlash','serverUrl','monitor_format','[QUEUE]','recordingURL','uniqueid','Authorization','email','The\x20User\x20ID\x20is:','calleridname','calleridnum','The\x20Enduser\x20ID\x20is:','integrationTab','%s/channels/voice/agents/%d/tickets/%d/display.json','Displaying\x20ticket\x20to\x20agent\x20in\x20a\x20new\x20tab...','user:%s','trigger:browser:url','/api/v2','Zendesk\x20account\x20type\x20not\x20recognized','catch','[QUEUE]\x20Error\x20running\x20Zendesk\x20integration','inspect','outbound','recordingFormat','[OUTBOUND]','%s/api/voice/recordings/%s/downloads?type=uniqueid&token=%s','destcalleridname','destcalleridnum','The\x20Ticket\x20ID\x20is:','Displaying\x20ticket\x20to\x20agent...','newTab','%s/agent/tickets/%s','replace','error'];(function(_0x160640,_0x13f10c){var _0x556610=function(_0x172577){while(--_0x172577){_0x160640['push'](_0x160640['shift']());}};_0x556610(++_0x13f10c);}(_0x5f43,0x6e));var _0x35f4=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0x5f43[_0x3dd15e];return _0x231fd0;};'use strict';var _=require('lodash');var rp=require('request-promise');var md5=require(_0x35f4('0x0'));var util=require(_0x35f4('0x1'));var Redis=require('ioredis');var intUtil=require(_0x35f4('0x2'));var config=require(_0x35f4('0x3'));var logger=require('../../../../config/logger')(_0x35f4('0x4'));config[_0x35f4('0x5')]=_['defaults'](config[_0x35f4('0x5')],{'host':'localhost','port':0x18eb});var io=require(_0x35f4('0x6'))(new Redis(config[_0x35f4('0x5')]));function emit(_0x4283e3,_0x111f85,_0x108976){io['to'](_0x4283e3)[_0x35f4('0x7')](_0x111f85,_0x108976);}var headers={'Content-Type':_0x35f4('0x8'),'Accept':_0x35f4('0x8')};function getTicket(_0x3c5399,_0x13b141,_0x5df63a,_0x1ba9da,_0x57f07a){logger[_0x35f4('0x9')](_0x35f4('0xa'));return request({'uri':util[_0x35f4('0xb')](_0x35f4('0xc'),_0x3c5399['remoteUri']),'method':_0x35f4('0xd'),'body':{'ticket':_[_0x35f4('0xe')]({'requester_id':_0x5df63a['id'],'submitter_id':_0x13b141?_0x13b141['id']:undefined,'assignee_id':_0x13b141?_0x13b141['id']:undefined,'tags':getTags(_0x1ba9da[_0x35f4('0xf')],_0x35f4('0x10')),'subject':intUtil[_0x35f4('0x11')](_0x1ba9da['Subjects'],_0x57f07a,'\x20'),'description':intUtil['getString'](_0x1ba9da['Descriptions'],_0x57f07a,'\x0a'),'comment':{'public':![],'body':intUtil[_0x35f4('0x11')](_0x1ba9da[_0x35f4('0x12')],_0x57f07a,'\x0a')}},getCustomFields(_0x1ba9da[_0x35f4('0x13')],_0x57f07a))}})[_0x35f4('0x14')](function(_0x7c0ea3){logger[_0x35f4('0x9')]('Ticket\x20created!');return _0x7c0ea3[_0x35f4('0x15')];});}function getUser(_0x25d7e9,_0x20275e){if(intUtil[_0x35f4('0x16')](_0x20275e)){logger[_0x35f4('0x9')](_0x35f4('0x17'),_0x20275e);return request({'uri':util[_0x35f4('0xb')]('%s/search.json',_0x25d7e9[_0x35f4('0x18')]),'qs':{'query':util[_0x35f4('0xb')](_0x35f4('0x19'),_0x20275e)}})[_0x35f4('0x14')](function(_0xa5b68f){if(_0xa5b68f[_0x35f4('0x1a')]){logger[_0x35f4('0x9')](_0x35f4('0x1b'));return _[_0x35f4('0x1c')](_0xa5b68f[_0x35f4('0x1d')],{'email':_0x20275e,'role':_0x35f4('0x1e')});}else{logger[_0x35f4('0x9')](_0x35f4('0x1f'));return request({'uri':util[_0x35f4('0xb')]('%s/users/me.json',_0x25d7e9[_0x35f4('0x18')])})[_0x35f4('0x14')](function(_0x14b197){logger[_0x35f4('0x9')]('Admin\x20account\x20selected.');return _0x14b197[_0x35f4('0x20')];});}});}else{logger['info']('Agent\x20not\x20found,\x20using\x20the\x20admin\x20account!');return request({'uri':util[_0x35f4('0xb')](_0x35f4('0x21'),_0x25d7e9[_0x35f4('0x18')])})[_0x35f4('0x14')](function(_0x5d94e6){logger[_0x35f4('0x9')]('Admin\x20account\x20selected.');return _0x5d94e6[_0x35f4('0x20')];});}}function getEndUser(_0x15820a,_0x5c025c,_0x5d6bfb){logger[_0x35f4('0x9')](_0x35f4('0x22'),_0x5d6bfb);return request({'uri':util['format'](_0x35f4('0x23'),_0x15820a['remoteUri']),'qs':{'query':util['format']('type:user\x20role:end-user\x20phone:%s',_0x5d6bfb)}})['then'](function(_0x25032a){var _0x4f8d7b;if(_0x25032a[_0x35f4('0x1d')][_0x35f4('0x24')]){_0x25032a[_0x35f4('0x1d')]=_[_0x35f4('0x25')](_0x25032a[_0x35f4('0x1d')],{'suspended':![],'role':_0x35f4('0x26')});if(_0x25032a[_0x35f4('0x1d')]['length']){_0x4f8d7b=_[_0x35f4('0x27')](_0x25032a['results']);}}if(_0x4f8d7b){logger['info']('Enduser\x20found!');return _0x4f8d7b;}else{logger[_0x35f4('0x9')]('Enduser\x20not\x20found,\x20creating\x20a\x20new\x20enduser!');return request({'uri':util['format']('%s/users.json',_0x15820a['remoteUri']),'method':'POST','body':{'user':{'role':_0x35f4('0x26'),'name':util[_0x35f4('0xb')]('Caller\x20-\x20%s',_0x5c025c||_0x5d6bfb),'phone':_0x5d6bfb}}})[_0x35f4('0x14')](function(_0x22f268){logger[_0x35f4('0x9')]('Enduser\x20created.');return _0x22f268[_0x35f4('0x20')];});}});}function getAuth(_0x1e4546){var _0x267138;if(_0x1e4546[_0x35f4('0x28')]==='password'){_0x267138=util[_0x35f4('0xb')](_0x35f4('0x29'),_0x1e4546['username'],_0x1e4546['password']);}else if(_0x1e4546[_0x35f4('0x28')]==='token'){_0x267138=util[_0x35f4('0xb')](_0x35f4('0x2a'),_0x1e4546[_0x35f4('0x2b')],_0x1e4546[_0x35f4('0x2c')]);}return util[_0x35f4('0xb')](_0x35f4('0x2d'),new Buffer(_0x267138)['toString'](_0x35f4('0x2e')));}function request(_0x1b6bf0){logger[_0x35f4('0x2f')](_0x35f4('0x30'),JSON[_0x35f4('0x31')](_0x1b6bf0));return rp(_[_0x35f4('0x32')](_0x1b6bf0,{'method':'GET','headers':headers,'json':!![]}));}function getTags(_0x5a218a,_0x1cdcf3){var _0x28e4e0=[];if(_0x5a218a&&_0x5a218a[_0x35f4('0x24')]>0x0){_0x28e4e0=_[_0x35f4('0x33')](_0x5a218a,_0x1cdcf3);}return _0x28e4e0;}function getCustomFields(_0x4a8ead,_0x594e7a){var _0x5624ee=[];var _0x19af7c={'custom_fields':[]};if(_0x4a8ead[_0x35f4('0x24')]>0x0){_[_0x35f4('0x34')](_0x4a8ead,function(_0x1a1a9c){if(_[_0x35f4('0x35')]([_0x35f4('0x36'),_0x35f4('0x37')],_0x1a1a9c[_0x35f4('0x38')])&&_0x1a1a9c[_0x35f4('0x39')]&&!_0x1a1a9c[_0x35f4('0x3a')]){_0x19af7c[_0x1a1a9c['nameField'][_0x35f4('0x3b')]()]=_0x1a1a9c[_0x35f4('0x3c')][_0x35f4('0x3d')]();}else if(_[_0x35f4('0x35')]([_0x35f4('0x36'),_0x35f4('0x37')],_0x1a1a9c[_0x35f4('0x38')])&&_0x1a1a9c[_0x35f4('0x3e')]&&_0x1a1a9c['customField']){_0x19af7c[_0x35f4('0x3f')][_0x35f4('0x40')]({'id':_0x1a1a9c[_0x35f4('0x3e')],'value':_0x1a1a9c[_0x35f4('0x3c')][_0x35f4('0x3d')]()});}else if(_0x1a1a9c['type']===_0x35f4('0x41')&&_0x1a1a9c[_0x35f4('0x42')]&&_0x1a1a9c['idField']&&_0x1a1a9c[_0x35f4('0x3a')]){_0x594e7a[_0x1a1a9c[_0x35f4('0x42')]]&&_0x19af7c['custom_fields'][_0x35f4('0x40')]({'id':_0x1a1a9c['idField'],'value':_0x594e7a[_0x1a1a9c[_0x35f4('0x42')]][_0x35f4('0x3d')]()});}else if(_0x1a1a9c[_0x35f4('0x38')]===_0x35f4('0x43')&&_0x1a1a9c[_0x35f4('0x44')]&&_0x1a1a9c['Variable'][_0x35f4('0x10')]&&_0x1a1a9c['idField']&&_0x1a1a9c[_0x35f4('0x3a')]){_0x594e7a[_0x1a1a9c['Variable'][_0x35f4('0x10')][_0x35f4('0x3b')]()]&&_0x19af7c[_0x35f4('0x3f')][_0x35f4('0x40')]({'id':_0x1a1a9c[_0x35f4('0x3e')],'value':_0x594e7a[_0x1a1a9c[_0x35f4('0x44')][_0x35f4('0x10')][_0x35f4('0x3b')]()]['toString']()});}});}return _0x19af7c;}exports[_0x35f4('0x45')]=function(_0x526cc8,_0x119ace,_0x47d4cc,_0x231038,_0x98386c,_0x3c72ed){var _0x332a45,_0x2a480c;_0x3c72ed[_0x35f4('0x18')]=intUtil[_0x35f4('0x46')](_0x3c72ed['remoteUri']);_0x3c72ed['serverUrl']=intUtil[_0x35f4('0x46')](_0x3c72ed[_0x35f4('0x47')]);if(_0x98386c&&_0x98386c[_0x35f4('0x48')]){logger[_0x35f4('0x9')](_0x35f4('0x49'),'Recording\x20is\x20enabled!');_0x119ace[_0x35f4('0x4a')]=util[_0x35f4('0xb')]('%s/api/voice/recordings/%s/downloads?type=uniqueid&token=%s',_0x3c72ed[_0x35f4('0x47')],_0x119ace['uniqueid'],md5(_0x119ace[_0x35f4('0x4b')]));}else{_0x119ace[_0x35f4('0x4a')]='';}headers[_0x35f4('0x4c')]=getAuth(_0x3c72ed);return getUser(_0x3c72ed,_0x231038[_0x35f4('0x4d')])['then'](function(_0x4b15bd){_0x332a45=_0x4b15bd;logger[_0x35f4('0x9')](_0x35f4('0x4e'),_0x332a45['id']);return getEndUser(_0x3c72ed,_0x119ace[_0x35f4('0x4f')],_0x119ace[_0x35f4('0x50')]);})[_0x35f4('0x14')](function(_0x30f212){_0x2a480c=_0x30f212;logger[_0x35f4('0x9')](_0x35f4('0x51'),_0x2a480c['id']);return getTicket(_0x3c72ed,_0x332a45,_0x2a480c,_0x47d4cc,_0x119ace);})[_0x35f4('0x14')](function(_0x116d61){if(_0x116d61){logger[_0x35f4('0x9')]('The\x20Ticket\x20ID\x20is:',_0x116d61['id']);switch(_0x3c72ed[_0x35f4('0x38')]){case _0x35f4('0x52'):logger[_0x35f4('0x9')]('[QUEUE]','Displaying\x20ticket\x20to\x20agent...');return request({'uri':util['format'](_0x35f4('0x53'),_0x3c72ed[_0x35f4('0x18')],_0x332a45['id'],_0x116d61['id']),'method':_0x35f4('0xd')});case'newTab':logger[_0x35f4('0x9')](_0x35f4('0x49'),_0x35f4('0x54'));emit(util[_0x35f4('0xb')](_0x35f4('0x55'),_0x231038[_0x35f4('0x10')]),_0x35f4('0x56'),{'uri':util[_0x35f4('0xb')]('%s/agent/tickets/%s',_0x3c72ed[_0x35f4('0x18')]['replace'](_0x35f4('0x57'),''),_0x116d61['id'])});break;default:logger['error'](_0x35f4('0x49'),_0x35f4('0x58'));}}})[_0x35f4('0x59')](function(_0x7d16ec){logger['error'](_0x35f4('0x5a'),util[_0x35f4('0x5b')](_0x7d16ec,{'showHidden':!![],'depth':null}));});};exports[_0x35f4('0x5c')]=function(_0x5ac0f3,_0x3c72ce,_0x2e2f1b,_0x32cafc,_0x2bb636,_0x566338,_0x2ed8ef){var _0x4e4da8,_0x333612;_0x566338['remoteUri']=intUtil[_0x35f4('0x46')](_0x566338[_0x35f4('0x18')]);_0x566338['serverUrl']=intUtil['stripTrailingSlash'](_0x566338[_0x35f4('0x47')]);if(_0x2ed8ef&&_0x2ed8ef['recordingFormat']&&_0x2ed8ef[_0x35f4('0x5d')]!=='none'){logger[_0x35f4('0x9')](_0x35f4('0x5e'),'Recording\x20is\x20enabled!');_0x3c72ce[_0x35f4('0x4a')]=util[_0x35f4('0xb')](_0x35f4('0x5f'),_0x566338[_0x35f4('0x47')],_0x3c72ce[_0x35f4('0x4b')],md5(_0x3c72ce['uniqueid']));}headers['Authorization']=getAuth(_0x566338);return getUser(_0x566338,_0x32cafc['email'])['then'](function(_0x4ccb76){_0x4e4da8=_0x4ccb76;logger['info'](_0x35f4('0x4e'),_0x4e4da8['id']);return getEndUser(_0x566338,_0x3c72ce[_0x35f4('0x60')],_0x3c72ce[_0x35f4('0x61')]);})[_0x35f4('0x14')](function(_0x4a2460){_0x333612=_0x4a2460;logger[_0x35f4('0x9')](_0x35f4('0x51'),_0x333612['id']);return getTicket(_0x566338,_0x4e4da8,_0x333612,_0x2e2f1b,_0x3c72ce);})['then'](function(_0x577a0d){if(_0x577a0d){logger[_0x35f4('0x9')](_0x35f4('0x62'),_0x577a0d['id']);switch(_0x566338[_0x35f4('0x38')]){case _0x35f4('0x52'):logger[_0x35f4('0x9')](_0x35f4('0x5e'),_0x35f4('0x63'));return request({'uri':util['format'](_0x35f4('0x53'),_0x566338['remoteUri'],_0x4e4da8['id'],_0x577a0d['id']),'method':_0x35f4('0xd')});case _0x35f4('0x64'):logger[_0x35f4('0x9')](_0x35f4('0x5e'),_0x35f4('0x54'));emit(util[_0x35f4('0xb')](_0x35f4('0x55'),_0x32cafc[_0x35f4('0x10')]),'trigger:browser:url',{'uri':util[_0x35f4('0xb')](_0x35f4('0x65'),_0x566338['remoteUri'][_0x35f4('0x66')](_0x35f4('0x57'),''),_0x577a0d['id'])});break;default:logger[_0x35f4('0x67')]('[OUTBOUND]',_0x35f4('0x58'));}}})[_0x35f4('0x59')](function(_0x38ff07){logger[_0x35f4('0x67')]('[OUTBOUND]\x20Error\x20running\x20Zendesk\x20integration',util[_0x35f4('0x5b')](_0x38ff07,{'showHidden':!![],'depth':null}));});};exports[_0x35f4('0x68')]=function(_0x1b9643,_0x3251f8,_0x689a89,_0x1b1567,_0xdac97a,_0x44280d){var _0x1ed286,_0x394575;_0x44280d[_0x35f4('0x18')]=intUtil[_0x35f4('0x46')](_0x44280d[_0x35f4('0x18')]);_0x44280d['serverUrl']=intUtil[_0x35f4('0x46')](_0x44280d[_0x35f4('0x47')]);if(_0xdac97a&&_0xdac97a[_0x35f4('0x48')]){logger['info']('['+_0x3251f8[_0x35f4('0x69')][_0x35f4('0x6a')]()+']','Recording\x20is\x20enabled!');_0x3251f8[_0x35f4('0x4a')]=util[_0x35f4('0xb')](_0x35f4('0x5f'),_0x44280d[_0x35f4('0x47')],_0x3251f8[_0x35f4('0x4b')],md5(_0x3251f8[_0x35f4('0x4b')]));}else{_0x3251f8[_0x35f4('0x4a')]='';}headers['Authorization']=getAuth(_0x44280d);return getUser(_0x44280d)[_0x35f4('0x14')](function(_0x479db1){_0x1ed286=_0x479db1;logger['info'](_0x35f4('0x4e'),_0x1ed286['id']);return getEndUser(_0x44280d,_0x3251f8[_0x35f4('0x4f')],_0x3251f8[_0x35f4('0x50')]);})[_0x35f4('0x14')](function(_0x3d334f){_0x394575=_0x3d334f;logger[_0x35f4('0x9')]('The\x20Enduser\x20ID\x20is:',_0x394575['id']);return getTicket(_0x44280d,_0x1ed286,_0x394575,_0x689a89,_0x3251f8);})[_0x35f4('0x14')](function(_0x15f79e){if(_0x15f79e){logger[_0x35f4('0x9')](_0x35f4('0x62'),_0x15f79e['id']);}})[_0x35f4('0x59')](function(_0x3e0f00){logger[_0x35f4('0x67')]('['+_0x3251f8[_0x35f4('0x69')]['toUpperCase']()+']'+'\x20Error\x20running\x20Zendesk\x20integration',util['inspect'](_0x3e0f00,{'showHidden':!![],'depth':null}));});}; \ No newline at end of file +var _0x1db7=['Recording\x20is\x20enabled!','%s/api/voice/recordings/%s/downloads?type=uniqueid&token=%s','uniqueid','recordingURL','Authorization','email','The\x20User\x20ID\x20is:','calleridname','calleridnum','The\x20Enduser\x20ID\x20is:','The\x20Ticket\x20ID\x20is:','Displaying\x20ticket\x20to\x20agent...','%s/channels/voice/agents/%d/tickets/%d/display.json','newTab','Displaying\x20ticket\x20to\x20agent\x20in\x20a\x20new\x20tab...','/api/v2','error','Zendesk\x20account\x20type\x20not\x20recognized','[QUEUE]\x20Error\x20running\x20Zendesk\x20integration','inspect','outbound','recordingFormat','none','[OUTBOUND]','destcalleridname','destcalleridnum','integrationTab','trigger:browser:url','%s/agent/tickets/%s','replace','catch','[OUTBOUND]\x20Error\x20running\x20Zendesk\x20integration','unmanaged','lastevent','toUpperCase','\x20Error\x20running\x20Zendesk\x20integration','request-promise','md5','ioredis','./util','../../../../config/environment','../../../../config/logger','zendesk','redis','defaults','localhost','socket.io-emitter','emit','application/json','info','Creating\x20new\x20ticket...','format','remoteUri','merge','getString','Descriptions','then','Ticket\x20created!','validateEmail','type:user\x20role:agent\x20email:%s','count','Agent\x20found!','results','agent','Agent\x20not\x20found,\x20using\x20the\x20admin\x20account!','%s/users/me.json','Admin\x20account\x20selected.','Searching\x20enduser\x20with\x20phone','%s/search.json','type:user\x20role:end-user\x20phone:%s','length','filter','end-user','first','Enduser\x20not\x20found,\x20creating\x20a\x20new\x20enduser!','POST','Caller\x20-\x20%s','authType','password','%s:%s','username','token','Basic\x20%s','base64','debug','[HTTP]','GET','forEach','picklist','nameField','customField','toLowerCase','content','string','idField','custom_fields','toString','type','variableName','push','Variable','name','queue','stripTrailingSlash','serverUrl','monitor_format','[QUEUE]'];(function(_0x2dafbe,_0x5d04de){var _0x58a45a=function(_0x50ac96){while(--_0x50ac96){_0x2dafbe['push'](_0x2dafbe['shift']());}};_0x58a45a(++_0x5d04de);}(_0x1db7,0x1d0));var _0x71db=function(_0x3596bd,_0x27fc6b){_0x3596bd=_0x3596bd-0x0;var _0x15c456=_0x1db7[_0x3596bd];return _0x15c456;};'use strict';var _=require('lodash');var rp=require(_0x71db('0x0'));var md5=require(_0x71db('0x1'));var util=require('util');var Redis=require(_0x71db('0x2'));var intUtil=require(_0x71db('0x3'));var config=require(_0x71db('0x4'));var logger=require(_0x71db('0x5'))(_0x71db('0x6'));config[_0x71db('0x7')]=_[_0x71db('0x8')](config[_0x71db('0x7')],{'host':_0x71db('0x9'),'port':0x18eb});var io=require(_0x71db('0xa'))(new Redis(config['redis']));function emit(_0x3ff33f,_0x2c3442,_0x26bc71){io['to'](_0x3ff33f)[_0x71db('0xb')](_0x2c3442,_0x26bc71);}var headers={'Content-Type':'application/json','Accept':_0x71db('0xc')};function getTicket(_0x1f1aae,_0x2a36c1,_0x162c59,_0x1c4c43,_0x36f913){logger[_0x71db('0xd')](_0x71db('0xe'));return request({'uri':util[_0x71db('0xf')]('%s/tickets.json',_0x1f1aae[_0x71db('0x10')]),'method':'POST','body':{'ticket':_[_0x71db('0x11')]({'requester_id':_0x162c59['id'],'submitter_id':_0x2a36c1?_0x2a36c1['id']:undefined,'assignee_id':_0x2a36c1?_0x2a36c1['id']:undefined,'tags':getTags(_0x1c4c43['Tags'],'name'),'subject':intUtil[_0x71db('0x12')](_0x1c4c43['Subjects'],_0x36f913,'\x20'),'description':intUtil[_0x71db('0x12')](_0x1c4c43[_0x71db('0x13')],_0x36f913,'\x0a'),'comment':{'public':![],'body':intUtil[_0x71db('0x12')](_0x1c4c43['Descriptions'],_0x36f913,'\x0a')}},getCustomFields(_0x1c4c43['Fields'],_0x36f913))}})[_0x71db('0x14')](function(_0x5788b8){logger[_0x71db('0xd')](_0x71db('0x15'));return _0x5788b8['ticket'];});}function getUser(_0x2c8e1b,_0x2e354e){if(intUtil[_0x71db('0x16')](_0x2e354e)){logger['info']('Getting\x20agent\x20with\x20email',_0x2e354e);return request({'uri':util['format']('%s/search.json',_0x2c8e1b['remoteUri']),'qs':{'query':util[_0x71db('0xf')](_0x71db('0x17'),_0x2e354e)}})['then'](function(_0x4efc1c){if(_0x4efc1c[_0x71db('0x18')]){logger[_0x71db('0xd')](_0x71db('0x19'));return _['find'](_0x4efc1c[_0x71db('0x1a')],{'email':_0x2e354e,'role':_0x71db('0x1b')});}else{logger[_0x71db('0xd')](_0x71db('0x1c'));return request({'uri':util[_0x71db('0xf')](_0x71db('0x1d'),_0x2c8e1b[_0x71db('0x10')])})['then'](function(_0x4abeca){logger[_0x71db('0xd')]('Admin\x20account\x20selected.');return _0x4abeca['user'];});}});}else{logger['info'](_0x71db('0x1c'));return request({'uri':util[_0x71db('0xf')](_0x71db('0x1d'),_0x2c8e1b[_0x71db('0x10')])})[_0x71db('0x14')](function(_0x32b023){logger[_0x71db('0xd')](_0x71db('0x1e'));return _0x32b023['user'];});}}function getEndUser(_0x28f884,_0x37551b,_0x2d8569){logger[_0x71db('0xd')](_0x71db('0x1f'),_0x2d8569);return request({'uri':util['format'](_0x71db('0x20'),_0x28f884['remoteUri']),'qs':{'query':util[_0x71db('0xf')](_0x71db('0x21'),_0x2d8569)}})[_0x71db('0x14')](function(_0x237d84){var _0x1471d1;if(_0x237d84[_0x71db('0x1a')][_0x71db('0x22')]){_0x237d84[_0x71db('0x1a')]=_[_0x71db('0x23')](_0x237d84[_0x71db('0x1a')],{'suspended':![],'role':_0x71db('0x24')});if(_0x237d84[_0x71db('0x1a')][_0x71db('0x22')]){_0x1471d1=_[_0x71db('0x25')](_0x237d84[_0x71db('0x1a')]);}}if(_0x1471d1){logger[_0x71db('0xd')]('Enduser\x20found!');return _0x1471d1;}else{logger[_0x71db('0xd')](_0x71db('0x26'));return request({'uri':util[_0x71db('0xf')]('%s/users.json',_0x28f884[_0x71db('0x10')]),'method':_0x71db('0x27'),'body':{'user':{'role':_0x71db('0x24'),'name':util['format'](_0x71db('0x28'),_0x37551b||_0x2d8569),'phone':_0x2d8569}}})[_0x71db('0x14')](function(_0x1c6b5c){logger[_0x71db('0xd')]('Enduser\x20created.');return _0x1c6b5c['user'];});}});}function getAuth(_0x35e182){var _0x5a076a;if(_0x35e182[_0x71db('0x29')]===_0x71db('0x2a')){_0x5a076a=util[_0x71db('0xf')](_0x71db('0x2b'),_0x35e182[_0x71db('0x2c')],_0x35e182[_0x71db('0x2a')]);}else if(_0x35e182[_0x71db('0x29')]===_0x71db('0x2d')){_0x5a076a=util[_0x71db('0xf')]('%s/token:%s',_0x35e182[_0x71db('0x2c')],_0x35e182['token']);}return util[_0x71db('0xf')](_0x71db('0x2e'),new Buffer(_0x5a076a)['toString'](_0x71db('0x2f')));}function request(_0x4940b7){logger[_0x71db('0x30')](_0x71db('0x31'),JSON['stringify'](_0x4940b7));return rp(_[_0x71db('0x8')](_0x4940b7,{'method':_0x71db('0x32'),'headers':headers,'json':!![]}));}function getTags(_0x4d4c54,_0x305d1c){var _0x52a449=[];if(_0x4d4c54&&_0x4d4c54['length']>0x0){_0x52a449=_['map'](_0x4d4c54,_0x305d1c);}return _0x52a449;}function getCustomFields(_0x3f29fe,_0x1c266c){var _0x50b809=[];var _0x1c1734={'custom_fields':[]};if(_0x3f29fe['length']>0x0){_[_0x71db('0x33')](_0x3f29fe,function(_0xcb03f){if(_['includes'](['string',_0x71db('0x34')],_0xcb03f['type'])&&_0xcb03f[_0x71db('0x35')]&&!_0xcb03f[_0x71db('0x36')]){_0x1c1734[_0xcb03f[_0x71db('0x35')][_0x71db('0x37')]()]=_0xcb03f[_0x71db('0x38')]['toString']();}else if(_['includes']([_0x71db('0x39'),_0x71db('0x34')],_0xcb03f['type'])&&_0xcb03f[_0x71db('0x3a')]&&_0xcb03f['customField']){_0x1c1734[_0x71db('0x3b')]['push']({'id':_0xcb03f['idField'],'value':_0xcb03f[_0x71db('0x38')][_0x71db('0x3c')]()});}else if(_0xcb03f[_0x71db('0x3d')]==='variable'&&_0xcb03f[_0x71db('0x3e')]&&_0xcb03f['idField']&&_0xcb03f['customField']){_0x1c266c[_0xcb03f[_0x71db('0x3e')]]&&_0x1c1734['custom_fields'][_0x71db('0x3f')]({'id':_0xcb03f[_0x71db('0x3a')],'value':_0x1c266c[_0xcb03f[_0x71db('0x3e')]]['toString']()});}else if(_0xcb03f[_0x71db('0x3d')]==='customVariable'&&_0xcb03f[_0x71db('0x40')]&&_0xcb03f[_0x71db('0x40')]['name']&&_0xcb03f[_0x71db('0x3a')]&&_0xcb03f[_0x71db('0x36')]){_0x1c266c[_0xcb03f[_0x71db('0x40')]['name'][_0x71db('0x37')]()]&&_0x1c1734[_0x71db('0x3b')]['push']({'id':_0xcb03f['idField'],'value':_0x1c266c[_0xcb03f[_0x71db('0x40')][_0x71db('0x41')][_0x71db('0x37')]()]['toString']()});}});}return _0x1c1734;}exports[_0x71db('0x42')]=function(_0xf294d9,_0x538e76,_0x3304f7,_0xe11dc3,_0x3c7dde,_0x17a4c5){var _0x25785b,_0x3a1559;_0x17a4c5[_0x71db('0x10')]=intUtil[_0x71db('0x43')](_0x17a4c5[_0x71db('0x10')]);_0x17a4c5['serverUrl']=intUtil['stripTrailingSlash'](_0x17a4c5[_0x71db('0x44')]);if(_0x3c7dde&&_0x3c7dde[_0x71db('0x45')]){logger[_0x71db('0xd')](_0x71db('0x46'),_0x71db('0x47'));_0x538e76['recordingURL']=util['format'](_0x71db('0x48'),_0x17a4c5[_0x71db('0x44')],_0x538e76[_0x71db('0x49')],md5(_0x538e76[_0x71db('0x49')]));}else{_0x538e76[_0x71db('0x4a')]='';}headers[_0x71db('0x4b')]=getAuth(_0x17a4c5);return getUser(_0x17a4c5,_0xe11dc3[_0x71db('0x4c')])[_0x71db('0x14')](function(_0x7e472a){_0x25785b=_0x7e472a;logger[_0x71db('0xd')](_0x71db('0x4d'),_0x25785b['id']);return getEndUser(_0x17a4c5,_0x538e76[_0x71db('0x4e')],_0x538e76[_0x71db('0x4f')]);})[_0x71db('0x14')](function(_0xcdc454){_0x3a1559=_0xcdc454;logger[_0x71db('0xd')](_0x71db('0x50'),_0x3a1559['id']);return getTicket(_0x17a4c5,_0x25785b,_0x3a1559,_0x3304f7,_0x538e76);})['then'](function(_0x3bc023){if(_0x3bc023){logger[_0x71db('0xd')](_0x71db('0x51'),_0x3bc023['id']);switch(_0x17a4c5[_0x71db('0x3d')]){case'integrationTab':logger[_0x71db('0xd')](_0x71db('0x46'),_0x71db('0x52'));return request({'uri':util['format'](_0x71db('0x53'),_0x17a4c5[_0x71db('0x10')],_0x25785b['id'],_0x3bc023['id']),'method':_0x71db('0x27')});case _0x71db('0x54'):logger['info'](_0x71db('0x46'),_0x71db('0x55'));emit(util[_0x71db('0xf')]('user:%s',_0xe11dc3[_0x71db('0x41')]),'trigger:browser:url',{'uri':util[_0x71db('0xf')]('%s/agent/tickets/%s',_0x17a4c5[_0x71db('0x10')]['replace'](_0x71db('0x56'),''),_0x3bc023['id'])});break;default:logger[_0x71db('0x57')](_0x71db('0x46'),_0x71db('0x58'));}}})['catch'](function(_0x525728){logger[_0x71db('0x57')](_0x71db('0x59'),util[_0x71db('0x5a')](_0x525728,{'showHidden':!![],'depth':null}));});};exports[_0x71db('0x5b')]=function(_0x4117ac,_0x3e3691,_0x52a218,_0x2d2ccd,_0x40815d,_0x344b32,_0x4afa47){var _0x40f0fe,_0x1970c4;_0x344b32[_0x71db('0x10')]=intUtil[_0x71db('0x43')](_0x344b32[_0x71db('0x10')]);_0x344b32[_0x71db('0x44')]=intUtil[_0x71db('0x43')](_0x344b32['serverUrl']);if(_0x4afa47&&_0x4afa47['recordingFormat']&&_0x4afa47[_0x71db('0x5c')]!==_0x71db('0x5d')){logger['info'](_0x71db('0x5e'),_0x71db('0x47'));_0x3e3691[_0x71db('0x4a')]=util['format'](_0x71db('0x48'),_0x344b32['serverUrl'],_0x3e3691['uniqueid'],md5(_0x3e3691[_0x71db('0x49')]));}headers[_0x71db('0x4b')]=getAuth(_0x344b32);return getUser(_0x344b32,_0x2d2ccd[_0x71db('0x4c')])['then'](function(_0x1d0359){_0x40f0fe=_0x1d0359;logger[_0x71db('0xd')](_0x71db('0x4d'),_0x40f0fe['id']);return getEndUser(_0x344b32,_0x3e3691[_0x71db('0x5f')],_0x3e3691[_0x71db('0x60')]);})[_0x71db('0x14')](function(_0x299825){_0x1970c4=_0x299825;logger[_0x71db('0xd')]('The\x20Enduser\x20ID\x20is:',_0x1970c4['id']);return getTicket(_0x344b32,_0x40f0fe,_0x1970c4,_0x52a218,_0x3e3691);})[_0x71db('0x14')](function(_0x386c35){if(_0x386c35){logger['info'](_0x71db('0x51'),_0x386c35['id']);switch(_0x344b32[_0x71db('0x3d')]){case _0x71db('0x61'):logger[_0x71db('0xd')]('[OUTBOUND]',_0x71db('0x52'));return request({'uri':util[_0x71db('0xf')](_0x71db('0x53'),_0x344b32[_0x71db('0x10')],_0x40f0fe['id'],_0x386c35['id']),'method':'POST'});case _0x71db('0x54'):logger[_0x71db('0xd')](_0x71db('0x5e'),_0x71db('0x55'));emit(util[_0x71db('0xf')]('user:%s',_0x2d2ccd[_0x71db('0x41')]),_0x71db('0x62'),{'uri':util[_0x71db('0xf')](_0x71db('0x63'),_0x344b32[_0x71db('0x10')][_0x71db('0x64')](_0x71db('0x56'),''),_0x386c35['id'])});break;default:logger[_0x71db('0x57')](_0x71db('0x5e'),_0x71db('0x58'));}}})[_0x71db('0x65')](function(_0x5a4498){logger['error'](_0x71db('0x66'),util['inspect'](_0x5a4498,{'showHidden':!![],'depth':null}));});};exports[_0x71db('0x67')]=function(_0x1da70b,_0x3bbfde,_0x3a95f7,_0x268571,_0x4bab53,_0x547918){var _0x54aa7b,_0x5c4a85;_0x547918[_0x71db('0x10')]=intUtil['stripTrailingSlash'](_0x547918[_0x71db('0x10')]);_0x547918[_0x71db('0x44')]=intUtil['stripTrailingSlash'](_0x547918['serverUrl']);if(_0x4bab53&&_0x4bab53[_0x71db('0x45')]){logger[_0x71db('0xd')]('['+_0x3bbfde[_0x71db('0x68')][_0x71db('0x69')]()+']',_0x71db('0x47'));_0x3bbfde['recordingURL']=util[_0x71db('0xf')](_0x71db('0x48'),_0x547918[_0x71db('0x44')],_0x3bbfde[_0x71db('0x49')],md5(_0x3bbfde[_0x71db('0x49')]));}else{_0x3bbfde['recordingURL']='';}headers[_0x71db('0x4b')]=getAuth(_0x547918);return getUser(_0x547918)[_0x71db('0x14')](function(_0x40d6e0){_0x54aa7b=_0x40d6e0;logger[_0x71db('0xd')]('The\x20User\x20ID\x20is:',_0x54aa7b['id']);return getEndUser(_0x547918,_0x3bbfde[_0x71db('0x4e')],_0x3bbfde[_0x71db('0x4f')]);})['then'](function(_0x5fa4ef){_0x5c4a85=_0x5fa4ef;logger['info'](_0x71db('0x50'),_0x5c4a85['id']);return getTicket(_0x547918,_0x54aa7b,_0x5c4a85,_0x3a95f7,_0x3bbfde);})['then'](function(_0x5e9232){if(_0x5e9232){logger[_0x71db('0xd')]('The\x20Ticket\x20ID\x20is:',_0x5e9232['id']);}})[_0x71db('0x65')](function(_0x337eb7){logger[_0x71db('0x57')]('['+_0x3bbfde[_0x71db('0x68')]['toUpperCase']()+']'+_0x71db('0x6a'),util[_0x71db('0x5a')](_0x337eb7,{'showHidden':!![],'depth':null}));});}; \ No newline at end of file diff --git a/server/services/ami/trigger/integration/zoho.js b/server/services/ami/trigger/integration/zoho.js index 9f6506f..7baf761 100644 --- a/server/services/ami/trigger/integration/zoho.js +++ b/server/services/ami/trigger/integration/zoho.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x957f=['/crm/v2/Calls','Call\x20created!','err','queue','host','stripTrailingSlash','serverUrl','monitor_format','[QUEUE]','/api/voice/recordings/','uniqueid','recordingURL','zoho.eu','com','email','The\x20User\x20ID\x20is:','calleridname','calleridnum','The\x20Call\x20ID\x20is:','user:%s','trigger:browser:url','https://crm.','/crm/EntityInfo.do?module=Calls&id=','recordingFormat','none','[OUTBOUND]','Recording\x20is\x20enabled!','/downloads?type=uniqueid&token=','Outbound','unmanaged','toUpperCase','lodash','md5','util','./util','moment','ioredis','bluebird','../../../../config/environment','../../../../config/logger','zoho','redis','defaults','localhost','socket.io-emitter','emit','debug','[HTTP]','forEach','includes','picklist','idField','toString','type','variable','variableName','Variable','name','toLowerCase','indexOf','split','isNil','isBefore','expires_in','access_token','zone','https://accounts.zoho.com','https://accounts.zoho.com.au','https://accounts.zoho.eu','https://accounts.zoho.in','POST','/oauth/v2/token','clientId','clientSecret','refresh_token','then','seconds','catch','error','Failing\x20creating\x20the\x20access_token','stack','Search\x20user','GET','format','https://www.zohoapis.%s/crm/v2/users','ActiveUsers','Zoho-oauthtoken\x20','users','info','Agent\x20found!','Using\x20the\x20admin\x20account!','findIndex','profile','user','Administrator','The\x20failing\x20result\x20is','Unable\x20to\x20retrieve\x20zoho\x20account\x20users:\x20','stringify','data','moduleCreate','role','first_name','last_name','code','SUCCESS','details','startCase','log','CREATE\x20ERROR','moduleSearch','contact_lead','https://www.zohoapis.','Contacts','uri','/crm/v2/Leads/search?criteria=((Phone:equals:','Leads','nothing','contact','lead','Creating\x20new\x20call...','Owner','Subject','getString','Subjects','Description','Who_Id','Full_Name','First_Name','Last_Name','enduserType','What_Id','$se_module','talktime','Call_Duration','utc','endtime','YYYY-MM-DDTHH:mm:ss','diff','starttime','mm:ss','lastevent','called','Call_Result','Called','complete','connect','Rejected','abandoned','Timeout','Call_Start_Time','agentcalledAt','Call_Type','Inbound','merge'];(function(_0x4a5438,_0x19aa59){var _0x35a70d=function(_0x42b805){while(--_0x42b805){_0x4a5438['push'](_0x4a5438['shift']());}};_0x35a70d(++_0x19aa59);}(_0x957f,0x1ed));var _0xf957=function(_0x1fb7d1,_0x108781){_0x1fb7d1=_0x1fb7d1-0x0;var _0x2480d8=_0x957f[_0x1fb7d1];return _0x2480d8;};'use strict';var _=require(_0xf957('0x0'));var rp=require('request-promise');var md5=require(_0xf957('0x1'));var util=require(_0xf957('0x2'));var intUtil=require(_0xf957('0x3'));var moment=require(_0xf957('0x4'));var Redis=require(_0xf957('0x5'));var BPromise=require(_0xf957('0x6'));var config=require(_0xf957('0x7'));var logger=require(_0xf957('0x8'))(_0xf957('0x9'));config[_0xf957('0xa')]=_[_0xf957('0xb')](config[_0xf957('0xa')],{'host':_0xf957('0xc'),'port':0x18eb});var io=require(_0xf957('0xd'))(new Redis(config['redis']));function emit(_0x1fd856,_0x415266,_0x409729){io['to'](_0x1fd856)[_0xf957('0xe')](_0x415266,_0x409729);}function request(_0x2e2a60){logger[_0xf957('0xf')](_0xf957('0x10'),JSON['stringify'](_0x2e2a60));return rp(_0x2e2a60);}function getCustomFields(_0x50f6bc,_0x288a79){var _0x2c03a8={};if(_0x50f6bc['length']>0x0){_[_0xf957('0x11')](_0x50f6bc,function(_0x1d3bd5){if(_[_0xf957('0x12')](['string',_0xf957('0x13')],_0x1d3bd5['type'])&&_0x1d3bd5['idField']){_0x2c03a8[_0x1d3bd5[_0xf957('0x14')]]=_0x1d3bd5['content'][_0xf957('0x15')]();}else if(_0x1d3bd5[_0xf957('0x16')]===_0xf957('0x17')&&_0x1d3bd5['variableName']&&_0x1d3bd5['idField']&&_0x288a79[_0x1d3bd5['variableName']]){_0x2c03a8[_0x1d3bd5[_0xf957('0x14')]]=_0x288a79[_0x1d3bd5[_0xf957('0x18')]][_0xf957('0x15')]();}else if(_0x1d3bd5[_0xf957('0x16')]==='customVariable'&&_0x1d3bd5['Variable']&&_0x1d3bd5[_0xf957('0x19')][_0xf957('0x1a')]&&_0x1d3bd5['idField']&&_0x288a79[_0x1d3bd5['Variable'][_0xf957('0x1a')][_0xf957('0x1b')]()]){_0x2c03a8[_0x1d3bd5[_0xf957('0x14')]]=_0x288a79[_0x1d3bd5[_0xf957('0x19')][_0xf957('0x1a')][_0xf957('0x1b')]()][_0xf957('0x15')]();}});}return _0x2c03a8;}function getName(_0x29689f){if(_0x29689f[_0xf957('0x1c')]('\x20')>0x0){var _0x2e074e=_0x29689f[_0xf957('0x1d')](/ (.+)/);if(_0x2e074e[0x1]){return _0x2e074e;}}return[_0x29689f,_0x29689f];}var accountsTokens={};function getAccessToken(_0x4ce3eb){return new Promise(function(_0x4caa22,_0x4f7280){if(!_['isNil'](accountsTokens[_0x4ce3eb['id']])&&!_[_0xf957('0x1e')](accountsTokens[_0x4ce3eb['id']]['access_token'])){if(moment()[_0xf957('0x1f')](accountsTokens[_0x4ce3eb['id']][_0xf957('0x20')])){_0x4caa22(accountsTokens[_0x4ce3eb['id']][_0xf957('0x21')]);}}var _0x2ffd40;switch(_0x4ce3eb[_0xf957('0x22')]){case'US':_0x2ffd40=_0xf957('0x23');break;case'AU':_0x2ffd40=_0xf957('0x24');break;case'EU':_0x2ffd40=_0xf957('0x25');break;case'IN':_0x2ffd40=_0xf957('0x26');break;case'CN':_0x2ffd40='https://accounts.zoho.com.cn';break;default:_0x2ffd40=_0xf957('0x25');break;}var _0x52f51f={'method':_0xf957('0x27'),'uri':_0x2ffd40+_0xf957('0x28'),'qs':{'refresh_token':_0x4ce3eb['refreshToken'],'client_id':_0x4ce3eb[_0xf957('0x29')],'client_secret':_0x4ce3eb[_0xf957('0x2a')],'grant_type':_0xf957('0x2b')},'json':!![]};return rp(_0x52f51f)[_0xf957('0x2c')](function(_0x8cc764){accountsTokens[_0x4ce3eb['id']]={'access_token':_0x8cc764[_0xf957('0x21')],'expires_in':moment()['add'](_0x8cc764[_0xf957('0x20')],_0xf957('0x2d'))};_0x4caa22(_0x8cc764['access_token']);})[_0xf957('0x2e')](function(_0x172bd2){logger[_0xf957('0x2f')](_0xf957('0x30'),_0x172bd2[_0xf957('0x31')]);_0x4f7280(_0x172bd2);});});}function getUser(_0x2c9abe,_0xf14419,_0x901dd5,_0xee8724){logger['info'](_0xf957('0x32'));return request({'method':_0xf957('0x33'),'uri':util[_0xf957('0x34')](_0xf957('0x35'),_0xf14419),'qs':{'type':_0xf957('0x36')},'headers':{'Authorization':_0xf957('0x37')+_0x2c9abe},'json':!![]})['then'](function(_0x1a631e){if(_0x1a631e['users']){var _0x4b815f=-0x1;if(_['isArrayLikeObject'](_0x1a631e['users'])){if(!_['isNil'](_0xee8724)){_0x4b815f=_['findIndex'](_0x1a631e[_0xf957('0x38')],function(_0x42a78f){return _0x42a78f['email']===_0xee8724;});}if(_0x4b815f>=0x0){logger[_0xf957('0x39')](_0xf957('0x3a'));}else{logger[_0xf957('0x39')](_0xf957('0x3b'));_0x4b815f=_[_0xf957('0x3c')](_0x1a631e[_0xf957('0x38')],function(_0x551d3f){return _0x551d3f[_0xf957('0x3d')]['name']==='Administrator';});}return _0x1a631e['users'][_0x4b815f];}else{if(_0x1a631e[_0xf957('0x3e')]['profile']['name']===_0xf957('0x3f')){logger[_0xf957('0x39')]('Using\x20the\x20admin\x20account!');user=_0x1a631e['user'];return user;}else{logger[_0xf957('0x2f')](_0xf957('0x40'),JSON['stringify'](_0x1a631e));throw new Error(_0xf957('0x41')+JSON[_0xf957('0x42')](_0x1a631e));}}}else{logger[_0xf957('0x2f')](_0xf957('0x40'),JSON['stringify'](_0x1a631e));throw new Error(_0xf957('0x41')+JSON[_0xf957('0x42')](_0x1a631e));}})[_0xf957('0x2e')](function(_0x27c11a){console[_0xf957('0x2f')](_0x27c11a);});}function getZohoUser(_0x5c360e,_0x40cf03){return new BPromise(function(_0x175ae2,_0x1fbd87){request(_0x5c360e)['then'](function(_0x421609){var _0x2b8097=null;if(_0x421609){_0x2b8097=_0x421609[_0xf957('0x43')][0x0];_0x2b8097['enduserType']=_0x40cf03;}_0x175ae2(_0x2b8097);})[_0xf957('0x2e')](function(_0x1dc0e4){_0x1fbd87(_0x1dc0e4);});});}function createEndUser(_0x6a402a,_0x58f176,_0x2a9cb3,_0xe26fee,_0x3bb133,_0x45ae06){var _0x2a9cb3=getName(_0x2a9cb3);return request({'method':_0xf957('0x27'),'uri':'https://www.zohoapis.'+_0x58f176+'/crm/v2/'+_['startCase'](_0x45ae06[_0xf957('0x44')])+'s','body':{'data':[{'Last_Name':_0x2a9cb3[0x1],'First_Name':_0x2a9cb3[0x0],'Phone':_0xe26fee,'Owner':{'name':!_[_0xf957('0x1e')](_0x3bb133[_0xf957('0x45')][_0xf957('0x1a')])?_0x3bb133['role']['name']:!_[_0xf957('0x1e')](_0x3bb133['first_name'])?_0x3bb133[_0xf957('0x46')]+'\x20'+_0x3bb133['last_name']:_0x3bb133[_0xf957('0x47')],'id':_0x3bb133['id']}}]},'headers':{'Authorization':_0xf957('0x37')+_0x6a402a},'json':!![]})[_0xf957('0x2c')](function(_0x255f60){if(_0x255f60&&_0x255f60[_0xf957('0x43')][0x0][_0xf957('0x48')]===_0xf957('0x49')){var _0x76fad1=_0x255f60[_0xf957('0x43')][0x0][_0xf957('0x4a')];_0x76fad1['enduserType']=_[_0xf957('0x4b')](_0x45ae06[_0xf957('0x44')])+'s';return _0x76fad1;}logger[_0xf957('0x2f')]('The\x20failing\x20result\x20is',JSON[_0xf957('0x42')](data));throw new Error('Error:\x20'+JSON[_0xf957('0x42')](data));})['catch'](function(_0x4174a3){console[_0xf957('0x4c')](_0xf957('0x4d'),_0x4174a3);});}function getEndUser(_0x376895,_0x486db8,_0x199d82,_0x2559b2,_0x49ca61,_0x2ee40f,_0x5158b3){var _0x359353={'method':_0xf957('0x33'),'uri':'','headers':{'Authorization':_0xf957('0x37')+_0x376895},'json':!![]};switch(_0x5158b3[_0xf957('0x4e')]){case _0xf957('0x4f'):_0x359353['uri']=_0xf957('0x50')+_0x486db8+'/crm/v2/Contacts/search?criteria=((Phone:equals:'+_0x49ca61+'))';return getZohoUser(_0x359353,_0xf957('0x51'))[_0xf957('0x2c')](function(_0x104219){if(_0x104219)return _0x104219;_0x359353[_0xf957('0x52')]=_0xf957('0x50')+_0x486db8+_0xf957('0x53')+_0x49ca61+'))';return getZohoUser(_0x359353,_0xf957('0x54'))[_0xf957('0x2c')](function(_0x462222){if(_0x462222)return _0x462222;if(_0x5158b3['moduleCreate']!=_0xf957('0x55')){return createEndUser(_0x376895,_0x486db8,_0x2559b2,_0x49ca61,_0x2ee40f,_0x5158b3);}else{return{};}});});break;case _0xf957('0x56'):_0x359353[_0xf957('0x52')]='https://www.zohoapis.'+_0x486db8+'/crm/v2/Contacts/search?criteria=((Phone:equals:'+_0x49ca61+'))';return getZohoUser(_0x359353,_0xf957('0x51'))[_0xf957('0x2c')](function(_0xcf5d81){if(_0xcf5d81)return _0xcf5d81;if(_0x5158b3[_0xf957('0x44')]!=_0xf957('0x55')){return createEndUser(_0x376895,_0x486db8,_0x2559b2,_0x49ca61,_0x2ee40f,_0x5158b3);}else{return{};}});break;case _0xf957('0x57'):_0x359353[_0xf957('0x52')]=_0xf957('0x50')+_0x486db8+_0xf957('0x53')+_0x49ca61+'))';return getZohoUser(_0x359353,_0xf957('0x54'))[_0xf957('0x2c')](function(_0x47c9a0){if(_0x47c9a0)return _0x47c9a0;if(_0x5158b3['moduleCreate']!=_0xf957('0x55')){return createEndUser(_0x376895,_0x486db8,_0x2559b2,_0x49ca61,_0x2ee40f,_0x5158b3);}else{return{};}});break;}}function getCall(_0xb75bd8,_0x40006b,_0x2c7994,_0xc3aa5b,_0x2711a0,_0x16e462,_0x1f30e,_0x1504b9){logger[_0xf957('0x39')](_0xf957('0x58'));var _0xca12c3={};_0xca12c3[_0xf957('0x59')]={'name':!_[_0xf957('0x1e')](_0xc3aa5b[_0xf957('0x45')][_0xf957('0x1a')])&&!_[_0xf957('0x1e')](_0xc3aa5b[_0xf957('0x3d')][_0xf957('0x1a')])&&_0xc3aa5b['profile']['name']==='administrator'?_0xc3aa5b[_0xf957('0x45')][_0xf957('0x1a')]:!_['isNil'](_0xc3aa5b[_0xf957('0x46')])?_0xc3aa5b[_0xf957('0x46')]+'\x20'+_0xc3aa5b['last_name']:_0xc3aa5b[_0xf957('0x47')],'id':_0xc3aa5b['id']};_0xca12c3[_0xf957('0x5a')]=intUtil[_0xf957('0x5b')](_0x16e462[_0xf957('0x5c')],_0x1f30e,'\x20');_0xca12c3[_0xf957('0x5d')]=intUtil[_0xf957('0x5b')](_0x16e462['Descriptions'],_0x1f30e,'\x0a');if(_0x2711a0['enduserType']===_0xf957('0x51')){_0xca12c3[_0xf957('0x5e')]={'name':!_[_0xf957('0x1e')](_0x2711a0[_0xf957('0x5f')])?_0x2711a0[_0xf957('0x5f')]:!_[_0xf957('0x1e')](_0x2711a0[_0xf957('0x60')])?_0x2711a0[_0xf957('0x60')]+'\x20'+_0x2711a0[_0xf957('0x61')]:_0x2711a0[_0xf957('0x61')],'id':_0x2711a0['id']};}if(_0x2711a0[_0xf957('0x62')]===_0xf957('0x54')){_0xca12c3[_0xf957('0x63')]={'name':!_[_0xf957('0x1e')](_0x2711a0[_0xf957('0x5f')])?_0x2711a0[_0xf957('0x5f')]:!_[_0xf957('0x1e')](_0x2711a0['First_Name'])?_0x2711a0[_0xf957('0x60')]+'\x20'+_0x2711a0[_0xf957('0x61')]:_0x2711a0[_0xf957('0x61')],'id':_0x2711a0['id']};_0xca12c3[_0xf957('0x64')]=_[_0xf957('0x4b')](_0x2711a0[_0xf957('0x62')]);}if(_0x1f30e[_0xf957('0x65')]){_0xca12c3[_0xf957('0x66')]=moment[_0xf957('0x67')](parseInt(_0x1f30e[_0xf957('0x65')])*0x3e8)['format']('mm:ss');}else if(_0x1f30e['answertime']&&_0x1f30e[_0xf957('0x68')]){_0xca12c3['Call_Duration']=moment[_0xf957('0x67')](moment(_0x1f30e[_0xf957('0x68')],_0xf957('0x69'))[_0xf957('0x6a')](moment(_0x1f30e[_0xf957('0x6b')],_0xf957('0x69'))))[_0xf957('0x34')](_0xf957('0x6c'));}switch(_0x1f30e[_0xf957('0x6d')]){case _0xf957('0x6e'):_0xca12c3[_0xf957('0x6f')]=_0xf957('0x70');break;case _0xf957('0x71'):case _0xf957('0x72'):_0xca12c3[_0xf957('0x6f')]='Answered';break;case'rejected':_0xca12c3[_0xf957('0x6f')]=_0xf957('0x73');break;case _0xf957('0x74'):_0xca12c3[_0xf957('0x6f')]='Abandoned';break;case'timeout':_0xca12c3[_0xf957('0x6f')]=_0xf957('0x75');default:}_0xca12c3[_0xf957('0x76')]=(_0x1504b9==='outbound'?moment(_0x1f30e[_0xf957('0x6b')])['format']('YYYY-MM-DDTHH:mm:ss'):moment(_0x1f30e[_0xf957('0x77')])['format']('YYYY-MM-DDTHH:mm:ss'))||moment()['format'](_0xf957('0x69'));_0xca12c3[_0xf957('0x78')]=_0x1504b9||_0xf957('0x79');_0xca12c3=_[_0xf957('0x7a')](_0xca12c3,getCustomFields(_0x16e462['Fields'],_0x1f30e));return request({'method':_0xf957('0x27'),'uri':_0xf957('0x50')+_0x40006b+_0xf957('0x7b'),'headers':{'Authorization':'Zoho-oauthtoken\x20'+_0xb75bd8},'body':{'data':[_0xca12c3]},'json':!![]})[_0xf957('0x2c')](function(_0x1f061b){if(_0x1f061b&&_0x1f061b[_0xf957('0x43')][0x0][_0xf957('0x48')]==='SUCCESS'){logger[_0xf957('0x39')](_0xf957('0x7c'));return{'id':_0x1f061b[_0xf957('0x43')][0x0][_0xf957('0x4a')]['id']};}})[_0xf957('0x2e')](function(_0x55274e){logger[_0xf957('0x39')]('err',_0x55274e[_0xf957('0x31')]);console[_0xf957('0x4c')](_0xf957('0x7d'),_0x55274e);});}exports[_0xf957('0x7e')]=function(_0x3e5be3,_0x551131,_0x258349,_0x6ccb7e,_0x11f124,_0x142766){var _0x51794d,_0x2e2095,_0x3173d7;_0x142766[_0xf957('0x7f')]=intUtil[_0xf957('0x80')](_0x142766[_0xf957('0x7f')]);_0x142766['serverUrl']=intUtil[_0xf957('0x80')](_0x142766[_0xf957('0x81')]);if(_0x11f124&&_0x11f124[_0xf957('0x82')]){logger[_0xf957('0x39')](_0xf957('0x83'),'Recording\x20is\x20enabled!');_0x551131['recordingURL']=_0x142766[_0xf957('0x81')]+_0xf957('0x84')+_0x551131[_0xf957('0x85')]+'/downloads?type=uniqueid&token='+md5(_0x551131[_0xf957('0x85')]);}else{_0x551131[_0xf957('0x86')]='';}var _0x355c7c=_0x142766[_0xf957('0x7f')]===_0xf957('0x87')?'eu':_0xf957('0x88');return getAccessToken(_0x142766)[_0xf957('0x2c')](function(_0x57224b){_0x3173d7=_0x57224b;return getUser(_0x3173d7,_0x355c7c,_0x142766,_0x6ccb7e[_0xf957('0x89')]);})[_0xf957('0x2c')](function(_0x22c410){_0x51794d=_0x22c410;logger[_0xf957('0x39')](_0xf957('0x8a'),_0x51794d['id']);return getEndUser(_0x3173d7,_0x355c7c,_0x142766,_0x551131[_0xf957('0x8b')],_0x551131[_0xf957('0x8c')],_0x51794d,_0x258349);})['then'](function(_0x4ec7bd){_0x2e2095=_0x4ec7bd;return getCall(_0x3173d7,_0x355c7c,_0x142766,_0x51794d,_0x2e2095,_0x258349,_0x551131,_0xf957('0x79'));})['then'](function(_0x526ba2){if(_0x526ba2){logger[_0xf957('0x39')](_0xf957('0x8d'),_0x526ba2['id']);logger[_0xf957('0x39')]('[QUEUE]','Displaying\x20call\x20to\x20agent\x20in\x20a\x20new\x20tab...');emit(util[_0xf957('0x34')](_0xf957('0x8e'),_0x6ccb7e[_0xf957('0x1a')]),_0xf957('0x8f'),{'uri':_0xf957('0x90')+_0x142766[_0xf957('0x7f')]+_0xf957('0x91')+_0x526ba2['id']});}})[_0xf957('0x2e')](function(_0x2b07ce){logger[_0xf957('0x2f')](_0xf957('0x83'),JSON[_0xf957('0x42')](_0x2b07ce));});};exports['outbound']=function(_0x1f1134,_0x24cbe3,_0x31aabb,_0xa321f8,_0x2d5873,_0x56128a,_0x155c09){var _0x4372b9,_0x43eee7,_0x2648c2;_0x56128a['host']=intUtil[_0xf957('0x80')](_0x56128a[_0xf957('0x7f')]);_0x56128a['serverUrl']=intUtil[_0xf957('0x80')](_0x56128a['serverUrl']);if(_0x155c09&&_0x155c09[_0xf957('0x92')]&&_0x155c09[_0xf957('0x92')]!==_0xf957('0x93')){logger[_0xf957('0x39')](_0xf957('0x94'),_0xf957('0x95'));_0x24cbe3[_0xf957('0x86')]=_0x56128a[_0xf957('0x81')]+'/api/voice/recordings/'+_0x24cbe3['uniqueid']+_0xf957('0x96')+md5(_0x24cbe3[_0xf957('0x85')]);}var _0x442bd9=_0x56128a[_0xf957('0x7f')]===_0xf957('0x87')?'eu':_0xf957('0x88');return getAccessToken(_0x56128a)[_0xf957('0x2c')](function(_0x49ff85){_0x2648c2=_0x49ff85;return getUser(_0x2648c2,_0x442bd9,_0x56128a,_0xa321f8[_0xf957('0x89')]);})[_0xf957('0x2c')](function(_0x5aa9e9){_0x4372b9=_0x5aa9e9;logger['info'](_0xf957('0x8a'),_0x4372b9['id']);return getEndUser(_0x2648c2,_0x442bd9,_0x56128a,_0x24cbe3['destcalleridname'],_0x24cbe3['destcalleridnum'],_0x4372b9,_0x31aabb);})[_0xf957('0x2c')](function(_0x5971ae){_0x43eee7=_0x5971ae;return getCall(_0x2648c2,_0x442bd9,_0x56128a,_0x4372b9,_0x43eee7,_0x31aabb,_0x24cbe3,_0xf957('0x97'));})['then'](function(_0x6c0c56){if(_0x6c0c56){logger[_0xf957('0x39')](_0xf957('0x8d'),_0x6c0c56['id']);logger['info']('[OUTBOUND]','Displaying\x20call\x20to\x20agent\x20in\x20a\x20new\x20tab...');emit(util['format'](_0xf957('0x8e'),_0xa321f8['name']),'trigger:browser:url',{'uri':'https://crm.'+_0x56128a[_0xf957('0x7f')]+_0xf957('0x91')+_0x6c0c56['id']});}})[_0xf957('0x2e')](function(_0x5b920f){logger[_0xf957('0x2f')](_0xf957('0x94'),JSON[_0xf957('0x42')](_0x5b920f));});};exports[_0xf957('0x98')]=function(_0x503eb6,_0x146931,_0x482f45,_0x381b02,_0xfde8bd,_0x266d5c){var _0x1052e3,_0x41b06d,_0xe99231;_0x266d5c[_0xf957('0x7f')]=intUtil[_0xf957('0x80')](_0x266d5c[_0xf957('0x7f')]);_0x266d5c[_0xf957('0x81')]=intUtil['stripTrailingSlash'](_0x266d5c[_0xf957('0x81')]);if(_0xfde8bd&&_0xfde8bd['monitor_format']){logger['info']('['+_0x146931['lastevent'][_0xf957('0x99')]()+']','Recording\x20is\x20enabled!');_0x146931[_0xf957('0x86')]=_0x266d5c['serverUrl']+'/api/voice/recordings/'+_0x146931[_0xf957('0x85')]+_0xf957('0x96')+md5(_0x146931['uniqueid']);}else{_0x146931[_0xf957('0x86')]='';}var _0x45100b=_0x266d5c['host']==='zoho.eu'?'eu':'com';return getAccessToken(_0x266d5c)[_0xf957('0x2c')](function(_0x41316d){_0xe99231=_0x41316d;return getUser(_0xe99231,_0x45100b,_0x266d5c);})[_0xf957('0x2c')](function(_0x4e093e){_0x1052e3=_0x4e093e;logger[_0xf957('0x39')](_0xf957('0x8a'),_0x1052e3['id']);return getEndUser(_0xe99231,_0x45100b,_0x266d5c,_0x146931[_0xf957('0x8b')],_0x146931[_0xf957('0x8c')],_0x1052e3,_0x482f45);})[_0xf957('0x2c')](function(_0x33aa44){_0x41b06d=_0x33aa44;return getCall(_0xe99231,_0x45100b,_0x266d5c,_0x1052e3,_0x41b06d,_0x482f45,_0x146931,_0xf957('0x79'));})[_0xf957('0x2c')](function(_0x4e1fac){if(_0x4e1fac){logger['info'](_0xf957('0x8d'),_0x4e1fac['id']);}})[_0xf957('0x2e')](function(_0x13021f){logger[_0xf957('0x2f')]('['+_0x146931['lastevent'][_0xf957('0x99')]()+']',JSON[_0xf957('0x42')](_0x13021f));});}; \ No newline at end of file +var _0x93e6=['moduleCreate','role','first_name','last_name','SUCCESS','log','CREATE\x20ERROR','uri','/crm/v2/Contacts/search?criteria=((Phone:equals:','Contacts','/crm/v2/Leads/search?criteria=((Phone:equals:','contact','https://www.zohoapis.','nothing','Leads','Creating\x20new\x20call...','Owner','Subject','getString','Subjects','Description','Who_Id','Full_Name','First_Name','Last_Name','$se_module','talktime','Call_Duration','utc','mm:ss','answertime','endtime','YYYY-MM-DDTHH:mm:ss','diff','starttime','lastevent','Call_Result','Called','complete','connect','Answered','rejected','Rejected','abandoned','Abandoned','timeout','Call_Start_Time','outbound','agentcalledAt','Call_Type','Inbound','merge','Fields','code','Call\x20created!','details','err','queue','host','serverUrl','stripTrailingSlash','monitor_format','[QUEUE]','Recording\x20is\x20enabled!','recordingURL','/api/voice/recordings/','uniqueid','/downloads?type=uniqueid&token=','zoho.eu','com','The\x20User\x20ID\x20is:','calleridname','calleridnum','Displaying\x20call\x20to\x20agent\x20in\x20a\x20new\x20tab...','user:%s','https://crm.','/crm/EntityInfo.do?module=Calls&id=','recordingFormat','[OUTBOUND]','destcalleridname','destcalleridnum','Outbound','The\x20Call\x20ID\x20is:','trigger:browser:url','unmanaged','toUpperCase','request-promise','util','./util','moment','ioredis','bluebird','../../../../config/environment','zoho','redis','localhost','socket.io-emitter','emit','[HTTP]','stringify','length','forEach','includes','string','picklist','type','idField','toString','variableName','customVariable','Variable','name','toLowerCase','indexOf','split','isNil','access_token','expires_in','zone','https://accounts.zoho.com.au','https://accounts.zoho.com.cn','POST','/oauth/v2/token','clientId','clientSecret','then','seconds','catch','error','Failing\x20creating\x20the\x20access_token','stack','info','GET','format','ActiveUsers','Zoho-oauthtoken\x20','users','isArrayLikeObject','email','Agent\x20found!','Using\x20the\x20admin\x20account!','findIndex','profile','Administrator','user','The\x20failing\x20result\x20is','Unable\x20to\x20retrieve\x20zoho\x20account\x20users:\x20','data','enduserType','/crm/v2/','startCase'];(function(_0x2706da,_0x3856f5){var _0x3ba87e=function(_0x479a79){while(--_0x479a79){_0x2706da['push'](_0x2706da['shift']());}};_0x3ba87e(++_0x3856f5);}(_0x93e6,0x184));var _0x693e=function(_0x3d248e,_0x497324){_0x3d248e=_0x3d248e-0x0;var _0x553b8e=_0x93e6[_0x3d248e];return _0x553b8e;};'use strict';var _=require('lodash');var rp=require(_0x693e('0x0'));var md5=require('md5');var util=require(_0x693e('0x1'));var intUtil=require(_0x693e('0x2'));var moment=require(_0x693e('0x3'));var Redis=require(_0x693e('0x4'));var BPromise=require(_0x693e('0x5'));var config=require(_0x693e('0x6'));var logger=require('../../../../config/logger')(_0x693e('0x7'));config['redis']=_['defaults'](config[_0x693e('0x8')],{'host':_0x693e('0x9'),'port':0x18eb});var io=require(_0x693e('0xa'))(new Redis(config[_0x693e('0x8')]));function emit(_0x78e99a,_0x417057,_0x1df2c2){io['to'](_0x78e99a)[_0x693e('0xb')](_0x417057,_0x1df2c2);}function request(_0x5b4cc9){logger['debug'](_0x693e('0xc'),JSON[_0x693e('0xd')](_0x5b4cc9));return rp(_0x5b4cc9);}function getCustomFields(_0x2c5df9,_0x110d07){var _0x4fcd25={};if(_0x2c5df9[_0x693e('0xe')]>0x0){_[_0x693e('0xf')](_0x2c5df9,function(_0x17aaf7){if(_[_0x693e('0x10')]([_0x693e('0x11'),_0x693e('0x12')],_0x17aaf7[_0x693e('0x13')])&&_0x17aaf7[_0x693e('0x14')]){_0x4fcd25[_0x17aaf7['idField']]=_0x17aaf7['content'][_0x693e('0x15')]();}else if(_0x17aaf7[_0x693e('0x13')]==='variable'&&_0x17aaf7[_0x693e('0x16')]&&_0x17aaf7['idField']&&_0x110d07[_0x17aaf7[_0x693e('0x16')]]){_0x4fcd25[_0x17aaf7['idField']]=_0x110d07[_0x17aaf7[_0x693e('0x16')]][_0x693e('0x15')]();}else if(_0x17aaf7[_0x693e('0x13')]===_0x693e('0x17')&&_0x17aaf7[_0x693e('0x18')]&&_0x17aaf7[_0x693e('0x18')][_0x693e('0x19')]&&_0x17aaf7[_0x693e('0x14')]&&_0x110d07[_0x17aaf7[_0x693e('0x18')][_0x693e('0x19')][_0x693e('0x1a')]()]){_0x4fcd25[_0x17aaf7['idField']]=_0x110d07[_0x17aaf7['Variable'][_0x693e('0x19')]['toLowerCase']()][_0x693e('0x15')]();}});}return _0x4fcd25;}function getName(_0x37ab1a){if(_0x37ab1a[_0x693e('0x1b')]('\x20')>0x0){var _0x578397=_0x37ab1a[_0x693e('0x1c')](/ (.+)/);if(_0x578397[0x1]){return _0x578397;}}return[_0x37ab1a,_0x37ab1a];}var accountsTokens={};function getAccessToken(_0x1ff7c4){return new Promise(function(_0x15c9fd,_0x422d84){if(!_[_0x693e('0x1d')](accountsTokens[_0x1ff7c4['id']])&&!_[_0x693e('0x1d')](accountsTokens[_0x1ff7c4['id']][_0x693e('0x1e')])){if(moment()['isBefore'](accountsTokens[_0x1ff7c4['id']][_0x693e('0x1f')])){_0x15c9fd(accountsTokens[_0x1ff7c4['id']][_0x693e('0x1e')]);}}var _0x79b503;switch(_0x1ff7c4[_0x693e('0x20')]){case'US':_0x79b503='https://accounts.zoho.com';break;case'AU':_0x79b503=_0x693e('0x21');break;case'EU':_0x79b503='https://accounts.zoho.eu';break;case'IN':_0x79b503='https://accounts.zoho.in';break;case'CN':_0x79b503=_0x693e('0x22');break;default:_0x79b503='https://accounts.zoho.eu';break;}var _0x4ffddc={'method':_0x693e('0x23'),'uri':_0x79b503+_0x693e('0x24'),'qs':{'refresh_token':_0x1ff7c4['refreshToken'],'client_id':_0x1ff7c4[_0x693e('0x25')],'client_secret':_0x1ff7c4[_0x693e('0x26')],'grant_type':'refresh_token'},'json':!![]};return rp(_0x4ffddc)[_0x693e('0x27')](function(_0x125d8c){accountsTokens[_0x1ff7c4['id']]={'access_token':_0x125d8c[_0x693e('0x1e')],'expires_in':moment()['add'](_0x125d8c[_0x693e('0x1f')],_0x693e('0x28'))};_0x15c9fd(_0x125d8c[_0x693e('0x1e')]);})[_0x693e('0x29')](function(_0x4c3c17){logger[_0x693e('0x2a')](_0x693e('0x2b'),_0x4c3c17[_0x693e('0x2c')]);_0x422d84(_0x4c3c17);});});}function getUser(_0x4a7472,_0x4ec59b,_0x2523b9,_0x3a3c83){logger[_0x693e('0x2d')]('Search\x20user');return request({'method':_0x693e('0x2e'),'uri':util[_0x693e('0x2f')]('https://www.zohoapis.%s/crm/v2/users',_0x4ec59b),'qs':{'type':_0x693e('0x30')},'headers':{'Authorization':_0x693e('0x31')+_0x4a7472},'json':!![]})['then'](function(_0x2ba145){if(_0x2ba145[_0x693e('0x32')]){var _0x67ec51=-0x1;if(_[_0x693e('0x33')](_0x2ba145[_0x693e('0x32')])){if(!_['isNil'](_0x3a3c83)){_0x67ec51=_['findIndex'](_0x2ba145[_0x693e('0x32')],function(_0x6dc6e8){return _0x6dc6e8[_0x693e('0x34')]===_0x3a3c83;});}if(_0x67ec51>=0x0){logger[_0x693e('0x2d')](_0x693e('0x35'));}else{logger['info'](_0x693e('0x36'));_0x67ec51=_[_0x693e('0x37')](_0x2ba145['users'],function(_0x148da4){return _0x148da4[_0x693e('0x38')][_0x693e('0x19')]===_0x693e('0x39');});}return _0x2ba145['users'][_0x67ec51];}else{if(_0x2ba145[_0x693e('0x3a')]['profile'][_0x693e('0x19')]===_0x693e('0x39')){logger['info'](_0x693e('0x36'));user=_0x2ba145[_0x693e('0x3a')];return user;}else{logger['error'](_0x693e('0x3b'),JSON[_0x693e('0xd')](_0x2ba145));throw new Error(_0x693e('0x3c')+JSON['stringify'](_0x2ba145));}}}else{logger[_0x693e('0x2a')](_0x693e('0x3b'),JSON[_0x693e('0xd')](_0x2ba145));throw new Error(_0x693e('0x3c')+JSON[_0x693e('0xd')](_0x2ba145));}})['catch'](function(_0x48be3f){console[_0x693e('0x2a')](_0x48be3f);});}function getZohoUser(_0x12ef30,_0x2e6039){return new BPromise(function(_0x5b694c,_0x462e73){request(_0x12ef30)[_0x693e('0x27')](function(_0x10c7ea){var _0x462a78=null;if(_0x10c7ea){_0x462a78=_0x10c7ea[_0x693e('0x3d')][0x0];_0x462a78[_0x693e('0x3e')]=_0x2e6039;}_0x5b694c(_0x462a78);})[_0x693e('0x29')](function(_0x1faf7b){_0x462e73(_0x1faf7b);});});}function createEndUser(_0x2b82eb,_0x134e5f,_0x3125b2,_0x103e50,_0x2a6f37,_0x916e9){var _0x3125b2=getName(_0x3125b2);return request({'method':'POST','uri':'https://www.zohoapis.'+_0x134e5f+_0x693e('0x3f')+_[_0x693e('0x40')](_0x916e9[_0x693e('0x41')])+'s','body':{'data':[{'Last_Name':_0x3125b2[0x1],'First_Name':_0x3125b2[0x0],'Phone':_0x103e50,'Owner':{'name':!_[_0x693e('0x1d')](_0x2a6f37[_0x693e('0x42')][_0x693e('0x19')])?_0x2a6f37[_0x693e('0x42')][_0x693e('0x19')]:!_[_0x693e('0x1d')](_0x2a6f37[_0x693e('0x43')])?_0x2a6f37['first_name']+'\x20'+_0x2a6f37[_0x693e('0x44')]:_0x2a6f37[_0x693e('0x44')],'id':_0x2a6f37['id']}}]},'headers':{'Authorization':_0x693e('0x31')+_0x2b82eb},'json':!![]})['then'](function(_0xde8c01){if(_0xde8c01&&_0xde8c01[_0x693e('0x3d')][0x0]['code']===_0x693e('0x45')){var _0x28e83f=_0xde8c01[_0x693e('0x3d')][0x0]['details'];_0x28e83f['enduserType']=_[_0x693e('0x40')](_0x916e9[_0x693e('0x41')])+'s';return _0x28e83f;}logger[_0x693e('0x2a')](_0x693e('0x3b'),JSON[_0x693e('0xd')](data));throw new Error('Error:\x20'+JSON[_0x693e('0xd')](data));})[_0x693e('0x29')](function(_0x4f32a6){console[_0x693e('0x46')](_0x693e('0x47'),_0x4f32a6);});}function getEndUser(_0x5f01d6,_0x117167,_0x5a7ac2,_0x1c2387,_0x9a68e3,_0x49022b,_0x34576f){var _0x5ede43={'method':_0x693e('0x2e'),'uri':'','headers':{'Authorization':_0x693e('0x31')+_0x5f01d6},'json':!![]};switch(_0x34576f['moduleSearch']){case'contact_lead':_0x5ede43[_0x693e('0x48')]='https://www.zohoapis.'+_0x117167+_0x693e('0x49')+_0x9a68e3+'))';return getZohoUser(_0x5ede43,_0x693e('0x4a'))['then'](function(_0x49abf1){if(_0x49abf1)return _0x49abf1;_0x5ede43[_0x693e('0x48')]='https://www.zohoapis.'+_0x117167+_0x693e('0x4b')+_0x9a68e3+'))';return getZohoUser(_0x5ede43,'Leads')['then'](function(_0x348c0a){if(_0x348c0a)return _0x348c0a;if(_0x34576f[_0x693e('0x41')]!='nothing'){return createEndUser(_0x5f01d6,_0x117167,_0x1c2387,_0x9a68e3,_0x49022b,_0x34576f);}else{return{};}});});break;case _0x693e('0x4c'):_0x5ede43[_0x693e('0x48')]=_0x693e('0x4d')+_0x117167+_0x693e('0x49')+_0x9a68e3+'))';return getZohoUser(_0x5ede43,_0x693e('0x4a'))[_0x693e('0x27')](function(_0x16881c){if(_0x16881c)return _0x16881c;if(_0x34576f[_0x693e('0x41')]!=_0x693e('0x4e')){return createEndUser(_0x5f01d6,_0x117167,_0x1c2387,_0x9a68e3,_0x49022b,_0x34576f);}else{return{};}});break;case'lead':_0x5ede43[_0x693e('0x48')]='https://www.zohoapis.'+_0x117167+_0x693e('0x4b')+_0x9a68e3+'))';return getZohoUser(_0x5ede43,_0x693e('0x4f'))[_0x693e('0x27')](function(_0x4081fd){if(_0x4081fd)return _0x4081fd;if(_0x34576f[_0x693e('0x41')]!='nothing'){return createEndUser(_0x5f01d6,_0x117167,_0x1c2387,_0x9a68e3,_0x49022b,_0x34576f);}else{return{};}});break;}}function getCall(_0x1b7c95,_0x320947,_0x954fd,_0x1a3fdb,_0x5e9102,_0x33cee5,_0x35cee9,_0x1fe031){logger['info'](_0x693e('0x50'));var _0x5418ba={};_0x5418ba[_0x693e('0x51')]={'name':!_[_0x693e('0x1d')](_0x1a3fdb[_0x693e('0x42')][_0x693e('0x19')])&&!_[_0x693e('0x1d')](_0x1a3fdb[_0x693e('0x38')][_0x693e('0x19')])&&_0x1a3fdb[_0x693e('0x38')]['name']==='administrator'?_0x1a3fdb[_0x693e('0x42')][_0x693e('0x19')]:!_[_0x693e('0x1d')](_0x1a3fdb[_0x693e('0x43')])?_0x1a3fdb[_0x693e('0x43')]+'\x20'+_0x1a3fdb[_0x693e('0x44')]:_0x1a3fdb[_0x693e('0x44')],'id':_0x1a3fdb['id']};_0x5418ba[_0x693e('0x52')]=intUtil[_0x693e('0x53')](_0x33cee5[_0x693e('0x54')],_0x35cee9,'\x20');_0x5418ba[_0x693e('0x55')]=intUtil['getString'](_0x33cee5['Descriptions'],_0x35cee9,'\x0a');if(_0x5e9102['enduserType']===_0x693e('0x4a')){_0x5418ba[_0x693e('0x56')]={'name':!_[_0x693e('0x1d')](_0x5e9102['Full_Name'])?_0x5e9102[_0x693e('0x57')]:!_[_0x693e('0x1d')](_0x5e9102[_0x693e('0x58')])?_0x5e9102[_0x693e('0x58')]+'\x20'+_0x5e9102[_0x693e('0x59')]:_0x5e9102['Last_Name'],'id':_0x5e9102['id']};}if(_0x5e9102[_0x693e('0x3e')]==='Leads'){_0x5418ba['What_Id']={'name':!_[_0x693e('0x1d')](_0x5e9102[_0x693e('0x57')])?_0x5e9102['Full_Name']:!_[_0x693e('0x1d')](_0x5e9102[_0x693e('0x58')])?_0x5e9102['First_Name']+'\x20'+_0x5e9102[_0x693e('0x59')]:_0x5e9102[_0x693e('0x59')],'id':_0x5e9102['id']};_0x5418ba[_0x693e('0x5a')]=_[_0x693e('0x40')](_0x5e9102[_0x693e('0x3e')]);}if(_0x35cee9[_0x693e('0x5b')]){_0x5418ba[_0x693e('0x5c')]=moment[_0x693e('0x5d')](parseInt(_0x35cee9[_0x693e('0x5b')])*0x3e8)[_0x693e('0x2f')](_0x693e('0x5e'));}else if(_0x35cee9[_0x693e('0x5f')]&&_0x35cee9[_0x693e('0x60')]){_0x5418ba[_0x693e('0x5c')]=moment[_0x693e('0x5d')](moment(_0x35cee9[_0x693e('0x60')],_0x693e('0x61'))[_0x693e('0x62')](moment(_0x35cee9[_0x693e('0x63')],_0x693e('0x61'))))[_0x693e('0x2f')](_0x693e('0x5e'));}switch(_0x35cee9[_0x693e('0x64')]){case'called':_0x5418ba[_0x693e('0x65')]=_0x693e('0x66');break;case _0x693e('0x67'):case _0x693e('0x68'):_0x5418ba[_0x693e('0x65')]=_0x693e('0x69');break;case _0x693e('0x6a'):_0x5418ba[_0x693e('0x65')]=_0x693e('0x6b');break;case _0x693e('0x6c'):_0x5418ba[_0x693e('0x65')]=_0x693e('0x6d');break;case _0x693e('0x6e'):_0x5418ba['Call_Result']='Timeout';default:}_0x5418ba[_0x693e('0x6f')]=(_0x1fe031===_0x693e('0x70')?moment(_0x35cee9['starttime'])[_0x693e('0x2f')](_0x693e('0x61')):moment(_0x35cee9[_0x693e('0x71')])[_0x693e('0x2f')](_0x693e('0x61')))||moment()['format']('YYYY-MM-DDTHH:mm:ss');_0x5418ba[_0x693e('0x72')]=_0x1fe031||_0x693e('0x73');_0x5418ba=_[_0x693e('0x74')](_0x5418ba,getCustomFields(_0x33cee5[_0x693e('0x75')],_0x35cee9));return request({'method':_0x693e('0x23'),'uri':_0x693e('0x4d')+_0x320947+'/crm/v2/Calls','headers':{'Authorization':_0x693e('0x31')+_0x1b7c95},'body':{'data':[_0x5418ba]},'json':!![]})[_0x693e('0x27')](function(_0x2ddc48){if(_0x2ddc48&&_0x2ddc48[_0x693e('0x3d')][0x0][_0x693e('0x76')]===_0x693e('0x45')){logger[_0x693e('0x2d')](_0x693e('0x77'));return{'id':_0x2ddc48[_0x693e('0x3d')][0x0][_0x693e('0x78')]['id']};}})['catch'](function(_0x1eff16){logger['info'](_0x693e('0x79'),_0x1eff16[_0x693e('0x2c')]);console[_0x693e('0x46')](_0x693e('0x79'),_0x1eff16);});}exports[_0x693e('0x7a')]=function(_0x502852,_0x3d974d,_0x4c6dbb,_0x42ee6a,_0x423c58,_0xdfc8e7){var _0x574d48,_0x39dff4,_0x8600d6;_0xdfc8e7[_0x693e('0x7b')]=intUtil['stripTrailingSlash'](_0xdfc8e7[_0x693e('0x7b')]);_0xdfc8e7[_0x693e('0x7c')]=intUtil[_0x693e('0x7d')](_0xdfc8e7[_0x693e('0x7c')]);if(_0x423c58&&_0x423c58[_0x693e('0x7e')]){logger[_0x693e('0x2d')](_0x693e('0x7f'),_0x693e('0x80'));_0x3d974d[_0x693e('0x81')]=_0xdfc8e7['serverUrl']+_0x693e('0x82')+_0x3d974d[_0x693e('0x83')]+_0x693e('0x84')+md5(_0x3d974d[_0x693e('0x83')]);}else{_0x3d974d[_0x693e('0x81')]='';}var _0x4403f7=_0xdfc8e7['host']===_0x693e('0x85')?'eu':_0x693e('0x86');return getAccessToken(_0xdfc8e7)[_0x693e('0x27')](function(_0x1e3126){_0x8600d6=_0x1e3126;return getUser(_0x8600d6,_0x4403f7,_0xdfc8e7,_0x42ee6a[_0x693e('0x34')]);})[_0x693e('0x27')](function(_0x5aef02){_0x574d48=_0x5aef02;logger[_0x693e('0x2d')](_0x693e('0x87'),_0x574d48['id']);return getEndUser(_0x8600d6,_0x4403f7,_0xdfc8e7,_0x3d974d[_0x693e('0x88')],_0x3d974d[_0x693e('0x89')],_0x574d48,_0x4c6dbb);})[_0x693e('0x27')](function(_0x3408f7){_0x39dff4=_0x3408f7;return getCall(_0x8600d6,_0x4403f7,_0xdfc8e7,_0x574d48,_0x39dff4,_0x4c6dbb,_0x3d974d,_0x693e('0x73'));})[_0x693e('0x27')](function(_0x1d6983){if(_0x1d6983){logger[_0x693e('0x2d')]('The\x20Call\x20ID\x20is:',_0x1d6983['id']);logger[_0x693e('0x2d')]('[QUEUE]',_0x693e('0x8a'));emit(util['format'](_0x693e('0x8b'),_0x42ee6a[_0x693e('0x19')]),'trigger:browser:url',{'uri':_0x693e('0x8c')+_0xdfc8e7[_0x693e('0x7b')]+_0x693e('0x8d')+_0x1d6983['id']});}})['catch'](function(_0x4c4fa7){logger['error']('[QUEUE]',JSON['stringify'](_0x4c4fa7));});};exports['outbound']=function(_0x3a02ea,_0x4f213e,_0x11d9b0,_0x1287b6,_0x1a63f6,_0x2c970b,_0x385177){var _0x4da3da,_0x24766d,_0x538f38;_0x2c970b[_0x693e('0x7b')]=intUtil[_0x693e('0x7d')](_0x2c970b[_0x693e('0x7b')]);_0x2c970b[_0x693e('0x7c')]=intUtil['stripTrailingSlash'](_0x2c970b[_0x693e('0x7c')]);if(_0x385177&&_0x385177[_0x693e('0x8e')]&&_0x385177[_0x693e('0x8e')]!=='none'){logger[_0x693e('0x2d')](_0x693e('0x8f'),_0x693e('0x80'));_0x4f213e[_0x693e('0x81')]=_0x2c970b['serverUrl']+_0x693e('0x82')+_0x4f213e[_0x693e('0x83')]+_0x693e('0x84')+md5(_0x4f213e[_0x693e('0x83')]);}var _0x3c4590=_0x2c970b[_0x693e('0x7b')]==='zoho.eu'?'eu':_0x693e('0x86');return getAccessToken(_0x2c970b)['then'](function(_0x11306c){_0x538f38=_0x11306c;return getUser(_0x538f38,_0x3c4590,_0x2c970b,_0x1287b6[_0x693e('0x34')]);})['then'](function(_0x31d4ba){_0x4da3da=_0x31d4ba;logger['info'](_0x693e('0x87'),_0x4da3da['id']);return getEndUser(_0x538f38,_0x3c4590,_0x2c970b,_0x4f213e[_0x693e('0x90')],_0x4f213e[_0x693e('0x91')],_0x4da3da,_0x11d9b0);})[_0x693e('0x27')](function(_0x7593d8){_0x24766d=_0x7593d8;return getCall(_0x538f38,_0x3c4590,_0x2c970b,_0x4da3da,_0x24766d,_0x11d9b0,_0x4f213e,_0x693e('0x92'));})['then'](function(_0x57b6e0){if(_0x57b6e0){logger[_0x693e('0x2d')](_0x693e('0x93'),_0x57b6e0['id']);logger[_0x693e('0x2d')](_0x693e('0x8f'),_0x693e('0x8a'));emit(util['format'](_0x693e('0x8b'),_0x1287b6[_0x693e('0x19')]),_0x693e('0x94'),{'uri':_0x693e('0x8c')+_0x2c970b[_0x693e('0x7b')]+_0x693e('0x8d')+_0x57b6e0['id']});}})[_0x693e('0x29')](function(_0xcc07a3){logger[_0x693e('0x2a')]('[OUTBOUND]',JSON[_0x693e('0xd')](_0xcc07a3));});};exports[_0x693e('0x95')]=function(_0x5c33de,_0x52775e,_0x5b1b4d,_0x420183,_0x1aef40,_0x18c8b3){var _0x5b3886,_0x486f14,_0x48d180;_0x18c8b3[_0x693e('0x7b')]=intUtil[_0x693e('0x7d')](_0x18c8b3['host']);_0x18c8b3[_0x693e('0x7c')]=intUtil[_0x693e('0x7d')](_0x18c8b3[_0x693e('0x7c')]);if(_0x1aef40&&_0x1aef40['monitor_format']){logger['info']('['+_0x52775e[_0x693e('0x64')]['toUpperCase']()+']',_0x693e('0x80'));_0x52775e[_0x693e('0x81')]=_0x18c8b3[_0x693e('0x7c')]+'/api/voice/recordings/'+_0x52775e[_0x693e('0x83')]+'/downloads?type=uniqueid&token='+md5(_0x52775e[_0x693e('0x83')]);}else{_0x52775e[_0x693e('0x81')]='';}var _0x5d425e=_0x18c8b3[_0x693e('0x7b')]===_0x693e('0x85')?'eu':'com';return getAccessToken(_0x18c8b3)[_0x693e('0x27')](function(_0x436aae){_0x48d180=_0x436aae;return getUser(_0x48d180,_0x5d425e,_0x18c8b3);})[_0x693e('0x27')](function(_0xfd75aa){_0x5b3886=_0xfd75aa;logger['info'](_0x693e('0x87'),_0x5b3886['id']);return getEndUser(_0x48d180,_0x5d425e,_0x18c8b3,_0x52775e['calleridname'],_0x52775e[_0x693e('0x89')],_0x5b3886,_0x5b1b4d);})[_0x693e('0x27')](function(_0x436ff5){_0x486f14=_0x436ff5;return getCall(_0x48d180,_0x5d425e,_0x18c8b3,_0x5b3886,_0x486f14,_0x5b1b4d,_0x52775e,_0x693e('0x73'));})[_0x693e('0x27')](function(_0x100f2c){if(_0x100f2c){logger[_0x693e('0x2d')](_0x693e('0x93'),_0x100f2c['id']);}})['catch'](function(_0x17e957){logger[_0x693e('0x2a')]('['+_0x52775e[_0x693e('0x64')][_0x693e('0x96')]()+']',JSON['stringify'](_0x17e957));});}; \ No newline at end of file diff --git a/server/services/ami/trigger/script/index.js b/server/services/ami/trigger/script/index.js index 6f3a720..c135ac2 100644 --- a/server/services/ami/trigger/script/index.js +++ b/server/services/ami/trigger/script/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xa46c=['data2','Script','%s\x20\x27%s\x27\x20failed\x20with\x20code\x20%d\x20and\x20error:\x20%s','info','format','%s\x20\x27%s\x27\x20succeeded\x20with\x20output:\x20%s','util','shelljs','mustache','trigger','exec'];(function(_0x5627e1,_0x1b2dbf){var _0x2f013f=function(_0x142015){while(--_0x142015){_0x5627e1['push'](_0x5627e1['shift']());}};_0x2f013f(++_0x1b2dbf);}(_0xa46c,0x1be));var _0xca46=function(_0xc8de4d,_0x12145a){_0xc8de4d=_0xc8de4d-0x0;var _0x47998a=_0xa46c[_0xc8de4d];return _0x47998a;};'use strict';var util=require(_0xca46('0x0'));var sh=require(_0xca46('0x1'));var Mustache=require(_0xca46('0x2'));var logger=require('../../../../config/logger')(_0xca46('0x3'));exports[_0xca46('0x4')]=function(_0x5d7a43,_0x18243b){var _0x5d4e79=_0x5d7a43[_0xca46('0x5')]?_0x5d7a43[_0xca46('0x5')]:_0xca46('0x6');var _0x34978a=_0x5d7a43['data3']?Mustache['render'](_0x5d7a43['data3'],_0x18243b):_0x18243b;sh[_0xca46('0x4')](_0x34978a,function(_0x1affb2,_0x248bac,_0x3a5a88){if(_0x1affb2!==0x0){logger['error'](util['format'](_0xca46('0x7'),_0x5d4e79,_0x34978a,_0x1affb2,_0x3a5a88));}else{logger[_0xca46('0x8')](util[_0xca46('0x9')](_0xca46('0xa'),_0x5d4e79,_0x34978a,_0x248bac));}});}; \ No newline at end of file +var _0xd7cd=['%s\x20\x27%s\x27\x20succeeded\x20with\x20output:\x20%s','util','shelljs','mustache','../../../../config/logger','trigger','exec','data2','Script','data3','render','error','%s\x20\x27%s\x27\x20failed\x20with\x20code\x20%d\x20and\x20error:\x20%s','info','format'];(function(_0x7a207c,_0x42451b){var _0x458cc1=function(_0x4ba71d){while(--_0x4ba71d){_0x7a207c['push'](_0x7a207c['shift']());}};_0x458cc1(++_0x42451b);}(_0xd7cd,0x6a));var _0xdd7c=function(_0x3f0ada,_0x5e7a64){_0x3f0ada=_0x3f0ada-0x0;var _0x39559f=_0xd7cd[_0x3f0ada];return _0x39559f;};'use strict';var util=require(_0xdd7c('0x0'));var sh=require(_0xdd7c('0x1'));var Mustache=require(_0xdd7c('0x2'));var logger=require(_0xdd7c('0x3'))(_0xdd7c('0x4'));exports[_0xdd7c('0x5')]=function(_0x5cadd4,_0x200cf8){var _0x28b932=_0x5cadd4[_0xdd7c('0x6')]?_0x5cadd4[_0xdd7c('0x6')]:_0xdd7c('0x7');var _0x38d991=_0x5cadd4[_0xdd7c('0x8')]?Mustache[_0xdd7c('0x9')](_0x5cadd4[_0xdd7c('0x8')],_0x200cf8):_0x200cf8;sh[_0xdd7c('0x5')](_0x38d991,function(_0x57a6a4,_0x269f6b,_0xc95b72){if(_0x57a6a4!==0x0){logger[_0xdd7c('0xa')](util['format'](_0xdd7c('0xb'),_0x28b932,_0x38d991,_0x57a6a4,_0xc95b72));}else{logger[_0xdd7c('0xc')](util[_0xdd7c('0xd')](_0xdd7c('0xe'),_0x28b932,_0x38d991,_0x269f6b));}});}; \ No newline at end of file diff --git a/server/services/ami/trigger/urlforward/index.js b/server/services/ami/trigger/urlforward/index.js index d0767aa..0a7dd08 100644 --- a/server/services/ami/trigger/urlforward/index.js +++ b/server/services/ami/trigger/urlforward/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x7394=['POST','PUT','data7','parse','body\x20has\x20been\x20passed\x20to\x20URLforward\x20in\x20a\x20wrong\x20format','body','format','%s\x20%s\x20sending\x20request\x20with\x20following\x20options:\x20%s','stringify',',\x20request\x20body:\x20','info','%s\x20%s\x20succeeded\x20with\x20status:\x20%d\x20and\x20response:\x20%s','statusCode','catch','%s\x20%s\x20failed\x20with\x20status:\x20%d\x20and\x20error:\x20%s\x20%s','name','util','lodash','mustache','../../../../config/logger','trigger','exec','data1','render','data2','data5','headers','data6','error','stack','toUpperCase','GET','DELETE'];(function(_0x27296f,_0x5f37d3){var _0x268095=function(_0x4dc2c6){while(--_0x4dc2c6){_0x27296f['push'](_0x27296f['shift']());}};_0x268095(++_0x5f37d3);}(_0x7394,0x118));var _0x4739=function(_0x347df5,_0x563914){_0x347df5=_0x347df5-0x0;var _0x5969fa=_0x7394[_0x347df5];return _0x5969fa;};'use strict';var rp=require('request-promise');var util=require(_0x4739('0x0'));var _=require(_0x4739('0x1'));var Mustache=require(_0x4739('0x2'));var logger=require(_0x4739('0x3'))(_0x4739('0x4'));exports[_0x4739('0x5')]=function(_0x34ff7,_0xd5a08a){var _0x1b0f8b,_0x150cff;var _0x369685={'method':_0x34ff7[_0x4739('0x6')]['toUpperCase'](),'uri':Mustache[_0x4739('0x7')](_0x34ff7[_0x4739('0x8')],_0xd5a08a),'json':!![],'resolveWithFullResponse':!![],'timeout':typeof parseInt(_0x34ff7[_0x4739('0x9')])==='number'&&parseInt(_0x34ff7[_0x4739('0x9')])>=0x1&&parseInt(_0x34ff7['data5'])<=0xa?parseInt(_0x34ff7['data5'])*0x3e8:0x5*0x3e8};try{_0x369685[_0x4739('0xa')]=_0x34ff7[_0x4739('0xb')]?JSON['parse'](Mustache[_0x4739('0x7')](_0x34ff7[_0x4739('0xb')],_0xd5a08a)):{};}catch(_0x3aaf92){logger[_0x4739('0xc')](_0x3aaf92[_0x4739('0xd')]);}switch(_0x34ff7[_0x4739('0x6')][_0x4739('0xe')]()){case _0x4739('0xf'):case _0x4739('0x10'):_0x1b0f8b=null;_0x369685['qs']=_0xd5a08a;break;case _0x4739('0x11'):case _0x4739('0x12'):if(_0x34ff7[_0x4739('0x13')]){try{_0x1b0f8b=JSON[_0x4739('0x14')](Mustache['render'](_0x34ff7[_0x4739('0x13')],_0xd5a08a));_0x369685['body']=_0x1b0f8b;}catch(_0x2bdc0d){logger[_0x4739('0xc')](_0x2bdc0d[_0x4739('0xd')]);logger['error'](_0x4739('0x15'));}}else{_0x1b0f8b=_0xd5a08a;_0x369685[_0x4739('0x16')]=_0x1b0f8b;}break;}logger['info'](util[_0x4739('0x17')](_0x4739('0x18'),_0x34ff7[_0x4739('0x6')],_0x34ff7[_0x4739('0x8')],JSON[_0x4739('0x19')](_0x369685)));rp(_0x369685)['then'](function(_0x114959){_0x1b0f8b=!_['isNil'](_0x1b0f8b)?_0x4739('0x1a')+_0x1b0f8b:'';_0x150cff=typeof _0x114959[_0x4739('0x16')]==='object'?JSON[_0x4739('0x19')](_0x114959[_0x4739('0x16')]):_0x114959[_0x4739('0x16')];logger[_0x4739('0x1b')](util[_0x4739('0x17')](_0x4739('0x1c'),_0x34ff7['data1'],_0x34ff7['data2'],_0x114959[_0x4739('0x1d')],_0x150cff));})[_0x4739('0x1e')](function(_0x1ce84e){logger[_0x4739('0xc')](util[_0x4739('0x17')](_0x4739('0x1f'),_0x34ff7[_0x4739('0x6')],_0x34ff7[_0x4739('0x8')],_0x1ce84e[_0x4739('0x1d')],_0x1ce84e[_0x4739('0x20')],_0x1ce84e['message']));});}; \ No newline at end of file +var _0x087f=['headers','data6','render','error','stack','GET','DELETE','POST','data7','parse','body\x20has\x20been\x20passed\x20to\x20URLforward\x20in\x20a\x20wrong\x20format','body','info','format','%s\x20%s\x20sending\x20request\x20with\x20following\x20options:\x20%s','data2','then','isNil','object','stringify','%s\x20%s\x20succeeded\x20with\x20status:\x20%d\x20and\x20response:\x20%s','statusCode','catch','name','message','request-promise','util','trigger','data1','toUpperCase','data5'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0x087f,0x1cb));var _0xf087=function(_0x375a11,_0x513341){_0x375a11=_0x375a11-0x0;var _0x35b766=_0x087f[_0x375a11];return _0x35b766;};'use strict';var rp=require(_0xf087('0x0'));var util=require(_0xf087('0x1'));var _=require('lodash');var Mustache=require('mustache');var logger=require('../../../../config/logger')(_0xf087('0x2'));exports['exec']=function(_0x412d7a,_0xc1e324){var _0x45cc72,_0x27d6ff;var _0x378e4d={'method':_0x412d7a[_0xf087('0x3')][_0xf087('0x4')](),'uri':Mustache['render'](_0x412d7a['data2'],_0xc1e324),'json':!![],'resolveWithFullResponse':!![],'timeout':typeof parseInt(_0x412d7a[_0xf087('0x5')])==='number'&&parseInt(_0x412d7a[_0xf087('0x5')])>=0x1&&parseInt(_0x412d7a[_0xf087('0x5')])<=0xa?parseInt(_0x412d7a[_0xf087('0x5')])*0x3e8:0x5*0x3e8};try{_0x378e4d[_0xf087('0x6')]=_0x412d7a[_0xf087('0x7')]?JSON['parse'](Mustache[_0xf087('0x8')](_0x412d7a[_0xf087('0x7')],_0xc1e324)):{};}catch(_0x3999f7){logger[_0xf087('0x9')](_0x3999f7[_0xf087('0xa')]);}switch(_0x412d7a[_0xf087('0x3')][_0xf087('0x4')]()){case _0xf087('0xb'):case _0xf087('0xc'):_0x45cc72=null;_0x378e4d['qs']=_0xc1e324;break;case _0xf087('0xd'):case'PUT':if(_0x412d7a[_0xf087('0xe')]){try{_0x45cc72=JSON[_0xf087('0xf')](Mustache[_0xf087('0x8')](_0x412d7a['data7'],_0xc1e324));_0x378e4d['body']=_0x45cc72;}catch(_0x3f0f35){logger[_0xf087('0x9')](_0x3f0f35[_0xf087('0xa')]);logger[_0xf087('0x9')](_0xf087('0x10'));}}else{_0x45cc72=_0xc1e324;_0x378e4d[_0xf087('0x11')]=_0x45cc72;}break;}logger[_0xf087('0x12')](util[_0xf087('0x13')](_0xf087('0x14'),_0x412d7a[_0xf087('0x3')],_0x412d7a[_0xf087('0x15')],JSON['stringify'](_0x378e4d)));rp(_0x378e4d)[_0xf087('0x16')](function(_0x192da4){_0x45cc72=!_[_0xf087('0x17')](_0x45cc72)?',\x20request\x20body:\x20'+_0x45cc72:'';_0x27d6ff=typeof _0x192da4[_0xf087('0x11')]===_0xf087('0x18')?JSON[_0xf087('0x19')](_0x192da4[_0xf087('0x11')]):_0x192da4['body'];logger['info'](util[_0xf087('0x13')](_0xf087('0x1a'),_0x412d7a[_0xf087('0x3')],_0x412d7a[_0xf087('0x15')],_0x192da4[_0xf087('0x1b')],_0x27d6ff));})[_0xf087('0x1c')](function(_0x2da072){logger['error'](util[_0xf087('0x13')]('%s\x20%s\x20failed\x20with\x20status:\x20%d\x20and\x20error:\x20%s\x20%s',_0x412d7a['data1'],_0x412d7a[_0xf087('0x15')],_0x2da072[_0xf087('0x1b')],_0x2da072[_0xf087('0x1d')],_0x2da072[_0xf087('0x1e')]));});}; \ No newline at end of file diff --git a/server/services/email/client.js b/server/services/email/client.js index 9e13f3a..5e39c7c 100644 --- a/server/services/email/client.js +++ b/server/services/email/client.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x9317=['../../config/logger','routing','client','Request','request','then','rpc','error','message','result','catch','exports','bluebird'];(function(_0x1c225c,_0x1540c3){var _0x1236a5=function(_0x677fe6){while(--_0x677fe6){_0x1c225c['push'](_0x1c225c['shift']());}};_0x1236a5(++_0x1540c3);}(_0x9317,0x178));var _0x7931=function(_0x2650e9,_0xb91cc){_0x2650e9=_0x2650e9-0x0;var _0x3511c8=_0x9317[_0x2650e9];return _0x3511c8;};'use strict';var jayson=require('jayson/promise');var BPromise=require(_0x7931('0x0'));var logger=require(_0x7931('0x1'))(_0x7931('0x2'));var client=jayson[_0x7931('0x3')]['http']({'port':0x2329});client[_0x7931('0x4')]=function(_0x36f4c0,_0x5f24c0){return new BPromise(function(_0x4a07c,_0x2e1636){return client[_0x7931('0x5')](_0x36f4c0,_0x5f24c0)[_0x7931('0x6')](function(_0x4f957c){logger['debug'](_0x7931('0x7'),'routing',_0x36f4c0,_0x5f24c0,_0x4f957c);if(_0x4f957c[_0x7931('0x8')]){logger[_0x7931('0x8')]('rpc','routing',_0x36f4c0,_0x4f957c[_0x7931('0x8')][_0x7931('0x9')],_0x5f24c0);return _0x2e1636(_0x4f957c[_0x7931('0x8')][_0x7931('0x9')]);}else{return _0x4a07c(_0x4f957c[_0x7931('0xa')]);}})[_0x7931('0xb')](function(_0x780dfe){logger['error'](_0x7931('0x7'),_0x7931('0x2'),_0x36f4c0,_0x780dfe,_0x5f24c0);return _0x2e1636(_0x780dfe);});});};module[_0x7931('0xc')]=client; \ No newline at end of file +var _0xe19c=['rpc','error','message','result','catch','exports','jayson/promise','bluebird','../../config/logger','client','request','then','debug'];(function(_0x392de5,_0x3c3510){var _0x354e3d=function(_0x1eb3c8){while(--_0x1eb3c8){_0x392de5['push'](_0x392de5['shift']());}};_0x354e3d(++_0x3c3510);}(_0xe19c,0x10a));var _0xce19=function(_0x1c7e86,_0x24906b){_0x1c7e86=_0x1c7e86-0x0;var _0x238734=_0xe19c[_0x1c7e86];return _0x238734;};'use strict';var jayson=require(_0xce19('0x0'));var BPromise=require(_0xce19('0x1'));var logger=require(_0xce19('0x2'))('routing');var client=jayson[_0xce19('0x3')]['http']({'port':0x2329});client['Request']=function(_0x473aa1,_0x3e3662){return new BPromise(function(_0x21cd4c,_0x5ce1c2){return client[_0xce19('0x4')](_0x473aa1,_0x3e3662)[_0xce19('0x5')](function(_0x1adb19){logger[_0xce19('0x6')](_0xce19('0x7'),'routing',_0x473aa1,_0x3e3662,_0x1adb19);if(_0x1adb19[_0xce19('0x8')]){logger[_0xce19('0x8')](_0xce19('0x7'),'routing',_0x473aa1,_0x1adb19[_0xce19('0x8')][_0xce19('0x9')],_0x3e3662);return _0x5ce1c2(_0x1adb19[_0xce19('0x8')][_0xce19('0x9')]);}else{return _0x21cd4c(_0x1adb19[_0xce19('0xa')]);}})[_0xce19('0xb')](function(_0x4b5b16){logger[_0xce19('0x8')](_0xce19('0x7'),'routing',_0x473aa1,_0x4b5b16,_0x3e3662);return _0x5ce1c2(_0x4b5b16);});});};module[_0xce19('0xc')]=client; \ No newline at end of file diff --git a/server/services/email/index.js b/server/services/email/index.js index 0ef6709..7c1f012 100644 --- a/server/services/email/index.js +++ b/server/services/email/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x85d2=['then','getMailAccounts','initMailAccounts','refresh','mailAccounts','listen','getSettings','loginMailFrequency','error','Email\x20service\x20initialization','./realtime','./lib/email','./rpc/mailAccount','./rpc/setting','../../config/logger','email','resolve'];(function(_0x31743e,_0x4ce4c7){var _0x38f126=function(_0x4876c4){while(--_0x4876c4){_0x31743e['push'](_0x31743e['shift']());}};_0x38f126(++_0x4ce4c7);}(_0x85d2,0x11a));var _0x285d=function(_0x480879,_0x191a47){_0x480879=_0x480879-0x0;var _0x215d7e=_0x85d2[_0x480879];return _0x215d7e;};'use strict';var server=require('./server');var Realtime=require(_0x285d('0x0'));var EmailChannel=require(_0x285d('0x1'));var mailAccount=require(_0x285d('0x2'));var setting=require(_0x285d('0x3'));var logger=require(_0x285d('0x4'))(_0x285d('0x5'));var realtime=new Realtime();var email=new EmailChannel(realtime);function initRealtime(){return Promise[_0x285d('0x6')]()[_0x285d('0x7')](mailAccount[_0x285d('0x8')]())[_0x285d('0x7')](realtime[_0x285d('0x9')]())[_0x285d('0x7')](function(){email[_0x285d('0xa')](realtime[_0x285d('0xb')]);return realtime;});}function main(){return server[_0x285d('0xc')](realtime,email)[_0x285d('0x7')](function(){return initRealtime();})[_0x285d('0x7')](function(){return setting[_0x285d('0xd')]();})[_0x285d('0x7')](function(_0x225570){return setInterval(initRealtime,_0x225570[_0x285d('0xe')]*0x3e8);})['catch'](function(_0x170d48){logger[_0x285d('0xf')](_0x285d('0x10'),_0x170d48);});}main(); \ No newline at end of file +var _0x754b=['../../config/logger','email','resolve','initMailAccounts','then','refresh','mailAccounts','getSettings','loginMailFrequency','catch','Email\x20service\x20initialization','./server','./realtime','./lib/email','./rpc/mailAccount','./rpc/setting'];(function(_0x227fe7,_0x392329){var _0x4b98be=function(_0xd90e58){while(--_0xd90e58){_0x227fe7['push'](_0x227fe7['shift']());}};_0x4b98be(++_0x392329);}(_0x754b,0xfb));var _0xb754=function(_0x212579,_0xdb4d5a){_0x212579=_0x212579-0x0;var _0x55d50e=_0x754b[_0x212579];return _0x55d50e;};'use strict';var server=require(_0xb754('0x0'));var Realtime=require(_0xb754('0x1'));var EmailChannel=require(_0xb754('0x2'));var mailAccount=require(_0xb754('0x3'));var setting=require(_0xb754('0x4'));var logger=require(_0xb754('0x5'))(_0xb754('0x6'));var realtime=new Realtime();var email=new EmailChannel(realtime);function initRealtime(){return Promise[_0xb754('0x7')]()['then'](mailAccount['getMailAccounts']())['then'](realtime[_0xb754('0x8')]())[_0xb754('0x9')](function(){email[_0xb754('0xa')](realtime[_0xb754('0xb')]);return realtime;});}function main(){return server['listen'](realtime,email)['then'](function(){return initRealtime();})[_0xb754('0x9')](function(){return setting[_0xb754('0xc')]();})[_0xb754('0x9')](function(_0x3528de){return setInterval(initRealtime,_0x3528de[_0xb754('0xd')]*0x3e8);})[_0xb754('0xe')](function(_0x4e4888){logger['error'](_0xb754('0xf'),_0x4e4888);});}main(); \ No newline at end of file diff --git a/server/services/email/lib/email.js b/server/services/email/lib/email.js index b852f52..8740312 100644 --- a/server/services/email/lib/email.js +++ b/server/services/email/lib/email.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x0311=['smtp','prototype','emit','mailAccounts','name','status','Imap','total','stringify','md5','refresh','hasOwnProperty','active','service','provider','custom','imapAccounts','bind','handleImapEnd','error','handleImapError','isNil','disabled','handleImapBox','connected','messageStatus','messages','handleImapEmail','lastName','notify','Mail\x20accepted\x20from\x20routing','catch','lastSync','sendMail','Smtp','then','verify','exports','moment','ioredis','../../../config/environment','../../../config/logger','email','redis','localhost','./imap','./smtp','info','start\x20email\x20channel'];(function(_0x1526e1,_0x5ed5a5){var _0x249a1e=function(_0x4a7c12){while(--_0x4a7c12){_0x1526e1['push'](_0x1526e1['shift']());}};_0x249a1e(++_0x5ed5a5);}(_0x0311,0x1df));var _0x1031=function(_0x44680c,_0x3b5852){_0x44680c=_0x44680c-0x0;var _0x58dca1=_0x0311[_0x44680c];return _0x58dca1;};'use strict';var _=require('lodash');var moment=require(_0x1031('0x0'));var BPromise=require('bluebird');var md5=require('md5');var Redis=require(_0x1031('0x1'));var config=require(_0x1031('0x2'));var logger=require(_0x1031('0x3'))(_0x1031('0x4'));config['redis']=_['defaults'](config[_0x1031('0x5')],{'host':_0x1031('0x6'),'port':0x18eb});var io=require('socket.io-emitter')(new Redis(config[_0x1031('0x5')]));var EmailImap=require(_0x1031('0x7'));var EmailSmtp=require(_0x1031('0x8'));var mailAccount=require('../rpc/mailAccount');var md5Accounts={};function EmailChannel(_0x2d39cf){logger[_0x1031('0x9')](_0x1031('0xa'));this['mailAccounts']=_0x2d39cf['mailAccounts'];this['imapAccounts']={};this[_0x1031('0xb')]=new EmailSmtp();}EmailChannel[_0x1031('0xc')][_0x1031('0xd')]=function(_0x17a645){var _0x4e7157=this[_0x1031('0xe')][_0x17a645];var _0x444c44={'id':_0x4e7157['id'],'name':_0x4e7157[_0x1031('0xf')],'key':_0x4e7157['key'],'active':_0x4e7157['active'],'Imap':{'status':_0x4e7157['Imap'][_0x1031('0x10')],'messageStatus':_0x4e7157[_0x1031('0x11')]['messageStatus'],'total':_0x4e7157[_0x1031('0x11')][_0x1031('0x12')]}};if(_['isNil'](md5Accounts[_0x17a645])){md5Accounts[_0x17a645]={};}var _0x6e6c01=md5(JSON[_0x1031('0x13')](_0x444c44));if(md5Accounts[_0x17a645][_0x1031('0x14')]!==_0x6e6c01){md5Accounts[_0x17a645][_0x1031('0x14')]=_0x6e6c01;io[_0x1031('0xd')]('mailAccount:update',_0x444c44);}};EmailChannel[_0x1031('0xc')][_0x1031('0x15')]=function(_0x5afa0f){for(var _0x2c58a2 in _0x5afa0f){if(_0x5afa0f[_0x1031('0x16')](_0x2c58a2)){if(_0x5afa0f[_0x2c58a2][_0x1031('0x11')]&&_0x5afa0f[_0x2c58a2][_0x1031('0x17')]){var _0x2f5a10=_0x5afa0f[_0x2c58a2][_0x1031('0x11')];if(!_0x2f5a10[_0x1031('0x18')]&&_0x5afa0f[_0x2c58a2][_0x1031('0x19')]!==_0x1031('0x1a'))_0x2f5a10[_0x1031('0x18')]=_0x5afa0f[_0x2c58a2][_0x1031('0x19')];if(!this[_0x1031('0x1b')][_0x1031('0x16')](_0x2f5a10['id'])){this[_0x1031('0x1b')][_0x2f5a10['id']]=new EmailImap(_0x2f5a10,_0x5afa0f[_0x2c58a2][_0x1031('0x4')]);this[_0x1031('0x1b')][_0x2f5a10['id']]['on']('box',this['handleImapBox'][_0x1031('0x1c')](this,_0x2c58a2));this[_0x1031('0x1b')][_0x2f5a10['id']]['on'](_0x1031('0x4'),this['handleImapEmail'][_0x1031('0x1c')](this,_0x2c58a2));this[_0x1031('0x1b')][_0x2f5a10['id']]['on']('end',this[_0x1031('0x1d')][_0x1031('0x1c')](this,_0x2c58a2));this[_0x1031('0x1b')][_0x2f5a10['id']]['on'](_0x1031('0x1e'),this[_0x1031('0x1f')][_0x1031('0x1c')](this,_0x2c58a2));}}else{if(_[_0x1031('0x20')](this[_0x1031('0xe')][_0x2c58a2]['Imap'])){this[_0x1031('0xe')][_0x2c58a2][_0x1031('0x11')]={};}this[_0x1031('0xe')][_0x2c58a2][_0x1031('0x11')][_0x1031('0x10')]=_0x1031('0x21');this[_0x1031('0xe')][_0x2c58a2][_0x1031('0x11')]['messageStatus']='';this['emit'](_0x2c58a2);}}}};EmailChannel[_0x1031('0xc')][_0x1031('0x22')]=function(_0x478aba,_0x3654f2){if(this[_0x1031('0xe')][_0x478aba]){this[_0x1031('0xe')][_0x478aba]['Imap'][_0x1031('0x10')]=_0x1031('0x23');this[_0x1031('0xe')][_0x478aba][_0x1031('0x11')][_0x1031('0x24')]=_0x3654f2[_0x1031('0xf')];if(_0x3654f2[_0x1031('0x25')]){this[_0x1031('0xe')][_0x478aba][_0x1031('0x11')][_0x1031('0x12')]=_0x3654f2[_0x1031('0x25')]['total'];}return this[_0x1031('0xd')](_0x478aba);}};EmailChannel['prototype'][_0x1031('0x26')]=function(_0x1906cd,_0x1555cc){logger[_0x1031('0x9')]('New\x20email\x20from\x20%s\x20%s\x20%s\x20to\x20%s',_0x1555cc['firstName'],_0x1555cc[_0x1031('0x27')],_0x1555cc['from'],_0x1906cd);if(this['mailAccounts'][_0x1906cd]){return mailAccount[_0x1031('0x28')](_0x1906cd,_0x1555cc)['then'](function(_0x19fcb5){if(_0x19fcb5){logger['info'](_0x1031('0x29'));}})[_0x1031('0x2a')](function(_0x17fecd){logger['error']('Mail\x20not\x20accepted\x20from\x20routing\x20%s',JSON[_0x1031('0x13')](_0x17fecd));});}};EmailChannel[_0x1031('0xc')][_0x1031('0x1d')]=function(_0x22f827){if(this[_0x1031('0xe')][_0x22f827]&&this['mailAccounts'][_0x22f827][_0x1031('0x11')]){if(this[_0x1031('0x1b')][this['mailAccounts'][_0x22f827][_0x1031('0x11')]['id']]){delete this[_0x1031('0x1b')][this['mailAccounts'][_0x22f827][_0x1031('0x11')]['id']];}this[_0x1031('0xe')][_0x22f827][_0x1031('0x11')][_0x1031('0x2b')]=moment();this['emit'](_0x22f827);}};EmailChannel[_0x1031('0xc')][_0x1031('0x1f')]=function(_0x347e82,_0x233ead){if(this[_0x1031('0xe')][_0x347e82]){this['mailAccounts'][_0x347e82]['Imap'][_0x1031('0x10')]='error';this[_0x1031('0xe')][_0x347e82]['Imap'][_0x1031('0x24')]=_0x233ead;return this[_0x1031('0xd')](_0x347e82);}};EmailChannel[_0x1031('0xc')][_0x1031('0x2c')]=function(_0x2164f1,_0x5dc714){return this[_0x1031('0xb')]['send'](_0x2164f1,_0x5dc714);};EmailChannel[_0x1031('0xc')]['verifySmtp']=function(_0x40ecf7){var _0x4cde8a=this;if(this[_0x1031('0xe')][_0x40ecf7['id']]){if(_[_0x1031('0x20')](this['mailAccounts'][_0x40ecf7['id']][_0x1031('0x2d')])){this[_0x1031('0xe')][_0x40ecf7['id']][_0x1031('0x2d')]={};}this[_0x1031('0xe')][_0x40ecf7['id']][_0x1031('0x2d')]['lastSync']=moment();return new BPromise(function(_0x2bf983,_0x5e3df7){return _0x4cde8a[_0x1031('0xb')]['verify'](_0x40ecf7)[_0x1031('0x2e')](function(_0x307424){_0x4cde8a[_0x1031('0xe')][_0x40ecf7['id']]['Smtp']['status']='verified';_0x4cde8a[_0x1031('0xe')][_0x40ecf7['id']][_0x1031('0x2d')][_0x1031('0x24')]='';_0x4cde8a[_0x1031('0xd')](_0x40ecf7['id']);_0x2bf983(_0x307424);})[_0x1031('0x2a')](function(_0x583986){_0x4cde8a[_0x1031('0xe')][_0x40ecf7['id']][_0x1031('0x2d')][_0x1031('0x10')]=_0x1031('0x1e');_0x4cde8a[_0x1031('0xe')][_0x40ecf7['id']][_0x1031('0x2d')][_0x1031('0x24')]=_0x583986;_0x4cde8a[_0x1031('0xd')](_0x40ecf7['id']);_0x5e3df7(_0x583986);});});}return this['smtp'][_0x1031('0x2f')](_0x40ecf7);};module[_0x1031('0x30')]=EmailChannel; \ No newline at end of file +var _0xfb9e=['disabled','messageStatus','handleImapBox','connected','messages','info','New\x20email\x20from\x20%s\x20%s\x20%s\x20to\x20%s','firstName','from','notify','then','Mail\x20accepted\x20from\x20routing','catch','Mail\x20not\x20accepted\x20from\x20routing\x20%s','prototype','handleImapEnd','lastSync','sendMail','send','Smtp','verify','verified','exports','moment','bluebird','md5','../../../config/environment','email','redis','socket.io-emitter','./imap','./smtp','../rpc/mailAccount','mailAccounts','imapAccounts','smtp','emit','name','active','status','Imap','total','isNil','mailAccount:update','refresh','hasOwnProperty','service','provider','handleImapEmail','bind','end','error','handleImapError'];(function(_0x21568c,_0x28657d){var _0x3974f7=function(_0x1f7cc3){while(--_0x1f7cc3){_0x21568c['push'](_0x21568c['shift']());}};_0x3974f7(++_0x28657d);}(_0xfb9e,0x120));var _0xefb9=function(_0x377fd8,_0x11062d){_0x377fd8=_0x377fd8-0x0;var _0x451606=_0xfb9e[_0x377fd8];return _0x451606;};'use strict';var _=require('lodash');var moment=require(_0xefb9('0x0'));var BPromise=require(_0xefb9('0x1'));var md5=require(_0xefb9('0x2'));var Redis=require('ioredis');var config=require(_0xefb9('0x3'));var logger=require('../../../config/logger')(_0xefb9('0x4'));config[_0xefb9('0x5')]=_['defaults'](config[_0xefb9('0x5')],{'host':'localhost','port':0x18eb});var io=require(_0xefb9('0x6'))(new Redis(config[_0xefb9('0x5')]));var EmailImap=require(_0xefb9('0x7'));var EmailSmtp=require(_0xefb9('0x8'));var mailAccount=require(_0xefb9('0x9'));var md5Accounts={};function EmailChannel(_0x39a415){logger['info']('start\x20email\x20channel');this[_0xefb9('0xa')]=_0x39a415[_0xefb9('0xa')];this[_0xefb9('0xb')]={};this[_0xefb9('0xc')]=new EmailSmtp();}EmailChannel['prototype'][_0xefb9('0xd')]=function(_0x10e88b){var _0x17c766=this[_0xefb9('0xa')][_0x10e88b];var _0x2f400e={'id':_0x17c766['id'],'name':_0x17c766[_0xefb9('0xe')],'key':_0x17c766['key'],'active':_0x17c766[_0xefb9('0xf')],'Imap':{'status':_0x17c766['Imap'][_0xefb9('0x10')],'messageStatus':_0x17c766[_0xefb9('0x11')]['messageStatus'],'total':_0x17c766[_0xefb9('0x11')][_0xefb9('0x12')]}};if(_[_0xefb9('0x13')](md5Accounts[_0x10e88b])){md5Accounts[_0x10e88b]={};}var _0x54b31f=md5(JSON['stringify'](_0x2f400e));if(md5Accounts[_0x10e88b]['md5']!==_0x54b31f){md5Accounts[_0x10e88b]['md5']=_0x54b31f;io[_0xefb9('0xd')](_0xefb9('0x14'),_0x2f400e);}};EmailChannel['prototype'][_0xefb9('0x15')]=function(_0x41ac79){for(var _0x3cae2c in _0x41ac79){if(_0x41ac79[_0xefb9('0x16')](_0x3cae2c)){if(_0x41ac79[_0x3cae2c][_0xefb9('0x11')]&&_0x41ac79[_0x3cae2c]['active']){var _0x8b8db4=_0x41ac79[_0x3cae2c][_0xefb9('0x11')];if(!_0x8b8db4[_0xefb9('0x17')]&&_0x41ac79[_0x3cae2c]['provider']!=='custom')_0x8b8db4[_0xefb9('0x17')]=_0x41ac79[_0x3cae2c][_0xefb9('0x18')];if(!this[_0xefb9('0xb')][_0xefb9('0x16')](_0x8b8db4['id'])){this[_0xefb9('0xb')][_0x8b8db4['id']]=new EmailImap(_0x8b8db4,_0x41ac79[_0x3cae2c][_0xefb9('0x4')]);this[_0xefb9('0xb')][_0x8b8db4['id']]['on']('box',this['handleImapBox']['bind'](this,_0x3cae2c));this[_0xefb9('0xb')][_0x8b8db4['id']]['on'](_0xefb9('0x4'),this[_0xefb9('0x19')][_0xefb9('0x1a')](this,_0x3cae2c));this['imapAccounts'][_0x8b8db4['id']]['on'](_0xefb9('0x1b'),this['handleImapEnd'][_0xefb9('0x1a')](this,_0x3cae2c));this['imapAccounts'][_0x8b8db4['id']]['on'](_0xefb9('0x1c'),this[_0xefb9('0x1d')][_0xefb9('0x1a')](this,_0x3cae2c));}}else{if(_['isNil'](this[_0xefb9('0xa')][_0x3cae2c]['Imap'])){this[_0xefb9('0xa')][_0x3cae2c][_0xefb9('0x11')]={};}this[_0xefb9('0xa')][_0x3cae2c][_0xefb9('0x11')]['status']=_0xefb9('0x1e');this[_0xefb9('0xa')][_0x3cae2c][_0xefb9('0x11')][_0xefb9('0x1f')]='';this[_0xefb9('0xd')](_0x3cae2c);}}}};EmailChannel['prototype'][_0xefb9('0x20')]=function(_0x5757db,_0xdf87d7){if(this['mailAccounts'][_0x5757db]){this[_0xefb9('0xa')][_0x5757db]['Imap']['status']=_0xefb9('0x21');this[_0xefb9('0xa')][_0x5757db][_0xefb9('0x11')][_0xefb9('0x1f')]=_0xdf87d7[_0xefb9('0xe')];if(_0xdf87d7['messages']){this[_0xefb9('0xa')][_0x5757db][_0xefb9('0x11')][_0xefb9('0x12')]=_0xdf87d7[_0xefb9('0x22')][_0xefb9('0x12')];}return this[_0xefb9('0xd')](_0x5757db);}};EmailChannel['prototype'][_0xefb9('0x19')]=function(_0x45e9da,_0x3b6005){logger[_0xefb9('0x23')](_0xefb9('0x24'),_0x3b6005[_0xefb9('0x25')],_0x3b6005['lastName'],_0x3b6005[_0xefb9('0x26')],_0x45e9da);if(this[_0xefb9('0xa')][_0x45e9da]){return mailAccount[_0xefb9('0x27')](_0x45e9da,_0x3b6005)[_0xefb9('0x28')](function(_0x5e7768){if(_0x5e7768){logger[_0xefb9('0x23')](_0xefb9('0x29'));}})[_0xefb9('0x2a')](function(_0x5d6188){logger[_0xefb9('0x1c')](_0xefb9('0x2b'),JSON['stringify'](_0x5d6188));});}};EmailChannel[_0xefb9('0x2c')][_0xefb9('0x2d')]=function(_0x3ef6a5){if(this[_0xefb9('0xa')][_0x3ef6a5]&&this[_0xefb9('0xa')][_0x3ef6a5][_0xefb9('0x11')]){if(this[_0xefb9('0xb')][this[_0xefb9('0xa')][_0x3ef6a5][_0xefb9('0x11')]['id']]){delete this[_0xefb9('0xb')][this['mailAccounts'][_0x3ef6a5][_0xefb9('0x11')]['id']];}this[_0xefb9('0xa')][_0x3ef6a5][_0xefb9('0x11')][_0xefb9('0x2e')]=moment();this[_0xefb9('0xd')](_0x3ef6a5);}};EmailChannel[_0xefb9('0x2c')]['handleImapError']=function(_0x38ff75,_0x545523){if(this[_0xefb9('0xa')][_0x38ff75]){this['mailAccounts'][_0x38ff75][_0xefb9('0x11')][_0xefb9('0x10')]=_0xefb9('0x1c');this[_0xefb9('0xa')][_0x38ff75][_0xefb9('0x11')][_0xefb9('0x1f')]=_0x545523;return this[_0xefb9('0xd')](_0x38ff75);}};EmailChannel['prototype'][_0xefb9('0x2f')]=function(_0x4a229f,_0x5d3618){return this[_0xefb9('0xc')][_0xefb9('0x30')](_0x4a229f,_0x5d3618);};EmailChannel[_0xefb9('0x2c')]['verifySmtp']=function(_0xa12fe3){var _0x5e94de=this;if(this['mailAccounts'][_0xa12fe3['id']]){if(_[_0xefb9('0x13')](this[_0xefb9('0xa')][_0xa12fe3['id']]['Smtp'])){this[_0xefb9('0xa')][_0xa12fe3['id']][_0xefb9('0x31')]={};}this['mailAccounts'][_0xa12fe3['id']]['Smtp']['lastSync']=moment();return new BPromise(function(_0x181a48,_0x27f584){return _0x5e94de['smtp'][_0xefb9('0x32')](_0xa12fe3)[_0xefb9('0x28')](function(_0x2d1005){_0x5e94de[_0xefb9('0xa')][_0xa12fe3['id']]['Smtp'][_0xefb9('0x10')]=_0xefb9('0x33');_0x5e94de[_0xefb9('0xa')][_0xa12fe3['id']]['Smtp'][_0xefb9('0x1f')]='';_0x5e94de[_0xefb9('0xd')](_0xa12fe3['id']);_0x181a48(_0x2d1005);})[_0xefb9('0x2a')](function(_0x3f36cd){_0x5e94de['mailAccounts'][_0xa12fe3['id']][_0xefb9('0x31')][_0xefb9('0x10')]=_0xefb9('0x1c');_0x5e94de[_0xefb9('0xa')][_0xa12fe3['id']][_0xefb9('0x31')][_0xefb9('0x1f')]=_0x3f36cd;_0x5e94de[_0xefb9('0xd')](_0xa12fe3['id']);_0x27f584(_0x3f36cd);});});}return this['smtp']['verify'](_0xa12fe3);};module[_0xefb9('0x34')]=EmailChannel; \ No newline at end of file diff --git a/server/services/email/lib/imap.js b/server/services/email/lib/imap.js index 7b4a66f..4718810 100644 --- a/server/services/email/lib/imap.js +++ b/server/services/email/lib/imap.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x21e4=['attributes','handleMessageAttributes','handleMessageEnd','handleSimpleParser','parser','stringify','textCode','hasOwnProperty','upperFirst','exports','lodash','util','imap','mailparser','simpleParser','iconv','events','EventEmitter','../../../config/logger','email','mailbox','account','getAccount','once','ready','handleReady','bind','end','handleEnd','error','inherits','prototype','connTimeout','authTimeout','service','user','modernAuthentication','xoauth2','generateXOAuth2Token','CloudProvider','data5','password','authentication','anonymous@xcally.com','host','port','tls','autotls','required','openBox','handleOpenBox','handleError','emit','box','readUnseen','handleCloseBox','search','UNSEEN','handleReadUnseen','length','fetch','message','handleFetchMessage','handleFetchError','handleFetchEnd','closeBox','handleMessageBody'];(function(_0x5eb22e,_0x27cbac){var _0x27fed5=function(_0x565467){while(--_0x565467){_0x5eb22e['push'](_0x5eb22e['shift']());}};_0x27fed5(++_0x27cbac);}(_0x21e4,0x19c));var _0x421e=function(_0x1de317,_0x4ae5ab){_0x1de317=_0x1de317-0x0;var _0xb660=_0x21e4[_0x1de317];return _0xb660;};'use strict';var _=require(_0x421e('0x0'));var util=require(_0x421e('0x1'));var Imap=require(_0x421e('0x2'));var simpleParser=require(_0x421e('0x3'))[_0x421e('0x4')];var Iconv=require(_0x421e('0x5'))['Iconv'];var EventEmitter=require(_0x421e('0x6'))[_0x421e('0x7')];var utils=require('./utils');var logger=require(_0x421e('0x8'))(_0x421e('0x9'));function EmailImap(_0x27bc30,_0x165af0){this['mailbox']=_0x27bc30[_0x421e('0xa')];this[_0x421e('0xb')]=this[_0x421e('0xc')](_0x27bc30,_0x165af0);this[_0x421e('0x2')]=new Imap(this[_0x421e('0xb')]);this['imap'][_0x421e('0xd')](_0x421e('0xe'),this[_0x421e('0xf')][_0x421e('0x10')](this));this[_0x421e('0x2')][_0x421e('0xd')](_0x421e('0x11'),this[_0x421e('0x12')][_0x421e('0x10')](this));this[_0x421e('0x2')]['on'](_0x421e('0x13'),this['handleError']['bind'](this));this['imap']['connect']();}util[_0x421e('0x14')](EmailImap,EventEmitter);EmailImap[_0x421e('0x15')][_0x421e('0xc')]=function(_0x1bb1e0,_0x3dd79c){var _0x20185d={'connTimeout':_0x1bb1e0['connTimeout']?_0x1bb1e0[_0x421e('0x16')]*0x3e8:0x2710,'authTimeout':_0x1bb1e0[_0x421e('0x17')]?_0x1bb1e0[_0x421e('0x17')]*0x3e8:0x1388};if(_0x1bb1e0[_0x421e('0x18')]){_0x20185d[_0x421e('0x19')]=_0x1bb1e0[_0x421e('0x19')];if(_0x1bb1e0[_0x421e('0x1a')]){_0x20185d[_0x421e('0x1b')]=utils[_0x421e('0x1c')](_0x1bb1e0[_0x421e('0x1d')][_0x421e('0x1e')],_0x1bb1e0[_0x421e('0x19')]);}else{_0x20185d[_0x421e('0x1f')]=_0x1bb1e0[_0x421e('0x1f')];}}else{if(_0x1bb1e0[_0x421e('0x20')]){_0x20185d[_0x421e('0x19')]=_0x1bb1e0[_0x421e('0x19')];_0x20185d[_0x421e('0x1f')]=_0x1bb1e0[_0x421e('0x1f')];}}_0x20185d[_0x421e('0x9')]=_0x3dd79c||_0x1bb1e0[_0x421e('0x19')]||_0x421e('0x21');_0x20185d[_0x421e('0x22')]=_0x1bb1e0['host'];_0x20185d[_0x421e('0x23')]=_0x1bb1e0[_0x421e('0x23')]||0x3e1;if(_0x1bb1e0['tls']){_0x20185d[_0x421e('0x24')]=!![];}else{_0x20185d[_0x421e('0x24')]=![];_0x20185d[_0x421e('0x25')]=_0x421e('0x26');}return _0x20185d;};EmailImap[_0x421e('0x15')]['handleReady']=function(){this[_0x421e('0x2')][_0x421e('0x27')](this[_0x421e('0xa')],![],this['handleOpenBox'][_0x421e('0x10')](this));};EmailImap[_0x421e('0x15')][_0x421e('0x28')]=function(_0x32b64b,_0x462e4d){if(_0x32b64b){this[_0x421e('0x29')](_0x32b64b,!![]);}else{this[_0x421e('0x2a')](_0x421e('0x2b'),_0x462e4d);this[_0x421e('0x2c')]();}};EmailImap[_0x421e('0x15')][_0x421e('0x2d')]=function(_0x10a133){if(_0x10a133){this[_0x421e('0x29')](_0x10a133,!![]);}else{this['imap'][_0x421e('0x11')]();}};EmailImap[_0x421e('0x15')][_0x421e('0x2c')]=function(){this[_0x421e('0x2')][_0x421e('0x2e')]([_0x421e('0x2f')],this[_0x421e('0x30')][_0x421e('0x10')](this));};EmailImap['prototype'][_0x421e('0x30')]=function(_0x4079f6,_0x39fdcc){if(_0x4079f6){this[_0x421e('0x29')](_0x4079f6,!![]);}else{if(_0x39fdcc[_0x421e('0x31')]){try{var _0xae2ed4=this['imap'][_0x421e('0x32')](_0x39fdcc,{'bodies':'','markSeen':!![]});_0xae2ed4['on'](_0x421e('0x33'),this[_0x421e('0x34')][_0x421e('0x10')](this));_0xae2ed4['once'](_0x421e('0x13'),this[_0x421e('0x35')][_0x421e('0x10')](this));_0xae2ed4['once'](_0x421e('0x11'),this[_0x421e('0x36')][_0x421e('0x10')](this));}catch(_0x44d3f5){logger[_0x421e('0x13')](_0x44d3f5);}}else{this[_0x421e('0x2')][_0x421e('0x37')](!![],this[_0x421e('0x2d')][_0x421e('0x10')](this));}}};EmailImap[_0x421e('0x15')]['handleFetchMessage']=function(_0x5a968a){_0x5a968a['on']('body',this[_0x421e('0x38')][_0x421e('0x10')](this));_0x5a968a[_0x421e('0xd')](_0x421e('0x39'),this[_0x421e('0x3a')][_0x421e('0x10')](this));_0x5a968a[_0x421e('0xd')](_0x421e('0x11'),this[_0x421e('0x3b')][_0x421e('0x10')](this));};EmailImap[_0x421e('0x15')][_0x421e('0x38')]=function(_0x38fe86){simpleParser(_0x38fe86,{'Iconv':Iconv},this[_0x421e('0x3c')]['bind'](this));};EmailImap[_0x421e('0x15')]['handleMessageAttributes']=function(){};EmailImap[_0x421e('0x15')][_0x421e('0x3b')]=function(){};EmailImap['prototype']['handleSimpleParser']=function(_0x15839b,_0x4cb7dd){if(_0x15839b){logger[_0x421e('0x13')](_0x15839b);}else{var _0x51d505=this;utils[_0x421e('0x3d')](this['account'],_0x4cb7dd,function(_0x4d42c4){_0x51d505[_0x421e('0x2a')](_0x421e('0x9'),_0x4d42c4);});}};EmailImap['prototype'][_0x421e('0x36')]=function(){this[_0x421e('0x2')]['closeBox'](!![],this[_0x421e('0x2d')]['bind'](this));};EmailImap[_0x421e('0x15')][_0x421e('0x35')]=function(_0x157f7b){this[_0x421e('0x29')](_0x157f7b);this[_0x421e('0x2')][_0x421e('0x37')](!![],this[_0x421e('0x2d')]['bind'](this));};EmailImap[_0x421e('0x15')]['handleEnd']=function(){this[_0x421e('0x2a')](_0x421e('0x11'));};EmailImap[_0x421e('0x15')]['handleError']=function(_0x36e9fa,_0x5b3074){logger[_0x421e('0x13')](_0x421e('0x29'),this[_0x421e('0xb')][_0x421e('0x9')],JSON[_0x421e('0x3e')](_0x36e9fa));var _0x2cd1b0='';if(_0x36e9fa){if(_0x36e9fa[_0x421e('0x3f')]){_0x2cd1b0=_0x36e9fa[_0x421e('0x3f')];}else{for(var _0x31ca1d in _0x36e9fa){if(_0x36e9fa[_0x421e('0x40')](_0x31ca1d)){_0x2cd1b0+=_[_0x421e('0x41')](_0x31ca1d)+':\x20'+_0x36e9fa[_0x31ca1d]+'\x0a';}}}}if(_0x5b3074){this[_0x421e('0x2')][_0x421e('0x11')]();}else{this[_0x421e('0x2a')](_0x421e('0x13'),_0x2cd1b0);this[_0x421e('0x2a')](_0x421e('0x11'));}};module[_0x421e('0x42')]=EmailImap; \ No newline at end of file +var _0x12ea=['./utils','../../../config/logger','email','mailbox','account','getAccount','ready','handleReady','bind','once','end','handleEnd','error','handleError','inherits','prototype','connTimeout','authTimeout','user','generateXOAuth2Token','CloudProvider','password','authentication','anonymous@xcally.com','host','port','tls','autotls','required','handleOpenBox','emit','box','handleCloseBox','readUnseen','UNSEEN','handleReadUnseen','length','fetch','handleFetchMessage','handleFetchError','closeBox','body','handleMessageBody','handleMessageAttributes','handleSimpleParser','handleMessageEnd','parser','handleFetchEnd','stringify','textCode','hasOwnProperty','exports','lodash','util','imap','mailparser','simpleParser','iconv','Iconv','events','EventEmitter'];(function(_0x5dcae8,_0x14040a){var _0xa7a0c6=function(_0x40d4a9){while(--_0x40d4a9){_0x5dcae8['push'](_0x5dcae8['shift']());}};_0xa7a0c6(++_0x14040a);}(_0x12ea,0x1df));var _0xa12e=function(_0x278555,_0x1cf30d){_0x278555=_0x278555-0x0;var _0x306ef0=_0x12ea[_0x278555];return _0x306ef0;};'use strict';var _=require(_0xa12e('0x0'));var util=require(_0xa12e('0x1'));var Imap=require(_0xa12e('0x2'));var simpleParser=require(_0xa12e('0x3'))[_0xa12e('0x4')];var Iconv=require(_0xa12e('0x5'))[_0xa12e('0x6')];var EventEmitter=require(_0xa12e('0x7'))[_0xa12e('0x8')];var utils=require(_0xa12e('0x9'));var logger=require(_0xa12e('0xa'))(_0xa12e('0xb'));function EmailImap(_0x7c1efc,_0x1d931a){this['mailbox']=_0x7c1efc[_0xa12e('0xc')];this[_0xa12e('0xd')]=this[_0xa12e('0xe')](_0x7c1efc,_0x1d931a);this[_0xa12e('0x2')]=new Imap(this[_0xa12e('0xd')]);this[_0xa12e('0x2')]['once'](_0xa12e('0xf'),this[_0xa12e('0x10')][_0xa12e('0x11')](this));this[_0xa12e('0x2')][_0xa12e('0x12')](_0xa12e('0x13'),this[_0xa12e('0x14')][_0xa12e('0x11')](this));this['imap']['on'](_0xa12e('0x15'),this[_0xa12e('0x16')][_0xa12e('0x11')](this));this[_0xa12e('0x2')]['connect']();}util[_0xa12e('0x17')](EmailImap,EventEmitter);EmailImap[_0xa12e('0x18')][_0xa12e('0xe')]=function(_0x40bc30,_0x4888c7){var _0x47cd6d={'connTimeout':_0x40bc30[_0xa12e('0x19')]?_0x40bc30['connTimeout']*0x3e8:0x2710,'authTimeout':_0x40bc30[_0xa12e('0x1a')]?_0x40bc30[_0xa12e('0x1a')]*0x3e8:0x1388};if(_0x40bc30['service']){_0x47cd6d[_0xa12e('0x1b')]=_0x40bc30[_0xa12e('0x1b')];if(_0x40bc30['modernAuthentication']){_0x47cd6d['xoauth2']=utils[_0xa12e('0x1c')](_0x40bc30[_0xa12e('0x1d')]['data5'],_0x40bc30[_0xa12e('0x1b')]);}else{_0x47cd6d[_0xa12e('0x1e')]=_0x40bc30[_0xa12e('0x1e')];}}else{if(_0x40bc30[_0xa12e('0x1f')]){_0x47cd6d[_0xa12e('0x1b')]=_0x40bc30['user'];_0x47cd6d[_0xa12e('0x1e')]=_0x40bc30['password'];}}_0x47cd6d[_0xa12e('0xb')]=_0x4888c7||_0x40bc30['user']||_0xa12e('0x20');_0x47cd6d[_0xa12e('0x21')]=_0x40bc30[_0xa12e('0x21')];_0x47cd6d[_0xa12e('0x22')]=_0x40bc30[_0xa12e('0x22')]||0x3e1;if(_0x40bc30[_0xa12e('0x23')]){_0x47cd6d[_0xa12e('0x23')]=!![];}else{_0x47cd6d[_0xa12e('0x23')]=![];_0x47cd6d[_0xa12e('0x24')]=_0xa12e('0x25');}return _0x47cd6d;};EmailImap['prototype'][_0xa12e('0x10')]=function(){this[_0xa12e('0x2')]['openBox'](this[_0xa12e('0xc')],![],this[_0xa12e('0x26')]['bind'](this));};EmailImap[_0xa12e('0x18')]['handleOpenBox']=function(_0x397be9,_0x5a5dbf){if(_0x397be9){this[_0xa12e('0x16')](_0x397be9,!![]);}else{this[_0xa12e('0x27')](_0xa12e('0x28'),_0x5a5dbf);this['readUnseen']();}};EmailImap[_0xa12e('0x18')][_0xa12e('0x29')]=function(_0x39c8db){if(_0x39c8db){this[_0xa12e('0x16')](_0x39c8db,!![]);}else{this[_0xa12e('0x2')][_0xa12e('0x13')]();}};EmailImap['prototype'][_0xa12e('0x2a')]=function(){this['imap']['search']([_0xa12e('0x2b')],this[_0xa12e('0x2c')][_0xa12e('0x11')](this));};EmailImap['prototype'][_0xa12e('0x2c')]=function(_0x4c1494,_0x1f6791){if(_0x4c1494){this['handleError'](_0x4c1494,!![]);}else{if(_0x1f6791[_0xa12e('0x2d')]){try{var _0x10d2cc=this['imap'][_0xa12e('0x2e')](_0x1f6791,{'bodies':'','markSeen':!![]});_0x10d2cc['on']('message',this[_0xa12e('0x2f')][_0xa12e('0x11')](this));_0x10d2cc[_0xa12e('0x12')](_0xa12e('0x15'),this[_0xa12e('0x30')][_0xa12e('0x11')](this));_0x10d2cc[_0xa12e('0x12')]('end',this['handleFetchEnd'][_0xa12e('0x11')](this));}catch(_0x7469b5){logger[_0xa12e('0x15')](_0x7469b5);}}else{this['imap'][_0xa12e('0x31')](!![],this[_0xa12e('0x29')][_0xa12e('0x11')](this));}}};EmailImap[_0xa12e('0x18')][_0xa12e('0x2f')]=function(_0x52a3bf){_0x52a3bf['on'](_0xa12e('0x32'),this[_0xa12e('0x33')][_0xa12e('0x11')](this));_0x52a3bf[_0xa12e('0x12')]('attributes',this[_0xa12e('0x34')][_0xa12e('0x11')](this));_0x52a3bf[_0xa12e('0x12')](_0xa12e('0x13'),this['handleMessageEnd'][_0xa12e('0x11')](this));};EmailImap[_0xa12e('0x18')][_0xa12e('0x33')]=function(_0x2e506d){simpleParser(_0x2e506d,{'Iconv':Iconv},this[_0xa12e('0x35')]['bind'](this));};EmailImap[_0xa12e('0x18')]['handleMessageAttributes']=function(){};EmailImap[_0xa12e('0x18')][_0xa12e('0x36')]=function(){};EmailImap[_0xa12e('0x18')][_0xa12e('0x35')]=function(_0x1b6edf,_0x25d43a){if(_0x1b6edf){logger['error'](_0x1b6edf);}else{var _0x5e82ee=this;utils[_0xa12e('0x37')](this[_0xa12e('0xd')],_0x25d43a,function(_0x16ebc6){_0x5e82ee[_0xa12e('0x27')](_0xa12e('0xb'),_0x16ebc6);});}};EmailImap['prototype'][_0xa12e('0x38')]=function(){this[_0xa12e('0x2')][_0xa12e('0x31')](!![],this[_0xa12e('0x29')][_0xa12e('0x11')](this));};EmailImap[_0xa12e('0x18')]['handleFetchError']=function(_0x478b37){this['handleError'](_0x478b37);this[_0xa12e('0x2')][_0xa12e('0x31')](!![],this[_0xa12e('0x29')][_0xa12e('0x11')](this));};EmailImap['prototype'][_0xa12e('0x14')]=function(){this[_0xa12e('0x27')]('end');};EmailImap['prototype'][_0xa12e('0x16')]=function(_0x1e8a36,_0x2cd0de){logger[_0xa12e('0x15')]('handleError',this[_0xa12e('0xd')][_0xa12e('0xb')],JSON[_0xa12e('0x39')](_0x1e8a36));var _0x37c979='';if(_0x1e8a36){if(_0x1e8a36['textCode']){_0x37c979=_0x1e8a36[_0xa12e('0x3a')];}else{for(var _0x485e5d in _0x1e8a36){if(_0x1e8a36[_0xa12e('0x3b')](_0x485e5d)){_0x37c979+=_['upperFirst'](_0x485e5d)+':\x20'+_0x1e8a36[_0x485e5d]+'\x0a';}}}}if(_0x2cd0de){this[_0xa12e('0x2')][_0xa12e('0x13')]();}else{this['emit']('error',_0x37c979);this[_0xa12e('0x27')](_0xa12e('0x13'));}};module[_0xa12e('0x3c')]=EmailImap; \ No newline at end of file diff --git a/server/services/email/lib/smtp.js b/server/services/email/lib/smtp.js index 8c38a97..d5c8899 100644 --- a/server/services/email/lib/smtp.js +++ b/server/services/email/lib/smtp.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x3c81=['Not\x20verifired','exports','nodemailer','nodemailer-plugin-inline-base64','prototype','send','createTransport','use','compile','sendMail','toString'];(function(_0x1f4b18,_0x4e777c){var _0xde3957=function(_0x1dcbbc){while(--_0x1dcbbc){_0x1f4b18['push'](_0x1f4b18['shift']());}};_0xde3957(++_0x4e777c);}(_0x3c81,0x199));var _0x13c8=function(_0x57c950,_0xcfe9f0){_0x57c950=_0x57c950-0x0;var _0x240c1c=_0x3c81[_0x57c950];return _0x240c1c;};'use strict';var nodemailer=require(_0x13c8('0x0'));var inlineBase64=require(_0x13c8('0x1'));function EmailSmtp(){}EmailSmtp[_0x13c8('0x2')][_0x13c8('0x3')]=function(_0x5ce4cd,_0x749cb9){return new Promise(function(_0x46359b,_0x3c60bb){var _0x5f089a=nodemailer[_0x13c8('0x4')](_0x5ce4cd);_0x5f089a[_0x13c8('0x5')](_0x13c8('0x6'),inlineBase64());_0x5f089a[_0x13c8('0x7')](_0x749cb9,function(_0x556215,_0x62488f){if(_0x556215){_0x3c60bb(_0x556215[_0x13c8('0x8')]());}else{_0x46359b(_0x62488f);}});});};EmailSmtp['prototype']['verify']=function(_0x1457bc){return new Promise(function(_0x4a1ed7,_0x49310e){var _0x2ea7d8=nodemailer[_0x13c8('0x4')](_0x1457bc);_0x2ea7d8['verify'](function(_0x513e4a,_0xb980aa){if(_0x513e4a){_0x49310e(_0x513e4a[_0x13c8('0x8')]());}else{if(_0xb980aa){_0x4a1ed7(_0xb980aa);}else{_0x49310e(_0x13c8('0x9'));}}});});};module[_0x13c8('0xa')]=EmailSmtp; \ No newline at end of file +var _0x5812=['toString','verify','nodemailer','prototype','use','compile','sendMail'];(function(_0x16f094,_0x316c6b){var _0x2d1f8f=function(_0x4a03fd){while(--_0x4a03fd){_0x16f094['push'](_0x16f094['shift']());}};_0x2d1f8f(++_0x316c6b);}(_0x5812,0x175));var _0x2581=function(_0x58b1f8,_0x4196a2){_0x58b1f8=_0x58b1f8-0x0;var _0x4bfabd=_0x5812[_0x58b1f8];return _0x4bfabd;};'use strict';var nodemailer=require(_0x2581('0x0'));var inlineBase64=require('nodemailer-plugin-inline-base64');function EmailSmtp(){}EmailSmtp[_0x2581('0x1')]['send']=function(_0x5758ae,_0x271d66){return new Promise(function(_0x55c098,_0x254f14){var _0x597a43=nodemailer['createTransport'](_0x5758ae);_0x597a43[_0x2581('0x2')](_0x2581('0x3'),inlineBase64());_0x597a43[_0x2581('0x4')](_0x271d66,function(_0x37be2e,_0x1c45ad){if(_0x37be2e){_0x254f14(_0x37be2e[_0x2581('0x5')]());}else{_0x55c098(_0x1c45ad);}});});};EmailSmtp[_0x2581('0x1')][_0x2581('0x6')]=function(_0xe3679e){return new Promise(function(_0x1c4599,_0x44711c){var _0x73dbca=nodemailer['createTransport'](_0xe3679e);_0x73dbca[_0x2581('0x6')](function(_0x2269e5,_0x2cd088){if(_0x2269e5){_0x44711c(_0x2269e5[_0x2581('0x5')]());}else{if(_0x2cd088){_0x1c4599(_0x2cd088);}else{_0x44711c('Not\x20verifired');}}});});};module['exports']=EmailSmtp; \ No newline at end of file diff --git a/server/services/email/lib/utils.js b/server/services/email/lib/utils.js index ea3c6d3..ab440ff 100644 --- a/server/services/email/lib/utils.js +++ b/server/services/email/lib/utils.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xaa6f=['auth=Bearer\x20','toString','base64','lodash','moment','path','util','node-tnef','../../../config/logger','email','../../../config/environment','address','anonymous','generate','@xcally.com','head','value','name','substring','indexOf','split','length','slice','Anonymous','pop','isEmpty','html','includes','attachments','forEach','push','filename','replace','_SRC','_IMG','\x20[Attachment:\x20','\x20]','body','textAsHtml','Empty\x20message

','user='];(function(_0x138cf0,_0x1337f4){var _0x45113a=function(_0x527e98){while(--_0x527e98){_0x138cf0['push'](_0x138cf0['shift']());}};_0x45113a(++_0x1337f4);}(_0xaa6f,0x133));var _0xfaa6=function(_0x457652,_0x2ad060){_0x457652=_0x457652-0x0;var _0x2f5a5c=_0xaa6f[_0x457652];return _0x2f5a5c;};'use strict';var _=require(_0xfaa6('0x0'));var moment=require(_0xfaa6('0x1'));var random=require('randomstring');var fs=require('fs');var path=require(_0xfaa6('0x2'));var util=require(_0xfaa6('0x3'));var tnef=require(_0xfaa6('0x4'));var logger=require(_0xfaa6('0x5'))(_0xfaa6('0x6'));var config=require(_0xfaa6('0x7'));function getAddress(_0x207fc1){var _0x4bf5b6=_['head'](_0x207fc1['value']);return _0x4bf5b6&&_0x4bf5b6[_0xfaa6('0x8')]?_0x4bf5b6[_0xfaa6('0x8')]:_0xfaa6('0x9')+random[_0xfaa6('0xa')](0x6)+_0xfaa6('0xb');}function getFirstName(_0x1d7d8d){var _0x289d39=_[_0xfaa6('0xc')](_0x1d7d8d[_0xfaa6('0xd')]);if(_0x289d39&&_0x289d39['name']){if(_0x289d39[_0xfaa6('0xe')]==_0x289d39[_0xfaa6('0x8')]){return _0x289d39[_0xfaa6('0xe')][_0xfaa6('0xf')](0x0,_0x289d39[_0xfaa6('0xe')][_0xfaa6('0x10')]('@'));}var _0x2644c3=_0x289d39[_0xfaa6('0xe')][_0xfaa6('0x11')](/\s+/);return _0x2644c3[_0xfaa6('0x12')]>0x1?_0x2644c3[_0xfaa6('0x13')](0x0,-0x1)['join']('\x20'):_0x289d39['name'];}return _0xfaa6('0x14');}function getLastName(_0x1b00a5){var _0x4b0f47=_[_0xfaa6('0xc')](_0x1b00a5[_0xfaa6('0xd')]);if(_0x4b0f47&&_0x4b0f47[_0xfaa6('0xe')]){var _0x43bd69=_0x4b0f47['name'][_0xfaa6('0x11')](/\s+/);return _0x43bd69[_0xfaa6('0x12')]>0x1?_0x43bd69[_0xfaa6('0x15')]():'';}return'';}function getMails(_0x34d857,_0x1f71af){var _0x2481b9='';for(var _0x175d6c=0x0;_0x175d6c<_0x1f71af[_0xfaa6('0xd')][_0xfaa6('0x12')];_0x175d6c+=0x1){if(_0x1f71af[_0xfaa6('0xd')][_0x175d6c][_0xfaa6('0x8')]!==_0x34d857){if(!_[_0xfaa6('0x16')](_0x2481b9)){_0x2481b9+=',';}_0x2481b9+=_0x1f71af[_0xfaa6('0xd')][_0x175d6c][_0xfaa6('0xe')]||_0x1f71af[_0xfaa6('0xd')][_0x175d6c][_0xfaa6('0x8')]||'';_0x2481b9+='\x20<';_0x2481b9+=_0x1f71af[_0xfaa6('0xd')][_0x175d6c][_0xfaa6('0x8')]?_0x1f71af[_0xfaa6('0xd')][_0x175d6c][_0xfaa6('0x8')]:_0xfaa6('0x9')+random['generate'](0x6)+'@xcally.com';_0x2481b9+='>';}}return _0x2481b9;}function parseEmail(_0x300d67,_0xf7f497,_0x58fc97){if(_0xf7f497[_0xfaa6('0x17')]){var _0xf8bd63=/)<[^<]*)*<\/script>/gi;while(_0xf8bd63['test'](_0xf7f497[_0xfaa6('0x17')])){_0xf7f497['html']=_0xf7f497[_0xfaa6('0x17')]['replace'](_0xf8bd63,'');}if(_0xf7f497[_0xfaa6('0x17')][_0xfaa6('0x18')]('{_0x41e21c[_0xfaa6('0x1b')](_0x415863[_0xfaa6('0x1c')]);});var _0x21791b=/]+>/g;var _0x5c7932=/src="data:image\/([a-zA-Z]*);base64,([^"]*)"/g;var _0x322937=_0xf7f497[_0xfaa6('0x17')][_0xfaa6('0x1d')](_0x5c7932,_0xfaa6('0x1e'));var _0x2b897f=_0x322937['replace'](_0x21791b,'_IMG');for(let _0x1cdfff=0x0;_0x1cdfff<_0x41e21c[_0xfaa6('0x12')];_0x1cdfff++){var _0x20f50c=_0x2b897f[_0xfaa6('0x1d')](_0xfaa6('0x1f'),_0xfaa6('0x20')+_0x41e21c[_0x1cdfff]+_0xfaa6('0x21'));_0x2b897f=_0x20f50c;}_0xf7f497[_0xfaa6('0x17')]=_0x2b897f;}_0x58fc97[_0xfaa6('0x22')]=_0xf7f497[_0xfaa6('0x17')];}else{_0x58fc97[_0xfaa6('0x22')]=_0xf7f497[_0xfaa6('0x23')];}if(_0x58fc97[_0xfaa6('0x22')]){_0x58fc97[_0xfaa6('0x22')]=_0x58fc97[_0xfaa6('0x22')]['replace'](/0x0){var _0x1f2b5f=[_0xfaa6('0x37'),'X-Auto-Response-Suppress:\x20All','Precedence:\x20auto_reply'];for(var _0x55c0f3=0x0;_0x55c0f3<_0xf7f497[_0xfaa6('0x36')][_0xfaa6('0x12')];_0x55c0f3++){var _0x3f0297=_['indexOf'](_0x1f2b5f,_0xf7f497['headerLines'][_0x55c0f3][_0xfaa6('0x38')]);if(_0x3f0297>=0x0){_0x58fc97['isAutoreply']=!![];}}}return _0x58fc97;}exports[_0xfaa6('0x39')]=function(_0x3343c0,_0x1b68ec,_0xc595d2){var _0x5b7a11={'from':getAddress(_0x1b68ec['from']),'firstName':getFirstName(_0x1b68ec[_0xfaa6('0x3a')]),'lastName':getLastName(_0x1b68ec[_0xfaa6('0x3a')]),'mapKey':_0xfaa6('0x6'),'message':{'from':getMails(_0x3343c0[_0xfaa6('0x6')],_0x1b68ec[_0xfaa6('0x3a')]),'to':_0x3343c0[_0xfaa6('0x6')],'cc':'','subject':_0x1b68ec['subject']||'','messageId':_0x1b68ec[_0xfaa6('0x3b')],'inReplyTo':_0x1b68ec[_0xfaa6('0x3c')],'sentAt':moment(_0x1b68ec[_0xfaa6('0x3d')])['format'](_0xfaa6('0x3e')),'attach':![],'attachments':[]}};if(!_0x1b68ec[_0xfaa6('0x17')]&&!_0x1b68ec[_0xfaa6('0x23')]){var _0x216dbf=_[_0xfaa6('0x3f')](_0x1b68ec[_0xfaa6('0x19')],{'contentType':_0xfaa6('0x40')});if(_0x216dbf[_0xfaa6('0x12')]){logger[_0xfaa6('0x41')](util['format'](_0xfaa6('0x42'),_0x1b68ec[_0xfaa6('0x3b')]));tnef['parseBuffer'](_[_0xfaa6('0x43')](_0x216dbf)[_0xfaa6('0x34')],function(_0x418d01,_0x5d3dae){if(_0x5d3dae){_0x1b68ec[_0xfaa6('0x17')]=_0x5d3dae[_0xfaa6('0x44')]||'

Empty\x20message

';if(_0x5d3dae[_0xfaa6('0x45')]){for(var _0x35576b=0x0;_0x35576b<_0x5d3dae[_0xfaa6('0x45')][_0xfaa6('0x12')];_0x35576b++){var _0x313bed=_0x5d3dae[_0xfaa6('0x45')][_0x35576b];_0x5b7a11[_0xfaa6('0x26')][_0xfaa6('0x19')][_0xfaa6('0x1b')]({'filename':_0x313bed['Title'],'content':Buffer[_0xfaa6('0x3a')](_0x313bed[_0xfaa6('0x46')])});}}}_0xc595d2(parseEmail(_0x3343c0,_0x1b68ec,_0x5b7a11));});}else{_0x1b68ec['html']=_0xfaa6('0x47');_0xc595d2(parseEmail(_0x3343c0,_0x1b68ec,_0x5b7a11));}}else{_0xc595d2(parseEmail(_0x3343c0,_0x1b68ec,_0x5b7a11));}};exports['generateXOAuth2Token']=function(_0x3ee2ae,_0x4dd4db){var _0x5ee49e=[_0xfaa6('0x48')+(_0x4dd4db||''),_0xfaa6('0x49')+_0x3ee2ae,'',''];return Buffer[_0xfaa6('0x3a')](_0x5ee49e[_0xfaa6('0x30')](''),'utf-8')[_0xfaa6('0x4a')](_0xfaa6('0x4b'));}; \ No newline at end of file +var _0xa4c1=['../../../config/environment','head','value','address','anonymous','generate','name','indexOf','split','slice','join','Anonymous','length','pop','isEmpty','html','replace','includes','\x20[Attachment:\x20','\x20]','body','textAsHtml','originCc','message','originTo','attach','attachment','attachment-','format','now','server/files/attachments/','writeFileSync','content','push','headerLines','Auto-Submitted:\x20auto-replied','Precedence:\x20auto_reply','parser','from','subject','inReplyTo','YYYY-MM-DD\x20HH:mm:ss','info','Email\x20message\x20%s\x20is\x20in\x20TNEF\x20format:\x20message\x20content\x20will\x20be\x20converted\x20by\x20the\x20system','messageId','first','

Empty\x20message

','Attachments','Data','generateXOAuth2Token','user=','auth=Bearer\x20','toString','lodash','moment','randomstring','path','util','email'];(function(_0x537020,_0x123a01){var _0x3ffe5a=function(_0x3aec38){while(--_0x3aec38){_0x537020['push'](_0x537020['shift']());}};_0x3ffe5a(++_0x123a01);}(_0xa4c1,0x7a));var _0x1a4c=function(_0xc67528,_0x24e2fb){_0xc67528=_0xc67528-0x0;var _0x38e26d=_0xa4c1[_0xc67528];return _0x38e26d;};'use strict';var _=require(_0x1a4c('0x0'));var moment=require(_0x1a4c('0x1'));var random=require(_0x1a4c('0x2'));var fs=require('fs');var path=require(_0x1a4c('0x3'));var util=require(_0x1a4c('0x4'));var tnef=require('node-tnef');var logger=require('../../../config/logger')(_0x1a4c('0x5'));var config=require(_0x1a4c('0x6'));function getAddress(_0x4ec95d){var _0x3b090a=_[_0x1a4c('0x7')](_0x4ec95d[_0x1a4c('0x8')]);return _0x3b090a&&_0x3b090a[_0x1a4c('0x9')]?_0x3b090a[_0x1a4c('0x9')]:_0x1a4c('0xa')+random[_0x1a4c('0xb')](0x6)+'@xcally.com';}function getFirstName(_0x101a15){var _0x22362b=_['head'](_0x101a15['value']);if(_0x22362b&&_0x22362b[_0x1a4c('0xc')]){if(_0x22362b[_0x1a4c('0xc')]==_0x22362b[_0x1a4c('0x9')]){return _0x22362b[_0x1a4c('0xc')]['substring'](0x0,_0x22362b[_0x1a4c('0xc')][_0x1a4c('0xd')]('@'));}var _0x282281=_0x22362b['name'][_0x1a4c('0xe')](/\s+/);return _0x282281['length']>0x1?_0x282281[_0x1a4c('0xf')](0x0,-0x1)[_0x1a4c('0x10')]('\x20'):_0x22362b[_0x1a4c('0xc')];}return _0x1a4c('0x11');}function getLastName(_0x558b8a){var _0x2222cc=_[_0x1a4c('0x7')](_0x558b8a[_0x1a4c('0x8')]);if(_0x2222cc&&_0x2222cc[_0x1a4c('0xc')]){var _0x2b344e=_0x2222cc['name']['split'](/\s+/);return _0x2b344e[_0x1a4c('0x12')]>0x1?_0x2b344e[_0x1a4c('0x13')]():'';}return'';}function getMails(_0xdae54e,_0x1fbf77){var _0x1aa6a9='';for(var _0xc00a91=0x0;_0xc00a91<_0x1fbf77[_0x1a4c('0x8')][_0x1a4c('0x12')];_0xc00a91+=0x1){if(_0x1fbf77[_0x1a4c('0x8')][_0xc00a91][_0x1a4c('0x9')]!==_0xdae54e){if(!_[_0x1a4c('0x14')](_0x1aa6a9)){_0x1aa6a9+=',';}_0x1aa6a9+=_0x1fbf77[_0x1a4c('0x8')][_0xc00a91][_0x1a4c('0xc')]||_0x1fbf77[_0x1a4c('0x8')][_0xc00a91]['address']||'';_0x1aa6a9+='\x20<';_0x1aa6a9+=_0x1fbf77[_0x1a4c('0x8')][_0xc00a91][_0x1a4c('0x9')]?_0x1fbf77['value'][_0xc00a91][_0x1a4c('0x9')]:_0x1a4c('0xa')+random[_0x1a4c('0xb')](0x6)+'@xcally.com';_0x1aa6a9+='>';}}return _0x1aa6a9;}function parseEmail(_0x5e0d64,_0x1363cf,_0x38c0b4){if(_0x1363cf['html']){var _0x11d1df=/)<[^<]*)*<\/script>/gi;while(_0x11d1df['test'](_0x1363cf[_0x1a4c('0x15')])){_0x1363cf['html']=_0x1363cf['html'][_0x1a4c('0x16')](_0x11d1df,'');}if(_0x1363cf[_0x1a4c('0x15')][_0x1a4c('0x17')](_0x1a4c('0x18'))){var _0x3675a9=[];_0x1363cf[_0x1a4c('0x19')]['forEach'](_0x269b79=>{_0x3675a9['push'](_0x269b79[_0x1a4c('0x1a')]);});var _0x18e8e5=/]+>/g;var _0x3be2e6=/src="data:image\/([a-zA-Z]*);base64,([^"]*)"/g;var _0xce1589=_0x1363cf[_0x1a4c('0x15')][_0x1a4c('0x16')](_0x3be2e6,_0x1a4c('0x1b'));var _0x4c399d=_0xce1589[_0x1a4c('0x16')](_0x18e8e5,_0x1a4c('0x1c'));for(let _0x7172d1=0x0;_0x7172d1<_0x3675a9['length'];_0x7172d1++){var _0x5d83dd=_0x4c399d[_0x1a4c('0x16')](_0x1a4c('0x1c'),_0x1a4c('0x1d')+_0x3675a9[_0x7172d1]+_0x1a4c('0x1e'));_0x4c399d=_0x5d83dd;}_0x1363cf[_0x1a4c('0x15')]=_0x4c399d;}_0x38c0b4['body']=_0x1363cf['html'];}else{_0x38c0b4[_0x1a4c('0x1f')]=_0x1363cf[_0x1a4c('0x20')];}if(_0x38c0b4['body']){_0x38c0b4[_0x1a4c('0x1f')]=_0x38c0b4[_0x1a4c('0x1f')][_0x1a4c('0x16')](/0x0){var _0x48d32d=[_0x1a4c('0x2e'),'X-Auto-Response-Suppress:\x20All',_0x1a4c('0x2f')];for(var _0x461655=0x0;_0x461655<_0x1363cf[_0x1a4c('0x2d')][_0x1a4c('0x12')];_0x461655++){var _0x2e2b21=_[_0x1a4c('0xd')](_0x48d32d,_0x1363cf[_0x1a4c('0x2d')][_0x461655]['line']);if(_0x2e2b21>=0x0){_0x38c0b4['isAutoreply']=!![];}}}return _0x38c0b4;}exports[_0x1a4c('0x30')]=function(_0x5acca0,_0x36aa23,_0x17f399){var _0x44222f={'from':getAddress(_0x36aa23[_0x1a4c('0x31')]),'firstName':getFirstName(_0x36aa23[_0x1a4c('0x31')]),'lastName':getLastName(_0x36aa23[_0x1a4c('0x31')]),'mapKey':_0x1a4c('0x5'),'message':{'from':getMails(_0x5acca0['email'],_0x36aa23[_0x1a4c('0x31')]),'to':_0x5acca0[_0x1a4c('0x5')],'cc':'','subject':_0x36aa23[_0x1a4c('0x32')]||'','messageId':_0x36aa23['messageId'],'inReplyTo':_0x36aa23[_0x1a4c('0x33')],'sentAt':moment(_0x36aa23['date'])[_0x1a4c('0x27')](_0x1a4c('0x34')),'attach':![],'attachments':[]}};if(!_0x36aa23['html']&&!_0x36aa23[_0x1a4c('0x20')]){var _0x1b13af=_['filter'](_0x36aa23[_0x1a4c('0x19')],{'contentType':'application/ms-tnef'});if(_0x1b13af['length']){logger[_0x1a4c('0x35')](util[_0x1a4c('0x27')](_0x1a4c('0x36'),_0x36aa23[_0x1a4c('0x37')]));tnef['parseBuffer'](_[_0x1a4c('0x38')](_0x1b13af)[_0x1a4c('0x2b')],function(_0x1bffce,_0x1c1bcd){if(_0x1c1bcd){_0x36aa23[_0x1a4c('0x15')]=_0x1c1bcd['BodyHTML']||_0x1a4c('0x39');if(_0x1c1bcd['Attachments']){for(var _0x326054=0x0;_0x326054<_0x1c1bcd[_0x1a4c('0x3a')][_0x1a4c('0x12')];_0x326054++){var _0x50f0a4=_0x1c1bcd[_0x1a4c('0x3a')][_0x326054];_0x44222f[_0x1a4c('0x22')]['attachments'][_0x1a4c('0x2c')]({'filename':_0x50f0a4['Title'],'content':Buffer[_0x1a4c('0x31')](_0x50f0a4[_0x1a4c('0x3b')])});}}}_0x17f399(parseEmail(_0x5acca0,_0x36aa23,_0x44222f));});}else{_0x36aa23[_0x1a4c('0x15')]='

Empty\x20message

';_0x17f399(parseEmail(_0x5acca0,_0x36aa23,_0x44222f));}}else{_0x17f399(parseEmail(_0x5acca0,_0x36aa23,_0x44222f));}};exports[_0x1a4c('0x3c')]=function(_0x2e3954,_0x9b8232){var _0xfdae78=[_0x1a4c('0x3d')+(_0x9b8232||''),_0x1a4c('0x3e')+_0x2e3954,'',''];return Buffer[_0x1a4c('0x31')](_0xfdae78['join'](''),'utf-8')[_0x1a4c('0x3f')]('base64');}; \ No newline at end of file diff --git a/server/services/email/model/mailAccount.js b/server/services/email/model/mailAccount.js index 6512d0f..45db4f1 100644 --- a/server/services/email/model/mailAccount.js +++ b/server/services/email/model/mailAccount.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x7b89=['Imap','Smtp','exports','name','Service','key','SERV','active'];(function(_0x54a9e3,_0x4a3813){var _0x247cce=function(_0x50aa49){while(--_0x50aa49){_0x54a9e3['push'](_0x54a9e3['shift']());}};_0x247cce(++_0x4a3813);}(_0x7b89,0xc3));var _0x97b8=function(_0x16f4ef,_0x154da5){_0x16f4ef=_0x16f4ef-0x0;var _0x1cceec=_0x7b89[_0x16f4ef];return _0x1cceec;};'use strict';var _=require('lodash');function MailAccount(_0x3b7fbe){this['id']=_0x3b7fbe['id']||0x0;this[_0x97b8('0x0')]=_0x3b7fbe[_0x97b8('0x0')]||_0x97b8('0x1');this['key']=_0x3b7fbe[_0x97b8('0x2')]||_0x97b8('0x3');this[_0x97b8('0x4')]=_0x3b7fbe[_0x97b8('0x4')]||![];this[_0x97b8('0x5')]=_0x3b7fbe['Imap']||[];this[_0x97b8('0x6')]=_0x3b7fbe[_0x97b8('0x6')]||[];}module[_0x97b8('0x7')]=MailAccount; \ No newline at end of file +var _0xa480=['name','Service','key','SERV','active','Imap','Smtp','exports'];(function(_0x195792,_0x4d6602){var _0x27ecea=function(_0x321d55){while(--_0x321d55){_0x195792['push'](_0x195792['shift']());}};_0x27ecea(++_0x4d6602);}(_0xa480,0x198));var _0x0a48=function(_0x4565bf,_0x5ad9d6){_0x4565bf=_0x4565bf-0x0;var _0x5610ba=_0xa480[_0x4565bf];return _0x5610ba;};'use strict';var _=require('lodash');function MailAccount(_0x16747a){this['id']=_0x16747a['id']||0x0;this['name']=_0x16747a[_0x0a48('0x0')]||_0x0a48('0x1');this['key']=_0x16747a[_0x0a48('0x2')]||_0x0a48('0x3');this['active']=_0x16747a[_0x0a48('0x4')]||![];this[_0x0a48('0x5')]=_0x16747a['Imap']||[];this[_0x0a48('0x6')]=_0x16747a[_0x0a48('0x6')]||[];}module[_0x0a48('0x7')]=MailAccount; \ No newline at end of file diff --git a/server/services/email/realtime/index.js b/server/services/email/realtime/index.js index 4ee8258..b195c77 100644 --- a/server/services/email/realtime/index.js +++ b/server/services/email/realtime/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x9599=['merge','lodash','mapKeys','hasOwnProperty','prototype','mergeFromDatabase','initMailAccounts','mailAccounts','isUndefined'];(function(_0x790e57,_0x773a93){var _0x4544e9=function(_0xd13095){while(--_0xd13095){_0x790e57['push'](_0x790e57['shift']());}};_0x4544e9(++_0x773a93);}(_0x9599,0x1e7));var _0x9959=function(_0x146beb,_0x57b1f4){_0x146beb=_0x146beb-0x0;var _0x404c81=_0x9599[_0x146beb];return _0x404c81;};'use strict';var _=require(_0x9959('0x0'));var MailAccount=require('../model/mailAccount');var Realtime=function(){this['mailAccounts']={};};function freeIsNotKey(_0x3a3480,_0x20549b,_0x1d8d54){var _0x57a794=_[_0x9959('0x1')](_0x3a3480,function(_0x58aac9,_0x3d26f8){return _0x58aac9[_0x1d8d54];});for(var _0x5c7a7c in _0x20549b){if(_0x20549b[_0x9959('0x2')](_0x5c7a7c)){if(!_0x57a794[_0x5c7a7c]){delete _0x20549b[_0x5c7a7c];}}}}Realtime[_0x9959('0x3')][_0x9959('0x4')]=function(_0xefe2cf,_0x49f601){for(var _0x1edb9f in _0x49f601){if(_0xefe2cf[_0x9959('0x2')](_0x1edb9f)){_0xefe2cf[_0x1edb9f]=_0x49f601[_0x1edb9f];}}};Realtime[_0x9959('0x3')][_0x9959('0x5')]=function(){var _0x46d4ea=this;return function(_0x53927c){if(_0x53927c){freeIsNotKey(_0x53927c,_0x46d4ea[_0x9959('0x6')],'id');for(var _0x4e7de4=0x0,_0x1c5302={},_0x2e26c0={};_0x4e7de4<_0x53927c['length'];_0x4e7de4+=0x1){_0x1c5302=_0x53927c[_0x4e7de4];if(_[_0x9959('0x7')](_0x46d4ea['mailAccounts'][_0x1c5302['id']])){_0x46d4ea[_0x9959('0x6')][_0x1c5302['id']]=new MailAccount(_0x1c5302);}else{_[_0x9959('0x8')](_0x46d4ea[_0x9959('0x6')][_0x1c5302['id']],_0x1c5302);}}}return _0x46d4ea[_0x9959('0x6')];};};module['exports']=Realtime; \ No newline at end of file +var _0x1bc2=['exports','lodash','mapKeys','hasOwnProperty','prototype','mergeFromDatabase','initMailAccounts','mailAccounts','length','isUndefined','merge'];(function(_0x599f41,_0x4db732){var _0x2e4d58=function(_0x14c882){while(--_0x14c882){_0x599f41['push'](_0x599f41['shift']());}};_0x2e4d58(++_0x4db732);}(_0x1bc2,0xa6));var _0x21bc=function(_0x27ccde,_0x487264){_0x27ccde=_0x27ccde-0x0;var _0xb03fcb=_0x1bc2[_0x27ccde];return _0xb03fcb;};'use strict';var _=require(_0x21bc('0x0'));var MailAccount=require('../model/mailAccount');var Realtime=function(){this['mailAccounts']={};};function freeIsNotKey(_0x452192,_0xd7f455,_0x230c93){var _0x40a2d5=_[_0x21bc('0x1')](_0x452192,function(_0x1f5a5b,_0x33aadc){return _0x1f5a5b[_0x230c93];});for(var _0x3a566e in _0xd7f455){if(_0xd7f455[_0x21bc('0x2')](_0x3a566e)){if(!_0x40a2d5[_0x3a566e]){delete _0xd7f455[_0x3a566e];}}}}Realtime[_0x21bc('0x3')][_0x21bc('0x4')]=function(_0x30dcd3,_0x5736a8){for(var _0xaade29 in _0x5736a8){if(_0x30dcd3[_0x21bc('0x2')](_0xaade29)){_0x30dcd3[_0xaade29]=_0x5736a8[_0xaade29];}}};Realtime[_0x21bc('0x3')][_0x21bc('0x5')]=function(){var _0x5b762e=this;return function(_0xd69938){if(_0xd69938){freeIsNotKey(_0xd69938,_0x5b762e[_0x21bc('0x6')],'id');for(var _0x198e3d=0x0,_0x17baa4={},_0x179169={};_0x198e3d<_0xd69938[_0x21bc('0x7')];_0x198e3d+=0x1){_0x17baa4=_0xd69938[_0x198e3d];if(_[_0x21bc('0x8')](_0x5b762e[_0x21bc('0x6')][_0x17baa4['id']])){_0x5b762e[_0x21bc('0x6')][_0x17baa4['id']]=new MailAccount(_0x17baa4);}else{_[_0x21bc('0x9')](_0x5b762e[_0x21bc('0x6')][_0x17baa4['id']],_0x17baa4);}}}return _0x5b762e[_0x21bc('0x6')];};};module[_0x21bc('0xa')]=Realtime; \ No newline at end of file diff --git a/server/services/email/rpc/mailAccount.js b/server/services/email/rpc/mailAccount.js index 60dc047..1fe3902 100644 --- a/server/services/email/rpc/mailAccount.js +++ b/server/services/email/rpc/mailAccount.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xb194=['TemplateId','Imap','type','MailServerOut','CloudProvider','data5','getMailAccount','notify','NotifyMailAccount','../client','Request','GetMailAccount','name','provider','service','active','key'];(function(_0x3929a2,_0x382fe2){var _0x224e7b=function(_0x30f189){while(--_0x30f189){_0x3929a2['push'](_0x3929a2['shift']());}};_0x224e7b(++_0x382fe2);}(_0xb194,0x1b2));var _0x4b19=function(_0x28daca,_0x1cc58a){_0x28daca=_0x28daca-0x0;var _0xa66c8e=_0xb194[_0x28daca];return _0xa66c8e;};'use strict';var client=require(_0x4b19('0x0'));exports['getMailAccounts']=function(){return function(){return client[_0x4b19('0x1')](_0x4b19('0x2'),{'options':{'attributes':['id',_0x4b19('0x3'),_0x4b19('0x4'),_0x4b19('0x5'),'email',_0x4b19('0x6'),_0x4b19('0x7'),'ListId',_0x4b19('0x8')],'raw':![],'include':[{'model':'MailServerIn','as':_0x4b19('0x9'),'include':[{'model':'CloudProvider','attributes':['id',_0x4b19('0x3'),_0x4b19('0x5'),_0x4b19('0xa'),'data5'],'as':'CloudProvider'}]},{'model':_0x4b19('0xb'),'as':'Smtp','include':[{'model':_0x4b19('0xc'),'attributes':['id',_0x4b19('0x3'),_0x4b19('0x5'),_0x4b19('0xa'),_0x4b19('0xd')],'as':_0x4b19('0xc')}]}]},'log':_0x4b19('0xe')});};};exports[_0x4b19('0xf')]=function(_0x4e37af,_0xbcfb9d){return client['Request'](_0x4b19('0x10'),{'account':{'id':_0x4e37af},'body':_0xbcfb9d,'log':_0x4b19('0x10')});}; \ No newline at end of file +var _0x282a=['getMailAccounts','Request','GetMailAccount','name','provider','email','active','ListId','MailServerIn','CloudProvider','service','data5','MailServerOut','Smtp','type','getMailAccount','notify','NotifyMailAccount'];(function(_0x18a79d,_0x57bd2c){var _0x4f8848=function(_0x28af80){while(--_0x28af80){_0x18a79d['push'](_0x18a79d['shift']());}};_0x4f8848(++_0x57bd2c);}(_0x282a,0xa2));var _0xa282=function(_0x173441,_0x26b0d9){_0x173441=_0x173441-0x0;var _0x2423a8=_0x282a[_0x173441];return _0x2423a8;};'use strict';var client=require('../client');exports[_0xa282('0x0')]=function(){return function(){return client[_0xa282('0x1')](_0xa282('0x2'),{'options':{'attributes':['id',_0xa282('0x3'),_0xa282('0x4'),'service',_0xa282('0x5'),_0xa282('0x6'),'key',_0xa282('0x7'),'TemplateId'],'raw':![],'include':[{'model':_0xa282('0x8'),'as':'Imap','include':[{'model':_0xa282('0x9'),'attributes':['id',_0xa282('0x3'),_0xa282('0xa'),'type',_0xa282('0xb')],'as':'CloudProvider'}]},{'model':_0xa282('0xc'),'as':_0xa282('0xd'),'include':[{'model':_0xa282('0x9'),'attributes':['id',_0xa282('0x3'),_0xa282('0xa'),_0xa282('0xe'),_0xa282('0xb')],'as':_0xa282('0x9')}]}]},'log':_0xa282('0xf')});};};exports[_0xa282('0x10')]=function(_0x2e1e55,_0x168fed){return client[_0xa282('0x1')](_0xa282('0x11'),{'account':{'id':_0x2e1e55},'body':_0x168fed,'log':_0xa282('0x11')});}; \ No newline at end of file diff --git a/server/services/email/rpc/setting.js b/server/services/email/rpc/setting.js index 43dba3c..d182ae9 100644 --- a/server/services/email/rpc/setting.js +++ b/server/services/email/rpc/setting.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x337d=['Request','loginMailFrequency','GetSettings','getSettings'];(function(_0x2fb378,_0x30e4db){var _0xd8b9a7=function(_0x558000){while(--_0x558000){_0x2fb378['push'](_0x2fb378['shift']());}};_0xd8b9a7(++_0x30e4db);}(_0x337d,0x97));var _0xd337=function(_0x432682,_0x253044){_0x432682=_0x432682-0x0;var _0x463d05=_0x337d[_0x432682];return _0x463d05;};'use strict';var client=require('../client');exports[_0xd337('0x0')]=function(){return client[_0xd337('0x1')]('ShowSetting',{'options':{'raw':!![],'where':{'id':0x1},'attributes':[_0xd337('0x2')]},'log':_0xd337('0x3')});}; \ No newline at end of file +var _0xb911=['ShowSetting','loginMailFrequency','GetSettings','../client','getSettings','Request'];(function(_0xe01c25,_0x544a11){var _0x4ae4db=function(_0x18267a){while(--_0x18267a){_0xe01c25['push'](_0xe01c25['shift']());}};_0x4ae4db(++_0x544a11);}(_0xb911,0x13b));var _0x1b91=function(_0x459dc6,_0x38026f){_0x459dc6=_0x459dc6-0x0;var _0xf3f2a0=_0xb911[_0x459dc6];return _0xf3f2a0;};'use strict';var client=require(_0x1b91('0x0'));exports[_0x1b91('0x1')]=function(){return client[_0x1b91('0x2')](_0x1b91('0x3'),{'options':{'raw':!![],'where':{'id':0x1},'attributes':[_0x1b91('0x4')]},'log':_0x1b91('0x5')});}; \ No newline at end of file diff --git a/server/services/email/server/index.js b/server/services/email/server/index.js index df807c0..ac74718 100644 --- a/server/services/email/server/index.js +++ b/server/services/email/server/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xa9e0=['catch','values','mailAccounts','length','Imap','password','Smtp','pass','server','http','stringify','127.0.0.1','log','Email\x20RPC\x20server\x20listening\x20on\x20127.0.0.1:%d!','RPC\x20listening\x20on\x20port:','jayson/promise','bluebird','lodash','listen','sendMail','then','error','Verified'];(function(_0x59ee6f,_0x450239){var _0x4c0979=function(_0x565e92){while(--_0x565e92){_0x59ee6f['push'](_0x59ee6f['shift']());}};_0x4c0979(++_0x450239);}(_0xa9e0,0x123));var _0x0a9e=function(_0x3899d1,_0x4aa04c){_0x3899d1=_0x3899d1-0x0;var _0xeb4a7d=_0xa9e0[_0x3899d1];return _0xeb4a7d;};'use strict';var jayson=require(_0x0a9e('0x0'));var BPromise=require(_0x0a9e('0x1'));var _=require(_0x0a9e('0x2'));var logger=require('../../../config/logger')('email');exports[_0x0a9e('0x3')]=function(_0x4ce2f1,_0x333808){return new BPromise(function(_0x432180,_0x2ab90b){var _0x991246={'SendMail':function(_0x981158){var _0x57b080=this;return new Promise(function(_0x219af0,_0x441e3a){_0x333808[_0x0a9e('0x4')](_0x981158['account'],_0x981158['message'])[_0x0a9e('0x5')](function(_0x56465b){_0x219af0({'code':0xc8,'message':_0x56465b});})['catch'](function(_0x39753a){_0x441e3a(_0x57b080[_0x0a9e('0x6')](0x1f4,_0x39753a));});});},'VerifySmtp':function(_0x307b3e){var _0x3ab53f=this;return new Promise(function(_0xfeb75b,_0xbd1168){_0x333808['verifySmtp'](_0x307b3e['account'])['then'](function(_0x4cfe67){_0xfeb75b({'code':0xc8,'message':_0x0a9e('0x7')});})[_0x0a9e('0x8')](function(_0xd5b662){_0xbd1168(_0x3ab53f[_0x0a9e('0x6')](0x1f4,_0xd5b662));});});},'MailAccounts':function(_0x32d742){return new Promise(function(_0x69aeb7,_0x5db4b0){var _0x4283ce=_[_0x0a9e('0x9')](_0x4ce2f1[_0x0a9e('0xa')]);for(var _0x281129=0x0;_0x281129<_0x4283ce[_0x0a9e('0xb')];_0x281129+=0x1){if(_0x4283ce[_0x281129][_0x0a9e('0xc')]&&_0x4283ce[_0x281129]['Imap'][_0x0a9e('0xd')]){delete _0x4283ce[_0x281129]['Imap'][_0x0a9e('0xd')];}if(_0x4283ce[_0x281129]['Smtp']&&_0x4283ce[_0x281129][_0x0a9e('0xe')][_0x0a9e('0xf')]){delete _0x4283ce[_0x281129]['Smtp'][_0x0a9e('0xf')];}}_0x69aeb7({'count':_0x4283ce['length'],'rows':_0x4283ce});});}};var _0x459eb1=jayson[_0x0a9e('0x10')](_0x991246)[_0x0a9e('0x11')]();_0x459eb1['on'](_0x0a9e('0x6'),function(_0x31b1ca){logger[_0x0a9e('0x6')](JSON[_0x0a9e('0x12')](_0x31b1ca));return _0x2ab90b(_0x31b1ca);});_0x459eb1[_0x0a9e('0x3')](0x232b,_0x0a9e('0x13'),function(){console[_0x0a9e('0x14')](_0x0a9e('0x15'),0x232b);return _0x432180(_0x0a9e('0x16')+0x232b);});});}; \ No newline at end of file +var _0xa9e0=['catch','values','mailAccounts','length','Imap','password','Smtp','pass','server','http','stringify','127.0.0.1','log','Email\x20RPC\x20server\x20listening\x20on\x20127.0.0.1:%d!','RPC\x20listening\x20on\x20port:','jayson/promise','bluebird','lodash','listen','sendMail','then','error','Verified'];(function(_0x4565bf,_0x5ad9d6){var _0x5610ba=function(_0x170988){while(--_0x170988){_0x4565bf['push'](_0x4565bf['shift']());}};_0x5610ba(++_0x5ad9d6);}(_0xa9e0,0x123));var _0x0a9e=function(_0x24237f,_0x4cf32c){_0x24237f=_0x24237f-0x0;var _0x48298e=_0xa9e0[_0x24237f];return _0x48298e;};'use strict';var jayson=require(_0x0a9e('0x0'));var BPromise=require(_0x0a9e('0x1'));var _=require(_0x0a9e('0x2'));var logger=require('../../../config/logger')('email');exports[_0x0a9e('0x3')]=function(_0x4ce2f1,_0x333808){return new BPromise(function(_0x432180,_0x2ab90b){var _0x991246={'SendMail':function(_0x981158){var _0x57b080=this;return new Promise(function(_0x219af0,_0x441e3a){_0x333808[_0x0a9e('0x4')](_0x981158['account'],_0x981158['message'])[_0x0a9e('0x5')](function(_0x56465b){_0x219af0({'code':0xc8,'message':_0x56465b});})['catch'](function(_0x39753a){_0x441e3a(_0x57b080[_0x0a9e('0x6')](0x1f4,_0x39753a));});});},'VerifySmtp':function(_0x307b3e){var _0x3ab53f=this;return new Promise(function(_0xfeb75b,_0xbd1168){_0x333808['verifySmtp'](_0x307b3e['account'])['then'](function(_0x4cfe67){_0xfeb75b({'code':0xc8,'message':_0x0a9e('0x7')});})[_0x0a9e('0x8')](function(_0xd5b662){_0xbd1168(_0x3ab53f[_0x0a9e('0x6')](0x1f4,_0xd5b662));});});},'MailAccounts':function(_0x32d742){return new Promise(function(_0x69aeb7,_0x5db4b0){var _0x4283ce=_[_0x0a9e('0x9')](_0x4ce2f1[_0x0a9e('0xa')]);for(var _0x281129=0x0;_0x281129<_0x4283ce[_0x0a9e('0xb')];_0x281129+=0x1){if(_0x4283ce[_0x281129][_0x0a9e('0xc')]&&_0x4283ce[_0x281129]['Imap'][_0x0a9e('0xd')]){delete _0x4283ce[_0x281129]['Imap'][_0x0a9e('0xd')];}if(_0x4283ce[_0x281129]['Smtp']&&_0x4283ce[_0x281129][_0x0a9e('0xe')][_0x0a9e('0xf')]){delete _0x4283ce[_0x281129]['Smtp'][_0x0a9e('0xf')];}}_0x69aeb7({'count':_0x4283ce['length'],'rows':_0x4283ce});});}};var _0x459eb1=jayson[_0x0a9e('0x10')](_0x991246)[_0x0a9e('0x11')]();_0x459eb1['on'](_0x0a9e('0x6'),function(_0x31b1ca){logger[_0x0a9e('0x6')](JSON[_0x0a9e('0x12')](_0x31b1ca));return _0x2ab90b(_0x31b1ca);});_0x459eb1[_0x0a9e('0x3')](0x232b,_0x0a9e('0x13'),function(){console[_0x0a9e('0x14')](_0x0a9e('0x15'),0x232b);return _0x432180(_0x0a9e('0x16')+0x232b);});});}; \ No newline at end of file diff --git a/server/services/express/index.js b/server/services/express/index.js index 6b04a89..61aed19 100644 --- a/server/services/express/index.js +++ b/server/services/express/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x7aa9=['timeout','port','redis','defaults','localhost','adapter','../../config/triggers','../../config/socketio','default','../../config/express','once','listening','log','Express\x20server\x20listening\x20on\x20port\x20%d!','exports','lodash','http','express','sticky-session','ioredis','../../config/environment'];(function(_0x36c6eb,_0x4fb127){var _0x30675b=function(_0x3a788b){while(--_0x3a788b){_0x36c6eb['push'](_0x36c6eb['shift']());}};_0x30675b(++_0x4fb127);}(_0x7aa9,0x8d));var _0x97aa=function(_0x294726,_0x5db9e9){_0x294726=_0x294726-0x0;var _0x39e2e3=_0x7aa9[_0x294726];return _0x39e2e3;};'use strict';var _=require(_0x97aa('0x0'));var http=require(_0x97aa('0x1'));var express=require(_0x97aa('0x2'));var sticky=require(_0x97aa('0x3'));var Redis=require(_0x97aa('0x4'));var config=require(_0x97aa('0x5'));var app=express();var server=http['createServer'](app);server[_0x97aa('0x6')]=0xdbba0;if(sticky['listen'](server,config[_0x97aa('0x7')])){var socketio=require('socket.io')(server,{'transports':['websocket','polling']});config[_0x97aa('0x8')]=_[_0x97aa('0x9')](config[_0x97aa('0x8')],{'host':_0x97aa('0xa'),'port':0x18eb});socketio[_0x97aa('0xb')](require('socket.io-redis')({'pubClient':new Redis(config[_0x97aa('0x8')]),'subClient':new Redis(config['redis'])}));require(_0x97aa('0xc'))['default']();require(_0x97aa('0xd'))[_0x97aa('0xe')](socketio);require(_0x97aa('0xf'))[_0x97aa('0xe')](app);require('../../routes')[_0x97aa('0xe')](app);}else{server[_0x97aa('0x10')](_0x97aa('0x11'),function(){console[_0x97aa('0x12')](_0x97aa('0x13'),config[_0x97aa('0x7')]);});}exports=module[_0x97aa('0x14')]=app; \ No newline at end of file +var _0x6094=['ioredis','../../config/environment','createServer','timeout','listen','port','redis','defaults','localhost','adapter','../../config/triggers','default','../../routes','once','listening','log','Express\x20server\x20listening\x20on\x20port\x20%d!','exports','lodash','http','express'];(function(_0xb41943,_0x3e36bd){var _0x367e50=function(_0x21de12){while(--_0x21de12){_0xb41943['push'](_0xb41943['shift']());}};_0x367e50(++_0x3e36bd);}(_0x6094,0x1b6));var _0x4609=function(_0x29d44d,_0x3528b8){_0x29d44d=_0x29d44d-0x0;var _0x28480d=_0x6094[_0x29d44d];return _0x28480d;};'use strict';var _=require(_0x4609('0x0'));var http=require(_0x4609('0x1'));var express=require(_0x4609('0x2'));var sticky=require('sticky-session');var Redis=require(_0x4609('0x3'));var config=require(_0x4609('0x4'));var app=express();var server=http[_0x4609('0x5')](app);server[_0x4609('0x6')]=0xdbba0;if(sticky[_0x4609('0x7')](server,config[_0x4609('0x8')])){var socketio=require('socket.io')(server,{'transports':['websocket','polling']});config[_0x4609('0x9')]=_[_0x4609('0xa')](config[_0x4609('0x9')],{'host':_0x4609('0xb'),'port':0x18eb});socketio[_0x4609('0xc')](require('socket.io-redis')({'pubClient':new Redis(config[_0x4609('0x9')]),'subClient':new Redis(config[_0x4609('0x9')])}));require(_0x4609('0xd'))[_0x4609('0xe')]();require('../../config/socketio')[_0x4609('0xe')](socketio);require('../../config/express')[_0x4609('0xe')](app);require(_0x4609('0xf'))[_0x4609('0xe')](app);}else{server[_0x4609('0x10')](_0x4609('0x11'),function(){console[_0x4609('0x12')](_0x4609('0x13'),config['port']);});}exports=module[_0x4609('0x14')]=app; \ No newline at end of file diff --git a/server/services/routing/client.js b/server/services/routing/client.js index 9ffd550..043f4e4 100644 --- a/server/services/routing/client.js +++ b/server/services/routing/client.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x618b=['catch','exports','jayson/promise','../../config/logger','Request','request','debug','rpc','routing','error','message','result'];(function(_0x5cd13b,_0xb18ddf){var _0xb3444a=function(_0x3005ee){while(--_0x3005ee){_0x5cd13b['push'](_0x5cd13b['shift']());}};_0xb3444a(++_0xb18ddf);}(_0x618b,0x12e));var _0xb618=function(_0x535731,_0x3bbe17){_0x535731=_0x535731-0x0;var _0x3ae590=_0x618b[_0x535731];return _0x3ae590;};'use strict';var jayson=require(_0xb618('0x0'));var BPromise=require('bluebird');var logger=require(_0xb618('0x1'))('routing');var client=jayson['client']['http']({'port':0x2329});client[_0xb618('0x2')]=function(_0x7a87ac,_0x58ead0){return new BPromise(function(_0x2139c9,_0x38cbc8){return client[_0xb618('0x3')](_0x7a87ac,_0x58ead0)['then'](function(_0x4a790){logger[_0xb618('0x4')](_0xb618('0x5'),_0xb618('0x6'),_0x7a87ac,_0x58ead0,_0x4a790);if(_0x4a790['error']){logger[_0xb618('0x7')](_0xb618('0x5'),_0xb618('0x6'),_0x7a87ac,_0x4a790[_0xb618('0x7')][_0xb618('0x8')],_0x58ead0);return _0x38cbc8(_0x4a790[_0xb618('0x7')][_0xb618('0x8')]);}else{return _0x2139c9(_0x4a790[_0xb618('0x9')]);}})[_0xb618('0xa')](function(_0x30d3ff){logger[_0xb618('0x7')](_0xb618('0x5'),_0xb618('0x6'),_0x7a87ac,_0x30d3ff,_0x58ead0);return _0x38cbc8(_0x30d3ff);});});};module[_0xb618('0xb')]=client; \ No newline at end of file +var _0x3d86=['error','message','exports','jayson/promise','bluebird','../../config/logger','routing','client','http','Request','request','then','debug','rpc'];(function(_0x2b2033,_0x3e00c5){var _0x3e50e3=function(_0xe577bf){while(--_0xe577bf){_0x2b2033['push'](_0x2b2033['shift']());}};_0x3e50e3(++_0x3e00c5);}(_0x3d86,0x161));var _0x63d8=function(_0x28b5d1,_0x19b1d2){_0x28b5d1=_0x28b5d1-0x0;var _0x3e1a41=_0x3d86[_0x28b5d1];return _0x3e1a41;};'use strict';var jayson=require(_0x63d8('0x0'));var BPromise=require(_0x63d8('0x1'));var logger=require(_0x63d8('0x2'))(_0x63d8('0x3'));var client=jayson[_0x63d8('0x4')][_0x63d8('0x5')]({'port':0x2329});client[_0x63d8('0x6')]=function(_0x2b561c,_0x56c175){return new BPromise(function(_0x1ed084,_0x38f48e){return client[_0x63d8('0x7')](_0x2b561c,_0x56c175)[_0x63d8('0x8')](function(_0x443a94){logger[_0x63d8('0x9')](_0x63d8('0xa'),_0x63d8('0x3'),_0x2b561c,_0x56c175,_0x443a94);if(_0x443a94['error']){logger[_0x63d8('0xb')]('rpc',_0x63d8('0x3'),_0x2b561c,_0x443a94[_0x63d8('0xb')][_0x63d8('0xc')],_0x56c175);return _0x38f48e(_0x443a94['error'][_0x63d8('0xc')]);}else{return _0x1ed084(_0x443a94['result']);}})['catch'](function(_0x1c712e){logger[_0x63d8('0xb')](_0x63d8('0xa'),'routing',_0x2b561c,_0x1c712e,_0x56c175);return _0x38f48e(_0x1c712e);});});};module[_0x63d8('0xd')]=client; \ No newline at end of file diff --git a/server/services/routing/index.js b/server/services/routing/index.js index 18c5836..91aa340 100644 --- a/server/services/routing/index.js +++ b/server/services/routing/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x9acc=['getSmsQueues','initSmsQueues','getMailQueues','initMailQueues','getFaxQueues','initFaxQueues','getWhatsappQueues','initWhatsappQueues','listen','catch','log','bluebird','./realtime','./rpc/user','./rpc/interval','./rpc/openchannelQueue','./rpc/chatQueue','./rpc/smsQueue','./rpc/faxQueue','./rpc/whatsappQueue','getAgents','then','initAgents','getIntervals','initIntervals','getOpenchannelQueues','getChatQueues','initChatQueues'];(function(_0x46352f,_0xdf0ce1){var _0x3721eb=function(_0xe08c29){while(--_0xe08c29){_0x46352f['push'](_0x46352f['shift']());}};_0x3721eb(++_0xdf0ce1);}(_0x9acc,0xb3));var _0xc9ac=function(_0xaf45e4,_0x2d5ff1){_0xaf45e4=_0xaf45e4-0x0;var _0x167947=_0x9acc[_0xaf45e4];return _0x167947;};'use strict';var BPromise=require(_0xc9ac('0x0'));var server=require('./server');var Realtime=require(_0xc9ac('0x1'));var user=require(_0xc9ac('0x2'));var interval=require(_0xc9ac('0x3'));var openchannelQueue=require(_0xc9ac('0x4'));var chatQueue=require(_0xc9ac('0x5'));var smsQueue=require(_0xc9ac('0x6'));var mailQueue=require('./rpc/mailQueue');var faxQueue=require(_0xc9ac('0x7'));var whatsappQueue=require(_0xc9ac('0x8'));var realtime=new Realtime();function initRealtime(){return BPromise['resolve']()['then'](user[_0xc9ac('0x9')]())[_0xc9ac('0xa')](realtime[_0xc9ac('0xb')]())['then'](interval[_0xc9ac('0xc')]())[_0xc9ac('0xa')](realtime[_0xc9ac('0xd')]())['then'](openchannelQueue[_0xc9ac('0xe')]())[_0xc9ac('0xa')](realtime['initOpenchannelQueues']())['then'](chatQueue[_0xc9ac('0xf')]())[_0xc9ac('0xa')](realtime[_0xc9ac('0x10')]())['then'](smsQueue[_0xc9ac('0x11')]())['then'](realtime[_0xc9ac('0x12')]())['then'](mailQueue[_0xc9ac('0x13')]())[_0xc9ac('0xa')](realtime[_0xc9ac('0x14')]())[_0xc9ac('0xa')](faxQueue[_0xc9ac('0x15')]())[_0xc9ac('0xa')](realtime[_0xc9ac('0x16')]())[_0xc9ac('0xa')](whatsappQueue[_0xc9ac('0x17')]())[_0xc9ac('0xa')](realtime[_0xc9ac('0x18')]())['then'](function(){return realtime;});}function main(){return server[_0xc9ac('0x19')](realtime)[_0xc9ac('0xa')](function(_0x545cce){return initRealtime();})[_0xc9ac('0xa')](function(_0x30cab8){return setInterval(initRealtime,0x1388);})[_0xc9ac('0x1a')](function(_0x3378e8){console[_0xc9ac('0x1b')](_0x3378e8);});}main(); \ No newline at end of file +var _0xe18e=['initWhatsappQueues','listen','catch','log','./server','./rpc/interval','./rpc/openchannelQueue','./rpc/chatQueue','./rpc/smsQueue','./rpc/faxQueue','./rpc/whatsappQueue','resolve','then','initAgents','getIntervals','getOpenchannelQueues','initOpenchannelQueues','getChatQueues','initChatQueues','getSmsQueues','initSmsQueues','getMailQueues','initMailQueues','getFaxQueues','initFaxQueues'];(function(_0x5780fa,_0x4c07ff){var _0x5db1a3=function(_0x2a62ef){while(--_0x2a62ef){_0x5780fa['push'](_0x5780fa['shift']());}};_0x5db1a3(++_0x4c07ff);}(_0xe18e,0x1c6));var _0xee18=function(_0x3571c0,_0x3c61cb){_0x3571c0=_0x3571c0-0x0;var _0x2adddb=_0xe18e[_0x3571c0];return _0x2adddb;};'use strict';var BPromise=require('bluebird');var server=require(_0xee18('0x0'));var Realtime=require('./realtime');var user=require('./rpc/user');var interval=require(_0xee18('0x1'));var openchannelQueue=require(_0xee18('0x2'));var chatQueue=require(_0xee18('0x3'));var smsQueue=require(_0xee18('0x4'));var mailQueue=require('./rpc/mailQueue');var faxQueue=require(_0xee18('0x5'));var whatsappQueue=require(_0xee18('0x6'));var realtime=new Realtime();function initRealtime(){return BPromise[_0xee18('0x7')]()[_0xee18('0x8')](user['getAgents']())[_0xee18('0x8')](realtime[_0xee18('0x9')]())['then'](interval[_0xee18('0xa')]())['then'](realtime['initIntervals']())[_0xee18('0x8')](openchannelQueue[_0xee18('0xb')]())[_0xee18('0x8')](realtime[_0xee18('0xc')]())['then'](chatQueue[_0xee18('0xd')]())[_0xee18('0x8')](realtime[_0xee18('0xe')]())['then'](smsQueue[_0xee18('0xf')]())[_0xee18('0x8')](realtime[_0xee18('0x10')]())['then'](mailQueue[_0xee18('0x11')]())[_0xee18('0x8')](realtime[_0xee18('0x12')]())[_0xee18('0x8')](faxQueue[_0xee18('0x13')]())[_0xee18('0x8')](realtime[_0xee18('0x14')]())[_0xee18('0x8')](whatsappQueue['getWhatsappQueues']())['then'](realtime[_0xee18('0x15')]())[_0xee18('0x8')](function(){return realtime;});}function main(){return server[_0xee18('0x16')](realtime)[_0xee18('0x8')](function(_0x49aba9){return initRealtime();})[_0xee18('0x8')](function(_0x307f3d){return setInterval(initRealtime,0x1388);})[_0xee18('0x17')](function(_0x41c609){console[_0xee18('0x18')](_0x41c609);});}main(); \ No newline at end of file diff --git a/server/services/routing/lib/rule-engine.js b/server/services/routing/lib/rule-engine.js index 87260f9..8e92267 100644 --- a/server/services/routing/lib/rule-engine.js +++ b/server/services/routing/lib/rule-engine.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x7a54=['turn','prioritize','priority','toJSON','map','toString','fromJSON','isString','object','exports','lodash','util','events','isNil','register','ignoreFactChanges','inherits','init','rules','activeRules','concat','prototype','sync','filter','orderBy','asc','execute','clone','consequence','ruleRef','name','index_','nextTick','push','call','isEqual','restart','length','condition','matchPath','noop','findRules'];(function(_0x3fbbdf,_0x168c77){var _0x5677df=function(_0x5110ab){while(--_0x5110ab){_0x3fbbdf['push'](_0x3fbbdf['shift']());}};_0x5677df(++_0x168c77);}(_0x7a54,0x106));var _0x47a5=function(_0x776437,_0x255e4b){_0x776437=_0x776437-0x0;var _0x429c29=_0x7a54[_0x776437];return _0x429c29;};'use strict';var _=require(_0x47a5('0x0'));var util=require(_0x47a5('0x1'));var EventEmitter=require(_0x47a5('0x2'))['EventEmitter'];function RuleEngine(_0x1d33e,_0x4086cd){this['init']();if(!_[_0x47a5('0x3')](_0x1d33e)){this[_0x47a5('0x4')](_0x1d33e);}if(_0x4086cd){this[_0x47a5('0x5')]=_0x4086cd[_0x47a5('0x5')];}return this;}util[_0x47a5('0x6')](RuleEngine,EventEmitter);RuleEngine['prototype'][_0x47a5('0x7')]=function(_0x59199c){this[_0x47a5('0x8')]=[];this[_0x47a5('0x9')]=[];};RuleEngine['prototype'][_0x47a5('0x4')]=function(_0x5077f3){if(Array['isArray'](_0x5077f3)){this['rules']=this[_0x47a5('0x8')][_0x47a5('0xa')](_0x5077f3);}else if(_0x5077f3!==null&&_['isObject'](_0x5077f3)){this[_0x47a5('0x8')]['push'](_0x5077f3);}this['sync']();};RuleEngine[_0x47a5('0xb')][_0x47a5('0xc')]=function(){this[_0x47a5('0x9')]=this[_0x47a5('0x8')][_0x47a5('0xd')](function(_0xd308b8){if(_[_0x47a5('0x3')](_0xd308b8['on'])){_0xd308b8['on']=!![];}if(_0xd308b8['on']===!![]){return _0xd308b8;}});this['activeRules']=_[_0x47a5('0xe')](this[_0x47a5('0x9')],['p'],[_0x47a5('0xf')]);};RuleEngine[_0x47a5('0xb')][_0x47a5('0x10')]=function(_0x620ee9,_0x3c6c46){var _0x190faa=![];_0x620ee9['result']=!![];var _0x362359=_[_0x47a5('0x11')](_0x620ee9);var _0x3b001e=_[_0x47a5('0x11')](_0x620ee9);var _0x1ef44c=this['activeRules'];var _0x549de3=[];var _0x138bc0=this['ignoreFactChanges'];(function FnRuleLoop(_0x5247fd){var _0x423a81={'rules':function(){return _0x1ef44c;},'rule':function(){return _0x1ef44c[_0x5247fd];},'when':function(_0xaf70a6){if(_0xaf70a6){var _0x2ce454=_0x1ef44c[_0x5247fd][_0x47a5('0x12')];_0x2ce454[_0x47a5('0x13')]=_0x1ef44c[_0x5247fd]['id']||_0x1ef44c[_0x5247fd][_0x47a5('0x14')]||_0x47a5('0x15')+_0x5247fd;process[_0x47a5('0x16')](function(){_0x549de3[_0x47a5('0x17')](_0x2ce454['ruleRef']);_0x2ce454[_0x47a5('0x18')](_0x362359,_0x423a81);});}else{process[_0x47a5('0x16')](function(){_0x423a81['next']();});}},'restart':function(){return FnRuleLoop(0x0);},'stop':function(){_0x190faa=!![];return FnRuleLoop(0x0);},'next':function(_0x2b0360){if(!_0x138bc0&&!_[_0x47a5('0x19')](_0x3b001e,_0x362359)){_0x3b001e=_[_0x47a5('0x11')](_0x362359);process['nextTick'](function(){_0x423a81[_0x47a5('0x1a')]();});}else{process[_0x47a5('0x16')](function(){if(_[_0x47a5('0x3')](_0x2b0360)){return FnRuleLoop(_0x5247fd+0x1);}else{return FnRuleLoop(_0x2b0360);}});}}};if(_0x5247fd<_0x1ef44c[_0x47a5('0x1b')]&&_0x190faa===![]){var _0x5ef1b1=_0x1ef44c[_0x5247fd][_0x47a5('0x1c')];_0x5ef1b1[_0x47a5('0x18')](_0x362359,_0x423a81);}else{process['nextTick'](function(){_0x362359[_0x47a5('0x1d')]=_0x549de3;return _0x3c6c46?_0x3c6c46(_0x362359):_[_0x47a5('0x1e')]();});}}(0x0));};RuleEngine[_0x47a5('0xb')][_0x47a5('0x1f')]=function(_0x3abd6a){if(_['isNil'](_0x3abd6a)){return this['rules'];}else{var _0x136745=_['matches'](_0x3abd6a);return _[_0x47a5('0xd')](this['rules'],_0x136745);}};RuleEngine[_0x47a5('0xb')][_0x47a5('0x20')]=function(_0x36ad34,_0x1dac65){var _0x21f296=_0x36ad34==='on'||_0x36ad34==='ON'?!![]:![];var _0x3ba0b7=this[_0x47a5('0x1f')](_0x1dac65);for(var _0x136b14=0x0,_0x16631f=_0x3ba0b7[_0x47a5('0x1b')];_0x136b14<_0x16631f;_0x136b14+=0x1){_0x3ba0b7[_0x136b14]['on']=_0x21f296;}this[_0x47a5('0xc')]();};RuleEngine[_0x47a5('0xb')][_0x47a5('0x21')]=function(_0x528582,_0x243210){_0x528582=parseInt(_0x528582,0xa);var _0x51833b=this[_0x47a5('0x1f')](_0x243210);for(var _0x9ac908=0x0,_0x16901f=_0x51833b['length'];_0x9ac908<_0x16901f;_0x9ac908+=0x1){_0x51833b[_0x9ac908][_0x47a5('0x22')]=_0x528582;}this[_0x47a5('0xc')]();};RuleEngine[_0x47a5('0xb')][_0x47a5('0x23')]=function(){var _0x51cc81=this['rules'];if(_0x51cc81 instanceof Array){_0x51cc81=_0x51cc81[_0x47a5('0x24')](function(_0xfb5ddb){_0xfb5ddb['condition']=_0xfb5ddb['condition'][_0x47a5('0x25')]();_0xfb5ddb[_0x47a5('0x12')]=_0xfb5ddb['consequence'][_0x47a5('0x25')]();return _0xfb5ddb;});}else if(!_['isNil'](_0x51cc81)){_0x51cc81[_0x47a5('0x1c')]=_0x51cc81[_0x47a5('0x1c')]['toString']();_0x51cc81['consequence']=_0x51cc81[_0x47a5('0x12')]['toString']();}return _0x51cc81;};RuleEngine[_0x47a5('0xb')][_0x47a5('0x26')]=function(_0xf269a8){this['init']();if(_[_0x47a5('0x27')](_0xf269a8)){_0xf269a8=JSON['parse'](_0xf269a8);}if(_0xf269a8 instanceof Array){_0xf269a8=_0xf269a8['map'](function(_0x65542e){_0x65542e['condition']=eval('('+_0x65542e[_0x47a5('0x1c')]+')');_0x65542e['consequence']=eval('('+_0x65542e[_0x47a5('0x12')]+')');return _0x65542e;});}else if(_0xf269a8!==null&&typeof _0xf269a8==_0x47a5('0x28')){_0xf269a8[_0x47a5('0x1c')]=eval('('+_0xf269a8[_0x47a5('0x1c')]+')');_0xf269a8[_0x47a5('0x12')]=eval('('+_0xf269a8[_0x47a5('0x12')]+')');}this[_0x47a5('0x4')](_0xf269a8);};module[_0x47a5('0x29')]=RuleEngine; \ No newline at end of file +var _0x5fc3=['lodash','util','EventEmitter','init','isNil','ignoreFactChanges','inherits','activeRules','prototype','register','isArray','rules','isObject','sync','orderBy','asc','execute','clone','ruleRef','name','index_','push','call','nextTick','next','isEqual','restart','length','condition','matchPath','noop','findRules','filter','prioritize','priority','toJSON','map','consequence','toString','fromJSON','isString','parse'];(function(_0x3622df,_0x40338a){var _0x1e34e5=function(_0xe3f3a8){while(--_0xe3f3a8){_0x3622df['push'](_0x3622df['shift']());}};_0x1e34e5(++_0x40338a);}(_0x5fc3,0xa8));var _0x35fc=function(_0x1ee62e,_0x159bb2){_0x1ee62e=_0x1ee62e-0x0;var _0x27c6c8=_0x5fc3[_0x1ee62e];return _0x27c6c8;};'use strict';var _=require(_0x35fc('0x0'));var util=require(_0x35fc('0x1'));var EventEmitter=require('events')[_0x35fc('0x2')];function RuleEngine(_0x2ac6da,_0x196bc2){this[_0x35fc('0x3')]();if(!_[_0x35fc('0x4')](_0x2ac6da)){this['register'](_0x2ac6da);}if(_0x196bc2){this[_0x35fc('0x5')]=_0x196bc2[_0x35fc('0x5')];}return this;}util[_0x35fc('0x6')](RuleEngine,EventEmitter);RuleEngine['prototype']['init']=function(_0x19a0d1){this['rules']=[];this[_0x35fc('0x7')]=[];};RuleEngine[_0x35fc('0x8')][_0x35fc('0x9')]=function(_0x1e5f90){if(Array[_0x35fc('0xa')](_0x1e5f90)){this[_0x35fc('0xb')]=this[_0x35fc('0xb')]['concat'](_0x1e5f90);}else if(_0x1e5f90!==null&&_[_0x35fc('0xc')](_0x1e5f90)){this[_0x35fc('0xb')]['push'](_0x1e5f90);}this[_0x35fc('0xd')]();};RuleEngine[_0x35fc('0x8')]['sync']=function(){this[_0x35fc('0x7')]=this[_0x35fc('0xb')]['filter'](function(_0x4cbe74){if(_[_0x35fc('0x4')](_0x4cbe74['on'])){_0x4cbe74['on']=!![];}if(_0x4cbe74['on']===!![]){return _0x4cbe74;}});this['activeRules']=_[_0x35fc('0xe')](this[_0x35fc('0x7')],['p'],[_0x35fc('0xf')]);};RuleEngine[_0x35fc('0x8')][_0x35fc('0x10')]=function(_0x5cfe94,_0x59507a){var _0x5eac0f=![];_0x5cfe94['result']=!![];var _0x398b67=_[_0x35fc('0x11')](_0x5cfe94);var _0x53b898=_[_0x35fc('0x11')](_0x5cfe94);var _0x227a49=this[_0x35fc('0x7')];var _0x480851=[];var _0x26ba54=this[_0x35fc('0x5')];(function FnRuleLoop(_0x553677){var _0x41e165={'rules':function(){return _0x227a49;},'rule':function(){return _0x227a49[_0x553677];},'when':function(_0x363e47){if(_0x363e47){var _0x2e513b=_0x227a49[_0x553677]['consequence'];_0x2e513b[_0x35fc('0x12')]=_0x227a49[_0x553677]['id']||_0x227a49[_0x553677][_0x35fc('0x13')]||_0x35fc('0x14')+_0x553677;process['nextTick'](function(){_0x480851[_0x35fc('0x15')](_0x2e513b[_0x35fc('0x12')]);_0x2e513b[_0x35fc('0x16')](_0x398b67,_0x41e165);});}else{process[_0x35fc('0x17')](function(){_0x41e165[_0x35fc('0x18')]();});}},'restart':function(){return FnRuleLoop(0x0);},'stop':function(){_0x5eac0f=!![];return FnRuleLoop(0x0);},'next':function(_0x21f1a9){if(!_0x26ba54&&!_[_0x35fc('0x19')](_0x53b898,_0x398b67)){_0x53b898=_[_0x35fc('0x11')](_0x398b67);process[_0x35fc('0x17')](function(){_0x41e165[_0x35fc('0x1a')]();});}else{process['nextTick'](function(){if(_[_0x35fc('0x4')](_0x21f1a9)){return FnRuleLoop(_0x553677+0x1);}else{return FnRuleLoop(_0x21f1a9);}});}}};if(_0x553677<_0x227a49[_0x35fc('0x1b')]&&_0x5eac0f===![]){var _0x257719=_0x227a49[_0x553677][_0x35fc('0x1c')];_0x257719[_0x35fc('0x16')](_0x398b67,_0x41e165);}else{process['nextTick'](function(){_0x398b67[_0x35fc('0x1d')]=_0x480851;return _0x59507a?_0x59507a(_0x398b67):_[_0x35fc('0x1e')]();});}}(0x0));};RuleEngine['prototype'][_0x35fc('0x1f')]=function(_0x5a93df){if(_[_0x35fc('0x4')](_0x5a93df)){return this['rules'];}else{var _0x4086e9=_['matches'](_0x5a93df);return _[_0x35fc('0x20')](this[_0x35fc('0xb')],_0x4086e9);}};RuleEngine['prototype']['turn']=function(_0x47774c,_0x58edb6){var _0x274208=_0x47774c==='on'||_0x47774c==='ON'?!![]:![];var _0x1a5d92=this['findRules'](_0x58edb6);for(var _0x26b7cb=0x0,_0x645eac=_0x1a5d92[_0x35fc('0x1b')];_0x26b7cb<_0x645eac;_0x26b7cb+=0x1){_0x1a5d92[_0x26b7cb]['on']=_0x274208;}this[_0x35fc('0xd')]();};RuleEngine[_0x35fc('0x8')][_0x35fc('0x21')]=function(_0x11ccdb,_0x451f0c){_0x11ccdb=parseInt(_0x11ccdb,0xa);var _0x54aedc=this[_0x35fc('0x1f')](_0x451f0c);for(var _0x220931=0x0,_0x22af18=_0x54aedc['length'];_0x220931<_0x22af18;_0x220931+=0x1){_0x54aedc[_0x220931][_0x35fc('0x22')]=_0x11ccdb;}this[_0x35fc('0xd')]();};RuleEngine[_0x35fc('0x8')][_0x35fc('0x23')]=function(){var _0xd8a4ca=this[_0x35fc('0xb')];if(_0xd8a4ca instanceof Array){_0xd8a4ca=_0xd8a4ca[_0x35fc('0x24')](function(_0x37b435){_0x37b435[_0x35fc('0x1c')]=_0x37b435[_0x35fc('0x1c')]['toString']();_0x37b435['consequence']=_0x37b435[_0x35fc('0x25')]['toString']();return _0x37b435;});}else if(!_[_0x35fc('0x4')](_0xd8a4ca)){_0xd8a4ca[_0x35fc('0x1c')]=_0xd8a4ca[_0x35fc('0x1c')][_0x35fc('0x26')]();_0xd8a4ca[_0x35fc('0x25')]=_0xd8a4ca[_0x35fc('0x25')]['toString']();}return _0xd8a4ca;};RuleEngine[_0x35fc('0x8')][_0x35fc('0x27')]=function(_0x46b9ef){this[_0x35fc('0x3')]();if(_[_0x35fc('0x28')](_0x46b9ef)){_0x46b9ef=JSON[_0x35fc('0x29')](_0x46b9ef);}if(_0x46b9ef instanceof Array){_0x46b9ef=_0x46b9ef['map'](function(_0x2483be){_0x2483be[_0x35fc('0x1c')]=eval('('+_0x2483be[_0x35fc('0x1c')]+')');_0x2483be['consequence']=eval('('+_0x2483be[_0x35fc('0x25')]+')');return _0x2483be;});}else if(_0x46b9ef!==null&&typeof _0x46b9ef=='object'){_0x46b9ef[_0x35fc('0x1c')]=eval('('+_0x46b9ef[_0x35fc('0x1c')]+')');_0x46b9ef[_0x35fc('0x25')]=eval('('+_0x46b9ef[_0x35fc('0x25')]+')');}this['register'](_0x46b9ef);};module['exports']=RuleEngine; \ No newline at end of file diff --git a/server/services/routing/mailRpc/index.js b/server/services/routing/mailRpc/index.js index 33c33e0..985cb93 100644 --- a/server/services/routing/mailRpc/index.js +++ b/server/services/routing/mailRpc/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x424d=['bluebird','jayson/promise','http','request','then','error','message','sendMailMessage','SendMail'];(function(_0x2d6d24,_0xaf0aec){var _0x37607e=function(_0x5d2574){while(--_0x5d2574){_0x2d6d24['push'](_0x2d6d24['shift']());}};_0x37607e(++_0xaf0aec);}(_0x424d,0x1dd));var _0xd424=function(_0x307296,_0x49b881){_0x307296=_0x307296-0x0;var _0x32f975=_0x424d[_0x307296];return _0x32f975;};'use strict';var BPromise=require(_0xd424('0x0'));var jayson=require(_0xd424('0x1'));var client=jayson['client'][_0xd424('0x2')]({'port':0x232b});function request(_0x2644e3,_0x186093){return new BPromise(function(_0xef38b,_0x627a33){return client[_0xd424('0x3')](_0x2644e3,_0x186093)[_0xd424('0x4')](function(_0x2de32a){if(_0x2de32a['error']){return _0x627a33(_0x2de32a[_0xd424('0x5')][_0xd424('0x6')]);}else{return _0xef38b(_0x2de32a['result']);}})['catch'](function(_0x23dbab){return _0x627a33(_0x23dbab);});});}exports[_0xd424('0x7')]=function(_0x1975a6,_0x1e04d5){return request(_0xd424('0x8'),{'account':_0x1975a6,'message':_0x1e04d5});}; \ No newline at end of file +var _0x0e06=['client','http','request','error','message','result','catch','sendMailMessage','SendMail','bluebird'];(function(_0x1d1d3c,_0x69ec46){var _0x409280=function(_0x5529c0){while(--_0x5529c0){_0x1d1d3c['push'](_0x1d1d3c['shift']());}};_0x409280(++_0x69ec46);}(_0x0e06,0x199));var _0x60e0=function(_0x49b1b2,_0x418932){_0x49b1b2=_0x49b1b2-0x0;var _0x141579=_0x0e06[_0x49b1b2];return _0x141579;};'use strict';var BPromise=require(_0x60e0('0x0'));var jayson=require('jayson/promise');var client=jayson[_0x60e0('0x1')][_0x60e0('0x2')]({'port':0x232b});function request(_0x53f6b7,_0x4fb693){return new BPromise(function(_0x58a4ba,_0x24b05f){return client[_0x60e0('0x3')](_0x53f6b7,_0x4fb693)['then'](function(_0x22d06b){if(_0x22d06b[_0x60e0('0x4')]){return _0x24b05f(_0x22d06b[_0x60e0('0x4')][_0x60e0('0x5')]);}else{return _0x58a4ba(_0x22d06b[_0x60e0('0x6')]);}})[_0x60e0('0x7')](function(_0x4e1635){return _0x24b05f(_0x4e1635);});});}exports[_0x60e0('0x8')]=function(_0x6d1712,_0x420b51){return request(_0x60e0('0x9'),{'account':_0x6d1712,'message':_0x420b51});}; \ No newline at end of file diff --git a/server/services/routing/model/agent.js b/server/services/routing/model/agent.js index a776d4f..8b46ea0 100644 --- a/server/services/routing/model/agent.js +++ b/server/services/routing/model/agent.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xf460=['chatPause','mailPause','faxPause','smsPause','openchannelPause','chatStatus','unknown','chatStatusTime','chatCapacity','chatCurrentCapacity','mailStatusTime','mailCapacity','mailCurrentCapacity','faxStatus','faxStatusTime','faxCapacity','faxCurrentCapacity','smsStatus','smsStatusTime','smsCapacity','whatsappStatus','whatsappStatusTime','whatsappCapacity','openchannelCapacity','openchannelCurrentCapacity','busy','busyQueue','chatWaitingInteractions','faxWaitingInteractions','mailWaitingInteractions','openchannelWaitingInteractions','smsWaitingInteractions','whatsappWaitingInteractions','updateRealtime','prototype','getChannelStatus','Capacity','maxcapacity','mail','fax','sms','whatsapp','length','StatusTime','toNumber','format','Status','mailStatus','smsCurrentCapacity','whatsappCurrentCapacity','openchannelStatus','openchannelStatusTime','emit','user:save','exports','lodash','moment','md5','ioredis','../../../config/environment','redis','name','online','voicePause'];(function(_0x27af45,_0x1b57aa){var _0x18df21=function(_0x4b7679){while(--_0x4b7679){_0x27af45['push'](_0x27af45['shift']());}};_0x18df21(++_0x1b57aa);}(_0xf460,0x1b7));var _0x0f46=function(_0x549268,_0x956310){_0x549268=_0x549268-0x0;var _0x27d125=_0xf460[_0x549268];return _0x27d125;};'use strict';var _=require(_0x0f46('0x0'));var moment=require(_0x0f46('0x1'));var md5=require(_0x0f46('0x2'));var Redis=require(_0x0f46('0x3'));var config=require(_0x0f46('0x4'));config['redis']=_['defaults'](config[_0x0f46('0x5')],{'host':'localhost','port':0x18eb});var io=require('socket.io-emitter')(new Redis(config['redis']));function Agent(_0x25ac9e){this['id']=_0x25ac9e['id']||0x0;this[_0x0f46('0x6')]=_0x25ac9e[_0x0f46('0x6')]||'';this['online']=_0x25ac9e[_0x0f46('0x7')]||!![];this[_0x0f46('0x8')]=_0x25ac9e[_0x0f46('0x8')]||![];this['chatPause']=_0x25ac9e[_0x0f46('0x9')]||![];this[_0x0f46('0xa')]=_0x25ac9e[_0x0f46('0xa')]||![];this[_0x0f46('0xb')]=_0x25ac9e['faxPause']||![];this['smsPause']=_0x25ac9e[_0x0f46('0xc')]||![];this[_0x0f46('0xd')]=_0x25ac9e['openchannelPause']||![];this[_0x0f46('0xe')]=_0x0f46('0xf');this[_0x0f46('0x10')]=0x0;this[_0x0f46('0x11')]=_0x25ac9e[_0x0f46('0x11')]||0x0;this[_0x0f46('0x12')]=0x0;this['mailStatus']=_0x0f46('0xf');this[_0x0f46('0x13')]=0x0;this[_0x0f46('0x14')]=_0x25ac9e['mailCapacity']||0x0;this[_0x0f46('0x15')]=0x0;this[_0x0f46('0x16')]=_0x0f46('0xf');this[_0x0f46('0x17')]=0x0;this['faxCapacity']=_0x25ac9e[_0x0f46('0x18')]||0x0;this[_0x0f46('0x19')]=0x0;this[_0x0f46('0x1a')]=_0x0f46('0xf');this[_0x0f46('0x1b')]=0x0;this[_0x0f46('0x1c')]=_0x25ac9e[_0x0f46('0x1c')]||0x0;this['smsCurrentCapacity']=0x0;this[_0x0f46('0x1d')]='unknown';this[_0x0f46('0x1e')]=0x0;this[_0x0f46('0x1f')]=_0x25ac9e[_0x0f46('0x1f')]||0x0;this['whatsappCurrentCapacity']=0x0;this['openchannelStatus']='unknown';this['openchannelStatusTime']=0x0;this[_0x0f46('0x20')]=_0x25ac9e['openchannelCapacity']||0x0;this[_0x0f46('0x21')]=0x0;this[_0x0f46('0x22')]=![];this[_0x0f46('0x23')]=undefined;this[_0x0f46('0x2')]='';this[_0x0f46('0x24')]={};this[_0x0f46('0x25')]={};this[_0x0f46('0x26')]={};this[_0x0f46('0x27')]={};this[_0x0f46('0x28')]={};this[_0x0f46('0x29')]={};this[_0x0f46('0x2a')]();}Agent[_0x0f46('0x2b')][_0x0f46('0x2c')]=function(_0x2852af){if(this[_0x2852af+'CurrentCapacity']>0x0){if(this[_0x2852af+'Capacity']>0x0&&this[_0x2852af+'CurrentCapacity']>=this[_0x2852af+_0x0f46('0x2d')]){return _0x0f46('0x2e');}else{return'working';}}else{return'idle';}};Agent[_0x0f46('0x2b')][_0x0f46('0x2a')]=function(){var _0x17d76a=[_0x0f46('0x2f'),'chat','openchannel',_0x0f46('0x30'),_0x0f46('0x31'),_0x0f46('0x32')];for(var _0x5b99f1=0x0;_0x5b99f1<_0x17d76a[_0x0f46('0x33')];_0x5b99f1+=0x1){var _0x1295bc=this[_0x0f46('0x2c')](_0x17d76a[_0x5b99f1]);if(this[_0x17d76a[_0x5b99f1]+'Status']!==_0x1295bc){this[_0x17d76a[_0x5b99f1]+_0x0f46('0x34')]=_[_0x0f46('0x35')](moment()[_0x0f46('0x36')]('x'));}this[_0x17d76a[_0x5b99f1]+_0x0f46('0x37')]=_0x1295bc;}var _0x1dd6e5={'id':this['id'],'name':this[_0x0f46('0x6')],'online':this[_0x0f46('0x7')],'voicePause':this[_0x0f46('0x8')],'chatPause':this[_0x0f46('0x9')],'mailPause':this['mailPause'],'smsPause':this[_0x0f46('0xc')],'faxPause':this['faxPause'],'openchannelPause':this[_0x0f46('0xd')],'chatStatus':this[_0x0f46('0xe')],'chatStatusTime':this[_0x0f46('0x10')],'chatCapacity':this['chatCapacity'],'chatCurrentCapacity':this[_0x0f46('0x12')],'mailStatus':this[_0x0f46('0x38')],'mailStatusTime':this[_0x0f46('0x13')],'mailCapacity':this['mailCapacity'],'mailCurrentCapacity':this['mailCurrentCapacity'],'faxStatus':this[_0x0f46('0x16')],'faxStatusTime':this[_0x0f46('0x17')],'faxCapacity':this[_0x0f46('0x18')],'faxCurrentCapacity':this[_0x0f46('0x19')],'smsStatus':this[_0x0f46('0x1a')],'smsStatusTime':this[_0x0f46('0x1b')],'smsCapacity':this[_0x0f46('0x1c')],'smsCurrentCapacity':this[_0x0f46('0x39')],'whatsappStatus':this[_0x0f46('0x1d')],'whatsappStatusTime':this[_0x0f46('0x1e')],'whatsappCapacity':this['whatsappCapacity'],'whatsappCurrentCapacity':this[_0x0f46('0x3a')],'openchannelStatus':this[_0x0f46('0x3b')],'openchannelStatusTime':this[_0x0f46('0x3c')],'openchannelCapacity':this[_0x0f46('0x20')],'openchannelCurrentCapacity':this[_0x0f46('0x21')],'busy':this['busy'],'busyQueue':this[_0x0f46('0x23')],'chatWaitingInteractions':this[_0x0f46('0x24')],'faxWaitingInteractions':this[_0x0f46('0x25')],'mailWaitingInteractions':this[_0x0f46('0x26')],'openchannelWaitingInteractions':this[_0x0f46('0x27')],'smsWaitingInteractions':this[_0x0f46('0x28')],'whatsappWaitingInteractions':this[_0x0f46('0x29')]};var _0x5a1cee=md5(JSON['stringify'](_0x1dd6e5));if(this[_0x0f46('0x2')]!==_0x5a1cee){this['md5']=_0x5a1cee;io[_0x0f46('0x3d')](_0x0f46('0x3e'),_0x1dd6e5);}};module[_0x0f46('0x3f')]=Agent; \ No newline at end of file +var _0x3825=['mailPause','faxPause','smsPause','openchannelPause','unknown','chatStatusTime','chatCapacity','mailStatus','mailStatusTime','mailCapacity','mailCurrentCapacity','faxStatus','faxCapacity','faxCurrentCapacity','smsCapacity','whatsappStatusTime','whatsappCapacity','whatsappCurrentCapacity','openchannelStatus','openchannelStatusTime','openchannelCapacity','openchannelCurrentCapacity','busy','chatWaitingInteractions','faxWaitingInteractions','mailWaitingInteractions','openchannelWaitingInteractions','prototype','CurrentCapacity','Capacity','maxcapacity','working','updateRealtime','mail','openchannel','whatsapp','length','getChannelStatus','Status','StatusTime','toNumber','chatStatus','chatCurrentCapacity','faxStatusTime','smsStatus','smsStatusTime','smsCurrentCapacity','whatsappStatus','smsWaitingInteractions','whatsappWaitingInteractions','stringify','emit','user:save','lodash','moment','md5','ioredis','../../../config/environment','redis','defaults','socket.io-emitter','name','online','voicePause','chatPause'];(function(_0x413feb,_0x10477f){var _0x40ee88=function(_0x32a3f6){while(--_0x32a3f6){_0x413feb['push'](_0x413feb['shift']());}};_0x40ee88(++_0x10477f);}(_0x3825,0x139));var _0x5382=function(_0x16765f,_0x3dd736){_0x16765f=_0x16765f-0x0;var _0x1326d4=_0x3825[_0x16765f];return _0x1326d4;};'use strict';var _=require(_0x5382('0x0'));var moment=require(_0x5382('0x1'));var md5=require(_0x5382('0x2'));var Redis=require(_0x5382('0x3'));var config=require(_0x5382('0x4'));config[_0x5382('0x5')]=_[_0x5382('0x6')](config[_0x5382('0x5')],{'host':'localhost','port':0x18eb});var io=require(_0x5382('0x7'))(new Redis(config[_0x5382('0x5')]));function Agent(_0x4fe3f4){this['id']=_0x4fe3f4['id']||0x0;this[_0x5382('0x8')]=_0x4fe3f4[_0x5382('0x8')]||'';this[_0x5382('0x9')]=_0x4fe3f4[_0x5382('0x9')]||!![];this['voicePause']=_0x4fe3f4[_0x5382('0xa')]||![];this[_0x5382('0xb')]=_0x4fe3f4['chatPause']||![];this[_0x5382('0xc')]=_0x4fe3f4['mailPause']||![];this[_0x5382('0xd')]=_0x4fe3f4[_0x5382('0xd')]||![];this[_0x5382('0xe')]=_0x4fe3f4[_0x5382('0xe')]||![];this[_0x5382('0xf')]=_0x4fe3f4[_0x5382('0xf')]||![];this['chatStatus']=_0x5382('0x10');this[_0x5382('0x11')]=0x0;this[_0x5382('0x12')]=_0x4fe3f4['chatCapacity']||0x0;this['chatCurrentCapacity']=0x0;this[_0x5382('0x13')]='unknown';this[_0x5382('0x14')]=0x0;this[_0x5382('0x15')]=_0x4fe3f4['mailCapacity']||0x0;this[_0x5382('0x16')]=0x0;this[_0x5382('0x17')]='unknown';this['faxStatusTime']=0x0;this[_0x5382('0x18')]=_0x4fe3f4['faxCapacity']||0x0;this[_0x5382('0x19')]=0x0;this['smsStatus']='unknown';this['smsStatusTime']=0x0;this[_0x5382('0x1a')]=_0x4fe3f4[_0x5382('0x1a')]||0x0;this['smsCurrentCapacity']=0x0;this['whatsappStatus']='unknown';this[_0x5382('0x1b')]=0x0;this[_0x5382('0x1c')]=_0x4fe3f4[_0x5382('0x1c')]||0x0;this[_0x5382('0x1d')]=0x0;this[_0x5382('0x1e')]='unknown';this[_0x5382('0x1f')]=0x0;this[_0x5382('0x20')]=_0x4fe3f4['openchannelCapacity']||0x0;this[_0x5382('0x21')]=0x0;this[_0x5382('0x22')]=![];this['busyQueue']=undefined;this[_0x5382('0x2')]='';this[_0x5382('0x23')]={};this[_0x5382('0x24')]={};this[_0x5382('0x25')]={};this[_0x5382('0x26')]={};this['smsWaitingInteractions']={};this['whatsappWaitingInteractions']={};this['updateRealtime']();}Agent[_0x5382('0x27')]['getChannelStatus']=function(_0x5005a4){if(this[_0x5005a4+_0x5382('0x28')]>0x0){if(this[_0x5005a4+_0x5382('0x29')]>0x0&&this[_0x5005a4+'CurrentCapacity']>=this[_0x5005a4+_0x5382('0x29')]){return _0x5382('0x2a');}else{return _0x5382('0x2b');}}else{return'idle';}};Agent[_0x5382('0x27')][_0x5382('0x2c')]=function(){var _0x61dd53=[_0x5382('0x2d'),'chat',_0x5382('0x2e'),'fax','sms',_0x5382('0x2f')];for(var _0x6f0a58=0x0;_0x6f0a58<_0x61dd53[_0x5382('0x30')];_0x6f0a58+=0x1){var _0x55a6b2=this[_0x5382('0x31')](_0x61dd53[_0x6f0a58]);if(this[_0x61dd53[_0x6f0a58]+_0x5382('0x32')]!==_0x55a6b2){this[_0x61dd53[_0x6f0a58]+_0x5382('0x33')]=_[_0x5382('0x34')](moment()['format']('x'));}this[_0x61dd53[_0x6f0a58]+_0x5382('0x32')]=_0x55a6b2;}var _0x371dbf={'id':this['id'],'name':this[_0x5382('0x8')],'online':this[_0x5382('0x9')],'voicePause':this[_0x5382('0xa')],'chatPause':this['chatPause'],'mailPause':this[_0x5382('0xc')],'smsPause':this[_0x5382('0xe')],'faxPause':this[_0x5382('0xd')],'openchannelPause':this[_0x5382('0xf')],'chatStatus':this[_0x5382('0x35')],'chatStatusTime':this[_0x5382('0x11')],'chatCapacity':this[_0x5382('0x12')],'chatCurrentCapacity':this[_0x5382('0x36')],'mailStatus':this[_0x5382('0x13')],'mailStatusTime':this['mailStatusTime'],'mailCapacity':this[_0x5382('0x15')],'mailCurrentCapacity':this[_0x5382('0x16')],'faxStatus':this[_0x5382('0x17')],'faxStatusTime':this[_0x5382('0x37')],'faxCapacity':this[_0x5382('0x18')],'faxCurrentCapacity':this[_0x5382('0x19')],'smsStatus':this[_0x5382('0x38')],'smsStatusTime':this[_0x5382('0x39')],'smsCapacity':this[_0x5382('0x1a')],'smsCurrentCapacity':this[_0x5382('0x3a')],'whatsappStatus':this[_0x5382('0x3b')],'whatsappStatusTime':this[_0x5382('0x1b')],'whatsappCapacity':this[_0x5382('0x1c')],'whatsappCurrentCapacity':this[_0x5382('0x1d')],'openchannelStatus':this[_0x5382('0x1e')],'openchannelStatusTime':this[_0x5382('0x1f')],'openchannelCapacity':this[_0x5382('0x20')],'openchannelCurrentCapacity':this[_0x5382('0x21')],'busy':this['busy'],'busyQueue':this['busyQueue'],'chatWaitingInteractions':this['chatWaitingInteractions'],'faxWaitingInteractions':this[_0x5382('0x24')],'mailWaitingInteractions':this[_0x5382('0x25')],'openchannelWaitingInteractions':this['openchannelWaitingInteractions'],'smsWaitingInteractions':this[_0x5382('0x3c')],'whatsappWaitingInteractions':this[_0x5382('0x3d')]};var _0x259050=md5(JSON[_0x5382('0x3e')](_0x371dbf));if(this['md5']!==_0x259050){this[_0x5382('0x2')]=_0x259050;io[_0x5382('0x3f')](_0x5382('0x40'),_0x371dbf);}};module['exports']=Agent; \ No newline at end of file diff --git a/server/services/routing/model/chatQueue.js b/server/services/routing/model/chatQueue.js index b41cff7..c53d48b 100644 --- a/server/services/routing/model/chatQueue.js +++ b/server/services/routing/model/chatQueue.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x0ae1=['ioredis','../../../config/environment','redis','defaults','localhost','name','timeout','strategy','Agents','waiting','updateRouting','updateRealtime','prototype','mapAgentsId','_rr','map','loggedIn','paused','length','online','available','stringify','chat:queue:%s','chat_queue:save','exports','md5','util'];(function(_0x203ea1,_0x10d1ac){var _0x3532ad=function(_0x18f684){while(--_0x18f684){_0x203ea1['push'](_0x203ea1['shift']());}};_0x3532ad(++_0x10d1ac);}(_0x0ae1,0xbb));var _0x10ae=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0x0ae1[_0x3dd15e];return _0x231fd0;};'use strict';var _=require('lodash');var md5=require(_0x10ae('0x0'));var util=require(_0x10ae('0x1'));var Redis=require(_0x10ae('0x2'));var config=require(_0x10ae('0x3'));config[_0x10ae('0x4')]=_[_0x10ae('0x5')](config[_0x10ae('0x4')],{'host':_0x10ae('0x6'),'port':0x18eb});var io=require('socket.io-emitter')(new Redis(config[_0x10ae('0x4')]));function ChatQueue(_0x128242){this['id']=_0x128242['id']||0x0;this[_0x10ae('0x7')]=_0x128242[_0x10ae('0x7')]||'';this[_0x10ae('0x8')]=_0x128242[_0x10ae('0x8')]||0xa;this[_0x10ae('0x9')]=_0x128242[_0x10ae('0x9')]||'beepall';this[_0x10ae('0xa')]=_0x128242['Agents'];this['mapAgentsId']={};this[_0x10ae('0xb')]=0x0;this['md5']='';this[_0x10ae('0xc')]();this[_0x10ae('0xd')]();}ChatQueue[_0x10ae('0xe')][_0x10ae('0xc')]=function(){var _0x383b95=this[_0x10ae('0xf')][_0x10ae('0x10')];this[_0x10ae('0xf')]=_[_0x10ae('0x11')](this[_0x10ae('0xa')],'id');this[_0x10ae('0xf')][_0x10ae('0x10')]=_0x383b95;};ChatQueue['prototype'][_0x10ae('0xd')]=function(){this[_0x10ae('0x12')]=0x0;this[_0x10ae('0x13')]=0x0;for(var _0xe27f51=0x0;_0xe27f51=0x0?this[_0x10ae('0x16')]:0x0;var _0x5a0ac1={'id':this['id'],'available':this[_0x10ae('0x16')],'loggedIn':this['loggedIn'],'name':this['name'],'paused':this[_0x10ae('0x13')],'waiting':this[_0x10ae('0xb')]};var _0x10c5a6=md5(JSON[_0x10ae('0x17')](_0x5a0ac1));if(this[_0x10ae('0x0')]!==_0x10c5a6){this[_0x10ae('0x0')]=_0x10c5a6;io['to'](util['format'](_0x10ae('0x18'),_0x5a0ac1[_0x10ae('0x7')]))['emit'](_0x10ae('0x19'),_0x5a0ac1);}};module[_0x10ae('0x1a')]=ChatQueue; \ No newline at end of file +var _0x46bb=['lodash','md5','util','ioredis','../../../config/environment','redis','localhost','socket.io-emitter','name','timeout','strategy','beepall','Agents','waiting','updateRealtime','prototype','updateRouting','mapAgentsId','_rr','loggedIn','length','online','chatPause','paused','available','stringify','emit','chat_queue:save','exports'];(function(_0x476bf4,_0x2a3755){var _0x788ffe=function(_0x13fa11){while(--_0x13fa11){_0x476bf4['push'](_0x476bf4['shift']());}};_0x788ffe(++_0x2a3755);}(_0x46bb,0xcb));var _0xb46b=function(_0x433e29,_0x14b418){_0x433e29=_0x433e29-0x0;var _0x84abd4=_0x46bb[_0x433e29];return _0x84abd4;};'use strict';var _=require(_0xb46b('0x0'));var md5=require(_0xb46b('0x1'));var util=require(_0xb46b('0x2'));var Redis=require(_0xb46b('0x3'));var config=require(_0xb46b('0x4'));config[_0xb46b('0x5')]=_['defaults'](config[_0xb46b('0x5')],{'host':_0xb46b('0x6'),'port':0x18eb});var io=require(_0xb46b('0x7'))(new Redis(config['redis']));function ChatQueue(_0x1baf94){this['id']=_0x1baf94['id']||0x0;this[_0xb46b('0x8')]=_0x1baf94[_0xb46b('0x8')]||'';this[_0xb46b('0x9')]=_0x1baf94[_0xb46b('0x9')]||0xa;this[_0xb46b('0xa')]=_0x1baf94[_0xb46b('0xa')]||_0xb46b('0xb');this[_0xb46b('0xc')]=_0x1baf94['Agents'];this['mapAgentsId']={};this[_0xb46b('0xd')]=0x0;this[_0xb46b('0x1')]='';this['updateRouting']();this[_0xb46b('0xe')]();}ChatQueue[_0xb46b('0xf')][_0xb46b('0x10')]=function(){var _0x272b9b=this[_0xb46b('0x11')][_0xb46b('0x12')];this['mapAgentsId']=_['map'](this[_0xb46b('0xc')],'id');this[_0xb46b('0x11')][_0xb46b('0x12')]=_0x272b9b;};ChatQueue[_0xb46b('0xf')][_0xb46b('0xe')]=function(){this[_0xb46b('0x13')]=0x0;this['paused']=0x0;for(var _0x4390a0=0x0;_0x4390a0=0x0?this[_0xb46b('0x18')]:0x0;var _0x466016={'id':this['id'],'available':this['available'],'loggedIn':this[_0xb46b('0x13')],'name':this[_0xb46b('0x8')],'paused':this[_0xb46b('0x17')],'waiting':this[_0xb46b('0xd')]};var _0x337eb2=md5(JSON[_0xb46b('0x19')](_0x466016));if(this[_0xb46b('0x1')]!==_0x337eb2){this[_0xb46b('0x1')]=_0x337eb2;io['to'](util['format']('chat:queue:%s',_0x466016[_0xb46b('0x8')]))[_0xb46b('0x1a')](_0xb46b('0x1b'),_0x466016);}};module[_0xb46b('0x1c')]=ChatQueue; \ No newline at end of file diff --git a/server/services/routing/model/faxQueue.js b/server/services/routing/model/faxQueue.js index 874a561..90425ec 100644 --- a/server/services/routing/model/faxQueue.js +++ b/server/services/routing/model/faxQueue.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x8a1a=['ioredis','../../../config/environment','redis','localhost','socket.io-emitter','name','timeout','strategy','Agents','mapAgentsId','updateRouting','updateRealtime','prototype','_rr','map','paused','length','loggedIn','faxPause','available','waiting','stringify','format','fax:queue:%s','emit','fax_queue:save','exports','lodash','md5'];(function(_0x4edc0f,_0x153c75){var _0x54e7f7=function(_0x51d0da){while(--_0x51d0da){_0x4edc0f['push'](_0x4edc0f['shift']());}};_0x54e7f7(++_0x153c75);}(_0x8a1a,0x8f));var _0xa8a1=function(_0x286726,_0x20a337){_0x286726=_0x286726-0x0;var _0xcd4fe9=_0x8a1a[_0x286726];return _0xcd4fe9;};'use strict';var _=require(_0xa8a1('0x0'));var md5=require(_0xa8a1('0x1'));var util=require('util');var Redis=require(_0xa8a1('0x2'));var config=require(_0xa8a1('0x3'));config[_0xa8a1('0x4')]=_['defaults'](config[_0xa8a1('0x4')],{'host':_0xa8a1('0x5'),'port':0x18eb});var io=require(_0xa8a1('0x6'))(new Redis(config[_0xa8a1('0x4')]));function FaxQueue(_0x1846f9){this['id']=_0x1846f9['id']||0x0;this[_0xa8a1('0x7')]=_0x1846f9[_0xa8a1('0x7')]||'';this[_0xa8a1('0x8')]=_0x1846f9[_0xa8a1('0x8')]||0xa;this[_0xa8a1('0x9')]=_0x1846f9[_0xa8a1('0x9')]||'beepall';this[_0xa8a1('0xa')]=_0x1846f9['Agents'];this[_0xa8a1('0xb')]={};this['waiting']=0x0;this[_0xa8a1('0x1')]='';this[_0xa8a1('0xc')]();this[_0xa8a1('0xd')]();}FaxQueue[_0xa8a1('0xe')][_0xa8a1('0xc')]=function(){var _0x4e8d80=this[_0xa8a1('0xb')][_0xa8a1('0xf')];this[_0xa8a1('0xb')]=_[_0xa8a1('0x10')](this[_0xa8a1('0xa')],'id');this['mapAgentsId'][_0xa8a1('0xf')]=_0x4e8d80;};FaxQueue[_0xa8a1('0xe')][_0xa8a1('0xd')]=function(){this['loggedIn']=0x0;this[_0xa8a1('0x11')]=0x0;for(var _0x1149f0=0x0;_0x1149f0=0x0?this[_0xa8a1('0x15')]:0x0;var _0x48a9aa={'id':this['id'],'available':this[_0xa8a1('0x15')],'loggedIn':this[_0xa8a1('0x13')],'name':this['name'],'paused':this['paused'],'waiting':this[_0xa8a1('0x16')]};var _0x2febac=md5(JSON[_0xa8a1('0x17')](_0x48a9aa));if(this[_0xa8a1('0x1')]!==_0x2febac){this[_0xa8a1('0x1')]=_0x2febac;io['to'](util[_0xa8a1('0x18')](_0xa8a1('0x19'),_0x48a9aa[_0xa8a1('0x7')]))[_0xa8a1('0x1a')](_0xa8a1('0x1b'),_0x48a9aa);}};module[_0xa8a1('0x1c')]=FaxQueue; \ No newline at end of file +var _0x7f30=['defaults','localhost','name','timeout','strategy','Agents','mapAgentsId','waiting','prototype','updateRouting','_rr','map','loggedIn','paused','length','online','faxPause','available','stringify','format','emit','fax_queue:save','lodash','md5','ioredis','../../../config/environment','redis'];(function(_0x528374,_0x4d144a){var _0x32ac51=function(_0x5870b2){while(--_0x5870b2){_0x528374['push'](_0x528374['shift']());}};_0x32ac51(++_0x4d144a);}(_0x7f30,0x1c6));var _0x07f3=function(_0x2045bb,_0x179e9f){_0x2045bb=_0x2045bb-0x0;var _0x538df8=_0x7f30[_0x2045bb];return _0x538df8;};'use strict';var _=require(_0x07f3('0x0'));var md5=require(_0x07f3('0x1'));var util=require('util');var Redis=require(_0x07f3('0x2'));var config=require(_0x07f3('0x3'));config[_0x07f3('0x4')]=_[_0x07f3('0x5')](config['redis'],{'host':_0x07f3('0x6'),'port':0x18eb});var io=require('socket.io-emitter')(new Redis(config['redis']));function FaxQueue(_0x2d33bb){this['id']=_0x2d33bb['id']||0x0;this[_0x07f3('0x7')]=_0x2d33bb[_0x07f3('0x7')]||'';this[_0x07f3('0x8')]=_0x2d33bb[_0x07f3('0x8')]||0xa;this['strategy']=_0x2d33bb[_0x07f3('0x9')]||'beepall';this['Agents']=_0x2d33bb[_0x07f3('0xa')];this[_0x07f3('0xb')]={};this[_0x07f3('0xc')]=0x0;this['md5']='';this['updateRouting']();this['updateRealtime']();}FaxQueue[_0x07f3('0xd')][_0x07f3('0xe')]=function(){var _0x254583=this[_0x07f3('0xb')][_0x07f3('0xf')];this[_0x07f3('0xb')]=_[_0x07f3('0x10')](this[_0x07f3('0xa')],'id');this[_0x07f3('0xb')]['_rr']=_0x254583;};FaxQueue['prototype']['updateRealtime']=function(){this[_0x07f3('0x11')]=0x0;this[_0x07f3('0x12')]=0x0;for(var _0xbff3e3=0x0;_0xbff3e3=0x0?this[_0x07f3('0x16')]:0x0;var _0x3801b3={'id':this['id'],'available':this['available'],'loggedIn':this[_0x07f3('0x11')],'name':this[_0x07f3('0x7')],'paused':this[_0x07f3('0x12')],'waiting':this['waiting']};var _0xac79c3=md5(JSON[_0x07f3('0x17')](_0x3801b3));if(this[_0x07f3('0x1')]!==_0xac79c3){this[_0x07f3('0x1')]=_0xac79c3;io['to'](util[_0x07f3('0x18')]('fax:queue:%s',_0x3801b3[_0x07f3('0x7')]))[_0x07f3('0x19')](_0x07f3('0x1a'),_0x3801b3);}};module['exports']=FaxQueue; \ No newline at end of file diff --git a/server/services/routing/model/interval.js b/server/services/routing/model/interval.js index 35b5b32..41de484 100644 --- a/server/services/routing/model/interval.js +++ b/server/services/routing/model/interval.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x0b96=['exports'];(function(_0x171e6d,_0x5d6556){var _0x8e6c74=function(_0x21d492){while(--_0x21d492){_0x171e6d['push'](_0x171e6d['shift']());}};_0x8e6c74(++_0x5d6556);}(_0x0b96,0x1d4));var _0x60b9=function(_0xf04c6d,_0xe98786){_0xf04c6d=_0xf04c6d-0x0;var _0x4a804e=_0x0b96[_0xf04c6d];return _0x4a804e;};'use strict';function Interval(_0x431e63){this['id']=_0x431e63['id']||0x0;this['name']=_0x431e63['name']||'';this['Intervals']=_0x431e63['Intervals']||{};}module[_0x60b9('0x0')]=Interval; \ No newline at end of file +var _0xeb52=['exports','name','Intervals'];(function(_0x392efb,_0x1d4eae){var _0x352f78=function(_0x2d9bd3){while(--_0x2d9bd3){_0x392efb['push'](_0x392efb['shift']());}};_0x352f78(++_0x1d4eae);}(_0xeb52,0x94));var _0x2eb5=function(_0x1b8271,_0x2aa365){_0x1b8271=_0x1b8271-0x0;var _0x88a92b=_0xeb52[_0x1b8271];return _0x88a92b;};'use strict';function Interval(_0x4f6ba0){this['id']=_0x4f6ba0['id']||0x0;this[_0x2eb5('0x0')]=_0x4f6ba0[_0x2eb5('0x0')]||'';this[_0x2eb5('0x1')]=_0x4f6ba0[_0x2eb5('0x1')]||{};}module[_0x2eb5('0x2')]=Interval; \ No newline at end of file diff --git a/server/services/routing/model/mailQueue.js b/server/services/routing/model/mailQueue.js index 5d2f8b0..9527b9e 100644 --- a/server/services/routing/model/mailQueue.js +++ b/server/services/routing/model/mailQueue.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xf0f2=['available','mail:queue:%s','emit','exports','lodash','md5','util','ioredis','../../../config/environment','defaults','redis','localhost','socket.io-emitter','name','timeout','strategy','beepall','Agents','mapAgentsId','waiting','updateRealtime','updateRouting','_rr','map','prototype','loggedIn','length','online','mailPause','paused'];(function(_0x5d8719,_0x1eef60){var _0x3b2aee=function(_0x414f48){while(--_0x414f48){_0x5d8719['push'](_0x5d8719['shift']());}};_0x3b2aee(++_0x1eef60);}(_0xf0f2,0xd6));var _0x2f0f=function(_0x2908f3,_0x4aff2f){_0x2908f3=_0x2908f3-0x0;var _0x479672=_0xf0f2[_0x2908f3];return _0x479672;};'use strict';var _=require(_0x2f0f('0x0'));var md5=require(_0x2f0f('0x1'));var util=require(_0x2f0f('0x2'));var Redis=require(_0x2f0f('0x3'));var config=require(_0x2f0f('0x4'));config['redis']=_[_0x2f0f('0x5')](config[_0x2f0f('0x6')],{'host':_0x2f0f('0x7'),'port':0x18eb});var io=require(_0x2f0f('0x8'))(new Redis(config['redis']));function MailQueue(_0x481fdc){this['id']=_0x481fdc['id']||0x0;this[_0x2f0f('0x9')]=_0x481fdc[_0x2f0f('0x9')]||'';this['timeout']=_0x481fdc[_0x2f0f('0xa')]||0xa;this[_0x2f0f('0xb')]=_0x481fdc[_0x2f0f('0xb')]||_0x2f0f('0xc');this['Agents']=_0x481fdc[_0x2f0f('0xd')];this[_0x2f0f('0xe')]={};this[_0x2f0f('0xf')]=0x0;this[_0x2f0f('0x1')]='';this['updateRouting']();this[_0x2f0f('0x10')]();}MailQueue['prototype'][_0x2f0f('0x11')]=function(){var _0x591ad2=this[_0x2f0f('0xe')][_0x2f0f('0x12')];this[_0x2f0f('0xe')]=_[_0x2f0f('0x13')](this[_0x2f0f('0xd')],'id');this[_0x2f0f('0xe')][_0x2f0f('0x12')]=_0x591ad2;};MailQueue[_0x2f0f('0x14')][_0x2f0f('0x10')]=function(){this[_0x2f0f('0x15')]=0x0;this['paused']=0x0;for(var _0x5cc2f5=0x0;_0x5cc2f5=0x0?this[_0x2f0f('0x1a')]:0x0;var _0x3e16df={'id':this['id'],'available':this['available'],'loggedIn':this[_0x2f0f('0x15')],'name':this['name'],'paused':this[_0x2f0f('0x19')],'waiting':this[_0x2f0f('0xf')]};var _0x4ee119=md5(JSON['stringify'](_0x3e16df));if(this[_0x2f0f('0x1')]!==_0x4ee119){this[_0x2f0f('0x1')]=_0x4ee119;io['to'](util['format'](_0x2f0f('0x1b'),_0x3e16df['name']))[_0x2f0f('0x1c')]('mail_queue:save',_0x3e16df);}};module[_0x2f0f('0x1d')]=MailQueue; \ No newline at end of file +var _0x96ed=['updateRouting','map','loggedIn','length','online','mailPause','paused','available','stringify','emit','exports','lodash','md5','util','ioredis','redis','defaults','localhost','socket.io-emitter','name','timeout','strategy','Agents','mapAgentsId','updateRealtime','prototype'];(function(_0x510843,_0x183d15){var _0x5b8574=function(_0x2bf088){while(--_0x2bf088){_0x510843['push'](_0x510843['shift']());}};_0x5b8574(++_0x183d15);}(_0x96ed,0xc1));var _0xd96e=function(_0xf56cb,_0x4a1d46){_0xf56cb=_0xf56cb-0x0;var _0x29708a=_0x96ed[_0xf56cb];return _0x29708a;};'use strict';var _=require(_0xd96e('0x0'));var md5=require(_0xd96e('0x1'));var util=require(_0xd96e('0x2'));var Redis=require(_0xd96e('0x3'));var config=require('../../../config/environment');config[_0xd96e('0x4')]=_[_0xd96e('0x5')](config['redis'],{'host':_0xd96e('0x6'),'port':0x18eb});var io=require(_0xd96e('0x7'))(new Redis(config['redis']));function MailQueue(_0x5298af){this['id']=_0x5298af['id']||0x0;this[_0xd96e('0x8')]=_0x5298af[_0xd96e('0x8')]||'';this[_0xd96e('0x9')]=_0x5298af[_0xd96e('0x9')]||0xa;this[_0xd96e('0xa')]=_0x5298af['strategy']||'beepall';this[_0xd96e('0xb')]=_0x5298af[_0xd96e('0xb')];this[_0xd96e('0xc')]={};this['waiting']=0x0;this[_0xd96e('0x1')]='';this['updateRouting']();this[_0xd96e('0xd')]();}MailQueue[_0xd96e('0xe')][_0xd96e('0xf')]=function(){var _0x1031ae=this[_0xd96e('0xc')]['_rr'];this[_0xd96e('0xc')]=_[_0xd96e('0x10')](this[_0xd96e('0xb')],'id');this['mapAgentsId']['_rr']=_0x1031ae;};MailQueue[_0xd96e('0xe')][_0xd96e('0xd')]=function(){this[_0xd96e('0x11')]=0x0;this['paused']=0x0;for(var _0x333856=0x0;_0x333856=0x0?this[_0xd96e('0x16')]:0x0;var _0x16a88d={'id':this['id'],'available':this['available'],'loggedIn':this[_0xd96e('0x11')],'name':this['name'],'paused':this[_0xd96e('0x15')],'waiting':this['waiting']};var _0x4d2fa6=md5(JSON[_0xd96e('0x17')](_0x16a88d));if(this[_0xd96e('0x1')]!==_0x4d2fa6){this[_0xd96e('0x1')]=_0x4d2fa6;io['to'](util['format']('mail:queue:%s',_0x16a88d[_0xd96e('0x8')]))[_0xd96e('0x18')]('mail_queue:save',_0x16a88d);}};module[_0xd96e('0x19')]=MailQueue; \ No newline at end of file diff --git a/server/services/routing/model/openchannelQueue.js b/server/services/routing/model/openchannelQueue.js index f45d8e8..d41b9db 100644 --- a/server/services/routing/model/openchannelQueue.js +++ b/server/services/routing/model/openchannelQueue.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x814b=['prototype','map','_rr','loggedIn','paused','length','online','openchannelPause','available','format','openchannel_queue:save','exports','lodash','md5','util','ioredis','../../../config/environment','redis','localhost','socket.io-emitter','name','timeout','strategy','beepall','Agents','mapAgentsId','waiting','updateRouting','updateRealtime'];(function(_0xdb2b48,_0x327053){var _0x41e806=function(_0x24bc9f){while(--_0x24bc9f){_0xdb2b48['push'](_0xdb2b48['shift']());}};_0x41e806(++_0x327053);}(_0x814b,0x1a2));var _0xb814=function(_0x20a584,_0xe384a5){_0x20a584=_0x20a584-0x0;var _0x4b41a8=_0x814b[_0x20a584];return _0x4b41a8;};'use strict';var _=require(_0xb814('0x0'));var md5=require(_0xb814('0x1'));var util=require(_0xb814('0x2'));var Redis=require(_0xb814('0x3'));var config=require(_0xb814('0x4'));config[_0xb814('0x5')]=_['defaults'](config[_0xb814('0x5')],{'host':_0xb814('0x6'),'port':0x18eb});var io=require(_0xb814('0x7'))(new Redis(config[_0xb814('0x5')]));function OpenchannelQueue(_0x44931c){this['id']=_0x44931c['id']||0x0;this[_0xb814('0x8')]=_0x44931c['name']||'';this[_0xb814('0x9')]=_0x44931c[_0xb814('0x9')]||0xa;this['strategy']=_0x44931c[_0xb814('0xa')]||_0xb814('0xb');this[_0xb814('0xc')]=_0x44931c[_0xb814('0xc')];this[_0xb814('0xd')]={};this[_0xb814('0xe')]=0x0;this[_0xb814('0x1')]='';this[_0xb814('0xf')]();this[_0xb814('0x10')]();}OpenchannelQueue[_0xb814('0x11')][_0xb814('0xf')]=function(){var _0x4b5f14=this[_0xb814('0xd')]['_rr'];this[_0xb814('0xd')]=_[_0xb814('0x12')](this[_0xb814('0xc')],'id');this[_0xb814('0xd')][_0xb814('0x13')]=_0x4b5f14;};OpenchannelQueue[_0xb814('0x11')][_0xb814('0x10')]=function(){this[_0xb814('0x14')]=0x0;this[_0xb814('0x15')]=0x0;for(var _0x2ab627=0x0;_0x2ab627=0x0?this['available']:0x0;var _0x270598={'id':this['id'],'available':this[_0xb814('0x19')],'loggedIn':this['loggedIn'],'name':this['name'],'paused':this['paused'],'waiting':this[_0xb814('0xe')]};var _0x4d5276=md5(JSON['stringify'](_0x270598));if(this[_0xb814('0x1')]!==_0x4d5276){this[_0xb814('0x1')]=_0x4d5276;io['to'](util[_0xb814('0x1a')]('openchannel:queue:%s',_0x270598[_0xb814('0x8')]))['emit'](_0xb814('0x1b'),_0x270598);}};module[_0xb814('0x1c')]=OpenchannelQueue; \ No newline at end of file +var _0x814b=['prototype','map','_rr','loggedIn','paused','length','online','openchannelPause','available','format','openchannel_queue:save','exports','lodash','md5','util','ioredis','../../../config/environment','redis','localhost','socket.io-emitter','name','timeout','strategy','beepall','Agents','mapAgentsId','waiting','updateRouting','updateRealtime'];(function(_0x2815f7,_0x3ae3a4){var _0x55ed85=function(_0x3d4503){while(--_0x3d4503){_0x2815f7['push'](_0x2815f7['shift']());}};_0x55ed85(++_0x3ae3a4);}(_0x814b,0x1a2));var _0xb814=function(_0x2a5b3b,_0x4ebe31){_0x2a5b3b=_0x2a5b3b-0x0;var _0xae665a=_0x814b[_0x2a5b3b];return _0xae665a;};'use strict';var _=require(_0xb814('0x0'));var md5=require(_0xb814('0x1'));var util=require(_0xb814('0x2'));var Redis=require(_0xb814('0x3'));var config=require(_0xb814('0x4'));config[_0xb814('0x5')]=_['defaults'](config[_0xb814('0x5')],{'host':_0xb814('0x6'),'port':0x18eb});var io=require(_0xb814('0x7'))(new Redis(config[_0xb814('0x5')]));function OpenchannelQueue(_0x44931c){this['id']=_0x44931c['id']||0x0;this[_0xb814('0x8')]=_0x44931c['name']||'';this[_0xb814('0x9')]=_0x44931c[_0xb814('0x9')]||0xa;this['strategy']=_0x44931c[_0xb814('0xa')]||_0xb814('0xb');this[_0xb814('0xc')]=_0x44931c[_0xb814('0xc')];this[_0xb814('0xd')]={};this[_0xb814('0xe')]=0x0;this[_0xb814('0x1')]='';this[_0xb814('0xf')]();this[_0xb814('0x10')]();}OpenchannelQueue[_0xb814('0x11')][_0xb814('0xf')]=function(){var _0x4b5f14=this[_0xb814('0xd')]['_rr'];this[_0xb814('0xd')]=_[_0xb814('0x12')](this[_0xb814('0xc')],'id');this[_0xb814('0xd')][_0xb814('0x13')]=_0x4b5f14;};OpenchannelQueue[_0xb814('0x11')][_0xb814('0x10')]=function(){this[_0xb814('0x14')]=0x0;this[_0xb814('0x15')]=0x0;for(var _0x2ab627=0x0;_0x2ab627=0x0?this['available']:0x0;var _0x270598={'id':this['id'],'available':this[_0xb814('0x19')],'loggedIn':this['loggedIn'],'name':this['name'],'paused':this['paused'],'waiting':this[_0xb814('0xe')]};var _0x4d5276=md5(JSON['stringify'](_0x270598));if(this[_0xb814('0x1')]!==_0x4d5276){this[_0xb814('0x1')]=_0x4d5276;io['to'](util[_0xb814('0x1a')]('openchannel:queue:%s',_0x270598[_0xb814('0x8')]))['emit'](_0xb814('0x1b'),_0x270598);}};module[_0xb814('0x1c')]=OpenchannelQueue; \ No newline at end of file diff --git a/server/services/routing/model/smsQueue.js b/server/services/routing/model/smsQueue.js index b94c10d..02d583e 100644 --- a/server/services/routing/model/smsQueue.js +++ b/server/services/routing/model/smsQueue.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x5455=['emit','sms_queue:save','md5','util','ioredis','../../../config/environment','redis','defaults','timeout','strategy','beepall','Agents','mapAgentsId','waiting','updateRouting','updateRealtime','prototype','map','paused','length','online','loggedIn','smsPause','available','stringify','sms:queue:%s','name'];(function(_0x30dafb,_0x479d80){var _0x24f760=function(_0x170f88){while(--_0x170f88){_0x30dafb['push'](_0x30dafb['shift']());}};_0x24f760(++_0x479d80);}(_0x5455,0x197));var _0x5545=function(_0x8c43de,_0x90ff31){_0x8c43de=_0x8c43de-0x0;var _0xa6591b=_0x5455[_0x8c43de];return _0xa6591b;};'use strict';var _=require('lodash');var md5=require(_0x5545('0x0'));var util=require(_0x5545('0x1'));var Redis=require(_0x5545('0x2'));var config=require(_0x5545('0x3'));config[_0x5545('0x4')]=_[_0x5545('0x5')](config[_0x5545('0x4')],{'host':'localhost','port':0x18eb});var io=require('socket.io-emitter')(new Redis(config[_0x5545('0x4')]));function SmsQueue(_0x6688e5){this['id']=_0x6688e5['id']||0x0;this['name']=_0x6688e5['name']||'';this[_0x5545('0x6')]=_0x6688e5[_0x5545('0x6')]||0xa;this['strategy']=_0x6688e5[_0x5545('0x7')]||_0x5545('0x8');this['Agents']=_0x6688e5[_0x5545('0x9')];this[_0x5545('0xa')]={};this[_0x5545('0xb')]=0x0;this[_0x5545('0x0')]='';this[_0x5545('0xc')]();this[_0x5545('0xd')]();}SmsQueue[_0x5545('0xe')][_0x5545('0xc')]=function(){var _0xbb13a0=this['mapAgentsId']['_rr'];this[_0x5545('0xa')]=_[_0x5545('0xf')](this[_0x5545('0x9')],'id');this[_0x5545('0xa')]['_rr']=_0xbb13a0;};SmsQueue[_0x5545('0xe')][_0x5545('0xd')]=function(){this['loggedIn']=0x0;this[_0x5545('0x10')]=0x0;for(var _0x167f3d=0x0;_0x167f3d=0x0?this[_0x5545('0x15')]:0x0;var _0x373f92={'id':this['id'],'available':this['available'],'loggedIn':this[_0x5545('0x13')],'name':this['name'],'paused':this['paused'],'waiting':this['waiting']};var _0x5f13ef=md5(JSON[_0x5545('0x16')](_0x373f92));if(this[_0x5545('0x0')]!==_0x5f13ef){this[_0x5545('0x0')]=_0x5f13ef;io['to'](util['format'](_0x5545('0x17'),_0x373f92[_0x5545('0x18')]))[_0x5545('0x19')](_0x5545('0x1a'),_0x373f92);}};module['exports']=SmsQueue; \ No newline at end of file +var _0x2121=['format','sms:queue:%s','sms_queue:save','exports','lodash','md5','../../../config/environment','redis','defaults','localhost','name','timeout','strategy','Agents','mapAgentsId','waiting','updateRouting','_rr','map','prototype','updateRealtime','loggedIn','paused','length','online','available','stringify'];(function(_0x2d60d3,_0x344066){var _0x333608=function(_0x2e3385){while(--_0x2e3385){_0x2d60d3['push'](_0x2d60d3['shift']());}};_0x333608(++_0x344066);}(_0x2121,0x1b4));var _0x1212=function(_0x5b86c8,_0xc9eeba){_0x5b86c8=_0x5b86c8-0x0;var _0x16c10a=_0x2121[_0x5b86c8];return _0x16c10a;};'use strict';var _=require(_0x1212('0x0'));var md5=require(_0x1212('0x1'));var util=require('util');var Redis=require('ioredis');var config=require(_0x1212('0x2'));config[_0x1212('0x3')]=_[_0x1212('0x4')](config[_0x1212('0x3')],{'host':_0x1212('0x5'),'port':0x18eb});var io=require('socket.io-emitter')(new Redis(config[_0x1212('0x3')]));function SmsQueue(_0x4c8877){this['id']=_0x4c8877['id']||0x0;this[_0x1212('0x6')]=_0x4c8877[_0x1212('0x6')]||'';this[_0x1212('0x7')]=_0x4c8877[_0x1212('0x7')]||0xa;this[_0x1212('0x8')]=_0x4c8877[_0x1212('0x8')]||'beepall';this[_0x1212('0x9')]=_0x4c8877[_0x1212('0x9')];this[_0x1212('0xa')]={};this[_0x1212('0xb')]=0x0;this[_0x1212('0x1')]='';this[_0x1212('0xc')]();this['updateRealtime']();}SmsQueue['prototype'][_0x1212('0xc')]=function(){var _0x2109ee=this[_0x1212('0xa')][_0x1212('0xd')];this['mapAgentsId']=_[_0x1212('0xe')](this[_0x1212('0x9')],'id');this[_0x1212('0xa')][_0x1212('0xd')]=_0x2109ee;};SmsQueue[_0x1212('0xf')][_0x1212('0x10')]=function(){this[_0x1212('0x11')]=0x0;this[_0x1212('0x12')]=0x0;for(var _0x469cf6=0x0;_0x469cf6=0x0?this[_0x1212('0x15')]:0x0;var _0x3face0={'id':this['id'],'available':this[_0x1212('0x15')],'loggedIn':this[_0x1212('0x11')],'name':this[_0x1212('0x6')],'paused':this['paused'],'waiting':this[_0x1212('0xb')]};var _0x1333ec=md5(JSON[_0x1212('0x16')](_0x3face0));if(this[_0x1212('0x1')]!==_0x1333ec){this[_0x1212('0x1')]=_0x1333ec;io['to'](util[_0x1212('0x17')](_0x1212('0x18'),_0x3face0[_0x1212('0x6')]))['emit'](_0x1212('0x19'),_0x3face0);}};module[_0x1212('0x1a')]=SmsQueue; \ No newline at end of file diff --git a/server/services/routing/model/whatsappQueue.js b/server/services/routing/model/whatsappQueue.js index 08b1b55..cd9c7e1 100644 --- a/server/services/routing/model/whatsappQueue.js +++ b/server/services/routing/model/whatsappQueue.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x01db=['updateRealtime','prototype','_rr','loggedIn','length','online','whatsappPause','available','paused','waiting','stringify','format','name','emit','whatsapp_queue:save','lodash','md5','util','ioredis','../../../config/environment','redis','defaults','localhost','socket.io-emitter','timeout','strategy','beepall','Agents','mapAgentsId','updateRouting'];(function(_0x2186d2,_0x5e8d89){var _0x263c53=function(_0x50c28c){while(--_0x50c28c){_0x2186d2['push'](_0x2186d2['shift']());}};_0x263c53(++_0x5e8d89);}(_0x01db,0x1d1));var _0xb01d=function(_0x32fa40,_0x1341e3){_0x32fa40=_0x32fa40-0x0;var _0xf9fe8e=_0x01db[_0x32fa40];return _0xf9fe8e;};'use strict';var _=require(_0xb01d('0x0'));var md5=require(_0xb01d('0x1'));var util=require(_0xb01d('0x2'));var Redis=require(_0xb01d('0x3'));var config=require(_0xb01d('0x4'));config[_0xb01d('0x5')]=_[_0xb01d('0x6')](config[_0xb01d('0x5')],{'host':_0xb01d('0x7'),'port':0x18eb});var io=require(_0xb01d('0x8'))(new Redis(config[_0xb01d('0x5')]));function WhatsappQueue(_0x4ee50e){this['id']=_0x4ee50e['id']||0x0;this['name']=_0x4ee50e['name']||'';this['timeout']=_0x4ee50e[_0xb01d('0x9')]||0xa;this[_0xb01d('0xa')]=_0x4ee50e[_0xb01d('0xa')]||_0xb01d('0xb');this['Agents']=_0x4ee50e[_0xb01d('0xc')];this[_0xb01d('0xd')]={};this['waiting']=0x0;this['md5']='';this[_0xb01d('0xe')]();this[_0xb01d('0xf')]();}WhatsappQueue[_0xb01d('0x10')][_0xb01d('0xe')]=function(){var _0x462f96=this[_0xb01d('0xd')][_0xb01d('0x11')];this[_0xb01d('0xd')]=_['map'](this[_0xb01d('0xc')],'id');this[_0xb01d('0xd')][_0xb01d('0x11')]=_0x462f96;};WhatsappQueue[_0xb01d('0x10')]['updateRealtime']=function(){this[_0xb01d('0x12')]=0x0;this['paused']=0x0;for(var _0x2ff1c4=0x0;_0x2ff1c4=0x0?this[_0xb01d('0x16')]:0x0;var _0x125943={'id':this['id'],'available':this[_0xb01d('0x16')],'loggedIn':this[_0xb01d('0x12')],'name':this['name'],'paused':this[_0xb01d('0x17')],'waiting':this[_0xb01d('0x18')]};var _0x51573f=md5(JSON[_0xb01d('0x19')](_0x125943));if(this[_0xb01d('0x1')]!==_0x51573f){this[_0xb01d('0x1')]=_0x51573f;io['to'](util[_0xb01d('0x1a')]('whatsapp:queue:%s',_0x125943[_0xb01d('0x1b')]))[_0xb01d('0x1c')](_0xb01d('0x1d'),_0x125943);}};module['exports']=WhatsappQueue; \ No newline at end of file +var _0x4586=['md5','updateRouting','updateRealtime','prototype','map','_rr','loggedIn','paused','length','online','whatsappPause','available','name','stringify','format','emit','exports','lodash','ioredis','../../../config/environment','defaults','redis','socket.io-emitter','timeout','strategy','Agents','mapAgentsId','waiting'];(function(_0x3fd49d,_0x239770){var _0x1e0148=function(_0x540f8e){while(--_0x540f8e){_0x3fd49d['push'](_0x3fd49d['shift']());}};_0x1e0148(++_0x239770);}(_0x4586,0x199));var _0x6458=function(_0x2bbe8d,_0x5156c2){_0x2bbe8d=_0x2bbe8d-0x0;var _0x539e7a=_0x4586[_0x2bbe8d];return _0x539e7a;};'use strict';var _=require(_0x6458('0x0'));var md5=require('md5');var util=require('util');var Redis=require(_0x6458('0x1'));var config=require(_0x6458('0x2'));config['redis']=_[_0x6458('0x3')](config[_0x6458('0x4')],{'host':'localhost','port':0x18eb});var io=require(_0x6458('0x5'))(new Redis(config[_0x6458('0x4')]));function WhatsappQueue(_0x385c7c){this['id']=_0x385c7c['id']||0x0;this['name']=_0x385c7c['name']||'';this[_0x6458('0x6')]=_0x385c7c[_0x6458('0x6')]||0xa;this[_0x6458('0x7')]=_0x385c7c[_0x6458('0x7')]||'beepall';this[_0x6458('0x8')]=_0x385c7c['Agents'];this[_0x6458('0x9')]={};this[_0x6458('0xa')]=0x0;this[_0x6458('0xb')]='';this[_0x6458('0xc')]();this[_0x6458('0xd')]();}WhatsappQueue[_0x6458('0xe')][_0x6458('0xc')]=function(){var _0x3538a1=this['mapAgentsId']['_rr'];this['mapAgentsId']=_[_0x6458('0xf')](this['Agents'],'id');this[_0x6458('0x9')][_0x6458('0x10')]=_0x3538a1;};WhatsappQueue[_0x6458('0xe')]['updateRealtime']=function(){this[_0x6458('0x11')]=0x0;this[_0x6458('0x12')]=0x0;for(var _0x2be06b=0x0;_0x2be06b=0x0?this[_0x6458('0x16')]:0x0;var _0x2ece50={'id':this['id'],'available':this[_0x6458('0x16')],'loggedIn':this[_0x6458('0x11')],'name':this[_0x6458('0x17')],'paused':this[_0x6458('0x12')],'waiting':this[_0x6458('0xa')]};var _0x2b8d43=md5(JSON[_0x6458('0x18')](_0x2ece50));if(this[_0x6458('0xb')]!==_0x2b8d43){this['md5']=_0x2b8d43;io['to'](util[_0x6458('0x19')]('whatsapp:queue:%s',_0x2ece50[_0x6458('0x17')]))[_0x6458('0x1a')]('whatsapp_queue:save',_0x2ece50);}};module[_0x6458('0x1b')]=WhatsappQueue; \ No newline at end of file diff --git a/server/services/routing/realtime/index.js b/server/services/routing/realtime/index.js index 2918bfb..c0ea76e 100644 --- a/server/services/routing/realtime/index.js +++ b/server/services/routing/realtime/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xb10b=['faxQueues','whatsappQueues','chatQueuesWaitingInteractions','mailQueuesWaitingInteractions','openchannelQueuesWaitingInteractions','smsQueuesWaitingInteractions','mapKeys','hasOwnProperty','prototype','mergeFromDatabase','initAgents','agents','isUndefined','initIntervals','length','initOpenchannelQueues','updateRealtime','initChatQueues','chatQueues','initSmsQueues','updateRouting','initMailQueues','initFaxQueues','initWhatsappQueues','exports','bluebird','lodash','moment','../model/agent','../model/openchannelQueue','../model/chatQueue','../model/smsQueue','../model/mailQueue','../model/faxQueue','../model/whatsappQueue','intervals','openchannelQueues','smsQueues','mailQueues'];(function(_0x301b55,_0x400d25){var _0x2354a9=function(_0xc11c11){while(--_0xc11c11){_0x301b55['push'](_0x301b55['shift']());}};_0x2354a9(++_0x400d25);}(_0xb10b,0x12a));var _0xbb10=function(_0x1dab5f,_0x10cd21){_0x1dab5f=_0x1dab5f-0x0;var _0x40c2f3=_0xb10b[_0x1dab5f];return _0x40c2f3;};'use strict';var BPromise=require(_0xbb10('0x0'));var util=require('util');var _=require(_0xbb10('0x1'));var moment=require(_0xbb10('0x2'));var Agent=require(_0xbb10('0x3'));var Interval=require('../model/interval');var OpenchannelQueue=require(_0xbb10('0x4'));var ChatQueue=require(_0xbb10('0x5'));var SmsQueue=require(_0xbb10('0x6'));var MailQueue=require(_0xbb10('0x7'));var FaxQueue=require(_0xbb10('0x8'));var WhatsappQueue=require(_0xbb10('0x9'));var Realtime=function(){this['agents']={};this[_0xbb10('0xa')]={};this[_0xbb10('0xb')]={};this['chatQueues']={};this[_0xbb10('0xc')]={};this[_0xbb10('0xd')]={};this[_0xbb10('0xe')]={};this[_0xbb10('0xf')]={};this[_0xbb10('0x10')]={};this[_0xbb10('0x11')]={};this[_0xbb10('0x12')]={};this[_0xbb10('0x13')]={};this['faxQueuesWaitingInteractions']={};this['whatsappQueuesWaitingInteractions']={};};function freeIsNotKey(_0x20bd61,_0x118a74,_0xce64f3){var _0x5e136d=_[_0xbb10('0x14')](_0x20bd61,function(_0x5be7e0,_0x44fb19){return _0x5be7e0[_0xce64f3];});for(var _0x916a32 in _0x118a74){if(_0x118a74[_0xbb10('0x15')](_0x916a32)){if(!_0x5e136d[_0x916a32]){delete _0x118a74[_0x916a32];}}}}Realtime[_0xbb10('0x16')][_0xbb10('0x17')]=function(_0x147230,_0x58a612){for(var _0x26e021 in _0x58a612){if(_0x147230[_0xbb10('0x15')](_0x26e021)){_0x147230[_0x26e021]=_0x58a612[_0x26e021];}}};Realtime[_0xbb10('0x16')][_0xbb10('0x18')]=function(){var _0x3df17b=this;return function(_0x2f2ebf){if(_0x2f2ebf){freeIsNotKey(_0x2f2ebf,_0x3df17b[_0xbb10('0x19')],'id');for(var _0x36b5e8=0x0,_0x3e26f4={},_0x2b184e={};_0x36b5e8<_0x2f2ebf['length'];_0x36b5e8+=0x1){_0x3e26f4=_0x2f2ebf[_0x36b5e8];if(_[_0xbb10('0x1a')](_0x3df17b[_0xbb10('0x19')][_0x3e26f4['id']])){_0x3df17b[_0xbb10('0x19')][_0x3e26f4['id']]=new Agent(_0x3e26f4);}else{_0x3df17b[_0xbb10('0x17')](_0x3df17b[_0xbb10('0x19')][_0x3e26f4['id']],_0x3e26f4);}}}return _0x3df17b[_0xbb10('0x19')];};};Realtime[_0xbb10('0x16')][_0xbb10('0x1b')]=function(){var _0xbf2906=this;return function(_0xe1c665){if(_0xe1c665){freeIsNotKey(_0xe1c665,_0xbf2906['intervals'],'id');for(var _0x5ff0cf=0x0,_0x19f48d={},_0x388fab={};_0x5ff0cf<_0xe1c665[_0xbb10('0x1c')];_0x5ff0cf+=0x1){_0x19f48d=_0xe1c665[_0x5ff0cf];if(_[_0xbb10('0x1a')](_0xbf2906[_0xbb10('0xa')][_0x19f48d['id']])){_0xbf2906['intervals'][_0x19f48d['id']]=new Interval(_0x19f48d);}else{_0xbf2906[_0xbb10('0x17')](_0xbf2906[_0xbb10('0xa')][_0x19f48d['id']],_0x19f48d);}}}return _0xbf2906['intervals'];};};Realtime['prototype'][_0xbb10('0x1d')]=function(){var _0x311abe=this;return function(_0x2e911d){if(_0x2e911d){freeIsNotKey(_0x2e911d,_0x311abe[_0xbb10('0xb')],'id');for(var _0x445761=0x0,_0x1824b7={},_0x407cb4={};_0x445761<_0x2e911d[_0xbb10('0x1c')];_0x445761+=0x1){_0x1824b7=_0x2e911d[_0x445761];if(_[_0xbb10('0x1a')](_0x311abe[_0xbb10('0xb')][_0x1824b7['id']])){_0x311abe[_0xbb10('0xb')][_0x1824b7['id']]=new OpenchannelQueue(_0x1824b7);}else{_0x311abe[_0xbb10('0x17')](_0x311abe['openchannelQueues'][_0x1824b7['id']],_0x1824b7);}_0x311abe['openchannelQueues'][_0x1824b7['id']]['updateRouting']();_0x311abe[_0xbb10('0xb')][_0x1824b7['id']][_0xbb10('0x1e')]();}}return _0x311abe[_0xbb10('0xb')];};};Realtime['prototype'][_0xbb10('0x1f')]=function(){var _0x24d586=this;return function(_0x6ed43b){if(_0x6ed43b){freeIsNotKey(_0x6ed43b,_0x24d586[_0xbb10('0x20')],'id');for(var _0x1acce9=0x0,_0x20d946={},_0x2a0e8b={};_0x1acce9<_0x6ed43b['length'];_0x1acce9+=0x1){_0x20d946=_0x6ed43b[_0x1acce9];if(_[_0xbb10('0x1a')](_0x24d586[_0xbb10('0x20')][_0x20d946['id']])){_0x24d586[_0xbb10('0x20')][_0x20d946['id']]=new ChatQueue(_0x20d946);}else{_0x24d586[_0xbb10('0x17')](_0x24d586[_0xbb10('0x20')][_0x20d946['id']],_0x20d946);}_0x24d586[_0xbb10('0x20')][_0x20d946['id']]['updateRouting']();_0x24d586[_0xbb10('0x20')][_0x20d946['id']]['updateRealtime']();}}return _0x24d586[_0xbb10('0x20')];};};Realtime['prototype'][_0xbb10('0x21')]=function(){var _0x1dcc9c=this;return function(_0x1b59f9){if(_0x1b59f9){freeIsNotKey(_0x1b59f9,_0x1dcc9c['smsQueues'],'id');for(var _0x518d47=0x0,_0x4c3744={},_0x34f65e={};_0x518d47<_0x1b59f9['length'];_0x518d47+=0x1){_0x4c3744=_0x1b59f9[_0x518d47];if(_[_0xbb10('0x1a')](_0x1dcc9c[_0xbb10('0xc')][_0x4c3744['id']])){_0x1dcc9c[_0xbb10('0xc')][_0x4c3744['id']]=new SmsQueue(_0x4c3744);}else{_0x1dcc9c[_0xbb10('0x17')](_0x1dcc9c[_0xbb10('0xc')][_0x4c3744['id']],_0x4c3744);}_0x1dcc9c[_0xbb10('0xc')][_0x4c3744['id']][_0xbb10('0x22')]();_0x1dcc9c['smsQueues'][_0x4c3744['id']][_0xbb10('0x1e')]();}}return _0x1dcc9c[_0xbb10('0xc')];};};Realtime[_0xbb10('0x16')][_0xbb10('0x23')]=function(){var _0xfb2c5e=this;return function(_0x9de708){if(_0x9de708){freeIsNotKey(_0x9de708,_0xfb2c5e[_0xbb10('0xd')],'id');for(var _0x10202c=0x0,_0x3c8d7d={},_0x56943c={};_0x10202c<_0x9de708[_0xbb10('0x1c')];_0x10202c+=0x1){_0x3c8d7d=_0x9de708[_0x10202c];if(_[_0xbb10('0x1a')](_0xfb2c5e[_0xbb10('0xd')][_0x3c8d7d['id']])){_0xfb2c5e[_0xbb10('0xd')][_0x3c8d7d['id']]=new MailQueue(_0x3c8d7d);}else{_0xfb2c5e['mergeFromDatabase'](_0xfb2c5e[_0xbb10('0xd')][_0x3c8d7d['id']],_0x3c8d7d);}_0xfb2c5e['mailQueues'][_0x3c8d7d['id']]['updateRouting']();_0xfb2c5e[_0xbb10('0xd')][_0x3c8d7d['id']][_0xbb10('0x1e')]();}}return _0xfb2c5e[_0xbb10('0xd')];};};Realtime[_0xbb10('0x16')][_0xbb10('0x24')]=function(){var _0x29d11a=this;return function(_0x547062){if(_0x547062){freeIsNotKey(_0x547062,_0x29d11a[_0xbb10('0xe')],'id');for(var _0x25d72f=0x0,_0x52de31={},_0x5e3fbd={};_0x25d72f<_0x547062['length'];_0x25d72f+=0x1){_0x52de31=_0x547062[_0x25d72f];if(_[_0xbb10('0x1a')](_0x29d11a[_0xbb10('0xe')][_0x52de31['id']])){_0x29d11a[_0xbb10('0xe')][_0x52de31['id']]=new FaxQueue(_0x52de31);}else{_0x29d11a['mergeFromDatabase'](_0x29d11a[_0xbb10('0xe')][_0x52de31['id']],_0x52de31);}_0x29d11a[_0xbb10('0xe')][_0x52de31['id']][_0xbb10('0x22')]();_0x29d11a['faxQueues'][_0x52de31['id']][_0xbb10('0x1e')]();}}return _0x29d11a[_0xbb10('0xe')];};};Realtime[_0xbb10('0x16')][_0xbb10('0x25')]=function(){var _0x4f1cdd=this;return function(_0xd238e9){if(_0xd238e9){freeIsNotKey(_0xd238e9,_0x4f1cdd[_0xbb10('0xf')],'id');for(var _0x5835fd=0x0,_0xe2040f={},_0x2e3214={};_0x5835fd<_0xd238e9[_0xbb10('0x1c')];_0x5835fd+=0x1){_0xe2040f=_0xd238e9[_0x5835fd];if(_[_0xbb10('0x1a')](_0x4f1cdd[_0xbb10('0xf')][_0xe2040f['id']])){_0x4f1cdd[_0xbb10('0xf')][_0xe2040f['id']]=new WhatsappQueue(_0xe2040f);}else{_0x4f1cdd['mergeFromDatabase'](_0x4f1cdd[_0xbb10('0xf')][_0xe2040f['id']],_0xe2040f);}_0x4f1cdd[_0xbb10('0xf')][_0xe2040f['id']][_0xbb10('0x22')]();_0x4f1cdd[_0xbb10('0xf')][_0xe2040f['id']]['updateRealtime']();}}return _0x4f1cdd[_0xbb10('0xf')];};};module[_0xbb10('0x26')]=Realtime; \ No newline at end of file +var _0xb10b=['faxQueues','whatsappQueues','chatQueuesWaitingInteractions','mailQueuesWaitingInteractions','openchannelQueuesWaitingInteractions','smsQueuesWaitingInteractions','mapKeys','hasOwnProperty','prototype','mergeFromDatabase','initAgents','agents','isUndefined','initIntervals','length','initOpenchannelQueues','updateRealtime','initChatQueues','chatQueues','initSmsQueues','updateRouting','initMailQueues','initFaxQueues','initWhatsappQueues','exports','bluebird','lodash','moment','../model/agent','../model/openchannelQueue','../model/chatQueue','../model/smsQueue','../model/mailQueue','../model/faxQueue','../model/whatsappQueue','intervals','openchannelQueues','smsQueues','mailQueues'];(function(_0x3dff25,_0x56ad87){var _0x14529c=function(_0x301afe){while(--_0x301afe){_0x3dff25['push'](_0x3dff25['shift']());}};_0x14529c(++_0x56ad87);}(_0xb10b,0x12a));var _0xbb10=function(_0xd9caad,_0x5856b7){_0xd9caad=_0xd9caad-0x0;var _0x3127e6=_0xb10b[_0xd9caad];return _0x3127e6;};'use strict';var BPromise=require(_0xbb10('0x0'));var util=require('util');var _=require(_0xbb10('0x1'));var moment=require(_0xbb10('0x2'));var Agent=require(_0xbb10('0x3'));var Interval=require('../model/interval');var OpenchannelQueue=require(_0xbb10('0x4'));var ChatQueue=require(_0xbb10('0x5'));var SmsQueue=require(_0xbb10('0x6'));var MailQueue=require(_0xbb10('0x7'));var FaxQueue=require(_0xbb10('0x8'));var WhatsappQueue=require(_0xbb10('0x9'));var Realtime=function(){this['agents']={};this[_0xbb10('0xa')]={};this[_0xbb10('0xb')]={};this['chatQueues']={};this[_0xbb10('0xc')]={};this[_0xbb10('0xd')]={};this[_0xbb10('0xe')]={};this[_0xbb10('0xf')]={};this[_0xbb10('0x10')]={};this[_0xbb10('0x11')]={};this[_0xbb10('0x12')]={};this[_0xbb10('0x13')]={};this['faxQueuesWaitingInteractions']={};this['whatsappQueuesWaitingInteractions']={};};function freeIsNotKey(_0x20bd61,_0x118a74,_0xce64f3){var _0x5e136d=_[_0xbb10('0x14')](_0x20bd61,function(_0x5be7e0,_0x44fb19){return _0x5be7e0[_0xce64f3];});for(var _0x916a32 in _0x118a74){if(_0x118a74[_0xbb10('0x15')](_0x916a32)){if(!_0x5e136d[_0x916a32]){delete _0x118a74[_0x916a32];}}}}Realtime[_0xbb10('0x16')][_0xbb10('0x17')]=function(_0x147230,_0x58a612){for(var _0x26e021 in _0x58a612){if(_0x147230[_0xbb10('0x15')](_0x26e021)){_0x147230[_0x26e021]=_0x58a612[_0x26e021];}}};Realtime[_0xbb10('0x16')][_0xbb10('0x18')]=function(){var _0x3df17b=this;return function(_0x2f2ebf){if(_0x2f2ebf){freeIsNotKey(_0x2f2ebf,_0x3df17b[_0xbb10('0x19')],'id');for(var _0x36b5e8=0x0,_0x3e26f4={},_0x2b184e={};_0x36b5e8<_0x2f2ebf['length'];_0x36b5e8+=0x1){_0x3e26f4=_0x2f2ebf[_0x36b5e8];if(_[_0xbb10('0x1a')](_0x3df17b[_0xbb10('0x19')][_0x3e26f4['id']])){_0x3df17b[_0xbb10('0x19')][_0x3e26f4['id']]=new Agent(_0x3e26f4);}else{_0x3df17b[_0xbb10('0x17')](_0x3df17b[_0xbb10('0x19')][_0x3e26f4['id']],_0x3e26f4);}}}return _0x3df17b[_0xbb10('0x19')];};};Realtime[_0xbb10('0x16')][_0xbb10('0x1b')]=function(){var _0xbf2906=this;return function(_0xe1c665){if(_0xe1c665){freeIsNotKey(_0xe1c665,_0xbf2906['intervals'],'id');for(var _0x5ff0cf=0x0,_0x19f48d={},_0x388fab={};_0x5ff0cf<_0xe1c665[_0xbb10('0x1c')];_0x5ff0cf+=0x1){_0x19f48d=_0xe1c665[_0x5ff0cf];if(_[_0xbb10('0x1a')](_0xbf2906[_0xbb10('0xa')][_0x19f48d['id']])){_0xbf2906['intervals'][_0x19f48d['id']]=new Interval(_0x19f48d);}else{_0xbf2906[_0xbb10('0x17')](_0xbf2906[_0xbb10('0xa')][_0x19f48d['id']],_0x19f48d);}}}return _0xbf2906['intervals'];};};Realtime['prototype'][_0xbb10('0x1d')]=function(){var _0x311abe=this;return function(_0x2e911d){if(_0x2e911d){freeIsNotKey(_0x2e911d,_0x311abe[_0xbb10('0xb')],'id');for(var _0x445761=0x0,_0x1824b7={},_0x407cb4={};_0x445761<_0x2e911d[_0xbb10('0x1c')];_0x445761+=0x1){_0x1824b7=_0x2e911d[_0x445761];if(_[_0xbb10('0x1a')](_0x311abe[_0xbb10('0xb')][_0x1824b7['id']])){_0x311abe[_0xbb10('0xb')][_0x1824b7['id']]=new OpenchannelQueue(_0x1824b7);}else{_0x311abe[_0xbb10('0x17')](_0x311abe['openchannelQueues'][_0x1824b7['id']],_0x1824b7);}_0x311abe['openchannelQueues'][_0x1824b7['id']]['updateRouting']();_0x311abe[_0xbb10('0xb')][_0x1824b7['id']][_0xbb10('0x1e')]();}}return _0x311abe[_0xbb10('0xb')];};};Realtime['prototype'][_0xbb10('0x1f')]=function(){var _0x24d586=this;return function(_0x6ed43b){if(_0x6ed43b){freeIsNotKey(_0x6ed43b,_0x24d586[_0xbb10('0x20')],'id');for(var _0x1acce9=0x0,_0x20d946={},_0x2a0e8b={};_0x1acce9<_0x6ed43b['length'];_0x1acce9+=0x1){_0x20d946=_0x6ed43b[_0x1acce9];if(_[_0xbb10('0x1a')](_0x24d586[_0xbb10('0x20')][_0x20d946['id']])){_0x24d586[_0xbb10('0x20')][_0x20d946['id']]=new ChatQueue(_0x20d946);}else{_0x24d586[_0xbb10('0x17')](_0x24d586[_0xbb10('0x20')][_0x20d946['id']],_0x20d946);}_0x24d586[_0xbb10('0x20')][_0x20d946['id']]['updateRouting']();_0x24d586[_0xbb10('0x20')][_0x20d946['id']]['updateRealtime']();}}return _0x24d586[_0xbb10('0x20')];};};Realtime['prototype'][_0xbb10('0x21')]=function(){var _0x1dcc9c=this;return function(_0x1b59f9){if(_0x1b59f9){freeIsNotKey(_0x1b59f9,_0x1dcc9c['smsQueues'],'id');for(var _0x518d47=0x0,_0x4c3744={},_0x34f65e={};_0x518d47<_0x1b59f9['length'];_0x518d47+=0x1){_0x4c3744=_0x1b59f9[_0x518d47];if(_[_0xbb10('0x1a')](_0x1dcc9c[_0xbb10('0xc')][_0x4c3744['id']])){_0x1dcc9c[_0xbb10('0xc')][_0x4c3744['id']]=new SmsQueue(_0x4c3744);}else{_0x1dcc9c[_0xbb10('0x17')](_0x1dcc9c[_0xbb10('0xc')][_0x4c3744['id']],_0x4c3744);}_0x1dcc9c[_0xbb10('0xc')][_0x4c3744['id']][_0xbb10('0x22')]();_0x1dcc9c['smsQueues'][_0x4c3744['id']][_0xbb10('0x1e')]();}}return _0x1dcc9c[_0xbb10('0xc')];};};Realtime[_0xbb10('0x16')][_0xbb10('0x23')]=function(){var _0xfb2c5e=this;return function(_0x9de708){if(_0x9de708){freeIsNotKey(_0x9de708,_0xfb2c5e[_0xbb10('0xd')],'id');for(var _0x10202c=0x0,_0x3c8d7d={},_0x56943c={};_0x10202c<_0x9de708[_0xbb10('0x1c')];_0x10202c+=0x1){_0x3c8d7d=_0x9de708[_0x10202c];if(_[_0xbb10('0x1a')](_0xfb2c5e[_0xbb10('0xd')][_0x3c8d7d['id']])){_0xfb2c5e[_0xbb10('0xd')][_0x3c8d7d['id']]=new MailQueue(_0x3c8d7d);}else{_0xfb2c5e['mergeFromDatabase'](_0xfb2c5e[_0xbb10('0xd')][_0x3c8d7d['id']],_0x3c8d7d);}_0xfb2c5e['mailQueues'][_0x3c8d7d['id']]['updateRouting']();_0xfb2c5e[_0xbb10('0xd')][_0x3c8d7d['id']][_0xbb10('0x1e')]();}}return _0xfb2c5e[_0xbb10('0xd')];};};Realtime[_0xbb10('0x16')][_0xbb10('0x24')]=function(){var _0x29d11a=this;return function(_0x547062){if(_0x547062){freeIsNotKey(_0x547062,_0x29d11a[_0xbb10('0xe')],'id');for(var _0x25d72f=0x0,_0x52de31={},_0x5e3fbd={};_0x25d72f<_0x547062['length'];_0x25d72f+=0x1){_0x52de31=_0x547062[_0x25d72f];if(_[_0xbb10('0x1a')](_0x29d11a[_0xbb10('0xe')][_0x52de31['id']])){_0x29d11a[_0xbb10('0xe')][_0x52de31['id']]=new FaxQueue(_0x52de31);}else{_0x29d11a['mergeFromDatabase'](_0x29d11a[_0xbb10('0xe')][_0x52de31['id']],_0x52de31);}_0x29d11a[_0xbb10('0xe')][_0x52de31['id']][_0xbb10('0x22')]();_0x29d11a['faxQueues'][_0x52de31['id']][_0xbb10('0x1e')]();}}return _0x29d11a[_0xbb10('0xe')];};};Realtime[_0xbb10('0x16')][_0xbb10('0x25')]=function(){var _0x4f1cdd=this;return function(_0xd238e9){if(_0xd238e9){freeIsNotKey(_0xd238e9,_0x4f1cdd[_0xbb10('0xf')],'id');for(var _0x5835fd=0x0,_0xe2040f={},_0x2e3214={};_0x5835fd<_0xd238e9[_0xbb10('0x1c')];_0x5835fd+=0x1){_0xe2040f=_0xd238e9[_0x5835fd];if(_[_0xbb10('0x1a')](_0x4f1cdd[_0xbb10('0xf')][_0xe2040f['id']])){_0x4f1cdd[_0xbb10('0xf')][_0xe2040f['id']]=new WhatsappQueue(_0xe2040f);}else{_0x4f1cdd['mergeFromDatabase'](_0x4f1cdd[_0xbb10('0xf')][_0xe2040f['id']],_0xe2040f);}_0x4f1cdd[_0xbb10('0xf')][_0xe2040f['id']][_0xbb10('0x22')]();_0x4f1cdd[_0xbb10('0xf')][_0xe2040f['id']]['updateRealtime']();}}return _0x4f1cdd[_0xbb10('0xf')];};};module[_0xbb10('0x26')]=Realtime; \ No newline at end of file diff --git a/server/services/routing/rpc/chatInteraction.js b/server/services/routing/rpc/chatInteraction.js index 1544b03..f7dec17 100644 --- a/server/services/routing/rpc/chatInteraction.js +++ b/server/services/routing/rpc/chatInteraction.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x4da7=['UpdateChatInteraction','updateChatInteraction','addTags','AddTagsToChatInteraction','addTagsToChatInteraction','../client','update','Request'];(function(_0x1dd82f,_0x52acb7){var _0x353ca4=function(_0x5ee4c9){while(--_0x5ee4c9){_0x1dd82f['push'](_0x1dd82f['shift']());}};_0x353ca4(++_0x52acb7);}(_0x4da7,0x145));var _0x74da=function(_0x1668c5,_0x578203){_0x1668c5=_0x1668c5-0x0;var _0x35d8a8=_0x4da7[_0x1668c5];return _0x35d8a8;};'use strict';var client=require(_0x74da('0x0'));exports[_0x74da('0x1')]=function(_0x9d7287,_0x1db936){return client[_0x74da('0x2')](_0x74da('0x3'),{'body':_0x1db936,'options':{'where':{'id':_0x9d7287}},'log':_0x74da('0x4')});};exports[_0x74da('0x5')]=function(_0x216743,_0x14ecd9){return client[_0x74da('0x2')](_0x74da('0x6'),{'body':_0x14ecd9,'options':{'where':{'id':_0x216743}},'log':_0x74da('0x7')});}; \ No newline at end of file +var _0xc900=['updateChatInteraction','addTags','AddTagsToChatInteraction','addTagsToChatInteraction','../client','update','Request'];(function(_0x377751,_0x36ece3){var _0x562a61=function(_0x22df56){while(--_0x22df56){_0x377751['push'](_0x377751['shift']());}};_0x562a61(++_0x36ece3);}(_0xc900,0x115));var _0x0c90=function(_0x48e073,_0x1d0102){_0x48e073=_0x48e073-0x0;var _0x10d905=_0xc900[_0x48e073];return _0x10d905;};'use strict';var client=require(_0x0c90('0x0'));exports[_0x0c90('0x1')]=function(_0x27212c,_0x59ef49){return client[_0x0c90('0x2')]('UpdateChatInteraction',{'body':_0x59ef49,'options':{'where':{'id':_0x27212c}},'log':_0x0c90('0x3')});};exports[_0x0c90('0x4')]=function(_0x3f4825,_0x3e5415){return client[_0x0c90('0x2')](_0x0c90('0x5'),{'body':_0x3e5415,'options':{'where':{'id':_0x3f4825}},'log':_0x0c90('0x6')});}; \ No newline at end of file diff --git a/server/services/routing/rpc/chatMessage.js b/server/services/routing/rpc/chatMessage.js index de3daab..d1fa0b6 100644 --- a/server/services/routing/rpc/chatMessage.js +++ b/server/services/routing/rpc/chatMessage.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xbc99=['createChatMessage','../client','create','Request','CreateChatMessage'];(function(_0x49a5b4,_0x2af04f){var _0x622c59=function(_0x268348){while(--_0x268348){_0x49a5b4['push'](_0x49a5b4['shift']());}};_0x622c59(++_0x2af04f);}(_0xbc99,0x15f));var _0x9bc9=function(_0x162eee,_0x68dc03){_0x162eee=_0x162eee-0x0;var _0x137b2e=_0xbc99[_0x162eee];return _0x137b2e;};'use strict';var client=require(_0x9bc9('0x0'));exports[_0x9bc9('0x1')]=function(_0x2c98ac){return client[_0x9bc9('0x2')](_0x9bc9('0x3'),{'body':_0x2c98ac,'log':_0x9bc9('0x4')});}; \ No newline at end of file +var _0x9b9b=['../client','create','Request','createChatMessage'];(function(_0x2ec43,_0x232f4a){var _0x46ae0e=function(_0x17a427){while(--_0x17a427){_0x2ec43['push'](_0x2ec43['shift']());}};_0x46ae0e(++_0x232f4a);}(_0x9b9b,0x1f0));var _0xb9b9=function(_0x3dfb56,_0xfe844d){_0x3dfb56=_0x3dfb56-0x0;var _0x5e6e1b=_0x9b9b[_0x3dfb56];return _0x5e6e1b;};'use strict';var client=require(_0xb9b9('0x0'));exports[_0xb9b9('0x1')]=function(_0x4a0cac){return client[_0xb9b9('0x2')]('CreateChatMessage',{'body':_0x4a0cac,'log':_0xb9b9('0x3')});}; \ No newline at end of file diff --git a/server/services/routing/rpc/chatQueue.js b/server/services/routing/rpc/chatQueue.js index 339e883..9887113 100644 --- a/server/services/routing/rpc/chatQueue.js +++ b/server/services/routing/rpc/chatQueue.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x5a52=['strategy','User','Agents','online','chatPause','../client','name','timeout'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0x5a52,0x18d));var _0x25a5=function(_0x14add3,_0x13ce8d){_0x14add3=_0x14add3-0x0;var _0x4a174f=_0x5a52[_0x14add3];return _0x4a174f;};'use strict';var client=require(_0x25a5('0x0'));exports['getChatQueues']=function(){return function(){return client['Request']('GetChatQueue',{'options':{'raw':![],'attributes':['id',_0x25a5('0x1'),_0x25a5('0x2'),_0x25a5('0x3')],'include':[{'model':_0x25a5('0x4'),'as':_0x25a5('0x5'),'attributes':['id',_0x25a5('0x1'),_0x25a5('0x6'),_0x25a5('0x7')]}]},'log':'getChatQueues'});};}; \ No newline at end of file +var _0x383d=['name','strategy','User','Agents','online','chatPause','Request','GetChatQueue'];(function(_0x19fda5,_0x5e8790){var _0xa5851f=function(_0x331439){while(--_0x331439){_0x19fda5['push'](_0x19fda5['shift']());}};_0xa5851f(++_0x5e8790);}(_0x383d,0x86));var _0xd383=function(_0x14add3,_0x13ce8d){_0x14add3=_0x14add3-0x0;var _0x4a174f=_0x383d[_0x14add3];return _0x4a174f;};'use strict';var client=require('../client');exports['getChatQueues']=function(){return function(){return client[_0xd383('0x0')](_0xd383('0x1'),{'options':{'raw':![],'attributes':['id',_0xd383('0x2'),'timeout',_0xd383('0x3')],'include':[{'model':_0xd383('0x4'),'as':_0xd383('0x5'),'attributes':['id',_0xd383('0x2'),_0xd383('0x6'),_0xd383('0x7')]}]},'log':'getChatQueues'});};}; \ No newline at end of file diff --git a/server/services/routing/rpc/chatQueueReport.js b/server/services/routing/rpc/chatQueueReport.js index bcac703..d280547 100644 --- a/server/services/routing/rpc/chatQueueReport.js +++ b/server/services/routing/rpc/chatQueueReport.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x149c=['Request','CreateChatQueueReport','update','UpdateChatQueueReport','DESC','../client'];(function(_0x342c7c,_0x57d3c7){var _0x543748=function(_0x2f0243){while(--_0x2f0243){_0x342c7c['push'](_0x342c7c['shift']());}};_0x543748(++_0x57d3c7);}(_0x149c,0x143));var _0xc149=function(_0x4b2bc6,_0x1aec17){_0x4b2bc6=_0x4b2bc6-0x0;var _0x1447a5=_0x149c[_0x4b2bc6];return _0x1447a5;};'use strict';var client=require(_0xc149('0x0'));exports['create']=function(_0x3b67f2){return client[_0xc149('0x1')](_0xc149('0x2'),{'body':_0x3b67f2,'log':'CreateChatQueueReport'});};exports[_0xc149('0x3')]=function(_0x27b283,_0x19a7cb){return client[_0xc149('0x1')](_0xc149('0x4'),{'body':_0x19a7cb,'options':{'where':{'uniqueid':_0x27b283},'order':[['id',_0xc149('0x5')]],'limit':0x1},'log':_0xc149('0x4')});}; \ No newline at end of file +var _0x03bc=['Request','CreateChatQueueReport','UpdateChatQueueReport','DESC','../client'];(function(_0x17522f,_0x5a5780){var _0x3dd415=function(_0x178400){while(--_0x178400){_0x17522f['push'](_0x17522f['shift']());}};_0x3dd415(++_0x5a5780);}(_0x03bc,0xb8));var _0xc03b=function(_0x8f69fe,_0x4d3cd1){_0x8f69fe=_0x8f69fe-0x0;var _0x332075=_0x03bc[_0x8f69fe];return _0x332075;};'use strict';var client=require(_0xc03b('0x0'));exports['create']=function(_0x76b3a5){return client[_0xc03b('0x1')]('CreateChatQueueReport',{'body':_0x76b3a5,'log':_0xc03b('0x2')});};exports['update']=function(_0x175b18,_0x3b4181){return client[_0xc03b('0x1')](_0xc03b('0x3'),{'body':_0x3b4181,'options':{'where':{'uniqueid':_0x175b18},'order':[['id',_0xc03b('0x4')]],'limit':0x1},'log':'UpdateChatQueueReport'});}; \ No newline at end of file diff --git a/server/services/routing/rpc/faxInteraction.js b/server/services/routing/rpc/faxInteraction.js index 636def8..4bc2fa3 100644 --- a/server/services/routing/rpc/faxInteraction.js +++ b/server/services/routing/rpc/faxInteraction.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x7a54=['Request','UpdateFaxInteraction','addTags','AddTagsToFaxInteraction','../client','update'];(function(_0x962fc5,_0x58f074){var _0x43667c=function(_0x5e6ec0){while(--_0x5e6ec0){_0x962fc5['push'](_0x962fc5['shift']());}};_0x43667c(++_0x58f074);}(_0x7a54,0x106));var _0x47a5=function(_0x5c50eb,_0x1f2455){_0x5c50eb=_0x5c50eb-0x0;var _0x493246=_0x7a54[_0x5c50eb];return _0x493246;};'use strict';var client=require(_0x47a5('0x0'));exports[_0x47a5('0x1')]=function(_0x44b31e,_0x58157c){return client[_0x47a5('0x2')](_0x47a5('0x3'),{'body':_0x58157c,'options':{'where':{'id':_0x44b31e}},'log':'updateFaxInteraction'});};exports[_0x47a5('0x4')]=function(_0x11bf85,_0x2a1a7e){return client[_0x47a5('0x2')](_0x47a5('0x5'),{'body':_0x2a1a7e,'options':{'where':{'id':_0x11bf85}},'log':'addTagsToFaxInteraction'});}; \ No newline at end of file +var _0x7a54=['Request','UpdateFaxInteraction','addTags','AddTagsToFaxInteraction','../client','update'];(function(_0x7729b1,_0x468322){var _0x349504=function(_0x401cee){while(--_0x401cee){_0x7729b1['push'](_0x7729b1['shift']());}};_0x349504(++_0x468322);}(_0x7a54,0x106));var _0x47a5=function(_0x44ccc5,_0xe05ba4){_0x44ccc5=_0x44ccc5-0x0;var _0x40b304=_0x7a54[_0x44ccc5];return _0x40b304;};'use strict';var client=require(_0x47a5('0x0'));exports[_0x47a5('0x1')]=function(_0x44b31e,_0x58157c){return client[_0x47a5('0x2')](_0x47a5('0x3'),{'body':_0x58157c,'options':{'where':{'id':_0x44b31e}},'log':'updateFaxInteraction'});};exports[_0x47a5('0x4')]=function(_0x11bf85,_0x2a1a7e){return client[_0x47a5('0x2')](_0x47a5('0x5'),{'body':_0x2a1a7e,'options':{'where':{'id':_0x11bf85}},'log':'addTagsToFaxInteraction'});}; \ No newline at end of file diff --git a/server/services/routing/rpc/faxMessage.js b/server/services/routing/rpc/faxMessage.js index 7ffbcbf..78eb9f9 100644 --- a/server/services/routing/rpc/faxMessage.js +++ b/server/services/routing/rpc/faxMessage.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x6ac6=['../client','Request','CreateFaxMessage','createFaxMessage'];(function(_0x27a67f,_0x19d6d2){var _0x257675=function(_0x3513e4){while(--_0x3513e4){_0x27a67f['push'](_0x27a67f['shift']());}};_0x257675(++_0x19d6d2);}(_0x6ac6,0x1c4));var _0x66ac=function(_0x1cd8d4,_0x59df48){_0x1cd8d4=_0x1cd8d4-0x0;var _0x5f2afe=_0x6ac6[_0x1cd8d4];return _0x5f2afe;};'use strict';var client=require(_0x66ac('0x0'));exports['create']=function(_0xce6d1f){return client[_0x66ac('0x1')](_0x66ac('0x2'),{'body':_0xce6d1f,'log':_0x66ac('0x3')});}; \ No newline at end of file +var _0x51eb=['CreateFaxMessage','../client','Request'];(function(_0x36ed48,_0x1ee0d4){var _0x51c63a=function(_0x2d0a40){while(--_0x2d0a40){_0x36ed48['push'](_0x36ed48['shift']());}};_0x51c63a(++_0x1ee0d4);}(_0x51eb,0xdc));var _0xb51e=function(_0x75a03,_0x3afd8b){_0x75a03=_0x75a03-0x0;var _0x49a877=_0x51eb[_0x75a03];return _0x49a877;};'use strict';var client=require(_0xb51e('0x0'));exports['create']=function(_0x2067c8){return client[_0xb51e('0x1')](_0xb51e('0x2'),{'body':_0x2067c8,'log':'createFaxMessage'});}; \ No newline at end of file diff --git a/server/services/routing/rpc/faxQueue.js b/server/services/routing/rpc/faxQueue.js index 81fc16f..0f1f597 100644 --- a/server/services/routing/rpc/faxQueue.js +++ b/server/services/routing/rpc/faxQueue.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xe2d6=['User','Agents','name','online','faxPause','../client','getFaxQueues','Request','GetFaxQueue','timeout','strategy'];(function(_0x10179b,_0x4179d2){var _0x54473f=function(_0x32539a){while(--_0x32539a){_0x10179b['push'](_0x10179b['shift']());}};_0x54473f(++_0x4179d2);}(_0xe2d6,0x1de));var _0x6e2d=function(_0x224f65,_0x4750bf){_0x224f65=_0x224f65-0x0;var _0x3f921c=_0xe2d6[_0x224f65];return _0x3f921c;};'use strict';var client=require(_0x6e2d('0x0'));exports[_0x6e2d('0x1')]=function(){return function(){return client[_0x6e2d('0x2')](_0x6e2d('0x3'),{'options':{'raw':![],'attributes':['id','name',_0x6e2d('0x4'),_0x6e2d('0x5')],'include':[{'model':_0x6e2d('0x6'),'as':_0x6e2d('0x7'),'attributes':['id',_0x6e2d('0x8'),_0x6e2d('0x9'),_0x6e2d('0xa')]}]},'log':_0x6e2d('0x1')});};}; \ No newline at end of file +var _0xb60d=['strategy','User','Agents','online','faxPause','getFaxQueues','../client','Request','name','timeout'];(function(_0x3f5dca,_0x59472b){var _0x5b833a=function(_0x1cb84b){while(--_0x1cb84b){_0x3f5dca['push'](_0x3f5dca['shift']());}};_0x5b833a(++_0x59472b);}(_0xb60d,0xc4));var _0xdb60=function(_0x413bf1,_0x18c5e8){_0x413bf1=_0x413bf1-0x0;var _0x156cf3=_0xb60d[_0x413bf1];return _0x156cf3;};'use strict';var client=require(_0xdb60('0x0'));exports['getFaxQueues']=function(){return function(){return client[_0xdb60('0x1')]('GetFaxQueue',{'options':{'raw':![],'attributes':['id',_0xdb60('0x2'),_0xdb60('0x3'),_0xdb60('0x4')],'include':[{'model':_0xdb60('0x5'),'as':_0xdb60('0x6'),'attributes':['id',_0xdb60('0x2'),_0xdb60('0x7'),_0xdb60('0x8')]}]},'log':_0xdb60('0x9')});};}; \ No newline at end of file diff --git a/server/services/routing/rpc/faxQueueReport.js b/server/services/routing/rpc/faxQueueReport.js index cef49a0..ddae9ed 100644 --- a/server/services/routing/rpc/faxQueueReport.js +++ b/server/services/routing/rpc/faxQueueReport.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x4a0d=['create','Request','CreateFaxQueueReport','update','UpdateFaxQueueReport','DESC'];(function(_0x3bbb2d,_0x19318a){var _0x1b8b61=function(_0x2d650d){while(--_0x2d650d){_0x3bbb2d['push'](_0x3bbb2d['shift']());}};_0x1b8b61(++_0x19318a);}(_0x4a0d,0x102));var _0xd4a0=function(_0xfcf737,_0x132075){_0xfcf737=_0xfcf737-0x0;var _0x5eccbe=_0x4a0d[_0xfcf737];return _0x5eccbe;};'use strict';var client=require('../client');exports[_0xd4a0('0x0')]=function(_0x1f17ac){return client[_0xd4a0('0x1')](_0xd4a0('0x2'),{'body':_0x1f17ac,'log':_0xd4a0('0x2')});};exports[_0xd4a0('0x3')]=function(_0x3be6b2,_0x3b92f9){return client[_0xd4a0('0x1')](_0xd4a0('0x4'),{'body':_0x3b92f9,'options':{'where':{'uniqueid':_0x3be6b2},'order':[['id',_0xd4a0('0x5')]],'limit':0x1},'log':'UpdateFaxQueueReport'});}; \ No newline at end of file +var _0x4511=['UpdateFaxQueueReport','DESC','../client','create','CreateFaxQueueReport','update'];(function(_0x7755f6,_0x34731a){var _0x208253=function(_0x54bd90){while(--_0x54bd90){_0x7755f6['push'](_0x7755f6['shift']());}};_0x208253(++_0x34731a);}(_0x4511,0x68));var _0x1451=function(_0x589b0c,_0x4a4225){_0x589b0c=_0x589b0c-0x0;var _0x2c4491=_0x4511[_0x589b0c];return _0x2c4491;};'use strict';var client=require(_0x1451('0x0'));exports[_0x1451('0x1')]=function(_0x27bc77){return client['Request'](_0x1451('0x2'),{'body':_0x27bc77,'log':_0x1451('0x2')});};exports[_0x1451('0x3')]=function(_0x281566,_0x53ed6b){return client['Request'](_0x1451('0x4'),{'body':_0x53ed6b,'options':{'where':{'uniqueid':_0x281566},'order':[['id',_0x1451('0x5')]],'limit':0x1},'log':_0x1451('0x4')});}; \ No newline at end of file diff --git a/server/services/routing/rpc/interval.js b/server/services/routing/rpc/interval.js index b34cca4..a1e6019 100644 --- a/server/services/routing/rpc/interval.js +++ b/server/services/routing/rpc/interval.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xf2d2=['name','Interval','interval','../client','getIntervals','Request','GetInterval'];(function(_0x3cbf79,_0x46cb5f){var _0x183dad=function(_0xa6d505){while(--_0xa6d505){_0x3cbf79['push'](_0x3cbf79['shift']());}};_0x183dad(++_0x46cb5f);}(_0xf2d2,0x1b5));var _0x2f2d=function(_0x19e35c,_0x29cd1e){_0x19e35c=_0x19e35c-0x0;var _0x3e1fe8=_0xf2d2[_0x19e35c];return _0x3e1fe8;};'use strict';var client=require(_0x2f2d('0x0'));exports[_0x2f2d('0x1')]=function(){return function(){return client[_0x2f2d('0x2')](_0x2f2d('0x3'),{'options':{'raw':![],'where':{'IntervalId':null},'attributes':['id',_0x2f2d('0x4')],'include':[{'model':_0x2f2d('0x5'),'as':'Intervals','attributes':['id',_0x2f2d('0x4'),_0x2f2d('0x6')]}]},'log':_0x2f2d('0x1')});};}; \ No newline at end of file +var _0x2e0f=['name','Intervals','interval','getIntervals','Request','GetInterval'];(function(_0x1256ca,_0x29a6c2){var _0x55fa8c=function(_0x5a173e){while(--_0x5a173e){_0x1256ca['push'](_0x1256ca['shift']());}};_0x55fa8c(++_0x29a6c2);}(_0x2e0f,0xa5));var _0xf2e0=function(_0x3b9722,_0xf95a84){_0x3b9722=_0x3b9722-0x0;var _0x16a2d5=_0x2e0f[_0x3b9722];return _0x16a2d5;};'use strict';var client=require('../client');exports[_0xf2e0('0x0')]=function(){return function(){return client[_0xf2e0('0x1')](_0xf2e0('0x2'),{'options':{'raw':![],'where':{'IntervalId':null},'attributes':['id',_0xf2e0('0x3')],'include':[{'model':'Interval','as':_0xf2e0('0x4'),'attributes':['id',_0xf2e0('0x3'),_0xf2e0('0x5')]}]},'log':_0xf2e0('0x0')});};}; \ No newline at end of file diff --git a/server/services/routing/rpc/mailInteraction.js b/server/services/routing/rpc/mailInteraction.js index b551123..962d374 100644 --- a/server/services/routing/rpc/mailInteraction.js +++ b/server/services/routing/rpc/mailInteraction.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x627e=['../client','update','Request','updateMailInteraction','addTags','addTagsToChatInteraction'];(function(_0x19500a,_0x317e84){var _0x21f791=function(_0x437e7d){while(--_0x437e7d){_0x19500a['push'](_0x19500a['shift']());}};_0x21f791(++_0x317e84);}(_0x627e,0x14a));var _0xe627=function(_0x4082c8,_0x43057a){_0x4082c8=_0x4082c8-0x0;var _0x2ee83d=_0x627e[_0x4082c8];return _0x2ee83d;};'use strict';var client=require(_0xe627('0x0'));exports[_0xe627('0x1')]=function(_0x2cc4b4,_0x18dba3){return client[_0xe627('0x2')]('UpdateMailInteraction',{'body':_0x18dba3,'options':{'where':{'id':_0x2cc4b4}},'log':_0xe627('0x3')});};exports[_0xe627('0x4')]=function(_0x2abdc7,_0x59a2c8){return client['Request']('AddTagsToMailInteraction',{'body':_0x59a2c8,'options':{'where':{'id':_0x2abdc7}},'log':_0xe627('0x5')});}; \ No newline at end of file +var _0x3de3=['../client','UpdateMailInteraction','updateMailInteraction','addTags','Request','AddTagsToMailInteraction'];(function(_0x3c6afc,_0x48dc8d){var _0x48ae3b=function(_0x5bb0e4){while(--_0x5bb0e4){_0x3c6afc['push'](_0x3c6afc['shift']());}};_0x48ae3b(++_0x48dc8d);}(_0x3de3,0x1ce));var _0x33de=function(_0x256a10,_0x1ae83e){_0x256a10=_0x256a10-0x0;var _0x531a5f=_0x3de3[_0x256a10];return _0x531a5f;};'use strict';var client=require(_0x33de('0x0'));exports['update']=function(_0x19d1ba,_0x100783){return client['Request'](_0x33de('0x1'),{'body':_0x100783,'options':{'where':{'id':_0x19d1ba}},'log':_0x33de('0x2')});};exports[_0x33de('0x3')]=function(_0xbdd404,_0x56b413){return client[_0x33de('0x4')](_0x33de('0x5'),{'body':_0x56b413,'options':{'where':{'id':_0xbdd404}},'log':'addTagsToChatInteraction'});}; \ No newline at end of file diff --git a/server/services/routing/rpc/mailMessage.js b/server/services/routing/rpc/mailMessage.js index 4915dac..80be769 100644 --- a/server/services/routing/rpc/mailMessage.js +++ b/server/services/routing/rpc/mailMessage.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x34a3=['CreateMailMessage','createMailMessage','create'];(function(_0x4dd571,_0x18b238){var _0x9000e0=function(_0x2e7c26){while(--_0x2e7c26){_0x4dd571['push'](_0x4dd571['shift']());}};_0x9000e0(++_0x18b238);}(_0x34a3,0x68));var _0x334a=function(_0x15cc17,_0x5a498d){_0x15cc17=_0x15cc17-0x0;var _0x9607cc=_0x34a3[_0x15cc17];return _0x9607cc;};'use strict';var client=require('../client');exports[_0x334a('0x0')]=function(_0x351615){return client['Request'](_0x334a('0x1'),{'body':_0x351615,'log':_0x334a('0x2')});}; \ No newline at end of file +var _0xf05f=['create','Request','CreateMailMessage','createMailMessage','../client'];(function(_0x2b4411,_0x2625ed){var _0x8e41ef=function(_0x2aa8c1){while(--_0x2aa8c1){_0x2b4411['push'](_0x2b4411['shift']());}};_0x8e41ef(++_0x2625ed);}(_0xf05f,0x1e9));var _0xff05=function(_0x23d292,_0x5b148f){_0x23d292=_0x23d292-0x0;var _0x5ed2cd=_0xf05f[_0x23d292];return _0x5ed2cd;};'use strict';var client=require(_0xff05('0x0'));exports[_0xff05('0x1')]=function(_0x1bd994){return client[_0xff05('0x2')](_0xff05('0x3'),{'body':_0x1bd994,'log':_0xff05('0x4')});}; \ No newline at end of file diff --git a/server/services/routing/rpc/mailQueue.js b/server/services/routing/rpc/mailQueue.js index ae7dccb..e256dba 100644 --- a/server/services/routing/rpc/mailQueue.js +++ b/server/services/routing/rpc/mailQueue.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xa5cf=['Agents','mailPause','getMailQueues','Request','name','strategy'];(function(_0x384050,_0x6bcd49){var _0x7be0a8=function(_0x502664){while(--_0x502664){_0x384050['push'](_0x384050['shift']());}};_0x7be0a8(++_0x6bcd49);}(_0xa5cf,0xc8));var _0xfa5c=function(_0x1bddf1,_0x40ec3e){_0x1bddf1=_0x1bddf1-0x0;var _0x1d6946=_0xa5cf[_0x1bddf1];return _0x1d6946;};'use strict';var client=require('../client');exports[_0xfa5c('0x0')]=function(){return function(){return client[_0xfa5c('0x1')]('GetMailQueue',{'options':{'raw':![],'attributes':['id',_0xfa5c('0x2'),'timeout',_0xfa5c('0x3')],'include':[{'model':'User','as':_0xfa5c('0x4'),'attributes':['id','name','online',_0xfa5c('0x5')]}]},'log':_0xfa5c('0x0')});};}; \ No newline at end of file +var _0x57d2=['Agents','mailPause','../client','getMailQueues','Request','GetMailQueue','name','timeout','User'];(function(_0x1d2cf2,_0x4f6aad){var _0xe5f313=function(_0xd42d92){while(--_0xd42d92){_0x1d2cf2['push'](_0x1d2cf2['shift']());}};_0xe5f313(++_0x4f6aad);}(_0x57d2,0x185));var _0x257d=function(_0x41db5c,_0x3f2f67){_0x41db5c=_0x41db5c-0x0;var _0x32d7ce=_0x57d2[_0x41db5c];return _0x32d7ce;};'use strict';var client=require(_0x257d('0x0'));exports[_0x257d('0x1')]=function(){return function(){return client[_0x257d('0x2')](_0x257d('0x3'),{'options':{'raw':![],'attributes':['id',_0x257d('0x4'),_0x257d('0x5'),'strategy'],'include':[{'model':_0x257d('0x6'),'as':_0x257d('0x7'),'attributes':['id',_0x257d('0x4'),'online',_0x257d('0x8')]}]},'log':'getMailQueues'});};}; \ No newline at end of file diff --git a/server/services/routing/rpc/mailQueueReport.js b/server/services/routing/rpc/mailQueueReport.js index 73b7fa4..811050f 100644 --- a/server/services/routing/rpc/mailQueueReport.js +++ b/server/services/routing/rpc/mailQueueReport.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x789f=['update','UpdateMailQueueReport','DESC','../client','create','Request','CreateMailQueueReport'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0x789f,0xd5));var _0xf789=function(_0x836465,_0x5442ae){_0x836465=_0x836465-0x0;var _0x2150ea=_0x789f[_0x836465];return _0x2150ea;};'use strict';var client=require(_0xf789('0x0'));exports[_0xf789('0x1')]=function(_0x568552){return client[_0xf789('0x2')](_0xf789('0x3'),{'body':_0x568552,'log':'CreateMailQueueReport'});};exports[_0xf789('0x4')]=function(_0x47d246,_0x23784d){return client[_0xf789('0x2')](_0xf789('0x5'),{'body':_0x23784d,'options':{'where':{'uniqueid':_0x47d246},'order':[['id',_0xf789('0x6')]],'limit':0x1},'log':_0xf789('0x5')});}; \ No newline at end of file +var _0x95e9=['create','Request','CreateMailQueueReport','DESC','UpdateMailQueueReport','../client'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0x95e9,0x15b));var _0x995e=function(_0x7929d8,_0x8be119){_0x7929d8=_0x7929d8-0x0;var _0x40ff94=_0x95e9[_0x7929d8];return _0x40ff94;};'use strict';var client=require(_0x995e('0x0'));exports[_0x995e('0x1')]=function(_0x2da3d3){return client[_0x995e('0x2')](_0x995e('0x3'),{'body':_0x2da3d3,'log':'CreateMailQueueReport'});};exports['update']=function(_0x4ee7f8,_0x4a344c){return client['Request']('UpdateMailQueueReport',{'body':_0x4a344c,'options':{'where':{'uniqueid':_0x4ee7f8},'order':[['id',_0x995e('0x4')]],'limit':0x1},'log':_0x995e('0x5')});}; \ No newline at end of file diff --git a/server/services/routing/rpc/openchannelInteraction.js b/server/services/routing/rpc/openchannelInteraction.js index 228b9d3..ddc72bb 100644 --- a/server/services/routing/rpc/openchannelInteraction.js +++ b/server/services/routing/rpc/openchannelInteraction.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x7077=['../client','update','UpdateOpenchannelInteraction','updateOpenchannelInteraction','AddTagsToOpenchannelInteraction','addTagsToChatInteraction'];(function(_0x24c0e6,_0x5732d8){var _0x495e1f=function(_0x3b89ba){while(--_0x3b89ba){_0x24c0e6['push'](_0x24c0e6['shift']());}};_0x495e1f(++_0x5732d8);}(_0x7077,0x150));var _0x7707=function(_0x152395,_0x4f8820){_0x152395=_0x152395-0x0;var _0x1bfe4a=_0x7077[_0x152395];return _0x1bfe4a;};'use strict';var client=require(_0x7707('0x0'));exports[_0x7707('0x1')]=function(_0x1478cb,_0x4fc079){return client['Request'](_0x7707('0x2'),{'body':_0x4fc079,'options':{'where':{'id':_0x1478cb}},'log':_0x7707('0x3')});};exports['addTags']=function(_0x105318,_0x384822){return client['Request'](_0x7707('0x4'),{'body':_0x384822,'options':{'where':{'id':_0x105318}},'log':_0x7707('0x5')});}; \ No newline at end of file +var _0xe25a=['update','Request','updateOpenchannelInteraction','AddTagsToOpenchannelInteraction','addTagsToChatInteraction','../client'];(function(_0x3df1a1,_0x51984e){var _0xbf54f5=function(_0x358eb3){while(--_0x358eb3){_0x3df1a1['push'](_0x3df1a1['shift']());}};_0xbf54f5(++_0x51984e);}(_0xe25a,0xf5));var _0xae25=function(_0xdf5a03,_0x3635db){_0xdf5a03=_0xdf5a03-0x0;var _0x538a95=_0xe25a[_0xdf5a03];return _0x538a95;};'use strict';var client=require(_0xae25('0x0'));exports[_0xae25('0x1')]=function(_0x53cbaa,_0x498152){return client[_0xae25('0x2')]('UpdateOpenchannelInteraction',{'body':_0x498152,'options':{'where':{'id':_0x53cbaa}},'log':_0xae25('0x3')});};exports['addTags']=function(_0x171107,_0x257fad){return client[_0xae25('0x2')](_0xae25('0x4'),{'body':_0x257fad,'options':{'where':{'id':_0x171107}},'log':_0xae25('0x5')});}; \ No newline at end of file diff --git a/server/services/routing/rpc/openchannelMessage.js b/server/services/routing/rpc/openchannelMessage.js index efb40dc..ebe44f8 100644 --- a/server/services/routing/rpc/openchannelMessage.js +++ b/server/services/routing/rpc/openchannelMessage.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x2059=['../client','CreateOpenchannelMessage'];(function(_0x161937,_0x571461){var _0x20dbc4=function(_0xb15a6b){while(--_0xb15a6b){_0x161937['push'](_0x161937['shift']());}};_0x20dbc4(++_0x571461);}(_0x2059,0x1bc));var _0x9205=function(_0x2d6197,_0x82ebfb){_0x2d6197=_0x2d6197-0x0;var _0x4d0e75=_0x2059[_0x2d6197];return _0x4d0e75;};'use strict';var client=require(_0x9205('0x0'));exports['create']=function(_0xf27b10){return client['Request'](_0x9205('0x1'),{'body':_0xf27b10,'log':'createOpenchannelMessage'});}; \ No newline at end of file +var _0xf577=['../client'];(function(_0x4bc90b,_0x3f7413){var _0x1b6b87=function(_0x189e05){while(--_0x189e05){_0x4bc90b['push'](_0x4bc90b['shift']());}};_0x1b6b87(++_0x3f7413);}(_0xf577,0x11e));var _0x7f57=function(_0x4fbfd9,_0x3ab91a){_0x4fbfd9=_0x4fbfd9-0x0;var _0x31dc94=_0xf577[_0x4fbfd9];return _0x31dc94;};'use strict';var client=require(_0x7f57('0x0'));exports['create']=function(_0x286aaf){return client['Request']('CreateOpenchannelMessage',{'body':_0x286aaf,'log':'createOpenchannelMessage'});}; \ No newline at end of file diff --git a/server/services/routing/rpc/openchannelQueue.js b/server/services/routing/rpc/openchannelQueue.js index ede00e7..8743778 100644 --- a/server/services/routing/rpc/openchannelQueue.js +++ b/server/services/routing/rpc/openchannelQueue.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x4ff3=['Request','GetOpenchannelQueue','timeout','strategy','User','name','online','getOpenchannelQueues'];(function(_0x34d57a,_0x56ba62){var _0x15f827=function(_0x314f83){while(--_0x314f83){_0x34d57a['push'](_0x34d57a['shift']());}};_0x15f827(++_0x56ba62);}(_0x4ff3,0x68));var _0x34ff=function(_0x305463,_0x3b8036){_0x305463=_0x305463-0x0;var _0x1f36c6=_0x4ff3[_0x305463];return _0x1f36c6;};'use strict';var client=require('../client');exports['getOpenchannelQueues']=function(){return function(){return client[_0x34ff('0x0')](_0x34ff('0x1'),{'options':{'raw':![],'attributes':['id','name',_0x34ff('0x2'),_0x34ff('0x3')],'include':[{'model':_0x34ff('0x4'),'as':'Agents','attributes':['id',_0x34ff('0x5'),_0x34ff('0x6'),'openchannelPause']}]},'log':_0x34ff('0x7')});};}; \ No newline at end of file +var _0x61e4=['User','Agents','openchannelPause','../client','getOpenchannelQueues','GetOpenchannelQueue','timeout','strategy'];(function(_0x167cc1,_0x56ef5a){var _0x10bc4b=function(_0xd6a255){while(--_0xd6a255){_0x167cc1['push'](_0x167cc1['shift']());}};_0x10bc4b(++_0x56ef5a);}(_0x61e4,0x1ab));var _0x461e=function(_0x37dd7b,_0x29619d){_0x37dd7b=_0x37dd7b-0x0;var _0x548856=_0x61e4[_0x37dd7b];return _0x548856;};'use strict';var client=require(_0x461e('0x0'));exports[_0x461e('0x1')]=function(){return function(){return client['Request'](_0x461e('0x2'),{'options':{'raw':![],'attributes':['id','name',_0x461e('0x3'),_0x461e('0x4')],'include':[{'model':_0x461e('0x5'),'as':_0x461e('0x6'),'attributes':['id','name','online',_0x461e('0x7')]}]},'log':'getOpenchannelQueues'});};}; \ No newline at end of file diff --git a/server/services/routing/rpc/openchannelQueueReport.js b/server/services/routing/rpc/openchannelQueueReport.js index 632e76d..12229ca 100644 --- a/server/services/routing/rpc/openchannelQueueReport.js +++ b/server/services/routing/rpc/openchannelQueueReport.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x9f29=['DESC','../client','Request','CreateOpenchannelQueueReport','update','UpdateOpenchannelQueueReport'];(function(_0xe0893f,_0x4ed47){var _0x41619e=function(_0x265f56){while(--_0x265f56){_0xe0893f['push'](_0xe0893f['shift']());}};_0x41619e(++_0x4ed47);}(_0x9f29,0x1b1));var _0x99f2=function(_0x1c6790,_0x416429){_0x1c6790=_0x1c6790-0x0;var _0x18d436=_0x9f29[_0x1c6790];return _0x18d436;};'use strict';var client=require(_0x99f2('0x0'));exports['create']=function(_0x379cff){return client[_0x99f2('0x1')](_0x99f2('0x2'),{'body':_0x379cff,'log':_0x99f2('0x2')});};exports[_0x99f2('0x3')]=function(_0x418f2c,_0x30878a){return client[_0x99f2('0x1')](_0x99f2('0x4'),{'body':_0x30878a,'options':{'where':{'uniqueid':_0x418f2c},'order':[['id',_0x99f2('0x5')]],'limit':0x1},'log':_0x99f2('0x4')});}; \ No newline at end of file +var _0xf29f=['UpdateOpenchannelQueueReport','create','Request','CreateOpenchannelQueueReport','update','DESC'];(function(_0x3b687d,_0x235878){var _0x47b66e=function(_0x1eabe4){while(--_0x1eabe4){_0x3b687d['push'](_0x3b687d['shift']());}};_0x47b66e(++_0x235878);}(_0xf29f,0x18d));var _0xff29=function(_0x4955be,_0x5d3110){_0x4955be=_0x4955be-0x0;var _0x4ba0a7=_0xf29f[_0x4955be];return _0x4ba0a7;};'use strict';var client=require('../client');exports[_0xff29('0x0')]=function(_0x3ba012){return client[_0xff29('0x1')]('CreateOpenchannelQueueReport',{'body':_0x3ba012,'log':_0xff29('0x2')});};exports[_0xff29('0x3')]=function(_0x4948c5,_0xeb0c24){return client[_0xff29('0x1')]('UpdateOpenchannelQueueReport',{'body':_0xeb0c24,'options':{'where':{'uniqueid':_0x4948c5},'order':[['id',_0xff29('0x4')]],'limit':0x1},'log':_0xff29('0x5')});}; \ No newline at end of file diff --git a/server/services/routing/rpc/smsInteraction.js b/server/services/routing/rpc/smsInteraction.js index a3ba475..8d86bb6 100644 --- a/server/services/routing/rpc/smsInteraction.js +++ b/server/services/routing/rpc/smsInteraction.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xccdc=['updateSmsInteraction','addTags','AddTagsToSmsInteraction','addTagsToSmsInteraction','../client','update','Request','UpdateSmsInteraction'];(function(_0xbf76e2,_0x5a62bf){var _0x8290a7=function(_0x22a4cb){while(--_0x22a4cb){_0xbf76e2['push'](_0xbf76e2['shift']());}};_0x8290a7(++_0x5a62bf);}(_0xccdc,0x1c4));var _0xcccd=function(_0x363ef8,_0x4ecb1a){_0x363ef8=_0x363ef8-0x0;var _0x148822=_0xccdc[_0x363ef8];return _0x148822;};'use strict';var client=require(_0xcccd('0x0'));exports[_0xcccd('0x1')]=function(_0x48efea,_0x4a4fa5){return client[_0xcccd('0x2')](_0xcccd('0x3'),{'body':_0x4a4fa5,'options':{'where':{'id':_0x48efea}},'log':_0xcccd('0x4')});};exports[_0xcccd('0x5')]=function(_0x41cab2,_0x2ec68c){return client[_0xcccd('0x2')](_0xcccd('0x6'),{'body':_0x2ec68c,'options':{'where':{'id':_0x41cab2}},'log':_0xcccd('0x7')});}; \ No newline at end of file +var _0x9879=['Request','updateSmsInteraction','addTags','AddTagsToSmsInteraction','addTagsToSmsInteraction','../client','update'];(function(_0x20bc10,_0x35bed9){var _0x3bd5ce=function(_0x8d1e4c){while(--_0x8d1e4c){_0x20bc10['push'](_0x20bc10['shift']());}};_0x3bd5ce(++_0x35bed9);}(_0x9879,0x98));var _0x9987=function(_0x422f90,_0x24e61){_0x422f90=_0x422f90-0x0;var _0x6088ec=_0x9879[_0x422f90];return _0x6088ec;};'use strict';var client=require(_0x9987('0x0'));exports[_0x9987('0x1')]=function(_0x44026e,_0x5681f5){return client[_0x9987('0x2')]('UpdateSmsInteraction',{'body':_0x5681f5,'options':{'where':{'id':_0x44026e}},'log':_0x9987('0x3')});};exports[_0x9987('0x4')]=function(_0x1fd45d,_0xcc5722){return client[_0x9987('0x2')](_0x9987('0x5'),{'body':_0xcc5722,'options':{'where':{'id':_0x1fd45d}},'log':_0x9987('0x6')});}; \ No newline at end of file diff --git a/server/services/routing/rpc/smsMessage.js b/server/services/routing/rpc/smsMessage.js index 36036da..6cf9420 100644 --- a/server/services/routing/rpc/smsMessage.js +++ b/server/services/routing/rpc/smsMessage.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xbede=['CreateSmsMessage','../client','create','Request'];(function(_0x17d9e3,_0x1f969c){var _0x14192d=function(_0x159745){while(--_0x159745){_0x17d9e3['push'](_0x17d9e3['shift']());}};_0x14192d(++_0x1f969c);}(_0xbede,0x65));var _0xebed=function(_0x5927c7,_0x449599){_0x5927c7=_0x5927c7-0x0;var _0x50aa8b=_0xbede[_0x5927c7];return _0x50aa8b;};'use strict';var client=require(_0xebed('0x0'));exports[_0xebed('0x1')]=function(_0x58887e){return client[_0xebed('0x2')](_0xebed('0x3'),{'body':_0x58887e,'log':'createSmsMessage'});}; \ No newline at end of file +var _0x9f34=['../client','create','CreateSmsMessage','createSmsMessage'];(function(_0x4bc53b,_0x39fc31){var _0x5743f5=function(_0x3db0ea){while(--_0x3db0ea){_0x4bc53b['push'](_0x4bc53b['shift']());}};_0x5743f5(++_0x39fc31);}(_0x9f34,0xf8));var _0x49f3=function(_0x2d2d3c,_0x3f0007){_0x2d2d3c=_0x2d2d3c-0x0;var _0x44a67e=_0x9f34[_0x2d2d3c];return _0x44a67e;};'use strict';var client=require(_0x49f3('0x0'));exports[_0x49f3('0x1')]=function(_0x2a89b7){return client['Request'](_0x49f3('0x2'),{'body':_0x2a89b7,'log':_0x49f3('0x3')});}; \ No newline at end of file diff --git a/server/services/routing/rpc/smsQueue.js b/server/services/routing/rpc/smsQueue.js index 3f7a500..71e7176 100644 --- a/server/services/routing/rpc/smsQueue.js +++ b/server/services/routing/rpc/smsQueue.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xe706=['Agents','online','smsPause','../client','getSmsQueues','Request','name','timeout','strategy','User'];(function(_0x4dffdc,_0x35abb2){var _0x5900ee=function(_0x396d3b){while(--_0x396d3b){_0x4dffdc['push'](_0x4dffdc['shift']());}};_0x5900ee(++_0x35abb2);}(_0xe706,0xa3));var _0x6e70=function(_0x33f6a9,_0x5e195c){_0x33f6a9=_0x33f6a9-0x0;var _0x36df01=_0xe706[_0x33f6a9];return _0x36df01;};'use strict';var client=require(_0x6e70('0x0'));exports[_0x6e70('0x1')]=function(){return function(){return client[_0x6e70('0x2')]('GetSmsQueue',{'options':{'raw':![],'attributes':['id',_0x6e70('0x3'),_0x6e70('0x4'),_0x6e70('0x5')],'include':[{'model':_0x6e70('0x6'),'as':_0x6e70('0x7'),'attributes':['id',_0x6e70('0x3'),_0x6e70('0x8'),_0x6e70('0x9')]}]},'log':_0x6e70('0x1')});};}; \ No newline at end of file +var _0xa9e0=['name','online','smsPause','../client','getSmsQueues','Request','timeout','User','Agents'];(function(_0x4b7fe4,_0x551030){var _0x198a1e=function(_0x32b188){while(--_0x32b188){_0x4b7fe4['push'](_0x4b7fe4['shift']());}};_0x198a1e(++_0x551030);}(_0xa9e0,0x123));var _0x0a9e=function(_0x3054be,_0x1bdc8b){_0x3054be=_0x3054be-0x0;var _0x3df150=_0xa9e0[_0x3054be];return _0x3df150;};'use strict';var client=require(_0x0a9e('0x0'));exports[_0x0a9e('0x1')]=function(){return function(){return client[_0x0a9e('0x2')]('GetSmsQueue',{'options':{'raw':![],'attributes':['id','name',_0x0a9e('0x3'),'strategy'],'include':[{'model':_0x0a9e('0x4'),'as':_0x0a9e('0x5'),'attributes':['id',_0x0a9e('0x6'),_0x0a9e('0x7'),_0x0a9e('0x8')]}]},'log':'getSmsQueues'});};}; \ No newline at end of file diff --git a/server/services/routing/rpc/smsQueueReport.js b/server/services/routing/rpc/smsQueueReport.js index 71aa7ea..0e01d68 100644 --- a/server/services/routing/rpc/smsQueueReport.js +++ b/server/services/routing/rpc/smsQueueReport.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x34e8=['create','Request','CreateSmsQueueReport','update','UpdateSmsQueueReport','DESC','../client'];(function(_0x5b078c,_0x44926b){var _0x5c48ea=function(_0x55e31c){while(--_0x55e31c){_0x5b078c['push'](_0x5b078c['shift']());}};_0x5c48ea(++_0x44926b);}(_0x34e8,0x12c));var _0x834e=function(_0x5502c1,_0x2c8c10){_0x5502c1=_0x5502c1-0x0;var _0x36d9fd=_0x34e8[_0x5502c1];return _0x36d9fd;};'use strict';var client=require(_0x834e('0x0'));exports[_0x834e('0x1')]=function(_0x8b339){return client[_0x834e('0x2')]('CreateSmsQueueReport',{'body':_0x8b339,'log':_0x834e('0x3')});};exports[_0x834e('0x4')]=function(_0x472111,_0x31bf20){return client[_0x834e('0x2')](_0x834e('0x5'),{'body':_0x31bf20,'options':{'where':{'uniqueid':_0x472111},'order':[['id',_0x834e('0x6')]],'limit':0x1},'log':'UpdateSmsQueueReport'});}; \ No newline at end of file +var _0x70e0=['create','CreateSmsQueueReport','update','UpdateSmsQueueReport','../client'];(function(_0x410571,_0x255a69){var _0x3c5547=function(_0x453501){while(--_0x453501){_0x410571['push'](_0x410571['shift']());}};_0x3c5547(++_0x255a69);}(_0x70e0,0x17b));var _0x070e=function(_0x403f3f,_0x2cf7b7){_0x403f3f=_0x403f3f-0x0;var _0x2f1607=_0x70e0[_0x403f3f];return _0x2f1607;};'use strict';var client=require(_0x070e('0x0'));exports[_0x070e('0x1')]=function(_0x198c2e){return client['Request']('CreateSmsQueueReport',{'body':_0x198c2e,'log':_0x070e('0x2')});};exports[_0x070e('0x3')]=function(_0x277d32,_0x2593e5){return client['Request'](_0x070e('0x4'),{'body':_0x2593e5,'options':{'where':{'uniqueid':_0x277d32},'order':[['id','DESC']],'limit':0x1},'log':_0x070e('0x4')});}; \ No newline at end of file diff --git a/server/services/routing/rpc/user.js b/server/services/routing/rpc/user.js index aa63c7b..4f8ac31 100644 --- a/server/services/routing/rpc/user.js +++ b/server/services/routing/rpc/user.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xa9e0=['name','pauseType','lastPauseAt','voicePause','chatPause','mailPause','smsPause','whatsappPause','openchannelPause','faxCapacity','openchannelCapacity','../client','getAgents','Request'];(function(_0xf17533,_0x52702e){var _0x4130c9=function(_0xbfe404){while(--_0xbfe404){_0xf17533['push'](_0xf17533['shift']());}};_0x4130c9(++_0x52702e);}(_0xa9e0,0x123));var _0x0a9e=function(_0x4fc9e6,_0xc51915){_0x4fc9e6=_0x4fc9e6-0x0;var _0x551d28=_0xa9e0[_0x4fc9e6];return _0x551d28;};'use strict';var client=require(_0x0a9e('0x0'));exports[_0x0a9e('0x1')]=function(){return function(){return client[_0x0a9e('0x2')]('GetUser',{'options':{'raw':!![],'where':{'role':'agent'},'attributes':['id',_0x0a9e('0x3'),'online',_0x0a9e('0x4'),_0x0a9e('0x5'),_0x0a9e('0x6'),_0x0a9e('0x7'),_0x0a9e('0x8'),'faxPause',_0x0a9e('0x9'),_0x0a9e('0xa'),_0x0a9e('0xb'),'chatCapacity','mailCapacity',_0x0a9e('0xc'),'smsCapacity','whatsappCapacity',_0x0a9e('0xd')]},'log':_0x0a9e('0x1')});};}; \ No newline at end of file +var _0xa9e0=['name','pauseType','lastPauseAt','voicePause','chatPause','mailPause','smsPause','whatsappPause','openchannelPause','faxCapacity','openchannelCapacity','../client','getAgents','Request'];(function(_0xb045d8,_0x4edd9d){var _0x562f3e=function(_0x122b21){while(--_0x122b21){_0xb045d8['push'](_0xb045d8['shift']());}};_0x562f3e(++_0x4edd9d);}(_0xa9e0,0x123));var _0x0a9e=function(_0x297fd3,_0x115406){_0x297fd3=_0x297fd3-0x0;var _0x2af381=_0xa9e0[_0x297fd3];return _0x2af381;};'use strict';var client=require(_0x0a9e('0x0'));exports[_0x0a9e('0x1')]=function(){return function(){return client[_0x0a9e('0x2')]('GetUser',{'options':{'raw':!![],'where':{'role':'agent'},'attributes':['id',_0x0a9e('0x3'),'online',_0x0a9e('0x4'),_0x0a9e('0x5'),_0x0a9e('0x6'),_0x0a9e('0x7'),_0x0a9e('0x8'),'faxPause',_0x0a9e('0x9'),_0x0a9e('0xa'),_0x0a9e('0xb'),'chatCapacity','mailCapacity',_0x0a9e('0xc'),'smsCapacity','whatsappCapacity',_0x0a9e('0xd')]},'log':_0x0a9e('0x1')});};}; \ No newline at end of file diff --git a/server/services/routing/rpc/whatsappInteraction.js b/server/services/routing/rpc/whatsappInteraction.js index 7c455d7..e443081 100644 --- a/server/services/routing/rpc/whatsappInteraction.js +++ b/server/services/routing/rpc/whatsappInteraction.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xc4aa=['addTagsToWhatsappInteraction','../client','update','Request','UpdateWhatsappInteraction','AddTagsToWhatsappInteraction'];(function(_0x28947d,_0x4cc9c6){var _0x12d2ee=function(_0x3f38fc){while(--_0x3f38fc){_0x28947d['push'](_0x28947d['shift']());}};_0x12d2ee(++_0x4cc9c6);}(_0xc4aa,0x1b7));var _0xac4a=function(_0x2d2c16,_0x4e88b6){_0x2d2c16=_0x2d2c16-0x0;var _0x53f2fb=_0xc4aa[_0x2d2c16];return _0x53f2fb;};'use strict';var client=require(_0xac4a('0x0'));exports[_0xac4a('0x1')]=function(_0x40a0d0,_0x351dd5){return client[_0xac4a('0x2')](_0xac4a('0x3'),{'body':_0x351dd5,'options':{'where':{'id':_0x40a0d0}},'log':'updateWhatsappInteraction'});};exports['addTags']=function(_0x47d4f6,_0x2f48ed){return client[_0xac4a('0x2')](_0xac4a('0x4'),{'body':_0x2f48ed,'options':{'where':{'id':_0x47d4f6}},'log':_0xac4a('0x5')});}; \ No newline at end of file +var _0x4f0d=['addTags','addTagsToWhatsappInteraction','UpdateWhatsappInteraction','updateWhatsappInteraction'];(function(_0x896854,_0x14927e){var _0x3e8009=function(_0x163738){while(--_0x163738){_0x896854['push'](_0x896854['shift']());}};_0x3e8009(++_0x14927e);}(_0x4f0d,0x1c2));var _0xd4f0=function(_0x171fb6,_0x1116d6){_0x171fb6=_0x171fb6-0x0;var _0x2dda01=_0x4f0d[_0x171fb6];return _0x2dda01;};'use strict';var client=require('../client');exports['update']=function(_0x4c1091,_0x5290b6){return client['Request'](_0xd4f0('0x0'),{'body':_0x5290b6,'options':{'where':{'id':_0x4c1091}},'log':_0xd4f0('0x1')});};exports[_0xd4f0('0x2')]=function(_0x577c8f,_0xb1db5){return client['Request']('AddTagsToWhatsappInteraction',{'body':_0xb1db5,'options':{'where':{'id':_0x577c8f}},'log':_0xd4f0('0x3')});}; \ No newline at end of file diff --git a/server/services/routing/rpc/whatsappMessage.js b/server/services/routing/rpc/whatsappMessage.js index c0b9b3c..62bc0df 100644 --- a/server/services/routing/rpc/whatsappMessage.js +++ b/server/services/routing/rpc/whatsappMessage.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xcd1b=['create','Request','createWhatsappMessage','../client'];(function(_0x266ced,_0x307ee8){var _0x2ad02f=function(_0x390c8d){while(--_0x390c8d){_0x266ced['push'](_0x266ced['shift']());}};_0x2ad02f(++_0x307ee8);}(_0xcd1b,0x97));var _0xbcd1=function(_0xff153,_0x5121a9){_0xff153=_0xff153-0x0;var _0x2334c0=_0xcd1b[_0xff153];return _0x2334c0;};'use strict';var client=require(_0xbcd1('0x0'));exports[_0xbcd1('0x1')]=function(_0x1bbcb3){return client[_0xbcd1('0x2')]('CreateWhatsappMessage',{'body':_0x1bbcb3,'log':_0xbcd1('0x3')});}; \ No newline at end of file +var _0x09bc=['createWhatsappMessage','create','Request'];(function(_0x2b0bc2,_0x4331f5){var _0x56e5b9=function(_0x4c1b06){while(--_0x4c1b06){_0x2b0bc2['push'](_0x2b0bc2['shift']());}};_0x56e5b9(++_0x4331f5);}(_0x09bc,0x112));var _0xc09b=function(_0x3a0c4f,_0x5dd1a3){_0x3a0c4f=_0x3a0c4f-0x0;var _0x247049=_0x09bc[_0x3a0c4f];return _0x247049;};'use strict';var client=require('../client');exports[_0xc09b('0x0')]=function(_0x143d2f){return client[_0xc09b('0x1')]('CreateWhatsappMessage',{'body':_0x143d2f,'log':_0xc09b('0x2')});}; \ No newline at end of file diff --git a/server/services/routing/rpc/whatsappQueue.js b/server/services/routing/rpc/whatsappQueue.js index f34789f..dfe76d1 100644 --- a/server/services/routing/rpc/whatsappQueue.js +++ b/server/services/routing/rpc/whatsappQueue.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x712f=['name','strategy','User','Agents','whatsappPause','../client','getWhatsappQueues','GetWhatsappQueue'];(function(_0x45518f,_0x475a6b){var _0x198175=function(_0x40d333){while(--_0x40d333){_0x45518f['push'](_0x45518f['shift']());}};_0x198175(++_0x475a6b);}(_0x712f,0x115));var _0xf712=function(_0xd719e,_0x3ea50e){_0xd719e=_0xd719e-0x0;var _0xd88544=_0x712f[_0xd719e];return _0xd88544;};'use strict';var client=require(_0xf712('0x0'));exports[_0xf712('0x1')]=function(){return function(){return client['Request'](_0xf712('0x2'),{'options':{'raw':![],'attributes':['id',_0xf712('0x3'),'timeout',_0xf712('0x4')],'include':[{'model':_0xf712('0x5'),'as':_0xf712('0x6'),'attributes':['id',_0xf712('0x3'),'online',_0xf712('0x7')]}]},'log':_0xf712('0x1')});};}; \ No newline at end of file +var _0xc9ae=['whatsappPause','../client','getWhatsappQueues','Request','GetWhatsappQueue','name','timeout','strategy','User','Agents','online'];(function(_0x5f4ee5,_0x1153eb){var _0x5d903d=function(_0xe8c003){while(--_0xe8c003){_0x5f4ee5['push'](_0x5f4ee5['shift']());}};_0x5d903d(++_0x1153eb);}(_0xc9ae,0x156));var _0xec9a=function(_0x1146b0,_0x5ff33){_0x1146b0=_0x1146b0-0x0;var _0x5f5a21=_0xc9ae[_0x1146b0];return _0x5f5a21;};'use strict';var client=require(_0xec9a('0x0'));exports[_0xec9a('0x1')]=function(){return function(){return client[_0xec9a('0x2')](_0xec9a('0x3'),{'options':{'raw':![],'attributes':['id',_0xec9a('0x4'),_0xec9a('0x5'),_0xec9a('0x6')],'include':[{'model':_0xec9a('0x7'),'as':_0xec9a('0x8'),'attributes':['id',_0xec9a('0x4'),_0xec9a('0x9'),_0xec9a('0xa')]}]},'log':_0xec9a('0x1')});};}; \ No newline at end of file diff --git a/server/services/routing/rpc/whatsappQueueReport.js b/server/services/routing/rpc/whatsappQueueReport.js index 7fc293a..d455204 100644 --- a/server/services/routing/rpc/whatsappQueueReport.js +++ b/server/services/routing/rpc/whatsappQueueReport.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x4a4d=['CreateWhatsappQueueReport','update','UpdateWhatsappQueueReport','../client','create','Request'];(function(_0x5b8c42,_0x53f405){var _0x36a1a3=function(_0xbd108a){while(--_0xbd108a){_0x5b8c42['push'](_0x5b8c42['shift']());}};_0x36a1a3(++_0x53f405);}(_0x4a4d,0xcf));var _0xd4a4=function(_0x4511f0,_0x365662){_0x4511f0=_0x4511f0-0x0;var _0x5b71ef=_0x4a4d[_0x4511f0];return _0x5b71ef;};'use strict';var client=require(_0xd4a4('0x0'));exports[_0xd4a4('0x1')]=function(_0xed35f0){return client[_0xd4a4('0x2')](_0xd4a4('0x3'),{'body':_0xed35f0,'log':'CreateWhatsappQueueReport'});};exports[_0xd4a4('0x4')]=function(_0x4e0c2c,_0x1e4d3d){return client[_0xd4a4('0x2')](_0xd4a4('0x5'),{'body':_0x1e4d3d,'options':{'where':{'uniqueid':_0x4e0c2c},'order':[['id','DESC']],'limit':0x1},'log':_0xd4a4('0x5')});}; \ No newline at end of file +var _0x107f=['UpdateWhatsappQueueReport','DESC','../client','Request','update'];(function(_0x122ef9,_0x451d2a){var _0x42fba0=function(_0x17c9d3){while(--_0x17c9d3){_0x122ef9['push'](_0x122ef9['shift']());}};_0x42fba0(++_0x451d2a);}(_0x107f,0x1e2));var _0xf107=function(_0x51e092,_0x36626a){_0x51e092=_0x51e092-0x0;var _0x38d965=_0x107f[_0x51e092];return _0x38d965;};'use strict';var client=require(_0xf107('0x0'));exports['create']=function(_0x18d50c){return client[_0xf107('0x1')]('CreateWhatsappQueueReport',{'body':_0x18d50c,'log':'CreateWhatsappQueueReport'});};exports[_0xf107('0x2')]=function(_0x3c06e1,_0x1e6cdc){return client[_0xf107('0x1')](_0xf107('0x3'),{'body':_0x1e6cdc,'options':{'where':{'uniqueid':_0x3c06e1},'order':[['id',_0xf107('0x4')]],'limit':0x1},'log':_0xf107('0x3')});}; \ No newline at end of file diff --git a/server/services/routing/server/applications/agent.js b/server/services/routing/server/applications/agent.js index 3f66445..bceec18 100644 --- a/server/services/routing/server/applications/agent.js +++ b/server/services/routing/server/applications/agent.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x5db7=['join','stop','find','timeout','createQueue','channel','START:%s','rules','end','[%s][AGENT]\x20ROUTING\x20STOPPED','close','[%s][AGENT]\x20ROUTING\x20END','agent','[%s][AGENT]\x20agent\x20not\x20found\x20%s','log','[%s][QUEUE]\x20%s','stack','validate','lodash','../../../../config/logger','routing','./strategy','name\x20is\x20a\x20string\x20and\x20it\x20is\x20required','number','timeout\x20is\x20a\x20number','info','format','[%s][AGENT][NAME:%s][STATUS:%s]','name','toLowerCase','error','map','message'];(function(_0x64de5f,_0x581672){var _0x30e076=function(_0x42f727){while(--_0x42f727){_0x64de5f['push'](_0x64de5f['shift']());}};_0x30e076(++_0x581672);}(_0x5db7,0x119));var _0x75db=function(_0x1f4b18,_0x4e777c){_0x1f4b18=_0x1f4b18-0x0;var _0xde3957=_0x5db7[_0x1f4b18];return _0xde3957;};'use strict';var schema=require(_0x75db('0x0'));var _=require(_0x75db('0x1'));var util=require('util');var seqqueue=require('seq-queue');var logger=require(_0x75db('0x2'))(_0x75db('0x3'));var strategy=require(_0x75db('0x4'));var queue=schema({'name':{'type':'string','required':!![],'message':_0x75db('0x5')},'timeout':{'type':_0x75db('0x6'),'message':_0x75db('0x7')}});function writeLog(_0x1ec01d,_0x30b7f5,_0x1153d6){return logger[_0x75db('0x8')](util[_0x75db('0x9')](_0x75db('0xa'),_0x1ec01d,_0x30b7f5[_0x75db('0xb')],_0x1153d6));}function handleFindAgent(_0x4eb05b){return function(_0x4e54c6){return _0x4e54c6['name'][_0x75db('0xc')]()===_0x4eb05b[_0x75db('0xc')]();};}exports['consequence']=function(_0x3380f8,_0x580463,_0x3a5393,_0xe41b5f){return function(_0x198d8e){try{var _0x59d6db={'name':_0x580463[0x0],'timeout':_0x580463[0x1]};var _0x4fff45=queue[_0x75db('0x0')](_0x59d6db,{'typecast':!![]});if(_0x4fff45['length']){logger[_0x75db('0xd')]('[%s][AGENT]\x20%s',_0x3380f8,_[_0x75db('0xe')](_0x4fff45,_0x75db('0xf'))[_0x75db('0x10')](',\x20'));_0x198d8e[_0x75db('0x11')]();}else{var _0x280171=_[_0x75db('0x12')](_0x3a5393['agents'],handleFindAgent(_0x59d6db['name']));if(_0x280171){var _0x11c136=(_0x59d6db[_0x75db('0x13')]||0xa)*0x3e8;var _0x137a5a,_0x259148;var _0x4dfdb9=seqqueue[_0x75db('0x14')](_0x11c136);_0x4dfdb9['id']=_0x3380f8;_0x4dfdb9['atimeout']=_0x11c136;_0x4dfdb9['channel']=_0xe41b5f[_0x75db('0x15')];writeLog(_0x3380f8,_0x280171,util[_0x75db('0x9')](_0x75db('0x16'),_0x11c136));_0x3a5393[_0x75db('0x17')][_0x3380f8]['on'](_0x75db('0x18'),function(){logger[_0x75db('0x8')](_0x75db('0x19'),_0x3380f8);clearTimeout(_0x259148);_0x259148=undefined;_0x4dfdb9[_0x75db('0x1a')]();if(_0x3a5393[_0x75db('0x17')][_0x3380f8]){delete _0x3a5393[_0x75db('0x17')][_0x3380f8];}_0x198d8e[_0x75db('0x11')]();});_0x3a5393[_0x75db('0x17')][_0x3380f8]['on']('complete',function(){if(_0x3a5393[_0x75db('0x17')][_0x3380f8]){delete _0x3a5393[_0x75db('0x17')][_0x3380f8];}});_0x259148=setTimeout(function(){logger[_0x75db('0x8')](_0x75db('0x1b'),_0x3380f8);clearTimeout(_0x259148);_0x4dfdb9[_0x75db('0x1a')]();_0x198d8e['next']();},_0x11c136);strategy[_0x75db('0x1c')](_0x4dfdb9,_0x280171,_0x3a5393,_0xe41b5f);}else{logger[_0x75db('0xd')](_0x75db('0x1d'),_0x3380f8,_0x59d6db[_0x75db('0xb')]);_0x198d8e[_0x75db('0x11')]();}}}catch(_0x1696b4){console[_0x75db('0x1e')](_0x1696b4);logger[_0x75db('0xd')](_0x75db('0x1f'),_0x3380f8,_0x1696b4[_0x75db('0x20')]);_0x198d8e[_0x75db('0x11')]();}};}; \ No newline at end of file +var _0x4eb0=['find','timeout','createQueue','atimeout','channel','START:%s','rules','end','[%s][AGENT]\x20ROUTING\x20STOPPED','close','complete','[%s][AGENT]\x20ROUTING\x20END','next','agent','[%s][AGENT]\x20agent\x20not\x20found\x20%s','error','[%s][QUEUE]\x20%s','stack','validate','seq-queue','routing','./strategy','string','number','info','name','consequence','length','[%s][AGENT]\x20%s','map','message','join','stop'];(function(_0x3496f3,_0xd090ac){var _0x39178e=function(_0xe6535e){while(--_0xe6535e){_0x3496f3['push'](_0x3496f3['shift']());}};_0x39178e(++_0xd090ac);}(_0x4eb0,0x13b));var _0x04eb=function(_0x167cc1,_0x56ef5a){_0x167cc1=_0x167cc1-0x0;var _0x10bc4b=_0x4eb0[_0x167cc1];return _0x10bc4b;};'use strict';var schema=require(_0x04eb('0x0'));var _=require('lodash');var util=require('util');var seqqueue=require(_0x04eb('0x1'));var logger=require('../../../../config/logger')(_0x04eb('0x2'));var strategy=require(_0x04eb('0x3'));var queue=schema({'name':{'type':_0x04eb('0x4'),'required':!![],'message':'name\x20is\x20a\x20string\x20and\x20it\x20is\x20required'},'timeout':{'type':_0x04eb('0x5'),'message':'timeout\x20is\x20a\x20number'}});function writeLog(_0x19e8d4,_0x14f777,_0x323870){return logger[_0x04eb('0x6')](util['format']('[%s][AGENT][NAME:%s][STATUS:%s]',_0x19e8d4,_0x14f777[_0x04eb('0x7')],_0x323870));}function handleFindAgent(_0x3f35bb){return function(_0x102d66){return _0x102d66[_0x04eb('0x7')]['toLowerCase']()===_0x3f35bb['toLowerCase']();};}exports[_0x04eb('0x8')]=function(_0x24f910,_0x35a2ef,_0x5f54f2,_0x343700){return function(_0xa87418){try{var _0x4e78a1={'name':_0x35a2ef[0x0],'timeout':_0x35a2ef[0x1]};var _0x1da460=queue[_0x04eb('0x0')](_0x4e78a1,{'typecast':!![]});if(_0x1da460[_0x04eb('0x9')]){logger['error'](_0x04eb('0xa'),_0x24f910,_[_0x04eb('0xb')](_0x1da460,_0x04eb('0xc'))[_0x04eb('0xd')](',\x20'));_0xa87418[_0x04eb('0xe')]();}else{var _0x57d42a=_[_0x04eb('0xf')](_0x5f54f2['agents'],handleFindAgent(_0x4e78a1[_0x04eb('0x7')]));if(_0x57d42a){var _0x54b637=(_0x4e78a1[_0x04eb('0x10')]||0xa)*0x3e8;var _0x458abf,_0x3a1e7e;var _0xeaccd4=seqqueue[_0x04eb('0x11')](_0x54b637);_0xeaccd4['id']=_0x24f910;_0xeaccd4[_0x04eb('0x12')]=_0x54b637;_0xeaccd4[_0x04eb('0x13')]=_0x343700[_0x04eb('0x13')];writeLog(_0x24f910,_0x57d42a,util['format'](_0x04eb('0x14'),_0x54b637));_0x5f54f2[_0x04eb('0x15')][_0x24f910]['on'](_0x04eb('0x16'),function(){logger['info'](_0x04eb('0x17'),_0x24f910);clearTimeout(_0x3a1e7e);_0x3a1e7e=undefined;_0xeaccd4[_0x04eb('0x18')]();if(_0x5f54f2[_0x04eb('0x15')][_0x24f910]){delete _0x5f54f2[_0x04eb('0x15')][_0x24f910];}_0xa87418[_0x04eb('0xe')]();});_0x5f54f2[_0x04eb('0x15')][_0x24f910]['on'](_0x04eb('0x19'),function(){if(_0x5f54f2[_0x04eb('0x15')][_0x24f910]){delete _0x5f54f2[_0x04eb('0x15')][_0x24f910];}});_0x3a1e7e=setTimeout(function(){logger['info'](_0x04eb('0x1a'),_0x24f910);clearTimeout(_0x3a1e7e);_0xeaccd4[_0x04eb('0x18')]();_0xa87418[_0x04eb('0x1b')]();},_0x54b637);strategy[_0x04eb('0x1c')](_0xeaccd4,_0x57d42a,_0x5f54f2,_0x343700);}else{logger['error'](_0x04eb('0x1d'),_0x24f910,_0x4e78a1[_0x04eb('0x7')]);_0xa87418[_0x04eb('0xe')]();}}}catch(_0x1cb88d){console['log'](_0x1cb88d);logger[_0x04eb('0x1e')](_0x04eb('0x1f'),_0x24f910,_0x1cb88d[_0x04eb('0x20')]);_0xa87418[_0x04eb('0xe')]();}};}; \ No newline at end of file diff --git a/server/services/routing/server/applications/amazonlex.js b/server/services/routing/server/applications/amazonlex.js index e85e312..4134c9e 100644 --- a/server/services/routing/server/applications/amazonlex.js +++ b/server/services/routing/server/applications/amazonlex.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x2c64=['providerName','providerResponse','Message','create','then','dialogState','Failed','moment','aws-sdk','./utils','routing','../../rpc/chatMessage','../../rpc/openchannelMessage','../../rpc/mailMessage','../../rpc/faxMessage','consequence','isNil','[%s][AMAZONLEX]\x20%s','format','out','channel','whatsapp','phone','interaction','chat','ChatWebsiteId','account','AccountId','upperFirst','created','body','getMustacheRender','catch','stringify','[%s][AMAZONLEX]\x20Welcome\x20Message\x20has\x20been\x20sent!','stop','info','[%s][AMAZONLEX]\x20Welcome\x20Message\x20is\x20empty.\x20It\x20will\x20wait\x20for\x20a\x20message\x20from\x20customer!','LexRuntime','$LATEST','message','toString','error','next','amazonlex'];(function(_0x5060cd,_0x586f2c){var _0x1d58c2=function(_0x4fcbad){while(--_0x4fcbad){_0x5060cd['push'](_0x5060cd['shift']());}};_0x1d58c2(++_0x586f2c);}(_0x2c64,0x19c));var _0x42c6=function(_0x4c445a,_0x4ee80f){_0x4c445a=_0x4c445a-0x0;var _0x2f611c=_0x2c64[_0x4c445a];return _0x2f611c;};'use strict';var _=require('lodash');var moment=require(_0x42c6('0x0'));var AWS=require(_0x42c6('0x1'));var utils=require(_0x42c6('0x2'));var logger=require('../../../../config/logger')(_0x42c6('0x3'));var rpc={'chatMessage':require(_0x42c6('0x4')),'openchannelMessage':require(_0x42c6('0x5')),'mailMessage':require(_0x42c6('0x6')),'smsMessage':require('../../rpc/smsMessage'),'faxMessage':require(_0x42c6('0x7')),'whatsappMessage':require('../../rpc/whatsappMessage')};exports[_0x42c6('0x8')]=function(_0x4e9e1a,_0xe73022){return function(_0x2e680d){try{if(!_[_0x42c6('0x9')](this['interaction']['UserId'])){logger['info'](_0x42c6('0xa'),_0x4e9e1a,'Agent\x20is\x20managing\x20the\x20interaction.\x20Go\x20to\x20next\x20application.');return _0x2e680d['next']();}var _0x3134d5={'ContactId':this['contact']['id'],'sentAt':moment()[_0x42c6('0xb')]('YYYY-MM-DD\x20HH:mm:ss'),'direction':_0x42c6('0xc')};if(this[_0x42c6('0xd')]==='sms'||this[_0x42c6('0xd')]===_0x42c6('0xe')){_0x3134d5[_0x42c6('0xf')]=this[_0x42c6('0x10')]['phone'];}var _0x17f601=this['channel'];if(_0x17f601===_0x42c6('0x11')){_0x3134d5[_0x42c6('0x12')]=this[_0x42c6('0x13')]['id'];}else{_0x3134d5[_['upperFirst'](_0x17f601)+_0x42c6('0x14')]=this[_0x42c6('0x13')]['id'];}_0x3134d5[_[_0x42c6('0x15')](_0x17f601)+'InteractionId']=this[_0x42c6('0x10')]['id'];if(this[_0x42c6('0x10')][_0x42c6('0x16')]){var _0x21f6d6=_0xe73022[0x4];if(!_['isEmpty'](_0x21f6d6)){_0x3134d5[_0x42c6('0x17')]=utils[_0x42c6('0x18')](_0x21f6d6,this);return rpc[_0x17f601+'Message']['create'](_0x3134d5)['then'](function(_0x2f4b99){logger['info'](_0x42c6('0xa'),_0x4e9e1a,_0x3134d5[_0x42c6('0x17')]);})[_0x42c6('0x19')](function(_0x4704c5){logger['error']('[%s][AMAZONLEX]\x20%s',_0x4e9e1a,JSON[_0x42c6('0x1a')](_0x4704c5));})['finally'](function(){logger['info'](_0x42c6('0x1b'),_0x4e9e1a);_0x2e680d[_0x42c6('0x1c')]();});}else{logger[_0x42c6('0x1d')](_0x42c6('0x1e'),_0x4e9e1a);_0x2e680d['stop']();}}else{var _0x196aa1=this;var _0x568aff=new AWS[(_0x42c6('0x1f'))]({'accessKeyId':_0xe73022[0x0],'secretAccessKey':_0xe73022[0x1],'region':_0xe73022[0x2]});var _0xe1f1a2={'botAlias':_0x42c6('0x20'),'botName':_0xe73022[0x3],'inputText':this[_0x42c6('0x21')][_0x42c6('0x17')],'userId':this[_0x42c6('0xd')]+':'+this[_0x42c6('0x10')]['id'][_0x42c6('0x22')]()};_0x568aff['postText'](_0xe1f1a2,function(_0x2bf27a,_0x330580){if(_0x2bf27a){logger[_0x42c6('0x23')](_0x42c6('0xa'),_0x4e9e1a,_0x2bf27a[_0x42c6('0x21')]);_0x2e680d[_0x42c6('0x24')]();}else if(_0x330580&&_0x330580[_0x42c6('0x21')]){_0x196aa1['body'][_0x42c6('0x25')]=_0x330580;_0x3134d5['body']=_0x330580[_0x42c6('0x21')];_0x3134d5[_0x42c6('0x26')]=_0x42c6('0x25');_0x3134d5[_0x42c6('0x27')]=JSON['stringify'](_0x330580);return rpc[_0x17f601+_0x42c6('0x28')][_0x42c6('0x29')](_0x3134d5)[_0x42c6('0x2a')](function(_0x169805){logger['info'](_0x42c6('0xa'),_0x4e9e1a,_0x3134d5[_0x42c6('0x17')]);if(_0x330580[_0x42c6('0x2b')]==_0x42c6('0x2c')){_0x2e680d[_0x42c6('0x24')]();}else{_0x2e680d[_0x42c6('0x1c')]();}})[_0x42c6('0x19')](function(_0x296326){logger['error'](_0x42c6('0xa'),_0x4e9e1a,JSON[_0x42c6('0x1a')](_0x296326));_0x2e680d[_0x42c6('0x24')]();});}else{_0x2e680d[_0x42c6('0x24')]();}});}}catch(_0x298da0){logger['error'](_0x42c6('0xa'),_0x4e9e1a,JSON[_0x42c6('0x1a')](_0x298da0));_0x2e680d[_0x42c6('0x1c')]();}};}; \ No newline at end of file +var _0x4ad2=['stop','[%s][AMAZONLEX]\x20Welcome\x20Message\x20is\x20empty.\x20It\x20will\x20wait\x20for\x20a\x20message\x20from\x20customer!','message','toString','postText','providerName','amazonlex','providerResponse','dialogState','Failed','lodash','moment','aws-sdk','./utils','../../../../config/logger','../../rpc/chatMessage','../../rpc/openchannelMessage','../../rpc/mailMessage','../../rpc/faxMessage','../../rpc/whatsappMessage','consequence','isNil','[%s][AMAZONLEX]\x20%s','next','contact','out','channel','sms','whatsapp','phone','ChatWebsiteId','account','upperFirst','AccountId','created','isEmpty','getMustacheRender','Message','create','body','catch','error','stringify','finally','info'];(function(_0x5d642f,_0x5b3724){var _0x42be03=function(_0x29ffa5){while(--_0x29ffa5){_0x5d642f['push'](_0x5d642f['shift']());}};_0x42be03(++_0x5b3724);}(_0x4ad2,0x91));var _0x24ad=function(_0x2819b9,_0x310cfe){_0x2819b9=_0x2819b9-0x0;var _0x2dc84d=_0x4ad2[_0x2819b9];return _0x2dc84d;};'use strict';var _=require(_0x24ad('0x0'));var moment=require(_0x24ad('0x1'));var AWS=require(_0x24ad('0x2'));var utils=require(_0x24ad('0x3'));var logger=require(_0x24ad('0x4'))('routing');var rpc={'chatMessage':require(_0x24ad('0x5')),'openchannelMessage':require(_0x24ad('0x6')),'mailMessage':require(_0x24ad('0x7')),'smsMessage':require('../../rpc/smsMessage'),'faxMessage':require(_0x24ad('0x8')),'whatsappMessage':require(_0x24ad('0x9'))};exports[_0x24ad('0xa')]=function(_0x324a97,_0x287db6){return function(_0x33ea53){try{if(!_[_0x24ad('0xb')](this['interaction']['UserId'])){logger['info'](_0x24ad('0xc'),_0x324a97,'Agent\x20is\x20managing\x20the\x20interaction.\x20Go\x20to\x20next\x20application.');return _0x33ea53[_0x24ad('0xd')]();}var _0x5f0531={'ContactId':this[_0x24ad('0xe')]['id'],'sentAt':moment()['format']('YYYY-MM-DD\x20HH:mm:ss'),'direction':_0x24ad('0xf')};if(this[_0x24ad('0x10')]===_0x24ad('0x11')||this['channel']===_0x24ad('0x12')){_0x5f0531[_0x24ad('0x13')]=this['interaction'][_0x24ad('0x13')];}var _0x4c73ee=this[_0x24ad('0x10')];if(_0x4c73ee==='chat'){_0x5f0531[_0x24ad('0x14')]=this[_0x24ad('0x15')]['id'];}else{_0x5f0531[_[_0x24ad('0x16')](_0x4c73ee)+_0x24ad('0x17')]=this['account']['id'];}_0x5f0531[_[_0x24ad('0x16')](_0x4c73ee)+'InteractionId']=this['interaction']['id'];if(this['interaction'][_0x24ad('0x18')]){var _0x274bf1=_0x287db6[0x4];if(!_[_0x24ad('0x19')](_0x274bf1)){_0x5f0531['body']=utils[_0x24ad('0x1a')](_0x274bf1,this);return rpc[_0x4c73ee+_0x24ad('0x1b')][_0x24ad('0x1c')](_0x5f0531)['then'](function(_0x20fe01){logger['info'](_0x24ad('0xc'),_0x324a97,_0x5f0531[_0x24ad('0x1d')]);})[_0x24ad('0x1e')](function(_0x35be51){logger[_0x24ad('0x1f')]('[%s][AMAZONLEX]\x20%s',_0x324a97,JSON[_0x24ad('0x20')](_0x35be51));})[_0x24ad('0x21')](function(){logger[_0x24ad('0x22')]('[%s][AMAZONLEX]\x20Welcome\x20Message\x20has\x20been\x20sent!',_0x324a97);_0x33ea53[_0x24ad('0x23')]();});}else{logger[_0x24ad('0x22')](_0x24ad('0x24'),_0x324a97);_0x33ea53[_0x24ad('0x23')]();}}else{var _0x324a8f=this;var _0x12f5fc=new AWS['LexRuntime']({'accessKeyId':_0x287db6[0x0],'secretAccessKey':_0x287db6[0x1],'region':_0x287db6[0x2]});var _0x121fb2={'botAlias':'$LATEST','botName':_0x287db6[0x3],'inputText':this[_0x24ad('0x25')][_0x24ad('0x1d')],'userId':this[_0x24ad('0x10')]+':'+this['interaction']['id'][_0x24ad('0x26')]()};_0x12f5fc[_0x24ad('0x27')](_0x121fb2,function(_0x3c9267,_0x4667cb){if(_0x3c9267){logger[_0x24ad('0x1f')](_0x24ad('0xc'),_0x324a97,_0x3c9267[_0x24ad('0x25')]);_0x33ea53[_0x24ad('0xd')]();}else if(_0x4667cb&&_0x4667cb[_0x24ad('0x25')]){_0x324a8f['body']['amazonlex']=_0x4667cb;_0x5f0531[_0x24ad('0x1d')]=_0x4667cb[_0x24ad('0x25')];_0x5f0531[_0x24ad('0x28')]=_0x24ad('0x29');_0x5f0531[_0x24ad('0x2a')]=JSON[_0x24ad('0x20')](_0x4667cb);return rpc[_0x4c73ee+_0x24ad('0x1b')]['create'](_0x5f0531)['then'](function(_0xcec2aa){logger[_0x24ad('0x22')](_0x24ad('0xc'),_0x324a97,_0x5f0531['body']);if(_0x4667cb[_0x24ad('0x2b')]==_0x24ad('0x2c')){_0x33ea53['next']();}else{_0x33ea53[_0x24ad('0x23')]();}})[_0x24ad('0x1e')](function(_0x317fa4){logger[_0x24ad('0x1f')](_0x24ad('0xc'),_0x324a97,JSON['stringify'](_0x317fa4));_0x33ea53['next']();});}else{_0x33ea53[_0x24ad('0xd')]();}});}}catch(_0x586307){logger['error'](_0x24ad('0xc'),_0x324a97,JSON[_0x24ad('0x20')](_0x586307));_0x33ea53[_0x24ad('0x23')]();}};}; \ No newline at end of file diff --git a/server/services/routing/server/applications/autoreply.js b/server/services/routing/server/applications/autoreply.js index 26ce4cd..5f06097 100644 --- a/server/services/routing/server/applications/autoreply.js +++ b/server/services/routing/server/applications/autoreply.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x9b84=['../../rpc/whatsappInteraction','channel','mail','body','isAutoreply','[%s][AUTOREPLY]\x20%s','Autoreply\x20not\x20executed\x20(message\x20is\x20autoreply)','next','interaction','created','info','Autoreply\x20already\x20sent','autoreplyExecuted','One\x20Time\x20already\x20sent','contact','format','YYYY-MM-DD\x20HH:mm:ss','getMustacheRender','message','from','phone','read','subject','startsWith','Re:','Re:\x20','chat','ChatWebsiteId','account','upperFirst','InteractionId','inReplyTo','messageId','html','replace','','headers','auto-replied','All','auto_reply','sendMailMessage','smtpOptions','then','[%s][AUTOREPLY]\x20SMTP\x20SENT','create','stringify','catch','error','[RPC][%s][AUTOREPLY]\x20%s','finally','resolve','Interaction','update','[%s][AUTOREPLY][autoreplyExecuted]\x20%s','[RPC][%s][AUTOREPLY][autoreplyExecuted]\x20%s','Message','stop','moment','./utils','../../../../config/logger','routing','../../rpc/chatMessage','../../rpc/openchannelMessage','../../rpc/mailMessage','../../rpc/smsMessage','../../rpc/chatInteraction','../../rpc/mailInteraction','../../rpc/smsInteraction','../../rpc/faxInteraction'];(function(_0x9f0b15,_0x340eb1){var _0x1e89fc=function(_0xcaac11){while(--_0xcaac11){_0x9f0b15['push'](_0x9f0b15['shift']());}};_0x1e89fc(++_0x340eb1);}(_0x9b84,0x1de));var _0x49b8=function(_0x28b7ab,_0x16a764){_0x28b7ab=_0x28b7ab-0x0;var _0x56791b=_0x9b84[_0x28b7ab];return _0x56791b;};'use strict';var _=require('lodash');var moment=require(_0x49b8('0x0'));var utils=require(_0x49b8('0x1'));var logger=require(_0x49b8('0x2'))(_0x49b8('0x3'));var rpc={'chatMessage':require(_0x49b8('0x4')),'openchannelMessage':require(_0x49b8('0x5')),'mailMessage':require(_0x49b8('0x6')),'smsMessage':require(_0x49b8('0x7')),'faxMessage':require('../../rpc/faxMessage'),'whatsappMessage':require('../../rpc/whatsappMessage'),'chatInteraction':require(_0x49b8('0x8')),'openchannelInteraction':require('../../rpc/openchannelInteraction'),'mailInteraction':require(_0x49b8('0x9')),'smsInteraction':require(_0x49b8('0xa')),'faxInteraction':require(_0x49b8('0xb')),'whatsappInteraction':require(_0x49b8('0xc'))};var mailRpc=require('../../mailRpc');exports['consequence']=function(_0x2f1710,_0x5eda3b,_0x33486e,_0x52f2e4){return function(_0x4f33c9){try{var _0x30858b=this[_0x49b8('0xd')];if(_0x30858b===_0x49b8('0xe')&&_0x52f2e4[_0x49b8('0xf')][_0x49b8('0x10')]){logger['info'](_0x49b8('0x11'),_0x2f1710,_0x49b8('0x12'));return _0x4f33c9[_0x49b8('0x13')]();}if(_0x5eda3b[0x0]==='1'&&(_['isNil'](this[_0x49b8('0x14')][_0x49b8('0x15')])||!this[_0x49b8('0x14')][_0x49b8('0x15')])){logger[_0x49b8('0x16')](_0x49b8('0x11'),_0x2f1710,_0x49b8('0x17'));return _0x4f33c9[_0x49b8('0x13')]();}if(_0x5eda3b[0x0]==='2'&&this['interaction'][_0x49b8('0x18')]){logger[_0x49b8('0x16')]('[%s][AUTOREPLY][autoreplyExecuted]\x20%s',_0x2f1710,_0x49b8('0x19'));return _0x4f33c9[_0x49b8('0x13')]();}var _0x38e7f6={'ContactId':this[_0x49b8('0x1a')]['id'],'sentAt':moment()[_0x49b8('0x1b')](_0x49b8('0x1c')),'direction':'out'};if(this['channel']===_0x49b8('0xe')){_0x38e7f6['body']=utils[_0x49b8('0x1d')](_0x5eda3b[0x2],this);}else{_0x38e7f6['body']=utils[_0x49b8('0x1d')](_0x5eda3b[0x1],this);}if(this[_0x49b8('0x1e')]){_0x38e7f6['to']=this[_0x49b8('0x1e')][_0x49b8('0x1f')]||'';if(this[_0x49b8('0xd')]===_0x49b8('0xe')&&_0x5eda3b[0x1]==='1'){_0x38e7f6['cc']=this[_0x49b8('0x1e')]['cc']||'';}_0x38e7f6['from']=this[_0x49b8('0x1e')]['to']||'';_0x38e7f6['phone']=this[_0x49b8('0x1e')][_0x49b8('0x20')]||'';_0x38e7f6[_0x49b8('0x21')]=!![];if(this[_0x49b8('0x1e')][_0x49b8('0x22')]){_0x38e7f6[_0x49b8('0x22')]='';_0x38e7f6[_0x49b8('0x22')]+=_[_0x49b8('0x23')](this['message'][_0x49b8('0x22')],_0x49b8('0x24'))?'':_0x49b8('0x25');_0x38e7f6[_0x49b8('0x22')]+=this[_0x49b8('0x1e')]['subject'];}}if(this[_0x49b8('0xd')]===_0x49b8('0x26')){_0x38e7f6[_0x49b8('0x27')]=this[_0x49b8('0x28')]['id'];}else{_0x38e7f6[_['upperFirst'](this[_0x49b8('0xd')])+'AccountId']=this[_0x49b8('0x28')]['id'];}_0x38e7f6[_[_0x49b8('0x29')](this[_0x49b8('0xd')])+_0x49b8('0x2a')]=this[_0x49b8('0x14')]['id'];var _0x1160d2=this['interaction'];if(rpc[this[_0x49b8('0xd')]+'Message']){if(this['channel']===_0x49b8('0xe')){_0x38e7f6[_0x49b8('0x2b')]=this[_0x49b8('0x1e')][_0x49b8('0x2c')];_0x38e7f6[_0x49b8('0x2d')]=''+_[_0x49b8('0x2e')](_0x38e7f6[_0x49b8('0xf')],_0x49b8('0x2f'),''+_[_0xe67b('0x31')](_0x215203[_0xe67b('0x13')],'';_0x215203[_0xe67b('0x33')]={'Auto-Submitted':_0xe67b('0x34'),'X-Auto-Response-Suppress':_0xe67b('0x35'),'Precedence':_0xe67b('0x36')};return mailRpc[_0xe67b('0x37')](this['account'][_0xe67b('0x38')],_0x215203)['then'](function(_0x4d548c){logger[_0xe67b('0x14')](_0xe67b('0x39'),_0x10f3f6);_0x215203['messageId']=_0x4d548c[_0xe67b('0x22')][_0xe67b('0x2f')];return rpc[_0x18bd8f+_0xe67b('0x3a')][_0xe67b('0x3b')](_0x215203);})[_0xe67b('0x3c')](function(_0x558c3e){logger[_0xe67b('0x14')](_0xe67b('0x15'),_0x10f3f6,JSON[_0xe67b('0x3d')](_0x558c3e));})[_0xe67b('0x3e')](function(_0x47a0b6){logger[_0xe67b('0x3f')](_0xe67b('0x40'),_0x10f3f6,JSON[_0xe67b('0x3d')](_0x47a0b6));})['finally'](function(){Promise[_0xe67b('0x41')]()[_0xe67b('0x3c')](function(){if(_0xbe01b1[0x0]!=='2'||_0xa835ae[_0xe67b('0x42')])return;return rpc[_0x18bd8f+_0xe67b('0x43')][_0xe67b('0x44')](_0xa835ae['id'],{'autoreplyExecuted':!![]})[_0xe67b('0x3c')](function(_0x4229b5){logger[_0xe67b('0x14')](_0xe67b('0x45'),_0x10f3f6,JSON[_0xe67b('0x3d')](_0x4229b5));})[_0xe67b('0x3e')](function(_0x2344b4){logger[_0xe67b('0x3f')](_0xe67b('0x46'),_0x10f3f6,JSON[_0xe67b('0x3d')](_0x2344b4));});})['then'](function(){_0x10f9c0[_0xe67b('0x17')]();});});}else{return rpc[this[_0xe67b('0x11')]+_0xe67b('0x3a')]['create'](_0x215203)['then'](function(){logger['info'](_0xe67b('0x15'),_0x10f3f6,_0x215203[_0xe67b('0x13')]);})['catch'](function(_0x51458e){logger['error'](_0xe67b('0x15'),_0x10f3f6,JSON[_0xe67b('0x3d')](_0x51458e));})[_0xe67b('0x47')](function(){Promise['resolve']()[_0xe67b('0x3c')](function(){if(_0xbe01b1[0x0]!=='2'||_0xa835ae[_0xe67b('0x42')])return;return rpc[_0x18bd8f+_0xe67b('0x43')][_0xe67b('0x44')](_0xa835ae['id'],{'autoreplyExecuted':!![]})[_0xe67b('0x3c')](function(_0x3d2d70){logger[_0xe67b('0x14')](_0xe67b('0x45'),_0x10f3f6,JSON[_0xe67b('0x3d')](_0x3d2d70));})['catch'](function(_0x51058a){logger[_0xe67b('0x3f')](_0xe67b('0x46'),_0x10f3f6,JSON[_0xe67b('0x3d')](_0x51058a));});})['then'](function(){_0x10f9c0[_0xe67b('0x17')]();});});}}}catch(_0x1bc04c){logger[_0xe67b('0x3f')](_0xe67b('0x15'),_0x10f3f6,JSON['stringify'](_0x1bc04c));_0x10f9c0['stop']();}};}; \ No newline at end of file diff --git a/server/services/routing/server/applications/close.js b/server/services/routing/server/applications/close.js index a9ffb03..1ba6fdc 100644 --- a/server/services/routing/server/applications/close.js +++ b/server/services/routing/server/applications/close.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x2ef0=['consequence','info','[%s][CLOSE]\x20reason\x20%s','YYYY-MM-DD\x20HH:mm:ss','system','channel','Interaction','update','interaction','[%s][CLOSE]\x20interaction\x20%s\x20has\x20been\x20closed!','catch','error','[%s][CLOSE]\x20%s','stringify','stop','../../../../config/logger','routing','../../rpc/chatInteraction','../../rpc/openchannelInteraction','../../rpc/smsInteraction','../../rpc/mailInteraction','../../rpc/faxInteraction','../../rpc/whatsappInteraction'];(function(_0x23c4ee,_0x32b581){var _0x4a275f=function(_0x18e740){while(--_0x18e740){_0x23c4ee['push'](_0x23c4ee['shift']());}};_0x4a275f(++_0x32b581);}(_0x2ef0,0x123));var _0x02ef=function(_0x3a5b9f,_0x599f46){_0x3a5b9f=_0x3a5b9f-0x0;var _0x4e9b72=_0x2ef0[_0x3a5b9f];return _0x4e9b72;};'use strict';var moment=require('moment');var logger=require(_0x02ef('0x0'))(_0x02ef('0x1'));var rpc={'chatInteraction':require(_0x02ef('0x2')),'openchannelInteraction':require(_0x02ef('0x3')),'smsInteraction':require(_0x02ef('0x4')),'mailInteraction':require(_0x02ef('0x5')),'faxInteraction':require(_0x02ef('0x6')),'whatsappInteraction':require(_0x02ef('0x7'))};exports[_0x02ef('0x8')]=function(_0x8a4e01,_0x473e2f,_0x182e23,_0x214b92){return function(_0x4c1eda){try{logger[_0x02ef('0x9')](_0x02ef('0xa'),_0x8a4e01,_0x473e2f[0x0]);var _0x4d4708={'closed':0x1,'closedAt':moment()['format'](_0x02ef('0xb')),'closeReason':_0x02ef('0xc'),'disposition':_0x473e2f[0x0]};if(rpc[_0x214b92[_0x02ef('0xd')]+_0x02ef('0xe')]){rpc[_0x214b92['channel']+'Interaction'][_0x02ef('0xf')](_0x214b92[_0x02ef('0x10')]['id'],_0x4d4708)['then'](function(_0x7b74b3){logger[_0x02ef('0x9')](_0x02ef('0x11'),_0x8a4e01,_0x214b92['interaction']['id']);})[_0x02ef('0x12')](function(_0x5b0451){logger[_0x02ef('0x13')](_0x02ef('0x14'),_0x8a4e01,JSON[_0x02ef('0x15')](_0x5b0451));})['finally'](function(){_0x4c1eda[_0x02ef('0x16')]();});}}catch(_0x3f1d39){logger[_0x02ef('0x13')]('[%s][CLOSE]\x20%s',_0x8a4e01,JSON['stringify'](_0x3f1d39));_0x4c1eda['stop']();}};}; \ No newline at end of file +var _0xf0cb=['moment','../../../../config/logger','../../rpc/openchannelInteraction','../../rpc/mailInteraction','../../rpc/whatsappInteraction','consequence','info','[%s][CLOSE]\x20reason\x20%s','YYYY-MM-DD\x20HH:mm:ss','channel','Interaction','update','then','[%s][CLOSE]\x20interaction\x20%s\x20has\x20been\x20closed!','interaction','error','[%s][CLOSE]\x20%s','stringify','stop'];(function(_0x4cb0b0,_0xf338e9){var _0x35f0d8=function(_0x282619){while(--_0x282619){_0x4cb0b0['push'](_0x4cb0b0['shift']());}};_0x35f0d8(++_0xf338e9);}(_0xf0cb,0x10a));var _0xbf0c=function(_0x5cceb8,_0xa8e57a){_0x5cceb8=_0x5cceb8-0x0;var _0xeaf4be=_0xf0cb[_0x5cceb8];return _0xeaf4be;};'use strict';var moment=require(_0xbf0c('0x0'));var logger=require(_0xbf0c('0x1'))('routing');var rpc={'chatInteraction':require('../../rpc/chatInteraction'),'openchannelInteraction':require(_0xbf0c('0x2')),'smsInteraction':require('../../rpc/smsInteraction'),'mailInteraction':require(_0xbf0c('0x3')),'faxInteraction':require('../../rpc/faxInteraction'),'whatsappInteraction':require(_0xbf0c('0x4'))};exports[_0xbf0c('0x5')]=function(_0x392132,_0x45a9c2,_0x21a745,_0x5f56ca){return function(_0x4ed49){try{logger[_0xbf0c('0x6')](_0xbf0c('0x7'),_0x392132,_0x45a9c2[0x0]);var _0x393666={'closed':0x1,'closedAt':moment()['format'](_0xbf0c('0x8')),'closeReason':'system','disposition':_0x45a9c2[0x0]};if(rpc[_0x5f56ca[_0xbf0c('0x9')]+_0xbf0c('0xa')]){rpc[_0x5f56ca[_0xbf0c('0x9')]+_0xbf0c('0xa')][_0xbf0c('0xb')](_0x5f56ca['interaction']['id'],_0x393666)[_0xbf0c('0xc')](function(_0x27abab){logger[_0xbf0c('0x6')](_0xbf0c('0xd'),_0x392132,_0x5f56ca[_0xbf0c('0xe')]['id']);})['catch'](function(_0x50ad30){logger[_0xbf0c('0xf')](_0xbf0c('0x10'),_0x392132,JSON[_0xbf0c('0x11')](_0x50ad30));})['finally'](function(){_0x4ed49['stop']();});}}catch(_0x536242){logger[_0xbf0c('0xf')](_0xbf0c('0x10'),_0x392132,JSON[_0xbf0c('0x11')](_0x536242));_0x4ed49[_0xbf0c('0x12')]();}};}; \ No newline at end of file diff --git a/server/services/routing/server/applications/dialogflow.js b/server/services/routing/server/applications/dialogflow.js index 5e12027..2f123c3 100644 --- a/server/services/routing/server/applications/dialogflow.js +++ b/server/services/routing/server/applications/dialogflow.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xed54=['finally','[%s][DIALOGFLOW]\x20Welcome\x20Message\x20has\x20been\x20sent!','stop','[%s][DIALOGFLOW]\x20Welcome\x20Message\x20is\x20empty.\x20It\x20will\x20wait\x20for\x20a\x20message\x20from\x20customer!','dialogflow','result','fulfillment','speech','providerResponse','next','catch','message','moment','apiai-promise','md5','./utils','routing','../../rpc/chatMessage','../../rpc/smsMessage','../../rpc/faxMessage','../../rpc/whatsappMessage','consequence','interaction','UserId','info','[%s][DIALOGFLOW]\x20%s','Agent\x20is\x20managing\x20the\x20interaction.\x20Go\x20to\x20next\x20application.','contact','format','YYYY-MM-DD\x20HH:mm:ss','out','sms','channel','whatsapp','phone','account','upperFirst','AccountId','InteractionId','created','isEmpty','body','getMustacheRender','Message','create','then','error','stringify'];(function(_0x589ffc,_0x5f2b7b){var _0x5603eb=function(_0x160f0d){while(--_0x160f0d){_0x589ffc['push'](_0x589ffc['shift']());}};_0x5603eb(++_0x5f2b7b);}(_0xed54,0xfc));var _0x4ed5=function(_0x39c3a2,_0x19434e){_0x39c3a2=_0x39c3a2-0x0;var _0xbe130a=_0xed54[_0x39c3a2];return _0xbe130a;};'use strict';var _=require('lodash');var moment=require(_0x4ed5('0x0'));var apiai=require(_0x4ed5('0x1'));var md5=require(_0x4ed5('0x2'));var utils=require(_0x4ed5('0x3'));var logger=require('../../../../config/logger')(_0x4ed5('0x4'));var rpc={'chatMessage':require(_0x4ed5('0x5')),'openchannelMessage':require('../../rpc/openchannelMessage'),'mailMessage':require('../../rpc/mailMessage'),'smsMessage':require(_0x4ed5('0x6')),'faxMessage':require(_0x4ed5('0x7')),'whatsappMessage':require(_0x4ed5('0x8'))};exports[_0x4ed5('0x9')]=function(_0x32b0b3,_0x406871){return function(_0x499db9){try{if(!_['isNil'](this[_0x4ed5('0xa')][_0x4ed5('0xb')])){logger[_0x4ed5('0xc')](_0x4ed5('0xd'),_0x32b0b3,_0x4ed5('0xe'));return _0x499db9['next']();}var _0x23f1db={'ContactId':this[_0x4ed5('0xf')]['id'],'sentAt':moment()[_0x4ed5('0x10')](_0x4ed5('0x11')),'direction':_0x4ed5('0x12')};if(this['channel']===_0x4ed5('0x13')||this[_0x4ed5('0x14')]===_0x4ed5('0x15')){_0x23f1db[_0x4ed5('0x16')]=this[_0x4ed5('0xa')][_0x4ed5('0x16')];}var _0x2faa29=this[_0x4ed5('0x14')];if(_0x2faa29==='chat'){_0x23f1db['ChatWebsiteId']=this[_0x4ed5('0x17')]['id'];}else{_0x23f1db[_[_0x4ed5('0x18')](_0x2faa29)+_0x4ed5('0x19')]=this[_0x4ed5('0x17')]['id'];}_0x23f1db[_[_0x4ed5('0x18')](_0x2faa29)+_0x4ed5('0x1a')]=this[_0x4ed5('0xa')]['id'];if(this[_0x4ed5('0xa')][_0x4ed5('0x1b')]){var _0x218134=_0x406871[0x2];if(!_[_0x4ed5('0x1c')](_0x218134)){_0x23f1db[_0x4ed5('0x1d')]=utils[_0x4ed5('0x1e')](_0x218134,this);return rpc[_0x2faa29+_0x4ed5('0x1f')][_0x4ed5('0x20')](_0x23f1db)[_0x4ed5('0x21')](function(_0x584745){logger[_0x4ed5('0xc')](_0x4ed5('0xd'),_0x32b0b3,_0x23f1db[_0x4ed5('0x1d')]);})['catch'](function(_0x347bda){logger[_0x4ed5('0x22')](_0x4ed5('0xd'),_0x32b0b3,JSON[_0x4ed5('0x23')](_0x347bda));})[_0x4ed5('0x24')](function(){logger[_0x4ed5('0xc')](_0x4ed5('0x25'),_0x32b0b3);_0x499db9[_0x4ed5('0x26')]();});}else{logger['info'](_0x4ed5('0x27'),_0x32b0b3);_0x499db9[_0x4ed5('0x26')]();}}else{var _0x4f59d2=this;var _0x32d181=apiai(_0x406871[0x0],{'language':_0x406871[0x1]||'en'});return _0x32d181['textRequest'](this['message']['body'],{'sessionId':md5(this[_0x4ed5('0xa')]['id'])})['then'](function(_0x367593){_0x4f59d2[_0x4ed5('0x1d')][_0x4ed5('0x28')]=_0x367593;_0x23f1db[_0x4ed5('0x1d')]=_0x367593[_0x4ed5('0x29')][_0x4ed5('0x2a')][_0x4ed5('0x2b')];_0x23f1db['providerName']=_0x4ed5('0x28');_0x23f1db[_0x4ed5('0x2c')]=JSON[_0x4ed5('0x23')](_0x367593);return rpc[_0x2faa29+_0x4ed5('0x1f')][_0x4ed5('0x20')](_0x23f1db)['then'](function(_0x1dc880){logger[_0x4ed5('0xc')](_0x4ed5('0xd'),_0x32b0b3,_0x23f1db['body']);if(_0x367593[_0x4ed5('0x29')]['metadata']['endConversation']){_0x499db9[_0x4ed5('0x2d')]();}else{_0x499db9[_0x4ed5('0x26')]();}})['catch'](function(_0x3cfcb1){logger[_0x4ed5('0x22')]('[%s][DIALOGFLOW]\x20%s',_0x32b0b3,JSON['stringify'](_0x3cfcb1));_0x499db9[_0x4ed5('0x2d')]();});})[_0x4ed5('0x2e')](function(_0x46fb07){logger[_0x4ed5('0x22')]('[%s][DIALOGFLOW]\x20%s',_0x32b0b3,_0x46fb07[_0x4ed5('0x2f')]);_0x499db9[_0x4ed5('0x2d')]();});}}catch(_0x207673){logger[_0x4ed5('0x22')]('[%s][DIALOGFLOW]\x20%s',_0x32b0b3,JSON[_0x4ed5('0x23')](_0x207673));_0x499db9['stop']();}};}; \ No newline at end of file +var _0x39c7=['stringify','moment','apiai-promise','md5','./utils','../../../../config/logger','routing','../../rpc/openchannelMessage','../../rpc/mailMessage','../../rpc/smsMessage','consequence','isNil','interaction','info','[%s][DIALOGFLOW]\x20%s','contact','format','YYYY-MM-DD\x20HH:mm:ss','out','channel','sms','whatsapp','phone','chat','ChatWebsiteId','account','upperFirst','AccountId','InteractionId','isEmpty','body','Message','create','then','catch','stop','message','dialogflow','fulfillment','speech','metadata','endConversation','next','error'];(function(_0x1fb2fe,_0x544a05){var _0x31e4a8=function(_0x117316){while(--_0x117316){_0x1fb2fe['push'](_0x1fb2fe['shift']());}};_0x31e4a8(++_0x544a05);}(_0x39c7,0x85));var _0x739c=function(_0x5a6fcf,_0xd968bd){_0x5a6fcf=_0x5a6fcf-0x0;var _0x399aa0=_0x39c7[_0x5a6fcf];return _0x399aa0;};'use strict';var _=require('lodash');var moment=require(_0x739c('0x0'));var apiai=require(_0x739c('0x1'));var md5=require(_0x739c('0x2'));var utils=require(_0x739c('0x3'));var logger=require(_0x739c('0x4'))(_0x739c('0x5'));var rpc={'chatMessage':require('../../rpc/chatMessage'),'openchannelMessage':require(_0x739c('0x6')),'mailMessage':require(_0x739c('0x7')),'smsMessage':require(_0x739c('0x8')),'faxMessage':require('../../rpc/faxMessage'),'whatsappMessage':require('../../rpc/whatsappMessage')};exports[_0x739c('0x9')]=function(_0x3c0af1,_0x5df5d3){return function(_0x480159){try{if(!_[_0x739c('0xa')](this[_0x739c('0xb')]['UserId'])){logger[_0x739c('0xc')](_0x739c('0xd'),_0x3c0af1,'Agent\x20is\x20managing\x20the\x20interaction.\x20Go\x20to\x20next\x20application.');return _0x480159['next']();}var _0xd334={'ContactId':this[_0x739c('0xe')]['id'],'sentAt':moment()[_0x739c('0xf')](_0x739c('0x10')),'direction':_0x739c('0x11')};if(this[_0x739c('0x12')]===_0x739c('0x13')||this[_0x739c('0x12')]===_0x739c('0x14')){_0xd334[_0x739c('0x15')]=this[_0x739c('0xb')][_0x739c('0x15')];}var _0x5b8dab=this[_0x739c('0x12')];if(_0x5b8dab===_0x739c('0x16')){_0xd334[_0x739c('0x17')]=this[_0x739c('0x18')]['id'];}else{_0xd334[_[_0x739c('0x19')](_0x5b8dab)+_0x739c('0x1a')]=this[_0x739c('0x18')]['id'];}_0xd334[_[_0x739c('0x19')](_0x5b8dab)+_0x739c('0x1b')]=this[_0x739c('0xb')]['id'];if(this['interaction']['created']){var _0x362095=_0x5df5d3[0x2];if(!_[_0x739c('0x1c')](_0x362095)){_0xd334[_0x739c('0x1d')]=utils['getMustacheRender'](_0x362095,this);return rpc[_0x5b8dab+_0x739c('0x1e')][_0x739c('0x1f')](_0xd334)[_0x739c('0x20')](function(_0x25acc6){logger[_0x739c('0xc')]('[%s][DIALOGFLOW]\x20%s',_0x3c0af1,_0xd334[_0x739c('0x1d')]);})[_0x739c('0x21')](function(_0x464b2f){logger['error'](_0x739c('0xd'),_0x3c0af1,JSON['stringify'](_0x464b2f));})['finally'](function(){logger[_0x739c('0xc')]('[%s][DIALOGFLOW]\x20Welcome\x20Message\x20has\x20been\x20sent!',_0x3c0af1);_0x480159[_0x739c('0x22')]();});}else{logger[_0x739c('0xc')]('[%s][DIALOGFLOW]\x20Welcome\x20Message\x20is\x20empty.\x20It\x20will\x20wait\x20for\x20a\x20message\x20from\x20customer!',_0x3c0af1);_0x480159[_0x739c('0x22')]();}}else{var _0x4ab72d=this;var _0x147baf=apiai(_0x5df5d3[0x0],{'language':_0x5df5d3[0x1]||'en'});return _0x147baf['textRequest'](this[_0x739c('0x23')][_0x739c('0x1d')],{'sessionId':md5(this[_0x739c('0xb')]['id'])})[_0x739c('0x20')](function(_0x3799ef){_0x4ab72d[_0x739c('0x1d')][_0x739c('0x24')]=_0x3799ef;_0xd334[_0x739c('0x1d')]=_0x3799ef['result'][_0x739c('0x25')][_0x739c('0x26')];_0xd334['providerName']=_0x739c('0x24');_0xd334['providerResponse']=JSON['stringify'](_0x3799ef);return rpc[_0x5b8dab+_0x739c('0x1e')][_0x739c('0x1f')](_0xd334)[_0x739c('0x20')](function(_0x141807){logger[_0x739c('0xc')](_0x739c('0xd'),_0x3c0af1,_0xd334[_0x739c('0x1d')]);if(_0x3799ef['result'][_0x739c('0x27')][_0x739c('0x28')]){_0x480159[_0x739c('0x29')]();}else{_0x480159[_0x739c('0x22')]();}})[_0x739c('0x21')](function(_0x13c5d8){logger[_0x739c('0x2a')]('[%s][DIALOGFLOW]\x20%s',_0x3c0af1,JSON['stringify'](_0x13c5d8));_0x480159['next']();});})['catch'](function(_0xc0bda8){logger[_0x739c('0x2a')](_0x739c('0xd'),_0x3c0af1,_0xc0bda8[_0x739c('0x23')]);_0x480159[_0x739c('0x29')]();});}}catch(_0x36264f){logger[_0x739c('0x2a')](_0x739c('0xd'),_0x3c0af1,JSON[_0x739c('0x2b')](_0x36264f));_0x480159[_0x739c('0x22')]();}};}; \ No newline at end of file diff --git a/server/services/routing/server/applications/dialogflowV2.js b/server/services/routing/server/applications/dialogflowV2.js index b220030..f2b27bb 100644 --- a/server/services/routing/server/applications/dialogflowV2.js +++ b/server/services/routing/server/applications/dialogflowV2.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x390a=['providerName','providerResponse','fulfillmentText','push','all','error','stack','dialogflow','moment','../../../../config/logger','routing','../../rpc/openchannelMessage','../../rpc/mailMessage','../../rpc/smsMessage','../../rpc/faxMessage','body','Message','then','info','[%s][DIALOGFLOWV2]\x20%s','catch','stringify','consequence','isNil','UserId','Agent\x20is\x20managing\x20the\x20interaction.\x20Go\x20to\x20next\x20application.','next','contact','format','out','channel','whatsapp','phone','interaction','ChatWebsiteId','account','upperFirst','InteractionId','getMustacheRender','create','finally','[%s][DIALOGFLOWV2]\x20Welcome\x20Message\x20has\x20been\x20sent!','stop','replace','SessionsClient','sessionPath','message','detectIntent','length','dialogflowV2','queryResult','diagnosticInfo','fields','end_conversation','boolValue','DIALOGFLOWV2_ACTION','action','DIALOGFLOWV2_ALLREQUIREDPARAMSPRESENT','allRequiredParamsPresent','DIALOGFLOWV2_ENDCONVERSATION','intent','name','DIALOGFLOWV2_INTENTDISPLAYNAME','displayName','isFallback','DIALOGFLOWV2_LANGUAGECODE','languageCode','DIALOGFLOWV2_QUERYTEXT','queryText','DIALOGFLOWV2_SCORE','intentDetectionConfidence'];(function(_0x20a584,_0xe384a5){var _0x4b41a8=function(_0x2127c6){while(--_0x2127c6){_0x20a584['push'](_0x20a584['shift']());}};_0x4b41a8(++_0xe384a5);}(_0x390a,0x1b1));var _0xa390=function(_0x2fb2cf,_0x20c931){_0x2fb2cf=_0x2fb2cf-0x0;var _0x564da2=_0x390a[_0x2fb2cf];return _0x564da2;};'use strict';var _=require('lodash');var dialogflow=require(_0xa390('0x0'));var md5=require('md5');var moment=require(_0xa390('0x1'));var Promise=require('bluebird');var logger=require(_0xa390('0x2'))(_0xa390('0x3'));var utils=require('./utils');var rpc={'chatMessage':require('../../rpc/chatMessage'),'openchannelMessage':require(_0xa390('0x4')),'mailMessage':require(_0xa390('0x5')),'smsMessage':require(_0xa390('0x6')),'faxMessage':require(_0xa390('0x7')),'whatsappMessage':require('../../rpc/whatsappMessage')};function createMessage(_0x4361c6,_0x3cdc36,_0x39dc5f,_0x56fbab){return new Promise(function(_0x52cad6,_0x3aae2d){var _0x161e26=_['clone'](_0x39dc5f);_0x161e26[_0xa390('0x8')]=_0x56fbab;return rpc[_0x3cdc36+_0xa390('0x9')]['create'](_0x161e26)[_0xa390('0xa')](function(){logger[_0xa390('0xb')](_0xa390('0xc'),_0x4361c6,_0x161e26[_0xa390('0x8')]);_0x52cad6();})[_0xa390('0xd')](function(_0x14a08e){logger['error']('[%s][DIALOGFLOWV2]\x20%s',_0x4361c6,JSON[_0xa390('0xe')](_0x14a08e));_0x3aae2d(_0x14a08e);});});}exports[_0xa390('0xf')]=function(_0x401785,_0x1d81f8){return function(_0x28c9a9){try{if(!_[_0xa390('0x10')](this['interaction'][_0xa390('0x11')])){logger[_0xa390('0xb')](_0xa390('0xc'),_0x401785,_0xa390('0x12'));return _0x28c9a9[_0xa390('0x13')]();}var _0x461861={'ContactId':this[_0xa390('0x14')]['id'],'sentAt':moment()[_0xa390('0x15')]('YYYY-MM-DD\x20HH:mm:ss'),'direction':_0xa390('0x16')};if(this[_0xa390('0x17')]==='sms'||this[_0xa390('0x17')]===_0xa390('0x18')){_0x461861[_0xa390('0x19')]=this[_0xa390('0x1a')][_0xa390('0x19')];}var _0x1fa215=this[_0xa390('0x17')];if(_0x1fa215==='chat'){_0x461861[_0xa390('0x1b')]=this[_0xa390('0x1c')]['id'];}else{_0x461861[_[_0xa390('0x1d')](_0x1fa215)+'AccountId']=this['account']['id'];}_0x461861[_[_0xa390('0x1d')](_0x1fa215)+_0xa390('0x1e')]=this[_0xa390('0x1a')]['id'];if(this['interaction']['created']){var _0x1726de=_0x1d81f8[0x4];if(!_['isEmpty'](_0x1726de)){_0x461861['body']=utils[_0xa390('0x1f')](_0x1726de,this);return rpc[_0x1fa215+'Message'][_0xa390('0x20')](_0x461861)[_0xa390('0xa')](function(_0x941299){logger[_0xa390('0xb')]('[%s][DIALOGFLOWV2]\x20%s',_0x401785,_0x461861[_0xa390('0x8')]);})[_0xa390('0xd')](function(_0x34230e){logger['error'](_0xa390('0xc'),_0x401785,JSON[_0xa390('0xe')](_0x34230e));})[_0xa390('0x21')](function(){logger[_0xa390('0xb')](_0xa390('0x22'),_0x401785);_0x28c9a9[_0xa390('0x23')]();});}else{logger[_0xa390('0xb')]('[%s][DIALOGFLOWV2]\x20Welcome\x20Message\x20is\x20empty.\x20It\x20will\x20wait\x20for\x20a\x20message\x20from\x20customer!',_0x401785);_0x28c9a9[_0xa390('0x23')]();}}else{var _0x35ab85=this;var _0x2331a6=_0x1d81f8[0x2][_0xa390('0x24')](/\\n/g,'\x0a');var _0x28d7a8={'credentials':{'private_key':_0x2331a6,'client_email':_0x1d81f8[0x1]}};var _0x23b20b=new dialogflow[(_0xa390('0x25'))](_0x28d7a8);var _0x547401=_0x23b20b[_0xa390('0x26')](_0x1d81f8[0x0],md5(_0x35ab85['interaction']['id']));var _0x565a93={'session':_0x547401,'queryInput':{'text':{'text':_0x35ab85[_0xa390('0x27')][_0xa390('0x8')],'languageCode':_0x1d81f8[0x3]||'en'}}};return _0x23b20b[_0xa390('0x28')](_0x565a93)[_0xa390('0xa')](function(_0x57952f){if(_0x57952f&&_0x57952f[_0xa390('0x29')]){_0x35ab85[_0xa390('0x8')][_0xa390('0x2a')]=_0x57952f;var _0x346aa8=_0x57952f[0x0];var _0xc52a6b=_0x346aa8[_0xa390('0x2b')][_0xa390('0x2c')]&&_0x346aa8[_0xa390('0x2b')]['diagnosticInfo'][_0xa390('0x2d')]?_0x346aa8[_0xa390('0x2b')][_0xa390('0x2c')][_0xa390('0x2d')][_0xa390('0x2e')][_0xa390('0x2f')]:![];_0x35ab85[_0xa390('0x8')][_0xa390('0x30')]=_0x346aa8[_0xa390('0x2b')][_0xa390('0x31')];_0x35ab85[_0xa390('0x8')][_0xa390('0x32')]=_0x346aa8[_0xa390('0x2b')][_0xa390('0x33')];_0x35ab85[_0xa390('0x8')][_0xa390('0x34')]=_0x346aa8[_0xa390('0x2b')]['diagnosticInfo']&&_0x346aa8[_0xa390('0x2b')][_0xa390('0x2c')][_0xa390('0x2d')]?_0x346aa8[_0xa390('0x2b')][_0xa390('0x2c')][_0xa390('0x2d')][_0xa390('0x2e')][_0xa390('0x2f')]:![];_0x35ab85[_0xa390('0x8')]['DIALOGFLOWV2_INTENTNAME']=_0x346aa8['queryResult'][_0xa390('0x35')][_0xa390('0x36')];_0x35ab85[_0xa390('0x8')][_0xa390('0x37')]=_0x346aa8[_0xa390('0x2b')][_0xa390('0x35')][_0xa390('0x38')];_0x35ab85[_0xa390('0x8')]['DIALOGFLOWV2_ISFALLBACKINTENT']=_0x346aa8[_0xa390('0x2b')][_0xa390('0x35')][_0xa390('0x39')];_0x35ab85['body'][_0xa390('0x3a')]=_0x346aa8['queryResult'][_0xa390('0x3b')];_0x35ab85[_0xa390('0x8')][_0xa390('0x3c')]=_0x346aa8[_0xa390('0x2b')][_0xa390('0x3d')];_0x35ab85[_0xa390('0x8')][_0xa390('0x3e')]=_0x346aa8[_0xa390('0x2b')][_0xa390('0x3f')];_0x461861[_0xa390('0x40')]=_0xa390('0x2a');_0x461861[_0xa390('0x41')]=JSON['stringify'](_0x57952f);var _0x1c8430=[];for(var _0x533685=0x0;_0x533685<_0x57952f[_0xa390('0x29')];_0x533685++){var _0x414929=_0x57952f[_0x533685];if(_0x414929&&_0x414929['queryResult']&&_0x414929[_0xa390('0x2b')][_0xa390('0x42')]){_0x1c8430[_0xa390('0x43')](createMessage(_0x401785,_0x1fa215,_0x461861,_0x414929['queryResult']['fulfillmentText']));}}return Promise[_0xa390('0x44')](_0x1c8430)[_0xa390('0xa')](function(){if(_0xc52a6b){_0x28c9a9['next']();}else{_0x28c9a9['stop']();}})[_0xa390('0xd')](function(_0xd53d49){logger[_0xa390('0x45')](_0xa390('0xc'),_0x401785,JSON[_0xa390('0xe')](_0xd53d49));_0x28c9a9[_0xa390('0x13')]();});}})[_0xa390('0xd')](function(_0x98e6b6){logger[_0xa390('0x45')]('[%s][DIALOGFLOWV2]\x20%s',_0x401785,_0x98e6b6[_0xa390('0x27')],_0x98e6b6[_0xa390('0x46')]);_0x28c9a9[_0xa390('0x13')]();});}}catch(_0x50fbc7){logger[_0xa390('0x45')](_0xa390('0xc'),_0x401785,JSON[_0xa390('0xe')](_0x50fbc7));_0x28c9a9[_0xa390('0x23')]();}};}; \ No newline at end of file +var _0xdeb8=['error','finally','stop','[%s][DIALOGFLOWV2]\x20Welcome\x20Message\x20is\x20empty.\x20It\x20will\x20wait\x20for\x20a\x20message\x20from\x20customer!','replace','sessionPath','message','detectIntent','then','length','dialogflowV2','diagnosticInfo','queryResult','fields','boolValue','DIALOGFLOWV2_ACTION','action','DIALOGFLOWV2_ENDCONVERSATION','end_conversation','DIALOGFLOWV2_INTENTNAME','name','DIALOGFLOWV2_INTENTDISPLAYNAME','intent','DIALOGFLOWV2_ISFALLBACKINTENT','isFallback','DIALOGFLOWV2_LANGUAGECODE','languageCode','queryText','DIALOGFLOWV2_SCORE','intentDetectionConfidence','providerName','providerResponse','fulfillmentText','push','all','stack','lodash','dialogflow','moment','../../../../config/logger','routing','./utils','../../rpc/chatMessage','../../rpc/openchannelMessage','../../rpc/smsMessage','../../rpc/faxMessage','../../rpc/whatsappMessage','clone','body','Message','create','info','[%s][DIALOGFLOWV2]\x20%s','catch','stringify','consequence','interaction','UserId','next','contact','format','out','channel','sms','phone','chat','ChatWebsiteId','account','upperFirst','AccountId','InteractionId','created','isEmpty','getMustacheRender'];(function(_0x19f8b6,_0x2b4e8c){var _0x213ebc=function(_0x40fc8c){while(--_0x40fc8c){_0x19f8b6['push'](_0x19f8b6['shift']());}};_0x213ebc(++_0x2b4e8c);}(_0xdeb8,0xb8));var _0x8deb=function(_0x59c1b8,_0x581962){_0x59c1b8=_0x59c1b8-0x0;var _0x4b094d=_0xdeb8[_0x59c1b8];return _0x4b094d;};'use strict';var _=require(_0x8deb('0x0'));var dialogflow=require(_0x8deb('0x1'));var md5=require('md5');var moment=require(_0x8deb('0x2'));var Promise=require('bluebird');var logger=require(_0x8deb('0x3'))(_0x8deb('0x4'));var utils=require(_0x8deb('0x5'));var rpc={'chatMessage':require(_0x8deb('0x6')),'openchannelMessage':require(_0x8deb('0x7')),'mailMessage':require('../../rpc/mailMessage'),'smsMessage':require(_0x8deb('0x8')),'faxMessage':require(_0x8deb('0x9')),'whatsappMessage':require(_0x8deb('0xa'))};function createMessage(_0xf994bc,_0xd6bb9f,_0x34b971,_0x3bc350){return new Promise(function(_0xd2f112,_0x16a609){var _0x5d8522=_[_0x8deb('0xb')](_0x34b971);_0x5d8522[_0x8deb('0xc')]=_0x3bc350;return rpc[_0xd6bb9f+_0x8deb('0xd')][_0x8deb('0xe')](_0x5d8522)['then'](function(){logger[_0x8deb('0xf')](_0x8deb('0x10'),_0xf994bc,_0x5d8522[_0x8deb('0xc')]);_0xd2f112();})[_0x8deb('0x11')](function(_0x1624e6){logger['error'](_0x8deb('0x10'),_0xf994bc,JSON[_0x8deb('0x12')](_0x1624e6));_0x16a609(_0x1624e6);});});}exports[_0x8deb('0x13')]=function(_0xe199bf,_0x5a0d14){return function(_0x590570){try{if(!_['isNil'](this[_0x8deb('0x14')][_0x8deb('0x15')])){logger[_0x8deb('0xf')](_0x8deb('0x10'),_0xe199bf,'Agent\x20is\x20managing\x20the\x20interaction.\x20Go\x20to\x20next\x20application.');return _0x590570[_0x8deb('0x16')]();}var _0xdb62c0={'ContactId':this[_0x8deb('0x17')]['id'],'sentAt':moment()[_0x8deb('0x18')]('YYYY-MM-DD\x20HH:mm:ss'),'direction':_0x8deb('0x19')};if(this[_0x8deb('0x1a')]===_0x8deb('0x1b')||this[_0x8deb('0x1a')]==='whatsapp'){_0xdb62c0[_0x8deb('0x1c')]=this[_0x8deb('0x14')]['phone'];}var _0x19946b=this[_0x8deb('0x1a')];if(_0x19946b===_0x8deb('0x1d')){_0xdb62c0[_0x8deb('0x1e')]=this[_0x8deb('0x1f')]['id'];}else{_0xdb62c0[_[_0x8deb('0x20')](_0x19946b)+_0x8deb('0x21')]=this[_0x8deb('0x1f')]['id'];}_0xdb62c0[_[_0x8deb('0x20')](_0x19946b)+_0x8deb('0x22')]=this[_0x8deb('0x14')]['id'];if(this[_0x8deb('0x14')][_0x8deb('0x23')]){var _0x296476=_0x5a0d14[0x4];if(!_[_0x8deb('0x24')](_0x296476)){_0xdb62c0[_0x8deb('0xc')]=utils[_0x8deb('0x25')](_0x296476,this);return rpc[_0x19946b+_0x8deb('0xd')][_0x8deb('0xe')](_0xdb62c0)['then'](function(_0x32015a){logger['info'](_0x8deb('0x10'),_0xe199bf,_0xdb62c0['body']);})[_0x8deb('0x11')](function(_0x4465af){logger[_0x8deb('0x26')]('[%s][DIALOGFLOWV2]\x20%s',_0xe199bf,JSON['stringify'](_0x4465af));})[_0x8deb('0x27')](function(){logger['info']('[%s][DIALOGFLOWV2]\x20Welcome\x20Message\x20has\x20been\x20sent!',_0xe199bf);_0x590570[_0x8deb('0x28')]();});}else{logger[_0x8deb('0xf')](_0x8deb('0x29'),_0xe199bf);_0x590570[_0x8deb('0x28')]();}}else{var _0x44b6aa=this;var _0x4a86e9=_0x5a0d14[0x2][_0x8deb('0x2a')](/\\n/g,'\x0a');var _0x46f881={'credentials':{'private_key':_0x4a86e9,'client_email':_0x5a0d14[0x1]}};var _0x3734a2=new dialogflow['SessionsClient'](_0x46f881);var _0x4e5b42=_0x3734a2[_0x8deb('0x2b')](_0x5a0d14[0x0],md5(_0x44b6aa[_0x8deb('0x14')]['id']));var _0x349895={'session':_0x4e5b42,'queryInput':{'text':{'text':_0x44b6aa[_0x8deb('0x2c')]['body'],'languageCode':_0x5a0d14[0x3]||'en'}}};return _0x3734a2[_0x8deb('0x2d')](_0x349895)[_0x8deb('0x2e')](function(_0x14321e){if(_0x14321e&&_0x14321e[_0x8deb('0x2f')]){_0x44b6aa[_0x8deb('0xc')][_0x8deb('0x30')]=_0x14321e;var _0x3cc1be=_0x14321e[0x0];var _0x5380eb=_0x3cc1be['queryResult'][_0x8deb('0x31')]&&_0x3cc1be[_0x8deb('0x32')]['diagnosticInfo'][_0x8deb('0x33')]?_0x3cc1be[_0x8deb('0x32')]['diagnosticInfo'][_0x8deb('0x33')]['end_conversation'][_0x8deb('0x34')]:![];_0x44b6aa['body'][_0x8deb('0x35')]=_0x3cc1be[_0x8deb('0x32')][_0x8deb('0x36')];_0x44b6aa[_0x8deb('0xc')]['DIALOGFLOWV2_ALLREQUIREDPARAMSPRESENT']=_0x3cc1be[_0x8deb('0x32')]['allRequiredParamsPresent'];_0x44b6aa[_0x8deb('0xc')][_0x8deb('0x37')]=_0x3cc1be[_0x8deb('0x32')]['diagnosticInfo']&&_0x3cc1be[_0x8deb('0x32')][_0x8deb('0x31')][_0x8deb('0x33')]?_0x3cc1be[_0x8deb('0x32')][_0x8deb('0x31')]['fields'][_0x8deb('0x38')]['boolValue']:![];_0x44b6aa[_0x8deb('0xc')][_0x8deb('0x39')]=_0x3cc1be[_0x8deb('0x32')]['intent'][_0x8deb('0x3a')];_0x44b6aa['body'][_0x8deb('0x3b')]=_0x3cc1be['queryResult'][_0x8deb('0x3c')]['displayName'];_0x44b6aa['body'][_0x8deb('0x3d')]=_0x3cc1be[_0x8deb('0x32')][_0x8deb('0x3c')][_0x8deb('0x3e')];_0x44b6aa['body'][_0x8deb('0x3f')]=_0x3cc1be[_0x8deb('0x32')][_0x8deb('0x40')];_0x44b6aa[_0x8deb('0xc')]['DIALOGFLOWV2_QUERYTEXT']=_0x3cc1be[_0x8deb('0x32')][_0x8deb('0x41')];_0x44b6aa[_0x8deb('0xc')][_0x8deb('0x42')]=_0x3cc1be['queryResult'][_0x8deb('0x43')];_0xdb62c0[_0x8deb('0x44')]=_0x8deb('0x30');_0xdb62c0[_0x8deb('0x45')]=JSON[_0x8deb('0x12')](_0x14321e);var _0x271017=[];for(var _0x8289ec=0x0;_0x8289ec<_0x14321e[_0x8deb('0x2f')];_0x8289ec++){var _0x2dcc6b=_0x14321e[_0x8289ec];if(_0x2dcc6b&&_0x2dcc6b[_0x8deb('0x32')]&&_0x2dcc6b[_0x8deb('0x32')][_0x8deb('0x46')]){_0x271017[_0x8deb('0x47')](createMessage(_0xe199bf,_0x19946b,_0xdb62c0,_0x2dcc6b[_0x8deb('0x32')][_0x8deb('0x46')]));}}return Promise[_0x8deb('0x48')](_0x271017)[_0x8deb('0x2e')](function(){if(_0x5380eb){_0x590570[_0x8deb('0x16')]();}else{_0x590570['stop']();}})['catch'](function(_0x449a9c){logger[_0x8deb('0x26')](_0x8deb('0x10'),_0xe199bf,JSON[_0x8deb('0x12')](_0x449a9c));_0x590570[_0x8deb('0x16')]();});}})['catch'](function(_0xaecf68){logger['error']('[%s][DIALOGFLOWV2]\x20%s',_0xe199bf,_0xaecf68[_0x8deb('0x2c')],_0xaecf68[_0x8deb('0x49')]);_0x590570[_0x8deb('0x16')]();});}}catch(_0x1b0492){logger[_0x8deb('0x26')](_0x8deb('0x10'),_0xe199bf,JSON[_0x8deb('0x12')](_0x1b0492));_0x590570[_0x8deb('0x28')]();}};}; \ No newline at end of file diff --git a/server/services/routing/server/applications/gotoif.js b/server/services/routing/server/applications/gotoif.js index deeb9c9..691559a 100644 --- a/server/services/routing/server/applications/gotoif.js +++ b/server/services/routing/server/applications/gotoif.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xa1d6=['message','join','condition','priorityTrue','priorityFalse','info','[%s][GOTOIF]\x20condition\x20%s\x20is\x20%s\x20try\x20goto\x20priority\x20%s','next','findIndex','rules','[%s][GOTOIF]\x20priority\x20%s\x20found\x20at\x20index:\x20%s','[%s][GOTOIF]\x20priority\x20%s\x20not\x20found','stop','error','[%s][GOTOIF]\x20eval\x20error:\x20%s','stringify','lodash','html-to-text','./utils','../../../../config/logger','string','condition\x20is\x20a\x20string\x20and\x20it\x20is\x20required','priority\x20true\x20is\x20a\x20number','number','priority\x20false\x20is\x20a\x20number','consequence','fromString','getMustacheRender','length','[%s][GOTOIF]\x20%s','map'];(function(_0x27bf9e,_0x25055d){var _0x306a83=function(_0x43bbc6){while(--_0x43bbc6){_0x27bf9e['push'](_0x27bf9e['shift']());}};_0x306a83(++_0x25055d);}(_0xa1d6,0x146));var _0x6a1d=function(_0x1e153a,_0x3a0eb4){_0x1e153a=_0x1e153a-0x0;var _0x530bff=_0xa1d6[_0x1e153a];return _0x530bff;};'use strict';var schema=require('validate');var _=require(_0x6a1d('0x0'));var htmlToText=require(_0x6a1d('0x1'));var utils=require(_0x6a1d('0x2'));var logger=require(_0x6a1d('0x3'))('routing');var gotoif=schema({'condition':{'type':_0x6a1d('0x4'),'required':!![],'message':_0x6a1d('0x5')},'priorityTrue':{'type':'number','message':_0x6a1d('0x6')},'priorityFalse':{'type':_0x6a1d('0x7'),'message':_0x6a1d('0x8')}});exports[_0x6a1d('0x9')]=function(_0x18181d,_0x3ae43a){return function(_0x4b1b21){try{var _0x316b0b={'condition':htmlToText[_0x6a1d('0xa')](utils[_0x6a1d('0xb')](_0x3ae43a[0x0],this),{'wordwrap':![]})['replace'](/<\/?[^>]+(>|$)/g,''),'priorityTrue':_0x3ae43a[0x1],'priorityFalse':_0x3ae43a[0x2]};var _0x3a6f6e=gotoif['validate'](_0x316b0b,{'typecast':!![]});if(_0x3a6f6e[_0x6a1d('0xc')]){logger['error'](_0x6a1d('0xd'),_0x18181d,_[_0x6a1d('0xe')](_0x3a6f6e,_0x6a1d('0xf'))[_0x6a1d('0x10')](',\x20'));_0x4b1b21['stop']();}else{try{var _0x375ea4=eval('('+_0x316b0b[_0x6a1d('0x11')]+')');var _0x581091=_0x375ea4?_0x316b0b[_0x6a1d('0x12')]:_0x316b0b[_0x6a1d('0x13')];logger[_0x6a1d('0x14')](_0x6a1d('0x15'),_0x18181d,_0x316b0b[_0x6a1d('0x11')],_0x375ea4,_0x581091||_0x6a1d('0x16'));if(_0x581091){var _0x65caa0=_[_0x6a1d('0x17')](_0x4b1b21[_0x6a1d('0x18')](),{'p':_0x581091});if(_0x65caa0>=0x0){logger[_0x6a1d('0x14')](_0x6a1d('0x19'),_0x18181d,_0x581091||_0x6a1d('0x16'),_0x65caa0);_0x4b1b21['next'](_0x65caa0);}else{logger['info'](_0x6a1d('0x1a'),_0x18181d,_0x581091||_0x6a1d('0x16'));_0x4b1b21[_0x6a1d('0x1b')]();}}else{_0x4b1b21['next']();}}catch(_0x4971d2){logger[_0x6a1d('0x1c')](_0x6a1d('0x1d'),_0x18181d,_0x4971d2[_0x6a1d('0xf')]);_0x4b1b21[_0x6a1d('0x1b')]();}}}catch(_0x1c2ce1){logger[_0x6a1d('0x1c')](_0x6a1d('0xd'),_0x18181d,JSON[_0x6a1d('0x1e')](_0x1c2ce1));_0x4b1b21[_0x6a1d('0x1b')]();}};}; \ No newline at end of file +var _0xc443=['condition','priorityTrue','next','findIndex','rules','info','[%s][GOTOIF]\x20priority\x20%s\x20found\x20at\x20index:\x20%s','[%s][GOTOIF]\x20priority\x20%s\x20not\x20found','[%s][GOTOIF]\x20eval\x20error:\x20%s','stringify','validate','lodash','html-to-text','./utils','routing','string','condition\x20is\x20a\x20string\x20and\x20it\x20is\x20required','priority\x20false\x20is\x20a\x20number','consequence','fromString','getMustacheRender','replace','error','map','message','stop'];(function(_0x495c53,_0x5dd58b){var _0x20abe0=function(_0x29db0f){while(--_0x29db0f){_0x495c53['push'](_0x495c53['shift']());}};_0x20abe0(++_0x5dd58b);}(_0xc443,0x1aa));var _0x3c44=function(_0x39c2c3,_0x51cb49){_0x39c2c3=_0x39c2c3-0x0;var _0x59d9e7=_0xc443[_0x39c2c3];return _0x59d9e7;};'use strict';var schema=require(_0x3c44('0x0'));var _=require(_0x3c44('0x1'));var htmlToText=require(_0x3c44('0x2'));var utils=require(_0x3c44('0x3'));var logger=require('../../../../config/logger')(_0x3c44('0x4'));var gotoif=schema({'condition':{'type':_0x3c44('0x5'),'required':!![],'message':_0x3c44('0x6')},'priorityTrue':{'type':'number','message':'priority\x20true\x20is\x20a\x20number'},'priorityFalse':{'type':'number','message':_0x3c44('0x7')}});exports[_0x3c44('0x8')]=function(_0x5431cc,_0x145837){return function(_0x419a17){try{var _0x4dcf1b={'condition':htmlToText[_0x3c44('0x9')](utils[_0x3c44('0xa')](_0x145837[0x0],this),{'wordwrap':![]})[_0x3c44('0xb')](/<\/?[^>]+(>|$)/g,''),'priorityTrue':_0x145837[0x1],'priorityFalse':_0x145837[0x2]};var _0x7f68c6=gotoif[_0x3c44('0x0')](_0x4dcf1b,{'typecast':!![]});if(_0x7f68c6['length']){logger[_0x3c44('0xc')]('[%s][GOTOIF]\x20%s',_0x5431cc,_[_0x3c44('0xd')](_0x7f68c6,_0x3c44('0xe'))['join'](',\x20'));_0x419a17[_0x3c44('0xf')]();}else{try{var _0x194da9=eval('('+_0x4dcf1b[_0x3c44('0x10')]+')');var _0x215298=_0x194da9?_0x4dcf1b[_0x3c44('0x11')]:_0x4dcf1b['priorityFalse'];logger['info']('[%s][GOTOIF]\x20condition\x20%s\x20is\x20%s\x20try\x20goto\x20priority\x20%s',_0x5431cc,_0x4dcf1b['condition'],_0x194da9,_0x215298||_0x3c44('0x12'));if(_0x215298){var _0xedeac9=_[_0x3c44('0x13')](_0x419a17[_0x3c44('0x14')](),{'p':_0x215298});if(_0xedeac9>=0x0){logger[_0x3c44('0x15')](_0x3c44('0x16'),_0x5431cc,_0x215298||_0x3c44('0x12'),_0xedeac9);_0x419a17[_0x3c44('0x12')](_0xedeac9);}else{logger[_0x3c44('0x15')](_0x3c44('0x17'),_0x5431cc,_0x215298||_0x3c44('0x12'));_0x419a17[_0x3c44('0xf')]();}}else{_0x419a17[_0x3c44('0x12')]();}}catch(_0x54deaa){logger[_0x3c44('0xc')](_0x3c44('0x18'),_0x5431cc,_0x54deaa[_0x3c44('0xe')]);_0x419a17[_0x3c44('0xf')]();}}}catch(_0x1febb0){logger[_0x3c44('0xc')]('[%s][GOTOIF]\x20%s',_0x5431cc,JSON[_0x3c44('0x19')](_0x1febb0));_0x419a17['stop']();}};}; \ No newline at end of file diff --git a/server/services/routing/server/applications/gotop.js b/server/services/routing/server/applications/gotop.js index f7fec36..1ce0e90 100644 --- a/server/services/routing/server/applications/gotop.js +++ b/server/services/routing/server/applications/gotop.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x02ba=['error','map','message','join','stop','priority','findIndex','rules','next','info','[%s][GOTOP]\x20priority\x20%s\x20not\x20found','[%s][GOTOP]\x20%s','stringify','validate','lodash','number','consequence','length'];(function(_0x1c36b1,_0x251ea5){var _0x1aefd6=function(_0x1ea5e1){while(--_0x1ea5e1){_0x1c36b1['push'](_0x1c36b1['shift']());}};_0x1aefd6(++_0x251ea5);}(_0x02ba,0xaf));var _0xa02b=function(_0x12b586,_0x295511){_0x12b586=_0x12b586-0x0;var _0x15c15d=_0x02ba[_0x12b586];return _0x15c15d;};'use strict';var schema=require(_0xa02b('0x0'));var _=require(_0xa02b('0x1'));var logger=require('../../../../config/logger')('routing');var gotop=schema({'priority':{'type':_0xa02b('0x2'),'required':!![],'message':'priority\x20is\x20a\x20number\x20and\x20it\x20is\x20required'}});exports[_0xa02b('0x3')]=function(_0x393638,_0x3b8ae1){return function(_0x203a1d){try{var _0x3360a6={'priority':_0x3b8ae1[0x0]};var _0x218be3=gotop[_0xa02b('0x0')](_0x3360a6,{'typecast':!![]});if(_0x218be3[_0xa02b('0x4')]){logger[_0xa02b('0x5')]('[%s][GOTOP]\x20%s',_0x393638,_[_0xa02b('0x6')](_0x218be3,_0xa02b('0x7'))[_0xa02b('0x8')](',\x20'));_0x203a1d[_0xa02b('0x9')]();}else{logger['info']('[%s][GOTOP]\x20priority\x20%s',_0x393638,_0x3360a6[_0xa02b('0xa')]);if(_0x3360a6['priority']){var _0xccfe5=_[_0xa02b('0xb')](_0x203a1d[_0xa02b('0xc')](),{'p':_0x3360a6[_0xa02b('0xa')]});if(_0xccfe5>=0x0){logger['info']('[%s][GOTOP]\x20priority\x20%s\x20found\x20at\x20index:\x20%s',_0x393638,_0x3360a6['priority']||_0xa02b('0xd'),_0xccfe5);_0x203a1d[_0xa02b('0xd')](_0xccfe5);}else{logger[_0xa02b('0xe')](_0xa02b('0xf'),_0x393638,_0x3360a6['priority']||_0xa02b('0xd'));_0x203a1d[_0xa02b('0x9')]();}}else{_0x203a1d[_0xa02b('0xd')]();}}}catch(_0x5f6e48){logger['error'](_0xa02b('0x10'),_0x393638,JSON[_0xa02b('0x11')](_0x5f6e48));_0x203a1d[_0xa02b('0x9')]();}};}; \ No newline at end of file +var _0x4506=['rules','[%s][GOTOP]\x20priority\x20%s\x20found\x20at\x20index:\x20%s','next','[%s][GOTOP]\x20priority\x20%s\x20not\x20found','stringify','lodash','../../../../config/logger','routing','number','priority\x20is\x20a\x20number\x20and\x20it\x20is\x20required','consequence','validate','length','error','[%s][GOTOP]\x20%s','message','join','stop','info','[%s][GOTOP]\x20priority\x20%s','priority','findIndex'];(function(_0x367825,_0xba445e){var _0x17e0c2=function(_0x2a16cc){while(--_0x2a16cc){_0x367825['push'](_0x367825['shift']());}};_0x17e0c2(++_0xba445e);}(_0x4506,0x191));var _0x6450=function(_0x111742,_0x4c1df3){_0x111742=_0x111742-0x0;var _0x4115e6=_0x4506[_0x111742];return _0x4115e6;};'use strict';var schema=require('validate');var _=require(_0x6450('0x0'));var logger=require(_0x6450('0x1'))(_0x6450('0x2'));var gotop=schema({'priority':{'type':_0x6450('0x3'),'required':!![],'message':_0x6450('0x4')}});exports[_0x6450('0x5')]=function(_0x614f4b,_0x5bbfb1){return function(_0x9a0e13){try{var _0xd70555={'priority':_0x5bbfb1[0x0]};var _0x1fb86a=gotop[_0x6450('0x6')](_0xd70555,{'typecast':!![]});if(_0x1fb86a[_0x6450('0x7')]){logger[_0x6450('0x8')](_0x6450('0x9'),_0x614f4b,_['map'](_0x1fb86a,_0x6450('0xa'))[_0x6450('0xb')](',\x20'));_0x9a0e13[_0x6450('0xc')]();}else{logger[_0x6450('0xd')](_0x6450('0xe'),_0x614f4b,_0xd70555[_0x6450('0xf')]);if(_0xd70555['priority']){var _0x5de1c1=_[_0x6450('0x10')](_0x9a0e13[_0x6450('0x11')](),{'p':_0xd70555['priority']});if(_0x5de1c1>=0x0){logger[_0x6450('0xd')](_0x6450('0x12'),_0x614f4b,_0xd70555[_0x6450('0xf')]||_0x6450('0x13'),_0x5de1c1);_0x9a0e13[_0x6450('0x13')](_0x5de1c1);}else{logger[_0x6450('0xd')](_0x6450('0x14'),_0x614f4b,_0xd70555[_0x6450('0xf')]||_0x6450('0x13'));_0x9a0e13[_0x6450('0xc')]();}}else{_0x9a0e13[_0x6450('0x13')]();}}}catch(_0x2f14e8){logger[_0x6450('0x8')](_0x6450('0x9'),_0x614f4b,JSON[_0x6450('0x15')](_0x2f14e8));_0x9a0e13['stop']();}};}; \ No newline at end of file diff --git a/server/services/routing/server/applications/message.js b/server/services/routing/server/applications/message.js index 19827b3..9a99135 100644 --- a/server/services/routing/server/applications/message.js +++ b/server/services/routing/server/applications/message.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x8292=['body','next','catch','stringify','stop','error','lodash','../../../../config/logger','routing','../../rpc/chatMessage','../../rpc/mailMessage','../../rpc/smsMessage','../../rpc/faxMessage','consequence','getMustacheRender','contact','channel','chat','ChatWebsiteId','account','upperFirst','AccountId','InteractionId','interaction','Message','then','[%s][MESSAGE]\x20%s'];(function(_0x34f782,_0x1f825d){var _0x1d57a1=function(_0x3d8807){while(--_0x3d8807){_0x34f782['push'](_0x34f782['shift']());}};_0x1d57a1(++_0x1f825d);}(_0x8292,0x19b));var _0x2829=function(_0x4c16cf,_0x311772){_0x4c16cf=_0x4c16cf-0x0;var _0x1ac4ae=_0x8292[_0x4c16cf];return _0x1ac4ae;};'use strict';var _=require(_0x2829('0x0'));var utils=require('./utils');var logger=require(_0x2829('0x1'))(_0x2829('0x2'));var rpc={'chatMessage':require(_0x2829('0x3')),'openchannelMessage':require('../../rpc/openchannelMessage'),'mailMessage':require(_0x2829('0x4')),'smsMessage':require(_0x2829('0x5')),'faxMessage':require(_0x2829('0x6')),'whatsappMessage':require('../../rpc/whatsappMessage')};exports[_0x2829('0x7')]=function(_0x3c39eb,_0xd9cfdf){return function(_0x19472f){try{var _0x36735f={'body':utils[_0x2829('0x8')](_0xd9cfdf[0x0],this),'ContactId':this[_0x2829('0x9')]['id']};if(this[_0x2829('0xa')]===_0x2829('0xb')){_0x36735f[_0x2829('0xc')]=this[_0x2829('0xd')]['id'];}else{_0x36735f[_[_0x2829('0xe')](this['channel'])+_0x2829('0xf')]=this[_0x2829('0xd')]['id'];}_0x36735f[_[_0x2829('0xe')](this[_0x2829('0xa')])+_0x2829('0x10')]=this[_0x2829('0x11')]['id'];if(rpc[this[_0x2829('0xa')]+'Message']){return rpc[this['channel']+_0x2829('0x12')]['create'](_0x36735f)[_0x2829('0x13')](function(_0x15fa0e){logger['info'](_0x2829('0x14'),_0x3c39eb,_0x36735f[_0x2829('0x15')]);_0x19472f[_0x2829('0x16')]();})[_0x2829('0x17')](function(_0x587e9a){logger['error']('[%s][MESSAGE]\x20%s',_0x3c39eb,JSON[_0x2829('0x18')](_0x587e9a));_0x19472f[_0x2829('0x19')]();});}}catch(_0x1fd048){logger[_0x2829('0x1a')](_0x2829('0x14'),_0x3c39eb,JSON[_0x2829('0x18')](_0x1fd048));_0x19472f['stop']();}};}; \ No newline at end of file +var _0xb4c3=['../../rpc/chatMessage','../../rpc/openchannelMessage','../../rpc/mailMessage','../../rpc/smsMessage','../../rpc/faxMessage','consequence','getMustacheRender','contact','channel','chat','ChatWebsiteId','account','upperFirst','InteractionId','interaction','Message','create','then','info','next','catch','error','[%s][MESSAGE]\x20%s','stringify','stop','lodash','../../../../config/logger','routing'];(function(_0x3f5335,_0x4b967f){var _0xe13381=function(_0x4aa2d2){while(--_0x4aa2d2){_0x3f5335['push'](_0x3f5335['shift']());}};_0xe13381(++_0x4b967f);}(_0xb4c3,0x115));var _0x3b4c=function(_0x467cac,_0x509a47){_0x467cac=_0x467cac-0x0;var _0x4f5257=_0xb4c3[_0x467cac];return _0x4f5257;};'use strict';var _=require(_0x3b4c('0x0'));var utils=require('./utils');var logger=require(_0x3b4c('0x1'))(_0x3b4c('0x2'));var rpc={'chatMessage':require(_0x3b4c('0x3')),'openchannelMessage':require(_0x3b4c('0x4')),'mailMessage':require(_0x3b4c('0x5')),'smsMessage':require(_0x3b4c('0x6')),'faxMessage':require(_0x3b4c('0x7')),'whatsappMessage':require('../../rpc/whatsappMessage')};exports[_0x3b4c('0x8')]=function(_0x599dfb,_0x27922e){return function(_0x714b84){try{var _0x56cc0b={'body':utils[_0x3b4c('0x9')](_0x27922e[0x0],this),'ContactId':this[_0x3b4c('0xa')]['id']};if(this[_0x3b4c('0xb')]===_0x3b4c('0xc')){_0x56cc0b[_0x3b4c('0xd')]=this[_0x3b4c('0xe')]['id'];}else{_0x56cc0b[_[_0x3b4c('0xf')](this[_0x3b4c('0xb')])+'AccountId']=this['account']['id'];}_0x56cc0b[_[_0x3b4c('0xf')](this[_0x3b4c('0xb')])+_0x3b4c('0x10')]=this[_0x3b4c('0x11')]['id'];if(rpc[this[_0x3b4c('0xb')]+'Message']){return rpc[this[_0x3b4c('0xb')]+_0x3b4c('0x12')][_0x3b4c('0x13')](_0x56cc0b)[_0x3b4c('0x14')](function(_0x1b9c85){logger[_0x3b4c('0x15')]('[%s][MESSAGE]\x20%s',_0x599dfb,_0x56cc0b['body']);_0x714b84[_0x3b4c('0x16')]();})[_0x3b4c('0x17')](function(_0x35bbf5){logger[_0x3b4c('0x18')](_0x3b4c('0x19'),_0x599dfb,JSON[_0x3b4c('0x1a')](_0x35bbf5));_0x714b84[_0x3b4c('0x1b')]();});}}catch(_0x68fed1){logger[_0x3b4c('0x18')](_0x3b4c('0x19'),_0x599dfb,JSON[_0x3b4c('0x1a')](_0x68fed1));_0x714b84['stop']();}};}; \ No newline at end of file diff --git a/server/services/routing/server/applications/noop.js b/server/services/routing/server/applications/noop.js index 86e0ce7..0e97d49 100644 --- a/server/services/routing/server/applications/noop.js +++ b/server/services/routing/server/applications/noop.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xc0df=['[%s][NOOP]\x20%s','getMustacheRender','next','stop','./utils','routing','consequence','info'];(function(_0x155506,_0x202f81){var _0x14b973=function(_0x560bd2){while(--_0x560bd2){_0x155506['push'](_0x155506['shift']());}};_0x14b973(++_0x202f81);}(_0xc0df,0xfc));var _0xfc0d=function(_0x3bf83f,_0x181cac){_0x3bf83f=_0x3bf83f-0x0;var _0x22c4a9=_0xc0df[_0x3bf83f];return _0x22c4a9;};'use strict';var utils=require(_0xfc0d('0x0'));var logger=require('../../../../config/logger')(_0xfc0d('0x1'));exports[_0xfc0d('0x2')]=function(_0x55f765,_0x3d551d){return function(_0x3674d3){try{logger[_0xfc0d('0x3')](_0xfc0d('0x4'),_0x55f765,utils[_0xfc0d('0x5')](_0x3d551d[0x0],this));_0x3674d3[_0xfc0d('0x6')]();}catch(_0x24e264){logger['error']('[%s][NOOP]\x20%s',_0x55f765,JSON['stringify'](_0x24e264));_0x3674d3[_0xfc0d('0x7')]();}};}; \ No newline at end of file +var _0xca4b=['./utils','../../../../config/logger','routing','consequence','[%s][NOOP]\x20%s','next','error','stop'];(function(_0x3561ac,_0x33f3a2){var _0x31e552=function(_0x4fcde6){while(--_0x4fcde6){_0x3561ac['push'](_0x3561ac['shift']());}};_0x31e552(++_0x33f3a2);}(_0xca4b,0xc0));var _0xbca4=function(_0x4c81c5,_0x2b14fc){_0x4c81c5=_0x4c81c5-0x0;var _0x420cc9=_0xca4b[_0x4c81c5];return _0x420cc9;};'use strict';var utils=require(_0xbca4('0x0'));var logger=require(_0xbca4('0x1'))(_0xbca4('0x2'));exports[_0xbca4('0x3')]=function(_0x2e221f,_0x4f43b2){return function(_0x28ea4a){try{logger['info'](_0xbca4('0x4'),_0x2e221f,utils['getMustacheRender'](_0x4f43b2[0x0],this));_0x28ea4a[_0xbca4('0x5')]();}catch(_0x24b53d){logger[_0xbca4('0x6')](_0xbca4('0x4'),_0x2e221f,JSON['stringify'](_0x24b53d));_0x28ea4a[_0xbca4('0x7')]();}};}; \ No newline at end of file diff --git a/server/services/routing/server/applications/queue.js b/server/services/routing/server/applications/queue.js index d055f82..7701f85 100644 --- a/server/services/routing/server/applications/queue.js +++ b/server/services/routing/server/applications/queue.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xc629=['create\x20queue\x20report','accepted','[%s][STOP:QUEUE][NAME:%s]','update','catch','update\x20queue\x20report','timeout','[%s][END:QUEUE][NAME:%s]','toLowerCase','length','[%s][QUEUE]\x20%s','map','join','stop','find','Queues','atimeout','qtimeout','[%s][QUEUE]\x20ROUTING\x20STOPPED','rules','complete','close','next','beepall','[%s][QUEUE]\x20queue\x20not\x20found\x20%s','log','stack','validate','lodash','util','seq-queue','../../../../config/environment','../../../../config/logger','routing','./strategy','defaults','localhost','socket.io-emitter','redis','queue_id','account','queue','from','joinAt','clone','push','capitalize','InteractionId','format','%sQueuesWaitingInteractions','pick','save','remove','../../rpc/openchannelQueueReport','../../rpc/mailQueueReport','../../rpc/chatQueueReport','../../rpc/smsQueueReport','../../rpc/faxQueueReport','string','name\x20is\x20a\x20string\x20and\x20it\x20is\x20required','number','waiting','body','YYYY-MM-DD\x20HH:mm:ss','contact','list','upperFirst','channel','QueueId','interaction','MessageId','message','chat','AccountId','info','[%s][START:QUEUE][NAME:%s]','name','QueueReport','create','error'];(function(_0x1ff575,_0xdba21f){var _0x48fc9e=function(_0x51cf97){while(--_0x51cf97){_0x1ff575['push'](_0x1ff575['shift']());}};_0x48fc9e(++_0xdba21f);}(_0xc629,0xbb));var _0x9c62=function(_0x2292aa,_0x2b4b29){_0x2292aa=_0x2292aa-0x0;var _0x416d76=_0xc629[_0x2292aa];return _0x416d76;};'use strict';var schema=require(_0x9c62('0x0'));var _=require(_0x9c62('0x1'));var util=require(_0x9c62('0x2'));var seqqueue=require(_0x9c62('0x3'));var moment=require('moment');var Redis=require('ioredis');var config=require(_0x9c62('0x4'));var logger=require(_0x9c62('0x5'))(_0x9c62('0x6'));var strategy=require(_0x9c62('0x7'));config['redis']=_[_0x9c62('0x8')](config['redis'],{'host':_0x9c62('0x9'),'port':0x18eb});var io=require(_0x9c62('0xa'))(new Redis(config[_0x9c62('0xb')]));var attributes=['id',_0x9c62('0xc'),_0x9c62('0xd'),_0x9c62('0xe'),_0x9c62('0xf'),_0x9c62('0x10')];function emit(_0x57b20a,_0xd3314b,_0x305973){io['to'](_0x57b20a)['emit'](_0xd3314b,_0x305973);}function emitChannelQueueInteraction(_0x642811,_0x4d937f,_0x447348,_0x33c9c4,_0x5d0c9b,_0x46d831,_0x487cf6,_0x38135e){var _0x99a2da=_[_0x9c62('0x11')](_0x447348);_0x99a2da[_0x9c62('0xc')]=_0x38135e;_0x99a2da[_0x9c62('0xe')]=_0x4d937f;_0x99a2da[_0x9c62('0xd')]=_0x33c9c4;_0x99a2da['id']=_0x5d0c9b;if(_0x46d831){attributes[_0x9c62('0x12')](_[_0x9c62('0x13')](_0x642811)+_0x9c62('0x14'));_0x487cf6[util[_0x9c62('0x15')](_0x9c62('0x16'),_0x642811)][_0x5d0c9b]=_[_0x9c62('0x17')](_0x99a2da,attributes);}else{delete _0x487cf6[util[_0x9c62('0x15')]('%sQueuesWaitingInteractions',_0x642811)][_0x5d0c9b];}emit(util[_0x9c62('0x15')]('%s:queue:%s',_0x642811,_0x4d937f),util['format']('%s_queue_waiting_interaction:%s',_0x642811,_0x46d831?_0x9c62('0x18'):_0x9c62('0x19')),_[_0x9c62('0x17')](_0x99a2da,attributes));}var rpc={'openchannelQueueReport':require(_0x9c62('0x1a')),'mailQueueReport':require(_0x9c62('0x1b')),'chatQueueReport':require(_0x9c62('0x1c')),'smsQueueReport':require(_0x9c62('0x1d')),'faxQueueReport':require(_0x9c62('0x1e')),'whatsappQueueReport':require('../../rpc/whatsappQueueReport')};var queue=schema({'name':{'type':_0x9c62('0x1f'),'required':!![],'message':_0x9c62('0x20')},'timeout':{'type':_0x9c62('0x21'),'message':'timeout\x20is\x20a\x20number'}});function startRouting(_0x27ff67,_0x17c76f,_0x3ab700,_0x3ce8da){if(_0x27ff67&&_0x17c76f&&_0x3ab700){_0x17c76f[_0x9c62('0x22')]+=0x1;var _0x225f78={'uniqueid':_0x27ff67,'from':_0x3ab700[_0x9c62('0x23')]?_0x3ab700[_0x9c62('0x23')][_0x9c62('0xf')]:'','joinAt':moment()[_0x9c62('0x15')](_0x9c62('0x24')),'ContactId':_0x3ab700['contact']?_0x3ab700[_0x9c62('0x25')]['id']:null,'ListId':_0x3ab700['list']?_0x3ab700[_0x9c62('0x26')]['id']:null};_0x225f78[_[_0x9c62('0x27')](_0x3ab700[_0x9c62('0x28')])+_0x9c62('0x29')]=_0x17c76f['id']||null;_0x225f78[_[_0x9c62('0x27')](_0x3ab700['channel'])+'InteractionId']=_0x3ab700[_0x9c62('0x2a')]?_0x3ab700[_0x9c62('0x2a')]['id']:null;_0x225f78[_[_0x9c62('0x27')](_0x3ab700[_0x9c62('0x28')])+_0x9c62('0x2b')]=_0x3ab700[_0x9c62('0x2c')]?_0x3ab700[_0x9c62('0x2c')]['id']:null;_0x225f78[_[_0x9c62('0x27')](_0x3ab700['channel'])+(_0x3ab700[_0x9c62('0x28')]!==_0x9c62('0x2d')?_0x9c62('0x2e'):'WebsiteId')]=_0x3ab700[_0x9c62('0xd')]?_0x3ab700['account']['id']:null;logger[_0x9c62('0x2f')](util[_0x9c62('0x15')](_0x9c62('0x30'),_0x27ff67,_0x17c76f['name']));emitChannelQueueInteraction(_0x3ab700[_0x9c62('0x28')],_0x17c76f[_0x9c62('0x31')],_0x225f78,_0x3ab700['account']['name'],_0x3ab700['message']['id'],!![],_0x3ce8da,_0x17c76f['id']);if(rpc[_0x3ab700['channel']+'QueueReport']){return rpc[_0x3ab700[_0x9c62('0x28')]+_0x9c62('0x32')][_0x9c62('0x33')](_0x225f78)['catch'](function(_0x3e0dc2){logger[_0x9c62('0x34')](_0x9c62('0x35'));});}}}function stopRouting(_0x28cc7e,_0xd85cbc,_0x29fc0c,_0x24e934){if(_0x28cc7e&&_0xd85cbc){_0xd85cbc[_0x9c62('0x22')]-=0x1;var _0x4bac84={'leaveAt':moment()['format'](_0x9c62('0x24')),'acceptAt':moment()[_0x9c62('0x15')](_0x9c62('0x24')),'reason':_0x9c62('0x36')};logger[_0x9c62('0x2f')](util[_0x9c62('0x15')](_0x9c62('0x37'),_0x28cc7e,_0xd85cbc['name']));emitChannelQueueInteraction(_0x29fc0c['channel'],_0xd85cbc[_0x9c62('0x31')],_0x29fc0c[_0x9c62('0x23')],_0x29fc0c[_0x9c62('0xd')][_0x9c62('0x31')],_0x29fc0c[_0x9c62('0x2c')]['id'],![],_0x24e934,_0xd85cbc['id']);if(rpc[_0x29fc0c[_0x9c62('0x28')]+_0x9c62('0x32')]){return rpc[_0x29fc0c['channel']+'QueueReport'][_0x9c62('0x38')](_0x28cc7e,_0x4bac84)[_0x9c62('0x39')](function(_0x7f30fc){logger[_0x9c62('0x34')](_0x9c62('0x3a'));});}}}function endRouting(_0x4d6aa2,_0x646b5b,_0x19cb8e,_0x276383){if(_0x4d6aa2&&_0x646b5b){_0x646b5b[_0x9c62('0x22')]-=0x1;var _0x57625a={'leaveAt':moment()[_0x9c62('0x15')](_0x9c62('0x24')),'exitAt':moment()[_0x9c62('0x15')](_0x9c62('0x24')),'reason':_0x9c62('0x3b')};logger['info'](util[_0x9c62('0x15')](_0x9c62('0x3c'),_0x4d6aa2,_0x646b5b[_0x9c62('0x31')]));emitChannelQueueInteraction(_0x19cb8e[_0x9c62('0x28')],_0x646b5b[_0x9c62('0x31')],_0x19cb8e[_0x9c62('0x23')],_0x19cb8e[_0x9c62('0xd')][_0x9c62('0x31')],_0x19cb8e['message']['id'],![],_0x276383);if(rpc[_0x19cb8e[_0x9c62('0x28')]+'QueueReport']){return rpc[_0x19cb8e['channel']+'QueueReport'][_0x9c62('0x38')](_0x4d6aa2,_0x57625a)[_0x9c62('0x39')](function(_0x3b1b6b){logger[_0x9c62('0x34')](_0x9c62('0x3a'));});}}}function handleFindQueue(_0x1c9993){return function(_0x1ee04a){return _0x1ee04a[_0x9c62('0x31')][_0x9c62('0x3d')]()===_0x1c9993[_0x9c62('0x3d')]();};}exports['consequence']=function(_0x1d37c2,_0x408385,_0x43713e,_0x52b1b1){return function(_0x5ec6e4){try{var _0x8c807b={'name':_0x408385[0x0],'timeout':_0x408385[0x1]};var _0x29cf3c=queue['validate'](_0x8c807b,{'typecast':!![]});if(_0x29cf3c[_0x9c62('0x3e')]){logger[_0x9c62('0x34')](_0x9c62('0x3f'),_0x1d37c2,_[_0x9c62('0x40')](_0x29cf3c,_0x9c62('0x2c'))[_0x9c62('0x41')](',\x20'));_0x5ec6e4[_0x9c62('0x42')]();}else{var _0x328071=_[_0x9c62('0x43')](_0x43713e[_0x52b1b1[_0x9c62('0x28')]+_0x9c62('0x44')],handleFindQueue(_0x8c807b[_0x9c62('0x31')]));if(_0x328071){startRouting(_0x1d37c2,_0x328071,_0x52b1b1,_0x43713e);var _0x27b6ef=(_0x328071[_0x9c62('0x3b')]||0xa)*0x3e8;var _0x24afd0=(_0x8c807b[_0x9c62('0x3b')]||0x14)*0x3e8;var _0x3c1ee3;if(_0x27b6ef>_0x24afd0){_0x24afd0=_0x27b6ef;}var _0x5d4335=seqqueue['createQueue'](_0x27b6ef);_0x5d4335['id']=_0x1d37c2;_0x5d4335[_0x9c62('0x45')]=_0x27b6ef;_0x5d4335[_0x9c62('0x46')]=_0x24afd0;_0x5d4335[_0x9c62('0x28')]=_0x52b1b1[_0x9c62('0x28')];_0x43713e['rules'][_0x1d37c2]['on']('end',function(){logger[_0x9c62('0x2f')](_0x9c62('0x47'),_0x1d37c2);stopRouting(_0x1d37c2,_0x328071,_0x52b1b1,_0x43713e);clearTimeout(_0x3c1ee3);_0x3c1ee3=undefined;_0x5d4335['close'](!![]);if(_0x43713e[_0x9c62('0x48')][_0x1d37c2]){delete _0x43713e[_0x9c62('0x48')][_0x1d37c2];}_0x5ec6e4[_0x9c62('0x42')]();});_0x43713e[_0x9c62('0x48')][_0x1d37c2]['on'](_0x9c62('0x49'),function(){if(_0x43713e['rules'][_0x1d37c2]){delete _0x43713e[_0x9c62('0x48')][_0x1d37c2];}});_0x3c1ee3=setTimeout(function(){logger[_0x9c62('0x2f')]('[%s][QUEUE]\x20APPLICATION\x20END',_0x1d37c2);endRouting(_0x1d37c2,_0x328071,_0x52b1b1,_0x43713e);clearTimeout(_0x3c1ee3);_0x5d4335[_0x9c62('0x4a')](!![]);_0x5ec6e4[_0x9c62('0x4b')]();},_0x24afd0);switch(_0x328071['strategy']){case'rrmemory':strategy['rrmemory'](_0x5d4335,_0x328071,_0x43713e,_0x52b1b1);break;default:strategy[_0x9c62('0x4c')](_0x5d4335,_0x328071,_0x43713e,_0x52b1b1);}}else{logger[_0x9c62('0x34')](_0x9c62('0x4d'),_0x1d37c2,_0x8c807b[_0x9c62('0x31')]);_0x5ec6e4[_0x9c62('0x42')]();}}}catch(_0x5c848b){console[_0x9c62('0x4e')](_0x5c848b);logger[_0x9c62('0x34')](_0x9c62('0x3f'),_0x1d37c2,_0x5c848b[_0x9c62('0x4f')]);_0x5ec6e4[_0x9c62('0x42')]();}};}; \ No newline at end of file +var _0x336e=['complete','[%s][QUEUE]\x20APPLICATION\x20END','rrmemory','beepall','[%s][QUEUE]\x20queue\x20not\x20found\x20%s','log','[%s][QUEUE]\x20%s','stack','validate','moment','ioredis','../../../../config/logger','routing','./strategy','redis','localhost','socket.io-emitter','queue_id','account','queue','joinAt','clone','push','capitalize','InteractionId','format','%sQueuesWaitingInteractions','pick','%s_queue_waiting_interaction:%s','save','../../rpc/openchannelQueueReport','../../rpc/mailQueueReport','../../rpc/chatQueueReport','../../rpc/smsQueueReport','../../rpc/faxQueueReport','../../rpc/whatsappQueueReport','string','name\x20is\x20a\x20string\x20and\x20it\x20is\x20required','waiting','body','from','contact','list','channel','QueueId','upperFirst','interaction','MessageId','message','chat','AccountId','info','[%s][START:QUEUE][NAME:%s]','name','QueueReport','create','catch','error','create\x20queue\x20report','YYYY-MM-DD\x20HH:mm:ss','accepted','[%s][STOP:QUEUE][NAME:%s]','update','[%s][END:QUEUE][NAME:%s]','update\x20queue\x20report','toLowerCase','consequence','map','join','stop','find','Queues','createQueue','atimeout','qtimeout','rules','end','[%s][QUEUE]\x20ROUTING\x20STOPPED','close'];(function(_0x4206f5,_0x21f338){var _0xa29cf3=function(_0x2d35d7){while(--_0x2d35d7){_0x4206f5['push'](_0x4206f5['shift']());}};_0xa29cf3(++_0x21f338);}(_0x336e,0xf5));var _0xe336=function(_0x45b034,_0x3a57dd){_0x45b034=_0x45b034-0x0;var _0x509cb0=_0x336e[_0x45b034];return _0x509cb0;};'use strict';var schema=require(_0xe336('0x0'));var _=require('lodash');var util=require('util');var seqqueue=require('seq-queue');var moment=require(_0xe336('0x1'));var Redis=require(_0xe336('0x2'));var config=require('../../../../config/environment');var logger=require(_0xe336('0x3'))(_0xe336('0x4'));var strategy=require(_0xe336('0x5'));config['redis']=_['defaults'](config[_0xe336('0x6')],{'host':_0xe336('0x7'),'port':0x18eb});var io=require(_0xe336('0x8'))(new Redis(config[_0xe336('0x6')]));var attributes=['id',_0xe336('0x9'),_0xe336('0xa'),_0xe336('0xb'),'from',_0xe336('0xc')];function emit(_0x537f96,_0x4bd0e9,_0x3a803f){io['to'](_0x537f96)['emit'](_0x4bd0e9,_0x3a803f);}function emitChannelQueueInteraction(_0x2b930f,_0x4af997,_0x23fe4e,_0x1a477f,_0x5b522a,_0x1eb3bc,_0x4734e3,_0x37115b){var _0x37b53c=_[_0xe336('0xd')](_0x23fe4e);_0x37b53c[_0xe336('0x9')]=_0x37115b;_0x37b53c[_0xe336('0xb')]=_0x4af997;_0x37b53c[_0xe336('0xa')]=_0x1a477f;_0x37b53c['id']=_0x5b522a;if(_0x1eb3bc){attributes[_0xe336('0xe')](_[_0xe336('0xf')](_0x2b930f)+_0xe336('0x10'));_0x4734e3[util[_0xe336('0x11')](_0xe336('0x12'),_0x2b930f)][_0x5b522a]=_[_0xe336('0x13')](_0x37b53c,attributes);}else{delete _0x4734e3[util[_0xe336('0x11')](_0xe336('0x12'),_0x2b930f)][_0x5b522a];}emit(util[_0xe336('0x11')]('%s:queue:%s',_0x2b930f,_0x4af997),util[_0xe336('0x11')](_0xe336('0x14'),_0x2b930f,_0x1eb3bc?_0xe336('0x15'):'remove'),_[_0xe336('0x13')](_0x37b53c,attributes));}var rpc={'openchannelQueueReport':require(_0xe336('0x16')),'mailQueueReport':require(_0xe336('0x17')),'chatQueueReport':require(_0xe336('0x18')),'smsQueueReport':require(_0xe336('0x19')),'faxQueueReport':require(_0xe336('0x1a')),'whatsappQueueReport':require(_0xe336('0x1b'))};var queue=schema({'name':{'type':_0xe336('0x1c'),'required':!![],'message':_0xe336('0x1d')},'timeout':{'type':'number','message':'timeout\x20is\x20a\x20number'}});function startRouting(_0xa8bd84,_0x499f2d,_0x57a2a9,_0x1a7992){if(_0xa8bd84&&_0x499f2d&&_0x57a2a9){_0x499f2d[_0xe336('0x1e')]+=0x1;var _0xe6ca08={'uniqueid':_0xa8bd84,'from':_0x57a2a9[_0xe336('0x1f')]?_0x57a2a9[_0xe336('0x1f')][_0xe336('0x20')]:'','joinAt':moment()[_0xe336('0x11')]('YYYY-MM-DD\x20HH:mm:ss'),'ContactId':_0x57a2a9[_0xe336('0x21')]?_0x57a2a9[_0xe336('0x21')]['id']:null,'ListId':_0x57a2a9[_0xe336('0x22')]?_0x57a2a9[_0xe336('0x22')]['id']:null};_0xe6ca08[_['upperFirst'](_0x57a2a9[_0xe336('0x23')])+_0xe336('0x24')]=_0x499f2d['id']||null;_0xe6ca08[_[_0xe336('0x25')](_0x57a2a9['channel'])+_0xe336('0x10')]=_0x57a2a9[_0xe336('0x26')]?_0x57a2a9[_0xe336('0x26')]['id']:null;_0xe6ca08[_[_0xe336('0x25')](_0x57a2a9[_0xe336('0x23')])+_0xe336('0x27')]=_0x57a2a9[_0xe336('0x28')]?_0x57a2a9[_0xe336('0x28')]['id']:null;_0xe6ca08[_[_0xe336('0x25')](_0x57a2a9[_0xe336('0x23')])+(_0x57a2a9['channel']!==_0xe336('0x29')?_0xe336('0x2a'):'WebsiteId')]=_0x57a2a9[_0xe336('0xa')]?_0x57a2a9[_0xe336('0xa')]['id']:null;logger[_0xe336('0x2b')](util[_0xe336('0x11')](_0xe336('0x2c'),_0xa8bd84,_0x499f2d[_0xe336('0x2d')]));emitChannelQueueInteraction(_0x57a2a9[_0xe336('0x23')],_0x499f2d[_0xe336('0x2d')],_0xe6ca08,_0x57a2a9[_0xe336('0xa')][_0xe336('0x2d')],_0x57a2a9[_0xe336('0x28')]['id'],!![],_0x1a7992,_0x499f2d['id']);if(rpc[_0x57a2a9[_0xe336('0x23')]+_0xe336('0x2e')]){return rpc[_0x57a2a9[_0xe336('0x23')]+_0xe336('0x2e')][_0xe336('0x2f')](_0xe6ca08)[_0xe336('0x30')](function(_0xd650da){logger[_0xe336('0x31')](_0xe336('0x32'));});}}}function stopRouting(_0x4b143b,_0x1acc22,_0x52fd08,_0xad8701){if(_0x4b143b&&_0x1acc22){_0x1acc22[_0xe336('0x1e')]-=0x1;var _0x3d5862={'leaveAt':moment()[_0xe336('0x11')]('YYYY-MM-DD\x20HH:mm:ss'),'acceptAt':moment()[_0xe336('0x11')](_0xe336('0x33')),'reason':_0xe336('0x34')};logger[_0xe336('0x2b')](util[_0xe336('0x11')](_0xe336('0x35'),_0x4b143b,_0x1acc22['name']));emitChannelQueueInteraction(_0x52fd08[_0xe336('0x23')],_0x1acc22[_0xe336('0x2d')],_0x52fd08[_0xe336('0x1f')],_0x52fd08[_0xe336('0xa')][_0xe336('0x2d')],_0x52fd08[_0xe336('0x28')]['id'],![],_0xad8701,_0x1acc22['id']);if(rpc[_0x52fd08[_0xe336('0x23')]+'QueueReport']){return rpc[_0x52fd08['channel']+_0xe336('0x2e')][_0xe336('0x36')](_0x4b143b,_0x3d5862)['catch'](function(_0x2cb176){logger[_0xe336('0x31')]('update\x20queue\x20report');});}}}function endRouting(_0x1fcc02,_0x1b0ff4,_0x5894ae,_0x4f26e2){if(_0x1fcc02&&_0x1b0ff4){_0x1b0ff4['waiting']-=0x1;var _0x33168d={'leaveAt':moment()[_0xe336('0x11')](_0xe336('0x33')),'exitAt':moment()['format']('YYYY-MM-DD\x20HH:mm:ss'),'reason':'timeout'};logger[_0xe336('0x2b')](util[_0xe336('0x11')](_0xe336('0x37'),_0x1fcc02,_0x1b0ff4[_0xe336('0x2d')]));emitChannelQueueInteraction(_0x5894ae[_0xe336('0x23')],_0x1b0ff4[_0xe336('0x2d')],_0x5894ae[_0xe336('0x1f')],_0x5894ae['account'][_0xe336('0x2d')],_0x5894ae[_0xe336('0x28')]['id'],![],_0x4f26e2);if(rpc[_0x5894ae[_0xe336('0x23')]+'QueueReport']){return rpc[_0x5894ae[_0xe336('0x23')]+'QueueReport']['update'](_0x1fcc02,_0x33168d)[_0xe336('0x30')](function(_0x393f22){logger['error'](_0xe336('0x38'));});}}}function handleFindQueue(_0x4467ae){return function(_0x11be62){return _0x11be62[_0xe336('0x2d')][_0xe336('0x39')]()===_0x4467ae[_0xe336('0x39')]();};}exports[_0xe336('0x3a')]=function(_0x3a1ec0,_0x535205,_0x1ed8b5,_0x2ec02b){return function(_0x2892d8){try{var _0x527e10={'name':_0x535205[0x0],'timeout':_0x535205[0x1]};var _0x474946=queue[_0xe336('0x0')](_0x527e10,{'typecast':!![]});if(_0x474946['length']){logger[_0xe336('0x31')]('[%s][QUEUE]\x20%s',_0x3a1ec0,_[_0xe336('0x3b')](_0x474946,_0xe336('0x28'))[_0xe336('0x3c')](',\x20'));_0x2892d8[_0xe336('0x3d')]();}else{var _0x36fa6c=_[_0xe336('0x3e')](_0x1ed8b5[_0x2ec02b['channel']+_0xe336('0x3f')],handleFindQueue(_0x527e10[_0xe336('0x2d')]));if(_0x36fa6c){startRouting(_0x3a1ec0,_0x36fa6c,_0x2ec02b,_0x1ed8b5);var _0x30e9a0=(_0x36fa6c['timeout']||0xa)*0x3e8;var _0x31a357=(_0x527e10['timeout']||0x14)*0x3e8;var _0x13699d;if(_0x30e9a0>_0x31a357){_0x31a357=_0x30e9a0;}var _0x498d53=seqqueue[_0xe336('0x40')](_0x30e9a0);_0x498d53['id']=_0x3a1ec0;_0x498d53[_0xe336('0x41')]=_0x30e9a0;_0x498d53[_0xe336('0x42')]=_0x31a357;_0x498d53[_0xe336('0x23')]=_0x2ec02b[_0xe336('0x23')];_0x1ed8b5[_0xe336('0x43')][_0x3a1ec0]['on'](_0xe336('0x44'),function(){logger[_0xe336('0x2b')](_0xe336('0x45'),_0x3a1ec0);stopRouting(_0x3a1ec0,_0x36fa6c,_0x2ec02b,_0x1ed8b5);clearTimeout(_0x13699d);_0x13699d=undefined;_0x498d53[_0xe336('0x46')](!![]);if(_0x1ed8b5[_0xe336('0x43')][_0x3a1ec0]){delete _0x1ed8b5[_0xe336('0x43')][_0x3a1ec0];}_0x2892d8[_0xe336('0x3d')]();});_0x1ed8b5[_0xe336('0x43')][_0x3a1ec0]['on'](_0xe336('0x47'),function(){if(_0x1ed8b5['rules'][_0x3a1ec0]){delete _0x1ed8b5[_0xe336('0x43')][_0x3a1ec0];}});_0x13699d=setTimeout(function(){logger[_0xe336('0x2b')](_0xe336('0x48'),_0x3a1ec0);endRouting(_0x3a1ec0,_0x36fa6c,_0x2ec02b,_0x1ed8b5);clearTimeout(_0x13699d);_0x498d53[_0xe336('0x46')](!![]);_0x2892d8['next']();},_0x31a357);switch(_0x36fa6c['strategy']){case _0xe336('0x49'):strategy['rrmemory'](_0x498d53,_0x36fa6c,_0x1ed8b5,_0x2ec02b);break;default:strategy[_0xe336('0x4a')](_0x498d53,_0x36fa6c,_0x1ed8b5,_0x2ec02b);}}else{logger['error'](_0xe336('0x4b'),_0x3a1ec0,_0x527e10['name']);_0x2892d8['stop']();}}}catch(_0x2634d0){console[_0xe336('0x4c')](_0x2634d0);logger['error'](_0xe336('0x4d'),_0x3a1ec0,_0x2634d0[_0xe336('0x4e')]);_0x2892d8[_0xe336('0x3d')]();}};}; \ No newline at end of file diff --git a/server/services/routing/server/applications/strategy/agent.js b/server/services/routing/server/applications/strategy/agent.js index f3aa5a6..d39c3be 100644 --- a/server/services/routing/server/applications/strategy/agent.js +++ b/server/services/routing/server/applications/strategy/agent.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x1cc7=['forcedOwnership','channel','busy','busyQueue','saveWaitingNotification','showNotification','notificationId','writeLog',':FORCED','[%s][AGENT]\x20agent\x20%s\x20is\x20not\x20available','[%s][AGENT]\x20agent\x20skipped,\x20unknown\x20id\x20%s','[%s][AGENT]\x20timeout\x20with\x20%s','hideNotification','STOP','TIMEOUT','exports','lodash','uuid','./util','realtime','squeue','push','handleRun','bind','handleTimeout','timeout','prototype','handleDrained','debug','agent','isNil','agents','routing'];(function(_0x333678,_0x5f1de0){var _0x33218e=function(_0x56914e){while(--_0x56914e){_0x333678['push'](_0x333678['shift']());}};_0x33218e(++_0x5f1de0);}(_0x1cc7,0x15a));var _0x71cc=function(_0x15c160,_0x1aa4d3){_0x15c160=_0x15c160-0x0;var _0x1a7be7=_0x1cc7[_0x15c160];return _0x1a7be7;};'use strict';var _=require(_0x71cc('0x0'));var uuid=require(_0x71cc('0x1'));var util=require(_0x71cc('0x2'));var logger=require('../../../../../config/logger')('routing');var Agent=function(_0x547fe6,_0xe5d54e,_0x1fac93,_0x402191){this['notificationId']=uuid['v4']();this['squeue']=_0x547fe6;this['agent']=_0xe5d54e;this[_0x71cc('0x3')]=_0x1fac93;this['routing']=_0x402191;this[_0x71cc('0x4')][_0x71cc('0x5')](this[_0x71cc('0x6')][_0x71cc('0x7')](this),this[_0x71cc('0x8')]['bind'](this));this[_0x71cc('0x4')]['on'](_0x71cc('0x9'),this[_0x71cc('0x8')]['bind'](this));this['squeue']['on']('drained',this['handleDrained'][_0x71cc('0x7')](this));};Agent[_0x71cc('0xa')][_0x71cc('0x5')]=function(){this['squeue'][_0x71cc('0x5')](this['handleRun'][_0x71cc('0x7')](this),this['handleTimeout'][_0x71cc('0x7')](this));};Agent['prototype'][_0x71cc('0xb')]=function(){this[_0x71cc('0x8')](!![]);};Agent[_0x71cc('0xa')][_0x71cc('0x6')]=function(){logger[_0x71cc('0xc')]('[%s][AGENT]\x20try\x20with\x20%s',this[_0x71cc('0x4')]['id'],this[_0x71cc('0xd')]['id']);if(_[_0x71cc('0xe')](this[_0x71cc('0x3')][_0x71cc('0xf')][this[_0x71cc('0xd')]['id']])){logger[_0x71cc('0xc')]('[%s][AGENT]\x20agent\x20skipped,\x20unknown\x20id\x20%s',this[_0x71cc('0x4')]['id'],this[_0x71cc('0xd')]['id']);setTimeout(this[_0x71cc('0x5')][_0x71cc('0x7')](this),0x3e8);}else{if(this[_0x71cc('0x10')][_0x71cc('0x11')]||util['isAgentAvailable'](this[_0x71cc('0x4')]['id'],this[_0x71cc('0x3')]['agents'][this['agent']['id']],this[_0x71cc('0x4')][_0x71cc('0x12')],![])){this[_0x71cc('0x3')][_0x71cc('0xf')][this[_0x71cc('0xd')]['id']][_0x71cc('0x13')]=!![];this[_0x71cc('0x3')][_0x71cc('0xf')][this['agent']['id']][_0x71cc('0x14')]=undefined;util[_0x71cc('0x15')](this['realtime'],this[_0x71cc('0x10')],this[_0x71cc('0xd')],this[_0x71cc('0x4')][_0x71cc('0x12')]);util[_0x71cc('0x16')](this[_0x71cc('0x17')],this['squeue']['id'],this[_0x71cc('0x3')][_0x71cc('0xf')][this[_0x71cc('0xd')]['id']],null,this[_0x71cc('0x10')]);util[_0x71cc('0x18')](this[_0x71cc('0x4')]['id'],this[_0x71cc('0x3')][_0x71cc('0xf')][this[_0x71cc('0xd')]['id']],'RINGING'+(this[_0x71cc('0x10')][_0x71cc('0x11')]?_0x71cc('0x19'):''));}else{logger[_0x71cc('0xc')](_0x71cc('0x1a'),this[_0x71cc('0x4')]['id'],this[_0x71cc('0xd')]['id']);setTimeout(this[_0x71cc('0x5')][_0x71cc('0x7')](this),0x3e8);}}};Agent[_0x71cc('0xa')][_0x71cc('0x8')]=function(_0x35f723){if(_[_0x71cc('0xe')](this[_0x71cc('0x3')][_0x71cc('0xf')][this[_0x71cc('0xd')]['id']])){return logger['debug'](_0x71cc('0x1b'),this[_0x71cc('0x4')]['id'],this[_0x71cc('0xd')]['id']);}else{logger[_0x71cc('0xc')](_0x71cc('0x1c'),this[_0x71cc('0x4')]['id'],this['agent']['id']);util[_0x71cc('0x1d')](this[_0x71cc('0x17')],this[_0x71cc('0x4')]['id'],this[_0x71cc('0x3')][_0x71cc('0xf')][this[_0x71cc('0xd')]['id']],null,this[_0x71cc('0x10')]);this['realtime'][_0x71cc('0xf')][this['agent']['id']]['busy']=![];this[_0x71cc('0x3')]['agents'][this['agent']['id']][_0x71cc('0x14')]=undefined;util['removeWaitingNotification'](this[_0x71cc('0x3')],this['routing'],this[_0x71cc('0xd')],this[_0x71cc('0x4')]['channel']);util[_0x71cc('0x18')](this[_0x71cc('0x4')]['id'],this[_0x71cc('0x3')][_0x71cc('0xf')][this[_0x71cc('0xd')]['id']],_0x35f723?_0x71cc('0x1e'):_0x71cc('0x1f'));}if(!_0x35f723){setTimeout(this[_0x71cc('0x5')][_0x71cc('0x7')](this),0x3e8);}};function agent(_0x2f8a72,_0x4b7bc6,_0x4330f0,_0x54d16a){return new Agent(_0x2f8a72,_0x4b7bc6,_0x4330f0,_0x54d16a);}module[_0x71cc('0x20')]=agent; \ No newline at end of file +var _0x0e85=['lodash','uuid','../../../../../config/logger','routing','squeue','agent','realtime','push','handleRun','bind','handleTimeout','drained','handleDrained','prototype','debug','[%s][AGENT]\x20try\x20with\x20%s','agents','[%s][AGENT]\x20agent\x20skipped,\x20unknown\x20id\x20%s','forcedOwnership','isAgentAvailable','busy','busyQueue','channel','writeLog',':FORCED','isNil','hideNotification','notificationId','removeWaitingNotification','STOP','TIMEOUT'];(function(_0x41dcc,_0x1c08e0){var _0x5ea0b5=function(_0x12ead5){while(--_0x12ead5){_0x41dcc['push'](_0x41dcc['shift']());}};_0x5ea0b5(++_0x1c08e0);}(_0x0e85,0x7c));var _0x50e8=function(_0x1477ef,_0x54a5d6){_0x1477ef=_0x1477ef-0x0;var _0x164acd=_0x0e85[_0x1477ef];return _0x164acd;};'use strict';var _=require(_0x50e8('0x0'));var uuid=require(_0x50e8('0x1'));var util=require('./util');var logger=require(_0x50e8('0x2'))(_0x50e8('0x3'));var Agent=function(_0x55e515,_0x55cba3,_0x4ce6cd,_0x236cf3){this['notificationId']=uuid['v4']();this[_0x50e8('0x4')]=_0x55e515;this[_0x50e8('0x5')]=_0x55cba3;this[_0x50e8('0x6')]=_0x4ce6cd;this[_0x50e8('0x3')]=_0x236cf3;this['squeue'][_0x50e8('0x7')](this[_0x50e8('0x8')][_0x50e8('0x9')](this),this[_0x50e8('0xa')][_0x50e8('0x9')](this));this[_0x50e8('0x4')]['on']('timeout',this[_0x50e8('0xa')][_0x50e8('0x9')](this));this[_0x50e8('0x4')]['on'](_0x50e8('0xb'),this[_0x50e8('0xc')][_0x50e8('0x9')](this));};Agent[_0x50e8('0xd')][_0x50e8('0x7')]=function(){this['squeue']['push'](this[_0x50e8('0x8')][_0x50e8('0x9')](this),this['handleTimeout']['bind'](this));};Agent[_0x50e8('0xd')][_0x50e8('0xc')]=function(){this[_0x50e8('0xa')](!![]);};Agent[_0x50e8('0xd')]['handleRun']=function(){logger[_0x50e8('0xe')](_0x50e8('0xf'),this[_0x50e8('0x4')]['id'],this['agent']['id']);if(_['isNil'](this[_0x50e8('0x6')][_0x50e8('0x10')][this[_0x50e8('0x5')]['id']])){logger[_0x50e8('0xe')](_0x50e8('0x11'),this[_0x50e8('0x4')]['id'],this['agent']['id']);setTimeout(this['push'][_0x50e8('0x9')](this),0x3e8);}else{if(this[_0x50e8('0x3')][_0x50e8('0x12')]||util[_0x50e8('0x13')](this[_0x50e8('0x4')]['id'],this[_0x50e8('0x6')][_0x50e8('0x10')][this['agent']['id']],this[_0x50e8('0x4')]['channel'],![])){this[_0x50e8('0x6')][_0x50e8('0x10')][this[_0x50e8('0x5')]['id']][_0x50e8('0x14')]=!![];this[_0x50e8('0x6')]['agents'][this[_0x50e8('0x5')]['id']][_0x50e8('0x15')]=undefined;util['saveWaitingNotification'](this[_0x50e8('0x6')],this[_0x50e8('0x3')],this['agent'],this[_0x50e8('0x4')][_0x50e8('0x16')]);util['showNotification'](this['notificationId'],this['squeue']['id'],this[_0x50e8('0x6')][_0x50e8('0x10')][this[_0x50e8('0x5')]['id']],null,this[_0x50e8('0x3')]);util[_0x50e8('0x17')](this[_0x50e8('0x4')]['id'],this['realtime'][_0x50e8('0x10')][this[_0x50e8('0x5')]['id']],'RINGING'+(this[_0x50e8('0x3')][_0x50e8('0x12')]?_0x50e8('0x18'):''));}else{logger[_0x50e8('0xe')]('[%s][AGENT]\x20agent\x20%s\x20is\x20not\x20available',this[_0x50e8('0x4')]['id'],this['agent']['id']);setTimeout(this[_0x50e8('0x7')][_0x50e8('0x9')](this),0x3e8);}}};Agent[_0x50e8('0xd')]['handleTimeout']=function(_0x1041b9){if(_[_0x50e8('0x19')](this[_0x50e8('0x6')][_0x50e8('0x10')][this[_0x50e8('0x5')]['id']])){return logger[_0x50e8('0xe')](_0x50e8('0x11'),this['squeue']['id'],this[_0x50e8('0x5')]['id']);}else{logger[_0x50e8('0xe')]('[%s][AGENT]\x20timeout\x20with\x20%s',this['squeue']['id'],this[_0x50e8('0x5')]['id']);util[_0x50e8('0x1a')](this[_0x50e8('0x1b')],this['squeue']['id'],this['realtime'][_0x50e8('0x10')][this[_0x50e8('0x5')]['id']],null,this['routing']);this[_0x50e8('0x6')][_0x50e8('0x10')][this[_0x50e8('0x5')]['id']][_0x50e8('0x14')]=![];this['realtime'][_0x50e8('0x10')][this['agent']['id']][_0x50e8('0x15')]=undefined;util[_0x50e8('0x1c')](this[_0x50e8('0x6')],this['routing'],this[_0x50e8('0x5')],this[_0x50e8('0x4')]['channel']);util[_0x50e8('0x17')](this[_0x50e8('0x4')]['id'],this[_0x50e8('0x6')][_0x50e8('0x10')][this['agent']['id']],_0x1041b9?_0x50e8('0x1d'):_0x50e8('0x1e'));}if(!_0x1041b9){setTimeout(this[_0x50e8('0x7')][_0x50e8('0x9')](this),0x3e8);}};function agent(_0x5e556c,_0x3c7778,_0x2d0ccf,_0x3f01ee){return new Agent(_0x5e556c,_0x3c7778,_0x2d0ccf,_0x3f01ee);}module['exports']=agent; \ No newline at end of file diff --git a/server/services/routing/server/applications/strategy/beepall.js b/server/services/routing/server/applications/strategy/beepall.js index 7336411..d6ed00c 100644 --- a/server/services/routing/server/applications/strategy/beepall.js +++ b/server/services/routing/server/applications/strategy/beepall.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xaeb8=['queue','realtime','push','handleRun','bind','handleTimeout','squeue','timeout','drained','prototype','handleDrained','isNil','Agents','length','debug','[%s][QUEUE]\x20agent\x20skipped,\x20unknown\x20id\x20%s','isAgentAvailable','RINGING','agents','busy','busyQueue','name','saveWaitingNotification','channel','showNotification','[%s][QUEUE]\x20ALL\x20AGENTS\x20ARE\x20BUSY','STOP','TIMEOUT','removeWaitingNotification','exports','lodash','uuid','routing','notificationId'];(function(_0x1c4c18,_0x44d9e1){var _0x35b0d9=function(_0x28c883){while(--_0x28c883){_0x1c4c18['push'](_0x1c4c18['shift']());}};_0x35b0d9(++_0x44d9e1);}(_0xaeb8,0x1b6));var _0x8aeb=function(_0x7fd9e9,_0x1765d0){_0x7fd9e9=_0x7fd9e9-0x0;var _0x285d92=_0xaeb8[_0x7fd9e9];return _0x285d92;};'use strict';var _=require(_0x8aeb('0x0'));var uuid=require(_0x8aeb('0x1'));var util=require('./util');var logger=require('../../../../../config/logger')(_0x8aeb('0x2'));var Beepall=function(_0x2f049f,_0x28b3a2,_0x4ef8c8,_0x6ead57){this[_0x8aeb('0x3')]=uuid['v4']();this['squeue']=_0x2f049f;this[_0x8aeb('0x4')]=_0x28b3a2;this[_0x8aeb('0x5')]=_0x4ef8c8;this[_0x8aeb('0x2')]=_0x6ead57;this['squeue'][_0x8aeb('0x6')](this[_0x8aeb('0x7')][_0x8aeb('0x8')](this),this[_0x8aeb('0x9')][_0x8aeb('0x8')](this));this[_0x8aeb('0xa')]['on'](_0x8aeb('0xb'),this[_0x8aeb('0x9')][_0x8aeb('0x8')](this));this[_0x8aeb('0xa')]['on'](_0x8aeb('0xc'),this['handleDrained'][_0x8aeb('0x8')](this));};Beepall['prototype'][_0x8aeb('0x6')]=function(){this['squeue'][_0x8aeb('0x6')](this['handleRun'][_0x8aeb('0x8')](this),this[_0x8aeb('0x9')][_0x8aeb('0x8')](this));};Beepall[_0x8aeb('0xd')][_0x8aeb('0xe')]=function(){this[_0x8aeb('0x9')](!![]);};Beepall[_0x8aeb('0xd')][_0x8aeb('0x7')]=function(){var _0x898da7=!![];if(!_[_0x8aeb('0xf')](this[_0x8aeb('0x4')])&&!_[_0x8aeb('0xf')](this[_0x8aeb('0x4')][_0x8aeb('0x10')])&&this[_0x8aeb('0x4')][_0x8aeb('0x10')][_0x8aeb('0x11')]>0x0){for(var _0xcc4e8c=0x0,_0x31bd4f;_0xcc4e8c0x0){for(var _0x588706=0x0,_0x1e47b4;_0x5887060x0&&_0x3c7423[_0x40652c+'CurrentCapacity']>=_0x3c7423[_0x40652c+_0xbf66('0x24')]){writeLog(_0x4b0137,_0x3c7423,_0x40652c[_0xbf66('0x25')]()+'\x20MAXCAPACITY');return![];}}return!![];};exports['showNotification']=function(_0x2e3c78,_0x4a6de8,_0x1c07e1,_0x85207c,_0x134aa6){return sendNotification(!![],_0x2e3c78,_0x4a6de8,_0x1c07e1,_0x85207c,_0x134aa6);};exports[_0xbf66('0x26')]=function(_0x58f068,_0x1a68f8,_0x17d7b3,_0x15eee8,_0x519a70){return sendNotification(![],_0x58f068,_0x1a68f8,_0x17d7b3,_0x15eee8,_0x519a70);};exports['checkWaitingNotifications']=function(_0x4fc86e,_0x29007d,_0x113b1c){var _0x3fdf79=_0x29007d[_0xbf66('0x27')][_0xbf66('0x28')];if(!_0x3fdf79&&_0x113b1c){_0x3fdf79=_0x113b1c['id'];}var _0x421c67=_[_0xbf66('0x29')](_0x4fc86e[_0x29007d[_0xbf66('0x2a')]+'QueuesWaitingInteractions'],function(_0x5901db){var _0x58336f=_[_0xbf66('0x2b')](_0x29007d[_0xbf66('0x2a')])+_0xbf66('0x2c');return _0x5901db[_0x58336f]===_0x29007d[_0xbf66('0x27')]['id'];});if(!_0x421c67&&_0x3fdf79){_0x421c67=_[_0xbf66('0x29')](_0x4fc86e['agents'][_0x3fdf79][_0x29007d[_0xbf66('0x2a')]+'WaitingInteractions'],function(_0x29f057){return _0x29f057['id']===_0x29007d['interaction']['id'];});}return _0x421c67;};exports[_0xbf66('0x2d')]=function(_0x22621f,_0x63a621,_0x507e5f,_0x1bef1b){_0x22621f[_0xbf66('0x2e')][_0x507e5f['id']][_0x1bef1b+_0xbf66('0x2f')][_0x63a621[_0xbf66('0x30')]['id']]={'id':_0x63a621[_0xbf66('0x27')]['id']};};exports[_0xbf66('0x31')]=function(_0x1b11c6,_0x323732,_0x1bd487,_0x5f0544){delete _0x1b11c6['agents'][_0x1bd487['id']][_0x5f0544+_0xbf66('0x2f')][_0x323732[_0xbf66('0x30')]['id']];};exports['writeLog']=writeLog; \ No newline at end of file +var _0x3b51=['QueuesWaitingInteractions','capitalize','InteractionId','agents','WaitingInteractions','saveWaitingNotification','message','removeWaitingNotification','writeLog','lodash','util','ioredis','../../../../../config/environment','routing','defaults','redis','localhost','socket.io-emitter','format','user:%s','name','user:save','\x20interaction','notificationSound','account','body','queue','msg','getMustacheRender','notificationTemplate','I\x20can\x27t\x20render\x20your\x20template','error','[%s][QUEUE]\x20%s','emit','notification:%s','save','remove','debug','[%s][QUEUE][AGENT:%s][STATUS:%s]','isAgentAvailable','online','OFFLINE','Pause','PAUSE','Capacity','hasOwnProperty','CurrentCapacity','toUpperCase','\x20MAXCAPACITY','checkWaitingNotifications','interaction','UserId','some','channel'];(function(_0x22cf3a,_0x2c3216){var _0x168c37=function(_0x1d3d54){while(--_0x1d3d54){_0x22cf3a['push'](_0x22cf3a['shift']());}};_0x168c37(++_0x2c3216);}(_0x3b51,0x117));var _0x13b5=function(_0x5440d3,_0x68412d){_0x5440d3=_0x5440d3-0x0;var _0x49b20a=_0x3b51[_0x5440d3];return _0x49b20a;};'use strict';var _=require(_0x13b5('0x0'));var util=require(_0x13b5('0x1'));var utils=require('../utils');var Redis=require(_0x13b5('0x2'));var config=require(_0x13b5('0x3'));var logger=require('../../../../../config/logger')(_0x13b5('0x4'));config['redis']=_[_0x13b5('0x5')](config[_0x13b5('0x6')],{'host':_0x13b5('0x7'),'port':0x18eb});var io=require(_0x13b5('0x8'))(new Redis(config[_0x13b5('0x6')]));function sendNotification(_0x1ed55d,_0x20d187,_0x3d54fa,_0x2061de,_0x1225ef,_0xc07e2){io['to'](util[_0x13b5('0x9')](_0x13b5('0xa'),_0x2061de[_0x13b5('0xb')]))['emit'](_0x13b5('0xc'),_0x2061de);var _0x2295ae=_0xc07e2||{};var _0x2d5ccb=_0x3d54fa['split']('.');var _0x29eb81={'uniqueid':_0x20d187,'channel':_0x2d5ccb[0x0],'id':_0x2d5ccb[0x1],'title':_0x2d5ccb[0x0]+_0x13b5('0xd'),'interactionId':_0x2d5ccb[0x2],'queue':_0x1225ef?_0x1225ef[_0x13b5('0xb')]:null,'sound':_0x2295ae['account'][_0x13b5('0xe')],'shake':_0x2295ae[_0x13b5('0xf')]['notificationShake']};try{if(!_0x2295ae[_0x13b5('0x10')]){_0x2295ae['body']={};}if(_0x1225ef){_0x2295ae['body'][_0x13b5('0x11')]=_0x1225ef;}else if(_0x2295ae[_0x13b5('0x10')][_0x13b5('0x11')]){delete _0x2295ae['body'][_0x13b5('0x11')];}_0x29eb81[_0x13b5('0x12')]=utils[_0x13b5('0x13')](_0x2295ae[_0x13b5('0xf')][_0x13b5('0x14')],_0x2295ae);}catch(_0x130fb7){_0x29eb81[_0x13b5('0x12')]=_0x13b5('0x15');logger[_0x13b5('0x16')](util[_0x13b5('0x9')](_0x13b5('0x17'),_0x20d187,_0x130fb7['message']));}io['to'](util['format'](_0x13b5('0xa'),_0x2061de[_0x13b5('0xb')]))[_0x13b5('0x18')](util[_0x13b5('0x9')](_0x13b5('0x19'),_0x1ed55d?_0x13b5('0x1a'):_0x13b5('0x1b')),_0x29eb81);}function writeLog(_0x3e1948,_0x5e4558,_0x4326e4){return logger[_0x13b5('0x1c')](util[_0x13b5('0x9')](_0x13b5('0x1d'),_0x3e1948,_0x5e4558['name'],_0x4326e4));}exports[_0x13b5('0x1e')]=function(_0x574a34,_0x4e0306,_0x28002d,_0x1c7891){if(_0x4e0306['busy']){writeLog(_0x574a34,_0x4e0306,'BUSY');return![];}if(!_0x4e0306[_0x13b5('0x1f')]){writeLog(_0x574a34,_0x4e0306,_0x13b5('0x20'));return![];}if(_0x4e0306[_0x28002d+_0x13b5('0x21')]){writeLog(_0x574a34,_0x4e0306,_0x13b5('0x22'));return![];}if(_0x1c7891&&_0x4e0306['hasOwnProperty'](_0x28002d+_0x13b5('0x23'))&&_0x4e0306[_0x13b5('0x24')](_0x28002d+_0x13b5('0x25'))){if(_0x4e0306[_0x28002d+_0x13b5('0x23')]>0x0&&_0x4e0306[_0x28002d+'CurrentCapacity']>=_0x4e0306[_0x28002d+_0x13b5('0x23')]){writeLog(_0x574a34,_0x4e0306,_0x28002d[_0x13b5('0x26')]()+_0x13b5('0x27'));return![];}}return!![];};exports['showNotification']=function(_0x2ce950,_0x5e5ccd,_0x1232f3,_0x125f7a,_0x9136f9){return sendNotification(!![],_0x2ce950,_0x5e5ccd,_0x1232f3,_0x125f7a,_0x9136f9);};exports['hideNotification']=function(_0x4f856f,_0x3955ad,_0x18da42,_0x52d1ec,_0x5668a5){return sendNotification(![],_0x4f856f,_0x3955ad,_0x18da42,_0x52d1ec,_0x5668a5);};exports[_0x13b5('0x28')]=function(_0x4cbb81,_0x1bde95,_0x3866df){var _0x41f130=_0x1bde95[_0x13b5('0x29')][_0x13b5('0x2a')];if(!_0x41f130&&_0x3866df){_0x41f130=_0x3866df['id'];}var _0x4c4697=_[_0x13b5('0x2b')](_0x4cbb81[_0x1bde95[_0x13b5('0x2c')]+_0x13b5('0x2d')],function(_0x1f03fb){var _0x5f6a=_[_0x13b5('0x2e')](_0x1bde95[_0x13b5('0x2c')])+_0x13b5('0x2f');return _0x1f03fb[_0x5f6a]===_0x1bde95[_0x13b5('0x29')]['id'];});if(!_0x4c4697&&_0x41f130){_0x4c4697=_[_0x13b5('0x2b')](_0x4cbb81[_0x13b5('0x30')][_0x41f130][_0x1bde95[_0x13b5('0x2c')]+_0x13b5('0x31')],function(_0x24553d){return _0x24553d['id']===_0x1bde95[_0x13b5('0x29')]['id'];});}return _0x4c4697;};exports[_0x13b5('0x32')]=function(_0x406ded,_0x4fb236,_0x484f6a,_0x3246ff){_0x406ded[_0x13b5('0x30')][_0x484f6a['id']][_0x3246ff+_0x13b5('0x31')][_0x4fb236[_0x13b5('0x33')]['id']]={'id':_0x4fb236[_0x13b5('0x29')]['id']};};exports[_0x13b5('0x34')]=function(_0x283681,_0x5448bc,_0x8b9d76,_0x174e47){delete _0x283681[_0x13b5('0x30')][_0x8b9d76['id']][_0x174e47+_0x13b5('0x31')][_0x5448bc[_0x13b5('0x33')]['id']];};exports[_0x13b5('0x35')]=writeLog; \ No newline at end of file diff --git a/server/services/routing/server/applications/system.js b/server/services/routing/server/applications/system.js index ac36141..23f0848 100644 --- a/server/services/routing/server/applications/system.js +++ b/server/services/routing/server/applications/system.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xf5d8=['exec','replace','isNil','isEmpty','body','[%s][SYSTEM]\x20set\x20variable\x20%s:\x20%s','[%s][SYSTEM]\x20%s','isObject','stringify','shelljs','routing','string','consequence','validate','error','map','message','join','info','next','getMustacheRender'];(function(_0x321bb2,_0x202794){var _0x9c12ed=function(_0x263dd3){while(--_0x263dd3){_0x321bb2['push'](_0x321bb2['shift']());}};_0x9c12ed(++_0x202794);}(_0xf5d8,0x9c));var _0x8f5d=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0xf5d8[_0x3dd15e];return _0x231fd0;};'use strict';var schema=require('validate');var sh=require(_0x8f5d('0x0'));var _=require('lodash');var utils=require('./utils');var logger=require('../../../../config/logger')(_0x8f5d('0x1'));var system=schema({'command':{'type':_0x8f5d('0x2'),'required':!![],'message':'command\x20is\x20a\x20string\x20and\x20it\x20is\x20required'}});exports[_0x8f5d('0x3')]=function(_0x37eb9e,_0x30d943){return function(_0xc063c6){try{var _0x100a40={'command':_0x30d943[0x0]};var _0x1c07b1=system[_0x8f5d('0x4')](_0x100a40,{'typecast':!![]});if(_0x1c07b1['length']){logger[_0x8f5d('0x5')]('[%s][SYSTEM]\x20%s',_0x37eb9e,_[_0x8f5d('0x6')](_0x1c07b1,_0x8f5d('0x7'))[_0x8f5d('0x8')](',\x20'));logger[_0x8f5d('0x9')]('[%s][SYSTEM]\x20no\x20command\x20executed,\x20force\x20next',_0x37eb9e);_0xc063c6[_0x8f5d('0xa')]();}else{var _0x2418e9=this;var _0x5ef541=utils[_0x8f5d('0xb')](_0x30d943[0x0],this);logger[_0x8f5d('0x9')]('[%s][SYSTEM]\x20commnad:\x20%s',_0x37eb9e,_0x5ef541);sh[_0x8f5d('0xc')](_['trim'](_0x5ef541),function(_0x450910,_0x1bce5c){logger[_0x8f5d('0x9')]('[%s][SYSTEM]\x20result\x20code:\x20%s',_0x37eb9e,_0x450910);if(_0x450910==0x0){var _0x291184=_0x1bce5c[_0x8f5d('0xd')](/(\r\n|\n|\r)/gm,'');if(_[_0x8f5d('0xe')](_0x30d943[0x1])||_[_0x8f5d('0xf')](_0x30d943[0x1])){logger['info']('[%s][SYSTEM]\x20no\x20variable',_0x37eb9e);_0x2418e9[_0x8f5d('0x10')][_0x30d943[0x1]]=_0x291184;}else{logger['info'](_0x8f5d('0x11'),_0x37eb9e,_0x30d943[0x1],_0x291184);_0x2418e9[_0x8f5d('0x10')][_0x30d943[0x1]]=_0x291184;}}_0xc063c6['next']();});}}catch(_0x48a5c3){logger[_0x8f5d('0x5')](_0x8f5d('0x12'),_0x37eb9e,_[_0x8f5d('0x13')](_0x48a5c3)?JSON[_0x8f5d('0x14')](_0x48a5c3):_0x48a5c3);logger[_0x8f5d('0x9')]('[%s][SYSTEM]\x20no\x20command\x20executed,\x20force\x20next',_0x37eb9e);_0xc063c6[_0x8f5d('0xa')]();}};}; \ No newline at end of file +var _0x98ea=['validate','lodash','../../../../config/logger','routing','string','command\x20is\x20a\x20string\x20and\x20it\x20is\x20required','consequence','error','[%s][SYSTEM]\x20%s','message','join','[%s][SYSTEM]\x20no\x20command\x20executed,\x20force\x20next','exec','trim','replace','isNil','info','[%s][SYSTEM]\x20no\x20variable','body','[%s][SYSTEM]\x20set\x20variable\x20%s:\x20%s','isObject','next'];(function(_0x216428,_0x5d20ea){var _0x313dd4=function(_0x447e0d){while(--_0x447e0d){_0x216428['push'](_0x216428['shift']());}};_0x313dd4(++_0x5d20ea);}(_0x98ea,0x1ce));var _0xa98e=function(_0x13df25,_0x41fce8){_0x13df25=_0x13df25-0x0;var _0x57176e=_0x98ea[_0x13df25];return _0x57176e;};'use strict';var schema=require(_0xa98e('0x0'));var sh=require('shelljs');var _=require(_0xa98e('0x1'));var utils=require('./utils');var logger=require(_0xa98e('0x2'))(_0xa98e('0x3'));var system=schema({'command':{'type':_0xa98e('0x4'),'required':!![],'message':_0xa98e('0x5')}});exports[_0xa98e('0x6')]=function(_0x4fb7b0,_0x45727a){return function(_0x4c4eaf){try{var _0x4517b4={'command':_0x45727a[0x0]};var _0x3c7612=system[_0xa98e('0x0')](_0x4517b4,{'typecast':!![]});if(_0x3c7612['length']){logger[_0xa98e('0x7')](_0xa98e('0x8'),_0x4fb7b0,_['map'](_0x3c7612,_0xa98e('0x9'))[_0xa98e('0xa')](',\x20'));logger['info'](_0xa98e('0xb'),_0x4fb7b0);_0x4c4eaf['next']();}else{var _0x2faf52=this;var _0x563d54=utils['getMustacheRender'](_0x45727a[0x0],this);logger['info']('[%s][SYSTEM]\x20commnad:\x20%s',_0x4fb7b0,_0x563d54);sh[_0xa98e('0xc')](_[_0xa98e('0xd')](_0x563d54),function(_0x5bd8e8,_0x51698b){logger['info']('[%s][SYSTEM]\x20result\x20code:\x20%s',_0x4fb7b0,_0x5bd8e8);if(_0x5bd8e8==0x0){var _0x270b28=_0x51698b[_0xa98e('0xe')](/(\r\n|\n|\r)/gm,'');if(_[_0xa98e('0xf')](_0x45727a[0x1])||_['isEmpty'](_0x45727a[0x1])){logger[_0xa98e('0x10')](_0xa98e('0x11'),_0x4fb7b0);_0x2faf52[_0xa98e('0x12')][_0x45727a[0x1]]=_0x270b28;}else{logger['info'](_0xa98e('0x13'),_0x4fb7b0,_0x45727a[0x1],_0x270b28);_0x2faf52[_0xa98e('0x12')][_0x45727a[0x1]]=_0x270b28;}}_0x4c4eaf['next']();});}}catch(_0x4f0e4){logger[_0xa98e('0x7')](_0xa98e('0x8'),_0x4fb7b0,_[_0xa98e('0x14')](_0x4f0e4)?JSON['stringify'](_0x4f0e4):_0x4f0e4);logger[_0xa98e('0x10')]('[%s][SYSTEM]\x20no\x20command\x20executed,\x20force\x20next',_0x4fb7b0);_0x4c4eaf[_0xa98e('0x15')]();}};}; \ No newline at end of file diff --git a/server/services/routing/server/applications/tag.js b/server/services/routing/server/applications/tag.js index f224149..62a9313 100644 --- a/server/services/routing/server/applications/tag.js +++ b/server/services/routing/server/applications/tag.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x226c=['[%s][TAG]\x20%s','join','info','[%s][TAG]\x20no\x20tags\x20saved,\x20force\x20next','next','channel','Interaction','addTags','catch','error','stringify','finally','isObject','validate','../../rpc/chatInteraction','../../rpc/openchannelInteraction','../../rpc/smsInteraction','../../rpc/mailInteraction','../../rpc/faxInteraction','../../rpc/whatsappInteraction','../../../../config/logger','routing','number','TagId\x20is\x20a\x20string\x20and\x20it\x20is\x20required'];(function(_0x50a0c2,_0x4befab){var _0x5ebadd=function(_0x3a3342){while(--_0x3a3342){_0x50a0c2['push'](_0x50a0c2['shift']());}};_0x5ebadd(++_0x4befab);}(_0x226c,0x15d));var _0xc226=function(_0x2d7f0e,_0x3e6fbd){_0x2d7f0e=_0x2d7f0e-0x0;var _0x110b07=_0x226c[_0x2d7f0e];return _0x110b07;};'use strict';var schema=require(_0xc226('0x0'));var _=require('lodash');var rpc={'chatInteraction':require(_0xc226('0x1')),'openchannelInteraction':require(_0xc226('0x2')),'smsInteraction':require(_0xc226('0x3')),'mailInteraction':require(_0xc226('0x4')),'faxInteraction':require(_0xc226('0x5')),'whatsappInteraction':require(_0xc226('0x6'))};var logger=require(_0xc226('0x7'))(_0xc226('0x8'));var tag=schema({'tag':{'type':_0xc226('0x9'),'required':!![],'message':_0xc226('0xa')}});exports['consequence']=function(_0x4603f0,_0x146e80,_0x22c323,_0x13c91e){return function(_0x819549){try{var _0x2bdd1a={'tag':_0x146e80[0x0]};var _0x2fb94a=tag[_0xc226('0x0')](_0x2bdd1a,{'typecast':!![]});if(_0x2fb94a['length']){logger['error'](_0xc226('0xb'),_0x4603f0,_['map'](_0x2fb94a,'message')[_0xc226('0xc')](',\x20'));logger[_0xc226('0xd')](_0xc226('0xe'),_0x4603f0);_0x819549[_0xc226('0xf')]();}else{var _0x53d71d={'ids':[_0x146e80[0x0]]};if(rpc[_0x13c91e[_0xc226('0x10')]+'Interaction']){rpc[_0x13c91e[_0xc226('0x10')]+_0xc226('0x11')][_0xc226('0x12')](_0x13c91e['interaction']['id'],_0x53d71d)['then'](function(_0x587595){logger[_0xc226('0xd')]('[%s][TAG]\x20tag\x20\x22%s\x22\x20added\x20to\x20%s\x20interaction\x20%s',_0x4603f0,_0x146e80[0x1],_0x13c91e[_0xc226('0x10')],_0x13c91e['interaction']['id']);})[_0xc226('0x13')](function(_0x4cc26b){logger[_0xc226('0x14')]('[%s][TAG]\x20%s',_0x4603f0,JSON[_0xc226('0x15')](_0x4cc26b));logger[_0xc226('0xd')](_0xc226('0xe'),_0x4603f0);})[_0xc226('0x16')](function(){_0x819549[_0xc226('0xf')]();});}}}catch(_0x5ee15e){logger['error'](_0xc226('0xb'),_0x4603f0,_[_0xc226('0x17')](_0x5ee15e)?JSON[_0xc226('0x15')](_0x5ee15e):_0x5ee15e);logger[_0xc226('0xd')](_0xc226('0xe'),_0x4603f0);_0x819549['next']();}};}; \ No newline at end of file +var _0x64c1=['message','join','info','[%s][TAG]\x20no\x20tags\x20saved,\x20force\x20next','channel','Interaction','addTags','interaction','then','[%s][TAG]\x20tag\x20\x22%s\x22\x20added\x20to\x20%s\x20interaction\x20%s','stringify','finally','next','isObject','validate','../../rpc/chatInteraction','../../rpc/openchannelInteraction','../../rpc/mailInteraction','../../rpc/faxInteraction','../../rpc/whatsappInteraction','../../../../config/logger','number','TagId\x20is\x20a\x20string\x20and\x20it\x20is\x20required','consequence','length','error','[%s][TAG]\x20%s','map'];(function(_0x1f24d6,_0x13d6d7){var _0x561cfa=function(_0x3f171c){while(--_0x3f171c){_0x1f24d6['push'](_0x1f24d6['shift']());}};_0x561cfa(++_0x13d6d7);}(_0x64c1,0x1ea));var _0x164c=function(_0x1e395e,_0x23bf1f){_0x1e395e=_0x1e395e-0x0;var _0x3881ee=_0x64c1[_0x1e395e];return _0x3881ee;};'use strict';var schema=require(_0x164c('0x0'));var _=require('lodash');var rpc={'chatInteraction':require(_0x164c('0x1')),'openchannelInteraction':require(_0x164c('0x2')),'smsInteraction':require('../../rpc/smsInteraction'),'mailInteraction':require(_0x164c('0x3')),'faxInteraction':require(_0x164c('0x4')),'whatsappInteraction':require(_0x164c('0x5'))};var logger=require(_0x164c('0x6'))('routing');var tag=schema({'tag':{'type':_0x164c('0x7'),'required':!![],'message':_0x164c('0x8')}});exports[_0x164c('0x9')]=function(_0x2d6867,_0x47f601,_0x519624,_0x46dcca){return function(_0xb857a9){try{var _0x2ddc39={'tag':_0x47f601[0x0]};var _0x163949=tag[_0x164c('0x0')](_0x2ddc39,{'typecast':!![]});if(_0x163949[_0x164c('0xa')]){logger[_0x164c('0xb')](_0x164c('0xc'),_0x2d6867,_[_0x164c('0xd')](_0x163949,_0x164c('0xe'))[_0x164c('0xf')](',\x20'));logger[_0x164c('0x10')](_0x164c('0x11'),_0x2d6867);_0xb857a9['next']();}else{var _0x596d90={'ids':[_0x47f601[0x0]]};if(rpc[_0x46dcca[_0x164c('0x12')]+'Interaction']){rpc[_0x46dcca[_0x164c('0x12')]+_0x164c('0x13')][_0x164c('0x14')](_0x46dcca[_0x164c('0x15')]['id'],_0x596d90)[_0x164c('0x16')](function(_0x233cc2){logger[_0x164c('0x10')](_0x164c('0x17'),_0x2d6867,_0x47f601[0x1],_0x46dcca[_0x164c('0x12')],_0x46dcca['interaction']['id']);})['catch'](function(_0x901a76){logger['error'](_0x164c('0xc'),_0x2d6867,JSON[_0x164c('0x18')](_0x901a76));logger[_0x164c('0x10')](_0x164c('0x11'),_0x2d6867);})[_0x164c('0x19')](function(){_0xb857a9[_0x164c('0x1a')]();});}}}catch(_0x3578ff){logger[_0x164c('0xb')](_0x164c('0xc'),_0x2d6867,_[_0x164c('0x1b')](_0x3578ff)?JSON[_0x164c('0x18')](_0x3578ff):_0x3578ff);logger[_0x164c('0x10')]('[%s][TAG]\x20no\x20tags\x20saved,\x20force\x20next',_0x2d6867);_0xb857a9[_0x164c('0x1a')]();}};}; \ No newline at end of file diff --git a/server/services/routing/server/applications/tvox.js b/server/services/routing/server/applications/tvox.js index 87c34db..134069d 100644 --- a/server/services/routing/server/applications/tvox.js +++ b/server/services/routing/server/applications/tvox.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x5f77=['utf8','POST','application/json-rpc','then','result','logged','channelId=','&sessionId=','[%s][TVOX]\x20Request\x20sent\x20to\x20TVox:\x20%s','stop','error','isObject','info','next','request-promise','routing','lodash','consequence','replace','\x20-\x20','urlOnAnswer','urlOnRing','title','jsonrpc','2.0','method','login','push','stringify'];(function(_0x38546c,_0x437f4c){var _0x41e904=function(_0x1a0e0a){while(--_0x1a0e0a){_0x38546c['push'](_0x38546c['shift']());}};_0x41e904(++_0x437f4c);}(_0x5f77,0x113));var _0x75f7=function(_0x4dc7b9,_0x319d5a){_0x4dc7b9=_0x4dc7b9-0x0;var _0x3ab114=_0x5f77[_0x4dc7b9];return _0x3ab114;};'use strict';var rp=require(_0x75f7('0x0'));var logger=require('../../../../config/logger')(_0x75f7('0x1'));var _=require(_0x75f7('0x2'));var arr=[];exports[_0x75f7('0x3')]=function(_0x93ecd6,_0x2efee0){return function(_0x19650c){var _0x5c8cc1=_0x2efee0[0xa];var _0x2181bb=_0x2efee0[0xb];var _0x4e1371=_0x2efee0[0xc];var _0x360a62=_0x2efee0[0xd];var _0x4ff504=_0x2efee0[0xe];var _0x3b4eb0=_0x2efee0[0xf][_0x75f7('0x4')](/\n/g,_0x75f7('0x5'));var _0x4edfc5=_0x2efee0[0x10][_0x75f7('0x4')](/\n/g,'\x20');if(!arr['includes'](_0x2181bb)){arr['push'](_0x2181bb);var _0x1296f8=_0x2efee0[0x3];var _0x182c26=_0x2efee0[0x4];var _0x362cdb=_0x2efee0[0x1];var _0x52c5e2=_0x2efee0[0x0];var _0x5b1676={};_0x5b1676[_0x75f7('0x6')]=_0x2efee0[0x8]+'?params='+_0x4e1371+'|'+_0x5c8cc1+'|'+_0x360a62+'|'+_0x2181bb+'|'+_0x4ff504;_0x5b1676[_0x75f7('0x7')]=_0x2efee0[0x7]+'?params='+_0x4e1371+'|'+_0x5c8cc1+'|'+_0x360a62+'|'+_0x2181bb+'|'+_0x4ff504+'|'+_0x3b4eb0+'|'+_0x4edfc5;_0x5b1676[_0x75f7('0x8')]=_0x2efee0[0x9];var _0x4906fb={};_0x4906fb[_0x75f7('0x9')]=_0x75f7('0xa');_0x4906fb[_0x75f7('0xb')]=_0x75f7('0xc');var _0x30de93=[];_0x30de93['push'](_0x2efee0[0x2]);_0x30de93['push'](_0x2efee0[0x5]);_0x30de93[_0x75f7('0xd')](_0x2efee0[0x6]);_0x4906fb['params']=_0x30de93;_0x4906fb['id']=0x1;var _0x86c718=JSON[_0x75f7('0xe')](_0x4906fb);var _0x5cc83a={'encoding':_0x75f7('0xf'),'method':_0x75f7('0x10'),'timeout':0x2710,'url':_0x1296f8,'headers':{'Content-Type':_0x75f7('0x11')},'body':_0x86c718};return rp(_0x5cc83a)[_0x75f7('0x12')](function(_0x1321d9){const _0xcdf2f0=JSON['parse'](_0x1321d9);if(!_0xcdf2f0[_0x75f7('0x13')][_0x75f7('0x14')]){throw new Error('Unable\x20to\x20login\x20with\x20TVox\x20application');}var _0x347ef5=_0x2181bb;var _0x4f2dfb=_0x75f7('0x15')+_0x362cdb+'&serviceId='+_0x52c5e2+_0x75f7('0x16')+_0x347ef5+'&data='+JSON['stringify'](_0x5b1676);var _0x597ae2=_0x182c26+'?'+_0x4f2dfb;return rp(_0x597ae2);})[_0x75f7('0x12')](function(_0x33c516){logger['info'](_0x75f7('0x17'),_0x93ecd6,_0x33c516);_0x19650c[_0x75f7('0x18')]();})['catch'](function(_0x54aa1a){logger[_0x75f7('0x19')]('[%s][TVOX]\x20%s',_0x93ecd6,_[_0x75f7('0x1a')](_0x54aa1a)?JSON[_0x75f7('0xe')](_0x54aa1a):_0x54aa1a);_0x19650c[_0x75f7('0x18')]();});}else{logger[_0x75f7('0x1b')]('[%s][TVOX]\x20Application\x20already\x20executed\x20for\x20the\x20current\x20session,\x20force\x20next',_0x93ecd6);_0x19650c[_0x75f7('0x1c')]();}};}; \ No newline at end of file +var _0x834e=['jsonrpc','2.0','method','login','params','stringify','utf8','parse','result','Unable\x20to\x20login\x20with\x20TVox\x20application','channelId=','&serviceId=','&sessionId=','then','info','[%s][TVOX]\x20Request\x20sent\x20to\x20TVox:\x20%s','stop','catch','[%s][TVOX]\x20%s','isObject','[%s][TVOX]\x20Application\x20already\x20executed\x20for\x20the\x20current\x20session,\x20force\x20next','next','request-promise','routing','lodash','consequence','includes','push','urlOnAnswer','?params=','title'];(function(_0x231e16,_0x67347b){var _0x570a7c=function(_0x2c35b4){while(--_0x2c35b4){_0x231e16['push'](_0x231e16['shift']());}};_0x570a7c(++_0x67347b);}(_0x834e,0x12d));var _0xe834=function(_0x476e52,_0x2b382a){_0x476e52=_0x476e52-0x0;var _0x1929e9=_0x834e[_0x476e52];return _0x1929e9;};'use strict';var rp=require(_0xe834('0x0'));var logger=require('../../../../config/logger')(_0xe834('0x1'));var _=require(_0xe834('0x2'));var arr=[];exports[_0xe834('0x3')]=function(_0xff430a,_0x1f593e){return function(_0x1605c5){var _0x33cc03=_0x1f593e[0xa];var _0x1e2ea3=_0x1f593e[0xb];var _0x26a00b=_0x1f593e[0xc];var _0x4de361=_0x1f593e[0xd];var _0x5e6ccd=_0x1f593e[0xe];var _0x3a813f=_0x1f593e[0xf]['replace'](/\n/g,'\x20-\x20');var _0x29fec3=_0x1f593e[0x10]['replace'](/\n/g,'\x20');if(!arr[_0xe834('0x4')](_0x1e2ea3)){arr[_0xe834('0x5')](_0x1e2ea3);var _0x1beac7=_0x1f593e[0x3];var _0x112b3f=_0x1f593e[0x4];var _0x3f87de=_0x1f593e[0x1];var _0x55c75c=_0x1f593e[0x0];var _0x409611={};_0x409611[_0xe834('0x6')]=_0x1f593e[0x8]+'?params='+_0x26a00b+'|'+_0x33cc03+'|'+_0x4de361+'|'+_0x1e2ea3+'|'+_0x5e6ccd;_0x409611['urlOnRing']=_0x1f593e[0x7]+_0xe834('0x7')+_0x26a00b+'|'+_0x33cc03+'|'+_0x4de361+'|'+_0x1e2ea3+'|'+_0x5e6ccd+'|'+_0x3a813f+'|'+_0x29fec3;_0x409611[_0xe834('0x8')]=_0x1f593e[0x9];var _0x521ba5={};_0x521ba5[_0xe834('0x9')]=_0xe834('0xa');_0x521ba5[_0xe834('0xb')]=_0xe834('0xc');var _0x58d7e0=[];_0x58d7e0[_0xe834('0x5')](_0x1f593e[0x2]);_0x58d7e0['push'](_0x1f593e[0x5]);_0x58d7e0[_0xe834('0x5')](_0x1f593e[0x6]);_0x521ba5[_0xe834('0xd')]=_0x58d7e0;_0x521ba5['id']=0x1;var _0x3f2ca2=JSON[_0xe834('0xe')](_0x521ba5);var _0xbb6ea1={'encoding':_0xe834('0xf'),'method':'POST','timeout':0x2710,'url':_0x1beac7,'headers':{'Content-Type':'application/json-rpc'},'body':_0x3f2ca2};return rp(_0xbb6ea1)['then'](function(_0x1e6e99){const _0x50f4a5=JSON[_0xe834('0x10')](_0x1e6e99);if(!_0x50f4a5[_0xe834('0x11')]['logged']){throw new Error(_0xe834('0x12'));}var _0x45b7a2=_0x1e2ea3;var _0x51c99c=_0xe834('0x13')+_0x3f87de+_0xe834('0x14')+_0x55c75c+_0xe834('0x15')+_0x45b7a2+'&data='+JSON[_0xe834('0xe')](_0x409611);var _0x8a324b=_0x112b3f+'?'+_0x51c99c;return rp(_0x8a324b);})[_0xe834('0x16')](function(_0x35ddf4){logger[_0xe834('0x17')](_0xe834('0x18'),_0xff430a,_0x35ddf4);_0x1605c5[_0xe834('0x19')]();})[_0xe834('0x1a')](function(_0x4fc9a6){logger['error'](_0xe834('0x1b'),_0xff430a,_[_0xe834('0x1c')](_0x4fc9a6)?JSON[_0xe834('0xe')](_0x4fc9a6):_0x4fc9a6);_0x1605c5[_0xe834('0x19')]();});}else{logger[_0xe834('0x17')](_0xe834('0x1d'),_0xff430a);_0x1605c5[_0xe834('0x1e')]();}};}; \ No newline at end of file diff --git a/server/services/routing/server/applications/utils.js b/server/services/routing/server/applications/utils.js index c1359a7..ea7839d 100644 --- a/server/services/routing/server/applications/utils.js +++ b/server/services/routing/server/applications/utils.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xa9e0=['message','account','interaction','mustache','lodash','exports','render','body','contact'];(function(_0x732864,_0x5e5bd2){var _0x1f3930=function(_0x47aeaf){while(--_0x47aeaf){_0x732864['push'](_0x732864['shift']());}};_0x1f3930(++_0x5e5bd2);}(_0xa9e0,0x123));var _0x0a9e=function(_0x3b5250,_0x7a0b2c){_0x3b5250=_0x3b5250-0x0;var _0xc844a1=_0xa9e0[_0x3b5250];return _0xc844a1;};'use strict';var Mustache=require(_0x0a9e('0x0'));var _=require(_0x0a9e('0x1'));module[_0x0a9e('0x2')]={'getMustacheRender':function(_0x5dd881,_0x550fbc){return Mustache[_0x0a9e('0x3')](_0x5dd881,_['merge'](_0x550fbc[_0x0a9e('0x4')],{'contact':_0x550fbc[_0x0a9e('0x5')],'message':_0x550fbc[_0x0a9e('0x6')],'account':_0x550fbc[_0x0a9e('0x7')],'interaction':_0x550fbc[_0x0a9e('0x8')],'list':_0x550fbc['list']}))||'';}}; \ No newline at end of file +var _0x9c44=['merge','body','account','list','exports','render'];(function(_0x275036,_0x1e8a6a){var _0x16fd2e=function(_0x22a70c){while(--_0x22a70c){_0x275036['push'](_0x275036['shift']());}};_0x16fd2e(++_0x1e8a6a);}(_0x9c44,0x178));var _0x49c4=function(_0x8c43de,_0x90ff31){_0x8c43de=_0x8c43de-0x0;var _0xa6591b=_0x9c44[_0x8c43de];return _0xa6591b;};'use strict';var Mustache=require('mustache');var _=require('lodash');module[_0x49c4('0x0')]={'getMustacheRender':function(_0x18bf2d,_0x26844b){return Mustache[_0x49c4('0x1')](_0x18bf2d,_[_0x49c4('0x2')](_0x26844b[_0x49c4('0x3')],{'contact':_0x26844b['contact'],'message':_0x26844b['message'],'account':_0x26844b[_0x49c4('0x4')],'interaction':_0x26844b['interaction'],'list':_0x26844b[_0x49c4('0x5')]}))||'';}}; \ No newline at end of file diff --git a/server/services/routing/server/index.js b/server/services/routing/server/index.js index 63dba60..4e43bbd 100644 --- a/server/services/routing/server/index.js +++ b/server/services/routing/server/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xff4e=['log','RPC\x20listening\x20on\x20port:','util','path','./applications/utils','../../../config/logger','../rpc/openchannelQueueReport','../rpc/faxQueueReport','../rpc/whatsappQueueReport','../lib/rule-engine','format','%s.%s.%s','isNil','IntervalId','map','Intervals','interval','listen','rules','channel','message','interaction','checkWaitingNotifications','applications','isArray','length','existsSync','join','app','toLowerCase','autoreply','split','push','slice','appdata','amazonlex','tag','TagId','tvox','getMustacheRender','account','notificationTemplate','ChatWebsiteId','ContactId','body','%s:%s:%s','./interval','./applications/','consequence','priority','info','Push\x20new\x20rule','on\x20interval','intervals','\x20|\x20','error','.js','execute','Applications\x20executed','stringify','matchPath','complete','Skipped\x20routing\x20for\x20%s','agent','agents','busy','busyQueue','end','QueueReport','update','UserId','catch','error\x20update\x20queue\x20report','stack','message\x20is\x20empty','emit','hasOwnProperty','capacity','CurrentCapacity','values','find','chatQueues','available','loggedIn','name','paused','mailQueues','waiting','openchannelQueues','smsQueues','faxQueues','whatsappQueues','mailQueuesWaitingInteractions','openchannelQueuesWaitingInteractions','smsQueuesWaitingInteractions','whatsappQueuesWaitingInteractions','server','http','127.0.0.1'];(function(_0x4b9c1b,_0xe41bd1){var _0x21bc24=function(_0x5e2592){while(--_0x5e2592){_0x4b9c1b['push'](_0x4b9c1b['shift']());}};_0x21bc24(++_0xe41bd1);}(_0xff4e,0x18e));var _0xeff4=function(_0x1d0aee,_0x2c4454){_0x1d0aee=_0x1d0aee-0x0;var _0x34ee2c=_0xff4e[_0x1d0aee];return _0x34ee2c;};'use strict';var _=require('lodash');var util=require(_0xeff4('0x0'));var path=require(_0xeff4('0x1'));var fs=require('fs');var jayson=require('jayson/promise');var BPromise=require('bluebird');var utils=require(_0xeff4('0x2'));var sUtils=require('./applications/strategy/util');var logger=require(_0xeff4('0x3'))('routing');var rpc={'openchannelQueueReport':require(_0xeff4('0x4')),'mailQueueReport':require('../rpc/mailQueueReport'),'chatQueueReport':require('../rpc/chatQueueReport'),'smsQueueReport':require('../rpc/smsQueueReport'),'faxQueueReport':require(_0xeff4('0x5')),'whatsappQueueReport':require(_0xeff4('0x6'))};var RuleEngine=require(_0xeff4('0x7'));function getId(_0x21cca0,_0x52fb5a,_0x4e70ae){return util[_0xeff4('0x8')](_0xeff4('0x9'),_0x21cca0,_0x52fb5a||0x0,_0x4e70ae||0x0);}function getIntervals(_0x2b395b,_0xe92a22){var _0x5bfe13=[];if(!_[_0xeff4('0xa')](_0xe92a22[_0xeff4('0xb')])&&!_[_0xeff4('0xa')](_0x2b395b[_0xe92a22[_0xeff4('0xb')]])&&!_[_0xeff4('0xa')](_0x2b395b[_0xe92a22[_0xeff4('0xb')]]['Intervals'])){_0x5bfe13=_[_0xeff4('0xc')](_0x2b395b[_0xe92a22[_0xeff4('0xb')]][_0xeff4('0xd')],_0xeff4('0xe'));}else if(!_[_0xeff4('0xa')](_0xe92a22[_0xeff4('0xe')])){_0x5bfe13=[_0xe92a22['interval']];}return _0x5bfe13;}exports[_0xeff4('0xf')]=function(_0x1345f3){_0x1345f3[_0xeff4('0x10')]={};return new BPromise(function(_0x514d16,_0xde81cd){var _0x3db07c={'Start':function(_0x34f456){var _0x37c470=this;return new Promise(function(_0x455a38,_0x59ffc2){if(_0x34f456){try{var _0x182799=[];var _0x5086a8=getId(_0x34f456[_0xeff4('0x11')],_0x34f456['message']?_0x34f456[_0xeff4('0x12')]['id']:0x0,_0x34f456[_0xeff4('0x13')]?_0x34f456['interaction']['id']:0x0);var _0x2774bf=sUtils[_0xeff4('0x14')](_0x1345f3,_0x34f456);if(!_0x2774bf&&_0x34f456[_0xeff4('0x15')]&&_[_0xeff4('0x16')](_0x34f456[_0xeff4('0x15')])&&_0x34f456[_0xeff4('0x15')][_0xeff4('0x17')]){for(var _0xa51034=0x0;_0xa51034<_0x34f456[_0xeff4('0x15')]['length'];_0xa51034+=0x1){var _0x11cdd9=_0x34f456[_0xeff4('0x15')][_0xa51034];if(fs[_0xeff4('0x18')](path[_0xeff4('0x19')](__dirname,'applications',_0x11cdd9['app']+'.js'))){var _0xbddce5=[];switch(_0x11cdd9[_0xeff4('0x1a')][_0xeff4('0x1b')]()){case _0xeff4('0x1c'):var _0x54535f=_0x11cdd9['appdata'][_0xeff4('0x1d')](',');if(_0x34f456['channel']==='mail'){_0xbddce5[_0xeff4('0x1e')](_0x54535f[0x0]);_0xbddce5[_0xeff4('0x1e')](_0x54535f[0x1]);_0xbddce5[_0xeff4('0x1e')](_0x54535f[_0xeff4('0x1f')](0x2,_0x54535f[_0xeff4('0x17')])[_0xeff4('0x19')](','));}else{_0xbddce5[_0xeff4('0x1e')](_0x54535f[0x0]);_0xbddce5[_0xeff4('0x1e')](_0x54535f['slice'](0x1,_0x54535f[_0xeff4('0x17')])[_0xeff4('0x19')](','));}break;case'dialogflow':var _0x4c3fe2=_0x11cdd9[_0xeff4('0x20')][_0xeff4('0x1d')](',');_0xbddce5[_0xeff4('0x1e')](_0x4c3fe2[0x0]);_0xbddce5[_0xeff4('0x1e')](_0x4c3fe2[0x1]);_0xbddce5['push'](_0x4c3fe2[_0xeff4('0x1f')](0x2,_0x4c3fe2[_0xeff4('0x17')])[_0xeff4('0x19')](','));break;case'dialogflowv2':var _0x48c68d=_0x11cdd9[_0xeff4('0x20')][_0xeff4('0x1d')](',');_0xbddce5[_0xeff4('0x1e')](_0x48c68d[0x0]);_0xbddce5[_0xeff4('0x1e')](_0x48c68d[0x1]);_0xbddce5['push'](_0x48c68d[0x2]);_0xbddce5[_0xeff4('0x1e')](_0x48c68d[0x3]);_0xbddce5[_0xeff4('0x1e')](_0x48c68d['slice'](0x4,_0x48c68d[_0xeff4('0x17')])['join'](','));break;case _0xeff4('0x21'):var _0x2c753e=_0x11cdd9['appdata'][_0xeff4('0x1d')](',');_0xbddce5['push'](_0x2c753e[0x0]);_0xbddce5[_0xeff4('0x1e')](_0x2c753e[0x1]);_0xbddce5['push'](_0x2c753e[0x2]);_0xbddce5[_0xeff4('0x1e')](_0x2c753e[0x3]);_0xbddce5['push'](_0x2c753e[_0xeff4('0x1f')](0x4,_0x2c753e[_0xeff4('0x17')])[_0xeff4('0x19')](','));break;case _0xeff4('0x12'):_0xbddce5['push'](_0x11cdd9[_0xeff4('0x20')]);break;case _0xeff4('0x22'):_0xbddce5['push'](_0x11cdd9[_0xeff4('0x23')]);_0xbddce5[_0xeff4('0x1e')](_0x11cdd9[_0xeff4('0x20')]);break;case _0xeff4('0x24'):var _0x50c78f=utils[_0xeff4('0x25')](_0x34f456[_0xeff4('0x26')][_0xeff4('0x27')],_0x34f456);var _0x594520=_0x11cdd9[_0xeff4('0x20')][_0xeff4('0x1d')](',');_0xbddce5['push'](_0x594520[0x0]);_0xbddce5[_0xeff4('0x1e')](_0x594520[0x1]);_0xbddce5[_0xeff4('0x1e')](_0x594520[0x2]);_0xbddce5[_0xeff4('0x1e')](_0x594520[0x3]);_0xbddce5[_0xeff4('0x1e')](_0x594520[0x4]);_0xbddce5[_0xeff4('0x1e')](_0x594520[0x5]);_0xbddce5[_0xeff4('0x1e')](_0x594520[0x6]);_0xbddce5[_0xeff4('0x1e')](_0x594520[0x7]);_0xbddce5['push'](_0x594520[0x8]);_0xbddce5['push'](_0x594520[0x9]);_0xbddce5[_0xeff4('0x1e')](_0x594520[0xa]);_0xbddce5[_0xeff4('0x1e')](_0x34f456[_0xeff4('0x13')]['id']);_0xbddce5[_0xeff4('0x1e')](_0x34f456[_0xeff4('0x12')]['id']);_0xbddce5[_0xeff4('0x1e')](_0x11cdd9[_0xeff4('0x28')]);_0xbddce5[_0xeff4('0x1e')](_0x34f456[_0xeff4('0x13')][_0xeff4('0x29')]);_0xbddce5['push'](_0x34f456[_0xeff4('0x2a')][_0xeff4('0x2a')]);_0xbddce5[_0xeff4('0x1e')](_0x50c78f);break;default:_0xbddce5=_[_0xeff4('0xa')](_0x11cdd9[_0xeff4('0x20')])?[]:_0x11cdd9[_0xeff4('0x20')]['split'](',');}var _0x1e726f={'id':util[_0xeff4('0x8')](_0xeff4('0x2b'),_0x5086a8,_0x11cdd9['id'],_0x11cdd9['app']),'condition':require(_0xeff4('0x2c'))['condition'](_0x5086a8,getIntervals(_0x1345f3['intervals'],_0x11cdd9),_0x1345f3),'consequence':require(_0xeff4('0x2d')+_0x11cdd9[_0xeff4('0x1a')])[_0xeff4('0x2e')](_0x5086a8,_0xbddce5,_0x1345f3,_0x34f456),'p':_0x11cdd9[_0xeff4('0x2f')]||0x0};logger[_0xeff4('0x30')](_0xeff4('0x31'),_0x1e726f['id'],_0xeff4('0x32'),getIntervals(_0x1345f3[_0xeff4('0x33')],_0x11cdd9)[_0xeff4('0x19')](_0xeff4('0x34')));_0x182799[_0xeff4('0x1e')](_0x1e726f);}else{logger[_0xeff4('0x35')]('Please\x20create\x20a\x20new\x20file\x20under',path['join'](__dirname,'applications',_0x11cdd9[_0xeff4('0x1a')]+_0xeff4('0x36')));}}_0x1345f3[_0xeff4('0x10')][_0x5086a8]=new RuleEngine(_0x182799);_0x1345f3[_0xeff4('0x10')][_0x5086a8][_0xeff4('0x37')](_0x34f456,function(_0x1b68bc){logger['info'](_0xeff4('0x38'),JSON[_0xeff4('0x39')](_0x1b68bc[_0xeff4('0x3a')]));if(_0x1345f3[_0xeff4('0x10')][_0x5086a8]){_0x1345f3[_0xeff4('0x10')][_0x5086a8]['emit'](_0xeff4('0x3b'));}});return _0x455a38({'code':0xc8,'message':_0x34f456});}else{if(_0x2774bf){logger['info'](util['format'](_0xeff4('0x3c'),_0x5086a8));}else{logger['info']('No\x20applications\x20to\x20execute');}return _0x455a38({'code':0xc8,'message':_0x34f456});}}catch(_0x40304c){logger[_0xeff4('0x35')](_0x40304c['stack']);return _0x59ffc2(_0x37c470[_0xeff4('0x35')](0x1f4,_0x40304c));}}return _0x59ffc2('routing\x20is\x20empty');});},'AcceptMessage':function(_0x22ec51){var _0x394076=this;return new Promise(function(_0x5826cf,_0x195f2d){if(_0x22ec51[_0xeff4('0x3d')]&&_0x22ec51[_0xeff4('0x3d')]['id']){if(_0x1345f3[_0xeff4('0x3e')][_0x22ec51['agent']['id']]){_0x1345f3[_0xeff4('0x3e')][_0x22ec51[_0xeff4('0x3d')]['id']][_0xeff4('0x3f')]=![];_0x1345f3[_0xeff4('0x3e')][_0x22ec51[_0xeff4('0x3d')]['id']][_0xeff4('0x40')]=undefined;}}if(_0x22ec51['message']&&_0x22ec51[_0xeff4('0x12')]['id']){try{var _0x16af98=getId(_0x22ec51[_0xeff4('0x11')],_0x22ec51[_0xeff4('0x12')]?_0x22ec51[_0xeff4('0x12')]['id']:0x0,_0x22ec51[_0xeff4('0x13')]?_0x22ec51[_0xeff4('0x13')]['id']:0x0);if(_0x1345f3[_0xeff4('0x10')][_0x16af98]){_0x1345f3[_0xeff4('0x10')][_0x16af98]['emit'](_0xeff4('0x41'));if(rpc[_0x22ec51[_0xeff4('0x11')]+_0xeff4('0x42')]){rpc[_0x22ec51['channel']+_0xeff4('0x42')][_0xeff4('0x43')](_0x16af98,{'UserId':_0x22ec51['message'][_0xeff4('0x44')]})[_0xeff4('0x45')](function(){logger['error'](_0xeff4('0x46'));});}}return _0x5826cf({'code':0xc8,'message':_0x22ec51});}catch(_0x94b302){logger['error'](_0x94b302[_0xeff4('0x47')]);return _0x195f2d(_0x394076[_0xeff4('0x35')](0x1f4,_0x94b302));}}logger[_0xeff4('0x35')](_0xeff4('0x48'));return _0x195f2d(_0x394076['error'](0x1f4,_0xeff4('0x48')));});},'RejectMessage':function(_0x192fe2){var _0xb1cc76=this;return new Promise(function(_0x550f2d,_0x4802f4){if(_0x192fe2['agent']&&_0x192fe2['agent']['id']){try{if(_0x1345f3[_0xeff4('0x3e')][_0x192fe2[_0xeff4('0x3d')]['id']]){_0x1345f3[_0xeff4('0x3e')][_0x192fe2[_0xeff4('0x3d')]['id']][_0xeff4('0x3f')]=![];_0x1345f3[_0xeff4('0x3e')][_0x192fe2[_0xeff4('0x3d')]['id']]['busyQueue']=undefined;}return _0x550f2d({'code':0xc8,'message':_0x192fe2});}catch(_0x222e31){logger['error'](_0x222e31[_0xeff4('0x47')]);return _0x4802f4(_0xb1cc76[_0xeff4('0x35')](0x1f4,_0x222e31));}}logger['error'](_0xeff4('0x48'));return _0x4802f4(_0xb1cc76[_0xeff4('0x35')](0x1f4,'message\x20is\x20empty'));});},'AbandonInteraction':function(_0x3a07be){var _0x55ea70=this;return new Promise(function(_0x243aba,_0x1a3f49){if(_0x3a07be[_0xeff4('0x11')]&&_0x3a07be[_0xeff4('0x13')]&&_0x3a07be['interaction']['id']){try{var _0x399a0a=getId(_0x3a07be[_0xeff4('0x11')],_0x3a07be['message']?_0x3a07be['message']['id']:0x0,_0x3a07be[_0xeff4('0x13')]?_0x3a07be[_0xeff4('0x13')]['id']:0x0);if(_0x1345f3['rules'][_0x399a0a]){_0x1345f3[_0xeff4('0x10')][_0x399a0a][_0xeff4('0x49')](_0xeff4('0x41'));}return _0x243aba({'code':0xc8,'message':_0x3a07be});}catch(_0x4b3743){logger[_0xeff4('0x35')](_0x4b3743[_0xeff4('0x47')]);return _0x1a3f49(_0x55ea70[_0xeff4('0x35')](0x1f4,_0x4b3743));}}logger[_0xeff4('0x35')](_0xeff4('0x48'));return _0x1a3f49(_0x55ea70[_0xeff4('0x35')](0x1f4,'message\x20is\x20empty'));});},'AgentCapacity':function(_0x58c9b6){var _0x560c5a=this;return new Promise(function(_0x2ad730,_0x50cc05){if(_0x1345f3[_0xeff4('0x3e')][_0xeff4('0x4a')](_0x58c9b6['id'])){for(var _0x216908 in _0x58c9b6[_0xeff4('0x4b')]){if(_0x58c9b6['capacity'][_0xeff4('0x4a')](_0x216908)){if(_0x1345f3[_0xeff4('0x3e')][_0x58c9b6['id']]['hasOwnProperty'](_0x216908+_0xeff4('0x4c'))){_0x1345f3[_0xeff4('0x3e')][_0x58c9b6['id']][_0x216908+_0xeff4('0x4c')]=parseInt(_0x58c9b6[_0xeff4('0x4b')][_0x216908],0xa);}}}_0x1345f3['agents'][_0x58c9b6['id']]['updateRealtime']();return _0x2ad730({'code':0xc8,'message':_0x1345f3[_0xeff4('0x3e')][_0x58c9b6['id']]});}else{return _0x50cc05(_0x560c5a[_0xeff4('0x35')](0x1f4,'agent\x20not\x20found'));}});},'Agents':function(_0x7aac84){return new Promise(function(_0x5938c7){var _0x3bf42a=_[_0xeff4('0x4d')](_0x1345f3[_0xeff4('0x3e')]);if(_0x7aac84&&_0x7aac84['id']){var _0x29c869=_[_0xeff4('0x4e')](_0x3bf42a,function(_0x285930){return _0x285930['id']===_0x7aac84['id'];});_0x5938c7(_0x29c869);}else{_0x5938c7({'count':_0x3bf42a['length'],'rows':_0x3bf42a});}});},'ChatQueues':function(){return new Promise(function(_0x105227){var _0x44594a=[];for(var _0x4a1499 in _0x1345f3[_0xeff4('0x4f')]){if(_0x1345f3[_0xeff4('0x4f')][_0xeff4('0x4a')](_0x4a1499)){var _0x55d951=_0x1345f3[_0xeff4('0x4f')][_0x4a1499];var _0x16622f={'id':_0x55d951['id'],'available':_0x55d951[_0xeff4('0x50')],'loggedIn':_0x55d951[_0xeff4('0x51')],'name':_0x55d951[_0xeff4('0x52')],'paused':_0x55d951[_0xeff4('0x53')],'waiting':_0x55d951['waiting']};_0x44594a['push'](_0x16622f);}}_0x105227({'count':_0x44594a['length'],'rows':_0x44594a});});},'MailQueues':function(){return new Promise(function(_0x38500c){var _0x495071=[];for(var _0x57e9c6 in _0x1345f3[_0xeff4('0x54')]){if(_0x1345f3[_0xeff4('0x54')][_0xeff4('0x4a')](_0x57e9c6)){var _0x1384c0=_0x1345f3['mailQueues'][_0x57e9c6];var _0x4217b6={'id':_0x1384c0['id'],'available':_0x1384c0['available'],'loggedIn':_0x1384c0[_0xeff4('0x51')],'name':_0x1384c0[_0xeff4('0x52')],'paused':_0x1384c0[_0xeff4('0x53')],'waiting':_0x1384c0[_0xeff4('0x55')]};_0x495071[_0xeff4('0x1e')](_0x4217b6);}}_0x38500c({'count':_0x495071[_0xeff4('0x17')],'rows':_0x495071});});},'OpenchannelQueues':function(){return new Promise(function(_0x5b4972){var _0x54679a=[];for(var _0x40361f in _0x1345f3[_0xeff4('0x56')]){if(_0x1345f3[_0xeff4('0x56')][_0xeff4('0x4a')](_0x40361f)){var _0x535c06=_0x1345f3[_0xeff4('0x56')][_0x40361f];var _0x39a5d0={'id':_0x535c06['id'],'available':_0x535c06[_0xeff4('0x50')],'loggedIn':_0x535c06[_0xeff4('0x51')],'name':_0x535c06[_0xeff4('0x52')],'paused':_0x535c06[_0xeff4('0x53')],'waiting':_0x535c06[_0xeff4('0x55')]};_0x54679a[_0xeff4('0x1e')](_0x39a5d0);}}_0x5b4972({'count':_0x54679a[_0xeff4('0x17')],'rows':_0x54679a});});},'SmsQueues':function(){return new Promise(function(_0x36bc8c){var _0x127dd4=[];for(var _0x3d9555 in _0x1345f3['smsQueues']){if(_0x1345f3[_0xeff4('0x57')][_0xeff4('0x4a')](_0x3d9555)){var _0x1a92b1=_0x1345f3['smsQueues'][_0x3d9555];var _0x5aab75={'id':_0x1a92b1['id'],'available':_0x1a92b1['available'],'loggedIn':_0x1a92b1[_0xeff4('0x51')],'name':_0x1a92b1[_0xeff4('0x52')],'paused':_0x1a92b1[_0xeff4('0x53')],'waiting':_0x1a92b1[_0xeff4('0x55')]};_0x127dd4[_0xeff4('0x1e')](_0x5aab75);}}_0x36bc8c({'count':_0x127dd4[_0xeff4('0x17')],'rows':_0x127dd4});});},'FaxQueues':function(){return new Promise(function(_0x4578cc){var _0x5f0085=[];for(var _0xfac104 in _0x1345f3[_0xeff4('0x58')]){if(_0x1345f3[_0xeff4('0x58')][_0xeff4('0x4a')](_0xfac104)){var _0x142cf5=_0x1345f3[_0xeff4('0x58')][_0xfac104];var _0x2fee57={'id':_0x142cf5['id'],'available':_0x142cf5['available'],'loggedIn':_0x142cf5[_0xeff4('0x51')],'name':_0x142cf5[_0xeff4('0x52')],'paused':_0x142cf5['paused'],'waiting':_0x142cf5[_0xeff4('0x55')]};_0x5f0085['push'](_0x2fee57);}}_0x4578cc({'count':_0x5f0085['length'],'rows':_0x5f0085});});},'WhatsappQueues':function(){return new Promise(function(_0x517343){var _0x75721e=[];for(var _0xf1fc68 in _0x1345f3['whatsappQueues']){if(_0x1345f3['whatsappQueues'][_0xeff4('0x4a')](_0xf1fc68)){var _0x1211fc=_0x1345f3[_0xeff4('0x59')][_0xf1fc68];var _0x461b52={'id':_0x1211fc['id'],'available':_0x1211fc[_0xeff4('0x50')],'loggedIn':_0x1211fc[_0xeff4('0x51')],'name':_0x1211fc['name'],'paused':_0x1211fc[_0xeff4('0x53')],'waiting':_0x1211fc[_0xeff4('0x55')]};_0x75721e[_0xeff4('0x1e')](_0x461b52);}}_0x517343({'count':_0x75721e[_0xeff4('0x17')],'rows':_0x75721e});});},'ChatQueuesWaitingInteractions':function(){return new Promise(function(_0x2bc96d){var _0x2b3e0e=_['values'](_0x1345f3['chatQueuesWaitingInteractions']);_0x2bc96d({'count':_0x2b3e0e[_0xeff4('0x17')],'rows':_0x2b3e0e});});},'MailQueuesWaitingInteractions':function(){return new Promise(function(_0x1da6d6){var _0x318ad0=_[_0xeff4('0x4d')](_0x1345f3[_0xeff4('0x5a')]);_0x1da6d6({'count':_0x318ad0[_0xeff4('0x17')],'rows':_0x318ad0});});},'OpenchannelQueuesWaitingInteractions':function(){return new Promise(function(_0x23c1f1){var _0x2f08e6=_[_0xeff4('0x4d')](_0x1345f3[_0xeff4('0x5b')]);_0x23c1f1({'count':_0x2f08e6[_0xeff4('0x17')],'rows':_0x2f08e6});});},'SmsQueuesWaitingInteractions':function(){return new Promise(function(_0x5cd5df){var _0x2a3cc5=_[_0xeff4('0x4d')](_0x1345f3[_0xeff4('0x5c')]);_0x5cd5df({'count':_0x2a3cc5[_0xeff4('0x17')],'rows':_0x2a3cc5});});},'FaxQueuesWaitingInteractions':function(){return new Promise(function(_0x5255b4){var _0x33ee26=_[_0xeff4('0x4d')](_0x1345f3['faxQueuesWaitingInteractions']);_0x5255b4({'count':_0x33ee26[_0xeff4('0x17')],'rows':_0x33ee26});});},'WhatsappQueuesWaitingInteractions':function(){return new Promise(function(_0x42ab4f){var _0xaddc70=_[_0xeff4('0x4d')](_0x1345f3[_0xeff4('0x5d')]);_0x42ab4f({'count':_0xaddc70['length'],'rows':_0xaddc70});});}};var _0x396667=jayson[_0xeff4('0x5e')](_0x3db07c)[_0xeff4('0x5f')]();_0x396667['on']('error',function(_0xea1b28){logger['error'](JSON[_0xeff4('0x39')](_0xea1b28));return _0xde81cd(_0xea1b28);});_0x396667['listen'](0x232c,_0xeff4('0x60'),function(){console[_0xeff4('0x61')]('Routing\x20RPC\x20server\x20listening\x20on\x20127.0.0.1:%d!',0x232c);return _0x514d16(_0xeff4('0x62')+0x232c);});});}; \ No newline at end of file +var _0xb400=['mail','push','slice','dialogflowv2','split','amazonlex','tag','TagId','tvox','getMustacheRender','account','ChatWebsiteId','ContactId','body','%s:%s:%s','./interval','intervals','./applications/','consequence','info','on\x20interval','\x20|\x20','error','Please\x20create\x20a\x20new\x20file\x20under','execute','Applications\x20executed','stringify','matchPath','emit','complete','Skipped\x20routing\x20for\x20%s','No\x20applications\x20to\x20execute','stack','routing\x20is\x20empty','agent','agents','busy','end','QueueReport','update','UserId','catch','message\x20is\x20empty','busyQueue','hasOwnProperty','capacity','updateRealtime','values','find','chatQueues','loggedIn','name','paused','waiting','mailQueues','available','openchannelQueues','smsQueues','faxQueues','whatsappQueues','chatQueuesWaitingInteractions','mailQueuesWaitingInteractions','openchannelQueuesWaitingInteractions','smsQueuesWaitingInteractions','whatsappQueuesWaitingInteractions','http','127.0.0.1','log','RPC\x20listening\x20on\x20port:','util','jayson/promise','bluebird','./applications/utils','./applications/strategy/util','../../../config/logger','routing','../rpc/openchannelQueueReport','../rpc/mailQueueReport','../rpc/smsQueueReport','../rpc/faxQueueReport','../lib/rule-engine','format','%s.%s.%s','isNil','IntervalId','Intervals','interval','listen','rules','channel','message','interaction','checkWaitingNotifications','applications','length','existsSync','join','app','.js','toLowerCase','autoreply','appdata'];(function(_0x1589dd,_0x2b9d22){var _0x1bddd1=function(_0x3687f8){while(--_0x3687f8){_0x1589dd['push'](_0x1589dd['shift']());}};_0x1bddd1(++_0x2b9d22);}(_0xb400,0x1dd));var _0x0b40=function(_0xc0fc7c,_0x23edd3){_0xc0fc7c=_0xc0fc7c-0x0;var _0x2657fe=_0xb400[_0xc0fc7c];return _0x2657fe;};'use strict';var _=require('lodash');var util=require(_0x0b40('0x0'));var path=require('path');var fs=require('fs');var jayson=require(_0x0b40('0x1'));var BPromise=require(_0x0b40('0x2'));var utils=require(_0x0b40('0x3'));var sUtils=require(_0x0b40('0x4'));var logger=require(_0x0b40('0x5'))(_0x0b40('0x6'));var rpc={'openchannelQueueReport':require(_0x0b40('0x7')),'mailQueueReport':require(_0x0b40('0x8')),'chatQueueReport':require('../rpc/chatQueueReport'),'smsQueueReport':require(_0x0b40('0x9')),'faxQueueReport':require(_0x0b40('0xa')),'whatsappQueueReport':require('../rpc/whatsappQueueReport')};var RuleEngine=require(_0x0b40('0xb'));function getId(_0x1a4d9f,_0x3d0608,_0x4773c5){return util[_0x0b40('0xc')](_0x0b40('0xd'),_0x1a4d9f,_0x3d0608||0x0,_0x4773c5||0x0);}function getIntervals(_0x3a0f13,_0x49e800){var _0x5fa1aa=[];if(!_[_0x0b40('0xe')](_0x49e800[_0x0b40('0xf')])&&!_[_0x0b40('0xe')](_0x3a0f13[_0x49e800[_0x0b40('0xf')]])&&!_[_0x0b40('0xe')](_0x3a0f13[_0x49e800[_0x0b40('0xf')]][_0x0b40('0x10')])){_0x5fa1aa=_['map'](_0x3a0f13[_0x49e800[_0x0b40('0xf')]][_0x0b40('0x10')],_0x0b40('0x11'));}else if(!_[_0x0b40('0xe')](_0x49e800[_0x0b40('0x11')])){_0x5fa1aa=[_0x49e800[_0x0b40('0x11')]];}return _0x5fa1aa;}exports[_0x0b40('0x12')]=function(_0x18180e){_0x18180e[_0x0b40('0x13')]={};return new BPromise(function(_0x21717c,_0xbd784e){var _0x150a5f={'Start':function(_0x507dd0){var _0x5052a6=this;return new Promise(function(_0x367cd9,_0x45f4a5){if(_0x507dd0){try{var _0x2b8466=[];var _0xe82744=getId(_0x507dd0[_0x0b40('0x14')],_0x507dd0[_0x0b40('0x15')]?_0x507dd0['message']['id']:0x0,_0x507dd0[_0x0b40('0x16')]?_0x507dd0[_0x0b40('0x16')]['id']:0x0);var _0x470417=sUtils[_0x0b40('0x17')](_0x18180e,_0x507dd0);if(!_0x470417&&_0x507dd0[_0x0b40('0x18')]&&_['isArray'](_0x507dd0[_0x0b40('0x18')])&&_0x507dd0[_0x0b40('0x18')][_0x0b40('0x19')]){for(var _0x400f31=0x0;_0x400f31<_0x507dd0[_0x0b40('0x18')][_0x0b40('0x19')];_0x400f31+=0x1){var _0x2638ba=_0x507dd0['applications'][_0x400f31];if(fs[_0x0b40('0x1a')](path[_0x0b40('0x1b')](__dirname,'applications',_0x2638ba[_0x0b40('0x1c')]+_0x0b40('0x1d')))){var _0x14b122=[];switch(_0x2638ba[_0x0b40('0x1c')][_0x0b40('0x1e')]()){case _0x0b40('0x1f'):var _0x1d2eec=_0x2638ba[_0x0b40('0x20')]['split'](',');if(_0x507dd0[_0x0b40('0x14')]===_0x0b40('0x21')){_0x14b122[_0x0b40('0x22')](_0x1d2eec[0x0]);_0x14b122[_0x0b40('0x22')](_0x1d2eec[0x1]);_0x14b122['push'](_0x1d2eec[_0x0b40('0x23')](0x2,_0x1d2eec[_0x0b40('0x19')])[_0x0b40('0x1b')](','));}else{_0x14b122['push'](_0x1d2eec[0x0]);_0x14b122['push'](_0x1d2eec['slice'](0x1,_0x1d2eec[_0x0b40('0x19')])[_0x0b40('0x1b')](','));}break;case'dialogflow':var _0x5a1b77=_0x2638ba[_0x0b40('0x20')]['split'](',');_0x14b122[_0x0b40('0x22')](_0x5a1b77[0x0]);_0x14b122[_0x0b40('0x22')](_0x5a1b77[0x1]);_0x14b122[_0x0b40('0x22')](_0x5a1b77[_0x0b40('0x23')](0x2,_0x5a1b77['length'])[_0x0b40('0x1b')](','));break;case _0x0b40('0x24'):var _0x5b26b9=_0x2638ba[_0x0b40('0x20')][_0x0b40('0x25')](',');_0x14b122[_0x0b40('0x22')](_0x5b26b9[0x0]);_0x14b122[_0x0b40('0x22')](_0x5b26b9[0x1]);_0x14b122[_0x0b40('0x22')](_0x5b26b9[0x2]);_0x14b122['push'](_0x5b26b9[0x3]);_0x14b122[_0x0b40('0x22')](_0x5b26b9[_0x0b40('0x23')](0x4,_0x5b26b9[_0x0b40('0x19')])[_0x0b40('0x1b')](','));break;case _0x0b40('0x26'):var _0x3dc3b0=_0x2638ba[_0x0b40('0x20')][_0x0b40('0x25')](',');_0x14b122[_0x0b40('0x22')](_0x3dc3b0[0x0]);_0x14b122[_0x0b40('0x22')](_0x3dc3b0[0x1]);_0x14b122[_0x0b40('0x22')](_0x3dc3b0[0x2]);_0x14b122[_0x0b40('0x22')](_0x3dc3b0[0x3]);_0x14b122[_0x0b40('0x22')](_0x3dc3b0[_0x0b40('0x23')](0x4,_0x3dc3b0['length'])[_0x0b40('0x1b')](','));break;case'message':_0x14b122[_0x0b40('0x22')](_0x2638ba[_0x0b40('0x20')]);break;case _0x0b40('0x27'):_0x14b122['push'](_0x2638ba[_0x0b40('0x28')]);_0x14b122[_0x0b40('0x22')](_0x2638ba[_0x0b40('0x20')]);break;case _0x0b40('0x29'):var _0x2614fe=utils[_0x0b40('0x2a')](_0x507dd0[_0x0b40('0x2b')]['notificationTemplate'],_0x507dd0);var _0x226c39=_0x2638ba[_0x0b40('0x20')]['split'](',');_0x14b122['push'](_0x226c39[0x0]);_0x14b122[_0x0b40('0x22')](_0x226c39[0x1]);_0x14b122[_0x0b40('0x22')](_0x226c39[0x2]);_0x14b122[_0x0b40('0x22')](_0x226c39[0x3]);_0x14b122[_0x0b40('0x22')](_0x226c39[0x4]);_0x14b122[_0x0b40('0x22')](_0x226c39[0x5]);_0x14b122[_0x0b40('0x22')](_0x226c39[0x6]);_0x14b122[_0x0b40('0x22')](_0x226c39[0x7]);_0x14b122[_0x0b40('0x22')](_0x226c39[0x8]);_0x14b122[_0x0b40('0x22')](_0x226c39[0x9]);_0x14b122['push'](_0x226c39[0xa]);_0x14b122['push'](_0x507dd0[_0x0b40('0x16')]['id']);_0x14b122[_0x0b40('0x22')](_0x507dd0[_0x0b40('0x15')]['id']);_0x14b122['push'](_0x2638ba[_0x0b40('0x2c')]);_0x14b122[_0x0b40('0x22')](_0x507dd0[_0x0b40('0x16')][_0x0b40('0x2d')]);_0x14b122[_0x0b40('0x22')](_0x507dd0[_0x0b40('0x2e')][_0x0b40('0x2e')]);_0x14b122[_0x0b40('0x22')](_0x2614fe);break;default:_0x14b122=_[_0x0b40('0xe')](_0x2638ba['appdata'])?[]:_0x2638ba[_0x0b40('0x20')][_0x0b40('0x25')](',');}var _0x2e64b7={'id':util[_0x0b40('0xc')](_0x0b40('0x2f'),_0xe82744,_0x2638ba['id'],_0x2638ba[_0x0b40('0x1c')]),'condition':require(_0x0b40('0x30'))['condition'](_0xe82744,getIntervals(_0x18180e[_0x0b40('0x31')],_0x2638ba),_0x18180e),'consequence':require(_0x0b40('0x32')+_0x2638ba['app'])[_0x0b40('0x33')](_0xe82744,_0x14b122,_0x18180e,_0x507dd0),'p':_0x2638ba['priority']||0x0};logger[_0x0b40('0x34')]('Push\x20new\x20rule',_0x2e64b7['id'],_0x0b40('0x35'),getIntervals(_0x18180e[_0x0b40('0x31')],_0x2638ba)[_0x0b40('0x1b')](_0x0b40('0x36')));_0x2b8466[_0x0b40('0x22')](_0x2e64b7);}else{logger[_0x0b40('0x37')](_0x0b40('0x38'),path[_0x0b40('0x1b')](__dirname,'applications',_0x2638ba[_0x0b40('0x1c')]+_0x0b40('0x1d')));}}_0x18180e['rules'][_0xe82744]=new RuleEngine(_0x2b8466);_0x18180e['rules'][_0xe82744][_0x0b40('0x39')](_0x507dd0,function(_0x18ffaf){logger[_0x0b40('0x34')](_0x0b40('0x3a'),JSON[_0x0b40('0x3b')](_0x18ffaf[_0x0b40('0x3c')]));if(_0x18180e[_0x0b40('0x13')][_0xe82744]){_0x18180e['rules'][_0xe82744][_0x0b40('0x3d')](_0x0b40('0x3e'));}});return _0x367cd9({'code':0xc8,'message':_0x507dd0});}else{if(_0x470417){logger[_0x0b40('0x34')](util[_0x0b40('0xc')](_0x0b40('0x3f'),_0xe82744));}else{logger['info'](_0x0b40('0x40'));}return _0x367cd9({'code':0xc8,'message':_0x507dd0});}}catch(_0x187497){logger[_0x0b40('0x37')](_0x187497[_0x0b40('0x41')]);return _0x45f4a5(_0x5052a6['error'](0x1f4,_0x187497));}}return _0x45f4a5(_0x0b40('0x42'));});},'AcceptMessage':function(_0x33eb20){var _0x291026=this;return new Promise(function(_0x32bff1,_0x5eb7ec){if(_0x33eb20[_0x0b40('0x43')]&&_0x33eb20[_0x0b40('0x43')]['id']){if(_0x18180e[_0x0b40('0x44')][_0x33eb20[_0x0b40('0x43')]['id']]){_0x18180e['agents'][_0x33eb20[_0x0b40('0x43')]['id']][_0x0b40('0x45')]=![];_0x18180e[_0x0b40('0x44')][_0x33eb20[_0x0b40('0x43')]['id']]['busyQueue']=undefined;}}if(_0x33eb20[_0x0b40('0x15')]&&_0x33eb20['message']['id']){try{var _0x4ce19a=getId(_0x33eb20[_0x0b40('0x14')],_0x33eb20[_0x0b40('0x15')]?_0x33eb20[_0x0b40('0x15')]['id']:0x0,_0x33eb20['interaction']?_0x33eb20['interaction']['id']:0x0);if(_0x18180e['rules'][_0x4ce19a]){_0x18180e[_0x0b40('0x13')][_0x4ce19a][_0x0b40('0x3d')](_0x0b40('0x46'));if(rpc[_0x33eb20[_0x0b40('0x14')]+_0x0b40('0x47')]){rpc[_0x33eb20['channel']+_0x0b40('0x47')][_0x0b40('0x48')](_0x4ce19a,{'UserId':_0x33eb20[_0x0b40('0x15')][_0x0b40('0x49')]})[_0x0b40('0x4a')](function(){logger[_0x0b40('0x37')]('error\x20update\x20queue\x20report');});}}return _0x32bff1({'code':0xc8,'message':_0x33eb20});}catch(_0x40f6ea){logger['error'](_0x40f6ea[_0x0b40('0x41')]);return _0x5eb7ec(_0x291026['error'](0x1f4,_0x40f6ea));}}logger[_0x0b40('0x37')](_0x0b40('0x4b'));return _0x5eb7ec(_0x291026[_0x0b40('0x37')](0x1f4,_0x0b40('0x4b')));});},'RejectMessage':function(_0x21ed4f){var _0x2c2b01=this;return new Promise(function(_0x13d77a,_0x460535){if(_0x21ed4f['agent']&&_0x21ed4f[_0x0b40('0x43')]['id']){try{if(_0x18180e['agents'][_0x21ed4f['agent']['id']]){_0x18180e[_0x0b40('0x44')][_0x21ed4f['agent']['id']][_0x0b40('0x45')]=![];_0x18180e[_0x0b40('0x44')][_0x21ed4f[_0x0b40('0x43')]['id']][_0x0b40('0x4c')]=undefined;}return _0x13d77a({'code':0xc8,'message':_0x21ed4f});}catch(_0x28c021){logger['error'](_0x28c021['stack']);return _0x460535(_0x2c2b01['error'](0x1f4,_0x28c021));}}logger['error'](_0x0b40('0x4b'));return _0x460535(_0x2c2b01[_0x0b40('0x37')](0x1f4,'message\x20is\x20empty'));});},'AbandonInteraction':function(_0x12527a){var _0x4727d1=this;return new Promise(function(_0x52bf0b,_0x28e429){if(_0x12527a[_0x0b40('0x14')]&&_0x12527a[_0x0b40('0x16')]&&_0x12527a[_0x0b40('0x16')]['id']){try{var _0xee329b=getId(_0x12527a[_0x0b40('0x14')],_0x12527a[_0x0b40('0x15')]?_0x12527a[_0x0b40('0x15')]['id']:0x0,_0x12527a['interaction']?_0x12527a[_0x0b40('0x16')]['id']:0x0);if(_0x18180e[_0x0b40('0x13')][_0xee329b]){_0x18180e[_0x0b40('0x13')][_0xee329b][_0x0b40('0x3d')](_0x0b40('0x46'));}return _0x52bf0b({'code':0xc8,'message':_0x12527a});}catch(_0x4d8632){logger[_0x0b40('0x37')](_0x4d8632['stack']);return _0x28e429(_0x4727d1['error'](0x1f4,_0x4d8632));}}logger['error'](_0x0b40('0x4b'));return _0x28e429(_0x4727d1[_0x0b40('0x37')](0x1f4,_0x0b40('0x4b')));});},'AgentCapacity':function(_0x398736){var _0x55da8c=this;return new Promise(function(_0x5bce50,_0x1d17ed){if(_0x18180e[_0x0b40('0x44')][_0x0b40('0x4d')](_0x398736['id'])){for(var _0x5acdcd in _0x398736[_0x0b40('0x4e')]){if(_0x398736[_0x0b40('0x4e')][_0x0b40('0x4d')](_0x5acdcd)){if(_0x18180e[_0x0b40('0x44')][_0x398736['id']][_0x0b40('0x4d')](_0x5acdcd+'CurrentCapacity')){_0x18180e[_0x0b40('0x44')][_0x398736['id']][_0x5acdcd+'CurrentCapacity']=parseInt(_0x398736[_0x0b40('0x4e')][_0x5acdcd],0xa);}}}_0x18180e[_0x0b40('0x44')][_0x398736['id']][_0x0b40('0x4f')]();return _0x5bce50({'code':0xc8,'message':_0x18180e[_0x0b40('0x44')][_0x398736['id']]});}else{return _0x1d17ed(_0x55da8c[_0x0b40('0x37')](0x1f4,'agent\x20not\x20found'));}});},'Agents':function(_0x572116){return new Promise(function(_0x184075){var _0x417a27=_[_0x0b40('0x50')](_0x18180e[_0x0b40('0x44')]);if(_0x572116&&_0x572116['id']){var _0x1b3952=_[_0x0b40('0x51')](_0x417a27,function(_0x58820c){return _0x58820c['id']===_0x572116['id'];});_0x184075(_0x1b3952);}else{_0x184075({'count':_0x417a27[_0x0b40('0x19')],'rows':_0x417a27});}});},'ChatQueues':function(){return new Promise(function(_0xc76fb3){var _0x527714=[];for(var _0x3bc462 in _0x18180e[_0x0b40('0x52')]){if(_0x18180e[_0x0b40('0x52')][_0x0b40('0x4d')](_0x3bc462)){var _0x59b327=_0x18180e[_0x0b40('0x52')][_0x3bc462];var _0x331fe={'id':_0x59b327['id'],'available':_0x59b327['available'],'loggedIn':_0x59b327[_0x0b40('0x53')],'name':_0x59b327[_0x0b40('0x54')],'paused':_0x59b327[_0x0b40('0x55')],'waiting':_0x59b327[_0x0b40('0x56')]};_0x527714[_0x0b40('0x22')](_0x331fe);}}_0xc76fb3({'count':_0x527714['length'],'rows':_0x527714});});},'MailQueues':function(){return new Promise(function(_0x441992){var _0x3f452b=[];for(var _0x5518e3 in _0x18180e[_0x0b40('0x57')]){if(_0x18180e['mailQueues']['hasOwnProperty'](_0x5518e3)){var _0x42ebd4=_0x18180e[_0x0b40('0x57')][_0x5518e3];var _0x2f245e={'id':_0x42ebd4['id'],'available':_0x42ebd4[_0x0b40('0x58')],'loggedIn':_0x42ebd4[_0x0b40('0x53')],'name':_0x42ebd4[_0x0b40('0x54')],'paused':_0x42ebd4['paused'],'waiting':_0x42ebd4['waiting']};_0x3f452b[_0x0b40('0x22')](_0x2f245e);}}_0x441992({'count':_0x3f452b[_0x0b40('0x19')],'rows':_0x3f452b});});},'OpenchannelQueues':function(){return new Promise(function(_0xad11dc){var _0x36c3bf=[];for(var _0x39721d in _0x18180e[_0x0b40('0x59')]){if(_0x18180e['openchannelQueues'][_0x0b40('0x4d')](_0x39721d)){var _0xbc6252=_0x18180e[_0x0b40('0x59')][_0x39721d];var _0x2b9147={'id':_0xbc6252['id'],'available':_0xbc6252[_0x0b40('0x58')],'loggedIn':_0xbc6252[_0x0b40('0x53')],'name':_0xbc6252[_0x0b40('0x54')],'paused':_0xbc6252['paused'],'waiting':_0xbc6252['waiting']};_0x36c3bf[_0x0b40('0x22')](_0x2b9147);}}_0xad11dc({'count':_0x36c3bf['length'],'rows':_0x36c3bf});});},'SmsQueues':function(){return new Promise(function(_0x19165c){var _0x4e6bd6=[];for(var _0x37cb02 in _0x18180e[_0x0b40('0x5a')]){if(_0x18180e[_0x0b40('0x5a')][_0x0b40('0x4d')](_0x37cb02)){var _0x2743c4=_0x18180e[_0x0b40('0x5a')][_0x37cb02];var _0x5632c8={'id':_0x2743c4['id'],'available':_0x2743c4[_0x0b40('0x58')],'loggedIn':_0x2743c4['loggedIn'],'name':_0x2743c4['name'],'paused':_0x2743c4[_0x0b40('0x55')],'waiting':_0x2743c4[_0x0b40('0x56')]};_0x4e6bd6[_0x0b40('0x22')](_0x5632c8);}}_0x19165c({'count':_0x4e6bd6[_0x0b40('0x19')],'rows':_0x4e6bd6});});},'FaxQueues':function(){return new Promise(function(_0x4a88ee){var _0xae232e=[];for(var _0x5ccc29 in _0x18180e[_0x0b40('0x5b')]){if(_0x18180e[_0x0b40('0x5b')][_0x0b40('0x4d')](_0x5ccc29)){var _0x589427=_0x18180e[_0x0b40('0x5b')][_0x5ccc29];var _0x2bcc7e={'id':_0x589427['id'],'available':_0x589427[_0x0b40('0x58')],'loggedIn':_0x589427['loggedIn'],'name':_0x589427[_0x0b40('0x54')],'paused':_0x589427[_0x0b40('0x55')],'waiting':_0x589427['waiting']};_0xae232e[_0x0b40('0x22')](_0x2bcc7e);}}_0x4a88ee({'count':_0xae232e[_0x0b40('0x19')],'rows':_0xae232e});});},'WhatsappQueues':function(){return new Promise(function(_0x5c2318){var _0x13bcb7=[];for(var _0x40698d in _0x18180e[_0x0b40('0x5c')]){if(_0x18180e[_0x0b40('0x5c')]['hasOwnProperty'](_0x40698d)){var _0xb5b37d=_0x18180e[_0x0b40('0x5c')][_0x40698d];var _0x39a15d={'id':_0xb5b37d['id'],'available':_0xb5b37d['available'],'loggedIn':_0xb5b37d[_0x0b40('0x53')],'name':_0xb5b37d['name'],'paused':_0xb5b37d[_0x0b40('0x55')],'waiting':_0xb5b37d['waiting']};_0x13bcb7[_0x0b40('0x22')](_0x39a15d);}}_0x5c2318({'count':_0x13bcb7[_0x0b40('0x19')],'rows':_0x13bcb7});});},'ChatQueuesWaitingInteractions':function(){return new Promise(function(_0x33305a){var _0x49fbc8=_[_0x0b40('0x50')](_0x18180e[_0x0b40('0x5d')]);_0x33305a({'count':_0x49fbc8[_0x0b40('0x19')],'rows':_0x49fbc8});});},'MailQueuesWaitingInteractions':function(){return new Promise(function(_0x4d7603){var _0x43d231=_[_0x0b40('0x50')](_0x18180e[_0x0b40('0x5e')]);_0x4d7603({'count':_0x43d231[_0x0b40('0x19')],'rows':_0x43d231});});},'OpenchannelQueuesWaitingInteractions':function(){return new Promise(function(_0x11fadd){var _0x1b73b2=_['values'](_0x18180e[_0x0b40('0x5f')]);_0x11fadd({'count':_0x1b73b2[_0x0b40('0x19')],'rows':_0x1b73b2});});},'SmsQueuesWaitingInteractions':function(){return new Promise(function(_0x14ae7e){var _0x17ff70=_['values'](_0x18180e[_0x0b40('0x60')]);_0x14ae7e({'count':_0x17ff70[_0x0b40('0x19')],'rows':_0x17ff70});});},'FaxQueuesWaitingInteractions':function(){return new Promise(function(_0x5dabc2){var _0x11f997=_['values'](_0x18180e['faxQueuesWaitingInteractions']);_0x5dabc2({'count':_0x11f997[_0x0b40('0x19')],'rows':_0x11f997});});},'WhatsappQueuesWaitingInteractions':function(){return new Promise(function(_0x43f512){var _0x313d57=_[_0x0b40('0x50')](_0x18180e[_0x0b40('0x61')]);_0x43f512({'count':_0x313d57['length'],'rows':_0x313d57});});}};var _0x261a56=jayson['server'](_0x150a5f)[_0x0b40('0x62')]();_0x261a56['on']('error',function(_0x26a264){logger[_0x0b40('0x37')](JSON[_0x0b40('0x3b')](_0x26a264));return _0xbd784e(_0x26a264);});_0x261a56[_0x0b40('0x12')](0x232c,_0x0b40('0x63'),function(){console[_0x0b40('0x64')]('Routing\x20RPC\x20server\x20listening\x20on\x20127.0.0.1:%d!',0x232c);return _0x21717c(_0x0b40('0x65')+0x232c);});});}; \ No newline at end of file diff --git a/server/services/routing/server/interval.js b/server/services/routing/server/interval.js index 1612cde..8580691 100644 --- a/server/services/routing/server/interval.js +++ b/server/services/routing/server/interval.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xfbbb=['stop','length','push','Command','iftime\x20%s','indexOf','true','[%s][INTERVAL]\x20%s','all','\x20|\x20','when','log','[%s][INTERVAL]\x20%s\x20%s','join','stack','jayson/promise','../../../config/logger','client','http','request','then','error','message','catch','condition','rules','info','[%s][INTERVAL]\x20ROUTING\x20STOPPED'];(function(_0xca465b,_0x470663){var _0x3d988d=function(_0x2d2e1f){while(--_0x2d2e1f){_0xca465b['push'](_0xca465b['shift']());}};_0x3d988d(++_0x470663);}(_0xfbbb,0x1b3));var _0xbfbb=function(_0x5ba304,_0x4c97c9){_0x5ba304=_0x5ba304-0x0;var _0x1fa547=_0xfbbb[_0x5ba304];return _0x1fa547;};'use strict';var util=require('util');var BPromise=require('bluebird');var jayson=require(_0xbfbb('0x0'));var _=require('lodash');var logger=require(_0xbfbb('0x1'))('routing');var client=jayson[_0xbfbb('0x2')][_0xbfbb('0x3')]({'port':0x232a});function request(_0x5299a4,_0x57a678){return new BPromise(function(_0x3b9ef6,_0x8140a){return client[_0xbfbb('0x4')](_0x5299a4,_0x57a678)[_0xbfbb('0x5')](function(_0x4c828e){if(_0x4c828e[_0xbfbb('0x6')]){return _0x8140a(_0x4c828e[_0xbfbb('0x6')][_0xbfbb('0x7')]);}else{return _0x3b9ef6(_0x4c828e['result']);}})[_0xbfbb('0x8')](function(_0xbf41a){return _0x8140a(_0xbf41a);});});}exports[_0xbfbb('0x9')]=function(_0x22d09c,_0x2382e0,_0x1ecce){return function(_0x1affba){if(_0x1ecce['rules']&&!_0x1ecce[_0xbfbb('0xa')][_0x22d09c]){logger[_0xbfbb('0xb')](_0xbfbb('0xc'),_0x22d09c);return _0x1affba[_0xbfbb('0xd')]();}var _0x54f84b=[];for(var _0x3dee07=0x0;_0x3dee07<_0x2382e0[_0xbfbb('0xe')];_0x3dee07+=0x1){_0x54f84b[_0xbfbb('0xf')](request(_0xbfbb('0x10'),{'command':util['format'](_0xbfbb('0x11'),_0x2382e0[_0x3dee07])})[_0xbfbb('0x5')](function(_0x194b7c){return _0x194b7c&&_0x194b7c[_0xbfbb('0x7')]&&_0x194b7c[_0xbfbb('0x7')][_0xbfbb('0x12')](_0xbfbb('0x13'))>=0x0?!![]:![];})[_0xbfbb('0x8')](function(_0x203807){logger['error'](_0xbfbb('0x14'),_0x22d09c,_0x2382e0[_0x3dee07]);}));}BPromise[_0xbfbb('0x15')](_0x54f84b)[_0xbfbb('0x5')](function(_0x2dcb40){var _0xfde049=_['some'](_0x2dcb40);logger[_0xbfbb('0xb')]('[%s][INTERVAL]\x20%s\x20%s',_0x22d09c,_0x2382e0['join'](_0xbfbb('0x16')),_0xfde049);_0x1affba[_0xbfbb('0x17')](_0xfde049);})[_0xbfbb('0x8')](function(_0x5edb97){console[_0xbfbb('0x18')](_0x5edb97);logger[_0xbfbb('0x6')](_0xbfbb('0x19'),_0x22d09c,_0x2382e0[_0xbfbb('0x1a')](_0xbfbb('0x16')),_0x5edb97[_0xbfbb('0x1b')]);_0x1affba[_0xbfbb('0xd')]();});};}; \ No newline at end of file +var _0xb094=['stack','bluebird','jayson/promise','lodash','../../../config/logger','routing','http','request','then','error','message','result','catch','condition','rules','stop','length','push','Command','format','iftime\x20%s','[%s][INTERVAL]\x20%s','all','some','info','[%s][INTERVAL]\x20%s\x20%s','join','\x20|\x20','when','log'];(function(_0x618414,_0x1a7a60){var _0x21c19a=function(_0x507b17){while(--_0x507b17){_0x618414['push'](_0x618414['shift']());}};_0x21c19a(++_0x1a7a60);}(_0xb094,0x14b));var _0x4b09=function(_0x159a52,_0x366dc4){_0x159a52=_0x159a52-0x0;var _0x4e1f3f=_0xb094[_0x159a52];return _0x4e1f3f;};'use strict';var util=require('util');var BPromise=require(_0x4b09('0x0'));var jayson=require(_0x4b09('0x1'));var _=require(_0x4b09('0x2'));var logger=require(_0x4b09('0x3'))(_0x4b09('0x4'));var client=jayson['client'][_0x4b09('0x5')]({'port':0x232a});function request(_0x5128c4,_0xb5149c){return new BPromise(function(_0x5d09f0,_0x5e8c0c){return client[_0x4b09('0x6')](_0x5128c4,_0xb5149c)[_0x4b09('0x7')](function(_0x3d3867){if(_0x3d3867[_0x4b09('0x8')]){return _0x5e8c0c(_0x3d3867[_0x4b09('0x8')][_0x4b09('0x9')]);}else{return _0x5d09f0(_0x3d3867[_0x4b09('0xa')]);}})[_0x4b09('0xb')](function(_0x3a7fc9){return _0x5e8c0c(_0x3a7fc9);});});}exports[_0x4b09('0xc')]=function(_0x34152c,_0x3cffd4,_0x4dca41){return function(_0x4f61ab){if(_0x4dca41[_0x4b09('0xd')]&&!_0x4dca41[_0x4b09('0xd')][_0x34152c]){logger['info']('[%s][INTERVAL]\x20ROUTING\x20STOPPED',_0x34152c);return _0x4f61ab[_0x4b09('0xe')]();}var _0x558758=[];for(var _0x560f29=0x0;_0x560f29<_0x3cffd4[_0x4b09('0xf')];_0x560f29+=0x1){_0x558758[_0x4b09('0x10')](request(_0x4b09('0x11'),{'command':util[_0x4b09('0x12')](_0x4b09('0x13'),_0x3cffd4[_0x560f29])})[_0x4b09('0x7')](function(_0x39715b){return _0x39715b&&_0x39715b['message']&&_0x39715b[_0x4b09('0x9')]['indexOf']('true')>=0x0?!![]:![];})[_0x4b09('0xb')](function(_0x4d5530){logger[_0x4b09('0x8')](_0x4b09('0x14'),_0x34152c,_0x3cffd4[_0x560f29]);}));}BPromise[_0x4b09('0x15')](_0x558758)[_0x4b09('0x7')](function(_0x5ed7e3){var _0x4723e3=_[_0x4b09('0x16')](_0x5ed7e3);logger[_0x4b09('0x17')](_0x4b09('0x18'),_0x34152c,_0x3cffd4[_0x4b09('0x19')](_0x4b09('0x1a')),_0x4723e3);_0x4f61ab[_0x4b09('0x1b')](_0x4723e3);})[_0x4b09('0xb')](function(_0x553ba3){console[_0x4b09('0x1c')](_0x553ba3);logger['error'](_0x4b09('0x18'),_0x34152c,_0x3cffd4[_0x4b09('0x19')]('\x20|\x20'),_0x553ba3[_0x4b09('0x1d')]);_0x4f61ab['stop']();});};}; \ No newline at end of file diff --git a/server/services/xdr/agents.controller.js b/server/services/xdr/agents.controller.js index 3b4ce05..4410af4 100644 --- a/server/services/xdr/agents.controller.js +++ b/server/services/xdr/agents.controller.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x41bb=['transferexten','extension','transferuniqueid','attendedtransfer','[%s][agents][attendedtransfer]','origtransfereruniqueid','origtransfererlinkedid','secondtransfereruniqueid','[%s][agents][attendedtransfer]\x20agent:%s','ATTENDED','origtransfererexten','transfereeuniqueid','agententerreason','calleridnum','calleridname','secondtransfererlinkedid','transfertargetuniqueid','clone','hangup','rejected','[%s][agents][hangup]\x20agent:%s\x20reason:%s\x20lastevent:%s','indexOf','splice','complete','[%s][agents][hangup]','lodash','util','info','format','[%s][agents][writeDB]\x20channel:%s\x20queue:%s\x20agent:%s\x20interface:%s\x20calleridnum:%s\x20connectedlinenum:%s\x20lastevent:%s','uniqueid','queue','membername','interface','getVoiceQueueByName','then','type','agentacw','agentcomplete','acw','request','CreateVoiceAgentReport','agentcalled','debug','[%s][agents][agentcalled]','agentcalledAt','now','destuniqueid','lastevent','called','connectedlinenum','connectedlinename','[%s][agents][agentcalled]\x20agent:%s\x20destuniqueid:%s\x20lastevent:called','isNil','[%s][agents][agentringnoanswer]','[%s][agents][agentringnoanswer]\x20agent:%s\x20destuniqueid:%s\x20lastevent:timeout','agentringnoanswerAt','timeout','ringtime','talktime','push','error','[%s][agents][queuecallerabandon]','[%s][agents][queuecallerabandon]\x20agent:%s\x20destuniqueid:%s\x20lastevent:abandoned','agentringnoanswer','abandoned','holdtime','agentconnect','[%s][agents][agentconnect]','agentconnectAt','connect','forIn','answered_elsewhere','reason','answeredelsewheremembername','[%s][agents][agentcomplete]','[%s][agents][agentcomplete]\x20agent:%s\x20destuniqueid:%s\x20lastevent:complete','diffTime','agentcompleteAt','blindtransfer','transfereruniqueid','[%s][agents][blindtransfer]','[%s][agents][blindtransfer]\x20agent:%s\x20transferuniqueid:%s','transfer','transfertype','blind'];(function(_0x4aab52,_0x305af3){var _0x41dff9=function(_0x22623f){while(--_0x22623f){_0x4aab52['push'](_0x4aab52['shift']());}};_0x41dff9(++_0x305af3);}(_0x41bb,0xc5));var _0xb41b=function(_0x58622a,_0x4ad356){_0x58622a=_0x58622a-0x0;var _0x2888db=_0x41bb[_0x58622a];return _0x2888db;};'use strict';var _=require(_0xb41b('0x0'));var util=require(_0xb41b('0x1'));var utils=require('./utils');var agents={};var transfers={};var unanswered=[];function writeDB(_0x428431,_0x4d5578){utils[_0xb41b('0x2')](util[_0xb41b('0x3')](_0xb41b('0x4'),_0x428431[_0xb41b('0x5')],_0x428431['channel'],_0x428431[_0xb41b('0x6')],_0x428431[_0xb41b('0x7')],_0x428431[_0xb41b('0x8')],_0x428431['calleridnum'],_0x428431['connectedlinenum'],_0x428431['lastevent']));if(_0x428431[_0xb41b('0x6')]){utils[_0xb41b('0x9')](_0x428431['queue'])[_0xb41b('0xa')](function(_0x2c1a53){if(_0x2c1a53){_0x428431[_0xb41b('0xb')]=_0x2c1a53[_0xb41b('0xb')];_0x428431[_0xb41b('0xc')]=_0x428431[_0xb41b('0xd')]?_0x2c1a53[_0xb41b('0xe')]:![];_0x428431['acwtime']=_0x428431[_0xb41b('0xc')]?_0x2c1a53['acwTimeout']:0x0;}utils[_0xb41b('0xf')](_0xb41b('0x10'),_0x428431);});}else{utils[_0xb41b('0xf')](_0xb41b('0x10'),_0x428431);}if(_0x4d5578){delete transfers[_0x428431[_0xb41b('0x5')]];}else{delete agents[_0x428431['destuniqueid']];}}exports[_0xb41b('0x11')]=function(_0x2d947a){try{utils[_0xb41b('0x12')](util[_0xb41b('0x3')](_0xb41b('0x13'),_0x2d947a['uniqueid']),_0x2d947a);agents[_0x2d947a['destuniqueid']]=_0x2d947a;agents[_0x2d947a['destuniqueid']][_0xb41b('0x14')]=utils[_0xb41b('0x15')]();agents[_0x2d947a[_0xb41b('0x16')]][_0xb41b('0x17')]=_0xb41b('0x18');agents[_0x2d947a['destuniqueid']][_0xb41b('0x19')]=null;agents[_0x2d947a[_0xb41b('0x16')]][_0xb41b('0x1a')]=null;utils[_0xb41b('0x2')](util[_0xb41b('0x3')](_0xb41b('0x1b'),_0x2d947a[_0xb41b('0x5')],agents[_0x2d947a['destuniqueid']]['membername'],_0x2d947a['destuniqueid']));}catch(_0xf109f8){utils['error'](util[_0xb41b('0x3')](_0xb41b('0x13'),_0x2d947a[_0xb41b('0x5')]),_0xf109f8);}};exports['agentringnoanswer']=function(_0x53bc44){try{if(!_[_0xb41b('0x1c')](agents[_0x53bc44[_0xb41b('0x16')]])){utils[_0xb41b('0x12')](util[_0xb41b('0x3')](_0xb41b('0x1d'),_0x53bc44[_0xb41b('0x5')]),_0x53bc44);utils['info'](util['format'](_0xb41b('0x1e'),_0x53bc44[_0xb41b('0x5')],agents[_0x53bc44[_0xb41b('0x16')]]['membername'],_0x53bc44[_0xb41b('0x16')]));agents[_0x53bc44[_0xb41b('0x16')]]['agentringnoanswer']=!![];agents[_0x53bc44[_0xb41b('0x16')]][_0xb41b('0x1f')]=utils['now']();agents[_0x53bc44[_0xb41b('0x16')]]['lastevent']=_0xb41b('0x20');agents[_0x53bc44[_0xb41b('0x16')]]['reason']=_0xb41b('0x20');agents[_0x53bc44[_0xb41b('0x16')]]['holdtime']=_0x53bc44['ringtime']?parseInt(_0x53bc44[_0xb41b('0x21')])/0x3e8:0x0;agents[_0x53bc44[_0xb41b('0x16')]][_0xb41b('0x22')]=0x0;unanswered[_0xb41b('0x23')](_0x53bc44[_0xb41b('0x16')]);}}catch(_0x181cbd){utils[_0xb41b('0x24')](util['format'](_0xb41b('0x1d'),_0x53bc44[_0xb41b('0x5')]),_0x181cbd);}};exports['queuecallerabandon']=function(_0xe64568){try{_['forIn'](agents,function(_0x38277f,_0x31d4cd){if(_0x38277f['uniqueid']==_0xe64568[_0xb41b('0x5')]&&!_['includes'](unanswered,_0x38277f[_0xb41b('0x16')])){utils[_0xb41b('0x12')](util['format'](_0xb41b('0x25'),_0xe64568[_0xb41b('0x5')]),_0xe64568);utils[_0xb41b('0x2')](util[_0xb41b('0x3')](_0xb41b('0x26'),_0xe64568[_0xb41b('0x5')],_0x38277f[_0xb41b('0x7')],_0x38277f[_0xb41b('0x16')]));_0x38277f[_0xb41b('0x27')]=!![];_0x38277f[_0xb41b('0x1f')]=utils['now']();_0x38277f[_0xb41b('0x17')]='abandoned';_0x38277f['reason']=_0xb41b('0x28');_0x38277f[_0xb41b('0x29')]=_0xe64568[_0xb41b('0x29')];_0x38277f[_0xb41b('0x22')]=0x0;writeDB(_0x38277f);}});}catch(_0x1b8681){utils[_0xb41b('0x24')](util[_0xb41b('0x3')](_0xb41b('0x25'),_0xe64568[_0xb41b('0x5')]),_0x1b8681);}};exports[_0xb41b('0x2a')]=function(_0x3a06a0){try{if(agents[_0x3a06a0['destuniqueid']]){utils[_0xb41b('0x12')](util[_0xb41b('0x3')](_0xb41b('0x2b'),_0x3a06a0[_0xb41b('0x5')]),_0x3a06a0);utils[_0xb41b('0x2')](util[_0xb41b('0x3')]('[%s][agents][agentconnect]\x20agent:%s\x20destuniqueid:%s\x20lastevent:connect',_0x3a06a0['uniqueid'],agents[_0x3a06a0[_0xb41b('0x16')]][_0xb41b('0x7')],_0x3a06a0['destuniqueid']));agents[_0x3a06a0[_0xb41b('0x16')]][_0xb41b('0x2c')]=utils[_0xb41b('0x15')]();agents[_0x3a06a0[_0xb41b('0x16')]][_0xb41b('0x19')]=_0x3a06a0['connectedlinenum'];agents[_0x3a06a0[_0xb41b('0x16')]]['connectedlinename']=_0x3a06a0[_0xb41b('0x1a')];agents[_0x3a06a0[_0xb41b('0x16')]][_0xb41b('0x29')]=_0x3a06a0[_0xb41b('0x21')];agents[_0x3a06a0[_0xb41b('0x16')]][_0xb41b('0x17')]=_0xb41b('0x2d');_[_0xb41b('0x2e')](agents,function(_0x2b0721,_0x578b67){if(_0x2b0721['destuniqueid']!=_0x3a06a0['destuniqueid']&&_0x2b0721[_0xb41b('0x5')]==_0x3a06a0['uniqueid']){_0x2b0721['talktime']=0x0;_0x2b0721[_0xb41b('0x29')]=_0x3a06a0['ringtime'];_0x2b0721[_0xb41b('0x27')]=!![];_0x2b0721[_0xb41b('0x1f')]=utils[_0xb41b('0x15')]();_0x2b0721[_0xb41b('0x17')]=_0xb41b('0x2f');_0x2b0721[_0xb41b('0x30')]=_0xb41b('0x2f');_0x2b0721['answeredelsewheredestinationuniqueid']=_0x3a06a0[_0xb41b('0x16')];_0x2b0721[_0xb41b('0x31')]=_0x3a06a0[_0xb41b('0x7')];writeDB(_0x2b0721);}});}}catch(_0x174d6c){utils['error'](util[_0xb41b('0x3')]('[%s][agents][agentconnect]',_0x3a06a0[_0xb41b('0x5')]),_0x174d6c);}};exports[_0xb41b('0xd')]=function(_0x46dbbf){try{if(!_['isNil'](agents[_0x46dbbf['destuniqueid']])){utils[_0xb41b('0x12')](util[_0xb41b('0x3')](_0xb41b('0x32'),_0x46dbbf[_0xb41b('0x5')]),_0x46dbbf);utils[_0xb41b('0x2')](util[_0xb41b('0x3')](_0xb41b('0x33'),_0x46dbbf['uniqueid'],agents[_0x46dbbf['destuniqueid']][_0xb41b('0x7')],_0x46dbbf['destuniqueid']));agents[_0x46dbbf[_0xb41b('0x16')]]['agentcomplete']=!![];agents[_0x46dbbf[_0xb41b('0x16')]]['agentcompleteAt']=utils[_0xb41b('0x15')]();agents[_0x46dbbf['destuniqueid']][_0xb41b('0x22')]=utils[_0xb41b('0x34')](agents[_0x46dbbf[_0xb41b('0x16')]][_0xb41b('0x35')],agents[_0x46dbbf['destuniqueid']][_0xb41b('0x2c')]);agents[_0x46dbbf[_0xb41b('0x16')]]['reason']=_0x46dbbf[_0xb41b('0x30')];agents[_0x46dbbf['destuniqueid']]['lastevent']='complete';writeDB(agents[_0x46dbbf['destuniqueid']]);}}catch(_0x263d8d){utils[_0xb41b('0x24')](util[_0xb41b('0x3')](_0xb41b('0x32'),_0x46dbbf[_0xb41b('0x5')]),_0x263d8d);}};exports[_0xb41b('0x36')]=function(_0x34d076){try{if(!_[_0xb41b('0x1c')](agents[_0x34d076[_0xb41b('0x37')]])){utils[_0xb41b('0x12')](util[_0xb41b('0x3')](_0xb41b('0x38'),_0x34d076[_0xb41b('0x5')]),_0x34d076);utils[_0xb41b('0x2')](util[_0xb41b('0x3')](_0xb41b('0x39'),_0x34d076['uniqueid'],agents[_0x34d076[_0xb41b('0x37')]]['membername'],agents[_0x34d076['transfereruniqueid']][_0xb41b('0x5')]));agents[_0x34d076[_0xb41b('0x37')]][_0xb41b('0x3a')]=!![];agents[_0x34d076[_0xb41b('0x37')]][_0xb41b('0x3b')]=_0xb41b('0x3c');agents[_0x34d076[_0xb41b('0x37')]][_0xb41b('0x3d')]=_0x34d076[_0xb41b('0x3e')];agents[_0x34d076[_0xb41b('0x37')]][_0xb41b('0x3f')]=agents[_0x34d076[_0xb41b('0x37')]][_0xb41b('0x5')];}}catch(_0x3ce89e){utils[_0xb41b('0x24')](util[_0xb41b('0x3')](_0xb41b('0x38'),_0x34d076[_0xb41b('0x5')]),_0x3ce89e);}};exports[_0xb41b('0x40')]=function(_0x247ca0){try{utils[_0xb41b('0x12')](util['format'](_0xb41b('0x41'),_0x247ca0['origtransfereruniqueid']),_0x247ca0);if(_0x247ca0[_0xb41b('0x42')]==_0x247ca0[_0xb41b('0x43')]){if(!_[_0xb41b('0x1c')](agents[_0x247ca0[_0xb41b('0x44')]])){utils[_0xb41b('0x2')](util[_0xb41b('0x3')](_0xb41b('0x45'),_0x247ca0['origtransfereruniqueid'],agents[_0x247ca0[_0xb41b('0x44')]][_0xb41b('0x7')]));agents[_0x247ca0[_0xb41b('0x44')]]['transfer']=!![];agents[_0x247ca0[_0xb41b('0x44')]][_0xb41b('0x3b')]=_0xb41b('0x46');agents[_0x247ca0[_0xb41b('0x44')]][_0xb41b('0x3d')]=_0x247ca0[_0xb41b('0x47')];agents[_0x247ca0[_0xb41b('0x44')]]['transferuniqueid']=_0x247ca0['origtransfereruniqueid'];}if(_0x247ca0[_0xb41b('0x48')]&&agents[_0x247ca0[_0xb41b('0x48')]]){agents[_0x247ca0['transfereeuniqueid']][_0xb41b('0x49')]=0x1;transfers[_0x247ca0[_0xb41b('0x48')]]=_['clone'](agents[_0x247ca0[_0xb41b('0x48')]]);transfers[_0x247ca0[_0xb41b('0x48')]][_0xb41b('0x4a')]=agents[_0x247ca0[_0xb41b('0x44')]][_0xb41b('0x4a')];transfers[_0x247ca0[_0xb41b('0x48')]][_0xb41b('0x4b')]=agents[_0x247ca0[_0xb41b('0x44')]][_0xb41b('0x4b')];transfers[_0x247ca0[_0xb41b('0x48')]]['agentcalledAt']=utils[_0xb41b('0x15')]();transfers[_0x247ca0[_0xb41b('0x48')]]['agentconnectAt']=utils['now']();transfers[_0x247ca0[_0xb41b('0x48')]][_0xb41b('0x29')]=0x0;transfers[_0x247ca0[_0xb41b('0x48')]]['agententerreason']=0x2;}}else if(_0x247ca0[_0xb41b('0x44')]==_0x247ca0[_0xb41b('0x4c')]){if(!_[_0xb41b('0x1c')](agents[_0x247ca0[_0xb41b('0x42')]])){utils[_0xb41b('0x2')](util[_0xb41b('0x3')](_0xb41b('0x45'),_0x247ca0[_0xb41b('0x42')],agents[_0x247ca0[_0xb41b('0x42')]][_0xb41b('0x7')]));agents[_0x247ca0['origtransfereruniqueid']][_0xb41b('0x3a')]=!![];agents[_0x247ca0[_0xb41b('0x42')]]['transfertype']=_0xb41b('0x46');agents[_0x247ca0[_0xb41b('0x42')]][_0xb41b('0x3d')]=_0x247ca0['secondtransfererexten'];agents[_0x247ca0[_0xb41b('0x42')]][_0xb41b('0x3f')]=_0x247ca0[_0xb41b('0x44')];}if(_0x247ca0[_0xb41b('0x4d')]&&agents[_0x247ca0[_0xb41b('0x4d')]]){agents[_0x247ca0[_0xb41b('0x4d')]][_0xb41b('0x49')]=0x1;transfers[_0x247ca0[_0xb41b('0x4d')]]=_[_0xb41b('0x4e')](agents[_0x247ca0[_0xb41b('0x4d')]]);transfers[_0x247ca0['transfertargetuniqueid']]['calleridnum']=agents[_0x247ca0['origtransfereruniqueid']]['calleridnum'];transfers[_0x247ca0[_0xb41b('0x4d')]][_0xb41b('0x4b')]=agents[_0x247ca0[_0xb41b('0x42')]][_0xb41b('0x4b')];transfers[_0x247ca0[_0xb41b('0x4d')]][_0xb41b('0x14')]=utils['now']();transfers[_0x247ca0[_0xb41b('0x4d')]]['agentconnectAt']=utils[_0xb41b('0x15')]();transfers[_0x247ca0['transfertargetuniqueid']][_0xb41b('0x29')]=0x0;transfers[_0x247ca0['transfertargetuniqueid']][_0xb41b('0x49')]=0x2;}}}catch(_0xc2afd1){utils['error'](util[_0xb41b('0x3')](_0xb41b('0x41'),_0x247ca0[_0xb41b('0x42')]),_0xc2afd1);}};exports[_0xb41b('0x4f')]=function(_0x39f6ad){try{utils[_0xb41b('0x12')](util[_0xb41b('0x3')]('[%s][agents][hangup]',_0x39f6ad[_0xb41b('0x5')]),_0x39f6ad);if(agents[_0x39f6ad['uniqueid']]&&agents[_0x39f6ad[_0xb41b('0x5')]][_0xb41b('0x30')]===_0xb41b('0x20')){if(_0x39f6ad['cause']==='21'){agents[_0x39f6ad['uniqueid']]['reason']='rejected';agents[_0x39f6ad[_0xb41b('0x5')]][_0xb41b('0x17')]=_0xb41b('0x50');}utils['info'](util['format'](_0xb41b('0x51'),_0x39f6ad[_0xb41b('0x5')],agents[_0x39f6ad[_0xb41b('0x5')]][_0xb41b('0x7')],agents[_0x39f6ad[_0xb41b('0x5')]][_0xb41b('0x30')],agents[_0x39f6ad[_0xb41b('0x5')]]['lastevent']));writeDB(agents[_0x39f6ad['uniqueid']]);var _0x303ca3=unanswered[_0xb41b('0x52')](_0x39f6ad['uniqueid']);if(_0x303ca3>-0x1){unanswered[_0xb41b('0x53')](_0x303ca3,0x1);}}if(transfers[_0x39f6ad['uniqueid']]){transfers[_0x39f6ad[_0xb41b('0x5')]][_0xb41b('0xd')]=!![];transfers[_0x39f6ad['uniqueid']][_0xb41b('0x35')]=utils[_0xb41b('0x15')]();transfers[_0x39f6ad['uniqueid']]['talktime']=utils[_0xb41b('0x34')](transfers[_0x39f6ad[_0xb41b('0x5')]]['agentcompleteAt'],transfers[_0x39f6ad[_0xb41b('0x5')]]['agentconnectAt']);transfers[_0x39f6ad[_0xb41b('0x5')]][_0xb41b('0x30')]='agent';transfers[_0x39f6ad['uniqueid']][_0xb41b('0x17')]=_0xb41b('0x54');utils['info'](util[_0xb41b('0x3')](_0xb41b('0x51'),_0x39f6ad[_0xb41b('0x5')],transfers[_0x39f6ad['uniqueid']][_0xb41b('0x7')],transfers[_0x39f6ad['uniqueid']]['reason'],transfers[_0x39f6ad[_0xb41b('0x5')]][_0xb41b('0x17')]));writeDB(transfers[_0x39f6ad[_0xb41b('0x5')]],!![]);}if(agents[_0x39f6ad[_0xb41b('0x5')]]&&agents[_0x39f6ad[_0xb41b('0x5')]][_0xb41b('0x2c')]){agents[_0x39f6ad[_0xb41b('0x5')]][_0xb41b('0xd')]=!![];agents[_0x39f6ad[_0xb41b('0x5')]][_0xb41b('0x35')]=utils[_0xb41b('0x15')]();agents[_0x39f6ad[_0xb41b('0x5')]][_0xb41b('0x22')]=utils['diffTime'](agents[_0x39f6ad[_0xb41b('0x5')]][_0xb41b('0x35')],agents[_0x39f6ad[_0xb41b('0x5')]][_0xb41b('0x2c')]);agents[_0x39f6ad[_0xb41b('0x5')]][_0xb41b('0x30')]=agents[_0x39f6ad[_0xb41b('0x5')]][_0xb41b('0x3a')]?'transfer':'agent';agents[_0x39f6ad[_0xb41b('0x5')]][_0xb41b('0x17')]=_0xb41b('0x54');utils['info'](util[_0xb41b('0x3')](_0xb41b('0x51'),_0x39f6ad['uniqueid'],agents[_0x39f6ad[_0xb41b('0x5')]][_0xb41b('0x7')],agents[_0x39f6ad['uniqueid']][_0xb41b('0x30')],agents[_0x39f6ad[_0xb41b('0x5')]][_0xb41b('0x17')]));writeDB(agents[_0x39f6ad[_0xb41b('0x5')]]);}}catch(_0x31c5c1){utils[_0xb41b('0x24')](util[_0xb41b('0x3')](_0xb41b('0x55'),_0x39f6ad[_0xb41b('0x5')]),_0x31c5c1);}}; \ No newline at end of file +var _0xa9e0=['complete','[%s][agents][agentcomplete]','blindtransfer','[%s][agents][blindtransfer]','[%s][agents][blindtransfer]\x20agent:%s\x20transferuniqueid:%s','transfereruniqueid','transfertype','blind','transferexten','extension','transferuniqueid','origtransfereruniqueid','origtransfererlinkedid','secondtransfereruniqueid','transfer','ATTENDED','transfereeuniqueid','agententerreason','clone','calleridname','[%s][agents][attendedtransfer]\x20agent:%s','transfertargetuniqueid','[%s][agents][attendedtransfer]','hangup','[%s][agents][hangup]','rejected','indexOf','splice','agent','[%s][agents][hangup]\x20agent:%s\x20reason:%s\x20lastevent:%s','lodash','util','./utils','info','[%s][agents][writeDB]\x20channel:%s\x20queue:%s\x20agent:%s\x20interface:%s\x20calleridnum:%s\x20connectedlinenum:%s\x20lastevent:%s','uniqueid','channel','queue','membername','calleridnum','connectedlinenum','lastevent','type','agentacw','agentcomplete','acw','acwtime','request','CreateVoiceAgentReport','destuniqueid','agentcalled','format','[%s][agents][agentcalled]','agentcalledAt','called','[%s][agents][agentcalled]\x20agent:%s\x20destuniqueid:%s\x20lastevent:called','error','agentringnoanswer','debug','[%s][agents][agentringnoanswer]','[%s][agents][agentringnoanswer]\x20agent:%s\x20destuniqueid:%s\x20lastevent:timeout','agentringnoanswerAt','now','reason','timeout','ringtime','push','queuecallerabandon','forIn','includes','[%s][agents][queuecallerabandon]','[%s][agents][queuecallerabandon]\x20agent:%s\x20destuniqueid:%s\x20lastevent:abandoned','abandoned','holdtime','talktime','agentconnect','[%s][agents][agentconnect]','[%s][agents][agentconnect]\x20agent:%s\x20destuniqueid:%s\x20lastevent:connect','agentconnectAt','connectedlinename','answered_elsewhere','answeredelsewheredestinationuniqueid','answeredelsewheremembername','isNil','[%s][agents][agentcomplete]\x20agent:%s\x20destuniqueid:%s\x20lastevent:complete','agentcompleteAt','diffTime'];(function(_0x321bb2,_0x202794){var _0x9c12ed=function(_0x263dd3){while(--_0x263dd3){_0x321bb2['push'](_0x321bb2['shift']());}};_0x9c12ed(++_0x202794);}(_0xa9e0,0x123));var _0x0a9e=function(_0x34bc30,_0x177cb0){_0x34bc30=_0x34bc30-0x0;var _0x5706de=_0xa9e0[_0x34bc30];return _0x5706de;};'use strict';var _=require(_0x0a9e('0x0'));var util=require(_0x0a9e('0x1'));var utils=require(_0x0a9e('0x2'));var agents={};var transfers={};var unanswered=[];function writeDB(_0x5dd881,_0x550fbc){utils[_0x0a9e('0x3')](util['format'](_0x0a9e('0x4'),_0x5dd881[_0x0a9e('0x5')],_0x5dd881[_0x0a9e('0x6')],_0x5dd881[_0x0a9e('0x7')],_0x5dd881[_0x0a9e('0x8')],_0x5dd881['interface'],_0x5dd881[_0x0a9e('0x9')],_0x5dd881[_0x0a9e('0xa')],_0x5dd881[_0x0a9e('0xb')]));if(_0x5dd881['queue']){utils['getVoiceQueueByName'](_0x5dd881[_0x0a9e('0x7')])['then'](function(_0x52cace){if(_0x52cace){_0x5dd881[_0x0a9e('0xc')]=_0x52cace[_0x0a9e('0xc')];_0x5dd881[_0x0a9e('0xd')]=_0x5dd881[_0x0a9e('0xe')]?_0x52cace[_0x0a9e('0xf')]:![];_0x5dd881[_0x0a9e('0x10')]=_0x5dd881['agentacw']?_0x52cace['acwTimeout']:0x0;}utils['request']('CreateVoiceAgentReport',_0x5dd881);});}else{utils[_0x0a9e('0x11')](_0x0a9e('0x12'),_0x5dd881);}if(_0x550fbc){delete transfers[_0x5dd881[_0x0a9e('0x5')]];}else{delete agents[_0x5dd881[_0x0a9e('0x13')]];}}exports[_0x0a9e('0x14')]=function(_0x69aeb7){try{utils['debug'](util[_0x0a9e('0x15')](_0x0a9e('0x16'),_0x69aeb7[_0x0a9e('0x5')]),_0x69aeb7);agents[_0x69aeb7[_0x0a9e('0x13')]]=_0x69aeb7;agents[_0x69aeb7[_0x0a9e('0x13')]][_0x0a9e('0x17')]=utils['now']();agents[_0x69aeb7[_0x0a9e('0x13')]]['lastevent']=_0x0a9e('0x18');agents[_0x69aeb7['destuniqueid']][_0x0a9e('0xa')]=null;agents[_0x69aeb7[_0x0a9e('0x13')]]['connectedlinename']=null;utils[_0x0a9e('0x3')](util['format'](_0x0a9e('0x19'),_0x69aeb7[_0x0a9e('0x5')],agents[_0x69aeb7[_0x0a9e('0x13')]][_0x0a9e('0x8')],_0x69aeb7[_0x0a9e('0x13')]));}catch(_0x2eb11f){utils[_0x0a9e('0x1a')](util[_0x0a9e('0x15')](_0x0a9e('0x16'),_0x69aeb7[_0x0a9e('0x5')]),_0x2eb11f);}};exports[_0x0a9e('0x1b')]=function(_0x105080){try{if(!_['isNil'](agents[_0x105080[_0x0a9e('0x13')]])){utils[_0x0a9e('0x1c')](util['format'](_0x0a9e('0x1d'),_0x105080['uniqueid']),_0x105080);utils['info'](util[_0x0a9e('0x15')](_0x0a9e('0x1e'),_0x105080[_0x0a9e('0x5')],agents[_0x105080[_0x0a9e('0x13')]]['membername'],_0x105080[_0x0a9e('0x13')]));agents[_0x105080[_0x0a9e('0x13')]][_0x0a9e('0x1b')]=!![];agents[_0x105080[_0x0a9e('0x13')]][_0x0a9e('0x1f')]=utils[_0x0a9e('0x20')]();agents[_0x105080[_0x0a9e('0x13')]]['lastevent']='timeout';agents[_0x105080[_0x0a9e('0x13')]][_0x0a9e('0x21')]=_0x0a9e('0x22');agents[_0x105080[_0x0a9e('0x13')]]['holdtime']=_0x105080[_0x0a9e('0x23')]?parseInt(_0x105080['ringtime'])/0x3e8:0x0;agents[_0x105080[_0x0a9e('0x13')]]['talktime']=0x0;unanswered[_0x0a9e('0x24')](_0x105080[_0x0a9e('0x13')]);}}catch(_0x25fba9){utils[_0x0a9e('0x1a')](util[_0x0a9e('0x15')](_0x0a9e('0x1d'),_0x105080[_0x0a9e('0x5')]),_0x25fba9);}};exports[_0x0a9e('0x25')]=function(_0x5a101a){try{_[_0x0a9e('0x26')](agents,function(_0x468813,_0x2b1f27){if(_0x468813[_0x0a9e('0x5')]==_0x5a101a['uniqueid']&&!_[_0x0a9e('0x27')](unanswered,_0x468813[_0x0a9e('0x13')])){utils[_0x0a9e('0x1c')](util[_0x0a9e('0x15')](_0x0a9e('0x28'),_0x5a101a[_0x0a9e('0x5')]),_0x5a101a);utils[_0x0a9e('0x3')](util[_0x0a9e('0x15')](_0x0a9e('0x29'),_0x5a101a['uniqueid'],_0x468813[_0x0a9e('0x8')],_0x468813['destuniqueid']));_0x468813[_0x0a9e('0x1b')]=!![];_0x468813[_0x0a9e('0x1f')]=utils[_0x0a9e('0x20')]();_0x468813[_0x0a9e('0xb')]=_0x0a9e('0x2a');_0x468813['reason']=_0x0a9e('0x2a');_0x468813[_0x0a9e('0x2b')]=_0x5a101a[_0x0a9e('0x2b')];_0x468813[_0x0a9e('0x2c')]=0x0;writeDB(_0x468813);}});}catch(_0x2b45ea){utils[_0x0a9e('0x1a')](util[_0x0a9e('0x15')](_0x0a9e('0x28'),_0x5a101a['uniqueid']),_0x2b45ea);}};exports[_0x0a9e('0x2d')]=function(_0x5e7238){try{if(agents[_0x5e7238[_0x0a9e('0x13')]]){utils[_0x0a9e('0x1c')](util[_0x0a9e('0x15')](_0x0a9e('0x2e'),_0x5e7238['uniqueid']),_0x5e7238);utils[_0x0a9e('0x3')](util[_0x0a9e('0x15')](_0x0a9e('0x2f'),_0x5e7238[_0x0a9e('0x5')],agents[_0x5e7238['destuniqueid']]['membername'],_0x5e7238[_0x0a9e('0x13')]));agents[_0x5e7238['destuniqueid']][_0x0a9e('0x30')]=utils[_0x0a9e('0x20')]();agents[_0x5e7238[_0x0a9e('0x13')]][_0x0a9e('0xa')]=_0x5e7238['connectedlinenum'];agents[_0x5e7238[_0x0a9e('0x13')]][_0x0a9e('0x31')]=_0x5e7238[_0x0a9e('0x31')];agents[_0x5e7238['destuniqueid']][_0x0a9e('0x2b')]=_0x5e7238[_0x0a9e('0x23')];agents[_0x5e7238[_0x0a9e('0x13')]]['lastevent']='connect';_[_0x0a9e('0x26')](agents,function(_0x40d766,_0x5adda1){if(_0x40d766[_0x0a9e('0x13')]!=_0x5e7238[_0x0a9e('0x13')]&&_0x40d766[_0x0a9e('0x5')]==_0x5e7238[_0x0a9e('0x5')]){_0x40d766['talktime']=0x0;_0x40d766['holdtime']=_0x5e7238[_0x0a9e('0x23')];_0x40d766[_0x0a9e('0x1b')]=!![];_0x40d766['agentringnoanswerAt']=utils[_0x0a9e('0x20')]();_0x40d766[_0x0a9e('0xb')]=_0x0a9e('0x32');_0x40d766['reason']=_0x0a9e('0x32');_0x40d766[_0x0a9e('0x33')]=_0x5e7238[_0x0a9e('0x13')];_0x40d766[_0x0a9e('0x34')]=_0x5e7238[_0x0a9e('0x8')];writeDB(_0x40d766);}});}}catch(_0xeaa5e5){utils[_0x0a9e('0x1a')](util[_0x0a9e('0x15')](_0x0a9e('0x2e'),_0x5e7238[_0x0a9e('0x5')]),_0xeaa5e5);}};exports[_0x0a9e('0xe')]=function(_0x148007){try{if(!_[_0x0a9e('0x35')](agents[_0x148007[_0x0a9e('0x13')]])){utils[_0x0a9e('0x1c')](util['format']('[%s][agents][agentcomplete]',_0x148007[_0x0a9e('0x5')]),_0x148007);utils[_0x0a9e('0x3')](util[_0x0a9e('0x15')](_0x0a9e('0x36'),_0x148007[_0x0a9e('0x5')],agents[_0x148007[_0x0a9e('0x13')]][_0x0a9e('0x8')],_0x148007[_0x0a9e('0x13')]));agents[_0x148007[_0x0a9e('0x13')]][_0x0a9e('0xe')]=!![];agents[_0x148007[_0x0a9e('0x13')]][_0x0a9e('0x37')]=utils['now']();agents[_0x148007[_0x0a9e('0x13')]][_0x0a9e('0x2c')]=utils[_0x0a9e('0x38')](agents[_0x148007[_0x0a9e('0x13')]][_0x0a9e('0x37')],agents[_0x148007[_0x0a9e('0x13')]][_0x0a9e('0x30')]);agents[_0x148007[_0x0a9e('0x13')]]['reason']=_0x148007[_0x0a9e('0x21')];agents[_0x148007['destuniqueid']][_0x0a9e('0xb')]=_0x0a9e('0x39');writeDB(agents[_0x148007[_0x0a9e('0x13')]]);}}catch(_0x562fb4){utils[_0x0a9e('0x1a')](util[_0x0a9e('0x15')](_0x0a9e('0x3a'),_0x148007[_0x0a9e('0x5')]),_0x562fb4);}};exports[_0x0a9e('0x3b')]=function(_0x37be73){try{if(!_[_0x0a9e('0x35')](agents[_0x37be73['transfereruniqueid']])){utils[_0x0a9e('0x1c')](util[_0x0a9e('0x15')](_0x0a9e('0x3c'),_0x37be73[_0x0a9e('0x5')]),_0x37be73);utils[_0x0a9e('0x3')](util[_0x0a9e('0x15')](_0x0a9e('0x3d'),_0x37be73[_0x0a9e('0x5')],agents[_0x37be73[_0x0a9e('0x3e')]]['membername'],agents[_0x37be73[_0x0a9e('0x3e')]][_0x0a9e('0x5')]));agents[_0x37be73['transfereruniqueid']]['transfer']=!![];agents[_0x37be73['transfereruniqueid']][_0x0a9e('0x3f')]=_0x0a9e('0x40');agents[_0x37be73[_0x0a9e('0x3e')]][_0x0a9e('0x41')]=_0x37be73[_0x0a9e('0x42')];agents[_0x37be73[_0x0a9e('0x3e')]][_0x0a9e('0x43')]=agents[_0x37be73[_0x0a9e('0x3e')]]['uniqueid'];}}catch(_0x4b1b9f){utils['error'](util[_0x0a9e('0x15')](_0x0a9e('0x3c'),_0x37be73[_0x0a9e('0x5')]),_0x4b1b9f);}};exports['attendedtransfer']=function(_0x2b69d9){try{utils[_0x0a9e('0x1c')](util['format']('[%s][agents][attendedtransfer]',_0x2b69d9[_0x0a9e('0x44')]),_0x2b69d9);if(_0x2b69d9['origtransfereruniqueid']==_0x2b69d9[_0x0a9e('0x45')]){if(!_['isNil'](agents[_0x2b69d9[_0x0a9e('0x46')]])){utils[_0x0a9e('0x3')](util[_0x0a9e('0x15')]('[%s][agents][attendedtransfer]\x20agent:%s',_0x2b69d9[_0x0a9e('0x44')],agents[_0x2b69d9[_0x0a9e('0x46')]]['membername']));agents[_0x2b69d9['secondtransfereruniqueid']][_0x0a9e('0x47')]=!![];agents[_0x2b69d9[_0x0a9e('0x46')]]['transfertype']=_0x0a9e('0x48');agents[_0x2b69d9['secondtransfereruniqueid']][_0x0a9e('0x41')]=_0x2b69d9['origtransfererexten'];agents[_0x2b69d9[_0x0a9e('0x46')]]['transferuniqueid']=_0x2b69d9['origtransfereruniqueid'];}if(_0x2b69d9['transfereeuniqueid']&&agents[_0x2b69d9[_0x0a9e('0x49')]]){agents[_0x2b69d9['transfereeuniqueid']][_0x0a9e('0x4a')]=0x1;transfers[_0x2b69d9[_0x0a9e('0x49')]]=_[_0x0a9e('0x4b')](agents[_0x2b69d9[_0x0a9e('0x49')]]);transfers[_0x2b69d9[_0x0a9e('0x49')]][_0x0a9e('0x9')]=agents[_0x2b69d9[_0x0a9e('0x46')]][_0x0a9e('0x9')];transfers[_0x2b69d9['transfereeuniqueid']][_0x0a9e('0x4c')]=agents[_0x2b69d9[_0x0a9e('0x46')]][_0x0a9e('0x4c')];transfers[_0x2b69d9[_0x0a9e('0x49')]][_0x0a9e('0x17')]=utils[_0x0a9e('0x20')]();transfers[_0x2b69d9['transfereeuniqueid']][_0x0a9e('0x30')]=utils[_0x0a9e('0x20')]();transfers[_0x2b69d9['transfereeuniqueid']][_0x0a9e('0x2b')]=0x0;transfers[_0x2b69d9['transfereeuniqueid']][_0x0a9e('0x4a')]=0x2;}}else if(_0x2b69d9['secondtransfereruniqueid']==_0x2b69d9['secondtransfererlinkedid']){if(!_['isNil'](agents[_0x2b69d9[_0x0a9e('0x44')]])){utils['info'](util[_0x0a9e('0x15')](_0x0a9e('0x4d'),_0x2b69d9[_0x0a9e('0x44')],agents[_0x2b69d9[_0x0a9e('0x44')]][_0x0a9e('0x8')]));agents[_0x2b69d9[_0x0a9e('0x44')]]['transfer']=!![];agents[_0x2b69d9[_0x0a9e('0x44')]]['transfertype']=_0x0a9e('0x48');agents[_0x2b69d9[_0x0a9e('0x44')]][_0x0a9e('0x41')]=_0x2b69d9['secondtransfererexten'];agents[_0x2b69d9[_0x0a9e('0x44')]][_0x0a9e('0x43')]=_0x2b69d9[_0x0a9e('0x46')];}if(_0x2b69d9[_0x0a9e('0x4e')]&&agents[_0x2b69d9['transfertargetuniqueid']]){agents[_0x2b69d9[_0x0a9e('0x4e')]][_0x0a9e('0x4a')]=0x1;transfers[_0x2b69d9['transfertargetuniqueid']]=_[_0x0a9e('0x4b')](agents[_0x2b69d9[_0x0a9e('0x4e')]]);transfers[_0x2b69d9[_0x0a9e('0x4e')]][_0x0a9e('0x9')]=agents[_0x2b69d9[_0x0a9e('0x44')]]['calleridnum'];transfers[_0x2b69d9[_0x0a9e('0x4e')]][_0x0a9e('0x4c')]=agents[_0x2b69d9[_0x0a9e('0x44')]]['calleridname'];transfers[_0x2b69d9[_0x0a9e('0x4e')]]['agentcalledAt']=utils['now']();transfers[_0x2b69d9[_0x0a9e('0x4e')]][_0x0a9e('0x30')]=utils[_0x0a9e('0x20')]();transfers[_0x2b69d9[_0x0a9e('0x4e')]][_0x0a9e('0x2b')]=0x0;transfers[_0x2b69d9[_0x0a9e('0x4e')]][_0x0a9e('0x4a')]=0x2;}}}catch(_0x54a37d){utils[_0x0a9e('0x1a')](util[_0x0a9e('0x15')](_0x0a9e('0x4f'),_0x2b69d9[_0x0a9e('0x44')]),_0x54a37d);}};exports[_0x0a9e('0x50')]=function(_0x2b8192){try{utils[_0x0a9e('0x1c')](util[_0x0a9e('0x15')](_0x0a9e('0x51'),_0x2b8192[_0x0a9e('0x5')]),_0x2b8192);if(agents[_0x2b8192['uniqueid']]&&agents[_0x2b8192[_0x0a9e('0x5')]][_0x0a9e('0x21')]===_0x0a9e('0x22')){if(_0x2b8192['cause']==='21'){agents[_0x2b8192[_0x0a9e('0x5')]][_0x0a9e('0x21')]='rejected';agents[_0x2b8192[_0x0a9e('0x5')]][_0x0a9e('0xb')]=_0x0a9e('0x52');}utils[_0x0a9e('0x3')](util[_0x0a9e('0x15')]('[%s][agents][hangup]\x20agent:%s\x20reason:%s\x20lastevent:%s',_0x2b8192['uniqueid'],agents[_0x2b8192['uniqueid']][_0x0a9e('0x8')],agents[_0x2b8192[_0x0a9e('0x5')]][_0x0a9e('0x21')],agents[_0x2b8192[_0x0a9e('0x5')]][_0x0a9e('0xb')]));writeDB(agents[_0x2b8192[_0x0a9e('0x5')]]);var _0xeef20=unanswered[_0x0a9e('0x53')](_0x2b8192['uniqueid']);if(_0xeef20>-0x1){unanswered[_0x0a9e('0x54')](_0xeef20,0x1);}}if(transfers[_0x2b8192[_0x0a9e('0x5')]]){transfers[_0x2b8192[_0x0a9e('0x5')]]['agentcomplete']=!![];transfers[_0x2b8192[_0x0a9e('0x5')]]['agentcompleteAt']=utils[_0x0a9e('0x20')]();transfers[_0x2b8192[_0x0a9e('0x5')]]['talktime']=utils[_0x0a9e('0x38')](transfers[_0x2b8192[_0x0a9e('0x5')]][_0x0a9e('0x37')],transfers[_0x2b8192[_0x0a9e('0x5')]]['agentconnectAt']);transfers[_0x2b8192[_0x0a9e('0x5')]][_0x0a9e('0x21')]=_0x0a9e('0x55');transfers[_0x2b8192[_0x0a9e('0x5')]]['lastevent']=_0x0a9e('0x39');utils[_0x0a9e('0x3')](util[_0x0a9e('0x15')](_0x0a9e('0x56'),_0x2b8192['uniqueid'],transfers[_0x2b8192[_0x0a9e('0x5')]][_0x0a9e('0x8')],transfers[_0x2b8192[_0x0a9e('0x5')]][_0x0a9e('0x21')],transfers[_0x2b8192[_0x0a9e('0x5')]][_0x0a9e('0xb')]));writeDB(transfers[_0x2b8192[_0x0a9e('0x5')]],!![]);}if(agents[_0x2b8192[_0x0a9e('0x5')]]&&agents[_0x2b8192[_0x0a9e('0x5')]][_0x0a9e('0x30')]){agents[_0x2b8192[_0x0a9e('0x5')]][_0x0a9e('0xe')]=!![];agents[_0x2b8192[_0x0a9e('0x5')]][_0x0a9e('0x37')]=utils['now']();agents[_0x2b8192[_0x0a9e('0x5')]][_0x0a9e('0x2c')]=utils[_0x0a9e('0x38')](agents[_0x2b8192['uniqueid']][_0x0a9e('0x37')],agents[_0x2b8192[_0x0a9e('0x5')]][_0x0a9e('0x30')]);agents[_0x2b8192[_0x0a9e('0x5')]]['reason']=agents[_0x2b8192['uniqueid']][_0x0a9e('0x47')]?_0x0a9e('0x47'):'agent';agents[_0x2b8192[_0x0a9e('0x5')]]['lastevent']=_0x0a9e('0x39');utils[_0x0a9e('0x3')](util['format'](_0x0a9e('0x56'),_0x2b8192[_0x0a9e('0x5')],agents[_0x2b8192[_0x0a9e('0x5')]][_0x0a9e('0x8')],agents[_0x2b8192[_0x0a9e('0x5')]][_0x0a9e('0x21')],agents[_0x2b8192[_0x0a9e('0x5')]]['lastevent']));writeDB(agents[_0x2b8192[_0x0a9e('0x5')]]);}}catch(_0x3ca9b9){utils[_0x0a9e('0x1a')](util[_0x0a9e('0x15')]('[%s][agents][hangup]',_0x2b8192[_0x0a9e('0x5')]),_0x3ca9b9);}}; \ No newline at end of file diff --git a/server/services/xdr/calls.controller.js b/server/services/xdr/calls.controller.js index a6ad121..fc3a906 100644 --- a/server/services/xdr/calls.controller.js +++ b/server/services/xdr/calls.controller.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x36c3=['context','now','DOCUMENTATION','error','[%s][calls][newchannel]','newstate','[%s][calls][newstate]','isNil','channelstate','[%s][calls][newstate]\x20context:%s\x20channel:%s','transfer','[%s][calls][newstate]\x20linkedid:%s\x20context:%s\x20channel:%s','answertime','disposition','toNumber','ANSWERED','hangup','[%s][calls][hangup]','callerid','calleridname','[%s][calls][hangup]\x20callerid:%s\x20reason:%s','cause-txt','duration','diffTime','endtime','billableseconds','attendedtransfer','origtransfereruniqueid','localtwolinkedid','transfereechannel','[%s][calls][attendedtransfer]\x20localtwolinkedid:%s\x20destinationchannel:%s','secondtransfererchannel','destinationchannel','userfield','transfertargetchannel','origtransfererchannel','_attended','[%s][calls][attendedtransfer]','musiconholdstart','[%s][calls][musiconholdstart]\x20musiconholdstartAt:%s','musiconholdstop','musiconholdstartAt','[%s][calls][musiconholdstop]\x20mohtime:%s','mohtime','[%s][calls][musiconholdstop]','varset','variable','[%s][calls][varset]\x20variable:xmd-originatecalleridnum\x20value:%s','value','source','xmd-phone','[%s][calls][varset]\x20variable:xmd-phone\x20value:%s','destination','\x22\x20<','xmd-callerid-preview','xmd-callerid','[%s][calls][varset]\x20variable:%s\x20value:%s','xmd-queue','xmd-contactid','ContactId','xmd-cdrtype','[%s][calls][varset]\x20variable:xmd-cdrtype\x20value:%s','type','outboundrouteid','[%s][calls][varset]\x20variable:outboundrouteid\x20value:%s','routeid','sipcallid','[%s][calls][varset]','application','toLowerCase','startsWith','cdr','appdata','split','substring','lastIndexOf','includes','noop','execif','set','gotoif','lastapplication','[%s][calls][newexten]','lodash','util','./transfers.controller','NO\x20ANSWER','FAILED','BUSY','blinds','uniqueid','transfereeuniqueid','info','format','[%s][calls][writeDB]\x20channel:%s\x20queue:%s\x20agent:%s\x20interface:%s\x20calleridnum:%s\x20connectedlinenum:%s\x20lastevent:%s','channel','queue','membername','interface','calleridnum','connectedlinenum','getUserByInternal','then','UserId','request','CreateVoiceCallReport','recording','newchannel','debug','linkedid','OutgoingSpoolFailed','[%s][calls][newchannel]\x20context:%s\x20exten:%s','accountcode'];(function(_0x18cac4,_0x57a4d5){var _0x2227c6=function(_0x72934d){while(--_0x72934d){_0x18cac4['push'](_0x18cac4['shift']());}};_0x2227c6(++_0x57a4d5);}(_0x36c3,0x1a6));var _0x336c=function(_0x40bdbc,_0x3fabcd){_0x40bdbc=_0x40bdbc-0x0;var _0xc603a8=_0x36c3[_0x40bdbc];return _0xc603a8;};'use strict';var _=require(_0x336c('0x0'));var util=require(_0x336c('0x1'));var utils=require('./utils');var transfers=require(_0x336c('0x2'));var dispositions=[_0x336c('0x3'),_0x336c('0x4'),_0x336c('0x4'),_0x336c('0x3'),_0x336c('0x3'),_0x336c('0x3'),'ANSWERED',_0x336c('0x5'),_0x336c('0x4'),_0x336c('0x4'),_0x336c('0x4')];var channels={};function writeDB(_0x295b22){var _0x4d1e4f;if(transfers[_0x336c('0x6')][_0x295b22[_0x336c('0x7')]]){_0x4d1e4f=_0x295b22[_0x336c('0x7')];_0x295b22[_0x336c('0x7')]=transfers[_0x336c('0x6')][_0x295b22[_0x336c('0x7')]][_0x336c('0x8')];}utils[_0x336c('0x9')](util[_0x336c('0xa')](_0x336c('0xb'),_0x295b22[_0x336c('0x7')],_0x295b22[_0x336c('0xc')],_0x295b22[_0x336c('0xd')],_0x295b22[_0x336c('0xe')],_0x295b22[_0x336c('0xf')],_0x295b22[_0x336c('0x10')],_0x295b22[_0x336c('0x11')],_0x295b22['lastevent']));if(_0x295b22['accountcode']){utils[_0x336c('0x12')](_0x295b22['accountcode'])[_0x336c('0x13')](function(_0xc6a857){if(_0xc6a857){_0x295b22[_0x336c('0x14')]=_0xc6a857['id'];}utils[_0x336c('0x15')]('CreateVoiceCallReport',_0x295b22);});}else{utils[_0x336c('0x15')](_0x336c('0x16'),_0x295b22);}if(channels[_0x295b22['uniqueid']]){delete channels[_0x295b22[_0x336c('0x7')]];}else if(_0x4d1e4f&&channels[_0x4d1e4f]){if(!transfers['blinds'][_0x4d1e4f][_0x336c('0x17')])delete transfers['blinds'][_0x4d1e4f];delete channels[_0x4d1e4f];}}exports[_0x336c('0x18')]=function(_0x4ca365){try{utils[_0x336c('0x19')](util[_0x336c('0xa')]('[%s][calls][newchannel]',_0x4ca365['uniqueid']),_0x4ca365);if(_0x4ca365[_0x336c('0x7')]==_0x4ca365[_0x336c('0x1a')]&&_0x4ca365[_0x336c('0xc')]!=_0x336c('0x1b')){utils[_0x336c('0x9')](util['format'](_0x336c('0x1c'),_0x4ca365['uniqueid'],_0x4ca365['context'],_0x4ca365['exten']));channels[_0x4ca365[_0x336c('0x7')]]={'uniqueid':_0x4ca365[_0x336c('0x7')],'accountcode':_0x4ca365[_0x336c('0x1d')],'source':_0x4ca365['calleridnum'],'destination':_0x4ca365['exten'],'destinationcontext':_0x4ca365[_0x336c('0x1e')],'channel':_0x4ca365[_0x336c('0xc')],'starttime':utils[_0x336c('0x1f')](),'answertime':null,'systemanswertime':null,'mohtime':0x0,'disposition':'NO\x20ANSWER','amaflags':_0x336c('0x20')};}}catch(_0x421929){utils[_0x336c('0x21')](util['format'](_0x336c('0x22'),_0x4ca365[_0x336c('0x7')]),_0x421929);}};exports[_0x336c('0x23')]=function(_0xc46031){try{utils['debug'](util[_0x336c('0xa')](_0x336c('0x24'),_0xc46031[_0x336c('0x7')]),_0xc46031);if(!_[_0x336c('0x25')](channels[_0xc46031[_0x336c('0x7')]])&&_0xc46031[_0x336c('0x26')]==0x6){utils['info'](util[_0x336c('0xa')](_0x336c('0x27'),_0xc46031[_0x336c('0x7')],_0xc46031[_0x336c('0x1e')],_0xc46031['channel']));if(_[_0x336c('0x25')](channels[_0xc46031[_0x336c('0x7')]]['systemanswertime'])){channels[_0xc46031['uniqueid']]['systemanswertime']=utils[_0x336c('0x1f')]();}}else if(!_[_0x336c('0x25')](channels[_0xc46031['linkedid']])&&_0xc46031['channelstate']==0x6&&_0xc46031['context']!=_0x336c('0x28')){utils[_0x336c('0x9')](util[_0x336c('0xa')](_0x336c('0x29'),_0xc46031[_0x336c('0x7')],_0xc46031[_0x336c('0x1a')],_0xc46031[_0x336c('0x1e')],_0xc46031['channel']));channels[_0xc46031[_0x336c('0x1a')]][_0x336c('0x1d')]=_0xc46031[_0x336c('0x1d')];channels[_0xc46031[_0x336c('0x1a')]]['destinationchannel']=_0xc46031[_0x336c('0xc')];if(_[_0x336c('0x25')](channels[_0xc46031['linkedid']][_0x336c('0x2a')])){channels[_0xc46031[_0x336c('0x1a')]]['answertime']=utils[_0x336c('0x1f')]();}channels[_0xc46031[_0x336c('0x1a')]][_0x336c('0x2b')]=dispositions[_[_0x336c('0x2c')](_0xc46031[_0x336c('0x26')])]||_0x336c('0x2d');}}catch(_0x16b250){utils[_0x336c('0x21')](util['format'](_0x336c('0x24'),_0xc46031[_0x336c('0x7')]),_0x16b250);}};exports[_0x336c('0x2e')]=function(_0x33dfc6){try{if(!_[_0x336c('0x25')](channels[_0x33dfc6[_0x336c('0x7')]])){utils[_0x336c('0x19')](util[_0x336c('0xa')](_0x336c('0x2f'),_0x33dfc6[_0x336c('0x7')]),_0x33dfc6);if(_['isNil'](channels[_0x33dfc6[_0x336c('0x7')]][_0x336c('0x30')])){channels[_0x33dfc6[_0x336c('0x7')]][_0x336c('0x30')]=_0x33dfc6[_0x336c('0x31')]+'\x20<'+_0x33dfc6[_0x336c('0x10')]+'>';}utils[_0x336c('0x9')](util[_0x336c('0xa')](_0x336c('0x32'),_0x33dfc6[_0x336c('0x7')],channels[_0x33dfc6['uniqueid']][_0x336c('0x30')],_0x33dfc6[_0x336c('0x33')]));channels[_0x33dfc6[_0x336c('0x7')]]['endtime']=utils[_0x336c('0x1f')]();channels[_0x33dfc6[_0x336c('0x7')]][_0x336c('0x34')]=utils[_0x336c('0x35')](channels[_0x33dfc6['uniqueid']][_0x336c('0x36')],channels[_0x33dfc6[_0x336c('0x7')]]['starttime']);channels[_0x33dfc6[_0x336c('0x7')]][_0x336c('0x37')]=channels[_0x33dfc6[_0x336c('0x7')]]['answertime']?utils[_0x336c('0x35')](channels[_0x33dfc6[_0x336c('0x7')]][_0x336c('0x36')],channels[_0x33dfc6[_0x336c('0x7')]][_0x336c('0x2a')]):0x0;writeDB(channels[_0x33dfc6[_0x336c('0x7')]]);}}catch(_0x2380b7){utils[_0x336c('0x21')](util[_0x336c('0xa')](_0x336c('0x2f'),_0x33dfc6['uniqueid']),_0x2380b7);}};exports[_0x336c('0x38')]=function(_0x2bc341){try{if(!_[_0x336c('0x25')](channels[_0x2bc341['localtwolinkedid']])){utils[_0x336c('0x19')](util[_0x336c('0xa')]('[%s][calls][attendedtransfer]',_0x2bc341[_0x336c('0x39')]),_0x2bc341);if(channels[_0x2bc341[_0x336c('0x3a')]][_0x336c('0xc')]==_0x2bc341[_0x336c('0x3b')]){utils['info'](util[_0x336c('0xa')](_0x336c('0x3c'),_0x2bc341['origtransfereruniqueid'],_0x2bc341[_0x336c('0x3a')],_0x2bc341[_0x336c('0x3d')]));channels[_0x2bc341['localtwolinkedid']][_0x336c('0x3e')]=_0x2bc341[_0x336c('0x3d')];channels[_0x2bc341[_0x336c('0x3a')]][_0x336c('0x3f')]='_attended';}else if(channels[_0x2bc341[_0x336c('0x3a')]][_0x336c('0xc')]=_0x2bc341[_0x336c('0x40')]){utils[_0x336c('0x9')](util[_0x336c('0xa')](_0x336c('0x3c'),_0x2bc341[_0x336c('0x39')],_0x2bc341[_0x336c('0x3a')],_0x2bc341[_0x336c('0x41')]));channels[_0x2bc341['localtwolinkedid']][_0x336c('0x3e')]=_0x2bc341[_0x336c('0x41')];channels[_0x2bc341[_0x336c('0x3a')]][_0x336c('0x3f')]=_0x336c('0x42');}}}catch(_0x1f2f8f){utils[_0x336c('0x21')](util[_0x336c('0xa')](_0x336c('0x43'),_0x2bc341[_0x336c('0x39')]),_0x1f2f8f);}};exports[_0x336c('0x44')]=function(_0x1aee22){try{if(!_[_0x336c('0x25')](channels[_0x1aee22['uniqueid']])){utils[_0x336c('0x19')](util['format']('[%s][calls][musiconholdstart]',_0x1aee22[_0x336c('0x7')]),_0x1aee22);channels[_0x1aee22['uniqueid']]['musiconholdstartAt']=utils[_0x336c('0x1f')]();utils['info'](util[_0x336c('0xa')](_0x336c('0x45'),_0x1aee22[_0x336c('0x7')],channels[_0x1aee22[_0x336c('0x7')]]['musiconholdstartAt']));}}catch(_0x4fa4bf){utils[_0x336c('0x21')](util[_0x336c('0xa')]('[%s][calls][musiconholdstart]',_0x1aee22[_0x336c('0x7')]),_0x4fa4bf);}};exports[_0x336c('0x46')]=function(_0x5dd939){try{if(!_[_0x336c('0x25')](channels[_0x5dd939[_0x336c('0x7')]])){utils[_0x336c('0x19')](util[_0x336c('0xa')]('[%s][calls][musiconholdstop]',_0x5dd939[_0x336c('0x7')]),_0x5dd939);if(!_[_0x336c('0x25')](channels[_0x5dd939['uniqueid']]['musiconholdstartAt'])){channels[_0x5dd939['uniqueid']]['mohtime']+=utils['diffTime'](utils[_0x336c('0x1f')](),channels[_0x5dd939[_0x336c('0x7')]][_0x336c('0x47')]);utils[_0x336c('0x9')](util['format'](_0x336c('0x48'),_0x5dd939[_0x336c('0x7')],channels[_0x5dd939[_0x336c('0x7')]][_0x336c('0x49')]));delete channels[_0x5dd939['uniqueid']][_0x336c('0x47')];}}}catch(_0x4cfbd4){utils[_0x336c('0x21')](util[_0x336c('0xa')](_0x336c('0x4a'),_0x5dd939[_0x336c('0x7')]),_0x4cfbd4);}};exports[_0x336c('0x4b')]=function(_0x171b00){try{if(!_['isNil'](channels[_0x171b00['uniqueid']])){utils[_0x336c('0x19')](util[_0x336c('0xa')]('[%s][calls][varset]',_0x171b00[_0x336c('0x7')]),_0x171b00);if(!_[_0x336c('0x25')](_0x171b00[_0x336c('0x4c')]['xmd-originatecalleridnum'])){utils['info'](util[_0x336c('0xa')](_0x336c('0x4d'),_0x171b00[_0x336c('0x7')],_0x171b00[_0x336c('0x4e')]));channels[_0x171b00[_0x336c('0x7')]][_0x336c('0x4f')]=_0x171b00['value'];}if(!_[_0x336c('0x25')](_0x171b00[_0x336c('0x4c')][_0x336c('0x50')])){utils['info'](util['format'](_0x336c('0x51'),_0x171b00[_0x336c('0x7')],_0x171b00[_0x336c('0x4e')]));channels[_0x171b00[_0x336c('0x7')]][_0x336c('0x52')]=_0x171b00[_0x336c('0x4e')];channels[_0x171b00[_0x336c('0x7')]][_0x336c('0x30')]='\x22'+_0x171b00[_0x336c('0x4e')]+_0x336c('0x53')+_0x171b00[_0x336c('0x4e')]+'>';}if(!_[_0x336c('0x25')](_0x171b00[_0x336c('0x4c')]['xmd-callerid-preview'])||!_['isNil'](_0x171b00['variable']['xmd-callerid'])){utils[_0x336c('0x9')](util[_0x336c('0xa')]('[%s][calls][varset]\x20variable:%s\x20value:%s',_0x171b00[_0x336c('0x7')],!_[_0x336c('0x25')](_0x171b00[_0x336c('0x4c')][_0x336c('0x54')])?_0x336c('0x54'):_0x336c('0x55'),_0x171b00['value']));channels[_0x171b00[_0x336c('0x7')]]['callerid']=_0x171b00[_0x336c('0x4e')];}if(!_[_0x336c('0x25')](_0x171b00[_0x336c('0x4c')]['xmd-queue'])||!_[_0x336c('0x25')](_0x171b00[_0x336c('0x4c')]['xmcs-queue'])){utils[_0x336c('0x9')](util['format'](_0x336c('0x56'),_0x171b00[_0x336c('0x7')],!_[_0x336c('0x25')](_0x171b00[_0x336c('0x4c')][_0x336c('0x57')])?_0x336c('0x57'):'xmcs-queue',_0x171b00[_0x336c('0x4e')]));channels[_0x171b00['uniqueid']]['lastapplication']='Queue';channels[_0x171b00['uniqueid']]['lastdata']=_0x171b00['value'];channels[_0x171b00[_0x336c('0x7')]][_0x336c('0xd')]=!![];}if(!_[_0x336c('0x25')](_0x171b00[_0x336c('0x4c')][_0x336c('0x58')])){utils[_0x336c('0x9')](util[_0x336c('0xa')]('[%s][calls][varset]\x20variable:xmd-contactid\x20value:%s',_0x171b00[_0x336c('0x7')],_0x171b00[_0x336c('0x4e')]));channels[_0x171b00[_0x336c('0x7')]][_0x336c('0x59')]=_0x171b00['value'];}if(!_[_0x336c('0x25')](_0x171b00[_0x336c('0x4c')][_0x336c('0x5a')])){utils['info'](util[_0x336c('0xa')](_0x336c('0x5b'),_0x171b00[_0x336c('0x7')],_0x171b00[_0x336c('0x4e')]));channels[_0x171b00[_0x336c('0x7')]][_0x336c('0x5c')]=_0x171b00[_0x336c('0x4e')];}if(!_['isNil'](_0x171b00['variable'][_0x336c('0x5d')])){utils[_0x336c('0x9')](util[_0x336c('0xa')](_0x336c('0x5e'),_0x171b00[_0x336c('0x7')],_0x171b00[_0x336c('0x4e')]));channels[_0x171b00[_0x336c('0x7')]][_0x336c('0x5f')]=_0x171b00['value'];}if(!_[_0x336c('0x25')](_0x171b00[_0x336c('0x4c')]['sipcallid'])){utils[_0x336c('0x9')](util[_0x336c('0xa')]('[%s][calls][varset]\x20variable:sipcallid\x20value:%s',_0x171b00['uniqueid'],_0x171b00[_0x336c('0x4e')]));channels[_0x171b00['uniqueid']][_0x336c('0x60')]=_0x171b00[_0x336c('0x4e')];}}}catch(_0x4e2776){utils[_0x336c('0x21')](util[_0x336c('0xa')](_0x336c('0x61'),_0x171b00[_0x336c('0x7')]),_0x4e2776);}};exports['newexten']=function(_0x4578ee){try{if(!_[_0x336c('0x25')](channels[_0x4578ee[_0x336c('0x7')]])){utils['debug'](util['format']('[%s][calls][newexten]',_0x4578ee['uniqueid']),_0x4578ee);utils['info'](util[_0x336c('0xa')]('[%s][calls][newexten]\x20application:%s\x20appdata:%s',_0x4578ee[_0x336c('0x7')],_0x4578ee['application'],_0x4578ee['appdata']));if(_0x4578ee[_0x336c('0x62')][_0x336c('0x63')]()=='set'&&_[_0x336c('0x64')](_0x4578ee['appdata'][_0x336c('0x63')](),_0x336c('0x65'))){var _0xdccbda=_0x4578ee[_0x336c('0x66')][_0x336c('0x67')]('=');var _0x490aaa=_0xdccbda[0x0][_0x336c('0x68')](_0xdccbda[0x0][_0x336c('0x69')]('(')+0x1,_0xdccbda[0x0][_0x336c('0x69')](')'));var _0x5c5115=_0xdccbda[0x1];channels[_0x4578ee[_0x336c('0x7')]][_0x490aaa]=_0x5c5115;}if(!_[_0x336c('0x6a')]([_0x336c('0x2e'),_0x336c('0x6b'),_0x336c('0x6c'),_0x336c('0x6d'),_0x336c('0x6e')],_0x4578ee[_0x336c('0x62')]['toLowerCase']())){channels[_0x4578ee[_0x336c('0x7')]][_0x336c('0x6f')]=_0x4578ee[_0x336c('0x62')];channels[_0x4578ee[_0x336c('0x7')]]['lastdata']=_0x4578ee[_0x336c('0x66')];}}}catch(_0x57de54){utils[_0x336c('0x21')](util[_0x336c('0xa')](_0x336c('0x70'),_0x4578ee[_0x336c('0x7')]),_0x57de54);}}; \ No newline at end of file +var _0xff4c=['routeid','sipcallid','newexten','[%s][calls][newexten]','[%s][calls][newexten]\x20application:%s\x20appdata:%s','application','appdata','toLowerCase','set','startsWith','cdr','split','substring','lastIndexOf','includes','noop','gotoif','lodash','util','./transfers.controller','FAILED','NO\x20ANSWER','ANSWERED','BUSY','blinds','uniqueid','transfereeuniqueid','info','format','[%s][calls][writeDB]\x20channel:%s\x20queue:%s\x20agent:%s\x20interface:%s\x20calleridnum:%s\x20connectedlinenum:%s\x20lastevent:%s','channel','queue','membername','calleridnum','connectedlinenum','lastevent','accountcode','getUserByInternal','UserId','request','CreateVoiceCallReport','newchannel','debug','[%s][calls][newchannel]','[%s][calls][newchannel]\x20context:%s\x20exten:%s','context','exten','DOCUMENTATION','error','[%s][calls][newstate]','isNil','channelstate','[%s][calls][newstate]\x20context:%s\x20channel:%s','systemanswertime','now','linkedid','transfer','destinationchannel','answertime','disposition','toNumber','hangup','[%s][calls][hangup]','callerid','[%s][calls][hangup]\x20callerid:%s\x20reason:%s','cause-txt','endtime','duration','starttime','billableseconds','diffTime','attendedtransfer','localtwolinkedid','[%s][calls][attendedtransfer]','origtransfereruniqueid','transfereechannel','secondtransfererchannel','userfield','_attended','transfertargetchannel','origtransfererchannel','musiconholdstart','[%s][calls][musiconholdstart]','musiconholdstartAt','[%s][calls][musiconholdstart]\x20musiconholdstartAt:%s','musiconholdstop','[%s][calls][musiconholdstop]','mohtime','[%s][calls][musiconholdstop]\x20mohtime:%s','varset','[%s][calls][varset]','xmd-originatecalleridnum','[%s][calls][varset]\x20variable:xmd-originatecalleridnum\x20value:%s','value','source','xmd-phone','[%s][calls][varset]\x20variable:xmd-phone\x20value:%s','destination','\x22\x20<','variable','xmd-callerid-preview','xmd-callerid','[%s][calls][varset]\x20variable:%s\x20value:%s','xmd-queue','xmcs-queue','lastapplication','Queue','lastdata','[%s][calls][varset]\x20variable:xmd-contactid\x20value:%s','xmd-cdrtype','[%s][calls][varset]\x20variable:xmd-cdrtype\x20value:%s','type','outboundrouteid','[%s][calls][varset]\x20variable:outboundrouteid\x20value:%s'];(function(_0x4ee64f,_0x43a8de){var _0x15d35a=function(_0x51c2a9){while(--_0x51c2a9){_0x4ee64f['push'](_0x4ee64f['shift']());}};_0x15d35a(++_0x43a8de);}(_0xff4c,0x167));var _0xcff4=function(_0x10d34b,_0x4fef76){_0x10d34b=_0x10d34b-0x0;var _0x92b0bf=_0xff4c[_0x10d34b];return _0x92b0bf;};'use strict';var _=require(_0xcff4('0x0'));var util=require(_0xcff4('0x1'));var utils=require('./utils');var transfers=require(_0xcff4('0x2'));var dispositions=['NO\x20ANSWER',_0xcff4('0x3'),_0xcff4('0x3'),'NO\x20ANSWER',_0xcff4('0x4'),_0xcff4('0x4'),_0xcff4('0x5'),_0xcff4('0x6'),_0xcff4('0x3'),'FAILED',_0xcff4('0x3')];var channels={};function writeDB(_0x37f75c){var _0x44c9fa;if(transfers[_0xcff4('0x7')][_0x37f75c[_0xcff4('0x8')]]){_0x44c9fa=_0x37f75c['uniqueid'];_0x37f75c[_0xcff4('0x8')]=transfers[_0xcff4('0x7')][_0x37f75c[_0xcff4('0x8')]][_0xcff4('0x9')];}utils[_0xcff4('0xa')](util[_0xcff4('0xb')](_0xcff4('0xc'),_0x37f75c['uniqueid'],_0x37f75c[_0xcff4('0xd')],_0x37f75c[_0xcff4('0xe')],_0x37f75c[_0xcff4('0xf')],_0x37f75c['interface'],_0x37f75c[_0xcff4('0x10')],_0x37f75c[_0xcff4('0x11')],_0x37f75c[_0xcff4('0x12')]));if(_0x37f75c[_0xcff4('0x13')]){utils[_0xcff4('0x14')](_0x37f75c['accountcode'])['then'](function(_0x12ee37){if(_0x12ee37){_0x37f75c[_0xcff4('0x15')]=_0x12ee37['id'];}utils['request']('CreateVoiceCallReport',_0x37f75c);});}else{utils[_0xcff4('0x16')](_0xcff4('0x17'),_0x37f75c);}if(channels[_0x37f75c[_0xcff4('0x8')]]){delete channels[_0x37f75c[_0xcff4('0x8')]];}else if(_0x44c9fa&&channels[_0x44c9fa]){if(!transfers[_0xcff4('0x7')][_0x44c9fa]['recording'])delete transfers['blinds'][_0x44c9fa];delete channels[_0x44c9fa];}}exports[_0xcff4('0x18')]=function(_0x628d54){try{utils[_0xcff4('0x19')](util[_0xcff4('0xb')](_0xcff4('0x1a'),_0x628d54[_0xcff4('0x8')]),_0x628d54);if(_0x628d54['uniqueid']==_0x628d54['linkedid']&&_0x628d54[_0xcff4('0xd')]!='OutgoingSpoolFailed'){utils['info'](util[_0xcff4('0xb')](_0xcff4('0x1b'),_0x628d54['uniqueid'],_0x628d54[_0xcff4('0x1c')],_0x628d54[_0xcff4('0x1d')]));channels[_0x628d54[_0xcff4('0x8')]]={'uniqueid':_0x628d54['uniqueid'],'accountcode':_0x628d54[_0xcff4('0x13')],'source':_0x628d54[_0xcff4('0x10')],'destination':_0x628d54[_0xcff4('0x1d')],'destinationcontext':_0x628d54[_0xcff4('0x1c')],'channel':_0x628d54['channel'],'starttime':utils['now'](),'answertime':null,'systemanswertime':null,'mohtime':0x0,'disposition':_0xcff4('0x4'),'amaflags':_0xcff4('0x1e')};}}catch(_0x3c6835){utils[_0xcff4('0x1f')](util[_0xcff4('0xb')](_0xcff4('0x1a'),_0x628d54[_0xcff4('0x8')]),_0x3c6835);}};exports['newstate']=function(_0x5acc7a){try{utils[_0xcff4('0x19')](util['format'](_0xcff4('0x20'),_0x5acc7a[_0xcff4('0x8')]),_0x5acc7a);if(!_[_0xcff4('0x21')](channels[_0x5acc7a[_0xcff4('0x8')]])&&_0x5acc7a[_0xcff4('0x22')]==0x6){utils[_0xcff4('0xa')](util[_0xcff4('0xb')](_0xcff4('0x23'),_0x5acc7a['uniqueid'],_0x5acc7a['context'],_0x5acc7a['channel']));if(_[_0xcff4('0x21')](channels[_0x5acc7a[_0xcff4('0x8')]][_0xcff4('0x24')])){channels[_0x5acc7a[_0xcff4('0x8')]][_0xcff4('0x24')]=utils[_0xcff4('0x25')]();}}else if(!_['isNil'](channels[_0x5acc7a[_0xcff4('0x26')]])&&_0x5acc7a[_0xcff4('0x22')]==0x6&&_0x5acc7a['context']!=_0xcff4('0x27')){utils[_0xcff4('0xa')](util[_0xcff4('0xb')]('[%s][calls][newstate]\x20linkedid:%s\x20context:%s\x20channel:%s',_0x5acc7a['uniqueid'],_0x5acc7a[_0xcff4('0x26')],_0x5acc7a[_0xcff4('0x1c')],_0x5acc7a[_0xcff4('0xd')]));channels[_0x5acc7a[_0xcff4('0x26')]]['accountcode']=_0x5acc7a[_0xcff4('0x13')];channels[_0x5acc7a[_0xcff4('0x26')]][_0xcff4('0x28')]=_0x5acc7a[_0xcff4('0xd')];if(_['isNil'](channels[_0x5acc7a['linkedid']][_0xcff4('0x29')])){channels[_0x5acc7a[_0xcff4('0x26')]]['answertime']=utils[_0xcff4('0x25')]();}channels[_0x5acc7a['linkedid']][_0xcff4('0x2a')]=dispositions[_[_0xcff4('0x2b')](_0x5acc7a[_0xcff4('0x22')])]||_0xcff4('0x5');}}catch(_0x495a86){utils[_0xcff4('0x1f')](util[_0xcff4('0xb')](_0xcff4('0x20'),_0x5acc7a[_0xcff4('0x8')]),_0x495a86);}};exports[_0xcff4('0x2c')]=function(_0x58d2e3){try{if(!_[_0xcff4('0x21')](channels[_0x58d2e3[_0xcff4('0x8')]])){utils['debug'](util['format'](_0xcff4('0x2d'),_0x58d2e3['uniqueid']),_0x58d2e3);if(_[_0xcff4('0x21')](channels[_0x58d2e3[_0xcff4('0x8')]][_0xcff4('0x2e')])){channels[_0x58d2e3[_0xcff4('0x8')]][_0xcff4('0x2e')]=_0x58d2e3['calleridname']+'\x20<'+_0x58d2e3['calleridnum']+'>';}utils[_0xcff4('0xa')](util['format'](_0xcff4('0x2f'),_0x58d2e3[_0xcff4('0x8')],channels[_0x58d2e3[_0xcff4('0x8')]][_0xcff4('0x2e')],_0x58d2e3[_0xcff4('0x30')]));channels[_0x58d2e3[_0xcff4('0x8')]][_0xcff4('0x31')]=utils[_0xcff4('0x25')]();channels[_0x58d2e3[_0xcff4('0x8')]][_0xcff4('0x32')]=utils['diffTime'](channels[_0x58d2e3[_0xcff4('0x8')]][_0xcff4('0x31')],channels[_0x58d2e3[_0xcff4('0x8')]][_0xcff4('0x33')]);channels[_0x58d2e3[_0xcff4('0x8')]][_0xcff4('0x34')]=channels[_0x58d2e3['uniqueid']][_0xcff4('0x29')]?utils[_0xcff4('0x35')](channels[_0x58d2e3[_0xcff4('0x8')]][_0xcff4('0x31')],channels[_0x58d2e3[_0xcff4('0x8')]][_0xcff4('0x29')]):0x0;writeDB(channels[_0x58d2e3['uniqueid']]);}}catch(_0x30d9ae){utils['error'](util['format']('[%s][calls][hangup]',_0x58d2e3[_0xcff4('0x8')]),_0x30d9ae);}};exports[_0xcff4('0x36')]=function(_0x593564){try{if(!_[_0xcff4('0x21')](channels[_0x593564[_0xcff4('0x37')]])){utils[_0xcff4('0x19')](util['format'](_0xcff4('0x38'),_0x593564[_0xcff4('0x39')]),_0x593564);if(channels[_0x593564[_0xcff4('0x37')]][_0xcff4('0xd')]==_0x593564[_0xcff4('0x3a')]){utils['info'](util[_0xcff4('0xb')]('[%s][calls][attendedtransfer]\x20localtwolinkedid:%s\x20destinationchannel:%s',_0x593564[_0xcff4('0x39')],_0x593564[_0xcff4('0x37')],_0x593564['secondtransfererchannel']));channels[_0x593564['localtwolinkedid']][_0xcff4('0x28')]=_0x593564[_0xcff4('0x3b')];channels[_0x593564[_0xcff4('0x37')]][_0xcff4('0x3c')]=_0xcff4('0x3d');}else if(channels[_0x593564['localtwolinkedid']][_0xcff4('0xd')]=_0x593564[_0xcff4('0x3e')]){utils[_0xcff4('0xa')](util['format']('[%s][calls][attendedtransfer]\x20localtwolinkedid:%s\x20destinationchannel:%s',_0x593564[_0xcff4('0x39')],_0x593564[_0xcff4('0x37')],_0x593564[_0xcff4('0x3f')]));channels[_0x593564['localtwolinkedid']][_0xcff4('0x28')]=_0x593564[_0xcff4('0x3f')];channels[_0x593564[_0xcff4('0x37')]][_0xcff4('0x3c')]=_0xcff4('0x3d');}}}catch(_0x8ad6fc){utils[_0xcff4('0x1f')](util['format'](_0xcff4('0x38'),_0x593564[_0xcff4('0x39')]),_0x8ad6fc);}};exports[_0xcff4('0x40')]=function(_0x3f4e24){try{if(!_['isNil'](channels[_0x3f4e24['uniqueid']])){utils[_0xcff4('0x19')](util['format'](_0xcff4('0x41'),_0x3f4e24['uniqueid']),_0x3f4e24);channels[_0x3f4e24[_0xcff4('0x8')]][_0xcff4('0x42')]=utils[_0xcff4('0x25')]();utils[_0xcff4('0xa')](util[_0xcff4('0xb')](_0xcff4('0x43'),_0x3f4e24[_0xcff4('0x8')],channels[_0x3f4e24[_0xcff4('0x8')]][_0xcff4('0x42')]));}}catch(_0x390257){utils[_0xcff4('0x1f')](util['format'](_0xcff4('0x41'),_0x3f4e24[_0xcff4('0x8')]),_0x390257);}};exports[_0xcff4('0x44')]=function(_0x369aae){try{if(!_[_0xcff4('0x21')](channels[_0x369aae[_0xcff4('0x8')]])){utils['debug'](util[_0xcff4('0xb')](_0xcff4('0x45'),_0x369aae[_0xcff4('0x8')]),_0x369aae);if(!_['isNil'](channels[_0x369aae['uniqueid']][_0xcff4('0x42')])){channels[_0x369aae[_0xcff4('0x8')]][_0xcff4('0x46')]+=utils[_0xcff4('0x35')](utils['now'](),channels[_0x369aae[_0xcff4('0x8')]][_0xcff4('0x42')]);utils[_0xcff4('0xa')](util[_0xcff4('0xb')](_0xcff4('0x47'),_0x369aae[_0xcff4('0x8')],channels[_0x369aae['uniqueid']][_0xcff4('0x46')]));delete channels[_0x369aae[_0xcff4('0x8')]][_0xcff4('0x42')];}}}catch(_0xabdfc){utils[_0xcff4('0x1f')](util[_0xcff4('0xb')](_0xcff4('0x45'),_0x369aae[_0xcff4('0x8')]),_0xabdfc);}};exports[_0xcff4('0x48')]=function(_0x1e82fa){try{if(!_[_0xcff4('0x21')](channels[_0x1e82fa['uniqueid']])){utils[_0xcff4('0x19')](util[_0xcff4('0xb')](_0xcff4('0x49'),_0x1e82fa['uniqueid']),_0x1e82fa);if(!_[_0xcff4('0x21')](_0x1e82fa['variable'][_0xcff4('0x4a')])){utils[_0xcff4('0xa')](util['format'](_0xcff4('0x4b'),_0x1e82fa[_0xcff4('0x8')],_0x1e82fa[_0xcff4('0x4c')]));channels[_0x1e82fa[_0xcff4('0x8')]][_0xcff4('0x4d')]=_0x1e82fa[_0xcff4('0x4c')];}if(!_[_0xcff4('0x21')](_0x1e82fa['variable'][_0xcff4('0x4e')])){utils['info'](util[_0xcff4('0xb')](_0xcff4('0x4f'),_0x1e82fa['uniqueid'],_0x1e82fa['value']));channels[_0x1e82fa[_0xcff4('0x8')]][_0xcff4('0x50')]=_0x1e82fa[_0xcff4('0x4c')];channels[_0x1e82fa[_0xcff4('0x8')]][_0xcff4('0x2e')]='\x22'+_0x1e82fa['value']+_0xcff4('0x51')+_0x1e82fa[_0xcff4('0x4c')]+'>';}if(!_['isNil'](_0x1e82fa[_0xcff4('0x52')][_0xcff4('0x53')])||!_['isNil'](_0x1e82fa[_0xcff4('0x52')][_0xcff4('0x54')])){utils[_0xcff4('0xa')](util[_0xcff4('0xb')](_0xcff4('0x55'),_0x1e82fa[_0xcff4('0x8')],!_[_0xcff4('0x21')](_0x1e82fa[_0xcff4('0x52')][_0xcff4('0x53')])?'xmd-callerid-preview':_0xcff4('0x54'),_0x1e82fa[_0xcff4('0x4c')]));channels[_0x1e82fa[_0xcff4('0x8')]]['callerid']=_0x1e82fa[_0xcff4('0x4c')];}if(!_[_0xcff4('0x21')](_0x1e82fa[_0xcff4('0x52')][_0xcff4('0x56')])||!_['isNil'](_0x1e82fa[_0xcff4('0x52')]['xmcs-queue'])){utils[_0xcff4('0xa')](util[_0xcff4('0xb')](_0xcff4('0x55'),_0x1e82fa['uniqueid'],!_['isNil'](_0x1e82fa['variable'][_0xcff4('0x56')])?_0xcff4('0x56'):_0xcff4('0x57'),_0x1e82fa['value']));channels[_0x1e82fa['uniqueid']][_0xcff4('0x58')]=_0xcff4('0x59');channels[_0x1e82fa[_0xcff4('0x8')]][_0xcff4('0x5a')]=_0x1e82fa[_0xcff4('0x4c')];channels[_0x1e82fa['uniqueid']][_0xcff4('0xe')]=!![];}if(!_[_0xcff4('0x21')](_0x1e82fa[_0xcff4('0x52')]['xmd-contactid'])){utils[_0xcff4('0xa')](util[_0xcff4('0xb')](_0xcff4('0x5b'),_0x1e82fa[_0xcff4('0x8')],_0x1e82fa[_0xcff4('0x4c')]));channels[_0x1e82fa[_0xcff4('0x8')]]['ContactId']=_0x1e82fa['value'];}if(!_[_0xcff4('0x21')](_0x1e82fa[_0xcff4('0x52')][_0xcff4('0x5c')])){utils[_0xcff4('0xa')](util['format'](_0xcff4('0x5d'),_0x1e82fa[_0xcff4('0x8')],_0x1e82fa[_0xcff4('0x4c')]));channels[_0x1e82fa['uniqueid']][_0xcff4('0x5e')]=_0x1e82fa[_0xcff4('0x4c')];}if(!_['isNil'](_0x1e82fa[_0xcff4('0x52')][_0xcff4('0x5f')])){utils[_0xcff4('0xa')](util[_0xcff4('0xb')](_0xcff4('0x60'),_0x1e82fa[_0xcff4('0x8')],_0x1e82fa[_0xcff4('0x4c')]));channels[_0x1e82fa['uniqueid']][_0xcff4('0x61')]=_0x1e82fa[_0xcff4('0x4c')];}if(!_[_0xcff4('0x21')](_0x1e82fa[_0xcff4('0x52')][_0xcff4('0x62')])){utils['info'](util[_0xcff4('0xb')]('[%s][calls][varset]\x20variable:sipcallid\x20value:%s',_0x1e82fa['uniqueid'],_0x1e82fa['value']));channels[_0x1e82fa[_0xcff4('0x8')]][_0xcff4('0x62')]=_0x1e82fa['value'];}}}catch(_0xaf64b){utils[_0xcff4('0x1f')](util[_0xcff4('0xb')](_0xcff4('0x49'),_0x1e82fa[_0xcff4('0x8')]),_0xaf64b);}};exports[_0xcff4('0x63')]=function(_0x2e5986){try{if(!_[_0xcff4('0x21')](channels[_0x2e5986['uniqueid']])){utils[_0xcff4('0x19')](util[_0xcff4('0xb')](_0xcff4('0x64'),_0x2e5986[_0xcff4('0x8')]),_0x2e5986);utils[_0xcff4('0xa')](util[_0xcff4('0xb')](_0xcff4('0x65'),_0x2e5986[_0xcff4('0x8')],_0x2e5986[_0xcff4('0x66')],_0x2e5986[_0xcff4('0x67')]));if(_0x2e5986['application'][_0xcff4('0x68')]()==_0xcff4('0x69')&&_[_0xcff4('0x6a')](_0x2e5986[_0xcff4('0x67')][_0xcff4('0x68')](),_0xcff4('0x6b'))){var _0x5da65f=_0x2e5986['appdata'][_0xcff4('0x6c')]('=');var _0x140427=_0x5da65f[0x0][_0xcff4('0x6d')](_0x5da65f[0x0][_0xcff4('0x6e')]('(')+0x1,_0x5da65f[0x0][_0xcff4('0x6e')](')'));var _0x8bd25e=_0x5da65f[0x1];channels[_0x2e5986[_0xcff4('0x8')]][_0x140427]=_0x8bd25e;}if(!_[_0xcff4('0x6f')]([_0xcff4('0x2c'),_0xcff4('0x70'),'execif',_0xcff4('0x69'),_0xcff4('0x71')],_0x2e5986[_0xcff4('0x66')][_0xcff4('0x68')]())){channels[_0x2e5986[_0xcff4('0x8')]][_0xcff4('0x58')]=_0x2e5986[_0xcff4('0x66')];channels[_0x2e5986['uniqueid']][_0xcff4('0x5a')]=_0x2e5986[_0xcff4('0x67')];}}}catch(_0x20ca89){utils[_0xcff4('0x1f')](util[_0xcff4('0xb')]('[%s][calls][newexten]',_0x2e5986[_0xcff4('0x8')]),_0x20ca89);}}; \ No newline at end of file diff --git a/server/services/xdr/core.controller.js b/server/services/xdr/core.controller.js index 452d22c..b6d9a43 100644 --- a/server/services/xdr/core.controller.js +++ b/server/services/xdr/core.controller.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x5d5f=['./utils','connect','info','[core]\x20connected','shutdown','[core]\x20shutdown','[core]\x20fullybooted','error','[core]\x20error','close','[core]\x20close'];(function(_0x222c9f,_0x515cd0){var _0x3e74b5=function(_0x1597c4){while(--_0x1597c4){_0x222c9f['push'](_0x222c9f['shift']());}};_0x3e74b5(++_0x515cd0);}(_0x5d5f,0x1ef));var _0xf5d5=function(_0x281ee3,_0x42691e){_0x281ee3=_0x281ee3-0x0;var _0x5242cf=_0x5d5f[_0x281ee3];return _0x5242cf;};'use strict';var utils=require(_0xf5d5('0x0'));exports[_0xf5d5('0x1')]=function(){utils[_0xf5d5('0x2')](_0xf5d5('0x3'));};exports[_0xf5d5('0x4')]=function(){utils['info'](_0xf5d5('0x5'));};exports['fullybooted']=function(){utils[_0xf5d5('0x2')](_0xf5d5('0x6'));};exports[_0xf5d5('0x7')]=function(_0x2fbc7c){utils[_0xf5d5('0x7')](_0xf5d5('0x8'),_0x2fbc7c);};exports[_0xf5d5('0x9')]=function(){utils['info'](_0xf5d5('0xa'));};exports['managerevent']=function(_0x161f37){}; \ No newline at end of file +var _0x60ba=['[core]\x20error','close','[core]\x20close','managerevent','connect','info','[core]\x20connected','[core]\x20shutdown','fullybooted','[core]\x20fullybooted','error'];(function(_0x447ef1,_0x374cd2){var _0x3d72ec=function(_0x3e10b){while(--_0x3e10b){_0x447ef1['push'](_0x447ef1['shift']());}};_0x3d72ec(++_0x374cd2);}(_0x60ba,0x12d));var _0xa60b=function(_0x3947c9,_0x4d6c97){_0x3947c9=_0x3947c9-0x0;var _0x2e7871=_0x60ba[_0x3947c9];return _0x2e7871;};'use strict';var utils=require('./utils');exports[_0xa60b('0x0')]=function(){utils[_0xa60b('0x1')](_0xa60b('0x2'));};exports['shutdown']=function(){utils[_0xa60b('0x1')](_0xa60b('0x3'));};exports[_0xa60b('0x4')]=function(){utils[_0xa60b('0x1')](_0xa60b('0x5'));};exports[_0xa60b('0x6')]=function(_0x41acca){utils[_0xa60b('0x6')](_0xa60b('0x7'),_0x41acca);};exports[_0xa60b('0x8')]=function(){utils[_0xa60b('0x1')](_0xa60b('0x9'));};exports[_0xa60b('0xa')]=function(_0x21cbcd){}; \ No newline at end of file diff --git a/server/services/xdr/dials.controller.js b/server/services/xdr/dials.controller.js index 57bce68..4826388 100644 --- a/server/services/xdr/dials.controller.js +++ b/server/services/xdr/dials.controller.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x19f7=['startsWith','appdata','split','error','varset','[%s][dials][varset]','isNil','outboundrouteid','[%s][dials][varset]\x20variable:outboundrouteid\x20value:%s','dialbegin','[%s][dials][dialbegin]','assign','starttime','now','lastevent','called','[%s][dials][hangup]\x20starttime:%s\x20lastevent:called','dialend','[%s][dials][dialend]','ANSWER','answertime','[%s][dials][dialend]\x20dialstatus:%s\x20answertime:%s\x20lastevent:connect','[%s][dials][dialend]\x20dialstatus:%s','[%s][dials][hangup]\x20calleridnum:%s\x20calleridname:%s\x20lastevent:complete\x20reason:%s','calleridname','cause-txt','complete','diffTime','endtime','holdtime','[%s][dials][hangup]','lodash','util','./utils','info','format','[%s][dials][writeDB]\x20channel:%s\x20dialstring:%s\x20calleridnum:%s\x20connectedlinenum:%s\x20dialstatus:%s','channel','dialstring','calleridnum','dialstatus','request','CreateVoiceDialReport','uniqueid','debug','[%s][dials][newexten]','[%s][dials][newexten]\x20application:%s\x20appdata:%s','application','toLowerCase','set'];(function(_0x4c75f,_0x535f31){var _0x2a1970=function(_0x369638){while(--_0x369638){_0x4c75f['push'](_0x4c75f['shift']());}};_0x2a1970(++_0x535f31);}(_0x19f7,0x14b));var _0x719f=function(_0x13ae53,_0x4729cc){_0x13ae53=_0x13ae53-0x0;var _0x247e55=_0x19f7[_0x13ae53];return _0x247e55;};'use strict';var _=require(_0x719f('0x0'));var util=require(_0x719f('0x1'));var utils=require(_0x719f('0x2'));var dials={};function writeDB(_0x366335){utils[_0x719f('0x3')](util[_0x719f('0x4')](_0x719f('0x5'),_0x366335['uniqueid'],_0x366335[_0x719f('0x6')],_0x366335[_0x719f('0x7')],_0x366335[_0x719f('0x8')],_0x366335['connectedlinenum'],_0x366335[_0x719f('0x9')]));utils[_0x719f('0xa')](_0x719f('0xb'),_0x366335);delete dials[_0x366335[_0x719f('0xc')]];}exports['newexten']=function(_0x46597c){try{utils[_0x719f('0xd')](util['format'](_0x719f('0xe'),_0x46597c[_0x719f('0xc')]),_0x46597c);utils[_0x719f('0x3')](util['format'](_0x719f('0xf'),_0x46597c[_0x719f('0xc')],_0x46597c[_0x719f('0x10')],_0x46597c['appdata']));if(_0x46597c[_0x719f('0x10')][_0x719f('0x11')]()==_0x719f('0x12')&&_[_0x719f('0x13')](_0x46597c[_0x719f('0x14')][_0x719f('0x11')](),'cdr(routeid)')){var _0x48ddba=_0x46597c[_0x719f('0x14')][_0x719f('0x15')]('=');dials[_0x46597c[_0x719f('0xc')]]={'routeId':_0x48ddba[0x1]};}}catch(_0x3d8334){utils[_0x719f('0x16')](util[_0x719f('0x4')]('[%s][dials][newexten]',_0x46597c[_0x719f('0xc')]),_0x3d8334);}};exports[_0x719f('0x17')]=function(_0x3184e4){try{utils[_0x719f('0xd')](util[_0x719f('0x4')](_0x719f('0x18'),_0x3184e4[_0x719f('0xc')]),_0x3184e4);if(!_[_0x719f('0x19')](_0x3184e4['variable'][_0x719f('0x1a')])){utils[_0x719f('0x3')](util[_0x719f('0x4')](_0x719f('0x1b'),_0x3184e4[_0x719f('0xc')],_0x3184e4['value']));dials[_0x3184e4[_0x719f('0xc')]]={'routeId':_0x3184e4['value']};}}catch(_0x579aed){utils[_0x719f('0x16')](util[_0x719f('0x4')](_0x719f('0x18'),_0x3184e4['uniqueid']),_0x579aed);}};exports[_0x719f('0x1c')]=function(_0x40c226){try{if(!_[_0x719f('0x19')](dials[_0x40c226[_0x719f('0xc')]])){utils[_0x719f('0xd')](util[_0x719f('0x4')](_0x719f('0x1d'),_0x40c226['uniqueid']),_0x40c226);dials[_0x40c226[_0x719f('0xc')]]=_[_0x719f('0x1e')](dials[_0x40c226[_0x719f('0xc')]],_0x40c226);dials[_0x40c226[_0x719f('0xc')]][_0x719f('0x1f')]=utils[_0x719f('0x20')]();dials[_0x40c226[_0x719f('0xc')]][_0x719f('0x21')]=_0x719f('0x22');utils[_0x719f('0x3')](util['format'](_0x719f('0x23'),_0x40c226[_0x719f('0xc')],dials[_0x40c226['uniqueid']][_0x719f('0x1f')]));}}catch(_0x1d4141){utils[_0x719f('0x16')](util['format'](_0x719f('0x1d'),_0x40c226[_0x719f('0xc')]),_0x1d4141);}};exports[_0x719f('0x24')]=function(_0x15ef78){try{if(!_[_0x719f('0x19')](dials[_0x15ef78[_0x719f('0xc')]])){utils[_0x719f('0xd')](util[_0x719f('0x4')](_0x719f('0x25'),_0x15ef78['uniqueid']),_0x15ef78);dials[_0x15ef78[_0x719f('0xc')]][_0x719f('0x9')]=_0x15ef78[_0x719f('0x9')];if(_0x15ef78['dialstatus']==_0x719f('0x26')){dials[_0x15ef78[_0x719f('0xc')]]=_['assign'](dials[_0x15ef78[_0x719f('0xc')]],_0x15ef78);dials[_0x15ef78[_0x719f('0xc')]][_0x719f('0x27')]=utils[_0x719f('0x20')]();dials[_0x15ef78[_0x719f('0xc')]][_0x719f('0x21')]='connect';utils[_0x719f('0x3')](util[_0x719f('0x4')](_0x719f('0x28'),_0x15ef78['uniqueid'],_0x15ef78['dialstatus'],dials[_0x15ef78[_0x719f('0xc')]][_0x719f('0x27')]));}else{utils['info'](util['format'](_0x719f('0x29'),_0x15ef78[_0x719f('0xc')],_0x15ef78['dialstatus']));}}}catch(_0x4c1084){utils[_0x719f('0x16')](util[_0x719f('0x4')](_0x719f('0x25'),_0x15ef78[_0x719f('0xc')]),_0x4c1084);}};exports['hangup']=function(_0x2560f9){try{if(!_['isNil'](dials[_0x2560f9[_0x719f('0xc')]])){utils['debug'](util[_0x719f('0x4')]('[%s][dials][hangup]',_0x2560f9[_0x719f('0xc')]),_0x2560f9);utils[_0x719f('0x3')](util[_0x719f('0x4')](_0x719f('0x2a'),_0x2560f9[_0x719f('0xc')],_0x2560f9['calleridnum'],_0x2560f9[_0x719f('0x2b')],_0x2560f9[_0x719f('0x2c')]));dials[_0x2560f9[_0x719f('0xc')]]=_[_0x719f('0x1e')](dials[_0x2560f9[_0x719f('0xc')]],{'endtime':utils[_0x719f('0x20')](),'lastevent':_0x719f('0x2d')});dials[_0x2560f9[_0x719f('0xc')]]['duration']=utils[_0x719f('0x2e')](dials[_0x2560f9[_0x719f('0xc')]][_0x719f('0x2f')],dials[_0x2560f9[_0x719f('0xc')]][_0x719f('0x1f')]);dials[_0x2560f9['uniqueid']][_0x719f('0x30')]=utils[_0x719f('0x2e')](dials[_0x2560f9['uniqueid']]['answertime']||dials[_0x2560f9[_0x719f('0xc')]][_0x719f('0x2f')],dials[_0x2560f9[_0x719f('0xc')]][_0x719f('0x1f')]);dials[_0x2560f9[_0x719f('0xc')]]['billableseconds']=dials[_0x2560f9[_0x719f('0xc')]][_0x719f('0x27')]?utils[_0x719f('0x2e')](dials[_0x2560f9[_0x719f('0xc')]][_0x719f('0x2f')],dials[_0x2560f9[_0x719f('0xc')]][_0x719f('0x27')]):0x0;writeDB(dials[_0x2560f9[_0x719f('0xc')]]);}}catch(_0xc3ac6c){utils[_0x719f('0x16')](util[_0x719f('0x4')](_0x719f('0x31'),_0x2560f9['uniqueid']),_0xc3ac6c);}}; \ No newline at end of file +var _0xf601=['[%s][dials][newexten]\x20application:%s\x20appdata:%s','application','appdata','set','toLowerCase','split','[%s][dials][newexten]','[%s][dials][varset]','isNil','variable','outboundrouteid','[%s][dials][varset]\x20variable:outboundrouteid\x20value:%s','value','error','dialbegin','[%s][dials][dialbegin]','starttime','now','lastevent','[%s][dials][hangup]\x20starttime:%s\x20lastevent:called','dialend','[%s][dials][dialend]','ANSWER','answertime','[%s][dials][dialend]\x20dialstatus:%s\x20answertime:%s\x20lastevent:connect','[%s][dials][dialend]\x20dialstatus:%s','hangup','[%s][dials][hangup]','[%s][dials][hangup]\x20calleridnum:%s\x20calleridname:%s\x20lastevent:complete\x20reason:%s','cause-txt','complete','duration','diffTime','holdtime','endtime','billableseconds','lodash','util','./utils','info','format','uniqueid','channel','dialstring','calleridnum','connectedlinenum','dialstatus','request','CreateVoiceDialReport','newexten','debug'];(function(_0x2e2681,_0x4089c1){var _0x368a64=function(_0x267262){while(--_0x267262){_0x2e2681['push'](_0x2e2681['shift']());}};_0x368a64(++_0x4089c1);}(_0xf601,0xf0));var _0x1f60=function(_0x1bf90c,_0x4b9dff){_0x1bf90c=_0x1bf90c-0x0;var _0x1c0e24=_0xf601[_0x1bf90c];return _0x1c0e24;};'use strict';var _=require(_0x1f60('0x0'));var util=require(_0x1f60('0x1'));var utils=require(_0x1f60('0x2'));var dials={};function writeDB(_0x563503){utils[_0x1f60('0x3')](util[_0x1f60('0x4')]('[%s][dials][writeDB]\x20channel:%s\x20dialstring:%s\x20calleridnum:%s\x20connectedlinenum:%s\x20dialstatus:%s',_0x563503[_0x1f60('0x5')],_0x563503[_0x1f60('0x6')],_0x563503[_0x1f60('0x7')],_0x563503[_0x1f60('0x8')],_0x563503[_0x1f60('0x9')],_0x563503[_0x1f60('0xa')]));utils[_0x1f60('0xb')](_0x1f60('0xc'),_0x563503);delete dials[_0x563503['uniqueid']];}exports[_0x1f60('0xd')]=function(_0x144fe4){try{utils[_0x1f60('0xe')](util[_0x1f60('0x4')]('[%s][dials][newexten]',_0x144fe4[_0x1f60('0x5')]),_0x144fe4);utils[_0x1f60('0x3')](util[_0x1f60('0x4')](_0x1f60('0xf'),_0x144fe4[_0x1f60('0x5')],_0x144fe4[_0x1f60('0x10')],_0x144fe4[_0x1f60('0x11')]));if(_0x144fe4[_0x1f60('0x10')]['toLowerCase']()==_0x1f60('0x12')&&_['startsWith'](_0x144fe4[_0x1f60('0x11')][_0x1f60('0x13')](),'cdr(routeid)')){var _0x19547c=_0x144fe4[_0x1f60('0x11')][_0x1f60('0x14')]('=');dials[_0x144fe4['uniqueid']]={'routeId':_0x19547c[0x1]};}}catch(_0x4382b2){utils['error'](util[_0x1f60('0x4')](_0x1f60('0x15'),_0x144fe4['uniqueid']),_0x4382b2);}};exports['varset']=function(_0x2232be){try{utils[_0x1f60('0xe')](util[_0x1f60('0x4')](_0x1f60('0x16'),_0x2232be[_0x1f60('0x5')]),_0x2232be);if(!_[_0x1f60('0x17')](_0x2232be[_0x1f60('0x18')][_0x1f60('0x19')])){utils['info'](util[_0x1f60('0x4')](_0x1f60('0x1a'),_0x2232be[_0x1f60('0x5')],_0x2232be[_0x1f60('0x1b')]));dials[_0x2232be[_0x1f60('0x5')]]={'routeId':_0x2232be[_0x1f60('0x1b')]};}}catch(_0x200d98){utils[_0x1f60('0x1c')](util['format'](_0x1f60('0x16'),_0x2232be['uniqueid']),_0x200d98);}};exports[_0x1f60('0x1d')]=function(_0x4f0a16){try{if(!_[_0x1f60('0x17')](dials[_0x4f0a16[_0x1f60('0x5')]])){utils[_0x1f60('0xe')](util[_0x1f60('0x4')](_0x1f60('0x1e'),_0x4f0a16[_0x1f60('0x5')]),_0x4f0a16);dials[_0x4f0a16[_0x1f60('0x5')]]=_['assign'](dials[_0x4f0a16['uniqueid']],_0x4f0a16);dials[_0x4f0a16['uniqueid']][_0x1f60('0x1f')]=utils[_0x1f60('0x20')]();dials[_0x4f0a16['uniqueid']][_0x1f60('0x21')]='called';utils[_0x1f60('0x3')](util[_0x1f60('0x4')](_0x1f60('0x22'),_0x4f0a16[_0x1f60('0x5')],dials[_0x4f0a16[_0x1f60('0x5')]]['starttime']));}}catch(_0x1b5e53){utils[_0x1f60('0x1c')](util[_0x1f60('0x4')](_0x1f60('0x1e'),_0x4f0a16['uniqueid']),_0x1b5e53);}};exports[_0x1f60('0x23')]=function(_0x4c7238){try{if(!_[_0x1f60('0x17')](dials[_0x4c7238[_0x1f60('0x5')]])){utils[_0x1f60('0xe')](util[_0x1f60('0x4')](_0x1f60('0x24'),_0x4c7238[_0x1f60('0x5')]),_0x4c7238);dials[_0x4c7238[_0x1f60('0x5')]][_0x1f60('0xa')]=_0x4c7238['dialstatus'];if(_0x4c7238[_0x1f60('0xa')]==_0x1f60('0x25')){dials[_0x4c7238['uniqueid']]=_['assign'](dials[_0x4c7238[_0x1f60('0x5')]],_0x4c7238);dials[_0x4c7238[_0x1f60('0x5')]][_0x1f60('0x26')]=utils[_0x1f60('0x20')]();dials[_0x4c7238[_0x1f60('0x5')]][_0x1f60('0x21')]='connect';utils[_0x1f60('0x3')](util[_0x1f60('0x4')](_0x1f60('0x27'),_0x4c7238['uniqueid'],_0x4c7238[_0x1f60('0xa')],dials[_0x4c7238['uniqueid']][_0x1f60('0x26')]));}else{utils[_0x1f60('0x3')](util[_0x1f60('0x4')](_0x1f60('0x28'),_0x4c7238[_0x1f60('0x5')],_0x4c7238[_0x1f60('0xa')]));}}}catch(_0x3c960d){utils[_0x1f60('0x1c')](util[_0x1f60('0x4')]('[%s][dials][dialend]',_0x4c7238[_0x1f60('0x5')]),_0x3c960d);}};exports[_0x1f60('0x29')]=function(_0x38edf9){try{if(!_[_0x1f60('0x17')](dials[_0x38edf9['uniqueid']])){utils['debug'](util[_0x1f60('0x4')](_0x1f60('0x2a'),_0x38edf9[_0x1f60('0x5')]),_0x38edf9);utils[_0x1f60('0x3')](util[_0x1f60('0x4')](_0x1f60('0x2b'),_0x38edf9['uniqueid'],_0x38edf9[_0x1f60('0x8')],_0x38edf9['calleridname'],_0x38edf9[_0x1f60('0x2c')]));dials[_0x38edf9[_0x1f60('0x5')]]=_['assign'](dials[_0x38edf9[_0x1f60('0x5')]],{'endtime':utils[_0x1f60('0x20')](),'lastevent':_0x1f60('0x2d')});dials[_0x38edf9[_0x1f60('0x5')]][_0x1f60('0x2e')]=utils[_0x1f60('0x2f')](dials[_0x38edf9[_0x1f60('0x5')]]['endtime'],dials[_0x38edf9['uniqueid']][_0x1f60('0x1f')]);dials[_0x38edf9[_0x1f60('0x5')]][_0x1f60('0x30')]=utils[_0x1f60('0x2f')](dials[_0x38edf9['uniqueid']][_0x1f60('0x26')]||dials[_0x38edf9[_0x1f60('0x5')]][_0x1f60('0x31')],dials[_0x38edf9['uniqueid']][_0x1f60('0x1f')]);dials[_0x38edf9[_0x1f60('0x5')]][_0x1f60('0x32')]=dials[_0x38edf9[_0x1f60('0x5')]][_0x1f60('0x26')]?utils[_0x1f60('0x2f')](dials[_0x38edf9[_0x1f60('0x5')]][_0x1f60('0x31')],dials[_0x38edf9[_0x1f60('0x5')]][_0x1f60('0x26')]):0x0;writeDB(dials[_0x38edf9[_0x1f60('0x5')]]);}}catch(_0x1fdb4b){utils['error'](util[_0x1f60('0x4')]('[%s][dials][hangup]',_0x38edf9[_0x1f60('0x5')]),_0x1fdb4b);}}; \ No newline at end of file diff --git a/server/services/xdr/index.js b/server/services/xdr/index.js index 4b0db25..fe54497 100644 --- a/server/services/xdr/index.js +++ b/server/services/xdr/index.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x0429=['agentcalled','uniqueid','[%s][index][agentcalled]','agentringnoanswer','[%s][index][agentringnoanswer]','[%s][index][agentconnect]','agentconnect','agentcomplete','[%s][index][agentcomplete]','queuecallerabandon','[%s][index][queuecallerabandon]','queuecallerjoin','[%s][index][queuecallerjoin]','queuecallerleave','[%s][index][queuecallerleave]','musiconholdstart','[%s][index][musiconholdstart]','musiconholdstop','[%s][index][musiconholdstop]','[%s][index][newstate]','newstate','hangup','[%s][index][hangup]','cdr','[%s][index][cdr]','blindtransfer','[%s][index][blindtransfer]','attendedtransfer','[%s][index][attendedtransfer]','origtransfereruniqueid','varset','[%s][index][varset]','newexten','[%s][index][newexten]','[%s][index][newchannel]','newchannel','dialbegin','[%s][index][dialbegin]','[%s]dialbegin','dialend','[%s][index][dialend]','asterisk-manager','./utils','xdr','disabled','env','production','local','asterisk','port','username','password','keepConnected','info','Asterisk\x20disabled\x20on\x20localhost','./agents.controller','./calls.controller','./queues.controller','./recordings.controller','./members.controller','./dials.controller','./transfers.controller','./core.controller','connect','shutdown','fullybooted','error','close','managerevent','devicestatechange','debug','format','[%s][index][devicestatechange]','device'];(function(_0x1486e5,_0x39684f){var _0x29d89b=function(_0x4a0a80){while(--_0x4a0a80){_0x1486e5['push'](_0x1486e5['shift']());}};_0x29d89b(++_0x39684f);}(_0x0429,0x73));var _0x9042=function(_0x32090f,_0x336926){_0x32090f=_0x32090f-0x0;var _0x4cb87a=_0x0429[_0x32090f];return _0x4cb87a;};var AsteriskManager=require(_0x9042('0x0'));var config=require('../../config/environment');var utils=require(_0x9042('0x1'));var util=require('util');var isXDREnabled=config[_0x9042('0x2')]&&config[_0x9042('0x2')]['disabled']?!config[_0x9042('0x2')][_0x9042('0x3')]:!![];var isProduction=config[_0x9042('0x4')]===_0x9042('0x5')||![];var isLocalAsterisk=config['xdr']&&config[_0x9042('0x2')][_0x9042('0x6')]===!![]||![];var ami=new AsteriskManager(config[_0x9042('0x7')][_0x9042('0x8')],config[_0x9042('0x7')]['ip'],config[_0x9042('0x7')][_0x9042('0x9')],config[_0x9042('0x7')][_0x9042('0xa')],!![]);ami[_0x9042('0xb')]();if(!isXDREnabled){utils[_0x9042('0xc')]('XDR\x20DISABLED');}else if(!isProduction&&!isLocalAsterisk){utils['info'](_0x9042('0xd'));}else{var agents=require(_0x9042('0xe'));var calls=require(_0x9042('0xf'));var queues=require(_0x9042('0x10'));var recordings=require(_0x9042('0x11'));var members=require(_0x9042('0x12'));var dials=require(_0x9042('0x13'));var transfers=require(_0x9042('0x14'));var core=require(_0x9042('0x15'));ami['on'](_0x9042('0x16'),core['connect']);ami['on'](_0x9042('0x17'),core[_0x9042('0x17')]);ami['on']('fullybooted',core[_0x9042('0x18')]);ami['on'](_0x9042('0x19'),core['error']);ami['on'](_0x9042('0x1a'),core[_0x9042('0x1a')]);ami['on'](_0x9042('0x1b'),core[_0x9042('0x1b')]);ami['on'](_0x9042('0x1c'),function(_0x4b8046){try{utils[_0x9042('0x1d')](util[_0x9042('0x1e')](_0x9042('0x1f'),_0x4b8046[_0x9042('0x20')]),_0x4b8046);members['devicestatechange'](_0x4b8046);}catch(_0x38c457){utils[_0x9042('0x19')](util[_0x9042('0x1e')](_0x9042('0x1f'),_0x4b8046[_0x9042('0x20')]),_0x38c457);}});ami['on'](_0x9042('0x21'),function(_0xb98de0){try{utils[_0x9042('0x1d')](util[_0x9042('0x1e')]('[%s][index][agentcalled]',_0xb98de0[_0x9042('0x22')]),_0xb98de0);agents[_0x9042('0x21')](_0xb98de0);}catch(_0x3409fa){utils['error'](util[_0x9042('0x1e')](_0x9042('0x23'),_0xb98de0[_0x9042('0x22')]),_0x3409fa);}});ami['on'](_0x9042('0x24'),function(_0x2accd7){try{utils[_0x9042('0x1d')](util[_0x9042('0x1e')](_0x9042('0x25'),_0x2accd7['uniqueid']),_0x2accd7);agents['agentringnoanswer'](_0x2accd7);}catch(_0x29e860){utils[_0x9042('0x19')](util[_0x9042('0x1e')](_0x9042('0x25'),_0x2accd7[_0x9042('0x22')]),_0x29e860);}});ami['on']('agentconnect',function(_0x32902e){try{utils['debug'](util[_0x9042('0x1e')](_0x9042('0x26'),_0x32902e[_0x9042('0x22')]),_0x32902e);agents[_0x9042('0x27')](_0x32902e);queues[_0x9042('0x27')](_0x32902e);}catch(_0x300902){utils[_0x9042('0x19')](util[_0x9042('0x1e')](_0x9042('0x26'),_0x32902e[_0x9042('0x22')]),_0x300902);}});ami['on'](_0x9042('0x28'),function(_0xbfc549){try{utils[_0x9042('0x1d')](util[_0x9042('0x1e')]('[%s][index][agentcomplete]',_0xbfc549['uniqueid']),_0xbfc549);agents[_0x9042('0x28')](_0xbfc549);queues[_0x9042('0x28')](_0xbfc549);members[_0x9042('0x28')](_0xbfc549);}catch(_0x446b81){utils[_0x9042('0x19')](util['format'](_0x9042('0x29'),_0xbfc549['uniqueid']),_0x446b81);}});ami['on'](_0x9042('0x2a'),function(_0xf8b1b9){try{utils[_0x9042('0x1d')](util[_0x9042('0x1e')](_0x9042('0x2b'),_0xf8b1b9[_0x9042('0x22')]),_0xf8b1b9);agents['queuecallerabandon'](_0xf8b1b9);queues[_0x9042('0x2a')](_0xf8b1b9);}catch(_0x148021){utils['error'](util[_0x9042('0x1e')](_0x9042('0x2b'),_0xf8b1b9['uniqueid']),_0x148021);}});ami['on'](_0x9042('0x2c'),function(_0x27ddbe){try{utils[_0x9042('0x1d')](util[_0x9042('0x1e')](_0x9042('0x2d'),_0x27ddbe['uniqueid']),_0x27ddbe);queues[_0x9042('0x2c')](_0x27ddbe);recordings[_0x9042('0x2c')](_0x27ddbe);}catch(_0x6d5aea){utils[_0x9042('0x19')](util[_0x9042('0x1e')](_0x9042('0x2d'),_0x27ddbe[_0x9042('0x22')]),_0x6d5aea);}});ami['on']('queuecallerleave',function(_0x17a283){try{utils[_0x9042('0x1d')](util[_0x9042('0x1e')]('[%s][index][queuecallerleave]',_0x17a283[_0x9042('0x22')]),_0x17a283);queues[_0x9042('0x2e')](_0x17a283);}catch(_0x3442a2){utils[_0x9042('0x19')](util['format'](_0x9042('0x2f'),_0x17a283[_0x9042('0x22')]),_0x3442a2);}});ami['on'](_0x9042('0x30'),function(_0x1c90f8){try{utils['debug'](util[_0x9042('0x1e')](_0x9042('0x31'),_0x1c90f8['uniqueid']),_0x1c90f8);queues['musiconholdstart'](_0x1c90f8);calls[_0x9042('0x30')](_0x1c90f8);}catch(_0x522986){utils[_0x9042('0x19')](util[_0x9042('0x1e')](_0x9042('0x31'),_0x1c90f8[_0x9042('0x22')]),_0x522986);}});ami['on'](_0x9042('0x32'),function(_0x2616d0){try{utils[_0x9042('0x1d')](util[_0x9042('0x1e')](_0x9042('0x33'),_0x2616d0['uniqueid']),_0x2616d0);queues[_0x9042('0x32')](_0x2616d0);calls[_0x9042('0x32')](_0x2616d0);}catch(_0x214d9f){utils[_0x9042('0x19')](util[_0x9042('0x1e')](_0x9042('0x33'),_0x2616d0['uniqueid']),_0x214d9f);}});ami['on']('newstate',function(_0xeb8dc4){try{utils[_0x9042('0x1d')](util[_0x9042('0x1e')](_0x9042('0x34'),_0xeb8dc4[_0x9042('0x22')]),_0xeb8dc4);calls[_0x9042('0x35')](_0xeb8dc4);recordings[_0x9042('0x35')](_0xeb8dc4);}catch(_0x41a187){utils['error'](util[_0x9042('0x1e')](_0x9042('0x34'),_0xeb8dc4[_0x9042('0x22')]),_0x41a187);}});ami['on'](_0x9042('0x36'),function(_0x338005){try{utils[_0x9042('0x1d')](util[_0x9042('0x1e')](_0x9042('0x37'),_0x338005[_0x9042('0x22')]),_0x338005);calls[_0x9042('0x36')](_0x338005);recordings[_0x9042('0x36')](_0x338005);dials['hangup'](_0x338005);agents[_0x9042('0x36')](_0x338005);queues[_0x9042('0x36')](_0x338005);}catch(_0x55baae){utils['error'](util['format'](_0x9042('0x37'),_0x338005[_0x9042('0x22')]),_0x55baae);}});ami['on'](_0x9042('0x38'),function(_0x254f1b){try{utils[_0x9042('0x1d')](util[_0x9042('0x1e')](_0x9042('0x39'),_0x254f1b['uniqueid']),_0x254f1b);members[_0x9042('0x38')](_0x254f1b);}catch(_0x2288fd){utils[_0x9042('0x19')](util['format'](_0x9042('0x39'),_0x254f1b[_0x9042('0x22')]),_0x2288fd);}});ami['on'](_0x9042('0x3a'),function(_0x703dba){try{utils[_0x9042('0x1d')](util[_0x9042('0x1e')](_0x9042('0x3b'),_0x703dba[_0x9042('0x22')]),_0x703dba);queues[_0x9042('0x3a')](_0x703dba);agents[_0x9042('0x3a')](_0x703dba);transfers[_0x9042('0x3a')](_0x703dba);recordings[_0x9042('0x3a')](_0x703dba);}catch(_0x1dc984){utils[_0x9042('0x19')](util[_0x9042('0x1e')](_0x9042('0x3b'),_0x703dba[_0x9042('0x22')]),_0x1dc984);}});ami['on'](_0x9042('0x3c'),function(_0x18f246){try{utils[_0x9042('0x1d')](util[_0x9042('0x1e')](_0x9042('0x3d'),_0x18f246[_0x9042('0x3e')]),_0x18f246);queues[_0x9042('0x3c')](_0x18f246);transfers[_0x9042('0x3c')](_0x18f246);agents[_0x9042('0x3c')](_0x18f246);calls[_0x9042('0x3c')](_0x18f246);}catch(_0x1052dd){utils[_0x9042('0x19')](util[_0x9042('0x1e')]('[%s][index][attendedtransfer]',_0x18f246['origtransfereruniqueid']),_0x1052dd);}});ami['on'](_0x9042('0x3f'),function(_0x115884){try{utils[_0x9042('0x1d')](util['format'](_0x9042('0x40'),_0x115884[_0x9042('0x22')]),_0x115884);queues['varset'](_0x115884);recordings['varset'](_0x115884);calls[_0x9042('0x3f')](_0x115884);dials[_0x9042('0x3f')](_0x115884);}catch(_0x4be68f){utils[_0x9042('0x19')](util[_0x9042('0x1e')](_0x9042('0x40'),_0x115884[_0x9042('0x22')]),_0x4be68f);}});ami['on'](_0x9042('0x41'),function(_0x15a799){try{utils[_0x9042('0x1d')](util[_0x9042('0x1e')](_0x9042('0x42'),_0x15a799[_0x9042('0x22')]),_0x15a799);calls[_0x9042('0x41')](_0x15a799);recordings[_0x9042('0x41')](_0x15a799);dials[_0x9042('0x41')](_0x15a799);}catch(_0x5dd5a8){utils[_0x9042('0x19')](util[_0x9042('0x1e')](_0x9042('0x42'),_0x15a799[_0x9042('0x22')]),_0x5dd5a8);}});ami['on']('newchannel',function(_0x2ac11e){try{utils[_0x9042('0x1d')](util[_0x9042('0x1e')](_0x9042('0x43'),_0x2ac11e[_0x9042('0x22')]),_0x2ac11e);calls[_0x9042('0x44')](_0x2ac11e);recordings[_0x9042('0x44')](_0x2ac11e);}catch(_0x28016f){utils[_0x9042('0x19')](util[_0x9042('0x1e')](_0x9042('0x43'),_0x2ac11e['uniqueid']),_0x28016f);}});ami['on'](_0x9042('0x45'),function(_0xdf9edb){try{utils[_0x9042('0x1d')](util[_0x9042('0x1e')](_0x9042('0x46'),_0xdf9edb[_0x9042('0x22')]),_0xdf9edb);dials[_0x9042('0x45')](_0xdf9edb);}catch(_0x124598){utils[_0x9042('0x19')](util[_0x9042('0x1e')](_0x9042('0x47'),_0xdf9edb[_0x9042('0x22')]),_0x124598);}});ami['on'](_0x9042('0x48'),function(_0x1b3ed7){try{utils[_0x9042('0x1d')](util['format'](_0x9042('0x49'),_0x1b3ed7[_0x9042('0x22')]),_0x1b3ed7);dials[_0x9042('0x48')](_0x1b3ed7);}catch(_0x59a95a){utils[_0x9042('0x19')](util[_0x9042('0x1e')](_0x9042('0x49'),_0x1b3ed7[_0x9042('0x22')]),_0x59a95a);}});} \ No newline at end of file +var _0x294d=['./recordings.controller','./members.controller','./dials.controller','./transfers.controller','./core.controller','connect','shutdown','fullybooted','error','close','managerevent','devicestatechange','format','[%s][index][devicestatechange]','device','agentcalled','debug','uniqueid','[%s][index][agentcalled]','agentringnoanswer','[%s][index][agentringnoanswer]','agentconnect','[%s][index][agentconnect]','agentcomplete','[%s][index][agentcomplete]','queuecallerabandon','[%s][index][queuecallerabandon]','queuecallerjoin','[%s][index][queuecallerjoin]','queuecallerleave','[%s][index][queuecallerleave]','musiconholdstart','[%s][index][musiconholdstart]','[%s][index][musiconholdstop]','musiconholdstop','[%s][index][newstate]','newstate','[%s][index][hangup]','hangup','[%s][index][cdr]','cdr','blindtransfer','[%s][index][blindtransfer]','attendedtransfer','[%s][index][attendedtransfer]','origtransfereruniqueid','varset','[%s][index][varset]','newexten','[%s][index][newexten]','newchannel','dialbegin','[%s]dialbegin','dialend','[%s][index][dialend]','asterisk-manager','../../config/environment','util','xdr','disabled','env','asterisk','password','keepConnected','info','XDR\x20DISABLED','Asterisk\x20disabled\x20on\x20localhost','./calls.controller','./queues.controller'];(function(_0x4b4f24,_0x5654a8){var _0x1c13d4=function(_0x4940bf){while(--_0x4940bf){_0x4b4f24['push'](_0x4b4f24['shift']());}};_0x1c13d4(++_0x5654a8);}(_0x294d,0x14b));var _0xd294=function(_0x1a8f86,_0x5ed9c4){_0x1a8f86=_0x1a8f86-0x0;var _0x20d876=_0x294d[_0x1a8f86];return _0x20d876;};var AsteriskManager=require(_0xd294('0x0'));var config=require(_0xd294('0x1'));var utils=require('./utils');var util=require(_0xd294('0x2'));var isXDREnabled=config[_0xd294('0x3')]&&config[_0xd294('0x3')][_0xd294('0x4')]?!config['xdr'][_0xd294('0x4')]:!![];var isProduction=config[_0xd294('0x5')]==='production'||![];var isLocalAsterisk=config[_0xd294('0x3')]&&config[_0xd294('0x3')]['local']===!![]||![];var ami=new AsteriskManager(config['asterisk']['port'],config[_0xd294('0x6')]['ip'],config[_0xd294('0x6')]['username'],config[_0xd294('0x6')][_0xd294('0x7')],!![]);ami[_0xd294('0x8')]();if(!isXDREnabled){utils[_0xd294('0x9')](_0xd294('0xa'));}else if(!isProduction&&!isLocalAsterisk){utils[_0xd294('0x9')](_0xd294('0xb'));}else{var agents=require('./agents.controller');var calls=require(_0xd294('0xc'));var queues=require(_0xd294('0xd'));var recordings=require(_0xd294('0xe'));var members=require(_0xd294('0xf'));var dials=require(_0xd294('0x10'));var transfers=require(_0xd294('0x11'));var core=require(_0xd294('0x12'));ami['on'](_0xd294('0x13'),core[_0xd294('0x13')]);ami['on'](_0xd294('0x14'),core[_0xd294('0x14')]);ami['on'](_0xd294('0x15'),core[_0xd294('0x15')]);ami['on'](_0xd294('0x16'),core[_0xd294('0x16')]);ami['on'](_0xd294('0x17'),core[_0xd294('0x17')]);ami['on'](_0xd294('0x18'),core['managerevent']);ami['on'](_0xd294('0x19'),function(_0x233c73){try{utils['debug'](util[_0xd294('0x1a')](_0xd294('0x1b'),_0x233c73[_0xd294('0x1c')]),_0x233c73);members[_0xd294('0x19')](_0x233c73);}catch(_0x3f6e85){utils[_0xd294('0x16')](util[_0xd294('0x1a')](_0xd294('0x1b'),_0x233c73[_0xd294('0x1c')]),_0x3f6e85);}});ami['on'](_0xd294('0x1d'),function(_0x32b592){try{utils[_0xd294('0x1e')](util[_0xd294('0x1a')]('[%s][index][agentcalled]',_0x32b592[_0xd294('0x1f')]),_0x32b592);agents[_0xd294('0x1d')](_0x32b592);}catch(_0x43259f){utils[_0xd294('0x16')](util[_0xd294('0x1a')](_0xd294('0x20'),_0x32b592[_0xd294('0x1f')]),_0x43259f);}});ami['on'](_0xd294('0x21'),function(_0x3c6bd8){try{utils[_0xd294('0x1e')](util[_0xd294('0x1a')](_0xd294('0x22'),_0x3c6bd8['uniqueid']),_0x3c6bd8);agents[_0xd294('0x21')](_0x3c6bd8);}catch(_0x498826){utils[_0xd294('0x16')](util['format']('[%s][index][agentringnoanswer]',_0x3c6bd8[_0xd294('0x1f')]),_0x498826);}});ami['on'](_0xd294('0x23'),function(_0x24f42b){try{utils[_0xd294('0x1e')](util[_0xd294('0x1a')]('[%s][index][agentconnect]',_0x24f42b[_0xd294('0x1f')]),_0x24f42b);agents[_0xd294('0x23')](_0x24f42b);queues['agentconnect'](_0x24f42b);}catch(_0x244cc2){utils['error'](util[_0xd294('0x1a')](_0xd294('0x24'),_0x24f42b[_0xd294('0x1f')]),_0x244cc2);}});ami['on'](_0xd294('0x25'),function(_0x4761c4){try{utils[_0xd294('0x1e')](util[_0xd294('0x1a')](_0xd294('0x26'),_0x4761c4[_0xd294('0x1f')]),_0x4761c4);agents[_0xd294('0x25')](_0x4761c4);queues[_0xd294('0x25')](_0x4761c4);members[_0xd294('0x25')](_0x4761c4);}catch(_0x31b47e){utils[_0xd294('0x16')](util[_0xd294('0x1a')]('[%s][index][agentcomplete]',_0x4761c4[_0xd294('0x1f')]),_0x31b47e);}});ami['on'](_0xd294('0x27'),function(_0x12a576){try{utils[_0xd294('0x1e')](util['format'](_0xd294('0x28'),_0x12a576['uniqueid']),_0x12a576);agents[_0xd294('0x27')](_0x12a576);queues[_0xd294('0x27')](_0x12a576);}catch(_0x169745){utils[_0xd294('0x16')](util['format'](_0xd294('0x28'),_0x12a576['uniqueid']),_0x169745);}});ami['on'](_0xd294('0x29'),function(_0x2e988a){try{utils[_0xd294('0x1e')](util[_0xd294('0x1a')](_0xd294('0x2a'),_0x2e988a['uniqueid']),_0x2e988a);queues['queuecallerjoin'](_0x2e988a);recordings[_0xd294('0x29')](_0x2e988a);}catch(_0x3111a0){utils['error'](util[_0xd294('0x1a')](_0xd294('0x2a'),_0x2e988a[_0xd294('0x1f')]),_0x3111a0);}});ami['on'](_0xd294('0x2b'),function(_0x1ed6b3){try{utils[_0xd294('0x1e')](util['format']('[%s][index][queuecallerleave]',_0x1ed6b3[_0xd294('0x1f')]),_0x1ed6b3);queues[_0xd294('0x2b')](_0x1ed6b3);}catch(_0x414f89){utils[_0xd294('0x16')](util[_0xd294('0x1a')](_0xd294('0x2c'),_0x1ed6b3[_0xd294('0x1f')]),_0x414f89);}});ami['on'](_0xd294('0x2d'),function(_0x4a6313){try{utils[_0xd294('0x1e')](util[_0xd294('0x1a')]('[%s][index][musiconholdstart]',_0x4a6313[_0xd294('0x1f')]),_0x4a6313);queues[_0xd294('0x2d')](_0x4a6313);calls[_0xd294('0x2d')](_0x4a6313);}catch(_0x488cb0){utils['error'](util[_0xd294('0x1a')](_0xd294('0x2e'),_0x4a6313['uniqueid']),_0x488cb0);}});ami['on']('musiconholdstop',function(_0x4d7c68){try{utils[_0xd294('0x1e')](util[_0xd294('0x1a')](_0xd294('0x2f'),_0x4d7c68['uniqueid']),_0x4d7c68);queues[_0xd294('0x30')](_0x4d7c68);calls['musiconholdstop'](_0x4d7c68);}catch(_0x330308){utils[_0xd294('0x16')](util[_0xd294('0x1a')](_0xd294('0x2f'),_0x4d7c68[_0xd294('0x1f')]),_0x330308);}});ami['on']('newstate',function(_0x31d6f3){try{utils[_0xd294('0x1e')](util[_0xd294('0x1a')](_0xd294('0x31'),_0x31d6f3[_0xd294('0x1f')]),_0x31d6f3);calls['newstate'](_0x31d6f3);recordings[_0xd294('0x32')](_0x31d6f3);}catch(_0x5416c0){utils[_0xd294('0x16')](util[_0xd294('0x1a')](_0xd294('0x31'),_0x31d6f3[_0xd294('0x1f')]),_0x5416c0);}});ami['on']('hangup',function(_0x1658b8){try{utils[_0xd294('0x1e')](util[_0xd294('0x1a')](_0xd294('0x33'),_0x1658b8['uniqueid']),_0x1658b8);calls[_0xd294('0x34')](_0x1658b8);recordings[_0xd294('0x34')](_0x1658b8);dials[_0xd294('0x34')](_0x1658b8);agents[_0xd294('0x34')](_0x1658b8);queues[_0xd294('0x34')](_0x1658b8);}catch(_0x57ece2){utils[_0xd294('0x16')](util[_0xd294('0x1a')](_0xd294('0x33'),_0x1658b8[_0xd294('0x1f')]),_0x57ece2);}});ami['on']('cdr',function(_0x5a2547){try{utils[_0xd294('0x1e')](util[_0xd294('0x1a')](_0xd294('0x35'),_0x5a2547[_0xd294('0x1f')]),_0x5a2547);members[_0xd294('0x36')](_0x5a2547);}catch(_0x1eaed9){utils['error'](util[_0xd294('0x1a')]('[%s][index][cdr]',_0x5a2547[_0xd294('0x1f')]),_0x1eaed9);}});ami['on']('blindtransfer',function(_0x5d4b04){try{utils['debug'](util['format']('[%s][index][blindtransfer]',_0x5d4b04[_0xd294('0x1f')]),_0x5d4b04);queues['blindtransfer'](_0x5d4b04);agents[_0xd294('0x37')](_0x5d4b04);transfers[_0xd294('0x37')](_0x5d4b04);recordings[_0xd294('0x37')](_0x5d4b04);}catch(_0x5519e4){utils[_0xd294('0x16')](util[_0xd294('0x1a')](_0xd294('0x38'),_0x5d4b04[_0xd294('0x1f')]),_0x5519e4);}});ami['on'](_0xd294('0x39'),function(_0x326b02){try{utils['debug'](util[_0xd294('0x1a')](_0xd294('0x3a'),_0x326b02['origtransfereruniqueid']),_0x326b02);queues['attendedtransfer'](_0x326b02);transfers[_0xd294('0x39')](_0x326b02);agents['attendedtransfer'](_0x326b02);calls[_0xd294('0x39')](_0x326b02);}catch(_0x399064){utils[_0xd294('0x16')](util[_0xd294('0x1a')]('[%s][index][attendedtransfer]',_0x326b02[_0xd294('0x3b')]),_0x399064);}});ami['on'](_0xd294('0x3c'),function(_0x645250){try{utils['debug'](util[_0xd294('0x1a')](_0xd294('0x3d'),_0x645250['uniqueid']),_0x645250);queues[_0xd294('0x3c')](_0x645250);recordings['varset'](_0x645250);calls[_0xd294('0x3c')](_0x645250);dials['varset'](_0x645250);}catch(_0x4fc027){utils[_0xd294('0x16')](util[_0xd294('0x1a')](_0xd294('0x3d'),_0x645250[_0xd294('0x1f')]),_0x4fc027);}});ami['on'](_0xd294('0x3e'),function(_0x1a3278){try{utils[_0xd294('0x1e')](util['format'](_0xd294('0x3f'),_0x1a3278[_0xd294('0x1f')]),_0x1a3278);calls[_0xd294('0x3e')](_0x1a3278);recordings[_0xd294('0x3e')](_0x1a3278);dials['newexten'](_0x1a3278);}catch(_0xd0765e){utils[_0xd294('0x16')](util['format'](_0xd294('0x3f'),_0x1a3278[_0xd294('0x1f')]),_0xd0765e);}});ami['on']('newchannel',function(_0x2165f2){try{utils[_0xd294('0x1e')](util[_0xd294('0x1a')]('[%s][index][newchannel]',_0x2165f2[_0xd294('0x1f')]),_0x2165f2);calls[_0xd294('0x40')](_0x2165f2);recordings['newchannel'](_0x2165f2);}catch(_0x3893f5){utils[_0xd294('0x16')](util[_0xd294('0x1a')]('[%s][index][newchannel]',_0x2165f2[_0xd294('0x1f')]),_0x3893f5);}});ami['on']('dialbegin',function(_0x1dc1f2){try{utils[_0xd294('0x1e')](util[_0xd294('0x1a')]('[%s][index][dialbegin]',_0x1dc1f2[_0xd294('0x1f')]),_0x1dc1f2);dials[_0xd294('0x41')](_0x1dc1f2);}catch(_0x256250){utils[_0xd294('0x16')](util[_0xd294('0x1a')](_0xd294('0x42'),_0x1dc1f2[_0xd294('0x1f')]),_0x256250);}});ami['on'](_0xd294('0x43'),function(_0x3520f1){try{utils[_0xd294('0x1e')](util[_0xd294('0x1a')](_0xd294('0x44'),_0x3520f1[_0xd294('0x1f')]),_0x3520f1);dials[_0xd294('0x43')](_0x3520f1);}catch(_0x24301e){utils[_0xd294('0x16')](util[_0xd294('0x1a')](_0xd294('0x44'),_0x3520f1[_0xd294('0x1f')]),_0x24301e);}});} \ No newline at end of file diff --git a/server/services/xdr/members.controller.js b/server/services/xdr/members.controller.js index 51e3b9f..4819a39 100644 --- a/server/services/xdr/members.controller.js +++ b/server/services/xdr/members.controller.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xc5ba=['now','NOT_INUSE','isNil','exitAt','duration','diffTime','enterAt','agentcomplete','[%s][members][agentcomplete]','[%s][members][agentcomplete]\x20interface:%s\x20queue:%s','queue','cdr','[%s][members][cdr]','data1','source','data3','[%s][members][cdr]\x20type:%s\x20source:%s\x20destination:%s','destinationchannel','assign','destination','lodash','util','./utils','Local/_attended@transfer','Queue:','info','format','[%s][members][writeDB]\x20interface:%s\x20channel:%s\x20data2:%s\x20agent:%s\x20type:%s','uniqueid','interface','channel','data2','membername','type','getUserByInterface','name','internal','request','CreateMemberReport','getUserByName','split','then','catch','error','[%s][members][writeDB]','some','startsWith','devicestatechange','debug','[%s][members][devicestatechange]','device','[%s][members][devicestatechange]\x20state:%s\x20interface:%s','state','INUSE','BUSY'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0xc5ba,0xb9));var _0xac5b=function(_0x322bef,_0x4890d4){_0x322bef=_0x322bef-0x0;var _0x229e60=_0xc5ba[_0x322bef];return _0x229e60;};'use strict';var _=require(_0xac5b('0x0'));var util=require(_0xac5b('0x1'));var utils=require(_0xac5b('0x2'));var members={};var exclude=[_0xac5b('0x3'),_0xac5b('0x4')];function writeDB(_0x34fad9){utils[_0xac5b('0x5')](util[_0xac5b('0x6')](_0xac5b('0x7'),_0x34fad9[_0xac5b('0x8')],_0x34fad9[_0xac5b('0x9')],_0x34fad9[_0xac5b('0xa')],_0x34fad9[_0xac5b('0xb')],_0x34fad9[_0xac5b('0xc')],_0x34fad9[_0xac5b('0xd')]));if(_0x34fad9[_0xac5b('0x9')]){utils[_0xac5b('0xe')](_0x34fad9['interface'])['then'](function(_0x31af86){if(_0x31af86){_0x34fad9['membername']=_0x31af86[_0xac5b('0xf')];_0x34fad9[_0xac5b('0x10')]=_0x31af86[_0xac5b('0x10')];utils[_0xac5b('0x11')](_0xac5b('0x12'),_0x34fad9);}else{utils[_0xac5b('0x13')](_0x34fad9[_0xac5b('0x9')][_0xac5b('0x14')]('/')[0x1])[_0xac5b('0x15')](function(_0x59e879){if(_0x59e879){_0x34fad9[_0xac5b('0xc')]=_0x59e879[_0xac5b('0xf')];_0x34fad9[_0xac5b('0x10')]=_0x59e879[_0xac5b('0x10')];utils[_0xac5b('0x11')](_0xac5b('0x12'),_0x34fad9);}});}})[_0xac5b('0x16')](function(_0x35eef0){utils[_0xac5b('0x17')](util[_0xac5b('0x6')](_0xac5b('0x18'),_0x34fad9[_0xac5b('0x8')]),_0x35eef0);});}delete members[_0x34fad9['interface']];}function startsWith(_0x3bad56,_0xe88a79){return _[_0xac5b('0x19')](_0x3bad56,function(_0x2e4742){return _[_0xac5b('0x1a')](_0xe88a79,_0x2e4742);});}exports[_0xac5b('0x1b')]=function(_0x363de5){try{utils[_0xac5b('0x1c')](util[_0xac5b('0x6')](_0xac5b('0x1d'),members[_0x363de5[_0xac5b('0x1e')]]?members[_0x363de5['device']][_0xac5b('0x8')]:_0x363de5['device']),_0x363de5);utils[_0xac5b('0x5')](util['format'](_0xac5b('0x1f'),members[_0x363de5[_0xac5b('0x1e')]]?members[_0x363de5['device']]['uniqueid']:_0x363de5['device'],_0x363de5[_0xac5b('0x20')],_0x363de5['device']));switch(_0x363de5[_0xac5b('0x20')]){case _0xac5b('0x21'):case _0xac5b('0x22'):if(!startsWith(exclude,_0x363de5[_0xac5b('0x1e')])){members[_0x363de5[_0xac5b('0x1e')]]={'channel':'voice','interface':_0x363de5['device'],'type':'TALKING','enterAt':utils[_0xac5b('0x23')](),'role':'agent'};}break;case _0xac5b('0x24'):if(!_[_0xac5b('0x25')](members[_0x363de5['device']])){members[_0x363de5[_0xac5b('0x1e')]][_0xac5b('0x26')]=utils[_0xac5b('0x23')]();members[_0x363de5[_0xac5b('0x1e')]][_0xac5b('0x27')]=utils[_0xac5b('0x28')](members[_0x363de5[_0xac5b('0x1e')]][_0xac5b('0x26')],members[_0x363de5[_0xac5b('0x1e')]][_0xac5b('0x29')]);if(members[_0x363de5['device']][_0xac5b('0x8')]){writeDB(members[_0x363de5[_0xac5b('0x1e')]]);}}break;default:break;}}catch(_0x351d33){utils[_0xac5b('0x17')](util[_0xac5b('0x6')](_0xac5b('0x1d'),members[_0x363de5[_0xac5b('0x1e')]]?members[_0x363de5[_0xac5b('0x1e')]][_0xac5b('0x8')]:_0x363de5[_0xac5b('0x1e')]),_0x351d33);}};exports[_0xac5b('0x2a')]=function(_0x5f07c1){try{if(!_[_0xac5b('0x25')](members[_0x5f07c1[_0xac5b('0x9')]])){utils[_0xac5b('0x1c')](util['format'](_0xac5b('0x2b'),_0x5f07c1['uniqueid']),_0x5f07c1);utils[_0xac5b('0x5')](util[_0xac5b('0x6')](_0xac5b('0x2c'),_0x5f07c1[_0xac5b('0x8')],_0x5f07c1['interface'],_0x5f07c1[_0xac5b('0x2d')]));members[_0x5f07c1['interface']]=_['assign'](members[_0x5f07c1[_0xac5b('0x9')]],{'data4':_0x5f07c1[_0xac5b('0x2d')],'uniqueid':_0x5f07c1['uniqueid']});}}catch(_0x529ec5){utils[_0xac5b('0x17')](util[_0xac5b('0x6')]('[%s][members][agentcomplete]',_0x5f07c1[_0xac5b('0x8')]),_0x529ec5);}};exports[_0xac5b('0x2e')]=function(_0x3f424d){try{utils['debug'](util['format'](_0xac5b('0x2f'),_0x3f424d[_0xac5b('0x8')]),_0x3f424d);if(_0x3f424d['channel']){var _0x2f7e7f=_0x3f424d[_0xac5b('0xa')][_0xac5b('0x14')]('-')[0x0];if(!_[_0xac5b('0x25')](members[_0x2f7e7f])){members[_0x2f7e7f]=_['assign'](members[_0x2f7e7f],{'data1':members[_0x2f7e7f][_0xac5b('0x30')]||_0x3f424d[_0xac5b('0xd')],'data2':members[_0x2f7e7f][_0xac5b('0xb')]||_0x3f424d[_0xac5b('0x31')],'data3':members[_0x2f7e7f][_0xac5b('0x32')]||_0x3f424d['destination'],'uniqueid':members[_0x2f7e7f][_0xac5b('0x8')]||_0x3f424d['uniqueid']});utils[_0xac5b('0x5')](util['format'](_0xac5b('0x33'),_0x3f424d[_0xac5b('0x8')],members[_0x2f7e7f][_0xac5b('0x30')],members[_0x2f7e7f][_0xac5b('0xb')],members[_0x2f7e7f][_0xac5b('0x32')]));if(members[_0x2f7e7f][_0xac5b('0x26')]){writeDB(members[_0x2f7e7f]);}}}if(_0x3f424d['destinationchannel']){var _0x419dfc=_0x3f424d[_0xac5b('0x34')][_0xac5b('0x14')]('-')[0x0];if(!_[_0xac5b('0x25')](members[_0x419dfc])){members[_0x419dfc]=_[_0xac5b('0x35')](members[_0x419dfc],{'data1':members[_0x419dfc][_0xac5b('0x30')]||_0x3f424d[_0xac5b('0xd')],'data2':members[_0x419dfc]['data2']||_0x3f424d[_0xac5b('0x31')],'data3':members[_0x419dfc][_0xac5b('0x32')]||_0x3f424d[_0xac5b('0x36')],'uniqueid':members[_0x419dfc][_0xac5b('0x8')]||_0x3f424d[_0xac5b('0x8')]});utils[_0xac5b('0x5')](util['format'](_0xac5b('0x33'),_0x3f424d['uniqueid'],members[_0x419dfc][_0xac5b('0x30')],members[_0x419dfc]['data2'],members[_0x419dfc][_0xac5b('0x32')]));if(members[_0x419dfc]['exitAt']){writeDB(members[_0x419dfc]);}}}}catch(_0x58d594){utils['error'](util['format']('[%s][members][cdr]',_0x3f424d['uniqueid']),_0x58d594);}}; \ No newline at end of file +var _0x12fd=['getUserByName','name','request','catch','some','startsWith','devicestatechange','[%s][members][devicestatechange]','device','state','INUSE','BUSY','voice','TALKING','now','agent','NOT_INUSE','isNil','exitAt','duration','diffTime','enterAt','error','agentcomplete','debug','[%s][members][agentcomplete]','queue','assign','cdr','[%s][members][cdr]','type','data2','source','data1','split','data3','destination','[%s][members][cdr]\x20type:%s\x20source:%s\x20destination:%s','lodash','util','./utils','Local/_attended@transfer','Queue:','info','format','[%s][members][writeDB]\x20interface:%s\x20channel:%s\x20data2:%s\x20agent:%s\x20type:%s','uniqueid','interface','channel','membername','getUserByInterface','then','internal'];(function(_0x3c2373,_0x80dedb){var _0x220f00=function(_0x1412e8){while(--_0x1412e8){_0x3c2373['push'](_0x3c2373['shift']());}};_0x220f00(++_0x80dedb);}(_0x12fd,0x199));var _0xd12f=function(_0x52cc06,_0x8be37b){_0x52cc06=_0x52cc06-0x0;var _0x4a4c93=_0x12fd[_0x52cc06];return _0x4a4c93;};'use strict';var _=require(_0xd12f('0x0'));var util=require(_0xd12f('0x1'));var utils=require(_0xd12f('0x2'));var members={};var exclude=[_0xd12f('0x3'),_0xd12f('0x4')];function writeDB(_0x48fb45){utils[_0xd12f('0x5')](util[_0xd12f('0x6')](_0xd12f('0x7'),_0x48fb45[_0xd12f('0x8')],_0x48fb45[_0xd12f('0x9')],_0x48fb45[_0xd12f('0xa')],_0x48fb45['data2'],_0x48fb45[_0xd12f('0xb')],_0x48fb45['type']));if(_0x48fb45[_0xd12f('0x9')]){utils[_0xd12f('0xc')](_0x48fb45[_0xd12f('0x9')])[_0xd12f('0xd')](function(_0x504504){if(_0x504504){_0x48fb45[_0xd12f('0xb')]=_0x504504['name'];_0x48fb45[_0xd12f('0xe')]=_0x504504['internal'];utils['request']('CreateMemberReport',_0x48fb45);}else{utils[_0xd12f('0xf')](_0x48fb45[_0xd12f('0x9')]['split']('/')[0x1])['then'](function(_0x5d1ed8){if(_0x5d1ed8){_0x48fb45['membername']=_0x5d1ed8[_0xd12f('0x10')];_0x48fb45['internal']=_0x5d1ed8[_0xd12f('0xe')];utils[_0xd12f('0x11')]('CreateMemberReport',_0x48fb45);}});}})[_0xd12f('0x12')](function(_0x2cea73){utils['error'](util['format']('[%s][members][writeDB]',_0x48fb45[_0xd12f('0x8')]),_0x2cea73);});}delete members[_0x48fb45[_0xd12f('0x9')]];}function startsWith(_0x98947b,_0xb6233a){return _[_0xd12f('0x13')](_0x98947b,function(_0x60b06a){return _[_0xd12f('0x14')](_0xb6233a,_0x60b06a);});}exports[_0xd12f('0x15')]=function(_0x4769a2){try{utils['debug'](util['format'](_0xd12f('0x16'),members[_0x4769a2[_0xd12f('0x17')]]?members[_0x4769a2['device']][_0xd12f('0x8')]:_0x4769a2[_0xd12f('0x17')]),_0x4769a2);utils[_0xd12f('0x5')](util['format']('[%s][members][devicestatechange]\x20state:%s\x20interface:%s',members[_0x4769a2[_0xd12f('0x17')]]?members[_0x4769a2[_0xd12f('0x17')]][_0xd12f('0x8')]:_0x4769a2[_0xd12f('0x17')],_0x4769a2[_0xd12f('0x18')],_0x4769a2[_0xd12f('0x17')]));switch(_0x4769a2['state']){case _0xd12f('0x19'):case _0xd12f('0x1a'):if(!startsWith(exclude,_0x4769a2[_0xd12f('0x17')])){members[_0x4769a2[_0xd12f('0x17')]]={'channel':_0xd12f('0x1b'),'interface':_0x4769a2[_0xd12f('0x17')],'type':_0xd12f('0x1c'),'enterAt':utils[_0xd12f('0x1d')](),'role':_0xd12f('0x1e')};}break;case _0xd12f('0x1f'):if(!_[_0xd12f('0x20')](members[_0x4769a2[_0xd12f('0x17')]])){members[_0x4769a2[_0xd12f('0x17')]][_0xd12f('0x21')]=utils[_0xd12f('0x1d')]();members[_0x4769a2[_0xd12f('0x17')]][_0xd12f('0x22')]=utils[_0xd12f('0x23')](members[_0x4769a2[_0xd12f('0x17')]][_0xd12f('0x21')],members[_0x4769a2[_0xd12f('0x17')]][_0xd12f('0x24')]);if(members[_0x4769a2[_0xd12f('0x17')]]['uniqueid']){writeDB(members[_0x4769a2[_0xd12f('0x17')]]);}}break;default:break;}}catch(_0x4cc034){utils[_0xd12f('0x25')](util[_0xd12f('0x6')]('[%s][members][devicestatechange]',members[_0x4769a2[_0xd12f('0x17')]]?members[_0x4769a2['device']][_0xd12f('0x8')]:_0x4769a2[_0xd12f('0x17')]),_0x4cc034);}};exports[_0xd12f('0x26')]=function(_0x141621){try{if(!_['isNil'](members[_0x141621['interface']])){utils[_0xd12f('0x27')](util['format'](_0xd12f('0x28'),_0x141621['uniqueid']),_0x141621);utils['info'](util['format']('[%s][members][agentcomplete]\x20interface:%s\x20queue:%s',_0x141621[_0xd12f('0x8')],_0x141621['interface'],_0x141621[_0xd12f('0x29')]));members[_0x141621[_0xd12f('0x9')]]=_[_0xd12f('0x2a')](members[_0x141621['interface']],{'data4':_0x141621[_0xd12f('0x29')],'uniqueid':_0x141621['uniqueid']});}}catch(_0x3fd8f){utils['error'](util['format'](_0xd12f('0x28'),_0x141621[_0xd12f('0x8')]),_0x3fd8f);}};exports[_0xd12f('0x2b')]=function(_0x1dcc20){try{utils[_0xd12f('0x27')](util[_0xd12f('0x6')](_0xd12f('0x2c'),_0x1dcc20[_0xd12f('0x8')]),_0x1dcc20);if(_0x1dcc20['channel']){var _0x586a50=_0x1dcc20[_0xd12f('0xa')]['split']('-')[0x0];if(!_[_0xd12f('0x20')](members[_0x586a50])){members[_0x586a50]=_[_0xd12f('0x2a')](members[_0x586a50],{'data1':members[_0x586a50]['data1']||_0x1dcc20[_0xd12f('0x2d')],'data2':members[_0x586a50][_0xd12f('0x2e')]||_0x1dcc20[_0xd12f('0x2f')],'data3':members[_0x586a50]['data3']||_0x1dcc20['destination'],'uniqueid':members[_0x586a50]['uniqueid']||_0x1dcc20['uniqueid']});utils[_0xd12f('0x5')](util[_0xd12f('0x6')]('[%s][members][cdr]\x20type:%s\x20source:%s\x20destination:%s',_0x1dcc20[_0xd12f('0x8')],members[_0x586a50][_0xd12f('0x30')],members[_0x586a50][_0xd12f('0x2e')],members[_0x586a50]['data3']));if(members[_0x586a50][_0xd12f('0x21')]){writeDB(members[_0x586a50]);}}}if(_0x1dcc20['destinationchannel']){var _0x5e9d36=_0x1dcc20['destinationchannel'][_0xd12f('0x31')]('-')[0x0];if(!_[_0xd12f('0x20')](members[_0x5e9d36])){members[_0x5e9d36]=_[_0xd12f('0x2a')](members[_0x5e9d36],{'data1':members[_0x5e9d36][_0xd12f('0x30')]||_0x1dcc20[_0xd12f('0x2d')],'data2':members[_0x5e9d36][_0xd12f('0x2e')]||_0x1dcc20['source'],'data3':members[_0x5e9d36][_0xd12f('0x32')]||_0x1dcc20[_0xd12f('0x33')],'uniqueid':members[_0x5e9d36][_0xd12f('0x8')]||_0x1dcc20[_0xd12f('0x8')]});utils['info'](util[_0xd12f('0x6')](_0xd12f('0x34'),_0x1dcc20[_0xd12f('0x8')],members[_0x5e9d36][_0xd12f('0x30')],members[_0x5e9d36][_0xd12f('0x2e')],members[_0x5e9d36][_0xd12f('0x32')]));if(members[_0x5e9d36][_0xd12f('0x21')]){writeDB(members[_0x5e9d36]);}}}}catch(_0x25820d){utils[_0xd12f('0x25')](util[_0xd12f('0x6')](_0xd12f('0x2c'),_0x1dcc20[_0xd12f('0x8')]),_0x25820d);}}; \ No newline at end of file diff --git a/server/services/xdr/queues.controller.js b/server/services/xdr/queues.controller.js index 9ee0781..87d3475 100644 --- a/server/services/xdr/queues.controller.js +++ b/server/services/xdr/queues.controller.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xcb45=['assigned','queuecallercomplete','reason','transfer','TRANSFER','COMPLETEDBY','[%s][queues][agentcomplete]\x20name:%s\x20agent:%s\x20queuecallerexitreason:%s','[%s][queues][agentcomplete]','blindtransfer','[%s][queues][blindtransfer]','transfereeuniqueid','transfertype','BLIND','extension','transferuniqueid','BLINDTRANSFER','[%s][queues][blindtransfer]\x20name:%s\x20transferuniqueid:%s\x20transferexten:%s\x20queuecallerexitreason:BLINDTRANSFER','origtransfereruniqueid','origtransfererlinkedid','secondtransfererlinkedid','[%s][queues][attendedtransfer]\x20name:%s\x20transferexten:%s\x20queuecallerexitreason:ATTENDEDTRANSFER','ATTENDED','transferexten','origtransfererexten','ATTENDEDTRANSFER','transfereelinkedid','clone','transfertargetuniqueid','holdtime','[%s][queues][attendedtransfer]\x20name:%s\x20calleridnum:%s\x20calleridname:%s','[%s][queues][attendedtransfer]\x20name:%s\x20transfereduniqueid:%s','[%s][queues][attendedtransfer]\x20name:%s\x20transferuniqueid:%s\x20transferexten:%s\x20queuecallerexitreason:ATTENDEDTRANSFER','secondtransfererexten','secondtransfereruniqueid','transfertargetlinkedid','calleridname','mohtime','[%s][queues][attendedtransfer]','musiconholdstart','musiconholdstartAt','[%s][queues][musiconholdstop]\x20name:%s\x20musiconholdstartAt:%s','[%s][queues][musiconholdstart]','musiconholdstop','[%s][queues][musiconholdstop]','[%s][queues][musiconholdstop]\x20name:%s\x20mohtime:%s','util','./utils','info','format','[%s][queues][writeDB]\x20channel:%s\x20queue:%s\x20lastAssignedTo:%s\x20calleridnum:%s\x20accountcode:%s\x20queuecallerexitreason:%s','uniqueid','channel','queue','lastAssignedTo','calleridnum','accountcode','queuecallerexitreason','getVoiceQueueByName','then','type','request','CreateVoiceQueueReport','transfereduniqueid','queuecallerjoin','[%s][queues][queuecallerjoin]','[%s][queues][queuecallerjoin]\x20name:%s\x20position:%s','position','assign','now','hangup','isNil','debug','[%s][queues][hangup]','queuecallerleaveAt','queuecallerabandon','queuecallerexit','queuecallercompleteAt','COMPLETEDBYAGENT','[%s][queues][hangup]\x20name:%s\x20queuecallerexitreason:%s','name','[%s][queues][hangup]\x20name:%s\x20transfereduniqueid:%s','queuecallerenterreason','error','varset','[%s][queues][varset]','queuestatus','value','toUpperCase','CONTINUE','queuecallerabandonAt','queuecallerexitAt','[%s][queues][varset]\x20name:%s\x20variable:queuestatus\x20value:%s\x20queuecallerexitreason:%s','variable','queueposition','EXITWITHKEY','[%s][queues][varset]\x20name:%s\x20variable:queueposition\x20value:%s\x20queuecallerexitreason:%s','[%s][queues][queuecallerabandon]','[%s][queues][queuecallerabandon]\x20name:%s\x20queuecallerexitreason:%s','queuecallerleave','[%s][queues][queuecallerleave]','[%s][queues][queuecallerleave]\x20name:%s\x20connectedlinenum:%s\x20connectedlinename:%s','diffTime','queuecallerjoinAt','count','connectedlinenum','connectedlinename','agentconnect','[%s][queues][agentconnect]','[%s][queues][agentconnect]\x20name:%s\x20agent:%s\x20accountcode:%s','membername','destaccountcode'];(function(_0x31e51f,_0x550c7c){var _0x2cf3cc=function(_0x5e7e79){while(--_0x5e7e79){_0x31e51f['push'](_0x31e51f['shift']());}};_0x2cf3cc(++_0x550c7c);}(_0xcb45,0x10b));var _0x5cb4=function(_0x39c8bb,_0x32c319){_0x39c8bb=_0x39c8bb-0x0;var _0xb0beba=_0xcb45[_0x39c8bb];return _0xb0beba;};'use strict';var _=require('lodash');var util=require(_0x5cb4('0x0'));var utils=require(_0x5cb4('0x1'));var queues={};function writeDB(_0x3566fd){utils[_0x5cb4('0x2')](util[_0x5cb4('0x3')](_0x5cb4('0x4'),_0x3566fd[_0x5cb4('0x5')],_0x3566fd[_0x5cb4('0x6')],_0x3566fd[_0x5cb4('0x7')],_0x3566fd[_0x5cb4('0x8')],_0x3566fd[_0x5cb4('0x9')],_0x3566fd[_0x5cb4('0xa')],_0x3566fd[_0x5cb4('0xb')]));if(_0x3566fd['queue']){utils[_0x5cb4('0xc')](_0x3566fd['queue'])[_0x5cb4('0xd')](function(_0x51cf86){if(_0x51cf86){_0x3566fd[_0x5cb4('0xe')]=_0x51cf86[_0x5cb4('0xe')];}utils[_0x5cb4('0xf')](_0x5cb4('0x10'),_0x3566fd);});}else{utils[_0x5cb4('0xf')](_0x5cb4('0x10'),_0x3566fd);}if(_0x3566fd['transfereduniqueid']){delete queues[_0x3566fd[_0x5cb4('0x11')]];}else{delete queues[_0x3566fd[_0x5cb4('0x5')]];}}exports[_0x5cb4('0x12')]=function(_0x3aae72){try{utils['debug'](util[_0x5cb4('0x3')](_0x5cb4('0x13'),_0x3aae72[_0x5cb4('0x5')]),_0x3aae72);utils[_0x5cb4('0x2')](util[_0x5cb4('0x3')](_0x5cb4('0x14'),_0x3aae72[_0x5cb4('0x5')],_0x3aae72['queue'],_0x3aae72[_0x5cb4('0x15')]));queues[_0x3aae72[_0x5cb4('0x5')]]=_[_0x5cb4('0x16')](_0x3aae72,{'originalposition':_0x3aae72[_0x5cb4('0x15')],'queuecallerjoinAt':utils[_0x5cb4('0x17')](),'mohtime':0x0});}catch(_0x5b982a){utils['error'](util[_0x5cb4('0x3')]('[%s][queues][queuecallerjoin]',_0x3aae72[_0x5cb4('0x5')]),_0x5b982a);}};exports[_0x5cb4('0x18')]=function(_0x35e14b){try{if(!_[_0x5cb4('0x19')](queues[_0x35e14b[_0x5cb4('0x5')]])){utils[_0x5cb4('0x1a')](util[_0x5cb4('0x3')](_0x5cb4('0x1b'),_0x35e14b[_0x5cb4('0x5')]),_0x35e14b);if(queues[_0x35e14b['uniqueid']][_0x5cb4('0x1c')]){if(!queues[_0x35e14b['uniqueid']][_0x5cb4('0x1d')]&&!queues[_0x35e14b['uniqueid']][_0x5cb4('0x1e')]){queues[_0x35e14b[_0x5cb4('0x5')]]['queuecallercomplete']=!![];queues[_0x35e14b[_0x5cb4('0x5')]][_0x5cb4('0x1f')]=utils['now']();queues[_0x35e14b[_0x5cb4('0x5')]][_0x5cb4('0xb')]=_0x5cb4('0x20');}utils[_0x5cb4('0x2')](util[_0x5cb4('0x3')](_0x5cb4('0x21'),_0x35e14b[_0x5cb4('0x5')],queues[_0x35e14b[_0x5cb4('0x5')]][_0x5cb4('0x22')],queues[_0x35e14b['uniqueid']][_0x5cb4('0xb')]));writeDB(queues[_0x35e14b[_0x5cb4('0x5')]]);}else if(queues[_0x35e14b[_0x5cb4('0x5')]][_0x5cb4('0x11')]){utils[_0x5cb4('0x2')](util[_0x5cb4('0x3')](_0x5cb4('0x23'),_0x35e14b[_0x5cb4('0x5')],queues[_0x35e14b[_0x5cb4('0x5')]]['name'],queues[_0x35e14b[_0x5cb4('0x5')]][_0x5cb4('0x11')]));queues[queues[_0x35e14b[_0x5cb4('0x5')]][_0x5cb4('0x11')]]=queues[_0x35e14b[_0x5cb4('0x5')]];queues[queues[_0x35e14b[_0x5cb4('0x5')]]['transfereduniqueid']][_0x5cb4('0x24')]=0x2;delete queues[_0x35e14b['uniqueid']];}}}catch(_0x4a1480){utils[_0x5cb4('0x25')](util['format'](_0x5cb4('0x1b'),_0x35e14b[_0x5cb4('0x5')]),_0x4a1480);}};exports[_0x5cb4('0x26')]=function(_0x5b5c3f){try{utils[_0x5cb4('0x1a')](util[_0x5cb4('0x3')](_0x5cb4('0x27'),_0x5b5c3f[_0x5cb4('0x5')]),_0x5b5c3f);if(!_['isNil'](_0x5b5c3f['variable'][_0x5cb4('0x28')])&&_0x5b5c3f[_0x5cb4('0x29')][_0x5cb4('0x2a')]()!==_0x5cb4('0x2b')){if(!_[_0x5cb4('0x19')](queues[_0x5b5c3f[_0x5cb4('0x5')]])){queues[_0x5b5c3f[_0x5cb4('0x5')]][_0x5cb4('0x1d')]=![];queues[_0x5b5c3f[_0x5cb4('0x5')]][_0x5cb4('0x2c')]=null;queues[_0x5b5c3f[_0x5cb4('0x5')]]['queuecallerexit']=!![];queues[_0x5b5c3f[_0x5cb4('0x5')]][_0x5cb4('0x2d')]=utils[_0x5cb4('0x17')]();queues[_0x5b5c3f[_0x5cb4('0x5')]][_0x5cb4('0xb')]=_0x5b5c3f[_0x5cb4('0x29')][_0x5cb4('0x2a')]();utils[_0x5cb4('0x2')](util[_0x5cb4('0x3')](_0x5cb4('0x2e'),_0x5b5c3f[_0x5cb4('0x5')],queues[_0x5b5c3f[_0x5cb4('0x5')]][_0x5cb4('0x22')],_0x5b5c3f[_0x5cb4('0x29')],queues[_0x5b5c3f[_0x5cb4('0x5')]]['queuecallerexitreason']));writeDB(queues[_0x5b5c3f[_0x5cb4('0x5')]]);}}else if(!_[_0x5cb4('0x19')](_0x5b5c3f[_0x5cb4('0x2f')][_0x5cb4('0x30')])){if(!_[_0x5cb4('0x19')](queues[_0x5b5c3f[_0x5cb4('0x5')]])&&!queues[_0x5b5c3f[_0x5cb4('0x5')]][_0x5cb4('0x1d')]){queues[_0x5b5c3f[_0x5cb4('0x5')]]['queuecallerabandon']=![];queues[_0x5b5c3f[_0x5cb4('0x5')]][_0x5cb4('0x2c')]=null;queues[_0x5b5c3f[_0x5cb4('0x5')]]['queuecallerexit']=!![];queues[_0x5b5c3f[_0x5cb4('0x5')]]['queuecallerexitAt']=utils[_0x5cb4('0x17')]();queues[_0x5b5c3f['uniqueid']][_0x5cb4('0xb')]=_0x5cb4('0x31');utils[_0x5cb4('0x2')](util[_0x5cb4('0x3')](_0x5cb4('0x32'),_0x5b5c3f[_0x5cb4('0x5')],queues[_0x5b5c3f[_0x5cb4('0x5')]]['name'],_0x5b5c3f['value'],queues[_0x5b5c3f[_0x5cb4('0x5')]][_0x5cb4('0xb')]));}}}catch(_0x829626){utils['error'](util[_0x5cb4('0x3')](_0x5cb4('0x27'),_0x5b5c3f['uniqueid']),_0x829626);}};exports[_0x5cb4('0x1d')]=function(_0x248881){try{if(!_[_0x5cb4('0x19')](queues[_0x248881[_0x5cb4('0x5')]])){utils[_0x5cb4('0x1a')](util[_0x5cb4('0x3')](_0x5cb4('0x33'),_0x248881[_0x5cb4('0x5')]),_0x248881);queues[_0x248881[_0x5cb4('0x5')]]['queuecallerexit']=![];queues[_0x248881[_0x5cb4('0x5')]][_0x5cb4('0x2d')]=null;queues[_0x248881[_0x5cb4('0x5')]][_0x5cb4('0x1d')]=!![];queues[_0x248881[_0x5cb4('0x5')]][_0x5cb4('0x2c')]=utils['now']();queues[_0x248881[_0x5cb4('0x5')]]['queuecallerexitreason']='ABANDONED';utils[_0x5cb4('0x2')](util[_0x5cb4('0x3')](_0x5cb4('0x34'),_0x248881[_0x5cb4('0x5')],queues[_0x248881[_0x5cb4('0x5')]][_0x5cb4('0x22')],queues[_0x248881[_0x5cb4('0x5')]][_0x5cb4('0xb')]));}}catch(_0x2bb8ce){utils['error'](util[_0x5cb4('0x3')]('[%s][queues][queuecallerabandon]',_0x248881[_0x5cb4('0x5')]),_0x2bb8ce);}};exports[_0x5cb4('0x35')]=function(_0x1174eb){try{if(!_['isNil'](queues[_0x1174eb[_0x5cb4('0x5')]])){utils['debug'](util[_0x5cb4('0x3')](_0x5cb4('0x36'),_0x1174eb[_0x5cb4('0x5')]),_0x1174eb);utils[_0x5cb4('0x2')](util[_0x5cb4('0x3')](_0x5cb4('0x37'),_0x1174eb[_0x5cb4('0x5')],queues[_0x1174eb[_0x5cb4('0x5')]][_0x5cb4('0x22')],_0x1174eb['connectedlinenum'],_0x1174eb['connectedlinename']));queues[_0x1174eb[_0x5cb4('0x5')]][_0x5cb4('0x35')]=!![];queues[_0x1174eb[_0x5cb4('0x5')]][_0x5cb4('0x1c')]=utils[_0x5cb4('0x17')]();queues[_0x1174eb[_0x5cb4('0x5')]]['holdtime']=utils[_0x5cb4('0x38')](queues[_0x1174eb[_0x5cb4('0x5')]]['queuecallerleaveAt'],queues[_0x1174eb[_0x5cb4('0x5')]][_0x5cb4('0x39')]);queues[_0x1174eb[_0x5cb4('0x5')]][_0x5cb4('0x15')]=_0x1174eb[_0x5cb4('0x15')];queues[_0x1174eb['uniqueid']][_0x5cb4('0x3a')]=_0x1174eb[_0x5cb4('0x3a')];queues[_0x1174eb[_0x5cb4('0x5')]][_0x5cb4('0x3b')]=_0x1174eb[_0x5cb4('0x3b')];queues[_0x1174eb[_0x5cb4('0x5')]][_0x5cb4('0x3c')]=_0x1174eb[_0x5cb4('0x3c')];}}catch(_0x306a14){utils[_0x5cb4('0x25')](util[_0x5cb4('0x3')](_0x5cb4('0x36'),_0x1174eb['uniqueid']),_0x306a14);}};exports[_0x5cb4('0x3d')]=function(_0x8b91e2){try{if(!_[_0x5cb4('0x19')](queues[_0x8b91e2[_0x5cb4('0x5')]])){utils[_0x5cb4('0x1a')](util['format'](_0x5cb4('0x3e'),_0x8b91e2[_0x5cb4('0x5')]),_0x8b91e2);utils[_0x5cb4('0x2')](util[_0x5cb4('0x3')](_0x5cb4('0x3f'),_0x8b91e2[_0x5cb4('0x5')],queues[_0x8b91e2[_0x5cb4('0x5')]][_0x5cb4('0x22')],_0x8b91e2[_0x5cb4('0x40')],_0x8b91e2[_0x5cb4('0x41')]));queues[_0x8b91e2[_0x5cb4('0x5')]][_0x5cb4('0x1d')]=![];queues[_0x8b91e2[_0x5cb4('0x5')]][_0x5cb4('0x1d')]=![];queues[_0x8b91e2[_0x5cb4('0x5')]][_0x5cb4('0x2c')]=null;queues[_0x8b91e2[_0x5cb4('0x5')]][_0x5cb4('0x1e')]=![];queues[_0x8b91e2[_0x5cb4('0x5')]][_0x5cb4('0xb')]=null;queues[_0x8b91e2[_0x5cb4('0x5')]][_0x5cb4('0x2d')]=null;queues[_0x8b91e2[_0x5cb4('0x5')]]['assigned']=!![];queues[_0x8b91e2['uniqueid']][_0x5cb4('0xa')]=_0x8b91e2[_0x5cb4('0x41')];queues[_0x8b91e2[_0x5cb4('0x5')]][_0x5cb4('0x8')]=_0x8b91e2[_0x5cb4('0x40')];}}catch(_0x524a0d){utils[_0x5cb4('0x25')](util[_0x5cb4('0x3')]('[%s][queues][agentconnect]',_0x8b91e2[_0x5cb4('0x5')]),_0x524a0d);}};exports['agentcomplete']=function(_0x11ae25){try{if(!_['isNil'](queues[_0x11ae25['uniqueid']])){if(queues[_0x11ae25[_0x5cb4('0x5')]]['queuecallerleaveAt']){utils[_0x5cb4('0x1a')](util[_0x5cb4('0x3')]('[%s][queues][agentcomplete]',_0x11ae25[_0x5cb4('0x5')]),_0x11ae25);queues[_0x11ae25[_0x5cb4('0x5')]][_0x5cb4('0x1d')]=![];queues[_0x11ae25['uniqueid']]['queuecallerabandon']=![];queues[_0x11ae25['uniqueid']][_0x5cb4('0x2c')]=null;queues[_0x11ae25[_0x5cb4('0x5')]]['queuecallerexit']=![];queues[_0x11ae25[_0x5cb4('0x5')]][_0x5cb4('0x2d')]=null;queues[_0x11ae25[_0x5cb4('0x5')]][_0x5cb4('0x42')]=!![];queues[_0x11ae25[_0x5cb4('0x5')]][_0x5cb4('0x8')]=_0x11ae25[_0x5cb4('0x40')];queues[_0x11ae25[_0x5cb4('0x5')]][_0x5cb4('0x43')]=!![];queues[_0x11ae25[_0x5cb4('0x5')]][_0x5cb4('0x1f')]=utils[_0x5cb4('0x17')]();if(_0x11ae25[_0x5cb4('0x44')]=='transfer'){if(!queues[_0x11ae25[_0x5cb4('0x5')]][_0x5cb4('0x45')]){queues[_0x11ae25['uniqueid']][_0x5cb4('0xb')]=_0x5cb4('0x46');}}else{queues[_0x11ae25['uniqueid']][_0x5cb4('0xb')]=_0x5cb4('0x47')+_0x11ae25[_0x5cb4('0x44')][_0x5cb4('0x2a')]();}utils[_0x5cb4('0x2')](util['format'](_0x5cb4('0x48'),_0x11ae25[_0x5cb4('0x5')],queues[_0x11ae25['uniqueid']][_0x5cb4('0x22')],_0x11ae25[_0x5cb4('0x40')],queues[_0x11ae25[_0x5cb4('0x5')]][_0x5cb4('0xb')]));writeDB(queues[_0x11ae25['uniqueid']]);}}}catch(_0x21b905){utils[_0x5cb4('0x25')](util['format'](_0x5cb4('0x49'),_0x11ae25['uniqueid']),_0x21b905);}};exports[_0x5cb4('0x4a')]=function(_0x252272){try{if(!_[_0x5cb4('0x19')](queues[_0x252272['transfereeuniqueid']])){utils['debug'](util[_0x5cb4('0x3')](_0x5cb4('0x4b'),_0x252272[_0x5cb4('0x5')]),_0x252272);queues[_0x252272[_0x5cb4('0x4c')]][_0x5cb4('0x45')]=!![];queues[_0x252272[_0x5cb4('0x4c')]][_0x5cb4('0x4d')]=_0x5cb4('0x4e');queues[_0x252272[_0x5cb4('0x4c')]]['transferexten']=_0x252272[_0x5cb4('0x4f')];queues[_0x252272[_0x5cb4('0x4c')]][_0x5cb4('0x50')]=_0x252272[_0x5cb4('0x4c')];queues[_0x252272['transfereeuniqueid']][_0x5cb4('0xb')]=_0x5cb4('0x51');utils[_0x5cb4('0x2')](util[_0x5cb4('0x3')](_0x5cb4('0x52'),_0x252272[_0x5cb4('0x5')],queues[_0x252272[_0x5cb4('0x4c')]][_0x5cb4('0x22')],_0x252272[_0x5cb4('0x4c')],_0x252272[_0x5cb4('0x4f')]));}}catch(_0x51dd25){utils[_0x5cb4('0x25')](util[_0x5cb4('0x3')](_0x5cb4('0x4b'),_0x252272[_0x5cb4('0x5')]),_0x51dd25);}};exports['attendedtransfer']=function(_0x1110e2){try{utils[_0x5cb4('0x1a')](util[_0x5cb4('0x3')]('[%s][queues][attendedtransfer]',_0x1110e2[_0x5cb4('0x53')]),_0x1110e2);if(_0x1110e2[_0x5cb4('0x53')]==_0x1110e2[_0x5cb4('0x54')]){if(!_['isNil'](queues[_0x1110e2[_0x5cb4('0x55')]])){utils['info'](util[_0x5cb4('0x3')](_0x5cb4('0x56'),_0x1110e2[_0x5cb4('0x53')],queues[_0x1110e2['secondtransfererlinkedid']]['name'],_0x1110e2['origtransfererexten']));queues[_0x1110e2[_0x5cb4('0x55')]][_0x5cb4('0x45')]=!![];queues[_0x1110e2['secondtransfererlinkedid']][_0x5cb4('0x4d')]=_0x5cb4('0x57');queues[_0x1110e2['secondtransfererlinkedid']][_0x5cb4('0x58')]=_0x1110e2[_0x5cb4('0x59')];queues[_0x1110e2[_0x5cb4('0x55')]]['transferuniqueid']=_0x1110e2[_0x5cb4('0x53')];queues[_0x1110e2['secondtransfererlinkedid']][_0x5cb4('0xb')]=_0x5cb4('0x5a');}if(!_['isNil'](queues[_0x1110e2[_0x5cb4('0x54')]])){if(_0x1110e2[_0x5cb4('0x5b')]&&queues[_0x1110e2[_0x5cb4('0x5b')]]){queues[_0x1110e2['transfereelinkedid']][_0x5cb4('0x24')]=0x1;queues[_0x1110e2[_0x5cb4('0x4c')]]=_[_0x5cb4('0x5c')](queues[_0x1110e2[_0x5cb4('0x5b')]]);queues[_0x1110e2[_0x5cb4('0x4c')]][_0x5cb4('0x11')]=_0x1110e2[_0x5cb4('0x5d')];queues[_0x1110e2[_0x5cb4('0x4c')]]['queuecallerenterreason']=0x2;queues[_0x1110e2[_0x5cb4('0x4c')]][_0x5cb4('0x9')]=queues[_0x1110e2[_0x5cb4('0x55')]][_0x5cb4('0x9')];queues[_0x1110e2['transfereeuniqueid']]['calleridname']=queues[_0x1110e2['secondtransfererlinkedid']]['calleridname'];queues[_0x1110e2[_0x5cb4('0x4c')]]['queuecallerjoinAt']=utils[_0x5cb4('0x17')]();queues[_0x1110e2['transfereeuniqueid']][_0x5cb4('0x1c')]=utils['now']();queues[_0x1110e2[_0x5cb4('0x4c')]][_0x5cb4('0x5e')]=0x0;queues[_0x1110e2['transfereeuniqueid']]['mohtime']=0x0;utils[_0x5cb4('0x2')](util['format'](_0x5cb4('0x5f'),_0x1110e2[_0x5cb4('0x53')],queues[_0x1110e2[_0x5cb4('0x4c')]][_0x5cb4('0x22')],queues[_0x1110e2['transfereeuniqueid']][_0x5cb4('0x9')],queues[_0x1110e2[_0x5cb4('0x4c')]]['calleridname']));}else{utils[_0x5cb4('0x2')](util[_0x5cb4('0x3')](_0x5cb4('0x60'),_0x1110e2['origtransfereruniqueid'],queues[_0x1110e2['origtransfererlinkedid']][_0x5cb4('0x22')],_0x1110e2[_0x5cb4('0x55')]));queues[_0x1110e2[_0x5cb4('0x54')]][_0x5cb4('0x11')]=_0x1110e2[_0x5cb4('0x55')];}}}else if(_0x1110e2['secondtransfereruniqueid']==_0x1110e2[_0x5cb4('0x55')]){if(!_[_0x5cb4('0x19')](queues[_0x1110e2[_0x5cb4('0x54')]])){utils[_0x5cb4('0x2')](util[_0x5cb4('0x3')](_0x5cb4('0x61'),_0x1110e2[_0x5cb4('0x53')],queues[_0x1110e2[_0x5cb4('0x54')]][_0x5cb4('0x22')],_0x1110e2['secondtransfereruniqueid'],_0x1110e2[_0x5cb4('0x62')]));queues[_0x1110e2[_0x5cb4('0x54')]][_0x5cb4('0x45')]=!![];queues[_0x1110e2[_0x5cb4('0x54')]][_0x5cb4('0x4d')]='ATTENDED';queues[_0x1110e2[_0x5cb4('0x54')]][_0x5cb4('0x58')]=_0x1110e2[_0x5cb4('0x62')];queues[_0x1110e2[_0x5cb4('0x54')]][_0x5cb4('0x50')]=_0x1110e2[_0x5cb4('0x63')];queues[_0x1110e2[_0x5cb4('0x54')]][_0x5cb4('0xb')]='ATTENDEDTRANSFER';}if(!_[_0x5cb4('0x19')](queues[_0x1110e2[_0x5cb4('0x55')]])){if(_0x1110e2[_0x5cb4('0x64')]&&queues[_0x1110e2[_0x5cb4('0x64')]]){queues[_0x1110e2['transfertargetlinkedid']]['queuecallerenterreason']=0x1;queues[_0x1110e2['transfertargetuniqueid']]=_[_0x5cb4('0x5c')](queues[_0x1110e2[_0x5cb4('0x64')]]);queues[_0x1110e2['transfertargetuniqueid']][_0x5cb4('0x11')]=_0x1110e2[_0x5cb4('0x5d')];queues[_0x1110e2['transfertargetuniqueid']][_0x5cb4('0x24')]=0x2;queues[_0x1110e2[_0x5cb4('0x5d')]][_0x5cb4('0x9')]=queues[_0x1110e2[_0x5cb4('0x54')]][_0x5cb4('0x9')];queues[_0x1110e2['transfertargetuniqueid']][_0x5cb4('0x65')]=queues[_0x1110e2[_0x5cb4('0x54')]][_0x5cb4('0x65')];queues[_0x1110e2[_0x5cb4('0x5d')]]['queuecallerjoinAt']=utils[_0x5cb4('0x17')]();queues[_0x1110e2[_0x5cb4('0x5d')]][_0x5cb4('0x1c')]=utils['now']();queues[_0x1110e2[_0x5cb4('0x5d')]][_0x5cb4('0x5e')]=0x0;queues[_0x1110e2[_0x5cb4('0x5d')]][_0x5cb4('0x66')]=0x0;utils['info'](util['format']('[%s][queues][attendedtransfer]\x20name:%s\x20transfereduniqueid:%s\x20calleridnum:%s\x20calleridname:%s',_0x1110e2[_0x5cb4('0x53')],queues[_0x1110e2[_0x5cb4('0x5d')]][_0x5cb4('0x22')],queues[_0x1110e2[_0x5cb4('0x5d')]][_0x5cb4('0x11')],queues[_0x1110e2[_0x5cb4('0x5d')]][_0x5cb4('0x9')],queues[_0x1110e2[_0x5cb4('0x5d')]][_0x5cb4('0x65')]));}else{utils['info'](util['format']('[%s][queues][attendedtransfer]\x20name:%s\x20transfereduniqueid:%s',_0x1110e2[_0x5cb4('0x53')],queues[_0x1110e2['secondtransfererlinkedid']][_0x5cb4('0x22')],_0x1110e2[_0x5cb4('0x54')]));queues[_0x1110e2['secondtransfererlinkedid']]['transfereduniqueid']=_0x1110e2[_0x5cb4('0x54')];}}}}catch(_0x575538){utils[_0x5cb4('0x25')](util[_0x5cb4('0x3')](_0x5cb4('0x67'),_0x1110e2['origtransfereruniqueid']),_0x575538);}};exports[_0x5cb4('0x68')]=function(_0x5b3ff1){try{if(!_['isNil'](queues[_0x5b3ff1['uniqueid']])){utils[_0x5cb4('0x1a')](util[_0x5cb4('0x3')]('[%s][queues][musiconholdstart]',_0x5b3ff1['uniqueid']),_0x5b3ff1);queues[_0x5b3ff1[_0x5cb4('0x5')]][_0x5cb4('0x69')]=utils[_0x5cb4('0x17')]();utils['info'](util[_0x5cb4('0x3')](_0x5cb4('0x6a'),_0x5b3ff1[_0x5cb4('0x5')],queues[_0x5b3ff1[_0x5cb4('0x5')]][_0x5cb4('0x22')],queues[_0x5b3ff1[_0x5cb4('0x5')]]['musiconholdstartAt']));}}catch(_0x26e2a9){utils[_0x5cb4('0x25')](util[_0x5cb4('0x3')](_0x5cb4('0x6b'),_0x5b3ff1[_0x5cb4('0x5')]),_0x26e2a9);}};exports[_0x5cb4('0x6c')]=function(_0x433297){try{if(!_[_0x5cb4('0x19')](queues[_0x433297['uniqueid']])){if(!_[_0x5cb4('0x19')](queues[_0x433297[_0x5cb4('0x5')]][_0x5cb4('0x69')])){utils[_0x5cb4('0x1a')](util[_0x5cb4('0x3')](_0x5cb4('0x6d'),_0x433297[_0x5cb4('0x5')]),_0x433297);queues[_0x433297[_0x5cb4('0x5')]]['mohtime']+=utils[_0x5cb4('0x38')](utils[_0x5cb4('0x17')](),queues[_0x433297[_0x5cb4('0x5')]][_0x5cb4('0x69')]);utils['info'](util['format'](_0x5cb4('0x6e'),_0x433297[_0x5cb4('0x5')],queues[_0x433297[_0x5cb4('0x5')]][_0x5cb4('0x22')],queues[_0x433297[_0x5cb4('0x5')]]['mohtime']));delete queues[_0x433297[_0x5cb4('0x5')]][_0x5cb4('0x69')];}}}catch(_0x189349){utils['error'](util[_0x5cb4('0x3')](_0x5cb4('0x6d'),_0x433297[_0x5cb4('0x5')]),_0x189349);}}; \ No newline at end of file +var _0x6572=['assign','now','hangup','isNil','[%s][queues][hangup]','queuecallerleaveAt','queuecallerabandon','queuecallerexit','queuecallercomplete','COMPLETEDBYAGENT','[%s][queues][hangup]\x20name:%s\x20queuecallerexitreason:%s','[%s][queues][hangup]\x20name:%s\x20transfereduniqueid:%s','name','queuecallerenterreason','error','varset','[%s][queues][varset]','variable','queuestatus','toUpperCase','CONTINUE','queuecallerabandonAt','queuecallerexitAt','value','[%s][queues][varset]\x20name:%s\x20variable:queuestatus\x20value:%s\x20queuecallerexitreason:%s','queueposition','EXITWITHKEY','[%s][queues][varset]\x20name:%s\x20variable:queueposition\x20value:%s\x20queuecallerexitreason:%s','[%s][queues][queuecallerabandon]','ABANDONED','queuecallerleave','[%s][queues][queuecallerleave]','[%s][queues][queuecallerleave]\x20name:%s\x20connectedlinenum:%s\x20connectedlinename:%s','connectedlinenum','holdtime','diffTime','queuecallerjoinAt','count','connectedlinename','[%s][queues][agentconnect]','[%s][queues][agentconnect]\x20name:%s\x20agent:%s\x20accountcode:%s','membername','destaccountcode','assigned','agentcomplete','[%s][queues][agentcomplete]','queuecallercompleteAt','reason','transfer','TRANSFER','blindtransfer','[%s][queues][blindtransfer]','transfereeuniqueid','transfertype','BLIND','extension','transferuniqueid','BLINDTRANSFER','[%s][queues][blindtransfer]\x20name:%s\x20transferuniqueid:%s\x20transferexten:%s\x20queuecallerexitreason:BLINDTRANSFER','attendedtransfer','[%s][queues][attendedtransfer]','origtransfereruniqueid','[%s][queues][attendedtransfer]\x20name:%s\x20transferexten:%s\x20queuecallerexitreason:ATTENDEDTRANSFER','secondtransfererlinkedid','ATTENDED','transferexten','origtransfererexten','ATTENDEDTRANSFER','origtransfererlinkedid','transfereelinkedid','clone','transfertargetuniqueid','calleridname','mohtime','[%s][queues][attendedtransfer]\x20name:%s\x20transfereduniqueid:%s','secondtransfereruniqueid','[%s][queues][attendedtransfer]\x20name:%s\x20transferuniqueid:%s\x20transferexten:%s\x20queuecallerexitreason:ATTENDEDTRANSFER','secondtransfererexten','transfertargetlinkedid','[%s][queues][attendedtransfer]\x20name:%s\x20transfereduniqueid:%s\x20calleridnum:%s\x20calleridname:%s','musiconholdstart','[%s][queues][musiconholdstart]','musiconholdstartAt','[%s][queues][musiconholdstop]\x20name:%s\x20musiconholdstartAt:%s','musiconholdstop','[%s][queues][musiconholdstop]','lodash','info','format','[%s][queues][writeDB]\x20channel:%s\x20queue:%s\x20lastAssignedTo:%s\x20calleridnum:%s\x20accountcode:%s\x20queuecallerexitreason:%s','channel','lastAssignedTo','calleridnum','queuecallerexitreason','queue','type','request','CreateVoiceQueueReport','transfereduniqueid','uniqueid','debug','[%s][queues][queuecallerjoin]','position'];(function(_0x2a06a4,_0x4ec756){var _0x31bbc6=function(_0x259296){while(--_0x259296){_0x2a06a4['push'](_0x2a06a4['shift']());}};_0x31bbc6(++_0x4ec756);}(_0x6572,0xbd));var _0x2657=function(_0x4070c2,_0x5ec75f){_0x4070c2=_0x4070c2-0x0;var _0x58082a=_0x6572[_0x4070c2];return _0x58082a;};'use strict';var _=require(_0x2657('0x0'));var util=require('util');var utils=require('./utils');var queues={};function writeDB(_0x571dff){utils[_0x2657('0x1')](util[_0x2657('0x2')](_0x2657('0x3'),_0x571dff['uniqueid'],_0x571dff[_0x2657('0x4')],_0x571dff['queue'],_0x571dff[_0x2657('0x5')],_0x571dff[_0x2657('0x6')],_0x571dff['accountcode'],_0x571dff[_0x2657('0x7')]));if(_0x571dff[_0x2657('0x8')]){utils['getVoiceQueueByName'](_0x571dff[_0x2657('0x8')])['then'](function(_0x3dbc0e){if(_0x3dbc0e){_0x571dff[_0x2657('0x9')]=_0x3dbc0e[_0x2657('0x9')];}utils[_0x2657('0xa')](_0x2657('0xb'),_0x571dff);});}else{utils['request'](_0x2657('0xb'),_0x571dff);}if(_0x571dff['transfereduniqueid']){delete queues[_0x571dff[_0x2657('0xc')]];}else{delete queues[_0x571dff[_0x2657('0xd')]];}}exports['queuecallerjoin']=function(_0x2b9a5c){try{utils[_0x2657('0xe')](util['format'](_0x2657('0xf'),_0x2b9a5c[_0x2657('0xd')]),_0x2b9a5c);utils['info'](util[_0x2657('0x2')]('[%s][queues][queuecallerjoin]\x20name:%s\x20position:%s',_0x2b9a5c[_0x2657('0xd')],_0x2b9a5c[_0x2657('0x8')],_0x2b9a5c[_0x2657('0x10')]));queues[_0x2b9a5c['uniqueid']]=_[_0x2657('0x11')](_0x2b9a5c,{'originalposition':_0x2b9a5c['position'],'queuecallerjoinAt':utils[_0x2657('0x12')](),'mohtime':0x0});}catch(_0x5a4a5e){utils['error'](util[_0x2657('0x2')](_0x2657('0xf'),_0x2b9a5c[_0x2657('0xd')]),_0x5a4a5e);}};exports[_0x2657('0x13')]=function(_0x22a887){try{if(!_[_0x2657('0x14')](queues[_0x22a887[_0x2657('0xd')]])){utils[_0x2657('0xe')](util['format'](_0x2657('0x15'),_0x22a887[_0x2657('0xd')]),_0x22a887);if(queues[_0x22a887[_0x2657('0xd')]][_0x2657('0x16')]){if(!queues[_0x22a887[_0x2657('0xd')]][_0x2657('0x17')]&&!queues[_0x22a887[_0x2657('0xd')]][_0x2657('0x18')]){queues[_0x22a887[_0x2657('0xd')]][_0x2657('0x19')]=!![];queues[_0x22a887[_0x2657('0xd')]]['queuecallercompleteAt']=utils[_0x2657('0x12')]();queues[_0x22a887[_0x2657('0xd')]]['queuecallerexitreason']=_0x2657('0x1a');}utils['info'](util['format'](_0x2657('0x1b'),_0x22a887[_0x2657('0xd')],queues[_0x22a887[_0x2657('0xd')]]['name'],queues[_0x22a887[_0x2657('0xd')]]['queuecallerexitreason']));writeDB(queues[_0x22a887[_0x2657('0xd')]]);}else if(queues[_0x22a887[_0x2657('0xd')]]['transfereduniqueid']){utils[_0x2657('0x1')](util['format'](_0x2657('0x1c'),_0x22a887[_0x2657('0xd')],queues[_0x22a887['uniqueid']][_0x2657('0x1d')],queues[_0x22a887[_0x2657('0xd')]]['transfereduniqueid']));queues[queues[_0x22a887[_0x2657('0xd')]]['transfereduniqueid']]=queues[_0x22a887[_0x2657('0xd')]];queues[queues[_0x22a887[_0x2657('0xd')]]['transfereduniqueid']][_0x2657('0x1e')]=0x2;delete queues[_0x22a887[_0x2657('0xd')]];}}}catch(_0x3b98e3){utils[_0x2657('0x1f')](util[_0x2657('0x2')](_0x2657('0x15'),_0x22a887['uniqueid']),_0x3b98e3);}};exports[_0x2657('0x20')]=function(_0xdcae75){try{utils['debug'](util[_0x2657('0x2')](_0x2657('0x21'),_0xdcae75[_0x2657('0xd')]),_0xdcae75);if(!_[_0x2657('0x14')](_0xdcae75[_0x2657('0x22')][_0x2657('0x23')])&&_0xdcae75['value'][_0x2657('0x24')]()!==_0x2657('0x25')){if(!_['isNil'](queues[_0xdcae75[_0x2657('0xd')]])){queues[_0xdcae75[_0x2657('0xd')]][_0x2657('0x17')]=![];queues[_0xdcae75[_0x2657('0xd')]][_0x2657('0x26')]=null;queues[_0xdcae75[_0x2657('0xd')]][_0x2657('0x18')]=!![];queues[_0xdcae75[_0x2657('0xd')]][_0x2657('0x27')]=utils[_0x2657('0x12')]();queues[_0xdcae75[_0x2657('0xd')]]['queuecallerexitreason']=_0xdcae75[_0x2657('0x28')]['toUpperCase']();utils['info'](util['format'](_0x2657('0x29'),_0xdcae75[_0x2657('0xd')],queues[_0xdcae75['uniqueid']][_0x2657('0x1d')],_0xdcae75['value'],queues[_0xdcae75[_0x2657('0xd')]][_0x2657('0x7')]));writeDB(queues[_0xdcae75['uniqueid']]);}}else if(!_[_0x2657('0x14')](_0xdcae75[_0x2657('0x22')][_0x2657('0x2a')])){if(!_['isNil'](queues[_0xdcae75[_0x2657('0xd')]])&&!queues[_0xdcae75[_0x2657('0xd')]][_0x2657('0x17')]){queues[_0xdcae75['uniqueid']][_0x2657('0x17')]=![];queues[_0xdcae75[_0x2657('0xd')]][_0x2657('0x26')]=null;queues[_0xdcae75['uniqueid']]['queuecallerexit']=!![];queues[_0xdcae75[_0x2657('0xd')]][_0x2657('0x27')]=utils[_0x2657('0x12')]();queues[_0xdcae75[_0x2657('0xd')]][_0x2657('0x7')]=_0x2657('0x2b');utils[_0x2657('0x1')](util[_0x2657('0x2')](_0x2657('0x2c'),_0xdcae75[_0x2657('0xd')],queues[_0xdcae75['uniqueid']][_0x2657('0x1d')],_0xdcae75['value'],queues[_0xdcae75['uniqueid']][_0x2657('0x7')]));}}}catch(_0x4e9499){utils[_0x2657('0x1f')](util['format'](_0x2657('0x21'),_0xdcae75[_0x2657('0xd')]),_0x4e9499);}};exports[_0x2657('0x17')]=function(_0x61101f){try{if(!_[_0x2657('0x14')](queues[_0x61101f[_0x2657('0xd')]])){utils['debug'](util[_0x2657('0x2')](_0x2657('0x2d'),_0x61101f['uniqueid']),_0x61101f);queues[_0x61101f['uniqueid']]['queuecallerexit']=![];queues[_0x61101f[_0x2657('0xd')]]['queuecallerexitAt']=null;queues[_0x61101f[_0x2657('0xd')]][_0x2657('0x17')]=!![];queues[_0x61101f[_0x2657('0xd')]][_0x2657('0x26')]=utils[_0x2657('0x12')]();queues[_0x61101f[_0x2657('0xd')]][_0x2657('0x7')]=_0x2657('0x2e');utils['info'](util['format']('[%s][queues][queuecallerabandon]\x20name:%s\x20queuecallerexitreason:%s',_0x61101f[_0x2657('0xd')],queues[_0x61101f[_0x2657('0xd')]][_0x2657('0x1d')],queues[_0x61101f[_0x2657('0xd')]][_0x2657('0x7')]));}}catch(_0x327d21){utils['error'](util[_0x2657('0x2')](_0x2657('0x2d'),_0x61101f[_0x2657('0xd')]),_0x327d21);}};exports[_0x2657('0x2f')]=function(_0x2ccca5){try{if(!_[_0x2657('0x14')](queues[_0x2ccca5[_0x2657('0xd')]])){utils[_0x2657('0xe')](util[_0x2657('0x2')](_0x2657('0x30'),_0x2ccca5[_0x2657('0xd')]),_0x2ccca5);utils[_0x2657('0x1')](util[_0x2657('0x2')](_0x2657('0x31'),_0x2ccca5[_0x2657('0xd')],queues[_0x2ccca5[_0x2657('0xd')]][_0x2657('0x1d')],_0x2ccca5[_0x2657('0x32')],_0x2ccca5['connectedlinename']));queues[_0x2ccca5[_0x2657('0xd')]][_0x2657('0x2f')]=!![];queues[_0x2ccca5[_0x2657('0xd')]][_0x2657('0x16')]=utils[_0x2657('0x12')]();queues[_0x2ccca5[_0x2657('0xd')]][_0x2657('0x33')]=utils[_0x2657('0x34')](queues[_0x2ccca5[_0x2657('0xd')]][_0x2657('0x16')],queues[_0x2ccca5[_0x2657('0xd')]][_0x2657('0x35')]);queues[_0x2ccca5[_0x2657('0xd')]][_0x2657('0x10')]=_0x2ccca5[_0x2657('0x10')];queues[_0x2ccca5[_0x2657('0xd')]][_0x2657('0x36')]=_0x2ccca5['count'];queues[_0x2ccca5[_0x2657('0xd')]]['connectedlinenum']=_0x2ccca5[_0x2657('0x32')];queues[_0x2ccca5['uniqueid']]['connectedlinename']=_0x2ccca5[_0x2657('0x37')];}}catch(_0x5aec09){utils[_0x2657('0x1f')](util['format']('[%s][queues][queuecallerleave]',_0x2ccca5[_0x2657('0xd')]),_0x5aec09);}};exports['agentconnect']=function(_0x96ca39){try{if(!_[_0x2657('0x14')](queues[_0x96ca39[_0x2657('0xd')]])){utils[_0x2657('0xe')](util[_0x2657('0x2')](_0x2657('0x38'),_0x96ca39[_0x2657('0xd')]),_0x96ca39);utils['info'](util[_0x2657('0x2')](_0x2657('0x39'),_0x96ca39[_0x2657('0xd')],queues[_0x96ca39[_0x2657('0xd')]]['name'],_0x96ca39[_0x2657('0x3a')],_0x96ca39[_0x2657('0x3b')]));queues[_0x96ca39[_0x2657('0xd')]][_0x2657('0x17')]=![];queues[_0x96ca39[_0x2657('0xd')]]['queuecallerabandon']=![];queues[_0x96ca39[_0x2657('0xd')]][_0x2657('0x26')]=null;queues[_0x96ca39[_0x2657('0xd')]][_0x2657('0x18')]=![];queues[_0x96ca39[_0x2657('0xd')]][_0x2657('0x7')]=null;queues[_0x96ca39[_0x2657('0xd')]][_0x2657('0x27')]=null;queues[_0x96ca39[_0x2657('0xd')]][_0x2657('0x3c')]=!![];queues[_0x96ca39[_0x2657('0xd')]]['accountcode']=_0x96ca39[_0x2657('0x3b')];queues[_0x96ca39[_0x2657('0xd')]][_0x2657('0x5')]=_0x96ca39[_0x2657('0x3a')];}}catch(_0x385231){utils[_0x2657('0x1f')](util[_0x2657('0x2')](_0x2657('0x38'),_0x96ca39['uniqueid']),_0x385231);}};exports[_0x2657('0x3d')]=function(_0x39606d){try{if(!_[_0x2657('0x14')](queues[_0x39606d[_0x2657('0xd')]])){if(queues[_0x39606d[_0x2657('0xd')]]['queuecallerleaveAt']){utils[_0x2657('0xe')](util[_0x2657('0x2')](_0x2657('0x3e'),_0x39606d[_0x2657('0xd')]),_0x39606d);queues[_0x39606d[_0x2657('0xd')]]['queuecallerabandon']=![];queues[_0x39606d[_0x2657('0xd')]]['queuecallerabandon']=![];queues[_0x39606d[_0x2657('0xd')]][_0x2657('0x26')]=null;queues[_0x39606d[_0x2657('0xd')]]['queuecallerexit']=![];queues[_0x39606d[_0x2657('0xd')]][_0x2657('0x27')]=null;queues[_0x39606d[_0x2657('0xd')]]['assigned']=!![];queues[_0x39606d[_0x2657('0xd')]][_0x2657('0x5')]=_0x39606d[_0x2657('0x3a')];queues[_0x39606d[_0x2657('0xd')]][_0x2657('0x19')]=!![];queues[_0x39606d[_0x2657('0xd')]][_0x2657('0x3f')]=utils[_0x2657('0x12')]();if(_0x39606d[_0x2657('0x40')]==_0x2657('0x41')){if(!queues[_0x39606d[_0x2657('0xd')]]['transfer']){queues[_0x39606d['uniqueid']][_0x2657('0x7')]=_0x2657('0x42');}}else{queues[_0x39606d['uniqueid']]['queuecallerexitreason']='COMPLETEDBY'+_0x39606d[_0x2657('0x40')][_0x2657('0x24')]();}utils[_0x2657('0x1')](util[_0x2657('0x2')]('[%s][queues][agentcomplete]\x20name:%s\x20agent:%s\x20queuecallerexitreason:%s',_0x39606d['uniqueid'],queues[_0x39606d[_0x2657('0xd')]][_0x2657('0x1d')],_0x39606d[_0x2657('0x3a')],queues[_0x39606d[_0x2657('0xd')]][_0x2657('0x7')]));writeDB(queues[_0x39606d[_0x2657('0xd')]]);}}}catch(_0x4a0784){utils['error'](util[_0x2657('0x2')]('[%s][queues][agentcomplete]',_0x39606d['uniqueid']),_0x4a0784);}};exports[_0x2657('0x43')]=function(_0x53abd1){try{if(!_[_0x2657('0x14')](queues[_0x53abd1['transfereeuniqueid']])){utils[_0x2657('0xe')](util['format'](_0x2657('0x44'),_0x53abd1[_0x2657('0xd')]),_0x53abd1);queues[_0x53abd1[_0x2657('0x45')]][_0x2657('0x41')]=!![];queues[_0x53abd1[_0x2657('0x45')]][_0x2657('0x46')]=_0x2657('0x47');queues[_0x53abd1[_0x2657('0x45')]]['transferexten']=_0x53abd1[_0x2657('0x48')];queues[_0x53abd1[_0x2657('0x45')]][_0x2657('0x49')]=_0x53abd1[_0x2657('0x45')];queues[_0x53abd1[_0x2657('0x45')]][_0x2657('0x7')]=_0x2657('0x4a');utils[_0x2657('0x1')](util['format'](_0x2657('0x4b'),_0x53abd1[_0x2657('0xd')],queues[_0x53abd1[_0x2657('0x45')]][_0x2657('0x1d')],_0x53abd1[_0x2657('0x45')],_0x53abd1[_0x2657('0x48')]));}}catch(_0xc933c4){utils['error'](util[_0x2657('0x2')](_0x2657('0x44'),_0x53abd1[_0x2657('0xd')]),_0xc933c4);}};exports[_0x2657('0x4c')]=function(_0x4cd9b7){try{utils['debug'](util['format'](_0x2657('0x4d'),_0x4cd9b7[_0x2657('0x4e')]),_0x4cd9b7);if(_0x4cd9b7[_0x2657('0x4e')]==_0x4cd9b7['origtransfererlinkedid']){if(!_[_0x2657('0x14')](queues[_0x4cd9b7['secondtransfererlinkedid']])){utils['info'](util[_0x2657('0x2')](_0x2657('0x4f'),_0x4cd9b7[_0x2657('0x4e')],queues[_0x4cd9b7[_0x2657('0x50')]][_0x2657('0x1d')],_0x4cd9b7['origtransfererexten']));queues[_0x4cd9b7[_0x2657('0x50')]][_0x2657('0x41')]=!![];queues[_0x4cd9b7['secondtransfererlinkedid']]['transfertype']=_0x2657('0x51');queues[_0x4cd9b7[_0x2657('0x50')]][_0x2657('0x52')]=_0x4cd9b7[_0x2657('0x53')];queues[_0x4cd9b7['secondtransfererlinkedid']][_0x2657('0x49')]=_0x4cd9b7[_0x2657('0x4e')];queues[_0x4cd9b7[_0x2657('0x50')]][_0x2657('0x7')]=_0x2657('0x54');}if(!_[_0x2657('0x14')](queues[_0x4cd9b7[_0x2657('0x55')]])){if(_0x4cd9b7['transfereelinkedid']&&queues[_0x4cd9b7[_0x2657('0x56')]]){queues[_0x4cd9b7['transfereelinkedid']][_0x2657('0x1e')]=0x1;queues[_0x4cd9b7['transfereeuniqueid']]=_[_0x2657('0x57')](queues[_0x4cd9b7[_0x2657('0x56')]]);queues[_0x4cd9b7[_0x2657('0x45')]][_0x2657('0xc')]=_0x4cd9b7[_0x2657('0x58')];queues[_0x4cd9b7['transfereeuniqueid']]['queuecallerenterreason']=0x2;queues[_0x4cd9b7['transfereeuniqueid']][_0x2657('0x6')]=queues[_0x4cd9b7['secondtransfererlinkedid']]['calleridnum'];queues[_0x4cd9b7[_0x2657('0x45')]][_0x2657('0x59')]=queues[_0x4cd9b7['secondtransfererlinkedid']][_0x2657('0x59')];queues[_0x4cd9b7['transfereeuniqueid']][_0x2657('0x35')]=utils['now']();queues[_0x4cd9b7['transfereeuniqueid']][_0x2657('0x16')]=utils[_0x2657('0x12')]();queues[_0x4cd9b7['transfereeuniqueid']][_0x2657('0x33')]=0x0;queues[_0x4cd9b7['transfereeuniqueid']][_0x2657('0x5a')]=0x0;utils['info'](util[_0x2657('0x2')]('[%s][queues][attendedtransfer]\x20name:%s\x20calleridnum:%s\x20calleridname:%s',_0x4cd9b7[_0x2657('0x4e')],queues[_0x4cd9b7[_0x2657('0x45')]][_0x2657('0x1d')],queues[_0x4cd9b7['transfereeuniqueid']][_0x2657('0x6')],queues[_0x4cd9b7[_0x2657('0x45')]]['calleridname']));}else{utils[_0x2657('0x1')](util[_0x2657('0x2')](_0x2657('0x5b'),_0x4cd9b7['origtransfereruniqueid'],queues[_0x4cd9b7[_0x2657('0x55')]][_0x2657('0x1d')],_0x4cd9b7[_0x2657('0x50')]));queues[_0x4cd9b7['origtransfererlinkedid']][_0x2657('0xc')]=_0x4cd9b7[_0x2657('0x50')];}}}else if(_0x4cd9b7[_0x2657('0x5c')]==_0x4cd9b7[_0x2657('0x50')]){if(!_[_0x2657('0x14')](queues[_0x4cd9b7[_0x2657('0x55')]])){utils['info'](util[_0x2657('0x2')](_0x2657('0x5d'),_0x4cd9b7[_0x2657('0x4e')],queues[_0x4cd9b7[_0x2657('0x55')]][_0x2657('0x1d')],_0x4cd9b7['secondtransfereruniqueid'],_0x4cd9b7[_0x2657('0x5e')]));queues[_0x4cd9b7['origtransfererlinkedid']]['transfer']=!![];queues[_0x4cd9b7[_0x2657('0x55')]]['transfertype']=_0x2657('0x51');queues[_0x4cd9b7['origtransfererlinkedid']][_0x2657('0x52')]=_0x4cd9b7[_0x2657('0x5e')];queues[_0x4cd9b7[_0x2657('0x55')]][_0x2657('0x49')]=_0x4cd9b7[_0x2657('0x5c')];queues[_0x4cd9b7[_0x2657('0x55')]][_0x2657('0x7')]='ATTENDEDTRANSFER';}if(!_[_0x2657('0x14')](queues[_0x4cd9b7[_0x2657('0x50')]])){if(_0x4cd9b7['transfertargetlinkedid']&&queues[_0x4cd9b7['transfertargetlinkedid']]){queues[_0x4cd9b7[_0x2657('0x5f')]][_0x2657('0x1e')]=0x1;queues[_0x4cd9b7[_0x2657('0x58')]]=_[_0x2657('0x57')](queues[_0x4cd9b7[_0x2657('0x5f')]]);queues[_0x4cd9b7[_0x2657('0x58')]][_0x2657('0xc')]=_0x4cd9b7['transfertargetuniqueid'];queues[_0x4cd9b7[_0x2657('0x58')]][_0x2657('0x1e')]=0x2;queues[_0x4cd9b7['transfertargetuniqueid']][_0x2657('0x6')]=queues[_0x4cd9b7[_0x2657('0x55')]][_0x2657('0x6')];queues[_0x4cd9b7[_0x2657('0x58')]][_0x2657('0x59')]=queues[_0x4cd9b7[_0x2657('0x55')]][_0x2657('0x59')];queues[_0x4cd9b7[_0x2657('0x58')]][_0x2657('0x35')]=utils[_0x2657('0x12')]();queues[_0x4cd9b7[_0x2657('0x58')]][_0x2657('0x16')]=utils[_0x2657('0x12')]();queues[_0x4cd9b7['transfertargetuniqueid']]['holdtime']=0x0;queues[_0x4cd9b7[_0x2657('0x58')]][_0x2657('0x5a')]=0x0;utils[_0x2657('0x1')](util['format'](_0x2657('0x60'),_0x4cd9b7[_0x2657('0x4e')],queues[_0x4cd9b7[_0x2657('0x58')]][_0x2657('0x1d')],queues[_0x4cd9b7[_0x2657('0x58')]]['transfereduniqueid'],queues[_0x4cd9b7[_0x2657('0x58')]]['calleridnum'],queues[_0x4cd9b7[_0x2657('0x58')]][_0x2657('0x59')]));}else{utils[_0x2657('0x1')](util[_0x2657('0x2')](_0x2657('0x5b'),_0x4cd9b7[_0x2657('0x4e')],queues[_0x4cd9b7[_0x2657('0x50')]][_0x2657('0x1d')],_0x4cd9b7[_0x2657('0x55')]));queues[_0x4cd9b7[_0x2657('0x50')]][_0x2657('0xc')]=_0x4cd9b7[_0x2657('0x55')];}}}}catch(_0x59b1fc){utils[_0x2657('0x1f')](util[_0x2657('0x2')]('[%s][queues][attendedtransfer]',_0x4cd9b7[_0x2657('0x4e')]),_0x59b1fc);}};exports[_0x2657('0x61')]=function(_0xd94541){try{if(!_[_0x2657('0x14')](queues[_0xd94541[_0x2657('0xd')]])){utils[_0x2657('0xe')](util[_0x2657('0x2')](_0x2657('0x62'),_0xd94541[_0x2657('0xd')]),_0xd94541);queues[_0xd94541[_0x2657('0xd')]][_0x2657('0x63')]=utils[_0x2657('0x12')]();utils[_0x2657('0x1')](util[_0x2657('0x2')](_0x2657('0x64'),_0xd94541[_0x2657('0xd')],queues[_0xd94541['uniqueid']][_0x2657('0x1d')],queues[_0xd94541[_0x2657('0xd')]]['musiconholdstartAt']));}}catch(_0x5d6cff){utils['error'](util[_0x2657('0x2')](_0x2657('0x62'),_0xd94541[_0x2657('0xd')]),_0x5d6cff);}};exports[_0x2657('0x65')]=function(_0x1b879d){try{if(!_[_0x2657('0x14')](queues[_0x1b879d[_0x2657('0xd')]])){if(!_[_0x2657('0x14')](queues[_0x1b879d[_0x2657('0xd')]]['musiconholdstartAt'])){utils[_0x2657('0xe')](util[_0x2657('0x2')](_0x2657('0x66'),_0x1b879d['uniqueid']),_0x1b879d);queues[_0x1b879d[_0x2657('0xd')]][_0x2657('0x5a')]+=utils['diffTime'](utils['now'](),queues[_0x1b879d[_0x2657('0xd')]][_0x2657('0x63')]);utils[_0x2657('0x1')](util['format']('[%s][queues][musiconholdstop]\x20name:%s\x20mohtime:%s',_0x1b879d[_0x2657('0xd')],queues[_0x1b879d['uniqueid']]['name'],queues[_0x1b879d['uniqueid']][_0x2657('0x5a')]));delete queues[_0x1b879d[_0x2657('0xd')]]['musiconholdstartAt'];}}}catch(_0xffe48f){utils[_0x2657('0x1f')](util[_0x2657('0x2')](_0x2657('0x66'),_0x1b879d[_0x2657('0xd')]),_0xffe48f);}}; \ No newline at end of file diff --git a/server/services/xdr/recordings.controller.js b/server/services/xdr/recordings.controller.js index 76964fa..61ebb4f 100644 --- a/server/services/xdr/recordings.controller.js +++ b/server/services/xdr/recordings.controller.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xecd9=['value','endsWith','.wav49','replace','.WAV','find','monitors','push','error','hangup','calleridnum','calleridname','cause-txt','connectedlinenum','connectedlinename','type','outbound','forEach','[%s][recordings][hangup]','newexten','[%s][recordings][newexten]','[%s][recordings][newexten]\x20application:%s\x20appdata:%s','application','appdata','toLowerCase','set','cdr','split','substring','lastIndexOf','queuecallerjoin','[%s][recordings][queuecallerjoin]','[%s][recordings][queuecallerjoin]\x20queue:%s','queue','blindtransfer','[%s][recordings][blindtransfer]','transferercalleridnum','transferercalleridname','transfereecalleridnum','transfereecalleridname','transfereruniqueid','recording','lodash','util','./transfers.controller','info','format','[%s][recordings][writeDB]','blinds','uniqueid','transfereeuniqueid','accountcode','getUserByInternal','then','membername','UserId','CreateVoiceRecording','request','debug','[%s][recordings][newchannel]','linkedid','[%s][recordings][newchannel]\x20context:%s\x20exten:%s','exten','context','newstate','isNil','channelstate','[%s][recordings][newstate]\x20context:%s\x20channel:%s','channel','[%s][recordings][newstate]\x20linkedid:%s\x20context:%s\x20channel:%s','varset','variable','mixmonitor_filename','[%s][recordings][varset]','[%s][recordings][varset]\x20variable:%s\x20value:%s'];(function(_0x140202,_0x4245c7){var _0x3037c2=function(_0x525d19){while(--_0x525d19){_0x140202['push'](_0x140202['shift']());}};_0x3037c2(++_0x4245c7);}(_0xecd9,0xc0));var _0x9ecd=function(_0x31dfa1,_0x57cabb){_0x31dfa1=_0x31dfa1-0x0;var _0x585bfe=_0xecd9[_0x31dfa1];return _0x585bfe;};'use strict';var _=require(_0x9ecd('0x0'));var util=require(_0x9ecd('0x1'));var utils=require('./utils');var transfers=require(_0x9ecd('0x2'));var recordings={};function writeDB(_0x5a8872){var _0x253c70;utils[_0x9ecd('0x3')](util[_0x9ecd('0x4')](_0x9ecd('0x5'),_0x5a8872['uniqueid']));if(transfers[_0x9ecd('0x6')][_0x5a8872[_0x9ecd('0x7')]]){_0x253c70=_0x5a8872[_0x9ecd('0x7')];_0x5a8872[_0x9ecd('0x7')]=transfers[_0x9ecd('0x6')][_0x5a8872[_0x9ecd('0x7')]][_0x9ecd('0x8')];}if(_0x5a8872[_0x9ecd('0x9')]){utils[_0x9ecd('0xa')](_0x5a8872[_0x9ecd('0x9')])[_0x9ecd('0xb')](function(_0x3fb350){if(_0x3fb350){_0x5a8872[_0x9ecd('0xc')]=_0x3fb350['name'];_0x5a8872[_0x9ecd('0xd')]=_0x3fb350['id'];}utils['request'](_0x9ecd('0xe'),_0x5a8872);});}else{utils[_0x9ecd('0xf')]('CreateVoiceRecording',_0x5a8872);}if(_0x253c70)delete transfers[_0x9ecd('0x6')][_0x253c70];}exports['newchannel']=function(_0x37827d){try{utils[_0x9ecd('0x10')](util[_0x9ecd('0x4')](_0x9ecd('0x11'),_0x37827d[_0x9ecd('0x7')]),_0x37827d);if(_0x37827d['uniqueid']==_0x37827d[_0x9ecd('0x12')]){utils[_0x9ecd('0x3')](util[_0x9ecd('0x4')](_0x9ecd('0x13'),_0x37827d[_0x9ecd('0x7')],_0x37827d['context'],_0x37827d[_0x9ecd('0x14')]));recordings[_0x37827d[_0x9ecd('0x7')]]={'uniqueid':_0x37827d[_0x9ecd('0x7')],'accountcode':_0x37827d['accountcode'],'exten':_0x37827d[_0x9ecd('0x14')],'context':_0x37827d[_0x9ecd('0x15')],'channel':_0x37827d['channel'],'monitors':[]};}}catch(_0x216922){utils['error'](util[_0x9ecd('0x4')](_0x9ecd('0x11'),_0x37827d[_0x9ecd('0x7')]),_0x216922);}};exports[_0x9ecd('0x16')]=function(_0x3e6caf){try{utils[_0x9ecd('0x10')](util['format']('[%s][recordings][newstate]',_0x3e6caf[_0x9ecd('0x7')]),_0x3e6caf);if(!_[_0x9ecd('0x17')](recordings[_0x3e6caf['uniqueid']])&&_0x3e6caf[_0x9ecd('0x18')]==0x6){utils[_0x9ecd('0x3')](util[_0x9ecd('0x4')](_0x9ecd('0x19'),_0x3e6caf['uniqueid'],_0x3e6caf['context'],_0x3e6caf[_0x9ecd('0x1a')]));}else if(!_['isNil'](recordings[_0x3e6caf[_0x9ecd('0x12')]])&&_0x3e6caf['channelstate']==0x6&&_0x3e6caf[_0x9ecd('0x15')]!='transfer'){utils[_0x9ecd('0x3')](util[_0x9ecd('0x4')](_0x9ecd('0x1b'),_0x3e6caf[_0x9ecd('0x7')],_0x3e6caf[_0x9ecd('0x12')],_0x3e6caf[_0x9ecd('0x15')],_0x3e6caf[_0x9ecd('0x1a')]));recordings[_0x3e6caf['linkedid']][_0x9ecd('0x9')]=_0x3e6caf[_0x9ecd('0x9')];}}catch(_0x220f00){utils['error'](util[_0x9ecd('0x4')]('[%s][recordings][newstate]',_0x3e6caf[_0x9ecd('0x7')]),_0x220f00);}};exports[_0x9ecd('0x1c')]=function(_0xcab7f9){try{if(!_[_0x9ecd('0x17')](_0xcab7f9[_0x9ecd('0x1d')])&&!_['isNil'](_0xcab7f9[_0x9ecd('0x1d')][_0x9ecd('0x1e')])){utils['debug'](util['format'](_0x9ecd('0x1f'),_0xcab7f9[_0x9ecd('0x7')]),_0xcab7f9);utils[_0x9ecd('0x3')](util[_0x9ecd('0x4')](_0x9ecd('0x20'),_0xcab7f9[_0x9ecd('0x7')],_0xcab7f9['variable'],_0xcab7f9[_0x9ecd('0x21')]));if(_[_0x9ecd('0x22')](_0xcab7f9[_0x9ecd('0x21')],_0x9ecd('0x23'))){_0xcab7f9[_0x9ecd('0x21')]=_0xcab7f9[_0x9ecd('0x21')][_0x9ecd('0x24')](_0x9ecd('0x23'),_0x9ecd('0x25'));}if(recordings[_0xcab7f9['linkedid']]){var _0x178ffd=_[_0x9ecd('0x26')](recordings[_0xcab7f9[_0x9ecd('0x12')]]['monitors'],{'value':_0xcab7f9['value']});if(_[_0x9ecd('0x17')](_0x178ffd)){recordings[_0xcab7f9['linkedid']][_0x9ecd('0x27')][_0x9ecd('0x28')]({'value':_0xcab7f9[_0x9ecd('0x21')]});}}}}catch(_0x20c8f7){utils[_0x9ecd('0x29')](util[_0x9ecd('0x4')]('[%s][recordings][varset]',_0xcab7f9[_0x9ecd('0x7')]),_0x20c8f7);}};exports[_0x9ecd('0x2a')]=function(_0x1bb9f6){try{if(!_[_0x9ecd('0x17')](recordings[_0x1bb9f6['uniqueid']])){utils[_0x9ecd('0x10')](util[_0x9ecd('0x4')]('[%s][recordings][hangup]',_0x1bb9f6[_0x9ecd('0x7')]),_0x1bb9f6);utils[_0x9ecd('0x3')](util[_0x9ecd('0x4')]('[%s][recordings][hangup]\x20calleridnum:%s\x20calleridname:%s\x20reason:%s',_0x1bb9f6[_0x9ecd('0x7')],_0x1bb9f6[_0x9ecd('0x2b')],_0x1bb9f6[_0x9ecd('0x2c')],_0x1bb9f6[_0x9ecd('0x2d')]));recordings[_0x1bb9f6[_0x9ecd('0x7')]][_0x9ecd('0x2b')]=_0x1bb9f6[_0x9ecd('0x2b')];recordings[_0x1bb9f6['uniqueid']][_0x9ecd('0x2c')]=_0x1bb9f6['calleridname'];recordings[_0x1bb9f6['uniqueid']][_0x9ecd('0x2e')]=_0x1bb9f6[_0x9ecd('0x2e')];recordings[_0x1bb9f6[_0x9ecd('0x7')]][_0x9ecd('0x2f')]=_0x1bb9f6[_0x9ecd('0x2f')];if(recordings[_0x1bb9f6[_0x9ecd('0x7')]][_0x9ecd('0x30')]==_0x9ecd('0x31')&&recordings[_0x1bb9f6['uniqueid']]['accountcode']){recordings[_0x1bb9f6['uniqueid']][_0x9ecd('0x2e')]=recordings[_0x1bb9f6[_0x9ecd('0x7')]][_0x9ecd('0x9')];recordings[_0x1bb9f6[_0x9ecd('0x7')]][_0x9ecd('0x2f')]='';}recordings[_0x1bb9f6[_0x9ecd('0x7')]][_0x9ecd('0x27')][_0x9ecd('0x32')](function(_0x2382fe){var _0x3b7df6=_['clone'](recordings[_0x1bb9f6[_0x9ecd('0x7')]]);_0x3b7df6[_0x9ecd('0x21')]=_0x2382fe[_0x9ecd('0x21')];writeDB(_0x3b7df6);});delete recordings[_0x1bb9f6['uniqueid']];}}catch(_0x1b3a49){utils[_0x9ecd('0x29')](util['format'](_0x9ecd('0x33'),_0x1bb9f6[_0x9ecd('0x7')]),_0x1b3a49);}};exports[_0x9ecd('0x34')]=function(_0x25f425){try{if(!_[_0x9ecd('0x17')](recordings[_0x25f425[_0x9ecd('0x7')]])){utils[_0x9ecd('0x10')](util[_0x9ecd('0x4')](_0x9ecd('0x35'),_0x25f425['uniqueid']),_0x25f425);utils['info'](util['format'](_0x9ecd('0x36'),_0x25f425[_0x9ecd('0x7')],_0x25f425[_0x9ecd('0x37')],_0x25f425[_0x9ecd('0x38')]));if(_0x25f425['application'][_0x9ecd('0x39')]()==_0x9ecd('0x3a')&&_['startsWith'](_0x25f425['appdata']['toLowerCase'](),_0x9ecd('0x3b'))){var _0x300900=_0x25f425[_0x9ecd('0x38')][_0x9ecd('0x3c')]('=');var _0x2d26fb=_0x300900[0x0][_0x9ecd('0x3d')](_0x300900[0x0][_0x9ecd('0x3e')]('(')+0x1,_0x300900[0x0][_0x9ecd('0x3e')](')'));var _0x6408dd=_0x300900[0x1];recordings[_0x25f425[_0x9ecd('0x7')]][_0x2d26fb]=_0x6408dd;}}}catch(_0x21c654){utils[_0x9ecd('0x29')](util[_0x9ecd('0x4')]('[%s][recordings][newexten]',_0x25f425['uniqueid']),_0x21c654);}};exports[_0x9ecd('0x3f')]=function(_0x770c4e){try{if(!_[_0x9ecd('0x17')](recordings[_0x770c4e['uniqueid']])){utils[_0x9ecd('0x10')](util[_0x9ecd('0x4')](_0x9ecd('0x40'),_0x770c4e[_0x9ecd('0x7')]),_0x770c4e);utils[_0x9ecd('0x3')](util[_0x9ecd('0x4')](_0x9ecd('0x41'),_0x770c4e['uniqueid'],_0x770c4e['queue']));recordings[_0x770c4e[_0x9ecd('0x7')]][_0x9ecd('0x42')]=_0x770c4e['queue'];}}catch(_0x5ece00){utils['error'](util[_0x9ecd('0x4')](_0x9ecd('0x40'),_0x770c4e[_0x9ecd('0x7')]),_0x5ece00);}};exports[_0x9ecd('0x43')]=function(_0x137b5d){try{utils[_0x9ecd('0x10')](util['format'](_0x9ecd('0x44'),_0x137b5d[_0x9ecd('0x7')]),_0x137b5d);utils['info'](util[_0x9ecd('0x4')]('[%s][recordings][blindtransfer]\x20transferercalleridnum:%s\x20transferercalleridname:%s\x20transfereecalleridnum:%s\x20transfereecalleridname:%s',_0x137b5d[_0x9ecd('0x7')],_0x137b5d[_0x9ecd('0x45')],_0x137b5d[_0x9ecd('0x46')],_0x137b5d[_0x9ecd('0x47')],_0x137b5d[_0x9ecd('0x48')]));if(recordings[_0x137b5d[_0x9ecd('0x49')]]&&transfers[_0x9ecd('0x6')][_0x137b5d['transfereruniqueid']]){transfers[_0x9ecd('0x6')][_0x137b5d['transfereruniqueid']][_0x9ecd('0x4a')]=!![];}}catch(_0x8e7b66){utils['error'](util[_0x9ecd('0x4')](_0x9ecd('0x44'),_0x137b5d['uniqueid']),_0x8e7b66);}}; \ No newline at end of file +var _0xf740=['[%s][recordings][queuecallerjoin]','[%s][recordings][queuecallerjoin]\x20queue:%s','queue','[%s][recordings][blindtransfer]','transferercalleridnum','transferercalleridname','transfereecalleridnum','transfereecalleridname','transfereruniqueid','lodash','util','./utils','./transfers.controller','info','format','[%s][recordings][writeDB]','uniqueid','blinds','transfereeuniqueid','accountcode','getUserByInternal','name','UserId','request','CreateVoiceRecording','newchannel','debug','[%s][recordings][newchannel]','linkedid','context','exten','channel','error','newstate','channelstate','[%s][recordings][newstate]\x20context:%s\x20channel:%s','isNil','[%s][recordings][newstate]\x20linkedid:%s\x20context:%s\x20channel:%s','variable','[%s][recordings][varset]\x20variable:%s\x20value:%s','endsWith','.wav49','value','replace','.WAV','find','monitors','push','[%s][recordings][hangup]\x20calleridnum:%s\x20calleridname:%s\x20reason:%s','calleridname','cause-txt','calleridnum','connectedlinenum','connectedlinename','type','outbound','forEach','clone','[%s][recordings][hangup]','application','appdata','toLowerCase','set','startsWith','cdr','substring','lastIndexOf','[%s][recordings][newexten]','queuecallerjoin'];(function(_0x3526a5,_0x56825d){var _0x44f869=function(_0x5dd195){while(--_0x5dd195){_0x3526a5['push'](_0x3526a5['shift']());}};_0x44f869(++_0x56825d);}(_0xf740,0x1a7));var _0x0f74=function(_0x400b43,_0x55da4e){_0x400b43=_0x400b43-0x0;var _0x3c330f=_0xf740[_0x400b43];return _0x3c330f;};'use strict';var _=require(_0x0f74('0x0'));var util=require(_0x0f74('0x1'));var utils=require(_0x0f74('0x2'));var transfers=require(_0x0f74('0x3'));var recordings={};function writeDB(_0x4c29f9){var _0x292ba3;utils[_0x0f74('0x4')](util[_0x0f74('0x5')](_0x0f74('0x6'),_0x4c29f9[_0x0f74('0x7')]));if(transfers['blinds'][_0x4c29f9['uniqueid']]){_0x292ba3=_0x4c29f9[_0x0f74('0x7')];_0x4c29f9[_0x0f74('0x7')]=transfers[_0x0f74('0x8')][_0x4c29f9[_0x0f74('0x7')]][_0x0f74('0x9')];}if(_0x4c29f9[_0x0f74('0xa')]){utils[_0x0f74('0xb')](_0x4c29f9[_0x0f74('0xa')])['then'](function(_0x1f3e0c){if(_0x1f3e0c){_0x4c29f9['membername']=_0x1f3e0c[_0x0f74('0xc')];_0x4c29f9[_0x0f74('0xd')]=_0x1f3e0c['id'];}utils[_0x0f74('0xe')](_0x0f74('0xf'),_0x4c29f9);});}else{utils[_0x0f74('0xe')](_0x0f74('0xf'),_0x4c29f9);}if(_0x292ba3)delete transfers[_0x0f74('0x8')][_0x292ba3];}exports[_0x0f74('0x10')]=function(_0x242397){try{utils[_0x0f74('0x11')](util['format'](_0x0f74('0x12'),_0x242397['uniqueid']),_0x242397);if(_0x242397[_0x0f74('0x7')]==_0x242397[_0x0f74('0x13')]){utils[_0x0f74('0x4')](util[_0x0f74('0x5')]('[%s][recordings][newchannel]\x20context:%s\x20exten:%s',_0x242397[_0x0f74('0x7')],_0x242397[_0x0f74('0x14')],_0x242397[_0x0f74('0x15')]));recordings[_0x242397['uniqueid']]={'uniqueid':_0x242397[_0x0f74('0x7')],'accountcode':_0x242397['accountcode'],'exten':_0x242397[_0x0f74('0x15')],'context':_0x242397[_0x0f74('0x14')],'channel':_0x242397[_0x0f74('0x16')],'monitors':[]};}}catch(_0x574d70){utils[_0x0f74('0x17')](util[_0x0f74('0x5')](_0x0f74('0x12'),_0x242397[_0x0f74('0x7')]),_0x574d70);}};exports[_0x0f74('0x18')]=function(_0x408e22){try{utils[_0x0f74('0x11')](util[_0x0f74('0x5')]('[%s][recordings][newstate]',_0x408e22[_0x0f74('0x7')]),_0x408e22);if(!_['isNil'](recordings[_0x408e22[_0x0f74('0x7')]])&&_0x408e22[_0x0f74('0x19')]==0x6){utils[_0x0f74('0x4')](util[_0x0f74('0x5')](_0x0f74('0x1a'),_0x408e22['uniqueid'],_0x408e22[_0x0f74('0x14')],_0x408e22['channel']));}else if(!_[_0x0f74('0x1b')](recordings[_0x408e22[_0x0f74('0x13')]])&&_0x408e22[_0x0f74('0x19')]==0x6&&_0x408e22[_0x0f74('0x14')]!='transfer'){utils['info'](util[_0x0f74('0x5')](_0x0f74('0x1c'),_0x408e22[_0x0f74('0x7')],_0x408e22[_0x0f74('0x13')],_0x408e22['context'],_0x408e22['channel']));recordings[_0x408e22[_0x0f74('0x13')]]['accountcode']=_0x408e22[_0x0f74('0xa')];}}catch(_0x43c2da){utils[_0x0f74('0x17')](util[_0x0f74('0x5')]('[%s][recordings][newstate]',_0x408e22[_0x0f74('0x7')]),_0x43c2da);}};exports['varset']=function(_0x4893e1){try{if(!_[_0x0f74('0x1b')](_0x4893e1[_0x0f74('0x1d')])&&!_['isNil'](_0x4893e1[_0x0f74('0x1d')]['mixmonitor_filename'])){utils[_0x0f74('0x11')](util[_0x0f74('0x5')]('[%s][recordings][varset]',_0x4893e1[_0x0f74('0x7')]),_0x4893e1);utils[_0x0f74('0x4')](util['format'](_0x0f74('0x1e'),_0x4893e1[_0x0f74('0x7')],_0x4893e1[_0x0f74('0x1d')],_0x4893e1['value']));if(_[_0x0f74('0x1f')](_0x4893e1['value'],_0x0f74('0x20'))){_0x4893e1[_0x0f74('0x21')]=_0x4893e1[_0x0f74('0x21')][_0x0f74('0x22')](_0x0f74('0x20'),_0x0f74('0x23'));}if(recordings[_0x4893e1[_0x0f74('0x13')]]){var _0x324e51=_[_0x0f74('0x24')](recordings[_0x4893e1['linkedid']]['monitors'],{'value':_0x4893e1['value']});if(_['isNil'](_0x324e51)){recordings[_0x4893e1[_0x0f74('0x13')]][_0x0f74('0x25')][_0x0f74('0x26')]({'value':_0x4893e1[_0x0f74('0x21')]});}}}}catch(_0x599276){utils[_0x0f74('0x17')](util[_0x0f74('0x5')]('[%s][recordings][varset]',_0x4893e1['uniqueid']),_0x599276);}};exports['hangup']=function(_0x2f9af2){try{if(!_[_0x0f74('0x1b')](recordings[_0x2f9af2[_0x0f74('0x7')]])){utils[_0x0f74('0x11')](util[_0x0f74('0x5')]('[%s][recordings][hangup]',_0x2f9af2[_0x0f74('0x7')]),_0x2f9af2);utils[_0x0f74('0x4')](util[_0x0f74('0x5')](_0x0f74('0x27'),_0x2f9af2[_0x0f74('0x7')],_0x2f9af2['calleridnum'],_0x2f9af2[_0x0f74('0x28')],_0x2f9af2[_0x0f74('0x29')]));recordings[_0x2f9af2[_0x0f74('0x7')]]['calleridnum']=_0x2f9af2[_0x0f74('0x2a')];recordings[_0x2f9af2[_0x0f74('0x7')]][_0x0f74('0x28')]=_0x2f9af2[_0x0f74('0x28')];recordings[_0x2f9af2[_0x0f74('0x7')]][_0x0f74('0x2b')]=_0x2f9af2[_0x0f74('0x2b')];recordings[_0x2f9af2['uniqueid']][_0x0f74('0x2c')]=_0x2f9af2[_0x0f74('0x2c')];if(recordings[_0x2f9af2['uniqueid']][_0x0f74('0x2d')]==_0x0f74('0x2e')&&recordings[_0x2f9af2[_0x0f74('0x7')]][_0x0f74('0xa')]){recordings[_0x2f9af2[_0x0f74('0x7')]][_0x0f74('0x2b')]=recordings[_0x2f9af2[_0x0f74('0x7')]]['accountcode'];recordings[_0x2f9af2[_0x0f74('0x7')]][_0x0f74('0x2c')]='';}recordings[_0x2f9af2[_0x0f74('0x7')]][_0x0f74('0x25')][_0x0f74('0x2f')](function(_0x13b43d){var _0xd4bb01=_[_0x0f74('0x30')](recordings[_0x2f9af2['uniqueid']]);_0xd4bb01[_0x0f74('0x21')]=_0x13b43d[_0x0f74('0x21')];writeDB(_0xd4bb01);});delete recordings[_0x2f9af2['uniqueid']];}}catch(_0x13c19f){utils[_0x0f74('0x17')](util[_0x0f74('0x5')](_0x0f74('0x31'),_0x2f9af2[_0x0f74('0x7')]),_0x13c19f);}};exports['newexten']=function(_0x272d80){try{if(!_[_0x0f74('0x1b')](recordings[_0x272d80[_0x0f74('0x7')]])){utils[_0x0f74('0x11')](util[_0x0f74('0x5')]('[%s][recordings][newexten]',_0x272d80[_0x0f74('0x7')]),_0x272d80);utils[_0x0f74('0x4')](util[_0x0f74('0x5')]('[%s][recordings][newexten]\x20application:%s\x20appdata:%s',_0x272d80[_0x0f74('0x7')],_0x272d80[_0x0f74('0x32')],_0x272d80[_0x0f74('0x33')]));if(_0x272d80['application'][_0x0f74('0x34')]()==_0x0f74('0x35')&&_[_0x0f74('0x36')](_0x272d80['appdata'][_0x0f74('0x34')](),_0x0f74('0x37'))){var _0x9a94f6=_0x272d80[_0x0f74('0x33')]['split']('=');var _0x3bb4e2=_0x9a94f6[0x0][_0x0f74('0x38')](_0x9a94f6[0x0][_0x0f74('0x39')]('(')+0x1,_0x9a94f6[0x0][_0x0f74('0x39')](')'));var _0x436c56=_0x9a94f6[0x1];recordings[_0x272d80[_0x0f74('0x7')]][_0x3bb4e2]=_0x436c56;}}}catch(_0x17070f){utils[_0x0f74('0x17')](util['format'](_0x0f74('0x3a'),_0x272d80[_0x0f74('0x7')]),_0x17070f);}};exports[_0x0f74('0x3b')]=function(_0x28097d){try{if(!_[_0x0f74('0x1b')](recordings[_0x28097d['uniqueid']])){utils[_0x0f74('0x11')](util[_0x0f74('0x5')](_0x0f74('0x3c'),_0x28097d[_0x0f74('0x7')]),_0x28097d);utils[_0x0f74('0x4')](util[_0x0f74('0x5')](_0x0f74('0x3d'),_0x28097d[_0x0f74('0x7')],_0x28097d[_0x0f74('0x3e')]));recordings[_0x28097d[_0x0f74('0x7')]][_0x0f74('0x3e')]=_0x28097d[_0x0f74('0x3e')];}}catch(_0x4a69c4){utils['error'](util[_0x0f74('0x5')](_0x0f74('0x3c'),_0x28097d['uniqueid']),_0x4a69c4);}};exports['blindtransfer']=function(_0x377bd4){try{utils[_0x0f74('0x11')](util[_0x0f74('0x5')](_0x0f74('0x3f'),_0x377bd4['uniqueid']),_0x377bd4);utils[_0x0f74('0x4')](util[_0x0f74('0x5')]('[%s][recordings][blindtransfer]\x20transferercalleridnum:%s\x20transferercalleridname:%s\x20transfereecalleridnum:%s\x20transfereecalleridname:%s',_0x377bd4['uniqueid'],_0x377bd4[_0x0f74('0x40')],_0x377bd4[_0x0f74('0x41')],_0x377bd4[_0x0f74('0x42')],_0x377bd4[_0x0f74('0x43')]));if(recordings[_0x377bd4[_0x0f74('0x44')]]&&transfers['blinds'][_0x377bd4[_0x0f74('0x44')]]){transfers[_0x0f74('0x8')][_0x377bd4[_0x0f74('0x44')]]['recording']=!![];}}catch(_0x4c8a1f){utils['error'](util[_0x0f74('0x5')](_0x0f74('0x3f'),_0x377bd4[_0x0f74('0x7')]),_0x4c8a1f);}}; \ No newline at end of file diff --git a/server/services/xdr/transfers.controller.js b/server/services/xdr/transfers.controller.js index a0add64..241b848 100644 --- a/server/services/xdr/transfers.controller.js +++ b/server/services/xdr/transfers.controller.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xe293=['blind','error','attendedtransfer','origtransfereruniqueid','transfertargetcalleridnum','assign','origtransferercalleridname','secondtransfererconnectedlinenum','origtransfereraccountcode','secondtransferercontext','secondtransfererexten','origtransfererlinkedid','origtransferercontext','isNil','transfertargetchannel','transfertargetcalleridname','transfertargetconnectedlinenum','transfertargetconnectedlinename','transfertargetaccountcode','transfertargetcontext','transfertargetexten','transfertargetlinkedid','[%s][transfers][attendedtransfer]','lodash','./utils','info','type','attended','uniqueid','request','CreateVoiceTransferReport','blinds','blindtransfer','debug','[%s][transfers][blindtransfer]','format','transferercalleridnum','transferercalleridname','transfereecalleridnum','transfereecalleridname'];(function(_0x2db79f,_0x51f8dd){var _0x162aac=function(_0x5c8240){while(--_0x5c8240){_0x2db79f['push'](_0x2db79f['shift']());}};_0x162aac(++_0x51f8dd);}(_0xe293,0x12f));var _0x3e29=function(_0x377a6e,_0x59b99d){_0x377a6e=_0x377a6e-0x0;var _0x37f751=_0xe293[_0x377a6e];return _0x37f751;};'use strict';var _=require(_0x3e29('0x0'));var util=require('util');var utils=require(_0x3e29('0x1'));function writeDB(_0x113aaa){utils[_0x3e29('0x2')](util['format']('[%s][transfers][writeDB]\x20type:%s',_0x113aaa[_0x3e29('0x3')]===_0x3e29('0x4')?_0x113aaa['origtransfereruniqueid']:_0x113aaa[_0x3e29('0x5')],_0x113aaa[_0x3e29('0x3')]));utils[_0x3e29('0x6')](_0x3e29('0x7'),_0x113aaa);}exports[_0x3e29('0x8')]={};exports[_0x3e29('0x9')]=function(_0xd3e87f){try{utils[_0x3e29('0xa')](util['format'](_0x3e29('0xb'),_0xd3e87f[_0x3e29('0x5')]),_0xd3e87f);utils[_0x3e29('0x2')](util[_0x3e29('0xc')]('[%s][transfers][blindtransfer]\x20transferercalleridnum:%s\x20transferercalleridname:%s\x20transfereecalleridnum:%s\x20transfereecalleridname:%s',_0xd3e87f[_0x3e29('0x5')],_0xd3e87f[_0x3e29('0xd')],_0xd3e87f[_0x3e29('0xe')],_0xd3e87f[_0x3e29('0xf')],_0xd3e87f[_0x3e29('0x10')]));_0xd3e87f[_0x3e29('0x3')]=_0x3e29('0x11');exports['blinds'][_0xd3e87f['transfereruniqueid']]=_0xd3e87f;writeDB(_0xd3e87f);}catch(_0x18af73){utils[_0x3e29('0x12')](util[_0x3e29('0xc')]('[%s][transfers][blindtransfer]',_0xd3e87f['uniqueid']),_0x18af73);}};exports[_0x3e29('0x13')]=function(_0x1bd00f){try{utils[_0x3e29('0xa')](util[_0x3e29('0xc')]('[%s][transfers][attendedtransfer]',_0x1bd00f[_0x3e29('0x14')]),_0x1bd00f);utils[_0x3e29('0x2')](util[_0x3e29('0xc')]('[%s][transfers][attendedtransfer]\x20transferercalleridnum:%s\x20transferercalleridname:%s\x20transfereecalleridnum:%s\x20transfereecalleridname:%s',_0x1bd00f['origtransfereruniqueid'],_0x1bd00f['origtransferercalleridnum'],_0x1bd00f['origtransferercalleridname'],_0x1bd00f[_0x3e29('0x15')],_0x1bd00f['transfertargetcalleridname']));_0x1bd00f=_[_0x3e29('0x16')](_0x1bd00f,{'transfererchannel':_0x1bd00f['origtransfererchannel'],'transferercalleridnum':_0x1bd00f['origtransferercalleridnum'],'transferercalleridname':_0x1bd00f[_0x3e29('0x17')],'transfererconnectedlinenum':_0x1bd00f[_0x3e29('0x18')],'transfererconnectedlinename':_0x1bd00f['secondtransfererconnectedlinename'],'transfereraccountcode':_0x1bd00f[_0x3e29('0x19')],'transferercontext':_0x1bd00f[_0x3e29('0x1a')],'transfererexten':_0x1bd00f[_0x3e29('0x1b')],'transfererlinkedid':_0x1bd00f[_0x3e29('0x1c')],'context':_0x1bd00f[_0x3e29('0x1d')],'extension':_0x1bd00f['origtransfererexten'],'type':'attended'});if(_[_0x3e29('0x1e')](_0x1bd00f['transfereechannel'])){_0x1bd00f=_['assign'](_0x1bd00f,{'transfereechannel':_0x1bd00f[_0x3e29('0x1f')],'transfereecalleridnum':_0x1bd00f['transfertargetcalleridnum'],'transfereecalleridname':_0x1bd00f[_0x3e29('0x20')],'transfereeconnectedlinenum':_0x1bd00f[_0x3e29('0x21')],'transfereeconnectedlinename':_0x1bd00f[_0x3e29('0x22')],'transfereeaccountcode':_0x1bd00f[_0x3e29('0x23')],'transfereecontext':_0x1bd00f[_0x3e29('0x24')],'transfereeexten':_0x1bd00f[_0x3e29('0x25')],'transfereelinkedid':_0x1bd00f[_0x3e29('0x26')]});}writeDB(_0x1bd00f);}catch(_0xa60fda){utils[_0x3e29('0x12')](util[_0x3e29('0xc')](_0x3e29('0x27'),_0x1bd00f[_0x3e29('0x14')]),_0xa60fda);}}; \ No newline at end of file +var _0xfeaf=['transfertargetaccountcode','transfertargetcontext','lodash','./utils','info','format','[%s][transfers][writeDB]\x20type:%s','type','attended','uniqueid','request','blinds','blindtransfer','[%s][transfers][blindtransfer]','[%s][transfers][blindtransfer]\x20transferercalleridnum:%s\x20transferercalleridname:%s\x20transfereecalleridnum:%s\x20transfereecalleridname:%s','transferercalleridnum','transfereecalleridnum','transfereecalleridname','blind','transfereruniqueid','error','attendedtransfer','debug','[%s][transfers][attendedtransfer]','[%s][transfers][attendedtransfer]\x20transferercalleridnum:%s\x20transferercalleridname:%s\x20transfereecalleridnum:%s\x20transfereecalleridname:%s','origtransfereruniqueid','origtransferercalleridnum','transfertargetcalleridnum','assign','origtransfererchannel','secondtransfererconnectedlinenum','secondtransfererconnectedlinename','origtransfereraccountcode','secondtransfererexten','origtransfererlinkedid','origtransferercontext','transfertargetchannel','transfertargetconnectedlinename'];(function(_0x336af2,_0x2287c1){var _0x3f52e9=function(_0x35596b){while(--_0x35596b){_0x336af2['push'](_0x336af2['shift']());}};_0x3f52e9(++_0x2287c1);}(_0xfeaf,0xc0));var _0xffea=function(_0xd636e6,_0x3460c2){_0xd636e6=_0xd636e6-0x0;var _0xf6474d=_0xfeaf[_0xd636e6];return _0xf6474d;};'use strict';var _=require(_0xffea('0x0'));var util=require('util');var utils=require(_0xffea('0x1'));function writeDB(_0x36bb0b){utils[_0xffea('0x2')](util[_0xffea('0x3')](_0xffea('0x4'),_0x36bb0b[_0xffea('0x5')]===_0xffea('0x6')?_0x36bb0b['origtransfereruniqueid']:_0x36bb0b[_0xffea('0x7')],_0x36bb0b[_0xffea('0x5')]));utils[_0xffea('0x8')]('CreateVoiceTransferReport',_0x36bb0b);}exports[_0xffea('0x9')]={};exports[_0xffea('0xa')]=function(_0x247759){try{utils['debug'](util[_0xffea('0x3')](_0xffea('0xb'),_0x247759[_0xffea('0x7')]),_0x247759);utils[_0xffea('0x2')](util[_0xffea('0x3')](_0xffea('0xc'),_0x247759[_0xffea('0x7')],_0x247759[_0xffea('0xd')],_0x247759['transferercalleridname'],_0x247759[_0xffea('0xe')],_0x247759[_0xffea('0xf')]));_0x247759[_0xffea('0x5')]=_0xffea('0x10');exports[_0xffea('0x9')][_0x247759[_0xffea('0x11')]]=_0x247759;writeDB(_0x247759);}catch(_0x1adfee){utils[_0xffea('0x12')](util[_0xffea('0x3')]('[%s][transfers][blindtransfer]',_0x247759[_0xffea('0x7')]),_0x1adfee);}};exports[_0xffea('0x13')]=function(_0x595b3b){try{utils[_0xffea('0x14')](util['format'](_0xffea('0x15'),_0x595b3b['origtransfereruniqueid']),_0x595b3b);utils[_0xffea('0x2')](util[_0xffea('0x3')](_0xffea('0x16'),_0x595b3b[_0xffea('0x17')],_0x595b3b[_0xffea('0x18')],_0x595b3b['origtransferercalleridname'],_0x595b3b[_0xffea('0x19')],_0x595b3b['transfertargetcalleridname']));_0x595b3b=_[_0xffea('0x1a')](_0x595b3b,{'transfererchannel':_0x595b3b[_0xffea('0x1b')],'transferercalleridnum':_0x595b3b[_0xffea('0x18')],'transferercalleridname':_0x595b3b['origtransferercalleridname'],'transfererconnectedlinenum':_0x595b3b[_0xffea('0x1c')],'transfererconnectedlinename':_0x595b3b[_0xffea('0x1d')],'transfereraccountcode':_0x595b3b[_0xffea('0x1e')],'transferercontext':_0x595b3b['secondtransferercontext'],'transfererexten':_0x595b3b[_0xffea('0x1f')],'transfererlinkedid':_0x595b3b[_0xffea('0x20')],'context':_0x595b3b[_0xffea('0x21')],'extension':_0x595b3b['origtransfererexten'],'type':'attended'});if(_['isNil'](_0x595b3b['transfereechannel'])){_0x595b3b=_[_0xffea('0x1a')](_0x595b3b,{'transfereechannel':_0x595b3b[_0xffea('0x22')],'transfereecalleridnum':_0x595b3b[_0xffea('0x19')],'transfereecalleridname':_0x595b3b['transfertargetcalleridname'],'transfereeconnectedlinenum':_0x595b3b['transfertargetconnectedlinenum'],'transfereeconnectedlinename':_0x595b3b[_0xffea('0x23')],'transfereeaccountcode':_0x595b3b[_0xffea('0x24')],'transfereecontext':_0x595b3b[_0xffea('0x25')],'transfereeexten':_0x595b3b['transfertargetexten'],'transfereelinkedid':_0x595b3b['transfertargetlinkedid']});}writeDB(_0x595b3b);}catch(_0x1f5751){utils[_0xffea('0x12')](util['format'](_0xffea('0x15'),_0x595b3b['origtransfereruniqueid']),_0x1f5751);}}; \ No newline at end of file diff --git a/server/services/xdr/utils.js b/server/services/xdr/utils.js index b1617ef..3740df7 100644 --- a/server/services/xdr/utils.js +++ b/server/services/xdr/utils.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x278a=['[utils][request]\x20name:%s','catch','GetUser','internal','name','interface','[utils][getUser]\x20where:%s','stringify','result','getUserByInternal','[utils][getUserByInterface]\x20interface:%s\x20%s','found','notfound','[utils][getUserByInterface]','[utils][getUserByName]\x20name:%s\x20%s','[utils][getUserByName]','getVoiceQueueByName','type','acw','acwTimeout','[utils][getVoiceQueueByName]\x20name:%s','[utils][getVoiceQueueByName]\x20name:%s\x20%s','add','seconds','format','YYYY-MM-DD\x20HH:mm:ss','subtractTime','subtract','diffTime','diff','sumTime','now','isAfter','isBefore','bluebird','jayson/promise','moment','client','http','../../config/logger','xdr','info','inspect','debug','error','request','then'];(function(_0x4a1fa1,_0x2db06b){var _0x21d32f=function(_0x5a0694){while(--_0x5a0694){_0x4a1fa1['push'](_0x4a1fa1['shift']());}};_0x21d32f(++_0x2db06b);}(_0x278a,0xde));var _0xa278=function(_0x2807e8,_0x1fc1ef){_0x2807e8=_0x2807e8-0x0;var _0x12a957=_0x278a[_0x2807e8];return _0x12a957;};'use strict';var BPromise=require(_0xa278('0x0'));var jayson=require(_0xa278('0x1'));var moment=require(_0xa278('0x2'));var util=require('util');var client=jayson[_0xa278('0x3')][_0xa278('0x4')]({'port':0x2329});var logger=require(_0xa278('0x5'))(_0xa278('0x6'));exports[_0xa278('0x7')]=function(_0x2c980c,_0x3b618a){logger[_0xa278('0x7')](_0x2c980c,_0x3b618a?util[_0xa278('0x8')](_0x3b618a,{'showHidden':![],'depth':null}):'');};exports[_0xa278('0x9')]=function(_0x1f3226,_0x35efd5){logger[_0xa278('0x9')](_0x1f3226,_0x35efd5?util[_0xa278('0x8')](_0x35efd5,{'showHidden':![],'depth':null}):'');};exports[_0xa278('0xa')]=function(_0x56a568,_0xa18913){logger['error'](_0x56a568,_0xa18913?util['inspect'](_0xa18913,{'showHidden':![],'depth':null}):'');};exports['request']=function(_0x22328a,_0x29cc27){return client[_0xa278('0xb')](_0x22328a,{'body':_0x29cc27})[_0xa278('0xc')](function(_0x5e7a75){logger[_0xa278('0x9')](_0xa278('0xd'),_0x22328a,_0x5e7a75?util[_0xa278('0x8')](_0x5e7a75,{'showHidden':![],'depth':null}):'');})[_0xa278('0xe')](function(_0x5999da){logger[_0xa278('0xa')](_0xa278('0xd'),_0x22328a,_0x5999da?util['inspect'](_0x5999da,{'showHidden':![],'depth':null}):'');});};function getUser(_0x40efcb){return client['request'](_0xa278('0xf'),{'options':{'raw':!![],'attributes':['id',_0xa278('0x10'),_0xa278('0x11'),_0xa278('0x12')],'where':_0x40efcb,'limit':0x1}})[_0xa278('0xc')](function(_0x48b80e){logger[_0xa278('0x9')](_0xa278('0x13'),JSON[_0xa278('0x14')](_0x40efcb),_0x48b80e?util['inspect'](_0x48b80e,{'showHidden':![],'depth':null}):'');return _0x48b80e[_0xa278('0x15')]['length']?_0x48b80e[_0xa278('0x15')][0x0]:null;});}exports[_0xa278('0x16')]=function(_0x521961){return new BPromise(function(_0x7858a3,_0x1de98f){if(_0x521961){return getUser({'internal':_0x521961})[_0xa278('0xc')](function(_0x1c4b81){logger[_0xa278('0x7')]('[utils][getUserByInternal]\x20internal:%s\x20%s',_0x521961,_0x1c4b81?'found':'notfound');return _0x7858a3(_0x1c4b81);})[_0xa278('0xe')](function(_0x366755){logger[_0xa278('0xa')]('[utils][getUserByInternal]',_0x366755?util[_0xa278('0x8')](_0x366755,{'showHidden':![],'depth':null}):'');return _0x7858a3(null);});}return _0x7858a3(null);});};exports['getUserByInterface']=function(_0x34aa55){return new BPromise(function(_0x2f3d77,_0x3c1a72){if(_0x34aa55){return getUser({'interface':_0x34aa55})[_0xa278('0xc')](function(_0x410184){logger['info'](_0xa278('0x17'),_0x34aa55,_0x410184?_0xa278('0x18'):_0xa278('0x19'));return _0x2f3d77(_0x410184);})[_0xa278('0xe')](function(_0xdb7604){logger[_0xa278('0xa')](_0xa278('0x1a'),_0xdb7604?util['inspect'](_0xdb7604,{'showHidden':![],'depth':null}):'');return _0x2f3d77(null);});}return _0x2f3d77(null);});};exports['getUserByName']=function(_0x4f8f9f){return new BPromise(function(_0x528bd8,_0x5382d5){if(_0x4f8f9f){return getUser({'name':_0x4f8f9f})[_0xa278('0xc')](function(_0x650ad){logger[_0xa278('0x7')](_0xa278('0x1b'),_0x4f8f9f,_0x650ad?_0xa278('0x18'):_0xa278('0x19'));return _0x528bd8(_0x650ad);})[_0xa278('0xe')](function(_0x45e8f1){logger[_0xa278('0xa')](_0xa278('0x1c'),_0x45e8f1?util[_0xa278('0x8')](_0x45e8f1,{'showHidden':![],'depth':null}):'');return _0x528bd8(null);});}return _0x528bd8(null);});};exports[_0xa278('0x1d')]=function(_0x26b433){return new BPromise(function(_0x21641f,_0x2bfcc3){if(_0x26b433){return client['request']('GetVoiceQueue',{'options':{'raw':!![],'attributes':['id',_0xa278('0x11'),_0xa278('0x1e'),_0xa278('0x1f'),_0xa278('0x20')],'where':{'name':_0x26b433},'limit':0x1}})[_0xa278('0xc')](function(_0x5c1e70){logger[_0xa278('0x9')](_0xa278('0x21'),_0x26b433,_0x5c1e70?util[_0xa278('0x8')](_0x5c1e70,{'showHidden':![],'depth':null}):'');logger[_0xa278('0x7')](_0xa278('0x22'),_0x26b433,_0x5c1e70?_0xa278('0x18'):_0xa278('0x19'));return _0x21641f(_0x5c1e70[_0xa278('0x15')]['length']?_0x5c1e70[_0xa278('0x15')][0x0]:null);})[_0xa278('0xe')](function(_0x42808c){logger[_0xa278('0xa')]('[utils][getVoiceQueueByName]',_0x42808c?util[_0xa278('0x8')](_0x42808c,{'showHidden':![],'depth':null}):'');return _0x21641f(null);});}return _0x21641f(null);});};exports['addTime']=function(_0x20a1b6,_0x6566cc){return moment(_0x20a1b6)[_0xa278('0x23')](_0x6566cc,_0xa278('0x24'))[_0xa278('0x25')](_0xa278('0x26'));};exports[_0xa278('0x27')]=function(_0x39508f,_0x121129){return moment(_0x39508f)[_0xa278('0x28')](_0x121129,_0xa278('0x24'))['format'](_0xa278('0x26'));};exports[_0xa278('0x29')]=function(_0x3783cd,_0x20ec17){return moment(_0x3783cd)[_0xa278('0x2a')](moment(_0x20ec17),_0xa278('0x24'));};exports[_0xa278('0x2b')]=function(_0x7ee0d0,_0x3a7374){return parseInt(_0x7ee0d0,0xa)+parseInt(_0x3a7374,0xa);};exports[_0xa278('0x2c')]=function(){return moment()[_0xa278('0x25')]('YYYY-MM-DD\x20HH:mm:ss');};exports[_0xa278('0x2d')]=function(_0x287867,_0x214dce){if(_0x214dce){return moment(_0x287867)[_0xa278('0x2d')](_0x214dce);}return!![];};exports['isBefore']=function(_0x496e23,_0x461296){if(_0x461296){return moment(_0x496e23)[_0xa278('0x2e')](_0x461296);}else if(_0x496e23){return!![];}return![];}; \ No newline at end of file +var _0xb1be=['internal','name','[utils][getUser]\x20where:%s','stringify','result','length','getUserByInternal','[utils][getUserByInternal]\x20internal:%s\x20%s','found','notfound','[utils][getUserByInternal]','getUserByInterface','[utils][getUserByInterface]','getUserByName','[utils][getUserByName]\x20name:%s\x20%s','[utils][getUserByName]','getVoiceQueueByName','GetVoiceQueue','type','[utils][getVoiceQueueByName]\x20name:%s','[utils][getVoiceQueueByName]\x20name:%s\x20%s','[utils][getVoiceQueueByName]','addTime','add','format','YYYY-MM-DD\x20HH:mm:ss','subtractTime','subtract','seconds','diffTime','diff','sumTime','now','isAfter','isBefore','moment','client','http','../../config/logger','xdr','info','inspect','debug','error','request','then','[utils][request]\x20name:%s','catch','GetUser'];(function(_0x4d41a4,_0x153a39){var _0x3df187=function(_0xfbc98f){while(--_0xfbc98f){_0x4d41a4['push'](_0x4d41a4['shift']());}};_0x3df187(++_0x153a39);}(_0xb1be,0x118));var _0xeb1b=function(_0xa464c9,_0x7c86d8){_0xa464c9=_0xa464c9-0x0;var _0x3d73c4=_0xb1be[_0xa464c9];return _0x3d73c4;};'use strict';var BPromise=require('bluebird');var jayson=require('jayson/promise');var moment=require(_0xeb1b('0x0'));var util=require('util');var client=jayson[_0xeb1b('0x1')][_0xeb1b('0x2')]({'port':0x2329});var logger=require(_0xeb1b('0x3'))(_0xeb1b('0x4'));exports[_0xeb1b('0x5')]=function(_0x27ca08,_0x2d9c8){logger[_0xeb1b('0x5')](_0x27ca08,_0x2d9c8?util[_0xeb1b('0x6')](_0x2d9c8,{'showHidden':![],'depth':null}):'');};exports[_0xeb1b('0x7')]=function(_0x3343fe,_0x1e96f3){logger['debug'](_0x3343fe,_0x1e96f3?util['inspect'](_0x1e96f3,{'showHidden':![],'depth':null}):'');};exports['error']=function(_0x1e2127,_0x4d67da){logger[_0xeb1b('0x8')](_0x1e2127,_0x4d67da?util['inspect'](_0x4d67da,{'showHidden':![],'depth':null}):'');};exports[_0xeb1b('0x9')]=function(_0x3893e4,_0x3ea89d){return client[_0xeb1b('0x9')](_0x3893e4,{'body':_0x3ea89d})[_0xeb1b('0xa')](function(_0x20a307){logger[_0xeb1b('0x7')](_0xeb1b('0xb'),_0x3893e4,_0x20a307?util[_0xeb1b('0x6')](_0x20a307,{'showHidden':![],'depth':null}):'');})[_0xeb1b('0xc')](function(_0x1eec48){logger[_0xeb1b('0x8')](_0xeb1b('0xb'),_0x3893e4,_0x1eec48?util[_0xeb1b('0x6')](_0x1eec48,{'showHidden':![],'depth':null}):'');});};function getUser(_0x18ccdd){return client[_0xeb1b('0x9')](_0xeb1b('0xd'),{'options':{'raw':!![],'attributes':['id',_0xeb1b('0xe'),_0xeb1b('0xf'),'interface'],'where':_0x18ccdd,'limit':0x1}})[_0xeb1b('0xa')](function(_0x1bceeb){logger[_0xeb1b('0x7')](_0xeb1b('0x10'),JSON[_0xeb1b('0x11')](_0x18ccdd),_0x1bceeb?util[_0xeb1b('0x6')](_0x1bceeb,{'showHidden':![],'depth':null}):'');return _0x1bceeb[_0xeb1b('0x12')][_0xeb1b('0x13')]?_0x1bceeb[_0xeb1b('0x12')][0x0]:null;});}exports[_0xeb1b('0x14')]=function(_0x4fe94d){return new BPromise(function(_0x41a405,_0x172435){if(_0x4fe94d){return getUser({'internal':_0x4fe94d})[_0xeb1b('0xa')](function(_0x2d10ab){logger[_0xeb1b('0x5')](_0xeb1b('0x15'),_0x4fe94d,_0x2d10ab?_0xeb1b('0x16'):_0xeb1b('0x17'));return _0x41a405(_0x2d10ab);})[_0xeb1b('0xc')](function(_0x53bd36){logger['error'](_0xeb1b('0x18'),_0x53bd36?util[_0xeb1b('0x6')](_0x53bd36,{'showHidden':![],'depth':null}):'');return _0x41a405(null);});}return _0x41a405(null);});};exports[_0xeb1b('0x19')]=function(_0xc628a9){return new BPromise(function(_0x1c5409,_0x2b4b3b){if(_0xc628a9){return getUser({'interface':_0xc628a9})[_0xeb1b('0xa')](function(_0x325df1){logger['info']('[utils][getUserByInterface]\x20interface:%s\x20%s',_0xc628a9,_0x325df1?_0xeb1b('0x16'):_0xeb1b('0x17'));return _0x1c5409(_0x325df1);})[_0xeb1b('0xc')](function(_0x21f715){logger[_0xeb1b('0x8')](_0xeb1b('0x1a'),_0x21f715?util['inspect'](_0x21f715,{'showHidden':![],'depth':null}):'');return _0x1c5409(null);});}return _0x1c5409(null);});};exports[_0xeb1b('0x1b')]=function(_0x2912a0){return new BPromise(function(_0x5d1c56,_0x2555ae){if(_0x2912a0){return getUser({'name':_0x2912a0})[_0xeb1b('0xa')](function(_0x400fab){logger['info'](_0xeb1b('0x1c'),_0x2912a0,_0x400fab?_0xeb1b('0x16'):_0xeb1b('0x17'));return _0x5d1c56(_0x400fab);})[_0xeb1b('0xc')](function(_0x59d9af){logger[_0xeb1b('0x8')](_0xeb1b('0x1d'),_0x59d9af?util[_0xeb1b('0x6')](_0x59d9af,{'showHidden':![],'depth':null}):'');return _0x5d1c56(null);});}return _0x5d1c56(null);});};exports[_0xeb1b('0x1e')]=function(_0x25d6e6){return new BPromise(function(_0x574b47,_0x42b9b5){if(_0x25d6e6){return client[_0xeb1b('0x9')](_0xeb1b('0x1f'),{'options':{'raw':!![],'attributes':['id','name',_0xeb1b('0x20'),'acw','acwTimeout'],'where':{'name':_0x25d6e6},'limit':0x1}})[_0xeb1b('0xa')](function(_0x46b4e4){logger[_0xeb1b('0x7')](_0xeb1b('0x21'),_0x25d6e6,_0x46b4e4?util[_0xeb1b('0x6')](_0x46b4e4,{'showHidden':![],'depth':null}):'');logger['info'](_0xeb1b('0x22'),_0x25d6e6,_0x46b4e4?_0xeb1b('0x16'):_0xeb1b('0x17'));return _0x574b47(_0x46b4e4['result'][_0xeb1b('0x13')]?_0x46b4e4[_0xeb1b('0x12')][0x0]:null);})['catch'](function(_0x33dbc7){logger[_0xeb1b('0x8')](_0xeb1b('0x23'),_0x33dbc7?util['inspect'](_0x33dbc7,{'showHidden':![],'depth':null}):'');return _0x574b47(null);});}return _0x574b47(null);});};exports[_0xeb1b('0x24')]=function(_0xe8607b,_0x320509){return moment(_0xe8607b)[_0xeb1b('0x25')](_0x320509,'seconds')[_0xeb1b('0x26')](_0xeb1b('0x27'));};exports[_0xeb1b('0x28')]=function(_0x75a72c,_0x1c28ee){return moment(_0x75a72c)[_0xeb1b('0x29')](_0x1c28ee,_0xeb1b('0x2a'))[_0xeb1b('0x26')](_0xeb1b('0x27'));};exports[_0xeb1b('0x2b')]=function(_0x54b80c,_0x326f4c){return moment(_0x54b80c)[_0xeb1b('0x2c')](moment(_0x326f4c),_0xeb1b('0x2a'));};exports[_0xeb1b('0x2d')]=function(_0x4fac54,_0x720a9c){return parseInt(_0x4fac54,0xa)+parseInt(_0x720a9c,0xa);};exports[_0xeb1b('0x2e')]=function(){return moment()[_0xeb1b('0x26')](_0xeb1b('0x27'));};exports[_0xeb1b('0x2f')]=function(_0x43e6e9,_0x4a6dba){if(_0x4a6dba){return moment(_0x43e6e9)['isAfter'](_0x4a6dba);}return!![];};exports[_0xeb1b('0x30')]=function(_0x4138fa,_0x41e812){if(_0x41e812){return moment(_0x4138fa)[_0xeb1b('0x30')](_0x41e812);}else if(_0x4138fa){return!![];}return![];}; \ No newline at end of file diff --git a/server/utils/client-side-logger.js b/server/utils/client-side-logger.js index da82fbc..2c8e839 100644 --- a/server/utils/client-side-logger.js +++ b/server/utils/client-side-logger.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x63cc=['inspect','%s\x20%s\x20%s\x20%s\x20%sms\x20id=%s\x20name=%s\x20role=%s\x20device=%s','device','agent_id','%s\x20%s\x20%s\x20%s\x20%sms\x20id=%s\x20name=%s\x20role=%s\x20device=%s\x20(id=%s\x20name=%s)','remoteAddress','role','agent_name','test','setupLoggers','fs-extra','lodash','path','util','./safe-template','safeTemplate','maskSensitiveData','join','/var','log','xcally','client','name','ensureDir','catch','user','no-user','timestamp','error','auth','set','logger','%s\x20%s\x20%s\x20%s\x20%sms\x20id=%s\x20name=%s\x20role=%s','isEmpty','body','\x20body=%s','format','method','headers','x-forwarded-for','connection','url','statusCode','responseTime'];(function(_0x1a93ce,_0x2990c4){var _0x28a225=function(_0x485615){while(--_0x485615){_0x1a93ce['push'](_0x1a93ce['shift']());}};_0x28a225(++_0x2990c4);}(_0x63cc,0xe6));var _0xc63c=function(_0x39096d,_0x51f8a0){_0x39096d=_0x39096d-0x0;var _0x13da4f=_0x63cc[_0x39096d];return _0x13da4f;};var fs=require(_0xc63c('0x0'));var _=require(_0xc63c('0x1'));var ewinston=require('express-winston');var path=require(_0xc63c('0x2'));var util=require(_0xc63c('0x3'));var fileLogger=require('./loggers')['fileLogger'];var safeTemplate=require(_0xc63c('0x4'))[_0xc63c('0x5')];var maskSensitiveData=require('./mask-sensitive-data')[_0xc63c('0x6')];function ClientSideLogger(){function _0x125f7f(_0x37655b){var _0x3aa4a7=path[_0xc63c('0x7')](_0xc63c('0x8'),_0xc63c('0x9'),_0xc63c('0xa'));var _0x1f69df=path['join'](_0xc63c('0xb'),_0x37655b['role']+'-'+_0x37655b[_0xc63c('0xc')]);return fs[_0xc63c('0xd')](path[_0xc63c('0x7')](_0x3aa4a7,_0x1f69df))['then'](function(){var _0x33ce67=fileLogger(_0xc63c('0xb'),path[_0xc63c('0x7')](_0x3aa4a7,_0x1f69df));return _0x33ce67;})[_0xc63c('0xe')](function(_0x2b5142){throw _0x2b5142;});}this['log']=function(_0x49ad5,_0x771c2,_0x4145ff,_0x5e8fcf){return _0x125f7f(_0x49ad5[_0xc63c('0xf')])['then'](function(_0x2117cf){var _0x2f48d9=_0x2117cf[_0x771c2];return _0x2f48d9;})['then'](function(_0x196755){var _0x32d907=_0x49ad5['user']?_0x49ad5['user']['id']:_0xc63c('0x10');var _0x211a80=_0x5e8fcf['data'];var _0x2d5d6a=_0x5e8fcf[_0xc63c('0x11')];var _0x45a8ce=new Date(Number(_0x2d5d6a));return _0x196755(_0x32d907,_0x45a8ce,_0x4145ff,_0x211a80);})[_0xc63c('0xe')](function(_0x38c922){fileLogger(_0xc63c('0xb'))[_0xc63c('0x12')](_0x38c922);});};}function setupLoggers(_0x1c06ab){return new Promise(function(_0x1a133a){var _0x204168=new ClientSideLogger();var _0xa8a799=fileLogger('api');var _0x3bb077=fileLogger(_0xc63c('0x13'));_0x1c06ab[_0xc63c('0x14')]('client-side-logger',_0x204168);_0x1c06ab['use'](ewinston[_0xc63c('0x15')]({'winstonInstance':_0xa8a799,'meta':![],'statusLevels':!![],'msg':function(_0x23a3c5,_0xd6eaa2){var _0x6a6734=_0xc63c('0x16');if(!_[_0xc63c('0x17')](_0x23a3c5[_0xc63c('0x18')])){_0x6a6734+=_0xc63c('0x19');var _0x285e3b=_0x23a3c5[_0xc63c('0x18')];maskSensitiveData(_0x285e3b);}return safeTemplate(util[_0xc63c('0x1a')](_0x6a6734,_0x23a3c5[_0xc63c('0x1b')],_0x23a3c5[_0xc63c('0x1c')]['x-forwarded-for']?_0x23a3c5[_0xc63c('0x1c')][_0xc63c('0x1d')]:_0x23a3c5[_0xc63c('0x1e')]['remoteAddress']||_0x23a3c5['ip'],_0x23a3c5[_0xc63c('0x1f')],_0xd6eaa2[_0xc63c('0x20')],_0xd6eaa2[_0xc63c('0x21')],_0x23a3c5[_0xc63c('0xf')]?_0x23a3c5[_0xc63c('0xf')]['id']:null,_0x23a3c5[_0xc63c('0xf')]?_0x23a3c5[_0xc63c('0xf')]['name']:null,_0x23a3c5[_0xc63c('0xf')]?_0x23a3c5[_0xc63c('0xf')]['role']:null,_0x285e3b?util[_0xc63c('0x22')](_0x285e3b,![],null):''));}}));_0x1c06ab['use'](ewinston[_0xc63c('0x15')]({'winstonInstance':_0x3bb077,'meta':![],'statusLevels':!![],'msg':function(_0x3d6354,_0x17a25e){var _0x526df4=_0xc63c('0x23');if(_0x3d6354[_0xc63c('0x18')]&&_0x3d6354['body'][_0xc63c('0x24')]&&_0x3d6354[_0xc63c('0x18')][_0xc63c('0x25')]){_0x526df4=_0xc63c('0x26');}return util[_0xc63c('0x1a')](_0x526df4,_0x3d6354[_0xc63c('0x1b')],_0x3d6354[_0xc63c('0x1c')][_0xc63c('0x1d')]?_0x3d6354[_0xc63c('0x1c')][_0xc63c('0x1d')]:_0x3d6354[_0xc63c('0x1e')][_0xc63c('0x27')]||_0x3d6354['ip'],_0x3d6354[_0xc63c('0x1f')],_0x17a25e[_0xc63c('0x20')],_0x17a25e['responseTime'],_0x3d6354[_0xc63c('0xf')]?_0x3d6354[_0xc63c('0xf')]['id']:null,_0x3d6354[_0xc63c('0xf')]?_0x3d6354['user']['name']:null,_0x3d6354[_0xc63c('0xf')]?_0x3d6354[_0xc63c('0xf')][_0xc63c('0x28')]:null,_0x3d6354[_0xc63c('0x18')]&&_0x3d6354[_0xc63c('0x18')]['device']?_0x3d6354['body'][_0xc63c('0x24')]:'other',_0x3d6354[_0xc63c('0x18')]&&_0x3d6354[_0xc63c('0x18')][_0xc63c('0x25')]?_0x3d6354['body'][_0xc63c('0x25')]:'',_0x3d6354['body']&&_0x3d6354['body']['agent_name']?_0x3d6354[_0xc63c('0x18')][_0xc63c('0x29')]:'');},'ignoreRoute':function(_0x58c8b4){var _0x363367=/\/api\/users\/[0-9]+\/(login|logout)/gi;return!_0x363367[_0xc63c('0x2a')](_0x58c8b4[_0xc63c('0x1f')]);}}));return _0x1a133a();});}exports[_0xc63c('0x2b')]=setupLoggers; \ No newline at end of file +var _0x71ae=['maskSensitiveData','join','/var','xcally','client','role','ensureDir','then','catch','user','no-user','data','timestamp','error','api','auth','client-side-logger','logger','body','\x20body=%s','format','method','headers','x-forwarded-for','connection','remoteAddress','responseTime','use','%s\x20%s\x20%s\x20%s\x20%sms\x20id=%s\x20name=%s\x20role=%s\x20device=%s','agent_id','%s\x20%s\x20%s\x20%s\x20%sms\x20id=%s\x20name=%s\x20role=%s\x20device=%s\x20(id=%s\x20name=%s)','url','statusCode','name','device','other','agent_name','test','setupLoggers','fs-extra','lodash','express-winston','./loggers','fileLogger','./safe-template','safeTemplate'];(function(_0x4f11cb,_0x14e174){var _0x491488=function(_0x2904a9){while(--_0x2904a9){_0x4f11cb['push'](_0x4f11cb['shift']());}};_0x491488(++_0x14e174);}(_0x71ae,0x83));var _0xe71a=function(_0x456b57,_0x58691a){_0x456b57=_0x456b57-0x0;var _0x18f49f=_0x71ae[_0x456b57];return _0x18f49f;};var fs=require(_0xe71a('0x0'));var _=require(_0xe71a('0x1'));var ewinston=require(_0xe71a('0x2'));var path=require('path');var util=require('util');var fileLogger=require(_0xe71a('0x3'))[_0xe71a('0x4')];var safeTemplate=require(_0xe71a('0x5'))[_0xe71a('0x6')];var maskSensitiveData=require('./mask-sensitive-data')[_0xe71a('0x7')];function ClientSideLogger(){function _0x23ce19(_0x1ed31c){var _0x100dd0=path[_0xe71a('0x8')](_0xe71a('0x9'),'log',_0xe71a('0xa'));var _0x434cc4=path['join'](_0xe71a('0xb'),_0x1ed31c[_0xe71a('0xc')]+'-'+_0x1ed31c['name']);return fs[_0xe71a('0xd')](path['join'](_0x100dd0,_0x434cc4))[_0xe71a('0xe')](function(){var _0x5263d8=fileLogger(_0xe71a('0xb'),path[_0xe71a('0x8')](_0x100dd0,_0x434cc4));return _0x5263d8;})[_0xe71a('0xf')](function(_0x2270bf){throw _0x2270bf;});}this['log']=function(_0x4a500f,_0x5c35a3,_0x401867,_0x5bf63c){return _0x23ce19(_0x4a500f[_0xe71a('0x10')])[_0xe71a('0xe')](function(_0x1550e){var _0x5c3220=_0x1550e[_0x5c35a3];return _0x5c3220;})[_0xe71a('0xe')](function(_0x5cffbe){var _0x4fda07=_0x4a500f[_0xe71a('0x10')]?_0x4a500f[_0xe71a('0x10')]['id']:_0xe71a('0x11');var _0x1d7a35=_0x5bf63c[_0xe71a('0x12')];var _0x4b0d19=_0x5bf63c[_0xe71a('0x13')];var _0x385d80=new Date(Number(_0x4b0d19));return _0x5cffbe(_0x4fda07,_0x385d80,_0x401867,_0x1d7a35);})['catch'](function(_0xcc9566){fileLogger('client')[_0xe71a('0x14')](_0xcc9566);});};}function setupLoggers(_0x19b5e5){return new Promise(function(_0x5429c4){var _0x5aa795=new ClientSideLogger();var _0x2bd452=fileLogger(_0xe71a('0x15'));var _0x40ba8d=fileLogger(_0xe71a('0x16'));_0x19b5e5['set'](_0xe71a('0x17'),_0x5aa795);_0x19b5e5['use'](ewinston[_0xe71a('0x18')]({'winstonInstance':_0x2bd452,'meta':![],'statusLevels':!![],'msg':function(_0x5c02e4,_0x1da86c){var _0x453c26='%s\x20%s\x20%s\x20%s\x20%sms\x20id=%s\x20name=%s\x20role=%s';if(!_['isEmpty'](_0x5c02e4[_0xe71a('0x19')])){_0x453c26+=_0xe71a('0x1a');var _0x153e03=_0x5c02e4[_0xe71a('0x19')];maskSensitiveData(_0x153e03);}return safeTemplate(util[_0xe71a('0x1b')](_0x453c26,_0x5c02e4[_0xe71a('0x1c')],_0x5c02e4[_0xe71a('0x1d')][_0xe71a('0x1e')]?_0x5c02e4[_0xe71a('0x1d')][_0xe71a('0x1e')]:_0x5c02e4[_0xe71a('0x1f')][_0xe71a('0x20')]||_0x5c02e4['ip'],_0x5c02e4['url'],_0x1da86c['statusCode'],_0x1da86c[_0xe71a('0x21')],_0x5c02e4['user']?_0x5c02e4['user']['id']:null,_0x5c02e4[_0xe71a('0x10')]?_0x5c02e4['user']['name']:null,_0x5c02e4[_0xe71a('0x10')]?_0x5c02e4['user']['role']:null,_0x153e03?util['inspect'](_0x153e03,![],null):''));}}));_0x19b5e5[_0xe71a('0x22')](ewinston['logger']({'winstonInstance':_0x40ba8d,'meta':![],'statusLevels':!![],'msg':function(_0x49fc19,_0x4dfeaa){var _0x318f42=_0xe71a('0x23');if(_0x49fc19[_0xe71a('0x19')]&&_0x49fc19[_0xe71a('0x19')]['device']&&_0x49fc19[_0xe71a('0x19')][_0xe71a('0x24')]){_0x318f42=_0xe71a('0x25');}return util[_0xe71a('0x1b')](_0x318f42,_0x49fc19[_0xe71a('0x1c')],_0x49fc19[_0xe71a('0x1d')][_0xe71a('0x1e')]?_0x49fc19[_0xe71a('0x1d')][_0xe71a('0x1e')]:_0x49fc19[_0xe71a('0x1f')][_0xe71a('0x20')]||_0x49fc19['ip'],_0x49fc19[_0xe71a('0x26')],_0x4dfeaa[_0xe71a('0x27')],_0x4dfeaa[_0xe71a('0x21')],_0x49fc19[_0xe71a('0x10')]?_0x49fc19['user']['id']:null,_0x49fc19[_0xe71a('0x10')]?_0x49fc19[_0xe71a('0x10')][_0xe71a('0x28')]:null,_0x49fc19[_0xe71a('0x10')]?_0x49fc19[_0xe71a('0x10')][_0xe71a('0xc')]:null,_0x49fc19[_0xe71a('0x19')]&&_0x49fc19[_0xe71a('0x19')]['device']?_0x49fc19[_0xe71a('0x19')][_0xe71a('0x29')]:_0xe71a('0x2a'),_0x49fc19[_0xe71a('0x19')]&&_0x49fc19['body']['agent_id']?_0x49fc19[_0xe71a('0x19')]['agent_id']:'',_0x49fc19[_0xe71a('0x19')]&&_0x49fc19[_0xe71a('0x19')]['agent_name']?_0x49fc19['body'][_0xe71a('0x2b')]:'');},'ignoreRoute':function(_0x1b9ff1){var _0xed3250=/\/api\/users\/[0-9]+\/(login|logout)/gi;return!_0xed3250[_0xe71a('0x2c')](_0x1b9ff1['url']);}}));return _0x5429c4();});}exports[_0xe71a('0x2d')]=setupLoggers; \ No newline at end of file diff --git a/server/utils/iftime.js b/server/utils/iftime.js index de96da8..c58f2e2 100644 --- a/server/utils/iftime.js +++ b/server/utils/iftime.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xe515=['day','endOf','isBetween','timeCompare','ddd','includes','dowCompare','date','daysInMonth','min','format','MMM','monthCompare','guess','test','padStart','length','lodash','moment-timezone','map','join','Interval\x20string\x20not\x20valid','Date\x20not\x20valid','isValid','split','locale','toLowerCase','indexOf','slice','concat','exports','circularDoWInterval','monthsShort','circularMonthInterval','clone','hours','minutes','isBefore'];(function(_0x461a5b,_0xe01763){var _0x39c376=function(_0x4229f1){while(--_0x4229f1){_0x461a5b['push'](_0x461a5b['shift']());}};_0x39c376(++_0xe01763);}(_0xe515,0xcf));var _0x5e51=function(_0x1c336d,_0xba3729){_0x1c336d=_0x1c336d-0x0;var _0x5b50a2=_0xe515[_0x1c336d];return _0x5b50a2;};var _=require(_0x5e51('0x0'));var moment=require(_0x5e51('0x1'));var timeRx=/(\*|(\d{1,2}:\d{1,2})(-(\d{1,2}:\d{1,2}))?)/;var dowRx=/(\*|((sun|mon|tue|wed|thu|fri|sat)(-(sun|mon|tue|wed|thu|fri|sat))?))/;var domRx=/(\*|(\d{1,2})(-(\d{1,2}))?)/;var moyRx=/(\*|(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)(-(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec))?)/;var globalRx=[timeRx,dowRx,domRx,moyRx][_0x5e51('0x2')](function(_0x39cf89){return _0x39cf89['source'];})[_0x5e51('0x3')](',');var validateRx=new RegExp('^'+globalRx+'$');var EINVALID_STRING=_0x5e51('0x4');var EINVALID_DATE=_0x5e51('0x5');function throwIfDateNotValid(_0x4fb11d){if(!_0x4fb11d[_0x5e51('0x6')]()){throw new Error(EINVALID_DATE);}}function extractTime(_0x797e52){var _0x4a1b03=_0x797e52[_0x5e51('0x7')](':')[_0x5e51('0x2')](function(_0x1a6029){return parseInt(_0x1a6029,0xa);});var _0x28c6d9=_0x4a1b03[0x0];var _0x542ed5=_0x4a1b03[0x1];if(_0x28c6d9<0x0||_0x28c6d9>0x17||_0x542ed5<0x0||_0x542ed5>0x3b){throw new Error(EINVALID_DATE);}return[_0x28c6d9,_0x542ed5];}function circularDoWInterval(_0x35aab6,_0x4f28d1){if(_0x35aab6===_0x4f28d1){return[_0x35aab6];}else{var _0x4768ea=moment[_0x5e51('0x8')]();moment[_0x5e51('0x8')]('en');var _0x39cf00=moment['weekdaysShort']()[_0x5e51('0x2')](function(_0xc6b282){return _0xc6b282[_0x5e51('0x9')]();});moment[_0x5e51('0x8')](_0x4768ea);var _0x156123=_0x39cf00[_0x5e51('0xa')](_0x35aab6);var _0x1a7d81=_0x39cf00[_0x5e51('0xa')](_0x4f28d1);if(_0x1a7d81>_0x156123){return _0x39cf00[_0x5e51('0xb')](_0x156123,_0x1a7d81+0x1);}else{var _0x3229a7=_0x39cf00[_0x5e51('0xb')](0x0,_0x1a7d81+0x1);var _0x5f2992=_0x39cf00['slice'](_0x156123);return _0x5f2992[_0x5e51('0xc')](_0x3229a7);}}}module[_0x5e51('0xd')][_0x5e51('0xe')]=circularDoWInterval;function circularMonthInterval(_0x140e83,_0x1e839a){if(_0x140e83===_0x1e839a){return[_0x140e83];}else{var _0x415ed9=moment[_0x5e51('0x8')]();moment['locale']('en');var _0x3862e7=moment[_0x5e51('0xf')]()[_0x5e51('0x2')](function(_0x3ee338){return _0x3ee338[_0x5e51('0x9')]();});moment[_0x5e51('0x8')](_0x415ed9);var _0x40d693=_0x3862e7[_0x5e51('0xa')](_0x140e83);var _0x541f16=_0x3862e7['indexOf'](_0x1e839a);if(_0x541f16>_0x40d693){return _0x3862e7['slice'](_0x40d693,_0x541f16+0x1);}else{var _0x1f05e3=_0x3862e7[_0x5e51('0xb')](0x0,_0x541f16+0x1);var _0xf8c91f=_0x3862e7[_0x5e51('0xb')](_0x40d693);return _0xf8c91f['concat'](_0x1f05e3);}}}module[_0x5e51('0xd')][_0x5e51('0x10')]=circularMonthInterval;function parseDom(_0xad6b58){var _0x5a2cee=parseInt(_0xad6b58,0xa);if(_0x5a2cee<0x1||_0x5a2cee>0x1f){throw new Error(EINVALID_DATE);}return _0x5a2cee;}function timeCompare(_0x4819e0,_0x164b5a,_0x114d14){var _0x48dc9b=_0x4819e0[_0x5e51('0x11')]();var _0x4d2a5b=extractTime(_0x164b5a);var _0x4c369e=_0x4d2a5b[0x0];var _0x5d8168=_0x4d2a5b[0x1];var _0x58deb8=_0x4819e0[_0x5e51('0x11')]()[_0x5e51('0x12')](_0x4c369e)[_0x5e51('0x13')](_0x5d8168);throwIfDateNotValid(_0x58deb8);var _0x3ef637=extractTime(_0x114d14);var _0x236a75=_0x3ef637[0x0];var _0x3d5be1=_0x3ef637[0x1];var _0x3d3883=_0x4819e0['clone']()[_0x5e51('0x12')](_0x236a75)[_0x5e51('0x13')](_0x3d5be1);throwIfDateNotValid(_0x3d3883);if(_0x3d3883[_0x5e51('0x14')](_0x58deb8)){var _0xa13d6c=_0x48dc9b[_0x5e51('0x11')]()['startOf'](_0x5e51('0x15'));var _0x28b1e2=_0x48dc9b['clone']()[_0x5e51('0x16')]('day');return _0x48dc9b[_0x5e51('0x17')](_0x58deb8,_0x28b1e2,undefined,'[]')||_0x48dc9b[_0x5e51('0x17')](_0xa13d6c,_0x3d3883,undefined,'[]');}else{return _0x48dc9b[_0x5e51('0x17')](_0x58deb8,_0x3d3883,undefined,'[]');}}module[_0x5e51('0xd')][_0x5e51('0x18')]=timeCompare;function dowCompare(_0xd5746e,_0x2a6e1a,_0x56af0e){var _0x346ca0=_0xd5746e[_0x5e51('0x8')]('en')['format'](_0x5e51('0x19'))[_0x5e51('0x9')]();return circularDoWInterval(_0x2a6e1a,_0x56af0e)[_0x5e51('0x1a')](_0x346ca0);}module[_0x5e51('0xd')][_0x5e51('0x1b')]=dowCompare;function domCompare(_0x1c3b6b,_0xed9247,_0x18a320){var _0x2ee7bd=_0x1c3b6b[_0x5e51('0x1c')]();if(_0xed9247===_0x18a320){return _0x2ee7bd===_0xed9247;}else{var _0x34f36f=_0x1c3b6b[_0x5e51('0x1d')]();var _0x1bd831=_0xed9247<_0x18a320;let _0x597b19=![];var _0x35fa3b=0x0;var _0x2e1e18=0x0;if(_0x1bd831){_0x35fa3b=Math['max'](0x1,_0xed9247);_0x2e1e18=Math[_0x5e51('0x1e')](_0x18a320,_0x34f36f);_0x597b19=_0x2ee7bd>=_0x35fa3b&&_0x2ee7bd<=_0x2e1e18;}else{_0x35fa3b=Math['min'](_0xed9247,_0x34f36f);_0x2e1e18=Math['max'](0x1,_0x18a320);_0x597b19=_0x2ee7bd>=_0x35fa3b||_0x2ee7bd<=_0x2e1e18;}return _0x597b19;}}module[_0x5e51('0xd')]['domCompare']=domCompare;function monthCompare(_0x57d025,_0x23825c,_0x41cebe){var _0x37cc68=_0x57d025[_0x5e51('0x8')]('en')[_0x5e51('0x1f')](_0x5e51('0x20'))['toLowerCase']();return circularMonthInterval(_0x23825c,_0x41cebe)[_0x5e51('0x1a')](_0x37cc68);}module[_0x5e51('0xd')][_0x5e51('0x21')]=monthCompare;function iftime(_0x1ac888,_0x2f7775=moment['tz'][_0x5e51('0x22')](),_0x2fc093=moment()){if(!validateRx[_0x5e51('0x23')](_0x1ac888)){throw new Error(EINVALID_STRING);}else{var _0x7175a1=(moment['isMoment'](_0x2fc093)?_0x2fc093[_0x5e51('0x11')]():moment(_0x2fc093))['tz'](_0x2f7775)[_0x5e51('0x8')]('en');throwIfDateNotValid(_0x7175a1);var _0x2307bd=_0x1ac888[_0x5e51('0x7')](',');var _0x1998a6=_0x2307bd[0x0];var _0x5ac233=_0x2307bd[0x1];var _0x326983=_0x2307bd[0x2];var _0x4fb66b=_0x2307bd[0x3];let _0x35a76e=!![];if(_0x1998a6!=='*'){var _0x2c6983=_0x1998a6[_0x5e51('0x7')]('-');var _0x10cbbb=_[_0x5e51('0x24')](_0x2c6983[0x0],0x5,'0');var _0x32fbd6=_0x2c6983[_0x5e51('0x25')]===0x2?_[_0x5e51('0x24')](_0x2c6983[0x1],0x5,'0'):_0x10cbbb;_0x35a76e=timeCompare(_0x7175a1,_0x10cbbb,_0x32fbd6);}let _0x3a950e=!![];if(_0x5ac233!=='*'){var _0x282810=_0x5ac233[_0x5e51('0x7')]('-');var _0x1f8eec=_0x282810[0x0];var _0x8b38a8=_0x282810[_0x5e51('0x25')]===0x2?_0x282810[0x1]:_0x1f8eec;_0x3a950e=dowCompare(_0x7175a1,_0x1f8eec,_0x8b38a8);}let _0x5889ca=!![];if(_0x326983!=='*'){var _0x5ae90e=_0x326983['split']('-');var _0x4c671f=parseDom(_0x5ae90e[0x0]);var _0x46b218=_0x5ae90e['length']===0x2?parseDom(_0x5ae90e[0x1]):_0x4c671f;_0x5889ca=domCompare(_0x7175a1,_0x4c671f,_0x46b218);}let _0x2e9081=!![];if(_0x4fb66b!=='*'){var _0x5085ed=_0x4fb66b[_0x5e51('0x7')]('-');var _0x58762b=_0x5085ed[0x0];var _0x4b7d4c=_0x5085ed[_0x5e51('0x25')]===0x2?_0x5085ed[0x1]:_0x5085ed[0x0];_0x2e9081=monthCompare(_0x7175a1,_0x58762b,_0x4b7d4c);}return _0x35a76e&&_0x3a950e&&_0x5889ca&&_0x2e9081;}}module['exports']['iftime']=iftime; \ No newline at end of file +var _0x7cab=['slice','concat','circularDoWInterval','toLowerCase','exports','circularMonthInterval','clone','hours','isBefore','startOf','day','endOf','isBetween','timeCompare','format','ddd','includes','dowCompare','date','max','min','domCompare','MMM','monthCompare','guess','test','padStart','length','iftime','lodash','moment-timezone','map','source','join','Interval\x20string\x20not\x20valid','split','locale','weekdaysShort','indexOf'];(function(_0x3b880d,_0x3afd8f){var _0x3f902c=function(_0x321ca9){while(--_0x321ca9){_0x3b880d['push'](_0x3b880d['shift']());}};_0x3f902c(++_0x3afd8f);}(_0x7cab,0x107));var _0xb7ca=function(_0xe45118,_0x5dffbc){_0xe45118=_0xe45118-0x0;var _0x15e15d=_0x7cab[_0xe45118];return _0x15e15d;};var _=require(_0xb7ca('0x0'));var moment=require(_0xb7ca('0x1'));var timeRx=/(\*|(\d{1,2}:\d{1,2})(-(\d{1,2}:\d{1,2}))?)/;var dowRx=/(\*|((sun|mon|tue|wed|thu|fri|sat)(-(sun|mon|tue|wed|thu|fri|sat))?))/;var domRx=/(\*|(\d{1,2})(-(\d{1,2}))?)/;var moyRx=/(\*|(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)(-(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec))?)/;var globalRx=[timeRx,dowRx,domRx,moyRx][_0xb7ca('0x2')](function(_0x103498){return _0x103498[_0xb7ca('0x3')];})[_0xb7ca('0x4')](',');var validateRx=new RegExp('^'+globalRx+'$');var EINVALID_STRING=_0xb7ca('0x5');var EINVALID_DATE='Date\x20not\x20valid';function throwIfDateNotValid(_0x4d483c){if(!_0x4d483c['isValid']()){throw new Error(EINVALID_DATE);}}function extractTime(_0x417a97){var _0xb8281=_0x417a97[_0xb7ca('0x6')](':')[_0xb7ca('0x2')](function(_0x1b1ebc){return parseInt(_0x1b1ebc,0xa);});var _0x2b96f4=_0xb8281[0x0];var _0x32f839=_0xb8281[0x1];if(_0x2b96f4<0x0||_0x2b96f4>0x17||_0x32f839<0x0||_0x32f839>0x3b){throw new Error(EINVALID_DATE);}return[_0x2b96f4,_0x32f839];}function circularDoWInterval(_0x8de28a,_0x4b766a){if(_0x8de28a===_0x4b766a){return[_0x8de28a];}else{var _0x297947=moment[_0xb7ca('0x7')]();moment[_0xb7ca('0x7')]('en');var _0x5cd34c=moment[_0xb7ca('0x8')]()['map'](function(_0x42dc95){return _0x42dc95['toLowerCase']();});moment[_0xb7ca('0x7')](_0x297947);var _0x80503f=_0x5cd34c[_0xb7ca('0x9')](_0x8de28a);var _0x4a1d2a=_0x5cd34c['indexOf'](_0x4b766a);if(_0x4a1d2a>_0x80503f){return _0x5cd34c[_0xb7ca('0xa')](_0x80503f,_0x4a1d2a+0x1);}else{var _0x47ec3d=_0x5cd34c[_0xb7ca('0xa')](0x0,_0x4a1d2a+0x1);var _0x213af9=_0x5cd34c[_0xb7ca('0xa')](_0x80503f);return _0x213af9[_0xb7ca('0xb')](_0x47ec3d);}}}module['exports'][_0xb7ca('0xc')]=circularDoWInterval;function circularMonthInterval(_0xda50c7,_0x3919c4){if(_0xda50c7===_0x3919c4){return[_0xda50c7];}else{var _0x1d3956=moment[_0xb7ca('0x7')]();moment['locale']('en');var _0x4e9bd6=moment['monthsShort']()[_0xb7ca('0x2')](function(_0x571da9){return _0x571da9[_0xb7ca('0xd')]();});moment[_0xb7ca('0x7')](_0x1d3956);var _0xdf8ce=_0x4e9bd6[_0xb7ca('0x9')](_0xda50c7);var _0x373fd0=_0x4e9bd6[_0xb7ca('0x9')](_0x3919c4);if(_0x373fd0>_0xdf8ce){return _0x4e9bd6[_0xb7ca('0xa')](_0xdf8ce,_0x373fd0+0x1);}else{var _0x13623b=_0x4e9bd6[_0xb7ca('0xa')](0x0,_0x373fd0+0x1);var _0x312ce8=_0x4e9bd6['slice'](_0xdf8ce);return _0x312ce8[_0xb7ca('0xb')](_0x13623b);}}}module[_0xb7ca('0xe')][_0xb7ca('0xf')]=circularMonthInterval;function parseDom(_0x39b943){var _0x46370e=parseInt(_0x39b943,0xa);if(_0x46370e<0x1||_0x46370e>0x1f){throw new Error(EINVALID_DATE);}return _0x46370e;}function timeCompare(_0x3bee1a,_0x37be77,_0x535499){var _0x4f88fc=_0x3bee1a[_0xb7ca('0x10')]();var _0x537003=extractTime(_0x37be77);var _0x2570bd=_0x537003[0x0];var _0x7160c7=_0x537003[0x1];var _0x1ad7d8=_0x3bee1a['clone']()[_0xb7ca('0x11')](_0x2570bd)['minutes'](_0x7160c7);throwIfDateNotValid(_0x1ad7d8);var _0x5b0271=extractTime(_0x535499);var _0x84a277=_0x5b0271[0x0];var _0x360e58=_0x5b0271[0x1];var _0x4cc4f2=_0x3bee1a['clone']()[_0xb7ca('0x11')](_0x84a277)['minutes'](_0x360e58);throwIfDateNotValid(_0x4cc4f2);if(_0x4cc4f2[_0xb7ca('0x12')](_0x1ad7d8)){var _0xc020b4=_0x4f88fc[_0xb7ca('0x10')]()[_0xb7ca('0x13')](_0xb7ca('0x14'));var _0xa24331=_0x4f88fc[_0xb7ca('0x10')]()[_0xb7ca('0x15')]('day');return _0x4f88fc['isBetween'](_0x1ad7d8,_0xa24331,undefined,'[]')||_0x4f88fc[_0xb7ca('0x16')](_0xc020b4,_0x4cc4f2,undefined,'[]');}else{return _0x4f88fc[_0xb7ca('0x16')](_0x1ad7d8,_0x4cc4f2,undefined,'[]');}}module[_0xb7ca('0xe')][_0xb7ca('0x17')]=timeCompare;function dowCompare(_0x4d9b44,_0x9b4613,_0x421b81){var _0x11f48a=_0x4d9b44[_0xb7ca('0x7')]('en')[_0xb7ca('0x18')](_0xb7ca('0x19'))[_0xb7ca('0xd')]();return circularDoWInterval(_0x9b4613,_0x421b81)[_0xb7ca('0x1a')](_0x11f48a);}module[_0xb7ca('0xe')][_0xb7ca('0x1b')]=dowCompare;function domCompare(_0x59a441,_0x4a0d47,_0x491dcb){var _0x48c5bb=_0x59a441[_0xb7ca('0x1c')]();if(_0x4a0d47===_0x491dcb){return _0x48c5bb===_0x4a0d47;}else{var _0x22bf1a=_0x59a441['daysInMonth']();var _0x116a2b=_0x4a0d47<_0x491dcb;let _0x4220a9=![];var _0x53f5b4=0x0;var _0x556e44=0x0;if(_0x116a2b){_0x53f5b4=Math[_0xb7ca('0x1d')](0x1,_0x4a0d47);_0x556e44=Math['min'](_0x491dcb,_0x22bf1a);_0x4220a9=_0x48c5bb>=_0x53f5b4&&_0x48c5bb<=_0x556e44;}else{_0x53f5b4=Math[_0xb7ca('0x1e')](_0x4a0d47,_0x22bf1a);_0x556e44=Math[_0xb7ca('0x1d')](0x1,_0x491dcb);_0x4220a9=_0x48c5bb>=_0x53f5b4||_0x48c5bb<=_0x556e44;}return _0x4220a9;}}module[_0xb7ca('0xe')][_0xb7ca('0x1f')]=domCompare;function monthCompare(_0x37da4f,_0x129a4b,_0x5445ec){var _0x1e58d1=_0x37da4f[_0xb7ca('0x7')]('en')[_0xb7ca('0x18')](_0xb7ca('0x20'))[_0xb7ca('0xd')]();return circularMonthInterval(_0x129a4b,_0x5445ec)[_0xb7ca('0x1a')](_0x1e58d1);}module[_0xb7ca('0xe')][_0xb7ca('0x21')]=monthCompare;function iftime(_0x173ce2,_0x1f43e7=moment['tz'][_0xb7ca('0x22')](),_0x9332b6=moment()){if(!validateRx[_0xb7ca('0x23')](_0x173ce2)){throw new Error(EINVALID_STRING);}else{var _0x18e191=(moment['isMoment'](_0x9332b6)?_0x9332b6[_0xb7ca('0x10')]():moment(_0x9332b6))['tz'](_0x1f43e7)[_0xb7ca('0x7')]('en');throwIfDateNotValid(_0x18e191);var _0x353eb4=_0x173ce2[_0xb7ca('0x6')](',');var _0x528ac4=_0x353eb4[0x0];var _0x2b6394=_0x353eb4[0x1];var _0x482d84=_0x353eb4[0x2];var _0x5e291c=_0x353eb4[0x3];let _0x3bc2e2=!![];if(_0x528ac4!=='*'){var _0x2b701a=_0x528ac4[_0xb7ca('0x6')]('-');var _0x3a0b58=_['padStart'](_0x2b701a[0x0],0x5,'0');var _0x46eee3=_0x2b701a['length']===0x2?_[_0xb7ca('0x24')](_0x2b701a[0x1],0x5,'0'):_0x3a0b58;_0x3bc2e2=timeCompare(_0x18e191,_0x3a0b58,_0x46eee3);}let _0x1b2524=!![];if(_0x2b6394!=='*'){var _0x358d2c=_0x2b6394['split']('-');var _0x53c52c=_0x358d2c[0x0];var _0x123723=_0x358d2c[_0xb7ca('0x25')]===0x2?_0x358d2c[0x1]:_0x53c52c;_0x1b2524=dowCompare(_0x18e191,_0x53c52c,_0x123723);}let _0x441d14=!![];if(_0x482d84!=='*'){var _0x5104fa=_0x482d84[_0xb7ca('0x6')]('-');var _0x29b957=parseDom(_0x5104fa[0x0]);var _0x3cde08=_0x5104fa['length']===0x2?parseDom(_0x5104fa[0x1]):_0x29b957;_0x441d14=domCompare(_0x18e191,_0x29b957,_0x3cde08);}let _0x666997=!![];if(_0x5e291c!=='*'){var _0x42c174=_0x5e291c[_0xb7ca('0x6')]('-');var _0x3153cb=_0x42c174[0x0];var _0x299ceb=_0x42c174[_0xb7ca('0x25')]===0x2?_0x42c174[0x1]:_0x42c174[0x0];_0x666997=monthCompare(_0x18e191,_0x3153cb,_0x299ceb);}return _0x3bc2e2&&_0x1b2524&&_0x441d14&&_0x666997;}}module[_0xb7ca('0xe')][_0xb7ca('0x26')]=iftime; \ No newline at end of file diff --git a/server/utils/loggers.js b/server/utils/loggers.js index 37b2459..f4ce6f2 100644 --- a/server/utils/loggers.js +++ b/server/utils/loggers.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x2efc=['warn','File','error','consoleLogger','fileLogger','path','util','moment','winston','../config/environment','debugLevel','toLowerCase','info','redBG\x20white','red','bold\x20white','gray','bold\x20cyan','addColors','/var/log/xcally','join','format','%s-%s.log','replace','}}}','[%s]\x20[%s]\x20%s\x20-\x20%s','YYYY-MM-DD\x20HH:mm:ss','level','toUpperCase','message','meta','keys','length','Logger','transports','Console'];(function(_0x14add3,_0x13ce8d){var _0x4a174f=function(_0x2b3ed7){while(--_0x2b3ed7){_0x14add3['push'](_0x14add3['shift']());}};_0x4a174f(++_0x13ce8d);}(_0x2efc,0x101));var _0xc2ef=function(_0x453e2b,_0x4f1258){_0x453e2b=_0x453e2b-0x0;var _0x50f306=_0x2efc[_0x453e2b];return _0x50f306;};'use strict';var path=require(_0xc2ef('0x0'));var util=require(_0xc2ef('0x1'));var moment=require(_0xc2ef('0x2'));var winston=require(_0xc2ef('0x3'));var config=require(_0xc2ef('0x4'));var debugLevel=config['debugLevel']?config[_0xc2ef('0x5')][_0xc2ef('0x6')]():_0xc2ef('0x7');var XC_LOG_LEVELS={'fatal':0x0,'error':0x0,'warn':0x1,'info':0x2,'print':0x2,'success':0x2,'http':0x3,'verbose':0x4,'debug':0x5,'silly':0x6};var XC_LOG_COLORS={'fatal':_0xc2ef('0x8'),'error':_0xc2ef('0x9'),'warn':'bold\x20yellow','info':'white','print':_0xc2ef('0xa'),'success':'bold\x20green','http':_0xc2ef('0xb'),'verbose':'bold\x20magenta','debug':'bold\x20blue','silly':_0xc2ef('0xc')};winston[_0xc2ef('0xd')](XC_LOG_COLORS);function getLogFileName(_0x2716b3,_0x10c5aa,_0x136e46){var _0x55fb27=_0x2716b3||_0xc2ef('0xe');return path[_0xc2ef('0xf')](_0x55fb27,util[_0xc2ef('0x10')](_0xc2ef('0x11'),_0x10c5aa,_0x136e46));}function formatter(_0x1de8bb,_0x46c57e){_0x46c57e['message']=_0x46c57e['message'][_0xc2ef('0x12')](/@@{/g,'{{{')[_0xc2ef('0x12')](/}@@/g,_0xc2ef('0x13'))[_0xc2ef('0x12')](/@{/g,'{{')['replace'](/}@/g,'}}');return util[_0xc2ef('0x10')](_0xc2ef('0x14'),moment()[_0xc2ef('0x10')](_0xc2ef('0x15')),_0x46c57e[_0xc2ef('0x16')][_0xc2ef('0x17')](),_0x1de8bb,_0x46c57e[_0xc2ef('0x18')]);}function fileFormat(_0x2d9572,_0x5cc39f){_0x5cc39f[_0xc2ef('0x18')]=_0x5cc39f[_0xc2ef('0x18')][_0xc2ef('0x12')](/@@{/g,'{{{')[_0xc2ef('0x12')](/}@@/g,_0xc2ef('0x13'))[_0xc2ef('0x12')](/@{/g,'{{')[_0xc2ef('0x12')](/}@/g,'}}');var _0x3c1c5a=_0x5cc39f[_0xc2ef('0x19')]&&Object[_0xc2ef('0x1a')](_0x5cc39f[_0xc2ef('0x19')])[_0xc2ef('0x1b')]?'\x0a\x09'+JSON['stringify'](_0x5cc39f[_0xc2ef('0x19')]):'';return util[_0xc2ef('0x10')]('[%s]\x20[%s]\x20%s\x20-\x20%s\x20%s',moment()[_0xc2ef('0x10')]('YYYY-MM-DD\x20HH:mm:ss'),_0x5cc39f['level'][_0xc2ef('0x17')](),_0x2d9572,_0x5cc39f[_0xc2ef('0x18')],_0x3c1c5a);}function consoleLogger(){var _0x3f7d42=new winston[(_0xc2ef('0x1c'))]({'levels':XC_LOG_LEVELS,'transports':[new winston[(_0xc2ef('0x1d'))][(_0xc2ef('0x1e'))]({'level':_0xc2ef('0x1f'),'json':![],'formatter':function(_0x228a40){return formatter('',_0x228a40);}})]});return _0x3f7d42;}function fileLogger(_0x2c75db,_0xeedb46){var _0x215b34=new winston['Logger']({'levels':XC_LOG_LEVELS,'transports':[new winston[(_0xc2ef('0x1d'))][(_0xc2ef('0x20'))]({'name':util['format']('%s-%s',_0x2c75db,'error'),'filename':getLogFileName(_0xeedb46,_0x2c75db,_0xc2ef('0x21')),'level':_0xc2ef('0x21'),'json':![],'maxsize':0xa00000,'maxFiles':0xa,'tailable':!![],'formatter':function(_0x2ff11f){return fileFormat(_0x2c75db,_0x2ff11f);}}),new winston[(_0xc2ef('0x1d'))][(_0xc2ef('0x20'))]({'name':util[_0xc2ef('0x10')]('%s-%s',_0x2c75db,debugLevel),'filename':getLogFileName(_0xeedb46,_0x2c75db,debugLevel),'level':debugLevel,'json':![],'maxsize':0xa00000,'maxFiles':0xa,'tailable':!![],'formatter':function(_0x4a1287){return fileFormat(_0x2c75db,_0x4a1287);}}),new winston[(_0xc2ef('0x1d'))][(_0xc2ef('0x1e'))]({'level':'warn','json':![],'formatter':function(_0x3676cc){return fileFormat(_0x2c75db,_0x3676cc);}})]});return _0x215b34;}exports[_0xc2ef('0x22')]=consoleLogger;exports[_0xc2ef('0x23')]=fileLogger; \ No newline at end of file +var _0xc8e3=['message','{{{','}}}','replace','level','toUpperCase','meta','keys','length','[%s]\x20[%s]\x20%s\x20-\x20%s\x20%s','YYYY-MM-DD\x20HH:mm:ss','Logger','transports','warn','File','%s-%s','error','Console','consoleLogger','fileLogger','path','util','moment','winston','debugLevel','redBG\x20white','red','bold\x20yellow','bold\x20white','gray','bold\x20magenta','bold\x20blue','/var/log/xcally','format','%s-%s.log'];(function(_0x55e08b,_0x421620){var _0xd1a7ff=function(_0x58c7ff){while(--_0x58c7ff){_0x55e08b['push'](_0x55e08b['shift']());}};_0xd1a7ff(++_0x421620);}(_0xc8e3,0xc3));var _0x3c8e=function(_0x4e7889,_0x1f6faa){_0x4e7889=_0x4e7889-0x0;var _0x2bb6f5=_0xc8e3[_0x4e7889];return _0x2bb6f5;};'use strict';var path=require(_0x3c8e('0x0'));var util=require(_0x3c8e('0x1'));var moment=require(_0x3c8e('0x2'));var winston=require(_0x3c8e('0x3'));var config=require('../config/environment');var debugLevel=config[_0x3c8e('0x4')]?config[_0x3c8e('0x4')]['toLowerCase']():'info';var XC_LOG_LEVELS={'fatal':0x0,'error':0x0,'warn':0x1,'info':0x2,'print':0x2,'success':0x2,'http':0x3,'verbose':0x4,'debug':0x5,'silly':0x6};var XC_LOG_COLORS={'fatal':_0x3c8e('0x5'),'error':_0x3c8e('0x6'),'warn':_0x3c8e('0x7'),'info':'white','print':_0x3c8e('0x8'),'success':'bold\x20green','http':_0x3c8e('0x9'),'verbose':_0x3c8e('0xa'),'debug':_0x3c8e('0xb'),'silly':'bold\x20cyan'};winston['addColors'](XC_LOG_COLORS);function getLogFileName(_0x431216,_0x21dd0a,_0xe875b9){var _0x4f1078=_0x431216||_0x3c8e('0xc');return path['join'](_0x4f1078,util[_0x3c8e('0xd')](_0x3c8e('0xe'),_0x21dd0a,_0xe875b9));}function formatter(_0x3d97cf,_0x2db7b9){_0x2db7b9[_0x3c8e('0xf')]=_0x2db7b9[_0x3c8e('0xf')]['replace'](/@@{/g,_0x3c8e('0x10'))['replace'](/}@@/g,_0x3c8e('0x11'))[_0x3c8e('0x12')](/@{/g,'{{')[_0x3c8e('0x12')](/}@/g,'}}');return util[_0x3c8e('0xd')]('[%s]\x20[%s]\x20%s\x20-\x20%s',moment()[_0x3c8e('0xd')]('YYYY-MM-DD\x20HH:mm:ss'),_0x2db7b9[_0x3c8e('0x13')][_0x3c8e('0x14')](),_0x3d97cf,_0x2db7b9[_0x3c8e('0xf')]);}function fileFormat(_0x538883,_0x4b1ee6){_0x4b1ee6[_0x3c8e('0xf')]=_0x4b1ee6[_0x3c8e('0xf')][_0x3c8e('0x12')](/@@{/g,_0x3c8e('0x10'))[_0x3c8e('0x12')](/}@@/g,_0x3c8e('0x11'))[_0x3c8e('0x12')](/@{/g,'{{')['replace'](/}@/g,'}}');var _0x12123a=_0x4b1ee6[_0x3c8e('0x15')]&&Object[_0x3c8e('0x16')](_0x4b1ee6[_0x3c8e('0x15')])[_0x3c8e('0x17')]?'\x0a\x09'+JSON['stringify'](_0x4b1ee6[_0x3c8e('0x15')]):'';return util['format'](_0x3c8e('0x18'),moment()[_0x3c8e('0xd')](_0x3c8e('0x19')),_0x4b1ee6[_0x3c8e('0x13')]['toUpperCase'](),_0x538883,_0x4b1ee6['message'],_0x12123a);}function consoleLogger(){var _0x4f5f3a=new winston[(_0x3c8e('0x1a'))]({'levels':XC_LOG_LEVELS,'transports':[new winston[(_0x3c8e('0x1b'))]['Console']({'level':_0x3c8e('0x1c'),'json':![],'formatter':function(_0x57fd26){return formatter('',_0x57fd26);}})]});return _0x4f5f3a;}function fileLogger(_0x4f81a6,_0x210f61){var _0x49e021=new winston['Logger']({'levels':XC_LOG_LEVELS,'transports':[new winston[(_0x3c8e('0x1b'))][(_0x3c8e('0x1d'))]({'name':util[_0x3c8e('0xd')](_0x3c8e('0x1e'),_0x4f81a6,_0x3c8e('0x1f')),'filename':getLogFileName(_0x210f61,_0x4f81a6,_0x3c8e('0x1f')),'level':'error','json':![],'maxsize':0xa00000,'maxFiles':0xa,'tailable':!![],'formatter':function(_0x3d062d){return fileFormat(_0x4f81a6,_0x3d062d);}}),new winston[(_0x3c8e('0x1b'))][(_0x3c8e('0x1d'))]({'name':util['format'](_0x3c8e('0x1e'),_0x4f81a6,debugLevel),'filename':getLogFileName(_0x210f61,_0x4f81a6,debugLevel),'level':debugLevel,'json':![],'maxsize':0xa00000,'maxFiles':0xa,'tailable':!![],'formatter':function(_0x5846c5){return fileFormat(_0x4f81a6,_0x5846c5);}}),new winston[(_0x3c8e('0x1b'))][(_0x3c8e('0x20'))]({'level':_0x3c8e('0x1c'),'json':![],'formatter':function(_0x144c90){return fileFormat(_0x4f81a6,_0x144c90);}})]});return _0x49e021;}exports[_0x3c8e('0x21')]=consoleLogger;exports[_0x3c8e('0x22')]=fileLogger; \ No newline at end of file diff --git a/server/utils/mask-sensitive-data.js b/server/utils/mask-sensitive-data.js index 24ef693..3c910f6 100644 --- a/server/utils/mask-sensitive-data.js +++ b/server/utils/mask-sensitive-data.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x4975=['replace','}@@','includes','exports','maskSensitiveData','lodash','password','newPassword','apiKey','firstName','lastName','street','phone','mobile','fax','email','clientSecret','code','accessKey','tenantId','channelSecret','accessTokenSecret','authToken','consumerKey','consumerSecret','membername','calleridname','calleridnum','exten','accesskeyid','secretaccesskey','key','user','pass','accountSid','localstationid','dsn','secret','registry','isPlainObject','isArray','length','isString'];(function(_0x4c12ec,_0x2e9103){var _0x3ae42c=function(_0x5a728f){while(--_0x5a728f){_0x4c12ec['push'](_0x4c12ec['shift']());}};_0x3ae42c(++_0x2e9103);}(_0x4975,0x86));var _0x5497=function(_0x5d02c5,_0x2fa1d2){_0x5d02c5=_0x5d02c5-0x0;var _0x3bd3cb=_0x4975[_0x5d02c5];return _0x3bd3cb;};var _=require(_0x5497('0x0'));var sensitiveFields=['username',_0x5497('0x1'),_0x5497('0x2'),_0x5497('0x3'),_0x5497('0x4'),_0x5497('0x5'),_0x5497('0x6'),_0x5497('0x7'),_0x5497('0x8'),_0x5497('0x9'),_0x5497('0xa'),'clientId',_0x5497('0xb'),'securityToken',_0x5497('0xc'),_0x5497('0xd'),_0x5497('0xe'),'token',_0x5497('0xf'),'accessToken',_0x5497('0x10'),_0x5497('0x11'),_0x5497('0x12'),_0x5497('0x13'),_0x5497('0x14'),_0x5497('0x15'),_0x5497('0x16'),_0x5497('0x17'),'vidaooApiKey','clientEmail','privateKey',_0x5497('0x18'),_0x5497('0x19'),_0x5497('0x1a'),_0x5497('0x1b'),_0x5497('0x1c'),_0x5497('0x1d'),_0x5497('0x1e'),_0x5497('0x1f'),_0x5497('0x20'),_0x5497('0x21'),'oldPassword'];function maskSensitiveData(_0x11b0a9){const _0x4fb8e9=/(?!^)[\s\S](?!$)/g;if(_[_0x5497('0x22')](_0x11b0a9)){for(const _0x2bfd8a in _0x11b0a9){if(_[_0x5497('0x23')](_0x11b0a9[_0x2bfd8a])){for(let _0x3ce50b=0x0;_0x3ce50b<_0x11b0a9[_0x2bfd8a][_0x5497('0x24')];_0x3ce50b++){maskSensitiveData(_0x11b0a9[_0x2bfd8a][_0x3ce50b]);}}else if(_[_0x5497('0x22')](_0x11b0a9[_0x2bfd8a])){maskSensitiveData(_0x11b0a9[_0x2bfd8a]);}else if(_[_0x5497('0x25')](_0x11b0a9[_0x2bfd8a])){_0x11b0a9[_0x2bfd8a]=_0x11b0a9[_0x2bfd8a]['replace'](/{{{/g,'@@{')[_0x5497('0x26')](/}}}/g,_0x5497('0x27'))[_0x5497('0x26')](/{{/g,'@{')['replace'](/}}/g,'}@');if(_[_0x5497('0x28')](sensitiveFields,_0x2bfd8a)){_0x11b0a9[_0x2bfd8a]=_0x11b0a9[_0x2bfd8a][_0x5497('0x26')](_0x4fb8e9,'*');}}}}}module[_0x5497('0x29')][_0x5497('0x2a')]=maskSensitiveData; \ No newline at end of file +var _0x2ef3=['email','securityToken','code','accessKey','tenantId','token','channelSecret','accessToken','accessTokenSecret','authToken','consumerKey','calleridname','calleridnum','exten','vidaooApiKey','privateKey','secretaccesskey','user','pass','dsn','registry','oldPassword','length','isPlainObject','@@{','replace','}@@','includes','exports','maskSensitiveData','lodash','username','password','newPassword','apiKey','firstName','street','phone','fax'];(function(_0x26253d,_0x5dfc80){var _0x318a82=function(_0x22ae6a){while(--_0x22ae6a){_0x26253d['push'](_0x26253d['shift']());}};_0x318a82(++_0x5dfc80);}(_0x2ef3,0xba));var _0x32ef=function(_0x28d38c,_0xd9c0fa){_0x28d38c=_0x28d38c-0x0;var _0x52980d=_0x2ef3[_0x28d38c];return _0x52980d;};var _=require(_0x32ef('0x0'));var sensitiveFields=[_0x32ef('0x1'),_0x32ef('0x2'),_0x32ef('0x3'),_0x32ef('0x4'),_0x32ef('0x5'),'lastName',_0x32ef('0x6'),_0x32ef('0x7'),'mobile',_0x32ef('0x8'),_0x32ef('0x9'),'clientId','clientSecret',_0x32ef('0xa'),_0x32ef('0xb'),_0x32ef('0xc'),_0x32ef('0xd'),_0x32ef('0xe'),_0x32ef('0xf'),_0x32ef('0x10'),_0x32ef('0x11'),_0x32ef('0x12'),_0x32ef('0x13'),'consumerSecret','membername',_0x32ef('0x14'),_0x32ef('0x15'),_0x32ef('0x16'),_0x32ef('0x17'),'clientEmail',_0x32ef('0x18'),'accesskeyid',_0x32ef('0x19'),'key',_0x32ef('0x1a'),_0x32ef('0x1b'),'accountSid','localstationid',_0x32ef('0x1c'),'secret',_0x32ef('0x1d'),_0x32ef('0x1e')];function maskSensitiveData(_0x93d492){const _0x54c7f5=/(?!^)[\s\S](?!$)/g;if(_['isPlainObject'](_0x93d492)){for(const _0x55bf0b in _0x93d492){if(_['isArray'](_0x93d492[_0x55bf0b])){for(let _0x13db1a=0x0;_0x13db1a<_0x93d492[_0x55bf0b][_0x32ef('0x1f')];_0x13db1a++){maskSensitiveData(_0x93d492[_0x55bf0b][_0x13db1a]);}}else if(_[_0x32ef('0x20')](_0x93d492[_0x55bf0b])){maskSensitiveData(_0x93d492[_0x55bf0b]);}else if(_['isString'](_0x93d492[_0x55bf0b])){_0x93d492[_0x55bf0b]=_0x93d492[_0x55bf0b]['replace'](/{{{/g,_0x32ef('0x21'))[_0x32ef('0x22')](/}}}/g,_0x32ef('0x23'))['replace'](/{{/g,'@{')[_0x32ef('0x22')](/}}/g,'}@');if(_[_0x32ef('0x24')](sensitiveFields,_0x55bf0b)){_0x93d492[_0x55bf0b]=_0x93d492[_0x55bf0b]['replace'](_0x54c7f5,'*');}}}}}module[_0x32ef('0x25')][_0x32ef('0x26')]=maskSensitiveData; \ No newline at end of file diff --git a/server/utils/safe-template.js b/server/utils/safe-template.js index 0048751..c7348cf 100644 --- a/server/utils/safe-template.js +++ b/server/utils/safe-template.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0xed3c=['{\x20{\x20','\x20}\x20}','string','replace','isPlainObject','keys','reduce','safeTemplate','lodash'];(function(_0x3ab9ee,_0x4a74b8){var _0x82ee88=function(_0x6ccc7e){while(--_0x6ccc7e){_0x3ab9ee['push'](_0x3ab9ee['shift']());}};_0x82ee88(++_0x4a74b8);}(_0xed3c,0x1a6));var _0xced3=function(_0x224dda,_0x16d0f9){_0x224dda=_0x224dda-0x0;var _0x2987ac=_0xed3c[_0x224dda];return _0x2987ac;};var _=require(_0xced3('0x0'));var mustacheLikeBracketsRx=/(\{|\}){2}/gm;function bracketsReplacer(_0x408853){return _0x408853==='{{'?_0xced3('0x1'):_0xced3('0x2');}function safeTemplate(_0x558ee8){var _0xfdc1ed=_0x558ee8;if(typeof _0x558ee8===_0xced3('0x3')){_0xfdc1ed=_0x558ee8[_0xced3('0x4')](mustacheLikeBracketsRx,bracketsReplacer);}else if(Array['isArray'](_0x558ee8)){_0xfdc1ed=_0x558ee8['map'](function(_0x3d3aa0){return safeTemplate(_0x3d3aa0);});}else if(_[_0xced3('0x5')](_0x558ee8)){_0xfdc1ed=Object[_0xced3('0x6')](_0x558ee8)[_0xced3('0x7')](function(_0x4795cd,_0x510164){_0x4795cd[_0x510164]=safeTemplate(_0x558ee8[_0x510164]);return _0x4795cd;},{});}return _0xfdc1ed;}module['exports'][_0xced3('0x8')]=safeTemplate; \ No newline at end of file +var _0x5c3c=['\x20}\x20}','string','replace','isArray','map','isPlainObject','keys','reduce','safeTemplate','lodash','{\x20{\x20'];(function(_0x4341d8,_0x20cc3c){var _0xf70f0b=function(_0xbf14e3){while(--_0xbf14e3){_0x4341d8['push'](_0x4341d8['shift']());}};_0xf70f0b(++_0x20cc3c);}(_0x5c3c,0x132));var _0xc5c3=function(_0x38ced4,_0x24263f){_0x38ced4=_0x38ced4-0x0;var _0x547c07=_0x5c3c[_0x38ced4];return _0x547c07;};var _=require(_0xc5c3('0x0'));var mustacheLikeBracketsRx=/(\{|\}){2}/gm;function bracketsReplacer(_0x40ad71){return _0x40ad71==='{{'?_0xc5c3('0x1'):_0xc5c3('0x2');}function safeTemplate(_0x4b9233){var _0x400726=_0x4b9233;if(typeof _0x4b9233===_0xc5c3('0x3')){_0x400726=_0x4b9233[_0xc5c3('0x4')](mustacheLikeBracketsRx,bracketsReplacer);}else if(Array[_0xc5c3('0x5')](_0x4b9233)){_0x400726=_0x4b9233[_0xc5c3('0x6')](function(_0x36525d){return safeTemplate(_0x36525d);});}else if(_[_0xc5c3('0x7')](_0x4b9233)){_0x400726=Object[_0xc5c3('0x8')](_0x4b9233)[_0xc5c3('0x9')](function(_0x5a392b,_0x4b8404){_0x5a392b[_0x4b8404]=safeTemplate(_0x4b9233[_0x4b8404]);return _0x5a392b;},{});}return _0x400726;}module['exports'][_0xc5c3('0xa')]=safeTemplate; \ No newline at end of file diff --git a/server/utils/update-app-config.js b/server/utils/update-app-config.js index 8c9dafa..1e24917 100644 --- a/server/utils/update-app-config.js +++ b/server/utils/update-app-config.js @@ -15,4 +15,4 @@ // * treaties. The SOFTWARE PRODUCT is licensed, not sold. * // * * // ************************************************************************* -var _0x0b55=['pathExists','then','readJSON','updated','info','Updating\x20app.json','exports','fs-extra','path','../config/environment','root','resolve','server/app.json','legacy-libs','apps','name','motion2','env','NODE_PATH','string'];(function(_0x15035b,_0x3eba0a){var _0x2cc7b1=function(_0x144b32){while(--_0x144b32){_0x15035b['push'](_0x15035b['shift']());}};_0x2cc7b1(++_0x3eba0a);}(_0x0b55,0xf7));var _0x50b5=function(_0x2314d9,_0x1847b7){_0x2314d9=_0x2314d9-0x0;var _0xf5c16c=_0x0b55[_0x2314d9];return _0xf5c16c;};var fs=require(_0x50b5('0x0'));var path=require(_0x50b5('0x1'));var config=require(_0x50b5('0x2'));var root=config[_0x50b5('0x3')];var APP_JSON_PATH=path[_0x50b5('0x4')](root,_0x50b5('0x5'));var NODEPATH=path[_0x50b5('0x4')](root,_0x50b5('0x6'));function setLegacyLibsNodeEnvPath(_0xfb90e1){let _0x311a47=![];if(Array['isArray'](_0xfb90e1[_0x50b5('0x7')])){var _0x79eb6b=_0xfb90e1[_0x50b5('0x7')]['findIndex'](function(_0x41b289){return _0x41b289[_0x50b5('0x8')]===_0x50b5('0x9');});if(_0x79eb6b>-0x1){var _0x4dc6a4=_0xfb90e1[_0x50b5('0x7')][_0x79eb6b];if(typeof _0x4dc6a4[_0x50b5('0xa')][_0x50b5('0xb')]!==_0x50b5('0xc')){_0x4dc6a4[_0x50b5('0xa')][_0x50b5('0xb')]=NODEPATH;_0x311a47=!![];}}return{'appConfig':_0xfb90e1,'updated':_0x311a47};}}function updateAppConfig(_0x1ebc73){return fs[_0x50b5('0xd')](APP_JSON_PATH)[_0x50b5('0xe')](function(_0x415288){if(_0x415288){return fs[_0x50b5('0xf')](APP_JSON_PATH)[_0x50b5('0xe')](function(_0x495c4f){var _0x2d45b6=setLegacyLibsNodeEnvPath(_0x495c4f);if(_0x2d45b6[_0x50b5('0x10')]){_0x1ebc73[_0x50b5('0x11')](_0x50b5('0x12'));return fs['writeJSON'](APP_JSON_PATH,_0x495c4f,{'spaces':0x2});}else{return Promise[_0x50b5('0x4')]();}});}else{return Promise[_0x50b5('0x4')]();}});}module[_0x50b5('0x13')]=updateAppConfig; \ No newline at end of file +var _0x632d=['writeJSON','exports','fs-extra','path','../config/environment','root','server/app.json','resolve','legacy-libs','isArray','apps','name','motion2','env','NODE_PATH','string','pathExists','then','readJSON','info'];(function(_0x448111,_0x58e259){var _0x97f145=function(_0x3fbcc3){while(--_0x3fbcc3){_0x448111['push'](_0x448111['shift']());}};_0x97f145(++_0x58e259);}(_0x632d,0x1a6));var _0xd632=function(_0x32be62,_0x22e6fd){_0x32be62=_0x32be62-0x0;var _0x1a37e9=_0x632d[_0x32be62];return _0x1a37e9;};var fs=require(_0xd632('0x0'));var path=require(_0xd632('0x1'));var config=require(_0xd632('0x2'));var root=config[_0xd632('0x3')];var APP_JSON_PATH=path['resolve'](root,_0xd632('0x4'));var NODEPATH=path[_0xd632('0x5')](root,_0xd632('0x6'));function setLegacyLibsNodeEnvPath(_0x1232e1){let _0x5d1327=![];if(Array[_0xd632('0x7')](_0x1232e1['apps'])){var _0x2c873b=_0x1232e1[_0xd632('0x8')]['findIndex'](function(_0x17defd){return _0x17defd[_0xd632('0x9')]===_0xd632('0xa');});if(_0x2c873b>-0x1){var _0x121ffa=_0x1232e1[_0xd632('0x8')][_0x2c873b];if(typeof _0x121ffa[_0xd632('0xb')][_0xd632('0xc')]!==_0xd632('0xd')){_0x121ffa[_0xd632('0xb')][_0xd632('0xc')]=NODEPATH;_0x5d1327=!![];}}return{'appConfig':_0x1232e1,'updated':_0x5d1327};}}function updateAppConfig(_0x3a84cc){return fs[_0xd632('0xe')](APP_JSON_PATH)[_0xd632('0xf')](function(_0x4c6d6d){if(_0x4c6d6d){return fs[_0xd632('0x10')](APP_JSON_PATH)['then'](function(_0xbc6bef){var _0x200690=setLegacyLibsNodeEnvPath(_0xbc6bef);if(_0x200690['updated']){_0x3a84cc[_0xd632('0x11')]('Updating\x20app.json');return fs[_0xd632('0x12')](APP_JSON_PATH,_0xbc6bef,{'spaces':0x2});}else{return Promise['resolve']();}});}else{return Promise['resolve']();}});}module[_0xd632('0x13')]=updateAppConfig; \ No newline at end of file diff --git a/snippet/3.2.0/assets/images/00fe515d7113c2841e5d.svg b/snippet/3.1.0/assets/images/00fe515d7113c2841e5d.svg similarity index 100% rename from snippet/3.2.0/assets/images/00fe515d7113c2841e5d.svg rename to snippet/3.1.0/assets/images/00fe515d7113c2841e5d.svg diff --git a/snippet/3.2.0/assets/images/3b24a6b94b2631f4d565.svg b/snippet/3.1.0/assets/images/3b24a6b94b2631f4d565.svg similarity index 100% rename from snippet/3.2.0/assets/images/3b24a6b94b2631f4d565.svg rename to snippet/3.1.0/assets/images/3b24a6b94b2631f4d565.svg diff --git a/snippet/3.2.0/assets/images/c9f502ad417b1b987198.svg b/snippet/3.1.0/assets/images/c9f502ad417b1b987198.svg similarity index 100% rename from snippet/3.2.0/assets/images/c9f502ad417b1b987198.svg rename to snippet/3.1.0/assets/images/c9f502ad417b1b987198.svg diff --git a/snippet/3.1.0/index.html b/snippet/3.1.0/index.html new file mode 100644 index 0000000..fa65231 --- /dev/null +++ b/snippet/3.1.0/index.html @@ -0,0 +1,29 @@ +xCally Motion Chat
{{ actualTitle }}
\ No newline at end of file diff --git a/snippet/3.1.0/scripts/app.js b/snippet/3.1.0/scripts/app.js new file mode 100644 index 0000000..210848b --- /dev/null +++ b/snippet/3.1.0/scripts/app.js @@ -0,0 +1,2 @@ +/*! For license information please see app.js.LICENSE.txt */ +"use strict";(self.webpackChunkmotion_chat=self.webpackChunkmotion_chat||[]).push([["app"],{"./src/styles/app.scss":()=>{}},e=>{e.O(0,["vendor","vendor-index","vendor-angular-76f2ed34","vendor-angular-58d021f3","vendor-ng-embed","vendor-moment","vendor-jquery","vendor-jquery.textcomplete","vendor-emojionearea","vendor-emojione","vendor-angular-sanitize","vendor-angular-resource","vendor-angular-messages","vendor-angular-material","vendor-angular-local-storage","vendor-angular-animate","vendor-urlMatcher","vendor-transition","vendor-stateService","vendor-stateDirectives","vendor-flow","chat"],(()=>("./src/styles/app.scss",e(e.s="./src/styles/app.scss")))),e.O()}]); \ No newline at end of file diff --git a/snippet/3.1.0/scripts/app.js.LICENSE.txt b/snippet/3.1.0/scripts/app.js.LICENSE.txt new file mode 100644 index 0000000..15c6a44 --- /dev/null +++ b/snippet/3.1.0/scripts/app.js.LICENSE.txt @@ -0,0 +1,19 @@ +/*! + * ************************************************************************* + * * * + * * xCALLY Motion - The Omnichannel Contact Center * + * * Copyright (c) Xenialab s.r.l. All Rights Reserved * + * * * + * ************************************************************************* + * * * + * * Email: info@xcally.com * + * * Website: https://www.xcally.com * + * * * + * ************************************************************************* + * * * + * * The SOFTWARE PRODUCT is protected by copyright laws and international * + * * copyright treaties, as well as other intellectual property laws and * + * * treaties. The SOFTWARE PRODUCT is licensed, not sold. * + * * * + * ************************************************************************* + */ diff --git a/snippet/3.1.0/scripts/chat.js b/snippet/3.1.0/scripts/chat.js new file mode 100644 index 0000000..22c2491 --- /dev/null +++ b/snippet/3.1.0/scripts/chat.js @@ -0,0 +1,3 @@ +/*! For license information please see chat.js.LICENSE.txt */ +(self.webpackChunkmotion_chat=self.webpackChunkmotion_chat||[]).push([["chat"],{"./node_modules/@flowjs/ng-flow/dist/ng-flow.js":(e,t,n)=>{var o=n("./node_modules/@flowjs/flow.js/src/flow.js");angular.module("flow.provider",[]).provider("flowFactory",(function(){"use strict";this.defaults={},this.factory=function(e){return new o(e)},this.events=[],this.on=function(e,t){this.events.push([e,t])},this.$get=function(){var e=this.factory,t=this.defaults,n=this.events;return{create:function(o){var r=e(angular.extend({},t,o));return angular.forEach(n,(function(e){r.on(e[0],e[1])})),r}}}})),angular.module("flow.init",["flow.provider"]).controller("flowCtrl",["$scope","$attrs","$parse","flowFactory",function(e,t,n,o){var r=angular.extend({},e.$eval(t.flowInit)),s=e.$eval(t.flowObject)||o.create(r),a=function(t){var n=Array.prototype.slice.call(arguments);n.shift();var o=e.$broadcast.apply(e,["flow::"+t,s].concat(n));if({progress:1,filesSubmitted:1,fileSuccess:1,fileError:1,complete:1}[t]&&e.$applyAsync(),o.defaultPrevented)return!1};s.on("catchAll",a),e.$on("$destroy",(function(){s.off("catchAll",a)})),e.$flow=s,t.hasOwnProperty("flowName")&&(n(t.flowName).assign(e,s),e.$on("$destroy",(function(){n(t.flowName).assign(e)})))}]).directive("flowInit",[function(){return{scope:!0,controller:"flowCtrl"}}]),angular.module("flow.btn",["flow.init"]).directive("flowBtn",[function(){return{restrict:"EA",scope:!1,require:"^flowInit",link:function(e,t,n){var o=n.hasOwnProperty("flowDirectory"),r=n.hasOwnProperty("flowSingleFile"),s=n.hasOwnProperty("flowAttrs")&&e.$eval(n.flowAttrs);e.$flow.assignBrowse(t,o,r,s)}}}]),angular.module("flow.dragEvents",["flow.init"]).directive("flowPreventDrop",(function(){return{scope:!1,link:function(e,t,n){t.bind("drop dragover",(function(e){e.preventDefault()}))}}})).directive("flowDragEnter",["$timeout",function(e){return{scope:!1,link:function(t,n,o){var r,s=!1;n.bind("dragover",(function(n){var a,i,d;i=!1,d=(a=n).dataTransfer||a.originalEvent.dataTransfer,angular.forEach(d&&d.types,(function(e){"Files"===e&&(i=!0)})),i&&(s||(t.$apply(o.flowDragEnter),s=!0),e.cancel(r),n.preventDefault())})),n.bind("dragleave drop",(function(n){e.cancel(r),r=e((function(){t.$eval(o.flowDragLeave),r=null,s=!1}),100)}))}}}]),angular.module("flow.drop",["flow.init"]).directive("flowDrop",(function(){return{scope:!1,require:"^flowInit",link:function(e,t,n){function o(){e.$flow.assignDrop(t)}n.flowDropEnabled?e.$watch(n.flowDropEnabled,(function(n){n?o():e.$flow.unAssignDrop(t)})):o()}}})),function(e){"use strict";var t=e.module("flow.events",["flow.init"]);e.forEach({fileSuccess:["$file","$message"],fileProgress:["$file"],fileAdded:["$file","$event"],filesAdded:["$files","$event"],filesSubmitted:["$files","$event"],fileRetry:["$file"],fileRemoved:["$file"],fileError:["$file","$message"],uploadStart:[],complete:[],progress:[],error:["$message","$file"]},(function(n,o){var r,s="flow"+((r=o).charAt(0).toUpperCase()+r.slice(1));"flowUploadStart"==s&&(s="flowUploadStarted"),t.directive(s,[function(){return{require:"^flowInit",controller:["$scope","$attrs",function(t,r){t.$on("flow::"+o,(function(){var o=Array.prototype.slice.call(arguments),a=o.shift();if(t.$flow===o.shift()){var i={};e.forEach(n,(function(e,t){i[e]=o[t]})),!1===t.$eval(r[s],i)&&a.preventDefault()}}))}]}}])}))}(angular),angular.module("flow.img",["flow.init"]).directive("flowImg",[function(){return{scope:!1,require:"^flowInit",link:function(e,t,n){var o=n.flowImg;e.$watch(o,(function(t){if(t){var o=new FileReader;o.readAsDataURL(t.file),o.onload=function(t){e.$apply((function(){n.$set("src",t.target.result)}))}}}))}}}]),angular.module("flow.transfers",["flow.init"]).directive("flowTransfers",[function(){return{scope:!0,require:"^flowInit",link:function(e){e.transfers=e.$flow.files}}}]),angular.module("flow",["flow.provider","flow.init","flow.events","flow.btn","flow.drop","flow.transfers","flow.img","flow.dragEvents"])},"./node_modules/@uirouter/angularjs/lib-esm/directives/viewDirective.js":(e,t,n)=>{"use strict";var o,r=n("./node_modules/@uirouter/core/lib-esm/index.js"),s=n("./node_modules/@uirouter/angularjs/lib-esm/angular.js"),a=n("./node_modules/@uirouter/angularjs/lib-esm/services.js"),i=n("./node_modules/@uirouter/angularjs/lib-esm/statebuilders/views.js");function d(e,t,n,o,i){var d=(0,r.parse)("viewDecl.controllerAs"),u=(0,r.parse)("viewDecl.resolveAs");return{restrict:"ECA",priority:-400,compile:function(o){var m=o.html();return o.empty(),function(o,_){var c=_.data("$uiView");if(!c)return _.html(m),void e(_.contents())(o);var h=c.$cfg||{viewDecl:{},getTemplate:r.noop},f=h.path&&new r.ResolveContext(h.path);_.html(h.getTemplate(_,f)||m),r.trace.traceUIViewFill(c.$uiView,_.html());var p=e(_.contents()),M=h.controller,y=d(h),L=u(h),g=f&&(0,a.D)(f);if(o[L]=g,M){var Y=t(M,(0,r.extend)({},g,{$scope:o,$element:_}));y&&(o[y]=Y,o[y][L]=g),_.data("$ngControllerController",Y),_.children().data("$ngControllerController",Y),l(i,n,Y,o,h)}if((0,r.isString)(h.component))var v=(0,r.kebobString)(h.component),k=new RegExp("^(x-|data-)?"+v+"$","i"),j=o.$watch((function(){var e=[].slice.call(_[0].children).filter((function(e){return e&&e.tagName&&k.exec(e.tagName)}));return e&&s.ng.element(e).data("$"+h.component+"Controller")}),(function(e){e&&(l(i,n,e,o,h),j())}));p(o)}}}}o=["$view","$animate","$uiViewScroll","$interpolate","$q",function(e,t,n,o,a){var d={$cfg:{viewDecl:{$context:e._pluginapi._rootViewContext()}},$uiView:{}},u={count:0,restrict:"ECA",terminal:!0,priority:400,transclude:"element",compile:function(m,l,_){return function(m,l,c){var h,f,p,M,y=c.onload||"",L=c.autoscroll,g=function(e,n,o){s.ng.version.minor>2?t.enter(e,null,n).then(o):t.enter(e,null,n,o)},Y=function(e,n){s.ng.version.minor>2?t.leave(e).then(n):t.leave(e,n)},v=l.inheritedData("$uiView")||d,k=o(c.uiView||c.name||"")(m)||"$default",j={$type:"ng1",id:u.count++,name:k,fqn:v.$uiView.fqn?v.$uiView.fqn+"."+k:k,config:null,configUpdated:function(e){(!e||e instanceof i.qO)&&(M!==e&&(r.trace.traceUIViewConfigUpdated(j,e&&e.viewDecl&&e.viewDecl.$context),M=e,b(e)))},get creationContext(){var e=(0,r.parse)("$cfg.viewDecl.$context")(v),t=(0,r.parse)("$uiView.creationContext")(v);return e||t}};r.trace.traceUIViewEvent("Linking",j),l.data("$uiView",{$uiView:j}),b();var w=e.registerUIView(j);function b(e){var t=m.$new(),o=a.defer(),s=a.defer(),i={$cfg:e,$uiView:j},d={$animEnter:o.promise,$animLeave:s.promise,$$animLeave:s};t.$emit("$viewContentLoading",k);var u=_(t,(function(e){e.data("$uiViewAnim",d),e.data("$uiView",i),g(e,l,(function(){o.resolve(),p&&p.$emit("$viewContentAnimationEnded"),((0,r.isDefined)(L)&&!L||m.$eval(L))&&n(e)})),function(){if(h&&(r.trace.traceUIViewEvent("Removing (previous) el",h.data("$uiView")),h.remove(),h=null),p&&(r.trace.traceUIViewEvent("Destroying scope",j),p.$destroy(),p=null),f){var e=f.data("$uiViewAnim");r.trace.traceUIViewEvent("Animate out",e),Y(f,(function(){e.$$animLeave.resolve(),h=null})),h=f,f=null}}()}));f=u,(p=t).$emit("$viewContentLoaded",e||M),p.$eval(y)}m.$on("$destroy",(function(){r.trace.traceUIViewEvent("Destroying/Unregistering",j),w()}))}}};return u}],d.$inject=["$compile","$controller","$transitions","$view","$q"];var u="function"==typeof s.ng.module("ui.router").component,m=0;function l(e,t,n,o,s){!(0,r.isFunction)(n.$onInit)||(s.viewDecl.component||s.viewDecl.componentProvider)&&u||n.$onInit();var a=(0,r.tail)(s.path).state.self,i={bind:n};if((0,r.isFunction)(n.uiOnParamsChanged)){var d=new r.ResolveContext(s.path).getResolvable("$transition$").data;o.$on("$destroy",t.onSuccess({},(function(e){if(e!==d&&-1===e.exiting().indexOf(a)){var t=e.params("to"),o=e.params("from"),s=function(e){return e.paramSchema},i=e.treeChanges("to").map(s).reduce(r.unnestR,[]),u=e.treeChanges("from").map(s).reduce(r.unnestR,[]),m=i.filter((function(e){var n=u.indexOf(e);return-1===n||!u[n].type.equals(t[e.id],o[e.id])}));if(m.length){var l=m.map((function(e){return e.id})),_=(0,r.filter)(t,(function(e,t){return-1!==l.indexOf(t)}));n.uiOnParamsChanged(_,e)}}}),i))}if((0,r.isFunction)(n.uiCanExit)){var l=m++,_="_uiCanExitIds",c=function(e){return!!e&&(e[_]&&!0===e[_][l]||c(e.redirectedFrom()))},h={exiting:a.name};o.$on("$destroy",t.onBefore(h,(function(t){var o,r=t[_]=t[_]||{};return c(t)||(o=e.when(n.uiCanExit(t))).then((function(e){return r[l]=!1!==e})),o}),i))}}s.ng.module("ui.router.state").directive("uiView",o),s.ng.module("ui.router.state").directive("uiView",d)},"./node_modules/@uirouter/angularjs/lib-esm/interface.js":()=>{},"./node_modules/@uirouter/angularjs/lib-esm/services.js":(e,t,n)=>{"use strict";n.d(t,{D:()=>k});var o=n("./node_modules/@uirouter/angularjs/lib-esm/angular.js"),r=n("./node_modules/@uirouter/core/lib-esm/index.js"),s=n("./node_modules/@uirouter/angularjs/lib-esm/statebuilders/views.js"),a=function(){function e(){var e=this;this._useHttp=o.ng.version.minor<3,this.$get=["$http","$templateCache","$injector",function(t,n,o){return e.$templateRequest=o.has&&o.has("$templateRequest")&&o.get("$templateRequest"),e.$http=t,e.$templateCache=n,e}]}return e.prototype.useHttpService=function(e){this._useHttp=e},e.prototype.fromConfig=function(e,t,n){var o=function(e){return r.services.$q.when(e).then((function(e){return{template:e}}))},s=function(e){return r.services.$q.when(e).then((function(e){return{component:e}}))};return(0,r.isDefined)(e.template)?o(this.fromString(e.template,t)):(0,r.isDefined)(e.templateUrl)?o(this.fromUrl(e.templateUrl,t)):(0,r.isDefined)(e.templateProvider)?o(this.fromProvider(e.templateProvider,t,n)):(0,r.isDefined)(e.component)?s(e.component):(0,r.isDefined)(e.componentProvider)?s(this.fromComponentProvider(e.componentProvider,t,n)):o("")},e.prototype.fromString=function(e,t){return(0,r.isFunction)(e)?e(t):e},e.prototype.fromUrl=function(e,t){return(0,r.isFunction)(e)&&(e=e(t)),null==e?null:this._useHttp?this.$http.get(e,{cache:this.$templateCache,headers:{Accept:"text/html"}}).then((function(e){return e.data})):this.$templateRequest(e)},e.prototype.fromProvider=function(e,t,n){var o=r.services.$injector.annotate(e),s=(0,r.isArray)(e)?(0,r.tail)(e):e;return new r.Resolvable("",s,o).get(n)},e.prototype.fromComponentProvider=function(e,t,n){var o=r.services.$injector.annotate(e),s=(0,r.isArray)(e)?(0,r.tail)(e):e;return new r.Resolvable("",s,o).get(n)},e.prototype.makeComponentTemplate=function(e,t,n,s){s=s||{};var a=o.ng.version.minor>=3?"::":"",d=function(e){var t=(0,r.kebobString)(e);return/^(x|data)-/.exec(t)?"x-"+t:t},u=function(e){var t=r.services.$injector.get(e+"Directive");if(!t||!t.length)throw new Error("Unable to find component named '"+e+"'");return t.map(i).reduce(r.unnestR,[])}(n).map((function(n){var o=n.name,i=n.type,u=d(o);if(e.attr(u)&&!s[o])return u+"='"+e.attr(u)+"'";var m=s[o]||o;if("@"===i)return u+"='{{"+a+"$resolve."+m+"}}'";if("&"===i){var l=t.getResolvable(m),_=l&&l.data,c=_&&r.services.$injector.annotate(_)||[];return u+"='$resolve."+m+((0,r.isArray)(_)?"["+(_.length-1)+"]":"")+"("+c.join(",")+")'"}return u+"='"+a+"$resolve."+m+"'"})).join(" "),m=d(n);return"<"+m+" "+u+">"},e}(),i=function(e){return(0,r.isObject)(e.bindToController)?d(e.bindToController):d(e.scope)},d=function(e){return Object.keys(e||{}).map((function(t){return[t,/^([=<@&])[?]?(.*)/.exec(e[t])]})).filter((function(e){return(0,r.isDefined)(e)&&(0,r.isArray)(e[1])})).map((function(e){return{name:e[1][2]||e[0],type:e[1][1]}}))},u=n("./node_modules/@uirouter/angularjs/lib-esm/stateProvider.js"),m=function(e){return function(t){var n=t[e],o="onExit"===e?"from":"to";return n?function(e,t){var s=new r.ResolveContext(e.treeChanges(o)).subContext(t.$$state()),a=(0,r.extend)(k(s),{$state$:t,$transition$:e});return r.services.$injector.invoke(n,this,a)}:void 0}},l=function(){function e(e){this._urlListeners=[],this.$locationProvider=e;var t=(0,r.val)(e);(0,r.createProxyFunctions)(t,this,t,["hashPrefix"])}return e.monkeyPatchPathParameterType=function(e){var t=e.urlMatcherFactory.type("path");t.encode=function(e){return null!=e?e.toString().replace(/(~|\/)/g,(function(e){return{"~":"~~","/":"~2F"}[e]})):e},t.decode=function(e){return null!=e?e.toString().replace(/(~~|~2F)/g,(function(e){return{"~~":"~","~2F":"/"}[e]})):e}},e.prototype.dispose=function(){},e.prototype.onChange=function(e){var t=this;return this._urlListeners.push(e),function(){return(0,r.removeFrom)(t._urlListeners)(e)}},e.prototype.html5Mode=function(){var e=this.$locationProvider.html5Mode();return(e=(0,r.isObject)(e)?e.enabled:e)&&this.$sniffer.history},e.prototype.baseHref=function(){return this._baseHref||(this._baseHref=this.$browser.baseHref()||this.$window.location.pathname)},e.prototype.url=function(e,t,n){return void 0===t&&(t=!1),(0,r.isDefined)(e)&&this.$location.url(e),t&&this.$location.replace(),n&&this.$location.state(n),this.$location.url()},e.prototype._runtimeServices=function(e,t,n,o,s){var a=this;this.$location=t,this.$sniffer=n,this.$browser=o,this.$window=s,e.$on("$locationChangeSuccess",(function(e){return a._urlListeners.forEach((function(t){return t(e)}))}));var i=(0,r.val)(t);(0,r.createProxyFunctions)(i,this,i,["replace","path","search","hash"]),(0,r.createProxyFunctions)(i,this,i,["port","protocol","host"])},e}(),_=n("./node_modules/@uirouter/angularjs/lib-esm/urlRouterProvider.js");o.ng.module("ui.router.angular1",[]);var c=o.ng.module("ui.router.init",["ng"]),h=o.ng.module("ui.router.util",["ui.router.init"]),f=o.ng.module("ui.router.router",["ui.router.util"]),p=o.ng.module("ui.router.state",["ui.router.router","ui.router.util","ui.router.angular1"]),M=o.ng.module("ui.router",["ui.router.init","ui.router.state","ui.router.angular1"]),y=(o.ng.module("ui.router.compat",["ui.router"]),null);function L(e){(y=this.router=new r.UIRouter).stateProvider=new u.X(y.stateRegistry,y.stateService),y.stateRegistry.decorator("views",s.LB),y.stateRegistry.decorator("onExit",m("onExit")),y.stateRegistry.decorator("onRetain",m("onRetain")),y.stateRegistry.decorator("onEnter",m("onEnter")),y.viewService._pluginapi._viewConfigFactory("ng1",(0,s.OB)()),y.urlService.config._decodeParams=!1;var t=y.locationService=y.locationConfig=new l(e);function n(e,n,o,r,s,a,i){return t._runtimeServices(s,e,r,n,o),delete y.router,delete y.$get,y}return l.monkeyPatchPathParameterType(y),y.router=y,y.$get=n,n.$inject=["$location","$browser","$window","$sniffer","$rootScope","$http","$templateCache"],y}L.$inject=["$locationProvider"];var g=function(e){return["$uiRouterProvider",function(t){var n=t.router[e];return n.$get=function(){return n},n}]};function Y(e,t,n){if(r.services.$injector=e,r.services.$q=t,!Object.prototype.hasOwnProperty.call(e,"strictDi"))try{e.invoke((function(e){}))}catch(t){e.strictDi=!!/strict mode/.exec(t&&t.toString())}n.stateRegistry.get().map((function(e){return e.$$state().resolvables})).reduce(r.unnestR,[]).filter((function(e){return"deferred"===e.deps})).forEach((function(t){return t.deps=e.annotate(t.resolveFn,e.strictDi)}))}function v(e){e.$watch((function(){r.trace.approximateDigests++}))}Y.$inject=["$injector","$q","$uiRouter"],v.$inject=["$rootScope"],c.provider("$uiRouter",L),f.provider("$urlRouter",["$uiRouterProvider",function(e){return e.urlRouterProvider=new _.L(e)}]),h.provider("$urlService",g("urlService")),h.provider("$urlMatcherFactory",["$uiRouterProvider",function(){return y.urlMatcherFactory}]),h.provider("$templateFactory",(function(){return new a})),p.provider("$stateRegistry",g("stateRegistry")),p.provider("$uiRouterGlobals",g("globals")),p.provider("$transitions",g("transitionService")),p.provider("$state",["$uiRouterProvider",function(){return(0,r.extend)(y.stateProvider,{$get:function(){return y.stateService}})}]),p.factory("$stateParams",["$uiRouter",function(e){return e.globals.params}]),M.factory("$view",(function(){return y.viewService})),M.service("$trace",(function(){return r.trace})),M.run(v),h.run(["$urlMatcherFactory",function(e){}]),p.run(["$state",function(e){}]),f.run(["$urlRouter",function(e){}]),c.run(Y);var k=function(e){return e.getTokens().filter(r.isString).map((function(t){var n=e.getResolvable(t);return[t,"NOWAIT"===e.getPolicy(n).async?n.promise:n.data]})).reduce(r.applyPairs,{})}},"./node_modules/@uirouter/angularjs/lib-esm/stateFilters.js":(e,t,n)=>{"use strict";var o=n("./node_modules/@uirouter/angularjs/lib-esm/angular.js");function r(e){var t=function(t,n,o){return e.is(t,n,o)};return t.$stateful=!0,t}function s(e){var t=function(t,n,o){return e.includes(t,n,o)};return t.$stateful=!0,t}r.$inject=["$state"],s.$inject=["$state"],o.ng.module("ui.router.state").filter("isState",r).filter("includedByState",s)},"./node_modules/@uirouter/angularjs/lib-esm/stateProvider.js":(e,t,n)=>{"use strict";n.d(t,{X:()=>r});var o=n("./node_modules/@uirouter/core/lib-esm/index.js"),r=function(){function e(t,n){this.stateRegistry=t,this.stateService=n,(0,o.createProxyFunctions)((0,o.val)(e.prototype),this,(0,o.val)(this))}return e.prototype.decorator=function(e,t){return this.stateRegistry.decorator(e,t)||this},e.prototype.state=function(e,t){return(0,o.isObject)(e)?t=e:t.name=e,this.stateRegistry.register(t),this},e.prototype.onInvalid=function(e){return this.stateService.onInvalid(e)},e}()},"./node_modules/@uirouter/angularjs/lib-esm/statebuilders/views.js":(e,t,n)=>{"use strict";n.d(t,{OB:()=>r,LB:()=>a,qO:()=>d});var o=n("./node_modules/@uirouter/core/lib-esm/index.js");function r(){var e=null;return function(t,n){return e=e||o.services.$injector.get("$templateFactory"),[new d(t,n,e)]}}var s=function(e,t){return e.reduce((function(e,n){return e||(0,o.isDefined)(t[n])}),!1)};function a(e){if(!e.parent)return{};var t=["component","bindings","componentProvider"],n=["templateProvider","templateUrl","template","notify","async"].concat(["controller","controllerProvider","controllerAs","resolveAs"]),r=t.concat(n);if((0,o.isDefined)(e.views)&&s(r,e))throw new Error("State '"+e.name+"' has a 'views' object. It cannot also have \"view properties\" at the state level. Move the following properties into a view (in the 'views' object): "+r.filter((function(t){return(0,o.isDefined)(e[t])})).join(", "));var a={},i=e.views||{$default:(0,o.pick)(e,r)};return(0,o.forEach)(i,(function(r,i){if(i=i||"$default",(0,o.isString)(r)&&(r={component:r}),r=(0,o.extend)({},r),s(t,r)&&s(n,r))throw new Error("Cannot combine: "+t.join("|")+" with: "+n.join("|")+" in stateview: '"+i+"@"+e.name+"'");r.resolveAs=r.resolveAs||"$resolve",r.$type="ng1",r.$context=e,r.$name=i;var d=o.ViewService.normalizeUIViewTarget(r.$context,r.$name);r.$uiViewName=d.uiViewName,r.$uiViewContextAnchor=d.uiViewContextAnchor,a[i]=r})),a}var i=0,d=function(){function e(e,t,n){var o=this;this.path=e,this.viewDecl=t,this.factory=n,this.$id=i++,this.loaded=!1,this.getTemplate=function(e,t){return o.component?o.factory.makeComponentTemplate(e,t,o.component,o.viewDecl.bindings):o.template}}return e.prototype.load=function(){var e=this,t=o.services.$q,n=new o.ResolveContext(this.path),r=this.path.reduce((function(e,t){return(0,o.extend)(e,t.paramValues)}),{}),s={template:t.when(this.factory.fromConfig(this.viewDecl,r,n)),controller:t.when(this.getController(n))};return t.all(s).then((function(t){return o.trace.traceViewServiceEvent("Loaded",e),e.controller=t.controller,(0,o.extend)(e,t.template),e}))},e.prototype.getController=function(e){var t=this.viewDecl.controllerProvider;if(!(0,o.isInjectable)(t))return this.viewDecl.controller;var n=o.services.$injector.annotate(t),r=(0,o.isArray)(t)?(0,o.tail)(t):t;return new o.Resolvable("",r,n).get(e)},e}()},"./node_modules/@uirouter/angularjs/lib-esm/urlRouterProvider.js":(e,t,n)=>{"use strict";n.d(t,{L:()=>r});var o=n("./node_modules/@uirouter/core/lib-esm/index.js"),r=function(){function e(e){this.router=e}return e.injectableHandler=function(e,t){return function(n){return o.services.$injector.invoke(t,null,{$match:n,$stateParams:e.globals.params})}},e.prototype.$get=function(){var e=this.router.urlService;return this.router.urlRouter.update(!0),e.interceptDeferred||e.listen(),this.router.urlRouter},e.prototype.rule=function(e){var t=this;if(!(0,o.isFunction)(e))throw new Error("'rule' must be a function");var n=new o.BaseUrlRule((function(){return e(o.services.$injector,t.router.locationService)}),o.identity);return this.router.urlService.rules.rule(n),this},e.prototype.otherwise=function(e){var t=this,n=this.router.urlService.rules;if((0,o.isString)(e))n.otherwise(e);else{if(!(0,o.isFunction)(e))throw new Error("'rule' must be a string or function");n.otherwise((function(){return e(o.services.$injector,t.router.locationService)}))}return this},e.prototype.when=function(t,n){return((0,o.isArray)(n)||(0,o.isFunction)(n))&&(n=e.injectableHandler(this.router,n)),this.router.urlService.rules.when(t,n),this},e.prototype.deferIntercept=function(e){this.router.urlService.deferIntercept(e)},e}()},"./node_modules/@uirouter/angularjs/lib-esm/viewScroll.js":(e,t,n)=>{"use strict";n("./node_modules/@uirouter/angularjs/lib-esm/angular.js").ng.module("ui.router.state").provider("$uiViewScroll",(function(){var e=!1;this.useAnchorScroll=function(){e=!0},this.$get=["$anchorScroll","$timeout",function(t,n){return e?t:function(e){return n((function(){e[0].scrollIntoView()}),0,!1)}}]}))},"./node_modules/@uirouter/core/lib-esm/common/common.js":(e,t,n)=>{"use strict";n.d(t,{Jz:()=>i,xZ:()=>u,Qs:()=>m,Ed:()=>l,l7:()=>_,fS:()=>c,yR:()=>h,ZT:()=>f,WR:()=>p,ED:()=>M,d3:()=>y,nA:()=>L,LH:()=>g,Wk:()=>Y,ce:()=>v,LQ:()=>k,mX:()=>j,ei:()=>w,CE:()=>b,hX:()=>D,sE:()=>T,js:()=>S,UI:()=>H,VO:()=>x,XC:()=>E,o8:()=>P,M7:()=>O,FN:()=>$,Ez:()=>A,v_:()=>R,UW:()=>F,sp:()=>W,ym:()=>C,bb:()=>I,Gb:()=>z,JG:()=>J,HX:()=>V,jv:()=>N});var o=n("./node_modules/@uirouter/core/lib-esm/common/predicates.js"),r=n("./node_modules/@uirouter/core/lib-esm/common/hof.js"),s=n("./node_modules/@uirouter/core/lib-esm/common/coreservices.js"),a=function(){for(var e=0,t=0,n=arguments.length;t=0&&e.splice(n,1),e})),g=(0,r.WA)((function(e,t){return e.push(t),t})),Y=function(e){return e.slice().forEach((function(t){"function"==typeof t&&t(),L(e,t)}))};function v(e){for(var t=[],n=1;n{"use strict";n.d(t,{H:()=>o,u:()=>r});var o=function(e,t){return t.reduce((function(t,n){return t[n]=(o=e+"."+n+"()",function(){throw new Error("No implementation for "+o+". The framework specific code did not implement this method.")}),t;var o}),{})},r={$q:void 0,$injector:void 0}},"./node_modules/@uirouter/core/lib-esm/common/glob.js":(e,t,n)=>{"use strict";n.d(t,{r:()=>o});var o=function(){function e(e){this.text=e,this.glob=e.split(".");var t=this.text.split(".").map((function(e){return"**"===e?"(?:|(?:\\.[^.]*)*)":"*"===e?"\\.[^.]*":"\\."+e})).join("");this.regexp=new RegExp("^"+t+"$")}return e.is=function(e){return!!/[!,*]+/.exec(e)},e.fromString=function(t){return e.is(t)?new e(t):null},e.prototype.matches=function(e){return this.regexp.test("."+e)},e}()},"./node_modules/@uirouter/core/lib-esm/common/hof.js":(e,t,n)=>{"use strict";n.d(t,{WA:()=>r,zG:()=>a,vg:()=>i,OH:()=>d,Qc:()=>u,ff:()=>m,xD:()=>l,or:()=>_,$6:()=>c,Yj:()=>h,is:()=>f,P0:()=>p,uj:()=>M});var o=function(){for(var e=0,t=0,n=arguments.length;t=e.length)return e.apply(this,arguments);var n=Array.prototype.slice.call(arguments);return t.bind.apply(t,o([this],n))}}function s(){var e=arguments,t=e.length-1;return function(){for(var n=t,o=e[t].apply(this,arguments);n--;)o=e[n].call(this,o);return o}}function a(){for(var e=[],t=0;t{"use strict";n.d(t,{o8:()=>a,$K:()=>i,Ft:()=>d,le:()=>u,mf:()=>m,hj:()=>l,HD:()=>_,Kn:()=>c,kJ:()=>h,J_:()=>f,Kj:()=>p,Qh:()=>M,tI:()=>y});var o=n("./node_modules/@uirouter/core/lib-esm/common/hof.js"),r=Object.prototype.toString,s=function(e){return function(t){return typeof t===e}},a=s("undefined"),i=(0,o.ff)(a),d=function(e){return null===e},u=(0,o.or)(d,a),m=s("function"),l=s("number"),_=s("string"),c=function(e){return null!==e&&"object"==typeof e},h=Array.isArray,f=function(e){return"[object Date]"===r.call(e)},p=function(e){return"[object RegExp]"===r.call(e)};function M(e){if(h(e)&&e.length){var t=e.slice(0,-1),n=e.slice(-1);return!(t.filter((0,o.ff)(_)).length||n.filter((0,o.ff)(m)).length)}return m(e)}var y=(0,o.xD)(c,(0,o.zG)((0,o.vg)("then"),m))},"./node_modules/@uirouter/core/lib-esm/common/queue.js":(e,t,n)=>{"use strict";n.d(t,{c:()=>r});var o=n("./node_modules/@uirouter/core/lib-esm/common/common.js"),r=function(){function e(e,t){void 0===e&&(e=[]),void 0===t&&(t=null),this._items=e,this._limit=t,this._evictListeners=[],this.onEvict=(0,o.LH)(this._evictListeners)}return e.prototype.enqueue=function(e){var t=this._items;return t.push(e),this._limit&&t.length>this._limit&&this.evict(),e},e.prototype.evict=function(){var e=this._items.shift();return this._evictListeners.forEach((function(t){return t(e)})),e},e.prototype.dequeue=function(){if(this.size())return this._items.splice(0,1)[0]},e.prototype.clear=function(){var e=this._items;return this._items=[],e},e.prototype.size=function(){return this._items.length},e.prototype.remove=function(e){var t=this._items.indexOf(e);return t>-1&&this._items.splice(t,1)[0]},e.prototype.peekTail=function(){return this._items[this._items.length-1]},e.prototype.peekHead=function(){if(this.size())return this._items[0]},e}()},"./node_modules/@uirouter/core/lib-esm/common/safeConsole.js":(e,t,n)=>{"use strict";n.d(t,{L:()=>s});var o=n("./node_modules/@uirouter/core/lib-esm/common/common.js"),r={log:o.ZT,error:o.ZT,table:o.ZT},s="undefined"!=typeof document&&document.documentMode&&9===document.documentMode?window&&window.console?function(e){var t=function(t){return Function.prototype.bind.call(t,e)};return{log:t(e.log),error:t(e.log),table:t(e.log)}}(window.console):r:console.table&&console.error?console:function(e){var t=e.log.bind(e);return{log:t,error:e.error?e.error.bind(e):t,table:e.table?e.table.bind(e):t}}(console)},"./node_modules/@uirouter/core/lib-esm/common/strings.js":(e,t,n)=>{"use strict";n.d(t,{BS:()=>i,NE:()=>d,L$:()=>u,XF:()=>m,iC:()=>l,Pz:()=>h,Lb:()=>p,cW:()=>M,C7:()=>y,Fb:()=>L,HV:()=>g,PX:()=>Y,iV:()=>v});var o=n("./node_modules/@uirouter/core/lib-esm/common/predicates.js"),r=n("./node_modules/@uirouter/core/lib-esm/transition/rejectFactory.js"),s=n("./node_modules/@uirouter/core/lib-esm/common/common.js"),a=n("./node_modules/@uirouter/core/lib-esm/common/hof.js");function i(e,t){return t.length<=e?t:t.substr(0,e-3)+"..."}function d(e,t){for(;t.length{"use strict";n.d(t,{g4:()=>c});var o,r=n("./node_modules/@uirouter/core/lib-esm/common/hof.js"),s=n("./node_modules/@uirouter/core/lib-esm/common/predicates.js"),a=n("./node_modules/@uirouter/core/lib-esm/common/strings.js"),i=n("./node_modules/@uirouter/core/lib-esm/common/safeConsole.js");function d(e){if(!e)return"ui-view (defunct)";var t=e.creationContext?e.creationContext.name||"(root)":"(none)";return"[ui-view#"+e.id+" "+e.$type+":"+e.fqn+" ("+e.name+"@"+t+")]"}function u(e){return(0,s.hj)(e)?o[e]:o[o[e]]}!function(e){e[e.RESOLVE=0]="RESOLVE",e[e.TRANSITION=1]="TRANSITION",e[e.HOOK=2]="HOOK",e[e.UIVIEW=3]="UIVIEW",e[e.VIEWCONFIG=4]="VIEWCONFIG"}(o||(o={}));var m=(0,r.Qc)("$id"),l=(0,r.Qc)("router.$id"),_=function(e){return"Transition #"+m(e)+"-"+l(e)},c=new(function(){function e(){this._enabled={},this.approximateDigests=0}return e.prototype._set=function(e,t){var n=this;t.length||(t=Object.keys(o).map((function(e){return parseInt(e,10)})).filter((function(e){return!isNaN(e)})).map((function(e){return o[e]}))),t.map(u).forEach((function(t){return n._enabled[t]=e}))},e.prototype.enable=function(){for(var e=[],t=0;t "+(0,a.Pz)(e))},e.prototype.traceTransitionIgnored=function(e){this.enabled(o.TRANSITION)&&i.L.log(_(e)+": Ignored <> "+(0,a.Pz)(e))},e.prototype.traceHookInvocation=function(e,t,n){if(this.enabled(o.HOOK)){var s=(0,r.Qc)("traceData.hookType")(n)||"internal",d=(0,r.Qc)("traceData.context.state.name")(n)||(0,r.Qc)("traceData.context")(n)||"unknown",u=(0,a.XF)(e.registeredHook.callback);i.L.log(_(t)+": Hook -> "+s+" context: "+d+", "+(0,a.BS)(200,u))}},e.prototype.traceHookResult=function(e,t,n){this.enabled(o.HOOK)&&i.L.log(_(t)+": <- Hook returned: "+(0,a.BS)(200,(0,a.Pz)(e)))},e.prototype.traceResolvePath=function(e,t,n){this.enabled(o.RESOLVE)&&i.L.log(_(n)+": Resolving "+e+" ("+t+")")},e.prototype.traceResolvableResolved=function(e,t){this.enabled(o.RESOLVE)&&i.L.log(_(t)+": <- Resolved "+e+" to: "+(0,a.BS)(200,(0,a.Pz)(e.data)))},e.prototype.traceError=function(e,t){this.enabled(o.TRANSITION)&&i.L.log(_(t)+": <- Rejected "+(0,a.Pz)(t)+", reason: "+e)},e.prototype.traceSuccess=function(e,t){this.enabled(o.TRANSITION)&&i.L.log(_(t)+": <- Success "+(0,a.Pz)(t)+", final state: "+e.name)},e.prototype.traceUIViewEvent=function(e,t,n){void 0===n&&(n=""),this.enabled(o.UIVIEW)&&i.L.log("ui-view: "+(0,a.NE)(30,e)+" "+d(t)+n)},e.prototype.traceUIViewConfigUpdated=function(e,t){this.enabled(o.UIVIEW)&&this.traceUIViewEvent("Updating",e," with ViewConfig from context='"+t+"'")},e.prototype.traceUIViewFill=function(e,t){this.enabled(o.UIVIEW)&&this.traceUIViewEvent("Fill",e," with: "+(0,a.BS)(200,t))},e.prototype.traceViewSync=function(e){if(this.enabled(o.VIEWCONFIG)){var t="uiview component fqn",n=e.map((function(e){var n,o=e.uiView,r=e.viewConfig,s=o&&o.fqn,a=r&&r.viewDecl.$context.name+": ("+r.viewDecl.$name+")";return(n={})[t]=s,n["view config state (view name)"]=a,n})).sort((function(e,n){return(e[t]||"").localeCompare(n[t]||"")}));i.L.table(n)}},e.prototype.traceViewServiceEvent=function(e,t){this.enabled(o.VIEWCONFIG)&&i.L.log("VIEWCONFIG: "+e+" "+function(e){var t=e.viewDecl,n=t.$context.name||"(root)";return"[View#"+e.$id+" from '"+n+"' state]: target ui-view: '"+t.$uiViewName+"@"+t.$uiViewContextAnchor+"'"}(t))},e.prototype.traceViewServiceUIViewEvent=function(e,t){this.enabled(o.VIEWCONFIG)&&i.L.log("VIEWCONFIG: "+e+" "+d(t))},e}())},"./node_modules/@uirouter/core/lib-esm/globals.js":(e,t,n)=>{"use strict";n.d(t,{k:()=>s});var o=n("./node_modules/@uirouter/core/lib-esm/params/stateParams.js"),r=n("./node_modules/@uirouter/core/lib-esm/common/queue.js"),s=function(){function e(){this.params=new o.i,this.lastStartedTransitionId=-1,this.transitionHistory=new r.c([],1),this.successfulTransitions=new r.c([],1)}return e.prototype.dispose=function(){this.transitionHistory.clear(),this.successfulTransitions.clear(),this.transition=null},e}()},"./node_modules/@uirouter/core/lib-esm/hooks/lazyLoad.js":(e,t,n)=>{"use strict";n.d(t,{v:()=>s,A:()=>a});var o=n("./node_modules/@uirouter/core/lib-esm/common/coreservices.js"),r=function(e){var t=e.router,n=e.entering().filter((function(e){return!!e.$$state().lazyLoad})).map((function(t){return a(e,t)}));return o.u.$q.all(n).then((function(){if("url"!==e.originalTransition().options().source){var n=e.targetState();return t.stateService.target(n.identifier(),n.params(),n.options())}var o=t.urlService,r=o.match(o.parts()),s=r&&r.rule;if(s&&"STATE"===s.type){var a=s.state,i=r.match;return t.stateService.target(a,i,e.options())}t.urlService.sync()}))},s=function(e){return e.onBefore({entering:function(e){return!!e.lazyLoad}},r)};function a(e,t){var n=t.$$state().lazyLoad,r=n._promise;return r||(r=n._promise=o.u.$q.when(n(e,t)).then((function(t){return t&&Array.isArray(t.states)&&t.states.forEach((function(t){return e.router.stateRegistry.register(t)})),t})).then((function(e){return delete t.lazyLoad,delete t.$$state().lazyLoad,delete n._promise,e}),(function(e){return delete n._promise,o.u.$q.reject(e)}))),r}},"./node_modules/@uirouter/core/lib-esm/interface.js":(e,t,n)=>{},"./node_modules/@uirouter/core/lib-esm/params/interface.js":()=>{},"./node_modules/@uirouter/core/lib-esm/params/param.js":(e,t,n)=>{"use strict";n.d(t,{_:()=>o,d:()=>m});var o,r=n("./node_modules/@uirouter/core/lib-esm/common/common.js"),s=n("./node_modules/@uirouter/core/lib-esm/common/hof.js"),a=n("./node_modules/@uirouter/core/lib-esm/common/predicates.js"),i=n("./node_modules/@uirouter/core/lib-esm/common/coreservices.js"),d=n("./node_modules/@uirouter/core/lib-esm/params/paramType.js"),u=Object.prototype.hasOwnProperty;!function(e){e[e.PATH=0]="PATH",e[e.SEARCH=1]="SEARCH",e[e.CONFIG=2]="CONFIG"}(o||(o={}));var m=function(){function e(e,t,n,i,m){var l=function(e,t,n){var s=!1===n.reloadOnSearch&&t===o.SEARCH||void 0,i=(0,r.sE)([n.dynamic,s],a.$K),d=(0,a.$K)(i)?{dynamic:i}:{},m=function(e){function t(){return e.value}e=function(e){return 0===["value","type","squash","array","dynamic"].filter(u.bind(e||{})).length}(e)?{value:e}:e,t.__cacheable=!0;var n=(0,a.Qh)(e.value)?e.value:t;return(0,r.l7)(e,{$$fn:n})}(n&&n.params&&n.params[e]);return(0,r.l7)(d,m)}(e,n,m);t=function(e,t,n,r,s){if(e.type&&t&&"string"!==t.name)throw new Error("Param '"+r+"' has two type configurations.");if(e.type&&t&&"string"===t.name&&s.type(e.type))return s.type(e.type);if(t)return t;if(!e.type){var a=n===o.CONFIG?"any":n===o.PATH?"path":n===o.SEARCH?"query":"string";return s.type(a)}return e.type instanceof d._?e.type:s.type(e.type)}(l,t,n,e,i.paramTypes);var _,c,h=(_={array:n===o.SEARCH&&"auto"},c=e.match(/\[\]$/)?{array:!0}:{},(0,r.l7)(_,c,l).array);t=h?t.$asArray(h,n===o.SEARCH):t;var f=void 0!==l.value||n===o.SEARCH,p=(0,a.$K)(l.dynamic)?!!l.dynamic:!!t.dynamic,M=(0,a.$K)(l.raw)?!!l.raw:!!t.raw,y=function(e,t,n){var o=e.squash;if(!t||!1===o)return!1;if(!(0,a.$K)(o)||null==o)return n;if(!0===o||(0,a.HD)(o))return o;throw new Error("Invalid squash policy: '"+o+"'. Valid policies: false, true, or arbitrary string")}(l,f,i.defaultSquashPolicy()),L=function(e,t,n,o){var i=[{from:"",to:n||t?void 0:""},{from:null,to:n||t?void 0:""}],d=(0,a.kJ)(e.replace)?e.replace:[];(0,a.HD)(o)&&d.push({from:o,to:void 0});var u=(0,r.UI)(d,(0,s.vg)("from"));return(0,r.hX)(i,(function(e){return-1===u.indexOf(e.from)})).concat(d)}(l,h,f,y),g=(0,a.$K)(l.inherit)?!!l.inherit:!!t.inherit;(0,r.l7)(this,{id:e,type:t,location:n,isOptional:f,dynamic:p,raw:M,squash:y,replace:L,inherit:g,array:h,config:l})}return e.values=function(e,t){void 0===t&&(t={});for(var n={},o=0,r=e;o{"use strict";n.d(t,{_:()=>s});var o=n("./node_modules/@uirouter/core/lib-esm/common/common.js"),r=n("./node_modules/@uirouter/core/lib-esm/common/predicates.js"),s=function(){function e(e){this.pattern=/.*/,this.inherit=!0,(0,o.l7)(this,e)}return e.prototype.is=function(e,t){return!0},e.prototype.encode=function(e,t){return e},e.prototype.decode=function(e,t){return e},e.prototype.equals=function(e,t){return e==t},e.prototype.$subPattern=function(){var e=this.pattern.toString();return e.substr(1,e.length-2)},e.prototype.toString=function(){return"{ParamType:"+this.name+"}"},e.prototype.$normalize=function(e){return this.is(e)?e:this.decode(e)},e.prototype.$asArray=function(e,t){if(!e)return this;if("auto"===e&&!t)throw new Error("'auto' array mode is for query parameters only");return new a(this,e)},e}();function a(e,t){var n=this;function s(e){return(0,r.kJ)(e)?e:(0,r.$K)(e)?[e]:[]}function a(e,n){return function(a){if((0,r.kJ)(a)&&0===a.length)return a;var i=s(a),d=(0,o.UI)(i,e);return!0===n?0===(0,o.hX)(d,(function(e){return!e})).length:function(e){switch(e.length){case 0:return;case 1:return"auto"===t?e[0]:e;default:return e}}(d)}}function i(e){return function(t,n){var o=s(t),r=s(n);if(o.length!==r.length)return!1;for(var a=0;a{"use strict";n.d(t,{p:()=>u});var o,r=n("./node_modules/@uirouter/core/lib-esm/common/common.js"),s=n("./node_modules/@uirouter/core/lib-esm/common/predicates.js"),a=n("./node_modules/@uirouter/core/lib-esm/common/hof.js"),i=n("./node_modules/@uirouter/core/lib-esm/common/coreservices.js"),d=n("./node_modules/@uirouter/core/lib-esm/params/paramType.js"),u=function(){function e(){this.enqueue=!0,this.typeQueue=[],this.defaultTypes=(0,r.ei)(e.prototype,["hash","string","query","path","int","bool","date","json","any"]),this.types=(0,r.ED)((0,r.UI)(this.defaultTypes,(function(e,t){return new d._((0,r.l7)({name:t},e))})),{})}return e.prototype.dispose=function(){this.types={}},e.prototype.type=function(e,t,n){if(!(0,s.$K)(t))return this.types[e];if(this.types.hasOwnProperty(e))throw new Error("A type named '"+e+"' has already been defined.");return this.types[e]=new d._((0,r.l7)({name:e},t)),n&&(this.typeQueue.push({name:e,def:n}),this.enqueue||this._flushTypeQueue()),this},e.prototype._flushTypeQueue=function(){for(;this.typeQueue.length;){var e=this.typeQueue.shift();if(e.pattern)throw new Error("You cannot override a type's .pattern at runtime.");(0,r.l7)(this.types[e.name],i.u.$injector.invoke(e.def))}},e}();o=function(e){var t=function(e){return null!=e?e.toString():e},n={encode:t,decode:t,is:(0,a.is)(String),pattern:/.*/,equals:function(e,t){return e==t}};return(0,r.l7)({},n,e)},(0,r.l7)(u.prototype,{string:o({}),path:o({pattern:/[^/]*/}),query:o({}),hash:o({inherit:!1}),int:o({decode:function(e){return parseInt(e,10)},is:function(e){return!(0,s.le)(e)&&this.decode(e.toString())===e},pattern:/-?\d+/}),bool:o({encode:function(e){return e?1:0},decode:function(e){return 0!==parseInt(e,10)},is:(0,a.is)(Boolean),pattern:/0|1/}),date:o({encode:function(e){return this.is(e)?[e.getFullYear(),("0"+(e.getMonth()+1)).slice(-2),("0"+e.getDate()).slice(-2)].join("-"):void 0},decode:function(e){if(this.is(e))return e;var t=this.capture.exec(e);return t?new Date(t[1],t[2]-1,t[3]):void 0},is:function(e){return e instanceof Date&&!isNaN(e.valueOf())},equals:function(e,t){return["getFullYear","getMonth","getDate"].reduce((function(n,o){return n&&e[o]()===t[o]()}),!0)},pattern:/[0-9]{4}-(?:0[1-9]|1[0-2])-(?:0[1-9]|[1-2][0-9]|3[0-1])/,capture:/([0-9]{4})-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])/}),json:o({encode:r.Qs,decode:r.xZ,is:(0,a.is)(Object),equals:r.fS,pattern:/[^/]*/}),any:o({encode:r.yR,decode:r.yR,is:function(){return!0},equals:r.fS})})},"./node_modules/@uirouter/core/lib-esm/params/stateParams.js":(e,t,n)=>{"use strict";n.d(t,{i:()=>r});var o=n("./node_modules/@uirouter/core/lib-esm/common/common.js"),r=function(){function e(e){void 0===e&&(e={}),(0,o.l7)(this,e)}return e.prototype.$inherit=function(e,t,n){var r,s=(0,o.mX)(t,n),a={},i=[];for(var d in s)if(s[d]&&s[d].params&&(r=Object.keys(s[d].params)).length)for(var u in r)i.indexOf(r[u])>=0||(i.push(r[u]),a[r[u]]=this[r[u]]);return(0,o.l7)({},a,e)},e}()},"./node_modules/@uirouter/core/lib-esm/path/pathNode.js":(e,t,n)=>{"use strict";n.d(t,{V:()=>a});var o=n("./node_modules/@uirouter/core/lib-esm/common/common.js"),r=n("./node_modules/@uirouter/core/lib-esm/common/hof.js"),s=n("./node_modules/@uirouter/core/lib-esm/params/param.js"),a=function(){function e(t){if(t instanceof e){var n=t;this.state=n.state,this.paramSchema=n.paramSchema.slice(),this.paramValues=(0,o.l7)({},n.paramValues),this.resolvables=n.resolvables.slice(),this.views=n.views&&n.views.slice()}else{var r=t;this.state=r,this.paramSchema=r.parameters({inherit:!1}),this.paramValues={},this.resolvables=r.resolvables.map((function(e){return e.clone()}))}}return e.prototype.clone=function(){return new e(this)},e.prototype.applyRawParams=function(e){return this.paramValues=this.paramSchema.reduce((function(t,n){return(0,o.bb)(t,[(r=n).id,r.value(e[r.id])]);var r}),{}),this},e.prototype.parameter=function(e){return(0,o.sE)(this.paramSchema,(0,r.OH)("id",e))},e.prototype.equals=function(e,t){var n=this.diff(e,t);return n&&0===n.length},e.prototype.diff=function(e,t){if(this.state!==e.state)return!1;var n=t?t(this):this.paramSchema;return s.d.changed(n,this.paramValues,e.paramValues)},e.clone=function(e){return e.clone()},e}()},"./node_modules/@uirouter/core/lib-esm/path/pathUtils.js":(e,t,n)=>{"use strict";n.d(t,{C:()=>i});var o=n("./node_modules/@uirouter/core/lib-esm/common/common.js"),r=n("./node_modules/@uirouter/core/lib-esm/common/hof.js"),s=n("./node_modules/@uirouter/core/lib-esm/state/targetState.js"),a=n("./node_modules/@uirouter/core/lib-esm/path/pathNode.js"),i=function(){function e(){}return e.makeTargetState=function(e,t){var n=(0,o.Gb)(t).state;return new s.F(e,n,t.map((0,r.vg)("paramValues")).reduce(o.LQ,{}),{})},e.buildPath=function(e){var t=e.params();return e.$state().path.map((function(e){return new a.V(e).applyRawParams(t)}))},e.buildToPath=function(t,n){var o=e.buildPath(n);return n.options().inherit?e.inheritParams(t,o,Object.keys(n.params())):o},e.applyViewConfigs=function(t,n,r){n.filter((function(e){return(0,o.d3)(r,e.state)})).forEach((function(r){var s=(0,o.VO)(r.state.views||{}),a=e.subPath(n,(function(e){return e===r})),i=s.map((function(e){return t.createViewConfig(a,e)}));r.views=i.reduce(o.M7,[])}))},e.inheritParams=function(e,t,n){void 0===n&&(n=[]);var s=e.map((function(e){return e.paramSchema})).reduce(o.M7,[]).filter((function(e){return!e.inherit})).map((0,r.vg)("id"));return t.map((function(t){var i=(0,o.l7)({},t&&t.paramValues),d=(0,o.ei)(i,n);i=(0,o.CE)(i,n);var u,m,l,_=(0,o.CE)((u=e,m=t.state,l=(0,o.sE)(u,(0,r.OH)("state",m)),(0,o.l7)({},l&&l.paramValues)||{}),s),c=(0,o.l7)(i,_,d);return new a.V(t.state).applyRawParams(c)}))},e.treeChanges=function(t,n,o){for(var r,s,a,i,d,u,m=Math.min(t.length,n.length),l=0;l{"use strict";n.d(t,{u:()=>o});var o={when:{LAZY:"LAZY",EAGER:"EAGER"},async:{WAIT:"WAIT",NOWAIT:"NOWAIT"}}},"./node_modules/@uirouter/core/lib-esm/resolve/resolvable.js":(e,t,n)=>{"use strict";n.d(t,{X:()=>d});var o=n("./node_modules/@uirouter/core/lib-esm/common/common.js"),r=n("./node_modules/@uirouter/core/lib-esm/common/coreservices.js"),s=n("./node_modules/@uirouter/core/lib-esm/common/trace.js"),a=n("./node_modules/@uirouter/core/lib-esm/common/strings.js"),i=n("./node_modules/@uirouter/core/lib-esm/common/predicates.js"),d=function(){function e(t,n,s,a,d){if(this.resolved=!1,this.promise=void 0,t instanceof e)(0,o.l7)(this,t);else if((0,i.mf)(n)){if((0,i.le)(t))throw new Error("new Resolvable(): token argument is required");if(!(0,i.mf)(n))throw new Error("new Resolvable(): resolveFn argument must be a function");this.token=t,this.policy=a,this.resolveFn=n,this.deps=s||[],this.data=d,this.resolved=void 0!==d,this.promise=this.resolved?r.u.$q.when(this.data):void 0}else if((0,i.Kn)(t)&&t.token&&(t.hasOwnProperty("resolveFn")||t.hasOwnProperty("data"))){var u=t;return new e(u.token,u.resolveFn,u.deps,u.policy,u.data)}}return e.prototype.getPolicy=function(e){var t=this.policy||{},n=e&&e.resolvePolicy||{};return{when:t.when||n.when||"LAZY",async:t.async||n.async||"WAIT"}},e.prototype.resolve=function(e,t){var n=this,a=r.u.$q,d=e.findNode(this),u=d&&d.state,m=this.getPolicy(u).async,l=(0,i.mf)(m)?m:o.yR;return this.promise=a.when().then((function(){return a.all(e.getDependencies(n).map((function(n){return n.get(e,t)})))})).then((function(e){return n.resolveFn.apply(null,e)})).then(l).then((function(e){return n.data=e,n.resolved=!0,n.resolveFn=null,s.g4.traceResolvableResolved(n,t),n.data}))},e.prototype.get=function(e,t){return this.promise||this.resolve(e,t)},e.prototype.toString=function(){return"Resolvable(token: "+(0,a.Pz)(this.token)+", requires: ["+this.deps.map(a.Pz)+"])"},e.prototype.clone=function(){return new e(this)},e.fromData=function(t,n){return new e(t,(function(){return n}),null,null,n)},e}()},"./node_modules/@uirouter/core/lib-esm/resolve/resolveContext.js":(e,t,n)=>{"use strict";n.d(t,{l:()=>f});var o=n("./node_modules/@uirouter/core/lib-esm/common/common.js"),r=n("./node_modules/@uirouter/core/lib-esm/common/hof.js"),s=n("./node_modules/@uirouter/core/lib-esm/common/trace.js"),a=n("./node_modules/@uirouter/core/lib-esm/common/coreservices.js"),i=n("./node_modules/@uirouter/core/lib-esm/resolve/interface.js"),d=n("./node_modules/@uirouter/core/lib-esm/resolve/resolvable.js"),u=n("./node_modules/@uirouter/core/lib-esm/path/pathUtils.js"),m=n("./node_modules/@uirouter/core/lib-esm/common/strings.js"),l=n("./node_modules/@uirouter/core/lib-esm/common/index.js"),_=i.u.when,c=[_.EAGER,_.LAZY],h=[_.EAGER],f=function(){function e(e){this._path=e}return e.prototype.getTokens=function(){return this._path.reduce((function(e,t){return e.concat(t.resolvables.map((function(e){return e.token})))}),[]).reduce(o.v_,[])},e.prototype.getResolvable=function(e){var t=this._path.map((function(e){return e.resolvables})).reduce(o.M7,[]).filter((function(t){return t.token===e}));return(0,o.Gb)(t)},e.prototype.getPolicy=function(e){var t=this.findNode(e);return e.getPolicy(t.state)},e.prototype.subContext=function(t){return new e(u.C.subPath(this._path,(function(e){return e.state===t})))},e.prototype.addResolvables=function(e,t){var n=(0,o.sE)(this._path,(0,r.OH)("state",t)),s=e.map((function(e){return e.token}));n.resolvables=n.resolvables.filter((function(e){return-1===s.indexOf(e.token)})).concat(e)},e.prototype.resolvePath=function(e,t){var n=this;void 0===e&&(e="LAZY");var d=((0,o.d3)(c,e)?e:"LAZY")===i.u.when.EAGER?h:c;s.g4.traceResolvePath(this._path,e,t);var u=function(e,t){return function(r){return(0,o.d3)(e,n.getPolicy(r)[t])}},m=this._path.reduce((function(e,o){var s=o.resolvables.filter(u(d,"when")),a=s.filter(u(["NOWAIT"],"async")),i=s.filter((0,r.ff)(u(["NOWAIT"],"async"))),m=n.subContext(o.state),l=function(e){return e.get(m,t).then((function(t){return{token:e.token,value:t}}))};return a.forEach(l),e.concat(i.map(l))}),[]);return a.u.$q.all(m)},e.prototype.injector=function(){return this._injector||(this._injector=new p(this))},e.prototype.findNode=function(e){return(0,o.sE)(this._path,(function(t){return(0,o.d3)(t.resolvables,e)}))},e.prototype.getDependencies=function(e){var t=this,n=this.findNode(e),r=(u.C.subPath(this._path,(function(e){return e===n}))||this._path).reduce((function(e,t){return e.concat(t.resolvables)}),[]).filter((function(t){return t!==e}));return e.deps.map((function(e){var n=r.filter((function(t){return t.token===e}));if(n.length)return(0,o.Gb)(n);var s=t.injector().getNative(e);if((0,l.wV)(s))throw new Error("Could not find Dependency Injection token: "+(0,m.Pz)(e));return new d.X(e,(function(){return s}),[],s)}))},e}(),p=function(){function e(e){this.context=e,this.native=this.get("Native Injector")||a.u.$injector}return e.prototype.get=function(e){var t=this.context.getResolvable(e);if(t){if("NOWAIT"===this.context.getPolicy(t).async)return t.get(this.context);if(!t.resolved)throw new Error("Resolvable async .get() not complete:"+(0,m.Pz)(t.token));return t.data}return this.getNative(e)},e.prototype.getAsync=function(e){var t=this.context.getResolvable(e);return t?t.get(this.context):a.u.$q.when(this.native.get(e))},e.prototype.getNative=function(e){return this.native&&this.native.get(e)},e}()},"./node_modules/@uirouter/core/lib-esm/router.js":(e,t,n)=>{"use strict";n.d(t,{a:()=>y});var o=n("./node_modules/@uirouter/core/lib-esm/url/urlMatcherFactory.js"),r=n("./node_modules/@uirouter/core/lib-esm/url/urlRouter.js"),s=n("./node_modules/@uirouter/core/lib-esm/transition/transitionService.js"),a=n("./node_modules/@uirouter/core/lib-esm/view/view.js"),i=n("./node_modules/@uirouter/core/lib-esm/state/stateRegistry.js"),d=n("./node_modules/@uirouter/core/lib-esm/state/stateService.js"),u=n("./node_modules/@uirouter/core/lib-esm/globals.js"),m=n("./node_modules/@uirouter/core/lib-esm/common/common.js"),l=n("./node_modules/@uirouter/core/lib-esm/common/predicates.js"),_=n("./node_modules/@uirouter/core/lib-esm/url/urlService.js"),c=n("./node_modules/@uirouter/core/lib-esm/common/trace.js"),h=n("./node_modules/@uirouter/core/lib-esm/common/index.js"),f=0,p=(0,h.HV)("LocationServices",["url","path","search","hash","onChange"]),M=(0,h.HV)("LocationConfig",["port","protocol","host","baseHref","html5Mode","hashPrefix"]),y=function(){function e(e,t){void 0===e&&(e=p),void 0===t&&(t=M),this.locationService=e,this.locationConfig=t,this.$id=f++,this._disposed=!1,this._disposables=[],this.trace=c.g4,this.viewService=new a.s(this),this.globals=new u.k,this.transitionService=new s.Z(this),this.urlMatcherFactory=new o.y(this),this.urlRouter=new r.g(this),this.urlService=new _.i(this),this.stateRegistry=new i.q(this),this.stateService=new d.b(this),this._plugins={},this.viewService._pluginapi._rootViewContext(this.stateRegistry.root()),this.globals.$current=this.stateRegistry.root(),this.globals.current=this.globals.$current.self,this.disposable(this.globals),this.disposable(this.stateService),this.disposable(this.stateRegistry),this.disposable(this.transitionService),this.disposable(this.urlService),this.disposable(e),this.disposable(t)}return e.prototype.disposable=function(e){this._disposables.push(e)},e.prototype.dispose=function(e){var t=this;e&&(0,l.mf)(e.dispose)?e.dispose(this):(this._disposed=!0,this._disposables.slice().forEach((function(e){try{"function"==typeof e.dispose&&e.dispose(t),(0,m.nA)(t._disposables,e)}catch(e){}})))},e.prototype.plugin=function(e,t){void 0===t&&(t={});var n=new e(this,t);if(!n.name)throw new Error("Required property `name` missing on plugin: "+n);return this._disposables.push(n),this._plugins[n.name]=n},e.prototype.getPlugin=function(e){return e?this._plugins[e]:(0,m.VO)(this._plugins)},e}()},"./node_modules/@uirouter/core/lib-esm/state/interface.js":()=>{},"./node_modules/@uirouter/core/lib-esm/state/stateBuilder.js":(e,t,n)=>{"use strict";n.d(t,{t:()=>M});var o=n("./node_modules/@uirouter/core/lib-esm/common/common.js"),r=n("./node_modules/@uirouter/core/lib-esm/common/predicates.js"),s=n("./node_modules/@uirouter/core/lib-esm/common/strings.js"),a=n("./node_modules/@uirouter/core/lib-esm/common/hof.js"),i=n("./node_modules/@uirouter/core/lib-esm/resolve/resolvable.js"),d=n("./node_modules/@uirouter/core/lib-esm/common/coreservices.js");function u(e){return e.name}function m(e){return e.self.$$state=function(){return e},e.self}function l(e){return e.parent&&e.parent.data&&(e.data=e.self.data=(0,o.ED)(e.parent.data,e.data)),e.data}var _=function(e,t){return function(n){var s=n.self;if(s&&s.url&&s.name&&s.name.match(/\.\*\*$/)){var a={};(0,o.JG)(s,a),a.url+="{remainder:any}",s=a}var i=n.parent,d=function(e){if(!(0,r.HD)(e))return!1;var t="^"===e.charAt(0);return{val:t?e.substring(1):e,root:t}}(s.url),u=d?e.compile(d.val,{state:s}):s.url;if(!u)return null;if(!e.isMatcher(u))throw new Error("Invalid url '"+u+"' in state '"+n+"'");return d&&d.root?u:(i&&i.navigable||t()).url.append(u)}},c=function(e){return function(t){return!e(t)&&t.url?t:t.parent?t.parent.navigable:null}};function h(e){return e.parent?e.parent.path.concat(e):[e]}function f(e){var t=e.parent?(0,o.l7)({},e.parent.includes):{};return t[e.name]=!0,t}function p(e){var t,n,u=function(e){return e.provide||e.token},m=(0,a.uj)([[(0,a.vg)("resolveFn"),function(e){return new i.X(u(e),e.resolveFn,e.deps,e.policy)}],[(0,a.vg)("useFactory"),function(e){return new i.X(u(e),e.useFactory,e.deps||e.dependencies,e.policy)}],[(0,a.vg)("useClass"),function(e){return new i.X(u(e),(function(){return new e.useClass}),[],e.policy)}],[(0,a.vg)("useValue"),function(e){return new i.X(u(e),(function(){return e.useValue}),[],e.policy,e.useValue)}],[(0,a.vg)("useExisting"),function(e){return new i.X(u(e),o.yR,[e.useExisting],e.policy)}]]),l=(0,a.uj)([[(0,a.zG)((0,a.vg)("val"),r.HD),function(e){return new i.X(e.token,o.yR,[e.val],e.policy)}],[(0,a.zG)((0,a.vg)("val"),r.kJ),function(e){return new i.X(e.token,(0,o.Gb)(e.val),e.val.slice(0,-1),e.policy)}],[(0,a.zG)((0,a.vg)("val"),r.mf),function(e){return new i.X(e.token,e.val,(t=e.val,n=d.u.$injector,t.$inject||n&&n.annotate(t,n.strictDi)||"deferred"),e.policy);var t,n}]]),_=(0,a.uj)([[(0,a.is)(i.X),function(e){return e}],[function(e){return!(!e.token||!e.resolveFn)},m],[function(e){return!(!e.provide&&!e.token||!(e.useValue||e.useFactory||e.useExisting||e.useClass))},m],[function(e){return!!(e&&e.val&&((0,r.HD)(e.val)||(0,r.kJ)(e.val)||(0,r.mf)(e.val)))},l],[(0,a.P0)(!0),function(e){throw new Error("Invalid resolve value: "+(0,s.Pz)(e))}]]),c=e.resolve;return((0,r.kJ)(c)?c:(t=c,n=e.resolvePolicy||{},Object.keys(t||{}).map((function(e){return{token:e,val:t[e],deps:void 0,policy:n[e]}})))).map(_)}var M=function(){function e(e,t){this.matcher=e;var n,r=this,s=function(){return e.find("")},i=function(e){return""===e.name};this.builders={name:[u],self:[m],parent:[function(t){return i(t)?null:e.find(r.parentName(t))||s()}],data:[l],url:[_(t,s)],navigable:[c(i)],params:[(n=t.paramFactory,function(e){var t=e.url&&e.url.parameters({inherit:!1})||[],r=(0,o.VO)((0,o.js)((0,o.CE)(e.params||{},t.map((0,a.vg)("id"))),(function(t,o){return n.fromConfig(o,null,e.self)})));return t.concat(r).map((function(e){return[e.id,e]})).reduce(o.bb,{})})],views:[],path:[h],includes:[f],resolvables:[p]}}return e.prototype.builder=function(e,t){var n=this.builders,o=n[e]||[];return(0,r.HD)(e)&&!(0,r.$K)(t)?o.length>1?o:o[0]:(0,r.HD)(e)&&(0,r.mf)(t)?(n[e]=o,n[e].push(t),function(){return n[e].splice(n[e].indexOf(t,1))&&null}):void 0},e.prototype.build=function(e){var t=this.matcher,n=this.builders,r=this.parentName(e);if(r&&!t.find(r,void 0,!1))return null;for(var s in n)if(n.hasOwnProperty(s)){var a=n[s].reduce((function(e,t){return function(n){return t(n,e)}}),o.ZT);e[s]=a(e)}return e},e.prototype.parentName=function(e){var t=e.name||"",n=t.split(".");if("**"===n.pop()&&n.pop(),n.length){if(e.parent)throw new Error("States that specify the 'parent:' property should not have a '.' in their name ("+t+")");return n.join(".")}return e.parent?(0,r.HD)(e.parent)?e.parent:e.parent.name:""},e.prototype.name=function(e){var t=e.name;if(-1!==t.indexOf(".")||!e.parent)return t;var n=(0,r.HD)(e.parent)?e.parent:e.parent.name;return n?n+"."+t:t},e}()},"./node_modules/@uirouter/core/lib-esm/state/stateMatcher.js":(e,t,n)=>{"use strict";n.d(t,{Q:()=>a});var o=n("./node_modules/@uirouter/core/lib-esm/common/predicates.js"),r=n("./node_modules/@uirouter/core/lib-esm/common/common.js"),s=n("./node_modules/@uirouter/core/lib-esm/common/safeConsole.js"),a=function(){function e(e){this._states=e}return e.prototype.isRelative=function(e){return 0===(e=e||"").indexOf(".")||0===e.indexOf("^")},e.prototype.find=function(e,t,n){if(void 0===n&&(n=!0),e||""===e){var a=(0,o.HD)(e),i=a?e:e.name;this.isRelative(i)&&(i=this.resolvePath(i,t));var d=this._states[i];if(d&&(a||!(a||d!==e&&d.self!==e)))return d;if(a&&n){var u=(0,r.VO)(this._states).filter((function(e){return e.__stateObjectCache.nameGlob&&e.__stateObjectCache.nameGlob.matches(i)}));return u.length>1&&s.L.error("stateMatcher.find: Found multiple matches for "+i+" using glob: ",u.map((function(e){return e.name}))),u[0]}}},e.prototype.resolvePath=function(e,t){if(!t)throw new Error("No reference point given for path '"+e+"'");for(var n=this.find(t),o=e.split("."),r=o.length,s=0,a=n;s{"use strict";n.d(t,{l:()=>i});var o=n("./node_modules/@uirouter/core/lib-esm/common/common.js"),r=n("./node_modules/@uirouter/core/lib-esm/common/hof.js"),s=n("./node_modules/@uirouter/core/lib-esm/common/glob.js"),a=n("./node_modules/@uirouter/core/lib-esm/common/predicates.js"),i=function(){function e(t){return e.create(t||{})}return e.create=function(t){t=e.isStateClass(t)?new t:t;var n=(0,o.ED)((0,o.ED)(t,e.prototype));return t.$$state=function(){return n},n.self=t,n.__stateObjectCache={nameGlob:s.r.fromString(n.name)},n},e.prototype.is=function(e){return this===e||this.self===e||this.fqn()===e},e.prototype.fqn=function(){if(!(this.parent&&this.parent instanceof this.constructor))return this.name;var e=this.parent.fqn();return e?e+"."+this.name:this.name},e.prototype.root=function(){return this.parent&&this.parent.root()||this},e.prototype.parameters=function(e){return((e=(0,o.ce)(e,{inherit:!0,matchingKeys:null})).inherit&&this.parent&&this.parent.parameters()||[]).concat((0,o.VO)(this.params)).filter((function(t){return!e.matchingKeys||e.matchingKeys.hasOwnProperty(t.id)}))},e.prototype.parameter=function(e,t){return void 0===t&&(t={}),this.url&&this.url.parameter(e,t)||(0,o.sE)((0,o.VO)(this.params),(0,r.OH)("id",e))||t.inherit&&this.parent&&this.parent.parameter(e)},e.prototype.toString=function(){return this.fqn()},e.isStateClass=function(e){return(0,a.mf)(e)&&!0===e.__uiRouterState},e.isStateDeclaration=function(e){return(0,a.mf)(e.$$state)},e.isState=function(e){return(0,a.Kn)(e.__stateObjectCache)},e}()},"./node_modules/@uirouter/core/lib-esm/state/stateQueueManager.js":(e,t,n)=>{"use strict";n.d(t,{L:()=>s});var o=n("./node_modules/@uirouter/core/lib-esm/common/index.js"),r=n("./node_modules/@uirouter/core/lib-esm/state/stateObject.js"),s=function(){function e(e,t,n,o){this.router=e,this.states=t,this.builder=n,this.listeners=o,this.queue=[]}return e.prototype.dispose=function(){this.queue=[]},e.prototype.register=function(e){var t=this.queue,n=r.l.create(e),s=n.name;if(!(0,o.HD)(s))throw new Error("State must have a valid name");if(this.states.hasOwnProperty(s)||(0,o.d3)(t.map((0,o.vg)("name")),s))throw new Error("State '"+s+"' is already defined");return t.push(n),this.flush(),n},e.prototype.flush=function(){for(var e=this,t=this,n=t.queue,o=t.states,r=t.builder,s=[],a=[],i={},d=function(t){return e.states.hasOwnProperty(t)&&e.states[t]},u=function(){s.length&&e.listeners.forEach((function(e){return e("registered",s.map((function(e){return e.self})))}))};n.length>0;){var m=n.shift(),l=m.name,_=r.build(m),c=a.indexOf(m);if(_){var h=d(l);if(h&&h.name===l)throw new Error("State '"+l+"' is already defined");var f=d(l+".**");f&&this.router.stateRegistry.deregister(f),o[l]=m,this.attachRoute(m),c>=0&&a.splice(c,1),s.push(m)}else{var p=i[l];if(i[l]=n.length,c>=0&&p===n.length)return n.push(m),u(),o;c<0&&a.push(m),n.push(m)}}return u(),o},e.prototype.attachRoute=function(e){if(!e.abstract&&e.url){var t=this.router.urlService.rules;t.rule(t.urlRuleFactory.create(e))}},e}()},"./node_modules/@uirouter/core/lib-esm/state/stateRegistry.js":(e,t,n)=>{"use strict";n.d(t,{q:()=>d});var o=n("./node_modules/@uirouter/core/lib-esm/state/stateMatcher.js"),r=n("./node_modules/@uirouter/core/lib-esm/state/stateBuilder.js"),s=n("./node_modules/@uirouter/core/lib-esm/state/stateQueueManager.js"),a=n("./node_modules/@uirouter/core/lib-esm/common/common.js"),i=n("./node_modules/@uirouter/core/lib-esm/common/hof.js"),d=function(){function e(e){this.router=e,this.states={},this.listeners=[],this.matcher=new o.Q(this.states),this.builder=new r.t(this.matcher,e.urlMatcherFactory),this.stateQueue=new s.L(e,this.states,this.builder,this.listeners),this._registerRoot()}return e.prototype._registerRoot=function(){(this._root=this.stateQueue.register({name:"",url:"^",views:null,params:{"#":{value:null,type:"hash",dynamic:!0}},abstract:!0})).navigable=null},e.prototype.dispose=function(){var e=this;this.stateQueue.dispose(),this.listeners=[],this.get().forEach((function(t){return e.get(t)&&e.deregister(t)}))},e.prototype.onStatesChanged=function(e){return this.listeners.push(e),function(){(0,a.nA)(this.listeners)(e)}.bind(this)},e.prototype.root=function(){return this._root},e.prototype.register=function(e){return this.stateQueue.register(e)},e.prototype._deregisterTree=function(e){var t=this,n=this.get().map((function(e){return e.$$state()})),o=function(e){var t=n.filter((function(t){return-1!==e.indexOf(t.parent)}));return 0===t.length?t:t.concat(o(t))},r=o([e]),s=[e].concat(r).reverse();return s.forEach((function(e){var n=t.router.urlService.rules;n.rules().filter((0,i.OH)("state",e)).forEach((function(e){return n.removeRule(e)})),delete t.states[e.name]})),s},e.prototype.deregister=function(e){var t=this.get(e);if(!t)throw new Error("Can't deregister state; not found: "+e);var n=this._deregisterTree(t.$$state());return this.listeners.forEach((function(e){return e("deregistered",n.map((function(e){return e.self})))})),n},e.prototype.get=function(e,t){var n=this;if(0===arguments.length)return Object.keys(this.states).map((function(e){return n.states[e].self}));var o=this.matcher.find(e,t);return o&&o.self||null},e.prototype.decorator=function(e,t){return this.builder.builder(e,t)},e}()},"./node_modules/@uirouter/core/lib-esm/state/targetState.js":(e,t,n)=>{"use strict";n.d(t,{F:()=>a});var o=n("./node_modules/@uirouter/core/lib-esm/common/predicates.js"),r=n("./node_modules/@uirouter/core/lib-esm/common/strings.js"),s=n("./node_modules/@uirouter/core/lib-esm/common/index.js"),a=function(){function e(e,t,n,o){this._stateRegistry=e,this._identifier=t,this._identifier=t,this._params=(0,s.l7)({},n||{}),this._options=(0,s.l7)({},o||{}),this._definition=e.matcher.find(t,this._options.relative)}return e.prototype.name=function(){return this._definition&&this._definition.name||this._identifier},e.prototype.identifier=function(){return this._identifier},e.prototype.params=function(){return this._params},e.prototype.$state=function(){return this._definition},e.prototype.state=function(){return this._definition&&this._definition.self},e.prototype.options=function(){return this._options},e.prototype.exists=function(){return!(!this._definition||!this._definition.self)},e.prototype.valid=function(){return!this.error()},e.prototype.error=function(){var e=this.options().relative;if(!this._definition&&e){var t=e.name?e.name:e;return"Could not resolve '"+this.name()+"' from state '"+t+"'"}return this._definition?this._definition.self?void 0:"State '"+this.name()+"' has an invalid definition":"No such state '"+this.name()+"'"},e.prototype.toString=function(){return"'"+this.name()+"'"+(0,r.Pz)(this.params())},e.prototype.withState=function(t){return new e(this._stateRegistry,t,this._params,this._options)},e.prototype.withParams=function(t,n){void 0===n&&(n=!1);var o=n?t:(0,s.l7)({},this._params,t);return new e(this._stateRegistry,this._identifier,o,this._options)},e.prototype.withOptions=function(t,n){void 0===n&&(n=!1);var o=n?t:(0,s.l7)({},this._options,t);return new e(this._stateRegistry,this._identifier,this._params,o)},e.isDef=function(e){return e&&e.state&&((0,o.HD)(e.state)||(0,o.Kn)(e.state)&&(0,o.HD)(e.state.name))},e}()},"./node_modules/@uirouter/core/lib-esm/transition/hookBuilder.js":(e,t,n)=>{"use strict";n.d(t,{A:()=>i});var o=n("./node_modules/@uirouter/core/lib-esm/common/common.js"),r=n("./node_modules/@uirouter/core/lib-esm/common/predicates.js"),s=n("./node_modules/@uirouter/core/lib-esm/transition/interface.js"),a=n("./node_modules/@uirouter/core/lib-esm/transition/transitionHook.js"),i=function(){function e(e){this.transition=e}return e.prototype.buildHooksForPhase=function(e){var t=this;return this.transition.router.transitionService._pluginapi._getEvents(e).map((function(e){return t.buildHooks(e)})).reduce(o.M7,[]).filter(o.yR)},e.prototype.buildHooks=function(e){var t=this.transition,n=t.treeChanges(),r=this.getMatchingHooks(e,n,t);if(!r)return[];var i,d={transition:t,current:t.options().current};return r.map((function(r){return r.matches(n,t)[e.criteriaMatchPath.name].map((function(n){var i=(0,o.l7)({bind:r.bind,traceData:{hookType:e.name,context:n}},d),u=e.criteriaMatchPath.scope===s.c.STATE?n.state.self:null,m=new a.I(t,u,r,i);return{hook:r,node:n,transitionHook:m}}))})).reduce(o.M7,[]).sort((i=e.reverseSort,void 0===i&&(i=!1),function(e,t){var n=i?-1:1,o=(e.node.state.path.length-t.node.state.path.length)*n;return 0!==o?o:t.hook.priority-e.hook.priority})).map((function(e){return e.transitionHook}))},e.prototype.getMatchingHooks=function(e,t,n){var a=e.hookPhase===s.k.CREATE,i=this.transition.router.transitionService;return(a?[i]:[this.transition,i]).map((function(t){return t.getHooks(e.name)})).filter((0,o.sp)(r.kJ,"broken event named: "+e.name)).reduce(o.M7,[]).filter((function(e){return e.matches(t,n)}))},e}()},"./node_modules/@uirouter/core/lib-esm/transition/hookRegistry.js":(e,t,n)=>{"use strict";n.d(t,{cN:()=>s,BU:()=>i});var o=n("./node_modules/@uirouter/core/lib-esm/common/index.js"),r=n("./node_modules/@uirouter/core/lib-esm/transition/interface.js");function s(e,t,n){var r=(0,o.HD)(t)?[t]:t;return!!((0,o.mf)(r)?r:function(e){for(var t=r,n=0;n{"use strict";var o,r;n.d(t,{k:()=>o,c:()=>r}),function(e){e[e.CREATE=0]="CREATE",e[e.BEFORE=1]="BEFORE",e[e.RUN=2]="RUN",e[e.SUCCESS=3]="SUCCESS",e[e.ERROR=4]="ERROR"}(o||(o={})),function(e){e[e.TRANSITION=0]="TRANSITION",e[e.STATE=1]="STATE"}(r||(r={}))},"./node_modules/@uirouter/core/lib-esm/transition/rejectFactory.js":(e,t,n)=>{"use strict";n.d(t,{K:()=>o,i:()=>d});var o,r=n("./node_modules/@uirouter/core/lib-esm/common/common.js"),s=n("./node_modules/@uirouter/core/lib-esm/common/strings.js"),a=n("./node_modules/@uirouter/core/lib-esm/common/hof.js");!function(e){e[e.SUPERSEDED=2]="SUPERSEDED",e[e.ABORTED=3]="ABORTED",e[e.INVALID=4]="INVALID",e[e.IGNORED=5]="IGNORED",e[e.ERROR=6]="ERROR"}(o||(o={}));var i=0,d=function(){function e(e,t,n){this.$id=i++,this.type=e,this.message=t,this.detail=n}return e.isRejectionPromise=function(t){return t&&"function"==typeof t.then&&(0,a.is)(e)(t._transitionRejection)},e.superseded=function(t,n){var r=new e(o.SUPERSEDED,"The transition has been superseded by a different transition",t);return n&&n.redirected&&(r.redirected=!0),r},e.redirected=function(t){return e.superseded(t,{redirected:!0})},e.invalid=function(t){return new e(o.INVALID,"This transition is invalid",t)},e.ignored=function(t){return new e(o.IGNORED,"The transition was ignored",t)},e.aborted=function(t){return new e(o.ABORTED,"The transition has been aborted",t)},e.errored=function(t){return new e(o.ERROR,"The transition errored",t)},e.normalize=function(t){return(0,a.is)(e)(t)?t:e.errored(t)},e.prototype.toString=function(){var e,t=(e=this.detail)&&e.toString!==Object.prototype.toString?e.toString():(0,s.Pz)(e),n=this;return"Transition Rejection($id: "+n.$id+" type: "+n.type+", message: "+n.message+", detail: "+t+")"},e.prototype.toPromise=function(){return(0,r.l7)((0,r.jv)(this),{_transitionRejection:this})},e}()},"./node_modules/@uirouter/core/lib-esm/transition/transitionEventType.js":(e,t,n)=>{"use strict";n.d(t,{t:()=>r});var o=n("./node_modules/@uirouter/core/lib-esm/transition/transitionHook.js"),r=function(e,t,n,r,s,a,i,d){void 0===s&&(s=!1),void 0===a&&(a=o.I.HANDLE_RESULT),void 0===i&&(i=o.I.REJECT_ERROR),void 0===d&&(d=!1),this.name=e,this.hookPhase=t,this.hookOrder=n,this.criteriaMatchPath=r,this.reverseSort=s,this.getResultHandler=a,this.getErrorHandler=i,this.synchronous=d}},"./node_modules/@uirouter/core/lib-esm/transition/transitionHook.js":(e,t,n)=>{"use strict";n.d(t,{I:()=>c});var o=n("./node_modules/@uirouter/core/lib-esm/transition/interface.js"),r=n("./node_modules/@uirouter/core/lib-esm/common/common.js"),s=n("./node_modules/@uirouter/core/lib-esm/common/strings.js"),a=n("./node_modules/@uirouter/core/lib-esm/common/predicates.js"),i=n("./node_modules/@uirouter/core/lib-esm/common/hof.js"),d=n("./node_modules/@uirouter/core/lib-esm/common/trace.js"),u=n("./node_modules/@uirouter/core/lib-esm/common/coreservices.js"),m=n("./node_modules/@uirouter/core/lib-esm/transition/rejectFactory.js"),l=n("./node_modules/@uirouter/core/lib-esm/state/targetState.js"),_={current:r.ZT,transition:null,traceData:{},bind:null},c=function(){function e(e,t,n,s){var a=this;this.transition=e,this.stateContext=t,this.registeredHook=n,this.options=s,this.isSuperseded=function(){return a.type.hookPhase===o.k.RUN&&!a.options.transition.isActive()},this.options=(0,r.ce)(s,_),this.type=n.eventType}return e.chain=function(e,t){return e.reduce((function(e,t){return e.then((function(){return t.invokeHook()}))}),t||u.u.$q.when())},e.invokeHooks=function(t,n){for(var o=0;o=t.invokeLimit&&t.deregister()}}},e.prototype.handleHookResult=function(e){var t=this;return this.getNotCurrentRejection()||((0,a.tI)(e)?e.then((function(e){return t.handleHookResult(e)})):(d.g4.traceHookResult(e,this.transition,this.options),!1===e?m.i.aborted("Hook aborted transition").toPromise():(0,i.is)(l.F)(e)?m.i.redirected(e).toPromise():void 0))},e.prototype.getNotCurrentRejection=function(){var e=this.transition.router;return e._disposed?m.i.aborted("UIRouter instance #"+e.$id+" has been stopped (disposed)").toPromise():this.transition._aborted?m.i.aborted().toPromise():this.isSuperseded()?m.i.superseded(this.options.current()).toPromise():void 0},e.prototype.toString=function(){var e=this.options,t=this.registeredHook,n=(0,i.Qc)("traceData.hookType")(e)||"internal",o=(0,i.Qc)("traceData.context.state.name")(e)||(0,i.Qc)("traceData.context")(e)||"unknown",r=(0,s.iC)(t.callback);return n+" context: "+o+", "+(0,s.BS)(200,r)},e.HANDLE_RESULT=function(e){return function(t){return e.handleHookResult(t)}},e.LOG_REJECTED_RESULT=function(e){return function(t){(0,a.tI)(t)&&t.catch((function(t){return e.logError(m.i.normalize(t))}))}},e.LOG_ERROR=function(e){return function(t){return e.logError(t)}},e.REJECT_ERROR=function(e){return function(e){return(0,r.jv)(e)}},e.THROW_ERROR=function(e){return function(e){throw e}},e}()},"./node_modules/@uirouter/core/lib-esm/transition/transitionService.js":(e,t,n)=>{"use strict";n.d(t,{Z:()=>C,q:()=>W});var o=n("./node_modules/@uirouter/core/lib-esm/transition/interface.js"),r=n("./node_modules/@uirouter/core/lib-esm/transition/transition.js"),s=n("./node_modules/@uirouter/core/lib-esm/transition/hookRegistry.js"),a=n("./node_modules/@uirouter/core/lib-esm/router.js"),i=n("./node_modules/@uirouter/core/lib-esm/resolve/index.js"),d=n("./node_modules/@uirouter/core/lib-esm/common/index.js");function u(e){e.addResolvable(i.XU.fromData(a.a,e.router),""),e.addResolvable(i.XU.fromData(r.u,e),""),e.addResolvable(i.XU.fromData("$transition$",e),""),e.addResolvable(i.XU.fromData("$stateParams",e.params()),""),e.entering().forEach((function(t){e.addResolvable(i.XU.fromData("$state$",t),t)}))}var m=["$transition$",r.u],l=(0,d.d3)(m),_=function(e){var t=(0,d.VO)(e.treeChanges()).reduce(d.M7,[]).reduce(d.v_,[]),n=function(e){return l(e.token)?i.XU.fromData(e.token,null):e};t.forEach((function(e){e.resolvables=e.resolvables.map(n)}))},c=n("./node_modules/@uirouter/core/lib-esm/common/predicates.js"),h=n("./node_modules/@uirouter/core/lib-esm/common/coreservices.js"),f=n("./node_modules/@uirouter/core/lib-esm/state/targetState.js"),p=function(e){var t=e.to().redirectTo;if(t){var n=e.router.stateService;return(0,c.mf)(t)?h.u.$q.when(t(e)).then(o):o(t)}function o(t){if(t)return t instanceof f.F?t:(0,c.HD)(t)?n.target(t,e.params(),e.options()):t.state||t.params?n.target(t.state||e.to(),t.params||e.params(),e.options()):void 0}};function M(e){return function(t,n){return(0,n.$$state()[e])(t,n)}}var y=M("onExit"),L=M("onRetain"),g=M("onEnter"),Y=n("./node_modules/@uirouter/core/lib-esm/common/common.js"),v=n("./node_modules/@uirouter/core/lib-esm/resolve/resolveContext.js"),k=n("./node_modules/@uirouter/core/lib-esm/common/hof.js"),j=1e3,w=function(e){return new v.l(e.treeChanges().to).resolvePath("EAGER",e).then(Y.ZT)},b=function(e,t){return new v.l(e.treeChanges().to).subContext(t.$$state()).resolvePath("LAZY",e).then(Y.ZT)},D=function(e){return new v.l(e.treeChanges().to).resolvePath("LAZY",e).then(Y.ZT)},T=function(e){var t=h.u.$q,n=e.views("entering");if(n.length)return t.all(n.map((function(e){return t.when(e.load())}))).then(Y.ZT)},S=function(e){var t=e.views("entering"),n=e.views("exiting");if(t.length||n.length){var o=e.router.viewService;n.forEach((function(e){return o.deactivateViewConfig(e)})),t.forEach((function(e){return o.activateViewConfig(e)})),o.sync()}},H=function(e){var t=e.router.globals,n=function(){t.transition===e&&(t.transition=null)};e.onSuccess({},(function(){t.successfulTransitions.enqueue(e),t.$current=e.$to(),t.current=t.$current.self,(0,Y.JG)(e.params(),t.params)}),{priority:1e4}),e.promise.then(n,n)},x=function(e){var t=e.options(),n=e.router.stateService,o=e.router.urlRouter;if("url"!==t.source&&t.location&&n.$current.navigable){var r={replace:"replace"===t.location};o.push(n.$current.navigable.url,n.params,r)}o.update(!0)},E=n("./node_modules/@uirouter/core/lib-esm/hooks/lazyLoad.js"),P=n("./node_modules/@uirouter/core/lib-esm/transition/transitionEventType.js"),O=n("./node_modules/@uirouter/core/lib-esm/transition/transitionHook.js"),$=n("./node_modules/@uirouter/core/lib-esm/common/trace.js"),A=n("./node_modules/@uirouter/core/lib-esm/transition/rejectFactory.js");function R(e){var t=e._ignoredReason();if(t){$.g4.traceTransitionIgnored(e);var n=e.router.globals.transition;return"SameAsCurrent"===t&&n&&n.abort(),A.i.ignored().toPromise()}}function F(e){if(!e.valid())throw new Error(e.error().toString())}var W={location:!0,relative:null,inherit:!1,notify:!0,reload:!1,supercede:!0,custom:{},current:function(){return null},source:"unknown"},C=function(){function e(e){this._transitionCount=0,this._eventTypes=[],this._registeredHooks={},this._criteriaPaths={},this._router=e,this.$view=e.viewService,this._deregisterHookFns={},this._pluginapi=(0,Y.WR)((0,k.P0)(this),{},(0,k.P0)(this),["_definePathType","_defineEvent","_getPathTypes","_getEvents","getHooks"]),this._defineCorePaths(),this._defineCoreEvents(),this._registerCoreTransitionHooks(),e.globals.successfulTransitions.onEvict(_)}return e.prototype.onCreate=function(e,t,n){},e.prototype.onBefore=function(e,t,n){},e.prototype.onStart=function(e,t,n){},e.prototype.onExit=function(e,t,n){},e.prototype.onRetain=function(e,t,n){},e.prototype.onEnter=function(e,t,n){},e.prototype.onFinish=function(e,t,n){},e.prototype.onSuccess=function(e,t,n){},e.prototype.onError=function(e,t,n){},e.prototype.dispose=function(e){(0,Y.VO)(this._registeredHooks).forEach((function(e){return e.forEach((function(t){t._deregistered=!0,(0,Y.nA)(e,t)}))}))},e.prototype.create=function(e,t){return new r.u(e,t,this._router)},e.prototype._defineCoreEvents=function(){var e=o.k,t=O.I,n=this._criteriaPaths,r=!1,s=!0;this._defineEvent("onCreate",e.CREATE,0,n.to,r,t.LOG_REJECTED_RESULT,t.THROW_ERROR,s),this._defineEvent("onBefore",e.BEFORE,0,n.to),this._defineEvent("onStart",e.RUN,0,n.to),this._defineEvent("onExit",e.RUN,100,n.exiting,!0),this._defineEvent("onRetain",e.RUN,200,n.retained),this._defineEvent("onEnter",e.RUN,300,n.entering),this._defineEvent("onFinish",e.RUN,400,n.to),this._defineEvent("onSuccess",e.SUCCESS,0,n.to,r,t.LOG_REJECTED_RESULT,t.LOG_ERROR,s),this._defineEvent("onError",e.ERROR,0,n.to,r,t.LOG_REJECTED_RESULT,t.LOG_ERROR,s)},e.prototype._defineCorePaths=function(){var e=o.c.STATE,t=o.c.TRANSITION;this._definePathType("to",t),this._definePathType("from",t),this._definePathType("exiting",e),this._definePathType("retained",e),this._definePathType("entering",e)},e.prototype._defineEvent=function(e,t,n,o,r,a,i,d){void 0===r&&(r=!1),void 0===a&&(a=O.I.HANDLE_RESULT),void 0===i&&(i=O.I.REJECT_ERROR),void 0===d&&(d=!1);var u=new P.t(e,t,n,o,r,a,i,d);this._eventTypes.push(u),(0,s.BU)(this,this,u)},e.prototype._getEvents=function(e){return((0,c.$K)(e)?this._eventTypes.filter((function(t){return t.hookPhase===e})):this._eventTypes.slice()).sort((function(e,t){var n=e.hookPhase-t.hookPhase;return 0===n?e.hookOrder-t.hookOrder:n}))},e.prototype._definePathType=function(e,t){this._criteriaPaths[e]={name:e,scope:t}},e.prototype._getPathTypes=function(){return this._criteriaPaths},e.prototype.getHooks=function(e){return this._registeredHooks[e]},e.prototype._registerCoreTransitionHooks=function(){var e=this._deregisterHookFns;e.addCoreResolves=this.onCreate({},u),e.ignored=this.onBefore({},R,{priority:-9999}),e.invalid=function(e){return e.onBefore({},F,{priority:-1e4})}(this),e.redirectTo=function(e){return e.onStart({to:function(e){return!!e.redirectTo}},p)}(this),e.onExit=function(e){return e.onExit({exiting:function(e){return!!e.onExit}},y)}(this),e.onRetain=function(e){return e.onRetain({retained:function(e){return!!e.onRetain}},L)}(this),e.onEnter=function(e){return e.onEnter({entering:function(e){return!!e.onEnter}},g)}(this),e.eagerResolve=function(e){return e.onStart({},w,{priority:j})}(this),e.lazyResolve=function(e){return e.onEnter({entering:(0,k.P0)(!0)},b,{priority:j})}(this),e.resolveAll=function(e){return e.onFinish({},D,{priority:j})}(this),e.loadViews=function(e){return e.onFinish({},T)}(this),e.activateViews=function(e){return e.onSuccess({},S)}(this),e.updateGlobals=function(e){return e.onCreate({},H)}(this),e.updateUrl=function(e){return e.onSuccess({},x,{priority:9999})}(this),e.lazyLoad=(0,E.v)(this)},e}()},"./node_modules/@uirouter/core/lib-esm/url/interface.js":()=>{},"./node_modules/@uirouter/core/lib-esm/url/urlConfig.js":(e,t,n)=>{"use strict";n.d(t,{F:()=>s});var o=n("./node_modules/@uirouter/core/lib-esm/params/index.js"),r=n("./node_modules/@uirouter/core/lib-esm/common/index.js"),s=function(){function e(e){var t=this;this.router=e,this.paramTypes=new o.ParamTypes,this._decodeParams=!0,this._isCaseInsensitive=!1,this._isStrictMode=!0,this._defaultSquashPolicy=!1,this.dispose=function(){return t.paramTypes.dispose()},this.baseHref=function(){return t.router.locationConfig.baseHref()},this.hashPrefix=function(e){return t.router.locationConfig.hashPrefix(e)},this.host=function(){return t.router.locationConfig.host()},this.html5Mode=function(){return t.router.locationConfig.html5Mode()},this.port=function(){return t.router.locationConfig.port()},this.protocol=function(){return t.router.locationConfig.protocol()}}return e.prototype.caseInsensitive=function(e){return this._isCaseInsensitive=(0,r.$K)(e)?e:this._isCaseInsensitive},e.prototype.defaultSquashPolicy=function(e){if((0,r.$K)(e)&&!0!==e&&!1!==e&&!(0,r.HD)(e))throw new Error("Invalid squash policy: "+e+". Valid policies: false, true, arbitrary-string");return this._defaultSquashPolicy=(0,r.$K)(e)?e:this._defaultSquashPolicy},e.prototype.strictMode=function(e){return this._isStrictMode=(0,r.$K)(e)?e:this._isStrictMode},e.prototype.type=function(e,t,n){var o=this.paramTypes.type(e,t,n);return(0,r.$K)(t)?this:o},e}()},"./node_modules/@uirouter/core/lib-esm/url/urlMatcherFactory.js":(e,t,n)=>{"use strict";n.d(t,{y:()=>d});var o=n("./node_modules/@uirouter/core/lib-esm/common/index.js"),r=n("./node_modules/@uirouter/core/lib-esm/url/urlMatcher.js"),s=n("./node_modules/@uirouter/core/lib-esm/params/index.js"),a=function(){return(a=Object.assign||function(e){for(var t,n=1,o=arguments.length;n{"use strict";n.d(t,{g:()=>s});var o=n("./node_modules/@uirouter/core/lib-esm/common/index.js"),r=n("./node_modules/@uirouter/core/lib-esm/url/urlRule.js"),s=function(){function e(e){var t=this;this.router=e,this.sync=function(e){return t.router.urlService.sync(e)},this.listen=function(e){return t.router.urlService.listen(e)},this.deferIntercept=function(e){return t.router.urlService.deferIntercept(e)},this.match=function(e){return t.router.urlService.match(e)},this.initial=function(e){return t.router.urlService.rules.initial(e)},this.otherwise=function(e){return t.router.urlService.rules.otherwise(e)},this.removeRule=function(e){return t.router.urlService.rules.removeRule(e)},this.rule=function(e){return t.router.urlService.rules.rule(e)},this.rules=function(){return t.router.urlService.rules.rules()},this.sort=function(e){return t.router.urlService.rules.sort(e)},this.when=function(e,n,o){return t.router.urlService.rules.when(e,n,o)},this.urlRuleFactory=new r.I(e)}return e.prototype.update=function(e){var t=this.router.locationService;e?this.location=t.url():t.url()!==this.location&&t.url(this.location,!0)},e.prototype.push=function(e,t,n){var o=n&&!!n.replace;this.router.urlService.url(e.format(t||{}),o)},e.prototype.href=function(e,t,n){var r=e.format(t);if(null==r)return null;n=n||{absolute:!1};var s=this.router.urlService.config,a=s.html5Mode();if(a||null===r||(r="#"+s.hashPrefix()+r),r=function(e,t,n,r){return"/"===r?e:t?(0,o.Lb)(r)+e:n?r.slice(1)+e:e}(r,a,n.absolute,s.baseHref()),!n.absolute||!r)return r;var i=!a&&r?"/":"",d=s.port(),u=80===d||443===d?"":":"+d;return[s.protocol(),"://",s.host(),u,i,r].join("")},Object.defineProperty(e.prototype,"interceptDeferred",{get:function(){return this.router.urlService.interceptDeferred},enumerable:!1,configurable:!0}),e}()},"./node_modules/@uirouter/core/lib-esm/url/urlRule.js":(e,t,n)=>{"use strict";n.d(t,{I:()=>d,n:()=>u});var o=n("./node_modules/@uirouter/core/lib-esm/url/urlMatcher.js"),r=n("./node_modules/@uirouter/core/lib-esm/common/predicates.js"),s=n("./node_modules/@uirouter/core/lib-esm/common/common.js"),a=n("./node_modules/@uirouter/core/lib-esm/common/hof.js"),i=n("./node_modules/@uirouter/core/lib-esm/state/stateObject.js"),d=function(){function e(e){this.router=e}return e.prototype.compile=function(e){return this.router.urlMatcherFactory.compile(e)},e.prototype.create=function(e,t){var n=this,s=i.l.isState,d=i.l.isStateDeclaration,m=(0,a.uj)([[r.HD,function(e){return m(n.compile(e))}],[(0,a.is)(o.x),function(e){return n.fromUrlMatcher(e,t)}],[(0,a.or)(s,d),function(e){return n.fromState(e,n.router)}],[(0,a.is)(RegExp),function(e){return n.fromRegExp(e,t)}],[r.mf,function(e){return new u(e,t)}]]),l=m(e);if(!l)throw new Error("invalid 'what' in when()");return l},e.prototype.fromUrlMatcher=function(e,t){var n=t;(0,r.HD)(t)&&(t=this.router.urlMatcherFactory.compile(t)),(0,a.is)(o.x)(t)&&(n=function(e){return t.format(e)});var i={urlMatcher:e,matchPriority:function(t){var n=e.parameters().filter((function(e){return e.isOptional}));return n.length?n.filter((function(e){return t[e.id]})).length/n.length:1e-6},type:"URLMATCHER"};return(0,s.l7)(new u((function(t){var n=e.exec(t.path,t.search,t.hash);return e.validates(n)&&n}),n),i)},e.prototype.fromState=function(e,t){var n=i.l.isStateDeclaration(e)?e.$$state():e,o={state:n,type:"STATE"};return(0,s.l7)(this.fromUrlMatcher(n.url,(function(e){var o=t.stateService,r=t.globals;o.href(n,e)!==o.href(r.current,r.params)&&o.transitionTo(n,e,{inherit:!0,source:"url"})})),o)},e.prototype.fromRegExp=function(e,t){if(e.global||e.sticky)throw new Error("Rule RegExp must not be global or sticky");var n=(0,r.HD)(t)?function(e){return t.replace(/\$(\$|\d{1,2})/,(function(t,n){return e["$"===n?0:Number(n)]}))}:t,o={regexp:e,type:"REGEXP"};return(0,s.l7)(new u((function(t){return e.exec(t.path)}),n),o)},e.isUrlRule=function(e){return e&&["type","match","handler"].every((function(t){return(0,r.$K)(e[t])}))},e}(),u=function(e,t){var n=this;this.match=e,this.type="RAW",this.matchPriority=function(e){return 0-n.$id},this.handler=t||s.yR}},"./node_modules/@uirouter/core/lib-esm/url/urlRules.js":(e,t,n)=>{"use strict";n.d(t,{h:()=>u});var o,r=n("./node_modules/@uirouter/core/lib-esm/state/index.js"),s=n("./node_modules/@uirouter/core/lib-esm/url/urlMatcher.js"),a=n("./node_modules/@uirouter/core/lib-esm/common/index.js"),i=n("./node_modules/@uirouter/core/lib-esm/url/urlRule.js");function d(e){if(!((0,a.mf)(e)||(0,a.HD)(e)||(0,a.is)(r.TargetState)(e)||r.TargetState.isDef(e)))throw new Error("'handler' must be a string, function, TargetState, or have a state: 'newtarget' property");return(0,a.mf)(e)?e:(0,a.P0)(e)}o=function(e,t){var n=function(e,t){return(t.priority||0)-(e.priority||0)}(e,t);return 0!==n||0!==(n=function(e,t){var n={STATE:4,URLMATCHER:4,REGEXP:3,RAW:2,OTHER:1};return(n[e.type]||0)-(n[t.type]||0)}(e,t))||0!==(n=function(e,t){return e.urlMatcher&&t.urlMatcher?s.x.compare(e.urlMatcher,t.urlMatcher):0}(e,t))?n:function(e,t){var n={STATE:!0,URLMATCHER:!0};return n[e.type]&&n[t.type]?0:(e.$id||0)-(t.$id||0)}(e,t)};var u=function(){function e(e){this.router=e,this._sortFn=o,this._rules=[],this._id=0,this.urlRuleFactory=new i.I(e)}return e.prototype.dispose=function(e){this._rules=[],delete this._otherwiseFn},e.prototype.initial=function(e){var t=d(e);this.rule(this.urlRuleFactory.create((function(e,t){return 0===t.globals.transitionHistory.size()&&!!/^\/?$/.exec(e.path)}),t))},e.prototype.otherwise=function(e){var t=d(e);this._otherwiseFn=this.urlRuleFactory.create((0,a.P0)(!0),t),this._sorted=!1},e.prototype.removeRule=function(e){(0,a.nA)(this._rules,e)},e.prototype.rule=function(e){var t=this;if(!i.I.isUrlRule(e))throw new Error("invalid rule");return e.$id=this._id++,e.priority=e.priority||0,this._rules.push(e),this._sorted=!1,function(){return t.removeRule(e)}},e.prototype.rules=function(){return this.ensureSorted(),this._rules.concat(this._otherwiseFn?[this._otherwiseFn]:[])},e.prototype.sort=function(e){for(var t=this.stableSort(this._rules,this._sortFn=e||this._sortFn),n=0,o=0;o{"use strict";n.d(t,{i:()=>i});var o=n("./node_modules/@uirouter/core/lib-esm/common/index.js"),r=n("./node_modules/@uirouter/core/lib-esm/url/urlRules.js"),s=n("./node_modules/@uirouter/core/lib-esm/url/urlConfig.js"),a=n("./node_modules/@uirouter/core/lib-esm/state/index.js"),i=function(){function e(e){var t=this;this.router=e,this.interceptDeferred=!1,this.rules=new r.h(this.router),this.config=new s.F(this.router),this.url=function(e,n,o){return t.router.locationService.url(e,n,o)},this.path=function(){return t.router.locationService.path()},this.search=function(){return t.router.locationService.search()},this.hash=function(){return t.router.locationService.hash()},this.onChange=function(e){return t.router.locationService.onChange(e)}}return e.prototype.dispose=function(){this.listen(!1),this.rules.dispose()},e.prototype.parts=function(){return{path:this.path(),search:this.search(),hash:this.hash()}},e.prototype.sync=function(e){if(!e||!e.defaultPrevented){var t=this.router,n=t.urlService,r=t.stateService,s={path:n.path(),search:n.search(),hash:n.hash()},i=this.match(s);(0,o.uj)([[o.HD,function(e){return n.url(e,!0)}],[a.TargetState.isDef,function(e){return r.go(e.state,e.params,e.options)}],[(0,o.is)(a.TargetState),function(e){return r.go(e.state(),e.params(),e.options())}]])(i&&i.rule.handler(i.match,s,this.router))}},e.prototype.listen=function(e){var t=this;if(!1!==e)return this._stopListeningFn=this._stopListeningFn||this.router.urlService.onChange((function(e){return t.sync(e)}));this._stopListeningFn&&this._stopListeningFn(),delete this._stopListeningFn},e.prototype.deferIntercept=function(e){void 0===e&&(e=!0),this.interceptDeferred=e},e.prototype.match=function(e){e=(0,o.l7)({path:"",search:{},hash:""},e);for(var t,n,r,s=this.rules.rules(),a=0;at.weight?i:t}return t},e}()},"./node_modules/@uirouter/core/lib-esm/vanilla.js":(e,t,n)=>{"use strict";n.d(t,{$q:()=>o.$q});var o=n("./node_modules/@uirouter/core/lib-esm/vanilla/index.js")},"./node_modules/@uirouter/core/lib-esm/vanilla/baseLocationService.js":(e,t,n)=>{"use strict";n.d(t,{U:()=>s});var o=n("./node_modules/@uirouter/core/lib-esm/common/index.js"),r=n("./node_modules/@uirouter/core/lib-esm/vanilla/utils.js"),s=function(){function e(e,t){var n=this;this.fireAfterUpdate=t,this._listeners=[],this._listener=function(e){return n._listeners.forEach((function(t){return t(e)}))},this.hash=function(){return(0,r.en)(n._get()).hash},this.path=function(){return(0,r.en)(n._get()).path},this.search=function(){return(0,r.Qf)((0,r.en)(n._get()).search)},this._location=o.Jz.location,this._history=o.Jz.history}return e.prototype.url=function(e,t){return void 0===t&&(t=!0),(0,o.$K)(e)&&e!==this._get()&&(this._set(null,null,e,t),this.fireAfterUpdate&&this._listeners.forEach((function(t){return t({url:e})}))),(0,r.Q2)(this)},e.prototype.onChange=function(e){var t=this;return this._listeners.push(e),function(){return(0,o.nA)(t._listeners,e)}},e.prototype.dispose=function(e){(0,o.Wk)(this._listeners)},e}()},"./node_modules/@uirouter/core/lib-esm/vanilla/browserLocationConfig.js":(e,t,n)=>{"use strict";n.d(t,{u:()=>r});var o=n("./node_modules/@uirouter/core/lib-esm/common/predicates.js"),r=function(){function e(e,t){void 0===t&&(t=!1),this._isHtml5=t,this._baseHref=void 0,this._hashPrefix=""}return e.prototype.port=function(){return location.port?Number(location.port):"https"===this.protocol()?443:80},e.prototype.protocol=function(){return location.protocol.replace(/:/g,"")},e.prototype.host=function(){return location.hostname},e.prototype.html5Mode=function(){return this._isHtml5},e.prototype.hashPrefix=function(e){return(0,o.$K)(e)?this._hashPrefix=e:this._hashPrefix},e.prototype.baseHref=function(e){return(0,o.$K)(e)&&(this._baseHref=e),(0,o.o8)(this._baseHref)&&(this._baseHref=this.getBaseHref()),this._baseHref},e.prototype.getBaseHref=function(){var e=document.getElementsByTagName("base")[0];return e&&e.href?e.href.replace(/^([^/:]*:)?\/\/[^/]*/,""):this._isHtml5?"/":location.pathname||"/"},e.prototype.dispose=function(){},e}()},"./node_modules/@uirouter/core/lib-esm/vanilla/hashLocationService.js":(e,t,n)=>{"use strict";n.d(t,{R:()=>i});var o,r=n("./node_modules/@uirouter/core/lib-esm/common/index.js"),s=n("./node_modules/@uirouter/core/lib-esm/vanilla/baseLocationService.js"),a=(o=function(e,t){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),i=function(e){function t(t){var n=e.call(this,t,!1)||this;return r.Jz.addEventListener("hashchange",n._listener,!1),n}return a(t,e),t.prototype._get=function(){return(0,r.Ld)(this._location.hash)},t.prototype._set=function(e,t,n,o){this._location.hash=n},t.prototype.dispose=function(t){e.prototype.dispose.call(this,t),r.Jz.removeEventListener("hashchange",this._listener)},t}(s.U)},"./node_modules/@uirouter/core/lib-esm/vanilla/injector.js":(e,t,n)=>{"use strict";n("./node_modules/@uirouter/core/lib-esm/common/index.js")},"./node_modules/@uirouter/core/lib-esm/vanilla/interface.js":()=>{},"./node_modules/@uirouter/core/lib-esm/vanilla/memoryLocationConfig.js":(e,t,n)=>{"use strict";n.d(t,{W:()=>s});var o=n("./node_modules/@uirouter/core/lib-esm/common/predicates.js"),r=n("./node_modules/@uirouter/core/lib-esm/common/common.js"),s=function(){var e=this;this.dispose=r.ZT,this._baseHref="",this._port=80,this._protocol="http",this._host="localhost",this._hashPrefix="",this.port=function(){return e._port},this.protocol=function(){return e._protocol},this.host=function(){return e._host},this.baseHref=function(){return e._baseHref},this.html5Mode=function(){return!1},this.hashPrefix=function(t){return(0,o.$K)(t)?e._hashPrefix=t:e._hashPrefix}}},"./node_modules/@uirouter/core/lib-esm/vanilla/memoryLocationService.js":(e,t,n)=>{"use strict";n.d(t,{I:()=>a});var o,r=n("./node_modules/@uirouter/core/lib-esm/vanilla/baseLocationService.js"),s=(o=function(e,t){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),a=function(e){function t(t){return e.call(this,t,!0)||this}return s(t,e),t.prototype._get=function(){return this._url},t.prototype._set=function(e,t,n,o){this._url=n},t}(r.U)},"./node_modules/@uirouter/core/lib-esm/vanilla/plugins.js":(e,t,n)=>{"use strict";var o=n("./node_modules/@uirouter/core/lib-esm/vanilla/browserLocationConfig.js"),r=n("./node_modules/@uirouter/core/lib-esm/vanilla/hashLocationService.js"),s=n("./node_modules/@uirouter/core/lib-esm/vanilla/utils.js"),a=n("./node_modules/@uirouter/core/lib-esm/vanilla/pushStateLocationService.js"),i=n("./node_modules/@uirouter/core/lib-esm/vanilla/memoryLocationService.js"),d=n("./node_modules/@uirouter/core/lib-esm/vanilla/memoryLocationConfig.js");n("./node_modules/@uirouter/core/lib-esm/vanilla/injector.js"),n("./node_modules/@uirouter/core/lib-esm/vanilla/q.js"),n("./node_modules/@uirouter/core/lib-esm/common/coreservices.js"),(0,s._D)("vanilla.hashBangLocation",!1,r.R,o.u),(0,s._D)("vanilla.pushStateLocation",!0,a.h,o.u),(0,s._D)("vanilla.memoryLocation",!1,i.I,d.W)},"./node_modules/@uirouter/core/lib-esm/vanilla/pushStateLocationService.js":(e,t,n)=>{"use strict";n.d(t,{h:()=>i});var o,r=n("./node_modules/@uirouter/core/lib-esm/vanilla/baseLocationService.js"),s=n("./node_modules/@uirouter/core/lib-esm/common/index.js"),a=(o=function(e,t){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),i=function(e){function t(t){var n=e.call(this,t,!0)||this;return n._config=t.urlService.config,s.Jz.addEventListener("popstate",n._listener,!1),n}return a(t,e),t.prototype._getBasePrefix=function(){return(0,s.Lb)(this._config.baseHref())},t.prototype._get=function(){var e=this._location,t=e.pathname,n=e.hash,o=e.search;o=(0,s.C7)(o)[1],n=(0,s.cW)(n)[1];var r=this._getBasePrefix(),a=t===this._config.baseHref(),i=t.substr(0,r.length)===r;return(t=a?"/":i?t.substring(r.length):t)+(o?"?"+o:"")+(n?"#"+n:"")},t.prototype._set=function(e,t,n,o){var r=this._getBasePrefix(),s=n&&"/"!==n[0]?"/":"",a=""===n||"/"===n?this._config.baseHref():r+s+n;o?this._history.replaceState(e,t,a):this._history.pushState(e,t,a)},t.prototype.dispose=function(t){e.prototype.dispose.call(this,t),s.Jz.removeEventListener("popstate",this._listener)},t}(r.U)},"./node_modules/@uirouter/core/lib-esm/vanilla/q.js":(e,t,n)=>{"use strict";n.d(t,{$q:()=>r});var o=n("./node_modules/@uirouter/core/lib-esm/common/index.js"),r={when:function(e){return new Promise((function(t,n){return t(e)}))},reject:function(e){return new Promise((function(t,n){n(e)}))},defer:function(){var e={};return e.promise=new Promise((function(t,n){e.resolve=t,e.reject=n})),e},all:function(e){if((0,o.kJ)(e))return Promise.all(e);if((0,o.Kn)(e)){var t=Object.keys(e).map((function(t){return e[t].then((function(e){return{key:t,val:e}}))}));return r.all(t).then((function(e){return e.reduce((function(e,t){return e[t.key]=t.val,e}),{})}))}}}},"./node_modules/@uirouter/core/lib-esm/vanilla/utils.js":(e,t,n)=>{"use strict";n.d(t,{Qf:()=>s,en:()=>a,Q2:()=>i,_D:()=>d});var o=n("./node_modules/@uirouter/core/lib-esm/common/index.js"),r=function(e,t){var n=t[0],r=t[1];return e.hasOwnProperty(n)?(0,o.kJ)(e[n])?e[n].push(r):e[n]=[e[n],r]:e[n]=r,e},s=function(e){return e.split("&").filter(o.yR).map(o.Fb).reduce(r,{})};function a(e){var t=function(e){return e||""},n=(0,o.cW)(e).map(t),r=n[0],s=n[1],a=(0,o.C7)(r).map(t);return{path:a[0],search:a[1],hash:s,url:e}}var i=function(e){var t=e.path(),n=e.search(),r=e.hash(),s=Object.keys(n).map((function(e){var t=n[e];return((0,o.kJ)(t)?t:[t]).map((function(t){return e+"="+t}))})).reduce(o.M7,[]).join("&");return t+(s?"?"+s:"")+(r?"#"+r:"")};function d(e,t,n,o){return function(r){var s=r.locationService=new n(r),a=r.locationConfig=new o(r,t);return{name:e,service:s,configuration:a,dispose:function(e){e.dispose(s),e.dispose(a)}}}}},"./node_modules/@uirouter/core/lib-esm/view/interface.js":()=>{},"./node_modules/@uirouter/core/lib-esm/view/view.js":(e,t,n)=>{"use strict";n.d(t,{s:()=>i});var o=n("./node_modules/@uirouter/core/lib-esm/common/common.js"),r=n("./node_modules/@uirouter/core/lib-esm/common/hof.js"),s=n("./node_modules/@uirouter/core/lib-esm/common/predicates.js"),a=n("./node_modules/@uirouter/core/lib-esm/common/trace.js"),i=function(){function e(e){var t=this;this.router=e,this._uiViews=[],this._viewConfigs=[],this._viewConfigFactories={},this._listeners=[],this._pluginapi={_rootViewContext:this._rootViewContext.bind(this),_viewConfigFactory:this._viewConfigFactory.bind(this),_registeredUIView:function(e){return(0,o.sE)(t._uiViews,(function(n){return t.router.$id+"."+n.id===e}))},_registeredUIViews:function(){return t._uiViews},_activeViewConfigs:function(){return t._viewConfigs},_onSync:function(e){return t._listeners.push(e),function(){return(0,o.nA)(t._listeners,e)}}}}return e.normalizeUIViewTarget=function(e,t){void 0===t&&(t="");var n=t.split("@"),o=n[0]||"$default",r=(0,s.HD)(n[1])?n[1]:"^",a=/^(\^(?:\.\^)*)\.(.*$)/.exec(o);if(a&&(r=a[1],o=a[2]),"!"===o.charAt(0)&&(o=o.substr(1),r=""),/^(\^(?:\.\^)*)$/.exec(r)){var i=r.split(".").reduce((function(e,t){return e.parent}),e);r=i.name}else"."===r&&(r=e.name);return{uiViewName:o,uiViewContextAnchor:r}},e.prototype._rootViewContext=function(e){return this._rootContext=e||this._rootContext},e.prototype._viewConfigFactory=function(e,t){this._viewConfigFactories[e]=t},e.prototype.createViewConfig=function(e,t){var n=this._viewConfigFactories[t.$type];if(!n)throw new Error("ViewService: No view config factory registered for type "+t.$type);var o=n(e,t);return(0,s.kJ)(o)?o:[o]},e.prototype.deactivateViewConfig=function(e){a.g4.traceViewServiceEvent("<- Removing",e),(0,o.nA)(this._viewConfigs,e)},e.prototype.activateViewConfig=function(e){a.g4.traceViewServiceEvent("-> Registering",e),this._viewConfigs.push(e)},e.prototype.sync=function(){var t=this,n=this._uiViews.map((function(e){return[e.fqn,e]})).reduce(o.bb,{});function s(e){for(var t=e.viewDecl.$context,n=0;++n&&t.parent;)t=t.parent;return n}var i=(0,r.WA)((function(e,t,n,o){return t*(e(n)-e(o))})),d=this._uiViews.sort(i((function(e){var t=function(e){return e&&e.parent?t(e.parent)+1:1};return 1e4*e.fqn.split(".").length+t(e.creationContext)}),1)).map((function(o){var r=t._viewConfigs.filter(e.matches(n,o));return r.length>1&&r.sort(i(s,-1)),{uiView:o,viewConfig:r[0]}})),u=d.map((function(e){return e.viewConfig})),m=this._viewConfigs.filter((function(e){return!(0,o.d3)(u,e)})).map((function(e){return{uiView:void 0,viewConfig:e}}));d.forEach((function(e){-1!==t._uiViews.indexOf(e.uiView)&&e.uiView.configUpdated(e.viewConfig)}));var l=d.concat(m);this._listeners.forEach((function(e){return e(l)})),a.g4.traceViewSync(l)},e.prototype.registerUIView=function(e){a.g4.traceViewServiceUIViewEvent("-> Registering",e);var t=this._uiViews;return t.filter((function(t){return t.fqn===e.fqn&&t.$type===e.$type})).length&&a.g4.traceViewServiceUIViewEvent("!!!! duplicate uiView named:",e),t.push(e),this.sync(),function(){-1!==t.indexOf(e)?(a.g4.traceViewServiceUIViewEvent("<- Deregistering",e),(0,o.nA)(t)(e)):a.g4.traceViewServiceUIViewEvent("Tried removing non-registered uiView",e)}},e.prototype.available=function(){return this._uiViews.map((0,r.vg)("fqn"))},e.prototype.active=function(){return this._uiViews.filter((0,r.vg)("$config")).map((0,r.vg)("name"))},e.matches=function(e,t){return function(n){if(t.$type!==n.viewDecl.$type)return!1;var r=n.viewDecl,s=r.$uiViewName.split("."),a=t.fqn.split(".");if(!(0,o.fS)(s,a.slice(0-s.length)))return!1;var i=1-s.length||void 0,d=a.slice(0,i).join("."),u=e[d].creationContext;return r.$uiViewContextAnchor===(u&&u.name)}},e}()},"./node_modules/angular-aria/angular-aria.js":()=>{!function(e,t){"use strict";var n="ngAriaDisable",o=t.module("ngAria",["ng"]).info({angularVersion:"1.8.2"}).provider("$aria",(function(){var e={ariaHidden:!0,ariaChecked:!0,ariaReadonly:!0,ariaDisabled:!0,ariaRequired:!0,ariaInvalid:!0,ariaValue:!0,tabindex:!0,bindKeydown:!0,bindRoleForClick:!0};function o(t,o,r,a){return function(i,d,u){if(!u.hasOwnProperty(n)){var m=u.$normalize(o);!e[m]||s(d,r)||u[m]||i.$watch(u[t],(function(e){e=a?!e:!!e,d.attr(o,e)}))}}}this.config=function(n){e=t.extend(e,n)},this.$get=function(){return{config:function(t){return e[t]},$$watchExpr:o}}})),r=["BUTTON","A","INPUT","TEXTAREA","SELECT","DETAILS","SUMMARY"],s=function(e,t){if(-1!==t.indexOf(e[0].nodeName))return!0};o.directive("ngShow",["$aria",function(e){return e.$$watchExpr("ngShow","aria-hidden",[],!0)}]).directive("ngHide",["$aria",function(e){return e.$$watchExpr("ngHide","aria-hidden",[],!1)}]).directive("ngValue",["$aria",function(e){return e.$$watchExpr("ngValue","aria-checked",r,!1)}]).directive("ngChecked",["$aria",function(e){return e.$$watchExpr("ngChecked","aria-checked",r,!1)}]).directive("ngReadonly",["$aria",function(e){return e.$$watchExpr("ngReadonly","aria-readonly",r,!1)}]).directive("ngRequired",["$aria",function(e){return e.$$watchExpr("ngRequired","aria-required",r,!1)}]).directive("ngModel",["$aria",function(e){function t(t,n,o,a){return e.config(n)&&!o.attr(t)&&(a||!s(o,r))&&("hidden"!==o.attr("type")||"INPUT"!==o[0].nodeName)}function o(e,t){return!t.attr("role")&&t.attr("type")===e&&!s(t,r)}return{restrict:"A",require:"ngModel",priority:200,compile:function(r,s){if(!s.hasOwnProperty(n)){var a=function(e,t){var n=e.type,o=e.role;return"checkbox"===(n||o)||"menuitemcheckbox"===o?"checkbox":"radio"===(n||o)||"menuitemradio"===o?"radio":"range"===n||"progressbar"===o||"slider"===o?"range":""}(s);return{post:function(n,r,s,i){var d=t("tabindex","tabindex",r,!1);function u(){return i.$modelValue}switch(a){case"radio":case"checkbox":o(a,r)&&r.attr("role",a),t("aria-checked","ariaChecked",r,!1)&&n.$watch(u,"radio"===a?function(e){var t=s.value==i.$viewValue;r.attr("aria-checked",t)}:function(){r.attr("aria-checked",!i.$isEmpty(i.$viewValue))}),d&&r.attr("tabindex",0);break;case"range":if(o(a,r)&&r.attr("role","slider"),e.config("ariaValue")){var m=!r.attr("aria-valuemin")&&(s.hasOwnProperty("min")||s.hasOwnProperty("ngMin")),l=!r.attr("aria-valuemax")&&(s.hasOwnProperty("max")||s.hasOwnProperty("ngMax")),_=!r.attr("aria-valuenow");m&&s.$observe("min",(function(e){r.attr("aria-valuemin",e)})),l&&s.$observe("max",(function(e){r.attr("aria-valuemax",e)})),_&&n.$watch(u,(function(e){r.attr("aria-valuenow",e)}))}d&&r.attr("tabindex",0)}!s.hasOwnProperty("ngRequired")&&i.$validators.required&&t("aria-required","ariaRequired",r,!1)&&s.$observe("required",(function(){r.attr("aria-required",!!s.required)})),t("aria-invalid","ariaInvalid",r,!0)&&n.$watch((function(){return i.$invalid}),(function(e){r.attr("aria-invalid",!!e)}))}}}}}}]).directive("ngDisabled",["$aria",function(e){return e.$$watchExpr("ngDisabled","aria-disabled",r,!1)}]).directive("ngMessages",(function(){return{restrict:"A",require:"?ngMessages",link:function(e,t,o,r){o.hasOwnProperty(n)||t.attr("aria-live")||t.attr("aria-live","assertive")}}})).directive("ngClick",["$aria","$parse",function(e,t){return{restrict:"A",compile:function(o,a){if(!a.hasOwnProperty(n)){var i=t(a.ngClick);return function(t,n,o){s(n,r)||(e.config("bindRoleForClick")&&!n.attr("role")&&n.attr("role","button"),e.config("tabindex")&&!n.attr("tabindex")&&n.attr("tabindex",0),!e.config("bindKeydown")||o.ngKeydown||o.ngKeypress||o.ngKeyup||n.on("keydown",(function(e){var n=e.which||e.keyCode;13!==n&&32!==n||(-1!==r.indexOf(e.target.nodeName)||e.target.isContentEditable||e.preventDefault(),t.$apply((function(){i(t,{$event:e})})))})))}}}}}]).directive("ngDblclick",["$aria",function(e){return function(t,o,a){a.hasOwnProperty(n)||!e.config("tabindex")||o.attr("tabindex")||s(o,r)||o.attr("tabindex",0)}}])}(window,window.angular)},"./node_modules/angular-rateit/dist/ng-rateit.js":()=>{angular.module("ngRateIt",["ng"]).directive("ngRateIt",["$q",function(e){"use strict";return{scope:{ngModel:"=",min:"=?min",max:"=?max",step:"=?step",readOnly:"&?readOnly",pristine:"=?pristine",resetable:"&?resetable",starWidth:"=?starWidth",starHeight:"=?starHeight",canelWidth:"=?canelWidth",cancelHeight:"=?cancelHeight",rated:"&?rated",reset:"&?reset",beforeRated:"&?beforeRated",beforeReset:"&?beforeReset"},templateUrl:"ngRateIt/ng-rate-it.html",require:"ngModel",replace:!0,link:function(t,n,o){o.readOnly||(t.readOnly=function(){return!1}),o.resetable||(t.resetable=function(){return!0}),o.beforeRated||(t.beforeRated=function(){var t=e.defer();return t.resolve(),t.promise}),o.rated||(t.rated=function(){}),o.beforeReset||(t.beforeReset=function(){var t=e.defer();return t.resolve(),t.promise}),o.reset||(t.reset=function(){})},controller:"ngRateItController"}}]).controller("ngRateItController",["$scope","$timeout",function(e,t){"use strict";e.isTouch=!!window.hasOwnProperty("ontouchstart")||window.navigator.msMaxTouchPoints>0,e.orgValue=angular.copy(e.ngModel),e.min=e.min||0,e.max=e.max||5,e.step=e.step||.5,e.pristine=e.orgValue===e.ngModel,e.starWidth=e.starWidth||16,e.starPartWidth=e.starWidth*e.step,e.starHeight=e.starHeight||16,e.canelWidth=e.canelWidth||e.starWidth,e.cancelHeight=e.cancelHeight||e.starHeight;var n=e.max-e.min,o=n/e.step,r=e.$watch("ngModel",(function(){e.pristine=e.orgValue===e.ngModel})),s=function(e){return(e+1)/o*n};e.getStartParts=function(){return new Array(o)},e.getStarOffset=function(t){var n=1/e.step;return-e.starWidth/n*(t%n)},e.isSelected=function(t){return s(t)<=e.ngModel-e.min},e.removeRating=function(){e.resetable()&&!e.readOnly()&&e.beforeReset({rating:e.ngModel}).then((function(){e.ngModel=e.min,e.reset({rating:e.ngModel})}))},e.setValue=function(n){if(!e.readOnly()){var o=angular.copy(e.min+s(n));e.beforeRated({rating:o}).then((function(){e.ngModel=o,t((function(){e.rated({rating:e.ngModel})}))}))}},e.$on("$destroy",(function(){r()}))}]).run(["$templateCache",function(e){"use strict";e.put("ngRateIt/ng-rate-it.html",'
')}])},"./src/js/index.module.js":(e,t,n)=>{"use strict";n("./node_modules/angular-animate/index.js"),n("./node_modules/angular-aria/index.js"),n("./node_modules/angular-messages/index.js"),n("./node_modules/angular-material/index.js"),n("./node_modules/angular-resource/index.js"),n("./node_modules/angular-sanitize/index.js"),n("./node_modules/ng-csv/build/ng-csv.min.js"),n("./node_modules/ng-embed/src/ng-embed.js");var o=n("./node_modules/@uirouter/angularjs/lib-esm/index.js"),r=(n("./node_modules/angular-local-storage/index.js"),n("./node_modules/angular-rateit/dist/ng-rateit.js"),n("./node_modules/@flowjs/ng-flow/dist/ng-flow.js"),n("./node_modules/emojionearea/dist/emojionearea.js"),n("./node_modules/jquery-textcomplete/dist/jquery.textcomplete.js"),n("./node_modules/moment/moment.js")),s=n.n(r),a=n("./node_modules/lodash.map/index.js"),i=n.n(a);function d(e,t,n,o,r,a,d,u,m,l){const _=this;function c(n){a.updateStorage(u,{up:n}).then((o=>{var r;e.layout=o,r=!0===n?"show":"hide",t.parent.postMessage({cmd:r},"*"),l((()=>{e.$apply()}))})).catch(a.onStorageError)}_.$onInit=function(){console.debug("IndexController::onInit() VISITOR",e.visitor),e.status="init";const o=e.settings.color,s=e.settings.textColor,i=e.settings.textButtonColor||e.settings.textColor,d=e.settings.color_button,l=e.settings.backgroundColor,_=Math.max(document.documentElement.clientHeight,window.innerHeight||0),h=document.documentElement.clientWidth;document.documentElement.style.setProperty("--xc-ws-div-color",o),document.documentElement.style.setProperty("--xc-ws-text-color",s),document.documentElement.style.setProperty("--xc-ws-text-button-color",i),document.documentElement.style.setProperty("--xc-ws-button-color",d),document.documentElement.style.setProperty("--xc-ws-background-color",l),document.documentElement.style.setProperty("--xc-ws-client-height",_),document.documentElement.style.setProperty("--xc-ws-client-width",h);let f=!1;const p=t=>null!==t&&t[e.location]||{},M=a.getItem(m).then(p),y=a.getItem(u).then(p);r.all([M,y]).then((r=>{let[a,i]=r;e.visitor=a,e.layout=i,e.visitor.interaction&&e.layout.up?f=!0:e.layout.up=!0,"bottom_right"===e.settings.alignment&&c(f),n.go(function(){var t,n;const o=e.settings.online,r=!(null==e||null===(t=e.visitor)||void 0===t||null===(n=t.interaction)||void 0===n||!n.id),s=Number(e.settings.maxInteractions)&&Number(e.settings.openedInteractions)>=Number(e.settings.maxInteractions);return!!(r||!s&&o)}()?"app.online":"app.offline",null,{location:"replace"});let d="";d=e.settings.online||!e.settings.hideWhenOffline?"init":"offline",t.parent.postMessage({cmd:d,div_color:o,text_color:s,client_height:_,client_width:h},"*");const u=document.createElement("style");document.head.appendChild(u),u.sheet.insertRule(".mdi-send:before {color:"+e.settings.color+"!important}")})).catch(a.onStorageError)},_.close=function(){const t=e.visitor.interaction;if(t&&t.id){const r=o.confirm().parent(angular.element(document.querySelector("#chat-app"))).clickOutsideToClose(!0).title(e.settings.closingQuestion||"Do you want to close the interaction?").ok("Ok").cancel("Cancel");o.show(r).then((function(){return d.chatInteraction.customUpdate({id:t.id,closed:!0,closeReason:"contact"}).$promise})).then((function(){n.go("app.closing",null,{location:"replace"})})).catch((function(e){console.error("keep open",e)}))}},_.toggle=c,_.download=function(){const t=r.defer(),n=e.visitor.interaction;return n&&n.id&&d.chatInteraction.getMessages({intid:n.id,includeAll:!0}).$promise.then((function(n){t.resolve(i()(n.rows.slice(1),(function(t){let n;if("in"===t.direction&&(n=e.settings.customerAlias||e.visitor.from||"Visitor"+t.ContactId),"out"===t.direction)switch(e.settings.agentIdentifier){case"website_alias":n=t.UserId?e.settings.agentAlias+t.UserId:"System";break;case"agent_alias":n=t.UserId?t.User.alias||t.User.fullname:"System";break;case"agent_fullname":n=t.UserId?t.User.fullname:"System";break;default:n=t.UserId?e.settings.agentAlias+t.UserId:"System"}return{sender:n,message:t.body,createdAt:s()(t.createdAt).format("MM/DD/YYYY HH:mm:ss")}})))})).catch((function(e){console.error(e)})),t.promise},_.getHeaderShape=function(){return"rounded"===e.settings.header_shape?"15px":"0px"};const h={online:["online","chat","waiting","closing","unmanaged"],offline:["offline"]};Object.defineProperty(e,"actualTitle",{get(){let t=e.settings.defaultTitle;return h.online.includes(e.status)?t=e.settings.header_online:h.offline.includes(e.status)&&(t=e.settings.header_offline),t}}),window.addEventListener("message",(function(e){"show"===e.data.evt?c(!0):"hide"===e.data.evt&&c(!1)}),!1)}d.$inject=["$rootScope","$window","$state","$mdDialog","$q","RemoteStorageService","api","STORAGE_LAYOUT","STORAGE_VISITOR","$timeout"];var u=n("./node_modules/lodash.forin/index.js"),m=n.n(u),l=n("./node_modules/lodash.isnil/index.js"),_=n.n(l),c=n("./src/js/chat/chat.tpl.html"),h=n("./src/js/closing/closing.tpl.html"),f=n("./src/js/offline/offline.tpl.html"),p=n("./src/js/online/online.tpl.html"),M=n("./src/js/unmanaged/unmanaged.tpl.html"),y=n("./src/js/waiting/waiting.tpl.html");function L(e,t){const n=t.search();e.settings={cursor:"pointer",hide:!0},m()(n,(function(t,n){""===t||_()(t)||("true"===t&&(t=!0),"false"===t&&(t=!1),e.settings[n]=t)})),e.location=e.settings.location,e.layout={up:!1},e.visitor={}}function g(e,t,n,o,r){t.html5Mode(!0),n.defaults.headers.get||(n.defaults.headers.get={}),n.defaults.headers.get["If-Modified-Since"]="Mon, 26 Jul 1997 05:00:00 GMT",n.defaults.headers.get["Cache-Control"]="no-cache",n.defaults.headers.get.Pragma="no-cache",o.setPrefix(r),e.state("app",{abstract:!0}).state("app.waiting",{url:"/waiting",templateUrl:y,controller:"WaitingController as vm"}).state("app.online",{url:"/online",templateUrl:p,controller:"OnlineController as vm"}).state("app.offline",{url:"/offline",templateUrl:f,controller:"OfflineController as vm"}).state("app.chat",{url:"/chat",templateUrl:c,controller:"ChatController as vm"}).state("app.unmanaged",{url:"/unmanaged",templateUrl:M,controller:"UnmanagedController as vm"}).state("app.closing",{url:"/closing",templateUrl:h,controller:"ClosingController as vm"})}g.$inject=["$stateProvider","$locationProvider","$httpProvider","localStorageServiceProvider","STORAGE_PREFIX"],L.$inject=["$rootScope","$location"];var Y=n("./node_modules/lodash.merge/index.js"),v=n.n(Y);function k(e,t,n,o,r,s,a,i){const d=this;function u(t){return function(o){d.errors[t]=o.data;const r=n.simple().textContent(e.settings.formSubmitFailureMessage||"Form submission error").toastClass("md-failure-toast").position("top");n.show(r)}}function m(){e.loading=!1}function l(){e.settings.online?t.go("app.online",null,{location:"replace"}):t.go("app.offline",null,{location:"replace"})}function _(){d.form={},d.upColor=null,d.downColor=null,d.userForm.$setPristine(),d.userForm.$setUntouched(),delete e.visitor.interaction,e.enableDownload=!1}d.$onInit=function(){console.debug("ClosingController::onInit() VISITOR",e.visitor),e.status="closing",r.all([s.removeItem(a).then((()=>console.debug("STORAGE_VISITOR cleared"))).catch(s.onStorageError),s.removeItem(i).then((()=>console.debug("STORAGE_LAYOUT cleared"))).catch(s.onStorageError)]).then((()=>e.loading=!1))},d.submit=function(){e.loading=!0,e.visitor.interaction&&e.visitor.interaction.id?o.chatInteraction.close(v()({id:e.visitor.interaction.id,ratingType:e.settings.ratingType,customer:e.settings.customerAlias||e.visitor.from},d.form)).$promise.then((function(){delete d.errors.submit;const t=n.simple().textContent(e.settings.formSubmitSuccessMessage||"Form properly submitted").toastClass("md-success-toast").parent(angular.element(document.querySelector("#chat-toolbar")));n.show(t)})).then(_).then(l).catch(u("submit")).finally(m):(m(),u("submit"))},d.skip=function(){_(),l()},d.form={},d.errors={}}function j(e,t){const n={id:"@id",token:e.settings.token},o={};return o.baseUrl=e.settings.remote+"/api/",o.chatWebsite=t(o.baseUrl+"chat/websites/:id",n,{notify:{method:"POST",url:o.baseUrl+"chat/websites/:id/notify"},offline:{method:"POST",url:o.baseUrl+"chat/websites/:id/offline"},getFields:{method:"GET",url:o.baseUrl+"chat/websites/:id/fields"}}),o.chatInteraction=t(o.baseUrl+"chat/interactions/:id",n,{update:{method:"PUT",url:o.baseUrl+"chat/interactions/:id"},customUpdate:{method:"PUT",url:o.baseUrl+"chat/interactions/:id/custom_update"},close:{method:"PUT",url:o.baseUrl+"chat/interactions/:id/close"},getMessages:{method:"GET",url:o.baseUrl+"chat/interactions/:intid/my_messages"},uploadAttachment:{method:"POST",url:o.baseUrl+"chat/interactions/:id/attachment_upload",headers:{"Content-Type":void 0},transformRequest:angular.identity},downloadAttachment:{method:"GET",url:o.baseUrl+"chat/interactions/:id/attachment_download"},abandon:{method:"PUT",url:o.baseUrl+"chat/interactions/:id/abandon"}}),o.chatMessage=t(o.baseUrl+"chat/messages/:id",n,{update:{method:"PUT",url:o.baseUrl+"chat/messages/:id"}}),o}k.$inject=["$rootScope","$state","$mdToast","api","$q","RemoteStorageService","STORAGE_VISITOR","STORAGE_LAYOUT"],j.$inject=["$rootScope","$resource"];var w=n("./node_modules/lodash.find/index.js"),b=n.n(w),D=n("./node_modules/lodash.values/index.js"),T=n.n(D),S=n("./node_modules/jquery/dist/jquery.js");function H(e,t,n,r,s,a,i,d,u,m,l){const c=this;let h,f,p,M;function y(){o.$q.all([u.removeItem(m).then((()=>console.debug("STORAGE_VISITOR cleared"))).catch(u.onStorageError),u.removeItem(l).then((()=>console.debug("STORAGE_LAYOUT cleared"))).catch(u.onStorageError)]).then((()=>{t.settings.online?a.go("app.online",null,{location:"replace"}):a.go("app.offline",null,{location:"replace"})}))}function L(){n((function(){const e=s[0].getElementsByClassName("chat-messages")[0];e&&(e.scrollTop=e.scrollHeight)}))}function g(e){return function(t){c.errors[e]=t.data,L()}}function Y(e){d.chatWebsite.notify(e).$promise.then((function(e){delete c.errors.chatMessageError;let n=!1;_()(t.visitor.interaction)&&(t.visitor.interaction={id:e.interaction.id},n=!0),t.visitor.interactionStarted||(t.visitor.interactionStarted=!0,n=!0),n&&u.updateStorage(m,t.visitor).then((e=>{t.visitor=e})).catch(u.onStorageError),h[0].emojioneArea.setText(""),L()})).catch(g("chatMessageError"))}function k(){t.visitor&&t.visitor.interaction&&t.visitor.interaction.id&&d.chatInteraction.get({id:t.visitor.interaction.id}).$promise.then((function(e){delete c.errors.getInteraction,e.closed&&(t.visitor.interaction.closed=!0,u.updateStorage(m,t.visitor).then((e=>{t.visitor=e})).catch(u.onStorageError),"unmanaged"===e.disposition?a.go("app.unmanaged",null,{location:"replace"}):a.go("app.closing",null,{location:"replace"}))})).catch((function(e){switch(e.status){case 403:a.go("app.closing",null,{location:"replace"});break;case 404:y();break;case 405:a.go("app.unmanaged",null,{location:"replace"});break;default:console.error(e)}}))}function j(e){const n=h[0].emojioneArea.getText();e&&13===e.keyCode&&e.shiftKey||e&&13!==e.keyCode||""!==n&&Y(v()({body:n},t.visitor))}function w(){var e,n;null!=t&&null!==(e=t.visitor)&&void 0!==e&&null!==(n=e.interaction)&&void 0!==n&&n.id&&d.chatInteraction.getMessages({intid:t.visitor.interaction.id,includeAgent:!0,id:M||void 0}).$promise.then((function(e){if(delete c.errors.interaction,e.count){let o=!1,r=0;for(r=0,o=!1;r{t.visitor=e}))}var n})).catch((function(e){switch(e.status){case 403:a.go("app.closing",null,{location:"replace"});break;case 405:a.go("app.unmanaged",null,{location:"replace"});break;default:console.error(e)}}))}c.errors={},t.messages=[],c.emojiOptions={watchEmbedData:!1,fontSmiley:!1,emoji:!0,link:!0,linkTarget:"_blank"},c.$onInit=function(){console.debug("ChatController::onInit() VISITOR",t.visitor),t.status="chat",t.loading=!1,t.settings.showMenu=!0,c.replyMessage="",t.visitor.interaction&&t.visitor.interaction.closed?y():(k(),f=r(w,2e3),p=r(k,3e3)),h=S("#emojionearea").emojioneArea({placeholder:t.settings.placeholderMessage||"Type a message",events:{keyup:function(e,t){j(t)},ready:function(){this.setFocus()}}})},c.reply=j,c.reply_button=function(){const e=h[0].emojioneArea.getText();""!==e&&(Y(v()({body:e},t.visitor)),h[0].emojioneArea.setFocus())},c.fileAdded=function(e){const n=new FormData;n.append("file",e.file),i.post(t.settings.remote+"/api/chat/interactions/"+t.visitor.interaction.id+"/attachment_upload?token="+t.settings.token,n,{transformRequest:angular.identity,headers:{"Content-Type":void 0}}).then((function(e){(e=e.data).id?(delete c.errors.sendAttachment,Y(v()({body:''+e.name+"",AttachmentId:e.id},t.visitor))):g("sendAttachment")}),g("sendAttachment"))},e.$on("$destroy",(function(){r.cancel(f),r.cancel(p),f=null,p=null})),t.$on("$download",(function(e,n){n&&n(T()(t.messages))}))}H.$inject=["$scope","$rootScope","$timeout","$interval","$document","$state","$http","api","RemoteStorageService","STORAGE_VISITOR","STORAGE_LAYOUT"];var x=n("./node_modules/lodash.random/index.js"),E=n.n(x),P=n("./node_modules/lodash.clonedeep/index.js"),O=n.n(P),$=n("./node_modules/json-form-data/src/jsonToFormData.js"),A=n.n($);function R(e,t,n,o,r,s,a){const i=this;let d=null,u=null;t.typeField="";const m={showLeafArrayIndexes:!0,includeNullValues:!1,mapping:function(e){return"boolean"==typeof e?+e?"1":"0":e}};function l(){delete i.errors.submit,t.$emit("hide"),i.fields=O()(u),i.form={},i.userForm.$setPristine(),i.userForm.$setUntouched();const e=r.simple().textContent(t.settings.formSubmitSuccessMessage||"Form properly submitted").toastClass("md-success-toast").parent(angular.element(document.querySelector("#chat-toolbar")));r.show(e)}i.trustAsHtml=function(e){return n.trustAsHtml(e)},i.initUploadButton=function(t){const n=i.fields[t],o=s.find(".upload-item");if(o.length){const t=angular.element(o[0].querySelector(".upload-button")),r=angular.element(o[0].querySelector("input[type=file]")),s=t.find("label");s.length&&s.css("display","none"),t.on("click",(()=>{s.css("display","none"),"function"==typeof r.trigger?r.trigger("click"):r[0].click()})),r.on("change",(t=>{e.$apply((function(){"string"==typeof n.props.error&&(n.props.error=null);const e=Array.from(t.target.files),o=1048576*n.config.size;e.some((e=>e.size>=o))?(n.options=[],n.props.error=n.config.sizeErrMessage):n.options=e.map((e=>{const{name:t,size:n,type:o}=e;return{name:t,size:n,type:o,file:e}})),i.form[n.props.title]=n.options}))}))}},i.removeFileItem=function(e,t){e.options.splice(t,1),i.form[e.props.title]=e.options},i.setupFileInput=function(e){console.log("form item setup",e);const t=s.find(".upload-item"),n=angular.element(t[0].querySelector("input[type=file]")),{multipleUpload:o,accept:r}=e.config;o&&n.attr("multiple","multiple"),r&&n[0].setAttribute("accept",r)},i.makeFileOptionsVisible=function(){const e=Array.from(s.find(".filename-label")),t=e[e.length-1];t&&t.scrollIntoView&&t.scrollIntoView()},i.$onInit=function(){console.debug("OfflineController::onInit() VISITOR",t.visitor),t.status="offline",i.visitor={id:t.settings.id,mapKeyOffline:"firstName",from:"Anonymous"+E()(1,1e6)},t.settings.showMenu=!1,t.loading=!1,o.chatWebsite.getFields({id:t.settings.id,online:!1}).$promise.then((function(e){e.count&&(d=e.fromKey,u=O()(e.rows),i.fields=O()(u))})).then((function(){for(let e=0;e]+)>)/i);i.checkHTML[e]=t(n.props.helpText)}}})).catch((function(e){console.error(e)}))},i.submit=function(){t.loading=!0;const e={...i.form};for(let n=0;ne.file))))}const n=Array.isArray(i.fields)?i.fields.filter((e=>"upload"===e.type)):[],s=v()({body:e},i.visitor),u=null!=e&&n.length>0,c=null!==e&&"{}"!==JSON.stringify(e);var h,f;(u?(h=s,a({url:`${o.baseUrl}chat/websites/${h.id}/offline`,headers:{"Content-Type":void 0},data:A()(h,{...m,initialFormData:new FormData}),method:"POST"})):c?o.chatWebsite.offline(s).$promise:Promise.reject("INVALID_FORM")).then(l).catch((f="submit",function(e){const n=r.simple().textContent(t.settings.formSubmitFailureMessage||"Form submission error").toastClass("md-failure-toast").parent(angular.element(document.querySelector("#chat-toolbar")));r.show(n),i.errors[f]=e.data})).finally((()=>{i.form.invalid||(i.form={}),t.loading=!1}))},i.toggle=function(e,t){i.form[e]||(i.form[e]=[]);const n=i.form[e].indexOf(t);n>-1?i.form[e].splice(n,1):i.form[e].push(t)},i.exists=function(e,t){return i.form[e]||(i.form[e]=[]),i.form[e].indexOf(t)>-1},i.checkHTML=[],i.form={},i.errors={},i.userForm={}}function F(e,t,n,o,r,s){const a=this;let i=null;function d(){return e.visitor={id:e.settings.id,mapKey:"firstName",from:"Anonymous"+E()(1,1e6)},e.settings.showMenu=!1,r.updateStorage(s,e.visitor).then((t=>(e.visitor=t,o.chatWebsite.getFields({id:e.settings.id,online:!0}).$promise.then((function(e){e.count&&(i=e.fromKey,a.fields=e.rows)})).then((function(){for(let e=0;e]+)>)/i);a.checkHTML[e]=n(t.props.helpText)}}})).catch((function(e){console.error(e)}))))).catch(r.onStorageError)}a.checkHTML=[],a.form={},a.errors={},a.userForm={},a.disableItem=!1,a.trustAsHtml=function(e){return n.trustAsHtml(e)},a.$onInit=function(){if(console.debug("OnlineController::onInit() VISITOR",e.visitor),e.status="online",e.visitor&&e.visitor.interaction)if(e.visitor.interaction.id)if(!0===e.visitor.interactionStarted)t.go("app.chat",null,{location:"replace"});else{var n,r;const t=e.visitor.interaction.id,s=null==e||null===(n=e.visitor)||void 0===n||null===(r=n.message)||void 0===r?void 0:r.id;if(s){const e={id:t,channel:"chat",interaction:{id:t},message:{id:s},disposition:"abandoned",closed:!0,closeReason:"contact"};o.chatInteraction.abandon(e).$promise.finally((()=>d()))}}else t.go("app.waiting",null,{location:"replace"});else d()},a.submit=function(){let n="New chat request \n";for(let t=0;t{e.visitor=t})).catch(r.onStorageError),a.disableItem=!1,e.settings.enableCustomerWriting?t.go("app.chat",null,{location:"replace"}):t.go("app.waiting",null,{location:"replace"})})).catch((function(e){a.disableItem=!1,console.error(e)}))},a.toggle=function(e,t){a.form[e]||(a.form[e]=[]);const n=a.form[e].indexOf(t);n>-1?a.form[e].splice(n,1):a.form[e].push(t)},a.exists=function(e,t){return a.form[e]||(a.form[e]=[]),a.form[e].indexOf(t)>-1}}function W(e,t,n,o,r,s,a,i){const d=this;function u(){e.settings.online?t.go("app.online",null,{location:"replace"}):t.go("app.offline",null,{location:"replace"})}function m(){d.form={},d.upColor=null,d.downColor=null,d.userForm.$setPristine(),d.userForm.$setUntouched(),e.visitor={},e.enableDownload=!1,e.$emit("hide")}function l(t){return function(o){d.errors[t]=o.data;const r=n.simple().textContent(e.settings.formSubmitFailureMessage||"Form submission error").toastClass("md-failure-toast").parent(angular.element(document.querySelector("#chat-toolbar")));n.show(r)}}function _(){e.loading=!1}d.form={},d.errors={},d.$onInit=function(){console.debug("UnmanagedController::onInit() VISITOR",e.visitor),e.status="unmanaged",r.all([s.removeItem(a).then((()=>console.debug("STORAGE_VISITOR cleared"))).catch(s.onStorageError),s.removeItem(i).then((()=>console.debug("STORAGE_LAYOUT cleared"))).catch(s.onStorageError)]).then((()=>e.loading=!1))},d.submit=function(){e.loading=!0,e.visitor.interaction&&e.visitor.interaction.id?o.chatInteraction.customUpdate({id:e.visitor.interaction.id,note:d.form.note}).$promise.then((function(){delete d.errors.submit;const t=n.simple().textContent(e.settings.formSubmitSuccessMessage||"Form properly submitted").toastClass("md-success-toast").parent(angular.element(document.querySelector("#chat-toolbar")));n.show(t)})).then(m).then(u).catch(l("submit")).finally(_):(_(),l("submit"))},d.skip=function(){m(),u()}}function C(e,t,n,o,r,s,a){let i=null;function d(){let t={},n=!1;r.chatInteraction.get({id:e.visitor.interaction.id}).$promise.then((function(n){return t=n,r.chatInteraction.getMessages({intid:e.visitor.interaction.id}).$promise})).then((function(r){n=r.rows.length>1,t.closed?(e.visitor.interaction.closed=!0,s.updateStorage(a,e.visitor).then((n=>{e.visitor=n,"unmanaged"===t.disposition&&o.go("app.unmanaged",null,{location:"replace"})})).catch(s.onStorageError)):(t.UserId||n)&&(t.UserId&&(e.visitor.interaction.UserId=t.UserId),s.updateStorage(a,{...e.visitor,interactionStarted:!0}).then((t=>{e.visitor=t,o.go("app.chat",null,{location:"replace"})})).catch(s.onStorageError))})).catch((function(e){switch(e.status){case 403:o.go("app.closing",null,{location:"replace"});break;case 405:o.go("app.unmanaged",null,{location:"replace"});break;default:console.error(e)}}))}this.$onInit=function(){console.debug("WaitingController::onInit() VISITOR",e.visitor),e.status="waiting",e.visitor&&e.visitor.interaction&&e.visitor.interaction.id&&(i=n(d,3e3))},t.$on("$destroy",(function(){n.cancel(i)}))}function I(e,t){!function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(e,t),t.add(e)}function z(e,t,n){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return n}R.$inject=["$scope","$rootScope","$sce","api","$mdToast","$element","$http"],F.$inject=["$rootScope","$state","$sce","api","RemoteStorageService","STORAGE_VISITOR"],W.$inject=["$rootScope","$state","$mdToast","api","$q","RemoteStorageService","STORAGE_VISITOR","STORAGE_LAYOUT"],C.$inject=["$rootScope","$scope","$interval","$state","api","RemoteStorageService","STORAGE_VISITOR"];var J=new WeakSet,V=new WeakSet;class N{constructor(e,t,n){I(this,V),I(this,J),this.remoteAddress=new URL(t.settings.address).origin,this.location=t.settings.location,this.$q=n,this.$window=e}setItem(e,t){const n="setItem";return this.$q((o=>{z(this,J,U).call(this,n,e,(()=>{o()})),this.$window.parent.postMessage({action:n,key:e,value:t},this.remoteAddress)}))}getItem(e){const t="getItem";return this.$q((n=>{z(this,J,U).call(this,t,e,((e,t)=>{n(t)})),this.$window.parent.postMessage({action:t,key:e},this.remoteAddress)}))}removeItem(e){const t="removeItem";return this.$q((n=>{z(this,J,U).call(this,t,e,(()=>{n()})),this.$window.parent.postMessage({action:t,key:e},this.remoteAddress)}))}updateStorage(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return this.getItem(e).then((o=>{const r=z(this,V,q).call(this,o)||{};return n?delete r[this.location]:r[this.location]=t,this.setItem(e,r).then((()=>r[this.location]))}))}onStorageError(e){console.error("Storage Error",e)}}function U(e,t,n){const o=r=>{const s=`${e}Result`;if(r.origin===this.remoteAddress&&t===r.data.key&&s===r.data.action){const{action:e,item:s}=r.data;switch(console.debug(`[Key = ${t}] Action "${e}" event from parent`,r),e){case"setItemResult":n(t);break;case"getItemResult":n(t,s);break;case"removeItemResult":n(t);break;default:console.debug("Unsupported action",e)}this.$window.removeEventListener("message",o,!1)}};this.$window.addEventListener("message",o,!1)}function q(e){let t=e;if("string"==typeof t)try{t=JSON.parse(e)}catch(n){console.warn(`Could not parse "${e}"`,n),t=e}return t}function G(e){return function(t){return e.trustAsHtml(t)}}N.$inject=["$window","$rootScope","$q"],G.$inject=["$sce"],angular.module("motion-chat",["ngAnimate","ngAria","ngMessages","ngMaterial","ngResource","ngSanitize","ngCsv","ngEmbed","ui.router","LocalStorageModule","ngRateIt","flow"]).filter("toTrusted",G).constant("STORAGE_PREFIX","motion_chat").constant("STORAGE_VISITOR","visitor").constant("STORAGE_LAYOUT","layout").service("RemoteStorageService",N).directive("ngEnter",(function(){return function(e,t,n){t.bind("keydown keypress",(function(t){13===t.which&&(e.$apply((function(){e.$eval(n.ngEnter)})),t.preventDefault())}))}})).directive("ngPrint",(function(){return{link:function(e,t){t.on("click",(function(){document.getElementById("chatContent1")&&function(e,t){const n=document.createElement("div"),o=t.visitor,r=t.settings;let a;for(let e=0;e"+document.title+""),i.document.write(""),i.document.write("

Website: "+r.referer+"

"),i.document.write("

Start Time: "+s()(a).format("YYYY-MM-DD HH:mm:ss")+"

"),i.document.write("

Print Time: "+s()().format("YYYY-MM-DD HH:mm:ss")+"

"),i.document.write(n.innerHTML),i.document.write(""),i.document.close(),i.focus(),i.print(),i.close()}(0,e)}))},restrict:"A"}})).controller("ChatController",H).controller("ClosingController",k).config(["$mdGestureProvider",function(e){e.skipClickHijack()}]).controller("IndexController",d).factory("api",j).config(g).run(L).controller("OfflineController",R).config(["$mdGestureProvider",function(e){e.skipClickHijack()}]).controller("OnlineController",F).controller("UnmanagedController",W).controller("WaitingController",C)},"./node_modules/expose-loader/dist/runtime/getGlobalThis.js":(e,t,n)=>{"use strict";e.exports=function(){if("object"==typeof globalThis)return globalThis;var e;try{e=this||new Function("return this")()}catch(e){if("object"==typeof window)return window;if("object"==typeof self)return self;if(void 0!==n.g)return n.g}return e}()},"./node_modules/json-form-data/src/jsonToFormData.js":function(e,t){var n,o;(o=this)||(o={}),void 0===(n=function(){return o.jsonToFormData=function(){function e(e){return"[object Array]"==={}.toString.call(e)}function t(t){return!(e(t)||"object"!=typeof t||!t||t instanceof Blob||t instanceof Date)}function n(){return"function"==typeof FormData}function o(){if(n())return new FormData}function r(n,o,s,a){var i=0;for(var d in n){if(n.hasOwnProperty(d)){var u=a||d,m=o.mapping(n[d]);if(a&&t(n)&&(u=a+"["+d+"]"),a&&e(n)&&(u=e(m)||o.showLeafArrayIndexes?a+"["+i+"]":a+"[]"),e(m)||t(m))r(m,o,s,u);else if(m instanceof FileList)for(var l=0;l=20?"ste":"de")},week:{dow:1,doy:4}})}(n("./node_modules/moment/moment.js"))},"./node_modules/moment/locale/ar-dz.js":function(e,t,n){!function(e){"use strict";var t=function(e){return 0===e?0:1===e?1:2===e?2:e%100>=3&&e%100<=10?3:e%100>=11?4:5},n={s:["أقل من ثانية","ثانية واحدة",["ثانيتان","ثانيتين"],"%d ثوان","%d ثانية","%d ثانية"],m:["أقل من دقيقة","دقيقة واحدة",["دقيقتان","دقيقتين"],"%d دقائق","%d دقيقة","%d دقيقة"],h:["أقل من ساعة","ساعة واحدة",["ساعتان","ساعتين"],"%d ساعات","%d ساعة","%d ساعة"],d:["أقل من يوم","يوم واحد",["يومان","يومين"],"%d أيام","%d يومًا","%d يوم"],M:["أقل من شهر","شهر واحد",["شهران","شهرين"],"%d أشهر","%d شهرا","%d شهر"],y:["أقل من عام","عام واحد",["عامان","عامين"],"%d أعوام","%d عامًا","%d عام"]},o=function(e){return function(o,r,s,a){var i=t(o),d=n[e][t(o)];return 2===i&&(d=d[r?0:1]),d.replace(/%d/i,o)}},r=["جانفي","فيفري","مارس","أفريل","ماي","جوان","جويلية","أوت","سبتمبر","أكتوبر","نوفمبر","ديسمبر"];e.defineLocale("ar-dz",{months:r,monthsShort:r,weekdays:"الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت".split("_"),weekdaysShort:"أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت".split("_"),weekdaysMin:"ح_ن_ث_ر_خ_ج_س".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"D/‏M/‏YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},meridiemParse:/ص|م/,isPM:function(e){return"م"===e},meridiem:function(e,t,n){return e<12?"ص":"م"},calendar:{sameDay:"[اليوم عند الساعة] LT",nextDay:"[غدًا عند الساعة] LT",nextWeek:"dddd [عند الساعة] LT",lastDay:"[أمس عند الساعة] LT",lastWeek:"dddd [عند الساعة] LT",sameElse:"L"},relativeTime:{future:"بعد %s",past:"منذ %s",s:o("s"),ss:o("s"),m:o("m"),mm:o("m"),h:o("h"),hh:o("h"),d:o("d"),dd:o("d"),M:o("M"),MM:o("M"),y:o("y"),yy:o("y")},postformat:function(e){return e.replace(/,/g,"،")},week:{dow:0,doy:4}})}(n("./node_modules/moment/moment.js"))},"./node_modules/moment/locale/ar-kw.js":function(e,t,n){!function(e){"use strict";e.defineLocale("ar-kw",{months:"يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر".split("_"),monthsShort:"يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر".split("_"),weekdays:"الأحد_الإتنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت".split("_"),weekdaysShort:"احد_اتنين_ثلاثاء_اربعاء_خميس_جمعة_سبت".split("_"),weekdaysMin:"ح_ن_ث_ر_خ_ج_س".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[اليوم على الساعة] LT",nextDay:"[غدا على الساعة] LT",nextWeek:"dddd [على الساعة] LT",lastDay:"[أمس على الساعة] LT",lastWeek:"dddd [على الساعة] LT",sameElse:"L"},relativeTime:{future:"في %s",past:"منذ %s",s:"ثوان",ss:"%d ثانية",m:"دقيقة",mm:"%d دقائق",h:"ساعة",hh:"%d ساعات",d:"يوم",dd:"%d أيام",M:"شهر",MM:"%d أشهر",y:"سنة",yy:"%d سنوات"},week:{dow:0,doy:12}})}(n("./node_modules/moment/moment.js"))},"./node_modules/moment/locale/ar-ly.js":function(e,t,n){!function(e){"use strict";var t={1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9",0:"0"},n=function(e){return 0===e?0:1===e?1:2===e?2:e%100>=3&&e%100<=10?3:e%100>=11?4:5},o={s:["أقل من ثانية","ثانية واحدة",["ثانيتان","ثانيتين"],"%d ثوان","%d ثانية","%d ثانية"],m:["أقل من دقيقة","دقيقة واحدة",["دقيقتان","دقيقتين"],"%d دقائق","%d دقيقة","%d دقيقة"],h:["أقل من ساعة","ساعة واحدة",["ساعتان","ساعتين"],"%d ساعات","%d ساعة","%d ساعة"],d:["أقل من يوم","يوم واحد",["يومان","يومين"],"%d أيام","%d يومًا","%d يوم"],M:["أقل من شهر","شهر واحد",["شهران","شهرين"],"%d أشهر","%d شهرا","%d شهر"],y:["أقل من عام","عام واحد",["عامان","عامين"],"%d أعوام","%d عامًا","%d عام"]},r=function(e){return function(t,r,s,a){var i=n(t),d=o[e][n(t)];return 2===i&&(d=d[r?0:1]),d.replace(/%d/i,t)}},s=["يناير","فبراير","مارس","أبريل","مايو","يونيو","يوليو","أغسطس","سبتمبر","أكتوبر","نوفمبر","ديسمبر"];e.defineLocale("ar-ly",{months:s,monthsShort:s,weekdays:"الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت".split("_"),weekdaysShort:"أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت".split("_"),weekdaysMin:"ح_ن_ث_ر_خ_ج_س".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"D/‏M/‏YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},meridiemParse:/ص|م/,isPM:function(e){return"م"===e},meridiem:function(e,t,n){return e<12?"ص":"م"},calendar:{sameDay:"[اليوم عند الساعة] LT",nextDay:"[غدًا عند الساعة] LT",nextWeek:"dddd [عند الساعة] LT",lastDay:"[أمس عند الساعة] LT",lastWeek:"dddd [عند الساعة] LT",sameElse:"L"},relativeTime:{future:"بعد %s",past:"منذ %s",s:r("s"),ss:r("s"),m:r("m"),mm:r("m"),h:r("h"),hh:r("h"),d:r("d"),dd:r("d"),M:r("M"),MM:r("M"),y:r("y"),yy:r("y")},preparse:function(e){return e.replace(/،/g,",")},postformat:function(e){return e.replace(/\d/g,(function(e){return t[e]})).replace(/,/g,"،")},week:{dow:6,doy:12}})}(n("./node_modules/moment/moment.js"))},"./node_modules/moment/locale/ar-ma.js":function(e,t,n){!function(e){"use strict";e.defineLocale("ar-ma",{months:"يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر".split("_"),monthsShort:"يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر".split("_"),weekdays:"الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت".split("_"),weekdaysShort:"احد_اثنين_ثلاثاء_اربعاء_خميس_جمعة_سبت".split("_"),weekdaysMin:"ح_ن_ث_ر_خ_ج_س".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[اليوم على الساعة] LT",nextDay:"[غدا على الساعة] LT",nextWeek:"dddd [على الساعة] LT",lastDay:"[أمس على الساعة] LT",lastWeek:"dddd [على الساعة] LT",sameElse:"L"},relativeTime:{future:"في %s",past:"منذ %s",s:"ثوان",ss:"%d ثانية",m:"دقيقة",mm:"%d دقائق",h:"ساعة",hh:"%d ساعات",d:"يوم",dd:"%d أيام",M:"شهر",MM:"%d أشهر",y:"سنة",yy:"%d سنوات"},week:{dow:1,doy:4}})}(n("./node_modules/moment/moment.js"))},"./node_modules/moment/locale/ar-sa.js":function(e,t,n){!function(e){"use strict";var t={1:"١",2:"٢",3:"٣",4:"٤",5:"٥",6:"٦",7:"٧",8:"٨",9:"٩",0:"٠"},n={"١":"1","٢":"2","٣":"3","٤":"4","٥":"5","٦":"6","٧":"7","٨":"8","٩":"9","٠":"0"};e.defineLocale("ar-sa",{months:"يناير_فبراير_مارس_أبريل_مايو_يونيو_يوليو_أغسطس_سبتمبر_أكتوبر_نوفمبر_ديسمبر".split("_"),monthsShort:"يناير_فبراير_مارس_أبريل_مايو_يونيو_يوليو_أغسطس_سبتمبر_أكتوبر_نوفمبر_ديسمبر".split("_"),weekdays:"الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت".split("_"),weekdaysShort:"أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت".split("_"),weekdaysMin:"ح_ن_ث_ر_خ_ج_س".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},meridiemParse:/ص|م/,isPM:function(e){return"م"===e},meridiem:function(e,t,n){return e<12?"ص":"م"},calendar:{sameDay:"[اليوم على الساعة] LT",nextDay:"[غدا على الساعة] LT",nextWeek:"dddd [على الساعة] LT",lastDay:"[أمس على الساعة] LT",lastWeek:"dddd [على الساعة] LT",sameElse:"L"},relativeTime:{future:"في %s",past:"منذ %s",s:"ثوان",ss:"%d ثانية",m:"دقيقة",mm:"%d دقائق",h:"ساعة",hh:"%d ساعات",d:"يوم",dd:"%d أيام",M:"شهر",MM:"%d أشهر",y:"سنة",yy:"%d سنوات"},preparse:function(e){return e.replace(/[١٢٣٤٥٦٧٨٩٠]/g,(function(e){return n[e]})).replace(/،/g,",")},postformat:function(e){return e.replace(/\d/g,(function(e){return t[e]})).replace(/,/g,"،")},week:{dow:0,doy:6}})}(n("./node_modules/moment/moment.js"))},"./node_modules/moment/locale/ar-tn.js":function(e,t,n){!function(e){"use strict";e.defineLocale("ar-tn",{months:"جانفي_فيفري_مارس_أفريل_ماي_جوان_جويلية_أوت_سبتمبر_أكتوبر_نوفمبر_ديسمبر".split("_"),monthsShort:"جانفي_فيفري_مارس_أفريل_ماي_جوان_جويلية_أوت_سبتمبر_أكتوبر_نوفمبر_ديسمبر".split("_"),weekdays:"الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت".split("_"),weekdaysShort:"أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت".split("_"),weekdaysMin:"ح_ن_ث_ر_خ_ج_س".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[اليوم على الساعة] LT",nextDay:"[غدا على الساعة] LT",nextWeek:"dddd [على الساعة] LT",lastDay:"[أمس على الساعة] LT",lastWeek:"dddd [على الساعة] LT",sameElse:"L"},relativeTime:{future:"في %s",past:"منذ %s",s:"ثوان",ss:"%d ثانية",m:"دقيقة",mm:"%d دقائق",h:"ساعة",hh:"%d ساعات",d:"يوم",dd:"%d أيام",M:"شهر",MM:"%d أشهر",y:"سنة",yy:"%d سنوات"},week:{dow:1,doy:4}})}(n("./node_modules/moment/moment.js"))},"./node_modules/moment/locale/ar.js":function(e,t,n){!function(e){"use strict";var t={1:"١",2:"٢",3:"٣",4:"٤",5:"٥",6:"٦",7:"٧",8:"٨",9:"٩",0:"٠"},n={"١":"1","٢":"2","٣":"3","٤":"4","٥":"5","٦":"6","٧":"7","٨":"8","٩":"9","٠":"0"},o=function(e){return 0===e?0:1===e?1:2===e?2:e%100>=3&&e%100<=10?3:e%100>=11?4:5},r={s:["أقل من ثانية","ثانية واحدة",["ثانيتان","ثانيتين"],"%d ثوان","%d ثانية","%d ثانية"],m:["أقل من دقيقة","دقيقة واحدة",["دقيقتان","دقيقتين"],"%d دقائق","%d دقيقة","%d دقيقة"],h:["أقل من ساعة","ساعة واحدة",["ساعتان","ساعتين"],"%d ساعات","%d ساعة","%d ساعة"],d:["أقل من يوم","يوم واحد",["يومان","يومين"],"%d أيام","%d يومًا","%d يوم"],M:["أقل من شهر","شهر واحد",["شهران","شهرين"],"%d أشهر","%d شهرا","%d شهر"],y:["أقل من عام","عام واحد",["عامان","عامين"],"%d أعوام","%d عامًا","%d عام"]},s=function(e){return function(t,n,s,a){var i=o(t),d=r[e][o(t)];return 2===i&&(d=d[n?0:1]),d.replace(/%d/i,t)}},a=["يناير","فبراير","مارس","أبريل","مايو","يونيو","يوليو","أغسطس","سبتمبر","أكتوبر","نوفمبر","ديسمبر"];e.defineLocale("ar",{months:a,monthsShort:a,weekdays:"الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت".split("_"),weekdaysShort:"أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت".split("_"),weekdaysMin:"ح_ن_ث_ر_خ_ج_س".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"D/‏M/‏YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},meridiemParse:/ص|م/,isPM:function(e){return"م"===e},meridiem:function(e,t,n){return e<12?"ص":"م"},calendar:{sameDay:"[اليوم عند الساعة] LT",nextDay:"[غدًا عند الساعة] LT",nextWeek:"dddd [عند الساعة] LT",lastDay:"[أمس عند الساعة] LT",lastWeek:"dddd [عند الساعة] LT",sameElse:"L"},relativeTime:{future:"بعد %s",past:"منذ %s",s:s("s"),ss:s("s"),m:s("m"),mm:s("m"),h:s("h"),hh:s("h"),d:s("d"),dd:s("d"),M:s("M"),MM:s("M"),y:s("y"),yy:s("y")},preparse:function(e){return e.replace(/[١٢٣٤٥٦٧٨٩٠]/g,(function(e){return n[e]})).replace(/،/g,",")},postformat:function(e){return e.replace(/\d/g,(function(e){return t[e]})).replace(/,/g,"،")},week:{dow:6,doy:12}})}(n("./node_modules/moment/moment.js"))},"./node_modules/moment/locale/az.js":function(e,t,n){!function(e){"use strict";var t={1:"-inci",5:"-inci",8:"-inci",70:"-inci",80:"-inci",2:"-nci",7:"-nci",20:"-nci",50:"-nci",3:"-üncü",4:"-üncü",100:"-üncü",6:"-ncı",9:"-uncu",10:"-uncu",30:"-uncu",60:"-ıncı",90:"-ıncı"};e.defineLocale("az",{months:"yanvar_fevral_mart_aprel_may_iyun_iyul_avqust_sentyabr_oktyabr_noyabr_dekabr".split("_"),monthsShort:"yan_fev_mar_apr_may_iyn_iyl_avq_sen_okt_noy_dek".split("_"),weekdays:"Bazar_Bazar ertəsi_Çərşənbə axşamı_Çərşənbə_Cümə axşamı_Cümə_Şənbə".split("_"),weekdaysShort:"Baz_BzE_ÇAx_Çər_CAx_Cüm_Şən".split("_"),weekdaysMin:"Bz_BE_ÇA_Çə_CA_Cü_Şə".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[bugün saat] LT",nextDay:"[sabah saat] LT",nextWeek:"[gələn həftə] dddd [saat] LT",lastDay:"[dünən] LT",lastWeek:"[keçən həftə] dddd [saat] LT",sameElse:"L"},relativeTime:{future:"%s sonra",past:"%s əvvəl",s:"bir neçə saniyə",ss:"%d saniyə",m:"bir dəqiqə",mm:"%d dəqiqə",h:"bir saat",hh:"%d saat",d:"bir gün",dd:"%d gün",M:"bir ay",MM:"%d ay",y:"bir il",yy:"%d il"},meridiemParse:/gecə|səhər|gündüz|axşam/,isPM:function(e){return/^(gündüz|axşam)$/.test(e)},meridiem:function(e,t,n){return e<4?"gecə":e<12?"səhər":e<17?"gündüz":"axşam"},dayOfMonthOrdinalParse:/\d{1,2}-(ıncı|inci|nci|üncü|ncı|uncu)/,ordinal:function(e){if(0===e)return e+"-ıncı";var n=e%10;return e+(t[n]||t[e%100-n]||t[e>=100?100:null])},week:{dow:1,doy:7}})}(n("./node_modules/moment/moment.js"))},"./node_modules/moment/locale/be.js":function(e,t,n){!function(e){"use strict";function t(e,t,n){return"m"===n?t?"хвіліна":"хвіліну":"h"===n?t?"гадзіна":"гадзіну":e+" "+(o=+e,r={ss:t?"секунда_секунды_секунд":"секунду_секунды_секунд",mm:t?"хвіліна_хвіліны_хвілін":"хвіліну_хвіліны_хвілін",hh:t?"гадзіна_гадзіны_гадзін":"гадзіну_гадзіны_гадзін",dd:"дзень_дні_дзён",MM:"месяц_месяцы_месяцаў",yy:"год_гады_гадоў"}[n].split("_"),o%10==1&&o%100!=11?r[0]:o%10>=2&&o%10<=4&&(o%100<10||o%100>=20)?r[1]:r[2]);var o,r}e.defineLocale("be",{months:{format:"студзеня_лютага_сакавіка_красавіка_траўня_чэрвеня_ліпеня_жніўня_верасня_кастрычніка_лістапада_снежня".split("_"),standalone:"студзень_люты_сакавік_красавік_травень_чэрвень_ліпень_жнівень_верасень_кастрычнік_лістапад_снежань".split("_")},monthsShort:"студ_лют_сак_крас_трав_чэрв_ліп_жнів_вер_каст_ліст_снеж".split("_"),weekdays:{format:"нядзелю_панядзелак_аўторак_сераду_чацвер_пятніцу_суботу".split("_"),standalone:"нядзеля_панядзелак_аўторак_серада_чацвер_пятніца_субота".split("_"),isFormat:/\[ ?[Ууў] ?(?:мінулую|наступную)? ?\] ?dddd/},weekdaysShort:"нд_пн_ат_ср_чц_пт_сб".split("_"),weekdaysMin:"нд_пн_ат_ср_чц_пт_сб".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY г.",LLL:"D MMMM YYYY г., HH:mm",LLLL:"dddd, D MMMM YYYY г., HH:mm"},calendar:{sameDay:"[Сёння ў] LT",nextDay:"[Заўтра ў] LT",lastDay:"[Учора ў] LT",nextWeek:function(){return"[У] dddd [ў] LT"},lastWeek:function(){switch(this.day()){case 0:case 3:case 5:case 6:return"[У мінулую] dddd [ў] LT";case 1:case 2:case 4:return"[У мінулы] dddd [ў] LT"}},sameElse:"L"},relativeTime:{future:"праз %s",past:"%s таму",s:"некалькі секунд",m:t,mm:t,h:t,hh:t,d:"дзень",dd:t,M:"месяц",MM:t,y:"год",yy:t},meridiemParse:/ночы|раніцы|дня|вечара/,isPM:function(e){return/^(дня|вечара)$/.test(e)},meridiem:function(e,t,n){return e<4?"ночы":e<12?"раніцы":e<17?"дня":"вечара"},dayOfMonthOrdinalParse:/\d{1,2}-(і|ы|га)/,ordinal:function(e,t){switch(t){case"M":case"d":case"DDD":case"w":case"W":return e%10!=2&&e%10!=3||e%100==12||e%100==13?e+"-ы":e+"-і";case"D":return e+"-га";default:return e}},week:{dow:1,doy:7}})}(n("./node_modules/moment/moment.js"))},"./node_modules/moment/locale/bg.js":function(e,t,n){!function(e){"use strict";e.defineLocale("bg",{months:"януари_февруари_март_април_май_юни_юли_август_септември_октомври_ноември_декември".split("_"),monthsShort:"яну_фев_мар_апр_май_юни_юли_авг_сеп_окт_ное_дек".split("_"),weekdays:"неделя_понеделник_вторник_сряда_четвъртък_петък_събота".split("_"),weekdaysShort:"нед_пон_вто_сря_чет_пет_съб".split("_"),weekdaysMin:"нд_пн_вт_ср_чт_пт_сб".split("_"),longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"D.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY H:mm",LLLL:"dddd, D MMMM YYYY H:mm"},calendar:{sameDay:"[Днес в] LT",nextDay:"[Утре в] LT",nextWeek:"dddd [в] LT",lastDay:"[Вчера в] LT",lastWeek:function(){switch(this.day()){case 0:case 3:case 6:return"[Миналата] dddd [в] LT";case 1:case 2:case 4:case 5:return"[Миналия] dddd [в] LT"}},sameElse:"L"},relativeTime:{future:"след %s",past:"преди %s",s:"няколко секунди",ss:"%d секунди",m:"минута",mm:"%d минути",h:"час",hh:"%d часа",d:"ден",dd:"%d дена",w:"седмица",ww:"%d седмици",M:"месец",MM:"%d месеца",y:"година",yy:"%d години"},dayOfMonthOrdinalParse:/\d{1,2}-(ев|ен|ти|ви|ри|ми)/,ordinal:function(e){var t=e%10,n=e%100;return 0===e?e+"-ев":0===n?e+"-ен":n>10&&n<20?e+"-ти":1===t?e+"-ви":2===t?e+"-ри":7===t||8===t?e+"-ми":e+"-ти"},week:{dow:1,doy:7}})}(n("./node_modules/moment/moment.js"))},"./node_modules/moment/locale/bm.js":function(e,t,n){!function(e){"use strict";e.defineLocale("bm",{months:"Zanwuyekalo_Fewuruyekalo_Marisikalo_Awirilikalo_Mɛkalo_Zuwɛnkalo_Zuluyekalo_Utikalo_Sɛtanburukalo_ɔkutɔburukalo_Nowanburukalo_Desanburukalo".split("_"),monthsShort:"Zan_Few_Mar_Awi_Mɛ_Zuw_Zul_Uti_Sɛt_ɔku_Now_Des".split("_"),weekdays:"Kari_Ntɛnɛn_Tarata_Araba_Alamisa_Juma_Sibiri".split("_"),weekdaysShort:"Kar_Ntɛ_Tar_Ara_Ala_Jum_Sib".split("_"),weekdaysMin:"Ka_Nt_Ta_Ar_Al_Ju_Si".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"MMMM [tile] D [san] YYYY",LLL:"MMMM [tile] D [san] YYYY [lɛrɛ] HH:mm",LLLL:"dddd MMMM [tile] D [san] YYYY [lɛrɛ] HH:mm"},calendar:{sameDay:"[Bi lɛrɛ] LT",nextDay:"[Sini lɛrɛ] LT",nextWeek:"dddd [don lɛrɛ] LT",lastDay:"[Kunu lɛrɛ] LT",lastWeek:"dddd [tɛmɛnen lɛrɛ] LT",sameElse:"L"},relativeTime:{future:"%s kɔnɔ",past:"a bɛ %s bɔ",s:"sanga dama dama",ss:"sekondi %d",m:"miniti kelen",mm:"miniti %d",h:"lɛrɛ kelen",hh:"lɛrɛ %d",d:"tile kelen",dd:"tile %d",M:"kalo kelen",MM:"kalo %d",y:"san kelen",yy:"san %d"},week:{dow:1,doy:4}})}(n("./node_modules/moment/moment.js"))},"./node_modules/moment/locale/bn-bd.js":function(e,t,n){!function(e){"use strict";var t={1:"১",2:"২",3:"৩",4:"৪",5:"৫",6:"৬",7:"৭",8:"৮",9:"৯",0:"০"},n={"১":"1","২":"2","৩":"3","৪":"4","৫":"5","৬":"6","৭":"7","৮":"8","৯":"9","০":"0"};e.defineLocale("bn-bd",{months:"জানুয়ারি_ফেব্রুয়ারি_মার্চ_এপ্রিল_মে_জুন_জুলাই_আগস্ট_সেপ্টেম্বর_অক্টোবর_নভেম্বর_ডিসেম্বর".split("_"),monthsShort:"জানু_ফেব্রু_মার্চ_এপ্রিল_মে_জুন_জুলাই_আগস্ট_সেপ্ট_অক্টো_নভে_ডিসে".split("_"),weekdays:"রবিবার_সোমবার_মঙ্গলবার_বুধবার_বৃহস্পতিবার_শুক্রবার_শনিবার".split("_"),weekdaysShort:"রবি_সোম_মঙ্গল_বুধ_বৃহস্পতি_শুক্র_শনি".split("_"),weekdaysMin:"রবি_সোম_মঙ্গল_বুধ_বৃহ_শুক্র_শনি".split("_"),longDateFormat:{LT:"A h:mm সময়",LTS:"A h:mm:ss সময়",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm সময়",LLLL:"dddd, D MMMM YYYY, A h:mm সময়"},calendar:{sameDay:"[আজ] LT",nextDay:"[আগামীকাল] LT",nextWeek:"dddd, LT",lastDay:"[গতকাল] LT",lastWeek:"[গত] dddd, LT",sameElse:"L"},relativeTime:{future:"%s পরে",past:"%s আগে",s:"কয়েক সেকেন্ড",ss:"%d সেকেন্ড",m:"এক মিনিট",mm:"%d মিনিট",h:"এক ঘন্টা",hh:"%d ঘন্টা",d:"এক দিন",dd:"%d দিন",M:"এক মাস",MM:"%d মাস",y:"এক বছর",yy:"%d বছর"},preparse:function(e){return e.replace(/[১২৩৪৫৬৭৮৯০]/g,(function(e){return n[e]}))},postformat:function(e){return e.replace(/\d/g,(function(e){return t[e]}))},meridiemParse:/রাত|ভোর|সকাল|দুপুর|বিকাল|সন্ধ্যা|রাত/,meridiemHour:function(e,t){return 12===e&&(e=0),"রাত"===t?e<4?e:e+12:"ভোর"===t||"সকাল"===t?e:"দুপুর"===t?e>=3?e:e+12:"বিকাল"===t||"সন্ধ্যা"===t?e+12:void 0},meridiem:function(e,t,n){return e<4?"রাত":e<6?"ভোর":e<12?"সকাল":e<15?"দুপুর":e<18?"বিকাল":e<20?"সন্ধ্যা":"রাত"},week:{dow:0,doy:6}})}(n("./node_modules/moment/moment.js"))},"./node_modules/moment/locale/bn.js":function(e,t,n){!function(e){"use strict";var t={1:"১",2:"২",3:"৩",4:"৪",5:"৫",6:"৬",7:"৭",8:"৮",9:"৯",0:"০"},n={"১":"1","২":"2","৩":"3","৪":"4","৫":"5","৬":"6","৭":"7","৮":"8","৯":"9","০":"0"};e.defineLocale("bn",{months:"জানুয়ারি_ফেব্রুয়ারি_মার্চ_এপ্রিল_মে_জুন_জুলাই_আগস্ট_সেপ্টেম্বর_অক্টোবর_নভেম্বর_ডিসেম্বর".split("_"),monthsShort:"জানু_ফেব্রু_মার্চ_এপ্রিল_মে_জুন_জুলাই_আগস্ট_সেপ্ট_অক্টো_নভে_ডিসে".split("_"),weekdays:"রবিবার_সোমবার_মঙ্গলবার_বুধবার_বৃহস্পতিবার_শুক্রবার_শনিবার".split("_"),weekdaysShort:"রবি_সোম_মঙ্গল_বুধ_বৃহস্পতি_শুক্র_শনি".split("_"),weekdaysMin:"রবি_সোম_মঙ্গল_বুধ_বৃহ_শুক্র_শনি".split("_"),longDateFormat:{LT:"A h:mm সময়",LTS:"A h:mm:ss সময়",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm সময়",LLLL:"dddd, D MMMM YYYY, A h:mm সময়"},calendar:{sameDay:"[আজ] LT",nextDay:"[আগামীকাল] LT",nextWeek:"dddd, LT",lastDay:"[গতকাল] LT",lastWeek:"[গত] dddd, LT",sameElse:"L"},relativeTime:{future:"%s পরে",past:"%s আগে",s:"কয়েক সেকেন্ড",ss:"%d সেকেন্ড",m:"এক মিনিট",mm:"%d মিনিট",h:"এক ঘন্টা",hh:"%d ঘন্টা",d:"এক দিন",dd:"%d দিন",M:"এক মাস",MM:"%d মাস",y:"এক বছর",yy:"%d বছর"},preparse:function(e){return e.replace(/[১২৩৪৫৬৭৮৯০]/g,(function(e){return n[e]}))},postformat:function(e){return e.replace(/\d/g,(function(e){return t[e]}))},meridiemParse:/রাত|সকাল|দুপুর|বিকাল|রাত/,meridiemHour:function(e,t){return 12===e&&(e=0),"রাত"===t&&e>=4||"দুপুর"===t&&e<5||"বিকাল"===t?e+12:e},meridiem:function(e,t,n){return e<4?"রাত":e<10?"সকাল":e<17?"দুপুর":e<20?"বিকাল":"রাত"},week:{dow:0,doy:6}})}(n("./node_modules/moment/moment.js"))},"./node_modules/moment/locale/bo.js":function(e,t,n){!function(e){"use strict";var t={1:"༡",2:"༢",3:"༣",4:"༤",5:"༥",6:"༦",7:"༧",8:"༨",9:"༩",0:"༠"},n={"༡":"1","༢":"2","༣":"3","༤":"4","༥":"5","༦":"6","༧":"7","༨":"8","༩":"9","༠":"0"};e.defineLocale("bo",{months:"ཟླ་བ་དང་པོ_ཟླ་བ་གཉིས་པ_ཟླ་བ་གསུམ་པ_ཟླ་བ་བཞི་པ_ཟླ་བ་ལྔ་པ_ཟླ་བ་དྲུག་པ_ཟླ་བ་བདུན་པ_ཟླ་བ་བརྒྱད་པ_ཟླ་བ་དགུ་པ_ཟླ་བ་བཅུ་པ_ཟླ་བ་བཅུ་གཅིག་པ_ཟླ་བ་བཅུ་གཉིས་པ".split("_"),monthsShort:"ཟླ་1_ཟླ་2_ཟླ་3_ཟླ་4_ཟླ་5_ཟླ་6_ཟླ་7_ཟླ་8_ཟླ་9_ཟླ་10_ཟླ་11_ཟླ་12".split("_"),monthsShortRegex:/^(ཟླ་\d{1,2})/,monthsParseExact:!0,weekdays:"གཟའ་ཉི་མ་_གཟའ་ཟླ་བ་_གཟའ་མིག་དམར་_གཟའ་ལྷག་པ་_གཟའ་ཕུར་བུ_གཟའ་པ་སངས་_གཟའ་སྤེན་པ་".split("_"),weekdaysShort:"ཉི་མ་_ཟླ་བ་_མིག་དམར་_ལྷག་པ་_ཕུར་བུ_པ་སངས་_སྤེན་པ་".split("_"),weekdaysMin:"ཉི_ཟླ_མིག_ལྷག_ཕུར_སངས_སྤེན".split("_"),longDateFormat:{LT:"A h:mm",LTS:"A h:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm",LLLL:"dddd, D MMMM YYYY, A h:mm"},calendar:{sameDay:"[དི་རིང] LT",nextDay:"[སང་ཉིན] LT",nextWeek:"[བདུན་ཕྲག་རྗེས་མ], LT",lastDay:"[ཁ་སང] LT",lastWeek:"[བདུན་ཕྲག་མཐའ་མ] dddd, LT",sameElse:"L"},relativeTime:{future:"%s ལ་",past:"%s སྔན་ལ",s:"ལམ་སང",ss:"%d སྐར་ཆ།",m:"སྐར་མ་གཅིག",mm:"%d སྐར་མ",h:"ཆུ་ཚོད་གཅིག",hh:"%d ཆུ་ཚོད",d:"ཉིན་གཅིག",dd:"%d ཉིན་",M:"ཟླ་བ་གཅིག",MM:"%d ཟླ་བ",y:"ལོ་གཅིག",yy:"%d ལོ"},preparse:function(e){return e.replace(/[༡༢༣༤༥༦༧༨༩༠]/g,(function(e){return n[e]}))},postformat:function(e){return e.replace(/\d/g,(function(e){return t[e]}))},meridiemParse:/མཚན་མོ|ཞོགས་ཀས|ཉིན་གུང|དགོང་དག|མཚན་མོ/,meridiemHour:function(e,t){return 12===e&&(e=0),"མཚན་མོ"===t&&e>=4||"ཉིན་གུང"===t&&e<5||"དགོང་དག"===t?e+12:e},meridiem:function(e,t,n){return e<4?"མཚན་མོ":e<10?"ཞོགས་ཀས":e<17?"ཉིན་གུང":e<20?"དགོང་དག":"མཚན་མོ"},week:{dow:0,doy:6}})}(n("./node_modules/moment/moment.js"))},"./node_modules/moment/locale/br.js":function(e,t,n){!function(e){"use strict";function t(e,t,n){return e+" "+function(e,t){return 2===t?function(e){var t={m:"v",b:"v",d:"z"};return void 0===t[e.charAt(0)]?e:t[e.charAt(0)]+e.substring(1)}(e):e}({mm:"munutenn",MM:"miz",dd:"devezh"}[n],e)}function n(e){return e>9?n(e%10):e}var o=[/^gen/i,/^c[ʼ\']hwe/i,/^meu/i,/^ebr/i,/^mae/i,/^(mez|eve)/i,/^gou/i,/^eos/i,/^gwe/i,/^her/i,/^du/i,/^ker/i],r=/^(genver|c[ʼ\']hwevrer|meurzh|ebrel|mae|mezheven|gouere|eost|gwengolo|here|du|kerzu|gen|c[ʼ\']hwe|meu|ebr|mae|eve|gou|eos|gwe|her|du|ker)/i,s=[/^Su/i,/^Lu/i,/^Me([^r]|$)/i,/^Mer/i,/^Ya/i,/^Gw/i,/^Sa/i];e.defineLocale("br",{months:"Genver_Cʼhwevrer_Meurzh_Ebrel_Mae_Mezheven_Gouere_Eost_Gwengolo_Here_Du_Kerzu".split("_"),monthsShort:"Gen_Cʼhwe_Meu_Ebr_Mae_Eve_Gou_Eos_Gwe_Her_Du_Ker".split("_"),weekdays:"Sul_Lun_Meurzh_Mercʼher_Yaou_Gwener_Sadorn".split("_"),weekdaysShort:"Sul_Lun_Meu_Mer_Yao_Gwe_Sad".split("_"),weekdaysMin:"Su_Lu_Me_Mer_Ya_Gw_Sa".split("_"),weekdaysParse:s,fullWeekdaysParse:[/^sul/i,/^lun/i,/^meurzh/i,/^merc[ʼ\']her/i,/^yaou/i,/^gwener/i,/^sadorn/i],shortWeekdaysParse:[/^Sul/i,/^Lun/i,/^Meu/i,/^Mer/i,/^Yao/i,/^Gwe/i,/^Sad/i],minWeekdaysParse:s,monthsRegex:r,monthsShortRegex:r,monthsStrictRegex:/^(genver|c[ʼ\']hwevrer|meurzh|ebrel|mae|mezheven|gouere|eost|gwengolo|here|du|kerzu)/i,monthsShortStrictRegex:/^(gen|c[ʼ\']hwe|meu|ebr|mae|eve|gou|eos|gwe|her|du|ker)/i,monthsParse:o,longMonthsParse:o,shortMonthsParse:o,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D [a viz] MMMM YYYY",LLL:"D [a viz] MMMM YYYY HH:mm",LLLL:"dddd, D [a viz] MMMM YYYY HH:mm"},calendar:{sameDay:"[Hiziv da] LT",nextDay:"[Warcʼhoazh da] LT",nextWeek:"dddd [da] LT",lastDay:"[Decʼh da] LT",lastWeek:"dddd [paset da] LT",sameElse:"L"},relativeTime:{future:"a-benn %s",past:"%s ʼzo",s:"un nebeud segondennoù",ss:"%d eilenn",m:"ur vunutenn",mm:t,h:"un eur",hh:"%d eur",d:"un devezh",dd:t,M:"ur miz",MM:t,y:"ur bloaz",yy:function(e){switch(n(e)){case 1:case 3:case 4:case 5:case 9:return e+" bloaz";default:return e+" vloaz"}}},dayOfMonthOrdinalParse:/\d{1,2}(añ|vet)/,ordinal:function(e){return e+(1===e?"añ":"vet")},week:{dow:1,doy:4},meridiemParse:/a.m.|g.m./,isPM:function(e){return"g.m."===e},meridiem:function(e,t,n){return e<12?"a.m.":"g.m."}})}(n("./node_modules/moment/moment.js"))},"./node_modules/moment/locale/bs.js":function(e,t,n){!function(e){"use strict";function t(e,t,n){var o=e+" ";switch(n){case"ss":return o+(1===e?"sekunda":2===e||3===e||4===e?"sekunde":"sekundi");case"m":return t?"jedna minuta":"jedne minute";case"mm":return o+(1===e?"minuta":2===e||3===e||4===e?"minute":"minuta");case"h":return t?"jedan sat":"jednog sata";case"hh":return o+(1===e?"sat":2===e||3===e||4===e?"sata":"sati");case"dd":return o+(1===e?"dan":"dana");case"MM":return o+(1===e?"mjesec":2===e||3===e||4===e?"mjeseca":"mjeseci");case"yy":return o+(1===e?"godina":2===e||3===e||4===e?"godine":"godina")}}e.defineLocale("bs",{months:"januar_februar_mart_april_maj_juni_juli_august_septembar_oktobar_novembar_decembar".split("_"),monthsShort:"jan._feb._mar._apr._maj._jun._jul._aug._sep._okt._nov._dec.".split("_"),monthsParseExact:!0,weekdays:"nedjelja_ponedjeljak_utorak_srijeda_četvrtak_petak_subota".split("_"),weekdaysShort:"ned._pon._uto._sri._čet._pet._sub.".split("_"),weekdaysMin:"ne_po_ut_sr_če_pe_su".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm",LLLL:"dddd, D. MMMM YYYY H:mm"},calendar:{sameDay:"[danas u] LT",nextDay:"[sutra u] LT",nextWeek:function(){switch(this.day()){case 0:return"[u] [nedjelju] [u] LT";case 3:return"[u] [srijedu] [u] LT";case 6:return"[u] [subotu] [u] LT";case 1:case 2:case 4:case 5:return"[u] dddd [u] LT"}},lastDay:"[jučer u] LT",lastWeek:function(){switch(this.day()){case 0:case 3:return"[prošlu] dddd [u] LT";case 6:return"[prošle] [subote] [u] LT";case 1:case 2:case 4:case 5:return"[prošli] dddd [u] LT"}},sameElse:"L"},relativeTime:{future:"za %s",past:"prije %s",s:"par sekundi",ss:t,m:t,mm:t,h:t,hh:t,d:"dan",dd:t,M:"mjesec",MM:t,y:"godinu",yy:t},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:7}})}(n("./node_modules/moment/moment.js"))},"./node_modules/moment/locale/ca.js":function(e,t,n){!function(e){"use strict";e.defineLocale("ca",{months:{standalone:"gener_febrer_març_abril_maig_juny_juliol_agost_setembre_octubre_novembre_desembre".split("_"),format:"de gener_de febrer_de març_d'abril_de maig_de juny_de juliol_d'agost_de setembre_d'octubre_de novembre_de desembre".split("_"),isFormat:/D[oD]?(\s)+MMMM/},monthsShort:"gen._febr._març_abr._maig_juny_jul._ag._set._oct._nov._des.".split("_"),monthsParseExact:!0,weekdays:"diumenge_dilluns_dimarts_dimecres_dijous_divendres_dissabte".split("_"),weekdaysShort:"dg._dl._dt._dc._dj._dv._ds.".split("_"),weekdaysMin:"dg_dl_dt_dc_dj_dv_ds".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM [de] YYYY",ll:"D MMM YYYY",LLL:"D MMMM [de] YYYY [a les] H:mm",lll:"D MMM YYYY, H:mm",LLLL:"dddd D MMMM [de] YYYY [a les] H:mm",llll:"ddd D MMM YYYY, H:mm"},calendar:{sameDay:function(){return"[avui a "+(1!==this.hours()?"les":"la")+"] LT"},nextDay:function(){return"[demà a "+(1!==this.hours()?"les":"la")+"] LT"},nextWeek:function(){return"dddd [a "+(1!==this.hours()?"les":"la")+"] LT"},lastDay:function(){return"[ahir a "+(1!==this.hours()?"les":"la")+"] LT"},lastWeek:function(){return"[el] dddd [passat a "+(1!==this.hours()?"les":"la")+"] LT"},sameElse:"L"},relativeTime:{future:"d'aquí %s",past:"fa %s",s:"uns segons",ss:"%d segons",m:"un minut",mm:"%d minuts",h:"una hora",hh:"%d hores",d:"un dia",dd:"%d dies",M:"un mes",MM:"%d mesos",y:"un any",yy:"%d anys"},dayOfMonthOrdinalParse:/\d{1,2}(r|n|t|è|a)/,ordinal:function(e,t){var n=1===e?"r":2===e?"n":3===e?"r":4===e?"t":"è";return"w"!==t&&"W"!==t||(n="a"),e+n},week:{dow:1,doy:4}})}(n("./node_modules/moment/moment.js"))},"./node_modules/moment/locale/cs.js":function(e,t,n){!function(e){"use strict";var t="leden_únor_březen_duben_květen_červen_červenec_srpen_září_říjen_listopad_prosinec".split("_"),n="led_úno_bře_dub_kvě_čvn_čvc_srp_zář_říj_lis_pro".split("_"),o=[/^led/i,/^úno/i,/^bře/i,/^dub/i,/^kvě/i,/^(čvn|červen$|června)/i,/^(čvc|červenec|července)/i,/^srp/i,/^zář/i,/^říj/i,/^lis/i,/^pro/i],r=/^(leden|únor|březen|duben|květen|červenec|července|červen|června|srpen|září|říjen|listopad|prosinec|led|úno|bře|dub|kvě|čvn|čvc|srp|zář|říj|lis|pro)/i;function s(e){return e>1&&e<5&&1!=~~(e/10)}function a(e,t,n,o){var r=e+" ";switch(n){case"s":return t||o?"pár sekund":"pár sekundami";case"ss":return t||o?r+(s(e)?"sekundy":"sekund"):r+"sekundami";case"m":return t?"minuta":o?"minutu":"minutou";case"mm":return t||o?r+(s(e)?"minuty":"minut"):r+"minutami";case"h":return t?"hodina":o?"hodinu":"hodinou";case"hh":return t||o?r+(s(e)?"hodiny":"hodin"):r+"hodinami";case"d":return t||o?"den":"dnem";case"dd":return t||o?r+(s(e)?"dny":"dní"):r+"dny";case"M":return t||o?"měsíc":"měsícem";case"MM":return t||o?r+(s(e)?"měsíce":"měsíců"):r+"měsíci";case"y":return t||o?"rok":"rokem";case"yy":return t||o?r+(s(e)?"roky":"let"):r+"lety"}}e.defineLocale("cs",{months:t,monthsShort:n,monthsRegex:r,monthsShortRegex:r,monthsStrictRegex:/^(leden|ledna|února|únor|březen|března|duben|dubna|květen|května|červenec|července|červen|června|srpen|srpna|září|říjen|října|listopadu|listopad|prosinec|prosince)/i,monthsShortStrictRegex:/^(led|úno|bře|dub|kvě|čvn|čvc|srp|zář|říj|lis|pro)/i,monthsParse:o,longMonthsParse:o,shortMonthsParse:o,weekdays:"neděle_pondělí_úterý_středa_čtvrtek_pátek_sobota".split("_"),weekdaysShort:"ne_po_út_st_čt_pá_so".split("_"),weekdaysMin:"ne_po_út_st_čt_pá_so".split("_"),longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm",LLLL:"dddd D. MMMM YYYY H:mm",l:"D. M. YYYY"},calendar:{sameDay:"[dnes v] LT",nextDay:"[zítra v] LT",nextWeek:function(){switch(this.day()){case 0:return"[v neděli v] LT";case 1:case 2:return"[v] dddd [v] LT";case 3:return"[ve středu v] LT";case 4:return"[ve čtvrtek v] LT";case 5:return"[v pátek v] LT";case 6:return"[v sobotu v] LT"}},lastDay:"[včera v] LT",lastWeek:function(){switch(this.day()){case 0:return"[minulou neděli v] LT";case 1:case 2:return"[minulé] dddd [v] LT";case 3:return"[minulou středu v] LT";case 4:case 5:return"[minulý] dddd [v] LT";case 6:return"[minulou sobotu v] LT"}},sameElse:"L"},relativeTime:{future:"za %s",past:"před %s",s:a,ss:a,m:a,mm:a,h:a,hh:a,d:a,dd:a,M:a,MM:a,y:a,yy:a},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(n("./node_modules/moment/moment.js"))},"./node_modules/moment/locale/cv.js":function(e,t,n){!function(e){"use strict";e.defineLocale("cv",{months:"кӑрлач_нарӑс_пуш_ака_май_ҫӗртме_утӑ_ҫурла_авӑн_юпа_чӳк_раштав".split("_"),monthsShort:"кӑр_нар_пуш_ака_май_ҫӗр_утӑ_ҫур_авн_юпа_чӳк_раш".split("_"),weekdays:"вырсарникун_тунтикун_ытларикун_юнкун_кӗҫнерникун_эрнекун_шӑматкун".split("_"),weekdaysShort:"выр_тун_ытл_юн_кӗҫ_эрн_шӑм".split("_"),weekdaysMin:"вр_тн_ыт_юн_кҫ_эр_шм".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD-MM-YYYY",LL:"YYYY [ҫулхи] MMMM [уйӑхӗн] D[-мӗшӗ]",LLL:"YYYY [ҫулхи] MMMM [уйӑхӗн] D[-мӗшӗ], HH:mm",LLLL:"dddd, YYYY [ҫулхи] MMMM [уйӑхӗн] D[-мӗшӗ], HH:mm"},calendar:{sameDay:"[Паян] LT [сехетре]",nextDay:"[Ыран] LT [сехетре]",lastDay:"[Ӗнер] LT [сехетре]",nextWeek:"[Ҫитес] dddd LT [сехетре]",lastWeek:"[Иртнӗ] dddd LT [сехетре]",sameElse:"L"},relativeTime:{future:function(e){return e+(/сехет$/i.exec(e)?"рен":/ҫул$/i.exec(e)?"тан":"ран")},past:"%s каялла",s:"пӗр-ик ҫеккунт",ss:"%d ҫеккунт",m:"пӗр минут",mm:"%d минут",h:"пӗр сехет",hh:"%d сехет",d:"пӗр кун",dd:"%d кун",M:"пӗр уйӑх",MM:"%d уйӑх",y:"пӗр ҫул",yy:"%d ҫул"},dayOfMonthOrdinalParse:/\d{1,2}-мӗш/,ordinal:"%d-мӗш",week:{dow:1,doy:7}})}(n("./node_modules/moment/moment.js"))},"./node_modules/moment/locale/cy.js":function(e,t,n){!function(e){"use strict";e.defineLocale("cy",{months:"Ionawr_Chwefror_Mawrth_Ebrill_Mai_Mehefin_Gorffennaf_Awst_Medi_Hydref_Tachwedd_Rhagfyr".split("_"),monthsShort:"Ion_Chwe_Maw_Ebr_Mai_Meh_Gor_Aws_Med_Hyd_Tach_Rhag".split("_"),weekdays:"Dydd Sul_Dydd Llun_Dydd Mawrth_Dydd Mercher_Dydd Iau_Dydd Gwener_Dydd Sadwrn".split("_"),weekdaysShort:"Sul_Llun_Maw_Mer_Iau_Gwe_Sad".split("_"),weekdaysMin:"Su_Ll_Ma_Me_Ia_Gw_Sa".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Heddiw am] LT",nextDay:"[Yfory am] LT",nextWeek:"dddd [am] LT",lastDay:"[Ddoe am] LT",lastWeek:"dddd [diwethaf am] LT",sameElse:"L"},relativeTime:{future:"mewn %s",past:"%s yn ôl",s:"ychydig eiliadau",ss:"%d eiliad",m:"munud",mm:"%d munud",h:"awr",hh:"%d awr",d:"diwrnod",dd:"%d diwrnod",M:"mis",MM:"%d mis",y:"blwyddyn",yy:"%d flynedd"},dayOfMonthOrdinalParse:/\d{1,2}(fed|ain|af|il|ydd|ed|eg)/,ordinal:function(e){var t="";return e>20?t=40===e||50===e||60===e||80===e||100===e?"fed":"ain":e>0&&(t=["","af","il","ydd","ydd","ed","ed","ed","fed","fed","fed","eg","fed","eg","eg","fed","eg","eg","fed","eg","fed"][e]),e+t},week:{dow:1,doy:4}})}(n("./node_modules/moment/moment.js"))},"./node_modules/moment/locale/da.js":function(e,t,n){!function(e){"use strict";e.defineLocale("da",{months:"januar_februar_marts_april_maj_juni_juli_august_september_oktober_november_december".split("_"),monthsShort:"jan_feb_mar_apr_maj_jun_jul_aug_sep_okt_nov_dec".split("_"),weekdays:"søndag_mandag_tirsdag_onsdag_torsdag_fredag_lørdag".split("_"),weekdaysShort:"søn_man_tir_ons_tor_fre_lør".split("_"),weekdaysMin:"sø_ma_ti_on_to_fr_lø".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY HH:mm",LLLL:"dddd [d.] D. MMMM YYYY [kl.] HH:mm"},calendar:{sameDay:"[i dag kl.] LT",nextDay:"[i morgen kl.] LT",nextWeek:"på dddd [kl.] LT",lastDay:"[i går kl.] LT",lastWeek:"[i] dddd[s kl.] LT",sameElse:"L"},relativeTime:{future:"om %s",past:"%s siden",s:"få sekunder",ss:"%d sekunder",m:"et minut",mm:"%d minutter",h:"en time",hh:"%d timer",d:"en dag",dd:"%d dage",M:"en måned",MM:"%d måneder",y:"et år",yy:"%d år"},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(n("./node_modules/moment/moment.js"))},"./node_modules/moment/locale/de-at.js":function(e,t,n){!function(e){"use strict";function t(e,t,n,o){var r={m:["eine Minute","einer Minute"],h:["eine Stunde","einer Stunde"],d:["ein Tag","einem Tag"],dd:[e+" Tage",e+" Tagen"],w:["eine Woche","einer Woche"],M:["ein Monat","einem Monat"],MM:[e+" Monate",e+" Monaten"],y:["ein Jahr","einem Jahr"],yy:[e+" Jahre",e+" Jahren"]};return t?r[n][0]:r[n][1]}e.defineLocale("de-at",{months:"Jänner_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember".split("_"),monthsShort:"Jän._Feb._März_Apr._Mai_Juni_Juli_Aug._Sep._Okt._Nov._Dez.".split("_"),monthsParseExact:!0,weekdays:"Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag".split("_"),weekdaysShort:"So._Mo._Di._Mi._Do._Fr._Sa.".split("_"),weekdaysMin:"So_Mo_Di_Mi_Do_Fr_Sa".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY HH:mm",LLLL:"dddd, D. MMMM YYYY HH:mm"},calendar:{sameDay:"[heute um] LT [Uhr]",sameElse:"L",nextDay:"[morgen um] LT [Uhr]",nextWeek:"dddd [um] LT [Uhr]",lastDay:"[gestern um] LT [Uhr]",lastWeek:"[letzten] dddd [um] LT [Uhr]"},relativeTime:{future:"in %s",past:"vor %s",s:"ein paar Sekunden",ss:"%d Sekunden",m:t,mm:"%d Minuten",h:t,hh:"%d Stunden",d:t,dd:t,w:t,ww:"%d Wochen",M:t,MM:t,y:t,yy:t},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(n("./node_modules/moment/moment.js"))},"./node_modules/moment/locale/de-ch.js":function(e,t,n){!function(e){"use strict";function t(e,t,n,o){var r={m:["eine Minute","einer Minute"],h:["eine Stunde","einer Stunde"],d:["ein Tag","einem Tag"],dd:[e+" Tage",e+" Tagen"],w:["eine Woche","einer Woche"],M:["ein Monat","einem Monat"],MM:[e+" Monate",e+" Monaten"],y:["ein Jahr","einem Jahr"],yy:[e+" Jahre",e+" Jahren"]};return t?r[n][0]:r[n][1]}e.defineLocale("de-ch",{months:"Januar_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember".split("_"),monthsShort:"Jan._Feb._März_Apr._Mai_Juni_Juli_Aug._Sep._Okt._Nov._Dez.".split("_"),monthsParseExact:!0,weekdays:"Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag".split("_"),weekdaysShort:"So_Mo_Di_Mi_Do_Fr_Sa".split("_"),weekdaysMin:"So_Mo_Di_Mi_Do_Fr_Sa".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY HH:mm",LLLL:"dddd, D. MMMM YYYY HH:mm"},calendar:{sameDay:"[heute um] LT [Uhr]",sameElse:"L",nextDay:"[morgen um] LT [Uhr]",nextWeek:"dddd [um] LT [Uhr]",lastDay:"[gestern um] LT [Uhr]",lastWeek:"[letzten] dddd [um] LT [Uhr]"},relativeTime:{future:"in %s",past:"vor %s",s:"ein paar Sekunden",ss:"%d Sekunden",m:t,mm:"%d Minuten",h:t,hh:"%d Stunden",d:t,dd:t,w:t,ww:"%d Wochen",M:t,MM:t,y:t,yy:t},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(n("./node_modules/moment/moment.js"))},"./node_modules/moment/locale/de.js":function(e,t,n){!function(e){"use strict";function t(e,t,n,o){var r={m:["eine Minute","einer Minute"],h:["eine Stunde","einer Stunde"],d:["ein Tag","einem Tag"],dd:[e+" Tage",e+" Tagen"],w:["eine Woche","einer Woche"],M:["ein Monat","einem Monat"],MM:[e+" Monate",e+" Monaten"],y:["ein Jahr","einem Jahr"],yy:[e+" Jahre",e+" Jahren"]};return t?r[n][0]:r[n][1]}e.defineLocale("de",{months:"Januar_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember".split("_"),monthsShort:"Jan._Feb._März_Apr._Mai_Juni_Juli_Aug._Sep._Okt._Nov._Dez.".split("_"),monthsParseExact:!0,weekdays:"Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag".split("_"),weekdaysShort:"So._Mo._Di._Mi._Do._Fr._Sa.".split("_"),weekdaysMin:"So_Mo_Di_Mi_Do_Fr_Sa".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY HH:mm",LLLL:"dddd, D. MMMM YYYY HH:mm"},calendar:{sameDay:"[heute um] LT [Uhr]",sameElse:"L",nextDay:"[morgen um] LT [Uhr]",nextWeek:"dddd [um] LT [Uhr]",lastDay:"[gestern um] LT [Uhr]",lastWeek:"[letzten] dddd [um] LT [Uhr]"},relativeTime:{future:"in %s",past:"vor %s",s:"ein paar Sekunden",ss:"%d Sekunden",m:t,mm:"%d Minuten",h:t,hh:"%d Stunden",d:t,dd:t,w:t,ww:"%d Wochen",M:t,MM:t,y:t,yy:t},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(n("./node_modules/moment/moment.js"))},"./node_modules/moment/locale/dv.js":function(e,t,n){!function(e){"use strict";var t=["ޖެނުއަރީ","ފެބްރުއަރީ","މާރިޗު","އޭޕްރީލު","މޭ","ޖޫން","ޖުލައި","އޯގަސްޓު","ސެޕްޓެމްބަރު","އޮކްޓޯބަރު","ނޮވެމްބަރު","ޑިސެމްބަރު"],n=["އާދިއްތަ","ހޯމަ","އަންގާރަ","ބުދަ","ބުރާސްފަތި","ހުކުރު","ހޮނިހިރު"];e.defineLocale("dv",{months:t,monthsShort:t,weekdays:n,weekdaysShort:n,weekdaysMin:"އާދި_ހޯމަ_އަން_ބުދަ_ބުރާ_ހުކު_ހޮނި".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"D/M/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},meridiemParse:/މކ|މފ/,isPM:function(e){return"މފ"===e},meridiem:function(e,t,n){return e<12?"މކ":"މފ"},calendar:{sameDay:"[މިއަދު] LT",nextDay:"[މާދަމާ] LT",nextWeek:"dddd LT",lastDay:"[އިއްޔެ] LT",lastWeek:"[ފާއިތުވި] dddd LT",sameElse:"L"},relativeTime:{future:"ތެރޭގައި %s",past:"ކުރިން %s",s:"ސިކުންތުކޮޅެއް",ss:"d% ސިކުންތު",m:"މިނިޓެއް",mm:"މިނިޓު %d",h:"ގަޑިއިރެއް",hh:"ގަޑިއިރު %d",d:"ދުވަހެއް",dd:"ދުވަސް %d",M:"މަހެއް",MM:"މަސް %d",y:"އަހަރެއް",yy:"އަހަރު %d"},preparse:function(e){return e.replace(/،/g,",")},postformat:function(e){return e.replace(/,/g,"،")},week:{dow:7,doy:12}})}(n("./node_modules/moment/moment.js"))},"./node_modules/moment/locale/el.js":function(e,t,n){!function(e){"use strict";e.defineLocale("el",{monthsNominativeEl:"Ιανουάριος_Φεβρουάριος_Μάρτιος_Απρίλιος_Μάιος_Ιούνιος_Ιούλιος_Αύγουστος_Σεπτέμβριος_Οκτώβριος_Νοέμβριος_Δεκέμβριος".split("_"),monthsGenitiveEl:"Ιανουαρίου_Φεβρουαρίου_Μαρτίου_Απριλίου_Μαΐου_Ιουνίου_Ιουλίου_Αυγούστου_Σεπτεμβρίου_Οκτωβρίου_Νοεμβρίου_Δεκεμβρίου".split("_"),months:function(e,t){return e?"string"==typeof t&&/D/.test(t.substring(0,t.indexOf("MMMM")))?this._monthsGenitiveEl[e.month()]:this._monthsNominativeEl[e.month()]:this._monthsNominativeEl},monthsShort:"Ιαν_Φεβ_Μαρ_Απρ_Μαϊ_Ιουν_Ιουλ_Αυγ_Σεπ_Οκτ_Νοε_Δεκ".split("_"),weekdays:"Κυριακή_Δευτέρα_Τρίτη_Τετάρτη_Πέμπτη_Παρασκευή_Σάββατο".split("_"),weekdaysShort:"Κυρ_Δευ_Τρι_Τετ_Πεμ_Παρ_Σαβ".split("_"),weekdaysMin:"Κυ_Δε_Τρ_Τε_Πε_Πα_Σα".split("_"),meridiem:function(e,t,n){return e>11?n?"μμ":"ΜΜ":n?"πμ":"ΠΜ"},isPM:function(e){return"μ"===(e+"").toLowerCase()[0]},meridiemParse:/[ΠΜ]\.?Μ?\.?/i,longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY h:mm A",LLLL:"dddd, D MMMM YYYY h:mm A"},calendarEl:{sameDay:"[Σήμερα {}] LT",nextDay:"[Αύριο {}] LT",nextWeek:"dddd [{}] LT",lastDay:"[Χθες {}] LT",lastWeek:function(){switch(this.day()){case 6:return"[το προηγούμενο] dddd [{}] LT";default:return"[την προηγούμενη] dddd [{}] LT"}},sameElse:"L"},calendar:function(e,t){var n,o=this._calendarEl[e],r=t&&t.hours();return n=o,("undefined"!=typeof Function&&n instanceof Function||"[object Function]"===Object.prototype.toString.call(n))&&(o=o.apply(t)),o.replace("{}",r%12==1?"στη":"στις")},relativeTime:{future:"σε %s",past:"%s πριν",s:"λίγα δευτερόλεπτα",ss:"%d δευτερόλεπτα",m:"ένα λεπτό",mm:"%d λεπτά",h:"μία ώρα",hh:"%d ώρες",d:"μία μέρα",dd:"%d μέρες",M:"ένας μήνας",MM:"%d μήνες",y:"ένας χρόνος",yy:"%d χρόνια"},dayOfMonthOrdinalParse:/\d{1,2}η/,ordinal:"%dη",week:{dow:1,doy:4}})}(n("./node_modules/moment/moment.js"))},"./node_modules/moment/locale/en-au.js":function(e,t,n){!function(e){"use strict";e.defineLocale("en-au",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY h:mm A",LLLL:"dddd, D MMMM YYYY h:mm A"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},dayOfMonthOrdinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(e){var t=e%10;return e+(1==~~(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")},week:{dow:0,doy:4}})}(n("./node_modules/moment/moment.js"))},"./node_modules/moment/locale/en-ca.js":function(e,t,n){!function(e){"use strict";e.defineLocale("en-ca",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"YYYY-MM-DD",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},dayOfMonthOrdinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(e){var t=e%10;return e+(1==~~(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")}})}(n("./node_modules/moment/moment.js"))},"./node_modules/moment/locale/en-gb.js":function(e,t,n){!function(e){"use strict";e.defineLocale("en-gb",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},dayOfMonthOrdinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(e){var t=e%10;return e+(1==~~(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")},week:{dow:1,doy:4}})}(n("./node_modules/moment/moment.js"))},"./node_modules/moment/locale/en-ie.js":function(e,t,n){!function(e){"use strict";e.defineLocale("en-ie",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},dayOfMonthOrdinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(e){var t=e%10;return e+(1==~~(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")},week:{dow:1,doy:4}})}(n("./node_modules/moment/moment.js"))},"./node_modules/moment/locale/en-il.js":function(e,t,n){!function(e){"use strict";e.defineLocale("en-il",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},dayOfMonthOrdinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(e){var t=e%10;return e+(1==~~(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")}})}(n("./node_modules/moment/moment.js"))},"./node_modules/moment/locale/en-in.js":function(e,t,n){!function(e){"use strict";e.defineLocale("en-in",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY h:mm A",LLLL:"dddd, D MMMM YYYY h:mm A"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},dayOfMonthOrdinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(e){var t=e%10;return e+(1==~~(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")},week:{dow:0,doy:6}})}(n("./node_modules/moment/moment.js"))},"./node_modules/moment/locale/en-nz.js":function(e,t,n){!function(e){"use strict";e.defineLocale("en-nz",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY h:mm A",LLLL:"dddd, D MMMM YYYY h:mm A"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},dayOfMonthOrdinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(e){var t=e%10;return e+(1==~~(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")},week:{dow:1,doy:4}})}(n("./node_modules/moment/moment.js"))},"./node_modules/moment/locale/en-sg.js":function(e,t,n){!function(e){"use strict";e.defineLocale("en-sg",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},dayOfMonthOrdinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(e){var t=e%10;return e+(1==~~(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")},week:{dow:1,doy:4}})}(n("./node_modules/moment/moment.js"))},"./node_modules/moment/locale/eo.js":function(e,t,n){!function(e){"use strict";e.defineLocale("eo",{months:"januaro_februaro_marto_aprilo_majo_junio_julio_aŭgusto_septembro_oktobro_novembro_decembro".split("_"),monthsShort:"jan_feb_mart_apr_maj_jun_jul_aŭg_sept_okt_nov_dec".split("_"),weekdays:"dimanĉo_lundo_mardo_merkredo_ĵaŭdo_vendredo_sabato".split("_"),weekdaysShort:"dim_lun_mard_merk_ĵaŭ_ven_sab".split("_"),weekdaysMin:"di_lu_ma_me_ĵa_ve_sa".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY-MM-DD",LL:"[la] D[-an de] MMMM, YYYY",LLL:"[la] D[-an de] MMMM, YYYY HH:mm",LLLL:"dddd[n], [la] D[-an de] MMMM, YYYY HH:mm",llll:"ddd, [la] D[-an de] MMM, YYYY HH:mm"},meridiemParse:/[ap]\.t\.m/i,isPM:function(e){return"p"===e.charAt(0).toLowerCase()},meridiem:function(e,t,n){return e>11?n?"p.t.m.":"P.T.M.":n?"a.t.m.":"A.T.M."},calendar:{sameDay:"[Hodiaŭ je] LT",nextDay:"[Morgaŭ je] LT",nextWeek:"dddd[n je] LT",lastDay:"[Hieraŭ je] LT",lastWeek:"[pasintan] dddd[n je] LT",sameElse:"L"},relativeTime:{future:"post %s",past:"antaŭ %s",s:"kelkaj sekundoj",ss:"%d sekundoj",m:"unu minuto",mm:"%d minutoj",h:"unu horo",hh:"%d horoj",d:"unu tago",dd:"%d tagoj",M:"unu monato",MM:"%d monatoj",y:"unu jaro",yy:"%d jaroj"},dayOfMonthOrdinalParse:/\d{1,2}a/,ordinal:"%da",week:{dow:1,doy:7}})}(n("./node_modules/moment/moment.js"))},"./node_modules/moment/locale/es-do.js":function(e,t,n){!function(e){"use strict";var t="ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.".split("_"),n="ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic".split("_"),o=[/^ene/i,/^feb/i,/^mar/i,/^abr/i,/^may/i,/^jun/i,/^jul/i,/^ago/i,/^sep/i,/^oct/i,/^nov/i,/^dic/i],r=/^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre|ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i;e.defineLocale("es-do",{months:"enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre".split("_"),monthsShort:function(e,o){return e?/-MMM-/.test(o)?n[e.month()]:t[e.month()]:t},monthsRegex:r,monthsShortRegex:r,monthsStrictRegex:/^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i,monthsShortStrictRegex:/^(ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i,monthsParse:o,longMonthsParse:o,shortMonthsParse:o,weekdays:"domingo_lunes_martes_miércoles_jueves_viernes_sábado".split("_"),weekdaysShort:"dom._lun._mar._mié._jue._vie._sáb.".split("_"),weekdaysMin:"do_lu_ma_mi_ju_vi_sá".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"DD/MM/YYYY",LL:"D [de] MMMM [de] YYYY",LLL:"D [de] MMMM [de] YYYY h:mm A",LLLL:"dddd, D [de] MMMM [de] YYYY h:mm A"},calendar:{sameDay:function(){return"[hoy a la"+(1!==this.hours()?"s":"")+"] LT"},nextDay:function(){return"[mañana a la"+(1!==this.hours()?"s":"")+"] LT"},nextWeek:function(){return"dddd [a la"+(1!==this.hours()?"s":"")+"] LT"},lastDay:function(){return"[ayer a la"+(1!==this.hours()?"s":"")+"] LT"},lastWeek:function(){return"[el] dddd [pasado a la"+(1!==this.hours()?"s":"")+"] LT"},sameElse:"L"},relativeTime:{future:"en %s",past:"hace %s",s:"unos segundos",ss:"%d segundos",m:"un minuto",mm:"%d minutos",h:"una hora",hh:"%d horas",d:"un día",dd:"%d días",w:"una semana",ww:"%d semanas",M:"un mes",MM:"%d meses",y:"un año",yy:"%d años"},dayOfMonthOrdinalParse:/\d{1,2}º/,ordinal:"%dº",week:{dow:1,doy:4}})}(n("./node_modules/moment/moment.js"))},"./node_modules/moment/locale/es-mx.js":function(e,t,n){!function(e){"use strict";var t="ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.".split("_"),n="ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic".split("_"),o=[/^ene/i,/^feb/i,/^mar/i,/^abr/i,/^may/i,/^jun/i,/^jul/i,/^ago/i,/^sep/i,/^oct/i,/^nov/i,/^dic/i],r=/^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre|ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i;e.defineLocale("es-mx",{months:"enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre".split("_"),monthsShort:function(e,o){return e?/-MMM-/.test(o)?n[e.month()]:t[e.month()]:t},monthsRegex:r,monthsShortRegex:r,monthsStrictRegex:/^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i,monthsShortStrictRegex:/^(ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i,monthsParse:o,longMonthsParse:o,shortMonthsParse:o,weekdays:"domingo_lunes_martes_miércoles_jueves_viernes_sábado".split("_"),weekdaysShort:"dom._lun._mar._mié._jue._vie._sáb.".split("_"),weekdaysMin:"do_lu_ma_mi_ju_vi_sá".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD/MM/YYYY",LL:"D [de] MMMM [de] YYYY",LLL:"D [de] MMMM [de] YYYY H:mm",LLLL:"dddd, D [de] MMMM [de] YYYY H:mm"},calendar:{sameDay:function(){return"[hoy a la"+(1!==this.hours()?"s":"")+"] LT"},nextDay:function(){return"[mañana a la"+(1!==this.hours()?"s":"")+"] LT"},nextWeek:function(){return"dddd [a la"+(1!==this.hours()?"s":"")+"] LT"},lastDay:function(){return"[ayer a la"+(1!==this.hours()?"s":"")+"] LT"},lastWeek:function(){return"[el] dddd [pasado a la"+(1!==this.hours()?"s":"")+"] LT"},sameElse:"L"},relativeTime:{future:"en %s",past:"hace %s",s:"unos segundos",ss:"%d segundos",m:"un minuto",mm:"%d minutos",h:"una hora",hh:"%d horas",d:"un día",dd:"%d días",w:"una semana",ww:"%d semanas",M:"un mes",MM:"%d meses",y:"un año",yy:"%d años"},dayOfMonthOrdinalParse:/\d{1,2}º/,ordinal:"%dº",week:{dow:0,doy:4},invalidDate:"Fecha inválida"})}(n("./node_modules/moment/moment.js"))},"./node_modules/moment/locale/es-us.js":function(e,t,n){!function(e){"use strict";var t="ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.".split("_"),n="ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic".split("_"),o=[/^ene/i,/^feb/i,/^mar/i,/^abr/i,/^may/i,/^jun/i,/^jul/i,/^ago/i,/^sep/i,/^oct/i,/^nov/i,/^dic/i],r=/^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre|ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i;e.defineLocale("es-us",{months:"enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre".split("_"),monthsShort:function(e,o){return e?/-MMM-/.test(o)?n[e.month()]:t[e.month()]:t},monthsRegex:r,monthsShortRegex:r,monthsStrictRegex:/^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i,monthsShortStrictRegex:/^(ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i,monthsParse:o,longMonthsParse:o,shortMonthsParse:o,weekdays:"domingo_lunes_martes_miércoles_jueves_viernes_sábado".split("_"),weekdaysShort:"dom._lun._mar._mié._jue._vie._sáb.".split("_"),weekdaysMin:"do_lu_ma_mi_ju_vi_sá".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"MM/DD/YYYY",LL:"D [de] MMMM [de] YYYY",LLL:"D [de] MMMM [de] YYYY h:mm A",LLLL:"dddd, D [de] MMMM [de] YYYY h:mm A"},calendar:{sameDay:function(){return"[hoy a la"+(1!==this.hours()?"s":"")+"] LT"},nextDay:function(){return"[mañana a la"+(1!==this.hours()?"s":"")+"] LT"},nextWeek:function(){return"dddd [a la"+(1!==this.hours()?"s":"")+"] LT"},lastDay:function(){return"[ayer a la"+(1!==this.hours()?"s":"")+"] LT"},lastWeek:function(){return"[el] dddd [pasado a la"+(1!==this.hours()?"s":"")+"] LT"},sameElse:"L"},relativeTime:{future:"en %s",past:"hace %s",s:"unos segundos",ss:"%d segundos",m:"un minuto",mm:"%d minutos",h:"una hora",hh:"%d horas",d:"un día",dd:"%d días",w:"una semana",ww:"%d semanas",M:"un mes",MM:"%d meses",y:"un año",yy:"%d años"},dayOfMonthOrdinalParse:/\d{1,2}º/,ordinal:"%dº",week:{dow:0,doy:6}})}(n("./node_modules/moment/moment.js"))},"./node_modules/moment/locale/es.js":function(e,t,n){!function(e){"use strict";var t="ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.".split("_"),n="ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic".split("_"),o=[/^ene/i,/^feb/i,/^mar/i,/^abr/i,/^may/i,/^jun/i,/^jul/i,/^ago/i,/^sep/i,/^oct/i,/^nov/i,/^dic/i],r=/^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre|ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i;e.defineLocale("es",{months:"enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre".split("_"),monthsShort:function(e,o){return e?/-MMM-/.test(o)?n[e.month()]:t[e.month()]:t},monthsRegex:r,monthsShortRegex:r,monthsStrictRegex:/^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i,monthsShortStrictRegex:/^(ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i,monthsParse:o,longMonthsParse:o,shortMonthsParse:o,weekdays:"domingo_lunes_martes_miércoles_jueves_viernes_sábado".split("_"),weekdaysShort:"dom._lun._mar._mié._jue._vie._sáb.".split("_"),weekdaysMin:"do_lu_ma_mi_ju_vi_sá".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD/MM/YYYY",LL:"D [de] MMMM [de] YYYY",LLL:"D [de] MMMM [de] YYYY H:mm",LLLL:"dddd, D [de] MMMM [de] YYYY H:mm"},calendar:{sameDay:function(){return"[hoy a la"+(1!==this.hours()?"s":"")+"] LT"},nextDay:function(){return"[mañana a la"+(1!==this.hours()?"s":"")+"] LT"},nextWeek:function(){return"dddd [a la"+(1!==this.hours()?"s":"")+"] LT"},lastDay:function(){return"[ayer a la"+(1!==this.hours()?"s":"")+"] LT"},lastWeek:function(){return"[el] dddd [pasado a la"+(1!==this.hours()?"s":"")+"] LT"},sameElse:"L"},relativeTime:{future:"en %s",past:"hace %s",s:"unos segundos",ss:"%d segundos",m:"un minuto",mm:"%d minutos",h:"una hora",hh:"%d horas",d:"un día",dd:"%d días",w:"una semana",ww:"%d semanas",M:"un mes",MM:"%d meses",y:"un año",yy:"%d años"},dayOfMonthOrdinalParse:/\d{1,2}º/,ordinal:"%dº",week:{dow:1,doy:4},invalidDate:"Fecha inválida"})}(n("./node_modules/moment/moment.js"))},"./node_modules/moment/locale/et.js":function(e,t,n){!function(e){"use strict";function t(e,t,n,o){var r={s:["mõne sekundi","mõni sekund","paar sekundit"],ss:[e+"sekundi",e+"sekundit"],m:["ühe minuti","üks minut"],mm:[e+" minuti",e+" minutit"],h:["ühe tunni","tund aega","üks tund"],hh:[e+" tunni",e+" tundi"],d:["ühe päeva","üks päev"],M:["kuu aja","kuu aega","üks kuu"],MM:[e+" kuu",e+" kuud"],y:["ühe aasta","aasta","üks aasta"],yy:[e+" aasta",e+" aastat"]};return t?r[n][2]?r[n][2]:r[n][1]:o?r[n][0]:r[n][1]}e.defineLocale("et",{months:"jaanuar_veebruar_märts_aprill_mai_juuni_juuli_august_september_oktoober_november_detsember".split("_"),monthsShort:"jaan_veebr_märts_apr_mai_juuni_juuli_aug_sept_okt_nov_dets".split("_"),weekdays:"pühapäev_esmaspäev_teisipäev_kolmapäev_neljapäev_reede_laupäev".split("_"),weekdaysShort:"P_E_T_K_N_R_L".split("_"),weekdaysMin:"P_E_T_K_N_R_L".split("_"),longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm",LLLL:"dddd, D. MMMM YYYY H:mm"},calendar:{sameDay:"[Täna,] LT",nextDay:"[Homme,] LT",nextWeek:"[Järgmine] dddd LT",lastDay:"[Eile,] LT",lastWeek:"[Eelmine] dddd LT",sameElse:"L"},relativeTime:{future:"%s pärast",past:"%s tagasi",s:t,ss:t,m:t,mm:t,h:t,hh:t,d:t,dd:"%d päeva",M:t,MM:t,y:t,yy:t},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(n("./node_modules/moment/moment.js"))},"./node_modules/moment/locale/eu.js":function(e,t,n){!function(e){"use strict";e.defineLocale("eu",{months:"urtarrila_otsaila_martxoa_apirila_maiatza_ekaina_uztaila_abuztua_iraila_urria_azaroa_abendua".split("_"),monthsShort:"urt._ots._mar._api._mai._eka._uzt._abu._ira._urr._aza._abe.".split("_"),monthsParseExact:!0,weekdays:"igandea_astelehena_asteartea_asteazkena_osteguna_ostirala_larunbata".split("_"),weekdaysShort:"ig._al._ar._az._og._ol._lr.".split("_"),weekdaysMin:"ig_al_ar_az_og_ol_lr".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY-MM-DD",LL:"YYYY[ko] MMMM[ren] D[a]",LLL:"YYYY[ko] MMMM[ren] D[a] HH:mm",LLLL:"dddd, YYYY[ko] MMMM[ren] D[a] HH:mm",l:"YYYY-M-D",ll:"YYYY[ko] MMM D[a]",lll:"YYYY[ko] MMM D[a] HH:mm",llll:"ddd, YYYY[ko] MMM D[a] HH:mm"},calendar:{sameDay:"[gaur] LT[etan]",nextDay:"[bihar] LT[etan]",nextWeek:"dddd LT[etan]",lastDay:"[atzo] LT[etan]",lastWeek:"[aurreko] dddd LT[etan]",sameElse:"L"},relativeTime:{future:"%s barru",past:"duela %s",s:"segundo batzuk",ss:"%d segundo",m:"minutu bat",mm:"%d minutu",h:"ordu bat",hh:"%d ordu",d:"egun bat",dd:"%d egun",M:"hilabete bat",MM:"%d hilabete",y:"urte bat",yy:"%d urte"},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:7}})}(n("./node_modules/moment/moment.js"))},"./node_modules/moment/locale/fa.js":function(e,t,n){!function(e){"use strict";var t={1:"۱",2:"۲",3:"۳",4:"۴",5:"۵",6:"۶",7:"۷",8:"۸",9:"۹",0:"۰"},n={"۱":"1","۲":"2","۳":"3","۴":"4","۵":"5","۶":"6","۷":"7","۸":"8","۹":"9","۰":"0"};e.defineLocale("fa",{months:"ژانویه_فوریه_مارس_آوریل_مه_ژوئن_ژوئیه_اوت_سپتامبر_اکتبر_نوامبر_دسامبر".split("_"),monthsShort:"ژانویه_فوریه_مارس_آوریل_مه_ژوئن_ژوئیه_اوت_سپتامبر_اکتبر_نوامبر_دسامبر".split("_"),weekdays:"یک‌شنبه_دوشنبه_سه‌شنبه_چهارشنبه_پنج‌شنبه_جمعه_شنبه".split("_"),weekdaysShort:"یک‌شنبه_دوشنبه_سه‌شنبه_چهارشنبه_پنج‌شنبه_جمعه_شنبه".split("_"),weekdaysMin:"ی_د_س_چ_پ_ج_ش".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},meridiemParse:/قبل از ظهر|بعد از ظهر/,isPM:function(e){return/بعد از ظهر/.test(e)},meridiem:function(e,t,n){return e<12?"قبل از ظهر":"بعد از ظهر"},calendar:{sameDay:"[امروز ساعت] LT",nextDay:"[فردا ساعت] LT",nextWeek:"dddd [ساعت] LT",lastDay:"[دیروز ساعت] LT",lastWeek:"dddd [پیش] [ساعت] LT",sameElse:"L"},relativeTime:{future:"در %s",past:"%s پیش",s:"چند ثانیه",ss:"%d ثانیه",m:"یک دقیقه",mm:"%d دقیقه",h:"یک ساعت",hh:"%d ساعت",d:"یک روز",dd:"%d روز",M:"یک ماه",MM:"%d ماه",y:"یک سال",yy:"%d سال"},preparse:function(e){return e.replace(/[۰-۹]/g,(function(e){return n[e]})).replace(/،/g,",")},postformat:function(e){return e.replace(/\d/g,(function(e){return t[e]})).replace(/,/g,"،")},dayOfMonthOrdinalParse:/\d{1,2}م/,ordinal:"%dم",week:{dow:6,doy:12}})}(n("./node_modules/moment/moment.js"))},"./node_modules/moment/locale/fi.js":function(e,t,n){!function(e){"use strict";var t="nolla yksi kaksi kolme neljä viisi kuusi seitsemän kahdeksan yhdeksän".split(" "),n=["nolla","yhden","kahden","kolmen","neljän","viiden","kuuden",t[7],t[8],t[9]];function o(e,o,r,s){var a="";switch(r){case"s":return s?"muutaman sekunnin":"muutama sekunti";case"ss":a=s?"sekunnin":"sekuntia";break;case"m":return s?"minuutin":"minuutti";case"mm":a=s?"minuutin":"minuuttia";break;case"h":return s?"tunnin":"tunti";case"hh":a=s?"tunnin":"tuntia";break;case"d":return s?"päivän":"päivä";case"dd":a=s?"päivän":"päivää";break;case"M":return s?"kuukauden":"kuukausi";case"MM":a=s?"kuukauden":"kuukautta";break;case"y":return s?"vuoden":"vuosi";case"yy":a=s?"vuoden":"vuotta"}return function(e,o){return e<10?o?n[e]:t[e]:e}(e,s)+" "+a}e.defineLocale("fi",{months:"tammikuu_helmikuu_maaliskuu_huhtikuu_toukokuu_kesäkuu_heinäkuu_elokuu_syyskuu_lokakuu_marraskuu_joulukuu".split("_"),monthsShort:"tammi_helmi_maalis_huhti_touko_kesä_heinä_elo_syys_loka_marras_joulu".split("_"),weekdays:"sunnuntai_maanantai_tiistai_keskiviikko_torstai_perjantai_lauantai".split("_"),weekdaysShort:"su_ma_ti_ke_to_pe_la".split("_"),weekdaysMin:"su_ma_ti_ke_to_pe_la".split("_"),longDateFormat:{LT:"HH.mm",LTS:"HH.mm.ss",L:"DD.MM.YYYY",LL:"Do MMMM[ta] YYYY",LLL:"Do MMMM[ta] YYYY, [klo] HH.mm",LLLL:"dddd, Do MMMM[ta] YYYY, [klo] HH.mm",l:"D.M.YYYY",ll:"Do MMM YYYY",lll:"Do MMM YYYY, [klo] HH.mm",llll:"ddd, Do MMM YYYY, [klo] HH.mm"},calendar:{sameDay:"[tänään] [klo] LT",nextDay:"[huomenna] [klo] LT",nextWeek:"dddd [klo] LT",lastDay:"[eilen] [klo] LT",lastWeek:"[viime] dddd[na] [klo] LT",sameElse:"L"},relativeTime:{future:"%s päästä",past:"%s sitten",s:o,ss:o,m:o,mm:o,h:o,hh:o,d:o,dd:o,M:o,MM:o,y:o,yy:o},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(n("./node_modules/moment/moment.js"))},"./node_modules/moment/locale/fil.js":function(e,t,n){!function(e){"use strict";e.defineLocale("fil",{months:"Enero_Pebrero_Marso_Abril_Mayo_Hunyo_Hulyo_Agosto_Setyembre_Oktubre_Nobyembre_Disyembre".split("_"),monthsShort:"Ene_Peb_Mar_Abr_May_Hun_Hul_Ago_Set_Okt_Nob_Dis".split("_"),weekdays:"Linggo_Lunes_Martes_Miyerkules_Huwebes_Biyernes_Sabado".split("_"),weekdaysShort:"Lin_Lun_Mar_Miy_Huw_Biy_Sab".split("_"),weekdaysMin:"Li_Lu_Ma_Mi_Hu_Bi_Sab".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"MM/D/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY HH:mm",LLLL:"dddd, MMMM DD, YYYY HH:mm"},calendar:{sameDay:"LT [ngayong araw]",nextDay:"[Bukas ng] LT",nextWeek:"LT [sa susunod na] dddd",lastDay:"LT [kahapon]",lastWeek:"LT [noong nakaraang] dddd",sameElse:"L"},relativeTime:{future:"sa loob ng %s",past:"%s ang nakalipas",s:"ilang segundo",ss:"%d segundo",m:"isang minuto",mm:"%d minuto",h:"isang oras",hh:"%d oras",d:"isang araw",dd:"%d araw",M:"isang buwan",MM:"%d buwan",y:"isang taon",yy:"%d taon"},dayOfMonthOrdinalParse:/\d{1,2}/,ordinal:function(e){return e},week:{dow:1,doy:4}})}(n("./node_modules/moment/moment.js"))},"./node_modules/moment/locale/fo.js":function(e,t,n){!function(e){"use strict";e.defineLocale("fo",{months:"januar_februar_mars_apríl_mai_juni_juli_august_september_oktober_november_desember".split("_"),monthsShort:"jan_feb_mar_apr_mai_jun_jul_aug_sep_okt_nov_des".split("_"),weekdays:"sunnudagur_mánadagur_týsdagur_mikudagur_hósdagur_fríggjadagur_leygardagur".split("_"),weekdaysShort:"sun_mán_týs_mik_hós_frí_ley".split("_"),weekdaysMin:"su_má_tý_mi_hó_fr_le".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D. MMMM, YYYY HH:mm"},calendar:{sameDay:"[Í dag kl.] LT",nextDay:"[Í morgin kl.] LT",nextWeek:"dddd [kl.] LT",lastDay:"[Í gjár kl.] LT",lastWeek:"[síðstu] dddd [kl] LT",sameElse:"L"},relativeTime:{future:"um %s",past:"%s síðani",s:"fá sekund",ss:"%d sekundir",m:"ein minuttur",mm:"%d minuttir",h:"ein tími",hh:"%d tímar",d:"ein dagur",dd:"%d dagar",M:"ein mánaður",MM:"%d mánaðir",y:"eitt ár",yy:"%d ár"},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(n("./node_modules/moment/moment.js"))},"./node_modules/moment/locale/fr-ca.js":function(e,t,n){!function(e){"use strict";e.defineLocale("fr-ca",{months:"janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre".split("_"),monthsShort:"janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.".split("_"),monthsParseExact:!0,weekdays:"dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi".split("_"),weekdaysShort:"dim._lun._mar._mer._jeu._ven._sam.".split("_"),weekdaysMin:"di_lu_ma_me_je_ve_sa".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY-MM-DD",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[Aujourd’hui à] LT",nextDay:"[Demain à] LT",nextWeek:"dddd [à] LT",lastDay:"[Hier à] LT",lastWeek:"dddd [dernier à] LT",sameElse:"L"},relativeTime:{future:"dans %s",past:"il y a %s",s:"quelques secondes",ss:"%d secondes",m:"une minute",mm:"%d minutes",h:"une heure",hh:"%d heures",d:"un jour",dd:"%d jours",M:"un mois",MM:"%d mois",y:"un an",yy:"%d ans"},dayOfMonthOrdinalParse:/\d{1,2}(er|e)/,ordinal:function(e,t){switch(t){default:case"M":case"Q":case"D":case"DDD":case"d":return e+(1===e?"er":"e");case"w":case"W":return e+(1===e?"re":"e")}}})}(n("./node_modules/moment/moment.js"))},"./node_modules/moment/locale/fr-ch.js":function(e,t,n){!function(e){"use strict";e.defineLocale("fr-ch",{months:"janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre".split("_"),monthsShort:"janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.".split("_"),monthsParseExact:!0,weekdays:"dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi".split("_"),weekdaysShort:"dim._lun._mar._mer._jeu._ven._sam.".split("_"),weekdaysMin:"di_lu_ma_me_je_ve_sa".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[Aujourd’hui à] LT",nextDay:"[Demain à] LT",nextWeek:"dddd [à] LT",lastDay:"[Hier à] LT",lastWeek:"dddd [dernier à] LT",sameElse:"L"},relativeTime:{future:"dans %s",past:"il y a %s",s:"quelques secondes",ss:"%d secondes",m:"une minute",mm:"%d minutes",h:"une heure",hh:"%d heures",d:"un jour",dd:"%d jours",M:"un mois",MM:"%d mois",y:"un an",yy:"%d ans"},dayOfMonthOrdinalParse:/\d{1,2}(er|e)/,ordinal:function(e,t){switch(t){default:case"M":case"Q":case"D":case"DDD":case"d":return e+(1===e?"er":"e");case"w":case"W":return e+(1===e?"re":"e")}},week:{dow:1,doy:4}})}(n("./node_modules/moment/moment.js"))},"./node_modules/moment/locale/fr.js":function(e,t,n){!function(e){"use strict";var t=/(janv\.?|févr\.?|mars|avr\.?|mai|juin|juil\.?|août|sept\.?|oct\.?|nov\.?|déc\.?|janvier|février|mars|avril|mai|juin|juillet|août|septembre|octobre|novembre|décembre)/i,n=[/^janv/i,/^févr/i,/^mars/i,/^avr/i,/^mai/i,/^juin/i,/^juil/i,/^août/i,/^sept/i,/^oct/i,/^nov/i,/^déc/i];e.defineLocale("fr",{months:"janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre".split("_"),monthsShort:"janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.".split("_"),monthsRegex:t,monthsShortRegex:t,monthsStrictRegex:/^(janvier|février|mars|avril|mai|juin|juillet|août|septembre|octobre|novembre|décembre)/i,monthsShortStrictRegex:/(janv\.?|févr\.?|mars|avr\.?|mai|juin|juil\.?|août|sept\.?|oct\.?|nov\.?|déc\.?)/i,monthsParse:n,longMonthsParse:n,shortMonthsParse:n,weekdays:"dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi".split("_"),weekdaysShort:"dim._lun._mar._mer._jeu._ven._sam.".split("_"),weekdaysMin:"di_lu_ma_me_je_ve_sa".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[Aujourd’hui à] LT",nextDay:"[Demain à] LT",nextWeek:"dddd [à] LT",lastDay:"[Hier à] LT",lastWeek:"dddd [dernier à] LT",sameElse:"L"},relativeTime:{future:"dans %s",past:"il y a %s",s:"quelques secondes",ss:"%d secondes",m:"une minute",mm:"%d minutes",h:"une heure",hh:"%d heures",d:"un jour",dd:"%d jours",w:"une semaine",ww:"%d semaines",M:"un mois",MM:"%d mois",y:"un an",yy:"%d ans"},dayOfMonthOrdinalParse:/\d{1,2}(er|)/,ordinal:function(e,t){switch(t){case"D":return e+(1===e?"er":"");default:case"M":case"Q":case"DDD":case"d":return e+(1===e?"er":"e");case"w":case"W":return e+(1===e?"re":"e")}},week:{dow:1,doy:4}})}(n("./node_modules/moment/moment.js"))},"./node_modules/moment/locale/fy.js":function(e,t,n){!function(e){"use strict";var t="jan._feb._mrt._apr._mai_jun._jul._aug._sep._okt._nov._des.".split("_"),n="jan_feb_mrt_apr_mai_jun_jul_aug_sep_okt_nov_des".split("_");e.defineLocale("fy",{months:"jannewaris_febrewaris_maart_april_maaie_juny_july_augustus_septimber_oktober_novimber_desimber".split("_"),monthsShort:function(e,o){return e?/-MMM-/.test(o)?n[e.month()]:t[e.month()]:t},monthsParseExact:!0,weekdays:"snein_moandei_tiisdei_woansdei_tongersdei_freed_sneon".split("_"),weekdaysShort:"si._mo._ti._wo._to._fr._so.".split("_"),weekdaysMin:"Si_Mo_Ti_Wo_To_Fr_So".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD-MM-YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[hjoed om] LT",nextDay:"[moarn om] LT",nextWeek:"dddd [om] LT",lastDay:"[juster om] LT",lastWeek:"[ôfrûne] dddd [om] LT",sameElse:"L"},relativeTime:{future:"oer %s",past:"%s lyn",s:"in pear sekonden",ss:"%d sekonden",m:"ien minút",mm:"%d minuten",h:"ien oere",hh:"%d oeren",d:"ien dei",dd:"%d dagen",M:"ien moanne",MM:"%d moannen",y:"ien jier",yy:"%d jierren"},dayOfMonthOrdinalParse:/\d{1,2}(ste|de)/,ordinal:function(e){return e+(1===e||8===e||e>=20?"ste":"de")},week:{dow:1,doy:4}})}(n("./node_modules/moment/moment.js"))},"./node_modules/moment/locale/ga.js":function(e,t,n){!function(e){"use strict";e.defineLocale("ga",{months:["Eanáir","Feabhra","Márta","Aibreán","Bealtaine","Meitheamh","Iúil","Lúnasa","Meán Fómhair","Deireadh Fómhair","Samhain","Nollaig"],monthsShort:["Ean","Feabh","Márt","Aib","Beal","Meith","Iúil","Lún","M.F.","D.F.","Samh","Noll"],monthsParseExact:!0,weekdays:["Dé Domhnaigh","Dé Luain","Dé Máirt","Dé Céadaoin","Déardaoin","Dé hAoine","Dé Sathairn"],weekdaysShort:["Domh","Luan","Máirt","Céad","Déar","Aoine","Sath"],weekdaysMin:["Do","Lu","Má","Cé","Dé","A","Sa"],longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Inniu ag] LT",nextDay:"[Amárach ag] LT",nextWeek:"dddd [ag] LT",lastDay:"[Inné ag] LT",lastWeek:"dddd [seo caite] [ag] LT",sameElse:"L"},relativeTime:{future:"i %s",past:"%s ó shin",s:"cúpla soicind",ss:"%d soicind",m:"nóiméad",mm:"%d nóiméad",h:"uair an chloig",hh:"%d uair an chloig",d:"lá",dd:"%d lá",M:"mí",MM:"%d míonna",y:"bliain",yy:"%d bliain"},dayOfMonthOrdinalParse:/\d{1,2}(d|na|mh)/,ordinal:function(e){return e+(1===e?"d":e%10==2?"na":"mh")},week:{dow:1,doy:4}})}(n("./node_modules/moment/moment.js"))},"./node_modules/moment/locale/gd.js":function(e,t,n){!function(e){"use strict";e.defineLocale("gd",{months:["Am Faoilleach","An Gearran","Am Màrt","An Giblean","An Cèitean","An t-Ògmhios","An t-Iuchar","An Lùnastal","An t-Sultain","An Dàmhair","An t-Samhain","An Dùbhlachd"],monthsShort:["Faoi","Gear","Màrt","Gibl","Cèit","Ògmh","Iuch","Lùn","Sult","Dàmh","Samh","Dùbh"],monthsParseExact:!0,weekdays:["Didòmhnaich","Diluain","Dimàirt","Diciadain","Diardaoin","Dihaoine","Disathairne"],weekdaysShort:["Did","Dil","Dim","Dic","Dia","Dih","Dis"],weekdaysMin:["Dò","Lu","Mà","Ci","Ar","Ha","Sa"],longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[An-diugh aig] LT",nextDay:"[A-màireach aig] LT",nextWeek:"dddd [aig] LT",lastDay:"[An-dè aig] LT",lastWeek:"dddd [seo chaidh] [aig] LT",sameElse:"L"},relativeTime:{future:"ann an %s",past:"bho chionn %s",s:"beagan diogan",ss:"%d diogan",m:"mionaid",mm:"%d mionaidean",h:"uair",hh:"%d uairean",d:"latha",dd:"%d latha",M:"mìos",MM:"%d mìosan",y:"bliadhna",yy:"%d bliadhna"},dayOfMonthOrdinalParse:/\d{1,2}(d|na|mh)/,ordinal:function(e){return e+(1===e?"d":e%10==2?"na":"mh")},week:{dow:1,doy:4}})}(n("./node_modules/moment/moment.js"))},"./node_modules/moment/locale/gl.js":function(e,t,n){!function(e){"use strict";e.defineLocale("gl",{months:"xaneiro_febreiro_marzo_abril_maio_xuño_xullo_agosto_setembro_outubro_novembro_decembro".split("_"),monthsShort:"xan._feb._mar._abr._mai._xuñ._xul._ago._set._out._nov._dec.".split("_"),monthsParseExact:!0,weekdays:"domingo_luns_martes_mércores_xoves_venres_sábado".split("_"),weekdaysShort:"dom._lun._mar._mér._xov._ven._sáb.".split("_"),weekdaysMin:"do_lu_ma_mé_xo_ve_sá".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD/MM/YYYY",LL:"D [de] MMMM [de] YYYY",LLL:"D [de] MMMM [de] YYYY H:mm",LLLL:"dddd, D [de] MMMM [de] YYYY H:mm"},calendar:{sameDay:function(){return"[hoxe "+(1!==this.hours()?"ás":"á")+"] LT"},nextDay:function(){return"[mañá "+(1!==this.hours()?"ás":"á")+"] LT"},nextWeek:function(){return"dddd ["+(1!==this.hours()?"ás":"a")+"] LT"},lastDay:function(){return"[onte "+(1!==this.hours()?"á":"a")+"] LT"},lastWeek:function(){return"[o] dddd [pasado "+(1!==this.hours()?"ás":"a")+"] LT"},sameElse:"L"},relativeTime:{future:function(e){return 0===e.indexOf("un")?"n"+e:"en "+e},past:"hai %s",s:"uns segundos",ss:"%d segundos",m:"un minuto",mm:"%d minutos",h:"unha hora",hh:"%d horas",d:"un día",dd:"%d días",M:"un mes",MM:"%d meses",y:"un ano",yy:"%d anos"},dayOfMonthOrdinalParse:/\d{1,2}º/,ordinal:"%dº",week:{dow:1,doy:4}})}(n("./node_modules/moment/moment.js"))},"./node_modules/moment/locale/gom-deva.js":function(e,t,n){!function(e){"use strict";function t(e,t,n,o){var r={s:["थोडया सॅकंडांनी","थोडे सॅकंड"],ss:[e+" सॅकंडांनी",e+" सॅकंड"],m:["एका मिणटान","एक मिनूट"],mm:[e+" मिणटांनी",e+" मिणटां"],h:["एका वरान","एक वर"],hh:[e+" वरांनी",e+" वरां"],d:["एका दिसान","एक दीस"],dd:[e+" दिसांनी",e+" दीस"],M:["एका म्हयन्यान","एक म्हयनो"],MM:[e+" म्हयन्यानी",e+" म्हयने"],y:["एका वर्सान","एक वर्स"],yy:[e+" वर्सांनी",e+" वर्सां"]};return o?r[n][0]:r[n][1]}e.defineLocale("gom-deva",{months:{standalone:"जानेवारी_फेब्रुवारी_मार्च_एप्रील_मे_जून_जुलय_ऑगस्ट_सप्टेंबर_ऑक्टोबर_नोव्हेंबर_डिसेंबर".split("_"),format:"जानेवारीच्या_फेब्रुवारीच्या_मार्चाच्या_एप्रीलाच्या_मेयाच्या_जूनाच्या_जुलयाच्या_ऑगस्टाच्या_सप्टेंबराच्या_ऑक्टोबराच्या_नोव्हेंबराच्या_डिसेंबराच्या".split("_"),isFormat:/MMMM(\s)+D[oD]?/},monthsShort:"जाने._फेब्रु._मार्च_एप्री._मे_जून_जुल._ऑग._सप्टें._ऑक्टो._नोव्हें._डिसें.".split("_"),monthsParseExact:!0,weekdays:"आयतार_सोमार_मंगळार_बुधवार_बिरेस्तार_सुक्रार_शेनवार".split("_"),weekdaysShort:"आयत._सोम._मंगळ._बुध._ब्रेस्त._सुक्र._शेन.".split("_"),weekdaysMin:"आ_सो_मं_बु_ब्रे_सु_शे".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"A h:mm [वाजतां]",LTS:"A h:mm:ss [वाजतां]",L:"DD-MM-YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY A h:mm [वाजतां]",LLLL:"dddd, MMMM Do, YYYY, A h:mm [वाजतां]",llll:"ddd, D MMM YYYY, A h:mm [वाजतां]"},calendar:{sameDay:"[आयज] LT",nextDay:"[फाल्यां] LT",nextWeek:"[फुडलो] dddd[,] LT",lastDay:"[काल] LT",lastWeek:"[फाटलो] dddd[,] LT",sameElse:"L"},relativeTime:{future:"%s",past:"%s आदीं",s:t,ss:t,m:t,mm:t,h:t,hh:t,d:t,dd:t,M:t,MM:t,y:t,yy:t},dayOfMonthOrdinalParse:/\d{1,2}(वेर)/,ordinal:function(e,t){switch(t){case"D":return e+"वेर";default:case"M":case"Q":case"DDD":case"d":case"w":case"W":return e}},week:{dow:0,doy:3},meridiemParse:/राती|सकाळीं|दनपारां|सांजे/,meridiemHour:function(e,t){return 12===e&&(e=0),"राती"===t?e<4?e:e+12:"सकाळीं"===t?e:"दनपारां"===t?e>12?e:e+12:"सांजे"===t?e+12:void 0},meridiem:function(e,t,n){return e<4?"राती":e<12?"सकाळीं":e<16?"दनपारां":e<20?"सांजे":"राती"}})}(n("./node_modules/moment/moment.js"))},"./node_modules/moment/locale/gom-latn.js":function(e,t,n){!function(e){"use strict";function t(e,t,n,o){var r={s:["thoddea sekondamni","thodde sekond"],ss:[e+" sekondamni",e+" sekond"],m:["eka mintan","ek minut"],mm:[e+" mintamni",e+" mintam"],h:["eka voran","ek vor"],hh:[e+" voramni",e+" voram"],d:["eka disan","ek dis"],dd:[e+" disamni",e+" dis"],M:["eka mhoinean","ek mhoino"],MM:[e+" mhoineamni",e+" mhoine"],y:["eka vorsan","ek voros"],yy:[e+" vorsamni",e+" vorsam"]};return o?r[n][0]:r[n][1]}e.defineLocale("gom-latn",{months:{standalone:"Janer_Febrer_Mars_Abril_Mai_Jun_Julai_Agost_Setembr_Otubr_Novembr_Dezembr".split("_"),format:"Janerachea_Febrerachea_Marsachea_Abrilachea_Maiachea_Junachea_Julaiachea_Agostachea_Setembrachea_Otubrachea_Novembrachea_Dezembrachea".split("_"),isFormat:/MMMM(\s)+D[oD]?/},monthsShort:"Jan._Feb._Mars_Abr._Mai_Jun_Jul._Ago._Set._Otu._Nov._Dez.".split("_"),monthsParseExact:!0,weekdays:"Aitar_Somar_Mongllar_Budhvar_Birestar_Sukrar_Son'var".split("_"),weekdaysShort:"Ait._Som._Mon._Bud._Bre._Suk._Son.".split("_"),weekdaysMin:"Ai_Sm_Mo_Bu_Br_Su_Sn".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"A h:mm [vazta]",LTS:"A h:mm:ss [vazta]",L:"DD-MM-YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY A h:mm [vazta]",LLLL:"dddd, MMMM Do, YYYY, A h:mm [vazta]",llll:"ddd, D MMM YYYY, A h:mm [vazta]"},calendar:{sameDay:"[Aiz] LT",nextDay:"[Faleam] LT",nextWeek:"[Fuddlo] dddd[,] LT",lastDay:"[Kal] LT",lastWeek:"[Fattlo] dddd[,] LT",sameElse:"L"},relativeTime:{future:"%s",past:"%s adim",s:t,ss:t,m:t,mm:t,h:t,hh:t,d:t,dd:t,M:t,MM:t,y:t,yy:t},dayOfMonthOrdinalParse:/\d{1,2}(er)/,ordinal:function(e,t){switch(t){case"D":return e+"er";default:case"M":case"Q":case"DDD":case"d":case"w":case"W":return e}},week:{dow:0,doy:3},meridiemParse:/rati|sokallim|donparam|sanje/,meridiemHour:function(e,t){return 12===e&&(e=0),"rati"===t?e<4?e:e+12:"sokallim"===t?e:"donparam"===t?e>12?e:e+12:"sanje"===t?e+12:void 0},meridiem:function(e,t,n){return e<4?"rati":e<12?"sokallim":e<16?"donparam":e<20?"sanje":"rati"}})}(n("./node_modules/moment/moment.js"))},"./node_modules/moment/locale/gu.js":function(e,t,n){!function(e){"use strict";var t={1:"૧",2:"૨",3:"૩",4:"૪",5:"૫",6:"૬",7:"૭",8:"૮",9:"૯",0:"૦"},n={"૧":"1","૨":"2","૩":"3","૪":"4","૫":"5","૬":"6","૭":"7","૮":"8","૯":"9","૦":"0"};e.defineLocale("gu",{months:"જાન્યુઆરી_ફેબ્રુઆરી_માર્ચ_એપ્રિલ_મે_જૂન_જુલાઈ_ઑગસ્ટ_સપ્ટેમ્બર_ઑક્ટ્બર_નવેમ્બર_ડિસેમ્બર".split("_"),monthsShort:"જાન્યુ._ફેબ્રુ._માર્ચ_એપ્રિ._મે_જૂન_જુલા._ઑગ._સપ્ટે._ઑક્ટ્._નવે._ડિસે.".split("_"),monthsParseExact:!0,weekdays:"રવિવાર_સોમવાર_મંગળવાર_બુધ્વાર_ગુરુવાર_શુક્રવાર_શનિવાર".split("_"),weekdaysShort:"રવિ_સોમ_મંગળ_બુધ્_ગુરુ_શુક્ર_શનિ".split("_"),weekdaysMin:"ર_સો_મં_બુ_ગુ_શુ_શ".split("_"),longDateFormat:{LT:"A h:mm વાગ્યે",LTS:"A h:mm:ss વાગ્યે",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm વાગ્યે",LLLL:"dddd, D MMMM YYYY, A h:mm વાગ્યે"},calendar:{sameDay:"[આજ] LT",nextDay:"[કાલે] LT",nextWeek:"dddd, LT",lastDay:"[ગઇકાલે] LT",lastWeek:"[પાછલા] dddd, LT",sameElse:"L"},relativeTime:{future:"%s મા",past:"%s પહેલા",s:"અમુક પળો",ss:"%d સેકંડ",m:"એક મિનિટ",mm:"%d મિનિટ",h:"એક કલાક",hh:"%d કલાક",d:"એક દિવસ",dd:"%d દિવસ",M:"એક મહિનો",MM:"%d મહિનો",y:"એક વર્ષ",yy:"%d વર્ષ"},preparse:function(e){return e.replace(/[૧૨૩૪૫૬૭૮૯૦]/g,(function(e){return n[e]}))},postformat:function(e){return e.replace(/\d/g,(function(e){return t[e]}))},meridiemParse:/રાત|બપોર|સવાર|સાંજ/,meridiemHour:function(e,t){return 12===e&&(e=0),"રાત"===t?e<4?e:e+12:"સવાર"===t?e:"બપોર"===t?e>=10?e:e+12:"સાંજ"===t?e+12:void 0},meridiem:function(e,t,n){return e<4?"રાત":e<10?"સવાર":e<17?"બપોર":e<20?"સાંજ":"રાત"},week:{dow:0,doy:6}})}(n("./node_modules/moment/moment.js"))},"./node_modules/moment/locale/he.js":function(e,t,n){!function(e){"use strict";e.defineLocale("he",{months:"ינואר_פברואר_מרץ_אפריל_מאי_יוני_יולי_אוגוסט_ספטמבר_אוקטובר_נובמבר_דצמבר".split("_"),monthsShort:"ינו׳_פבר׳_מרץ_אפר׳_מאי_יוני_יולי_אוג׳_ספט׳_אוק׳_נוב׳_דצמ׳".split("_"),weekdays:"ראשון_שני_שלישי_רביעי_חמישי_שישי_שבת".split("_"),weekdaysShort:"א׳_ב׳_ג׳_ד׳_ה׳_ו׳_ש׳".split("_"),weekdaysMin:"א_ב_ג_ד_ה_ו_ש".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D [ב]MMMM YYYY",LLL:"D [ב]MMMM YYYY HH:mm",LLLL:"dddd, D [ב]MMMM YYYY HH:mm",l:"D/M/YYYY",ll:"D MMM YYYY",lll:"D MMM YYYY HH:mm",llll:"ddd, D MMM YYYY HH:mm"},calendar:{sameDay:"[היום ב־]LT",nextDay:"[מחר ב־]LT",nextWeek:"dddd [בשעה] LT",lastDay:"[אתמול ב־]LT",lastWeek:"[ביום] dddd [האחרון בשעה] LT",sameElse:"L"},relativeTime:{future:"בעוד %s",past:"לפני %s",s:"מספר שניות",ss:"%d שניות",m:"דקה",mm:"%d דקות",h:"שעה",hh:function(e){return 2===e?"שעתיים":e+" שעות"},d:"יום",dd:function(e){return 2===e?"יומיים":e+" ימים"},M:"חודש",MM:function(e){return 2===e?"חודשיים":e+" חודשים"},y:"שנה",yy:function(e){return 2===e?"שנתיים":e%10==0&&10!==e?e+" שנה":e+" שנים"}},meridiemParse:/אחה"צ|לפנה"צ|אחרי הצהריים|לפני הצהריים|לפנות בוקר|בבוקר|בערב/i,isPM:function(e){return/^(אחה"צ|אחרי הצהריים|בערב)$/.test(e)},meridiem:function(e,t,n){return e<5?"לפנות בוקר":e<10?"בבוקר":e<12?n?'לפנה"צ':"לפני הצהריים":e<18?n?'אחה"צ':"אחרי הצהריים":"בערב"}})}(n("./node_modules/moment/moment.js"))},"./node_modules/moment/locale/hi.js":function(e,t,n){!function(e){"use strict";var t={1:"१",2:"२",3:"३",4:"४",5:"५",6:"६",7:"७",8:"८",9:"९",0:"०"},n={"१":"1","२":"2","३":"3","४":"4","५":"5","६":"6","७":"7","८":"8","९":"9","०":"0"},o=[/^जन/i,/^फ़र|फर/i,/^मार्च/i,/^अप्रै/i,/^मई/i,/^जून/i,/^जुल/i,/^अग/i,/^सितं|सित/i,/^अक्टू/i,/^नव|नवं/i,/^दिसं|दिस/i];e.defineLocale("hi",{months:{format:"जनवरी_फ़रवरी_मार्च_अप्रैल_मई_जून_जुलाई_अगस्त_सितम्बर_अक्टूबर_नवम्बर_दिसम्बर".split("_"),standalone:"जनवरी_फरवरी_मार्च_अप्रैल_मई_जून_जुलाई_अगस्त_सितंबर_अक्टूबर_नवंबर_दिसंबर".split("_")},monthsShort:"जन._फ़र._मार्च_अप्रै._मई_जून_जुल._अग._सित._अक्टू._नव._दिस.".split("_"),weekdays:"रविवार_सोमवार_मंगलवार_बुधवार_गुरूवार_शुक्रवार_शनिवार".split("_"),weekdaysShort:"रवि_सोम_मंगल_बुध_गुरू_शुक्र_शनि".split("_"),weekdaysMin:"र_सो_मं_बु_गु_शु_श".split("_"),longDateFormat:{LT:"A h:mm बजे",LTS:"A h:mm:ss बजे",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm बजे",LLLL:"dddd, D MMMM YYYY, A h:mm बजे"},monthsParse:o,longMonthsParse:o,shortMonthsParse:[/^जन/i,/^फ़र/i,/^मार्च/i,/^अप्रै/i,/^मई/i,/^जून/i,/^जुल/i,/^अग/i,/^सित/i,/^अक्टू/i,/^नव/i,/^दिस/i],monthsRegex:/^(जनवरी|जन\.?|फ़रवरी|फरवरी|फ़र\.?|मार्च?|अप्रैल|अप्रै\.?|मई?|जून?|जुलाई|जुल\.?|अगस्त|अग\.?|सितम्बर|सितंबर|सित\.?|अक्टूबर|अक्टू\.?|नवम्बर|नवंबर|नव\.?|दिसम्बर|दिसंबर|दिस\.?)/i,monthsShortRegex:/^(जनवरी|जन\.?|फ़रवरी|फरवरी|फ़र\.?|मार्च?|अप्रैल|अप्रै\.?|मई?|जून?|जुलाई|जुल\.?|अगस्त|अग\.?|सितम्बर|सितंबर|सित\.?|अक्टूबर|अक्टू\.?|नवम्बर|नवंबर|नव\.?|दिसम्बर|दिसंबर|दिस\.?)/i,monthsStrictRegex:/^(जनवरी?|फ़रवरी|फरवरी?|मार्च?|अप्रैल?|मई?|जून?|जुलाई?|अगस्त?|सितम्बर|सितंबर|सित?\.?|अक्टूबर|अक्टू\.?|नवम्बर|नवंबर?|दिसम्बर|दिसंबर?)/i,monthsShortStrictRegex:/^(जन\.?|फ़र\.?|मार्च?|अप्रै\.?|मई?|जून?|जुल\.?|अग\.?|सित\.?|अक्टू\.?|नव\.?|दिस\.?)/i,calendar:{sameDay:"[आज] LT",nextDay:"[कल] LT",nextWeek:"dddd, LT",lastDay:"[कल] LT",lastWeek:"[पिछले] dddd, LT",sameElse:"L"},relativeTime:{future:"%s में",past:"%s पहले",s:"कुछ ही क्षण",ss:"%d सेकंड",m:"एक मिनट",mm:"%d मिनट",h:"एक घंटा",hh:"%d घंटे",d:"एक दिन",dd:"%d दिन",M:"एक महीने",MM:"%d महीने",y:"एक वर्ष",yy:"%d वर्ष"},preparse:function(e){return e.replace(/[१२३४५६७८९०]/g,(function(e){return n[e]}))},postformat:function(e){return e.replace(/\d/g,(function(e){return t[e]}))},meridiemParse:/रात|सुबह|दोपहर|शाम/,meridiemHour:function(e,t){return 12===e&&(e=0),"रात"===t?e<4?e:e+12:"सुबह"===t?e:"दोपहर"===t?e>=10?e:e+12:"शाम"===t?e+12:void 0},meridiem:function(e,t,n){return e<4?"रात":e<10?"सुबह":e<17?"दोपहर":e<20?"शाम":"रात"},week:{dow:0,doy:6}})}(n("./node_modules/moment/moment.js"))},"./node_modules/moment/locale/hr.js":function(e,t,n){!function(e){"use strict";function t(e,t,n){var o=e+" ";switch(n){case"ss":return o+(1===e?"sekunda":2===e||3===e||4===e?"sekunde":"sekundi");case"m":return t?"jedna minuta":"jedne minute";case"mm":return o+(1===e?"minuta":2===e||3===e||4===e?"minute":"minuta");case"h":return t?"jedan sat":"jednog sata";case"hh":return o+(1===e?"sat":2===e||3===e||4===e?"sata":"sati");case"dd":return o+(1===e?"dan":"dana");case"MM":return o+(1===e?"mjesec":2===e||3===e||4===e?"mjeseca":"mjeseci");case"yy":return o+(1===e?"godina":2===e||3===e||4===e?"godine":"godina")}}e.defineLocale("hr",{months:{format:"siječnja_veljače_ožujka_travnja_svibnja_lipnja_srpnja_kolovoza_rujna_listopada_studenoga_prosinca".split("_"),standalone:"siječanj_veljača_ožujak_travanj_svibanj_lipanj_srpanj_kolovoz_rujan_listopad_studeni_prosinac".split("_")},monthsShort:"sij._velj._ožu._tra._svi._lip._srp._kol._ruj._lis._stu._pro.".split("_"),monthsParseExact:!0,weekdays:"nedjelja_ponedjeljak_utorak_srijeda_četvrtak_petak_subota".split("_"),weekdaysShort:"ned._pon._uto._sri._čet._pet._sub.".split("_"),weekdaysMin:"ne_po_ut_sr_če_pe_su".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"Do MMMM YYYY",LLL:"Do MMMM YYYY H:mm",LLLL:"dddd, Do MMMM YYYY H:mm"},calendar:{sameDay:"[danas u] LT",nextDay:"[sutra u] LT",nextWeek:function(){switch(this.day()){case 0:return"[u] [nedjelju] [u] LT";case 3:return"[u] [srijedu] [u] LT";case 6:return"[u] [subotu] [u] LT";case 1:case 2:case 4:case 5:return"[u] dddd [u] LT"}},lastDay:"[jučer u] LT",lastWeek:function(){switch(this.day()){case 0:return"[prošlu] [nedjelju] [u] LT";case 3:return"[prošlu] [srijedu] [u] LT";case 6:return"[prošle] [subote] [u] LT";case 1:case 2:case 4:case 5:return"[prošli] dddd [u] LT"}},sameElse:"L"},relativeTime:{future:"za %s",past:"prije %s",s:"par sekundi",ss:t,m:t,mm:t,h:t,hh:t,d:"dan",dd:t,M:"mjesec",MM:t,y:"godinu",yy:t},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:7}})}(n("./node_modules/moment/moment.js"))},"./node_modules/moment/locale/hu.js":function(e,t,n){!function(e){"use strict";var t="vasárnap hétfőn kedden szerdán csütörtökön pénteken szombaton".split(" ");function n(e,t,n,o){var r=e;switch(n){case"s":return o||t?"néhány másodperc":"néhány másodperce";case"ss":return r+(o||t)?" másodperc":" másodperce";case"m":return"egy"+(o||t?" perc":" perce");case"mm":return r+(o||t?" perc":" perce");case"h":return"egy"+(o||t?" óra":" órája");case"hh":return r+(o||t?" óra":" órája");case"d":return"egy"+(o||t?" nap":" napja");case"dd":return r+(o||t?" nap":" napja");case"M":return"egy"+(o||t?" hónap":" hónapja");case"MM":return r+(o||t?" hónap":" hónapja");case"y":return"egy"+(o||t?" év":" éve");case"yy":return r+(o||t?" év":" éve")}return""}function o(e){return(e?"":"[múlt] ")+"["+t[this.day()]+"] LT[-kor]"}e.defineLocale("hu",{months:"január_február_március_április_május_június_július_augusztus_szeptember_október_november_december".split("_"),monthsShort:"jan._feb._márc._ápr._máj._jún._júl._aug._szept._okt._nov._dec.".split("_"),monthsParseExact:!0,weekdays:"vasárnap_hétfő_kedd_szerda_csütörtök_péntek_szombat".split("_"),weekdaysShort:"vas_hét_kedd_sze_csüt_pén_szo".split("_"),weekdaysMin:"v_h_k_sze_cs_p_szo".split("_"),longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"YYYY.MM.DD.",LL:"YYYY. MMMM D.",LLL:"YYYY. MMMM D. H:mm",LLLL:"YYYY. MMMM D., dddd H:mm"},meridiemParse:/de|du/i,isPM:function(e){return"u"===e.charAt(1).toLowerCase()},meridiem:function(e,t,n){return e<12?!0===n?"de":"DE":!0===n?"du":"DU"},calendar:{sameDay:"[ma] LT[-kor]",nextDay:"[holnap] LT[-kor]",nextWeek:function(){return o.call(this,!0)},lastDay:"[tegnap] LT[-kor]",lastWeek:function(){return o.call(this,!1)},sameElse:"L"},relativeTime:{future:"%s múlva",past:"%s",s:n,ss:n,m:n,mm:n,h:n,hh:n,d:n,dd:n,M:n,MM:n,y:n,yy:n},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(n("./node_modules/moment/moment.js"))},"./node_modules/moment/locale/hy-am.js":function(e,t,n){!function(e){"use strict";e.defineLocale("hy-am",{months:{format:"հունվարի_փետրվարի_մարտի_ապրիլի_մայիսի_հունիսի_հուլիսի_օգոստոսի_սեպտեմբերի_հոկտեմբերի_նոյեմբերի_դեկտեմբերի".split("_"),standalone:"հունվար_փետրվար_մարտ_ապրիլ_մայիս_հունիս_հուլիս_օգոստոս_սեպտեմբեր_հոկտեմբեր_նոյեմբեր_դեկտեմբեր".split("_")},monthsShort:"հնվ_փտր_մրտ_ապր_մյս_հնս_հլս_օգս_սպտ_հկտ_նմբ_դկտ".split("_"),weekdays:"կիրակի_երկուշաբթի_երեքշաբթի_չորեքշաբթի_հինգշաբթի_ուրբաթ_շաբաթ".split("_"),weekdaysShort:"կրկ_երկ_երք_չրք_հնգ_ուրբ_շբթ".split("_"),weekdaysMin:"կրկ_երկ_երք_չրք_հնգ_ուրբ_շբթ".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY թ.",LLL:"D MMMM YYYY թ., HH:mm",LLLL:"dddd, D MMMM YYYY թ., HH:mm"},calendar:{sameDay:"[այսօր] LT",nextDay:"[վաղը] LT",lastDay:"[երեկ] LT",nextWeek:function(){return"dddd [օրը ժամը] LT"},lastWeek:function(){return"[անցած] dddd [օրը ժամը] LT"},sameElse:"L"},relativeTime:{future:"%s հետո",past:"%s առաջ",s:"մի քանի վայրկյան",ss:"%d վայրկյան",m:"րոպե",mm:"%d րոպե",h:"ժամ",hh:"%d ժամ",d:"օր",dd:"%d օր",M:"ամիս",MM:"%d ամիս",y:"տարի",yy:"%d տարի"},meridiemParse:/գիշերվա|առավոտվա|ցերեկվա|երեկոյան/,isPM:function(e){return/^(ցերեկվա|երեկոյան)$/.test(e)},meridiem:function(e){return e<4?"գիշերվա":e<12?"առավոտվա":e<17?"ցերեկվա":"երեկոյան"},dayOfMonthOrdinalParse:/\d{1,2}|\d{1,2}-(ին|րդ)/,ordinal:function(e,t){switch(t){case"DDD":case"w":case"W":case"DDDo":return 1===e?e+"-ին":e+"-րդ";default:return e}},week:{dow:1,doy:7}})}(n("./node_modules/moment/moment.js"))},"./node_modules/moment/locale/id.js":function(e,t,n){!function(e){"use strict";e.defineLocale("id",{months:"Januari_Februari_Maret_April_Mei_Juni_Juli_Agustus_September_Oktober_November_Desember".split("_"),monthsShort:"Jan_Feb_Mar_Apr_Mei_Jun_Jul_Agt_Sep_Okt_Nov_Des".split("_"),weekdays:"Minggu_Senin_Selasa_Rabu_Kamis_Jumat_Sabtu".split("_"),weekdaysShort:"Min_Sen_Sel_Rab_Kam_Jum_Sab".split("_"),weekdaysMin:"Mg_Sn_Sl_Rb_Km_Jm_Sb".split("_"),longDateFormat:{LT:"HH.mm",LTS:"HH.mm.ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY [pukul] HH.mm",LLLL:"dddd, D MMMM YYYY [pukul] HH.mm"},meridiemParse:/pagi|siang|sore|malam/,meridiemHour:function(e,t){return 12===e&&(e=0),"pagi"===t?e:"siang"===t?e>=11?e:e+12:"sore"===t||"malam"===t?e+12:void 0},meridiem:function(e,t,n){return e<11?"pagi":e<15?"siang":e<19?"sore":"malam"},calendar:{sameDay:"[Hari ini pukul] LT",nextDay:"[Besok pukul] LT",nextWeek:"dddd [pukul] LT",lastDay:"[Kemarin pukul] LT",lastWeek:"dddd [lalu pukul] LT",sameElse:"L"},relativeTime:{future:"dalam %s",past:"%s yang lalu",s:"beberapa detik",ss:"%d detik",m:"semenit",mm:"%d menit",h:"sejam",hh:"%d jam",d:"sehari",dd:"%d hari",M:"sebulan",MM:"%d bulan",y:"setahun",yy:"%d tahun"},week:{dow:0,doy:6}})}(n("./node_modules/moment/moment.js"))},"./node_modules/moment/locale/is.js":function(e,t,n){!function(e){"use strict";function t(e){return e%100==11||e%10!=1}function n(e,n,o,r){var s=e+" ";switch(o){case"s":return n||r?"nokkrar sekúndur":"nokkrum sekúndum";case"ss":return t(e)?s+(n||r?"sekúndur":"sekúndum"):s+"sekúnda";case"m":return n?"mínúta":"mínútu";case"mm":return t(e)?s+(n||r?"mínútur":"mínútum"):n?s+"mínúta":s+"mínútu";case"hh":return t(e)?s+(n||r?"klukkustundir":"klukkustundum"):s+"klukkustund";case"d":return n?"dagur":r?"dag":"degi";case"dd":return t(e)?n?s+"dagar":s+(r?"daga":"dögum"):n?s+"dagur":s+(r?"dag":"degi");case"M":return n?"mánuður":r?"mánuð":"mánuði";case"MM":return t(e)?n?s+"mánuðir":s+(r?"mánuði":"mánuðum"):n?s+"mánuður":s+(r?"mánuð":"mánuði");case"y":return n||r?"ár":"ári";case"yy":return t(e)?s+(n||r?"ár":"árum"):s+(n||r?"ár":"ári")}}e.defineLocale("is",{months:"janúar_febrúar_mars_apríl_maí_júní_júlí_ágúst_september_október_nóvember_desember".split("_"),monthsShort:"jan_feb_mar_apr_maí_jún_júl_ágú_sep_okt_nóv_des".split("_"),weekdays:"sunnudagur_mánudagur_þriðjudagur_miðvikudagur_fimmtudagur_föstudagur_laugardagur".split("_"),weekdaysShort:"sun_mán_þri_mið_fim_fös_lau".split("_"),weekdaysMin:"Su_Má_Þr_Mi_Fi_Fö_La".split("_"),longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY [kl.] H:mm",LLLL:"dddd, D. MMMM YYYY [kl.] H:mm"},calendar:{sameDay:"[í dag kl.] LT",nextDay:"[á morgun kl.] LT",nextWeek:"dddd [kl.] LT",lastDay:"[í gær kl.] LT",lastWeek:"[síðasta] dddd [kl.] LT",sameElse:"L"},relativeTime:{future:"eftir %s",past:"fyrir %s síðan",s:n,ss:n,m:n,mm:n,h:"klukkustund",hh:n,d:n,dd:n,M:n,MM:n,y:n,yy:n},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(n("./node_modules/moment/moment.js"))},"./node_modules/moment/locale/it-ch.js":function(e,t,n){!function(e){"use strict";e.defineLocale("it-ch",{months:"gennaio_febbraio_marzo_aprile_maggio_giugno_luglio_agosto_settembre_ottobre_novembre_dicembre".split("_"),monthsShort:"gen_feb_mar_apr_mag_giu_lug_ago_set_ott_nov_dic".split("_"),weekdays:"domenica_lunedì_martedì_mercoledì_giovedì_venerdì_sabato".split("_"),weekdaysShort:"dom_lun_mar_mer_gio_ven_sab".split("_"),weekdaysMin:"do_lu_ma_me_gi_ve_sa".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[Oggi alle] LT",nextDay:"[Domani alle] LT",nextWeek:"dddd [alle] LT",lastDay:"[Ieri alle] LT",lastWeek:function(){switch(this.day()){case 0:return"[la scorsa] dddd [alle] LT";default:return"[lo scorso] dddd [alle] LT"}},sameElse:"L"},relativeTime:{future:function(e){return(/^[0-9].+$/.test(e)?"tra":"in")+" "+e},past:"%s fa",s:"alcuni secondi",ss:"%d secondi",m:"un minuto",mm:"%d minuti",h:"un'ora",hh:"%d ore",d:"un giorno",dd:"%d giorni",M:"un mese",MM:"%d mesi",y:"un anno",yy:"%d anni"},dayOfMonthOrdinalParse:/\d{1,2}º/,ordinal:"%dº",week:{dow:1,doy:4}})}(n("./node_modules/moment/moment.js"))},"./node_modules/moment/locale/it.js":function(e,t,n){!function(e){"use strict";e.defineLocale("it",{months:"gennaio_febbraio_marzo_aprile_maggio_giugno_luglio_agosto_settembre_ottobre_novembre_dicembre".split("_"),monthsShort:"gen_feb_mar_apr_mag_giu_lug_ago_set_ott_nov_dic".split("_"),weekdays:"domenica_lunedì_martedì_mercoledì_giovedì_venerdì_sabato".split("_"),weekdaysShort:"dom_lun_mar_mer_gio_ven_sab".split("_"),weekdaysMin:"do_lu_ma_me_gi_ve_sa".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:function(){return"[Oggi a"+(this.hours()>1?"lle ":0===this.hours()?" ":"ll'")+"]LT"},nextDay:function(){return"[Domani a"+(this.hours()>1?"lle ":0===this.hours()?" ":"ll'")+"]LT"},nextWeek:function(){return"dddd [a"+(this.hours()>1?"lle ":0===this.hours()?" ":"ll'")+"]LT"},lastDay:function(){return"[Ieri a"+(this.hours()>1?"lle ":0===this.hours()?" ":"ll'")+"]LT"},lastWeek:function(){switch(this.day()){case 0:return"[La scorsa] dddd [a"+(this.hours()>1?"lle ":0===this.hours()?" ":"ll'")+"]LT";default:return"[Lo scorso] dddd [a"+(this.hours()>1?"lle ":0===this.hours()?" ":"ll'")+"]LT"}},sameElse:"L"},relativeTime:{future:"tra %s",past:"%s fa",s:"alcuni secondi",ss:"%d secondi",m:"un minuto",mm:"%d minuti",h:"un'ora",hh:"%d ore",d:"un giorno",dd:"%d giorni",w:"una settimana",ww:"%d settimane",M:"un mese",MM:"%d mesi",y:"un anno",yy:"%d anni"},dayOfMonthOrdinalParse:/\d{1,2}º/,ordinal:"%dº",week:{dow:1,doy:4}})}(n("./node_modules/moment/moment.js"))},"./node_modules/moment/locale/ja.js":function(e,t,n){!function(e){"use strict";e.defineLocale("ja",{eras:[{since:"2019-05-01",offset:1,name:"令和",narrow:"㋿",abbr:"R"},{since:"1989-01-08",until:"2019-04-30",offset:1,name:"平成",narrow:"㍻",abbr:"H"},{since:"1926-12-25",until:"1989-01-07",offset:1,name:"昭和",narrow:"㍼",abbr:"S"},{since:"1912-07-30",until:"1926-12-24",offset:1,name:"大正",narrow:"㍽",abbr:"T"},{since:"1873-01-01",until:"1912-07-29",offset:6,name:"明治",narrow:"㍾",abbr:"M"},{since:"0001-01-01",until:"1873-12-31",offset:1,name:"西暦",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-1/0,offset:1,name:"紀元前",narrow:"BC",abbr:"BC"}],eraYearOrdinalRegex:/(元|\d+)年/,eraYearOrdinalParse:function(e,t){return"元"===t[1]?1:parseInt(t[1]||e,10)},months:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),weekdays:"日曜日_月曜日_火曜日_水曜日_木曜日_金曜日_土曜日".split("_"),weekdaysShort:"日_月_火_水_木_金_土".split("_"),weekdaysMin:"日_月_火_水_木_金_土".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY/MM/DD",LL:"YYYY年M月D日",LLL:"YYYY年M月D日 HH:mm",LLLL:"YYYY年M月D日 dddd HH:mm",l:"YYYY/MM/DD",ll:"YYYY年M月D日",lll:"YYYY年M月D日 HH:mm",llll:"YYYY年M月D日(ddd) HH:mm"},meridiemParse:/午前|午後/i,isPM:function(e){return"午後"===e},meridiem:function(e,t,n){return e<12?"午前":"午後"},calendar:{sameDay:"[今日] LT",nextDay:"[明日] LT",nextWeek:function(e){return e.week()!==this.week()?"[来週]dddd LT":"dddd LT"},lastDay:"[昨日] LT",lastWeek:function(e){return this.week()!==e.week()?"[先週]dddd LT":"dddd LT"},sameElse:"L"},dayOfMonthOrdinalParse:/\d{1,2}日/,ordinal:function(e,t){switch(t){case"y":return 1===e?"元年":e+"年";case"d":case"D":case"DDD":return e+"日";default:return e}},relativeTime:{future:"%s後",past:"%s前",s:"数秒",ss:"%d秒",m:"1分",mm:"%d分",h:"1時間",hh:"%d時間",d:"1日",dd:"%d日",M:"1ヶ月",MM:"%dヶ月",y:"1年",yy:"%d年"}})}(n("./node_modules/moment/moment.js"))},"./node_modules/moment/locale/jv.js":function(e,t,n){!function(e){"use strict";e.defineLocale("jv",{months:"Januari_Februari_Maret_April_Mei_Juni_Juli_Agustus_September_Oktober_Nopember_Desember".split("_"),monthsShort:"Jan_Feb_Mar_Apr_Mei_Jun_Jul_Ags_Sep_Okt_Nop_Des".split("_"),weekdays:"Minggu_Senen_Seloso_Rebu_Kemis_Jemuwah_Septu".split("_"),weekdaysShort:"Min_Sen_Sel_Reb_Kem_Jem_Sep".split("_"),weekdaysMin:"Mg_Sn_Sl_Rb_Km_Jm_Sp".split("_"),longDateFormat:{LT:"HH.mm",LTS:"HH.mm.ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY [pukul] HH.mm",LLLL:"dddd, D MMMM YYYY [pukul] HH.mm"},meridiemParse:/enjing|siyang|sonten|ndalu/,meridiemHour:function(e,t){return 12===e&&(e=0),"enjing"===t?e:"siyang"===t?e>=11?e:e+12:"sonten"===t||"ndalu"===t?e+12:void 0},meridiem:function(e,t,n){return e<11?"enjing":e<15?"siyang":e<19?"sonten":"ndalu"},calendar:{sameDay:"[Dinten puniko pukul] LT",nextDay:"[Mbenjang pukul] LT",nextWeek:"dddd [pukul] LT",lastDay:"[Kala wingi pukul] LT",lastWeek:"dddd [kepengker pukul] LT",sameElse:"L"},relativeTime:{future:"wonten ing %s",past:"%s ingkang kepengker",s:"sawetawis detik",ss:"%d detik",m:"setunggal menit",mm:"%d menit",h:"setunggal jam",hh:"%d jam",d:"sedinten",dd:"%d dinten",M:"sewulan",MM:"%d wulan",y:"setaun",yy:"%d taun"},week:{dow:1,doy:7}})}(n("./node_modules/moment/moment.js"))},"./node_modules/moment/locale/ka.js":function(e,t,n){!function(e){"use strict";e.defineLocale("ka",{months:"იანვარი_თებერვალი_მარტი_აპრილი_მაისი_ივნისი_ივლისი_აგვისტო_სექტემბერი_ოქტომბერი_ნოემბერი_დეკემბერი".split("_"),monthsShort:"იან_თებ_მარ_აპრ_მაი_ივნ_ივლ_აგვ_სექ_ოქტ_ნოე_დეკ".split("_"),weekdays:{standalone:"კვირა_ორშაბათი_სამშაბათი_ოთხშაბათი_ხუთშაბათი_პარასკევი_შაბათი".split("_"),format:"კვირას_ორშაბათს_სამშაბათს_ოთხშაბათს_ხუთშაბათს_პარასკევს_შაბათს".split("_"),isFormat:/(წინა|შემდეგ)/},weekdaysShort:"კვი_ორშ_სამ_ოთხ_ხუთ_პარ_შაბ".split("_"),weekdaysMin:"კვ_ორ_სა_ოთ_ხუ_პა_შა".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[დღეს] LT[-ზე]",nextDay:"[ხვალ] LT[-ზე]",lastDay:"[გუშინ] LT[-ზე]",nextWeek:"[შემდეგ] dddd LT[-ზე]",lastWeek:"[წინა] dddd LT-ზე",sameElse:"L"},relativeTime:{future:function(e){return e.replace(/(წამ|წუთ|საათ|წელ|დღ|თვ)(ი|ე)/,(function(e,t,n){return"ი"===n?t+"ში":t+n+"ში"}))},past:function(e){return/(წამი|წუთი|საათი|დღე|თვე)/.test(e)?e.replace(/(ი|ე)$/,"ის წინ"):/წელი/.test(e)?e.replace(/წელი$/,"წლის წინ"):e},s:"რამდენიმე წამი",ss:"%d წამი",m:"წუთი",mm:"%d წუთი",h:"საათი",hh:"%d საათი",d:"დღე",dd:"%d დღე",M:"თვე",MM:"%d თვე",y:"წელი",yy:"%d წელი"},dayOfMonthOrdinalParse:/0|1-ლი|მე-\d{1,2}|\d{1,2}-ე/,ordinal:function(e){return 0===e?e:1===e?e+"-ლი":e<20||e<=100&&e%20==0||e%100==0?"მე-"+e:e+"-ე"},week:{dow:1,doy:7}})}(n("./node_modules/moment/moment.js"))},"./node_modules/moment/locale/kk.js":function(e,t,n){!function(e){"use strict";var t={0:"-ші",1:"-ші",2:"-ші",3:"-ші",4:"-ші",5:"-ші",6:"-шы",7:"-ші",8:"-ші",9:"-шы",10:"-шы",20:"-шы",30:"-шы",40:"-шы",50:"-ші",60:"-шы",70:"-ші",80:"-ші",90:"-шы",100:"-ші"};e.defineLocale("kk",{months:"қаңтар_ақпан_наурыз_сәуір_мамыр_маусым_шілде_тамыз_қыркүйек_қазан_қараша_желтоқсан".split("_"),monthsShort:"қаң_ақп_нау_сәу_мам_мау_шіл_там_қыр_қаз_қар_жел".split("_"),weekdays:"жексенбі_дүйсенбі_сейсенбі_сәрсенбі_бейсенбі_жұма_сенбі".split("_"),weekdaysShort:"жек_дүй_сей_сәр_бей_жұм_сен".split("_"),weekdaysMin:"жк_дй_сй_ср_бй_жм_сн".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Бүгін сағат] LT",nextDay:"[Ертең сағат] LT",nextWeek:"dddd [сағат] LT",lastDay:"[Кеше сағат] LT",lastWeek:"[Өткен аптаның] dddd [сағат] LT",sameElse:"L"},relativeTime:{future:"%s ішінде",past:"%s бұрын",s:"бірнеше секунд",ss:"%d секунд",m:"бір минут",mm:"%d минут",h:"бір сағат",hh:"%d сағат",d:"бір күн",dd:"%d күн",M:"бір ай",MM:"%d ай",y:"бір жыл",yy:"%d жыл"},dayOfMonthOrdinalParse:/\d{1,2}-(ші|шы)/,ordinal:function(e){return e+(t[e]||t[e%10]||t[e>=100?100:null])},week:{dow:1,doy:7}})}(n("./node_modules/moment/moment.js"))},"./node_modules/moment/locale/km.js":function(e,t,n){!function(e){"use strict";var t={1:"១",2:"២",3:"៣",4:"៤",5:"៥",6:"៦",7:"៧",8:"៨",9:"៩",0:"០"},n={"១":"1","២":"2","៣":"3","៤":"4","៥":"5","៦":"6","៧":"7","៨":"8","៩":"9","០":"0"};e.defineLocale("km",{months:"មករា_កុម្ភៈ_មីនា_មេសា_ឧសភា_មិថុនា_កក្កដា_សីហា_កញ្ញា_តុលា_វិច្ឆិកា_ធ្នូ".split("_"),monthsShort:"មករា_កុម្ភៈ_មីនា_មេសា_ឧសភា_មិថុនា_កក្កដា_សីហា_កញ្ញា_តុលា_វិច្ឆិកា_ធ្នូ".split("_"),weekdays:"អាទិត្យ_ច័ន្ទ_អង្គារ_ពុធ_ព្រហស្បតិ៍_សុក្រ_សៅរ៍".split("_"),weekdaysShort:"អា_ច_អ_ព_ព្រ_សុ_ស".split("_"),weekdaysMin:"អា_ច_អ_ព_ព្រ_សុ_ស".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},meridiemParse:/ព្រឹក|ល្ងាច/,isPM:function(e){return"ល្ងាច"===e},meridiem:function(e,t,n){return e<12?"ព្រឹក":"ល្ងាច"},calendar:{sameDay:"[ថ្ងៃនេះ ម៉ោង] LT",nextDay:"[ស្អែក ម៉ោង] LT",nextWeek:"dddd [ម៉ោង] LT",lastDay:"[ម្សិលមិញ ម៉ោង] LT",lastWeek:"dddd [សប្តាហ៍មុន] [ម៉ោង] LT",sameElse:"L"},relativeTime:{future:"%sទៀត",past:"%sមុន",s:"ប៉ុន្មានវិនាទី",ss:"%d វិនាទី",m:"មួយនាទី",mm:"%d នាទី",h:"មួយម៉ោង",hh:"%d ម៉ោង",d:"មួយថ្ងៃ",dd:"%d ថ្ងៃ",M:"មួយខែ",MM:"%d ខែ",y:"មួយឆ្នាំ",yy:"%d ឆ្នាំ"},dayOfMonthOrdinalParse:/ទី\d{1,2}/,ordinal:"ទី%d",preparse:function(e){return e.replace(/[១២៣៤៥៦៧៨៩០]/g,(function(e){return n[e]}))},postformat:function(e){return e.replace(/\d/g,(function(e){return t[e]}))},week:{dow:1,doy:4}})}(n("./node_modules/moment/moment.js"))},"./node_modules/moment/locale/kn.js":function(e,t,n){!function(e){"use strict";var t={1:"೧",2:"೨",3:"೩",4:"೪",5:"೫",6:"೬",7:"೭",8:"೮",9:"೯",0:"೦"},n={"೧":"1","೨":"2","೩":"3","೪":"4","೫":"5","೬":"6","೭":"7","೮":"8","೯":"9","೦":"0"};e.defineLocale("kn",{months:"ಜನವರಿ_ಫೆಬ್ರವರಿ_ಮಾರ್ಚ್_ಏಪ್ರಿಲ್_ಮೇ_ಜೂನ್_ಜುಲೈ_ಆಗಸ್ಟ್_ಸೆಪ್ಟೆಂಬರ್_ಅಕ್ಟೋಬರ್_ನವೆಂಬರ್_ಡಿಸೆಂಬರ್".split("_"),monthsShort:"ಜನ_ಫೆಬ್ರ_ಮಾರ್ಚ್_ಏಪ್ರಿಲ್_ಮೇ_ಜೂನ್_ಜುಲೈ_ಆಗಸ್ಟ್_ಸೆಪ್ಟೆಂ_ಅಕ್ಟೋ_ನವೆಂ_ಡಿಸೆಂ".split("_"),monthsParseExact:!0,weekdays:"ಭಾನುವಾರ_ಸೋಮವಾರ_ಮಂಗಳವಾರ_ಬುಧವಾರ_ಗುರುವಾರ_ಶುಕ್ರವಾರ_ಶನಿವಾರ".split("_"),weekdaysShort:"ಭಾನು_ಸೋಮ_ಮಂಗಳ_ಬುಧ_ಗುರು_ಶುಕ್ರ_ಶನಿ".split("_"),weekdaysMin:"ಭಾ_ಸೋ_ಮಂ_ಬು_ಗು_ಶು_ಶ".split("_"),longDateFormat:{LT:"A h:mm",LTS:"A h:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm",LLLL:"dddd, D MMMM YYYY, A h:mm"},calendar:{sameDay:"[ಇಂದು] LT",nextDay:"[ನಾಳೆ] LT",nextWeek:"dddd, LT",lastDay:"[ನಿನ್ನೆ] LT",lastWeek:"[ಕೊನೆಯ] dddd, LT",sameElse:"L"},relativeTime:{future:"%s ನಂತರ",past:"%s ಹಿಂದೆ",s:"ಕೆಲವು ಕ್ಷಣಗಳು",ss:"%d ಸೆಕೆಂಡುಗಳು",m:"ಒಂದು ನಿಮಿಷ",mm:"%d ನಿಮಿಷ",h:"ಒಂದು ಗಂಟೆ",hh:"%d ಗಂಟೆ",d:"ಒಂದು ದಿನ",dd:"%d ದಿನ",M:"ಒಂದು ತಿಂಗಳು",MM:"%d ತಿಂಗಳು",y:"ಒಂದು ವರ್ಷ",yy:"%d ವರ್ಷ"},preparse:function(e){return e.replace(/[೧೨೩೪೫೬೭೮೯೦]/g,(function(e){return n[e]}))},postformat:function(e){return e.replace(/\d/g,(function(e){return t[e]}))},meridiemParse:/ರಾತ್ರಿ|ಬೆಳಿಗ್ಗೆ|ಮಧ್ಯಾಹ್ನ|ಸಂಜೆ/,meridiemHour:function(e,t){return 12===e&&(e=0),"ರಾತ್ರಿ"===t?e<4?e:e+12:"ಬೆಳಿಗ್ಗೆ"===t?e:"ಮಧ್ಯಾಹ್ನ"===t?e>=10?e:e+12:"ಸಂಜೆ"===t?e+12:void 0},meridiem:function(e,t,n){return e<4?"ರಾತ್ರಿ":e<10?"ಬೆಳಿಗ್ಗೆ":e<17?"ಮಧ್ಯಾಹ್ನ":e<20?"ಸಂಜೆ":"ರಾತ್ರಿ"},dayOfMonthOrdinalParse:/\d{1,2}(ನೇ)/,ordinal:function(e){return e+"ನೇ"},week:{dow:0,doy:6}})}(n("./node_modules/moment/moment.js"))},"./node_modules/moment/locale/ko.js":function(e,t,n){!function(e){"use strict";e.defineLocale("ko",{months:"1월_2월_3월_4월_5월_6월_7월_8월_9월_10월_11월_12월".split("_"),monthsShort:"1월_2월_3월_4월_5월_6월_7월_8월_9월_10월_11월_12월".split("_"),weekdays:"일요일_월요일_화요일_수요일_목요일_금요일_토요일".split("_"),weekdaysShort:"일_월_화_수_목_금_토".split("_"),weekdaysMin:"일_월_화_수_목_금_토".split("_"),longDateFormat:{LT:"A h:mm",LTS:"A h:mm:ss",L:"YYYY.MM.DD.",LL:"YYYY년 MMMM D일",LLL:"YYYY년 MMMM D일 A h:mm",LLLL:"YYYY년 MMMM D일 dddd A h:mm",l:"YYYY.MM.DD.",ll:"YYYY년 MMMM D일",lll:"YYYY년 MMMM D일 A h:mm",llll:"YYYY년 MMMM D일 dddd A h:mm"},calendar:{sameDay:"오늘 LT",nextDay:"내일 LT",nextWeek:"dddd LT",lastDay:"어제 LT",lastWeek:"지난주 dddd LT",sameElse:"L"},relativeTime:{future:"%s 후",past:"%s 전",s:"몇 초",ss:"%d초",m:"1분",mm:"%d분",h:"한 시간",hh:"%d시간",d:"하루",dd:"%d일",M:"한 달",MM:"%d달",y:"일 년",yy:"%d년"},dayOfMonthOrdinalParse:/\d{1,2}(일|월|주)/,ordinal:function(e,t){switch(t){case"d":case"D":case"DDD":return e+"일";case"M":return e+"월";case"w":case"W":return e+"주";default:return e}},meridiemParse:/오전|오후/,isPM:function(e){return"오후"===e},meridiem:function(e,t,n){return e<12?"오전":"오후"}})}(n("./node_modules/moment/moment.js"))},"./node_modules/moment/locale/ku.js":function(e,t,n){!function(e){"use strict";var t={1:"١",2:"٢",3:"٣",4:"٤",5:"٥",6:"٦",7:"٧",8:"٨",9:"٩",0:"٠"},n={"١":"1","٢":"2","٣":"3","٤":"4","٥":"5","٦":"6","٧":"7","٨":"8","٩":"9","٠":"0"},o=["کانونی دووەم","شوبات","ئازار","نیسان","ئایار","حوزەیران","تەمموز","ئاب","ئەیلوول","تشرینی یەكەم","تشرینی دووەم","كانونی یەکەم"];e.defineLocale("ku",{months:o,monthsShort:o,weekdays:"یه‌كشه‌ممه‌_دووشه‌ممه‌_سێشه‌ممه‌_چوارشه‌ممه‌_پێنجشه‌ممه‌_هه‌ینی_شه‌ممه‌".split("_"),weekdaysShort:"یه‌كشه‌م_دووشه‌م_سێشه‌م_چوارشه‌م_پێنجشه‌م_هه‌ینی_شه‌ممه‌".split("_"),weekdaysMin:"ی_د_س_چ_پ_ه_ش".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},meridiemParse:/ئێواره‌|به‌یانی/,isPM:function(e){return/ئێواره‌/.test(e)},meridiem:function(e,t,n){return e<12?"به‌یانی":"ئێواره‌"},calendar:{sameDay:"[ئه‌مرۆ كاتژمێر] LT",nextDay:"[به‌یانی كاتژمێر] LT",nextWeek:"dddd [كاتژمێر] LT",lastDay:"[دوێنێ كاتژمێر] LT",lastWeek:"dddd [كاتژمێر] LT",sameElse:"L"},relativeTime:{future:"له‌ %s",past:"%s",s:"چه‌ند چركه‌یه‌ك",ss:"چركه‌ %d",m:"یه‌ك خوله‌ك",mm:"%d خوله‌ك",h:"یه‌ك كاتژمێر",hh:"%d كاتژمێر",d:"یه‌ك ڕۆژ",dd:"%d ڕۆژ",M:"یه‌ك مانگ",MM:"%d مانگ",y:"یه‌ك ساڵ",yy:"%d ساڵ"},preparse:function(e){return e.replace(/[١٢٣٤٥٦٧٨٩٠]/g,(function(e){return n[e]})).replace(/،/g,",")},postformat:function(e){return e.replace(/\d/g,(function(e){return t[e]})).replace(/,/g,"،")},week:{dow:6,doy:12}})}(n("./node_modules/moment/moment.js"))},"./node_modules/moment/locale/ky.js":function(e,t,n){!function(e){"use strict";var t={0:"-чү",1:"-чи",2:"-чи",3:"-чү",4:"-чү",5:"-чи",6:"-чы",7:"-чи",8:"-чи",9:"-чу",10:"-чу",20:"-чы",30:"-чу",40:"-чы",50:"-чү",60:"-чы",70:"-чи",80:"-чи",90:"-чу",100:"-чү"};e.defineLocale("ky",{months:"январь_февраль_март_апрель_май_июнь_июль_август_сентябрь_октябрь_ноябрь_декабрь".split("_"),monthsShort:"янв_фев_март_апр_май_июнь_июль_авг_сен_окт_ноя_дек".split("_"),weekdays:"Жекшемби_Дүйшөмбү_Шейшемби_Шаршемби_Бейшемби_Жума_Ишемби".split("_"),weekdaysShort:"Жек_Дүй_Шей_Шар_Бей_Жум_Ише".split("_"),weekdaysMin:"Жк_Дй_Шй_Шр_Бй_Жм_Иш".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Бүгүн саат] LT",nextDay:"[Эртең саат] LT",nextWeek:"dddd [саат] LT",lastDay:"[Кечээ саат] LT",lastWeek:"[Өткөн аптанын] dddd [күнү] [саат] LT",sameElse:"L"},relativeTime:{future:"%s ичинде",past:"%s мурун",s:"бирнече секунд",ss:"%d секунд",m:"бир мүнөт",mm:"%d мүнөт",h:"бир саат",hh:"%d саат",d:"бир күн",dd:"%d күн",M:"бир ай",MM:"%d ай",y:"бир жыл",yy:"%d жыл"},dayOfMonthOrdinalParse:/\d{1,2}-(чи|чы|чү|чу)/,ordinal:function(e){return e+(t[e]||t[e%10]||t[e>=100?100:null])},week:{dow:1,doy:7}})}(n("./node_modules/moment/moment.js"))},"./node_modules/moment/locale/lb.js":function(e,t,n){!function(e){"use strict";function t(e,t,n,o){var r={m:["eng Minutt","enger Minutt"],h:["eng Stonn","enger Stonn"],d:["een Dag","engem Dag"],M:["ee Mount","engem Mount"],y:["ee Joer","engem Joer"]};return t?r[n][0]:r[n][1]}function n(e){if(e=parseInt(e,10),isNaN(e))return!1;if(e<0)return!0;if(e<10)return 4<=e&&e<=7;if(e<100){var t=e%10;return n(0===t?e/10:t)}if(e<1e4){for(;e>=10;)e/=10;return n(e)}return n(e/=1e3)}e.defineLocale("lb",{months:"Januar_Februar_Mäerz_Abrëll_Mee_Juni_Juli_August_September_Oktober_November_Dezember".split("_"),monthsShort:"Jan._Febr._Mrz._Abr._Mee_Jun._Jul._Aug._Sept._Okt._Nov._Dez.".split("_"),monthsParseExact:!0,weekdays:"Sonndeg_Méindeg_Dënschdeg_Mëttwoch_Donneschdeg_Freideg_Samschdeg".split("_"),weekdaysShort:"So._Mé._Dë._Më._Do._Fr._Sa.".split("_"),weekdaysMin:"So_Mé_Dë_Më_Do_Fr_Sa".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm [Auer]",LTS:"H:mm:ss [Auer]",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm [Auer]",LLLL:"dddd, D. MMMM YYYY H:mm [Auer]"},calendar:{sameDay:"[Haut um] LT",sameElse:"L",nextDay:"[Muer um] LT",nextWeek:"dddd [um] LT",lastDay:"[Gëschter um] LT",lastWeek:function(){switch(this.day()){case 2:case 4:return"[Leschten] dddd [um] LT";default:return"[Leschte] dddd [um] LT"}}},relativeTime:{future:function(e){return n(e.substr(0,e.indexOf(" ")))?"a "+e:"an "+e},past:function(e){return n(e.substr(0,e.indexOf(" ")))?"viru "+e:"virun "+e},s:"e puer Sekonnen",ss:"%d Sekonnen",m:t,mm:"%d Minutten",h:t,hh:"%d Stonnen",d:t,dd:"%d Deeg",M:t,MM:"%d Méint",y:t,yy:"%d Joer"},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(n("./node_modules/moment/moment.js"))},"./node_modules/moment/locale/lo.js":function(e,t,n){!function(e){"use strict";e.defineLocale("lo",{months:"ມັງກອນ_ກຸມພາ_ມີນາ_ເມສາ_ພຶດສະພາ_ມິຖຸນາ_ກໍລະກົດ_ສິງຫາ_ກັນຍາ_ຕຸລາ_ພະຈິກ_ທັນວາ".split("_"),monthsShort:"ມັງກອນ_ກຸມພາ_ມີນາ_ເມສາ_ພຶດສະພາ_ມິຖຸນາ_ກໍລະກົດ_ສິງຫາ_ກັນຍາ_ຕຸລາ_ພະຈິກ_ທັນວາ".split("_"),weekdays:"ອາທິດ_ຈັນ_ອັງຄານ_ພຸດ_ພະຫັດ_ສຸກ_ເສົາ".split("_"),weekdaysShort:"ທິດ_ຈັນ_ອັງຄານ_ພຸດ_ພະຫັດ_ສຸກ_ເສົາ".split("_"),weekdaysMin:"ທ_ຈ_ອຄ_ພ_ພຫ_ສກ_ສ".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"ວັນdddd D MMMM YYYY HH:mm"},meridiemParse:/ຕອນເຊົ້າ|ຕອນແລງ/,isPM:function(e){return"ຕອນແລງ"===e},meridiem:function(e,t,n){return e<12?"ຕອນເຊົ້າ":"ຕອນແລງ"},calendar:{sameDay:"[ມື້ນີ້ເວລາ] LT",nextDay:"[ມື້ອື່ນເວລາ] LT",nextWeek:"[ວັນ]dddd[ໜ້າເວລາ] LT",lastDay:"[ມື້ວານນີ້ເວລາ] LT",lastWeek:"[ວັນ]dddd[ແລ້ວນີ້ເວລາ] LT",sameElse:"L"},relativeTime:{future:"ອີກ %s",past:"%sຜ່ານມາ",s:"ບໍ່ເທົ່າໃດວິນາທີ",ss:"%d ວິນາທີ",m:"1 ນາທີ",mm:"%d ນາທີ",h:"1 ຊົ່ວໂມງ",hh:"%d ຊົ່ວໂມງ",d:"1 ມື້",dd:"%d ມື້",M:"1 ເດືອນ",MM:"%d ເດືອນ",y:"1 ປີ",yy:"%d ປີ"},dayOfMonthOrdinalParse:/(ທີ່)\d{1,2}/,ordinal:function(e){return"ທີ່"+e}})}(n("./node_modules/moment/moment.js"))},"./node_modules/moment/locale/lt.js":function(e,t,n){!function(e){"use strict";var t={ss:"sekundė_sekundžių_sekundes",m:"minutė_minutės_minutę",mm:"minutės_minučių_minutes",h:"valanda_valandos_valandą",hh:"valandos_valandų_valandas",d:"diena_dienos_dieną",dd:"dienos_dienų_dienas",M:"mėnuo_mėnesio_mėnesį",MM:"mėnesiai_mėnesių_mėnesius",y:"metai_metų_metus",yy:"metai_metų_metus"};function n(e,t,n,o){return t?r(n)[0]:o?r(n)[1]:r(n)[2]}function o(e){return e%10==0||e>10&&e<20}function r(e){return t[e].split("_")}function s(e,t,s,a){var i=e+" ";return 1===e?i+n(0,t,s[0],a):t?i+(o(e)?r(s)[1]:r(s)[0]):a?i+r(s)[1]:i+(o(e)?r(s)[1]:r(s)[2])}e.defineLocale("lt",{months:{format:"sausio_vasario_kovo_balandžio_gegužės_birželio_liepos_rugpjūčio_rugsėjo_spalio_lapkričio_gruodžio".split("_"),standalone:"sausis_vasaris_kovas_balandis_gegužė_birželis_liepa_rugpjūtis_rugsėjis_spalis_lapkritis_gruodis".split("_"),isFormat:/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?|MMMM?(\[[^\[\]]*\]|\s)+D[oD]?/},monthsShort:"sau_vas_kov_bal_geg_bir_lie_rgp_rgs_spa_lap_grd".split("_"),weekdays:{format:"sekmadienį_pirmadienį_antradienį_trečiadienį_ketvirtadienį_penktadienį_šeštadienį".split("_"),standalone:"sekmadienis_pirmadienis_antradienis_trečiadienis_ketvirtadienis_penktadienis_šeštadienis".split("_"),isFormat:/dddd HH:mm/},weekdaysShort:"Sek_Pir_Ant_Tre_Ket_Pen_Šeš".split("_"),weekdaysMin:"S_P_A_T_K_Pn_Š".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY-MM-DD",LL:"YYYY [m.] MMMM D [d.]",LLL:"YYYY [m.] MMMM D [d.], HH:mm [val.]",LLLL:"YYYY [m.] MMMM D [d.], dddd, HH:mm [val.]",l:"YYYY-MM-DD",ll:"YYYY [m.] MMMM D [d.]",lll:"YYYY [m.] MMMM D [d.], HH:mm [val.]",llll:"YYYY [m.] MMMM D [d.], ddd, HH:mm [val.]"},calendar:{sameDay:"[Šiandien] LT",nextDay:"[Rytoj] LT",nextWeek:"dddd LT",lastDay:"[Vakar] LT",lastWeek:"[Praėjusį] dddd LT",sameElse:"L"},relativeTime:{future:"po %s",past:"prieš %s",s:function(e,t,n,o){return t?"kelios sekundės":o?"kelių sekundžių":"kelias sekundes"},ss:s,m:n,mm:s,h:n,hh:s,d:n,dd:s,M:n,MM:s,y:n,yy:s},dayOfMonthOrdinalParse:/\d{1,2}-oji/,ordinal:function(e){return e+"-oji"},week:{dow:1,doy:4}})}(n("./node_modules/moment/moment.js"))},"./node_modules/moment/locale/lv.js":function(e,t,n){!function(e){"use strict";var t={ss:"sekundes_sekundēm_sekunde_sekundes".split("_"),m:"minūtes_minūtēm_minūte_minūtes".split("_"),mm:"minūtes_minūtēm_minūte_minūtes".split("_"),h:"stundas_stundām_stunda_stundas".split("_"),hh:"stundas_stundām_stunda_stundas".split("_"),d:"dienas_dienām_diena_dienas".split("_"),dd:"dienas_dienām_diena_dienas".split("_"),M:"mēneša_mēnešiem_mēnesis_mēneši".split("_"),MM:"mēneša_mēnešiem_mēnesis_mēneši".split("_"),y:"gada_gadiem_gads_gadi".split("_"),yy:"gada_gadiem_gads_gadi".split("_")};function n(e,t,n){return n?t%10==1&&t%100!=11?e[2]:e[3]:t%10==1&&t%100!=11?e[0]:e[1]}function o(e,o,r){return e+" "+n(t[r],e,o)}function r(e,o,r){return n(t[r],e,o)}e.defineLocale("lv",{months:"janvāris_februāris_marts_aprīlis_maijs_jūnijs_jūlijs_augusts_septembris_oktobris_novembris_decembris".split("_"),monthsShort:"jan_feb_mar_apr_mai_jūn_jūl_aug_sep_okt_nov_dec".split("_"),weekdays:"svētdiena_pirmdiena_otrdiena_trešdiena_ceturtdiena_piektdiena_sestdiena".split("_"),weekdaysShort:"Sv_P_O_T_C_Pk_S".split("_"),weekdaysMin:"Sv_P_O_T_C_Pk_S".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY.",LL:"YYYY. [gada] D. MMMM",LLL:"YYYY. [gada] D. MMMM, HH:mm",LLLL:"YYYY. [gada] D. MMMM, dddd, HH:mm"},calendar:{sameDay:"[Šodien pulksten] LT",nextDay:"[Rīt pulksten] LT",nextWeek:"dddd [pulksten] LT",lastDay:"[Vakar pulksten] LT",lastWeek:"[Pagājušā] dddd [pulksten] LT",sameElse:"L"},relativeTime:{future:"pēc %s",past:"pirms %s",s:function(e,t){return t?"dažas sekundes":"dažām sekundēm"},ss:o,m:r,mm:o,h:r,hh:o,d:r,dd:o,M:r,MM:o,y:r,yy:o},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(n("./node_modules/moment/moment.js"))},"./node_modules/moment/locale/me.js":function(e,t,n){!function(e){"use strict";var t={words:{ss:["sekund","sekunda","sekundi"],m:["jedan minut","jednog minuta"],mm:["minut","minuta","minuta"],h:["jedan sat","jednog sata"],hh:["sat","sata","sati"],dd:["dan","dana","dana"],MM:["mjesec","mjeseca","mjeseci"],yy:["godina","godine","godina"]},correctGrammaticalCase:function(e,t){return 1===e?t[0]:e>=2&&e<=4?t[1]:t[2]},translate:function(e,n,o){var r=t.words[o];return 1===o.length?n?r[0]:r[1]:e+" "+t.correctGrammaticalCase(e,r)}};e.defineLocale("me",{months:"januar_februar_mart_april_maj_jun_jul_avgust_septembar_oktobar_novembar_decembar".split("_"),monthsShort:"jan._feb._mar._apr._maj_jun_jul_avg._sep._okt._nov._dec.".split("_"),monthsParseExact:!0,weekdays:"nedjelja_ponedjeljak_utorak_srijeda_četvrtak_petak_subota".split("_"),weekdaysShort:"ned._pon._uto._sri._čet._pet._sub.".split("_"),weekdaysMin:"ne_po_ut_sr_če_pe_su".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm",LLLL:"dddd, D. MMMM YYYY H:mm"},calendar:{sameDay:"[danas u] LT",nextDay:"[sjutra u] LT",nextWeek:function(){switch(this.day()){case 0:return"[u] [nedjelju] [u] LT";case 3:return"[u] [srijedu] [u] LT";case 6:return"[u] [subotu] [u] LT";case 1:case 2:case 4:case 5:return"[u] dddd [u] LT"}},lastDay:"[juče u] LT",lastWeek:function(){return["[prošle] [nedjelje] [u] LT","[prošlog] [ponedjeljka] [u] LT","[prošlog] [utorka] [u] LT","[prošle] [srijede] [u] LT","[prošlog] [četvrtka] [u] LT","[prošlog] [petka] [u] LT","[prošle] [subote] [u] LT"][this.day()]},sameElse:"L"},relativeTime:{future:"za %s",past:"prije %s",s:"nekoliko sekundi",ss:t.translate,m:t.translate,mm:t.translate,h:t.translate,hh:t.translate,d:"dan",dd:t.translate,M:"mjesec",MM:t.translate,y:"godinu",yy:t.translate},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:7}})}(n("./node_modules/moment/moment.js"))},"./node_modules/moment/locale/mi.js":function(e,t,n){!function(e){"use strict";e.defineLocale("mi",{months:"Kohi-tāte_Hui-tanguru_Poutū-te-rangi_Paenga-whāwhā_Haratua_Pipiri_Hōngoingoi_Here-turi-kōkā_Mahuru_Whiringa-ā-nuku_Whiringa-ā-rangi_Hakihea".split("_"),monthsShort:"Kohi_Hui_Pou_Pae_Hara_Pipi_Hōngoi_Here_Mahu_Whi-nu_Whi-ra_Haki".split("_"),monthsRegex:/(?:['a-z\u0101\u014D\u016B]+\-?){1,3}/i,monthsStrictRegex:/(?:['a-z\u0101\u014D\u016B]+\-?){1,3}/i,monthsShortRegex:/(?:['a-z\u0101\u014D\u016B]+\-?){1,3}/i,monthsShortStrictRegex:/(?:['a-z\u0101\u014D\u016B]+\-?){1,2}/i,weekdays:"Rātapu_Mane_Tūrei_Wenerei_Tāite_Paraire_Hātarei".split("_"),weekdaysShort:"Ta_Ma_Tū_We_Tāi_Pa_Hā".split("_"),weekdaysMin:"Ta_Ma_Tū_We_Tāi_Pa_Hā".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY [i] HH:mm",LLLL:"dddd, D MMMM YYYY [i] HH:mm"},calendar:{sameDay:"[i teie mahana, i] LT",nextDay:"[apopo i] LT",nextWeek:"dddd [i] LT",lastDay:"[inanahi i] LT",lastWeek:"dddd [whakamutunga i] LT",sameElse:"L"},relativeTime:{future:"i roto i %s",past:"%s i mua",s:"te hēkona ruarua",ss:"%d hēkona",m:"he meneti",mm:"%d meneti",h:"te haora",hh:"%d haora",d:"he ra",dd:"%d ra",M:"he marama",MM:"%d marama",y:"he tau",yy:"%d tau"},dayOfMonthOrdinalParse:/\d{1,2}º/,ordinal:"%dº",week:{dow:1,doy:4}})}(n("./node_modules/moment/moment.js"))},"./node_modules/moment/locale/mk.js":function(e,t,n){!function(e){"use strict";e.defineLocale("mk",{months:"јануари_февруари_март_април_мај_јуни_јули_август_септември_октомври_ноември_декември".split("_"),monthsShort:"јан_фев_мар_апр_мај_јун_јул_авг_сеп_окт_ное_дек".split("_"),weekdays:"недела_понеделник_вторник_среда_четврток_петок_сабота".split("_"),weekdaysShort:"нед_пон_вто_сре_чет_пет_саб".split("_"),weekdaysMin:"нe_пo_вт_ср_че_пе_сa".split("_"),longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"D.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY H:mm",LLLL:"dddd, D MMMM YYYY H:mm"},calendar:{sameDay:"[Денес во] LT",nextDay:"[Утре во] LT",nextWeek:"[Во] dddd [во] LT",lastDay:"[Вчера во] LT",lastWeek:function(){switch(this.day()){case 0:case 3:case 6:return"[Изминатата] dddd [во] LT";case 1:case 2:case 4:case 5:return"[Изминатиот] dddd [во] LT"}},sameElse:"L"},relativeTime:{future:"за %s",past:"пред %s",s:"неколку секунди",ss:"%d секунди",m:"една минута",mm:"%d минути",h:"еден час",hh:"%d часа",d:"еден ден",dd:"%d дена",M:"еден месец",MM:"%d месеци",y:"една година",yy:"%d години"},dayOfMonthOrdinalParse:/\d{1,2}-(ев|ен|ти|ви|ри|ми)/,ordinal:function(e){var t=e%10,n=e%100;return 0===e?e+"-ев":0===n?e+"-ен":n>10&&n<20?e+"-ти":1===t?e+"-ви":2===t?e+"-ри":7===t||8===t?e+"-ми":e+"-ти"},week:{dow:1,doy:7}})}(n("./node_modules/moment/moment.js"))},"./node_modules/moment/locale/ml.js":function(e,t,n){!function(e){"use strict";e.defineLocale("ml",{months:"ജനുവരി_ഫെബ്രുവരി_മാർച്ച്_ഏപ്രിൽ_മേയ്_ജൂൺ_ജൂലൈ_ഓഗസ്റ്റ്_സെപ്റ്റംബർ_ഒക്ടോബർ_നവംബർ_ഡിസംബർ".split("_"),monthsShort:"ജനു._ഫെബ്രു._മാർ._ഏപ്രി._മേയ്_ജൂൺ_ജൂലൈ._ഓഗ._സെപ്റ്റ._ഒക്ടോ._നവം._ഡിസം.".split("_"),monthsParseExact:!0,weekdays:"ഞായറാഴ്ച_തിങ്കളാഴ്ച_ചൊവ്വാഴ്ച_ബുധനാഴ്ച_വ്യാഴാഴ്ച_വെള്ളിയാഴ്ച_ശനിയാഴ്ച".split("_"),weekdaysShort:"ഞായർ_തിങ്കൾ_ചൊവ്വ_ബുധൻ_വ്യാഴം_വെള്ളി_ശനി".split("_"),weekdaysMin:"ഞാ_തി_ചൊ_ബു_വ്യാ_വെ_ശ".split("_"),longDateFormat:{LT:"A h:mm -നു",LTS:"A h:mm:ss -നു",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm -നു",LLLL:"dddd, D MMMM YYYY, A h:mm -നു"},calendar:{sameDay:"[ഇന്ന്] LT",nextDay:"[നാളെ] LT",nextWeek:"dddd, LT",lastDay:"[ഇന്നലെ] LT",lastWeek:"[കഴിഞ്ഞ] dddd, LT",sameElse:"L"},relativeTime:{future:"%s കഴിഞ്ഞ്",past:"%s മുൻപ്",s:"അൽപ നിമിഷങ്ങൾ",ss:"%d സെക്കൻഡ്",m:"ഒരു മിനിറ്റ്",mm:"%d മിനിറ്റ്",h:"ഒരു മണിക്കൂർ",hh:"%d മണിക്കൂർ",d:"ഒരു ദിവസം",dd:"%d ദിവസം",M:"ഒരു മാസം",MM:"%d മാസം",y:"ഒരു വർഷം",yy:"%d വർഷം"},meridiemParse:/രാത്രി|രാവിലെ|ഉച്ച കഴിഞ്ഞ്|വൈകുന്നേരം|രാത്രി/i,meridiemHour:function(e,t){return 12===e&&(e=0),"രാത്രി"===t&&e>=4||"ഉച്ച കഴിഞ്ഞ്"===t||"വൈകുന്നേരം"===t?e+12:e},meridiem:function(e,t,n){return e<4?"രാത്രി":e<12?"രാവിലെ":e<17?"ഉച്ച കഴിഞ്ഞ്":e<20?"വൈകുന്നേരം":"രാത്രി"}})}(n("./node_modules/moment/moment.js"))},"./node_modules/moment/locale/mn.js":function(e,t,n){!function(e){"use strict";function t(e,t,n,o){switch(n){case"s":return t?"хэдхэн секунд":"хэдхэн секундын";case"ss":return e+(t?" секунд":" секундын");case"m":case"mm":return e+(t?" минут":" минутын");case"h":case"hh":return e+(t?" цаг":" цагийн");case"d":case"dd":return e+(t?" өдөр":" өдрийн");case"M":case"MM":return e+(t?" сар":" сарын");case"y":case"yy":return e+(t?" жил":" жилийн");default:return e}}e.defineLocale("mn",{months:"Нэгдүгээр сар_Хоёрдугаар сар_Гуравдугаар сар_Дөрөвдүгээр сар_Тавдугаар сар_Зургадугаар сар_Долдугаар сар_Наймдугаар сар_Есдүгээр сар_Аравдугаар сар_Арван нэгдүгээр сар_Арван хоёрдугаар сар".split("_"),monthsShort:"1 сар_2 сар_3 сар_4 сар_5 сар_6 сар_7 сар_8 сар_9 сар_10 сар_11 сар_12 сар".split("_"),monthsParseExact:!0,weekdays:"Ням_Даваа_Мягмар_Лхагва_Пүрэв_Баасан_Бямба".split("_"),weekdaysShort:"Ням_Дав_Мяг_Лха_Пүр_Баа_Бям".split("_"),weekdaysMin:"Ня_Да_Мя_Лх_Пү_Ба_Бя".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY-MM-DD",LL:"YYYY оны MMMMын D",LLL:"YYYY оны MMMMын D HH:mm",LLLL:"dddd, YYYY оны MMMMын D HH:mm"},meridiemParse:/ҮӨ|ҮХ/i,isPM:function(e){return"ҮХ"===e},meridiem:function(e,t,n){return e<12?"ҮӨ":"ҮХ"},calendar:{sameDay:"[Өнөөдөр] LT",nextDay:"[Маргааш] LT",nextWeek:"[Ирэх] dddd LT",lastDay:"[Өчигдөр] LT",lastWeek:"[Өнгөрсөн] dddd LT",sameElse:"L"},relativeTime:{future:"%s дараа",past:"%s өмнө",s:t,ss:t,m:t,mm:t,h:t,hh:t,d:t,dd:t,M:t,MM:t,y:t,yy:t},dayOfMonthOrdinalParse:/\d{1,2} өдөр/,ordinal:function(e,t){switch(t){case"d":case"D":case"DDD":return e+" өдөр";default:return e}}})}(n("./node_modules/moment/moment.js"))},"./node_modules/moment/locale/mr.js":function(e,t,n){!function(e){"use strict";var t={1:"१",2:"२",3:"३",4:"४",5:"५",6:"६",7:"७",8:"८",9:"९",0:"०"},n={"१":"1","२":"2","३":"3","४":"4","५":"5","६":"6","७":"7","८":"8","९":"9","०":"0"};function o(e,t,n,o){var r="";if(t)switch(n){case"s":r="काही सेकंद";break;case"ss":r="%d सेकंद";break;case"m":r="एक मिनिट";break;case"mm":r="%d मिनिटे";break;case"h":r="एक तास";break;case"hh":r="%d तास";break;case"d":r="एक दिवस";break;case"dd":r="%d दिवस";break;case"M":r="एक महिना";break;case"MM":r="%d महिने";break;case"y":r="एक वर्ष";break;case"yy":r="%d वर्षे"}else switch(n){case"s":r="काही सेकंदां";break;case"ss":r="%d सेकंदां";break;case"m":r="एका मिनिटा";break;case"mm":r="%d मिनिटां";break;case"h":r="एका तासा";break;case"hh":r="%d तासां";break;case"d":r="एका दिवसा";break;case"dd":r="%d दिवसां";break;case"M":r="एका महिन्या";break;case"MM":r="%d महिन्यां";break;case"y":r="एका वर्षा";break;case"yy":r="%d वर्षां"}return r.replace(/%d/i,e)}e.defineLocale("mr",{months:"जानेवारी_फेब्रुवारी_मार्च_एप्रिल_मे_जून_जुलै_ऑगस्ट_सप्टेंबर_ऑक्टोबर_नोव्हेंबर_डिसेंबर".split("_"),monthsShort:"जाने._फेब्रु._मार्च._एप्रि._मे._जून._जुलै._ऑग._सप्टें._ऑक्टो._नोव्हें._डिसें.".split("_"),monthsParseExact:!0,weekdays:"रविवार_सोमवार_मंगळवार_बुधवार_गुरूवार_शुक्रवार_शनिवार".split("_"),weekdaysShort:"रवि_सोम_मंगळ_बुध_गुरू_शुक्र_शनि".split("_"),weekdaysMin:"र_सो_मं_बु_गु_शु_श".split("_"),longDateFormat:{LT:"A h:mm वाजता",LTS:"A h:mm:ss वाजता",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm वाजता",LLLL:"dddd, D MMMM YYYY, A h:mm वाजता"},calendar:{sameDay:"[आज] LT",nextDay:"[उद्या] LT",nextWeek:"dddd, LT",lastDay:"[काल] LT",lastWeek:"[मागील] dddd, LT",sameElse:"L"},relativeTime:{future:"%sमध्ये",past:"%sपूर्वी",s:o,ss:o,m:o,mm:o,h:o,hh:o,d:o,dd:o,M:o,MM:o,y:o,yy:o},preparse:function(e){return e.replace(/[१२३४५६७८९०]/g,(function(e){return n[e]}))},postformat:function(e){return e.replace(/\d/g,(function(e){return t[e]}))},meridiemParse:/पहाटे|सकाळी|दुपारी|सायंकाळी|रात्री/,meridiemHour:function(e,t){return 12===e&&(e=0),"पहाटे"===t||"सकाळी"===t?e:"दुपारी"===t||"सायंकाळी"===t||"रात्री"===t?e>=12?e:e+12:void 0},meridiem:function(e,t,n){return e>=0&&e<6?"पहाटे":e<12?"सकाळी":e<17?"दुपारी":e<20?"सायंकाळी":"रात्री"},week:{dow:0,doy:6}})}(n("./node_modules/moment/moment.js"))},"./node_modules/moment/locale/ms-my.js":function(e,t,n){!function(e){"use strict";e.defineLocale("ms-my",{months:"Januari_Februari_Mac_April_Mei_Jun_Julai_Ogos_September_Oktober_November_Disember".split("_"),monthsShort:"Jan_Feb_Mac_Apr_Mei_Jun_Jul_Ogs_Sep_Okt_Nov_Dis".split("_"),weekdays:"Ahad_Isnin_Selasa_Rabu_Khamis_Jumaat_Sabtu".split("_"),weekdaysShort:"Ahd_Isn_Sel_Rab_Kha_Jum_Sab".split("_"),weekdaysMin:"Ah_Is_Sl_Rb_Km_Jm_Sb".split("_"),longDateFormat:{LT:"HH.mm",LTS:"HH.mm.ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY [pukul] HH.mm",LLLL:"dddd, D MMMM YYYY [pukul] HH.mm"},meridiemParse:/pagi|tengahari|petang|malam/,meridiemHour:function(e,t){return 12===e&&(e=0),"pagi"===t?e:"tengahari"===t?e>=11?e:e+12:"petang"===t||"malam"===t?e+12:void 0},meridiem:function(e,t,n){return e<11?"pagi":e<15?"tengahari":e<19?"petang":"malam"},calendar:{sameDay:"[Hari ini pukul] LT",nextDay:"[Esok pukul] LT",nextWeek:"dddd [pukul] LT",lastDay:"[Kelmarin pukul] LT",lastWeek:"dddd [lepas pukul] LT",sameElse:"L"},relativeTime:{future:"dalam %s",past:"%s yang lepas",s:"beberapa saat",ss:"%d saat",m:"seminit",mm:"%d minit",h:"sejam",hh:"%d jam",d:"sehari",dd:"%d hari",M:"sebulan",MM:"%d bulan",y:"setahun",yy:"%d tahun"},week:{dow:1,doy:7}})}(n("./node_modules/moment/moment.js"))},"./node_modules/moment/locale/ms.js":function(e,t,n){!function(e){"use strict";e.defineLocale("ms",{months:"Januari_Februari_Mac_April_Mei_Jun_Julai_Ogos_September_Oktober_November_Disember".split("_"),monthsShort:"Jan_Feb_Mac_Apr_Mei_Jun_Jul_Ogs_Sep_Okt_Nov_Dis".split("_"),weekdays:"Ahad_Isnin_Selasa_Rabu_Khamis_Jumaat_Sabtu".split("_"),weekdaysShort:"Ahd_Isn_Sel_Rab_Kha_Jum_Sab".split("_"),weekdaysMin:"Ah_Is_Sl_Rb_Km_Jm_Sb".split("_"),longDateFormat:{LT:"HH.mm",LTS:"HH.mm.ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY [pukul] HH.mm",LLLL:"dddd, D MMMM YYYY [pukul] HH.mm"},meridiemParse:/pagi|tengahari|petang|malam/,meridiemHour:function(e,t){return 12===e&&(e=0),"pagi"===t?e:"tengahari"===t?e>=11?e:e+12:"petang"===t||"malam"===t?e+12:void 0},meridiem:function(e,t,n){return e<11?"pagi":e<15?"tengahari":e<19?"petang":"malam"},calendar:{sameDay:"[Hari ini pukul] LT",nextDay:"[Esok pukul] LT",nextWeek:"dddd [pukul] LT",lastDay:"[Kelmarin pukul] LT",lastWeek:"dddd [lepas pukul] LT",sameElse:"L"},relativeTime:{future:"dalam %s",past:"%s yang lepas",s:"beberapa saat",ss:"%d saat",m:"seminit",mm:"%d minit",h:"sejam",hh:"%d jam",d:"sehari",dd:"%d hari",M:"sebulan",MM:"%d bulan",y:"setahun",yy:"%d tahun"},week:{dow:1,doy:7}})}(n("./node_modules/moment/moment.js"))},"./node_modules/moment/locale/mt.js":function(e,t,n){!function(e){"use strict";e.defineLocale("mt",{months:"Jannar_Frar_Marzu_April_Mejju_Ġunju_Lulju_Awwissu_Settembru_Ottubru_Novembru_Diċembru".split("_"),monthsShort:"Jan_Fra_Mar_Apr_Mej_Ġun_Lul_Aww_Set_Ott_Nov_Diċ".split("_"),weekdays:"Il-Ħadd_It-Tnejn_It-Tlieta_L-Erbgħa_Il-Ħamis_Il-Ġimgħa_Is-Sibt".split("_"),weekdaysShort:"Ħad_Tne_Tli_Erb_Ħam_Ġim_Sib".split("_"),weekdaysMin:"Ħa_Tn_Tl_Er_Ħa_Ġi_Si".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Illum fil-]LT",nextDay:"[Għada fil-]LT",nextWeek:"dddd [fil-]LT",lastDay:"[Il-bieraħ fil-]LT",lastWeek:"dddd [li għadda] [fil-]LT",sameElse:"L"},relativeTime:{future:"f’ %s",past:"%s ilu",s:"ftit sekondi",ss:"%d sekondi",m:"minuta",mm:"%d minuti",h:"siegħa",hh:"%d siegħat",d:"ġurnata",dd:"%d ġranet",M:"xahar",MM:"%d xhur",y:"sena",yy:"%d sni"},dayOfMonthOrdinalParse:/\d{1,2}º/,ordinal:"%dº",week:{dow:1,doy:4}})}(n("./node_modules/moment/moment.js"))},"./node_modules/moment/locale/my.js":function(e,t,n){!function(e){"use strict";var t={1:"၁",2:"၂",3:"၃",4:"၄",5:"၅",6:"၆",7:"၇",8:"၈",9:"၉",0:"၀"},n={"၁":"1","၂":"2","၃":"3","၄":"4","၅":"5","၆":"6","၇":"7","၈":"8","၉":"9","၀":"0"};e.defineLocale("my",{months:"ဇန်နဝါရီ_ဖေဖော်ဝါရီ_မတ်_ဧပြီ_မေ_ဇွန်_ဇူလိုင်_သြဂုတ်_စက်တင်ဘာ_အောက်တိုဘာ_နိုဝင်ဘာ_ဒီဇင်ဘာ".split("_"),monthsShort:"ဇန်_ဖေ_မတ်_ပြီ_မေ_ဇွန်_လိုင်_သြ_စက်_အောက်_နို_ဒီ".split("_"),weekdays:"တနင်္ဂနွေ_တနင်္လာ_အင်္ဂါ_ဗုဒ္ဓဟူး_ကြာသပတေး_သောကြာ_စနေ".split("_"),weekdaysShort:"နွေ_လာ_ဂါ_ဟူး_ကြာ_သော_နေ".split("_"),weekdaysMin:"နွေ_လာ_ဂါ_ဟူး_ကြာ_သော_နေ".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[ယနေ.] LT [မှာ]",nextDay:"[မနက်ဖြန်] LT [မှာ]",nextWeek:"dddd LT [မှာ]",lastDay:"[မနေ.က] LT [မှာ]",lastWeek:"[ပြီးခဲ့သော] dddd LT [မှာ]",sameElse:"L"},relativeTime:{future:"လာမည့် %s မှာ",past:"လွန်ခဲ့သော %s က",s:"စက္ကန်.အနည်းငယ်",ss:"%d စက္ကန့်",m:"တစ်မိနစ်",mm:"%d မိနစ်",h:"တစ်နာရီ",hh:"%d နာရီ",d:"တစ်ရက်",dd:"%d ရက်",M:"တစ်လ",MM:"%d လ",y:"တစ်နှစ်",yy:"%d နှစ်"},preparse:function(e){return e.replace(/[၁၂၃၄၅၆၇၈၉၀]/g,(function(e){return n[e]}))},postformat:function(e){return e.replace(/\d/g,(function(e){return t[e]}))},week:{dow:1,doy:4}})}(n("./node_modules/moment/moment.js"))},"./node_modules/moment/locale/nb.js":function(e,t,n){!function(e){"use strict";e.defineLocale("nb",{months:"januar_februar_mars_april_mai_juni_juli_august_september_oktober_november_desember".split("_"),monthsShort:"jan._feb._mars_apr._mai_juni_juli_aug._sep._okt._nov._des.".split("_"),monthsParseExact:!0,weekdays:"søndag_mandag_tirsdag_onsdag_torsdag_fredag_lørdag".split("_"),weekdaysShort:"sø._ma._ti._on._to._fr._lø.".split("_"),weekdaysMin:"sø_ma_ti_on_to_fr_lø".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY [kl.] HH:mm",LLLL:"dddd D. MMMM YYYY [kl.] HH:mm"},calendar:{sameDay:"[i dag kl.] LT",nextDay:"[i morgen kl.] LT",nextWeek:"dddd [kl.] LT",lastDay:"[i går kl.] LT",lastWeek:"[forrige] dddd [kl.] LT",sameElse:"L"},relativeTime:{future:"om %s",past:"%s siden",s:"noen sekunder",ss:"%d sekunder",m:"ett minutt",mm:"%d minutter",h:"en time",hh:"%d timer",d:"en dag",dd:"%d dager",w:"en uke",ww:"%d uker",M:"en måned",MM:"%d måneder",y:"ett år",yy:"%d år"},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(n("./node_modules/moment/moment.js"))},"./node_modules/moment/locale/ne.js":function(e,t,n){!function(e){"use strict";var t={1:"१",2:"२",3:"३",4:"४",5:"५",6:"६",7:"७",8:"८",9:"९",0:"०"},n={"१":"1","२":"2","३":"3","४":"4","५":"5","६":"6","७":"7","८":"8","९":"9","०":"0"};e.defineLocale("ne",{months:"जनवरी_फेब्रुवरी_मार्च_अप्रिल_मई_जुन_जुलाई_अगष्ट_सेप्टेम्बर_अक्टोबर_नोभेम्बर_डिसेम्बर".split("_"),monthsShort:"जन._फेब्रु._मार्च_अप्रि._मई_जुन_जुलाई._अग._सेप्ट._अक्टो._नोभे._डिसे.".split("_"),monthsParseExact:!0,weekdays:"आइतबार_सोमबार_मङ्गलबार_बुधबार_बिहिबार_शुक्रबार_शनिबार".split("_"),weekdaysShort:"आइत._सोम._मङ्गल._बुध._बिहि._शुक्र._शनि.".split("_"),weekdaysMin:"आ._सो._मं._बु._बि._शु._श.".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"Aको h:mm बजे",LTS:"Aको h:mm:ss बजे",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, Aको h:mm बजे",LLLL:"dddd, D MMMM YYYY, Aको h:mm बजे"},preparse:function(e){return e.replace(/[१२३४५६७८९०]/g,(function(e){return n[e]}))},postformat:function(e){return e.replace(/\d/g,(function(e){return t[e]}))},meridiemParse:/राति|बिहान|दिउँसो|साँझ/,meridiemHour:function(e,t){return 12===e&&(e=0),"राति"===t?e<4?e:e+12:"बिहान"===t?e:"दिउँसो"===t?e>=10?e:e+12:"साँझ"===t?e+12:void 0},meridiem:function(e,t,n){return e<3?"राति":e<12?"बिहान":e<16?"दिउँसो":e<20?"साँझ":"राति"},calendar:{sameDay:"[आज] LT",nextDay:"[भोलि] LT",nextWeek:"[आउँदो] dddd[,] LT",lastDay:"[हिजो] LT",lastWeek:"[गएको] dddd[,] LT",sameElse:"L"},relativeTime:{future:"%sमा",past:"%s अगाडि",s:"केही क्षण",ss:"%d सेकेण्ड",m:"एक मिनेट",mm:"%d मिनेट",h:"एक घण्टा",hh:"%d घण्टा",d:"एक दिन",dd:"%d दिन",M:"एक महिना",MM:"%d महिना",y:"एक बर्ष",yy:"%d बर्ष"},week:{dow:0,doy:6}})}(n("./node_modules/moment/moment.js"))},"./node_modules/moment/locale/nl-be.js":function(e,t,n){!function(e){"use strict";var t="jan._feb._mrt._apr._mei_jun._jul._aug._sep._okt._nov._dec.".split("_"),n="jan_feb_mrt_apr_mei_jun_jul_aug_sep_okt_nov_dec".split("_"),o=[/^jan/i,/^feb/i,/^maart|mrt.?$/i,/^apr/i,/^mei$/i,/^jun[i.]?$/i,/^jul[i.]?$/i,/^aug/i,/^sep/i,/^okt/i,/^nov/i,/^dec/i],r=/^(januari|februari|maart|april|mei|ju[nl]i|augustus|september|oktober|november|december|jan\.?|feb\.?|mrt\.?|apr\.?|ju[nl]\.?|aug\.?|sep\.?|okt\.?|nov\.?|dec\.?)/i;e.defineLocale("nl-be",{months:"januari_februari_maart_april_mei_juni_juli_augustus_september_oktober_november_december".split("_"),monthsShort:function(e,o){return e?/-MMM-/.test(o)?n[e.month()]:t[e.month()]:t},monthsRegex:r,monthsShortRegex:r,monthsStrictRegex:/^(januari|februari|maart|april|mei|ju[nl]i|augustus|september|oktober|november|december)/i,monthsShortStrictRegex:/^(jan\.?|feb\.?|mrt\.?|apr\.?|mei|ju[nl]\.?|aug\.?|sep\.?|okt\.?|nov\.?|dec\.?)/i,monthsParse:o,longMonthsParse:o,shortMonthsParse:o,weekdays:"zondag_maandag_dinsdag_woensdag_donderdag_vrijdag_zaterdag".split("_"),weekdaysShort:"zo._ma._di._wo._do._vr._za.".split("_"),weekdaysMin:"zo_ma_di_wo_do_vr_za".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[vandaag om] LT",nextDay:"[morgen om] LT",nextWeek:"dddd [om] LT",lastDay:"[gisteren om] LT",lastWeek:"[afgelopen] dddd [om] LT",sameElse:"L"},relativeTime:{future:"over %s",past:"%s geleden",s:"een paar seconden",ss:"%d seconden",m:"één minuut",mm:"%d minuten",h:"één uur",hh:"%d uur",d:"één dag",dd:"%d dagen",M:"één maand",MM:"%d maanden",y:"één jaar",yy:"%d jaar"},dayOfMonthOrdinalParse:/\d{1,2}(ste|de)/,ordinal:function(e){return e+(1===e||8===e||e>=20?"ste":"de")},week:{dow:1,doy:4}})}(n("./node_modules/moment/moment.js"))},"./node_modules/moment/locale/nl.js":function(e,t,n){!function(e){"use strict";var t="jan._feb._mrt._apr._mei_jun._jul._aug._sep._okt._nov._dec.".split("_"),n="jan_feb_mrt_apr_mei_jun_jul_aug_sep_okt_nov_dec".split("_"),o=[/^jan/i,/^feb/i,/^maart|mrt.?$/i,/^apr/i,/^mei$/i,/^jun[i.]?$/i,/^jul[i.]?$/i,/^aug/i,/^sep/i,/^okt/i,/^nov/i,/^dec/i],r=/^(januari|februari|maart|april|mei|ju[nl]i|augustus|september|oktober|november|december|jan\.?|feb\.?|mrt\.?|apr\.?|ju[nl]\.?|aug\.?|sep\.?|okt\.?|nov\.?|dec\.?)/i;e.defineLocale("nl",{months:"januari_februari_maart_april_mei_juni_juli_augustus_september_oktober_november_december".split("_"),monthsShort:function(e,o){return e?/-MMM-/.test(o)?n[e.month()]:t[e.month()]:t},monthsRegex:r,monthsShortRegex:r,monthsStrictRegex:/^(januari|februari|maart|april|mei|ju[nl]i|augustus|september|oktober|november|december)/i,monthsShortStrictRegex:/^(jan\.?|feb\.?|mrt\.?|apr\.?|mei|ju[nl]\.?|aug\.?|sep\.?|okt\.?|nov\.?|dec\.?)/i,monthsParse:o,longMonthsParse:o,shortMonthsParse:o,weekdays:"zondag_maandag_dinsdag_woensdag_donderdag_vrijdag_zaterdag".split("_"),weekdaysShort:"zo._ma._di._wo._do._vr._za.".split("_"),weekdaysMin:"zo_ma_di_wo_do_vr_za".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD-MM-YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[vandaag om] LT",nextDay:"[morgen om] LT",nextWeek:"dddd [om] LT",lastDay:"[gisteren om] LT",lastWeek:"[afgelopen] dddd [om] LT",sameElse:"L"},relativeTime:{future:"over %s",past:"%s geleden",s:"een paar seconden",ss:"%d seconden",m:"één minuut",mm:"%d minuten",h:"één uur",hh:"%d uur",d:"één dag",dd:"%d dagen",w:"één week",ww:"%d weken",M:"één maand",MM:"%d maanden",y:"één jaar",yy:"%d jaar"},dayOfMonthOrdinalParse:/\d{1,2}(ste|de)/,ordinal:function(e){return e+(1===e||8===e||e>=20?"ste":"de")},week:{dow:1,doy:4}})}(n("./node_modules/moment/moment.js"))},"./node_modules/moment/locale/nn.js":function(e,t,n){!function(e){"use strict";e.defineLocale("nn",{months:"januar_februar_mars_april_mai_juni_juli_august_september_oktober_november_desember".split("_"),monthsShort:"jan._feb._mars_apr._mai_juni_juli_aug._sep._okt._nov._des.".split("_"),monthsParseExact:!0,weekdays:"sundag_måndag_tysdag_onsdag_torsdag_fredag_laurdag".split("_"),weekdaysShort:"su._må._ty._on._to._fr._lau.".split("_"),weekdaysMin:"su_må_ty_on_to_fr_la".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY [kl.] H:mm",LLLL:"dddd D. MMMM YYYY [kl.] HH:mm"},calendar:{sameDay:"[I dag klokka] LT",nextDay:"[I morgon klokka] LT",nextWeek:"dddd [klokka] LT",lastDay:"[I går klokka] LT",lastWeek:"[Føregåande] dddd [klokka] LT",sameElse:"L"},relativeTime:{future:"om %s",past:"%s sidan",s:"nokre sekund",ss:"%d sekund",m:"eit minutt",mm:"%d minutt",h:"ein time",hh:"%d timar",d:"ein dag",dd:"%d dagar",w:"ei veke",ww:"%d veker",M:"ein månad",MM:"%d månader",y:"eit år",yy:"%d år"},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(n("./node_modules/moment/moment.js"))},"./node_modules/moment/locale/oc-lnc.js":function(e,t,n){!function(e){"use strict";e.defineLocale("oc-lnc",{months:{standalone:"genièr_febrièr_març_abril_mai_junh_julhet_agost_setembre_octòbre_novembre_decembre".split("_"),format:"de genièr_de febrièr_de març_d'abril_de mai_de junh_de julhet_d'agost_de setembre_d'octòbre_de novembre_de decembre".split("_"),isFormat:/D[oD]?(\s)+MMMM/},monthsShort:"gen._febr._març_abr._mai_junh_julh._ago._set._oct._nov._dec.".split("_"),monthsParseExact:!0,weekdays:"dimenge_diluns_dimars_dimècres_dijòus_divendres_dissabte".split("_"),weekdaysShort:"dg._dl._dm._dc._dj._dv._ds.".split("_"),weekdaysMin:"dg_dl_dm_dc_dj_dv_ds".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM [de] YYYY",ll:"D MMM YYYY",LLL:"D MMMM [de] YYYY [a] H:mm",lll:"D MMM YYYY, H:mm",LLLL:"dddd D MMMM [de] YYYY [a] H:mm",llll:"ddd D MMM YYYY, H:mm"},calendar:{sameDay:"[uèi a] LT",nextDay:"[deman a] LT",nextWeek:"dddd [a] LT",lastDay:"[ièr a] LT",lastWeek:"dddd [passat a] LT",sameElse:"L"},relativeTime:{future:"d'aquí %s",past:"fa %s",s:"unas segondas",ss:"%d segondas",m:"una minuta",mm:"%d minutas",h:"una ora",hh:"%d oras",d:"un jorn",dd:"%d jorns",M:"un mes",MM:"%d meses",y:"un an",yy:"%d ans"},dayOfMonthOrdinalParse:/\d{1,2}(r|n|t|è|a)/,ordinal:function(e,t){var n=1===e?"r":2===e?"n":3===e?"r":4===e?"t":"è";return"w"!==t&&"W"!==t||(n="a"),e+n},week:{dow:1,doy:4}})}(n("./node_modules/moment/moment.js"))},"./node_modules/moment/locale/pa-in.js":function(e,t,n){!function(e){"use strict";var t={1:"੧",2:"੨",3:"੩",4:"੪",5:"੫",6:"੬",7:"੭",8:"੮",9:"੯",0:"੦"},n={"੧":"1","੨":"2","੩":"3","੪":"4","੫":"5","੬":"6","੭":"7","੮":"8","੯":"9","੦":"0"};e.defineLocale("pa-in",{months:"ਜਨਵਰੀ_ਫ਼ਰਵਰੀ_ਮਾਰਚ_ਅਪ੍ਰੈਲ_ਮਈ_ਜੂਨ_ਜੁਲਾਈ_ਅਗਸਤ_ਸਤੰਬਰ_ਅਕਤੂਬਰ_ਨਵੰਬਰ_ਦਸੰਬਰ".split("_"),monthsShort:"ਜਨਵਰੀ_ਫ਼ਰਵਰੀ_ਮਾਰਚ_ਅਪ੍ਰੈਲ_ਮਈ_ਜੂਨ_ਜੁਲਾਈ_ਅਗਸਤ_ਸਤੰਬਰ_ਅਕਤੂਬਰ_ਨਵੰਬਰ_ਦਸੰਬਰ".split("_"),weekdays:"ਐਤਵਾਰ_ਸੋਮਵਾਰ_ਮੰਗਲਵਾਰ_ਬੁਧਵਾਰ_ਵੀਰਵਾਰ_ਸ਼ੁੱਕਰਵਾਰ_ਸ਼ਨੀਚਰਵਾਰ".split("_"),weekdaysShort:"ਐਤ_ਸੋਮ_ਮੰਗਲ_ਬੁਧ_ਵੀਰ_ਸ਼ੁਕਰ_ਸ਼ਨੀ".split("_"),weekdaysMin:"ਐਤ_ਸੋਮ_ਮੰਗਲ_ਬੁਧ_ਵੀਰ_ਸ਼ੁਕਰ_ਸ਼ਨੀ".split("_"),longDateFormat:{LT:"A h:mm ਵਜੇ",LTS:"A h:mm:ss ਵਜੇ",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm ਵਜੇ",LLLL:"dddd, D MMMM YYYY, A h:mm ਵਜੇ"},calendar:{sameDay:"[ਅਜ] LT",nextDay:"[ਕਲ] LT",nextWeek:"[ਅਗਲਾ] dddd, LT",lastDay:"[ਕਲ] LT",lastWeek:"[ਪਿਛਲੇ] dddd, LT",sameElse:"L"},relativeTime:{future:"%s ਵਿੱਚ",past:"%s ਪਿਛਲੇ",s:"ਕੁਝ ਸਕਿੰਟ",ss:"%d ਸਕਿੰਟ",m:"ਇਕ ਮਿੰਟ",mm:"%d ਮਿੰਟ",h:"ਇੱਕ ਘੰਟਾ",hh:"%d ਘੰਟੇ",d:"ਇੱਕ ਦਿਨ",dd:"%d ਦਿਨ",M:"ਇੱਕ ਮਹੀਨਾ",MM:"%d ਮਹੀਨੇ",y:"ਇੱਕ ਸਾਲ",yy:"%d ਸਾਲ"},preparse:function(e){return e.replace(/[੧੨੩੪੫੬੭੮੯੦]/g,(function(e){return n[e]}))},postformat:function(e){return e.replace(/\d/g,(function(e){return t[e]}))},meridiemParse:/ਰਾਤ|ਸਵੇਰ|ਦੁਪਹਿਰ|ਸ਼ਾਮ/,meridiemHour:function(e,t){return 12===e&&(e=0),"ਰਾਤ"===t?e<4?e:e+12:"ਸਵੇਰ"===t?e:"ਦੁਪਹਿਰ"===t?e>=10?e:e+12:"ਸ਼ਾਮ"===t?e+12:void 0},meridiem:function(e,t,n){return e<4?"ਰਾਤ":e<10?"ਸਵੇਰ":e<17?"ਦੁਪਹਿਰ":e<20?"ਸ਼ਾਮ":"ਰਾਤ"},week:{dow:0,doy:6}})}(n("./node_modules/moment/moment.js"))},"./node_modules/moment/locale/pl.js":function(e,t,n){!function(e){"use strict";var t="styczeń_luty_marzec_kwiecień_maj_czerwiec_lipiec_sierpień_wrzesień_październik_listopad_grudzień".split("_"),n="stycznia_lutego_marca_kwietnia_maja_czerwca_lipca_sierpnia_września_października_listopada_grudnia".split("_"),o=[/^sty/i,/^lut/i,/^mar/i,/^kwi/i,/^maj/i,/^cze/i,/^lip/i,/^sie/i,/^wrz/i,/^paź/i,/^lis/i,/^gru/i];function r(e){return e%10<5&&e%10>1&&~~(e/10)%10!=1}function s(e,t,n){var o=e+" ";switch(n){case"ss":return o+(r(e)?"sekundy":"sekund");case"m":return t?"minuta":"minutę";case"mm":return o+(r(e)?"minuty":"minut");case"h":return t?"godzina":"godzinę";case"hh":return o+(r(e)?"godziny":"godzin");case"ww":return o+(r(e)?"tygodnie":"tygodni");case"MM":return o+(r(e)?"miesiące":"miesięcy");case"yy":return o+(r(e)?"lata":"lat")}}e.defineLocale("pl",{months:function(e,o){return e?/D MMMM/.test(o)?n[e.month()]:t[e.month()]:t},monthsShort:"sty_lut_mar_kwi_maj_cze_lip_sie_wrz_paź_lis_gru".split("_"),monthsParse:o,longMonthsParse:o,shortMonthsParse:o,weekdays:"niedziela_poniedziałek_wtorek_środa_czwartek_piątek_sobota".split("_"),weekdaysShort:"ndz_pon_wt_śr_czw_pt_sob".split("_"),weekdaysMin:"Nd_Pn_Wt_Śr_Cz_Pt_So".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Dziś o] LT",nextDay:"[Jutro o] LT",nextWeek:function(){switch(this.day()){case 0:return"[W niedzielę o] LT";case 2:return"[We wtorek o] LT";case 3:return"[W środę o] LT";case 6:return"[W sobotę o] LT";default:return"[W] dddd [o] LT"}},lastDay:"[Wczoraj o] LT",lastWeek:function(){switch(this.day()){case 0:return"[W zeszłą niedzielę o] LT";case 3:return"[W zeszłą środę o] LT";case 6:return"[W zeszłą sobotę o] LT";default:return"[W zeszły] dddd [o] LT"}},sameElse:"L"},relativeTime:{future:"za %s",past:"%s temu",s:"kilka sekund",ss:s,m:s,mm:s,h:s,hh:s,d:"1 dzień",dd:"%d dni",w:"tydzień",ww:s,M:"miesiąc",MM:s,y:"rok",yy:s},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(n("./node_modules/moment/moment.js"))},"./node_modules/moment/locale/pt-br.js":function(e,t,n){!function(e){"use strict";e.defineLocale("pt-br",{months:"janeiro_fevereiro_março_abril_maio_junho_julho_agosto_setembro_outubro_novembro_dezembro".split("_"),monthsShort:"jan_fev_mar_abr_mai_jun_jul_ago_set_out_nov_dez".split("_"),weekdays:"domingo_segunda-feira_terça-feira_quarta-feira_quinta-feira_sexta-feira_sábado".split("_"),weekdaysShort:"dom_seg_ter_qua_qui_sex_sáb".split("_"),weekdaysMin:"do_2ª_3ª_4ª_5ª_6ª_sá".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D [de] MMMM [de] YYYY",LLL:"D [de] MMMM [de] YYYY [às] HH:mm",LLLL:"dddd, D [de] MMMM [de] YYYY [às] HH:mm"},calendar:{sameDay:"[Hoje às] LT",nextDay:"[Amanhã às] LT",nextWeek:"dddd [às] LT",lastDay:"[Ontem às] LT",lastWeek:function(){return 0===this.day()||6===this.day()?"[Último] dddd [às] LT":"[Última] dddd [às] LT"},sameElse:"L"},relativeTime:{future:"em %s",past:"há %s",s:"poucos segundos",ss:"%d segundos",m:"um minuto",mm:"%d minutos",h:"uma hora",hh:"%d horas",d:"um dia",dd:"%d dias",M:"um mês",MM:"%d meses",y:"um ano",yy:"%d anos"},dayOfMonthOrdinalParse:/\d{1,2}º/,ordinal:"%dº",invalidDate:"Data inválida"})}(n("./node_modules/moment/moment.js"))},"./node_modules/moment/locale/pt.js":function(e,t,n){!function(e){"use strict";e.defineLocale("pt",{months:"janeiro_fevereiro_março_abril_maio_junho_julho_agosto_setembro_outubro_novembro_dezembro".split("_"),monthsShort:"jan_fev_mar_abr_mai_jun_jul_ago_set_out_nov_dez".split("_"),weekdays:"Domingo_Segunda-feira_Terça-feira_Quarta-feira_Quinta-feira_Sexta-feira_Sábado".split("_"),weekdaysShort:"Dom_Seg_Ter_Qua_Qui_Sex_Sáb".split("_"),weekdaysMin:"Do_2ª_3ª_4ª_5ª_6ª_Sá".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D [de] MMMM [de] YYYY",LLL:"D [de] MMMM [de] YYYY HH:mm",LLLL:"dddd, D [de] MMMM [de] YYYY HH:mm"},calendar:{sameDay:"[Hoje às] LT",nextDay:"[Amanhã às] LT",nextWeek:"dddd [às] LT",lastDay:"[Ontem às] LT",lastWeek:function(){return 0===this.day()||6===this.day()?"[Último] dddd [às] LT":"[Última] dddd [às] LT"},sameElse:"L"},relativeTime:{future:"em %s",past:"há %s",s:"segundos",ss:"%d segundos",m:"um minuto",mm:"%d minutos",h:"uma hora",hh:"%d horas",d:"um dia",dd:"%d dias",w:"uma semana",ww:"%d semanas",M:"um mês",MM:"%d meses",y:"um ano",yy:"%d anos"},dayOfMonthOrdinalParse:/\d{1,2}º/,ordinal:"%dº",week:{dow:1,doy:4}})}(n("./node_modules/moment/moment.js"))},"./node_modules/moment/locale/ro.js":function(e,t,n){!function(e){"use strict";function t(e,t,n){var o=" ";return(e%100>=20||e>=100&&e%100==0)&&(o=" de "),e+o+{ss:"secunde",mm:"minute",hh:"ore",dd:"zile",ww:"săptămâni",MM:"luni",yy:"ani"}[n]}e.defineLocale("ro",{months:"ianuarie_februarie_martie_aprilie_mai_iunie_iulie_august_septembrie_octombrie_noiembrie_decembrie".split("_"),monthsShort:"ian._feb._mart._apr._mai_iun._iul._aug._sept._oct._nov._dec.".split("_"),monthsParseExact:!0,weekdays:"duminică_luni_marți_miercuri_joi_vineri_sâmbătă".split("_"),weekdaysShort:"Dum_Lun_Mar_Mie_Joi_Vin_Sâm".split("_"),weekdaysMin:"Du_Lu_Ma_Mi_Jo_Vi_Sâ".split("_"),longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY H:mm",LLLL:"dddd, D MMMM YYYY H:mm"},calendar:{sameDay:"[azi la] LT",nextDay:"[mâine la] LT",nextWeek:"dddd [la] LT",lastDay:"[ieri la] LT",lastWeek:"[fosta] dddd [la] LT",sameElse:"L"},relativeTime:{future:"peste %s",past:"%s în urmă",s:"câteva secunde",ss:t,m:"un minut",mm:t,h:"o oră",hh:t,d:"o zi",dd:t,w:"o săptămână",ww:t,M:"o lună",MM:t,y:"un an",yy:t},week:{dow:1,doy:7}})}(n("./node_modules/moment/moment.js"))},"./node_modules/moment/locale/ru.js":function(e,t,n){!function(e){"use strict";function t(e,t,n){return"m"===n?t?"минута":"минуту":e+" "+(o=+e,r={ss:t?"секунда_секунды_секунд":"секунду_секунды_секунд",mm:t?"минута_минуты_минут":"минуту_минуты_минут",hh:"час_часа_часов",dd:"день_дня_дней",ww:"неделя_недели_недель",MM:"месяц_месяца_месяцев",yy:"год_года_лет"}[n].split("_"),o%10==1&&o%100!=11?r[0]:o%10>=2&&o%10<=4&&(o%100<10||o%100>=20)?r[1]:r[2]);var o,r}var n=[/^янв/i,/^фев/i,/^мар/i,/^апр/i,/^ма[йя]/i,/^июн/i,/^июл/i,/^авг/i,/^сен/i,/^окт/i,/^ноя/i,/^дек/i];e.defineLocale("ru",{months:{format:"января_февраля_марта_апреля_мая_июня_июля_августа_сентября_октября_ноября_декабря".split("_"),standalone:"январь_февраль_март_апрель_май_июнь_июль_август_сентябрь_октябрь_ноябрь_декабрь".split("_")},monthsShort:{format:"янв._февр._мар._апр._мая_июня_июля_авг._сент._окт._нояб._дек.".split("_"),standalone:"янв._февр._март_апр._май_июнь_июль_авг._сент._окт._нояб._дек.".split("_")},weekdays:{standalone:"воскресенье_понедельник_вторник_среда_четверг_пятница_суббота".split("_"),format:"воскресенье_понедельник_вторник_среду_четверг_пятницу_субботу".split("_"),isFormat:/\[ ?[Вв] ?(?:прошлую|следующую|эту)? ?] ?dddd/},weekdaysShort:"вс_пн_вт_ср_чт_пт_сб".split("_"),weekdaysMin:"вс_пн_вт_ср_чт_пт_сб".split("_"),monthsParse:n,longMonthsParse:n,shortMonthsParse:n,monthsRegex:/^(январ[ья]|янв\.?|феврал[ья]|февр?\.?|марта?|мар\.?|апрел[ья]|апр\.?|ма[йя]|июн[ья]|июн\.?|июл[ья]|июл\.?|августа?|авг\.?|сентябр[ья]|сент?\.?|октябр[ья]|окт\.?|ноябр[ья]|нояб?\.?|декабр[ья]|дек\.?)/i,monthsShortRegex:/^(январ[ья]|янв\.?|феврал[ья]|февр?\.?|марта?|мар\.?|апрел[ья]|апр\.?|ма[йя]|июн[ья]|июн\.?|июл[ья]|июл\.?|августа?|авг\.?|сентябр[ья]|сент?\.?|октябр[ья]|окт\.?|ноябр[ья]|нояб?\.?|декабр[ья]|дек\.?)/i,monthsStrictRegex:/^(январ[яь]|феврал[яь]|марта?|апрел[яь]|ма[яй]|июн[яь]|июл[яь]|августа?|сентябр[яь]|октябр[яь]|ноябр[яь]|декабр[яь])/i,monthsShortStrictRegex:/^(янв\.|февр?\.|мар[т.]|апр\.|ма[яй]|июн[ья.]|июл[ья.]|авг\.|сент?\.|окт\.|нояб?\.|дек\.)/i,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY г.",LLL:"D MMMM YYYY г., H:mm",LLLL:"dddd, D MMMM YYYY г., H:mm"},calendar:{sameDay:"[Сегодня, в] LT",nextDay:"[Завтра, в] LT",lastDay:"[Вчера, в] LT",nextWeek:function(e){if(e.week()===this.week())return 2===this.day()?"[Во] dddd, [в] LT":"[В] dddd, [в] LT";switch(this.day()){case 0:return"[В следующее] dddd, [в] LT";case 1:case 2:case 4:return"[В следующий] dddd, [в] LT";case 3:case 5:case 6:return"[В следующую] dddd, [в] LT"}},lastWeek:function(e){if(e.week()===this.week())return 2===this.day()?"[Во] dddd, [в] LT":"[В] dddd, [в] LT";switch(this.day()){case 0:return"[В прошлое] dddd, [в] LT";case 1:case 2:case 4:return"[В прошлый] dddd, [в] LT";case 3:case 5:case 6:return"[В прошлую] dddd, [в] LT"}},sameElse:"L"},relativeTime:{future:"через %s",past:"%s назад",s:"несколько секунд",ss:t,m:t,mm:t,h:"час",hh:t,d:"день",dd:t,w:"неделя",ww:t,M:"месяц",MM:t,y:"год",yy:t},meridiemParse:/ночи|утра|дня|вечера/i,isPM:function(e){return/^(дня|вечера)$/.test(e)},meridiem:function(e,t,n){return e<4?"ночи":e<12?"утра":e<17?"дня":"вечера"},dayOfMonthOrdinalParse:/\d{1,2}-(й|го|я)/,ordinal:function(e,t){switch(t){case"M":case"d":case"DDD":return e+"-й";case"D":return e+"-го";case"w":case"W":return e+"-я";default:return e}},week:{dow:1,doy:4}})}(n("./node_modules/moment/moment.js"))},"./node_modules/moment/locale/sd.js":function(e,t,n){!function(e){"use strict";var t=["جنوري","فيبروري","مارچ","اپريل","مئي","جون","جولاءِ","آگسٽ","سيپٽمبر","آڪٽوبر","نومبر","ڊسمبر"],n=["آچر","سومر","اڱارو","اربع","خميس","جمع","ڇنڇر"];e.defineLocale("sd",{months:t,monthsShort:t,weekdays:n,weekdaysShort:n,weekdaysMin:n,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd، D MMMM YYYY HH:mm"},meridiemParse:/صبح|شام/,isPM:function(e){return"شام"===e},meridiem:function(e,t,n){return e<12?"صبح":"شام"},calendar:{sameDay:"[اڄ] LT",nextDay:"[سڀاڻي] LT",nextWeek:"dddd [اڳين هفتي تي] LT",lastDay:"[ڪالهه] LT",lastWeek:"[گزريل هفتي] dddd [تي] LT",sameElse:"L"},relativeTime:{future:"%s پوء",past:"%s اڳ",s:"چند سيڪنڊ",ss:"%d سيڪنڊ",m:"هڪ منٽ",mm:"%d منٽ",h:"هڪ ڪلاڪ",hh:"%d ڪلاڪ",d:"هڪ ڏينهن",dd:"%d ڏينهن",M:"هڪ مهينو",MM:"%d مهينا",y:"هڪ سال",yy:"%d سال"},preparse:function(e){return e.replace(/،/g,",")},postformat:function(e){return e.replace(/,/g,"،")},week:{dow:1,doy:4}})}(n("./node_modules/moment/moment.js"))},"./node_modules/moment/locale/se.js":function(e,t,n){!function(e){"use strict";e.defineLocale("se",{months:"ođđajagemánnu_guovvamánnu_njukčamánnu_cuoŋománnu_miessemánnu_geassemánnu_suoidnemánnu_borgemánnu_čakčamánnu_golggotmánnu_skábmamánnu_juovlamánnu".split("_"),monthsShort:"ođđj_guov_njuk_cuo_mies_geas_suoi_borg_čakč_golg_skáb_juov".split("_"),weekdays:"sotnabeaivi_vuossárga_maŋŋebárga_gaskavahkku_duorastat_bearjadat_lávvardat".split("_"),weekdaysShort:"sotn_vuos_maŋ_gask_duor_bear_láv".split("_"),weekdaysMin:"s_v_m_g_d_b_L".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"MMMM D. [b.] YYYY",LLL:"MMMM D. [b.] YYYY [ti.] HH:mm",LLLL:"dddd, MMMM D. [b.] YYYY [ti.] HH:mm"},calendar:{sameDay:"[otne ti] LT",nextDay:"[ihttin ti] LT",nextWeek:"dddd [ti] LT",lastDay:"[ikte ti] LT",lastWeek:"[ovddit] dddd [ti] LT",sameElse:"L"},relativeTime:{future:"%s geažes",past:"maŋit %s",s:"moadde sekunddat",ss:"%d sekunddat",m:"okta minuhta",mm:"%d minuhtat",h:"okta diimmu",hh:"%d diimmut",d:"okta beaivi",dd:"%d beaivvit",M:"okta mánnu",MM:"%d mánut",y:"okta jahki",yy:"%d jagit"},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(n("./node_modules/moment/moment.js"))},"./node_modules/moment/locale/si.js":function(e,t,n){!function(e){"use strict";e.defineLocale("si",{months:"ජනවාරි_පෙබරවාරි_මාර්තු_අප්‍රේල්_මැයි_ජූනි_ජූලි_අගෝස්තු_සැප්තැම්බර්_ඔක්තෝබර්_නොවැම්බර්_දෙසැම්බර්".split("_"),monthsShort:"ජන_පෙබ_මාර්_අප්_මැයි_ජූනි_ජූලි_අගෝ_සැප්_ඔක්_නොවැ_දෙසැ".split("_"),weekdays:"ඉරිදා_සඳුදා_අඟහරුවාදා_බදාදා_බ්‍රහස්පතින්දා_සිකුරාදා_සෙනසුරාදා".split("_"),weekdaysShort:"ඉරි_සඳු_අඟ_බදා_බ්‍රහ_සිකු_සෙන".split("_"),weekdaysMin:"ඉ_ස_අ_බ_බ්‍ර_සි_සෙ".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"a h:mm",LTS:"a h:mm:ss",L:"YYYY/MM/DD",LL:"YYYY MMMM D",LLL:"YYYY MMMM D, a h:mm",LLLL:"YYYY MMMM D [වැනි] dddd, a h:mm:ss"},calendar:{sameDay:"[අද] LT[ට]",nextDay:"[හෙට] LT[ට]",nextWeek:"dddd LT[ට]",lastDay:"[ඊයේ] LT[ට]",lastWeek:"[පසුගිය] dddd LT[ට]",sameElse:"L"},relativeTime:{future:"%sකින්",past:"%sකට පෙර",s:"තත්පර කිහිපය",ss:"තත්පර %d",m:"මිනිත්තුව",mm:"මිනිත්තු %d",h:"පැය",hh:"පැය %d",d:"දිනය",dd:"දින %d",M:"මාසය",MM:"මාස %d",y:"වසර",yy:"වසර %d"},dayOfMonthOrdinalParse:/\d{1,2} වැනි/,ordinal:function(e){return e+" වැනි"},meridiemParse:/පෙර වරු|පස් වරු|පෙ.ව|ප.ව./,isPM:function(e){return"ප.ව."===e||"පස් වරු"===e},meridiem:function(e,t,n){return e>11?n?"ප.ව.":"පස් වරු":n?"පෙ.ව.":"පෙර වරු"}})}(n("./node_modules/moment/moment.js"))},"./node_modules/moment/locale/sk.js":function(e,t,n){!function(e){"use strict";var t="január_február_marec_apríl_máj_jún_júl_august_september_október_november_december".split("_"),n="jan_feb_mar_apr_máj_jún_júl_aug_sep_okt_nov_dec".split("_");function o(e){return e>1&&e<5}function r(e,t,n,r){var s=e+" ";switch(n){case"s":return t||r?"pár sekúnd":"pár sekundami";case"ss":return t||r?s+(o(e)?"sekundy":"sekúnd"):s+"sekundami";case"m":return t?"minúta":r?"minútu":"minútou";case"mm":return t||r?s+(o(e)?"minúty":"minút"):s+"minútami";case"h":return t?"hodina":r?"hodinu":"hodinou";case"hh":return t||r?s+(o(e)?"hodiny":"hodín"):s+"hodinami";case"d":return t||r?"deň":"dňom";case"dd":return t||r?s+(o(e)?"dni":"dní"):s+"dňami";case"M":return t||r?"mesiac":"mesiacom";case"MM":return t||r?s+(o(e)?"mesiace":"mesiacov"):s+"mesiacmi";case"y":return t||r?"rok":"rokom";case"yy":return t||r?s+(o(e)?"roky":"rokov"):s+"rokmi"}}e.defineLocale("sk",{months:t,monthsShort:n,weekdays:"nedeľa_pondelok_utorok_streda_štvrtok_piatok_sobota".split("_"),weekdaysShort:"ne_po_ut_st_št_pi_so".split("_"),weekdaysMin:"ne_po_ut_st_št_pi_so".split("_"),longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm",LLLL:"dddd D. MMMM YYYY H:mm"},calendar:{sameDay:"[dnes o] LT",nextDay:"[zajtra o] LT",nextWeek:function(){switch(this.day()){case 0:return"[v nedeľu o] LT";case 1:case 2:return"[v] dddd [o] LT";case 3:return"[v stredu o] LT";case 4:return"[vo štvrtok o] LT";case 5:return"[v piatok o] LT";case 6:return"[v sobotu o] LT"}},lastDay:"[včera o] LT",lastWeek:function(){switch(this.day()){case 0:return"[minulú nedeľu o] LT";case 1:case 2:return"[minulý] dddd [o] LT";case 3:return"[minulú stredu o] LT";case 4:case 5:return"[minulý] dddd [o] LT";case 6:return"[minulú sobotu o] LT"}},sameElse:"L"},relativeTime:{future:"za %s",past:"pred %s",s:r,ss:r,m:r,mm:r,h:r,hh:r,d:r,dd:r,M:r,MM:r,y:r,yy:r},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(n("./node_modules/moment/moment.js"))},"./node_modules/moment/locale/sl.js":function(e,t,n){!function(e){"use strict";function t(e,t,n,o){var r=e+" ";switch(n){case"s":return t||o?"nekaj sekund":"nekaj sekundami";case"ss":return r+(1===e?t?"sekundo":"sekundi":2===e?t||o?"sekundi":"sekundah":e<5?t||o?"sekunde":"sekundah":"sekund");case"m":return t?"ena minuta":"eno minuto";case"mm":return r+(1===e?t?"minuta":"minuto":2===e?t||o?"minuti":"minutama":e<5?t||o?"minute":"minutami":t||o?"minut":"minutami");case"h":return t?"ena ura":"eno uro";case"hh":return r+(1===e?t?"ura":"uro":2===e?t||o?"uri":"urama":e<5?t||o?"ure":"urami":t||o?"ur":"urami");case"d":return t||o?"en dan":"enim dnem";case"dd":return r+(1===e?t||o?"dan":"dnem":2===e?t||o?"dni":"dnevoma":t||o?"dni":"dnevi");case"M":return t||o?"en mesec":"enim mesecem";case"MM":return r+(1===e?t||o?"mesec":"mesecem":2===e?t||o?"meseca":"mesecema":e<5?t||o?"mesece":"meseci":t||o?"mesecev":"meseci");case"y":return t||o?"eno leto":"enim letom";case"yy":return r+(1===e?t||o?"leto":"letom":2===e?t||o?"leti":"letoma":e<5?t||o?"leta":"leti":t||o?"let":"leti")}}e.defineLocale("sl",{months:"januar_februar_marec_april_maj_junij_julij_avgust_september_oktober_november_december".split("_"),monthsShort:"jan._feb._mar._apr._maj._jun._jul._avg._sep._okt._nov._dec.".split("_"),monthsParseExact:!0,weekdays:"nedelja_ponedeljek_torek_sreda_četrtek_petek_sobota".split("_"),weekdaysShort:"ned._pon._tor._sre._čet._pet._sob.".split("_"),weekdaysMin:"ne_po_to_sr_če_pe_so".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD. MM. YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm",LLLL:"dddd, D. MMMM YYYY H:mm"},calendar:{sameDay:"[danes ob] LT",nextDay:"[jutri ob] LT",nextWeek:function(){switch(this.day()){case 0:return"[v] [nedeljo] [ob] LT";case 3:return"[v] [sredo] [ob] LT";case 6:return"[v] [soboto] [ob] LT";case 1:case 2:case 4:case 5:return"[v] dddd [ob] LT"}},lastDay:"[včeraj ob] LT",lastWeek:function(){switch(this.day()){case 0:return"[prejšnjo] [nedeljo] [ob] LT";case 3:return"[prejšnjo] [sredo] [ob] LT";case 6:return"[prejšnjo] [soboto] [ob] LT";case 1:case 2:case 4:case 5:return"[prejšnji] dddd [ob] LT"}},sameElse:"L"},relativeTime:{future:"čez %s",past:"pred %s",s:t,ss:t,m:t,mm:t,h:t,hh:t,d:t,dd:t,M:t,MM:t,y:t,yy:t},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:7}})}(n("./node_modules/moment/moment.js"))},"./node_modules/moment/locale/sq.js":function(e,t,n){!function(e){"use strict";e.defineLocale("sq",{months:"Janar_Shkurt_Mars_Prill_Maj_Qershor_Korrik_Gusht_Shtator_Tetor_Nëntor_Dhjetor".split("_"),monthsShort:"Jan_Shk_Mar_Pri_Maj_Qer_Kor_Gus_Sht_Tet_Nën_Dhj".split("_"),weekdays:"E Diel_E Hënë_E Martë_E Mërkurë_E Enjte_E Premte_E Shtunë".split("_"),weekdaysShort:"Die_Hën_Mar_Mër_Enj_Pre_Sht".split("_"),weekdaysMin:"D_H_Ma_Më_E_P_Sh".split("_"),weekdaysParseExact:!0,meridiemParse:/PD|MD/,isPM:function(e){return"M"===e.charAt(0)},meridiem:function(e,t,n){return e<12?"PD":"MD"},longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Sot në] LT",nextDay:"[Nesër në] LT",nextWeek:"dddd [në] LT",lastDay:"[Dje në] LT",lastWeek:"dddd [e kaluar në] LT",sameElse:"L"},relativeTime:{future:"në %s",past:"%s më parë",s:"disa sekonda",ss:"%d sekonda",m:"një minutë",mm:"%d minuta",h:"një orë",hh:"%d orë",d:"një ditë",dd:"%d ditë",M:"një muaj",MM:"%d muaj",y:"një vit",yy:"%d vite"},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(n("./node_modules/moment/moment.js"))},"./node_modules/moment/locale/sr-cyrl.js":function(e,t,n){!function(e){"use strict";var t={words:{ss:["секунда","секунде","секунди"],m:["један минут","једне минуте"],mm:["минут","минуте","минута"],h:["један сат","једног сата"],hh:["сат","сата","сати"],dd:["дан","дана","дана"],MM:["месец","месеца","месеци"],yy:["година","године","година"]},correctGrammaticalCase:function(e,t){return 1===e?t[0]:e>=2&&e<=4?t[1]:t[2]},translate:function(e,n,o){var r=t.words[o];return 1===o.length?n?r[0]:r[1]:e+" "+t.correctGrammaticalCase(e,r)}};e.defineLocale("sr-cyrl",{months:"јануар_фебруар_март_април_мај_јун_јул_август_септембар_октобар_новембар_децембар".split("_"),monthsShort:"јан._феб._мар._апр._мај_јун_јул_авг._сеп._окт._нов._дец.".split("_"),monthsParseExact:!0,weekdays:"недеља_понедељак_уторак_среда_четвртак_петак_субота".split("_"),weekdaysShort:"нед._пон._уто._сре._чет._пет._суб.".split("_"),weekdaysMin:"не_по_ут_ср_че_пе_су".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"D. M. YYYY.",LL:"D. MMMM YYYY.",LLL:"D. MMMM YYYY. H:mm",LLLL:"dddd, D. MMMM YYYY. H:mm"},calendar:{sameDay:"[данас у] LT",nextDay:"[сутра у] LT",nextWeek:function(){switch(this.day()){case 0:return"[у] [недељу] [у] LT";case 3:return"[у] [среду] [у] LT";case 6:return"[у] [суботу] [у] LT";case 1:case 2:case 4:case 5:return"[у] dddd [у] LT"}},lastDay:"[јуче у] LT",lastWeek:function(){return["[прошле] [недеље] [у] LT","[прошлог] [понедељка] [у] LT","[прошлог] [уторка] [у] LT","[прошле] [среде] [у] LT","[прошлог] [четвртка] [у] LT","[прошлог] [петка] [у] LT","[прошле] [суботе] [у] LT"][this.day()]},sameElse:"L"},relativeTime:{future:"за %s",past:"пре %s",s:"неколико секунди",ss:t.translate,m:t.translate,mm:t.translate,h:t.translate,hh:t.translate,d:"дан",dd:t.translate,M:"месец",MM:t.translate,y:"годину",yy:t.translate},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:7}})}(n("./node_modules/moment/moment.js"))},"./node_modules/moment/locale/sr.js":function(e,t,n){!function(e){"use strict";var t={words:{ss:["sekunda","sekunde","sekundi"],m:["jedan minut","jedne minute"],mm:["minut","minute","minuta"],h:["jedan sat","jednog sata"],hh:["sat","sata","sati"],dd:["dan","dana","dana"],MM:["mesec","meseca","meseci"],yy:["godina","godine","godina"]},correctGrammaticalCase:function(e,t){return 1===e?t[0]:e>=2&&e<=4?t[1]:t[2]},translate:function(e,n,o){var r=t.words[o];return 1===o.length?n?r[0]:r[1]:e+" "+t.correctGrammaticalCase(e,r)}};e.defineLocale("sr",{months:"januar_februar_mart_april_maj_jun_jul_avgust_septembar_oktobar_novembar_decembar".split("_"),monthsShort:"jan._feb._mar._apr._maj_jun_jul_avg._sep._okt._nov._dec.".split("_"),monthsParseExact:!0,weekdays:"nedelja_ponedeljak_utorak_sreda_četvrtak_petak_subota".split("_"),weekdaysShort:"ned._pon._uto._sre._čet._pet._sub.".split("_"),weekdaysMin:"ne_po_ut_sr_če_pe_su".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"D. M. YYYY.",LL:"D. MMMM YYYY.",LLL:"D. MMMM YYYY. H:mm",LLLL:"dddd, D. MMMM YYYY. H:mm"},calendar:{sameDay:"[danas u] LT",nextDay:"[sutra u] LT",nextWeek:function(){switch(this.day()){case 0:return"[u] [nedelju] [u] LT";case 3:return"[u] [sredu] [u] LT";case 6:return"[u] [subotu] [u] LT";case 1:case 2:case 4:case 5:return"[u] dddd [u] LT"}},lastDay:"[juče u] LT",lastWeek:function(){return["[prošle] [nedelje] [u] LT","[prošlog] [ponedeljka] [u] LT","[prošlog] [utorka] [u] LT","[prošle] [srede] [u] LT","[prošlog] [četvrtka] [u] LT","[prošlog] [petka] [u] LT","[prošle] [subote] [u] LT"][this.day()]},sameElse:"L"},relativeTime:{future:"za %s",past:"pre %s",s:"nekoliko sekundi",ss:t.translate,m:t.translate,mm:t.translate,h:t.translate,hh:t.translate,d:"dan",dd:t.translate,M:"mesec",MM:t.translate,y:"godinu",yy:t.translate},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:7}})}(n("./node_modules/moment/moment.js"))},"./node_modules/moment/locale/ss.js":function(e,t,n){!function(e){"use strict";e.defineLocale("ss",{months:"Bhimbidvwane_Indlovana_Indlov'lenkhulu_Mabasa_Inkhwekhweti_Inhlaba_Kholwane_Ingci_Inyoni_Imphala_Lweti_Ingongoni".split("_"),monthsShort:"Bhi_Ina_Inu_Mab_Ink_Inh_Kho_Igc_Iny_Imp_Lwe_Igo".split("_"),weekdays:"Lisontfo_Umsombuluko_Lesibili_Lesitsatfu_Lesine_Lesihlanu_Umgcibelo".split("_"),weekdaysShort:"Lis_Umb_Lsb_Les_Lsi_Lsh_Umg".split("_"),weekdaysMin:"Li_Us_Lb_Lt_Ls_Lh_Ug".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY h:mm A",LLLL:"dddd, D MMMM YYYY h:mm A"},calendar:{sameDay:"[Namuhla nga] LT",nextDay:"[Kusasa nga] LT",nextWeek:"dddd [nga] LT",lastDay:"[Itolo nga] LT",lastWeek:"dddd [leliphelile] [nga] LT",sameElse:"L"},relativeTime:{future:"nga %s",past:"wenteka nga %s",s:"emizuzwana lomcane",ss:"%d mzuzwana",m:"umzuzu",mm:"%d emizuzu",h:"lihora",hh:"%d emahora",d:"lilanga",dd:"%d emalanga",M:"inyanga",MM:"%d tinyanga",y:"umnyaka",yy:"%d iminyaka"},meridiemParse:/ekuseni|emini|entsambama|ebusuku/,meridiem:function(e,t,n){return e<11?"ekuseni":e<15?"emini":e<19?"entsambama":"ebusuku"},meridiemHour:function(e,t){return 12===e&&(e=0),"ekuseni"===t?e:"emini"===t?e>=11?e:e+12:"entsambama"===t||"ebusuku"===t?0===e?0:e+12:void 0},dayOfMonthOrdinalParse:/\d{1,2}/,ordinal:"%d",week:{dow:1,doy:4}})}(n("./node_modules/moment/moment.js"))},"./node_modules/moment/locale/sv.js":function(e,t,n){!function(e){"use strict";e.defineLocale("sv",{months:"januari_februari_mars_april_maj_juni_juli_augusti_september_oktober_november_december".split("_"),monthsShort:"jan_feb_mar_apr_maj_jun_jul_aug_sep_okt_nov_dec".split("_"),weekdays:"söndag_måndag_tisdag_onsdag_torsdag_fredag_lördag".split("_"),weekdaysShort:"sön_mån_tis_ons_tor_fre_lör".split("_"),weekdaysMin:"sö_må_ti_on_to_fr_lö".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY-MM-DD",LL:"D MMMM YYYY",LLL:"D MMMM YYYY [kl.] HH:mm",LLLL:"dddd D MMMM YYYY [kl.] HH:mm",lll:"D MMM YYYY HH:mm",llll:"ddd D MMM YYYY HH:mm"},calendar:{sameDay:"[Idag] LT",nextDay:"[Imorgon] LT",lastDay:"[Igår] LT",nextWeek:"[På] dddd LT",lastWeek:"[I] dddd[s] LT",sameElse:"L"},relativeTime:{future:"om %s",past:"för %s sedan",s:"några sekunder",ss:"%d sekunder",m:"en minut",mm:"%d minuter",h:"en timme",hh:"%d timmar",d:"en dag",dd:"%d dagar",M:"en månad",MM:"%d månader",y:"ett år",yy:"%d år"},dayOfMonthOrdinalParse:/\d{1,2}(\:e|\:a)/,ordinal:function(e){var t=e%10;return e+(1==~~(e%100/10)?":e":1===t||2===t?":a":":e")},week:{dow:1,doy:4}})}(n("./node_modules/moment/moment.js"))},"./node_modules/moment/locale/sw.js":function(e,t,n){!function(e){"use strict";e.defineLocale("sw",{months:"Januari_Februari_Machi_Aprili_Mei_Juni_Julai_Agosti_Septemba_Oktoba_Novemba_Desemba".split("_"),monthsShort:"Jan_Feb_Mac_Apr_Mei_Jun_Jul_Ago_Sep_Okt_Nov_Des".split("_"),weekdays:"Jumapili_Jumatatu_Jumanne_Jumatano_Alhamisi_Ijumaa_Jumamosi".split("_"),weekdaysShort:"Jpl_Jtat_Jnne_Jtan_Alh_Ijm_Jmos".split("_"),weekdaysMin:"J2_J3_J4_J5_Al_Ij_J1".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"hh:mm A",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[leo saa] LT",nextDay:"[kesho saa] LT",nextWeek:"[wiki ijayo] dddd [saat] LT",lastDay:"[jana] LT",lastWeek:"[wiki iliyopita] dddd [saat] LT",sameElse:"L"},relativeTime:{future:"%s baadaye",past:"tokea %s",s:"hivi punde",ss:"sekunde %d",m:"dakika moja",mm:"dakika %d",h:"saa limoja",hh:"masaa %d",d:"siku moja",dd:"siku %d",M:"mwezi mmoja",MM:"miezi %d",y:"mwaka mmoja",yy:"miaka %d"},week:{dow:1,doy:7}})}(n("./node_modules/moment/moment.js"))},"./node_modules/moment/locale/ta.js":function(e,t,n){!function(e){"use strict";var t={1:"௧",2:"௨",3:"௩",4:"௪",5:"௫",6:"௬",7:"௭",8:"௮",9:"௯",0:"௦"},n={"௧":"1","௨":"2","௩":"3","௪":"4","௫":"5","௬":"6","௭":"7","௮":"8","௯":"9","௦":"0"};e.defineLocale("ta",{months:"ஜனவரி_பிப்ரவரி_மார்ச்_ஏப்ரல்_மே_ஜூன்_ஜூலை_ஆகஸ்ட்_செப்டெம்பர்_அக்டோபர்_நவம்பர்_டிசம்பர்".split("_"),monthsShort:"ஜனவரி_பிப்ரவரி_மார்ச்_ஏப்ரல்_மே_ஜூன்_ஜூலை_ஆகஸ்ட்_செப்டெம்பர்_அக்டோபர்_நவம்பர்_டிசம்பர்".split("_"),weekdays:"ஞாயிற்றுக்கிழமை_திங்கட்கிழமை_செவ்வாய்கிழமை_புதன்கிழமை_வியாழக்கிழமை_வெள்ளிக்கிழமை_சனிக்கிழமை".split("_"),weekdaysShort:"ஞாயிறு_திங்கள்_செவ்வாய்_புதன்_வியாழன்_வெள்ளி_சனி".split("_"),weekdaysMin:"ஞா_தி_செ_பு_வி_வெ_ச".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, HH:mm",LLLL:"dddd, D MMMM YYYY, HH:mm"},calendar:{sameDay:"[இன்று] LT",nextDay:"[நாளை] LT",nextWeek:"dddd, LT",lastDay:"[நேற்று] LT",lastWeek:"[கடந்த வாரம்] dddd, LT",sameElse:"L"},relativeTime:{future:"%s இல்",past:"%s முன்",s:"ஒரு சில விநாடிகள்",ss:"%d விநாடிகள்",m:"ஒரு நிமிடம்",mm:"%d நிமிடங்கள்",h:"ஒரு மணி நேரம்",hh:"%d மணி நேரம்",d:"ஒரு நாள்",dd:"%d நாட்கள்",M:"ஒரு மாதம்",MM:"%d மாதங்கள்",y:"ஒரு வருடம்",yy:"%d ஆண்டுகள்"},dayOfMonthOrdinalParse:/\d{1,2}வது/,ordinal:function(e){return e+"வது"},preparse:function(e){return e.replace(/[௧௨௩௪௫௬௭௮௯௦]/g,(function(e){return n[e]}))},postformat:function(e){return e.replace(/\d/g,(function(e){return t[e]}))},meridiemParse:/யாமம்|வைகறை|காலை|நண்பகல்|எற்பாடு|மாலை/,meridiem:function(e,t,n){return e<2?" யாமம்":e<6?" வைகறை":e<10?" காலை":e<14?" நண்பகல்":e<18?" எற்பாடு":e<22?" மாலை":" யாமம்"},meridiemHour:function(e,t){return 12===e&&(e=0),"யாமம்"===t?e<2?e:e+12:"வைகறை"===t||"காலை"===t||"நண்பகல்"===t&&e>=10?e:e+12},week:{dow:0,doy:6}})}(n("./node_modules/moment/moment.js"))},"./node_modules/moment/locale/te.js":function(e,t,n){!function(e){"use strict";e.defineLocale("te",{months:"జనవరి_ఫిబ్రవరి_మార్చి_ఏప్రిల్_మే_జూన్_జులై_ఆగస్టు_సెప్టెంబర్_అక్టోబర్_నవంబర్_డిసెంబర్".split("_"),monthsShort:"జన._ఫిబ్ర._మార్చి_ఏప్రి._మే_జూన్_జులై_ఆగ._సెప్._అక్టో._నవ._డిసె.".split("_"),monthsParseExact:!0,weekdays:"ఆదివారం_సోమవారం_మంగళవారం_బుధవారం_గురువారం_శుక్రవారం_శనివారం".split("_"),weekdaysShort:"ఆది_సోమ_మంగళ_బుధ_గురు_శుక్ర_శని".split("_"),weekdaysMin:"ఆ_సో_మం_బు_గు_శు_శ".split("_"),longDateFormat:{LT:"A h:mm",LTS:"A h:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm",LLLL:"dddd, D MMMM YYYY, A h:mm"},calendar:{sameDay:"[నేడు] LT",nextDay:"[రేపు] LT",nextWeek:"dddd, LT",lastDay:"[నిన్న] LT",lastWeek:"[గత] dddd, LT",sameElse:"L"},relativeTime:{future:"%s లో",past:"%s క్రితం",s:"కొన్ని క్షణాలు",ss:"%d సెకన్లు",m:"ఒక నిమిషం",mm:"%d నిమిషాలు",h:"ఒక గంట",hh:"%d గంటలు",d:"ఒక రోజు",dd:"%d రోజులు",M:"ఒక నెల",MM:"%d నెలలు",y:"ఒక సంవత్సరం",yy:"%d సంవత్సరాలు"},dayOfMonthOrdinalParse:/\d{1,2}వ/,ordinal:"%dవ",meridiemParse:/రాత్రి|ఉదయం|మధ్యాహ్నం|సాయంత్రం/,meridiemHour:function(e,t){return 12===e&&(e=0),"రాత్రి"===t?e<4?e:e+12:"ఉదయం"===t?e:"మధ్యాహ్నం"===t?e>=10?e:e+12:"సాయంత్రం"===t?e+12:void 0},meridiem:function(e,t,n){return e<4?"రాత్రి":e<10?"ఉదయం":e<17?"మధ్యాహ్నం":e<20?"సాయంత్రం":"రాత్రి"},week:{dow:0,doy:6}})}(n("./node_modules/moment/moment.js"))},"./node_modules/moment/locale/tet.js":function(e,t,n){!function(e){"use strict";e.defineLocale("tet",{months:"Janeiru_Fevereiru_Marsu_Abril_Maiu_Juñu_Jullu_Agustu_Setembru_Outubru_Novembru_Dezembru".split("_"),monthsShort:"Jan_Fev_Mar_Abr_Mai_Jun_Jul_Ago_Set_Out_Nov_Dez".split("_"),weekdays:"Domingu_Segunda_Tersa_Kuarta_Kinta_Sesta_Sabadu".split("_"),weekdaysShort:"Dom_Seg_Ters_Kua_Kint_Sest_Sab".split("_"),weekdaysMin:"Do_Seg_Te_Ku_Ki_Ses_Sa".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Ohin iha] LT",nextDay:"[Aban iha] LT",nextWeek:"dddd [iha] LT",lastDay:"[Horiseik iha] LT",lastWeek:"dddd [semana kotuk] [iha] LT",sameElse:"L"},relativeTime:{future:"iha %s",past:"%s liuba",s:"segundu balun",ss:"segundu %d",m:"minutu ida",mm:"minutu %d",h:"oras ida",hh:"oras %d",d:"loron ida",dd:"loron %d",M:"fulan ida",MM:"fulan %d",y:"tinan ida",yy:"tinan %d"},dayOfMonthOrdinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(e){var t=e%10;return e+(1==~~(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")},week:{dow:1,doy:4}})}(n("./node_modules/moment/moment.js"))},"./node_modules/moment/locale/tg.js":function(e,t,n){!function(e){"use strict";var t={0:"-ум",1:"-ум",2:"-юм",3:"-юм",4:"-ум",5:"-ум",6:"-ум",7:"-ум",8:"-ум",9:"-ум",10:"-ум",12:"-ум",13:"-ум",20:"-ум",30:"-юм",40:"-ум",50:"-ум",60:"-ум",70:"-ум",80:"-ум",90:"-ум",100:"-ум"};e.defineLocale("tg",{months:{format:"январи_феврали_марти_апрели_майи_июни_июли_августи_сентябри_октябри_ноябри_декабри".split("_"),standalone:"январ_феврал_март_апрел_май_июн_июл_август_сентябр_октябр_ноябр_декабр".split("_")},monthsShort:"янв_фев_мар_апр_май_июн_июл_авг_сен_окт_ноя_дек".split("_"),weekdays:"якшанбе_душанбе_сешанбе_чоршанбе_панҷшанбе_ҷумъа_шанбе".split("_"),weekdaysShort:"яшб_дшб_сшб_чшб_пшб_ҷум_шнб".split("_"),weekdaysMin:"яш_дш_сш_чш_пш_ҷм_шб".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Имрӯз соати] LT",nextDay:"[Фардо соати] LT",lastDay:"[Дирӯз соати] LT",nextWeek:"dddd[и] [ҳафтаи оянда соати] LT",lastWeek:"dddd[и] [ҳафтаи гузашта соати] LT",sameElse:"L"},relativeTime:{future:"баъди %s",past:"%s пеш",s:"якчанд сония",m:"як дақиқа",mm:"%d дақиқа",h:"як соат",hh:"%d соат",d:"як рӯз",dd:"%d рӯз",M:"як моҳ",MM:"%d моҳ",y:"як сол",yy:"%d сол"},meridiemParse:/шаб|субҳ|рӯз|бегоҳ/,meridiemHour:function(e,t){return 12===e&&(e=0),"шаб"===t?e<4?e:e+12:"субҳ"===t?e:"рӯз"===t?e>=11?e:e+12:"бегоҳ"===t?e+12:void 0},meridiem:function(e,t,n){return e<4?"шаб":e<11?"субҳ":e<16?"рӯз":e<19?"бегоҳ":"шаб"},dayOfMonthOrdinalParse:/\d{1,2}-(ум|юм)/,ordinal:function(e){return e+(t[e]||t[e%10]||t[e>=100?100:null])},week:{dow:1,doy:7}})}(n("./node_modules/moment/moment.js"))},"./node_modules/moment/locale/th.js":function(e,t,n){!function(e){"use strict";e.defineLocale("th",{months:"มกราคม_กุมภาพันธ์_มีนาคม_เมษายน_พฤษภาคม_มิถุนายน_กรกฎาคม_สิงหาคม_กันยายน_ตุลาคม_พฤศจิกายน_ธันวาคม".split("_"),monthsShort:"ม.ค._ก.พ._มี.ค._เม.ย._พ.ค._มิ.ย._ก.ค._ส.ค._ก.ย._ต.ค._พ.ย._ธ.ค.".split("_"),monthsParseExact:!0,weekdays:"อาทิตย์_จันทร์_อังคาร_พุธ_พฤหัสบดี_ศุกร์_เสาร์".split("_"),weekdaysShort:"อาทิตย์_จันทร์_อังคาร_พุธ_พฤหัส_ศุกร์_เสาร์".split("_"),weekdaysMin:"อา._จ._อ._พ._พฤ._ศ._ส.".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY เวลา H:mm",LLLL:"วันddddที่ D MMMM YYYY เวลา H:mm"},meridiemParse:/ก่อนเที่ยง|หลังเที่ยง/,isPM:function(e){return"หลังเที่ยง"===e},meridiem:function(e,t,n){return e<12?"ก่อนเที่ยง":"หลังเที่ยง"},calendar:{sameDay:"[วันนี้ เวลา] LT",nextDay:"[พรุ่งนี้ เวลา] LT",nextWeek:"dddd[หน้า เวลา] LT",lastDay:"[เมื่อวานนี้ เวลา] LT",lastWeek:"[วัน]dddd[ที่แล้ว เวลา] LT",sameElse:"L"},relativeTime:{future:"อีก %s",past:"%sที่แล้ว",s:"ไม่กี่วินาที",ss:"%d วินาที",m:"1 นาที",mm:"%d นาที",h:"1 ชั่วโมง",hh:"%d ชั่วโมง",d:"1 วัน",dd:"%d วัน",w:"1 สัปดาห์",ww:"%d สัปดาห์",M:"1 เดือน",MM:"%d เดือน",y:"1 ปี",yy:"%d ปี"}})}(n("./node_modules/moment/moment.js"))},"./node_modules/moment/locale/tk.js":function(e,t,n){!function(e){"use strict";var t={1:"'inji",5:"'inji",8:"'inji",70:"'inji",80:"'inji",2:"'nji",7:"'nji",20:"'nji",50:"'nji",3:"'ünji",4:"'ünji",100:"'ünji",6:"'njy",9:"'unjy",10:"'unjy",30:"'unjy",60:"'ynjy",90:"'ynjy"};e.defineLocale("tk",{months:"Ýanwar_Fewral_Mart_Aprel_Maý_Iýun_Iýul_Awgust_Sentýabr_Oktýabr_Noýabr_Dekabr".split("_"),monthsShort:"Ýan_Few_Mar_Apr_Maý_Iýn_Iýl_Awg_Sen_Okt_Noý_Dek".split("_"),weekdays:"Ýekşenbe_Duşenbe_Sişenbe_Çarşenbe_Penşenbe_Anna_Şenbe".split("_"),weekdaysShort:"Ýek_Duş_Siş_Çar_Pen_Ann_Şen".split("_"),weekdaysMin:"Ýk_Dş_Sş_Çr_Pn_An_Şn".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[bugün sagat] LT",nextDay:"[ertir sagat] LT",nextWeek:"[indiki] dddd [sagat] LT",lastDay:"[düýn] LT",lastWeek:"[geçen] dddd [sagat] LT",sameElse:"L"},relativeTime:{future:"%s soň",past:"%s öň",s:"birnäçe sekunt",m:"bir minut",mm:"%d minut",h:"bir sagat",hh:"%d sagat",d:"bir gün",dd:"%d gün",M:"bir aý",MM:"%d aý",y:"bir ýyl",yy:"%d ýyl"},ordinal:function(e,n){switch(n){case"d":case"D":case"Do":case"DD":return e;default:if(0===e)return e+"'unjy";var o=e%10;return e+(t[o]||t[e%100-o]||t[e>=100?100:null])}},week:{dow:1,doy:7}})}(n("./node_modules/moment/moment.js"))},"./node_modules/moment/locale/tl-ph.js":function(e,t,n){!function(e){"use strict";e.defineLocale("tl-ph",{months:"Enero_Pebrero_Marso_Abril_Mayo_Hunyo_Hulyo_Agosto_Setyembre_Oktubre_Nobyembre_Disyembre".split("_"),monthsShort:"Ene_Peb_Mar_Abr_May_Hun_Hul_Ago_Set_Okt_Nob_Dis".split("_"),weekdays:"Linggo_Lunes_Martes_Miyerkules_Huwebes_Biyernes_Sabado".split("_"),weekdaysShort:"Lin_Lun_Mar_Miy_Huw_Biy_Sab".split("_"),weekdaysMin:"Li_Lu_Ma_Mi_Hu_Bi_Sab".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"MM/D/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY HH:mm",LLLL:"dddd, MMMM DD, YYYY HH:mm"},calendar:{sameDay:"LT [ngayong araw]",nextDay:"[Bukas ng] LT",nextWeek:"LT [sa susunod na] dddd",lastDay:"LT [kahapon]",lastWeek:"LT [noong nakaraang] dddd",sameElse:"L"},relativeTime:{future:"sa loob ng %s",past:"%s ang nakalipas",s:"ilang segundo",ss:"%d segundo",m:"isang minuto",mm:"%d minuto",h:"isang oras",hh:"%d oras",d:"isang araw",dd:"%d araw",M:"isang buwan",MM:"%d buwan",y:"isang taon",yy:"%d taon"},dayOfMonthOrdinalParse:/\d{1,2}/,ordinal:function(e){return e},week:{dow:1,doy:4}})}(n("./node_modules/moment/moment.js"))},"./node_modules/moment/locale/tlh.js":function(e,t,n){!function(e){"use strict";var t="pagh_wa’_cha’_wej_loS_vagh_jav_Soch_chorgh_Hut".split("_");function n(e,n,o,r){var s=function(e){var n=Math.floor(e%1e3/100),o=Math.floor(e%100/10),r=e%10,s="";return n>0&&(s+=t[n]+"vatlh"),o>0&&(s+=(""!==s?" ":"")+t[o]+"maH"),r>0&&(s+=(""!==s?" ":"")+t[r]),""===s?"pagh":s}(e);switch(o){case"ss":return s+" lup";case"mm":return s+" tup";case"hh":return s+" rep";case"dd":return s+" jaj";case"MM":return s+" jar";case"yy":return s+" DIS"}}e.defineLocale("tlh",{months:"tera’ jar wa’_tera’ jar cha’_tera’ jar wej_tera’ jar loS_tera’ jar vagh_tera’ jar jav_tera’ jar Soch_tera’ jar chorgh_tera’ jar Hut_tera’ jar wa’maH_tera’ jar wa’maH wa’_tera’ jar wa’maH cha’".split("_"),monthsShort:"jar wa’_jar cha’_jar wej_jar loS_jar vagh_jar jav_jar Soch_jar chorgh_jar Hut_jar wa’maH_jar wa’maH wa’_jar wa’maH cha’".split("_"),monthsParseExact:!0,weekdays:"lojmItjaj_DaSjaj_povjaj_ghItlhjaj_loghjaj_buqjaj_ghInjaj".split("_"),weekdaysShort:"lojmItjaj_DaSjaj_povjaj_ghItlhjaj_loghjaj_buqjaj_ghInjaj".split("_"),weekdaysMin:"lojmItjaj_DaSjaj_povjaj_ghItlhjaj_loghjaj_buqjaj_ghInjaj".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[DaHjaj] LT",nextDay:"[wa’leS] LT",nextWeek:"LLL",lastDay:"[wa’Hu’] LT",lastWeek:"LLL",sameElse:"L"},relativeTime:{future:function(e){var t=e;return-1!==e.indexOf("jaj")?t.slice(0,-3)+"leS":-1!==e.indexOf("jar")?t.slice(0,-3)+"waQ":-1!==e.indexOf("DIS")?t.slice(0,-3)+"nem":t+" pIq"},past:function(e){var t=e;return-1!==e.indexOf("jaj")?t.slice(0,-3)+"Hu’":-1!==e.indexOf("jar")?t.slice(0,-3)+"wen":-1!==e.indexOf("DIS")?t.slice(0,-3)+"ben":t+" ret"},s:"puS lup",ss:n,m:"wa’ tup",mm:n,h:"wa’ rep",hh:n,d:"wa’ jaj",dd:n,M:"wa’ jar",MM:n,y:"wa’ DIS",yy:n},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(n("./node_modules/moment/moment.js"))},"./node_modules/moment/locale/tr.js":function(e,t,n){!function(e){"use strict";var t={1:"'inci",5:"'inci",8:"'inci",70:"'inci",80:"'inci",2:"'nci",7:"'nci",20:"'nci",50:"'nci",3:"'üncü",4:"'üncü",100:"'üncü",6:"'ncı",9:"'uncu",10:"'uncu",30:"'uncu",60:"'ıncı",90:"'ıncı"};e.defineLocale("tr",{months:"Ocak_Şubat_Mart_Nisan_Mayıs_Haziran_Temmuz_Ağustos_Eylül_Ekim_Kasım_Aralık".split("_"),monthsShort:"Oca_Şub_Mar_Nis_May_Haz_Tem_Ağu_Eyl_Eki_Kas_Ara".split("_"),weekdays:"Pazar_Pazartesi_Salı_Çarşamba_Perşembe_Cuma_Cumartesi".split("_"),weekdaysShort:"Paz_Pts_Sal_Çar_Per_Cum_Cts".split("_"),weekdaysMin:"Pz_Pt_Sa_Ça_Pe_Cu_Ct".split("_"),meridiem:function(e,t,n){return e<12?n?"öö":"ÖÖ":n?"ös":"ÖS"},meridiemParse:/öö|ÖÖ|ös|ÖS/,isPM:function(e){return"ös"===e||"ÖS"===e},longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[bugün saat] LT",nextDay:"[yarın saat] LT",nextWeek:"[gelecek] dddd [saat] LT",lastDay:"[dün] LT",lastWeek:"[geçen] dddd [saat] LT",sameElse:"L"},relativeTime:{future:"%s sonra",past:"%s önce",s:"birkaç saniye",ss:"%d saniye",m:"bir dakika",mm:"%d dakika",h:"bir saat",hh:"%d saat",d:"bir gün",dd:"%d gün",w:"bir hafta",ww:"%d hafta",M:"bir ay",MM:"%d ay",y:"bir yıl",yy:"%d yıl"},ordinal:function(e,n){switch(n){case"d":case"D":case"Do":case"DD":return e;default:if(0===e)return e+"'ıncı";var o=e%10;return e+(t[o]||t[e%100-o]||t[e>=100?100:null])}},week:{dow:1,doy:7}})}(n("./node_modules/moment/moment.js"))},"./node_modules/moment/locale/tzl.js":function(e,t,n){!function(e){"use strict";function t(e,t,n,o){var r={s:["viensas secunds","'iensas secunds"],ss:[e+" secunds",e+" secunds"],m:["'n míut","'iens míut"],mm:[e+" míuts",e+" míuts"],h:["'n þora","'iensa þora"],hh:[e+" þoras",e+" þoras"],d:["'n ziua","'iensa ziua"],dd:[e+" ziuas",e+" ziuas"],M:["'n mes","'iens mes"],MM:[e+" mesen",e+" mesen"],y:["'n ar","'iens ar"],yy:[e+" ars",e+" ars"]};return o||t?r[n][0]:r[n][1]}e.defineLocale("tzl",{months:"Januar_Fevraglh_Març_Avrïu_Mai_Gün_Julia_Guscht_Setemvar_Listopäts_Noemvar_Zecemvar".split("_"),monthsShort:"Jan_Fev_Mar_Avr_Mai_Gün_Jul_Gus_Set_Lis_Noe_Zec".split("_"),weekdays:"Súladi_Lúneçi_Maitzi_Márcuri_Xhúadi_Viénerçi_Sáturi".split("_"),weekdaysShort:"Súl_Lún_Mai_Már_Xhú_Vié_Sát".split("_"),weekdaysMin:"Sú_Lú_Ma_Má_Xh_Vi_Sá".split("_"),longDateFormat:{LT:"HH.mm",LTS:"HH.mm.ss",L:"DD.MM.YYYY",LL:"D. MMMM [dallas] YYYY",LLL:"D. MMMM [dallas] YYYY HH.mm",LLLL:"dddd, [li] D. MMMM [dallas] YYYY HH.mm"},meridiemParse:/d\'o|d\'a/i,isPM:function(e){return"d'o"===e.toLowerCase()},meridiem:function(e,t,n){return e>11?n?"d'o":"D'O":n?"d'a":"D'A"},calendar:{sameDay:"[oxhi à] LT",nextDay:"[demà à] LT",nextWeek:"dddd [à] LT",lastDay:"[ieiri à] LT",lastWeek:"[sür el] dddd [lasteu à] LT",sameElse:"L"},relativeTime:{future:"osprei %s",past:"ja%s",s:t,ss:t,m:t,mm:t,h:t,hh:t,d:t,dd:t,M:t,MM:t,y:t,yy:t},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(n("./node_modules/moment/moment.js"))},"./node_modules/moment/locale/tzm-latn.js":function(e,t,n){!function(e){"use strict";e.defineLocale("tzm-latn",{months:"innayr_brˤayrˤ_marˤsˤ_ibrir_mayyw_ywnyw_ywlywz_ɣwšt_šwtanbir_ktˤwbrˤ_nwwanbir_dwjnbir".split("_"),monthsShort:"innayr_brˤayrˤ_marˤsˤ_ibrir_mayyw_ywnyw_ywlywz_ɣwšt_šwtanbir_ktˤwbrˤ_nwwanbir_dwjnbir".split("_"),weekdays:"asamas_aynas_asinas_akras_akwas_asimwas_asiḍyas".split("_"),weekdaysShort:"asamas_aynas_asinas_akras_akwas_asimwas_asiḍyas".split("_"),weekdaysMin:"asamas_aynas_asinas_akras_akwas_asimwas_asiḍyas".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[asdkh g] LT",nextDay:"[aska g] LT",nextWeek:"dddd [g] LT",lastDay:"[assant g] LT",lastWeek:"dddd [g] LT",sameElse:"L"},relativeTime:{future:"dadkh s yan %s",past:"yan %s",s:"imik",ss:"%d imik",m:"minuḍ",mm:"%d minuḍ",h:"saɛa",hh:"%d tassaɛin",d:"ass",dd:"%d ossan",M:"ayowr",MM:"%d iyyirn",y:"asgas",yy:"%d isgasn"},week:{dow:6,doy:12}})}(n("./node_modules/moment/moment.js"))},"./node_modules/moment/locale/tzm.js":function(e,t,n){!function(e){"use strict";e.defineLocale("tzm",{months:"ⵉⵏⵏⴰⵢⵔ_ⴱⵕⴰⵢⵕ_ⵎⴰⵕⵚ_ⵉⴱⵔⵉⵔ_ⵎⴰⵢⵢⵓ_ⵢⵓⵏⵢⵓ_ⵢⵓⵍⵢⵓⵣ_ⵖⵓⵛⵜ_ⵛⵓⵜⴰⵏⴱⵉⵔ_ⴽⵟⵓⴱⵕ_ⵏⵓⵡⴰⵏⴱⵉⵔ_ⴷⵓⵊⵏⴱⵉⵔ".split("_"),monthsShort:"ⵉⵏⵏⴰⵢⵔ_ⴱⵕⴰⵢⵕ_ⵎⴰⵕⵚ_ⵉⴱⵔⵉⵔ_ⵎⴰⵢⵢⵓ_ⵢⵓⵏⵢⵓ_ⵢⵓⵍⵢⵓⵣ_ⵖⵓⵛⵜ_ⵛⵓⵜⴰⵏⴱⵉⵔ_ⴽⵟⵓⴱⵕ_ⵏⵓⵡⴰⵏⴱⵉⵔ_ⴷⵓⵊⵏⴱⵉⵔ".split("_"),weekdays:"ⴰⵙⴰⵎⴰⵙ_ⴰⵢⵏⴰⵙ_ⴰⵙⵉⵏⴰⵙ_ⴰⴽⵔⴰⵙ_ⴰⴽⵡⴰⵙ_ⴰⵙⵉⵎⵡⴰⵙ_ⴰⵙⵉⴹⵢⴰⵙ".split("_"),weekdaysShort:"ⴰⵙⴰⵎⴰⵙ_ⴰⵢⵏⴰⵙ_ⴰⵙⵉⵏⴰⵙ_ⴰⴽⵔⴰⵙ_ⴰⴽⵡⴰⵙ_ⴰⵙⵉⵎⵡⴰⵙ_ⴰⵙⵉⴹⵢⴰⵙ".split("_"),weekdaysMin:"ⴰⵙⴰⵎⴰⵙ_ⴰⵢⵏⴰⵙ_ⴰⵙⵉⵏⴰⵙ_ⴰⴽⵔⴰⵙ_ⴰⴽⵡⴰⵙ_ⴰⵙⵉⵎⵡⴰⵙ_ⴰⵙⵉⴹⵢⴰⵙ".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[ⴰⵙⴷⵅ ⴴ] LT",nextDay:"[ⴰⵙⴽⴰ ⴴ] LT",nextWeek:"dddd [ⴴ] LT",lastDay:"[ⴰⵚⴰⵏⵜ ⴴ] LT",lastWeek:"dddd [ⴴ] LT",sameElse:"L"},relativeTime:{future:"ⴷⴰⴷⵅ ⵙ ⵢⴰⵏ %s",past:"ⵢⴰⵏ %s",s:"ⵉⵎⵉⴽ",ss:"%d ⵉⵎⵉⴽ",m:"ⵎⵉⵏⵓⴺ",mm:"%d ⵎⵉⵏⵓⴺ",h:"ⵙⴰⵄⴰ",hh:"%d ⵜⴰⵙⵙⴰⵄⵉⵏ",d:"ⴰⵙⵙ",dd:"%d oⵙⵙⴰⵏ",M:"ⴰⵢoⵓⵔ",MM:"%d ⵉⵢⵢⵉⵔⵏ",y:"ⴰⵙⴳⴰⵙ",yy:"%d ⵉⵙⴳⴰⵙⵏ"},week:{dow:6,doy:12}})}(n("./node_modules/moment/moment.js"))},"./node_modules/moment/locale/ug-cn.js":function(e,t,n){!function(e){"use strict";e.defineLocale("ug-cn",{months:"يانۋار_فېۋرال_مارت_ئاپرېل_ماي_ئىيۇن_ئىيۇل_ئاۋغۇست_سېنتەبىر_ئۆكتەبىر_نويابىر_دېكابىر".split("_"),monthsShort:"يانۋار_فېۋرال_مارت_ئاپرېل_ماي_ئىيۇن_ئىيۇل_ئاۋغۇست_سېنتەبىر_ئۆكتەبىر_نويابىر_دېكابىر".split("_"),weekdays:"يەكشەنبە_دۈشەنبە_سەيشەنبە_چارشەنبە_پەيشەنبە_جۈمە_شەنبە".split("_"),weekdaysShort:"يە_دۈ_سە_چا_پە_جۈ_شە".split("_"),weekdaysMin:"يە_دۈ_سە_چا_پە_جۈ_شە".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY-MM-DD",LL:"YYYY-يىلىM-ئاينىڭD-كۈنى",LLL:"YYYY-يىلىM-ئاينىڭD-كۈنى، HH:mm",LLLL:"dddd، YYYY-يىلىM-ئاينىڭD-كۈنى، HH:mm"},meridiemParse:/يېرىم كېچە|سەھەر|چۈشتىن بۇرۇن|چۈش|چۈشتىن كېيىن|كەچ/,meridiemHour:function(e,t){return 12===e&&(e=0),"يېرىم كېچە"===t||"سەھەر"===t||"چۈشتىن بۇرۇن"===t?e:"چۈشتىن كېيىن"===t||"كەچ"===t?e+12:e>=11?e:e+12},meridiem:function(e,t,n){var o=100*e+t;return o<600?"يېرىم كېچە":o<900?"سەھەر":o<1130?"چۈشتىن بۇرۇن":o<1230?"چۈش":o<1800?"چۈشتىن كېيىن":"كەچ"},calendar:{sameDay:"[بۈگۈن سائەت] LT",nextDay:"[ئەتە سائەت] LT",nextWeek:"[كېلەركى] dddd [سائەت] LT",lastDay:"[تۆنۈگۈن] LT",lastWeek:"[ئالدىنقى] dddd [سائەت] LT",sameElse:"L"},relativeTime:{future:"%s كېيىن",past:"%s بۇرۇن",s:"نەچچە سېكونت",ss:"%d سېكونت",m:"بىر مىنۇت",mm:"%d مىنۇت",h:"بىر سائەت",hh:"%d سائەت",d:"بىر كۈن",dd:"%d كۈن",M:"بىر ئاي",MM:"%d ئاي",y:"بىر يىل",yy:"%d يىل"},dayOfMonthOrdinalParse:/\d{1,2}(-كۈنى|-ئاي|-ھەپتە)/,ordinal:function(e,t){switch(t){case"d":case"D":case"DDD":return e+"-كۈنى";case"w":case"W":return e+"-ھەپتە";default:return e}},preparse:function(e){return e.replace(/،/g,",")},postformat:function(e){return e.replace(/,/g,"،")},week:{dow:1,doy:7}})}(n("./node_modules/moment/moment.js"))},"./node_modules/moment/locale/uk.js":function(e,t,n){!function(e){"use strict";function t(e,t,n){return"m"===n?t?"хвилина":"хвилину":"h"===n?t?"година":"годину":e+" "+(o=+e,r={ss:t?"секунда_секунди_секунд":"секунду_секунди_секунд",mm:t?"хвилина_хвилини_хвилин":"хвилину_хвилини_хвилин",hh:t?"година_години_годин":"годину_години_годин",dd:"день_дні_днів",MM:"місяць_місяці_місяців",yy:"рік_роки_років"}[n].split("_"),o%10==1&&o%100!=11?r[0]:o%10>=2&&o%10<=4&&(o%100<10||o%100>=20)?r[1]:r[2]);var o,r}function n(e){return function(){return e+"о"+(11===this.hours()?"б":"")+"] LT"}}e.defineLocale("uk",{months:{format:"січня_лютого_березня_квітня_травня_червня_липня_серпня_вересня_жовтня_листопада_грудня".split("_"),standalone:"січень_лютий_березень_квітень_травень_червень_липень_серпень_вересень_жовтень_листопад_грудень".split("_")},monthsShort:"січ_лют_бер_квіт_трав_черв_лип_серп_вер_жовт_лист_груд".split("_"),weekdays:function(e,t){var n={nominative:"неділя_понеділок_вівторок_середа_четвер_п’ятниця_субота".split("_"),accusative:"неділю_понеділок_вівторок_середу_четвер_п’ятницю_суботу".split("_"),genitive:"неділі_понеділка_вівторка_середи_четверга_п’ятниці_суботи".split("_")};return!0===e?n.nominative.slice(1,7).concat(n.nominative.slice(0,1)):e?n[/(\[[ВвУу]\]) ?dddd/.test(t)?"accusative":/\[?(?:минулої|наступної)? ?\] ?dddd/.test(t)?"genitive":"nominative"][e.day()]:n.nominative},weekdaysShort:"нд_пн_вт_ср_чт_пт_сб".split("_"),weekdaysMin:"нд_пн_вт_ср_чт_пт_сб".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY р.",LLL:"D MMMM YYYY р., HH:mm",LLLL:"dddd, D MMMM YYYY р., HH:mm"},calendar:{sameDay:n("[Сьогодні "),nextDay:n("[Завтра "),lastDay:n("[Вчора "),nextWeek:n("[У] dddd ["),lastWeek:function(){switch(this.day()){case 0:case 3:case 5:case 6:return n("[Минулої] dddd [").call(this);case 1:case 2:case 4:return n("[Минулого] dddd [").call(this)}},sameElse:"L"},relativeTime:{future:"за %s",past:"%s тому",s:"декілька секунд",ss:t,m:t,mm:t,h:"годину",hh:t,d:"день",dd:t,M:"місяць",MM:t,y:"рік",yy:t},meridiemParse:/ночі|ранку|дня|вечора/,isPM:function(e){return/^(дня|вечора)$/.test(e)},meridiem:function(e,t,n){return e<4?"ночі":e<12?"ранку":e<17?"дня":"вечора"},dayOfMonthOrdinalParse:/\d{1,2}-(й|го)/,ordinal:function(e,t){switch(t){case"M":case"d":case"DDD":case"w":case"W":return e+"-й";case"D":return e+"-го";default:return e}},week:{dow:1,doy:7}})}(n("./node_modules/moment/moment.js"))},"./node_modules/moment/locale/ur.js":function(e,t,n){!function(e){"use strict";var t=["جنوری","فروری","مارچ","اپریل","مئی","جون","جولائی","اگست","ستمبر","اکتوبر","نومبر","دسمبر"],n=["اتوار","پیر","منگل","بدھ","جمعرات","جمعہ","ہفتہ"];e.defineLocale("ur",{months:t,monthsShort:t,weekdays:n,weekdaysShort:n,weekdaysMin:n,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd، D MMMM YYYY HH:mm"},meridiemParse:/صبح|شام/,isPM:function(e){return"شام"===e},meridiem:function(e,t,n){return e<12?"صبح":"شام"},calendar:{sameDay:"[آج بوقت] LT",nextDay:"[کل بوقت] LT",nextWeek:"dddd [بوقت] LT",lastDay:"[گذشتہ روز بوقت] LT",lastWeek:"[گذشتہ] dddd [بوقت] LT",sameElse:"L"},relativeTime:{future:"%s بعد",past:"%s قبل",s:"چند سیکنڈ",ss:"%d سیکنڈ",m:"ایک منٹ",mm:"%d منٹ",h:"ایک گھنٹہ",hh:"%d گھنٹے",d:"ایک دن",dd:"%d دن",M:"ایک ماہ",MM:"%d ماہ",y:"ایک سال",yy:"%d سال"},preparse:function(e){return e.replace(/،/g,",")},postformat:function(e){return e.replace(/,/g,"،")},week:{dow:1,doy:4}})}(n("./node_modules/moment/moment.js"))},"./node_modules/moment/locale/uz-latn.js":function(e,t,n){!function(e){"use strict";e.defineLocale("uz-latn",{months:"Yanvar_Fevral_Mart_Aprel_May_Iyun_Iyul_Avgust_Sentabr_Oktabr_Noyabr_Dekabr".split("_"),monthsShort:"Yan_Fev_Mar_Apr_May_Iyun_Iyul_Avg_Sen_Okt_Noy_Dek".split("_"),weekdays:"Yakshanba_Dushanba_Seshanba_Chorshanba_Payshanba_Juma_Shanba".split("_"),weekdaysShort:"Yak_Dush_Sesh_Chor_Pay_Jum_Shan".split("_"),weekdaysMin:"Ya_Du_Se_Cho_Pa_Ju_Sha".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"D MMMM YYYY, dddd HH:mm"},calendar:{sameDay:"[Bugun soat] LT [da]",nextDay:"[Ertaga] LT [da]",nextWeek:"dddd [kuni soat] LT [da]",lastDay:"[Kecha soat] LT [da]",lastWeek:"[O'tgan] dddd [kuni soat] LT [da]",sameElse:"L"},relativeTime:{future:"Yaqin %s ichida",past:"Bir necha %s oldin",s:"soniya",ss:"%d soniya",m:"bir daqiqa",mm:"%d daqiqa",h:"bir soat",hh:"%d soat",d:"bir kun",dd:"%d kun",M:"bir oy",MM:"%d oy",y:"bir yil",yy:"%d yil"},week:{dow:1,doy:7}})}(n("./node_modules/moment/moment.js"))},"./node_modules/moment/locale/uz.js":function(e,t,n){!function(e){"use strict";e.defineLocale("uz",{months:"январ_феврал_март_апрел_май_июн_июл_август_сентябр_октябр_ноябр_декабр".split("_"),monthsShort:"янв_фев_мар_апр_май_июн_июл_авг_сен_окт_ноя_дек".split("_"),weekdays:"Якшанба_Душанба_Сешанба_Чоршанба_Пайшанба_Жума_Шанба".split("_"),weekdaysShort:"Якш_Душ_Сеш_Чор_Пай_Жум_Шан".split("_"),weekdaysMin:"Як_Ду_Се_Чо_Па_Жу_Ша".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"D MMMM YYYY, dddd HH:mm"},calendar:{sameDay:"[Бугун соат] LT [да]",nextDay:"[Эртага] LT [да]",nextWeek:"dddd [куни соат] LT [да]",lastDay:"[Кеча соат] LT [да]",lastWeek:"[Утган] dddd [куни соат] LT [да]",sameElse:"L"},relativeTime:{future:"Якин %s ичида",past:"Бир неча %s олдин",s:"фурсат",ss:"%d фурсат",m:"бир дакика",mm:"%d дакика",h:"бир соат",hh:"%d соат",d:"бир кун",dd:"%d кун",M:"бир ой",MM:"%d ой",y:"бир йил",yy:"%d йил"},week:{dow:1,doy:7}})}(n("./node_modules/moment/moment.js"))},"./node_modules/moment/locale/vi.js":function(e,t,n){!function(e){"use strict";e.defineLocale("vi",{months:"tháng 1_tháng 2_tháng 3_tháng 4_tháng 5_tháng 6_tháng 7_tháng 8_tháng 9_tháng 10_tháng 11_tháng 12".split("_"),monthsShort:"Thg 01_Thg 02_Thg 03_Thg 04_Thg 05_Thg 06_Thg 07_Thg 08_Thg 09_Thg 10_Thg 11_Thg 12".split("_"),monthsParseExact:!0,weekdays:"chủ nhật_thứ hai_thứ ba_thứ tư_thứ năm_thứ sáu_thứ bảy".split("_"),weekdaysShort:"CN_T2_T3_T4_T5_T6_T7".split("_"),weekdaysMin:"CN_T2_T3_T4_T5_T6_T7".split("_"),weekdaysParseExact:!0,meridiemParse:/sa|ch/i,isPM:function(e){return/^ch$/i.test(e)},meridiem:function(e,t,n){return e<12?n?"sa":"SA":n?"ch":"CH"},longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM [năm] YYYY",LLL:"D MMMM [năm] YYYY HH:mm",LLLL:"dddd, D MMMM [năm] YYYY HH:mm",l:"DD/M/YYYY",ll:"D MMM YYYY",lll:"D MMM YYYY HH:mm",llll:"ddd, D MMM YYYY HH:mm"},calendar:{sameDay:"[Hôm nay lúc] LT",nextDay:"[Ngày mai lúc] LT",nextWeek:"dddd [tuần tới lúc] LT",lastDay:"[Hôm qua lúc] LT",lastWeek:"dddd [tuần trước lúc] LT",sameElse:"L"},relativeTime:{future:"%s tới",past:"%s trước",s:"vài giây",ss:"%d giây",m:"một phút",mm:"%d phút",h:"một giờ",hh:"%d giờ",d:"một ngày",dd:"%d ngày",w:"một tuần",ww:"%d tuần",M:"một tháng",MM:"%d tháng",y:"một năm",yy:"%d năm"},dayOfMonthOrdinalParse:/\d{1,2}/,ordinal:function(e){return e},week:{dow:1,doy:4}})}(n("./node_modules/moment/moment.js"))},"./node_modules/moment/locale/x-pseudo.js":function(e,t,n){!function(e){"use strict";e.defineLocale("x-pseudo",{months:"J~áñúá~rý_F~ébrú~árý_~Márc~h_Áp~ríl_~Máý_~Júñé~_Júl~ý_Áú~gúst~_Sép~témb~ér_Ó~ctób~ér_Ñ~óvém~bér_~Décé~mbér".split("_"),monthsShort:"J~áñ_~Féb_~Már_~Ápr_~Máý_~Júñ_~Júl_~Áúg_~Sép_~Óct_~Ñóv_~Déc".split("_"),monthsParseExact:!0,weekdays:"S~úñdá~ý_Mó~ñdáý~_Túé~sdáý~_Wéd~ñésd~áý_T~húrs~dáý_~Fríd~áý_S~átúr~dáý".split("_"),weekdaysShort:"S~úñ_~Móñ_~Túé_~Wéd_~Thú_~Frí_~Sát".split("_"),weekdaysMin:"S~ú_Mó~_Tú_~Wé_T~h_Fr~_Sá".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[T~ódá~ý át] LT",nextDay:"[T~ómó~rró~w át] LT",nextWeek:"dddd [át] LT",lastDay:"[Ý~ést~érdá~ý át] LT",lastWeek:"[L~ást] dddd [át] LT",sameElse:"L"},relativeTime:{future:"í~ñ %s",past:"%s á~gó",s:"á ~féw ~sécó~ñds",ss:"%d s~écóñ~ds",m:"á ~míñ~úté",mm:"%d m~íñú~tés",h:"á~ñ hó~úr",hh:"%d h~óúrs",d:"á ~dáý",dd:"%d d~áýs",M:"á ~móñ~th",MM:"%d m~óñt~hs",y:"á ~ýéár",yy:"%d ý~éárs"},dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var t=e%10;return e+(1==~~(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")},week:{dow:1,doy:4}})}(n("./node_modules/moment/moment.js"))},"./node_modules/moment/locale/yo.js":function(e,t,n){!function(e){"use strict";e.defineLocale("yo",{months:"Sẹ́rẹ́_Èrèlè_Ẹrẹ̀nà_Ìgbé_Èbibi_Òkùdu_Agẹmo_Ògún_Owewe_Ọ̀wàrà_Bélú_Ọ̀pẹ̀̀".split("_"),monthsShort:"Sẹ́r_Èrl_Ẹrn_Ìgb_Èbi_Òkù_Agẹ_Ògú_Owe_Ọ̀wà_Bél_Ọ̀pẹ̀̀".split("_"),weekdays:"Àìkú_Ajé_Ìsẹ́gun_Ọjọ́rú_Ọjọ́bọ_Ẹtì_Àbámẹ́ta".split("_"),weekdaysShort:"Àìk_Ajé_Ìsẹ́_Ọjr_Ọjb_Ẹtì_Àbá".split("_"),weekdaysMin:"Àì_Aj_Ìs_Ọr_Ọb_Ẹt_Àb".split("_"),longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY h:mm A",LLLL:"dddd, D MMMM YYYY h:mm A"},calendar:{sameDay:"[Ònì ni] LT",nextDay:"[Ọ̀la ni] LT",nextWeek:"dddd [Ọsẹ̀ tón'bọ] [ni] LT",lastDay:"[Àna ni] LT",lastWeek:"dddd [Ọsẹ̀ tólọ́] [ni] LT",sameElse:"L"},relativeTime:{future:"ní %s",past:"%s kọjá",s:"ìsẹjú aayá die",ss:"aayá %d",m:"ìsẹjú kan",mm:"ìsẹjú %d",h:"wákati kan",hh:"wákati %d",d:"ọjọ́ kan",dd:"ọjọ́ %d",M:"osù kan",MM:"osù %d",y:"ọdún kan",yy:"ọdún %d"},dayOfMonthOrdinalParse:/ọjọ́\s\d{1,2}/,ordinal:"ọjọ́ %d",week:{dow:1,doy:4}})}(n("./node_modules/moment/moment.js"))},"./node_modules/moment/locale/zh-cn.js":function(e,t,n){!function(e){"use strict";e.defineLocale("zh-cn",{months:"一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),weekdays:"星期日_星期一_星期二_星期三_星期四_星期五_星期六".split("_"),weekdaysShort:"周日_周一_周二_周三_周四_周五_周六".split("_"),weekdaysMin:"日_一_二_三_四_五_六".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY/MM/DD",LL:"YYYY年M月D日",LLL:"YYYY年M月D日Ah点mm分",LLLL:"YYYY年M月D日ddddAh点mm分",l:"YYYY/M/D",ll:"YYYY年M月D日",lll:"YYYY年M月D日 HH:mm",llll:"YYYY年M月D日dddd HH:mm"},meridiemParse:/凌晨|早上|上午|中午|下午|晚上/,meridiemHour:function(e,t){return 12===e&&(e=0),"凌晨"===t||"早上"===t||"上午"===t?e:"下午"===t||"晚上"===t?e+12:e>=11?e:e+12},meridiem:function(e,t,n){var o=100*e+t;return o<600?"凌晨":o<900?"早上":o<1130?"上午":o<1230?"中午":o<1800?"下午":"晚上"},calendar:{sameDay:"[今天]LT",nextDay:"[明天]LT",nextWeek:function(e){return e.week()!==this.week()?"[下]dddLT":"[本]dddLT"},lastDay:"[昨天]LT",lastWeek:function(e){return this.week()!==e.week()?"[上]dddLT":"[本]dddLT"},sameElse:"L"},dayOfMonthOrdinalParse:/\d{1,2}(日|月|周)/,ordinal:function(e,t){switch(t){case"d":case"D":case"DDD":return e+"日";case"M":return e+"月";case"w":case"W":return e+"周";default:return e}},relativeTime:{future:"%s后",past:"%s前",s:"几秒",ss:"%d 秒",m:"1 分钟",mm:"%d 分钟",h:"1 小时",hh:"%d 小时",d:"1 天",dd:"%d 天",w:"1 周",ww:"%d 周",M:"1 个月",MM:"%d 个月",y:"1 年",yy:"%d 年"},week:{dow:1,doy:4}})}(n("./node_modules/moment/moment.js"))},"./node_modules/moment/locale/zh-hk.js":function(e,t,n){!function(e){"use strict";e.defineLocale("zh-hk",{months:"一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),weekdays:"星期日_星期一_星期二_星期三_星期四_星期五_星期六".split("_"),weekdaysShort:"週日_週一_週二_週三_週四_週五_週六".split("_"),weekdaysMin:"日_一_二_三_四_五_六".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY/MM/DD",LL:"YYYY年M月D日",LLL:"YYYY年M月D日 HH:mm",LLLL:"YYYY年M月D日dddd HH:mm",l:"YYYY/M/D",ll:"YYYY年M月D日",lll:"YYYY年M月D日 HH:mm",llll:"YYYY年M月D日dddd HH:mm"},meridiemParse:/凌晨|早上|上午|中午|下午|晚上/,meridiemHour:function(e,t){return 12===e&&(e=0),"凌晨"===t||"早上"===t||"上午"===t?e:"中午"===t?e>=11?e:e+12:"下午"===t||"晚上"===t?e+12:void 0},meridiem:function(e,t,n){var o=100*e+t;return o<600?"凌晨":o<900?"早上":o<1200?"上午":1200===o?"中午":o<1800?"下午":"晚上"},calendar:{sameDay:"[今天]LT",nextDay:"[明天]LT",nextWeek:"[下]ddddLT",lastDay:"[昨天]LT",lastWeek:"[上]ddddLT",sameElse:"L"},dayOfMonthOrdinalParse:/\d{1,2}(日|月|週)/,ordinal:function(e,t){switch(t){case"d":case"D":case"DDD":return e+"日";case"M":return e+"月";case"w":case"W":return e+"週";default:return e}},relativeTime:{future:"%s後",past:"%s前",s:"幾秒",ss:"%d 秒",m:"1 分鐘",mm:"%d 分鐘",h:"1 小時",hh:"%d 小時",d:"1 天",dd:"%d 天",M:"1 個月",MM:"%d 個月",y:"1 年",yy:"%d 年"}})}(n("./node_modules/moment/moment.js"))},"./node_modules/moment/locale/zh-mo.js":function(e,t,n){!function(e){"use strict";e.defineLocale("zh-mo",{months:"一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),weekdays:"星期日_星期一_星期二_星期三_星期四_星期五_星期六".split("_"),weekdaysShort:"週日_週一_週二_週三_週四_週五_週六".split("_"),weekdaysMin:"日_一_二_三_四_五_六".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"YYYY年M月D日",LLL:"YYYY年M月D日 HH:mm",LLLL:"YYYY年M月D日dddd HH:mm",l:"D/M/YYYY",ll:"YYYY年M月D日",lll:"YYYY年M月D日 HH:mm",llll:"YYYY年M月D日dddd HH:mm"},meridiemParse:/凌晨|早上|上午|中午|下午|晚上/,meridiemHour:function(e,t){return 12===e&&(e=0),"凌晨"===t||"早上"===t||"上午"===t?e:"中午"===t?e>=11?e:e+12:"下午"===t||"晚上"===t?e+12:void 0},meridiem:function(e,t,n){var o=100*e+t;return o<600?"凌晨":o<900?"早上":o<1130?"上午":o<1230?"中午":o<1800?"下午":"晚上"},calendar:{sameDay:"[今天] LT",nextDay:"[明天] LT",nextWeek:"[下]dddd LT",lastDay:"[昨天] LT",lastWeek:"[上]dddd LT",sameElse:"L"},dayOfMonthOrdinalParse:/\d{1,2}(日|月|週)/,ordinal:function(e,t){switch(t){case"d":case"D":case"DDD":return e+"日";case"M":return e+"月";case"w":case"W":return e+"週";default:return e}},relativeTime:{future:"%s內",past:"%s前",s:"幾秒",ss:"%d 秒",m:"1 分鐘",mm:"%d 分鐘",h:"1 小時",hh:"%d 小時",d:"1 天",dd:"%d 天",M:"1 個月",MM:"%d 個月",y:"1 年",yy:"%d 年"}})}(n("./node_modules/moment/moment.js"))},"./node_modules/moment/locale/zh-tw.js":function(e,t,n){!function(e){"use strict";e.defineLocale("zh-tw",{months:"一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),weekdays:"星期日_星期一_星期二_星期三_星期四_星期五_星期六".split("_"),weekdaysShort:"週日_週一_週二_週三_週四_週五_週六".split("_"),weekdaysMin:"日_一_二_三_四_五_六".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY/MM/DD",LL:"YYYY年M月D日",LLL:"YYYY年M月D日 HH:mm",LLLL:"YYYY年M月D日dddd HH:mm",l:"YYYY/M/D",ll:"YYYY年M月D日",lll:"YYYY年M月D日 HH:mm",llll:"YYYY年M月D日dddd HH:mm"},meridiemParse:/凌晨|早上|上午|中午|下午|晚上/,meridiemHour:function(e,t){return 12===e&&(e=0),"凌晨"===t||"早上"===t||"上午"===t?e:"中午"===t?e>=11?e:e+12:"下午"===t||"晚上"===t?e+12:void 0},meridiem:function(e,t,n){var o=100*e+t;return o<600?"凌晨":o<900?"早上":o<1130?"上午":o<1230?"中午":o<1800?"下午":"晚上"},calendar:{sameDay:"[今天] LT",nextDay:"[明天] LT",nextWeek:"[下]dddd LT",lastDay:"[昨天] LT",lastWeek:"[上]dddd LT",sameElse:"L"},dayOfMonthOrdinalParse:/\d{1,2}(日|月|週)/,ordinal:function(e,t){switch(t){case"d":case"D":case"DDD":return e+"日";case"M":return e+"月";case"w":case"W":return e+"週";default:return e}},relativeTime:{future:"%s後",past:"%s前",s:"幾秒",ss:"%d 秒",m:"1 分鐘",mm:"%d 分鐘",h:"1 小時",hh:"%d 小時",d:"1 天",dd:"%d 天",M:"1 個月",MM:"%d 個月",y:"1 年",yy:"%d 年"}})}(n("./node_modules/moment/moment.js"))},"./node_modules/moment/locale sync recursive ^\\.\\/.*$":(e,t,n)=>{var o={"./af":"./node_modules/moment/locale/af.js","./af.js":"./node_modules/moment/locale/af.js","./ar":"./node_modules/moment/locale/ar.js","./ar-dz":"./node_modules/moment/locale/ar-dz.js","./ar-dz.js":"./node_modules/moment/locale/ar-dz.js","./ar-kw":"./node_modules/moment/locale/ar-kw.js","./ar-kw.js":"./node_modules/moment/locale/ar-kw.js","./ar-ly":"./node_modules/moment/locale/ar-ly.js","./ar-ly.js":"./node_modules/moment/locale/ar-ly.js","./ar-ma":"./node_modules/moment/locale/ar-ma.js","./ar-ma.js":"./node_modules/moment/locale/ar-ma.js","./ar-sa":"./node_modules/moment/locale/ar-sa.js","./ar-sa.js":"./node_modules/moment/locale/ar-sa.js","./ar-tn":"./node_modules/moment/locale/ar-tn.js","./ar-tn.js":"./node_modules/moment/locale/ar-tn.js","./ar.js":"./node_modules/moment/locale/ar.js","./az":"./node_modules/moment/locale/az.js","./az.js":"./node_modules/moment/locale/az.js","./be":"./node_modules/moment/locale/be.js","./be.js":"./node_modules/moment/locale/be.js","./bg":"./node_modules/moment/locale/bg.js","./bg.js":"./node_modules/moment/locale/bg.js","./bm":"./node_modules/moment/locale/bm.js","./bm.js":"./node_modules/moment/locale/bm.js","./bn":"./node_modules/moment/locale/bn.js","./bn-bd":"./node_modules/moment/locale/bn-bd.js","./bn-bd.js":"./node_modules/moment/locale/bn-bd.js","./bn.js":"./node_modules/moment/locale/bn.js","./bo":"./node_modules/moment/locale/bo.js","./bo.js":"./node_modules/moment/locale/bo.js","./br":"./node_modules/moment/locale/br.js","./br.js":"./node_modules/moment/locale/br.js","./bs":"./node_modules/moment/locale/bs.js","./bs.js":"./node_modules/moment/locale/bs.js","./ca":"./node_modules/moment/locale/ca.js","./ca.js":"./node_modules/moment/locale/ca.js","./cs":"./node_modules/moment/locale/cs.js","./cs.js":"./node_modules/moment/locale/cs.js","./cv":"./node_modules/moment/locale/cv.js","./cv.js":"./node_modules/moment/locale/cv.js","./cy":"./node_modules/moment/locale/cy.js","./cy.js":"./node_modules/moment/locale/cy.js","./da":"./node_modules/moment/locale/da.js","./da.js":"./node_modules/moment/locale/da.js","./de":"./node_modules/moment/locale/de.js","./de-at":"./node_modules/moment/locale/de-at.js","./de-at.js":"./node_modules/moment/locale/de-at.js","./de-ch":"./node_modules/moment/locale/de-ch.js","./de-ch.js":"./node_modules/moment/locale/de-ch.js","./de.js":"./node_modules/moment/locale/de.js","./dv":"./node_modules/moment/locale/dv.js","./dv.js":"./node_modules/moment/locale/dv.js","./el":"./node_modules/moment/locale/el.js","./el.js":"./node_modules/moment/locale/el.js","./en-au":"./node_modules/moment/locale/en-au.js","./en-au.js":"./node_modules/moment/locale/en-au.js","./en-ca":"./node_modules/moment/locale/en-ca.js","./en-ca.js":"./node_modules/moment/locale/en-ca.js","./en-gb":"./node_modules/moment/locale/en-gb.js","./en-gb.js":"./node_modules/moment/locale/en-gb.js","./en-ie":"./node_modules/moment/locale/en-ie.js","./en-ie.js":"./node_modules/moment/locale/en-ie.js","./en-il":"./node_modules/moment/locale/en-il.js","./en-il.js":"./node_modules/moment/locale/en-il.js","./en-in":"./node_modules/moment/locale/en-in.js","./en-in.js":"./node_modules/moment/locale/en-in.js","./en-nz":"./node_modules/moment/locale/en-nz.js","./en-nz.js":"./node_modules/moment/locale/en-nz.js","./en-sg":"./node_modules/moment/locale/en-sg.js","./en-sg.js":"./node_modules/moment/locale/en-sg.js","./eo":"./node_modules/moment/locale/eo.js","./eo.js":"./node_modules/moment/locale/eo.js","./es":"./node_modules/moment/locale/es.js","./es-do":"./node_modules/moment/locale/es-do.js","./es-do.js":"./node_modules/moment/locale/es-do.js","./es-mx":"./node_modules/moment/locale/es-mx.js","./es-mx.js":"./node_modules/moment/locale/es-mx.js","./es-us":"./node_modules/moment/locale/es-us.js","./es-us.js":"./node_modules/moment/locale/es-us.js","./es.js":"./node_modules/moment/locale/es.js","./et":"./node_modules/moment/locale/et.js","./et.js":"./node_modules/moment/locale/et.js","./eu":"./node_modules/moment/locale/eu.js","./eu.js":"./node_modules/moment/locale/eu.js","./fa":"./node_modules/moment/locale/fa.js","./fa.js":"./node_modules/moment/locale/fa.js","./fi":"./node_modules/moment/locale/fi.js","./fi.js":"./node_modules/moment/locale/fi.js","./fil":"./node_modules/moment/locale/fil.js","./fil.js":"./node_modules/moment/locale/fil.js","./fo":"./node_modules/moment/locale/fo.js","./fo.js":"./node_modules/moment/locale/fo.js","./fr":"./node_modules/moment/locale/fr.js","./fr-ca":"./node_modules/moment/locale/fr-ca.js","./fr-ca.js":"./node_modules/moment/locale/fr-ca.js","./fr-ch":"./node_modules/moment/locale/fr-ch.js","./fr-ch.js":"./node_modules/moment/locale/fr-ch.js","./fr.js":"./node_modules/moment/locale/fr.js","./fy":"./node_modules/moment/locale/fy.js","./fy.js":"./node_modules/moment/locale/fy.js","./ga":"./node_modules/moment/locale/ga.js","./ga.js":"./node_modules/moment/locale/ga.js","./gd":"./node_modules/moment/locale/gd.js","./gd.js":"./node_modules/moment/locale/gd.js","./gl":"./node_modules/moment/locale/gl.js","./gl.js":"./node_modules/moment/locale/gl.js","./gom-deva":"./node_modules/moment/locale/gom-deva.js","./gom-deva.js":"./node_modules/moment/locale/gom-deva.js","./gom-latn":"./node_modules/moment/locale/gom-latn.js","./gom-latn.js":"./node_modules/moment/locale/gom-latn.js","./gu":"./node_modules/moment/locale/gu.js","./gu.js":"./node_modules/moment/locale/gu.js","./he":"./node_modules/moment/locale/he.js","./he.js":"./node_modules/moment/locale/he.js","./hi":"./node_modules/moment/locale/hi.js","./hi.js":"./node_modules/moment/locale/hi.js","./hr":"./node_modules/moment/locale/hr.js","./hr.js":"./node_modules/moment/locale/hr.js","./hu":"./node_modules/moment/locale/hu.js","./hu.js":"./node_modules/moment/locale/hu.js","./hy-am":"./node_modules/moment/locale/hy-am.js","./hy-am.js":"./node_modules/moment/locale/hy-am.js","./id":"./node_modules/moment/locale/id.js","./id.js":"./node_modules/moment/locale/id.js","./is":"./node_modules/moment/locale/is.js","./is.js":"./node_modules/moment/locale/is.js","./it":"./node_modules/moment/locale/it.js","./it-ch":"./node_modules/moment/locale/it-ch.js","./it-ch.js":"./node_modules/moment/locale/it-ch.js","./it.js":"./node_modules/moment/locale/it.js","./ja":"./node_modules/moment/locale/ja.js","./ja.js":"./node_modules/moment/locale/ja.js","./jv":"./node_modules/moment/locale/jv.js","./jv.js":"./node_modules/moment/locale/jv.js","./ka":"./node_modules/moment/locale/ka.js","./ka.js":"./node_modules/moment/locale/ka.js","./kk":"./node_modules/moment/locale/kk.js","./kk.js":"./node_modules/moment/locale/kk.js","./km":"./node_modules/moment/locale/km.js","./km.js":"./node_modules/moment/locale/km.js","./kn":"./node_modules/moment/locale/kn.js","./kn.js":"./node_modules/moment/locale/kn.js","./ko":"./node_modules/moment/locale/ko.js","./ko.js":"./node_modules/moment/locale/ko.js","./ku":"./node_modules/moment/locale/ku.js","./ku.js":"./node_modules/moment/locale/ku.js","./ky":"./node_modules/moment/locale/ky.js","./ky.js":"./node_modules/moment/locale/ky.js","./lb":"./node_modules/moment/locale/lb.js","./lb.js":"./node_modules/moment/locale/lb.js","./lo":"./node_modules/moment/locale/lo.js","./lo.js":"./node_modules/moment/locale/lo.js","./lt":"./node_modules/moment/locale/lt.js","./lt.js":"./node_modules/moment/locale/lt.js","./lv":"./node_modules/moment/locale/lv.js","./lv.js":"./node_modules/moment/locale/lv.js","./me":"./node_modules/moment/locale/me.js","./me.js":"./node_modules/moment/locale/me.js","./mi":"./node_modules/moment/locale/mi.js","./mi.js":"./node_modules/moment/locale/mi.js","./mk":"./node_modules/moment/locale/mk.js","./mk.js":"./node_modules/moment/locale/mk.js","./ml":"./node_modules/moment/locale/ml.js","./ml.js":"./node_modules/moment/locale/ml.js","./mn":"./node_modules/moment/locale/mn.js","./mn.js":"./node_modules/moment/locale/mn.js","./mr":"./node_modules/moment/locale/mr.js","./mr.js":"./node_modules/moment/locale/mr.js","./ms":"./node_modules/moment/locale/ms.js","./ms-my":"./node_modules/moment/locale/ms-my.js","./ms-my.js":"./node_modules/moment/locale/ms-my.js","./ms.js":"./node_modules/moment/locale/ms.js","./mt":"./node_modules/moment/locale/mt.js","./mt.js":"./node_modules/moment/locale/mt.js","./my":"./node_modules/moment/locale/my.js","./my.js":"./node_modules/moment/locale/my.js","./nb":"./node_modules/moment/locale/nb.js","./nb.js":"./node_modules/moment/locale/nb.js","./ne":"./node_modules/moment/locale/ne.js","./ne.js":"./node_modules/moment/locale/ne.js","./nl":"./node_modules/moment/locale/nl.js","./nl-be":"./node_modules/moment/locale/nl-be.js","./nl-be.js":"./node_modules/moment/locale/nl-be.js","./nl.js":"./node_modules/moment/locale/nl.js","./nn":"./node_modules/moment/locale/nn.js","./nn.js":"./node_modules/moment/locale/nn.js","./oc-lnc":"./node_modules/moment/locale/oc-lnc.js","./oc-lnc.js":"./node_modules/moment/locale/oc-lnc.js","./pa-in":"./node_modules/moment/locale/pa-in.js","./pa-in.js":"./node_modules/moment/locale/pa-in.js","./pl":"./node_modules/moment/locale/pl.js","./pl.js":"./node_modules/moment/locale/pl.js","./pt":"./node_modules/moment/locale/pt.js","./pt-br":"./node_modules/moment/locale/pt-br.js","./pt-br.js":"./node_modules/moment/locale/pt-br.js","./pt.js":"./node_modules/moment/locale/pt.js","./ro":"./node_modules/moment/locale/ro.js","./ro.js":"./node_modules/moment/locale/ro.js","./ru":"./node_modules/moment/locale/ru.js","./ru.js":"./node_modules/moment/locale/ru.js","./sd":"./node_modules/moment/locale/sd.js","./sd.js":"./node_modules/moment/locale/sd.js","./se":"./node_modules/moment/locale/se.js","./se.js":"./node_modules/moment/locale/se.js","./si":"./node_modules/moment/locale/si.js","./si.js":"./node_modules/moment/locale/si.js","./sk":"./node_modules/moment/locale/sk.js","./sk.js":"./node_modules/moment/locale/sk.js","./sl":"./node_modules/moment/locale/sl.js","./sl.js":"./node_modules/moment/locale/sl.js","./sq":"./node_modules/moment/locale/sq.js","./sq.js":"./node_modules/moment/locale/sq.js","./sr":"./node_modules/moment/locale/sr.js","./sr-cyrl":"./node_modules/moment/locale/sr-cyrl.js","./sr-cyrl.js":"./node_modules/moment/locale/sr-cyrl.js","./sr.js":"./node_modules/moment/locale/sr.js","./ss":"./node_modules/moment/locale/ss.js","./ss.js":"./node_modules/moment/locale/ss.js","./sv":"./node_modules/moment/locale/sv.js","./sv.js":"./node_modules/moment/locale/sv.js","./sw":"./node_modules/moment/locale/sw.js","./sw.js":"./node_modules/moment/locale/sw.js","./ta":"./node_modules/moment/locale/ta.js","./ta.js":"./node_modules/moment/locale/ta.js","./te":"./node_modules/moment/locale/te.js","./te.js":"./node_modules/moment/locale/te.js","./tet":"./node_modules/moment/locale/tet.js","./tet.js":"./node_modules/moment/locale/tet.js","./tg":"./node_modules/moment/locale/tg.js","./tg.js":"./node_modules/moment/locale/tg.js","./th":"./node_modules/moment/locale/th.js","./th.js":"./node_modules/moment/locale/th.js","./tk":"./node_modules/moment/locale/tk.js","./tk.js":"./node_modules/moment/locale/tk.js","./tl-ph":"./node_modules/moment/locale/tl-ph.js","./tl-ph.js":"./node_modules/moment/locale/tl-ph.js","./tlh":"./node_modules/moment/locale/tlh.js","./tlh.js":"./node_modules/moment/locale/tlh.js","./tr":"./node_modules/moment/locale/tr.js","./tr.js":"./node_modules/moment/locale/tr.js","./tzl":"./node_modules/moment/locale/tzl.js","./tzl.js":"./node_modules/moment/locale/tzl.js","./tzm":"./node_modules/moment/locale/tzm.js","./tzm-latn":"./node_modules/moment/locale/tzm-latn.js","./tzm-latn.js":"./node_modules/moment/locale/tzm-latn.js","./tzm.js":"./node_modules/moment/locale/tzm.js","./ug-cn":"./node_modules/moment/locale/ug-cn.js","./ug-cn.js":"./node_modules/moment/locale/ug-cn.js","./uk":"./node_modules/moment/locale/uk.js","./uk.js":"./node_modules/moment/locale/uk.js","./ur":"./node_modules/moment/locale/ur.js","./ur.js":"./node_modules/moment/locale/ur.js","./uz":"./node_modules/moment/locale/uz.js","./uz-latn":"./node_modules/moment/locale/uz-latn.js","./uz-latn.js":"./node_modules/moment/locale/uz-latn.js","./uz.js":"./node_modules/moment/locale/uz.js","./vi":"./node_modules/moment/locale/vi.js","./vi.js":"./node_modules/moment/locale/vi.js","./x-pseudo":"./node_modules/moment/locale/x-pseudo.js","./x-pseudo.js":"./node_modules/moment/locale/x-pseudo.js","./yo":"./node_modules/moment/locale/yo.js","./yo.js":"./node_modules/moment/locale/yo.js","./zh-cn":"./node_modules/moment/locale/zh-cn.js","./zh-cn.js":"./node_modules/moment/locale/zh-cn.js","./zh-hk":"./node_modules/moment/locale/zh-hk.js","./zh-hk.js":"./node_modules/moment/locale/zh-hk.js","./zh-mo":"./node_modules/moment/locale/zh-mo.js","./zh-mo.js":"./node_modules/moment/locale/zh-mo.js","./zh-tw":"./node_modules/moment/locale/zh-tw.js","./zh-tw.js":"./node_modules/moment/locale/zh-tw.js"};function r(e){var t=s(e);return n(t)}function s(e){if(!n.o(o,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return o[e]}r.keys=function(){return Object.keys(o)},r.resolve=s,e.exports=r,r.id="./node_modules/moment/locale sync recursive ^\\.\\/.*$"},"./node_modules/ng-csv/build/ng-csv.min.js":(e,t)=>{var n;n=window,document,angular.module("ngCsv.config",[]).value("ngCsv.config",{debug:!0}).config(["$compileProvider",function(e){angular.isDefined(e.urlSanitizationWhitelist)?e.urlSanitizationWhitelist(/^\s*(https?|ftp|mailto|file|data):/):e.aHrefSanitizationWhitelist(/^\s*(https?|ftp|mailto|file|data):/)}]),angular.module("ngCsv.directives",["ngCsv.services"]),angular.module("ngCsv.services",[]),angular.module("ngCsv",["ngCsv.config","ngCsv.services","ngCsv.directives","ngSanitize"]),e.exports===t&&(e.exports="ngCsv"),angular.module("ngCsv.services").service("CSV",["$q",function(e){var t="\r\n",n={"\\t":"\t","\\b":"\b","\\v":"\v","\\f":"\f","\\r":"\r"};this.stringifyField=function(e,t){return"locale"===t.decimalSep&&this.isFloat(e)?e.toLocaleString():"."!==t.decimalSep&&this.isFloat(e)?e.toString().replace(".",t.decimalSep):"string"==typeof e?(e=e.replace(/"/g,'""'),(t.quoteStrings||e.indexOf(",")>-1||e.indexOf("\n")>-1||e.indexOf("\r")>-1)&&(e=t.txtDelim+e+t.txtDelim),e):"boolean"==typeof e?e?"TRUE":"FALSE":e},this.isFloat=function(e){return+e===e&&(!isFinite(e)||Boolean(e%1))},this.stringify=function(n,o){var r=e.defer(),s=this,a="",i="",d=e.when(n).then((function(e){var n,d;angular.isDefined(o.header)&&o.header&&(n=[],angular.forEach(o.header,(function(e){this.push(s.stringifyField(e,o))}),n),d=n.join(o.fieldSep?o.fieldSep:","),i+=d+t);var u,m,l=[];angular.isArray(e)?l=e:angular.isFunction(e)&&(l=e()),angular.isDefined(o.label)&&o.label&&"boolean"==typeof o.label&&(u=[],angular.forEach(l[0],(function(e,t){this.push(s.stringifyField(t,o))}),u),m=u.join(o.fieldSep?o.fieldSep:","),i+=m+t),angular.forEach(l,(function(e,n){var r,a,d=angular.copy(l[n]);a=[];var u=o.columnOrder?o.columnOrder:d;angular.forEach(u,(function(e){var t=o.columnOrder?d[e]:e;this.push(s.stringifyField(t,o))}),a),r=a.join(o.fieldSep?o.fieldSep:","),i+=n'),i=angular.element(a.children()[0]);i.attr("href",n.URL.createObjectURL(o)),i.attr("download",e.getFilename()),i.attr("target","_blank"),r.find("body").append(a),s((function(){i[0].click(),i.remove()}),null)}}()})),e.$apply()}))}}}])},"./src/js/chat/chat.tpl.html":(e,t,n)=>{"use strict";e.exports=n.p+"templates/5e32f2e1a6d11e8f150e.html"},"./src/js/closing/closing.tpl.html":(e,t,n)=>{"use strict";e.exports=n.p+"templates/00860aee362cdeeb1080.html"},"./src/js/offline/offline.tpl.html":(e,t,n)=>{"use strict";e.exports=n.p+"templates/1b90d6b0c511f3791069.html"},"./src/js/online/online.tpl.html":(e,t,n)=>{"use strict";e.exports=n.p+"templates/26fbe83f4ba96d6e6cf1.html"},"./src/js/unmanaged/unmanaged.tpl.html":(e,t,n)=>{"use strict";e.exports=n.p+"templates/3f18dac5f545add792db.html"},"./src/js/waiting/waiting.tpl.html":(e,t,n)=>{"use strict";e.exports=n.p+"templates/6043a16afdb829ba5934.html"}},e=>{var t=t=>e(e.s=t);e.O(0,["vendor-index","vendor-angular-76f2ed34","vendor-angular-58d021f3","vendor-ng-embed","vendor-moment","vendor-jquery","vendor-jquery.textcomplete","vendor-emojionearea","vendor-emojione","vendor-angular-sanitize","vendor-angular-resource","vendor-angular-messages","vendor-angular-material","vendor-angular-local-storage","vendor-angular-animate","vendor-urlMatcher","vendor-transition","vendor-stateService","vendor-stateDirectives","vendor-flow"],(()=>(t("./node_modules/jquery/dist/jquery.js"),t("./node_modules/angular/index-exposed.js"),t("./node_modules/moment/moment.js"),t("./node_modules/@flowjs/flow.js/src/flow.js"),t("./node_modules/emojione/lib/js/emojione.js"),t("./src/js/index.module.js")))),e.O()}]); +//# sourceMappingURL=chat.js.map \ No newline at end of file diff --git a/snippet/3.1.0/scripts/chat.js.LICENSE.txt b/snippet/3.1.0/scripts/chat.js.LICENSE.txt new file mode 100644 index 0000000..0c56e30 --- /dev/null +++ b/snippet/3.1.0/scripts/chat.js.LICENSE.txt @@ -0,0 +1,7 @@ +/** + * @license AngularJS v1.8.2 + * (c) 2010-2020 Google LLC. http://angularjs.org + * License: MIT + */ + +//! moment.js locale configuration diff --git a/snippet/3.1.0/scripts/chat.js.map b/snippet/3.1.0/scripts/chat.js.map new file mode 100644 index 0000000..271f324 --- /dev/null +++ b/snippet/3.1.0/scripts/chat.js.map @@ -0,0 +1 @@ +{"version":3,"file":"scripts/chat.js","mappings":";iMAOAA,QAAQC,OAAO,gBAAiB,IAC/BC,SAAS,eAAe,WACvB,aAMAC,KAAKC,SAAW,GAQhBD,KAAKE,QAAU,SAAUC,GACvB,OAAO,IAAIC,EAAKD,IASlBH,KAAKK,OAAS,GASdL,KAAKM,GAAK,SAAUC,EAAOC,GACzBR,KAAKK,OAAOI,KAAK,CAACF,EAAOC,KAG3BR,KAAKU,KAAO,WACV,IAAIC,EAAKX,KAAKE,QACVD,EAAWD,KAAKC,SAChBI,EAASL,KAAKK,OAClB,MAAO,CACL,OAAU,SAASO,GAEjB,IAAIC,EAAOF,EAAGd,QAAQiB,OAAO,GAAIb,EAAUW,IAI3C,OAHAf,QAAQkB,QAAQV,GAAQ,SAAUE,GAChCM,EAAKP,GAAGC,EAAM,GAAIA,EAAM,OAEnBM,QAKfhB,QAAQC,OAAO,YAAa,CAAC,kBAC1BkB,WAAW,WAAY,CAAC,SAAU,SAAU,SAAU,cACvD,SAAUC,EAAQC,EAAQC,EAAQC,GAEhC,IAAIjB,EAAUN,QAAQiB,OAAO,GAAIG,EAAOI,MAAMH,EAAOI,WAGjDT,EAAQI,EAAOI,MAAMH,EAAOK,aAAeH,EAAYI,OAAOrB,GAE9DsB,EAAkB,SAASC,GAC7B,IAAIC,EAAOC,MAAMC,UAAUC,MAAMC,KAAKC,WACtCL,EAAKM,QACL,IAAI1B,EAAQU,EAAOiB,WAAWC,MAAMlB,EAAQ,CAAC,SAAWS,EAAWb,GAAMuB,OAAOT,IAMhF,GALI,CACF,SAAW,EAAG,eAAiB,EAAG,YAAe,EAAG,UAAa,EAAG,SAAY,GAChFD,IACAT,EAAOoB,cAEL9B,EAAM+B,iBACR,OAAO,GAIXzB,EAAKP,GAAG,WAAYmB,GACpBR,EAAOsB,IAAI,YAAY,WACnB1B,EAAK2B,IAAI,WAAYf,MAGzBR,EAAOwB,MAAQ5B,EAEXK,EAAOwB,eAAe,cACxBvB,EAAOD,EAAOyB,UAAUC,OAAO3B,EAAQJ,GACvCI,EAAOsB,IAAI,YAAY,WACrBpB,EAAOD,EAAOyB,UAAUC,OAAO3B,UAIpC4B,UAAU,WAAY,CAAC,WACtB,MAAO,CACLC,OAAO,EACP9B,WAAY,eAGlBnB,QAAQC,OAAO,WAAY,CAAC,cAC3B+C,UAAU,UAAW,CAAC,WACrB,MAAO,CACL,SAAY,KACZ,OAAS,EACT,QAAW,YACX,KAAQ,SAASC,EAAOC,EAASC,GAC/B,IAAIC,EAAcD,EAAMN,eAAe,iBACnCQ,EAAeF,EAAMN,eAAe,kBACpCS,EAAaH,EAAMN,eAAe,cAAgBI,EAAMzB,MAAM2B,EAAMI,WACxEN,EAAML,MAAMY,aAAaN,EAASE,EAAaC,EAAcC,QAInEtD,QAAQC,OAAO,kBAAmB,CAAC,cAKhC+C,UAAU,mBAAmB,WAC5B,MAAO,CACL,OAAS,EACT,KAAQ,SAASC,EAAOC,EAASC,GAC/BD,EAAQO,KAAK,iBAAiB,SAAU/C,GACtCA,EAAMgD,yBASbV,UAAU,gBAAiB,CAAC,WAAY,SAASW,GAChD,MAAO,CACL,OAAS,EACT,KAAQ,SAASV,EAAOC,EAASC,GAC/B,IAAIS,EACAC,GAAQ,EACZX,EAAQO,KAAK,YAAY,SAAU/C,GAmBnC,IAAoBoD,EACdC,EACAC,EADAD,GAAW,EACXC,GAFcF,EAlBFpD,GAoBasD,cAAgBF,EAAUG,cAAcD,aACrEhE,QAAQkB,QAAQ8C,GAAgBA,EAAaE,OAAO,SAASC,GAC/C,UAARA,IACFJ,GAAW,MAGRA,IAvBFF,IACHZ,EAAMmB,OAAOjB,EAAMkB,eACnBR,GAAQ,GAEVF,EAASW,OAAOV,GAChBlD,EAAMgD,qBAERR,EAAQO,KAAK,kBAAkB,SAAU/C,GACvCiD,EAASW,OAAOV,GAChBA,EAAUD,GAAS,WACjBV,EAAMzB,MAAM2B,EAAMoB,eAClBX,EAAU,KACVC,GAAQ,IACP,aAgBb7D,QAAQC,OAAO,YAAa,CAAC,cAC5B+C,UAAU,YAAY,WACrB,MAAO,CACL,OAAS,EACT,QAAW,YACX,KAAQ,SAASC,EAAOC,EAASC,GAY/B,SAASqB,IACPvB,EAAML,MAAM4B,WAAWtB,GAZrBC,EAAMsB,gBACRxB,EAAMyB,OAAOvB,EAAMsB,iBAAiB,SAAUE,GACxCA,EACFH,IAYJvB,EAAML,MAAMgC,aAAa1B,MANzBsB,SAYP,SAAUxE,GAAU,aACnB,IAAIC,EAASD,EAAQC,OAAO,cAAe,CAAC,cAgB5CD,EAAQkB,QAfK,CACX2D,YAAa,CAAC,QAAS,YACvBC,aAAc,CAAC,SACfC,UAAW,CAAC,QAAS,UACrBC,WAAY,CAAC,SAAU,UACvBC,eAAgB,CAAC,SAAU,UAC3BC,UAAW,CAAC,SACZC,YAAa,CAAC,SACdC,UAAW,CAAC,QAAS,YACrBC,YAAa,GACbC,SAAU,GACVC,SAAU,GACVC,MAAO,CAAC,WAAY,WAGE,SAAUC,EAAW5D,GAC3C,IA4B6B6D,EA5BzBC,EAAO,SA4BkBD,EA5Ba7D,GA6B5B+D,OAAO,GAAGC,cAAgBH,EAAOzD,MAAM,IA5BzC,mBAAR0D,IACFA,EAAO,qBAET1F,EAAO+C,UAAU2C,EAAM,CAAC,WACtB,MAAO,CACLG,QAAS,YACT3E,WAAY,CAAC,SAAU,SAAU,SAAUC,EAAQC,GACjDD,EAAOsB,IAAI,SAAWb,GAAW,WAC/B,IAAIkE,EAAWhE,MAAMC,UAAUC,MAAMC,KAAKC,WACtCzB,EAAQqF,EAAS3D,QAErB,GAAIhB,EAAOwB,QAAUmD,EAAS3D,QAA9B,CAGA,IAAIN,EAAO,GACX9B,EAAQkB,QAAQuE,GAAW,SAASd,EAAOqB,GACzClE,EAAK6C,GAASoB,EAASC,OAEgB,IAArC5E,EAAOI,MAAMH,EAAOsE,GAAO7D,IAC7BpB,EAAMgD,8BAtCnB,CAiDC1D,SAEFA,QAAQC,OAAO,WAAY,CAAC,cAC3B+C,UAAU,UAAW,CAAC,WACrB,MAAO,CACL,OAAS,EACT,QAAW,YACX,KAAQ,SAASC,EAAOC,EAASC,GAC/B,IAAI8C,EAAO9C,EAAM+C,QACjBjD,EAAMyB,OAAOuB,GAAM,SAAUA,GAC3B,GAAKA,EAAL,CAGA,IAAIE,EAAa,IAAIC,WACrBD,EAAWE,cAAcJ,EAAKA,MAC9BE,EAAWG,OAAS,SAAU5F,GAC5BuC,EAAMmB,QAAO,WACXjB,EAAMoD,KAAK,MAAO7F,EAAM8F,OAAOC,qBAO3CzG,QAAQC,OAAO,iBAAkB,CAAC,cACjC+C,UAAU,gBAAiB,CAAC,WAC3B,MAAO,CACL,OAAS,EACT,QAAW,YACX,KAAQ,SAASC,GACfA,EAAMyD,UAAYzD,EAAML,MAAM+D,WAIpC3G,QAAQC,OAAO,OAAQ,CAAC,gBAAiB,YAAa,cAAe,WACnE,YAAa,iBAAkB,WAAY,yHC9JlC2G,4PAkKX,SAASC,EAAmBC,EAAUC,EAAaC,EAAcC,EAAOC,GACpE,IAAIC,GAAkB,IAAAC,OAAM,yBACxBC,GAAe,IAAAD,OAAM,sBACzB,MAAO,CACHE,SAAU,MACVC,UAAW,IACXC,QAAS,SAAUC,GACf,IAAIC,EAAUD,EAASE,OAEvB,OADAF,EAASG,QACF,SAAU3E,EAAO4E,GACpB,IAAIC,EAAOD,EAASC,KAAK,WACzB,IAAKA,EAGD,OAFAD,EAASF,KAAKD,QACdZ,EAASe,EAASE,WAAlBjB,CAA8B7D,GAGlC,IAAI+E,EAAMF,EAAKG,MAAQ,CAAEC,SAAU,GAAIC,YAAa,EAAAC,MAChDC,EAAaL,EAAIM,MAAQ,IAAI,EAAAC,eAAeP,EAAIM,MACpDT,EAASF,KAAKK,EAAIG,YAAYN,EAAUQ,IAAeX,GACvD,EAAAc,MAAA,gBAAsBV,EAAKW,QAASZ,EAASF,QAC7C,IAAIe,EAAO5B,EAASe,EAASE,YACzB5G,EAAa6G,EAAI7G,WACjBwH,EAAexB,EAAgBa,GAC/BY,EAAYvB,EAAaW,GACzBa,EAASR,IAAc,OAAUA,GAErC,GADApF,EAAM2F,GAAaC,EACf1H,EAAY,CACZ,IAAI2H,EAAsB/B,EAAY5F,GAAY,IAAAF,QAAO,GAAI4H,EAAQ,CAAEzH,OAAQ6B,EAAO4E,SAAUA,KAC5Fc,IACA1F,EAAM0F,GAAgBG,EACtB7F,EAAM0F,GAAcC,GAAaC,GAMrChB,EAASC,KAAK,0BAA2BgB,GACzCjB,EAASkB,WAAWjB,KAAK,0BAA2BgB,GACpDE,EAA4B9B,EAAIF,EAAc8B,EAAoB7F,EAAO+E,GAG7E,IAAI,IAAAiB,UAASjB,EAAIkB,WACb,IAAIC,GAAY,IAAAC,aAAYpB,EAAIkB,WAC5BG,EAAc,IAAIC,OAAO,eAAiBH,EAAY,IAAK,KAO3DI,EAAoBtG,EAAMyB,QAND,WACzB,IAAI8E,EAAc,GAAGvH,MAChBC,KAAK2F,EAAS,GAAGkB,UACjBU,QAAO,SAAUC,GAAM,OAAOA,GAAMA,EAAGC,SAAWN,EAAYO,KAAKF,EAAGC,YAC3E,OAAOH,GAAe,aAAgBA,GAAa1B,KAAK,IAAME,EAAIkB,UAAY,iBAErB,SAAUW,GAC9DA,IAELb,EAA4B9B,EAAIF,EAAc6C,EAAc5G,EAAO+E,GACnEuB,QAGRb,EAAKzF,MAzNrB2D,EAAS,CACL,QACA,WACA,gBACA,eACA,KACA,SAAwBK,EAAO6C,EAAUC,EAAeC,EAAc9C,GAwBlE,IAAI+C,EAAW,CACXhC,KAAM,CAAEC,SAAU,CAAEgC,SAAUjD,EAAMkD,WAAWC,qBAC/C3B,QAAS,IAETzF,EAAY,CACZqH,MAAO,EACP/C,SAAU,MACVgD,UAAU,EACV/C,SAAU,IACVgD,WAAY,UACZ/C,QAAS,SAAUC,EAAU+C,EAAQC,GACjC,OAAO,SAAUxH,EAAO4E,EAAU1E,GAC9B,IACIuH,EAAYC,EAAWC,EAAcC,EADrCC,EAAY3H,EAAc,QAAK,GAAI4H,EAAgB5H,EAAkB,WAAG6H,EAjCzE,SAAU9H,EAASsD,EAAQyE,GAC1B,mBAAwB,EACxBnB,EAASjG,MAAMX,EAAS,KAAMsD,GAAQ0E,KAAKD,GAG3CnB,EAASjG,MAAMX,EAAS,KAAMsD,EAAQyE,IA4BkCD,EAzBzE,SAAU9H,EAAS+H,GAClB,mBAAwB,EACxBnB,EAASqB,MAAMjI,GAASgI,KAAKD,GAG7BnB,EAASqB,MAAMjI,EAAS+H,IAoB0EG,EAAYvD,EAASwD,cAAc,YAAcpB,EAAUtE,EAAOqE,EAAa7G,EAAc,QAAKA,EAAY,MAAK,GAAjD6G,CAAqD/G,IAAU,WAEnOqI,EAAe,CACfC,MAAO,MACPC,GAAIxI,EAAUqH,QACd1E,KAAMA,EACN8F,IAAKL,EAAU3C,QAAQgD,IAAML,EAAU3C,QAAQgD,IAAM,IAAM9F,EAAOA,EAClE+F,OAAQ,KACRC,cAWJ,SAA+BD,KACvBA,GAAYA,aAAkB,QAEjBb,IAAYa,IAE7B,EAAAlD,MAAA,yBAA+B8C,EAAcI,GAAUA,EAAOxD,UAAYwD,EAAOxD,SAASgC,UAC1FW,EAAaa,EACbE,EAAWF,MAjBX,sBAEI,IAAIG,GAAsB,IAAAzE,OAAM,yBAAN,CAAgCgE,GAGtDU,GAAgB,IAAA1E,OAAM,0BAAN,CAAiCgE,GACrD,OAAOS,GAAuBC,IAGtC,EAAAtD,MAAA,iBAAuB,UAAW8C,GAUlCzD,EAASC,KAAK,UAAW,CAAEW,QAAS6C,IACpCM,IACA,IAAIG,EAAa9E,EAAM+E,eAAeV,GA2BtC,SAASM,EAAWF,GAChB,IAAIO,EAAWhJ,EAAMiJ,OACjBC,EAAYjF,EAAGkF,QAASC,EAAYnF,EAAGkF,QACvCE,EAAc,CACdrE,KAAMyD,EACNjD,QAAS6C,GAETiB,EAAc,CACdC,WAAYL,EAAUvI,QACtB6I,WAAYJ,EAAUzI,QACtB8I,YAAaL,GAcjBJ,EAASU,MAAM,sBAAuBhH,GACtC,IAAIiH,EAASnC,EAAYwB,GAAU,SAAUY,GACzCA,EAAM/E,KAAK,cAAeyE,GAC1BM,EAAM/E,KAAK,UAAWwE,GACtBtB,EAAe6B,EAAOhF,GAAU,WAC5BsE,EAAUW,UACNlC,GACAA,EAAa+B,MAAM,gCAClB,IAAAI,WAAUhC,KAAmBA,GAAkB9H,EAAMzB,MAAMuJ,KAC5DhB,EAAc8C,MAvD9B,WAWI,GAVInC,IACA,EAAAlC,MAAA,iBAAuB,yBAA0BkC,EAAW5C,KAAK,YACjE4C,EAAWsC,SACXtC,EAAa,MAEbE,IACA,EAAApC,MAAA,iBAAuB,mBAAoB8C,GAC3CV,EAAaqC,WACbrC,EAAe,MAEfD,EAAW,CACX,IAAIuC,EAAcvC,EAAU7C,KAAK,eACjC,EAAAU,MAAA,iBAAuB,cAAe0E,GACtClC,EAAeL,GAAW,WACtBuC,EAAYR,YAAYI,UACxBpC,EAAa,QAEjBA,EAAaC,EACbA,EAAY,MAuCZwC,MAEJxC,EAAYiC,GACZhC,EAAeqB,GAWFU,MAAM,qBAAsBjB,GAAUb,GACnDD,EAAapJ,MAAMsJ,GA7EvB7H,EAAMP,IAAI,YAAY,WAClB,EAAA8F,MAAA,iBAAuB,2BAA4B8C,GACnDS,UAgFhB,OAAO/I,IAGf6D,EAAmBuG,QAAU,CAAC,WAAY,cAAe,eAAgB,QAAS,MAiElF,IAAIC,EAAuE,mBAA7C,YAAe,aAAwB,UAEjEC,EAAe,EAEnB,SAAStE,EAA4B9B,EAAIF,EAAc8B,EAAoB1H,EAAQ4G,KAE3E,IAAAuF,YAAWzE,EAAmB0E,WAC3BxF,EAAIE,SAASgB,WAAalB,EAAIE,SAASuF,oBAAsBJ,GAChEvE,EAAmB0E,UAEvB,IAAIE,GAAY,IAAAC,MAAK3F,EAAIM,MAAMsF,MAAMC,KACjCC,EAAc,CAAErK,KAAMqF,GAE1B,IAAI,IAAAyE,YAAWzE,EAAmBiF,mBAAoB,CAClD,IACIC,EADiB,IAAI,EAAAzF,eAAeP,EAAIM,MACH2F,cAAc,gBAAgBnG,KAyBvE1G,EAAOsB,IAAI,WAAYsE,EAAakH,UAAU,IAvB1B,SAAUC,GAG1B,GAAIA,IAAiBH,IAAsE,IAA/CG,EAAaC,UAAUC,QAAQX,GAA3E,CAEA,IAAIY,EAAWH,EAAaI,OAAO,MAC/BC,EAAaL,EAAaI,OAAO,QACjCE,EAAgB,SAAUC,GAAQ,OAAOA,EAAKC,aAC9CC,EAAWT,EAAaU,YAAY,MAAMC,IAAIL,GAAeM,OAAO,EAAAC,QAAS,IAC7EC,EAAad,EAAaU,YAAY,QAAQC,IAAIL,GAAeM,OAAO,EAAAC,QAAS,IAEjFE,EAAkBN,EAASnF,QAAO,SAAU0F,GAC5C,IAAIC,EAAMH,EAAWZ,QAAQc,GAC7B,OAAgB,IAATC,IAAeH,EAAWG,GAAKC,KAAKC,OAAOhB,EAASa,EAAM3D,IAAKgD,EAAWW,EAAM3D,QAG3F,GAAI0D,EAAgBK,OAAQ,CACxB,IAAIC,EAAgBN,EAAgBJ,KAAI,SAAUW,GAAK,OAAOA,EAAEjE,MAE5DkE,GAAY,IAAAjG,QAAO6E,GAAU,SAAUnK,EAAK6B,GAAO,OAAuC,IAAhCwJ,EAAcnB,QAAQrI,MACpF8C,EAAmBiF,kBAAkB2B,EAAWvB,OAGSL,IAGrE,IAAI,IAAAP,YAAWzE,EAAmB6G,WAAY,CAC1C,IAAIC,EAAOtC,IACPuC,EAAc,gBAEdC,EAAqB,SAAUC,GAC/B,QAASA,IAAWA,EAAMF,KAA6C,IAA7BE,EAAMF,GAAaD,IAAmBE,EAAmBC,EAAMC,oBAYzGC,EAAW,CAAE7B,QAASV,EAAU/H,MACpCvE,EAAOsB,IAAI,WAAYsE,EAAakJ,SAASD,GAV3B,SAAUF,GACxB,IAAInM,EACAuM,EAAOJ,EAAMF,GAAeE,EAAMF,IAAgB,GAKtD,OAJKC,EAAmBC,KACpBnM,EAAUsD,EAAGkJ,KAAKtH,EAAmB6G,UAAUI,KACvC7E,MAAK,SAAU/G,GAAO,OAAQgM,EAAIP,IAAgB,IAARzL,KAE/CP,IAGyDkK,KAG5E,YAAe,mBAAmB9K,UAAU,SAAU4D,GACtD,YAAe,mBAAmB5D,UAAU,SAAU6D,sWC9ZlDwJ,EAAiC,WACjC,SAASA,IACL,IAAIC,EAAQnQ,KACGA,KAAKoQ,SAAWvQ,EAAQ,GAAR,cAAwB,EACxCG,KAAKU,KAAO,CACvB,QACA,iBACA,YACA,SAAU2P,EAAOC,EAAgBC,GAI7B,OAHAJ,EAAMK,iBAAmBD,EAAUE,KAAOF,EAAUE,IAAI,qBAAuBF,EAAUG,IAAI,oBAC7FP,EAAME,MAAQA,EACdF,EAAMG,eAAiBA,EAChBH,IAyJnB,OApJAD,EAAgBrO,UAAU8O,eAAiB,SAAUnM,GACjDxE,KAAKoQ,SAAW5L,GAepB0L,EAAgBrO,UAAU+O,WAAa,SAAUrF,EAAQ6C,EAAQyC,GAC7D,IACIC,EAAa,SAAUxK,GAAU,OAAO,EAAAyK,SAAA,QAAiBzK,GAAQyE,MAAK,SAAUiG,GAAO,MAAO,CAAGC,SAAUD,OAC3GE,EAAc,SAAU5K,GAAU,OAAO,EAAAyK,SAAA,QAAiBzK,GAAQyE,MAAK,SAAUiG,GAAO,MAAO,CAAGjI,UAAWiI,OACjH,OAAO,IAAApE,WAAUrB,EAAO0F,UAClBH,EAAW9Q,KAAKmR,WAAW5F,EAAO0F,SAAU7C,KAC5C,IAAAxB,WAAUrB,EAAO6F,aACbN,EAAW9Q,KAAKqR,QAAQ9F,EAAO6F,YAAahD,KAC5C,IAAAxB,WAAUrB,EAAO+F,kBACbR,EAAW9Q,KAAKuR,aAAahG,EAAO+F,iBAAkBlD,EAAQyC,KAC9D,IAAAjE,WAAUrB,EAAOxC,WACbmI,EAAY3F,EAAOxC,YACnB,IAAA6D,WAAUrB,EAAO+B,mBACb4D,EAAYlR,KAAKwR,sBAAsBjG,EAAO+B,kBAAmBc,EAAQyC,IACzEC,EAbA,wBAwB1BZ,EAAgBrO,UAAUsP,WAAa,SAAUF,EAAU7C,GACvD,OAAO,IAAAhB,YAAW6D,GAAYA,EAAS7C,GAAU6C,GAWrDf,EAAgBrO,UAAUwP,QAAU,SAAUI,EAAKrD,GAG/C,OAFI,IAAAhB,YAAWqE,KACXA,EAAMA,EAAIrD,IACH,MAAPqD,EACO,KACPzR,KAAKoQ,SACEpQ,KAAKqQ,MACPK,IAAIe,EAAK,CAAEC,MAAO1R,KAAKsQ,eAAgBqB,QAAS,CAAEC,OAAQ,eAC1D7G,MAAK,SAAU8G,GAChB,OAAOA,EAASlK,QAGjB3H,KAAKwQ,iBAAiBiB,IAUjCvB,EAAgBrO,UAAU0P,aAAe,SAAUxR,EAAUqO,EAAQyC,GACjE,IAAIiB,EAAO,EAAAf,SAAA,mBAA4BhR,GACnCgS,GAAa,IAAAC,SAAQjS,IAAY,IAAAyN,MAAKzN,GAAYA,EAEtD,OADiB,IAAI,EAAAkS,WAAW,GAAIF,EAAYD,GAC9BpB,IAAIG,IAS1BX,EAAgBrO,UAAU2P,sBAAwB,SAAUzR,EAAUqO,EAAQyC,GAC1E,IAAIiB,EAAO,EAAAf,SAAA,mBAA4BhR,GACnCgS,GAAa,IAAAC,SAAQjS,IAAY,IAAAyN,MAAKzN,GAAYA,EAEtD,OADiB,IAAI,EAAAkS,WAAW,GAAIF,EAAYD,GAC9BpB,IAAIG,IAgB1BX,EAAgBrO,UAAUqQ,sBAAwB,SAAUzL,EAAQoK,EAAS9H,EAAWoJ,GACpFA,EAAWA,GAAY,GAEvB,IAAIC,EAASvS,EAAQ,GAAR,eAAyB,EAAI,KAAO,GAE7CwS,EAAQ,SAAUC,GAClB,IAAIC,GAAU,IAAAtJ,aAAYqJ,GAC1B,MAAO,aAAa7I,KAAK8I,GAAW,KAAOA,EAAUA,GA6BrDvP,EAQZ,SAA8BwC,GAC1B,IAAIgN,EAAU,EAAAzB,SAAA,cAAuBvL,EAAO,aAC5C,IAAKgN,IAAYA,EAAQpD,OACrB,MAAM,IAAIqD,MAAM,mCAAqCjN,EAAO,KAChE,OAAOgN,EAAQ7D,IAAI+D,GAAa9D,OAAO,EAAAC,QAAS,IAZhC8D,CAAqB5J,GAAW4F,KA3BzB,SAAUiE,GACzB,IAAIpN,EAAOoN,EAAMpN,KAAM0J,EAAO0D,EAAM1D,KAChC2D,EAAWR,EAAM7M,GAIrB,GAAIiB,EAAOqM,KAAKD,KAAcV,EAAS3M,GACnC,OAAOqN,EAAW,KAAOpM,EAAOqM,KAAKD,GAAY,IACrD,IAAIE,EAAcZ,EAAS3M,IAASA,EAGpC,GAAa,MAAT0J,EACA,OAAO2D,EAAW,OAAST,EAAS,YAAcW,EAAc,MAIpE,GAAa,MAAT7D,EAAc,CACd,IAAI8D,EAAMnC,EAAQ/C,cAAciF,GAC5BpS,EAAKqS,GAAOA,EAAIrL,KAChBhG,EAAQhB,GAAM,EAAAoQ,SAAA,mBAA4BpQ,IAAQ,GAGtD,OAAOkS,EAAW,cAAgBE,IADhB,IAAAf,SAAQrR,GAAM,KAAOA,EAAGyO,OAAS,GAAK,IAAM,IACA,IAAMzN,EAAKsR,KAAK,KAAO,KAGzF,OAAOJ,EAAW,KAAOT,EAAS,YAAcW,EAAc,OAEJE,KAAK,KAC/DjK,EAAYqJ,EAAMtJ,GACtB,MAAO,IAAMC,EAAY,IAAMhG,EAAQ,MAAQgG,EAAY,KAExDkH,EArKyB,GAiLhCwC,EAAc,SAAUQ,GACxB,OAAI,IAAAC,UAASD,EAAIE,kBACNC,EAAcH,EAAIE,kBACtBC,EAAcH,EAAIpQ,QAIzBuQ,EAAgB,SAAUC,GAC1B,OAAOC,OAAOC,KAAKF,GAAe,IAE7B3E,KAAI,SAAU9I,GAAO,MAAO,CAACA,EAAK,oBAAoB4D,KAAK6J,EAAYzN,QAEvEyD,QAAO,SAAUmK,GAAS,OAAO,IAAA7G,WAAU6G,KAAU,IAAAzB,SAAQyB,EAAM,OAEnE9E,KAAI,SAAU8E,GAAS,MAAO,CAAGjO,KAAMiO,EAAM,GAAG,IAAMA,EAAM,GAAIvE,KAAMuE,EAAM,GAAG,2ECzL7EC,EAAsB,SAAUC,GACvC,OAAO,SAA0BC,GAC7B,IAAIC,EAAOD,EAAYD,GACnBG,EAAwB,WAAbH,EAAwB,OAAS,KAOhD,OAAOE,EANP,SAA0BjE,EAAOnC,GAC7B,IACIsG,EADiB,IAAI,EAAA3L,eAAewH,EAAMlB,YAAYoF,IAC1BC,WAAWtG,EAAMuG,WAC7CtL,GAAS,IAAA5H,QAAOmT,EAAUF,GAAa,CAAEG,QAASzG,EAAOO,aAAc4B,IAC3E,OAAO,EAAAmB,SAAA,iBAA0B8C,EAAM7T,KAAM0I,SAEhByL,ICfrCC,EAAqC,WACrC,SAASA,EAAoBC,GAEzBrU,KAAKsU,cAAgB,GACrBtU,KAAKqU,kBAAoBA,EACzB,IAAIE,GAAM,IAAAvQ,KAAIqQ,IACd,IAAAG,sBAAqBD,EAAKvU,KAAMuU,EAAK,CAAC,eA8D1C,OAhDAH,EAAoBK,6BAA+B,SAAUC,GACzD,IAAIC,EAAWD,EAAOE,kBAAkB1F,KAAK,QAC7CyF,EAASE,OAAS,SAAUvF,GACxB,OAAY,MAALA,EAAYA,EAAEwF,WAAWC,QAAQ,WAAW,SAAUC,GAAK,MAAQ,CAAE,IAAK,KAAM,IAAK,OAAQA,MAAU1F,GAElHqF,EAASM,OAAS,SAAU3F,GACxB,OAAY,MAALA,EAAYA,EAAEwF,WAAWC,QAAQ,aAAa,SAAUC,GAAK,MAAQ,CAAE,KAAM,IAAK,MAAO,KAAMA,MAAU1F,IAIxH8E,EAAoBvS,UAAUqT,QAAU,aACxCd,EAAoBvS,UAAUsT,SAAW,SAAU3U,GAC/C,IAAI2P,EAAQnQ,KAEZ,OADAA,KAAKsU,cAAc7T,KAAKD,GACjB,WAAc,OAAO,IAAA4U,YAAWjF,EAAMmE,cAAjB,CAAgC9T,KAEhE4T,EAAoBvS,UAAUwT,UAAY,WACtC,IAAIA,EAAYrV,KAAKqU,kBAAkBgB,YAEvC,OADAA,GAAY,IAAAlC,UAASkC,GAAaA,EAAUC,QAAUD,IAClCrV,KAAKuV,SAASC,SAEtCpB,EAAoBvS,UAAU4T,SAAW,WACrC,OAAOzV,KAAK0V,YAAc1V,KAAK0V,UAAY1V,KAAK2V,SAASF,YAAczV,KAAK4V,QAAQC,SAAS/B,WAEjGM,EAAoBvS,UAAU4P,IAAM,SAAUqE,EAAQf,EAAStH,GAQ3D,YAPgB,IAAZsH,IAAsBA,GAAU,IAChC,IAAAnI,WAAUkJ,IACV9V,KAAK+V,UAAUtE,IAAIqE,GACnBf,GACA/U,KAAK+V,UAAUhB,UACftH,GACAzN,KAAK+V,UAAUtI,MAAMA,GAClBzN,KAAK+V,UAAUtE,OAE1B2C,EAAoBvS,UAAUmU,iBAAmB,SAAUC,EAAYF,EAAWR,EAAUI,EAAUC,GAClG,IAAIzF,EAAQnQ,KACZA,KAAK+V,UAAYA,EACjB/V,KAAKuV,SAAWA,EAChBvV,KAAK2V,SAAWA,EAChB3V,KAAK4V,QAAUA,EAEfK,EAAW1T,IAAI,0BAA0B,SAAU2T,GAAO,OAAO/F,EAAMmE,cAAcvT,SAAQ,SAAUJ,GAAM,OAAOA,EAAGuV,SACvH,IAAIC,GAAO,IAAAnS,KAAI+R,IAEf,IAAAvB,sBAAqB2B,EAAMnW,KAAMmW,EAAM,CAAC,UAAW,OAAQ,SAAU,UAErE,IAAA3B,sBAAqB2B,EAAMnW,KAAMmW,EAAM,CAAC,OAAQ,WAAY,UAEzD/B,EApE6B,0ECaxCvU,EAAQ,GAAR,OAAe,qBAAsB,IACrC,IAAIuW,EAAWvW,EAAQ,GAAR,OAAe,iBAAkB,CAAC,OAC7CwW,EAAWxW,EAAQ,GAAR,OAAe,iBAAkB,CAAC,mBAC7CyW,EAAUzW,EAAQ,GAAR,OAAe,mBAAoB,CAAC,mBAC9C0W,EAAY1W,EAAQ,GAAR,OAAe,kBAAmB,CAAC,mBAAoB,iBAAkB,uBACrF2W,EAAW3W,EAAQ,GAAR,OAAe,YAAa,CAAC,iBAAkB,kBAAmB,uBAE7E6U,GADW7U,EAAQ,GAAR,OAAe,mBAAoB,CAAC,cACtC,MAGb,SAAS4W,EAAkBpC,IAEvBK,EAAS1U,KAAK0U,OAAS,IAAI,EAAAgC,UACpBC,cAAgB,IAAI,IAAcjC,EAAOkC,cAAelC,EAAOmC,cAEtEnC,EAAOkC,cAAcE,UAAU,QAAS,MACxCpC,EAAOkC,cAAcE,UAAU,SAAUpD,EAAoB,WAC7DgB,EAAOkC,cAAcE,UAAU,WAAYpD,EAAoB,aAC/DgB,EAAOkC,cAAcE,UAAU,UAAWpD,EAAoB,YAC9DgB,EAAOqC,YAAY/M,WAAWgN,mBAAmB,OAAO,WAExDtC,EAAOuC,WAAW1L,OAAO2L,eAAgB,EACzC,IAAIC,EAAsBzC,EAAO0C,gBAAkB1C,EAAO2C,eAAiB,IAAIjD,EAAoBC,GAMnG,SAAS3T,EAAKqV,EAAWJ,EAAUC,EAASL,EAAUU,EAAY5F,EAAOC,GAIrE,OAHA6G,EAAmBnB,iBAAiBC,EAAYF,EAAWR,EAAUI,EAAUC,UACxElB,EAAe,cACfA,EAAa,KACbA,EAEX,OAXAN,EAAoBK,6BAA6BC,GAEjDA,EAAe,OAAIA,EACnBA,EAAa,KAAIhU,EACjBA,EAAKuM,QAAU,CAAC,YAAa,WAAY,UAAW,WAAY,aAAc,QAAS,kBAOhFyH,EA1BX+B,EAAkBxJ,QAAU,CAAC,qBA4B7B,IAAIqK,EAAiB,SAAUC,GAAe,MAAO,CACjD,oBACA,SAAUC,GACN,IAAIC,EAAUD,EAAK9C,OAAO6C,GAE1B,OADAE,EAAc,KAAI,WAAc,OAAOA,GAChCA,KAKf,SAASC,EAASnH,EAAWxJ,EAAI4Q,GAI7B,GAHA,EAAA5G,SAAA,UAAqBR,EACrB,EAAAQ,SAAA,GAAchK,GAETwM,OAAO1R,UAAUa,eAAeX,KAAKwO,EAAW,YACjD,IACIA,EAAUqH,QAAO,SAAUC,OAE/B,MAAOxS,GACHkL,EAAUuH,WAAa,cAAcrO,KAAKpE,GAASA,EAAMyP,YAKjE6C,EAAUf,cACLlG,MACA/B,KAAI,SAAUW,GAAK,OAAOA,EAAE0E,UAAU+D,eACtCnJ,OAAO,EAAAC,QAAS,IAChBvF,QAAO,SAAUgG,GAAK,MAAkB,aAAXA,EAAEwC,QAC/B/Q,SAAQ,SAAUiX,GAAc,OAAQA,EAAWlG,KAAOvB,EAAU0H,SAASD,EAAWE,UAAW3H,EAAUuH,aAQ/G,SAASK,EAAalC,GACzBA,EAAW1R,QAAO,WACd,EAAA8D,MAAA,wBA9BRqP,EAASzK,QAAU,CAAC,YAAa,KAAM,aA2BvCkL,EAAalL,QAAU,CAAC,cAMxBmJ,EAASrW,SAAS,YAAa0W,GAC/BH,EAAQvW,SAAS,aAAc,CAAC,oBAXL,SAAUqY,GAAY,OAAQA,EAASC,kBAAoB,IAAI,IAAkBD,MAY5G/B,EAAStW,SAAS,cAAeuX,EAAe,eAChDjB,EAAStW,SAAS,qBAAsB,CAAC,oBAAqB,WAAc,OAAO2U,EAAOE,qBAC1FyB,EAAStW,SAAS,oBAAoB,WAAc,OAAO,IAAImQ,KAC/DqG,EAAUxW,SAAS,iBAAkBuX,EAAe,kBACpDf,EAAUxW,SAAS,mBAAoBuX,EAAe,YACtDf,EAAUxW,SAAS,eAAgBuX,EAAe,sBAClDf,EAAUxW,SAAS,SAAU,CAAC,oBAfP,WAAc,OAAO,IAAAe,QAAO4T,EAAOiC,cAAe,CAAEjW,KAAM,WAAc,OAAOgU,EAAOmC,mBAgB7GN,EAAUrW,QAAQ,eAAgB,CAAC,YAAa,SAAUyX,GAAa,OAAOA,EAAUW,QAAQlK,UAChGoI,EAAStW,QAAQ,SAAS,WAAc,OAAOwU,EAAOqC,eACtDP,EAASiB,QAAQ,UAAU,WAAc,OAAO,EAAApP,SAChDmO,EAAS+B,IAAIJ,GACb9B,EAASkC,IAAI,CAAC,qBAAsB,SAAUC,OAC9CjC,EAAUgC,IAAI,CAAC,SAAU,SAAUE,OACnCnC,EAAQiC,IAAI,CAAC,aAAc,SAAUG,OACrCtC,EAASmC,IAAIb,GAEN,IAAIzD,EAAY,SAAU0E,GAO7B,OANaA,EAAIC,YAAYtP,OAAO,EAAAR,UAChB6F,KAAI,SAAU9I,GAC9B,IAAImS,EAAaW,EAAI7K,cAAcjI,GAEnC,MAAO,CAACA,EAAoB,WADX8S,EAAIE,UAAUb,GAAYc,MACJd,EAAWvU,QAAUuU,EAAWrQ,SAE7DiH,OAAO,EAAAmK,WAAY,2JC9GrC,SAASC,EAAeP,GACpB,IAAIQ,EAAW,SAAUxL,EAAOW,EAAQjO,GACpC,OAAOsY,EAAOS,GAAGzL,EAAOW,EAAQjO,IAGpC,OADA8Y,EAASE,WAAY,EACdF,EAaX,SAASG,EAAuBX,GAC5B,IAAIY,EAAiB,SAAU5L,EAAOW,EAAQjO,GAC1C,OAAOsY,EAAOa,SAAS7L,EAAOW,EAAQjO,IAG1C,OADAkZ,EAAeF,WAAY,EACpBE,EAxBXL,EAAe/L,QAAU,CAAC,UAkB1BmM,EAAuBnM,QAAU,CAAC,UAQlC,YAAe,mBAAmB3D,OAAO,UAAW0P,GAAgB1P,OAAO,kBAAmB8P,oKCpB1FG,EAA+B,WAC/B,SAASA,EAAc3C,EAAeC,GAClC7W,KAAK4W,cAAgBA,EACrB5W,KAAK6W,aAAeA,GACpB,IAAArC,uBAAqB,IAAAxQ,KAAIuV,EAAc1X,WAAY7B,MAAM,IAAAgE,KAAIhE,OAgHjE,OArBAuZ,EAAc1X,UAAUiV,UAAY,SAAUtR,EAAMgU,GAChD,OAAOxZ,KAAK4W,cAAcE,UAAUtR,EAAMgU,IAASxZ,MAEvDuZ,EAAc1X,UAAU4L,MAAQ,SAAUjI,EAAMiU,GAQ5C,OAPI,IAAAtG,UAAS3N,GACTiU,EAAajU,EAGbiU,EAAWjU,KAAOA,EAEtBxF,KAAK4W,cAAc8C,SAASD,GACrBzZ,MAOXuZ,EAAc1X,UAAU8X,UAAY,SAAUnZ,GAC1C,OAAOR,KAAK6W,aAAa8C,UAAUnZ,IAEhC+Y,EApHuB,6LCf3B,SAASK,IACZ,IAAIC,EAAkB,KACtB,OAAO,SAAU1R,EAAM2R,GAEnB,OADAD,EAAkBA,GAAmB,EAAA9I,SAAA,cAAuB,oBACrD,CAAC,IAAIgJ,EAAc5R,EAAM2R,EAAMD,KAI9C,IAAIG,EAAY,SAAUxG,EAAMyG,GAAO,OAAOzG,EAAK5E,QAAO,SAAUsL,EAAKrU,GAAO,OAAOqU,IAAO,IAAAtN,WAAUqN,EAAIpU,OAAU,IAY/G,SAASsU,EAAgB1M,GAE5B,IAAKA,EAAM2M,OACP,MAAO,GACX,IAAgKC,EAAW,CAAC,YAAa,WAAY,qBAAsBC,EAA7M,CAAC,mBAAoB,cAAe,WAAY,SAAU,SAAyKlY,OAApJ,CAAC,aAAc,qBAAsB,eAAgB,cAAiHmY,EAAcF,EAASjY,OAAOkY,GAIjS,IAAI,IAAA1N,WAAUa,EAAM+M,QAAUR,EAAUO,EAAa9M,GACjD,MAAM,IAAIgF,MAAM,UAAYhF,EAAMjI,KAAlB,4JAGL+U,EAAYjR,QAAO,SAAUzD,GAAO,OAAO,IAAA+G,WAAUa,EAAM5H,OAAUoN,KAAK,OAEzF,IAAIuH,EAAQ,GAAIC,EAAchN,EAAM+M,OAAS,CAAEE,UAAU,IAAAC,MAAKlN,EAAO8M,IAsBrE,OArBA,IAAAxZ,SAAQ0Z,GAAa,SAAUlP,EAAQ/F,GASnC,GAPAA,EAAOA,GAAQ,YAEX,IAAAsD,UAASyC,KACTA,EAAS,CAAExC,UAAWwC,IAE1BA,GAAS,IAAAzK,QAAO,GAAIyK,GAEhByO,EAAUK,EAAU9O,IAAWyO,EAAUM,EAAa/O,GACtD,MAAM,IAAIkH,MAAM,mBAAqB4H,EAASpH,KAAK,KAAO,UAAYqH,EAAYrH,KAAK,KAAO,mBAAqBzN,EAAO,IAAMiI,EAAMjI,KAAO,KAEjJ+F,EAAO9C,UAAY8C,EAAO9C,WAAa,WACvC8C,EAAOH,MAAQ,MACfG,EAAOxB,SAAW0D,EAClBlC,EAAOqP,MAAQpV,EACf,IAAIqV,EAAa,EAAAC,YAAA,sBAAkCvP,EAAOxB,SAAUwB,EAAOqP,OAC3ErP,EAAOwP,YAAcF,EAAWG,WAChCzP,EAAO0P,qBAAuBJ,EAAWK,oBACzCV,EAAMhV,GAAQ+F,KAEXiP,EAGX,IAAInP,EAAK,EAEL0O,EAA+B,WAC/B,SAASA,EAAc5R,EAAMJ,EAAU7H,GACnC,IAAIiQ,EAAQnQ,KACZA,KAAKmI,KAAOA,EACZnI,KAAK+H,SAAWA,EAChB/H,KAAKE,QAAUA,EACfF,KAAKmb,IAAM9P,IACXrL,KAAKob,QAAS,EACdpb,KAAKgI,YAAc,SAAUvB,EAAQoK,GACjC,OAAOV,EAAMpH,UACPoH,EAAMjQ,QAAQgS,sBAAsBzL,EAAQoK,EAASV,EAAMpH,UAAWoH,EAAMpI,SAASoK,UACrFhC,EAAMc,UAiCpB,OA9BA8I,EAAclY,UAAUwZ,KAAO,WAC3B,IAAIlL,EAAQnQ,KACR+G,EAAK,EAAAgK,SAAA,GACLF,EAAU,IAAI,EAAAzI,eAAepI,KAAKmI,MAClCiG,EAASpO,KAAKmI,KAAKyG,QAAO,SAAUsL,EAAK3L,GAAQ,OAAO,IAAAzN,QAAOoZ,EAAK3L,EAAK+M,eAAiB,IAC1FC,EAAW,CACXtK,SAAUlK,EAAGkJ,KAAKjQ,KAAKE,QAAQ0Q,WAAW5Q,KAAK+H,SAAUqG,EAAQyC,IACjE7P,WAAY+F,EAAGkJ,KAAKjQ,KAAKwb,cAAc3K,KAE3C,OAAO9J,EAAG0U,IAAIF,GAAUxQ,MAAK,SAAU2Q,GAInC,OAHA,EAAArT,MAAA,sBAA4B,SAAU8H,GACtCA,EAAMnP,WAAa0a,EAAQ1a,YAC3B,IAAAF,QAAOqP,EAAOuL,EAAQzK,UACfd,MAQf4J,EAAclY,UAAU2Z,cAAgB,SAAU3K,GAC9C,IAAI9Q,EAAWC,KAAK+H,SAAS4T,mBAC7B,KAAK,IAAAC,cAAa7b,GACd,OAAOC,KAAK+H,SAAS/G,WACzB,IAAI8Q,EAAO,EAAAf,SAAA,mBAA4BhR,GACnCgS,GAAa,IAAAC,SAAQjS,IAAY,IAAAyN,MAAKzN,GAAYA,EAEtD,OADiB,IAAI,EAAAkS,WAAW,GAAIF,EAAYD,GAC9BpB,IAAIG,IAEnBkJ,EA5CuB,wKC9C9B8B,EAAmC,WAEnC,SAASA,EAAiCnH,GACtC1U,KAAK0U,OAASA,EA2KlB,OAzKAmH,EAAkBC,kBAAoB,SAAUpH,EAAQqH,GACpD,OAAO,SAAUC,GAAS,OAAO,EAAAjL,SAAA,iBAA0BgL,EAAS,KAAM,CAAEE,OAAQD,EAAOE,aAAcxH,EAAO4D,QAAQlK,WAG5HyN,EAAkBha,UAAUnB,KAAO,WAC/B,IAAIuW,EAAajX,KAAK0U,OAAOuC,WAI7B,OAHAjX,KAAK0U,OAAOyH,UAAUC,QAAO,GACxBnF,EAAWoF,mBACZpF,EAAWqF,SACRtc,KAAK0U,OAAOyH,WAiCvBN,EAAkBha,UAAU0a,KAAO,SAAUC,GACzC,IAAIrM,EAAQnQ,KACZ,KAAK,IAAAoN,YAAWoP,GACZ,MAAM,IAAI/J,MAAM,6BACpB,IACI8J,EAAO,IAAI,EAAAE,aADH,WAAc,OAAOD,EAAO,EAAAzL,SAAA,UAAoBZ,EAAMuE,OAAO0C,mBACvC,EAAAsF,UAElC,OADA1c,KAAK0U,OAAOuC,WAAW0F,MAAMJ,KAAKA,GAC3Bvc,MA4BX6b,EAAkBha,UAAU+a,UAAY,SAAUL,GAC9C,IAAIpM,EAAQnQ,KACR6c,EAAW7c,KAAK0U,OAAOuC,WAAW0F,MACtC,IAAI,IAAA7T,UAASyT,GACTM,EAASD,UAAUL,OAElB,MAAI,IAAAnP,YAAWmP,GAIhB,MAAM,IAAI9J,MAAM,uCAHhBoK,EAASD,WAAU,WAAc,OAAOL,EAAK,EAAAxL,SAAA,UAAoBZ,EAAMuE,OAAO0C,oBAKlF,OAAOpX,MAwCX6b,EAAkBha,UAAUoO,KAAO,SAAU6M,EAAMf,GAK/C,QAJI,IAAA/J,SAAQ+J,KAAY,IAAA3O,YAAW2O,MAC/BA,EAAUF,EAAkBC,kBAAkB9b,KAAK0U,OAAQqH,IAE/D/b,KAAK0U,OAAOuC,WAAW0F,MAAM1M,KAAK6M,EAAMf,GACjC/b,MAgCX6b,EAAkBha,UAAUkb,eAAiB,SAAU9Q,GACnDjM,KAAK0U,OAAOuC,WAAW8F,eAAe9Q,IAEnC4P,EA9K2B,iJCKtC,UAAe,mBAAmB9b,SAAS,iBApB3C,WACI,IAAIid,GAAkB,EACtBhd,KAAKgd,gBAAkB,WACnBA,GAAkB,GAEtBhd,KAAKU,KAAO,CACR,gBACA,WACA,SAAUuc,EAAezZ,GACrB,OAAIwZ,EACOC,EAEJ,SAAUvV,GACb,OAAOlE,GAAS,WACZkE,EAAS,GAAGwV,mBACb,GAAG,8nBClBlBC,EAAkD,WAClD,IAAK,IAAIC,EAAI,EAAGC,EAAI,EAAGC,EAAKtb,UAAUoN,OAAQiO,EAAIC,EAAID,IAAKD,GAAKpb,UAAUqb,GAAGjO,OACxE,IAAImO,EAAI3b,MAAMwb,GAAII,EAAI,EAA3B,IAA8BH,EAAI,EAAGA,EAAIC,EAAID,IACzC,IAAK,IAAII,EAAIzb,UAAUqb,GAAIK,EAAI,EAAGC,EAAKF,EAAErO,OAAQsO,EAAIC,EAAID,IAAKF,IAC1DD,EAAEC,GAAKC,EAAEC,GACjB,OAAOH,GAaAK,EAAwB,iBAATlQ,MAAqBA,KAAKA,OAASA,MAAQA,MAC9C,iBAAX,EAAAmQ,GAAuB,EAAAA,EAAOC,SAAW,EAAAD,GAAU,EAAAA,QAC3D,EACAhe,EAAU+d,EAAK/d,SAAW,GACnBke,EAAWle,EAAQke,UAAYC,KAAK/W,MAAM3D,KAAK0a,MAC/CC,EAASpe,EAAQoe,QAAUD,KAAKE,UAAU5a,KAAK0a,MAC/Cjd,EAAUlB,EAAQkB,SAqc7B,SAAkBkZ,EAAKnP,EAAIqF,GACvB,IAAI,QAAQ8J,GACR,OAAOA,EAAIlZ,QAAQ+J,EAAIqF,GAC3BoD,OAAOC,KAAKyG,GAAKlZ,SAAQ,SAAU8E,GAAO,OAAOiF,EAAGmP,EAAIpU,GAAMA,OAvcvD/E,EAASyS,OAAO3Q,QAycpB,SAAiBub,GACpB,IAAK,IAAId,EAAI,EAAGA,EAAIrb,UAAUoN,OAAQiO,IAAK,CACvC,IAAIpD,EAAMjY,UAAUqb,GACpB,GAAKpD,EAGL,IADA,IAAIzG,EAAOD,OAAOC,KAAKyG,GACdyD,EAAI,EAAGA,EAAIlK,EAAKpE,OAAQsO,IAC7BS,EAAM3K,EAAKkK,IAAMzD,EAAIzG,EAAKkK,IAGlC,OAAOS,GAldAhP,EAAStP,EAAQsP,QAod5B,SAASiP,EAAQC,EAAIC,GACjB,GAAID,IAAOC,EACP,OAAO,EACX,GAAW,OAAPD,GAAsB,OAAPC,EACf,OAAO,EACX,GAAID,GAAOA,GAAMC,GAAOA,EACpB,OAAO,EACX,IAAIC,SAAYF,EAChB,GAAIE,WAD4BD,GACR,WAAPC,EACb,OAAO,EACX,IAyBeC,EAAIC,EAzBfC,EAAM,CAACL,EAAIC,GACf,IAAI,QAAI,KAAJ,CAAaI,GACb,OAuBeD,EAvBMH,GAuBVE,EAvBMH,GAwBdjP,SAAWqP,EAAGrP,QAEduP,EAAYH,EAAIC,GAAI7P,QAAO,SAAUgQ,EAAGC,GAAK,OAAOD,GAAKR,EAAQS,EAAE,GAAIA,EAAE,OAAQ,GAzBxF,IAAI,QAAI,KAAJ,CAAYH,GACZ,OAAOL,EAAGS,YAAcR,EAAGQ,UAC/B,IAAI,QAAI,KAAJ,CAAcJ,GACd,OAAOL,EAAGvJ,aAAewJ,EAAGxJ,WAChC,IAAI,QAAI,KAAJ,CAAgB4J,GAChB,OAAO,EAEX,GADiB,CAAC,KAAY,KAAS,KAAQ,MAChC/P,IAAI,MAAKC,QAAO,SAAUgQ,EAAGje,GAAM,OAAOie,KAAOje,EAAG+d,MAAS,GACxE,OAAO,EACX,IAAIlL,EAAO,GAEX,IAAK,IAAI3N,KAAOwY,EAAI,CAChB,IAAKD,EAAQC,EAAGxY,GAAMyY,EAAGzY,IACrB,OAAO,EACX2N,EAAK3N,IAAO,EAEhB,IAAK,IAAIA,KAAOyY,EACZ,IAAK9K,EAAK3N,GACN,OAAO,EAEf,OAAO,GApfJ,SAAS6W,EAASpN,GACrB,OAAOA,EAEJ,SAASrH,KAyDT,SAASuM,EAAqBuK,EAAQ1Y,EAAQ/C,EAAM0b,EAASC,QAC/C,IAAbA,IAAuBA,GAAW,GACtC,IAAIC,EAAe,SAAUC,GAAU,OAAOJ,IAASI,GAAQ7b,KAAKA,MAQpE,OADA0b,EAAUA,GAAWzL,OAAOC,KAAKuL,MAClBnQ,QAAO,SAAUsL,EAAK1U,GAPd,IAAU2Z,EAS7B,OADAjF,EAAI1U,GAAQyZ,GARiBE,EAQW3Z,EAPjC,WAEH,OADAa,EAAO8Y,GAAUD,EAAaC,GACvB9Y,EAAO8Y,GAAQhd,MAAM,KAAMH,aAKUkd,EAAa1Z,GACtD0U,IACR7T,GAMA,IAAI+Y,EAAU,SAAUhF,EAAQiF,GAAS,OAAOve,EAAOyS,OAAO/R,OAAO4Y,GAASiF,IAE1EC,GAAU,SACd,SAAkBC,EAAOtF,GAC5B,OAA+B,IAAxBsF,EAAMrR,QAAQ+L,MAMd7E,GAAa,SACjB,SAAqBmK,EAAOtF,GAC/B,IAAIhL,EAAMsQ,EAAMrR,QAAQ+L,GAGxB,OAFIhL,GAAO,GACPsQ,EAAMC,OAAOvQ,EAAK,GACfsQ,KAGAE,GAAS,SACb,SAAiBC,EAAK1b,GACzB,OAAO0b,EAAIjf,KAAKuD,GAAMA,KAGf2b,EAAW,SAAUC,GAC5B,OAAOA,EAAU9d,QAAQf,SAAQ,SAAUJ,GACzB,mBAAPA,GAAqBA,IAC5ByU,EAAWwK,EAAWjf,OAQvB,SAASV,EAASW,GAErB,IADA,IAAIif,EAAe,GACVC,EAAK,EAAGA,EAAK9d,UAAUoN,OAAQ0Q,IACpCD,EAAaC,EAAK,GAAK9d,UAAU8d,GAErC,IAAIC,EAAcjf,EAAOqB,WAAM,EAAQgb,EAAe,CAAC,IAAK0C,EAAaG,YACzE,OAAOlf,EAAOif,EAAapF,EAAK/Z,GAAQ,GAAI2S,OAAOC,KAAKuM,KAGrD,IAAIE,EAAS,SAAUC,EAAMC,GAAQ,OAAOrf,EAAOof,EAAMC,IAQzD,SAASC,EAAUC,EAAOC,GAC7B,IAAInY,EAAO,GAEX,IAAK,IAAIoY,KAAKF,EAAMlY,KAAM,CACtB,GAAIkY,EAAMlY,KAAKoY,KAAOD,EAAOnY,KAAKoY,GAC9B,MACJpY,EAAK1H,KAAK4f,EAAMlY,KAAKoY,IAEzB,OAAOpY,EAaJ,SAASwS,EAAKV,EAAKuG,GACtB,IAAIC,EAAU,GACd,IAAK,IAAIC,KAASzG,GACoB,IAA9BuG,EAAUtS,QAAQwS,KAClBD,EAAQC,GAASzG,EAAIyG,IAG7B,OAAOD,EAcJ,SAASE,EAAK1G,EAAKuG,GACtB,OAAOjN,OAAOC,KAAKyG,GACd3Q,QAAO,QAAIgW,EAAQkB,KACnB5R,QAAO,SAAUsL,EAAKrU,GAAO,OAASqU,EAAIrU,GAAOoU,EAAIpU,GAAOqU,IAAS,IASvE,SAAS5Q,EAAOsX,EAAYpgB,GAC/B,IAAIkf,GAAM,QAAQkB,GAAata,EAASoZ,EAAM,GAAK,GAC/CmB,EAASnB,EAAM,SAAUpQ,GAAK,OAAOhJ,EAAO7F,KAAK6O,IAAQ,SAAUA,EAAGzJ,GAAO,OAAQS,EAAOT,GAAOyJ,GAKvG,OAJAvO,EAAQ6f,GAAY,SAAUT,EAAM9C,GAC5B7c,EAAS2f,EAAM9C,IACfwD,EAAOV,EAAM9C,MAEd/W,EAGJ,SAASwa,EAAKF,EAAYpgB,GAC7B,IAAI8F,EAOJ,OANAvF,EAAQ6f,GAAY,SAAUT,EAAM9C,GAC5B/W,GAEA9F,EAAS2f,EAAM9C,KACf/W,EAAS6Z,MAEV7Z,EAGJ,IAAIya,EAASpS,EAEb,SAASA,EAAIiS,EAAYpgB,EAAU6F,GAGtC,OAFAA,EAASA,KAAW,QAAQua,GAAc,GAAK,IAC/C7f,EAAQ6f,GAAY,SAAUT,EAAM9C,GAAK,OAAQhX,EAAOgX,GAAK7c,EAAS2f,EAAM9C,MACrEhX,EAYJ,IAAI2a,EAAS,SAAU/G,GAAO,OAAO1G,OAAOC,KAAKyG,GAAKtL,KAAI,SAAU9I,GAAO,OAAOoU,EAAIpU,OAclFob,EAAW,SAAUf,EAAMgB,GAAQ,OAAOhB,GAAQgB,GAclDC,EAAW,SAAUjB,EAAMgB,GAAQ,OAAOhB,GAAQgB,GAUlDrS,EAAU,SAAUqR,EAAMgB,GAAQ,OAAOhB,EAAK9d,OAAO8e,IAWrDE,EAAW,SAAUlB,EAAMgB,GAClC,OAAO,QAAQA,GAAQhB,EAAK9d,OAAO8e,EAAKtS,OAAOwS,EAAU,KAAOC,EAAMnB,EAAMgB,IAMzE,SAASG,EAAM3B,EAAKzF,GAEvB,OADAyF,EAAIjf,KAAKwZ,GACFyF,EAGJ,IAAI4B,EAAQ,SAAUpH,EAAKqH,GAAS,OAAQjC,EAAQpF,EAAKqH,GAASrH,EAAMmH,EAAMnH,EAAKqH,IAW/EC,EAAS,SAAU9B,GAAO,OAAOA,EAAI9Q,OAAOC,EAAS,KAyBrD4S,EAkBJ,SAAkBC,EAAgBC,GAErC,YADe,IAAXA,IAAqBA,EAAS,kBAC3B,SAAU1H,GACb,IAAI3T,EAASob,EAAezH,GAC5B,IAAK3T,EACD,MAAM,IAAImM,OAAM,QAAWkP,GAAUA,EAAO1H,GAAO0H,GAEvD,OAAOrb,IA2BR,SAASqY,IAEZ,IADA,IAAIhd,EAAO,GACFme,EAAK,EAAGA,EAAK9d,UAAUoN,OAAQ0Q,IACpCne,EAAKme,GAAM9d,UAAU8d,GAEzB,GAAoB,IAAhBne,EAAKyN,OACL,MAAO,GAwBX,IAvBA,IAAIwS,EAAcjgB,EAAKiN,QAAO,SAAUiT,EAAKnC,GAAO,OAAOoC,KAAKD,IAAInC,EAAItQ,OAAQyS,KAAS,kBACrFvb,EAAS,GACTyb,EAAU,SAAU1E,GAGpB,OAAQ1b,EAAKyN,QACT,KAAK,EACD9I,EAAO7F,KAAK,CAACkB,EAAK,GAAG0b,KACrB,MACJ,KAAK,EACD/W,EAAO7F,KAAK,CAACkB,EAAK,GAAG0b,GAAI1b,EAAK,GAAG0b,KACjC,MACJ,KAAK,EACD/W,EAAO7F,KAAK,CAACkB,EAAK,GAAG0b,GAAI1b,EAAK,GAAG0b,GAAI1b,EAAK,GAAG0b,KAC7C,MACJ,KAAK,EACD/W,EAAO7F,KAAK,CAACkB,EAAK,GAAG0b,GAAI1b,EAAK,GAAG0b,GAAI1b,EAAK,GAAG0b,GAAI1b,EAAK,GAAG0b,KACzD,MACJ,QACI/W,EAAO7F,KAAKkB,EAAKgN,KAAI,SAAU4Q,GAAS,OAAOA,EAAMlC,SAIxDA,EAAI,EAAGA,EAAIuE,EAAavE,IAC7B0E,EAAQ1E,GAEZ,OAAO/W,EAsBJ,SAASyS,EAAWmH,EAAM8B,GAC7B,IAAInc,EAAKrB,EAGT,IAFI,QAAQwd,KACRnc,EAAMmc,EAAY,GAAIxd,EAAQwd,EAAY,MACzC,QAASnc,GACV,MAAM,IAAI4M,MAAM,oCAEpB,OADAyN,EAAKra,GAAOrB,EACL0b,EAGJ,SAAS1S,EAAKkS,GACjB,OAAQA,EAAItQ,QAAUsQ,EAAIA,EAAItQ,OAAS,SAAO+E,EAK3C,SAAS8N,EAAKC,EAAKC,GAKtB,OAJIA,GACA5O,OAAOC,KAAK2O,GAAMphB,SAAQ,SAAU8E,GAAO,cAAcsc,EAAKtc,MAC7Dsc,IACDA,EAAO,IACJrhB,EAAOqhB,EAAMD,GA6DjB,IAAIE,EAA2B,SAAU3e,GAAW,OAAOA,EAAQ4e,OAAM,SAAUC,GAAK,OAAO,MAAS7e,GACpG8e,EAAkB,SAAUld,GAAS,OAAO+c,EAAyB,cAAmB/c,qHCxhBnG,IAGWmd,EAAW,SAAU/K,EAASgL,GACrC,OAAOA,EAAQ7T,QAAO,SAAUsL,EAAKrU,GAAO,OAASqU,EAAIrU,IAJtC6c,EAIoDjL,EAAU,IAAM5R,EAAM,KAJzD,WACpC,MAAM,IAAI4M,MAAM,yBAA2BiQ,EAAS,kEAGiDxI,EAJ5F,IAAUwI,IAI2F,KAE9G3R,EAAW,CACXhK,QAAIoN,EACJ5D,eAAW4D,mGCyCf,IAAIwO,EAAsB,WACtB,SAASA,EAAKC,GACV5iB,KAAK4iB,KAAOA,EACZ5iB,KAAK6iB,KAAOD,EAAKE,MAAM,KACvB,IAAIC,EAAe/iB,KAAK4iB,KACnBE,MAAM,KACNnU,KAAI,SAAUqU,GACf,MAAY,OAARA,EACO,qBACC,MAARA,EACO,WACJ,MAAQA,KAEd/P,KAAK,IACVjT,KAAKijB,OAAS,IAAI9Z,OAAO,IAAM4Z,EAAe,KAalD,OAVAJ,EAAKzJ,GAAK,SAAU0J,GAChB,QAAS,SAASnZ,KAAKmZ,IAG3BD,EAAKxR,WAAa,SAAUyR,GACxB,OAAOD,EAAKzJ,GAAG0J,GAAQ,IAAID,EAAKC,GAAQ,MAE5CD,EAAK9gB,UAAUqhB,QAAU,SAAU1d,GAC/B,OAAOxF,KAAKijB,OAAOE,KAAK,IAAM3d,IAE3Bmd,EA3Bc,+MC1CzB,IAAIxF,EAAkD,WAClD,IAAK,IAAIC,EAAI,EAAGC,EAAI,EAAGC,EAAKtb,UAAUoN,OAAQiO,EAAIC,EAAID,IAAKD,GAAKpb,UAAUqb,GAAGjO,OACxE,IAAImO,EAAI3b,MAAMwb,GAAII,EAAI,EAA3B,IAA8BH,EAAI,EAAGA,EAAIC,EAAID,IACzC,IAAK,IAAII,EAAIzb,UAAUqb,GAAIK,EAAI,EAAGC,EAAKF,EAAErO,OAAQsO,EAAIC,EAAID,IAAKF,IAC1DD,EAAEC,GAAKC,EAAEC,GACjB,OAAOH,GA2CJ,SAAS6F,EAAMziB,GAClB,OAAO,SAAS0iB,IACZ,GAAIrhB,UAAUoN,QAAUzO,EAAGyO,OACvB,OAAOzO,EAAGwB,MAAMnC,KAAMgC,WAE1B,IAAIL,EAAOC,MAAMC,UAAUC,MAAMC,KAAKC,WACtC,OAAOqhB,EAAQ/f,KAAKnB,MAAMkhB,EAASlG,EAAe,CAACnd,MAAO2B,KAS3D,SAAS2hB,IACZ,IAAI3hB,EAAOK,UACPuhB,EAAQ5hB,EAAKyN,OAAS,EAC1B,OAAO,WAEH,IADA,IAAIiO,EAAIkG,EAAOjd,EAAS3E,EAAK4hB,GAAOphB,MAAMnC,KAAMgC,WACzCqb,KACH/W,EAAS3E,EAAK0b,GAAGtb,KAAK/B,KAAMsG,GAChC,OAAOA,GASR,SAASkd,IAEZ,IADA,IAAIC,EAAQ,GACH3D,EAAK,EAAGA,EAAK9d,UAAUoN,OAAQ0Q,IACpC2D,EAAM3D,GAAM9d,UAAU8d,GAE1B,OAAOwD,EAAQnhB,MAAM,KAAM,GAAGL,MAAMC,KAAKC,WAAWge,WAQjD,IAAI0D,EAAO,SAAUle,GAAQ,OAAO,SAAUyU,GAAO,OAAOA,GAAOA,EAAIzU,KAQnEme,EAASP,GAAM,SAAU5d,EAAMoe,EAAM3J,GAAO,OAAOA,GAAOA,EAAIzU,KAAUoe,KASxE3c,EAAQ,SAAUzB,GAAQ,OAAOge,EAAKrhB,MAAM,KAAMqD,EAAKsd,MAAM,KAAKnU,IAAI+U,KAKtEG,EAAM,SAAUljB,GAAM,OAAO,WAEpC,IADA,IAAIgB,EAAO,GACFme,EAAK,EAAGA,EAAK9d,UAAUoN,OAAQ0Q,IACpCne,EAAKme,GAAM9d,UAAU8d,GAEzB,OAAQnf,EAAGwB,MAAM,KAAMR,KAMpB,SAASmiB,EAAIC,EAAKC,GACrB,OAAO,WAEH,IADA,IAAIriB,EAAO,GACFme,EAAK,EAAGA,EAAK9d,UAAUoN,OAAQ0Q,IACpCne,EAAKme,GAAM9d,UAAU8d,GAEzB,OAAOiE,EAAI5hB,MAAM,KAAMR,IAASqiB,EAAI7hB,MAAM,KAAMR,IAOjD,SAASsiB,EAAGF,EAAKC,GACpB,OAAO,WAEH,IADA,IAAIriB,EAAO,GACFme,EAAK,EAAGA,EAAK9d,UAAUoN,OAAQ0Q,IACpCne,EAAKme,GAAM9d,UAAU8d,GAEzB,OAAOiE,EAAI5hB,MAAM,KAAMR,IAASqiB,EAAI7hB,MAAM,KAAMR,IASjD,IAAI8Z,EAAM,SAAUsI,GAAO,OAAO,SAAUrE,GAAO,OAAOA,EAAI9Q,QAAO,SAAUgQ,EAAGtP,GAAK,OAAOsP,KAAOmF,EAAIzU,MAAO,KAE5G4U,EAAM,SAAUH,GAAO,OAAO,SAAUrE,GAAO,OAAOA,EAAI9Q,QAAO,SAAUgQ,EAAGtP,GAAK,OAAOsP,KAAOmF,EAAIzU,MAAO,KAE5G4J,EAAK,SAAUiL,GAAQ,OAAO,SAAUlK,GAC/C,OAAe,MAAPA,GAAeA,EAAImK,cAAgBD,GAASlK,aAAekK,IAK5DngB,EAAM,SAAUqgB,GAAK,OAAO,WAAc,OAAOA,IA4CrD,SAASC,EAAQC,GACpB,OAAO,SAAUjV,GACb,IAAK,IAAI+N,EAAI,EAAGA,EAAIkH,EAAOnV,OAAQiO,IAC/B,GAAIkH,EAAOlH,GAAG,GAAG/N,GACb,OAAOiV,EAAOlH,GAAG,GAAG/N,uRCjNhCkV,EAAQjR,OAAO1R,UAAUiT,SACzB2P,EAAM,SAAU5F,GAAK,OAAO,SAAUvP,GAAK,cAAcA,IAAMuP,IACxD6F,EAAcD,EAAI,aAClB7X,GAAY,QAAI8X,GAChBC,EAAS,SAAUC,GAAK,OAAa,OAANA,GAC/BC,GAAoB,IAAAZ,IAAGU,EAAQD,GAC/BtX,EAAaqX,EAAI,YACjBK,EAAWL,EAAI,UACf3b,EAAW2b,EAAI,UACftR,EAAW,SAAU7D,GAAK,OAAa,OAANA,GAA2B,iBAANA,GACtD0C,EAAUpQ,MAAMoQ,QAChB+S,EAAS,SAAWzV,GAAK,MAAyB,kBAAlBkV,EAAMziB,KAAKuN,IAC3C0V,EAAW,SAAW1V,GAAK,MAAyB,oBAAlBkV,EAAMziB,KAAKuN,IAOjD,SAASsM,EAAa5X,GACzB,GAAIgO,EAAQhO,IAAQA,EAAIoL,OAAQ,CAC5B,IAAI6V,EAAOjhB,EAAIlC,MAAM,GAAI,GAAI0L,EAAOxJ,EAAIlC,OAAO,GAC/C,QAASmjB,EAAK3b,QAAO,QAAIR,IAAWsG,QAAU5B,EAAKlE,QAAO,QAAI8D,IAAagC,QAE/E,OAAOhC,EAAWpJ,GAOf,IAAIkhB,GAAY,QAAI/R,GAAU,SAAK,QAAK,QAAS/F,uKCvCpD+X,EAAuB,WACvB,SAASA,EAAMC,EAAQC,QACJ,IAAXD,IAAqBA,EAAS,SACnB,IAAXC,IAAqBA,EAAS,MAClCrlB,KAAKolB,OAASA,EACdplB,KAAKqlB,OAASA,EACdrlB,KAAKslB,gBAAkB,GACvBtlB,KAAKulB,SAAU,QAAOvlB,KAAKslB,iBAqC/B,OAnCAH,EAAMtjB,UAAU2jB,QAAU,SAAUrF,GAChC,IAAIsF,EAAQzlB,KAAKolB,OAIjB,OAHAK,EAAMhlB,KAAK0f,GACPngB,KAAKqlB,QAAUI,EAAMrW,OAASpP,KAAKqlB,QACnCrlB,KAAK0lB,QACFvF,GAEXgF,EAAMtjB,UAAU6jB,MAAQ,WACpB,IAAIvF,EAAOngB,KAAKolB,OAAOnjB,QAEvB,OADAjC,KAAKslB,gBAAgBvkB,SAAQ,SAAUJ,GAAM,OAAOA,EAAGwf,MAChDA,GAEXgF,EAAMtjB,UAAU8jB,QAAU,WACtB,GAAI3lB,KAAK4lB,OACL,OAAO5lB,KAAKolB,OAAO5F,OAAO,EAAG,GAAG,IAExC2F,EAAMtjB,UAAUgkB,MAAQ,WACpB,IAAIC,EAAU9lB,KAAKolB,OAEnB,OADAplB,KAAKolB,OAAS,GACPU,GAEXX,EAAMtjB,UAAU+jB,KAAO,WACnB,OAAO5lB,KAAKolB,OAAOhW,QAEvB+V,EAAMtjB,UAAUgL,OAAS,SAAUsT,GAC/B,IAAIlR,EAAMjP,KAAKolB,OAAOlX,QAAQiS,GAC9B,OAAOlR,GAAO,GAAKjP,KAAKolB,OAAO5F,OAAOvQ,EAAK,GAAG,IAElDkW,EAAMtjB,UAAUkkB,SAAW,WACvB,OAAO/lB,KAAKolB,OAAOplB,KAAKolB,OAAOhW,OAAS,IAE5C+V,EAAMtjB,UAAUmkB,SAAW,WACvB,GAAIhmB,KAAK4lB,OACL,OAAO5lB,KAAKolB,OAAO,IAEpBD,EA5Ce,4KCKtBc,EAAkB,CAAEC,IAAK,KAAM7gB,MAAO,KAAM8gB,MAAO,MA4B5CC,EAXyB,oBAAbC,UAA4BA,SAASC,cAA0C,IAA1BD,SAASC,aAEtEC,QAAUA,OAAOC,QAlBhC,SAAoBA,GAChB,IAAIC,EAAQ,SAAU9lB,GAAM,OAAO+lB,SAAS7kB,UAAUyB,KAAKvB,KAAKpB,EAAI6lB,IACpE,MAAO,CACHN,IAAKO,EAAMD,EAAQN,KACnB7gB,MAAOohB,EAAMD,EAAQN,KACrBC,MAAOM,EAAMD,EAAQN,MAaaS,CAAWJ,OAAOC,SAAWP,EAEzDO,QAAQL,OAAUK,QAAQnhB,MAIzBmhB,QAhBf,SAAyBA,GACrB,IAAIN,EAAMM,EAAQN,IAAI5iB,KAAKkjB,GAG3B,MAAO,CAAEN,IAAKA,EAAK7gB,MAFPmhB,EAAQnhB,MAAQmhB,EAAQnhB,MAAM/B,KAAKkjB,GAAWN,EAEzBC,MADrBK,EAAQL,MAAQK,EAAQL,MAAM7iB,KAAKkjB,GAAWN,GAU/CU,CAAgBJ,ieCRxB,SAASK,EAAUC,EAAK9V,GAC3B,OAAIA,EAAI5B,QAAU0X,EACP9V,EACJA,EAAI+V,OAAO,EAAGD,EAAM,GAAK,MAW7B,SAASE,EAAU5X,EAAQ4B,GAC9B,KAAOA,EAAI5B,OAASA,GAChB4B,GAAO,IACX,OAAOA,EAEJ,SAAS/H,EAAYqJ,GACxB,OAAOA,EACFyC,QAAQ,YAAY,SAAUkS,GAAM,OAAOA,EAAGC,iBAC9CnS,QAAQ,YAAY,SAAUkS,GAAM,MAAO,IAAMA,EAAGC,iBAEtD,SAASC,EAAiBxmB,GAC7B,IAAIymB,EAAQC,EAAW1mB,GACnB2mB,EAAqBF,EAAMpL,MAAM,8BACjCwI,EAAQ8C,EAAqBA,EAAmB,GAAKF,EACrDjI,EAASxe,EAAS,MAAK,GAC3B,OAAIwe,GAAUqF,EAAMxI,MAAM,eACf,YAAcmD,EAASqF,EAAMuC,OAAO,GAExCvC,EAEJ,SAAS6C,EAAW1mB,GACvB,IAAI4mB,GAAM,QAAQ5mB,GAAMA,EAAGmB,OAAO,GAAG,GAAKnB,EAC1C,OAAQ4mB,GAAOA,EAAIzS,YAAe,YAEtC,IAAI0S,EAAc,uBAIdC,GAAmB,QAAQ,CAC3B,CAAC,MAAa,QAAI,cAClB,CAAC,MAAQ,QAAI,SACb,CAAC,MAAW,QAAI,cAChB,CAACD,EAAa,SAAUlY,GAAK,OAAOA,EAAEoY,qBAAqB5S,aAC3D,CARc,SAAUmF,GACxB,OAAO,QAASA,MAAS,QAAQA,IAAQA,EAAImK,cAAgB7Q,SAAU,QAAW0G,EAAInF,WAOxE,SAAUxF,GAAK,OAAOA,EAAEwF,aACtC,CAAC,KAAcqS,GACf,EAAC,SAAI,GAAO,QAET,SAASjJ,EAAU0G,GACtB,IAAI+C,EAAO,GACX,SAASC,EAAOpjB,GACZ,IAAI,QAASA,GAAQ,CACjB,IAA6B,IAAzBmjB,EAAKzZ,QAAQ1J,GACb,MAAO,iBACXmjB,EAAKlnB,KAAK+D,GAEd,OAAOijB,EAAiBjjB,GAE5B,OAAI,QAAYogB,GAILgD,EAAOhD,GAEX5G,KAAKE,UAAU0G,GAAG,SAAU/e,EAAKrB,GAAS,OAAOojB,EAAOpjB,MAAWuQ,QAAQ,OAAQ,KAGvF,IAAI8S,EAAoB,SAAUC,GAAQ,OAAO,SAAU9W,GAC9D,IAAKA,EACD,MAAO,CAAC,GAAI,IAChB,IAAI/B,EAAM+B,EAAI9C,QAAQ4Z,GACtB,OAAa,IAAT7Y,EACO,CAAC+B,EAAK,IACV,CAACA,EAAI+V,OAAO,EAAG9X,GAAM+B,EAAI+V,OAAO9X,EAAM,MAGtC8Y,EAAuB,SAAU/W,GAAO,OAAOA,EAAI+D,QAAQ,WAAY,KACvEiT,EAAYH,EAAkB,KAC9BI,EAAaJ,EAAkB,KAC/BK,EAAaL,EAAkB,KAC/BM,EAAc,SAAUnX,GAAO,OAAQA,EAAMA,EAAI+D,QAAQ,KAAM,IAAM,IAWzE,SAASqT,EAAaC,GACzB,IAAIC,EAAK,IAAInf,OAAO,IAAMkf,EAAQ,IAAK,KACvC,OAAO,SAAUrX,GAAO,OAAOA,EAAI8R,MAAMwF,GAAIhf,OAAO,OAcjD,SAASif,EAAerO,EAAK5K,GAChC,OAAI,SAAS,QAAK4K,MAAS,QAAS5K,GACzB4K,EAAIpY,MAAM,GAAI,GAAGM,QAAO,QAAK8X,GAAO5K,IACxC,QAAM4K,EAAK5K,0GCpElBkZ,iQA3BJ,SAASC,EAAaC,GAClB,IAAKA,EACD,MAAO,oBACX,IAAIjb,EAAQib,EAAOC,gBAAkBD,EAAOC,gBAAgBnjB,MAAQ,SAAW,SAC/E,MAAO,YAAckjB,EAAOrd,GAAK,IAAMqd,EAAOtd,MAAQ,IAAMsd,EAAOpd,IAAM,KAAOod,EAAOljB,KAAO,IAAMiI,EAAQ,KAOhH,SAASmb,EAAchW,GACnB,OAAO,QAASA,GAAS4V,EAAS5V,GAAS4V,EAASA,EAAS5V,KAgBjE,SAAW4V,GACPA,EAASA,EAAkB,QAAI,GAAK,UACpCA,EAASA,EAAqB,WAAI,GAAK,aACvCA,EAASA,EAAe,KAAI,GAAK,OACjCA,EAASA,EAAiB,OAAI,GAAK,SACnCA,EAASA,EAAqB,WAAI,GAAK,aAL3C,CAMGA,IAAaA,EAAW,KAE3B,IAAIK,GAAO,QAAM,OACbC,GAAO,QAAM,cACbC,EAAW,SAAUnZ,GAAS,MAAO,eAAiBiZ,EAAKjZ,GAAS,IAAMkZ,EAAKlZ,IA6J/EvH,EAAQ,IAzJe,WAEvB,SAAS2gB,IAELhpB,KAAKipB,SAAW,GAChBjpB,KAAKkpB,mBAAqB,EAwI9B,OArIAF,EAAMnnB,UAAUsnB,KAAO,SAAU7T,EAAS8T,GACtC,IAAIjZ,EAAQnQ,KACPopB,EAAWha,SACZga,EAAa7V,OAAOC,KAAKgV,GACpB7Z,KAAI,SAAU6O,GAAK,OAAO6L,SAAS7L,EAAG,OACtClU,QAAO,SAAUkU,GAAK,OAAQ8L,MAAM9L,MACpC7O,KAAI,SAAU9I,GAAO,OAAO2iB,EAAS3iB,OAE9CujB,EAAWza,IAAIia,GAAe7nB,SAAQ,SAAUwoB,GAAY,OAAQpZ,EAAM8Y,SAASM,GAAYjU,MAEnG0T,EAAMnnB,UAAU2nB,OAAS,WAErB,IADA,IAAIJ,EAAa,GACRtJ,EAAK,EAAGA,EAAK9d,UAAUoN,OAAQ0Q,IACpCsJ,EAAWtJ,GAAM9d,UAAU8d,GAE/B9f,KAAKmpB,MAAK,EAAMC,IAEpBJ,EAAMnnB,UAAU4nB,QAAU,WAEtB,IADA,IAAIL,EAAa,GACRtJ,EAAK,EAAGA,EAAK9d,UAAUoN,OAAQ0Q,IACpCsJ,EAAWtJ,GAAM9d,UAAU8d,GAE/B9f,KAAKmpB,MAAK,EAAOC,IAWrBJ,EAAMnnB,UAAUyT,QAAU,SAAUiU,GAChC,QAASvpB,KAAKipB,SAASL,EAAcW,KAGzCP,EAAMnnB,UAAU6nB,qBAAuB,SAAU9Z,GACxC5P,KAAKsV,QAAQkT,EAASmB,aAE3B,QAAgBZ,EAASnZ,GAAS,kBAAmB,QAAUA,KAGnEoZ,EAAMnnB,UAAU+nB,uBAAyB,SAAUha,GAC1C5P,KAAKsV,QAAQkT,EAASmB,aAE3B,QAAgBZ,EAASnZ,GAAS,kBAAmB,QAAUA,KAGnEoZ,EAAMnnB,UAAUgoB,oBAAsB,SAAUC,EAAMla,EAAOzP,GACzD,GAAKH,KAAKsV,QAAQkT,EAASuB,MAA3B,CAEA,IAAIxpB,GAAQ,QAAM,qBAAN,CAA4BJ,IAAY,WAAY0Q,GAAU,QAAM,+BAAN,CAAsC1Q,KAAY,QAAM,oBAAN,CAA2BA,IAAY,UAAWqF,GAAO,QAAiBskB,EAAKE,eAAexpB,UAC1N,QAAgBuoB,EAASnZ,GAAS,eAAiBrP,EAAQ,aAAesQ,EAAU,MAAO,QAAU,IAAKrL,MAG9GwjB,EAAMnnB,UAAUooB,gBAAkB,SAAUC,EAAYta,EAAOua,GACtDnqB,KAAKsV,QAAQkT,EAASuB,OAE3B,QAAgBhB,EAASnZ,GAAS,0BAA2B,QAAU,KAAK,QAAUsa,MAG1FlB,EAAMnnB,UAAUuoB,iBAAmB,SAAUjiB,EAAM8H,EAAML,GAChD5P,KAAKsV,QAAQkT,EAAS6B,UAE3B,QAAgBtB,EAASnZ,GAAS,uBAAyBzH,EAAO,KAAO8H,EAAO,MAGpF+Y,EAAMnnB,UAAUyoB,wBAA0B,SAAUtS,EAAYpI,GACvD5P,KAAKsV,QAAQkT,EAAS6B,UAE3B,QAAgBtB,EAASnZ,GAAS,gCAAkCoI,EAAa,SAAU,QAAU,KAAK,QAAUA,EAAWrQ,SAGnIqhB,EAAMnnB,UAAU0oB,WAAa,SAAUC,EAAQ5a,GACtC5P,KAAKsV,QAAQkT,EAASmB,aAE3B,QAAgBZ,EAASnZ,GAAS,kBAAmB,QAAUA,GAAS,aAAe4a,IAG3FxB,EAAMnnB,UAAU4oB,aAAe,SAAUC,EAAY9a,GAC5C5P,KAAKsV,QAAQkT,EAASmB,aAE3B,QAAgBZ,EAASnZ,GAAS,kBAAmB,QAAUA,GAAS,kBAAoB8a,EAAWllB,OAG3GwjB,EAAMnnB,UAAU8oB,iBAAmB,SAAUpqB,EAAOqqB,EAAUvL,QAC5C,IAAVA,IAAoBA,EAAQ,IAC3Brf,KAAKsV,QAAQkT,EAASqC,SAE3B,QAAgB,aAAc,QAAU,GAAItqB,GAAS,IAAMkoB,EAAamC,GAAYvL,IAGxF2J,EAAMnnB,UAAUipB,yBAA2B,SAAUF,EAAU/Z,GACtD7Q,KAAKsV,QAAQkT,EAASqC,SAE3B7qB,KAAK2qB,iBAAiB,WAAYC,EAAU,kCAAoC/Z,EAAU,MAG9FmY,EAAMnnB,UAAUkpB,gBAAkB,SAAUH,EAAUpjB,GAC7CxH,KAAKsV,QAAQkT,EAASqC,SAE3B7qB,KAAK2qB,iBAAiB,OAAQC,EAAU,WAAY,QAAU,IAAKpjB,KAGvEwhB,EAAMnnB,UAAUmpB,cAAgB,SAAUC,GACtC,GAAKjrB,KAAKsV,QAAQkT,EAAS0C,YAA3B,CAEA,IAAIC,EAAY,uBAEZC,EAAUH,EACTtc,KAAI,SAAU0c,GACf,IAAIC,EACA7kB,EAAS4kB,EAAG5kB,OAAQiE,EAAa2gB,EAAG3gB,WACpC6gB,EAAM9kB,GAAUA,EAAO6E,IACvBzD,EAAM6C,GAAcA,EAAW3C,SAASgC,SAASvE,KAAO,MAAQkF,EAAW3C,SAAS6S,MAAQ,IAChG,OAAO0Q,EAAK,IAAOH,GAAaI,EAAKD,EAPzB,iCAOyCzjB,EAAKyjB,KAEzDE,MAAK,SAAU/N,EAAGmB,GAAK,OAAQnB,EAAE0N,IAAc,IAAIM,cAAc7M,EAAEuM,IAAc,OACtF,UAAkBC,KAGtBpC,EAAMnnB,UAAU6pB,sBAAwB,SAAUnrB,EAAOmK,GAChD1K,KAAKsV,QAAQkT,EAAS0C,aAE3B,QAAgB,eAAiB3qB,EAAQ,IAzK1B,SAAUmK,GAC7B,IAAIoP,EAAOpP,EAAW3C,SAClB0F,EAAQqM,EAAK/P,SAASvE,MAAQ,SAClC,MAAO,SAAWkF,EAAWyQ,IAAM,UAAY1N,EAAQ,8BAAgCqM,EAAKiB,YAAc,IAAMjB,EAAKmB,qBAAuB,IAsKzF0Q,CAAiBjhB,KAGpEse,EAAMnnB,UAAU+pB,4BAA8B,SAAUrrB,EAAOqqB,GACtD5qB,KAAKsV,QAAQkT,EAAS0C,aAE3B,QAAgB,eAAiB3qB,EAAQ,IAAMkoB,EAAamC,KAEzD5B,EA7Ie,oOCxEtB6C,EAAiC,WACjC,SAASA,IAML7rB,KAAKoO,OAAS,IAAI,IAElBpO,KAAK8rB,yBAA2B,EAEhC9rB,KAAK+rB,kBAAoB,IAAI,IAAM,GAAI,GAEvC/rB,KAAKgsB,sBAAwB,IAAI,IAAM,GAAI,GAO/C,OALAH,EAAgBhqB,UAAUqT,QAAU,WAChClV,KAAK+rB,kBAAkBlG,QACvB7lB,KAAKgsB,sBAAsBnG,QAC3B7lB,KAAKisB,WAAa,MAEfJ,EApByB,sLCiBhCK,EAAe,SAAUD,GACzB,IAAIvX,EAASuX,EAAWvX,OAuBpB6G,EAAW0Q,EACVE,WACA7iB,QAAO,SAAUmE,GAAS,QAASA,EAAMuG,UAAUoY,YACnDzd,KAAI,SAAUlB,GAAS,OAAO4e,EAAcJ,EAAYxe,MAC7D,OAAO,WAAgB8N,GAAUxQ,MA1BjC,WACI,GAAyD,QAArDkhB,EAAWK,qBAAqBnsB,UAAU4e,OAAkB,CAG5D,IAAIwN,EAAON,EAAWO,cACtB,OAAO9X,EAAOmC,aAAaxQ,OAAOkmB,EAAKE,aAAcF,EAAKne,SAAUme,EAAKpsB,WAI7E,IAAIusB,EAAOhY,EAAOuC,WACd3Q,EAASomB,EAAK1Q,MAAM0Q,EAAKC,SACzBpQ,EAAOjW,GAAUA,EAAOiW,KAG5B,GAAIA,GAAsB,UAAdA,EAAKrN,KAAkB,CAC/B,IAAIzB,EAAQ8O,EAAK9O,MACbW,EAAS9H,EAAO0V,MACpB,OAAOtH,EAAOmC,aAAaxQ,OAAOoH,EAAOW,EAAQ6d,EAAW9rB,WAGhEuU,EAAOuC,WAAW2V,WAQfC,EAAuB,SAAUC,GACxC,OAAOA,EAAkB/c,SAAS,CAAEoc,SAAU,SAAU1e,GAAS,QAASA,EAAM2e,WAAeF,IAS5F,SAASG,EAAcJ,EAAYxe,GACtC,IAAIsf,EAAatf,EAAMuG,UAAUoY,SAE7B3oB,EAAUspB,EAAqB,SAwBnC,OAvBKtpB,IAWDA,EAAUspB,EAAqB,SAAI,YACzBA,EAAWd,EAAYxe,IAC5B1C,MAIT,SAA6BzE,GAIzB,OAHIA,GAAU1E,MAAMoQ,QAAQ1L,EAAO0mB,SAC/B1mB,EAAO0mB,OAAOjsB,SAAQ,SAAUksB,GAAU,OAAOhB,EAAWvX,OAAOkC,cAAc8C,SAASuT,MAEvF3mB,KAPFyE,MAbS,SAAUzE,GAIpB,cAHOmH,EAAM2e,gBACN3e,EAAMuG,UAAUoY,gBAChBW,EAAqB,SACrBzmB,KAEC,SAAU4mB,GAElB,cADOH,EAAqB,SACrB,cAAmBG,OAc3BzpB,oPCnFP0pB,kUAJAC,EAAS7Z,OAAO1R,UAAUa,gBAK9B,SAAWyqB,GACPA,EAAQA,EAAc,KAAI,GAAK,OAC/BA,EAAQA,EAAgB,OAAI,GAAK,SACjCA,EAAQA,EAAgB,OAAI,GAAK,SAHrC,CAIGA,IAAYA,EAAU,KA2DzB,IAAIE,EAAuB,WACvB,SAASA,EAAMhiB,EAAI6D,EAAM2G,EAAUyX,EAAW7f,GAC1C,IAAIlC,EA3DZ,SAA6BgiB,EAAW1X,EAAUpI,GAC9C,IAAI+f,GAA6C,IAAzB/f,EAAMggB,gBAA4B5X,IAAasX,EAAQO,aAAWvZ,EACtFwZ,GAAU,QAAK,CAAClgB,EAAMkgB,QAASH,GAAmB,MAClDI,GAAgB,QAAUD,GAAW,CAAEA,QAASA,GAAY,GAC5DE,EAGR,SAAyBhmB,GAGrB,SAASimB,IACL,OAAOjmB,EAAIrD,MAHfqD,EAlBc,SAAUA,GACxB,OAAiG,IAA1F,CAAC,QAAS,OAAQ,SAAU,QAAS,WAAWyB,OAAO8jB,EAAO9pB,KAAKuE,GAAO,KAAKuH,OAiBhF2e,CAAYlmB,GAAO,CAAErD,MAAOqD,GAAQA,EAC1CimB,EAAmC,aAAI,EAIvC,IAAIE,GAAO,QAAanmB,EAAIrD,OAASqD,EAAIrD,MAAQspB,EACjD,OAAO,QAAOjmB,EAAK,CAAEmmB,KAAMA,IAVTC,CAAgBxgB,GAASA,EAAMW,QAAUX,EAAMW,OAAOmf,IACxE,OAAO,QAAOK,EAAeC,GAsDZK,CAAoB7iB,EAAIwK,EAAUpI,GAC/CyB,EA5CR,SAAiBrH,EAAKsmB,EAAStY,EAAUxK,EAAI+iB,GACzC,GAAIvmB,EAAIqH,MAAQif,GAA4B,WAAjBA,EAAQ3oB,KAC/B,MAAM,IAAIiN,MAAM,UAAYpH,EAAK,kCACrC,GAAIxD,EAAIqH,MAAQif,GAA4B,WAAjBA,EAAQ3oB,MAAqB4oB,EAAWlf,KAAKrH,EAAIqH,MACxE,OAAOkf,EAAWlf,KAAKrH,EAAIqH,MAC/B,GAAIif,EACA,OAAOA,EACX,IAAKtmB,EAAIqH,KAAM,CACX,IAAIA,EAAO2G,IAAasX,EAAQkB,OAC1B,MACAxY,IAAasX,EAAQmB,KACjB,OACAzY,IAAasX,EAAQO,OACjB,QACA,SACd,OAAOU,EAAWlf,KAAKA,GAE3B,OAAOrH,EAAIqH,gBAAgB,IAAYrH,EAAIqH,KAAOkf,EAAWlf,KAAKrH,EAAIqH,MA2B3Dqf,CAAQhjB,EAAQ2D,EAAM2G,EAAUxK,EAAIiiB,EAAUc,YACrD,IAUQI,EACAC,EAXJC,GAUIF,EAAgB,CAAEjP,MAAO1J,IAAasX,EAAQO,QAAS,QACvDe,EAAyBpjB,EAAG2Q,MAAM,SAAW,CAAEuD,OAAO,GAAS,IAC5D,QAAOiP,EAAeC,EAAwBljB,GAAQgU,OAXjErQ,EAAOwf,EAAYxf,EAAKyf,SAASD,EAAW7Y,IAAasX,EAAQO,QAAUxe,EAC3E,IAAI0f,OAA8Bza,IAAjB5I,EAAO/G,OAAuBqR,IAAasX,EAAQO,OAChEC,GAAU,QAAUpiB,EAAOoiB,WAAapiB,EAAOoiB,UAAYze,EAAKye,QAChEkB,GAAM,QAAUtjB,EAAOsjB,OAAStjB,EAAOsjB,MAAQ3f,EAAK2f,IACpDC,EA9BZ,SAAyBvjB,EAAQqjB,EAAYG,GACzC,IAAID,EAASvjB,EAAOujB,OACpB,IAAKF,IAAyB,IAAXE,EACf,OAAO,EACX,KAAK,QAAUA,IAAqB,MAAVA,EACtB,OAAOC,EACX,IAAe,IAAXD,IAAmB,QAASA,GAC5B,OAAOA,EACX,MAAM,IAAIrc,MAAM,2BAA6Bqc,EAAS,uDAsBrCE,CAAgBzjB,EAAQqjB,EAAYtB,EAAU2B,uBACvDla,EArBZ,SAAoBxJ,EAAQmjB,EAAWE,EAAYE,GAC/C,IAAIC,EAAgB,CAChB,CAAEG,KAAM,GAAIC,GAAIP,GAAcF,OAAYva,EAAY,IACtD,CAAE+a,KAAM,KAAMC,GAAIP,GAAcF,OAAYva,EAAY,KAExDY,GAAU,QAAQxJ,EAAOwJ,SAAWxJ,EAAOwJ,QAAU,IACrD,QAAS+Z,IACT/Z,EAAQtU,KAAK,CAAEyuB,KAAMJ,EAAQK,QAAIhb,IACrC,IAAIib,GAAiB,QAAIra,GAAS,QAAK,SACvC,OAAO,QAAOga,GAAe,SAAU5O,GAAQ,OAA8C,IAAvCiP,EAAelhB,QAAQiS,EAAK+O,SAAiB9sB,OAAO2S,GAYxFsa,CAAW9jB,EAAQmjB,EAAWE,EAAYE,GACpD1P,GAAU,QAAU7T,EAAO6T,WAAa7T,EAAO6T,UAAYlQ,EAAKkQ,SAOpE,QAAOpf,KAAM,CAAEqL,GAAIA,EAAI6D,KAAMA,EAAM2G,SAAUA,EAAU+Y,WAAYA,EAAYjB,QAASA,EAASkB,IAAKA,EAAKC,OAAQA,EAAQ/Z,QAASA,EAASqK,QAASA,EAASG,MAAOmP,EAAWnjB,OAAQA,IAoG7L,OAlGA8hB,EAAMrM,OAAS,SAAU5S,EAAQ4S,QACd,IAAXA,IAAqBA,EAAS,IAElC,IADA,IAAI1F,EAAc,GACTwE,EAAK,EAAGwP,EAAWlhB,EAAQ0R,EAAKwP,EAASlgB,OAAQ0Q,IAAM,CAC5D,IAAI9Q,EAAQsgB,EAASxP,GACrBxE,EAAYtM,EAAM3D,IAAM2D,EAAMxK,MAAMwc,EAAOhS,EAAM3D,KAErD,OAAOiQ,GAaX+R,EAAMkC,QAAU,SAAUnhB,EAAQohB,EAASC,GAGvC,YAFgB,IAAZD,IAAsBA,EAAU,SACpB,IAAZC,IAAsBA,EAAU,IAC7BrhB,EAAO9E,QAAO,SAAU0F,GAAS,OAAQA,EAAME,KAAKC,OAAOqgB,EAAQxgB,EAAM3D,IAAKokB,EAAQzgB,EAAM3D,SAWvGgiB,EAAMle,OAAS,SAAUf,EAAQohB,EAASC,GAGtC,YAFgB,IAAZD,IAAsBA,EAAU,SACpB,IAAZC,IAAsBA,EAAU,IACsB,IAAnDpC,EAAMkC,QAAQnhB,EAAQohB,EAASC,GAASrgB,QAGnDie,EAAMqC,UAAY,SAAUthB,EAAQ4S,GAEhC,YADe,IAAXA,IAAqBA,EAAS,IAC3B5S,EAAOO,KAAI,SAAUK,GAAS,OAAOA,EAAM0gB,UAAU1O,EAAOhS,EAAM3D,QAASuD,OAAO,MAAU,IAEvGye,EAAMxrB,UAAU8tB,eAAiB,SAAUnrB,GACvC,OAAOxE,KAAK4uB,YAAc5uB,KAAKkP,KAAKC,OAAOnP,KAAKwE,QAASA,IAM7D6oB,EAAMxrB,UAAU2C,MAAQ,SAAUA,GAC9B,IAAI2L,EAAQnQ,KA0BZ,OADAwE,EAR2B,SAAUR,GACjC,IAAK,IAAI8b,EAAK,EAAGuL,EAAKlb,EAAM4E,QAAS+K,EAAKuL,EAAGjc,OAAQ0Q,IAAM,CACvD,IAAIrM,EAAQ4X,EAAGvL,GACf,GAAIrM,EAAMyb,OAASlrB,EACf,OAAOyP,EAAM0b,GAErB,OAAOnrB,EAEH4rB,CAAqBprB,IACtB,QAAYA,GAtBG,WAClB,GAAI2L,EAAM0f,mBACN,OAAO1f,EAAM0f,mBAAmBC,aACpC,IAAK,cACD,MAAM,IAAIrd,MAAM,+DACpB,IAAIqd,EAAe,qBAA0B3f,EAAM5E,OAAOyiB,MAC1D,GAAI8B,MAAAA,IAAwD3f,EAAMjB,KAAKgK,GAAG4W,GACtE,MAAM,IAAIrd,MAAM,kBAAoBqd,EAAe,oBAAsB3f,EAAM9E,GAAK,sCAAwC8E,EAAMjB,KAAK1J,KAAO,KAIlJ,OAHI2K,EAAM5E,OAAOyiB,KAAkB,cAC/B7d,EAAM0f,mBAAqB,CAAEC,aAAcA,IAExCA,EAWiBC,GAAoB/vB,KAAKkP,KAAK8gB,WAAWxrB,IAEzE6oB,EAAMxrB,UAAUouB,SAAW,WACvB,OAAOjwB,KAAK6V,WAAasX,EAAQO,QAErCL,EAAMxrB,UAAU6tB,UAAY,SAAUlrB,GAElC,KAAK,QAAYA,IAAoB,OAAVA,IAAmBxE,KAAK4uB,WAC/C,OAAO,EAEX,IAAI/T,EAAa7a,KAAKkP,KAAK8gB,WAAWxrB,GACtC,IAAKxE,KAAKkP,KAAKgK,GAAG2B,GACd,OAAO,EAEX,IAAIqV,EAAUlwB,KAAKkP,KAAK2F,OAAOgG,GAC/B,SAAS,QAASqV,KAAalwB,KAAKkP,KAAKoV,QAAQ7a,KAAKymB,KAE1D7C,EAAMxrB,UAAUiT,SAAW,WACvB,MAAO,UAAY9U,KAAKqL,GAAK,IAAMrL,KAAKkP,KAAO,aAAelP,KAAK8uB,OAAS,eAAiB9uB,KAAK4uB,WAAa,KAE5GvB,EAtHe,4OChDtB8C,EAA2B,WAM3B,SAASA,EAAUjd,GAEflT,KAAKskB,QAAU,KAEftkB,KAAKof,SAAU,GACf,QAAOpf,KAAMkT,GAgDjB,OA5CAid,EAAUtuB,UAAUqX,GAAK,SAAUlV,EAAK6B,GACpC,OAAO,GAGXsqB,EAAUtuB,UAAUgT,OAAS,SAAU7Q,EAAK6B,GACxC,OAAO7B,GAGXmsB,EAAUtuB,UAAUoT,OAAS,SAAUjR,EAAK6B,GACxC,OAAO7B,GAGXmsB,EAAUtuB,UAAUsN,OAAS,SAAUsO,EAAGmB,GAEtC,OAAOnB,GAAKmB,GAEhBuR,EAAUtuB,UAAUuuB,YAAc,WAC9B,IAAIC,EAAMrwB,KAAKskB,QAAQxP,WACvB,OAAOub,EAAItJ,OAAO,EAAGsJ,EAAIjhB,OAAS,IAEtC+gB,EAAUtuB,UAAUiT,SAAW,WAC3B,MAAO,cAAgB9U,KAAKwF,KAAO,KAGvC2qB,EAAUtuB,UAAUmuB,WAAa,SAAUhsB,GACvC,OAAOhE,KAAKkZ,GAAGlV,GAAOA,EAAMhE,KAAKiV,OAAOjR,IAY5CmsB,EAAUtuB,UAAU8sB,SAAW,SAAU2B,EAAML,GAC3C,IAAKK,EACD,OAAOtwB,KACX,GAAa,SAATswB,IAAoBL,EACpB,MAAM,IAAIxd,MAAM,kDACpB,OAAO,IAAI8d,EAAUvwB,KAAMswB,IAExBH,EA3DmB,GA+D9B,SAASI,EAAUrhB,EAAMohB,GACrB,IAAIngB,EAAQnQ,KAEZ,SAASwwB,EAAUxsB,GACf,OAAO,QAAQA,GAAOA,GAAM,QAAUA,GAAO,CAACA,GAAO,GAczD,SAASysB,EAAajwB,EAAUkwB,GAC5B,OAAO,SAAqB1sB,GACxB,IAAI,QAAQA,IAAuB,IAAfA,EAAIoL,OACpB,OAAOpL,EACX,IAAI0b,EAAM8Q,EAAUxsB,GAChBsC,GAAS,QAAIoZ,EAAKlf,GACtB,OAAyB,IAAlBkwB,EAAgF,KAAvD,QAAOpqB,GAAQ,SAAUgJ,GAAK,OAAQA,KAAMF,OAjBpF,SAAqBpL,GACjB,OAAQA,EAAIoL,QACR,KAAK,EACD,OACJ,KAAK,EACD,MAAgB,SAATkhB,EAAkBtsB,EAAI,GAAKA,EACtC,QACI,OAAOA,GAUgF2sB,CAAYrqB,IAI/G,SAASsqB,EAAmBpwB,GACxB,OAAO,SAAqBqwB,EAAMC,GAC9B,IAAIC,EAAOP,EAAUK,GAAOG,EAAQR,EAAUM,GAC9C,GAAIC,EAAK3hB,SAAW4hB,EAAM5hB,OACtB,OAAO,EACX,IAAK,IAAIiO,EAAI,EAAGA,EAAI0T,EAAK3hB,OAAQiO,IAC7B,IAAK7c,EAASuwB,EAAK1T,GAAI2T,EAAM3T,IACzB,OAAO,EAEf,OAAO,GAGf,CAAC,SAAU,SAAU,SAAU,cAActc,SAAQ,SAAUyE,GAC3D,IAAIyrB,EAAc/hB,EAAK1J,GAAMlC,KAAK4L,GAC9BgiB,EAAqB,WAAT1rB,EAAoBorB,EAAqBH,EACzDtgB,EAAM3K,GAAQ0rB,EAAUD,OAE5B,QAAOjxB,KAAM,CACT2tB,QAASze,EAAKye,QACdnoB,KAAM0J,EAAK1J,KACX8e,QAASpV,EAAKoV,QACdlF,QAASlQ,EAAKkQ,QACdyP,IAAK3f,EAAK2f,IACV3V,GAAIuX,EAAavhB,EAAKgK,GAAG5V,KAAK4L,IAAO,GACrCiiB,WAAYb,+GC5DZc,kUApDJC,EAA4B,WAC5B,SAASA,IACLrxB,KAAKwlB,SAAU,EACfxlB,KAAKsxB,UAAY,GACjBtxB,KAAKuxB,cAAe,QAAKF,EAAWxvB,UAAW,CAC3C,OACA,SACA,QACA,OACA,MACA,OACA,OACA,OACA,QAIJ7B,KAAK+D,OAAQ,SAAQ,QAAI/D,KAAKuxB,cADf,SAAU9X,EAAYjU,GAAQ,OAAO,IAAI,KAAU,QAAO,CAAEA,KAAMA,GAAQiU,OAClC,IA+B3D,OA7BA4X,EAAWxvB,UAAUqT,QAAU,WAC3BlV,KAAK+D,MAAQ,IAOjBstB,EAAWxvB,UAAUqN,KAAO,SAAU1J,EAAMiU,EAAY+X,GACpD,KAAK,QAAU/X,GACX,OAAOzZ,KAAK+D,MAAMyB,GACtB,GAAIxF,KAAK+D,MAAMrB,eAAe8C,GAC1B,MAAM,IAAIiN,MAAM,iBAAmBjN,EAAO,+BAO9C,OANAxF,KAAK+D,MAAMyB,GAAQ,IAAI,KAAU,QAAO,CAAEA,KAAMA,GAAQiU,IACpD+X,IACAxxB,KAAKsxB,UAAU7wB,KAAK,CAAE+E,KAAMA,EAAM0N,IAAKse,IAClCxxB,KAAKwlB,SACNxlB,KAAKyxB,mBAENzxB,MAEXqxB,EAAWxvB,UAAU4vB,gBAAkB,WACnC,KAAOzxB,KAAKsxB,UAAUliB,QAAQ,CAC1B,IAAIF,EAAOlP,KAAKsxB,UAAUrvB,QAC1B,GAAIiN,EAAKoV,QACL,MAAM,IAAI7R,MAAM,sDACpB,QAAOzS,KAAK+D,MAAMmL,EAAK1J,MAAO,qBAA0B0J,EAAKgE,QAG9Dme,EAhDoB,GAoDvBD,EAAkB,SAAUle,GAC5B,IAAIwe,EAAc,SAAU1tB,GAAO,OAAe,MAAPA,EAAcA,EAAI8Q,WAAa9Q,GACtE2tB,EAAkB,CAClB9c,OAAQ6c,EACRzc,OAAQyc,EACRxY,IAAI,IAAAA,IAAG0Y,QACPtN,QAAS,KAETnV,OAAQ,SAAUsO,EAAGmB,GAAK,OAAOnB,GAAKmB,IAE1C,OAAO,QAAO,GAAI+S,EAAiBze,KAGvC,QAAOme,EAAWxvB,UAAW,CACzB0D,OAAQ6rB,EAAgB,IACxBjpB,KAAMipB,EAAgB,CAClB9M,QAAS,UAEbuN,MAAOT,EAAgB,IACvBU,KAAMV,EAAgB,CAClBhS,SAAS,IAEb2S,IAAKX,EAAgB,CACjBnc,OAAQ,SAAUjR,GAAO,OAAOqlB,SAASrlB,EAAK,KAC9CkV,GAAI,SAAUlV,GACV,QAAQ,QAAkBA,IAAQhE,KAAKiV,OAAOjR,EAAI8Q,cAAgB9Q,GAEtEsgB,QAAS,UAEb0N,KAAMZ,EAAgB,CAClBvc,OAAQ,SAAU7Q,GAAO,OAAQA,EAAO,EAAM,GAC9CiR,OAAQ,SAAUjR,GAAO,OAA6B,IAAtBqlB,SAASrlB,EAAK,KAC9CkV,IAAI,IAAAA,IAAG+Y,SACP3N,QAAS,QAEb4N,KAAMd,EAAgB,CAClBvc,OAAQ,SAAU7Q,GACd,OAAQhE,KAAKkZ,GAAGlV,GAEV,CAACA,EAAImuB,eAAgB,KAAOnuB,EAAIouB,WAAa,IAAItwB,OAAO,IAAK,IAAMkC,EAAIquB,WAAWvwB,OAAO,IAAImR,KAAK,UADlGkB,GAGVc,OAAQ,SAAUjR,GACd,GAAIhE,KAAKkZ,GAAGlV,GACR,OAAOA,EACX,IAAIgY,EAAQhc,KAAKsyB,QAAQ7oB,KAAKzF,GAC9B,OAAOgY,EAAQ,IAAIuW,KAAKvW,EAAM,GAAIA,EAAM,GAAK,EAAGA,EAAM,SAAM7H,GAEhE+E,GAAI,SAAUlV,GAAO,OAAOA,aAAeuuB,OAASjJ,MAAMtlB,EAAIwuB,YAC9DrjB,OAAQ,SAAUsjB,EAAGlV,GACjB,MAAO,CAAC,cAAe,WAAY,WAAW3O,QAAO,SAAUsL,EAAKvZ,GAAM,OAAOuZ,GAAOuY,EAAE9xB,OAAU4c,EAAE5c,QAAU,IAEpH2jB,QAAS,0DACTgO,QAAS,0DAEbI,KAAMtB,EAAgB,CAClBvc,OAAQ,KACRI,OAAQ,KACRiE,IAAI,IAAAA,IAAG3F,QACPpE,OAAQ,KACRmV,QAAS,UAGbJ,IAAKkN,EAAgB,CACjBvc,OAAQ,KACRI,OAAQ,KACRiE,GAAI,WAAc,OAAO,GACzB/J,OAAQ,kLCjJhBwjB,EAA6B,WAC7B,SAASA,EAAYvkB,QACF,IAAXA,IAAqBA,EAAS,KAClC,QAAOpO,KAAMoO,GA4BjB,OAlBAukB,EAAY9wB,UAAU+wB,SAAW,SAAUC,EAAWC,EAAUC,GAC5D,IAAIC,EACAC,GAAU,QAAUH,EAAUC,GAAM9nB,EAAY,GAAIioB,EAAc,GACtE,IAAK,IAAI7V,KAAK4V,EACV,GAAKA,EAAQ5V,IAAO4V,EAAQ5V,GAAGjP,SAE/B4kB,EAAezf,OAAOC,KAAKyf,EAAQ5V,GAAGjP,SACpBgB,OAElB,IAAK,IAAIsO,KAAKsV,EACNE,EAAYhlB,QAAQ8kB,EAAatV,KAAO,IAE5CwV,EAAYzyB,KAAKuyB,EAAatV,IAC9BzS,EAAU+nB,EAAatV,IAAM1d,KAAKgzB,EAAatV,KAGvD,OAAO,QAAO,GAAIzS,EAAW4nB,IAE1BF,EA/BqB,+RCS5BQ,EAA0B,WAC1B,SAASA,EAASC,GACd,GAAIA,aAAuBD,EAAU,CACjC,IAAI5kB,EAAO6kB,EACXpzB,KAAKyN,MAAQc,EAAKd,MAClBzN,KAAKwO,YAAcD,EAAKC,YAAY1M,QACpC9B,KAAKsb,aAAc,QAAO,GAAI/M,EAAK+M,aACnCtb,KAAK+X,YAAcxJ,EAAKwJ,YAAYjW,QACpC9B,KAAKwa,MAAQjM,EAAKiM,OAASjM,EAAKiM,MAAM1Y,YAErC,CACD,IAAI2L,EAAQ2lB,EACZpzB,KAAKyN,MAAQA,EACbzN,KAAKwO,YAAcf,EAAM4lB,WAAW,CAAEjU,SAAS,IAC/Cpf,KAAKsb,YAAc,GACnBtb,KAAK+X,YAActK,EAAMsK,YAAYpJ,KAAI,SAAUqE,GAAO,OAAOA,EAAItG,YA+C7E,OA5CAymB,EAAStxB,UAAU6K,MAAQ,WACvB,OAAO,IAAIymB,EAASnzB,OAGxBmzB,EAAStxB,UAAUyxB,eAAiB,SAAUllB,GAG1C,OADApO,KAAKsb,YAActb,KAAKwO,YAAYI,QAAO,SAAUsR,EAAMqT,GAAQ,OAAO,QAAWrT,EADtC,EAAnBsT,EAC2ED,GAD9CloB,GAAImoB,EAAShvB,MAAM4J,EAAOolB,EAASnoB,OAA1E,IAAUmoB,IACsF,IAC3GxzB,MAGXmzB,EAAStxB,UAAU4xB,UAAY,SAAUjuB,GACrC,OAAO,QAAKxF,KAAKwO,aAAa,QAAO,KAAMhJ,KAM/C2tB,EAAStxB,UAAUsN,OAAS,SAAUZ,EAAMmlB,GACxC,IAAIC,EAAO3zB,KAAK2zB,KAAKplB,EAAMmlB,GAC3B,OAAOC,GAAwB,IAAhBA,EAAKvkB,QAcxB+jB,EAAStxB,UAAU8xB,KAAO,SAAUplB,EAAMmlB,GACtC,GAAI1zB,KAAKyN,QAAUc,EAAKd,MACpB,OAAO,EACX,IAAIW,EAASslB,EAAWA,EAAS1zB,MAAQA,KAAKwO,YAC9C,OAAO,YAAcJ,EAAQpO,KAAKsb,YAAa/M,EAAK+M,cAMxD6X,EAASzmB,MAAQ,SAAU6B,GAAQ,OAAOA,EAAK7B,SACxCymB,EA9DkB,mWCHzBS,EAA2B,WAC3B,SAASA,KA4JT,OAzJAA,EAAUC,gBAAkB,SAAUC,EAAU3rB,GAC5C,IAAIsF,GAAQ,QAAKtF,GAAMsF,MACvB,OAAO,IAAI,IAAYqmB,EAAUrmB,EAAOtF,EAAKwG,KAAI,QAAK,gBAAgBC,OAAO,KAAQ,IAAK,KAE9FglB,EAAUG,UAAY,SAAUvH,GAC5B,IAAIre,EAAWqe,EAAYpe,SAC3B,OAAOoe,EAAY/T,SAAStQ,KAAKwG,KAAI,SAAUlB,GAAS,OAAO,IAAI,IAASA,GAAO6lB,eAAenlB,OAGtGylB,EAAUI,YAAc,SAAUC,EAAUzH,GACxC,IAAI0H,EAASN,EAAUG,UAAUvH,GACjC,OAAIA,EAAYrsB,UAAUif,QACfwU,EAAUO,cAAcF,EAAUC,EAAQ3gB,OAAOC,KAAKgZ,EAAYpe,WAEtE8lB,GAOXN,EAAUQ,iBAAmB,SAAUttB,EAAOqB,EAAM6kB,GAEhD7kB,EACKmB,QAAO,SAAUiF,GAAQ,OAAO,QAAQye,EAAQze,EAAKd,UACrD1M,SAAQ,SAAUwN,GACnB,IAAI8lB,GAAY,QAAO9lB,EAAKd,MAAM+M,OAAS,IACvC8Z,EAAUV,EAAUU,QAAQnsB,GAAM,SAAUoY,GAAK,OAAOA,IAAMhS,KAC9DgmB,EAAcF,EAAU1lB,KAAI,SAAUmL,GAAQ,OAAOhT,EAAM0tB,iBAAiBF,EAASxa,MACzFvL,EAAKiM,MAAQ+Z,EAAY3lB,OAAO,KAAS,QAcjDglB,EAAUO,cAAgB,SAAUF,EAAUC,EAAQO,QACnC,IAAXA,IAAqBA,EAAS,IAKlC,IAAIC,EAAYT,EACXtlB,KAAI,SAAUJ,GAAQ,OAAOA,EAAKC,eAClCI,OAAO,KAAS,IAChBtF,QAAO,SAAU0F,GAAS,OAAQA,EAAMoQ,WACxCzQ,KAAI,QAAK,OAiBd,OAAOulB,EAAOvlB,KAZd,SAAiCgmB,GAE7B,IAAIC,GAAc,QAAO,GAAID,GAAUA,EAAOrZ,aAE1CuZ,GAAoB,QAAKD,EAAaH,GAC1CG,GAAc,QAAKA,EAAaH,GAChC,IAnBmBtsB,EAAMsF,EACrBc,EAkBAumB,GAAgB,SAnBD3sB,EAmBoB8rB,EAnBdxmB,EAmBwBknB,EAAOlnB,MAlBpDc,GAAO,QAAKpG,GAAM,QAAO,QAASsF,KAC/B,QAAO,GAAIc,GAAQA,EAAK+M,cAiBmC,IAAIoZ,GAElEK,GAAe,QAAOH,EAAaE,EAAeD,GACtD,OAAO,IAAI,IAASF,EAAOlnB,OAAO6lB,eAAeyB,OAQzDnB,EAAUllB,YAAc,SAAUulB,EAAUC,EAAQc,GAIhD,IAHA,IAE2BC,EAAOC,EAU9BhG,EAAMiG,EAAUlnB,EAASke,EAZzBrF,EAAMhF,KAAKD,IAAIoS,EAAS7kB,OAAQ8kB,EAAO9kB,QACvCgmB,EAAO,EAEJA,EAAOtO,GAAOmN,EAASmB,GAAM3nB,QAAUunB,IADnBC,EAC6ChB,EAASmB,GAD/CF,EACsDhB,EAAOkB,GAD7CH,EAAM9lB,OAAO+lB,EAAOtB,EAAUyB,oBAE5ED,IAUJD,GADAjG,EAAO+E,GACSnyB,MAAM,EAAGszB,GACzBnnB,EAAUihB,EAAKptB,MAAMszB,GAErB,IAAIE,EAAuBH,EAASxmB,KAVpC,SAAuB4mB,EAActmB,GACjC,IAAIxC,EAAS8oB,EAAa7oB,QAE1B,OADAD,EAAO6O,YAAc4Y,EAAOjlB,GAAKqM,YAC1B7O,KAUX,OAFA0f,EAAW+H,EAAOpyB,MAAMszB,GAEjB,CAAElG,KAAMA,EAAMC,GADhBmG,EAAqBlzB,OAAO+pB,GACJgJ,SAAUA,EAAUG,qBAAsBA,EAAsBrnB,QAASA,EAASke,SAAUA,IAiB7HyH,EAAU4B,SAAW,SAAUC,EAAOC,EAAOhC,GACzC,IAAIiC,GAAO,EAEX,OADa,QAAYF,EAAOC,GAClB9mB,QAAO,SAAU4mB,EAAUnK,GACrC,IAAIuK,EAAQvK,EAAG,GAAIwK,EAAQxK,EAAG,GAE9B,OADAsK,EAAOA,IAASC,EAAMzmB,OAAO0mB,EAAOnC,IACtB8B,EAAWA,EAASpzB,OAAOwzB,KAC1C,KAUPhC,EAAUzkB,OAAS,SAAUsmB,EAAOC,EAAOhC,GACvC,OAAO+B,EAAMrmB,SAAWsmB,EAAMtmB,QAAUwkB,EAAU4B,SAASC,EAAOC,EAAOhC,GAAUtkB,SAAWqmB,EAAMrmB,QAYxGwkB,EAAUU,QAAU,SAAUnsB,EAAM2tB,GAChC,IAAIvnB,GAAO,QAAKpG,EAAM2tB,GAClBC,EAAa5tB,EAAK+F,QAAQK,GAC9B,OAAuB,IAAhBwnB,OAAoB5hB,EAAYhM,EAAKrG,MAAM,EAAGi0B,EAAa,IAEtEnC,EAAUyB,iBAAmB,SAAU9mB,GACnC,OAAOA,EAAKd,MAAM4lB,WAAW,CAAEjU,SAAS,IAAS9V,QAAO,SAAU0F,GAAS,OAAQA,EAAM2e,YAG7FiG,EAAUtY,YAAc,SAAUnT,GAAQ,OAAOA,EAAKyG,QAAO,SAAUsL,EAAK3L,GAAQ,OAAO,QAAO2L,EAAK3L,EAAK+M,eAAiB,KACtHsY,EA7JmB,yGCPvB,IAAIoC,EAAkB,CACzB/lB,KAAM,CACFgmB,KAAM,OACNC,MAAO,SAEXpd,MAAO,CACHqd,KAAM,OACNC,OAAQ,sbCgBZnkB,EAA4B,WAC5B,SAASA,EAAWokB,EAAMne,EAAWpG,EAAMwkB,EAAQ3uB,GAG/C,GAFA3H,KAAKu2B,UAAW,EAChBv2B,KAAKyD,aAAU0Q,EACXkiB,aAAgBpkB,GAChB,QAAOjS,KAAMq2B,QAEZ,IAAI,QAAWne,GAAY,CAC5B,IAAI,QAAkBme,GAClB,MAAM,IAAI5jB,MAAM,gDACpB,KAAK,QAAWyF,GACZ,MAAM,IAAIzF,MAAM,2DACpBzS,KAAKuhB,MAAQ8U,EACbr2B,KAAKs2B,OAASA,EACdt2B,KAAKkY,UAAYA,EACjBlY,KAAK8R,KAAOA,GAAQ,GACpB9R,KAAK2H,KAAOA,EACZ3H,KAAKu2B,cAAoBpiB,IAATxM,EAChB3H,KAAKyD,QAAUzD,KAAKu2B,SAAW,YAAiBv2B,KAAK2H,WAAQwM,OAE5D,IAAI,QAASkiB,IAASA,EAAK9U,QAAU8U,EAAK3zB,eAAe,cAAgB2zB,EAAK3zB,eAAe,SAAU,CACxG,IAAI8zB,EAAUH,EACd,OAAO,IAAIpkB,EAAWukB,EAAQjV,MAAOiV,EAAQte,UAAWse,EAAQ1kB,KAAM0kB,EAAQF,OAAQE,EAAQ7uB,OA+DtG,OA5DAsK,EAAWpQ,UAAUgX,UAAY,SAAUpL,GACvC,IAAIgpB,EAAaz2B,KAAKs2B,QAAU,GAC5BI,EAAejpB,GAASA,EAAMkpB,eAAkB,GACpD,MAAO,CACH1mB,KAAMwmB,EAAWxmB,MAAQymB,EAAYzmB,MA5CvC,OA6CE6I,MAAO2d,EAAW3d,OAAS4d,EAAY5d,OA5CxC,SAsDP7G,EAAWpQ,UAAU8K,QAAU,SAAUiqB,EAAgBhnB,GACrD,IAAIO,EAAQnQ,KACR+G,EAAK,OAOLwH,EAAOqoB,EAAeC,SAAS72B,MAC/ByN,EAAQc,GAAQA,EAAKd,MACrBqpB,EAAc92B,KAAK6Y,UAAUpL,GAAOqL,MACpCie,GAAoB,QAAWD,GAAeA,EAAc,KAUhE,OAAQ92B,KAAKyD,QAAUsD,EAClBkJ,OACAlF,MApB2B,WAC5B,OAAOhE,EAAG0U,IAAImb,EAAeI,gBAAgB7mB,GAAOxB,KAAI,SAAUqJ,GAAc,OAAOA,EAAWtH,IAAIkmB,EAAgBhnB,UAoBrH7E,MAjBiB,SAAUksB,GAAgB,OAAO9mB,EAAM+H,UAAU/V,MAAM,KAAM80B,MAkB9ElsB,KAAKgsB,GACLhsB,MAboB,SAAUmsB,GAK/B,OAJA/mB,EAAMxI,KAAOuvB,EACb/mB,EAAMomB,UAAW,EACjBpmB,EAAM+H,UAAY,KAClB,6BAA8B/H,EAAOP,GAC9BO,EAAMxI,SAgBrBsK,EAAWpQ,UAAU6O,IAAM,SAAUkmB,EAAgBhnB,GACjD,OAAO5P,KAAKyD,SAAWzD,KAAK2M,QAAQiqB,EAAgBhnB,IAExDqC,EAAWpQ,UAAUiT,SAAW,WAC5B,MAAO,sBAAuB,QAAU9U,KAAKuhB,OAAS,gBAAkBvhB,KAAK8R,KAAKnD,IAAI,MAAa,MAEvGsD,EAAWpQ,UAAU6K,MAAQ,WACzB,OAAO,IAAIuF,EAAWjS,OAE1BiS,EAAWklB,SAAW,SAAU5V,EAAO5Z,GAAQ,OAAO,IAAIsK,EAAWsP,GAAO,WAAc,OAAO5Z,IAAS,KAAM,KAAMA,IAC/GsK,EArFoB,4qBCd3BmlB,EAAQ,SACRC,EAAY,CAACD,EAAMlB,MAAOkB,EAAMnB,MAChCqB,EAAc,CAACF,EAAMlB,OAarB9tB,EAAgC,WAChC,SAASA,EAAemvB,GACpBv3B,KAAKu3B,MAAQA,EA8IjB,OA3IAnvB,EAAevG,UAAU+W,UAAY,WACjC,OAAO5Y,KAAKu3B,MAAM3oB,QAAO,SAAUsL,EAAK3L,GAAQ,OAAO2L,EAAI9X,OAAOmM,EAAKwJ,YAAYpJ,KAAI,SAAU4O,GAAK,OAAOA,EAAEgE,YAAe,IAAI3S,OAAO,KAAO,KAQpJxG,EAAevG,UAAUiM,cAAgB,SAAUyT,GAC/C,IAAIiU,EAAWx1B,KAAKu3B,MACf5oB,KAAI,SAAUJ,GAAQ,OAAOA,EAAKwJ,eAClCnJ,OAAO,KAAS,IAChBtF,QAAO,SAAUiU,GAAK,OAAOA,EAAEgE,QAAUA,KAC9C,OAAO,QAAKiU,IAGhBptB,EAAevG,UAAUgX,UAAY,SAAUb,GAC3C,IAAIzJ,EAAOvO,KAAK62B,SAAS7e,GACzB,OAAOA,EAAWa,UAAUtK,EAAKd,QAyBrCrF,EAAevG,UAAUkS,WAAa,SAAUtG,GAC5C,OAAO,IAAIrF,EAAe,YAAkBpI,KAAKu3B,OAAO,SAAUhpB,GAAQ,OAAOA,EAAKd,QAAUA,OAiBpGrF,EAAevG,UAAU21B,eAAiB,SAAUC,EAAgBhqB,GAChE,IAAIc,GAAO,QAAKvO,KAAKu3B,OAAO,QAAO,QAAS9pB,IACxC+F,EAAOikB,EAAe9oB,KAAI,SAAU4O,GAAK,OAAOA,EAAEgE,SACtDhT,EAAKwJ,YAAcxJ,EAAKwJ,YAAYzO,QAAO,SAAUiU,GAAK,OAAkC,IAA3B/J,EAAKtF,QAAQqP,EAAEgE,UAAkBnf,OAAOq1B,IAS7GrvB,EAAevG,UAAU61B,YAAc,SAAUznB,EAAML,GACnD,IAAIO,EAAQnQ,UACC,IAATiQ,IAAmBA,EAAO,QAE9B,IAGI0nB,IAHa,QAAQN,EAAWpnB,GAAQA,EAAO,UAGjB,eAA6BqnB,EAAcD,EAE7E,sBAAuBr3B,KAAKu3B,MAAOtnB,EAAML,GACzC,IAAIgoB,EAAgB,SAAUC,EAAcC,GAAe,OAAO,SAAU9f,GACxE,OAAO,QAAQ6f,EAAc1nB,EAAM0I,UAAUb,GAAY8f,MAIzDvc,EAAWvb,KAAKu3B,MAAM3oB,QAAO,SAAUsL,EAAK3L,GAC5C,IAAIwpB,EAAkBxpB,EAAKwJ,YAAYzO,OAAOsuB,EAAcD,EAAc,SACtEK,EAASD,EAAgBzuB,OAAOsuB,EAAc,CAAC,UAAW,UAC1DK,EAAOF,EAAgBzuB,QAAO,QAAIsuB,EAAc,CAAC,UAAW,WAE5D7jB,EAAa5D,EAAM4D,WAAWxF,EAAKd,OACnCyqB,EAAY,SAAU3a,GACtB,OAAOA,EACF7M,IAAIqD,EAAYnE,GAEhB7E,MAAK,SAAUvG,GAAS,MAAO,CAAG+c,MAAOhE,EAAEgE,MAAO/c,MAAOA,OAGlE,OADAwzB,EAAOj3B,QAAQm3B,GACRhe,EAAI9X,OAAO61B,EAAKtpB,IAAIupB,MAC5B,IAEH,OAAO,WAAgB3c,IAE3BnT,EAAevG,UAAUs2B,SAAW,WAChC,OAAOn4B,KAAKo4B,YAAcp4B,KAAKo4B,UAAY,IAAIC,EAAer4B,QAElEoI,EAAevG,UAAUg1B,SAAW,SAAU7e,GAC1C,OAAO,QAAKhY,KAAKu3B,OAAO,SAAUhpB,GAAQ,OAAO,QAAQA,EAAKwJ,YAAaC,OAO/E5P,EAAevG,UAAUm1B,gBAAkB,SAAUhf,GACjD,IAAI7H,EAAQnQ,KACRuO,EAAOvO,KAAK62B,SAAS7e,GAIrBsgB,GADU,YAAkBt4B,KAAKu3B,OAAO,SAAUjoB,GAAK,OAAOA,IAAMf,MAAYvO,KAAKu3B,OAEpF3oB,QAAO,SAAUsL,EAAKqe,GAAS,OAAOre,EAAI9X,OAAOm2B,EAAMxgB,eAAiB,IACxEzO,QAAO,SAAU0J,GAAO,OAAOA,IAAQgF,KAW5C,OAAOA,EAAWlG,KAAKnD,KAVH,SAAU4S,GAC1B,IAAIiU,EAAW8C,EAAqBhvB,QAAO,SAAUiU,GAAK,OAAOA,EAAEgE,QAAUA,KAC7E,GAAIiU,EAASpmB,OACT,OAAO,QAAKomB,GAChB,IAAIgD,EAAeroB,EAAMgoB,WAAWM,UAAUlX,GAC9C,IAAI,QAAYiX,GACZ,MAAM,IAAI/lB,MAAM,+CAAgD,QAAU8O,IAE9E,OAAO,IAAI,IAAWA,GAAO,WAAc,OAAOiX,IAAiB,GAAIA,OAIxEpwB,EAhJwB,GAoJ/BiwB,EAAgC,WAChC,SAASA,EAAexnB,GACpB7Q,KAAK6Q,QAAUA,EACf7Q,KAAK04B,OAAS14B,KAAK0Q,IAlKQ,oBAkKsB,cAwBrD,OAtBA2nB,EAAex2B,UAAU6O,IAAM,SAAU6Q,GACrC,IAAIvJ,EAAahY,KAAK6Q,QAAQ/C,cAAcyT,GAC5C,GAAIvJ,EAAY,CACZ,GAAiD,WAA7ChY,KAAK6Q,QAAQgI,UAAUb,GAAYc,MACnC,OAAOd,EAAWtH,IAAI1Q,KAAK6Q,SAE/B,IAAKmH,EAAWue,SACZ,MAAM,IAAI9jB,MAAM,yCAA0C,QAAUuF,EAAWuJ,QAEnF,OAAOvJ,EAAWrQ,KAEtB,OAAO3H,KAAKy4B,UAAUlX,IAE1B8W,EAAex2B,UAAU82B,SAAW,SAAUpX,GAC1C,IAAIvJ,EAAahY,KAAK6Q,QAAQ/C,cAAcyT,GAC5C,OAAIvJ,EACOA,EAAWtH,IAAI1Q,KAAK6Q,SACxB,YAAiB7Q,KAAK04B,OAAOhoB,IAAI6Q,KAE5C8W,EAAex2B,UAAU42B,UAAY,SAAUlX,GAC3C,OAAOvhB,KAAK04B,QAAU14B,KAAK04B,OAAOhoB,IAAI6Q,IAEnC8W,EA3BwB,q2BC/J/BO,EAAkB,EAMlBC,GAAsB,QAAS,mBAJnB,CAAC,MAAO,OAAQ,SAAU,OAAQ,aAM9CC,GAAqB,QAAS,iBAJlB,CAAC,OAAQ,WAAY,OAAQ,WAAY,YAAa,eAUlEpiB,EAA0B,WAQ1B,SAASA,EAASU,EAAiBC,QACP,IAApBD,IAA8BA,EAAkByhB,QAC7B,IAAnBxhB,IAA6BA,EAAiByhB,GAClD94B,KAAKoX,gBAAkBA,EACvBpX,KAAKqX,eAAiBA,EACLrX,KAAKmb,IAAMyd,IACX54B,KAAK+4B,WAAY,EACjB/4B,KAAKg5B,aAAe,GAErCh5B,KAAKqI,MAAQ,KAEbrI,KAAK+W,YAAc,IAAI,IAAY/W,MAEnCA,KAAKsY,QAAU,IAAI,IAEnBtY,KAAK8sB,kBAAoB,IAAI,IAAkB9sB,MAK/CA,KAAK4U,kBAAoB,IAAI,IAAkB5U,MAK/CA,KAAKmc,UAAY,IAAI,IAAUnc,MAE/BA,KAAKiX,WAAa,IAAI,IAAWjX,MAEjCA,KAAK4W,cAAgB,IAAI,IAAc5W,MAEvCA,KAAK6W,aAAe,IAAI,IAAa7W,MAErCA,KAAKi5B,SAAW,GAChBj5B,KAAK+W,YAAY/M,WAAWC,iBAAiBjK,KAAK4W,cAAcgH,QAChE5d,KAAKsY,QAAQwa,SAAW9yB,KAAK4W,cAAcgH,OAC3C5d,KAAKsY,QAAQwN,QAAU9lB,KAAKsY,QAAQwa,SAASplB,KAC7C1N,KAAKk5B,WAAWl5B,KAAKsY,SACrBtY,KAAKk5B,WAAWl5B,KAAK6W,cACrB7W,KAAKk5B,WAAWl5B,KAAK4W,eACrB5W,KAAKk5B,WAAWl5B,KAAK8sB,mBACrB9sB,KAAKk5B,WAAWl5B,KAAKiX,YACrBjX,KAAKk5B,WAAW9hB,GAChBpX,KAAKk5B,WAAW7hB,GAgGpB,OA7FAX,EAAS7U,UAAUq3B,WAAa,SAAUA,GACtCl5B,KAAKg5B,aAAav4B,KAAKy4B,IAa3BxiB,EAAS7U,UAAUqT,QAAU,SAAUgkB,GACnC,IAAI/oB,EAAQnQ,KACRk5B,IAAc,QAAWA,EAAWhkB,SACpCgkB,EAAWhkB,QAAQlV,OAGvBA,KAAK+4B,WAAY,EACjB/4B,KAAKg5B,aAAal3B,QAAQf,SAAQ,SAAUo4B,GACxC,IACyB,mBAAdA,EAAEjkB,SAA0BikB,EAAEjkB,QAAQ/E,IAC7C,QAAWA,EAAM6oB,aAAcG,GAEnC,MAAOC,UAwDf1iB,EAAS7U,UAAUw3B,OAAS,SAAUA,EAAQl5B,QAC1B,IAAZA,IAAsBA,EAAU,IACpC,IAAIm5B,EAAiB,IAAID,EAAOr5B,KAAMG,GACtC,IAAKm5B,EAAe9zB,KAChB,MAAM,IAAIiN,MAAM,+CAAiD6mB,GAErE,OADAt5B,KAAKg5B,aAAav4B,KAAK64B,GACft5B,KAAKi5B,SAASK,EAAe9zB,MAAQ8zB,GAEjD5iB,EAAS7U,UAAU03B,UAAY,SAAUC,GACrC,OAAOA,EAAax5B,KAAKi5B,SAASO,IAAc,QAAOx5B,KAAKi5B,WAEzDviB,EAnJkB,ijBCf7B,SAAS+iB,EAAYhsB,GACjB,OAAOA,EAAMjI,KAEjB,SAASk0B,EAAYjsB,GAEjB,OADAA,EAAMC,KAAKsG,QAAU,WAAc,OAAOvG,GACnCA,EAAMC,KAEjB,SAASisB,EAAYlsB,GAIjB,OAHIA,EAAM2M,QAAU3M,EAAM2M,OAAOzS,OAC7B8F,EAAM9F,KAAO8F,EAAMC,KAAK/F,MAAO,QAAQ8F,EAAM2M,OAAOzS,KAAM8F,EAAM9F,OAE7D8F,EAAM9F,KAEjB,IAAIiyB,EAAgB,SAAUC,EAA4Bjc,GACtD,OAAO,SAAoBhK,GACvB,IAAIkmB,EAAWlmB,EAAYlG,KAG3B,GAAIosB,GAAYA,EAASroB,KAAOqoB,EAASt0B,MAAQs0B,EAASt0B,KAAKwW,MAAM,WAAY,CAC7E,IAAI+d,EAAc,IAClB,QAAKD,EAAUC,GACfA,EAAYtoB,KAAO,kBACnBqoB,EAAWC,EAEf,IAAI3f,EAASxG,EAAYwG,OACrB4f,EA/BG,SAAUvoB,GACrB,KAAK,QAASA,GACV,OAAO,EACX,IAAImM,EAAyB,MAAlBnM,EAAIhM,OAAO,GACtB,MAAO,CAAEzB,IAAK4Z,EAAOnM,EAAIwoB,UAAU,GAAKxoB,EAAKmM,KAAMA,GA2BlCsc,CAASJ,EAASroB,KAC3BA,EAAOuoB,EAAwBH,EAA2BxyB,QAAQ2yB,EAAOh2B,IAAK,CAAEyJ,MAAOqsB,IAAvEA,EAASroB,IAC7B,IAAKA,EACD,OAAO,KACX,IAAKooB,EAA2BM,UAAU1oB,GACtC,MAAM,IAAIgB,MAAM,gBAAkBhB,EAAM,eAAiBmC,EAAc,KAC3E,OAAOomB,GAAUA,EAAOpc,KAAOnM,GAAQ2I,GAAUA,EAAOggB,WAAcxc,KAAQnM,IAAI4oB,OAAO5oB,KAG7F6oB,EAAsB,SAAUC,GAChC,OAAO,SAA0B9sB,GAC7B,OAAQ8sB,EAAO9sB,IAAUA,EAAMgE,IAAMhE,EAAQA,EAAM2M,OAAS3M,EAAM2M,OAAOggB,UAAY,OAc7F,SAASI,EAAY/sB,GACjB,OAAOA,EAAM2M,OAAS3M,EAAM2M,OAAOjS,KAAK/F,OAAOqL,GAAkB,CAACA,GAEtE,SAASgtB,EAAgBhtB,GACrB,IAAI6L,EAAW7L,EAAM2M,QAAS,QAAO,GAAI3M,EAAM2M,OAAOd,UAAY,GAElE,OADAA,EAAS7L,EAAMjI,OAAQ,EAChB8T,EA2CJ,SAASohB,EAAmBjtB,GAE/B,IAA+BktB,EAAY3E,EA2BvC4E,EAAW,SAAUC,GAAK,OAAOA,EAAEC,SAAWD,EAAEtZ,OAEhDwZ,GAAqB,QAAQ,CAC7B,EAAC,QAAK,aAAc,SAAUF,GAAK,OAAO,IAAI,IAAWD,EAASC,GAAIA,EAAE3iB,UAAW2iB,EAAE/oB,KAAM+oB,EAAEvE,UAC7F,EAAC,QAAK,cAAe,SAAUuE,GAAK,OAAO,IAAI,IAAWD,EAASC,GAAIA,EAAEG,WAAYH,EAAE/oB,MAAQ+oB,EAAEI,aAAcJ,EAAEvE,UACjH,EAAC,QAAK,YAAa,SAAUuE,GAAK,OAAO,IAAI,IAAWD,EAASC,IAAI,WAAc,OAAO,IAAIA,EAAEK,WAAe,GAAIL,EAAEvE,UACrH,EAAC,QAAK,YAAa,SAAUuE,GAAK,OAAO,IAAI,IAAWD,EAASC,IAAI,WAAc,OAAOA,EAAEM,WAAa,GAAIN,EAAEvE,OAAQuE,EAAEM,YACzH,EAAC,QAAK,eAAgB,SAAUN,GAAK,OAAO,IAAI,IAAWD,EAASC,GAAI,KAAU,CAACA,EAAEO,aAAcP,EAAEvE,YAGrG+E,GAAmB,QAAQ,CAC3B,EAAC,SAAK,QAAK,OAAQ,MAAW,SAAU5nB,GAAS,OAAO,IAAI,IAAWA,EAAM8N,MAAO,KAAU,CAAC9N,EAAMzP,KAAMyP,EAAM6iB,UACjH,EAAC,SAAK,QAAK,OAAQ,MAAU,SAAU7iB,GAAS,OAAO,IAAI,IAAWA,EAAM8N,OAAO,QAAK9N,EAAMzP,KAAMyP,EAAMzP,IAAIlC,MAAM,GAAI,GAAI2R,EAAM6iB,UAClI,EAAC,SAAK,QAAK,OAAQ,MAAa,SAAU7iB,GAAS,OAAO,IAAI,IAAWA,EAAM8N,MAAO9N,EAAMzP,KA/BvErD,EA+BqF8S,EAAMzP,IA9B5GuM,EAAY,cAIT5P,EAAY,SAAM4P,GAAaA,EAAU0H,SAAStX,EAAI4P,EAAUuH,WAAc,YA0BiCrE,EAAM6iB,QA/BjH,IAAU31B,EACjB4P,MAiCJ+qB,GAAkB,QAAQ,CAC1B,EAAC,IAAApiB,IAAG,KAAa,SAAUqE,GAAK,OAAOA,IACvC,CA5BmB,SAAUtD,GAAO,SAAUA,EAAIsH,QAAStH,EAAI/B,YA4B5C6iB,GACnB,CA3BoB,SAAU9gB,GAC9B,SAAWA,EAAI6gB,UAAW7gB,EAAIsH,SAAWtH,EAAIkhB,UAAYlhB,EAAI+gB,YAAc/gB,EAAImhB,aAAenhB,EAAIihB,YA0B9EH,GACpB,CAxBiB,SAAU9gB,GAC3B,SAAUA,GAAOA,EAAIjW,OAAQ,QAASiW,EAAIjW,OAAQ,QAAQiW,EAAIjW,OAAQ,QAAWiW,EAAIjW,QAuBpEq3B,GACjB,EAAC,SAAI,GAAO,SAAUphB,GAAO,MAAM,IAAIxH,MAAM,2BAA4B,QAAUwH,QAInFshB,EAAO9tB,EAAMd,QAEjB,QADY,QAAQ4uB,GAAQA,GArDGZ,EAqDmBY,EArDPvF,EAqDavoB,EAAMkpB,eAAiB,GApDpEpjB,OAAOC,KAAKmnB,GAAc,IAAIhsB,KAAI,SAAU4S,GAAS,MAAO,CAC/DA,MAAOA,EACPvd,IAAK22B,EAAWpZ,GAChBzP,UAAMqC,EACNmiB,OAAQN,EAAgBzU,SAiDnB5S,IAAI2sB,GAcrB,IAAIE,EAA8B,WAC9B,SAASA,EAAaC,EAAS7mB,GAC3B5U,KAAKy7B,QAAUA,EACf,IArIyBC,EAqIrBhuB,EAAO1N,KACP4d,EAAO,WAAc,OAAO6d,EAAQ3a,KAAK,KACzCyZ,EAAS,SAAU9sB,GAAS,MAAsB,KAAfA,EAAMjI,MAM7CxF,KAAK27B,SAAW,CACZn2B,KAAM,CAACi0B,GACP/rB,KAAM,CAACgsB,GACPtf,OAAQ,CARZ,SAAuB3M,GACnB,OAAI8sB,EAAO9sB,GACA,KACJguB,EAAQ3a,KAAKpT,EAAKkuB,WAAWnuB,KAAWmQ,MAM/CjW,KAAM,CAACgyB,GAEPloB,IAAK,CAACmoB,EAAchlB,EAAmBgJ,IAEvCwc,UAAW,CAACE,EAAoBC,IAChCnsB,OAAQ,EAtJastB,EAsJK9mB,EAAkB8mB,aArJ7C,SAAuBjuB,GAC1B,IACIouB,EAAapuB,EAAMgE,KAAOhE,EAAMgE,IAAI4hB,WAAW,CAAEjU,SAAS,KAAa,GACvE0c,GAAe,SAAO,SAAO,QAAKruB,EAAMW,QAAU,GAAIytB,EAAUltB,KAAI,QAAK,SAFvD,SAAUpD,EAAQF,GAAM,OAAOqwB,EAAa9qB,WAAWvF,EAAI,KAAMoC,EAAMC,UAG7F,OAAOmuB,EACFz5B,OAAO05B,GACPntB,KAAI,SAAUksB,GAAK,MAAO,CAACA,EAAExvB,GAAIwvB,MACjCjsB,OAAO,KAAY,OAiJpB4L,MAAO,GAEPrS,KAAM,CAACqyB,GAEPlhB,SAAU,CAACmhB,GACX1iB,YAAa,CAAC2iB,IAgEtB,OA7DAc,EAAa35B,UAAUk6B,QAAU,SAAUv2B,EAAM7E,GAC7C,IAAIg7B,EAAW37B,KAAK27B,SAChBpc,EAAQoc,EAASn2B,IAAS,GAE9B,OAAI,QAASA,MAAU,QAAU7E,GACtB4e,EAAMnQ,OAAS,EAAImQ,EAAQA,EAAM,IACvC,QAAS/Z,KAAU,QAAW7E,IAEnCg7B,EAASn2B,GAAQ+Z,EACjBoc,EAASn2B,GAAM/E,KAAKE,GACb,WAAc,OAAOg7B,EAASn2B,GAAMga,OAAOmc,EAASn2B,GAAM0I,QAAQvN,EAAI,KAAO,YAJpF,GAaJ66B,EAAa35B,UAAUm6B,MAAQ,SAAUvuB,GACrC,IAAeguB,EAANz7B,KAAmBy7B,QAASE,EAA5B37B,KAA0C27B,SAC/CvhB,EAASpa,KAAK47B,WAAWnuB,GAC7B,GAAI2M,IAAWqhB,EAAQ3a,KAAK1G,OAAQjG,GAAW,GAC3C,OAAO,KAEX,IAAK,IAAItO,KAAO81B,EACZ,GAAKA,EAASj5B,eAAemD,GAA7B,CAEA,IAAIo2B,EAAQN,EAAS91B,GAAK+I,QAAO,SAAUstB,EAAUpS,GAAQ,OAAO,SAAUmD,GAAU,OAAOnD,EAAKmD,EAAQiP,MAAiB,MAC7HzuB,EAAM5H,GAAOo2B,EAAMxuB,GAEvB,OAAOA,GAEX+tB,EAAa35B,UAAU+5B,WAAa,SAAUnuB,GAE1C,IAAIjI,EAAOiI,EAAMjI,MAAQ,GAErB22B,EAAW32B,EAAKsd,MAAM,KAM1B,GAFoB,OAFFqZ,EAASC,OAGvBD,EAASC,MACTD,EAAS/sB,OAAQ,CACjB,GAAI3B,EAAM2M,OACN,MAAM,IAAI3H,MAAM,mFAAqFjN,EAAO,KAGhH,OAAO22B,EAASlpB,KAAK,KAEzB,OAAKxF,EAAM2M,QAEJ,QAAS3M,EAAM2M,QAAU3M,EAAM2M,OAAS3M,EAAM2M,OAAO5U,KADjD,IAGfg2B,EAAa35B,UAAU2D,KAAO,SAAUiI,GACpC,IAAIjI,EAAOiI,EAAMjI,KACjB,IAA2B,IAAvBA,EAAK0I,QAAQ,OAAgBT,EAAM2M,OACnC,OAAO5U,EACX,IAAIo2B,GAAa,QAASnuB,EAAM2M,QAAU3M,EAAM2M,OAAS3M,EAAM2M,OAAO5U,KACtE,OAAOo2B,EAAaA,EAAa,IAAMp2B,EAAOA,GAE3Cg2B,EA5FsB,iTClL7Ba,EAA8B,WAC9B,SAASA,EAAaC,GAClBt8B,KAAKs8B,QAAUA,EAmDnB,OAjDAD,EAAax6B,UAAU06B,WAAa,SAAUC,GAE1C,OAAkC,KADlCA,EAAYA,GAAa,IACRtuB,QAAQ,MAAyC,IAA3BsuB,EAAUtuB,QAAQ,MAE7DmuB,EAAax6B,UAAUif,KAAO,SAAU2b,EAAaC,EAAMC,GAEvD,QADkB,IAAdA,IAAwBA,GAAY,GACnCF,GAA+B,KAAhBA,EAApB,CAEA,IAAIG,GAAQ,QAASH,GACjBj3B,EAAOo3B,EAAQH,EAAcA,EAAYj3B,KACzCxF,KAAKu8B,WAAW/2B,KAChBA,EAAOxF,KAAK03B,YAAYlyB,EAAMk3B,IAClC,IAAIjvB,EAAQzN,KAAKs8B,QAAQ92B,GACzB,GAAIiI,IAAUmvB,KAAWA,GAAUnvB,IAAUgvB,GAAehvB,EAAMC,OAAS+uB,IACvE,OAAOhvB,EAEN,GAAImvB,GAASD,EAAW,CACzB,IACIzZ,GADU,QAAOljB,KAAKs8B,SACJhzB,QAAO,SAAU2jB,GAAU,OAAOA,EAAO4P,mBAAmBC,UAAY7P,EAAO4P,mBAAmBC,SAAS5Z,QAAQ1d,MAIzI,OAHI0d,EAAQ9T,OAAS,GACjB,UAAkB,iDAAmD5J,EAAO,gBAAiB0d,EAAQvU,KAAI,SAAUqN,GAAS,OAAOA,EAAMxW,SAEtI0d,EAAQ,MAIvBmZ,EAAax6B,UAAU61B,YAAc,SAAUlyB,EAAMk3B,GACjD,IAAKA,EACD,MAAM,IAAIjqB,MAAM,sCAAwCjN,EAAO,KAKnE,IAJA,IAAIu3B,EAAY/8B,KAAK8gB,KAAK4b,GACtBM,EAAYx3B,EAAKsd,MAAM,KACvBma,EAAaD,EAAU5tB,OACvBiO,EAAI,EAAGyI,EAAUiX,EACd1f,EAAI4f,EAAY5f,IACnB,GAAqB,KAAjB2f,EAAU3f,IAAmB,IAANA,EAA3B,CAIA,GAAqB,MAAjB2f,EAAU3f,GAMd,MALI,IAAKyI,EAAQ1L,OACT,MAAM,IAAI3H,MAAM,SAAWjN,EAAO,0BAA4Bu3B,EAAUv3B,KAAO,KACnFsgB,EAAUA,EAAQ1L,YANlB0L,EAAUiX,EAWlB,IAAIG,EAAUF,EAAUl7B,MAAMub,GAAGpK,KAAK,KACtC,OAAO6S,EAAQtgB,MAAQsgB,EAAQtgB,MAAQ03B,EAAU,IAAM,IAAMA,GAE1Db,EArDsB,oWCW7Bc,EAA6B,WAE7B,SAASA,EAAY5xB,GACjB,OAAO4xB,EAAY37B,OAAO+J,GAAU,IA4FxC,OAlFA4xB,EAAY37B,OAAS,SAAU47B,GAC3BA,EAAYD,EAAYE,aAAaD,GAAa,IAAIA,EAAcA,EACpE,IAAI3vB,GAAQ,SAAQ,QAAQ2vB,EAAWD,EAAYt7B,YAMnD,OALAu7B,EAAUppB,QAAU,WAAc,OAAOvG,GACzCA,EAAMC,KAAO0vB,EACb3vB,EAAMovB,mBAAqB,CACvBC,SAAU,eAAgBrvB,EAAMjI,OAE7BiI,GAaX0vB,EAAYt7B,UAAUqX,GAAK,SAAUokB,GACjC,OAAOt9B,OAASs9B,GAAOt9B,KAAK0N,OAAS4vB,GAAOt9B,KAAKsL,QAAUgyB,GAM/DH,EAAYt7B,UAAUyJ,IAAM,WACxB,KAAKtL,KAAKoa,QAAYpa,KAAKoa,kBAAkBpa,KAAKokB,aAC9C,OAAOpkB,KAAKwF,KAChB,IAAIA,EAAOxF,KAAKoa,OAAO9O,MACvB,OAAO9F,EAAOA,EAAO,IAAMxF,KAAKwF,KAAOxF,KAAKwF,MAOhD23B,EAAYt7B,UAAU+b,KAAO,WACzB,OAAQ5d,KAAKoa,QAAUpa,KAAKoa,OAAOwD,QAAW5d,MAWlDm9B,EAAYt7B,UAAUwxB,WAAa,SAAUzyB,GAGzC,QAFAA,GAAO,QAASA,EAAM,CAAEwe,SAAS,EAAMme,aAAc,QAC/Bne,SAAWpf,KAAKoa,QAAUpa,KAAKoa,OAAOiZ,cAAiB,IAExEjxB,QAAO,QAAOpC,KAAKoO,SACnB9E,QAAO,SAAU0F,GAAS,OAAQpO,EAAK28B,cAAgB38B,EAAK28B,aAAa76B,eAAesM,EAAM3D,QASvG8xB,EAAYt7B,UAAU4xB,UAAY,SAAUpoB,EAAIzK,GAE5C,YADa,IAATA,IAAmBA,EAAO,IACrBZ,KAAKyR,KAAOzR,KAAKyR,IAAIgiB,UAAUpoB,EAAIzK,KACxC,SAAK,QAAOZ,KAAKoO,SAAS,QAAO,KAAM/C,KACtCzK,EAAKwe,SAAWpf,KAAKoa,QAAUpa,KAAKoa,OAAOqZ,UAAUpoB,IAE9D8xB,EAAYt7B,UAAUiT,SAAW,WAC7B,OAAO9U,KAAKsL,OAGhB6xB,EAAYE,aAAe,SAAUD,GACjC,OAAO,QAAWA,KAA+C,IAAjCA,EAA2B,iBAG/DD,EAAYK,mBAAqB,SAAUvjB,GAAO,OAAO,QAAWA,EAAa,UAEjFkjB,EAAYM,QAAU,SAAUxjB,GAAO,OAAO,QAASA,EAAwB,qBACxEkjB,EA/FqB,kPCZ5BO,EAAmC,WACnC,SAASA,EAAkBhpB,EAAQsY,EAAQ+O,EAAS4B,GAChD39B,KAAK0U,OAASA,EACd1U,KAAKgtB,OAASA,EACdhtB,KAAK+7B,QAAUA,EACf/7B,KAAK29B,UAAYA,EACjB39B,KAAK49B,MAAQ,GA4EjB,OA1EAF,EAAkB77B,UAAUqT,QAAU,WAClClV,KAAK49B,MAAQ,IAEjBF,EAAkB77B,UAAU6X,SAAW,SAAU0jB,GAC7C,IAAIQ,EAAQ59B,KAAK49B,MACbnwB,EAAQ,WAAmB2vB,GAC3B53B,EAAOiI,EAAMjI,KACjB,KAAK,QAASA,GACV,MAAM,IAAIiN,MAAM,gCACpB,GAAIzS,KAAKgtB,OAAOtqB,eAAe8C,KAAS,QAAQo4B,EAAMjvB,KAAI,QAAK,SAAUnJ,GACrE,MAAM,IAAIiN,MAAM,UAAYjN,EAAO,wBAGvC,OAFAo4B,EAAMn9B,KAAKgN,GACXzN,KAAK69B,QACEpwB,GAEXiwB,EAAkB77B,UAAUg8B,MAAQ,WAchC,IAbA,IAAI1tB,EAAQnQ,KACRqrB,EAAKrrB,KAAM49B,EAAQvS,EAAGuS,MAAO5Q,EAAS3B,EAAG2B,OAAQ+O,EAAU1Q,EAAG0Q,QAC9D+B,EAAa,GACjBC,EAAU,GACVC,EAAsB,GAClBC,EAAW,SAAUz4B,GAAQ,OAAO2K,EAAM6c,OAAOtqB,eAAe8C,IAAS2K,EAAM6c,OAAOxnB,IACtF04B,EAAkB,WACdJ,EAAW1uB,QACXe,EAAMwtB,UAAU58B,SAAQ,SAAUo9B,GAC9B,OAAOA,EAAS,aAAcL,EAAWnvB,KAAI,SAAUyO,GAAK,OAAOA,EAAE1P,aAI1EkwB,EAAMxuB,OAAS,GAAG,CACrB,IAAI3B,EAAQmwB,EAAM37B,QACdm8B,EAAS3wB,EAAMjI,KACfc,EAASy1B,EAAQC,MAAMvuB,GACvB4wB,EAAYN,EAAQ7vB,QAAQT,GAChC,GAAInH,EAAJ,CACI,IAAIg4B,EAAgBL,EAASG,GAC7B,GAAIE,GAAiBA,EAAc94B,OAAS44B,EACxC,MAAM,IAAI3rB,MAAM,UAAY2rB,EAAS,wBAEzC,IAAIG,EAAsBN,EAASG,EAAS,OACxCG,GAEAv+B,KAAK0U,OAAOkC,cAAc4nB,WAAWD,GAEzCvR,EAAOoR,GAAU3wB,EACjBzN,KAAKy+B,YAAYhxB,GACb4wB,GAAa,GACbN,EAAQve,OAAO6e,EAAW,GAC9BP,EAAWr9B,KAAKgN,OAdpB,CAiBA,IAAIixB,EAAOV,EAAoBI,GAE/B,GADAJ,EAAoBI,GAAUR,EAAMxuB,OAChCivB,GAAa,GAAKK,IAASd,EAAMxuB,OAKjC,OAFAwuB,EAAMn9B,KAAKgN,GACXywB,IACOlR,EAEFqR,EAAY,GACjBN,EAAQt9B,KAAKgN,GAEjBmwB,EAAMn9B,KAAKgN,IAGf,OADAywB,IACOlR,GAEX0Q,EAAkB77B,UAAU48B,YAAc,SAAUhxB,GAChD,IAAIA,EAAMkxB,UAAalxB,EAAMgE,IAA7B,CAEA,IAAImtB,EAAW5+B,KAAK0U,OAAOuC,WAAW0F,MACtCiiB,EAASriB,KAAKqiB,EAASC,eAAer9B,OAAOiM,MAE1CiwB,EAlF2B,sbCQlCoB,EAA+B,WAE/B,SAASA,EAAcpqB,GACnB1U,KAAK0U,OAASA,EACd1U,KAAKgtB,OAAS,GAEdhtB,KAAK29B,UAAY,GACjB39B,KAAKy7B,QAAU,IAAI,IAAaz7B,KAAKgtB,QACrChtB,KAAK+7B,QAAU,IAAI,IAAa/7B,KAAKy7B,QAAS/mB,EAAOE,mBACrD5U,KAAK++B,WAAa,IAAI,IAAkBrqB,EAAQ1U,KAAKgtB,OAAQhtB,KAAK+7B,QAAS/7B,KAAK29B,WAChF39B,KAAKg/B,gBAmJT,OAhJAF,EAAcj9B,UAAUm9B,cAAgB,YAUvBh/B,KAAKi/B,MAAQj/B,KAAK++B,WAAWrlB,SATvB,CACflU,KAAM,GACNiM,IAAK,IACL+I,MAAO,KACPpM,OAAQ,CACJ,IAAK,CAAE5J,MAAO,KAAM0K,KAAM,OAAQye,SAAS,IAE/CgR,UAAU,KAGRvE,UAAY,MAGtB0E,EAAcj9B,UAAUqT,QAAU,WAC9B,IAAI/E,EAAQnQ,KACZA,KAAK++B,WAAW7pB,UAChBlV,KAAK29B,UAAY,GACjB39B,KAAK0Q,MAAM3P,SAAQ,SAAU0M,GAAS,OAAO0C,EAAMO,IAAIjD,IAAU0C,EAAMquB,WAAW/wB,OAgCtFqxB,EAAcj9B,UAAUq9B,gBAAkB,SAAUf,GAEhD,OADAn+B,KAAK29B,UAAUl9B,KAAK09B,GACb,YACH,QAAWn+B,KAAK29B,UAAhB,CAA2BQ,IAC7B76B,KAAKtD,OAWX8+B,EAAcj9B,UAAU+b,KAAO,WAC3B,OAAO5d,KAAKi/B,OAchBH,EAAcj9B,UAAU6X,SAAW,SAAUylB,GACzC,OAAOn/B,KAAK++B,WAAWrlB,SAASylB,IAGpCL,EAAcj9B,UAAUu9B,gBAAkB,SAAU3xB,GAChD,IAAI0C,EAAQnQ,KACRyb,EAAMzb,KAAK0Q,MAAM/B,KAAI,SAAUyO,GAAK,OAAOA,EAAEpJ,aAC7CqrB,EAAc,SAAUrS,GACxB,IAAIsS,EAAY7jB,EAAInS,QAAO,SAAU8T,GAAK,OAAqC,IAA9B4P,EAAO9e,QAAQkP,EAAEhD,WAClE,OAA4B,IAArBklB,EAAUlwB,OAAekwB,EAAYA,EAAUl9B,OAAOi9B,EAAYC,KAEzE12B,EAAWy2B,EAAY,CAAC5xB,IACxB8xB,EAAe,CAAC9xB,GAAOrL,OAAOwG,GAAUoX,UAW5C,OAVAuf,EAAax+B,SAAQ,SAAUksB,GAC3B,IAAI2R,EAAWzuB,EAAMuE,OAAOuC,WAAW0F,MAEvCiiB,EACKjiB,QACArT,QAAO,QAAO,QAAS2jB,IACvBlsB,SAAQ,SAAUwb,GAAQ,OAAOqiB,EAASY,WAAWjjB,aAEnDpM,EAAM6c,OAAOC,EAAOznB,SAExB+5B,GAWXT,EAAcj9B,UAAU28B,WAAa,SAAU/B,GAC3C,IAAIxP,EAASjtB,KAAK0Q,IAAI+rB,GACtB,IAAKxP,EACD,MAAM,IAAIxa,MAAM,sCAAwCgqB,GAC5D,IAAIgD,EAAqBz/B,KAAKo/B,gBAAgBnS,EAAOjZ,WAIrD,OAHAhU,KAAK29B,UAAU58B,SAAQ,SAAUo9B,GAC7B,OAAOA,EAAS,eAAgBsB,EAAmB9wB,KAAI,SAAUyO,GAAK,OAAOA,EAAE1P,YAE5E+xB,GAEXX,EAAcj9B,UAAU6O,IAAM,SAAU+rB,EAAaC,GACjD,IAAIvsB,EAAQnQ,KACZ,GAAyB,IAArBgC,UAAUoN,OACV,OAAOmE,OAAOC,KAAKxT,KAAKgtB,QAAQre,KAAI,SAAUnJ,GAAQ,OAAO2K,EAAM6c,OAAOxnB,GAAMkI,QACpF,IAAIgyB,EAAQ1/B,KAAKy7B,QAAQ3a,KAAK2b,EAAaC,GAC3C,OAAQgD,GAASA,EAAMhyB,MAAS,MAYpCoxB,EAAcj9B,UAAUiV,UAAY,SAAU6oB,EAAUC,GACpD,OAAO5/B,KAAK+7B,QAAQA,QAAQ4D,EAAUC,IAEnCd,EA7JuB,2SCsB9Be,EAA6B,WAe7B,SAASA,EAAYC,EAAgBC,EAAaC,EAASC,GACvDjgC,KAAK8/B,eAAiBA,EACtB9/B,KAAK+/B,YAAcA,EACnB//B,KAAK+/B,YAAcA,EACnB//B,KAAKggC,SAAU,QAAO,GAAIA,GAAW,IACrChgC,KAAKigC,UAAW,QAAO,GAAIA,GAAY,IACvCjgC,KAAKkgC,YAAcJ,EAAerE,QAAQ3a,KAAKif,EAAa//B,KAAKigC,SAASE,UAsF9E,OAnFAN,EAAYh+B,UAAU2D,KAAO,WACzB,OAAQxF,KAAKkgC,aAAelgC,KAAKkgC,YAAY16B,MAASxF,KAAK+/B,aAG/DF,EAAYh+B,UAAU4qB,WAAa,WAC/B,OAAOzsB,KAAK+/B,aAGhBF,EAAYh+B,UAAUuM,OAAS,WAC3B,OAAOpO,KAAKggC,SAGhBH,EAAYh+B,UAAU4W,OAAS,WAC3B,OAAOzY,KAAKkgC,aAGhBL,EAAYh+B,UAAU4L,MAAQ,WAC1B,OAAOzN,KAAKkgC,aAAelgC,KAAKkgC,YAAYxyB,MAGhDmyB,EAAYh+B,UAAU1B,QAAU,WAC5B,OAAOH,KAAKigC,UAGhBJ,EAAYh+B,UAAUu+B,OAAS,WAC3B,SAAUpgC,KAAKkgC,cAAelgC,KAAKkgC,YAAYxyB,OAGnDmyB,EAAYh+B,UAAUw+B,MAAQ,WAC1B,OAAQrgC,KAAKqF,SAGjBw6B,EAAYh+B,UAAUwD,MAAQ,WAC1B,IAAIq3B,EAAO18B,KAAKG,UAAUggC,SAC1B,IAAKngC,KAAKkgC,aAAiBxD,EAAM,CAC7B,IAAIF,EAAYE,EAAKl3B,KAAOk3B,EAAKl3B,KAAOk3B,EACxC,MAAO,sBAAwB18B,KAAKwF,OAAS,iBAAmBg3B,EAAY,IAEhF,OAAKx8B,KAAKkgC,YAELlgC,KAAKkgC,YAAYxyB,UAAtB,EACW,UAAY1N,KAAKwF,OAAS,8BAF1B,kBAAoBxF,KAAKwF,OAAS,KAIjDq6B,EAAYh+B,UAAUiT,SAAW,WAC7B,MAAO,IAAM9U,KAAKwF,OAAS,KAAM,QAAUxF,KAAKoO,WAQpDyxB,EAAYh+B,UAAUy+B,UAAY,SAAU7yB,GACxC,OAAO,IAAIoyB,EAAY7/B,KAAK8/B,eAAgBryB,EAAOzN,KAAKggC,QAAShgC,KAAKigC,WAS1EJ,EAAYh+B,UAAU0+B,WAAa,SAAUnyB,EAAQ2G,QACjC,IAAZA,IAAsBA,GAAU,GACpC,IAAI8d,EAAY9d,EAAU3G,GAAS,QAAO,GAAIpO,KAAKggC,QAAS5xB,GAC5D,OAAO,IAAIyxB,EAAY7/B,KAAK8/B,eAAgB9/B,KAAK+/B,YAAalN,EAAW7yB,KAAKigC,WASlFJ,EAAYh+B,UAAU2+B,YAAc,SAAUrgC,EAAS4U,QACnC,IAAZA,IAAsBA,GAAU,GACpC,IAAI0rB,EAAU1rB,EAAU5U,GAAU,QAAO,GAAIH,KAAKigC,SAAU9/B,GAC5D,OAAO,IAAI0/B,EAAY7/B,KAAK8/B,eAAgB9/B,KAAK+/B,YAAa//B,KAAKggC,QAASS,IAGhFZ,EAAYa,MAAQ,SAAUzmB,GAC1B,OAAOA,GAAOA,EAAIxM,SAAU,QAASwM,EAAIxM,SAAW,QAASwM,EAAIxM,SAAU,QAASwM,EAAIxM,MAAMjI,QAE3Fq6B,EA3GqB,iYCf5Bc,EAA6B,WAC7B,SAASA,EAAY1U,GACjBjsB,KAAKisB,WAAaA,EA2EtB,OAzEA0U,EAAY9+B,UAAU++B,mBAAqB,SAAUC,GACjD,IAAI1wB,EAAQnQ,KAEZ,OADmBA,KAAKisB,WAAWvX,OAAOoY,kBACtB9iB,WACf82B,WAAWD,GACXlyB,KAAI,SAAUO,GAAQ,OAAOiB,EAAM4wB,WAAW7xB,MAC9CN,OAAO,KAAS,IAChBtF,OAAO,OAWhBq3B,EAAY9+B,UAAUk/B,WAAa,SAAUC,GACzC,IAAI/U,EAAajsB,KAAKisB,WAClBvd,EAAcud,EAAWvd,cAEzBuyB,EAAgBjhC,KAAKkhC,iBAAiBF,EAAUtyB,EAAaud,GACjE,IAAKgV,EACD,MAAO,GACX,IA4DWE,EA5DPC,EAAkB,CAClBnV,WAAYA,EACZnG,QAASmG,EAAW9rB,UAAU2lB,SAkBlC,OAAOmb,EACFtyB,KAjBqB,SAAUkF,GAMhC,OAJcA,EAAKqP,QAAQxU,EAAaud,GAEZ+U,EAASK,kBAAkB77B,MAElCmJ,KAAI,SAAUJ,GAC/B,IAAI0xB,GAAW,QAAO,CAClB38B,KAAMuQ,EAAKvQ,KACXg+B,UAAW,CAAEN,SAAUA,EAASx7B,KAAMqL,QAAStC,IAChD6yB,GACC3zB,EAAQuzB,EAASK,kBAAkBv+B,QAAU,UAA4ByL,EAAKd,MAAMC,KAAO,KAC3F6zB,EAAiB,IAAI,IAAetV,EAAYxe,EAAOoG,EAAMosB,GACjE,MAAO,CAAEpsB,KAAMA,EAAMtF,KAAMA,EAAMgzB,eAAgBA,SAKpD3yB,OAAO,KAAS,IAChB4c,MAqCM2V,EArCSH,EAASQ,iBAsCR,IAArBL,IAA+BA,GAAmB,GAC/C,SAA+B1O,EAAGlV,GACrC,IAAIkkB,EAASN,GAAoB,EAAI,EACjCO,GAAcjP,EAAElkB,KAAKd,MAAMtF,KAAKiH,OAASmO,EAAEhP,KAAKd,MAAMtF,KAAKiH,QAAUqyB,EACzE,OAAsB,IAAfC,EAAmBA,EAAankB,EAAE1J,KAAKzM,SAAWqrB,EAAE5e,KAAKzM,YAzC3DuH,KAAI,SAAU8E,GAAS,OAAOA,EAAM8tB,mBAa7CZ,EAAY9+B,UAAUq/B,iBAAmB,SAAUF,EAAUtyB,EAAaud,GACtE,IAAI0V,EAAWX,EAASY,YAAc,WAElC/6B,EAAe7G,KAAKisB,WAAWvX,OAAOoY,kBAE1C,OADiB6U,EAAW,CAAC96B,GAAgB,CAAC7G,KAAKisB,WAAYplB,IAE1D8H,KAAI,SAAUkzB,GAAO,OAAOA,EAAIC,SAASd,EAASx7B,SAClD8D,QAAO,QAAgB,KAAS,uBAAyB03B,EAASx7B,OAClEoJ,OAAO,KAAS,IAChBtF,QAAO,SAAUuK,GAAQ,OAAOA,EAAKqP,QAAQxU,EAAaud,OAE5D0U,EA7EqB,+PCDzB,SAASoB,EAAWt0B,EAAOu0B,EAAW/V,GACzC,IAAIgW,GAAU,QAASD,GAAa,CAACA,GAAaA,EAYlD,UADe,QAAWC,GAAWA,EAVrC,SAAoBhV,GAEhB,IADA,IAAIiV,EAAcD,EACT5kB,EAAI,EAAGA,EAAI6kB,EAAY9yB,OAAQiO,IAAK,CACzC,IAAIwF,EAAO,IAAI,KAAKqf,EAAY7kB,IAChC,GAAKwF,GAAQA,EAAKK,QAAQ+J,EAAOznB,QAAYqd,GAAQqf,EAAY7kB,KAAO4P,EAAOznB,KAC3E,OAAO,EAGf,OAAO,IAGMiI,EAAOwe,GAK5B,IAAIkW,EAAgC,WAChC,SAASA,EAAeC,EAASC,EAAW7hC,EAAU8hC,EAAeC,EAAwBpiC,QACzE,IAAZA,IAAsBA,EAAU,IACpCH,KAAKoiC,QAAUA,EACfpiC,KAAKqiC,UAAYA,EACjBriC,KAAKQ,SAAWA,EAChBR,KAAKsiC,cAAgBA,EACrBtiC,KAAKuiC,uBAAyBA,EAC9BviC,KAAKwiC,YAAc,EACnBxiC,KAAKyiC,eAAgB,EACrBziC,KAAKoH,SAAWjH,EAAQiH,UAAY,EACpCpH,KAAKsD,KAAOnD,EAAQmD,MAAQ,KAC5BtD,KAAK0iC,YAAcviC,EAAQuiC,YAqF/B,OApEAP,EAAetgC,UAAU8gC,eAAiB,SAAUC,EAAOZ,EAAW/V,GAClE,IAAkB,IAAd+V,EACA,OAAOY,EACX,IAAIpN,EAAWoN,EAAMt5B,QAAO,SAAUiF,GAAQ,OAAOwzB,EAAWxzB,EAAKd,MAAOu0B,EAAW/V,MACvF,OAAOuJ,EAASpmB,OAASomB,EAAW,MAgBxC2M,EAAetgC,UAAUghC,yBAA2B,WAChD,OAAO,QAAO7iC,KAAKoiC,QAAQp4B,WAAW84B,iBAAiB,WAAc,OAAO,MAiBhFX,EAAetgC,UAAUkhC,kBAAoB,SAAUr0B,EAAaud,GAChE,IAAI9b,EAAQnQ,KACR8P,GAAW,QAAO9P,KAAK6iC,2BAA4B7iC,KAAKsiC,eAE5D,OADY,QAAOtiC,KAAKoiC,QAAQp4B,WAAW84B,iBAC9Bl0B,QAAO,SAAUo0B,EAAIC,GAG9B,IAAIC,EAAcD,EAASngC,QAAU,UACjCqF,EAAOuG,EAAYu0B,EAASz9B,OAAS,GACrCo9B,EAAQM,EAAc/6B,EAAO,EAAC,QAAKA,IAEvC,OADA66B,EAAGC,EAASz9B,MAAQ2K,EAAMwyB,eAAeC,EAAO9yB,EAASmzB,EAASz9B,MAAOymB,GAClE+W,IACR,KAQPb,EAAetgC,UAAUqhB,QAAU,SAAUxU,EAAaud,GACtD,IAAI/I,EAAUljB,KAAK+iC,kBAAkBr0B,EAAaud,GAGlD,OADiB,QAAO/I,GAASigB,MAAM,MACnBjgB,EAAU,MAElCif,EAAetgC,UAAU28B,WAAa,WAClCx+B,KAAKuiC,uBAAuBviC,MAC5BA,KAAKyiC,eAAgB,GAElBN,EAjGwB,GAqG5B,SAASiB,EAAUtP,EAAUhH,EAAmBuV,GAEnD,IACIgB,GADoBvP,EAASwP,iBAAmBxP,EAASwP,kBAAoB,IACnDjB,EAAU78B,MAAQ,GAC5C+9B,GAAe,QAAWF,GAG9B,SAASG,EAAmBC,EAAajjC,EAAUL,QAC/B,IAAZA,IAAsBA,EAAU,IACpC,IAAI6pB,EAAiB,IAAImY,EAAerV,EAAmBuV,EAAW7hC,EAAUijC,EAAaF,EAAcpjC,GAE3G,OADAkjC,EAAM5iC,KAAKupB,GACJA,EAAewU,WAAWl7B,KAAK0mB,GAE1C,OAPA8J,EAASuO,EAAU78B,MAAQg+B,EAOpBA,2FCpJX,IAAIE,EAQAC,2BAPJ,SAAWD,GACPA,EAAoBA,EAA4B,OAAI,GAAK,SACzDA,EAAoBA,EAA4B,OAAI,GAAK,SACzDA,EAAoBA,EAAyB,IAAI,GAAK,MACtDA,EAAoBA,EAA6B,QAAI,GAAK,UAC1DA,EAAoBA,EAA2B,MAAI,GAAK,QAL5D,CAMGA,IAAwBA,EAAsB,KAEjD,SAAWC,GACPA,EAAoBA,EAAgC,WAAI,GAAK,aAC7DA,EAAoBA,EAA2B,MAAI,GAAK,QAF5D,CAGGA,IAAwBA,EAAsB,8HCP7CC,2LACJ,SAAWA,GAOPA,EAAWA,EAAuB,WAAI,GAAK,aAM3CA,EAAWA,EAAoB,QAAI,GAAK,UAMxCA,EAAWA,EAAoB,QAAI,GAAK,UAWxCA,EAAWA,EAAoB,QAAI,GAAK,UAMxCA,EAAWA,EAAkB,MAAI,GAAK,QApC1C,CAqCGA,IAAeA,EAAa,KAG/B,IAAIv4B,EAAK,EACLw4B,EAA2B,WAC3B,SAASA,EAAU30B,EAAM40B,EAASC,GAE9B/jC,KAAKmb,IAAM9P,IACXrL,KAAKkP,KAAOA,EACZlP,KAAK8jC,QAAUA,EACf9jC,KAAK+jC,OAASA,EA4DlB,OAzDAF,EAAUG,mBAAqB,SAAU/pB,GACrC,OAAOA,GAA2B,mBAAbA,EAAIlP,OAAuB,IAAAmO,IAAG2qB,EAAH,CAAc5pB,EAAIyN,uBAGtEmc,EAAUI,WAAa,SAAUF,EAAQ5jC,GACrC,IACI+jC,EAAY,IAAIL,EAAUD,EAAWO,WAD3B,+DACgDJ,GAI9D,OAHI5jC,GAAWA,EAAQikC,aACnBF,EAAUE,YAAa,GAEpBF,GAGXL,EAAUO,WAAa,SAAUL,GAC7B,OAAOF,EAAUI,WAAWF,EAAQ,CAAEK,YAAY,KAGtDP,EAAUQ,QAAU,SAAUN,GAE1B,OAAO,IAAIF,EAAUD,EAAWU,QADlB,6BACoCP,IAGtDF,EAAUzK,QAAU,SAAU2K,GAE1B,OAAO,IAAIF,EAAUD,EAAWW,QADlB,6BACoCR,IAGtDF,EAAUW,QAAU,SAAUT,GAE1B,OAAO,IAAIF,EAAUD,EAAWa,QADlB,kCACoCV,IAGtDF,EAAUa,QAAU,SAAUX,GAE1B,OAAO,IAAIF,EAAUD,EAAWe,MADlB,yBACkCZ,IAWpDF,EAAUe,UAAY,SAAUb,GAC5B,OAAO,IAAA7qB,IAAG2qB,EAAH,CAAcE,GAAUA,EAASF,EAAUa,QAAQX,IAE9DF,EAAUhiC,UAAUiT,SAAW,WAC3B,IAA6BqkB,EACzB4K,GADyB5K,EACHn5B,KAAK+jC,SADgB5K,EAAErkB,WAAavB,OAAO1R,UAAUiT,SAAWqkB,EAAErkB,YAAa,QAAUqkB,GAE/G9N,EAAKrrB,KACT,MAAO,6BADcqrB,EAAGlQ,IACoB,UADRkQ,EAAGnc,KACwB,cADRmc,EAAGyY,QAC+B,aAAeC,EAAS,KAErHF,EAAUhiC,UAAUgjC,UAAY,WAC5B,OAAO,SAAO,QAAgB7kC,MAAO,CAAE0nB,qBAAsB1nB,QAE1D6jC,EAlEmB,oMC1C1BiB,EAEA,SAA6Bt/B,EAAMo8B,EAAWmD,EAAW1D,EAAmBG,EAAawD,EAAkBC,EAAiBC,QACpG,IAAhB1D,IAA0BA,GAAc,QACnB,IAArBwD,IAA+BA,EAAmB,wBAC9B,IAApBC,IAA8BA,EAAkB,uBAChC,IAAhBC,IAA0BA,GAAc,GAC5CllC,KAAKwF,KAAOA,EACZxF,KAAK4hC,UAAYA,EACjB5hC,KAAK+kC,UAAYA,EACjB/kC,KAAKqhC,kBAAoBA,EACzBrhC,KAAKwhC,YAAcA,EACnBxhC,KAAKglC,iBAAmBA,EACxBhlC,KAAKilC,gBAAkBA,EACvBjlC,KAAKklC,YAAcA,gsBCVvBC,EAAiB,CACjBrf,QAAS,KACTmG,WAAY,KACZqV,UAAW,GACXh+B,KAAM,MAEN8hC,EAAgC,WAChC,SAASA,EAAenZ,EAAYoZ,EAAcrb,EAAgB7pB,GAC9D,IAAIgQ,EAAQnQ,KACZA,KAAKisB,WAAaA,EAClBjsB,KAAKqlC,aAAeA,EACpBrlC,KAAKgqB,eAAiBA,EACtBhqB,KAAKG,QAAUA,EACfH,KAAKslC,aAAe,WAAc,OAAOn1B,EAAMjB,KAAK0yB,YAAc,UAA4BzxB,EAAMhQ,QAAQ8rB,WAAWsZ,YACvHvlC,KAAKG,SAAU,QAASA,EAASglC,GACjCnlC,KAAKkP,KAAO8a,EAAeqY,UAyK/B,OArJA+C,EAAenJ,MAAQ,SAAUoH,EAAOmC,GAGpC,OAAOnC,EAAMz0B,QADU,SAAU8vB,EAAM+G,GAAY,OAAO/G,EAAK3zB,MAAK,WAAc,OAAO06B,EAASC,kBAC5DF,GAAW,gBAarDJ,EAAeO,YAAc,SAAUtC,EAAOuC,GAC1C,IAAK,IAAI32B,EAAM,EAAGA,EAAMo0B,EAAMj0B,OAAQH,IAAO,CACzC,IAAIib,EAAamZ,EAAMp0B,GAAKy2B,aAC5B,IAAI,QAAUxb,GAAa,CACvB,IAAI2b,EAAiBxC,EAAMvhC,MAAMmN,EAAM,GACvC,OAAOm2B,EAAenJ,MAAM4J,EAAgB3b,GAAYnf,KAAK66B,IAGrE,OAAOA,KAKXR,EAAeU,YAAc,SAAUzC,GACnCA,EAAMtiC,SAAQ,SAAU8S,GAAQ,OAAOA,EAAK6xB,iBAEhDN,EAAevjC,UAAUkkC,SAAW,SAAU7Y,GAC1CltB,KAAKisB,WAAWvX,OAAOmC,aAAamvB,qBAApChmC,CAA0DktB,IAE9DkY,EAAevjC,UAAU6jC,WAAa,WAClC,IAAIv1B,EAAQnQ,KACR6T,EAAO7T,KAAKgqB,eAChB,IAAInW,EAAK4uB,cAAT,CAEA,IAAIwD,EAAajmC,KAAKkmC,yBACtB,GAAID,EACA,OAAOA,EACX,IAAI9lC,EAAUH,KAAKG,QACnB,yBAA0BH,KAAMA,KAAKisB,WAAY9rB,GACjD,IAEIgmC,EAAc,SAAUjZ,GAAO,OAAOrZ,EAAKwuB,UAAU4C,gBAAgB90B,EAA/B0D,CAAsCqZ,IAC5EkZ,EAAe,SAAU9/B,GAAU,OAAOuN,EAAKwuB,UAAU2C,iBAAiB70B,EAAhC0D,CAAuCvN,IACrF,IACI,IAAIA,EALkCuN,EAAKrT,SAASuB,KAAK5B,EAAQmD,KAAM6M,EAAM8b,WAAY9b,EAAMk1B,cAM/F,OAAKrlC,KAAKkP,KAAKg2B,cAAe,QAAU5+B,GAC7BA,EAAO+b,OANH,SAAU6K,GAAO,OAAO,cAAoBA,GAAK2X,eAM1B95B,KAAKq7B,EAAcD,GAG9CC,EAAa9/B,GAG5B,MAAO4mB,GAEH,OAAOiZ,EAAY,cAAoBjZ,IAE3C,QACQrZ,EAAK6uB,eAAiB7uB,EAAK2uB,aAAe3uB,EAAK6uB,aAC/C7uB,EAAK2qB,gBAajB4G,EAAevjC,UAAUwkC,iBAAmB,SAAU//B,GAClD,IAAI6J,EAAQnQ,KAEZ,OADiBA,KAAKkmC,4BAIlB,QAAU5/B,GAEHA,EAAOyE,MAAK,SAAU/G,GAAO,OAAOmM,EAAMk2B,iBAAiBriC,OAEtE,qBAAsBsC,EAAQtG,KAAKisB,WAAYjsB,KAAKG,UAErC,IAAXmG,EAEO,YAAkB,2BAA2Bu+B,aAEpC,IAAA3rB,IAAG,IAEnBotB,CAAchgC,GAEP,eAAqBA,GAAQu+B,iBAFxC,KASJO,EAAevjC,UAAUqkC,uBAAyB,WAC9C,IAAIxxB,EAAS1U,KAAKisB,WAAWvX,OAE7B,OAAIA,EAAOqkB,UACA,YAAkB,sBAAwBrkB,EAAOyG,IAAM,gCAAgC0pB,YAE9F7kC,KAAKisB,WAAWsa,SACT,cAAoB1B,YAI3B7kC,KAAKslC,eAEE,eAAqBtlC,KAAKG,QAAQ2lB,WAAW+e,iBAFxD,GAKJO,EAAevjC,UAAUiT,SAAW,WAChC,IAAe3U,EAANH,KAAmBG,QAAS6pB,EAA5BhqB,KAAgDgqB,eACrDzpB,GAAQ,QAAM,qBAAN,CAA4BJ,IAAY,WAAY0Q,GAAU,QAAM,+BAAN,CAAsC1Q,KAAY,QAAM,oBAAN,CAA2BA,IAAY,UAAWqF,GAAO,QAAWwkB,EAAexpB,UAC/M,OAAOD,EAAQ,aAAesQ,EAAU,MAAO,QAAU,IAAKrL,IAMlE4/B,EAAeoB,cAAgB,SAAU3yB,GAAQ,OAAO,SAAUvN,GAC9D,OAAOuN,EAAKwyB,iBAAiB//B,KAMjC8+B,EAAeqB,oBAAsB,SAAU5yB,GAAQ,OAAO,SAAUvN,IACpE,QAAUA,IAAWA,EAAO+b,OAAM,SAAU6K,GAAO,OAAOrZ,EAAKkyB,SAAS,cAAoB7Y,SAOhGkY,EAAesB,UAAY,SAAU7yB,GAAQ,OAAO,SAAUxO,GAAS,OAAOwO,EAAKkyB,SAAS1gC,KAC5F+/B,EAAeuB,aAAe,SAAU9yB,GAAQ,OAAO,SAAUxO,GAAS,OAAO,QAAgBA,KACjG+/B,EAAewB,YAAc,SAAU/yB,GAAQ,OAAO,SAAUxO,GAC5D,MAAMA,IAEH+/B,EAlLwB,qgBCXnC,SAASyB,EAAmBj3B,GACxBA,EAAMk3B,cAAc,cAAoB,IAAUl3B,EAAM8E,QAAS,IACjE9E,EAAMk3B,cAAc,cAAoB,IAAYl3B,GAAQ,IAC5DA,EAAMk3B,cAAc,cAAoB,eAAgBl3B,GAAQ,IAChEA,EAAMk3B,cAAc,cAAoB,eAAgBl3B,EAAMxB,UAAW,IACzEwB,EAAMuc,WAAWprB,SAAQ,SAAU0M,GAC/BmC,EAAMk3B,cAAc,cAAoB,UAAWr5B,GAAQA,MAG5D,IAGHs5B,EAAoB,CAAC,eAAgB,KACrCC,GAAe,QAAQD,GAKhBE,EAAqB,SAAUr3B,GACtC,IAAIgzB,GAAQ,QAAOhzB,EAAMlB,eAAeE,OAAO,KAAS,IAAIA,OAAO,KAAO,IAEtEs4B,EAA4B,SAAU3pB,GACtC,OAAOypB,EAAazpB,EAAEgE,OAAS,cAAoBhE,EAAEgE,MAAO,MAAQhE,GAExEqlB,EAAM7hC,SAAQ,SAAUwN,GACpBA,EAAKwJ,YAAcxJ,EAAKwJ,YAAYpJ,IAAIu4B,+MCnB5CC,EAAiB,SAAUv3B,GAC3B,IAAIw3B,EAAWx3B,EAAMuf,KAAKkY,WAC1B,GAAKD,EAAL,CAEA,IAAI3uB,EAAS7I,EAAM8E,OAAOmC,aAW1B,OAAI,QAAWuwB,GACJ,YAAiBA,EAASx3B,IAAQ7E,KAAKq7B,GAE3CA,EAAagB,GAbpB,SAAShB,EAAa9/B,GAClB,GAAKA,EAEL,OAAIA,aAAkB,IACXA,GACP,QAASA,GACFmS,EAAOpS,OAAOC,EAAQsJ,EAAMxB,SAAUwB,EAAMzP,WACnDmG,EAAc,OAAKA,EAAe,OAC3BmS,EAAOpS,OAAOC,EAAc,OAAKsJ,EAAMuf,KAAM7oB,EAAe,QAAKsJ,EAAMxB,SAAUwB,EAAMzP,gBADlG,IChBR,SAASmnC,EAAwB3zB,GAC7B,OAAO,SAAUsY,EAAYxe,GAGzB,OAAO85B,EAFM95B,EAAMuG,UACCL,IACNsY,EAAYxe,IAYlC,IAAI+5B,EAAaF,EAAwB,UAarCG,EAAeH,EAAwB,YAavCI,EAAcJ,EAAwB,2MC7C/BK,EAAwB,IAU/BC,EAAmB,SAAUh4B,GAC7B,OAAO,IAAI,IAAeA,EAAMlB,cAAcygB,IAAIuI,YAAY,QAAS9nB,GAAO7E,KAAK,OAcnF88B,EAAmB,SAAUj4B,EAAOnC,GACpC,OAAO,IAAI,IAAemC,EAAMlB,cAAcygB,IAAIpb,WAAWtG,EAAMuG,WAAW0jB,YAAY,OAAQ9nB,GAAO7E,KAAK,OAe9G+8B,EAAmB,SAAUl4B,GAC7B,OAAO,IAAI,IAAeA,EAAMlB,cAAcygB,IAAIuI,YAAY,OAAQ9nB,GAAO7E,KAAK,OCnClFg9B,EAAoB,SAAU9b,GAC9B,IAAIllB,EAAK,OACLihC,EAAgB/b,EAAWzR,MAAM,YACrC,GAAKwtB,EAAc54B,OAEnB,OAAOrI,EAAG0U,IAAIusB,EAAcr5B,KAAI,SAAUmL,GAAQ,OAAO/S,EAAGkJ,KAAK6J,EAAKuB,YAAatQ,KAAK,OAexFk9B,EAAgB,SAAUhc,GAC1B,IAAI+b,EAAgB/b,EAAWzR,MAAM,YACjC0tB,EAAejc,EAAWzR,MAAM,WACpC,GAAKwtB,EAAc54B,QAAW84B,EAAa94B,OAA3C,CAEA,IAAItI,EAAQmlB,EAAWvX,OAAOqC,YAC9BmxB,EAAannC,SAAQ,SAAUonC,GAAM,OAAOrhC,EAAMshC,qBAAqBD,MACvEH,EAAcjnC,SAAQ,SAAUonC,GAAM,OAAOrhC,EAAMuhC,mBAAmBF,MACtErhC,EAAM8lB,SCzBN0b,EAAoB,SAAU14B,GAC9B,IAAI0I,EAAU1I,EAAM8E,OAAO4D,QAOvBiwB,EAAyB,WAErBjwB,EAAQ2T,aAAerc,IACvB0I,EAAQ2T,WAAa,OAE7Brc,EAAM7B,UAAU,IAXW,WACvBuK,EAAQ0T,sBAAsBxG,QAAQ5V,GACtC0I,EAAQwa,SAAWljB,EAAMmjB,MACzBza,EAAQwN,QAAUxN,EAAQwa,SAASplB,MACnC,QAAKkC,EAAMxB,SAAUkK,EAAQlK,UAOS,CAAEhH,SAAU,MACtDwI,EAAMnM,QAAQsH,KAAKw9B,EAAwBA,ICtB3CC,EAAY,SAAUvc,GACtB,IAAI9rB,EAAU8rB,EAAW9rB,UACrBsY,EAASwT,EAAWvX,OAAOmC,aAC3B6B,EAAauT,EAAWvX,OAAOyH,UAKnC,GAAuB,QAAnBhc,EAAQ4e,QAAoB5e,EAAQ0V,UAAY4C,EAAOqa,SAASsH,UAAW,CAC3E,IAAIqO,EAAa,CAAE1zB,QAA8B,YAArB5U,EAAQ0V,UACpC6C,EAAWjY,KAAKgY,EAAOqa,SAASsH,UAAU3oB,IAAKgH,EAAOrK,OAAQq6B,GAElE/vB,EAAW0D,QAAO,kWCPtB,SAASssB,EAAY94B,GACjB,IAAI+4B,EAAgB/4B,EAAMg5B,iBAC1B,GAAKD,EAAL,CAEAtgC,EAAA,0BAA6BuH,GAC7B,IAAIi5B,EAAUj5B,EAAM8E,OAAO4D,QAAQ2T,WAOnC,MAHsB,kBAAlB0c,GAAqCE,GACrCA,EAAQC,QAEL,cAAoBjE,aCf/B,SAASkE,EAAsBn5B,GAC3B,IAAKA,EAAMywB,QACP,MAAM,IAAI5tB,MAAM7C,EAAMvK,QAAQyP,YAG/B,ICaIk0B,EAAmB,CAC1BnzB,UAAU,EACVsqB,SAAU,KACV/gB,SAAS,EACT6pB,QAAQ,EACRC,QAAQ,EACRC,WAAW,EACXC,OAAQ,GACRtjB,QAAS,WAAc,OAAO,MAC9B/G,OAAQ,WAaRsqB,EAAmC,WAEnC,SAASA,EAAkBC,GAEvBtpC,KAAKupC,iBAAmB,EAExBvpC,KAAKwpC,YAAc,GAEnBxpC,KAAKsjC,iBAAmB,GAExBtjC,KAAKypC,eAAiB,GACtBzpC,KAAKspC,QAAUA,EACftpC,KAAK8G,MAAQwiC,EAAQvyB,YACrB/W,KAAK0pC,mBAAqB,GAC1B1pC,KAAKgK,YAAc,SAAqB,QAAIhK,MAAO,IAAI,QAAIA,MAAO,CAC9D,kBACA,eACA,gBACA,aACA,aAEJA,KAAK2pC,mBACL3pC,KAAK4pC,oBACL5pC,KAAK6pC,+BACLP,EAAQhxB,QAAQ0T,sBAAsBzG,QAAQ0hB,GAuLlD,OA9JAoC,EAAkBxnC,UAAUioC,SAAW,SAAUh6B,EAAUtP,EAAUL,KAIrEkpC,EAAkBxnC,UAAUkO,SAAW,SAAUD,EAAUtP,EAAUL,KAIrEkpC,EAAkBxnC,UAAUkoC,QAAU,SAAUj6B,EAAUtP,EAAUL,KAIpEkpC,EAAkBxnC,UAAUmoC,OAAS,SAAUl6B,EAAUtP,EAAUL,KAInEkpC,EAAkBxnC,UAAUooC,SAAW,SAAUn6B,EAAUtP,EAAUL,KAIrEkpC,EAAkBxnC,UAAUqoC,QAAU,SAAUp6B,EAAUtP,EAAUL,KAIpEkpC,EAAkBxnC,UAAUsoC,SAAW,SAAUr6B,EAAUtP,EAAUL,KAIrEkpC,EAAkBxnC,UAAUkM,UAAY,SAAU+B,EAAUtP,EAAUL,KAItEkpC,EAAkBxnC,UAAUuoC,QAAU,SAAUt6B,EAAUtP,EAAUL,KAOpEkpC,EAAkBxnC,UAAUqT,QAAU,SAAUR,IAC5C,QAAO1U,KAAKsjC,kBAAkBviC,SAAQ,SAAUspC,GAC5C,OAAOA,EAAWtpC,SAAQ,SAAU8S,GAChCA,EAAK4uB,eAAgB,GACrB,QAAW4H,EAAYx2B,UAenCw1B,EAAkBxnC,UAAUL,OAAS,SAAUyyB,EAAUzH,GACrD,OAAO,IAAI,IAAWyH,EAAUzH,EAAaxsB,KAAKspC,UAGtDD,EAAkBxnC,UAAU+nC,kBAAoB,WAC5C,IAAIU,EAAQ,IACRC,EAAK,IACLC,EAAQxqC,KAAKypC,eACbgB,GAAc,EACdC,GAAc,EAClB1qC,KAAK2qC,aAAa,WAAYL,EAAMM,OAAQ,EAAGJ,EAAMrb,GAAIsb,EAAaF,EAAG9D,oBAAqB8D,EAAG3D,YAAa8D,GAC9G1qC,KAAK2qC,aAAa,WAAYL,EAAMO,OAAQ,EAAGL,EAAMrb,IACrDnvB,KAAK2qC,aAAa,UAAWL,EAAMQ,IAAK,EAAGN,EAAMrb,IACjDnvB,KAAK2qC,aAAa,SAAUL,EAAMQ,IAAK,IAAKN,EAAMv8B,SALV,GAMxCjO,KAAK2qC,aAAa,WAAYL,EAAMQ,IAAK,IAAKN,EAAMrV,UACpDn1B,KAAK2qC,aAAa,UAAWL,EAAMQ,IAAK,IAAKN,EAAMre,UACnDnsB,KAAK2qC,aAAa,WAAYL,EAAMQ,IAAK,IAAKN,EAAMrb,IACpDnvB,KAAK2qC,aAAa,YAAaL,EAAMS,QAAS,EAAGP,EAAMrb,GAAIsb,EAAaF,EAAG9D,oBAAqB8D,EAAG7D,UAAWgE,GAC9G1qC,KAAK2qC,aAAa,UAAWL,EAAM3F,MAAO,EAAG6F,EAAMrb,GAAIsb,EAAaF,EAAG9D,oBAAqB8D,EAAG7D,UAAWgE,IAG9GrB,EAAkBxnC,UAAU8nC,iBAAmB,WAC3C,IAAIqB,EAAQ,UAA2BrhB,EAAa,eACpD3pB,KAAKirC,gBAAgB,KAAMthB,GAC3B3pB,KAAKirC,gBAAgB,OAAQthB,GAC7B3pB,KAAKirC,gBAAgB,UAAWD,GAChChrC,KAAKirC,gBAAgB,WAAYD,GACjChrC,KAAKirC,gBAAgB,WAAYD,IAGrC3B,EAAkBxnC,UAAU8oC,aAAe,SAAUnlC,EAAMo8B,EAAWmD,EAAW1D,EAAmBG,EAAawD,EAAkBC,EAAiBC,QAC5H,IAAhB1D,IAA0BA,GAAc,QACnB,IAArBwD,IAA+BA,EAAmB,wBAC9B,IAApBC,IAA8BA,EAAkB,uBAChC,IAAhBC,IAA0BA,GAAc,GAC5C,IAAI7C,EAAY,IAAI,IAAoB78B,EAAMo8B,EAAWmD,EAAW1D,EAAmBG,EAAawD,EAAkBC,EAAiBC,GACvIllC,KAAKwpC,YAAY/oC,KAAK4hC,IACtB,QAAUriC,KAAMA,KAAMqiC,IAG1BgH,EAAkBxnC,UAAUi/B,WAAa,SAAUD,GAI/C,QAH0B,QAAUA,GAC9B7gC,KAAKwpC,YAAYlgC,QAAO,SAAU4F,GAAQ,OAAOA,EAAK0yB,YAAcf,KACpE7gC,KAAKwpC,YAAY1nC,SACI0pB,MAAK,SAAUiH,EAAGlV,GACzC,IAAI2tB,EAAazY,EAAEmP,UAAYrkB,EAAEqkB,UACjC,OAAsB,IAAfsJ,EAAmBzY,EAAEsS,UAAYxnB,EAAEwnB,UAAYmG,MAgB9D7B,EAAkBxnC,UAAUopC,gBAAkB,SAAUzlC,EAAM2lC,GAC1DnrC,KAAKypC,eAAejkC,GAAQ,CAAEA,KAAMA,EAAM1C,MAAOqoC,IAIrD9B,EAAkBxnC,UAAUihC,cAAgB,WACxC,OAAO9iC,KAAKypC,gBAGhBJ,EAAkBxnC,UAAUigC,SAAW,SAAUnuB,GAC7C,OAAO3T,KAAKsjC,iBAAiB3vB,IAGjC01B,EAAkBxnC,UAAUgoC,6BAA+B,WACvD,IAAIuB,EAAMprC,KAAK0pC,mBACf0B,EAAIC,gBAA6CrrC,KTzN5B8pC,SAAS,GAAIjD,GS0NlCuE,EAAIhS,QAAwCp5B,KF/MvB+P,SAAS,GAAI24B,EAAa,CAAEthC,UAAW,OEgN5DgkC,EAAI/G,QD7N+B,SAAUvX,GACjD,OAAOA,EAAkB/c,SAAS,GAAIg5B,EAAuB,CAAE3hC,UAAW,MC4NxDkkC,CAA8BtrC,MAE5CorC,EAAI/D,WR7MwB,SAAUva,GAC1C,OAAOA,EAAkBid,QAAQ,CAAE5a,GAAI,SAAU1hB,GAAS,QAASA,EAAM45B,aAAiBF,GQ4MrEoE,CAAuBvrC,MAExCorC,EAAIpB,OPtNoB,SAAUld,GACtC,OAAOA,EAAkBkd,OAAO,CAAE/7B,QAAS,SAAUR,GAAS,QAASA,EAAMu8B,SAAaxC,GOqNzEgE,CAAmBxrC,MAChCorC,EAAInB,SP1MsB,SAAUnd,GACxC,OAAOA,EAAkBmd,SAAS,CAAE9U,SAAU,SAAU1nB,GAAS,QAASA,EAAMw8B,WAAexC,GOyM5EgE,CAAqBzrC,MACpCorC,EAAIlB,QP9LqB,SAAUpd,GACvC,OAAOA,EAAkBod,QAAQ,CAAE/d,SAAU,SAAU1e,GAAS,QAASA,EAAMy8B,UAAcxC,GO6L3EgE,CAAoB1rC,MAElCorC,EAAIO,aNjO0B,SAAU7e,GAC5C,OAAOA,EAAkBid,QAAQ,GAAInC,EAAkB,CAAExgC,SAAUugC,IMgO5CiE,CAAyB5rC,MAC5CorC,EAAIS,YNnN0B,SAAU/e,GAC5C,OAAOA,EAAkBod,QAAQ,CAAE/d,UAAU,SAAI,IAAS0b,EAAkB,CAAEzgC,SAAUugC,IMkNlEmE,CAAyB9rC,MAC3CorC,EAAIW,WNpM0B,SAAUjf,GAC5C,OAAOA,EAAkBqd,SAAS,GAAIrC,EAAkB,CAAE1gC,SAAUugC,IMmM/CqE,CAAyBhsC,MAE1CorC,EAAIa,ULpO2B,SAAUnf,GAC7C,OAAOA,EAAkBqd,SAAS,GAAIpC,GKmOlBmE,CAA0BlsC,MAC1CorC,EAAInD,cL9MuB,SAAUnb,GACzC,OAAOA,EAAkB/e,UAAU,GAAIk6B,GK6MfkE,CAAsBnsC,MAE1CorC,EAAIgB,cJ3N2B,SAAUtf,GAC7C,OAAOA,EAAkBgd,SAAS,GAAIxB,GI0Nd+D,CAA0BrsC,MAE9CorC,EAAI5C,UHvOmB,SAAU1b,GACrC,OAAOA,EAAkB/e,UAAU,GAAIy6B,EAAW,CAAEphC,SAAU,OGsO1CklC,CAAkBtsC,MAElCorC,EAAIhf,UAAW,OAAqBpsB,OAEjCqpC,EA/M2B,mSChClCkD,EAA2B,WACV,SAASA,EAA2B73B,GACjD,IAAIvE,EAAQnQ,KACZA,KAAK0U,OAASA,EACG1U,KAAKouB,WAAa,IAAI,EAAAiD,WACtBrxB,KAAKkX,eAAgB,EACrBlX,KAAKwsC,oBAAqB,EAC1BxsC,KAAKysC,eAAgB,EACrBzsC,KAAK0sC,sBAAuB,EAC5B1sC,KAAKkV,QAAU,WAAc,OAAO/E,EAAMie,WAAWlZ,WAOtElV,KAAKyV,SAAW,WAAc,OAAOtF,EAAMuE,OAAO2C,eAAe5B,YAUjEzV,KAAK2sC,WAAa,SAAUC,GAAa,OAAOz8B,EAAMuE,OAAO2C,eAAes1B,WAAWC,IAMvF5sC,KAAK6sC,KAAO,WAAc,OAAO18B,EAAMuE,OAAO2C,eAAew1B,QAM7D7sC,KAAKqV,UAAY,WAAc,OAAOlF,EAAMuE,OAAO2C,eAAehC,aAMlErV,KAAK8sC,KAAO,WAAc,OAAO38B,EAAMuE,OAAO2C,eAAey1B,QAM7D9sC,KAAK+sC,SAAW,WAAc,OAAO58B,EAAMuE,OAAO2C,eAAe01B,YAwFrE,OA1EAR,EAAU1qC,UAAUmrC,gBAAkB,SAAUxoC,GAC5C,OAAQxE,KAAKwsC,oBAAqB,QAAUhoC,GAASA,EAAQxE,KAAKwsC,oBAmBtED,EAAU1qC,UAAUotB,oBAAsB,SAAUzqB,GAChD,IAAI,QAAUA,KAAoB,IAAVA,IAA4B,IAAVA,KAAoB,QAASA,GACnE,MAAM,IAAIiO,MAAM,0BAA4BjO,EAAQ,mDACxD,OAAQxE,KAAK0sC,sBAAuB,QAAUloC,GAASA,EAAQxE,KAAK0sC,sBAcxEH,EAAU1qC,UAAUorC,WAAa,SAAUzoC,GACvC,OAAQxE,KAAKysC,eAAgB,QAAUjoC,GAASA,EAAQxE,KAAKysC,eAgCjEF,EAAU1qC,UAAUqN,KAAO,SAAU1J,EAAMiU,EAAY+X,GACnD,IAAItiB,EAAOlP,KAAKouB,WAAWlf,KAAK1J,EAAMiU,EAAY+X,GAClD,OAAQ,QAAU/X,GAAqBzZ,KAAPkP,GAE7Bq9B,EA1ImB,0SCf1BW,EAAsC,WAStC,OARAA,EAAW35B,OAAO3Q,QAAU,SAASic,GACjC,IAAK,IAAIzB,EAAGC,EAAI,EAAGkD,EAAIve,UAAUoN,OAAQiO,EAAIkD,EAAGlD,IAE5C,IAAK,IAAIwd,KADTzd,EAAIpb,UAAUqb,GACO9J,OAAO1R,UAAUa,eAAeX,KAAKqb,EAAGyd,KACzDhc,EAAEgc,GAAKzd,EAAEyd,IAEjB,OAAOhc,IAEK1c,MAAMnC,KAAMgC,YAK5BmrC,EAA8B,WAC9B,SAASA,EAAaz4B,GAClB1U,KAAK0U,OAASA,EAWlB,OATAy4B,EAAatrC,UAAU+O,WAAa,SAAUvF,EAAI6D,EAAMzB,GACpD,OAAO,IAAI,EAAA4f,MAAMhiB,EAAI6D,EAAM,EAAAie,QAAA,OAAgBntB,KAAK0U,OAAOuC,WAAW1L,OAAQkC,IAE9E0/B,EAAatrC,UAAUoyB,SAAW,SAAU5oB,EAAI6D,EAAMzB,GAClD,OAAO,IAAI,EAAA4f,MAAMhiB,EAAI6D,EAAM,EAAAie,QAAA,KAAcntB,KAAK0U,OAAOuC,WAAW1L,OAAQkC,IAE5E0/B,EAAatrC,UAAUurC,WAAa,SAAU/hC,EAAI6D,EAAMzB,GACpD,OAAO,IAAI,EAAA4f,MAAMhiB,EAAI6D,EAAM,EAAAie,QAAA,OAAgBntB,KAAK0U,OAAOuC,WAAW1L,OAAQkC,IAEvE0/B,EAbsB,GAsB7BE,EAAmC,WAEnC,SAASA,EAAmC34B,GACxC,IAAIvE,EAAQnQ,KACZA,KAAK0U,OAASA,EAEd1U,KAAK07B,aAAe,IAAIyR,EAAantC,KAAK0U,QAE1C1U,KAAKstC,WAAa,IAClBttC,KAAKqtB,MAAQ,EAAAA,MAEbrtB,KAAKgtC,gBAAkB,SAAUxoC,GAAS,OAAO2L,EAAMuE,OAAOuC,WAAW1L,OAAOyhC,gBAAgBxoC,IAEhGxE,KAAKivB,oBAAsB,SAAUzqB,GAAS,OAAO2L,EAAMuE,OAAOuC,WAAW1L,OAAO0jB,oBAAoBzqB,IAExGxE,KAAKitC,WAAa,SAAUzoC,GAAS,OAAO2L,EAAMuE,OAAOuC,WAAW1L,OAAO0hC,WAAWzoC,IAEtFxE,KAAKkP,KAAO,SAAU1J,EAAMiU,EAAY+X,GACpC,OAAOrhB,EAAMuE,OAAOuC,WAAW1L,OAAO2D,KAAK1J,EAAMiU,EAAY+X,IAAiBrhB,GA+CtF,OArCAk9B,EAAkBxrC,UAAUwF,QAAU,SAAUid,EAAS/Y,GACrD,IAAI+hB,EAAYttB,KAAK0U,OAAOuC,WAAW1L,OAEnC6C,EAAS7C,IAAWA,EAAOkC,OAASlC,EAAO6C,OAC/C7C,EAAS6C,EAAS8+B,EAAS,CAAEz/B,MAAO,CAAEW,OAAQA,IAAY7C,GAAUA,EACpE,IAAIgiC,EAAe,CACfC,OAAQlgB,EAAUmf,cAClBO,gBAAiB1f,EAAUkf,mBAC3BiB,aAAcngB,EAAUpW,eAE5B,OAAO,IAAI,IAAWoN,EAASgJ,EAAUc,WAAYpuB,KAAK07B,cAAc,QAAO6R,EAAchiC,KASjG8hC,EAAkBxrC,UAAUs4B,UAAY,SAAUuT,GAE9C,KAAK,QAASA,GACV,OAAO,EACX,IAAIpnC,GAAS,EAKb,OAJA,QAAQ,eAAsB,SAAUtC,EAAKwB,IACrC,QAAWxB,KACXsC,EAASA,IAAU,QAAUonC,EAAOloC,MAAU,QAAWkoC,EAAOloC,QAEjEc,GAGX+mC,EAAkBxrC,UAAUnB,KAAO,WAC/B,IAAI4sB,EAAYttB,KAAK0U,OAAOuC,WAAW1L,OAGvC,OAFA+hB,EAAUc,WAAW5I,SAAU,EAC/B8H,EAAUc,WAAWqD,kBACdzxB,MAEJqtC,EAjE2B,kOCjBlCM,EAA2B,WAE3B,SAASA,EAA2Bj5B,GAChC,IAAIvE,EAAQnQ,KACZA,KAAK0U,OAASA,EAGd1U,KAAK4sB,KAAO,SAAU1W,GAAO,OAAO/F,EAAMuE,OAAOuC,WAAW2V,KAAK1W,IAEjElW,KAAKsc,OAAS,SAAUhH,GAAW,OAAOnF,EAAMuE,OAAOuC,WAAWqF,OAAOhH,IAEzEtV,KAAK+c,eAAiB,SAAU9Q,GAAS,OAAOkE,EAAMuE,OAAOuC,WAAW8F,eAAe9Q,IAEvFjM,KAAKgc,MAAQ,SAAU4xB,GAAY,OAAOz9B,EAAMuE,OAAOuC,WAAW+E,MAAM4xB,IAGxE5tC,KAAKuH,QAAU,SAAUwU,GACrB,OAAO5L,EAAMuE,OAAOuC,WAAW0F,MAAMpV,QAAQwU,IAGjD/b,KAAK4c,UAAY,SAAUb,GACvB,OAAO5L,EAAMuE,OAAOuC,WAAW0F,MAAMC,UAAUb,IAGnD/b,KAAKw/B,WAAa,SAAUjjB,GAAQ,OAAOpM,EAAMuE,OAAOuC,WAAW0F,MAAM6iB,WAAWjjB,IAEpFvc,KAAKuc,KAAO,SAAUA,GAAQ,OAAOpM,EAAMuE,OAAOuC,WAAW0F,MAAMJ,KAAKA,IAExEvc,KAAK2c,MAAQ,WAAc,OAAOxM,EAAMuE,OAAOuC,WAAW0F,MAAMA,SAEhE3c,KAAKwrB,KAAO,SAAUqiB,GAAa,OAAO19B,EAAMuE,OAAOuC,WAAW0F,MAAM6O,KAAKqiB,IAE7E7tC,KAAKiQ,KAAO,SAAUwrB,EAAS1f,EAAS5b,GAAW,OAAOgQ,EAAMuE,OAAOuC,WAAW0F,MAAM1M,KAAKwrB,EAAS1f,EAAS5b,IAC/GH,KAAK6+B,eAAiB,IAAI,IAAenqB,GAyE7C,OAtEAi5B,EAAU9rC,UAAUua,OAAS,SAAU0xB,GACnC,IAAIphB,EAAO1sB,KAAK0U,OAAO0C,gBACnB02B,EACA9tC,KAAK6V,SAAW6W,EAAKjb,MAGrBib,EAAKjb,QAAUzR,KAAK6V,UAExB6W,EAAKjb,IAAIzR,KAAK6V,UAAU,IAY5B83B,EAAU9rC,UAAUpB,KAAO,SAAUstC,EAAY3/B,EAAQjO,GACrD,IAAI4U,EAAU5U,KAAaA,EAAQ4U,QACnC/U,KAAK0U,OAAOuC,WAAWxF,IAAIs8B,EAAWnmB,OAAOxZ,GAAU,IAAK2G,IAqBhE44B,EAAU9rC,UAAUmsC,KAAO,SAAUD,EAAY3/B,EAAQjO,GACrD,IAAIsR,EAAMs8B,EAAWnmB,OAAOxZ,GAC5B,GAAW,MAAPqD,EACA,OAAO,KACXtR,EAAUA,GAAW,CAAE8tC,UAAU,GACjC,IAAIpmC,EAAM7H,KAAK0U,OAAOuC,WAAW1L,OAC7B2iC,EAAUrmC,EAAIwN,YAKlB,GAJK64B,GAAmB,OAARz8B,IACZA,EAAM,IAAM5J,EAAI8kC,aAAel7B,GAEnCA,EA1GR,SAAwBA,EAAKy8B,EAASD,EAAUx4B,GAC5C,MAAiB,MAAbA,EACOhE,EACPy8B,GACO,QAAqBz4B,GAAYhE,EACxCw8B,EACOx4B,EAAS3T,MAAM,GAAK2P,EACxBA,EAmGG08B,CAAe18B,EAAKy8B,EAAS/tC,EAAQ8tC,SAAUpmC,EAAI4N,aACpDtV,EAAQ8tC,WAAax8B,EACtB,OAAOA,EAEX,IAAI28B,GAASF,GAAWz8B,EAAM,IAAM,GAChC48B,EAAUxmC,EAAIilC,OACdA,EAAoB,KAAZuB,GAA8B,MAAZA,EAAkB,GAAK,IAAMA,EAC3D,MAAO,CAACxmC,EAAIklC,WAAY,MAAOllC,EAAIglC,OAAQC,EAAMsB,EAAO38B,GAAKwB,KAAK,KAEtEM,OAAO+6B,eAAeX,EAAU9rC,UAAW,oBAAqB,CAE5D6O,IAAK,WACD,OAAO1Q,KAAK0U,OAAOuC,WAAWoF,mBAElCkyB,YAAY,EACZC,cAAc,IAEXb,EA1GmB,2aCJ1Bc,EAAgC,WAChC,SAASA,EAAe/5B,GACpB1U,KAAK0U,OAASA,EAiKlB,OA/JA+5B,EAAe5sC,UAAUwF,QAAU,SAAU2J,GACzC,OAAOhR,KAAK0U,OAAOE,kBAAkBvN,QAAQ2J,IAEjDy9B,EAAe5sC,UAAUL,OAAS,SAAUsb,EAAMf,GAC9C,IAAI5L,EAAQnQ,KACRy9B,EAAU,YAAqBD,EAAqB,uBACpDkR,GAAW,QAAQ,CACnB,CAAC,KAAU,SAAUC,GAAS,OAAOD,EAASv+B,EAAM9I,QAAQsnC,MAC5D,EAAC,IAAAz1B,IAAG,KAAa,SAAUy1B,GAAS,OAAOx+B,EAAMy+B,eAAeD,EAAO5yB,KACvE,EAAC,IAAAkI,IAAGwZ,EAASD,GAAqB,SAAUmR,GAAS,OAAOx+B,EAAM0+B,UAAUF,EAAOx+B,EAAMuE,UACzF,EAAC,IAAAwE,IAAG/P,QAAS,SAAUwlC,GAAS,OAAOx+B,EAAM2+B,WAAWH,EAAO5yB,KAC/D,CAAC,KAAY,SAAU4yB,GAAS,OAAO,IAAIlyB,EAAYkyB,EAAO5yB,OAE9DQ,EAAOmyB,EAAS5xB,GACpB,IAAKP,EACD,MAAM,IAAI9J,MAAM,4BACpB,OAAO8J,GAsCXkyB,EAAe5sC,UAAU+sC,eAAiB,SAAUb,EAAYhyB,GAC5D,IAAIgzB,EAAWhzB,GACX,QAASA,KACTA,EAAU/b,KAAK0U,OAAOE,kBAAkBvN,QAAQ0U,KAChD,IAAA7C,IAAG,IAAH,CAAe6C,KACfgzB,EAAW,SAAU/yB,GAAS,OAAOD,EAAQ6L,OAAO5L,KAiBxD,IAAIgzB,EAAU,CAAEjB,WAAYA,EAAYkB,cAPxC,SAAuB7gC,GACnB,IAAI8gC,EAAWnB,EAAW1a,aAAa/pB,QAAO,SAAU0F,GAAS,OAAOA,EAAM4f,cAC9E,OAAKsgB,EAAS9/B,OAEA8/B,EAAS5lC,QAAO,SAAU0F,GAAS,OAAOZ,EAAOY,EAAM3D,OACtD+D,OAAS8/B,EAAS9/B,OAFtB,MAIuDF,KAAM,cAC5E,OAAO,QAAO,IAAIuN,GAjBlB,SAA2BhL,GACvB,IAAIrD,EAAS2/B,EAAWtkC,KAAKgI,EAAItJ,KAAMsJ,EAAI09B,OAAQ19B,EAAIqgB,MACvD,OAAOic,EAAWre,UAAUthB,IAAWA,IAeM2gC,GAAWC,IAahEP,EAAe5sC,UAAUgtC,UAAY,SAAUO,EAAa16B,GACxD,IAAIjH,EAAQ,uBAA+B2hC,GAAeA,EAAYp7B,UAAYo7B,EAe9EJ,EAAU,CAAEvhC,MAAOA,EAAOyB,KAAM,SACpC,OAAO,QAAOlP,KAAK4uC,eAAenhC,EAAMgE,KAR1B,SAAUuK,GACpB,IAAIvD,EAAS/D,EAAOmC,aAChByB,EAAU5D,EAAO4D,QACjBG,EAAOu1B,KAAKvgC,EAAOuO,KAAWvD,EAAOu1B,KAAK11B,EAAQwN,QAASxN,EAAQlK,SACnEqK,EAAO42B,aAAa5hC,EAAOuO,EAAO,CAAEoD,SAAS,EAAML,OAAQ,WAIZiwB,IAkC3DP,EAAe5sC,UAAUitC,WAAa,SAAU7rB,EAAQlH,GACpD,GAAIkH,EAAOnF,QAAUmF,EAAOqsB,OACxB,MAAM,IAAI78B,MAAM,4CAMpB,IAIIs8B,GAAW,QAAShzB,GAJJ,SAAUC,GAE1B,OAAOD,EAAQhH,QAAQ,kBAAkB,SAAUC,EAAG8H,GAAQ,OAAOd,EAAe,MAATc,EAAe,EAAIyyB,OAAOzyB,QAEtDf,EAE/CizB,EAAU,CAAE/rB,OAAQA,EAAQ/T,KAAM,UACtC,OAAO,QAAO,IAAIuN,GAFU,SAAUhL,GAAO,OAAOwR,EAAOxZ,KAAKgI,EAAItJ,QAEf4mC,GAAWC,IAEpEP,EAAee,UAAY,SAAUv1B,GAAO,OAAOA,GAAO,CAAC,OAAQ,QAAS,WAAWkpB,OAAM,SAAUt9B,GAAO,OAAO,QAAUoU,EAAIpU,QAC5H4oC,EAnKwB,GA4K/BhyB,EACA,SAAqBT,EAAOD,GACxB,IAAI5L,EAAQnQ,KACZA,KAAKgc,MAAQA,EACbhc,KAAKkP,KAAO,MACZlP,KAAKivC,cAAgB,SAAUjzB,GAAS,OAAO,EAAI7L,EAAMgL,KACzDnb,KAAK+b,QAAUA,GAAW,2GCnK9B0zB,sPAaJ,SAASC,EAAa3zB,GAClB,MAAK,QAAWA,KAAa,QAASA,KAAa,IAAA7C,IAAG,EAAA2mB,YAAH,CAAgB9jB,IAAa,EAAA8jB,YAAA,MAAkB9jB,IAC9F,MAAM,IAAItJ,MAAM,4FAEpB,OAAO,QAAWsJ,GAAWA,GAAU,QAAIA,GAhB/C0zB,EAAoB,SAAUhyB,EAAGmB,GAC7B,IAAI+wB,EA5BW,SAAUlyB,EAAGmB,GAAK,OAAQA,EAAExX,UAAY,IAAMqW,EAAErW,UAAY,GA4BjEwoC,CAAanyB,EAAGmB,GAC1B,OAAY,IAAR+wB,GAGQ,KADZA,EA9BW,SAAUlyB,EAAGmB,GACxB,IAAIixB,EAAU,CAAE7E,MAAO,EAAG8E,WAAY,EAAGC,OAAQ,EAAGC,IAAK,EAAGC,MAAO,GACnE,OAAQJ,EAAQpyB,EAAEvO,OAAS,IAAM2gC,EAAQjxB,EAAE1P,OAAS,GA4B9CghC,CAASzyB,EAAGmB,KAIN,KADZ+wB,EA7BiB,SAAUlyB,EAAGmB,GAC9B,OAAQnB,EAAEswB,YAAenvB,EAAEmvB,WAAiB,YAAmBtwB,EAAEswB,WAAYnvB,EAAEmvB,YAAvC,EA4BlCoC,CAAe1yB,EAAGmB,IAJb+wB,EAtBF,SAAUlyB,EAAGmB,GAEtB,IAAIwxB,EAAmB,CAAEpF,OAAO,EAAM8E,YAAY,GAElD,OADYM,EAAiB3yB,EAAEvO,OAASkhC,EAAiBxxB,EAAE1P,MAC5C,GAAKuO,EAAEtC,KAAO,IAAMyD,EAAEzD,KAAO,GAyBrCk1B,CAAO5yB,EAAGmB,IAkBrB,IAAI0xB,EAA0B,WAE1B,SAASA,EAA0B57B,GAC/B1U,KAAK0U,OAASA,EACG1U,KAAKuwC,QAAUd,EACfzvC,KAAKwwC,OAAS,GACdxwC,KAAKywC,IAAM,EAC5BzwC,KAAK6+B,eAAiB,IAAI,IAAenqB,GA8Q7C,OA3QA47B,EAASzuC,UAAUqT,QAAU,SAAUR,GACnC1U,KAAKwwC,OAAS,UACPxwC,KAAK0wC,cAqChBJ,EAASzuC,UAAU0F,QAAU,SAAUwU,GACnC,IAAI40B,EAAYjB,EAAa3zB,GAI7B/b,KAAKuc,KAAKvc,KAAK6+B,eAAer9B,QAHhB,SAAUosC,EAAUl5B,GAC9B,OAAmD,IAA5CA,EAAO4D,QAAQyT,kBAAkBnG,UAAkB,QAAQnc,KAAKmkC,EAASzlC,QAEtCwoC,KA6ClDL,EAASzuC,UAAU+a,UAAY,SAAUb,GACrC,IAAI40B,EAAYjB,EAAa3zB,GAC7B/b,KAAK0wC,aAAe1wC,KAAK6+B,eAAer9B,QAAO,SAAI,GAAOmvC,GAC1D3wC,KAAK4wC,SAAU,GAOnBN,EAASzuC,UAAU29B,WAAa,SAAUjjB,IACtC,QAAWvc,KAAKwwC,OAAQj0B,IAc5B+zB,EAASzuC,UAAU0a,KAAO,SAAUA,GAChC,IAAIpM,EAAQnQ,KACZ,IAAK,cAAyBuc,GAC1B,MAAM,IAAI9J,MAAM,gBAKpB,OAJA8J,EAAKpB,IAAMnb,KAAKywC,MAChBl0B,EAAKnV,SAAWmV,EAAKnV,UAAY,EACjCpH,KAAKwwC,OAAO/vC,KAAK8b,GACjBvc,KAAK4wC,SAAU,EACR,WAAc,OAAOzgC,EAAMqvB,WAAWjjB,KAOjD+zB,EAASzuC,UAAU8a,MAAQ,WAEvB,OADA3c,KAAK6wC,eACE7wC,KAAKwwC,OAAOpuC,OAAOpC,KAAK0wC,aAAe,CAAC1wC,KAAK0wC,cAAgB,KA4CxEJ,EAASzuC,UAAU2pB,KAAO,SAAUqiB,GAIhC,IAHA,IAAIiD,EAAS9wC,KAAK+wC,WAAW/wC,KAAKwwC,OAASxwC,KAAKuwC,QAAU1C,GAAa7tC,KAAKuwC,SAExES,EAAQ,EACH3zB,EAAI,EAAGA,EAAIyzB,EAAO1hC,OAAQiO,IAC/ByzB,EAAOzzB,GAAG4zB,OAASD,EACf3zB,EAAIyzB,EAAO1hC,OAAS,GAAgD,IAA3CpP,KAAKuwC,QAAQO,EAAOzzB,GAAIyzB,EAAOzzB,EAAI,KAC5D2zB,IAGRhxC,KAAKwwC,OAASM,EACd9wC,KAAK4wC,SAAU,GAGnBN,EAASzuC,UAAUgvC,aAAe,WAC9B7wC,KAAK4wC,SAAW5wC,KAAKwrB,QAGzB8kB,EAASzuC,UAAUkvC,WAAa,SAAUrxB,EAAKmuB,GAC3C,IAAIqD,EAAexxB,EAAI/Q,KAAI,SAAUuS,EAAMjS,GAAO,MAAO,CAAGiS,KAAMA,EAAMjS,IAAKA,MAK7E,OAJAiiC,EAAa1lB,MAAK,SAAU2lB,EAAUC,GAClC,IAAIC,EAAUxD,EAAUsD,EAASjwB,KAAMkwB,EAASlwB,MAChD,OAAmB,IAAZmwB,EAAgBF,EAASliC,IAAMmiC,EAASniC,IAAMoiC,KAElDH,EAAaviC,KAAI,SAAU2iC,GAAW,OAAOA,EAAQpwB,SA6DhEovB,EAASzuC,UAAUoO,KAAO,SAAUwrB,EAAS1f,EAAS5b,GAClD,IAAIoc,EAAOvc,KAAK6+B,eAAer9B,OAAOi6B,EAAS1f,GAI/C,OAHI,QAAU5b,GAAWA,EAAQiH,YAC7BmV,EAAKnV,SAAWjH,EAAQiH,UAC5BpH,KAAKuc,KAAKA,GACHA,GAEJ+zB,EArRkB,8VCpDzBiB,EAA4B,WAE5B,SAASA,EAA4B78B,GACjC,IAAIvE,EAAQnQ,KACZA,KAAK0U,OAASA,EACG1U,KAAKqc,mBAAoB,EAM1Crc,KAAK2c,MAAQ,IAAI,IAAS3c,KAAK0U,QAM/B1U,KAAKuL,OAAS,IAAI,IAAUvL,KAAK0U,QAsDjC1U,KAAKyR,IAAM,SAAU+/B,EAAQz8B,EAAStH,GAClC,OAAO0C,EAAMuE,OAAO0C,gBAAgB3F,IAAI+/B,EAAQz8B,EAAStH,IAS7DzN,KAAKmI,KAAO,WAAc,OAAOgI,EAAMuE,OAAO0C,gBAAgBjP,QAQ9DnI,KAAKmvC,OAAS,WAAc,OAAOh/B,EAAMuE,OAAO0C,gBAAgB+3B,UAQhEnvC,KAAK8xB,KAAO,WAAc,OAAO3hB,EAAMuE,OAAO0C,gBAAgB0a,QAgB9D9xB,KAAKmV,SAAW,SAAU3U,GAAY,OAAO2P,EAAMuE,OAAO0C,gBAAgBjC,SAAS3U,IA4IvF,OAzIA+wC,EAAW1vC,UAAUqT,QAAU,WAC3BlV,KAAKsc,QAAO,GACZtc,KAAK2c,MAAMzH,WAOfq8B,EAAW1vC,UAAU8qB,MAAQ,WACzB,MAAO,CAAExkB,KAAMnI,KAAKmI,OAAQgnC,OAAQnvC,KAAKmvC,SAAUrd,KAAM9xB,KAAK8xB,SAsBlEyf,EAAW1vC,UAAU+qB,KAAO,SAAU1W,GAClC,IAAIA,IAAOA,EAAI5T,iBAAf,CAEA,IAAI+oB,EAAKrrB,KAAK0U,OAAQuC,EAAaoU,EAAGpU,WAAYJ,EAAewU,EAAGxU,aAChEpF,EAAM,CAAEtJ,KAAM8O,EAAW9O,OAAQgnC,OAAQl4B,EAAWk4B,SAAUrd,KAAM7a,EAAW6a,QAC/E2f,EAAOzxC,KAAKgc,MAAMvK,IACJ,QAAQ,CACtB,CAAC,KAAU,SAAU+/B,GAAU,OAAOv6B,EAAWxF,IAAI+/B,GAAQ,KAC7D,CAAC,EAAA3R,YAAA,MAAmB,SAAU3sB,GAAO,OAAO2D,EAAa66B,GAAGx+B,EAAIzF,MAAOyF,EAAI9E,OAAQ8E,EAAI/S,WACvF,EAAC,IAAA+Y,IAAG,EAAA2mB,aAAc,SAAUx5B,GAAU,OAAOwQ,EAAa66B,GAAGrrC,EAAOoH,QAASpH,EAAO+H,SAAU/H,EAAOlG,cAEzGwxC,CAAYF,GAAQA,EAAKl1B,KAAKR,QAAQ01B,EAAKz1B,MAAOvK,EAAKzR,KAAK0U,WAwBhE68B,EAAW1vC,UAAUya,OAAS,SAAUhH,GACpC,IAAInF,EAAQnQ,KACZ,IAAgB,IAAZsV,EAKA,OAAQtV,KAAK4xC,iBACT5xC,KAAK4xC,kBAAoB5xC,KAAK0U,OAAOuC,WAAW9B,UAAS,SAAUe,GAAO,OAAO/F,EAAMyc,KAAK1W,MALhGlW,KAAK4xC,kBAAoB5xC,KAAK4xC,0BACvB5xC,KAAK4xC,kBA+BpBL,EAAW1vC,UAAUkb,eAAiB,SAAU9Q,QAC9BkI,IAAVlI,IACAA,GAAQ,GACZjM,KAAKqc,kBAAoBpQ,GAQ7BslC,EAAW1vC,UAAUma,MAAQ,SAAUvK,GAEnCA,GAAM,QAAO,CAAEtJ,KAAM,GAAIgnC,OAAQ,GAAIrd,KAAM,IAAMrgB,GAYjD,IAXA,IAUIggC,EARsBl1B,EAClBP,EAHJW,EAAQ3c,KAAK2c,MAAMA,QAWdU,EAAI,EAAGA,EAAIV,EAAMvN,UAElBqiC,GAAQA,EAAKl1B,KAAK00B,SAAWt0B,EAAMU,GAAG4zB,QAFZ5zB,IAAK,CAInC,IAAIyI,QAZA9J,GAAAA,GADkBO,EAaEI,EAAMU,IAZbrB,MAAMvK,EALfzR,KAK0B0U,UAClB,CAAEsH,MAAOA,EAAOO,KAAMA,EAAMs1B,OAAQt1B,EAAK0yB,cAAcjzB,KAavEy1B,GAAQA,GAAS3rB,GAAWA,EAAQ+rB,OAASJ,EAAKI,OAAU/rB,EAAU2rB,EAE1E,OAAOA,GAEJF,EA7PoB,oZCJ3BO,EAAsC,WACtC,SAASA,EAAqBp9B,EAAQq9B,GAClC,IAAI5hC,EAAQnQ,KACZA,KAAK+xC,gBAAkBA,EACvB/xC,KAAKgyC,WAAa,GAClBhyC,KAAKiyC,UAAY,SAAU/7B,GAAO,OAAO/F,EAAM6hC,WAAWjxC,SAAQ,SAAU+J,GAAM,OAAOA,EAAGoL,OAC5FlW,KAAK8xB,KAAO,WAAc,OAAO,QAAS3hB,EAAM+hC,QAAQpgB,MACxD9xB,KAAKmI,KAAO,WAAc,OAAO,QAASgI,EAAM+hC,QAAQ/pC,MACxDnI,KAAKmvC,OAAS,WAAc,OAAO,SAAU,QAASh/B,EAAM+hC,QAAQ/C,SACpEnvC,KAAKmyC,UAAY,cACjBnyC,KAAKoyC,SAAW,aAoBpB,OAlBAN,EAAqBjwC,UAAU4P,IAAM,SAAUA,EAAKsD,GAQhD,YAPgB,IAAZA,IAAsBA,GAAU,IAChC,QAAUtD,IAAQA,IAAQzR,KAAKkyC,SAC/BlyC,KAAKmpB,KAAK,KAAM,KAAM1X,EAAKsD,GACvB/U,KAAK+xC,iBACL/xC,KAAKgyC,WAAWjxC,SAAQ,SAAU+J,GAAM,OAAOA,EAAG,CAAE2G,IAAKA,SAG1D,QAASzR,OAEpB8xC,EAAqBjwC,UAAUsT,SAAW,SAAUrK,GAChD,IAAIqF,EAAQnQ,KAEZ,OADAA,KAAKgyC,WAAWvxC,KAAKqK,GACd,WAAc,OAAO,QAAWqF,EAAM6hC,WAAYlnC,KAE7DgnC,EAAqBjwC,UAAUqT,QAAU,SAAUR,IAC/C,QAAS1U,KAAKgyC,aAEXF,EA9B8B,2LCDrCO,EAAuC,WACvC,SAASA,EAAsB39B,EAAQ49B,QAClB,IAAbA,IAAuBA,GAAW,GACtCtyC,KAAKsyC,SAAWA,EAChBtyC,KAAK0V,eAAYvB,EACjBnU,KAAKuyC,YAAc,GAmCvB,OAjCAF,EAAsBxwC,UAAUirC,KAAO,WACnC,OAAIj3B,SAASi3B,KACFyC,OAAO15B,SAASi3B,MAEA,UAApB9sC,KAAK+sC,WAAyB,IAAM,IAE/CsF,EAAsBxwC,UAAUkrC,SAAW,WACvC,OAAOl3B,SAASk3B,SAASh4B,QAAQ,KAAM,KAE3Cs9B,EAAsBxwC,UAAUgrC,KAAO,WACnC,OAAOh3B,SAAS28B,UAEpBH,EAAsBxwC,UAAUwT,UAAY,WACxC,OAAOrV,KAAKsyC,UAEhBD,EAAsBxwC,UAAU8qC,WAAa,SAAUC,GACnD,OAAO,QAAUA,GAAc5sC,KAAKuyC,YAAc3F,EAAa5sC,KAAKuyC,aAExEF,EAAsBxwC,UAAU4T,SAAW,SAAUu4B,GAKjD,OAJI,QAAUA,KACVhuC,KAAK0V,UAAYs4B,IACjB,QAAYhuC,KAAK0V,aACjB1V,KAAK0V,UAAY1V,KAAKyyC,eACnBzyC,KAAK0V,WAEhB28B,EAAsBxwC,UAAU4wC,YAAc,WAC1C,IAAIC,EAAUrsB,SAASssB,qBAAqB,QAAQ,GACpD,OAAID,GAAWA,EAAQ1E,KACZ0E,EAAQ1E,KAAKj5B,QAAQ,uBAAwB,IAEjD/U,KAAKsyC,SAAW,IAAMz8B,SAAS/B,UAAY,KAEtDu+B,EAAsBxwC,UAAUqT,QAAU,aACnCm9B,EAxC+B,uHCDlCO,2IADJC,GACID,EAAgB,SAAUzZ,EAAGva,GAI7B,OAHAg0B,EAAgBr/B,OAAOu/B,gBAClB,CAAEC,UAAW,cAAgBnxC,OAAS,SAAUu3B,EAAGva,GAAKua,EAAE4Z,UAAYn0B,IACvE,SAAUua,EAAGva,GAAK,IAAK,IAAIic,KAAKjc,EAAOA,EAAElc,eAAem4B,KAAI1B,EAAE0B,GAAKjc,EAAEic,MACpD1B,EAAGva,IAErB,SAAUua,EAAGva,GAEhB,SAASo0B,IAAOhzC,KAAKokB,YAAc+U,EADnCyZ,EAAczZ,EAAGva,GAEjBua,EAAEt3B,UAAkB,OAAN+c,EAAarL,OAAO/R,OAAOod,IAAMo0B,EAAGnxC,UAAY+c,EAAE/c,UAAW,IAAImxC,KAMnFC,EAAqC,SAAUC,GAE/C,SAASD,EAAoBv+B,GACzB,IAAIvE,EAAQ+iC,EAAOnxC,KAAK/B,KAAM0U,GAAQ,IAAU1U,KAEhD,OADA,sBAAsB,aAAcmQ,EAAM8hC,WAAW,GAC9C9hC,EAYX,OAhBA0iC,EAAUI,EAAqBC,GAM/BD,EAAoBpxC,UAAUqwC,KAAO,WACjC,OAAO,QAAYlyC,KAAKmyC,UAAUrgB,OAEtCmhB,EAAoBpxC,UAAUsnB,KAAO,SAAU1b,EAAO0lC,EAAO1hC,EAAKsD,GAC9D/U,KAAKmyC,UAAUrgB,KAAOrgB,GAE1BwhC,EAAoBpxC,UAAUqT,QAAU,SAAUR,GAC9Cw+B,EAAOrxC,UAAUqT,QAAQnT,KAAK/B,KAAM0U,GACpC,yBAAyB,aAAc1U,KAAKiyC,YAEzCgB,EAjB6B,CAkBtC,6cC/BEG,EACA,WACI,IAAIjjC,EAAQnQ,KACZA,KAAKkV,QAAU,KACflV,KAAK0V,UAAY,GACjB1V,KAAKqzC,MAAQ,GACbrzC,KAAKszC,UAAY,OACjBtzC,KAAKuzC,MAAQ,YACbvzC,KAAKuyC,YAAc,GACnBvyC,KAAK8sC,KAAO,WAAc,OAAO38B,EAAMkjC,OACvCrzC,KAAK+sC,SAAW,WAAc,OAAO58B,EAAMmjC,WAC3CtzC,KAAK6sC,KAAO,WAAc,OAAO18B,EAAMojC,OACvCvzC,KAAKyV,SAAW,WAAc,OAAOtF,EAAMuF,WAC3C1V,KAAKqV,UAAY,WAAc,OAAO,GACtCrV,KAAK2sC,WAAa,SAAU6G,GAAU,OAAQ,QAAUA,GAAWrjC,EAAMoiC,YAAciB,EAAUrjC,EAAMoiC,oIChBvGK,8EADJC,GACID,EAAgB,SAAUzZ,EAAGva,GAI7B,OAHAg0B,EAAgBr/B,OAAOu/B,gBAClB,CAAEC,UAAW,cAAgBnxC,OAAS,SAAUu3B,EAAGva,GAAKua,EAAE4Z,UAAYn0B,IACvE,SAAUua,EAAGva,GAAK,IAAK,IAAIic,KAAKjc,EAAOA,EAAElc,eAAem4B,KAAI1B,EAAE0B,GAAKjc,EAAEic,MACpD1B,EAAGva,IAErB,SAAUua,EAAGva,GAEhB,SAASo0B,IAAOhzC,KAAKokB,YAAc+U,EADnCyZ,EAAczZ,EAAGva,GAEjBua,EAAEt3B,UAAkB,OAAN+c,EAAarL,OAAO/R,OAAOod,IAAMo0B,EAAGnxC,UAAY+c,EAAE/c,UAAW,IAAImxC,KAKnFS,EAAuC,SAAUP,GAEjD,SAASO,EAAsB/+B,GAC3B,OAAOw+B,EAAOnxC,KAAK/B,KAAM0U,GAAQ,IAAS1U,KAQ9C,OAVA6yC,EAAUY,EAAuBP,GAIjCO,EAAsB5xC,UAAUqwC,KAAO,WACnC,OAAOlyC,KAAK0zC,MAEhBD,EAAsB5xC,UAAUsnB,KAAO,SAAU1b,EAAO0lC,EAAO1hC,EAAKsD,GAChE/U,KAAK0zC,KAAOjiC,GAETgiC,EAX+B,CAYxC,0tBCZ8B,QAAsB,4BAA4B,EAAO,IAAqB,MAEzE,QAAsB,6BAA6B,EAAM,IAA0B,MAEtF,QAAsB,0BAA0B,EAAO,IAAuB,8HClBxGb,2IADJC,GACID,EAAgB,SAAUzZ,EAAGva,GAI7B,OAHAg0B,EAAgBr/B,OAAOu/B,gBAClB,CAAEC,UAAW,cAAgBnxC,OAAS,SAAUu3B,EAAGva,GAAKua,EAAE4Z,UAAYn0B,IACvE,SAAUua,EAAGva,GAAK,IAAK,IAAIic,KAAKjc,EAAOA,EAAElc,eAAem4B,KAAI1B,EAAE0B,GAAKjc,EAAEic,MACpD1B,EAAGva,IAErB,SAAUua,EAAGva,GAEhB,SAASo0B,IAAOhzC,KAAKokB,YAAc+U,EADnCyZ,EAAczZ,EAAGva,GAEjBua,EAAEt3B,UAAkB,OAAN+c,EAAarL,OAAO/R,OAAOod,IAAMo0B,EAAGnxC,UAAY+c,EAAE/c,UAAW,IAAImxC,KAUnFW,EAA0C,SAAUT,GAEpD,SAASS,EAAyBj/B,GAC9B,IAAIvE,EAAQ+iC,EAAOnxC,KAAK/B,KAAM0U,GAAQ,IAAS1U,KAG/C,OAFAmQ,EAAMyjC,QAAUl/B,EAAOuC,WAAW1L,OAClC,sBAAsB,WAAY4E,EAAM8hC,WAAW,GAC5C9hC,EA8CX,OAnDA0iC,EAAUc,EAA0BT,GAuBpCS,EAAyB9xC,UAAUgyC,eAAiB,WAChD,OAAO,QAAqB7zC,KAAK4zC,QAAQn+B,aAE7Ck+B,EAAyB9xC,UAAUqwC,KAAO,WACtC,IAAI7mB,EAAKrrB,KAAKmyC,UAAWr+B,EAAWuX,EAAGvX,SAAUge,EAAOzG,EAAGyG,KAAMqd,EAAS9jB,EAAG8jB,OAC7EA,GAAS,QAAWA,GAAQ,GAC5Brd,GAAO,QAAUA,GAAM,GACvB,IAAIgiB,EAAa9zC,KAAK6zC,iBAClBE,EAAqBjgC,IAAa9T,KAAK4zC,QAAQn+B,WAC/Cu+B,EAAiBlgC,EAASiT,OAAO,EAAG+sB,EAAW1kC,UAAY0kC,EAE/D,OADAhgC,EAAWigC,EAAqB,IAAMC,EAAiBlgC,EAASmmB,UAAU6Z,EAAW1kC,QAAU0E,IAC5Eq7B,EAAS,IAAMA,EAAS,KAAOrd,EAAO,IAAMA,EAAO,KAE1E6hB,EAAyB9xC,UAAUsnB,KAAO,SAAU1b,EAAO0lC,EAAO1hC,EAAKsD,GACnE,IAAI++B,EAAa9zC,KAAK6zC,iBAClBzF,EAAQ38B,GAAkB,MAAXA,EAAI,GAAa,IAAM,GACtCwiC,EAAkB,KAARxiC,GAAsB,MAARA,EAAczR,KAAK4zC,QAAQn+B,WAAaq+B,EAAa1F,EAAQ38B,EACrFsD,EACA/U,KAAKoyC,SAAS8B,aAAazmC,EAAO0lC,EAAOc,GAGzCj0C,KAAKoyC,SAAS+B,UAAU1mC,EAAO0lC,EAAOc,IAG9CN,EAAyB9xC,UAAUqT,QAAU,SAAUR,GACnDw+B,EAAOrxC,UAAUqT,QAAQnT,KAAK/B,KAAM0U,GACpC,yBAAyB,WAAY1U,KAAKiyC,YAEvC0B,EApDkC,CAqD3C,qKCzDS5sC,EAAK,CAEZkJ,KAAM,SAAUjM,GAAO,OAAO,IAAIowC,SAAQ,SAAUznC,EAAS0nC,GAAU,OAAO1nC,EAAQ3I,OAEtFqwC,OAAQ,SAAUrwC,GACd,OAAO,IAAIowC,SAAQ,SAAUznC,EAAS0nC,GAClCA,EAAOrwC,OAIfiI,MAAO,WACH,IAAIqoC,EAAW,GAKf,OAJAA,EAAS7wC,QAAU,IAAI2wC,SAAQ,SAAUznC,EAAS0nC,GAC9CC,EAAS3nC,QAAUA,EACnB2nC,EAASD,OAASA,KAEfC,GAGX74B,IAAK,SAAUF,GACX,IAAI,QAAQA,GACR,OAAO64B,QAAQ34B,IAAIF,GAEvB,IAAI,QAASA,GAAW,CAGpB,IAAI0gB,EAAQ1oB,OAAOC,KAAK+H,GAAU5M,KAAI,SAAU9I,GAAO,OAAO0V,EAAS1V,GAAKkF,MAAK,SAAU/G,GAAO,MAAO,CAAG6B,IAAKA,EAAK7B,IAAKA,SAE3H,OAAO+C,EAAG0U,IAAIwgB,GAAOlxB,MAAK,SAAUiW,GAChC,OAAOA,EAAOpS,QAAO,SAAUsL,EAAKzG,GAEhC,OADAyG,EAAIzG,EAAM5N,KAAO4N,EAAMzP,IAChBkW,IACR,yMC/CRq6B,EAAmB,SAAUC,EAAOnpB,GAC3C,IAAIxlB,EAAMwlB,EAAG,GAAIrnB,EAAMqnB,EAAG,GAU1B,OATKmpB,EAAM9xC,eAAemD,IAGjB,QAAQ2uC,EAAM3uC,IACnB2uC,EAAM3uC,GAAKpF,KAAKuD,GAGhBwwC,EAAM3uC,GAAO,CAAC2uC,EAAM3uC,GAAM7B,GAN1BwwC,EAAM3uC,GAAO7B,EAQVwwC,GAEAC,EAAY,SAAUC,GAC7B,OAAOA,EAAY5xB,MAAM,KAAKxZ,OAAO,MAAUqF,IAAI,MAAYC,OAAO2lC,EAAkB,KAErF,SAASra,EAASzoB,GACrB,IAAIkjC,EAAgB,SAAUrlC,GAAK,OAAOA,GAAK,IAC3C+b,GAAK,QAAU5Z,GAAK9C,IAAIgmC,GAAgBC,EAAavpB,EAAG,GAAIyG,EAAOzG,EAAG,GACtEC,GAAK,QAAWspB,GAAYjmC,IAAIgmC,GACpC,MAAO,CAAExsC,KADkDmjB,EAAG,GACzC6jB,OADsD7jB,EAAG,GACzCwG,KAAMA,EAAMrgB,IAAKA,GAEnD,IAAIojC,EAAW,SAAUC,GAC5B,IAAI3sC,EAAO2sC,EAAI3sC,OACX4sC,EAAeD,EAAI3F,SACnBrd,EAAOgjB,EAAIhjB,OACXqd,EAAS57B,OAAOC,KAAKuhC,GACpBpmC,KAAI,SAAU9I,GACf,IAAImJ,EAAQ+lC,EAAalvC,GAEzB,QADW,QAAQmJ,GAASA,EAAQ,CAACA,IACzBL,KAAI,SAAU3K,GAAO,OAAO6B,EAAM,IAAM7B,QAEnD4K,OAAO,KAAS,IAChBqE,KAAK,KACV,OAAO9K,GAAQgnC,EAAS,IAAMA,EAAS,KAAOrd,EAAO,IAAMA,EAAO,KAE/D,SAASkjB,EAAsBxvC,EAAM0oC,EAAS+G,EAAcC,GAC/D,OAAO,SAAU98B,GACb,IAAIX,EAAWW,EAAShB,gBAAkB,IAAI69B,EAAa78B,GACvD+8B,EAAiB/8B,EAASf,eAAiB,IAAI69B,EAAmB98B,EAAU81B,GAKhF,MAAO,CAAE1oC,KAAMA,EAAMiS,QAASA,EAAS09B,cAAeA,EAAejgC,QAJrE,SAAiBR,GACbA,EAAOQ,QAAQuC,GACf/C,EAAOQ,QAAQigC,kaCvBvBr6B,EAA6B,WAE7B,SAASA,EAA6BpG,GAClC,IAAIvE,EAAQnQ,KACZA,KAAK0U,OAASA,EACG1U,KAAKo1C,SAAW,GAChBp1C,KAAKq1C,aAAe,GACpBr1C,KAAKs1C,qBAAuB,GAC5Bt1C,KAAKgyC,WAAa,GAEnChyC,KAAKgK,WAAa,CACdC,iBAAkBjK,KAAKiK,iBAAiB3G,KAAKtD,MAC7CgX,mBAAoBhX,KAAKgX,mBAAmB1T,KAAKtD,MACjDu1C,kBAAmB,SAAUlqC,GAAM,OAAO,QAAK8E,EAAMilC,UAAU,SAAUt7B,GAAQ,OAAO3J,EAAMuE,OAAOyG,IAAM,IAAMrB,EAAKzO,KAAOA,MAC7HmqC,mBAAoB,WAAc,OAAOrlC,EAAMilC,UAC/CK,mBAAoB,WAAc,OAAOtlC,EAAMklC,cAC/CK,QAAS,SAAUvX,GAEf,OADAhuB,EAAM6hC,WAAWvxC,KAAK09B,GACf,WAAc,OAAO,QAAWhuB,EAAM6hC,WAAY7T,MAwPrE,OAzOArjB,EAAY66B,sBAAwB,SAAU9kC,EAAS+kC,QAC/B,IAAhBA,IAA0BA,EAAc,IAI5C,IAAIC,EAAgBD,EAAY9yB,MAAM,KAClC9H,EAAa66B,EAAc,IAAM,WACjC36B,GAAsB,QAAS26B,EAAc,IAAMA,EAAc,GAAK,IAGtEC,EAAwB,wBAAwBrsC,KAAKuR,GAYzD,GAXI86B,IAEA56B,EAAsB46B,EAAsB,GAC5C96B,EAAa86B,EAAsB,IAEV,MAAzB96B,EAAWvV,OAAO,KAClBuV,EAAaA,EAAW+L,OAAO,GAC/B7L,EAAsB,IAGN,kBACFzR,KAAKyR,GAAsB,CACzC,IAAI66B,EAAc76B,EAAoB4H,MAAM,KAAKlU,QAAO,SAAUonC,EAAQ1mC,GAAK,OAAO0mC,EAAO57B,SAAWvJ,GACxGqK,EAAsB66B,EAAYvwC,SAEL,MAAxB0V,IACLA,EAAsBrK,EAAQrL,MAElC,MAAO,CAAEwV,WAAYA,EAAYE,oBAAqBA,IAG1DJ,EAAYjZ,UAAUoI,iBAAmB,SAAU4G,GAC/C,OAAQ7Q,KAAKi2C,aAAeplC,GAAW7Q,KAAKi2C,cAGhDn7B,EAAYjZ,UAAUmV,mBAAqB,SAAUk/B,EAAUh2C,GAC3DF,KAAKs1C,qBAAqBY,GAAYh2C,GAE1C4a,EAAYjZ,UAAU2yB,iBAAmB,SAAUrsB,EAAMozB,GACrD,IAAI4a,EAAan2C,KAAKs1C,qBAAqB/Z,EAAKnwB,OAChD,IAAK+qC,EACD,MAAM,IAAI1jC,MAAM,2DAA6D8oB,EAAKnwB,OACtF,IAAIgrC,EAAOD,EAAWhuC,EAAMozB,GAC5B,OAAO,QAAQ6a,GAAQA,EAAO,CAACA,IAUnCt7B,EAAYjZ,UAAUumC,qBAAuB,SAAU19B,GACnD,2BAA4B,cAAeA,IAC3C,QAAW1K,KAAKq1C,aAAc3qC,IAElCoQ,EAAYjZ,UAAUwmC,mBAAqB,SAAU39B,GACjD,2BAA4B,iBAAkBA,GAC9C1K,KAAKq1C,aAAa50C,KAAKiK,IAE3BoQ,EAAYjZ,UAAU+qB,KAAO,WACzB,IAAIzc,EAAQnQ,KACRq2C,EAAer2C,KAAKo1C,SAASzmC,KAAI,SAAU4c,GAAO,MAAO,CAACA,EAAIjgB,IAAKigB,MAAS3c,OAAO,KAAY,IASnG,SAAS0nC,EAAgB/qC,GAErB,IADA,IAAIsF,EAAUtF,EAAOxD,SAASgC,SAAUG,EAAQ,IACvCA,GAAS2G,EAAQuJ,QACtBvJ,EAAUA,EAAQuJ,OACtB,OAAOlQ,EAGX,IAAIqsC,GAAe,SAAM,SAAUC,EAASC,EAAQ1lB,EAAMC,GAAS,OAAOylB,GAAUD,EAAQzlB,GAAQylB,EAAQxlB,OAkBxG0lB,EAAe12C,KAAKo1C,SAAS5pB,KAAK+qB,GA9BtC,SAAqB9vC,GACjB,IAAIkwC,EAAa,SAAU9lC,GAAW,OAAQA,GAAWA,EAAQuJ,OAASu8B,EAAW9lC,EAAQuJ,QAAU,EAAI,GAC3G,OAAsC,IAA/B3T,EAAO6E,IAAIwX,MAAM,KAAK1T,OAAiBunC,EAAWlwC,EAAOkiB,mBA4BJ,IAAIha,KAjB3C,SAAUlI,GAC/B,IAAImwC,EAAkBzmC,EAAMklC,aAAa/rC,OAAOwR,EAAYoI,QAAQmzB,EAAc5vC,IAOlF,OANImwC,EAAgBxnC,OAAS,GAIzBwnC,EAAgBprB,KAAK+qB,EAAaD,GAAkB,IAEjD,CAAE7vC,OAAQA,EAAQiE,WAAYksC,EAAgB,OAUrDC,EAAqBH,EAAa/nC,KAAI,SAAU8E,GAAS,OAAOA,EAAM/I,cACtEosC,EAAwB92C,KAAKq1C,aAC5B/rC,QAAO,SAAUiC,GAAU,QAAQ,QAAQsrC,EAAoBtrC,MAC/DoD,KAAI,SAAUjE,GAAc,MAAO,CAAGjE,YAAQ0N,EAAWzJ,WAAYA,MAC1EgsC,EAAa31C,SAZS,SAAU0S,IAGkB,IAA1CtD,EAAMilC,SAASlnC,QAAQuF,EAAMhN,SAC7BgN,EAAMhN,OAAO+E,cAAciI,EAAM/I,eASzC,IAAIqsC,EAAYL,EAAat0C,OAAO00C,GACpC92C,KAAKgyC,WAAWjxC,SAAQ,SAAU+J,GAAM,OAAOA,EAAGisC,MAClD,mBAAoBA,IAiBxBj8B,EAAYjZ,UAAUgK,eAAiB,SAAUpF,GAC7C,iCAAkC,iBAAkBA,GACpD,IAAIuwC,EAAUh3C,KAAKo1C,SAMnB,OAJI4B,EAAQ1tC,QADY,SAAUiiB,GAAO,OAAOA,EAAIjgB,MAAQ7E,EAAO6E,KAAOigB,EAAIngB,QAAU3E,EAAO2E,SACzDgE,QAClC,iCAAkC,+BAAgC3I,GACtEuwC,EAAQv2C,KAAKgG,GACbzG,KAAK4sB,OACE,YAEU,IADHoqB,EAAQ9oC,QAAQzH,IAK1B,iCAAkC,mBAAoBA,IACtD,QAAWuwC,EAAX,CAAoBvwC,IAJhB,iCAAkC,uCAAwCA,KAYtFqU,EAAYjZ,UAAUo1C,UAAY,WAC9B,OAAOj3C,KAAKo1C,SAASzmC,KAAI,QAAK,SAOlCmM,EAAYjZ,UAAUq1C,OAAS,WAC3B,OAAOl3C,KAAKo1C,SAAS9rC,QAAO,QAAK,YAAYqF,KAAI,QAAK,UA2D1DmM,EAAYoI,QAAU,SAAUmzB,EAAc5vC,GAAU,OAAO,SAAUiE,GAErE,GAAIjE,EAAO2E,QAAUV,EAAW3C,SAASqD,MACrC,OAAO,EAEX,IAAI+8B,EAAKz9B,EAAW3C,SAChBovC,EAAahP,EAAGptB,YAAY+H,MAAM,KAClCs0B,EAAc3wC,EAAO6E,IAAIwX,MAAM,KAGnC,KAAK,QAAOq0B,EAAYC,EAAYt1C,MAAM,EAAIq1C,EAAW/nC,SACrD,OAAO,EAGX,IAAIioC,EAAY,EAAIF,EAAW/nC,aAAU+E,EACrCmjC,EAAoBF,EAAYt1C,MAAM,EAAGu1C,GAAWpkC,KAAK,KACzDskC,EAAgBlB,EAAaiB,GAAmB3uB,gBACpD,OAAOwf,EAAGltB,wBAA0Bs8B,GAAiBA,EAAc/xC,QAEhEsV,EA1QqB,wDCfhC,SAAUyL,EAAQ1mB,GAAU,aAyD5B,IAAI23C,EAAoB,gBAEpBC,EAAe53C,EAAQC,OAAO,SAAU,CAAC,OACrB43C,KAAK,CAAEC,eAAgB,UACvB53C,SAAS,SAkCjC,WACE,IAAIwL,EAAS,CACXqsC,YAAY,EACZC,aAAa,EACbC,cAAc,EACdC,cAAc,EACdC,cAAc,EACdC,aAAa,EACbC,WAAW,EACXC,UAAU,EACVC,aAAa,EACbC,kBAAkB,GAgCpB,SAASC,EAAUzlC,EAAU0lC,EAAUC,EAAqBC,GAC1D,OAAO,SAAS31C,EAAOoe,EAAMpO,GAC3B,IAAIA,EAAKpQ,eAAe80C,GAAxB,CAEA,IAAIkB,EAAgB5lC,EAAKkd,WAAWuoB,IAChChtC,EAAOmtC,IAAmBC,EAAYz3B,EAAMs3B,IAAyB1lC,EAAK4lC,IAC5E51C,EAAMyB,OAAOuO,EAAKD,IAAW,SAAS+lC,GAEpCA,EAAUH,GAAUG,IAAYA,EAChC13B,EAAKpO,KAAKylC,EAAUK,QAb5B54C,KAAKuL,OAAS,SAASstC,GACrBttC,EAAS1L,EAAQiB,OAAOyK,EAAQstC,IAkElC74C,KAAKU,KAAO,WACV,MAAO,CACL6K,OAAQ,SAAS1F,GACf,OAAO0F,EAAO1F,IAEhBizC,YAAaR,OA5IfE,EAAsB,CAAC,SAAU,IAAK,QAAS,WAAY,SAAU,UAAW,WAEhFG,EAAc,SAASz3B,EAAM63B,GAC/B,IAAiD,IAA7CA,EAAc7qC,QAAQgT,EAAK,GAAG83B,UAChC,OAAO,GA8IXvB,EAAa50C,UAAU,SAAU,CAAC,QAAS,SAASo2C,GAClD,OAAOA,EAAMH,YAAY,SAAU,cAAe,IAAI,MAEvDj2C,UAAU,SAAU,CAAC,QAAS,SAASo2C,GACtC,OAAOA,EAAMH,YAAY,SAAU,cAAe,IAAI,MAEvDj2C,UAAU,UAAW,CAAC,QAAS,SAASo2C,GACvC,OAAOA,EAAMH,YAAY,UAAW,eAAgBN,GAAqB,MAE1E31C,UAAU,YAAa,CAAC,QAAS,SAASo2C,GACzC,OAAOA,EAAMH,YAAY,YAAa,eAAgBN,GAAqB,MAE5E31C,UAAU,aAAc,CAAC,QAAS,SAASo2C,GAC1C,OAAOA,EAAMH,YAAY,aAAc,gBAAiBN,GAAqB,MAE9E31C,UAAU,aAAc,CAAC,QAAS,SAASo2C,GAC1C,OAAOA,EAAMH,YAAY,aAAc,gBAAiBN,GAAqB,MAE9E31C,UAAU,UAAW,CAAC,QAAS,SAASo2C,GAEvC,SAASC,EAAiBpmC,EAAMqmC,EAAgBj4B,EAAMk4B,GACpD,OAAOH,EAAM1tC,OAAO4tC,KACjBj4B,EAAKpO,KAAKA,KACVsmC,IAAsBT,EAAYz3B,EAAMs3B,MAClB,WAAtBt3B,EAAKpO,KAAK,SAA6C,UAArBoO,EAAK,GAAG83B,UAG/C,SAASK,EAAiBC,EAAMp4B,GAI9B,OAAQA,EAAKpO,KAAK,SAAYoO,EAAKpO,KAAK,UAAYwmC,IAAUX,EAAYz3B,EAAMs3B,GAYlF,MAAO,CACLrxC,SAAU,IACVxB,QAAS,UACTyB,SAAU,IACVC,QAAS,SAAS6Z,EAAMpO,GACtB,IAAIA,EAAKpQ,eAAe80C,GAAxB,CAEA,IAAI+B,EAhBR,SAAkBzmC,EAAMoO,GACtB,IAAIhS,EAAO4D,EAAK5D,KACZoqC,EAAOxmC,EAAKwmC,KAEhB,MAA2B,cAAlBpqC,GAAQoqC,IAAiC,qBAATA,EAA+B,WAC7C,WAAlBpqC,GAAQoqC,IAAiC,kBAATA,EAA4B,QACpD,UAATpqC,GAA0C,gBAAToqC,GAAmC,WAATA,EAAqB,QAAU,GAUpFE,CAAS1mC,GAErB,MAAO,CACL2mC,KAAM,SAAS32C,EAAOoe,EAAMpO,EAAM4mC,GAChC,IAAIC,EAAgBT,EAAiB,WAAY,WAAYh4B,GAAM,GAEnE,SAAS04B,IACP,OAAOF,EAAQG,YAcjB,OAAQN,GACN,IAAK,QACL,IAAK,WACCF,EAAiBE,EAAOr4B,IAC1BA,EAAKpO,KAAK,OAAQymC,GAEhBL,EAAiB,eAAgB,cAAeh4B,GAAM,IACxDpe,EAAMyB,OAAOq1C,EAAiC,UAAVL,EAlB1C,SAA0BO,GAGxB,IAAIlB,EAAW9lC,EAAKtO,OAASk1C,EAAQK,WACrC74B,EAAKpO,KAAK,eAAgB8lC,IAG5B,WACE13B,EAAKpO,KAAK,gBAAiB4mC,EAAQM,SAASN,EAAQK,eAa9CJ,GACFz4B,EAAKpO,KAAK,WAAY,GAExB,MACF,IAAK,QAIH,GAHIumC,EAAiBE,EAAOr4B,IAC1BA,EAAKpO,KAAK,OAAQ,UAEhBmmC,EAAM1tC,OAAO,aAAc,CAC7B,IAAI0uC,GAAqB/4B,EAAKpO,KAAK,mBAC9BA,EAAKpQ,eAAe,QAAUoQ,EAAKpQ,eAAe,UACnDw3C,GAAqBh5B,EAAKpO,KAAK,mBAC9BA,EAAKpQ,eAAe,QAAUoQ,EAAKpQ,eAAe,UACnDy3C,GAAqBj5B,EAAKpO,KAAK,iBAE/BmnC,GACFnnC,EAAKsnC,SAAS,OAAO,SAAgCN,GACnD54B,EAAKpO,KAAK,gBAAiBgnC,MAG3BI,GACFpnC,EAAKsnC,SAAS,OAAO,SAAgCN,GACnD54B,EAAKpO,KAAK,gBAAiBgnC,MAG3BK,GACFr3C,EAAMyB,OAAOq1C,GAAuB,SAAgCE,GAClE54B,EAAKpO,KAAK,gBAAiBgnC,MAI7BH,GACFz4B,EAAKpO,KAAK,WAAY,IAKvBA,EAAKpQ,eAAe,eAAiBg3C,EAAQW,YAAYC,UACzDpB,EAAiB,gBAAiB,eAAgBh4B,GAAM,IAE3DpO,EAAKsnC,SAAS,YAAY,WACxBl5B,EAAKpO,KAAK,kBAAmBA,EAAe,aAI5ComC,EAAiB,eAAgB,cAAeh4B,GAAM,IACxDpe,EAAMyB,QAAO,WACX,OAAOm1C,EAAQa,YACd,SAA+BT,GAChC54B,EAAKpO,KAAK,iBAAkBgnC,cAQzCj3C,UAAU,aAAc,CAAC,QAAS,SAASo2C,GAC1C,OAAOA,EAAMH,YAAY,aAAc,gBAAiBN,GAAqB,MAE9E31C,UAAU,cAAc,WACvB,MAAO,CACLsE,SAAU,IACVxB,QAAS,cACT4C,KAAM,SAASzF,EAAOoe,EAAMpO,EAAM0nC,GAC5B1nC,EAAKpQ,eAAe80C,IAEnBt2B,EAAKpO,KAAK,cACboO,EAAKpO,KAAK,YAAa,kBAK9BjQ,UAAU,UAAU,CAAC,QAAS,SAAU,SAASo2C,EAAO93C,GACvD,MAAO,CACLgG,SAAU,IACVE,QAAS,SAAS6Z,EAAMpO,GACtB,IAAIA,EAAKpQ,eAAe80C,GAAxB,CAEA,IAAI72C,EAAKQ,EAAO2R,EAAK2nC,SACrB,OAAO,SAAS33C,EAAOoe,EAAMpO,GAEtB6lC,EAAYz3B,EAAMs3B,KAEjBS,EAAM1tC,OAAO,sBAAwB2V,EAAKpO,KAAK,SACjDoO,EAAKpO,KAAK,OAAQ,UAGhBmmC,EAAM1tC,OAAO,cAAgB2V,EAAKpO,KAAK,aACzCoO,EAAKpO,KAAK,WAAY,IAGpBmmC,EAAM1tC,OAAO,gBAAmBuH,EAAK4nC,WAAc5nC,EAAK6nC,YAAe7nC,EAAK8nC,SAC9E15B,EAAK5gB,GAAG,WAAW,SAASC,GAC1B,IAAIs6C,EAAUt6C,EAAMu6C,OAASv6C,EAAMs6C,QAEnB,KAAZA,GAA8B,KAAZA,KAEwC,IAAxDrC,EAAoBtqC,QAAQ3N,EAAM8F,OAAO2yC,WAAqBz4C,EAAM8F,OAAO00C,mBAG7Ex6C,EAAMgD,iBAERT,EAAMmB,QAGR,WACEtD,EAAGmC,EAAO,CAAEk4C,OAAQz6C,mBASnCsC,UAAU,aAAc,CAAC,QAAS,SAASo2C,GAC1C,OAAO,SAASn2C,EAAOoe,EAAMpO,GACvBA,EAAKpQ,eAAe80C,KAEpByB,EAAM1tC,OAAO,aAAgB2V,EAAKpO,KAAK,aAAgB6lC,EAAYz3B,EAAMs3B,IAC3Et3B,EAAKpO,KAAK,WAAY,OA9Z5B,CAoaGyT,OAAQA,OAAO1mB,iECzalBA,QAAQC,OAAO,WAAY,CAAC,OAC3B+C,UAAU,WAAY,CAAC,KAAM,SAAUkE,GACvC,aAgCA,MAAO,CACNjE,MAAM,CACL42C,QAAe,IACf73B,IAAe,QACfiF,IAAe,QACfgD,KAAe,SACfmxB,SAAe,aACfC,SAAe,aACfC,UAAe,cACfC,UAAe,cACfC,WAAe,eACfC,WAAe,eACfC,aAAe,iBACfC,MAAe,UACfC,MAAe,UACfC,YAAe,gBACfC,YAAe,iBAEhBvqC,YAAa,2BACPzL,QAAS,UACToP,SAAS,EACTxM,KAlDI,SAAUtH,EAAQyG,EAAUxG,GAElCA,EAAO+5C,WACVh6C,EAAOg6C,SAAW,WAAW,OAAO,IAGjC/5C,EAAOi6C,YACVl6C,EAAOk6C,UAAY,WAAW,OAAO,IAGlCj6C,EAAOw6C,cACVz6C,EAAOy6C,YAAc,WAAW,IAAIviB,EAAIpyB,EAAGkF,QAAsB,OAAbktB,EAAExsB,UAAkBwsB,EAAE11B,UAGvEvC,EAAOs6C,QACVv6C,EAAOu6C,MAAQ,cAGZt6C,EAAOy6C,cACV16C,EAAO06C,YAAc,WAAW,IAAIxiB,EAAIpyB,EAAGkF,QAAsB,OAAbktB,EAAExsB,UAAkBwsB,EAAE11B,UAGvEvC,EAAOu6C,QACVx6C,EAAOw6C,MAAQ,eA4BVz6C,WAAY,yBAInBA,WAAW,qBAAsB,CAAC,SAAU,WAAY,SAAWC,EAAQuC,GAC3E,aAEAvC,EAAO26C,UAAar1B,OAAO7jB,eAAe,iBAAmB6jB,OAAOs1B,UAAUC,iBAAmB,EACjG76C,EAAO86C,SAAWl8C,QAAQoiB,KAAKhhB,EAAOy4C,SAEtCz4C,EAAO4gB,IAAM5gB,EAAO4gB,KAAO,EAC3B5gB,EAAO6lB,IAAM7lB,EAAO6lB,KAAO,EAC3B7lB,EAAO6oB,KAAO7oB,EAAO6oB,MAAQ,GAE7B7oB,EAAOi6C,SAAWj6C,EAAO86C,WAAa96C,EAAOy4C,QAE7Cz4C,EAAOm6C,UAAYn6C,EAAOm6C,WAAa,GACvCn6C,EAAO+6C,cAAgB/6C,EAAOm6C,UAAYn6C,EAAO6oB,KACjD7oB,EAAOo6C,WAAap6C,EAAOo6C,YAAc,GACzCp6C,EAAOq6C,WAAar6C,EAAOq6C,YAAcr6C,EAAOm6C,UAChDn6C,EAAOs6C,aAAet6C,EAAOs6C,cAAgBt6C,EAAOo6C,WAEpD,IAAI1nB,EAAO1yB,EAAO6lB,IAAM7lB,EAAO4gB,IAC/Bo6B,EAAQtoB,EAAO1yB,EAAO6oB,KACtBoyB,EAAUj7C,EAAOsD,OAAO,WAAW,WAClCtD,EAAOi6C,SAAWj6C,EAAO86C,WAAa96C,EAAOy4C,WAG9CyC,EAAW,SAAUC,GACpB,OAAQA,EAAM,GAAKH,EAAQtoB,GAG5B1yB,EAAOo7C,cAAgB,WACtB,OAAO,IAAIz6C,MAAMq6C,IAGlBh7C,EAAOq7C,cAAgB,SAAUF,GAChC,IAAIG,EAAQ,EAAEt7C,EAAO6oB,KAErB,OADW7oB,EAAOm6C,UAAUmB,GAAQH,EAAMG,IAI3Ct7C,EAAOu7C,WAAa,SAAUJ,GAC7B,OAAOD,EAASC,IAAUn7C,EAAOy4C,QAAQz4C,EAAO4gB,KAGjD5gB,EAAOw7C,aAAe,WACjBx7C,EAAOk6C,cAAgBl6C,EAAOg6C,YACjCh6C,EAAO06C,YAAY,CAACe,OAAOz7C,EAAOy4C,UAAU3uC,MAAK,WAChD9J,EAAOy4C,QAAUz4C,EAAO4gB,IACxB5gB,EAAOw6C,MAAM,CAACiB,OAAOz7C,EAAOy4C,cAK/Bz4C,EAAO07C,SAAW,SAAUP,GAC3B,IAAKn7C,EAAOg6C,WAAY,CACvB,IAAI2B,EAAW/8C,QAAQoiB,KAAKhhB,EAAO4gB,IAAMs6B,EAASC,IAElDn7C,EAAOy6C,YAAY,CAACgB,OAAOE,IAAW7xC,MAAK,WAC1C9J,EAAOy4C,QAAUkD,EACjBp5C,GAAS,WACRvC,EAAOu6C,MAAM,CAACkB,OAAOz7C,EAAOy4C,kBAMhCz4C,EAAOsB,IAAI,YAAY,WACtB25C,UAID3jC,IAAI,CAAC,iBAAkB,SAAUjI,GACjC,aAEAA,EAAeusC,IAAI,2BAElB,0iDCtHF,SAASC,EACP7mC,EACAL,EACA6C,EACAskC,EACAh2C,EACAi2C,EACAC,EACAC,EACAC,EACA35C,GAEA,MAAM45C,EAAKp9C,KA4CX,SAASq9C,EAAOC,GAEdN,EAAqBO,cAAcL,EAAgB,CAAEI,GAAAA,IAClDvyC,MAAMvG,IAhBX,IAAqBg5C,EAiBfvnC,EAAWwnC,OAASj5C,EAjBLg5C,GAkBI,IAAPF,EAAc,OAAS,OAjBvC1nC,EAAQwE,OAAOsjC,YACb,CACEF,IAAAA,GAEF,KAcEh6C,GAAS,KACPyS,EAAWhS,eAGdoe,MAAM26B,EAAqBW,gBA6MhCP,EAAG/vC,QArGH,WACEmZ,QAAQo3B,MAAM,oCAAqC3nC,EAAW4nC,SAC9D5nC,EAAW6nC,OAAS,OAEpB,MAAMC,EAAY9nC,EAAW+nC,SAASC,MAChCC,EAAajoC,EAAW+nC,SAASG,UACjCC,EACJnoC,EAAW+nC,SAASK,iBAAmBpoC,EAAW+nC,SAASG,UACvDG,EAAeroC,EAAW+nC,SAASO,aACnCC,EAAmBvoC,EAAW+nC,SAASS,gBACvCC,EAAgB58B,KAAKgF,IACzBT,SAASs4B,gBAAgBC,aACzBr4B,OAAOs4B,aAAe,GAElBC,EAAez4B,SAASs4B,gBAAgBI,YAG9C14B,SAASs4B,gBAAgBK,MAAMC,YAAY,oBAAqBlB,GAChE13B,SAASs4B,gBAAgBK,MAAMC,YAAY,qBAAsBf,GACjE73B,SAASs4B,gBAAgBK,MAAMC,YAC7B,4BACAb,GAEF/3B,SAASs4B,gBAAgBK,MAAMC,YAC7B,uBACAX,GAEFj4B,SAASs4B,gBAAgBK,MAAMC,YAC7B,2BACAT,GAEFn4B,SAASs4B,gBAAgBK,MAAMC,YAC7B,wBACAP,GAEFr4B,SAASs4B,gBAAgBK,MAAMC,YAC7B,uBACAH,GAGF,IAAII,GAAK,EAET,MAAMC,EAA8B36C,GAChB,OAAVA,GAAkBA,EAAMyR,EAAWJ,WAAc,GAGrDupC,EAAwBpC,EAAqBqC,QACjDlC,GACApyC,KAAKo0C,GACDG,EAAuBtC,EAAqBqC,QAChDnC,GACAnyC,KAAKo0C,GACPp4C,EAAG0U,IAAI,CAAC2jC,EAAuBE,IAC5Bv0C,MAAK,IAAiC,IAA/Bw0C,EAAcC,GAAiB,EACrCvpC,EAAW4nC,QAAU0B,EACrBtpC,EAAWwnC,OAAS+B,EAEhBvpC,EAAW4nC,QAAQ4B,aAAexpC,EAAWwnC,OAAOH,GACtD4B,GAAK,EAELjpC,EAAWwnC,OAAOH,IAAK,EAGa,iBAAlCrnC,EAAW+nC,SAAS0B,WACtBrC,EAAO6B,GAxMbzmC,EAAOi5B,GAjBT,WAAoB,QAClB,MAAMiO,EAAS1pC,EAAW+nC,SAAS2B,OAC7B9B,IAAU5nC,MAAAA,GAAA,UAAAA,EAAY4nC,eAAZ,mBAAqB4B,mBAArB,UAAkCp0C,IAE5Cu0C,EACJrQ,OAAOt5B,EAAW+nC,SAAS6B,kBAC3BtQ,OAAOt5B,EAAW+nC,SAAS8B,qBACzBvQ,OAAOt5B,EAAW+nC,SAAS6B,iBAE/B,SAAMhC,IAAa+B,GAAYD,GAQrBI,GAAa,aAAe,cAAe,KAAM,CACzDlqC,SAAU,YA6MR,IAAI2nC,EAAM,GAKRA,EAHAvnC,EAAW+nC,SAAS2B,SACnB1pC,EAAW+nC,SAASgC,gBAEf,OAEA,UAGRpqC,EAAQwE,OAAOsjC,YACb,CACEF,IAAAA,EACAO,UAAAA,EACAG,WAAAA,EACAQ,cAAAA,EACAI,aAAAA,GAEF,KAGF,MAAME,EAAQ34B,SAAS45B,cAAc,SACrC55B,SAASpB,KAAKi7B,YAAYlB,GAC1BA,EAAMmB,MAAMC,WACV,2BAA6BnqC,EAAW+nC,SAASC,MAAQ,kBAG5D57B,MAAM26B,EAAqBW,iBAKhCP,EAAGiD,MA3MH,WACE,MAAMZ,EAAcxpC,EAAW4nC,QAAQ4B,YAEvC,GAAIA,GAAeA,EAAYp0C,GAAI,CAEjC,MAAMi1C,EAAUvD,EACbuD,UACAlmC,OAAOva,QAAQkD,QAAQsjB,SAASk6B,cAAc,eAC9CC,qBAAoB,GACpBrN,MACCl9B,EAAW+nC,SAASyC,iBAClB,yCAEHC,GAAG,MACHv8C,OAAO,UAEV44C,EACG4D,KAAKL,GACLv1C,MAAK,WACJ,OAAOkyC,EAAI2D,gBAAgBC,aAAa,CACtCx1C,GAAIo0C,EAAYp0C,GAChBy1C,QAAQ,EACRC,YAAa,YAEZC,YAEJj2C,MAAK,WACJ0N,EAAOi5B,GAAG,cAAe,KAAM,CAC7B77B,SAAU,eAGbwM,OAAM,SAAU6K,GACf1G,QAAQnhB,MAAM,YAAa6nB,QA4KnCkwB,EAAGC,OAASA,EACZD,EAAG6D,SAxKH,WACE,MAAM3M,EAAWvtC,EAAGkF,QACdwzC,EAAcxpC,EAAW4nC,QAAQ4B,YA2DvC,OAzDIA,GAAeA,EAAYp0C,IAC7B4xC,EAAI2D,gBACDM,YAAY,CACXC,MAAO1B,EAAYp0C,GACnB+1C,YAAY,IAEbJ,SAASj2C,MAAK,SAAUpD,GACvB2sC,EAAS3nC,QACP00C,GAAAA,CAAK15C,EAAK25C,KAAKx/C,MAAM,IAAI,SAAUy/C,GACjC,IAAIC,EASJ,GAPsB,OAAlBD,EAAIE,YACND,EACEvrC,EAAW+nC,SAAS0D,eACpBzrC,EAAW4nC,QAAQ3uB,MACnB,UAAYqyB,EAAII,WAGE,QAAlBJ,EAAIE,UACN,OAAQxrC,EAAW+nC,SAAS4D,iBAC1B,IAAK,gBACHJ,EAASD,EAAIM,OACT5rC,EAAW+nC,SAAS8D,WAAaP,EAAIM,OACrC,SACJ,MAEF,IAAK,cACHL,EAASD,EAAIM,OACTN,EAAIQ,KAAKC,OAAST,EAAIQ,KAAKE,SAC3B,SACJ,MAEF,IAAK,iBACHT,EAASD,EAAIM,OAASN,EAAIQ,KAAKE,SAAW,SAC1C,MAEF,QACET,EAASD,EAAIM,OACT5rC,EAAW+nC,SAAS8D,WAAaP,EAAIM,OACrC,SAKV,MAAO,CACLL,OAAQA,EACR1d,QAASyd,EAAIW,KACbC,UAAWC,GAAAA,CAAOb,EAAIY,WAAWv6B,OAAO,+BAK/CvF,OAAM,SAAU6K,GACf1G,QAAQnhB,MAAM6nB,MAIbonB,EAAS7wC,SA4GlB25C,EAAGiF,eA5OH,WACE,MAA4C,YAArCpsC,EAAW+nC,SAASsE,aAA6B,OAAS,OA4OnE,MAAMC,EAAgB,CACpB5C,OAAQ,CAAC,SAAU,OAAQ,UAAW,UAAW,aACjD6C,QAAS,CAAC,YAKZjvC,OAAO+6B,eAAer4B,EAAY,cAAe,CAC/CvF,MACE,IAAIpK,EAAS2P,EAAW+nC,SAASyE,aAMjC,OALIF,EAAc5C,OAAOrmC,SAASrD,EAAW6nC,QAC3Cx3C,EAAS2P,EAAW+nC,SAAS0E,cACpBH,EAAcC,QAAQlpC,SAASrD,EAAW6nC,UACnDx3C,EAAS2P,EAAW+nC,SAAS2E,gBAExBr8C,KAIXigB,OAAOq8B,iBACL,WACA,SAAU1sC,GACa,SAAjBA,EAAIvO,KAAKuO,IACXmnC,GAAO,GACmB,SAAjBnnC,EAAIvO,KAAKuO,KAClBmnC,GAAO,MAGX,2eCtTJ,SAASwF,EAAS5sC,EAAYF,GAE5B,MAAM3H,EAAS2H,EAAUo5B,SAGzBl5B,EAAW+nC,SAAW,CACpB8E,OAAQ,UACRC,MAAM,GAGRC,GAAAA,CAAO50C,GAAQ,SAAU5J,EAAOqB,GAChB,KAAVrB,GAAiBy+C,GAAAA,CAAOz+C,KACZ,SAAVA,IACFA,GAAQ,GAGI,UAAVA,IACFA,GAAQ,GAGVyR,EAAW+nC,SAASn4C,GAAOrB,MAI/ByR,EAAWJ,SAAWI,EAAW+nC,SAASnoC,SAC1CI,EAAWwnC,OAAS,CAAEH,IAAI,GAC1BrnC,EAAW4nC,QAAU,GAWvB,SAASqF,EACPC,EACA9uC,EACA+uC,EACAC,EACAC,GAEAjvC,EAAkBgB,WAAU,GAGvB+tC,EAAcnjD,SAAS0R,QAAQjB,MAClC0yC,EAAcnjD,SAAS0R,QAAQjB,IAAM,IAIvC0yC,EAAcnjD,SAAS0R,QAAQjB,IAAI,qBACjC,gCAEF0yC,EAAcnjD,SAAS0R,QAAQjB,IAAI,iBAAmB,WACtD0yC,EAAcnjD,SAAS0R,QAAQjB,IAAI6yC,OAAS,WAG5CF,EAA4BG,UAAUF,GAGtCH,EACG11C,MAAM,MAAO,CACZkxB,UAAU,IAEXlxB,MAAM,cAAe,CACpBgE,IAAK,WACLL,YAAaqyC,EACbziD,WAAY,4BAEbyM,MAAM,aAAc,CACnBgE,IAAK,UACLL,YAAasyC,EACb1iD,WAAY,2BAEbyM,MAAM,cAAe,CACpBgE,IAAK,WACLL,YAAauyC,EACb3iD,WAAY,4BAEbyM,MAAM,WAAY,CACjBgE,IAAK,QACLL,YAAawyC,EACb5iD,WAAY,yBAEbyM,MAAM,gBAAiB,CACtBgE,IAAK,aACLL,YAAayyC,EACb7iD,WAAY,8BAEbyM,MAAM,cAAe,CACpBgE,IAAK,WACLL,YAAa0yC,EACb9iD,WAAY,0OC3FlB,SAAS+iD,EACP9tC,EACAwC,EACAurC,EACA/G,EACAl2C,EACAi2C,EACAG,EACAD,GAEA,MAAME,EAAKp9C,KAIX,SAASmmC,EAAY3gC,GACnB,OAAO,SAAU0nB,GACfkwB,EAAG6G,OAAOz+C,GAAQ0nB,EAAIvlB,KAEtB,MAAMu8C,EAAQF,EACXG,SACAC,YACCnuC,EAAW+nC,SAASqG,0BAClB,yBAEHC,WAAW,oBACXC,SAAS,OAEZP,EAASrD,KAAKuD,IAIlB,SAASM,IACPvuC,EAAWwuC,SAAU,EAkBvB,SAASC,IACHzuC,EAAW+nC,SAAS2B,OACtBlnC,EAAOi5B,GAAG,aAAc,KAAM,CAAE77B,SAAU,YAE1C4C,EAAOi5B,GAAG,cAAe,KAAM,CAAE77B,SAAU,YAI/C,SAAS4lC,IACP2B,EAAGuH,KAAO,GACVvH,EAAGwH,QAAU,KACbxH,EAAGyH,UAAY,KACfzH,EAAG0H,SAASC,eACZ3H,EAAG0H,SAASE,uBAEL/uC,EAAW4nC,QAAQ4B,YAE1BxpC,EAAWgvC,gBAAiB,EAiD9B7H,EAAG/vC,QAjFH,WACEmZ,QAAQo3B,MAAM,sCAAuC3nC,EAAW4nC,SAChE5nC,EAAW6nC,OAAS,UAGpB/2C,EAAG0U,IAAI,CACLuhC,EAAqBkI,WAAW/H,GAC7BpyC,MAAK,IAAMyb,QAAQo3B,MAAM,6BACzBv7B,MAAM26B,EAAqBW,gBAC9BX,EAAqBkI,WAAWhI,GAC7BnyC,MAAK,IAAMyb,QAAQo3B,MAAM,4BACzBv7B,MAAM26B,EAAqBW,kBAC7B5yC,MAAK,IAAOkL,EAAWwuC,SAAU,KAsEtCrH,EAAG+H,OA1CH,WACElvC,EAAWwuC,SAAU,EAEjBxuC,EAAW4nC,QAAQ4B,aAAexpC,EAAW4nC,QAAQ4B,YAAYp0C,GACnE4xC,EAAI2D,gBACDP,MACC+E,GAAAA,CACE,CACE/5C,GAAI4K,EAAW4nC,QAAQ4B,YAAYp0C,GACnCg6C,WAAYpvC,EAAW+nC,SAASqH,WAChCC,SACErvC,EAAW+nC,SAAS0D,eAAiBzrC,EAAW4nC,QAAQ3uB,MAE5DkuB,EAAGuH,OAGN3D,SAASj2C,MAAK,kBACNqyC,EAAG6G,OAAOkB,OAEjB,MAAMjB,EAAQF,EACXG,SACAC,YACCnuC,EAAW+nC,SAASuH,0BAClB,2BAEHjB,WAAW,oBACXlqC,OAAOva,QAAQkD,QAAQsjB,SAASk6B,cAAc,mBAEjDyD,EAASrD,KAAKuD,MAEfn5C,KAAK0wC,GACL1wC,KAAK25C,GACLriC,MAAM8jB,EAAY,WAClBqf,QAAQhB,IAEXA,IACAre,EAAY,YAOhBiX,EAAGqI,KAhDH,WACEhK,IACAiJ,KAgDFtH,EAAGuH,KAAO,GACVvH,EAAG6G,OAAS,GCjId,SAASyB,EAAWzvC,EAAY0vC,GAC9B,MAAMC,EAAgB,CACpBv6C,GAAI,MACJkW,MAAOtL,EAAW+nC,SAASz8B,OAGvB07B,EAAM,GAyEZ,OAvEAA,EAAI4I,QAAU5vC,EAAW+nC,SAAS8H,OAAS,QAE3C7I,EAAI8I,YAAcJ,EAChB1I,EAAI4I,QAAU,oBACdD,EACA,CACE3c,OAAQ,CACN+c,OAAQ,OACRv0C,IAAKwrC,EAAI4I,QAAU,4BAErBrD,QAAS,CACPwD,OAAQ,OACRv0C,IAAKwrC,EAAI4I,QAAU,6BAErBI,UAAW,CACTD,OAAQ,MACRv0C,IAAKwrC,EAAI4I,QAAU,8BAKzB5I,EAAI2D,gBAAkB+E,EACpB1I,EAAI4I,QAAU,wBACdD,EACA,CACExpC,OAAQ,CACN4pC,OAAQ,MACRv0C,IAAKwrC,EAAI4I,QAAU,yBAErBhF,aAAc,CACZmF,OAAQ,MACRv0C,IAAKwrC,EAAI4I,QAAU,uCAErBxF,MAAO,CACL2F,OAAQ,MACRv0C,IAAKwrC,EAAI4I,QAAU,+BAErB3E,YAAa,CACX8E,OAAQ,MACRv0C,IAAKwrC,EAAI4I,QAAU,wCAErBK,iBAAkB,CAChBF,OAAQ,OACRv0C,IAAKwrC,EAAI4I,QAAU,0CACnBl0C,QAAS,CACP,oBAAgBwC,GAElBgyC,iBAAkBtmD,QAAQ6c,UAE5B0pC,mBAAoB,CAClBJ,OAAQ,MACRv0C,IAAKwrC,EAAI4I,QAAU,6CAErBQ,QAAS,CACPL,OAAQ,MACRv0C,IAAKwrC,EAAI4I,QAAU,mCAKzB5I,EAAIqJ,YAAcX,EAChB1I,EAAI4I,QAAU,oBACdD,EACA,CACExpC,OAAQ,CACN4pC,OAAQ,MACRv0C,IAAKwrC,EAAI4I,QAAU,uBAKlB5I,mTChET,SAASsJ,EACPtlD,EACAgV,EACAzS,EACAgjD,EACAC,EACAhuC,EACApI,EACA4sC,EACAD,EACAG,EACAD,GAEA,MAAME,EAAKp9C,KACX,IAAI0mD,EACAC,EACAC,EACAC,EAqBJ,SAASC,IAEP//C,EAAAA,GAAAA,IAAO,CACLi2C,EAAqBkI,WAAW/H,GAC7BpyC,MAAK,IAAMyb,QAAQo3B,MAAM,6BACzBv7B,MAAM26B,EAAqBW,gBAC9BX,EAAqBkI,WAAWhI,GAC7BnyC,MAAK,IAAMyb,QAAQo3B,MAAM,4BACzBv7B,MAAM26B,EAAqBW,kBAC7B5yC,MAAK,KAhBJkL,EAAW+nC,SAAS2B,OACtBlnC,EAAOi5B,GAAG,aAAc,KAAM,CAAE77B,SAAU,YAE1C4C,EAAOi5B,GAAG,cAAe,KAAM,CAAE77B,SAAU,eAoB/C,SAASkxC,IACPvjD,GAAS,WACP,MAAMT,EAAU0jD,EAAU,GAAGO,uBAAuB,iBAAiB,GAEjEjkD,IACFA,EAAQkkD,UAAYlkD,EAAQmkD,iBAMlC,SAAS/gB,EAAY3gC,GACnB,OAAO,SAAU0nB,GACfkwB,EAAG6G,OAAOz+C,GAAQ0nB,EAAIvlB,KAEtBo/C,KAIJ,SAASI,EAAYrjB,GACnBmZ,EAAI8I,YACD9c,OAAOnF,GACPkd,SAASj2C,MAAK,SAAUpD,UAChBy1C,EAAG6G,OAAOmD,iBAEjB,IAAIC,GAAkB,EAClBpE,GAAAA,CAAOhtC,EAAW4nC,QAAQ4B,eAC5BxpC,EAAW4nC,QAAQ4B,YAAc,CAC/Bp0C,GAAI1D,EAAK83C,YAAYp0C,IAEvBg8C,GAAkB,GAEfpxC,EAAW4nC,QAAQyJ,qBACtBrxC,EAAW4nC,QAAQyJ,oBAAqB,EACxCD,GAAkB,GAGhBA,GACFrK,EAAqBO,cACnBJ,EACAlnC,EAAW4nC,SAEV9yC,MAAMvG,IACLyR,EAAW4nC,QAAUr5C,KAEtB6d,MAAM26B,EAAqBW,gBAEhC+I,EAAU,GAAGa,aAAaC,QAAQ,IAElCT,OAED1kC,MAAM8jB,EAAY,qBAsEvB,SAASshB,IAELxxC,EAAW4nC,SACX5nC,EAAW4nC,QAAQ4B,aACnBxpC,EAAW4nC,QAAQ4B,YAAYp0C,IAE/B4xC,EAAI2D,gBACDlwC,IAAI,CACHrF,GAAI4K,EAAW4nC,QAAQ4B,YAAYp0C,KAEpC21C,SAASj2C,MAAK,SAAUpD,UAChBy1C,EAAG6G,OAAOwD,eAGb9/C,EAAKm5C,SACP7qC,EAAW4nC,QAAQ4B,YAAYqB,QAAS,EACxC9D,EAAqBO,cACnBJ,EACAlnC,EAAW4nC,SAEV9yC,MAAMvG,IACLyR,EAAW4nC,QAAUr5C,KAEtB6d,MAAM26B,EAAqBW,gBAEL,cAArBh2C,EAAK+/C,YACPjvC,EAAOi5B,GAAG,gBAAiB,KAAM,CAAE77B,SAAU,YAE7C4C,EAAOi5B,GAAG,cAAe,KAAM,CAAE77B,SAAU,gBAIhDwM,OAAM,SAAU6K,GACf,OAAQA,EAAI4wB,QACV,KAAK,IACHrlC,EAAOi5B,GAAG,cAAe,KAAM,CAAE77B,SAAU,YAC3C,MACF,KAAK,IACHixC,IACA,MACF,KAAK,IACHruC,EAAOi5B,GAAG,gBAAiB,KAAM,CAAE77B,SAAU,YAC7C,MACF,QACE2Q,QAAQnhB,MAAM6nB,OAQ1B,SAASy6B,EAAM3M,GACb,MAAMkH,EAAOwE,EAAU,GAAGa,aAAaK,UAEnC5M,GAA6B,KAAnBA,EAAOH,SAAkBG,EAAO6M,UAK1C7M,GAA6B,KAAnBA,EAAOH,SAKR,KAATqH,GAKJiF,EACE/B,GAAAA,CACE,CACElD,KAAMA,GAERjsC,EAAW4nC,UAqCjB,SAASqD,IAAc,QACjBjrC,MAAAA,GAAJ,UAAIA,EAAY4nC,eAAhB,iBAAI,EAAqB4B,mBAAzB,OAAI,EAAkCp0C,IACpC4xC,EAAI2D,gBACDM,YAAY,CACXC,MAAOlrC,EAAW4nC,QAAQ4B,YAAYp0C,GACtCy8C,cAAc,EACdz8C,GAAIw7C,QAAiB1yC,IAEtB6sC,SAASj2C,MAAK,SAAUpD,GAIvB,UAHOy1C,EAAG6G,OAAOxE,YAGb93C,EAAKuC,MAAO,CACd,IAAI69C,GAAQ,EACR1qC,EAAI,EACR,IAAKA,EAAI,EAAG0qC,GAAQ,EAAO1qC,EAAI1V,EAAK25C,KAAKlyC,OAAQiO,IAAK,CACpD,MAAMrI,EAAIgzC,GAAAA,CAAM/xC,EAAWgyC,SAAU,CACnC58C,GAAI1D,EAAK25C,KAAKjkC,GAAGhS,KAEd2J,EAGMrN,EAAK25C,KAAKjkC,GAAGywB,OACtB94B,EAAE84B,MAAO,IAHTia,GAAQ,EACR9xC,EAAWgyC,SAASxnD,KAAKkH,EAAK25C,KAAKjkC,KAMN,QAA3B1V,EAAK25C,KAAKjkC,GAAGokC,WAAwB95C,EAAK25C,KAAKjkC,GAAGywB,OAtC3CziC,EAuCK1D,EAAK25C,KAAKjkC,GAAGhS,GAtChC4xC,EAAIqJ,YACRlqC,OAAO,CACN/Q,GAAIA,EACJyiC,MAAM,IAEPkT,SAAS3+B,OAAM,SAAU6K,GACxB1G,QAAQnhB,MAAM6nB,OAoCN66B,GAEFhB,IAGEp/C,EAAK25C,KAAKjkC,EAAI,GAAGywB,OACnB+Y,EAAgBl/C,EAAK25C,KAAKjkC,EAAI,GAAGhS,IAG/Bw7C,IAAkB5wC,EAAW4nC,QAAQyJ,oBACvCtK,EAAqBO,cAAcJ,EAAiB,IAC/ClnC,EAAW4nC,QACdyJ,oBAAoB,IACnBv8C,MAAMvG,IACPyR,EAAW4nC,QAAUr5C,KAzDnC,IAAuB6G,KA8DhBgX,OAAM,SAAU6K,GACf,OAAQA,EAAI4wB,QACV,KAAK,IACHrlC,EAAOi5B,GAAG,cAAe,KAAM,CAAE77B,SAAU,YAC3C,MACF,KAAK,IACH4C,EAAOi5B,GAAG,gBAAiB,KAAM,CAAE77B,SAAU,YAC7C,MACF,QACE2Q,QAAQnhB,MAAM6nB,OAvU1BkwB,EAAG6G,OAAS,GACZhuC,EAAWgyC,SAAW,GACtB7K,EAAG8K,aAAe,CAChBC,gBAAgB,EAChBC,YAAY,EACZC,OAAO,EACP9/C,MAAM,EACN+/C,WAAY,UA2WdlL,EAAG/vC,QArCH,WACEmZ,QAAQo3B,MAAM,mCAAoC3nC,EAAW4nC,SAC7D5nC,EAAW6nC,OAAS,OACpB7nC,EAAWwuC,SAAU,EACrBxuC,EAAW+nC,SAASuK,UAAW,EAE/BnL,EAAGoL,aAAe,GAGhBvyC,EAAW4nC,QAAQ4B,aACnBxpC,EAAW4nC,QAAQ4B,YAAYqB,OAG/BgG,KAGAW,IAGAd,EAAsBH,EAAUtF,EAAa,KAC7C0F,EAAyBJ,EAAUiB,EAAgB,MAGrDf,EAAY+B,EAAE,iBAAiBlB,aAAa,CAC1CmB,YAAazyC,EAAW+nC,SAAS2K,oBAAsB,iBACvDtoD,OAAQ,CACNuoD,MAAO,SAAUC,EAAQ7N,GACvB2M,EAAM3M,IAER8N,MAAO,WACL9oD,KAAK+oD,gBAQb3L,EAAGuK,MAAQA,EACXvK,EAAG4L,aAzIH,WACE,MAAM9G,EAAOwE,EAAU,GAAGa,aAAaK,UAG1B,KAAT1F,IAKJiF,EACE/B,GAAAA,CACE,CACElD,KAAMA,GAERjsC,EAAW4nC,UAIf6I,EAAU,GAAGa,aAAawB,aAwH5B3L,EAAGx4C,UA7RH,SAAmB+C,GACjB,MAAMshD,EAAK,IAAIC,SAEfD,EAAG5uB,OAAO,OAAQ1yB,EAAK7B,MAEvBuK,EACGopC,KACCxjC,EAAW+nC,SAAS8H,OAClB,0BACA7vC,EAAW4nC,QAAQ4B,YAAYp0C,GAC/B,4BACA4K,EAAW+nC,SAASz8B,MACtB0nC,EACA,CACE9C,iBAAkBtmD,QAAQ6c,SAC1B/K,QAAS,CACP,oBAAgBwC,KAIrBpJ,MAAK,SAAUpD,IACdA,EAAOA,EAAKA,MAEH0D,WACA+xC,EAAG6G,OAAOkF,eAGjBhC,EACE/B,GAAAA,CACE,CACElD,KACE,YACAjsC,EAAW+nC,SAAS8H,OACpB,0BACA7vC,EAAW4nC,QAAQ4B,YAAYp0C,GAC/B,iCACA1D,EAAK0D,GACL,UACA4K,EAAW+nC,SAASz8B,MACpB,qBACA5Z,EAAKnC,KACL,OACF4jD,aAAczhD,EAAK0D,IAErB4K,EAAW4nC,WAIf1X,EAAY,oBAEbA,EAAY,oBA8OnBllC,EAAOsB,IAAI,YA3OX,WACEikD,EAAUriD,OAAOwiD,GACjBH,EAAUriD,OAAOyiD,GAEjBD,EAAsB,KACtBC,EAAyB,QAuO3B3wC,EAAW1T,IAAI,aApOf,SAAoBoF,EAAMnH,GACpBA,GACFA,EAAS6oD,GAAAA,CAAQpzC,EAAWgyC,2VC7KlC,SAASqB,EACProD,EACAgV,EACAszC,EACAtM,EACA+G,EACAt8C,EACA2I,GAEA,MAAM+sC,EAAKp9C,KACX,IAAIwpD,EAAU,KACVC,EAAgB,KACpBxzC,EAAWyzC,UAAY,GAEvB,MAAMC,EAAkB,CACtBC,sBAAsB,EACtBC,mBAAmB,EACnBz+B,QAAS,SAAU5mB,GACjB,MAAqB,kBAAVA,GACDA,EAAQ,IAAM,IAEjBA,IA6GX,SAASslD,WACA1M,EAAG6G,OAAOkB,OACjBlvC,EAAWzJ,MAAM,QAGjB4wC,EAAG2M,OAASC,GAAAA,CAAWP,GAEvBrM,EAAGuH,KAAO,GACVvH,EAAG0H,SAASC,eACZ3H,EAAG0H,SAASE,gBAEZ,MAAMd,EAAQF,EACXG,SACAC,YACCnuC,EAAW+nC,SAASuH,0BAClB,2BAEHjB,WAAW,oBACXlqC,OAAOva,QAAQkD,QAAQsjB,SAASk6B,cAAc,mBAEjDyD,EAASrD,KAAKuD,GA7HhB9G,EAAG6M,YAAc,SAAU1kD,GACzB,OAAOgkD,EAAKU,YAAY1kD,IA+Q1B63C,EAAG8M,iBArDH,SAA0B9N,GAExB,MAAM+N,EAAW/M,EAAG2M,OAAO3N,GACrBgO,EAAa1iD,EAASoZ,KAAK,gBACjC,GAAIspC,EAAWh7C,OAAQ,CACrB,MAAMi7C,EAASxqD,QAAQkD,QACrBqnD,EAAW,GAAG7J,cAAc,mBAExB3tC,EAAQ/S,QAAQkD,QACpBqnD,EAAW,GAAG7J,cAAc,qBAExB+J,EAAQD,EAAOvpC,KAAK,SAEtBwpC,EAAMl7C,QACRk7C,EAAMC,IAAI,UAAW,QAGvBF,EAAO/pD,GAAG,SAAS,KACjBgqD,EAAMC,IAAI,UAAW,QACI,mBAAlB33C,EAAM43C,QACT53C,EAAM43C,QAAQ,SACd53C,EAAM,GAAG63C,WAGf73C,EAAMtS,GAAG,UAAWgiB,IAClBrhB,EAAOgD,QAAO,WACwB,iBAAzBkmD,EAASO,MAAMrlD,QACxB8kD,EAASO,MAAMrlD,MAAQ,MAKzB,MAAMmB,EAAQ5E,MAAMstB,KAAK5M,EAAEjc,OAAOG,OAE5BmkD,EAjSL,QAiSiBR,EAAS5+C,OAAOqa,KACdpf,EAAMokD,MAAM9kD,GAASA,EAAK8f,MAAQ+kC,KAKpDR,EAAShqD,QAAU,GACnBgqD,EAASO,MAAMrlD,MAAQ8kD,EAAS5+C,OAAOs/C,gBAEvCV,EAAShqD,QAAUqG,EAAMmI,KAAK7I,IAC5B,MAAM,KAAEN,EAAF,KAAQogB,EAAR,KAAc1W,GAASpJ,EAC7B,MAAO,CAAEN,KAAAA,EAAMogB,KAAAA,EAAM1W,KAAAA,EAAMpJ,KAAAA,MAG/Bs3C,EAAGuH,KAAKwF,EAASO,MAAMvX,OAASgX,EAAShqD,gBAkBjDi9C,EAAG0N,eANH,SAAwBX,EAAU/N,GAGhC+N,EAAShqD,QAAQqf,OAAO48B,EAAO,GAC/BgB,EAAGuH,KAAKwF,EAASO,MAAMvX,OAASgX,EAAShqD,SAuB3Ci9C,EAAG2N,eAfH,SAAwBZ,GACtB3jC,QAAQN,IAAI,kBAAmBikC,GAC/B,MAAMC,EAAa1iD,EAASoZ,KAAK,gBAC3BlO,EAAQ/S,QAAQkD,QACpBqnD,EAAW,GAAG7J,cAAc,sBAExB,eAAEyK,EAAF,OAAkBnqC,GAAWspC,EAAS5+C,OACxCy/C,GACFp4C,EAAME,KAAK,WAAY,YAErB+N,GACFjO,EAAM,GAAGq4C,aAAa,SAAUpqC,IAapCu8B,EAAG8N,uBAPH,WACE,MAAMC,EAAWvpD,MAAMstB,KAAKxnB,EAASoZ,KAAK,oBACpCsqC,EAAUD,EAASA,EAAS/7C,OAAS,GACvCg8C,GAAWA,EAAQluC,gBACrBkuC,EAAQluC,kBAMZkgC,EAAG/vC,QAjTH,WACEmZ,QAAQo3B,MAAM,sCAAuC3nC,EAAW4nC,SAChE5nC,EAAW6nC,OAAS,UAGpBV,EAAGS,QAAU,CACXxyC,GAAI4K,EAAW+nC,SAAS3yC,GACxBggD,cAAe,YACfn8B,KAhBK,YAAco8B,GAAAA,CAAQ,EAAG,MAmBhCr1C,EAAW+nC,SAASuK,UAAW,EAC/BtyC,EAAWwuC,SAAU,EAErBxH,EAAI8I,YACDE,UAAU,CACT56C,GAAI4K,EAAW+nC,SAAS3yC,GACxBs0C,QAAQ,IAETqB,SAASj2C,MAAK,SAAUpD,GACnBA,EAAKuC,QACPs/C,EAAU7hD,EAAK6hD,QACfC,EAAgBO,GAAAA,CAAWriD,EAAK25C,MAChClE,EAAG2M,OAASC,GAAAA,CAAWP,OAG1B1+C,MAAK,WACJ,IAAK,IAAIsS,EAAI,EAAGA,EAAI+/B,EAAG2M,OAAO36C,OAAQiO,IAAK,CACzC,MAAMkuC,EAAQnO,EAAG2M,OAAO1sC,GAExB,GADApH,EAAWyzC,WAAa6B,EAAMr8C,UACH,IAAhBq8C,EAAMb,OACXa,EAAMb,MAAMc,SAAU,CACxB,MAAMC,EAAStiD,OAAOtH,UAAUshB,KAAK7f,KAAK,gBAC1C85C,EAAGsO,UAAUruC,GAAKouC,EAAOF,EAAMb,MAAMc,eAK5CnpC,OAAM,SAAU6K,GACf1G,QAAQnhB,MAAM6nB,OA2QpBkwB,EAAG+H,OA5LH,WAEElvC,EAAWwuC,SAAU,EAErB,MAAM98C,EAAO,IAAKy1C,EAAGuH,MAErB,IAAK,IAAItnC,EAAI,EAAGA,EAAI+/B,EAAG2M,OAAO36C,OAAQiO,IAAK,CACzC,MAAMkuC,EAAQnO,EAAG2M,OAAO1sC,GACpBkuC,EAAMb,YAA4C,IAA5B/iD,EAAK4jD,EAAMb,MAAMvX,SAEpC8P,GAAAA,CAAOsI,EAAMI,WAChBvO,EAAGS,QAAQ0N,EAAMI,SAAW/pD,MAAMoQ,QAAQrK,EAAK4jD,EAAMb,MAAMvX,QACvDxrC,EAAK4jD,EAAMb,MAAMvX,OAAOlgC,OACxBtL,EAAK4jD,EAAMb,MAAMvX,QAGnB91B,IAAMmsC,IACHvG,GAAAA,CAAOhtC,EAAW+nC,SAASqN,iBAC9BjO,EAAGS,QAAQwN,cAAgBp1C,EAAW+nC,SAASqN,cAC/CjO,EAAGS,QAAQ3uB,KAAOttB,MAAMoQ,QAAQrK,EAAK4jD,EAAMb,MAAMvX,QAC7CxrC,EAAK4jD,EAAMb,MAAMvX,OAAOlgC,OACxBtL,EAAK4jD,EAAMb,MAAMvX,SAIN,WAAfoY,EAAMr8C,OACRvH,EAAK4jD,EAAMb,MAAMvX,OAASxrC,EAAK4jD,EAAMb,MAAMvX,OAAOxkC,KAC/C+U,GAASA,EAAK5d,SAMvB,MAAM8lD,EAAehqD,MAAMoQ,QAAQorC,EAAG2M,QAClC3M,EAAG2M,OAAOzgD,QAAQiiD,GAAyB,WAAfA,EAAMr8C,OAClC,GAEE28C,EAAUzG,GAAAA,CACd,CACElD,KAAMv6C,GAERy1C,EAAGS,SAGCiO,EAA4B,MAARnkD,GAAgBikD,EAAax8C,OAAS,EAC1D28C,EAAyB,OAATpkD,GAA0C,OAAzBqW,KAAKE,UAAUvW,GAnFxD,IAAgBqkD,EApCKxmD,GAwHGsmD,GApFRE,EAqFHH,EApFJx7C,EAAM,CACXoB,IAAM,GAAEwrC,EAAI4I,wBAAwBmG,EAAQ3gD,aAC5CsG,QAAS,CAAE,oBAAgBwC,GAC3BxM,KAAMskD,GAAAA,CAAeD,EAAS,IACzBrC,EACHuC,gBAAiB,IAAIhD,WAEvBlD,OAAQ,UA8EN+F,EACA9O,EAAI8I,YAAYvD,QAAQqJ,GAAS7K,SACjC5M,QAAQC,OAAO,iBAGhBtpC,KAAK++C,GACLznC,OAhIgB7c,EAgIE,SAjHZ,SAAU0nB,GACf,MAAMg3B,EAAQF,EACXG,SACAC,YACCnuC,EAAW+nC,SAASqG,0BAClB,yBAEHC,WAAW,oBACXlqC,OAAOva,QAAQkD,QAAQsjB,SAASk6B,cAAc,mBAEjDyD,EAASrD,KAAKuD,GAEd9G,EAAG6G,OAAOz+C,GAAQ0nB,EAAIvlB,QAsGvB69C,SAAQ,KACFpI,EAAGuH,KAAKtgB,UACX+Y,EAAGuH,KAAO,IAlLhB1uC,EAAWwuC,SAAU,MAsTvBrH,EAAGC,OA9HH,SAAgB73C,EAAM2a,GACfi9B,EAAGuH,KAAKn/C,KACX43C,EAAGuH,KAAKn/C,GAAQ,IAGlB,MAAMyJ,EAAMmuC,EAAGuH,KAAKn/C,GAAM0I,QAAQiS,GAC9BlR,GAAO,EACTmuC,EAAGuH,KAAKn/C,GAAMga,OAAOvQ,EAAK,GAE1BmuC,EAAGuH,KAAKn/C,GAAM/E,KAAK0f,IAsHvBi9B,EAAGhd,OAlHH,SAAgB56B,EAAM2a,GAKpB,OAJKi9B,EAAGuH,KAAKn/C,KACX43C,EAAGuH,KAAKn/C,GAAQ,IAGX43C,EAAGuH,KAAKn/C,GAAM0I,QAAQiS,IAAS,GA8GxCi9B,EAAGsO,UAAY,GAEftO,EAAGuH,KAAO,GACVvH,EAAG6G,OAAS,GACZ7G,EAAG0H,SAAW,GCnWhB,SAASqH,EACPl2C,EACAwC,EACA8wC,EACAtM,EACAD,EACAG,GAEA,MAAMC,EAAKp9C,KACX,IAAIwpD,EAAU,KAmJd,SAAS4C,IASP,OARAn2C,EAAW4nC,QAAU,CACnBxyC,GAAI4K,EAAW+nC,SAAS3yC,GACxBghD,OAAQ,YACRn9B,KAhCK,YAAco8B,GAAAA,CAAQ,EAAG,MAmChCr1C,EAAW+nC,SAASuK,UAAW,EAExBvL,EAAqBO,cAC1BJ,EACAlnC,EAAW4nC,SAEV9yC,MAAMvG,IACLyR,EAAW4nC,QAAUr5C,EACdy4C,EAAI8I,YACRE,UAAU,CACT56C,GAAI4K,EAAW+nC,SAAS3yC,GACxBs0C,QAAQ,IAETqB,SAASj2C,MAAK,SAAUpD,GACnBA,EAAKuC,QACPs/C,EAAU7hD,EAAK6hD,QACfpM,EAAG2M,OAASpiD,EAAK25C,SAGpBv2C,MAAK,WACJ,IAAK,IAAIsS,EAAI,EAAGA,EAAI+/B,EAAG2M,OAAO36C,OAAQiO,IAAK,CACzC,MAAMkuC,EAAQnO,EAAG2M,OAAO1sC,GACxB,GAAIkuC,EAAMb,MAAMc,SAAU,CACxB,MAAMC,EAAStiD,OAAOtH,UAAUshB,KAAK7f,KAAK,gBAC1C85C,EAAGsO,UAAUruC,GAAKouC,EAAOF,EAAMb,MAAMc,eAI1CnpC,OAAM,SAAU6K,GACf1G,QAAQnhB,MAAM6nB,SAGnB7K,MAAM26B,EAAqBW,gBAzLhCP,EAAGsO,UAAY,GAGftO,EAAGuH,KAAO,GACVvH,EAAG6G,OAAS,GACZ7G,EAAG0H,SAAW,GACd1H,EAAGkP,aAAc,EAEjBlP,EAAG6M,YAAc,SAAU1kD,GACzB,OAAOgkD,EAAKU,YAAY1kD,IAmO1B63C,EAAG/vC,QAhDH,WAKE,GAJAmZ,QAAQo3B,MAAM,qCAAsC3nC,EAAW4nC,SAE/D5nC,EAAW6nC,OAAS,SAEhB7nC,EAAW4nC,SAAW5nC,EAAW4nC,QAAQ4B,YAC3C,GAAIxpC,EAAW4nC,QAAQ4B,YAAYp0C,GACjC,IAA8C,IAA1C4K,EAAW4nC,QAAQyJ,mBAErB7uC,EAAOi5B,GAAG,WAAY,KAAM,CAC1B77B,SAAU,gBAEP,SACL,MAAM02C,EAAoBt2C,EAAW4nC,QAAQ4B,YAAYp0C,GACnDmhD,EAAYv2C,MAAAA,GAAH,UAAGA,EAAY4nC,eAAf,iBAAG,EAAqB/Z,eAAxB,aAAG,EAA8Bz4B,GAChD,GAAImhD,EAAW,CACb,MAAM7kD,EAAO,CACX0D,GAAIkhD,EACJE,QAAS,OACThN,YAAa,CACXp0C,GAAIkhD,GAENzoB,QAAS,CACPz4B,GAAImhD,GAEN9E,YAAa,YACb5G,QAAQ,EACRC,YAAa,WAIf9D,EAAI2D,gBAAgByF,QAAQ1+C,GAAMq5C,SAASwE,SAAQ,IAC1C4G,YAMb3zC,EAAOi5B,GAAG,cAAe,KAAM,CAC7B77B,SAAU,iBAIdu2C,KAMJhP,EAAG+H,OA5KH,WACE,IAAIjD,EAAO,sBAEX,IAAK,IAAI7kC,EAAI,EAAGA,EAAI+/B,EAAG2M,OAAO36C,OAAQiO,IAAK,CACzC,MAAMkuC,EAAQnO,EAAG2M,OAAO1sC,GAEpBkuC,EAAMb,YAA+C,IAA/BtN,EAAGuH,KAAK4G,EAAMb,MAAMvX,SAEvC8P,GAAAA,CAAOsI,EAAMmB,YAChBz2C,EAAW4nC,QAAQ0N,EAAMmB,UAAY9qD,MAAMoQ,QACzCorC,EAAGuH,KAAK4G,EAAMb,MAAMvX,QAElBiK,EAAGuH,KAAK4G,EAAMb,MAAMvX,OAAOlgC,OAC3BmqC,EAAGuH,KAAK4G,EAAMb,MAAMvX,QAGrB8P,GAAAA,CAAOsI,EAAMI,WAChB11C,EAAW4nC,QAAQ0N,EAAMI,SAAW/pD,MAAMoQ,QACxCorC,EAAGuH,KAAK4G,EAAMb,MAAMvX,QAElBiK,EAAGuH,KAAK4G,EAAMb,MAAMvX,OAAOlgC,OAC3BmqC,EAAGuH,KAAK4G,EAAMb,MAAMvX,QAGtB91B,IAAMmsC,IACHvG,GAAAA,CAAOhtC,EAAW+nC,SAASqO,UAC9Bp2C,EAAW4nC,QAAQwO,OAASp2C,EAAW+nC,SAASqO,OAChDp2C,EAAW4nC,QAAQ3uB,KAAOttB,MAAMoQ,QAAQorC,EAAGuH,KAAK4G,EAAMb,MAAMvX,QACxDiK,EAAGuH,KAAK4G,EAAMb,MAAMvX,OAAOlgC,OAC3BmqC,EAAGuH,KAAK4G,EAAMb,MAAMvX,SAIxBiK,EAAGuH,KAAK4G,EAAMb,MAAMvX,SACtB+O,GAAQqJ,EAAMb,MAAMvX,MAAQ,KAAOiK,EAAGuH,KAAK4G,EAAMb,MAAMvX,OAAS,OAvExE,IAAqBrP,EAAAA,EA8EjBshB,GAAAA,CACE,CACElD,KAAMA,EACNyK,QAAS12C,EAAW+nC,SAAS2O,QAC7BC,WAAY32C,EAAW+nC,SAAS4O,YAElC32C,EAAW4nC,SAnFfT,EAAGkP,aAAc,EAEjBrP,EAAI8I,YACD9c,OAAOnF,GACPkd,SAASj2C,MAAK,SAAUpD,UAChBy1C,EAAG6G,OAAOmD,iBAEjBnxC,EAAW4nC,QAAQ/Z,QAAU,CAC3Bz4B,GAAI1D,EAAKm8B,QAAQz4B,IAGnB4K,EAAW4nC,QAAQ4B,YAAc,CAC/Bp0C,GAAI1D,EAAK83C,YAAYp0C,IAIvB2xC,EAAqBO,cAAcJ,EAAiBlnC,EAAW4nC,SAC5D9yC,MAAMvG,IACLyR,EAAW4nC,QAAUr5C,KAEtB6d,MAAM26B,EAAqBW,gBAG9BP,EAAGkP,aAAc,EArChBr2C,EAAW+nC,SAAS6O,sBAOvBp0C,EAAOi5B,GAAG,WAAY,KAAM,CAC1B77B,SAAU,YANZ4C,EAAOi5B,GAAG,cAAe,KAAM,CAC7B77B,SAAU,eAuCXwM,OAAM,SAAU6K,GAEfkwB,EAAGkP,aAAc,EAEjB9lC,QAAQnhB,MAAM6nB,OAiLpBkwB,EAAGC,OArHH,SAAgB73C,EAAM2a,GACfi9B,EAAGuH,KAAKn/C,KACX43C,EAAGuH,KAAKn/C,GAAQ,IAGlB,MAAMyJ,EAAMmuC,EAAGuH,KAAKn/C,GAAM0I,QAAQiS,GAC9BlR,GAAO,EACTmuC,EAAGuH,KAAKn/C,GAAMga,OAAOvQ,EAAK,GAE1BmuC,EAAGuH,KAAKn/C,GAAM/E,KAAK0f,IA6GvBi9B,EAAGhd,OAzGH,SAAgB56B,EAAM2a,GAKpB,OAJKi9B,EAAGuH,KAAKn/C,KACX43C,EAAGuH,KAAKn/C,GAAQ,IAGX43C,EAAGuH,KAAKn/C,GAAM0I,QAAQiS,IAAS,GCxJ1C,SAAS2sC,EACP72C,EACAwC,EACAurC,EACA/G,EACAl2C,EACAi2C,EACAG,EACAD,GAEA,MAAME,EAAKp9C,KAQX,SAAS0kD,IACHzuC,EAAW+nC,SAAS2B,OACtBlnC,EAAOi5B,GAAG,aAAc,KAAM,CAAE77B,SAAU,YAE1C4C,EAAOi5B,GAAG,cAAe,KAAM,CAAE77B,SAAU,YAI/C,SAAS4lC,IACP2B,EAAGuH,KAAO,GACVvH,EAAGwH,QAAU,KACbxH,EAAGyH,UAAY,KACfzH,EAAG0H,SAASC,eACZ3H,EAAG0H,SAASE,gBAEZ/uC,EAAW4nC,QAAU,GAErB5nC,EAAWgvC,gBAAiB,EAC5BhvC,EAAWzJ,MAAM,QAQnB,SAAS25B,EAAY3gC,GACnB,OAAO,SAAU0nB,GACfkwB,EAAG6G,OAAOz+C,GAAQ0nB,EAAIvlB,KAEtB,MAAMu8C,EAAQF,EACXG,SACAC,YACCnuC,EAAW+nC,SAASqG,0BAClB,yBAEHC,WAAW,oBACXlqC,OAAOva,QAAQkD,QAAQsjB,SAASk6B,cAAc,mBAEjDyD,EAASrD,KAAKuD,IAIlB,SAASM,IACPvuC,EAAWwuC,SAAU,EAjDvBrH,EAAGuH,KAAO,GACVvH,EAAG6G,OAAS,GAoGZ7G,EAAG/vC,QAhBH,WACEmZ,QAAQo3B,MAAM,wCAAyC3nC,EAAW4nC,SAClE5nC,EAAW6nC,OAAS,YAGpB/2C,EAAG0U,IAAI,CACLuhC,EAAqBkI,WAAW/H,GAC7BpyC,MAAK,IAAMyb,QAAQo3B,MAAM,6BACzBv7B,MAAM26B,EAAqBW,gBAC9BX,EAAqBkI,WAAWhI,GAC7BnyC,MAAK,IAAMyb,QAAQo3B,MAAM,4BACzBv7B,MAAM26B,EAAqBW,kBAC7B5yC,MAAK,IAAOkL,EAAWwuC,SAAU,KAKtCrH,EAAG+H,OAlDH,WACElvC,EAAWwuC,SAAU,EAEjBxuC,EAAW4nC,QAAQ4B,aAAexpC,EAAW4nC,QAAQ4B,YAAYp0C,GACnE4xC,EAAI2D,gBACDC,aAAa,CACZx1C,GAAI4K,EAAW4nC,QAAQ4B,YAAYp0C,GACnC0hD,KAAM3P,EAAGuH,KAAKoI,OAEf/L,SAASj2C,MAAK,kBACNqyC,EAAG6G,OAAOkB,OAEjB,MAAMjB,EAAQF,EACXG,SACAC,YACCnuC,EAAW+nC,SAASuH,0BAClB,2BAEHjB,WAAW,oBACXlqC,OAAOva,QAAQkD,QAAQsjB,SAASk6B,cAAc,mBAEjDyD,EAASrD,KAAKuD,MAEfn5C,KAAK0wC,GACL1wC,KAAK25C,GACLriC,MAAM8jB,EAAY,WAClBqf,QAAQhB,IAEXA,IACAre,EAAY,YAsBhBiX,EAAGqI,KA7EH,WACEhK,IACAiJ,KCxCJ,SAASsI,EACP/2C,EACAhV,EACAulD,EACA/tC,EACAwkC,EACAD,EACAG,GAGA,IAAI8P,EAA+B,KAGnC,SAASxF,IACP,IAAIhI,EAAc,GACdyN,GAAO,EAEXjQ,EAAI2D,gBACDlwC,IAAI,CACHrF,GAAI4K,EAAW4nC,QAAQ4B,YAAYp0C,KAEpC21C,SAASj2C,MAAK,SAAUpD,GAGvB,OAFA83C,EAAc93C,EAEPs1C,EAAI2D,gBAAgBM,YAAY,CACrCC,MAAOlrC,EAAW4nC,QAAQ4B,YAAYp0C,KACrC21C,YAEJj2C,MAAK,SAAUpD,GACdulD,EAAOvlD,EAAK25C,KAAKlyC,OAAS,EAEtBqwC,EAAYqB,QACd7qC,EAAW4nC,QAAQ4B,YAAYqB,QAAS,EACxC9D,EAAqBO,cACnBJ,EACAlnC,EAAW4nC,SAEV9yC,MAAMvG,IACLyR,EAAW4nC,QAAUr5C,EACW,cAA5Bi7C,EAAYiI,aACdjvC,EAAOi5B,GAAG,gBAAiB,KAAM,CAAE77B,SAAU,eAGhDwM,MAAM26B,EAAqBW,kBACrB8B,EAAYoC,QAAUqL,KAE3BzN,EAAYoC,SACd5rC,EAAW4nC,QAAQ4B,YAAYoC,OAASpC,EAAYoC,QAEtD7E,EAAqBO,cAAcJ,EAAiB,IAC/ClnC,EAAW4nC,QACdyJ,oBAAoB,IAEnBv8C,MAAMvG,IACLyR,EAAW4nC,QAAUr5C,EACrBiU,EAAOi5B,GAAG,WAAY,KAAM,CAAE77B,SAAU,eAEzCwM,MAAM26B,EAAqBW,oBAKjCt7B,OAAM,SAAU6K,GACf,OAAQA,EAAI4wB,QACV,KAAK,IACHrlC,EAAOi5B,GAAG,cAAe,KAAM,CAAE77B,SAAU,YAC3C,MACF,KAAK,IACH4C,EAAOi5B,GAAG,gBAAiB,KAAM,CAAE77B,SAAU,YAC7C,MACF,QACE2Q,QAAQnhB,MAAM6nB,OA9DbltB,KAqFRqN,QAdH,WACEmZ,QAAQo3B,MAAM,sCAAuC3nC,EAAW4nC,SAChE5nC,EAAW6nC,OAAS,UAGlB7nC,EAAW4nC,SACX5nC,EAAW4nC,QAAQ4B,aACnBxpC,EAAW4nC,QAAQ4B,YAAYp0C,KAG/B4hD,EAA+BzG,EAAUiB,EAAgB,OAQ7DxmD,EAAOsB,IAAI,YAtBX,WACEikD,EAAUriD,OAAO8oD,iqBCzFrB,MAAMjQ,EAOJ54B,YAAYxO,EAASK,EAAYlP,GAAI,oBACnC/G,KAAKmtD,cAAgB,IAAIC,IAAIn3C,EAAW+nC,SAASqP,SAASC,OAC1DttD,KAAK6V,SAAWI,EAAW+nC,SAASnoC,SACpC7V,KAAK+G,GAAKA,EACV/G,KAAK4V,QAAUA,EA4CjB23C,QAAQ1nD,EAAKrB,GACX,MAAMgpD,EAAS,UACf,OAAOxtD,KAAK+G,IAAI4F,IACd,EAAA3M,KAAA,UAAAA,KAAwBwtD,EAAQ3nD,GAAK,KACnC8G,OAEF3M,KAAK4V,QAAQwE,OAAOsjC,YAClB,CAAE8P,OAAAA,EAAQ3nD,IAAAA,EAAKrB,MAAAA,GACfxE,KAAKmtD,kBASX9N,QAAQx5C,GACN,MAAM2nD,EAAS,UACf,OAAOxtD,KAAK+G,IAAI4F,IACd,EAAA3M,KAAA,UAAAA,KAAwBwtD,EAAQ3nD,GAAK,CAAC2X,EAAG2C,KACvCxT,EAAQwT,MAEVngB,KAAK4V,QAAQwE,OAAOsjC,YAAY,CAAE8P,OAAAA,EAAQ3nD,IAAAA,GAAO7F,KAAKmtD,kBAQ1DjI,WAAWr/C,GACT,MAAM2nD,EAAS,aACf,OAAOxtD,KAAK+G,IAAI4F,IACd,EAAA3M,KAAA,UAAAA,KAAwBwtD,EAAQ3nD,GAAK,KACnC8G,OAEF3M,KAAK4V,QAAQwE,OAAOsjC,YAAY,CAAE8P,OAAAA,EAAQ3nD,IAAAA,GAAO7F,KAAKmtD,kBAuB1D5P,cAAc13C,EAAK8B,GAAsB,IAAhBkF,EAAgB,wDAEvC,OAAO7M,KAAKq/C,QAAQx5C,GAAKkF,MAAMoV,IAC7B,MAAMstC,EAAU,EAAAztD,KAAA,UAAAA,KAAgBmgB,IAAS,GAMzC,OALItT,SACK4gD,EAAQztD,KAAK6V,UAEpB43C,EAAQztD,KAAK6V,UAAYlO,EAEpB3H,KAAKutD,QAAQ1nD,EAAK4nD,GAAS1iD,MAAK,IAAM0iD,EAAQztD,KAAK6V,eAQ9D8nC,eAAezwB,GACb1G,QAAQnhB,MAAM,gBAAiB6nB,eAnHdsgC,EAAQ3nD,EAAKrF,GAE9B,MAAM29B,EAAY7b,IAChB,MAAMorC,EAAkB,GAAEF,UAC1B,GACElrC,EAAEgrC,SAAWttD,KAAKmtD,eAClBtnD,IAAQyc,EAAE3a,KAAK9B,KACf6nD,IAAmBprC,EAAE3a,KAAK6lD,OAC1B,CACA,MAAM,OAAEA,EAAF,KAAUrtC,GAASmC,EAAE3a,KAE3B,OADA6e,QAAQo3B,MAAO,UAAS/3C,cAAgB2nD,uBAA6BlrC,GAC7DkrC,GACN,IAAK,gBACHhtD,EAASqF,GACT,MACF,IAAK,gBACHrF,EAASqF,EAAKsa,GACd,MACF,IAAK,mBACH3f,EAASqF,GACT,MACF,QACE2gB,QAAQo3B,MAAM,qBAAsB4P,GAIxCxtD,KAAK4V,QAAQ+3C,oBAAoB,UAAWxvB,GAAU,KAG1Dn+B,KAAK4V,QAAQgtC,iBAAiB,UAAWzkB,GAAU,cAiD1CyvB,GACT,IAAI5zB,EAAS4zB,EACb,GAAsB,iBAAX5zB,EACT,IACEA,EAAShc,KAAK/W,MAAM2mD,GACpB,MAAOvoD,GACPmhB,QAAQqnC,KAAM,oBAAmBD,KAAevoD,GAChD20B,EAAS4zB,EAGb,OAAO5zB,EC3EX,SAAS8zB,EAAgBvE,GACvB,OAAO,SAAU/kD,GACf,OAAO+kD,EAAKU,YAAYzlD,+DAqI5B3E,QACGC,OAFiB,cAEG,CACnB,YACA,SACA,aACA,aACA,aACA,aACA,QACA,UACA,YACA,qBACA,WACA,SAEDwJ,OAAO,YAAawkD,GACpBC,SAAS,iBAAkB,eAC3BA,SAAS,kBAAmB,WAC5BA,SAAS,iBAAkB,UAC3Bt2C,QAAQ,uBAAwBulC,GAChCn6C,UAAU,WAnCb,WACE,OAAO,SAAUC,EAAOC,EAASC,GAC/BD,EAAQO,KAAK,oBAAoB,SAAU/C,GACrB,KAAhBA,EAAMu6C,QACRh4C,EAAMmB,QAAO,WACXnB,EAAMzB,MAAM2B,EAAMgrD,YAEpBztD,EAAMgD,yBA6BXV,UAAU,WArJb,WA0GE,MAAO,CACL0F,KAVF,SAAczF,EAAOC,GACnBA,EAAQzC,GAAG,SAAS,WACE+lB,SAAS4nC,eAAe,iBAlGhD,SAAsB/sC,EAAMpe,GAE1B,MAAMorD,EAAM7nC,SAAS45B,cAAc,OAC7BpC,EAAU/6C,EAAM+6C,QAChBG,EAAWl7C,EAAMk7C,SACvB,IAAImQ,EAEJ,IAAK,IAAI9wC,EAAI,EAAGA,EAAIva,EAAMmlD,SAAS74C,OAAQiO,IAAK,CAC9C,MAAMymB,EAAUhhC,EAAMmlD,SAAS5qC,GAC/B,IAAImkC,EAAS,WACb,MAAMU,EAAO,YAAcpe,EAAQoe,KAC7BkM,EACJ,YAAchM,GAAAA,CAAOte,EAAQqe,WAAWv6B,OAAO,uBAEjD,GAAU,IAANvK,EAAJ,CAKA,OAAQva,EAAMk7C,SAAS4D,iBACrB,IAAK,gBACHJ,GACwB,QAAtB1d,EAAQ2d,UACJ3d,EAAQ+d,OACN7D,EAAS8D,WAAahe,EAAQ+d,OAC9B,SACF7D,EAAS0D,eACT7D,EAAQ3uB,MACR,UAAY4U,EAAQ6d,UAC1B,MAEF,IAAK,cACHH,GACwB,QAAtB1d,EAAQ2d,UACJ3d,EAAQ+d,OACN/d,EAAQie,KAAKC,OAASle,EAAQie,KAAKE,SACnC,SACFjE,EAAS0D,eACT7D,EAAQ3uB,MACR,UAAY4U,EAAQ6d,UAC1B,MAEF,IAAK,iBACHH,GACwB,QAAtB1d,EAAQ2d,UACJ3d,EAAQ+d,OACN/d,EAAQie,KAAKE,SACb,SACFjE,EAAS0D,eACT7D,EAAQ3uB,MACR,UAAY4U,EAAQ6d,UAC1B,MAEF,QACEH,GACwB,QAAtB1d,EAAQ2d,UACJ3d,EAAQ+d,QACL7D,EAAS8D,YAAc,SAAWhe,EAAQ+d,OAC3C,SACF7D,EAAS0D,eACT7D,EAAQ3uB,MACR,UAAY4U,EAAQ6d,UAG9BuM,EAAIhO,YAAY75B,SAASgoC,eAAe7M,IACxC0M,EAAIhO,YAAY75B,SAAS45B,cAAc,OACvCiO,EAAIhO,YAAY75B,SAASgoC,eAAenM,IACxCgM,EAAIhO,YAAY75B,SAAS45B,cAAc,OACvCiO,EAAIhO,YAAY75B,SAASgoC,eAAeD,IACxCF,EAAIhO,YAAY75B,SAAS45B,cAAc,OACvCiO,EAAIhO,YAAY75B,SAAS45B,cAAc,YAvDrCkO,EAAYrqB,EAAQqe,UA0DxB,MAAMmM,EAAW/nC,OAAO2mC,OAExBoB,EAASjoC,SAASkoC,MAAM,sBAAwBloC,SAAS8sB,MAAQ,YACjEmb,EAASjoC,SAASkoC,MAAM,kBACxBD,EAASjoC,SAASkoC,MAAM,iBAAmBvQ,EAAS2O,QAAU,SAC9D2B,EAASjoC,SAASkoC,MAChB,oBACEnM,GAAAA,CAAO+L,GAAWvmC,OAAO,uBACzB,SAEJ0mC,EAASjoC,SAASkoC,MAChB,oBAAsBnM,GAAAA,GAASx6B,OAAO,uBAAyB,SAEjE0mC,EAASjoC,SAASkoC,MAAML,EAAIM,WAC5BF,EAASjoC,SAASkoC,MAAM,kBAExBD,EAASjoC,SAASg6B,QAClBiO,EAASG,QAETH,EAASI,QACTJ,EAASjO,QAOLsO,CAAaC,EAAa9rD,OAO9BqE,SAAU,QA2CXnG,WAAW,iBAAkBulD,GAE7BvlD,WAAW,oBAAqB+iD,GAEhCx4C,OA3BH,sBA2BU,SAAUsjD,GAChBA,EAAmBC,qBAEpB9tD,WAAW,kBAAmB87C,GAE9B58C,QAAQ,MAAOwlD,GAEfn6C,OAAO23C,GACP3qC,IAAIsqC,GAEJ7hD,WAAW,oBAAqBsoD,GAEhC/9C,OAvCH,sBAuCU,SAAUsjD,GAChBA,EAAmBC,qBAEpB9tD,WAAW,mBAAoBmrD,GAE/BnrD,WAAW,sBAAuB8rD,GAElC9rD,WAAW,oBAAqBgsD,wFCjNnCltD,EAAOivD,QAAU,WACf,GAA0B,iBAAfC,WACT,OAAOA,WAGT,IAAInxC,EAEJ,IAGEA,EAAI7d,MAAQ,IAAI0mB,SAAS,cAAb,GACZ,MAAOpE,GAEP,GAAsB,iBAAXiE,OACT,OAAOA,OAIT,GAAoB,iBAAT7Y,KACT,OAAOA,KAIT,QAAsB,IAAX,EAAAmQ,EACT,OAAO,EAAAA,EAIX,OAAOA,EA5BQ,wECHjB,WAoBE7d,QAjBM4d,EAAO,SAON,KAFU,EAAF,WACL,OAAQA,EAAKquC,eAWjB,WAWJ,SAASj6C,EAAQhO,GAEb,MAAmC,mBAA5B,GAAK8Q,SAAS/S,KAAKiC,GAG9B,SAASirD,EAAajrD,GAElB,QAAQgO,EAAQhO,IAAuB,iBAARA,IAAsBA,GAASA,aAAekrD,MAAWlrD,aAAeuuB,MAQ3G,SAAS48B,IAEL,MAA2B,mBAAbjG,SAGlB,SAASkG,IAEL,GAAID,IACA,OAAO,IAAIjG,SAkCnB,SAASmG,EAAmBC,EAAYnvD,EAASovD,EAAUC,GAEvD,IAAIpT,EAAQ,EAEZ,IAAK,IAAIv2C,KAAOypD,EAAY,CAExB,GAAIA,EAAW5sD,eAAemD,GAAM,CAEhC,IAAI4pD,EAAWD,GAAa3pD,EACxBrB,EAAQrE,EAAQirB,QAAQkkC,EAAWzpD,IAevC,GAbI2pD,GAAaP,EAAaK,KAC1BG,EAAWD,EAAY,IAAM3pD,EAAM,KAGnC2pD,GAAax9C,EAAQs9C,KAGjBG,EADAz9C,EAAQxN,IAAUrE,EAAQypD,qBACf4F,EAAY,IAAMpT,EAAQ,IAE1BoT,EAAY,MAI3Bx9C,EAAQxN,IAAUyqD,EAAazqD,GAE/B6qD,EAAmB7qD,EAAOrE,EAASovD,EAAUE,QAE1C,GAAIjrD,aAAiBkrD,SAExB,IAAK,IAAIhyC,EAAI,EAAGA,EAAIlZ,EAAM4K,OAAQsO,IAC9B6xC,EAASl1B,OAAOo1B,EAAW,IAAM/xC,EAAI,IAAKlZ,EAAM2b,KAAKzC,SAElDlZ,aAAiB0qD,KAExBK,EAASl1B,OAAOo1B,EAAUjrD,EAAOA,EAAMgB,MAEhChB,aAAiB+tB,KAExBg9B,EAASl1B,OAAOo1B,EAAUjrD,EAAMmrD,gBAEb,OAAVnrD,GAAkBrE,EAAQ0pD,mBAAgC,OAAVrlD,SAA6B2P,IAAV3P,GAE5E+qD,EAASl1B,OAAOo1B,EAAUjrD,GAGlC43C,IAEJ,OAAOmT,EAEX,OAhFA,SAAiBD,EAAYnvD,GAEzB,GAAIA,GAAWA,EAAQ+rD,iBAEnB,GAnB8B,mBAmBD/rD,EAAQ+rD,gBAnBlB7xB,OAqBf,KAAM,qDAEP,IAAK80B,IAER,KAAM,8FA3Bd,IA0CQS,EA5DG,CAgDc,CACjB1D,gBAAiBkD,IACjBxF,sBAAsB,EACtBC,mBAAmB,EACnBz+B,QAAS,SAAS5mB,GACd,MAAqB,kBAAVA,GACCA,EAAQ,IAAK,IAElBA,IAIkCrE,GAAW,IA5DlCyO,QAAO,SAAUihD,EAAOC,GAI9C,OAHAv8C,OAAOC,KAAKs8C,GAAe/uD,SAAQ,SAAUgvD,GACzCF,EAAME,GAAaD,EAAcC,MAE9BF,IACR,IAyDH,OAAOR,EAAmBC,EAAYM,EAAeA,EAAc1D,kBA5EjChsD,IACjC,QAFM,OAEN,oECDD,SAAWkiD,GAAU,aAIhBA,EAAO4N,aAAa,KAAM,CAC/BC,OAAQ,8FAA8FntC,MAClG,KAEJotC,YAAa,kDAAkDptC,MAAM,KACrEqtC,SAAU,4DAA4DrtC,MAClE,KAEJstC,cAAe,8BAA8BttC,MAAM,KACnDutC,YAAa,uBAAuBvtC,MAAM,KAC1CwtC,cAAe,SACfC,KAAM,SAAU39C,GACZ,MAAO,QAAQuQ,KAAKvQ,IAExB49C,SAAU,SAAUC,EAAOC,EAASC,GAChC,OAAIF,EAAQ,GACDE,EAAU,KAAO,KAEjBA,EAAU,KAAO,MAGhCC,eAAgB,CACZC,GAAI,QACJC,IAAK,WACLC,EAAG,aACHC,GAAI,cACJC,IAAK,oBACLC,KAAM,2BAEVC,SAAU,CACNC,QAAS,iBACTC,QAAS,eACTC,SAAU,eACVC,QAAS,iBACTC,SAAU,sBACVC,SAAU,KAEdC,aAAc,CACVC,OAAQ,SACRC,KAAM,YACNx0C,EAAG,mBACHy0C,GAAI,cACJ78C,EAAG,YACH88C,GAAI,YACJC,EAAG,SACHC,GAAI,SACJ74B,EAAG,SACH84B,GAAI,SACJC,EAAG,WACHC,GAAI,YACJC,EAAG,UACHC,GAAI,WAERC,uBAAwB,kBACxBC,QAAS,SAAUC,GACf,OACIA,GACY,IAAXA,GAA2B,IAAXA,GAAgBA,GAAU,GAAK,MAAQ,OAGhEC,KAAM,CACFC,IAAK,EACLC,IAAK,KArEyBzyD,CAAQ,EAAQ,8FCOlD,SAAWkiD,GAAU,aAIzB,IAAIwQ,EAAa,SAAUryC,GACnB,OAAa,IAANA,EACD,EACM,IAANA,EACA,EACM,IAANA,EACA,EACAA,EAAI,KAAO,GAAKA,EAAI,KAAO,GAC3B,EACAA,EAAI,KAAO,GACX,EACA,GAEVsyC,EAAU,CACNz1C,EAAG,CACC,eACA,cACA,CAAC,UAAW,WACZ,UACA,WACA,YAEJpI,EAAG,CACC,eACA,cACA,CAAC,UAAW,WACZ,WACA,WACA,YAEJ+8C,EAAG,CACC,cACA,aACA,CAAC,SAAU,UACX,WACA,UACA,WAEJ54B,EAAG,CACC,aACA,WACA,CAAC,QAAS,SACV,UACA,WACA,UAEJ+4B,EAAG,CACC,aACA,WACA,CAAC,QAAS,SACV,UACA,UACA,UAEJE,EAAG,CACC,aACA,WACA,CAAC,QAAS,SACV,WACA,WACA,WAGRU,EAAY,SAAUC,GAClB,OAAO,SAAUP,EAAQQ,EAAeztD,EAAQ0tD,GAC5C,IAAIC,EAAIN,EAAWJ,GACfxhD,EAAM6hD,EAAQE,GAAGH,EAAWJ,IAIhC,OAHU,IAANU,IACAliD,EAAMA,EAAIgiD,EAAgB,EAAI,IAE3BhiD,EAAI+D,QAAQ,MAAOy9C,KAGlCvC,EAAS,CACL,QACA,QACA,OACA,QACA,MACA,OACA,SACA,MACA,SACA,SACA,SACA,UAGG7N,EAAO4N,aAAa,QAAS,CACpCC,OAAQA,EACRC,YAAaD,EACbE,SAAU,sDAAsDrtC,MAAM,KACtEstC,cAAe,wCAAwCttC,MAAM,KAC7DutC,YAAa,gBAAgBvtC,MAAM,KACnCqwC,oBAAoB,EACpBvC,eAAgB,CACZC,GAAI,QACJC,IAAK,WACLC,EAAG,aACHC,GAAI,cACJC,IAAK,oBACLC,KAAM,0BAEVZ,cAAe,MACfC,KAAM,SAAU39C,GACZ,MAAO,MAAQA,GAEnB49C,SAAU,SAAU4C,EAAMC,EAAQ1C,GAC9B,OAAIyC,EAAO,GACA,IAEA,KAGfjC,SAAU,CACNC,QAAS,wBACTC,QAAS,uBACTC,SAAU,uBACVC,QAAS,sBACTC,SAAU,uBACVC,SAAU,KAEdC,aAAc,CACVC,OAAQ,SACRC,KAAM,SACNx0C,EAAG01C,EAAU,KACbjB,GAAIiB,EAAU,KACd99C,EAAG89C,EAAU,KACbhB,GAAIgB,EAAU,KACdf,EAAGe,EAAU,KACbd,GAAIc,EAAU,KACd35B,EAAG25B,EAAU,KACbb,GAAIa,EAAU,KACdZ,EAAGY,EAAU,KACbX,GAAIW,EAAU,KACdV,EAAGU,EAAU,KACbT,GAAIS,EAAU,MAElBQ,WAAY,SAAU/tD,GAClB,OAAOA,EAAOwP,QAAQ,KAAM,MAEhC09C,KAAM,CACFC,IAAK,EACLC,IAAK,KAtJyBzyD,CAAQ,EAAQ,8FCDlD,SAAWkiD,GAAU,aAIdA,EAAO4N,aAAa,QAAS,CACpCC,OAAQ,wEAAwEntC,MAC5E,KAEJotC,YAAa,wEAAwEptC,MACjF,KAEJqtC,SAAU,sDAAsDrtC,MAAM,KACtEstC,cAAe,wCAAwCttC,MAAM,KAC7DutC,YAAa,gBAAgBvtC,MAAM,KACnCqwC,oBAAoB,EACpBvC,eAAgB,CACZC,GAAI,QACJC,IAAK,WACLC,EAAG,aACHC,GAAI,cACJC,IAAK,oBACLC,KAAM,0BAEVC,SAAU,CACNC,QAAS,wBACTC,QAAS,sBACTC,SAAU,uBACVC,QAAS,sBACTC,SAAU,uBACVC,SAAU,KAEdC,aAAc,CACVC,OAAQ,QACRC,KAAM,SACNx0C,EAAG,OACHy0C,GAAI,WACJ78C,EAAG,QACH88C,GAAI,WACJC,EAAG,OACHC,GAAI,WACJ74B,EAAG,MACH84B,GAAI,UACJC,EAAG,MACHC,GAAI,UACJC,EAAG,MACHC,GAAI,YAERI,KAAM,CACFC,IAAK,EACLC,IAAK,MApDyBzyD,CAAQ,EAAQ,8FCGlD,SAAWkiD,GAAU,aAIzB,IAAImR,EAAY,CACR,EAAG,IACH,EAAG,IACH,EAAG,IACH,EAAG,IACH,EAAG,IACH,EAAG,IACH,EAAG,IACH,EAAG,IACH,EAAG,IACH,EAAG,KAEPX,EAAa,SAAUryC,GACnB,OAAa,IAANA,EACD,EACM,IAANA,EACA,EACM,IAANA,EACA,EACAA,EAAI,KAAO,GAAKA,EAAI,KAAO,GAC3B,EACAA,EAAI,KAAO,GACX,EACA,GAEVsyC,EAAU,CACNz1C,EAAG,CACC,eACA,cACA,CAAC,UAAW,WACZ,UACA,WACA,YAEJpI,EAAG,CACC,eACA,cACA,CAAC,UAAW,WACZ,WACA,WACA,YAEJ+8C,EAAG,CACC,cACA,aACA,CAAC,SAAU,UACX,WACA,UACA,WAEJ54B,EAAG,CACC,aACA,WACA,CAAC,QAAS,SACV,UACA,WACA,UAEJ+4B,EAAG,CACC,aACA,WACA,CAAC,QAAS,SACV,UACA,UACA,UAEJE,EAAG,CACC,aACA,WACA,CAAC,QAAS,SACV,WACA,WACA,WAGRU,EAAY,SAAUC,GAClB,OAAO,SAAUP,EAAQQ,EAAeztD,EAAQ0tD,GAC5C,IAAIC,EAAIN,EAAWJ,GACfxhD,EAAM6hD,EAAQE,GAAGH,EAAWJ,IAIhC,OAHU,IAANU,IACAliD,EAAMA,EAAIgiD,EAAgB,EAAI,IAE3BhiD,EAAI+D,QAAQ,MAAOy9C,KAGlCvC,EAAS,CACL,QACA,SACA,OACA,QACA,OACA,QACA,QACA,QACA,SACA,SACA,SACA,UAGG7N,EAAO4N,aAAa,QAAS,CACpCC,OAAQA,EACRC,YAAaD,EACbE,SAAU,sDAAsDrtC,MAAM,KACtEstC,cAAe,wCAAwCttC,MAAM,KAC7DutC,YAAa,gBAAgBvtC,MAAM,KACnCqwC,oBAAoB,EACpBvC,eAAgB,CACZC,GAAI,QACJC,IAAK,WACLC,EAAG,aACHC,GAAI,cACJC,IAAK,oBACLC,KAAM,0BAEVZ,cAAe,MACfC,KAAM,SAAU39C,GACZ,MAAO,MAAQA,GAEnB49C,SAAU,SAAU4C,EAAMC,EAAQ1C,GAC9B,OAAIyC,EAAO,GACA,IAEA,KAGfjC,SAAU,CACNC,QAAS,wBACTC,QAAS,uBACTC,SAAU,uBACVC,QAAS,sBACTC,SAAU,uBACVC,SAAU,KAEdC,aAAc,CACVC,OAAQ,SACRC,KAAM,SACNx0C,EAAG01C,EAAU,KACbjB,GAAIiB,EAAU,KACd99C,EAAG89C,EAAU,KACbhB,GAAIgB,EAAU,KACdf,EAAGe,EAAU,KACbd,GAAIc,EAAU,KACd35B,EAAG25B,EAAU,KACbb,GAAIa,EAAU,KACdZ,EAAGY,EAAU,KACbX,GAAIW,EAAU,KACdV,EAAGU,EAAU,KACbT,GAAIS,EAAU,MAElBU,SAAU,SAAUjuD,GAChB,OAAOA,EAAOwP,QAAQ,KAAM,MAEhCu+C,WAAY,SAAU/tD,GAClB,OAAOA,EACFwP,QAAQ,OAAO,SAAUiH,GACtB,OAAOu3C,EAAUv3C,MAEpBjH,QAAQ,KAAM,MAEvB09C,KAAM,CACFC,IAAK,EACLC,IAAK,MAzKyBzyD,CAAQ,EAAQ,8FCIlD,SAAWkiD,GAAU,aAIdA,EAAO4N,aAAa,QAAS,CACpCC,OAAQ,wEAAwEntC,MAC5E,KAEJotC,YAAa,wEAAwEptC,MACjF,KAEJqtC,SAAU,sDAAsDrtC,MAAM,KACtEstC,cAAe,wCAAwCttC,MAAM,KAC7DutC,YAAa,gBAAgBvtC,MAAM,KACnCqwC,oBAAoB,EACpBvC,eAAgB,CACZC,GAAI,QACJC,IAAK,WACLC,EAAG,aACHC,GAAI,cACJC,IAAK,oBACLC,KAAM,0BAEVC,SAAU,CACNC,QAAS,wBACTC,QAAS,sBACTC,SAAU,uBACVC,QAAS,sBACTC,SAAU,uBACVC,SAAU,KAEdC,aAAc,CACVC,OAAQ,QACRC,KAAM,SACNx0C,EAAG,OACHy0C,GAAI,WACJ78C,EAAG,QACH88C,GAAI,WACJC,EAAG,OACHC,GAAI,WACJ74B,EAAG,MACH84B,GAAI,UACJC,EAAG,MACHC,GAAI,UACJC,EAAG,MACHC,GAAI,YAERI,KAAM,CACFC,IAAK,EACLC,IAAK,KApDyBzyD,CAAQ,EAAQ,8FCElD,SAAWkiD,GAAU,aAIzB,IAAImR,EAAY,CACR,EAAG,IACH,EAAG,IACH,EAAG,IACH,EAAG,IACH,EAAG,IACH,EAAG,IACH,EAAG,IACH,EAAG,IACH,EAAG,IACH,EAAG,KAEPE,EAAY,CACR,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,KAGFrR,EAAO4N,aAAa,QAAS,CACpCC,OAAQ,6EAA6EntC,MACjF,KAEJotC,YAAa,6EAA6EptC,MACtF,KAEJqtC,SAAU,sDAAsDrtC,MAAM,KACtEstC,cAAe,wCAAwCttC,MAAM,KAC7DutC,YAAa,gBAAgBvtC,MAAM,KACnCqwC,oBAAoB,EACpBvC,eAAgB,CACZC,GAAI,QACJC,IAAK,WACLC,EAAG,aACHC,GAAI,cACJC,IAAK,oBACLC,KAAM,0BAEVZ,cAAe,MACfC,KAAM,SAAU39C,GACZ,MAAO,MAAQA,GAEnB49C,SAAU,SAAU4C,EAAMC,EAAQ1C,GAC9B,OAAIyC,EAAO,GACA,IAEA,KAGfjC,SAAU,CACNC,QAAS,wBACTC,QAAS,sBACTC,SAAU,uBACVC,QAAS,sBACTC,SAAU,uBACVC,SAAU,KAEdC,aAAc,CACVC,OAAQ,QACRC,KAAM,SACNx0C,EAAG,OACHy0C,GAAI,WACJ78C,EAAG,QACH88C,GAAI,WACJC,EAAG,OACHC,GAAI,WACJ74B,EAAG,MACH84B,GAAI,UACJC,EAAG,MACHC,GAAI,UACJC,EAAG,MACHC,GAAI,YAERmB,SAAU,SAAUjuD,GAChB,OAAOA,EACFwP,QAAQ,iBAAiB,SAAUiH,GAChC,OAAOy3C,EAAUz3C,MAEpBjH,QAAQ,KAAM,MAEvBu+C,WAAY,SAAU/tD,GAClB,OAAOA,EACFwP,QAAQ,OAAO,SAAUiH,GACtB,OAAOu3C,EAAUv3C,MAEpBjH,QAAQ,KAAM,MAEvB09C,KAAM,CACFC,IAAK,EACLC,IAAK,KAtGyBzyD,CAAQ,EAAQ,8FCGlD,SAAWkiD,GAAU,aAIdA,EAAO4N,aAAa,QAAS,CACpCC,OAAQ,yEAAyEntC,MAC7E,KAEJotC,YAAa,yEAAyEptC,MAClF,KAEJqtC,SAAU,sDAAsDrtC,MAAM,KACtEstC,cAAe,wCAAwCttC,MAAM,KAC7DutC,YAAa,gBAAgBvtC,MAAM,KACnCqwC,oBAAoB,EACpBvC,eAAgB,CACZC,GAAI,QACJC,IAAK,WACLC,EAAG,aACHC,GAAI,cACJC,IAAK,oBACLC,KAAM,0BAEVC,SAAU,CACNC,QAAS,wBACTC,QAAS,sBACTC,SAAU,uBACVC,QAAS,sBACTC,SAAU,uBACVC,SAAU,KAEdC,aAAc,CACVC,OAAQ,QACRC,KAAM,SACNx0C,EAAG,OACHy0C,GAAI,WACJ78C,EAAG,QACH88C,GAAI,WACJC,EAAG,OACHC,GAAI,WACJ74B,EAAG,MACH84B,GAAI,UACJC,EAAG,MACHC,GAAI,UACJC,EAAG,MACHC,GAAI,YAERI,KAAM,CACFC,IAAK,EACLC,IAAK,KApDyBzyD,CAAQ,EAAQ,2FCKlD,SAAWkiD,GAAU,aAIzB,IAAImR,EAAY,CACR,EAAG,IACH,EAAG,IACH,EAAG,IACH,EAAG,IACH,EAAG,IACH,EAAG,IACH,EAAG,IACH,EAAG,IACH,EAAG,IACH,EAAG,KAEPE,EAAY,CACR,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,KAETb,EAAa,SAAUryC,GACnB,OAAa,IAANA,EACD,EACM,IAANA,EACA,EACM,IAANA,EACA,EACAA,EAAI,KAAO,GAAKA,EAAI,KAAO,GAC3B,EACAA,EAAI,KAAO,GACX,EACA,GAEVsyC,EAAU,CACNz1C,EAAG,CACC,eACA,cACA,CAAC,UAAW,WACZ,UACA,WACA,YAEJpI,EAAG,CACC,eACA,cACA,CAAC,UAAW,WACZ,WACA,WACA,YAEJ+8C,EAAG,CACC,cACA,aACA,CAAC,SAAU,UACX,WACA,UACA,WAEJ54B,EAAG,CACC,aACA,WACA,CAAC,QAAS,SACV,UACA,WACA,UAEJ+4B,EAAG,CACC,aACA,WACA,CAAC,QAAS,SACV,UACA,UACA,UAEJE,EAAG,CACC,aACA,WACA,CAAC,QAAS,SACV,WACA,WACA,WAGRU,EAAY,SAAUC,GAClB,OAAO,SAAUP,EAAQQ,EAAeztD,EAAQ0tD,GAC5C,IAAIC,EAAIN,EAAWJ,GACfxhD,EAAM6hD,EAAQE,GAAGH,EAAWJ,IAIhC,OAHU,IAANU,IACAliD,EAAMA,EAAIgiD,EAAgB,EAAI,IAE3BhiD,EAAI+D,QAAQ,MAAOy9C,KAGlCvC,EAAS,CACL,QACA,SACA,OACA,QACA,OACA,QACA,QACA,QACA,SACA,SACA,SACA,UAGC7N,EAAO4N,aAAa,KAAM,CAC/BC,OAAQA,EACRC,YAAaD,EACbE,SAAU,sDAAsDrtC,MAAM,KACtEstC,cAAe,wCAAwCttC,MAAM,KAC7DutC,YAAa,gBAAgBvtC,MAAM,KACnCqwC,oBAAoB,EACpBvC,eAAgB,CACZC,GAAI,QACJC,IAAK,WACLC,EAAG,aACHC,GAAI,cACJC,IAAK,oBACLC,KAAM,0BAEVZ,cAAe,MACfC,KAAM,SAAU39C,GACZ,MAAO,MAAQA,GAEnB49C,SAAU,SAAU4C,EAAMC,EAAQ1C,GAC9B,OAAIyC,EAAO,GACA,IAEA,KAGfjC,SAAU,CACNC,QAAS,wBACTC,QAAS,uBACTC,SAAU,uBACVC,QAAS,sBACTC,SAAU,uBACVC,SAAU,KAEdC,aAAc,CACVC,OAAQ,SACRC,KAAM,SACNx0C,EAAG01C,EAAU,KACbjB,GAAIiB,EAAU,KACd99C,EAAG89C,EAAU,KACbhB,GAAIgB,EAAU,KACdf,EAAGe,EAAU,KACbd,GAAIc,EAAU,KACd35B,EAAG25B,EAAU,KACbb,GAAIa,EAAU,KACdZ,EAAGY,EAAU,KACbX,GAAIW,EAAU,KACdV,EAAGU,EAAU,KACbT,GAAIS,EAAU,MAElBU,SAAU,SAAUjuD,GAChB,OAAOA,EACFwP,QAAQ,iBAAiB,SAAUiH,GAChC,OAAOy3C,EAAUz3C,MAEpBjH,QAAQ,KAAM,MAEvBu+C,WAAY,SAAU/tD,GAClB,OAAOA,EACFwP,QAAQ,OAAO,SAAUiH,GACtB,OAAOu3C,EAAUv3C,MAEpBjH,QAAQ,KAAM,MAEvB09C,KAAM,CACFC,IAAK,EACLC,IAAK,MAzLyBzyD,CAAQ,EAAQ,2FCClD,SAAWkiD,GAAU,aAIzB,IAAIsR,EAAW,CACX,EAAG,QACH,EAAG,QACH,EAAG,QACH,GAAI,QACJ,GAAI,QACJ,EAAG,OACH,EAAG,OACH,GAAI,OACJ,GAAI,OACJ,EAAG,QACH,EAAG,QACH,IAAK,QACL,EAAG,OACH,EAAG,QACH,GAAI,QACJ,GAAI,QACJ,GAAI,QACJ,GAAI,SAGCtR,EAAO4N,aAAa,KAAM,CAC/BC,OAAQ,+EAA+EntC,MACnF,KAEJotC,YAAa,kDAAkDptC,MAAM,KACrEqtC,SAAU,qEAAqErtC,MAC3E,KAEJstC,cAAe,8BAA8BttC,MAAM,KACnDutC,YAAa,uBAAuBvtC,MAAM,KAC1CqwC,oBAAoB,EACpBvC,eAAgB,CACZC,GAAI,QACJC,IAAK,WACLC,EAAG,aACHC,GAAI,cACJC,IAAK,oBACLC,KAAM,2BAEVC,SAAU,CACNC,QAAS,kBACTC,QAAS,kBACTC,SAAU,+BACVC,QAAS,aACTC,SAAU,+BACVC,SAAU,KAEdC,aAAc,CACVC,OAAQ,WACRC,KAAM,WACNx0C,EAAG,kBACHy0C,GAAI,YACJ78C,EAAG,aACH88C,GAAI,YACJC,EAAG,WACHC,GAAI,UACJ74B,EAAG,UACH84B,GAAI,SACJC,EAAG,SACHC,GAAI,QACJC,EAAG,SACHC,GAAI,SAER/B,cAAe,0BACfC,KAAM,SAAU39C,GACZ,MAAO,mBAAmBuQ,KAAKvQ,IAEnC49C,SAAU,SAAU4C,EAAMC,EAAQ1C,GAC9B,OAAIyC,EAAO,EACA,OACAA,EAAO,GACP,QACAA,EAAO,GACP,SAEA,SAGfd,uBAAwB,wCACxBC,QAAS,SAAUC,GACf,GAAe,IAAXA,EAEA,OAAOA,EAAS,QAEpB,IAAI/0C,EAAI+0C,EAAS,GAGjB,OAAOA,GAAUkB,EAASj2C,IAAMi2C,EAFvBlB,EAAS,IAAO/0C,IAEsBi2C,EADvClB,GAAU,IAAM,IAAM,QAGlCC,KAAM,CACFC,IAAK,EACLC,IAAK,KAnGyBzyD,CAAQ,EAAQ,2FCKlD,SAAWkiD,GAAU,aAYzB,SAASuR,EAAuBnB,EAAQQ,EAAentD,GASnD,MAAY,MAARA,EACOmtD,EAAgB,UAAY,UACpB,MAARntD,EACAmtD,EAAgB,UAAY,UAE5BR,EAAS,KAtBFoB,GAsB6BpB,EArB3CqB,EAQS,CACThC,GAAImB,EAAgB,yBAA2B,yBAC/ClB,GAAIkB,EAAgB,yBAA2B,yBAC/ChB,GAAIgB,EAAgB,yBAA2B,yBAC/Cf,GAAI,iBACJE,GAAI,uBACJE,GAAI,kBAOgCxsD,GArBvBid,MAAM,KAChB8wC,EAAM,IAAO,GAAKA,EAAM,KAAQ,GACjCC,EAAM,GACND,EAAM,IAAM,GAAKA,EAAM,IAAM,IAAMA,EAAM,IAAM,IAAMA,EAAM,KAAO,IAClEC,EAAM,GACNA,EAAM,IANhB,IAAsBD,EACdC,EAyBCzR,EAAO4N,aAAa,KAAM,CAC/BC,OAAQ,CACJroC,OAAQ,uGAAuG9E,MAC3G,KAEJgxC,WAAY,qGAAqGhxC,MAC7G,MAGRotC,YAAa,0DAA0DptC,MACnE,KAEJqtC,SAAU,CACNvoC,OAAQ,0DAA0D9E,MAC9D,KAEJgxC,WAAY,0DAA0DhxC,MAClE,KAEJixC,SAAU,+CAEd3D,cAAe,uBAAuBttC,MAAM,KAC5CutC,YAAa,uBAAuBvtC,MAAM,KAC1C8tC,eAAgB,CACZC,GAAI,QACJC,IAAK,WACLC,EAAG,aACHC,GAAI,iBACJC,IAAK,wBACLC,KAAM,+BAEVC,SAAU,CACNC,QAAS,eACTC,QAAS,gBACTE,QAAS,eACTD,SAAU,WACN,MAAO,mBAEXE,SAAU,WACN,OAAQxxD,KAAKg0D,OACT,KAAK,EACL,KAAK,EACL,KAAK,EACL,KAAK,EACD,MAAO,0BACX,KAAK,EACL,KAAK,EACL,KAAK,EACD,MAAO,2BAGnBvC,SAAU,KAEdC,aAAc,CACVC,OAAQ,UACRC,KAAM,UACNx0C,EAAG,kBACHpI,EAAG2+C,EACH7B,GAAI6B,EACJ5B,EAAG4B,EACH3B,GAAI2B,EACJx6B,EAAG,QACH84B,GAAI0B,EACJzB,EAAG,QACHC,GAAIwB,EACJvB,EAAG,MACHC,GAAIsB,GAERrD,cAAe,yBACfC,KAAM,SAAU39C,GACZ,MAAO,iBAAiBuQ,KAAKvQ,IAEjC49C,SAAU,SAAU4C,EAAMC,EAAQ1C,GAC9B,OAAIyC,EAAO,EACA,OACAA,EAAO,GACP,SACAA,EAAO,GACP,MAEA,UAGfd,uBAAwB,mBACxBC,QAAS,SAAUC,EAAQyB,GACvB,OAAQA,GACJ,IAAK,IACL,IAAK,IACL,IAAK,MACL,IAAK,IACL,IAAK,IACD,OAAQzB,EAAS,IAAO,GAAKA,EAAS,IAAO,GACzCA,EAAS,KAAQ,IACjBA,EAAS,KAAQ,GAEfA,EAAS,KADTA,EAAS,KAEnB,IAAK,IACD,OAAOA,EAAS,MACpB,QACI,OAAOA,IAGnBC,KAAM,CACFC,IAAK,EACLC,IAAK,KAzIyBzyD,CAAQ,EAAQ,2FCClD,SAAWkiD,GAAU,aAIhBA,EAAO4N,aAAa,KAAM,CAC/BC,OAAQ,oFAAoFntC,MACxF,KAEJotC,YAAa,kDAAkDptC,MAAM,KACrEqtC,SAAU,yDAAyDrtC,MAC/D,KAEJstC,cAAe,8BAA8BttC,MAAM,KACnDutC,YAAa,uBAAuBvtC,MAAM,KAC1C8tC,eAAgB,CACZC,GAAI,OACJC,IAAK,UACLC,EAAG,YACHC,GAAI,cACJC,IAAK,mBACLC,KAAM,0BAEVC,SAAU,CACNC,QAAS,cACTC,QAAS,cACTC,SAAU,cACVC,QAAS,eACTC,SAAU,WACN,OAAQxxD,KAAKg0D,OACT,KAAK,EACL,KAAK,EACL,KAAK,EACD,MAAO,yBACX,KAAK,EACL,KAAK,EACL,KAAK,EACL,KAAK,EACD,MAAO,0BAGnBvC,SAAU,KAEdC,aAAc,CACVC,OAAQ,UACRC,KAAM,WACNx0C,EAAG,kBACHy0C,GAAI,aACJ78C,EAAG,SACH88C,GAAI,YACJC,EAAG,MACHC,GAAI,UACJ74B,EAAG,MACH84B,GAAI,UACJiC,EAAG,UACHC,GAAI,aACJjC,EAAG,QACHC,GAAI,YACJC,EAAG,SACHC,GAAI,aAERC,uBAAwB,8BACxBC,QAAS,SAAUC,GACf,IAAI4B,EAAY5B,EAAS,GACrB6B,EAAc7B,EAAS,IAC3B,OAAe,IAAXA,EACOA,EAAS,MACO,IAAhB6B,EACA7B,EAAS,MACT6B,EAAc,IAAMA,EAAc,GAClC7B,EAAS,MACK,IAAd4B,EACA5B,EAAS,MACK,IAAd4B,EACA5B,EAAS,MACK,IAAd4B,GAAiC,IAAdA,EACnB5B,EAAS,MAETA,EAAS,OAGxBC,KAAM,CACFC,IAAK,EACLC,IAAK,KArFyBzyD,CAAQ,EAAQ,2FCGlD,SAAWkiD,GAAU,aAIhBA,EAAO4N,aAAa,KAAM,CAC/BC,OAAQ,8IAA8IntC,MAClJ,KAEJotC,YAAa,iDAAiDptC,MAAM,KACpEqtC,SAAU,+CAA+CrtC,MAAM,KAC/DstC,cAAe,8BAA8BttC,MAAM,KACnDutC,YAAa,uBAAuBvtC,MAAM,KAC1C8tC,eAAgB,CACZC,GAAI,QACJC,IAAK,WACLC,EAAG,aACHC,GAAI,2BACJC,IAAK,wCACLC,KAAM,8CAEVC,SAAU,CACNC,QAAS,eACTC,QAAS,iBACTC,SAAU,qBACVC,QAAS,iBACTC,SAAU,yBACVC,SAAU,KAEdC,aAAc,CACVC,OAAQ,UACRC,KAAM,aACNx0C,EAAG,kBACHy0C,GAAI,aACJ78C,EAAG,eACH88C,GAAI,YACJC,EAAG,aACHC,GAAI,UACJ74B,EAAG,aACH84B,GAAI,UACJC,EAAG,aACHC,GAAI,UACJC,EAAG,YACHC,GAAI,UAERI,KAAM,CACFC,IAAK,EACLC,IAAK,KAjDyBzyD,CAAQ,EAAQ,8FCGlD,SAAWkiD,GAAU,aAIzB,IAAImR,EAAY,CACR,EAAG,IACH,EAAG,IACH,EAAG,IACH,EAAG,IACH,EAAG,IACH,EAAG,IACH,EAAG,IACH,EAAG,IACH,EAAG,IACH,EAAG,KAEPE,EAAY,CACR,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,KAGFrR,EAAO4N,aAAa,QAAS,CACpCC,OAAQ,0FAA0FntC,MAC9F,KAEJotC,YAAa,mEAAmEptC,MAC5E,KAEJqtC,SAAU,4DAA4DrtC,MAClE,KAEJstC,cAAe,uCAAuCttC,MAAM,KAC5DutC,YAAa,kCAAkCvtC,MAAM,KACrD8tC,eAAgB,CACZC,GAAI,aACJC,IAAK,gBACLC,EAAG,aACHC,GAAI,cACJC,IAAK,0BACLC,KAAM,iCAEVC,SAAU,CACNC,QAAS,UACTC,QAAS,gBACTC,SAAU,WACVC,QAAS,aACTC,SAAU,gBACVC,SAAU,KAEdC,aAAc,CACVC,OAAQ,SACRC,KAAM,SACNx0C,EAAG,eACHy0C,GAAI,aACJ78C,EAAG,WACH88C,GAAI,WACJC,EAAG,WACHC,GAAI,WACJ74B,EAAG,SACH84B,GAAI,SACJC,EAAG,SACHC,GAAI,SACJC,EAAG,SACHC,GAAI,UAERmB,SAAU,SAAUjuD,GAChB,OAAOA,EAAOwP,QAAQ,iBAAiB,SAAUiH,GAC7C,OAAOy3C,EAAUz3C,OAGzBs3C,WAAY,SAAU/tD,GAClB,OAAOA,EAAOwP,QAAQ,OAAO,SAAUiH,GACnC,OAAOu3C,EAAUv3C,OAIzBs0C,cAAe,uCACfgE,aAAc,SAAUlB,EAAM5C,GAI1B,OAHa,KAAT4C,IACAA,EAAO,GAEM,QAAb5C,EACO4C,EAAO,EAAIA,EAAOA,EAAO,GACZ,QAAb5C,GAEa,SAAbA,EADA4C,EAGa,UAAb5C,EACA4C,GAAQ,EAAIA,EAAOA,EAAO,GACb,UAAb5C,GAEa,YAAbA,EADA4C,EAAO,QACX,GAKX5C,SAAU,SAAU4C,EAAMC,EAAQ1C,GAC9B,OAAIyC,EAAO,EACA,MACAA,EAAO,EACP,MACAA,EAAO,GACP,OACAA,EAAO,GACP,QACAA,EAAO,GACP,QACAA,EAAO,GACP,UAEA,OAGfX,KAAM,CACFC,IAAK,EACLC,IAAK,KA9HyBzyD,CAAQ,EAAQ,2FCGlD,SAAWkiD,GAAU,aAIzB,IAAImR,EAAY,CACR,EAAG,IACH,EAAG,IACH,EAAG,IACH,EAAG,IACH,EAAG,IACH,EAAG,IACH,EAAG,IACH,EAAG,IACH,EAAG,IACH,EAAG,KAEPE,EAAY,CACR,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,KAGJrR,EAAO4N,aAAa,KAAM,CAC/BC,OAAQ,0FAA0FntC,MAC9F,KAEJotC,YAAa,mEAAmEptC,MAC5E,KAEJqtC,SAAU,4DAA4DrtC,MAClE,KAEJstC,cAAe,uCAAuCttC,MAAM,KAC5DutC,YAAa,kCAAkCvtC,MAAM,KACrD8tC,eAAgB,CACZC,GAAI,aACJC,IAAK,gBACLC,EAAG,aACHC,GAAI,cACJC,IAAK,0BACLC,KAAM,iCAEVC,SAAU,CACNC,QAAS,UACTC,QAAS,gBACTC,SAAU,WACVC,QAAS,aACTC,SAAU,gBACVC,SAAU,KAEdC,aAAc,CACVC,OAAQ,SACRC,KAAM,SACNx0C,EAAG,eACHy0C,GAAI,aACJ78C,EAAG,WACH88C,GAAI,WACJC,EAAG,WACHC,GAAI,WACJ74B,EAAG,SACH84B,GAAI,SACJC,EAAG,SACHC,GAAI,SACJC,EAAG,SACHC,GAAI,UAERmB,SAAU,SAAUjuD,GAChB,OAAOA,EAAOwP,QAAQ,iBAAiB,SAAUiH,GAC7C,OAAOy3C,EAAUz3C,OAGzBs3C,WAAY,SAAU/tD,GAClB,OAAOA,EAAOwP,QAAQ,OAAO,SAAUiH,GACnC,OAAOu3C,EAAUv3C,OAGzBs0C,cAAe,2BACfgE,aAAc,SAAUlB,EAAM5C,GAI1B,OAHa,KAAT4C,IACAA,EAAO,GAGO,QAAb5C,GAAsB4C,GAAQ,GACjB,UAAb5C,GAAwB4C,EAAO,GACnB,UAAb5C,EAEO4C,EAAO,GAEPA,GAGf5C,SAAU,SAAU4C,EAAMC,EAAQ1C,GAC9B,OAAIyC,EAAO,EACA,MACAA,EAAO,GACP,OACAA,EAAO,GACP,QACAA,EAAO,GACP,QAEA,OAGfX,KAAM,CACFC,IAAK,EACLC,IAAK,KApHyBzyD,CAAQ,EAAQ,2FCGlD,SAAWkiD,GAAU,aAIzB,IAAImR,EAAY,CACR,EAAG,IACH,EAAG,IACH,EAAG,IACH,EAAG,IACH,EAAG,IACH,EAAG,IACH,EAAG,IACH,EAAG,IACH,EAAG,IACH,EAAG,KAEPE,EAAY,CACR,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,KAGJrR,EAAO4N,aAAa,KAAM,CAC/BC,OAAQ,qJAAqJntC,MACzJ,KAEJotC,YAAa,iEAAiEptC,MAC1E,KAEJyxC,iBAAkB,gBAClBC,kBAAkB,EAClBrE,SAAU,gFAAgFrtC,MACtF,KAEJstC,cAAe,oDAAoDttC,MAC/D,KAEJutC,YAAa,6BAA6BvtC,MAAM,KAChD8tC,eAAgB,CACZC,GAAI,SACJC,IAAK,YACLC,EAAG,aACHC,GAAI,cACJC,IAAK,sBACLC,KAAM,6BAEVC,SAAU,CACNC,QAAS,cACTC,QAAS,cACTC,SAAU,wBACVC,QAAS,YACTC,SAAU,4BACVC,SAAU,KAEdC,aAAc,CACVC,OAAQ,QACRC,KAAM,WACNx0C,EAAG,QACHy0C,GAAI,YACJ78C,EAAG,aACH88C,GAAI,WACJC,EAAG,cACHC,GAAI,YACJ74B,EAAG,WACH84B,GAAI,UACJC,EAAG,YACHC,GAAI,UACJC,EAAG,UACHC,GAAI,SAERmB,SAAU,SAAUjuD,GAChB,OAAOA,EAAOwP,QAAQ,iBAAiB,SAAUiH,GAC7C,OAAOy3C,EAAUz3C,OAGzBs3C,WAAY,SAAU/tD,GAClB,OAAOA,EAAOwP,QAAQ,OAAO,SAAUiH,GACnC,OAAOu3C,EAAUv3C,OAGzBs0C,cAAe,wCACfgE,aAAc,SAAUlB,EAAM5C,GAI1B,OAHa,KAAT4C,IACAA,EAAO,GAGO,WAAb5C,GAAyB4C,GAAQ,GACpB,YAAb5C,GAA0B4C,EAAO,GACrB,YAAb5C,EAEO4C,EAAO,GAEPA,GAGf5C,SAAU,SAAU4C,EAAMC,EAAQ1C,GAC9B,OAAIyC,EAAO,EACA,SACAA,EAAO,GACP,UACAA,EAAO,GACP,UACAA,EAAO,GACP,UAEA,UAGfX,KAAM,CACFC,IAAK,EACLC,IAAK,KAxHyBzyD,CAAQ,EAAQ,2FCGlD,SAAWkiD,GAAU,aAIzB,SAASqS,EAAyBjC,EAAQQ,EAAentD,GAMrD,OAAO2sD,EAAS,IAoBpB,SAAkB5vC,EAAM4vC,GACpB,OAAe,IAAXA,EAKR,SAAsB5vC,GAClB,IAAI8xC,EAAgB,CAChB1/C,EAAG,IACH4J,EAAG,IACHua,EAAG,KAEP,YAAsChlB,IAAlCugD,EAAc9xC,EAAKnd,OAAO,IACnBmd,EAEJ8xC,EAAc9xC,EAAKnd,OAAO,IAAMmd,EAAKqX,UAAU,GAb3C06B,CAAa/xC,GAEjBA,EAxBegyC,CALT,CACT9C,GAAI,WACJK,GAAI,MACJF,GAAI,UAE8BpsD,GAAM2sD,GAchD,SAASqC,EAAWrC,GAChB,OAAIA,EAAS,EACFqC,EAAWrC,EAAS,IAExBA,EAoBX,IAAIsC,EAAc,CACV,QACA,cACA,QACA,QACA,QACA,cACA,QACA,QACA,QACA,QACA,OACA,SAEJC,EAAc,6IAqBdC,EAAmB,CACf,OACA,OACA,eACA,QACA,OACA,OACA,QAGC5S,EAAO4N,aAAa,KAAM,CAC/BC,OAAQ,gFAAgFntC,MACpF,KAEJotC,YAAa,mDAAmDptC,MAAM,KACtEqtC,SAAU,6CAA6CrtC,MAAM,KAC7DstC,cAAe,8BAA8BttC,MAAM,KACnDutC,YAAa,wBAAwBvtC,MAAM,KAC3CmyC,cAAeD,EACfE,kBArCoB,CAChB,QACA,QACA,WACA,iBACA,SACA,WACA,YA+BJC,mBA7BqB,CACjB,QACA,QACA,QACA,QACA,QACA,QACA,SAuBJH,iBAAkBA,EAElBD,YAAaA,EACbR,iBAAkBQ,EAClBK,kBA7CoB,wFA8CpBC,uBA7CyB,2DA8CzBP,YAAaA,EACbQ,gBAAiBR,EACjBS,iBAAkBT,EAElBlE,eAAgB,CACZC,GAAI,QACJC,IAAK,WACLC,EAAG,aACHC,GAAI,sBACJC,IAAK,4BACLC,KAAM,mCAEVC,SAAU,CACNC,QAAS,gBACTC,QAAS,qBACTC,SAAU,eACVC,QAAS,gBACTC,SAAU,qBACVC,SAAU,KAEdC,aAAc,CACVC,OAAQ,YACRC,KAAM,SACNx0C,EAAG,wBACHy0C,GAAI,YACJ78C,EAAG,cACH88C,GAAI2C,EACJ1C,EAAG,SACHC,GAAI,SACJ74B,EAAG,YACH84B,GAAIwC,EACJvC,EAAG,SACHC,GAAIsC,EACJrC,EAAG,WACHC,GApIR,SAAiCG,GAC7B,OAAQqC,EAAWrC,IACf,KAAK,EACL,KAAK,EACL,KAAK,EACL,KAAK,EACL,KAAK,EACD,OAAOA,EAAS,SACpB,QACI,OAAOA,EAAS,YA6HxBF,uBAAwB,kBACxBC,QAAS,SAAUC,GAEf,OAAOA,GADiB,IAAXA,EAAe,KAAO,QAGvCC,KAAM,CACFC,IAAK,EACLC,IAAK,GAETrC,cAAe,YACfC,KAAM,SAAUhvC,GACZ,MAAiB,SAAVA,GAEXivC,SAAU,SAAU4C,EAAMC,EAAQ1C,GAC9B,OAAOyC,EAAO,GAAK,OAAS,UAnKElzD,CAAQ,EAAQ,2FCIlD,SAAWkiD,GAAU,aAIzB,SAASoT,EAAUhD,EAAQQ,EAAentD,GACtC,IAAIS,EAASksD,EAAS,IACtB,OAAQ3sD,GACJ,IAAK,KAQD,OANIS,GADW,IAAXksD,EACU,UACQ,IAAXA,GAA2B,IAAXA,GAA2B,IAAXA,EAC7B,UAEA,WAGlB,IAAK,IACD,OAAOQ,EAAgB,eAAiB,eAC5C,IAAK,KAQD,OANI1sD,GADW,IAAXksD,EACU,SACQ,IAAXA,GAA2B,IAAXA,GAA2B,IAAXA,EAC7B,SAEA,UAGlB,IAAK,IACD,OAAOQ,EAAgB,YAAc,cACzC,IAAK,KAQD,OANI1sD,GADW,IAAXksD,EACU,MACQ,IAAXA,GAA2B,IAAXA,GAA2B,IAAXA,EAC7B,OAEA,QAGlB,IAAK,KAMD,OAJIlsD,GADW,IAAXksD,EACU,MAEA,QAGlB,IAAK,KAQD,OANIlsD,GADW,IAAXksD,EACU,SACQ,IAAXA,GAA2B,IAAXA,GAA2B,IAAXA,EAC7B,UAEA,WAGlB,IAAK,KAQD,OANIlsD,GADW,IAAXksD,EACU,SACQ,IAAXA,GAA2B,IAAXA,GAA2B,IAAXA,EAC7B,SAEA,WAMjBpQ,EAAO4N,aAAa,KAAM,CAC/BC,OAAQ,qFAAqFntC,MACzF,KAEJotC,YAAa,8DAA8DptC,MACvE,KAEJ0xC,kBAAkB,EAClBrE,SAAU,4DAA4DrtC,MAClE,KAEJstC,cAAe,qCAAqCttC,MAAM,KAC1DutC,YAAa,uBAAuBvtC,MAAM,KAC1CqwC,oBAAoB,EACpBvC,eAAgB,CACZC,GAAI,OACJC,IAAK,UACLC,EAAG,aACHC,GAAI,eACJC,IAAK,oBACLC,KAAM,2BAEVC,SAAU,CACNC,QAAS,eACTC,QAAS,eACTC,SAAU,WACN,OAAQtxD,KAAKg0D,OACT,KAAK,EACD,MAAO,wBACX,KAAK,EACD,MAAO,uBACX,KAAK,EACD,MAAO,sBACX,KAAK,EACL,KAAK,EACL,KAAK,EACL,KAAK,EACD,MAAO,oBAGnBzC,QAAS,eACTC,SAAU,WACN,OAAQxxD,KAAKg0D,OACT,KAAK,EACL,KAAK,EACD,MAAO,uBACX,KAAK,EACD,MAAO,2BACX,KAAK,EACL,KAAK,EACL,KAAK,EACL,KAAK,EACD,MAAO,yBAGnBvC,SAAU,KAEdC,aAAc,CACVC,OAAQ,QACRC,KAAM,WACNx0C,EAAG,cACHy0C,GAAI2D,EACJxgD,EAAGwgD,EACH1D,GAAI0D,EACJzD,EAAGyD,EACHxD,GAAIwD,EACJr8B,EAAG,MACH84B,GAAIuD,EACJtD,EAAG,SACHC,GAAIqD,EACJpD,EAAG,SACHC,GAAImD,GAERlD,uBAAwB,YACxBC,QAAS,MACTE,KAAM,CACFC,IAAK,EACLC,IAAK,KAlJyBzyD,CAAQ,EAAQ,2FCElD,SAAWkiD,GAAU,aAIhBA,EAAO4N,aAAa,KAAM,CAC/BC,OAAQ,CACJ6D,WAAY,oFAAoFhxC,MAC5F,KAEJ8E,OAAQ,qHAAqH9E,MACzH,KAEJixC,SAAU,mBAEd7D,YAAa,8DAA8DptC,MACvE,KAEJ0xC,kBAAkB,EAClBrE,SAAU,8DAA8DrtC,MACpE,KAEJstC,cAAe,8BAA8BttC,MAAM,KACnDutC,YAAa,uBAAuBvtC,MAAM,KAC1CqwC,oBAAoB,EACpBvC,eAAgB,CACZC,GAAI,OACJC,IAAK,UACLC,EAAG,aACHC,GAAI,mBACJyE,GAAI,aACJxE,IAAK,gCACLyE,IAAK,mBACLxE,KAAM,qCACNyE,KAAM,wBAEVxE,SAAU,CACNC,QAAS,WACL,MAAO,YAA+B,IAAjBpxD,KAAKywD,QAAgB,MAAQ,MAAQ,QAE9DY,QAAS,WACL,MAAO,YAA+B,IAAjBrxD,KAAKywD,QAAgB,MAAQ,MAAQ,QAE9Da,SAAU,WACN,MAAO,YAA+B,IAAjBtxD,KAAKywD,QAAgB,MAAQ,MAAQ,QAE9Dc,QAAS,WACL,MAAO,YAA+B,IAAjBvxD,KAAKywD,QAAgB,MAAQ,MAAQ,QAE9De,SAAU,WACN,MACI,wBACkB,IAAjBxxD,KAAKywD,QAAgB,MAAQ,MAC9B,QAGRgB,SAAU,KAEdC,aAAc,CACVC,OAAQ,YACRC,KAAM,QACNx0C,EAAG,aACHy0C,GAAI,YACJ78C,EAAG,WACH88C,GAAI,YACJC,EAAG,WACHC,GAAI,WACJ74B,EAAG,SACH84B,GAAI,UACJC,EAAG,SACHC,GAAI,WACJC,EAAG,SACHC,GAAI,WAERC,uBAAwB,qBACxBC,QAAS,SAAUC,EAAQyB,GACvB,IAAI2B,EACW,IAAXpD,EACM,IACW,IAAXA,EACA,IACW,IAAXA,EACA,IACW,IAAXA,EACA,IACA,IAIV,MAHe,MAAXyB,GAA6B,MAAXA,IAClB2B,EAAS,KAENpD,EAASoD,GAEpBnD,KAAM,CACFC,IAAK,EACLC,IAAK,KA/FyBzyD,CAAQ,EAAQ,2FCGlD,SAAWkiD,GAAU,aAIzB,IAAI6N,EAAS,oFAAoFntC,MACzF,KAEJotC,EAAc,kDAAkDptC,MAAM,KACtEgyC,EAAc,CACV,QACA,QACA,QACA,QACA,QACA,yBACA,4BACA,QACA,QACA,QACA,QACA,SAIJC,EAAc,wJAElB,SAASc,EAAOt1C,GACZ,OAAOA,EAAI,GAAKA,EAAI,GAAoB,MAAZA,EAAI,IAEpC,SAASi1C,EAAUhD,EAAQQ,EAAentD,EAAKotD,GAC3C,IAAI3sD,EAASksD,EAAS,IACtB,OAAQ3sD,GACJ,IAAK,IACD,OAAOmtD,GAAiBC,EAAW,aAAe,gBACtD,IAAK,KACD,OAAID,GAAiBC,EACV3sD,GAAUuvD,EAAOrD,GAAU,UAAY,UAEvClsD,EAAS,YAExB,IAAK,IACD,OAAO0sD,EAAgB,SAAWC,EAAW,SAAW,UAC5D,IAAK,KACD,OAAID,GAAiBC,EACV3sD,GAAUuvD,EAAOrD,GAAU,SAAW,SAEtClsD,EAAS,WAExB,IAAK,IACD,OAAO0sD,EAAgB,SAAWC,EAAW,SAAW,UAC5D,IAAK,KACD,OAAID,GAAiBC,EACV3sD,GAAUuvD,EAAOrD,GAAU,SAAW,SAEtClsD,EAAS,WAExB,IAAK,IACD,OAAO0sD,GAAiBC,EAAW,MAAQ,OAC/C,IAAK,KACD,OAAID,GAAiBC,EACV3sD,GAAUuvD,EAAOrD,GAAU,MAAQ,OAEnClsD,EAAS,MAExB,IAAK,IACD,OAAO0sD,GAAiBC,EAAW,QAAU,UACjD,IAAK,KACD,OAAID,GAAiBC,EACV3sD,GAAUuvD,EAAOrD,GAAU,SAAW,UAEtClsD,EAAS,SAExB,IAAK,IACD,OAAO0sD,GAAiBC,EAAW,MAAQ,QAC/C,IAAK,KACD,OAAID,GAAiBC,EACV3sD,GAAUuvD,EAAOrD,GAAU,OAAS,OAEpClsD,EAAS,QAKvB87C,EAAO4N,aAAa,KAAM,CAC/BC,OAAQA,EACRC,YAAaA,EACb6E,YAAaA,EACbR,iBAAkBQ,EAGlBK,kBAAmB,uKACnBC,uBAAwB,sDACxBP,YAAaA,EACbQ,gBAAiBR,EACjBS,iBAAkBT,EAClB3E,SAAU,mDAAmDrtC,MAAM,KACnEstC,cAAe,uBAAuBttC,MAAM,KAC5CutC,YAAa,uBAAuBvtC,MAAM,KAC1C8tC,eAAgB,CACZC,GAAI,OACJC,IAAK,UACLC,EAAG,aACHC,GAAI,eACJC,IAAK,oBACLC,KAAM,yBACNz+B,EAAG,cAEP0+B,SAAU,CACNC,QAAS,cACTC,QAAS,eACTC,SAAU,WACN,OAAQtxD,KAAKg0D,OACT,KAAK,EACD,MAAO,kBACX,KAAK,EACL,KAAK,EACD,MAAO,kBACX,KAAK,EACD,MAAO,mBACX,KAAK,EACD,MAAO,oBACX,KAAK,EACD,MAAO,iBACX,KAAK,EACD,MAAO,oBAGnBzC,QAAS,eACTC,SAAU,WACN,OAAQxxD,KAAKg0D,OACT,KAAK,EACD,MAAO,wBACX,KAAK,EACL,KAAK,EACD,MAAO,uBACX,KAAK,EACD,MAAO,wBACX,KAAK,EACL,KAAK,EACD,MAAO,uBACX,KAAK,EACD,MAAO,0BAGnBvC,SAAU,KAEdC,aAAc,CACVC,OAAQ,QACRC,KAAM,UACNx0C,EAAGo4C,EACH3D,GAAI2D,EACJxgD,EAAGwgD,EACH1D,GAAI0D,EACJzD,EAAGyD,EACHxD,GAAIwD,EACJr8B,EAAGq8B,EACHvD,GAAIuD,EACJtD,EAAGsD,EACHrD,GAAIqD,EACJpD,EAAGoD,EACHnD,GAAImD,GAERlD,uBAAwB,YACxBC,QAAS,MACTE,KAAM,CACFC,IAAK,EACLC,IAAK,KAzKyBzyD,CAAQ,EAAQ,2FCGlD,SAAWkiD,GAAU,aAIhBA,EAAO4N,aAAa,KAAM,CAC/BC,OAAQ,gEAAgEntC,MACpE,KAEJotC,YAAa,kDAAkDptC,MAAM,KACrEqtC,SAAU,oEAAoErtC,MAC1E,KAEJstC,cAAe,6BAA6BttC,MAAM,KAClDutC,YAAa,uBAAuBvtC,MAAM,KAC1C8tC,eAAgB,CACZC,GAAI,QACJC,IAAK,WACLC,EAAG,aACHC,GAAI,sCACJC,IAAK,6CACLC,KAAM,oDAEVC,SAAU,CACNC,QAAS,sBACTC,QAAS,sBACTE,QAAS,sBACTD,SAAU,4BACVE,SAAU,4BACVC,SAAU,KAEdC,aAAc,CACVC,OAAQ,SAAUiE,GAMd,OAAOA,GALK,UAAUnsD,KAAKmsD,GACrB,MACA,QAAQnsD,KAAKmsD,GACb,MACA,QAGVhE,KAAM,YACNx0C,EAAG,iBACHy0C,GAAI,aACJ78C,EAAG,YACH88C,GAAI,WACJC,EAAG,YACHC,GAAI,WACJ74B,EAAG,UACH84B,GAAI,SACJC,EAAG,WACHC,GAAI,UACJC,EAAG,UACHC,GAAI,UAERC,uBAAwB,cACxBC,QAAS,SACTE,KAAM,CACFC,IAAK,EACLC,IAAK,KA5DyBzyD,CAAQ,EAAQ,2FCIlD,SAAWkiD,GAAU,aAIhBA,EAAO4N,aAAa,KAAM,CAC/BC,OAAQ,yFAAyFntC,MAC7F,KAEJotC,YAAa,qDAAqDptC,MAC9D,KAEJqtC,SAAU,+EAA+ErtC,MACrF,KAEJstC,cAAe,+BAA+BttC,MAAM,KACpDutC,YAAa,uBAAuBvtC,MAAM,KAC1CqwC,oBAAoB,EAEpBvC,eAAgB,CACZC,GAAI,QACJC,IAAK,WACLC,EAAG,aACHC,GAAI,cACJC,IAAK,oBACLC,KAAM,2BAEVC,SAAU,CACNC,QAAS,iBACTC,QAAS,gBACTC,SAAU,eACVC,QAAS,eACTC,SAAU,wBACVC,SAAU,KAEdC,aAAc,CACVC,OAAQ,UACRC,KAAM,WACNx0C,EAAG,mBACHy0C,GAAI,YACJ78C,EAAG,QACH88C,GAAI,WACJC,EAAG,MACHC,GAAI,SACJ74B,EAAG,UACH84B,GAAI,aACJC,EAAG,MACHC,GAAI,SACJC,EAAG,WACHC,GAAI,cAERC,uBAAwB,mCAExBC,QAAS,SAAUC,GACf,IACIoD,EAAS,GAiCb,OAlCQpD,EAyBA,GAEAoD,EADM,KA1BNpD,GA0BkB,KA1BlBA,GA0B8B,KA1B9BA,GA0B0C,KA1B1CA,GA0BsD,MA1BtDA,EA2BS,MAEA,MA7BTA,EA+BO,IACXoD,EA9BS,CACL,GACA,KACA,KACA,MACA,MACA,KACA,KACA,KACA,MACA,MACA,MACA,KACA,MACA,KACA,KACA,MACA,KACA,KACA,MACA,KACA,OAvBApD,IAkCDA,EAASoD,GAEpBnD,KAAM,CACFC,IAAK,EACLC,IAAK,KA9FyBzyD,CAAQ,EAAQ,2FCElD,SAAWkiD,GAAU,aAIhBA,EAAO4N,aAAa,KAAM,CAC/BC,OAAQ,sFAAsFntC,MAC1F,KAEJotC,YAAa,kDAAkDptC,MAAM,KACrEqtC,SAAU,qDAAqDrtC,MAAM,KACrEstC,cAAe,8BAA8BttC,MAAM,KACnDutC,YAAa,uBAAuBvtC,MAAM,KAC1C8tC,eAAgB,CACZC,GAAI,QACJC,IAAK,WACLC,EAAG,aACHC,GAAI,eACJC,IAAK,qBACLC,KAAM,sCAEVC,SAAU,CACNC,QAAS,iBACTC,QAAS,oBACTC,SAAU,mBACVC,QAAS,iBACTC,SAAU,qBACVC,SAAU,KAEdC,aAAc,CACVC,OAAQ,QACRC,KAAM,WACNx0C,EAAG,cACHy0C,GAAI,cACJ78C,EAAG,WACH88C,GAAI,cACJC,EAAG,UACHC,GAAI,WACJ74B,EAAG,SACH84B,GAAI,UACJC,EAAG,WACHC,GAAI,aACJC,EAAG,QACHC,GAAI,SAERC,uBAAwB,YACxBC,QAAS,MACTE,KAAM,CACFC,IAAK,EACLC,IAAK,KAnDyBzyD,CAAQ,EAAQ,8FCMlD,SAAWkiD,GAAU,aAIzB,SAAS0T,EAAoBtD,EAAQQ,EAAentD,EAAKotD,GACrD,IAAIrrC,EAAS,CACT5S,EAAG,CAAC,cAAe,gBACnB+8C,EAAG,CAAC,cAAe,gBACnB54B,EAAG,CAAC,UAAW,aACf84B,GAAI,CAACO,EAAS,QAASA,EAAS,UAChC0B,EAAG,CAAC,aAAc,eAClBhC,EAAG,CAAC,YAAa,eACjBC,GAAI,CAACK,EAAS,UAAWA,EAAS,YAClCJ,EAAG,CAAC,WAAY,cAChBC,GAAI,CAACG,EAAS,SAAUA,EAAS,YAErC,OAAOQ,EAAgBprC,EAAO/hB,GAAK,GAAK+hB,EAAO/hB,GAAK,GAG7Cu8C,EAAO4N,aAAa,QAAS,CACpCC,OAAQ,qFAAqFntC,MACzF,KAEJotC,YAAa,6DAA6DptC,MACtE,KAEJ0xC,kBAAkB,EAClBrE,SAAU,8DAA8DrtC,MACpE,KAEJstC,cAAe,8BAA8BttC,MAAM,KACnDutC,YAAa,uBAAuBvtC,MAAM,KAC1CqwC,oBAAoB,EACpBvC,eAAgB,CACZC,GAAI,QACJC,IAAK,WACLC,EAAG,aACHC,GAAI,eACJC,IAAK,qBACLC,KAAM,4BAEVC,SAAU,CACNC,QAAS,sBACTK,SAAU,IACVJ,QAAS,uBACTC,SAAU,qBACVC,QAAS,wBACTC,SAAU,gCAEdE,aAAc,CACVC,OAAQ,QACRC,KAAM,SACNx0C,EAAG,oBACHy0C,GAAI,cACJ78C,EAAG8gD,EACHhE,GAAI,aACJC,EAAG+D,EACH9D,GAAI,aACJ74B,EAAG28B,EACH7D,GAAI6D,EACJ5B,EAAG4B,EACH3B,GAAI,YACJjC,EAAG4D,EACH3D,GAAI2D,EACJ1D,EAAG0D,EACHzD,GAAIyD,GAERxD,uBAAwB,YACxBC,QAAS,MACTE,KAAM,CACFC,IAAK,EACLC,IAAK,KA1EyBzyD,CAAQ,EAAQ,8FCAlD,SAAWkiD,GAAU,aAIzB,SAAS0T,EAAoBtD,EAAQQ,EAAentD,EAAKotD,GACrD,IAAIrrC,EAAS,CACT5S,EAAG,CAAC,cAAe,gBACnB+8C,EAAG,CAAC,cAAe,gBACnB54B,EAAG,CAAC,UAAW,aACf84B,GAAI,CAACO,EAAS,QAASA,EAAS,UAChC0B,EAAG,CAAC,aAAc,eAClBhC,EAAG,CAAC,YAAa,eACjBC,GAAI,CAACK,EAAS,UAAWA,EAAS,YAClCJ,EAAG,CAAC,WAAY,cAChBC,GAAI,CAACG,EAAS,SAAUA,EAAS,YAErC,OAAOQ,EAAgBprC,EAAO/hB,GAAK,GAAK+hB,EAAO/hB,GAAK,GAG7Cu8C,EAAO4N,aAAa,QAAS,CACpCC,OAAQ,qFAAqFntC,MACzF,KAEJotC,YAAa,6DAA6DptC,MACtE,KAEJ0xC,kBAAkB,EAClBrE,SAAU,8DAA8DrtC,MACpE,KAEJstC,cAAe,uBAAuBttC,MAAM,KAC5CutC,YAAa,uBAAuBvtC,MAAM,KAC1CqwC,oBAAoB,EACpBvC,eAAgB,CACZC,GAAI,QACJC,IAAK,WACLC,EAAG,aACHC,GAAI,eACJC,IAAK,qBACLC,KAAM,4BAEVC,SAAU,CACNC,QAAS,sBACTK,SAAU,IACVJ,QAAS,uBACTC,SAAU,qBACVC,QAAS,wBACTC,SAAU,gCAEdE,aAAc,CACVC,OAAQ,QACRC,KAAM,SACNx0C,EAAG,oBACHy0C,GAAI,cACJ78C,EAAG8gD,EACHhE,GAAI,aACJC,EAAG+D,EACH9D,GAAI,aACJ74B,EAAG28B,EACH7D,GAAI6D,EACJ5B,EAAG4B,EACH3B,GAAI,YACJjC,EAAG4D,EACH3D,GAAI2D,EACJ1D,EAAG0D,EACHzD,GAAIyD,GAERxD,uBAAwB,YACxBC,QAAS,MACTE,KAAM,CACFC,IAAK,EACLC,IAAK,KA1EyBzyD,CAAQ,EAAQ,2FCKlD,SAAWkiD,GAAU,aAIzB,SAAS0T,EAAoBtD,EAAQQ,EAAentD,EAAKotD,GACrD,IAAIrrC,EAAS,CACT5S,EAAG,CAAC,cAAe,gBACnB+8C,EAAG,CAAC,cAAe,gBACnB54B,EAAG,CAAC,UAAW,aACf84B,GAAI,CAACO,EAAS,QAASA,EAAS,UAChC0B,EAAG,CAAC,aAAc,eAClBhC,EAAG,CAAC,YAAa,eACjBC,GAAI,CAACK,EAAS,UAAWA,EAAS,YAClCJ,EAAG,CAAC,WAAY,cAChBC,GAAI,CAACG,EAAS,SAAUA,EAAS,YAErC,OAAOQ,EAAgBprC,EAAO/hB,GAAK,GAAK+hB,EAAO/hB,GAAK,GAG/Cu8C,EAAO4N,aAAa,KAAM,CAC/BC,OAAQ,qFAAqFntC,MACzF,KAEJotC,YAAa,6DAA6DptC,MACtE,KAEJ0xC,kBAAkB,EAClBrE,SAAU,8DAA8DrtC,MACpE,KAEJstC,cAAe,8BAA8BttC,MAAM,KACnDutC,YAAa,uBAAuBvtC,MAAM,KAC1CqwC,oBAAoB,EACpBvC,eAAgB,CACZC,GAAI,QACJC,IAAK,WACLC,EAAG,aACHC,GAAI,eACJC,IAAK,qBACLC,KAAM,4BAEVC,SAAU,CACNC,QAAS,sBACTK,SAAU,IACVJ,QAAS,uBACTC,SAAU,qBACVC,QAAS,wBACTC,SAAU,gCAEdE,aAAc,CACVC,OAAQ,QACRC,KAAM,SACNx0C,EAAG,oBACHy0C,GAAI,cACJ78C,EAAG8gD,EACHhE,GAAI,aACJC,EAAG+D,EACH9D,GAAI,aACJ74B,EAAG28B,EACH7D,GAAI6D,EACJ5B,EAAG4B,EACH3B,GAAI,YACJjC,EAAG4D,EACH3D,GAAI2D,EACJ1D,EAAG0D,EACHzD,GAAIyD,GAERxD,uBAAwB,YACxBC,QAAS,MACTE,KAAM,CACFC,IAAK,EACLC,IAAK,KA1EyBzyD,CAAQ,EAAQ,2FCClD,SAAWkiD,GAAU,aAIzB,IAAI6N,EAAS,CACL,WACA,aACA,SACA,WACA,KACA,OACA,SACA,WACA,eACA,aACA,aACA,cAEJE,EAAW,CACP,WACA,OACA,WACA,OACA,aACA,SACA,YAGC/N,EAAO4N,aAAa,KAAM,CAC/BC,OAAQA,EACRC,YAAaD,EACbE,SAAUA,EACVC,cAAeD,EACfE,YAAa,qCAAqCvtC,MAAM,KACxD8tC,eAAgB,CACZC,GAAI,QACJC,IAAK,WACLC,EAAG,WACHC,GAAI,cACJC,IAAK,oBACLC,KAAM,0BAEVZ,cAAe,QACfC,KAAM,SAAU39C,GACZ,MAAO,OAASA,GAEpB49C,SAAU,SAAU4C,EAAMC,EAAQ1C,GAC9B,OAAIyC,EAAO,GACA,KAEA,MAGfjC,SAAU,CACNC,QAAS,cACTC,QAAS,cACTC,SAAU,UACVC,QAAS,cACTC,SAAU,qBACVC,SAAU,KAEdC,aAAc,CACVC,OAAQ,cACRC,KAAM,YACNx0C,EAAG,iBACHy0C,GAAI,cACJ78C,EAAG,WACH88C,GAAI,YACJC,EAAG,aACHC,GAAI,cACJ74B,EAAG,WACH84B,GAAI,YACJC,EAAG,SACHC,GAAI,UACJC,EAAG,WACHC,GAAI,aAERmB,SAAU,SAAUjuD,GAChB,OAAOA,EAAOwP,QAAQ,KAAM,MAEhCu+C,WAAY,SAAU/tD,GAClB,OAAOA,EAAOwP,QAAQ,KAAM,MAEhC09C,KAAM,CACFC,IAAK,EACLC,IAAK,MAxFyBzyD,CAAQ,EAAQ,2FCGlD,SAAWkiD,GAAU,aAWhBA,EAAO4N,aAAa,KAAM,CAC/B+F,mBAAoB,qHAAqHjzC,MACrI,KAEJkzC,iBAAkB,qHAAqHlzC,MACnI,KAEJmtC,OAAQ,SAAUgG,EAAgBruC,GAC9B,OAAKquC,EAGiB,iBAAXruC,GACP,IAAIzE,KAAKyE,EAAOqS,UAAU,EAAGrS,EAAO1Z,QAAQ,UAGrClO,KAAKk2D,kBAAkBD,EAAeE,SAEtCn2D,KAAKo2D,oBAAoBH,EAAeE,SARxCn2D,KAAKo2D,qBAWpBlG,YAAa,oDAAoDptC,MAAM,KACvEqtC,SAAU,yDAAyDrtC,MAC/D,KAEJstC,cAAe,8BAA8BttC,MAAM,KACnDutC,YAAa,uBAAuBvtC,MAAM,KAC1C0tC,SAAU,SAAUC,EAAOC,EAASC,GAChC,OAAIF,EAAQ,GACDE,EAAU,KAAO,KAEjBA,EAAU,KAAO,MAGhCJ,KAAM,SAAU39C,GACZ,MAAyC,OAAjCA,EAAQ,IAAIsU,cAAc,IAEtCopC,cAAe,gBACfM,eAAgB,CACZC,GAAI,SACJC,IAAK,YACLC,EAAG,aACHC,GAAI,cACJC,IAAK,qBACLC,KAAM,4BAEVmF,WAAY,CACRjF,QAAS,iBACTC,QAAS,gBACTC,SAAU,eACVC,QAAS,eACTC,SAAU,WACN,OAAQxxD,KAAKg0D,OACT,KAAK,EACD,MAAO,gCACX,QACI,MAAO,mCAGnBvC,SAAU,KAEdN,SAAU,SAAUtrD,EAAKywD,GACrB,IApEY1jD,EAoERgjD,EAAS51D,KAAKu2D,YAAY1wD,GAC1B4qD,EAAQ6F,GAAOA,EAAI7F,QAIvB,OAzEY79C,EAsEGgjD,GApEM,oBAAblvC,UAA4B9T,aAAiB8T,UACX,sBAA1CnT,OAAO1R,UAAUiT,SAAS/S,KAAK6Q,MAoE3BgjD,EAASA,EAAOzzD,MAAMm0D,IAEnBV,EAAO7gD,QAAQ,KAAM07C,EAAQ,IAAO,EAAI,MAAQ,SAE3DiB,aAAc,CACVC,OAAQ,QACRC,KAAM,UACNx0C,EAAG,oBACHy0C,GAAI,kBACJ78C,EAAG,YACH88C,GAAI,WACJC,EAAG,UACHC,GAAI,UACJ74B,EAAG,WACH84B,GAAI,WACJC,EAAG,aACHC,GAAI,WACJC,EAAG,cACHC,GAAI,aAERC,uBAAwB,WACxBC,QAAS,MACTE,KAAM,CACFC,IAAK,EACLC,IAAK,KAtGyBzyD,CAAQ,EAAQ,8FCGlD,SAAWkiD,GAAU,aAIdA,EAAO4N,aAAa,QAAS,CACpCC,OAAQ,wFAAwFntC,MAC5F,KAEJotC,YAAa,kDAAkDptC,MAAM,KACrEqtC,SAAU,2DAA2DrtC,MACjE,KAEJstC,cAAe,8BAA8BttC,MAAM,KACnDutC,YAAa,uBAAuBvtC,MAAM,KAC1C8tC,eAAgB,CACZC,GAAI,SACJC,IAAK,YACLC,EAAG,aACHC,GAAI,cACJC,IAAK,qBACLC,KAAM,4BAEVC,SAAU,CACNC,QAAS,gBACTC,QAAS,mBACTC,SAAU,eACVC,QAAS,oBACTC,SAAU,sBACVC,SAAU,KAEdC,aAAc,CACVC,OAAQ,QACRC,KAAM,SACNx0C,EAAG,gBACHy0C,GAAI,aACJ78C,EAAG,WACH88C,GAAI,aACJC,EAAG,UACHC,GAAI,WACJ74B,EAAG,QACH84B,GAAI,UACJC,EAAG,UACHC,GAAI,YACJC,EAAG,SACHC,GAAI,YAERC,uBAAwB,uBACxBC,QAAS,SAAUC,GACf,IAAI5zC,EAAI4zC,EAAS,GAWjB,OAAOA,GAT6B,MAAxBA,EAAS,IAAO,IACd,KACM,IAAN5zC,EACA,KACM,IAANA,EACA,KACM,IAANA,EACA,KACA,OAGlB6zC,KAAM,CACFC,IAAK,EACLC,IAAK,KAlEyBzyD,CAAQ,EAAQ,8FCGlD,SAAWkiD,GAAU,aAIdA,EAAO4N,aAAa,QAAS,CACpCC,OAAQ,wFAAwFntC,MAC5F,KAEJotC,YAAa,kDAAkDptC,MAAM,KACrEqtC,SAAU,2DAA2DrtC,MACjE,KAEJstC,cAAe,8BAA8BttC,MAAM,KACnDutC,YAAa,uBAAuBvtC,MAAM,KAC1C8tC,eAAgB,CACZC,GAAI,SACJC,IAAK,YACLC,EAAG,aACHC,GAAI,eACJC,IAAK,sBACLC,KAAM,6BAEVC,SAAU,CACNC,QAAS,gBACTC,QAAS,mBACTC,SAAU,eACVC,QAAS,oBACTC,SAAU,sBACVC,SAAU,KAEdC,aAAc,CACVC,OAAQ,QACRC,KAAM,SACNx0C,EAAG,gBACHy0C,GAAI,aACJ78C,EAAG,WACH88C,GAAI,aACJC,EAAG,UACHC,GAAI,WACJ74B,EAAG,QACH84B,GAAI,UACJC,EAAG,UACHC,GAAI,YACJC,EAAG,SACHC,GAAI,YAERC,uBAAwB,uBACxBC,QAAS,SAAUC,GACf,IAAI5zC,EAAI4zC,EAAS,GAWjB,OAAOA,GAT6B,MAAxBA,EAAS,IAAO,IACd,KACM,IAAN5zC,EACA,KACM,IAANA,EACA,KACM,IAANA,EACA,KACA,SA7DgB1e,CAAQ,EAAQ,8FCGlD,SAAWkiD,GAAU,aAIdA,EAAO4N,aAAa,QAAS,CACpCC,OAAQ,wFAAwFntC,MAC5F,KAEJotC,YAAa,kDAAkDptC,MAAM,KACrEqtC,SAAU,2DAA2DrtC,MACjE,KAEJstC,cAAe,8BAA8BttC,MAAM,KACnDutC,YAAa,uBAAuBvtC,MAAM,KAC1C8tC,eAAgB,CACZC,GAAI,QACJC,IAAK,WACLC,EAAG,aACHC,GAAI,cACJC,IAAK,oBACLC,KAAM,2BAEVC,SAAU,CACNC,QAAS,gBACTC,QAAS,mBACTC,SAAU,eACVC,QAAS,oBACTC,SAAU,sBACVC,SAAU,KAEdC,aAAc,CACVC,OAAQ,QACRC,KAAM,SACNx0C,EAAG,gBACHy0C,GAAI,aACJ78C,EAAG,WACH88C,GAAI,aACJC,EAAG,UACHC,GAAI,WACJ74B,EAAG,QACH84B,GAAI,UACJC,EAAG,UACHC,GAAI,YACJC,EAAG,SACHC,GAAI,YAERC,uBAAwB,uBACxBC,QAAS,SAAUC,GACf,IAAI5zC,EAAI4zC,EAAS,GAWjB,OAAOA,GAT6B,MAAxBA,EAAS,IAAO,IACd,KACM,IAAN5zC,EACA,KACM,IAANA,EACA,KACM,IAANA,EACA,KACA,OAGlB6zC,KAAM,CACFC,IAAK,EACLC,IAAK,KAlEyBzyD,CAAQ,EAAQ,8FCGlD,SAAWkiD,GAAU,aAIdA,EAAO4N,aAAa,QAAS,CACpCC,OAAQ,wFAAwFntC,MAC5F,KAEJotC,YAAa,kDAAkDptC,MAAM,KACrEqtC,SAAU,2DAA2DrtC,MACjE,KAEJstC,cAAe,8BAA8BttC,MAAM,KACnDutC,YAAa,uBAAuBvtC,MAAM,KAC1C8tC,eAAgB,CACZC,GAAI,QACJC,IAAK,WACLC,EAAG,aACHC,GAAI,cACJC,IAAK,oBACLC,KAAM,0BAEVC,SAAU,CACNC,QAAS,gBACTC,QAAS,mBACTC,SAAU,eACVC,QAAS,oBACTC,SAAU,sBACVC,SAAU,KAEdC,aAAc,CACVC,OAAQ,QACRC,KAAM,SACNx0C,EAAG,gBACHy0C,GAAI,aACJ78C,EAAG,WACH88C,GAAI,aACJC,EAAG,UACHC,GAAI,WACJ74B,EAAG,QACH84B,GAAI,UACJC,EAAG,UACHC,GAAI,YACJC,EAAG,SACHC,GAAI,YAERC,uBAAwB,uBACxBC,QAAS,SAAUC,GACf,IAAI5zC,EAAI4zC,EAAS,GAWjB,OAAOA,GAT6B,MAAxBA,EAAS,IAAO,IACd,KACM,IAAN5zC,EACA,KACM,IAANA,EACA,KACM,IAANA,EACA,KACA,OAGlB6zC,KAAM,CACFC,IAAK,EACLC,IAAK,KAlEyBzyD,CAAQ,EAAQ,8FCGlD,SAAWkiD,GAAU,aAIdA,EAAO4N,aAAa,QAAS,CACpCC,OAAQ,wFAAwFntC,MAC5F,KAEJotC,YAAa,kDAAkDptC,MAAM,KACrEqtC,SAAU,2DAA2DrtC,MACjE,KAEJstC,cAAe,8BAA8BttC,MAAM,KACnDutC,YAAa,uBAAuBvtC,MAAM,KAC1C8tC,eAAgB,CACZC,GAAI,QACJC,IAAK,WACLC,EAAG,aACHC,GAAI,cACJC,IAAK,oBACLC,KAAM,2BAEVC,SAAU,CACNC,QAAS,gBACTC,QAAS,mBACTC,SAAU,eACVC,QAAS,oBACTC,SAAU,sBACVC,SAAU,KAEdC,aAAc,CACVC,OAAQ,QACRC,KAAM,SACNx0C,EAAG,gBACHy0C,GAAI,aACJ78C,EAAG,WACH88C,GAAI,aACJC,EAAG,UACHC,GAAI,WACJ74B,EAAG,QACH84B,GAAI,UACJC,EAAG,UACHC,GAAI,YACJC,EAAG,SACHC,GAAI,YAERC,uBAAwB,uBACxBC,QAAS,SAAUC,GACf,IAAI5zC,EAAI4zC,EAAS,GAWjB,OAAOA,GAT6B,MAAxBA,EAAS,IAAO,IACd,KACM,IAAN5zC,EACA,KACM,IAANA,EACA,KACM,IAANA,EACA,KACA,SA7DgB1e,CAAQ,EAAQ,8FCGlD,SAAWkiD,GAAU,aAIdA,EAAO4N,aAAa,QAAS,CACpCC,OAAQ,wFAAwFntC,MAC5F,KAEJotC,YAAa,kDAAkDptC,MAAM,KACrEqtC,SAAU,2DAA2DrtC,MACjE,KAEJstC,cAAe,8BAA8BttC,MAAM,KACnDutC,YAAa,uBAAuBvtC,MAAM,KAC1C8tC,eAAgB,CACZC,GAAI,SACJC,IAAK,YACLC,EAAG,aACHC,GAAI,cACJC,IAAK,qBACLC,KAAM,4BAEVC,SAAU,CACNC,QAAS,gBACTC,QAAS,mBACTC,SAAU,eACVC,QAAS,oBACTC,SAAU,sBACVC,SAAU,KAEdC,aAAc,CACVC,OAAQ,QACRC,KAAM,SACNx0C,EAAG,gBACHy0C,GAAI,aACJ78C,EAAG,WACH88C,GAAI,aACJC,EAAG,UACHC,GAAI,WACJ74B,EAAG,QACH84B,GAAI,UACJC,EAAG,UACHC,GAAI,YACJC,EAAG,SACHC,GAAI,YAERC,uBAAwB,uBACxBC,QAAS,SAAUC,GACf,IAAI5zC,EAAI4zC,EAAS,GAWjB,OAAOA,GAT6B,MAAxBA,EAAS,IAAO,IACd,KACM,IAAN5zC,EACA,KACM,IAANA,EACA,KACM,IAANA,EACA,KACA,OAGlB6zC,KAAM,CACFC,IAAK,EACLC,IAAK,KAlEyBzyD,CAAQ,EAAQ,8FCGlD,SAAWkiD,GAAU,aAIdA,EAAO4N,aAAa,QAAS,CACpCC,OAAQ,wFAAwFntC,MAC5F,KAEJotC,YAAa,kDAAkDptC,MAAM,KACrEqtC,SAAU,2DAA2DrtC,MACjE,KAEJstC,cAAe,8BAA8BttC,MAAM,KACnDutC,YAAa,uBAAuBvtC,MAAM,KAC1C8tC,eAAgB,CACZC,GAAI,SACJC,IAAK,YACLC,EAAG,aACHC,GAAI,cACJC,IAAK,qBACLC,KAAM,4BAEVC,SAAU,CACNC,QAAS,gBACTC,QAAS,mBACTC,SAAU,eACVC,QAAS,oBACTC,SAAU,sBACVC,SAAU,KAEdC,aAAc,CACVC,OAAQ,QACRC,KAAM,SACNx0C,EAAG,gBACHy0C,GAAI,aACJ78C,EAAG,WACH88C,GAAI,aACJC,EAAG,UACHC,GAAI,WACJ74B,EAAG,QACH84B,GAAI,UACJC,EAAG,UACHC,GAAI,YACJC,EAAG,SACHC,GAAI,YAERC,uBAAwB,uBACxBC,QAAS,SAAUC,GACf,IAAI5zC,EAAI4zC,EAAS,GAWjB,OAAOA,GAT6B,MAAxBA,EAAS,IAAO,IACd,KACM,IAAN5zC,EACA,KACM,IAANA,EACA,KACM,IAANA,EACA,KACA,OAGlB6zC,KAAM,CACFC,IAAK,EACLC,IAAK,KAlEyBzyD,CAAQ,EAAQ,8FCGlD,SAAWkiD,GAAU,aAIdA,EAAO4N,aAAa,QAAS,CACpCC,OAAQ,wFAAwFntC,MAC5F,KAEJotC,YAAa,kDAAkDptC,MAAM,KACrEqtC,SAAU,2DAA2DrtC,MACjE,KAEJstC,cAAe,8BAA8BttC,MAAM,KACnDutC,YAAa,uBAAuBvtC,MAAM,KAC1C8tC,eAAgB,CACZC,GAAI,QACJC,IAAK,WACLC,EAAG,aACHC,GAAI,cACJC,IAAK,oBACLC,KAAM,2BAEVC,SAAU,CACNC,QAAS,gBACTC,QAAS,mBACTC,SAAU,eACVC,QAAS,oBACTC,SAAU,sBACVC,SAAU,KAEdC,aAAc,CACVC,OAAQ,QACRC,KAAM,SACNx0C,EAAG,gBACHy0C,GAAI,aACJ78C,EAAG,WACH88C,GAAI,aACJC,EAAG,UACHC,GAAI,WACJ74B,EAAG,QACH84B,GAAI,UACJC,EAAG,UACHC,GAAI,YACJC,EAAG,SACHC,GAAI,YAERC,uBAAwB,uBACxBC,QAAS,SAAUC,GACf,IAAI5zC,EAAI4zC,EAAS,GAWjB,OAAOA,GAT6B,MAAxBA,EAAS,IAAO,IACd,KACM,IAAN5zC,EACA,KACM,IAANA,EACA,KACM,IAANA,EACA,KACA,OAGlB6zC,KAAM,CACFC,IAAK,EACLC,IAAK,KAlEyBzyD,CAAQ,EAAQ,2FCMlD,SAAWkiD,GAAU,aAIhBA,EAAO4N,aAAa,KAAM,CAC/BC,OAAQ,6FAA6FntC,MACjG,KAEJotC,YAAa,oDAAoDptC,MAAM,KACvEqtC,SAAU,qDAAqDrtC,MAAM,KACrEstC,cAAe,gCAAgCttC,MAAM,KACrDutC,YAAa,uBAAuBvtC,MAAM,KAC1C8tC,eAAgB,CACZC,GAAI,QACJC,IAAK,WACLC,EAAG,aACHC,GAAI,4BACJC,IAAK,kCACLC,KAAM,2CACNyE,KAAM,uCAEVrF,cAAe,cACfC,KAAM,SAAU39C,GACZ,MAAyC,MAAlCA,EAAMnN,OAAO,GAAGyhB,eAE3BspC,SAAU,SAAUC,EAAOC,EAASC,GAChC,OAAIF,EAAQ,GACDE,EAAU,SAAW,SAErBA,EAAU,SAAW,UAGpCQ,SAAU,CACNC,QAAS,iBACTC,QAAS,iBACTC,SAAU,gBACVC,QAAS,iBACTC,SAAU,2BACVC,SAAU,KAEdC,aAAc,CACVC,OAAQ,UACRC,KAAM,WACNx0C,EAAG,kBACHy0C,GAAI,cACJ78C,EAAG,aACH88C,GAAI,aACJC,EAAG,WACHC,GAAI,WACJ74B,EAAG,WACH84B,GAAI,WACJC,EAAG,aACHC,GAAI,aACJC,EAAG,WACHC,GAAI,YAERC,uBAAwB,WACxBC,QAAS,MACTE,KAAM,CACFC,IAAK,EACLC,IAAK,KA/DyBzyD,CAAQ,EAAQ,8FCDlD,SAAWkiD,GAAU,aAIzB,IAAIoU,EAAiB,8DAA8D1zC,MAC3E,KAEJotC,EAAc,kDAAkDptC,MAAM,KACtEgyC,EAAc,CACV,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,SAEJC,EAAc,mLAEP3S,EAAO4N,aAAa,QAAS,CACpCC,OAAQ,2FAA2FntC,MAC/F,KAEJotC,YAAa,SAAUl7C,EAAG4S,GACtB,OAAK5S,EAEM,QAAQmO,KAAKyE,GACbsoC,EAAYl7C,EAAEmhD,SAEdK,EAAexhD,EAAEmhD,SAJjBK,GAOfzB,YAAaA,EACbR,iBAAkBQ,EAClBK,kBAAmB,+FACnBC,uBAAwB,0FACxBP,YAAaA,EACbQ,gBAAiBR,EACjBS,iBAAkBT,EAClB3E,SAAU,uDAAuDrtC,MAAM,KACvEstC,cAAe,qCAAqCttC,MAAM,KAC1DutC,YAAa,uBAAuBvtC,MAAM,KAC1CqwC,oBAAoB,EACpBvC,eAAgB,CACZC,GAAI,SACJC,IAAK,YACLC,EAAG,aACHC,GAAI,wBACJC,IAAK,+BACLC,KAAM,sCAEVC,SAAU,CACNC,QAAS,WACL,MAAO,aAAgC,IAAjBpxD,KAAKywD,QAAgB,IAAM,IAAM,QAE3DY,QAAS,WACL,MAAO,gBAAmC,IAAjBrxD,KAAKywD,QAAgB,IAAM,IAAM,QAE9Da,SAAU,WACN,MAAO,cAAiC,IAAjBtxD,KAAKywD,QAAgB,IAAM,IAAM,QAE5Dc,QAAS,WACL,MAAO,cAAiC,IAAjBvxD,KAAKywD,QAAgB,IAAM,IAAM,QAE5De,SAAU,WACN,MACI,0BACkB,IAAjBxxD,KAAKywD,QAAgB,IAAM,IAC5B,QAGRgB,SAAU,KAEdC,aAAc,CACVC,OAAQ,QACRC,KAAM,UACNx0C,EAAG,gBACHy0C,GAAI,cACJ78C,EAAG,YACH88C,GAAI,aACJC,EAAG,WACHC,GAAI,WACJ74B,EAAG,SACH84B,GAAI,UACJiC,EAAG,aACHC,GAAI,aACJjC,EAAG,SACHC,GAAI,WACJC,EAAG,SACHC,GAAI,WAERC,uBAAwB,WACxBC,QAAS,MACTE,KAAM,CACFC,IAAK,EACLC,IAAK,KAvGyBzyD,CAAQ,EAAQ,8FCIlD,SAAWkiD,GAAU,aAIzB,IAAIoU,EAAiB,8DAA8D1zC,MAC3E,KAEJotC,EAAc,kDAAkDptC,MAAM,KACtEgyC,EAAc,CACV,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,SAEJC,EAAc,mLAEP3S,EAAO4N,aAAa,QAAS,CACpCC,OAAQ,2FAA2FntC,MAC/F,KAEJotC,YAAa,SAAUl7C,EAAG4S,GACtB,OAAK5S,EAEM,QAAQmO,KAAKyE,GACbsoC,EAAYl7C,EAAEmhD,SAEdK,EAAexhD,EAAEmhD,SAJjBK,GAOfzB,YAAaA,EACbR,iBAAkBQ,EAClBK,kBAAmB,+FACnBC,uBAAwB,0FACxBP,YAAaA,EACbQ,gBAAiBR,EACjBS,iBAAkBT,EAClB3E,SAAU,uDAAuDrtC,MAAM,KACvEstC,cAAe,qCAAqCttC,MAAM,KAC1DutC,YAAa,uBAAuBvtC,MAAM,KAC1CqwC,oBAAoB,EACpBvC,eAAgB,CACZC,GAAI,OACJC,IAAK,UACLC,EAAG,aACHC,GAAI,wBACJC,IAAK,6BACLC,KAAM,oCAEVC,SAAU,CACNC,QAAS,WACL,MAAO,aAAgC,IAAjBpxD,KAAKywD,QAAgB,IAAM,IAAM,QAE3DY,QAAS,WACL,MAAO,gBAAmC,IAAjBrxD,KAAKywD,QAAgB,IAAM,IAAM,QAE9Da,SAAU,WACN,MAAO,cAAiC,IAAjBtxD,KAAKywD,QAAgB,IAAM,IAAM,QAE5Dc,QAAS,WACL,MAAO,cAAiC,IAAjBvxD,KAAKywD,QAAgB,IAAM,IAAM,QAE5De,SAAU,WACN,MACI,0BACkB,IAAjBxxD,KAAKywD,QAAgB,IAAM,IAC5B,QAGRgB,SAAU,KAEdC,aAAc,CACVC,OAAQ,QACRC,KAAM,UACNx0C,EAAG,gBACHy0C,GAAI,cACJ78C,EAAG,YACH88C,GAAI,aACJC,EAAG,WACHC,GAAI,WACJ74B,EAAG,SACH84B,GAAI,UACJiC,EAAG,aACHC,GAAI,aACJjC,EAAG,SACHC,GAAI,WACJC,EAAG,SACHC,GAAI,WAERC,uBAAwB,WACxBC,QAAS,MACTE,KAAM,CACFC,IAAK,EACLC,IAAK,GAET8D,YAAa,mBAzGqBv2D,CAAQ,EAAQ,8FCIlD,SAAWkiD,GAAU,aAIzB,IAAIoU,EAAiB,8DAA8D1zC,MAC3E,KAEJotC,EAAc,kDAAkDptC,MAAM,KACtEgyC,EAAc,CACV,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,SAEJC,EAAc,mLAEP3S,EAAO4N,aAAa,QAAS,CACpCC,OAAQ,2FAA2FntC,MAC/F,KAEJotC,YAAa,SAAUl7C,EAAG4S,GACtB,OAAK5S,EAEM,QAAQmO,KAAKyE,GACbsoC,EAAYl7C,EAAEmhD,SAEdK,EAAexhD,EAAEmhD,SAJjBK,GAOfzB,YAAaA,EACbR,iBAAkBQ,EAClBK,kBAAmB,+FACnBC,uBAAwB,0FACxBP,YAAaA,EACbQ,gBAAiBR,EACjBS,iBAAkBT,EAClB3E,SAAU,uDAAuDrtC,MAAM,KACvEstC,cAAe,qCAAqCttC,MAAM,KAC1DutC,YAAa,uBAAuBvtC,MAAM,KAC1CqwC,oBAAoB,EACpBvC,eAAgB,CACZC,GAAI,SACJC,IAAK,YACLC,EAAG,aACHC,GAAI,wBACJC,IAAK,+BACLC,KAAM,sCAEVC,SAAU,CACNC,QAAS,WACL,MAAO,aAAgC,IAAjBpxD,KAAKywD,QAAgB,IAAM,IAAM,QAE3DY,QAAS,WACL,MAAO,gBAAmC,IAAjBrxD,KAAKywD,QAAgB,IAAM,IAAM,QAE9Da,SAAU,WACN,MAAO,cAAiC,IAAjBtxD,KAAKywD,QAAgB,IAAM,IAAM,QAE5Dc,QAAS,WACL,MAAO,cAAiC,IAAjBvxD,KAAKywD,QAAgB,IAAM,IAAM,QAE5De,SAAU,WACN,MACI,0BACkB,IAAjBxxD,KAAKywD,QAAgB,IAAM,IAC5B,QAGRgB,SAAU,KAEdC,aAAc,CACVC,OAAQ,QACRC,KAAM,UACNx0C,EAAG,gBACHy0C,GAAI,cACJ78C,EAAG,YACH88C,GAAI,aACJC,EAAG,WACHC,GAAI,WACJ74B,EAAG,SACH84B,GAAI,UACJiC,EAAG,aACHC,GAAI,aACJjC,EAAG,SACHC,GAAI,WACJC,EAAG,SACHC,GAAI,WAERC,uBAAwB,WACxBC,QAAS,MACTE,KAAM,CACFC,IAAK,EACLC,IAAK,KAvGyBzyD,CAAQ,EAAQ,2FCElD,SAAWkiD,GAAU,aAIzB,IAAIoU,EAAiB,8DAA8D1zC,MAC3E,KAEJotC,EAAc,kDAAkDptC,MAAM,KACtEgyC,EAAc,CACV,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,SAEJC,EAAc,mLAET3S,EAAO4N,aAAa,KAAM,CAC/BC,OAAQ,2FAA2FntC,MAC/F,KAEJotC,YAAa,SAAUl7C,EAAG4S,GACtB,OAAK5S,EAEM,QAAQmO,KAAKyE,GACbsoC,EAAYl7C,EAAEmhD,SAEdK,EAAexhD,EAAEmhD,SAJjBK,GAOfzB,YAAaA,EACbR,iBAAkBQ,EAClBK,kBAAmB,+FACnBC,uBAAwB,0FACxBP,YAAaA,EACbQ,gBAAiBR,EACjBS,iBAAkBT,EAClB3E,SAAU,uDAAuDrtC,MAAM,KACvEstC,cAAe,qCAAqCttC,MAAM,KAC1DutC,YAAa,uBAAuBvtC,MAAM,KAC1CqwC,oBAAoB,EACpBvC,eAAgB,CACZC,GAAI,OACJC,IAAK,UACLC,EAAG,aACHC,GAAI,wBACJC,IAAK,6BACLC,KAAM,oCAEVC,SAAU,CACNC,QAAS,WACL,MAAO,aAAgC,IAAjBpxD,KAAKywD,QAAgB,IAAM,IAAM,QAE3DY,QAAS,WACL,MAAO,gBAAmC,IAAjBrxD,KAAKywD,QAAgB,IAAM,IAAM,QAE9Da,SAAU,WACN,MAAO,cAAiC,IAAjBtxD,KAAKywD,QAAgB,IAAM,IAAM,QAE5Dc,QAAS,WACL,MAAO,cAAiC,IAAjBvxD,KAAKywD,QAAgB,IAAM,IAAM,QAE5De,SAAU,WACN,MACI,0BACkB,IAAjBxxD,KAAKywD,QAAgB,IAAM,IAC5B,QAGRgB,SAAU,KAEdC,aAAc,CACVC,OAAQ,QACRC,KAAM,UACNx0C,EAAG,gBACHy0C,GAAI,cACJ78C,EAAG,YACH88C,GAAI,aACJC,EAAG,WACHC,GAAI,WACJ74B,EAAG,SACH84B,GAAI,UACJiC,EAAG,aACHC,GAAI,aACJjC,EAAG,SACHC,GAAI,WACJC,EAAG,SACHC,GAAI,WAERC,uBAAwB,WACxBC,QAAS,MACTE,KAAM,CACFC,IAAK,EACLC,IAAK,GAET8D,YAAa,mBAzGqBv2D,CAAQ,EAAQ,2FCIlD,SAAWkiD,GAAU,aAIzB,SAAS0T,EAAoBtD,EAAQQ,EAAentD,EAAKotD,GACrD,IAAIrrC,EAAS,CACTxK,EAAG,CAAC,eAAgB,cAAe,iBACnCy0C,GAAI,CAACW,EAAS,UAAWA,EAAS,YAClCx9C,EAAG,CAAC,aAAc,aAClB88C,GAAI,CAACU,EAAS,UAAWA,EAAS,YAClCT,EAAG,CAAC,YAAa,YAAa,YAC9BC,GAAI,CAACQ,EAAS,SAAUA,EAAS,UACjCr5B,EAAG,CAAC,YAAa,YACjB+4B,EAAG,CAAC,UAAW,WAAY,WAC3BC,GAAI,CAACK,EAAS,OAAQA,EAAS,SAC/BJ,EAAG,CAAC,YAAa,QAAS,aAC1BC,GAAI,CAACG,EAAS,SAAUA,EAAS,YAErC,OAAIQ,EACOprC,EAAO/hB,GAAK,GAAK+hB,EAAO/hB,GAAK,GAAK+hB,EAAO/hB,GAAK,GAElDotD,EAAWrrC,EAAO/hB,GAAK,GAAK+hB,EAAO/hB,GAAK,GAG1Cu8C,EAAO4N,aAAa,KAAM,CAC/BC,OAAQ,6FAA6FntC,MACjG,KAEJotC,YAAa,6DAA6DptC,MACtE,KAEJqtC,SAAU,iEAAiErtC,MACvE,KAEJstC,cAAe,gBAAgBttC,MAAM,KACrCutC,YAAa,gBAAgBvtC,MAAM,KACnC8tC,eAAgB,CACZC,GAAI,OACJC,IAAK,UACLC,EAAG,aACHC,GAAI,eACJC,IAAK,oBACLC,KAAM,2BAEVC,SAAU,CACNC,QAAS,aACTC,QAAS,cACTC,SAAU,qBACVC,QAAS,aACTC,SAAU,oBACVC,SAAU,KAEdC,aAAc,CACVC,OAAQ,YACRC,KAAM,YACNx0C,EAAG04C,EACHjE,GAAIiE,EACJ9gD,EAAG8gD,EACHhE,GAAIgE,EACJ/D,EAAG+D,EACH9D,GAAI8D,EACJ38B,EAAG28B,EACH7D,GAAI,WACJC,EAAG4D,EACH3D,GAAI2D,EACJ1D,EAAG0D,EACHzD,GAAIyD,GAERxD,uBAAwB,YACxBC,QAAS,MACTE,KAAM,CACFC,IAAK,EACLC,IAAK,KA3EyBzyD,CAAQ,EAAQ,2FCElD,SAAWkiD,GAAU,aAIhBA,EAAO4N,aAAa,KAAM,CAC/BC,OAAQ,+FAA+FntC,MACnG,KAEJotC,YAAa,8DAA8DptC,MACvE,KAEJ0xC,kBAAkB,EAClBrE,SAAU,sEAAsErtC,MAC5E,KAEJstC,cAAe,8BAA8BttC,MAAM,KACnDutC,YAAa,uBAAuBvtC,MAAM,KAC1CqwC,oBAAoB,EACpBvC,eAAgB,CACZC,GAAI,QACJC,IAAK,WACLC,EAAG,aACHC,GAAI,0BACJC,IAAK,gCACLC,KAAM,sCACNz+B,EAAG,WACHgjC,GAAI,oBACJC,IAAK,0BACLC,KAAM,gCAEVxE,SAAU,CACNC,QAAS,kBACTC,QAAS,mBACTC,SAAU,gBACVC,QAAS,kBACTC,SAAU,0BACVC,SAAU,KAEdC,aAAc,CACVC,OAAQ,WACRC,KAAM,WACNx0C,EAAG,iBACHy0C,GAAI,aACJ78C,EAAG,aACH88C,GAAI,YACJC,EAAG,WACHC,GAAI,UACJ74B,EAAG,WACH84B,GAAI,UACJC,EAAG,eACHC,GAAI,cACJC,EAAG,WACHC,GAAI,WAERC,uBAAwB,YACxBC,QAAS,MACTE,KAAM,CACFC,IAAK,EACLC,IAAK,KA7DyBzyD,CAAQ,EAAQ,2FCGlD,SAAWkiD,GAAU,aAIzB,IAAImR,EAAY,CACR,EAAG,IACH,EAAG,IACH,EAAG,IACH,EAAG,IACH,EAAG,IACH,EAAG,IACH,EAAG,IACH,EAAG,IACH,EAAG,IACH,EAAG,KAEPE,EAAY,CACR,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,KAGJrR,EAAO4N,aAAa,KAAM,CAC/BC,OAAQ,wEAAwEntC,MAC5E,KAEJotC,YAAa,wEAAwEptC,MACjF,KAEJqtC,SAAU,qDAAoErtC,MAC1E,KAEJstC,cAAe,qDAAoEttC,MAC/E,KAEJutC,YAAa,gBAAgBvtC,MAAM,KACnCqwC,oBAAoB,EACpBvC,eAAgB,CACZC,GAAI,QACJC,IAAK,WACLC,EAAG,aACHC,GAAI,cACJC,IAAK,oBACLC,KAAM,2BAEVZ,cAAe,wBACfC,KAAM,SAAU39C,GACZ,MAAO,aAAauQ,KAAKvQ,IAE7B49C,SAAU,SAAU4C,EAAMC,EAAQ1C,GAC9B,OAAIyC,EAAO,GACA,aAEA,cAGfjC,SAAU,CACNC,QAAS,kBACTC,QAAS,iBACTC,SAAU,iBACVC,QAAS,kBACTC,SAAU,uBACVC,SAAU,KAEdC,aAAc,CACVC,OAAQ,QACRC,KAAM,SACNx0C,EAAG,YACHy0C,GAAI,WACJ78C,EAAG,WACH88C,GAAI,WACJC,EAAG,UACHC,GAAI,UACJ74B,EAAG,SACH84B,GAAI,SACJC,EAAG,SACHC,GAAI,SACJC,EAAG,SACHC,GAAI,UAERmB,SAAU,SAAUjuD,GAChB,OAAOA,EACFwP,QAAQ,UAAU,SAAUiH,GACzB,OAAOy3C,EAAUz3C,MAEpBjH,QAAQ,KAAM,MAEvBu+C,WAAY,SAAU/tD,GAClB,OAAOA,EACFwP,QAAQ,OAAO,SAAUiH,GACtB,OAAOu3C,EAAUv3C,MAEpBjH,QAAQ,KAAM,MAEvBu9C,uBAAwB,WACxBC,QAAS,MACTE,KAAM,CACFC,IAAK,EACLC,IAAK,MA5GyBzyD,CAAQ,EAAQ,2FCGlD,SAAWkiD,GAAU,aAIzB,IAAIsU,EAAc,wEAAwE5zC,MAClF,KAEJ6zC,EAAgB,CACZ,QACA,QACA,SACA,SACA,SACA,SACA,SACAD,EAAY,GACZA,EAAY,GACZA,EAAY,IAEpB,SAASlB,EAAUhD,EAAQQ,EAAentD,EAAKotD,GAC3C,IAAI3sD,EAAS,GACb,OAAQT,GACJ,IAAK,IACD,OAAOotD,EAAW,oBAAsB,kBAC5C,IAAK,KACD3sD,EAAS2sD,EAAW,WAAa,WACjC,MACJ,IAAK,IACD,OAAOA,EAAW,WAAa,WACnC,IAAK,KACD3sD,EAAS2sD,EAAW,WAAa,YACjC,MACJ,IAAK,IACD,OAAOA,EAAW,SAAW,QACjC,IAAK,KACD3sD,EAAS2sD,EAAW,SAAW,SAC/B,MACJ,IAAK,IACD,OAAOA,EAAW,SAAW,QACjC,IAAK,KACD3sD,EAAS2sD,EAAW,SAAW,SAC/B,MACJ,IAAK,IACD,OAAOA,EAAW,YAAc,WACpC,IAAK,KACD3sD,EAAS2sD,EAAW,YAAc,YAClC,MACJ,IAAK,IACD,OAAOA,EAAW,SAAW,QACjC,IAAK,KACD3sD,EAAS2sD,EAAW,SAAW,SAIvC,OAEJ,SAAsBT,EAAQS,GAC1B,OAAOT,EAAS,GACVS,EACI0D,EAAcnE,GACdkE,EAAYlE,GAChBA,EARGoE,CAAapE,EAAQS,GAAY,IAAM3sD,EAW3C87C,EAAO4N,aAAa,KAAM,CAC/BC,OAAQ,2GAA2GntC,MAC/G,KAEJotC,YAAa,uEAAuEptC,MAChF,KAEJqtC,SAAU,qEAAqErtC,MAC3E,KAEJstC,cAAe,uBAAuBttC,MAAM,KAC5CutC,YAAa,uBAAuBvtC,MAAM,KAC1C8tC,eAAgB,CACZC,GAAI,QACJC,IAAK,WACLC,EAAG,aACHC,GAAI,mBACJC,IAAK,gCACLC,KAAM,sCACNz+B,EAAG,WACHgjC,GAAI,cACJC,IAAK,2BACLC,KAAM,iCAEVxE,SAAU,CACNC,QAAS,oBACTC,QAAS,sBACTC,SAAU,gBACVC,QAAS,mBACTC,SAAU,4BACVC,SAAU,KAEdC,aAAc,CACVC,OAAQ,YACRC,KAAM,YACNx0C,EAAGo4C,EACH3D,GAAI2D,EACJxgD,EAAGwgD,EACH1D,GAAI0D,EACJzD,EAAGyD,EACHxD,GAAIwD,EACJr8B,EAAGq8B,EACHvD,GAAIuD,EACJtD,EAAGsD,EACHrD,GAAIqD,EACJpD,EAAGoD,EACHnD,GAAImD,GAERlD,uBAAwB,YACxBC,QAAS,MACTE,KAAM,CACFC,IAAK,EACLC,IAAK,KAvHyBzyD,CAAQ,EAAQ,4FCIlD,SAAWkiD,GAAU,aAIfA,EAAO4N,aAAa,MAAO,CACjCC,OAAQ,0FAA0FntC,MAC9F,KAEJotC,YAAa,kDAAkDptC,MAAM,KACrEqtC,SAAU,yDAAyDrtC,MAC/D,KAEJstC,cAAe,8BAA8BttC,MAAM,KACnDutC,YAAa,wBAAwBvtC,MAAM,KAC3C8tC,eAAgB,CACZC,GAAI,QACJC,IAAK,WACLC,EAAG,YACHC,GAAI,eACJC,IAAK,qBACLC,KAAM,6BAEVC,SAAU,CACNC,QAAS,oBACTC,QAAS,gBACTC,SAAU,0BACVC,QAAS,eACTC,SAAU,4BACVC,SAAU,KAEdC,aAAc,CACVC,OAAQ,gBACRC,KAAM,mBACNx0C,EAAG,gBACHy0C,GAAI,aACJ78C,EAAG,eACH88C,GAAI,YACJC,EAAG,aACHC,GAAI,UACJ74B,EAAG,aACH84B,GAAI,UACJC,EAAG,cACHC,GAAI,WACJC,EAAG,aACHC,GAAI,WAERC,uBAAwB,UACxBC,QAAS,SAAUC,GACf,OAAOA,GAEXC,KAAM,CACFC,IAAK,EACLC,IAAK,KAvDyBzyD,CAAQ,EAAQ,2FCGlD,SAAWkiD,GAAU,aAIhBA,EAAO4N,aAAa,KAAM,CAC/BC,OAAQ,qFAAqFntC,MACzF,KAEJotC,YAAa,kDAAkDptC,MAAM,KACrEqtC,SAAU,4EAA4ErtC,MAClF,KAEJstC,cAAe,8BAA8BttC,MAAM,KACnDutC,YAAa,uBAAuBvtC,MAAM,KAC1C8tC,eAAgB,CACZC,GAAI,QACJC,IAAK,WACLC,EAAG,aACHC,GAAI,cACJC,IAAK,oBACLC,KAAM,4BAEVC,SAAU,CACNC,QAAS,iBACTC,QAAS,oBACTC,SAAU,gBACVC,QAAS,kBACTC,SAAU,wBACVC,SAAU,KAEdC,aAAc,CACVC,OAAQ,QACRC,KAAM,YACNx0C,EAAG,YACHy0C,GAAI,cACJ78C,EAAG,eACH88C,GAAI,cACJC,EAAG,WACHC,GAAI,WACJ74B,EAAG,YACH84B,GAAI,WACJC,EAAG,cACHC,GAAI,aACJC,EAAG,UACHC,GAAI,SAERC,uBAAwB,YACxBC,QAAS,MACTE,KAAM,CACFC,IAAK,EACLC,IAAK,KArDyBzyD,CAAQ,EAAQ,8FCElD,SAAWkiD,GAAU,aAIdA,EAAO4N,aAAa,QAAS,CACpCC,OAAQ,uFAAuFntC,MAC3F,KAEJotC,YAAa,iEAAiEptC,MAC1E,KAEJ0xC,kBAAkB,EAClBrE,SAAU,sDAAsDrtC,MAAM,KACtEstC,cAAe,qCAAqCttC,MAAM,KAC1DutC,YAAa,uBAAuBvtC,MAAM,KAC1CqwC,oBAAoB,EACpBvC,eAAgB,CACZC,GAAI,QACJC,IAAK,WACLC,EAAG,aACHC,GAAI,cACJC,IAAK,oBACLC,KAAM,0BAEVC,SAAU,CACNC,QAAS,qBACTC,QAAS,gBACTC,SAAU,cACVC,QAAS,cACTC,SAAU,sBACVC,SAAU,KAEdC,aAAc,CACVC,OAAQ,UACRC,KAAM,YACNx0C,EAAG,oBACHy0C,GAAI,cACJ78C,EAAG,aACH88C,GAAI,aACJC,EAAG,YACHC,GAAI,YACJ74B,EAAG,UACH84B,GAAI,WACJC,EAAG,UACHC,GAAI,UACJC,EAAG,QACHC,GAAI,UAERC,uBAAwB,gBACxBC,QAAS,SAAUC,EAAQyB,GACvB,OAAQA,GAEJ,QACA,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,MACL,IAAK,IACD,OAAOzB,GAAqB,IAAXA,EAAe,KAAO,KAG3C,IAAK,IACL,IAAK,IACD,OAAOA,GAAqB,IAAXA,EAAe,KAAO,SAlEjBtyD,CAAQ,EAAQ,8FCGlD,SAAWkiD,GAAU,aAIdA,EAAO4N,aAAa,QAAS,CACpCC,OAAQ,uFAAuFntC,MAC3F,KAEJotC,YAAa,iEAAiEptC,MAC1E,KAEJ0xC,kBAAkB,EAClBrE,SAAU,sDAAsDrtC,MAAM,KACtEstC,cAAe,qCAAqCttC,MAAM,KAC1DutC,YAAa,uBAAuBvtC,MAAM,KAC1CqwC,oBAAoB,EACpBvC,eAAgB,CACZC,GAAI,QACJC,IAAK,WACLC,EAAG,aACHC,GAAI,cACJC,IAAK,oBACLC,KAAM,0BAEVC,SAAU,CACNC,QAAS,qBACTC,QAAS,gBACTC,SAAU,cACVC,QAAS,cACTC,SAAU,sBACVC,SAAU,KAEdC,aAAc,CACVC,OAAQ,UACRC,KAAM,YACNx0C,EAAG,oBACHy0C,GAAI,cACJ78C,EAAG,aACH88C,GAAI,aACJC,EAAG,YACHC,GAAI,YACJ74B,EAAG,UACH84B,GAAI,WACJC,EAAG,UACHC,GAAI,UACJC,EAAG,QACHC,GAAI,UAERC,uBAAwB,gBACxBC,QAAS,SAAUC,EAAQyB,GACvB,OAAQA,GAEJ,QACA,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,MACL,IAAK,IACD,OAAOzB,GAAqB,IAAXA,EAAe,KAAO,KAG3C,IAAK,IACL,IAAK,IACD,OAAOA,GAAqB,IAAXA,EAAe,KAAO,OAGnDC,KAAM,CACFC,IAAK,EACLC,IAAK,KAvEyBzyD,CAAQ,EAAQ,2FCGlD,SAAWkiD,GAAU,aAIzB,IAEI2S,EAAc,yKACdD,EAAc,CACV,SACA,SACA,SACA,QACA,QACA,SACA,SACA,SACA,SACA,QACA,QACA,SAGC1S,EAAO4N,aAAa,KAAM,CAC/BC,OAAQ,uFAAuFntC,MAC3F,KAEJotC,YAAa,iEAAiEptC,MAC1E,KAEJiyC,YAAaA,EACbR,iBAAkBQ,EAClBK,kBA3BoB,2FA4BpBC,uBA3ByB,oFA4BzBP,YAAaA,EACbQ,gBAAiBR,EACjBS,iBAAkBT,EAClB3E,SAAU,sDAAsDrtC,MAAM,KACtEstC,cAAe,qCAAqCttC,MAAM,KAC1DutC,YAAa,uBAAuBvtC,MAAM,KAC1CqwC,oBAAoB,EACpBvC,eAAgB,CACZC,GAAI,QACJC,IAAK,WACLC,EAAG,aACHC,GAAI,cACJC,IAAK,oBACLC,KAAM,0BAEVC,SAAU,CACNC,QAAS,qBACTC,QAAS,gBACTC,SAAU,cACVC,QAAS,cACTC,SAAU,sBACVC,SAAU,KAEdC,aAAc,CACVC,OAAQ,UACRC,KAAM,YACNx0C,EAAG,oBACHy0C,GAAI,cACJ78C,EAAG,aACH88C,GAAI,aACJC,EAAG,YACHC,GAAI,YACJ74B,EAAG,UACH84B,GAAI,WACJiC,EAAG,cACHC,GAAI,cACJjC,EAAG,UACHC,GAAI,UACJC,EAAG,QACHC,GAAI,UAERC,uBAAwB,eACxBC,QAAS,SAAUC,EAAQyB,GACvB,OAAQA,GAIJ,IAAK,IACD,OAAOzB,GAAqB,IAAXA,EAAe,KAAO,IAG3C,QACA,IAAK,IACL,IAAK,IACL,IAAK,MACL,IAAK,IACD,OAAOA,GAAqB,IAAXA,EAAe,KAAO,KAG3C,IAAK,IACL,IAAK,IACD,OAAOA,GAAqB,IAAXA,EAAe,KAAO,OAGnDC,KAAM,CACFC,IAAK,EACLC,IAAK,KAtGyBzyD,CAAQ,EAAQ,2FCGlD,SAAWkiD,GAAU,aAIzB,IAAIyU,EAAsB,6DAA6D/zC,MAC/E,KAEJg0C,EAAyB,kDAAkDh0C,MACvE,KAGCs/B,EAAO4N,aAAa,KAAM,CAC/BC,OAAQ,iGAAiGntC,MACrG,KAEJotC,YAAa,SAAUl7C,EAAG4S,GACtB,OAAK5S,EAEM,QAAQmO,KAAKyE,GACbkvC,EAAuB9hD,EAAEmhD,SAEzBU,EAAoB7hD,EAAEmhD,SAJtBU,GAOfrC,kBAAkB,EAClBrE,SAAU,wDAAwDrtC,MAC9D,KAEJstC,cAAe,8BAA8BttC,MAAM,KACnDutC,YAAa,uBAAuBvtC,MAAM,KAC1CqwC,oBAAoB,EACpBvC,eAAgB,CACZC,GAAI,QACJC,IAAK,WACLC,EAAG,aACHC,GAAI,cACJC,IAAK,oBACLC,KAAM,0BAEVC,SAAU,CACNC,QAAS,gBACTC,QAAS,gBACTC,SAAU,eACVC,QAAS,iBACTC,SAAU,wBACVC,SAAU,KAEdC,aAAc,CACVC,OAAQ,SACRC,KAAM,SACNx0C,EAAG,mBACHy0C,GAAI,cACJ78C,EAAG,YACH88C,GAAI,aACJC,EAAG,WACHC,GAAI,WACJ74B,EAAG,UACH84B,GAAI,WACJC,EAAG,aACHC,GAAI,aACJC,EAAG,WACHC,GAAI,cAERC,uBAAwB,kBACxBC,QAAS,SAAUC,GACf,OACIA,GACY,IAAXA,GAA2B,IAAXA,GAAgBA,GAAU,GAAK,MAAQ,OAGhEC,KAAM,CACFC,IAAK,EACLC,IAAK,KA3EyBzyD,CAAQ,EAAQ,2FCGlD,SAAWkiD,GAAU,aA4ChBA,EAAO4N,aAAa,KAAM,CAC/BC,OAzCS,CACL,SACA,UACA,QACA,UACA,YACA,YACA,OACA,SACA,eACA,mBACA,UACA,WA8BJC,YA5Bc,CACV,MACA,QACA,OACA,MACA,OACA,QACA,OACA,MACA,OACA,OACA,OACA,QAiBJsE,kBAAkB,EAClBrE,SAhBW,CACP,eACA,WACA,WACA,cACA,YACA,YACA,eAUJC,cARgB,CAAC,OAAQ,OAAQ,QAAS,OAAQ,OAAQ,QAAS,QASnEC,YARc,CAAC,KAAM,KAAM,KAAM,KAAM,KAAM,IAAK,MASlDO,eAAgB,CACZC,GAAI,QACJC,IAAK,WACLC,EAAG,aACHC,GAAI,cACJC,IAAK,oBACLC,KAAM,2BAEVC,SAAU,CACNC,QAAS,gBACTC,QAAS,kBACTC,SAAU,eACVC,QAAS,eACTC,SAAU,2BACVC,SAAU,KAEdC,aAAc,CACVC,OAAQ,OACRC,KAAM,YACNx0C,EAAG,gBACHy0C,GAAI,aACJ78C,EAAG,UACH88C,GAAI,aACJC,EAAG,iBACHC,GAAI,oBACJ74B,EAAG,KACH84B,GAAI,QACJC,EAAG,KACHC,GAAI,YACJC,EAAG,SACHC,GAAI,aAERC,uBAAwB,mBACxBC,QAAS,SAAUC,GAEf,OAAOA,GADiB,IAAXA,EAAe,IAAMA,EAAS,IAAO,EAAI,KAAO,OAGjEC,KAAM,CACFC,IAAK,EACLC,IAAK,KA7FyBzyD,CAAQ,EAAQ,2FCGlD,SAAWkiD,GAAU,aA4ChBA,EAAO4N,aAAa,KAAM,CAC/BC,OAzCS,CACL,gBACA,aACA,UACA,aACA,aACA,eACA,cACA,cACA,eACA,aACA,eACA,gBA8BJC,YA5Bc,CACV,OACA,OACA,OACA,OACA,OACA,OACA,OACA,MACA,OACA,OACA,OACA,QAiBJsE,kBAAkB,EAClBrE,SAhBW,CACP,cACA,UACA,UACA,YACA,YACA,WACA,eAUJC,cARgB,CAAC,MAAO,MAAO,MAAO,MAAO,MAAO,MAAO,OAS3DC,YARc,CAAC,KAAM,KAAM,KAAM,KAAM,KAAM,KAAM,MASnDO,eAAgB,CACZC,GAAI,QACJC,IAAK,WACLC,EAAG,aACHC,GAAI,cACJC,IAAK,oBACLC,KAAM,2BAEVC,SAAU,CACNC,QAAS,oBACTC,QAAS,sBACTC,SAAU,gBACVC,QAAS,iBACTC,SAAU,6BACVC,SAAU,KAEdC,aAAc,CACVC,OAAQ,YACRC,KAAM,gBACNx0C,EAAG,gBACHy0C,GAAI,YACJ78C,EAAG,UACH88C,GAAI,gBACJC,EAAG,OACHC,GAAI,aACJ74B,EAAG,QACH84B,GAAI,WACJC,EAAG,OACHC,GAAI,YACJC,EAAG,WACHC,GAAI,eAERC,uBAAwB,mBACxBC,QAAS,SAAUC,GAEf,OAAOA,GADiB,IAAXA,EAAe,IAAMA,EAAS,IAAO,EAAI,KAAO,OAGjEC,KAAM,CACFC,IAAK,EACLC,IAAK,KA7FyBzyD,CAAQ,EAAQ,2FCGlD,SAAWkiD,GAAU,aAIhBA,EAAO4N,aAAa,KAAM,CAC/BC,OAAQ,yFAAyFntC,MAC7F,KAEJotC,YAAa,8DAA8DptC,MACvE,KAEJ0xC,kBAAkB,EAClBrE,SAAU,mDAAmDrtC,MAAM,KACnEstC,cAAe,qCAAqCttC,MAAM,KAC1DutC,YAAa,uBAAuBvtC,MAAM,KAC1CqwC,oBAAoB,EACpBvC,eAAgB,CACZC,GAAI,OACJC,IAAK,UACLC,EAAG,aACHC,GAAI,wBACJC,IAAK,6BACLC,KAAM,oCAEVC,SAAU,CACNC,QAAS,WACL,MAAO,UAA6B,IAAjBpxD,KAAKywD,QAAgB,KAAO,KAAO,QAE1DY,QAAS,WACL,MAAO,UAA6B,IAAjBrxD,KAAKywD,QAAgB,KAAO,KAAO,QAE1Da,SAAU,WACN,MAAO,UAA6B,IAAjBtxD,KAAKywD,QAAgB,KAAO,KAAO,QAE1Dc,QAAS,WACL,MAAO,UAA6B,IAAjBvxD,KAAKywD,QAAgB,IAAM,KAAO,QAEzDe,SAAU,WACN,MACI,qBAAwC,IAAjBxxD,KAAKywD,QAAgB,KAAO,KAAO,QAGlEgB,SAAU,KAEdC,aAAc,CACVC,OAAQ,SAAU3gD,GACd,OAA0B,IAAtBA,EAAI9C,QAAQ,MACL,IAAM8C,EAEV,MAAQA,GAEnB4gD,KAAM,SACNx0C,EAAG,eACHy0C,GAAI,cACJ78C,EAAG,YACH88C,GAAI,aACJC,EAAG,YACHC,GAAI,WACJ74B,EAAG,SACH84B,GAAI,UACJC,EAAG,SACHC,GAAI,WACJC,EAAG,SACHC,GAAI,WAERC,uBAAwB,WACxBC,QAAS,MACTE,KAAM,CACFC,IAAK,EACLC,IAAK,KAxEyBzyD,CAAQ,EAAQ,iGCGlD,SAAWkiD,GAAU,aAIzB,SAAS0T,EAAoBtD,EAAQQ,EAAentD,EAAKotD,GACrD,IAAIrrC,EAAS,CACTxK,EAAG,CAAC,kBAAmB,cACvBy0C,GAAI,CAACW,EAAS,aAAcA,EAAS,UACrCx9C,EAAG,CAAC,aAAc,YAClB88C,GAAI,CAACU,EAAS,YAAaA,EAAS,WACpCT,EAAG,CAAC,WAAY,SAChBC,GAAI,CAACQ,EAAS,UAAWA,EAAS,SAClCr5B,EAAG,CAAC,YAAa,UACjB84B,GAAI,CAACO,EAAS,WAAYA,EAAS,QACnCN,EAAG,CAAC,gBAAiB,aACrBC,GAAI,CAACK,EAAS,cAAeA,EAAS,WACtCJ,EAAG,CAAC,aAAc,WAClBC,GAAI,CAACG,EAAS,YAAaA,EAAS,YAExC,OAAOS,EAAWrrC,EAAO/hB,GAAK,GAAK+hB,EAAO/hB,GAAK,GAGrCu8C,EAAO4N,aAAa,WAAY,CAC1CC,OAAQ,CACJ6D,WAAY,wFAAwFhxC,MAChG,KAEJ8E,OAAQ,mJAAmJ9E,MACvJ,KAEJixC,SAAU,mBAEd7D,YAAa,4EAA4EptC,MACrF,KAEJ0xC,kBAAkB,EAClBrE,SAAU,qDAAqDrtC,MAAM,KACrEstC,cAAe,4CAA4CttC,MAAM,KACjEutC,YAAa,wBAAwBvtC,MAAM,KAC3CqwC,oBAAoB,EACpBvC,eAAgB,CACZC,GAAI,kBACJC,IAAK,qBACLC,EAAG,aACHC,GAAI,cACJC,IAAK,8BACLC,KAAM,uCACNyE,KAAM,oCAEVxE,SAAU,CACNC,QAAS,WACTC,QAAS,eACTC,SAAU,qBACVC,QAAS,WACTC,SAAU,qBACVC,SAAU,KAEdC,aAAc,CACVC,OAAQ,KACRC,KAAM,UACNx0C,EAAG04C,EACHjE,GAAIiE,EACJ9gD,EAAG8gD,EACHhE,GAAIgE,EACJ/D,EAAG+D,EACH9D,GAAI8D,EACJ38B,EAAG28B,EACH7D,GAAI6D,EACJ5D,EAAG4D,EACH3D,GAAI2D,EACJ1D,EAAG0D,EACHzD,GAAIyD,GAERxD,uBAAwB,eACxBC,QAAS,SAAUC,EAAQyB,GACvB,OAAQA,GAEJ,IAAK,IACD,OAAOzB,EAAS,MACpB,QACA,IAAK,IACL,IAAK,IACL,IAAK,MACL,IAAK,IACL,IAAK,IACL,IAAK,IACD,OAAOA,IAGnBC,KAAM,CACFC,IAAK,EACLC,IAAK,GAETrC,cAAe,4BACfgE,aAAc,SAAUlB,EAAM5C,GAI1B,OAHa,KAAT4C,IACAA,EAAO,GAEM,SAAb5C,EACO4C,EAAO,EAAIA,EAAOA,EAAO,GACZ,WAAb5C,EACA4C,EACa,YAAb5C,EACA4C,EAAO,GAAKA,EAAOA,EAAO,GACb,UAAb5C,EACA4C,EAAO,QADX,GAIX5C,SAAU,SAAU4C,EAAMC,EAAQ1C,GAC9B,OAAIyC,EAAO,EACA,OACAA,EAAO,GACP,SACAA,EAAO,GACP,UACAA,EAAO,GACP,QAEA,UAzHmBlzD,CAAQ,EAAQ,iGCGlD,SAAWkiD,GAAU,aAIzB,SAAS0T,EAAoBtD,EAAQQ,EAAentD,EAAKotD,GACrD,IAAIrrC,EAAS,CACTxK,EAAG,CAAC,qBAAsB,iBAC1By0C,GAAI,CAACW,EAAS,cAAeA,EAAS,WACtCx9C,EAAG,CAAC,aAAc,YAClB88C,GAAI,CAACU,EAAS,YAAaA,EAAS,WACpCT,EAAG,CAAC,YAAa,UACjBC,GAAI,CAACQ,EAAS,WAAYA,EAAS,UACnCr5B,EAAG,CAAC,YAAa,UACjB84B,GAAI,CAACO,EAAS,WAAYA,EAAS,QACnCN,EAAG,CAAC,eAAgB,aACpBC,GAAI,CAACK,EAAS,cAAeA,EAAS,WACtCJ,EAAG,CAAC,aAAc,YAClBC,GAAI,CAACG,EAAS,YAAaA,EAAS,YAExC,OAAOS,EAAWrrC,EAAO/hB,GAAK,GAAK+hB,EAAO/hB,GAAK,GAGrCu8C,EAAO4N,aAAa,WAAY,CAC1CC,OAAQ,CACJ6D,WAAY,4EAA4EhxC,MACpF,KAEJ8E,OAAQ,wIAAwI9E,MAC5I,KAEJixC,SAAU,mBAEd7D,YAAa,4DAA4DptC,MACrE,KAEJ0xC,kBAAkB,EAClBrE,SAAU,uDAAuDrtC,MAAM,KACvEstC,cAAe,qCAAqCttC,MAAM,KAC1DutC,YAAa,uBAAuBvtC,MAAM,KAC1CqwC,oBAAoB,EACpBvC,eAAgB,CACZC,GAAI,iBACJC,IAAK,oBACLC,EAAG,aACHC,GAAI,cACJC,IAAK,6BACLC,KAAM,sCACNyE,KAAM,mCAEVxE,SAAU,CACNC,QAAS,WACTC,QAAS,cACTC,SAAU,sBACVC,QAAS,WACTC,SAAU,sBACVC,SAAU,KAEdC,aAAc,CACVC,OAAQ,KACRC,KAAM,UACNx0C,EAAG04C,EACHjE,GAAIiE,EACJ9gD,EAAG8gD,EACHhE,GAAIgE,EACJ/D,EAAG+D,EACH9D,GAAI8D,EACJ38B,EAAG28B,EACH7D,GAAI6D,EACJ5D,EAAG4D,EACH3D,GAAI2D,EACJ1D,EAAG0D,EACHzD,GAAIyD,GAERxD,uBAAwB,cACxBC,QAAS,SAAUC,EAAQyB,GACvB,OAAQA,GAEJ,IAAK,IACD,OAAOzB,EAAS,KACpB,QACA,IAAK,IACL,IAAK,IACL,IAAK,MACL,IAAK,IACL,IAAK,IACL,IAAK,IACD,OAAOA,IAGnBC,KAAM,CACFC,IAAK,EACLC,IAAK,GAETrC,cAAe,+BACfgE,aAAc,SAAUlB,EAAM5C,GAI1B,OAHa,KAAT4C,IACAA,EAAO,GAEM,SAAb5C,EACO4C,EAAO,EAAIA,EAAOA,EAAO,GACZ,aAAb5C,EACA4C,EACa,aAAb5C,EACA4C,EAAO,GAAKA,EAAOA,EAAO,GACb,UAAb5C,EACA4C,EAAO,QADX,GAIX5C,SAAU,SAAU4C,EAAMC,EAAQ1C,GAC9B,OAAIyC,EAAO,EACA,OACAA,EAAO,GACP,WACAA,EAAO,GACP,WACAA,EAAO,GACP,QAEA,UAzHmBlzD,CAAQ,EAAQ,2FCGlD,SAAWkiD,GAAU,aAIzB,IAAImR,EAAY,CACR,EAAG,IACH,EAAG,IACH,EAAG,IACH,EAAG,IACH,EAAG,IACH,EAAG,IACH,EAAG,IACH,EAAG,IACH,EAAG,IACH,EAAG,KAEPE,EAAY,CACR,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,KAGJrR,EAAO4N,aAAa,KAAM,CAC/BC,OAAQ,yFAAyFntC,MAC7F,KAEJotC,YAAa,yEAAyEptC,MAClF,KAEJ0xC,kBAAkB,EAClBrE,SAAU,wDAAwDrtC,MAC9D,KAEJstC,cAAe,mCAAmCttC,MAAM,KACxDutC,YAAa,qBAAqBvtC,MAAM,KACxC8tC,eAAgB,CACZC,GAAI,gBACJC,IAAK,mBACLC,EAAG,aACHC,GAAI,cACJC,IAAK,6BACLC,KAAM,oCAEVC,SAAU,CACNC,QAAS,UACTC,QAAS,YACTC,SAAU,WACVC,QAAS,cACTC,SAAU,mBACVC,SAAU,KAEdC,aAAc,CACVC,OAAQ,QACRC,KAAM,WACNx0C,EAAG,WACHy0C,GAAI,WACJ78C,EAAG,WACH88C,GAAI,WACJC,EAAG,UACHC,GAAI,UACJ74B,EAAG,UACH84B,GAAI,UACJC,EAAG,WACHC,GAAI,WACJC,EAAG,UACHC,GAAI,WAERmB,SAAU,SAAUjuD,GAChB,OAAOA,EAAOwP,QAAQ,iBAAiB,SAAUiH,GAC7C,OAAOy3C,EAAUz3C,OAGzBs3C,WAAY,SAAU/tD,GAClB,OAAOA,EAAOwP,QAAQ,OAAO,SAAUiH,GACnC,OAAOu3C,EAAUv3C,OAKzBs0C,cAAe,qBACfgE,aAAc,SAAUlB,EAAM5C,GAI1B,OAHa,KAAT4C,IACAA,EAAO,GAEM,QAAb5C,EACO4C,EAAO,EAAIA,EAAOA,EAAO,GACZ,SAAb5C,EACA4C,EACa,SAAb5C,EACA4C,GAAQ,GAAKA,EAAOA,EAAO,GACd,SAAb5C,EACA4C,EAAO,QADX,GAIX5C,SAAU,SAAU4C,EAAMC,EAAQ1C,GAC9B,OAAIyC,EAAO,EACA,MACAA,EAAO,GACP,OACAA,EAAO,GACP,OACAA,EAAO,GACP,OAEA,OAGfX,KAAM,CACFC,IAAK,EACLC,IAAK,KAvHyBzyD,CAAQ,EAAQ,2FCKlD,SAAWkiD,GAAU,aAIhBA,EAAO4N,aAAa,KAAM,CAC/BC,OAAQ,0EAA0EntC,MAC9E,KAEJotC,YAAa,4DAA4DptC,MACrE,KAEJqtC,SAAU,uCAAuCrtC,MAAM,KACvDstC,cAAe,uBAAuBttC,MAAM,KAC5CutC,YAAa,gBAAgBvtC,MAAM,KACnC8tC,eAAgB,CACZC,GAAI,QACJC,IAAK,WACLC,EAAG,aACHC,GAAI,iBACJC,IAAK,uBACLC,KAAM,6BACNz+B,EAAG,WACHgjC,GAAI,aACJC,IAAK,mBACLC,KAAM,yBAEVxE,SAAU,CACNC,QAAS,cACTC,QAAS,aACTC,SAAU,iBACVC,QAAS,eACTC,SAAU,+BACVC,SAAU,KAEdC,aAAc,CACVC,OAAQ,UACRC,KAAM,UACNx0C,EAAG,aACHy0C,GAAI,WACJ78C,EAAG,MACH88C,GAAI,UACJC,EAAG,MACHC,GAAI,SAAUQ,GACV,OAAe,IAAXA,EACO,SAEJA,EAAS,SAEpBr5B,EAAG,MACH84B,GAAI,SAAUO,GACV,OAAe,IAAXA,EACO,SAEJA,EAAS,SAEpBN,EAAG,OACHC,GAAI,SAAUK,GACV,OAAe,IAAXA,EACO,UAEJA,EAAS,WAEpBJ,EAAG,MACHC,GAAI,SAAUG,GACV,OAAe,IAAXA,EACO,SACAA,EAAS,IAAO,GAAgB,KAAXA,EACrBA,EAAS,OAEbA,EAAS,UAGxBlC,cAAe,gEACfC,KAAM,SAAU39C,GACZ,MAAO,8BAA8BuQ,KAAKvQ,IAE9C49C,SAAU,SAAU4C,EAAMC,EAAQ1C,GAC9B,OAAIyC,EAAO,EACA,aACAA,EAAO,GACP,QACAA,EAAO,GACPzC,EAAU,SAAW,eACrByC,EAAO,GACPzC,EAAU,QAAU,eAEpB,UAzFmBzwD,CAAQ,EAAQ,2FCClD,SAAWkiD,GAAU,aAIzB,IAAImR,EAAY,CACR,EAAG,IACH,EAAG,IACH,EAAG,IACH,EAAG,IACH,EAAG,IACH,EAAG,IACH,EAAG,IACH,EAAG,IACH,EAAG,IACH,EAAG,KAEPE,EAAY,CACR,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,KAETqB,EAAc,CACV,OACA,WACA,UACA,UACA,OACA,QACA,QACA,OACA,aACA,UACA,WACA,cAiBC1S,EAAO4N,aAAa,KAAM,CAC/BC,OAAQ,CACJroC,OAAQ,8EAA8E9E,MAClF,KAEJgxC,WAAY,0EAA0EhxC,MAClF,MAGRotC,YAAa,6DAA6DptC,MACtE,KAEJqtC,SAAU,uDAAuDrtC,MAAM,KACvEstC,cAAe,kCAAkCttC,MAAM,KACvDutC,YAAa,qBAAqBvtC,MAAM,KACxC8tC,eAAgB,CACZC,GAAI,aACJC,IAAK,gBACLC,EAAG,aACHC,GAAI,cACJC,IAAK,0BACLC,KAAM,iCAGV4D,YAAaA,EACbQ,gBAAiBR,EACjBS,iBAzCmB,CACf,OACA,QACA,UACA,UACA,OACA,QACA,QACA,OACA,QACA,UACA,OACA,SA+BJR,YAAa,+KAEbR,iBAAkB,+KAElBa,kBAAmB,uIAEnBC,uBAAwB,sFAExBlE,SAAU,CACNC,QAAS,UACTC,QAAS,UACTC,SAAU,WACVC,QAAS,UACTC,SAAU,mBACVC,SAAU,KAEdC,aAAc,CACVC,OAAQ,SACRC,KAAM,UACNx0C,EAAG,cACHy0C,GAAI,WACJ78C,EAAG,UACH88C,GAAI,UACJC,EAAG,UACHC,GAAI,UACJ74B,EAAG,SACH84B,GAAI,SACJC,EAAG,WACHC,GAAI,WACJC,EAAG,UACHC,GAAI,WAERmB,SAAU,SAAUjuD,GAChB,OAAOA,EAAOwP,QAAQ,iBAAiB,SAAUiH,GAC7C,OAAOy3C,EAAUz3C,OAGzBs3C,WAAY,SAAU/tD,GAClB,OAAOA,EAAOwP,QAAQ,OAAO,SAAUiH,GACnC,OAAOu3C,EAAUv3C,OAKzBs0C,cAAe,qBACfgE,aAAc,SAAUlB,EAAM5C,GAI1B,OAHa,KAAT4C,IACAA,EAAO,GAEM,QAAb5C,EACO4C,EAAO,EAAIA,EAAOA,EAAO,GACZ,SAAb5C,EACA4C,EACa,UAAb5C,EACA4C,GAAQ,GAAKA,EAAOA,EAAO,GACd,QAAb5C,EACA4C,EAAO,QADX,GAIX5C,SAAU,SAAU4C,EAAMC,EAAQ1C,GAC9B,OAAIyC,EAAO,EACA,MACAA,EAAO,GACP,OACAA,EAAO,GACP,QACAA,EAAO,GACP,MAEA,OAGfX,KAAM,CACFC,IAAK,EACLC,IAAK,KAlKyBzyD,CAAQ,EAAQ,2FCGlD,SAAWkiD,GAAU,aAIzB,SAASoT,EAAUhD,EAAQQ,EAAentD,GACtC,IAAIS,EAASksD,EAAS,IACtB,OAAQ3sD,GACJ,IAAK,KAQD,OANIS,GADW,IAAXksD,EACU,UACQ,IAAXA,GAA2B,IAAXA,GAA2B,IAAXA,EAC7B,UAEA,WAGlB,IAAK,IACD,OAAOQ,EAAgB,eAAiB,eAC5C,IAAK,KAQD,OANI1sD,GADW,IAAXksD,EACU,SACQ,IAAXA,GAA2B,IAAXA,GAA2B,IAAXA,EAC7B,SAEA,UAGlB,IAAK,IACD,OAAOQ,EAAgB,YAAc,cACzC,IAAK,KAQD,OANI1sD,GADW,IAAXksD,EACU,MACQ,IAAXA,GAA2B,IAAXA,GAA2B,IAAXA,EAC7B,OAEA,QAGlB,IAAK,KAMD,OAJIlsD,GADW,IAAXksD,EACU,MAEA,QAGlB,IAAK,KAQD,OANIlsD,GADW,IAAXksD,EACU,SACQ,IAAXA,GAA2B,IAAXA,GAA2B,IAAXA,EAC7B,UAEA,WAGlB,IAAK,KAQD,OANIlsD,GADW,IAAXksD,EACU,SACQ,IAAXA,GAA2B,IAAXA,GAA2B,IAAXA,EAC7B,SAEA,WAMjBpQ,EAAO4N,aAAa,KAAM,CAC/BC,OAAQ,CACJroC,OAAQ,oGAAoG9E,MACxG,KAEJgxC,WAAY,gGAAgGhxC,MACxG,MAGRotC,YAAa,+DAA+DptC,MACxE,KAEJ0xC,kBAAkB,EAClBrE,SAAU,4DAA4DrtC,MAClE,KAEJstC,cAAe,qCAAqCttC,MAAM,KAC1DutC,YAAa,uBAAuBvtC,MAAM,KAC1CqwC,oBAAoB,EACpBvC,eAAgB,CACZC,GAAI,OACJC,IAAK,UACLC,EAAG,aACHC,GAAI,eACJC,IAAK,oBACLC,KAAM,2BAEVC,SAAU,CACNC,QAAS,eACTC,QAAS,eACTC,SAAU,WACN,OAAQtxD,KAAKg0D,OACT,KAAK,EACD,MAAO,wBACX,KAAK,EACD,MAAO,uBACX,KAAK,EACD,MAAO,sBACX,KAAK,EACL,KAAK,EACL,KAAK,EACL,KAAK,EACD,MAAO,oBAGnBzC,QAAS,eACTC,SAAU,WACN,OAAQxxD,KAAKg0D,OACT,KAAK,EACD,MAAO,6BACX,KAAK,EACD,MAAO,4BACX,KAAK,EACD,MAAO,2BACX,KAAK,EACL,KAAK,EACL,KAAK,EACL,KAAK,EACD,MAAO,yBAGnBvC,SAAU,KAEdC,aAAc,CACVC,OAAQ,QACRC,KAAM,WACNx0C,EAAG,cACHy0C,GAAI2D,EACJxgD,EAAGwgD,EACH1D,GAAI0D,EACJzD,EAAGyD,EACHxD,GAAIwD,EACJr8B,EAAG,MACH84B,GAAIuD,EACJtD,EAAG,SACHC,GAAIqD,EACJpD,EAAG,SACHC,GAAImD,GAERlD,uBAAwB,YACxBC,QAAS,MACTE,KAAM,CACFC,IAAK,EACLC,IAAK,KAxJyBzyD,CAAQ,EAAQ,2FCIlD,SAAWkiD,GAAU,aAIzB,IAAI2U,EAAc,gEAAgEj0C,MAC9E,KAEJ,SAAS0yC,EAAUhD,EAAQQ,EAAentD,EAAKotD,GAC3C,IAAIW,EAAMpB,EACV,OAAQ3sD,GACJ,IAAK,IACD,OAAOotD,GAAYD,EACb,mBACA,oBACV,IAAK,KACD,OAAOY,GAAOX,GAAYD,GACpB,aACA,cACV,IAAK,IACD,MAAO,OAASC,GAAYD,EAAgB,QAAU,UAC1D,IAAK,KACD,OAAOY,GAAOX,GAAYD,EAAgB,QAAU,UACxD,IAAK,IACD,MAAO,OAASC,GAAYD,EAAgB,OAAS,UACzD,IAAK,KACD,OAAOY,GAAOX,GAAYD,EAAgB,OAAS,UACvD,IAAK,IACD,MAAO,OAASC,GAAYD,EAAgB,OAAS,UACzD,IAAK,KACD,OAAOY,GAAOX,GAAYD,EAAgB,OAAS,UACvD,IAAK,IACD,MAAO,OAASC,GAAYD,EAAgB,SAAW,YAC3D,IAAK,KACD,OAAOY,GAAOX,GAAYD,EAAgB,SAAW,YACzD,IAAK,IACD,MAAO,OAASC,GAAYD,EAAgB,MAAQ,QACxD,IAAK,KACD,OAAOY,GAAOX,GAAYD,EAAgB,MAAQ,QAE1D,MAAO,GAEX,SAASP,EAAKQ,GACV,OACKA,EAAW,GAAK,WACjB,IACA8D,EAAY/2D,KAAKg0D,OACjB,aAIC5R,EAAO4N,aAAa,KAAM,CAC/BC,OAAQ,oGAAoGntC,MACxG,KAEJotC,YAAa,iEAAiEptC,MAC1E,KAEJ0xC,kBAAkB,EAClBrE,SAAU,sDAAsDrtC,MAAM,KACtEstC,cAAe,gCAAgCttC,MAAM,KACrDutC,YAAa,qBAAqBvtC,MAAM,KACxC8tC,eAAgB,CACZC,GAAI,OACJC,IAAK,UACLC,EAAG,cACHC,GAAI,gBACJC,IAAK,qBACLC,KAAM,4BAEVZ,cAAe,SACfC,KAAM,SAAU39C,GACZ,MAAyC,MAAlCA,EAAMnN,OAAO,GAAGyhB,eAE3BspC,SAAU,SAAUC,EAAOC,EAASC,GAChC,OAAIF,EAAQ,IACW,IAAZE,EAAmB,KAAO,MAEd,IAAZA,EAAmB,KAAO,MAGzCQ,SAAU,CACNC,QAAS,gBACTC,QAAS,oBACTC,SAAU,WACN,OAAOmB,EAAK1wD,KAAK/B,MAAM,IAE3BuxD,QAAS,oBACTC,SAAU,WACN,OAAOiB,EAAK1wD,KAAK/B,MAAM,IAE3ByxD,SAAU,KAEdC,aAAc,CACVC,OAAQ,WACRC,KAAM,KACNx0C,EAAGo4C,EACH3D,GAAI2D,EACJxgD,EAAGwgD,EACH1D,GAAI0D,EACJzD,EAAGyD,EACHxD,GAAIwD,EACJr8B,EAAGq8B,EACHvD,GAAIuD,EACJtD,EAAGsD,EACHrD,GAAIqD,EACJpD,EAAGoD,EACHnD,GAAImD,GAERlD,uBAAwB,YACxBC,QAAS,MACTE,KAAM,CACFC,IAAK,EACLC,IAAK,KAnHyBzyD,CAAQ,EAAQ,8FCElD,SAAWkiD,GAAU,aAIdA,EAAO4N,aAAa,QAAS,CACpCC,OAAQ,CACJroC,OAAQ,4GAA4G9E,MAChH,KAEJgxC,WAAY,gGAAgGhxC,MACxG,MAGRotC,YAAa,kDAAkDptC,MAAM,KACrEqtC,SAAU,gEAAgErtC,MACtE,KAEJstC,cAAe,+BAA+BttC,MAAM,KACpDutC,YAAa,+BAA+BvtC,MAAM,KAClD8tC,eAAgB,CACZC,GAAI,QACJC,IAAK,WACLC,EAAG,aACHC,GAAI,iBACJC,IAAK,wBACLC,KAAM,+BAEVC,SAAU,CACNC,QAAS,aACTC,QAAS,YACTE,QAAS,YACTD,SAAU,WACN,MAAO,sBAEXE,SAAU,WACN,MAAO,8BAEXC,SAAU,KAEdC,aAAc,CACVC,OAAQ,UACRC,KAAM,UACNx0C,EAAG,mBACHy0C,GAAI,cACJ78C,EAAG,OACH88C,GAAI,UACJC,EAAG,MACHC,GAAI,SACJ74B,EAAG,KACH84B,GAAI,QACJC,EAAG,OACHC,GAAI,UACJC,EAAG,OACHC,GAAI,WAER/B,cAAe,oCACfC,KAAM,SAAU39C,GACZ,MAAO,uBAAuBuQ,KAAKvQ,IAEvC49C,SAAU,SAAU4C,GAChB,OAAIA,EAAO,EACA,UACAA,EAAO,GACP,WACAA,EAAO,GACP,UAEA,YAGfd,uBAAwB,0BACxBC,QAAS,SAAUC,EAAQyB,GACvB,OAAQA,GACJ,IAAK,MACL,IAAK,IACL,IAAK,IACL,IAAK,OACD,OAAe,IAAXzB,EACOA,EAAS,MAEbA,EAAS,MACpB,QACI,OAAOA,IAGnBC,KAAM,CACFC,IAAK,EACLC,IAAK,KA1FyBzyD,CAAQ,EAAQ,2FCIlD,SAAWkiD,GAAU,aAIhBA,EAAO4N,aAAa,KAAM,CAC/BC,OAAQ,yFAAyFntC,MAC7F,KAEJotC,YAAa,kDAAkDptC,MAAM,KACrEqtC,SAAU,6CAA6CrtC,MAAM,KAC7DstC,cAAe,8BAA8BttC,MAAM,KACnDutC,YAAa,uBAAuBvtC,MAAM,KAC1C8tC,eAAgB,CACZC,GAAI,QACJC,IAAK,WACLC,EAAG,aACHC,GAAI,cACJC,IAAK,4BACLC,KAAM,mCAEVZ,cAAe,wBACfgE,aAAc,SAAUlB,EAAM5C,GAI1B,OAHa,KAAT4C,IACAA,EAAO,GAEM,SAAb5C,EACO4C,EACa,UAAb5C,EACA4C,GAAQ,GAAKA,EAAOA,EAAO,GACd,SAAb5C,GAAoC,UAAbA,EACvB4C,EAAO,QADX,GAIX5C,SAAU,SAAUC,EAAOC,EAASC,GAChC,OAAIF,EAAQ,GACD,OACAA,EAAQ,GACR,QACAA,EAAQ,GACR,OAEA,SAGfU,SAAU,CACNC,QAAS,sBACTC,QAAS,mBACTC,SAAU,kBACVC,QAAS,qBACTC,SAAU,uBACVC,SAAU,KAEdC,aAAc,CACVC,OAAQ,WACRC,KAAM,eACNx0C,EAAG,iBACHy0C,GAAI,WACJ78C,EAAG,UACH88C,GAAI,WACJC,EAAG,QACHC,GAAI,SACJ74B,EAAG,SACH84B,GAAI,UACJC,EAAG,UACHC,GAAI,WACJC,EAAG,UACHC,GAAI,YAERI,KAAM,CACFC,IAAK,EACLC,IAAK,KAzEyBzyD,CAAQ,EAAQ,2FCElD,SAAWkiD,GAAU,aAIzB,SAASyT,EAAOt1C,GACZ,OAAIA,EAAI,KAAQ,IAELA,EAAI,IAAO,EAK1B,SAASi1C,EAAUhD,EAAQQ,EAAentD,EAAKotD,GAC3C,IAAI3sD,EAASksD,EAAS,IACtB,OAAQ3sD,GACJ,IAAK,IACD,OAAOmtD,GAAiBC,EAClB,mBACA,mBACV,IAAK,KACD,OAAI4C,EAAOrD,GAEHlsD,GACC0sD,GAAiBC,EAAW,WAAa,YAG3C3sD,EAAS,UACpB,IAAK,IACD,OAAO0sD,EAAgB,SAAW,SACtC,IAAK,KACD,OAAI6C,EAAOrD,GAEHlsD,GAAU0sD,GAAiBC,EAAW,UAAY,WAE/CD,EACA1sD,EAAS,SAEbA,EAAS,SACpB,IAAK,KACD,OAAIuvD,EAAOrD,GAEHlsD,GACC0sD,GAAiBC,EACZ,gBACA,iBAGP3sD,EAAS,cACpB,IAAK,IACD,OAAI0sD,EACO,QAEJC,EAAW,MAAQ,OAC9B,IAAK,KACD,OAAI4C,EAAOrD,GACHQ,EACO1sD,EAAS,QAEbA,GAAU2sD,EAAW,OAAS,SAC9BD,EACA1sD,EAAS,QAEbA,GAAU2sD,EAAW,MAAQ,QACxC,IAAK,IACD,OAAID,EACO,UAEJC,EAAW,QAAU,SAChC,IAAK,KACD,OAAI4C,EAAOrD,GACHQ,EACO1sD,EAAS,UAEbA,GAAU2sD,EAAW,SAAW,WAChCD,EACA1sD,EAAS,UAEbA,GAAU2sD,EAAW,QAAU,UAC1C,IAAK,IACD,OAAOD,GAAiBC,EAAW,KAAO,MAC9C,IAAK,KACD,OAAI4C,EAAOrD,GACAlsD,GAAU0sD,GAAiBC,EAAW,KAAO,QAEjD3sD,GAAU0sD,GAAiBC,EAAW,KAAO,QAIvD7Q,EAAO4N,aAAa,KAAM,CAC/BC,OAAQ,oFAAoFntC,MACxF,KAEJotC,YAAa,kDAAkDptC,MAAM,KACrEqtC,SAAU,mFAAmFrtC,MACzF,KAEJstC,cAAe,8BAA8BttC,MAAM,KACnDutC,YAAa,uBAAuBvtC,MAAM,KAC1C8tC,eAAgB,CACZC,GAAI,OACJC,IAAK,UACLC,EAAG,aACHC,GAAI,eACJC,IAAK,0BACLC,KAAM,iCAEVC,SAAU,CACNC,QAAS,iBACTC,QAAS,oBACTC,SAAU,gBACVC,QAAS,iBACTC,SAAU,0BACVC,SAAU,KAEdC,aAAc,CACVC,OAAQ,WACRC,KAAM,iBACNx0C,EAAGo4C,EACH3D,GAAI2D,EACJxgD,EAAGwgD,EACH1D,GAAI0D,EACJzD,EAAG,cACHC,GAAIwD,EACJr8B,EAAGq8B,EACHvD,GAAIuD,EACJtD,EAAGsD,EACHrD,GAAIqD,EACJpD,EAAGoD,EACHnD,GAAImD,GAERlD,uBAAwB,YACxBC,QAAS,MACTE,KAAM,CACFC,IAAK,EACLC,IAAK,KAzIyBzyD,CAAQ,EAAQ,8FCGlD,SAAWkiD,GAAU,aAIdA,EAAO4N,aAAa,QAAS,CACpCC,OAAQ,gGAAgGntC,MACpG,KAEJotC,YAAa,kDAAkDptC,MAAM,KACrEqtC,SAAU,2DAA2DrtC,MACjE,KAEJstC,cAAe,8BAA8BttC,MAAM,KACnDutC,YAAa,uBAAuBvtC,MAAM,KAC1C8tC,eAAgB,CACZC,GAAI,QACJC,IAAK,WACLC,EAAG,aACHC,GAAI,cACJC,IAAK,oBACLC,KAAM,0BAEVC,SAAU,CACNC,QAAS,iBACTC,QAAS,mBACTC,SAAU,iBACVC,QAAS,iBACTC,SAAU,WACN,OAAQxxD,KAAKg0D,OACT,KAAK,EACD,MAAO,6BACX,QACI,MAAO,+BAGnBvC,SAAU,KAEdC,aAAc,CACVC,OAAQ,SAAUv0C,GACd,OAAQ,YAAY+F,KAAK/F,GAAK,MAAQ,MAAQ,IAAMA,GAExDw0C,KAAM,QACNx0C,EAAG,iBACHy0C,GAAI,aACJ78C,EAAG,YACH88C,GAAI,YACJC,EAAG,SACHC,GAAI,SACJ74B,EAAG,YACH84B,GAAI,YACJC,EAAG,UACHC,GAAI,UACJC,EAAG,UACHC,GAAI,WAERC,uBAAwB,WACxBC,QAAS,MACTE,KAAM,CACFC,IAAK,EACLC,IAAK,KA9DyBzyD,CAAQ,EAAQ,2FCKlD,SAAWkiD,GAAU,aAIhBA,EAAO4N,aAAa,KAAM,CAC/BC,OAAQ,gGAAgGntC,MACpG,KAEJotC,YAAa,kDAAkDptC,MAAM,KACrEqtC,SAAU,2DAA2DrtC,MACjE,KAEJstC,cAAe,8BAA8BttC,MAAM,KACnDutC,YAAa,uBAAuBvtC,MAAM,KAC1C8tC,eAAgB,CACZC,GAAI,QACJC,IAAK,WACLC,EAAG,aACHC,GAAI,cACJC,IAAK,oBACLC,KAAM,0BAEVC,SAAU,CACNC,QAAS,WACL,MACI,WACCpxD,KAAKywD,QAAU,EAAI,OAA0B,IAAjBzwD,KAAKywD,QAAgB,IAAM,OACxD,OAGRY,QAAS,WACL,MACI,aACCrxD,KAAKywD,QAAU,EAAI,OAA0B,IAAjBzwD,KAAKywD,QAAgB,IAAM,OACxD,OAGRa,SAAU,WACN,MACI,WACCtxD,KAAKywD,QAAU,EAAI,OAA0B,IAAjBzwD,KAAKywD,QAAgB,IAAM,OACxD,OAGRc,QAAS,WACL,MACI,WACCvxD,KAAKywD,QAAU,EAAI,OAA0B,IAAjBzwD,KAAKywD,QAAgB,IAAM,OACxD,OAGRe,SAAU,WACN,OAAQxxD,KAAKg0D,OACT,KAAK,EACD,MACI,uBACCh0D,KAAKywD,QAAU,EACV,OACiB,IAAjBzwD,KAAKywD,QACL,IACA,OACN,MAER,QACI,MACI,uBACCzwD,KAAKywD,QAAU,EACV,OACiB,IAAjBzwD,KAAKywD,QACL,IACA,OACN,QAIhBgB,SAAU,KAEdC,aAAc,CACVC,OAAQ,SACRC,KAAM,QACNx0C,EAAG,iBACHy0C,GAAI,aACJ78C,EAAG,YACH88C,GAAI,YACJC,EAAG,SACHC,GAAI,SACJ74B,EAAG,YACH84B,GAAI,YACJiC,EAAG,gBACHC,GAAI,eACJjC,EAAG,UACHC,GAAI,UACJC,EAAG,UACHC,GAAI,WAERC,uBAAwB,WACxBC,QAAS,MACTE,KAAM,CACFC,IAAK,EACLC,IAAK,KAtGyBzyD,CAAQ,EAAQ,2FCClD,SAAWkiD,GAAU,aAIhBA,EAAO4N,aAAa,KAAM,CAC/BgH,KAAM,CACF,CACIC,MAAO,aACPC,OAAQ,EACR1xD,KAAM,KACN2xD,OAAQ,IACRC,KAAM,KAEV,CACIH,MAAO,aACPI,MAAO,aACPH,OAAQ,EACR1xD,KAAM,KACN2xD,OAAQ,IACRC,KAAM,KAEV,CACIH,MAAO,aACPI,MAAO,aACPH,OAAQ,EACR1xD,KAAM,KACN2xD,OAAQ,IACRC,KAAM,KAEV,CACIH,MAAO,aACPI,MAAO,aACPH,OAAQ,EACR1xD,KAAM,KACN2xD,OAAQ,IACRC,KAAM,KAEV,CACIH,MAAO,aACPI,MAAO,aACPH,OAAQ,EACR1xD,KAAM,KACN2xD,OAAQ,IACRC,KAAM,KAEV,CACIH,MAAO,aACPI,MAAO,aACPH,OAAQ,EACR1xD,KAAM,KACN2xD,OAAQ,KACRC,KAAM,MAEV,CACIH,MAAO,aACPI,OAAO,IACPH,OAAQ,EACR1xD,KAAM,MACN2xD,OAAQ,KACRC,KAAM,OAGdE,oBAAqB,WACrBC,oBAAqB,SAAU3kD,EAAOoJ,GAClC,MAAoB,MAAbA,EAAM,GAAa,EAAIqN,SAASrN,EAAM,IAAMpJ,EAAO,KAE9Dq9C,OAAQ,yCAAyCntC,MAAM,KACvDotC,YAAa,yCAAyCptC,MAClD,KAEJqtC,SAAU,8BAA8BrtC,MAAM,KAC9CstC,cAAe,gBAAgBttC,MAAM,KACrCutC,YAAa,gBAAgBvtC,MAAM,KACnC8tC,eAAgB,CACZC,GAAI,QACJC,IAAK,WACLC,EAAG,aACHC,GAAI,YACJC,IAAK,kBACLC,KAAM,uBACNz+B,EAAG,aACHgjC,GAAI,YACJC,IAAK,kBACLC,KAAM,wBAEVrF,cAAe,SACfC,KAAM,SAAU39C,GACZ,MAAiB,OAAVA,GAEX49C,SAAU,SAAU4C,EAAMC,EAAQ1C,GAC9B,OAAIyC,EAAO,GACA,KAEA,MAGfjC,SAAU,CACNC,QAAS,UACTC,QAAS,UACTC,SAAU,SAAUkG,GAChB,OAAIA,EAAI/E,SAAWzyD,KAAKyyD,OACb,cAEA,WAGflB,QAAS,UACTC,SAAU,SAAUgG,GAChB,OAAIx3D,KAAKyyD,SAAW+E,EAAI/E,OACb,cAEA,WAGfhB,SAAU,KAEda,uBAAwB,WACxBC,QAAS,SAAUC,EAAQyB,GACvB,OAAQA,GACJ,IAAK,IACD,OAAkB,IAAXzB,EAAe,KAAOA,EAAS,IAC1C,IAAK,IACL,IAAK,IACL,IAAK,MACD,OAAOA,EAAS,IACpB,QACI,OAAOA,IAGnBd,aAAc,CACVC,OAAQ,MACRC,KAAM,MACNx0C,EAAG,KACHy0C,GAAI,MACJ78C,EAAG,KACH88C,GAAI,MACJC,EAAG,MACHC,GAAI,OACJ74B,EAAG,KACH84B,GAAI,MACJC,EAAG,MACHC,GAAI,OACJC,EAAG,KACHC,GAAI,SAlJ0BnyD,CAAQ,EAAQ,2FCIlD,SAAWkiD,GAAU,aAIhBA,EAAO4N,aAAa,KAAM,CAC/BC,OAAQ,yFAAyFntC,MAC7F,KAEJotC,YAAa,kDAAkDptC,MAAM,KACrEqtC,SAAU,+CAA+CrtC,MAAM,KAC/DstC,cAAe,8BAA8BttC,MAAM,KACnDutC,YAAa,uBAAuBvtC,MAAM,KAC1C8tC,eAAgB,CACZC,GAAI,QACJC,IAAK,WACLC,EAAG,aACHC,GAAI,cACJC,IAAK,4BACLC,KAAM,mCAEVZ,cAAe,6BACfgE,aAAc,SAAUlB,EAAM5C,GAI1B,OAHa,KAAT4C,IACAA,EAAO,GAEM,WAAb5C,EACO4C,EACa,WAAb5C,EACA4C,GAAQ,GAAKA,EAAOA,EAAO,GACd,WAAb5C,GAAsC,UAAbA,EACzB4C,EAAO,QADX,GAIX5C,SAAU,SAAUC,EAAOC,EAASC,GAChC,OAAIF,EAAQ,GACD,SACAA,EAAQ,GACR,SACAA,EAAQ,GACR,SAEA,SAGfU,SAAU,CACNC,QAAS,2BACTC,QAAS,sBACTC,SAAU,kBACVC,QAAS,wBACTC,SAAU,4BACVC,SAAU,KAEdC,aAAc,CACVC,OAAQ,gBACRC,KAAM,uBACNx0C,EAAG,kBACHy0C,GAAI,WACJ78C,EAAG,kBACH88C,GAAI,WACJC,EAAG,gBACHC,GAAI,SACJ74B,EAAG,WACH84B,GAAI,YACJC,EAAG,UACHC,GAAI,WACJC,EAAG,SACHC,GAAI,WAERI,KAAM,CACFC,IAAK,EACLC,IAAK,KAzEyBzyD,CAAQ,EAAQ,2FCElD,SAAWkiD,GAAU,aAIhBA,EAAO4N,aAAa,KAAM,CAC/BC,OAAQ,qGAAqGntC,MACzG,KAEJotC,YAAa,kDAAkDptC,MAAM,KACrEqtC,SAAU,CACN2D,WAAY,gEAAgEhxC,MACxE,KAEJ8E,OAAQ,iEAAiE9E,MACrE,KAEJixC,SAAU,iBAEd3D,cAAe,8BAA8BttC,MAAM,KACnDutC,YAAa,uBAAuBvtC,MAAM,KAC1C8tC,eAAgB,CACZC,GAAI,QACJC,IAAK,WACLC,EAAG,aACHC,GAAI,cACJC,IAAK,oBACLC,KAAM,2BAEVC,SAAU,CACNC,QAAS,iBACTC,QAAS,iBACTE,QAAS,kBACTD,SAAU,wBACVE,SAAU,oBACVC,SAAU,KAEdC,aAAc,CACVC,OAAQ,SAAUv0C,GACd,OAAOA,EAAErI,QAAQ,iCAAiC,SAC9C0iD,EACAxwC,EACAywC,GAEA,MAAc,MAAPA,EAAazwC,EAAK,KAAOA,EAAKywC,EAAK,SAGlD9F,KAAM,SAAUx0C,GACZ,MAAI,4BAA4B+F,KAAK/F,GAC1BA,EAAErI,QAAQ,SAAU,UAE3B,OAAOoO,KAAK/F,GACLA,EAAErI,QAAQ,QAAS,YAEvBqI,GAEXA,EAAG,iBACHy0C,GAAI,UACJ78C,EAAG,OACH88C,GAAI,UACJC,EAAG,QACHC,GAAI,WACJ74B,EAAG,MACH84B,GAAI,SACJC,EAAG,MACHC,GAAI,SACJC,EAAG,OACHC,GAAI,WAERC,uBAAwB,8BACxBC,QAAS,SAAUC,GACf,OAAe,IAAXA,EACOA,EAEI,IAAXA,EACOA,EAAS,MAGhBA,EAAS,IACRA,GAAU,KAAOA,EAAS,IAAO,GAClCA,EAAS,KAAQ,EAEV,MAAQA,EAEZA,EAAS,MAEpBC,KAAM,CACFC,IAAK,EACLC,IAAK,KA1FyBzyD,CAAQ,EAAQ,2FCGlD,SAAWkiD,GAAU,aAIzB,IAAIsR,EAAW,CACX,EAAG,MACH,EAAG,MACH,EAAG,MACH,EAAG,MACH,EAAG,MACH,EAAG,MACH,EAAG,MACH,EAAG,MACH,EAAG,MACH,EAAG,MACH,GAAI,MACJ,GAAI,MACJ,GAAI,MACJ,GAAI,MACJ,GAAI,MACJ,GAAI,MACJ,GAAI,MACJ,GAAI,MACJ,GAAI,MACJ,IAAK,OAGAtR,EAAO4N,aAAa,KAAM,CAC/BC,OAAQ,qFAAqFntC,MACzF,KAEJotC,YAAa,kDAAkDptC,MAAM,KACrEqtC,SAAU,0DAA0DrtC,MAChE,KAEJstC,cAAe,8BAA8BttC,MAAM,KACnDutC,YAAa,uBAAuBvtC,MAAM,KAC1C8tC,eAAgB,CACZC,GAAI,QACJC,IAAK,WACLC,EAAG,aACHC,GAAI,cACJC,IAAK,oBACLC,KAAM,2BAEVC,SAAU,CACNC,QAAS,mBACTC,QAAS,mBACTC,SAAU,kBACVC,QAAS,kBACTC,SAAU,kCACVC,SAAU,KAEdC,aAAc,CACVC,OAAQ,YACRC,KAAM,WACNx0C,EAAG,iBACHy0C,GAAI,YACJ78C,EAAG,YACH88C,GAAI,WACJC,EAAG,YACHC,GAAI,WACJ74B,EAAG,UACH84B,GAAI,SACJC,EAAG,SACHC,GAAI,QACJC,EAAG,UACHC,GAAI,UAERC,uBAAwB,kBACxBC,QAAS,SAAUC,GAGf,OAAOA,GAAUkB,EAASlB,IAAWkB,EAF7BlB,EAAS,KAEmCkB,EAD5ClB,GAAU,IAAM,IAAM,QAGlCC,KAAM,CACFC,IAAK,EACLC,IAAK,KAhFyBzyD,CAAQ,EAAQ,2FCGlD,SAAWkiD,GAAU,aAIzB,IAAImR,EAAY,CACR,EAAG,IACH,EAAG,IACH,EAAG,IACH,EAAG,IACH,EAAG,IACH,EAAG,IACH,EAAG,IACH,EAAG,IACH,EAAG,IACH,EAAG,KAEPE,EAAY,CACR,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,KAGJrR,EAAO4N,aAAa,KAAM,CAC/BC,OAAQ,yEAAyEntC,MAC7E,KAEJotC,YAAa,yEAAyEptC,MAClF,KAEJqtC,SAAU,iDAAiDrtC,MAAM,KACjEstC,cAAe,oBAAoBttC,MAAM,KACzCutC,YAAa,oBAAoBvtC,MAAM,KACvCqwC,oBAAoB,EACpBvC,eAAgB,CACZC,GAAI,QACJC,IAAK,WACLC,EAAG,aACHC,GAAI,cACJC,IAAK,oBACLC,KAAM,2BAEVZ,cAAe,cACfC,KAAM,SAAU39C,GACZ,MAAiB,UAAVA,GAEX49C,SAAU,SAAU4C,EAAMC,EAAQ1C,GAC9B,OAAIyC,EAAO,GACA,QAEA,SAGfjC,SAAU,CACNC,QAAS,oBACTC,QAAS,kBACTC,SAAU,iBACVC,QAAS,qBACTC,SAAU,8BACVC,SAAU,KAEdC,aAAc,CACVC,OAAQ,QACRC,KAAM,QACNx0C,EAAG,iBACHy0C,GAAI,YACJ78C,EAAG,UACH88C,GAAI,UACJC,EAAG,UACHC,GAAI,UACJ74B,EAAG,UACH84B,GAAI,UACJC,EAAG,QACHC,GAAI,QACJC,EAAG,WACHC,GAAI,YAERC,uBAAwB,YACxBC,QAAS,OACTiB,SAAU,SAAUjuD,GAChB,OAAOA,EAAOwP,QAAQ,iBAAiB,SAAUiH,GAC7C,OAAOy3C,EAAUz3C,OAGzBs3C,WAAY,SAAU/tD,GAClB,OAAOA,EAAOwP,QAAQ,OAAO,SAAUiH,GACnC,OAAOu3C,EAAUv3C,OAGzBy2C,KAAM,CACFC,IAAK,EACLC,IAAK,KApGyBzyD,CAAQ,EAAQ,2FCGlD,SAAWkiD,GAAU,aAIzB,IAAImR,EAAY,CACR,EAAG,IACH,EAAG,IACH,EAAG,IACH,EAAG,IACH,EAAG,IACH,EAAG,IACH,EAAG,IACH,EAAG,IACH,EAAG,IACH,EAAG,KAEPE,EAAY,CACR,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,KAGJrR,EAAO4N,aAAa,KAAM,CAC/BC,OAAQ,6FAA6FntC,MACjG,KAEJotC,YAAa,2EAA2EptC,MACpF,KAEJ0xC,kBAAkB,EAClBrE,SAAU,0DAA0DrtC,MAChE,KAEJstC,cAAe,qCAAqCttC,MAAM,KAC1DutC,YAAa,wBAAwBvtC,MAAM,KAC3C8tC,eAAgB,CACZC,GAAI,SACJC,IAAK,YACLC,EAAG,aACHC,GAAI,cACJC,IAAK,sBACLC,KAAM,6BAEVC,SAAU,CACNC,QAAS,YACTC,QAAS,YACTC,SAAU,WACVC,QAAS,cACTC,SAAU,oBACVC,SAAU,KAEdC,aAAc,CACVC,OAAQ,UACRC,KAAM,WACNx0C,EAAG,gBACHy0C,GAAI,gBACJ78C,EAAG,aACH88C,GAAI,WACJC,EAAG,YACHC,GAAI,UACJ74B,EAAG,WACH84B,GAAI,SACJC,EAAG,cACHC,GAAI,YACJC,EAAG,YACHC,GAAI,WAERmB,SAAU,SAAUjuD,GAChB,OAAOA,EAAOwP,QAAQ,iBAAiB,SAAUiH,GAC7C,OAAOy3C,EAAUz3C,OAGzBs3C,WAAY,SAAU/tD,GAClB,OAAOA,EAAOwP,QAAQ,OAAO,SAAUiH,GACnC,OAAOu3C,EAAUv3C,OAGzBs0C,cAAe,gCACfgE,aAAc,SAAUlB,EAAM5C,GAI1B,OAHa,KAAT4C,IACAA,EAAO,GAEM,WAAb5C,EACO4C,EAAO,EAAIA,EAAOA,EAAO,GACZ,aAAb5C,EACA4C,EACa,aAAb5C,EACA4C,GAAQ,GAAKA,EAAOA,EAAO,GACd,SAAb5C,EACA4C,EAAO,QADX,GAIX5C,SAAU,SAAU4C,EAAMC,EAAQ1C,GAC9B,OAAIyC,EAAO,EACA,SACAA,EAAO,GACP,WACAA,EAAO,GACP,WACAA,EAAO,GACP,OAEA,UAGfd,uBAAwB,eACxBC,QAAS,SAAUC,GACf,OAAOA,EAAS,OAEpBC,KAAM,CACFC,IAAK,EACLC,IAAK,KAzHyBzyD,CAAQ,EAAQ,2FCIlD,SAAWkiD,GAAU,aAIhBA,EAAO4N,aAAa,KAAM,CAC/BC,OAAQ,yCAAyCntC,MAAM,KACvDotC,YAAa,yCAAyCptC,MAClD,KAEJqtC,SAAU,8BAA8BrtC,MAAM,KAC9CstC,cAAe,gBAAgBttC,MAAM,KACrCutC,YAAa,gBAAgBvtC,MAAM,KACnC8tC,eAAgB,CACZC,GAAI,SACJC,IAAK,YACLC,EAAG,cACHC,GAAI,gBACJC,IAAK,uBACLC,KAAM,4BACNz+B,EAAG,cACHgjC,GAAI,gBACJC,IAAK,uBACLC,KAAM,6BAEVxE,SAAU,CACNC,QAAS,QACTC,QAAS,QACTC,SAAU,UACVC,QAAS,QACTC,SAAU,cACVC,SAAU,KAEdC,aAAc,CACVC,OAAQ,OACRC,KAAM,OACNx0C,EAAG,MACHy0C,GAAI,MACJ78C,EAAG,KACH88C,GAAI,MACJC,EAAG,OACHC,GAAI,OACJ74B,EAAG,KACH84B,GAAI,MACJC,EAAG,MACHC,GAAI,MACJC,EAAG,MACHC,GAAI,OAERC,uBAAwB,iBACxBC,QAAS,SAAUC,EAAQyB,GACvB,OAAQA,GACJ,IAAK,IACL,IAAK,IACL,IAAK,MACD,OAAOzB,EAAS,IACpB,IAAK,IACD,OAAOA,EAAS,IACpB,IAAK,IACL,IAAK,IACD,OAAOA,EAAS,IACpB,QACI,OAAOA,IAGnBlC,cAAe,QACfC,KAAM,SAAUhvC,GACZ,MAAiB,OAAVA,GAEXivC,SAAU,SAAU4C,EAAMC,EAAQsE,GAC9B,OAAOvE,EAAO,GAAK,KAAO,QAxEIlzD,CAAQ,EAAQ,2FCElD,SAAWkiD,GAAU,aAIzB,IAAImR,EAAY,CACR,EAAG,IACH,EAAG,IACH,EAAG,IACH,EAAG,IACH,EAAG,IACH,EAAG,IACH,EAAG,IACH,EAAG,IACH,EAAG,IACH,EAAG,KAEPE,EAAY,CACR,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,KAETxD,EAAS,CACL,eACA,QACA,QACA,QACA,QACA,WACA,SACA,MACA,UACA,eACA,eACA,gBAGC7N,EAAO4N,aAAa,KAAM,CAC/BC,OAAQA,EACRC,YAAaD,EACbE,SAAU,0EAA0ErtC,MAChF,KAEJstC,cAAe,2DAA2DttC,MACtE,KAEJutC,YAAa,gBAAgBvtC,MAAM,KACnCqwC,oBAAoB,EACpBvC,eAAgB,CACZC,GAAI,QACJC,IAAK,WACLC,EAAG,aACHC,GAAI,cACJC,IAAK,oBACLC,KAAM,2BAEVZ,cAAe,kBACfC,KAAM,SAAU39C,GACZ,MAAO,UAAUuQ,KAAKvQ,IAE1B49C,SAAU,SAAU4C,EAAMC,EAAQ1C,GAC9B,OAAIyC,EAAO,GACA,UAEA,WAGfjC,SAAU,CACNC,QAAS,sBACTC,QAAS,uBACTC,SAAU,oBACVC,QAAS,qBACTC,SAAU,oBACVC,SAAU,KAEdC,aAAc,CACVC,OAAQ,SACRC,KAAM,KACNx0C,EAAG,kBACHy0C,GAAI,WACJ78C,EAAG,cACH88C,GAAI,YACJC,EAAG,eACHC,GAAI,aACJ74B,EAAG,WACH84B,GAAI,SACJC,EAAG,YACHC,GAAI,UACJC,EAAG,WACHC,GAAI,UAERmB,SAAU,SAAUjuD,GAChB,OAAOA,EACFwP,QAAQ,iBAAiB,SAAUiH,GAChC,OAAOy3C,EAAUz3C,MAEpBjH,QAAQ,KAAM,MAEvBu+C,WAAY,SAAU/tD,GAClB,OAAOA,EACFwP,QAAQ,OAAO,SAAUiH,GACtB,OAAOu3C,EAAUv3C,MAEpBjH,QAAQ,KAAM,MAEvB09C,KAAM,CACFC,IAAK,EACLC,IAAK,MApHyBzyD,CAAQ,EAAQ,2FCGlD,SAAWkiD,GAAU,aAIzB,IAAIsR,EAAW,CACX,EAAG,MACH,EAAG,MACH,EAAG,MACH,EAAG,MACH,EAAG,MACH,EAAG,MACH,EAAG,MACH,EAAG,MACH,EAAG,MACH,EAAG,MACH,GAAI,MACJ,GAAI,MACJ,GAAI,MACJ,GAAI,MACJ,GAAI,MACJ,GAAI,MACJ,GAAI,MACJ,GAAI,MACJ,GAAI,MACJ,IAAK,OAGAtR,EAAO4N,aAAa,KAAM,CAC/BC,OAAQ,kFAAkFntC,MACtF,KAEJotC,YAAa,qDAAqDptC,MAC9D,KAEJqtC,SAAU,2DAA2DrtC,MACjE,KAEJstC,cAAe,8BAA8BttC,MAAM,KACnDutC,YAAa,uBAAuBvtC,MAAM,KAC1C8tC,eAAgB,CACZC,GAAI,QACJC,IAAK,WACLC,EAAG,aACHC,GAAI,cACJC,IAAK,oBACLC,KAAM,2BAEVC,SAAU,CACNC,QAAS,kBACTC,QAAS,kBACTC,SAAU,iBACVC,QAAS,kBACTC,SAAU,wCACVC,SAAU,KAEdC,aAAc,CACVC,OAAQ,YACRC,KAAM,WACNx0C,EAAG,iBACHy0C,GAAI,YACJ78C,EAAG,YACH88C,GAAI,WACJC,EAAG,WACHC,GAAI,UACJ74B,EAAG,UACH84B,GAAI,SACJC,EAAG,SACHC,GAAI,QACJC,EAAG,UACHC,GAAI,UAERC,uBAAwB,wBACxBC,QAAS,SAAUC,GAGf,OAAOA,GAAUkB,EAASlB,IAAWkB,EAF7BlB,EAAS,KAEmCkB,EAD5ClB,GAAU,IAAM,IAAM,QAGlCC,KAAM,CACFC,IAAK,EACLC,IAAK,KAlFyBzyD,CAAQ,EAAQ,2FCIlD,SAAWkiD,GAAU,aAIzB,SAAS0T,EAAoBtD,EAAQQ,EAAentD,EAAKotD,GACrD,IAAIrrC,EAAS,CACT5S,EAAG,CAAC,aAAc,gBAClB+8C,EAAG,CAAC,YAAa,eACjB54B,EAAG,CAAC,UAAW,aACf+4B,EAAG,CAAC,WAAY,eAChBE,EAAG,CAAC,UAAW,eAEnB,OAAOY,EAAgBprC,EAAO/hB,GAAK,GAAK+hB,EAAO/hB,GAAK,GAuBxD,SAAS+xD,EAA4BpF,GAEjC,GADAA,EAASnpC,SAASmpC,EAAQ,IACtBlpC,MAAMkpC,GACN,OAAO,EAEX,GAAIA,EAAS,EAET,OAAO,EACJ,GAAIA,EAAS,GAEhB,OAAI,GAAKA,GAAUA,GAAU,EAI1B,GAAIA,EAAS,IAAK,CAErB,IAAI4B,EAAY5B,EAAS,GAEzB,OACWoF,EADO,IAAdxD,EADa5B,EAAS,GAIS4B,GAChC,GAAI5B,EAAS,IAAO,CAEvB,KAAOA,GAAU,IACbA,GAAkB,GAEtB,OAAOoF,EAA4BpF,GAInC,OAAOoF,EADPpF,GAAkB,KAKjBpQ,EAAO4N,aAAa,KAAM,CAC/BC,OAAQ,uFAAuFntC,MAC3F,KAEJotC,YAAa,+DAA+DptC,MACxE,KAEJ0xC,kBAAkB,EAClBrE,SAAU,mEAAmErtC,MACzE,KAEJstC,cAAe,8BAA8BttC,MAAM,KACnDutC,YAAa,uBAAuBvtC,MAAM,KAC1CqwC,oBAAoB,EACpBvC,eAAgB,CACZC,GAAI,cACJC,IAAK,iBACLC,EAAG,aACHC,GAAI,eACJC,IAAK,2BACLC,KAAM,kCAEVC,SAAU,CACNC,QAAS,eACTK,SAAU,IACVJ,QAAS,eACTC,SAAU,eACVC,QAAS,mBACTC,SAAU,WAEN,OAAQxxD,KAAKg0D,OACT,KAAK,EACL,KAAK,EACD,MAAO,0BACX,QACI,MAAO,4BAIvBtC,aAAc,CACVC,OAhGR,SAA2BpsD,GAEvB,OAAIqyD,EADSryD,EAAOwhB,OAAO,EAAGxhB,EAAO2I,QAAQ,OAElC,KAAO3I,EAEX,MAAQA,GA4FXqsD,KA1FR,SAAyBrsD,GAErB,OAAIqyD,EADSryD,EAAOwhB,OAAO,EAAGxhB,EAAO2I,QAAQ,OAElC,QAAU3I,EAEd,SAAWA,GAsFd6X,EAAG,kBACHy0C,GAAI,cACJ78C,EAAG8gD,EACHhE,GAAI,cACJC,EAAG+D,EACH9D,GAAI,aACJ74B,EAAG28B,EACH7D,GAAI,UACJC,EAAG4D,EACH3D,GAAI,WACJC,EAAG0D,EACHzD,GAAI,WAERC,uBAAwB,YACxBC,QAAS,MACTE,KAAM,CACFC,IAAK,EACLC,IAAK,KApIyBzyD,CAAQ,EAAQ,2FCElD,SAAWkiD,GAAU,aAIhBA,EAAO4N,aAAa,KAAM,CAC/BC,OAAQ,6EAA6EntC,MACjF,KAEJotC,YAAa,6EAA6EptC,MACtF,KAEJqtC,SAAU,sCAAsCrtC,MAAM,KACtDstC,cAAe,oCAAoCttC,MAAM,KACzDutC,YAAa,mBAAmBvtC,MAAM,KACtCqwC,oBAAoB,EACpBvC,eAAgB,CACZC,GAAI,QACJC,IAAK,WACLC,EAAG,aACHC,GAAI,cACJC,IAAK,oBACLC,KAAM,6BAEVZ,cAAe,kBACfC,KAAM,SAAU39C,GACZ,MAAiB,WAAVA,GAEX49C,SAAU,SAAU4C,EAAMC,EAAQ1C,GAC9B,OAAIyC,EAAO,GACA,WAEA,UAGfjC,SAAU,CACNC,QAAS,kBACTC,QAAS,mBACTC,SAAU,wBACVC,QAAS,qBACTC,SAAU,4BACVC,SAAU,KAEdC,aAAc,CACVC,OAAQ,SACRC,KAAM,WACNx0C,EAAG,mBACHy0C,GAAI,YACJ78C,EAAG,SACH88C,GAAI,UACJC,EAAG,YACHC,GAAI,aACJ74B,EAAG,QACH84B,GAAI,SACJC,EAAG,UACHC,GAAI,WACJC,EAAG,OACHC,GAAI,SAERC,uBAAwB,eACxBC,QAAS,SAAUC,GACf,MAAO,MAAQA,KA/DetyD,CAAQ,EAAQ,2FCGlD,SAAWkiD,GAAU,aAIzB,IAAIyV,EAAQ,CACRhG,GAAI,6BACJ78C,EAAG,wBACH88C,GAAI,0BACJC,EAAG,2BACHC,GAAI,4BACJ74B,EAAG,qBACH84B,GAAI,sBACJC,EAAG,uBACHC,GAAI,4BACJC,EAAG,mBACHC,GAAI,oBASR,SAASyF,EAAkBtF,EAAQQ,EAAentD,EAAKotD,GACnD,OAAOD,EACDa,EAAMhuD,GAAK,GACXotD,EACAY,EAAMhuD,GAAK,GACXguD,EAAMhuD,GAAK,GAErB,SAASkyD,EAAQvF,GACb,OAAOA,EAAS,IAAO,GAAMA,EAAS,IAAMA,EAAS,GAEzD,SAASqB,EAAMhuD,GACX,OAAOgyD,EAAMhyD,GAAKid,MAAM,KAE5B,SAAS0yC,EAAUhD,EAAQQ,EAAentD,EAAKotD,GAC3C,IAAI3sD,EAASksD,EAAS,IACtB,OAAe,IAAXA,EAEIlsD,EAASwxD,EAAkBtF,EAAQQ,EAAentD,EAAI,GAAIotD,GAEvDD,EACA1sD,GAAUyxD,EAAQvF,GAAUqB,EAAMhuD,GAAK,GAAKguD,EAAMhuD,GAAK,IAE1DotD,EACO3sD,EAASutD,EAAMhuD,GAAK,GAEpBS,GAAUyxD,EAAQvF,GAAUqB,EAAMhuD,GAAK,GAAKguD,EAAMhuD,GAAK,IAIjEu8C,EAAO4N,aAAa,KAAM,CAC/BC,OAAQ,CACJroC,OAAQ,oGAAoG9E,MACxG,KAEJgxC,WAAY,kGAAkGhxC,MAC1G,KAEJixC,SAAU,+DAEd7D,YAAa,kDAAkDptC,MAAM,KACrEqtC,SAAU,CACNvoC,OAAQ,oFAAoF9E,MACxF,KAEJgxC,WAAY,2FAA2FhxC,MACnG,KAEJixC,SAAU,cAEd3D,cAAe,8BAA8BttC,MAAM,KACnDutC,YAAa,iBAAiBvtC,MAAM,KACpCqwC,oBAAoB,EACpBvC,eAAgB,CACZC,GAAI,QACJC,IAAK,WACLC,EAAG,aACHC,GAAI,wBACJC,IAAK,sCACLC,KAAM,4CACNz+B,EAAG,aACHgjC,GAAI,wBACJC,IAAK,sCACLC,KAAM,4CAEVxE,SAAU,CACNC,QAAS,gBACTC,QAAS,aACTC,SAAU,UACVC,QAAS,aACTC,SAAU,qBACVC,SAAU,KAEdC,aAAc,CACVC,OAAQ,QACRC,KAAM,WACNx0C,EAlFR,SAA0Bo1C,EAAQQ,EAAentD,EAAKotD,GAClD,OAAID,EACO,kBAEAC,EAAW,kBAAoB,mBA+EtCpB,GAAI2D,EACJxgD,EAAG8iD,EACHhG,GAAI0D,EACJzD,EAAG+F,EACH9F,GAAIwD,EACJr8B,EAAG2+B,EACH7F,GAAIuD,EACJtD,EAAG4F,EACH3F,GAAIqD,EACJpD,EAAG0F,EACHzF,GAAImD,GAERlD,uBAAwB,cACxBC,QAAS,SAAUC,GACf,OAAOA,EAAS,QAEpBC,KAAM,CACFC,IAAK,EACLC,IAAK,KAzHyBzyD,CAAQ,EAAQ,2FCIlD,SAAWkiD,GAAU,aAIzB,IAAIyV,EAAQ,CACRhG,GAAI,qCAAqC/uC,MAAM,KAC/C9N,EAAG,iCAAiC8N,MAAM,KAC1CgvC,GAAI,iCAAiChvC,MAAM,KAC3CivC,EAAG,iCAAiCjvC,MAAM,KAC1CkvC,GAAI,iCAAiClvC,MAAM,KAC3CqW,EAAG,6BAA6BrW,MAAM,KACtCmvC,GAAI,6BAA6BnvC,MAAM,KACvCovC,EAAG,iCAAiCpvC,MAAM,KAC1CqvC,GAAI,iCAAiCrvC,MAAM,KAC3CsvC,EAAG,wBAAwBtvC,MAAM,KACjCuvC,GAAI,wBAAwBvvC,MAAM,MAKtC,SAAS8E,EAAOisC,EAAOrB,EAAQQ,GAC3B,OAAIA,EAEOR,EAAS,IAAO,GAAKA,EAAS,KAAQ,GAAKqB,EAAM,GAAKA,EAAM,GAI5DrB,EAAS,IAAO,GAAKA,EAAS,KAAQ,GAAKqB,EAAM,GAAKA,EAAM,GAG3E,SAASF,EAAuBnB,EAAQQ,EAAentD,GACnD,OAAO2sD,EAAS,IAAM5qC,EAAOiwC,EAAMhyD,GAAM2sD,EAAQQ,GAErD,SAASgF,EAAyBxF,EAAQQ,EAAentD,GACrD,OAAO+hB,EAAOiwC,EAAMhyD,GAAM2sD,EAAQQ,GAM7B5Q,EAAO4N,aAAa,KAAM,CAC/BC,OAAQ,uGAAuGntC,MAC3G,KAEJotC,YAAa,kDAAkDptC,MAAM,KACrEqtC,SAAU,0EAA0ErtC,MAChF,KAEJstC,cAAe,kBAAkBttC,MAAM,KACvCutC,YAAa,kBAAkBvtC,MAAM,KACrCqwC,oBAAoB,EACpBvC,eAAgB,CACZC,GAAI,QACJC,IAAK,WACLC,EAAG,cACHC,GAAI,uBACJC,IAAK,8BACLC,KAAM,qCAEVC,SAAU,CACNC,QAAS,uBACTC,QAAS,oBACTC,SAAU,qBACVC,QAAS,sBACTC,SAAU,gCACVC,SAAU,KAEdC,aAAc,CACVC,OAAQ,SACRC,KAAM,WACNx0C,EAlCR,SAAyBo1C,EAAQQ,GAC7B,OAAOA,EAAgB,iBAAmB,kBAkCtCnB,GAAI8B,EACJ3+C,EAAGgjD,EACHlG,GAAI6B,EACJ5B,EAAGiG,EACHhG,GAAI2B,EACJx6B,EAAG6+B,EACH/F,GAAI0B,EACJzB,EAAG8F,EACH7F,GAAIwB,EACJvB,EAAG4F,EACH3F,GAAIsB,GAERrB,uBAAwB,YACxBC,QAAS,MACTE,KAAM,CACFC,IAAK,EACLC,IAAK,KA1FyBzyD,CAAQ,EAAQ,2FCElD,SAAWkiD,GAAU,aAIzB,IAAI6V,EAAa,CACbC,MAAO,CAEHrG,GAAI,CAAC,SAAU,UAAW,WAC1B78C,EAAG,CAAC,cAAe,iBACnB88C,GAAI,CAAC,QAAS,SAAU,UACxBC,EAAG,CAAC,YAAa,eACjBC,GAAI,CAAC,MAAO,OAAQ,QACpBC,GAAI,CAAC,MAAO,OAAQ,QACpBE,GAAI,CAAC,SAAU,UAAW,WAC1BE,GAAI,CAAC,SAAU,SAAU,WAE7B8F,uBAAwB,SAAU3F,EAAQ4F,GACtC,OAAkB,IAAX5F,EACD4F,EAAQ,GACR5F,GAAU,GAAKA,GAAU,EACzB4F,EAAQ,GACRA,EAAQ,IAElB5C,UAAW,SAAUhD,EAAQQ,EAAentD,GACxC,IAAIuyD,EAAUH,EAAWC,MAAMryD,GAC/B,OAAmB,IAAfA,EAAIuJ,OACG4jD,EAAgBoF,EAAQ,GAAKA,EAAQ,GAGxC5F,EACA,IACAyF,EAAWE,uBAAuB3F,EAAQ4F,KAMjDhW,EAAO4N,aAAa,KAAM,CAC/BC,OAAQ,mFAAmFntC,MACvF,KAEJotC,YAAa,2DAA2DptC,MACpE,KAEJ0xC,kBAAkB,EAClBrE,SAAU,4DAA4DrtC,MAClE,KAEJstC,cAAe,qCAAqCttC,MAAM,KAC1DutC,YAAa,uBAAuBvtC,MAAM,KAC1CqwC,oBAAoB,EACpBvC,eAAgB,CACZC,GAAI,OACJC,IAAK,UACLC,EAAG,aACHC,GAAI,eACJC,IAAK,oBACLC,KAAM,2BAEVC,SAAU,CACNC,QAAS,eACTC,QAAS,gBAETC,SAAU,WACN,OAAQtxD,KAAKg0D,OACT,KAAK,EACD,MAAO,wBACX,KAAK,EACD,MAAO,uBACX,KAAK,EACD,MAAO,sBACX,KAAK,EACL,KAAK,EACL,KAAK,EACL,KAAK,EACD,MAAO,oBAGnBzC,QAAS,cACTC,SAAU,WAUN,MATmB,CACf,6BACA,iCACA,4BACA,4BACA,8BACA,2BACA,4BAEgBxxD,KAAKg0D,QAE7BvC,SAAU,KAEdC,aAAc,CACVC,OAAQ,QACRC,KAAM,WACNx0C,EAAG,mBACHy0C,GAAIoG,EAAWzC,UACfxgD,EAAGijD,EAAWzC,UACd1D,GAAImG,EAAWzC,UACfzD,EAAGkG,EAAWzC,UACdxD,GAAIiG,EAAWzC,UACfr8B,EAAG,MACH84B,GAAIgG,EAAWzC,UACftD,EAAG,SACHC,GAAI8F,EAAWzC,UACfpD,EAAG,SACHC,GAAI4F,EAAWzC,WAEnBlD,uBAAwB,YACxBC,QAAS,MACTE,KAAM,CACFC,IAAK,EACLC,IAAK,KApHyBzyD,CAAQ,EAAQ,2FCGlD,SAAWkiD,GAAU,aAIhBA,EAAO4N,aAAa,KAAM,CAC/BC,OAAQ,8IAA8IntC,MAClJ,KAEJotC,YAAa,iEAAiEptC,MAC1E,KAEJiyC,YAAa,yCACbK,kBAAmB,yCACnBb,iBAAkB,yCAClBc,uBAAwB,yCACxBlF,SAAU,kDAAkDrtC,MAAM,KAClEstC,cAAe,wBAAwBttC,MAAM,KAC7CutC,YAAa,wBAAwBvtC,MAAM,KAC3C8tC,eAAgB,CACZC,GAAI,QACJC,IAAK,WACLC,EAAG,aACHC,GAAI,cACJC,IAAK,wBACLC,KAAM,+BAEVC,SAAU,CACNC,QAAS,wBACTC,QAAS,eACTC,SAAU,cACVC,QAAS,iBACTC,SAAU,2BACVC,SAAU,KAEdC,aAAc,CACVC,OAAQ,cACRC,KAAM,WACNx0C,EAAG,mBACHy0C,GAAI,YACJ78C,EAAG,YACH88C,GAAI,YACJC,EAAG,WACHC,GAAI,WACJ74B,EAAG,QACH84B,GAAI,QACJC,EAAG,YACHC,GAAI,YACJC,EAAG,SACHC,GAAI,UAERC,uBAAwB,WACxBC,QAAS,MACTE,KAAM,CACFC,IAAK,EACLC,IAAK,KAzDyBzyD,CAAQ,EAAQ,2FCIlD,SAAWkiD,GAAU,aAIhBA,EAAO4N,aAAa,KAAM,CAC/BC,OAAQ,uFAAuFntC,MAC3F,KAEJotC,YAAa,kDAAkDptC,MAAM,KACrEqtC,SAAU,wDAAwDrtC,MAC9D,KAEJstC,cAAe,8BAA8BttC,MAAM,KACnDutC,YAAa,uBAAuBvtC,MAAM,KAC1C8tC,eAAgB,CACZC,GAAI,OACJC,IAAK,UACLC,EAAG,YACHC,GAAI,cACJC,IAAK,mBACLC,KAAM,0BAEVC,SAAU,CACNC,QAAS,gBACTC,QAAS,eACTC,SAAU,oBACVC,QAAS,gBACTC,SAAU,WACN,OAAQxxD,KAAKg0D,OACT,KAAK,EACL,KAAK,EACL,KAAK,EACD,MAAO,4BACX,KAAK,EACL,KAAK,EACL,KAAK,EACL,KAAK,EACD,MAAO,8BAGnBvC,SAAU,KAEdC,aAAc,CACVC,OAAQ,QACRC,KAAM,UACNx0C,EAAG,kBACHy0C,GAAI,aACJ78C,EAAG,cACH88C,GAAI,YACJC,EAAG,WACHC,GAAI,UACJ74B,EAAG,WACH84B,GAAI,UACJC,EAAG,aACHC,GAAI,YACJC,EAAG,cACHC,GAAI,aAERC,uBAAwB,8BACxBC,QAAS,SAAUC,GACf,IAAI4B,EAAY5B,EAAS,GACrB6B,EAAc7B,EAAS,IAC3B,OAAe,IAAXA,EACOA,EAAS,MACO,IAAhB6B,EACA7B,EAAS,MACT6B,EAAc,IAAMA,EAAc,GAClC7B,EAAS,MACK,IAAd4B,EACA5B,EAAS,MACK,IAAd4B,EACA5B,EAAS,MACK,IAAd4B,GAAiC,IAAdA,EACnB5B,EAAS,MAETA,EAAS,OAGxBC,KAAM,CACFC,IAAK,EACLC,IAAK,KAnFyBzyD,CAAQ,EAAQ,2FCElD,SAAWkiD,GAAU,aAIhBA,EAAO4N,aAAa,KAAM,CAC/BC,OAAQ,yFAAyFntC,MAC7F,KAEJotC,YAAa,yEAAyEptC,MAClF,KAEJ0xC,kBAAkB,EAClBrE,SAAU,wEAAwErtC,MAC9E,KAEJstC,cAAe,2CAA2CttC,MAAM,KAChEutC,YAAa,wBAAwBvtC,MAAM,KAC3C8tC,eAAgB,CACZC,GAAI,aACJC,IAAK,gBACLC,EAAG,aACHC,GAAI,cACJC,IAAK,0BACLC,KAAM,iCAEVC,SAAU,CACNC,QAAS,aACTC,QAAS,YACTC,SAAU,WACVC,QAAS,cACTC,SAAU,oBACVC,SAAU,KAEdC,aAAc,CACVC,OAAQ,aACRC,KAAM,WACNx0C,EAAG,gBACHy0C,GAAI,cACJ78C,EAAG,eACH88C,GAAI,cACJC,EAAG,eACHC,GAAI,cACJ74B,EAAG,YACH84B,GAAI,WACJC,EAAG,WACHC,GAAI,UACJC,EAAG,WACHC,GAAI,WAER/B,cAAe,gDACfgE,aAAc,SAAUlB,EAAM5C,GAI1B,OAHa,KAAT4C,IACAA,EAAO,GAGO,WAAb5C,GAAyB4C,GAAQ,GACrB,iBAAb5C,GACa,eAAbA,EAEO4C,EAAO,GAEPA,GAGf5C,SAAU,SAAU4C,EAAMC,EAAQ1C,GAC9B,OAAIyC,EAAO,EACA,SACAA,EAAO,GACP,SACAA,EAAO,GACP,eACAA,EAAO,GACP,aAEA,YA7EmBlzD,CAAQ,EAAQ,2FCGlD,SAAWkiD,GAAU,aAIzB,SAASoT,EAAUhD,EAAQQ,EAAentD,EAAKotD,GAC3C,OAAQptD,GACJ,IAAK,IACD,OAAOmtD,EAAgB,gBAAkB,kBAC7C,IAAK,KACD,OAAOR,GAAUQ,EAAgB,UAAY,aACjD,IAAK,IACL,IAAK,KACD,OAAOR,GAAUQ,EAAgB,SAAW,YAChD,IAAK,IACL,IAAK,KACD,OAAOR,GAAUQ,EAAgB,OAAS,WAC9C,IAAK,IACL,IAAK,KACD,OAAOR,GAAUQ,EAAgB,QAAU,WAC/C,IAAK,IACL,IAAK,KACD,OAAOR,GAAUQ,EAAgB,OAAS,UAC9C,IAAK,IACL,IAAK,KACD,OAAOR,GAAUQ,EAAgB,OAAS,WAC9C,QACI,OAAOR,GAIVpQ,EAAO4N,aAAa,KAAM,CAC/BC,OAAQ,+LAA+LntC,MACnM,KAEJotC,YAAa,6EAA6EptC,MACtF,KAEJ0xC,kBAAkB,EAClBrE,SAAU,6CAA6CrtC,MAAM,KAC7DstC,cAAe,8BAA8BttC,MAAM,KACnDutC,YAAa,uBAAuBvtC,MAAM,KAC1CqwC,oBAAoB,EACpBvC,eAAgB,CACZC,GAAI,QACJC,IAAK,WACLC,EAAG,aACHC,GAAI,oBACJC,IAAK,0BACLC,KAAM,iCAEVZ,cAAe,SACfC,KAAM,SAAU39C,GACZ,MAAiB,OAAVA,GAEX49C,SAAU,SAAU4C,EAAMC,EAAQ1C,GAC9B,OAAIyC,EAAO,GACA,KAEA,MAGfjC,SAAU,CACNC,QAAS,eACTC,QAAS,eACTC,SAAU,iBACVC,QAAS,eACTC,SAAU,qBACVC,SAAU,KAEdC,aAAc,CACVC,OAAQ,WACRC,KAAM,UACNx0C,EAAGo4C,EACH3D,GAAI2D,EACJxgD,EAAGwgD,EACH1D,GAAI0D,EACJzD,EAAGyD,EACHxD,GAAIwD,EACJr8B,EAAGq8B,EACHvD,GAAIuD,EACJtD,EAAGsD,EACHrD,GAAIqD,EACJpD,EAAGoD,EACHnD,GAAImD,GAERlD,uBAAwB,eACxBC,QAAS,SAAUC,EAAQyB,GACvB,OAAQA,GACJ,IAAK,IACL,IAAK,IACL,IAAK,MACD,OAAOzB,EAAS,QACpB,QACI,OAAOA,MAhGetyD,CAAQ,EAAQ,2FCIlD,SAAWkiD,GAAU,aAIzB,IAAImR,EAAY,CACR,EAAG,IACH,EAAG,IACH,EAAG,IACH,EAAG,IACH,EAAG,IACH,EAAG,IACH,EAAG,IACH,EAAG,IACH,EAAG,IACH,EAAG,KAEPE,EAAY,CACR,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,KAGb,SAAS4E,EAAe7F,EAAQQ,EAAeztD,EAAQ0tD,GACnD,IAAI2C,EAAS,GACb,GAAI5C,EACA,OAAQztD,GACJ,IAAK,IACDqwD,EAAS,aACT,MACJ,IAAK,KACDA,EAAS,WACT,MACJ,IAAK,IACDA,EAAS,WACT,MACJ,IAAK,KACDA,EAAS,YACT,MACJ,IAAK,IACDA,EAAS,SACT,MACJ,IAAK,KACDA,EAAS,SACT,MACJ,IAAK,IACDA,EAAS,UACT,MACJ,IAAK,KACDA,EAAS,UACT,MACJ,IAAK,IACDA,EAAS,WACT,MACJ,IAAK,KACDA,EAAS,WACT,MACJ,IAAK,IACDA,EAAS,UACT,MACJ,IAAK,KACDA,EAAS,gBAIjB,OAAQrwD,GACJ,IAAK,IACDqwD,EAAS,eACT,MACJ,IAAK,KACDA,EAAS,aACT,MACJ,IAAK,IACDA,EAAS,aACT,MACJ,IAAK,KACDA,EAAS,aACT,MACJ,IAAK,IACDA,EAAS,WACT,MACJ,IAAK,KACDA,EAAS,WACT,MACJ,IAAK,IACDA,EAAS,YACT,MACJ,IAAK,KACDA,EAAS,YACT,MACJ,IAAK,IACDA,EAAS,cACT,MACJ,IAAK,KACDA,EAAS,cACT,MACJ,IAAK,IACDA,EAAS,YACT,MACJ,IAAK,KACDA,EAAS,YAIrB,OAAOA,EAAO7gD,QAAQ,MAAOy9C,GAGxBpQ,EAAO4N,aAAa,KAAM,CAC/BC,OAAQ,wFAAwFntC,MAC5F,KAEJotC,YAAa,gFAAgFptC,MACzF,KAEJ0xC,kBAAkB,EAClBrE,SAAU,uDAAuDrtC,MAAM,KACvEstC,cAAe,kCAAkCttC,MAAM,KACvDutC,YAAa,qBAAqBvtC,MAAM,KACxC8tC,eAAgB,CACZC,GAAI,eACJC,IAAK,kBACLC,EAAG,aACHC,GAAI,cACJC,IAAK,4BACLC,KAAM,mCAEVC,SAAU,CACNC,QAAS,UACTC,QAAS,aACTC,SAAU,WACVC,QAAS,WACTC,SAAU,mBACVC,SAAU,KAEdC,aAAc,CACVC,OAAQ,UACRC,KAAM,WACNx0C,EAAGi7C,EACHxG,GAAIwG,EACJrjD,EAAGqjD,EACHvG,GAAIuG,EACJtG,EAAGsG,EACHrG,GAAIqG,EACJl/B,EAAGk/B,EACHpG,GAAIoG,EACJnG,EAAGmG,EACHlG,GAAIkG,EACJjG,EAAGiG,EACHhG,GAAIgG,GAER7E,SAAU,SAAUjuD,GAChB,OAAOA,EAAOwP,QAAQ,iBAAiB,SAAUiH,GAC7C,OAAOy3C,EAAUz3C,OAGzBs3C,WAAY,SAAU/tD,GAClB,OAAOA,EAAOwP,QAAQ,OAAO,SAAUiH,GACnC,OAAOu3C,EAAUv3C,OAGzBs0C,cAAe,qCACfgE,aAAc,SAAUlB,EAAM5C,GAI1B,OAHa,KAAT4C,IACAA,EAAO,GAEM,UAAb5C,GAAqC,UAAbA,EACjB4C,EAEM,WAAb5C,GACa,aAAbA,GACa,WAAbA,EAEO4C,GAAQ,GAAKA,EAAOA,EAAO,QAL/B,GAQX5C,SAAU,SAAU4C,EAAMC,EAAQ1C,GAC9B,OAAIyC,GAAQ,GAAKA,EAAO,EACb,QACAA,EAAO,GACP,QACAA,EAAO,GACP,SACAA,EAAO,GACP,WAEA,UAGfX,KAAM,CACFC,IAAK,EACLC,IAAK,KAvMyBzyD,CAAQ,EAAQ,8FCGlD,SAAWkiD,GAAU,aAIdA,EAAO4N,aAAa,QAAS,CACpCC,OAAQ,oFAAoFntC,MACxF,KAEJotC,YAAa,kDAAkDptC,MAAM,KACrEqtC,SAAU,6CAA6CrtC,MAAM,KAC7DstC,cAAe,8BAA8BttC,MAAM,KACnDutC,YAAa,uBAAuBvtC,MAAM,KAC1C8tC,eAAgB,CACZC,GAAI,QACJC,IAAK,WACLC,EAAG,aACHC,GAAI,cACJC,IAAK,4BACLC,KAAM,mCAEVZ,cAAe,8BACfgE,aAAc,SAAUlB,EAAM5C,GAI1B,OAHa,KAAT4C,IACAA,EAAO,GAEM,SAAb5C,EACO4C,EACa,cAAb5C,EACA4C,GAAQ,GAAKA,EAAOA,EAAO,GACd,WAAb5C,GAAsC,UAAbA,EACzB4C,EAAO,QADX,GAIX5C,SAAU,SAAUC,EAAOC,EAASC,GAChC,OAAIF,EAAQ,GACD,OACAA,EAAQ,GACR,YACAA,EAAQ,GACR,SAEA,SAGfU,SAAU,CACNC,QAAS,sBACTC,QAAS,kBACTC,SAAU,kBACVC,QAAS,sBACTC,SAAU,wBACVC,SAAU,KAEdC,aAAc,CACVC,OAAQ,WACRC,KAAM,gBACNx0C,EAAG,gBACHy0C,GAAI,UACJ78C,EAAG,UACH88C,GAAI,WACJC,EAAG,QACHC,GAAI,SACJ74B,EAAG,SACH84B,GAAI,UACJC,EAAG,UACHC,GAAI,WACJC,EAAG,UACHC,GAAI,YAERI,KAAM,CACFC,IAAK,EACLC,IAAK,KAzEyBzyD,CAAQ,EAAQ,2FCElD,SAAWkiD,GAAU,aAIhBA,EAAO4N,aAAa,KAAM,CAC/BC,OAAQ,oFAAoFntC,MACxF,KAEJotC,YAAa,kDAAkDptC,MAAM,KACrEqtC,SAAU,6CAA6CrtC,MAAM,KAC7DstC,cAAe,8BAA8BttC,MAAM,KACnDutC,YAAa,uBAAuBvtC,MAAM,KAC1C8tC,eAAgB,CACZC,GAAI,QACJC,IAAK,WACLC,EAAG,aACHC,GAAI,cACJC,IAAK,4BACLC,KAAM,mCAEVZ,cAAe,8BACfgE,aAAc,SAAUlB,EAAM5C,GAI1B,OAHa,KAAT4C,IACAA,EAAO,GAEM,SAAb5C,EACO4C,EACa,cAAb5C,EACA4C,GAAQ,GAAKA,EAAOA,EAAO,GACd,WAAb5C,GAAsC,UAAbA,EACzB4C,EAAO,QADX,GAIX5C,SAAU,SAAUC,EAAOC,EAASC,GAChC,OAAIF,EAAQ,GACD,OACAA,EAAQ,GACR,YACAA,EAAQ,GACR,SAEA,SAGfU,SAAU,CACNC,QAAS,sBACTC,QAAS,kBACTC,SAAU,kBACVC,QAAS,sBACTC,SAAU,wBACVC,SAAU,KAEdC,aAAc,CACVC,OAAQ,WACRC,KAAM,gBACNx0C,EAAG,gBACHy0C,GAAI,UACJ78C,EAAG,UACH88C,GAAI,WACJC,EAAG,QACHC,GAAI,SACJ74B,EAAG,SACH84B,GAAI,UACJC,EAAG,UACHC,GAAI,WACJC,EAAG,UACHC,GAAI,YAERI,KAAM,CACFC,IAAK,EACLC,IAAK,KAzEyBzyD,CAAQ,EAAQ,2FCGlD,SAAWkiD,GAAU,aAIhBA,EAAO4N,aAAa,KAAM,CAC/BC,OAAQ,wFAAwFntC,MAC5F,KAEJotC,YAAa,kDAAkDptC,MAAM,KACrEqtC,SAAU,iEAAiErtC,MACvE,KAEJstC,cAAe,8BAA8BttC,MAAM,KACnDutC,YAAa,uBAAuBvtC,MAAM,KAC1C8tC,eAAgB,CACZC,GAAI,QACJC,IAAK,WACLC,EAAG,aACHC,GAAI,cACJC,IAAK,oBACLC,KAAM,2BAEVC,SAAU,CACNC,QAAS,iBACTC,QAAS,iBACTC,SAAU,gBACVC,QAAS,qBACTC,SAAU,4BACVC,SAAU,KAEdC,aAAc,CACVC,OAAQ,QACRC,KAAM,SACNx0C,EAAG,eACHy0C,GAAI,aACJ78C,EAAG,SACH88C,GAAI,YACJC,EAAG,SACHC,GAAI,aACJ74B,EAAG,UACH84B,GAAI,YACJC,EAAG,QACHC,GAAI,UACJC,EAAG,OACHC,GAAI,UAERC,uBAAwB,WACxBC,QAAS,MACTE,KAAM,CACFC,IAAK,EACLC,IAAK,KArDyBzyD,CAAQ,EAAQ,2FCKlD,SAAWkiD,GAAU,aAIzB,IAAImR,EAAY,CACR,EAAG,IACH,EAAG,IACH,EAAG,IACH,EAAG,IACH,EAAG,IACH,EAAG,IACH,EAAG,IACH,EAAG,IACH,EAAG,IACH,EAAG,KAEPE,EAAY,CACR,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,KAGJrR,EAAO4N,aAAa,KAAM,CAC/BC,OAAQ,2FAA2FntC,MAC/F,KAEJotC,YAAa,mDAAmDptC,MAAM,KACtEqtC,SAAU,wDAAwDrtC,MAC9D,KAEJstC,cAAe,2BAA2BttC,MAAM,KAChDutC,YAAa,2BAA2BvtC,MAAM,KAE9C8tC,eAAgB,CACZC,GAAI,QACJC,IAAK,WACLC,EAAG,aACHC,GAAI,cACJC,IAAK,oBACLC,KAAM,0BAEVC,SAAU,CACNC,QAAS,kBACTC,QAAS,sBACTC,SAAU,gBACVC,QAAS,mBACTC,SAAU,6BACVC,SAAU,KAEdC,aAAc,CACVC,OAAQ,gBACRC,KAAM,kBACNx0C,EAAG,kBACHy0C,GAAI,aACJ78C,EAAG,WACH88C,GAAI,WACJC,EAAG,UACHC,GAAI,UACJ74B,EAAG,SACH84B,GAAI,SACJC,EAAG,OACHC,GAAI,OACJC,EAAG,UACHC,GAAI,WAERmB,SAAU,SAAUjuD,GAChB,OAAOA,EAAOwP,QAAQ,iBAAiB,SAAUiH,GAC7C,OAAOy3C,EAAUz3C,OAGzBs3C,WAAY,SAAU/tD,GAClB,OAAOA,EAAOwP,QAAQ,OAAO,SAAUiH,GACnC,OAAOu3C,EAAUv3C,OAGzBy2C,KAAM,CACFC,IAAK,EACLC,IAAK,KAvFyBzyD,CAAQ,EAAQ,2FCGlD,SAAWkiD,GAAU,aAIhBA,EAAO4N,aAAa,KAAM,CAC/BC,OAAQ,qFAAqFntC,MACzF,KAEJotC,YAAa,6DAA6DptC,MACtE,KAEJ0xC,kBAAkB,EAClBrE,SAAU,qDAAqDrtC,MAAM,KACrEstC,cAAe,8BAA8BttC,MAAM,KACnDutC,YAAa,uBAAuBvtC,MAAM,KAC1CqwC,oBAAoB,EACpBvC,eAAgB,CACZC,GAAI,QACJC,IAAK,WACLC,EAAG,aACHC,GAAI,eACJC,IAAK,2BACLC,KAAM,iCAEVC,SAAU,CACNC,QAAS,iBACTC,QAAS,oBACTC,SAAU,gBACVC,QAAS,iBACTC,SAAU,0BACVC,SAAU,KAEdC,aAAc,CACVC,OAAQ,QACRC,KAAM,WACNx0C,EAAG,gBACHy0C,GAAI,cACJ78C,EAAG,aACH88C,GAAI,cACJC,EAAG,UACHC,GAAI,WACJ74B,EAAG,SACH84B,GAAI,WACJiC,EAAG,SACHC,GAAI,UACJjC,EAAG,WACHC,GAAI,aACJC,EAAG,SACHC,GAAI,SAERC,uBAAwB,YACxBC,QAAS,MACTE,KAAM,CACFC,IAAK,EACLC,IAAK,KAzDyBzyD,CAAQ,EAAQ,2FCClD,SAAWkiD,GAAU,aAIzB,IAAImR,EAAY,CACR,EAAG,IACH,EAAG,IACH,EAAG,IACH,EAAG,IACH,EAAG,IACH,EAAG,IACH,EAAG,IACH,EAAG,IACH,EAAG,IACH,EAAG,KAEPE,EAAY,CACR,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,KAGJrR,EAAO4N,aAAa,KAAM,CAC/BC,OAAQ,uFAAuFntC,MAC3F,KAEJotC,YAAa,uEAAuEptC,MAChF,KAEJ0xC,kBAAkB,EAClBrE,SAAU,wDAAwDrtC,MAC9D,KAEJstC,cAAe,0CAA0CttC,MAAM,KAC/DutC,YAAa,4BAA4BvtC,MAAM,KAC/CqwC,oBAAoB,EACpBvC,eAAgB,CACZC,GAAI,eACJC,IAAK,kBACLC,EAAG,aACHC,GAAI,cACJC,IAAK,4BACLC,KAAM,mCAEVsC,SAAU,SAAUjuD,GAChB,OAAOA,EAAOwP,QAAQ,iBAAiB,SAAUiH,GAC7C,OAAOy3C,EAAUz3C,OAGzBs3C,WAAY,SAAU/tD,GAClB,OAAOA,EAAOwP,QAAQ,OAAO,SAAUiH,GACnC,OAAOu3C,EAAUv3C,OAGzBs0C,cAAe,yBACfgE,aAAc,SAAUlB,EAAM5C,GAI1B,OAHa,KAAT4C,IACAA,EAAO,GAEM,SAAb5C,EACO4C,EAAO,EAAIA,EAAOA,EAAO,GACZ,UAAb5C,EACA4C,EACa,WAAb5C,EACA4C,GAAQ,GAAKA,EAAOA,EAAO,GACd,SAAb5C,EACA4C,EAAO,QADX,GAIX5C,SAAU,SAAU4C,EAAMC,EAAQ1C,GAC9B,OAAIyC,EAAO,EACA,OACAA,EAAO,GACP,QACAA,EAAO,GACP,SACAA,EAAO,GACP,OAEA,QAGfjC,SAAU,CACNC,QAAS,UACTC,QAAS,YACTC,SAAU,qBACVC,QAAS,YACTC,SAAU,oBACVC,SAAU,KAEdC,aAAc,CACVC,OAAQ,OACRC,KAAM,WACNx0C,EAAG,YACHy0C,GAAI,aACJ78C,EAAG,WACH88C,GAAI,WACJC,EAAG,WACHC,GAAI,WACJ74B,EAAG,SACH84B,GAAI,SACJC,EAAG,WACHC,GAAI,WACJC,EAAG,UACHC,GAAI,WAERI,KAAM,CACFC,IAAK,EACLC,IAAK,KAtHyBzyD,CAAQ,EAAQ,8FCIlD,SAAWkiD,GAAU,aAIzB,IAAIyU,EAAsB,6DAA6D/zC,MAC/E,KAEJg0C,EAAyB,kDAAkDh0C,MACvE,KAEJgyC,EAAc,CACV,QACA,QACA,iBACA,QACA,SACA,cACA,cACA,QACA,QACA,QACA,QACA,SAEJC,EAAc,qKAEP3S,EAAO4N,aAAa,QAAS,CACpCC,OAAQ,0FAA0FntC,MAC9F,KAEJotC,YAAa,SAAUl7C,EAAG4S,GACtB,OAAK5S,EAEM,QAAQmO,KAAKyE,GACbkvC,EAAuB9hD,EAAEmhD,SAEzBU,EAAoB7hD,EAAEmhD,SAJtBU,GAQf9B,YAAaA,EACbR,iBAAkBQ,EAClBK,kBAAmB,4FACnBC,uBAAwB,mFAExBP,YAAaA,EACbQ,gBAAiBR,EACjBS,iBAAkBT,EAElB3E,SAAU,6DAA6DrtC,MACnE,KAEJstC,cAAe,8BAA8BttC,MAAM,KACnDutC,YAAa,uBAAuBvtC,MAAM,KAC1CqwC,oBAAoB,EACpBvC,eAAgB,CACZC,GAAI,QACJC,IAAK,WACLC,EAAG,aACHC,GAAI,cACJC,IAAK,oBACLC,KAAM,0BAEVC,SAAU,CACNC,QAAS,kBACTC,QAAS,iBACTC,SAAU,eACVC,QAAS,mBACTC,SAAU,2BACVC,SAAU,KAEdC,aAAc,CACVC,OAAQ,UACRC,KAAM,aACNx0C,EAAG,oBACHy0C,GAAI,cACJ78C,EAAG,aACH88C,GAAI,aACJC,EAAG,UACHC,GAAI,SACJ74B,EAAG,UACH84B,GAAI,WACJC,EAAG,YACHC,GAAI,aACJC,EAAG,WACHC,GAAI,WAERC,uBAAwB,kBACxBC,QAAS,SAAUC,GACf,OACIA,GACY,IAAXA,GAA2B,IAAXA,GAAgBA,GAAU,GAAK,MAAQ,OAGhEC,KAAM,CACFC,IAAK,EACLC,IAAK,KAnGyBzyD,CAAQ,EAAQ,2FCGlD,SAAWkiD,GAAU,aAIzB,IAAIyU,EAAsB,6DAA6D/zC,MAC/E,KAEJg0C,EAAyB,kDAAkDh0C,MACvE,KAEJgyC,EAAc,CACV,QACA,QACA,iBACA,QACA,SACA,cACA,cACA,QACA,QACA,QACA,QACA,SAEJC,EAAc,qKAET3S,EAAO4N,aAAa,KAAM,CAC/BC,OAAQ,0FAA0FntC,MAC9F,KAEJotC,YAAa,SAAUl7C,EAAG4S,GACtB,OAAK5S,EAEM,QAAQmO,KAAKyE,GACbkvC,EAAuB9hD,EAAEmhD,SAEzBU,EAAoB7hD,EAAEmhD,SAJtBU,GAQf9B,YAAaA,EACbR,iBAAkBQ,EAClBK,kBAAmB,4FACnBC,uBAAwB,mFAExBP,YAAaA,EACbQ,gBAAiBR,EACjBS,iBAAkBT,EAElB3E,SAAU,6DAA6DrtC,MACnE,KAEJstC,cAAe,8BAA8BttC,MAAM,KACnDutC,YAAa,uBAAuBvtC,MAAM,KAC1CqwC,oBAAoB,EACpBvC,eAAgB,CACZC,GAAI,QACJC,IAAK,WACLC,EAAG,aACHC,GAAI,cACJC,IAAK,oBACLC,KAAM,0BAEVC,SAAU,CACNC,QAAS,kBACTC,QAAS,iBACTC,SAAU,eACVC,QAAS,mBACTC,SAAU,2BACVC,SAAU,KAEdC,aAAc,CACVC,OAAQ,UACRC,KAAM,aACNx0C,EAAG,oBACHy0C,GAAI,cACJ78C,EAAG,aACH88C,GAAI,aACJC,EAAG,UACHC,GAAI,SACJ74B,EAAG,UACH84B,GAAI,WACJiC,EAAG,WACHC,GAAI,WACJjC,EAAG,YACHC,GAAI,aACJC,EAAG,WACHC,GAAI,WAERC,uBAAwB,kBACxBC,QAAS,SAAUC,GACf,OACIA,GACY,IAAXA,GAA2B,IAAXA,GAAgBA,GAAU,GAAK,MAAQ,OAGhEC,KAAM,CACFC,IAAK,EACLC,IAAK,KArGyBzyD,CAAQ,EAAQ,2FCGlD,SAAWkiD,GAAU,aAIhBA,EAAO4N,aAAa,KAAM,CAC/BC,OAAQ,qFAAqFntC,MACzF,KAEJotC,YAAa,6DAA6DptC,MACtE,KAEJ0xC,kBAAkB,EAClBrE,SAAU,qDAAqDrtC,MAAM,KACrEstC,cAAe,+BAA+BttC,MAAM,KACpDutC,YAAa,uBAAuBvtC,MAAM,KAC1CqwC,oBAAoB,EACpBvC,eAAgB,CACZC,GAAI,QACJC,IAAK,WACLC,EAAG,aACHC,GAAI,eACJC,IAAK,0BACLC,KAAM,iCAEVC,SAAU,CACNC,QAAS,oBACTC,QAAS,uBACTC,SAAU,mBACVC,QAAS,oBACTC,SAAU,gCACVC,SAAU,KAEdC,aAAc,CACVC,OAAQ,QACRC,KAAM,WACNx0C,EAAG,eACHy0C,GAAI,YACJ78C,EAAG,aACH88C,GAAI,YACJC,EAAG,WACHC,GAAI,WACJ74B,EAAG,UACH84B,GAAI,WACJiC,EAAG,UACHC,GAAI,WACJjC,EAAG,YACHC,GAAI,aACJC,EAAG,SACHC,GAAI,SAERC,uBAAwB,YACxBC,QAAS,MACTE,KAAM,CACFC,IAAK,EACLC,IAAK,KAzDyBzyD,CAAQ,EAAQ,+FCElD,SAAWkiD,GAAU,aAIbA,EAAO4N,aAAa,SAAU,CACtCC,OAAQ,CACJ6D,WAAY,qFAAqFhxC,MAC7F,KAEJ8E,OAAQ,sHAAsH9E,MAC1H,KAEJixC,SAAU,mBAEd7D,YAAa,+DAA+DptC,MACxE,KAEJ0xC,kBAAkB,EAClBrE,SAAU,2DAA2DrtC,MACjE,KAEJstC,cAAe,8BAA8BttC,MAAM,KACnDutC,YAAa,uBAAuBvtC,MAAM,KAC1CqwC,oBAAoB,EACpBvC,eAAgB,CACZC,GAAI,OACJC,IAAK,UACLC,EAAG,aACHC,GAAI,mBACJyE,GAAI,aACJxE,IAAK,4BACLyE,IAAK,mBACLxE,KAAM,iCACNyE,KAAM,wBAEVxE,SAAU,CACNC,QAAS,aACTC,QAAS,eACTC,SAAU,cACVC,QAAS,aACTC,SAAU,qBACVC,SAAU,KAEdC,aAAc,CACVC,OAAQ,YACRC,KAAM,QACNx0C,EAAG,gBACHy0C,GAAI,cACJ78C,EAAG,aACH88C,GAAI,aACJC,EAAG,UACHC,GAAI,UACJ74B,EAAG,UACH84B,GAAI,WACJC,EAAG,SACHC,GAAI,WACJC,EAAG,QACHC,GAAI,UAERC,uBAAwB,qBACxBC,QAAS,SAAUC,EAAQyB,GACvB,IAAI2B,EACW,IAAXpD,EACM,IACW,IAAXA,EACA,IACW,IAAXA,EACA,IACW,IAAXA,EACA,IACA,IAIV,MAHe,MAAXyB,GAA6B,MAAXA,IAClB2B,EAAS,KAENpD,EAASoD,GAEpBnD,KAAM,CACFC,IAAK,EACLC,IAAK,KAjFyBzyD,CAAQ,EAAQ,8FCGlD,SAAWkiD,GAAU,aAIzB,IAAImR,EAAY,CACR,EAAG,IACH,EAAG,IACH,EAAG,IACH,EAAG,IACH,EAAG,IACH,EAAG,IACH,EAAG,IACH,EAAG,IACH,EAAG,IACH,EAAG,KAEPE,EAAY,CACR,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,KAGFrR,EAAO4N,aAAa,QAAS,CAEpCC,OAAQ,sEAAsEntC,MAC1E,KAEJotC,YAAa,sEAAsEptC,MAC/E,KAEJqtC,SAAU,yDAAyDrtC,MAC/D,KAEJstC,cAAe,iCAAiCttC,MAAM,KACtDutC,YAAa,iCAAiCvtC,MAAM,KACpD8tC,eAAgB,CACZC,GAAI,aACJC,IAAK,gBACLC,EAAG,aACHC,GAAI,cACJC,IAAK,0BACLC,KAAM,iCAEVC,SAAU,CACNC,QAAS,UACTC,QAAS,UACTC,SAAU,kBACVC,QAAS,UACTC,SAAU,mBACVC,SAAU,KAEdC,aAAc,CACVC,OAAQ,UACRC,KAAM,WACNx0C,EAAG,YACHy0C,GAAI,WACJ78C,EAAG,UACH88C,GAAI,UACJC,EAAG,WACHC,GAAI,UACJ74B,EAAG,UACH84B,GAAI,SACJC,EAAG,YACHC,GAAI,WACJC,EAAG,UACHC,GAAI,UAERmB,SAAU,SAAUjuD,GAChB,OAAOA,EAAOwP,QAAQ,iBAAiB,SAAUiH,GAC7C,OAAOy3C,EAAUz3C,OAGzBs3C,WAAY,SAAU/tD,GAClB,OAAOA,EAAOwP,QAAQ,OAAO,SAAUiH,GACnC,OAAOu3C,EAAUv3C,OAKzBs0C,cAAe,uBACfgE,aAAc,SAAUlB,EAAM5C,GAI1B,OAHa,KAAT4C,IACAA,EAAO,GAEM,QAAb5C,EACO4C,EAAO,EAAIA,EAAOA,EAAO,GACZ,SAAb5C,EACA4C,EACa,WAAb5C,EACA4C,GAAQ,GAAKA,EAAOA,EAAO,GACd,SAAb5C,EACA4C,EAAO,QADX,GAIX5C,SAAU,SAAU4C,EAAMC,EAAQ1C,GAC9B,OAAIyC,EAAO,EACA,MACAA,EAAO,GACP,OACAA,EAAO,GACP,SACAA,EAAO,GACP,OAEA,OAGfX,KAAM,CACFC,IAAK,EACLC,IAAK,KAvHyBzyD,CAAQ,EAAQ,2FCGlD,SAAWkiD,GAAU,aAIzB,IAAIkW,EAAmB,mGAAmGx1C,MAClH,KAEJy1C,EAAmB,qGAAqGz1C,MACpH,KAEJgyC,EAAc,CACV,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,QACA,SAER,SAASe,EAAOt1C,GACZ,OAAOA,EAAI,GAAK,GAAKA,EAAI,GAAK,MAAQA,EAAI,IAAM,IAAO,EAE3D,SAASi1C,EAAUhD,EAAQQ,EAAentD,GACtC,IAAIS,EAASksD,EAAS,IACtB,OAAQ3sD,GACJ,IAAK,KACD,OAAOS,GAAUuvD,EAAOrD,GAAU,UAAY,UAClD,IAAK,IACD,OAAOQ,EAAgB,SAAW,SACtC,IAAK,KACD,OAAO1sD,GAAUuvD,EAAOrD,GAAU,SAAW,SACjD,IAAK,IACD,OAAOQ,EAAgB,UAAY,UACvC,IAAK,KACD,OAAO1sD,GAAUuvD,EAAOrD,GAAU,UAAY,UAClD,IAAK,KACD,OAAOlsD,GAAUuvD,EAAOrD,GAAU,WAAa,WACnD,IAAK,KACD,OAAOlsD,GAAUuvD,EAAOrD,GAAU,WAAa,YACnD,IAAK,KACD,OAAOlsD,GAAUuvD,EAAOrD,GAAU,OAAS,QAI9CpQ,EAAO4N,aAAa,KAAM,CAC/BC,OAAQ,SAAUgG,EAAgBruC,GAC9B,OAAKquC,EAEM,SAAS9yC,KAAKyE,GACd2wC,EAAiBtC,EAAeE,SAEhCmC,EAAiBrC,EAAeE,SAJhCmC,GAOfpI,YAAa,kDAAkDptC,MAAM,KACrEgyC,YAAaA,EACbQ,gBAAiBR,EACjBS,iBAAkBT,EAClB3E,SAAU,6DAA6DrtC,MACnE,KAEJstC,cAAe,2BAA2BttC,MAAM,KAChDutC,YAAa,uBAAuBvtC,MAAM,KAC1C8tC,eAAgB,CACZC,GAAI,QACJC,IAAK,WACLC,EAAG,aACHC,GAAI,cACJC,IAAK,oBACLC,KAAM,2BAEVC,SAAU,CACNC,QAAS,cACTC,QAAS,eACTC,SAAU,WACN,OAAQtxD,KAAKg0D,OACT,KAAK,EACD,MAAO,qBAEX,KAAK,EACD,MAAO,mBAEX,KAAK,EACD,MAAO,iBAEX,KAAK,EACD,MAAO,kBAEX,QACI,MAAO,oBAGnBzC,QAAS,iBACTC,SAAU,WACN,OAAQxxD,KAAKg0D,OACT,KAAK,EACD,MAAO,4BACX,KAAK,EACD,MAAO,wBACX,KAAK,EACD,MAAO,yBACX,QACI,MAAO,2BAGnBvC,SAAU,KAEdC,aAAc,CACVC,OAAQ,QACRC,KAAM,UACNx0C,EAAG,eACHy0C,GAAI2D,EACJxgD,EAAGwgD,EACH1D,GAAI0D,EACJzD,EAAGyD,EACHxD,GAAIwD,EACJr8B,EAAG,UACH84B,GAAI,SACJiC,EAAG,UACHC,GAAIqB,EACJtD,EAAG,UACHC,GAAIqD,EACJpD,EAAG,MACHC,GAAImD,GAERlD,uBAAwB,YACxBC,QAAS,MACTE,KAAM,CACFC,IAAK,EACLC,IAAK,KAzIyBzyD,CAAQ,EAAQ,8FCGlD,SAAWkiD,GAAU,aAIdA,EAAO4N,aAAa,QAAS,CACpCC,OAAQ,2FAA2FntC,MAC/F,KAEJotC,YAAa,kDAAkDptC,MAAM,KACrEqtC,SAAU,iFAAiFrtC,MACvF,KAEJstC,cAAe,8BAA8BttC,MAAM,KACnDutC,YAAa,uBAAuBvtC,MAAM,KAC1CqwC,oBAAoB,EACpBvC,eAAgB,CACZC,GAAI,QACJC,IAAK,WACLC,EAAG,aACHC,GAAI,wBACJC,IAAK,mCACLC,KAAM,0CAEVC,SAAU,CACNC,QAAS,eACTC,QAAS,iBACTC,SAAU,eACVC,QAAS,gBACTC,SAAU,WACN,OAAsB,IAAfxxD,KAAKg0D,OAA8B,IAAfh0D,KAAKg0D,MAC1B,wBACA,yBAEVvC,SAAU,KAEdC,aAAc,CACVC,OAAQ,QACRC,KAAM,QACNx0C,EAAG,kBACHy0C,GAAI,cACJ78C,EAAG,YACH88C,GAAI,aACJC,EAAG,WACHC,GAAI,WACJ74B,EAAG,SACH84B,GAAI,UACJC,EAAG,SACHC,GAAI,WACJC,EAAG,SACHC,GAAI,WAERC,uBAAwB,WACxBC,QAAS,MACTkE,YAAa,kBAxDqBv2D,CAAQ,EAAQ,2FCGlD,SAAWkiD,GAAU,aAIhBA,EAAO4N,aAAa,KAAM,CAC/BC,OAAQ,2FAA2FntC,MAC/F,KAEJotC,YAAa,kDAAkDptC,MAAM,KACrEqtC,SAAU,iFAAiFrtC,MACvF,KAEJstC,cAAe,8BAA8BttC,MAAM,KACnDutC,YAAa,uBAAuBvtC,MAAM,KAC1CqwC,oBAAoB,EACpBvC,eAAgB,CACZC,GAAI,QACJC,IAAK,WACLC,EAAG,aACHC,GAAI,wBACJC,IAAK,8BACLC,KAAM,qCAEVC,SAAU,CACNC,QAAS,eACTC,QAAS,iBACTC,SAAU,eACVC,QAAS,gBACTC,SAAU,WACN,OAAsB,IAAfxxD,KAAKg0D,OAA8B,IAAfh0D,KAAKg0D,MAC1B,wBACA,yBAEVvC,SAAU,KAEdC,aAAc,CACVC,OAAQ,QACRC,KAAM,QACNx0C,EAAG,WACHy0C,GAAI,cACJ78C,EAAG,YACH88C,GAAI,aACJC,EAAG,WACHC,GAAI,WACJ74B,EAAG,SACH84B,GAAI,UACJiC,EAAG,aACHC,GAAI,aACJjC,EAAG,SACHC,GAAI,WACJC,EAAG,SACHC,GAAI,WAERC,uBAAwB,WACxBC,QAAS,MACTE,KAAM,CACFC,IAAK,EACLC,IAAK,KA5DyBzyD,CAAQ,EAAQ,2FCKlD,SAAWkiD,GAAU,aAIzB,SAASuR,EAAuBnB,EAAQQ,EAAentD,GACnD,IASI2yD,EAAY,IAIhB,OAHIhG,EAAS,KAAO,IAAOA,GAAU,KAAOA,EAAS,KAAQ,KACzDgG,EAAY,QAEThG,EAASgG,EAbH,CACL3G,GAAI,UACJC,GAAI,SACJE,GAAI,MACJC,GAAI,OACJkC,GAAI,YACJhC,GAAI,OACJE,GAAI,OAMuBxsD,GAG9Bu8C,EAAO4N,aAAa,KAAM,CAC/BC,OAAQ,oGAAoGntC,MACxG,KAEJotC,YAAa,+DAA+DptC,MACxE,KAEJ0xC,kBAAkB,EAClBrE,SAAU,kDAAkDrtC,MAAM,KAClEstC,cAAe,8BAA8BttC,MAAM,KACnDutC,YAAa,uBAAuBvtC,MAAM,KAC1C8tC,eAAgB,CACZC,GAAI,OACJC,IAAK,UACLC,EAAG,aACHC,GAAI,cACJC,IAAK,mBACLC,KAAM,0BAEVC,SAAU,CACNC,QAAS,cACTC,QAAS,gBACTC,SAAU,eACVC,QAAS,eACTC,SAAU,uBACVC,SAAU,KAEdC,aAAc,CACVC,OAAQ,WACRC,KAAM,aACNx0C,EAAG,iBACHy0C,GAAI8B,EACJ3+C,EAAG,WACH88C,GAAI6B,EACJ5B,EAAG,QACHC,GAAI2B,EACJx6B,EAAG,OACH84B,GAAI0B,EACJO,EAAG,cACHC,GAAIR,EACJzB,EAAG,SACHC,GAAIwB,EACJvB,EAAG,QACHC,GAAIsB,GAERlB,KAAM,CACFC,IAAK,EACLC,IAAK,KAvEyBzyD,CAAQ,EAAQ,2FCGlD,SAAWkiD,GAAU,aAYzB,SAASuR,EAAuBnB,EAAQQ,EAAentD,GAUnD,MAAY,MAARA,EACOmtD,EAAgB,SAAW,SAE3BR,EAAS,KArBFoB,GAqB6BpB,EApB3CqB,EAQS,CACThC,GAAImB,EAAgB,yBAA2B,yBAC/ClB,GAAIkB,EAAgB,sBAAwB,sBAC5ChB,GAAI,iBACJC,GAAI,gBACJkC,GAAI,uBACJhC,GAAI,uBACJE,GAAI,gBAKgCxsD,GApBvBid,MAAM,KAChB8wC,EAAM,IAAO,GAAKA,EAAM,KAAQ,GACjCC,EAAM,GACND,EAAM,IAAM,GAAKA,EAAM,IAAM,IAAMA,EAAM,IAAM,IAAMA,EAAM,KAAO,IAClEC,EAAM,GACNA,EAAM,IANhB,IAAsBD,EACdC,EAuBR,IAAIiB,EAAc,CACd,QACA,QACA,QACA,QACA,WACA,QACA,QACA,QACA,QACA,QACA,QACA,SAMK1S,EAAO4N,aAAa,KAAM,CAC/BC,OAAQ,CACJroC,OAAQ,oFAAoF9E,MACxF,KAEJgxC,WAAY,kFAAkFhxC,MAC1F,MAGRotC,YAAa,CAETtoC,OAAQ,gEAAgE9E,MACpE,KAEJgxC,WAAY,gEAAgEhxC,MACxE,MAGRqtC,SAAU,CACN2D,WAAY,gEAAgEhxC,MACxE,KAEJ8E,OAAQ,gEAAgE9E,MACpE,KAEJixC,SAAU,iDAEd3D,cAAe,uBAAuBttC,MAAM,KAC5CutC,YAAa,uBAAuBvtC,MAAM,KAC1CgyC,YAAaA,EACbQ,gBAAiBR,EACjBS,iBAAkBT,EAGlBC,YAAa,2MAGbR,iBAAkB,2MAGlBa,kBAAmB,wHAGnBC,uBAAwB,6FACxBzE,eAAgB,CACZC,GAAI,OACJC,IAAK,UACLC,EAAG,aACHC,GAAI,iBACJC,IAAK,uBACLC,KAAM,8BAEVC,SAAU,CACNC,QAAS,kBACTC,QAAS,iBACTE,QAAS,gBACTD,SAAU,SAAUkG,GAChB,GAAIA,EAAI/E,SAAWzyD,KAAKyyD,OAcpB,OAAmB,IAAfzyD,KAAKg0D,MACE,oBAEA,mBAhBX,OAAQh0D,KAAKg0D,OACT,KAAK,EACD,MAAO,6BACX,KAAK,EACL,KAAK,EACL,KAAK,EACD,MAAO,6BACX,KAAK,EACL,KAAK,EACL,KAAK,EACD,MAAO,+BAUvBxC,SAAU,SAAUgG,GAChB,GAAIA,EAAI/E,SAAWzyD,KAAKyyD,OAcpB,OAAmB,IAAfzyD,KAAKg0D,MACE,oBAEA,mBAhBX,OAAQh0D,KAAKg0D,OACT,KAAK,EACD,MAAO,2BACX,KAAK,EACL,KAAK,EACL,KAAK,EACD,MAAO,2BACX,KAAK,EACL,KAAK,EACL,KAAK,EACD,MAAO,6BAUvBvC,SAAU,KAEdC,aAAc,CACVC,OAAQ,WACRC,KAAM,WACNx0C,EAAG,mBACHy0C,GAAI8B,EACJ3+C,EAAG2+C,EACH7B,GAAI6B,EACJ5B,EAAG,MACHC,GAAI2B,EACJx6B,EAAG,OACH84B,GAAI0B,EACJO,EAAG,SACHC,GAAIR,EACJzB,EAAG,QACHC,GAAIwB,EACJvB,EAAG,MACHC,GAAIsB,GAERrD,cAAe,wBACfC,KAAM,SAAU39C,GACZ,MAAO,iBAAiBuQ,KAAKvQ,IAEjC49C,SAAU,SAAU4C,EAAMC,EAAQ1C,GAC9B,OAAIyC,EAAO,EACA,OACAA,EAAO,GACP,OACAA,EAAO,GACP,MAEA,UAGfd,uBAAwB,mBACxBC,QAAS,SAAUC,EAAQyB,GACvB,OAAQA,GACJ,IAAK,IACL,IAAK,IACL,IAAK,MACD,OAAOzB,EAAS,KACpB,IAAK,IACD,OAAOA,EAAS,MACpB,IAAK,IACL,IAAK,IACD,OAAOA,EAAS,KACpB,QACI,OAAOA,IAGnBC,KAAM,CACFC,IAAK,EACLC,IAAK,KA1MyBzyD,CAAQ,EAAQ,2FCClD,SAAWkiD,GAAU,aAIzB,IAAI6N,EAAS,CACL,QACA,UACA,OACA,QACA,MACA,MACA,SACA,OACA,UACA,SACA,QACA,SAEJwI,EAAO,CAAC,MAAO,OAAQ,QAAS,OAAQ,OAAQ,MAAO,QAElDrW,EAAO4N,aAAa,KAAM,CAC/BC,OAAQA,EACRC,YAAaD,EACbE,SAAUsI,EACVrI,cAAeqI,EACfpI,YAAaoI,EACb7H,eAAgB,CACZC,GAAI,QACJC,IAAK,WACLC,EAAG,aACHC,GAAI,cACJC,IAAK,oBACLC,KAAM,2BAEVZ,cAAe,UACfC,KAAM,SAAU39C,GACZ,MAAO,QAAUA,GAErB49C,SAAU,SAAU4C,EAAMC,EAAQ1C,GAC9B,OAAIyC,EAAO,GACA,MAEJ,OAEXjC,SAAU,CACNC,QAAS,UACTC,QAAS,aACTC,SAAU,yBACVC,QAAS,aACTC,SAAU,4BACVC,SAAU,KAEdC,aAAc,CACVC,OAAQ,SACRC,KAAM,QACNx0C,EAAG,YACHy0C,GAAI,WACJ78C,EAAG,SACH88C,GAAI,SACJC,EAAG,UACHC,GAAI,UACJ74B,EAAG,WACH84B,GAAI,WACJC,EAAG,WACHC,GAAI,WACJC,EAAG,SACHC,GAAI,UAERmB,SAAU,SAAUjuD,GAChB,OAAOA,EAAOwP,QAAQ,KAAM,MAEhCu+C,WAAY,SAAU/tD,GAClB,OAAOA,EAAOwP,QAAQ,KAAM,MAEhC09C,KAAM,CACFC,IAAK,EACLC,IAAK,KA/EyBzyD,CAAQ,EAAQ,2FCGlD,SAAWkiD,GAAU,aAIhBA,EAAO4N,aAAa,KAAM,CAC/BC,OAAQ,mJAAmJntC,MACvJ,KAEJotC,YAAa,6DAA6DptC,MACtE,KAEJqtC,SAAU,6EAA6ErtC,MACnF,KAEJstC,cAAe,mCAAmCttC,MAAM,KACxDutC,YAAa,gBAAgBvtC,MAAM,KACnC8tC,eAAgB,CACZC,GAAI,QACJC,IAAK,WACLC,EAAG,aACHC,GAAI,oBACJC,IAAK,gCACLC,KAAM,uCAEVC,SAAU,CACNC,QAAS,eACTC,QAAS,iBACTC,SAAU,eACVC,QAAS,eACTC,SAAU,wBACVC,SAAU,KAEdC,aAAc,CACVC,OAAQ,YACRC,KAAM,WACNx0C,EAAG,mBACHy0C,GAAI,eACJ78C,EAAG,eACH88C,GAAI,cACJC,EAAG,cACHC,GAAI,aACJ74B,EAAG,cACH84B,GAAI,cACJC,EAAG,aACHC,GAAI,WACJC,EAAG,aACHC,GAAI,YAERC,uBAAwB,YACxBC,QAAS,MACTE,KAAM,CACFC,IAAK,EACLC,IAAK,KAvDyBzyD,CAAQ,EAAQ,2FCGlD,SAAWkiD,GAAU,aAKhBA,EAAO4N,aAAa,KAAM,CAC/BC,OAAQ,kGAAkGntC,MACtG,KAEJotC,YAAa,wDAAwDptC,MACjE,KAEJqtC,SAAU,gEAAgErtC,MACtE,KAEJstC,cAAe,gCAAgCttC,MAAM,KACrDutC,YAAa,qBAAqBvtC,MAAM,KACxCqwC,oBAAoB,EACpBvC,eAAgB,CACZC,GAAI,SACJC,IAAK,YACLC,EAAG,aACHC,GAAI,cACJC,IAAK,sBACLC,KAAM,sCAEVC,SAAU,CACNC,QAAS,aACTC,QAAS,cACTC,SAAU,aACVC,QAAS,cACTC,SAAU,sBACVC,SAAU,KAEdC,aAAc,CACVC,OAAQ,SACRC,KAAM,WACNx0C,EAAG,eACHy0C,GAAI,WACJ78C,EAAG,YACH88C,GAAI,cACJC,EAAG,MACHC,GAAI,SACJ74B,EAAG,OACH84B,GAAI,SACJC,EAAG,OACHC,GAAI,SACJC,EAAG,MACHC,GAAI,UAERC,uBAAwB,eACxBC,QAAS,SAAUC,GACf,OAAOA,EAAS,SAEpBlC,cAAe,4BACfC,KAAM,SAAU39C,GACZ,MAAiB,SAAVA,GAA8B,YAAVA,GAE/B49C,SAAU,SAAUC,EAAOC,EAASC,GAChC,OAAIF,EAAQ,GACDE,EAAU,OAAS,UAEnBA,EAAU,QAAU,aAjEDzwD,CAAQ,EAAQ,2FCIlD,SAAWkiD,GAAU,aAIzB,IAAI6N,EAAS,oFAAoFntC,MACzF,KAEJotC,EAAc,kDAAkDptC,MAAM,KAC1E,SAAS+yC,EAAOt1C,GACZ,OAAOA,EAAI,GAAKA,EAAI,EAExB,SAASi1C,EAAUhD,EAAQQ,EAAentD,EAAKotD,GAC3C,IAAI3sD,EAASksD,EAAS,IACtB,OAAQ3sD,GACJ,IAAK,IACD,OAAOmtD,GAAiBC,EAAW,aAAe,gBACtD,IAAK,KACD,OAAID,GAAiBC,EACV3sD,GAAUuvD,EAAOrD,GAAU,UAAY,UAEvClsD,EAAS,YAExB,IAAK,IACD,OAAO0sD,EAAgB,SAAWC,EAAW,SAAW,UAC5D,IAAK,KACD,OAAID,GAAiBC,EACV3sD,GAAUuvD,EAAOrD,GAAU,SAAW,SAEtClsD,EAAS,WAExB,IAAK,IACD,OAAO0sD,EAAgB,SAAWC,EAAW,SAAW,UAC5D,IAAK,KACD,OAAID,GAAiBC,EACV3sD,GAAUuvD,EAAOrD,GAAU,SAAW,SAEtClsD,EAAS,WAExB,IAAK,IACD,OAAO0sD,GAAiBC,EAAW,MAAQ,OAC/C,IAAK,KACD,OAAID,GAAiBC,EACV3sD,GAAUuvD,EAAOrD,GAAU,MAAQ,OAEnClsD,EAAS,QAExB,IAAK,IACD,OAAO0sD,GAAiBC,EAAW,SAAW,WAClD,IAAK,KACD,OAAID,GAAiBC,EACV3sD,GAAUuvD,EAAOrD,GAAU,UAAY,YAEvClsD,EAAS,WAExB,IAAK,IACD,OAAO0sD,GAAiBC,EAAW,MAAQ,QAC/C,IAAK,KACD,OAAID,GAAiBC,EACV3sD,GAAUuvD,EAAOrD,GAAU,OAAS,SAEpClsD,EAAS,SAKvB87C,EAAO4N,aAAa,KAAM,CAC/BC,OAAQA,EACRC,YAAaA,EACbC,SAAU,sDAAsDrtC,MAAM,KACtEstC,cAAe,uBAAuBttC,MAAM,KAC5CutC,YAAa,uBAAuBvtC,MAAM,KAC1C8tC,eAAgB,CACZC,GAAI,OACJC,IAAK,UACLC,EAAG,aACHC,GAAI,eACJC,IAAK,oBACLC,KAAM,0BAEVC,SAAU,CACNC,QAAS,cACTC,QAAS,gBACTC,SAAU,WACN,OAAQtxD,KAAKg0D,OACT,KAAK,EACD,MAAO,kBACX,KAAK,EACL,KAAK,EACD,MAAO,kBACX,KAAK,EACD,MAAO,kBACX,KAAK,EACD,MAAO,oBACX,KAAK,EACD,MAAO,kBACX,KAAK,EACD,MAAO,oBAGnBzC,QAAS,eACTC,SAAU,WACN,OAAQxxD,KAAKg0D,OACT,KAAK,EACD,MAAO,uBACX,KAAK,EACL,KAAK,EACD,MAAO,uBACX,KAAK,EACD,MAAO,uBACX,KAAK,EACL,KAAK,EACD,MAAO,uBACX,KAAK,EACD,MAAO,yBAGnBvC,SAAU,KAEdC,aAAc,CACVC,OAAQ,QACRC,KAAM,UACNx0C,EAAGo4C,EACH3D,GAAI2D,EACJxgD,EAAGwgD,EACH1D,GAAI0D,EACJzD,EAAGyD,EACHxD,GAAIwD,EACJr8B,EAAGq8B,EACHvD,GAAIuD,EACJtD,EAAGsD,EACHrD,GAAIqD,EACJpD,EAAGoD,EACHnD,GAAImD,GAERlD,uBAAwB,YACxBC,QAAS,MACTE,KAAM,CACFC,IAAK,EACLC,IAAK,KA7IyBzyD,CAAQ,EAAQ,2FCElD,SAAWkiD,GAAU,aAIzB,SAAS0T,EAAoBtD,EAAQQ,EAAentD,EAAKotD,GACrD,IAAI3sD,EAASksD,EAAS,IACtB,OAAQ3sD,GACJ,IAAK,IACD,OAAOmtD,GAAiBC,EAClB,eACA,kBACV,IAAK,KAUD,OARI3sD,GADW,IAAXksD,EACUQ,EAAgB,UAAY,UACpB,IAAXR,EACGQ,GAAiBC,EAAW,UAAY,WAC3CT,EAAS,EACNQ,GAAiBC,EAAW,UAAY,WAExC,UAGlB,IAAK,IACD,OAAOD,EAAgB,aAAe,aAC1C,IAAK,KAUD,OARI1sD,GADW,IAAXksD,EACUQ,EAAgB,SAAW,SACnB,IAAXR,EACGQ,GAAiBC,EAAW,SAAW,WAC1CT,EAAS,EACNQ,GAAiBC,EAAW,SAAW,WAEvCD,GAAiBC,EAAW,QAAU,YAGxD,IAAK,IACD,OAAOD,EAAgB,UAAY,UACvC,IAAK,KAUD,OARI1sD,GADW,IAAXksD,EACUQ,EAAgB,MAAQ,MAChB,IAAXR,EACGQ,GAAiBC,EAAW,MAAQ,QACvCT,EAAS,EACNQ,GAAiBC,EAAW,MAAQ,QAEpCD,GAAiBC,EAAW,KAAO,SAGrD,IAAK,IACD,OAAOD,GAAiBC,EAAW,SAAW,YAClD,IAAK,KAQD,OANI3sD,GADW,IAAXksD,EACUQ,GAAiBC,EAAW,MAAQ,OAC5B,IAAXT,EACGQ,GAAiBC,EAAW,MAAQ,UAEpCD,GAAiBC,EAAW,MAAQ,SAGtD,IAAK,IACD,OAAOD,GAAiBC,EAAW,WAAa,eACpD,IAAK,KAUD,OARI3sD,GADW,IAAXksD,EACUQ,GAAiBC,EAAW,QAAU,UAC9B,IAAXT,EACGQ,GAAiBC,EAAW,SAAW,WAC1CT,EAAS,EACNQ,GAAiBC,EAAW,SAAW,SAEvCD,GAAiBC,EAAW,UAAY,UAG1D,IAAK,IACD,OAAOD,GAAiBC,EAAW,WAAa,aACpD,IAAK,KAUD,OARI3sD,GADW,IAAXksD,EACUQ,GAAiBC,EAAW,OAAS,QAC7B,IAAXT,EACGQ,GAAiBC,EAAW,OAAS,SACxCT,EAAS,EACNQ,GAAiBC,EAAW,OAAS,OAErCD,GAAiBC,EAAW,MAAQ,SAMrD7Q,EAAO4N,aAAa,KAAM,CAC/BC,OAAQ,wFAAwFntC,MAC5F,KAEJotC,YAAa,8DAA8DptC,MACvE,KAEJ0xC,kBAAkB,EAClBrE,SAAU,sDAAsDrtC,MAAM,KACtEstC,cAAe,qCAAqCttC,MAAM,KAC1DutC,YAAa,uBAAuBvtC,MAAM,KAC1CqwC,oBAAoB,EACpBvC,eAAgB,CACZC,GAAI,OACJC,IAAK,UACLC,EAAG,eACHC,GAAI,eACJC,IAAK,oBACLC,KAAM,2BAEVC,SAAU,CACNC,QAAS,gBACTC,QAAS,gBAETC,SAAU,WACN,OAAQtxD,KAAKg0D,OACT,KAAK,EACD,MAAO,wBACX,KAAK,EACD,MAAO,sBACX,KAAK,EACD,MAAO,uBACX,KAAK,EACL,KAAK,EACL,KAAK,EACL,KAAK,EACD,MAAO,qBAGnBzC,QAAS,iBACTC,SAAU,WACN,OAAQxxD,KAAKg0D,OACT,KAAK,EACD,MAAO,+BACX,KAAK,EACD,MAAO,6BACX,KAAK,EACD,MAAO,8BACX,KAAK,EACL,KAAK,EACL,KAAK,EACL,KAAK,EACD,MAAO,4BAGnBvC,SAAU,KAEdC,aAAc,CACVC,OAAQ,SACRC,KAAM,UACNx0C,EAAG04C,EACHjE,GAAIiE,EACJ9gD,EAAG8gD,EACHhE,GAAIgE,EACJ/D,EAAG+D,EACH9D,GAAI8D,EACJ38B,EAAG28B,EACH7D,GAAI6D,EACJ5D,EAAG4D,EACH3D,GAAI2D,EACJ1D,EAAG0D,EACHzD,GAAIyD,GAERxD,uBAAwB,YACxBC,QAAS,MACTE,KAAM,CACFC,IAAK,EACLC,IAAK,KAxKyBzyD,CAAQ,EAAQ,2FCKlD,SAAWkiD,GAAU,aAIhBA,EAAO4N,aAAa,KAAM,CAC/BC,OAAQ,gFAAgFntC,MACpF,KAEJotC,YAAa,kDAAkDptC,MAAM,KACrEqtC,SAAU,4DAA4DrtC,MAClE,KAEJstC,cAAe,8BAA8BttC,MAAM,KACnDutC,YAAa,mBAAmBvtC,MAAM,KACtCqwC,oBAAoB,EACpB7C,cAAe,QACfC,KAAM,SAAU39C,GACZ,MAA2B,MAApBA,EAAMnN,OAAO,IAExB+qD,SAAU,SAAUC,EAAOC,EAASC,GAChC,OAAOF,EAAQ,GAAK,KAAO,MAE/BG,eAAgB,CACZC,GAAI,QACJC,IAAK,WACLC,EAAG,aACHC,GAAI,cACJC,IAAK,oBACLC,KAAM,2BAEVC,SAAU,CACNC,QAAS,cACTC,QAAS,gBACTC,SAAU,eACVC,QAAS,cACTC,SAAU,wBACVC,SAAU,KAEdC,aAAc,CACVC,OAAQ,QACRC,KAAM,aACNx0C,EAAG,eACHy0C,GAAI,aACJ78C,EAAG,aACH88C,GAAI,YACJC,EAAG,UACHC,GAAI,SACJ74B,EAAG,WACH84B,GAAI,UACJC,EAAG,WACHC,GAAI,UACJC,EAAG,UACHC,GAAI,WAERC,uBAAwB,YACxBC,QAAS,MACTE,KAAM,CACFC,IAAK,EACLC,IAAK,KA7DyBzyD,CAAQ,EAAQ,gGCElD,SAAWkiD,GAAU,aAIzB,IAAI6V,EAAa,CACbC,MAAO,CAEHrG,GAAI,CAAC,UAAW,UAAW,WAC3B78C,EAAG,CAAC,cAAe,gBACnB88C,GAAI,CAAC,QAAS,SAAU,UACxBC,EAAG,CAAC,YAAa,eACjBC,GAAI,CAAC,MAAO,OAAQ,QACpBC,GAAI,CAAC,MAAO,OAAQ,QACpBE,GAAI,CAAC,QAAS,SAAU,UACxBE,GAAI,CAAC,SAAU,SAAU,WAE7B8F,uBAAwB,SAAU3F,EAAQ4F,GACtC,OAAkB,IAAX5F,EACD4F,EAAQ,GACR5F,GAAU,GAAKA,GAAU,EACzB4F,EAAQ,GACRA,EAAQ,IAElB5C,UAAW,SAAUhD,EAAQQ,EAAentD,GACxC,IAAIuyD,EAAUH,EAAWC,MAAMryD,GAC/B,OAAmB,IAAfA,EAAIuJ,OACG4jD,EAAgBoF,EAAQ,GAAKA,EAAQ,GAGxC5F,EACA,IACAyF,EAAWE,uBAAuB3F,EAAQ4F,KAM7ChW,EAAO4N,aAAa,UAAW,CACxCC,OAAQ,mFAAmFntC,MACvF,KAEJotC,YAAa,2DAA2DptC,MACpE,KAEJ0xC,kBAAkB,EAClBrE,SAAU,sDAAsDrtC,MAAM,KACtEstC,cAAe,qCAAqCttC,MAAM,KAC1DutC,YAAa,uBAAuBvtC,MAAM,KAC1CqwC,oBAAoB,EACpBvC,eAAgB,CACZC,GAAI,OACJC,IAAK,UACLC,EAAG,cACHC,GAAI,gBACJC,IAAK,qBACLC,KAAM,4BAEVC,SAAU,CACNC,QAAS,eACTC,QAAS,eACTC,SAAU,WACN,OAAQtxD,KAAKg0D,OACT,KAAK,EACD,MAAO,sBACX,KAAK,EACD,MAAO,qBACX,KAAK,EACD,MAAO,sBACX,KAAK,EACL,KAAK,EACL,KAAK,EACL,KAAK,EACD,MAAO,oBAGnBzC,QAAS,cACTC,SAAU,WAUN,MATmB,CACf,2BACA,+BACA,4BACA,0BACA,8BACA,2BACA,4BAEgBxxD,KAAKg0D,QAE7BvC,SAAU,KAEdC,aAAc,CACVC,OAAQ,QACRC,KAAM,SACNx0C,EAAG,mBACHy0C,GAAIoG,EAAWzC,UACfxgD,EAAGijD,EAAWzC,UACd1D,GAAImG,EAAWzC,UACfzD,EAAGkG,EAAWzC,UACdxD,GAAIiG,EAAWzC,UACfr8B,EAAG,MACH84B,GAAIgG,EAAWzC,UACftD,EAAG,QACHC,GAAI8F,EAAWzC,UACfpD,EAAG,SACHC,GAAI4F,EAAWzC,WAEnBlD,uBAAwB,YACxBC,QAAS,MACTE,KAAM,CACFC,IAAK,EACLC,IAAK,KAjHyBzyD,CAAQ,EAAQ,2FCGlD,SAAWkiD,GAAU,aAIzB,IAAI6V,EAAa,CACbC,MAAO,CAEHrG,GAAI,CAAC,UAAW,UAAW,WAC3B78C,EAAG,CAAC,cAAe,gBACnB88C,GAAI,CAAC,QAAS,SAAU,UACxBC,EAAG,CAAC,YAAa,eACjBC,GAAI,CAAC,MAAO,OAAQ,QACpBC,GAAI,CAAC,MAAO,OAAQ,QACpBE,GAAI,CAAC,QAAS,SAAU,UACxBE,GAAI,CAAC,SAAU,SAAU,WAE7B8F,uBAAwB,SAAU3F,EAAQ4F,GACtC,OAAkB,IAAX5F,EACD4F,EAAQ,GACR5F,GAAU,GAAKA,GAAU,EACzB4F,EAAQ,GACRA,EAAQ,IAElB5C,UAAW,SAAUhD,EAAQQ,EAAentD,GACxC,IAAIuyD,EAAUH,EAAWC,MAAMryD,GAC/B,OAAmB,IAAfA,EAAIuJ,OACG4jD,EAAgBoF,EAAQ,GAAKA,EAAQ,GAGxC5F,EACA,IACAyF,EAAWE,uBAAuB3F,EAAQ4F,KAMjDhW,EAAO4N,aAAa,KAAM,CAC/BC,OAAQ,mFAAmFntC,MACvF,KAEJotC,YAAa,2DAA2DptC,MACpE,KAEJ0xC,kBAAkB,EAClBrE,SAAU,wDAAwDrtC,MAC9D,KAEJstC,cAAe,qCAAqCttC,MAAM,KAC1DutC,YAAa,uBAAuBvtC,MAAM,KAC1CqwC,oBAAoB,EACpBvC,eAAgB,CACZC,GAAI,OACJC,IAAK,UACLC,EAAG,cACHC,GAAI,gBACJC,IAAK,qBACLC,KAAM,4BAEVC,SAAU,CACNC,QAAS,eACTC,QAAS,eACTC,SAAU,WACN,OAAQtxD,KAAKg0D,OACT,KAAK,EACD,MAAO,uBACX,KAAK,EACD,MAAO,qBACX,KAAK,EACD,MAAO,sBACX,KAAK,EACL,KAAK,EACL,KAAK,EACL,KAAK,EACD,MAAO,oBAGnBzC,QAAS,cACTC,SAAU,WAUN,MATmB,CACf,4BACA,gCACA,4BACA,0BACA,8BACA,2BACA,4BAEgBxxD,KAAKg0D,QAE7BvC,SAAU,KAEdC,aAAc,CACVC,OAAQ,QACRC,KAAM,SACNx0C,EAAG,mBACHy0C,GAAIoG,EAAWzC,UACfxgD,EAAGijD,EAAWzC,UACd1D,GAAImG,EAAWzC,UACfzD,EAAGkG,EAAWzC,UACdxD,GAAIiG,EAAWzC,UACfr8B,EAAG,MACH84B,GAAIgG,EAAWzC,UACftD,EAAG,QACHC,GAAI8F,EAAWzC,UACfpD,EAAG,SACHC,GAAI4F,EAAWzC,WAEnBlD,uBAAwB,YACxBC,QAAS,MACTE,KAAM,CACFC,IAAK,EACLC,IAAK,KAnHyBzyD,CAAQ,EAAQ,2FCElD,SAAWkiD,GAAU,aAIhBA,EAAO4N,aAAa,KAAM,CAC/BC,OAAQ,mHAAmHntC,MACvH,KAEJotC,YAAa,kDAAkDptC,MAAM,KACrEqtC,SAAU,sEAAsErtC,MAC5E,KAEJstC,cAAe,8BAA8BttC,MAAM,KACnDutC,YAAa,uBAAuBvtC,MAAM,KAC1CqwC,oBAAoB,EACpBvC,eAAgB,CACZC,GAAI,SACJC,IAAK,YACLC,EAAG,aACHC,GAAI,cACJC,IAAK,qBACLC,KAAM,4BAEVC,SAAU,CACNC,QAAS,mBACTC,QAAS,kBACTC,SAAU,gBACVC,QAAS,iBACTC,SAAU,8BACVC,SAAU,KAEdC,aAAc,CACVC,OAAQ,SACRC,KAAM,iBACNx0C,EAAG,qBACHy0C,GAAI,cACJ78C,EAAG,SACH88C,GAAI,aACJC,EAAG,SACHC,GAAI,aACJ74B,EAAG,UACH84B,GAAI,cACJC,EAAG,UACHC,GAAI,cACJC,EAAG,UACHC,GAAI,eAER/B,cAAe,mCACfE,SAAU,SAAUC,EAAOC,EAASC,GAChC,OAAIF,EAAQ,GACD,UACAA,EAAQ,GACR,QACAA,EAAQ,GACR,aAEA,WAGf6D,aAAc,SAAUlB,EAAM5C,GAI1B,OAHa,KAAT4C,IACAA,EAAO,GAEM,YAAb5C,EACO4C,EACa,UAAb5C,EACA4C,GAAQ,GAAKA,EAAOA,EAAO,GACd,eAAb5C,GAA0C,YAAbA,EACvB,IAAT4C,EACO,EAEJA,EAAO,QAJX,GAOXd,uBAAwB,UACxBC,QAAS,KACTE,KAAM,CACFC,IAAK,EACLC,IAAK,KAjFyBzyD,CAAQ,EAAQ,2FCGlD,SAAWkiD,GAAU,aAIhBA,EAAO4N,aAAa,KAAM,CAC/BC,OAAQ,wFAAwFntC,MAC5F,KAEJotC,YAAa,kDAAkDptC,MAAM,KACrEqtC,SAAU,oDAAoDrtC,MAAM,KACpEstC,cAAe,8BAA8BttC,MAAM,KACnDutC,YAAa,uBAAuBvtC,MAAM,KAC1C8tC,eAAgB,CACZC,GAAI,QACJC,IAAK,WACLC,EAAG,aACHC,GAAI,cACJC,IAAK,0BACLC,KAAM,+BACNwE,IAAK,mBACLC,KAAM,wBAEVxE,SAAU,CACNC,QAAS,YACTC,QAAS,eACTE,QAAS,YACTD,SAAU,eACVE,SAAU,iBACVC,SAAU,KAEdC,aAAc,CACVC,OAAQ,QACRC,KAAM,eACNx0C,EAAG,iBACHy0C,GAAI,cACJ78C,EAAG,WACH88C,GAAI,aACJC,EAAG,WACHC,GAAI,YACJ74B,EAAG,SACH84B,GAAI,WACJC,EAAG,WACHC,GAAI,aACJC,EAAG,SACHC,GAAI,SAERC,uBAAwB,mBACxBC,QAAS,SAAUC,GACf,IAAI5zC,EAAI4zC,EAAS,GAWjB,OAAOA,GAT6B,MAAxBA,EAAS,IAAO,IACd,KACM,IAAN5zC,GAEM,IAANA,EADA,KAIA,OAIlB6zC,KAAM,CACFC,IAAK,EACLC,IAAK,KAlEyBzyD,CAAQ,EAAQ,2FCGlD,SAAWkiD,GAAU,aAIhBA,EAAO4N,aAAa,KAAM,CAC/BC,OAAQ,sFAAsFntC,MAC1F,KAEJotC,YAAa,kDAAkDptC,MAAM,KACrEqtC,SAAU,8DAA8DrtC,MACpE,KAEJstC,cAAe,kCAAkCttC,MAAM,KACvDutC,YAAa,uBAAuBvtC,MAAM,KAC1CqwC,oBAAoB,EACpBvC,eAAgB,CACZC,GAAI,UACJC,IAAK,WACLC,EAAG,aACHC,GAAI,cACJC,IAAK,oBACLC,KAAM,2BAEVC,SAAU,CACNC,QAAS,eACTC,QAAS,iBACTC,SAAU,8BACVC,QAAS,YACTC,SAAU,kCACVC,SAAU,KAEdC,aAAc,CACVC,OAAQ,aACRC,KAAM,WACNx0C,EAAG,aACHy0C,GAAI,aACJ78C,EAAG,cACH88C,GAAI,YACJC,EAAG,aACHC,GAAI,WACJ74B,EAAG,YACH84B,GAAI,UACJC,EAAG,cACHC,GAAI,WACJC,EAAG,cACHC,GAAI,YAERI,KAAM,CACFC,IAAK,EACLC,IAAK,KApDyBzyD,CAAQ,EAAQ,2FCGlD,SAAWkiD,GAAU,aAIzB,IAAImR,EAAY,CACR,EAAG,IACH,EAAG,IACH,EAAG,IACH,EAAG,IACH,EAAG,IACH,EAAG,IACH,EAAG,IACH,EAAG,IACH,EAAG,IACH,EAAG,KAEPE,EAAY,CACR,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,IACL,IAAK,KAGJrR,EAAO4N,aAAa,KAAM,CAC/BC,OAAQ,0FAA0FntC,MAC9F,KAEJotC,YAAa,0FAA0FptC,MACnG,KAEJqtC,SAAU,8FAA8FrtC,MACpG,KAEJstC,cAAe,mDAAmDttC,MAC9D,KAEJutC,YAAa,sBAAsBvtC,MAAM,KACzC8tC,eAAgB,CACZC,GAAI,QACJC,IAAK,WACLC,EAAG,aACHC,GAAI,cACJC,IAAK,qBACLC,KAAM,4BAEVC,SAAU,CACNC,QAAS,aACTC,QAAS,YACTC,SAAU,WACVC,QAAS,cACTC,SAAU,yBACVC,SAAU,KAEdC,aAAc,CACVC,OAAQ,SACRC,KAAM,UACNx0C,EAAG,oBACHy0C,GAAI,eACJ78C,EAAG,cACH88C,GAAI,gBACJC,EAAG,gBACHC,GAAI,eACJ74B,EAAG,WACH84B,GAAI,aACJC,EAAG,YACHC,GAAI,cACJC,EAAG,aACHC,GAAI,eAERC,uBAAwB,aACxBC,QAAS,SAAUC,GACf,OAAOA,EAAS,OAEpBgB,SAAU,SAAUjuD,GAChB,OAAOA,EAAOwP,QAAQ,iBAAiB,SAAUiH,GAC7C,OAAOy3C,EAAUz3C,OAGzBs3C,WAAY,SAAU/tD,GAClB,OAAOA,EAAOwP,QAAQ,OAAO,SAAUiH,GACnC,OAAOu3C,EAAUv3C,OAIzBs0C,cAAe,wCACfE,SAAU,SAAU4C,EAAMC,EAAQ1C,GAC9B,OAAIyC,EAAO,EACA,SACAA,EAAO,EACP,SACAA,EAAO,GACP,QACAA,EAAO,GACP,WACAA,EAAO,GACP,WACAA,EAAO,GACP,QAEA,UAGfkB,aAAc,SAAUlB,EAAM5C,GAI1B,OAHa,KAAT4C,IACAA,EAAO,GAEM,UAAb5C,EACO4C,EAAO,EAAIA,EAAOA,EAAO,GACZ,UAAb5C,GAAqC,SAAbA,GAEX,YAAbA,GACA4C,GAAQ,GAFRA,EAIAA,EAAO,IAGtBX,KAAM,CACFC,IAAK,EACLC,IAAK,KA/HyBzyD,CAAQ,EAAQ,2FCGlD,SAAWkiD,GAAU,aAIhBA,EAAO4N,aAAa,KAAM,CAC/BC,OAAQ,wFAAwFntC,MAC5F,KAEJotC,YAAa,mEAAmEptC,MAC5E,KAEJ0xC,kBAAkB,EAClBrE,SAAU,8DAA8DrtC,MACpE,KAEJstC,cAAe,kCAAkCttC,MAAM,KACvDutC,YAAa,qBAAqBvtC,MAAM,KACxC8tC,eAAgB,CACZC,GAAI,SACJC,IAAK,YACLC,EAAG,aACHC,GAAI,cACJC,IAAK,sBACLC,KAAM,6BAEVC,SAAU,CACNC,QAAS,YACTC,QAAS,YACTC,SAAU,WACVC,QAAS,aACTC,SAAU,gBACVC,SAAU,KAEdC,aAAc,CACVC,OAAQ,QACRC,KAAM,YACNx0C,EAAG,iBACHy0C,GAAI,aACJ78C,EAAG,YACH88C,GAAI,cACJC,EAAG,SACHC,GAAI,WACJ74B,EAAG,UACH84B,GAAI,YACJC,EAAG,SACHC,GAAI,WACJC,EAAG,cACHC,GAAI,iBAERC,uBAAwB,WACxBC,QAAS,MACTjC,cAAe,iCACfgE,aAAc,SAAUlB,EAAM5C,GAI1B,OAHa,KAAT4C,IACAA,EAAO,GAEM,WAAb5C,EACO4C,EAAO,EAAIA,EAAOA,EAAO,GACZ,SAAb5C,EACA4C,EACa,cAAb5C,EACA4C,GAAQ,GAAKA,EAAOA,EAAO,GACd,aAAb5C,EACA4C,EAAO,QADX,GAIX5C,SAAU,SAAU4C,EAAMC,EAAQ1C,GAC9B,OAAIyC,EAAO,EACA,SACAA,EAAO,GACP,OACAA,EAAO,GACP,YACAA,EAAO,GACP,WAEA,UAGfX,KAAM,CACFC,IAAK,EACLC,IAAK,KApFyBzyD,CAAQ,EAAQ,4FCKlD,SAAWkiD,GAAU,aAIfA,EAAO4N,aAAa,MAAO,CACjCC,OAAQ,0FAA0FntC,MAC9F,KAEJotC,YAAa,kDAAkDptC,MAAM,KACrEqtC,SAAU,kDAAkDrtC,MAAM,KAClEstC,cAAe,iCAAiCttC,MAAM,KACtDutC,YAAa,yBAAyBvtC,MAAM,KAC5C8tC,eAAgB,CACZC,GAAI,QACJC,IAAK,WACLC,EAAG,aACHC,GAAI,cACJC,IAAK,oBACLC,KAAM,2BAEVC,SAAU,CACNC,QAAS,gBACTC,QAAS,gBACTC,SAAU,gBACVC,QAAS,oBACTC,SAAU,+BACVC,SAAU,KAEdC,aAAc,CACVC,OAAQ,SACRC,KAAM,WACNx0C,EAAG,gBACHy0C,GAAI,aACJ78C,EAAG,aACH88C,GAAI,YACJC,EAAG,WACHC,GAAI,UACJ74B,EAAG,YACH84B,GAAI,WACJC,EAAG,YACHC,GAAI,WACJC,EAAG,YACHC,GAAI,YAERC,uBAAwB,uBACxBC,QAAS,SAAUC,GACf,IAAI5zC,EAAI4zC,EAAS,GAWjB,OAAOA,GAT6B,MAAxBA,EAAS,IAAO,IACd,KACM,IAAN5zC,EACA,KACM,IAANA,EACA,KACM,IAANA,EACA,KACA,OAGlB6zC,KAAM,CACFC,IAAK,EACLC,IAAK,KAhEyBzyD,CAAQ,EAAQ,2FCClD,SAAWkiD,GAAU,aAIzB,IAAIsR,EAAW,CACX,EAAG,MACH,EAAG,MACH,EAAG,MACH,EAAG,MACH,EAAG,MACH,EAAG,MACH,EAAG,MACH,EAAG,MACH,EAAG,MACH,EAAG,MACH,GAAI,MACJ,GAAI,MACJ,GAAI,MACJ,GAAI,MACJ,GAAI,MACJ,GAAI,MACJ,GAAI,MACJ,GAAI,MACJ,GAAI,MACJ,GAAI,MACJ,GAAI,MACJ,IAAK,OAGAtR,EAAO4N,aAAa,KAAM,CAC/BC,OAAQ,CACJroC,OAAQ,qFAAqF9E,MACzF,KAEJgxC,WAAY,yEAAyEhxC,MACjF,MAGRotC,YAAa,kDAAkDptC,MAAM,KACrEqtC,SAAU,yDAAyDrtC,MAC/D,KAEJstC,cAAe,8BAA8BttC,MAAM,KACnDutC,YAAa,uBAAuBvtC,MAAM,KAC1C8tC,eAAgB,CACZC,GAAI,QACJC,IAAK,WACLC,EAAG,aACHC,GAAI,cACJC,IAAK,oBACLC,KAAM,2BAEVC,SAAU,CACNC,QAAS,mBACTC,QAAS,mBACTE,QAAS,mBACTD,SAAU,kCACVE,SAAU,oCACVC,SAAU,KAEdC,aAAc,CACVC,OAAQ,WACRC,KAAM,SACNx0C,EAAG,eACHpI,EAAG,YACH88C,GAAI,YACJC,EAAG,UACHC,GAAI,UACJ74B,EAAG,SACH84B,GAAI,SACJC,EAAG,SACHC,GAAI,SACJC,EAAG,SACHC,GAAI,UAER/B,cAAe,qBACfgE,aAAc,SAAUlB,EAAM5C,GAI1B,OAHa,KAAT4C,IACAA,EAAO,GAEM,QAAb5C,EACO4C,EAAO,EAAIA,EAAOA,EAAO,GACZ,SAAb5C,EACA4C,EACa,QAAb5C,EACA4C,GAAQ,GAAKA,EAAOA,EAAO,GACd,UAAb5C,EACA4C,EAAO,QADX,GAIX5C,SAAU,SAAU4C,EAAMC,EAAQ1C,GAC9B,OAAIyC,EAAO,EACA,MACAA,EAAO,GACP,OACAA,EAAO,GACP,MACAA,EAAO,GACP,QAEA,OAGfd,uBAAwB,kBACxBC,QAAS,SAAUC,GAGf,OAAOA,GAAUkB,EAASlB,IAAWkB,EAF7BlB,EAAS,KAEmCkB,EAD5ClB,GAAU,IAAM,IAAM,QAGlCC,KAAM,CACFC,IAAK,EACLC,IAAK,KAlHyBzyD,CAAQ,EAAQ,2FCGlD,SAAWkiD,GAAU,aAIhBA,EAAO4N,aAAa,KAAM,CAC/BC,OAAQ,oGAAoGntC,MACxG,KAEJotC,YAAa,iEAAiEptC,MAC1E,KAEJ0xC,kBAAkB,EAClBrE,SAAU,iDAAiDrtC,MAAM,KACjEstC,cAAe,8CAA8CttC,MAAM,KACnEutC,YAAa,yBAAyBvtC,MAAM,KAC5CqwC,oBAAoB,EACpBvC,eAAgB,CACZC,GAAI,OACJC,IAAK,UACLC,EAAG,aACHC,GAAI,cACJC,IAAK,wBACLC,KAAM,oCAEVZ,cAAe,wBACfC,KAAM,SAAU39C,GACZ,MAAiB,eAAVA,GAEX49C,SAAU,SAAU4C,EAAMC,EAAQ1C,GAC9B,OAAIyC,EAAO,GACA,aAEA,cAGfjC,SAAU,CACNC,QAAS,mBACTC,QAAS,qBACTC,SAAU,qBACVC,QAAS,wBACTC,SAAU,6BACVC,SAAU,KAEdC,aAAc,CACVC,OAAQ,SACRC,KAAM,YACNx0C,EAAG,eACHy0C,GAAI,YACJ78C,EAAG,SACH88C,GAAI,UACJC,EAAG,YACHC,GAAI,aACJ74B,EAAG,QACH84B,GAAI,SACJiC,EAAG,YACHC,GAAI,aACJjC,EAAG,UACHC,GAAI,WACJC,EAAG,OACHC,GAAI,WA9D0BnyD,CAAQ,EAAQ,2FCGlD,SAAWkiD,GAAU,aAIzB,IAAIsR,EAAW,CACX,EAAG,QACH,EAAG,QACH,EAAG,QACH,GAAI,QACJ,GAAI,QACJ,EAAG,OACH,EAAG,OACH,GAAI,OACJ,GAAI,OACJ,EAAG,QACH,EAAG,QACH,IAAK,QACL,EAAG,OACH,EAAG,QACH,GAAI,QACJ,GAAI,QACJ,GAAI,QACJ,GAAI,SAGCtR,EAAO4N,aAAa,KAAM,CAC/BC,OAAQ,+EAA+EntC,MACnF,KAEJotC,YAAa,kDAAkDptC,MAAM,KACrEqtC,SAAU,wDAAwDrtC,MAC9D,KAEJstC,cAAe,8BAA8BttC,MAAM,KACnDutC,YAAa,uBAAuBvtC,MAAM,KAC1C8tC,eAAgB,CACZC,GAAI,QACJC,IAAK,WACLC,EAAG,aACHC,GAAI,cACJC,IAAK,oBACLC,KAAM,2BAEVC,SAAU,CACNC,QAAS,mBACTC,QAAS,mBACTC,SAAU,2BACVC,QAAS,YACTC,SAAU,0BACVC,SAAU,KAEdC,aAAc,CACVC,OAAQ,SACRC,KAAM,QACNx0C,EAAG,iBACHpI,EAAG,YACH88C,GAAI,WACJC,EAAG,YACHC,GAAI,WACJ74B,EAAG,UACH84B,GAAI,SACJC,EAAG,SACHC,GAAI,QACJC,EAAG,UACHC,GAAI,UAERE,QAAS,SAAUC,EAAQyB,GACvB,OAAQA,GACJ,IAAK,IACL,IAAK,IACL,IAAK,KACL,IAAK,KACD,OAAOzB,EACX,QACI,GAAe,IAAXA,EAEA,OAAOA,EAAS,QAEpB,IAAI/0C,EAAI+0C,EAAS,GAGjB,OAAOA,GAAUkB,EAASj2C,IAAMi2C,EAFvBlB,EAAS,IAAO/0C,IAEsBi2C,EADvClB,GAAU,IAAM,IAAM,SAI1CC,KAAM,CACFC,IAAK,EACLC,IAAK,KAzFyBzyD,CAAQ,EAAQ,8FCGlD,SAAWkiD,GAAU,aAIdA,EAAO4N,aAAa,QAAS,CACpCC,OAAQ,0FAA0FntC,MAC9F,KAEJotC,YAAa,kDAAkDptC,MAAM,KACrEqtC,SAAU,yDAAyDrtC,MAC/D,KAEJstC,cAAe,8BAA8BttC,MAAM,KACnDutC,YAAa,wBAAwBvtC,MAAM,KAC3C8tC,eAAgB,CACZC,GAAI,QACJC,IAAK,WACLC,EAAG,YACHC,GAAI,eACJC,IAAK,qBACLC,KAAM,6BAEVC,SAAU,CACNC,QAAS,oBACTC,QAAS,gBACTC,SAAU,0BACVC,QAAS,eACTC,SAAU,4BACVC,SAAU,KAEdC,aAAc,CACVC,OAAQ,gBACRC,KAAM,mBACNx0C,EAAG,gBACHy0C,GAAI,aACJ78C,EAAG,eACH88C,GAAI,YACJC,EAAG,aACHC,GAAI,UACJ74B,EAAG,aACH84B,GAAI,UACJC,EAAG,cACHC,GAAI,WACJC,EAAG,aACHC,GAAI,WAERC,uBAAwB,UACxBC,QAAS,SAAUC,GACf,OAAOA,GAEXC,KAAM,CACFC,IAAK,EACLC,IAAK,KAvDyBzyD,CAAQ,EAAQ,4FCGlD,SAAWkiD,GAAU,aAIzB,IAAIsW,EAAe,iDAAiD51C,MAAM,KA4B1E,SAAS0yC,EAAUhD,EAAQQ,EAAeztD,EAAQ0tD,GAC9C,IAAI0F,EAiBR,SAAsBnG,GAClB,IAAIoG,EAAU92C,KAAK+2C,MAAOrG,EAAS,IAAQ,KACvCsG,EAAMh3C,KAAK+2C,MAAOrG,EAAS,IAAO,IAClCuG,EAAMvG,EAAS,GACfwG,EAAO,GAUX,OATIJ,EAAU,IACVI,GAAQN,EAAaE,GAAW,SAEhCE,EAAM,IACNE,IAAkB,KAATA,EAAc,IAAM,IAAMN,EAAaI,GAAO,OAEvDC,EAAM,IACNC,IAAkB,KAATA,EAAc,IAAM,IAAMN,EAAaK,IAEpC,KAATC,EAAc,OAASA,EA/BbC,CAAazG,GAC9B,OAAQjtD,GACJ,IAAK,KACD,OAAOozD,EAAa,OACxB,IAAK,KACD,OAAOA,EAAa,OACxB,IAAK,KACD,OAAOA,EAAa,OACxB,IAAK,KACD,OAAOA,EAAa,OACxB,IAAK,KACD,OAAOA,EAAa,OACxB,IAAK,KACD,OAAOA,EAAa,QAqBtBvW,EAAO4N,aAAa,MAAO,CACjCC,OAAQ,kMAAkMntC,MACtM,KAEJotC,YAAa,0HAA0HptC,MACnI,KAEJ0xC,kBAAkB,EAClBrE,SAAU,2DAA2DrtC,MACjE,KAEJstC,cAAe,2DAA2DttC,MACtE,KAEJutC,YAAa,2DAA2DvtC,MACpE,KAEJ8tC,eAAgB,CACZC,GAAI,QACJC,IAAK,WACLC,EAAG,aACHC,GAAI,cACJC,IAAK,oBACLC,KAAM,2BAEVC,SAAU,CACNC,QAAS,cACTC,QAAS,cACTC,SAAU,MACVC,QAAS,cACTC,SAAU,MACVC,SAAU,KAEdC,aAAc,CACVC,OA/FR,SAAyBiE,GACrB,IAAIsD,EAAOtD,EASX,OAP+B,IAA3BA,EAAO1nD,QAAQ,OACTgrD,EAAKp3D,MAAM,GAAI,GAAK,OACO,IAA3B8zD,EAAO1nD,QAAQ,OACfgrD,EAAKp3D,MAAM,GAAI,GAAK,OACO,IAA3B8zD,EAAO1nD,QAAQ,OACfgrD,EAAKp3D,MAAM,GAAI,GAAK,MACpBo3D,EAAO,QAuFbtH,KAnFR,SAAuBgE,GACnB,IAAIsD,EAAOtD,EASX,OAP+B,IAA3BA,EAAO1nD,QAAQ,OACTgrD,EAAKp3D,MAAM,GAAI,GAAK,OACO,IAA3B8zD,EAAO1nD,QAAQ,OACfgrD,EAAKp3D,MAAM,GAAI,GAAK,OACO,IAA3B8zD,EAAO1nD,QAAQ,OACfgrD,EAAKp3D,MAAM,GAAI,GAAK,MACpBo3D,EAAO,QA2Eb97C,EAAG,UACHy0C,GAAI2D,EACJxgD,EAAG,UACH88C,GAAI0D,EACJzD,EAAG,UACHC,GAAIwD,EACJr8B,EAAG,UACH84B,GAAIuD,EACJtD,EAAG,UACHC,GAAIqD,EACJpD,EAAG,UACHC,GAAImD,GAERlD,uBAAwB,YACxBC,QAAS,MACTE,KAAM,CACFC,IAAK,EACLC,IAAK,KA3HyBzyD,CAAQ,EAAQ,2FCIlD,SAAWkiD,GAAU,aAIzB,IAAIsR,EAAW,CACX,EAAG,QACH,EAAG,QACH,EAAG,QACH,GAAI,QACJ,GAAI,QACJ,EAAG,OACH,EAAG,OACH,GAAI,OACJ,GAAI,OACJ,EAAG,QACH,EAAG,QACH,IAAK,QACL,EAAG,OACH,EAAG,QACH,GAAI,QACJ,GAAI,QACJ,GAAI,QACJ,GAAI,SAGCtR,EAAO4N,aAAa,KAAM,CAC/BC,OAAQ,6EAA6EntC,MACjF,KAEJotC,YAAa,kDAAkDptC,MAAM,KACrEqtC,SAAU,wDAAwDrtC,MAC9D,KAEJstC,cAAe,8BAA8BttC,MAAM,KACnDutC,YAAa,uBAAuBvtC,MAAM,KAC1C0tC,SAAU,SAAUC,EAAOC,EAASC,GAChC,OAAIF,EAAQ,GACDE,EAAU,KAAO,KAEjBA,EAAU,KAAO,MAGhCL,cAAe,cACfC,KAAM,SAAU39C,GACZ,MAAiB,OAAVA,GAA4B,OAAVA,GAE7Bg+C,eAAgB,CACZC,GAAI,QACJC,IAAK,WACLC,EAAG,aACHC,GAAI,cACJC,IAAK,oBACLC,KAAM,2BAEVC,SAAU,CACNC,QAAS,kBACTC,QAAS,kBACTC,SAAU,2BACVC,QAAS,WACTC,SAAU,yBACVC,SAAU,KAEdC,aAAc,CACVC,OAAQ,WACRC,KAAM,UACNx0C,EAAG,gBACHy0C,GAAI,YACJ78C,EAAG,aACH88C,GAAI,YACJC,EAAG,WACHC,GAAI,UACJ74B,EAAG,UACH84B,GAAI,SACJiC,EAAG,YACHC,GAAI,WACJjC,EAAG,SACHC,GAAI,QACJC,EAAG,UACHC,GAAI,UAERE,QAAS,SAAUC,EAAQyB,GACvB,OAAQA,GACJ,IAAK,IACL,IAAK,IACL,IAAK,KACL,IAAK,KACD,OAAOzB,EACX,QACI,GAAe,IAAXA,EAEA,OAAOA,EAAS,QAEpB,IAAI/0C,EAAI+0C,EAAS,GAGjB,OAAOA,GAAUkB,EAASj2C,IAAMi2C,EAFvBlB,EAAS,IAAO/0C,IAEsBi2C,EADvClB,GAAU,IAAM,IAAM,SAI1CC,KAAM,CACFC,IAAK,EACLC,IAAK,KAvGyBzyD,CAAQ,EAAQ,4FCGlD,SAAWkiD,GAAU,aAiEzB,SAAS0T,EAAoBtD,EAAQQ,EAAentD,EAAKotD,GACrD,IAAIrrC,EAAS,CACTxK,EAAG,CAAC,kBAAmB,mBACvBy0C,GAAI,CAACW,EAAS,WAAiBA,EAAS,YACxCx9C,EAAG,CAAC,UAAW,cACf88C,GAAI,CAACU,EAAS,SAAeA,EAAS,UACtCT,EAAG,CAAC,UAAW,eACfC,GAAI,CAACQ,EAAS,SAAeA,EAAS,UACtCr5B,EAAG,CAAC,UAAW,eACf84B,GAAI,CAACO,EAAS,SAAeA,EAAS,UACtCN,EAAG,CAAC,SAAU,aACdC,GAAI,CAACK,EAAS,SAAeA,EAAS,UACtCJ,EAAG,CAAC,QAAS,YACbC,GAAI,CAACG,EAAS,OAAaA,EAAS,SAExC,OAAOS,GAEDD,EADAprC,EAAO/hB,GAAK,GAGZ+hB,EAAO/hB,GAAK,GA9EZu8C,EAAO4N,aAAa,MAAO,CACjCC,OAAQ,sFAAsFntC,MAC1F,KAEJotC,YAAa,kDAAkDptC,MAAM,KACrEqtC,SAAU,sDAAsDrtC,MAAM,KACtEstC,cAAe,8BAA8BttC,MAAM,KACnDutC,YAAa,uBAAuBvtC,MAAM,KAC1C8tC,eAAgB,CACZC,GAAI,QACJC,IAAK,WACLC,EAAG,aACHC,GAAI,wBACJC,IAAK,8BACLC,KAAM,0CAEVZ,cAAe,aACfC,KAAM,SAAU39C,GACZ,MAAO,QAAUA,EAAMsU,eAE3BspC,SAAU,SAAUC,EAAOC,EAASC,GAChC,OAAIF,EAAQ,GACDE,EAAU,MAAQ,MAElBA,EAAU,MAAQ,OAGjCQ,SAAU,CACNC,QAAS,cACTC,QAAS,cACTC,SAAU,cACVC,QAAS,eACTC,SAAU,8BACVC,SAAU,KAEdC,aAAc,CACVC,OAAQ,YACRC,KAAM,OACNx0C,EAAG04C,EACHjE,GAAIiE,EACJ9gD,EAAG8gD,EACHhE,GAAIgE,EACJ/D,EAAG+D,EACH9D,GAAI8D,EACJ38B,EAAG28B,EACH7D,GAAI6D,EACJ5D,EAAG4D,EACH3D,GAAI2D,EACJ1D,EAAG0D,EACHzD,GAAIyD,GAERxD,uBAAwB,YACxBC,QAAS,MACTE,KAAM,CACFC,IAAK,EACLC,IAAK,KAhEyBzyD,CAAQ,EAAQ,iGCElD,SAAWkiD,GAAU,aAIXA,EAAO4N,aAAa,WAAY,CAC1CC,OAAQ,wFAAwFntC,MAC5F,KAEJotC,YAAa,wFAAwFptC,MACjG,KAEJqtC,SAAU,kDAAkDrtC,MAAM,KAClEstC,cAAe,kDAAkDttC,MAAM,KACvEutC,YAAa,kDAAkDvtC,MAAM,KACrE8tC,eAAgB,CACZC,GAAI,QACJC,IAAK,WACLC,EAAG,aACHC,GAAI,cACJC,IAAK,oBACLC,KAAM,0BAEVC,SAAU,CACNC,QAAS,eACTC,QAAS,cACTC,SAAU,cACVC,QAAS,gBACTC,SAAU,cACVC,SAAU,KAEdC,aAAc,CACVC,OAAQ,iBACRC,KAAM,SACNx0C,EAAG,OACHy0C,GAAI,UACJ78C,EAAG,QACH88C,GAAI,WACJC,EAAG,OACHC,GAAI,cACJ74B,EAAG,MACH84B,GAAI,WACJC,EAAG,QACHC,GAAI,YACJC,EAAG,QACHC,GAAI,aAERI,KAAM,CACFC,IAAK,EACLC,IAAK,MAnDyBzyD,CAAQ,EAAQ,4FCGlD,SAAWkiD,GAAU,aAIfA,EAAO4N,aAAa,MAAO,CACjCC,OAAQ,kFAAkFntC,MACtF,KAEJotC,YAAa,kFAAkFptC,MAC3F,KAEJqtC,SAAU,kDAAkDrtC,MAAM,KAClEstC,cAAe,kDAAkDttC,MAAM,KACvEutC,YAAa,kDAAkDvtC,MAAM,KACrE8tC,eAAgB,CACZC,GAAI,QACJC,IAAK,WACLC,EAAG,aACHC,GAAI,cACJC,IAAK,oBACLC,KAAM,0BAEVC,SAAU,CACNC,QAAS,cACTC,QAAS,cACTC,SAAU,cACVC,QAAS,eACTC,SAAU,cACVC,SAAU,KAEdC,aAAc,CACVC,OAAQ,gBACRC,KAAM,SACNx0C,EAAG,OACHy0C,GAAI,UACJ78C,EAAG,QACH88C,GAAI,WACJC,EAAG,OACHC,GAAI,cACJ74B,EAAG,MACH84B,GAAI,WACJC,EAAG,QACHC,GAAI,YACJC,EAAG,QACHC,GAAI,aAERI,KAAM,CACFC,IAAK,EACLC,IAAK,MAnDyBzyD,CAAQ,EAAQ,8FCGlD,SAAWkiD,GAAU,aAIdA,EAAO4N,aAAa,QAAS,CACpCC,OAAQ,sFAAsFntC,MAC1F,KAEJotC,YAAa,sFAAsFptC,MAC/F,KAEJqtC,SAAU,yDAAyDrtC,MAC/D,KAEJstC,cAAe,uBAAuBttC,MAAM,KAC5CutC,YAAa,uBAAuBvtC,MAAM,KAC1C8tC,eAAgB,CACZC,GAAI,QACJC,IAAK,WACLC,EAAG,aACHC,GAAI,0BACJC,IAAK,iCACLC,KAAM,wCAEVZ,cAAe,qDACfgE,aAAc,SAAUlB,EAAM5C,GAI1B,OAHa,KAAT4C,IACAA,EAAO,GAGM,eAAb5C,GACa,UAAbA,GACa,iBAAbA,EAEO4C,EACa,iBAAb5C,GAA4C,QAAbA,EAC/B4C,EAAO,GAEPA,GAAQ,GAAKA,EAAOA,EAAO,IAG1C5C,SAAU,SAAU4C,EAAMC,EAAQ1C,GAC9B,IAAIwI,EAAY,IAAP/F,EAAaC,EACtB,OAAI8F,EAAK,IACE,aACAA,EAAK,IACL,QACAA,EAAK,KACL,eACAA,EAAK,KACL,MACAA,EAAK,KACL,eAEA,OAGfhI,SAAU,CACNC,QAAS,mBACTC,QAAS,kBACTC,SAAU,4BACVC,QAAS,eACTC,SAAU,6BACVC,SAAU,KAEdC,aAAc,CACVC,OAAQ,WACRC,KAAM,WACNx0C,EAAG,eACHy0C,GAAI,YACJ78C,EAAG,YACH88C,GAAI,WACJC,EAAG,YACHC,GAAI,WACJ74B,EAAG,UACH84B,GAAI,SACJC,EAAG,UACHC,GAAI,SACJC,EAAG,UACHC,GAAI,UAGRC,uBAAwB,6BACxBC,QAAS,SAAUC,EAAQyB,GACvB,OAAQA,GACJ,IAAK,IACL,IAAK,IACL,IAAK,MACD,OAAOzB,EAAS,QACpB,IAAK,IACL,IAAK,IACD,OAAOA,EAAS,SACpB,QACI,OAAOA,IAGnBgB,SAAU,SAAUjuD,GAChB,OAAOA,EAAOwP,QAAQ,KAAM,MAEhCu+C,WAAY,SAAU/tD,GAClB,OAAOA,EAAOwP,QAAQ,KAAM,MAEhC09C,KAAM,CAEFC,IAAK,EACLC,IAAK,KA5GyBzyD,CAAQ,EAAQ,2FCIlD,SAAWkiD,GAAU,aAYzB,SAASuR,EAAuBnB,EAAQQ,EAAentD,GASnD,MAAY,MAARA,EACOmtD,EAAgB,UAAY,UACpB,MAARntD,EACAmtD,EAAgB,SAAW,SAE3BR,EAAS,KAtBFoB,GAsB6BpB,EArB3CqB,EAQS,CACThC,GAAImB,EAAgB,yBAA2B,yBAC/ClB,GAAIkB,EAAgB,yBAA2B,yBAC/ChB,GAAIgB,EAAgB,sBAAwB,sBAC5Cf,GAAI,gBACJE,GAAI,wBACJE,GAAI,kBAOgCxsD,GArBvBid,MAAM,KAChB8wC,EAAM,IAAO,GAAKA,EAAM,KAAQ,GACjCC,EAAM,GACND,EAAM,IAAM,GAAKA,EAAM,IAAM,IAAMA,EAAM,IAAM,IAAMA,EAAM,KAAO,IAClEC,EAAM,GACNA,EAAM,IANhB,IAAsBD,EACdC,EAsDR,SAASuF,EAAqBpoD,GAC1B,OAAO,WACH,OAAOA,EAAM,KAAwB,KAAjBhR,KAAKywD,QAAiB,IAAM,IAAM,QAIrDrO,EAAO4N,aAAa,KAAM,CAC/BC,OAAQ,CACJroC,OAAQ,yFAAyF9E,MAC7F,KAEJgxC,WAAY,iGAAiGhxC,MACzG,MAGRotC,YAAa,yDAAyDptC,MAClE,KAEJqtC,SAhDJ,SAA6Bn7C,EAAG4S,GAC5B,IAAIuoC,EAAW,CACPkJ,WAAY,0DAA0Dv2C,MAClE,KAEJw2C,WAAY,0DAA0Dx2C,MAClE,KAEJy2C,SAAU,4DAA4Dz2C,MAClE,MAKZ,OAAU,IAAN9N,EACOm7C,EAAqB,WACvBruD,MAAM,EAAG,GACTM,OAAO+tD,EAAqB,WAAEruD,MAAM,EAAG,IAE3CkT,EASEm7C,EALI,qBAAqBhtC,KAAKyE,GAC/B,aACA,sCAAsCzE,KAAKyE,GAC3C,WACA,cACoB5S,EAAEg/C,OARjB7D,EAAqB,YA6BhCC,cAAe,uBAAuBttC,MAAM,KAC5CutC,YAAa,uBAAuBvtC,MAAM,KAC1C8tC,eAAgB,CACZC,GAAI,QACJC,IAAK,WACLC,EAAG,aACHC,GAAI,iBACJC,IAAK,wBACLC,KAAM,+BAEVC,SAAU,CACNC,QAASgI,EAAqB,cAC9B/H,QAAS+H,EAAqB,YAC9B7H,QAAS6H,EAAqB,WAC9B9H,SAAU8H,EAAqB,cAC/B5H,SAAU,WACN,OAAQxxD,KAAKg0D,OACT,KAAK,EACL,KAAK,EACL,KAAK,EACL,KAAK,EACD,OAAOoF,EAAqB,oBAAoBr3D,KAAK/B,MACzD,KAAK,EACL,KAAK,EACL,KAAK,EACD,OAAOo5D,EAAqB,qBAAqBr3D,KAAK/B,QAGlEyxD,SAAU,KAEdC,aAAc,CACVC,OAAQ,QACRC,KAAM,UACNx0C,EAAG,kBACHy0C,GAAI8B,EACJ3+C,EAAG2+C,EACH7B,GAAI6B,EACJ5B,EAAG,SACHC,GAAI2B,EACJx6B,EAAG,OACH84B,GAAI0B,EACJzB,EAAG,SACHC,GAAIwB,EACJvB,EAAG,MACHC,GAAIsB,GAGRrD,cAAe,wBACfC,KAAM,SAAU39C,GACZ,MAAO,iBAAiBuQ,KAAKvQ,IAEjC49C,SAAU,SAAU4C,EAAMC,EAAQ1C,GAC9B,OAAIyC,EAAO,EACA,OACAA,EAAO,GACP,QACAA,EAAO,GACP,MAEA,UAGfd,uBAAwB,iBACxBC,QAAS,SAAUC,EAAQyB,GACvB,OAAQA,GACJ,IAAK,IACL,IAAK,IACL,IAAK,MACL,IAAK,IACL,IAAK,IACD,OAAOzB,EAAS,KACpB,IAAK,IACD,OAAOA,EAAS,MACpB,QACI,OAAOA,IAGnBC,KAAM,CACFC,IAAK,EACLC,IAAK,KAhKyBzyD,CAAQ,EAAQ,2FCGlD,SAAWkiD,GAAU,aAIzB,IAAI6N,EAAS,CACL,QACA,QACA,OACA,QACA,MACA,MACA,SACA,OACA,QACA,SACA,QACA,SAEJwI,EAAO,CAAC,QAAS,MAAO,OAAQ,MAAO,SAAU,OAAQ,QAEpDrW,EAAO4N,aAAa,KAAM,CAC/BC,OAAQA,EACRC,YAAaD,EACbE,SAAUsI,EACVrI,cAAeqI,EACfpI,YAAaoI,EACb7H,eAAgB,CACZC,GAAI,QACJC,IAAK,WACLC,EAAG,aACHC,GAAI,cACJC,IAAK,oBACLC,KAAM,2BAEVZ,cAAe,UACfC,KAAM,SAAU39C,GACZ,MAAO,QAAUA,GAErB49C,SAAU,SAAU4C,EAAMC,EAAQ1C,GAC9B,OAAIyC,EAAO,GACA,MAEJ,OAEXjC,SAAU,CACNC,QAAS,eACTC,QAAS,eACTC,SAAU,iBACVC,QAAS,sBACTC,SAAU,yBACVC,SAAU,KAEdC,aAAc,CACVC,OAAQ,SACRC,KAAM,SACNx0C,EAAG,YACHy0C,GAAI,WACJ78C,EAAG,UACH88C,GAAI,SACJC,EAAG,YACHC,GAAI,WACJ74B,EAAG,SACH84B,GAAI,QACJC,EAAG,UACHC,GAAI,SACJC,EAAG,UACHC,GAAI,UAERmB,SAAU,SAAUjuD,GAChB,OAAOA,EAAOwP,QAAQ,KAAM,MAEhCu+C,WAAY,SAAU/tD,GAClB,OAAOA,EAAOwP,QAAQ,KAAM,MAEhC09C,KAAM,CACFC,IAAK,EACLC,IAAK,KA/EyBzyD,CAAQ,EAAQ,gGCElD,SAAWkiD,GAAU,aAIZA,EAAO4N,aAAa,UAAW,CACxCC,OAAQ,6EAA6EntC,MACjF,KAEJotC,YAAa,oDAAoDptC,MAAM,KACvEqtC,SAAU,+DAA+DrtC,MACrE,KAEJstC,cAAe,kCAAkCttC,MAAM,KACvDutC,YAAa,yBAAyBvtC,MAAM,KAC5C8tC,eAAgB,CACZC,GAAI,QACJC,IAAK,WACLC,EAAG,aACHC,GAAI,cACJC,IAAK,oBACLC,KAAM,2BAEVC,SAAU,CACNC,QAAS,uBACTC,QAAS,mBACTC,SAAU,2BACVC,QAAS,uBACTC,SAAU,oCACVC,SAAU,KAEdC,aAAc,CACVC,OAAQ,kBACRC,KAAM,qBACNx0C,EAAG,SACHy0C,GAAI,YACJ78C,EAAG,aACH88C,GAAI,YACJC,EAAG,WACHC,GAAI,UACJ74B,EAAG,UACH84B,GAAI,SACJC,EAAG,SACHC,GAAI,QACJC,EAAG,UACHC,GAAI,UAERI,KAAM,CACFC,IAAK,EACLC,IAAK,KAnDyBzyD,CAAQ,EAAQ,2FCGlD,SAAWkiD,GAAU,aAIhBA,EAAO4N,aAAa,KAAM,CAC/BC,OAAQ,yEAAyEntC,MAC7E,KAEJotC,YAAa,kDAAkDptC,MAAM,KACrEqtC,SAAU,uDAAuDrtC,MAAM,KACvEstC,cAAe,8BAA8BttC,MAAM,KACnDutC,YAAa,uBAAuBvtC,MAAM,KAC1C8tC,eAAgB,CACZC,GAAI,QACJC,IAAK,WACLC,EAAG,aACHC,GAAI,cACJC,IAAK,oBACLC,KAAM,2BAEVC,SAAU,CACNC,QAAS,uBACTC,QAAS,mBACTC,SAAU,2BACVC,QAAS,sBACTC,SAAU,mCACVC,SAAU,KAEdC,aAAc,CACVC,OAAQ,gBACRC,KAAM,oBACNx0C,EAAG,SACHy0C,GAAI,YACJ78C,EAAG,aACH88C,GAAI,YACJC,EAAG,WACHC,GAAI,UACJ74B,EAAG,UACH84B,GAAI,SACJC,EAAG,SACHC,GAAI,QACJC,EAAG,UACHC,GAAI,UAERI,KAAM,CACFC,IAAK,EACLC,IAAK,KAjDyBzyD,CAAQ,EAAQ,2FCIlD,SAAWkiD,GAAU,aAIhBA,EAAO4N,aAAa,KAAM,CAC/BC,OAAQ,qGAAqGntC,MACzG,KAEJotC,YAAa,sFAAsFptC,MAC/F,KAEJ0xC,kBAAkB,EAClBrE,SAAU,yDAAyDrtC,MAC/D,KAEJstC,cAAe,uBAAuBttC,MAAM,KAC5CutC,YAAa,uBAAuBvtC,MAAM,KAC1CqwC,oBAAoB,EACpB7C,cAAe,SACfC,KAAM,SAAU39C,GACZ,MAAO,QAAQuQ,KAAKvQ,IAExB49C,SAAU,SAAUC,EAAOC,EAASC,GAChC,OAAIF,EAAQ,GACDE,EAAU,KAAO,KAEjBA,EAAU,KAAO,MAGhCC,eAAgB,CACZC,GAAI,QACJC,IAAK,WACLC,EAAG,aACHC,GAAI,oBACJC,IAAK,0BACLC,KAAM,gCACNz+B,EAAG,YACHgjC,GAAI,aACJC,IAAK,mBACLC,KAAM,yBAEVxE,SAAU,CACNC,QAAS,mBACTC,QAAS,oBACTC,SAAU,yBACVC,QAAS,mBACTC,SAAU,2BACVC,SAAU,KAEdC,aAAc,CACVC,OAAQ,SACRC,KAAM,WACNx0C,EAAG,WACHy0C,GAAI,UACJ78C,EAAG,WACH88C,GAAI,UACJC,EAAG,UACHC,GAAI,SACJ74B,EAAG,WACH84B,GAAI,UACJiC,EAAG,WACHC,GAAI,UACJjC,EAAG,YACHC,GAAI,WACJC,EAAG,UACHC,GAAI,UAERC,uBAAwB,UACxBC,QAAS,SAAUC,GACf,OAAOA,GAEXC,KAAM,CACFC,IAAK,EACLC,IAAK,KA5EyBzyD,CAAQ,EAAQ,iGCElD,SAAWkiD,GAAU,aAIXA,EAAO4N,aAAa,WAAY,CAC1CC,OAAQ,6GAA6GntC,MACjH,KAEJotC,YAAa,8DAA8DptC,MACvE,KAEJ0xC,kBAAkB,EAClBrE,SAAU,yEAAyErtC,MAC/E,KAEJstC,cAAe,qCAAqCttC,MAAM,KAC1DutC,YAAa,4BAA4BvtC,MAAM,KAC/CqwC,oBAAoB,EACpBvC,eAAgB,CACZC,GAAI,QACJE,EAAG,aACHC,GAAI,cACJC,IAAK,oBACLC,KAAM,2BAEVC,SAAU,CACNC,QAAS,kBACTC,QAAS,sBACTC,SAAU,eACVC,QAAS,uBACTC,SAAU,uBACVC,SAAU,KAEdC,aAAc,CACVC,OAAQ,SACRC,KAAM,UACNx0C,EAAG,mBACHy0C,GAAI,eACJ78C,EAAG,aACH88C,GAAI,eACJC,EAAG,YACHC,GAAI,YACJ74B,EAAG,SACH84B,GAAI,WACJC,EAAG,YACHC,GAAI,cACJC,EAAG,UACHC,GAAI,aAERC,uBAAwB,uBACxBC,QAAS,SAAUC,GACf,IAAI5zC,EAAI4zC,EAAS,GAWjB,OAAOA,GAT6B,MAAxBA,EAAS,IAAO,IACd,KACM,IAAN5zC,EACA,KACM,IAANA,EACA,KACM,IAANA,EACA,KACA,OAGlB6zC,KAAM,CACFC,IAAK,EACLC,IAAK,KArEyBzyD,CAAQ,EAAQ,2FCGlD,SAAWkiD,GAAU,aAIhBA,EAAO4N,aAAa,KAAM,CAC/BC,OAAQ,0FAA0FntC,MAC9F,KAEJotC,YAAa,gEAAgEptC,MAAM,KACnFqtC,SAAU,uDAAuDrtC,MAAM,KACvEstC,cAAe,sCAAsCttC,MAAM,KAC3DutC,YAAa,2BAA2BvtC,MAAM,KAC9C8tC,eAAgB,CACZC,GAAI,SACJC,IAAK,YACLC,EAAG,aACHC,GAAI,cACJC,IAAK,qBACLC,KAAM,4BAEVC,SAAU,CACNC,QAAS,gBACTC,QAAS,eACTC,SAAU,8BACVC,QAAS,eACTC,SAAU,6BACVC,SAAU,KAEdC,aAAc,CACVC,OAAQ,SACRC,KAAM,WACNx0C,EAAG,oBACHy0C,GAAI,WACJ78C,EAAG,cACH88C,GAAI,aACJC,EAAG,cACHC,GAAI,aACJ74B,EAAG,WACH84B,GAAI,UACJC,EAAG,WACHC,GAAI,UACJC,EAAG,YACHC,GAAI,YAERC,uBAAwB,gBACxBC,QAAS,UACTE,KAAM,CACFC,IAAK,EACLC,IAAK,KAnDyBzyD,CAAQ,EAAQ,8FCKlD,SAAWkiD,GAAU,aAIdA,EAAO4N,aAAa,QAAS,CACpCC,OAAQ,wCAAwCntC,MAC5C,KAEJotC,YAAa,yCAAyCptC,MAClD,KAEJqtC,SAAU,8BAA8BrtC,MAAM,KAC9CstC,cAAe,uBAAuBttC,MAAM,KAC5CutC,YAAa,gBAAgBvtC,MAAM,KACnC8tC,eAAgB,CACZC,GAAI,QACJC,IAAK,WACLC,EAAG,aACHC,GAAI,YACJC,IAAK,kBACLC,KAAM,sBACNz+B,EAAG,WACHgjC,GAAI,YACJC,IAAK,kBACLC,KAAM,uBAEVrF,cAAe,oBACfgE,aAAc,SAAUlB,EAAM5C,GAI1B,OAHa,KAAT4C,IACAA,EAAO,GAEM,OAAb5C,GAAkC,OAAbA,GAAkC,OAAbA,EACnC4C,EACa,OAAb5C,GAAkC,OAAbA,EACrB4C,EAAO,GAGPA,GAAQ,GAAKA,EAAOA,EAAO,IAG1C5C,SAAU,SAAU4C,EAAMC,EAAQ1C,GAC9B,IAAIwI,EAAY,IAAP/F,EAAaC,EACtB,OAAI8F,EAAK,IACE,KACAA,EAAK,IACL,KACAA,EAAK,KACL,KACAA,EAAK,KACL,KACAA,EAAK,KACL,KAEA,MAGfhI,SAAU,CACNC,QAAS,SACTC,QAAS,SACTC,SAAU,SAAUkG,GAChB,OAAIA,EAAI/E,SAAWzyD,KAAKyyD,OACb,WAEA,YAGflB,QAAS,SACTC,SAAU,SAAUgG,GAChB,OAAIx3D,KAAKyyD,SAAW+E,EAAI/E,OACb,WAEA,YAGfhB,SAAU,KAEda,uBAAwB,iBACxBC,QAAS,SAAUC,EAAQyB,GACvB,OAAQA,GACJ,IAAK,IACL,IAAK,IACL,IAAK,MACD,OAAOzB,EAAS,IACpB,IAAK,IACD,OAAOA,EAAS,IACpB,IAAK,IACL,IAAK,IACD,OAAOA,EAAS,IACpB,QACI,OAAOA,IAGnBd,aAAc,CACVC,OAAQ,MACRC,KAAM,MACNx0C,EAAG,KACHy0C,GAAI,OACJ78C,EAAG,OACH88C,GAAI,QACJC,EAAG,OACHC,GAAI,QACJ74B,EAAG,MACH84B,GAAI,OACJiC,EAAG,MACHC,GAAI,OACJjC,EAAG,OACHC,GAAI,QACJC,EAAG,MACHC,GAAI,QAERI,KAAM,CAEFC,IAAK,EACLC,IAAK,KApHyBzyD,CAAQ,EAAQ,8FCIlD,SAAWkiD,GAAU,aAIdA,EAAO4N,aAAa,QAAS,CACpCC,OAAQ,wCAAwCntC,MAC5C,KAEJotC,YAAa,yCAAyCptC,MAClD,KAEJqtC,SAAU,8BAA8BrtC,MAAM,KAC9CstC,cAAe,uBAAuBttC,MAAM,KAC5CutC,YAAa,gBAAgBvtC,MAAM,KACnC8tC,eAAgB,CACZC,GAAI,QACJC,IAAK,WACLC,EAAG,aACHC,GAAI,YACJC,IAAK,kBACLC,KAAM,sBACNz+B,EAAG,WACHgjC,GAAI,YACJC,IAAK,kBACLC,KAAM,uBAEVrF,cAAe,oBACfgE,aAAc,SAAUlB,EAAM5C,GAI1B,OAHa,KAAT4C,IACAA,EAAO,GAEM,OAAb5C,GAAkC,OAAbA,GAAkC,OAAbA,EACnC4C,EACa,OAAb5C,EACA4C,GAAQ,GAAKA,EAAOA,EAAO,GACd,OAAb5C,GAAkC,OAAbA,EACrB4C,EAAO,QADX,GAIX5C,SAAU,SAAU4C,EAAMC,EAAQ1C,GAC9B,IAAIwI,EAAY,IAAP/F,EAAaC,EACtB,OAAI8F,EAAK,IACE,KACAA,EAAK,IACL,KACAA,EAAK,KACL,KACO,OAAPA,EACA,KACAA,EAAK,KACL,KAEA,MAGfhI,SAAU,CACNC,QAAS,SACTC,QAAS,SACTC,SAAU,YACVC,QAAS,SACTC,SAAU,YACVC,SAAU,KAEda,uBAAwB,iBACxBC,QAAS,SAAUC,EAAQyB,GACvB,OAAQA,GACJ,IAAK,IACL,IAAK,IACL,IAAK,MACD,OAAOzB,EAAS,IACpB,IAAK,IACD,OAAOA,EAAS,IACpB,IAAK,IACL,IAAK,IACD,OAAOA,EAAS,IACpB,QACI,OAAOA,IAGnBd,aAAc,CACVC,OAAQ,MACRC,KAAM,MACNx0C,EAAG,KACHy0C,GAAI,OACJ78C,EAAG,OACH88C,GAAI,QACJC,EAAG,OACHC,GAAI,QACJ74B,EAAG,MACH84B,GAAI,OACJC,EAAG,OACHC,GAAI,QACJC,EAAG,MACHC,GAAI,UAhG0BnyD,CAAQ,EAAQ,8FCElD,SAAWkiD,GAAU,aAIdA,EAAO4N,aAAa,QAAS,CACpCC,OAAQ,wCAAwCntC,MAC5C,KAEJotC,YAAa,yCAAyCptC,MAClD,KAEJqtC,SAAU,8BAA8BrtC,MAAM,KAC9CstC,cAAe,uBAAuBttC,MAAM,KAC5CutC,YAAa,gBAAgBvtC,MAAM,KACnC8tC,eAAgB,CACZC,GAAI,QACJC,IAAK,WACLC,EAAG,aACHC,GAAI,YACJC,IAAK,kBACLC,KAAM,sBACNz+B,EAAG,WACHgjC,GAAI,YACJC,IAAK,kBACLC,KAAM,uBAEVrF,cAAe,oBACfgE,aAAc,SAAUlB,EAAM5C,GAI1B,OAHa,KAAT4C,IACAA,EAAO,GAEM,OAAb5C,GAAkC,OAAbA,GAAkC,OAAbA,EACnC4C,EACa,OAAb5C,EACA4C,GAAQ,GAAKA,EAAOA,EAAO,GACd,OAAb5C,GAAkC,OAAbA,EACrB4C,EAAO,QADX,GAIX5C,SAAU,SAAU4C,EAAMC,EAAQ1C,GAC9B,IAAIwI,EAAY,IAAP/F,EAAaC,EACtB,OAAI8F,EAAK,IACE,KACAA,EAAK,IACL,KACAA,EAAK,KACL,KACAA,EAAK,KACL,KACAA,EAAK,KACL,KAEA,MAGfhI,SAAU,CACNC,QAAS,UACTC,QAAS,UACTC,SAAU,aACVC,QAAS,UACTC,SAAU,aACVC,SAAU,KAEda,uBAAwB,iBACxBC,QAAS,SAAUC,EAAQyB,GACvB,OAAQA,GACJ,IAAK,IACL,IAAK,IACL,IAAK,MACD,OAAOzB,EAAS,IACpB,IAAK,IACD,OAAOA,EAAS,IACpB,IAAK,IACL,IAAK,IACD,OAAOA,EAAS,IACpB,QACI,OAAOA,IAGnBd,aAAc,CACVC,OAAQ,MACRC,KAAM,MACNx0C,EAAG,KACHy0C,GAAI,OACJ78C,EAAG,OACH88C,GAAI,QACJC,EAAG,OACHC,GAAI,QACJ74B,EAAG,MACH84B,GAAI,OACJC,EAAG,OACHC,GAAI,QACJC,EAAG,MACHC,GAAI,UAhG0BnyD,CAAQ,EAAQ,8FCElD,SAAWkiD,GAAU,aAIdA,EAAO4N,aAAa,QAAS,CACpCC,OAAQ,wCAAwCntC,MAC5C,KAEJotC,YAAa,yCAAyCptC,MAClD,KAEJqtC,SAAU,8BAA8BrtC,MAAM,KAC9CstC,cAAe,uBAAuBttC,MAAM,KAC5CutC,YAAa,gBAAgBvtC,MAAM,KACnC8tC,eAAgB,CACZC,GAAI,QACJC,IAAK,WACLC,EAAG,aACHC,GAAI,YACJC,IAAK,kBACLC,KAAM,sBACNz+B,EAAG,WACHgjC,GAAI,YACJC,IAAK,kBACLC,KAAM,uBAEVrF,cAAe,oBACfgE,aAAc,SAAUlB,EAAM5C,GAI1B,OAHa,KAAT4C,IACAA,EAAO,GAEM,OAAb5C,GAAkC,OAAbA,GAAkC,OAAbA,EACnC4C,EACa,OAAb5C,EACA4C,GAAQ,GAAKA,EAAOA,EAAO,GACd,OAAb5C,GAAkC,OAAbA,EACrB4C,EAAO,QADX,GAIX5C,SAAU,SAAU4C,EAAMC,EAAQ1C,GAC9B,IAAIwI,EAAY,IAAP/F,EAAaC,EACtB,OAAI8F,EAAK,IACE,KACAA,EAAK,IACL,KACAA,EAAK,KACL,KACAA,EAAK,KACL,KACAA,EAAK,KACL,KAEA,MAGfhI,SAAU,CACNC,QAAS,UACTC,QAAS,UACTC,SAAU,aACVC,QAAS,UACTC,SAAU,aACVC,SAAU,KAEda,uBAAwB,iBACxBC,QAAS,SAAUC,EAAQyB,GACvB,OAAQA,GACJ,IAAK,IACL,IAAK,IACL,IAAK,MACD,OAAOzB,EAAS,IACpB,IAAK,IACD,OAAOA,EAAS,IACpB,IAAK,IACL,IAAK,IACD,OAAOA,EAAS,IACpB,QACI,OAAOA,IAGnBd,aAAc,CACVC,OAAQ,MACRC,KAAM,MACNx0C,EAAG,KACHy0C,GAAI,OACJ78C,EAAG,OACH88C,GAAI,QACJC,EAAG,OACHC,GAAI,QACJ74B,EAAG,MACH84B,GAAI,OACJC,EAAG,OACHC,GAAI,QACJC,EAAG,MACHC,GAAI,UAhG0BnyD,CAAQ,EAAQ,wGCP1D,IAAIyO,EAAM,CACT,OAAQ,qCACR,UAAW,qCACX,OAAQ,qCACR,UAAW,wCACX,aAAc,wCACd,UAAW,wCACX,aAAc,wCACd,UAAW,wCACX,aAAc,wCACd,UAAW,wCACX,aAAc,wCACd,UAAW,wCACX,aAAc,wCACd,UAAW,wCACX,aAAc,wCACd,UAAW,qCACX,OAAQ,qCACR,UAAW,qCACX,OAAQ,qCACR,UAAW,qCACX,OAAQ,qCACR,UAAW,qCACX,OAAQ,qCACR,UAAW,qCACX,OAAQ,qCACR,UAAW,wCACX,aAAc,wCACd,UAAW,qCACX,OAAQ,qCACR,UAAW,qCACX,OAAQ,qCACR,UAAW,qCACX,OAAQ,qCACR,UAAW,qCACX,OAAQ,qCACR,UAAW,qCACX,OAAQ,qCACR,UAAW,qCACX,OAAQ,qCACR,UAAW,qCACX,OAAQ,qCACR,UAAW,qCACX,OAAQ,qCACR,UAAW,qCACX,OAAQ,qCACR,UAAW,wCACX,aAAc,wCACd,UAAW,wCACX,aAAc,wCACd,UAAW,qCACX,OAAQ,qCACR,UAAW,qCACX,OAAQ,qCACR,UAAW,qCACX,UAAW,wCACX,aAAc,wCACd,UAAW,wCACX,aAAc,wCACd,UAAW,wCACX,aAAc,wCACd,UAAW,wCACX,aAAc,wCACd,UAAW,wCACX,aAAc,wCACd,UAAW,wCACX,aAAc,wCACd,UAAW,wCACX,aAAc,wCACd,UAAW,wCACX,aAAc,wCACd,OAAQ,qCACR,UAAW,qCACX,OAAQ,qCACR,UAAW,wCACX,aAAc,wCACd,UAAW,wCACX,aAAc,wCACd,UAAW,wCACX,aAAc,wCACd,UAAW,qCACX,OAAQ,qCACR,UAAW,qCACX,OAAQ,qCACR,UAAW,qCACX,OAAQ,qCACR,UAAW,qCACX,OAAQ,qCACR,UAAW,qCACX,QAAS,sCACT,WAAY,sCACZ,OAAQ,qCACR,UAAW,qCACX,OAAQ,qCACR,UAAW,wCACX,aAAc,wCACd,UAAW,wCACX,aAAc,wCACd,UAAW,qCACX,OAAQ,qCACR,UAAW,qCACX,OAAQ,qCACR,UAAW,qCACX,OAAQ,qCACR,UAAW,qCACX,OAAQ,qCACR,UAAW,qCACX,aAAc,2CACd,gBAAiB,2CACjB,aAAc,2CACd,gBAAiB,2CACjB,OAAQ,qCACR,UAAW,qCACX,OAAQ,qCACR,UAAW,qCACX,OAAQ,qCACR,UAAW,qCACX,OAAQ,qCACR,UAAW,qCACX,OAAQ,qCACR,UAAW,qCACX,UAAW,wCACX,aAAc,wCACd,OAAQ,qCACR,UAAW,qCACX,OAAQ,qCACR,UAAW,qCACX,OAAQ,qCACR,UAAW,wCACX,aAAc,wCACd,UAAW,qCACX,OAAQ,qCACR,UAAW,qCACX,OAAQ,qCACR,UAAW,qCACX,OAAQ,qCACR,UAAW,qCACX,OAAQ,qCACR,UAAW,qCACX,OAAQ,qCACR,UAAW,qCACX,OAAQ,qCACR,UAAW,qCACX,OAAQ,qCACR,UAAW,qCACX,OAAQ,qCACR,UAAW,qCACX,OAAQ,qCACR,UAAW,qCACX,OAAQ,qCACR,UAAW,qCACX,OAAQ,qCACR,UAAW,qCACX,OAAQ,qCACR,UAAW,qCACX,OAAQ,qCACR,UAAW,qCACX,OAAQ,qCACR,UAAW,qCACX,OAAQ,qCACR,UAAW,qCACX,OAAQ,qCACR,UAAW,qCACX,OAAQ,qCACR,UAAW,qCACX,OAAQ,qCACR,UAAW,qCACX,OAAQ,qCACR,UAAW,qCACX,OAAQ,qCACR,UAAW,wCACX,aAAc,wCACd,UAAW,qCACX,OAAQ,qCACR,UAAW,qCACX,OAAQ,qCACR,UAAW,qCACX,OAAQ,qCACR,UAAW,qCACX,OAAQ,qCACR,UAAW,qCACX,OAAQ,qCACR,UAAW,wCACX,aAAc,wCACd,UAAW,qCACX,OAAQ,qCACR,UAAW,qCACX,WAAY,yCACZ,cAAe,yCACf,UAAW,wCACX,aAAc,wCACd,OAAQ,qCACR,UAAW,qCACX,OAAQ,qCACR,UAAW,wCACX,aAAc,wCACd,UAAW,qCACX,OAAQ,qCACR,UAAW,qCACX,OAAQ,qCACR,UAAW,qCACX,OAAQ,qCACR,UAAW,qCACX,OAAQ,qCACR,UAAW,qCACX,OAAQ,qCACR,UAAW,qCACX,OAAQ,qCACR,UAAW,qCACX,OAAQ,qCACR,UAAW,qCACX,OAAQ,qCACR,UAAW,qCACX,OAAQ,qCACR,YAAa,0CACb,eAAgB,0CAChB,UAAW,qCACX,OAAQ,qCACR,UAAW,qCACX,OAAQ,qCACR,UAAW,qCACX,OAAQ,qCACR,UAAW,qCACX,OAAQ,qCACR,UAAW,qCACX,OAAQ,qCACR,UAAW,qCACX,QAAS,sCACT,WAAY,sCACZ,OAAQ,qCACR,UAAW,qCACX,OAAQ,qCACR,UAAW,qCACX,OAAQ,qCACR,UAAW,qCACX,UAAW,wCACX,aAAc,wCACd,QAAS,sCACT,WAAY,sCACZ,OAAQ,qCACR,UAAW,qCACX,QAAS,sCACT,WAAY,sCACZ,QAAS,sCACT,aAAc,2CACd,gBAAiB,2CACjB,WAAY,sCACZ,UAAW,wCACX,aAAc,wCACd,OAAQ,qCACR,UAAW,qCACX,OAAQ,qCACR,UAAW,qCACX,OAAQ,qCACR,YAAa,0CACb,eAAgB,0CAChB,UAAW,qCACX,OAAQ,qCACR,UAAW,qCACX,aAAc,2CACd,gBAAiB,2CACjB,OAAQ,qCACR,UAAW,qCACX,UAAW,wCACX,aAAc,wCACd,UAAW,wCACX,aAAc,wCACd,UAAW,wCACX,aAAc,wCACd,UAAW,wCACX,aAAc,yCAIf,SAAS6qD,EAAeC,GACvB,IAAIpuD,EAAKquD,EAAsBD,GAC/B,OAAOE,EAAoBtuD,GAE5B,SAASquD,EAAsBD,GAC9B,IAAIE,EAAoB/0C,EAAEjW,EAAK8qD,GAAM,CACpC,IAAIn3C,EAAI,IAAI7P,MAAM,uBAAyBgnD,EAAM,KAEjD,MADAn3C,EAAEs3C,KAAO,mBACHt3C,EAEP,OAAO3T,EAAI8qD,GAEZD,EAAehmD,KAAO,WACrB,OAAOD,OAAOC,KAAK7E,IAEpB6qD,EAAe7sD,QAAU+sD,EACzB55D,EAAOivD,QAAUyK,EACjBA,EAAenuD,GAAK,8GClSnB,IAASoS,EAAAA,EAAqiI8I,OAAOF,SAAziIxmB,QAAQC,OAAO,eAAe,IAAI0E,MAAM,eAAe,CAACo5C,OAAM,IAAKryC,OAAO,CAAC,mBAAmB,SAASkS,GAAG5d,QAAQ+M,UAAU6Q,EAAEo8C,0BAA0Bp8C,EAAEo8C,yBAAyB,sCAAsCp8C,EAAEq8C,2BAA2B,yCAAyCj6D,QAAQC,OAAO,mBAAmB,CAAC,mBAAmBD,QAAQC,OAAO,iBAAiB,IAAID,QAAQC,OAAO,QAAQ,CAAC,eAAe,iBAAiB,mBAAmB,eAAwEA,EAAOivD,UAAUA,IAAUjvD,EAAOivD,QAAQ,SAASlvD,QAAQC,OAAO,kBAAkB2X,QAAQ,MAAM,CAAC,KAAK,SAASgG,GAAG,IAAImB,EAAE,OAAaua,EAAE,CAAC,MAAM,KAAI,MAAM,KAAK,MAAM,KAAI,MAAM,KAAK,MAAM,MAAMn5B,KAAK+5D,eAAe,SAASt8C,EAAEmB,GAAG,MAAM,WAAWA,EAAEo7C,YAAYh6D,KAAKi6D,QAAQx8C,GAAGA,EAAEy8C,iBAAiB,MAAMt7C,EAAEo7C,YAAYh6D,KAAKi6D,QAAQx8C,GAAGA,EAAE3I,WAAWC,QAAQ,IAAI6J,EAAEo7C,YAAY,iBAAiBv8C,GAAGA,EAAEA,EAAE1I,QAAQ,KAAK,OAAO6J,EAAEu7C,cAAc18C,EAAEvP,QAAQ,MAAM,GAAGuP,EAAEvP,QAAQ,OAAO,GAAGuP,EAAEvP,QAAQ,OAAO,KAAKuP,EAAEmB,EAAEw7C,SAAS38C,EAAEmB,EAAEw7C,UAAU38C,GAAG,kBAAkBA,EAAEA,EAAE,OAAO,QAAQA,GAAGzd,KAAKi6D,QAAQ,SAASx8C,GAAG,OAAOA,IAAIA,KAAK48C,SAAS58C,IAAIwU,QAAQxU,EAAE,KAAKzd,KAAKke,UAAU,SAASib,EAAE7W,GAAG,IAAI4wC,EAAEz1C,EAAExR,QAAQ4R,EAAE7d,KAAK+xD,EAAE,GAAG10C,EAAE,GAAGK,EAAED,EAAExN,KAAKkpB,GAAGpuB,MAAK,SAAS0S,GAA6C,IAAI0b,EAAEzb,EAA7C7d,QAAQ+M,UAAU0V,EAAEg4C,SAASh4C,EAAEg4C,SAAgBnhC,EAAE,GAAGt5B,QAAQkB,QAAQuhB,EAAEg4C,QAAO,SAAS78C,GAAGzd,KAAKS,KAAKod,EAAEk8C,eAAet8C,EAAE6E,MAAK6W,GAAGzb,EAAEyb,EAAElmB,KAAKqP,EAAEi4C,SAASj4C,EAAEi4C,SAAS,KAAKl9C,GAAGK,EAAEkB,GAAE,IAAsI6T,EAAEzd,EAApIwI,EAAE,GAAM3d,QAAQmS,QAAQyL,GAAGD,EAAEC,EAAE5d,QAAQuN,WAAWqQ,KAAKD,EAAEC,KAAK5d,QAAQ+M,UAAU0V,EAAEgoC,QAAQhoC,EAAEgoC,OAAO,kBAAkBhoC,EAAEgoC,QAAe73B,EAAE,GAAG5yB,QAAQkB,QAAQyc,EAAE,IAAG,SAASC,EAAEmB,GAAG5e,KAAKS,KAAKod,EAAEk8C,eAAen7C,EAAE0D,MAAKmQ,GAAGzd,EAAEyd,EAAExf,KAAKqP,EAAEi4C,SAASj4C,EAAEi4C,SAAS,KAAKl9C,GAAGrI,EAAE4J,GAAE/e,QAAQkB,QAAQyc,GAAE,SAASC,EAAE+8C,GAAG,IAAIrhC,EAAE+5B,EAAEnB,EAAElyD,QAAQoiB,KAAKzE,EAAEg9C,IAAItH,EAAE,GAAG,IAAIx1C,EAAE4E,EAAEm4C,YAAYn4C,EAAEm4C,YAAY1I,EAAElyD,QAAQkB,QAAQ2c,GAAE,SAASD,GAAG,IAAImB,EAAE0D,EAAEm4C,YAAY1I,EAAEt0C,GAAGA,EAAEzd,KAAKS,KAAKod,EAAEk8C,eAAen7C,EAAE0D,MAAK4wC,GAAG/5B,EAAE+5B,EAAEjgD,KAAKqP,EAAEi4C,SAASj4C,EAAEi4C,SAAS,KAAKl9C,GAAGm9C,EAAEh9C,EAAEpO,OAAO+pB,EAAEva,EAAEua,KAAI7W,EAAEo4C,qBAAqB3I,GAA9wC,UAAoxCA,GAAG10C,EAAE61C,EAAEvmD,QAAQolD,MAAK,MAAM,mBAAmBr0C,EAAS,OAAGA,EAAS,OAAE,SAASD,GAAGy1C,EAAE7e,OAAO52B,MAAKy1C,EAAEzvD,SAASzD,KAAK26D,cAAc,SAASl9C,GAAG,YAAO,IAAS0b,EAAE1b,IAAIzd,KAAK46D,eAAe,SAASn9C,GAAG,OAAO0b,EAAE1b,OAAO5d,QAAQC,OAAO,oBAAoB+C,UAAU,QAAQ,CAAC,SAAS,KAAK,MAAM,YAAY,WAAW,SAAS+b,EAAE47C,EAAErhC,EAAE7W,EAAE4wC,GAAG,MAAM,CAAC/rD,SAAS,KAAKrE,MAAM,CAAC6E,KAAK,SAASkzD,SAAS,YAAYP,OAAO,aAAaG,YAAY,kBAAkBL,SAAS,iBAAiBJ,WAAW,oBAAoBG,aAAa,gBAAgBI,SAAS,kBAAkBnuC,SAAS,YAAYsuC,mBAAmB,UAAUjgB,QAAQ,IAAIqgB,QAAQ,WAAWxQ,MAAM,aAAatpD,WAAW,CAAC,SAAS,WAAW,SAAS,cAAc,SAASyc,EAAEmB,EAAE0D,GAAwe7E,EAAEs9C,IAAI,GAAGl7D,QAAQ+M,UAAU6Q,EAAE2O,WAAW,QAAQ3O,EAAE2O,UAAUvsB,QAAQmS,QAAQyL,EAAE9V,OAAO8V,EAAElZ,OAAO,QAAO,WAAWkZ,EAAEu9C,cAAY,GAAIv9C,EAAEw9C,YAAY,WAAW,OAAOx9C,EAAEo9C,UAAU,gBAAgBp9C,EAAEu9C,SAAS,WAAW,IAAIn9C,EAAE28C,EAAEvuD,QAAQ,OAAO2S,EAAEs8C,SAAS54C,EAAE64C,mBAAmB,kBAAkBhiC,EAAEjb,UAAUT,EAAE9V,OAAhxB,WAAa,IAAIiX,EAAE,CAACw7C,SAAS38C,EAAE28C,SAAS38C,EAAE28C,SAAS,IAAIJ,WAAWv8C,EAAEu8C,WAAWv8C,EAAEu8C,WAAW,IAAIG,aAAa18C,EAAE08C,aAAaO,mBAAmBj9C,EAAEi9C,oBAAoB,OAAO76D,QAAQ+M,UAAU0V,EAAE84C,aAAax8C,EAAE07C,OAAO78C,EAAEpc,MAAMoc,EAAE68C,SAASz6D,QAAQ+M,UAAU0V,EAAE+4C,kBAAkBz8C,EAAE67C,YAAYh9C,EAAEpc,MAAMoc,EAAEg9C,cAAc56D,QAAQ+M,UAAU0V,EAAEg5C,YAAY18C,EAAE0rC,MAAM7sC,EAAEpc,MAAMoc,EAAE6sC,QAAQ1rC,EAAE27C,SAAS98C,EAAE88C,SAAS98C,EAAE88C,SAAS,IAAI37C,EAAE27C,SAASphC,EAAEwhC,cAAc/7C,EAAE27C,UAAUphC,EAAEyhC,eAAeh8C,EAAE27C,UAAU37C,EAAE27C,SAAS37C,EAAoTs0C,IAAKnoD,MAAK,SAASyvD,GAAG/8C,EAAEs9C,IAAIP,EAAE57C,EAAE28C,YAAYj5C,EAAE64C,mBAAmB,kBAAkBt9C,EAAElR,QAAQ6tD,MAAK/8C,EAAExZ,SAAS4Z,EAAEpa,WAAW8E,KAAK,SAASqW,EAAE47C,GAA8bA,EAAEl3D,KAAK,SAAQ,WAAWsb,EAAEo8C,WAAWjwD,MAAK,YAAve,WAAa,IAAIyvD,EAAE57C,EAAEk8C,SAAS,QAAQ3hC,EAAE,IAAI+1B,KAAK,CAACtwC,EAAEm8C,KAAK,CAAC7rD,KAAK,oBAAoBsrD,EAAE,MAAM,GAAG/8C,EAAEo+B,UAAU2f,iBAAiB3f,UAAU4f,WAAWtiC,EAAEva,EAAEq8C,mBAAmB,CAAC,IAAIp9C,EAAEhe,QAAQkD,QAAQ,+CAA+CgvD,EAAElyD,QAAQkD,QAAQ8a,EAAEjV,WAAW,IAAImpD,EAAEj/C,KAAK,OAAO2K,EAAE2vC,IAAIsO,gBAAgBviC,IAAI44B,EAAEj/C,KAAK,WAAW8L,EAAEq8C,eAAelJ,EAAEj/C,KAAK,SAAS,UAAUwP,EAAExB,KAAK,QAAQuZ,OAAOxc,GAAGq1C,GAAE,WAAWnB,EAAE,GAAGtH,QAAQsH,EAAEllD,WAAU,OAA8DssB,MAAMva,EAAE3a","sources":["webpack://motion-chat/./node_modules/@flowjs/ng-flow/dist/ng-flow.js","webpack://motion-chat/./node_modules/@uirouter/angularjs/lib-esm/directives/viewDirective.js","webpack://motion-chat/./node_modules/@uirouter/angularjs/lib-esm/templateFactory.js","webpack://motion-chat/./node_modules/@uirouter/angularjs/lib-esm/statebuilders/onEnterExitRetain.js","webpack://motion-chat/./node_modules/@uirouter/angularjs/lib-esm/locationServices.js","webpack://motion-chat/./node_modules/@uirouter/angularjs/lib-esm/services.js","webpack://motion-chat/./node_modules/@uirouter/angularjs/lib-esm/stateFilters.js","webpack://motion-chat/./node_modules/@uirouter/angularjs/lib-esm/stateProvider.js","webpack://motion-chat/./node_modules/@uirouter/angularjs/lib-esm/statebuilders/views.js","webpack://motion-chat/./node_modules/@uirouter/angularjs/lib-esm/urlRouterProvider.js","webpack://motion-chat/./node_modules/@uirouter/angularjs/lib-esm/viewScroll.js","webpack://motion-chat/./node_modules/@uirouter/core/lib-esm/common/common.js","webpack://motion-chat/./node_modules/@uirouter/core/lib-esm/common/coreservices.js","webpack://motion-chat/./node_modules/@uirouter/core/lib-esm/common/glob.js","webpack://motion-chat/./node_modules/@uirouter/core/lib-esm/common/hof.js","webpack://motion-chat/./node_modules/@uirouter/core/lib-esm/common/predicates.js","webpack://motion-chat/./node_modules/@uirouter/core/lib-esm/common/queue.js","webpack://motion-chat/./node_modules/@uirouter/core/lib-esm/common/safeConsole.js","webpack://motion-chat/./node_modules/@uirouter/core/lib-esm/common/strings.js","webpack://motion-chat/./node_modules/@uirouter/core/lib-esm/common/trace.js","webpack://motion-chat/./node_modules/@uirouter/core/lib-esm/globals.js","webpack://motion-chat/./node_modules/@uirouter/core/lib-esm/hooks/lazyLoad.js","webpack://motion-chat/./node_modules/@uirouter/core/lib-esm/params/param.js","webpack://motion-chat/./node_modules/@uirouter/core/lib-esm/params/paramType.js","webpack://motion-chat/./node_modules/@uirouter/core/lib-esm/params/paramTypes.js","webpack://motion-chat/./node_modules/@uirouter/core/lib-esm/params/stateParams.js","webpack://motion-chat/./node_modules/@uirouter/core/lib-esm/path/pathNode.js","webpack://motion-chat/./node_modules/@uirouter/core/lib-esm/path/pathUtils.js","webpack://motion-chat/./node_modules/@uirouter/core/lib-esm/resolve/interface.js","webpack://motion-chat/./node_modules/@uirouter/core/lib-esm/resolve/resolvable.js","webpack://motion-chat/./node_modules/@uirouter/core/lib-esm/resolve/resolveContext.js","webpack://motion-chat/./node_modules/@uirouter/core/lib-esm/router.js","webpack://motion-chat/./node_modules/@uirouter/core/lib-esm/state/stateBuilder.js","webpack://motion-chat/./node_modules/@uirouter/core/lib-esm/state/stateMatcher.js","webpack://motion-chat/./node_modules/@uirouter/core/lib-esm/state/stateObject.js","webpack://motion-chat/./node_modules/@uirouter/core/lib-esm/state/stateQueueManager.js","webpack://motion-chat/./node_modules/@uirouter/core/lib-esm/state/stateRegistry.js","webpack://motion-chat/./node_modules/@uirouter/core/lib-esm/state/targetState.js","webpack://motion-chat/./node_modules/@uirouter/core/lib-esm/transition/hookBuilder.js","webpack://motion-chat/./node_modules/@uirouter/core/lib-esm/transition/hookRegistry.js","webpack://motion-chat/./node_modules/@uirouter/core/lib-esm/transition/interface.js","webpack://motion-chat/./node_modules/@uirouter/core/lib-esm/transition/rejectFactory.js","webpack://motion-chat/./node_modules/@uirouter/core/lib-esm/transition/transitionEventType.js","webpack://motion-chat/./node_modules/@uirouter/core/lib-esm/transition/transitionHook.js","webpack://motion-chat/./node_modules/@uirouter/core/lib-esm/hooks/coreResolvables.js","webpack://motion-chat/./node_modules/@uirouter/core/lib-esm/hooks/redirectTo.js","webpack://motion-chat/./node_modules/@uirouter/core/lib-esm/hooks/onEnterExitRetain.js","webpack://motion-chat/./node_modules/@uirouter/core/lib-esm/hooks/resolve.js","webpack://motion-chat/./node_modules/@uirouter/core/lib-esm/hooks/views.js","webpack://motion-chat/./node_modules/@uirouter/core/lib-esm/hooks/updateGlobals.js","webpack://motion-chat/./node_modules/@uirouter/core/lib-esm/hooks/url.js","webpack://motion-chat/./node_modules/@uirouter/core/lib-esm/hooks/ignoredTransition.js","webpack://motion-chat/./node_modules/@uirouter/core/lib-esm/hooks/invalidTransition.js","webpack://motion-chat/./node_modules/@uirouter/core/lib-esm/transition/transitionService.js","webpack://motion-chat/./node_modules/@uirouter/core/lib-esm/url/urlConfig.js","webpack://motion-chat/./node_modules/@uirouter/core/lib-esm/url/urlMatcherFactory.js","webpack://motion-chat/./node_modules/@uirouter/core/lib-esm/url/urlRouter.js","webpack://motion-chat/./node_modules/@uirouter/core/lib-esm/url/urlRule.js","webpack://motion-chat/./node_modules/@uirouter/core/lib-esm/url/urlRules.js","webpack://motion-chat/./node_modules/@uirouter/core/lib-esm/url/urlService.js","webpack://motion-chat/./node_modules/@uirouter/core/lib-esm/vanilla/baseLocationService.js","webpack://motion-chat/./node_modules/@uirouter/core/lib-esm/vanilla/browserLocationConfig.js","webpack://motion-chat/./node_modules/@uirouter/core/lib-esm/vanilla/hashLocationService.js","webpack://motion-chat/./node_modules/@uirouter/core/lib-esm/vanilla/memoryLocationConfig.js","webpack://motion-chat/./node_modules/@uirouter/core/lib-esm/vanilla/memoryLocationService.js","webpack://motion-chat/./node_modules/@uirouter/core/lib-esm/vanilla/plugins.js","webpack://motion-chat/./node_modules/@uirouter/core/lib-esm/vanilla/pushStateLocationService.js","webpack://motion-chat/./node_modules/@uirouter/core/lib-esm/vanilla/q.js","webpack://motion-chat/./node_modules/@uirouter/core/lib-esm/vanilla/utils.js","webpack://motion-chat/./node_modules/@uirouter/core/lib-esm/view/view.js","webpack://motion-chat/./node_modules/angular-aria/angular-aria.js","webpack://motion-chat/./node_modules/angular-rateit/dist/ng-rateit.js","webpack://motion-chat/./src/js/index.controller.js","webpack://motion-chat/./src/js/index.route.js","webpack://motion-chat/./src/js/closing/closing.controller.js","webpack://motion-chat/./src/js/index.factory.js","webpack://motion-chat/./src/js/chat/chat.controller.js","webpack://motion-chat/./src/js/offline/offline.controller.js","webpack://motion-chat/./src/js/online/online.controller.js","webpack://motion-chat/./src/js/unmanaged/unmanaged.controller.js","webpack://motion-chat/./src/js/waiting/waiting.controller.js","webpack://motion-chat/./src/js/common/remote-storage.service.js","webpack://motion-chat/./src/js/index.module.js","webpack://motion-chat/./node_modules/expose-loader/dist/runtime/getGlobalThis.js","webpack://motion-chat/./node_modules/json-form-data/src/jsonToFormData.js","webpack://motion-chat/./node_modules/moment/locale/af.js","webpack://motion-chat/./node_modules/moment/locale/ar-dz.js","webpack://motion-chat/./node_modules/moment/locale/ar-kw.js","webpack://motion-chat/./node_modules/moment/locale/ar-ly.js","webpack://motion-chat/./node_modules/moment/locale/ar-ma.js","webpack://motion-chat/./node_modules/moment/locale/ar-sa.js","webpack://motion-chat/./node_modules/moment/locale/ar-tn.js","webpack://motion-chat/./node_modules/moment/locale/ar.js","webpack://motion-chat/./node_modules/moment/locale/az.js","webpack://motion-chat/./node_modules/moment/locale/be.js","webpack://motion-chat/./node_modules/moment/locale/bg.js","webpack://motion-chat/./node_modules/moment/locale/bm.js","webpack://motion-chat/./node_modules/moment/locale/bn-bd.js","webpack://motion-chat/./node_modules/moment/locale/bn.js","webpack://motion-chat/./node_modules/moment/locale/bo.js","webpack://motion-chat/./node_modules/moment/locale/br.js","webpack://motion-chat/./node_modules/moment/locale/bs.js","webpack://motion-chat/./node_modules/moment/locale/ca.js","webpack://motion-chat/./node_modules/moment/locale/cs.js","webpack://motion-chat/./node_modules/moment/locale/cv.js","webpack://motion-chat/./node_modules/moment/locale/cy.js","webpack://motion-chat/./node_modules/moment/locale/da.js","webpack://motion-chat/./node_modules/moment/locale/de-at.js","webpack://motion-chat/./node_modules/moment/locale/de-ch.js","webpack://motion-chat/./node_modules/moment/locale/de.js","webpack://motion-chat/./node_modules/moment/locale/dv.js","webpack://motion-chat/./node_modules/moment/locale/el.js","webpack://motion-chat/./node_modules/moment/locale/en-au.js","webpack://motion-chat/./node_modules/moment/locale/en-ca.js","webpack://motion-chat/./node_modules/moment/locale/en-gb.js","webpack://motion-chat/./node_modules/moment/locale/en-ie.js","webpack://motion-chat/./node_modules/moment/locale/en-il.js","webpack://motion-chat/./node_modules/moment/locale/en-in.js","webpack://motion-chat/./node_modules/moment/locale/en-nz.js","webpack://motion-chat/./node_modules/moment/locale/en-sg.js","webpack://motion-chat/./node_modules/moment/locale/eo.js","webpack://motion-chat/./node_modules/moment/locale/es-do.js","webpack://motion-chat/./node_modules/moment/locale/es-mx.js","webpack://motion-chat/./node_modules/moment/locale/es-us.js","webpack://motion-chat/./node_modules/moment/locale/es.js","webpack://motion-chat/./node_modules/moment/locale/et.js","webpack://motion-chat/./node_modules/moment/locale/eu.js","webpack://motion-chat/./node_modules/moment/locale/fa.js","webpack://motion-chat/./node_modules/moment/locale/fi.js","webpack://motion-chat/./node_modules/moment/locale/fil.js","webpack://motion-chat/./node_modules/moment/locale/fo.js","webpack://motion-chat/./node_modules/moment/locale/fr-ca.js","webpack://motion-chat/./node_modules/moment/locale/fr-ch.js","webpack://motion-chat/./node_modules/moment/locale/fr.js","webpack://motion-chat/./node_modules/moment/locale/fy.js","webpack://motion-chat/./node_modules/moment/locale/ga.js","webpack://motion-chat/./node_modules/moment/locale/gd.js","webpack://motion-chat/./node_modules/moment/locale/gl.js","webpack://motion-chat/./node_modules/moment/locale/gom-deva.js","webpack://motion-chat/./node_modules/moment/locale/gom-latn.js","webpack://motion-chat/./node_modules/moment/locale/gu.js","webpack://motion-chat/./node_modules/moment/locale/he.js","webpack://motion-chat/./node_modules/moment/locale/hi.js","webpack://motion-chat/./node_modules/moment/locale/hr.js","webpack://motion-chat/./node_modules/moment/locale/hu.js","webpack://motion-chat/./node_modules/moment/locale/hy-am.js","webpack://motion-chat/./node_modules/moment/locale/id.js","webpack://motion-chat/./node_modules/moment/locale/is.js","webpack://motion-chat/./node_modules/moment/locale/it-ch.js","webpack://motion-chat/./node_modules/moment/locale/it.js","webpack://motion-chat/./node_modules/moment/locale/ja.js","webpack://motion-chat/./node_modules/moment/locale/jv.js","webpack://motion-chat/./node_modules/moment/locale/ka.js","webpack://motion-chat/./node_modules/moment/locale/kk.js","webpack://motion-chat/./node_modules/moment/locale/km.js","webpack://motion-chat/./node_modules/moment/locale/kn.js","webpack://motion-chat/./node_modules/moment/locale/ko.js","webpack://motion-chat/./node_modules/moment/locale/ku.js","webpack://motion-chat/./node_modules/moment/locale/ky.js","webpack://motion-chat/./node_modules/moment/locale/lb.js","webpack://motion-chat/./node_modules/moment/locale/lo.js","webpack://motion-chat/./node_modules/moment/locale/lt.js","webpack://motion-chat/./node_modules/moment/locale/lv.js","webpack://motion-chat/./node_modules/moment/locale/me.js","webpack://motion-chat/./node_modules/moment/locale/mi.js","webpack://motion-chat/./node_modules/moment/locale/mk.js","webpack://motion-chat/./node_modules/moment/locale/ml.js","webpack://motion-chat/./node_modules/moment/locale/mn.js","webpack://motion-chat/./node_modules/moment/locale/mr.js","webpack://motion-chat/./node_modules/moment/locale/ms-my.js","webpack://motion-chat/./node_modules/moment/locale/ms.js","webpack://motion-chat/./node_modules/moment/locale/mt.js","webpack://motion-chat/./node_modules/moment/locale/my.js","webpack://motion-chat/./node_modules/moment/locale/nb.js","webpack://motion-chat/./node_modules/moment/locale/ne.js","webpack://motion-chat/./node_modules/moment/locale/nl-be.js","webpack://motion-chat/./node_modules/moment/locale/nl.js","webpack://motion-chat/./node_modules/moment/locale/nn.js","webpack://motion-chat/./node_modules/moment/locale/oc-lnc.js","webpack://motion-chat/./node_modules/moment/locale/pa-in.js","webpack://motion-chat/./node_modules/moment/locale/pl.js","webpack://motion-chat/./node_modules/moment/locale/pt-br.js","webpack://motion-chat/./node_modules/moment/locale/pt.js","webpack://motion-chat/./node_modules/moment/locale/ro.js","webpack://motion-chat/./node_modules/moment/locale/ru.js","webpack://motion-chat/./node_modules/moment/locale/sd.js","webpack://motion-chat/./node_modules/moment/locale/se.js","webpack://motion-chat/./node_modules/moment/locale/si.js","webpack://motion-chat/./node_modules/moment/locale/sk.js","webpack://motion-chat/./node_modules/moment/locale/sl.js","webpack://motion-chat/./node_modules/moment/locale/sq.js","webpack://motion-chat/./node_modules/moment/locale/sr-cyrl.js","webpack://motion-chat/./node_modules/moment/locale/sr.js","webpack://motion-chat/./node_modules/moment/locale/ss.js","webpack://motion-chat/./node_modules/moment/locale/sv.js","webpack://motion-chat/./node_modules/moment/locale/sw.js","webpack://motion-chat/./node_modules/moment/locale/ta.js","webpack://motion-chat/./node_modules/moment/locale/te.js","webpack://motion-chat/./node_modules/moment/locale/tet.js","webpack://motion-chat/./node_modules/moment/locale/tg.js","webpack://motion-chat/./node_modules/moment/locale/th.js","webpack://motion-chat/./node_modules/moment/locale/tk.js","webpack://motion-chat/./node_modules/moment/locale/tl-ph.js","webpack://motion-chat/./node_modules/moment/locale/tlh.js","webpack://motion-chat/./node_modules/moment/locale/tr.js","webpack://motion-chat/./node_modules/moment/locale/tzl.js","webpack://motion-chat/./node_modules/moment/locale/tzm-latn.js","webpack://motion-chat/./node_modules/moment/locale/tzm.js","webpack://motion-chat/./node_modules/moment/locale/ug-cn.js","webpack://motion-chat/./node_modules/moment/locale/uk.js","webpack://motion-chat/./node_modules/moment/locale/ur.js","webpack://motion-chat/./node_modules/moment/locale/uz-latn.js","webpack://motion-chat/./node_modules/moment/locale/uz.js","webpack://motion-chat/./node_modules/moment/locale/vi.js","webpack://motion-chat/./node_modules/moment/locale/x-pseudo.js","webpack://motion-chat/./node_modules/moment/locale/yo.js","webpack://motion-chat/./node_modules/moment/locale/zh-cn.js","webpack://motion-chat/./node_modules/moment/locale/zh-hk.js","webpack://motion-chat/./node_modules/moment/locale/zh-mo.js","webpack://motion-chat/./node_modules/moment/locale/zh-tw.js","webpack://motion-chat//home/vito/Development/MOTION_V3/motion-server/motion-chat/node_modules/moment/locale|sync|/^\\.\\/.*$/","webpack://motion-chat/./node_modules/ng-csv/build/ng-csv.min.js"],"names":["angular","module","provider","this","defaults","factory","options","Flow","events","on","event","callback","push","$get","fn","opts","flow","extend","forEach","controller","$scope","$attrs","$parse","flowFactory","$eval","flowInit","flowObject","create","catchAllHandler","eventName","args","Array","prototype","slice","call","arguments","shift","$broadcast","apply","concat","$applyAsync","defaultPrevented","$on","off","$flow","hasOwnProperty","flowName","assign","directive","scope","element","attrs","isDirectory","isSingleFile","inputAttrs","flowAttrs","assignBrowse","bind","preventDefault","$timeout","promise","enter","dragEvent","fileDrag","dataTransfer","originalEvent","types","val","$apply","flowDragEnter","cancel","flowDragLeave","assignDrop","flowDropEnabled","$watch","value","unAssignDrop","fileSuccess","fileProgress","fileAdded","filesAdded","filesSubmitted","fileRetry","fileRemoved","fileError","uploadStart","complete","progress","error","eventArgs","string","name","charAt","toUpperCase","require","funcArgs","key","file","flowImg","fileReader","FileReader","readAsDataURL","onload","$set","target","result","transfers","files","uiView","$ViewDirectiveFill","$compile","$controller","$transitions","$view","$q","getControllerAs","parse","getResolveAs","restrict","priority","compile","tElement","initial","html","empty","$element","data","contents","cfg","$cfg","viewDecl","getTemplate","noop","resolveCtx","path","ResolveContext","trace","$uiView","link","controllerAs","resolveAs","locals","controllerInstance","children","registerControllerCallbacks","isString","component","kebobName","kebobString","tagRegexp_1","RegExp","deregisterWatch_1","directiveEl","filter","el","tagName","exec","ctrlInstance","$animate","$uiViewScroll","$interpolate","rootData","$context","_pluginapi","_rootViewContext","count","terminal","transclude","tAttrs","$transclude","previousEl","currentEl","currentScope","viewConfig","onloadExp","autoScrollExp","renderer","cb","then","leave","inherited","inheritedData","activeUIView","$type","id","fqn","config","configUpdated","updateView","fromParentTagConfig","fromParentTag","unregister","registerUIView","newScope","$new","animEnter","defer","animLeave","$uiViewData","$uiViewAnim","$animEnter","$animLeave","$$animLeave","$emit","cloned","clone","resolve","isDefined","remove","$destroy","_viewData_1","cleanupLastView","$inject","hasComponentImpl","_uiCanExitId","isFunction","$onInit","componentProvider","viewState","tail","state","self","hookOptions","uiOnParamsChanged","viewCreationTrans_1","getResolvable","onSuccess","$transition$","exiting","indexOf","toParams","params","fromParams","getNodeSchema","node","paramSchema","toSchema","treeChanges","map","reduce","unnestR","fromSchema","changedToParams","param","idx","type","equals","length","changedKeys_1","x","newValues","uiCanExit","id_1","cacheProp_1","prevTruthyAnswer_1","trans","redirectedFrom","criteria","onBefore","ids","when","TemplateFactory","_this","_useHttp","$http","$templateCache","$injector","$templateRequest","has","get","useHttpService","fromConfig","context","asTemplate","services","str","template","asComponent","fromString","templateUrl","fromUrl","templateProvider","fromProvider","fromComponentProvider","url","cache","headers","Accept","response","deps","providerFn","isArray","Resolvable","makeComponentTemplate","bindings","prefix","kebob","camelCase","kebobed","cmpDefs","Error","getBindings","getComponentBindings","input","attrName","attr","resolveName","res","join","def","isObject","bindToController","scopeBindings","bindingsObj","Object","keys","tuple","getStateHookBuilder","hookName","stateObject","hook","pathname","subContext","$$state","getLocals","$state$","undefined","Ng1LocationServices","$locationProvider","_urlListeners","_lp","createProxyFunctions","monkeyPatchPathParameterType","router","pathType","urlMatcherFactory","encode","toString","replace","m","decode","dispose","onChange","removeFrom","html5Mode","enabled","$sniffer","history","baseHref","_baseHref","$browser","$window","location","newUrl","$location","_runtimeServices","$rootScope","evt","_loc","mod_init","mod_util","mod_rtr","mod_state","mod_main","$uiRouterProvider","UIRouter","stateProvider","stateRegistry","stateService","decorator","viewService","_viewConfigFactory","urlService","_decodeParams","ng1LocationService","locationService","locationConfig","getProviderFor","serviceName","$urp","service","runBlock","$uiRouter","invoke","checkStrictDi","strictDi","resolvables","resolvable","annotate","resolveFn","watchDigests","uiRouter","urlRouterProvider","globals","run","$urlMatcherFactory","$state","$urlRouter","ctx","getTokens","getPolicy","async","applyPairs","$IsStateFilter","isFilter","is","$stateful","$IncludedByStateFilter","includesFilter","includes","StateProvider","func","definition","register","onInvalid","getNg1ViewConfigFactory","templateFactory","view","Ng1ViewConfig","hasAnyKey","obj","acc","ng1ViewsBuilder","parent","compKeys","nonCompKeys","allViewKeys","views","viewsObject","$default","pick","$name","normalized","ViewService","$uiViewName","uiViewName","$uiViewContextAnchor","uiViewContextAnchor","$id","loaded","load","paramValues","promises","getController","all","results","controllerProvider","isInjectable","UrlRouterProvider","injectableHandler","handler","match","$match","$stateParams","urlRouter","update","interceptDeferred","listen","rule","ruleFn","BaseUrlRule","identity","rules","otherwise","urlRules","what","deferIntercept","useAnchorScroll","$anchorScroll","scrollIntoView","__spreadArrays","s","i","il","r","k","a","j","jl","root","g","global","fromJson","JSON","toJson","stringify","toObj","_equals","o1","o2","t1","a1","a2","tup","arrayTuples","b","t","getTime","source","fnNames","latebind","bindFunction","fnName","inherit","extra","inArray","array","splice","pushTo","arr","deregAll","functions","defaultsList","_i","defaultVals","reverse","mergeR","memo","item","ancestors","first","second","n","propNames","objCopy","_prop","omit","collection","accept","find","mapObj","values","allTrueR","elem","anyTrueR","flattenR","pushR","uniqR","token","unnest","assertPredicate","predicateOrMap","errMsg","maxArrayLen","min","Math","_loop_1","keyValTuple","copy","src","dest","silenceUncaughtInPromise","catch","e","silentRejection","makeStub","methods","fnname","Glob","text","glob","split","regexpString","seg","regexp","matches","test","curry","curried","compose","start","pipe","funcs","prop","propEq","_val","not","and","fn1","fn2","or","any","ctor","constructor","v","pattern","struct","toStr","tis","isUndefined","isNull","o","isNullOrUndefined","isNumber","isDate","isRegExp","head","isPromise","Queue","_items","_limit","_evictListeners","onEvict","enqueue","items","evict","dequeue","size","clear","current","peekTail","peekHead","noopConsoleStub","log","table","safeConsole","document","documentMode","window","console","bound","Function","ie9Console","fallbackConsole","maxLength","max","substr","padString","$1","toLowerCase","functionToString","fnStr","fnToString","namedFunctionMatch","_fn","isRejection","stringifyPattern","_transitionRejection","seen","format","beforeAfterSubstr","char","stripLastPathElement","splitHash","splitQuery","splitEqual","trimHashVal","splitOnDelim","delim","re","joinNeighborsR","Category","uiViewString","uiview","creationContext","normalizedCat","_tid","_rid","transLbl","Trace","_enabled","approximateDigests","_set","categories","parseInt","isNaN","category","enable","disable","traceTransitionStart","TRANSITION","traceTransitionIgnored","traceHookInvocation","step","HOOK","registeredHook","traceHookResult","hookResult","transitionOptions","traceResolvePath","RESOLVE","traceResolvableResolved","traceError","reason","traceSuccess","finalState","traceUIViewEvent","viewData","UIVIEW","traceUIViewConfigUpdated","traceUIViewFill","traceViewSync","pairs","VIEWCONFIG","uivheader","mapping","_a","_b","uiv","sort","localeCompare","traceViewServiceEvent","viewConfigString","traceViewServiceUIViewEvent","UIRouterGlobals","lastStartedTransitionId","transitionHistory","successfulTransitions","transition","lazyLoadHook","entering","lazyLoad","lazyLoadState","originalTransition","orig","targetState","identifier","$url","parts","sync","registerLazyLoadHook","transitionService","lazyLoadFn","states","_state","err","DefType","hasOwn","Param","urlConfig","paramName","noReloadOnSearch","reloadOnSearch","SEARCH","dynamic","defaultConfig","paramConfig","getStaticDefaultValue","isShorthand","$$fn","unwrapShorthand","getParamDeclaration","urlType","paramTypes","CONFIG","PATH","getType","arrayDefaults","arrayParamNomenclature","arrayMode","$asArray","isOptional","raw","squash","defaultPolicy","getSquashPolicy","defaultSquashPolicy","from","to","configuredKeys","getReplace","params_1","changed","values1","values2","validates","isDefaultValue","replaceSpecialValues","_defaultValueCache","defaultValue","getDefaultValue","$normalize","isSearch","encoded","ParamType","$subPattern","sub","mode","ArrayType","arrayWrap","arrayHandler","allTruthyMode","arrayUnwrap","arrayEqualsHandler","val1","val2","left","right","paramTypeFn","wrapperFn","$arrayMode","makeDefaultType","ParamTypes","typeQueue","defaultTypes","definitionFn","_flushTypeQueue","valToString","defaultTypeBase","String","query","hash","int","bool","Boolean","date","getFullYear","getMonth","getDate","capture","Date","valueOf","l","json","StateParams","$inherit","newParams","$current","$to","parentParams","parents","inheritList","PathNode","stateOrNode","parameters","applyRawParams","pDef","paramDef","parameter","paramsFn","diff","PathUtils","makeTargetState","registry","buildPath","buildToPath","fromPath","toPath","inheritParams","applyViewConfigs","viewDecls","subPath","viewConfigs","createViewConfig","toKeys","noInherit","toNode","toParamVals","incomingParamVals","fromParamVals","ownParamVals","reloadState","node1","node2","retained","keep","nonDynamicParams","retainedWithToParams","retainedNode","matching","pathA","pathB","done","nodeA","nodeB","predicate","elementIdx","resolvePolicies","LAZY","EAGER","WAIT","NOWAIT","arg1","policy","resolved","literal","thisPolicy","statePolicy","resolvePolicy","resolveContext","findNode","asyncPolicy","customAsyncPolicy","getDependencies","resolvedDeps","resolvedValue","fromData","whens","ALL_WHENS","EAGER_WHENS","_path","addResolvables","newResolvables","resolvePath","matchedWhens","matchesPolicy","acceptedVals","whenOrAsync","nodeResolvables","nowait","wait","getResult","injector","_injector","UIInjectorImpl","availableResolvables","_node","fromInjector","getNative","native","getAsync","_routerInstance","locationServiceStub","locationConfigStub","_disposed","_disposables","_plugins","disposable","d","ignored","plugin","pluginInstance","getPlugin","pluginName","nameBuilder","selfBuilder","dataBuilder","getUrlBuilder","$urlMatcherFactoryProvider","stateDec","newStateDec","parsed","substring","parseUrl","isMatcher","navigable","append","getNavigableBuilder","isRoot","pathBuilder","includesBuilder","resolvablesBuilder","resolveObj","getToken","p","provide","literal2Resolvable","useFactory","dependencies","useClass","useValue","useExisting","tuple2Resolvable","item2Resolvable","decl","StateBuilder","matcher","paramFactory","builders","parentName","urlParams","nonUrlParams","builder","build","chain","parentFn","segments","pop","StateMatcher","_states","isRelative","stateName","stateOrName","base","matchGlob","isStr","__stateObjectCache","nameGlob","baseState","splitName","pathLength","relName","StateObject","stateDecl","isStateClass","ref","matchingKeys","isStateDeclaration","isState","StateQueueManager","listeners","queue","flush","registered","orphans","previousQueueLength","getState","notifyListeners","listener","name_1","orphanIdx","existingState","existingFutureState","deregister","attachRoute","prev","abstract","rulesApi","urlRuleFactory","StateRegistry","stateQueue","_registerRoot","_root","onStatesChanged","stateDefinition","_deregisterTree","getChildren","_children","deregistered","removeRule","deregisteredStates","found","property","builderFunction","TargetState","_stateRegistry","_identifier","_params","_options","_definition","relative","exists","valid","withState","withParams","withOptions","newOpts","isDef","HookBuilder","buildHooksForPhase","phase","_getEvents","buildHooks","hookType","matchingHooks","getMatchingHooks","reverseDepthSort","baseHookOptions","criteriaMatchPath","traceData","transitionHook","reverseSort","factor","depthDelta","isCreate","hookPhase","reg","getHooks","matchState","criterion","toMatch","globStrings","RegisteredHook","tranSvc","eventType","matchCriteria","removeHookFromRegistry","invokeCount","_deregistered","invokeLimit","_matchingNodes","nodes","_getDefaultMatchCriteria","_getPathTypes","_getMatchingNodes","mn","pathtype","isStateHook","every","makeEvent","hooks","_registeredHooks","removeHookFn","hookRegistrationFn","matchObject","TransitionHookPhase","TransitionHookScope","RejectType","Rejection","message","detail","isRejectionPromise","superseded","rejection","SUPERSEDED","redirected","invalid","INVALID","IGNORED","aborted","ABORTED","errored","ERROR","normalize","toPromise","TransitionEventType","hookOrder","getResultHandler","getErrorHandler","synchronous","defaultOptions","TransitionHook","stateContext","isSuperseded","isActive","waitFor","nextHook","invokeHook","invokeHooks","doneCallback","remainingHooks","runAllHooks","logError","defaultErrorHandler","notCurrent","getNotCurrentRejection","handleError","handleResult","handleHookResult","isTargetState","_aborted","HANDLE_RESULT","LOG_REJECTED_RESULT","LOG_ERROR","REJECT_ERROR","THROW_ERROR","addCoreResolvables","addResolvable","TRANSITION_TOKENS","isTransition","treeChangesCleanup","replaceTransitionWithNull","redirectToHook","redirect","redirectTo","makeEnterExitRetainHook","hookFn","onExitHook","onRetainHook","onEnterHook","RESOLVE_HOOK_PRIORITY","eagerResolvePath","lazyResolveState","resolveRemaining","loadEnteringViews","enteringViews","activateViews","exitingViews","vc","deactivateViewConfig","activateViewConfig","updateGlobalState","clearCurrentTransition","updateUrl","urlOptions","ignoredHook","ignoredReason","_ignoredReason","pending","abort","invalidTransitionHook","defaultTransOpts","notify","reload","supercede","custom","TransitionService","_router","_transitionCount","_eventTypes","_criteriaPaths","_deregisterHookFns","_defineCorePaths","_defineCoreEvents","_registerCoreTransitionHooks","onCreate","onStart","onExit","onRetain","onEnter","onFinish","onError","hooksArray","Phase","TH","paths","NORMAL_SORT","SYNCHRONOUS","_defineEvent","CREATE","BEFORE","RUN","SUCCESS","STATE","_definePathType","cmpByPhase","hookScope","fns","addCoreResolves","registerInvalidTransitionHook","registerRedirectToHook","registerOnExitHook","registerOnRetainHook","registerOnEnterHook","eagerResolve","registerEagerResolvePath","lazyResolve","registerLazyResolveState","resolveAll","registerResolveRemaining","loadViews","registerLoadEnteringViews","registerActivateViews","updateGlobals","registerUpdateGlobalState","registerUpdateUrl","UrlConfig","_isCaseInsensitive","_isStrictMode","_defaultSquashPolicy","hashPrefix","newprefix","host","port","protocol","caseInsensitive","strictMode","__assign","ParamFactory","fromSearch","UrlMatcherFactory","UrlMatcher","globalConfig","strict","decodeParams","object","UrlRouter","urlParts","compareFn","read","urlMatcher","href","absolute","isHtml5","appendBasePath","slash","cfgPort","defineProperty","enumerable","configurable","UrlRuleFactory","makeRule","_what","fromUrlMatcher","fromState","fromRegExp","_handler","details","matchPriority","optional","search","stateOrDecl","transitionTo","sticky","Number","isUrlRule","defaultRuleSortFn","getHandlerFn","cmp","prioritySort","weights","URLMATCHER","REGEXP","RAW","OTHER","typeSort","urlMatcherSort","useMatchPriority","idSort","UrlRules","_sortFn","_rules","_id","_otherwiseFn","handlerFn","_sorted","ensureSorted","sorted","stableSort","group","_group","arrOfWrapper","wrapperA","wrapperB","cmpDiff","wrapper","UrlService","newurl","best","go","applyResult","_stopListeningFn","weight","BaseLocationServices","fireAfterUpdate","_listeners","_listener","_get","_location","_history","BrowserLocationConfig","_isHtml5","_hashPrefix","hostname","getBaseHref","baseTag","getElementsByTagName","extendStatics","__extends","setPrototypeOf","__proto__","__","HashLocationService","_super","title","MemoryLocationConfig","_port","_protocol","_host","newval","MemoryLocationService","_url","PushStateLocationService","_config","_getBasePrefix","basePrefix","exactBaseHrefMatch","startsWithBase","fullUrl","replaceState","pushState","Promise","reject","deferred","keyValsToObjectR","accum","getParams","queryString","orEmptyString","beforehash","buildUrl","loc","searchObject","locationPluginFactory","serviceClass","configurationClass","configuration","_uiViews","_viewConfigs","_viewConfigFactories","_registeredUIView","_registeredUIViews","_activeViewConfigs","_onSync","normalizeUIViewTarget","rawViewName","viewAtContext","relativeViewNameSugar","anchorState","anchor","_rootContext","viewType","cfgFactory","cfgs","uiViewsByFqn","viewConfigDepth","depthCompare","depthFn","posNeg","uiViewTuples","stateDepth","matchingConfigs","matchedViewConfigs","unmatchedConfigTuples","allTuples","uiViews","available","active","vcSegments","uivSegments","negOffset","fqnToFirstSegment","uiViewContext","ARIA_DISABLE_ATTR","ngAriaModule","info","angularVersion","ariaHidden","ariaChecked","ariaReadonly","ariaDisabled","ariaRequired","ariaInvalid","ariaValue","tabindex","bindKeydown","bindRoleForClick","watchExpr","ariaAttr","nativeAriaNodeNames","negate","ariaCamelName","isNodeOneOf","boolVal","newConfig","$$watchExpr","nodeTypeArray","nodeName","$aria","shouldAttachAttr","normalizedAttr","allowNonAriaNodes","shouldAttachRole","role","shape","getShape","post","ngModel","needsTabIndex","ngAriaWatchModelValue","$modelValue","newVal","$viewValue","$isEmpty","needsAriaValuemin","needsAriaValuemax","needsAriaValuenow","$observe","$validators","required","$invalid","ngMessages","ngClick","ngKeydown","ngKeypress","ngKeyup","keyCode","which","isContentEditable","$event","readOnly","pristine","resetable","starWidth","starHeight","canelWidth","cancelHeight","rated","reset","beforeRated","beforeReset","isTouch","navigator","msMaxTouchPoints","orgValue","starPartWidth","steps","garbage","getValue","index","getStartParts","getStarOffset","ratio","isSelected","removeRating","rating","setValue","tmpValue","put","IndexController","$mdDialog","RemoteStorageService","api","STORAGE_LAYOUT","STORAGE_VISITOR","vm","toggle","up","updateStorage","cmd","layout","postMessage","onStorageError","debug","visitor","status","div_color","settings","color","text_color","textColor","text_button_color","textButtonColor","button_color","color_button","background_color","backgroundColor","client_height","documentElement","clientHeight","innerHeight","client_width","clientWidth","style","setProperty","tg","getStoredValueWithLocation","visitorStoragePromise","getItem","layoutStoragePromise","visitorValue","layoutValue","interaction","alignment","online","exceeded","maxInteractions","openedInteractions","isOnline","hideWhenOffline","createElement","appendChild","sheet","insertRule","close","confirm","querySelector","clickOutsideToClose","closingQuestion","ok","show","chatInteraction","customUpdate","closed","closeReason","$promise","download","getMessages","intid","includeAll","_map","rows","row","sender","direction","customerAlias","ContactId","agentIdentifier","UserId","agentAlias","User","alias","fullname","body","createdAt","moment","getHeaderShape","header_shape","CHAT_STATUSES","offline","defaultTitle","header_online","header_offline","addEventListener","routeRun","cursor","hide","_forIn","_isNil","routeConfig","$stateProvider","$httpProvider","localStorageServiceProvider","STORAGE_PREFIX","Pragma","setPrefix","waitingTemplate","onlineTemplate","offlineTemplate","chatTemplate","unmanagedTemplate","closingTemplate","ClosingController","$mdToast","errors","toast","simple","textContent","formSubmitFailureMessage","toastClass","position","stopLoading","loading","goToIfTime","form","upColor","downColor","userForm","$setPristine","$setUntouched","enableDownload","removeItem","submit","_merge","ratingType","customer","formSubmitSuccessMessage","finally","skip","apiService","$resource","paramDefaults","baseUrl","remote","chatWebsite","method","getFields","uploadAttachment","transformRequest","downloadAttachment","abandon","chatMessage","ChatController","$interval","$document","emojiArea","getMessagesInterval","getInteractionInterval","lastMessageId","clearStorage","scrollToBottomOfChat","getElementsByClassName","scrollTop","scrollHeight","sendMessage","chatMessageError","updateRootscope","interactionStarted","emojioneArea","setText","getInteraction","disposition","reply","getText","shiftKey","includeAgent","added","_find","messages","emojiOptions","watchEmbedData","fontSmiley","emoji","linkTarget","showMenu","replyMessage","$","placeholder","placeholderMessage","keyup","editor","ready","setFocus","reply_button","fd","FormData","sendAttachment","AttachmentId","_values","OfflineController","$sce","fromKey","initialFields","typeField","optJsonFormData","showLeafArrayIndexes","includeNullValues","onSubmitSuccess","fields","_cloneDeep","trustAsHtml","initUploadButton","formItem","uploadItem","button","label","css","trigger","click","props","maxSizeMB","some","sizeErrMessage","removeFileItem","setupFileInput","multipleUpload","setAttribute","makeFileOptionsVisible","fileOpts","lastOpt","mapKeyOffline","_random","field","helpText","isHTML","checkHTML","cmField","uploadFields","payLoad","isFormDataPayload","isJsonPayload","payload","jsonToFormData","initialFormData","OnlineController","initVisitorForm","mapKey","disableItem","chatInteractionId","messageId","channel","variable","referer","customerIp","enableCustomerWriting","UnmanagedController","note","WaitingController","getInteractionIntervalHandle","open","remoteAddress","URL","address","origin","setItem","action","storage","expectedAction","removeEventListener","stringData","warn","toTrustedFilter","constant","ngEnter","getElementById","div","startTime","sentAt","createTextNode","myWindow","write","innerHTML","focus","print","printElement","elemToPrint","$mdGestureProvider","skipClickHijack","exports","globalThis","isJsonObject","Blob","isGlobalFormDataPresent","getDefaultFormData","convertRecursively","jsonObject","formData","parentKey","propName","FileList","toISOString","mergedOptions","carry","objectToMerge","objectKey","defineLocale","months","monthsShort","weekdays","weekdaysShort","weekdaysMin","meridiemParse","isPM","meridiem","hours","minutes","isLower","longDateFormat","LT","LTS","L","LL","LLL","LLLL","calendar","sameDay","nextDay","nextWeek","lastDay","lastWeek","sameElse","relativeTime","future","past","ss","mm","h","hh","dd","M","MM","y","yy","dayOfMonthOrdinalParse","ordinal","number","week","dow","doy","pluralForm","plurals","pluralize","u","withoutSuffix","isFuture","f","weekdaysParseExact","hour","minute","postformat","symbolMap","preparse","numberMap","suffixes","relativeTimeWithPlural","num","forms","standalone","isFormat","day","period","w","ww","lastDigit","last2Digits","meridiemHour","monthsShortRegex","monthsParseExact","relativeTimeWithMutation","mutationTable","softMutation","mutation","lastNumber","monthsParse","monthsRegex","minWeekdaysParse","weekdaysParse","fullWeekdaysParse","shortWeekdaysParse","monthsStrictRegex","monthsShortStrictRegex","longMonthsParse","shortMonthsParse","translate","ll","lll","llll","output","plural","processRelativeTime","monthsNominativeEl","monthsGenitiveEl","momentToFormat","_monthsGenitiveEl","month","_monthsNominativeEl","calendarEl","mom","_calendarEl","monthsShortDot","invalidDate","numbersPast","numbersFuture","verbalNumber","monthsShortWithDots","monthsShortWithoutDots","weekEndings","eras","since","offset","narrow","abbr","until","eraYearOrdinalRegex","eraYearOrdinalParse","now","$0","$2","isUpper","eifelerRegelAppliesToNumber","units","translateSingular","special","relativeTimeWithSingular","translator","words","correctGrammaticalCase","wordKey","relativeTimeMr","monthsNominative","monthsSubjective","separator","days","numbersNouns","numberNoun","hundred","floor","ten","one","word","numberAsNoun","time","hm","processHoursFunction","nominative","accusative","genitive","webpackContext","req","webpackContextResolve","__webpack_require__","code","urlSanitizationWhitelist","aHrefSanitizationWhitelist","stringifyField","decimalSep","isFloat","toLocaleString","quoteStrings","txtDelim","isFinite","header","fieldSep","c","columnOrder","addByteOrderMarker","isSpecialChar","getSpecialChar","filename","charset","csv","buildCSV","getFilename","addClass","ngCsvLoadingClass","csvHeader","csvColumnOrder","csvLabel","removeClass","msSaveOrOpenBlob","msSaveBlob","createObjectURL"],"sourceRoot":""} \ No newline at end of file diff --git a/snippet/3.1.0/scripts/mobile.js b/snippet/3.1.0/scripts/mobile.js new file mode 100644 index 0000000..9ad64b1 --- /dev/null +++ b/snippet/3.1.0/scripts/mobile.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkmotion_chat=self.webpackChunkmotion_chat||[]).push([["mobile"],{"./src/styles/mobile.scss":()=>{}},s=>{s(s.s="./src/styles/mobile.scss")}]); \ No newline at end of file diff --git a/snippet/3.1.0/scripts/runtime.js b/snippet/3.1.0/scripts/runtime.js new file mode 100644 index 0000000..2867731 --- /dev/null +++ b/snippet/3.1.0/scripts/runtime.js @@ -0,0 +1,2 @@ +(()=>{"use strict";var r,e={},t={};function o(r){var n=t[r];if(void 0!==n)return n.exports;var i=t[r]={id:r,loaded:!1,exports:{}};return e[r].call(i.exports,i,i.exports,o),i.loaded=!0,i.exports}o.m=e,r=[],o.O=(e,t,n,i)=>{if(!t){var a=1/0;for(p=0;p=i)&&Object.keys(o.O).every((r=>o.O[r](t[l])))?t.splice(l--,1):(c=!1,i0&&r[p-1][2]>i;p--)r[p]=r[p-1];r[p]=[t,n,i]},o.n=r=>{var e=r&&r.__esModule?()=>r.default:()=>r;return o.d(e,{a:e}),e},o.d=(r,e)=>{for(var t in e)o.o(e,t)&&!o.o(r,t)&&Object.defineProperty(r,t,{enumerable:!0,get:e[t]})},o.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(r){if("object"==typeof window)return window}}(),o.o=(r,e)=>Object.prototype.hasOwnProperty.call(r,e),o.nmd=r=>(r.paths=[],r.children||(r.children=[]),r),(()=>{var r;o.g.importScripts&&(r=o.g.location+"");var e=o.g.document;if(!r&&e&&(e.currentScript&&(r=e.currentScript.src),!r)){var t=e.getElementsByTagName("script");t.length&&(r=t[t.length-1].src)}if(!r)throw new Error("Automatic publicPath is not supported in this browser");r=r.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),o.p=r+"../"})(),(()=>{var r={runtime:0,vendor:0};o.O.j=e=>0===r[e];var e=(e,t)=>{var n,i,[a,c,l]=t,s=0;if(a.some((e=>0!==r[e]))){for(n in c)o.o(c,n)&&(o.m[n]=c[n]);if(l)var p=l(o)}for(e&&e(t);s{n.d(a,{ng:()=>s});var u=n("./node_modules/angular/index-exposed.js"),o=angular,s=u&&u.module?u:o}}]); +//# sourceMappingURL=vendor-angular-58d021f3.js.map \ No newline at end of file diff --git a/snippet/3.1.0/scripts/vendor-angular-58d021f3.js.map b/snippet/3.1.0/scripts/vendor-angular-58d021f3.js.map new file mode 100644 index 0000000..2ee3511 --- /dev/null +++ b/snippet/3.1.0/scripts/vendor-angular-58d021f3.js.map @@ -0,0 +1 @@ +{"version":3,"file":"scripts/vendor-angular-58d021f3.js","mappings":"uPAEmBA,EAAiBC,QACVC,EAAK,GAAkB,SAAwB,EAAiBF","sources":["webpack://motion-chat/./node_modules/@uirouter/angularjs/lib-esm/angular.js"],"names":["ng_from_global","angular","ng"],"sourceRoot":""} \ No newline at end of file diff --git a/snippet/3.1.0/scripts/vendor-angular-76f2ed34.js b/snippet/3.1.0/scripts/vendor-angular-76f2ed34.js new file mode 100644 index 0000000..ce751db --- /dev/null +++ b/snippet/3.1.0/scripts/vendor-angular-76f2ed34.js @@ -0,0 +1,3 @@ +/*! For license information please see vendor-angular-76f2ed34.js.LICENSE.txt */ +(self.webpackChunkmotion_chat=self.webpackChunkmotion_chat||[]).push([["vendor-angular-76f2ed34"],{"./node_modules/angular/angular.js":(t,e,n)=>{var r=n("./node_modules/jquery/dist/jquery.js");!function(t){"use strict";var e={objectMaxDepth:5,urlErrorParamsEnabled:!0};function n(t){if(!L(t))return e;D(t.objectMaxDepth)&&(e.objectMaxDepth=i(t.objectMaxDepth)?t.objectMaxDepth:NaN),D(t.urlErrorParamsEnabled)&&Y(t.urlErrorParamsEnabled)&&(e.urlErrorParamsEnabled=t.urlErrorParamsEnabled)}function i(t){return H(t)&&t>0}function o(t,n){n=n||Error;var r="https://errors.angularjs.org/1.8.2/",i=r.replace(".","\\.")+"[\\s\\S]*",o=new RegExp(i,"g");return function(){var i,a,s=arguments[0],u=arguments[1],c="["+(t?t+":":"")+s+"] ",l=ht(arguments,2).map((function(t){return Ht(t,e.objectMaxDepth)}));if(c+=u.replace(/\{\d+\}/g,(function(t){var e=+t.slice(1,-1);return e=0&&e-1 in t||"function"==typeof t.item)}function C(t,e,n){var r,i;if(t)if(G(t))for(r in t)"prototype"!==r&&"length"!==r&&"name"!==r&&t.hasOwnProperty(r)&&e.call(n,t[r],r,t);else if(z(t)||x(t)){var o="object"!=typeof t;for(r=0,i=t.length;r=0&&t.splice(n,1),n}function at(t,e,n){var r,o,a=[],s=[];if(n=i(n)?n:NaN,e){if((o=e)&&H(o.length)&&Q.test(m.call(o))||(r=e,"[object ArrayBuffer]"===m.call(r)))throw y("cpta","Can't copy! TypedArray destination cannot be mutated.");if(t===e)throw y("cpi","Can't copy! Source and destination are identical.");return z(e)?e.length=0:C(e,(function(t,n){"$$hashKey"!==n&&delete e[n]})),a.push(t),s.push(e),u(t,e,n)}return c(t,n);function u(t,e,n){if(--n<0)return"...";var r,i=e.$$hashKey;if(z(t))for(var o=0,a=t.length;o2?ht(arguments,2):[];return!G(e)||e instanceof RegExp?e:n.length?function(){return arguments.length?e.apply(t,ft(n,arguments,0)):e.apply(t,n)}:function(){return arguments.length?e.apply(t,arguments):e.call(t)}}function dt(e,n){var r=n;return"string"==typeof e&&"$"===e.charAt(0)&&"$"===e.charAt(1)?r=void 0:J(n)?r="$WINDOW":n&&t.document===n?r="$DOCUMENT":Z(n)&&(r="$SCOPE"),r}function $t(t,e){if(!_(t))return H(e)||(e=e?2:null),JSON.stringify(t,dt,e)}function vt(t){return F(t)?JSON.parse(t):t}var mt=/:/g;function gt(t,e){t=t.replace(mt,"");var n=Date.parse("Jan 01, 1970 00:00:00 "+t)/6e4;return N(n)?e:n}function yt(t,e){return(t=new Date(t.getTime())).setMinutes(t.getMinutes()+e),t}function bt(t,e,n){n=n?-1:1;var r=t.getTimezoneOffset();return yt(t,n*(gt(e,r)-r))}function wt(t){t=s(t).clone().empty();var e=s("
").append(t).html();try{return t[0].nodeType===qt?h(e):e.match(/^(<[^>]+>)/)[1].replace(/^<([\w-]+)/,(function(t,e){return"<"+h(e)}))}catch(t){return h(e)}}function xt(t){try{return decodeURIComponent(t)}catch(t){}}function Ct(t){var e={};return C((t||"").split("&"),(function(t){var n,r,i;t&&(r=t=t.replace(/\+/g,"%20"),-1!==(n=t.indexOf("="))&&(r=t.substring(0,n),i=t.substring(n+1)),D(r=xt(r))&&(i=!D(i)||xt(i),f.call(e,r)?z(e[r])?e[r].push(i):e[r]=[e[r],i]:e[r]=i))})),e}function Et(t){return St(t,!0).replace(/%26/gi,"&").replace(/%3D/gi,"=").replace(/%2B/gi,"+")}function St(t,e){return encodeURIComponent(t).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%3B/gi,";").replace(/%20/g,e?"%20":"+")}var kt=["ng-","data-ng-","ng:","x-ng-"],At=function(e){var n=e.currentScript;if(!n)return!0;if(!(n instanceof t.HTMLScriptElement||n instanceof t.SVGScriptElement))return!1;var r=n.attributes;return[r.getNamedItem("src"),r.getNamedItem("href"),r.getNamedItem("xlink:href")].every((function(t){if(!t)return!0;if(!t.value)return!1;var n=e.createElement("a");if(n.href=t.value,e.location.origin===n.origin)return!0;switch(n.protocol){case"http:":case"https:":case"ftp:":case"blob:":case"file:":case"data:":return!0;default:return!1}}))}(t.document);function Ot(e,n,r){L(r)||(r={}),r=M({strictDi:!1},r);var i=function(){if((e=s(e)).injector()){var i=e[0]===t.document?"document":wt(e);throw y("btstrpd","App already bootstrapped with this element '{0}'",i.replace(//,">"))}(n=n||[]).unshift(["$provide",function(t){t.value("$rootElement",e)}]),r.debugInfoEnabled&&n.push(["$compileProvider",function(t){t.debugInfoEnabled(!0)}]),n.unshift("ng");var o=Ye(n,r.strictDi);return o.invoke(["$rootScope","$rootElement","$compile","$injector",function(t,e,n,r){t.$apply((function(){e.data("$injector",r),n(e)(t)}))}]),o},o=/^NG_ENABLE_DEBUG_INFO!/,a=/^NG_DEFER_BOOTSTRAP!/;if(t&&o.test(t.name)&&(r.debugInfoEnabled=!0,t.name=t.name.replace(o,"")),t&&!a.test(t.name))return i();t.name=t.name.replace(a,""),b.resumeBootstrap=function(t){return C(t,(function(t){n.push(t)})),i()},G(b.resumeDeferredBootstrap)&&b.resumeDeferredBootstrap()}function Mt(){t.name="NG_ENABLE_DEBUG_INFO!"+t.name,t.location.reload()}function Tt(t){var e=b.element(t).injector();if(!e)throw y("test","no injector found for element argument to getTestability");return e.get("$$testability")}var Vt=/[A-Z]/g;function Nt(t,e){return e=e||"_",t.replace(Vt,(function(t,n){return(n?e:"")+t.toLowerCase()}))}var jt=!1;function It(){he.legacyXHTMLReplacement=!0}function Rt(t,e,n){if(!t)throw y("areq","Argument '{0}' is {1}",e||"?",n||"required");return t}function Pt(t,e,n){return n&&z(t)&&(t=t[t.length-1]),Rt(G(t),e,"not a function, got "+(t&&"object"==typeof t?t.constructor.name||"Object":typeof t)),t}function Ut(t,e){if("hasOwnProperty"===t)throw y("badname","hasOwnProperty is not a valid {0} name",e)}function _t(t){for(var e,n=t[0],r=t[t.length-1],i=1;n!==r&&(n=n.nextSibling);i++)(e||t[i]!==n)&&(e||(e=s(d.call(t,0,i))),e.push(n));return e||t}function Dt(){return Object.create(null)}function Lt(t){if(null==t)return"";switch(typeof t){case"string":break;case"number":t=""+t;break;default:t=!U(t)||z(t)||B(t)?$t(t):t.toString()}return t}var qt=3;function Ft(t,e){if(z(t)){e=e||[];for(var n=0,r=t.length;n=0)return"...";n.push(e)}return e}))}(t,e):t}var Bt={full:"1.8.2",major:1,minor:8,dot:2,codeName:"meteoric-mining"};he.expando="ng339";var zt=he.cache={},Wt=1;he._data=function(t){return this.cache[t[this.expando]]||{}};var Gt=/-([a-z])/g,Kt=/^-ms-/,Jt={mouseleave:"mouseout",mouseenter:"mouseover"},Zt=o("jqLite");function Yt(t,e){return e.toUpperCase()}function Xt(t){return t.replace(Gt,Yt)}var Qt=/^<([\w-]+)\s*\/?>(?:<\/\1>|)$/,te=/<|&#?\w+;/,ee=/<([\w:-]+)/,ne=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:-]+)[^>]*)\/>/gi,re={thead:["table"],col:["colgroup","table"],tr:["tbody","table"],td:["tr","tbody","table"]};re.tbody=re.tfoot=re.colgroup=re.caption=re.thead,re.th=re.td;var ie={option:[1,'"],_default:[0,"",""]};for(var oe in re){var ae=re[oe],se=ae.slice().reverse();ie[oe]=[se.length,"<"+se.join("><")+">",""]}function ue(t){return!te.test(t)}function ce(t){var e=t.nodeType;return 1===e||!e||9===e}function le(e,n){var r,i,o,s,u,c=n.createDocumentFragment(),l=[];if(ue(e))l.push(n.createTextNode(e));else{if(r=c.appendChild(n.createElement("div")),i=(ee.exec(e)||["",""])[1].toLowerCase(),s=he.legacyXHTMLReplacement?e.replace(ne,"<$1>"):e,a<10)for(o=ie[i]||ie._default,r.innerHTML=o[1]+s+o[2],u=o[0];u--;)r=r.firstChild;else{for(u=(o=re[i]||[]).length;--u>-1;)r.appendChild(t.document.createElement(o[u])),r=r.firstChild;r.innerHTML=s}l=ft(l,r.childNodes),(r=c.firstChild).textContent=""}return c.textContent="",c.innerHTML="",C(l,(function(t){c.appendChild(t)})),c}ie.optgroup=ie.option;var fe=t.Node.prototype.contains||function(t){return!!(16&this.compareDocumentPosition(t))};function he(e){if(e instanceof he)return e;var n,r,i,o;if(F(e)&&(e=tt(e),n=!0),!(this instanceof he)){if(n&&"<"!==e.charAt(0))throw Zt("nosel","Looking up elements via selectors is not supported by jqLite! See: http://docs.angularjs.org/api/angular.element");return new he(e)}n?Ee(this,(r=e,i=i||t.document,(o=Qt.exec(r))?[i.createElement(o[1])]:(o=le(r,i))?o.childNodes:[])):G(e)?Me(e):Ee(this,e)}function pe(t){return t.cloneNode(!0)}function de(t,e){!e&&ce(t)&&s.cleanData([t]),t.querySelectorAll&&s.cleanData(t.querySelectorAll("*"))}function $e(t){var e;for(e in t)return!1;return!0}function ve(t){var e=t.ng339,n=e&&zt[e],r=n&&n.events,i=n&&n.data;i&&!$e(i)||r&&!$e(r)||(delete zt[e],t.ng339=void 0)}function me(t,e,n,r){if(D(r))throw Zt("offargs","jqLite#off() does not support the `selector` argument");var i=ye(t),o=i&&i.events,a=i&&i.handle;if(a){if(e){var s=function(e){var r=o[e];D(n)&&ot(r||[],n),D(n)&&r&&r.length>0||(t.removeEventListener(e,a),delete o[e])};C(e.split(" "),(function(t){s(t),Jt[t]&&s(Jt[t])}))}else for(e in o)"$destroy"!==e&&t.removeEventListener(e,a),delete o[e];ve(t)}}function ge(t,e){var n=t.ng339,r=n&&zt[n];r&&(e?delete r.data[e]:r.data={},ve(t))}function ye(t,e){var n=t.ng339,r=n&&zt[n];return e&&!r&&(t.ng339=n=++Wt,r=zt[n]={events:{},data:{},handle:void 0}),r}function be(t,e,n){if(ce(t)){var r,i=D(n),o=!i&&e&&!L(e),a=!e,s=ye(t,!o),u=s&&s.data;if(i)u[Xt(e)]=n;else{if(a)return u;if(o)return u&&u[Xt(e)];for(r in e)u[Xt(r)]=e[r]}}}function we(t,e){return!!t.getAttribute&&(" "+(t.getAttribute("class")||"")+" ").replace(/[\n\t]/g," ").indexOf(" "+e+" ")>-1}function xe(t,e){if(e&&t.setAttribute){var n=(" "+(t.getAttribute("class")||"")+" ").replace(/[\n\t]/g," "),r=n;C(e.split(" "),(function(t){t=tt(t),r=r.replace(" "+t+" "," ")})),r!==n&&t.setAttribute("class",tt(r))}}function Ce(t,e){if(e&&t.setAttribute){var n=(" "+(t.getAttribute("class")||"")+" ").replace(/[\n\t]/g," "),r=n;C(e.split(" "),(function(t){t=tt(t),-1===r.indexOf(" "+t+" ")&&(r+=t+" ")})),r!==n&&t.setAttribute("class",tt(r))}}function Ee(t,e){if(e)if(e.nodeType)t[t.length++]=e;else{var n=e.length;if("number"==typeof n&&e.window!==e){if(n)for(var r=0;r=0?this[t]:this[this.length+t])},length:0,push:v,sort:[].sort,splice:[].splice},Ve={};C("multiple,selected,checked,disabled,readOnly,required,open".split(","),(function(t){Ve[h(t)]=t}));var Ne={};C("input,select,option,textarea,button,form,details".split(","),(function(t){Ne[t]=!0}));var je={ngMinlength:"minlength",ngMaxlength:"maxlength",ngMin:"min",ngMax:"max",ngPattern:"pattern",ngStep:"step"};function Ie(t,e){var n=Ve[e.toLowerCase()];return n&&Ne[rt(t)]&&n}function Re(t,e,n){n.call(t,e)}function Pe(t,e,n){var r=e.relatedTarget;r&&(r===t||fe.call(t,r))||n.call(t,e)}function Ue(){this.$get=function(){return M(he,{hasClass:function(t,e){return t.attr&&(t=t[0]),we(t,e)},addClass:function(t,e){return t.attr&&(t=t[0]),Ce(t,e)},removeClass:function(t,e){return t.attr&&(t=t[0]),xe(t,e)}})}}function _e(t,e){var n=t&&t.$$hashKey;if(n)return"function"==typeof n&&(n=t.$$hashKey()),n;var r=typeof t;return"function"===r||"object"===r&&null!==t?t.$$hashKey=r+":"+(e||k)():r+":"+t}C({data:be,removeData:ge,hasData:function(t){for(var e in zt[t.ng339])return!0;return!1},cleanData:function(t){for(var e=0,n=t.length;e1&&(i=Ft(i));for(var u=0;u=0?e.split(" "):[e],u=s.length,c=function(e,r,i){var s=o[e];s||((s=o[e]=[]).specialHandlerWrapper=r,"$destroy"===e||i||t.addEventListener(e,a)),s.push(n)};u--;)e=s[u],Jt[e]?(c(Jt[e],Pe),c(e,void 0,!0)):c(e)}},off:me,one:function(t,e,n){(t=s(t)).on(e,(function r(){t.off(e,n),t.off(e,r)})),t.on(e,n)},replaceWith:function(t,e){var n,r=t.parentNode;de(t),C(new he(e),(function(e){n?r.insertBefore(e,n.nextSibling):r.replaceChild(e,t),n=e}))},children:function(t){var e=[];return C(t.childNodes,(function(t){1===t.nodeType&&e.push(t)})),e},contents:function(t){return t.contentDocument||t.childNodes||[]},append:function(t,e){var n=t.nodeType;if(1===n||11===n)for(var r=0,i=(e=new he(e)).length;r/,Be=/^[^(]*\(\s*([^)]*)\)/m,ze=/,/,We=/^\s*(_?)(\S+?)\1\s*$/,Ge=/((\/\/.*$)|(\/\*[\s\S]*?\*\/))/gm,Ke=o("$injector");function Je(t){return Function.prototype.toString.call(t)}function Ze(t){var e=Je(t).replace(Ge,"");return e.match(He)||e.match(Be)}function Ye(t,e){e=!0===e;var n={},r="Provider",i=[],o=new qe,s={$provide:{provider:d($),factory:d(m),service:d((function(t,e){return m(t,["$injector",function(t){return t.instantiate(e)}])})),value:d((function(t,e){return m(t,P(e),!1)})),constant:d((function(t,e){Ut(t,"constant"),s[t]=e,l[t]=e})),decorator:function(t,e){var n=u.get(t+r),i=n.$get;n.$get=function(){var t=h.invoke(i,n);return h.invoke(e,null,{$delegate:t})}}}},u=s.$injector=y(s,(function(t,e){throw b.isString(e)&&i.push(e),Ke("unpr","Unknown provider: {0}",i.join(" <- "))})),l={},f=y(l,(function(t,e){var n=u.get(t+r,e);return h.invoke(n.$get,n,void 0,t)})),h=f;s.$injectorProvider={$get:P(f)},h.modules=u.modules=Dt();var p=g(t);return(h=f.get("$injector")).strictDi=e,C(p,(function(t){t&&h.invoke(t)})),h.loadNewModules=function(t){C(g(t),(function(t){t&&h.invoke(t)}))},h;function d(t){return function(e,n){if(!L(e))return t(e,n);C(e,S(t))}}function $(t,e){if(Ut(t,"service"),(G(e)||z(e))&&(e=u.instantiate(e)),!e.$get)throw Ke("pget","Provider '{0}' must define $get factory method.",t);return s[t+r]=e}function v(t,e){return function(){var n=h.invoke(e,this);if(_(n))throw Ke("undef","Provider '{0}' must return a value from $get factory method.",t);return n}}function m(t,e,n){return $(t,{$get:!1!==n?v(t,e):e})}function g(t){Rt(_(t)||z(t),"modulesToLoad","not an array");var e,n=[];return C(t,(function(t){if(!o.get(t)){o.set(t,!0);try{F(t)?(e=c(t),h.modules[t]=e,n=n.concat(g(e.requires)).concat(e._runBlocks),r(e._invokeQueue),r(e._configBlocks)):G(t)||z(t)?n.push(u.invoke(t)):Pt(t,"module")}catch(e){throw z(t)&&(t=t[t.length-1]),e.message&&e.stack&&-1===e.stack.indexOf(e.message)&&(e=e.message+"\n"+e.stack),Ke("modulerr","Failed to instantiate module {0} due to:\n{1}",t,e.stack||e.message||e)}}function r(t){var e,n;for(e=0,n=t.length;e1||t((function(){for(var t=0;ts&&this.remove(l.key),e},get:function(t){if(s0&&T.addClass(this.$$element,t)},$removeClass:function(t){t&&t.length>0&&T.removeClass(this.$$element,t)},$updateClass:function(t,e){var n=wn(t,e);n&&n.length&&T.addClass(this.$$element,n);var r=wn(e,t);r&&r.length&&T.removeClass(this.$$element,r)},$set:function(t,e,n,r){var i=Ie(this.$$element[0],t),o=je[t],a=t;i?(this.$$element.prop(t,e),r=i):o&&(this[o]=e,a=o),this[t]=e,r?this.$attr[t]=r:(r=this.$attr[t])||(this.$attr[t]=r=Nt(t,"-")),"img"===rt(this.$$element)&&"srcset"===t&&(this[t]=e=B(e,"$set('srcset', value)")),!1!==n&&(null===e||_(e)?this.$$element.removeAttr(r):N.test(r)?i&&!1===e?this.$$element.removeAttr(r):this.$$element.attr(r,e):function(t,e,n){P.innerHTML="";var r=P.firstChild.attributes,i=r[0];r.removeNamedItem(i.name),i.value=n,t.attributes.setNamedItem(i)}(this.$$element[0],r,e));var s=this.$$observers;s&&C(s[a],(function(t){try{t(e)}catch(t){d(t)}}))},$observe:function(t,e){var n=this,r=n.$$observers||(n.$$observers=Dt()),i=r[t]||(r[t]=[]);return i.push(e),A.$evalAsync((function(){i.$$inter||!n.hasOwnProperty(t)||_(n[t])||e(n[t])})),function(){ot(i,e)}}};var X=n.startSymbol(),Q=n.endSymbol(),et="{{"===X&&"}}"===Q?R:function(t){return t.replace(/\{\{/g,X).replace(/}}/g,Q)},nt=/^ng(Attr|Prop|On)([A-Z].*)$/,it=/^(.+)Start$/;return at.$$addBindingInfo=g?function(t,e){var n=t.data("$binding")||[];z(e)?n=n.concat(e):n.push(e),t.data("$binding",n)}:I,at.$$addBindingClass=g?function(t){J(t,"ng-binding")}:I,at.$$addScopeInfo=g?function(t,e,n,r){var i=n?r?"$isolateScopeNoTemplate":"$isolateScope":"$scope";t.data(i,e)}:I,at.$$addScopeClass=g?function(t,e){J(t,e?"ng-isolate-scope":"ng-scope")}:I,at.$$createComment=function(e,n){var r="";return g&&(r=" "+(e||"")+": ",n&&(r+=n+" ")),t.document.createComment(r)},at;function at(t,e,n,r,i){t instanceof s||(t=s(t));var o=ct(t,e,t,n,r,i);at.$$addScopeClass(t);var a=null;return function(e,n,r){if(!t)throw dn("multilink","This element has already been linked.");Rt(e,"scope"),i&&i.needsNewScope&&(e=e.$parent.$new());var u,c,l,f=(r=r||{}).parentBoundTranscludeFn,h=r.transcludeControllers,p=r.futureParentElement;if(f&&f.$$boundTransclude&&(f=f.$$boundTransclude),a||(c=(u=p)&&u[0],a=c&&"foreignobject"!==rt(c)&&m.call(c).match(/SVG/)?"svg":"html"),l="html"!==a?s(Ot(a,s("
").append(t).html())):n?Te.clone.call(t):t,h)for(var d in h)l.data("$"+d+"Controller",h[d].instance);return at.$$addScopeInfo(l,e),n&&n(l,e),o&&o(e,l,l,f),n||(t=o=null),l}}function ct(t,e,n,r,i,o){for(var u,c,l,f,h,p,d,$=[],v=z(t)||t instanceof s,m=0;m0);else r.push(t);return s(r)}function vt(t,e,n){return function(r,i,o,a,s){return i=$t(i[0],e,n),t(r,i,o,a,s)}}function mt(t,e,n,r,i,o){var a;return t?at(e,n,r,i,o):function(){return a||(a=at(e,n,r,i,o),e=n=o=null),a.apply(this,arguments)}}function gt(e,n,r,i,o,a,u,c,l){l=l||{};for(var f,h,p,$,v,m=-Number.MAX_VALUE,g=l.newScopeDirective,y=l.controllerDirectives,b=l.newIsolateScopeDirective,w=l.templateDirective,x=l.nonTlbTranscludeDirective,E=!1,S=!1,A=l.hasElementTranscludeDirective,O=r.$$element=s(n),T=a,V=i,N=!1,j=!1,I=0,R=e.length;If.priority)break;if((v=f.scope)&&(f.templateUrl||(L(v)?(At("new/isolated scope",b||g,f,O),b=f):At("new/isolated scope",b,f,O)),g=g||f),h=f.name,!N&&(f.replace&&(f.templateUrl||f.template)||f.transclude&&!f.$$tlb)){for(var D,q=I+1;D=e[q++];)if(D.transclude&&!D.$$tlb||D.replace&&(D.templateUrl||D.template)){j=!0;break}N=!0}if(!f.templateUrl&&f.controller&&(y=y||Dt(),At("'"+h+"' controller",y[h],f,O),y[h]=f),v=f.transclude)if(E=!0,f.$$tlb||(At("transclusion",x,f,O),x=f),"element"===v)A=!0,m=f.priority,p=O,O=r.$$element=s(at.$$createComment(h,r[h])),n=O[0],It(o,ht(p),n),V=mt(j,p,i,m,T&&T.name,{nonTlbTranscludeDirective:x});else{var F=Dt();if(L(v)){p=t.document.createDocumentFragment();var H=Dt(),B=Dt();for(var W in C(v,(function(t,e){var n="?"===t.charAt(0);t=n?t.substring(1):t,H[t]=e,F[e]=null,B[e]=n})),C(O.contents(),(function(e){var n=H[bn(rt(e))];n?(B[n]=!0,F[n]=F[n]||t.document.createDocumentFragment(),F[n].appendChild(e)):p.appendChild(e)})),C(B,(function(t,e){if(!t)throw dn("reqslot","Required transclusion slot `{0}` was not filled.",e)})),F)if(F[W]){var J=s(F[W].childNodes);F[W]=mt(j,J,i)}p=s(p.childNodes)}else p=s(pe(n)).contents();O.empty(),(V=mt(j,p,i,void 0,void 0,{needsNewScope:f.$$isolateScope||f.$$newScope})).$$slots=F}if(f.template)if(S=!0,At("template",w,f,O),w=f,v=G(f.template)?f.template(O,r):f.template,v=et(v),f.replace){if(T=f,p=ue(v)?[]:xn(Ot(f.templateNamespace,tt(v))),n=p[0],1!==p.length||1!==n.nodeType)throw dn("tplrt","Template for directive '{0}' must have exactly one root element. {1}",h,"");It(o,O,n);var Y={$attr:{}},X=dt(n,[],Y),Q=e.splice(I+1,e.length-(I+1));(b||g)&&bt(X,b,g),e=e.concat(X).concat(Q),Et(r,Y),R=e.length}else O.html(v);if(f.templateUrl)S=!0,At("template",w,f,O),w=f,f.replace&&(T=f),ot=St(e.splice(I,e.length-I),O,r,o,E&&V,u,c,{controllerDirectives:y,newScopeDirective:g!==f&&g,newIsolateScopeDirective:b,templateDirective:w,nonTlbTranscludeDirective:x}),R=e.length;else if(f.compile)try{$=f.compile(O,r,V);var nt=f.$$originalDirective||f;G($)?it(null,pt(nt,$),P,U):$&&it(pt(nt,$.pre),pt(nt,$.post),P,U)}catch(t){d(t,wt(O))}f.terminal&&(ot.terminal=!0,m=Math.max(m,f.priority))}return ot.scope=g&&!0===g.scope,ot.transcludeOnThisElement=E,ot.templateOnThisElement=S,ot.transclude=V,l.hasElementTranscludeDirective=A,ot;function it(t,e,n,r){t&&(n&&(t=vt(t,n,r)),t.require=f.require,t.directiveName=h,(b===f||f.$$isolateScope)&&(t=Pt(t,{isolateScope:!0})),u.push(t)),e&&(n&&(e=vt(e,n,r)),e.require=f.require,e.directiveName=h,(b===f||f.$$isolateScope)&&(e=Pt(e,{isolateScope:!0})),c.push(e))}function ot(t,e,i,o,a){var l,f,h,p,$,v,m,x,E,S;for(var O in n===i?(E=r,x=r.$$element):E=new K(x=s(i),r),$=e,b?p=e.$new(!0):g&&($=e.$parent),a&&((m=function(t,e,n,r){var i;if(Z(t)||(r=n,n=e,e=t,t=void 0),A&&(i=v),n||(n=A?x.parent():x),!r)return a(t,e,i,n,j);var o=a.$$slots[r];if(o)return o(t,e,i,n,j);if(_(o))throw dn("noslot",'No parent directive that requires a transclusion with slot name "{0}". Element: {1}',r,wt(x))}).$$boundTransclude=a,m.isSlotFilled=function(t){return!!a.$$slots[t]}),y&&(v=function(t,e,n,r,i,o,a){var s=Dt();for(var u in r){var c=r[u],l={$scope:c===a||c.$$isolateScope?i:o,$element:t,$attrs:e,$transclude:n},f=c.controller;"@"===f&&(f=e[c.name]);var h=k(f,l,!0,c.controllerAs);s[c.name]=h,t.data("$"+c.name+"Controller",h.instance)}return s}(x,E,m,y,p,e,b)),b&&(at.$$addScopeInfo(x,p,!0,!(w&&(w===b||w===b.$$originalDirective))),at.$$addScopeClass(x,!0),p.$$isolateBindings=b.$$isolateBindings,(S=Lt(e,E,p,p.$$isolateBindings,b)).removeWatches&&p.$on("$destroy",S.removeWatches)),v){var T=y[O],V=v[O],N=T.$$bindings.bindToController;V.instance=V(),x.data("$"+T.name+"Controller",V.instance),V.bindingInfo=Lt($,E,V.instance,N,T)}for(C(y,(function(t,e){var n=t.require;t.bindToController&&!z(n)&&L(n)&&M(v[e].instance,yt(e,n,x,v))})),C(v,(function(t){var e=t.instance;if(G(e.$onChanges))try{e.$onChanges(t.bindingInfo.initialChanges)}catch(t){d(t)}if(G(e.$onInit))try{e.$onInit()}catch(t){d(t)}G(e.$doCheck)&&($.$watch((function(){e.$doCheck()})),e.$doCheck()),G(e.$onDestroy)&&$.$on("$destroy",(function(){e.$onDestroy()}))})),l=0,f=u.length;l=0;l--)Ut(h=c[l],h.isolateScope?p:e,x,E,h.require&&yt(h.directiveName,h.require,x,v),m);C(v,(function(t){var e=t.instance;G(e.$postLink)&&e.$postLink()}))}}function yt(t,e,n,r){var i;if(F(e)){var o=e.match(l),a=e.substring(o[0].length),s=o[1]||o[3],u="?"===o[2];if("^^"===s?n=n.parent():i=(i=r&&r[a])&&i.instance,!i){var c="$"+a+"Controller";i="^^"===s&&n[0]&&9===n[0].nodeType?null:s?n.inheritedData(c):n.data(c)}if(!i&&!u)throw dn("ctreq","Controller '{0}', required by directive '{1}', can't be found!",a,t)}else if(z(e)){i=[];for(var f=0,h=e.length;ff.priority)&&-1!==f.restrict.indexOf(o)){if(u&&(f=j(f,{$$start:u,$$end:c})),!f.$$bindings){var $=f.$$bindings=v(f,f.name);L($.isolateScope)&&(f.$$isolateBindings=$.isolateScope)}t.push(f),l=f}return l}function Ct(t){if(r.hasOwnProperty(t))for(var n=e.get(t+i),o=0,a=n.length;o"+n+"",r.childNodes[0].childNodes;default:return n}}function Mt(t){return B(O.valueOf(t),"ng-prop-srcset")}function Tt(t,e,n,r){if(p.test(r))throw dn("nodomevents","Property bindings for HTML DOM event properties are disallowed");var i=rt(t),o=function(t,e){var n=e.toLowerCase();return E[t+"|"+n]||E["*|"+n]}(i,r),a=R;"srcset"!==r||"img"!==i&&"source"!==i?o&&(a=O.getTrusted.bind(O,o)):a=Mt,e.push({priority:100,compile:function(t,e){var i=S(e[n]),o=S(e[n],(function(t){return O.valueOf(t)}));return{pre:function(t,e){function n(){var n=i(t);e[0][r]=a(n)}n(),t.$watch(o,n)}}}})}function Vt(t,e,n){t.push(Io(S,A,d,e,n,!1))}function jt(t,e,r,i,o){var a=rt(t),s=function(t,e){return"srcdoc"===e?O.HTML:"src"===e||"ngSrc"===e?-1===["img","video","audio","source","track"].indexOf(t)?O.RESOURCE_URL:O.MEDIA_URL:"xlinkHref"===e?"image"===t?O.MEDIA_URL:"a"===t?O.URL:O.RESOURCE_URL:"form"===t&&"action"===e||"base"===t&&"href"===e||"link"===t&&"href"===e?O.RESOURCE_URL:"a"!==t||"href"!==e&&"ngHref"!==e?void 0:O.URL}(a,i),u=!o,l=c[i]||o,f=n(r,u,s,l);if(f){if("multiple"===i&&"select"===a)throw dn("selmulti","Binding to the 'multiple' attribute is not supported. Element: {0}",wt(t));if(p.test(i))throw dn("nodomevents","Interpolations for HTML DOM event attributes are disallowed");e.push({priority:100,compile:function(){return{pre:function(t,e,o){var a=o.$$observers||(o.$$observers=Dt()),u=o[i];u!==r&&(f=u&&n(u,!0,s,l),r=u),f&&(o[i]=f(t),(a[i]||(a[i]=[])).$$inter=!0,(o.$$observers&&o.$$observers[i].$$scope||t).$watch(f,(function(t,e){"class"===i&&t!==e?o.$updateClass(t,e):o.$set(i,t)})))}}}})}}function It(e,n,r){var i,o,a=n[0],u=n.length,c=a.parentNode;if(e)for(i=0,o=e.length;i0?" ":"")+a}return n}function xn(t){var e=(t=s(t)).length;if(e<=1)return t;for(;e--;){var n=t[e];(8===n.nodeType||n.nodeType===qt&&""===n.nodeValue.trim())&&$.call(t,e,1)}return t}var Cn=o("$controller"),En=/^(\S+)(\s+as\s+([\w$]+))?$/;function Sn(t,e){if(e&&F(e))return e;if(F(t)){var n=En.exec(t);if(n)return n[3]}}function kn(){var t={};this.has=function(e){return t.hasOwnProperty(e)},this.register=function(e,n){Ut(e,"controller"),L(e)?M(t,e):t[e]=n},this.$get=["$injector",function(e){return function(r,i,o,a){var s,u,c,l;if(o=!0===o,a&&F(a)&&(l=a),F(r)){if(!(u=r.match(En)))throw Cn("ctrlfmt","Badly formed controller string '{0}'. Must match `__name__ as __id__` or `__name__`.",r);if(c=u[1],l=l||u[3],!(r=t.hasOwnProperty(c)?t[c]:function(t,e,n){if(!e)return t;for(var r,i=e.split("."),o=i.length,a=0;a0&&(t+=(-1===t.indexOf("?")?"?":"&")+e),t}(m,n.paramSerializer(n.params)),v&&(m=function(t,e){var n=t.split("?");if(n.length>2)throw Rn("badjsonp",'Illegal use more than one "?", in url, "{1}"',t);return C(Ct(n[1]),(function(n,r){if("JSON_CALLBACK"===n)throw Rn("badjsonp",'Illegal use of JSON_CALLBACK in url, "{0}"',t);if(r===e)throw Rn("badjsonp",'Illegal use of callback param, "{0}", in url, "{1}"',e,t)})),t+=(-1===t.indexOf("?")?"?":"&")+e+"=JSON_CALLBACK"}(m,n.jsonpCallbackParam)),y.pendingRequests.push(n),f.then(S,S),!n.cache&&!t.cache||!1===n.cache||"GET"!==n.method&&"JSONP"!==n.method||(i=L(n.cache)?n.cache:L(t.cache)?t.cache:$),i&&(D(o=i.get(m))?X(o)?o.then(E,E):z(o)?x(o[1],o[0],Ft(o[2]),o[3],o[4]):x(o,200,{},"OK","complete"):i.put(m,f)),_(o)){var b=g(n.url)?s()[n.xsrfCookieName||t.xsrfCookieName]:void 0;b&&(p[n.xsrfHeaderName||t.xsrfHeaderName]=b),a(n.method,m,r,(function(t,n,r,o,a){function s(){x(n,t,r,o,a)}i&&(Hn(t)?i.put(m,[t,n,Ln(r),o,a]):i.remove(m)),e?c.$applyAsync(s):(s(),c.$$phase||c.$apply())}),p,n.timeout,n.withCredentials,n.responseType,w(n.eventHandlers),w(n.uploadEventHandlers))}return f;function w(t){if(t){var n={};return C(t,(function(t,r){n[r]=function(n){function r(){t(n)}e?c.$applyAsync(r):c.$$phase?r():c.$apply(r)}})),n}}function x(t,e,r,i,o){(Hn(e=e>=-1?e:0)?u.resolve:u.reject)({data:t,status:e,headers:qn(r),config:n,statusText:i,xhrStatus:o})}function E(t){x(t.data,t.status,Ft(t.headers()),t.statusText,t.xhrStatus)}function S(){var t=y.pendingRequests.indexOf(n);-1!==t&&y.pendingRequests.splice(t,1)}}(n,i).then(x,x)})),m)).finally((function(){i.$$completeOutstandingRequest(I,"$http")}));function w(t,e){for(var n=0,r=e.length;n0)var b=n((function(){w("timeout")}),l);else X(l)&&l.then((function(){w(D(l.$$timeoutId)?"timeout":"abort")}));function w(t){y="timeout"===t,m&&m(),g&&g.abort()}function x(t,e,r,i,o,a){D(b)&&n.cancel(b),m=g=null,t(e,r,i,o,a)}}}(t,r,t.defer,e,n[0])}]}var Gn=b.$interpolateMinErr=o("$interpolate");function Kn(){var t="{{",e="}}";this.startSymbol=function(e){return e?(t=e,this):t},this.endSymbol=function(t){return t?(e=t,this):e},this.$get=["$parse","$exceptionHandler","$sce",function(n,r,i){var o=t.length,a=e.length,s=new RegExp(t.replace(/./g,c),"g"),u=new RegExp(e.replace(/./g,c),"g");function c(t){return"\\\\\\"+t}function l(n){return n.replace(s,t).replace(u,e)}function f(t,e,n,r){var i=t.$watch((function(t){return i(),r(t)}),e,n);return i}function h(s,u,c,h){var p=c===i.URL||c===i.MEDIA_URL;if(!s.length||-1===s.indexOf(t)){if(u)return;var d=l(s);p&&(d=i.getTrusted(c,d));var $=P(d);return $.exp=s,$.expressions=[],$.$$watchDelegate=f,$}h=!!h;for(var v,m,g,y,b,w=0,x=[],C=s.length,E=[],S=[];w1&&Gn.throwNoconcat(s),E.join(""))};return M((function(t){var e=0,n=x.length,i=new Array(n);try{for(;e4,f=l?ht(arguments,4):[],h=0,p=D(c)&&!c,d=(p?n:e).defer(),$=d.promise;function v(){l?a.apply(null,f):a(h)}function m(){p?t.defer(v):r.$evalAsync(v),d.notify(h++),u>0&&h>=u&&(d.resolve(h),o($.$$intervalId)),p||r.$apply()}return u=D(u)?u:0,$.$$intervalId=i(m,s,d,p),$}}}]}var Xn=function(){this.$get=function(){var t=b.callbacks,e={};return{createCallback:function(n){var r="_"+(t.$$counter++).toString(36),i="angular.callbacks."+r,o=function(t){var e=function(t){e.data=t,e.called=!0};return e.id=t,e}(r);return e[i]=t[r]=o,i},wasCalled:function(t){return e[t].called},getResponse:function(t){return e[t].data},removeCallback:function(n){var r=e[n];delete t[r.id],delete e[n]}}}},Qn=/^([^?#]*)(\?([^#]*))?(#(.*))?$/,tr={http:80,https:443,ftp:21},er=o("$location");function nr(t,e){var n=ui(t);e.$$protocol=n.protocol,e.$$host=n.hostname,e.$$port=V(n.port)||tr[n.protocol]||null}var rr=/^\s*[\\/]{2,}/;function ir(t,e,n){if(rr.test(t))throw er("badpath",'Invalid url "{0}".',t);var r="/"!==t.charAt(0);r&&(t="/"+t);var i=ui(t),o=r&&"/"===i.pathname.charAt(0)?i.pathname.substring(1):i.pathname;e.$$path=function(t,e){for(var n=t.split("/"),r=n.length;r--;)n[r]=decodeURIComponent(n[r]),e&&(n[r]=n[r].replace(/\//g,"%2F"));return n.join("/")}(o,n),e.$$search=Ct(i.search),e.$$hash=decodeURIComponent(i.hash),e.$$path&&"/"!==e.$$path.charAt(0)&&(e.$$path="/"+e.$$path)}function or(t,e){return t.slice(0,e.length)===e}function ar(t,e){if(or(e,t))return e.substr(t.length)}function sr(t){var e=t.indexOf("#");return-1===e?t:t.substr(0,e)}function ur(t,e,n){this.$$html5=!0,n=n||"",nr(t,this),this.$$parse=function(t){var n=ar(e,t);if(!F(n))throw er("ipthprfx",'Invalid url "{0}", missing path prefix "{1}".',t,e);ir(n,this,!0),this.$$path||(this.$$path="/"),this.$$compose()},this.$$normalizeUrl=function(t){return e+t.substr(1)},this.$$parseLinkUrl=function(r,i){return i&&"#"===i[0]?(this.hash(i.slice(1)),!0):(D(o=ar(t,r))?(a=o,s=n&&D(o=ar(n,o))?e+(ar("/",o)||o):t+a):D(o=ar(e,r))?s=e+o:e===r+"/"&&(s=e),s&&this.$$parse(s),!!s);var o,a,s}}function cr(t,e,n){nr(t,this),this.$$parse=function(r){var i,o=ar(t,r)||ar(e,r);_(o)||"#"!==o.charAt(0)?this.$$html5?i=o:(i="",_(o)&&(t=r,this.replace())):_(i=ar(n,o))&&(i=o),ir(i,this,!1),this.$$path=function(t,e,n){var r,i=/^\/[A-Z]:(\/.*)/;return or(e,n)&&(e=e.replace(n,"")),i.exec(e)?t:(r=i.exec(t))?r[1]:t}(this.$$path,i,t),this.$$compose()},this.$$normalizeUrl=function(e){return t+(e?n+e:"")},this.$$parseLinkUrl=function(e,n){return sr(t)===sr(e)&&(this.$$parse(e),!0)}}function lr(t,e,n){this.$$html5=!0,cr.apply(this,arguments),this.$$parseLinkUrl=function(r,i){return i&&"#"===i[0]?(this.hash(i.slice(1)),!0):(t===sr(r)?o=r:(a=ar(e,r))?o=t+n+a:e===r+"/"&&(o=e),o&&this.$$parse(o),!!o);var o,a},this.$$normalizeUrl=function(e){return t+n+e}}var fr={$$absUrl:"",$$html5:!1,$$replace:!1,$$compose:function(){var t,e,n,r,i,o;this.$$url=(t=this.$$path,e=this.$$search,n=this.$$hash,r=[],C(e,(function(t,e){z(t)?C(t,(function(t){r.push(St(e,!0)+(!0===t?"":"="+St(t,!0)))})):r.push(St(e,!0)+(!0===t?"":"="+St(t,!0)))})),i=r.length?r.join("&"):"",o=n?"#"+Et(n):"",function(t){for(var e=t.split("/"),n=e.length;n--;)e[n]=Et(e[n].replace(/%2F/g,"/"));return e.join("/")}(t)+(i?"?"+i:"")+o),this.$$absUrl=this.$$normalizeUrl(this.$$url),this.$$urlUpdatedByLocation=!0},absUrl:hr("$$absUrl"),url:function(t){if(_(t))return this.$$url;var e=Qn.exec(t);return(e[1]||""===t)&&this.path(decodeURIComponent(e[1])),(e[2]||e[1]||""===t)&&this.search(e[3]||""),this.hash(e[5]||""),this},protocol:hr("$$protocol"),host:hr("$$host"),port:hr("$$port"),path:pr("$$path",(function(t){return"/"===(t=null!==t?t.toString():"").charAt(0)?t:"/"+t})),search:function(t,e){switch(arguments.length){case 0:return this.$$search;case 1:if(F(t)||H(t))t=t.toString(),this.$$search=Ct(t);else{if(!L(t))throw er("isrcharg","The first argument of the `$location#search()` call must be a string or an object.");C(t=at(t,{}),(function(e,n){null==e&&delete t[n]})),this.$$search=t}break;default:_(e)||null===e?delete this.$$search[t]:this.$$search[t]=e}return this.$$compose(),this},hash:pr("$$hash",(function(t){return null!==t?t.toString():""})),replace:function(){return this.$$replace=!0,this}};function hr(t){return function(){return this[t]}}function pr(t,e){return function(n){return _(n)?this[t]:(this[t]=e(n),this.$$compose(),this)}}function dr(){var t="!",e={enabled:!1,requireBase:!0,rewriteLinks:!0};this.hashPrefix=function(e){return D(e)?(t=e,this):t},this.html5Mode=function(t){return Y(t)?(e.enabled=t,this):L(t)?(Y(t.enabled)&&(e.enabled=t.enabled),Y(t.requireBase)&&(e.requireBase=t.requireBase),(Y(t.rewriteLinks)||F(t.rewriteLinks))&&(e.rewriteLinks=t.rewriteLinks),this):e},this.$get=["$rootScope","$browser","$sniffer","$rootElement","$window",function(n,r,i,o,a){var u,c,l,f,h=r.baseHref(),p=r.url();if(e.enabled){if(!h&&e.requireBase)throw er("nobase","$location in HTML5 mode requires a tag to be present!");l=(f=p).substring(0,f.indexOf("/",f.indexOf("//")+2))+(h||"/"),c=i.history?ur:lr}else l=sr(p),c=cr;var d=function(t){return t.substr(0,sr(t).lastIndexOf("/")+1)}(l);(u=new c(l,d,"#"+t)).$$parseLinkUrl(p,p),u.$$state=r.state();var $=/^\s*(javascript|mailto):/i;function v(t,e,n){var i=u.url(),o=u.$$state;try{r.url(t,e,n),u.$$state=r.state()}catch(t){throw u.url(i),u.$$state=o,t}}o.on("click",(function(t){var i=e.rewriteLinks;if(i&&!t.ctrlKey&&!t.metaKey&&!t.shiftKey&&2!==t.which&&2!==t.button){for(var a=s(t.target);"a"!==rt(a[0]);)if(a[0]===o[0]||!(a=a.parent())[0])return;if(!F(i)||!_(a.attr(i))){var c=a.prop("href"),l=a.attr("href")||a.attr("xlink:href");L(c)&&"[object SVGAnimatedString]"===c.toString()&&(c=ui(c.animVal).href),$.test(c)||!c||a.attr("target")||t.isDefaultPrevented()||u.$$parseLinkUrl(c,l)&&(t.preventDefault(),u.absUrl()!==r.url()&&n.$apply())}}})),u.absUrl()!==p&&r.url(u.absUrl(),!0);var m=!0;return r.onUrlChange((function(t,e){or(t,d)?(n.$evalAsync((function(){var r,i=u.absUrl(),o=u.$$state;u.$$parse(t),u.$$state=e,r=n.$broadcast("$locationChangeStart",t,i,e,o).defaultPrevented,u.absUrl()===t&&(r?(u.$$parse(i),u.$$state=o,v(i,!1,o)):(m=!1,g(i,o)))})),n.$$phase||n.$digest()):a.location.href=t})),n.$watch((function(){if(m||u.$$urlUpdatedByLocation){u.$$urlUpdatedByLocation=!1;var t=r.url(),e=u.absUrl(),o=r.state(),a=u.$$replace,s=!((c=t)===(l=e)||ui(c).href===ui(l).href)||u.$$html5&&i.history&&o!==u.$$state;(m||s)&&(m=!1,n.$evalAsync((function(){var e=u.absUrl(),r=n.$broadcast("$locationChangeStart",e,t,u.$$state,o).defaultPrevented;u.absUrl()===e&&(r?(u.$$parse(t),u.$$state=o):(s&&v(e,a,o===u.$$state?null:u.$$state),g(t,o)))})))}var c,l;u.$$replace=!1})),u;function g(t,e){n.$broadcast("$locationChangeSuccess",u.absUrl(),t,u.$$state,e)}}]}function $r(){var t=!0,e=this;this.debugEnabled=function(e){return D(e)?(t=e,this):t},this.$get=["$window",function(n){var r,i=a||/\bEdge\//.test(n.navigator&&n.navigator.userAgent);return{log:s("log"),info:s("info"),warn:s("warn"),error:s("error"),debug:(r=s("debug"),function(){t&&r.apply(e,arguments)})};function o(t){return W(t)&&(t.stack&&i?t=t.message&&-1===t.stack.indexOf(t.message)?"Error: "+t.message+"\n"+t.stack:t.stack:t.sourceURL&&(t=t.message+"\n"+t.sourceURL+":"+t.line)),t}function s(t){var e=n.console||{},r=e[t]||e.log||I;return function(){var t=[];return C(arguments,(function(e){t.push(o(e))})),Function.prototype.apply.call(r,e,t)}}}]}C([lr,cr,ur],(function(t){t.prototype=Object.create(fr),t.prototype.state=function(e){if(!arguments.length)return this.$$state;if(t!==ur||!this.$$html5)throw er("nostate","History API state support is available only in HTML5 mode and only in browsers supporting HTML5 History API");return this.$$state=_(e)?null:e,this.$$urlUpdatedByLocation=!0,this}}));var vr=o("$parse"),mr={}.constructor.prototype.valueOf;function gr(t){return t+""}var yr=Dt();C("+ - * / % === !== == != < > <= >= && || ! = |".split(" "),(function(t){yr[t]=!0}));var br={n:"\n",f:"\f",r:"\r",t:"\t",v:"\v","'":"'",'"':'"'},wr=function(t){this.options=t};wr.prototype={constructor:wr,lex:function(t){for(this.text=t,this.index=0,this.tokens=[];this.index=55296&&n<=56319&&r>=56320&&r<=57343?t+e:t},isExpOperator:function(t){return"-"===t||"+"===t||this.isNumber(t)},throwError:function(t,e,n){n=n||this.index;var r=D(e)?"s "+e+"-"+this.index+" ["+this.text.substring(e,n)+"]":" "+n;throw vr("lexerr","Lexer Error: {0} at column{1} in expression [{2}].",t,r,this.text)},readNumber:function(){for(var t="",e=this.index;this.index0&&f(this.$$state),r},catch:function(t){return this.then(null,t)},finally:function(t,e){return this.then((function(e){return g(e,b,t)}),(function(e){return g(e,m,t)}),e)}});var b=y;function w(t){if(!G(t))throw r("norslvr","Expected resolverFn, got '{0}'",t);var e=new c;return t((function(t){h(e,t)}),(function(t){d(e,t)})),e}return w.prototype=c.prototype,w.defer=s,w.reject=m,w.when=y,w.resolve=b,w.all=function(t){var e=new c,n=0,r=z(t)?[]:{};return C(t,(function(t,i){n++,y(t).then((function(t){r[i]=t,--n||h(e,r)}),(function(t){d(e,t)}))})),0===n&&h(e,r),e},w.race=function(t){var e=s();return C(t,(function(t){y(t).then(e.resolve,e.reject)})),e.promise},w}function Ur(t){return!!t.pur}function _r(t){t.pur=!0}function Dr(t){t.$$state&&_r(t.$$state)}function Lr(){this.$get=["$window","$timeout",function(t,e){var n=t.requestAnimationFrame||t.webkitRequestAnimationFrame,r=t.cancelAnimationFrame||t.webkitCancelAnimationFrame||t.webkitCancelRequestAnimationFrame,i=!!n,o=i?function(t){var e=n(t);return function(){r(e)}}:function(t){var n=e(t,16.66,!1);return function(){e.cancel(n)}};return o.supported=i,o}]}function qr(){var t=10,e=o("$rootScope"),n=null,r=null;this.digestTtl=function(e){return arguments.length&&(t=e),t},this.$get=["$exceptionHandler","$parse","$browser",function(i,o,s){function u(t){t.currentScope.$$destroyed=!0}function c(t){9===a&&(t.$$childHead&&c(t.$$childHead),t.$$nextSibling&&c(t.$$nextSibling)),t.$parent=t.$$nextSibling=t.$$prevSibling=t.$$childHead=t.$$childTail=t.$root=t.$$watchers=null}function l(){this.$id=k(),this.$$phase=this.$parent=this.$$watchers=this.$$nextSibling=this.$$prevSibling=this.$$childHead=this.$$childTail=null,this.$root=this,this.$$destroyed=!1,this.$$suspended=!1,this.$$listeners={},this.$$listenerCount={},this.$$watchersCount=0,this.$$isolateBindings=null}l.prototype={constructor:l,$new:function(t,e){var n;return e=e||this,t?(n=new l).$root=this.$root:(this.$$ChildScope||(this.$$ChildScope=function(t){function e(){this.$$watchers=this.$$nextSibling=this.$$childHead=this.$$childTail=null,this.$$listeners={},this.$$listenerCount={},this.$$watchersCount=0,this.$id=k(),this.$$ChildScope=null,this.$$suspended=!1}return e.prototype=t,e}(this)),n=new this.$$ChildScope),n.$parent=e,n.$$prevSibling=e.$$childTail,e.$$childHead?(e.$$childTail.$$nextSibling=n,e.$$childTail=n):e.$$childHead=e.$$childTail=n,(t||e!==this)&&n.$on("$destroy",u),n},$watch:function(t,e,r,i){var a=o(t),s=G(e)?e:I;if(a.$$watchDelegate)return a.$$watchDelegate(this,s,r,a,t);var u=this,c=u.$$watchers,l={fn:s,last:w,get:a,exp:i||t,eq:!!r};return n=null,c||((c=u.$$watchers=[]).$$digestWatchIndex=-1),c.unshift(l),c.$$digestWatchIndex++,y(this,1),function(){var t=ot(c,l);t>=0&&(y(u,-1),t1,u=0,c=o(t,$),l=[],h={},p=!0,d=0;function $(t){var e,i,o,a;if(!_(n=t)){if(L(n))if(x(n)){r!==l&&(d=(r=l).length=0,u++),e=n.length,d!==e&&(u++,r.length=d=e);for(var s=0;se)for(i in u++,r)f.call(n,i)||(d--,delete r[i])}else r!==n&&(r=n,u++);return u}}return this.$watch(c,(function(){if(p?(p=!1,e(n,n,a)):e(n,i,a),s)if(L(n))if(x(n)){i=new Array(n.length);for(var t=0;t0&&!this.peek("}",")",";","]")&&t.push(this.expressionStatement()),!this.expect(";"))return{type:xr.Program,body:t}},expressionStatement:function(){return{type:xr.ExpressionStatement,expression:this.filterChain()}},filterChain:function(){for(var t=this.expression();this.expect("|");)t=this.filter(t);return t},expression:function(){return this.assignment()},assignment:function(){var t=this.ternary();if(this.expect("=")){if(!Ar(t))throw vr("lval","Trying to assign a value to a non l-value");t={type:xr.AssignmentExpression,left:t,right:this.assignment(),operator:"="}}return t},ternary:function(){var t,e,n=this.logicalOR();return this.expect("?")&&(t=this.expression(),this.consume(":"))?(e=this.expression(),{type:xr.ConditionalExpression,test:n,alternate:t,consequent:e}):n},logicalOR:function(){for(var t=this.logicalAND();this.expect("||");)t={type:xr.LogicalExpression,operator:"||",left:t,right:this.logicalAND()};return t},logicalAND:function(){for(var t=this.equality();this.expect("&&");)t={type:xr.LogicalExpression,operator:"&&",left:t,right:this.equality()};return t},equality:function(){for(var t,e=this.relational();t=this.expect("==","!=","===","!==");)e={type:xr.BinaryExpression,operator:t.text,left:e,right:this.relational()};return e},relational:function(){for(var t,e=this.additive();t=this.expect("<",">","<=",">=");)e={type:xr.BinaryExpression,operator:t.text,left:e,right:this.additive()};return e},additive:function(){for(var t,e=this.multiplicative();t=this.expect("+","-");)e={type:xr.BinaryExpression,operator:t.text,left:e,right:this.multiplicative()};return e},multiplicative:function(){for(var t,e=this.unary();t=this.expect("*","/","%");)e={type:xr.BinaryExpression,operator:t.text,left:e,right:this.unary()};return e},unary:function(){var t;return(t=this.expect("+","-","!"))?{type:xr.UnaryExpression,operator:t.text,prefix:!0,argument:this.unary()}:this.primary()},primary:function(){var t,e;for(this.expect("(")?(t=this.filterChain(),this.consume(")")):this.expect("[")?t=this.arrayDeclaration():this.expect("{")?t=this.object():this.selfReferential.hasOwnProperty(this.peek().text)?t=at(this.selfReferential[this.consume().text]):this.options.literals.hasOwnProperty(this.peek().text)?t={type:xr.Literal,value:this.options.literals[this.consume().text]}:this.peek().identifier?t=this.identifier():this.peek().constant?t=this.constant():this.throwError("not a primary expression",this.peek());e=this.expect("(","[",".");)"("===e.text?(t={type:xr.CallExpression,callee:t,arguments:this.parseArguments()},this.consume(")")):"["===e.text?(t={type:xr.MemberExpression,object:t,property:this.expression(),computed:!0},this.consume("]")):"."===e.text?t={type:xr.MemberExpression,object:t,property:this.identifier(),computed:!1}:this.throwError("IMPOSSIBLE");return t},filter:function(t){for(var e=[t],n={type:xr.CallExpression,callee:this.identifier(),arguments:e,filter:!0};this.expect(":");)e.push(this.expression());return n},parseArguments:function(){var t=[];if(")"!==this.peekToken().text)do{t.push(this.filterChain())}while(this.expect(","));return t},identifier:function(){var t=this.consume();return t.identifier||this.throwError("is not a valid identifier",t),{type:xr.Identifier,name:t.text}},constant:function(){return{type:xr.Literal,value:this.consume().value}},arrayDeclaration:function(){var t=[];if("]"!==this.peekToken().text)do{if(this.peek("]"))break;t.push(this.expression())}while(this.expect(","));return this.consume("]"),{type:xr.ArrayExpression,elements:t}},object:function(){var t,e=[];if("}"!==this.peekToken().text)do{if(this.peek("}"))break;t={type:xr.Property,kind:"init"},this.peek().constant?(t.key=this.constant(),t.computed=!1,this.consume(":"),t.value=this.expression()):this.peek().identifier?(t.key=this.identifier(),t.computed=!1,this.peek(":")?(this.consume(":"),t.value=this.expression()):t.value=t.key):this.peek("[")?(this.consume("["),t.key=this.expression(),this.consume("]"),t.computed=!0,this.consume(":"),t.value=this.expression()):this.throwError("invalid key",this.peek()),e.push(t)}while(this.expect(","));return this.consume("}"),{type:xr.ObjectExpression,properties:e}},throwError:function(t,e){throw vr("syntax","Syntax Error: Token '{0}' {1} at column {2} of the expression [{3}] starting at [{4}].",e.text,t,e.index+1,this.text,this.text.substring(e.index))},consume:function(t){if(0===this.tokens.length)throw vr("ueoe","Unexpected end of expression: {0}",this.text);var e=this.expect(t);return e||this.throwError("is unexpected, expecting ["+t+"]",this.peek()),e},peekToken:function(){if(0===this.tokens.length)throw vr("ueoe","Unexpected end of expression: {0}",this.text);return this.tokens[0]},peek:function(t,e,n,r){return this.peekAhead(0,t,e,n,r)},peekAhead:function(t,e,n,r,i){if(this.tokens.length>t){var o=this.tokens[t],a=o.text;if(a===e||a===n||a===r||a===i||!e&&!n&&!r&&!i)return o}return!1},expect:function(t,e,n,r){var i=this.peek(t,e,n,r);return!!i&&(this.tokens.shift(),i)},selfReferential:{this:{type:xr.ThisExpression},$locals:{type:xr.LocalsExpression}}},Mr.prototype={compile:function(t){var e=this;this.state={nextId:0,filters:{},fn:{vars:[],body:[],own:{}},assign:{vars:[],body:[],own:{}},inputs:[]},Sr(t,e.$filter);var n,r="";if(this.stage="assign",n=Or(t)){this.state.computing="assign";var i=this.nextId();this.recurse(n,i),this.return_(i),r="fn.assign="+this.generateFunction("assign","s,v,l")}var o=kr(t.body);e.stage="inputs",C(o,(function(t,n){var r="fn"+n;e.state[r]={vars:[],body:[],own:{}},e.state.computing=r;var i=e.nextId();e.recurse(t,i),e.return_(i),e.state.inputs.push({name:r,isPure:t.isPure}),t.watchId=n})),this.state.computing="fn",this.stage="main",this.recurse(t);var a='"'+this.USE+" "+this.STRICT+'";\n'+this.filterPrefix()+"var fn="+this.generateFunction("fn","s,l,a,i")+r+this.watchFns()+"return fn;",s=new Function("$filter","getStringValue","ifDefined","plus",a)(this.$filter,gr,Cr,Er);return this.state=this.stage=void 0,s},USE:"use",STRICT:"strict",watchFns:function(){var t=[],e=this.state.inputs,n=this;return C(e,(function(e){t.push("var "+e.name+"="+n.generateFunction(e.name,"s")),e.isPure&&t.push(e.name,".isPure="+JSON.stringify(e.isPure)+";")})),e.length&&t.push("fn.inputs=["+e.map((function(t){return t.name})).join(",")+"];"),t.join("")},generateFunction:function(t,e){return"function("+e+"){"+this.varsPrefix(t)+this.body(t)+"};"},filterPrefix:function(){var t=[],e=this;return C(this.state.filters,(function(n,r){t.push(n+"=$filter("+e.escape(r)+")")})),t.length?"var "+t.join(",")+";":""},varsPrefix:function(t){return this.state[t].vars.length?"var "+this.state[t].vars.join(",")+";":""},body:function(t){return this.state[t].body.join("")},recurse:function(t,e,n,r,i,o){var a,s,u,c,l,f=this;if(r=r||I,!o&&D(t.watchId))return e=e||this.nextId(),void this.if_("i",this.lazyAssign(e,this.computedMember("i",t.watchId)),this.lazyRecurse(t,e,n,r,i,!0));switch(t.type){case xr.Program:C(t.body,(function(e,n){f.recurse(e.expression,void 0,void 0,(function(t){s=t})),n!==t.body.length-1?f.current().body.push(s,";"):f.return_(s)}));break;case xr.Literal:c=this.escape(t.value),this.assign(e,c),r(e||c);break;case xr.UnaryExpression:this.recurse(t.argument,void 0,void 0,(function(t){s=t})),c=t.operator+"("+this.ifDefined(s,0)+")",this.assign(e,c),r(c);break;case xr.BinaryExpression:this.recurse(t.left,void 0,void 0,(function(t){a=t})),this.recurse(t.right,void 0,void 0,(function(t){s=t})),c="+"===t.operator?this.plus(a,s):"-"===t.operator?this.ifDefined(a,0)+t.operator+this.ifDefined(s,0):"("+a+")"+t.operator+"("+s+")",this.assign(e,c),r(c);break;case xr.LogicalExpression:e=e||this.nextId(),f.recurse(t.left,e),f.if_("&&"===t.operator?e:f.not(e),f.lazyRecurse(t.right,e)),r(e);break;case xr.ConditionalExpression:e=e||this.nextId(),f.recurse(t.test,e),f.if_(e,f.lazyRecurse(t.alternate,e),f.lazyRecurse(t.consequent,e)),r(e);break;case xr.Identifier:e=e||this.nextId(),n&&(n.context="inputs"===f.stage?"s":this.assign(this.nextId(),this.getHasOwnProperty("l",t.name)+"?l:s"),n.computed=!1,n.name=t.name),f.if_("inputs"===f.stage||f.not(f.getHasOwnProperty("l",t.name)),(function(){f.if_("inputs"===f.stage||"s",(function(){i&&1!==i&&f.if_(f.isNull(f.nonComputedMember("s",t.name)),f.lazyAssign(f.nonComputedMember("s",t.name),"{}")),f.assign(e,f.nonComputedMember("s",t.name))}))}),e&&f.lazyAssign(e,f.nonComputedMember("l",t.name))),r(e);break;case xr.MemberExpression:a=n&&(n.context=this.nextId())||this.nextId(),e=e||this.nextId(),f.recurse(t.object,a,void 0,(function(){f.if_(f.notNull(a),(function(){t.computed?(s=f.nextId(),f.recurse(t.property,s),f.getStringValue(s),i&&1!==i&&f.if_(f.not(f.computedMember(a,s)),f.lazyAssign(f.computedMember(a,s),"{}")),c=f.computedMember(a,s),f.assign(e,c),n&&(n.computed=!0,n.name=s)):(i&&1!==i&&f.if_(f.isNull(f.nonComputedMember(a,t.property.name)),f.lazyAssign(f.nonComputedMember(a,t.property.name),"{}")),c=f.nonComputedMember(a,t.property.name),f.assign(e,c),n&&(n.computed=!1,n.name=t.property.name))}),(function(){f.assign(e,"undefined")})),r(e)}),!!i);break;case xr.CallExpression:e=e||this.nextId(),t.filter?(s=f.filter(t.callee.name),u=[],C(t.arguments,(function(t){var e=f.nextId();f.recurse(t,e),u.push(e)})),c=s+"("+u.join(",")+")",f.assign(e,c),r(e)):(s=f.nextId(),a={},u=[],f.recurse(t.callee,s,a,(function(){f.if_(f.notNull(s),(function(){C(t.arguments,(function(e){f.recurse(e,t.constant?void 0:f.nextId(),void 0,(function(t){u.push(t)}))})),c=a.name?f.member(a.context,a.name,a.computed)+"("+u.join(",")+")":s+"("+u.join(",")+")",f.assign(e,c)}),(function(){f.assign(e,"undefined")})),r(e)})));break;case xr.AssignmentExpression:s=this.nextId(),a={},this.recurse(t.left,void 0,a,(function(){f.if_(f.notNull(a.context),(function(){f.recurse(t.right,s),c=f.member(a.context,a.name,a.computed)+t.operator+s,f.assign(e,c),r(e||c)}))}),1);break;case xr.ArrayExpression:u=[],C(t.elements,(function(e){f.recurse(e,t.constant?void 0:f.nextId(),void 0,(function(t){u.push(t)}))})),c="["+u.join(",")+"]",this.assign(e,c),r(e||c);break;case xr.ObjectExpression:u=[],l=!1,C(t.properties,(function(t){t.computed&&(l=!0)})),l?(e=e||this.nextId(),this.assign(e,"{}"),C(t.properties,(function(t){t.computed?(a=f.nextId(),f.recurse(t.key,a)):a=t.key.type===xr.Identifier?t.key.name:""+t.key.value,s=f.nextId(),f.recurse(t.value,s),f.assign(f.member(e,a,t.computed),s)}))):(C(t.properties,(function(e){f.recurse(e.value,t.constant?void 0:f.nextId(),void 0,(function(t){u.push(f.escape(e.key.type===xr.Identifier?e.key.name:""+e.key.value)+":"+t)}))})),c="{"+u.join(",")+"}",this.assign(e,c)),r(e||c);break;case xr.ThisExpression:this.assign(e,"s"),r(e||"s");break;case xr.LocalsExpression:this.assign(e,"l"),r(e||"l");break;case xr.NGValueParameter:this.assign(e,"v"),r(e||"v")}},getHasOwnProperty:function(t,e){var n=t+"."+e,r=this.current().own;return r.hasOwnProperty(n)||(r[n]=this.nextId(!1,t+"&&("+this.escape(e)+" in "+t+")")),r[n]},assign:function(t,e){if(t)return this.current().body.push(t,"=",e,";"),t},filter:function(t){return this.state.filters.hasOwnProperty(t)||(this.state.filters[t]=this.nextId(!0)),this.state.filters[t]},ifDefined:function(t,e){return"ifDefined("+t+","+this.escape(e)+")"},plus:function(t,e){return"plus("+t+","+e+")"},return_:function(t){this.current().body.push("return ",t,";")},if_:function(t,e,n){if(!0===t)e();else{var r=this.current().body;r.push("if(",t,"){"),e(),r.push("}"),n&&(r.push("else{"),n(),r.push("}"))}},not:function(t){return"!("+t+")"},isNull:function(t){return t+"==null"},notNull:function(t){return t+"!=null"},nonComputedMember:function(t,e){return/^[$_a-zA-Z][$_a-zA-Z0-9]*$/.test(e)?t+"."+e:t+'["'+e.replace(/[^$_a-zA-Z0-9]/g,this.stringEscapeFn)+'"]'},computedMember:function(t,e){return t+"["+e+"]"},member:function(t,e,n){return n?this.computedMember(t,e):this.nonComputedMember(t,e)},getStringValue:function(t){this.assign(t,"getStringValue("+t+")")},lazyRecurse:function(t,e,n,r,i,o){var a=this;return function(){a.recurse(t,e,n,r,i,o)}},lazyAssign:function(t,e){var n=this;return function(){n.assign(t,e)}},stringEscapeRegex:/[^ a-zA-Z0-9]/g,stringEscapeFn:function(t){return"\\u"+("0000"+t.charCodeAt(0).toString(16)).slice(-4)},escape:function(t){if(F(t))return"'"+t.replace(this.stringEscapeRegex,this.stringEscapeFn)+"'";if(H(t))return t.toString();if(!0===t)return"true";if(!1===t)return"false";if(null===t)return"null";if(void 0===t)return"undefined";throw vr("esc","IMPOSSIBLE")},nextId:function(t,e){var n="v"+this.state.nextId++;return t||this.current().vars.push(n+(e?"="+e:"")),n},current:function(){return this.state[this.state.computing]}},Tr.prototype={compile:function(t){var e,n,r=this;Sr(t,r.$filter),(e=Or(t))&&(n=this.recurse(e));var i,o=kr(t.body);o&&(i=[],C(o,(function(t,e){var n=r.recurse(t);n.isPure=t.isPure,t.input=n,i.push(n),t.watchId=e})));var a=[];C(t.body,(function(t){a.push(r.recurse(t.expression))}));var s=0===t.body.length?I:1===t.body.length?a[0]:function(t,e){var n;return C(a,(function(r){n=r(t,e)})),n};return n&&(s.assign=function(t,e,r){return n(t,r,e)}),i&&(s.inputs=i),s},recurse:function(t,e,n){var r,i,o,a=this;if(t.input)return this.inputs(t.input,t.watchId);switch(t.type){case xr.Literal:return this.value(t.value,e);case xr.UnaryExpression:return i=this.recurse(t.argument),this["unary"+t.operator](i,e);case xr.BinaryExpression:case xr.LogicalExpression:return r=this.recurse(t.left),i=this.recurse(t.right),this["binary"+t.operator](r,i,e);case xr.ConditionalExpression:return this["ternary?:"](this.recurse(t.test),this.recurse(t.alternate),this.recurse(t.consequent),e);case xr.Identifier:return a.identifier(t.name,e,n);case xr.MemberExpression:return r=this.recurse(t.object,!1,!!n),t.computed||(i=t.property.name),t.computed&&(i=this.recurse(t.property)),t.computed?this.computedMember(r,i,e,n):this.nonComputedMember(r,i,e,n);case xr.CallExpression:return o=[],C(t.arguments,(function(t){o.push(a.recurse(t))})),t.filter&&(i=this.$filter(t.callee.name)),t.filter||(i=this.recurse(t.callee,!0)),t.filter?function(t,n,r,a){for(var s=[],u=0;u":function(t,e,n){return function(r,i,o,a){var s=t(r,i,o,a)>e(r,i,o,a);return n?{value:s}:s}},"binary<=":function(t,e,n){return function(r,i,o,a){var s=t(r,i,o,a)<=e(r,i,o,a);return n?{value:s}:s}},"binary>=":function(t,e,n){return function(r,i,o,a){var s=t(r,i,o,a)>=e(r,i,o,a);return n?{value:s}:s}},"binary&&":function(t,e,n){return function(r,i,o,a){var s=t(r,i,o,a)&&e(r,i,o,a);return n?{value:s}:s}},"binary||":function(t,e,n){return function(r,i,o,a){var s=t(r,i,o,a)||e(r,i,o,a);return n?{value:s}:s}},"ternary?:":function(t,e,n,r){return function(i,o,a,s){var u=t(i,o,a,s)?e(i,o,a,s):n(i,o,a,s);return r?{value:u}:u}},value:function(t,e){return function(){return e?{context:void 0,name:void 0,value:t}:t}},identifier:function(t,e,n){return function(r,i,o,a){var s=i&&t in i?i:r;n&&1!==n&&s&&null==s[t]&&(s[t]={});var u=s?s[t]:void 0;return e?{context:s,name:t,value:u}:u}},computedMember:function(t,e,n,r){return function(i,o,a,s){var u,c,l=t(i,o,a,s);return null!=l&&(u=gr(u=e(i,o,a,s)),r&&1!==r&&l&&!l[u]&&(l[u]={}),c=l[u]),n?{context:l,name:u,value:c}:c}},nonComputedMember:function(t,e,n,r){return function(i,o,a,s){var u=t(i,o,a,s);r&&1!==r&&u&&null==u[e]&&(u[e]={});var c=null!=u?u[e]:void 0;return n?{context:u,name:e,value:c}:c}},inputs:function(t,e){return function(n,r,i,o){return o?o[e]:t(n,r,i)}}},Vr.prototype={constructor:Vr,parse:function(t){var e=this.getAst(t),n=this.astCompiler.compile(e.ast);return n.literal=function(t){return 0===t.body.length||1===t.body.length&&(t.body[0].expression.type===xr.Literal||t.body[0].expression.type===xr.ArrayExpression||t.body[0].expression.type===xr.ObjectExpression)}(e.ast),n.constant=function(t){return t.constant}(e.ast),n.oneTime=e.oneTime,n},getAst:function(t){var e=!1;return":"===(t=t.trim()).charAt(0)&&":"===t.charAt(1)&&(e=!0,t=t.substring(2)),{ast:this.ast.ast(t),oneTime:e}}};var Hr=o("$sce"),Br={HTML:"html",CSS:"css",MEDIA_URL:"mediaUrl",URL:"url",RESOURCE_URL:"resourceUrl",JS:"js"},zr=/_([a-z])/g;function Wr(t){return t.replace(zr,Yt)}function Gr(t){var e=[];return D(t)&&C(t,(function(t){e.push(function(t){if("self"===t)return t;if(F(t)){if(t.indexOf("***")>-1)throw Hr("iwcard","Illegal sequence *** in string matcher. String: {0}",t);return t=et(t).replace(/\\\*\\\*/g,".*").replace(/\\\*/g,"[^:/.?&;]*"),new RegExp("^"+t+"$")}if(K(t))return new RegExp("^"+t.source+"$");throw Hr("imatcher",'Matchers may only be "self", string patterns or RegExp objects')}(t))})),e}function Kr(){this.SCE_CONTEXTS=Br;var e=["self"],n=[];this.trustedResourceUrlList=function(t){return arguments.length&&(e=Gr(t)),e},Object.defineProperty(this,"resourceUrlWhitelist",{get:function(){return this.trustedResourceUrlList},set:function(t){this.trustedResourceUrlList=t}}),this.bannedResourceUrlList=function(t){return arguments.length&&(n=Gr(t)),n},Object.defineProperty(this,"resourceUrlBlacklist",{get:function(){return this.bannedResourceUrlList},set:function(t){this.bannedResourceUrlList=t}}),this.$get=["$injector","$$sanitizeUri",function(r,i){var o=function(t){throw Hr("unsafe","Attempting to use an unsafe value in a safe context.")};function a(e,n){return"self"===e?ci(n,ai)||ci(n,t.document.baseURI?t.document.baseURI:(ii||((ii=t.document.createElement("a")).href=".",ii=ii.cloneNode(!1)),ii.href)):!!e.exec(n.href)}function s(t){var e=function(t){this.$$unwrapTrustedValue=function(){return t}};return t&&(e.prototype=new t),e.prototype.valueOf=function(){return this.$$unwrapTrustedValue()},e.prototype.toString=function(){return this.$$unwrapTrustedValue().toString()},e}r.has("$sanitize")&&(o=r.get("$sanitize"));var u=s(),c={};return c[Br.HTML]=s(u),c[Br.CSS]=s(u),c[Br.MEDIA_URL]=s(u),c[Br.URL]=s(c[Br.MEDIA_URL]),c[Br.JS]=s(u),c[Br.RESOURCE_URL]=s(c[Br.URL]),{trustAs:function(t,e){var n=c.hasOwnProperty(t)?c[t]:null;if(!n)throw Hr("icontext","Attempted to trust a value in invalid context. Context: {0}; Value: {1}",t,e);if(null===e||_(e)||""===e)return e;if("string"!=typeof e)throw Hr("itype","Attempted to trust a non-string value in a content requiring a string: Context: {0}",t);return new n(e)},getTrusted:function(t,r){if(null===r||_(r)||""===r)return r;var s=c.hasOwnProperty(t)?c[t]:null;if(s&&r instanceof s)return r.$$unwrapTrustedValue();if(G(r.$$unwrapTrustedValue)&&(r=r.$$unwrapTrustedValue()),t===Br.MEDIA_URL||t===Br.URL)return i(r.toString(),t===Br.MEDIA_URL);if(t===Br.RESOURCE_URL){if(function(t){var r,i,o=ui(t.toString()),s=!1;for(r=0,i=e.length;r to the top of your HTML document. See http://docs.angularjs.org/api/ng.$sce for more information.");var r=Ft(Br);r.isEnabled=function(){return t},r.trustAs=n.trustAs,r.getTrusted=n.getTrusted,r.valueOf=n.valueOf,t||(r.trustAs=r.getTrusted=function(t,e){return e},r.valueOf=R),r.parseAs=function(t,n){var i=e(n);return i.literal&&i.constant?i:e(n,(function(e){return r.getTrusted(t,e)}))};var i=r.parseAs,o=r.getTrusted,s=r.trustAs;return C(Br,(function(t,e){var n=h(e);r[Wr("parse_as_"+n)]=function(e){return i(t,e)},r[Wr("get_trusted_"+n)]=function(e){return o(t,e)},r[Wr("trust_as_"+n)]=function(e){return s(t,e)}})),r}]}function Zr(){this.$get=["$window","$document",function(t,e){var n={},r=!((!t.nw||!t.nw.process)&&t.chrome&&(t.chrome.app&&t.chrome.app.runtime||!t.chrome.app&&t.chrome.runtime&&t.chrome.runtime.id))&&t.history&&t.history.pushState,i=V((/android (\d+)/.exec(h((t.navigator||{}).userAgent))||[])[1]),o=/Boxee/i.test((t.navigator||{}).userAgent),s=e[0]||{},u=s.body&&s.body.style,c=!1,l=!1;return u&&(c=!(!("transition"in u)&&!("webkitTransition"in u)),l=!(!("animation"in u)&&!("webkitAnimation"in u))),{history:!(!r||i<4||o),hasEvent:function(t){if("input"===t&&a)return!1;if(_(n[t])){var e=s.createElement("div");n[t]="on"+t in e}return n[t]},csp:ct(),transitions:c,animations:l,android:i}}]}function Yr(){this.$get=P((function(t){return new Xr(t)}))}function Xr(t){var e=this,n={},r=[],i=e.ALL_TASKS_TYPE="$$all$$",o=e.DEFAULT_TASK_TYPE="$$default$$";function a(){var t=r.pop();return t&&t.cb}function s(t){for(var e=r.length-1;e>=0;--e){var n=r[e];if(n.type===t)return r.splice(e,1),n.cb}}e.completeTask=function(e,r){r=r||o;try{e()}finally{!function(t){n[t=t||o]&&(n[t]--,n[i]--)}(r);var u=n[r],c=n[i];if(!c||!u)for(var l,f=c?s:a;l=f(r);)try{l()}catch(e){t.error(e)}}},e.incTaskCount=function(t){n[t=t||o]=(n[t]||0)+1,n[i]=(n[i]||0)+1},e.notifyWhenNoPendingTasks=function(t,e){n[e=e||i]?r.push({type:e,cb:t}):t()}}var Qr=o("$templateRequest");function ti(){var t;this.httpOptions=function(e){return e?(t=e,this):t},this.$get=["$exceptionHandler","$templateCache","$http","$q","$sce",function(e,n,r,i,o){function a(s,u){a.totalPendingRequests++,F(s)&&!_(n.get(s))||(s=o.getTrustedResourceUrl(s));var c=r.defaults&&r.defaults.transformResponse;return z(c)?c=c.filter((function(t){return t!==Dn})):c===Dn&&(c=null),r.get(s,M({cache:n,transformResponse:c},t)).finally((function(){a.totalPendingRequests--})).then((function(t){return n.put(s,t.data)}),(function(t){return u||(t=Qr("tpload","Failed to load template: {0} (HTTP status: {1} {2})",s,t.status,t.statusText),e(t)),i.reject(t)}))}return a.totalPendingRequests=0,a}]}function ei(){this.$get=["$rootScope","$browser","$location",function(t,e,n){return{findBindings:function(t,e,n){var r=t.getElementsByClassName("ng-binding"),i=[];return C(r,(function(t){var r=b.element(t).data("$binding");r&&C(r,(function(r){n?new RegExp("(^|\\s)"+et(e)+"(\\s|\\||$)").test(r)&&i.push(t):-1!==r.indexOf(e)&&i.push(t)}))})),i},findModels:function(t,e,n){for(var r=["ng-","data-ng-","ng\\:"],i=0;i-1&&(n="["+n+"]"),{href:oi.href,protocol:oi.protocol?oi.protocol.replace(/:$/,""):"",host:oi.host,search:oi.search?oi.search.replace(/^\?/,""):"",hash:oi.hash?oi.hash.replace(/^#/,""):"",hostname:n,port:oi.port,pathname:"/"===oi.pathname.charAt(0)?oi.pathname:"/"+oi.pathname}}function ci(t,e){return t=ui(t),e=ui(e),t.protocol===e.protocol&&t.host===e.host}function li(){this.$get=P(t)}function fi(t){var e=t[0]||{},n={},r="";function i(t){try{return decodeURIComponent(t)}catch(e){return t}}return function(){var t,o,a,s,u,c=function(t){try{return t.cookie||""}catch(t){return""}}(e);if(c!==r)for(t=(r=c).split("; "),n={},a=0;a0&&(u=i(o.substring(0,s)),_(n[u])&&(n[u]=i(o.substring(s+1))));return n}}function hi(){this.$get=fi}function pi(t){var e="Filter";function n(r,i){if(L(r)){var o={};return C(r,(function(t,e){o[e]=n(e,t)})),o}return t.factory(r+e,i)}this.register=n,this.$get=["$injector",function(t){return function(n){return t.get(n+e)}}],n("currency",mi),n("date",Mi),n("filter",di),n("json",Ti),n("limitTo",ji),n("lowercase",Vi),n("number",gi),n("orderBy",Ri),n("uppercase",Ni)}function di(){return function(t,e,n,r){if(!x(t)){if(null==t)return t;throw o("filter")("notarray","Expected array but received: {0}",t)}var i,a;switch(r=r||"$",vi(e)){case"function":i=e;break;case"boolean":case"null":case"number":case"string":a=!0;case"object":i=function(t,e,n,r){var i=L(t)&&n in t;return!0===e?e=ut:G(e)||(e=function(t,e){return!(_(t)||(null===t||null===e?t!==e:L(e)||L(t)&&!U(t)||(t=h(""+t),e=h(""+e),-1===t.indexOf(e))))}),function(o){return i&&!L(o)?$i(o,t[n],e,n,!1):$i(o,t,e,n,r)}}(e,n,r,a);break;default:return t}return Array.prototype.filter.call(t,i)}}function $i(t,e,n,r,i,o){var a=vi(t),s=vi(e);if("string"===s&&"!"===e.charAt(0))return!$i(t,e.substring(1),n,r,i);if(z(t))return t.some((function(t){return $i(t,e,n,r,i)}));switch(a){case"object":var u;if(i){for(u in t)if(u.charAt&&"$"!==u.charAt(0)&&$i(t[u],e,n,r,!0))return!0;return!o&&$i(t,e,n,r,!1)}if("object"===s){for(u in e){var c=e[u];if(!G(c)&&!_(c)){var l=u===r;if(!$i(l?t:t[u],c,n,r,l,l))return!1}}return!0}return n(t,e);case"function":return!1;default:return n(t,e)}}function vi(t){return null===t?"null":typeof t}function mi(t){var e=t.NUMBER_FORMATS;return function(t,n,r){_(n)&&(n=e.CURRENCY_SYM),_(r)&&(r=e.PATTERNS[1].maxFrac);var i=n?/\u00A4/g:/\s*\u00A4\s*/g;return null==t?t:yi(t,e.PATTERNS[1],e.GROUP_SEP,e.DECIMAL_SEP,r).replace(i,n)}}function gi(t){var e=t.NUMBER_FORMATS;return function(t,n){return null==t?t:yi(t,e.PATTERNS[0],e.GROUP_SEP,e.DECIMAL_SEP,n)}}function yi(t,e,n,r,i){if(!F(t)&&!H(t)||isNaN(t))return"";var o,a=!isFinite(t),s=!1,u=Math.abs(t)+"",c="";if(a)c="∞";else{!function(t,e,n,r){var i=t.d,o=i.length-t.i,a=(e=_(e)?Math.min(Math.max(n,o),r):+e)+t.i,s=i[a];if(a>0){i.splice(Math.max(t.i,a));for(var u=a;u=5)if(a-1<0){for(var l=0;l>a;l--)i.unshift(0),t.i++;i.unshift(1),t.i++}else i[a-1]++;for(;o-1&&(t=t.replace(".","")),(r=t.search(/e/i))>0?(n<0&&(n=r),n+=+t.slice(r+1),t=t.substring(0,r)):n<0&&(n=t.length),r=0;"0"===t.charAt(r);r++);if(r===(o=t.length))e=[0],n=1;else{for(o--;"0"===t.charAt(o);)o--;for(n-=r,e=[],i=0;r<=o;r++,i++)e[i]=+t.charAt(r)}return n>22&&(e=e.splice(0,21),a=n-1,n=1),{d:e,e:a,i:n}}(u),i,e.minFrac,e.maxFrac);var l=o.d,f=o.i,h=o.e,p=[];for(s=l.reduce((function(t,e){return t&&!e}),!0);f<0;)l.unshift(0),f++;f>0?p=l.splice(f,l.length):(p=l,l=[0]);var d=[];for(l.length>=e.lgSize&&d.unshift(l.splice(-e.lgSize,l.length).join(""));l.length>e.gSize;)d.unshift(l.splice(-e.gSize,l.length).join(""));l.length&&d.unshift(l.join("")),c=d.join(n),p.length&&(c+=r+p.join("")),h&&(c+="e+"+h)}return t<0&&!s?e.negPre+c+e.negSuf:e.posPre+c+e.posSuf}function bi(t,e,n,r){var i="";for((t<0||r&&t<=0)&&(r?t=1-t:(t=-t,i="-")),t=""+t;t.length0||a>-n)&&(a+=n),0===a&&-12===n&&(a=12),bi(a,e,r,i)}}function xi(t,e,n){return function(r,i){var o=r["get"+t]();return i[p((n?"STANDALONE":"")+(e?"SHORT":"")+t)][o]}}function Ci(t){var e=new Date(t,0,1).getDay();return new Date(t,0,(e<=4?5:12)-e)}function Ei(t){return function(e){var n,r=Ci(e.getFullYear()),i=(n=e,+new Date(n.getFullYear(),n.getMonth(),n.getDate()+(4-n.getDay()))-+r);return bi(1+Math.round(i/6048e5),t)}}function Si(t,e){return t.getFullYear()<=0?e.ERAS[0]:e.ERAS[1]}fi.$inject=["$document"],pi.$inject=["$provide"],mi.$inject=["$locale"],gi.$inject=["$locale"];var ki={yyyy:wi("FullYear",4,0,!1,!0),yy:wi("FullYear",2,0,!0,!0),y:wi("FullYear",1,0,!1,!0),MMMM:xi("Month"),MMM:xi("Month",!0),MM:wi("Month",2,1),M:wi("Month",1,1),LLLL:xi("Month",!1,!0),dd:wi("Date",2),d:wi("Date",1),HH:wi("Hours",2),H:wi("Hours",1),hh:wi("Hours",2,-12),h:wi("Hours",1,-12),mm:wi("Minutes",2),m:wi("Minutes",1),ss:wi("Seconds",2),s:wi("Seconds",1),sss:wi("Milliseconds",3),EEEE:xi("Day"),EEE:xi("Day",!0),a:function(t,e){return t.getHours()<12?e.AMPMS[0]:e.AMPMS[1]},Z:function(t,e,n){var r=-1*n;return(r>=0?"+":"")+(bi(Math[r>0?"floor":"ceil"](r/60),2)+bi(Math.abs(r%60),2))},ww:Ei(2),w:Ei(1),G:Si,GG:Si,GGG:Si,GGGG:function(t,e){return t.getFullYear()<=0?e.ERANAMES[0]:e.ERANAMES[1]}},Ai=/((?:[^yMLdHhmsaZEwG']+)|(?:'(?:[^']|'')*')|(?:E+|y+|M+|L+|d+|H+|h+|m+|s+|a|Z|G+|w+))([\s\S]*)/,Oi=/^-?\d+$/;function Mi(t){var e=/^(\d{4})-?(\d\d)-?(\d\d)(?:T(\d\d)(?::?(\d\d)(?::?(\d\d)(?:\.(\d+))?)?)?(Z|([+-])(\d\d):?(\d\d))?)?$/;return function(n,r,i){var o,a,s="",u=[];if(r=r||"mediumDate",r=t.DATETIME_FORMATS[r]||r,F(n)&&(n=Oi.test(n)?V(n):function(t){var n;if(n=t.match(e)){var r=new Date(0),i=0,o=0,a=n[8]?r.setUTCFullYear:r.setFullYear,s=n[8]?r.setUTCHours:r.setHours;n[9]&&(i=V(n[9]+n[10]),o=V(n[9]+n[11])),a.call(r,V(n[1]),V(n[2])-1,V(n[3]));var u=V(n[4]||0)-i,c=V(n[5]||0)-o,l=V(n[6]||0),f=Math.round(1e3*parseFloat("0."+(n[7]||0)));return s.call(r,u,c,l,f),r}return t}(n)),H(n)&&(n=new Date(n)),!B(n)||!isFinite(n.getTime()))return n;for(;r;)(a=Ai.exec(r))?r=(u=ft(u,a,1)).pop():(u.push(r),r=null);var c=n.getTimezoneOffset();return i&&(c=gt(i,c),n=bt(n,i,!0)),C(u,(function(e){s+=(o=ki[e])?o(n,t.DATETIME_FORMATS,c):"''"===e?"'":e.replace(/(^'|'$)/g,"").replace(/''/g,"'")})),s}}function Ti(){return function(t,e){return _(e)&&(e=2),$t(t,e)}}Mi.$inject=["$locale"];var Vi=P(h),Ni=P(p);function ji(){return function(t,e,n){return e=Math.abs(Number(e))===1/0?Number(e):V(e),N(e)?t:(H(t)&&(t=t.toString()),x(t)?(n=(n=!n||isNaN(n)?0:V(n))<0?Math.max(0,t.length+n):n,e>=0?Ii(t,n,n+e):0===n?Ii(t,e,t.length):Ii(t,Math.max(0,n+e),n)):t)}}function Ii(t,e,n){return F(t)?t.slice(e,n):d.call(t,e,n)}function Ri(t){return function(r,i,a,s){if(null==r)return r;if(!x(r))throw o("orderBy")("notarray","Expected array but received: {0}",r);z(i)||(i=[i]),0===i.length&&(i=["+"]);var u=i.map((function(e){var n=1,r=R;if(G(e))r=e;else if(F(e)&&("+"!==e.charAt(0)&&"-"!==e.charAt(0)||(n="-"===e.charAt(0)?-1:1,e=e.substring(1)),""!==e&&(r=t(e)).constant)){var i=r();r=function(t){return t[i]}}return{get:r,descending:n}})),c=a?-1:1,l=G(s)?s:n,f=Array.prototype.map.call(r,(function(t,n){return{value:t,tieBreaker:{value:n,type:"number",index:n},predicateValues:u.map((function(r){return function(t,n){var r=typeof t;return null===t?r="null":"object"===r&&(t=function(t){return G(t.valueOf)&&e(t=t.valueOf())||U(t)&&e(t=t.toString()),t}(t)),{value:t,type:r,index:n}}(r.get(t),n)}))}}));return f.sort((function(t,e){for(var r=0,i=u.length;r=u},n.$observe("min",(function(t){t!==c&&(u=ho(t),c=t,r.$validate())}))}if(D(n.max)||n.ngMax){var l=n.max||s(n.ngMax)(t),f=ho(l);r.$validators.max=function(t,e){return r.$isEmpty(e)||_(f)||e<=f},n.$observe("max",(function(t){t!==l&&(f=ho(t),l=t,r.$validate())}))}if(D(n.step)||n.ngStep){var h=n.step||s(n.ngStep)(t),p=ho(h);r.$validators.step=function(t,e){return r.$isEmpty(e)||_(p)||vo(e,u||0,p)},n.$observe("step",(function(t){t!==h&&(p=ho(t),h=t,r.$validate())}))}},url:function(t,e,n,r,i,o){so(0,e,n,r,i,o),ao(r),r.$validators.url=function(t,e){var n=t||e;return r.$isEmpty(n)||Zi.test(n)}},email:function(t,e,n,r,i,o){so(0,e,n,r,i,o),ao(r),r.$validators.email=function(t,e){var n=t||e;return r.$isEmpty(n)||Yi.test(n)}},radio:function(t,e,n,r){var i=!n.ngTrim||"false"!==tt(n.ngTrim);_(n.name)&&e.attr("name",k()),e.on("change",(function(t){var o;e[0].checked&&(o=n.value,i&&(o=tt(o)),r.$setViewValue(o,t&&t.type))})),r.$render=function(){var t=n.value;i&&(t=tt(t)),e[0].checked=t===r.$viewValue},n.$observe("value",r.$render)},range:function(t,e,n,r,i,o){lo(0,e,0,r,"range"),fo(r),so(0,e,n,r,i,o);var a=r.$$hasNativeValidators&&"range"===e[0].type,s=a?0:void 0,u=a?100:void 0,c=a?1:void 0,l=e[0].validity,f=D(n.min),h=D(n.max),p=D(n.step),d=r.$render;function $(t,r){e.attr(t,n[t]);var i=n[t];n.$observe(t,(function(t){t!==i&&(i=t,r(t))}))}r.$render=a&&D(l.rangeUnderflow)&&D(l.rangeOverflow)?function(){d(),r.$setViewValue(e.val())}:d,f&&(s=ho(n.min),r.$validators.min=a?function(){return!0}:function(t,e){return r.$isEmpty(e)||_(s)||e>=s},$("min",(function(t){if(s=ho(t),!N(r.$modelValue))if(a){var n=e.val();s>n&&(n=s,e.val(n)),r.$setViewValue(n)}else r.$validate()}))),h&&(u=ho(n.max),r.$validators.max=a?function(){return!0}:function(t,e){return r.$isEmpty(e)||_(u)||e<=u},$("max",(function(t){if(u=ho(t),!N(r.$modelValue))if(a){var n=e.val();u=v},a.$observe("min",(function(t){t!==$&&(v=b(t),$=t,s.$validate())}))}if(D(a.max)||a.ngMax){var m=a.max||f(a.ngMax)(i),g=b(m);s.$validators.max=function(t){return!y(t)||_(g)||n(t)<=g},a.$observe("max",(function(t){t!==m&&(g=b(t),m=t,s.$validate())}))}function y(t){return t&&!(t.getTime&&t.getTime()!=t.getTime())}function b(t){return D(t)&&!B(t)?w(t)||void 0:t}function w(t,e){var r=s.$options.getOption("timezone");p&&p!==r&&(e=yt(e,gt(p)));var i=n(t,e);return!isNaN(i)&&r&&(i=bt(i,r)),i}}}function lo(t,e,n,r,i){var o=e[0];(r.$$hasNativeValidators=L(o.validity))&&r.$parsers.push((function(t){var n=e.prop("validity")||{};if(!n.badInput&&!n.typeMismatch)return t;r.$$parserName=i}))}function fo(t){t.$parsers.push((function(e){return t.$isEmpty(e)?null:Xi.test(e)?parseFloat(e):void(t.$$parserName="number")})),t.$formatters.push((function(e){if(!t.$isEmpty(e)){if(!H(e))throw Ko("numfmt","Expected `{0}` to be a number",e);e=e.toString()}return e}))}function ho(t){return D(t)&&!H(t)&&(t=parseFloat(t)),N(t)?void 0:t}function po(t){return(0|t)===t}function $o(t){var e=t.toString(),n=e.indexOf(".");if(-1===n){if(-10||f[t])&&(f[t]=(f[t]||0)+e,f[t]===+(e>0)&&n.push(t))})),n.join(" ")}f||(f=Dt(),u.data("$classCounts",f)),"ngClass"!==t&&(n||(n=a("$index",(function(t){return 1&t}))),s.$watch(n,(function(t){var n;t===e?(n=p(i(n=l),1),c.$addClass(n)):function(t){t=p(i(t),-1),c.$removeClass(t)}(l),h=t}))),s.$watch(a(c[t],o),(function(t){h===e&&function(t,e){var n=i(t),o=i(e),a=r(n,o),s=r(o,n),u=p(a,-1),l=p(s,1);c.$addClass(l),c.$removeClass(u)}(l,t),l=t}))}}}];function r(t,e){if(!t||!t.length)return[];if(!e||!e.length)return t;var n=[];t:for(var r=0;r0?this.$$pendingDebounce=this.$$timeout((function(){n.$commitViewValue()}),e):this.$$rootScope.$$phase?this.$commitViewValue():this.$$scope.$apply((function(){n.$commitViewValue()}))},$overrideModelOptions:function(t){this.$options=this.$options.createChild(t),this.$$setUpdateOnEvents()},$processModelValue:function(){var t=this.$$format();this.$viewValue!==t&&(this.$$updateEmptyClasses(t),this.$viewValue=this.$$lastCommittedViewValue=t,this.$render(),this.$$runValidators(this.$modelValue,this.$viewValue,I))},$$format:function(){for(var t=this.$formatters,e=t.length,n=this.$modelValue;e--;)n=t[e](n);return n},$$setModelValue:function(t){this.$modelValue=this.$$rawModelValue=t,this.$$parserValid=void 0,this.$processModelValue()},$$setUpdateOnEvents:function(){this.$$updateEvents&&this.$$element.off(this.$$updateEvents,this.$$updateEventHandler),this.$$updateEvents=this.$options.getOption("updateOn"),this.$$updateEvents&&this.$$element.on(this.$$updateEvents,this.$$updateEventHandler)},$$updateEventHandler:function(t){this.$$debounceViewValueCommit(t&&t.type)}},Gi({clazz:Jo,set:function(t,e){t[e]=!0},unset:function(t,e){delete t[e]}});var Zo,Yo=["$rootScope",function(t){return{restrict:"A",require:["ngModel","^?form","^?ngModelOptions"],controller:Jo,priority:1,compile:function(e){return e.addClass(Fo).addClass(Bo).addClass(Lo),{pre:function(t,e,n,r){var i=r[0],o=r[1]||i.$$parentForm,a=r[2];a&&(i.$options=a.$options),i.$$initGetterSetters(),o.$addControl(i),n.$observe("name",(function(t){i.$name!==t&&i.$$parentForm.$$renameControl(i,t)})),t.$on("$destroy",(function(){i.$$parentForm.$removeControl(i)}))},post:function(e,n,r,i){var o=i[0];function a(){o.$setTouched()}o.$$setUpdateOnEvents(),n.on("blur",(function(){o.$touched||(t.$$phase?e.$evalAsync(a):e.$apply(a))}))}}}}}],Xo=/(\s+|^)default(\s+|$)/;function Qo(t){this.$$options=t}Qo.prototype={getOption:function(t){return this.$$options[t]},createChild:function(t){var e=!1;return C(t=M({},t),(function(n,r){"$inherit"===n?"*"===r?e=!0:(t[r]=this.$$options[r],"updateOn"===r&&(t.updateOnDefault=this.$$options.updateOnDefault)):"updateOn"===r&&(t.updateOnDefault=!1,t[r]=tt(n.replace(Xo,(function(){return t.updateOnDefault=!0," "}))))}),this),e&&(delete t["*"],ea(t,this.$$options)),ea(t,Zo.$$options),new Qo(t)}},Zo=new Qo({updateOn:"",updateOnDefault:!0,debounce:0,getterSetter:!1,allowInvalid:!1,timezone:null});var ta=function(){function t(t,e){this.$$attrs=t,this.$$scope=e}return t.$inject=["$attrs","$scope"],t.prototype={$onInit:function(){var t=this.parentCtrl?this.parentCtrl.$options:Zo,e=this.$$scope.$eval(this.$$attrs.ngModelOptions);this.$options=t.createChild(e)}},{restrict:"A",priority:10,require:{parentCtrl:"?^^ngModelOptions"},bindToController:!0,controller:t}};function ea(t,e){C(e,(function(e,n){D(t[n])||(t[n]=e)}))}var na=Pi({terminal:!0,priority:1e3}),ra=o("ngOptions"),ia=/^\s*([\s\S]+?)(?:\s+as\s+([\s\S]+?))?(?:\s+group\s+by\s+([\s\S]+?))?(?:\s+disable\s+when\s+([\s\S]+?))?\s+for\s+(?:([$\w][$\w]*)|(?:\(\s*([$\w][$\w]*)\s*,\s*([$\w][$\w]*)\s*\)))\s+in\s+([\s\S]+?)(?:\s+track\s+by\s+([\s\S]+?))?$/,oa=["$compile","$document","$parse",function(e,n,r){var i=t.document.createElement("option"),o=t.document.createElement("optgroup");return{restrict:"A",terminal:!0,require:["select","ngModel"],link:{pre:function(t,e,n,r){r[0].registerOption=I},post:function(t,a,u,c){for(var l=c[0],f=c[1],h=u.multiple,p=0,d=a.children(),$=d.length;p<$;p++)if(""===d[p].value){l.hasEmptyOption=!0,l.emptyOption=d.eq(p);break}a.empty();var v,m=!!l.emptyOption;s(i.cloneNode(!1)).val("?");var g=function(t,e,n){var i=t.match(ia);if(!i)throw ra("iexp","Expected expression in form of '_select_ (as _label_)? for (_key_,)?_value_ in _collection_' but got '{0}'. Element: {1}",t,wt(e));var o=i[5]||i[7],a=i[6],s=/ as /.test(i[0])&&i[1],u=i[9],c=r(i[2]?i[1]:o),l=s&&r(s)||c,f=u&&r(u),h=u?function(t,e){return f(n,e)}:function(t){return _e(t)},p=function(t,e){return h(t,y(t,e))},d=r(i[2]||i[1]),$=r(i[3]||""),v=r(i[4]||""),m=r(i[8]),g={},y=a?function(t,e){return g[a]=e,g[o]=t,g}:function(t){return g[o]=t,g};function b(t,e,n,r,i){this.selectValue=t,this.viewValue=e,this.label=n,this.group=r,this.disabled=i}function w(t){var e;if(!a&&x(t))e=t;else for(var n in e=[],t)t.hasOwnProperty(n)&&"$"!==n.charAt(0)&&e.push(n);return e}return{trackBy:u,getTrackByValue:p,getWatchables:r(m,(function(t){for(var e=[],r=w(t=t||[]),o=r.length,a=0;a=0;e--){var n=v.items[e];D(n.group)?Oe(n.element.parentNode):Oe(n.element)}v=g.getOptions();var r={};if(v.items.forEach((function(t){var e;D(t.group)?((e=r[t.group])||(e=o.cloneNode(!1),y.appendChild(e),e.label=null===t.group?"null":t.group,r[t.group]=e),b(t,e)):b(t,y)})),a[0].appendChild(y),f.$render(),!f.$isEmpty(t)){var i=l.readValue();(g.trackBy||h?ut(t,i):t===i)||(f.$setViewValue(i),f.$render())}}))}}}}],aa=["$locale","$interpolate","$log",function(t,e,n){var r=/{}/g,i=/^when(Minus)?(.+)$/;return{link:function(o,a,s){var u,c=s.count,l=s.$attr.when&&a.attr(s.$attr.when),f=s.offset||0,p=o.$eval(l)||{},d={},$=e.startSymbol(),v=e.endSymbol(),m=$+c+"-"+f+v,g=b.noop;function y(t){a.text(t||"")}C(s,(function(t,e){var n=i.exec(e);if(n){var r=(n[1]?"-":"")+h(n[2]);p[r]=a.attr(s.$attr[e])}})),C(p,(function(t,n){d[n]=e(t.replace(r,m))})),o.$watch(c,(function(e){var r=parseFloat(e),i=N(r);if(i||r in p||(r=t.pluralCat(r-f)),!(r===u||i&&N(u))){g();var a=d[r];_(a)?(null!=e&&n.debug("ngPluralize: no rule defined for '"+r+"' in "+l),g=I,y()):g=o.$watch(a,y),u=r}}))}}}],sa=o("ngRef"),ua=["$parse",function(t){return{priority:-1,restrict:"A",compile:function(e,n){var r=bn(rt(e)),i=t(n.ngRef),o=i.assign||function(){throw sa("nonassign",'Expression in ngRef="{0}" is non-assignable!',n.ngRef)};return function(t,e,a){var s;if(a.hasOwnProperty("ngRefRead")){if("$element"===a.ngRefRead)s=e;else if(!(s=e.data("$"+a.ngRefRead+"Controller")))throw sa("noctrl",'The controller for ngRefRead="{0}" could not be found on ngRef="{1}"',a.ngRefRead,n.ngRef)}else s=e.data("$"+r+"Controller");o(t,s=s||e),e.on("$destroy",(function(){i(t)===s&&o(t,null)}))}}}}],ca=["$parse","$animate","$compile",function(t,e,n){var r="$$NG_REMOVED",i=o("ngRepeat"),a=function(t,e,n,r,i,o,a){t[n]=r,i&&(t[i]=o),t.$index=e,t.$first=0===e,t.$last=e===a-1,t.$middle=!(t.$first||t.$last),t.$odd=!(t.$even=0==(1&e))},s=function(t){return t.clone[0]},u=function(t){return t.clone[t.clone.length-1]},c=function(t,e,n){return _e(n)},l=function(t,e){return e};return{restrict:"A",multiElement:!0,transclude:"element",priority:1e3,terminal:!0,$$tlb:!0,compile:function(o,h){var p=h.ngRepeat,d=n.$$createComment("end ngRepeat",p),$=p.match(/^\s*([\s\S]+?)\s+in\s+([\s\S]+?)(?:\s+as\s+([\s\S]+?))?(?:\s+track\s+by\s+([\s\S]+?))?\s*$/);if(!$)throw i("iexp","Expected expression in form of '_item_ in _collection_[ track by _id_]' but got '{0}'.",p);var v=$[1],m=$[2],g=$[3],y=$[4];if(!($=v.match(/^(?:(\s*[$\w]+)|\(\s*([$\w]+)\s*,\s*([$\w]+)\s*\))$/)))throw i("iidexp","'_item_' in '_item_ in _collection_' should be an identifier or '(_key_, _value_)' expression, but got '{0}'.",v);var b,w=$[3]||$[1],E=$[2];if(g&&(!/^[$a-zA-Z_][$a-zA-Z0-9_]*$/.test(g)||/^(null|undefined|this|\$index|\$first|\$middle|\$last|\$even|\$odd|\$parent|\$root|\$id)$/.test(g)))throw i("badident","alias '{0}' is invalid --- must be a valid JS identifier which is not a reserved name.",g);if(y){var S={$id:_e},k=t(y);b=function(t,e,n,r){return E&&(S[E]=e),S[w]=n,S.$index=r,k(t,S)}}return function(t,n,o,h,$){var v=Dt();t.$watchCollection(m,(function(o){var h,m,y,k,A,O,M,T,V,N,j,I,R=n[0],P=Dt();if(g&&(t[g]=o),x(o))V=o,T=b||c;else for(var U in T=b||l,V=[],o)f.call(o,U)&&"$"!==U.charAt(0)&&V.push(U);for(k=V.length,j=new Array(k),h=0;h=a}}}}}];function Ta(t,e,n){if(t){if(F(t)&&(t=new RegExp("^"+t+"$")),!t.test)throw o("ngPattern")("noregexp","Expected {0} to be a RegExp but was {1}. Element: {2}",e,t,wt(n));return t}}function Va(t){var e=V(t);return N(e)?-1:e}t.angular.bootstrap?t.console&&console.log("WARNING: Tried to load AngularJS more than once."):(function(){var e;if(!jt){var n=lt();(u=_(n)?r:n?t[n]:void 0)&&u.fn.on?(s=u,M(u.fn,{scope:Te.scope,isolateScope:Te.isolateScope,controller:Te.controller,injector:Te.injector,inheritedData:Te.inheritedData})):s=he,e=s.cleanData,s.cleanData=function(t){for(var n,r,i=0;null!=(r=t[i]);i++)(n=(s._data(r)||{}).events)&&n.$destroy&&s(r).triggerHandler("$destroy");e(t)},b.element=s,jt=!0}}(),function(e){M(e,{errorHandlingConfig:n,bootstrap:Ot,copy:at,extend:M,merge:T,equals:ut,element:s,forEach:C,injector:Ye,noop:I,bind:pt,toJson:$t,fromJson:vt,identity:R,isUndefined:_,isDefined:D,isString:F,isFunction:G,isObject:L,isNumber:H,isElement:nt,isArray:z,version:Bt,isDate:B,callbacks:{$$counter:0},getTestability:Tt,reloadWithDebugInfo:Mt,UNSAFE_restoreLegacyJqLiteXHTMLReplacement:It,$$minErr:o,$$csp:ct,$$encodeUriSegment:Et,$$encodeUriQuery:St,$$lowercase:h,$$stringify:Lt,$$uppercase:p}),(c=function(t){var e=o("$injector"),n=o("ng");function r(t,e,n){return t[e]||(t[e]=n())}var i=r(t,"angular",Object);return i.$$minErr=i.$$minErr||o,r(i,"module",(function(){var t={};return function(i,o,a){var s={};return function(t,e){if("hasOwnProperty"===t)throw n("badname","hasOwnProperty is not a valid {0} name","module")}(i),o&&t.hasOwnProperty(i)&&(t[i]=null),r(t,i,(function(){if(!o)throw e("nomod","Module '{0}' is not available! You either misspelled the module name or forgot to load it. If registering a module ensure that you specify the dependencies as the second argument.",i);var t=[],r=[],u=[],c=f("$injector","invoke","push",r),l={_invokeQueue:t,_configBlocks:r,_runBlocks:u,info:function(t){if(D(t)){if(!L(t))throw n("aobj","Argument '{0}' must be an object","value");return s=t,this}return s},requires:o,name:i,provider:h("$provide","provider"),factory:h("$provide","factory"),service:h("$provide","service"),value:f("$provide","value"),constant:f("$provide","constant","unshift"),decorator:h("$provide","decorator",r),animation:h("$animateProvider","register"),filter:h("$filterProvider","register"),controller:h("$controllerProvider","register"),directive:h("$compileProvider","directive"),component:h("$compileProvider","component"),config:c,run:function(t){return u.push(t),this}};return a&&c(a),l;function f(e,n,r,i){return i||(i=t),function(){return i[r||"push"]([e,n,arguments]),l}}function h(e,n,r){return r||(r=t),function(t,o){return o&&G(o)&&(o.$$moduleName=i),r.push([e,n,arguments]),l}}}))}}))}(t))("ng",["ngLocale"],["$provide",function(t){t.provider({$$sanitizeUri:Fr}),t.provider("$compile",vn).directive({a:Ui,input:go,textarea:go,form:Bi,script:ba,select:Ea,option:Sa,ngBind:xo,ngBindHtml:Eo,ngBindTemplate:Co,ngClass:Ao,ngClassEven:Mo,ngClassOdd:Oo,ngCloak:To,ngController:Vo,ngForm:zi,ngHide:pa,ngIf:Ro,ngInclude:Po,ngInit:_o,ngNonBindable:na,ngPluralize:aa,ngRef:ua,ngRepeat:ca,ngShow:ha,ngStyle:da,ngSwitch:$a,ngSwitchWhen:va,ngSwitchDefault:ma,ngOptions:oa,ngTransclude:ya,ngModel:Yo,ngList:Do,ngChange:So,pattern:Aa,ngPattern:Aa,required:ka,ngRequired:ka,minlength:Ma,ngMinlength:Ma,maxlength:Oa,ngMaxlength:Oa,ngValue:wo,ngModelOptions:ta}).directive({ngInclude:Uo,input:yo}).directive(_i).directive(No),t.provider({$anchorScroll:Xe,$animate:an,$animateCss:cn,$$animateJs:rn,$$animateQueue:on,$$AnimateRunner:un,$$animateAsyncRun:sn,$browser:fn,$cacheFactory:hn,$controller:kn,$document:An,$$isDocumentHidden:On,$exceptionHandler:Mn,$filter:pi,$$forceReflow:Tn,$interpolate:Kn,$interval:Zn,$$intervalFactory:Yn,$http:Bn,$httpParamSerializer:Un,$httpParamSerializerJQLike:_n,$httpBackend:Wn,$xhrFactory:zn,$jsonpCallbacks:Xn,$location:dr,$log:$r,$parse:jr,$rootScope:qr,$q:Ir,$$q:Rr,$sce:Jr,$sceDelegate:Kr,$sniffer:Zr,$$taskTrackerFactory:Yr,$templateCache:pn,$templateRequest:ti,$$testability:ei,$timeout:ri,$window:li,$$rAF:Lr,$$jqLite:Ue,$$Map:Fe,$$cookieReader:hi})}]).info({angularVersion:"1.8.2"})}(b),b.module("ngLocale",[],["$provide",function(t){t.value("$locale",{DATETIME_FORMATS:{AMPMS:["AM","PM"],DAY:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],ERANAMES:["Before Christ","Anno Domini"],ERAS:["BC","AD"],FIRSTDAYOFWEEK:6,MONTH:["January","February","March","April","May","June","July","August","September","October","November","December"],SHORTDAY:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],SHORTMONTH:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],STANDALONEMONTH:["January","February","March","April","May","June","July","August","September","October","November","December"],WEEKENDRANGE:[5,6],fullDate:"EEEE, MMMM d, y",longDate:"MMMM d, y",medium:"MMM d, y h:mm:ss a",mediumDate:"MMM d, y",mediumTime:"h:mm:ss a",short:"M/d/yy h:mm a",shortDate:"M/d/yy",shortTime:"h:mm a"},NUMBER_FORMATS:{CURRENCY_SYM:"$",DECIMAL_SEP:".",GROUP_SEP:",",PATTERNS:[{gSize:3,lgSize:3,maxFrac:3,minFrac:0,minInt:1,negPre:"-",negSuf:"",posPre:"",posSuf:""},{gSize:3,lgSize:3,maxFrac:2,minFrac:2,minInt:1,negPre:"-¤",negSuf:"",posPre:"¤",posSuf:""}]},id:"en-us",localeID:"en_US",pluralCat:function(t,e){var n=0|t,r=function(t,e){var n=e;void 0===n&&(n=Math.min(function(t){var e=(t+="").indexOf(".");return-1==e?0:t.length-e-1}(t),3));var r=Math.pow(10,n);return{v:n,f:(t*r|0)%r}}(t,e);return 1==n&&0==r.v?"one":"other"}})}]),s((function(){!function(e,n){var r,i,o={};if(C(kt,(function(t){var n=t+"app";!r&&e.hasAttribute&&e.hasAttribute(n)&&(r=e,i=e.getAttribute(n))})),C(kt,(function(t){var n,o=t+"app";!r&&(n=e.querySelector("["+o.replace(":","\\:")+"]"))&&(r=n,i=n.getAttribute(o))})),r){if(!At)return void t.console.error("AngularJS: disabling automatic bootstrap. - - - - - - - -
-
- - -
-
- -
- - - {{ actualTitle }} - - - - - - - -
- -
- - - -
- -
- -
-
- - - - - - - -
-
- - - - - - - - - - - - - - - diff --git a/snippet/3.2.0/scripts/app.js b/snippet/3.2.0/scripts/app.js deleted file mode 100644 index 7c3a8af..0000000 --- a/snippet/3.2.0/scripts/app.js +++ /dev/null @@ -1,42 +0,0 @@ -/*! - * ************************************************************************* - * * * - * * xCALLY Motion - The Omnichannel Contact Center * - * * Copyright (c) Xenialab s.r.l. All Rights Reserved * - * * * - * ************************************************************************* - * * * - * * Email: info@xcally.com * - * * Website: https://www.xcally.com * - * * * - * ************************************************************************* - * * * - * * The SOFTWARE PRODUCT is protected by copyright laws and international * - * * copyright treaties, as well as other intellectual property laws and * - * * treaties. The SOFTWARE PRODUCT is licensed, not sold. * - * * * - * ************************************************************************* - */ -"use strict"; -(self["webpackChunkmotion_chat"] = self["webpackChunkmotion_chat"] || []).push([["app"],{ - -/***/ "./src/styles/app.scss": -/*!*****************************!*\ - !*** ./src/styles/app.scss ***! - \*****************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -__webpack_require__.r(__webpack_exports__); -// extracted by mini-css-extract-plugin - - -/***/ }) - -}, -/******/ __webpack_require__ => { // webpackRuntimeModules -/******/ var __webpack_exec__ = (moduleId) => (__webpack_require__(__webpack_require__.s = moduleId)) -/******/ __webpack_require__.O(0, ["chat"], () => (__webpack_exec__("./src/styles/app.scss"))); -/******/ var __webpack_exports__ = __webpack_require__.O(); -/******/ } -]); -//# sourceMappingURL=app.js.map \ No newline at end of file diff --git a/snippet/3.2.0/scripts/app.js.map b/snippet/3.2.0/scripts/app.js.map deleted file mode 100644 index 9b8ff55..0000000 --- a/snippet/3.2.0/scripts/app.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"scripts/app.js","mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA","sources":["webpack://motion-chat/./src/styles/app.scss?077d"],"sourcesContent":["// extracted by mini-css-extract-plugin\nexport {};"],"names":[],"sourceRoot":""} \ No newline at end of file diff --git a/snippet/3.2.0/scripts/chat.js b/snippet/3.2.0/scripts/chat.js deleted file mode 100644 index ffc3558..0000000 --- a/snippet/3.2.0/scripts/chat.js +++ /dev/null @@ -1,149280 +0,0 @@ -(self["webpackChunkmotion_chat"] = self["webpackChunkmotion_chat"] || []).push([["chat"],{ - -/***/ "./node_modules/@flowjs/flow.js/src/flow.js": -/*!**************************************************!*\ - !*** ./node_modules/@flowjs/flow.js/src/flow.js ***! - \**************************************************/ -/***/ ((module, exports, __webpack_require__) => { - -/* module decorator */ module = __webpack_require__.nmd(module); -var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/** - * @license MIT - */ -(function(window, document, undefined) {'use strict'; - if (!window || !document) { - console.warn('Flowjs needs window and document objects to work'); - return; - } - // ie10+ - var ie10plus = window.navigator.msPointerEnabled; - /** - * Flow.js is a library providing multiple simultaneous, stable and - * resumable uploads via the HTML5 File API. - * @param [opts] - * @param {number|Function} [opts.chunkSize] - * @param {bool} [opts.forceChunkSize] - * @param {number} [opts.simultaneousUploads] - * @param {bool} [opts.singleFile] - * @param {string} [opts.fileParameterName] - * @param {number} [opts.progressCallbacksInterval] - * @param {number} [opts.speedSmoothingFactor] - * @param {Object|Function} [opts.query] - * @param {Object|Function} [opts.headers] - * @param {bool} [opts.withCredentials] - * @param {Function} [opts.preprocess] - * @param {string} [opts.method] - * @param {string|Function} [opts.testMethod] - * @param {string|Function} [opts.uploadMethod] - * @param {bool} [opts.prioritizeFirstAndLastChunk] - * @param {bool} [opts.allowDuplicateUploads] - * @param {string|Function} [opts.target] - * @param {number} [opts.maxChunkRetries] - * @param {number} [opts.chunkRetryInterval] - * @param {Array.} [opts.permanentErrors] - * @param {Array.} [opts.successStatuses] - * @param {Function} [opts.initFileFn] - * @param {Function} [opts.readFileFn] - * @param {Function} [opts.generateUniqueIdentifier] - * @constructor - */ - function Flow(opts) { - /** - * Supported by browser? - * @type {boolean} - */ - this.support = ( - typeof File !== 'undefined' && - typeof Blob !== 'undefined' && - typeof FileList !== 'undefined' && - ( - !!Blob.prototype.slice || !!Blob.prototype.webkitSlice || !!Blob.prototype.mozSlice || - false - ) // slicing files support - ); - - if (!this.support) { - return ; - } - - /** - * Check if directory upload is supported - * @type {boolean} - */ - this.supportDirectory = ( - /Chrome/.test(window.navigator.userAgent) || - /Firefox/.test(window.navigator.userAgent) || - /Edge/.test(window.navigator.userAgent) - ); - - /** - * List of FlowFile objects - * @type {Array.} - */ - this.files = []; - - /** - * Default options for flow.js - * @type {Object} - */ - this.defaults = { - chunkSize: 1024 * 1024, - forceChunkSize: false, - simultaneousUploads: 3, - singleFile: false, - fileParameterName: 'file', - progressCallbacksInterval: 500, - speedSmoothingFactor: 0.1, - query: {}, - headers: {}, - withCredentials: false, - preprocess: null, - changeRawDataBeforeSend: null, - method: 'multipart', - testMethod: 'GET', - uploadMethod: 'POST', - prioritizeFirstAndLastChunk: false, - allowDuplicateUploads: false, - target: '/', - testChunks: true, - generateUniqueIdentifier: null, - maxChunkRetries: 0, - chunkRetryInterval: null, - permanentErrors: [404, 413, 415, 500, 501], - successStatuses: [200, 201, 202], - onDropStopPropagation: false, - initFileFn: null, - readFileFn: webAPIFileRead - }; - - /** - * Current options - * @type {Object} - */ - this.opts = {}; - - /** - * List of events: - * key stands for event name - * value array list of callbacks - * @type {} - */ - this.events = {}; - - var $ = this; - - /** - * On drop event - * @function - * @param {MouseEvent} event - */ - this.onDrop = function (event) { - if ($.opts.onDropStopPropagation) { - event.stopPropagation(); - } - event.preventDefault(); - var dataTransfer = event.dataTransfer; - if (dataTransfer.items && dataTransfer.items[0] && - dataTransfer.items[0].webkitGetAsEntry) { - $.webkitReadDataTransfer(event); - } else { - $.addFiles(dataTransfer.files, event); - } - }; - - /** - * Prevent default - * @function - * @param {MouseEvent} event - */ - this.preventEvent = function (event) { - event.preventDefault(); - }; - - - /** - * Current options - * @type {Object} - */ - this.opts = Flow.extend({}, this.defaults, opts || {}); - - } - - Flow.prototype = { - /** - * Set a callback for an event, possible events: - * fileSuccess(file), fileProgress(file), fileAdded(file, event), - * fileRemoved(file), fileRetry(file), fileError(file, message), - * complete(), progress(), error(message, file), pause() - * @function - * @param {string} event - * @param {Function} callback - */ - on: function (event, callback) { - event = event.toLowerCase(); - if (!this.events.hasOwnProperty(event)) { - this.events[event] = []; - } - this.events[event].push(callback); - }, - - /** - * Remove event callback - * @function - * @param {string} [event] removes all events if not specified - * @param {Function} [fn] removes all callbacks of event if not specified - */ - off: function (event, fn) { - if (event !== undefined) { - event = event.toLowerCase(); - if (fn !== undefined) { - if (this.events.hasOwnProperty(event)) { - arrayRemove(this.events[event], fn); - } - } else { - delete this.events[event]; - } - } else { - this.events = {}; - } - }, - - /** - * Fire an event - * @function - * @param {string} event event name - * @param {...} args arguments of a callback - * @return {bool} value is false if at least one of the event handlers which handled this event - * returned false. Otherwise it returns true. - */ - fire: function (event, args) { - // `arguments` is an object, not array, in FF, so: - args = Array.prototype.slice.call(arguments); - event = event.toLowerCase(); - var preventDefault = false; - if (this.events.hasOwnProperty(event)) { - each(this.events[event], function (callback) { - preventDefault = callback.apply(this, args.slice(1)) === false || preventDefault; - }, this); - } - if (event != 'catchall') { - args.unshift('catchAll'); - preventDefault = this.fire.apply(this, args) === false || preventDefault; - } - return !preventDefault; - }, - - /** - * Read webkit dataTransfer object - * @param event - */ - webkitReadDataTransfer: function (event) { - var $ = this; - var queue = event.dataTransfer.items.length; - var files = []; - each(event.dataTransfer.items, function (item) { - var entry = item.webkitGetAsEntry(); - if (!entry) { - decrement(); - return ; - } - if (entry.isFile) { - // due to a bug in Chrome's File System API impl - #149735 - fileReadSuccess(item.getAsFile(), entry.fullPath); - } else { - readDirectory(entry.createReader()); - } - }); - function readDirectory(reader) { - reader.readEntries(function (entries) { - if (entries.length) { - queue += entries.length; - each(entries, function(entry) { - if (entry.isFile) { - var fullPath = entry.fullPath; - entry.file(function (file) { - fileReadSuccess(file, fullPath); - }, readError); - } else if (entry.isDirectory) { - readDirectory(entry.createReader()); - } - }); - readDirectory(reader); - } else { - decrement(); - } - }, readError); - } - function fileReadSuccess(file, fullPath) { - // relative path should not start with "/" - file.relativePath = fullPath.substring(1); - files.push(file); - decrement(); - } - function readError(fileError) { - decrement(); - throw fileError; - } - function decrement() { - if (--queue == 0) { - $.addFiles(files, event); - } - } - }, - - /** - * Generate unique identifier for a file - * @function - * @param {FlowFile} file - * @returns {string} - */ - generateUniqueIdentifier: function (file) { - var custom = this.opts.generateUniqueIdentifier; - if (typeof custom === 'function') { - return custom(file); - } - // Some confusion in different versions of Firefox - var relativePath = file.relativePath || file.webkitRelativePath || file.fileName || file.name; - return file.size + '-' + relativePath.replace(/[^0-9a-zA-Z_-]/img, ''); - }, - - /** - * Upload next chunk from the queue - * @function - * @returns {boolean} - * @private - */ - uploadNextChunk: function (preventEvents) { - // In some cases (such as videos) it's really handy to upload the first - // and last chunk of a file quickly; this let's the server check the file's - // metadata and determine if there's even a point in continuing. - var found = false; - if (this.opts.prioritizeFirstAndLastChunk) { - each(this.files, function (file) { - if (!file.paused && file.chunks.length && - file.chunks[0].status() === 'pending') { - file.chunks[0].send(); - found = true; - return false; - } - if (!file.paused && file.chunks.length > 1 && - file.chunks[file.chunks.length - 1].status() === 'pending') { - file.chunks[file.chunks.length - 1].send(); - found = true; - return false; - } - }); - if (found) { - return found; - } - } - - // Now, simply look for the next, best thing to upload - each(this.files, function (file) { - if (!file.paused) { - each(file.chunks, function (chunk) { - if (chunk.status() === 'pending') { - chunk.send(); - found = true; - return false; - } - }); - } - if (found) { - return false; - } - }); - if (found) { - return true; - } - - // The are no more outstanding chunks to upload, check is everything is done - var outstanding = false; - each(this.files, function (file) { - if (!file.isComplete()) { - outstanding = true; - return false; - } - }); - if (!outstanding && !preventEvents) { - // All chunks have been uploaded, complete - async(function () { - this.fire('complete'); - }, this); - } - return false; - }, - - - /** - * Assign a browse action to one or more DOM nodes. - * @function - * @param {Element|Array.} domNodes - * @param {boolean} isDirectory Pass in true to allow directories to - * @param {boolean} singleFile prevent multi file upload - * @param {Object} attributes set custom attributes: - * http://www.w3.org/TR/html-markup/input.file.html#input.file-attributes - * eg: accept: 'image/*' - * be selected (Chrome only). - */ - assignBrowse: function (domNodes, isDirectory, singleFile, attributes) { - if (domNodes instanceof Element) { - domNodes = [domNodes]; - } - - each(domNodes, function (domNode) { - var input; - if (domNode.tagName === 'INPUT' && domNode.type === 'file') { - input = domNode; - } else { - input = document.createElement('input'); - input.setAttribute('type', 'file'); - // display:none - not working in opera 12 - extend(input.style, { - visibility: 'hidden', - position: 'absolute', - width: '1px', - height: '1px' - }); - // for opera 12 browser, input must be assigned to a document - domNode.appendChild(input); - // https://developer.mozilla.org/en/using_files_from_web_applications) - // event listener is executed two times - // first one - original mouse click event - // second - input.click(), input is inside domNode - domNode.addEventListener('click', function() { - input.click(); - }, false); - } - if (!this.opts.singleFile && !singleFile) { - input.setAttribute('multiple', 'multiple'); - } - if (isDirectory) { - input.setAttribute('webkitdirectory', 'webkitdirectory'); - } - each(attributes, function (value, key) { - input.setAttribute(key, value); - }); - // When new files are added, simply append them to the overall list - var $ = this; - input.addEventListener('change', function (e) { - if (e.target.value) { - $.addFiles(e.target.files, e); - e.target.value = ''; - } - }, false); - }, this); - }, - - /** - * Assign one or more DOM nodes as a drop target. - * @function - * @param {Element|Array.} domNodes - */ - assignDrop: function (domNodes) { - if (typeof domNodes.length === 'undefined') { - domNodes = [domNodes]; - } - each(domNodes, function (domNode) { - domNode.addEventListener('dragover', this.preventEvent, false); - domNode.addEventListener('dragenter', this.preventEvent, false); - domNode.addEventListener('drop', this.onDrop, false); - }, this); - }, - - /** - * Un-assign drop event from DOM nodes - * @function - * @param domNodes - */ - unAssignDrop: function (domNodes) { - if (typeof domNodes.length === 'undefined') { - domNodes = [domNodes]; - } - each(domNodes, function (domNode) { - domNode.removeEventListener('dragover', this.preventEvent); - domNode.removeEventListener('dragenter', this.preventEvent); - domNode.removeEventListener('drop', this.onDrop); - }, this); - }, - - /** - * Returns a boolean indicating whether or not the instance is currently - * uploading anything. - * @function - * @returns {boolean} - */ - isUploading: function () { - var uploading = false; - each(this.files, function (file) { - if (file.isUploading()) { - uploading = true; - return false; - } - }); - return uploading; - }, - - /** - * should upload next chunk - * @function - * @returns {boolean|number} - */ - _shouldUploadNext: function () { - var num = 0; - var should = true; - var simultaneousUploads = this.opts.simultaneousUploads; - each(this.files, function (file) { - each(file.chunks, function(chunk) { - if (chunk.status() === 'uploading') { - num++; - if (num >= simultaneousUploads) { - should = false; - return false; - } - } - }); - }); - // if should is true then return uploading chunks's length - return should && num; - }, - - /** - * Start or resume uploading. - * @function - */ - upload: function () { - // Make sure we don't start too many uploads at once - var ret = this._shouldUploadNext(); - if (ret === false) { - return; - } - // Kick off the queue - this.fire('uploadStart'); - var started = false; - for (var num = 1; num <= this.opts.simultaneousUploads - ret; num++) { - started = this.uploadNextChunk(true) || started; - } - if (!started) { - async(function () { - this.fire('complete'); - }, this); - } - }, - - /** - * Resume uploading. - * @function - */ - resume: function () { - each(this.files, function (file) { - if (!file.isComplete()) { - file.resume(); - } - }); - }, - - /** - * Pause uploading. - * @function - */ - pause: function () { - each(this.files, function (file) { - file.pause(); - }); - }, - - /** - * Cancel upload of all FlowFile objects and remove them from the list. - * @function - */ - cancel: function () { - for (var i = this.files.length - 1; i >= 0; i--) { - this.files[i].cancel(); - } - }, - - /** - * Returns a number between 0 and 1 indicating the current upload progress - * of all files. - * @function - * @returns {number} - */ - progress: function () { - var totalDone = 0; - var totalSize = 0; - // Resume all chunks currently being uploaded - each(this.files, function (file) { - totalDone += file.progress() * file.size; - totalSize += file.size; - }); - return totalSize > 0 ? totalDone / totalSize : 0; - }, - - /** - * Add a HTML5 File object to the list of files. - * @function - * @param {File} file - * @param {Event} [event] event is optional - */ - addFile: function (file, event) { - this.addFiles([file], event); - }, - - /** - * Add a HTML5 File object to the list of files. - * @function - * @param {FileList|Array} fileList - * @param {Event} [event] event is optional - */ - addFiles: function (fileList, event) { - var files = []; - each(fileList, function (file) { - // https://github.com/flowjs/flow.js/issues/55 - if ((!ie10plus || ie10plus && file.size > 0) && !(file.size % 4096 === 0 && (file.name === '.' || file.fileName === '.'))) { - var uniqueIdentifier = this.generateUniqueIdentifier(file); - if (this.opts.allowDuplicateUploads || !this.getFromUniqueIdentifier(uniqueIdentifier)) { - var f = new FlowFile(this, file, uniqueIdentifier); - if (this.fire('fileAdded', f, event)) { - files.push(f); - } - } - } - }, this); - if (this.fire('filesAdded', files, event)) { - each(files, function (file) { - if (this.opts.singleFile && this.files.length > 0) { - this.removeFile(this.files[0]); - } - this.files.push(file); - }, this); - this.fire('filesSubmitted', files, event); - } - }, - - - /** - * Cancel upload of a specific FlowFile object from the list. - * @function - * @param {FlowFile} file - */ - removeFile: function (file) { - for (var i = this.files.length - 1; i >= 0; i--) { - if (this.files[i] === file) { - this.files.splice(i, 1); - file.abort(); - this.fire('fileRemoved', file); - } - } - }, - - /** - * Look up a FlowFile object by its unique identifier. - * @function - * @param {string} uniqueIdentifier - * @returns {boolean|FlowFile} false if file was not found - */ - getFromUniqueIdentifier: function (uniqueIdentifier) { - var ret = false; - each(this.files, function (file) { - if (file.uniqueIdentifier === uniqueIdentifier) { - ret = file; - } - }); - return ret; - }, - - /** - * Returns the total size of all files in bytes. - * @function - * @returns {number} - */ - getSize: function () { - var totalSize = 0; - each(this.files, function (file) { - totalSize += file.size; - }); - return totalSize; - }, - - /** - * Returns the total size uploaded of all files in bytes. - * @function - * @returns {number} - */ - sizeUploaded: function () { - var size = 0; - each(this.files, function (file) { - size += file.sizeUploaded(); - }); - return size; - }, - - /** - * Returns remaining time to upload all files in seconds. Accuracy is based on average speed. - * If speed is zero, time remaining will be equal to positive infinity `Number.POSITIVE_INFINITY` - * @function - * @returns {number} - */ - timeRemaining: function () { - var sizeDelta = 0; - var averageSpeed = 0; - each(this.files, function (file) { - if (!file.paused && !file.error) { - sizeDelta += file.size - file.sizeUploaded(); - averageSpeed += file.averageSpeed; - } - }); - if (sizeDelta && !averageSpeed) { - return Number.POSITIVE_INFINITY; - } - if (!sizeDelta && !averageSpeed) { - return 0; - } - return Math.floor(sizeDelta / averageSpeed); - } - }; - - - - - - - /** - * FlowFile class - * @name FlowFile - * @param {Flow} flowObj - * @param {File} file - * @param {string} uniqueIdentifier - * @constructor - */ - function FlowFile(flowObj, file, uniqueIdentifier) { - - /** - * Reference to parent Flow instance - * @type {Flow} - */ - this.flowObj = flowObj; - - /** - * Used to store the bytes read - * @type {Blob|string} - */ - this.bytes = null; - - /** - * Reference to file - * @type {File} - */ - this.file = file; - - /** - * File name. Some confusion in different versions of Firefox - * @type {string} - */ - this.name = file.fileName || file.name; - - /** - * File size - * @type {number} - */ - this.size = file.size; - - /** - * Relative file path - * @type {string} - */ - this.relativePath = file.relativePath || file.webkitRelativePath || this.name; - - /** - * File unique identifier - * @type {string} - */ - this.uniqueIdentifier = (uniqueIdentifier === undefined ? flowObj.generateUniqueIdentifier(file) : uniqueIdentifier); - - /** - * Size of Each Chunk - * @type {number} - */ - this.chunkSize = 0; - - /** - * List of chunks - * @type {Array.} - */ - this.chunks = []; - - /** - * Indicated if file is paused - * @type {boolean} - */ - this.paused = false; - - /** - * Indicated if file has encountered an error - * @type {boolean} - */ - this.error = false; - - /** - * Average upload speed - * @type {number} - */ - this.averageSpeed = 0; - - /** - * Current upload speed - * @type {number} - */ - this.currentSpeed = 0; - - /** - * Date then progress was called last time - * @type {number} - * @private - */ - this._lastProgressCallback = Date.now(); - - /** - * Previously uploaded file size - * @type {number} - * @private - */ - this._prevUploadedSize = 0; - - /** - * Holds previous progress - * @type {number} - * @private - */ - this._prevProgress = 0; - - this.bootstrap(); - } - - FlowFile.prototype = { - /** - * Update speed parameters - * @link http://stackoverflow.com/questions/2779600/how-to-estimate-download-time-remaining-accurately - * @function - */ - measureSpeed: function () { - var timeSpan = Date.now() - this._lastProgressCallback; - if (!timeSpan) { - return ; - } - var smoothingFactor = this.flowObj.opts.speedSmoothingFactor; - var uploaded = this.sizeUploaded(); - // Prevent negative upload speed after file upload resume - this.currentSpeed = Math.max((uploaded - this._prevUploadedSize) / timeSpan * 1000, 0); - this.averageSpeed = smoothingFactor * this.currentSpeed + (1 - smoothingFactor) * this.averageSpeed; - this._prevUploadedSize = uploaded; - }, - - /** - * For internal usage only. - * Callback when something happens within the chunk. - * @function - * @param {FlowChunk} chunk - * @param {string} event can be 'progress', 'success', 'error' or 'retry' - * @param {string} [message] - */ - chunkEvent: function (chunk, event, message) { - switch (event) { - case 'progress': - if (Date.now() - this._lastProgressCallback < - this.flowObj.opts.progressCallbacksInterval) { - break; - } - this.measureSpeed(); - this.flowObj.fire('fileProgress', this, chunk); - this.flowObj.fire('progress'); - this._lastProgressCallback = Date.now(); - break; - case 'error': - this.error = true; - this.abort(true); - this.flowObj.fire('fileError', this, message, chunk); - this.flowObj.fire('error', message, this, chunk); - break; - case 'success': - if (this.error) { - return; - } - this.measureSpeed(); - this.flowObj.fire('fileProgress', this, chunk); - this.flowObj.fire('progress'); - this._lastProgressCallback = Date.now(); - if (this.isComplete()) { - this.currentSpeed = 0; - this.averageSpeed = 0; - this.flowObj.fire('fileSuccess', this, message, chunk); - } - break; - case 'retry': - this.flowObj.fire('fileRetry', this, chunk); - break; - } - }, - - /** - * Pause file upload - * @function - */ - pause: function() { - this.paused = true; - this.abort(); - }, - - /** - * Resume file upload - * @function - */ - resume: function() { - this.paused = false; - this.flowObj.upload(); - }, - - /** - * Abort current upload - * @function - */ - abort: function (reset) { - this.currentSpeed = 0; - this.averageSpeed = 0; - var chunks = this.chunks; - if (reset) { - this.chunks = []; - } - each(chunks, function (c) { - if (c.status() === 'uploading') { - c.abort(); - this.flowObj.uploadNextChunk(); - } - }, this); - }, - - /** - * Cancel current upload and remove from a list - * @function - */ - cancel: function () { - this.flowObj.removeFile(this); - }, - - /** - * Retry aborted file upload - * @function - */ - retry: function () { - this.bootstrap(); - this.flowObj.upload(); - }, - - /** - * Clear current chunks and slice file again - * @function - */ - bootstrap: function () { - if (typeof this.flowObj.opts.initFileFn === "function") { - this.flowObj.opts.initFileFn(this); - } - - this.abort(true); - this.error = false; - // Rebuild stack of chunks from file - this._prevProgress = 0; - var round = this.flowObj.opts.forceChunkSize ? Math.ceil : Math.floor; - this.chunkSize = evalOpts(this.flowObj.opts.chunkSize, this); - var chunks = Math.max( - round(this.size / this.chunkSize), 1 - ); - for (var offset = 0; offset < chunks; offset++) { - this.chunks.push( - new FlowChunk(this.flowObj, this, offset) - ); - } - }, - - /** - * Get current upload progress status - * @function - * @returns {number} from 0 to 1 - */ - progress: function () { - if (this.error) { - return 1; - } - if (this.chunks.length === 1) { - this._prevProgress = Math.max(this._prevProgress, this.chunks[0].progress()); - return this._prevProgress; - } - // Sum up progress across everything - var bytesLoaded = 0; - each(this.chunks, function (c) { - // get chunk progress relative to entire file - bytesLoaded += c.progress() * (c.endByte - c.startByte); - }); - var percent = bytesLoaded / this.size; - // We don't want to lose percentages when an upload is paused - this._prevProgress = Math.max(this._prevProgress, percent > 0.9999 ? 1 : percent); - return this._prevProgress; - }, - - /** - * Indicates if file is being uploaded at the moment - * @function - * @returns {boolean} - */ - isUploading: function () { - var uploading = false; - each(this.chunks, function (chunk) { - if (chunk.status() === 'uploading') { - uploading = true; - return false; - } - }); - return uploading; - }, - - /** - * Indicates if file is has finished uploading and received a response - * @function - * @returns {boolean} - */ - isComplete: function () { - var outstanding = false; - each(this.chunks, function (chunk) { - var status = chunk.status(); - if (status === 'pending' || status === 'uploading' || status === 'reading' || chunk.preprocessState === 1 || chunk.readState === 1) { - outstanding = true; - return false; - } - }); - return !outstanding; - }, - - /** - * Count total size uploaded - * @function - * @returns {number} - */ - sizeUploaded: function () { - var size = 0; - each(this.chunks, function (chunk) { - size += chunk.sizeUploaded(); - }); - return size; - }, - - /** - * Returns remaining time to finish upload file in seconds. Accuracy is based on average speed. - * If speed is zero, time remaining will be equal to positive infinity `Number.POSITIVE_INFINITY` - * @function - * @returns {number} - */ - timeRemaining: function () { - if (this.paused || this.error) { - return 0; - } - var delta = this.size - this.sizeUploaded(); - if (delta && !this.averageSpeed) { - return Number.POSITIVE_INFINITY; - } - if (!delta && !this.averageSpeed) { - return 0; - } - return Math.floor(delta / this.averageSpeed); - }, - - /** - * Get file type - * @function - * @returns {string} - */ - getType: function () { - return this.file.type && this.file.type.split('/')[1]; - }, - - /** - * Get file extension - * @function - * @returns {string} - */ - getExtension: function () { - return this.name.substr((~-this.name.lastIndexOf(".") >>> 0) + 2).toLowerCase(); - } - }; - - /** - * Default read function using the webAPI - * - * @function webAPIFileRead(fileObj, startByte, endByte, fileType, chunk) - * - */ - function webAPIFileRead(fileObj, startByte, endByte, fileType, chunk) { - var function_name = 'slice'; - - if (fileObj.file.slice) - function_name = 'slice'; - else if (fileObj.file.mozSlice) - function_name = 'mozSlice'; - else if (fileObj.file.webkitSlice) - function_name = 'webkitSlice'; - - chunk.readFinished(fileObj.file[function_name](startByte, endByte, fileType)); - } - - - /** - * Class for storing a single chunk - * @name FlowChunk - * @param {Flow} flowObj - * @param {FlowFile} fileObj - * @param {number} offset - * @constructor - */ - function FlowChunk(flowObj, fileObj, offset) { - - /** - * Reference to parent flow object - * @type {Flow} - */ - this.flowObj = flowObj; - - /** - * Reference to parent FlowFile object - * @type {FlowFile} - */ - this.fileObj = fileObj; - - /** - * File offset - * @type {number} - */ - this.offset = offset; - - /** - * Indicates if chunk existence was checked on the server - * @type {boolean} - */ - this.tested = false; - - /** - * Number of retries performed - * @type {number} - */ - this.retries = 0; - - /** - * Pending retry - * @type {boolean} - */ - this.pendingRetry = false; - - /** - * Preprocess state - * @type {number} 0 = unprocessed, 1 = processing, 2 = finished - */ - this.preprocessState = 0; - - /** - * Read state - * @type {number} 0 = not read, 1 = reading, 2 = finished - */ - this.readState = 0; - - - /** - * Bytes transferred from total request size - * @type {number} - */ - this.loaded = 0; - - /** - * Total request size - * @type {number} - */ - this.total = 0; - - /** - * Size of a chunk - * @type {number} - */ - this.chunkSize = this.fileObj.chunkSize; - - /** - * Chunk start byte in a file - * @type {number} - */ - this.startByte = this.offset * this.chunkSize; - - /** - * A specific filename for this chunk which otherwise default to the main name - * @type {string} - */ - this.filename = null; - - /** - * Compute the endbyte in a file - * - */ - this.computeEndByte = function() { - var endByte = Math.min(this.fileObj.size, (this.offset + 1) * this.chunkSize); - if (this.fileObj.size - endByte < this.chunkSize && !this.flowObj.opts.forceChunkSize) { - // The last chunk will be bigger than the chunk size, - // but less than 2 * this.chunkSize - endByte = this.fileObj.size; - } - return endByte; - } - - /** - * Chunk end byte in a file - * @type {number} - */ - this.endByte = this.computeEndByte(); - - /** - * XMLHttpRequest - * @type {XMLHttpRequest} - */ - this.xhr = null; - - var $ = this; - - /** - * Send chunk event - * @param event - * @param {...} args arguments of a callback - */ - this.event = function (event, args) { - args = Array.prototype.slice.call(arguments); - args.unshift($); - $.fileObj.chunkEvent.apply($.fileObj, args); - }; - /** - * Catch progress event - * @param {ProgressEvent} event - */ - this.progressHandler = function(event) { - if (event.lengthComputable) { - $.loaded = event.loaded ; - $.total = event.total; - } - $.event('progress', event); - }; - - /** - * Catch test event - * @param {Event} event - */ - this.testHandler = function(event) { - var status = $.status(true); - if (status === 'error') { - $.event(status, $.message()); - $.flowObj.uploadNextChunk(); - } else if (status === 'success') { - $.tested = true; - $.event(status, $.message()); - $.flowObj.uploadNextChunk(); - } else if (!$.fileObj.paused) { - // Error might be caused by file pause method - // Chunks does not exist on the server side - $.tested = true; - $.send(); - } - }; - - /** - * Upload has stopped - * @param {Event} event - */ - this.doneHandler = function(event) { - var status = $.status(); - if (status === 'success' || status === 'error') { - delete this.data; - $.event(status, $.message()); - $.flowObj.uploadNextChunk(); - } else if (!$.fileObj.paused) { - $.event('retry', $.message()); - $.pendingRetry = true; - $.abort(); - $.retries++; - var retryInterval = $.flowObj.opts.chunkRetryInterval; - if (retryInterval !== null) { - setTimeout(function () { - $.send(); - }, retryInterval); - } else { - $.send(); - } - } - }; - } - - FlowChunk.prototype = { - /** - * Get params for a request - * @function - */ - getParams: function () { - return { - flowChunkNumber: this.offset + 1, - flowChunkSize: this.chunkSize, - flowCurrentChunkSize: this.endByte - this.startByte, - flowTotalSize: this.fileObj.size, - flowIdentifier: this.fileObj.uniqueIdentifier, - flowFilename: this.fileObj.name, - flowRelativePath: this.fileObj.relativePath, - flowTotalChunks: this.fileObj.chunks.length - }; - }, - - /** - * Get target option with query params - * @function - * @param params - * @returns {string} - */ - getTarget: function(target, params){ - if (params.length == 0) { - return target; - } - - if(target.indexOf('?') < 0) { - target += '?'; - } else { - target += '&'; - } - return target + params.join('&'); - }, - - /** - * Makes a GET request without any data to see if the chunk has already - * been uploaded in a previous session - * @function - */ - test: function () { - // Set up request and listen for event - this.xhr = new XMLHttpRequest(); - this.xhr.addEventListener("load", this.testHandler, false); - this.xhr.addEventListener("error", this.testHandler, false); - var testMethod = evalOpts(this.flowObj.opts.testMethod, this.fileObj, this); - var data = this.prepareXhrRequest(testMethod, true); - this.xhr.send(data); - }, - - /** - * Finish preprocess state - * @function - */ - preprocessFinished: function () { - // Re-compute the endByte after the preprocess function to allow an - // implementer of preprocess to set the fileObj size - this.endByte = this.computeEndByte(); - - this.preprocessState = 2; - this.send(); - }, - - /** - * Finish read state - * @function - */ - readFinished: function (bytes) { - this.readState = 2; - this.bytes = bytes; - this.send(); - }, - - - /** - * Uploads the actual data in a POST call - * @function - */ - send: function () { - var preprocess = this.flowObj.opts.preprocess; - var read = this.flowObj.opts.readFileFn; - if (typeof preprocess === 'function') { - switch (this.preprocessState) { - case 0: - this.preprocessState = 1; - preprocess(this); - return; - case 1: - return; - } - } - switch (this.readState) { - case 0: - this.readState = 1; - read(this.fileObj, this.startByte, this.endByte, this.fileObj.file.type, this); - return; - case 1: - return; - } - if (this.flowObj.opts.testChunks && !this.tested) { - this.test(); - return; - } - - this.loaded = 0; - this.total = 0; - this.pendingRetry = false; - - // Set up request and listen for event - this.xhr = new XMLHttpRequest(); - this.xhr.upload.addEventListener('progress', this.progressHandler, false); - this.xhr.addEventListener("load", this.doneHandler, false); - this.xhr.addEventListener("error", this.doneHandler, false); - - var uploadMethod = evalOpts(this.flowObj.opts.uploadMethod, this.fileObj, this); - var data = this.prepareXhrRequest(uploadMethod, false, this.flowObj.opts.method, this.bytes); - var changeRawDataBeforeSend = this.flowObj.opts.changeRawDataBeforeSend; - if (typeof changeRawDataBeforeSend === 'function') { - data = changeRawDataBeforeSend(this, data); - } - this.xhr.send(data); - }, - - /** - * Abort current xhr request - * @function - */ - abort: function () { - // Abort and reset - var xhr = this.xhr; - this.xhr = null; - if (xhr) { - xhr.abort(); - } - }, - - /** - * Retrieve current chunk upload status - * @function - * @returns {string} 'pending', 'uploading', 'success', 'error' - */ - status: function (isTest) { - if (this.readState === 1) { - return 'reading'; - } else if (this.pendingRetry || this.preprocessState === 1) { - // if pending retry then that's effectively the same as actively uploading, - // there might just be a slight delay before the retry starts - return 'uploading'; - } else if (!this.xhr) { - return 'pending'; - } else if (this.xhr.readyState < 4) { - // Status is really 'OPENED', 'HEADERS_RECEIVED' - // or 'LOADING' - meaning that stuff is happening - return 'uploading'; - } else { - if (this.flowObj.opts.successStatuses.indexOf(this.xhr.status) > -1) { - // HTTP 200, perfect - // HTTP 202 Accepted - The request has been accepted for processing, but the processing has not been completed. - return 'success'; - } else if (this.flowObj.opts.permanentErrors.indexOf(this.xhr.status) > -1 || - !isTest && this.retries >= this.flowObj.opts.maxChunkRetries) { - // HTTP 413/415/500/501, permanent error - return 'error'; - } else { - // this should never happen, but we'll reset and queue a retry - // a likely case for this would be 503 service unavailable - this.abort(); - return 'pending'; - } - } - }, - - /** - * Get response from xhr request - * @function - * @returns {String} - */ - message: function () { - return this.xhr ? this.xhr.responseText : ''; - }, - - /** - * Get upload progress - * @function - * @returns {number} - */ - progress: function () { - if (this.pendingRetry) { - return 0; - } - var s = this.status(); - if (s === 'success' || s === 'error') { - return 1; - } else if (s === 'pending') { - return 0; - } else { - return this.total > 0 ? this.loaded / this.total : 0; - } - }, - - /** - * Count total size uploaded - * @function - * @returns {number} - */ - sizeUploaded: function () { - var size = this.endByte - this.startByte; - // can't return only chunk.loaded value, because it is bigger than chunk size - if (this.status() !== 'success') { - size = this.progress() * size; - } - return size; - }, - - /** - * Prepare Xhr request. Set query, headers and data - * @param {string} method GET or POST - * @param {bool} isTest is this a test request - * @param {string} [paramsMethod] octet or form - * @param {Blob} [blob] to send - * @returns {FormData|Blob|Null} data to send - */ - prepareXhrRequest: function(method, isTest, paramsMethod, blob) { - // Add data from the query options - var query = evalOpts(this.flowObj.opts.query, this.fileObj, this, isTest); - query = extend(query || {}, this.getParams()); - - var target = evalOpts(this.flowObj.opts.target, this.fileObj, this, isTest); - var data = null; - if (method === 'GET' || paramsMethod === 'octet') { - // Add data from the query options - var params = []; - each(query, function (v, k) { - params.push([encodeURIComponent(k), encodeURIComponent(v)].join('=')); - }); - target = this.getTarget(target, params); - data = blob || null; - } else { - // Add data from the query options - data = new FormData(); - each(query, function (v, k) { - data.append(k, v); - }); - if (typeof blob !== "undefined") { - data.append(this.flowObj.opts.fileParameterName, blob, this.filename || this.fileObj.file.name); - } - } - - this.xhr.open(method, target, true); - this.xhr.withCredentials = this.flowObj.opts.withCredentials; - - // Add data from header options - each(evalOpts(this.flowObj.opts.headers, this.fileObj, this, isTest), function (v, k) { - this.xhr.setRequestHeader(k, v); - }, this); - - return data; - } - }; - - /** - * Remove value from array - * @param array - * @param value - */ - function arrayRemove(array, value) { - var index = array.indexOf(value); - if (index > -1) { - array.splice(index, 1); - } - } - - /** - * If option is a function, evaluate it with given params - * @param {*} data - * @param {...} args arguments of a callback - * @returns {*} - */ - function evalOpts(data, args) { - if (typeof data === "function") { - // `arguments` is an object, not array, in FF, so: - args = Array.prototype.slice.call(arguments); - data = data.apply(null, args.slice(1)); - } - return data; - } - Flow.evalOpts = evalOpts; - - /** - * Execute function asynchronously - * @param fn - * @param context - */ - function async(fn, context) { - setTimeout(fn.bind(context), 0); - } - - /** - * Extends the destination object `dst` by copying all of the properties from - * the `src` object(s) to `dst`. You can specify multiple `src` objects. - * @function - * @param {Object} dst Destination object. - * @param {...Object} src Source object(s). - * @returns {Object} Reference to `dst`. - */ - function extend(dst, src) { - each(arguments, function(obj) { - if (obj !== dst) { - each(obj, function(value, key){ - dst[key] = value; - }); - } - }); - return dst; - } - Flow.extend = extend; - - /** - * Iterate each element of an object - * @function - * @param {Array|Object} obj object or an array to iterate - * @param {Function} callback first argument is a value and second is a key. - * @param {Object=} context Object to become context (`this`) for the iterator function. - */ - function each(obj, callback, context) { - if (!obj) { - return ; - } - var key; - // Is Array? - // Array.isArray won't work, not only arrays can be iterated by index https://github.com/flowjs/ng-flow/issues/236# - if (typeof(obj.length) !== 'undefined') { - for (key = 0; key < obj.length; key++) { - if (callback.call(context, obj[key], key) === false) { - return ; - } - } - } else { - for (key in obj) { - if (obj.hasOwnProperty(key) && callback.call(context, obj[key], key) === false) { - return ; - } - } - } - } - Flow.each = each; - - /** - * FlowFile constructor - * @type {FlowFile} - */ - Flow.FlowFile = FlowFile; - - /** - * FlowFile constructor - * @type {FlowChunk} - */ - Flow.FlowChunk = FlowChunk; - - /** - * Library version - * @type {string} - */ - Flow.version = '<%= version %>'; - - if ( true && module && typeof module.exports === "object" ) { - // Expose Flow as module.exports in loaders that implement the Node - // module pattern (including browserify). Do not create the global, since - // the user will be storing it themselves locally, and globals are frowned - // upon in the Node module world. - module.exports = Flow; - } else { - // Otherwise expose Flow to the global object as usual - window.Flow = Flow; - - // Register as a named AMD module, since Flow can be concatenated with other - // files that may use define, but not via a proper concatenation script that - // understands anonymous AMD modules. A named AMD is safest and most robust - // way to register. Lowercase flow is used because AMD module names are - // derived from file names, and Flow is normally delivered in a lowercase - // file name. Do this after creating the global so that if an AMD module wants - // to call noConflict to hide this version of Flow, it will work. - if ( true ) { - !(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_RESULT__ = (function () { return Flow; }).apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), - __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); - } - } -})(typeof window !== 'undefined' && window, typeof document !== 'undefined' && document); - - -/***/ }), - -/***/ "./node_modules/@flowjs/ng-flow/dist/ng-flow.js": -/*!******************************************************!*\ - !*** ./node_modules/@flowjs/ng-flow/dist/ng-flow.js ***! - \******************************************************/ -/***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => { - -/* provided dependency */ var Flow = __webpack_require__(/*! @flowjs/flow.js */ "./node_modules/@flowjs/flow.js/src/flow.js"); -/** - * @description - * var app = angular.module('App', ['flow.provider'], function(flowFactoryProvider){ - * flowFactoryProvider.defaults = {target: '/'}; - * }); - * @name flowFactoryProvider - */ -angular.module('flow.provider', []) -.provider('flowFactory', function() { - 'use strict'; - /** - * Define the default properties for flow.js - * @name flowFactoryProvider.defaults - * @type {Object} - */ - this.defaults = {}; - - /** - * Flow, MaybeFlow or NotFlow - * @name flowFactoryProvider.factory - * @type {function} - * @return {Flow} - */ - this.factory = function (options) { - return new Flow(options); - }; - - /** - * Define the default events - * @name flowFactoryProvider.events - * @type {Array} - * @private - */ - this.events = []; - - /** - * Add default events - * @name flowFactoryProvider.on - * @function - * @param {string} event - * @param {Function} callback - */ - this.on = function (event, callback) { - this.events.push([event, callback]); - }; - - this.$get = function() { - var fn = this.factory; - var defaults = this.defaults; - var events = this.events; - return { - 'create': function(opts) { - // combine default options with global options and options - var flow = fn(angular.extend({}, defaults, opts)); - angular.forEach(events, function (event) { - flow.on(event[0], event[1]); - }); - return flow; - } - }; - }; -}); -angular.module('flow.init', ['flow.provider']) - .controller('flowCtrl', ['$scope', '$attrs', '$parse', 'flowFactory', - function ($scope, $attrs, $parse, flowFactory) { - - var options = angular.extend({}, $scope.$eval($attrs.flowInit)); - - // use existing flow object or create a new one - var flow = $scope.$eval($attrs.flowObject) || flowFactory.create(options); - - var catchAllHandler = function(eventName){ - var args = Array.prototype.slice.call(arguments); - args.shift(); - var event = $scope.$broadcast.apply($scope, ['flow::' + eventName, flow].concat(args)); - if ({ - 'progress':1, 'filesSubmitted':1, 'fileSuccess': 1, 'fileError': 1, 'complete': 1 - }[eventName]) { - $scope.$applyAsync(); - } - if (event.defaultPrevented) { - return false; - } - }; - - flow.on('catchAll', catchAllHandler); - $scope.$on('$destroy', function(){ - flow.off('catchAll', catchAllHandler); - }); - - $scope.$flow = flow; - - if ($attrs.hasOwnProperty('flowName')) { - $parse($attrs.flowName).assign($scope, flow); - $scope.$on('$destroy', function () { - $parse($attrs.flowName).assign($scope); - }); - } - }]) - .directive('flowInit', [function() { - return { - scope: true, - controller: 'flowCtrl' - }; - }]); -angular.module('flow.btn', ['flow.init']) -.directive('flowBtn', [function() { - return { - 'restrict': 'EA', - 'scope': false, - 'require': '^flowInit', - 'link': function(scope, element, attrs) { - var isDirectory = attrs.hasOwnProperty('flowDirectory'); - var isSingleFile = attrs.hasOwnProperty('flowSingleFile'); - var inputAttrs = attrs.hasOwnProperty('flowAttrs') && scope.$eval(attrs.flowAttrs); - scope.$flow.assignBrowse(element, isDirectory, isSingleFile, inputAttrs); - } - }; -}]); -angular.module('flow.dragEvents', ['flow.init']) -/** - * @name flowPreventDrop - * Prevent loading files then dropped on element - */ - .directive('flowPreventDrop', function() { - return { - 'scope': false, - 'link': function(scope, element, attrs) { - element.bind('drop dragover', function (event) { - event.preventDefault(); - }); - } - }; - }) -/** - * @name flowDragEnter - * executes `flowDragEnter` and `flowDragLeave` events - */ - .directive('flowDragEnter', ['$timeout', function($timeout) { - return { - 'scope': false, - 'link': function(scope, element, attrs) { - var promise; - var enter = false; - element.bind('dragover', function (event) { - if (!isFileDrag(event)) { - return ; - } - if (!enter) { - scope.$apply(attrs.flowDragEnter); - enter = true; - } - $timeout.cancel(promise); - event.preventDefault(); - }); - element.bind('dragleave drop', function (event) { - $timeout.cancel(promise); - promise = $timeout(function () { - scope.$eval(attrs.flowDragLeave); - promise = null; - enter = false; - }, 100); - }); - function isFileDrag(dragEvent) { - var fileDrag = false; - var dataTransfer = dragEvent.dataTransfer || dragEvent.originalEvent.dataTransfer; - angular.forEach(dataTransfer && dataTransfer.types, function(val) { - if (val === 'Files') { - fileDrag = true; - } - }); - return fileDrag; - } - } - }; - }]); - -angular.module('flow.drop', ['flow.init']) -.directive('flowDrop', function() { - return { - 'scope': false, - 'require': '^flowInit', - 'link': function(scope, element, attrs) { - if (attrs.flowDropEnabled) { - scope.$watch(attrs.flowDropEnabled, function (value) { - if (value) { - assignDrop(); - } else { - unAssignDrop(); - } - }); - } else { - assignDrop(); - } - function assignDrop() { - scope.$flow.assignDrop(element); - } - function unAssignDrop() { - scope.$flow.unAssignDrop(element); - } - } - }; -}); - -!function (angular) {'use strict'; - var module = angular.module('flow.events', ['flow.init']); - var events = { - fileSuccess: ['$file', '$message'], - fileProgress: ['$file'], - fileAdded: ['$file', '$event'], - filesAdded: ['$files', '$event'], - filesSubmitted: ['$files', '$event'], - fileRetry: ['$file'], - fileRemoved: ['$file'], - fileError: ['$file', '$message'], - uploadStart: [], - complete: [], - progress: [], - error: ['$message', '$file'] - }; - - angular.forEach(events, function (eventArgs, eventName) { - var name = 'flow' + capitaliseFirstLetter(eventName); - if (name == 'flowUploadStart') { - name = 'flowUploadStarted';// event alias - } - module.directive(name, [function() { - return { - require: '^flowInit', - controller: ['$scope', '$attrs', function ($scope, $attrs) { - $scope.$on('flow::' + eventName, function () { - var funcArgs = Array.prototype.slice.call(arguments); - var event = funcArgs.shift();// remove angular event - // remove flow object and ignore event if it is from parent directive - if ($scope.$flow !== funcArgs.shift()) { - return ; - } - var args = {}; - angular.forEach(eventArgs, function(value, key) { - args[value] = funcArgs[key]; - }); - if ($scope.$eval($attrs[name], args) === false) { - event.preventDefault(); - } - }); - }] - }; - }]); - }); - - function capitaliseFirstLetter(string) { - return string.charAt(0).toUpperCase() + string.slice(1); - } -}(angular); - -angular.module('flow.img', ['flow.init']) -.directive('flowImg', [function() { - return { - 'scope': false, - 'require': '^flowInit', - 'link': function(scope, element, attrs) { - var file = attrs.flowImg; - scope.$watch(file, function (file) { - if (!file) { - return ; - } - var fileReader = new FileReader(); - fileReader.readAsDataURL(file.file); - fileReader.onload = function (event) { - scope.$apply(function () { - attrs.$set('src', event.target.result); - }); - }; - }); - } - }; -}]); -angular.module('flow.transfers', ['flow.init']) -.directive('flowTransfers', [function() { - return { - 'scope': true, - 'require': '^flowInit', - 'link': function(scope) { - scope.transfers = scope.$flow.files; - } - }; -}]); -angular.module('flow', ['flow.provider', 'flow.init', 'flow.events', 'flow.btn', - 'flow.drop', 'flow.transfers', 'flow.img', 'flow.dragEvents']); - -/***/ }), - -/***/ "./node_modules/@uirouter/angularjs/lib-esm/angular.js": -/*!*************************************************************!*\ - !*** ./node_modules/@uirouter/angularjs/lib-esm/angular.js ***! - \*************************************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "ng": () => (/* binding */ ng) -/* harmony export */ }); -/* harmony import */ var angular__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! angular */ "./node_modules/angular/index-exposed.js"); -/* harmony import */ var angular__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(angular__WEBPACK_IMPORTED_MODULE_0__); -/** @publicapi @module ng1 */ /** */ - -/** @hidden */ var ng_from_global = angular; -/** @hidden */ var ng = angular__WEBPACK_IMPORTED_MODULE_0__ && angular__WEBPACK_IMPORTED_MODULE_0__.module ? angular__WEBPACK_IMPORTED_MODULE_0__ : ng_from_global; -//# sourceMappingURL=angular.js.map - -/***/ }), - -/***/ "./node_modules/@uirouter/angularjs/lib-esm/directives/stateDirectives.js": -/*!********************************************************************************!*\ - !*** ./node_modules/@uirouter/angularjs/lib-esm/directives/stateDirectives.js ***! - \********************************************************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _angular__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../angular */ "./node_modules/@uirouter/angularjs/lib-esm/angular.js"); -/* harmony import */ var _uirouter_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @uirouter/core */ "./node_modules/@uirouter/core/lib-esm/index.js"); -/* eslint-disable @typescript-eslint/no-empty-interface */ -/* eslint-disable prefer-const */ -/** - * # Angular 1 Directives - * - * These are the directives included in UI-Router for Angular 1. - * These directives are used in templates to create viewports and link/navigate to states. - * - * @preferred @publicapi @module directives - */ /** */ - - -/** @hidden */ -function parseStateRef(ref) { - var paramsOnly = ref.match(/^\s*({[^}]*})\s*$/); - if (paramsOnly) - ref = '(' + paramsOnly[1] + ')'; - var parsed = ref.replace(/\n/g, ' ').match(/^\s*([^(]*?)\s*(\((.*)\))?\s*$/); - if (!parsed || parsed.length !== 4) - throw new Error("Invalid state ref '" + ref + "'"); - return { state: parsed[1] || null, paramExpr: parsed[3] || null }; -} -/** @hidden */ -function stateContext(el) { - var $uiView = el.parent().inheritedData('$uiView'); - var path = (0,_uirouter_core__WEBPACK_IMPORTED_MODULE_1__.parse)('$cfg.path')($uiView); - return path ? (0,_uirouter_core__WEBPACK_IMPORTED_MODULE_1__.tail)(path).state.name : undefined; -} -/** @hidden */ -function processedDef($state, $element, def) { - var uiState = def.uiState || $state.current.name; - var uiStateOpts = (0,_uirouter_core__WEBPACK_IMPORTED_MODULE_1__.extend)(defaultOpts($element, $state), def.uiStateOpts || {}); - var href = $state.href(uiState, def.uiStateParams, uiStateOpts); - return { uiState: uiState, uiStateParams: def.uiStateParams, uiStateOpts: uiStateOpts, href: href }; -} -/** @hidden */ -function getTypeInfo(el) { - // SVGAElement does not use the href attribute, but rather the 'xlinkHref' attribute. - var isSvg = Object.prototype.toString.call(el.prop('href')) === '[object SVGAnimatedString]'; - var isForm = el[0].nodeName === 'FORM'; - return { - attr: isForm ? 'action' : isSvg ? 'xlink:href' : 'href', - isAnchor: el.prop('tagName').toUpperCase() === 'A', - clickable: !isForm, - }; -} -/** @hidden */ -function clickHook(el, $state, $timeout, type, getDef) { - return function (e) { - var button = e.which || e.button, target = getDef(); - if (!(button > 1 || e.ctrlKey || e.metaKey || e.shiftKey || e.altKey || el.attr('target'))) { - // HACK: This is to allow ng-clicks to be processed before the transition is initiated: - var transition_1 = $timeout(function () { - if (!el.attr('disabled')) { - $state.go(target.uiState, target.uiStateParams, target.uiStateOpts); - } - }); - e.preventDefault(); - // if the state has no URL, ignore one preventDefault from the directive. - var ignorePreventDefaultCount_1 = type.isAnchor && !target.href ? 1 : 0; - e.preventDefault = function () { - if (ignorePreventDefaultCount_1-- <= 0) - $timeout.cancel(transition_1); - }; - } - }; -} -/** @hidden */ -function defaultOpts(el, $state) { - return { - relative: stateContext(el) || $state.$current, - inherit: true, - source: 'sref', - }; -} -/** @hidden */ -function bindEvents(element, scope, hookFn, uiStateOpts) { - var events; - if (uiStateOpts) { - events = uiStateOpts.events; - } - if (!(0,_uirouter_core__WEBPACK_IMPORTED_MODULE_1__.isArray)(events)) { - events = ['click']; - } - var on = element.on ? 'on' : 'bind'; - for (var _i = 0, events_1 = events; _i < events_1.length; _i++) { - var event_1 = events_1[_i]; - element[on](event_1, hookFn); - } - scope.$on('$destroy', function () { - var off = element.off ? 'off' : 'unbind'; - for (var _i = 0, events_2 = events; _i < events_2.length; _i++) { - var event_2 = events_2[_i]; - element[off](event_2, hookFn); - } - }); -} -/** - * `ui-sref`: A directive for linking to a state - * - * A directive which links to a state (and optionally, parameters). - * When clicked, this directive activates the linked state with the supplied parameter values. - * - * ### Linked State - * The attribute value of the `ui-sref` is the name of the state to link to. - * - * #### Example: - * This will activate the `home` state when the link is clicked. - * ```html - * Home - * ``` - * - * ### Relative Links - * You can also use relative state paths within `ui-sref`, just like a relative path passed to `$state.go()` ([[StateService.go]]). - * You just need to be aware that the path is relative to the state that *created* the link. - * This allows a state to create a relative `ui-sref` which always targets the same destination. - * - * #### Example: - * Both these links are relative to the parent state, even when a child state is currently active. - * ```html - * child 1 state - * child 2 state - * ``` - * - * This link activates the parent state. - * ```html - * Return - * ``` - * - * ### hrefs - * If the linked state has a URL, the directive will automatically generate and - * update the `href` attribute (using the [[StateService.href]] method). - * - * #### Example: - * Assuming the `users` state has a url of `/users/` - * ```html - * Users - * ``` - * - * ### Parameter Values - * In addition to the state name, a `ui-sref` can include parameter values which are applied when activating the state. - * Param values can be provided in the `ui-sref` value after the state name, enclosed by parentheses. - * The content inside the parentheses is an expression, evaluated to the parameter values. - * - * #### Example: - * This example renders a list of links to users. - * The state's `userId` parameter value comes from each user's `user.id` property. - * ```html - *
  • - * {{ user.displayName }} - *
  • - * ``` - * - * Note: - * The parameter values expression is `$watch`ed for updates. - * - * ### Transition Options - * You can specify [[TransitionOptions]] to pass to [[StateService.go]] by using the `ui-sref-opts` attribute. - * Options are restricted to `location`, `inherit`, and `reload`. - * - * #### Example: - * ```html - * Home - * ``` - * - * ### Other DOM Events - * - * You can also customize which DOM events to respond to (instead of `click`) by - * providing an `events` array in the `ui-sref-opts` attribute. - * - * #### Example: - * ```html - * - * ``` - * - * ### Highlighting the active link - * This directive can be used in conjunction with [[uiSrefActive]] to highlight the active link. - * - * ### Examples - * If you have the following template: - * - * ```html - * Home - * About - * Next page - * - * - * ``` - * - * Then (assuming the current state is `contacts`) the rendered html including hrefs would be: - * - * ```html - * Home - * About - * Next page - * - *
      - *
    • - * Joe - *
    • - *
    • - * Alice - *
    • - *
    • - * Bob - *
    • - *
    - * - * Home - * ``` - * - * ### Notes - * - * - You can use `ui-sref` to change **only the parameter values** by omitting the state name and parentheses. - * #### Example: - * Sets the `lang` parameter to `en` and remains on the same state. - * - * ```html - * English - * ``` - * - * - A middle-click, right-click, or ctrl-click is handled (natively) by the browser to open the href in a new window, for example. - * - * - Unlike the parameter values expression, the state name is not `$watch`ed (for performance reasons). - * If you need to dynamically update the state being linked to, use the fully dynamic [[uiState]] directive. - */ -var uiSrefDirective; -uiSrefDirective = [ - '$uiRouter', - '$timeout', - function $StateRefDirective($uiRouter, $timeout) { - var $state = $uiRouter.stateService; - return { - restrict: 'A', - require: ['?^uiSrefActive', '?^uiSrefActiveEq'], - link: function (scope, element, attrs, uiSrefActive) { - var type = getTypeInfo(element); - var active = uiSrefActive[1] || uiSrefActive[0]; - var unlinkInfoFn = null; - var rawDef = {}; - var getDef = function () { return processedDef($state, element, rawDef); }; - var ref = parseStateRef(attrs.uiSref); - rawDef.uiState = ref.state; - rawDef.uiStateOpts = attrs.uiSrefOpts ? scope.$eval(attrs.uiSrefOpts) : {}; - function update() { - var def = getDef(); - if (unlinkInfoFn) - unlinkInfoFn(); - if (active) - unlinkInfoFn = active.$$addStateInfo(def.uiState, def.uiStateParams); - if (def.href != null) - attrs.$set(type.attr, def.href); - } - if (ref.paramExpr) { - scope.$watch(ref.paramExpr, function (val) { - rawDef.uiStateParams = (0,_uirouter_core__WEBPACK_IMPORTED_MODULE_1__.extend)({}, val); - update(); - }, true); - rawDef.uiStateParams = (0,_uirouter_core__WEBPACK_IMPORTED_MODULE_1__.extend)({}, scope.$eval(ref.paramExpr)); - } - update(); - scope.$on('$destroy', $uiRouter.stateRegistry.onStatesChanged(update)); - scope.$on('$destroy', $uiRouter.transitionService.onSuccess({}, update)); - if (!type.clickable) - return; - var hookFn = clickHook(element, $state, $timeout, type, getDef); - bindEvents(element, scope, hookFn, rawDef.uiStateOpts); - }, - }; - }, -]; -/** - * `ui-state`: A fully dynamic directive for linking to a state - * - * A directive which links to a state (and optionally, parameters). - * When clicked, this directive activates the linked state with the supplied parameter values. - * - * **This directive is very similar to [[uiSref]], but it `$observe`s and `$watch`es/evaluates all its inputs.** - * - * A directive which links to a state (and optionally, parameters). - * When clicked, this directive activates the linked state with the supplied parameter values. - * - * ### Linked State - * The attribute value of `ui-state` is an expression which is `$watch`ed and evaluated as the state to link to. - * **This is in contrast with `ui-sref`, which takes a state name as a string literal.** - * - * #### Example: - * Create a list of links. - * ```html - *
  • - * {{ link.displayName }} - *
  • - * ``` - * - * ### Relative Links - * If the expression evaluates to a relative path, it is processed like [[uiSref]]. - * You just need to be aware that the path is relative to the state that *created* the link. - * This allows a state to create relative `ui-state` which always targets the same destination. - * - * ### hrefs - * If the linked state has a URL, the directive will automatically generate and - * update the `href` attribute (using the [[StateService.href]] method). - * - * ### Parameter Values - * In addition to the state name expression, a `ui-state` can include parameter values which are applied when activating the state. - * Param values should be provided using the `ui-state-params` attribute. - * The `ui-state-params` attribute value is `$watch`ed and evaluated as an expression. - * - * #### Example: - * This example renders a list of links with param values. - * The state's `userId` parameter value comes from each user's `user.id` property. - * ```html - *
  • - * {{ link.displayName }} - *
  • - * ``` - * - * ### Transition Options - * You can specify [[TransitionOptions]] to pass to [[StateService.go]] by using the `ui-state-opts` attribute. - * Options are restricted to `location`, `inherit`, and `reload`. - * The value of the `ui-state-opts` is `$watch`ed and evaluated as an expression. - * - * #### Example: - * ```html - * Home - * ``` - * - * ### Other DOM Events - * - * You can also customize which DOM events to respond to (instead of `click`) by - * providing an `events` array in the `ui-state-opts` attribute. - * - * #### Example: - * ```html - * - * ``` - * - * ### Highlighting the active link - * This directive can be used in conjunction with [[uiSrefActive]] to highlight the active link. - * - * ### Notes - * - * - You can use `ui-params` to change **only the parameter values** by omitting the state name and supplying only `ui-state-params`. - * However, it might be simpler to use [[uiSref]] parameter-only links. - * - * #### Example: - * Sets the `lang` parameter to `en` and remains on the same state. - * - * ```html - * English - * ``` - * - * - A middle-click, right-click, or ctrl-click is handled (natively) by the browser to open the href in a new window, for example. - * ``` - */ -var uiStateDirective; -uiStateDirective = [ - '$uiRouter', - '$timeout', - function $StateRefDynamicDirective($uiRouter, $timeout) { - var $state = $uiRouter.stateService; - return { - restrict: 'A', - require: ['?^uiSrefActive', '?^uiSrefActiveEq'], - link: function (scope, element, attrs, uiSrefActive) { - var type = getTypeInfo(element); - var active = uiSrefActive[1] || uiSrefActive[0]; - var unlinkInfoFn = null; - var hookFn; - var rawDef = {}; - var getDef = function () { return processedDef($state, element, rawDef); }; - var inputAttrs = ['uiState', 'uiStateParams', 'uiStateOpts']; - var watchDeregFns = inputAttrs.reduce(function (acc, attr) { return ((acc[attr] = _uirouter_core__WEBPACK_IMPORTED_MODULE_1__.noop), acc); }, {}); - function update() { - var def = getDef(); - if (unlinkInfoFn) - unlinkInfoFn(); - if (active) - unlinkInfoFn = active.$$addStateInfo(def.uiState, def.uiStateParams); - if (def.href != null) - attrs.$set(type.attr, def.href); - } - inputAttrs.forEach(function (field) { - rawDef[field] = attrs[field] ? scope.$eval(attrs[field]) : null; - attrs.$observe(field, function (expr) { - watchDeregFns[field](); - watchDeregFns[field] = scope.$watch(expr, function (newval) { - rawDef[field] = newval; - update(); - }, true); - }); - }); - update(); - scope.$on('$destroy', $uiRouter.stateRegistry.onStatesChanged(update)); - scope.$on('$destroy', $uiRouter.transitionService.onSuccess({}, update)); - if (!type.clickable) - return; - hookFn = clickHook(element, $state, $timeout, type, getDef); - bindEvents(element, scope, hookFn, rawDef.uiStateOpts); - }, - }; - }, -]; -/** - * `ui-sref-active` and `ui-sref-active-eq`: A directive that adds a CSS class when a `ui-sref` is active - * - * A directive working alongside [[uiSref]] and [[uiState]] to add classes to an element when the - * related directive's state is active (and remove them when it is inactive). - * - * The primary use-case is to highlight the active link in navigation menus, - * distinguishing it from the inactive menu items. - * - * ### Linking to a `ui-sref` or `ui-state` - * `ui-sref-active` can live on the same element as `ui-sref`/`ui-state`, or it can be on a parent element. - * If a `ui-sref-active` is a parent to more than one `ui-sref`/`ui-state`, it will apply the CSS class when **any of the links are active**. - * - * ### Matching - * - * The `ui-sref-active` directive applies the CSS class when the `ui-sref`/`ui-state`'s target state **or any child state is active**. - * This is a "fuzzy match" which uses [[StateService.includes]]. - * - * The `ui-sref-active-eq` directive applies the CSS class when the `ui-sref`/`ui-state`'s target state is directly active (not when child states are active). - * This is an "exact match" which uses [[StateService.is]]. - * - * ### Parameter values - * If the `ui-sref`/`ui-state` includes parameter values, the current parameter values must match the link's values for the link to be highlighted. - * This allows a list of links to the same state with different parameters to be rendered, and the correct one highlighted. - * - * #### Example: - * ```html - *
  • - * {{ user.lastName }} - *
  • - * ``` - * - * ### Examples - * - * Given the following template: - * #### Example: - * ```html - * - * ``` - * - * When the app state is `app.user` (or any child state), - * and contains the state parameter "user" with value "bilbobaggins", - * the resulting HTML will appear as (note the 'active' class): - * - * ```html - * - * ``` - * - * ### Glob mode - * - * It is possible to pass `ui-sref-active` an expression that evaluates to an object. - * The objects keys represent active class names and values represent the respective state names/globs. - * `ui-sref-active` will match if the current active state **includes** any of - * the specified state names/globs, even the abstract ones. - * - * #### Example: - * Given the following template, with "admin" being an abstract state: - * ```html - *
    - * Roles - *
    - * ``` - * - * Arrays are also supported as values in the `ngClass`-like interface. - * This allows multiple states to add `active` class. - * - * #### Example: - * Given the following template, with "admin.roles" being the current state, the class will be added too: - * ```html - *
    - * Roles - *
    - * ``` - * - * When the current state is "admin.roles" the "active" class will be applied to both the `
    ` and `` elements. - * It is important to note that the state names/globs passed to `ui-sref-active` override any state provided by a linked `ui-sref`. - * - * ### Notes: - * - * - The class name is interpolated **once** during the directives link time (any further changes to the - * interpolated value are ignored). - * - * - Multiple classes may be specified in a space-separated format: `ui-sref-active='class1 class2 class3'` - */ -var uiSrefActiveDirective; -uiSrefActiveDirective = [ - '$state', - '$stateParams', - '$interpolate', - '$uiRouter', - function $StateRefActiveDirective($state, $stateParams, $interpolate, $uiRouter) { - return { - restrict: 'A', - controller: [ - '$scope', - '$element', - '$attrs', - function ($scope, $element, $attrs) { - var states = []; - var activeEqClass; - var uiSrefActive; - // There probably isn't much point in $observing this - // uiSrefActive and uiSrefActiveEq share the same directive object with some - // slight difference in logic routing - activeEqClass = $interpolate($attrs.uiSrefActiveEq || '', false)($scope); - try { - uiSrefActive = $scope.$eval($attrs.uiSrefActive); - } - catch (e) { - // Do nothing. uiSrefActive is not a valid expression. - // Fall back to using $interpolate below - } - uiSrefActive = uiSrefActive || $interpolate($attrs.uiSrefActive || '', false)($scope); - setStatesFromDefinitionObject(uiSrefActive); - // Allow uiSref to communicate with uiSrefActive[Equals] - this.$$addStateInfo = function (newState, newParams) { - // we already got an explicit state provided by ui-sref-active, so we - // shadow the one that comes from ui-sref - if ((0,_uirouter_core__WEBPACK_IMPORTED_MODULE_1__.isObject)(uiSrefActive) && states.length > 0) { - return; - } - var deregister = addState(newState, newParams, uiSrefActive); - update(); - return deregister; - }; - function updateAfterTransition(trans) { - trans.promise.then(update, _uirouter_core__WEBPACK_IMPORTED_MODULE_1__.noop); - } - $scope.$on('$destroy', setupEventListeners()); - if ($uiRouter.globals.transition) { - updateAfterTransition($uiRouter.globals.transition); - } - function setupEventListeners() { - var deregisterStatesChangedListener = $uiRouter.stateRegistry.onStatesChanged(handleStatesChanged); - var deregisterOnStartListener = $uiRouter.transitionService.onStart({}, updateAfterTransition); - var deregisterStateChangeSuccessListener = $scope.$on('$stateChangeSuccess', update); - return function cleanUp() { - deregisterStatesChangedListener(); - deregisterOnStartListener(); - deregisterStateChangeSuccessListener(); - }; - } - function handleStatesChanged() { - setStatesFromDefinitionObject(uiSrefActive); - } - function setStatesFromDefinitionObject(statesDefinition) { - if ((0,_uirouter_core__WEBPACK_IMPORTED_MODULE_1__.isObject)(statesDefinition)) { - states = []; - (0,_uirouter_core__WEBPACK_IMPORTED_MODULE_1__.forEach)(statesDefinition, function (stateOrName, activeClass) { - // Helper function to abstract adding state. - var addStateForClass = function (stateOrName, activeClass) { - var ref = parseStateRef(stateOrName); - addState(ref.state, $scope.$eval(ref.paramExpr), activeClass); - }; - if ((0,_uirouter_core__WEBPACK_IMPORTED_MODULE_1__.isString)(stateOrName)) { - // If state is string, just add it. - addStateForClass(stateOrName, activeClass); - } - else if ((0,_uirouter_core__WEBPACK_IMPORTED_MODULE_1__.isArray)(stateOrName)) { - // If state is an array, iterate over it and add each array item individually. - (0,_uirouter_core__WEBPACK_IMPORTED_MODULE_1__.forEach)(stateOrName, function (stateOrName) { - addStateForClass(stateOrName, activeClass); - }); - } - }); - } - } - function addState(stateName, stateParams, activeClass) { - var state = $state.get(stateName, stateContext($element)); - var stateInfo = { - state: state || { name: stateName }, - params: stateParams, - activeClass: activeClass, - }; - states.push(stateInfo); - return function removeState() { - (0,_uirouter_core__WEBPACK_IMPORTED_MODULE_1__.removeFrom)(states)(stateInfo); - }; - } - // Update route state - function update() { - var splitClasses = function (str) { return str.split(/\s/).filter(_uirouter_core__WEBPACK_IMPORTED_MODULE_1__.identity); }; - var getClasses = function (stateList) { - return stateList - .map(function (x) { return x.activeClass; }) - .map(splitClasses) - .reduce(_uirouter_core__WEBPACK_IMPORTED_MODULE_1__.unnestR, []); - }; - var allClasses = getClasses(states).concat(splitClasses(activeEqClass)).reduce(_uirouter_core__WEBPACK_IMPORTED_MODULE_1__.uniqR, []); - var fuzzyClasses = getClasses(states.filter(function (x) { return $state.includes(x.state.name, x.params); })); - var exactlyMatchesAny = !!states.filter(function (x) { return $state.is(x.state.name, x.params); }).length; - var exactClasses = exactlyMatchesAny ? splitClasses(activeEqClass) : []; - var addClasses = fuzzyClasses.concat(exactClasses).reduce(_uirouter_core__WEBPACK_IMPORTED_MODULE_1__.uniqR, []); - var removeClasses = allClasses.filter(function (cls) { return !(0,_uirouter_core__WEBPACK_IMPORTED_MODULE_1__.inArray)(addClasses, cls); }); - $scope.$evalAsync(function () { - addClasses.forEach(function (className) { return $element.addClass(className); }); - removeClasses.forEach(function (className) { return $element.removeClass(className); }); - }); - } - update(); - }, - ], - }; - }, -]; -_angular__WEBPACK_IMPORTED_MODULE_0__.ng.module('ui.router.state') - .directive('uiSref', uiSrefDirective) - .directive('uiSrefActive', uiSrefActiveDirective) - .directive('uiSrefActiveEq', uiSrefActiveDirective) - .directive('uiState', uiStateDirective); -//# sourceMappingURL=stateDirectives.js.map - -/***/ }), - -/***/ "./node_modules/@uirouter/angularjs/lib-esm/directives/viewDirective.js": -/*!******************************************************************************!*\ - !*** ./node_modules/@uirouter/angularjs/lib-esm/directives/viewDirective.js ***! - \******************************************************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "uiView": () => (/* binding */ uiView) -/* harmony export */ }); -/* harmony import */ var _uirouter_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @uirouter/core */ "./node_modules/@uirouter/core/lib-esm/index.js"); -/* harmony import */ var _angular__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../angular */ "./node_modules/@uirouter/angularjs/lib-esm/angular.js"); -/* harmony import */ var _services__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../services */ "./node_modules/@uirouter/angularjs/lib-esm/services.js"); -/* harmony import */ var _statebuilders_views__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../statebuilders/views */ "./node_modules/@uirouter/angularjs/lib-esm/statebuilders/views.js"); -/** @publicapi @module directives */ /** */ - - - - -/** - * `ui-view`: A viewport directive which is filled in by a view from the active state. - * - * ### Attributes - * - * - `name`: (Optional) A view name. - * The name should be unique amongst the other views in the same state. - * You can have views of the same name that live in different states. - * The ui-view can be targeted in a View using the name ([[Ng1StateDeclaration.views]]). - * - * - `autoscroll`: an expression. When it evaluates to true, the `ui-view` will be scrolled into view when it is activated. - * Uses [[$uiViewScroll]] to do the scrolling. - * - * - `onload`: Expression to evaluate whenever the view updates. - * - * #### Example: - * A view can be unnamed or named. - * ```html - * - *
    - * - * - *
    - * - * - * - * ``` - * - * You can only have one unnamed view within any template (or root html). If you are only using a - * single view and it is unnamed then you can populate it like so: - * - * ```html - *
    - * $stateProvider.state("home", { - * template: "

    HELLO!

    " - * }) - * ``` - * - * The above is a convenient shortcut equivalent to specifying your view explicitly with the - * [[Ng1StateDeclaration.views]] config property, by name, in this case an empty name: - * - * ```js - * $stateProvider.state("home", { - * views: { - * "": { - * template: "

    HELLO!

    " - * } - * } - * }) - * ``` - * - * But typically you'll only use the views property if you name your view or have more than one view - * in the same template. There's not really a compelling reason to name a view if its the only one, - * but you could if you wanted, like so: - * - * ```html - *
    - * ``` - * - * ```js - * $stateProvider.state("home", { - * views: { - * "main": { - * template: "

    HELLO!

    " - * } - * } - * }) - * ``` - * - * Really though, you'll use views to set up multiple views: - * - * ```html - *
    - *
    - *
    - * ``` - * - * ```js - * $stateProvider.state("home", { - * views: { - * "": { - * template: "

    HELLO!

    " - * }, - * "chart": { - * template: "" - * }, - * "data": { - * template: "" - * } - * } - * }) - * ``` - * - * #### Examples for `autoscroll`: - * ```html - * - * - * - * - * - * - * - * ``` - * - * Resolve data: - * - * The resolved data from the state's `resolve` block is placed on the scope as `$resolve` (this - * can be customized using [[Ng1ViewDeclaration.resolveAs]]). This can be then accessed from the template. - * - * Note that when `controllerAs` is being used, `$resolve` is set on the controller instance *after* the - * controller is instantiated. The `$onInit()` hook can be used to perform initialization code which - * depends on `$resolve` data. - * - * #### Example: - * ```js - * $stateProvider.state('home', { - * template: '', - * resolve: { - * user: function(UserService) { return UserService.fetchUser(); } - * } - * }); - * ``` - */ -var uiView; -// eslint-disable-next-line prefer-const -uiView = [ - '$view', - '$animate', - '$uiViewScroll', - '$interpolate', - '$q', - function $ViewDirective($view, $animate, $uiViewScroll, $interpolate, $q) { - function getRenderer() { - return { - enter: function (element, target, cb) { - if (_angular__WEBPACK_IMPORTED_MODULE_1__.ng.version.minor > 2) { - $animate.enter(element, null, target).then(cb); - } - else { - $animate.enter(element, null, target, cb); - } - }, - leave: function (element, cb) { - if (_angular__WEBPACK_IMPORTED_MODULE_1__.ng.version.minor > 2) { - $animate.leave(element).then(cb); - } - else { - $animate.leave(element, cb); - } - }, - }; - } - function configsEqual(config1, config2) { - return config1 === config2; - } - var rootData = { - $cfg: { viewDecl: { $context: $view._pluginapi._rootViewContext() } }, - $uiView: {}, - }; - var directive = { - count: 0, - restrict: 'ECA', - terminal: true, - priority: 400, - transclude: 'element', - compile: function (tElement, tAttrs, $transclude) { - return function (scope, $element, attrs) { - var onloadExp = attrs['onload'] || '', autoScrollExp = attrs['autoscroll'], renderer = getRenderer(), inherited = $element.inheritedData('$uiView') || rootData, name = $interpolate(attrs['uiView'] || attrs['name'] || '')(scope) || '$default'; - var previousEl, currentEl, currentScope, viewConfig; - var activeUIView = { - $type: 'ng1', - id: directive.count++, - name: name, - fqn: inherited.$uiView.fqn ? inherited.$uiView.fqn + '.' + name : name, - config: null, - configUpdated: configUpdatedCallback, - get creationContext() { - // The context in which this ui-view "tag" was created - var fromParentTagConfig = (0,_uirouter_core__WEBPACK_IMPORTED_MODULE_0__.parse)('$cfg.viewDecl.$context')(inherited); - // Allow - // See https://github.com/angular-ui/ui-router/issues/3355 - var fromParentTag = (0,_uirouter_core__WEBPACK_IMPORTED_MODULE_0__.parse)('$uiView.creationContext')(inherited); - return fromParentTagConfig || fromParentTag; - }, - }; - _uirouter_core__WEBPACK_IMPORTED_MODULE_0__.trace.traceUIViewEvent('Linking', activeUIView); - function configUpdatedCallback(config) { - if (config && !(config instanceof _statebuilders_views__WEBPACK_IMPORTED_MODULE_3__.Ng1ViewConfig)) - return; - if (configsEqual(viewConfig, config)) - return; - _uirouter_core__WEBPACK_IMPORTED_MODULE_0__.trace.traceUIViewConfigUpdated(activeUIView, config && config.viewDecl && config.viewDecl.$context); - viewConfig = config; - updateView(config); - } - $element.data('$uiView', { $uiView: activeUIView }); - updateView(); - var unregister = $view.registerUIView(activeUIView); - scope.$on('$destroy', function () { - _uirouter_core__WEBPACK_IMPORTED_MODULE_0__.trace.traceUIViewEvent('Destroying/Unregistering', activeUIView); - unregister(); - }); - function cleanupLastView() { - if (previousEl) { - _uirouter_core__WEBPACK_IMPORTED_MODULE_0__.trace.traceUIViewEvent('Removing (previous) el', previousEl.data('$uiView')); - previousEl.remove(); - previousEl = null; - } - if (currentScope) { - _uirouter_core__WEBPACK_IMPORTED_MODULE_0__.trace.traceUIViewEvent('Destroying scope', activeUIView); - currentScope.$destroy(); - currentScope = null; - } - if (currentEl) { - var _viewData_1 = currentEl.data('$uiViewAnim'); - _uirouter_core__WEBPACK_IMPORTED_MODULE_0__.trace.traceUIViewEvent('Animate out', _viewData_1); - renderer.leave(currentEl, function () { - _viewData_1.$$animLeave.resolve(); - previousEl = null; - }); - previousEl = currentEl; - currentEl = null; - } - } - function updateView(config) { - var newScope = scope.$new(); - var animEnter = $q.defer(), animLeave = $q.defer(); - var $uiViewData = { - $cfg: config, - $uiView: activeUIView, - }; - var $uiViewAnim = { - $animEnter: animEnter.promise, - $animLeave: animLeave.promise, - $$animLeave: animLeave, - }; - /** - * @ngdoc event - * @name ui.router.state.directive:ui-view#$viewContentLoading - * @eventOf ui.router.state.directive:ui-view - * @eventType emits on ui-view directive scope - * @description - * - * Fired once the view **begins loading**, *before* the DOM is rendered. - * - * @param {Object} event Event object. - * @param {string} viewName Name of the view. - */ - newScope.$emit('$viewContentLoading', name); - var cloned = $transclude(newScope, function (clone) { - clone.data('$uiViewAnim', $uiViewAnim); - clone.data('$uiView', $uiViewData); - renderer.enter(clone, $element, function onUIViewEnter() { - animEnter.resolve(); - if (currentScope) - currentScope.$emit('$viewContentAnimationEnded'); - if (((0,_uirouter_core__WEBPACK_IMPORTED_MODULE_0__.isDefined)(autoScrollExp) && !autoScrollExp) || scope.$eval(autoScrollExp)) { - $uiViewScroll(clone); - } - }); - cleanupLastView(); - }); - currentEl = cloned; - currentScope = newScope; - /** - * @ngdoc event - * @name ui.router.state.directive:ui-view#$viewContentLoaded - * @eventOf ui.router.state.directive:ui-view - * @eventType emits on ui-view directive scope - * @description * - * Fired once the view is **loaded**, *after* the DOM is rendered. - * - * @param {Object} event Event object. - */ - currentScope.$emit('$viewContentLoaded', config || viewConfig); - currentScope.$eval(onloadExp); - } - }; - }, - }; - return directive; - }, -]; -$ViewDirectiveFill.$inject = ['$compile', '$controller', '$transitions', '$view', '$q']; -/** @hidden */ -function $ViewDirectiveFill($compile, $controller, $transitions, $view, $q) { - var getControllerAs = (0,_uirouter_core__WEBPACK_IMPORTED_MODULE_0__.parse)('viewDecl.controllerAs'); - var getResolveAs = (0,_uirouter_core__WEBPACK_IMPORTED_MODULE_0__.parse)('viewDecl.resolveAs'); - return { - restrict: 'ECA', - priority: -400, - compile: function (tElement) { - var initial = tElement.html(); - tElement.empty(); - return function (scope, $element) { - var data = $element.data('$uiView'); - if (!data) { - $element.html(initial); - $compile($element.contents())(scope); - return; - } - var cfg = data.$cfg || { viewDecl: {}, getTemplate: _uirouter_core__WEBPACK_IMPORTED_MODULE_0__.noop }; - var resolveCtx = cfg.path && new _uirouter_core__WEBPACK_IMPORTED_MODULE_0__.ResolveContext(cfg.path); - $element.html(cfg.getTemplate($element, resolveCtx) || initial); - _uirouter_core__WEBPACK_IMPORTED_MODULE_0__.trace.traceUIViewFill(data.$uiView, $element.html()); - var link = $compile($element.contents()); - var controller = cfg.controller; - var controllerAs = getControllerAs(cfg); - var resolveAs = getResolveAs(cfg); - var locals = resolveCtx && (0,_services__WEBPACK_IMPORTED_MODULE_2__.getLocals)(resolveCtx); - scope[resolveAs] = locals; - if (controller) { - var controllerInstance = ($controller(controller, (0,_uirouter_core__WEBPACK_IMPORTED_MODULE_0__.extend)({}, locals, { $scope: scope, $element: $element }))); - if (controllerAs) { - scope[controllerAs] = controllerInstance; - scope[controllerAs][resolveAs] = locals; - } - // TODO: Use $view service as a central point for registering component-level hooks - // Then, when a component is created, tell the $view service, so it can invoke hooks - // $view.componentLoaded(controllerInstance, { $scope: scope, $element: $element }); - // scope.$on('$destroy', () => $view.componentUnloaded(controllerInstance, { $scope: scope, $element: $element })); - $element.data('$ngControllerController', controllerInstance); - $element.children().data('$ngControllerController', controllerInstance); - registerControllerCallbacks($q, $transitions, controllerInstance, scope, cfg); - } - // Wait for the component to appear in the DOM - if ((0,_uirouter_core__WEBPACK_IMPORTED_MODULE_0__.isString)(cfg.component)) { - var kebobName = (0,_uirouter_core__WEBPACK_IMPORTED_MODULE_0__.kebobString)(cfg.component); - var tagRegexp_1 = new RegExp("^(x-|data-)?" + kebobName + "$", 'i'); - var getComponentController = function () { - var directiveEl = [].slice - .call($element[0].children) - .filter(function (el) { return el && el.tagName && tagRegexp_1.exec(el.tagName); }); - return directiveEl && _angular__WEBPACK_IMPORTED_MODULE_1__.ng.element(directiveEl).data("$" + cfg.component + "Controller"); - }; - var deregisterWatch_1 = scope.$watch(getComponentController, function (ctrlInstance) { - if (!ctrlInstance) - return; - registerControllerCallbacks($q, $transitions, ctrlInstance, scope, cfg); - deregisterWatch_1(); - }); - } - link(scope); - }; - }, - }; -} -/** @hidden */ -var hasComponentImpl = typeof _angular__WEBPACK_IMPORTED_MODULE_1__.ng.module('ui.router')['component'] === 'function'; -/** @hidden incrementing id */ -var _uiCanExitId = 0; -/** @hidden TODO: move these callbacks to $view and/or `/hooks/components.ts` or something */ -function registerControllerCallbacks($q, $transitions, controllerInstance, $scope, cfg) { - // Call $onInit() ASAP - if ((0,_uirouter_core__WEBPACK_IMPORTED_MODULE_0__.isFunction)(controllerInstance.$onInit) && - !((cfg.viewDecl.component || cfg.viewDecl.componentProvider) && hasComponentImpl)) { - controllerInstance.$onInit(); - } - var viewState = (0,_uirouter_core__WEBPACK_IMPORTED_MODULE_0__.tail)(cfg.path).state.self; - var hookOptions = { bind: controllerInstance }; - // Add component-level hook for onUiParamsChanged - if ((0,_uirouter_core__WEBPACK_IMPORTED_MODULE_0__.isFunction)(controllerInstance.uiOnParamsChanged)) { - var resolveContext = new _uirouter_core__WEBPACK_IMPORTED_MODULE_0__.ResolveContext(cfg.path); - var viewCreationTrans_1 = resolveContext.getResolvable('$transition$').data; - // Fire callback on any successful transition - var paramsUpdated = function ($transition$) { - // Exit early if the $transition$ is the same as the view was created within. - // Exit early if the $transition$ will exit the state the view is for. - if ($transition$ === viewCreationTrans_1 || $transition$.exiting().indexOf(viewState) !== -1) - return; - var toParams = $transition$.params('to'); - var fromParams = $transition$.params('from'); - var getNodeSchema = function (node) { return node.paramSchema; }; - var toSchema = $transition$.treeChanges('to').map(getNodeSchema).reduce(_uirouter_core__WEBPACK_IMPORTED_MODULE_0__.unnestR, []); - var fromSchema = $transition$.treeChanges('from').map(getNodeSchema).reduce(_uirouter_core__WEBPACK_IMPORTED_MODULE_0__.unnestR, []); - // Find the to params that have different values than the from params - var changedToParams = toSchema.filter(function (param) { - var idx = fromSchema.indexOf(param); - return idx === -1 || !fromSchema[idx].type.equals(toParams[param.id], fromParams[param.id]); - }); - // Only trigger callback if a to param has changed or is new - if (changedToParams.length) { - var changedKeys_1 = changedToParams.map(function (x) { return x.id; }); - // Filter the params to only changed/new to params. `$transition$.params()` may be used to get all params. - var newValues = (0,_uirouter_core__WEBPACK_IMPORTED_MODULE_0__.filter)(toParams, function (val, key) { return changedKeys_1.indexOf(key) !== -1; }); - controllerInstance.uiOnParamsChanged(newValues, $transition$); - } - }; - $scope.$on('$destroy', $transitions.onSuccess({}, paramsUpdated, hookOptions)); - } - // Add component-level hook for uiCanExit - if ((0,_uirouter_core__WEBPACK_IMPORTED_MODULE_0__.isFunction)(controllerInstance.uiCanExit)) { - var id_1 = _uiCanExitId++; - var cacheProp_1 = '_uiCanExitIds'; - // Returns true if a redirect transition already answered truthy - var prevTruthyAnswer_1 = function (trans) { - return !!trans && ((trans[cacheProp_1] && trans[cacheProp_1][id_1] === true) || prevTruthyAnswer_1(trans.redirectedFrom())); - }; - // If a user answered yes, but the transition was later redirected, don't also ask for the new redirect transition - var wrappedHook = function (trans) { - var promise; - var ids = (trans[cacheProp_1] = trans[cacheProp_1] || {}); - if (!prevTruthyAnswer_1(trans)) { - promise = $q.when(controllerInstance.uiCanExit(trans)); - promise.then(function (val) { return (ids[id_1] = val !== false); }); - } - return promise; - }; - var criteria = { exiting: viewState.name }; - $scope.$on('$destroy', $transitions.onBefore(criteria, wrappedHook, hookOptions)); - } -} -_angular__WEBPACK_IMPORTED_MODULE_1__.ng.module('ui.router.state').directive('uiView', uiView); -_angular__WEBPACK_IMPORTED_MODULE_1__.ng.module('ui.router.state').directive('uiView', $ViewDirectiveFill); -//# sourceMappingURL=viewDirective.js.map - -/***/ }), - -/***/ "./node_modules/@uirouter/angularjs/lib-esm/index.js": -/*!***********************************************************!*\ - !*** ./node_modules/@uirouter/angularjs/lib-esm/index.js ***! - \***********************************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "getLocals": () => (/* reexport safe */ _services__WEBPACK_IMPORTED_MODULE_1__.getLocals), -/* harmony export */ "watchDigests": () => (/* reexport safe */ _services__WEBPACK_IMPORTED_MODULE_1__.watchDigests), -/* harmony export */ "Ng1ViewConfig": () => (/* reexport safe */ _statebuilders_views__WEBPACK_IMPORTED_MODULE_2__.Ng1ViewConfig), -/* harmony export */ "getNg1ViewConfigFactory": () => (/* reexport safe */ _statebuilders_views__WEBPACK_IMPORTED_MODULE_2__.getNg1ViewConfigFactory), -/* harmony export */ "ng1ViewsBuilder": () => (/* reexport safe */ _statebuilders_views__WEBPACK_IMPORTED_MODULE_2__.ng1ViewsBuilder), -/* harmony export */ "StateProvider": () => (/* reexport safe */ _stateProvider__WEBPACK_IMPORTED_MODULE_3__.StateProvider), -/* harmony export */ "UrlRouterProvider": () => (/* reexport safe */ _urlRouterProvider__WEBPACK_IMPORTED_MODULE_4__.UrlRouterProvider), -/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__), -/* harmony export */ "core": () => (/* reexport module object */ _uirouter_core__WEBPACK_IMPORTED_MODULE_10__) -/* harmony export */ }); -/* harmony import */ var _interface__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./interface */ "./node_modules/@uirouter/angularjs/lib-esm/interface.js"); -/* harmony import */ var _interface__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_interface__WEBPACK_IMPORTED_MODULE_0__); -/* harmony reexport (unknown) */ var __WEBPACK_REEXPORT_OBJECT__ = {}; -/* harmony reexport (unknown) */ for(const __WEBPACK_IMPORT_KEY__ in _interface__WEBPACK_IMPORTED_MODULE_0__) if(["default","core"].indexOf(__WEBPACK_IMPORT_KEY__) < 0) __WEBPACK_REEXPORT_OBJECT__[__WEBPACK_IMPORT_KEY__] = () => _interface__WEBPACK_IMPORTED_MODULE_0__[__WEBPACK_IMPORT_KEY__] -/* harmony reexport (unknown) */ __webpack_require__.d(__webpack_exports__, __WEBPACK_REEXPORT_OBJECT__); -/* harmony import */ var _services__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./services */ "./node_modules/@uirouter/angularjs/lib-esm/services.js"); -/* harmony import */ var _statebuilders_views__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./statebuilders/views */ "./node_modules/@uirouter/angularjs/lib-esm/statebuilders/views.js"); -/* harmony import */ var _stateProvider__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./stateProvider */ "./node_modules/@uirouter/angularjs/lib-esm/stateProvider.js"); -/* harmony import */ var _urlRouterProvider__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./urlRouterProvider */ "./node_modules/@uirouter/angularjs/lib-esm/urlRouterProvider.js"); -/* harmony import */ var _injectables__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./injectables */ "./node_modules/@uirouter/angularjs/lib-esm/injectables.js"); -/* harmony import */ var _injectables__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_injectables__WEBPACK_IMPORTED_MODULE_5__); -/* harmony import */ var _directives_stateDirectives__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./directives/stateDirectives */ "./node_modules/@uirouter/angularjs/lib-esm/directives/stateDirectives.js"); -/* harmony import */ var _stateFilters__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./stateFilters */ "./node_modules/@uirouter/angularjs/lib-esm/stateFilters.js"); -/* harmony import */ var _directives_viewDirective__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./directives/viewDirective */ "./node_modules/@uirouter/angularjs/lib-esm/directives/viewDirective.js"); -/* harmony import */ var _viewScroll__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./viewScroll */ "./node_modules/@uirouter/angularjs/lib-esm/viewScroll.js"); -/* harmony import */ var _uirouter_core__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @uirouter/core */ "./node_modules/@uirouter/core/lib-esm/index.js"); -/* harmony reexport (unknown) */ var __WEBPACK_REEXPORT_OBJECT__ = {}; -/* harmony reexport (unknown) */ for(const __WEBPACK_IMPORT_KEY__ in _uirouter_core__WEBPACK_IMPORTED_MODULE_10__) if(["default","core","getLocals","watchDigests","Ng1ViewConfig","getNg1ViewConfigFactory","ng1ViewsBuilder","StateProvider","UrlRouterProvider"].indexOf(__WEBPACK_IMPORT_KEY__) < 0) __WEBPACK_REEXPORT_OBJECT__[__WEBPACK_IMPORT_KEY__] = () => _uirouter_core__WEBPACK_IMPORTED_MODULE_10__[__WEBPACK_IMPORT_KEY__] -/* harmony reexport (unknown) */ __webpack_require__.d(__webpack_exports__, __WEBPACK_REEXPORT_OBJECT__); -/** - * Main entry point for angular 1.x build - * @publicapi @module ng1 - */ /** */ - - - - - - - - - - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ('ui.router'); - - - -//# sourceMappingURL=index.js.map - -/***/ }), - -/***/ "./node_modules/@uirouter/angularjs/lib-esm/injectables.js": -/*!*****************************************************************!*\ - !*** ./node_modules/@uirouter/angularjs/lib-esm/injectables.js ***! - \*****************************************************************/ -/***/ (() => { - -/** - * The current (or pending) State Parameters - * - * An injectable global **Service Object** which holds the state parameters for the latest **SUCCESSFUL** transition. - * - * The values are not updated until *after* a `Transition` successfully completes. - * - * **Also:** an injectable **Per-Transition Object** object which holds the pending state parameters for the pending `Transition` currently running. - * - * ### Deprecation warning: - * - * The value injected for `$stateParams` is different depending on where it is injected. - * - * - When injected into an angular service, the object injected is the global **Service Object** with the parameter values for the latest successful `Transition`. - * - When injected into transition hooks, resolves, or view controllers, the object is the **Per-Transition Object** with the parameter values for the running `Transition`. - * - * Because of these confusing details, this service is deprecated. - * - * ### Instead of using the global `$stateParams` service object, - * inject [[$uiRouterGlobals]] and use [[UIRouterGlobals.params]] - * - * ```js - * MyService.$inject = ['$uiRouterGlobals']; - * function MyService($uiRouterGlobals) { - * return { - * paramValues: function () { - * return $uiRouterGlobals.params; - * } - * } - * } - * ``` - * - * ### Instead of using the per-transition `$stateParams` object, - * inject the current `Transition` (as [[$transition$]]) and use [[Transition.params]] - * - * ```js - * MyController.$inject = ['$transition$']; - * function MyController($transition$) { - * var username = $transition$.params().username; - * // .. do something with username - * } - * ``` - * - * --- - * - * This object can be injected into other services. - * - * #### Deprecated Example: - * ```js - * SomeService.$inject = ['$http', '$stateParams']; - * function SomeService($http, $stateParams) { - * return { - * getUser: function() { - * return $http.get('/api/users/' + $stateParams.username); - * } - * } - * }; - * angular.service('SomeService', SomeService); - * ``` - * @deprecated - */ -var $stateParams; -/** - * Global UI-Router variables - * - * The router global state as a **Service Object** (injectable during runtime). - * - * This object contains globals such as the current state and current parameter values. - */ -var $uiRouterGlobals; -/** - * The UI-Router instance - * - * The [[UIRouter]] singleton (the router instance) as a **Service Object** (injectable during runtime). - * - * This object is the UI-Router singleton instance, created by angular dependency injection during application bootstrap. - * It has references to the other UI-Router services - * - * #### Note: This object is also exposed as [[$uiRouterProvider]] for injection during angular config time. - */ -var $uiRouter; -/** - * The UI-Router instance - * - * The [[UIRouter]] singleton (the router instance) as a **Provider Object** (injectable during config phase). - * - * This object is the UI-Router singleton instance, created by angular dependency injection during application bootstrap. - * It has references to the other UI-Router services - * - * #### Note: This object is also exposed as [[$uiRouter]] for injection during runtime. - */ -var $uiRouterProvider; -/** - * Transition debug/tracing - * - * The [[Trace]] singleton as a **Service Object** (injectable during runtime). - * - * Enables or disables Transition tracing which can help to debug issues. - */ -var $trace; -/** - * The Transition Service - * - * The [[TransitionService]] singleton as a **Service Object** (injectable during runtime). - * - * This angular service exposes the [[TransitionService]] singleton, which is primarily - * used to register global transition hooks. - * - * #### Note: This object is also exposed as [[$transitionsProvider]] for injection during the config phase. - */ -var $transitions; -/** - * The Transition Service - * - * The [[TransitionService]] singleton as a **Provider Object** (injectable during config phase) - * - * This angular service exposes the [[TransitionService]] singleton, which is primarily - * used to register global transition hooks. - * - * #### Note: This object is also exposed as [[$transitions]] for injection during runtime. - */ -var $transitionsProvider; -/** - * The current [[Transition]] object - * - * The current [[Transition]] object as a **Per-Transition Object** (injectable into Resolve, Hooks, Controllers) - * - * This object returns information about the current transition, including: - * - * - To/from states - * - To/from parameters - * - Transition options - * - States being entered, exited, and retained - * - Resolve data - * - A Promise for the transition - * - Any transition failure information - * - An injector for both Service and Per-Transition Objects - */ -var $transition$; -/** - * The State Service - * - * The [[StateService]] singleton as a **Service Object** (injectable during runtime). - * - * This service used to manage and query information on registered states. - * It exposes state related APIs including: - * - * - Start a [[Transition]] - * - Imperatively lazy load states - * - Check if a state is currently active - * - Look up states by name - * - Build URLs for a state+parameters - * - Configure the global Transition error handler - * - * This angular service exposes the [[StateService]] singleton. - */ -var $state; -/** - * The State Registry - * - * The [[StateRegistry]] singleton as a **Service Object** (injectable during runtime). - * - * This service is used to register/deregister states. - * It has state registration related APIs including: - * - * - Register/deregister states - * - Listen for state registration/deregistration - * - Get states by name - * - Add state decorators (to customize the state creation process) - * - * #### Note: This object is also exposed as [[$stateRegistryProvider]] for injection during the config phase. - */ -var $stateRegistry; -/** - * The State Registry - * - * The [[StateRegistry]] singleton as a **Provider Object** (injectable during config time). - * - * This service is used to register/deregister states. - * It has state registration related APIs including: - * - * - Register/deregister states - * - Listen for state registration/deregistration - * - Get states by name - * - Add state decorators (to customize the state creation process) - * - * #### Note: This object is also exposed as [[$stateRegistry]] for injection during runtime. - */ -var $stateRegistryProvider; -/** - * The View Scroll provider - * - * The [[UIViewScrollProvider]] as a **Provider Object** (injectable during config time). - * - * This angular service exposes the [[UIViewScrollProvider]] singleton and is - * used to disable UI-Router's scroll behavior. - */ -var $uiViewScrollProvider; -/** - * The View Scroll function - * - * The View Scroll function as a **Service Object** (injectable during runtime). - * - * This is a function that scrolls an element into view. - * The element is scrolled after a `$timeout` so the DOM has time to refresh. - * - * If you prefer to rely on `$anchorScroll` to scroll the view to the anchor, - * this can be enabled by calling [[UIViewScrollProvider.useAnchorScroll]]. - * - * Note: this function is used by the [[directives.uiView]] when the `autoscroll` expression evaluates to true. - */ -var $uiViewScroll; -/** - * The StateProvider - * - * An angular1-only [[StateProvider]] as a **Provider Object** (injectable during config time). - * - * This angular service exposes the [[StateProvider]] singleton. - * - * The `StateProvider` is primarily used to register states or add custom state decorators. - * - * ##### Note: This provider is a ng1 vestige. - * It is a passthrough to [[$stateRegistry]] and [[$state]]. - */ -var $stateProvider; -/** - * The URL Service Provider - * - * The [[UrlService]] singleton as a **Provider Object** (injectable during the angular config phase). - * - * A service used to configure and interact with the URL. - * It has URL related APIs including: - * - * - register custom Parameter types `UrlService.config.type` ([[UrlConfigApi.type]]) - * - add URL rules: `UrlService.rules.when` ([[UrlRulesApi.when]]) - * - configure behavior when no url matches: `UrlService.rules.otherwise` ([[UrlRulesApi.otherwise]]) - * - delay initial URL synchronization [[UrlService.deferIntercept]]. - * - get or set the current url: [[UrlService.url]] - * - * ##### Note: This service can also be injected during runtime as [[$urlService]]. - */ -var $urlServiceProvider; -/** - * The URL Service - * - * The [[UrlService]] singleton as a **Service Object** (injectable during runtime). - * - * Note: This service can also be injected during the config phase as [[$urlServiceProvider]]. - * - * Used to configure the URL. - * It has URL related APIs including: - * - * - register custom Parameter types `UrlService.config.type` ([[UrlConfigApi.type]]) - * - add URL rules: `UrlService.rules.when` ([[UrlRulesApi.when]]) - * - configure behavior when no url matches: `UrlService.rules.otherwise` ([[UrlRulesApi.otherwise]]) - * - delay initial URL synchronization [[UrlService.deferIntercept]]. - * - get or set the current url: [[UrlService.url]] - * - * ##### Note: This service can also be injected during the config phase as [[$urlServiceProvider]]. - */ -var $urlService; -/** - * The URL Router Provider - * - * ### Deprecation warning: This object is now considered internal. Use [[$urlServiceProvider]] instead. - * - * The [[UrlRouter]] singleton as a **Provider Object** (injectable during config time). - * - * #### Note: This object is also exposed as [[$urlRouter]] for injection during runtime. - * - * @deprecated - */ -var $urlRouterProvider; -/** - * The Url Router - * - * ### Deprecation warning: This object is now considered internal. Use [[$urlService]] instead. - * - * The [[UrlRouter]] singleton as a **Service Object** (injectable during runtime). - * - * #### Note: This object is also exposed as [[$urlRouterProvider]] for injection during angular config time. - * - * @deprecated - */ -var $urlRouter; -/** - * The URL Matcher Factory - * - * ### Deprecation warning: This object is now considered internal. Use [[$urlService]] instead. - * - * The [[UrlMatcherFactory]] singleton as a **Service Object** (injectable during runtime). - * - * This service is used to set url mapping options, define custom parameter types, and create [[UrlMatcher]] objects. - * - * #### Note: This object is also exposed as [[$urlMatcherFactoryProvider]] for injection during angular config time. - * - * @deprecated - */ -var $urlMatcherFactory; -/** - * The URL Matcher Factory - * - * ### Deprecation warning: This object is now considered internal. Use [[$urlService]] instead. - * - * The [[UrlMatcherFactory]] singleton as a **Provider Object** (injectable during config time). - * - * This service is used to set url mapping options, define custom parameter types, and create [[UrlMatcher]] objects. - * - * #### Note: This object is also exposed as [[$urlMatcherFactory]] for injection during runtime. - * - * @deprecated - */ -var $urlMatcherFactoryProvider; -//# sourceMappingURL=injectables.js.map - -/***/ }), - -/***/ "./node_modules/@uirouter/angularjs/lib-esm/interface.js": -/*!***************************************************************!*\ - !*** ./node_modules/@uirouter/angularjs/lib-esm/interface.js ***! - \***************************************************************/ -/***/ (() => { - -//# sourceMappingURL=interface.js.map - -/***/ }), - -/***/ "./node_modules/@uirouter/angularjs/lib-esm/locationServices.js": -/*!**********************************************************************!*\ - !*** ./node_modules/@uirouter/angularjs/lib-esm/locationServices.js ***! - \**********************************************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "Ng1LocationServices": () => (/* binding */ Ng1LocationServices) -/* harmony export */ }); -/* harmony import */ var _uirouter_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @uirouter/core */ "./node_modules/@uirouter/core/lib-esm/index.js"); -/** @publicapi @module ng1 */ /** */ - - -/** - * Implements UI-Router LocationServices and LocationConfig using Angular 1's $location service - * @internalapi - */ -var Ng1LocationServices = /** @class */ (function () { - function Ng1LocationServices($locationProvider) { - // .onChange() registry - this._urlListeners = []; - this.$locationProvider = $locationProvider; - var _lp = (0,_uirouter_core__WEBPACK_IMPORTED_MODULE_0__.val)($locationProvider); - (0,_uirouter_core__WEBPACK_IMPORTED_MODULE_0__.createProxyFunctions)(_lp, this, _lp, ['hashPrefix']); - } - /** - * Applys ng1-specific path parameter encoding - * - * The Angular 1 `$location` service is a bit weird. - * It doesn't allow slashes to be encoded/decoded bi-directionally. - * - * See the writeup at https://github.com/angular-ui/ui-router/issues/2598 - * - * This code patches the `path` parameter type so it encoded/decodes slashes as ~2F - * - * @param router - */ - Ng1LocationServices.monkeyPatchPathParameterType = function (router) { - var pathType = router.urlMatcherFactory.type('path'); - pathType.encode = function (x) { - return x != null ? x.toString().replace(/(~|\/)/g, function (m) { return ({ '~': '~~', '/': '~2F' }[m]); }) : x; - }; - pathType.decode = function (x) { - return x != null ? x.toString().replace(/(~~|~2F)/g, function (m) { return ({ '~~': '~', '~2F': '/' }[m]); }) : x; - }; - }; - // eslint-disable-next-line @typescript-eslint/no-empty-function - Ng1LocationServices.prototype.dispose = function () { }; - Ng1LocationServices.prototype.onChange = function (callback) { - var _this = this; - this._urlListeners.push(callback); - return function () { return (0,_uirouter_core__WEBPACK_IMPORTED_MODULE_0__.removeFrom)(_this._urlListeners)(callback); }; - }; - Ng1LocationServices.prototype.html5Mode = function () { - var html5Mode = this.$locationProvider.html5Mode(); - html5Mode = (0,_uirouter_core__WEBPACK_IMPORTED_MODULE_0__.isObject)(html5Mode) ? html5Mode.enabled : html5Mode; - return html5Mode && this.$sniffer.history; - }; - Ng1LocationServices.prototype.baseHref = function () { - return this._baseHref || (this._baseHref = this.$browser.baseHref() || this.$window.location.pathname); - }; - Ng1LocationServices.prototype.url = function (newUrl, replace, state) { - if (replace === void 0) { replace = false; } - if ((0,_uirouter_core__WEBPACK_IMPORTED_MODULE_0__.isDefined)(newUrl)) - this.$location.url(newUrl); - if (replace) - this.$location.replace(); - if (state) - this.$location.state(state); - return this.$location.url(); - }; - Ng1LocationServices.prototype._runtimeServices = function ($rootScope, $location, $sniffer, $browser, $window) { - var _this = this; - this.$location = $location; - this.$sniffer = $sniffer; - this.$browser = $browser; - this.$window = $window; - // Bind $locationChangeSuccess to the listeners registered in LocationService.onChange - $rootScope.$on('$locationChangeSuccess', function (evt) { return _this._urlListeners.forEach(function (fn) { return fn(evt); }); }); - var _loc = (0,_uirouter_core__WEBPACK_IMPORTED_MODULE_0__.val)($location); - // Bind these LocationService functions to $location - (0,_uirouter_core__WEBPACK_IMPORTED_MODULE_0__.createProxyFunctions)(_loc, this, _loc, ['replace', 'path', 'search', 'hash']); - // Bind these LocationConfig functions to $location - (0,_uirouter_core__WEBPACK_IMPORTED_MODULE_0__.createProxyFunctions)(_loc, this, _loc, ['port', 'protocol', 'host']); - }; - return Ng1LocationServices; -}()); - -//# sourceMappingURL=locationServices.js.map - -/***/ }), - -/***/ "./node_modules/@uirouter/angularjs/lib-esm/services.js": -/*!**************************************************************!*\ - !*** ./node_modules/@uirouter/angularjs/lib-esm/services.js ***! - \**************************************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "watchDigests": () => (/* binding */ watchDigests), -/* harmony export */ "getLocals": () => (/* binding */ getLocals) -/* harmony export */ }); -/* harmony import */ var _angular__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./angular */ "./node_modules/@uirouter/angularjs/lib-esm/angular.js"); -/* harmony import */ var _uirouter_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @uirouter/core */ "./node_modules/@uirouter/core/lib-esm/index.js"); -/* harmony import */ var _statebuilders_views__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./statebuilders/views */ "./node_modules/@uirouter/angularjs/lib-esm/statebuilders/views.js"); -/* harmony import */ var _templateFactory__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./templateFactory */ "./node_modules/@uirouter/angularjs/lib-esm/templateFactory.js"); -/* harmony import */ var _stateProvider__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./stateProvider */ "./node_modules/@uirouter/angularjs/lib-esm/stateProvider.js"); -/* harmony import */ var _statebuilders_onEnterExitRetain__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./statebuilders/onEnterExitRetain */ "./node_modules/@uirouter/angularjs/lib-esm/statebuilders/onEnterExitRetain.js"); -/* harmony import */ var _locationServices__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./locationServices */ "./node_modules/@uirouter/angularjs/lib-esm/locationServices.js"); -/* harmony import */ var _urlRouterProvider__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./urlRouterProvider */ "./node_modules/@uirouter/angularjs/lib-esm/urlRouterProvider.js"); -/* eslint-disable @typescript-eslint/no-empty-function */ -/* eslint-disable @typescript-eslint/no-unused-vars */ -/** - * # Angular 1 types - * - * UI-Router core provides various Typescript types which you can use for code completion and validating parameter values, etc. - * The customizations to the core types for Angular UI-Router are documented here. - * - * The optional [[$resolve]] service is also documented here. - * - * @preferred @publicapi @module ng1 - */ /** */ - - - - - - - - -_angular__WEBPACK_IMPORTED_MODULE_0__.ng.module('ui.router.angular1', []); -var mod_init = _angular__WEBPACK_IMPORTED_MODULE_0__.ng.module('ui.router.init', ['ng']); -var mod_util = _angular__WEBPACK_IMPORTED_MODULE_0__.ng.module('ui.router.util', ['ui.router.init']); -var mod_rtr = _angular__WEBPACK_IMPORTED_MODULE_0__.ng.module('ui.router.router', ['ui.router.util']); -var mod_state = _angular__WEBPACK_IMPORTED_MODULE_0__.ng.module('ui.router.state', ['ui.router.router', 'ui.router.util', 'ui.router.angular1']); -var mod_main = _angular__WEBPACK_IMPORTED_MODULE_0__.ng.module('ui.router', ['ui.router.init', 'ui.router.state', 'ui.router.angular1']); -var mod_cmpt = _angular__WEBPACK_IMPORTED_MODULE_0__.ng.module('ui.router.compat', ['ui.router']); -var router = null; -$uiRouterProvider.$inject = ['$locationProvider']; -/** This angular 1 provider instantiates a Router and exposes its services via the angular injector */ -function $uiRouterProvider($locationProvider) { - // Create a new instance of the Router when the $uiRouterProvider is initialized - router = this.router = new _uirouter_core__WEBPACK_IMPORTED_MODULE_1__.UIRouter(); - router.stateProvider = new _stateProvider__WEBPACK_IMPORTED_MODULE_4__.StateProvider(router.stateRegistry, router.stateService); - // Apply ng1 specific StateBuilder code for `views`, `resolve`, and `onExit/Retain/Enter` properties - router.stateRegistry.decorator('views', _statebuilders_views__WEBPACK_IMPORTED_MODULE_2__.ng1ViewsBuilder); - router.stateRegistry.decorator('onExit', (0,_statebuilders_onEnterExitRetain__WEBPACK_IMPORTED_MODULE_5__.getStateHookBuilder)('onExit')); - router.stateRegistry.decorator('onRetain', (0,_statebuilders_onEnterExitRetain__WEBPACK_IMPORTED_MODULE_5__.getStateHookBuilder)('onRetain')); - router.stateRegistry.decorator('onEnter', (0,_statebuilders_onEnterExitRetain__WEBPACK_IMPORTED_MODULE_5__.getStateHookBuilder)('onEnter')); - router.viewService._pluginapi._viewConfigFactory('ng1', (0,_statebuilders_views__WEBPACK_IMPORTED_MODULE_2__.getNg1ViewConfigFactory)()); - // Disable decoding of params by UrlMatcherFactory because $location already handles this - router.urlService.config._decodeParams = false; - var ng1LocationService = (router.locationService = router.locationConfig = new _locationServices__WEBPACK_IMPORTED_MODULE_6__.Ng1LocationServices($locationProvider)); - _locationServices__WEBPACK_IMPORTED_MODULE_6__.Ng1LocationServices.monkeyPatchPathParameterType(router); - // backwards compat: also expose router instance as $uiRouterProvider.router - router['router'] = router; - router['$get'] = $get; - $get.$inject = ['$location', '$browser', '$window', '$sniffer', '$rootScope', '$http', '$templateCache']; - function $get($location, $browser, $window, $sniffer, $rootScope, $http, $templateCache) { - ng1LocationService._runtimeServices($rootScope, $location, $sniffer, $browser, $window); - delete router['router']; - delete router['$get']; - return router; - } - return router; -} -var getProviderFor = function (serviceName) { return [ - '$uiRouterProvider', - function ($urp) { - var service = $urp.router[serviceName]; - service['$get'] = function () { return service; }; - return service; - }, -]; }; -// This effectively calls $get() on `$uiRouterProvider` to trigger init (when ng enters runtime) -runBlock.$inject = ['$injector', '$q', '$uiRouter']; -function runBlock($injector, $q, $uiRouter) { - _uirouter_core__WEBPACK_IMPORTED_MODULE_1__.services.$injector = $injector; - _uirouter_core__WEBPACK_IMPORTED_MODULE_1__.services.$q = $q; - // https://github.com/angular-ui/ui-router/issues/3678 - if (!Object.prototype.hasOwnProperty.call($injector, 'strictDi')) { - try { - $injector.invoke(function (checkStrictDi) { }); - } - catch (error) { - $injector.strictDi = !!/strict mode/.exec(error && error.toString()); - } - } - // The $injector is now available. - // Find any resolvables that had dependency annotation deferred - $uiRouter.stateRegistry - .get() - .map(function (x) { return x.$$state().resolvables; }) - .reduce(_uirouter_core__WEBPACK_IMPORTED_MODULE_1__.unnestR, []) - .filter(function (x) { return x.deps === 'deferred'; }) - .forEach(function (resolvable) { return (resolvable.deps = $injector.annotate(resolvable.resolveFn, $injector.strictDi)); }); -} -// $urlRouter service and $urlRouterProvider -var getUrlRouterProvider = function (uiRouter) { return (uiRouter.urlRouterProvider = new _urlRouterProvider__WEBPACK_IMPORTED_MODULE_7__.UrlRouterProvider(uiRouter)); }; -// $state service and $stateProvider -// $urlRouter service and $urlRouterProvider -var getStateProvider = function () { return (0,_uirouter_core__WEBPACK_IMPORTED_MODULE_1__.extend)(router.stateProvider, { $get: function () { return router.stateService; } }); }; -watchDigests.$inject = ['$rootScope']; -function watchDigests($rootScope) { - $rootScope.$watch(function () { - _uirouter_core__WEBPACK_IMPORTED_MODULE_1__.trace.approximateDigests++; - }); -} -mod_init.provider('$uiRouter', $uiRouterProvider); -mod_rtr.provider('$urlRouter', ['$uiRouterProvider', getUrlRouterProvider]); -mod_util.provider('$urlService', getProviderFor('urlService')); -mod_util.provider('$urlMatcherFactory', ['$uiRouterProvider', function () { return router.urlMatcherFactory; }]); -mod_util.provider('$templateFactory', function () { return new _templateFactory__WEBPACK_IMPORTED_MODULE_3__.TemplateFactory(); }); -mod_state.provider('$stateRegistry', getProviderFor('stateRegistry')); -mod_state.provider('$uiRouterGlobals', getProviderFor('globals')); -mod_state.provider('$transitions', getProviderFor('transitionService')); -mod_state.provider('$state', ['$uiRouterProvider', getStateProvider]); -mod_state.factory('$stateParams', ['$uiRouter', function ($uiRouter) { return $uiRouter.globals.params; }]); -mod_main.factory('$view', function () { return router.viewService; }); -mod_main.service('$trace', function () { return _uirouter_core__WEBPACK_IMPORTED_MODULE_1__.trace; }); -mod_main.run(watchDigests); -mod_util.run(['$urlMatcherFactory', function ($urlMatcherFactory) { }]); -mod_state.run(['$state', function ($state) { }]); -mod_rtr.run(['$urlRouter', function ($urlRouter) { }]); -mod_init.run(runBlock); -/** @hidden TODO: find a place to move this */ -var getLocals = function (ctx) { - var tokens = ctx.getTokens().filter(_uirouter_core__WEBPACK_IMPORTED_MODULE_1__.isString); - var tuples = tokens.map(function (key) { - var resolvable = ctx.getResolvable(key); - var waitPolicy = ctx.getPolicy(resolvable).async; - return [key, waitPolicy === 'NOWAIT' ? resolvable.promise : resolvable.data]; - }); - return tuples.reduce(_uirouter_core__WEBPACK_IMPORTED_MODULE_1__.applyPairs, {}); -}; -//# sourceMappingURL=services.js.map - -/***/ }), - -/***/ "./node_modules/@uirouter/angularjs/lib-esm/stateFilters.js": -/*!******************************************************************!*\ - !*** ./node_modules/@uirouter/angularjs/lib-esm/stateFilters.js ***! - \******************************************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "$IsStateFilter": () => (/* binding */ $IsStateFilter), -/* harmony export */ "$IncludedByStateFilter": () => (/* binding */ $IncludedByStateFilter) -/* harmony export */ }); -/* harmony import */ var _angular__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./angular */ "./node_modules/@uirouter/angularjs/lib-esm/angular.js"); -/** @publicapi @module ng1 */ /** */ - -/** - * `isState` Filter: truthy if the current state is the parameter - * - * Translates to [[StateService.is]] `$state.is("stateName")`. - * - * #### Example: - * ```html - *
    show if state is 'stateName'
    - * ``` - */ -$IsStateFilter.$inject = ['$state']; -function $IsStateFilter($state) { - var isFilter = function (state, params, options) { - return $state.is(state, params, options); - }; - isFilter.$stateful = true; - return isFilter; -} -/** - * `includedByState` Filter: truthy if the current state includes the parameter - * - * Translates to [[StateService.includes]]` $state.is("fullOrPartialStateName")`. - * - * #### Example: - * ```html - *
    show if state includes 'fullOrPartialStateName'
    - * ``` - */ -$IncludedByStateFilter.$inject = ['$state']; -function $IncludedByStateFilter($state) { - var includesFilter = function (state, params, options) { - return $state.includes(state, params, options); - }; - includesFilter.$stateful = true; - return includesFilter; -} -_angular__WEBPACK_IMPORTED_MODULE_0__.ng.module('ui.router.state').filter('isState', $IsStateFilter).filter('includedByState', $IncludedByStateFilter); - -//# sourceMappingURL=stateFilters.js.map - -/***/ }), - -/***/ "./node_modules/@uirouter/angularjs/lib-esm/stateProvider.js": -/*!*******************************************************************!*\ - !*** ./node_modules/@uirouter/angularjs/lib-esm/stateProvider.js ***! - \*******************************************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "StateProvider": () => (/* binding */ StateProvider) -/* harmony export */ }); -/* harmony import */ var _uirouter_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @uirouter/core */ "./node_modules/@uirouter/core/lib-esm/index.js"); -/** @publicapi @module ng1 */ /** */ - -/** - * The Angular 1 `StateProvider` - * - * The `$stateProvider` works similar to Angular's v1 router, but it focuses purely - * on state. - * - * A state corresponds to a "place" in the application in terms of the overall UI and - * navigation. A state describes (via the controller / template / view properties) what - * the UI looks like and does at that place. - * - * States often have things in common, and the primary way of factoring out these - * commonalities in this model is via the state hierarchy, i.e. parent/child states aka - * nested states. - * - * The `$stateProvider` provides interfaces to declare these states for your app. - */ -var StateProvider = /** @class */ (function () { - function StateProvider(stateRegistry, stateService) { - this.stateRegistry = stateRegistry; - this.stateService = stateService; - (0,_uirouter_core__WEBPACK_IMPORTED_MODULE_0__.createProxyFunctions)((0,_uirouter_core__WEBPACK_IMPORTED_MODULE_0__.val)(StateProvider.prototype), this, (0,_uirouter_core__WEBPACK_IMPORTED_MODULE_0__.val)(this)); - } - /** - * Decorates states when they are registered - * - * Allows you to extend (carefully) or override (at your own peril) the - * `stateBuilder` object used internally by [[StateRegistry]]. - * This can be used to add custom functionality to ui-router, - * for example inferring templateUrl based on the state name. - * - * When passing only a name, it returns the current (original or decorated) builder - * function that matches `name`. - * - * The builder functions that can be decorated are listed below. Though not all - * necessarily have a good use case for decoration, that is up to you to decide. - * - * In addition, users can attach custom decorators, which will generate new - * properties within the state's internal definition. There is currently no clear - * use-case for this beyond accessing internal states (i.e. $state.$current), - * however, expect this to become increasingly relevant as we introduce additional - * meta-programming features. - * - * **Warning**: Decorators should not be interdependent because the order of - * execution of the builder functions in non-deterministic. Builder functions - * should only be dependent on the state definition object and super function. - * - * - * Existing builder functions and current return values: - * - * - **parent** `{object}` - returns the parent state object. - * - **data** `{object}` - returns state data, including any inherited data that is not - * overridden by own values (if any). - * - **url** `{object}` - returns a {@link ui.router.util.type:UrlMatcher UrlMatcher} - * or `null`. - * - **navigable** `{object}` - returns closest ancestor state that has a URL (aka is - * navigable). - * - **params** `{object}` - returns an array of state params that are ensured to - * be a super-set of parent's params. - * - **views** `{object}` - returns a views object where each key is an absolute view - * name (i.e. "viewName@stateName") and each value is the config object - * (template, controller) for the view. Even when you don't use the views object - * explicitly on a state config, one is still created for you internally. - * So by decorating this builder function you have access to decorating template - * and controller properties. - * - **ownParams** `{object}` - returns an array of params that belong to the state, - * not including any params defined by ancestor states. - * - **path** `{string}` - returns the full path from the root down to this state. - * Needed for state activation. - * - **includes** `{object}` - returns an object that includes every state that - * would pass a `$state.includes()` test. - * - * #### Example: - * Override the internal 'views' builder with a function that takes the state - * definition, and a reference to the internal function being overridden: - * ```js - * $stateProvider.decorator('views', function (state, parent) { - * let result = {}, - * views = parent(state); - * - * angular.forEach(views, function (config, name) { - * let autoName = (state.name + '.' + name).replace('.', '/'); - * config.templateUrl = config.templateUrl || '/partials/' + autoName + '.html'; - * result[name] = config; - * }); - * return result; - * }); - * - * $stateProvider.state('home', { - * views: { - * 'contact.list': { controller: 'ListController' }, - * 'contact.item': { controller: 'ItemController' } - * } - * }); - * ``` - * - * - * ```js - * // Auto-populates list and item views with /partials/home/contact/list.html, - * // and /partials/home/contact/item.html, respectively. - * $state.go('home'); - * ``` - * - * @param {string} name The name of the builder function to decorate. - * @param {object} func A function that is responsible for decorating the original - * builder function. The function receives two parameters: - * - * - `{object}` - state - The state config object. - * - `{object}` - super - The original builder function. - * - * @return {object} $stateProvider - $stateProvider instance - */ - StateProvider.prototype.decorator = function (name, func) { - return this.stateRegistry.decorator(name, func) || this; - }; - StateProvider.prototype.state = function (name, definition) { - if ((0,_uirouter_core__WEBPACK_IMPORTED_MODULE_0__.isObject)(name)) { - definition = name; - } - else { - definition.name = name; - } - this.stateRegistry.register(definition); - return this; - }; - /** - * Registers an invalid state handler - * - * This is a passthrough to [[StateService.onInvalid]] for ng1. - */ - StateProvider.prototype.onInvalid = function (callback) { - return this.stateService.onInvalid(callback); - }; - return StateProvider; -}()); - -//# sourceMappingURL=stateProvider.js.map - -/***/ }), - -/***/ "./node_modules/@uirouter/angularjs/lib-esm/statebuilders/onEnterExitRetain.js": -/*!*************************************************************************************!*\ - !*** ./node_modules/@uirouter/angularjs/lib-esm/statebuilders/onEnterExitRetain.js ***! - \*************************************************************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "getStateHookBuilder": () => (/* binding */ getStateHookBuilder) -/* harmony export */ }); -/* harmony import */ var _uirouter_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @uirouter/core */ "./node_modules/@uirouter/core/lib-esm/index.js"); -/* harmony import */ var _services__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../services */ "./node_modules/@uirouter/angularjs/lib-esm/services.js"); -/** @publicapi @module ng1 */ /** */ - - -/** - * This is a [[StateBuilder.builder]] function for angular1 `onEnter`, `onExit`, - * `onRetain` callback hooks on a [[Ng1StateDeclaration]]. - * - * When the [[StateBuilder]] builds a [[StateObject]] object from a raw [[StateDeclaration]], this builder - * ensures that those hooks are injectable for @uirouter/angularjs (ng1). - * - * @internalapi - */ -var getStateHookBuilder = function (hookName) { - return function stateHookBuilder(stateObject) { - var hook = stateObject[hookName]; - var pathname = hookName === 'onExit' ? 'from' : 'to'; - function decoratedNg1Hook(trans, state) { - var resolveContext = new _uirouter_core__WEBPACK_IMPORTED_MODULE_0__.ResolveContext(trans.treeChanges(pathname)); - var subContext = resolveContext.subContext(state.$$state()); - var locals = (0,_uirouter_core__WEBPACK_IMPORTED_MODULE_0__.extend)((0,_services__WEBPACK_IMPORTED_MODULE_1__.getLocals)(subContext), { $state$: state, $transition$: trans }); - return _uirouter_core__WEBPACK_IMPORTED_MODULE_0__.services.$injector.invoke(hook, this, locals); - } - return hook ? decoratedNg1Hook : undefined; - }; -}; -//# sourceMappingURL=onEnterExitRetain.js.map - -/***/ }), - -/***/ "./node_modules/@uirouter/angularjs/lib-esm/statebuilders/views.js": -/*!*************************************************************************!*\ - !*** ./node_modules/@uirouter/angularjs/lib-esm/statebuilders/views.js ***! - \*************************************************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "getNg1ViewConfigFactory": () => (/* binding */ getNg1ViewConfigFactory), -/* harmony export */ "ng1ViewsBuilder": () => (/* binding */ ng1ViewsBuilder), -/* harmony export */ "Ng1ViewConfig": () => (/* binding */ Ng1ViewConfig) -/* harmony export */ }); -/* harmony import */ var _uirouter_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @uirouter/core */ "./node_modules/@uirouter/core/lib-esm/index.js"); -/** @publicapi @module ng1 */ /** */ - -/** @internalapi */ -function getNg1ViewConfigFactory() { - var templateFactory = null; - return function (path, view) { - templateFactory = templateFactory || _uirouter_core__WEBPACK_IMPORTED_MODULE_0__.services.$injector.get('$templateFactory'); - return [new Ng1ViewConfig(path, view, templateFactory)]; - }; -} -/** @internalapi */ -var hasAnyKey = function (keys, obj) { return keys.reduce(function (acc, key) { return acc || (0,_uirouter_core__WEBPACK_IMPORTED_MODULE_0__.isDefined)(obj[key]); }, false); }; -/** - * This is a [[StateBuilder.builder]] function for angular1 `views`. - * - * When the [[StateBuilder]] builds a [[StateObject]] object from a raw [[StateDeclaration]], this builder - * handles the `views` property with logic specific to @uirouter/angularjs (ng1). - * - * If no `views: {}` property exists on the [[StateDeclaration]], then it creates the `views` object - * and applies the state-level configuration to a view named `$default`. - * - * @internalapi - */ -function ng1ViewsBuilder(state) { - // Do not process root state - if (!state.parent) - return {}; - var tplKeys = ['templateProvider', 'templateUrl', 'template', 'notify', 'async'], ctrlKeys = ['controller', 'controllerProvider', 'controllerAs', 'resolveAs'], compKeys = ['component', 'bindings', 'componentProvider'], nonCompKeys = tplKeys.concat(ctrlKeys), allViewKeys = compKeys.concat(nonCompKeys); - // Do not allow a state to have both state-level props and also a `views: {}` property. - // A state without a `views: {}` property can declare properties for the `$default` view as properties of the state. - // However, the `$default` approach should not be mixed with a separate `views: ` block. - if ((0,_uirouter_core__WEBPACK_IMPORTED_MODULE_0__.isDefined)(state.views) && hasAnyKey(allViewKeys, state)) { - throw new Error("State '" + state.name + "' has a 'views' object. " + - "It cannot also have \"view properties\" at the state level. " + - "Move the following properties into a view (in the 'views' object): " + - (" " + allViewKeys.filter(function (key) { return (0,_uirouter_core__WEBPACK_IMPORTED_MODULE_0__.isDefined)(state[key]); }).join(', '))); - } - var views = {}, viewsObject = state.views || { $default: (0,_uirouter_core__WEBPACK_IMPORTED_MODULE_0__.pick)(state, allViewKeys) }; - (0,_uirouter_core__WEBPACK_IMPORTED_MODULE_0__.forEach)(viewsObject, function (config, name) { - // Account for views: { "": { template... } } - name = name || '$default'; - // Account for views: { header: "headerComponent" } - if ((0,_uirouter_core__WEBPACK_IMPORTED_MODULE_0__.isString)(config)) - config = { component: config }; - // Make a shallow copy of the config object - config = (0,_uirouter_core__WEBPACK_IMPORTED_MODULE_0__.extend)({}, config); - // Do not allow a view to mix props for component-style view with props for template/controller-style view - if (hasAnyKey(compKeys, config) && hasAnyKey(nonCompKeys, config)) { - throw new Error("Cannot combine: " + compKeys.join('|') + " with: " + nonCompKeys.join('|') + " in stateview: '" + name + "@" + state.name + "'"); - } - config.resolveAs = config.resolveAs || '$resolve'; - config.$type = 'ng1'; - config.$context = state; - config.$name = name; - var normalized = _uirouter_core__WEBPACK_IMPORTED_MODULE_0__.ViewService.normalizeUIViewTarget(config.$context, config.$name); - config.$uiViewName = normalized.uiViewName; - config.$uiViewContextAnchor = normalized.uiViewContextAnchor; - views[name] = config; - }); - return views; -} -/** @hidden */ -var id = 0; -/** @internalapi */ -var Ng1ViewConfig = /** @class */ (function () { - function Ng1ViewConfig(path, viewDecl, factory) { - var _this = this; - this.path = path; - this.viewDecl = viewDecl; - this.factory = factory; - this.$id = id++; - this.loaded = false; - this.getTemplate = function (uiView, context) { - return _this.component - ? _this.factory.makeComponentTemplate(uiView, context, _this.component, _this.viewDecl.bindings) - : _this.template; - }; - } - Ng1ViewConfig.prototype.load = function () { - var _this = this; - var $q = _uirouter_core__WEBPACK_IMPORTED_MODULE_0__.services.$q; - var context = new _uirouter_core__WEBPACK_IMPORTED_MODULE_0__.ResolveContext(this.path); - var params = this.path.reduce(function (acc, node) { return (0,_uirouter_core__WEBPACK_IMPORTED_MODULE_0__.extend)(acc, node.paramValues); }, {}); - var promises = { - template: $q.when(this.factory.fromConfig(this.viewDecl, params, context)), - controller: $q.when(this.getController(context)), - }; - return $q.all(promises).then(function (results) { - _uirouter_core__WEBPACK_IMPORTED_MODULE_0__.trace.traceViewServiceEvent('Loaded', _this); - _this.controller = results.controller; - (0,_uirouter_core__WEBPACK_IMPORTED_MODULE_0__.extend)(_this, results.template); // Either { template: "tpl" } or { component: "cmpName" } - return _this; - }); - }; - /** - * Gets the controller for a view configuration. - * - * @returns {Function|Promise.} Returns a controller, or a promise that resolves to a controller. - */ - Ng1ViewConfig.prototype.getController = function (context) { - var provider = this.viewDecl.controllerProvider; - if (!(0,_uirouter_core__WEBPACK_IMPORTED_MODULE_0__.isInjectable)(provider)) - return this.viewDecl.controller; - var deps = _uirouter_core__WEBPACK_IMPORTED_MODULE_0__.services.$injector.annotate(provider); - var providerFn = (0,_uirouter_core__WEBPACK_IMPORTED_MODULE_0__.isArray)(provider) ? (0,_uirouter_core__WEBPACK_IMPORTED_MODULE_0__.tail)(provider) : provider; - var resolvable = new _uirouter_core__WEBPACK_IMPORTED_MODULE_0__.Resolvable('', providerFn, deps); - return resolvable.get(context); - }; - return Ng1ViewConfig; -}()); - -//# sourceMappingURL=views.js.map - -/***/ }), - -/***/ "./node_modules/@uirouter/angularjs/lib-esm/templateFactory.js": -/*!*********************************************************************!*\ - !*** ./node_modules/@uirouter/angularjs/lib-esm/templateFactory.js ***! - \*********************************************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "TemplateFactory": () => (/* binding */ TemplateFactory) -/* harmony export */ }); -/* harmony import */ var _angular__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./angular */ "./node_modules/@uirouter/angularjs/lib-esm/angular.js"); -/* harmony import */ var _uirouter_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @uirouter/core */ "./node_modules/@uirouter/core/lib-esm/index.js"); -/** @publicapi @module view */ /** */ - - -/** - * Service which manages loading of templates from a ViewConfig. - */ -var TemplateFactory = /** @class */ (function () { - function TemplateFactory() { - var _this = this; - /** @hidden */ this._useHttp = _angular__WEBPACK_IMPORTED_MODULE_0__.ng.version.minor < 3; - /** @hidden */ this.$get = [ - '$http', - '$templateCache', - '$injector', - function ($http, $templateCache, $injector) { - _this.$templateRequest = $injector.has && $injector.has('$templateRequest') && $injector.get('$templateRequest'); - _this.$http = $http; - _this.$templateCache = $templateCache; - return _this; - }, - ]; - } - /** @hidden */ - TemplateFactory.prototype.useHttpService = function (value) { - this._useHttp = value; - }; - /** - * Creates a template from a configuration object. - * - * @param config Configuration object for which to load a template. - * The following properties are search in the specified order, and the first one - * that is defined is used to create the template: - * - * @param params Parameters to pass to the template function. - * @param context The resolve context associated with the template's view - * - * @return {string|object} The template html as a string, or a promise for - * that string,or `null` if no template is configured. - */ - TemplateFactory.prototype.fromConfig = function (config, params, context) { - var defaultTemplate = ''; - var asTemplate = function (result) { return _uirouter_core__WEBPACK_IMPORTED_MODULE_1__.services.$q.when(result).then(function (str) { return ({ template: str }); }); }; - var asComponent = function (result) { return _uirouter_core__WEBPACK_IMPORTED_MODULE_1__.services.$q.when(result).then(function (str) { return ({ component: str }); }); }; - return (0,_uirouter_core__WEBPACK_IMPORTED_MODULE_1__.isDefined)(config.template) - ? asTemplate(this.fromString(config.template, params)) - : (0,_uirouter_core__WEBPACK_IMPORTED_MODULE_1__.isDefined)(config.templateUrl) - ? asTemplate(this.fromUrl(config.templateUrl, params)) - : (0,_uirouter_core__WEBPACK_IMPORTED_MODULE_1__.isDefined)(config.templateProvider) - ? asTemplate(this.fromProvider(config.templateProvider, params, context)) - : (0,_uirouter_core__WEBPACK_IMPORTED_MODULE_1__.isDefined)(config.component) - ? asComponent(config.component) - : (0,_uirouter_core__WEBPACK_IMPORTED_MODULE_1__.isDefined)(config.componentProvider) - ? asComponent(this.fromComponentProvider(config.componentProvider, params, context)) - : asTemplate(defaultTemplate); - }; - /** - * Creates a template from a string or a function returning a string. - * - * @param template html template as a string or function that returns an html template as a string. - * @param params Parameters to pass to the template function. - * - * @return {string|object} The template html as a string, or a promise for that - * string. - */ - TemplateFactory.prototype.fromString = function (template, params) { - return (0,_uirouter_core__WEBPACK_IMPORTED_MODULE_1__.isFunction)(template) ? template(params) : template; - }; - /** - * Loads a template from the a URL via `$http` and `$templateCache`. - * - * @param {string|Function} url url of the template to load, or a function - * that returns a url. - * @param {Object} params Parameters to pass to the url function. - * @return {string|Promise.} The template html as a string, or a promise - * for that string. - */ - TemplateFactory.prototype.fromUrl = function (url, params) { - if ((0,_uirouter_core__WEBPACK_IMPORTED_MODULE_1__.isFunction)(url)) - url = url(params); - if (url == null) - return null; - if (this._useHttp) { - return this.$http - .get(url, { cache: this.$templateCache, headers: { Accept: 'text/html' } }) - .then(function (response) { - return response.data; - }); - } - return this.$templateRequest(url); - }; - /** - * Creates a template by invoking an injectable provider function. - * - * @param provider Function to invoke via `locals` - * @param {Function} injectFn a function used to invoke the template provider - * @return {string|Promise.} The template html as a string, or a promise - * for that string. - */ - TemplateFactory.prototype.fromProvider = function (provider, params, context) { - var deps = _uirouter_core__WEBPACK_IMPORTED_MODULE_1__.services.$injector.annotate(provider); - var providerFn = (0,_uirouter_core__WEBPACK_IMPORTED_MODULE_1__.isArray)(provider) ? (0,_uirouter_core__WEBPACK_IMPORTED_MODULE_1__.tail)(provider) : provider; - var resolvable = new _uirouter_core__WEBPACK_IMPORTED_MODULE_1__.Resolvable('', providerFn, deps); - return resolvable.get(context); - }; - /** - * Creates a component's template by invoking an injectable provider function. - * - * @param provider Function to invoke via `locals` - * @param {Function} injectFn a function used to invoke the template provider - * @return {string} The template html as a string: "". - */ - TemplateFactory.prototype.fromComponentProvider = function (provider, params, context) { - var deps = _uirouter_core__WEBPACK_IMPORTED_MODULE_1__.services.$injector.annotate(provider); - var providerFn = (0,_uirouter_core__WEBPACK_IMPORTED_MODULE_1__.isArray)(provider) ? (0,_uirouter_core__WEBPACK_IMPORTED_MODULE_1__.tail)(provider) : provider; - var resolvable = new _uirouter_core__WEBPACK_IMPORTED_MODULE_1__.Resolvable('', providerFn, deps); - return resolvable.get(context); - }; - /** - * Creates a template from a component's name - * - * This implements route-to-component. - * It works by retrieving the component (directive) metadata from the injector. - * It analyses the component's bindings, then constructs a template that instantiates the component. - * The template wires input and output bindings to resolves or from the parent component. - * - * @param uiView {object} The parent ui-view (for binding outputs to callbacks) - * @param context The ResolveContext (for binding outputs to callbacks returned from resolves) - * @param component {string} Component's name in camel case. - * @param bindings An object defining the component's bindings: {foo: '<'} - * @return {string} The template as a string: "". - */ - TemplateFactory.prototype.makeComponentTemplate = function (uiView, context, component, bindings) { - bindings = bindings || {}; - // Bind once prefix - var prefix = _angular__WEBPACK_IMPORTED_MODULE_0__.ng.version.minor >= 3 ? '::' : ''; - // Convert to kebob name. Add x- prefix if the string starts with `x-` or `data-` - var kebob = function (camelCase) { - var kebobed = (0,_uirouter_core__WEBPACK_IMPORTED_MODULE_1__.kebobString)(camelCase); - return /^(x|data)-/.exec(kebobed) ? "x-" + kebobed : kebobed; - }; - var attributeTpl = function (input) { - var name = input.name, type = input.type; - var attrName = kebob(name); - // If the ui-view has an attribute which matches a binding on the routed component - // then pass that attribute through to the routed component template. - // Prefer ui-view wired mappings to resolve data, unless the resolve was explicitly bound using `bindings:` - if (uiView.attr(attrName) && !bindings[name]) - return attrName + "='" + uiView.attr(attrName) + "'"; - var resolveName = bindings[name] || name; - // Pre-evaluate the expression for "@" bindings by enclosing in {{ }} - // some-attr="{{ ::$resolve.someResolveName }}" - if (type === '@') - return attrName + "='{{" + prefix + "$resolve." + resolveName + "}}'"; - // Wire "&" callbacks to resolves that return a callback function - // Get the result of the resolve (should be a function) and annotate it to get its arguments. - // some-attr="$resolve.someResolveResultName(foo, bar)" - if (type === '&') { - var res = context.getResolvable(resolveName); - var fn = res && res.data; - var args = (fn && _uirouter_core__WEBPACK_IMPORTED_MODULE_1__.services.$injector.annotate(fn)) || []; - // account for array style injection, i.e., ['foo', function(foo) {}] - var arrayIdxStr = (0,_uirouter_core__WEBPACK_IMPORTED_MODULE_1__.isArray)(fn) ? "[" + (fn.length - 1) + "]" : ''; - return attrName + "='$resolve." + resolveName + arrayIdxStr + "(" + args.join(',') + ")'"; - } - // some-attr="::$resolve.someResolveName" - return attrName + "='" + prefix + "$resolve." + resolveName + "'"; - }; - var attrs = getComponentBindings(component).map(attributeTpl).join(' '); - var kebobName = kebob(component); - return "<" + kebobName + " " + attrs + ">"; - }; - return TemplateFactory; -}()); - -// Gets all the directive(s)' inputs ('@', '=', and '<') and outputs ('&') -function getComponentBindings(name) { - var cmpDefs = _uirouter_core__WEBPACK_IMPORTED_MODULE_1__.services.$injector.get(name + 'Directive'); // could be multiple - if (!cmpDefs || !cmpDefs.length) - throw new Error("Unable to find component named '" + name + "'"); - return cmpDefs.map(getBindings).reduce(_uirouter_core__WEBPACK_IMPORTED_MODULE_1__.unnestR, []); -} -// Given a directive definition, find its object input attributes -// Use different properties, depending on the type of directive (component, bindToController, normal) -var getBindings = function (def) { - if ((0,_uirouter_core__WEBPACK_IMPORTED_MODULE_1__.isObject)(def.bindToController)) - return scopeBindings(def.bindToController); - return scopeBindings(def.scope); -}; -// for ng 1.2 style, process the scope: { input: "=foo" } -// for ng 1.3 through ng 1.5, process the component's bindToController: { input: "=foo" } object -var scopeBindings = function (bindingsObj) { - return Object.keys(bindingsObj || {}) - // [ 'input', [ '=foo', '=', 'foo' ] ] - .map(function (key) { return [key, /^([=<@&])[?]?(.*)/.exec(bindingsObj[key])]; }) - // skip malformed values - .filter(function (tuple) { return (0,_uirouter_core__WEBPACK_IMPORTED_MODULE_1__.isDefined)(tuple) && (0,_uirouter_core__WEBPACK_IMPORTED_MODULE_1__.isArray)(tuple[1]); }) - // { name: ('foo' || 'input'), type: '=' } - .map(function (tuple) { return ({ name: tuple[1][2] || tuple[0], type: tuple[1][1] }); }); -}; -//# sourceMappingURL=templateFactory.js.map - -/***/ }), - -/***/ "./node_modules/@uirouter/angularjs/lib-esm/urlRouterProvider.js": -/*!***********************************************************************!*\ - !*** ./node_modules/@uirouter/angularjs/lib-esm/urlRouterProvider.js ***! - \***********************************************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "UrlRouterProvider": () => (/* binding */ UrlRouterProvider) -/* harmony export */ }); -/* harmony import */ var _uirouter_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @uirouter/core */ "./node_modules/@uirouter/core/lib-esm/index.js"); -/** @publicapi @module url */ /** */ - - -/** - * Manages rules for client-side URL - * - * ### Deprecation warning: - * This class is now considered to be an internal API - * Use the [[UrlService]] instead. - * For configuring URL rules, use the [[UrlRulesApi]] which can be found as [[UrlService.rules]]. - * - * This class manages the router rules for what to do when the URL changes. - * - * This provider remains for backwards compatibility. - * - * @internalapi - * @deprecated - */ -var UrlRouterProvider = /** @class */ (function () { - /** @hidden */ - function UrlRouterProvider(/** @hidden */ router) { - this.router = router; - } - UrlRouterProvider.injectableHandler = function (router, handler) { - return function (match) { return _uirouter_core__WEBPACK_IMPORTED_MODULE_0__.services.$injector.invoke(handler, null, { $match: match, $stateParams: router.globals.params }); }; - }; - /** @hidden */ - UrlRouterProvider.prototype.$get = function () { - var urlService = this.router.urlService; - this.router.urlRouter.update(true); - if (!urlService.interceptDeferred) - urlService.listen(); - return this.router.urlRouter; - }; - /** - * Registers a url handler function. - * - * Registers a low level url handler (a `rule`). - * A rule detects specific URL patterns and returns a redirect, or performs some action. - * - * If a rule returns a string, the URL is replaced with the string, and all rules are fired again. - * - * #### Example: - * ```js - * var app = angular.module('app', ['ui.router.router']); - * - * app.config(function ($urlRouterProvider) { - * // Here's an example of how you might allow case insensitive urls - * $urlRouterProvider.rule(function ($injector, $location) { - * var path = $location.path(), - * normalized = path.toLowerCase(); - * - * if (path !== normalized) { - * return normalized; - * } - * }); - * }); - * ``` - * - * @param ruleFn - * Handler function that takes `$injector` and `$location` services as arguments. - * You can use them to detect a url and return a different url as a string. - * - * @return [[UrlRouterProvider]] (`this`) - */ - UrlRouterProvider.prototype.rule = function (ruleFn) { - var _this = this; - if (!(0,_uirouter_core__WEBPACK_IMPORTED_MODULE_0__.isFunction)(ruleFn)) - throw new Error("'rule' must be a function"); - var match = function () { return ruleFn(_uirouter_core__WEBPACK_IMPORTED_MODULE_0__.services.$injector, _this.router.locationService); }; - var rule = new _uirouter_core__WEBPACK_IMPORTED_MODULE_0__.BaseUrlRule(match, _uirouter_core__WEBPACK_IMPORTED_MODULE_0__.identity); - this.router.urlService.rules.rule(rule); - return this; - }; - /** - * Defines the path or behavior to use when no url can be matched. - * - * #### Example: - * ```js - * var app = angular.module('app', ['ui.router.router']); - * - * app.config(function ($urlRouterProvider) { - * // if the path doesn't match any of the urls you configured - * // otherwise will take care of routing the user to the - * // specified url - * $urlRouterProvider.otherwise('/index'); - * - * // Example of using function rule as param - * $urlRouterProvider.otherwise(function ($injector, $location) { - * return '/a/valid/url'; - * }); - * }); - * ``` - * - * @param rule - * The url path you want to redirect to or a function rule that returns the url path or performs a `$state.go()`. - * The function version is passed two params: `$injector` and `$location` services, and should return a url string. - * - * @return {object} `$urlRouterProvider` - `$urlRouterProvider` instance - */ - UrlRouterProvider.prototype.otherwise = function (rule) { - var _this = this; - var urlRules = this.router.urlService.rules; - if ((0,_uirouter_core__WEBPACK_IMPORTED_MODULE_0__.isString)(rule)) { - urlRules.otherwise(rule); - } - else if ((0,_uirouter_core__WEBPACK_IMPORTED_MODULE_0__.isFunction)(rule)) { - urlRules.otherwise(function () { return rule(_uirouter_core__WEBPACK_IMPORTED_MODULE_0__.services.$injector, _this.router.locationService); }); - } - else { - throw new Error("'rule' must be a string or function"); - } - return this; - }; - /** - * Registers a handler for a given url matching. - * - * If the handler is a string, it is - * treated as a redirect, and is interpolated according to the syntax of match - * (i.e. like `String.replace()` for `RegExp`, or like a `UrlMatcher` pattern otherwise). - * - * If the handler is a function, it is injectable. - * It gets invoked if `$location` matches. - * You have the option of inject the match object as `$match`. - * - * The handler can return - * - * - **falsy** to indicate that the rule didn't match after all, then `$urlRouter` - * will continue trying to find another one that matches. - * - **string** which is treated as a redirect and passed to `$location.url()` - * - **void** or any **truthy** value tells `$urlRouter` that the url was handled. - * - * #### Example: - * ```js - * var app = angular.module('app', ['ui.router.router']); - * - * app.config(function ($urlRouterProvider) { - * $urlRouterProvider.when($state.url, function ($match, $stateParams) { - * if ($state.$current.navigable !== state || - * !equalForKeys($match, $stateParams) { - * $state.transitionTo(state, $match, false); - * } - * }); - * }); - * ``` - * - * @param what A pattern string to match, compiled as a [[UrlMatcher]]. - * @param handler The path (or function that returns a path) that you want to redirect your user to. - * @param ruleCallback [optional] A callback that receives the `rule` registered with [[UrlMatcher.rule]] - * - * Note: the handler may also invoke arbitrary code, such as `$state.go()` - */ - UrlRouterProvider.prototype.when = function (what, handler) { - if ((0,_uirouter_core__WEBPACK_IMPORTED_MODULE_0__.isArray)(handler) || (0,_uirouter_core__WEBPACK_IMPORTED_MODULE_0__.isFunction)(handler)) { - handler = UrlRouterProvider.injectableHandler(this.router, handler); - } - this.router.urlService.rules.when(what, handler); - return this; - }; - /** - * Disables monitoring of the URL. - * - * Call this method before UI-Router has bootstrapped. - * It will stop UI-Router from performing the initial url sync. - * - * This can be useful to perform some asynchronous initialization before the router starts. - * Once the initialization is complete, call [[listen]] to tell UI-Router to start watching and synchronizing the URL. - * - * #### Example: - * ```js - * var app = angular.module('app', ['ui.router']); - * - * app.config(function ($urlRouterProvider) { - * // Prevent $urlRouter from automatically intercepting URL changes; - * $urlRouterProvider.deferIntercept(); - * }) - * - * app.run(function (MyService, $urlRouter, $http) { - * $http.get("/stuff").then(function(resp) { - * MyService.doStuff(resp.data); - * $urlRouter.listen(); - * $urlRouter.sync(); - * }); - * }); - * ``` - * - * @param defer Indicates whether to defer location change interception. - * Passing no parameter is equivalent to `true`. - */ - UrlRouterProvider.prototype.deferIntercept = function (defer) { - this.router.urlService.deferIntercept(defer); - }; - return UrlRouterProvider; -}()); - -//# sourceMappingURL=urlRouterProvider.js.map - -/***/ }), - -/***/ "./node_modules/@uirouter/angularjs/lib-esm/viewScroll.js": -/*!****************************************************************!*\ - !*** ./node_modules/@uirouter/angularjs/lib-esm/viewScroll.js ***! - \****************************************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _angular__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./angular */ "./node_modules/@uirouter/angularjs/lib-esm/angular.js"); -/** @publicapi @module ng1 */ /** */ - -/** @hidden */ -function $ViewScrollProvider() { - var useAnchorScroll = false; - this.useAnchorScroll = function () { - useAnchorScroll = true; - }; - this.$get = [ - '$anchorScroll', - '$timeout', - function ($anchorScroll, $timeout) { - if (useAnchorScroll) { - return $anchorScroll; - } - return function ($element) { - return $timeout(function () { - $element[0].scrollIntoView(); - }, 0, false); - }; - }, - ]; -} -_angular__WEBPACK_IMPORTED_MODULE_0__.ng.module('ui.router.state').provider('$uiViewScroll', $ViewScrollProvider); -//# sourceMappingURL=viewScroll.js.map - -/***/ }), - -/***/ "./node_modules/@uirouter/core/lib-esm/common/common.js": -/*!**************************************************************!*\ - !*** ./node_modules/@uirouter/core/lib-esm/common/common.js ***! - \**************************************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "root": () => (/* binding */ root), -/* harmony export */ "fromJson": () => (/* binding */ fromJson), -/* harmony export */ "toJson": () => (/* binding */ toJson), -/* harmony export */ "forEach": () => (/* binding */ forEach), -/* harmony export */ "extend": () => (/* binding */ extend), -/* harmony export */ "equals": () => (/* binding */ equals), -/* harmony export */ "identity": () => (/* binding */ identity), -/* harmony export */ "noop": () => (/* binding */ noop), -/* harmony export */ "createProxyFunctions": () => (/* binding */ createProxyFunctions), -/* harmony export */ "inherit": () => (/* binding */ inherit), -/* harmony export */ "inArray": () => (/* binding */ inArray), -/* harmony export */ "_inArray": () => (/* binding */ _inArray), -/* harmony export */ "removeFrom": () => (/* binding */ removeFrom), -/* harmony export */ "_removeFrom": () => (/* binding */ _removeFrom), -/* harmony export */ "pushTo": () => (/* binding */ pushTo), -/* harmony export */ "_pushTo": () => (/* binding */ _pushTo), -/* harmony export */ "deregAll": () => (/* binding */ deregAll), -/* harmony export */ "defaults": () => (/* binding */ defaults), -/* harmony export */ "mergeR": () => (/* binding */ mergeR), -/* harmony export */ "ancestors": () => (/* binding */ ancestors), -/* harmony export */ "pick": () => (/* binding */ pick), -/* harmony export */ "omit": () => (/* binding */ omit), -/* harmony export */ "pluck": () => (/* binding */ pluck), -/* harmony export */ "filter": () => (/* binding */ filter), -/* harmony export */ "find": () => (/* binding */ find), -/* harmony export */ "mapObj": () => (/* binding */ mapObj), -/* harmony export */ "map": () => (/* binding */ map), -/* harmony export */ "values": () => (/* binding */ values), -/* harmony export */ "allTrueR": () => (/* binding */ allTrueR), -/* harmony export */ "anyTrueR": () => (/* binding */ anyTrueR), -/* harmony export */ "unnestR": () => (/* binding */ unnestR), -/* harmony export */ "flattenR": () => (/* binding */ flattenR), -/* harmony export */ "pushR": () => (/* binding */ pushR), -/* harmony export */ "uniqR": () => (/* binding */ uniqR), -/* harmony export */ "unnest": () => (/* binding */ unnest), -/* harmony export */ "flatten": () => (/* binding */ flatten), -/* harmony export */ "assertPredicate": () => (/* binding */ assertPredicate), -/* harmony export */ "assertMap": () => (/* binding */ assertMap), -/* harmony export */ "assertFn": () => (/* binding */ assertFn), -/* harmony export */ "pairs": () => (/* binding */ pairs), -/* harmony export */ "arrayTuples": () => (/* binding */ arrayTuples), -/* harmony export */ "applyPairs": () => (/* binding */ applyPairs), -/* harmony export */ "tail": () => (/* binding */ tail), -/* harmony export */ "copy": () => (/* binding */ copy), -/* harmony export */ "_extend": () => (/* binding */ _extend), -/* harmony export */ "silenceUncaughtInPromise": () => (/* binding */ silenceUncaughtInPromise), -/* harmony export */ "silentRejection": () => (/* binding */ silentRejection) -/* harmony export */ }); -/* harmony import */ var _predicates__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./predicates */ "./node_modules/@uirouter/core/lib-esm/common/predicates.js"); -/* harmony import */ var _hof__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./hof */ "./node_modules/@uirouter/core/lib-esm/common/hof.js"); -/* harmony import */ var _coreservices__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./coreservices */ "./node_modules/@uirouter/core/lib-esm/common/coreservices.js"); -var __spreadArrays = (undefined && undefined.__spreadArrays) || function () { - for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length; - for (var r = Array(s), k = 0, i = 0; i < il; i++) - for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++) - r[k] = a[j]; - return r; -}; -/** - * Random utility functions used in the UI-Router code - * - * These functions are exported, but are subject to change without notice. - * - * @packageDocumentation - * @preferred - */ - - - -var root = (typeof self === 'object' && self.self === self && self) || - (typeof __webpack_require__.g === 'object' && __webpack_require__.g.global === __webpack_require__.g && __webpack_require__.g) || - undefined; -var angular = root.angular || {}; -var fromJson = angular.fromJson || JSON.parse.bind(JSON); -var toJson = angular.toJson || JSON.stringify.bind(JSON); -var forEach = angular.forEach || _forEach; -var extend = Object.assign || _extend; -var equals = angular.equals || _equals; -function identity(x) { - return x; -} -function noop() { } -/** - * Builds proxy functions on the `to` object which pass through to the `from` object. - * - * For each key in `fnNames`, creates a proxy function on the `to` object. - * The proxy function calls the real function on the `from` object. - * - * - * #### Example: - * This example creates an new class instance whose functions are prebound to the new'd object. - * ```js - * class Foo { - * constructor(data) { - * // Binds all functions from Foo.prototype to 'this', - * // then copies them to 'this' - * bindFunctions(Foo.prototype, this, this); - * this.data = data; - * } - * - * log() { - * console.log(this.data); - * } - * } - * - * let myFoo = new Foo([1,2,3]); - * var logit = myFoo.log; - * logit(); // logs [1, 2, 3] from the myFoo 'this' instance - * ``` - * - * #### Example: - * This example creates a bound version of a service function, and copies it to another object - * ``` - * - * var SomeService = { - * this.data = [3, 4, 5]; - * this.log = function() { - * console.log(this.data); - * } - * } - * - * // Constructor fn - * function OtherThing() { - * // Binds all functions from SomeService to SomeService, - * // then copies them to 'this' - * bindFunctions(SomeService, this, SomeService); - * } - * - * let myOtherThing = new OtherThing(); - * myOtherThing.log(); // logs [3, 4, 5] from SomeService's 'this' - * ``` - * - * @param source A function that returns the source object which contains the original functions to be bound - * @param target A function that returns the target object which will receive the bound functions - * @param bind A function that returns the object which the functions will be bound to - * @param fnNames The function names which will be bound (Defaults to all the functions found on the 'from' object) - * @param latebind If true, the binding of the function is delayed until the first time it's invoked - */ -function createProxyFunctions(source, target, bind, fnNames, latebind) { - if (latebind === void 0) { latebind = false; } - var bindFunction = function (fnName) { return source()[fnName].bind(bind()); }; - var makeLateRebindFn = function (fnName) { - return function lateRebindFunction() { - target[fnName] = bindFunction(fnName); - return target[fnName].apply(null, arguments); - }; - }; - fnNames = fnNames || Object.keys(source()); - return fnNames.reduce(function (acc, name) { - acc[name] = latebind ? makeLateRebindFn(name) : bindFunction(name); - return acc; - }, target); -} -/** - * prototypal inheritance helper. - * Creates a new object which has `parent` object as its prototype, and then copies the properties from `extra` onto it - */ -var inherit = function (parent, extra) { return extend(Object.create(parent), extra); }; -/** Given an array, returns true if the object is found in the array, (using indexOf) */ -var inArray = (0,_hof__WEBPACK_IMPORTED_MODULE_1__.curry)(_inArray); -function _inArray(array, obj) { - return array.indexOf(obj) !== -1; -} -/** - * Given an array, and an item, if the item is found in the array, it removes it (in-place). - * The same array is returned - */ -var removeFrom = (0,_hof__WEBPACK_IMPORTED_MODULE_1__.curry)(_removeFrom); -function _removeFrom(array, obj) { - var idx = array.indexOf(obj); - if (idx >= 0) - array.splice(idx, 1); - return array; -} -/** pushes a values to an array and returns the value */ -var pushTo = (0,_hof__WEBPACK_IMPORTED_MODULE_1__.curry)(_pushTo); -function _pushTo(arr, val) { - return arr.push(val), val; -} -/** Given an array of (deregistration) functions, calls all functions and removes each one from the source array */ -var deregAll = function (functions) { - return functions.slice().forEach(function (fn) { - typeof fn === 'function' && fn(); - removeFrom(functions, fn); - }); -}; -/** - * Applies a set of defaults to an options object. The options object is filtered - * to only those properties of the objects in the defaultsList. - * Earlier objects in the defaultsList take precedence when applying defaults. - */ -function defaults(opts) { - var defaultsList = []; - for (var _i = 1; _i < arguments.length; _i++) { - defaultsList[_i - 1] = arguments[_i]; - } - var defaultVals = extend.apply(void 0, __spreadArrays([{}], defaultsList.reverse())); - return extend(defaultVals, pick(opts || {}, Object.keys(defaultVals))); -} -/** Reduce function that merges each element of the list into a single object, using extend */ -var mergeR = function (memo, item) { return extend(memo, item); }; -/** - * Finds the common ancestor path between two states. - * - * @param {Object} first The first state. - * @param {Object} second The second state. - * @return {Array} Returns an array of state names in descending order, not including the root. - */ -function ancestors(first, second) { - var path = []; - // tslint:disable-next-line:forin - for (var n in first.path) { - if (first.path[n] !== second.path[n]) - break; - path.push(first.path[n]); - } - return path; -} -/** - * Return a copy of the object only containing the whitelisted properties. - * - * #### Example: - * ``` - * var foo = { a: 1, b: 2, c: 3 }; - * var ab = pick(foo, ['a', 'b']); // { a: 1, b: 2 } - * ``` - * @param obj the source object - * @param propNames an Array of strings, which are the whitelisted property names - */ -function pick(obj, propNames) { - var objCopy = {}; - for (var _prop in obj) { - if (propNames.indexOf(_prop) !== -1) { - objCopy[_prop] = obj[_prop]; - } - } - return objCopy; -} -/** - * Return a copy of the object omitting the blacklisted properties. - * - * @example - * ``` - * - * var foo = { a: 1, b: 2, c: 3 }; - * var ab = omit(foo, ['a', 'b']); // { c: 3 } - * ``` - * @param obj the source object - * @param propNames an Array of strings, which are the blacklisted property names - */ -function omit(obj, propNames) { - return Object.keys(obj) - .filter((0,_hof__WEBPACK_IMPORTED_MODULE_1__.not)(inArray(propNames))) - .reduce(function (acc, key) { return ((acc[key] = obj[key]), acc); }, {}); -} -/** - * Maps an array, or object to a property (by name) - */ -function pluck(collection, propName) { - return map(collection, (0,_hof__WEBPACK_IMPORTED_MODULE_1__.prop)(propName)); -} -/** Filters an Array or an Object's properties based on a predicate */ -function filter(collection, callback) { - var arr = (0,_predicates__WEBPACK_IMPORTED_MODULE_0__.isArray)(collection), result = arr ? [] : {}; - var accept = arr ? function (x) { return result.push(x); } : function (x, key) { return (result[key] = x); }; - forEach(collection, function (item, i) { - if (callback(item, i)) - accept(item, i); - }); - return result; -} -/** Finds an object from an array, or a property of an object, that matches a predicate */ -function find(collection, callback) { - var result; - forEach(collection, function (item, i) { - if (result) - return; - if (callback(item, i)) - result = item; - }); - return result; -} -/** Given an object, returns a new object, where each property is transformed by the callback function */ -var mapObj = map; -/** Maps an array or object properties using a callback function */ -function map(collection, callback, target) { - target = target || ((0,_predicates__WEBPACK_IMPORTED_MODULE_0__.isArray)(collection) ? [] : {}); - forEach(collection, function (item, i) { return (target[i] = callback(item, i)); }); - return target; -} -/** - * Given an object, return its enumerable property values - * - * @example - * ``` - * - * let foo = { a: 1, b: 2, c: 3 } - * let vals = values(foo); // [ 1, 2, 3 ] - * ``` - */ -var values = function (obj) { return Object.keys(obj).map(function (key) { return obj[key]; }); }; -/** - * Reduce function that returns true if all of the values are truthy. - * - * @example - * ``` - * - * let vals = [ 1, true, {}, "hello world"]; - * vals.reduce(allTrueR, true); // true - * - * vals.push(0); - * vals.reduce(allTrueR, true); // false - * ``` - */ -var allTrueR = function (memo, elem) { return memo && elem; }; -/** - * Reduce function that returns true if any of the values are truthy. - * - * * @example - * ``` - * - * let vals = [ 0, null, undefined ]; - * vals.reduce(anyTrueR, true); // false - * - * vals.push("hello world"); - * vals.reduce(anyTrueR, true); // true - * ``` - */ -var anyTrueR = function (memo, elem) { return memo || elem; }; -/** - * Reduce function which un-nests a single level of arrays - * @example - * ``` - * - * let input = [ [ "a", "b" ], [ "c", "d" ], [ [ "double", "nested" ] ] ]; - * input.reduce(unnestR, []) // [ "a", "b", "c", "d", [ "double, "nested" ] ] - * ``` - */ -var unnestR = function (memo, elem) { return memo.concat(elem); }; -/** - * Reduce function which recursively un-nests all arrays - * - * @example - * ``` - * - * let input = [ [ "a", "b" ], [ "c", "d" ], [ [ "double", "nested" ] ] ]; - * input.reduce(unnestR, []) // [ "a", "b", "c", "d", "double, "nested" ] - * ``` - */ -var flattenR = function (memo, elem) { - return (0,_predicates__WEBPACK_IMPORTED_MODULE_0__.isArray)(elem) ? memo.concat(elem.reduce(flattenR, [])) : pushR(memo, elem); -}; -/** - * Reduce function that pushes an object to an array, then returns the array. - * Mostly just for [[flattenR]] and [[uniqR]] - */ -function pushR(arr, obj) { - arr.push(obj); - return arr; -} -/** Reduce function that filters out duplicates */ -var uniqR = function (acc, token) { return (inArray(acc, token) ? acc : pushR(acc, token)); }; -/** - * Return a new array with a single level of arrays unnested. - * - * @example - * ``` - * - * let input = [ [ "a", "b" ], [ "c", "d" ], [ [ "double", "nested" ] ] ]; - * unnest(input) // [ "a", "b", "c", "d", [ "double, "nested" ] ] - * ``` - */ -var unnest = function (arr) { return arr.reduce(unnestR, []); }; -/** - * Return a completely flattened version of an array. - * - * @example - * ``` - * - * let input = [ [ "a", "b" ], [ "c", "d" ], [ [ "double", "nested" ] ] ]; - * flatten(input) // [ "a", "b", "c", "d", "double, "nested" ] - * ``` - */ -var flatten = function (arr) { return arr.reduce(flattenR, []); }; -/** - * Given a .filter Predicate, builds a .filter Predicate which throws an error if any elements do not pass. - * @example - * ``` - * - * let isNumber = (obj) => typeof(obj) === 'number'; - * let allNumbers = [ 1, 2, 3, 4, 5 ]; - * allNumbers.filter(assertPredicate(isNumber)); //OK - * - * let oneString = [ 1, 2, 3, 4, "5" ]; - * oneString.filter(assertPredicate(isNumber, "Not all numbers")); // throws Error(""Not all numbers""); - * ``` - */ -var assertPredicate = assertFn; -/** - * Given a .map function, builds a .map function which throws an error if any mapped elements do not pass a truthyness test. - * @example - * ``` - * - * var data = { foo: 1, bar: 2 }; - * - * let keys = [ 'foo', 'bar' ] - * let values = keys.map(assertMap(key => data[key], "Key not found")); - * // values is [1, 2] - * - * let keys = [ 'foo', 'bar', 'baz' ] - * let values = keys.map(assertMap(key => data[key], "Key not found")); - * // throws Error("Key not found") - * ``` - */ -var assertMap = assertFn; -function assertFn(predicateOrMap, errMsg) { - if (errMsg === void 0) { errMsg = 'assert failure'; } - return function (obj) { - var result = predicateOrMap(obj); - if (!result) { - throw new Error((0,_predicates__WEBPACK_IMPORTED_MODULE_0__.isFunction)(errMsg) ? errMsg(obj) : errMsg); - } - return result; - }; -} -/** - * Like _.pairs: Given an object, returns an array of key/value pairs - * - * @example - * ``` - * - * pairs({ foo: "FOO", bar: "BAR }) // [ [ "foo", "FOO" ], [ "bar": "BAR" ] ] - * ``` - */ -var pairs = function (obj) { return Object.keys(obj).map(function (key) { return [key, obj[key]]; }); }; -/** - * Given two or more parallel arrays, returns an array of tuples where - * each tuple is composed of [ a[i], b[i], ... z[i] ] - * - * @example - * ``` - * - * let foo = [ 0, 2, 4, 6 ]; - * let bar = [ 1, 3, 5, 7 ]; - * let baz = [ 10, 30, 50, 70 ]; - * arrayTuples(foo, bar); // [ [0, 1], [2, 3], [4, 5], [6, 7] ] - * arrayTuples(foo, bar, baz); // [ [0, 1, 10], [2, 3, 30], [4, 5, 50], [6, 7, 70] ] - * ``` - */ -function arrayTuples() { - var args = []; - for (var _i = 0; _i < arguments.length; _i++) { - args[_i] = arguments[_i]; - } - if (args.length === 0) - return []; - var maxArrayLen = args.reduce(function (min, arr) { return Math.min(arr.length, min); }, 9007199254740991); // aka 2^53 − 1 aka Number.MAX_SAFE_INTEGER - var result = []; - var _loop_1 = function (i) { - // This is a hot function - // Unroll when there are 1-4 arguments - switch (args.length) { - case 1: - result.push([args[0][i]]); - break; - case 2: - result.push([args[0][i], args[1][i]]); - break; - case 3: - result.push([args[0][i], args[1][i], args[2][i]]); - break; - case 4: - result.push([args[0][i], args[1][i], args[2][i], args[3][i]]); - break; - default: - result.push(args.map(function (array) { return array[i]; })); - break; - } - }; - for (var i = 0; i < maxArrayLen; i++) { - _loop_1(i); - } - return result; -} -/** - * Reduce function which builds an object from an array of [key, value] pairs. - * - * Each iteration sets the key/val pair on the memo object, then returns the memo for the next iteration. - * - * Each keyValueTuple should be an array with values [ key: string, value: any ] - * - * @example - * ``` - * - * var pairs = [ ["fookey", "fooval"], ["barkey", "barval"] ] - * - * var pairsToObj = pairs.reduce((memo, pair) => applyPairs(memo, pair), {}) - * // pairsToObj == { fookey: "fooval", barkey: "barval" } - * - * // Or, more simply: - * var pairsToObj = pairs.reduce(applyPairs, {}) - * // pairsToObj == { fookey: "fooval", barkey: "barval" } - * ``` - */ -function applyPairs(memo, keyValTuple) { - var key, value; - if ((0,_predicates__WEBPACK_IMPORTED_MODULE_0__.isArray)(keyValTuple)) - key = keyValTuple[0], value = keyValTuple[1]; - if (!(0,_predicates__WEBPACK_IMPORTED_MODULE_0__.isString)(key)) - throw new Error('invalid parameters to applyPairs'); - memo[key] = value; - return memo; -} -/** Get the last element of an array */ -function tail(arr) { - return (arr.length && arr[arr.length - 1]) || undefined; -} -/** - * shallow copy from src to dest - */ -function copy(src, dest) { - if (dest) - Object.keys(dest).forEach(function (key) { return delete dest[key]; }); - if (!dest) - dest = {}; - return extend(dest, src); -} -/** Naive forEach implementation works with Objects or Arrays */ -function _forEach(obj, cb, _this) { - if ((0,_predicates__WEBPACK_IMPORTED_MODULE_0__.isArray)(obj)) - return obj.forEach(cb, _this); - Object.keys(obj).forEach(function (key) { return cb(obj[key], key); }); -} -function _extend(toObj) { - for (var i = 1; i < arguments.length; i++) { - var obj = arguments[i]; - if (!obj) - continue; - var keys = Object.keys(obj); - for (var j = 0; j < keys.length; j++) { - toObj[keys[j]] = obj[keys[j]]; - } - } - return toObj; -} -function _equals(o1, o2) { - if (o1 === o2) - return true; - if (o1 === null || o2 === null) - return false; - if (o1 !== o1 && o2 !== o2) - return true; // NaN === NaN - var t1 = typeof o1, t2 = typeof o2; - if (t1 !== t2 || t1 !== 'object') - return false; - var tup = [o1, o2]; - if ((0,_hof__WEBPACK_IMPORTED_MODULE_1__.all)(_predicates__WEBPACK_IMPORTED_MODULE_0__.isArray)(tup)) - return _arraysEq(o1, o2); - if ((0,_hof__WEBPACK_IMPORTED_MODULE_1__.all)(_predicates__WEBPACK_IMPORTED_MODULE_0__.isDate)(tup)) - return o1.getTime() === o2.getTime(); - if ((0,_hof__WEBPACK_IMPORTED_MODULE_1__.all)(_predicates__WEBPACK_IMPORTED_MODULE_0__.isRegExp)(tup)) - return o1.toString() === o2.toString(); - if ((0,_hof__WEBPACK_IMPORTED_MODULE_1__.all)(_predicates__WEBPACK_IMPORTED_MODULE_0__.isFunction)(tup)) - return true; // meh - var predicates = [_predicates__WEBPACK_IMPORTED_MODULE_0__.isFunction, _predicates__WEBPACK_IMPORTED_MODULE_0__.isArray, _predicates__WEBPACK_IMPORTED_MODULE_0__.isDate, _predicates__WEBPACK_IMPORTED_MODULE_0__.isRegExp]; - if (predicates.map(_hof__WEBPACK_IMPORTED_MODULE_1__.any).reduce(function (b, fn) { return b || !!fn(tup); }, false)) - return false; - var keys = {}; - // tslint:disable-next-line:forin - for (var key in o1) { - if (!_equals(o1[key], o2[key])) - return false; - keys[key] = true; - } - for (var key in o2) { - if (!keys[key]) - return false; - } - return true; -} -function _arraysEq(a1, a2) { - if (a1.length !== a2.length) - return false; - return arrayTuples(a1, a2).reduce(function (b, t) { return b && _equals(t[0], t[1]); }, true); -} -// issue #2676 -var silenceUncaughtInPromise = function (promise) { return promise.catch(function (e) { return 0; }) && promise; }; -var silentRejection = function (error) { return silenceUncaughtInPromise(_coreservices__WEBPACK_IMPORTED_MODULE_2__.services.$q.reject(error)); }; -//# sourceMappingURL=common.js.map - -/***/ }), - -/***/ "./node_modules/@uirouter/core/lib-esm/common/coreservices.js": -/*!********************************************************************!*\ - !*** ./node_modules/@uirouter/core/lib-esm/common/coreservices.js ***! - \********************************************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "makeStub": () => (/* binding */ makeStub), -/* harmony export */ "services": () => (/* binding */ services) -/* harmony export */ }); -var noImpl = function (fnname) { return function () { - throw new Error("No implementation for " + fnname + ". The framework specific code did not implement this method."); -}; }; -var makeStub = function (service, methods) { - return methods.reduce(function (acc, key) { return ((acc[key] = noImpl(service + "." + key + "()")), acc); }, {}); -}; -var services = { - $q: undefined, - $injector: undefined, -}; - -//# sourceMappingURL=coreservices.js.map - -/***/ }), - -/***/ "./node_modules/@uirouter/core/lib-esm/common/glob.js": -/*!************************************************************!*\ - !*** ./node_modules/@uirouter/core/lib-esm/common/glob.js ***! - \************************************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "Glob": () => (/* binding */ Glob) -/* harmony export */ }); -/** - * Matches state names using glob-like pattern strings. - * - * Globs can be used in specific APIs including: - * - * - [[StateService.is]] - * - [[StateService.includes]] - * - The first argument to Hook Registration functions like [[TransitionService.onStart]] - * - [[HookMatchCriteria]] and [[HookMatchCriterion]] - * - * A `Glob` string is a pattern which matches state names. - * Nested state names are split into segments (separated by a dot) when processing. - * The state named `foo.bar.baz` is split into three segments ['foo', 'bar', 'baz'] - * - * Globs work according to the following rules: - * - * ### Exact match: - * - * The glob `'A.B'` matches the state named exactly `'A.B'`. - * - * | Glob |Matches states named|Does not match state named| - * |:------------|:--------------------|:---------------------| - * | `'A'` | `'A'` | `'B'` , `'A.C'` | - * | `'A.B'` | `'A.B'` | `'A'` , `'A.B.C'` | - * | `'foo'` | `'foo'` | `'FOO'` , `'foo.bar'`| - * - * ### Single star (`*`) - * - * A single star (`*`) is a wildcard that matches exactly one segment. - * - * | Glob |Matches states named |Does not match state named | - * |:------------|:---------------------|:--------------------------| - * | `'*'` | `'A'` , `'Z'` | `'A.B'` , `'Z.Y.X'` | - * | `'A.*'` | `'A.B'` , `'A.C'` | `'A'` , `'A.B.C'` | - * | `'A.*.*'` | `'A.B.C'` , `'A.X.Y'`| `'A'`, `'A.B'` , `'Z.Y.X'`| - * - * ### Double star (`**`) - * - * A double star (`'**'`) is a wildcard that matches *zero or more segments* - * - * | Glob |Matches states named |Does not match state named | - * |:------------|:----------------------------------------------|:----------------------------------| - * | `'**'` | `'A'` , `'A.B'`, `'Z.Y.X'` | (matches all states) | - * | `'A.**'` | `'A'` , `'A.B'` , `'A.C.X'` | `'Z.Y.X'` | - * | `'**.X'` | `'X'` , `'A.X'` , `'Z.Y.X'` | `'A'` , `'A.login.Z'` | - * | `'A.**.X'` | `'A.X'` , `'A.B.X'` , `'A.B.C.X'` | `'A'` , `'A.B.C'` | - * - * @packageDocumentation - */ -var Glob = /** @class */ (function () { - function Glob(text) { - this.text = text; - this.glob = text.split('.'); - var regexpString = this.text - .split('.') - .map(function (seg) { - if (seg === '**') - return '(?:|(?:\\.[^.]*)*)'; - if (seg === '*') - return '\\.[^.]*'; - return '\\.' + seg; - }) - .join(''); - this.regexp = new RegExp('^' + regexpString + '$'); - } - /** Returns true if the string has glob-like characters in it */ - Glob.is = function (text) { - return !!/[!,*]+/.exec(text); - }; - /** Returns a glob from the string, or null if the string isn't Glob-like */ - Glob.fromString = function (text) { - return Glob.is(text) ? new Glob(text) : null; - }; - Glob.prototype.matches = function (name) { - return this.regexp.test('.' + name); - }; - return Glob; -}()); - -//# sourceMappingURL=glob.js.map - -/***/ }), - -/***/ "./node_modules/@uirouter/core/lib-esm/common/hof.js": -/*!***********************************************************!*\ - !*** ./node_modules/@uirouter/core/lib-esm/common/hof.js ***! - \***********************************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "curry": () => (/* binding */ curry), -/* harmony export */ "compose": () => (/* binding */ compose), -/* harmony export */ "pipe": () => (/* binding */ pipe), -/* harmony export */ "prop": () => (/* binding */ prop), -/* harmony export */ "propEq": () => (/* binding */ propEq), -/* harmony export */ "parse": () => (/* binding */ parse), -/* harmony export */ "not": () => (/* binding */ not), -/* harmony export */ "and": () => (/* binding */ and), -/* harmony export */ "or": () => (/* binding */ or), -/* harmony export */ "all": () => (/* binding */ all), -/* harmony export */ "any": () => (/* binding */ any), -/* harmony export */ "is": () => (/* binding */ is), -/* harmony export */ "eq": () => (/* binding */ eq), -/* harmony export */ "val": () => (/* binding */ val), -/* harmony export */ "invoke": () => (/* binding */ invoke), -/* harmony export */ "pattern": () => (/* binding */ pattern) -/* harmony export */ }); -/** - * Higher order functions - * - * These utility functions are exported, but are subject to change without notice. - * - * @packageDocumentation - */ -var __spreadArrays = (undefined && undefined.__spreadArrays) || function () { - for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length; - for (var r = Array(s), k = 0, i = 0; i < il; i++) - for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++) - r[k] = a[j]; - return r; -}; -/** - * Returns a new function for [Partial Application](https://en.wikipedia.org/wiki/Partial_application) of the original function. - * - * Given a function with N parameters, returns a new function that supports partial application. - * The new function accepts anywhere from 1 to N parameters. When that function is called with M parameters, - * where M is less than N, it returns a new function that accepts the remaining parameters. It continues to - * accept more parameters until all N parameters have been supplied. - * - * - * This contrived example uses a partially applied function as an predicate, which returns true - * if an object is found in both arrays. - * @example - * ``` - * // returns true if an object is in both of the two arrays - * function inBoth(array1, array2, object) { - * return array1.indexOf(object) !== -1 && - * array2.indexOf(object) !== 1; - * } - * let obj1, obj2, obj3, obj4, obj5, obj6, obj7 - * let foos = [obj1, obj3] - * let bars = [obj3, obj4, obj5] - * - * // A curried "copy" of inBoth - * let curriedInBoth = curry(inBoth); - * // Partially apply both the array1 and array2 - * let inFoosAndBars = curriedInBoth(foos, bars); - * - * // Supply the final argument; since all arguments are - * // supplied, the original inBoth function is then called. - * let obj1InBoth = inFoosAndBars(obj1); // false - * - * // Use the inFoosAndBars as a predicate. - * // Filter, on each iteration, supplies the final argument - * let allObjs = [ obj1, obj2, obj3, obj4, obj5, obj6, obj7 ]; - * let foundInBoth = allObjs.filter(inFoosAndBars); // [ obj3 ] - * - * ``` - * - * @param fn - * @returns {*|function(): (*|any)} - */ -function curry(fn) { - return function curried() { - if (arguments.length >= fn.length) { - return fn.apply(this, arguments); - } - var args = Array.prototype.slice.call(arguments); - return curried.bind.apply(curried, __spreadArrays([this], args)); - }; -} -/** - * Given a varargs list of functions, returns a function that composes the argument functions, right-to-left - * given: f(x), g(x), h(x) - * let composed = compose(f,g,h) - * then, composed is: f(g(h(x))) - */ -function compose() { - var args = arguments; - var start = args.length - 1; - return function () { - var i = start, result = args[start].apply(this, arguments); - while (i--) - result = args[i].call(this, result); - return result; - }; -} -/** - * Given a varargs list of functions, returns a function that is composes the argument functions, left-to-right - * given: f(x), g(x), h(x) - * let piped = pipe(f,g,h); - * then, piped is: h(g(f(x))) - */ -function pipe() { - var funcs = []; - for (var _i = 0; _i < arguments.length; _i++) { - funcs[_i] = arguments[_i]; - } - return compose.apply(null, [].slice.call(arguments).reverse()); -} -/** - * Given a property name, returns a function that returns that property from an object - * let obj = { foo: 1, name: "blarg" }; - * let getName = prop("name"); - * getName(obj) === "blarg" - */ -var prop = function (name) { return function (obj) { return obj && obj[name]; }; }; -/** - * Given a property name and a value, returns a function that returns a boolean based on whether - * the passed object has a property that matches the value - * let obj = { foo: 1, name: "blarg" }; - * let getName = propEq("name", "blarg"); - * getName(obj) === true - */ -var propEq = curry(function (name, _val, obj) { return obj && obj[name] === _val; }); -/** - * Given a dotted property name, returns a function that returns a nested property from an object, or undefined - * let obj = { id: 1, nestedObj: { foo: 1, name: "blarg" }, }; - * let getName = prop("nestedObj.name"); - * getName(obj) === "blarg" - * let propNotFound = prop("this.property.doesnt.exist"); - * propNotFound(obj) === undefined - */ -var parse = function (name) { return pipe.apply(null, name.split('.').map(prop)); }; -/** - * Given a function that returns a truthy or falsey value, returns a - * function that returns the opposite (falsey or truthy) value given the same inputs - */ -var not = function (fn) { return function () { - var args = []; - for (var _i = 0; _i < arguments.length; _i++) { - args[_i] = arguments[_i]; - } - return !fn.apply(null, args); -}; }; -/** - * Given two functions that return truthy or falsey values, returns a function that returns truthy - * if both functions return truthy for the given arguments - */ -function and(fn1, fn2) { - return function () { - var args = []; - for (var _i = 0; _i < arguments.length; _i++) { - args[_i] = arguments[_i]; - } - return fn1.apply(null, args) && fn2.apply(null, args); - }; -} -/** - * Given two functions that return truthy or falsey values, returns a function that returns truthy - * if at least one of the functions returns truthy for the given arguments - */ -function or(fn1, fn2) { - return function () { - var args = []; - for (var _i = 0; _i < arguments.length; _i++) { - args[_i] = arguments[_i]; - } - return fn1.apply(null, args) || fn2.apply(null, args); - }; -} -/** - * Check if all the elements of an array match a predicate function - * - * @param fn1 a predicate function `fn1` - * @returns a function which takes an array and returns true if `fn1` is true for all elements of the array - */ -var all = function (fn1) { return function (arr) { return arr.reduce(function (b, x) { return b && !!fn1(x); }, true); }; }; -// tslint:disable-next-line:variable-name -var any = function (fn1) { return function (arr) { return arr.reduce(function (b, x) { return b || !!fn1(x); }, false); }; }; -/** Given a class, returns a Predicate function that returns true if the object is of that class */ -var is = function (ctor) { return function (obj) { - return (obj != null && obj.constructor === ctor) || obj instanceof ctor; -}; }; -/** Given a value, returns a Predicate function that returns true if another value is === equal to the original value */ -var eq = function (value) { return function (other) { return value === other; }; }; -/** Given a value, returns a function which returns the value */ -var val = function (v) { return function () { return v; }; }; -function invoke(fnName, args) { - return function (obj) { return obj[fnName].apply(obj, args); }; -} -/** - * Sorta like Pattern Matching (a functional programming conditional construct) - * - * See http://c2.com/cgi/wiki?PatternMatching - * - * This is a conditional construct which allows a series of predicates and output functions - * to be checked and then applied. Each predicate receives the input. If the predicate - * returns truthy, then its matching output function (mapping function) is provided with - * the input and, then the result is returned. - * - * Each combination (2-tuple) of predicate + output function should be placed in an array - * of size 2: [ predicate, mapFn ] - * - * These 2-tuples should be put in an outer array. - * - * @example - * ``` - * - * // Here's a 2-tuple where the first element is the isString predicate - * // and the second element is a function that returns a description of the input - * let firstTuple = [ angular.isString, (input) => `Heres your string ${input}` ]; - * - * // Second tuple: predicate "isNumber", mapfn returns a description - * let secondTuple = [ angular.isNumber, (input) => `(${input}) That's a number!` ]; - * - * let third = [ (input) => input === null, (input) => `Oh, null...` ]; - * - * let fourth = [ (input) => input === undefined, (input) => `notdefined` ]; - * - * let descriptionOf = pattern([ firstTuple, secondTuple, third, fourth ]); - * - * console.log(descriptionOf(undefined)); // 'notdefined' - * console.log(descriptionOf(55)); // '(55) That's a number!' - * console.log(descriptionOf("foo")); // 'Here's your string foo' - * ``` - * - * @param struct A 2D array. Each element of the array should be an array, a 2-tuple, - * with a Predicate and a mapping/output function - * @returns {function(any): *} - */ -function pattern(struct) { - return function (x) { - for (var i = 0; i < struct.length; i++) { - if (struct[i][0](x)) - return struct[i][1](x); - } - }; -} -//# sourceMappingURL=hof.js.map - -/***/ }), - -/***/ "./node_modules/@uirouter/core/lib-esm/common/index.js": -/*!*************************************************************!*\ - !*** ./node_modules/@uirouter/core/lib-esm/common/index.js ***! - \*************************************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "_extend": () => (/* reexport safe */ _common__WEBPACK_IMPORTED_MODULE_0__._extend), -/* harmony export */ "_inArray": () => (/* reexport safe */ _common__WEBPACK_IMPORTED_MODULE_0__._inArray), -/* harmony export */ "_pushTo": () => (/* reexport safe */ _common__WEBPACK_IMPORTED_MODULE_0__._pushTo), -/* harmony export */ "_removeFrom": () => (/* reexport safe */ _common__WEBPACK_IMPORTED_MODULE_0__._removeFrom), -/* harmony export */ "allTrueR": () => (/* reexport safe */ _common__WEBPACK_IMPORTED_MODULE_0__.allTrueR), -/* harmony export */ "ancestors": () => (/* reexport safe */ _common__WEBPACK_IMPORTED_MODULE_0__.ancestors), -/* harmony export */ "anyTrueR": () => (/* reexport safe */ _common__WEBPACK_IMPORTED_MODULE_0__.anyTrueR), -/* harmony export */ "applyPairs": () => (/* reexport safe */ _common__WEBPACK_IMPORTED_MODULE_0__.applyPairs), -/* harmony export */ "arrayTuples": () => (/* reexport safe */ _common__WEBPACK_IMPORTED_MODULE_0__.arrayTuples), -/* harmony export */ "assertFn": () => (/* reexport safe */ _common__WEBPACK_IMPORTED_MODULE_0__.assertFn), -/* harmony export */ "assertMap": () => (/* reexport safe */ _common__WEBPACK_IMPORTED_MODULE_0__.assertMap), -/* harmony export */ "assertPredicate": () => (/* reexport safe */ _common__WEBPACK_IMPORTED_MODULE_0__.assertPredicate), -/* harmony export */ "copy": () => (/* reexport safe */ _common__WEBPACK_IMPORTED_MODULE_0__.copy), -/* harmony export */ "createProxyFunctions": () => (/* reexport safe */ _common__WEBPACK_IMPORTED_MODULE_0__.createProxyFunctions), -/* harmony export */ "defaults": () => (/* reexport safe */ _common__WEBPACK_IMPORTED_MODULE_0__.defaults), -/* harmony export */ "deregAll": () => (/* reexport safe */ _common__WEBPACK_IMPORTED_MODULE_0__.deregAll), -/* harmony export */ "equals": () => (/* reexport safe */ _common__WEBPACK_IMPORTED_MODULE_0__.equals), -/* harmony export */ "extend": () => (/* reexport safe */ _common__WEBPACK_IMPORTED_MODULE_0__.extend), -/* harmony export */ "filter": () => (/* reexport safe */ _common__WEBPACK_IMPORTED_MODULE_0__.filter), -/* harmony export */ "find": () => (/* reexport safe */ _common__WEBPACK_IMPORTED_MODULE_0__.find), -/* harmony export */ "flatten": () => (/* reexport safe */ _common__WEBPACK_IMPORTED_MODULE_0__.flatten), -/* harmony export */ "flattenR": () => (/* reexport safe */ _common__WEBPACK_IMPORTED_MODULE_0__.flattenR), -/* harmony export */ "forEach": () => (/* reexport safe */ _common__WEBPACK_IMPORTED_MODULE_0__.forEach), -/* harmony export */ "fromJson": () => (/* reexport safe */ _common__WEBPACK_IMPORTED_MODULE_0__.fromJson), -/* harmony export */ "identity": () => (/* reexport safe */ _common__WEBPACK_IMPORTED_MODULE_0__.identity), -/* harmony export */ "inArray": () => (/* reexport safe */ _common__WEBPACK_IMPORTED_MODULE_0__.inArray), -/* harmony export */ "inherit": () => (/* reexport safe */ _common__WEBPACK_IMPORTED_MODULE_0__.inherit), -/* harmony export */ "map": () => (/* reexport safe */ _common__WEBPACK_IMPORTED_MODULE_0__.map), -/* harmony export */ "mapObj": () => (/* reexport safe */ _common__WEBPACK_IMPORTED_MODULE_0__.mapObj), -/* harmony export */ "mergeR": () => (/* reexport safe */ _common__WEBPACK_IMPORTED_MODULE_0__.mergeR), -/* harmony export */ "noop": () => (/* reexport safe */ _common__WEBPACK_IMPORTED_MODULE_0__.noop), -/* harmony export */ "omit": () => (/* reexport safe */ _common__WEBPACK_IMPORTED_MODULE_0__.omit), -/* harmony export */ "pairs": () => (/* reexport safe */ _common__WEBPACK_IMPORTED_MODULE_0__.pairs), -/* harmony export */ "pick": () => (/* reexport safe */ _common__WEBPACK_IMPORTED_MODULE_0__.pick), -/* harmony export */ "pluck": () => (/* reexport safe */ _common__WEBPACK_IMPORTED_MODULE_0__.pluck), -/* harmony export */ "pushR": () => (/* reexport safe */ _common__WEBPACK_IMPORTED_MODULE_0__.pushR), -/* harmony export */ "pushTo": () => (/* reexport safe */ _common__WEBPACK_IMPORTED_MODULE_0__.pushTo), -/* harmony export */ "removeFrom": () => (/* reexport safe */ _common__WEBPACK_IMPORTED_MODULE_0__.removeFrom), -/* harmony export */ "root": () => (/* reexport safe */ _common__WEBPACK_IMPORTED_MODULE_0__.root), -/* harmony export */ "silenceUncaughtInPromise": () => (/* reexport safe */ _common__WEBPACK_IMPORTED_MODULE_0__.silenceUncaughtInPromise), -/* harmony export */ "silentRejection": () => (/* reexport safe */ _common__WEBPACK_IMPORTED_MODULE_0__.silentRejection), -/* harmony export */ "tail": () => (/* reexport safe */ _common__WEBPACK_IMPORTED_MODULE_0__.tail), -/* harmony export */ "toJson": () => (/* reexport safe */ _common__WEBPACK_IMPORTED_MODULE_0__.toJson), -/* harmony export */ "uniqR": () => (/* reexport safe */ _common__WEBPACK_IMPORTED_MODULE_0__.uniqR), -/* harmony export */ "unnest": () => (/* reexport safe */ _common__WEBPACK_IMPORTED_MODULE_0__.unnest), -/* harmony export */ "unnestR": () => (/* reexport safe */ _common__WEBPACK_IMPORTED_MODULE_0__.unnestR), -/* harmony export */ "values": () => (/* reexport safe */ _common__WEBPACK_IMPORTED_MODULE_0__.values), -/* harmony export */ "makeStub": () => (/* reexport safe */ _coreservices__WEBPACK_IMPORTED_MODULE_1__.makeStub), -/* harmony export */ "services": () => (/* reexport safe */ _coreservices__WEBPACK_IMPORTED_MODULE_1__.services), -/* harmony export */ "Glob": () => (/* reexport safe */ _glob__WEBPACK_IMPORTED_MODULE_2__.Glob), -/* harmony export */ "all": () => (/* reexport safe */ _hof__WEBPACK_IMPORTED_MODULE_3__.all), -/* harmony export */ "and": () => (/* reexport safe */ _hof__WEBPACK_IMPORTED_MODULE_3__.and), -/* harmony export */ "any": () => (/* reexport safe */ _hof__WEBPACK_IMPORTED_MODULE_3__.any), -/* harmony export */ "compose": () => (/* reexport safe */ _hof__WEBPACK_IMPORTED_MODULE_3__.compose), -/* harmony export */ "curry": () => (/* reexport safe */ _hof__WEBPACK_IMPORTED_MODULE_3__.curry), -/* harmony export */ "eq": () => (/* reexport safe */ _hof__WEBPACK_IMPORTED_MODULE_3__.eq), -/* harmony export */ "invoke": () => (/* reexport safe */ _hof__WEBPACK_IMPORTED_MODULE_3__.invoke), -/* harmony export */ "is": () => (/* reexport safe */ _hof__WEBPACK_IMPORTED_MODULE_3__.is), -/* harmony export */ "not": () => (/* reexport safe */ _hof__WEBPACK_IMPORTED_MODULE_3__.not), -/* harmony export */ "or": () => (/* reexport safe */ _hof__WEBPACK_IMPORTED_MODULE_3__.or), -/* harmony export */ "parse": () => (/* reexport safe */ _hof__WEBPACK_IMPORTED_MODULE_3__.parse), -/* harmony export */ "pattern": () => (/* reexport safe */ _hof__WEBPACK_IMPORTED_MODULE_3__.pattern), -/* harmony export */ "pipe": () => (/* reexport safe */ _hof__WEBPACK_IMPORTED_MODULE_3__.pipe), -/* harmony export */ "prop": () => (/* reexport safe */ _hof__WEBPACK_IMPORTED_MODULE_3__.prop), -/* harmony export */ "propEq": () => (/* reexport safe */ _hof__WEBPACK_IMPORTED_MODULE_3__.propEq), -/* harmony export */ "val": () => (/* reexport safe */ _hof__WEBPACK_IMPORTED_MODULE_3__.val), -/* harmony export */ "isArray": () => (/* reexport safe */ _predicates__WEBPACK_IMPORTED_MODULE_4__.isArray), -/* harmony export */ "isDate": () => (/* reexport safe */ _predicates__WEBPACK_IMPORTED_MODULE_4__.isDate), -/* harmony export */ "isDefined": () => (/* reexport safe */ _predicates__WEBPACK_IMPORTED_MODULE_4__.isDefined), -/* harmony export */ "isFunction": () => (/* reexport safe */ _predicates__WEBPACK_IMPORTED_MODULE_4__.isFunction), -/* harmony export */ "isInjectable": () => (/* reexport safe */ _predicates__WEBPACK_IMPORTED_MODULE_4__.isInjectable), -/* harmony export */ "isNull": () => (/* reexport safe */ _predicates__WEBPACK_IMPORTED_MODULE_4__.isNull), -/* harmony export */ "isNullOrUndefined": () => (/* reexport safe */ _predicates__WEBPACK_IMPORTED_MODULE_4__.isNullOrUndefined), -/* harmony export */ "isNumber": () => (/* reexport safe */ _predicates__WEBPACK_IMPORTED_MODULE_4__.isNumber), -/* harmony export */ "isObject": () => (/* reexport safe */ _predicates__WEBPACK_IMPORTED_MODULE_4__.isObject), -/* harmony export */ "isPromise": () => (/* reexport safe */ _predicates__WEBPACK_IMPORTED_MODULE_4__.isPromise), -/* harmony export */ "isRegExp": () => (/* reexport safe */ _predicates__WEBPACK_IMPORTED_MODULE_4__.isRegExp), -/* harmony export */ "isString": () => (/* reexport safe */ _predicates__WEBPACK_IMPORTED_MODULE_4__.isString), -/* harmony export */ "isUndefined": () => (/* reexport safe */ _predicates__WEBPACK_IMPORTED_MODULE_4__.isUndefined), -/* harmony export */ "Queue": () => (/* reexport safe */ _queue__WEBPACK_IMPORTED_MODULE_5__.Queue), -/* harmony export */ "beforeAfterSubstr": () => (/* reexport safe */ _strings__WEBPACK_IMPORTED_MODULE_6__.beforeAfterSubstr), -/* harmony export */ "fnToString": () => (/* reexport safe */ _strings__WEBPACK_IMPORTED_MODULE_6__.fnToString), -/* harmony export */ "functionToString": () => (/* reexport safe */ _strings__WEBPACK_IMPORTED_MODULE_6__.functionToString), -/* harmony export */ "hostRegex": () => (/* reexport safe */ _strings__WEBPACK_IMPORTED_MODULE_6__.hostRegex), -/* harmony export */ "joinNeighborsR": () => (/* reexport safe */ _strings__WEBPACK_IMPORTED_MODULE_6__.joinNeighborsR), -/* harmony export */ "kebobString": () => (/* reexport safe */ _strings__WEBPACK_IMPORTED_MODULE_6__.kebobString), -/* harmony export */ "maxLength": () => (/* reexport safe */ _strings__WEBPACK_IMPORTED_MODULE_6__.maxLength), -/* harmony export */ "padString": () => (/* reexport safe */ _strings__WEBPACK_IMPORTED_MODULE_6__.padString), -/* harmony export */ "splitEqual": () => (/* reexport safe */ _strings__WEBPACK_IMPORTED_MODULE_6__.splitEqual), -/* harmony export */ "splitHash": () => (/* reexport safe */ _strings__WEBPACK_IMPORTED_MODULE_6__.splitHash), -/* harmony export */ "splitOnDelim": () => (/* reexport safe */ _strings__WEBPACK_IMPORTED_MODULE_6__.splitOnDelim), -/* harmony export */ "splitQuery": () => (/* reexport safe */ _strings__WEBPACK_IMPORTED_MODULE_6__.splitQuery), -/* harmony export */ "stringify": () => (/* reexport safe */ _strings__WEBPACK_IMPORTED_MODULE_6__.stringify), -/* harmony export */ "stripLastPathElement": () => (/* reexport safe */ _strings__WEBPACK_IMPORTED_MODULE_6__.stripLastPathElement), -/* harmony export */ "trimHashVal": () => (/* reexport safe */ _strings__WEBPACK_IMPORTED_MODULE_6__.trimHashVal), -/* harmony export */ "Category": () => (/* reexport safe */ _trace__WEBPACK_IMPORTED_MODULE_7__.Category), -/* harmony export */ "Trace": () => (/* reexport safe */ _trace__WEBPACK_IMPORTED_MODULE_7__.Trace), -/* harmony export */ "trace": () => (/* reexport safe */ _trace__WEBPACK_IMPORTED_MODULE_7__.trace) -/* harmony export */ }); -/* harmony import */ var _common__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./common */ "./node_modules/@uirouter/core/lib-esm/common/common.js"); -/* harmony import */ var _coreservices__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./coreservices */ "./node_modules/@uirouter/core/lib-esm/common/coreservices.js"); -/* harmony import */ var _glob__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./glob */ "./node_modules/@uirouter/core/lib-esm/common/glob.js"); -/* harmony import */ var _hof__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./hof */ "./node_modules/@uirouter/core/lib-esm/common/hof.js"); -/* harmony import */ var _predicates__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./predicates */ "./node_modules/@uirouter/core/lib-esm/common/predicates.js"); -/* harmony import */ var _queue__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./queue */ "./node_modules/@uirouter/core/lib-esm/common/queue.js"); -/* harmony import */ var _strings__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./strings */ "./node_modules/@uirouter/core/lib-esm/common/strings.js"); -/* harmony import */ var _trace__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./trace */ "./node_modules/@uirouter/core/lib-esm/common/trace.js"); - - - - - - - - -//# sourceMappingURL=index.js.map - -/***/ }), - -/***/ "./node_modules/@uirouter/core/lib-esm/common/predicates.js": -/*!******************************************************************!*\ - !*** ./node_modules/@uirouter/core/lib-esm/common/predicates.js ***! - \******************************************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "isUndefined": () => (/* binding */ isUndefined), -/* harmony export */ "isDefined": () => (/* binding */ isDefined), -/* harmony export */ "isNull": () => (/* binding */ isNull), -/* harmony export */ "isNullOrUndefined": () => (/* binding */ isNullOrUndefined), -/* harmony export */ "isFunction": () => (/* binding */ isFunction), -/* harmony export */ "isNumber": () => (/* binding */ isNumber), -/* harmony export */ "isString": () => (/* binding */ isString), -/* harmony export */ "isObject": () => (/* binding */ isObject), -/* harmony export */ "isArray": () => (/* binding */ isArray), -/* harmony export */ "isDate": () => (/* binding */ isDate), -/* harmony export */ "isRegExp": () => (/* binding */ isRegExp), -/* harmony export */ "isInjectable": () => (/* binding */ isInjectable), -/* harmony export */ "isPromise": () => (/* binding */ isPromise) -/* harmony export */ }); -/* harmony import */ var _hof__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./hof */ "./node_modules/@uirouter/core/lib-esm/common/hof.js"); -/** - * Predicates - * - * These predicates return true/false based on the input. - * Although these functions are exported, they are subject to change without notice. - * - * @packageDocumentation - */ - -var toStr = Object.prototype.toString; -var tis = function (t) { return function (x) { return typeof x === t; }; }; -var isUndefined = tis('undefined'); -var isDefined = (0,_hof__WEBPACK_IMPORTED_MODULE_0__.not)(isUndefined); -var isNull = function (o) { return o === null; }; -var isNullOrUndefined = (0,_hof__WEBPACK_IMPORTED_MODULE_0__.or)(isNull, isUndefined); -var isFunction = tis('function'); -var isNumber = tis('number'); -var isString = tis('string'); -var isObject = function (x) { return x !== null && typeof x === 'object'; }; -var isArray = Array.isArray; -var isDate = (function (x) { return toStr.call(x) === '[object Date]'; }); -var isRegExp = (function (x) { return toStr.call(x) === '[object RegExp]'; }); -/** - * Predicate which checks if a value is injectable - * - * A value is "injectable" if it is a function, or if it is an ng1 array-notation-style array - * where all the elements in the array are Strings, except the last one, which is a Function - */ -function isInjectable(val) { - if (isArray(val) && val.length) { - var head = val.slice(0, -1), tail = val.slice(-1); - return !(head.filter((0,_hof__WEBPACK_IMPORTED_MODULE_0__.not)(isString)).length || tail.filter((0,_hof__WEBPACK_IMPORTED_MODULE_0__.not)(isFunction)).length); - } - return isFunction(val); -} -/** - * Predicate which checks if a value looks like a Promise - * - * It is probably a Promise if it's an object, and it has a `then` property which is a Function - */ -var isPromise = (0,_hof__WEBPACK_IMPORTED_MODULE_0__.and)(isObject, (0,_hof__WEBPACK_IMPORTED_MODULE_0__.pipe)((0,_hof__WEBPACK_IMPORTED_MODULE_0__.prop)('then'), isFunction)); -//# sourceMappingURL=predicates.js.map - -/***/ }), - -/***/ "./node_modules/@uirouter/core/lib-esm/common/queue.js": -/*!*************************************************************!*\ - !*** ./node_modules/@uirouter/core/lib-esm/common/queue.js ***! - \*************************************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "Queue": () => (/* binding */ Queue) -/* harmony export */ }); -/* harmony import */ var _common__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./common */ "./node_modules/@uirouter/core/lib-esm/common/common.js"); - -var Queue = /** @class */ (function () { - function Queue(_items, _limit) { - if (_items === void 0) { _items = []; } - if (_limit === void 0) { _limit = null; } - this._items = _items; - this._limit = _limit; - this._evictListeners = []; - this.onEvict = (0,_common__WEBPACK_IMPORTED_MODULE_0__.pushTo)(this._evictListeners); - } - Queue.prototype.enqueue = function (item) { - var items = this._items; - items.push(item); - if (this._limit && items.length > this._limit) - this.evict(); - return item; - }; - Queue.prototype.evict = function () { - var item = this._items.shift(); - this._evictListeners.forEach(function (fn) { return fn(item); }); - return item; - }; - Queue.prototype.dequeue = function () { - if (this.size()) - return this._items.splice(0, 1)[0]; - }; - Queue.prototype.clear = function () { - var current = this._items; - this._items = []; - return current; - }; - Queue.prototype.size = function () { - return this._items.length; - }; - Queue.prototype.remove = function (item) { - var idx = this._items.indexOf(item); - return idx > -1 && this._items.splice(idx, 1)[0]; - }; - Queue.prototype.peekTail = function () { - return this._items[this._items.length - 1]; - }; - Queue.prototype.peekHead = function () { - if (this.size()) - return this._items[0]; - }; - return Queue; -}()); - -//# sourceMappingURL=queue.js.map - -/***/ }), - -/***/ "./node_modules/@uirouter/core/lib-esm/common/safeConsole.js": -/*!*******************************************************************!*\ - !*** ./node_modules/@uirouter/core/lib-esm/common/safeConsole.js ***! - \*******************************************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "safeConsole": () => (/* binding */ safeConsole) -/* harmony export */ }); -/* harmony import */ var _common__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./common */ "./node_modules/@uirouter/core/lib-esm/common/common.js"); -/** - * workaround for missing console object in IE9 when dev tools haven't been opened o_O - * @packageDocumentation - */ -/* tslint:disable:no-console */ - -var noopConsoleStub = { log: _common__WEBPACK_IMPORTED_MODULE_0__.noop, error: _common__WEBPACK_IMPORTED_MODULE_0__.noop, table: _common__WEBPACK_IMPORTED_MODULE_0__.noop }; -function ie9Console(console) { - var bound = function (fn) { return Function.prototype.bind.call(fn, console); }; - return { - log: bound(console.log), - error: bound(console.log), - table: bound(console.log), - }; -} -function fallbackConsole(console) { - var log = console.log.bind(console); - var error = console.error ? console.error.bind(console) : log; - var table = console.table ? console.table.bind(console) : log; - return { log: log, error: error, table: table }; -} -function getSafeConsole() { - // @ts-ignore - var isIE9 = typeof document !== 'undefined' && document.documentMode && document.documentMode === 9; - if (isIE9) { - return window && window.console ? ie9Console(window.console) : noopConsoleStub; - } - else if (!console.table || !console.error) { - return fallbackConsole(console); - } - else { - return console; - } -} -var safeConsole = getSafeConsole(); -//# sourceMappingURL=safeConsole.js.map - -/***/ }), - -/***/ "./node_modules/@uirouter/core/lib-esm/common/strings.js": -/*!***************************************************************!*\ - !*** ./node_modules/@uirouter/core/lib-esm/common/strings.js ***! - \***************************************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "maxLength": () => (/* binding */ maxLength), -/* harmony export */ "padString": () => (/* binding */ padString), -/* harmony export */ "kebobString": () => (/* binding */ kebobString), -/* harmony export */ "functionToString": () => (/* binding */ functionToString), -/* harmony export */ "fnToString": () => (/* binding */ fnToString), -/* harmony export */ "stringify": () => (/* binding */ stringify), -/* harmony export */ "beforeAfterSubstr": () => (/* binding */ beforeAfterSubstr), -/* harmony export */ "hostRegex": () => (/* binding */ hostRegex), -/* harmony export */ "stripLastPathElement": () => (/* binding */ stripLastPathElement), -/* harmony export */ "splitHash": () => (/* binding */ splitHash), -/* harmony export */ "splitQuery": () => (/* binding */ splitQuery), -/* harmony export */ "splitEqual": () => (/* binding */ splitEqual), -/* harmony export */ "trimHashVal": () => (/* binding */ trimHashVal), -/* harmony export */ "splitOnDelim": () => (/* binding */ splitOnDelim), -/* harmony export */ "joinNeighborsR": () => (/* binding */ joinNeighborsR) -/* harmony export */ }); -/* harmony import */ var _predicates__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./predicates */ "./node_modules/@uirouter/core/lib-esm/common/predicates.js"); -/* harmony import */ var _transition_rejectFactory__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../transition/rejectFactory */ "./node_modules/@uirouter/core/lib-esm/transition/rejectFactory.js"); -/* harmony import */ var _common__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./common */ "./node_modules/@uirouter/core/lib-esm/common/common.js"); -/* harmony import */ var _hof__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./hof */ "./node_modules/@uirouter/core/lib-esm/common/hof.js"); -/** - * Functions that manipulate strings - * - * Although these functions are exported, they are subject to change without notice. - * - * @packageDocumentation - */ - - - - -/** - * Returns a string shortened to a maximum length - * - * If the string is already less than the `max` length, return the string. - * Else return the string, shortened to `max - 3` and append three dots ("..."). - * - * @param max the maximum length of the string to return - * @param str the input string - */ -function maxLength(max, str) { - if (str.length <= max) - return str; - return str.substr(0, max - 3) + '...'; -} -/** - * Returns a string, with spaces added to the end, up to a desired str length - * - * If the string is already longer than the desired length, return the string. - * Else returns the string, with extra spaces on the end, such that it reaches `length` characters. - * - * @param length the desired length of the string to return - * @param str the input string - */ -function padString(length, str) { - while (str.length < length) - str += ' '; - return str; -} -function kebobString(camelCase) { - return camelCase - .replace(/^([A-Z])/, function ($1) { return $1.toLowerCase(); }) // replace first char - .replace(/([A-Z])/g, function ($1) { return '-' + $1.toLowerCase(); }); // replace rest -} -function functionToString(fn) { - var fnStr = fnToString(fn); - var namedFunctionMatch = fnStr.match(/^(function [^ ]+\([^)]*\))/); - var toStr = namedFunctionMatch ? namedFunctionMatch[1] : fnStr; - var fnName = fn['name'] || ''; - if (fnName && toStr.match(/function \(/)) { - return 'function ' + fnName + toStr.substr(9); - } - return toStr; -} -function fnToString(fn) { - var _fn = (0,_predicates__WEBPACK_IMPORTED_MODULE_0__.isArray)(fn) ? fn.slice(-1)[0] : fn; - return (_fn && _fn.toString()) || 'undefined'; -} -var isRejection = _transition_rejectFactory__WEBPACK_IMPORTED_MODULE_1__.Rejection.isRejectionPromise; -var hasToString = function (obj) { - return (0,_predicates__WEBPACK_IMPORTED_MODULE_0__.isObject)(obj) && !(0,_predicates__WEBPACK_IMPORTED_MODULE_0__.isArray)(obj) && obj.constructor !== Object && (0,_predicates__WEBPACK_IMPORTED_MODULE_0__.isFunction)(obj.toString); -}; -var stringifyPattern = (0,_hof__WEBPACK_IMPORTED_MODULE_3__.pattern)([ - [_predicates__WEBPACK_IMPORTED_MODULE_0__.isUndefined, (0,_hof__WEBPACK_IMPORTED_MODULE_3__.val)('undefined')], - [_predicates__WEBPACK_IMPORTED_MODULE_0__.isNull, (0,_hof__WEBPACK_IMPORTED_MODULE_3__.val)('null')], - [_predicates__WEBPACK_IMPORTED_MODULE_0__.isPromise, (0,_hof__WEBPACK_IMPORTED_MODULE_3__.val)('[Promise]')], - [isRejection, function (x) { return x._transitionRejection.toString(); }], - [hasToString, function (x) { return x.toString(); }], - [_predicates__WEBPACK_IMPORTED_MODULE_0__.isInjectable, functionToString], - [(0,_hof__WEBPACK_IMPORTED_MODULE_3__.val)(true), _common__WEBPACK_IMPORTED_MODULE_2__.identity], -]); -function stringify(o) { - var seen = []; - function format(value) { - if ((0,_predicates__WEBPACK_IMPORTED_MODULE_0__.isObject)(value)) { - if (seen.indexOf(value) !== -1) - return '[circular ref]'; - seen.push(value); - } - return stringifyPattern(value); - } - if ((0,_predicates__WEBPACK_IMPORTED_MODULE_0__.isUndefined)(o)) { - // Workaround for IE & Edge Spec incompatibility where replacer function would not be called when JSON.stringify - // is given `undefined` as value. To work around that, we simply detect `undefined` and bail out early by - // manually stringifying it. - return format(o); - } - return JSON.stringify(o, function (key, value) { return format(value); }).replace(/\\"/g, '"'); -} -/** Returns a function that splits a string on a character or substring */ -var beforeAfterSubstr = function (char) { return function (str) { - if (!str) - return ['', '']; - var idx = str.indexOf(char); - if (idx === -1) - return [str, '']; - return [str.substr(0, idx), str.substr(idx + 1)]; -}; }; -var hostRegex = new RegExp('^(?:[a-z]+:)?//[^/]+/'); -var stripLastPathElement = function (str) { return str.replace(/\/[^/]*$/, ''); }; -var splitHash = beforeAfterSubstr('#'); -var splitQuery = beforeAfterSubstr('?'); -var splitEqual = beforeAfterSubstr('='); -var trimHashVal = function (str) { return (str ? str.replace(/^#/, '') : ''); }; -/** - * Splits on a delimiter, but returns the delimiters in the array - * - * #### Example: - * ```js - * var splitOnSlashes = splitOnDelim('/'); - * splitOnSlashes("/foo"); // ["/", "foo"] - * splitOnSlashes("/foo/"); // ["/", "foo", "/"] - * ``` - */ -function splitOnDelim(delim) { - var re = new RegExp('(' + delim + ')', 'g'); - return function (str) { return str.split(re).filter(_common__WEBPACK_IMPORTED_MODULE_2__.identity); }; -} -/** - * Reduce fn that joins neighboring strings - * - * Given an array of strings, returns a new array - * where all neighboring strings have been joined. - * - * #### Example: - * ```js - * let arr = ["foo", "bar", 1, "baz", "", "qux" ]; - * arr.reduce(joinNeighborsR, []) // ["foobar", 1, "bazqux" ] - * ``` - */ -function joinNeighborsR(acc, x) { - if ((0,_predicates__WEBPACK_IMPORTED_MODULE_0__.isString)((0,_common__WEBPACK_IMPORTED_MODULE_2__.tail)(acc)) && (0,_predicates__WEBPACK_IMPORTED_MODULE_0__.isString)(x)) - return acc.slice(0, -1).concat((0,_common__WEBPACK_IMPORTED_MODULE_2__.tail)(acc) + x); - return (0,_common__WEBPACK_IMPORTED_MODULE_2__.pushR)(acc, x); -} -//# sourceMappingURL=strings.js.map - -/***/ }), - -/***/ "./node_modules/@uirouter/core/lib-esm/common/trace.js": -/*!*************************************************************!*\ - !*** ./node_modules/@uirouter/core/lib-esm/common/trace.js ***! - \*************************************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "Category": () => (/* binding */ Category), -/* harmony export */ "Trace": () => (/* binding */ Trace), -/* harmony export */ "trace": () => (/* binding */ trace) -/* harmony export */ }); -/* harmony import */ var _common_hof__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../common/hof */ "./node_modules/@uirouter/core/lib-esm/common/hof.js"); -/* harmony import */ var _common_predicates__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../common/predicates */ "./node_modules/@uirouter/core/lib-esm/common/predicates.js"); -/* harmony import */ var _strings__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./strings */ "./node_modules/@uirouter/core/lib-esm/common/strings.js"); -/* harmony import */ var _safeConsole__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./safeConsole */ "./node_modules/@uirouter/core/lib-esm/common/safeConsole.js"); -/** - * # Transition tracing (debug) - * - * Enable transition tracing to print transition information to the console, - * in order to help debug your application. - * Tracing logs detailed information about each Transition to your console. - * - * To enable tracing, import the [[Trace]] singleton and enable one or more categories. - * - * ### ES6 - * ```js - * import {trace} from "@uirouter/core"; - * trace.enable(1, 5); // TRANSITION and VIEWCONFIG - * ``` - * - * ### CJS - * ```js - * let trace = require("@uirouter/core").trace; - * trace.enable("TRANSITION", "VIEWCONFIG"); - * ``` - * - * ### Globals - * ```js - * let trace = window["@uirouter/core"].trace; - * trace.enable(); // Trace everything (very verbose) - * ``` - * - * ### Angular 1: - * ```js - * app.run($trace => $trace.enable()); - * ``` - * - * @packageDocumentation - */ - - - - -function uiViewString(uiview) { - if (!uiview) - return 'ui-view (defunct)'; - var state = uiview.creationContext ? uiview.creationContext.name || '(root)' : '(none)'; - return "[ui-view#" + uiview.id + " " + uiview.$type + ":" + uiview.fqn + " (" + uiview.name + "@" + state + ")]"; -} -var viewConfigString = function (viewConfig) { - var view = viewConfig.viewDecl; - var state = view.$context.name || '(root)'; - return "[View#" + viewConfig.$id + " from '" + state + "' state]: target ui-view: '" + view.$uiViewName + "@" + view.$uiViewContextAnchor + "'"; -}; -function normalizedCat(input) { - return (0,_common_predicates__WEBPACK_IMPORTED_MODULE_1__.isNumber)(input) ? Category[input] : Category[Category[input]]; -} -/** - * Trace categories Enum - * - * Enable or disable a category using [[Trace.enable]] or [[Trace.disable]] - * - * `trace.enable(Category.TRANSITION)` - * - * These can also be provided using a matching string, or position ordinal - * - * `trace.enable("TRANSITION")` - * - * `trace.enable(1)` - */ -var Category; -(function (Category) { - Category[Category["RESOLVE"] = 0] = "RESOLVE"; - Category[Category["TRANSITION"] = 1] = "TRANSITION"; - Category[Category["HOOK"] = 2] = "HOOK"; - Category[Category["UIVIEW"] = 3] = "UIVIEW"; - Category[Category["VIEWCONFIG"] = 4] = "VIEWCONFIG"; -})(Category || (Category = {})); - -var _tid = (0,_common_hof__WEBPACK_IMPORTED_MODULE_0__.parse)('$id'); -var _rid = (0,_common_hof__WEBPACK_IMPORTED_MODULE_0__.parse)('router.$id'); -var transLbl = function (trans) { return "Transition #" + _tid(trans) + "-" + _rid(trans); }; -/** - * Prints UI-Router Transition trace information to the console. - */ -var Trace = /** @class */ (function () { - /** @internal */ - function Trace() { - /** @internal */ - this._enabled = {}; - this.approximateDigests = 0; - } - /** @internal */ - Trace.prototype._set = function (enabled, categories) { - var _this = this; - if (!categories.length) { - categories = Object.keys(Category) - .map(function (k) { return parseInt(k, 10); }) - .filter(function (k) { return !isNaN(k); }) - .map(function (key) { return Category[key]; }); - } - categories.map(normalizedCat).forEach(function (category) { return (_this._enabled[category] = enabled); }); - }; - Trace.prototype.enable = function () { - var categories = []; - for (var _i = 0; _i < arguments.length; _i++) { - categories[_i] = arguments[_i]; - } - this._set(true, categories); - }; - Trace.prototype.disable = function () { - var categories = []; - for (var _i = 0; _i < arguments.length; _i++) { - categories[_i] = arguments[_i]; - } - this._set(false, categories); - }; - /** - * Retrieves the enabled stateus of a [[Category]] - * - * ```js - * trace.enabled("VIEWCONFIG"); // true or false - * ``` - * - * @returns boolean true if the category is enabled - */ - Trace.prototype.enabled = function (category) { - return !!this._enabled[normalizedCat(category)]; - }; - /** @internal called by ui-router code */ - Trace.prototype.traceTransitionStart = function (trans) { - if (!this.enabled(Category.TRANSITION)) - return; - _safeConsole__WEBPACK_IMPORTED_MODULE_3__.safeConsole.log(transLbl(trans) + ": Started -> " + (0,_strings__WEBPACK_IMPORTED_MODULE_2__.stringify)(trans)); - }; - /** @internal called by ui-router code */ - Trace.prototype.traceTransitionIgnored = function (trans) { - if (!this.enabled(Category.TRANSITION)) - return; - _safeConsole__WEBPACK_IMPORTED_MODULE_3__.safeConsole.log(transLbl(trans) + ": Ignored <> " + (0,_strings__WEBPACK_IMPORTED_MODULE_2__.stringify)(trans)); - }; - /** @internal called by ui-router code */ - Trace.prototype.traceHookInvocation = function (step, trans, options) { - if (!this.enabled(Category.HOOK)) - return; - var event = (0,_common_hof__WEBPACK_IMPORTED_MODULE_0__.parse)('traceData.hookType')(options) || 'internal', context = (0,_common_hof__WEBPACK_IMPORTED_MODULE_0__.parse)('traceData.context.state.name')(options) || (0,_common_hof__WEBPACK_IMPORTED_MODULE_0__.parse)('traceData.context')(options) || 'unknown', name = (0,_strings__WEBPACK_IMPORTED_MODULE_2__.functionToString)(step.registeredHook.callback); - _safeConsole__WEBPACK_IMPORTED_MODULE_3__.safeConsole.log(transLbl(trans) + ": Hook -> " + event + " context: " + context + ", " + (0,_strings__WEBPACK_IMPORTED_MODULE_2__.maxLength)(200, name)); - }; - /** @internal called by ui-router code */ - Trace.prototype.traceHookResult = function (hookResult, trans, transitionOptions) { - if (!this.enabled(Category.HOOK)) - return; - _safeConsole__WEBPACK_IMPORTED_MODULE_3__.safeConsole.log(transLbl(trans) + ": <- Hook returned: " + (0,_strings__WEBPACK_IMPORTED_MODULE_2__.maxLength)(200, (0,_strings__WEBPACK_IMPORTED_MODULE_2__.stringify)(hookResult))); - }; - /** @internal called by ui-router code */ - Trace.prototype.traceResolvePath = function (path, when, trans) { - if (!this.enabled(Category.RESOLVE)) - return; - _safeConsole__WEBPACK_IMPORTED_MODULE_3__.safeConsole.log(transLbl(trans) + ": Resolving " + path + " (" + when + ")"); - }; - /** @internal called by ui-router code */ - Trace.prototype.traceResolvableResolved = function (resolvable, trans) { - if (!this.enabled(Category.RESOLVE)) - return; - _safeConsole__WEBPACK_IMPORTED_MODULE_3__.safeConsole.log(transLbl(trans) + ": <- Resolved " + resolvable + " to: " + (0,_strings__WEBPACK_IMPORTED_MODULE_2__.maxLength)(200, (0,_strings__WEBPACK_IMPORTED_MODULE_2__.stringify)(resolvable.data))); - }; - /** @internal called by ui-router code */ - Trace.prototype.traceError = function (reason, trans) { - if (!this.enabled(Category.TRANSITION)) - return; - _safeConsole__WEBPACK_IMPORTED_MODULE_3__.safeConsole.log(transLbl(trans) + ": <- Rejected " + (0,_strings__WEBPACK_IMPORTED_MODULE_2__.stringify)(trans) + ", reason: " + reason); - }; - /** @internal called by ui-router code */ - Trace.prototype.traceSuccess = function (finalState, trans) { - if (!this.enabled(Category.TRANSITION)) - return; - _safeConsole__WEBPACK_IMPORTED_MODULE_3__.safeConsole.log(transLbl(trans) + ": <- Success " + (0,_strings__WEBPACK_IMPORTED_MODULE_2__.stringify)(trans) + ", final state: " + finalState.name); - }; - /** @internal called by ui-router code */ - Trace.prototype.traceUIViewEvent = function (event, viewData, extra) { - if (extra === void 0) { extra = ''; } - if (!this.enabled(Category.UIVIEW)) - return; - _safeConsole__WEBPACK_IMPORTED_MODULE_3__.safeConsole.log("ui-view: " + (0,_strings__WEBPACK_IMPORTED_MODULE_2__.padString)(30, event) + " " + uiViewString(viewData) + extra); - }; - /** @internal called by ui-router code */ - Trace.prototype.traceUIViewConfigUpdated = function (viewData, context) { - if (!this.enabled(Category.UIVIEW)) - return; - this.traceUIViewEvent('Updating', viewData, " with ViewConfig from context='" + context + "'"); - }; - /** @internal called by ui-router code */ - Trace.prototype.traceUIViewFill = function (viewData, html) { - if (!this.enabled(Category.UIVIEW)) - return; - this.traceUIViewEvent('Fill', viewData, " with: " + (0,_strings__WEBPACK_IMPORTED_MODULE_2__.maxLength)(200, html)); - }; - /** @internal called by ui-router code */ - Trace.prototype.traceViewSync = function (pairs) { - if (!this.enabled(Category.VIEWCONFIG)) - return; - var uivheader = 'uiview component fqn'; - var cfgheader = 'view config state (view name)'; - var mapping = pairs - .map(function (_a) { - var _b; - var uiView = _a.uiView, viewConfig = _a.viewConfig; - var uiv = uiView && uiView.fqn; - var cfg = viewConfig && viewConfig.viewDecl.$context.name + ": (" + viewConfig.viewDecl.$name + ")"; - return _b = {}, _b[uivheader] = uiv, _b[cfgheader] = cfg, _b; - }) - .sort(function (a, b) { return (a[uivheader] || '').localeCompare(b[uivheader] || ''); }); - _safeConsole__WEBPACK_IMPORTED_MODULE_3__.safeConsole.table(mapping); - }; - /** @internal called by ui-router code */ - Trace.prototype.traceViewServiceEvent = function (event, viewConfig) { - if (!this.enabled(Category.VIEWCONFIG)) - return; - _safeConsole__WEBPACK_IMPORTED_MODULE_3__.safeConsole.log("VIEWCONFIG: " + event + " " + viewConfigString(viewConfig)); - }; - /** @internal called by ui-router code */ - Trace.prototype.traceViewServiceUIViewEvent = function (event, viewData) { - if (!this.enabled(Category.VIEWCONFIG)) - return; - _safeConsole__WEBPACK_IMPORTED_MODULE_3__.safeConsole.log("VIEWCONFIG: " + event + " " + uiViewString(viewData)); - }; - return Trace; -}()); - -/** - * The [[Trace]] singleton - * - * #### Example: - * ```js - * import {trace} from "@uirouter/core"; - * trace.enable(1, 5); - * ``` - */ -var trace = new Trace(); - -//# sourceMappingURL=trace.js.map - -/***/ }), - -/***/ "./node_modules/@uirouter/core/lib-esm/globals.js": -/*!********************************************************!*\ - !*** ./node_modules/@uirouter/core/lib-esm/globals.js ***! - \********************************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "UIRouterGlobals": () => (/* binding */ UIRouterGlobals) -/* harmony export */ }); -/* harmony import */ var _params_stateParams__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./params/stateParams */ "./node_modules/@uirouter/core/lib-esm/params/stateParams.js"); -/* harmony import */ var _common_queue__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./common/queue */ "./node_modules/@uirouter/core/lib-esm/common/queue.js"); - - -/** - * Global router state - * - * This is where we hold the global mutable state such as current state, current - * params, current transition, etc. - */ -var UIRouterGlobals = /** @class */ (function () { - function UIRouterGlobals() { - /** - * Current parameter values - * - * The parameter values from the latest successful transition - */ - this.params = new _params_stateParams__WEBPACK_IMPORTED_MODULE_0__.StateParams(); - /** @internal */ - this.lastStartedTransitionId = -1; - /** @internal */ - this.transitionHistory = new _common_queue__WEBPACK_IMPORTED_MODULE_1__.Queue([], 1); - /** @internal */ - this.successfulTransitions = new _common_queue__WEBPACK_IMPORTED_MODULE_1__.Queue([], 1); - } - UIRouterGlobals.prototype.dispose = function () { - this.transitionHistory.clear(); - this.successfulTransitions.clear(); - this.transition = null; - }; - return UIRouterGlobals; -}()); - -//# sourceMappingURL=globals.js.map - -/***/ }), - -/***/ "./node_modules/@uirouter/core/lib-esm/hooks/coreResolvables.js": -/*!**********************************************************************!*\ - !*** ./node_modules/@uirouter/core/lib-esm/hooks/coreResolvables.js ***! - \**********************************************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "registerAddCoreResolvables": () => (/* binding */ registerAddCoreResolvables), -/* harmony export */ "treeChangesCleanup": () => (/* binding */ treeChangesCleanup) -/* harmony export */ }); -/* harmony import */ var _transition_transition__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../transition/transition */ "./node_modules/@uirouter/core/lib-esm/transition/transition.js"); -/* harmony import */ var _router__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../router */ "./node_modules/@uirouter/core/lib-esm/router.js"); -/* harmony import */ var _resolve__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../resolve */ "./node_modules/@uirouter/core/lib-esm/resolve/index.js"); -/* harmony import */ var _common__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../common */ "./node_modules/@uirouter/core/lib-esm/common/index.js"); - - - - -function addCoreResolvables(trans) { - trans.addResolvable(_resolve__WEBPACK_IMPORTED_MODULE_2__.Resolvable.fromData(_router__WEBPACK_IMPORTED_MODULE_1__.UIRouter, trans.router), ''); - trans.addResolvable(_resolve__WEBPACK_IMPORTED_MODULE_2__.Resolvable.fromData(_transition_transition__WEBPACK_IMPORTED_MODULE_0__.Transition, trans), ''); - trans.addResolvable(_resolve__WEBPACK_IMPORTED_MODULE_2__.Resolvable.fromData('$transition$', trans), ''); - trans.addResolvable(_resolve__WEBPACK_IMPORTED_MODULE_2__.Resolvable.fromData('$stateParams', trans.params()), ''); - trans.entering().forEach(function (state) { - trans.addResolvable(_resolve__WEBPACK_IMPORTED_MODULE_2__.Resolvable.fromData('$state$', state), state); - }); -} -var registerAddCoreResolvables = function (transitionService) { - return transitionService.onCreate({}, addCoreResolvables); -}; -var TRANSITION_TOKENS = ['$transition$', _transition_transition__WEBPACK_IMPORTED_MODULE_0__.Transition]; -var isTransition = (0,_common__WEBPACK_IMPORTED_MODULE_3__.inArray)(TRANSITION_TOKENS); -// References to Transition in the treeChanges pathnodes makes all -// previous Transitions reachable in memory, causing a memory leak -// This function removes resolves for '$transition$' and `Transition` from the treeChanges. -// Do not use this on current transitions, only on old ones. -var treeChangesCleanup = function (trans) { - var nodes = (0,_common__WEBPACK_IMPORTED_MODULE_3__.values)(trans.treeChanges()).reduce(_common__WEBPACK_IMPORTED_MODULE_3__.unnestR, []).reduce(_common__WEBPACK_IMPORTED_MODULE_3__.uniqR, []); - // If the resolvable is a Transition, return a new resolvable with null data - var replaceTransitionWithNull = function (r) { - return isTransition(r.token) ? _resolve__WEBPACK_IMPORTED_MODULE_2__.Resolvable.fromData(r.token, null) : r; - }; - nodes.forEach(function (node) { - node.resolvables = node.resolvables.map(replaceTransitionWithNull); - }); -}; -//# sourceMappingURL=coreResolvables.js.map - -/***/ }), - -/***/ "./node_modules/@uirouter/core/lib-esm/hooks/ignoredTransition.js": -/*!************************************************************************!*\ - !*** ./node_modules/@uirouter/core/lib-esm/hooks/ignoredTransition.js ***! - \************************************************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "registerIgnoredTransitionHook": () => (/* binding */ registerIgnoredTransitionHook) -/* harmony export */ }); -/* harmony import */ var _common_trace__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../common/trace */ "./node_modules/@uirouter/core/lib-esm/common/trace.js"); -/* harmony import */ var _transition_rejectFactory__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../transition/rejectFactory */ "./node_modules/@uirouter/core/lib-esm/transition/rejectFactory.js"); - - -/** - * A [[TransitionHookFn]] that skips a transition if it should be ignored - * - * This hook is invoked at the end of the onBefore phase. - * - * If the transition should be ignored (because no parameter or states changed) - * then the transition is ignored and not processed. - */ -function ignoredHook(trans) { - var ignoredReason = trans._ignoredReason(); - if (!ignoredReason) - return; - _common_trace__WEBPACK_IMPORTED_MODULE_0__.trace.traceTransitionIgnored(trans); - var pending = trans.router.globals.transition; - // The user clicked a link going back to the *current state* ('A') - // However, there is also a pending transition in flight (to 'B') - // Abort the transition to 'B' because the user now wants to be back at 'A'. - if (ignoredReason === 'SameAsCurrent' && pending) { - pending.abort(); - } - return _transition_rejectFactory__WEBPACK_IMPORTED_MODULE_1__.Rejection.ignored().toPromise(); -} -var registerIgnoredTransitionHook = function (transitionService) { - return transitionService.onBefore({}, ignoredHook, { priority: -9999 }); -}; -//# sourceMappingURL=ignoredTransition.js.map - -/***/ }), - -/***/ "./node_modules/@uirouter/core/lib-esm/hooks/invalidTransition.js": -/*!************************************************************************!*\ - !*** ./node_modules/@uirouter/core/lib-esm/hooks/invalidTransition.js ***! - \************************************************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "registerInvalidTransitionHook": () => (/* binding */ registerInvalidTransitionHook) -/* harmony export */ }); -/** - * A [[TransitionHookFn]] that rejects the Transition if it is invalid - * - * This hook is invoked at the end of the onBefore phase. - * If the transition is invalid (for example, param values do not validate) - * then the transition is rejected. - */ -function invalidTransitionHook(trans) { - if (!trans.valid()) { - throw new Error(trans.error().toString()); - } -} -var registerInvalidTransitionHook = function (transitionService) { - return transitionService.onBefore({}, invalidTransitionHook, { priority: -10000 }); -}; -//# sourceMappingURL=invalidTransition.js.map - -/***/ }), - -/***/ "./node_modules/@uirouter/core/lib-esm/hooks/lazyLoad.js": -/*!***************************************************************!*\ - !*** ./node_modules/@uirouter/core/lib-esm/hooks/lazyLoad.js ***! - \***************************************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "registerLazyLoadHook": () => (/* binding */ registerLazyLoadHook), -/* harmony export */ "lazyLoadState": () => (/* binding */ lazyLoadState) -/* harmony export */ }); -/* harmony import */ var _common_coreservices__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../common/coreservices */ "./node_modules/@uirouter/core/lib-esm/common/coreservices.js"); - -/** - * A [[TransitionHookFn]] that performs lazy loading - * - * When entering a state "abc" which has a `lazyLoad` function defined: - * - Invoke the `lazyLoad` function (unless it is already in process) - * - Flag the hook function as "in process" - * - The function should return a promise (that resolves when lazy loading is complete) - * - Wait for the promise to settle - * - If the promise resolves to a [[LazyLoadResult]], then register those states - * - Flag the hook function as "not in process" - * - If the hook was successful - * - Remove the `lazyLoad` function from the state declaration - * - If all the hooks were successful - * - Retry the transition (by returning a TargetState) - * - * ``` - * .state('abc', { - * component: 'fooComponent', - * lazyLoad: () => import('./fooComponent') - * }); - * ``` - * - * See [[StateDeclaration.lazyLoad]] - */ -var lazyLoadHook = function (transition) { - var router = transition.router; - function retryTransition() { - if (transition.originalTransition().options().source !== 'url') { - // The original transition was not triggered via url sync - // The lazy state should be loaded now, so re-try the original transition - var orig = transition.targetState(); - return router.stateService.target(orig.identifier(), orig.params(), orig.options()); - } - // The original transition was triggered via url sync - // Run the URL rules and find the best match - var $url = router.urlService; - var result = $url.match($url.parts()); - var rule = result && result.rule; - // If the best match is a state, redirect the transition (instead - // of calling sync() which supersedes the current transition) - if (rule && rule.type === 'STATE') { - var state = rule.state; - var params = result.match; - return router.stateService.target(state, params, transition.options()); - } - // No matching state found, so let .sync() choose the best non-state match/otherwise - router.urlService.sync(); - } - var promises = transition - .entering() - .filter(function (state) { return !!state.$$state().lazyLoad; }) - .map(function (state) { return lazyLoadState(transition, state); }); - return _common_coreservices__WEBPACK_IMPORTED_MODULE_0__.services.$q.all(promises).then(retryTransition); -}; -var registerLazyLoadHook = function (transitionService) { - return transitionService.onBefore({ entering: function (state) { return !!state.lazyLoad; } }, lazyLoadHook); -}; -/** - * Invokes a state's lazy load function - * - * @param transition a Transition context - * @param state the state to lazy load - * @returns A promise for the lazy load result - */ -function lazyLoadState(transition, state) { - var lazyLoadFn = state.$$state().lazyLoad; - // Store/get the lazy load promise on/from the hookfn so it doesn't get re-invoked - var promise = lazyLoadFn['_promise']; - if (!promise) { - var success = function (result) { - delete state.lazyLoad; - delete state.$$state().lazyLoad; - delete lazyLoadFn['_promise']; - return result; - }; - var error = function (err) { - delete lazyLoadFn['_promise']; - return _common_coreservices__WEBPACK_IMPORTED_MODULE_0__.services.$q.reject(err); - }; - promise = lazyLoadFn['_promise'] = _common_coreservices__WEBPACK_IMPORTED_MODULE_0__.services.$q.when(lazyLoadFn(transition, state)) - .then(updateStateRegistry) - .then(success, error); - } - /** Register any lazy loaded state definitions */ - function updateStateRegistry(result) { - if (result && Array.isArray(result.states)) { - result.states.forEach(function (_state) { return transition.router.stateRegistry.register(_state); }); - } - return result; - } - return promise; -} -//# sourceMappingURL=lazyLoad.js.map - -/***/ }), - -/***/ "./node_modules/@uirouter/core/lib-esm/hooks/onEnterExitRetain.js": -/*!************************************************************************!*\ - !*** ./node_modules/@uirouter/core/lib-esm/hooks/onEnterExitRetain.js ***! - \************************************************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "registerOnExitHook": () => (/* binding */ registerOnExitHook), -/* harmony export */ "registerOnRetainHook": () => (/* binding */ registerOnRetainHook), -/* harmony export */ "registerOnEnterHook": () => (/* binding */ registerOnEnterHook) -/* harmony export */ }); -/** - * A factory which creates an onEnter, onExit or onRetain transition hook function - * - * The returned function invokes the (for instance) state.onEnter hook when the - * state is being entered. - */ -function makeEnterExitRetainHook(hookName) { - return function (transition, state) { - var _state = state.$$state(); - var hookFn = _state[hookName]; - return hookFn(transition, state); - }; -} -/** - * The [[TransitionStateHookFn]] for onExit - * - * When the state is being exited, the state's .onExit function is invoked. - * - * Registered using `transitionService.onExit({ exiting: (state) => !!state.onExit }, onExitHook);` - * - * See: [[IHookRegistry.onExit]] - */ -var onExitHook = makeEnterExitRetainHook('onExit'); -var registerOnExitHook = function (transitionService) { - return transitionService.onExit({ exiting: function (state) { return !!state.onExit; } }, onExitHook); -}; -/** - * The [[TransitionStateHookFn]] for onRetain - * - * When the state was already entered, and is not being exited or re-entered, the state's .onRetain function is invoked. - * - * Registered using `transitionService.onRetain({ retained: (state) => !!state.onRetain }, onRetainHook);` - * - * See: [[IHookRegistry.onRetain]] - */ -var onRetainHook = makeEnterExitRetainHook('onRetain'); -var registerOnRetainHook = function (transitionService) { - return transitionService.onRetain({ retained: function (state) { return !!state.onRetain; } }, onRetainHook); -}; -/** - * The [[TransitionStateHookFn]] for onEnter - * - * When the state is being entered, the state's .onEnter function is invoked. - * - * Registered using `transitionService.onEnter({ entering: (state) => !!state.onEnter }, onEnterHook);` - * - * See: [[IHookRegistry.onEnter]] - */ -var onEnterHook = makeEnterExitRetainHook('onEnter'); -var registerOnEnterHook = function (transitionService) { - return transitionService.onEnter({ entering: function (state) { return !!state.onEnter; } }, onEnterHook); -}; -//# sourceMappingURL=onEnterExitRetain.js.map - -/***/ }), - -/***/ "./node_modules/@uirouter/core/lib-esm/hooks/redirectTo.js": -/*!*****************************************************************!*\ - !*** ./node_modules/@uirouter/core/lib-esm/hooks/redirectTo.js ***! - \*****************************************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "registerRedirectToHook": () => (/* binding */ registerRedirectToHook) -/* harmony export */ }); -/* harmony import */ var _common_predicates__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../common/predicates */ "./node_modules/@uirouter/core/lib-esm/common/predicates.js"); -/* harmony import */ var _common_coreservices__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../common/coreservices */ "./node_modules/@uirouter/core/lib-esm/common/coreservices.js"); -/* harmony import */ var _state_targetState__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../state/targetState */ "./node_modules/@uirouter/core/lib-esm/state/targetState.js"); - - - -/** - * A [[TransitionHookFn]] that redirects to a different state or params - * - * Registered using `transitionService.onStart({ to: (state) => !!state.redirectTo }, redirectHook);` - * - * See [[StateDeclaration.redirectTo]] - */ -var redirectToHook = function (trans) { - var redirect = trans.to().redirectTo; - if (!redirect) - return; - var $state = trans.router.stateService; - function handleResult(result) { - if (!result) - return; - if (result instanceof _state_targetState__WEBPACK_IMPORTED_MODULE_2__.TargetState) - return result; - if ((0,_common_predicates__WEBPACK_IMPORTED_MODULE_0__.isString)(result)) - return $state.target(result, trans.params(), trans.options()); - if (result['state'] || result['params']) - return $state.target(result['state'] || trans.to(), result['params'] || trans.params(), trans.options()); - } - if ((0,_common_predicates__WEBPACK_IMPORTED_MODULE_0__.isFunction)(redirect)) { - return _common_coreservices__WEBPACK_IMPORTED_MODULE_1__.services.$q.when(redirect(trans)).then(handleResult); - } - return handleResult(redirect); -}; -var registerRedirectToHook = function (transitionService) { - return transitionService.onStart({ to: function (state) { return !!state.redirectTo; } }, redirectToHook); -}; -//# sourceMappingURL=redirectTo.js.map - -/***/ }), - -/***/ "./node_modules/@uirouter/core/lib-esm/hooks/resolve.js": -/*!**************************************************************!*\ - !*** ./node_modules/@uirouter/core/lib-esm/hooks/resolve.js ***! - \**************************************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "RESOLVE_HOOK_PRIORITY": () => (/* binding */ RESOLVE_HOOK_PRIORITY), -/* harmony export */ "registerEagerResolvePath": () => (/* binding */ registerEagerResolvePath), -/* harmony export */ "registerLazyResolveState": () => (/* binding */ registerLazyResolveState), -/* harmony export */ "registerResolveRemaining": () => (/* binding */ registerResolveRemaining) -/* harmony export */ }); -/* harmony import */ var _common_common__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../common/common */ "./node_modules/@uirouter/core/lib-esm/common/common.js"); -/* harmony import */ var _resolve_resolveContext__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../resolve/resolveContext */ "./node_modules/@uirouter/core/lib-esm/resolve/resolveContext.js"); -/* harmony import */ var _common_hof__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../common/hof */ "./node_modules/@uirouter/core/lib-esm/common/hof.js"); - - - -var RESOLVE_HOOK_PRIORITY = 1000; -/** - * A [[TransitionHookFn]] which resolves all EAGER Resolvables in the To Path - * - * Registered using `transitionService.onStart({}, eagerResolvePath, { priority: 1000 });` - * - * When a Transition starts, this hook resolves all the EAGER Resolvables, which the transition then waits for. - * - * See [[StateDeclaration.resolve]] - */ -var eagerResolvePath = function (trans) { - return new _resolve_resolveContext__WEBPACK_IMPORTED_MODULE_1__.ResolveContext(trans.treeChanges().to).resolvePath('EAGER', trans).then(_common_common__WEBPACK_IMPORTED_MODULE_0__.noop); -}; -var registerEagerResolvePath = function (transitionService) { - return transitionService.onStart({}, eagerResolvePath, { priority: RESOLVE_HOOK_PRIORITY }); -}; -/** - * A [[TransitionHookFn]] which resolves all LAZY Resolvables for the state (and all its ancestors) in the To Path - * - * Registered using `transitionService.onEnter({ entering: () => true }, lazyResolveState, { priority: 1000 });` - * - * When a State is being entered, this hook resolves all the Resolvables for this state, which the transition then waits for. - * - * See [[StateDeclaration.resolve]] - */ -var lazyResolveState = function (trans, state) { - return new _resolve_resolveContext__WEBPACK_IMPORTED_MODULE_1__.ResolveContext(trans.treeChanges().to).subContext(state.$$state()).resolvePath('LAZY', trans).then(_common_common__WEBPACK_IMPORTED_MODULE_0__.noop); -}; -var registerLazyResolveState = function (transitionService) { - return transitionService.onEnter({ entering: (0,_common_hof__WEBPACK_IMPORTED_MODULE_2__.val)(true) }, lazyResolveState, { priority: RESOLVE_HOOK_PRIORITY }); -}; -/** - * A [[TransitionHookFn]] which resolves any dynamically added (LAZY or EAGER) Resolvables. - * - * Registered using `transitionService.onFinish({}, eagerResolvePath, { priority: 1000 });` - * - * After all entering states have been entered, this hook resolves any remaining Resolvables. - * These are typically dynamic resolves which were added by some Transition Hook using [[Transition.addResolvable]]. - * - * See [[StateDeclaration.resolve]] - */ -var resolveRemaining = function (trans) { - return new _resolve_resolveContext__WEBPACK_IMPORTED_MODULE_1__.ResolveContext(trans.treeChanges().to).resolvePath('LAZY', trans).then(_common_common__WEBPACK_IMPORTED_MODULE_0__.noop); -}; -var registerResolveRemaining = function (transitionService) { - return transitionService.onFinish({}, resolveRemaining, { priority: RESOLVE_HOOK_PRIORITY }); -}; -//# sourceMappingURL=resolve.js.map - -/***/ }), - -/***/ "./node_modules/@uirouter/core/lib-esm/hooks/updateGlobals.js": -/*!********************************************************************!*\ - !*** ./node_modules/@uirouter/core/lib-esm/hooks/updateGlobals.js ***! - \********************************************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "registerUpdateGlobalState": () => (/* binding */ registerUpdateGlobalState) -/* harmony export */ }); -/* harmony import */ var _common_common__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../common/common */ "./node_modules/@uirouter/core/lib-esm/common/common.js"); - -/** - * A [[TransitionHookFn]] which updates global UI-Router state - * - * Registered using `transitionService.onBefore({}, updateGlobalState);` - * - * Before a [[Transition]] starts, updates the global value of "the current transition" ([[Globals.transition]]). - * After a successful [[Transition]], updates the global values of "the current state" - * ([[Globals.current]] and [[Globals.$current]]) and "the current param values" ([[Globals.params]]). - * - * See also the deprecated properties: - * [[StateService.transition]], [[StateService.current]], [[StateService.params]] - */ -var updateGlobalState = function (trans) { - var globals = trans.router.globals; - var transitionSuccessful = function () { - globals.successfulTransitions.enqueue(trans); - globals.$current = trans.$to(); - globals.current = globals.$current.self; - (0,_common_common__WEBPACK_IMPORTED_MODULE_0__.copy)(trans.params(), globals.params); - }; - var clearCurrentTransition = function () { - // Do not clear globals.transition if a different transition has started in the meantime - if (globals.transition === trans) - globals.transition = null; - }; - trans.onSuccess({}, transitionSuccessful, { priority: 10000 }); - trans.promise.then(clearCurrentTransition, clearCurrentTransition); -}; -var registerUpdateGlobalState = function (transitionService) { - return transitionService.onCreate({}, updateGlobalState); -}; -//# sourceMappingURL=updateGlobals.js.map - -/***/ }), - -/***/ "./node_modules/@uirouter/core/lib-esm/hooks/url.js": -/*!**********************************************************!*\ - !*** ./node_modules/@uirouter/core/lib-esm/hooks/url.js ***! - \**********************************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "registerUpdateUrl": () => (/* binding */ registerUpdateUrl) -/* harmony export */ }); -/** - * A [[TransitionHookFn]] which updates the URL after a successful transition - * - * Registered using `transitionService.onSuccess({}, updateUrl);` - */ -var updateUrl = function (transition) { - var options = transition.options(); - var $state = transition.router.stateService; - var $urlRouter = transition.router.urlRouter; - // Dont update the url in these situations: - // The transition was triggered by a URL sync (options.source === 'url') - // The user doesn't want the url to update (options.location === false) - // The destination state, and all parents have no navigable url - if (options.source !== 'url' && options.location && $state.$current.navigable) { - var urlOptions = { replace: options.location === 'replace' }; - $urlRouter.push($state.$current.navigable.url, $state.params, urlOptions); - } - $urlRouter.update(true); -}; -var registerUpdateUrl = function (transitionService) { - return transitionService.onSuccess({}, updateUrl, { priority: 9999 }); -}; -//# sourceMappingURL=url.js.map - -/***/ }), - -/***/ "./node_modules/@uirouter/core/lib-esm/hooks/views.js": -/*!************************************************************!*\ - !*** ./node_modules/@uirouter/core/lib-esm/hooks/views.js ***! - \************************************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "registerLoadEnteringViews": () => (/* binding */ registerLoadEnteringViews), -/* harmony export */ "registerActivateViews": () => (/* binding */ registerActivateViews) -/* harmony export */ }); -/* harmony import */ var _common_common__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../common/common */ "./node_modules/@uirouter/core/lib-esm/common/common.js"); -/* harmony import */ var _common_coreservices__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../common/coreservices */ "./node_modules/@uirouter/core/lib-esm/common/coreservices.js"); - - -/** - * A [[TransitionHookFn]] which waits for the views to load - * - * Registered using `transitionService.onStart({}, loadEnteringViews);` - * - * Allows the views to do async work in [[ViewConfig.load]] before the transition continues. - * In angular 1, this includes loading the templates. - */ -var loadEnteringViews = function (transition) { - var $q = _common_coreservices__WEBPACK_IMPORTED_MODULE_1__.services.$q; - var enteringViews = transition.views('entering'); - if (!enteringViews.length) - return; - return $q.all(enteringViews.map(function (view) { return $q.when(view.load()); })).then(_common_common__WEBPACK_IMPORTED_MODULE_0__.noop); -}; -var registerLoadEnteringViews = function (transitionService) { - return transitionService.onFinish({}, loadEnteringViews); -}; -/** - * A [[TransitionHookFn]] which activates the new views when a transition is successful. - * - * Registered using `transitionService.onSuccess({}, activateViews);` - * - * After a transition is complete, this hook deactivates the old views from the previous state, - * and activates the new views from the destination state. - * - * See [[ViewService]] - */ -var activateViews = function (transition) { - var enteringViews = transition.views('entering'); - var exitingViews = transition.views('exiting'); - if (!enteringViews.length && !exitingViews.length) - return; - var $view = transition.router.viewService; - exitingViews.forEach(function (vc) { return $view.deactivateViewConfig(vc); }); - enteringViews.forEach(function (vc) { return $view.activateViewConfig(vc); }); - $view.sync(); -}; -var registerActivateViews = function (transitionService) { - return transitionService.onSuccess({}, activateViews); -}; -//# sourceMappingURL=views.js.map - -/***/ }), - -/***/ "./node_modules/@uirouter/core/lib-esm/index.js": -/*!******************************************************!*\ - !*** ./node_modules/@uirouter/core/lib-esm/index.js ***! - \******************************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "Category": () => (/* reexport safe */ _common_index__WEBPACK_IMPORTED_MODULE_0__.Category), -/* harmony export */ "Glob": () => (/* reexport safe */ _common_index__WEBPACK_IMPORTED_MODULE_0__.Glob), -/* harmony export */ "Queue": () => (/* reexport safe */ _common_index__WEBPACK_IMPORTED_MODULE_0__.Queue), -/* harmony export */ "Trace": () => (/* reexport safe */ _common_index__WEBPACK_IMPORTED_MODULE_0__.Trace), -/* harmony export */ "_extend": () => (/* reexport safe */ _common_index__WEBPACK_IMPORTED_MODULE_0__._extend), -/* harmony export */ "_inArray": () => (/* reexport safe */ _common_index__WEBPACK_IMPORTED_MODULE_0__._inArray), -/* harmony export */ "_pushTo": () => (/* reexport safe */ _common_index__WEBPACK_IMPORTED_MODULE_0__._pushTo), -/* harmony export */ "_removeFrom": () => (/* reexport safe */ _common_index__WEBPACK_IMPORTED_MODULE_0__._removeFrom), -/* harmony export */ "all": () => (/* reexport safe */ _common_index__WEBPACK_IMPORTED_MODULE_0__.all), -/* harmony export */ "allTrueR": () => (/* reexport safe */ _common_index__WEBPACK_IMPORTED_MODULE_0__.allTrueR), -/* harmony export */ "ancestors": () => (/* reexport safe */ _common_index__WEBPACK_IMPORTED_MODULE_0__.ancestors), -/* harmony export */ "and": () => (/* reexport safe */ _common_index__WEBPACK_IMPORTED_MODULE_0__.and), -/* harmony export */ "any": () => (/* reexport safe */ _common_index__WEBPACK_IMPORTED_MODULE_0__.any), -/* harmony export */ "anyTrueR": () => (/* reexport safe */ _common_index__WEBPACK_IMPORTED_MODULE_0__.anyTrueR), -/* harmony export */ "applyPairs": () => (/* reexport safe */ _common_index__WEBPACK_IMPORTED_MODULE_0__.applyPairs), -/* harmony export */ "arrayTuples": () => (/* reexport safe */ _common_index__WEBPACK_IMPORTED_MODULE_0__.arrayTuples), -/* harmony export */ "assertFn": () => (/* reexport safe */ _common_index__WEBPACK_IMPORTED_MODULE_0__.assertFn), -/* harmony export */ "assertMap": () => (/* reexport safe */ _common_index__WEBPACK_IMPORTED_MODULE_0__.assertMap), -/* harmony export */ "assertPredicate": () => (/* reexport safe */ _common_index__WEBPACK_IMPORTED_MODULE_0__.assertPredicate), -/* harmony export */ "beforeAfterSubstr": () => (/* reexport safe */ _common_index__WEBPACK_IMPORTED_MODULE_0__.beforeAfterSubstr), -/* harmony export */ "compose": () => (/* reexport safe */ _common_index__WEBPACK_IMPORTED_MODULE_0__.compose), -/* harmony export */ "copy": () => (/* reexport safe */ _common_index__WEBPACK_IMPORTED_MODULE_0__.copy), -/* harmony export */ "createProxyFunctions": () => (/* reexport safe */ _common_index__WEBPACK_IMPORTED_MODULE_0__.createProxyFunctions), -/* harmony export */ "curry": () => (/* reexport safe */ _common_index__WEBPACK_IMPORTED_MODULE_0__.curry), -/* harmony export */ "defaults": () => (/* reexport safe */ _common_index__WEBPACK_IMPORTED_MODULE_0__.defaults), -/* harmony export */ "deregAll": () => (/* reexport safe */ _common_index__WEBPACK_IMPORTED_MODULE_0__.deregAll), -/* harmony export */ "eq": () => (/* reexport safe */ _common_index__WEBPACK_IMPORTED_MODULE_0__.eq), -/* harmony export */ "equals": () => (/* reexport safe */ _common_index__WEBPACK_IMPORTED_MODULE_0__.equals), -/* harmony export */ "extend": () => (/* reexport safe */ _common_index__WEBPACK_IMPORTED_MODULE_0__.extend), -/* harmony export */ "filter": () => (/* reexport safe */ _common_index__WEBPACK_IMPORTED_MODULE_0__.filter), -/* harmony export */ "find": () => (/* reexport safe */ _common_index__WEBPACK_IMPORTED_MODULE_0__.find), -/* harmony export */ "flatten": () => (/* reexport safe */ _common_index__WEBPACK_IMPORTED_MODULE_0__.flatten), -/* harmony export */ "flattenR": () => (/* reexport safe */ _common_index__WEBPACK_IMPORTED_MODULE_0__.flattenR), -/* harmony export */ "fnToString": () => (/* reexport safe */ _common_index__WEBPACK_IMPORTED_MODULE_0__.fnToString), -/* harmony export */ "forEach": () => (/* reexport safe */ _common_index__WEBPACK_IMPORTED_MODULE_0__.forEach), -/* harmony export */ "fromJson": () => (/* reexport safe */ _common_index__WEBPACK_IMPORTED_MODULE_0__.fromJson), -/* harmony export */ "functionToString": () => (/* reexport safe */ _common_index__WEBPACK_IMPORTED_MODULE_0__.functionToString), -/* harmony export */ "hostRegex": () => (/* reexport safe */ _common_index__WEBPACK_IMPORTED_MODULE_0__.hostRegex), -/* harmony export */ "identity": () => (/* reexport safe */ _common_index__WEBPACK_IMPORTED_MODULE_0__.identity), -/* harmony export */ "inArray": () => (/* reexport safe */ _common_index__WEBPACK_IMPORTED_MODULE_0__.inArray), -/* harmony export */ "inherit": () => (/* reexport safe */ _common_index__WEBPACK_IMPORTED_MODULE_0__.inherit), -/* harmony export */ "invoke": () => (/* reexport safe */ _common_index__WEBPACK_IMPORTED_MODULE_0__.invoke), -/* harmony export */ "is": () => (/* reexport safe */ _common_index__WEBPACK_IMPORTED_MODULE_0__.is), -/* harmony export */ "isArray": () => (/* reexport safe */ _common_index__WEBPACK_IMPORTED_MODULE_0__.isArray), -/* harmony export */ "isDate": () => (/* reexport safe */ _common_index__WEBPACK_IMPORTED_MODULE_0__.isDate), -/* harmony export */ "isDefined": () => (/* reexport safe */ _common_index__WEBPACK_IMPORTED_MODULE_0__.isDefined), -/* harmony export */ "isFunction": () => (/* reexport safe */ _common_index__WEBPACK_IMPORTED_MODULE_0__.isFunction), -/* harmony export */ "isInjectable": () => (/* reexport safe */ _common_index__WEBPACK_IMPORTED_MODULE_0__.isInjectable), -/* harmony export */ "isNull": () => (/* reexport safe */ _common_index__WEBPACK_IMPORTED_MODULE_0__.isNull), -/* harmony export */ "isNullOrUndefined": () => (/* reexport safe */ _common_index__WEBPACK_IMPORTED_MODULE_0__.isNullOrUndefined), -/* harmony export */ "isNumber": () => (/* reexport safe */ _common_index__WEBPACK_IMPORTED_MODULE_0__.isNumber), -/* harmony export */ "isObject": () => (/* reexport safe */ _common_index__WEBPACK_IMPORTED_MODULE_0__.isObject), -/* harmony export */ "isPromise": () => (/* reexport safe */ _common_index__WEBPACK_IMPORTED_MODULE_0__.isPromise), -/* harmony export */ "isRegExp": () => (/* reexport safe */ _common_index__WEBPACK_IMPORTED_MODULE_0__.isRegExp), -/* harmony export */ "isString": () => (/* reexport safe */ _common_index__WEBPACK_IMPORTED_MODULE_0__.isString), -/* harmony export */ "isUndefined": () => (/* reexport safe */ _common_index__WEBPACK_IMPORTED_MODULE_0__.isUndefined), -/* harmony export */ "joinNeighborsR": () => (/* reexport safe */ _common_index__WEBPACK_IMPORTED_MODULE_0__.joinNeighborsR), -/* harmony export */ "kebobString": () => (/* reexport safe */ _common_index__WEBPACK_IMPORTED_MODULE_0__.kebobString), -/* harmony export */ "makeStub": () => (/* reexport safe */ _common_index__WEBPACK_IMPORTED_MODULE_0__.makeStub), -/* harmony export */ "map": () => (/* reexport safe */ _common_index__WEBPACK_IMPORTED_MODULE_0__.map), -/* harmony export */ "mapObj": () => (/* reexport safe */ _common_index__WEBPACK_IMPORTED_MODULE_0__.mapObj), -/* harmony export */ "maxLength": () => (/* reexport safe */ _common_index__WEBPACK_IMPORTED_MODULE_0__.maxLength), -/* harmony export */ "mergeR": () => (/* reexport safe */ _common_index__WEBPACK_IMPORTED_MODULE_0__.mergeR), -/* harmony export */ "noop": () => (/* reexport safe */ _common_index__WEBPACK_IMPORTED_MODULE_0__.noop), -/* harmony export */ "not": () => (/* reexport safe */ _common_index__WEBPACK_IMPORTED_MODULE_0__.not), -/* harmony export */ "omit": () => (/* reexport safe */ _common_index__WEBPACK_IMPORTED_MODULE_0__.omit), -/* harmony export */ "or": () => (/* reexport safe */ _common_index__WEBPACK_IMPORTED_MODULE_0__.or), -/* harmony export */ "padString": () => (/* reexport safe */ _common_index__WEBPACK_IMPORTED_MODULE_0__.padString), -/* harmony export */ "pairs": () => (/* reexport safe */ _common_index__WEBPACK_IMPORTED_MODULE_0__.pairs), -/* harmony export */ "parse": () => (/* reexport safe */ _common_index__WEBPACK_IMPORTED_MODULE_0__.parse), -/* harmony export */ "pattern": () => (/* reexport safe */ _common_index__WEBPACK_IMPORTED_MODULE_0__.pattern), -/* harmony export */ "pick": () => (/* reexport safe */ _common_index__WEBPACK_IMPORTED_MODULE_0__.pick), -/* harmony export */ "pipe": () => (/* reexport safe */ _common_index__WEBPACK_IMPORTED_MODULE_0__.pipe), -/* harmony export */ "pluck": () => (/* reexport safe */ _common_index__WEBPACK_IMPORTED_MODULE_0__.pluck), -/* harmony export */ "prop": () => (/* reexport safe */ _common_index__WEBPACK_IMPORTED_MODULE_0__.prop), -/* harmony export */ "propEq": () => (/* reexport safe */ _common_index__WEBPACK_IMPORTED_MODULE_0__.propEq), -/* harmony export */ "pushR": () => (/* reexport safe */ _common_index__WEBPACK_IMPORTED_MODULE_0__.pushR), -/* harmony export */ "pushTo": () => (/* reexport safe */ _common_index__WEBPACK_IMPORTED_MODULE_0__.pushTo), -/* harmony export */ "removeFrom": () => (/* reexport safe */ _common_index__WEBPACK_IMPORTED_MODULE_0__.removeFrom), -/* harmony export */ "root": () => (/* reexport safe */ _common_index__WEBPACK_IMPORTED_MODULE_0__.root), -/* harmony export */ "services": () => (/* reexport safe */ _common_index__WEBPACK_IMPORTED_MODULE_0__.services), -/* harmony export */ "silenceUncaughtInPromise": () => (/* reexport safe */ _common_index__WEBPACK_IMPORTED_MODULE_0__.silenceUncaughtInPromise), -/* harmony export */ "silentRejection": () => (/* reexport safe */ _common_index__WEBPACK_IMPORTED_MODULE_0__.silentRejection), -/* harmony export */ "splitEqual": () => (/* reexport safe */ _common_index__WEBPACK_IMPORTED_MODULE_0__.splitEqual), -/* harmony export */ "splitHash": () => (/* reexport safe */ _common_index__WEBPACK_IMPORTED_MODULE_0__.splitHash), -/* harmony export */ "splitOnDelim": () => (/* reexport safe */ _common_index__WEBPACK_IMPORTED_MODULE_0__.splitOnDelim), -/* harmony export */ "splitQuery": () => (/* reexport safe */ _common_index__WEBPACK_IMPORTED_MODULE_0__.splitQuery), -/* harmony export */ "stringify": () => (/* reexport safe */ _common_index__WEBPACK_IMPORTED_MODULE_0__.stringify), -/* harmony export */ "stripLastPathElement": () => (/* reexport safe */ _common_index__WEBPACK_IMPORTED_MODULE_0__.stripLastPathElement), -/* harmony export */ "tail": () => (/* reexport safe */ _common_index__WEBPACK_IMPORTED_MODULE_0__.tail), -/* harmony export */ "toJson": () => (/* reexport safe */ _common_index__WEBPACK_IMPORTED_MODULE_0__.toJson), -/* harmony export */ "trace": () => (/* reexport safe */ _common_index__WEBPACK_IMPORTED_MODULE_0__.trace), -/* harmony export */ "trimHashVal": () => (/* reexport safe */ _common_index__WEBPACK_IMPORTED_MODULE_0__.trimHashVal), -/* harmony export */ "uniqR": () => (/* reexport safe */ _common_index__WEBPACK_IMPORTED_MODULE_0__.uniqR), -/* harmony export */ "unnest": () => (/* reexport safe */ _common_index__WEBPACK_IMPORTED_MODULE_0__.unnest), -/* harmony export */ "unnestR": () => (/* reexport safe */ _common_index__WEBPACK_IMPORTED_MODULE_0__.unnestR), -/* harmony export */ "val": () => (/* reexport safe */ _common_index__WEBPACK_IMPORTED_MODULE_0__.val), -/* harmony export */ "values": () => (/* reexport safe */ _common_index__WEBPACK_IMPORTED_MODULE_0__.values), -/* harmony export */ "PathNode": () => (/* reexport safe */ _path_index__WEBPACK_IMPORTED_MODULE_2__.PathNode), -/* harmony export */ "PathUtils": () => (/* reexport safe */ _path_index__WEBPACK_IMPORTED_MODULE_2__.PathUtils), -/* harmony export */ "NATIVE_INJECTOR_TOKEN": () => (/* reexport safe */ _resolve_index__WEBPACK_IMPORTED_MODULE_3__.NATIVE_INJECTOR_TOKEN), -/* harmony export */ "Resolvable": () => (/* reexport safe */ _resolve_index__WEBPACK_IMPORTED_MODULE_3__.Resolvable), -/* harmony export */ "ResolveContext": () => (/* reexport safe */ _resolve_index__WEBPACK_IMPORTED_MODULE_3__.ResolveContext), -/* harmony export */ "defaultResolvePolicy": () => (/* reexport safe */ _resolve_index__WEBPACK_IMPORTED_MODULE_3__.defaultResolvePolicy), -/* harmony export */ "resolvePolicies": () => (/* reexport safe */ _resolve_index__WEBPACK_IMPORTED_MODULE_3__.resolvePolicies), -/* harmony export */ "HookBuilder": () => (/* reexport safe */ _transition_index__WEBPACK_IMPORTED_MODULE_5__.HookBuilder), -/* harmony export */ "RegisteredHook": () => (/* reexport safe */ _transition_index__WEBPACK_IMPORTED_MODULE_5__.RegisteredHook), -/* harmony export */ "RejectType": () => (/* reexport safe */ _transition_index__WEBPACK_IMPORTED_MODULE_5__.RejectType), -/* harmony export */ "Rejection": () => (/* reexport safe */ _transition_index__WEBPACK_IMPORTED_MODULE_5__.Rejection), -/* harmony export */ "Transition": () => (/* reexport safe */ _transition_index__WEBPACK_IMPORTED_MODULE_5__.Transition), -/* harmony export */ "TransitionEventType": () => (/* reexport safe */ _transition_index__WEBPACK_IMPORTED_MODULE_5__.TransitionEventType), -/* harmony export */ "TransitionHook": () => (/* reexport safe */ _transition_index__WEBPACK_IMPORTED_MODULE_5__.TransitionHook), -/* harmony export */ "TransitionHookPhase": () => (/* reexport safe */ _transition_index__WEBPACK_IMPORTED_MODULE_5__.TransitionHookPhase), -/* harmony export */ "TransitionHookScope": () => (/* reexport safe */ _transition_index__WEBPACK_IMPORTED_MODULE_5__.TransitionHookScope), -/* harmony export */ "TransitionService": () => (/* reexport safe */ _transition_index__WEBPACK_IMPORTED_MODULE_5__.TransitionService), -/* harmony export */ "defaultTransOpts": () => (/* reexport safe */ _transition_index__WEBPACK_IMPORTED_MODULE_5__.defaultTransOpts), -/* harmony export */ "makeEvent": () => (/* reexport safe */ _transition_index__WEBPACK_IMPORTED_MODULE_5__.makeEvent), -/* harmony export */ "matchState": () => (/* reexport safe */ _transition_index__WEBPACK_IMPORTED_MODULE_5__.matchState), -/* harmony export */ "UIRouterGlobals": () => (/* reexport safe */ _globals__WEBPACK_IMPORTED_MODULE_8__.UIRouterGlobals), -/* harmony export */ "UIRouter": () => (/* reexport safe */ _router__WEBPACK_IMPORTED_MODULE_9__.UIRouter), -/* harmony export */ "UIRouterPluginBase": () => (/* reexport safe */ _interface__WEBPACK_IMPORTED_MODULE_11__.UIRouterPluginBase) -/* harmony export */ }); -/* harmony import */ var _common_index__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./common/index */ "./node_modules/@uirouter/core/lib-esm/common/index.js"); -/* harmony import */ var _params_index__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./params/index */ "./node_modules/@uirouter/core/lib-esm/params/index.js"); -/* harmony reexport (unknown) */ var __WEBPACK_REEXPORT_OBJECT__ = {}; -/* harmony reexport (unknown) */ for(const __WEBPACK_IMPORT_KEY__ in _params_index__WEBPACK_IMPORTED_MODULE_1__) if(["default","Category","Glob","Queue","Trace","_extend","_inArray","_pushTo","_removeFrom","all","allTrueR","ancestors","and","any","anyTrueR","applyPairs","arrayTuples","assertFn","assertMap","assertPredicate","beforeAfterSubstr","compose","copy","createProxyFunctions","curry","defaults","deregAll","eq","equals","extend","filter","find","flatten","flattenR","fnToString","forEach","fromJson","functionToString","hostRegex","identity","inArray","inherit","invoke","is","isArray","isDate","isDefined","isFunction","isInjectable","isNull","isNullOrUndefined","isNumber","isObject","isPromise","isRegExp","isString","isUndefined","joinNeighborsR","kebobString","makeStub","map","mapObj","maxLength","mergeR","noop","not","omit","or","padString","pairs","parse","pattern","pick","pipe","pluck","prop","propEq","pushR","pushTo","removeFrom","root","services","silenceUncaughtInPromise","silentRejection","splitEqual","splitHash","splitOnDelim","splitQuery","stringify","stripLastPathElement","tail","toJson","trace","trimHashVal","uniqR","unnest","unnestR","val","values"].indexOf(__WEBPACK_IMPORT_KEY__) < 0) __WEBPACK_REEXPORT_OBJECT__[__WEBPACK_IMPORT_KEY__] = () => _params_index__WEBPACK_IMPORTED_MODULE_1__[__WEBPACK_IMPORT_KEY__] -/* harmony reexport (unknown) */ __webpack_require__.d(__webpack_exports__, __WEBPACK_REEXPORT_OBJECT__); -/* harmony import */ var _path_index__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./path/index */ "./node_modules/@uirouter/core/lib-esm/path/index.js"); -/* harmony import */ var _resolve_index__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./resolve/index */ "./node_modules/@uirouter/core/lib-esm/resolve/index.js"); -/* harmony import */ var _state_index__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./state/index */ "./node_modules/@uirouter/core/lib-esm/state/index.js"); -/* harmony reexport (unknown) */ var __WEBPACK_REEXPORT_OBJECT__ = {}; -/* harmony reexport (unknown) */ for(const __WEBPACK_IMPORT_KEY__ in _state_index__WEBPACK_IMPORTED_MODULE_4__) if(["default","Category","Glob","Queue","Trace","_extend","_inArray","_pushTo","_removeFrom","all","allTrueR","ancestors","and","any","anyTrueR","applyPairs","arrayTuples","assertFn","assertMap","assertPredicate","beforeAfterSubstr","compose","copy","createProxyFunctions","curry","defaults","deregAll","eq","equals","extend","filter","find","flatten","flattenR","fnToString","forEach","fromJson","functionToString","hostRegex","identity","inArray","inherit","invoke","is","isArray","isDate","isDefined","isFunction","isInjectable","isNull","isNullOrUndefined","isNumber","isObject","isPromise","isRegExp","isString","isUndefined","joinNeighborsR","kebobString","makeStub","map","mapObj","maxLength","mergeR","noop","not","omit","or","padString","pairs","parse","pattern","pick","pipe","pluck","prop","propEq","pushR","pushTo","removeFrom","root","services","silenceUncaughtInPromise","silentRejection","splitEqual","splitHash","splitOnDelim","splitQuery","stringify","stripLastPathElement","tail","toJson","trace","trimHashVal","uniqR","unnest","unnestR","val","values","DefType","Param","ParamType","ParamTypes","StateParams","PathNode","PathUtils","NATIVE_INJECTOR_TOKEN","Resolvable","ResolveContext","defaultResolvePolicy","resolvePolicies"].indexOf(__WEBPACK_IMPORT_KEY__) < 0) __WEBPACK_REEXPORT_OBJECT__[__WEBPACK_IMPORT_KEY__] = () => _state_index__WEBPACK_IMPORTED_MODULE_4__[__WEBPACK_IMPORT_KEY__] -/* harmony reexport (unknown) */ __webpack_require__.d(__webpack_exports__, __WEBPACK_REEXPORT_OBJECT__); -/* harmony import */ var _transition_index__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./transition/index */ "./node_modules/@uirouter/core/lib-esm/transition/index.js"); -/* harmony import */ var _url_index__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./url/index */ "./node_modules/@uirouter/core/lib-esm/url/index.js"); -/* harmony reexport (unknown) */ var __WEBPACK_REEXPORT_OBJECT__ = {}; -/* harmony reexport (unknown) */ for(const __WEBPACK_IMPORT_KEY__ in _url_index__WEBPACK_IMPORTED_MODULE_6__) if(["default","Category","Glob","Queue","Trace","_extend","_inArray","_pushTo","_removeFrom","all","allTrueR","ancestors","and","any","anyTrueR","applyPairs","arrayTuples","assertFn","assertMap","assertPredicate","beforeAfterSubstr","compose","copy","createProxyFunctions","curry","defaults","deregAll","eq","equals","extend","filter","find","flatten","flattenR","fnToString","forEach","fromJson","functionToString","hostRegex","identity","inArray","inherit","invoke","is","isArray","isDate","isDefined","isFunction","isInjectable","isNull","isNullOrUndefined","isNumber","isObject","isPromise","isRegExp","isString","isUndefined","joinNeighborsR","kebobString","makeStub","map","mapObj","maxLength","mergeR","noop","not","omit","or","padString","pairs","parse","pattern","pick","pipe","pluck","prop","propEq","pushR","pushTo","removeFrom","root","services","silenceUncaughtInPromise","silentRejection","splitEqual","splitHash","splitOnDelim","splitQuery","stringify","stripLastPathElement","tail","toJson","trace","trimHashVal","uniqR","unnest","unnestR","val","values","DefType","Param","ParamType","ParamTypes","StateParams","PathNode","PathUtils","NATIVE_INJECTOR_TOKEN","Resolvable","ResolveContext","defaultResolvePolicy","resolvePolicies","StateBuilder","StateMatcher","StateObject","StateQueueManager","StateRegistry","StateService","TargetState","resolvablesBuilder","HookBuilder","RegisteredHook","RejectType","Rejection","Transition","TransitionEventType","TransitionHook","TransitionHookPhase","TransitionHookScope","TransitionService","defaultTransOpts","makeEvent","matchState"].indexOf(__WEBPACK_IMPORT_KEY__) < 0) __WEBPACK_REEXPORT_OBJECT__[__WEBPACK_IMPORT_KEY__] = () => _url_index__WEBPACK_IMPORTED_MODULE_6__[__WEBPACK_IMPORT_KEY__] -/* harmony reexport (unknown) */ __webpack_require__.d(__webpack_exports__, __WEBPACK_REEXPORT_OBJECT__); -/* harmony import */ var _view_index__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./view/index */ "./node_modules/@uirouter/core/lib-esm/view/index.js"); -/* harmony reexport (unknown) */ var __WEBPACK_REEXPORT_OBJECT__ = {}; -/* harmony reexport (unknown) */ for(const __WEBPACK_IMPORT_KEY__ in _view_index__WEBPACK_IMPORTED_MODULE_7__) if(["default","Category","Glob","Queue","Trace","_extend","_inArray","_pushTo","_removeFrom","all","allTrueR","ancestors","and","any","anyTrueR","applyPairs","arrayTuples","assertFn","assertMap","assertPredicate","beforeAfterSubstr","compose","copy","createProxyFunctions","curry","defaults","deregAll","eq","equals","extend","filter","find","flatten","flattenR","fnToString","forEach","fromJson","functionToString","hostRegex","identity","inArray","inherit","invoke","is","isArray","isDate","isDefined","isFunction","isInjectable","isNull","isNullOrUndefined","isNumber","isObject","isPromise","isRegExp","isString","isUndefined","joinNeighborsR","kebobString","makeStub","map","mapObj","maxLength","mergeR","noop","not","omit","or","padString","pairs","parse","pattern","pick","pipe","pluck","prop","propEq","pushR","pushTo","removeFrom","root","services","silenceUncaughtInPromise","silentRejection","splitEqual","splitHash","splitOnDelim","splitQuery","stringify","stripLastPathElement","tail","toJson","trace","trimHashVal","uniqR","unnest","unnestR","val","values","DefType","Param","ParamType","ParamTypes","StateParams","PathNode","PathUtils","NATIVE_INJECTOR_TOKEN","Resolvable","ResolveContext","defaultResolvePolicy","resolvePolicies","StateBuilder","StateMatcher","StateObject","StateQueueManager","StateRegistry","StateService","TargetState","resolvablesBuilder","HookBuilder","RegisteredHook","RejectType","Rejection","Transition","TransitionEventType","TransitionHook","TransitionHookPhase","TransitionHookScope","TransitionService","defaultTransOpts","makeEvent","matchState","BaseUrlRule","ParamFactory","UrlConfig","UrlMatcher","UrlMatcherFactory","UrlRouter","UrlRuleFactory","UrlRules","UrlService"].indexOf(__WEBPACK_IMPORT_KEY__) < 0) __WEBPACK_REEXPORT_OBJECT__[__WEBPACK_IMPORT_KEY__] = () => _view_index__WEBPACK_IMPORTED_MODULE_7__[__WEBPACK_IMPORT_KEY__] -/* harmony reexport (unknown) */ __webpack_require__.d(__webpack_exports__, __WEBPACK_REEXPORT_OBJECT__); -/* harmony import */ var _globals__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./globals */ "./node_modules/@uirouter/core/lib-esm/globals.js"); -/* harmony import */ var _router__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./router */ "./node_modules/@uirouter/core/lib-esm/router.js"); -/* harmony import */ var _vanilla__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./vanilla */ "./node_modules/@uirouter/core/lib-esm/vanilla.js"); -/* harmony reexport (unknown) */ var __WEBPACK_REEXPORT_OBJECT__ = {}; -/* harmony reexport (unknown) */ for(const __WEBPACK_IMPORT_KEY__ in _vanilla__WEBPACK_IMPORTED_MODULE_10__) if(["default","Category","Glob","Queue","Trace","_extend","_inArray","_pushTo","_removeFrom","all","allTrueR","ancestors","and","any","anyTrueR","applyPairs","arrayTuples","assertFn","assertMap","assertPredicate","beforeAfterSubstr","compose","copy","createProxyFunctions","curry","defaults","deregAll","eq","equals","extend","filter","find","flatten","flattenR","fnToString","forEach","fromJson","functionToString","hostRegex","identity","inArray","inherit","invoke","is","isArray","isDate","isDefined","isFunction","isInjectable","isNull","isNullOrUndefined","isNumber","isObject","isPromise","isRegExp","isString","isUndefined","joinNeighborsR","kebobString","makeStub","map","mapObj","maxLength","mergeR","noop","not","omit","or","padString","pairs","parse","pattern","pick","pipe","pluck","prop","propEq","pushR","pushTo","removeFrom","root","services","silenceUncaughtInPromise","silentRejection","splitEqual","splitHash","splitOnDelim","splitQuery","stringify","stripLastPathElement","tail","toJson","trace","trimHashVal","uniqR","unnest","unnestR","val","values","DefType","Param","ParamType","ParamTypes","StateParams","PathNode","PathUtils","NATIVE_INJECTOR_TOKEN","Resolvable","ResolveContext","defaultResolvePolicy","resolvePolicies","StateBuilder","StateMatcher","StateObject","StateQueueManager","StateRegistry","StateService","TargetState","resolvablesBuilder","HookBuilder","RegisteredHook","RejectType","Rejection","Transition","TransitionEventType","TransitionHook","TransitionHookPhase","TransitionHookScope","TransitionService","defaultTransOpts","makeEvent","matchState","BaseUrlRule","ParamFactory","UrlConfig","UrlMatcher","UrlMatcherFactory","UrlRouter","UrlRuleFactory","UrlRules","UrlService","ViewService","UIRouterGlobals","UIRouter"].indexOf(__WEBPACK_IMPORT_KEY__) < 0) __WEBPACK_REEXPORT_OBJECT__[__WEBPACK_IMPORT_KEY__] = () => _vanilla__WEBPACK_IMPORTED_MODULE_10__[__WEBPACK_IMPORT_KEY__] -/* harmony reexport (unknown) */ __webpack_require__.d(__webpack_exports__, __WEBPACK_REEXPORT_OBJECT__); -/* harmony import */ var _interface__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./interface */ "./node_modules/@uirouter/core/lib-esm/interface.js"); - - - - - - - - - - - - -//# sourceMappingURL=index.js.map - -/***/ }), - -/***/ "./node_modules/@uirouter/core/lib-esm/interface.js": -/*!**********************************************************!*\ - !*** ./node_modules/@uirouter/core/lib-esm/interface.js ***! - \**********************************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "UIRouterPluginBase": () => (/* binding */ UIRouterPluginBase) -/* harmony export */ }); -var UIRouterPluginBase = /** @class */ (function () { - function UIRouterPluginBase() { - } - UIRouterPluginBase.prototype.dispose = function (router) { }; - return UIRouterPluginBase; -}()); - -//# sourceMappingURL=interface.js.map - -/***/ }), - -/***/ "./node_modules/@uirouter/core/lib-esm/params/index.js": -/*!*************************************************************!*\ - !*** ./node_modules/@uirouter/core/lib-esm/params/index.js ***! - \*************************************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "DefType": () => (/* reexport safe */ _param__WEBPACK_IMPORTED_MODULE_1__.DefType), -/* harmony export */ "Param": () => (/* reexport safe */ _param__WEBPACK_IMPORTED_MODULE_1__.Param), -/* harmony export */ "ParamTypes": () => (/* reexport safe */ _paramTypes__WEBPACK_IMPORTED_MODULE_2__.ParamTypes), -/* harmony export */ "StateParams": () => (/* reexport safe */ _stateParams__WEBPACK_IMPORTED_MODULE_3__.StateParams), -/* harmony export */ "ParamType": () => (/* reexport safe */ _paramType__WEBPACK_IMPORTED_MODULE_4__.ParamType) -/* harmony export */ }); -/* harmony import */ var _interface__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./interface */ "./node_modules/@uirouter/core/lib-esm/params/interface.js"); -/* harmony import */ var _interface__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_interface__WEBPACK_IMPORTED_MODULE_0__); -/* harmony reexport (unknown) */ var __WEBPACK_REEXPORT_OBJECT__ = {}; -/* harmony reexport (unknown) */ for(const __WEBPACK_IMPORT_KEY__ in _interface__WEBPACK_IMPORTED_MODULE_0__) if(__WEBPACK_IMPORT_KEY__ !== "default") __WEBPACK_REEXPORT_OBJECT__[__WEBPACK_IMPORT_KEY__] = () => _interface__WEBPACK_IMPORTED_MODULE_0__[__WEBPACK_IMPORT_KEY__] -/* harmony reexport (unknown) */ __webpack_require__.d(__webpack_exports__, __WEBPACK_REEXPORT_OBJECT__); -/* harmony import */ var _param__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./param */ "./node_modules/@uirouter/core/lib-esm/params/param.js"); -/* harmony import */ var _paramTypes__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./paramTypes */ "./node_modules/@uirouter/core/lib-esm/params/paramTypes.js"); -/* harmony import */ var _stateParams__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./stateParams */ "./node_modules/@uirouter/core/lib-esm/params/stateParams.js"); -/* harmony import */ var _paramType__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./paramType */ "./node_modules/@uirouter/core/lib-esm/params/paramType.js"); -/** - * This module contains code for State Parameters. - * - * See [[ParamDeclaration]] - * - * @packageDocumentation @preferred - */ - - - - - -//# sourceMappingURL=index.js.map - -/***/ }), - -/***/ "./node_modules/@uirouter/core/lib-esm/params/interface.js": -/*!*****************************************************************!*\ - !*** ./node_modules/@uirouter/core/lib-esm/params/interface.js ***! - \*****************************************************************/ -/***/ (() => { - -//# sourceMappingURL=interface.js.map - -/***/ }), - -/***/ "./node_modules/@uirouter/core/lib-esm/params/param.js": -/*!*************************************************************!*\ - !*** ./node_modules/@uirouter/core/lib-esm/params/param.js ***! - \*************************************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "DefType": () => (/* binding */ DefType), -/* harmony export */ "Param": () => (/* binding */ Param) -/* harmony export */ }); -/* harmony import */ var _common_common__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../common/common */ "./node_modules/@uirouter/core/lib-esm/common/common.js"); -/* harmony import */ var _common_hof__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../common/hof */ "./node_modules/@uirouter/core/lib-esm/common/hof.js"); -/* harmony import */ var _common_predicates__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../common/predicates */ "./node_modules/@uirouter/core/lib-esm/common/predicates.js"); -/* harmony import */ var _common_coreservices__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../common/coreservices */ "./node_modules/@uirouter/core/lib-esm/common/coreservices.js"); -/* harmony import */ var _paramType__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./paramType */ "./node_modules/@uirouter/core/lib-esm/params/paramType.js"); - - - - - -var hasOwn = Object.prototype.hasOwnProperty; -var isShorthand = function (cfg) { - return ['value', 'type', 'squash', 'array', 'dynamic'].filter(hasOwn.bind(cfg || {})).length === 0; -}; -var DefType; -(function (DefType) { - DefType[DefType["PATH"] = 0] = "PATH"; - DefType[DefType["SEARCH"] = 1] = "SEARCH"; - DefType[DefType["CONFIG"] = 2] = "CONFIG"; -})(DefType || (DefType = {})); - -function getParamDeclaration(paramName, location, state) { - var noReloadOnSearch = (state.reloadOnSearch === false && location === DefType.SEARCH) || undefined; - var dynamic = (0,_common_common__WEBPACK_IMPORTED_MODULE_0__.find)([state.dynamic, noReloadOnSearch], _common_predicates__WEBPACK_IMPORTED_MODULE_2__.isDefined); - var defaultConfig = (0,_common_predicates__WEBPACK_IMPORTED_MODULE_2__.isDefined)(dynamic) ? { dynamic: dynamic } : {}; - var paramConfig = unwrapShorthand(state && state.params && state.params[paramName]); - return (0,_common_common__WEBPACK_IMPORTED_MODULE_0__.extend)(defaultConfig, paramConfig); -} -function unwrapShorthand(cfg) { - cfg = isShorthand(cfg) ? { value: cfg } : cfg; - getStaticDefaultValue['__cacheable'] = true; - function getStaticDefaultValue() { - return cfg.value; - } - var $$fn = (0,_common_predicates__WEBPACK_IMPORTED_MODULE_2__.isInjectable)(cfg.value) ? cfg.value : getStaticDefaultValue; - return (0,_common_common__WEBPACK_IMPORTED_MODULE_0__.extend)(cfg, { $$fn: $$fn }); -} -function getType(cfg, urlType, location, id, paramTypes) { - if (cfg.type && urlType && urlType.name !== 'string') - throw new Error("Param '" + id + "' has two type configurations."); - if (cfg.type && urlType && urlType.name === 'string' && paramTypes.type(cfg.type)) - return paramTypes.type(cfg.type); - if (urlType) - return urlType; - if (!cfg.type) { - var type = location === DefType.CONFIG - ? 'any' - : location === DefType.PATH - ? 'path' - : location === DefType.SEARCH - ? 'query' - : 'string'; - return paramTypes.type(type); - } - return cfg.type instanceof _paramType__WEBPACK_IMPORTED_MODULE_4__.ParamType ? cfg.type : paramTypes.type(cfg.type); -} -/** returns false, true, or the squash value to indicate the "default parameter url squash policy". */ -function getSquashPolicy(config, isOptional, defaultPolicy) { - var squash = config.squash; - if (!isOptional || squash === false) - return false; - if (!(0,_common_predicates__WEBPACK_IMPORTED_MODULE_2__.isDefined)(squash) || squash == null) - return defaultPolicy; - if (squash === true || (0,_common_predicates__WEBPACK_IMPORTED_MODULE_2__.isString)(squash)) - return squash; - throw new Error("Invalid squash policy: '" + squash + "'. Valid policies: false, true, or arbitrary string"); -} -function getReplace(config, arrayMode, isOptional, squash) { - var defaultPolicy = [ - { from: '', to: isOptional || arrayMode ? undefined : '' }, - { from: null, to: isOptional || arrayMode ? undefined : '' }, - ]; - var replace = (0,_common_predicates__WEBPACK_IMPORTED_MODULE_2__.isArray)(config.replace) ? config.replace : []; - if ((0,_common_predicates__WEBPACK_IMPORTED_MODULE_2__.isString)(squash)) - replace.push({ from: squash, to: undefined }); - var configuredKeys = (0,_common_common__WEBPACK_IMPORTED_MODULE_0__.map)(replace, (0,_common_hof__WEBPACK_IMPORTED_MODULE_1__.prop)('from')); - return (0,_common_common__WEBPACK_IMPORTED_MODULE_0__.filter)(defaultPolicy, function (item) { return configuredKeys.indexOf(item.from) === -1; }).concat(replace); -} -var Param = /** @class */ (function () { - function Param(id, type, location, urlConfig, state) { - var config = getParamDeclaration(id, location, state); - type = getType(config, type, location, id, urlConfig.paramTypes); - var arrayMode = getArrayMode(); - type = arrayMode ? type.$asArray(arrayMode, location === DefType.SEARCH) : type; - var isOptional = config.value !== undefined || location === DefType.SEARCH; - var dynamic = (0,_common_predicates__WEBPACK_IMPORTED_MODULE_2__.isDefined)(config.dynamic) ? !!config.dynamic : !!type.dynamic; - var raw = (0,_common_predicates__WEBPACK_IMPORTED_MODULE_2__.isDefined)(config.raw) ? !!config.raw : !!type.raw; - var squash = getSquashPolicy(config, isOptional, urlConfig.defaultSquashPolicy()); - var replace = getReplace(config, arrayMode, isOptional, squash); - var inherit = (0,_common_predicates__WEBPACK_IMPORTED_MODULE_2__.isDefined)(config.inherit) ? !!config.inherit : !!type.inherit; - // array config: param name (param[]) overrides default settings. explicit config overrides param name. - function getArrayMode() { - var arrayDefaults = { array: location === DefType.SEARCH ? 'auto' : false }; - var arrayParamNomenclature = id.match(/\[\]$/) ? { array: true } : {}; - return (0,_common_common__WEBPACK_IMPORTED_MODULE_0__.extend)(arrayDefaults, arrayParamNomenclature, config).array; - } - (0,_common_common__WEBPACK_IMPORTED_MODULE_0__.extend)(this, { id: id, type: type, location: location, isOptional: isOptional, dynamic: dynamic, raw: raw, squash: squash, replace: replace, inherit: inherit, array: arrayMode, config: config }); - } - Param.values = function (params, values) { - if (values === void 0) { values = {}; } - var paramValues = {}; - for (var _i = 0, params_1 = params; _i < params_1.length; _i++) { - var param = params_1[_i]; - paramValues[param.id] = param.value(values[param.id]); - } - return paramValues; - }; - /** - * Finds [[Param]] objects which have different param values - * - * Filters a list of [[Param]] objects to only those whose parameter values differ in two param value objects - * - * @param params: The list of Param objects to filter - * @param values1: The first set of parameter values - * @param values2: the second set of parameter values - * - * @returns any Param objects whose values were different between values1 and values2 - */ - Param.changed = function (params, values1, values2) { - if (values1 === void 0) { values1 = {}; } - if (values2 === void 0) { values2 = {}; } - return params.filter(function (param) { return !param.type.equals(values1[param.id], values2[param.id]); }); - }; - /** - * Checks if two param value objects are equal (for a set of [[Param]] objects) - * - * @param params The list of [[Param]] objects to check - * @param values1 The first set of param values - * @param values2 The second set of param values - * - * @returns true if the param values in values1 and values2 are equal - */ - Param.equals = function (params, values1, values2) { - if (values1 === void 0) { values1 = {}; } - if (values2 === void 0) { values2 = {}; } - return Param.changed(params, values1, values2).length === 0; - }; - /** Returns true if a the parameter values are valid, according to the Param definitions */ - Param.validates = function (params, values) { - if (values === void 0) { values = {}; } - return params.map(function (param) { return param.validates(values[param.id]); }).reduce(_common_common__WEBPACK_IMPORTED_MODULE_0__.allTrueR, true); - }; - Param.prototype.isDefaultValue = function (value) { - return this.isOptional && this.type.equals(this.value(), value); - }; - /** - * [Internal] Gets the decoded representation of a value if the value is defined, otherwise, returns the - * default value, which may be the result of an injectable function. - */ - Param.prototype.value = function (value) { - var _this = this; - /** - * [Internal] Get the default value of a parameter, which may be an injectable function. - */ - var getDefaultValue = function () { - if (_this._defaultValueCache) - return _this._defaultValueCache.defaultValue; - if (!_common_coreservices__WEBPACK_IMPORTED_MODULE_3__.services.$injector) - throw new Error('Injectable functions cannot be called at configuration time'); - var defaultValue = _common_coreservices__WEBPACK_IMPORTED_MODULE_3__.services.$injector.invoke(_this.config.$$fn); - if (defaultValue !== null && defaultValue !== undefined && !_this.type.is(defaultValue)) - throw new Error("Default value (" + defaultValue + ") for parameter '" + _this.id + "' is not an instance of ParamType (" + _this.type.name + ")"); - if (_this.config.$$fn['__cacheable']) { - _this._defaultValueCache = { defaultValue: defaultValue }; - } - return defaultValue; - }; - var replaceSpecialValues = function (val) { - for (var _i = 0, _a = _this.replace; _i < _a.length; _i++) { - var tuple = _a[_i]; - if (tuple.from === val) - return tuple.to; - } - return val; - }; - value = replaceSpecialValues(value); - return (0,_common_predicates__WEBPACK_IMPORTED_MODULE_2__.isUndefined)(value) ? getDefaultValue() : this.type.$normalize(value); - }; - Param.prototype.isSearch = function () { - return this.location === DefType.SEARCH; - }; - Param.prototype.validates = function (value) { - // There was no parameter value, but the param is optional - if (((0,_common_predicates__WEBPACK_IMPORTED_MODULE_2__.isUndefined)(value) || value === null) && this.isOptional) - return true; - // The value was not of the correct ParamType, and could not be decoded to the correct ParamType - var normalized = this.type.$normalize(value); - if (!this.type.is(normalized)) - return false; - // The value was of the correct type, but when encoded, did not match the ParamType's regexp - var encoded = this.type.encode(normalized); - return !((0,_common_predicates__WEBPACK_IMPORTED_MODULE_2__.isString)(encoded) && !this.type.pattern.exec(encoded)); - }; - Param.prototype.toString = function () { - return "{Param:" + this.id + " " + this.type + " squash: '" + this.squash + "' optional: " + this.isOptional + "}"; - }; - return Param; -}()); - -//# sourceMappingURL=param.js.map - -/***/ }), - -/***/ "./node_modules/@uirouter/core/lib-esm/params/paramType.js": -/*!*****************************************************************!*\ - !*** ./node_modules/@uirouter/core/lib-esm/params/paramType.js ***! - \*****************************************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "ParamType": () => (/* binding */ ParamType) -/* harmony export */ }); -/* harmony import */ var _common_common__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../common/common */ "./node_modules/@uirouter/core/lib-esm/common/common.js"); -/* harmony import */ var _common_predicates__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../common/predicates */ "./node_modules/@uirouter/core/lib-esm/common/predicates.js"); - - -/** - * An internal class which implements [[ParamTypeDefinition]]. - * - * A [[ParamTypeDefinition]] is a plain javascript object used to register custom parameter types. - * When a param type definition is registered, an instance of this class is created internally. - * - * This class has naive implementations for all the [[ParamTypeDefinition]] methods. - * - * Used by [[UrlMatcher]] when matching or formatting URLs, or comparing and validating parameter values. - * - * #### Example: - * ```js - * var paramTypeDef = { - * decode: function(val) { return parseInt(val, 10); }, - * encode: function(val) { return val && val.toString(); }, - * equals: function(a, b) { return this.is(a) && a === b; }, - * is: function(val) { return angular.isNumber(val) && isFinite(val) && val % 1 === 0; }, - * pattern: /\d+/ - * } - * - * var paramType = new ParamType(paramTypeDef); - * ``` - */ -var ParamType = /** @class */ (function () { - /** - * @param def A configuration object which contains the custom type definition. The object's - * properties will override the default methods and/or pattern in `ParamType`'s public interface. - * @returns a new ParamType object - */ - function ParamType(def) { - /** @inheritdoc */ - this.pattern = /.*/; - /** @inheritdoc */ - this.inherit = true; - (0,_common_common__WEBPACK_IMPORTED_MODULE_0__.extend)(this, def); - } - // consider these four methods to be "abstract methods" that should be overridden - /** @inheritdoc */ - ParamType.prototype.is = function (val, key) { - return true; - }; - /** @inheritdoc */ - ParamType.prototype.encode = function (val, key) { - return val; - }; - /** @inheritdoc */ - ParamType.prototype.decode = function (val, key) { - return val; - }; - /** @inheritdoc */ - ParamType.prototype.equals = function (a, b) { - // tslint:disable-next-line:triple-equals - return a == b; - }; - ParamType.prototype.$subPattern = function () { - var sub = this.pattern.toString(); - return sub.substr(1, sub.length - 2); - }; - ParamType.prototype.toString = function () { - return "{ParamType:" + this.name + "}"; - }; - /** Given an encoded string, or a decoded object, returns a decoded object */ - ParamType.prototype.$normalize = function (val) { - return this.is(val) ? val : this.decode(val); - }; - /** - * Wraps an existing custom ParamType as an array of ParamType, depending on 'mode'. - * e.g.: - * - urlmatcher pattern "/path?{queryParam[]:int}" - * - url: "/path?queryParam=1&queryParam=2 - * - $stateParams.queryParam will be [1, 2] - * if `mode` is "auto", then - * - url: "/path?queryParam=1 will create $stateParams.queryParam: 1 - * - url: "/path?queryParam=1&queryParam=2 will create $stateParams.queryParam: [1, 2] - */ - ParamType.prototype.$asArray = function (mode, isSearch) { - if (!mode) - return this; - if (mode === 'auto' && !isSearch) - throw new Error("'auto' array mode is for query parameters only"); - return new ArrayType(this, mode); - }; - return ParamType; -}()); - -/** Wraps up a `ParamType` object to handle array values. */ -function ArrayType(type, mode) { - var _this = this; - // Wrap non-array value as array - function arrayWrap(val) { - return (0,_common_predicates__WEBPACK_IMPORTED_MODULE_1__.isArray)(val) ? val : (0,_common_predicates__WEBPACK_IMPORTED_MODULE_1__.isDefined)(val) ? [val] : []; - } - // Unwrap array value for "auto" mode. Return undefined for empty array. - function arrayUnwrap(val) { - switch (val.length) { - case 0: - return undefined; - case 1: - return mode === 'auto' ? val[0] : val; - default: - return val; - } - } - // Wraps type (.is/.encode/.decode) functions to operate on each value of an array - function arrayHandler(callback, allTruthyMode) { - return function handleArray(val) { - if ((0,_common_predicates__WEBPACK_IMPORTED_MODULE_1__.isArray)(val) && val.length === 0) - return val; - var arr = arrayWrap(val); - var result = (0,_common_common__WEBPACK_IMPORTED_MODULE_0__.map)(arr, callback); - return allTruthyMode === true ? (0,_common_common__WEBPACK_IMPORTED_MODULE_0__.filter)(result, function (x) { return !x; }).length === 0 : arrayUnwrap(result); - }; - } - // Wraps type (.equals) functions to operate on each value of an array - function arrayEqualsHandler(callback) { - return function handleArray(val1, val2) { - var left = arrayWrap(val1), right = arrayWrap(val2); - if (left.length !== right.length) - return false; - for (var i = 0; i < left.length; i++) { - if (!callback(left[i], right[i])) - return false; - } - return true; - }; - } - ['encode', 'decode', 'equals', '$normalize'].forEach(function (name) { - var paramTypeFn = type[name].bind(type); - var wrapperFn = name === 'equals' ? arrayEqualsHandler : arrayHandler; - _this[name] = wrapperFn(paramTypeFn); - }); - (0,_common_common__WEBPACK_IMPORTED_MODULE_0__.extend)(this, { - dynamic: type.dynamic, - name: type.name, - pattern: type.pattern, - inherit: type.inherit, - raw: type.raw, - is: arrayHandler(type.is.bind(type), true), - $arrayMode: mode, - }); -} -//# sourceMappingURL=paramType.js.map - -/***/ }), - -/***/ "./node_modules/@uirouter/core/lib-esm/params/paramTypes.js": -/*!******************************************************************!*\ - !*** ./node_modules/@uirouter/core/lib-esm/params/paramTypes.js ***! - \******************************************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "ParamTypes": () => (/* binding */ ParamTypes) -/* harmony export */ }); -/* harmony import */ var _common_common__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../common/common */ "./node_modules/@uirouter/core/lib-esm/common/common.js"); -/* harmony import */ var _common_predicates__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../common/predicates */ "./node_modules/@uirouter/core/lib-esm/common/predicates.js"); -/* harmony import */ var _common_hof__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../common/hof */ "./node_modules/@uirouter/core/lib-esm/common/hof.js"); -/* harmony import */ var _common_coreservices__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../common/coreservices */ "./node_modules/@uirouter/core/lib-esm/common/coreservices.js"); -/* harmony import */ var _paramType__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./paramType */ "./node_modules/@uirouter/core/lib-esm/params/paramType.js"); - - - - - -/** - * A registry for parameter types. - * - * This registry manages the built-in (and custom) parameter types. - * - * The built-in parameter types are: - * - * - [[string]] - * - [[path]] - * - [[query]] - * - [[hash]] - * - [[int]] - * - [[bool]] - * - [[date]] - * - [[json]] - * - [[any]] - * - * To register custom parameter types, use [[UrlConfig.type]], i.e., - * - * ```js - * router.urlService.config.type(customType) - * ``` - */ -var ParamTypes = /** @class */ (function () { - function ParamTypes() { - this.enqueue = true; - this.typeQueue = []; - this.defaultTypes = (0,_common_common__WEBPACK_IMPORTED_MODULE_0__.pick)(ParamTypes.prototype, [ - 'hash', - 'string', - 'query', - 'path', - 'int', - 'bool', - 'date', - 'json', - 'any', - ]); - // Register default types. Store them in the prototype of this.types. - var makeType = function (definition, name) { return new _paramType__WEBPACK_IMPORTED_MODULE_4__.ParamType((0,_common_common__WEBPACK_IMPORTED_MODULE_0__.extend)({ name: name }, definition)); }; - this.types = (0,_common_common__WEBPACK_IMPORTED_MODULE_0__.inherit)((0,_common_common__WEBPACK_IMPORTED_MODULE_0__.map)(this.defaultTypes, makeType), {}); - } - ParamTypes.prototype.dispose = function () { - this.types = {}; - }; - /** - * Registers a parameter type - * - * End users should call [[UrlMatcherFactory.type]], which delegates to this method. - */ - ParamTypes.prototype.type = function (name, definition, definitionFn) { - if (!(0,_common_predicates__WEBPACK_IMPORTED_MODULE_1__.isDefined)(definition)) - return this.types[name]; - if (this.types.hasOwnProperty(name)) - throw new Error("A type named '" + name + "' has already been defined."); - this.types[name] = new _paramType__WEBPACK_IMPORTED_MODULE_4__.ParamType((0,_common_common__WEBPACK_IMPORTED_MODULE_0__.extend)({ name: name }, definition)); - if (definitionFn) { - this.typeQueue.push({ name: name, def: definitionFn }); - if (!this.enqueue) - this._flushTypeQueue(); - } - return this; - }; - ParamTypes.prototype._flushTypeQueue = function () { - while (this.typeQueue.length) { - var type = this.typeQueue.shift(); - if (type.pattern) - throw new Error("You cannot override a type's .pattern at runtime."); - (0,_common_common__WEBPACK_IMPORTED_MODULE_0__.extend)(this.types[type.name], _common_coreservices__WEBPACK_IMPORTED_MODULE_3__.services.$injector.invoke(type.def)); - } - }; - return ParamTypes; -}()); - -function initDefaultTypes() { - var makeDefaultType = function (def) { - var valToString = function (val) { return (val != null ? val.toString() : val); }; - var defaultTypeBase = { - encode: valToString, - decode: valToString, - is: (0,_common_hof__WEBPACK_IMPORTED_MODULE_2__.is)(String), - pattern: /.*/, - // tslint:disable-next-line:triple-equals - equals: function (a, b) { return a == b; }, - }; - return (0,_common_common__WEBPACK_IMPORTED_MODULE_0__.extend)({}, defaultTypeBase, def); - }; - // Default Parameter Type Definitions - (0,_common_common__WEBPACK_IMPORTED_MODULE_0__.extend)(ParamTypes.prototype, { - string: makeDefaultType({}), - path: makeDefaultType({ - pattern: /[^/]*/, - }), - query: makeDefaultType({}), - hash: makeDefaultType({ - inherit: false, - }), - int: makeDefaultType({ - decode: function (val) { return parseInt(val, 10); }, - is: function (val) { - return !(0,_common_predicates__WEBPACK_IMPORTED_MODULE_1__.isNullOrUndefined)(val) && this.decode(val.toString()) === val; - }, - pattern: /-?\d+/, - }), - bool: makeDefaultType({ - encode: function (val) { return (val && 1) || 0; }, - decode: function (val) { return parseInt(val, 10) !== 0; }, - is: (0,_common_hof__WEBPACK_IMPORTED_MODULE_2__.is)(Boolean), - pattern: /0|1/, - }), - date: makeDefaultType({ - encode: function (val) { - return !this.is(val) - ? undefined - : [val.getFullYear(), ('0' + (val.getMonth() + 1)).slice(-2), ('0' + val.getDate()).slice(-2)].join('-'); - }, - decode: function (val) { - if (this.is(val)) - return val; - var match = this.capture.exec(val); - return match ? new Date(match[1], match[2] - 1, match[3]) : undefined; - }, - is: function (val) { return val instanceof Date && !isNaN(val.valueOf()); }, - equals: function (l, r) { - return ['getFullYear', 'getMonth', 'getDate'].reduce(function (acc, fn) { return acc && l[fn]() === r[fn](); }, true); - }, - pattern: /[0-9]{4}-(?:0[1-9]|1[0-2])-(?:0[1-9]|[1-2][0-9]|3[0-1])/, - capture: /([0-9]{4})-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])/, - }), - json: makeDefaultType({ - encode: _common_common__WEBPACK_IMPORTED_MODULE_0__.toJson, - decode: _common_common__WEBPACK_IMPORTED_MODULE_0__.fromJson, - is: (0,_common_hof__WEBPACK_IMPORTED_MODULE_2__.is)(Object), - equals: _common_common__WEBPACK_IMPORTED_MODULE_0__.equals, - pattern: /[^/]*/, - }), - // does not encode/decode - any: makeDefaultType({ - encode: _common_common__WEBPACK_IMPORTED_MODULE_0__.identity, - decode: _common_common__WEBPACK_IMPORTED_MODULE_0__.identity, - is: function () { return true; }, - equals: _common_common__WEBPACK_IMPORTED_MODULE_0__.equals, - }), - }); -} -initDefaultTypes(); -//# sourceMappingURL=paramTypes.js.map - -/***/ }), - -/***/ "./node_modules/@uirouter/core/lib-esm/params/stateParams.js": -/*!*******************************************************************!*\ - !*** ./node_modules/@uirouter/core/lib-esm/params/stateParams.js ***! - \*******************************************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "StateParams": () => (/* binding */ StateParams) -/* harmony export */ }); -/* harmony import */ var _common_common__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../common/common */ "./node_modules/@uirouter/core/lib-esm/common/common.js"); - -var StateParams = /** @class */ (function () { - function StateParams(params) { - if (params === void 0) { params = {}; } - (0,_common_common__WEBPACK_IMPORTED_MODULE_0__.extend)(this, params); - } - /** - * Merges a set of parameters with all parameters inherited between the common parents of the - * current state and a given destination state. - * - * @param {Object} newParams The set of parameters which will be composited with inherited params. - * @param {Object} $current Internal definition of object representing the current state. - * @param {Object} $to Internal definition of object representing state to transition to. - */ - StateParams.prototype.$inherit = function (newParams, $current, $to) { - var parentParams; - var parents = (0,_common_common__WEBPACK_IMPORTED_MODULE_0__.ancestors)($current, $to), inherited = {}, inheritList = []; - for (var i in parents) { - if (!parents[i] || !parents[i].params) - continue; - parentParams = Object.keys(parents[i].params); - if (!parentParams.length) - continue; - for (var j in parentParams) { - if (inheritList.indexOf(parentParams[j]) >= 0) - continue; - inheritList.push(parentParams[j]); - inherited[parentParams[j]] = this[parentParams[j]]; - } - } - return (0,_common_common__WEBPACK_IMPORTED_MODULE_0__.extend)({}, inherited, newParams); - }; - return StateParams; -}()); - -//# sourceMappingURL=stateParams.js.map - -/***/ }), - -/***/ "./node_modules/@uirouter/core/lib-esm/path/index.js": -/*!***********************************************************!*\ - !*** ./node_modules/@uirouter/core/lib-esm/path/index.js ***! - \***********************************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "PathNode": () => (/* reexport safe */ _pathNode__WEBPACK_IMPORTED_MODULE_0__.PathNode), -/* harmony export */ "PathUtils": () => (/* reexport safe */ _pathUtils__WEBPACK_IMPORTED_MODULE_1__.PathUtils) -/* harmony export */ }); -/* harmony import */ var _pathNode__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./pathNode */ "./node_modules/@uirouter/core/lib-esm/path/pathNode.js"); -/* harmony import */ var _pathUtils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./pathUtils */ "./node_modules/@uirouter/core/lib-esm/path/pathUtils.js"); - - -//# sourceMappingURL=index.js.map - -/***/ }), - -/***/ "./node_modules/@uirouter/core/lib-esm/path/pathNode.js": -/*!**************************************************************!*\ - !*** ./node_modules/@uirouter/core/lib-esm/path/pathNode.js ***! - \**************************************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "PathNode": () => (/* binding */ PathNode) -/* harmony export */ }); -/* harmony import */ var _common_common__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../common/common */ "./node_modules/@uirouter/core/lib-esm/common/common.js"); -/* harmony import */ var _common_hof__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../common/hof */ "./node_modules/@uirouter/core/lib-esm/common/hof.js"); -/* harmony import */ var _params_param__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../params/param */ "./node_modules/@uirouter/core/lib-esm/params/param.js"); - - - -/** - * A node in a [[TreeChanges]] path - * - * For a [[TreeChanges]] path, this class holds the stateful information for a single node in the path. - * Each PathNode corresponds to a state being entered, exited, or retained. - * The stateful information includes parameter values and resolve data. - */ -var PathNode = /** @class */ (function () { - function PathNode(stateOrNode) { - if (stateOrNode instanceof PathNode) { - var node = stateOrNode; - this.state = node.state; - this.paramSchema = node.paramSchema.slice(); - this.paramValues = (0,_common_common__WEBPACK_IMPORTED_MODULE_0__.extend)({}, node.paramValues); - this.resolvables = node.resolvables.slice(); - this.views = node.views && node.views.slice(); - } - else { - var state = stateOrNode; - this.state = state; - this.paramSchema = state.parameters({ inherit: false }); - this.paramValues = {}; - this.resolvables = state.resolvables.map(function (res) { return res.clone(); }); - } - } - PathNode.prototype.clone = function () { - return new PathNode(this); - }; - /** Sets [[paramValues]] for the node, from the values of an object hash */ - PathNode.prototype.applyRawParams = function (params) { - var getParamVal = function (paramDef) { return [paramDef.id, paramDef.value(params[paramDef.id])]; }; - this.paramValues = this.paramSchema.reduce(function (memo, pDef) { return (0,_common_common__WEBPACK_IMPORTED_MODULE_0__.applyPairs)(memo, getParamVal(pDef)); }, {}); - return this; - }; - /** Gets a specific [[Param]] metadata that belongs to the node */ - PathNode.prototype.parameter = function (name) { - return (0,_common_common__WEBPACK_IMPORTED_MODULE_0__.find)(this.paramSchema, (0,_common_hof__WEBPACK_IMPORTED_MODULE_1__.propEq)('id', name)); - }; - /** - * @returns true if the state and parameter values for another PathNode are - * equal to the state and param values for this PathNode - */ - PathNode.prototype.equals = function (node, paramsFn) { - var diff = this.diff(node, paramsFn); - return diff && diff.length === 0; - }; - /** - * Finds Params with different parameter values on another PathNode. - * - * Given another node (of the same state), finds the parameter values which differ. - * Returns the [[Param]] (schema objects) whose parameter values differ. - * - * Given another node for a different state, returns `false` - * - * @param node The node to compare to - * @param paramsFn A function that returns which parameters should be compared. - * @returns The [[Param]]s which differ, or null if the two nodes are for different states - */ - PathNode.prototype.diff = function (node, paramsFn) { - if (this.state !== node.state) - return false; - var params = paramsFn ? paramsFn(this) : this.paramSchema; - return _params_param__WEBPACK_IMPORTED_MODULE_2__.Param.changed(params, this.paramValues, node.paramValues); - }; - /** - * Returns a clone of the PathNode - * @deprecated use instance method `node.clone()` - */ - PathNode.clone = function (node) { return node.clone(); }; - return PathNode; -}()); - -//# sourceMappingURL=pathNode.js.map - -/***/ }), - -/***/ "./node_modules/@uirouter/core/lib-esm/path/pathUtils.js": -/*!***************************************************************!*\ - !*** ./node_modules/@uirouter/core/lib-esm/path/pathUtils.js ***! - \***************************************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "PathUtils": () => (/* binding */ PathUtils) -/* harmony export */ }); -/* harmony import */ var _common_common__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../common/common */ "./node_modules/@uirouter/core/lib-esm/common/common.js"); -/* harmony import */ var _common_hof__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../common/hof */ "./node_modules/@uirouter/core/lib-esm/common/hof.js"); -/* harmony import */ var _state_targetState__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../state/targetState */ "./node_modules/@uirouter/core/lib-esm/state/targetState.js"); -/* harmony import */ var _pathNode__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./pathNode */ "./node_modules/@uirouter/core/lib-esm/path/pathNode.js"); - - - - -/** - * This class contains functions which convert TargetStates, Nodes and paths from one type to another. - */ -var PathUtils = /** @class */ (function () { - function PathUtils() { - } - /** Given a PathNode[], create an TargetState */ - PathUtils.makeTargetState = function (registry, path) { - var state = (0,_common_common__WEBPACK_IMPORTED_MODULE_0__.tail)(path).state; - return new _state_targetState__WEBPACK_IMPORTED_MODULE_2__.TargetState(registry, state, path.map((0,_common_hof__WEBPACK_IMPORTED_MODULE_1__.prop)('paramValues')).reduce(_common_common__WEBPACK_IMPORTED_MODULE_0__.mergeR, {}), {}); - }; - PathUtils.buildPath = function (targetState) { - var toParams = targetState.params(); - return targetState.$state().path.map(function (state) { return new _pathNode__WEBPACK_IMPORTED_MODULE_3__.PathNode(state).applyRawParams(toParams); }); - }; - /** Given a fromPath: PathNode[] and a TargetState, builds a toPath: PathNode[] */ - PathUtils.buildToPath = function (fromPath, targetState) { - var toPath = PathUtils.buildPath(targetState); - if (targetState.options().inherit) { - return PathUtils.inheritParams(fromPath, toPath, Object.keys(targetState.params())); - } - return toPath; - }; - /** - * Creates ViewConfig objects and adds to nodes. - * - * On each [[PathNode]], creates ViewConfig objects from the views: property of the node's state - */ - PathUtils.applyViewConfigs = function ($view, path, states) { - // Only apply the viewConfigs to the nodes for the given states - path - .filter(function (node) { return (0,_common_common__WEBPACK_IMPORTED_MODULE_0__.inArray)(states, node.state); }) - .forEach(function (node) { - var viewDecls = (0,_common_common__WEBPACK_IMPORTED_MODULE_0__.values)(node.state.views || {}); - var subPath = PathUtils.subPath(path, function (n) { return n === node; }); - var viewConfigs = viewDecls.map(function (view) { return $view.createViewConfig(subPath, view); }); - node.views = viewConfigs.reduce(_common_common__WEBPACK_IMPORTED_MODULE_0__.unnestR, []); - }); - }; - /** - * Given a fromPath and a toPath, returns a new to path which inherits parameters from the fromPath - * - * For a parameter in a node to be inherited from the from path: - * - The toPath's node must have a matching node in the fromPath (by state). - * - The parameter name must not be found in the toKeys parameter array. - * - * Note: the keys provided in toKeys are intended to be those param keys explicitly specified by some - * caller, for instance, $state.transitionTo(..., toParams). If a key was found in toParams, - * it is not inherited from the fromPath. - */ - PathUtils.inheritParams = function (fromPath, toPath, toKeys) { - if (toKeys === void 0) { toKeys = []; } - function nodeParamVals(path, state) { - var node = (0,_common_common__WEBPACK_IMPORTED_MODULE_0__.find)(path, (0,_common_hof__WEBPACK_IMPORTED_MODULE_1__.propEq)('state', state)); - return (0,_common_common__WEBPACK_IMPORTED_MODULE_0__.extend)({}, node && node.paramValues); - } - var noInherit = fromPath - .map(function (node) { return node.paramSchema; }) - .reduce(_common_common__WEBPACK_IMPORTED_MODULE_0__.unnestR, []) - .filter(function (param) { return !param.inherit; }) - .map((0,_common_hof__WEBPACK_IMPORTED_MODULE_1__.prop)('id')); - /** - * Given an [[PathNode]] "toNode", return a new [[PathNode]] with param values inherited from the - * matching node in fromPath. Only inherit keys that aren't found in "toKeys" from the node in "fromPath"" - */ - function makeInheritedParamsNode(toNode) { - // All param values for the node (may include default key/vals, when key was not found in toParams) - var toParamVals = (0,_common_common__WEBPACK_IMPORTED_MODULE_0__.extend)({}, toNode && toNode.paramValues); - // limited to only those keys found in toParams - var incomingParamVals = (0,_common_common__WEBPACK_IMPORTED_MODULE_0__.pick)(toParamVals, toKeys); - toParamVals = (0,_common_common__WEBPACK_IMPORTED_MODULE_0__.omit)(toParamVals, toKeys); - var fromParamVals = (0,_common_common__WEBPACK_IMPORTED_MODULE_0__.omit)(nodeParamVals(fromPath, toNode.state) || {}, noInherit); - // extend toParamVals with any fromParamVals, then override any of those those with incomingParamVals - var ownParamVals = (0,_common_common__WEBPACK_IMPORTED_MODULE_0__.extend)(toParamVals, fromParamVals, incomingParamVals); - return new _pathNode__WEBPACK_IMPORTED_MODULE_3__.PathNode(toNode.state).applyRawParams(ownParamVals); - } - // The param keys specified by the incoming toParams - return toPath.map(makeInheritedParamsNode); - }; - /** - * Computes the tree changes (entering, exiting) between a fromPath and toPath. - */ - PathUtils.treeChanges = function (fromPath, toPath, reloadState) { - var max = Math.min(fromPath.length, toPath.length); - var keep = 0; - var nodesMatch = function (node1, node2) { return node1.equals(node2, PathUtils.nonDynamicParams); }; - while (keep < max && fromPath[keep].state !== reloadState && nodesMatch(fromPath[keep], toPath[keep])) { - keep++; - } - /** Given a retained node, return a new node which uses the to node's param values */ - function applyToParams(retainedNode, idx) { - var cloned = retainedNode.clone(); - cloned.paramValues = toPath[idx].paramValues; - return cloned; - } - var from, retained, exiting, entering, to; - from = fromPath; - retained = from.slice(0, keep); - exiting = from.slice(keep); - // Create a new retained path (with shallow copies of nodes) which have the params of the toPath mapped - var retainedWithToParams = retained.map(applyToParams); - entering = toPath.slice(keep); - to = retainedWithToParams.concat(entering); - return { from: from, to: to, retained: retained, retainedWithToParams: retainedWithToParams, exiting: exiting, entering: entering }; - }; - /** - * Returns a new path which is: the subpath of the first path which matches the second path. - * - * The new path starts from root and contains any nodes that match the nodes in the second path. - * It stops before the first non-matching node. - * - * Nodes are compared using their state property and their parameter values. - * If a `paramsFn` is provided, only the [[Param]] returned by the function will be considered when comparing nodes. - * - * @param pathA the first path - * @param pathB the second path - * @param paramsFn a function which returns the parameters to consider when comparing - * - * @returns an array of PathNodes from the first path which match the nodes in the second path - */ - PathUtils.matching = function (pathA, pathB, paramsFn) { - var done = false; - var tuples = (0,_common_common__WEBPACK_IMPORTED_MODULE_0__.arrayTuples)(pathA, pathB); - return tuples.reduce(function (matching, _a) { - var nodeA = _a[0], nodeB = _a[1]; - done = done || !nodeA.equals(nodeB, paramsFn); - return done ? matching : matching.concat(nodeA); - }, []); - }; - /** - * Returns true if two paths are identical. - * - * @param pathA - * @param pathB - * @param paramsFn a function which returns the parameters to consider when comparing - * @returns true if the the states and parameter values for both paths are identical - */ - PathUtils.equals = function (pathA, pathB, paramsFn) { - return pathA.length === pathB.length && PathUtils.matching(pathA, pathB, paramsFn).length === pathA.length; - }; - /** - * Return a subpath of a path, which stops at the first matching node - * - * Given an array of nodes, returns a subset of the array starting from the first node, - * stopping when the first node matches the predicate. - * - * @param path a path of [[PathNode]]s - * @param predicate a [[Predicate]] fn that matches [[PathNode]]s - * @returns a subpath up to the matching node, or undefined if no match is found - */ - PathUtils.subPath = function (path, predicate) { - var node = (0,_common_common__WEBPACK_IMPORTED_MODULE_0__.find)(path, predicate); - var elementIdx = path.indexOf(node); - return elementIdx === -1 ? undefined : path.slice(0, elementIdx + 1); - }; - PathUtils.nonDynamicParams = function (node) { - return node.state.parameters({ inherit: false }).filter(function (param) { return !param.dynamic; }); - }; - /** Gets the raw parameter values from a path */ - PathUtils.paramValues = function (path) { return path.reduce(function (acc, node) { return (0,_common_common__WEBPACK_IMPORTED_MODULE_0__.extend)(acc, node.paramValues); }, {}); }; - return PathUtils; -}()); - -//# sourceMappingURL=pathUtils.js.map - -/***/ }), - -/***/ "./node_modules/@uirouter/core/lib-esm/resolve/index.js": -/*!**************************************************************!*\ - !*** ./node_modules/@uirouter/core/lib-esm/resolve/index.js ***! - \**************************************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "resolvePolicies": () => (/* reexport safe */ _interface__WEBPACK_IMPORTED_MODULE_0__.resolvePolicies), -/* harmony export */ "Resolvable": () => (/* reexport safe */ _resolvable__WEBPACK_IMPORTED_MODULE_1__.Resolvable), -/* harmony export */ "defaultResolvePolicy": () => (/* reexport safe */ _resolvable__WEBPACK_IMPORTED_MODULE_1__.defaultResolvePolicy), -/* harmony export */ "NATIVE_INJECTOR_TOKEN": () => (/* reexport safe */ _resolveContext__WEBPACK_IMPORTED_MODULE_2__.NATIVE_INJECTOR_TOKEN), -/* harmony export */ "ResolveContext": () => (/* reexport safe */ _resolveContext__WEBPACK_IMPORTED_MODULE_2__.ResolveContext) -/* harmony export */ }); -/* harmony import */ var _interface__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./interface */ "./node_modules/@uirouter/core/lib-esm/resolve/interface.js"); -/* harmony import */ var _resolvable__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./resolvable */ "./node_modules/@uirouter/core/lib-esm/resolve/resolvable.js"); -/* harmony import */ var _resolveContext__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./resolveContext */ "./node_modules/@uirouter/core/lib-esm/resolve/resolveContext.js"); - - - -//# sourceMappingURL=index.js.map - -/***/ }), - -/***/ "./node_modules/@uirouter/core/lib-esm/resolve/interface.js": -/*!******************************************************************!*\ - !*** ./node_modules/@uirouter/core/lib-esm/resolve/interface.js ***! - \******************************************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "resolvePolicies": () => (/* binding */ resolvePolicies) -/* harmony export */ }); -var resolvePolicies = { - when: { - LAZY: 'LAZY', - EAGER: 'EAGER', - }, - async: { - WAIT: 'WAIT', - NOWAIT: 'NOWAIT', - }, -}; -//# sourceMappingURL=interface.js.map - -/***/ }), - -/***/ "./node_modules/@uirouter/core/lib-esm/resolve/resolvable.js": -/*!*******************************************************************!*\ - !*** ./node_modules/@uirouter/core/lib-esm/resolve/resolvable.js ***! - \*******************************************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "defaultResolvePolicy": () => (/* binding */ defaultResolvePolicy), -/* harmony export */ "Resolvable": () => (/* binding */ Resolvable) -/* harmony export */ }); -/* harmony import */ var _common_common__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../common/common */ "./node_modules/@uirouter/core/lib-esm/common/common.js"); -/* harmony import */ var _common_coreservices__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../common/coreservices */ "./node_modules/@uirouter/core/lib-esm/common/coreservices.js"); -/* harmony import */ var _common_trace__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../common/trace */ "./node_modules/@uirouter/core/lib-esm/common/trace.js"); -/* harmony import */ var _common_strings__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../common/strings */ "./node_modules/@uirouter/core/lib-esm/common/strings.js"); -/* harmony import */ var _common_predicates__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../common/predicates */ "./node_modules/@uirouter/core/lib-esm/common/predicates.js"); - - - - - - -// TODO: explicitly make this user configurable -var defaultResolvePolicy = { - when: 'LAZY', - async: 'WAIT', -}; -/** - * The basic building block for the resolve system. - * - * Resolvables encapsulate a state's resolve's resolveFn, the resolveFn's declared dependencies, the wrapped (.promise), - * and the unwrapped-when-complete (.data) result of the resolveFn. - * - * Resolvable.get() either retrieves the Resolvable's existing promise, or else invokes resolve() (which invokes the - * resolveFn) and returns the resulting promise. - * - * Resolvable.get() and Resolvable.resolve() both execute within a context path, which is passed as the first - * parameter to those fns. - */ -var Resolvable = /** @class */ (function () { - function Resolvable(arg1, resolveFn, deps, policy, data) { - this.resolved = false; - this.promise = undefined; - if (arg1 instanceof Resolvable) { - (0,_common_common__WEBPACK_IMPORTED_MODULE_0__.extend)(this, arg1); - } - else if ((0,_common_predicates__WEBPACK_IMPORTED_MODULE_4__.isFunction)(resolveFn)) { - if ((0,_common_predicates__WEBPACK_IMPORTED_MODULE_4__.isNullOrUndefined)(arg1)) - throw new Error('new Resolvable(): token argument is required'); - if (!(0,_common_predicates__WEBPACK_IMPORTED_MODULE_4__.isFunction)(resolveFn)) - throw new Error('new Resolvable(): resolveFn argument must be a function'); - this.token = arg1; - this.policy = policy; - this.resolveFn = resolveFn; - this.deps = deps || []; - this.data = data; - this.resolved = data !== undefined; - this.promise = this.resolved ? _common_coreservices__WEBPACK_IMPORTED_MODULE_1__.services.$q.when(this.data) : undefined; - } - else if ((0,_common_predicates__WEBPACK_IMPORTED_MODULE_4__.isObject)(arg1) && arg1.token && (arg1.hasOwnProperty('resolveFn') || arg1.hasOwnProperty('data'))) { - var literal = arg1; - return new Resolvable(literal.token, literal.resolveFn, literal.deps, literal.policy, literal.data); - } - } - Resolvable.prototype.getPolicy = function (state) { - var thisPolicy = this.policy || {}; - var statePolicy = (state && state.resolvePolicy) || {}; - return { - when: thisPolicy.when || statePolicy.when || defaultResolvePolicy.when, - async: thisPolicy.async || statePolicy.async || defaultResolvePolicy.async, - }; - }; - /** - * Asynchronously resolve this Resolvable's data - * - * Given a ResolveContext that this Resolvable is found in: - * Wait for this Resolvable's dependencies, then invoke this Resolvable's function - * and update the Resolvable's state - */ - Resolvable.prototype.resolve = function (resolveContext, trans) { - var _this = this; - var $q = _common_coreservices__WEBPACK_IMPORTED_MODULE_1__.services.$q; - // Gets all dependencies from ResolveContext and wait for them to be resolved - var getResolvableDependencies = function () { - return $q.all(resolveContext.getDependencies(_this).map(function (resolvable) { return resolvable.get(resolveContext, trans); })); - }; - // Invokes the resolve function passing the resolved dependencies as arguments - var invokeResolveFn = function (resolvedDeps) { return _this.resolveFn.apply(null, resolvedDeps); }; - var node = resolveContext.findNode(this); - var state = node && node.state; - var asyncPolicy = this.getPolicy(state).async; - var customAsyncPolicy = (0,_common_predicates__WEBPACK_IMPORTED_MODULE_4__.isFunction)(asyncPolicy) ? asyncPolicy : _common_common__WEBPACK_IMPORTED_MODULE_0__.identity; - // After the final value has been resolved, update the state of the Resolvable - var applyResolvedValue = function (resolvedValue) { - _this.data = resolvedValue; - _this.resolved = true; - _this.resolveFn = null; - _common_trace__WEBPACK_IMPORTED_MODULE_2__.trace.traceResolvableResolved(_this, trans); - return _this.data; - }; - // Sets the promise property first, then getsResolvableDependencies in the context of the promise chain. Always waits one tick. - return (this.promise = $q - .when() - .then(getResolvableDependencies) - .then(invokeResolveFn) - .then(customAsyncPolicy) - .then(applyResolvedValue)); - }; - /** - * Gets a promise for this Resolvable's data. - * - * Fetches the data and returns a promise. - * Returns the existing promise if it has already been fetched once. - */ - Resolvable.prototype.get = function (resolveContext, trans) { - return this.promise || this.resolve(resolveContext, trans); - }; - Resolvable.prototype.toString = function () { - return "Resolvable(token: " + (0,_common_strings__WEBPACK_IMPORTED_MODULE_3__.stringify)(this.token) + ", requires: [" + this.deps.map(_common_strings__WEBPACK_IMPORTED_MODULE_3__.stringify) + "])"; - }; - Resolvable.prototype.clone = function () { - return new Resolvable(this); - }; - Resolvable.fromData = function (token, data) { return new Resolvable(token, function () { return data; }, null, null, data); }; - return Resolvable; -}()); - -//# sourceMappingURL=resolvable.js.map - -/***/ }), - -/***/ "./node_modules/@uirouter/core/lib-esm/resolve/resolveContext.js": -/*!***********************************************************************!*\ - !*** ./node_modules/@uirouter/core/lib-esm/resolve/resolveContext.js ***! - \***********************************************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "NATIVE_INJECTOR_TOKEN": () => (/* binding */ NATIVE_INJECTOR_TOKEN), -/* harmony export */ "ResolveContext": () => (/* binding */ ResolveContext) -/* harmony export */ }); -/* harmony import */ var _common_common__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../common/common */ "./node_modules/@uirouter/core/lib-esm/common/common.js"); -/* harmony import */ var _common_hof__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../common/hof */ "./node_modules/@uirouter/core/lib-esm/common/hof.js"); -/* harmony import */ var _common_trace__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../common/trace */ "./node_modules/@uirouter/core/lib-esm/common/trace.js"); -/* harmony import */ var _common_coreservices__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../common/coreservices */ "./node_modules/@uirouter/core/lib-esm/common/coreservices.js"); -/* harmony import */ var _interface__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./interface */ "./node_modules/@uirouter/core/lib-esm/resolve/interface.js"); -/* harmony import */ var _resolvable__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./resolvable */ "./node_modules/@uirouter/core/lib-esm/resolve/resolvable.js"); -/* harmony import */ var _path_pathUtils__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../path/pathUtils */ "./node_modules/@uirouter/core/lib-esm/path/pathUtils.js"); -/* harmony import */ var _common_strings__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../common/strings */ "./node_modules/@uirouter/core/lib-esm/common/strings.js"); -/* harmony import */ var _common__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../common */ "./node_modules/@uirouter/core/lib-esm/common/index.js"); - - - - - - - - - -var whens = _interface__WEBPACK_IMPORTED_MODULE_4__.resolvePolicies.when; -var ALL_WHENS = [whens.EAGER, whens.LAZY]; -var EAGER_WHENS = [whens.EAGER]; -// tslint:disable-next-line:no-inferrable-types -var NATIVE_INJECTOR_TOKEN = 'Native Injector'; -/** - * Encapsulates Dependency Injection for a path of nodes - * - * UI-Router states are organized as a tree. - * A nested state has a path of ancestors to the root of the tree. - * When a state is being activated, each element in the path is wrapped as a [[PathNode]]. - * A `PathNode` is a stateful object that holds things like parameters and resolvables for the state being activated. - * - * The ResolveContext closes over the [[PathNode]]s, and provides DI for the last node in the path. - */ -var ResolveContext = /** @class */ (function () { - function ResolveContext(_path) { - this._path = _path; - } - /** Gets all the tokens found in the resolve context, de-duplicated */ - ResolveContext.prototype.getTokens = function () { - return this._path.reduce(function (acc, node) { return acc.concat(node.resolvables.map(function (r) { return r.token; })); }, []).reduce(_common_common__WEBPACK_IMPORTED_MODULE_0__.uniqR, []); - }; - /** - * Gets the Resolvable that matches the token - * - * Gets the last Resolvable that matches the token in this context, or undefined. - * Throws an error if it doesn't exist in the ResolveContext - */ - ResolveContext.prototype.getResolvable = function (token) { - var matching = this._path - .map(function (node) { return node.resolvables; }) - .reduce(_common_common__WEBPACK_IMPORTED_MODULE_0__.unnestR, []) - .filter(function (r) { return r.token === token; }); - return (0,_common_common__WEBPACK_IMPORTED_MODULE_0__.tail)(matching); - }; - /** Returns the [[ResolvePolicy]] for the given [[Resolvable]] */ - ResolveContext.prototype.getPolicy = function (resolvable) { - var node = this.findNode(resolvable); - return resolvable.getPolicy(node.state); - }; - /** - * Returns a ResolveContext that includes a portion of this one - * - * Given a state, this method creates a new ResolveContext from this one. - * The new context starts at the first node (root) and stops at the node for the `state` parameter. - * - * #### Why - * - * When a transition is created, the nodes in the "To Path" are injected from a ResolveContext. - * A ResolveContext closes over a path of [[PathNode]]s and processes the resolvables. - * The "To State" can inject values from its own resolvables, as well as those from all its ancestor state's (node's). - * This method is used to create a narrower context when injecting ancestor nodes. - * - * @example - * `let ABCD = new ResolveContext([A, B, C, D]);` - * - * Given a path `[A, B, C, D]`, where `A`, `B`, `C` and `D` are nodes for states `a`, `b`, `c`, `d`: - * When injecting `D`, `D` should have access to all resolvables from `A`, `B`, `C`, `D`. - * However, `B` should only be able to access resolvables from `A`, `B`. - * - * When resolving for the `B` node, first take the full "To Path" Context `[A,B,C,D]` and limit to the subpath `[A,B]`. - * `let AB = ABCD.subcontext(a)` - */ - ResolveContext.prototype.subContext = function (state) { - return new ResolveContext(_path_pathUtils__WEBPACK_IMPORTED_MODULE_6__.PathUtils.subPath(this._path, function (node) { return node.state === state; })); - }; - /** - * Adds Resolvables to the node that matches the state - * - * This adds a [[Resolvable]] (generally one created on the fly; not declared on a [[StateDeclaration.resolve]] block). - * The resolvable is added to the node matching the `state` parameter. - * - * These new resolvables are not automatically fetched. - * The calling code should either fetch them, fetch something that depends on them, - * or rely on [[resolvePath]] being called when some state is being entered. - * - * Note: each resolvable's [[ResolvePolicy]] is merged with the state's policy, and the global default. - * - * @param newResolvables the new Resolvables - * @param state Used to find the node to put the resolvable on - */ - ResolveContext.prototype.addResolvables = function (newResolvables, state) { - var node = (0,_common_common__WEBPACK_IMPORTED_MODULE_0__.find)(this._path, (0,_common_hof__WEBPACK_IMPORTED_MODULE_1__.propEq)('state', state)); - var keys = newResolvables.map(function (r) { return r.token; }); - node.resolvables = node.resolvables.filter(function (r) { return keys.indexOf(r.token) === -1; }).concat(newResolvables); - }; - /** - * Returns a promise for an array of resolved path Element promises - * - * @param when - * @param trans - * @returns {Promise|any} - */ - ResolveContext.prototype.resolvePath = function (when, trans) { - var _this = this; - if (when === void 0) { when = 'LAZY'; } - // This option determines which 'when' policy Resolvables we are about to fetch. - var whenOption = (0,_common_common__WEBPACK_IMPORTED_MODULE_0__.inArray)(ALL_WHENS, when) ? when : 'LAZY'; - // If the caller specified EAGER, only the EAGER Resolvables are fetched. - // if the caller specified LAZY, both EAGER and LAZY Resolvables are fetched.` - var matchedWhens = whenOption === _interface__WEBPACK_IMPORTED_MODULE_4__.resolvePolicies.when.EAGER ? EAGER_WHENS : ALL_WHENS; - // get the subpath to the state argument, if provided - _common_trace__WEBPACK_IMPORTED_MODULE_2__.trace.traceResolvePath(this._path, when, trans); - var matchesPolicy = function (acceptedVals, whenOrAsync) { return function (resolvable) { - return (0,_common_common__WEBPACK_IMPORTED_MODULE_0__.inArray)(acceptedVals, _this.getPolicy(resolvable)[whenOrAsync]); - }; }; - // Trigger all the (matching) Resolvables in the path - // Reduce all the "WAIT" Resolvables into an array - var promises = this._path.reduce(function (acc, node) { - var nodeResolvables = node.resolvables.filter(matchesPolicy(matchedWhens, 'when')); - var nowait = nodeResolvables.filter(matchesPolicy(['NOWAIT'], 'async')); - var wait = nodeResolvables.filter((0,_common_hof__WEBPACK_IMPORTED_MODULE_1__.not)(matchesPolicy(['NOWAIT'], 'async'))); - // For the matching Resolvables, start their async fetch process. - var subContext = _this.subContext(node.state); - var getResult = function (r) { - return r - .get(subContext, trans) - // Return a tuple that includes the Resolvable's token - .then(function (value) { return ({ token: r.token, value: value }); }); - }; - nowait.forEach(getResult); - return acc.concat(wait.map(getResult)); - }, []); - // Wait for all the "WAIT" resolvables - return _common_coreservices__WEBPACK_IMPORTED_MODULE_3__.services.$q.all(promises); - }; - ResolveContext.prototype.injector = function () { - return this._injector || (this._injector = new UIInjectorImpl(this)); - }; - ResolveContext.prototype.findNode = function (resolvable) { - return (0,_common_common__WEBPACK_IMPORTED_MODULE_0__.find)(this._path, function (node) { return (0,_common_common__WEBPACK_IMPORTED_MODULE_0__.inArray)(node.resolvables, resolvable); }); - }; - /** - * Gets the async dependencies of a Resolvable - * - * Given a Resolvable, returns its dependencies as a Resolvable[] - */ - ResolveContext.prototype.getDependencies = function (resolvable) { - var _this = this; - var node = this.findNode(resolvable); - // Find which other resolvables are "visible" to the `resolvable` argument - // subpath stopping at resolvable's node, or the whole path (if the resolvable isn't in the path) - var subPath = _path_pathUtils__WEBPACK_IMPORTED_MODULE_6__.PathUtils.subPath(this._path, function (x) { return x === node; }) || this._path; - var availableResolvables = subPath - .reduce(function (acc, _node) { return acc.concat(_node.resolvables); }, []) // all of subpath's resolvables - .filter(function (res) { return res !== resolvable; }); // filter out the `resolvable` argument - var getDependency = function (token) { - var matching = availableResolvables.filter(function (r) { return r.token === token; }); - if (matching.length) - return (0,_common_common__WEBPACK_IMPORTED_MODULE_0__.tail)(matching); - var fromInjector = _this.injector().getNative(token); - if ((0,_common__WEBPACK_IMPORTED_MODULE_8__.isUndefined)(fromInjector)) { - throw new Error('Could not find Dependency Injection token: ' + (0,_common_strings__WEBPACK_IMPORTED_MODULE_7__.stringify)(token)); - } - return new _resolvable__WEBPACK_IMPORTED_MODULE_5__.Resolvable(token, function () { return fromInjector; }, [], fromInjector); - }; - return resolvable.deps.map(getDependency); - }; - return ResolveContext; -}()); - -/** @internal */ -var UIInjectorImpl = /** @class */ (function () { - function UIInjectorImpl(context) { - this.context = context; - this.native = this.get(NATIVE_INJECTOR_TOKEN) || _common_coreservices__WEBPACK_IMPORTED_MODULE_3__.services.$injector; - } - UIInjectorImpl.prototype.get = function (token) { - var resolvable = this.context.getResolvable(token); - if (resolvable) { - if (this.context.getPolicy(resolvable).async === 'NOWAIT') { - return resolvable.get(this.context); - } - if (!resolvable.resolved) { - throw new Error('Resolvable async .get() not complete:' + (0,_common_strings__WEBPACK_IMPORTED_MODULE_7__.stringify)(resolvable.token)); - } - return resolvable.data; - } - return this.getNative(token); - }; - UIInjectorImpl.prototype.getAsync = function (token) { - var resolvable = this.context.getResolvable(token); - if (resolvable) - return resolvable.get(this.context); - return _common_coreservices__WEBPACK_IMPORTED_MODULE_3__.services.$q.when(this.native.get(token)); - }; - UIInjectorImpl.prototype.getNative = function (token) { - return this.native && this.native.get(token); - }; - return UIInjectorImpl; -}()); -//# sourceMappingURL=resolveContext.js.map - -/***/ }), - -/***/ "./node_modules/@uirouter/core/lib-esm/router.js": -/*!*******************************************************!*\ - !*** ./node_modules/@uirouter/core/lib-esm/router.js ***! - \*******************************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "UIRouter": () => (/* binding */ UIRouter) -/* harmony export */ }); -/* harmony import */ var _url_urlMatcherFactory__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./url/urlMatcherFactory */ "./node_modules/@uirouter/core/lib-esm/url/urlMatcherFactory.js"); -/* harmony import */ var _url_urlRouter__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./url/urlRouter */ "./node_modules/@uirouter/core/lib-esm/url/urlRouter.js"); -/* harmony import */ var _transition_transitionService__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./transition/transitionService */ "./node_modules/@uirouter/core/lib-esm/transition/transitionService.js"); -/* harmony import */ var _view_view__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./view/view */ "./node_modules/@uirouter/core/lib-esm/view/view.js"); -/* harmony import */ var _state_stateRegistry__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./state/stateRegistry */ "./node_modules/@uirouter/core/lib-esm/state/stateRegistry.js"); -/* harmony import */ var _state_stateService__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./state/stateService */ "./node_modules/@uirouter/core/lib-esm/state/stateService.js"); -/* harmony import */ var _globals__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./globals */ "./node_modules/@uirouter/core/lib-esm/globals.js"); -/* harmony import */ var _common_common__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./common/common */ "./node_modules/@uirouter/core/lib-esm/common/common.js"); -/* harmony import */ var _common_predicates__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./common/predicates */ "./node_modules/@uirouter/core/lib-esm/common/predicates.js"); -/* harmony import */ var _url_urlService__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./url/urlService */ "./node_modules/@uirouter/core/lib-esm/url/urlService.js"); -/* harmony import */ var _common_trace__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./common/trace */ "./node_modules/@uirouter/core/lib-esm/common/trace.js"); -/* harmony import */ var _common__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./common */ "./node_modules/@uirouter/core/lib-esm/common/index.js"); - - - - - - - - - - - - -/** @internal */ -var _routerInstance = 0; -/** @internal */ -var locSvcFns = ['url', 'path', 'search', 'hash', 'onChange']; -/** @internal */ -var locCfgFns = ['port', 'protocol', 'host', 'baseHref', 'html5Mode', 'hashPrefix']; -/** @internal */ -var locationServiceStub = (0,_common__WEBPACK_IMPORTED_MODULE_11__.makeStub)('LocationServices', locSvcFns); -/** @internal */ -var locationConfigStub = (0,_common__WEBPACK_IMPORTED_MODULE_11__.makeStub)('LocationConfig', locCfgFns); -/** - * An instance of UI-Router. - * - * This object contains references to service APIs which define your application's routing behavior. - */ -var UIRouter = /** @class */ (function () { - /** - * Creates a new `UIRouter` object - * - * @param locationService a [[LocationServices]] implementation - * @param locationConfig a [[LocationConfig]] implementation - * @internal - */ - function UIRouter(locationService, locationConfig) { - if (locationService === void 0) { locationService = locationServiceStub; } - if (locationConfig === void 0) { locationConfig = locationConfigStub; } - this.locationService = locationService; - this.locationConfig = locationConfig; - /** @internal */ this.$id = _routerInstance++; - /** @internal */ this._disposed = false; - /** @internal */ this._disposables = []; - /** Enable/disable tracing to the javascript console */ - this.trace = _common_trace__WEBPACK_IMPORTED_MODULE_10__.trace; - /** Provides services related to ui-view synchronization */ - this.viewService = new _view_view__WEBPACK_IMPORTED_MODULE_3__.ViewService(this); - /** An object that contains global router state, such as the current state and params */ - this.globals = new _globals__WEBPACK_IMPORTED_MODULE_6__.UIRouterGlobals(); - /** A service that exposes global Transition Hooks */ - this.transitionService = new _transition_transitionService__WEBPACK_IMPORTED_MODULE_2__.TransitionService(this); - /** - * Deprecated for public use. Use [[urlService]] instead. - * @deprecated Use [[urlService]] instead - */ - this.urlMatcherFactory = new _url_urlMatcherFactory__WEBPACK_IMPORTED_MODULE_0__.UrlMatcherFactory(this); - /** - * Deprecated for public use. Use [[urlService]] instead. - * @deprecated Use [[urlService]] instead - */ - this.urlRouter = new _url_urlRouter__WEBPACK_IMPORTED_MODULE_1__.UrlRouter(this); - /** Provides services related to the URL */ - this.urlService = new _url_urlService__WEBPACK_IMPORTED_MODULE_9__.UrlService(this); - /** Provides a registry for states, and related registration services */ - this.stateRegistry = new _state_stateRegistry__WEBPACK_IMPORTED_MODULE_4__.StateRegistry(this); - /** Provides services related to states */ - this.stateService = new _state_stateService__WEBPACK_IMPORTED_MODULE_5__.StateService(this); - /** @internal plugin instances are registered here */ - this._plugins = {}; - this.viewService._pluginapi._rootViewContext(this.stateRegistry.root()); - this.globals.$current = this.stateRegistry.root(); - this.globals.current = this.globals.$current.self; - this.disposable(this.globals); - this.disposable(this.stateService); - this.disposable(this.stateRegistry); - this.disposable(this.transitionService); - this.disposable(this.urlService); - this.disposable(locationService); - this.disposable(locationConfig); - } - /** Registers an object to be notified when the router is disposed */ - UIRouter.prototype.disposable = function (disposable) { - this._disposables.push(disposable); - }; - /** - * Disposes this router instance - * - * When called, clears resources retained by the router by calling `dispose(this)` on all - * registered [[disposable]] objects. - * - * Or, if a `disposable` object is provided, calls `dispose(this)` on that object only. - * - * @internal - * @param disposable (optional) the disposable to dispose - */ - UIRouter.prototype.dispose = function (disposable) { - var _this = this; - if (disposable && (0,_common_predicates__WEBPACK_IMPORTED_MODULE_8__.isFunction)(disposable.dispose)) { - disposable.dispose(this); - return undefined; - } - this._disposed = true; - this._disposables.slice().forEach(function (d) { - try { - typeof d.dispose === 'function' && d.dispose(_this); - (0,_common_common__WEBPACK_IMPORTED_MODULE_7__.removeFrom)(_this._disposables, d); - } - catch (ignored) { } - }); - }; - /** - * Adds a plugin to UI-Router - * - * This method adds a UI-Router Plugin. - * A plugin can enhance or change UI-Router behavior using any public API. - * - * #### Example: - * ```js - * import { MyCoolPlugin } from "ui-router-cool-plugin"; - * - * var plugin = router.addPlugin(MyCoolPlugin); - * ``` - * - * ### Plugin authoring - * - * A plugin is simply a class (or constructor function) which accepts a [[UIRouter]] instance and (optionally) an options object. - * - * The plugin can implement its functionality using any of the public APIs of [[UIRouter]]. - * For example, it may configure router options or add a Transition Hook. - * - * The plugin can then be published as a separate module. - * - * #### Example: - * ```js - * export class MyAuthPlugin implements UIRouterPlugin { - * constructor(router: UIRouter, options: any) { - * this.name = "MyAuthPlugin"; - * let $transitions = router.transitionService; - * let $state = router.stateService; - * - * let authCriteria = { - * to: (state) => state.data && state.data.requiresAuth - * }; - * - * function authHook(transition: Transition) { - * let authService = transition.injector().get('AuthService'); - * if (!authService.isAuthenticated()) { - * return $state.target('login'); - * } - * } - * - * $transitions.onStart(authCriteria, authHook); - * } - * } - * ``` - * - * @param plugin one of: - * - a plugin class which implements [[UIRouterPlugin]] - * - a constructor function for a [[UIRouterPlugin]] which accepts a [[UIRouter]] instance - * - a factory function which accepts a [[UIRouter]] instance and returns a [[UIRouterPlugin]] instance - * @param options options to pass to the plugin class/factory - * @returns the registered plugin instance - */ - UIRouter.prototype.plugin = function (plugin, options) { - if (options === void 0) { options = {}; } - var pluginInstance = new plugin(this, options); - if (!pluginInstance.name) - throw new Error('Required property `name` missing on plugin: ' + pluginInstance); - this._disposables.push(pluginInstance); - return (this._plugins[pluginInstance.name] = pluginInstance); - }; - UIRouter.prototype.getPlugin = function (pluginName) { - return pluginName ? this._plugins[pluginName] : (0,_common_common__WEBPACK_IMPORTED_MODULE_7__.values)(this._plugins); - }; - return UIRouter; -}()); - -//# sourceMappingURL=router.js.map - -/***/ }), - -/***/ "./node_modules/@uirouter/core/lib-esm/state/index.js": -/*!************************************************************!*\ - !*** ./node_modules/@uirouter/core/lib-esm/state/index.js ***! - \************************************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "StateBuilder": () => (/* reexport safe */ _stateBuilder__WEBPACK_IMPORTED_MODULE_1__.StateBuilder), -/* harmony export */ "resolvablesBuilder": () => (/* reexport safe */ _stateBuilder__WEBPACK_IMPORTED_MODULE_1__.resolvablesBuilder), -/* harmony export */ "StateObject": () => (/* reexport safe */ _stateObject__WEBPACK_IMPORTED_MODULE_2__.StateObject), -/* harmony export */ "StateMatcher": () => (/* reexport safe */ _stateMatcher__WEBPACK_IMPORTED_MODULE_3__.StateMatcher), -/* harmony export */ "StateQueueManager": () => (/* reexport safe */ _stateQueueManager__WEBPACK_IMPORTED_MODULE_4__.StateQueueManager), -/* harmony export */ "StateRegistry": () => (/* reexport safe */ _stateRegistry__WEBPACK_IMPORTED_MODULE_5__.StateRegistry), -/* harmony export */ "StateService": () => (/* reexport safe */ _stateService__WEBPACK_IMPORTED_MODULE_6__.StateService), -/* harmony export */ "TargetState": () => (/* reexport safe */ _targetState__WEBPACK_IMPORTED_MODULE_7__.TargetState) -/* harmony export */ }); -/* harmony import */ var _interface__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./interface */ "./node_modules/@uirouter/core/lib-esm/state/interface.js"); -/* harmony import */ var _interface__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_interface__WEBPACK_IMPORTED_MODULE_0__); -/* harmony reexport (unknown) */ var __WEBPACK_REEXPORT_OBJECT__ = {}; -/* harmony reexport (unknown) */ for(const __WEBPACK_IMPORT_KEY__ in _interface__WEBPACK_IMPORTED_MODULE_0__) if(__WEBPACK_IMPORT_KEY__ !== "default") __WEBPACK_REEXPORT_OBJECT__[__WEBPACK_IMPORT_KEY__] = () => _interface__WEBPACK_IMPORTED_MODULE_0__[__WEBPACK_IMPORT_KEY__] -/* harmony reexport (unknown) */ __webpack_require__.d(__webpack_exports__, __WEBPACK_REEXPORT_OBJECT__); -/* harmony import */ var _stateBuilder__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./stateBuilder */ "./node_modules/@uirouter/core/lib-esm/state/stateBuilder.js"); -/* harmony import */ var _stateObject__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./stateObject */ "./node_modules/@uirouter/core/lib-esm/state/stateObject.js"); -/* harmony import */ var _stateMatcher__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./stateMatcher */ "./node_modules/@uirouter/core/lib-esm/state/stateMatcher.js"); -/* harmony import */ var _stateQueueManager__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./stateQueueManager */ "./node_modules/@uirouter/core/lib-esm/state/stateQueueManager.js"); -/* harmony import */ var _stateRegistry__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./stateRegistry */ "./node_modules/@uirouter/core/lib-esm/state/stateRegistry.js"); -/* harmony import */ var _stateService__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./stateService */ "./node_modules/@uirouter/core/lib-esm/state/stateService.js"); -/* harmony import */ var _targetState__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./targetState */ "./node_modules/@uirouter/core/lib-esm/state/targetState.js"); -/** - * # The state subsystem - * - * This subsystem implements the ui-router state tree - * - * - The [[StateService]] has state-related service methods such as: - * - [[StateService.get]]: Get a registered [[StateDeclaration]] object - * - [[StateService.go]]: Transition from the current state to a new state - * - [[StateService.reload]]: Reload the current state - * - [[StateService.target]]: Get a [[TargetState]] (useful when redirecting from a Transition Hook) - * - [[StateService.onInvalid]]: Register a callback for when a transition to an invalid state is started - * - [[StateService.defaultErrorHandler]]: Register a global callback for when a transition errors - * - The [[StateDeclaration]] interface defines the shape of a state declaration - * - The [[StateRegistry]] contains all the registered states - * - States can be added/removed using the [[StateRegistry.register]] and [[StateRegistry.deregister]] - * - Note: Bootstrap state registration differs by front-end framework. - * - Get notified of state registration/deregistration using [[StateRegistry.onStatesChanged]]. - * - * @packageDocumentation - */ - - - - - - - - -//# sourceMappingURL=index.js.map - -/***/ }), - -/***/ "./node_modules/@uirouter/core/lib-esm/state/interface.js": -/*!****************************************************************!*\ - !*** ./node_modules/@uirouter/core/lib-esm/state/interface.js ***! - \****************************************************************/ -/***/ (() => { - -//# sourceMappingURL=interface.js.map - -/***/ }), - -/***/ "./node_modules/@uirouter/core/lib-esm/state/stateBuilder.js": -/*!*******************************************************************!*\ - !*** ./node_modules/@uirouter/core/lib-esm/state/stateBuilder.js ***! - \*******************************************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "resolvablesBuilder": () => (/* binding */ resolvablesBuilder), -/* harmony export */ "StateBuilder": () => (/* binding */ StateBuilder) -/* harmony export */ }); -/* harmony import */ var _common_common__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../common/common */ "./node_modules/@uirouter/core/lib-esm/common/common.js"); -/* harmony import */ var _common_predicates__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../common/predicates */ "./node_modules/@uirouter/core/lib-esm/common/predicates.js"); -/* harmony import */ var _common_strings__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../common/strings */ "./node_modules/@uirouter/core/lib-esm/common/strings.js"); -/* harmony import */ var _common_hof__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../common/hof */ "./node_modules/@uirouter/core/lib-esm/common/hof.js"); -/* harmony import */ var _resolve_resolvable__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../resolve/resolvable */ "./node_modules/@uirouter/core/lib-esm/resolve/resolvable.js"); -/* harmony import */ var _common_coreservices__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../common/coreservices */ "./node_modules/@uirouter/core/lib-esm/common/coreservices.js"); - - - - - - -var parseUrl = function (url) { - if (!(0,_common_predicates__WEBPACK_IMPORTED_MODULE_1__.isString)(url)) - return false; - var root = url.charAt(0) === '^'; - return { val: root ? url.substring(1) : url, root: root }; -}; -function nameBuilder(state) { - return state.name; -} -function selfBuilder(state) { - state.self.$$state = function () { return state; }; - return state.self; -} -function dataBuilder(state) { - if (state.parent && state.parent.data) { - state.data = state.self.data = (0,_common_common__WEBPACK_IMPORTED_MODULE_0__.inherit)(state.parent.data, state.data); - } - return state.data; -} -var getUrlBuilder = function ($urlMatcherFactoryProvider, root) { - return function urlBuilder(stateObject) { - var stateDec = stateObject.self; - // For future states, i.e., states whose name ends with `.**`, - // match anything that starts with the url prefix - if (stateDec && stateDec.url && stateDec.name && stateDec.name.match(/\.\*\*$/)) { - var newStateDec = {}; - (0,_common_common__WEBPACK_IMPORTED_MODULE_0__.copy)(stateDec, newStateDec); - newStateDec.url += '{remainder:any}'; // match any path (.*) - stateDec = newStateDec; - } - var parent = stateObject.parent; - var parsed = parseUrl(stateDec.url); - var url = !parsed ? stateDec.url : $urlMatcherFactoryProvider.compile(parsed.val, { state: stateDec }); - if (!url) - return null; - if (!$urlMatcherFactoryProvider.isMatcher(url)) - throw new Error("Invalid url '" + url + "' in state '" + stateObject + "'"); - return parsed && parsed.root ? url : ((parent && parent.navigable) || root()).url.append(url); - }; -}; -var getNavigableBuilder = function (isRoot) { - return function navigableBuilder(state) { - return !isRoot(state) && state.url ? state : state.parent ? state.parent.navigable : null; - }; -}; -var getParamsBuilder = function (paramFactory) { - return function paramsBuilder(state) { - var makeConfigParam = function (config, id) { return paramFactory.fromConfig(id, null, state.self); }; - var urlParams = (state.url && state.url.parameters({ inherit: false })) || []; - var nonUrlParams = (0,_common_common__WEBPACK_IMPORTED_MODULE_0__.values)((0,_common_common__WEBPACK_IMPORTED_MODULE_0__.mapObj)((0,_common_common__WEBPACK_IMPORTED_MODULE_0__.omit)(state.params || {}, urlParams.map((0,_common_hof__WEBPACK_IMPORTED_MODULE_3__.prop)('id'))), makeConfigParam)); - return urlParams - .concat(nonUrlParams) - .map(function (p) { return [p.id, p]; }) - .reduce(_common_common__WEBPACK_IMPORTED_MODULE_0__.applyPairs, {}); - }; -}; -function pathBuilder(state) { - return state.parent ? state.parent.path.concat(state) : /*root*/ [state]; -} -function includesBuilder(state) { - var includes = state.parent ? (0,_common_common__WEBPACK_IMPORTED_MODULE_0__.extend)({}, state.parent.includes) : {}; - includes[state.name] = true; - return includes; -} -/** - * This is a [[StateBuilder.builder]] function for the `resolve:` block on a [[StateDeclaration]]. - * - * When the [[StateBuilder]] builds a [[StateObject]] object from a raw [[StateDeclaration]], this builder - * validates the `resolve` property and converts it to a [[Resolvable]] array. - * - * resolve: input value can be: - * - * { - * // analyzed but not injected - * myFooResolve: function() { return "myFooData"; }, - * - * // function.toString() parsed, "DependencyName" dep as string (not min-safe) - * myBarResolve: function(DependencyName) { return DependencyName.fetchSomethingAsPromise() }, - * - * // Array split; "DependencyName" dep as string - * myBazResolve: [ "DependencyName", function(dep) { return dep.fetchSomethingAsPromise() }, - * - * // Array split; DependencyType dep as token (compared using ===) - * myQuxResolve: [ DependencyType, function(dep) { return dep.fetchSometingAsPromise() }, - * - * // val.$inject used as deps - * // where: - * // corgeResolve.$inject = ["DependencyName"]; - * // function corgeResolve(dep) { dep.fetchSometingAsPromise() } - * // then "DependencyName" dep as string - * myCorgeResolve: corgeResolve, - * - * // inject service by name - * // When a string is found, desugar creating a resolve that injects the named service - * myGraultResolve: "SomeService" - * } - * - * or: - * - * [ - * new Resolvable("myFooResolve", function() { return "myFooData" }), - * new Resolvable("myBarResolve", function(dep) { return dep.fetchSomethingAsPromise() }, [ "DependencyName" ]), - * { provide: "myBazResolve", useFactory: function(dep) { dep.fetchSomethingAsPromise() }, deps: [ "DependencyName" ] } - * ] - */ -function resolvablesBuilder(state) { - /** convert resolve: {} and resolvePolicy: {} objects to an array of tuples */ - var objects2Tuples = function (resolveObj, resolvePolicies) { - return Object.keys(resolveObj || {}).map(function (token) { return ({ - token: token, - val: resolveObj[token], - deps: undefined, - policy: resolvePolicies[token], - }); }); - }; - /** fetch DI annotations from a function or ng1-style array */ - var annotate = function (fn) { - var $injector = _common_coreservices__WEBPACK_IMPORTED_MODULE_5__.services.$injector; - // ng1 doesn't have an $injector until runtime. - // If the $injector doesn't exist, use "deferred" literal as a - // marker indicating they should be annotated when runtime starts - return fn['$inject'] || ($injector && $injector.annotate(fn, $injector.strictDi)) || 'deferred'; - }; - /** true if the object has both `token` and `resolveFn`, and is probably a [[ResolveLiteral]] */ - var isResolveLiteral = function (obj) { return !!(obj.token && obj.resolveFn); }; - /** true if the object looks like a provide literal, or a ng2 Provider */ - var isLikeNg2Provider = function (obj) { - return !!((obj.provide || obj.token) && (obj.useValue || obj.useFactory || obj.useExisting || obj.useClass)); - }; - /** true if the object looks like a tuple from obj2Tuples */ - var isTupleFromObj = function (obj) { - return !!(obj && obj.val && ((0,_common_predicates__WEBPACK_IMPORTED_MODULE_1__.isString)(obj.val) || (0,_common_predicates__WEBPACK_IMPORTED_MODULE_1__.isArray)(obj.val) || (0,_common_predicates__WEBPACK_IMPORTED_MODULE_1__.isFunction)(obj.val))); - }; - /** extracts the token from a Provider or provide literal */ - var getToken = function (p) { return p.provide || p.token; }; - // prettier-ignore: Given a literal resolve or provider object, returns a Resolvable - var literal2Resolvable = (0,_common_hof__WEBPACK_IMPORTED_MODULE_3__.pattern)([ - [(0,_common_hof__WEBPACK_IMPORTED_MODULE_3__.prop)('resolveFn'), function (p) { return new _resolve_resolvable__WEBPACK_IMPORTED_MODULE_4__.Resolvable(getToken(p), p.resolveFn, p.deps, p.policy); }], - [(0,_common_hof__WEBPACK_IMPORTED_MODULE_3__.prop)('useFactory'), function (p) { return new _resolve_resolvable__WEBPACK_IMPORTED_MODULE_4__.Resolvable(getToken(p), p.useFactory, p.deps || p.dependencies, p.policy); }], - [(0,_common_hof__WEBPACK_IMPORTED_MODULE_3__.prop)('useClass'), function (p) { return new _resolve_resolvable__WEBPACK_IMPORTED_MODULE_4__.Resolvable(getToken(p), function () { return new p.useClass(); }, [], p.policy); }], - [(0,_common_hof__WEBPACK_IMPORTED_MODULE_3__.prop)('useValue'), function (p) { return new _resolve_resolvable__WEBPACK_IMPORTED_MODULE_4__.Resolvable(getToken(p), function () { return p.useValue; }, [], p.policy, p.useValue); }], - [(0,_common_hof__WEBPACK_IMPORTED_MODULE_3__.prop)('useExisting'), function (p) { return new _resolve_resolvable__WEBPACK_IMPORTED_MODULE_4__.Resolvable(getToken(p), _common_common__WEBPACK_IMPORTED_MODULE_0__.identity, [p.useExisting], p.policy); }], - ]); - // prettier-ignore - var tuple2Resolvable = (0,_common_hof__WEBPACK_IMPORTED_MODULE_3__.pattern)([ - [(0,_common_hof__WEBPACK_IMPORTED_MODULE_3__.pipe)((0,_common_hof__WEBPACK_IMPORTED_MODULE_3__.prop)('val'), _common_predicates__WEBPACK_IMPORTED_MODULE_1__.isString), function (tuple) { return new _resolve_resolvable__WEBPACK_IMPORTED_MODULE_4__.Resolvable(tuple.token, _common_common__WEBPACK_IMPORTED_MODULE_0__.identity, [tuple.val], tuple.policy); }], - [(0,_common_hof__WEBPACK_IMPORTED_MODULE_3__.pipe)((0,_common_hof__WEBPACK_IMPORTED_MODULE_3__.prop)('val'), _common_predicates__WEBPACK_IMPORTED_MODULE_1__.isArray), function (tuple) { return new _resolve_resolvable__WEBPACK_IMPORTED_MODULE_4__.Resolvable(tuple.token, (0,_common_common__WEBPACK_IMPORTED_MODULE_0__.tail)(tuple.val), tuple.val.slice(0, -1), tuple.policy); }], - [(0,_common_hof__WEBPACK_IMPORTED_MODULE_3__.pipe)((0,_common_hof__WEBPACK_IMPORTED_MODULE_3__.prop)('val'), _common_predicates__WEBPACK_IMPORTED_MODULE_1__.isFunction), function (tuple) { return new _resolve_resolvable__WEBPACK_IMPORTED_MODULE_4__.Resolvable(tuple.token, tuple.val, annotate(tuple.val), tuple.policy); }], - ]); - // prettier-ignore - var item2Resolvable = (0,_common_hof__WEBPACK_IMPORTED_MODULE_3__.pattern)([ - [(0,_common_hof__WEBPACK_IMPORTED_MODULE_3__.is)(_resolve_resolvable__WEBPACK_IMPORTED_MODULE_4__.Resolvable), function (r) { return r; }], - [isResolveLiteral, literal2Resolvable], - [isLikeNg2Provider, literal2Resolvable], - [isTupleFromObj, tuple2Resolvable], - [(0,_common_hof__WEBPACK_IMPORTED_MODULE_3__.val)(true), function (obj) { throw new Error('Invalid resolve value: ' + (0,_common_strings__WEBPACK_IMPORTED_MODULE_2__.stringify)(obj)); },], - ]); - // If resolveBlock is already an array, use it as-is. - // Otherwise, assume it's an object and convert to an Array of tuples - var decl = state.resolve; - var items = (0,_common_predicates__WEBPACK_IMPORTED_MODULE_1__.isArray)(decl) ? decl : objects2Tuples(decl, state.resolvePolicy || {}); - return items.map(item2Resolvable); -} -/** - * A internal global service - * - * StateBuilder is a factory for the internal [[StateObject]] objects. - * - * When you register a state with the [[StateRegistry]], you register a plain old javascript object which - * conforms to the [[StateDeclaration]] interface. This factory takes that object and builds the corresponding - * [[StateObject]] object, which has an API and is used internally. - * - * Custom properties or API may be added to the internal [[StateObject]] object by registering a decorator function - * using the [[builder]] method. - */ -var StateBuilder = /** @class */ (function () { - function StateBuilder(matcher, urlMatcherFactory) { - this.matcher = matcher; - var self = this; - var root = function () { return matcher.find(''); }; - var isRoot = function (state) { return state.name === ''; }; - function parentBuilder(state) { - if (isRoot(state)) - return null; - return matcher.find(self.parentName(state)) || root(); - } - this.builders = { - name: [nameBuilder], - self: [selfBuilder], - parent: [parentBuilder], - data: [dataBuilder], - // Build a URLMatcher if necessary, either via a relative or absolute URL - url: [getUrlBuilder(urlMatcherFactory, root)], - // Keep track of the closest ancestor state that has a URL (i.e. is navigable) - navigable: [getNavigableBuilder(isRoot)], - params: [getParamsBuilder(urlMatcherFactory.paramFactory)], - // Each framework-specific ui-router implementation should define its own `views` builder - // e.g., src/ng1/statebuilders/views.ts - views: [], - // Keep a full path from the root down to this state as this is needed for state activation. - path: [pathBuilder], - // Speed up $state.includes() as it's used a lot - includes: [includesBuilder], - resolvables: [resolvablesBuilder], - }; - } - StateBuilder.prototype.builder = function (name, fn) { - var builders = this.builders; - var array = builders[name] || []; - // Backwards compat: if only one builder exists, return it, else return whole arary. - if ((0,_common_predicates__WEBPACK_IMPORTED_MODULE_1__.isString)(name) && !(0,_common_predicates__WEBPACK_IMPORTED_MODULE_1__.isDefined)(fn)) - return array.length > 1 ? array : array[0]; - if (!(0,_common_predicates__WEBPACK_IMPORTED_MODULE_1__.isString)(name) || !(0,_common_predicates__WEBPACK_IMPORTED_MODULE_1__.isFunction)(fn)) - return; - builders[name] = array; - builders[name].push(fn); - return function () { return builders[name].splice(builders[name].indexOf(fn, 1)) && null; }; - }; - /** - * Builds all of the properties on an essentially blank State object, returning a State object which has all its - * properties and API built. - * - * @param state an uninitialized State object - * @returns the built State object - */ - StateBuilder.prototype.build = function (state) { - var _a = this, matcher = _a.matcher, builders = _a.builders; - var parent = this.parentName(state); - if (parent && !matcher.find(parent, undefined, false)) { - return null; - } - for (var key in builders) { - if (!builders.hasOwnProperty(key)) - continue; - var chain = builders[key].reduce(function (parentFn, step) { return function (_state) { return step(_state, parentFn); }; }, _common_common__WEBPACK_IMPORTED_MODULE_0__.noop); - state[key] = chain(state); - } - return state; - }; - StateBuilder.prototype.parentName = function (state) { - // name = 'foo.bar.baz.**' - var name = state.name || ''; - // segments = ['foo', 'bar', 'baz', '.**'] - var segments = name.split('.'); - // segments = ['foo', 'bar', 'baz'] - var lastSegment = segments.pop(); - // segments = ['foo', 'bar'] (ignore .** segment for future states) - if (lastSegment === '**') - segments.pop(); - if (segments.length) { - if (state.parent) { - throw new Error("States that specify the 'parent:' property should not have a '.' in their name (" + name + ")"); - } - // 'foo.bar' - return segments.join('.'); - } - if (!state.parent) - return ''; - return (0,_common_predicates__WEBPACK_IMPORTED_MODULE_1__.isString)(state.parent) ? state.parent : state.parent.name; - }; - StateBuilder.prototype.name = function (state) { - var name = state.name; - if (name.indexOf('.') !== -1 || !state.parent) - return name; - var parentName = (0,_common_predicates__WEBPACK_IMPORTED_MODULE_1__.isString)(state.parent) ? state.parent : state.parent.name; - return parentName ? parentName + '.' + name : name; - }; - return StateBuilder; -}()); - -//# sourceMappingURL=stateBuilder.js.map - -/***/ }), - -/***/ "./node_modules/@uirouter/core/lib-esm/state/stateMatcher.js": -/*!*******************************************************************!*\ - !*** ./node_modules/@uirouter/core/lib-esm/state/stateMatcher.js ***! - \*******************************************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "StateMatcher": () => (/* binding */ StateMatcher) -/* harmony export */ }); -/* harmony import */ var _common_predicates__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../common/predicates */ "./node_modules/@uirouter/core/lib-esm/common/predicates.js"); -/* harmony import */ var _common_common__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../common/common */ "./node_modules/@uirouter/core/lib-esm/common/common.js"); -/* harmony import */ var _common_safeConsole__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../common/safeConsole */ "./node_modules/@uirouter/core/lib-esm/common/safeConsole.js"); - - - -var StateMatcher = /** @class */ (function () { - function StateMatcher(_states) { - this._states = _states; - } - StateMatcher.prototype.isRelative = function (stateName) { - stateName = stateName || ''; - return stateName.indexOf('.') === 0 || stateName.indexOf('^') === 0; - }; - StateMatcher.prototype.find = function (stateOrName, base, matchGlob) { - if (matchGlob === void 0) { matchGlob = true; } - if (!stateOrName && stateOrName !== '') - return undefined; - var isStr = (0,_common_predicates__WEBPACK_IMPORTED_MODULE_0__.isString)(stateOrName); - var name = isStr ? stateOrName : stateOrName.name; - if (this.isRelative(name)) - name = this.resolvePath(name, base); - var state = this._states[name]; - if (state && (isStr || (!isStr && (state === stateOrName || state.self === stateOrName)))) { - return state; - } - else if (isStr && matchGlob) { - var _states = (0,_common_common__WEBPACK_IMPORTED_MODULE_1__.values)(this._states); - var matches = _states.filter(function (_state) { return _state.__stateObjectCache.nameGlob && _state.__stateObjectCache.nameGlob.matches(name); }); - if (matches.length > 1) { - _common_safeConsole__WEBPACK_IMPORTED_MODULE_2__.safeConsole.error("stateMatcher.find: Found multiple matches for " + name + " using glob: ", matches.map(function (match) { return match.name; })); - } - return matches[0]; - } - return undefined; - }; - StateMatcher.prototype.resolvePath = function (name, base) { - if (!base) - throw new Error("No reference point given for path '" + name + "'"); - var baseState = this.find(base); - var splitName = name.split('.'); - var pathLength = splitName.length; - var i = 0, current = baseState; - for (; i < pathLength; i++) { - if (splitName[i] === '' && i === 0) { - current = baseState; - continue; - } - if (splitName[i] === '^') { - if (!current.parent) - throw new Error("Path '" + name + "' not valid for state '" + baseState.name + "'"); - current = current.parent; - continue; - } - break; - } - var relName = splitName.slice(i).join('.'); - return current.name + (current.name && relName ? '.' : '') + relName; - }; - return StateMatcher; -}()); - -//# sourceMappingURL=stateMatcher.js.map - -/***/ }), - -/***/ "./node_modules/@uirouter/core/lib-esm/state/stateObject.js": -/*!******************************************************************!*\ - !*** ./node_modules/@uirouter/core/lib-esm/state/stateObject.js ***! - \******************************************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "StateObject": () => (/* binding */ StateObject) -/* harmony export */ }); -/* harmony import */ var _common_common__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../common/common */ "./node_modules/@uirouter/core/lib-esm/common/common.js"); -/* harmony import */ var _common_hof__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../common/hof */ "./node_modules/@uirouter/core/lib-esm/common/hof.js"); -/* harmony import */ var _common_glob__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../common/glob */ "./node_modules/@uirouter/core/lib-esm/common/glob.js"); -/* harmony import */ var _common_predicates__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../common/predicates */ "./node_modules/@uirouter/core/lib-esm/common/predicates.js"); - - - - -/** - * Internal representation of a UI-Router state. - * - * Instances of this class are created when a [[StateDeclaration]] is registered with the [[StateRegistry]]. - * - * A registered [[StateDeclaration]] is augmented with a getter ([[StateDeclaration.$$state]]) which returns the corresponding [[StateObject]] object. - * - * This class prototypally inherits from the corresponding [[StateDeclaration]]. - * Each of its own properties (i.e., `hasOwnProperty`) are built using builders from the [[StateBuilder]]. - */ -var StateObject = /** @class */ (function () { - /** @deprecated use State.create() */ - function StateObject(config) { - return StateObject.create(config || {}); - } - /** - * Create a state object to put the private/internal implementation details onto. - * The object's prototype chain looks like: - * (Internal State Object) -> (Copy of State.prototype) -> (State Declaration object) -> (State Declaration's prototype...) - * - * @param stateDecl the user-supplied State Declaration - * @returns {StateObject} an internal State object - */ - StateObject.create = function (stateDecl) { - stateDecl = StateObject.isStateClass(stateDecl) ? new stateDecl() : stateDecl; - var state = (0,_common_common__WEBPACK_IMPORTED_MODULE_0__.inherit)((0,_common_common__WEBPACK_IMPORTED_MODULE_0__.inherit)(stateDecl, StateObject.prototype)); - stateDecl.$$state = function () { return state; }; - state.self = stateDecl; - state.__stateObjectCache = { - nameGlob: _common_glob__WEBPACK_IMPORTED_MODULE_2__.Glob.fromString(state.name), - }; - return state; - }; - /** - * Returns true if the provided parameter is the same state. - * - * Compares the identity of the state against the passed value, which is either an object - * reference to the actual `State` instance, the original definition object passed to - * `$stateProvider.state()`, or the fully-qualified name. - * - * @param ref Can be one of (a) a `State` instance, (b) an object that was passed - * into `$stateProvider.state()`, (c) the fully-qualified name of a state as a string. - * @returns Returns `true` if `ref` matches the current `State` instance. - */ - StateObject.prototype.is = function (ref) { - return this === ref || this.self === ref || this.fqn() === ref; - }; - /** - * @deprecated this does not properly handle dot notation - * @returns Returns a dot-separated name of the state. - */ - StateObject.prototype.fqn = function () { - if (!this.parent || !(this.parent instanceof this.constructor)) - return this.name; - var name = this.parent.fqn(); - return name ? name + '.' + this.name : this.name; - }; - /** - * Returns the root node of this state's tree. - * - * @returns The root of this state's tree. - */ - StateObject.prototype.root = function () { - return (this.parent && this.parent.root()) || this; - }; - /** - * Gets the state's `Param` objects - * - * Gets the list of [[Param]] objects owned by the state. - * If `opts.inherit` is true, it also includes the ancestor states' [[Param]] objects. - * If `opts.matchingKeys` exists, returns only `Param`s whose `id` is a key on the `matchingKeys` object - * - * @param opts options - */ - StateObject.prototype.parameters = function (opts) { - opts = (0,_common_common__WEBPACK_IMPORTED_MODULE_0__.defaults)(opts, { inherit: true, matchingKeys: null }); - var inherited = (opts.inherit && this.parent && this.parent.parameters()) || []; - return inherited - .concat((0,_common_common__WEBPACK_IMPORTED_MODULE_0__.values)(this.params)) - .filter(function (param) { return !opts.matchingKeys || opts.matchingKeys.hasOwnProperty(param.id); }); - }; - /** - * Returns a single [[Param]] that is owned by the state - * - * If `opts.inherit` is true, it also searches the ancestor states` [[Param]]s. - * @param id the name of the [[Param]] to return - * @param opts options - */ - StateObject.prototype.parameter = function (id, opts) { - if (opts === void 0) { opts = {}; } - return ((this.url && this.url.parameter(id, opts)) || - (0,_common_common__WEBPACK_IMPORTED_MODULE_0__.find)((0,_common_common__WEBPACK_IMPORTED_MODULE_0__.values)(this.params), (0,_common_hof__WEBPACK_IMPORTED_MODULE_1__.propEq)('id', id)) || - (opts.inherit && this.parent && this.parent.parameter(id))); - }; - StateObject.prototype.toString = function () { - return this.fqn(); - }; - /** Predicate which returns true if the object is an class with @State() decorator */ - StateObject.isStateClass = function (stateDecl) { - return (0,_common_predicates__WEBPACK_IMPORTED_MODULE_3__.isFunction)(stateDecl) && stateDecl['__uiRouterState'] === true; - }; - /** Predicate which returns true if the object is a [[StateDeclaration]] object */ - StateObject.isStateDeclaration = function (obj) { return (0,_common_predicates__WEBPACK_IMPORTED_MODULE_3__.isFunction)(obj['$$state']); }; - /** Predicate which returns true if the object is an internal [[StateObject]] object */ - StateObject.isState = function (obj) { return (0,_common_predicates__WEBPACK_IMPORTED_MODULE_3__.isObject)(obj['__stateObjectCache']); }; - return StateObject; -}()); - -//# sourceMappingURL=stateObject.js.map - -/***/ }), - -/***/ "./node_modules/@uirouter/core/lib-esm/state/stateQueueManager.js": -/*!************************************************************************!*\ - !*** ./node_modules/@uirouter/core/lib-esm/state/stateQueueManager.js ***! - \************************************************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "StateQueueManager": () => (/* binding */ StateQueueManager) -/* harmony export */ }); -/* harmony import */ var _common__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../common */ "./node_modules/@uirouter/core/lib-esm/common/index.js"); -/* harmony import */ var _stateObject__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./stateObject */ "./node_modules/@uirouter/core/lib-esm/state/stateObject.js"); - - -var StateQueueManager = /** @class */ (function () { - function StateQueueManager(router, states, builder, listeners) { - this.router = router; - this.states = states; - this.builder = builder; - this.listeners = listeners; - this.queue = []; - } - StateQueueManager.prototype.dispose = function () { - this.queue = []; - }; - StateQueueManager.prototype.register = function (stateDecl) { - var queue = this.queue; - var state = _stateObject__WEBPACK_IMPORTED_MODULE_1__.StateObject.create(stateDecl); - var name = state.name; - if (!(0,_common__WEBPACK_IMPORTED_MODULE_0__.isString)(name)) - throw new Error('State must have a valid name'); - if (this.states.hasOwnProperty(name) || (0,_common__WEBPACK_IMPORTED_MODULE_0__.inArray)(queue.map((0,_common__WEBPACK_IMPORTED_MODULE_0__.prop)('name')), name)) - throw new Error("State '" + name + "' is already defined"); - queue.push(state); - this.flush(); - return state; - }; - StateQueueManager.prototype.flush = function () { - var _this = this; - var _a = this, queue = _a.queue, states = _a.states, builder = _a.builder; - var registered = [], // states that got registered - orphans = [], // states that don't yet have a parent registered - previousQueueLength = {}; // keep track of how long the queue when an orphan was first encountered - var getState = function (name) { return _this.states.hasOwnProperty(name) && _this.states[name]; }; - var notifyListeners = function () { - if (registered.length) { - _this.listeners.forEach(function (listener) { - return listener('registered', registered.map(function (s) { return s.self; })); - }); - } - }; - while (queue.length > 0) { - var state = queue.shift(); - var name_1 = state.name; - var result = builder.build(state); - var orphanIdx = orphans.indexOf(state); - if (result) { - var existingState = getState(name_1); - if (existingState && existingState.name === name_1) { - throw new Error("State '" + name_1 + "' is already defined"); - } - var existingFutureState = getState(name_1 + '.**'); - if (existingFutureState) { - // Remove future state of the same name - this.router.stateRegistry.deregister(existingFutureState); - } - states[name_1] = state; - this.attachRoute(state); - if (orphanIdx >= 0) - orphans.splice(orphanIdx, 1); - registered.push(state); - continue; - } - var prev = previousQueueLength[name_1]; - previousQueueLength[name_1] = queue.length; - if (orphanIdx >= 0 && prev === queue.length) { - // Wait until two consecutive iterations where no additional states were dequeued successfully. - // throw new Error(`Cannot register orphaned state '${name}'`); - queue.push(state); - notifyListeners(); - return states; - } - else if (orphanIdx < 0) { - orphans.push(state); - } - queue.push(state); - } - notifyListeners(); - return states; - }; - StateQueueManager.prototype.attachRoute = function (state) { - if (state.abstract || !state.url) - return; - var rulesApi = this.router.urlService.rules; - rulesApi.rule(rulesApi.urlRuleFactory.create(state)); - }; - return StateQueueManager; -}()); - -//# sourceMappingURL=stateQueueManager.js.map - -/***/ }), - -/***/ "./node_modules/@uirouter/core/lib-esm/state/stateRegistry.js": -/*!********************************************************************!*\ - !*** ./node_modules/@uirouter/core/lib-esm/state/stateRegistry.js ***! - \********************************************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "StateRegistry": () => (/* binding */ StateRegistry) -/* harmony export */ }); -/* harmony import */ var _stateMatcher__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./stateMatcher */ "./node_modules/@uirouter/core/lib-esm/state/stateMatcher.js"); -/* harmony import */ var _stateBuilder__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./stateBuilder */ "./node_modules/@uirouter/core/lib-esm/state/stateBuilder.js"); -/* harmony import */ var _stateQueueManager__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./stateQueueManager */ "./node_modules/@uirouter/core/lib-esm/state/stateQueueManager.js"); -/* harmony import */ var _common_common__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../common/common */ "./node_modules/@uirouter/core/lib-esm/common/common.js"); -/* harmony import */ var _common_hof__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../common/hof */ "./node_modules/@uirouter/core/lib-esm/common/hof.js"); - - - - - -/** - * A registry for all of the application's [[StateDeclaration]]s - * - * This API is found at `router.stateRegistry` ([[UIRouter.stateRegistry]]) - */ -var StateRegistry = /** @class */ (function () { - /** @internal */ - function StateRegistry(router) { - this.router = router; - this.states = {}; - /** @internal */ - this.listeners = []; - this.matcher = new _stateMatcher__WEBPACK_IMPORTED_MODULE_0__.StateMatcher(this.states); - this.builder = new _stateBuilder__WEBPACK_IMPORTED_MODULE_1__.StateBuilder(this.matcher, router.urlMatcherFactory); - this.stateQueue = new _stateQueueManager__WEBPACK_IMPORTED_MODULE_2__.StateQueueManager(router, this.states, this.builder, this.listeners); - this._registerRoot(); - } - /** @internal */ - StateRegistry.prototype._registerRoot = function () { - var rootStateDef = { - name: '', - url: '^', - views: null, - params: { - '#': { value: null, type: 'hash', dynamic: true }, - }, - abstract: true, - }; - var _root = (this._root = this.stateQueue.register(rootStateDef)); - _root.navigable = null; - }; - /** @internal */ - StateRegistry.prototype.dispose = function () { - var _this = this; - this.stateQueue.dispose(); - this.listeners = []; - this.get().forEach(function (state) { return _this.get(state) && _this.deregister(state); }); - }; - /** - * Listen for a State Registry events - * - * Adds a callback that is invoked when states are registered or deregistered with the StateRegistry. - * - * #### Example: - * ```js - * let allStates = registry.get(); - * - * // Later, invoke deregisterFn() to remove the listener - * let deregisterFn = registry.onStatesChanged((event, states) => { - * switch(event) { - * case: 'registered': - * states.forEach(state => allStates.push(state)); - * break; - * case: 'deregistered': - * states.forEach(state => { - * let idx = allStates.indexOf(state); - * if (idx !== -1) allStates.splice(idx, 1); - * }); - * break; - * } - * }); - * ``` - * - * @param listener a callback function invoked when the registered states changes. - * The function receives two parameters, `event` and `state`. - * See [[StateRegistryListener]] - * @return a function that deregisters the listener - */ - StateRegistry.prototype.onStatesChanged = function (listener) { - this.listeners.push(listener); - return function deregisterListener() { - (0,_common_common__WEBPACK_IMPORTED_MODULE_3__.removeFrom)(this.listeners)(listener); - }.bind(this); - }; - /** - * Gets the implicit root state - * - * Gets the root of the state tree. - * The root state is implicitly created by UI-Router. - * Note: this returns the internal [[StateObject]] representation, not a [[StateDeclaration]] - * - * @return the root [[StateObject]] - */ - StateRegistry.prototype.root = function () { - return this._root; - }; - /** - * Adds a state to the registry - * - * Registers a [[StateDeclaration]] or queues it for registration. - * - * Note: a state will be queued if the state's parent isn't yet registered. - * - * @param stateDefinition the definition of the state to register. - * @returns the internal [[StateObject]] object. - * If the state was successfully registered, then the object is fully built (See: [[StateBuilder]]). - * If the state was only queued, then the object is not fully built. - */ - StateRegistry.prototype.register = function (stateDefinition) { - return this.stateQueue.register(stateDefinition); - }; - /** @internal */ - StateRegistry.prototype._deregisterTree = function (state) { - var _this = this; - var all = this.get().map(function (s) { return s.$$state(); }); - var getChildren = function (states) { - var _children = all.filter(function (s) { return states.indexOf(s.parent) !== -1; }); - return _children.length === 0 ? _children : _children.concat(getChildren(_children)); - }; - var children = getChildren([state]); - var deregistered = [state].concat(children).reverse(); - deregistered.forEach(function (_state) { - var rulesApi = _this.router.urlService.rules; - // Remove URL rule - rulesApi - .rules() - .filter((0,_common_hof__WEBPACK_IMPORTED_MODULE_4__.propEq)('state', _state)) - .forEach(function (rule) { return rulesApi.removeRule(rule); }); - // Remove state from registry - delete _this.states[_state.name]; - }); - return deregistered; - }; - /** - * Removes a state from the registry - * - * This removes a state from the registry. - * If the state has children, they are are also removed from the registry. - * - * @param stateOrName the state's name or object representation - * @returns {StateObject[]} a list of removed states - */ - StateRegistry.prototype.deregister = function (stateOrName) { - var _state = this.get(stateOrName); - if (!_state) - throw new Error("Can't deregister state; not found: " + stateOrName); - var deregisteredStates = this._deregisterTree(_state.$$state()); - this.listeners.forEach(function (listener) { - return listener('deregistered', deregisteredStates.map(function (s) { return s.self; })); - }); - return deregisteredStates; - }; - StateRegistry.prototype.get = function (stateOrName, base) { - var _this = this; - if (arguments.length === 0) - return Object.keys(this.states).map(function (name) { return _this.states[name].self; }); - var found = this.matcher.find(stateOrName, base); - return (found && found.self) || null; - }; - /** - * Registers a [[BuilderFunction]] for a specific [[StateObject]] property (e.g., `parent`, `url`, or `path`). - * More than one BuilderFunction can be registered for a given property. - * - * The BuilderFunction(s) will be used to define the property on any subsequently built [[StateObject]] objects. - * - * @param property The name of the State property being registered for. - * @param builderFunction The BuilderFunction which will be used to build the State property - * @returns a function which deregisters the BuilderFunction - */ - StateRegistry.prototype.decorator = function (property, builderFunction) { - return this.builder.builder(property, builderFunction); - }; - return StateRegistry; -}()); - -//# sourceMappingURL=stateRegistry.js.map - -/***/ }), - -/***/ "./node_modules/@uirouter/core/lib-esm/state/stateService.js": -/*!*******************************************************************!*\ - !*** ./node_modules/@uirouter/core/lib-esm/state/stateService.js ***! - \*******************************************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "StateService": () => (/* binding */ StateService) -/* harmony export */ }); -/* harmony import */ var _common_common__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../common/common */ "./node_modules/@uirouter/core/lib-esm/common/common.js"); -/* harmony import */ var _common_predicates__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../common/predicates */ "./node_modules/@uirouter/core/lib-esm/common/predicates.js"); -/* harmony import */ var _common_queue__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../common/queue */ "./node_modules/@uirouter/core/lib-esm/common/queue.js"); -/* harmony import */ var _common_coreservices__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../common/coreservices */ "./node_modules/@uirouter/core/lib-esm/common/coreservices.js"); -/* harmony import */ var _path_pathUtils__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../path/pathUtils */ "./node_modules/@uirouter/core/lib-esm/path/pathUtils.js"); -/* harmony import */ var _path_pathNode__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../path/pathNode */ "./node_modules/@uirouter/core/lib-esm/path/pathNode.js"); -/* harmony import */ var _transition_transitionService__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../transition/transitionService */ "./node_modules/@uirouter/core/lib-esm/transition/transitionService.js"); -/* harmony import */ var _transition_rejectFactory__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../transition/rejectFactory */ "./node_modules/@uirouter/core/lib-esm/transition/rejectFactory.js"); -/* harmony import */ var _targetState__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./targetState */ "./node_modules/@uirouter/core/lib-esm/state/targetState.js"); -/* harmony import */ var _params_param__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../params/param */ "./node_modules/@uirouter/core/lib-esm/params/param.js"); -/* harmony import */ var _common_glob__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../common/glob */ "./node_modules/@uirouter/core/lib-esm/common/glob.js"); -/* harmony import */ var _resolve_resolveContext__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../resolve/resolveContext */ "./node_modules/@uirouter/core/lib-esm/resolve/resolveContext.js"); -/* harmony import */ var _hooks_lazyLoad__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../hooks/lazyLoad */ "./node_modules/@uirouter/core/lib-esm/hooks/lazyLoad.js"); -/* harmony import */ var _common_hof__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../common/hof */ "./node_modules/@uirouter/core/lib-esm/common/hof.js"); - - - - - - - - - - - - - - -/** - * Provides services related to ui-router states. - * - * This API is located at `router.stateService` ([[UIRouter.stateService]]) - */ -var StateService = /** @class */ (function () { - /** @internal */ - function StateService(/** @internal */ router) { - this.router = router; - /** @internal */ - this.invalidCallbacks = []; - /** @internal */ - this._defaultErrorHandler = function $defaultErrorHandler($error$) { - if ($error$ instanceof Error && $error$.stack) { - console.error($error$); - console.error($error$.stack); - } - else if ($error$ instanceof _transition_rejectFactory__WEBPACK_IMPORTED_MODULE_7__.Rejection) { - console.error($error$.toString()); - if ($error$.detail && $error$.detail.stack) - console.error($error$.detail.stack); - } - else { - console.error($error$); - } - }; - var getters = ['current', '$current', 'params', 'transition']; - var boundFns = Object.keys(StateService.prototype).filter((0,_common_hof__WEBPACK_IMPORTED_MODULE_13__.not)((0,_common_common__WEBPACK_IMPORTED_MODULE_0__.inArray)(getters))); - (0,_common_common__WEBPACK_IMPORTED_MODULE_0__.createProxyFunctions)((0,_common_hof__WEBPACK_IMPORTED_MODULE_13__.val)(StateService.prototype), this, (0,_common_hof__WEBPACK_IMPORTED_MODULE_13__.val)(this), boundFns); - } - Object.defineProperty(StateService.prototype, "transition", { - /** - * The [[Transition]] currently in progress (or null) - * - * @deprecated This is a passthrough through to [[UIRouterGlobals.transition]] - */ - get: function () { - return this.router.globals.transition; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(StateService.prototype, "params", { - /** - * The latest successful state parameters - * - * @deprecated This is a passthrough through to [[UIRouterGlobals.params]] - */ - get: function () { - return this.router.globals.params; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(StateService.prototype, "current", { - /** - * The current [[StateDeclaration]] - * - * @deprecated This is a passthrough through to [[UIRouterGlobals.current]] - */ - get: function () { - return this.router.globals.current; - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(StateService.prototype, "$current", { - /** - * The current [[StateObject]] (an internal API) - * - * @deprecated This is a passthrough through to [[UIRouterGlobals.$current]] - */ - get: function () { - return this.router.globals.$current; - }, - enumerable: false, - configurable: true - }); - /** @internal */ - StateService.prototype.dispose = function () { - this.defaultErrorHandler(_common_common__WEBPACK_IMPORTED_MODULE_0__.noop); - this.invalidCallbacks = []; - }; - /** - * Handler for when [[transitionTo]] is called with an invalid state. - * - * Invokes the [[onInvalid]] callbacks, in natural order. - * Each callback's return value is checked in sequence until one of them returns an instance of TargetState. - * The results of the callbacks are wrapped in $q.when(), so the callbacks may return promises. - * - * If a callback returns an TargetState, then it is used as arguments to $state.transitionTo() and the result returned. - * - * @internal - */ - StateService.prototype._handleInvalidTargetState = function (fromPath, toState) { - var _this = this; - var fromState = _path_pathUtils__WEBPACK_IMPORTED_MODULE_4__.PathUtils.makeTargetState(this.router.stateRegistry, fromPath); - var globals = this.router.globals; - var latestThing = function () { return globals.transitionHistory.peekTail(); }; - var latest = latestThing(); - var callbackQueue = new _common_queue__WEBPACK_IMPORTED_MODULE_2__.Queue(this.invalidCallbacks.slice()); - var injector = new _resolve_resolveContext__WEBPACK_IMPORTED_MODULE_11__.ResolveContext(fromPath).injector(); - var checkForRedirect = function (result) { - if (!(result instanceof _targetState__WEBPACK_IMPORTED_MODULE_8__.TargetState)) { - return; - } - var target = result; - // Recreate the TargetState, in case the state is now defined. - target = _this.target(target.identifier(), target.params(), target.options()); - if (!target.valid()) { - return _transition_rejectFactory__WEBPACK_IMPORTED_MODULE_7__.Rejection.invalid(target.error()).toPromise(); - } - if (latestThing() !== latest) { - return _transition_rejectFactory__WEBPACK_IMPORTED_MODULE_7__.Rejection.superseded().toPromise(); - } - return _this.transitionTo(target.identifier(), target.params(), target.options()); - }; - function invokeNextCallback() { - var nextCallback = callbackQueue.dequeue(); - if (nextCallback === undefined) - return _transition_rejectFactory__WEBPACK_IMPORTED_MODULE_7__.Rejection.invalid(toState.error()).toPromise(); - var callbackResult = _common_coreservices__WEBPACK_IMPORTED_MODULE_3__.services.$q.when(nextCallback(toState, fromState, injector)); - return callbackResult.then(checkForRedirect).then(function (result) { return result || invokeNextCallback(); }); - } - return invokeNextCallback(); - }; - /** - * Registers an Invalid State handler - * - * Registers a [[OnInvalidCallback]] function to be invoked when [[StateService.transitionTo]] - * has been called with an invalid state reference parameter - * - * Example: - * ```js - * stateService.onInvalid(function(to, from, injector) { - * if (to.name() === 'foo') { - * let lazyLoader = injector.get('LazyLoadService'); - * return lazyLoader.load('foo') - * .then(() => stateService.target('foo')); - * } - * }); - * ``` - * - * @param {function} callback invoked when the toState is invalid - * This function receives the (invalid) toState, the fromState, and an injector. - * The function may optionally return a [[TargetState]] or a Promise for a TargetState. - * If one is returned, it is treated as a redirect. - * - * @returns a function which deregisters the callback - */ - StateService.prototype.onInvalid = function (callback) { - this.invalidCallbacks.push(callback); - return function deregisterListener() { - (0,_common_common__WEBPACK_IMPORTED_MODULE_0__.removeFrom)(this.invalidCallbacks)(callback); - }.bind(this); - }; - /** - * Reloads the current state - * - * A method that force reloads the current state, or a partial state hierarchy. - * All resolves are re-resolved, and components reinstantiated. - * - * #### Example: - * ```js - * let app angular.module('app', ['ui.router']); - * - * app.controller('ctrl', function ($scope, $state) { - * $scope.reload = function(){ - * $state.reload(); - * } - * }); - * ``` - * - * Note: `reload()` is just an alias for: - * - * ```js - * $state.transitionTo($state.current, $state.params, { - * reload: true, inherit: false - * }); - * ``` - * - * @param reloadState A state name or a state object. - * If present, this state and all its children will be reloaded, but ancestors will not reload. - * - * #### Example: - * ```js - * //assuming app application consists of 3 states: 'contacts', 'contacts.detail', 'contacts.detail.item' - * //and current state is 'contacts.detail.item' - * let app angular.module('app', ['ui.router']); - * - * app.controller('ctrl', function ($scope, $state) { - * $scope.reload = function(){ - * //will reload 'contact.detail' and nested 'contact.detail.item' states - * $state.reload('contact.detail'); - * } - * }); - * ``` - * - * @returns A promise representing the state of the new transition. See [[StateService.go]] - */ - StateService.prototype.reload = function (reloadState) { - return this.transitionTo(this.current, this.params, { - reload: (0,_common_predicates__WEBPACK_IMPORTED_MODULE_1__.isDefined)(reloadState) ? reloadState : true, - inherit: false, - notify: false, - }); - }; - /** - * Transition to a different state and/or parameters - * - * Convenience method for transitioning to a new state. - * - * `$state.go` calls `$state.transitionTo` internally but automatically sets options to - * `{ location: true, inherit: true, relative: router.globals.$current, notify: true }`. - * This allows you to use either an absolute or relative `to` argument (because of `relative: router.globals.$current`). - * It also allows you to specify * only the parameters you'd like to update, while letting unspecified parameters - * inherit from the current parameter values (because of `inherit: true`). - * - * #### Example: - * ```js - * let app = angular.module('app', ['ui.router']); - * - * app.controller('ctrl', function ($scope, $state) { - * $scope.changeState = function () { - * $state.go('contact.detail'); - * }; - * }); - * ``` - * - * @param to Absolute state name, state object, or relative state path (relative to current state). - * - * Some examples: - * - * - `$state.go('contact.detail')` - will go to the `contact.detail` state - * - `$state.go('^')` - will go to the parent state - * - `$state.go('^.sibling')` - if current state is `home.child`, will go to the `home.sibling` state - * - `$state.go('.child.grandchild')` - if current state is home, will go to the `home.child.grandchild` state - * - * @param params A map of the parameters that will be sent to the state, will populate $stateParams. - * - * Any parameters that are not specified will be inherited from current parameter values (because of `inherit: true`). - * This allows, for example, going to a sibling state that shares parameters defined by a parent state. - * - * @param options Transition options - * - * @returns {promise} A promise representing the state of the new transition. - */ - StateService.prototype.go = function (to, params, options) { - var defautGoOpts = { relative: this.$current, inherit: true }; - var transOpts = (0,_common_common__WEBPACK_IMPORTED_MODULE_0__.defaults)(options, defautGoOpts, _transition_transitionService__WEBPACK_IMPORTED_MODULE_6__.defaultTransOpts); - return this.transitionTo(to, params, transOpts); - }; - /** - * Creates a [[TargetState]] - * - * This is a factory method for creating a TargetState - * - * This may be returned from a Transition Hook to redirect a transition, for example. - */ - StateService.prototype.target = function (identifier, params, options) { - if (options === void 0) { options = {}; } - // If we're reloading, find the state object to reload from - if ((0,_common_predicates__WEBPACK_IMPORTED_MODULE_1__.isObject)(options.reload) && !options.reload.name) - throw new Error('Invalid reload state object'); - var reg = this.router.stateRegistry; - options.reloadState = - options.reload === true ? reg.root() : reg.matcher.find(options.reload, options.relative); - if (options.reload && !options.reloadState) - throw new Error("No such reload state '" + ((0,_common_predicates__WEBPACK_IMPORTED_MODULE_1__.isString)(options.reload) ? options.reload : options.reload.name) + "'"); - return new _targetState__WEBPACK_IMPORTED_MODULE_8__.TargetState(this.router.stateRegistry, identifier, params, options); - }; - /** @internal */ - StateService.prototype.getCurrentPath = function () { - var _this = this; - var globals = this.router.globals; - var latestSuccess = globals.successfulTransitions.peekTail(); - var rootPath = function () { return [new _path_pathNode__WEBPACK_IMPORTED_MODULE_5__.PathNode(_this.router.stateRegistry.root())]; }; - return latestSuccess ? latestSuccess.treeChanges().to : rootPath(); - }; - /** - * Low-level method for transitioning to a new state. - * - * The [[go]] method (which uses `transitionTo` internally) is recommended in most situations. - * - * #### Example: - * ```js - * let app = angular.module('app', ['ui.router']); - * - * app.controller('ctrl', function ($scope, $state) { - * $scope.changeState = function () { - * $state.transitionTo('contact.detail'); - * }; - * }); - * ``` - * - * @param to State name or state object. - * @param toParams A map of the parameters that will be sent to the state, - * will populate $stateParams. - * @param options Transition options - * - * @returns A promise representing the state of the new transition. See [[go]] - */ - StateService.prototype.transitionTo = function (to, toParams, options) { - var _this = this; - if (toParams === void 0) { toParams = {}; } - if (options === void 0) { options = {}; } - var router = this.router; - var globals = router.globals; - options = (0,_common_common__WEBPACK_IMPORTED_MODULE_0__.defaults)(options, _transition_transitionService__WEBPACK_IMPORTED_MODULE_6__.defaultTransOpts); - var getCurrent = function () { return globals.transition; }; - options = (0,_common_common__WEBPACK_IMPORTED_MODULE_0__.extend)(options, { current: getCurrent }); - var ref = this.target(to, toParams, options); - var currentPath = this.getCurrentPath(); - if (!ref.exists()) - return this._handleInvalidTargetState(currentPath, ref); - if (!ref.valid()) - return (0,_common_common__WEBPACK_IMPORTED_MODULE_0__.silentRejection)(ref.error()); - if (options.supercede === false && getCurrent()) { - return (_transition_rejectFactory__WEBPACK_IMPORTED_MODULE_7__.Rejection.ignored('Another transition is in progress and supercede has been set to false in TransitionOptions for the transition. So the transition was ignored in favour of the existing one in progress.').toPromise()); - } - /** - * Special handling for Ignored, Aborted, and Redirected transitions - * - * The semantics for the transition.run() promise and the StateService.transitionTo() - * promise differ. For instance, the run() promise may be rejected because it was - * IGNORED, but the transitionTo() promise is resolved because from the user perspective - * no error occurred. Likewise, the transition.run() promise may be rejected because of - * a Redirect, but the transitionTo() promise is chained to the new Transition's promise. - */ - var rejectedTransitionHandler = function (trans) { return function (error) { - if (error instanceof _transition_rejectFactory__WEBPACK_IMPORTED_MODULE_7__.Rejection) { - var isLatest = router.globals.lastStartedTransitionId <= trans.$id; - if (error.type === _transition_rejectFactory__WEBPACK_IMPORTED_MODULE_7__.RejectType.IGNORED) { - isLatest && router.urlRouter.update(); - // Consider ignored `Transition.run()` as a successful `transitionTo` - return _common_coreservices__WEBPACK_IMPORTED_MODULE_3__.services.$q.when(globals.current); - } - var detail = error.detail; - if (error.type === _transition_rejectFactory__WEBPACK_IMPORTED_MODULE_7__.RejectType.SUPERSEDED && error.redirected && detail instanceof _targetState__WEBPACK_IMPORTED_MODULE_8__.TargetState) { - // If `Transition.run()` was redirected, allow the `transitionTo()` promise to resolve successfully - // by returning the promise for the new (redirect) `Transition.run()`. - var redirect = trans.redirect(detail); - return redirect.run().catch(rejectedTransitionHandler(redirect)); - } - if (error.type === _transition_rejectFactory__WEBPACK_IMPORTED_MODULE_7__.RejectType.ABORTED) { - isLatest && router.urlRouter.update(); - return _common_coreservices__WEBPACK_IMPORTED_MODULE_3__.services.$q.reject(error); - } - } - var errorHandler = _this.defaultErrorHandler(); - errorHandler(error); - return _common_coreservices__WEBPACK_IMPORTED_MODULE_3__.services.$q.reject(error); - }; }; - var transition = this.router.transitionService.create(currentPath, ref); - var transitionToPromise = transition.run().catch(rejectedTransitionHandler(transition)); - (0,_common_common__WEBPACK_IMPORTED_MODULE_0__.silenceUncaughtInPromise)(transitionToPromise); // issue #2676 - // Return a promise for the transition, which also has the transition object on it. - return (0,_common_common__WEBPACK_IMPORTED_MODULE_0__.extend)(transitionToPromise, { transition: transition }); - }; - /** - * Checks if the current state *is* the provided state - * - * Similar to [[includes]] but only checks for the full state name. - * If params is supplied then it will be tested for strict equality against the current - * active params object, so all params must match with none missing and no extras. - * - * #### Example: - * ```js - * $state.$current.name = 'contacts.details.item'; - * - * // absolute name - * $state.is('contact.details.item'); // returns true - * $state.is(contactDetailItemStateObject); // returns true - * ``` - * - * // relative name (. and ^), typically from a template - * // E.g. from the 'contacts.details' template - * ```html - *
    Item
    - * ``` - * - * @param stateOrName The state name (absolute or relative) or state object you'd like to check. - * @param params A param object, e.g. `{sectionId: section.id}`, that you'd like - * to test against the current active state. - * @param options An options object. The options are: - * - `relative`: If `stateOrName` is a relative state name and `options.relative` is set, .is will - * test relative to `options.relative` state (or name). - * - * @returns Returns true if it is the state. - */ - StateService.prototype.is = function (stateOrName, params, options) { - options = (0,_common_common__WEBPACK_IMPORTED_MODULE_0__.defaults)(options, { relative: this.$current }); - var state = this.router.stateRegistry.matcher.find(stateOrName, options.relative); - if (!(0,_common_predicates__WEBPACK_IMPORTED_MODULE_1__.isDefined)(state)) - return undefined; - if (this.$current !== state) - return false; - if (!params) - return true; - var schema = state.parameters({ inherit: true, matchingKeys: params }); - return _params_param__WEBPACK_IMPORTED_MODULE_9__.Param.equals(schema, _params_param__WEBPACK_IMPORTED_MODULE_9__.Param.values(schema, params), this.params); - }; - /** - * Checks if the current state *includes* the provided state - * - * A method to determine if the current active state is equal to or is the child of the - * state stateName. If any params are passed then they will be tested for a match as well. - * Not all the parameters need to be passed, just the ones you'd like to test for equality. - * - * #### Example when `$state.$current.name === 'contacts.details.item'` - * ```js - * // Using partial names - * $state.includes("contacts"); // returns true - * $state.includes("contacts.details"); // returns true - * $state.includes("contacts.details.item"); // returns true - * $state.includes("contacts.list"); // returns false - * $state.includes("about"); // returns false - * ``` - * - * #### Glob Examples when `* $state.$current.name === 'contacts.details.item.url'`: - * ```js - * $state.includes("*.details.*.*"); // returns true - * $state.includes("*.details.**"); // returns true - * $state.includes("**.item.**"); // returns true - * $state.includes("*.details.item.url"); // returns true - * $state.includes("*.details.*.url"); // returns true - * $state.includes("*.details.*"); // returns false - * $state.includes("item.**"); // returns false - * ``` - * - * @param stateOrName A partial name, relative name, glob pattern, - * or state object to be searched for within the current state name. - * @param params A param object, e.g. `{sectionId: section.id}`, - * that you'd like to test against the current active state. - * @param options An options object. The options are: - * - `relative`: If `stateOrName` is a relative state name and `options.relative` is set, .is will - * test relative to `options.relative` state (or name). - * - * @returns {boolean} Returns true if it does include the state - */ - StateService.prototype.includes = function (stateOrName, params, options) { - options = (0,_common_common__WEBPACK_IMPORTED_MODULE_0__.defaults)(options, { relative: this.$current }); - var glob = (0,_common_predicates__WEBPACK_IMPORTED_MODULE_1__.isString)(stateOrName) && _common_glob__WEBPACK_IMPORTED_MODULE_10__.Glob.fromString(stateOrName); - if (glob) { - if (!glob.matches(this.$current.name)) - return false; - stateOrName = this.$current.name; - } - var state = this.router.stateRegistry.matcher.find(stateOrName, options.relative), include = this.$current.includes; - if (!(0,_common_predicates__WEBPACK_IMPORTED_MODULE_1__.isDefined)(state)) - return undefined; - if (!(0,_common_predicates__WEBPACK_IMPORTED_MODULE_1__.isDefined)(include[state.name])) - return false; - if (!params) - return true; - var schema = state.parameters({ inherit: true, matchingKeys: params }); - return _params_param__WEBPACK_IMPORTED_MODULE_9__.Param.equals(schema, _params_param__WEBPACK_IMPORTED_MODULE_9__.Param.values(schema, params), this.params); - }; - /** - * Generates a URL for a state and parameters - * - * Returns the url for the given state populated with the given params. - * - * #### Example: - * ```js - * expect($state.href("about.person", { person: "bob" })).toEqual("/about/bob"); - * ``` - * - * @param stateOrName The state name or state object you'd like to generate a url from. - * @param params An object of parameter values to fill the state's required parameters. - * @param options Options object. The options are: - * - * @returns {string} compiled state url - */ - StateService.prototype.href = function (stateOrName, params, options) { - var defaultHrefOpts = { - lossy: true, - inherit: true, - absolute: false, - relative: this.$current, - }; - options = (0,_common_common__WEBPACK_IMPORTED_MODULE_0__.defaults)(options, defaultHrefOpts); - params = params || {}; - var state = this.router.stateRegistry.matcher.find(stateOrName, options.relative); - if (!(0,_common_predicates__WEBPACK_IMPORTED_MODULE_1__.isDefined)(state)) - return null; - if (options.inherit) - params = this.params.$inherit(params, this.$current, state); - var nav = state && options.lossy ? state.navigable : state; - if (!nav || nav.url === undefined || nav.url === null) { - return null; - } - return this.router.urlRouter.href(nav.url, params, { absolute: options.absolute }); - }; - /** - * Sets or gets the default [[transitionTo]] error handler. - * - * The error handler is called when a [[Transition]] is rejected or when any error occurred during the Transition. - * This includes errors caused by resolves and transition hooks. - * - * Note: - * This handler does not receive certain Transition rejections. - * Redirected and Ignored Transitions are not considered to be errors by [[StateService.transitionTo]]. - * - * The built-in default error handler logs the error to the console. - * - * You can provide your own custom handler. - * - * #### Example: - * ```js - * stateService.defaultErrorHandler(function() { - * // Do not log transitionTo errors - * }); - * ``` - * - * @param handler a global error handler function - * @returns the current global error handler - */ - StateService.prototype.defaultErrorHandler = function (handler) { - return (this._defaultErrorHandler = handler || this._defaultErrorHandler); - }; - StateService.prototype.get = function (stateOrName, base) { - var reg = this.router.stateRegistry; - if (arguments.length === 0) - return reg.get(); - return reg.get(stateOrName, base || this.$current); - }; - /** - * Lazy loads a state - * - * Explicitly runs a state's [[StateDeclaration.lazyLoad]] function. - * - * @param stateOrName the state that should be lazy loaded - * @param transition the optional Transition context to use (if the lazyLoad function requires an injector, etc) - * Note: If no transition is provided, a noop transition is created using the from the current state to the current state. - * This noop transition is not actually run. - * - * @returns a promise to lazy load - */ - StateService.prototype.lazyLoad = function (stateOrName, transition) { - var state = this.get(stateOrName); - if (!state || !state.lazyLoad) - throw new Error('Can not lazy load ' + stateOrName); - var currentPath = this.getCurrentPath(); - var target = _path_pathUtils__WEBPACK_IMPORTED_MODULE_4__.PathUtils.makeTargetState(this.router.stateRegistry, currentPath); - transition = transition || this.router.transitionService.create(currentPath, target); - return (0,_hooks_lazyLoad__WEBPACK_IMPORTED_MODULE_12__.lazyLoadState)(transition, state); - }; - return StateService; -}()); - -//# sourceMappingURL=stateService.js.map - -/***/ }), - -/***/ "./node_modules/@uirouter/core/lib-esm/state/targetState.js": -/*!******************************************************************!*\ - !*** ./node_modules/@uirouter/core/lib-esm/state/targetState.js ***! - \******************************************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "TargetState": () => (/* binding */ TargetState) -/* harmony export */ }); -/* harmony import */ var _common_predicates__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../common/predicates */ "./node_modules/@uirouter/core/lib-esm/common/predicates.js"); -/* harmony import */ var _common_strings__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../common/strings */ "./node_modules/@uirouter/core/lib-esm/common/strings.js"); -/* harmony import */ var _common__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../common */ "./node_modules/@uirouter/core/lib-esm/common/index.js"); - - - -/** - * Encapsulate the target (destination) state/params/options of a [[Transition]]. - * - * This class is frequently used to redirect a transition to a new destination. - * - * See: - * - * - [[HookResult]] - * - [[TransitionHookFn]] - * - [[TransitionService.onStart]] - * - * To create a `TargetState`, use [[StateService.target]]. - * - * --- - * - * This class wraps: - * - * 1) an identifier for a state - * 2) a set of parameters - * 3) and transition options - * 4) the registered state object (the [[StateDeclaration]]) - * - * Many UI-Router APIs such as [[StateService.go]] take a [[StateOrName]] argument which can - * either be a *state object* (a [[StateDeclaration]] or [[StateObject]]) or a *state name* (a string). - * The `TargetState` class normalizes those options. - * - * A `TargetState` may be valid (the state being targeted exists in the registry) - * or invalid (the state being targeted is not registered). - */ -var TargetState = /** @class */ (function () { - /** - * The TargetState constructor - * - * Note: Do not construct a `TargetState` manually. - * To create a `TargetState`, use the [[StateService.target]] factory method. - * - * @param _stateRegistry The StateRegistry to use to look up the _definition - * @param _identifier An identifier for a state. - * Either a fully-qualified state name, or the object used to define the state. - * @param _params Parameters for the target state - * @param _options Transition options. - * - * @internal - */ - function TargetState(_stateRegistry, _identifier, _params, _options) { - this._stateRegistry = _stateRegistry; - this._identifier = _identifier; - this._identifier = _identifier; - this._params = (0,_common__WEBPACK_IMPORTED_MODULE_2__.extend)({}, _params || {}); - this._options = (0,_common__WEBPACK_IMPORTED_MODULE_2__.extend)({}, _options || {}); - this._definition = _stateRegistry.matcher.find(_identifier, this._options.relative); - } - /** The name of the state this object targets */ - TargetState.prototype.name = function () { - return (this._definition && this._definition.name) || this._identifier; - }; - /** The identifier used when creating this TargetState */ - TargetState.prototype.identifier = function () { - return this._identifier; - }; - /** The target parameter values */ - TargetState.prototype.params = function () { - return this._params; - }; - /** The internal state object (if it was found) */ - TargetState.prototype.$state = function () { - return this._definition; - }; - /** The internal state declaration (if it was found) */ - TargetState.prototype.state = function () { - return this._definition && this._definition.self; - }; - /** The target options */ - TargetState.prototype.options = function () { - return this._options; - }; - /** True if the target state was found */ - TargetState.prototype.exists = function () { - return !!(this._definition && this._definition.self); - }; - /** True if the object is valid */ - TargetState.prototype.valid = function () { - return !this.error(); - }; - /** If the object is invalid, returns the reason why */ - TargetState.prototype.error = function () { - var base = this.options().relative; - if (!this._definition && !!base) { - var stateName = base.name ? base.name : base; - return "Could not resolve '" + this.name() + "' from state '" + stateName + "'"; - } - if (!this._definition) - return "No such state '" + this.name() + "'"; - if (!this._definition.self) - return "State '" + this.name() + "' has an invalid definition"; - }; - TargetState.prototype.toString = function () { - return "'" + this.name() + "'" + (0,_common_strings__WEBPACK_IMPORTED_MODULE_1__.stringify)(this.params()); - }; - /** - * Returns a copy of this TargetState which targets a different state. - * The new TargetState has the same parameter values and transition options. - * - * @param state The new state that should be targeted - */ - TargetState.prototype.withState = function (state) { - return new TargetState(this._stateRegistry, state, this._params, this._options); - }; - /** - * Returns a copy of this TargetState, using the specified parameter values. - * - * @param params the new parameter values to use - * @param replace When false (default) the new parameter values will be merged with the current values. - * When true the parameter values will be used instead of the current values. - */ - TargetState.prototype.withParams = function (params, replace) { - if (replace === void 0) { replace = false; } - var newParams = replace ? params : (0,_common__WEBPACK_IMPORTED_MODULE_2__.extend)({}, this._params, params); - return new TargetState(this._stateRegistry, this._identifier, newParams, this._options); - }; - /** - * Returns a copy of this TargetState, using the specified Transition Options. - * - * @param options the new options to use - * @param replace When false (default) the new options will be merged with the current options. - * When true the options will be used instead of the current options. - */ - TargetState.prototype.withOptions = function (options, replace) { - if (replace === void 0) { replace = false; } - var newOpts = replace ? options : (0,_common__WEBPACK_IMPORTED_MODULE_2__.extend)({}, this._options, options); - return new TargetState(this._stateRegistry, this._identifier, this._params, newOpts); - }; - /** Returns true if the object has a state property that might be a state or state name */ - TargetState.isDef = function (obj) { - return obj && obj.state && ((0,_common_predicates__WEBPACK_IMPORTED_MODULE_0__.isString)(obj.state) || ((0,_common_predicates__WEBPACK_IMPORTED_MODULE_0__.isObject)(obj.state) && (0,_common_predicates__WEBPACK_IMPORTED_MODULE_0__.isString)(obj.state.name))); - }; - return TargetState; -}()); - -//# sourceMappingURL=targetState.js.map - -/***/ }), - -/***/ "./node_modules/@uirouter/core/lib-esm/transition/hookBuilder.js": -/*!***********************************************************************!*\ - !*** ./node_modules/@uirouter/core/lib-esm/transition/hookBuilder.js ***! - \***********************************************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "HookBuilder": () => (/* binding */ HookBuilder) -/* harmony export */ }); -/* harmony import */ var _common_common__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../common/common */ "./node_modules/@uirouter/core/lib-esm/common/common.js"); -/* harmony import */ var _common_predicates__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../common/predicates */ "./node_modules/@uirouter/core/lib-esm/common/predicates.js"); -/* harmony import */ var _interface__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./interface */ "./node_modules/@uirouter/core/lib-esm/transition/interface.js"); -/* harmony import */ var _transitionHook__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./transitionHook */ "./node_modules/@uirouter/core/lib-esm/transition/transitionHook.js"); - - - - -/** - * This class returns applicable TransitionHooks for a specific Transition instance. - * - * Hooks ([[RegisteredHook]]) may be registered globally, e.g., $transitions.onEnter(...), or locally, e.g. - * myTransition.onEnter(...). The HookBuilder finds matching RegisteredHooks (where the match criteria is - * determined by the type of hook) - * - * The HookBuilder also converts RegisteredHooks objects to TransitionHook objects, which are used to run a Transition. - * - * The HookBuilder constructor is given the $transitions service and a Transition instance. Thus, a HookBuilder - * instance may only be used for one specific Transition object. (side note: the _treeChanges accessor is private - * in the Transition class, so we must also provide the Transition's _treeChanges) - */ -var HookBuilder = /** @class */ (function () { - function HookBuilder(transition) { - this.transition = transition; - } - HookBuilder.prototype.buildHooksForPhase = function (phase) { - var _this = this; - var $transitions = this.transition.router.transitionService; - return $transitions._pluginapi - ._getEvents(phase) - .map(function (type) { return _this.buildHooks(type); }) - .reduce(_common_common__WEBPACK_IMPORTED_MODULE_0__.unnestR, []) - .filter(_common_common__WEBPACK_IMPORTED_MODULE_0__.identity); - }; - /** - * Returns an array of newly built TransitionHook objects. - * - * - Finds all RegisteredHooks registered for the given `hookType` which matched the transition's [[TreeChanges]]. - * - Finds [[PathNode]] (or `PathNode[]`) to use as the TransitionHook context(s) - * - For each of the [[PathNode]]s, creates a TransitionHook - * - * @param hookType the type of the hook registration function, e.g., 'onEnter', 'onFinish'. - */ - HookBuilder.prototype.buildHooks = function (hookType) { - var transition = this.transition; - var treeChanges = transition.treeChanges(); - // Find all the matching registered hooks for a given hook type - var matchingHooks = this.getMatchingHooks(hookType, treeChanges, transition); - if (!matchingHooks) - return []; - var baseHookOptions = { - transition: transition, - current: transition.options().current, - }; - var makeTransitionHooks = function (hook) { - // Fetch the Nodes that caused this hook to match. - var matches = hook.matches(treeChanges, transition); - // Select the PathNode[] that will be used as TransitionHook context objects - var matchingNodes = matches[hookType.criteriaMatchPath.name]; - // Return an array of HookTuples - return matchingNodes.map(function (node) { - var _options = (0,_common_common__WEBPACK_IMPORTED_MODULE_0__.extend)({ - bind: hook.bind, - traceData: { hookType: hookType.name, context: node }, - }, baseHookOptions); - var state = hookType.criteriaMatchPath.scope === _interface__WEBPACK_IMPORTED_MODULE_2__.TransitionHookScope.STATE ? node.state.self : null; - var transitionHook = new _transitionHook__WEBPACK_IMPORTED_MODULE_3__.TransitionHook(transition, state, hook, _options); - return { hook: hook, node: node, transitionHook: transitionHook }; - }); - }; - return matchingHooks - .map(makeTransitionHooks) - .reduce(_common_common__WEBPACK_IMPORTED_MODULE_0__.unnestR, []) - .sort(tupleSort(hookType.reverseSort)) - .map(function (tuple) { return tuple.transitionHook; }); - }; - /** - * Finds all RegisteredHooks from: - * - The Transition object instance hook registry - * - The TransitionService ($transitions) global hook registry - * - * which matched: - * - the eventType - * - the matchCriteria (to, from, exiting, retained, entering) - * - * @returns an array of matched [[RegisteredHook]]s - */ - HookBuilder.prototype.getMatchingHooks = function (hookType, treeChanges, transition) { - var isCreate = hookType.hookPhase === _interface__WEBPACK_IMPORTED_MODULE_2__.TransitionHookPhase.CREATE; - // Instance and Global hook registries - var $transitions = this.transition.router.transitionService; - var registries = isCreate ? [$transitions] : [this.transition, $transitions]; - return registries - .map(function (reg) { return reg.getHooks(hookType.name); }) // Get named hooks from registries - .filter((0,_common_common__WEBPACK_IMPORTED_MODULE_0__.assertPredicate)(_common_predicates__WEBPACK_IMPORTED_MODULE_1__.isArray, "broken event named: " + hookType.name)) // Sanity check - .reduce(_common_common__WEBPACK_IMPORTED_MODULE_0__.unnestR, []) // Un-nest RegisteredHook[][] to RegisteredHook[] array - .filter(function (hook) { return hook.matches(treeChanges, transition); }); // Only those satisfying matchCriteria - }; - return HookBuilder; -}()); - -/** - * A factory for a sort function for HookTuples. - * - * The sort function first compares the PathNode depth (how deep in the state tree a node is), then compares - * the EventHook priority. - * - * @param reverseDepthSort a boolean, when true, reverses the sort order for the node depth - * @returns a tuple sort function - */ -function tupleSort(reverseDepthSort) { - if (reverseDepthSort === void 0) { reverseDepthSort = false; } - return function nodeDepthThenPriority(l, r) { - var factor = reverseDepthSort ? -1 : 1; - var depthDelta = (l.node.state.path.length - r.node.state.path.length) * factor; - return depthDelta !== 0 ? depthDelta : r.hook.priority - l.hook.priority; - }; -} -//# sourceMappingURL=hookBuilder.js.map - -/***/ }), - -/***/ "./node_modules/@uirouter/core/lib-esm/transition/hookRegistry.js": -/*!************************************************************************!*\ - !*** ./node_modules/@uirouter/core/lib-esm/transition/hookRegistry.js ***! - \************************************************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "matchState": () => (/* binding */ matchState), -/* harmony export */ "RegisteredHook": () => (/* binding */ RegisteredHook), -/* harmony export */ "makeEvent": () => (/* binding */ makeEvent) -/* harmony export */ }); -/* harmony import */ var _common__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../common */ "./node_modules/@uirouter/core/lib-esm/common/index.js"); -/* harmony import */ var _interface__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./interface */ "./node_modules/@uirouter/core/lib-esm/transition/interface.js"); - - -/** - * Determines if the given state matches the matchCriteria - * - * @internal - * - * @param state a State Object to test against - * @param criterion - * - If a string, matchState uses the string as a glob-matcher against the state name - * - If an array (of strings), matchState uses each string in the array as a glob-matchers against the state name - * and returns a positive match if any of the globs match. - * - If a function, matchState calls the function with the state and returns true if the function's result is truthy. - * @returns {boolean} - */ -function matchState(state, criterion, transition) { - var toMatch = (0,_common__WEBPACK_IMPORTED_MODULE_0__.isString)(criterion) ? [criterion] : criterion; - function matchGlobs(_state) { - var globStrings = toMatch; - for (var i = 0; i < globStrings.length; i++) { - var glob = new _common__WEBPACK_IMPORTED_MODULE_0__.Glob(globStrings[i]); - if ((glob && glob.matches(_state.name)) || (!glob && globStrings[i] === _state.name)) { - return true; - } - } - return false; - } - var matchFn = ((0,_common__WEBPACK_IMPORTED_MODULE_0__.isFunction)(toMatch) ? toMatch : matchGlobs); - return !!matchFn(state, transition); -} -/** - * The registration data for a registered transition hook - */ -var RegisteredHook = /** @class */ (function () { - function RegisteredHook(tranSvc, eventType, callback, matchCriteria, removeHookFromRegistry, options) { - if (options === void 0) { options = {}; } - this.tranSvc = tranSvc; - this.eventType = eventType; - this.callback = callback; - this.matchCriteria = matchCriteria; - this.removeHookFromRegistry = removeHookFromRegistry; - this.invokeCount = 0; - this._deregistered = false; - this.priority = options.priority || 0; - this.bind = options.bind || null; - this.invokeLimit = options.invokeLimit; - } - /** - * Gets the matching [[PathNode]]s - * - * Given an array of [[PathNode]]s, and a [[HookMatchCriterion]], returns an array containing - * the [[PathNode]]s that the criteria matches, or `null` if there were no matching nodes. - * - * Returning `null` is significant to distinguish between the default - * "match-all criterion value" of `true` compared to a `() => true` function, - * when the nodes is an empty array. - * - * This is useful to allow a transition match criteria of `entering: true` - * to still match a transition, even when `entering === []`. Contrast that - * with `entering: (state) => true` which only matches when a state is actually - * being entered. - */ - RegisteredHook.prototype._matchingNodes = function (nodes, criterion, transition) { - if (criterion === true) - return nodes; - var matching = nodes.filter(function (node) { return matchState(node.state, criterion, transition); }); - return matching.length ? matching : null; - }; - /** - * Gets the default match criteria (all `true`) - * - * Returns an object which has all the criteria match paths as keys and `true` as values, i.e.: - * - * ```js - * { - * to: true, - * from: true, - * entering: true, - * exiting: true, - * retained: true, - * } - */ - RegisteredHook.prototype._getDefaultMatchCriteria = function () { - return (0,_common__WEBPACK_IMPORTED_MODULE_0__.mapObj)(this.tranSvc._pluginapi._getPathTypes(), function () { return true; }); - }; - /** - * Gets matching nodes as [[IMatchingNodes]] - * - * Create a IMatchingNodes object from the TransitionHookTypes that is roughly equivalent to: - * - * ```js - * let matches: IMatchingNodes = { - * to: _matchingNodes([tail(treeChanges.to)], mc.to), - * from: _matchingNodes([tail(treeChanges.from)], mc.from), - * exiting: _matchingNodes(treeChanges.exiting, mc.exiting), - * retained: _matchingNodes(treeChanges.retained, mc.retained), - * entering: _matchingNodes(treeChanges.entering, mc.entering), - * }; - * ``` - */ - RegisteredHook.prototype._getMatchingNodes = function (treeChanges, transition) { - var _this = this; - var criteria = (0,_common__WEBPACK_IMPORTED_MODULE_0__.extend)(this._getDefaultMatchCriteria(), this.matchCriteria); - var paths = (0,_common__WEBPACK_IMPORTED_MODULE_0__.values)(this.tranSvc._pluginapi._getPathTypes()); - return paths.reduce(function (mn, pathtype) { - // STATE scope criteria matches against every node in the path. - // TRANSITION scope criteria matches against only the last node in the path - var isStateHook = pathtype.scope === _interface__WEBPACK_IMPORTED_MODULE_1__.TransitionHookScope.STATE; - var path = treeChanges[pathtype.name] || []; - var nodes = isStateHook ? path : [(0,_common__WEBPACK_IMPORTED_MODULE_0__.tail)(path)]; - mn[pathtype.name] = _this._matchingNodes(nodes, criteria[pathtype.name], transition); - return mn; - }, {}); - }; - /** - * Determines if this hook's [[matchCriteria]] match the given [[TreeChanges]] - * - * @returns an IMatchingNodes object, or null. If an IMatchingNodes object is returned, its values - * are the matching [[PathNode]]s for each [[HookMatchCriterion]] (to, from, exiting, retained, entering) - */ - RegisteredHook.prototype.matches = function (treeChanges, transition) { - var matches = this._getMatchingNodes(treeChanges, transition); - // Check if all the criteria matched the TreeChanges object - var allMatched = (0,_common__WEBPACK_IMPORTED_MODULE_0__.values)(matches).every(_common__WEBPACK_IMPORTED_MODULE_0__.identity); - return allMatched ? matches : null; - }; - RegisteredHook.prototype.deregister = function () { - this.removeHookFromRegistry(this); - this._deregistered = true; - }; - return RegisteredHook; -}()); - -/** Return a registration function of the requested type. */ -function makeEvent(registry, transitionService, eventType) { - // Create the object which holds the registered transition hooks. - var _registeredHooks = (registry._registeredHooks = registry._registeredHooks || {}); - var hooks = (_registeredHooks[eventType.name] = []); - var removeHookFn = (0,_common__WEBPACK_IMPORTED_MODULE_0__.removeFrom)(hooks); - // Create hook registration function on the IHookRegistry for the event - registry[eventType.name] = hookRegistrationFn; - function hookRegistrationFn(matchObject, callback, options) { - if (options === void 0) { options = {}; } - var registeredHook = new RegisteredHook(transitionService, eventType, callback, matchObject, removeHookFn, options); - hooks.push(registeredHook); - return registeredHook.deregister.bind(registeredHook); - } - return hookRegistrationFn; -} -//# sourceMappingURL=hookRegistry.js.map - -/***/ }), - -/***/ "./node_modules/@uirouter/core/lib-esm/transition/index.js": -/*!*****************************************************************!*\ - !*** ./node_modules/@uirouter/core/lib-esm/transition/index.js ***! - \*****************************************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "TransitionHookPhase": () => (/* reexport safe */ _interface__WEBPACK_IMPORTED_MODULE_0__.TransitionHookPhase), -/* harmony export */ "TransitionHookScope": () => (/* reexport safe */ _interface__WEBPACK_IMPORTED_MODULE_0__.TransitionHookScope), -/* harmony export */ "HookBuilder": () => (/* reexport safe */ _hookBuilder__WEBPACK_IMPORTED_MODULE_1__.HookBuilder), -/* harmony export */ "RegisteredHook": () => (/* reexport safe */ _hookRegistry__WEBPACK_IMPORTED_MODULE_2__.RegisteredHook), -/* harmony export */ "makeEvent": () => (/* reexport safe */ _hookRegistry__WEBPACK_IMPORTED_MODULE_2__.makeEvent), -/* harmony export */ "matchState": () => (/* reexport safe */ _hookRegistry__WEBPACK_IMPORTED_MODULE_2__.matchState), -/* harmony export */ "RejectType": () => (/* reexport safe */ _rejectFactory__WEBPACK_IMPORTED_MODULE_3__.RejectType), -/* harmony export */ "Rejection": () => (/* reexport safe */ _rejectFactory__WEBPACK_IMPORTED_MODULE_3__.Rejection), -/* harmony export */ "Transition": () => (/* reexport safe */ _transition__WEBPACK_IMPORTED_MODULE_4__.Transition), -/* harmony export */ "TransitionHook": () => (/* reexport safe */ _transitionHook__WEBPACK_IMPORTED_MODULE_5__.TransitionHook), -/* harmony export */ "TransitionEventType": () => (/* reexport safe */ _transitionEventType__WEBPACK_IMPORTED_MODULE_6__.TransitionEventType), -/* harmony export */ "TransitionService": () => (/* reexport safe */ _transitionService__WEBPACK_IMPORTED_MODULE_7__.TransitionService), -/* harmony export */ "defaultTransOpts": () => (/* reexport safe */ _transitionService__WEBPACK_IMPORTED_MODULE_7__.defaultTransOpts) -/* harmony export */ }); -/* harmony import */ var _interface__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./interface */ "./node_modules/@uirouter/core/lib-esm/transition/interface.js"); -/* harmony import */ var _hookBuilder__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./hookBuilder */ "./node_modules/@uirouter/core/lib-esm/transition/hookBuilder.js"); -/* harmony import */ var _hookRegistry__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./hookRegistry */ "./node_modules/@uirouter/core/lib-esm/transition/hookRegistry.js"); -/* harmony import */ var _rejectFactory__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./rejectFactory */ "./node_modules/@uirouter/core/lib-esm/transition/rejectFactory.js"); -/* harmony import */ var _transition__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./transition */ "./node_modules/@uirouter/core/lib-esm/transition/transition.js"); -/* harmony import */ var _transitionHook__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./transitionHook */ "./node_modules/@uirouter/core/lib-esm/transition/transitionHook.js"); -/* harmony import */ var _transitionEventType__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./transitionEventType */ "./node_modules/@uirouter/core/lib-esm/transition/transitionEventType.js"); -/* harmony import */ var _transitionService__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./transitionService */ "./node_modules/@uirouter/core/lib-esm/transition/transitionService.js"); -/** - * # Transition subsystem - * - * This module contains APIs related to a Transition. - * - * See: - * - [[TransitionService]] - * - [[Transition]] - * - [[HookFn]], [[TransitionHookFn]], [[TransitionStateHookFn]], [[HookMatchCriteria]], [[HookResult]] - * - * @packageDocumentation @preferred - */ - - - - - - - - -//# sourceMappingURL=index.js.map - -/***/ }), - -/***/ "./node_modules/@uirouter/core/lib-esm/transition/interface.js": -/*!*********************************************************************!*\ - !*** ./node_modules/@uirouter/core/lib-esm/transition/interface.js ***! - \*********************************************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "TransitionHookPhase": () => (/* binding */ TransitionHookPhase), -/* harmony export */ "TransitionHookScope": () => (/* binding */ TransitionHookScope) -/* harmony export */ }); -var TransitionHookPhase; -(function (TransitionHookPhase) { - TransitionHookPhase[TransitionHookPhase["CREATE"] = 0] = "CREATE"; - TransitionHookPhase[TransitionHookPhase["BEFORE"] = 1] = "BEFORE"; - TransitionHookPhase[TransitionHookPhase["RUN"] = 2] = "RUN"; - TransitionHookPhase[TransitionHookPhase["SUCCESS"] = 3] = "SUCCESS"; - TransitionHookPhase[TransitionHookPhase["ERROR"] = 4] = "ERROR"; -})(TransitionHookPhase || (TransitionHookPhase = {})); -var TransitionHookScope; -(function (TransitionHookScope) { - TransitionHookScope[TransitionHookScope["TRANSITION"] = 0] = "TRANSITION"; - TransitionHookScope[TransitionHookScope["STATE"] = 1] = "STATE"; -})(TransitionHookScope || (TransitionHookScope = {})); - -//# sourceMappingURL=interface.js.map - -/***/ }), - -/***/ "./node_modules/@uirouter/core/lib-esm/transition/rejectFactory.js": -/*!*************************************************************************!*\ - !*** ./node_modules/@uirouter/core/lib-esm/transition/rejectFactory.js ***! - \*************************************************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "RejectType": () => (/* binding */ RejectType), -/* harmony export */ "Rejection": () => (/* binding */ Rejection) -/* harmony export */ }); -/* harmony import */ var _common_common__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../common/common */ "./node_modules/@uirouter/core/lib-esm/common/common.js"); -/* harmony import */ var _common_strings__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../common/strings */ "./node_modules/@uirouter/core/lib-esm/common/strings.js"); -/* harmony import */ var _common_hof__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../common/hof */ "./node_modules/@uirouter/core/lib-esm/common/hof.js"); - - - - -/** An enum for Transition Rejection reasons */ -var RejectType; -(function (RejectType) { - /** - * A new transition superseded this one. - * - * While this transition was running, a new transition started. - * This transition is cancelled because it was superseded by new transition. - */ - RejectType[RejectType["SUPERSEDED"] = 2] = "SUPERSEDED"; - /** - * The transition was aborted - * - * The transition was aborted by a hook which returned `false` - */ - RejectType[RejectType["ABORTED"] = 3] = "ABORTED"; - /** - * The transition was invalid - * - * The transition was never started because it was invalid - */ - RejectType[RejectType["INVALID"] = 4] = "INVALID"; - /** - * The transition was ignored - * - * The transition was ignored because it would have no effect. - * - * Either: - * - * - The transition is targeting the current state and parameter values - * - The transition is targeting the same state and parameter values as the currently running transition. - */ - RejectType[RejectType["IGNORED"] = 5] = "IGNORED"; - /** - * The transition errored. - * - * This generally means a hook threw an error or returned a rejected promise - */ - RejectType[RejectType["ERROR"] = 6] = "ERROR"; -})(RejectType || (RejectType = {})); - -/** @internal */ -var id = 0; -var Rejection = /** @class */ (function () { - function Rejection(type, message, detail) { - /** @internal */ - this.$id = id++; - this.type = type; - this.message = message; - this.detail = detail; - } - /** Returns true if the obj is a rejected promise created from the `asPromise` factory */ - Rejection.isRejectionPromise = function (obj) { - return obj && typeof obj.then === 'function' && (0,_common_hof__WEBPACK_IMPORTED_MODULE_2__.is)(Rejection)(obj._transitionRejection); - }; - /** Returns a Rejection due to transition superseded */ - Rejection.superseded = function (detail, options) { - var message = 'The transition has been superseded by a different transition'; - var rejection = new Rejection(RejectType.SUPERSEDED, message, detail); - if (options && options.redirected) { - rejection.redirected = true; - } - return rejection; - }; - /** Returns a Rejection due to redirected transition */ - Rejection.redirected = function (detail) { - return Rejection.superseded(detail, { redirected: true }); - }; - /** Returns a Rejection due to invalid transition */ - Rejection.invalid = function (detail) { - var message = 'This transition is invalid'; - return new Rejection(RejectType.INVALID, message, detail); - }; - /** Returns a Rejection due to ignored transition */ - Rejection.ignored = function (detail) { - var message = 'The transition was ignored'; - return new Rejection(RejectType.IGNORED, message, detail); - }; - /** Returns a Rejection due to aborted transition */ - Rejection.aborted = function (detail) { - var message = 'The transition has been aborted'; - return new Rejection(RejectType.ABORTED, message, detail); - }; - /** Returns a Rejection due to aborted transition */ - Rejection.errored = function (detail) { - var message = 'The transition errored'; - return new Rejection(RejectType.ERROR, message, detail); - }; - /** - * Returns a Rejection - * - * Normalizes a value as a Rejection. - * If the value is already a Rejection, returns it. - * Otherwise, wraps and returns the value as a Rejection (Rejection type: ERROR). - * - * @returns `detail` if it is already a `Rejection`, else returns an ERROR Rejection. - */ - Rejection.normalize = function (detail) { - return (0,_common_hof__WEBPACK_IMPORTED_MODULE_2__.is)(Rejection)(detail) ? detail : Rejection.errored(detail); - }; - Rejection.prototype.toString = function () { - var detailString = function (d) { return (d && d.toString !== Object.prototype.toString ? d.toString() : (0,_common_strings__WEBPACK_IMPORTED_MODULE_1__.stringify)(d)); }; - var detail = detailString(this.detail); - var _a = this, $id = _a.$id, type = _a.type, message = _a.message; - return "Transition Rejection($id: " + $id + " type: " + type + ", message: " + message + ", detail: " + detail + ")"; - }; - Rejection.prototype.toPromise = function () { - return (0,_common_common__WEBPACK_IMPORTED_MODULE_0__.extend)((0,_common_common__WEBPACK_IMPORTED_MODULE_0__.silentRejection)(this), { _transitionRejection: this }); - }; - return Rejection; -}()); - -//# sourceMappingURL=rejectFactory.js.map - -/***/ }), - -/***/ "./node_modules/@uirouter/core/lib-esm/transition/transition.js": -/*!**********************************************************************!*\ - !*** ./node_modules/@uirouter/core/lib-esm/transition/transition.js ***! - \**********************************************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "Transition": () => (/* binding */ Transition) -/* harmony export */ }); -/* harmony import */ var _common_trace__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../common/trace */ "./node_modules/@uirouter/core/lib-esm/common/trace.js"); -/* harmony import */ var _common_coreservices__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../common/coreservices */ "./node_modules/@uirouter/core/lib-esm/common/coreservices.js"); -/* harmony import */ var _common_strings__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../common/strings */ "./node_modules/@uirouter/core/lib-esm/common/strings.js"); -/* harmony import */ var _common_common__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../common/common */ "./node_modules/@uirouter/core/lib-esm/common/common.js"); -/* harmony import */ var _common_predicates__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../common/predicates */ "./node_modules/@uirouter/core/lib-esm/common/predicates.js"); -/* harmony import */ var _common_hof__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../common/hof */ "./node_modules/@uirouter/core/lib-esm/common/hof.js"); -/* harmony import */ var _interface__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./interface */ "./node_modules/@uirouter/core/lib-esm/transition/interface.js"); -/* harmony import */ var _transitionHook__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./transitionHook */ "./node_modules/@uirouter/core/lib-esm/transition/transitionHook.js"); -/* harmony import */ var _hookRegistry__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./hookRegistry */ "./node_modules/@uirouter/core/lib-esm/transition/hookRegistry.js"); -/* harmony import */ var _hookBuilder__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./hookBuilder */ "./node_modules/@uirouter/core/lib-esm/transition/hookBuilder.js"); -/* harmony import */ var _path_pathUtils__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../path/pathUtils */ "./node_modules/@uirouter/core/lib-esm/path/pathUtils.js"); -/* harmony import */ var _params_param__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../params/param */ "./node_modules/@uirouter/core/lib-esm/params/param.js"); -/* harmony import */ var _resolve_resolvable__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../resolve/resolvable */ "./node_modules/@uirouter/core/lib-esm/resolve/resolvable.js"); -/* harmony import */ var _resolve_resolveContext__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../resolve/resolveContext */ "./node_modules/@uirouter/core/lib-esm/resolve/resolveContext.js"); -/* harmony import */ var _rejectFactory__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./rejectFactory */ "./node_modules/@uirouter/core/lib-esm/transition/rejectFactory.js"); -/* harmony import */ var _common__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../common */ "./node_modules/@uirouter/core/lib-esm/common/index.js"); - - - - - - - // has or is using - - - - - - - - - -/** @internal */ -var stateSelf = (0,_common_hof__WEBPACK_IMPORTED_MODULE_5__.prop)('self'); -/** - * Represents a transition between two states. - * - * When navigating to a state, we are transitioning **from** the current state **to** the new state. - * - * This object contains all contextual information about the to/from states, parameters, resolves. - * It has information about all states being entered and exited as a result of the transition. - */ -var Transition = /** @class */ (function () { - /** - * Creates a new Transition object. - * - * If the target state is not valid, an error is thrown. - * - * @internal - * - * @param fromPath The path of [[PathNode]]s from which the transition is leaving. The last node in the `fromPath` - * encapsulates the "from state". - * @param targetState The target state and parameters being transitioned to (also, the transition options) - * @param router The [[UIRouter]] instance - * @internal - */ - function Transition(fromPath, targetState, router) { - var _this = this; - /** @internal */ - this._deferred = _common_coreservices__WEBPACK_IMPORTED_MODULE_1__.services.$q.defer(); - /** - * This promise is resolved or rejected based on the outcome of the Transition. - * - * When the transition is successful, the promise is resolved - * When the transition is unsuccessful, the promise is rejected with the [[Rejection]] or javascript error - */ - this.promise = this._deferred.promise; - /** @internal Holds the hook registration functions such as those passed to Transition.onStart() */ - this._registeredHooks = {}; - /** @internal */ - this._hookBuilder = new _hookBuilder__WEBPACK_IMPORTED_MODULE_9__.HookBuilder(this); - /** Checks if this transition is currently active/running. */ - this.isActive = function () { return _this.router.globals.transition === _this; }; - this.router = router; - this._targetState = targetState; - if (!targetState.valid()) { - throw new Error(targetState.error()); - } - // current() is assumed to come from targetState.options, but provide a naive implementation otherwise. - this._options = (0,_common_common__WEBPACK_IMPORTED_MODULE_3__.extend)({ current: (0,_common_hof__WEBPACK_IMPORTED_MODULE_5__.val)(this) }, targetState.options()); - this.$id = router.transitionService._transitionCount++; - var toPath = _path_pathUtils__WEBPACK_IMPORTED_MODULE_10__.PathUtils.buildToPath(fromPath, targetState); - this._treeChanges = _path_pathUtils__WEBPACK_IMPORTED_MODULE_10__.PathUtils.treeChanges(fromPath, toPath, this._options.reloadState); - this.createTransitionHookRegFns(); - var onCreateHooks = this._hookBuilder.buildHooksForPhase(_interface__WEBPACK_IMPORTED_MODULE_6__.TransitionHookPhase.CREATE); - _transitionHook__WEBPACK_IMPORTED_MODULE_7__.TransitionHook.invokeHooks(onCreateHooks, function () { return null; }); - this.applyViewConfigs(router); - } - /** @internal */ - Transition.prototype.onBefore = function (criteria, callback, options) { - return; - }; - /** @inheritdoc */ - Transition.prototype.onStart = function (criteria, callback, options) { - return; - }; - /** @inheritdoc */ - Transition.prototype.onExit = function (criteria, callback, options) { - return; - }; - /** @inheritdoc */ - Transition.prototype.onRetain = function (criteria, callback, options) { - return; - }; - /** @inheritdoc */ - Transition.prototype.onEnter = function (criteria, callback, options) { - return; - }; - /** @inheritdoc */ - Transition.prototype.onFinish = function (criteria, callback, options) { - return; - }; - /** @inheritdoc */ - Transition.prototype.onSuccess = function (criteria, callback, options) { - return; - }; - /** @inheritdoc */ - Transition.prototype.onError = function (criteria, callback, options) { - return; - }; - /** @internal - * Creates the transition-level hook registration functions - * (which can then be used to register hooks) - */ - Transition.prototype.createTransitionHookRegFns = function () { - var _this = this; - this.router.transitionService._pluginapi - ._getEvents() - .filter(function (type) { return type.hookPhase !== _interface__WEBPACK_IMPORTED_MODULE_6__.TransitionHookPhase.CREATE; }) - .forEach(function (type) { return (0,_hookRegistry__WEBPACK_IMPORTED_MODULE_8__.makeEvent)(_this, _this.router.transitionService, type); }); - }; - /** @internal */ - Transition.prototype.getHooks = function (hookName) { - return this._registeredHooks[hookName]; - }; - Transition.prototype.applyViewConfigs = function (router) { - var enteringStates = this._treeChanges.entering.map(function (node) { return node.state; }); - _path_pathUtils__WEBPACK_IMPORTED_MODULE_10__.PathUtils.applyViewConfigs(router.transitionService.$view, this._treeChanges.to, enteringStates); - }; - /** - * @internal - * @returns the internal from [State] object - */ - Transition.prototype.$from = function () { - return (0,_common_common__WEBPACK_IMPORTED_MODULE_3__.tail)(this._treeChanges.from).state; - }; - /** - * @internal - * @returns the internal to [State] object - */ - Transition.prototype.$to = function () { - return (0,_common_common__WEBPACK_IMPORTED_MODULE_3__.tail)(this._treeChanges.to).state; - }; - /** - * Returns the "from state" - * - * Returns the state that the transition is coming *from*. - * - * @returns The state declaration object for the Transition's ("from state"). - */ - Transition.prototype.from = function () { - return this.$from().self; - }; - /** - * Returns the "to state" - * - * Returns the state that the transition is going *to*. - * - * @returns The state declaration object for the Transition's target state ("to state"). - */ - Transition.prototype.to = function () { - return this.$to().self; - }; - /** - * Gets the Target State - * - * A transition's [[TargetState]] encapsulates the [[to]] state, the [[params]], and the [[options]] as a single object. - * - * @returns the [[TargetState]] of this Transition - */ - Transition.prototype.targetState = function () { - return this._targetState; - }; - /** - * Determines whether two transitions are equivalent. - * @deprecated - */ - Transition.prototype.is = function (compare) { - if (compare instanceof Transition) { - // TODO: Also compare parameters - return this.is({ to: compare.$to().name, from: compare.$from().name }); - } - return !((compare.to && !(0,_hookRegistry__WEBPACK_IMPORTED_MODULE_8__.matchState)(this.$to(), compare.to, this)) || - (compare.from && !(0,_hookRegistry__WEBPACK_IMPORTED_MODULE_8__.matchState)(this.$from(), compare.from, this))); - }; - Transition.prototype.params = function (pathname) { - if (pathname === void 0) { pathname = 'to'; } - return Object.freeze(this._treeChanges[pathname].map((0,_common_hof__WEBPACK_IMPORTED_MODULE_5__.prop)('paramValues')).reduce(_common_common__WEBPACK_IMPORTED_MODULE_3__.mergeR, {})); - }; - Transition.prototype.paramsChanged = function () { - var fromParams = this.params('from'); - var toParams = this.params('to'); - // All the parameters declared on both the "to" and "from" paths - var allParamDescriptors = [] - .concat(this._treeChanges.to) - .concat(this._treeChanges.from) - .map(function (pathNode) { return pathNode.paramSchema; }) - .reduce(_common__WEBPACK_IMPORTED_MODULE_15__.flattenR, []) - .reduce(_common__WEBPACK_IMPORTED_MODULE_15__.uniqR, []); - var changedParamDescriptors = _params_param__WEBPACK_IMPORTED_MODULE_11__.Param.changed(allParamDescriptors, fromParams, toParams); - return changedParamDescriptors.reduce(function (changedValues, descriptor) { - changedValues[descriptor.id] = toParams[descriptor.id]; - return changedValues; - }, {}); - }; - /** - * Creates a [[UIInjector]] Dependency Injector - * - * Returns a Dependency Injector for the Transition's target state (to state). - * The injector provides resolve values which the target state has access to. - * - * The `UIInjector` can also provide values from the native root/global injector (ng1/ng2). - * - * #### Example: - * ```js - * .onEnter({ entering: 'myState' }, trans => { - * var myResolveValue = trans.injector().get('myResolve'); - * // Inject a global service from the global/native injector (if it exists) - * var MyService = trans.injector().get('MyService'); - * }) - * ``` - * - * In some cases (such as `onBefore`), you may need access to some resolve data but it has not yet been fetched. - * You can use [[UIInjector.getAsync]] to get a promise for the data. - * #### Example: - * ```js - * .onBefore({}, trans => { - * return trans.injector().getAsync('myResolve').then(myResolveValue => - * return myResolveValue !== 'ABORT'; - * }); - * }); - * ``` - * - * If a `state` is provided, the injector that is returned will be limited to resolve values that the provided state has access to. - * This can be useful if both a parent state `foo` and a child state `foo.bar` have both defined a resolve such as `data`. - * #### Example: - * ```js - * .onEnter({ to: 'foo.bar' }, trans => { - * // returns result of `foo` state's `myResolve` resolve - * // even though `foo.bar` also has a `myResolve` resolve - * var fooData = trans.injector('foo').get('myResolve'); - * }); - * ``` - * - * If you need resolve data from the exiting states, pass `'from'` as `pathName`. - * The resolve data from the `from` path will be returned. - * #### Example: - * ```js - * .onExit({ exiting: 'foo.bar' }, trans => { - * // Gets the resolve value of `myResolve` from the state being exited - * var fooData = trans.injector(null, 'from').get('myResolve'); - * }); - * ``` - * - * - * @param state Limits the resolves provided to only the resolves the provided state has access to. - * @param pathName Default: `'to'`: Chooses the path for which to create the injector. Use this to access resolves for `exiting` states. - * - * @returns a [[UIInjector]] - */ - Transition.prototype.injector = function (state, pathName) { - if (pathName === void 0) { pathName = 'to'; } - var path = this._treeChanges[pathName]; - if (state) - path = _path_pathUtils__WEBPACK_IMPORTED_MODULE_10__.PathUtils.subPath(path, function (node) { return node.state === state || node.state.name === state; }); - return new _resolve_resolveContext__WEBPACK_IMPORTED_MODULE_13__.ResolveContext(path).injector(); - }; - /** - * Gets all available resolve tokens (keys) - * - * This method can be used in conjunction with [[injector]] to inspect the resolve values - * available to the Transition. - * - * This returns all the tokens defined on [[StateDeclaration.resolve]] blocks, for the states - * in the Transition's [[TreeChanges.to]] path. - * - * #### Example: - * This example logs all resolve values - * ```js - * let tokens = trans.getResolveTokens(); - * tokens.forEach(token => console.log(token + " = " + trans.injector().get(token))); - * ``` - * - * #### Example: - * This example creates promises for each resolve value. - * This triggers fetches of resolves (if any have not yet been fetched). - * When all promises have all settled, it logs the resolve values. - * ```js - * let tokens = trans.getResolveTokens(); - * let promise = tokens.map(token => trans.injector().getAsync(token)); - * Promise.all(promises).then(values => console.log("Resolved values: " + values)); - * ``` - * - * Note: Angular 1 users whould use `$q.all()` - * - * @param pathname resolve context's path name (e.g., `to` or `from`) - * - * @returns an array of resolve tokens (keys) - */ - Transition.prototype.getResolveTokens = function (pathname) { - if (pathname === void 0) { pathname = 'to'; } - return new _resolve_resolveContext__WEBPACK_IMPORTED_MODULE_13__.ResolveContext(this._treeChanges[pathname]).getTokens(); - }; - /** - * Dynamically adds a new [[Resolvable]] (i.e., [[StateDeclaration.resolve]]) to this transition. - * - * Allows a transition hook to dynamically add a Resolvable to this Transition. - * - * Use the [[Transition.injector]] to retrieve the resolved data in subsequent hooks ([[UIInjector.get]]). - * - * If a `state` argument is provided, the Resolvable is processed when that state is being entered. - * If no `state` is provided then the root state is used. - * If the given `state` has already been entered, the Resolvable is processed when any child state is entered. - * If no child states will be entered, the Resolvable is processed during the `onFinish` phase of the Transition. - * - * The `state` argument also scopes the resolved data. - * The resolved data is available from the injector for that `state` and any children states. - * - * #### Example: - * ```js - * transitionService.onBefore({}, transition => { - * transition.addResolvable({ - * token: 'myResolve', - * deps: ['MyService'], - * resolveFn: myService => myService.getData() - * }); - * }); - * ``` - * - * @param resolvable a [[ResolvableLiteral]] object (or a [[Resolvable]]) - * @param state the state in the "to path" which should receive the new resolve (otherwise, the root state) - */ - Transition.prototype.addResolvable = function (resolvable, state) { - if (state === void 0) { state = ''; } - resolvable = (0,_common_hof__WEBPACK_IMPORTED_MODULE_5__.is)(_resolve_resolvable__WEBPACK_IMPORTED_MODULE_12__.Resolvable)(resolvable) ? resolvable : new _resolve_resolvable__WEBPACK_IMPORTED_MODULE_12__.Resolvable(resolvable); - var stateName = typeof state === 'string' ? state : state.name; - var topath = this._treeChanges.to; - var targetNode = (0,_common_common__WEBPACK_IMPORTED_MODULE_3__.find)(topath, function (node) { return node.state.name === stateName; }); - var resolveContext = new _resolve_resolveContext__WEBPACK_IMPORTED_MODULE_13__.ResolveContext(topath); - resolveContext.addResolvables([resolvable], targetNode.state); - }; - /** - * Gets the transition from which this transition was redirected. - * - * If the current transition is a redirect, this method returns the transition that was redirected. - * - * #### Example: - * ```js - * let transitionA = $state.go('A').transition - * transitionA.onStart({}, () => $state.target('B')); - * $transitions.onSuccess({ to: 'B' }, (trans) => { - * trans.to().name === 'B'; // true - * trans.redirectedFrom() === transitionA; // true - * }); - * ``` - * - * @returns The previous Transition, or null if this Transition is not the result of a redirection - */ - Transition.prototype.redirectedFrom = function () { - return this._options.redirectedFrom || null; - }; - /** - * Gets the original transition in a redirect chain - * - * A transition might belong to a long chain of multiple redirects. - * This method walks the [[redirectedFrom]] chain back to the original (first) transition in the chain. - * - * #### Example: - * ```js - * // states - * registry.register({ name: 'A', redirectTo: 'B' }); - * registry.register({ name: 'B', redirectTo: 'C' }); - * registry.register({ name: 'C', redirectTo: 'D' }); - * registry.register({ name: 'D' }); - * - * let transitionA = $state.go('A').transition - * - * $transitions.onSuccess({ to: 'D' }, (trans) => { - * trans.to().name === 'D'; // true - * trans.redirectedFrom().to().name === 'C'; // true - * trans.originalTransition() === transitionA; // true - * trans.originalTransition().to().name === 'A'; // true - * }); - * ``` - * - * @returns The original Transition that started a redirect chain - */ - Transition.prototype.originalTransition = function () { - var rf = this.redirectedFrom(); - return (rf && rf.originalTransition()) || this; - }; - /** - * Get the transition options - * - * @returns the options for this Transition. - */ - Transition.prototype.options = function () { - return this._options; - }; - /** - * Gets the states being entered. - * - * @returns an array of states that will be entered during this transition. - */ - Transition.prototype.entering = function () { - return (0,_common_common__WEBPACK_IMPORTED_MODULE_3__.map)(this._treeChanges.entering, (0,_common_hof__WEBPACK_IMPORTED_MODULE_5__.prop)('state')).map(stateSelf); - }; - /** - * Gets the states being exited. - * - * @returns an array of states that will be exited during this transition. - */ - Transition.prototype.exiting = function () { - return (0,_common_common__WEBPACK_IMPORTED_MODULE_3__.map)(this._treeChanges.exiting, (0,_common_hof__WEBPACK_IMPORTED_MODULE_5__.prop)('state')).map(stateSelf).reverse(); - }; - /** - * Gets the states being retained. - * - * @returns an array of states that are already entered from a previous Transition, that will not be - * exited during this Transition - */ - Transition.prototype.retained = function () { - return (0,_common_common__WEBPACK_IMPORTED_MODULE_3__.map)(this._treeChanges.retained, (0,_common_hof__WEBPACK_IMPORTED_MODULE_5__.prop)('state')).map(stateSelf); - }; - /** - * Get the [[ViewConfig]]s associated with this Transition - * - * Each state can define one or more views (template/controller), which are encapsulated as `ViewConfig` objects. - * This method fetches the `ViewConfigs` for a given path in the Transition (e.g., "to" or "entering"). - * - * @param pathname the name of the path to fetch views for: - * (`'to'`, `'from'`, `'entering'`, `'exiting'`, `'retained'`) - * @param state If provided, only returns the `ViewConfig`s for a single state in the path - * - * @returns a list of ViewConfig objects for the given path. - */ - Transition.prototype.views = function (pathname, state) { - if (pathname === void 0) { pathname = 'entering'; } - var path = this._treeChanges[pathname]; - path = !state ? path : path.filter((0,_common_hof__WEBPACK_IMPORTED_MODULE_5__.propEq)('state', state)); - return path.map((0,_common_hof__WEBPACK_IMPORTED_MODULE_5__.prop)('views')).filter(_common_common__WEBPACK_IMPORTED_MODULE_3__.identity).reduce(_common_common__WEBPACK_IMPORTED_MODULE_3__.unnestR, []); - }; - Transition.prototype.treeChanges = function (pathname) { - return pathname ? this._treeChanges[pathname] : this._treeChanges; - }; - /** - * Creates a new transition that is a redirection of the current one. - * - * This transition can be returned from a [[TransitionService]] hook to - * redirect a transition to a new state and/or set of parameters. - * - * @internal - * - * @returns Returns a new [[Transition]] instance. - */ - Transition.prototype.redirect = function (targetState) { - var redirects = 1, trans = this; - // tslint:disable-next-line:no-conditional-assignment - while ((trans = trans.redirectedFrom()) != null) { - if (++redirects > 20) - throw new Error("Too many consecutive Transition redirects (20+)"); - } - var redirectOpts = { redirectedFrom: this, source: 'redirect' }; - // If the original transition was caused by URL sync, then use { location: 'replace' } - // on the new transition (unless the target state explicitly specifies location: false). - // This causes the original url to be replaced with the url for the redirect target - // so the original url disappears from the browser history. - if (this.options().source === 'url' && targetState.options().location !== false) { - redirectOpts.location = 'replace'; - } - var newOptions = (0,_common_common__WEBPACK_IMPORTED_MODULE_3__.extend)({}, this.options(), targetState.options(), redirectOpts); - targetState = targetState.withOptions(newOptions, true); - var newTransition = this.router.transitionService.create(this._treeChanges.from, targetState); - var originalEnteringNodes = this._treeChanges.entering; - var redirectEnteringNodes = newTransition._treeChanges.entering; - // --- Re-use resolve data from original transition --- - // When redirecting from a parent state to a child state where the parent parameter values haven't changed - // (because of the redirect), the resolves fetched by the original transition are still valid in the - // redirected transition. - // - // This allows you to define a redirect on a parent state which depends on an async resolve value. - // You can wait for the resolve, then redirect to a child state based on the result. - // The redirected transition does not have to re-fetch the resolve. - // --------------------------------------------------------- - var nodeIsReloading = function (reloadState) { return function (node) { - return reloadState && node.state.includes[reloadState.name]; - }; }; - // Find any "entering" nodes in the redirect path that match the original path and aren't being reloaded - var matchingEnteringNodes = _path_pathUtils__WEBPACK_IMPORTED_MODULE_10__.PathUtils.matching(redirectEnteringNodes, originalEnteringNodes, _path_pathUtils__WEBPACK_IMPORTED_MODULE_10__.PathUtils.nonDynamicParams).filter((0,_common_hof__WEBPACK_IMPORTED_MODULE_5__.not)(nodeIsReloading(targetState.options().reloadState))); - // Use the existing (possibly pre-resolved) resolvables for the matching entering nodes. - matchingEnteringNodes.forEach(function (node, idx) { - node.resolvables = originalEnteringNodes[idx].resolvables; - }); - return newTransition; - }; - /** @internal If a transition doesn't exit/enter any states, returns any [[Param]] whose value changed */ - Transition.prototype._changedParams = function () { - var tc = this._treeChanges; - /** Return undefined if it's not a "dynamic" transition, for the following reasons */ - // If user explicitly wants a reload - if (this._options.reload) - return undefined; - // If any states are exiting or entering - if (tc.exiting.length || tc.entering.length) - return undefined; - // If to/from path lengths differ - if (tc.to.length !== tc.from.length) - return undefined; - // If the to/from paths are different - var pathsDiffer = (0,_common_common__WEBPACK_IMPORTED_MODULE_3__.arrayTuples)(tc.to, tc.from) - .map(function (tuple) { return tuple[0].state !== tuple[1].state; }) - .reduce(_common_common__WEBPACK_IMPORTED_MODULE_3__.anyTrueR, false); - if (pathsDiffer) - return undefined; - // Find any parameter values that differ - var nodeSchemas = tc.to.map(function (node) { return node.paramSchema; }); - var _a = [tc.to, tc.from].map(function (path) { return path.map(function (x) { return x.paramValues; }); }), toValues = _a[0], fromValues = _a[1]; - var tuples = (0,_common_common__WEBPACK_IMPORTED_MODULE_3__.arrayTuples)(nodeSchemas, toValues, fromValues); - return tuples.map(function (_a) { - var schema = _a[0], toVals = _a[1], fromVals = _a[2]; - return _params_param__WEBPACK_IMPORTED_MODULE_11__.Param.changed(schema, toVals, fromVals); - }).reduce(_common_common__WEBPACK_IMPORTED_MODULE_3__.unnestR, []); - }; - /** - * Returns true if the transition is dynamic. - * - * A transition is dynamic if no states are entered nor exited, but at least one dynamic parameter has changed. - * - * @returns true if the Transition is dynamic - */ - Transition.prototype.dynamic = function () { - var changes = this._changedParams(); - return !changes ? false : changes.map(function (x) { return x.dynamic; }).reduce(_common_common__WEBPACK_IMPORTED_MODULE_3__.anyTrueR, false); - }; - /** - * Returns true if the transition is ignored. - * - * A transition is ignored if no states are entered nor exited, and no parameter values have changed. - * - * @returns true if the Transition is ignored. - */ - Transition.prototype.ignored = function () { - return !!this._ignoredReason(); - }; - /** @internal */ - Transition.prototype._ignoredReason = function () { - var pending = this.router.globals.transition; - var reloadState = this._options.reloadState; - var same = function (pathA, pathB) { - if (pathA.length !== pathB.length) - return false; - var matching = _path_pathUtils__WEBPACK_IMPORTED_MODULE_10__.PathUtils.matching(pathA, pathB); - return pathA.length === matching.filter(function (node) { return !reloadState || !node.state.includes[reloadState.name]; }).length; - }; - var newTC = this.treeChanges(); - var pendTC = pending && pending.treeChanges(); - if (pendTC && same(pendTC.to, newTC.to) && same(pendTC.exiting, newTC.exiting)) - return 'SameAsPending'; - if (newTC.exiting.length === 0 && newTC.entering.length === 0 && same(newTC.from, newTC.to)) - return 'SameAsCurrent'; - }; - /** - * Runs the transition - * - * This method is generally called from the [[StateService.transitionTo]] - * - * @internal - * - * @returns a promise for a successful transition. - */ - Transition.prototype.run = function () { - var _this = this; - var runAllHooks = _transitionHook__WEBPACK_IMPORTED_MODULE_7__.TransitionHook.runAllHooks; - // Gets transition hooks array for the given phase - var getHooksFor = function (phase) { return _this._hookBuilder.buildHooksForPhase(phase); }; - // When the chain is complete, then resolve or reject the deferred - var transitionSuccess = function () { - _common_trace__WEBPACK_IMPORTED_MODULE_0__.trace.traceSuccess(_this.$to(), _this); - _this.success = true; - _this._deferred.resolve(_this.to()); - runAllHooks(getHooksFor(_interface__WEBPACK_IMPORTED_MODULE_6__.TransitionHookPhase.SUCCESS)); - }; - var transitionError = function (reason) { - _common_trace__WEBPACK_IMPORTED_MODULE_0__.trace.traceError(reason, _this); - _this.success = false; - _this._deferred.reject(reason); - _this._error = reason; - runAllHooks(getHooksFor(_interface__WEBPACK_IMPORTED_MODULE_6__.TransitionHookPhase.ERROR)); - }; - var runTransition = function () { - // Wait to build the RUN hook chain until the BEFORE hooks are done - // This allows a BEFORE hook to dynamically add additional RUN hooks via the Transition object. - var allRunHooks = getHooksFor(_interface__WEBPACK_IMPORTED_MODULE_6__.TransitionHookPhase.RUN); - var done = function () { return _common_coreservices__WEBPACK_IMPORTED_MODULE_1__.services.$q.when(undefined); }; - return _transitionHook__WEBPACK_IMPORTED_MODULE_7__.TransitionHook.invokeHooks(allRunHooks, done); - }; - var startTransition = function () { - var globals = _this.router.globals; - globals.lastStartedTransitionId = _this.$id; - globals.transition = _this; - globals.transitionHistory.enqueue(_this); - _common_trace__WEBPACK_IMPORTED_MODULE_0__.trace.traceTransitionStart(_this); - return _common_coreservices__WEBPACK_IMPORTED_MODULE_1__.services.$q.when(undefined); - }; - var allBeforeHooks = getHooksFor(_interface__WEBPACK_IMPORTED_MODULE_6__.TransitionHookPhase.BEFORE); - _transitionHook__WEBPACK_IMPORTED_MODULE_7__.TransitionHook.invokeHooks(allBeforeHooks, startTransition) - .then(runTransition) - .then(transitionSuccess, transitionError); - return this.promise; - }; - /** - * Checks if the Transition is valid - * - * @returns true if the Transition is valid - */ - Transition.prototype.valid = function () { - return !this.error() || this.success !== undefined; - }; - /** - * Aborts this transition - * - * Imperative API to abort a Transition. - * This only applies to Transitions that are not yet complete. - */ - Transition.prototype.abort = function () { - // Do not set flag if the transition is already complete - if ((0,_common_predicates__WEBPACK_IMPORTED_MODULE_4__.isUndefined)(this.success)) { - this._aborted = true; - } - }; - /** - * The Transition error reason. - * - * If the transition is invalid (and could not be run), returns the reason the transition is invalid. - * If the transition was valid and ran, but was not successful, returns the reason the transition failed. - * - * @returns a transition rejection explaining why the transition is invalid, or the reason the transition failed. - */ - Transition.prototype.error = function () { - var state = this.$to(); - if (state.self.abstract) { - return _rejectFactory__WEBPACK_IMPORTED_MODULE_14__.Rejection.invalid("Cannot transition to abstract state '" + state.name + "'"); - } - var paramDefs = state.parameters(); - var values = this.params(); - var invalidParams = paramDefs.filter(function (param) { return !param.validates(values[param.id]); }); - if (invalidParams.length) { - var invalidValues = invalidParams.map(function (param) { return "[" + param.id + ":" + (0,_common_strings__WEBPACK_IMPORTED_MODULE_2__.stringify)(values[param.id]) + "]"; }).join(', '); - var detail = "The following parameter values are not valid for state '" + state.name + "': " + invalidValues; - return _rejectFactory__WEBPACK_IMPORTED_MODULE_14__.Rejection.invalid(detail); - } - if (this.success === false) - return this._error; - }; - /** - * A string representation of the Transition - * - * @returns A string representation of the Transition - */ - Transition.prototype.toString = function () { - var fromStateOrName = this.from(); - var toStateOrName = this.to(); - var avoidEmptyHash = function (params) { - return params['#'] !== null && params['#'] !== undefined ? params : (0,_common_common__WEBPACK_IMPORTED_MODULE_3__.omit)(params, ['#']); - }; - // (X) means the to state is invalid. - var id = this.$id, from = (0,_common_predicates__WEBPACK_IMPORTED_MODULE_4__.isObject)(fromStateOrName) ? fromStateOrName.name : fromStateOrName, fromParams = (0,_common_strings__WEBPACK_IMPORTED_MODULE_2__.stringify)(avoidEmptyHash(this._treeChanges.from.map((0,_common_hof__WEBPACK_IMPORTED_MODULE_5__.prop)('paramValues')).reduce(_common_common__WEBPACK_IMPORTED_MODULE_3__.mergeR, {}))), toValid = this.valid() ? '' : '(X) ', to = (0,_common_predicates__WEBPACK_IMPORTED_MODULE_4__.isObject)(toStateOrName) ? toStateOrName.name : toStateOrName, toParams = (0,_common_strings__WEBPACK_IMPORTED_MODULE_2__.stringify)(avoidEmptyHash(this.params())); - return "Transition#" + id + "( '" + from + "'" + fromParams + " -> " + toValid + "'" + to + "'" + toParams + " )"; - }; - /** @internal */ - Transition.diToken = Transition; - return Transition; -}()); - -//# sourceMappingURL=transition.js.map - -/***/ }), - -/***/ "./node_modules/@uirouter/core/lib-esm/transition/transitionEventType.js": -/*!*******************************************************************************!*\ - !*** ./node_modules/@uirouter/core/lib-esm/transition/transitionEventType.js ***! - \*******************************************************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "TransitionEventType": () => (/* binding */ TransitionEventType) -/* harmony export */ }); -/* harmony import */ var _transitionHook__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./transitionHook */ "./node_modules/@uirouter/core/lib-esm/transition/transitionHook.js"); - -/** - * This class defines a type of hook, such as `onBefore` or `onEnter`. - * Plugins can define custom hook types, such as sticky states does for `onInactive`. - */ -var TransitionEventType = /** @class */ (function () { - /* tslint:disable:no-inferrable-types */ - function TransitionEventType(name, hookPhase, hookOrder, criteriaMatchPath, reverseSort, getResultHandler, getErrorHandler, synchronous) { - if (reverseSort === void 0) { reverseSort = false; } - if (getResultHandler === void 0) { getResultHandler = _transitionHook__WEBPACK_IMPORTED_MODULE_0__.TransitionHook.HANDLE_RESULT; } - if (getErrorHandler === void 0) { getErrorHandler = _transitionHook__WEBPACK_IMPORTED_MODULE_0__.TransitionHook.REJECT_ERROR; } - if (synchronous === void 0) { synchronous = false; } - this.name = name; - this.hookPhase = hookPhase; - this.hookOrder = hookOrder; - this.criteriaMatchPath = criteriaMatchPath; - this.reverseSort = reverseSort; - this.getResultHandler = getResultHandler; - this.getErrorHandler = getErrorHandler; - this.synchronous = synchronous; - } - return TransitionEventType; -}()); - -//# sourceMappingURL=transitionEventType.js.map - -/***/ }), - -/***/ "./node_modules/@uirouter/core/lib-esm/transition/transitionHook.js": -/*!**************************************************************************!*\ - !*** ./node_modules/@uirouter/core/lib-esm/transition/transitionHook.js ***! - \**************************************************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "TransitionHook": () => (/* binding */ TransitionHook) -/* harmony export */ }); -/* harmony import */ var _interface__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./interface */ "./node_modules/@uirouter/core/lib-esm/transition/interface.js"); -/* harmony import */ var _common_common__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../common/common */ "./node_modules/@uirouter/core/lib-esm/common/common.js"); -/* harmony import */ var _common_strings__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../common/strings */ "./node_modules/@uirouter/core/lib-esm/common/strings.js"); -/* harmony import */ var _common_predicates__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../common/predicates */ "./node_modules/@uirouter/core/lib-esm/common/predicates.js"); -/* harmony import */ var _common_hof__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../common/hof */ "./node_modules/@uirouter/core/lib-esm/common/hof.js"); -/* harmony import */ var _common_trace__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../common/trace */ "./node_modules/@uirouter/core/lib-esm/common/trace.js"); -/* harmony import */ var _common_coreservices__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../common/coreservices */ "./node_modules/@uirouter/core/lib-esm/common/coreservices.js"); -/* harmony import */ var _rejectFactory__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./rejectFactory */ "./node_modules/@uirouter/core/lib-esm/transition/rejectFactory.js"); -/* harmony import */ var _state_targetState__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../state/targetState */ "./node_modules/@uirouter/core/lib-esm/state/targetState.js"); - - - - - - - - - -var defaultOptions = { - current: _common_common__WEBPACK_IMPORTED_MODULE_1__.noop, - transition: null, - traceData: {}, - bind: null, -}; -var TransitionHook = /** @class */ (function () { - function TransitionHook(transition, stateContext, registeredHook, options) { - var _this = this; - this.transition = transition; - this.stateContext = stateContext; - this.registeredHook = registeredHook; - this.options = options; - this.isSuperseded = function () { return _this.type.hookPhase === _interface__WEBPACK_IMPORTED_MODULE_0__.TransitionHookPhase.RUN && !_this.options.transition.isActive(); }; - this.options = (0,_common_common__WEBPACK_IMPORTED_MODULE_1__.defaults)(options, defaultOptions); - this.type = registeredHook.eventType; - } - /** - * Chains together an array of TransitionHooks. - * - * Given a list of [[TransitionHook]] objects, chains them together. - * Each hook is invoked after the previous one completes. - * - * #### Example: - * ```js - * var hooks: TransitionHook[] = getHooks(); - * let promise: Promise = TransitionHook.chain(hooks); - * - * promise.then(handleSuccess, handleError); - * ``` - * - * @param hooks the list of hooks to chain together - * @param waitFor if provided, the chain is `.then()`'ed off this promise - * @returns a `Promise` for sequentially invoking the hooks (in order) - */ - TransitionHook.chain = function (hooks, waitFor) { - // Chain the next hook off the previous - var createHookChainR = function (prev, nextHook) { return prev.then(function () { return nextHook.invokeHook(); }); }; - return hooks.reduce(createHookChainR, waitFor || _common_coreservices__WEBPACK_IMPORTED_MODULE_6__.services.$q.when()); - }; - /** - * Invokes all the provided TransitionHooks, in order. - * Each hook's return value is checked. - * If any hook returns a promise, then the rest of the hooks are chained off that promise, and the promise is returned. - * If no hook returns a promise, then all hooks are processed synchronously. - * - * @param hooks the list of TransitionHooks to invoke - * @param doneCallback a callback that is invoked after all the hooks have successfully completed - * - * @returns a promise for the async result, or the result of the callback - */ - TransitionHook.invokeHooks = function (hooks, doneCallback) { - for (var idx = 0; idx < hooks.length; idx++) { - var hookResult = hooks[idx].invokeHook(); - if ((0,_common_predicates__WEBPACK_IMPORTED_MODULE_3__.isPromise)(hookResult)) { - var remainingHooks = hooks.slice(idx + 1); - return TransitionHook.chain(remainingHooks, hookResult).then(doneCallback); - } - } - return doneCallback(); - }; - /** - * Run all TransitionHooks, ignoring their return value. - */ - TransitionHook.runAllHooks = function (hooks) { - hooks.forEach(function (hook) { return hook.invokeHook(); }); - }; - TransitionHook.prototype.logError = function (err) { - this.transition.router.stateService.defaultErrorHandler()(err); - }; - TransitionHook.prototype.invokeHook = function () { - var _this = this; - var hook = this.registeredHook; - if (hook._deregistered) - return; - var notCurrent = this.getNotCurrentRejection(); - if (notCurrent) - return notCurrent; - var options = this.options; - _common_trace__WEBPACK_IMPORTED_MODULE_5__.trace.traceHookInvocation(this, this.transition, options); - var invokeCallback = function () { return hook.callback.call(options.bind, _this.transition, _this.stateContext); }; - var normalizeErr = function (err) { return _rejectFactory__WEBPACK_IMPORTED_MODULE_7__.Rejection.normalize(err).toPromise(); }; - var handleError = function (err) { return hook.eventType.getErrorHandler(_this)(err); }; - var handleResult = function (result) { return hook.eventType.getResultHandler(_this)(result); }; - try { - var result = invokeCallback(); - if (!this.type.synchronous && (0,_common_predicates__WEBPACK_IMPORTED_MODULE_3__.isPromise)(result)) { - return result.catch(normalizeErr).then(handleResult, handleError); - } - else { - return handleResult(result); - } - } - catch (err) { - // If callback throws (synchronously) - return handleError(_rejectFactory__WEBPACK_IMPORTED_MODULE_7__.Rejection.normalize(err)); - } - finally { - if (hook.invokeLimit && ++hook.invokeCount >= hook.invokeLimit) { - hook.deregister(); - } - } - }; - /** - * This method handles the return value of a Transition Hook. - * - * A hook can return false (cancel), a TargetState (redirect), - * or a promise (which may later resolve to false or a redirect) - * - * This also handles "transition superseded" -- when a new transition - * was started while the hook was still running - */ - TransitionHook.prototype.handleHookResult = function (result) { - var _this = this; - var notCurrent = this.getNotCurrentRejection(); - if (notCurrent) - return notCurrent; - // Hook returned a promise - if ((0,_common_predicates__WEBPACK_IMPORTED_MODULE_3__.isPromise)(result)) { - // Wait for the promise, then reprocess with the resulting value - return result.then(function (val) { return _this.handleHookResult(val); }); - } - _common_trace__WEBPACK_IMPORTED_MODULE_5__.trace.traceHookResult(result, this.transition, this.options); - // Hook returned false - if (result === false) { - // Abort this Transition - return _rejectFactory__WEBPACK_IMPORTED_MODULE_7__.Rejection.aborted('Hook aborted transition').toPromise(); - } - var isTargetState = (0,_common_hof__WEBPACK_IMPORTED_MODULE_4__.is)(_state_targetState__WEBPACK_IMPORTED_MODULE_8__.TargetState); - // hook returned a TargetState - if (isTargetState(result)) { - // Halt the current Transition and redirect (a new Transition) to the TargetState. - return _rejectFactory__WEBPACK_IMPORTED_MODULE_7__.Rejection.redirected(result).toPromise(); - } - }; - /** - * Return a Rejection promise if the transition is no longer current due - * to a stopped router (disposed), or a new transition has started and superseded this one. - */ - TransitionHook.prototype.getNotCurrentRejection = function () { - var router = this.transition.router; - // The router is stopped - if (router._disposed) { - return _rejectFactory__WEBPACK_IMPORTED_MODULE_7__.Rejection.aborted("UIRouter instance #" + router.$id + " has been stopped (disposed)").toPromise(); - } - if (this.transition._aborted) { - return _rejectFactory__WEBPACK_IMPORTED_MODULE_7__.Rejection.aborted().toPromise(); - } - // This transition is no longer current. - // Another transition started while this hook was still running. - if (this.isSuperseded()) { - // Abort this transition - return _rejectFactory__WEBPACK_IMPORTED_MODULE_7__.Rejection.superseded(this.options.current()).toPromise(); - } - }; - TransitionHook.prototype.toString = function () { - var _a = this, options = _a.options, registeredHook = _a.registeredHook; - var event = (0,_common_hof__WEBPACK_IMPORTED_MODULE_4__.parse)('traceData.hookType')(options) || 'internal', context = (0,_common_hof__WEBPACK_IMPORTED_MODULE_4__.parse)('traceData.context.state.name')(options) || (0,_common_hof__WEBPACK_IMPORTED_MODULE_4__.parse)('traceData.context')(options) || 'unknown', name = (0,_common_strings__WEBPACK_IMPORTED_MODULE_2__.fnToString)(registeredHook.callback); - return event + " context: " + context + ", " + (0,_common_strings__WEBPACK_IMPORTED_MODULE_2__.maxLength)(200, name); - }; - /** - * These GetResultHandler(s) are used by [[invokeHook]] below - * Each HookType chooses a GetResultHandler (See: [[TransitionService._defineCoreEvents]]) - */ - TransitionHook.HANDLE_RESULT = function (hook) { return function (result) { - return hook.handleHookResult(result); - }; }; - /** - * If the result is a promise rejection, log it. - * Otherwise, ignore the result. - */ - TransitionHook.LOG_REJECTED_RESULT = function (hook) { return function (result) { - (0,_common_predicates__WEBPACK_IMPORTED_MODULE_3__.isPromise)(result) && result.catch(function (err) { return hook.logError(_rejectFactory__WEBPACK_IMPORTED_MODULE_7__.Rejection.normalize(err)); }); - return undefined; - }; }; - /** - * These GetErrorHandler(s) are used by [[invokeHook]] below - * Each HookType chooses a GetErrorHandler (See: [[TransitionService._defineCoreEvents]]) - */ - TransitionHook.LOG_ERROR = function (hook) { return function (error) { return hook.logError(error); }; }; - TransitionHook.REJECT_ERROR = function (hook) { return function (error) { return (0,_common_common__WEBPACK_IMPORTED_MODULE_1__.silentRejection)(error); }; }; - TransitionHook.THROW_ERROR = function (hook) { return function (error) { - throw error; - }; }; - return TransitionHook; -}()); - -//# sourceMappingURL=transitionHook.js.map - -/***/ }), - -/***/ "./node_modules/@uirouter/core/lib-esm/transition/transitionService.js": -/*!*****************************************************************************!*\ - !*** ./node_modules/@uirouter/core/lib-esm/transition/transitionService.js ***! - \*****************************************************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "defaultTransOpts": () => (/* binding */ defaultTransOpts), -/* harmony export */ "TransitionService": () => (/* binding */ TransitionService) -/* harmony export */ }); -/* harmony import */ var _interface__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./interface */ "./node_modules/@uirouter/core/lib-esm/transition/interface.js"); -/* harmony import */ var _transition__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./transition */ "./node_modules/@uirouter/core/lib-esm/transition/transition.js"); -/* harmony import */ var _hookRegistry__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./hookRegistry */ "./node_modules/@uirouter/core/lib-esm/transition/hookRegistry.js"); -/* harmony import */ var _hooks_coreResolvables__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../hooks/coreResolvables */ "./node_modules/@uirouter/core/lib-esm/hooks/coreResolvables.js"); -/* harmony import */ var _hooks_redirectTo__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../hooks/redirectTo */ "./node_modules/@uirouter/core/lib-esm/hooks/redirectTo.js"); -/* harmony import */ var _hooks_onEnterExitRetain__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../hooks/onEnterExitRetain */ "./node_modules/@uirouter/core/lib-esm/hooks/onEnterExitRetain.js"); -/* harmony import */ var _hooks_resolve__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../hooks/resolve */ "./node_modules/@uirouter/core/lib-esm/hooks/resolve.js"); -/* harmony import */ var _hooks_views__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../hooks/views */ "./node_modules/@uirouter/core/lib-esm/hooks/views.js"); -/* harmony import */ var _hooks_updateGlobals__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../hooks/updateGlobals */ "./node_modules/@uirouter/core/lib-esm/hooks/updateGlobals.js"); -/* harmony import */ var _hooks_url__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../hooks/url */ "./node_modules/@uirouter/core/lib-esm/hooks/url.js"); -/* harmony import */ var _hooks_lazyLoad__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../hooks/lazyLoad */ "./node_modules/@uirouter/core/lib-esm/hooks/lazyLoad.js"); -/* harmony import */ var _transitionEventType__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./transitionEventType */ "./node_modules/@uirouter/core/lib-esm/transition/transitionEventType.js"); -/* harmony import */ var _transitionHook__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./transitionHook */ "./node_modules/@uirouter/core/lib-esm/transition/transitionHook.js"); -/* harmony import */ var _common_predicates__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../common/predicates */ "./node_modules/@uirouter/core/lib-esm/common/predicates.js"); -/* harmony import */ var _common_common__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../common/common */ "./node_modules/@uirouter/core/lib-esm/common/common.js"); -/* harmony import */ var _common_hof__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../common/hof */ "./node_modules/@uirouter/core/lib-esm/common/hof.js"); -/* harmony import */ var _hooks_ignoredTransition__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../hooks/ignoredTransition */ "./node_modules/@uirouter/core/lib-esm/hooks/ignoredTransition.js"); -/* harmony import */ var _hooks_invalidTransition__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../hooks/invalidTransition */ "./node_modules/@uirouter/core/lib-esm/hooks/invalidTransition.js"); - - - - - - - - - - - - - - - - - - -/** - * The default [[Transition]] options. - * - * Include this object when applying custom defaults: - * let reloadOpts = { reload: true, notify: true } - * let options = defaults(theirOpts, customDefaults, defaultOptions); - */ -var defaultTransOpts = { - location: true, - relative: null, - inherit: false, - notify: true, - reload: false, - supercede: true, - custom: {}, - current: function () { return null; }, - source: 'unknown', -}; -/** - * This class provides services related to Transitions. - * - * - Most importantly, it allows global Transition Hooks to be registered. - * - It allows the default transition error handler to be set. - * - It also has a factory function for creating new [[Transition]] objects, (used internally by the [[StateService]]). - * - * At bootstrap, [[UIRouter]] creates a single instance (singleton) of this class. - * - * This API is located at `router.transitionService` ([[UIRouter.transitionService]]) - */ -var TransitionService = /** @class */ (function () { - /** @internal */ - function TransitionService(_router) { - /** @internal */ - this._transitionCount = 0; - /** The transition hook types, such as `onEnter`, `onStart`, etc */ - this._eventTypes = []; - /** @internal The registered transition hooks */ - this._registeredHooks = {}; - /** The paths on a criteria object */ - this._criteriaPaths = {}; - this._router = _router; - this.$view = _router.viewService; - this._deregisterHookFns = {}; - this._pluginapi = ((0,_common_common__WEBPACK_IMPORTED_MODULE_14__.createProxyFunctions)((0,_common_hof__WEBPACK_IMPORTED_MODULE_15__.val)(this), {}, (0,_common_hof__WEBPACK_IMPORTED_MODULE_15__.val)(this), [ - '_definePathType', - '_defineEvent', - '_getPathTypes', - '_getEvents', - 'getHooks', - ])); - this._defineCorePaths(); - this._defineCoreEvents(); - this._registerCoreTransitionHooks(); - _router.globals.successfulTransitions.onEvict(_hooks_coreResolvables__WEBPACK_IMPORTED_MODULE_3__.treeChangesCleanup); - } - /** - * Registers a [[TransitionHookFn]], called *while a transition is being constructed*. - * - * Registers a transition lifecycle hook, which is invoked during transition construction. - * - * This low level hook should only be used by plugins. - * This can be a useful time for plugins to add resolves or mutate the transition as needed. - * The Sticky States plugin uses this hook to modify the treechanges. - * - * ### Lifecycle - * - * `onCreate` hooks are invoked *while a transition is being constructed*. - * - * ### Return value - * - * The hook's return value is ignored - * - * @internal - * @param criteria defines which Transitions the Hook should be invoked for. - * @param callback the hook function which will be invoked. - * @param options the registration options - * @returns a function which deregisters the hook. - */ - TransitionService.prototype.onCreate = function (criteria, callback, options) { - return; - }; - /** @inheritdoc */ - TransitionService.prototype.onBefore = function (criteria, callback, options) { - return; - }; - /** @inheritdoc */ - TransitionService.prototype.onStart = function (criteria, callback, options) { - return; - }; - /** @inheritdoc */ - TransitionService.prototype.onExit = function (criteria, callback, options) { - return; - }; - /** @inheritdoc */ - TransitionService.prototype.onRetain = function (criteria, callback, options) { - return; - }; - /** @inheritdoc */ - TransitionService.prototype.onEnter = function (criteria, callback, options) { - return; - }; - /** @inheritdoc */ - TransitionService.prototype.onFinish = function (criteria, callback, options) { - return; - }; - /** @inheritdoc */ - TransitionService.prototype.onSuccess = function (criteria, callback, options) { - return; - }; - /** @inheritdoc */ - TransitionService.prototype.onError = function (criteria, callback, options) { - return; - }; - /** - * dispose - * @internal - */ - TransitionService.prototype.dispose = function (router) { - (0,_common_common__WEBPACK_IMPORTED_MODULE_14__.values)(this._registeredHooks).forEach(function (hooksArray) { - return hooksArray.forEach(function (hook) { - hook._deregistered = true; - (0,_common_common__WEBPACK_IMPORTED_MODULE_14__.removeFrom)(hooksArray, hook); - }); - }); - }; - /** - * Creates a new [[Transition]] object - * - * This is a factory function for creating new Transition objects. - * It is used internally by the [[StateService]] and should generally not be called by application code. - * - * @internal - * @param fromPath the path to the current state (the from state) - * @param targetState the target state (destination) - * @returns a Transition - */ - TransitionService.prototype.create = function (fromPath, targetState) { - return new _transition__WEBPACK_IMPORTED_MODULE_1__.Transition(fromPath, targetState, this._router); - }; - /** @internal */ - TransitionService.prototype._defineCoreEvents = function () { - var Phase = _interface__WEBPACK_IMPORTED_MODULE_0__.TransitionHookPhase; - var TH = _transitionHook__WEBPACK_IMPORTED_MODULE_12__.TransitionHook; - var paths = this._criteriaPaths; - var NORMAL_SORT = false, REVERSE_SORT = true; - var SYNCHRONOUS = true; - this._defineEvent('onCreate', Phase.CREATE, 0, paths.to, NORMAL_SORT, TH.LOG_REJECTED_RESULT, TH.THROW_ERROR, SYNCHRONOUS); - this._defineEvent('onBefore', Phase.BEFORE, 0, paths.to); - this._defineEvent('onStart', Phase.RUN, 0, paths.to); - this._defineEvent('onExit', Phase.RUN, 100, paths.exiting, REVERSE_SORT); - this._defineEvent('onRetain', Phase.RUN, 200, paths.retained); - this._defineEvent('onEnter', Phase.RUN, 300, paths.entering); - this._defineEvent('onFinish', Phase.RUN, 400, paths.to); - this._defineEvent('onSuccess', Phase.SUCCESS, 0, paths.to, NORMAL_SORT, TH.LOG_REJECTED_RESULT, TH.LOG_ERROR, SYNCHRONOUS); - this._defineEvent('onError', Phase.ERROR, 0, paths.to, NORMAL_SORT, TH.LOG_REJECTED_RESULT, TH.LOG_ERROR, SYNCHRONOUS); - }; - /** @internal */ - TransitionService.prototype._defineCorePaths = function () { - var STATE = _interface__WEBPACK_IMPORTED_MODULE_0__.TransitionHookScope.STATE, TRANSITION = _interface__WEBPACK_IMPORTED_MODULE_0__.TransitionHookScope.TRANSITION; - this._definePathType('to', TRANSITION); - this._definePathType('from', TRANSITION); - this._definePathType('exiting', STATE); - this._definePathType('retained', STATE); - this._definePathType('entering', STATE); - }; - /** @internal */ - TransitionService.prototype._defineEvent = function (name, hookPhase, hookOrder, criteriaMatchPath, reverseSort, getResultHandler, getErrorHandler, synchronous) { - if (reverseSort === void 0) { reverseSort = false; } - if (getResultHandler === void 0) { getResultHandler = _transitionHook__WEBPACK_IMPORTED_MODULE_12__.TransitionHook.HANDLE_RESULT; } - if (getErrorHandler === void 0) { getErrorHandler = _transitionHook__WEBPACK_IMPORTED_MODULE_12__.TransitionHook.REJECT_ERROR; } - if (synchronous === void 0) { synchronous = false; } - var eventType = new _transitionEventType__WEBPACK_IMPORTED_MODULE_11__.TransitionEventType(name, hookPhase, hookOrder, criteriaMatchPath, reverseSort, getResultHandler, getErrorHandler, synchronous); - this._eventTypes.push(eventType); - (0,_hookRegistry__WEBPACK_IMPORTED_MODULE_2__.makeEvent)(this, this, eventType); - }; - /** @internal */ - TransitionService.prototype._getEvents = function (phase) { - var transitionHookTypes = (0,_common_predicates__WEBPACK_IMPORTED_MODULE_13__.isDefined)(phase) - ? this._eventTypes.filter(function (type) { return type.hookPhase === phase; }) - : this._eventTypes.slice(); - return transitionHookTypes.sort(function (l, r) { - var cmpByPhase = l.hookPhase - r.hookPhase; - return cmpByPhase === 0 ? l.hookOrder - r.hookOrder : cmpByPhase; - }); - }; - /** - * Adds a Path to be used as a criterion against a TreeChanges path - * - * For example: the `exiting` path in [[HookMatchCriteria]] is a STATE scoped path. - * It was defined by calling `defineTreeChangesCriterion('exiting', TransitionHookScope.STATE)` - * Each state in the exiting path is checked against the criteria and returned as part of the match. - * - * Another example: the `to` path in [[HookMatchCriteria]] is a TRANSITION scoped path. - * It was defined by calling `defineTreeChangesCriterion('to', TransitionHookScope.TRANSITION)` - * Only the tail of the `to` path is checked against the criteria and returned as part of the match. - * - * @internal - */ - TransitionService.prototype._definePathType = function (name, hookScope) { - this._criteriaPaths[name] = { name: name, scope: hookScope }; - }; - /** @internal */ - // tslint:disable-next-line - TransitionService.prototype._getPathTypes = function () { - return this._criteriaPaths; - }; - /** @internal */ - TransitionService.prototype.getHooks = function (hookName) { - return this._registeredHooks[hookName]; - }; - /** @internal */ - TransitionService.prototype._registerCoreTransitionHooks = function () { - var fns = this._deregisterHookFns; - fns.addCoreResolves = (0,_hooks_coreResolvables__WEBPACK_IMPORTED_MODULE_3__.registerAddCoreResolvables)(this); - fns.ignored = (0,_hooks_ignoredTransition__WEBPACK_IMPORTED_MODULE_16__.registerIgnoredTransitionHook)(this); - fns.invalid = (0,_hooks_invalidTransition__WEBPACK_IMPORTED_MODULE_17__.registerInvalidTransitionHook)(this); - // Wire up redirectTo hook - fns.redirectTo = (0,_hooks_redirectTo__WEBPACK_IMPORTED_MODULE_4__.registerRedirectToHook)(this); - // Wire up onExit/Retain/Enter state hooks - fns.onExit = (0,_hooks_onEnterExitRetain__WEBPACK_IMPORTED_MODULE_5__.registerOnExitHook)(this); - fns.onRetain = (0,_hooks_onEnterExitRetain__WEBPACK_IMPORTED_MODULE_5__.registerOnRetainHook)(this); - fns.onEnter = (0,_hooks_onEnterExitRetain__WEBPACK_IMPORTED_MODULE_5__.registerOnEnterHook)(this); - // Wire up Resolve hooks - fns.eagerResolve = (0,_hooks_resolve__WEBPACK_IMPORTED_MODULE_6__.registerEagerResolvePath)(this); - fns.lazyResolve = (0,_hooks_resolve__WEBPACK_IMPORTED_MODULE_6__.registerLazyResolveState)(this); - fns.resolveAll = (0,_hooks_resolve__WEBPACK_IMPORTED_MODULE_6__.registerResolveRemaining)(this); - // Wire up the View management hooks - fns.loadViews = (0,_hooks_views__WEBPACK_IMPORTED_MODULE_7__.registerLoadEnteringViews)(this); - fns.activateViews = (0,_hooks_views__WEBPACK_IMPORTED_MODULE_7__.registerActivateViews)(this); - // Updates global state after a transition - fns.updateGlobals = (0,_hooks_updateGlobals__WEBPACK_IMPORTED_MODULE_8__.registerUpdateGlobalState)(this); - // After globals.current is updated at priority: 10000 - fns.updateUrl = (0,_hooks_url__WEBPACK_IMPORTED_MODULE_9__.registerUpdateUrl)(this); - // Lazy load state trees - fns.lazyLoad = (0,_hooks_lazyLoad__WEBPACK_IMPORTED_MODULE_10__.registerLazyLoadHook)(this); - }; - return TransitionService; -}()); - -//# sourceMappingURL=transitionService.js.map - -/***/ }), - -/***/ "./node_modules/@uirouter/core/lib-esm/url/index.js": -/*!**********************************************************!*\ - !*** ./node_modules/@uirouter/core/lib-esm/url/index.js ***! - \**********************************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "UrlMatcher": () => (/* reexport safe */ _urlMatcher__WEBPACK_IMPORTED_MODULE_1__.UrlMatcher), -/* harmony export */ "ParamFactory": () => (/* reexport safe */ _urlMatcherFactory__WEBPACK_IMPORTED_MODULE_2__.ParamFactory), -/* harmony export */ "UrlMatcherFactory": () => (/* reexport safe */ _urlMatcherFactory__WEBPACK_IMPORTED_MODULE_2__.UrlMatcherFactory), -/* harmony export */ "UrlRouter": () => (/* reexport safe */ _urlRouter__WEBPACK_IMPORTED_MODULE_3__.UrlRouter), -/* harmony export */ "BaseUrlRule": () => (/* reexport safe */ _urlRule__WEBPACK_IMPORTED_MODULE_4__.BaseUrlRule), -/* harmony export */ "UrlRuleFactory": () => (/* reexport safe */ _urlRule__WEBPACK_IMPORTED_MODULE_4__.UrlRuleFactory), -/* harmony export */ "UrlService": () => (/* reexport safe */ _urlService__WEBPACK_IMPORTED_MODULE_5__.UrlService), -/* harmony export */ "UrlRules": () => (/* reexport safe */ _urlRules__WEBPACK_IMPORTED_MODULE_6__.UrlRules), -/* harmony export */ "UrlConfig": () => (/* reexport safe */ _urlConfig__WEBPACK_IMPORTED_MODULE_7__.UrlConfig) -/* harmony export */ }); -/* harmony import */ var _interface__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./interface */ "./node_modules/@uirouter/core/lib-esm/url/interface.js"); -/* harmony import */ var _interface__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_interface__WEBPACK_IMPORTED_MODULE_0__); -/* harmony reexport (unknown) */ var __WEBPACK_REEXPORT_OBJECT__ = {}; -/* harmony reexport (unknown) */ for(const __WEBPACK_IMPORT_KEY__ in _interface__WEBPACK_IMPORTED_MODULE_0__) if(["default","UrlRules","UrlConfig"].indexOf(__WEBPACK_IMPORT_KEY__) < 0) __WEBPACK_REEXPORT_OBJECT__[__WEBPACK_IMPORT_KEY__] = () => _interface__WEBPACK_IMPORTED_MODULE_0__[__WEBPACK_IMPORT_KEY__] -/* harmony reexport (unknown) */ __webpack_require__.d(__webpack_exports__, __WEBPACK_REEXPORT_OBJECT__); -/* harmony import */ var _urlMatcher__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./urlMatcher */ "./node_modules/@uirouter/core/lib-esm/url/urlMatcher.js"); -/* harmony import */ var _urlMatcherFactory__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./urlMatcherFactory */ "./node_modules/@uirouter/core/lib-esm/url/urlMatcherFactory.js"); -/* harmony import */ var _urlRouter__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./urlRouter */ "./node_modules/@uirouter/core/lib-esm/url/urlRouter.js"); -/* harmony import */ var _urlRule__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./urlRule */ "./node_modules/@uirouter/core/lib-esm/url/urlRule.js"); -/* harmony import */ var _urlService__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./urlService */ "./node_modules/@uirouter/core/lib-esm/url/urlService.js"); -/* harmony import */ var _urlRules__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./urlRules */ "./node_modules/@uirouter/core/lib-esm/url/urlRules.js"); -/* harmony import */ var _urlConfig__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./urlConfig */ "./node_modules/@uirouter/core/lib-esm/url/urlConfig.js"); - - - - - - - - -//# sourceMappingURL=index.js.map - -/***/ }), - -/***/ "./node_modules/@uirouter/core/lib-esm/url/interface.js": -/*!**************************************************************!*\ - !*** ./node_modules/@uirouter/core/lib-esm/url/interface.js ***! - \**************************************************************/ -/***/ (() => { - -//# sourceMappingURL=interface.js.map - -/***/ }), - -/***/ "./node_modules/@uirouter/core/lib-esm/url/urlConfig.js": -/*!**************************************************************!*\ - !*** ./node_modules/@uirouter/core/lib-esm/url/urlConfig.js ***! - \**************************************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "UrlConfig": () => (/* binding */ UrlConfig) -/* harmony export */ }); -/* harmony import */ var _params__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../params */ "./node_modules/@uirouter/core/lib-esm/params/index.js"); -/* harmony import */ var _common__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../common */ "./node_modules/@uirouter/core/lib-esm/common/index.js"); - - -/** - * An API to customize the URL behavior and retrieve URL configuration - * - * This API is used to customize the behavior of the URL. - * This includes optional trailing slashes ([[strictMode]]), case sensitivity ([[caseInsensitive]]), - * and custom parameter encoding (custom [[type]]). - * - * It also has information about the location (url) configuration such as [[port]] and [[baseHref]]. - * This information can be used to build absolute URLs, such as - * `https://example.com:443/basepath/state/substate?param1=a#hashvalue`; - * - * This API is found at `router.urlService.config` (see: [[UIRouter.urlService]], [[URLService.config]]) - */ -var UrlConfig = /** @class */ (function () { - /** @internal */ function UrlConfig(/** @internal */ router) { - var _this = this; - this.router = router; - /** @internal */ this.paramTypes = new _params__WEBPACK_IMPORTED_MODULE_0__.ParamTypes(); - /** @internal */ this._decodeParams = true; - /** @internal */ this._isCaseInsensitive = false; - /** @internal */ this._isStrictMode = true; - /** @internal */ this._defaultSquashPolicy = false; - /** @internal */ this.dispose = function () { return _this.paramTypes.dispose(); }; - // Delegate these calls to the current LocationConfig implementation - /** - * Gets the base Href, e.g., `http://localhost/approot/` - * - * @return the application's base href - */ - this.baseHref = function () { return _this.router.locationConfig.baseHref(); }; - /** - * Gets or sets the hashPrefix - * - * This only applies when not running in [[html5Mode]] (pushstate mode) - * - * If the current url is `http://localhost/app#!/uirouter/path/#anchor`, it returns `!` which is the prefix for the "hashbang" portion. - * - * @return the hash prefix - */ - this.hashPrefix = function (newprefix) { return _this.router.locationConfig.hashPrefix(newprefix); }; - /** - * Gets the host, e.g., `localhost` - * - * @return the protocol - */ - this.host = function () { return _this.router.locationConfig.host(); }; - /** - * Returns true when running in pushstate mode - * - * @return true when running in html5 mode (pushstate mode). - */ - this.html5Mode = function () { return _this.router.locationConfig.html5Mode(); }; - /** - * Gets the port, e.g., `80` - * - * @return the port number - */ - this.port = function () { return _this.router.locationConfig.port(); }; - /** - * Gets the protocol, e.g., `http` - * - * @return the protocol - */ - this.protocol = function () { return _this.router.locationConfig.protocol(); }; - } - /** - * Defines whether URL matching should be case sensitive (the default behavior), or not. - * - * #### Example: - * ```js - * // Allow case insensitive url matches - * urlService.config.caseInsensitive(true); - * ``` - * - * @param value `false` to match URL in a case sensitive manner; otherwise `true`; - * @returns the current value of caseInsensitive - */ - UrlConfig.prototype.caseInsensitive = function (value) { - return (this._isCaseInsensitive = (0,_common__WEBPACK_IMPORTED_MODULE_1__.isDefined)(value) ? value : this._isCaseInsensitive); - }; - /** - * Sets the default behavior when generating or matching URLs with default parameter values. - * - * #### Example: - * ```js - * // Remove default parameter values from the url - * urlService.config.defaultSquashPolicy(true); - * ``` - * - * @param value A string that defines the default parameter URL squashing behavior. - * - `nosquash`: When generating an href with a default parameter value, do not squash the parameter value from the URL - * - `slash`: When generating an href with a default parameter value, squash (remove) the parameter value, and, if the - * parameter is surrounded by slashes, squash (remove) one slash from the URL - * - any other string, e.g. "~": When generating an href with a default parameter value, squash (remove) - * the parameter value from the URL and replace it with this string. - * @returns the current value of defaultSquashPolicy - */ - UrlConfig.prototype.defaultSquashPolicy = function (value) { - if ((0,_common__WEBPACK_IMPORTED_MODULE_1__.isDefined)(value) && value !== true && value !== false && !(0,_common__WEBPACK_IMPORTED_MODULE_1__.isString)(value)) - throw new Error("Invalid squash policy: " + value + ". Valid policies: false, true, arbitrary-string"); - return (this._defaultSquashPolicy = (0,_common__WEBPACK_IMPORTED_MODULE_1__.isDefined)(value) ? value : this._defaultSquashPolicy); - }; - /** - * Defines whether URLs should match trailing slashes, or not (the default behavior). - * - * #### Example: - * ```js - * // Allow optional trailing slashes - * urlService.config.strictMode(false); - * ``` - * - * @param value `false` to match trailing slashes in URLs, otherwise `true`. - * @returns the current value of strictMode - */ - UrlConfig.prototype.strictMode = function (value) { - return (this._isStrictMode = (0,_common__WEBPACK_IMPORTED_MODULE_1__.isDefined)(value) ? value : this._isStrictMode); - }; - /** - * Creates and registers a custom [[ParamType]] object - * - * A custom parameter type can be used to generate URLs with typed parameters or custom encoding/decoding. - * - * #### Note: Register custom types *before using them* in a state definition. - * - * #### Example: - * ```js - * // Encode object parameter as JSON string - * urlService.config.type('myjson', { - * encode: (obj) => JSON.stringify(obj), - * decode: (str) => JSON.parse(str), - * is: (val) => typeof(val) === 'object', - * pattern: /[^/]+/, - * equals: (a, b) => _.isEqual(a, b), - * }); - * ``` - * - * See [[ParamTypeDefinition]] for more examples - * - * @param name The type name. - * @param definition The type definition. See [[ParamTypeDefinition]] for information on the values accepted. - * @param definitionFn A function that is injected before the app runtime starts. - * The result of this function should be a [[ParamTypeDefinition]]. - * The result is merged into the existing `definition`. - * See [[ParamType]] for information on the values accepted. - * - * @returns if only the `name` parameter was specified: the currently registered [[ParamType]] object, or undefined - */ - UrlConfig.prototype.type = function (name, definition, definitionFn) { - var type = this.paramTypes.type(name, definition, definitionFn); - return !(0,_common__WEBPACK_IMPORTED_MODULE_1__.isDefined)(definition) ? type : this; - }; - return UrlConfig; -}()); - -//# sourceMappingURL=urlConfig.js.map - -/***/ }), - -/***/ "./node_modules/@uirouter/core/lib-esm/url/urlMatcher.js": -/*!***************************************************************!*\ - !*** ./node_modules/@uirouter/core/lib-esm/url/urlMatcher.js ***! - \***************************************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "UrlMatcher": () => (/* binding */ UrlMatcher) -/* harmony export */ }); -/* harmony import */ var _common_common__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../common/common */ "./node_modules/@uirouter/core/lib-esm/common/common.js"); -/* harmony import */ var _common_hof__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../common/hof */ "./node_modules/@uirouter/core/lib-esm/common/hof.js"); -/* harmony import */ var _common_predicates__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../common/predicates */ "./node_modules/@uirouter/core/lib-esm/common/predicates.js"); -/* harmony import */ var _params_param__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../params/param */ "./node_modules/@uirouter/core/lib-esm/params/param.js"); -/* harmony import */ var _common_strings__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../common/strings */ "./node_modules/@uirouter/core/lib-esm/common/strings.js"); -/* harmony import */ var _common__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../common */ "./node_modules/@uirouter/core/lib-esm/common/index.js"); - - - - - - -function quoteRegExp(str, param) { - var surroundPattern = ['', ''], result = str.replace(/[\\\[\]\^$*+?.()|{}]/g, '\\$&'); - if (!param) - return result; - switch (param.squash) { - case false: - surroundPattern = ['(', ')' + (param.isOptional ? '?' : '')]; - break; - case true: - result = result.replace(/\/$/, ''); - surroundPattern = ['(?:/(', ')|/)?']; - break; - default: - surroundPattern = ["(" + param.squash + "|", ')?']; - break; - } - return result + surroundPattern[0] + param.type.pattern.source + surroundPattern[1]; -} -var memoizeTo = function (obj, _prop, fn) { return (obj[_prop] = obj[_prop] || fn()); }; -var splitOnSlash = (0,_common_strings__WEBPACK_IMPORTED_MODULE_4__.splitOnDelim)('/'); -var defaultConfig = { - state: { params: {} }, - strict: true, - caseInsensitive: true, - decodeParams: true, -}; -/** - * Matches URLs against patterns. - * - * Matches URLs against patterns and extracts named parameters from the path or the search - * part of the URL. - * - * A URL pattern consists of a path pattern, optionally followed by '?' and a list of search (query) - * parameters. Multiple search parameter names are separated by '&'. Search parameters - * do not influence whether or not a URL is matched, but their values are passed through into - * the matched parameters returned by [[UrlMatcher.exec]]. - * - * - *Path parameters* are defined using curly brace placeholders (`/somepath/{param}`) - * or colon placeholders (`/somePath/:param`). - * - * - *A parameter RegExp* may be defined for a param after a colon - * (`/somePath/{param:[a-zA-Z0-9]+}`) in a curly brace placeholder. - * The regexp must match for the url to be matched. - * Should the regexp itself contain curly braces, they must be in matched pairs or escaped with a backslash. - * - * Note: a RegExp parameter will encode its value using either [[ParamTypes.path]] or [[ParamTypes.query]]. - * - * - *Custom parameter types* may also be specified after a colon (`/somePath/{param:int}`) in curly brace parameters. - * See [[UrlMatcherFactory.type]] for more information. - * - * - *Catch-all parameters* are defined using an asterisk placeholder (`/somepath/*catchallparam`). - * A catch-all * parameter value will contain the remainder of the URL. - * - * --- - * - * Parameter names may contain only word characters (latin letters, digits, and underscore) and - * must be unique within the pattern (across both path and search parameters). - * A path parameter matches any number of characters other than '/'. For catch-all - * placeholders the path parameter matches any number of characters. - * - * Examples: - * - * * `'/hello/'` - Matches only if the path is exactly '/hello/'. There is no special treatment for - * trailing slashes, and patterns have to match the entire path, not just a prefix. - * * `'/user/:id'` - Matches '/user/bob' or '/user/1234!!!' or even '/user/' but not '/user' or - * '/user/bob/details'. The second path segment will be captured as the parameter 'id'. - * * `'/user/{id}'` - Same as the previous example, but using curly brace syntax. - * * `'/user/{id:[^/]*}'` - Same as the previous example. - * * `'/user/{id:[0-9a-fA-F]{1,8}}'` - Similar to the previous example, but only matches if the id - * parameter consists of 1 to 8 hex digits. - * * `'/files/{path:.*}'` - Matches any URL starting with '/files/' and captures the rest of the - * path into the parameter 'path'. - * * `'/files/*path'` - ditto. - * * `'/calendar/{start:date}'` - Matches "/calendar/2014-11-12" (because the pattern defined - * in the built-in `date` ParamType matches `2014-11-12`) and provides a Date object in $stateParams.start - * - */ -var UrlMatcher = /** @class */ (function () { - /** - * @param pattern The pattern to compile into a matcher. - * @param paramTypes The [[ParamTypes]] registry - * @param paramFactory A [[ParamFactory]] object - * @param config A [[UrlMatcherCompileConfig]] configuration object - */ - function UrlMatcher(pattern, paramTypes, paramFactory, config) { - var _this = this; - /** @internal */ - this._cache = { path: [this] }; - /** @internal */ - this._children = []; - /** @internal */ - this._params = []; - /** @internal */ - this._segments = []; - /** @internal */ - this._compiled = []; - this.config = config = (0,_common__WEBPACK_IMPORTED_MODULE_5__.defaults)(config, defaultConfig); - this.pattern = pattern; - // Find all placeholders and create a compiled pattern, using either classic or curly syntax: - // '*' name - // ':' name - // '{' name '}' - // '{' name ':' regexp '}' - // The regular expression is somewhat complicated due to the need to allow curly braces - // inside the regular expression. The placeholder regexp breaks down as follows: - // ([:*])([\w\[\]]+) - classic placeholder ($1 / $2) (search version has - for snake-case) - // \{([\w\[\]]+)(?:\:\s*( ... ))?\} - curly brace placeholder ($3) with optional regexp/type ... ($4) (search version has - for snake-case - // (?: ... | ... | ... )+ - the regexp consists of any number of atoms, an atom being either - // [^{}\\]+ - anything other than curly braces or backslash - // \\. - a backslash escape - // \{(?:[^{}\\]+|\\.)*\} - a matched set of curly braces containing other atoms - var placeholder = /([:*])([\w\[\]]+)|\{([\w\[\]]+)(?:\:\s*((?:[^{}\\]+|\\.|\{(?:[^{}\\]+|\\.)*\})+))?\}/g; - var searchPlaceholder = /([:]?)([\w\[\].-]+)|\{([\w\[\].-]+)(?:\:\s*((?:[^{}\\]+|\\.|\{(?:[^{}\\]+|\\.)*\})+))?\}/g; - var patterns = []; - var last = 0; - var matchArray; - var checkParamErrors = function (id) { - if (!UrlMatcher.nameValidator.test(id)) - throw new Error("Invalid parameter name '" + id + "' in pattern '" + pattern + "'"); - if ((0,_common_common__WEBPACK_IMPORTED_MODULE_0__.find)(_this._params, (0,_common_hof__WEBPACK_IMPORTED_MODULE_1__.propEq)('id', id))) - throw new Error("Duplicate parameter name '" + id + "' in pattern '" + pattern + "'"); - }; - // Split into static segments separated by path parameter placeholders. - // The number of segments is always 1 more than the number of parameters. - var matchDetails = function (m, isSearch) { - // IE[78] returns '' for unmatched groups instead of null - var id = m[2] || m[3]; - var regexp = isSearch ? m[4] : m[4] || (m[1] === '*' ? '[\\s\\S]*' : null); - var makeRegexpType = function (str) { - return (0,_common_common__WEBPACK_IMPORTED_MODULE_0__.inherit)(paramTypes.type(isSearch ? 'query' : 'path'), { - pattern: new RegExp(str, _this.config.caseInsensitive ? 'i' : undefined), - }); - }; - return { - id: id, - regexp: regexp, - segment: pattern.substring(last, m.index), - type: !regexp ? null : paramTypes.type(regexp) || makeRegexpType(regexp), - }; - }; - var details; - var segment; - // tslint:disable-next-line:no-conditional-assignment - while ((matchArray = placeholder.exec(pattern))) { - details = matchDetails(matchArray, false); - if (details.segment.indexOf('?') >= 0) - break; // we're into the search part - checkParamErrors(details.id); - this._params.push(paramFactory.fromPath(details.id, details.type, config.state)); - this._segments.push(details.segment); - patterns.push([details.segment, (0,_common_common__WEBPACK_IMPORTED_MODULE_0__.tail)(this._params)]); - last = placeholder.lastIndex; - } - segment = pattern.substring(last); - // Find any search parameter names and remove them from the last segment - var i = segment.indexOf('?'); - if (i >= 0) { - var search = segment.substring(i); - segment = segment.substring(0, i); - if (search.length > 0) { - last = 0; - // tslint:disable-next-line:no-conditional-assignment - while ((matchArray = searchPlaceholder.exec(search))) { - details = matchDetails(matchArray, true); - checkParamErrors(details.id); - this._params.push(paramFactory.fromSearch(details.id, details.type, config.state)); - last = placeholder.lastIndex; - // check if ?& - } - } - } - this._segments.push(segment); - this._compiled = patterns.map(function (_pattern) { return quoteRegExp.apply(null, _pattern); }).concat(quoteRegExp(segment)); - } - /** @internal */ - UrlMatcher.encodeDashes = function (str) { - // Replace dashes with encoded "\-" - return encodeURIComponent(str).replace(/-/g, function (c) { return "%5C%" + c.charCodeAt(0).toString(16).toUpperCase(); }); - }; - /** @internal Given a matcher, return an array with the matcher's path segments and path params, in order */ - UrlMatcher.pathSegmentsAndParams = function (matcher) { - var staticSegments = matcher._segments; - var pathParams = matcher._params.filter(function (p) { return p.location === _params_param__WEBPACK_IMPORTED_MODULE_3__.DefType.PATH; }); - return (0,_common_common__WEBPACK_IMPORTED_MODULE_0__.arrayTuples)(staticSegments, pathParams.concat(undefined)) - .reduce(_common_common__WEBPACK_IMPORTED_MODULE_0__.unnestR, []) - .filter(function (x) { return x !== '' && (0,_common_predicates__WEBPACK_IMPORTED_MODULE_2__.isDefined)(x); }); - }; - /** @internal Given a matcher, return an array with the matcher's query params */ - UrlMatcher.queryParams = function (matcher) { - return matcher._params.filter(function (p) { return p.location === _params_param__WEBPACK_IMPORTED_MODULE_3__.DefType.SEARCH; }); - }; - /** - * Compare two UrlMatchers - * - * This comparison function converts a UrlMatcher into static and dynamic path segments. - * Each static path segment is a static string between a path separator (slash character). - * Each dynamic segment is a path parameter. - * - * The comparison function sorts static segments before dynamic ones. - */ - UrlMatcher.compare = function (a, b) { - /** - * Turn a UrlMatcher and all its parent matchers into an array - * of slash literals '/', string literals, and Param objects - * - * This example matcher matches strings like "/foo/:param/tail": - * var matcher = $umf.compile("/foo").append($umf.compile("/:param")).append($umf.compile("/")).append($umf.compile("tail")); - * var result = segments(matcher); // [ '/', 'foo', '/', Param, '/', 'tail' ] - * - * Caches the result as `matcher._cache.segments` - */ - var segments = function (matcher) { - return (matcher._cache.segments = - matcher._cache.segments || - matcher._cache.path - .map(UrlMatcher.pathSegmentsAndParams) - .reduce(_common_common__WEBPACK_IMPORTED_MODULE_0__.unnestR, []) - .reduce(_common_strings__WEBPACK_IMPORTED_MODULE_4__.joinNeighborsR, []) - .map(function (x) { return ((0,_common_predicates__WEBPACK_IMPORTED_MODULE_2__.isString)(x) ? splitOnSlash(x) : x); }) - .reduce(_common_common__WEBPACK_IMPORTED_MODULE_0__.unnestR, [])); - }; - /** - * Gets the sort weight for each segment of a UrlMatcher - * - * Caches the result as `matcher._cache.weights` - */ - var weights = function (matcher) { - return (matcher._cache.weights = - matcher._cache.weights || - segments(matcher).map(function (segment) { - // Sort slashes first, then static strings, the Params - if (segment === '/') - return 1; - if ((0,_common_predicates__WEBPACK_IMPORTED_MODULE_2__.isString)(segment)) - return 2; - if (segment instanceof _params_param__WEBPACK_IMPORTED_MODULE_3__.Param) - return 3; - })); - }; - /** - * Pads shorter array in-place (mutates) - */ - var padArrays = function (l, r, padVal) { - var len = Math.max(l.length, r.length); - while (l.length < len) - l.push(padVal); - while (r.length < len) - r.push(padVal); - }; - var weightsA = weights(a), weightsB = weights(b); - padArrays(weightsA, weightsB, 0); - var _pairs = (0,_common_common__WEBPACK_IMPORTED_MODULE_0__.arrayTuples)(weightsA, weightsB); - var cmp, i; - for (i = 0; i < _pairs.length; i++) { - cmp = _pairs[i][0] - _pairs[i][1]; - if (cmp !== 0) - return cmp; - } - return 0; - }; - /** - * Creates a new concatenated UrlMatcher - * - * Builds a new UrlMatcher by appending another UrlMatcher to this one. - * - * @param url A `UrlMatcher` instance to append as a child of the current `UrlMatcher`. - */ - UrlMatcher.prototype.append = function (url) { - this._children.push(url); - url._cache = { - path: this._cache.path.concat(url), - parent: this, - pattern: null, - }; - return url; - }; - /** @internal */ - UrlMatcher.prototype.isRoot = function () { - return this._cache.path[0] === this; - }; - /** Returns the input pattern string */ - UrlMatcher.prototype.toString = function () { - return this.pattern; - }; - UrlMatcher.prototype._getDecodedParamValue = function (value, param) { - if ((0,_common_predicates__WEBPACK_IMPORTED_MODULE_2__.isDefined)(value)) { - if (this.config.decodeParams && !param.type.raw) { - if ((0,_common_predicates__WEBPACK_IMPORTED_MODULE_2__.isArray)(value)) { - value = value.map(function (paramValue) { return decodeURIComponent(paramValue); }); - } - else { - value = decodeURIComponent(value); - } - } - value = param.type.decode(value); - } - return param.value(value); - }; - /** - * Tests the specified url/path against this matcher. - * - * Tests if the given url matches this matcher's pattern, and returns an object containing the captured - * parameter values. Returns null if the path does not match. - * - * The returned object contains the values - * of any search parameters that are mentioned in the pattern, but their value may be null if - * they are not present in `search`. This means that search parameters are always treated - * as optional. - * - * #### Example: - * ```js - * new UrlMatcher('/user/{id}?q&r').exec('/user/bob', { - * x: '1', q: 'hello' - * }); - * // returns { id: 'bob', q: 'hello', r: null } - * ``` - * - * @param path The URL path to match, e.g. `$location.path()`. - * @param search URL search parameters, e.g. `$location.search()`. - * @param hash URL hash e.g. `$location.hash()`. - * @param options - * - * @returns The captured parameter values. - */ - UrlMatcher.prototype.exec = function (path, search, hash, options) { - var _this = this; - if (search === void 0) { search = {}; } - if (options === void 0) { options = {}; } - var match = memoizeTo(this._cache, 'pattern', function () { - return new RegExp([ - '^', - (0,_common_common__WEBPACK_IMPORTED_MODULE_0__.unnest)(_this._cache.path.map((0,_common_hof__WEBPACK_IMPORTED_MODULE_1__.prop)('_compiled'))).join(''), - _this.config.strict === false ? '/?' : '', - '$', - ].join(''), _this.config.caseInsensitive ? 'i' : undefined); - }).exec(path); - if (!match) - return null; - // options = defaults(options, { isolate: false }); - var allParams = this.parameters(), pathParams = allParams.filter(function (param) { return !param.isSearch(); }), searchParams = allParams.filter(function (param) { return param.isSearch(); }), nPathSegments = this._cache.path.map(function (urlm) { return urlm._segments.length - 1; }).reduce(function (a, x) { return a + x; }), values = {}; - if (nPathSegments !== match.length - 1) - throw new Error("Unbalanced capture group in route '" + this.pattern + "'"); - function decodePathArray(paramVal) { - var reverseString = function (str) { return str.split('').reverse().join(''); }; - var unquoteDashes = function (str) { return str.replace(/\\-/g, '-'); }; - var split = reverseString(paramVal).split(/-(?!\\)/); - var allReversed = (0,_common_common__WEBPACK_IMPORTED_MODULE_0__.map)(split, reverseString); - return (0,_common_common__WEBPACK_IMPORTED_MODULE_0__.map)(allReversed, unquoteDashes).reverse(); - } - for (var i = 0; i < nPathSegments; i++) { - var param = pathParams[i]; - var value = match[i + 1]; - // if the param value matches a pre-replace pair, replace the value before decoding. - for (var j = 0; j < param.replace.length; j++) { - if (param.replace[j].from === value) - value = param.replace[j].to; - } - if (value && param.array === true) - value = decodePathArray(value); - values[param.id] = this._getDecodedParamValue(value, param); - } - searchParams.forEach(function (param) { - var value = search[param.id]; - for (var j = 0; j < param.replace.length; j++) { - if (param.replace[j].from === value) - value = param.replace[j].to; - } - values[param.id] = _this._getDecodedParamValue(value, param); - }); - if (hash) - values['#'] = hash; - return values; - }; - /** - * @internal - * Returns all the [[Param]] objects of all path and search parameters of this pattern in order of appearance. - * - * @returns {Array.} An array of [[Param]] objects. Must be treated as read-only. If the - * pattern has no parameters, an empty array is returned. - */ - UrlMatcher.prototype.parameters = function (opts) { - if (opts === void 0) { opts = {}; } - if (opts.inherit === false) - return this._params; - return (0,_common_common__WEBPACK_IMPORTED_MODULE_0__.unnest)(this._cache.path.map(function (matcher) { return matcher._params; })); - }; - /** - * @internal - * Returns a single parameter from this UrlMatcher by id - * - * @param id - * @param opts - * @returns {T|Param|any|boolean|UrlMatcher|null} - */ - UrlMatcher.prototype.parameter = function (id, opts) { - var _this = this; - if (opts === void 0) { opts = {}; } - var findParam = function () { - for (var _i = 0, _a = _this._params; _i < _a.length; _i++) { - var param = _a[_i]; - if (param.id === id) - return param; - } - }; - var parent = this._cache.parent; - return findParam() || (opts.inherit !== false && parent && parent.parameter(id, opts)) || null; - }; - /** - * Validates the input parameter values against this UrlMatcher - * - * Checks an object hash of parameters to validate their correctness according to the parameter - * types of this `UrlMatcher`. - * - * @param params The object hash of parameters to validate. - * @returns Returns `true` if `params` validates, otherwise `false`. - */ - UrlMatcher.prototype.validates = function (params) { - var validParamVal = function (param, val) { return !param || param.validates(val); }; - params = params || {}; - // I'm not sure why this checks only the param keys passed in, and not all the params known to the matcher - var paramSchema = this.parameters().filter(function (paramDef) { return params.hasOwnProperty(paramDef.id); }); - return paramSchema.map(function (paramDef) { return validParamVal(paramDef, params[paramDef.id]); }).reduce(_common_common__WEBPACK_IMPORTED_MODULE_0__.allTrueR, true); - }; - /** - * Given a set of parameter values, creates a URL from this UrlMatcher. - * - * Creates a URL that matches this pattern by substituting the specified values - * for the path and search parameters. - * - * #### Example: - * ```js - * new UrlMatcher('/user/{id}?q').format({ id:'bob', q:'yes' }); - * // returns '/user/bob?q=yes' - * ``` - * - * @param values the values to substitute for the parameters in this pattern. - * @returns the formatted URL (path and optionally search part). - */ - UrlMatcher.prototype.format = function (values) { - if (values === void 0) { values = {}; } - // Build the full path of UrlMatchers (including all parent UrlMatchers) - var urlMatchers = this._cache.path; - // Extract all the static segments and Params (processed as ParamDetails) - // into an ordered array - var pathSegmentsAndParams = urlMatchers - .map(UrlMatcher.pathSegmentsAndParams) - .reduce(_common_common__WEBPACK_IMPORTED_MODULE_0__.unnestR, []) - .map(function (x) { return ((0,_common_predicates__WEBPACK_IMPORTED_MODULE_2__.isString)(x) ? x : getDetails(x)); }); - // Extract the query params into a separate array - var queryParams = urlMatchers - .map(UrlMatcher.queryParams) - .reduce(_common_common__WEBPACK_IMPORTED_MODULE_0__.unnestR, []) - .map(getDetails); - var isInvalid = function (param) { return param.isValid === false; }; - if (pathSegmentsAndParams.concat(queryParams).filter(isInvalid).length) { - return null; - } - /** - * Given a Param, applies the parameter value, then returns detailed information about it - */ - function getDetails(param) { - // Normalize to typed value - var value = param.value(values[param.id]); - var isValid = param.validates(value); - var isDefaultValue = param.isDefaultValue(value); - // Check if we're in squash mode for the parameter - var squash = isDefaultValue ? param.squash : false; - // Allow the Parameter's Type to encode the value - var encoded = param.type.encode(value); - return { param: param, value: value, isValid: isValid, isDefaultValue: isDefaultValue, squash: squash, encoded: encoded }; - } - // Build up the path-portion from the list of static segments and parameters - var pathString = pathSegmentsAndParams.reduce(function (acc, x) { - // The element is a static segment (a raw string); just append it - if ((0,_common_predicates__WEBPACK_IMPORTED_MODULE_2__.isString)(x)) - return acc + x; - // Otherwise, it's a ParamDetails. - var squash = x.squash, encoded = x.encoded, param = x.param; - // If squash is === true, try to remove a slash from the path - if (squash === true) - return acc.match(/\/$/) ? acc.slice(0, -1) : acc; - // If squash is a string, use the string for the param value - if ((0,_common_predicates__WEBPACK_IMPORTED_MODULE_2__.isString)(squash)) - return acc + squash; - if (squash !== false) - return acc; // ? - if (encoded == null) - return acc; - // If this parameter value is an array, encode the value using encodeDashes - if ((0,_common_predicates__WEBPACK_IMPORTED_MODULE_2__.isArray)(encoded)) - return acc + (0,_common_common__WEBPACK_IMPORTED_MODULE_0__.map)(encoded, UrlMatcher.encodeDashes).join('-'); - // If the parameter type is "raw", then do not encodeURIComponent - if (param.raw) - return acc + encoded; - // Encode the value - return acc + encodeURIComponent(encoded); - }, ''); - // Build the query string by applying parameter values (array or regular) - // then mapping to key=value, then flattening and joining using "&" - var queryString = queryParams - .map(function (paramDetails) { - var param = paramDetails.param, squash = paramDetails.squash, encoded = paramDetails.encoded, isDefaultValue = paramDetails.isDefaultValue; - if (encoded == null || (isDefaultValue && squash !== false)) - return; - if (!(0,_common_predicates__WEBPACK_IMPORTED_MODULE_2__.isArray)(encoded)) - encoded = [encoded]; - if (encoded.length === 0) - return; - if (!param.raw) - encoded = (0,_common_common__WEBPACK_IMPORTED_MODULE_0__.map)(encoded, encodeURIComponent); - return encoded.map(function (val) { return param.id + "=" + val; }); - }) - .filter(_common_common__WEBPACK_IMPORTED_MODULE_0__.identity) - .reduce(_common_common__WEBPACK_IMPORTED_MODULE_0__.unnestR, []) - .join('&'); - // Concat the pathstring with the queryString (if exists) and the hashString (if exists) - return pathString + (queryString ? "?" + queryString : '') + (values['#'] ? '#' + values['#'] : ''); - }; - /** @internal */ - UrlMatcher.nameValidator = /^\w+([-.]+\w+)*(?:\[\])?$/; - return UrlMatcher; -}()); - -//# sourceMappingURL=urlMatcher.js.map - -/***/ }), - -/***/ "./node_modules/@uirouter/core/lib-esm/url/urlMatcherFactory.js": -/*!**********************************************************************!*\ - !*** ./node_modules/@uirouter/core/lib-esm/url/urlMatcherFactory.js ***! - \**********************************************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "ParamFactory": () => (/* binding */ ParamFactory), -/* harmony export */ "UrlMatcherFactory": () => (/* binding */ UrlMatcherFactory) -/* harmony export */ }); -/* harmony import */ var _common__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../common */ "./node_modules/@uirouter/core/lib-esm/common/index.js"); -/* harmony import */ var _urlMatcher__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./urlMatcher */ "./node_modules/@uirouter/core/lib-esm/url/urlMatcher.js"); -/* harmony import */ var _params__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../params */ "./node_modules/@uirouter/core/lib-esm/params/index.js"); -var __assign = (undefined && undefined.__assign) || function () { - __assign = Object.assign || function(t) { - for (var s, i = 1, n = arguments.length; i < n; i++) { - s = arguments[i]; - for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) - t[p] = s[p]; - } - return t; - }; - return __assign.apply(this, arguments); -}; - - - -var ParamFactory = /** @class */ (function () { - function ParamFactory(router) { - this.router = router; - } - ParamFactory.prototype.fromConfig = function (id, type, state) { - return new _params__WEBPACK_IMPORTED_MODULE_2__.Param(id, type, _params__WEBPACK_IMPORTED_MODULE_2__.DefType.CONFIG, this.router.urlService.config, state); - }; - ParamFactory.prototype.fromPath = function (id, type, state) { - return new _params__WEBPACK_IMPORTED_MODULE_2__.Param(id, type, _params__WEBPACK_IMPORTED_MODULE_2__.DefType.PATH, this.router.urlService.config, state); - }; - ParamFactory.prototype.fromSearch = function (id, type, state) { - return new _params__WEBPACK_IMPORTED_MODULE_2__.Param(id, type, _params__WEBPACK_IMPORTED_MODULE_2__.DefType.SEARCH, this.router.urlService.config, state); - }; - return ParamFactory; -}()); - -/** - * Factory for [[UrlMatcher]] instances. - * - * The factory is available to ng1 services as - * `$urlMatcherFactory` or ng1 providers as `$urlMatcherFactoryProvider`. - */ -var UrlMatcherFactory = /** @class */ (function () { - // TODO: move implementations to UrlConfig (urlService.config) - function UrlMatcherFactory(/** @internal */ router) { - var _this = this; - this.router = router; - /** Creates a new [[Param]] for a given location (DefType) */ - this.paramFactory = new ParamFactory(this.router); - // TODO: Check if removal of this will break anything, then remove these - this.UrlMatcher = _urlMatcher__WEBPACK_IMPORTED_MODULE_1__.UrlMatcher; - this.Param = _params__WEBPACK_IMPORTED_MODULE_2__.Param; - /** @deprecated use [[UrlConfig.caseInsensitive]] */ - this.caseInsensitive = function (value) { return _this.router.urlService.config.caseInsensitive(value); }; - /** @deprecated use [[UrlConfig.defaultSquashPolicy]] */ - this.defaultSquashPolicy = function (value) { return _this.router.urlService.config.defaultSquashPolicy(value); }; - /** @deprecated use [[UrlConfig.strictMode]] */ - this.strictMode = function (value) { return _this.router.urlService.config.strictMode(value); }; - /** @deprecated use [[UrlConfig.type]] */ - this.type = function (name, definition, definitionFn) { - return _this.router.urlService.config.type(name, definition, definitionFn) || _this; - }; - } - /** - * Creates a [[UrlMatcher]] for the specified pattern. - * - * @param pattern The URL pattern. - * @param config The config object hash. - * @returns The UrlMatcher. - */ - UrlMatcherFactory.prototype.compile = function (pattern, config) { - var urlConfig = this.router.urlService.config; - // backward-compatible support for config.params -> config.state.params - var params = config && !config.state && config.params; - config = params ? __assign({ state: { params: params } }, config) : config; - var globalConfig = { - strict: urlConfig._isStrictMode, - caseInsensitive: urlConfig._isCaseInsensitive, - decodeParams: urlConfig._decodeParams, - }; - return new _urlMatcher__WEBPACK_IMPORTED_MODULE_1__.UrlMatcher(pattern, urlConfig.paramTypes, this.paramFactory, (0,_common__WEBPACK_IMPORTED_MODULE_0__.extend)(globalConfig, config)); - }; - /** - * Returns true if the specified object is a [[UrlMatcher]], or false otherwise. - * - * @param object The object to perform the type check against. - * @returns `true` if the object matches the `UrlMatcher` interface, by - * implementing all the same methods. - */ - UrlMatcherFactory.prototype.isMatcher = function (object) { - // TODO: typeof? - if (!(0,_common__WEBPACK_IMPORTED_MODULE_0__.isObject)(object)) - return false; - var result = true; - (0,_common__WEBPACK_IMPORTED_MODULE_0__.forEach)(_urlMatcher__WEBPACK_IMPORTED_MODULE_1__.UrlMatcher.prototype, function (val, name) { - if ((0,_common__WEBPACK_IMPORTED_MODULE_0__.isFunction)(val)) - result = result && (0,_common__WEBPACK_IMPORTED_MODULE_0__.isDefined)(object[name]) && (0,_common__WEBPACK_IMPORTED_MODULE_0__.isFunction)(object[name]); - }); - return result; - }; - /** @internal */ - UrlMatcherFactory.prototype.$get = function () { - var urlConfig = this.router.urlService.config; - urlConfig.paramTypes.enqueue = false; - urlConfig.paramTypes._flushTypeQueue(); - return this; - }; - return UrlMatcherFactory; -}()); - -//# sourceMappingURL=urlMatcherFactory.js.map - -/***/ }), - -/***/ "./node_modules/@uirouter/core/lib-esm/url/urlRouter.js": -/*!**************************************************************!*\ - !*** ./node_modules/@uirouter/core/lib-esm/url/urlRouter.js ***! - \**************************************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "UrlRouter": () => (/* binding */ UrlRouter) -/* harmony export */ }); -/* harmony import */ var _common__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../common */ "./node_modules/@uirouter/core/lib-esm/common/index.js"); -/* harmony import */ var _urlRule__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./urlRule */ "./node_modules/@uirouter/core/lib-esm/url/urlRule.js"); - - -function appendBasePath(url, isHtml5, absolute, baseHref) { - if (baseHref === '/') - return url; - if (isHtml5) - return (0,_common__WEBPACK_IMPORTED_MODULE_0__.stripLastPathElement)(baseHref) + url; - if (absolute) - return baseHref.slice(1) + url; - return url; -} -/** - * Updates URL and responds to URL changes - * - * ### Deprecation warning: - * This class is now considered to be an internal API - * Use the [[UrlService]] instead. - * For configuring URL rules, use the [[UrlRules]] which can be found as [[UrlService.rules]]. - */ -var UrlRouter = /** @class */ (function () { - /** @internal */ - function UrlRouter(/** @internal */ router) { - var _this = this; - this.router = router; - // Delegate these calls to [[UrlService]] - /** @deprecated use [[UrlService.sync]]*/ - this.sync = function (evt) { return _this.router.urlService.sync(evt); }; - /** @deprecated use [[UrlService.listen]]*/ - this.listen = function (enabled) { return _this.router.urlService.listen(enabled); }; - /** @deprecated use [[UrlService.deferIntercept]]*/ - this.deferIntercept = function (defer) { return _this.router.urlService.deferIntercept(defer); }; - /** @deprecated use [[UrlService.match]]*/ - this.match = function (urlParts) { return _this.router.urlService.match(urlParts); }; - // Delegate these calls to [[UrlRules]] - /** @deprecated use [[UrlRules.initial]]*/ - this.initial = function (handler) { - return _this.router.urlService.rules.initial(handler); - }; - /** @deprecated use [[UrlRules.otherwise]]*/ - this.otherwise = function (handler) { - return _this.router.urlService.rules.otherwise(handler); - }; - /** @deprecated use [[UrlRules.removeRule]]*/ - this.removeRule = function (rule) { return _this.router.urlService.rules.removeRule(rule); }; - /** @deprecated use [[UrlRules.rule]]*/ - this.rule = function (rule) { return _this.router.urlService.rules.rule(rule); }; - /** @deprecated use [[UrlRules.rules]]*/ - this.rules = function () { return _this.router.urlService.rules.rules(); }; - /** @deprecated use [[UrlRules.sort]]*/ - this.sort = function (compareFn) { return _this.router.urlService.rules.sort(compareFn); }; - /** @deprecated use [[UrlRules.when]]*/ - this.when = function (matcher, handler, options) { return _this.router.urlService.rules.when(matcher, handler, options); }; - this.urlRuleFactory = new _urlRule__WEBPACK_IMPORTED_MODULE_1__.UrlRuleFactory(router); - } - /** Internal API. */ - UrlRouter.prototype.update = function (read) { - var $url = this.router.locationService; - if (read) { - this.location = $url.url(); - return; - } - if ($url.url() === this.location) - return; - $url.url(this.location, true); - }; - /** - * Internal API. - * - * Pushes a new location to the browser history. - * - * @internal - * @param urlMatcher - * @param params - * @param options - */ - UrlRouter.prototype.push = function (urlMatcher, params, options) { - var replace = options && !!options.replace; - this.router.urlService.url(urlMatcher.format(params || {}), replace); - }; - /** - * Builds and returns a URL with interpolated parameters - * - * #### Example: - * ```js - * matcher = $umf.compile("/about/:person"); - * params = { person: "bob" }; - * $bob = $urlRouter.href(matcher, params); - * // $bob == "/about/bob"; - * ``` - * - * @param urlMatcher The [[UrlMatcher]] object which is used as the template of the URL to generate. - * @param params An object of parameter values to fill the matcher's required parameters. - * @param options Options object. The options are: - * - * - **`absolute`** - {boolean=false}, If true will generate an absolute url, e.g. "http://www.example.com/fullurl". - * - * @returns Returns the fully compiled URL, or `null` if `params` fail validation against `urlMatcher` - */ - UrlRouter.prototype.href = function (urlMatcher, params, options) { - var url = urlMatcher.format(params); - if (url == null) - return null; - options = options || { absolute: false }; - var cfg = this.router.urlService.config; - var isHtml5 = cfg.html5Mode(); - if (!isHtml5 && url !== null) { - url = '#' + cfg.hashPrefix() + url; - } - url = appendBasePath(url, isHtml5, options.absolute, cfg.baseHref()); - if (!options.absolute || !url) { - return url; - } - var slash = !isHtml5 && url ? '/' : ''; - var cfgPort = cfg.port(); - var port = (cfgPort === 80 || cfgPort === 443 ? '' : ':' + cfgPort); - return [cfg.protocol(), '://', cfg.host(), port, slash, url].join(''); - }; - Object.defineProperty(UrlRouter.prototype, "interceptDeferred", { - /** @deprecated use [[UrlService.interceptDeferred]]*/ - get: function () { - return this.router.urlService.interceptDeferred; - }, - enumerable: false, - configurable: true - }); - return UrlRouter; -}()); - -//# sourceMappingURL=urlRouter.js.map - -/***/ }), - -/***/ "./node_modules/@uirouter/core/lib-esm/url/urlRule.js": -/*!************************************************************!*\ - !*** ./node_modules/@uirouter/core/lib-esm/url/urlRule.js ***! - \************************************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "UrlRuleFactory": () => (/* binding */ UrlRuleFactory), -/* harmony export */ "BaseUrlRule": () => (/* binding */ BaseUrlRule) -/* harmony export */ }); -/* harmony import */ var _urlMatcher__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./urlMatcher */ "./node_modules/@uirouter/core/lib-esm/url/urlMatcher.js"); -/* harmony import */ var _common_predicates__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../common/predicates */ "./node_modules/@uirouter/core/lib-esm/common/predicates.js"); -/* harmony import */ var _common_common__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../common/common */ "./node_modules/@uirouter/core/lib-esm/common/common.js"); -/* harmony import */ var _common_hof__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../common/hof */ "./node_modules/@uirouter/core/lib-esm/common/hof.js"); -/* harmony import */ var _state_stateObject__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../state/stateObject */ "./node_modules/@uirouter/core/lib-esm/state/stateObject.js"); - - - - - -/** - * Creates a [[UrlRule]] - * - * Creates a [[UrlRule]] from a: - * - * - `string` - * - [[UrlMatcher]] - * - `RegExp` - * - [[StateObject]] - */ -var UrlRuleFactory = /** @class */ (function () { - function UrlRuleFactory(router) { - this.router = router; - } - UrlRuleFactory.prototype.compile = function (str) { - return this.router.urlMatcherFactory.compile(str); - }; - UrlRuleFactory.prototype.create = function (what, handler) { - var _this = this; - var isState = _state_stateObject__WEBPACK_IMPORTED_MODULE_4__.StateObject.isState, isStateDeclaration = _state_stateObject__WEBPACK_IMPORTED_MODULE_4__.StateObject.isStateDeclaration; - var makeRule = (0,_common_hof__WEBPACK_IMPORTED_MODULE_3__.pattern)([ - [_common_predicates__WEBPACK_IMPORTED_MODULE_1__.isString, function (_what) { return makeRule(_this.compile(_what)); }], - [(0,_common_hof__WEBPACK_IMPORTED_MODULE_3__.is)(_urlMatcher__WEBPACK_IMPORTED_MODULE_0__.UrlMatcher), function (_what) { return _this.fromUrlMatcher(_what, handler); }], - [(0,_common_hof__WEBPACK_IMPORTED_MODULE_3__.or)(isState, isStateDeclaration), function (_what) { return _this.fromState(_what, _this.router); }], - [(0,_common_hof__WEBPACK_IMPORTED_MODULE_3__.is)(RegExp), function (_what) { return _this.fromRegExp(_what, handler); }], - [_common_predicates__WEBPACK_IMPORTED_MODULE_1__.isFunction, function (_what) { return new BaseUrlRule(_what, handler); }], - ]); - var rule = makeRule(what); - if (!rule) - throw new Error("invalid 'what' in when()"); - return rule; - }; - /** - * A UrlRule which matches based on a UrlMatcher - * - * The `handler` may be either a `string`, a [[UrlRuleHandlerFn]] or another [[UrlMatcher]] - * - * ## Handler as a function - * - * If `handler` is a function, the function is invoked with: - * - * - matched parameter values ([[RawParams]] from [[UrlMatcher.exec]]) - * - url: the current Url ([[UrlParts]]) - * - router: the router object ([[UIRouter]]) - * - * #### Example: - * ```js - * var urlMatcher = $umf.compile("/foo/:fooId/:barId"); - * var rule = factory.fromUrlMatcher(urlMatcher, match => "/home/" + match.fooId + "/" + match.barId); - * var match = rule.match('/foo/123/456'); // results in { fooId: '123', barId: '456' } - * var result = rule.handler(match); // '/home/123/456' - * ``` - * - * ## Handler as UrlMatcher - * - * If `handler` is a UrlMatcher, the handler matcher is used to create the new url. - * The `handler` UrlMatcher is formatted using the matched param from the first matcher. - * The url is replaced with the result. - * - * #### Example: - * ```js - * var urlMatcher = $umf.compile("/foo/:fooId/:barId"); - * var handler = $umf.compile("/home/:fooId/:barId"); - * var rule = factory.fromUrlMatcher(urlMatcher, handler); - * var match = rule.match('/foo/123/456'); // results in { fooId: '123', barId: '456' } - * var result = rule.handler(match); // '/home/123/456' - * ``` - */ - UrlRuleFactory.prototype.fromUrlMatcher = function (urlMatcher, handler) { - var _handler = handler; - if ((0,_common_predicates__WEBPACK_IMPORTED_MODULE_1__.isString)(handler)) - handler = this.router.urlMatcherFactory.compile(handler); - if ((0,_common_hof__WEBPACK_IMPORTED_MODULE_3__.is)(_urlMatcher__WEBPACK_IMPORTED_MODULE_0__.UrlMatcher)(handler)) - _handler = function (match) { return handler.format(match); }; - function matchUrlParamters(url) { - var params = urlMatcher.exec(url.path, url.search, url.hash); - return urlMatcher.validates(params) && params; - } - // Prioritize URLs, lowest to highest: - // - Some optional URL parameters, but none matched - // - No optional parameters in URL - // - Some optional parameters, some matched - // - Some optional parameters, all matched - function matchPriority(params) { - var optional = urlMatcher.parameters().filter(function (param) { return param.isOptional; }); - if (!optional.length) - return 0.000001; - var matched = optional.filter(function (param) { return params[param.id]; }); - return matched.length / optional.length; - } - var details = { urlMatcher: urlMatcher, matchPriority: matchPriority, type: 'URLMATCHER' }; - return (0,_common_common__WEBPACK_IMPORTED_MODULE_2__.extend)(new BaseUrlRule(matchUrlParamters, _handler), details); - }; - /** - * A UrlRule which matches a state by its url - * - * #### Example: - * ```js - * var rule = factory.fromState($state.get('foo'), router); - * var match = rule.match('/foo/123/456'); // results in { fooId: '123', barId: '456' } - * var result = rule.handler(match); - * // Starts a transition to 'foo' with params: { fooId: '123', barId: '456' } - * ``` - */ - UrlRuleFactory.prototype.fromState = function (stateOrDecl, router) { - var state = _state_stateObject__WEBPACK_IMPORTED_MODULE_4__.StateObject.isStateDeclaration(stateOrDecl) ? stateOrDecl.$$state() : stateOrDecl; - /** - * Handles match by transitioning to matched state - * - * First checks if the router should start a new transition. - * A new transition is not required if the current state's URL - * and the new URL are already identical - */ - var handler = function (match) { - var $state = router.stateService; - var globals = router.globals; - if ($state.href(state, match) !== $state.href(globals.current, globals.params)) { - $state.transitionTo(state, match, { inherit: true, source: 'url' }); - } - }; - var details = { state: state, type: 'STATE' }; - return (0,_common_common__WEBPACK_IMPORTED_MODULE_2__.extend)(this.fromUrlMatcher(state.url, handler), details); - }; - /** - * A UrlRule which matches based on a regular expression - * - * The `handler` may be either a [[UrlRuleHandlerFn]] or a string. - * - * ## Handler as a function - * - * If `handler` is a function, the function is invoked with: - * - * - regexp match array (from `regexp`) - * - url: the current Url ([[UrlParts]]) - * - router: the router object ([[UIRouter]]) - * - * #### Example: - * ```js - * var rule = factory.fromRegExp(/^\/foo\/(bar|baz)$/, match => "/home/" + match[1]) - * var match = rule.match('/foo/bar'); // results in [ '/foo/bar', 'bar' ] - * var result = rule.handler(match); // '/home/bar' - * ``` - * - * ## Handler as string - * - * If `handler` is a string, the url is *replaced by the string* when the Rule is invoked. - * The string is first interpolated using `string.replace()` style pattern. - * - * #### Example: - * ```js - * var rule = factory.fromRegExp(/^\/foo\/(bar|baz)$/, "/home/$1") - * var match = rule.match('/foo/bar'); // results in [ '/foo/bar', 'bar' ] - * var result = rule.handler(match); // '/home/bar' - * ``` - */ - UrlRuleFactory.prototype.fromRegExp = function (regexp, handler) { - if (regexp.global || regexp.sticky) - throw new Error('Rule RegExp must not be global or sticky'); - /** - * If handler is a string, the url will be replaced by the string. - * If the string has any String.replace() style variables in it (like `$2`), - * they will be replaced by the captures from [[match]] - */ - var redirectUrlTo = function (match) { - // Interpolates matched values into $1 $2, etc using a String.replace()-style pattern - return handler.replace(/\$(\$|\d{1,2})/, function (m, what) { return match[what === '$' ? 0 : Number(what)]; }); - }; - var _handler = (0,_common_predicates__WEBPACK_IMPORTED_MODULE_1__.isString)(handler) ? redirectUrlTo : handler; - var matchParamsFromRegexp = function (url) { return regexp.exec(url.path); }; - var details = { regexp: regexp, type: 'REGEXP' }; - return (0,_common_common__WEBPACK_IMPORTED_MODULE_2__.extend)(new BaseUrlRule(matchParamsFromRegexp, _handler), details); - }; - UrlRuleFactory.isUrlRule = function (obj) { return obj && ['type', 'match', 'handler'].every(function (key) { return (0,_common_predicates__WEBPACK_IMPORTED_MODULE_1__.isDefined)(obj[key]); }); }; - return UrlRuleFactory; -}()); - -/** - * A base rule which calls `match` - * - * The value from the `match` function is passed through to the `handler`. - * @internal - */ -var BaseUrlRule = /** @class */ (function () { - function BaseUrlRule(match, handler) { - var _this = this; - this.match = match; - this.type = 'RAW'; - this.matchPriority = function (match) { return 0 - _this.$id; }; - this.handler = handler || _common_common__WEBPACK_IMPORTED_MODULE_2__.identity; - } - return BaseUrlRule; -}()); - -//# sourceMappingURL=urlRule.js.map - -/***/ }), - -/***/ "./node_modules/@uirouter/core/lib-esm/url/urlRules.js": -/*!*************************************************************!*\ - !*** ./node_modules/@uirouter/core/lib-esm/url/urlRules.js ***! - \*************************************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "UrlRules": () => (/* binding */ UrlRules) -/* harmony export */ }); -/* harmony import */ var _state__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../state */ "./node_modules/@uirouter/core/lib-esm/state/index.js"); -/* harmony import */ var _urlMatcher__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./urlMatcher */ "./node_modules/@uirouter/core/lib-esm/url/urlMatcher.js"); -/* harmony import */ var _common__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../common */ "./node_modules/@uirouter/core/lib-esm/common/index.js"); -/* harmony import */ var _urlRule__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./urlRule */ "./node_modules/@uirouter/core/lib-esm/url/urlRule.js"); - - - - -var prioritySort = function (a, b) { return (b.priority || 0) - (a.priority || 0); }; -var typeSort = function (a, b) { - var weights = { STATE: 4, URLMATCHER: 4, REGEXP: 3, RAW: 2, OTHER: 1 }; - return (weights[a.type] || 0) - (weights[b.type] || 0); -}; -var urlMatcherSort = function (a, b) { - return !a.urlMatcher || !b.urlMatcher ? 0 : _urlMatcher__WEBPACK_IMPORTED_MODULE_1__.UrlMatcher.compare(a.urlMatcher, b.urlMatcher); -}; -var idSort = function (a, b) { - // Identically sorted STATE and URLMATCHER best rule will be chosen by `matchPriority` after each rule matches the URL - var useMatchPriority = { STATE: true, URLMATCHER: true }; - var equal = useMatchPriority[a.type] && useMatchPriority[b.type]; - return equal ? 0 : (a.$id || 0) - (b.$id || 0); -}; -/** - * Default rule priority sorting function. - * - * Sorts rules by: - * - * - Explicit priority (set rule priority using [[UrlRules.when]]) - * - Rule type (STATE: 4, URLMATCHER: 4, REGEXP: 3, RAW: 2, OTHER: 1) - * - `UrlMatcher` specificity ([[UrlMatcher.compare]]): works for STATE and URLMATCHER types to pick the most specific rule. - * - Rule registration order (for rule types other than STATE and URLMATCHER) - * - Equally sorted State and UrlMatcher rules will each match the URL. - * Then, the *best* match is chosen based on how many parameter values were matched. - */ -var defaultRuleSortFn; -defaultRuleSortFn = function (a, b) { - var cmp = prioritySort(a, b); - if (cmp !== 0) - return cmp; - cmp = typeSort(a, b); - if (cmp !== 0) - return cmp; - cmp = urlMatcherSort(a, b); - if (cmp !== 0) - return cmp; - return idSort(a, b); -}; -function getHandlerFn(handler) { - if (!(0,_common__WEBPACK_IMPORTED_MODULE_2__.isFunction)(handler) && !(0,_common__WEBPACK_IMPORTED_MODULE_2__.isString)(handler) && !(0,_common__WEBPACK_IMPORTED_MODULE_2__.is)(_state__WEBPACK_IMPORTED_MODULE_0__.TargetState)(handler) && !_state__WEBPACK_IMPORTED_MODULE_0__.TargetState.isDef(handler)) { - throw new Error("'handler' must be a string, function, TargetState, or have a state: 'newtarget' property"); - } - return (0,_common__WEBPACK_IMPORTED_MODULE_2__.isFunction)(handler) ? handler : (0,_common__WEBPACK_IMPORTED_MODULE_2__.val)(handler); -} -/** - * API for managing URL rules - * - * This API is used to create and manage URL rules. - * URL rules are a mechanism to respond to specific URL patterns. - * - * The most commonly used methods are [[otherwise]] and [[when]]. - * - * This API is found at `router.urlService.rules` (see: [[UIRouter.urlService]], [[URLService.rules]]) - */ -var UrlRules = /** @class */ (function () { - /** @internal */ - function UrlRules(/** @internal */ router) { - this.router = router; - /** @internal */ this._sortFn = defaultRuleSortFn; - /** @internal */ this._rules = []; - /** @internal */ this._id = 0; - this.urlRuleFactory = new _urlRule__WEBPACK_IMPORTED_MODULE_3__.UrlRuleFactory(router); - } - /** @internal */ - UrlRules.prototype.dispose = function (router) { - this._rules = []; - delete this._otherwiseFn; - }; - /** - * Defines the initial state, path, or behavior to use when the app starts. - * - * This rule defines the initial/starting state for the application. - * - * This rule is triggered the first time the URL is checked (when the app initially loads). - * The rule is triggered only when the url matches either `""` or `"/"`. - * - * Note: The rule is intended to be used when the root of the application is directly linked to. - * When the URL is *not* `""` or `"/"` and doesn't match other rules, the [[otherwise]] rule is triggered. - * This allows 404-like behavior when an unknown URL is deep-linked. - * - * #### Example: - * Start app at `home` state. - * ```js - * .initial({ state: 'home' }); - * ``` - * - * #### Example: - * Start app at `/home` (by url) - * ```js - * .initial('/home'); - * ``` - * - * #### Example: - * When no other url rule matches, go to `home` state - * ```js - * .initial((matchValue, url, router) => { - * console.log('initial state'); - * return { state: 'home' }; - * }) - * ``` - * - * @param handler The initial state or url path, or a function which returns the state or url path (or performs custom logic). - */ - UrlRules.prototype.initial = function (handler) { - var handlerFn = getHandlerFn(handler); - var matchFn = function (urlParts, router) { - return router.globals.transitionHistory.size() === 0 && !!/^\/?$/.exec(urlParts.path); - }; - this.rule(this.urlRuleFactory.create(matchFn, handlerFn)); - }; - /** - * Defines the state, url, or behavior to use when no other rule matches the URL. - * - * This rule is matched when *no other rule* matches. - * It is generally used to handle unknown URLs (similar to "404" behavior, but on the client side). - * - * - If `handler` a string, it is treated as a url redirect - * - * #### Example: - * When no other url rule matches, redirect to `/index` - * ```js - * .otherwise('/index'); - * ``` - * - * - If `handler` is an object with a `state` property, the state is activated. - * - * #### Example: - * When no other url rule matches, redirect to `home` and provide a `dashboard` parameter value. - * ```js - * .otherwise({ state: 'home', params: { dashboard: 'default' } }); - * ``` - * - * - If `handler` is a function, the function receives the current url ([[UrlParts]]) and the [[UIRouter]] object. - * The function can perform actions, and/or return a value. - * - * #### Example: - * When no other url rule matches, manually trigger a transition to the `home` state - * ```js - * .otherwise((matchValue, urlParts, router) => { - * router.stateService.go('home'); - * }); - * ``` - * - * #### Example: - * When no other url rule matches, go to `home` state - * ```js - * .otherwise((matchValue, urlParts, router) => { - * return { state: 'home' }; - * }); - * ``` - * - * @param handler The url path to redirect to, or a function which returns the url path (or performs custom logic). - */ - UrlRules.prototype.otherwise = function (handler) { - var handlerFn = getHandlerFn(handler); - this._otherwiseFn = this.urlRuleFactory.create((0,_common__WEBPACK_IMPORTED_MODULE_2__.val)(true), handlerFn); - this._sorted = false; - }; - /** - * Remove a rule previously registered - * - * @param rule the matcher rule that was previously registered using [[rule]] - */ - UrlRules.prototype.removeRule = function (rule) { - (0,_common__WEBPACK_IMPORTED_MODULE_2__.removeFrom)(this._rules, rule); - }; - /** - * Manually adds a URL Rule. - * - * Usually, a url rule is added using [[StateDeclaration.url]] or [[when]]. - * This api can be used directly for more control (to register a [[BaseUrlRule]], for example). - * Rules can be created using [[urlRuleFactory]], or created manually as simple objects. - * - * A rule should have a `match` function which returns truthy if the rule matched. - * It should also have a `handler` function which is invoked if the rule is the best match. - * - * @return a function that deregisters the rule - */ - UrlRules.prototype.rule = function (rule) { - var _this = this; - if (!_urlRule__WEBPACK_IMPORTED_MODULE_3__.UrlRuleFactory.isUrlRule(rule)) - throw new Error('invalid rule'); - rule.$id = this._id++; - rule.priority = rule.priority || 0; - this._rules.push(rule); - this._sorted = false; - return function () { return _this.removeRule(rule); }; - }; - /** - * Gets all registered rules - * - * @returns an array of all the registered rules - */ - UrlRules.prototype.rules = function () { - this.ensureSorted(); - return this._rules.concat(this._otherwiseFn ? [this._otherwiseFn] : []); - }; - /** - * Defines URL Rule priorities - * - * More than one rule ([[UrlRule]]) might match a given URL. - * This `compareFn` is used to sort the rules by priority. - * Higher priority rules should sort earlier. - * - * The [[defaultRuleSortFn]] is used by default. - * - * You only need to call this function once. - * The `compareFn` will be used to sort the rules as each is registered. - * - * If called without any parameter, it will re-sort the rules. - * - * --- - * - * Url rules may come from multiple sources: states's urls ([[StateDeclaration.url]]), [[when]], and [[rule]]. - * Each rule has a (user-provided) [[UrlRule.priority]], a [[UrlRule.type]], and a [[UrlRule.$id]] - * The `$id` is is the order in which the rule was registered. - * - * The sort function should use these data, or data found on a specific type - * of [[UrlRule]] (such as [[StateRule.state]]), to order the rules as desired. - * - * #### Example: - * This compare function prioritizes rules by the order in which the rules were registered. - * A rule registered earlier has higher priority. - * - * ```js - * function compareFn(a, b) { - * return a.$id - b.$id; - * } - * ``` - * - * @param compareFn a function that compares to [[UrlRule]] objects. - * The `compareFn` should abide by the `Array.sort` compare function rules. - * Given two rules, `a` and `b`, return a negative number if `a` should be higher priority. - * Return a positive number if `b` should be higher priority. - * Return `0` if the rules are identical. - * - * See the [mozilla reference](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort#Description) - * for details. - */ - UrlRules.prototype.sort = function (compareFn) { - var sorted = this.stableSort(this._rules, (this._sortFn = compareFn || this._sortFn)); - // precompute _sortGroup values and apply to each rule - var group = 0; - for (var i = 0; i < sorted.length; i++) { - sorted[i]._group = group; - if (i < sorted.length - 1 && this._sortFn(sorted[i], sorted[i + 1]) !== 0) { - group++; - } - } - this._rules = sorted; - this._sorted = true; - }; - /** @internal */ - UrlRules.prototype.ensureSorted = function () { - this._sorted || this.sort(); - }; - /** @internal */ - UrlRules.prototype.stableSort = function (arr, compareFn) { - var arrOfWrapper = arr.map(function (elem, idx) { return ({ elem: elem, idx: idx }); }); - arrOfWrapper.sort(function (wrapperA, wrapperB) { - var cmpDiff = compareFn(wrapperA.elem, wrapperB.elem); - return cmpDiff === 0 ? wrapperA.idx - wrapperB.idx : cmpDiff; - }); - return arrOfWrapper.map(function (wrapper) { return wrapper.elem; }); - }; - /** - * Registers a `matcher` and `handler` for custom URLs handling. - * - * The `matcher` can be: - * - * - a [[UrlMatcher]]: See: [[UrlMatcherFactory.compile]] - * - a `string`: The string is compiled to a [[UrlMatcher]] - * - a `RegExp`: The regexp is used to match the url. - * - * The `handler` can be: - * - * - a string: The url is redirected to the value of the string. - * - a function: The url is redirected to the return value of the function. - * - * --- - * - * When the `handler` is a `string` and the `matcher` is a `UrlMatcher` (or string), the redirect - * string is interpolated with parameter values. - * - * #### Example: - * When the URL is `/foo/123` the rule will redirect to `/bar/123`. - * ```js - * .when("/foo/:param1", "/bar/:param1") - * ``` - * - * --- - * - * When the `handler` is a string and the `matcher` is a `RegExp`, the redirect string is - * interpolated with capture groups from the RegExp. - * - * #### Example: - * When the URL is `/foo/123` the rule will redirect to `/bar/123`. - * ```js - * .when(new RegExp("^/foo/(.*)$"), "/bar/$1"); - * ``` - * - * --- - * - * When the handler is a function, it receives the matched value, the current URL, and the `UIRouter` object (See [[UrlRuleHandlerFn]]). - * The "matched value" differs based on the `matcher`. - * For [[UrlMatcher]]s, it will be the matched state params. - * For `RegExp`, it will be the match array from `regexp.exec()`. - * - * If the handler returns a string, the URL is redirected to the string. - * - * #### Example: - * When the URL is `/foo/123` the rule will redirect to `/bar/123`. - * ```js - * .when(new RegExp("^/foo/(.*)$"), match => "/bar/" + match[1]); - * ``` - * - * Note: the `handler` may also invoke arbitrary code, such as `$state.go()` - * - * @param matcher A pattern `string` to match, compiled as a [[UrlMatcher]], or a `RegExp`. - * @param handler The path to redirect to, or a function that returns the path. - * @param options `{ priority: number }` - * - * @return the registered [[UrlRule]] - */ - UrlRules.prototype.when = function (matcher, handler, options) { - var rule = this.urlRuleFactory.create(matcher, handler); - if ((0,_common__WEBPACK_IMPORTED_MODULE_2__.isDefined)(options && options.priority)) - rule.priority = options.priority; - this.rule(rule); - return rule; - }; - return UrlRules; -}()); - -//# sourceMappingURL=urlRules.js.map - -/***/ }), - -/***/ "./node_modules/@uirouter/core/lib-esm/url/urlService.js": -/*!***************************************************************!*\ - !*** ./node_modules/@uirouter/core/lib-esm/url/urlService.js ***! - \***************************************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "UrlService": () => (/* binding */ UrlService) -/* harmony export */ }); -/* harmony import */ var _common__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../common */ "./node_modules/@uirouter/core/lib-esm/common/index.js"); -/* harmony import */ var _urlRules__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./urlRules */ "./node_modules/@uirouter/core/lib-esm/url/urlRules.js"); -/* harmony import */ var _urlConfig__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./urlConfig */ "./node_modules/@uirouter/core/lib-esm/url/urlConfig.js"); -/* harmony import */ var _state__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../state */ "./node_modules/@uirouter/core/lib-esm/state/index.js"); - - - - -/** - * API for URL management - */ -var UrlService = /** @class */ (function () { - /** @internal */ - function UrlService(/** @internal */ router) { - var _this = this; - this.router = router; - /** @internal */ this.interceptDeferred = false; - /** - * The nested [[UrlRules]] API for managing URL rules and rewrites - * - * See: [[UrlRules]] for details - */ - this.rules = new _urlRules__WEBPACK_IMPORTED_MODULE_1__.UrlRules(this.router); - /** - * The nested [[UrlConfig]] API to configure the URL and retrieve URL information - * - * See: [[UrlConfig]] for details - */ - this.config = new _urlConfig__WEBPACK_IMPORTED_MODULE_2__.UrlConfig(this.router); - // Delegate these calls to the current LocationServices implementation - /** - * Gets the current url, or updates the url - * - * ### Getting the current URL - * - * When no arguments are passed, returns the current URL. - * The URL is normalized using the internal [[path]]/[[search]]/[[hash]] values. - * - * For example, the URL may be stored in the hash ([[HashLocationServices]]) or - * have a base HREF prepended ([[PushStateLocationServices]]). - * - * The raw URL in the browser might be: - * - * ``` - * http://mysite.com/somepath/index.html#/internal/path/123?param1=foo#anchor - * ``` - * - * or - * - * ``` - * http://mysite.com/basepath/internal/path/123?param1=foo#anchor - * ``` - * - * then this method returns: - * - * ``` - * /internal/path/123?param1=foo#anchor - * ``` - * - * - * #### Example: - * ```js - * locationServices.url(); // "/some/path?query=value#anchor" - * ``` - * - * ### Updating the URL - * - * When `newurl` arguments is provided, changes the URL to reflect `newurl` - * - * #### Example: - * ```js - * locationServices.url("/some/path?query=value#anchor", true); - * ``` - * - * @param newurl The new value for the URL. - * This url should reflect only the new internal [[path]], [[search]], and [[hash]] values. - * It should not include the protocol, site, port, or base path of an absolute HREF. - * @param replace When true, replaces the current history entry (instead of appending it) with this new url - * @param state The history's state object, i.e., pushState (if the LocationServices implementation supports it) - * - * @return the url (after potentially being processed) - */ - this.url = function (newurl, replace, state) { - return _this.router.locationService.url(newurl, replace, state); - }; - /** - * Gets the path part of the current url - * - * If the current URL is `/some/path?query=value#anchor`, this returns `/some/path` - * - * @return the path portion of the url - */ - this.path = function () { return _this.router.locationService.path(); }; - /** - * Gets the search part of the current url as an object - * - * If the current URL is `/some/path?query=value#anchor`, this returns `{ query: 'value' }` - * - * @return the search (query) portion of the url, as an object - */ - this.search = function () { return _this.router.locationService.search(); }; - /** - * Gets the hash part of the current url - * - * If the current URL is `/some/path?query=value#anchor`, this returns `anchor` - * - * @return the hash (anchor) portion of the url - */ - this.hash = function () { return _this.router.locationService.hash(); }; - /** - * @internal - * - * Registers a low level url change handler - * - * Note: Because this is a low level handler, it's not recommended for general use. - * - * #### Example: - * ```js - * let deregisterFn = locationServices.onChange((evt) => console.log("url change", evt)); - * ``` - * - * @param callback a function that will be called when the url is changing - * @return a function that de-registers the callback - */ - this.onChange = function (callback) { return _this.router.locationService.onChange(callback); }; - } - /** @internal */ - UrlService.prototype.dispose = function () { - this.listen(false); - this.rules.dispose(); - }; - /** - * Gets the current URL parts - * - * This method returns the different parts of the current URL (the [[path]], [[search]], and [[hash]]) as a [[UrlParts]] object. - */ - UrlService.prototype.parts = function () { - return { path: this.path(), search: this.search(), hash: this.hash() }; - }; - /** - * Activates the best rule for the current URL - * - * Checks the current URL for a matching [[UrlRule]], then invokes that rule's handler. - * This method is called internally any time the URL has changed. - * - * This effectively activates the state (or redirect, etc) which matches the current URL. - * - * #### Example: - * ```js - * urlService.deferIntercept(); - * - * fetch('/states.json').then(resp => resp.json()).then(data => { - * data.forEach(state => $stateRegistry.register(state)); - * urlService.listen(); - * // Find the matching URL and invoke the handler. - * urlService.sync(); - * }); - * ``` - */ - UrlService.prototype.sync = function (evt) { - if (evt && evt.defaultPrevented) - return; - var _a = this.router, urlService = _a.urlService, stateService = _a.stateService; - var url = { path: urlService.path(), search: urlService.search(), hash: urlService.hash() }; - var best = this.match(url); - var applyResult = (0,_common__WEBPACK_IMPORTED_MODULE_0__.pattern)([ - [_common__WEBPACK_IMPORTED_MODULE_0__.isString, function (newurl) { return urlService.url(newurl, true); }], - [_state__WEBPACK_IMPORTED_MODULE_3__.TargetState.isDef, function (def) { return stateService.go(def.state, def.params, def.options); }], - [(0,_common__WEBPACK_IMPORTED_MODULE_0__.is)(_state__WEBPACK_IMPORTED_MODULE_3__.TargetState), function (target) { return stateService.go(target.state(), target.params(), target.options()); }], - ]); - applyResult(best && best.rule.handler(best.match, url, this.router)); - }; - /** - * Starts or stops listening for URL changes - * - * Call this sometime after calling [[deferIntercept]] to start monitoring the url. - * This causes UI-Router to start listening for changes to the URL, if it wasn't already listening. - * - * If called with `false`, UI-Router will stop listening (call listen(true) to start listening again). - * - * #### Example: - * ```js - * urlService.deferIntercept(); - * - * fetch('/states.json').then(resp => resp.json()).then(data => { - * data.forEach(state => $stateRegistry.register(state)); - * // Start responding to URL changes - * urlService.listen(); - * urlService.sync(); - * }); - * ``` - * - * @param enabled `true` or `false` to start or stop listening to URL changes - */ - UrlService.prototype.listen = function (enabled) { - var _this = this; - if (enabled === false) { - this._stopListeningFn && this._stopListeningFn(); - delete this._stopListeningFn; - } - else { - return (this._stopListeningFn = - this._stopListeningFn || this.router.urlService.onChange(function (evt) { return _this.sync(evt); })); - } - }; - /** - * Disables monitoring of the URL. - * - * Call this method before UI-Router has bootstrapped. - * It will stop UI-Router from performing the initial url sync. - * - * This can be useful to perform some asynchronous initialization before the router starts. - * Once the initialization is complete, call [[listen]] to tell UI-Router to start watching and synchronizing the URL. - * - * #### Example: - * ```js - * // Prevent UI-Router from automatically intercepting URL changes when it starts; - * urlService.deferIntercept(); - * - * fetch('/states.json').then(resp => resp.json()).then(data => { - * data.forEach(state => $stateRegistry.register(state)); - * urlService.listen(); - * urlService.sync(); - * }); - * ``` - * - * @param defer Indicates whether to defer location change interception. - * Passing no parameter is equivalent to `true`. - */ - UrlService.prototype.deferIntercept = function (defer) { - if (defer === undefined) - defer = true; - this.interceptDeferred = defer; - }; - /** - * Matches a URL - * - * Given a URL (as a [[UrlParts]] object), check all rules and determine the best matching rule. - * Return the result as a [[MatchResult]]. - */ - UrlService.prototype.match = function (url) { - var _this = this; - url = (0,_common__WEBPACK_IMPORTED_MODULE_0__.extend)({ path: '', search: {}, hash: '' }, url); - var rules = this.rules.rules(); - // Checks a single rule. Returns { rule: rule, match: match, weight: weight } if it matched, or undefined - var checkRule = function (rule) { - var match = rule.match(url, _this.router); - return match && { match: match, rule: rule, weight: rule.matchPriority(match) }; - }; - // The rules are pre-sorted. - // - Find the first matching rule. - // - Find any other matching rule that sorted *exactly the same*, according to `.sort()`. - // - Choose the rule with the highest match weight. - var best; - for (var i = 0; i < rules.length; i++) { - // Stop when there is a 'best' rule and the next rule sorts differently than it. - if (best && best.rule._group !== rules[i]._group) - break; - var current = checkRule(rules[i]); - // Pick the best MatchResult - best = !best || (current && current.weight > best.weight) ? current : best; - } - return best; - }; - return UrlService; -}()); - -//# sourceMappingURL=urlService.js.map - -/***/ }), - -/***/ "./node_modules/@uirouter/core/lib-esm/vanilla.js": -/*!********************************************************!*\ - !*** ./node_modules/@uirouter/core/lib-esm/vanilla.js ***! - \********************************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _vanilla_index__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./vanilla/index */ "./node_modules/@uirouter/core/lib-esm/vanilla/index.js"); -/* harmony reexport (unknown) */ var __WEBPACK_REEXPORT_OBJECT__ = {}; -/* harmony reexport (unknown) */ for(const __WEBPACK_IMPORT_KEY__ in _vanilla_index__WEBPACK_IMPORTED_MODULE_0__) if(__WEBPACK_IMPORT_KEY__ !== "default") __WEBPACK_REEXPORT_OBJECT__[__WEBPACK_IMPORT_KEY__] = () => _vanilla_index__WEBPACK_IMPORTED_MODULE_0__[__WEBPACK_IMPORT_KEY__] -/* harmony reexport (unknown) */ __webpack_require__.d(__webpack_exports__, __WEBPACK_REEXPORT_OBJECT__); - -//# sourceMappingURL=vanilla.js.map - -/***/ }), - -/***/ "./node_modules/@uirouter/core/lib-esm/vanilla/baseLocationService.js": -/*!****************************************************************************!*\ - !*** ./node_modules/@uirouter/core/lib-esm/vanilla/baseLocationService.js ***! - \****************************************************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "BaseLocationServices": () => (/* binding */ BaseLocationServices) -/* harmony export */ }); -/* harmony import */ var _common__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../common */ "./node_modules/@uirouter/core/lib-esm/common/index.js"); -/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./utils */ "./node_modules/@uirouter/core/lib-esm/vanilla/utils.js"); - - -/** A base `LocationServices` */ -var BaseLocationServices = /** @class */ (function () { - function BaseLocationServices(router, fireAfterUpdate) { - var _this = this; - this.fireAfterUpdate = fireAfterUpdate; - this._listeners = []; - this._listener = function (evt) { return _this._listeners.forEach(function (cb) { return cb(evt); }); }; - this.hash = function () { return (0,_utils__WEBPACK_IMPORTED_MODULE_1__.parseUrl)(_this._get()).hash; }; - this.path = function () { return (0,_utils__WEBPACK_IMPORTED_MODULE_1__.parseUrl)(_this._get()).path; }; - this.search = function () { return (0,_utils__WEBPACK_IMPORTED_MODULE_1__.getParams)((0,_utils__WEBPACK_IMPORTED_MODULE_1__.parseUrl)(_this._get()).search); }; - this._location = _common__WEBPACK_IMPORTED_MODULE_0__.root.location; - this._history = _common__WEBPACK_IMPORTED_MODULE_0__.root.history; - } - BaseLocationServices.prototype.url = function (url, replace) { - if (replace === void 0) { replace = true; } - if ((0,_common__WEBPACK_IMPORTED_MODULE_0__.isDefined)(url) && url !== this._get()) { - this._set(null, null, url, replace); - if (this.fireAfterUpdate) { - this._listeners.forEach(function (cb) { return cb({ url: url }); }); - } - } - return (0,_utils__WEBPACK_IMPORTED_MODULE_1__.buildUrl)(this); - }; - BaseLocationServices.prototype.onChange = function (cb) { - var _this = this; - this._listeners.push(cb); - return function () { return (0,_common__WEBPACK_IMPORTED_MODULE_0__.removeFrom)(_this._listeners, cb); }; - }; - BaseLocationServices.prototype.dispose = function (router) { - (0,_common__WEBPACK_IMPORTED_MODULE_0__.deregAll)(this._listeners); - }; - return BaseLocationServices; -}()); - -//# sourceMappingURL=baseLocationService.js.map - -/***/ }), - -/***/ "./node_modules/@uirouter/core/lib-esm/vanilla/browserLocationConfig.js": -/*!******************************************************************************!*\ - !*** ./node_modules/@uirouter/core/lib-esm/vanilla/browserLocationConfig.js ***! - \******************************************************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "BrowserLocationConfig": () => (/* binding */ BrowserLocationConfig) -/* harmony export */ }); -/* harmony import */ var _common_predicates__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../common/predicates */ "./node_modules/@uirouter/core/lib-esm/common/predicates.js"); - -/** A `LocationConfig` that delegates to the browser's `location` object */ -var BrowserLocationConfig = /** @class */ (function () { - function BrowserLocationConfig(router, _isHtml5) { - if (_isHtml5 === void 0) { _isHtml5 = false; } - this._isHtml5 = _isHtml5; - this._baseHref = undefined; - this._hashPrefix = ''; - } - BrowserLocationConfig.prototype.port = function () { - if (location.port) { - return Number(location.port); - } - return this.protocol() === 'https' ? 443 : 80; - }; - BrowserLocationConfig.prototype.protocol = function () { - return location.protocol.replace(/:/g, ''); - }; - BrowserLocationConfig.prototype.host = function () { - return location.hostname; - }; - BrowserLocationConfig.prototype.html5Mode = function () { - return this._isHtml5; - }; - BrowserLocationConfig.prototype.hashPrefix = function (newprefix) { - return (0,_common_predicates__WEBPACK_IMPORTED_MODULE_0__.isDefined)(newprefix) ? (this._hashPrefix = newprefix) : this._hashPrefix; - }; - BrowserLocationConfig.prototype.baseHref = function (href) { - if ((0,_common_predicates__WEBPACK_IMPORTED_MODULE_0__.isDefined)(href)) - this._baseHref = href; - if ((0,_common_predicates__WEBPACK_IMPORTED_MODULE_0__.isUndefined)(this._baseHref)) - this._baseHref = this.getBaseHref(); - return this._baseHref; - }; - BrowserLocationConfig.prototype.getBaseHref = function () { - var baseTag = document.getElementsByTagName('base')[0]; - if (baseTag && baseTag.href) { - return baseTag.href.replace(/^([^/:]*:)?\/\/[^/]*/, ''); - } - return this._isHtml5 ? '/' : location.pathname || '/'; - }; - BrowserLocationConfig.prototype.dispose = function () { }; - return BrowserLocationConfig; -}()); - -//# sourceMappingURL=browserLocationConfig.js.map - -/***/ }), - -/***/ "./node_modules/@uirouter/core/lib-esm/vanilla/hashLocationService.js": -/*!****************************************************************************!*\ - !*** ./node_modules/@uirouter/core/lib-esm/vanilla/hashLocationService.js ***! - \****************************************************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "HashLocationService": () => (/* binding */ HashLocationService) -/* harmony export */ }); -/* harmony import */ var _common__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../common */ "./node_modules/@uirouter/core/lib-esm/common/index.js"); -/* harmony import */ var _baseLocationService__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./baseLocationService */ "./node_modules/@uirouter/core/lib-esm/vanilla/baseLocationService.js"); -var __extends = (undefined && undefined.__extends) || (function () { - var extendStatics = function (d, b) { - extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; - return extendStatics(d, b); - }; - return function (d, b) { - extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -})(); - - -/** A `LocationServices` that uses the browser hash "#" to get/set the current location */ -var HashLocationService = /** @class */ (function (_super) { - __extends(HashLocationService, _super); - function HashLocationService(router) { - var _this = _super.call(this, router, false) || this; - _common__WEBPACK_IMPORTED_MODULE_0__.root.addEventListener('hashchange', _this._listener, false); - return _this; - } - HashLocationService.prototype._get = function () { - return (0,_common__WEBPACK_IMPORTED_MODULE_0__.trimHashVal)(this._location.hash); - }; - HashLocationService.prototype._set = function (state, title, url, replace) { - this._location.hash = url; - }; - HashLocationService.prototype.dispose = function (router) { - _super.prototype.dispose.call(this, router); - _common__WEBPACK_IMPORTED_MODULE_0__.root.removeEventListener('hashchange', this._listener); - }; - return HashLocationService; -}(_baseLocationService__WEBPACK_IMPORTED_MODULE_1__.BaseLocationServices)); - -//# sourceMappingURL=hashLocationService.js.map - -/***/ }), - -/***/ "./node_modules/@uirouter/core/lib-esm/vanilla/index.js": -/*!**************************************************************!*\ - !*** ./node_modules/@uirouter/core/lib-esm/vanilla/index.js ***! - \**************************************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "$q": () => (/* reexport safe */ _q__WEBPACK_IMPORTED_MODULE_1__.$q), -/* harmony export */ "$injector": () => (/* reexport safe */ _injector__WEBPACK_IMPORTED_MODULE_2__.$injector), -/* harmony export */ "BaseLocationServices": () => (/* reexport safe */ _baseLocationService__WEBPACK_IMPORTED_MODULE_3__.BaseLocationServices), -/* harmony export */ "HashLocationService": () => (/* reexport safe */ _hashLocationService__WEBPACK_IMPORTED_MODULE_4__.HashLocationService), -/* harmony export */ "MemoryLocationService": () => (/* reexport safe */ _memoryLocationService__WEBPACK_IMPORTED_MODULE_5__.MemoryLocationService), -/* harmony export */ "PushStateLocationService": () => (/* reexport safe */ _pushStateLocationService__WEBPACK_IMPORTED_MODULE_6__.PushStateLocationService), -/* harmony export */ "MemoryLocationConfig": () => (/* reexport safe */ _memoryLocationConfig__WEBPACK_IMPORTED_MODULE_7__.MemoryLocationConfig), -/* harmony export */ "BrowserLocationConfig": () => (/* reexport safe */ _browserLocationConfig__WEBPACK_IMPORTED_MODULE_8__.BrowserLocationConfig), -/* harmony export */ "buildUrl": () => (/* reexport safe */ _utils__WEBPACK_IMPORTED_MODULE_9__.buildUrl), -/* harmony export */ "getParams": () => (/* reexport safe */ _utils__WEBPACK_IMPORTED_MODULE_9__.getParams), -/* harmony export */ "keyValsToObjectR": () => (/* reexport safe */ _utils__WEBPACK_IMPORTED_MODULE_9__.keyValsToObjectR), -/* harmony export */ "locationPluginFactory": () => (/* reexport safe */ _utils__WEBPACK_IMPORTED_MODULE_9__.locationPluginFactory), -/* harmony export */ "parseUrl": () => (/* reexport safe */ _utils__WEBPACK_IMPORTED_MODULE_9__.parseUrl), -/* harmony export */ "hashLocationPlugin": () => (/* reexport safe */ _plugins__WEBPACK_IMPORTED_MODULE_10__.hashLocationPlugin), -/* harmony export */ "memoryLocationPlugin": () => (/* reexport safe */ _plugins__WEBPACK_IMPORTED_MODULE_10__.memoryLocationPlugin), -/* harmony export */ "pushStateLocationPlugin": () => (/* reexport safe */ _plugins__WEBPACK_IMPORTED_MODULE_10__.pushStateLocationPlugin), -/* harmony export */ "servicesPlugin": () => (/* reexport safe */ _plugins__WEBPACK_IMPORTED_MODULE_10__.servicesPlugin) -/* harmony export */ }); -/* harmony import */ var _interface__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./interface */ "./node_modules/@uirouter/core/lib-esm/vanilla/interface.js"); -/* harmony import */ var _interface__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_interface__WEBPACK_IMPORTED_MODULE_0__); -/* harmony reexport (unknown) */ var __WEBPACK_REEXPORT_OBJECT__ = {}; -/* harmony reexport (unknown) */ for(const __WEBPACK_IMPORT_KEY__ in _interface__WEBPACK_IMPORTED_MODULE_0__) if(__WEBPACK_IMPORT_KEY__ !== "default") __WEBPACK_REEXPORT_OBJECT__[__WEBPACK_IMPORT_KEY__] = () => _interface__WEBPACK_IMPORTED_MODULE_0__[__WEBPACK_IMPORT_KEY__] -/* harmony reexport (unknown) */ __webpack_require__.d(__webpack_exports__, __WEBPACK_REEXPORT_OBJECT__); -/* harmony import */ var _q__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./q */ "./node_modules/@uirouter/core/lib-esm/vanilla/q.js"); -/* harmony import */ var _injector__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./injector */ "./node_modules/@uirouter/core/lib-esm/vanilla/injector.js"); -/* harmony import */ var _baseLocationService__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./baseLocationService */ "./node_modules/@uirouter/core/lib-esm/vanilla/baseLocationService.js"); -/* harmony import */ var _hashLocationService__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./hashLocationService */ "./node_modules/@uirouter/core/lib-esm/vanilla/hashLocationService.js"); -/* harmony import */ var _memoryLocationService__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./memoryLocationService */ "./node_modules/@uirouter/core/lib-esm/vanilla/memoryLocationService.js"); -/* harmony import */ var _pushStateLocationService__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./pushStateLocationService */ "./node_modules/@uirouter/core/lib-esm/vanilla/pushStateLocationService.js"); -/* harmony import */ var _memoryLocationConfig__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./memoryLocationConfig */ "./node_modules/@uirouter/core/lib-esm/vanilla/memoryLocationConfig.js"); -/* harmony import */ var _browserLocationConfig__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./browserLocationConfig */ "./node_modules/@uirouter/core/lib-esm/vanilla/browserLocationConfig.js"); -/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./utils */ "./node_modules/@uirouter/core/lib-esm/vanilla/utils.js"); -/* harmony import */ var _plugins__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./plugins */ "./node_modules/@uirouter/core/lib-esm/vanilla/plugins.js"); -/** - * Naive, pure JS implementation of core ui-router services - * - * @packageDocumentation - */ - - - - - - - - - - - -//# sourceMappingURL=index.js.map - -/***/ }), - -/***/ "./node_modules/@uirouter/core/lib-esm/vanilla/injector.js": -/*!*****************************************************************!*\ - !*** ./node_modules/@uirouter/core/lib-esm/vanilla/injector.js ***! - \*****************************************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "$injector": () => (/* binding */ $injector) -/* harmony export */ }); -/* harmony import */ var _common_index__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../common/index */ "./node_modules/@uirouter/core/lib-esm/common/index.js"); - -// globally available injectables -var globals = {}; -var STRIP_COMMENTS = /((\/\/.*$)|(\/\*[\s\S]*?\*\/))/gm; -var ARGUMENT_NAMES = /([^\s,]+)/g; -/** - * A basic angular1-like injector api - * - * This object implements four methods similar to the - * [angular 1 dependency injector](https://docs.angularjs.org/api/auto/service/$injector) - * - * UI-Router evolved from an angular 1 library to a framework agnostic library. - * However, some of the `@uirouter/core` code uses these ng1 style APIs to support ng1 style dependency injection. - * - * This object provides a naive implementation of a globally scoped dependency injection system. - * It supports the following DI approaches: - * - * ### Function parameter names - * - * A function's `.toString()` is called, and the parameter names are parsed. - * This only works when the parameter names aren't "mangled" by a minifier such as UglifyJS. - * - * ```js - * function injectedFunction(FooService, BarService) { - * // FooService and BarService are injected - * } - * ``` - * - * ### Function annotation - * - * A function may be annotated with an array of dependency names as the `$inject` property. - * - * ```js - * injectedFunction.$inject = [ 'FooService', 'BarService' ]; - * function injectedFunction(fs, bs) { - * // FooService and BarService are injected as fs and bs parameters - * } - * ``` - * - * ### Array notation - * - * An array provides the names of the dependencies to inject (as strings). - * The function is the last element of the array. - * - * ```js - * [ 'FooService', 'BarService', function (fs, bs) { - * // FooService and BarService are injected as fs and bs parameters - * }] - * ``` - * - * @type {$InjectorLike} - */ -var $injector = { - /** Gets an object from DI based on a string token */ - get: function (name) { return globals[name]; }, - /** Returns true if an object named `name` exists in global DI */ - has: function (name) { return $injector.get(name) != null; }, - /** - * Injects a function - * - * @param fn the function to inject - * @param context the function's `this` binding - * @param locals An object with additional DI tokens and values, such as `{ someToken: { foo: 1 } }` - */ - invoke: function (fn, context, locals) { - var all = (0,_common_index__WEBPACK_IMPORTED_MODULE_0__.extend)({}, globals, locals || {}); - var params = $injector.annotate(fn); - var ensureExist = (0,_common_index__WEBPACK_IMPORTED_MODULE_0__.assertPredicate)(function (key) { return all.hasOwnProperty(key); }, function (key) { return "DI can't find injectable: '" + key + "'"; }); - var args = params.filter(ensureExist).map(function (x) { return all[x]; }); - if ((0,_common_index__WEBPACK_IMPORTED_MODULE_0__.isFunction)(fn)) - return fn.apply(context, args); - else - return fn.slice(-1)[0].apply(context, args); - }, - /** - * Returns a function's dependencies - * - * Analyzes a function (or array) and returns an array of DI tokens that the function requires. - * @return an array of `string`s - */ - annotate: function (fn) { - if (!(0,_common_index__WEBPACK_IMPORTED_MODULE_0__.isInjectable)(fn)) - throw new Error("Not an injectable function: " + fn); - if (fn && fn.$inject) - return fn.$inject; - if ((0,_common_index__WEBPACK_IMPORTED_MODULE_0__.isArray)(fn)) - return fn.slice(0, -1); - var fnStr = fn.toString().replace(STRIP_COMMENTS, ''); - var result = fnStr.slice(fnStr.indexOf('(') + 1, fnStr.indexOf(')')).match(ARGUMENT_NAMES); - return result || []; - }, -}; -//# sourceMappingURL=injector.js.map - -/***/ }), - -/***/ "./node_modules/@uirouter/core/lib-esm/vanilla/interface.js": -/*!******************************************************************!*\ - !*** ./node_modules/@uirouter/core/lib-esm/vanilla/interface.js ***! - \******************************************************************/ -/***/ (() => { - -//# sourceMappingURL=interface.js.map - -/***/ }), - -/***/ "./node_modules/@uirouter/core/lib-esm/vanilla/memoryLocationConfig.js": -/*!*****************************************************************************!*\ - !*** ./node_modules/@uirouter/core/lib-esm/vanilla/memoryLocationConfig.js ***! - \*****************************************************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "MemoryLocationConfig": () => (/* binding */ MemoryLocationConfig) -/* harmony export */ }); -/* harmony import */ var _common_predicates__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../common/predicates */ "./node_modules/@uirouter/core/lib-esm/common/predicates.js"); -/* harmony import */ var _common_common__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../common/common */ "./node_modules/@uirouter/core/lib-esm/common/common.js"); - - -/** A `LocationConfig` mock that gets/sets all config from an in-memory object */ -var MemoryLocationConfig = /** @class */ (function () { - function MemoryLocationConfig() { - var _this = this; - this.dispose = _common_common__WEBPACK_IMPORTED_MODULE_1__.noop; - this._baseHref = ''; - this._port = 80; - this._protocol = 'http'; - this._host = 'localhost'; - this._hashPrefix = ''; - this.port = function () { return _this._port; }; - this.protocol = function () { return _this._protocol; }; - this.host = function () { return _this._host; }; - this.baseHref = function () { return _this._baseHref; }; - this.html5Mode = function () { return false; }; - this.hashPrefix = function (newval) { return ((0,_common_predicates__WEBPACK_IMPORTED_MODULE_0__.isDefined)(newval) ? (_this._hashPrefix = newval) : _this._hashPrefix); }; - } - return MemoryLocationConfig; -}()); - -//# sourceMappingURL=memoryLocationConfig.js.map - -/***/ }), - -/***/ "./node_modules/@uirouter/core/lib-esm/vanilla/memoryLocationService.js": -/*!******************************************************************************!*\ - !*** ./node_modules/@uirouter/core/lib-esm/vanilla/memoryLocationService.js ***! - \******************************************************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "MemoryLocationService": () => (/* binding */ MemoryLocationService) -/* harmony export */ }); -/* harmony import */ var _baseLocationService__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./baseLocationService */ "./node_modules/@uirouter/core/lib-esm/vanilla/baseLocationService.js"); -var __extends = (undefined && undefined.__extends) || (function () { - var extendStatics = function (d, b) { - extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; - return extendStatics(d, b); - }; - return function (d, b) { - extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -})(); - -/** A `LocationServices` that gets/sets the current location from an in-memory object */ -var MemoryLocationService = /** @class */ (function (_super) { - __extends(MemoryLocationService, _super); - function MemoryLocationService(router) { - return _super.call(this, router, true) || this; - } - MemoryLocationService.prototype._get = function () { - return this._url; - }; - MemoryLocationService.prototype._set = function (state, title, url, replace) { - this._url = url; - }; - return MemoryLocationService; -}(_baseLocationService__WEBPACK_IMPORTED_MODULE_0__.BaseLocationServices)); - -//# sourceMappingURL=memoryLocationService.js.map - -/***/ }), - -/***/ "./node_modules/@uirouter/core/lib-esm/vanilla/plugins.js": -/*!****************************************************************!*\ - !*** ./node_modules/@uirouter/core/lib-esm/vanilla/plugins.js ***! - \****************************************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "servicesPlugin": () => (/* binding */ servicesPlugin), -/* harmony export */ "hashLocationPlugin": () => (/* binding */ hashLocationPlugin), -/* harmony export */ "pushStateLocationPlugin": () => (/* binding */ pushStateLocationPlugin), -/* harmony export */ "memoryLocationPlugin": () => (/* binding */ memoryLocationPlugin) -/* harmony export */ }); -/* harmony import */ var _browserLocationConfig__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./browserLocationConfig */ "./node_modules/@uirouter/core/lib-esm/vanilla/browserLocationConfig.js"); -/* harmony import */ var _hashLocationService__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./hashLocationService */ "./node_modules/@uirouter/core/lib-esm/vanilla/hashLocationService.js"); -/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./utils */ "./node_modules/@uirouter/core/lib-esm/vanilla/utils.js"); -/* harmony import */ var _pushStateLocationService__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./pushStateLocationService */ "./node_modules/@uirouter/core/lib-esm/vanilla/pushStateLocationService.js"); -/* harmony import */ var _memoryLocationService__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./memoryLocationService */ "./node_modules/@uirouter/core/lib-esm/vanilla/memoryLocationService.js"); -/* harmony import */ var _memoryLocationConfig__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./memoryLocationConfig */ "./node_modules/@uirouter/core/lib-esm/vanilla/memoryLocationConfig.js"); -/* harmony import */ var _injector__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./injector */ "./node_modules/@uirouter/core/lib-esm/vanilla/injector.js"); -/* harmony import */ var _q__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./q */ "./node_modules/@uirouter/core/lib-esm/vanilla/q.js"); -/* harmony import */ var _common_coreservices__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../common/coreservices */ "./node_modules/@uirouter/core/lib-esm/common/coreservices.js"); - - - - - - - - - -function servicesPlugin(router) { - _common_coreservices__WEBPACK_IMPORTED_MODULE_8__.services.$injector = _injector__WEBPACK_IMPORTED_MODULE_6__.$injector; - _common_coreservices__WEBPACK_IMPORTED_MODULE_8__.services.$q = _q__WEBPACK_IMPORTED_MODULE_7__.$q; - return { name: 'vanilla.services', $q: _q__WEBPACK_IMPORTED_MODULE_7__.$q, $injector: _injector__WEBPACK_IMPORTED_MODULE_6__.$injector, dispose: function () { return null; } }; -} -/** A `UIRouterPlugin` uses the browser hash to get/set the current location */ -var hashLocationPlugin = (0,_utils__WEBPACK_IMPORTED_MODULE_2__.locationPluginFactory)('vanilla.hashBangLocation', false, _hashLocationService__WEBPACK_IMPORTED_MODULE_1__.HashLocationService, _browserLocationConfig__WEBPACK_IMPORTED_MODULE_0__.BrowserLocationConfig); -/** A `UIRouterPlugin` that gets/sets the current location using the browser's `location` and `history` apis */ -var pushStateLocationPlugin = (0,_utils__WEBPACK_IMPORTED_MODULE_2__.locationPluginFactory)('vanilla.pushStateLocation', true, _pushStateLocationService__WEBPACK_IMPORTED_MODULE_3__.PushStateLocationService, _browserLocationConfig__WEBPACK_IMPORTED_MODULE_0__.BrowserLocationConfig); -/** A `UIRouterPlugin` that gets/sets the current location from an in-memory object */ -var memoryLocationPlugin = (0,_utils__WEBPACK_IMPORTED_MODULE_2__.locationPluginFactory)('vanilla.memoryLocation', false, _memoryLocationService__WEBPACK_IMPORTED_MODULE_4__.MemoryLocationService, _memoryLocationConfig__WEBPACK_IMPORTED_MODULE_5__.MemoryLocationConfig); -//# sourceMappingURL=plugins.js.map - -/***/ }), - -/***/ "./node_modules/@uirouter/core/lib-esm/vanilla/pushStateLocationService.js": -/*!*********************************************************************************!*\ - !*** ./node_modules/@uirouter/core/lib-esm/vanilla/pushStateLocationService.js ***! - \*********************************************************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "PushStateLocationService": () => (/* binding */ PushStateLocationService) -/* harmony export */ }); -/* harmony import */ var _baseLocationService__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./baseLocationService */ "./node_modules/@uirouter/core/lib-esm/vanilla/baseLocationService.js"); -/* harmony import */ var _common__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../common */ "./node_modules/@uirouter/core/lib-esm/common/index.js"); -var __extends = (undefined && undefined.__extends) || (function () { - var extendStatics = function (d, b) { - extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; - return extendStatics(d, b); - }; - return function (d, b) { - extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -})(); - - -/** - * A `LocationServices` that gets/sets the current location using the browser's `location` and `history` apis - * - * Uses `history.pushState` and `history.replaceState` - */ -var PushStateLocationService = /** @class */ (function (_super) { - __extends(PushStateLocationService, _super); - function PushStateLocationService(router) { - var _this = _super.call(this, router, true) || this; - _this._config = router.urlService.config; - _common__WEBPACK_IMPORTED_MODULE_1__.root.addEventListener('popstate', _this._listener, false); - return _this; - } - /** - * Gets the base prefix without: - * - trailing slash - * - trailing filename - * - protocol and hostname - * - * If , this returns '/base'. - * If , this returns '/foo/base'. - * If , this returns '/base'. - * If , this returns '/base'. - * If , this returns ''. - * If , this returns ''. - * If , this returns ''. - * - * See: https://html.spec.whatwg.org/dev/semantics.html#the-base-element - */ - PushStateLocationService.prototype._getBasePrefix = function () { - return (0,_common__WEBPACK_IMPORTED_MODULE_1__.stripLastPathElement)(this._config.baseHref()); - }; - PushStateLocationService.prototype._get = function () { - var _a = this._location, pathname = _a.pathname, hash = _a.hash, search = _a.search; - search = (0,_common__WEBPACK_IMPORTED_MODULE_1__.splitQuery)(search)[1]; // strip ? if found - hash = (0,_common__WEBPACK_IMPORTED_MODULE_1__.splitHash)(hash)[1]; // strip # if found - var basePrefix = this._getBasePrefix(); - var exactBaseHrefMatch = pathname === this._config.baseHref(); - var startsWithBase = pathname.substr(0, basePrefix.length) === basePrefix; - pathname = exactBaseHrefMatch ? '/' : startsWithBase ? pathname.substring(basePrefix.length) : pathname; - return pathname + (search ? '?' + search : '') + (hash ? '#' + hash : ''); - }; - PushStateLocationService.prototype._set = function (state, title, url, replace) { - var basePrefix = this._getBasePrefix(); - var slash = url && url[0] !== '/' ? '/' : ''; - var fullUrl = url === '' || url === '/' ? this._config.baseHref() : basePrefix + slash + url; - if (replace) { - this._history.replaceState(state, title, fullUrl); - } - else { - this._history.pushState(state, title, fullUrl); - } - }; - PushStateLocationService.prototype.dispose = function (router) { - _super.prototype.dispose.call(this, router); - _common__WEBPACK_IMPORTED_MODULE_1__.root.removeEventListener('popstate', this._listener); - }; - return PushStateLocationService; -}(_baseLocationService__WEBPACK_IMPORTED_MODULE_0__.BaseLocationServices)); - -//# sourceMappingURL=pushStateLocationService.js.map - -/***/ }), - -/***/ "./node_modules/@uirouter/core/lib-esm/vanilla/q.js": -/*!**********************************************************!*\ - !*** ./node_modules/@uirouter/core/lib-esm/vanilla/q.js ***! - \**********************************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "$q": () => (/* binding */ $q) -/* harmony export */ }); -/* harmony import */ var _common_index__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../common/index */ "./node_modules/@uirouter/core/lib-esm/common/index.js"); - -/** - * An angular1-like promise api - * - * This object implements four methods similar to the - * [angular 1 promise api](https://docs.angularjs.org/api/ng/service/$q) - * - * UI-Router evolved from an angular 1 library to a framework agnostic library. - * However, some of the `@uirouter/core` code uses these ng1 style APIs to support ng1 style dependency injection. - * - * This API provides native ES6 promise support wrapped as a $q-like API. - * Internally, UI-Router uses this $q object to perform promise operations. - * The `angular-ui-router` (ui-router for angular 1) uses the $q API provided by angular. - * - * $q-like promise api - */ -var $q = { - /** Normalizes a value as a promise */ - when: function (val) { return new Promise(function (resolve, reject) { return resolve(val); }); }, - /** Normalizes a value as a promise rejection */ - reject: function (val) { - return new Promise(function (resolve, reject) { - reject(val); - }); - }, - /** @returns a deferred object, which has `resolve` and `reject` functions */ - defer: function () { - var deferred = {}; - deferred.promise = new Promise(function (resolve, reject) { - deferred.resolve = resolve; - deferred.reject = reject; - }); - return deferred; - }, - /** Like Promise.all(), but also supports object key/promise notation like $q */ - all: function (promises) { - if ((0,_common_index__WEBPACK_IMPORTED_MODULE_0__.isArray)(promises)) { - return Promise.all(promises); - } - if ((0,_common_index__WEBPACK_IMPORTED_MODULE_0__.isObject)(promises)) { - // Convert promises map to promises array. - // When each promise resolves, map it to a tuple { key: key, val: val } - var chain = Object.keys(promises).map(function (key) { return promises[key].then(function (val) { return ({ key: key, val: val }); }); }); - // Then wait for all promises to resolve, and convert them back to an object - return $q.all(chain).then(function (values) { - return values.reduce(function (acc, tuple) { - acc[tuple.key] = tuple.val; - return acc; - }, {}); - }); - } - }, -}; -//# sourceMappingURL=q.js.map - -/***/ }), - -/***/ "./node_modules/@uirouter/core/lib-esm/vanilla/utils.js": -/*!**************************************************************!*\ - !*** ./node_modules/@uirouter/core/lib-esm/vanilla/utils.js ***! - \**************************************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "keyValsToObjectR": () => (/* binding */ keyValsToObjectR), -/* harmony export */ "getParams": () => (/* binding */ getParams), -/* harmony export */ "parseUrl": () => (/* binding */ parseUrl), -/* harmony export */ "buildUrl": () => (/* binding */ buildUrl), -/* harmony export */ "locationPluginFactory": () => (/* binding */ locationPluginFactory) -/* harmony export */ }); -/* harmony import */ var _common__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../common */ "./node_modules/@uirouter/core/lib-esm/common/index.js"); - -var keyValsToObjectR = function (accum, _a) { - var key = _a[0], val = _a[1]; - if (!accum.hasOwnProperty(key)) { - accum[key] = val; - } - else if ((0,_common__WEBPACK_IMPORTED_MODULE_0__.isArray)(accum[key])) { - accum[key].push(val); - } - else { - accum[key] = [accum[key], val]; - } - return accum; -}; -var getParams = function (queryString) { - return queryString.split('&').filter(_common__WEBPACK_IMPORTED_MODULE_0__.identity).map(_common__WEBPACK_IMPORTED_MODULE_0__.splitEqual).reduce(keyValsToObjectR, {}); -}; -function parseUrl(url) { - var orEmptyString = function (x) { return x || ''; }; - var _a = (0,_common__WEBPACK_IMPORTED_MODULE_0__.splitHash)(url).map(orEmptyString), beforehash = _a[0], hash = _a[1]; - var _b = (0,_common__WEBPACK_IMPORTED_MODULE_0__.splitQuery)(beforehash).map(orEmptyString), path = _b[0], search = _b[1]; - return { path: path, search: search, hash: hash, url: url }; -} -var buildUrl = function (loc) { - var path = loc.path(); - var searchObject = loc.search(); - var hash = loc.hash(); - var search = Object.keys(searchObject) - .map(function (key) { - var param = searchObject[key]; - var vals = (0,_common__WEBPACK_IMPORTED_MODULE_0__.isArray)(param) ? param : [param]; - return vals.map(function (val) { return key + '=' + val; }); - }) - .reduce(_common__WEBPACK_IMPORTED_MODULE_0__.unnestR, []) - .join('&'); - return path + (search ? '?' + search : '') + (hash ? '#' + hash : ''); -}; -function locationPluginFactory(name, isHtml5, serviceClass, configurationClass) { - return function (uiRouter) { - var service = (uiRouter.locationService = new serviceClass(uiRouter)); - var configuration = (uiRouter.locationConfig = new configurationClass(uiRouter, isHtml5)); - function dispose(router) { - router.dispose(service); - router.dispose(configuration); - } - return { name: name, service: service, configuration: configuration, dispose: dispose }; - }; -} -//# sourceMappingURL=utils.js.map - -/***/ }), - -/***/ "./node_modules/@uirouter/core/lib-esm/view/index.js": -/*!***********************************************************!*\ - !*** ./node_modules/@uirouter/core/lib-esm/view/index.js ***! - \***********************************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "ViewService": () => (/* reexport safe */ _view__WEBPACK_IMPORTED_MODULE_1__.ViewService) -/* harmony export */ }); -/* harmony import */ var _interface__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./interface */ "./node_modules/@uirouter/core/lib-esm/view/interface.js"); -/* harmony import */ var _interface__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_interface__WEBPACK_IMPORTED_MODULE_0__); -/* harmony reexport (unknown) */ var __WEBPACK_REEXPORT_OBJECT__ = {}; -/* harmony reexport (unknown) */ for(const __WEBPACK_IMPORT_KEY__ in _interface__WEBPACK_IMPORTED_MODULE_0__) if(__WEBPACK_IMPORT_KEY__ !== "default") __WEBPACK_REEXPORT_OBJECT__[__WEBPACK_IMPORT_KEY__] = () => _interface__WEBPACK_IMPORTED_MODULE_0__[__WEBPACK_IMPORT_KEY__] -/* harmony reexport (unknown) */ __webpack_require__.d(__webpack_exports__, __WEBPACK_REEXPORT_OBJECT__); -/* harmony import */ var _view__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./view */ "./node_modules/@uirouter/core/lib-esm/view/view.js"); - - -//# sourceMappingURL=index.js.map - -/***/ }), - -/***/ "./node_modules/@uirouter/core/lib-esm/view/interface.js": -/*!***************************************************************!*\ - !*** ./node_modules/@uirouter/core/lib-esm/view/interface.js ***! - \***************************************************************/ -/***/ (() => { - -//# sourceMappingURL=interface.js.map - -/***/ }), - -/***/ "./node_modules/@uirouter/core/lib-esm/view/view.js": -/*!**********************************************************!*\ - !*** ./node_modules/@uirouter/core/lib-esm/view/view.js ***! - \**********************************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "ViewService": () => (/* binding */ ViewService) -/* harmony export */ }); -/* harmony import */ var _common_common__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../common/common */ "./node_modules/@uirouter/core/lib-esm/common/common.js"); -/* harmony import */ var _common_hof__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../common/hof */ "./node_modules/@uirouter/core/lib-esm/common/hof.js"); -/* harmony import */ var _common_predicates__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../common/predicates */ "./node_modules/@uirouter/core/lib-esm/common/predicates.js"); -/* harmony import */ var _common_trace__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../common/trace */ "./node_modules/@uirouter/core/lib-esm/common/trace.js"); - - - - -/** - * The View service - * - * This service pairs existing `ui-view` components (which live in the DOM) - * with view configs (from the state declaration objects: [[StateDeclaration.views]]). - * - * - After a successful Transition, the views from the newly entered states are activated via [[activateViewConfig]]. - * The views from exited states are deactivated via [[deactivateViewConfig]]. - * (See: the [[registerActivateViews]] Transition Hook) - * - * - As `ui-view` components pop in and out of existence, they register themselves using [[registerUIView]]. - * - * - When the [[sync]] function is called, the registered `ui-view`(s) ([[ActiveUIView]]) - * are configured with the matching [[ViewConfig]](s) - * - */ -var ViewService = /** @class */ (function () { - /** @internal */ - function ViewService(/** @internal */ router) { - var _this = this; - this.router = router; - /** @internal */ this._uiViews = []; - /** @internal */ this._viewConfigs = []; - /** @internal */ this._viewConfigFactories = {}; - /** @internal */ this._listeners = []; - /** @internal */ - this._pluginapi = { - _rootViewContext: this._rootViewContext.bind(this), - _viewConfigFactory: this._viewConfigFactory.bind(this), - _registeredUIView: function (id) { return (0,_common_common__WEBPACK_IMPORTED_MODULE_0__.find)(_this._uiViews, function (view) { return _this.router.$id + "." + view.id === id; }); }, - _registeredUIViews: function () { return _this._uiViews; }, - _activeViewConfigs: function () { return _this._viewConfigs; }, - _onSync: function (listener) { - _this._listeners.push(listener); - return function () { return (0,_common_common__WEBPACK_IMPORTED_MODULE_0__.removeFrom)(_this._listeners, listener); }; - }, - }; - } - /** - * Normalizes a view's name from a state.views configuration block. - * - * This should be used by a framework implementation to calculate the values for - * [[_ViewDeclaration.$uiViewName]] and [[_ViewDeclaration.$uiViewContextAnchor]]. - * - * @param context the context object (state declaration) that the view belongs to - * @param rawViewName the name of the view, as declared in the [[StateDeclaration.views]] - * - * @returns the normalized uiViewName and uiViewContextAnchor that the view targets - */ - ViewService.normalizeUIViewTarget = function (context, rawViewName) { - if (rawViewName === void 0) { rawViewName = ''; } - // TODO: Validate incoming view name with a regexp to allow: - // ex: "view.name@foo.bar" , "^.^.view.name" , "view.name@^.^" , "" , - // "@" , "$default@^" , "!$default.$default" , "!foo.bar" - var viewAtContext = rawViewName.split('@'); - var uiViewName = viewAtContext[0] || '$default'; // default to unnamed view - var uiViewContextAnchor = (0,_common_predicates__WEBPACK_IMPORTED_MODULE_2__.isString)(viewAtContext[1]) ? viewAtContext[1] : '^'; // default to parent context - // Handle relative view-name sugar syntax. - // Matches rawViewName "^.^.^.foo.bar" into array: ["^.^.^.foo.bar", "^.^.^", "foo.bar"], - var relativeViewNameSugar = /^(\^(?:\.\^)*)\.(.*$)/.exec(uiViewName); - if (relativeViewNameSugar) { - // Clobbers existing contextAnchor (rawViewName validation will fix this) - uiViewContextAnchor = relativeViewNameSugar[1]; // set anchor to "^.^.^" - uiViewName = relativeViewNameSugar[2]; // set view-name to "foo.bar" - } - if (uiViewName.charAt(0) === '!') { - uiViewName = uiViewName.substr(1); - uiViewContextAnchor = ''; // target absolutely from root - } - // handle parent relative targeting "^.^.^" - var relativeMatch = /^(\^(?:\.\^)*)$/; - if (relativeMatch.exec(uiViewContextAnchor)) { - var anchorState = uiViewContextAnchor.split('.').reduce(function (anchor, x) { return anchor.parent; }, context); - uiViewContextAnchor = anchorState.name; - } - else if (uiViewContextAnchor === '.') { - uiViewContextAnchor = context.name; - } - return { uiViewName: uiViewName, uiViewContextAnchor: uiViewContextAnchor }; - }; - /** @internal */ - ViewService.prototype._rootViewContext = function (context) { - return (this._rootContext = context || this._rootContext); - }; - /** @internal */ - ViewService.prototype._viewConfigFactory = function (viewType, factory) { - this._viewConfigFactories[viewType] = factory; - }; - ViewService.prototype.createViewConfig = function (path, decl) { - var cfgFactory = this._viewConfigFactories[decl.$type]; - if (!cfgFactory) - throw new Error('ViewService: No view config factory registered for type ' + decl.$type); - var cfgs = cfgFactory(path, decl); - return (0,_common_predicates__WEBPACK_IMPORTED_MODULE_2__.isArray)(cfgs) ? cfgs : [cfgs]; - }; - /** - * Deactivates a ViewConfig. - * - * This function deactivates a `ViewConfig`. - * After calling [[sync]], it will un-pair from any `ui-view` with which it is currently paired. - * - * @param viewConfig The ViewConfig view to deregister. - */ - ViewService.prototype.deactivateViewConfig = function (viewConfig) { - _common_trace__WEBPACK_IMPORTED_MODULE_3__.trace.traceViewServiceEvent('<- Removing', viewConfig); - (0,_common_common__WEBPACK_IMPORTED_MODULE_0__.removeFrom)(this._viewConfigs, viewConfig); - }; - ViewService.prototype.activateViewConfig = function (viewConfig) { - _common_trace__WEBPACK_IMPORTED_MODULE_3__.trace.traceViewServiceEvent('-> Registering', viewConfig); - this._viewConfigs.push(viewConfig); - }; - ViewService.prototype.sync = function () { - var _this = this; - var uiViewsByFqn = this._uiViews.map(function (uiv) { return [uiv.fqn, uiv]; }).reduce(_common_common__WEBPACK_IMPORTED_MODULE_0__.applyPairs, {}); - // Return a weighted depth value for a uiView. - // The depth is the nesting depth of ui-views (based on FQN; times 10,000) - // plus the depth of the state that is populating the uiView - function uiViewDepth(uiView) { - var stateDepth = function (context) { return (context && context.parent ? stateDepth(context.parent) + 1 : 1); }; - return uiView.fqn.split('.').length * 10000 + stateDepth(uiView.creationContext); - } - // Return the ViewConfig's context's depth in the context tree. - function viewConfigDepth(config) { - var context = config.viewDecl.$context, count = 0; - while (++count && context.parent) - context = context.parent; - return count; - } - // Given a depth function, returns a compare function which can return either ascending or descending order - var depthCompare = (0,_common_hof__WEBPACK_IMPORTED_MODULE_1__.curry)(function (depthFn, posNeg, left, right) { return posNeg * (depthFn(left) - depthFn(right)); }); - var matchingConfigPair = function (uiView) { - var matchingConfigs = _this._viewConfigs.filter(ViewService.matches(uiViewsByFqn, uiView)); - if (matchingConfigs.length > 1) { - // This is OK. Child states can target a ui-view that the parent state also targets (the child wins) - // Sort by depth and return the match from the deepest child - // console.log(`Multiple matching view configs for ${uiView.fqn}`, matchingConfigs); - matchingConfigs.sort(depthCompare(viewConfigDepth, -1)); // descending - } - return { uiView: uiView, viewConfig: matchingConfigs[0] }; - }; - var configureUIView = function (tuple) { - // If a parent ui-view is reconfigured, it could destroy child ui-views. - // Before configuring a child ui-view, make sure it's still in the active uiViews array. - if (_this._uiViews.indexOf(tuple.uiView) !== -1) - tuple.uiView.configUpdated(tuple.viewConfig); - }; - // Sort views by FQN and state depth. Process uiviews nearest the root first. - var uiViewTuples = this._uiViews.sort(depthCompare(uiViewDepth, 1)).map(matchingConfigPair); - var matchedViewConfigs = uiViewTuples.map(function (tuple) { return tuple.viewConfig; }); - var unmatchedConfigTuples = this._viewConfigs - .filter(function (config) { return !(0,_common_common__WEBPACK_IMPORTED_MODULE_0__.inArray)(matchedViewConfigs, config); }) - .map(function (viewConfig) { return ({ uiView: undefined, viewConfig: viewConfig }); }); - uiViewTuples.forEach(configureUIView); - var allTuples = uiViewTuples.concat(unmatchedConfigTuples); - this._listeners.forEach(function (cb) { return cb(allTuples); }); - _common_trace__WEBPACK_IMPORTED_MODULE_3__.trace.traceViewSync(allTuples); - }; - /** - * Registers a `ui-view` component - * - * When a `ui-view` component is created, it uses this method to register itself. - * After registration the [[sync]] method is used to ensure all `ui-view` are configured with the proper [[ViewConfig]]. - * - * Note: the `ui-view` component uses the `ViewConfig` to determine what view should be loaded inside the `ui-view`, - * and what the view's state context is. - * - * Note: There is no corresponding `deregisterUIView`. - * A `ui-view` should hang on to the return value of `registerUIView` and invoke it to deregister itself. - * - * @param uiView The metadata for a UIView - * @return a de-registration function used when the view is destroyed. - */ - ViewService.prototype.registerUIView = function (uiView) { - _common_trace__WEBPACK_IMPORTED_MODULE_3__.trace.traceViewServiceUIViewEvent('-> Registering', uiView); - var uiViews = this._uiViews; - var fqnAndTypeMatches = function (uiv) { return uiv.fqn === uiView.fqn && uiv.$type === uiView.$type; }; - if (uiViews.filter(fqnAndTypeMatches).length) - _common_trace__WEBPACK_IMPORTED_MODULE_3__.trace.traceViewServiceUIViewEvent('!!!! duplicate uiView named:', uiView); - uiViews.push(uiView); - this.sync(); - return function () { - var idx = uiViews.indexOf(uiView); - if (idx === -1) { - _common_trace__WEBPACK_IMPORTED_MODULE_3__.trace.traceViewServiceUIViewEvent('Tried removing non-registered uiView', uiView); - return; - } - _common_trace__WEBPACK_IMPORTED_MODULE_3__.trace.traceViewServiceUIViewEvent('<- Deregistering', uiView); - (0,_common_common__WEBPACK_IMPORTED_MODULE_0__.removeFrom)(uiViews)(uiView); - }; - }; - /** - * Returns the list of views currently available on the page, by fully-qualified name. - * - * @return {Array} Returns an array of fully-qualified view names. - */ - ViewService.prototype.available = function () { - return this._uiViews.map((0,_common_hof__WEBPACK_IMPORTED_MODULE_1__.prop)('fqn')); - }; - /** - * Returns the list of views on the page containing loaded content. - * - * @return {Array} Returns an array of fully-qualified view names. - */ - ViewService.prototype.active = function () { - return this._uiViews.filter((0,_common_hof__WEBPACK_IMPORTED_MODULE_1__.prop)('$config')).map((0,_common_hof__WEBPACK_IMPORTED_MODULE_1__.prop)('name')); - }; - /** - * Given a ui-view and a ViewConfig, determines if they "match". - * - * A ui-view has a fully qualified name (fqn) and a context object. The fqn is built from its overall location in - * the DOM, describing its nesting relationship to any parent ui-view tags it is nested inside of. - * - * A ViewConfig has a target ui-view name and a context anchor. The ui-view name can be a simple name, or - * can be a segmented ui-view path, describing a portion of a ui-view fqn. - * - * In order for a ui-view to match ViewConfig, ui-view's $type must match the ViewConfig's $type - * - * If the ViewConfig's target ui-view name is a simple name (no dots), then a ui-view matches if: - * - the ui-view's name matches the ViewConfig's target name - * - the ui-view's context matches the ViewConfig's anchor - * - * If the ViewConfig's target ui-view name is a segmented name (with dots), then a ui-view matches if: - * - There exists a parent ui-view where: - * - the parent ui-view's name matches the first segment (index 0) of the ViewConfig's target name - * - the parent ui-view's context matches the ViewConfig's anchor - * - And the remaining segments (index 1..n) of the ViewConfig's target name match the tail of the ui-view's fqn - * - * Example: - * - * DOM: - * - * - * - * - * - * - * - * - * - * uiViews: [ - * { fqn: "$default", creationContext: { name: "" } }, - * { fqn: "$default.foo", creationContext: { name: "A" } }, - * { fqn: "$default.foo.$default", creationContext: { name: "A.B" } } - * { fqn: "$default.foo.$default.bar", creationContext: { name: "A.B.C" } } - * ] - * - * These four view configs all match the ui-view with the fqn: "$default.foo.$default.bar": - * - * - ViewConfig1: { uiViewName: "bar", uiViewContextAnchor: "A.B.C" } - * - ViewConfig2: { uiViewName: "$default.bar", uiViewContextAnchor: "A.B" } - * - ViewConfig3: { uiViewName: "foo.$default.bar", uiViewContextAnchor: "A" } - * - ViewConfig4: { uiViewName: "$default.foo.$default.bar", uiViewContextAnchor: "" } - * - * Using ViewConfig3 as an example, it matches the ui-view with fqn "$default.foo.$default.bar" because: - * - The ViewConfig's segmented target name is: [ "foo", "$default", "bar" ] - * - There exists a parent ui-view (which has fqn: "$default.foo") where: - * - the parent ui-view's name "foo" matches the first segment "foo" of the ViewConfig's target name - * - the parent ui-view's context "A" matches the ViewConfig's anchor context "A" - * - And the remaining segments [ "$default", "bar" ].join("."_ of the ViewConfig's target name match - * the tail of the ui-view's fqn "default.bar" - * - * @internal - */ - ViewService.matches = function (uiViewsByFqn, uiView) { return function (viewConfig) { - // Don't supply an ng1 ui-view with an ng2 ViewConfig, etc - if (uiView.$type !== viewConfig.viewDecl.$type) - return false; - // Split names apart from both viewConfig and uiView into segments - var vc = viewConfig.viewDecl; - var vcSegments = vc.$uiViewName.split('.'); - var uivSegments = uiView.fqn.split('.'); - // Check if the tails of the segment arrays match. ex, these arrays' tails match: - // vc: ["foo", "bar"], uiv fqn: ["$default", "foo", "bar"] - if (!(0,_common_common__WEBPACK_IMPORTED_MODULE_0__.equals)(vcSegments, uivSegments.slice(0 - vcSegments.length))) - return false; - // Now check if the fqn ending at the first segment of the viewConfig matches the context: - // ["$default", "foo"].join(".") == "$default.foo", does the ui-view $default.foo context match? - var negOffset = 1 - vcSegments.length || undefined; - var fqnToFirstSegment = uivSegments.slice(0, negOffset).join('.'); - var uiViewContext = uiViewsByFqn[fqnToFirstSegment].creationContext; - return vc.$uiViewContextAnchor === (uiViewContext && uiViewContext.name); - }; }; - return ViewService; -}()); - -//# sourceMappingURL=view.js.map - -/***/ }), - -/***/ "./node_modules/angular-animate/angular-animate.js": -/*!*********************************************************!*\ - !*** ./node_modules/angular-animate/angular-animate.js ***! - \*********************************************************/ -/***/ (() => { - -/** - * @license AngularJS v1.8.2 - * (c) 2010-2020 Google LLC. http://angularjs.org - * License: MIT - */ -(function(window, angular) {'use strict'; - -var ELEMENT_NODE = 1; -var COMMENT_NODE = 8; - -var ADD_CLASS_SUFFIX = '-add'; -var REMOVE_CLASS_SUFFIX = '-remove'; -var EVENT_CLASS_PREFIX = 'ng-'; -var ACTIVE_CLASS_SUFFIX = '-active'; -var PREPARE_CLASS_SUFFIX = '-prepare'; - -var NG_ANIMATE_CLASSNAME = 'ng-animate'; -var NG_ANIMATE_CHILDREN_DATA = '$$ngAnimateChildren'; - -// Detect proper transitionend/animationend event names. -var CSS_PREFIX = '', TRANSITION_PROP, TRANSITIONEND_EVENT, ANIMATION_PROP, ANIMATIONEND_EVENT; - -// If unprefixed events are not supported but webkit-prefixed are, use the latter. -// Otherwise, just use W3C names, browsers not supporting them at all will just ignore them. -// Note: Chrome implements `window.onwebkitanimationend` and doesn't implement `window.onanimationend` -// but at the same time dispatches the `animationend` event and not `webkitAnimationEnd`. -// Register both events in case `window.onanimationend` is not supported because of that, -// do the same for `transitionend` as Safari is likely to exhibit similar behavior. -// Also, the only modern browser that uses vendor prefixes for transitions/keyframes is webkit -// therefore there is no reason to test anymore for other vendor prefixes: -// http://caniuse.com/#search=transition -if ((window.ontransitionend === undefined) && (window.onwebkittransitionend !== undefined)) { - CSS_PREFIX = '-webkit-'; - TRANSITION_PROP = 'WebkitTransition'; - TRANSITIONEND_EVENT = 'webkitTransitionEnd transitionend'; -} else { - TRANSITION_PROP = 'transition'; - TRANSITIONEND_EVENT = 'transitionend'; -} - -if ((window.onanimationend === undefined) && (window.onwebkitanimationend !== undefined)) { - CSS_PREFIX = '-webkit-'; - ANIMATION_PROP = 'WebkitAnimation'; - ANIMATIONEND_EVENT = 'webkitAnimationEnd animationend'; -} else { - ANIMATION_PROP = 'animation'; - ANIMATIONEND_EVENT = 'animationend'; -} - -var DURATION_KEY = 'Duration'; -var PROPERTY_KEY = 'Property'; -var DELAY_KEY = 'Delay'; -var TIMING_KEY = 'TimingFunction'; -var ANIMATION_ITERATION_COUNT_KEY = 'IterationCount'; -var ANIMATION_PLAYSTATE_KEY = 'PlayState'; -var SAFE_FAST_FORWARD_DURATION_VALUE = 9999; - -var ANIMATION_DELAY_PROP = ANIMATION_PROP + DELAY_KEY; -var ANIMATION_DURATION_PROP = ANIMATION_PROP + DURATION_KEY; -var TRANSITION_DELAY_PROP = TRANSITION_PROP + DELAY_KEY; -var TRANSITION_DURATION_PROP = TRANSITION_PROP + DURATION_KEY; - -var ngMinErr = angular.$$minErr('ng'); -function assertArg(arg, name, reason) { - if (!arg) { - throw ngMinErr('areq', 'Argument \'{0}\' is {1}', (name || '?'), (reason || 'required')); - } - return arg; -} - -function mergeClasses(a,b) { - if (!a && !b) return ''; - if (!a) return b; - if (!b) return a; - if (isArray(a)) a = a.join(' '); - if (isArray(b)) b = b.join(' '); - return a + ' ' + b; -} - -function packageStyles(options) { - var styles = {}; - if (options && (options.to || options.from)) { - styles.to = options.to; - styles.from = options.from; - } - return styles; -} - -function pendClasses(classes, fix, isPrefix) { - var className = ''; - classes = isArray(classes) - ? classes - : classes && isString(classes) && classes.length - ? classes.split(/\s+/) - : []; - forEach(classes, function(klass, i) { - if (klass && klass.length > 0) { - className += (i > 0) ? ' ' : ''; - className += isPrefix ? fix + klass - : klass + fix; - } - }); - return className; -} - -function removeFromArray(arr, val) { - var index = arr.indexOf(val); - if (val >= 0) { - arr.splice(index, 1); - } -} - -function stripCommentsFromElement(element) { - if (element instanceof jqLite) { - switch (element.length) { - case 0: - return element; - - case 1: - // there is no point of stripping anything if the element - // is the only element within the jqLite wrapper. - // (it's important that we retain the element instance.) - if (element[0].nodeType === ELEMENT_NODE) { - return element; - } - break; - - default: - return jqLite(extractElementNode(element)); - } - } - - if (element.nodeType === ELEMENT_NODE) { - return jqLite(element); - } -} - -function extractElementNode(element) { - if (!element[0]) return element; - for (var i = 0; i < element.length; i++) { - var elm = element[i]; - if (elm.nodeType === ELEMENT_NODE) { - return elm; - } - } -} - -function $$addClass($$jqLite, element, className) { - forEach(element, function(elm) { - $$jqLite.addClass(elm, className); - }); -} - -function $$removeClass($$jqLite, element, className) { - forEach(element, function(elm) { - $$jqLite.removeClass(elm, className); - }); -} - -function applyAnimationClassesFactory($$jqLite) { - return function(element, options) { - if (options.addClass) { - $$addClass($$jqLite, element, options.addClass); - options.addClass = null; - } - if (options.removeClass) { - $$removeClass($$jqLite, element, options.removeClass); - options.removeClass = null; - } - }; -} - -function prepareAnimationOptions(options) { - options = options || {}; - if (!options.$$prepared) { - var domOperation = options.domOperation || noop; - options.domOperation = function() { - options.$$domOperationFired = true; - domOperation(); - domOperation = noop; - }; - options.$$prepared = true; - } - return options; -} - -function applyAnimationStyles(element, options) { - applyAnimationFromStyles(element, options); - applyAnimationToStyles(element, options); -} - -function applyAnimationFromStyles(element, options) { - if (options.from) { - element.css(options.from); - options.from = null; - } -} - -function applyAnimationToStyles(element, options) { - if (options.to) { - element.css(options.to); - options.to = null; - } -} - -function mergeAnimationDetails(element, oldAnimation, newAnimation) { - var target = oldAnimation.options || {}; - var newOptions = newAnimation.options || {}; - - var toAdd = (target.addClass || '') + ' ' + (newOptions.addClass || ''); - var toRemove = (target.removeClass || '') + ' ' + (newOptions.removeClass || ''); - var classes = resolveElementClasses(element.attr('class'), toAdd, toRemove); - - if (newOptions.preparationClasses) { - target.preparationClasses = concatWithSpace(newOptions.preparationClasses, target.preparationClasses); - delete newOptions.preparationClasses; - } - - // noop is basically when there is no callback; otherwise something has been set - var realDomOperation = target.domOperation !== noop ? target.domOperation : null; - - extend(target, newOptions); - - // TODO(matsko or sreeramu): proper fix is to maintain all animation callback in array and call at last,but now only leave has the callback so no issue with this. - if (realDomOperation) { - target.domOperation = realDomOperation; - } - - if (classes.addClass) { - target.addClass = classes.addClass; - } else { - target.addClass = null; - } - - if (classes.removeClass) { - target.removeClass = classes.removeClass; - } else { - target.removeClass = null; - } - - oldAnimation.addClass = target.addClass; - oldAnimation.removeClass = target.removeClass; - - return target; -} - -function resolveElementClasses(existing, toAdd, toRemove) { - var ADD_CLASS = 1; - var REMOVE_CLASS = -1; - - var flags = {}; - existing = splitClassesToLookup(existing); - - toAdd = splitClassesToLookup(toAdd); - forEach(toAdd, function(value, key) { - flags[key] = ADD_CLASS; - }); - - toRemove = splitClassesToLookup(toRemove); - forEach(toRemove, function(value, key) { - flags[key] = flags[key] === ADD_CLASS ? null : REMOVE_CLASS; - }); - - var classes = { - addClass: '', - removeClass: '' - }; - - forEach(flags, function(val, klass) { - var prop, allow; - if (val === ADD_CLASS) { - prop = 'addClass'; - allow = !existing[klass] || existing[klass + REMOVE_CLASS_SUFFIX]; - } else if (val === REMOVE_CLASS) { - prop = 'removeClass'; - allow = existing[klass] || existing[klass + ADD_CLASS_SUFFIX]; - } - if (allow) { - if (classes[prop].length) { - classes[prop] += ' '; - } - classes[prop] += klass; - } - }); - - function splitClassesToLookup(classes) { - if (isString(classes)) { - classes = classes.split(' '); - } - - var obj = {}; - forEach(classes, function(klass) { - // sometimes the split leaves empty string values - // incase extra spaces were applied to the options - if (klass.length) { - obj[klass] = true; - } - }); - return obj; - } - - return classes; -} - -function getDomNode(element) { - return (element instanceof jqLite) ? element[0] : element; -} - -function applyGeneratedPreparationClasses($$jqLite, element, event, options) { - var classes = ''; - if (event) { - classes = pendClasses(event, EVENT_CLASS_PREFIX, true); - } - if (options.addClass) { - classes = concatWithSpace(classes, pendClasses(options.addClass, ADD_CLASS_SUFFIX)); - } - if (options.removeClass) { - classes = concatWithSpace(classes, pendClasses(options.removeClass, REMOVE_CLASS_SUFFIX)); - } - if (classes.length) { - options.preparationClasses = classes; - element.addClass(classes); - } -} - -function clearGeneratedClasses(element, options) { - if (options.preparationClasses) { - element.removeClass(options.preparationClasses); - options.preparationClasses = null; - } - if (options.activeClasses) { - element.removeClass(options.activeClasses); - options.activeClasses = null; - } -} - -function blockKeyframeAnimations(node, applyBlock) { - var value = applyBlock ? 'paused' : ''; - var key = ANIMATION_PROP + ANIMATION_PLAYSTATE_KEY; - applyInlineStyle(node, [key, value]); - return [key, value]; -} - -function applyInlineStyle(node, styleTuple) { - var prop = styleTuple[0]; - var value = styleTuple[1]; - node.style[prop] = value; -} - -function concatWithSpace(a,b) { - if (!a) return b; - if (!b) return a; - return a + ' ' + b; -} - -var helpers = { - blockTransitions: function(node, duration) { - // we use a negative delay value since it performs blocking - // yet it doesn't kill any existing transitions running on the - // same element which makes this safe for class-based animations - var value = duration ? '-' + duration + 's' : ''; - applyInlineStyle(node, [TRANSITION_DELAY_PROP, value]); - return [TRANSITION_DELAY_PROP, value]; - } -}; - -var $$rAFSchedulerFactory = ['$$rAF', function($$rAF) { - var queue, cancelFn; - - function scheduler(tasks) { - // we make a copy since RAFScheduler mutates the state - // of the passed in array variable and this would be difficult - // to track down on the outside code - queue = queue.concat(tasks); - nextTick(); - } - - queue = scheduler.queue = []; - - /* waitUntilQuiet does two things: - * 1. It will run the FINAL `fn` value only when an uncanceled RAF has passed through - * 2. It will delay the next wave of tasks from running until the quiet `fn` has run. - * - * The motivation here is that animation code can request more time from the scheduler - * before the next wave runs. This allows for certain DOM properties such as classes to - * be resolved in time for the next animation to run. - */ - scheduler.waitUntilQuiet = function(fn) { - if (cancelFn) cancelFn(); - - cancelFn = $$rAF(function() { - cancelFn = null; - fn(); - nextTick(); - }); - }; - - return scheduler; - - function nextTick() { - if (!queue.length) return; - - var items = queue.shift(); - for (var i = 0; i < items.length; i++) { - items[i](); - } - - if (!cancelFn) { - $$rAF(function() { - if (!cancelFn) nextTick(); - }); - } - } -}]; - -/** - * @ngdoc directive - * @name ngAnimateChildren - * @restrict AE - * @element ANY - * - * @description - * - * ngAnimateChildren allows you to specify that children of this element should animate even if any - * of the children's parents are currently animating. By default, when an element has an active `enter`, `leave`, or `move` - * (structural) animation, child elements that also have an active structural animation are not animated. - * - * Note that even if `ngAnimateChildren` is set, no child animations will run when the parent element is removed from the DOM (`leave` animation). - * - * - * @param {string} ngAnimateChildren If the value is empty, `true` or `on`, - * then child animations are allowed. If the value is `false`, child animations are not allowed. - * - * @example - * - -
    - - -
    -
    -
    - List of items: -
    Item {{item}}
    -
    -
    -
    -
    - - - .container.ng-enter, - .container.ng-leave { - transition: all ease 1.5s; - } - - .container.ng-enter, - .container.ng-leave-active { - opacity: 0; - } - - .container.ng-leave, - .container.ng-enter-active { - opacity: 1; - } - - .item { - background: firebrick; - color: #FFF; - margin-bottom: 10px; - } - - .item.ng-enter, - .item.ng-leave { - transition: transform 1.5s ease; - } - - .item.ng-enter { - transform: translateX(50px); - } - - .item.ng-enter-active { - transform: translateX(0); - } - - - angular.module('ngAnimateChildren', ['ngAnimate']) - .controller('MainController', function MainController() { - this.animateChildren = false; - this.enterElement = false; - }); - -
    - */ -var $$AnimateChildrenDirective = ['$interpolate', function($interpolate) { - return { - link: function(scope, element, attrs) { - var val = attrs.ngAnimateChildren; - if (isString(val) && val.length === 0) { //empty attribute - element.data(NG_ANIMATE_CHILDREN_DATA, true); - } else { - // Interpolate and set the value, so that it is available to - // animations that run right after compilation - setData($interpolate(val)(scope)); - attrs.$observe('ngAnimateChildren', setData); - } - - function setData(value) { - value = value === 'on' || value === 'true'; - element.data(NG_ANIMATE_CHILDREN_DATA, value); - } - } - }; -}]; - -/* exported $AnimateCssProvider */ - -var ANIMATE_TIMER_KEY = '$$animateCss'; - -/** - * @ngdoc service - * @name $animateCss - * @kind object - * - * @description - * The `$animateCss` service is a useful utility to trigger customized CSS-based transitions/keyframes - * from a JavaScript-based animation or directly from a directive. The purpose of `$animateCss` is NOT - * to side-step how `$animate` and ngAnimate work, but the goal is to allow pre-existing animations or - * directives to create more complex animations that can be purely driven using CSS code. - * - * Note that only browsers that support CSS transitions and/or keyframe animations are capable of - * rendering animations triggered via `$animateCss` (bad news for IE9 and lower). - * - * ## General Use - * Once again, `$animateCss` is designed to be used inside of a registered JavaScript animation that - * is powered by ngAnimate. It is possible to use `$animateCss` directly inside of a directive, however, - * any automatic control over cancelling animations and/or preventing animations from being run on - * child elements will not be handled by AngularJS. For this to work as expected, please use `$animate` to - * trigger the animation and then setup a JavaScript animation that injects `$animateCss` to trigger - * the CSS animation. - * - * The example below shows how we can create a folding animation on an element using `ng-if`: - * - * ```html - * - *
    - * This element will go BOOM - *
    - * - * ``` - * - * Now we create the **JavaScript animation** that will trigger the CSS transition: - * - * ```js - * ngModule.animation('.fold-animation', ['$animateCss', function($animateCss) { - * return { - * enter: function(element, doneFn) { - * var height = element[0].offsetHeight; - * return $animateCss(element, { - * from: { height:'0px' }, - * to: { height:height + 'px' }, - * duration: 1 // one second - * }); - * } - * } - * }]); - * ``` - * - * ## More Advanced Uses - * - * `$animateCss` is the underlying code that ngAnimate uses to power **CSS-based animations** behind the scenes. Therefore CSS hooks - * like `.ng-EVENT`, `.ng-EVENT-active`, `.ng-EVENT-stagger` are all features that can be triggered using `$animateCss` via JavaScript code. - * - * This also means that just about any combination of adding classes, removing classes, setting styles, dynamically setting a keyframe animation, - * applying a hardcoded duration or delay value, changing the animation easing or applying a stagger animation are all options that work with - * `$animateCss`. The service itself is smart enough to figure out the combination of options and examine the element styling properties in order - * to provide a working animation that will run in CSS. - * - * The example below showcases a more advanced version of the `.fold-animation` from the example above: - * - * ```js - * ngModule.animation('.fold-animation', ['$animateCss', function($animateCss) { - * return { - * enter: function(element, doneFn) { - * var height = element[0].offsetHeight; - * return $animateCss(element, { - * addClass: 'red large-text pulse-twice', - * easing: 'ease-out', - * from: { height:'0px' }, - * to: { height:height + 'px' }, - * duration: 1 // one second - * }); - * } - * } - * }]); - * ``` - * - * Since we're adding/removing CSS classes then the CSS transition will also pick those up: - * - * ```css - * /* since a hardcoded duration value of 1 was provided in the JavaScript animation code, - * the CSS classes below will be transitioned despite them being defined as regular CSS classes */ - * .red { background:red; } - * .large-text { font-size:20px; } - * - * /* we can also use a keyframe animation and $animateCss will make it work alongside the transition */ - * .pulse-twice { - * animation: 0.5s pulse linear 2; - * -webkit-animation: 0.5s pulse linear 2; - * } - * - * @keyframes pulse { - * from { transform: scale(0.5); } - * to { transform: scale(1.5); } - * } - * - * @-webkit-keyframes pulse { - * from { -webkit-transform: scale(0.5); } - * to { -webkit-transform: scale(1.5); } - * } - * ``` - * - * Given this complex combination of CSS classes, styles and options, `$animateCss` will figure everything out and make the animation happen. - * - * ## How the Options are handled - * - * `$animateCss` is very versatile and intelligent when it comes to figuring out what configurations to apply to the element to ensure the animation - * works with the options provided. Say for example we were adding a class that contained a keyframe value and we wanted to also animate some inline - * styles using the `from` and `to` properties. - * - * ```js - * var animator = $animateCss(element, { - * from: { background:'red' }, - * to: { background:'blue' } - * }); - * animator.start(); - * ``` - * - * ```css - * .rotating-animation { - * animation:0.5s rotate linear; - * -webkit-animation:0.5s rotate linear; - * } - * - * @keyframes rotate { - * from { transform: rotate(0deg); } - * to { transform: rotate(360deg); } - * } - * - * @-webkit-keyframes rotate { - * from { -webkit-transform: rotate(0deg); } - * to { -webkit-transform: rotate(360deg); } - * } - * ``` - * - * The missing pieces here are that we do not have a transition set (within the CSS code nor within the `$animateCss` options) and the duration of the animation is - * going to be detected from what the keyframe styles on the CSS class are. In this event, `$animateCss` will automatically create an inline transition - * style matching the duration detected from the keyframe style (which is present in the CSS class that is being added) and then prepare both the transition - * and keyframe animations to run in parallel on the element. Then when the animation is underway the provided `from` and `to` CSS styles will be applied - * and spread across the transition and keyframe animation. - * - * ## What is returned - * - * `$animateCss` works in two stages: a preparation phase and an animation phase. Therefore when `$animateCss` is first called it will NOT actually - * start the animation. All that is going on here is that the element is being prepared for the animation (which means that the generated CSS classes are - * added and removed on the element). Once `$animateCss` is called it will return an object with the following properties: - * - * ```js - * var animator = $animateCss(element, { ... }); - * ``` - * - * Now what do the contents of our `animator` variable look like: - * - * ```js - * { - * // starts the animation - * start: Function, - * - * // ends (aborts) the animation - * end: Function - * } - * ``` - * - * To actually start the animation we need to run `animation.start()` which will then return a promise that we can hook into to detect when the animation ends. - * If we choose not to run the animation then we MUST run `animation.end()` to perform a cleanup on the element (since some CSS classes and styles may have been - * applied to the element during the preparation phase). Note that all other properties such as duration, delay, transitions and keyframes are just properties - * and that changing them will not reconfigure the parameters of the animation. - * - * ### runner.done() vs runner.then() - * It is documented that `animation.start()` will return a promise object and this is true, however, there is also an additional method available on the - * runner called `.done(callbackFn)`. The done method works the same as `.finally(callbackFn)`, however, it does **not trigger a digest to occur**. - * Therefore, for performance reasons, it's always best to use `runner.done(callback)` instead of `runner.then()`, `runner.catch()` or `runner.finally()` - * unless you really need a digest to kick off afterwards. - * - * Keep in mind that, to make this easier, ngAnimate has tweaked the JS animations API to recognize when a runner instance is returned from $animateCss - * (so there is no need to call `runner.done(doneFn)` inside of your JavaScript animation code). - * Check the {@link ngAnimate.$animateCss#usage animation code above} to see how this works. - * - * @param {DOMElement} element the element that will be animated - * @param {object} options the animation-related options that will be applied during the animation - * - * * `event` - The DOM event (e.g. enter, leave, move). When used, a generated CSS class of `ng-EVENT` and `ng-EVENT-active` will be applied - * to the element during the animation. Multiple events can be provided when spaces are used as a separator. (Note that this will not perform any DOM operation.) - * * `structural` - Indicates that the `ng-` prefix will be added to the event class. Setting to `false` or omitting will turn `ng-EVENT` and - * `ng-EVENT-active` in `EVENT` and `EVENT-active`. Unused if `event` is omitted. - * * `easing` - The CSS easing value that will be applied to the transition or keyframe animation (or both). - * * `transitionStyle` - The raw CSS transition style that will be used (e.g. `1s linear all`). - * * `keyframeStyle` - The raw CSS keyframe animation style that will be used (e.g. `1s my_animation linear`). - * * `from` - The starting CSS styles (a key/value object) that will be applied at the start of the animation. - * * `to` - The ending CSS styles (a key/value object) that will be applied across the animation via a CSS transition. - * * `addClass` - A space separated list of CSS classes that will be added to the element and spread across the animation. - * * `removeClass` - A space separated list of CSS classes that will be removed from the element and spread across the animation. - * * `duration` - A number value representing the total duration of the transition and/or keyframe (note that a value of 1 is 1000ms). If a value of `0` - * is provided then the animation will be skipped entirely. - * * `delay` - A number value representing the total delay of the transition and/or keyframe (note that a value of 1 is 1000ms). If a value of `true` is - * used then whatever delay value is detected from the CSS classes will be mirrored on the elements styles (e.g. by setting delay true then the style value - * of the element will be `transition-delay: DETECTED_VALUE`). Using `true` is useful when you want the CSS classes and inline styles to all share the same - * CSS delay value. - * * `stagger` - A numeric time value representing the delay between successively animated elements - * ({@link ngAnimate#css-staggering-animations Click here to learn how CSS-based staggering works in ngAnimate.}) - * * `staggerIndex` - The numeric index representing the stagger item (e.g. a value of 5 is equal to the sixth item in the stagger; therefore when a - * `stagger` option value of `0.1` is used then there will be a stagger delay of `600ms`) - * * `applyClassesEarly` - Whether or not the classes being added or removed will be used when detecting the animation. This is set by `$animate` when enter/leave/move animations are fired to ensure that the CSS classes are resolved in time. (Note that this will prevent any transitions from occurring on the classes being added and removed.) - * * `cleanupStyles` - Whether or not the provided `from` and `to` styles will be removed once - * the animation is closed. This is useful for when the styles are used purely for the sake of - * the animation and do not have a lasting visual effect on the element (e.g. a collapse and open animation). - * By default this value is set to `false`. - * - * @return {object} an object with start and end methods and details about the animation. - * - * * `start` - The method to start the animation. This will return a `Promise` when called. - * * `end` - This method will cancel the animation and remove all applied CSS classes and styles. - */ -var ONE_SECOND = 1000; - -var ELAPSED_TIME_MAX_DECIMAL_PLACES = 3; -var CLOSING_TIME_BUFFER = 1.5; - -var DETECT_CSS_PROPERTIES = { - transitionDuration: TRANSITION_DURATION_PROP, - transitionDelay: TRANSITION_DELAY_PROP, - transitionProperty: TRANSITION_PROP + PROPERTY_KEY, - animationDuration: ANIMATION_DURATION_PROP, - animationDelay: ANIMATION_DELAY_PROP, - animationIterationCount: ANIMATION_PROP + ANIMATION_ITERATION_COUNT_KEY -}; - -var DETECT_STAGGER_CSS_PROPERTIES = { - transitionDuration: TRANSITION_DURATION_PROP, - transitionDelay: TRANSITION_DELAY_PROP, - animationDuration: ANIMATION_DURATION_PROP, - animationDelay: ANIMATION_DELAY_PROP -}; - -function getCssKeyframeDurationStyle(duration) { - return [ANIMATION_DURATION_PROP, duration + 's']; -} - -function getCssDelayStyle(delay, isKeyframeAnimation) { - var prop = isKeyframeAnimation ? ANIMATION_DELAY_PROP : TRANSITION_DELAY_PROP; - return [prop, delay + 's']; -} - -function computeCssStyles($window, element, properties) { - var styles = Object.create(null); - var detectedStyles = $window.getComputedStyle(element) || {}; - forEach(properties, function(formalStyleName, actualStyleName) { - var val = detectedStyles[formalStyleName]; - if (val) { - var c = val.charAt(0); - - // only numerical-based values have a negative sign or digit as the first value - if (c === '-' || c === '+' || c >= 0) { - val = parseMaxTime(val); - } - - // by setting this to null in the event that the delay is not set or is set directly as 0 - // then we can still allow for negative values to be used later on and not mistake this - // value for being greater than any other negative value. - if (val === 0) { - val = null; - } - styles[actualStyleName] = val; - } - }); - - return styles; -} - -function parseMaxTime(str) { - var maxValue = 0; - var values = str.split(/\s*,\s*/); - forEach(values, function(value) { - // it's always safe to consider only second values and omit `ms` values since - // getComputedStyle will always handle the conversion for us - if (value.charAt(value.length - 1) === 's') { - value = value.substring(0, value.length - 1); - } - value = parseFloat(value) || 0; - maxValue = maxValue ? Math.max(value, maxValue) : value; - }); - return maxValue; -} - -function truthyTimingValue(val) { - return val === 0 || val != null; -} - -function getCssTransitionDurationStyle(duration, applyOnlyDuration) { - var style = TRANSITION_PROP; - var value = duration + 's'; - if (applyOnlyDuration) { - style += DURATION_KEY; - } else { - value += ' linear all'; - } - return [style, value]; -} - -// we do not reassign an already present style value since -// if we detect the style property value again we may be -// detecting styles that were added via the `from` styles. -// We make use of `isDefined` here since an empty string -// or null value (which is what getPropertyValue will return -// for a non-existing style) will still be marked as a valid -// value for the style (a falsy value implies that the style -// is to be removed at the end of the animation). If we had a simple -// "OR" statement then it would not be enough to catch that. -function registerRestorableStyles(backup, node, properties) { - forEach(properties, function(prop) { - backup[prop] = isDefined(backup[prop]) - ? backup[prop] - : node.style.getPropertyValue(prop); - }); -} - -var $AnimateCssProvider = ['$animateProvider', /** @this */ function($animateProvider) { - - this.$get = ['$window', '$$jqLite', '$$AnimateRunner', '$timeout', '$$animateCache', - '$$forceReflow', '$sniffer', '$$rAFScheduler', '$$animateQueue', - function($window, $$jqLite, $$AnimateRunner, $timeout, $$animateCache, - $$forceReflow, $sniffer, $$rAFScheduler, $$animateQueue) { - - var applyAnimationClasses = applyAnimationClassesFactory($$jqLite); - - function computeCachedCssStyles(node, className, cacheKey, allowNoDuration, properties) { - var timings = $$animateCache.get(cacheKey); - - if (!timings) { - timings = computeCssStyles($window, node, properties); - if (timings.animationIterationCount === 'infinite') { - timings.animationIterationCount = 1; - } - } - - // if a css animation has no duration we - // should mark that so that repeated addClass/removeClass calls are skipped - var hasDuration = allowNoDuration || (timings.transitionDuration > 0 || timings.animationDuration > 0); - - // we keep putting this in multiple times even though the value and the cacheKey are the same - // because we're keeping an internal tally of how many duplicate animations are detected. - $$animateCache.put(cacheKey, timings, hasDuration); - - return timings; - } - - function computeCachedCssStaggerStyles(node, className, cacheKey, properties) { - var stagger; - var staggerCacheKey = 'stagger-' + cacheKey; - - // if we have one or more existing matches of matching elements - // containing the same parent + CSS styles (which is how cacheKey works) - // then staggering is possible - if ($$animateCache.count(cacheKey) > 0) { - stagger = $$animateCache.get(staggerCacheKey); - - if (!stagger) { - var staggerClassName = pendClasses(className, '-stagger'); - - $$jqLite.addClass(node, staggerClassName); - - stagger = computeCssStyles($window, node, properties); - - // force the conversion of a null value to zero incase not set - stagger.animationDuration = Math.max(stagger.animationDuration, 0); - stagger.transitionDuration = Math.max(stagger.transitionDuration, 0); - - $$jqLite.removeClass(node, staggerClassName); - - $$animateCache.put(staggerCacheKey, stagger, true); - } - } - - return stagger || {}; - } - - var rafWaitQueue = []; - function waitUntilQuiet(callback) { - rafWaitQueue.push(callback); - $$rAFScheduler.waitUntilQuiet(function() { - $$animateCache.flush(); - - // DO NOT REMOVE THIS LINE OR REFACTOR OUT THE `pageWidth` variable. - // PLEASE EXAMINE THE `$$forceReflow` service to understand why. - var pageWidth = $$forceReflow(); - - // we use a for loop to ensure that if the queue is changed - // during this looping then it will consider new requests - for (var i = 0; i < rafWaitQueue.length; i++) { - rafWaitQueue[i](pageWidth); - } - rafWaitQueue.length = 0; - }); - } - - function computeTimings(node, className, cacheKey, allowNoDuration) { - var timings = computeCachedCssStyles(node, className, cacheKey, allowNoDuration, DETECT_CSS_PROPERTIES); - var aD = timings.animationDelay; - var tD = timings.transitionDelay; - timings.maxDelay = aD && tD - ? Math.max(aD, tD) - : (aD || tD); - timings.maxDuration = Math.max( - timings.animationDuration * timings.animationIterationCount, - timings.transitionDuration); - - return timings; - } - - return function init(element, initialOptions) { - // all of the animation functions should create - // a copy of the options data, however, if a - // parent service has already created a copy then - // we should stick to using that - var options = initialOptions || {}; - if (!options.$$prepared) { - options = prepareAnimationOptions(copy(options)); - } - - var restoreStyles = {}; - var node = getDomNode(element); - if (!node - || !node.parentNode - || !$$animateQueue.enabled()) { - return closeAndReturnNoopAnimator(); - } - - var temporaryStyles = []; - var classes = element.attr('class'); - var styles = packageStyles(options); - var animationClosed; - var animationPaused; - var animationCompleted; - var runner; - var runnerHost; - var maxDelay; - var maxDelayTime; - var maxDuration; - var maxDurationTime; - var startTime; - var events = []; - - if (options.duration === 0 || (!$sniffer.animations && !$sniffer.transitions)) { - return closeAndReturnNoopAnimator(); - } - - var method = options.event && isArray(options.event) - ? options.event.join(' ') - : options.event; - - var isStructural = method && options.structural; - var structuralClassName = ''; - var addRemoveClassName = ''; - - if (isStructural) { - structuralClassName = pendClasses(method, EVENT_CLASS_PREFIX, true); - } else if (method) { - structuralClassName = method; - } - - if (options.addClass) { - addRemoveClassName += pendClasses(options.addClass, ADD_CLASS_SUFFIX); - } - - if (options.removeClass) { - if (addRemoveClassName.length) { - addRemoveClassName += ' '; - } - addRemoveClassName += pendClasses(options.removeClass, REMOVE_CLASS_SUFFIX); - } - - // there may be a situation where a structural animation is combined together - // with CSS classes that need to resolve before the animation is computed. - // However this means that there is no explicit CSS code to block the animation - // from happening (by setting 0s none in the class name). If this is the case - // we need to apply the classes before the first rAF so we know to continue if - // there actually is a detected transition or keyframe animation - if (options.applyClassesEarly && addRemoveClassName.length) { - applyAnimationClasses(element, options); - } - - var preparationClasses = [structuralClassName, addRemoveClassName].join(' ').trim(); - var fullClassName = classes + ' ' + preparationClasses; - var hasToStyles = styles.to && Object.keys(styles.to).length > 0; - var containsKeyframeAnimation = (options.keyframeStyle || '').length > 0; - - // there is no way we can trigger an animation if no styles and - // no classes are being applied which would then trigger a transition, - // unless there a is raw keyframe value that is applied to the element. - if (!containsKeyframeAnimation - && !hasToStyles - && !preparationClasses) { - return closeAndReturnNoopAnimator(); - } - - var stagger, cacheKey = $$animateCache.cacheKey(node, method, options.addClass, options.removeClass); - if ($$animateCache.containsCachedAnimationWithoutDuration(cacheKey)) { - preparationClasses = null; - return closeAndReturnNoopAnimator(); - } - - if (options.stagger > 0) { - var staggerVal = parseFloat(options.stagger); - stagger = { - transitionDelay: staggerVal, - animationDelay: staggerVal, - transitionDuration: 0, - animationDuration: 0 - }; - } else { - stagger = computeCachedCssStaggerStyles(node, preparationClasses, cacheKey, DETECT_STAGGER_CSS_PROPERTIES); - } - - if (!options.$$skipPreparationClasses) { - $$jqLite.addClass(element, preparationClasses); - } - - var applyOnlyDuration; - - if (options.transitionStyle) { - var transitionStyle = [TRANSITION_PROP, options.transitionStyle]; - applyInlineStyle(node, transitionStyle); - temporaryStyles.push(transitionStyle); - } - - if (options.duration >= 0) { - applyOnlyDuration = node.style[TRANSITION_PROP].length > 0; - var durationStyle = getCssTransitionDurationStyle(options.duration, applyOnlyDuration); - - // we set the duration so that it will be picked up by getComputedStyle later - applyInlineStyle(node, durationStyle); - temporaryStyles.push(durationStyle); - } - - if (options.keyframeStyle) { - var keyframeStyle = [ANIMATION_PROP, options.keyframeStyle]; - applyInlineStyle(node, keyframeStyle); - temporaryStyles.push(keyframeStyle); - } - - var itemIndex = stagger - ? options.staggerIndex >= 0 - ? options.staggerIndex - : $$animateCache.count(cacheKey) - : 0; - - var isFirst = itemIndex === 0; - - // this is a pre-emptive way of forcing the setup classes to be added and applied INSTANTLY - // without causing any combination of transitions to kick in. By adding a negative delay value - // it forces the setup class' transition to end immediately. We later then remove the negative - // transition delay to allow for the transition to naturally do it's thing. The beauty here is - // that if there is no transition defined then nothing will happen and this will also allow - // other transitions to be stacked on top of each other without any chopping them out. - if (isFirst && !options.skipBlocking) { - helpers.blockTransitions(node, SAFE_FAST_FORWARD_DURATION_VALUE); - } - - var timings = computeTimings(node, fullClassName, cacheKey, !isStructural); - var relativeDelay = timings.maxDelay; - maxDelay = Math.max(relativeDelay, 0); - maxDuration = timings.maxDuration; - - var flags = {}; - flags.hasTransitions = timings.transitionDuration > 0; - flags.hasAnimations = timings.animationDuration > 0; - flags.hasTransitionAll = flags.hasTransitions && timings.transitionProperty === 'all'; - flags.applyTransitionDuration = hasToStyles && ( - (flags.hasTransitions && !flags.hasTransitionAll) - || (flags.hasAnimations && !flags.hasTransitions)); - flags.applyAnimationDuration = options.duration && flags.hasAnimations; - flags.applyTransitionDelay = truthyTimingValue(options.delay) && (flags.applyTransitionDuration || flags.hasTransitions); - flags.applyAnimationDelay = truthyTimingValue(options.delay) && flags.hasAnimations; - flags.recalculateTimingStyles = addRemoveClassName.length > 0; - - if (flags.applyTransitionDuration || flags.applyAnimationDuration) { - maxDuration = options.duration ? parseFloat(options.duration) : maxDuration; - - if (flags.applyTransitionDuration) { - flags.hasTransitions = true; - timings.transitionDuration = maxDuration; - applyOnlyDuration = node.style[TRANSITION_PROP + PROPERTY_KEY].length > 0; - temporaryStyles.push(getCssTransitionDurationStyle(maxDuration, applyOnlyDuration)); - } - - if (flags.applyAnimationDuration) { - flags.hasAnimations = true; - timings.animationDuration = maxDuration; - temporaryStyles.push(getCssKeyframeDurationStyle(maxDuration)); - } - } - - if (maxDuration === 0 && !flags.recalculateTimingStyles) { - return closeAndReturnNoopAnimator(); - } - - var activeClasses = pendClasses(preparationClasses, ACTIVE_CLASS_SUFFIX); - - if (options.delay != null) { - var delayStyle; - if (typeof options.delay !== 'boolean') { - delayStyle = parseFloat(options.delay); - // number in options.delay means we have to recalculate the delay for the closing timeout - maxDelay = Math.max(delayStyle, 0); - } - - if (flags.applyTransitionDelay) { - temporaryStyles.push(getCssDelayStyle(delayStyle)); - } - - if (flags.applyAnimationDelay) { - temporaryStyles.push(getCssDelayStyle(delayStyle, true)); - } - } - - // we need to recalculate the delay value since we used a pre-emptive negative - // delay value and the delay value is required for the final event checking. This - // property will ensure that this will happen after the RAF phase has passed. - if (options.duration == null && timings.transitionDuration > 0) { - flags.recalculateTimingStyles = flags.recalculateTimingStyles || isFirst; - } - - maxDelayTime = maxDelay * ONE_SECOND; - maxDurationTime = maxDuration * ONE_SECOND; - if (!options.skipBlocking) { - flags.blockTransition = timings.transitionDuration > 0; - flags.blockKeyframeAnimation = timings.animationDuration > 0 && - stagger.animationDelay > 0 && - stagger.animationDuration === 0; - } - - if (options.from) { - if (options.cleanupStyles) { - registerRestorableStyles(restoreStyles, node, Object.keys(options.from)); - } - applyAnimationFromStyles(element, options); - } - - if (flags.blockTransition || flags.blockKeyframeAnimation) { - applyBlocking(maxDuration); - } else if (!options.skipBlocking) { - helpers.blockTransitions(node, false); - } - - // TODO(matsko): for 1.5 change this code to have an animator object for better debugging - return { - $$willAnimate: true, - end: endFn, - start: function() { - if (animationClosed) return; - - runnerHost = { - end: endFn, - cancel: cancelFn, - resume: null, //this will be set during the start() phase - pause: null - }; - - runner = new $$AnimateRunner(runnerHost); - - waitUntilQuiet(start); - - // we don't have access to pause/resume the animation - // since it hasn't run yet. AnimateRunner will therefore - // set noop functions for resume and pause and they will - // later be overridden once the animation is triggered - return runner; - } - }; - - function endFn() { - close(); - } - - function cancelFn() { - close(true); - } - - function close(rejected) { - // if the promise has been called already then we shouldn't close - // the animation again - if (animationClosed || (animationCompleted && animationPaused)) return; - animationClosed = true; - animationPaused = false; - - if (preparationClasses && !options.$$skipPreparationClasses) { - $$jqLite.removeClass(element, preparationClasses); - } - - if (activeClasses) { - $$jqLite.removeClass(element, activeClasses); - } - - blockKeyframeAnimations(node, false); - helpers.blockTransitions(node, false); - - forEach(temporaryStyles, function(entry) { - // There is only one way to remove inline style properties entirely from elements. - // By using `removeProperty` this works, but we need to convert camel-cased CSS - // styles down to hyphenated values. - node.style[entry[0]] = ''; - }); - - applyAnimationClasses(element, options); - applyAnimationStyles(element, options); - - if (Object.keys(restoreStyles).length) { - forEach(restoreStyles, function(value, prop) { - if (value) { - node.style.setProperty(prop, value); - } else { - node.style.removeProperty(prop); - } - }); - } - - // the reason why we have this option is to allow a synchronous closing callback - // that is fired as SOON as the animation ends (when the CSS is removed) or if - // the animation never takes off at all. A good example is a leave animation since - // the element must be removed just after the animation is over or else the element - // will appear on screen for one animation frame causing an overbearing flicker. - if (options.onDone) { - options.onDone(); - } - - if (events && events.length) { - // Remove the transitionend / animationend listener(s) - element.off(events.join(' '), onAnimationProgress); - } - - //Cancel the fallback closing timeout and remove the timer data - var animationTimerData = element.data(ANIMATE_TIMER_KEY); - if (animationTimerData) { - $timeout.cancel(animationTimerData[0].timer); - element.removeData(ANIMATE_TIMER_KEY); - } - - // if the preparation function fails then the promise is not setup - if (runner) { - runner.complete(!rejected); - } - } - - function applyBlocking(duration) { - if (flags.blockTransition) { - helpers.blockTransitions(node, duration); - } - - if (flags.blockKeyframeAnimation) { - blockKeyframeAnimations(node, !!duration); - } - } - - function closeAndReturnNoopAnimator() { - runner = new $$AnimateRunner({ - end: endFn, - cancel: cancelFn - }); - - // should flush the cache animation - waitUntilQuiet(noop); - close(); - - return { - $$willAnimate: false, - start: function() { - return runner; - }, - end: endFn - }; - } - - function onAnimationProgress(event) { - event.stopPropagation(); - var ev = event.originalEvent || event; - - if (ev.target !== node) { - // Since TransitionEvent / AnimationEvent bubble up, - // we have to ignore events by finished child animations - return; - } - - // we now always use `Date.now()` due to the recent changes with - // event.timeStamp in Firefox, Webkit and Chrome (see #13494 for more info) - var timeStamp = ev.$manualTimeStamp || Date.now(); - - /* Firefox (or possibly just Gecko) likes to not round values up - * when a ms measurement is used for the animation */ - var elapsedTime = parseFloat(ev.elapsedTime.toFixed(ELAPSED_TIME_MAX_DECIMAL_PLACES)); - - /* $manualTimeStamp is a mocked timeStamp value which is set - * within browserTrigger(). This is only here so that tests can - * mock animations properly. Real events fallback to event.timeStamp, - * or, if they don't, then a timeStamp is automatically created for them. - * We're checking to see if the timeStamp surpasses the expected delay, - * but we're using elapsedTime instead of the timeStamp on the 2nd - * pre-condition since animationPauseds sometimes close off early */ - if (Math.max(timeStamp - startTime, 0) >= maxDelayTime && elapsedTime >= maxDuration) { - // we set this flag to ensure that if the transition is paused then, when resumed, - // the animation will automatically close itself since transitions cannot be paused. - animationCompleted = true; - close(); - } - } - - function start() { - if (animationClosed) return; - if (!node.parentNode) { - close(); - return; - } - - // even though we only pause keyframe animations here the pause flag - // will still happen when transitions are used. Only the transition will - // not be paused since that is not possible. If the animation ends when - // paused then it will not complete until unpaused or cancelled. - var playPause = function(playAnimation) { - if (!animationCompleted) { - animationPaused = !playAnimation; - if (timings.animationDuration) { - var value = blockKeyframeAnimations(node, animationPaused); - if (animationPaused) { - temporaryStyles.push(value); - } else { - removeFromArray(temporaryStyles, value); - } - } - } else if (animationPaused && playAnimation) { - animationPaused = false; - close(); - } - }; - - // checking the stagger duration prevents an accidentally cascade of the CSS delay style - // being inherited from the parent. If the transition duration is zero then we can safely - // rely that the delay value is an intentional stagger delay style. - var maxStagger = itemIndex > 0 - && ((timings.transitionDuration && stagger.transitionDuration === 0) || - (timings.animationDuration && stagger.animationDuration === 0)) - && Math.max(stagger.animationDelay, stagger.transitionDelay); - if (maxStagger) { - $timeout(triggerAnimationStart, - Math.floor(maxStagger * itemIndex * ONE_SECOND), - false); - } else { - triggerAnimationStart(); - } - - // this will decorate the existing promise runner with pause/resume methods - runnerHost.resume = function() { - playPause(true); - }; - - runnerHost.pause = function() { - playPause(false); - }; - - function triggerAnimationStart() { - // just incase a stagger animation kicks in when the animation - // itself was cancelled entirely - if (animationClosed) return; - - applyBlocking(false); - - forEach(temporaryStyles, function(entry) { - var key = entry[0]; - var value = entry[1]; - node.style[key] = value; - }); - - applyAnimationClasses(element, options); - $$jqLite.addClass(element, activeClasses); - - if (flags.recalculateTimingStyles) { - fullClassName = node.getAttribute('class') + ' ' + preparationClasses; - cacheKey = $$animateCache.cacheKey(node, method, options.addClass, options.removeClass); - - timings = computeTimings(node, fullClassName, cacheKey, false); - relativeDelay = timings.maxDelay; - maxDelay = Math.max(relativeDelay, 0); - maxDuration = timings.maxDuration; - - if (maxDuration === 0) { - close(); - return; - } - - flags.hasTransitions = timings.transitionDuration > 0; - flags.hasAnimations = timings.animationDuration > 0; - } - - if (flags.applyAnimationDelay) { - relativeDelay = typeof options.delay !== 'boolean' && truthyTimingValue(options.delay) - ? parseFloat(options.delay) - : relativeDelay; - - maxDelay = Math.max(relativeDelay, 0); - timings.animationDelay = relativeDelay; - delayStyle = getCssDelayStyle(relativeDelay, true); - temporaryStyles.push(delayStyle); - node.style[delayStyle[0]] = delayStyle[1]; - } - - maxDelayTime = maxDelay * ONE_SECOND; - maxDurationTime = maxDuration * ONE_SECOND; - - if (options.easing) { - var easeProp, easeVal = options.easing; - if (flags.hasTransitions) { - easeProp = TRANSITION_PROP + TIMING_KEY; - temporaryStyles.push([easeProp, easeVal]); - node.style[easeProp] = easeVal; - } - if (flags.hasAnimations) { - easeProp = ANIMATION_PROP + TIMING_KEY; - temporaryStyles.push([easeProp, easeVal]); - node.style[easeProp] = easeVal; - } - } - - if (timings.transitionDuration) { - events.push(TRANSITIONEND_EVENT); - } - - if (timings.animationDuration) { - events.push(ANIMATIONEND_EVENT); - } - - startTime = Date.now(); - var timerTime = maxDelayTime + CLOSING_TIME_BUFFER * maxDurationTime; - var endTime = startTime + timerTime; - - var animationsData = element.data(ANIMATE_TIMER_KEY) || []; - var setupFallbackTimer = true; - if (animationsData.length) { - var currentTimerData = animationsData[0]; - setupFallbackTimer = endTime > currentTimerData.expectedEndTime; - if (setupFallbackTimer) { - $timeout.cancel(currentTimerData.timer); - } else { - animationsData.push(close); - } - } - - if (setupFallbackTimer) { - var timer = $timeout(onAnimationExpired, timerTime, false); - animationsData[0] = { - timer: timer, - expectedEndTime: endTime - }; - animationsData.push(close); - element.data(ANIMATE_TIMER_KEY, animationsData); - } - - if (events.length) { - element.on(events.join(' '), onAnimationProgress); - } - - if (options.to) { - if (options.cleanupStyles) { - registerRestorableStyles(restoreStyles, node, Object.keys(options.to)); - } - applyAnimationToStyles(element, options); - } - } - - function onAnimationExpired() { - var animationsData = element.data(ANIMATE_TIMER_KEY); - - // this will be false in the event that the element was - // removed from the DOM (via a leave animation or something - // similar) - if (animationsData) { - for (var i = 1; i < animationsData.length; i++) { - animationsData[i](); - } - element.removeData(ANIMATE_TIMER_KEY); - } - } - } - }; - }]; -}]; - -var $$AnimateCssDriverProvider = ['$$animationProvider', /** @this */ function($$animationProvider) { - $$animationProvider.drivers.push('$$animateCssDriver'); - - var NG_ANIMATE_SHIM_CLASS_NAME = 'ng-animate-shim'; - var NG_ANIMATE_ANCHOR_CLASS_NAME = 'ng-anchor'; - - var NG_OUT_ANCHOR_CLASS_NAME = 'ng-anchor-out'; - var NG_IN_ANCHOR_CLASS_NAME = 'ng-anchor-in'; - - function isDocumentFragment(node) { - return node.parentNode && node.parentNode.nodeType === 11; - } - - this.$get = ['$animateCss', '$rootScope', '$$AnimateRunner', '$rootElement', '$sniffer', '$$jqLite', '$document', - function($animateCss, $rootScope, $$AnimateRunner, $rootElement, $sniffer, $$jqLite, $document) { - - // only browsers that support these properties can render animations - if (!$sniffer.animations && !$sniffer.transitions) return noop; - - var bodyNode = $document[0].body; - var rootNode = getDomNode($rootElement); - - var rootBodyElement = jqLite( - // this is to avoid using something that exists outside of the body - // we also special case the doc fragment case because our unit test code - // appends the $rootElement to the body after the app has been bootstrapped - isDocumentFragment(rootNode) || bodyNode.contains(rootNode) ? rootNode : bodyNode - ); - - return function initDriverFn(animationDetails) { - return animationDetails.from && animationDetails.to - ? prepareFromToAnchorAnimation(animationDetails.from, - animationDetails.to, - animationDetails.classes, - animationDetails.anchors) - : prepareRegularAnimation(animationDetails); - }; - - function filterCssClasses(classes) { - //remove all the `ng-` stuff - return classes.replace(/\bng-\S+\b/g, ''); - } - - function getUniqueValues(a, b) { - if (isString(a)) a = a.split(' '); - if (isString(b)) b = b.split(' '); - return a.filter(function(val) { - return b.indexOf(val) === -1; - }).join(' '); - } - - function prepareAnchoredAnimation(classes, outAnchor, inAnchor) { - var clone = jqLite(getDomNode(outAnchor).cloneNode(true)); - var startingClasses = filterCssClasses(getClassVal(clone)); - - outAnchor.addClass(NG_ANIMATE_SHIM_CLASS_NAME); - inAnchor.addClass(NG_ANIMATE_SHIM_CLASS_NAME); - - clone.addClass(NG_ANIMATE_ANCHOR_CLASS_NAME); - - rootBodyElement.append(clone); - - var animatorIn, animatorOut = prepareOutAnimation(); - - // the user may not end up using the `out` animation and - // only making use of the `in` animation or vice-versa. - // In either case we should allow this and not assume the - // animation is over unless both animations are not used. - if (!animatorOut) { - animatorIn = prepareInAnimation(); - if (!animatorIn) { - return end(); - } - } - - var startingAnimator = animatorOut || animatorIn; - - return { - start: function() { - var runner; - - var currentAnimation = startingAnimator.start(); - currentAnimation.done(function() { - currentAnimation = null; - if (!animatorIn) { - animatorIn = prepareInAnimation(); - if (animatorIn) { - currentAnimation = animatorIn.start(); - currentAnimation.done(function() { - currentAnimation = null; - end(); - runner.complete(); - }); - return currentAnimation; - } - } - // in the event that there is no `in` animation - end(); - runner.complete(); - }); - - runner = new $$AnimateRunner({ - end: endFn, - cancel: endFn - }); - - return runner; - - function endFn() { - if (currentAnimation) { - currentAnimation.end(); - } - } - } - }; - - function calculateAnchorStyles(anchor) { - var styles = {}; - - var coords = getDomNode(anchor).getBoundingClientRect(); - - // we iterate directly since safari messes up and doesn't return - // all the keys for the coords object when iterated - forEach(['width','height','top','left'], function(key) { - var value = coords[key]; - switch (key) { - case 'top': - value += bodyNode.scrollTop; - break; - case 'left': - value += bodyNode.scrollLeft; - break; - } - styles[key] = Math.floor(value) + 'px'; - }); - return styles; - } - - function prepareOutAnimation() { - var animator = $animateCss(clone, { - addClass: NG_OUT_ANCHOR_CLASS_NAME, - delay: true, - from: calculateAnchorStyles(outAnchor) - }); - - // read the comment within `prepareRegularAnimation` to understand - // why this check is necessary - return animator.$$willAnimate ? animator : null; - } - - function getClassVal(element) { - return element.attr('class') || ''; - } - - function prepareInAnimation() { - var endingClasses = filterCssClasses(getClassVal(inAnchor)); - var toAdd = getUniqueValues(endingClasses, startingClasses); - var toRemove = getUniqueValues(startingClasses, endingClasses); - - var animator = $animateCss(clone, { - to: calculateAnchorStyles(inAnchor), - addClass: NG_IN_ANCHOR_CLASS_NAME + ' ' + toAdd, - removeClass: NG_OUT_ANCHOR_CLASS_NAME + ' ' + toRemove, - delay: true - }); - - // read the comment within `prepareRegularAnimation` to understand - // why this check is necessary - return animator.$$willAnimate ? animator : null; - } - - function end() { - clone.remove(); - outAnchor.removeClass(NG_ANIMATE_SHIM_CLASS_NAME); - inAnchor.removeClass(NG_ANIMATE_SHIM_CLASS_NAME); - } - } - - function prepareFromToAnchorAnimation(from, to, classes, anchors) { - var fromAnimation = prepareRegularAnimation(from, noop); - var toAnimation = prepareRegularAnimation(to, noop); - - var anchorAnimations = []; - forEach(anchors, function(anchor) { - var outElement = anchor['out']; - var inElement = anchor['in']; - var animator = prepareAnchoredAnimation(classes, outElement, inElement); - if (animator) { - anchorAnimations.push(animator); - } - }); - - // no point in doing anything when there are no elements to animate - if (!fromAnimation && !toAnimation && anchorAnimations.length === 0) return; - - return { - start: function() { - var animationRunners = []; - - if (fromAnimation) { - animationRunners.push(fromAnimation.start()); - } - - if (toAnimation) { - animationRunners.push(toAnimation.start()); - } - - forEach(anchorAnimations, function(animation) { - animationRunners.push(animation.start()); - }); - - var runner = new $$AnimateRunner({ - end: endFn, - cancel: endFn // CSS-driven animations cannot be cancelled, only ended - }); - - $$AnimateRunner.all(animationRunners, function(status) { - runner.complete(status); - }); - - return runner; - - function endFn() { - forEach(animationRunners, function(runner) { - runner.end(); - }); - } - } - }; - } - - function prepareRegularAnimation(animationDetails) { - var element = animationDetails.element; - var options = animationDetails.options || {}; - - if (animationDetails.structural) { - options.event = animationDetails.event; - options.structural = true; - options.applyClassesEarly = true; - - // we special case the leave animation since we want to ensure that - // the element is removed as soon as the animation is over. Otherwise - // a flicker might appear or the element may not be removed at all - if (animationDetails.event === 'leave') { - options.onDone = options.domOperation; - } - } - - // We assign the preparationClasses as the actual animation event since - // the internals of $animateCss will just suffix the event token values - // with `-active` to trigger the animation. - if (options.preparationClasses) { - options.event = concatWithSpace(options.event, options.preparationClasses); - } - - var animator = $animateCss(element, options); - - // the driver lookup code inside of $$animation attempts to spawn a - // driver one by one until a driver returns a.$$willAnimate animator object. - // $animateCss will always return an object, however, it will pass in - // a flag as a hint as to whether an animation was detected or not - return animator.$$willAnimate ? animator : null; - } - }]; -}]; - -// TODO(matsko): use caching here to speed things up for detection -// TODO(matsko): add documentation -// by the time... - -var $$AnimateJsProvider = ['$animateProvider', /** @this */ function($animateProvider) { - this.$get = ['$injector', '$$AnimateRunner', '$$jqLite', - function($injector, $$AnimateRunner, $$jqLite) { - - var applyAnimationClasses = applyAnimationClassesFactory($$jqLite); - // $animateJs(element, 'enter'); - return function(element, event, classes, options) { - var animationClosed = false; - - // the `classes` argument is optional and if it is not used - // then the classes will be resolved from the element's className - // property as well as options.addClass/options.removeClass. - if (arguments.length === 3 && isObject(classes)) { - options = classes; - classes = null; - } - - options = prepareAnimationOptions(options); - if (!classes) { - classes = element.attr('class') || ''; - if (options.addClass) { - classes += ' ' + options.addClass; - } - if (options.removeClass) { - classes += ' ' + options.removeClass; - } - } - - var classesToAdd = options.addClass; - var classesToRemove = options.removeClass; - - // the lookupAnimations function returns a series of animation objects that are - // matched up with one or more of the CSS classes. These animation objects are - // defined via the module.animation factory function. If nothing is detected then - // we don't return anything which then makes $animation query the next driver. - var animations = lookupAnimations(classes); - var before, after; - if (animations.length) { - var afterFn, beforeFn; - if (event === 'leave') { - beforeFn = 'leave'; - afterFn = 'afterLeave'; // TODO(matsko): get rid of this - } else { - beforeFn = 'before' + event.charAt(0).toUpperCase() + event.substr(1); - afterFn = event; - } - - if (event !== 'enter' && event !== 'move') { - before = packageAnimations(element, event, options, animations, beforeFn); - } - after = packageAnimations(element, event, options, animations, afterFn); - } - - // no matching animations - if (!before && !after) return; - - function applyOptions() { - options.domOperation(); - applyAnimationClasses(element, options); - } - - function close() { - animationClosed = true; - applyOptions(); - applyAnimationStyles(element, options); - } - - var runner; - - return { - $$willAnimate: true, - end: function() { - if (runner) { - runner.end(); - } else { - close(); - runner = new $$AnimateRunner(); - runner.complete(true); - } - return runner; - }, - start: function() { - if (runner) { - return runner; - } - - runner = new $$AnimateRunner(); - var closeActiveAnimations; - var chain = []; - - if (before) { - chain.push(function(fn) { - closeActiveAnimations = before(fn); - }); - } - - if (chain.length) { - chain.push(function(fn) { - applyOptions(); - fn(true); - }); - } else { - applyOptions(); - } - - if (after) { - chain.push(function(fn) { - closeActiveAnimations = after(fn); - }); - } - - runner.setHost({ - end: function() { - endAnimations(); - }, - cancel: function() { - endAnimations(true); - } - }); - - $$AnimateRunner.chain(chain, onComplete); - return runner; - - function onComplete(success) { - close(success); - runner.complete(success); - } - - function endAnimations(cancelled) { - if (!animationClosed) { - (closeActiveAnimations || noop)(cancelled); - onComplete(cancelled); - } - } - } - }; - - function executeAnimationFn(fn, element, event, options, onDone) { - var args; - switch (event) { - case 'animate': - args = [element, options.from, options.to, onDone]; - break; - - case 'setClass': - args = [element, classesToAdd, classesToRemove, onDone]; - break; - - case 'addClass': - args = [element, classesToAdd, onDone]; - break; - - case 'removeClass': - args = [element, classesToRemove, onDone]; - break; - - default: - args = [element, onDone]; - break; - } - - args.push(options); - - var value = fn.apply(fn, args); - if (value) { - if (isFunction(value.start)) { - value = value.start(); - } - - if (value instanceof $$AnimateRunner) { - value.done(onDone); - } else if (isFunction(value)) { - // optional onEnd / onCancel callback - return value; - } - } - - return noop; - } - - function groupEventedAnimations(element, event, options, animations, fnName) { - var operations = []; - forEach(animations, function(ani) { - var animation = ani[fnName]; - if (!animation) return; - - // note that all of these animations will run in parallel - operations.push(function() { - var runner; - var endProgressCb; - - var resolved = false; - var onAnimationComplete = function(rejected) { - if (!resolved) { - resolved = true; - (endProgressCb || noop)(rejected); - runner.complete(!rejected); - } - }; - - runner = new $$AnimateRunner({ - end: function() { - onAnimationComplete(); - }, - cancel: function() { - onAnimationComplete(true); - } - }); - - endProgressCb = executeAnimationFn(animation, element, event, options, function(result) { - var cancelled = result === false; - onAnimationComplete(cancelled); - }); - - return runner; - }); - }); - - return operations; - } - - function packageAnimations(element, event, options, animations, fnName) { - var operations = groupEventedAnimations(element, event, options, animations, fnName); - if (operations.length === 0) { - var a, b; - if (fnName === 'beforeSetClass') { - a = groupEventedAnimations(element, 'removeClass', options, animations, 'beforeRemoveClass'); - b = groupEventedAnimations(element, 'addClass', options, animations, 'beforeAddClass'); - } else if (fnName === 'setClass') { - a = groupEventedAnimations(element, 'removeClass', options, animations, 'removeClass'); - b = groupEventedAnimations(element, 'addClass', options, animations, 'addClass'); - } - - if (a) { - operations = operations.concat(a); - } - if (b) { - operations = operations.concat(b); - } - } - - if (operations.length === 0) return; - - // TODO(matsko): add documentation - return function startAnimation(callback) { - var runners = []; - if (operations.length) { - forEach(operations, function(animateFn) { - runners.push(animateFn()); - }); - } - - if (runners.length) { - $$AnimateRunner.all(runners, callback); - } else { - callback(); - } - - return function endFn(reject) { - forEach(runners, function(runner) { - if (reject) { - runner.cancel(); - } else { - runner.end(); - } - }); - }; - }; - } - }; - - function lookupAnimations(classes) { - classes = isArray(classes) ? classes : classes.split(' '); - var matches = [], flagMap = {}; - for (var i = 0; i < classes.length; i++) { - var klass = classes[i], - animationFactory = $animateProvider.$$registeredAnimations[klass]; - if (animationFactory && !flagMap[klass]) { - matches.push($injector.get(animationFactory)); - flagMap[klass] = true; - } - } - return matches; - } - }]; -}]; - -var $$AnimateJsDriverProvider = ['$$animationProvider', /** @this */ function($$animationProvider) { - $$animationProvider.drivers.push('$$animateJsDriver'); - this.$get = ['$$animateJs', '$$AnimateRunner', function($$animateJs, $$AnimateRunner) { - return function initDriverFn(animationDetails) { - if (animationDetails.from && animationDetails.to) { - var fromAnimation = prepareAnimation(animationDetails.from); - var toAnimation = prepareAnimation(animationDetails.to); - if (!fromAnimation && !toAnimation) return; - - return { - start: function() { - var animationRunners = []; - - if (fromAnimation) { - animationRunners.push(fromAnimation.start()); - } - - if (toAnimation) { - animationRunners.push(toAnimation.start()); - } - - $$AnimateRunner.all(animationRunners, done); - - var runner = new $$AnimateRunner({ - end: endFnFactory(), - cancel: endFnFactory() - }); - - return runner; - - function endFnFactory() { - return function() { - forEach(animationRunners, function(runner) { - // at this point we cannot cancel animations for groups just yet. 1.5+ - runner.end(); - }); - }; - } - - function done(status) { - runner.complete(status); - } - } - }; - } else { - return prepareAnimation(animationDetails); - } - }; - - function prepareAnimation(animationDetails) { - // TODO(matsko): make sure to check for grouped animations and delegate down to normal animations - var element = animationDetails.element; - var event = animationDetails.event; - var options = animationDetails.options; - var classes = animationDetails.classes; - return $$animateJs(element, event, classes, options); - } - }]; -}]; - -var NG_ANIMATE_ATTR_NAME = 'data-ng-animate'; -var NG_ANIMATE_PIN_DATA = '$ngAnimatePin'; -var $$AnimateQueueProvider = ['$animateProvider', /** @this */ function($animateProvider) { - var PRE_DIGEST_STATE = 1; - var RUNNING_STATE = 2; - var ONE_SPACE = ' '; - - var rules = this.rules = { - skip: [], - cancel: [], - join: [] - }; - - function getEventData(options) { - return { - addClass: options.addClass, - removeClass: options.removeClass, - from: options.from, - to: options.to - }; - } - - function makeTruthyCssClassMap(classString) { - if (!classString) { - return null; - } - - var keys = classString.split(ONE_SPACE); - var map = Object.create(null); - - forEach(keys, function(key) { - map[key] = true; - }); - return map; - } - - function hasMatchingClasses(newClassString, currentClassString) { - if (newClassString && currentClassString) { - var currentClassMap = makeTruthyCssClassMap(currentClassString); - return newClassString.split(ONE_SPACE).some(function(className) { - return currentClassMap[className]; - }); - } - } - - function isAllowed(ruleType, currentAnimation, previousAnimation) { - return rules[ruleType].some(function(fn) { - return fn(currentAnimation, previousAnimation); - }); - } - - function hasAnimationClasses(animation, and) { - var a = (animation.addClass || '').length > 0; - var b = (animation.removeClass || '').length > 0; - return and ? a && b : a || b; - } - - rules.join.push(function(newAnimation, currentAnimation) { - // if the new animation is class-based then we can just tack that on - return !newAnimation.structural && hasAnimationClasses(newAnimation); - }); - - rules.skip.push(function(newAnimation, currentAnimation) { - // there is no need to animate anything if no classes are being added and - // there is no structural animation that will be triggered - return !newAnimation.structural && !hasAnimationClasses(newAnimation); - }); - - rules.skip.push(function(newAnimation, currentAnimation) { - // why should we trigger a new structural animation if the element will - // be removed from the DOM anyway? - return currentAnimation.event === 'leave' && newAnimation.structural; - }); - - rules.skip.push(function(newAnimation, currentAnimation) { - // if there is an ongoing current animation then don't even bother running the class-based animation - return currentAnimation.structural && currentAnimation.state === RUNNING_STATE && !newAnimation.structural; - }); - - rules.cancel.push(function(newAnimation, currentAnimation) { - // there can never be two structural animations running at the same time - return currentAnimation.structural && newAnimation.structural; - }); - - rules.cancel.push(function(newAnimation, currentAnimation) { - // if the previous animation is already running, but the new animation will - // be triggered, but the new animation is structural - return currentAnimation.state === RUNNING_STATE && newAnimation.structural; - }); - - rules.cancel.push(function(newAnimation, currentAnimation) { - // cancel the animation if classes added / removed in both animation cancel each other out, - // but only if the current animation isn't structural - - if (currentAnimation.structural) return false; - - var nA = newAnimation.addClass; - var nR = newAnimation.removeClass; - var cA = currentAnimation.addClass; - var cR = currentAnimation.removeClass; - - // early detection to save the global CPU shortage :) - if ((isUndefined(nA) && isUndefined(nR)) || (isUndefined(cA) && isUndefined(cR))) { - return false; - } - - return hasMatchingClasses(nA, cR) || hasMatchingClasses(nR, cA); - }); - - this.$get = ['$$rAF', '$rootScope', '$rootElement', '$document', '$$Map', - '$$animation', '$$AnimateRunner', '$templateRequest', '$$jqLite', '$$forceReflow', - '$$isDocumentHidden', - function($$rAF, $rootScope, $rootElement, $document, $$Map, - $$animation, $$AnimateRunner, $templateRequest, $$jqLite, $$forceReflow, - $$isDocumentHidden) { - - var activeAnimationsLookup = new $$Map(); - var disabledElementsLookup = new $$Map(); - var animationsEnabled = null; - - function removeFromDisabledElementsLookup(evt) { - disabledElementsLookup.delete(evt.target); - } - - function postDigestTaskFactory() { - var postDigestCalled = false; - return function(fn) { - // we only issue a call to postDigest before - // it has first passed. This prevents any callbacks - // from not firing once the animation has completed - // since it will be out of the digest cycle. - if (postDigestCalled) { - fn(); - } else { - $rootScope.$$postDigest(function() { - postDigestCalled = true; - fn(); - }); - } - }; - } - - // Wait until all directive and route-related templates are downloaded and - // compiled. The $templateRequest.totalPendingRequests variable keeps track of - // all of the remote templates being currently downloaded. If there are no - // templates currently downloading then the watcher will still fire anyway. - var deregisterWatch = $rootScope.$watch( - function() { return $templateRequest.totalPendingRequests === 0; }, - function(isEmpty) { - if (!isEmpty) return; - deregisterWatch(); - - // Now that all templates have been downloaded, $animate will wait until - // the post digest queue is empty before enabling animations. By having two - // calls to $postDigest calls we can ensure that the flag is enabled at the - // very end of the post digest queue. Since all of the animations in $animate - // use $postDigest, it's important that the code below executes at the end. - // This basically means that the page is fully downloaded and compiled before - // any animations are triggered. - $rootScope.$$postDigest(function() { - $rootScope.$$postDigest(function() { - // we check for null directly in the event that the application already called - // .enabled() with whatever arguments that it provided it with - if (animationsEnabled === null) { - animationsEnabled = true; - } - }); - }); - } - ); - - var callbackRegistry = Object.create(null); - - // remember that the `customFilter`/`classNameFilter` are set during the - // provider/config stage therefore we can optimize here and setup helper functions - var customFilter = $animateProvider.customFilter(); - var classNameFilter = $animateProvider.classNameFilter(); - var returnTrue = function() { return true; }; - - var isAnimatableByFilter = customFilter || returnTrue; - var isAnimatableClassName = !classNameFilter ? returnTrue : function(node, options) { - var className = [node.getAttribute('class'), options.addClass, options.removeClass].join(' '); - return classNameFilter.test(className); - }; - - var applyAnimationClasses = applyAnimationClassesFactory($$jqLite); - - function normalizeAnimationDetails(element, animation) { - return mergeAnimationDetails(element, animation, {}); - } - - // IE9-11 has no method "contains" in SVG element and in Node.prototype. Bug #10259. - var contains = window.Node.prototype.contains || /** @this */ function(arg) { - // eslint-disable-next-line no-bitwise - return this === arg || !!(this.compareDocumentPosition(arg) & 16); - }; - - function findCallbacks(targetParentNode, targetNode, event) { - var matches = []; - var entries = callbackRegistry[event]; - if (entries) { - forEach(entries, function(entry) { - if (contains.call(entry.node, targetNode)) { - matches.push(entry.callback); - } else if (event === 'leave' && contains.call(entry.node, targetParentNode)) { - matches.push(entry.callback); - } - }); - } - - return matches; - } - - function filterFromRegistry(list, matchContainer, matchCallback) { - var containerNode = extractElementNode(matchContainer); - return list.filter(function(entry) { - var isMatch = entry.node === containerNode && - (!matchCallback || entry.callback === matchCallback); - return !isMatch; - }); - } - - function cleanupEventListeners(phase, node) { - if (phase === 'close' && !node.parentNode) { - // If the element is not attached to a parentNode, it has been removed by - // the domOperation, and we can safely remove the event callbacks - $animate.off(node); - } - } - - var $animate = { - on: function(event, container, callback) { - var node = extractElementNode(container); - callbackRegistry[event] = callbackRegistry[event] || []; - callbackRegistry[event].push({ - node: node, - callback: callback - }); - - // Remove the callback when the element is removed from the DOM - jqLite(container).on('$destroy', function() { - var animationDetails = activeAnimationsLookup.get(node); - - if (!animationDetails) { - // If there's an animation ongoing, the callback calling code will remove - // the event listeners. If we'd remove here, the callbacks would be removed - // before the animation ends - $animate.off(event, container, callback); - } - }); - }, - - off: function(event, container, callback) { - if (arguments.length === 1 && !isString(arguments[0])) { - container = arguments[0]; - for (var eventType in callbackRegistry) { - callbackRegistry[eventType] = filterFromRegistry(callbackRegistry[eventType], container); - } - - return; - } - - var entries = callbackRegistry[event]; - if (!entries) return; - - callbackRegistry[event] = arguments.length === 1 - ? null - : filterFromRegistry(entries, container, callback); - }, - - pin: function(element, parentElement) { - assertArg(isElement(element), 'element', 'not an element'); - assertArg(isElement(parentElement), 'parentElement', 'not an element'); - element.data(NG_ANIMATE_PIN_DATA, parentElement); - }, - - push: function(element, event, options, domOperation) { - options = options || {}; - options.domOperation = domOperation; - return queueAnimation(element, event, options); - }, - - // this method has four signatures: - // () - global getter - // (bool) - global setter - // (element) - element getter - // (element, bool) - element setter - enabled: function(element, bool) { - var argCount = arguments.length; - - if (argCount === 0) { - // () - Global getter - bool = !!animationsEnabled; - } else { - var hasElement = isElement(element); - - if (!hasElement) { - // (bool) - Global setter - bool = animationsEnabled = !!element; - } else { - var node = getDomNode(element); - - if (argCount === 1) { - // (element) - Element getter - bool = !disabledElementsLookup.get(node); - } else { - // (element, bool) - Element setter - if (!disabledElementsLookup.has(node)) { - // The element is added to the map for the first time. - // Create a listener to remove it on `$destroy` (to avoid memory leak). - jqLite(element).on('$destroy', removeFromDisabledElementsLookup); - } - disabledElementsLookup.set(node, !bool); - } - } - } - - return bool; - } - }; - - return $animate; - - function queueAnimation(originalElement, event, initialOptions) { - // we always make a copy of the options since - // there should never be any side effects on - // the input data when running `$animateCss`. - var options = copy(initialOptions); - - var element = stripCommentsFromElement(originalElement); - var node = getDomNode(element); - var parentNode = node && node.parentNode; - - options = prepareAnimationOptions(options); - - // we create a fake runner with a working promise. - // These methods will become available after the digest has passed - var runner = new $$AnimateRunner(); - - // this is used to trigger callbacks in postDigest mode - var runInNextPostDigestOrNow = postDigestTaskFactory(); - - if (isArray(options.addClass)) { - options.addClass = options.addClass.join(' '); - } - - if (options.addClass && !isString(options.addClass)) { - options.addClass = null; - } - - if (isArray(options.removeClass)) { - options.removeClass = options.removeClass.join(' '); - } - - if (options.removeClass && !isString(options.removeClass)) { - options.removeClass = null; - } - - if (options.from && !isObject(options.from)) { - options.from = null; - } - - if (options.to && !isObject(options.to)) { - options.to = null; - } - - // If animations are hard-disabled for the whole application there is no need to continue. - // There are also situations where a directive issues an animation for a jqLite wrapper that - // contains only comment nodes. In this case, there is no way we can perform an animation. - if (!animationsEnabled || - !node || - !isAnimatableByFilter(node, event, initialOptions) || - !isAnimatableClassName(node, options)) { - close(); - return runner; - } - - var isStructural = ['enter', 'move', 'leave'].indexOf(event) >= 0; - - var documentHidden = $$isDocumentHidden(); - - // This is a hard disable of all animations the element itself, therefore there is no need to - // continue further past this point if not enabled - // Animations are also disabled if the document is currently hidden (page is not visible - // to the user), because browsers slow down or do not flush calls to requestAnimationFrame - var skipAnimations = documentHidden || disabledElementsLookup.get(node); - var existingAnimation = (!skipAnimations && activeAnimationsLookup.get(node)) || {}; - var hasExistingAnimation = !!existingAnimation.state; - - // there is no point in traversing the same collection of parent ancestors if a followup - // animation will be run on the same element that already did all that checking work - if (!skipAnimations && (!hasExistingAnimation || existingAnimation.state !== PRE_DIGEST_STATE)) { - skipAnimations = !areAnimationsAllowed(node, parentNode, event); - } - - if (skipAnimations) { - // Callbacks should fire even if the document is hidden (regression fix for issue #14120) - if (documentHidden) notifyProgress(runner, event, 'start', getEventData(options)); - close(); - if (documentHidden) notifyProgress(runner, event, 'close', getEventData(options)); - return runner; - } - - if (isStructural) { - closeChildAnimations(node); - } - - var newAnimation = { - structural: isStructural, - element: element, - event: event, - addClass: options.addClass, - removeClass: options.removeClass, - close: close, - options: options, - runner: runner - }; - - if (hasExistingAnimation) { - var skipAnimationFlag = isAllowed('skip', newAnimation, existingAnimation); - if (skipAnimationFlag) { - if (existingAnimation.state === RUNNING_STATE) { - close(); - return runner; - } else { - mergeAnimationDetails(element, existingAnimation, newAnimation); - return existingAnimation.runner; - } - } - var cancelAnimationFlag = isAllowed('cancel', newAnimation, existingAnimation); - if (cancelAnimationFlag) { - if (existingAnimation.state === RUNNING_STATE) { - // this will end the animation right away and it is safe - // to do so since the animation is already running and the - // runner callback code will run in async - existingAnimation.runner.end(); - } else if (existingAnimation.structural) { - // this means that the animation is queued into a digest, but - // hasn't started yet. Therefore it is safe to run the close - // method which will call the runner methods in async. - existingAnimation.close(); - } else { - // this will merge the new animation options into existing animation options - mergeAnimationDetails(element, existingAnimation, newAnimation); - - return existingAnimation.runner; - } - } else { - // a joined animation means that this animation will take over the existing one - // so an example would involve a leave animation taking over an enter. Then when - // the postDigest kicks in the enter will be ignored. - var joinAnimationFlag = isAllowed('join', newAnimation, existingAnimation); - if (joinAnimationFlag) { - if (existingAnimation.state === RUNNING_STATE) { - normalizeAnimationDetails(element, newAnimation); - } else { - applyGeneratedPreparationClasses($$jqLite, element, isStructural ? event : null, options); - - event = newAnimation.event = existingAnimation.event; - options = mergeAnimationDetails(element, existingAnimation, newAnimation); - - //we return the same runner since only the option values of this animation will - //be fed into the `existingAnimation`. - return existingAnimation.runner; - } - } - } - } else { - // normalization in this case means that it removes redundant CSS classes that - // already exist (addClass) or do not exist (removeClass) on the element - normalizeAnimationDetails(element, newAnimation); - } - - // when the options are merged and cleaned up we may end up not having to do - // an animation at all, therefore we should check this before issuing a post - // digest callback. Structural animations will always run no matter what. - var isValidAnimation = newAnimation.structural; - if (!isValidAnimation) { - // animate (from/to) can be quickly checked first, otherwise we check if any classes are present - isValidAnimation = (newAnimation.event === 'animate' && Object.keys(newAnimation.options.to || {}).length > 0) - || hasAnimationClasses(newAnimation); - } - - if (!isValidAnimation) { - close(); - clearElementAnimationState(node); - return runner; - } - - // the counter keeps track of cancelled animations - var counter = (existingAnimation.counter || 0) + 1; - newAnimation.counter = counter; - - markElementAnimationState(node, PRE_DIGEST_STATE, newAnimation); - - $rootScope.$$postDigest(function() { - // It is possible that the DOM nodes inside `originalElement` have been replaced. This can - // happen if the animated element is a transcluded clone and also has a `templateUrl` - // directive on it. Therefore, we must recreate `element` in order to interact with the - // actual DOM nodes. - // Note: We still need to use the old `node` for certain things, such as looking up in - // HashMaps where it was used as the key. - - element = stripCommentsFromElement(originalElement); - - var animationDetails = activeAnimationsLookup.get(node); - var animationCancelled = !animationDetails; - animationDetails = animationDetails || {}; - - // if addClass/removeClass is called before something like enter then the - // registered parent element may not be present. The code below will ensure - // that a final value for parent element is obtained - var parentElement = element.parent() || []; - - // animate/structural/class-based animations all have requirements. Otherwise there - // is no point in performing an animation. The parent node must also be set. - var isValidAnimation = parentElement.length > 0 - && (animationDetails.event === 'animate' - || animationDetails.structural - || hasAnimationClasses(animationDetails)); - - // this means that the previous animation was cancelled - // even if the follow-up animation is the same event - if (animationCancelled || animationDetails.counter !== counter || !isValidAnimation) { - // if another animation did not take over then we need - // to make sure that the domOperation and options are - // handled accordingly - if (animationCancelled) { - applyAnimationClasses(element, options); - applyAnimationStyles(element, options); - } - - // if the event changed from something like enter to leave then we do - // it, otherwise if it's the same then the end result will be the same too - if (animationCancelled || (isStructural && animationDetails.event !== event)) { - options.domOperation(); - runner.end(); - } - - // in the event that the element animation was not cancelled or a follow-up animation - // isn't allowed to animate from here then we need to clear the state of the element - // so that any future animations won't read the expired animation data. - if (!isValidAnimation) { - clearElementAnimationState(node); - } - - return; - } - - // this combined multiple class to addClass / removeClass into a setClass event - // so long as a structural event did not take over the animation - event = !animationDetails.structural && hasAnimationClasses(animationDetails, true) - ? 'setClass' - : animationDetails.event; - - markElementAnimationState(node, RUNNING_STATE); - var realRunner = $$animation(element, event, animationDetails.options); - - // this will update the runner's flow-control events based on - // the `realRunner` object. - runner.setHost(realRunner); - notifyProgress(runner, event, 'start', getEventData(options)); - - realRunner.done(function(status) { - close(!status); - var animationDetails = activeAnimationsLookup.get(node); - if (animationDetails && animationDetails.counter === counter) { - clearElementAnimationState(node); - } - notifyProgress(runner, event, 'close', getEventData(options)); - }); - }); - - return runner; - - function notifyProgress(runner, event, phase, data) { - runInNextPostDigestOrNow(function() { - var callbacks = findCallbacks(parentNode, node, event); - if (callbacks.length) { - // do not optimize this call here to RAF because - // we don't know how heavy the callback code here will - // be and if this code is buffered then this can - // lead to a performance regression. - $$rAF(function() { - forEach(callbacks, function(callback) { - callback(element, phase, data); - }); - cleanupEventListeners(phase, node); - }); - } else { - cleanupEventListeners(phase, node); - } - }); - runner.progress(event, phase, data); - } - - function close(reject) { - clearGeneratedClasses(element, options); - applyAnimationClasses(element, options); - applyAnimationStyles(element, options); - options.domOperation(); - runner.complete(!reject); - } - } - - function closeChildAnimations(node) { - var children = node.querySelectorAll('[' + NG_ANIMATE_ATTR_NAME + ']'); - forEach(children, function(child) { - var state = parseInt(child.getAttribute(NG_ANIMATE_ATTR_NAME), 10); - var animationDetails = activeAnimationsLookup.get(child); - if (animationDetails) { - switch (state) { - case RUNNING_STATE: - animationDetails.runner.end(); - /* falls through */ - case PRE_DIGEST_STATE: - activeAnimationsLookup.delete(child); - break; - } - } - }); - } - - function clearElementAnimationState(node) { - node.removeAttribute(NG_ANIMATE_ATTR_NAME); - activeAnimationsLookup.delete(node); - } - - /** - * This fn returns false if any of the following is true: - * a) animations on any parent element are disabled, and animations on the element aren't explicitly allowed - * b) a parent element has an ongoing structural animation, and animateChildren is false - * c) the element is not a child of the body - * d) the element is not a child of the $rootElement - */ - function areAnimationsAllowed(node, parentNode, event) { - var bodyNode = $document[0].body; - var rootNode = getDomNode($rootElement); - - var bodyNodeDetected = (node === bodyNode) || node.nodeName === 'HTML'; - var rootNodeDetected = (node === rootNode); - var parentAnimationDetected = false; - var elementDisabled = disabledElementsLookup.get(node); - var animateChildren; - - var parentHost = jqLite.data(node, NG_ANIMATE_PIN_DATA); - if (parentHost) { - parentNode = getDomNode(parentHost); - } - - while (parentNode) { - if (!rootNodeDetected) { - // AngularJS doesn't want to attempt to animate elements outside of the application - // therefore we need to ensure that the rootElement is an ancestor of the current element - rootNodeDetected = (parentNode === rootNode); - } - - if (parentNode.nodeType !== ELEMENT_NODE) { - // no point in inspecting the #document element - break; - } - - var details = activeAnimationsLookup.get(parentNode) || {}; - // either an enter, leave or move animation will commence - // therefore we can't allow any animations to take place - // but if a parent animation is class-based then that's ok - if (!parentAnimationDetected) { - var parentNodeDisabled = disabledElementsLookup.get(parentNode); - - if (parentNodeDisabled === true && elementDisabled !== false) { - // disable animations if the user hasn't explicitly enabled animations on the - // current element - elementDisabled = true; - // element is disabled via parent element, no need to check anything else - break; - } else if (parentNodeDisabled === false) { - elementDisabled = false; - } - parentAnimationDetected = details.structural; - } - - if (isUndefined(animateChildren) || animateChildren === true) { - var value = jqLite.data(parentNode, NG_ANIMATE_CHILDREN_DATA); - if (isDefined(value)) { - animateChildren = value; - } - } - - // there is no need to continue traversing at this point - if (parentAnimationDetected && animateChildren === false) break; - - if (!bodyNodeDetected) { - // we also need to ensure that the element is or will be a part of the body element - // otherwise it is pointless to even issue an animation to be rendered - bodyNodeDetected = (parentNode === bodyNode); - } - - if (bodyNodeDetected && rootNodeDetected) { - // If both body and root have been found, any other checks are pointless, - // as no animation data should live outside the application - break; - } - - if (!rootNodeDetected) { - // If `rootNode` is not detected, check if `parentNode` is pinned to another element - parentHost = jqLite.data(parentNode, NG_ANIMATE_PIN_DATA); - if (parentHost) { - // The pin target element becomes the next parent element - parentNode = getDomNode(parentHost); - continue; - } - } - - parentNode = parentNode.parentNode; - } - - var allowAnimation = (!parentAnimationDetected || animateChildren) && elementDisabled !== true; - return allowAnimation && rootNodeDetected && bodyNodeDetected; - } - - function markElementAnimationState(node, state, details) { - details = details || {}; - details.state = state; - - node.setAttribute(NG_ANIMATE_ATTR_NAME, state); - - var oldValue = activeAnimationsLookup.get(node); - var newValue = oldValue - ? extend(oldValue, details) - : details; - activeAnimationsLookup.set(node, newValue); - } - }]; -}]; - -/** @this */ -var $$AnimateCacheProvider = function() { - - var KEY = '$$ngAnimateParentKey'; - var parentCounter = 0; - var cache = Object.create(null); - - this.$get = [function() { - return { - cacheKey: function(node, method, addClass, removeClass) { - var parentNode = node.parentNode; - var parentID = parentNode[KEY] || (parentNode[KEY] = ++parentCounter); - var parts = [parentID, method, node.getAttribute('class')]; - if (addClass) { - parts.push(addClass); - } - if (removeClass) { - parts.push(removeClass); - } - return parts.join(' '); - }, - - containsCachedAnimationWithoutDuration: function(key) { - var entry = cache[key]; - - // nothing cached, so go ahead and animate - // otherwise it should be a valid animation - return (entry && !entry.isValid) || false; - }, - - flush: function() { - cache = Object.create(null); - }, - - count: function(key) { - var entry = cache[key]; - return entry ? entry.total : 0; - }, - - get: function(key) { - var entry = cache[key]; - return entry && entry.value; - }, - - put: function(key, value, isValid) { - if (!cache[key]) { - cache[key] = { total: 1, value: value, isValid: isValid }; - } else { - cache[key].total++; - cache[key].value = value; - } - } - }; - }]; -}; - -/* exported $$AnimationProvider */ - -var $$AnimationProvider = ['$animateProvider', /** @this */ function($animateProvider) { - var NG_ANIMATE_REF_ATTR = 'ng-animate-ref'; - - var drivers = this.drivers = []; - - var RUNNER_STORAGE_KEY = '$$animationRunner'; - var PREPARE_CLASSES_KEY = '$$animatePrepareClasses'; - - function setRunner(element, runner) { - element.data(RUNNER_STORAGE_KEY, runner); - } - - function removeRunner(element) { - element.removeData(RUNNER_STORAGE_KEY); - } - - function getRunner(element) { - return element.data(RUNNER_STORAGE_KEY); - } - - this.$get = ['$$jqLite', '$rootScope', '$injector', '$$AnimateRunner', '$$Map', '$$rAFScheduler', '$$animateCache', - function($$jqLite, $rootScope, $injector, $$AnimateRunner, $$Map, $$rAFScheduler, $$animateCache) { - - var animationQueue = []; - var applyAnimationClasses = applyAnimationClassesFactory($$jqLite); - - function sortAnimations(animations) { - var tree = { children: [] }; - var i, lookup = new $$Map(); - - // this is done first beforehand so that the map - // is filled with a list of the elements that will be animated - for (i = 0; i < animations.length; i++) { - var animation = animations[i]; - lookup.set(animation.domNode, animations[i] = { - domNode: animation.domNode, - element: animation.element, - fn: animation.fn, - children: [] - }); - } - - for (i = 0; i < animations.length; i++) { - processNode(animations[i]); - } - - return flatten(tree); - - function processNode(entry) { - if (entry.processed) return entry; - entry.processed = true; - - var elementNode = entry.domNode; - var parentNode = elementNode.parentNode; - lookup.set(elementNode, entry); - - var parentEntry; - while (parentNode) { - parentEntry = lookup.get(parentNode); - if (parentEntry) { - if (!parentEntry.processed) { - parentEntry = processNode(parentEntry); - } - break; - } - parentNode = parentNode.parentNode; - } - - (parentEntry || tree).children.push(entry); - return entry; - } - - function flatten(tree) { - var result = []; - var queue = []; - var i; - - for (i = 0; i < tree.children.length; i++) { - queue.push(tree.children[i]); - } - - var remainingLevelEntries = queue.length; - var nextLevelEntries = 0; - var row = []; - - for (i = 0; i < queue.length; i++) { - var entry = queue[i]; - if (remainingLevelEntries <= 0) { - remainingLevelEntries = nextLevelEntries; - nextLevelEntries = 0; - result.push(row); - row = []; - } - row.push(entry); - entry.children.forEach(function(childEntry) { - nextLevelEntries++; - queue.push(childEntry); - }); - remainingLevelEntries--; - } - - if (row.length) { - result.push(row); - } - - return result; - } - } - - // TODO(matsko): document the signature in a better way - return function(element, event, options) { - options = prepareAnimationOptions(options); - var isStructural = ['enter', 'move', 'leave'].indexOf(event) >= 0; - - // there is no animation at the current moment, however - // these runner methods will get later updated with the - // methods leading into the driver's end/cancel methods - // for now they just stop the animation from starting - var runner = new $$AnimateRunner({ - end: function() { close(); }, - cancel: function() { close(true); } - }); - - if (!drivers.length) { - close(); - return runner; - } - - var classes = mergeClasses(element.attr('class'), mergeClasses(options.addClass, options.removeClass)); - var tempClasses = options.tempClasses; - if (tempClasses) { - classes += ' ' + tempClasses; - options.tempClasses = null; - } - - if (isStructural) { - element.data(PREPARE_CLASSES_KEY, 'ng-' + event + PREPARE_CLASS_SUFFIX); - } - - setRunner(element, runner); - - animationQueue.push({ - // this data is used by the postDigest code and passed into - // the driver step function - element: element, - classes: classes, - event: event, - structural: isStructural, - options: options, - beforeStart: beforeStart, - close: close - }); - - element.on('$destroy', handleDestroyedElement); - - // we only want there to be one function called within the post digest - // block. This way we can group animations for all the animations that - // were apart of the same postDigest flush call. - if (animationQueue.length > 1) return runner; - - $rootScope.$$postDigest(function() { - var animations = []; - forEach(animationQueue, function(entry) { - // the element was destroyed early on which removed the runner - // form its storage. This means we can't animate this element - // at all and it already has been closed due to destruction. - if (getRunner(entry.element)) { - animations.push(entry); - } else { - entry.close(); - } - }); - - // now any future animations will be in another postDigest - animationQueue.length = 0; - - var groupedAnimations = groupAnimations(animations); - var toBeSortedAnimations = []; - - forEach(groupedAnimations, function(animationEntry) { - var element = animationEntry.from ? animationEntry.from.element : animationEntry.element; - var extraClasses = options.addClass; - - extraClasses = (extraClasses ? (extraClasses + ' ') : '') + NG_ANIMATE_CLASSNAME; - var cacheKey = $$animateCache.cacheKey(element[0], animationEntry.event, extraClasses, options.removeClass); - - toBeSortedAnimations.push({ - element: element, - domNode: getDomNode(element), - fn: function triggerAnimationStart() { - var startAnimationFn, closeFn = animationEntry.close; - - // in the event that we've cached the animation status for this element - // and it's in fact an invalid animation (something that has duration = 0) - // then we should skip all the heavy work from here on - if ($$animateCache.containsCachedAnimationWithoutDuration(cacheKey)) { - closeFn(); - return; - } - - // it's important that we apply the `ng-animate` CSS class and the - // temporary classes before we do any driver invoking since these - // CSS classes may be required for proper CSS detection. - animationEntry.beforeStart(); - - // in the event that the element was removed before the digest runs or - // during the RAF sequencing then we should not trigger the animation. - var targetElement = animationEntry.anchors - ? (animationEntry.from.element || animationEntry.to.element) - : animationEntry.element; - - if (getRunner(targetElement)) { - var operation = invokeFirstDriver(animationEntry); - if (operation) { - startAnimationFn = operation.start; - } - } - - if (!startAnimationFn) { - closeFn(); - } else { - var animationRunner = startAnimationFn(); - animationRunner.done(function(status) { - closeFn(!status); - }); - updateAnimationRunners(animationEntry, animationRunner); - } - } - }); - }); - - // we need to sort each of the animations in order of parent to child - // relationships. This ensures that the child classes are applied at the - // right time. - var finalAnimations = sortAnimations(toBeSortedAnimations); - for (var i = 0; i < finalAnimations.length; i++) { - var innerArray = finalAnimations[i]; - for (var j = 0; j < innerArray.length; j++) { - var entry = innerArray[j]; - var element = entry.element; - - // the RAFScheduler code only uses functions - finalAnimations[i][j] = entry.fn; - - // the first row of elements shouldn't have a prepare-class added to them - // since the elements are at the top of the animation hierarchy and they - // will be applied without a RAF having to pass... - if (i === 0) { - element.removeData(PREPARE_CLASSES_KEY); - continue; - } - - var prepareClassName = element.data(PREPARE_CLASSES_KEY); - if (prepareClassName) { - $$jqLite.addClass(element, prepareClassName); - } - } - } - - $$rAFScheduler(finalAnimations); - }); - - return runner; - - // TODO(matsko): change to reference nodes - function getAnchorNodes(node) { - var SELECTOR = '[' + NG_ANIMATE_REF_ATTR + ']'; - var items = node.hasAttribute(NG_ANIMATE_REF_ATTR) - ? [node] - : node.querySelectorAll(SELECTOR); - var anchors = []; - forEach(items, function(node) { - var attr = node.getAttribute(NG_ANIMATE_REF_ATTR); - if (attr && attr.length) { - anchors.push(node); - } - }); - return anchors; - } - - function groupAnimations(animations) { - var preparedAnimations = []; - var refLookup = {}; - forEach(animations, function(animation, index) { - var element = animation.element; - var node = getDomNode(element); - var event = animation.event; - var enterOrMove = ['enter', 'move'].indexOf(event) >= 0; - var anchorNodes = animation.structural ? getAnchorNodes(node) : []; - - if (anchorNodes.length) { - var direction = enterOrMove ? 'to' : 'from'; - - forEach(anchorNodes, function(anchor) { - var key = anchor.getAttribute(NG_ANIMATE_REF_ATTR); - refLookup[key] = refLookup[key] || {}; - refLookup[key][direction] = { - animationID: index, - element: jqLite(anchor) - }; - }); - } else { - preparedAnimations.push(animation); - } - }); - - var usedIndicesLookup = {}; - var anchorGroups = {}; - forEach(refLookup, function(operations, key) { - var from = operations.from; - var to = operations.to; - - if (!from || !to) { - // only one of these is set therefore we can't have an - // anchor animation since all three pieces are required - var index = from ? from.animationID : to.animationID; - var indexKey = index.toString(); - if (!usedIndicesLookup[indexKey]) { - usedIndicesLookup[indexKey] = true; - preparedAnimations.push(animations[index]); - } - return; - } - - var fromAnimation = animations[from.animationID]; - var toAnimation = animations[to.animationID]; - var lookupKey = from.animationID.toString(); - if (!anchorGroups[lookupKey]) { - var group = anchorGroups[lookupKey] = { - structural: true, - beforeStart: function() { - fromAnimation.beforeStart(); - toAnimation.beforeStart(); - }, - close: function() { - fromAnimation.close(); - toAnimation.close(); - }, - classes: cssClassesIntersection(fromAnimation.classes, toAnimation.classes), - from: fromAnimation, - to: toAnimation, - anchors: [] // TODO(matsko): change to reference nodes - }; - - // the anchor animations require that the from and to elements both have at least - // one shared CSS class which effectively marries the two elements together to use - // the same animation driver and to properly sequence the anchor animation. - if (group.classes.length) { - preparedAnimations.push(group); - } else { - preparedAnimations.push(fromAnimation); - preparedAnimations.push(toAnimation); - } - } - - anchorGroups[lookupKey].anchors.push({ - 'out': from.element, 'in': to.element - }); - }); - - return preparedAnimations; - } - - function cssClassesIntersection(a,b) { - a = a.split(' '); - b = b.split(' '); - var matches = []; - - for (var i = 0; i < a.length; i++) { - var aa = a[i]; - if (aa.substring(0,3) === 'ng-') continue; - - for (var j = 0; j < b.length; j++) { - if (aa === b[j]) { - matches.push(aa); - break; - } - } - } - - return matches.join(' '); - } - - function invokeFirstDriver(animationDetails) { - // we loop in reverse order since the more general drivers (like CSS and JS) - // may attempt more elements, but custom drivers are more particular - for (var i = drivers.length - 1; i >= 0; i--) { - var driverName = drivers[i]; - var factory = $injector.get(driverName); - var driver = factory(animationDetails); - if (driver) { - return driver; - } - } - } - - function beforeStart() { - tempClasses = (tempClasses ? (tempClasses + ' ') : '') + NG_ANIMATE_CLASSNAME; - $$jqLite.addClass(element, tempClasses); - - var prepareClassName = element.data(PREPARE_CLASSES_KEY); - if (prepareClassName) { - $$jqLite.removeClass(element, prepareClassName); - prepareClassName = null; - } - } - - function updateAnimationRunners(animation, newRunner) { - if (animation.from && animation.to) { - update(animation.from.element); - update(animation.to.element); - } else { - update(animation.element); - } - - function update(element) { - var runner = getRunner(element); - if (runner) runner.setHost(newRunner); - } - } - - function handleDestroyedElement() { - var runner = getRunner(element); - if (runner && (event !== 'leave' || !options.$$domOperationFired)) { - runner.end(); - } - } - - function close(rejected) { - element.off('$destroy', handleDestroyedElement); - removeRunner(element); - - applyAnimationClasses(element, options); - applyAnimationStyles(element, options); - options.domOperation(); - - if (tempClasses) { - $$jqLite.removeClass(element, tempClasses); - } - - runner.complete(!rejected); - } - }; - }]; -}]; - -/** - * @ngdoc directive - * @name ngAnimateSwap - * @restrict A - * @scope - * - * @description - * - * ngAnimateSwap is a animation-oriented directive that allows for the container to - * be removed and entered in whenever the associated expression changes. A - * common usecase for this directive is a rotating banner or slider component which - * contains one image being present at a time. When the active image changes - * then the old image will perform a `leave` animation and the new element - * will be inserted via an `enter` animation. - * - * @animations - * | Animation | Occurs | - * |----------------------------------|--------------------------------------| - * | {@link ng.$animate#enter enter} | when the new element is inserted to the DOM | - * | {@link ng.$animate#leave leave} | when the old element is removed from the DOM | - * - * @example - * - * - *
    - *
    - * {{ number }} - *
    - *
    - *
    - * - * angular.module('ngAnimateSwapExample', ['ngAnimate']) - * .controller('AppCtrl', ['$scope', '$interval', function($scope, $interval) { - * $scope.number = 0; - * $interval(function() { - * $scope.number++; - * }, 1000); - * - * var colors = ['red','blue','green','yellow','orange']; - * $scope.colorClass = function(number) { - * return colors[number % colors.length]; - * }; - * }]); - * - * - * .container { - * height:250px; - * width:250px; - * position:relative; - * overflow:hidden; - * border:2px solid black; - * } - * .container .cell { - * font-size:150px; - * text-align:center; - * line-height:250px; - * position:absolute; - * top:0; - * left:0; - * right:0; - * border-bottom:2px solid black; - * } - * .swap-animation.ng-enter, .swap-animation.ng-leave { - * transition:0.5s linear all; - * } - * .swap-animation.ng-enter { - * top:-250px; - * } - * .swap-animation.ng-enter-active { - * top:0px; - * } - * .swap-animation.ng-leave { - * top:0px; - * } - * .swap-animation.ng-leave-active { - * top:250px; - * } - * .red { background:red; } - * .green { background:green; } - * .blue { background:blue; } - * .yellow { background:yellow; } - * .orange { background:orange; } - * - *
    - */ -var ngAnimateSwapDirective = ['$animate', function($animate) { - return { - restrict: 'A', - transclude: 'element', - terminal: true, - priority: 550, // We use 550 here to ensure that the directive is caught before others, - // but after `ngIf` (at priority 600). - link: function(scope, $element, attrs, ctrl, $transclude) { - var previousElement, previousScope; - scope.$watchCollection(attrs.ngAnimateSwap || attrs['for'], function(value) { - if (previousElement) { - $animate.leave(previousElement); - } - if (previousScope) { - previousScope.$destroy(); - previousScope = null; - } - if (value || value === 0) { - $transclude(function(clone, childScope) { - previousElement = clone; - previousScope = childScope; - $animate.enter(clone, null, $element); - }); - } - }); - } - }; -}]; - -/** - * @ngdoc module - * @name ngAnimate - * @description - * - * The `ngAnimate` module provides support for CSS-based animations (keyframes and transitions) as well as JavaScript-based animations via - * callback hooks. Animations are not enabled by default, however, by including `ngAnimate` the animation hooks are enabled for an AngularJS app. - * - * ## Usage - * Simply put, there are two ways to make use of animations when ngAnimate is used: by using **CSS** and **JavaScript**. The former works purely based - * using CSS (by using matching CSS selectors/styles) and the latter triggers animations that are registered via `module.animation()`. For - * both CSS and JS animations the sole requirement is to have a matching `CSS class` that exists both in the registered animation and within - * the HTML element that the animation will be triggered on. - * - * ## Directive Support - * The following directives are "animation aware": - * - * | Directive | Supported Animations | - * |-------------------------------------------------------------------------------|---------------------------------------------------------------------------| - * | {@link ng.directive:form#animations form / ngForm} | add and remove ({@link ng.directive:form#css-classes various classes}) | - * | {@link ngAnimate.directive:ngAnimateSwap#animations ngAnimateSwap} | enter and leave | - * | {@link ng.directive:ngClass#animations ngClass / {{class}​}} | add and remove | - * | {@link ng.directive:ngClassEven#animations ngClassEven} | add and remove | - * | {@link ng.directive:ngClassOdd#animations ngClassOdd} | add and remove | - * | {@link ng.directive:ngHide#animations ngHide} | add and remove (the `ng-hide` class) | - * | {@link ng.directive:ngIf#animations ngIf} | enter and leave | - * | {@link ng.directive:ngInclude#animations ngInclude} | enter and leave | - * | {@link module:ngMessages#animations ngMessage / ngMessageExp} | enter and leave | - * | {@link module:ngMessages#animations ngMessages} | add and remove (the `ng-active`/`ng-inactive` classes) | - * | {@link ng.directive:ngModel#animations ngModel} | add and remove ({@link ng.directive:ngModel#css-classes various classes}) | - * | {@link ng.directive:ngRepeat#animations ngRepeat} | enter, leave, and move | - * | {@link ng.directive:ngShow#animations ngShow} | add and remove (the `ng-hide` class) | - * | {@link ng.directive:ngSwitch#animations ngSwitch} | enter and leave | - * | {@link ngRoute.directive:ngView#animations ngView} | enter and leave | - * - * (More information can be found by visiting the documentation associated with each directive.) - * - * For a full breakdown of the steps involved during each animation event, refer to the - * {@link ng.$animate `$animate` API docs}. - * - * ## CSS-based Animations - * - * CSS-based animations with ngAnimate are unique since they require no JavaScript code at all. By using a CSS class that we reference between our HTML - * and CSS code we can create an animation that will be picked up by AngularJS when an underlying directive performs an operation. - * - * The example below shows how an `enter` animation can be made possible on an element using `ng-if`: - * - * ```html - *
    - * Fade me in out - *
    - * - * - * ``` - * - * Notice the CSS class **fade**? We can now create the CSS transition code that references this class: - * - * ```css - * /* The starting CSS styles for the enter animation */ - * .fade.ng-enter { - * transition:0.5s linear all; - * opacity:0; - * } - * - * /* The finishing CSS styles for the enter animation */ - * .fade.ng-enter.ng-enter-active { - * opacity:1; - * } - * ``` - * - * The key thing to remember here is that, depending on the animation event (which each of the directives above trigger depending on what's going on) two - * generated CSS classes will be applied to the element; in the example above we have `.ng-enter` and `.ng-enter-active`. For CSS transitions, the transition - * code **must** be defined within the starting CSS class (in this case `.ng-enter`). The destination class is what the transition will animate towards. - * - * If for example we wanted to create animations for `leave` and `move` (ngRepeat triggers move) then we can do so using the same CSS naming conventions: - * - * ```css - * /* now the element will fade out before it is removed from the DOM */ - * .fade.ng-leave { - * transition:0.5s linear all; - * opacity:1; - * } - * .fade.ng-leave.ng-leave-active { - * opacity:0; - * } - * ``` - * - * We can also make use of **CSS Keyframes** by referencing the keyframe animation within the starting CSS class: - * - * ```css - * /* there is no need to define anything inside of the destination - * CSS class since the keyframe will take charge of the animation */ - * .fade.ng-leave { - * animation: my_fade_animation 0.5s linear; - * -webkit-animation: my_fade_animation 0.5s linear; - * } - * - * @keyframes my_fade_animation { - * from { opacity:1; } - * to { opacity:0; } - * } - * - * @-webkit-keyframes my_fade_animation { - * from { opacity:1; } - * to { opacity:0; } - * } - * ``` - * - * Feel free also mix transitions and keyframes together as well as any other CSS classes on the same element. - * - * ### CSS Class-based Animations - * - * Class-based animations (animations that are triggered via `ngClass`, `ngShow`, `ngHide` and some other directives) have a slightly different - * naming convention. Class-based animations are basic enough that a standard transition or keyframe can be referenced on the class being added - * and removed. - * - * For example if we wanted to do a CSS animation for `ngHide` then we place an animation on the `.ng-hide` CSS class: - * - * ```html - *
    - * Show and hide me - *
    - * - * - * - * ``` - * - * All that is going on here with ngShow/ngHide behind the scenes is the `.ng-hide` class is added/removed (when the hidden state is valid). Since - * ngShow and ngHide are animation aware then we can match up a transition and ngAnimate handles the rest. - * - * In addition the addition and removal of the CSS class, ngAnimate also provides two helper methods that we can use to further decorate the animation - * with CSS styles. - * - * ```html - *
    - * Highlight this box - *
    - * - * - * - * ``` - * - * We can also make use of CSS keyframes by placing them within the CSS classes. - * - * - * ### CSS Staggering Animations - * A Staggering animation is a collection of animations that are issued with a slight delay in between each successive operation resulting in a - * curtain-like effect. The ngAnimate module (versions >=1.2) supports staggering animations and the stagger effect can be - * performed by creating a **ng-EVENT-stagger** CSS class and attaching that class to the base CSS class used for - * the animation. The style property expected within the stagger class can either be a **transition-delay** or an - * **animation-delay** property (or both if your animation contains both transitions and keyframe animations). - * - * ```css - * .my-animation.ng-enter { - * /* standard transition code */ - * transition: 1s linear all; - * opacity:0; - * } - * .my-animation.ng-enter-stagger { - * /* this will have a 100ms delay between each successive leave animation */ - * transition-delay: 0.1s; - * - * /* As of 1.4.4, this must always be set: it signals ngAnimate - * to not accidentally inherit a delay property from another CSS class */ - * transition-duration: 0s; - * - * /* if you are using animations instead of transitions you should configure as follows: - * animation-delay: 0.1s; - * animation-duration: 0s; */ - * } - * .my-animation.ng-enter.ng-enter-active { - * /* standard transition styles */ - * opacity:1; - * } - * ``` - * - * Staggering animations work by default in ngRepeat (so long as the CSS class is defined). Outside of ngRepeat, to use staggering animations - * on your own, they can be triggered by firing multiple calls to the same event on $animate. However, the restrictions surrounding this - * are that each of the elements must have the same CSS className value as well as the same parent element. A stagger operation - * will also be reset if one or more animation frames have passed since the multiple calls to `$animate` were fired. - * - * The following code will issue the **ng-leave-stagger** event on the element provided: - * - * ```js - * var kids = parent.children(); - * - * $animate.leave(kids[0]); //stagger index=0 - * $animate.leave(kids[1]); //stagger index=1 - * $animate.leave(kids[2]); //stagger index=2 - * $animate.leave(kids[3]); //stagger index=3 - * $animate.leave(kids[4]); //stagger index=4 - * - * window.requestAnimationFrame(function() { - * //stagger has reset itself - * $animate.leave(kids[5]); //stagger index=0 - * $animate.leave(kids[6]); //stagger index=1 - * - * $scope.$digest(); - * }); - * ``` - * - * Stagger animations are currently only supported within CSS-defined animations. - * - * ### The `ng-animate` CSS class - * - * When ngAnimate is animating an element it will apply the `ng-animate` CSS class to the element for the duration of the animation. - * This is a temporary CSS class and it will be removed once the animation is over (for both JavaScript and CSS-based animations). - * - * Therefore, animations can be applied to an element using this temporary class directly via CSS. - * - * ```css - * .zipper.ng-animate { - * transition:0.5s linear all; - * } - * .zipper.ng-enter { - * opacity:0; - * } - * .zipper.ng-enter.ng-enter-active { - * opacity:1; - * } - * .zipper.ng-leave { - * opacity:1; - * } - * .zipper.ng-leave.ng-leave-active { - * opacity:0; - * } - * ``` - * - * (Note that the `ng-animate` CSS class is reserved and it cannot be applied on an element directly since ngAnimate will always remove - * the CSS class once an animation has completed.) - * - * - * ### The `ng-[event]-prepare` class - * - * This is a special class that can be used to prevent unwanted flickering / flash of content before - * the actual animation starts. The class is added as soon as an animation is initialized, but removed - * before the actual animation starts (after waiting for a $digest). - * It is also only added for *structural* animations (`enter`, `move`, and `leave`). - * - * In practice, flickering can appear when nesting elements with structural animations such as `ngIf` - * into elements that have class-based animations such as `ngClass`. - * - * ```html - *
    - *
    - *
    - *
    - *
    - * ``` - * - * It is possible that during the `enter` animation, the `.message` div will be briefly visible before it starts animating. - * In that case, you can add styles to the CSS that make sure the element stays hidden before the animation starts: - * - * ```css - * .message.ng-enter-prepare { - * opacity: 0; - * } - * ``` - * - * ### Animating between value changes - * - * Sometimes you need to animate between different expression states, whose values - * don't necessary need to be known or referenced in CSS styles. - * Unless possible with another {@link ngAnimate#directive-support "animation aware" directive}, - * that specific use case can always be covered with {@link ngAnimate.directive:ngAnimateSwap} as - * can be seen in {@link ngAnimate.directive:ngAnimateSwap#examples this example}. - * - * Note that {@link ngAnimate.directive:ngAnimateSwap} is a *structural directive*, which means it - * creates a new instance of the element (including any other/child directives it may have) and - * links it to a new scope every time *swap* happens. In some cases this might not be desirable - * (e.g. for performance reasons, or when you wish to retain internal state on the original - * element instance). - * - * ## JavaScript-based Animations - * - * ngAnimate also allows for animations to be consumed by JavaScript code. The approach is similar to CSS-based animations (where there is a shared - * CSS class that is referenced in our HTML code) but in addition we need to register the JavaScript animation on the module. By making use of the - * `module.animation()` module function we can register the animation. - * - * Let's see an example of a enter/leave animation using `ngRepeat`: - * - * ```html - *
    - * {{ item }} - *
    - * ``` - * - * See the **slide** CSS class? Let's use that class to define an animation that we'll structure in our module code by using `module.animation`: - * - * ```js - * myModule.animation('.slide', [function() { - * return { - * // make note that other events (like addClass/removeClass) - * // have different function input parameters - * enter: function(element, doneFn) { - * jQuery(element).fadeIn(1000, doneFn); - * - * // remember to call doneFn so that AngularJS - * // knows that the animation has concluded - * }, - * - * move: function(element, doneFn) { - * jQuery(element).fadeIn(1000, doneFn); - * }, - * - * leave: function(element, doneFn) { - * jQuery(element).fadeOut(1000, doneFn); - * } - * } - * }]); - * ``` - * - * The nice thing about JS-based animations is that we can inject other services and make use of advanced animation libraries such as - * greensock.js and velocity.js. - * - * If our animation code class-based (meaning that something like `ngClass`, `ngHide` and `ngShow` triggers it) then we can still define - * our animations inside of the same registered animation, however, the function input arguments are a bit different: - * - * ```html - *
    - * this box is moody - *
    - * - * - * - * ``` - * - * ```js - * myModule.animation('.colorful', [function() { - * return { - * addClass: function(element, className, doneFn) { - * // do some cool animation and call the doneFn - * }, - * removeClass: function(element, className, doneFn) { - * // do some cool animation and call the doneFn - * }, - * setClass: function(element, addedClass, removedClass, doneFn) { - * // do some cool animation and call the doneFn - * } - * } - * }]); - * ``` - * - * ## CSS + JS Animations Together - * - * AngularJS 1.4 and higher has taken steps to make the amalgamation of CSS and JS animations more flexible. However, unlike earlier versions of AngularJS, - * defining CSS and JS animations to work off of the same CSS class will not work anymore. Therefore the example below will only result in **JS animations taking - * charge of the animation**: - * - * ```html - *
    - * Slide in and out - *
    - * ``` - * - * ```js - * myModule.animation('.slide', [function() { - * return { - * enter: function(element, doneFn) { - * jQuery(element).slideIn(1000, doneFn); - * } - * } - * }]); - * ``` - * - * ```css - * .slide.ng-enter { - * transition:0.5s linear all; - * transform:translateY(-100px); - * } - * .slide.ng-enter.ng-enter-active { - * transform:translateY(0); - * } - * ``` - * - * Does this mean that CSS and JS animations cannot be used together? Do JS-based animations always have higher priority? We can make up for the - * lack of CSS animations by using the `$animateCss` service to trigger our own tweaked-out, CSS-based animations directly from - * our own JS-based animation code: - * - * ```js - * myModule.animation('.slide', ['$animateCss', function($animateCss) { - * return { - * enter: function(element) { -* // this will trigger `.slide.ng-enter` and `.slide.ng-enter-active`. - * return $animateCss(element, { - * event: 'enter', - * structural: true - * }); - * } - * } - * }]); - * ``` - * - * The nice thing here is that we can save bandwidth by sticking to our CSS-based animation code and we don't need to rely on a 3rd-party animation framework. - * - * The `$animateCss` service is very powerful since we can feed in all kinds of extra properties that will be evaluated and fed into a CSS transition or - * keyframe animation. For example if we wanted to animate the height of an element while adding and removing classes then we can do so by providing that - * data into `$animateCss` directly: - * - * ```js - * myModule.animation('.slide', ['$animateCss', function($animateCss) { - * return { - * enter: function(element) { - * return $animateCss(element, { - * event: 'enter', - * structural: true, - * addClass: 'maroon-setting', - * from: { height:0 }, - * to: { height: 200 } - * }); - * } - * } - * }]); - * ``` - * - * Now we can fill in the rest via our transition CSS code: - * - * ```css - * /* the transition tells ngAnimate to make the animation happen */ - * .slide.ng-enter { transition:0.5s linear all; } - * - * /* this extra CSS class will be absorbed into the transition - * since the $animateCss code is adding the class */ - * .maroon-setting { background:red; } - * ``` - * - * And `$animateCss` will figure out the rest. Just make sure to have the `done()` callback fire the `doneFn` function to signal when the animation is over. - * - * To learn more about what's possible be sure to visit the {@link ngAnimate.$animateCss $animateCss service}. - * - * ## Animation Anchoring (via `ng-animate-ref`) - * - * ngAnimate in AngularJS 1.4 comes packed with the ability to cross-animate elements between - * structural areas of an application (like views) by pairing up elements using an attribute - * called `ng-animate-ref`. - * - * Let's say for example we have two views that are managed by `ng-view` and we want to show - * that there is a relationship between two components situated in within these views. By using the - * `ng-animate-ref` attribute we can identify that the two components are paired together and we - * can then attach an animation, which is triggered when the view changes. - * - * Say for example we have the following template code: - * - * ```html - * - *
    - *
    - * - * - *
    - * - * - * - * - * - * ``` - * - * Now, when the view changes (once the link is clicked), ngAnimate will examine the - * HTML contents to see if there is a match reference between any components in the view - * that is leaving and the view that is entering. It will scan both the view which is being - * removed (leave) and inserted (enter) to see if there are any paired DOM elements that - * contain a matching ref value. - * - * The two images match since they share the same ref value. ngAnimate will now create a - * transport element (which is a clone of the first image element) and it will then attempt - * to animate to the position of the second image element in the next view. For the animation to - * work a special CSS class called `ng-anchor` will be added to the transported element. - * - * We can now attach a transition onto the `.banner.ng-anchor` CSS class and then - * ngAnimate will handle the entire transition for us as well as the addition and removal of - * any changes of CSS classes between the elements: - * - * ```css - * .banner.ng-anchor { - * /* this animation will last for 1 second since there are - * two phases to the animation (an `in` and an `out` phase) */ - * transition:0.5s linear all; - * } - * ``` - * - * We also **must** include animations for the views that are being entered and removed - * (otherwise anchoring wouldn't be possible since the new view would be inserted right away). - * - * ```css - * .view-animation.ng-enter, .view-animation.ng-leave { - * transition:0.5s linear all; - * position:fixed; - * left:0; - * top:0; - * width:100%; - * } - * .view-animation.ng-enter { - * transform:translateX(100%); - * } - * .view-animation.ng-leave, - * .view-animation.ng-enter.ng-enter-active { - * transform:translateX(0%); - * } - * .view-animation.ng-leave.ng-leave-active { - * transform:translateX(-100%); - * } - * ``` - * - * Now we can jump back to the anchor animation. When the animation happens, there are two stages that occur: - * an `out` and an `in` stage. The `out` stage happens first and that is when the element is animated away - * from its origin. Once that animation is over then the `in` stage occurs which animates the - * element to its destination. The reason why there are two animations is to give enough time - * for the enter animation on the new element to be ready. - * - * The example above sets up a transition for both the in and out phases, but we can also target the out or - * in phases directly via `ng-anchor-out` and `ng-anchor-in`. - * - * ```css - * .banner.ng-anchor-out { - * transition: 0.5s linear all; - * - * /* the scale will be applied during the out animation, - * but will be animated away when the in animation runs */ - * transform: scale(1.2); - * } - * - * .banner.ng-anchor-in { - * transition: 1s linear all; - * } - * ``` - * - * - * - * - * ### Anchoring Demo - * - - - Home -
    -
    -
    -
    -
    - - angular.module('anchoringExample', ['ngAnimate', 'ngRoute']) - .config(['$routeProvider', function($routeProvider) { - $routeProvider.when('/', { - templateUrl: 'home.html', - controller: 'HomeController as home' - }); - $routeProvider.when('/profile/:id', { - templateUrl: 'profile.html', - controller: 'ProfileController as profile' - }); - }]) - .run(['$rootScope', function($rootScope) { - $rootScope.records = [ - { id: 1, title: 'Miss Beulah Roob' }, - { id: 2, title: 'Trent Morissette' }, - { id: 3, title: 'Miss Ava Pouros' }, - { id: 4, title: 'Rod Pouros' }, - { id: 5, title: 'Abdul Rice' }, - { id: 6, title: 'Laurie Rutherford Sr.' }, - { id: 7, title: 'Nakia McLaughlin' }, - { id: 8, title: 'Jordon Blanda DVM' }, - { id: 9, title: 'Rhoda Hand' }, - { id: 10, title: 'Alexandrea Sauer' } - ]; - }]) - .controller('HomeController', [function() { - //empty - }]) - .controller('ProfileController', ['$rootScope', '$routeParams', - function ProfileController($rootScope, $routeParams) { - var index = parseInt($routeParams.id, 10); - var record = $rootScope.records[index - 1]; - - this.title = record.title; - this.id = record.id; - }]); - - -

    Welcome to the home page

    -

    Please click on an element

    - - {{ record.title }} - -
    - -
    - {{ profile.title }} -
    -
    - - .record { - display:block; - font-size:20px; - } - .profile { - background:black; - color:white; - font-size:100px; - } - .view-container { - position:relative; - } - .view-container > .view.ng-animate { - position:absolute; - top:0; - left:0; - width:100%; - min-height:500px; - } - .view.ng-enter, .view.ng-leave, - .record.ng-anchor { - transition:0.5s linear all; - } - .view.ng-enter { - transform:translateX(100%); - } - .view.ng-enter.ng-enter-active, .view.ng-leave { - transform:translateX(0%); - } - .view.ng-leave.ng-leave-active { - transform:translateX(-100%); - } - .record.ng-anchor-out { - background:red; - } - -
    - * - * ### How is the element transported? - * - * When an anchor animation occurs, ngAnimate will clone the starting element and position it exactly where the starting - * element is located on screen via absolute positioning. The cloned element will be placed inside of the root element - * of the application (where ng-app was defined) and all of the CSS classes of the starting element will be applied. The - * element will then animate into the `out` and `in` animations and will eventually reach the coordinates and match - * the dimensions of the destination element. During the entire animation a CSS class of `.ng-animate-shim` will be applied - * to both the starting and destination elements in order to hide them from being visible (the CSS styling for the class - * is: `visibility:hidden`). Once the anchor reaches its destination then it will be removed and the destination element - * will become visible since the shim class will be removed. - * - * ### How is the morphing handled? - * - * CSS Anchoring relies on transitions and keyframes and the internal code is intelligent enough to figure out - * what CSS classes differ between the starting element and the destination element. These different CSS classes - * will be added/removed on the anchor element and a transition will be applied (the transition that is provided - * in the anchor class). Long story short, ngAnimate will figure out what classes to add and remove which will - * make the transition of the element as smooth and automatic as possible. Be sure to use simple CSS classes that - * do not rely on DOM nesting structure so that the anchor element appears the same as the starting element (since - * the cloned element is placed inside of root element which is likely close to the body element). - * - * Note that if the root element is on the `` element then the cloned node will be placed inside of body. - * - * - * ## Using $animate in your directive code - * - * So far we've explored how to feed in animations into an AngularJS application, but how do we trigger animations within our own directives in our application? - * By injecting the `$animate` service into our directive code, we can trigger structural and class-based hooks which can then be consumed by animations. Let's - * imagine we have a greeting box that shows and hides itself when the data changes - * - * ```html - * Hi there - * ``` - * - * ```js - * ngModule.directive('greetingBox', ['$animate', function($animate) { - * return function(scope, element, attrs) { - * attrs.$observe('active', function(value) { - * value ? $animate.addClass(element, 'on') : $animate.removeClass(element, 'on'); - * }); - * }); - * }]); - * ``` - * - * Now the `on` CSS class is added and removed on the greeting box component. Now if we add a CSS class on top of the greeting box element - * in our HTML code then we can trigger a CSS or JS animation to happen. - * - * ```css - * /* normally we would create a CSS class to reference on the element */ - * greeting-box.on { transition:0.5s linear all; background:green; color:white; } - * ``` - * - * The `$animate` service contains a variety of other methods like `enter`, `leave`, `animate` and `setClass`. To learn more about what's - * possible be sure to visit the {@link ng.$animate $animate service API page}. - * - * - * ## Callbacks and Promises - * - * When `$animate` is called it returns a promise that can be used to capture when the animation has ended. Therefore if we were to trigger - * an animation (within our directive code) then we can continue performing directive and scope related activities after the animation has - * ended by chaining onto the returned promise that animation method returns. - * - * ```js - * // somewhere within the depths of the directive - * $animate.enter(element, parent).then(function() { - * //the animation has completed - * }); - * ``` - * - * (Note that earlier versions of AngularJS prior to v1.4 required the promise code to be wrapped using `$scope.$apply(...)`. This is not the case - * anymore.) - * - * In addition to the animation promise, we can also make use of animation-related callbacks within our directives and controller code by registering - * an event listener using the `$animate` service. Let's say for example that an animation was triggered on our view - * routing controller to hook into that: - * - * ```js - * ngModule.controller('HomePageController', ['$animate', function($animate) { - * $animate.on('enter', ngViewElement, function(element) { - * // the animation for this route has completed - * }]); - * }]) - * ``` - * - * (Note that you will need to trigger a digest within the callback to get AngularJS to notice any scope-related changes.) - */ - -var copy; -var extend; -var forEach; -var isArray; -var isDefined; -var isElement; -var isFunction; -var isObject; -var isString; -var isUndefined; -var jqLite; -var noop; - -/** - * @ngdoc service - * @name $animate - * @kind object - * - * @description - * The ngAnimate `$animate` service documentation is the same for the core `$animate` service. - * - * Click here {@link ng.$animate to learn more about animations with `$animate`}. - */ -angular.module('ngAnimate', [], function initAngularHelpers() { - // Access helpers from AngularJS core. - // Do it inside a `config` block to ensure `window.angular` is available. - noop = angular.noop; - copy = angular.copy; - extend = angular.extend; - jqLite = angular.element; - forEach = angular.forEach; - isArray = angular.isArray; - isString = angular.isString; - isObject = angular.isObject; - isUndefined = angular.isUndefined; - isDefined = angular.isDefined; - isFunction = angular.isFunction; - isElement = angular.isElement; -}) - .info({ angularVersion: '1.8.2' }) - .directive('ngAnimateSwap', ngAnimateSwapDirective) - - .directive('ngAnimateChildren', $$AnimateChildrenDirective) - .factory('$$rAFScheduler', $$rAFSchedulerFactory) - - .provider('$$animateQueue', $$AnimateQueueProvider) - .provider('$$animateCache', $$AnimateCacheProvider) - .provider('$$animation', $$AnimationProvider) - - .provider('$animateCss', $AnimateCssProvider) - .provider('$$animateCssDriver', $$AnimateCssDriverProvider) - - .provider('$$animateJs', $$AnimateJsProvider) - .provider('$$animateJsDriver', $$AnimateJsDriverProvider); - - -})(window, window.angular); - - -/***/ }), - -/***/ "./node_modules/angular-animate/index.js": -/*!***********************************************!*\ - !*** ./node_modules/angular-animate/index.js ***! - \***********************************************/ -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -__webpack_require__(/*! ./angular-animate */ "./node_modules/angular-animate/angular-animate.js"); -module.exports = 'ngAnimate'; - - -/***/ }), - -/***/ "./node_modules/angular-aria/angular-aria.js": -/*!***************************************************!*\ - !*** ./node_modules/angular-aria/angular-aria.js ***! - \***************************************************/ -/***/ (() => { - -/** - * @license AngularJS v1.8.2 - * (c) 2010-2020 Google LLC. http://angularjs.org - * License: MIT - */ -(function(window, angular) {'use strict'; - -/** - * @ngdoc module - * @name ngAria - * @description - * - * The `ngAria` module provides support for common - * [ARIA](http://www.w3.org/TR/wai-aria/) - * attributes that convey state or semantic information about the application for users - * of assistive technologies, such as screen readers. - * - * ## Usage - * - * For ngAria to do its magic, simply include the module `ngAria` as a dependency. The following - * directives are supported: - * `ngModel`, `ngChecked`, `ngReadonly`, `ngRequired`, `ngValue`, `ngDisabled`, `ngShow`, `ngHide`, - * `ngClick`, `ngDblClick`, and `ngMessages`. - * - * Below is a more detailed breakdown of the attributes handled by ngAria: - * - * | Directive | Supported Attributes | - * |---------------------------------------------|-----------------------------------------------------------------------------------------------------| - * | {@link ng.directive:ngModel ngModel} | aria-checked, aria-valuemin, aria-valuemax, aria-valuenow, aria-invalid, aria-required, input roles | - * | {@link ng.directive:ngDisabled ngDisabled} | aria-disabled | - * | {@link ng.directive:ngRequired ngRequired} | aria-required | - * | {@link ng.directive:ngChecked ngChecked} | aria-checked | - * | {@link ng.directive:ngReadonly ngReadonly} | aria-readonly | - * | {@link ng.directive:ngValue ngValue} | aria-checked | - * | {@link ng.directive:ngShow ngShow} | aria-hidden | - * | {@link ng.directive:ngHide ngHide} | aria-hidden | - * | {@link ng.directive:ngDblclick ngDblclick} | tabindex | - * | {@link module:ngMessages ngMessages} | aria-live | - * | {@link ng.directive:ngClick ngClick} | tabindex, keydown event, button role | - * - * Find out more information about each directive by reading the - * {@link guide/accessibility ngAria Developer Guide}. - * - * ## Example - * Using ngDisabled with ngAria: - * ```html - * - * ``` - * Becomes: - * ```html - * - * ``` - * - * ## Disabling Specific Attributes - * It is possible to disable individual attributes added by ngAria with the - * {@link ngAria.$ariaProvider#config config} method. For more details, see the - * {@link guide/accessibility Developer Guide}. - * - * ## Disabling `ngAria` on Specific Elements - * It is possible to make `ngAria` ignore a specific element, by adding the `ng-aria-disable` - * attribute on it. Note that only the element itself (and not its child elements) will be ignored. - */ -var ARIA_DISABLE_ATTR = 'ngAriaDisable'; - -var ngAriaModule = angular.module('ngAria', ['ng']). - info({ angularVersion: '1.8.2' }). - provider('$aria', $AriaProvider); - -/** -* Internal Utilities -*/ -var nativeAriaNodeNames = ['BUTTON', 'A', 'INPUT', 'TEXTAREA', 'SELECT', 'DETAILS', 'SUMMARY']; - -var isNodeOneOf = function(elem, nodeTypeArray) { - if (nodeTypeArray.indexOf(elem[0].nodeName) !== -1) { - return true; - } -}; -/** - * @ngdoc provider - * @name $ariaProvider - * @this - * - * @description - * - * Used for configuring the ARIA attributes injected and managed by ngAria. - * - * ```js - * angular.module('myApp', ['ngAria'], function config($ariaProvider) { - * $ariaProvider.config({ - * ariaValue: true, - * tabindex: false - * }); - * }); - *``` - * - * ## Dependencies - * Requires the {@link ngAria} module to be installed. - * - */ -function $AriaProvider() { - var config = { - ariaHidden: true, - ariaChecked: true, - ariaReadonly: true, - ariaDisabled: true, - ariaRequired: true, - ariaInvalid: true, - ariaValue: true, - tabindex: true, - bindKeydown: true, - bindRoleForClick: true - }; - - /** - * @ngdoc method - * @name $ariaProvider#config - * - * @param {object} config object to enable/disable specific ARIA attributes - * - * - **ariaHidden** – `{boolean}` – Enables/disables aria-hidden tags - * - **ariaChecked** – `{boolean}` – Enables/disables aria-checked tags - * - **ariaReadonly** – `{boolean}` – Enables/disables aria-readonly tags - * - **ariaDisabled** – `{boolean}` – Enables/disables aria-disabled tags - * - **ariaRequired** – `{boolean}` – Enables/disables aria-required tags - * - **ariaInvalid** – `{boolean}` – Enables/disables aria-invalid tags - * - **ariaValue** – `{boolean}` – Enables/disables aria-valuemin, aria-valuemax and - * aria-valuenow tags - * - **tabindex** – `{boolean}` – Enables/disables tabindex tags - * - **bindKeydown** – `{boolean}` – Enables/disables keyboard event binding on non-interactive - * elements (such as `div` or `li`) using ng-click, making them more accessible to users of - * assistive technologies - * - **bindRoleForClick** – `{boolean}` – Adds role=button to non-interactive elements (such as - * `div` or `li`) using ng-click, making them more accessible to users of assistive - * technologies - * - * @description - * Enables/disables various ARIA attributes - */ - this.config = function(newConfig) { - config = angular.extend(config, newConfig); - }; - - function watchExpr(attrName, ariaAttr, nativeAriaNodeNames, negate) { - return function(scope, elem, attr) { - if (attr.hasOwnProperty(ARIA_DISABLE_ATTR)) return; - - var ariaCamelName = attr.$normalize(ariaAttr); - if (config[ariaCamelName] && !isNodeOneOf(elem, nativeAriaNodeNames) && !attr[ariaCamelName]) { - scope.$watch(attr[attrName], function(boolVal) { - // ensure boolean value - boolVal = negate ? !boolVal : !!boolVal; - elem.attr(ariaAttr, boolVal); - }); - } - }; - } - /** - * @ngdoc service - * @name $aria - * - * @description - * - * The $aria service contains helper methods for applying common - * [ARIA](http://www.w3.org/TR/wai-aria/) attributes to HTML directives. - * - * ngAria injects common accessibility attributes that tell assistive technologies when HTML - * elements are enabled, selected, hidden, and more. To see how this is performed with ngAria, - * let's review a code snippet from ngAria itself: - * - *```js - * ngAriaModule.directive('ngDisabled', ['$aria', function($aria) { - * return $aria.$$watchExpr('ngDisabled', 'aria-disabled', nativeAriaNodeNames, false); - * }]) - *``` - * Shown above, the ngAria module creates a directive with the same signature as the - * traditional `ng-disabled` directive. But this ngAria version is dedicated to - * solely managing accessibility attributes on custom elements. The internal `$aria` service is - * used to watch the boolean attribute `ngDisabled`. If it has not been explicitly set by the - * developer, `aria-disabled` is injected as an attribute with its value synchronized to the - * value in `ngDisabled`. - * - * Because ngAria hooks into the `ng-disabled` directive, developers do not have to do - * anything to enable this feature. The `aria-disabled` attribute is automatically managed - * simply as a silent side-effect of using `ng-disabled` with the ngAria module. - * - * The full list of directives that interface with ngAria: - * * **ngModel** - * * **ngChecked** - * * **ngReadonly** - * * **ngRequired** - * * **ngDisabled** - * * **ngValue** - * * **ngShow** - * * **ngHide** - * * **ngClick** - * * **ngDblclick** - * * **ngMessages** - * - * Read the {@link guide/accessibility ngAria Developer Guide} for a thorough explanation of each - * directive. - * - * - * ## Dependencies - * Requires the {@link ngAria} module to be installed. - */ - this.$get = function() { - return { - config: function(key) { - return config[key]; - }, - $$watchExpr: watchExpr - }; - }; -} - - -ngAriaModule.directive('ngShow', ['$aria', function($aria) { - return $aria.$$watchExpr('ngShow', 'aria-hidden', [], true); -}]) -.directive('ngHide', ['$aria', function($aria) { - return $aria.$$watchExpr('ngHide', 'aria-hidden', [], false); -}]) -.directive('ngValue', ['$aria', function($aria) { - return $aria.$$watchExpr('ngValue', 'aria-checked', nativeAriaNodeNames, false); -}]) -.directive('ngChecked', ['$aria', function($aria) { - return $aria.$$watchExpr('ngChecked', 'aria-checked', nativeAriaNodeNames, false); -}]) -.directive('ngReadonly', ['$aria', function($aria) { - return $aria.$$watchExpr('ngReadonly', 'aria-readonly', nativeAriaNodeNames, false); -}]) -.directive('ngRequired', ['$aria', function($aria) { - return $aria.$$watchExpr('ngRequired', 'aria-required', nativeAriaNodeNames, false); -}]) -.directive('ngModel', ['$aria', function($aria) { - - function shouldAttachAttr(attr, normalizedAttr, elem, allowNonAriaNodes) { - return $aria.config(normalizedAttr) && - !elem.attr(attr) && - (allowNonAriaNodes || !isNodeOneOf(elem, nativeAriaNodeNames)) && - (elem.attr('type') !== 'hidden' || elem[0].nodeName !== 'INPUT'); - } - - function shouldAttachRole(role, elem) { - // if element does not have role attribute - // AND element type is equal to role (if custom element has a type equaling shape) <-- remove? - // AND element is not in nativeAriaNodeNames - return !elem.attr('role') && (elem.attr('type') === role) && !isNodeOneOf(elem, nativeAriaNodeNames); - } - - function getShape(attr, elem) { - var type = attr.type, - role = attr.role; - - return ((type || role) === 'checkbox' || role === 'menuitemcheckbox') ? 'checkbox' : - ((type || role) === 'radio' || role === 'menuitemradio') ? 'radio' : - (type === 'range' || role === 'progressbar' || role === 'slider') ? 'range' : ''; - } - - return { - restrict: 'A', - require: 'ngModel', - priority: 200, //Make sure watches are fired after any other directives that affect the ngModel value - compile: function(elem, attr) { - if (attr.hasOwnProperty(ARIA_DISABLE_ATTR)) return; - - var shape = getShape(attr, elem); - - return { - post: function(scope, elem, attr, ngModel) { - var needsTabIndex = shouldAttachAttr('tabindex', 'tabindex', elem, false); - - function ngAriaWatchModelValue() { - return ngModel.$modelValue; - } - - function getRadioReaction(newVal) { - // Strict comparison would cause a BC - // eslint-disable-next-line eqeqeq - var boolVal = (attr.value == ngModel.$viewValue); - elem.attr('aria-checked', boolVal); - } - - function getCheckboxReaction() { - elem.attr('aria-checked', !ngModel.$isEmpty(ngModel.$viewValue)); - } - - switch (shape) { - case 'radio': - case 'checkbox': - if (shouldAttachRole(shape, elem)) { - elem.attr('role', shape); - } - if (shouldAttachAttr('aria-checked', 'ariaChecked', elem, false)) { - scope.$watch(ngAriaWatchModelValue, shape === 'radio' ? - getRadioReaction : getCheckboxReaction); - } - if (needsTabIndex) { - elem.attr('tabindex', 0); - } - break; - case 'range': - if (shouldAttachRole(shape, elem)) { - elem.attr('role', 'slider'); - } - if ($aria.config('ariaValue')) { - var needsAriaValuemin = !elem.attr('aria-valuemin') && - (attr.hasOwnProperty('min') || attr.hasOwnProperty('ngMin')); - var needsAriaValuemax = !elem.attr('aria-valuemax') && - (attr.hasOwnProperty('max') || attr.hasOwnProperty('ngMax')); - var needsAriaValuenow = !elem.attr('aria-valuenow'); - - if (needsAriaValuemin) { - attr.$observe('min', function ngAriaValueMinReaction(newVal) { - elem.attr('aria-valuemin', newVal); - }); - } - if (needsAriaValuemax) { - attr.$observe('max', function ngAriaValueMinReaction(newVal) { - elem.attr('aria-valuemax', newVal); - }); - } - if (needsAriaValuenow) { - scope.$watch(ngAriaWatchModelValue, function ngAriaValueNowReaction(newVal) { - elem.attr('aria-valuenow', newVal); - }); - } - } - if (needsTabIndex) { - elem.attr('tabindex', 0); - } - break; - } - - if (!attr.hasOwnProperty('ngRequired') && ngModel.$validators.required - && shouldAttachAttr('aria-required', 'ariaRequired', elem, false)) { - // ngModel.$error.required is undefined on custom controls - attr.$observe('required', function() { - elem.attr('aria-required', !!attr['required']); - }); - } - - if (shouldAttachAttr('aria-invalid', 'ariaInvalid', elem, true)) { - scope.$watch(function ngAriaInvalidWatch() { - return ngModel.$invalid; - }, function ngAriaInvalidReaction(newVal) { - elem.attr('aria-invalid', !!newVal); - }); - } - } - }; - } - }; -}]) -.directive('ngDisabled', ['$aria', function($aria) { - return $aria.$$watchExpr('ngDisabled', 'aria-disabled', nativeAriaNodeNames, false); -}]) -.directive('ngMessages', function() { - return { - restrict: 'A', - require: '?ngMessages', - link: function(scope, elem, attr, ngMessages) { - if (attr.hasOwnProperty(ARIA_DISABLE_ATTR)) return; - - if (!elem.attr('aria-live')) { - elem.attr('aria-live', 'assertive'); - } - } - }; -}) -.directive('ngClick',['$aria', '$parse', function($aria, $parse) { - return { - restrict: 'A', - compile: function(elem, attr) { - if (attr.hasOwnProperty(ARIA_DISABLE_ATTR)) return; - - var fn = $parse(attr.ngClick); - return function(scope, elem, attr) { - - if (!isNodeOneOf(elem, nativeAriaNodeNames)) { - - if ($aria.config('bindRoleForClick') && !elem.attr('role')) { - elem.attr('role', 'button'); - } - - if ($aria.config('tabindex') && !elem.attr('tabindex')) { - elem.attr('tabindex', 0); - } - - if ($aria.config('bindKeydown') && !attr.ngKeydown && !attr.ngKeypress && !attr.ngKeyup) { - elem.on('keydown', function(event) { - var keyCode = event.which || event.keyCode; - - if (keyCode === 13 || keyCode === 32) { - // If the event is triggered on a non-interactive element ... - if (nativeAriaNodeNames.indexOf(event.target.nodeName) === -1 && !event.target.isContentEditable) { - // ... prevent the default browser behavior (e.g. scrolling when pressing spacebar) - // See https://github.com/angular/angular.js/issues/16664 - event.preventDefault(); - } - scope.$apply(callback); - } - - function callback() { - fn(scope, { $event: event }); - } - }); - } - } - }; - } - }; -}]) -.directive('ngDblclick', ['$aria', function($aria) { - return function(scope, elem, attr) { - if (attr.hasOwnProperty(ARIA_DISABLE_ATTR)) return; - - if ($aria.config('tabindex') && !elem.attr('tabindex') && !isNodeOneOf(elem, nativeAriaNodeNames)) { - elem.attr('tabindex', 0); - } - }; -}]); - - -})(window, window.angular); - - -/***/ }), - -/***/ "./node_modules/angular-aria/index.js": -/*!********************************************!*\ - !*** ./node_modules/angular-aria/index.js ***! - \********************************************/ -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -__webpack_require__(/*! ./angular-aria */ "./node_modules/angular-aria/angular-aria.js"); -module.exports = 'ngAria'; - - -/***/ }), - -/***/ "./node_modules/angular-local-storage/dist/angular-local-storage.js": -/*!**************************************************************************!*\ - !*** ./node_modules/angular-local-storage/dist/angular-local-storage.js ***! - \**************************************************************************/ -/***/ (() => { - -/** - * An Angular module that gives you access to the browsers local storage - * @version v0.7.1 - 2017-06-21 - * @link https://github.com/grevory/angular-local-storage - * @author grevory - * @license MIT License, http://www.opensource.org/licenses/MIT - */ -(function (window, angular) { -var isDefined = angular.isDefined, - isUndefined = angular.isUndefined, - isNumber = angular.isNumber, - isObject = angular.isObject, - isArray = angular.isArray, - isString = angular.isString, - extend = angular.extend, - toJson = angular.toJson; - -angular - .module('LocalStorageModule', []) - .provider('localStorageService', function() { - // You should set a prefix to avoid overwriting any local storage variables from the rest of your app - // e.g. localStorageServiceProvider.setPrefix('yourAppName'); - // With provider you can use config as this: - // myApp.config(function (localStorageServiceProvider) { - // localStorageServiceProvider.prefix = 'yourAppName'; - // }); - this.prefix = 'ls'; - - // You could change web storage type localstorage or sessionStorage - this.storageType = 'localStorage'; - - // Cookie options (usually in case of fallback) - // expiry = Number of days before cookies expire // 0 = Does not expire - // path = The web path the cookie represents - // secure = Wether the cookies should be secure (i.e only sent on HTTPS requests) - this.cookie = { - expiry: 30, - path: '/', - secure: false - }; - - // Decides wether we should default to cookies if localstorage is not supported. - this.defaultToCookie = true; - - // Send signals for each of the following actions? - this.notify = { - setItem: true, - removeItem: false - }; - - // Setter for the prefix - this.setPrefix = function(prefix) { - this.prefix = prefix; - return this; - }; - - // Setter for the storageType - this.setStorageType = function(storageType) { - this.storageType = storageType; - return this; - }; - // Setter for defaultToCookie value, default is true. - this.setDefaultToCookie = function (shouldDefault) { - this.defaultToCookie = !!shouldDefault; // Double-not to make sure it's a bool value. - return this; - }; - // Setter for cookie config - this.setStorageCookie = function(exp, path, secure) { - this.cookie.expiry = exp; - this.cookie.path = path; - this.cookie.secure = secure; - return this; - }; - - // Setter for cookie domain - this.setStorageCookieDomain = function(domain) { - this.cookie.domain = domain; - return this; - }; - - // Setter for notification config - // itemSet & itemRemove should be booleans - this.setNotify = function(itemSet, itemRemove) { - this.notify = { - setItem: itemSet, - removeItem: itemRemove - }; - return this; - }; - - this.$get = ['$rootScope', '$window', '$document', '$parse','$timeout', function($rootScope, $window, $document, $parse, $timeout) { - var self = this; - var prefix = self.prefix; - var cookie = self.cookie; - var notify = self.notify; - var storageType = self.storageType; - var webStorage; - - // When Angular's $document is not available - if (!$document) { - $document = document; - } else if ($document[0]) { - $document = $document[0]; - } - - // If there is a prefix set in the config lets use that with an appended period for readability - if (prefix.substr(-1) !== '.') { - prefix = !!prefix ? prefix + '.' : ''; - } - var deriveQualifiedKey = function(key) { - return prefix + key; - }; - - // Removes prefix from the key. - var underiveQualifiedKey = function (key) { - return key.replace(new RegExp('^' + prefix, 'g'), ''); - }; - - // Check if the key is within our prefix namespace. - var isKeyPrefixOurs = function (key) { - return key.indexOf(prefix) === 0; - }; - - // Checks the browser to see if local storage is supported - var checkSupport = function () { - try { - var supported = (storageType in $window && $window[storageType] !== null); - - // When Safari (OS X or iOS) is in private browsing mode, it appears as though localStorage - // is available, but trying to call .setItem throws an exception. - // - // "QUOTA_EXCEEDED_ERR: DOM Exception 22: An attempt was made to add something to storage - // that exceeded the quota." - var key = deriveQualifiedKey('__' + Math.round(Math.random() * 1e7)); - if (supported) { - webStorage = $window[storageType]; - webStorage.setItem(key, ''); - webStorage.removeItem(key); - } - - return supported; - } catch (e) { - // Only change storageType to cookies if defaulting is enabled. - if (self.defaultToCookie) - storageType = 'cookie'; - $rootScope.$broadcast('LocalStorageModule.notification.error', e.message); - return false; - } - }; - var browserSupportsLocalStorage = checkSupport(); - - // Directly adds a value to local storage - // If local storage is not available in the browser use cookies - // Example use: localStorageService.add('library','angular'); - var addToLocalStorage = function (key, value, type) { - var previousType = getStorageType(); - - try { - setStorageType(type); - - // Let's convert undefined values to null to get the value consistent - if (isUndefined(value)) { - value = null; - } else { - value = toJson(value); - } - - // If this browser does not support local storage use cookies - if (!browserSupportsLocalStorage && self.defaultToCookie || self.storageType === 'cookie') { - if (!browserSupportsLocalStorage) { - $rootScope.$broadcast('LocalStorageModule.notification.warning', 'LOCAL_STORAGE_NOT_SUPPORTED'); - } - - if (notify.setItem) { - $rootScope.$broadcast('LocalStorageModule.notification.setitem', {key: key, newvalue: value, storageType: 'cookie'}); - } - return addToCookies(key, value); - } - - try { - if (webStorage) { - webStorage.setItem(deriveQualifiedKey(key), value); - } - if (notify.setItem) { - $rootScope.$broadcast('LocalStorageModule.notification.setitem', {key: key, newvalue: value, storageType: self.storageType}); - } - } catch (e) { - $rootScope.$broadcast('LocalStorageModule.notification.error', e.message); - return addToCookies(key, value); - } - return true; - } finally { - setStorageType(previousType); - } - }; - - // Directly get a value from local storage - // Example use: localStorageService.get('library'); // returns 'angular' - var getFromLocalStorage = function (key, type) { - var previousType = getStorageType(); - - try { - setStorageType(type); - - if (!browserSupportsLocalStorage && self.defaultToCookie || self.storageType === 'cookie') { - if (!browserSupportsLocalStorage) { - $rootScope.$broadcast('LocalStorageModule.notification.warning', 'LOCAL_STORAGE_NOT_SUPPORTED'); - } - - return getFromCookies(key); - } - - var item = webStorage ? webStorage.getItem(deriveQualifiedKey(key)) : null; - // angular.toJson will convert null to 'null', so a proper conversion is needed - // FIXME not a perfect solution, since a valid 'null' string can't be stored - if (!item || item === 'null') { - return null; - } - - try { - return JSON.parse(item); - } catch (e) { - return item; - } - } finally { - setStorageType(previousType); - } - }; - - // Remove an item from local storage - // Example use: localStorageService.remove('library'); // removes the key/value pair of library='angular' - // - // This is var-arg removal, check the last argument to see if it is a storageType - // and set type accordingly before removing. - // - var removeFromLocalStorage = function () { - var previousType = getStorageType(); - - try { - // can't pop on arguments, so we do this - var consumed = 0; - if (arguments.length >= 1 && - (arguments[arguments.length - 1] === 'localStorage' || - arguments[arguments.length - 1] === 'sessionStorage')) { - consumed = 1; - setStorageType(arguments[arguments.length - 1]); - } - - var i, key; - for (i = 0; i < arguments.length - consumed; i++) { - key = arguments[i]; - if (!browserSupportsLocalStorage && self.defaultToCookie || self.storageType === 'cookie') { - if (!browserSupportsLocalStorage) { - $rootScope.$broadcast('LocalStorageModule.notification.warning', 'LOCAL_STORAGE_NOT_SUPPORTED'); - } - - if (notify.removeItem) { - $rootScope.$broadcast('LocalStorageModule.notification.removeitem', {key: key, storageType: 'cookie'}); - } - removeFromCookies(key); - } - else { - try { - webStorage.removeItem(deriveQualifiedKey(key)); - if (notify.removeItem) { - $rootScope.$broadcast('LocalStorageModule.notification.removeitem', { - key: key, - storageType: self.storageType - }); - } - } catch (e) { - $rootScope.$broadcast('LocalStorageModule.notification.error', e.message); - removeFromCookies(key); - } - } - } - } finally { - setStorageType(previousType); - } - }; - - // Return array of keys for local storage - // Example use: var keys = localStorageService.keys() - var getKeysForLocalStorage = function (type) { - var previousType = getStorageType(); - - try { - setStorageType(type); - - if (!browserSupportsLocalStorage) { - $rootScope.$broadcast('LocalStorageModule.notification.warning', 'LOCAL_STORAGE_NOT_SUPPORTED'); - return []; - } - - var prefixLength = prefix.length; - var keys = []; - for (var key in webStorage) { - // Only return keys that are for this app - if (key.substr(0, prefixLength) === prefix) { - try { - keys.push(key.substr(prefixLength)); - } catch (e) { - $rootScope.$broadcast('LocalStorageModule.notification.error', e.Description); - return []; - } - } - } - - return keys; - } finally { - setStorageType(previousType); - } - }; - - // Remove all data for this app from local storage - // Also optionally takes a regular expression string and removes the matching key-value pairs - // Example use: localStorageService.clearAll(); - // Should be used mostly for development purposes - var clearAllFromLocalStorage = function (regularExpression, type) { - var previousType = getStorageType(); - - try { - setStorageType(type); - - // Setting both regular expressions independently - // Empty strings result in catchall RegExp - var prefixRegex = !!prefix ? new RegExp('^' + prefix) : new RegExp(); - var testRegex = !!regularExpression ? new RegExp(regularExpression) : new RegExp(); - - if (!browserSupportsLocalStorage && self.defaultToCookie || self.storageType === 'cookie') { - if (!browserSupportsLocalStorage) { - $rootScope.$broadcast('LocalStorageModule.notification.warning', 'LOCAL_STORAGE_NOT_SUPPORTED'); - } - return clearAllFromCookies(); - } - if (!browserSupportsLocalStorage && !self.defaultToCookie) - return false; - var prefixLength = prefix.length; - - for (var key in webStorage) { - // Only remove items that are for this app and match the regular expression - if (prefixRegex.test(key) && testRegex.test(key.substr(prefixLength))) { - try { - removeFromLocalStorage(key.substr(prefixLength)); - } catch (e) { - $rootScope.$broadcast('LocalStorageModule.notification.error', e.message); - return clearAllFromCookies(); - } - } - } - - return true; - } finally { - setStorageType(previousType); - } - }; - - // Checks the browser to see if cookies are supported - var browserSupportsCookies = (function() { - try { - return $window.navigator.cookieEnabled || - ("cookie" in $document && ($document.cookie.length > 0 || - ($document.cookie = "test").indexOf.call($document.cookie, "test") > -1)); - } catch (e) { - $rootScope.$broadcast('LocalStorageModule.notification.error', e.message); - return false; - } - }()); - - // Directly adds a value to cookies - // Typically used as a fallback if local storage is not available in the browser - // Example use: localStorageService.cookie.add('library','angular'); - var addToCookies = function (key, value, daysToExpiry, secure) { - - if (isUndefined(value)) { - return false; - } else if(isArray(value) || isObject(value)) { - value = toJson(value); - } - - if (!browserSupportsCookies) { - $rootScope.$broadcast('LocalStorageModule.notification.error', 'COOKIES_NOT_SUPPORTED'); - return false; - } - - try { - var expiry = '', - expiryDate = new Date(), - cookieDomain = ''; - - if (value === null) { - // Mark that the cookie has expired one day ago - expiryDate.setTime(expiryDate.getTime() + (-1 * 24 * 60 * 60 * 1000)); - expiry = "; expires=" + expiryDate.toGMTString(); - value = ''; - } else if (isNumber(daysToExpiry) && daysToExpiry !== 0) { - expiryDate.setTime(expiryDate.getTime() + (daysToExpiry * 24 * 60 * 60 * 1000)); - expiry = "; expires=" + expiryDate.toGMTString(); - } else if (cookie.expiry !== 0) { - expiryDate.setTime(expiryDate.getTime() + (cookie.expiry * 24 * 60 * 60 * 1000)); - expiry = "; expires=" + expiryDate.toGMTString(); - } - if (!!key) { - var cookiePath = "; path=" + cookie.path; - if (cookie.domain) { - cookieDomain = "; domain=" + cookie.domain; - } - /* Providing the secure parameter always takes precedence over config - * (allows developer to mix and match secure + non-secure) */ - if (typeof secure === 'boolean') { - if (secure === true) { - /* We've explicitly specified secure, - * add the secure attribute to the cookie (after domain) */ - cookieDomain += "; secure"; - } - // else - secure has been supplied but isn't true - so don't set secure flag, regardless of what config says - } - else if (cookie.secure === true) { - // secure parameter wasn't specified, get default from config - cookieDomain += "; secure"; - } - $document.cookie = deriveQualifiedKey(key) + "=" + encodeURIComponent(value) + expiry + cookiePath + cookieDomain; - } - } catch (e) { - $rootScope.$broadcast('LocalStorageModule.notification.error', e.message); - return false; - } - return true; - }; - - // Directly get a value from a cookie - // Example use: localStorageService.cookie.get('library'); // returns 'angular' - var getFromCookies = function (key) { - if (!browserSupportsCookies) { - $rootScope.$broadcast('LocalStorageModule.notification.error', 'COOKIES_NOT_SUPPORTED'); - return false; - } - - var cookies = $document.cookie && $document.cookie.split(';') || []; - for(var i=0; i < cookies.length; i++) { - var thisCookie = cookies[i]; - while (thisCookie.charAt(0) === ' ') { - thisCookie = thisCookie.substring(1,thisCookie.length); - } - if (thisCookie.indexOf(deriveQualifiedKey(key) + '=') === 0) { - var storedValues = decodeURIComponent(thisCookie.substring(prefix.length + key.length + 1, thisCookie.length)); - try { - var parsedValue = JSON.parse(storedValues); - return typeof(parsedValue) === 'number' ? storedValues : parsedValue; - } catch(e) { - return storedValues; - } - } - } - return null; - }; - - var removeFromCookies = function (key) { - addToCookies(key,null); - }; - - var clearAllFromCookies = function () { - var thisCookie = null; - var prefixLength = prefix.length; - var cookies = $document.cookie.split(';'); - for(var i = 0; i < cookies.length; i++) { - thisCookie = cookies[i]; - - while (thisCookie.charAt(0) === ' ') { - thisCookie = thisCookie.substring(1, thisCookie.length); - } - - var key = thisCookie.substring(prefixLength, thisCookie.indexOf('=')); - removeFromCookies(key); - } - }; - - var getStorageType = function() { - return storageType; - }; - - var setStorageType = function(type) { - if (type && storageType !== type) { - storageType = type; - browserSupportsLocalStorage = checkSupport(); - } - return browserSupportsLocalStorage; - }; - - // Add a listener on scope variable to save its changes to local storage - // Return a function which when called cancels binding - var bindToScope = function(scope, key, def, lsKey, type) { - lsKey = lsKey || key; - var value = getFromLocalStorage(lsKey, type); - - if (value === null && isDefined(def)) { - value = def; - } else if (isObject(value) && isObject(def)) { - value = extend(value, def); - } - - $parse(key).assign(scope, value); - - return scope.$watch(key, function(newVal) { - addToLocalStorage(lsKey, newVal, type); - }, isObject(scope[key])); - }; - - // Add listener to local storage, for update callbacks. - if (browserSupportsLocalStorage) { - if ($window.addEventListener) { - $window.addEventListener("storage", handleStorageChangeCallback, false); - $rootScope.$on('$destroy', function() { - $window.removeEventListener("storage", handleStorageChangeCallback); - }); - } else if($window.attachEvent){ - // attachEvent and detachEvent are proprietary to IE v6-10 - $window.attachEvent("onstorage", handleStorageChangeCallback); - $rootScope.$on('$destroy', function() { - $window.detachEvent("onstorage", handleStorageChangeCallback); - }); - } - } - - // Callback handler for storage changed. - function handleStorageChangeCallback(e) { - if (!e) { e = $window.event; } - if (notify.setItem) { - if (isString(e.key) && isKeyPrefixOurs(e.key)) { - var key = underiveQualifiedKey(e.key); - // Use timeout, to avoid using $rootScope.$apply. - $timeout(function () { - $rootScope.$broadcast('LocalStorageModule.notification.changed', { key: key, newvalue: e.newValue, storageType: self.storageType }); - }); - } - } - } - - // Return localStorageService.length - // ignore keys that not owned - var lengthOfLocalStorage = function(type) { - var previousType = getStorageType(); - - try { - setStorageType(type); - - var count = 0; - var storage = $window[storageType]; - for(var i = 0; i < storage.length; i++) { - if(storage.key(i).indexOf(prefix) === 0 ) { - count++; - } - } - - return count; - } finally { - setStorageType(previousType); - } - }; - - var changePrefix = function(localStoragePrefix) { - prefix = localStoragePrefix; - }; - - return { - isSupported: browserSupportsLocalStorage, - getStorageType: getStorageType, - setStorageType: setStorageType, - setPrefix: changePrefix, - set: addToLocalStorage, - add: addToLocalStorage, //DEPRECATED - get: getFromLocalStorage, - keys: getKeysForLocalStorage, - remove: removeFromLocalStorage, - clearAll: clearAllFromLocalStorage, - bind: bindToScope, - deriveKey: deriveQualifiedKey, - underiveKey: underiveQualifiedKey, - length: lengthOfLocalStorage, - defaultToCookie: this.defaultToCookie, - cookie: { - isSupported: browserSupportsCookies, - set: addToCookies, - add: addToCookies, //DEPRECATED - get: getFromCookies, - remove: removeFromCookies, - clearAll: clearAllFromCookies - } - }; - }]; - }); -})(window, window.angular); - -/***/ }), - -/***/ "./node_modules/angular-local-storage/index.js": -/*!*****************************************************!*\ - !*** ./node_modules/angular-local-storage/index.js ***! - \*****************************************************/ -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -__webpack_require__(/*! ./dist/angular-local-storage.js */ "./node_modules/angular-local-storage/dist/angular-local-storage.js"); -module.exports = 'LocalStorageModule'; - - -/***/ }), - -/***/ "./node_modules/angular-material/angular-material.js": -/*!***********************************************************!*\ - !*** ./node_modules/angular-material/angular-material.js ***! - \***********************************************************/ -/***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => { - -/* provided dependency */ var __webpack_provided_window_dot_jQuery = __webpack_require__(/*! jquery */ "./node_modules/jquery/dist/jquery.js"); -/*! - * AngularJS Material Design - * https://github.com/angular/material - * @license MIT - * v1.2.3 - */ -(function( window, angular, undefined ){ -"use strict"; - -(function(){ -"use strict"; - -angular.module('ngMaterial', ["ng","ngAnimate","ngAria","material.core","material.core.animate","material.core.gestures","material.core.interaction","material.core.layout","material.core.meta","material.core.theming.palette","material.core.theming","material.components.autocomplete","material.components.backdrop","material.components.bottomSheet","material.components.button","material.components.card","material.components.checkbox","material.components.chips","material.components.colors","material.components.content","material.components.datepicker","material.components.dialog","material.components.divider","material.components.fabActions","material.components.fabShared","material.components.fabSpeedDial","material.components.fabToolbar","material.components.gridList","material.components.icon","material.components.input","material.components.list","material.components.menu","material.components.menuBar","material.components.navBar","material.components.panel","material.components.progressCircular","material.components.progressLinear","material.components.radioButton","material.components.select","material.components.showHide","material.components.sidenav","material.components.slider","material.components.sticky","material.components.subheader","material.components.swipe","material.components.switch","material.components.tabs","material.components.toast","material.components.toolbar","material.components.tooltip","material.components.truncate","material.components.virtualRepeat","material.components.whiteframe"]); -})(); -(function(){ -"use strict"; - -/** - * Initialization function that validates environment - * requirements. - */ -DetectNgTouch.$inject = ["$log", "$injector"]; -MdCoreConfigure.$inject = ["$provide", "$mdThemingProvider"]; -rAFDecorator.$inject = ["$delegate"]; -qDecorator.$inject = ["$delegate"]; -angular - .module('material.core', [ - 'ngAnimate', - 'material.core.animate', - 'material.core.layout', - 'material.core.interaction', - 'material.core.gestures', - 'material.core.theming' - ]) - .config(MdCoreConfigure) - .run(DetectNgTouch); - - -/** - * Detect if the ng-Touch module is also being used. - * Warn if detected. - * @ngInject - */ -function DetectNgTouch($log, $injector) { - if ($injector.has('$swipe')) { - var msg = "" + - "You are using the ngTouch module. \n" + - "AngularJS Material already has mobile click, tap, and swipe support... \n" + - "ngTouch is not supported with AngularJS Material!"; - $log.warn(msg); - } -} - -/** - * @ngInject - */ -function MdCoreConfigure($provide, $mdThemingProvider) { - - $provide.decorator('$$rAF', ['$delegate', rAFDecorator]); - $provide.decorator('$q', ['$delegate', qDecorator]); - - $mdThemingProvider.theme('default') - .primaryPalette('indigo') - .accentPalette('pink') - .warnPalette('deep-orange') - .backgroundPalette('grey'); -} - -/** - * @ngInject - */ -function rAFDecorator($delegate) { - /** - * Use this to throttle events that come in often. - * The throttled function will always use the *last* invocation before the - * coming frame. - * - * For example, window resize events that fire many times a second: - * If we set to use an raf-throttled callback on window resize, then - * our callback will only be fired once per frame, with the last resize - * event that happened before that frame. - * - * @param {function} cb function to debounce - */ - $delegate.throttle = function(cb) { - var queuedArgs, alreadyQueued, queueCb, context; - return function debounced() { - queuedArgs = arguments; - context = this; - queueCb = cb; - if (!alreadyQueued) { - alreadyQueued = true; - $delegate(function() { - queueCb.apply(context, Array.prototype.slice.call(queuedArgs)); - alreadyQueued = false; - }); - } - }; - }; - return $delegate; -} - -/** - * @ngInject - */ -function qDecorator($delegate) { - /** - * Adds a shim for $q.resolve for AngularJS version that don't have it, - * so we don't have to think about it. - * - * via https://github.com/angular/angular.js/pull/11987 - */ - - // TODO(crisbeto): this won't be necessary once we drop AngularJS 1.3 - if (!$delegate.resolve) { - $delegate.resolve = $delegate.when; - } - return $delegate; -} - -})(); -(function(){ -"use strict"; - - -MdAutofocusDirective.$inject = ["$parse"];angular.module('material.core') - .directive('mdAutofocus', MdAutofocusDirective); - -/** - * @ngdoc directive - * @name mdAutofocus - * @module material.core.util - * - * @description - * - * `[md-autofocus]` provides an optional way to identify the focused element when a `$mdDialog`, - * `$mdBottomSheet`, `$mdMenu` or `$mdSidenav` opens or upon page load for input-like elements. - * - * When one of these opens, it will find the first nested element with the `[md-autofocus]` - * attribute directive and optional expression. An expression may be specified as the directive - * value to enable conditional activation of the autofocus. - * - * @usage - * - * ### Dialog - * - * - *
    - * - * - * - * - *
    - *
    - *
    - * - * ### Bottomsheet - * - * - * Comment Actions - * - * - * - * - * - * {{ item.name }} - * - * - * - * - * - * - * - * ### Autocomplete - * - * - * {{item.display}} - * - * - * - * ### Sidenav - * - *
    - * - * Left Nav! - * - * - * - * Center Content - * - * Open Left Menu - * - * - * - * - *
    - * - * - * - * - *
    - *
    - *
    - *
    - **/ -function MdAutofocusDirective($parse) { - return { - restrict: 'A', - link: { - pre: preLink - } - }; - - function preLink(scope, element, attr) { - var attrExp = attr.mdAutoFocus || attr.mdAutofocus || attr.mdSidenavFocus; - - // Initially update the expression by manually parsing the expression as per $watch source. - updateExpression($parse(attrExp)(scope)); - - // Only watch the expression if it is not empty. - if (attrExp) { - scope.$watch(attrExp, updateExpression); - } - - /** - * Updates the autofocus class which is used to determine whether the attribute - * expression evaluates to true or false. - * @param {string|boolean} value Attribute Value - */ - function updateExpression(value) { - - // Rather than passing undefined to the jqLite toggle class function we explicitly set the - // value to true. Otherwise the class will be just toggled instead of being forced. - if (angular.isUndefined(value)) { - value = true; - } - - element.toggleClass('md-autofocus', !!value); - } - } - -} - -})(); -(function(){ -"use strict"; - -/** - * @ngdoc module - * @name material.core.colorUtil - * @description - * Color Util - */ -angular - .module('material.core') - .factory('$mdColorUtil', ColorUtilFactory); - -function ColorUtilFactory() { - /** - * Converts hex value to RGBA string - * @param color {string} - * @returns {string} - */ - function hexToRgba (color) { - var hex = color[ 0 ] === '#' ? color.substr(1) : color, - dig = hex.length / 3, - red = hex.substr(0, dig), - green = hex.substr(dig, dig), - blue = hex.substr(dig * 2); - if (dig === 1) { - red += red; - green += green; - blue += blue; - } - return 'rgba(' + parseInt(red, 16) + ',' + parseInt(green, 16) + ',' + parseInt(blue, 16) + ',0.1)'; - } - - /** - * Converts rgba value to hex string - * @param {string} color - * @returns {string} - */ - function rgbaToHex(color) { - color = color.match(/^rgba?[\s+]?\([\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?/i); - - var hex = (color && color.length === 4) ? "#" + - ("0" + parseInt(color[1],10).toString(16)).slice(-2) + - ("0" + parseInt(color[2],10).toString(16)).slice(-2) + - ("0" + parseInt(color[3],10).toString(16)).slice(-2) : ''; - - return hex.toUpperCase(); - } - - /** - * Converts an RGB color to RGBA - * @param {string} color - * @returns {string} - */ - function rgbToRgba (color) { - return color.replace(')', ', 0.1)').replace('(', 'a('); - } - - /** - * Converts an RGBA color to RGB - * @param {string} color - * @returns {string} - */ - function rgbaToRgb (color) { - return color - ? color.replace('rgba', 'rgb').replace(/,[^),]+\)/, ')') - : 'rgb(0,0,0)'; - } - - return { - rgbaToHex: rgbaToHex, - hexToRgba: hexToRgba, - rgbToRgba: rgbToRgba, - rgbaToRgb: rgbaToRgb - }; -} - -})(); -(function(){ -"use strict"; - -angular.module('material.core') -.factory('$mdConstant', MdConstantFactory); - -/** - * Factory function that creates the grab-bag $mdConstant service. - * @ngInject - */ -function MdConstantFactory() { - - var prefixTestEl = document.createElement('div'); - var vendorPrefix = getVendorPrefix(prefixTestEl); - var isWebkit = /webkit/i.test(vendorPrefix); - var SPECIAL_CHARS_REGEXP = /([:\-_]+(.))/g; - - /** - * @param {string} name CSS property name - * @return {string} the property name supported by the browser - */ - function vendorProperty(name) { - // Add a dash between the prefix and name, to be able to transform the string into camelcase. - var prefixedName = vendorPrefix + '-' + name; - var ucPrefix = camelCase(prefixedName); - var lcPrefix = ucPrefix.charAt(0).toLowerCase() + ucPrefix.substring(1); - - return hasStyleProperty(prefixTestEl, name) ? name : // The current browser supports the un-prefixed property - hasStyleProperty(prefixTestEl, ucPrefix) ? ucPrefix : // The current browser only supports the prefixed property. - hasStyleProperty(prefixTestEl, lcPrefix) ? lcPrefix : name; // Some browsers are only supporting the prefix in lowercase. - } - - function hasStyleProperty(testElement, property) { - return angular.isDefined(testElement.style[property]); - } - - /** - * @param {!string} input value to convert to camelCase - * @return {string} camelCased version of the input string - */ - function camelCase(input) { - return input.replace(SPECIAL_CHARS_REGEXP, function(matches, separator, letter, offset) { - return offset ? letter.toUpperCase() : letter; - }); - } - - function getVendorPrefix(testElement) { - var prop, match; - var vendorRegex = /^(Moz|webkit|ms)(?=[A-Z])/; - - for (prop in testElement.style) { - if (match = vendorRegex.exec(prop)) { - return match[0]; - } - } - } - - var self = { - isInputKey : function(e) { return (e.keyCode >= 31 && e.keyCode <= 90); }, - isNumPadKey : function(e) { return (3 === e.location && e.keyCode >= 97 && e.keyCode <= 105); }, - isMetaKey: function(e) { return (e.keyCode >= 91 && e.keyCode <= 93); }, - isFnLockKey: function(e) { return (e.keyCode >= 112 && e.keyCode <= 145); }, - isNavigationKey : function(e) { - var kc = self.KEY_CODE, NAVIGATION_KEYS = [kc.SPACE, kc.ENTER, kc.UP_ARROW, kc.DOWN_ARROW]; - return (NAVIGATION_KEYS.indexOf(e.keyCode) != -1); - }, - hasModifierKey: function(e) { - return e.ctrlKey || e.metaKey || e.altKey; - }, - - /** - * Maximum size, in pixels, that can be explicitly set to an element. The actual value varies - * between browsers, but IE11 has the very lowest size at a mere 1,533,917px. Ideally we could - * compute this value, but Firefox always reports an element to have a size of zero if it - * goes over the max, meaning that we'd have to binary search for the value. - */ - ELEMENT_MAX_PIXELS: 1533917, - - /** - * Priority for a directive that should run before the directives from ngAria. - */ - BEFORE_NG_ARIA: 210, - - /** - * Common Keyboard actions and their associated keycode. - */ - KEY_CODE: { - COMMA: 188, - SEMICOLON : 186, - ENTER: 13, - ESCAPE: 27, - SPACE: 32, - PAGE_UP: 33, - PAGE_DOWN: 34, - END: 35, - HOME: 36, - LEFT_ARROW : 37, - UP_ARROW : 38, - RIGHT_ARROW : 39, - DOWN_ARROW : 40, - TAB : 9, - BACKSPACE: 8, - DELETE: 46 - }, - - /** - * Vendor prefixed CSS properties to be used to support the given functionality in older browsers - * as well. - */ - CSS: { - /* Constants */ - TRANSITIONEND: 'transitionend' + (isWebkit ? ' webkitTransitionEnd' : ''), - ANIMATIONEND: 'animationend' + (isWebkit ? ' webkitAnimationEnd' : ''), - - TRANSFORM: vendorProperty('transform'), - TRANSFORM_ORIGIN: vendorProperty('transformOrigin'), - TRANSITION: vendorProperty('transition'), - TRANSITION_DURATION: vendorProperty('transitionDuration'), - ANIMATION_PLAY_STATE: vendorProperty('animationPlayState'), - ANIMATION_DURATION: vendorProperty('animationDuration'), - ANIMATION_NAME: vendorProperty('animationName'), - ANIMATION_TIMING: vendorProperty('animationTimingFunction'), - ANIMATION_DIRECTION: vendorProperty('animationDirection') - }, - - /** - * As defined in core/style/_variables.scss - * - * $layout-breakpoint-xs: 600px !default; - * $layout-breakpoint-sm: 960px !default; - * $layout-breakpoint-md: 1280px !default; - * $layout-breakpoint-lg: 1920px !default; - * - */ - MEDIA: { - 'xs' : '(max-width: 599px)' , - 'gt-xs' : '(min-width: 600px)' , - 'sm' : '(min-width: 600px) and (max-width: 959px)' , - 'gt-sm' : '(min-width: 960px)' , - 'md' : '(min-width: 960px) and (max-width: 1279px)' , - 'gt-md' : '(min-width: 1280px)' , - 'lg' : '(min-width: 1280px) and (max-width: 1919px)', - 'gt-lg' : '(min-width: 1920px)' , - 'xl' : '(min-width: 1920px)' , - 'landscape' : '(orientation: landscape)' , - 'portrait' : '(orientation: portrait)' , - 'print' : 'print' - }, - - MEDIA_PRIORITY: [ - 'xl', - 'gt-lg', - 'lg', - 'gt-md', - 'md', - 'gt-sm', - 'sm', - 'gt-xs', - 'xs', - 'landscape', - 'portrait', - 'print' - ] - }; - - return self; -} - -})(); -(function(){ -"use strict"; - - angular - .module('material.core') - .config(["$provide", function($provide){ - $provide.decorator('$mdUtil', ['$delegate', function ($delegate){ - /** - * Inject the iterator facade to easily support iteration and accessors - * @see iterator below - */ - $delegate.iterator = MdIterator; - - return $delegate; - } - ]); - }]); - - /** - * iterator is a list facade to easily support iteration and accessors/ - * - * @param {any[]} items Array list which this iterator will enumerate - * @param {boolean=} reloop enables iterator to consider the list as an endless loop - * @return {{add: add, next: (function()), last: (function(): any|null), previous: (function()), count: (function(): number), hasNext: (function(*=): Array.length|*|number|boolean), inRange: (function(*): boolean), remove: remove, contains: (function(*=): *|boolean), itemAt: (function(*=): any|null), findBy: (function(*, *): *[]), hasPrevious: (function(*=): Array.length|*|number|boolean), items: (function(): *[]), indexOf: (function(*=): number), first: (function(): any|null)}} - * @constructor - */ - function MdIterator(items, reloop) { - var trueFn = function() { return true; }; - - if (items && !angular.isArray(items)) { - items = Array.prototype.slice.call(items); - } - - reloop = !!reloop; - var _items = items || []; - - // Published API - return { - items: getItems, - count: count, - - inRange: inRange, - contains: contains, - indexOf: indexOf, - itemAt: itemAt, - - findBy: findBy, - - add: add, - remove: remove, - - first: first, - last: last, - next: angular.bind(null, findSubsequentItem, false), - previous: angular.bind(null, findSubsequentItem, true), - - hasPrevious: hasPrevious, - hasNext: hasNext - }; - - /** - * Publish copy of the enumerable set - * @returns {Array|*} - */ - function getItems() { - return [].concat(_items); - } - - /** - * Determine length of the list - * @returns {Array.length|*|number} - */ - function count() { - return _items.length; - } - - /** - * Is the index specified valid - * @param index - * @returns {Array.length|*|number|boolean} - */ - function inRange(index) { - return _items.length && (index > -1) && (index < _items.length); - } - - /** - * Can the iterator proceed to the next item in the list; relative to - * the specified item. - * - * @param item - * @returns {Array.length|*|number|boolean} - */ - function hasNext(item) { - return item ? inRange(indexOf(item) + 1) : false; - } - - /** - * Can the iterator proceed to the previous item in the list; relative to - * the specified item. - * - * @param item - * @returns {Array.length|*|number|boolean} - */ - function hasPrevious(item) { - return item ? inRange(indexOf(item) - 1) : false; - } - - /** - * Get item at specified index/position - * @param index - * @returns {*} - */ - function itemAt(index) { - return inRange(index) ? _items[index] : null; - } - - /** - * Find all elements matching the key/value pair - * otherwise return null - * - * @param val - * @param key - * - * @return array - */ - function findBy(key, val) { - return _items.filter(function(item) { - return item[key] === val; - }); - } - - /** - * Add item to list - * @param item - * @param index - * @returns {*} - */ - function add(item, index) { - if (!item) return -1; - - if (!angular.isNumber(index)) { - index = _items.length; - } - - _items.splice(index, 0, item); - - return indexOf(item); - } - - /** - * Remove item from list... - * @param item - */ - function remove(item) { - if (contains(item)){ - _items.splice(indexOf(item), 1); - } - } - - /** - * Get the zero-based index of the target item - * @param item - * @returns {*} - */ - function indexOf(item) { - return _items.indexOf(item); - } - - /** - * Boolean existence check - * @param item - * @returns {boolean} - */ - function contains(item) { - return item && (indexOf(item) > -1); - } - - /** - * Return first item in the list - * @returns {*} - */ - function first() { - return _items.length ? _items[0] : null; - } - - /** - * Return last item in the list... - * @returns {*} - */ - function last() { - return _items.length ? _items[_items.length - 1] : null; - } - - /** - * Find the next item. If reloop is true and at the end of the list, it will go back to the - * first item. If given, the `validate` callback will be used to determine whether the next item - * is valid. If not valid, it will try to find the next item again. - * - * @param {boolean} backwards Specifies the direction of searching (forwards/backwards) - * @param {*} item The item whose subsequent item we are looking for - * @param {Function=} validate The `validate` function - * @param {integer=} limit The recursion limit - * - * @returns {*} The subsequent item or null - */ - function findSubsequentItem(backwards, item, validate, limit) { - validate = validate || trueFn; - - var curIndex = indexOf(item); - while (true) { - if (!inRange(curIndex)) return null; - - var nextIndex = curIndex + (backwards ? -1 : 1); - var foundItem = null; - if (inRange(nextIndex)) { - foundItem = _items[nextIndex]; - } else if (reloop) { - foundItem = backwards ? last() : first(); - nextIndex = indexOf(foundItem); - } - - if ((foundItem === null) || (nextIndex === limit)) return null; - if (validate(foundItem)) return foundItem; - - if (angular.isUndefined(limit)) limit = nextIndex; - - curIndex = nextIndex; - } - } - } - - -})(); -(function(){ -"use strict"; - - -mdMediaFactory.$inject = ["$mdConstant", "$rootScope", "$window"];angular.module('material.core') -.factory('$mdMedia', mdMediaFactory); - -/** - * @ngdoc service - * @name $mdMedia - * @module material.core - * - * @description - * `$mdMedia` is used to evaluate whether a given media query is true or false given the - * current device's screen / window size. The media query will be re-evaluated on resize, allowing - * you to register a watch. - * - * `$mdMedia` also has pre-programmed support for media queries that match the layout breakpoints: - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - *
    BreakpointmediaQuery
    xs(max-width: 599px)
    gt-xs(min-width: 600px)
    sm(min-width: 600px) and (max-width: 959px)
    gt-sm(min-width: 960px)
    md(min-width: 960px) and (max-width: 1279px)
    gt-md(min-width: 1280px)
    lg(min-width: 1280px) and (max-width: 1919px)
    gt-lg(min-width: 1920px)
    xl(min-width: 1920px)
    landscapelandscape
    portraitportrait
    printprint
    - * - * See Material Design's Layout - Adaptive UI for more details. - * - * - * - * - * - * @returns {boolean} a boolean representing whether or not the given media query is true or false. - * - * @usage - * - * app.controller('MyController', function($mdMedia, $scope) { - * $scope.$watch(function() { return $mdMedia('lg'); }, function(big) { - * $scope.bigScreen = big; - * }); - * - * $scope.screenIsSmall = $mdMedia('sm'); - * $scope.customQuery = $mdMedia('(min-width: 1234px)'); - * $scope.anotherCustom = $mdMedia('max-width: 300px'); - * }); - * - */ - -/* @ngInject */ -function mdMediaFactory($mdConstant, $rootScope, $window) { - var queries = {}; - var mqls = {}; - var results = {}; - var normalizeCache = {}; - - $mdMedia.getResponsiveAttribute = getResponsiveAttribute; - $mdMedia.getQuery = getQuery; - $mdMedia.watchResponsiveAttributes = watchResponsiveAttributes; - - return $mdMedia; - - function $mdMedia(query) { - var validated = queries[query]; - if (angular.isUndefined(validated)) { - validated = queries[query] = validate(query); - } - - var result = results[validated]; - if (angular.isUndefined(result)) { - result = add(validated); - } - - return result; - } - - function validate(query) { - return $mdConstant.MEDIA[query] || - ((query.charAt(0) !== '(') ? ('(' + query + ')') : query); - } - - function add(query) { - var result = mqls[query]; - if (!result) { - result = mqls[query] = $window.matchMedia(query); - } - - result.addListener(onQueryChange); - return (results[result.media] = !!result.matches); - } - - function onQueryChange(query) { - $rootScope.$evalAsync(function() { - results[query.media] = !!query.matches; - }); - } - - function getQuery(name) { - return mqls[name]; - } - - function getResponsiveAttribute(attrs, attrName) { - for (var i = 0; i < $mdConstant.MEDIA_PRIORITY.length; i++) { - var mediaName = $mdConstant.MEDIA_PRIORITY[i]; - if (!mqls[queries[mediaName]].matches) { - continue; - } - - var normalizedName = getNormalizedName(attrs, attrName + '-' + mediaName); - if (attrs[normalizedName]) { - return attrs[normalizedName]; - } - } - - // fallback on unprefixed - return attrs[getNormalizedName(attrs, attrName)]; - } - - function watchResponsiveAttributes(attrNames, attrs, watchFn) { - var unwatchFns = []; - attrNames.forEach(function(attrName) { - var normalizedName = getNormalizedName(attrs, attrName); - if (angular.isDefined(attrs[normalizedName])) { - unwatchFns.push( - attrs.$observe(normalizedName, angular.bind(void 0, watchFn, null))); - } - - for (var mediaName in $mdConstant.MEDIA) { - normalizedName = getNormalizedName(attrs, attrName + '-' + mediaName); - if (angular.isDefined(attrs[normalizedName])) { - unwatchFns.push( - attrs.$observe(normalizedName, angular.bind(void 0, watchFn, mediaName))); - } - } - }); - - return function unwatch() { - unwatchFns.forEach(function(fn) { fn(); }); - }; - } - - // Improves performance dramatically - function getNormalizedName(attrs, attrName) { - return normalizeCache[attrName] || - (normalizeCache[attrName] = attrs.$normalize(attrName)); - } -} - -})(); -(function(){ -"use strict"; - -angular - .module('material.core') - .config(["$provide", function($provide) { - $provide.decorator('$mdUtil', ['$delegate', function ($delegate) { - - // Inject the prefixer into our original $mdUtil service. - $delegate.prefixer = MdPrefixer; - - return $delegate; - }]); - }]); - -/** - * @param {string|string[]} initialAttributes - * @param {boolean} buildSelector - * @return {string|string[]|{buildSelector: (function(string|string[]): string), - * buildList: (function(string|string[]): string[]), - * hasAttribute: (function(JQLite|Element, string): HTMLElement), - * removeAttribute: (function(JQLite|Element, string): void)}} - * @constructor - */ -function MdPrefixer(initialAttributes, buildSelector) { - var PREFIXES = ['data', 'x']; - - if (initialAttributes) { - // The prefixer also accepts attributes as a parameter, and immediately builds a list or selector for - // the specified attributes. - return buildSelector ? _buildSelector(initialAttributes) : _buildList(initialAttributes); - } - - return { - buildList: _buildList, - buildSelector: _buildSelector, - hasAttribute: _hasAttribute, - removeAttribute: _removeAttribute - }; - - function _buildList(attributes) { - attributes = angular.isArray(attributes) ? attributes : [attributes]; - - attributes.forEach(function(item) { - PREFIXES.forEach(function(prefix) { - attributes.push(prefix + '-' + item); - }); - }); - - return attributes; - } - - function _buildSelector(attributes) { - attributes = angular.isArray(attributes) ? attributes : [attributes]; - - return _buildList(attributes) - .map(function(item) { - return '[' + item + ']'; - }) - .join(','); - } - - function _hasAttribute(element, attribute) { - element = _getNativeElement(element); - - if (!element) { - return false; - } - - var prefixedAttrs = _buildList(attribute); - - for (var i = 0; i < prefixedAttrs.length; i++) { - if (element.hasAttribute(prefixedAttrs[i])) { - return true; - } - } - - return false; - } - - function _removeAttribute(element, attribute) { - element = _getNativeElement(element); - - if (!element) { - return; - } - - _buildList(attribute).forEach(function(prefixedAttribute) { - element.removeAttribute(prefixedAttribute); - }); - } - - /** - * Transforms a jqLite or DOM element into a HTML element. - * This is useful when supporting jqLite elements and DOM elements at - * same time. - * @param element {JQLite|Element} Element to be parsed - * @returns {HTMLElement} Parsed HTMLElement - */ - function _getNativeElement(element) { - element = element[0] || element; - - if (element.nodeType) { - return element; - } - } - -} - -})(); -(function(){ -"use strict"; - -/* - * This var has to be outside the angular factory, otherwise when - * there are multiple material apps on the same page, each app - * will create its own instance of this array and the app's IDs - * will not be unique. - */ -UtilFactory.$inject = ["$document", "$timeout", "$compile", "$rootScope", "$$mdAnimate", "$interpolate", "$log", "$rootElement", "$window", "$$rAF"]; -var nextUniqueId = 0, isIos, isAndroid, isFirefox; - -// Support material-tools builds. -if (window.navigator) { - var userAgent = window.navigator.userAgent || window.navigator.vendor || window.opera; - isIos = userAgent.match(/ipad|iphone|ipod/i); - isAndroid = userAgent.match(/android/i); - isFirefox = userAgent.match(/(firefox|minefield)/i); -} - -/** - * @ngdoc module - * @name material.core.util - * @description - * Util - */ -angular -.module('material.core') -.factory('$mdUtil', UtilFactory); - -/** - * @ngInject - */ -function UtilFactory($document, $timeout, $compile, $rootScope, $$mdAnimate, $interpolate, $log, - $rootElement, $window, $$rAF) { - // Setup some core variables for the processTemplate method - var startSymbol = $interpolate.startSymbol(), - endSymbol = $interpolate.endSymbol(), - usesStandardSymbols = ((startSymbol === '{{') && (endSymbol === '}}')); - - // Polyfill document.contains for IE11. - document.contains || (document.contains = function (node) { - return document.body.contains(node); - }); - - /** - * Checks if the target element has the requested style by key - * @param {DOMElement|JQLite} target Target element - * @param {string} key Style key - * @param {string=} expectedVal Optional expected value - * @returns {boolean} Whether the target element has the style or not - */ - var hasComputedStyle = function (target, key, expectedVal) { - var hasValue = false; - - if (target && target.length) { - var computedStyles = $window.getComputedStyle(target[0]); - hasValue = angular.isDefined(computedStyles[key]) && - (expectedVal ? computedStyles[key] == expectedVal : true); - } - - return hasValue; - }; - - function validateCssValue(value) { - return !value ? '0' : - hasPx(value) || hasPercent(value) ? value : value + 'px'; - } - - function hasPx(value) { - return String(value).indexOf('px') > -1; - } - - function hasPercent(value) { - return String(value).indexOf('%') > -1; - } - - var $mdUtil = { - dom: {}, - isIos: isIos, - isAndroid: isAndroid, - now: window.performance && window.performance.now ? - angular.bind(window.performance, window.performance.now) : Date.now || function() { - return new Date().getTime(); - }, - - /** - * Cross-version compatibility method to retrieve an option of a ngModel controller, - * which supports the breaking changes in the AngularJS snapshot (SHA 87a2ff76af5d0a9268d8eb84db5755077d27c84c). - * @param {!ngModel.NgModelController} ngModelCtrl - * @param {!string} optionName - * @returns {string|number|boolean|Object|undefined} - */ - getModelOption: function (ngModelCtrl, optionName) { - if (!ngModelCtrl.$options) { - return; - } - - var $options = ngModelCtrl.$options; - - // The newer versions of AngularJS introduced a getOption function and made the option values - // no longer visible on the $options object. - return $options.getOption ? $options.getOption(optionName) : $options[optionName]; - }, - - /** - * Determines the current 'dir'ectional value based on the value of 'dir' - * attribute of the element. If that is not defined, it will try to use - * a 'dir' attribute of the body or html tag. - * - * @param {Object=} attrs a hash object with key-value pairs of normalized - * attribute names and their corresponding attribute values. - * @returns {boolean} true if the element's passed in attributes, - * the document, or the body indicates RTL mode, false otherwise. - */ - isRtl: function(attrs) { - var dir = angular.isDefined(attrs) && attrs.hasOwnProperty('dir') && attrs.dir; - - switch (dir) { - case 'ltr': - return false; - - case 'rtl': - return true; - } - - return ($document[0].dir === 'rtl' || $document[0].body.dir === 'rtl'); - }, - - /** - * Bi-directional accessor/mutator used to easily update an element's - * property based on the current 'dir'ectional value. - */ - bidi: function(element, property, lValue, rValue) { - var ltr = !this.isRtl(); - - // If accessor - if (arguments.length == 0) return ltr ? 'ltr' : 'rtl'; - - // If mutator - var elem = angular.element(element); - - if (ltr && angular.isDefined(lValue)) { - elem.css(property, validateCssValue(lValue)); - } - else if (!ltr && angular.isDefined(rValue)) { - elem.css(property, validateCssValue(rValue)); - } - }, - - bidiProperty: function (element, lProperty, rProperty, value) { - var ltr = !this.isRtl(); - - var elem = angular.element(element); - - if (ltr && angular.isDefined(lProperty)) { - elem.css(lProperty, validateCssValue(value)); - elem.css(rProperty, ''); - } - else if (!ltr && angular.isDefined(rProperty)) { - elem.css(rProperty, validateCssValue(value)); - elem.css(lProperty, ''); - } - }, - - clientRect: function(element, offsetParent, isOffsetRect) { - var node = getNode(element); - offsetParent = getNode(offsetParent || node.offsetParent || document.body); - var nodeRect = node.getBoundingClientRect(); - - // The user can ask for an offsetRect: a rect relative to the offsetParent, - // or a clientRect: a rect relative to the page - var offsetRect = isOffsetRect ? - offsetParent.getBoundingClientRect() : - {left: 0, top: 0, width: 0, height: 0}; - return { - left: nodeRect.left - offsetRect.left, - top: nodeRect.top - offsetRect.top, - width: nodeRect.width, - height: nodeRect.height - }; - }, - offsetRect: function(element, offsetParent) { - return $mdUtil.clientRect(element, offsetParent, true); - }, - - /** - * Annoying method to copy nodes to an array, thanks to IE. - * @param nodes - * @return {Array} - */ - nodesToArray: function(nodes) { - var results = [], i; - nodes = nodes || []; - - for (i = 0; i < nodes.length; ++i) { - results.push(nodes.item(i)); - } - return results; - }, - - /** - * Determines the absolute position of the viewport. - * Useful when making client rectangles absolute. - * @returns {number} - */ - getViewportTop: function() { - // If body scrolling is disabled, then use the cached viewport top value, otherwise get it - // fresh from the $window. - if ($mdUtil.disableScrollAround._count && $mdUtil.disableScrollAround._viewPortTop) { - return $mdUtil.disableScrollAround._viewPortTop; - } else { - return $window.scrollY || $window.pageYOffset || 0; - } - }, - - /** - * Finds the proper focus target by searching the DOM. - * - * @param {!JQLite} containerEl - * @param {string=} attributeVal - * @returns {JQLite|undefined} - */ - findFocusTarget: function(containerEl, attributeVal) { - var AUTO_FOCUS = this.prefixer('md-autofocus', true); - var elToFocus; - - elToFocus = scanForFocusable(containerEl, attributeVal || AUTO_FOCUS); - - // Scan for fallback to 'universal' API - if (!elToFocus) { - elToFocus = scanForFocusable(containerEl, AUTO_FOCUS); - } - - return elToFocus; - - /** - * Can target and nested children for specified Selector (attribute) - * whose value may be an expression that evaluates to True/False. - * @param {!JQLite} target - * @param {!string} selector - * @return {JQLite|undefined} - */ - function scanForFocusable(target, selector) { - var elFound, items = target[0].querySelectorAll(selector); - - // Find the last child element with the focus attribute - if (items && items.length) { - items.length && angular.forEach(items, function(it) { - it = angular.element(it); - - // Check the element for the md-autofocus class to ensure any associated expression - // evaluated to true. - var isFocusable = it.hasClass('md-autofocus'); - if (isFocusable) elFound = it; - }); - } - return elFound; - } - }, - - /** - * Disables scroll around the passed parent element. - * @param {Element|JQLite=} element Origin Element (not used) - * @param {Element|JQLite=} parent Element to disable scrolling within. - * Defaults to body if none supplied. - * @param {Object=} options Object of options to modify functionality - * - disableScrollMask Boolean of whether or not to create a scroll mask element or - * use the passed parent element. - */ - disableScrollAround: function(element, parent, options) { - options = options || {}; - - $mdUtil.disableScrollAround._count = Math.max(0, $mdUtil.disableScrollAround._count || 0); - $mdUtil.disableScrollAround._count++; - - if ($mdUtil.disableScrollAround._restoreScroll) { - return $mdUtil.disableScrollAround._restoreScroll; - } - - var body = $document[0].body; - var restoreBody = disableBodyScroll(); - var restoreElement = disableElementScroll(parent, options); - - return $mdUtil.disableScrollAround._restoreScroll = function() { - if (--$mdUtil.disableScrollAround._count <= 0) { - delete $mdUtil.disableScrollAround._viewPortTop; - restoreBody(); - restoreElement(); - delete $mdUtil.disableScrollAround._restoreScroll; - } - }; - - /** - * Creates a virtual scrolling mask to prevent touchmove, keyboard, scrollbar clicking, - * and wheel events. - * @param {!Element|!JQLite} elementToDisable - * @param {Object=} scrollMaskOptions Object of options to modify functionality - * - disableScrollMask Boolean of whether or not to create a scroll mask element or - * use the passed parent element. - * @returns {Function} - */ - function disableElementScroll(elementToDisable, scrollMaskOptions) { - var scrollMask; - var wrappedElementToDisable = angular.element(elementToDisable || body); - - if (scrollMaskOptions.disableScrollMask) { - scrollMask = wrappedElementToDisable; - } else { - scrollMask = angular.element( - '
    ' + - '
    ' + - '
    '); - wrappedElementToDisable.append(scrollMask); - } - - /** - * @param {Event} $event - */ - function preventDefault($event) { - $event.preventDefault(); - } - - scrollMask.on('wheel touchmove', preventDefault); - - return function restoreElementScroll() { - scrollMask.off('wheel touchmove', preventDefault); - - if (!scrollMaskOptions.disableScrollMask && scrollMask[0].parentNode) { - scrollMask[0].parentNode.removeChild(scrollMask[0]); - } - }; - } - - // Converts the body to a position fixed block and translate it to the proper scroll position - function disableBodyScroll() { - var documentElement = $document[0].documentElement; - - var prevDocumentStyle = documentElement.style.cssText || ''; - var prevBodyStyle = body.style.cssText || ''; - - var viewportTop = $mdUtil.getViewportTop(); - $mdUtil.disableScrollAround._viewPortTop = viewportTop; - var clientWidth = body.clientWidth; - var hasVerticalScrollbar = body.scrollHeight > body.clientHeight + 1; - - // Scroll may be set on element (for example by overflow-y: scroll) - // but Chrome is reporting the scrollTop position always on . - // scrollElement will allow to restore the scrollTop position to proper target. - var scrollElement = documentElement.scrollTop > 0 ? documentElement : body; - - if (hasVerticalScrollbar) { - angular.element(body).css({ - position: 'fixed', - width: '100%', - top: -viewportTop + 'px' - }); - } - - if (body.clientWidth < clientWidth) { - body.style.overflow = 'hidden'; - } - - return function restoreScroll() { - // Reset the inline style CSS to the previous. - body.style.cssText = prevBodyStyle; - documentElement.style.cssText = prevDocumentStyle; - - // The scroll position while being fixed - scrollElement.scrollTop = viewportTop; - }; - } - - }, - - enableScrolling: function() { - var restoreFn = this.disableScrollAround._restoreScroll; - restoreFn && restoreFn(); - }, - - floatingScrollbars: function() { - if (this.floatingScrollbars.cached === undefined) { - var tempNode = angular.element('
    ').css({ - width: '100%', - 'z-index': -1, - position: 'absolute', - height: '35px', - 'overflow-y': 'scroll' - }); - tempNode.children().css('height', '60px'); - - $document[0].body.appendChild(tempNode[0]); - this.floatingScrollbars.cached = - (tempNode[0].offsetWidth === tempNode[0].childNodes[0].offsetWidth); - tempNode.remove(); - } - return this.floatingScrollbars.cached; - }, - - /** - * Mobile safari only allows you to set focus in click event listeners. - * @param {Element|JQLite} element to focus - */ - forceFocus: function(element) { - var node = element[0] || element; - - document.addEventListener('click', function focusOnClick(ev) { - if (ev.target === node && ev.$focus) { - node.focus(); - ev.stopImmediatePropagation(); - ev.preventDefault(); - node.removeEventListener('click', focusOnClick); - } - }, true); - - var newEvent = document.createEvent('MouseEvents'); - newEvent.initMouseEvent('click', false, true, window, {}, 0, 0, 0, 0, - false, false, false, false, 0, null); - newEvent.$material = true; - newEvent.$focus = true; - node.dispatchEvent(newEvent); - }, - - /** - * facade to build md-backdrop element with desired styles - * NOTE: Use $compile to trigger backdrop postLink function - */ - createBackdrop: function(scope, addClass) { - return $compile($mdUtil.supplant('', [addClass]))(scope); - }, - - /** - * supplant() method from Crockford's `Remedial Javascript` - * Equivalent to use of $interpolate; without dependency on - * interpolation symbols and scope. Note: the '{}' can - * be property names, property chains, or array indices. - */ - supplant: function(template, values, pattern) { - pattern = pattern || /\{([^{}]*)\}/g; - return template.replace(pattern, function(a, b) { - var p = b.split('.'), - r = values; - try { - for (var s in p) { - if (p.hasOwnProperty(s)) { - r = r[p[s]]; - } - } - } catch (e) { - r = a; - } - return (typeof r === 'string' || typeof r === 'number') ? r : a; - }); - }, - - fakeNgModel: function() { - return { - $fake: true, - $setTouched: angular.noop, - $setViewValue: function(value) { - this.$viewValue = value; - this.$render(value); - this.$viewChangeListeners.forEach(function(cb) { - cb(); - }); - }, - $isEmpty: function(value) { - return ('' + value).length === 0; - }, - $parsers: [], - $formatters: [], - $viewChangeListeners: [], - $render: angular.noop - }; - }, - - /** - * @param {Function} func original function to be debounced - * @param {number} wait number of milliseconds to delay (since last debounce reset). - * Default value 10 msecs. - * @param {Object} scope in which to apply the function after debouncing ends - * @param {boolean} invokeApply should the $timeout trigger $digest() dirty checking - * @return {Function} A function, that, as long as it continues to be invoked, will not be - * triggered. The function will be called after it stops being called for N milliseconds. - */ - debounce: function(func, wait, scope, invokeApply) { - var timer; - - return function debounced() { - var context = scope, - args = Array.prototype.slice.call(arguments); - - $timeout.cancel(timer); - timer = $timeout(function() { - - timer = undefined; - func.apply(context, args); - - }, wait || 10, invokeApply); - }; - }, - - /** - * The function will not be called unless it has been more than `delay` milliseconds since the - * last call. - * @param {Function} func original function to throttle - * @param {number} delay number of milliseconds to delay - * @return {Function} a function that can only be triggered every `delay` milliseconds. - */ - throttle: function throttle(func, delay) { - var recent; - return function throttled() { - var context = this; - var args = arguments; - var now = $mdUtil.now(); - - if (!recent || (now - recent > delay)) { - func.apply(context, args); - recent = now; - } - }; - }, - - /** - * Measures the number of milliseconds taken to run the provided callback - * function. Uses a high-precision timer if available. - */ - time: function time(cb) { - var start = $mdUtil.now(); - cb(); - return $mdUtil.now() - start; - }, - - /** - * Create an implicit getter that caches its `getter()` - * lookup value - */ - valueOnUse : function (scope, key, getter) { - var value = null, args = Array.prototype.slice.call(arguments); - var params = (args.length > 3) ? args.slice(3) : []; - - Object.defineProperty(scope, key, { - get: function () { - if (value === null) value = getter.apply(scope, params); - return value; - } - }); - }, - - /** - * Get a unique ID. - * - * @returns {string} an unique numeric string - */ - nextUid: function() { - return '' + nextUniqueId++; - }, - - /** - * Stop watchers and events from firing on a scope without destroying it, - * by disconnecting it from its parent and its siblings' linked lists. - * @param {Object} scope to disconnect - */ - disconnectScope: function disconnectScope(scope) { - if (!scope) return; - - // we can't destroy the root scope or a scope that has been already destroyed - if (scope.$root === scope) return; - if (scope.$$destroyed) return; - - var parent = scope.$parent; - scope.$$disconnected = true; - - // See Scope.$destroy - if (parent.$$childHead === scope) parent.$$childHead = scope.$$nextSibling; - if (parent.$$childTail === scope) parent.$$childTail = scope.$$prevSibling; - if (scope.$$prevSibling) scope.$$prevSibling.$$nextSibling = scope.$$nextSibling; - if (scope.$$nextSibling) scope.$$nextSibling.$$prevSibling = scope.$$prevSibling; - - scope.$$nextSibling = scope.$$prevSibling = null; - - }, - - /** - * Undo the effects of disconnectScope(). - * @param {Object} scope to reconnect - */ - reconnectScope: function reconnectScope(scope) { - if (!scope) return; - - // we can't disconnect the root node or scope already disconnected - if (scope.$root === scope) return; - if (!scope.$$disconnected) return; - - var child = scope; - - var parent = child.$parent; - child.$$disconnected = false; - // See Scope.$new for this logic... - child.$$prevSibling = parent.$$childTail; - if (parent.$$childHead) { - parent.$$childTail.$$nextSibling = child; - parent.$$childTail = child; - } else { - parent.$$childHead = parent.$$childTail = child; - } - }, - - /** - * Get an element's siblings matching a given tag name. - * - * @param {JQLite|angular.element|HTMLElement} element Element to start walking the DOM from - * @param {string} tagName HTML tag name to match against - * @returns {Object[]} JQLite - */ - getSiblings: function getSiblings(element, tagName) { - var upperCasedTagName = tagName.toUpperCase(); - if (element instanceof angular.element) { - element = element[0]; - } - var siblings = Array.prototype.filter.call(element.parentNode.children, function(node) { - return element !== node && node.tagName.toUpperCase() === upperCasedTagName; - }); - return siblings.map(function (sibling) { - return angular.element(sibling); - }); - }, - - /** - * getClosest replicates jQuery.closest() to walk up the DOM tree until it finds a matching - * nodeName. - * - * @param {Node} el Element to start walking the DOM from - * @param {string|function} validateWith If a string is passed, it will be evaluated against - * each of the parent nodes' tag name. If a function is passed, the loop will call it with each - * of the parents and will use the return value to determine whether the node is a match. - * @param {boolean=} onlyParent Only start checking from the parent element, not `el`. - * @returns {Node|null} closest matching parent Node or null if not found - */ - getClosest: function getClosest(el, validateWith, onlyParent) { - if (angular.isString(validateWith)) { - var tagName = validateWith.toUpperCase(); - validateWith = function(el) { - return el.nodeName.toUpperCase() === tagName; - }; - } - - if (el instanceof angular.element) el = el[0]; - if (onlyParent) el = el.parentNode; - if (!el) return null; - - do { - if (validateWith(el)) { - return el; - } - } while (el = el.parentNode); - - return null; - }, - - /** - * Build polyfill for the Node.contains feature (if needed) - * @param {Node} node - * @param {Node} child - * @returns {Node} - */ - elementContains: function(node, child) { - var hasContains = (window.Node && window.Node.prototype && Node.prototype.contains); - var findFn = hasContains ? angular.bind(node, node.contains) : angular.bind(node, function(arg) { - // compares the positions of two nodes and returns a bitmask - return (node === child) || !!(this.compareDocumentPosition(arg) & 16); - }); - - return findFn(child); - }, - - /** - * Functional equivalent for $element.filter(‘md-bottom-sheet’) - * useful with interimElements where the element and its container are important... - * - * @param {JQLite} element to scan - * @param {string} nodeName of node to find (e.g. 'md-dialog') - * @param {boolean=} scanDeep optional flag to allow deep scans; defaults to 'false'. - * @param {boolean=} warnNotFound optional flag to enable log warnings; defaults to false - */ - extractElementByName: function(element, nodeName, scanDeep, warnNotFound) { - var found = scanTree(element); - if (!found && !!warnNotFound) { - $log.warn($mdUtil.supplant("Unable to find node '{0}' in element '{1}'.",[nodeName, element[0].outerHTML])); - } - - return angular.element(found || element); - - /** - * Breadth-First tree scan for element with matching `nodeName` - */ - function scanTree(element) { - return scanLevel(element) || (scanDeep ? scanChildren(element) : null); - } - - /** - * Case-insensitive scan of current elements only (do not descend). - */ - function scanLevel(element) { - if (element) { - for (var i = 0, len = element.length; i < len; i++) { - if (element[i].nodeName.toLowerCase() === nodeName) { - return element[i]; - } - } - } - return null; - } - - /** - * Scan children of specified node - */ - function scanChildren(element) { - var found; - if (element) { - for (var i = 0, len = element.length; i < len; i++) { - var target = element[i]; - if (!found) { - for (var j = 0, numChild = target.childNodes.length; j < numChild; j++) { - found = found || scanTree([target.childNodes[j]]); - } - } - } - } - return found; - } - - }, - - /** - * Give optional properties with no value a boolean true if attr provided or false otherwise - */ - initOptionalProperties: function(scope, attr, defaults) { - defaults = defaults || {}; - angular.forEach(scope.$$isolateBindings, function(binding, key) { - if (binding.optional && angular.isUndefined(scope[key])) { - var attrIsDefined = angular.isDefined(attr[binding.attrName]); - scope[key] = angular.isDefined(defaults[key]) ? defaults[key] : attrIsDefined; - } - }); - }, - - /** - * Alternative to $timeout calls with 0 delay. - * nextTick() coalesces all calls within a single frame - * to minimize $digest thrashing - * - * @param {Function} callback function to be called after the tick - * @param {boolean=} digest true to call $rootScope.$digest() after callback - * @param {Object=} scope associated with callback. If the scope is destroyed, the callback will - * be skipped. - * @returns {*} - */ - nextTick: function(callback, digest, scope) { - // grab function reference for storing state details - var nextTick = $mdUtil.nextTick; - var timeout = nextTick.timeout; - var queue = nextTick.queue || []; - - // add callback to the queue - queue.push({scope: scope, callback: callback}); - - // set default value for digest - if (digest == null) digest = true; - - // store updated digest/queue values - nextTick.digest = nextTick.digest || digest; - nextTick.queue = queue; - - // either return existing timeout or create a new one - return timeout || (nextTick.timeout = $timeout(processQueue, 0, false)); - - /** - * Grab a copy of the current queue - * Clear the queue for future use - * Process the existing queue - * Trigger digest if necessary - */ - function processQueue() { - var queue = nextTick.queue; - var digest = nextTick.digest; - - nextTick.queue = []; - nextTick.timeout = null; - nextTick.digest = false; - - queue.forEach(function(queueItem) { - var skip = queueItem.scope && queueItem.scope.$$destroyed; - if (!skip) { - queueItem.callback(); - } - }); - - if (digest) $rootScope.$digest(); - } - }, - - /** - * Processes a template and replaces the start/end symbols if the application has - * overridden them. - * - * @param template The template to process whose start/end tags may be replaced. - * @returns {*} - */ - processTemplate: function(template) { - if (usesStandardSymbols) { - return template; - } else { - if (!template || !angular.isString(template)) return template; - return template.replace(/\{\{/g, startSymbol).replace(/}}/g, endSymbol); - } - }, - - /** - * Scan up dom hierarchy for enabled parent; - */ - getParentWithPointerEvents: function (element) { - var parent = element.parent(); - - // jqLite might return a non-null, but still empty, parent; so check for parent and length - while (hasComputedStyle(parent, 'pointer-events', 'none')) { - parent = parent.parent(); - } - - return parent; - }, - - getNearestContentElement: function (element) { - var current = element.parent()[0]; - // Look for the nearest parent md-content, stopping at the rootElement. - while (current && current !== $rootElement[0] && current !== document.body && current.nodeName.toUpperCase() !== 'MD-CONTENT') { - current = current.parentNode; - } - return current; - }, - - /** - * Checks if the current browser is natively supporting the `sticky` position. - * @returns {string} supported sticky property name - */ - checkStickySupport: function() { - var stickyProp; - var testEl = angular.element('
    '); - $document[0].body.appendChild(testEl[0]); - - var stickyProps = ['sticky', '-webkit-sticky']; - for (var i = 0; i < stickyProps.length; ++i) { - testEl.css({ - position: stickyProps[i], - top: 0, - 'z-index': 2 - }); - - if (testEl.css('position') == stickyProps[i]) { - stickyProp = stickyProps[i]; - break; - } - } - - testEl.remove(); - - return stickyProp; - }, - - /** - * Parses an attribute value, mostly a string. - * By default checks for negated values and returns `false´ if present. - * Negated values are: (native falsy) and negative strings like: - * `false` or `0`. - * @param value Attribute value which should be parsed. - * @param negatedCheck When set to false, won't check for negated values. - * @returns {boolean} - */ - parseAttributeBoolean: function(value, negatedCheck) { - return value === '' || !!value && (negatedCheck === false || value !== 'false' && value !== '0'); - }, - - hasComputedStyle: hasComputedStyle, - - /** - * Returns true if the parent form of the element has been submitted. - * @param element An AngularJS or HTML5 element. - * @returns {boolean} - */ - isParentFormSubmitted: function(element) { - var parent = $mdUtil.getClosest(element, 'form'); - var form = parent ? angular.element(parent).controller('form') : null; - - return form ? form.$submitted : false; - }, - - /** - * Animate the requested element's scrollTop to the requested scrollPosition with basic easing. - * @param {!Element} element The element to scroll. - * @param {number} scrollEnd The new/final scroll position. - * @param {number=} duration Duration of the scroll. Default is 1000ms. - */ - animateScrollTo: function(element, scrollEnd, duration) { - var scrollStart = element.scrollTop; - var scrollChange = scrollEnd - scrollStart; - var scrollingDown = scrollStart < scrollEnd; - var startTime = $mdUtil.now(); - - $$rAF(scrollChunk); - - function scrollChunk() { - var newPosition = calculateNewPosition(); - - element.scrollTop = newPosition; - - if (scrollingDown ? newPosition < scrollEnd : newPosition > scrollEnd) { - $$rAF(scrollChunk); - } - } - - function calculateNewPosition() { - var easeDuration = duration || 1000; - var currentTime = $mdUtil.now() - startTime; - - return ease(currentTime, scrollStart, scrollChange, easeDuration); - } - - function ease(currentTime, start, change, duration) { - // If the duration has passed (which can occur if our app loses focus due to $$rAF), jump - // straight to the proper position - if (currentTime > duration) { - return start + change; - } - - var ts = (currentTime /= duration) * currentTime; - var tc = ts * currentTime; - - return start + change * (-2 * tc + 3 * ts); - } - }, - - /** - * Provides an easy mechanism for removing duplicates from an array. - * - * var myArray = [1, 2, 2, 3, 3, 3, 4, 4, 4, 4]; - * - * $mdUtil.uniq(myArray) => [1, 2, 3, 4] - * - * @param {Array} array The array whose unique values should be returned. - * @returns {Array|void} A copy of the array containing only unique values. - */ - uniq: function(array) { - if (!array) { return; } - - return array.filter(function(value, index, self) { - return self.indexOf(value) === index; - }); - }, - - /** - * Gets the inner HTML content of the given HTMLElement. - * Only intended for use with SVG or Symbol elements in IE11. - * @param {Element} element - * @returns {string} the inner HTML of the element passed in - */ - getInnerHTML: function(element) { - // For SVG or Symbol elements, innerHTML returns `undefined` in IE. - // Reference: https://stackoverflow.com/q/28129956/633107 - // The XMLSerializer API is supported on IE11 and is the recommended workaround. - var serializer = new XMLSerializer(); - - return Array.prototype.map.call(element.childNodes, function (child) { - return serializer.serializeToString(child); - }).join(''); - }, - - /** - * Gets the outer HTML content of the given HTMLElement. - * Only intended for use with SVG or Symbol elements in IE11. - * @param {Element} element - * @returns {string} the outer HTML of the element passed in - */ - getOuterHTML: function(element) { - // For SVG or Symbol elements, outerHTML returns `undefined` in IE. - // Reference: https://stackoverflow.com/q/29888050/633107 - // The XMLSerializer API is supported on IE11 and is the recommended workaround. - var serializer = new XMLSerializer(); - return serializer.serializeToString(element); - }, - - /** - * Support: IE 9-11 only - * documentMode is an IE-only property - * http://msdn.microsoft.com/en-us/library/ie/cc196988(v=vs.85).aspx - */ - msie: window.document.documentMode, - - getTouchAction: function() { - var testEl = document.createElement('div'); - var vendorPrefixes = ['', 'webkit', 'Moz', 'MS', 'ms', 'o']; - - for (var i = 0; i < vendorPrefixes.length; i++) { - var prefix = vendorPrefixes[i]; - var property = prefix ? prefix + 'TouchAction' : 'touchAction'; - if (angular.isDefined(testEl.style[property])) { - return property; - } - } - }, - - /** - * @param {Event} event the event to calculate the bubble path for - * @return {EventTarget[]} the set of nodes that this event could bubble up to - */ - getEventPath: function(event) { - var path = []; - var currentTarget = event.target; - while (currentTarget) { - path.push(currentTarget); - currentTarget = currentTarget.parentElement; - } - if (path.indexOf(window) === -1 && path.indexOf(document) === -1) - path.push(document); - if (path.indexOf(window) === -1) - path.push(window); - return path; - }, - - /** - * Gets the string the user has entered and removes Regex identifiers - * @param {string} term - * @returns {string} sanitized string - */ - sanitize: function(term) { - if (!term) return term; - return term.replace(/[\\^$*+?.()|{}[]/g, '\\$&'); - }, - - /********************************************************************************************** - * The following functions were sourced from - * https://github.com/angular/components/blob/3c37e4b1c1cb74a3d0a90d173240fc730d21d9d4/src/cdk/a11y/interactivity-checker/interactivity-checker.ts - **********************************************************************************************/ - - /** - * Gets whether an element is disabled. - * @param {HTMLElement} element Element to be checked. - * @returns {boolean} Whether the element is disabled. - */ - isDisabled: function(element) { - // This does not capture some cases, such as a non-form control with a disabled attribute or - // a form control inside of a disabled form, but should capture the most common cases. - return element.hasAttribute('disabled'); - }, - - /** - * Gets whether an element is visible for the purposes of interactivity. - * - * This will capture states like `display: none` and `visibility: hidden`, but not things like - * being clipped by an `overflow: hidden` parent or being outside the viewport. - * - * @param {HTMLElement} element - * @returns {boolean} Whether the element is visible. - */ - isVisible: function(element) { - return $mdUtil.hasGeometry(element) && getComputedStyle(element).visibility === 'visible'; - }, - - /** - * Gets whether an element can be reached via Tab key. - * Assumes that the element has already been checked with isFocusable. - * @param {HTMLElement} element Element to be checked. - * @returns {boolean} Whether the element is tabbable. - */ - isTabbable: function(element) { - var frameElement = $mdUtil.getFrameElement($mdUtil.getWindow(element)); - - if (frameElement) { - // Frame elements inherit their tabindex onto all child elements. - if ($mdUtil.getTabIndexValue(frameElement) === -1) { - return false; - } - - // Browsers disable tabbing to an element inside of an invisible frame. - if (!$mdUtil.isVisible(frameElement)) { - return false; - } - } - - var nodeName = element.nodeName.toLowerCase(); - var tabIndexValue = $mdUtil.getTabIndexValue(element); - - if (element.hasAttribute('contenteditable')) { - return tabIndexValue !== -1; - } - - if (nodeName === 'iframe' || nodeName === 'object') { - // The frame or object's content may be tabbable depending on the content, but it's - // not possibly to reliably detect the content of the frames. We always consider such - // elements as non-tabbable. - return false; - } - - // In iOS, the browser only considers some specific elements as tabbable. - if (isIos && !$mdUtil.isPotentiallyTabbableIOS(element)) { - return false; - } - - if (nodeName === 'audio') { - // Audio elements without controls enabled are never tabbable, regardless - // of the tabindex attribute explicitly being set. - if (!element.hasAttribute('controls')) { - return false; - } - // Audio elements with controls are by default tabbable unless the - // tabindex attribute is set to `-1` explicitly. - return tabIndexValue !== -1; - } - - if (nodeName === 'video') { - // For all video elements, if the tabindex attribute is set to `-1`, the video - // is not tabbable. Note: We cannot rely on the default `HTMLElement.tabIndex` - // property as that one is set to `-1` in Chrome, Edge and Safari v13.1. The - // tabindex attribute is the source of truth here. - if (tabIndexValue === -1) { - return false; - } - // If the tabindex is explicitly set, and not `-1` (as per check before), the - // video element is always tabbable (regardless of whether it has controls or not). - if (tabIndexValue !== null) { - return true; - } - // Otherwise (when no explicit tabindex is set), a video is only tabbable if it - // has controls enabled. Firefox is special as videos are always tabbable regardless - // of whether there are controls or not. - return isFirefox || element.hasAttribute('controls'); - } - - return element.tabIndex >= 0; - }, - - /** - * Gets whether an element can be focused by the user. - * @param {HTMLElement} element Element to be checked. - * @returns {boolean} Whether the element is focusable. - */ - isFocusable: function(element) { - // Perform checks in order of left to most expensive. - // Again, naive approach that does not capture many edge cases and browser quirks. - return $mdUtil.isPotentiallyFocusable(element) && !$mdUtil.isDisabled(element) && - $mdUtil.isVisible(element); - }, - - /** - * Gets whether an element is potentially focusable without taking current visible/disabled - * state into account. - * @param {HTMLElement} element - * @returns {boolean} - */ - isPotentiallyFocusable: function(element) { - // Inputs are potentially focusable *unless* they're type="hidden". - if ($mdUtil.isHiddenInput(element)) { - return false; - } - - return $mdUtil.isNativeFormElement(element) || - $mdUtil.isAnchorWithHref(element) || - element.hasAttribute('contenteditable') || - $mdUtil.hasValidTabIndex(element); - }, - - /** - * Checks whether the specified element is potentially tabbable on iOS. - * @param {HTMLElement} element - * @returns {boolean} - */ - isPotentiallyTabbableIOS: function(element) { - var nodeName = element.nodeName.toLowerCase(); - var inputType = nodeName === 'input' && element.type; - - return inputType === 'text' - || inputType === 'password' - || nodeName === 'select' - || nodeName === 'textarea'; - }, - - /** - * Returns the parsed tabindex from the element attributes instead of returning the - * evaluated tabindex from the browsers defaults. - * @param {HTMLElement} element - * @returns {null|number} - */ - getTabIndexValue: function(element) { - if (!$mdUtil.hasValidTabIndex(element)) { - return null; - } - - // See browser issue in Gecko https://bugzilla.mozilla.org/show_bug.cgi?id=1128054 - var tabIndex = parseInt(element.getAttribute('tabindex') || '', 10); - - return isNaN(tabIndex) ? -1 : tabIndex; - }, - - /** - * Gets whether an element has a valid tabindex. - * @param {HTMLElement} element - * @returns {boolean} - */ - hasValidTabIndex: function(element) { - if (!element.hasAttribute('tabindex') || element.tabIndex === undefined) { - return false; - } - - var tabIndex = element.getAttribute('tabindex'); - - // IE11 parses tabindex="" as the value "-32768" - if (tabIndex == '-32768') { - return false; - } - - return !!(tabIndex && !isNaN(parseInt(tabIndex, 10))); - }, - - /** - * Checks whether the specified element has any geometry / rectangles. - * @param {HTMLElement} element - * @returns {boolean} - */ - hasGeometry: function(element) { - // Use logic from jQuery to check for an invisible element. - // See https://github.com/jquery/jquery/blob/8969732518470a7f8e654d5bc5be0b0076cb0b87/src/css/hiddenVisibleSelectors.js#L9 - return !!(element.offsetWidth || element.offsetHeight || - (typeof element.getClientRects === 'function' && element.getClientRects().length)); - }, - - /** - * Returns the frame element from a window object. Since browsers like MS Edge throw errors if - * the frameElement property is being accessed from a different host address, this property - * should be accessed carefully. - * @param {Window} window - * @returns {null|HTMLElement} - */ - getFrameElement: function(window) { - try { - return window.frameElement; - } catch (error) { - return null; - } - }, - - /** - * Gets the parent window of a DOM node with regards of being inside of an iframe. - * @param {HTMLElement} node - * @returns {Window} - */ - getWindow: function(node) { - // ownerDocument is null if `node` itself *is* a document. - return node.ownerDocument && node.ownerDocument.defaultView || window; - }, - - /** - * Gets whether an element's - * @param {Node} element - * @returns {boolean} - */ - isNativeFormElement: function(element) { - var nodeName = element.nodeName.toLowerCase(); - return nodeName === 'input' || - nodeName === 'select' || - nodeName === 'button' || - nodeName === 'textarea'; - }, - - /** - * Gets whether an element is an ``. - * @param {HTMLElement} element - * @returns {boolean} - */ - isHiddenInput: function(element) { - return $mdUtil.isInputElement(element) && element.type == 'hidden'; - }, - - /** - * Gets whether an element is an anchor that has an href attribute. - * @param {HTMLElement} element - * @returns {boolean} - */ - isAnchorWithHref: function(element) { - return $mdUtil.isAnchorElement(element) && element.hasAttribute('href'); - }, - - /** - * Gets whether an element is an input element. - * @param {HTMLElement} element - * @returns {boolean} - */ - isInputElement: function(element) { - return element.nodeName.toLowerCase() == 'input'; - }, - - /** - * Gets whether an element is an anchor element. - * @param {HTMLElement} element - * @returns {boolean} - */ - isAnchorElement: function(element) { - return element.nodeName.toLowerCase() == 'a'; - }, - - /********************************************************************************************** - * The following two functions were sourced from - * https://github.com/angular/components/blob/3c37e4b1c1cb74a3d0a90d173240fc730d21d9d4/src/cdk/a11y/focus-trap/focus-trap.ts#L268-L311 - **********************************************************************************************/ - - /** - * Get the first tabbable element from a DOM subtree (inclusive). - * @param {HTMLElement} root - * @returns {HTMLElement|null} - */ - getFirstTabbableElement: function(root) { - if ($mdUtil.isFocusable(root) && $mdUtil.isTabbable(root)) { - return root; - } - - // Iterate in DOM order. Note that IE doesn't have `children` for SVG so we fall - // back to `childNodes` which includes text nodes, comments etc. - var children = root.children || root.childNodes; - - for (var i = 0; i < children.length; i++) { - var tabbableChild = children[i].nodeType === $document[0].ELEMENT_NODE ? - $mdUtil.getFirstTabbableElement(children[i]) : null; - - if (tabbableChild) { - return tabbableChild; - } - } - - return null; - }, - - /** - * Get the last tabbable element from a DOM subtree (inclusive). - * @param {HTMLElement} root - * @returns {HTMLElement|null} - */ - getLastTabbableElement: function(root) { - if ($mdUtil.isFocusable(root) && $mdUtil.isTabbable(root)) { - return root; - } - - // Iterate in reverse DOM order. - var children = root.children || root.childNodes; - - for (var i = children.length - 1; i >= 0; i--) { - var tabbableChild = children[i].nodeType === $document[0].ELEMENT_NODE ? - $mdUtil.getLastTabbableElement(children[i]) : null; - - if (tabbableChild) { - return tabbableChild; - } - } - - return null; - } - }; - - // Instantiate other namespace utility methods - - $mdUtil.dom.animator = $$mdAnimate($mdUtil); - - return $mdUtil; - - function getNode(el) { - return el[0] || el; - } -} - -/** - * Since removing jQuery from the demos, some code that uses `element.focus()` is broken. - * We need to add `element.focus()`, because it's testable unlike `element[0].focus`. - */ -angular.element.prototype.focus = angular.element.prototype.focus || function() { - if (this.length) { - this[0].focus(); - } - return this; -}; - -angular.element.prototype.blur = angular.element.prototype.blur || function() { - if (this.length) { - this[0].blur(); - } - return this; -}; - -})(); -(function(){ -"use strict"; - -// Polyfill angular < 1.4 (provide $animateCss) -angular - .module('material.core') - .factory('$$mdAnimate', ["$q", "$timeout", "$mdConstant", "$animateCss", function($q, $timeout, $mdConstant, $animateCss) { - // Since $$mdAnimate is injected into $mdUtil... use a wrapper function - // to subsequently inject $mdUtil as an argument to the AnimateDomUtils - return function($mdUtil) { - return AnimateDomUtils($mdUtil, $q, $timeout, $mdConstant, $animateCss); - }; - }]); - -/** - * Factory function that requires special injections - */ -function AnimateDomUtils($mdUtil, $q, $timeout, $mdConstant, $animateCss) { - var self; - return self = { - translate3d : function(target, from, to, options) { - return $animateCss(target, { - from: from, - to: to, - addClass: options.transitionInClass, - removeClass: options.transitionOutClass, - duration: options.duration - }) - .start() - .then(function() { - // Resolve with reverser function... - return reverseTranslate; - }); - - /** - * Specific reversal of the request translate animation above... - */ - function reverseTranslate (newFrom) { - return $animateCss(target, { - to: newFrom || from, - addClass: options.transitionOutClass, - removeClass: options.transitionInClass, - duration: options.duration - }).start(); - } - }, - - /** - * Listen for transitionEnd event (with optional timeout) - * Announce completion or failure via promise handlers - */ - waitTransitionEnd: function (element, opts) { - var TIMEOUT = 3000; // fallback is 3 secs - - return $q(function(resolve, reject){ - opts = opts || { }; - - // If there is no transition is found, resolve immediately - // - // NOTE: using $mdUtil.nextTick() causes delays/issues - if (noTransitionFound(opts.cachedTransitionStyles)) { - TIMEOUT = 0; - } - - var timer = $timeout(finished, opts.timeout || TIMEOUT); - element.on($mdConstant.CSS.TRANSITIONEND, finished); - - /** - * Upon timeout or transitionEnd, reject or resolve (respectively) this promise. - * NOTE: Make sure this transitionEnd didn't bubble up from a child - */ - function finished(ev) { - if (ev && ev.target !== element[0]) return; - - if (ev) $timeout.cancel(timer); - element.off($mdConstant.CSS.TRANSITIONEND, finished); - - // Never reject since ngAnimate may cause timeouts due missed transitionEnd events - resolve(); - } - - /** - * Checks whether or not there is a transition. - * - * @param styles The cached styles to use for the calculation. If null, getComputedStyle() - * will be used. - * - * @returns {boolean} True if there is no transition/duration; false otherwise. - */ - function noTransitionFound(styles) { - styles = styles || window.getComputedStyle(element[0]); - - return styles.transitionDuration === '0s' || - (!styles.transition && !styles.transitionProperty); - } - }); - }, - - calculateTransformValues: function (element, originator) { - var origin = originator.element; - var bounds = originator.bounds; - - if (origin || bounds) { - var originBnds = origin ? self.clientRect(origin) || currentBounds() : self.copyRect(bounds); - var dialogRect = self.copyRect(element[0].getBoundingClientRect()); - var dialogCenterPt = self.centerPointFor(dialogRect); - var originCenterPt = self.centerPointFor(originBnds); - - return { - centerX: originCenterPt.x - dialogCenterPt.x, - centerY: originCenterPt.y - dialogCenterPt.y, - scaleX: Math.round(100 * Math.min(0.5, originBnds.width / dialogRect.width)) / 100, - scaleY: Math.round(100 * Math.min(0.5, originBnds.height / dialogRect.height)) / 100 - }; - } - return {centerX: 0, centerY: 0, scaleX: 0.5, scaleY: 0.5}; - - /** - * This is a fallback if the origin information is no longer valid, then the - * origin bounds simply becomes the current bounds for the dialogContainer's parent. - * @returns {null|DOMRect} - */ - function currentBounds() { - var container = element ? element.parent() : null; - var parent = container ? container.parent() : null; - - return parent ? self.clientRect(parent) : null; - } - }, - - /** - * Calculate the zoom transform from dialog to origin. - * - * We use this to set the dialog position immediately; - * then the md-transition-in actually translates back to - * `translate3d(0,0,0) scale(1.0)`... - * - * NOTE: all values are rounded to the nearest integer - */ - calculateZoomToOrigin: function (element, originator) { - var zoomTemplate = "translate3d( {centerX}px, {centerY}px, 0 ) scale( {scaleX}, {scaleY} )"; - var buildZoom = angular.bind(null, $mdUtil.supplant, zoomTemplate); - - return buildZoom(self.calculateTransformValues(element, originator)); - }, - - /** - * Calculate the slide transform from panel to origin. - * NOTE: all values are rounded to the nearest integer - */ - calculateSlideToOrigin: function (element, originator) { - var slideTemplate = "translate3d( {centerX}px, {centerY}px, 0 )"; - var buildSlide = angular.bind(null, $mdUtil.supplant, slideTemplate); - - return buildSlide(self.calculateTransformValues(element, originator)); - }, - - /** - * Enhance raw values to represent valid css stylings... - */ - toCss : function(raw) { - var css = { }; - var lookups = 'left top right bottom width height x y min-width min-height max-width max-height'; - - angular.forEach(raw, function(value,key) { - if (angular.isUndefined(value)) return; - - if (lookups.indexOf(key) >= 0) { - css[key] = value + 'px'; - } else { - switch (key) { - case 'transition': - convertToVendor(key, $mdConstant.CSS.TRANSITION, value); - break; - case 'transform': - convertToVendor(key, $mdConstant.CSS.TRANSFORM, value); - break; - case 'transformOrigin': - convertToVendor(key, $mdConstant.CSS.TRANSFORM_ORIGIN, value); - break; - case 'font-size': - css['font-size'] = value; // font sizes aren't always in px - break; - } - } - }); - - return css; - - function convertToVendor(key, vendor, value) { - angular.forEach(vendor.split(' '), function (key) { - css[key] = value; - }); - } - }, - - /** - * Convert the translate CSS value to key/value pair(s). - * @param {string} transform - * @param {boolean=} addTransition - * @param {string=} transition - * @return {Object} object containing CSS translate key/value pair(s) - */ - toTransformCss: function (transform, addTransition, transition) { - var css = {}; - angular.forEach($mdConstant.CSS.TRANSFORM.split(' '), function (key) { - css[key] = transform; - }); - - if (addTransition) { - transition = transition || "all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1) !important"; - css.transition = transition; - } - - return css; - }, - - /** - * Clone the Rect and calculate the height/width if needed. - * @param {DOMRect} source - * @param {DOMRect=} destination - * @returns {null|DOMRect} - */ - copyRect: function (source, destination) { - if (!source) return null; - - destination = destination || {}; - - angular.forEach('left top right bottom width height'.split(' '), function (key) { - destination[key] = Math.round(source[key]); - }); - - destination.width = destination.width || (destination.right - destination.left); - destination.height = destination.height || (destination.bottom - destination.top); - - return destination; - }, - - /** - * Calculate ClientRect of element; return null if hidden or zero size. - * @param {Element|string} element - * @returns {null|DOMRect} - */ - clientRect: function (element) { - var bounds = angular.element(element)[0].getBoundingClientRect(); - var isPositiveSizeClientRect = function (rect) { - return rect && (rect.width > 0) && (rect.height > 0); - }; - - // If the event origin element has zero size, it has probably been hidden. - return isPositiveSizeClientRect(bounds) ? self.copyRect(bounds) : null; - }, - - /** - * Calculate 'rounded' center point of Rect - * @param {DOMRect} targetRect - * @returns {{x: number, y: number}} - */ - centerPointFor: function (targetRect) { - return targetRect ? { - x: Math.round(targetRect.left + (targetRect.width / 2)), - y: Math.round(targetRect.top + (targetRect.height / 2)) - } : { x : 0, y : 0 }; - } - }; -} - - -})(); -(function(){ -"use strict"; - -if (angular.version.minor >= 4) { - angular.module('material.core.animate', []); -} else { -(function() { - "use strict"; - - var forEach = angular.forEach; - - var WEBKIT = angular.isDefined(document.documentElement.style.WebkitAppearance); - var TRANSITION_PROP = WEBKIT ? 'WebkitTransition' : 'transition'; - var ANIMATION_PROP = WEBKIT ? 'WebkitAnimation' : 'animation'; - var PREFIX = WEBKIT ? '-webkit-' : ''; - - var TRANSITION_EVENTS = (WEBKIT ? 'webkitTransitionEnd ' : '') + 'transitionend'; - var ANIMATION_EVENTS = (WEBKIT ? 'webkitAnimationEnd ' : '') + 'animationend'; - - var $$ForceReflowFactory = ['$document', function($document) { - return function() { - return $document[0].body.clientWidth + 1; - }; - }]; - - var $$rAFMutexFactory = ['$$rAF', function($$rAF) { - return function() { - var passed = false; - $$rAF(function() { - passed = true; - }); - return function(fn) { - passed ? fn() : $$rAF(fn); - }; - }; - }]; - - var $$AnimateRunnerFactory = ['$q', '$$rAFMutex', function($q, $$rAFMutex) { - var INITIAL_STATE = 0; - var DONE_PENDING_STATE = 1; - var DONE_COMPLETE_STATE = 2; - - function AnimateRunner(host) { - this.setHost(host); - - this._doneCallbacks = []; - this._runInAnimationFrame = $$rAFMutex(); - this._state = 0; - } - - AnimateRunner.prototype = { - setHost: function(host) { - this.host = host || {}; - }, - - done: function(fn) { - if (this._state === DONE_COMPLETE_STATE) { - fn(); - } else { - this._doneCallbacks.push(fn); - } - }, - - progress: angular.noop, - - getPromise: function() { - if (!this.promise) { - var self = this; - this.promise = $q(function(resolve, reject) { - self.done(function(status) { - status === false ? reject() : resolve(); - }); - }); - } - return this.promise; - }, - - then: function(resolveHandler, rejectHandler) { - return this.getPromise().then(resolveHandler, rejectHandler); - }, - - 'catch': function(handler) { - return this.getPromise()['catch'](handler); - }, - - 'finally': function(handler) { - return this.getPromise()['finally'](handler); - }, - - pause: function() { - if (this.host.pause) { - this.host.pause(); - } - }, - - resume: function() { - if (this.host.resume) { - this.host.resume(); - } - }, - - end: function() { - if (this.host.end) { - this.host.end(); - } - this._resolve(true); - }, - - cancel: function() { - if (this.host.cancel) { - this.host.cancel(); - } - this._resolve(false); - }, - - complete: function(response) { - var self = this; - if (self._state === INITIAL_STATE) { - self._state = DONE_PENDING_STATE; - self._runInAnimationFrame(function() { - self._resolve(response); - }); - } - }, - - _resolve: function(response) { - if (this._state !== DONE_COMPLETE_STATE) { - forEach(this._doneCallbacks, function(fn) { - fn(response); - }); - this._doneCallbacks.length = 0; - this._state = DONE_COMPLETE_STATE; - } - } - }; - - // Polyfill AnimateRunner.all which is used by input animations - AnimateRunner.all = function(runners, callback) { - var count = 0; - var status = true; - forEach(runners, function(runner) { - runner.done(onProgress); - }); - - function onProgress(response) { - status = status && response; - if (++count === runners.length) { - callback(status); - } - } - }; - - return AnimateRunner; - }]; - - angular - .module('material.core.animate', []) - .factory('$$forceReflow', $$ForceReflowFactory) - .factory('$$AnimateRunner', $$AnimateRunnerFactory) - .factory('$$rAFMutex', $$rAFMutexFactory) - .factory('$animateCss', ['$window', '$$rAF', '$$AnimateRunner', '$$forceReflow', '$$jqLite', '$timeout', '$animate', - function($window, $$rAF, $$AnimateRunner, $$forceReflow, $$jqLite, $timeout, $animate) { - - function init(element, options) { - - var temporaryStyles = []; - var node = getDomNode(element); - var areAnimationsAllowed = node && $animate.enabled(); - - var hasCompleteStyles = false; - var hasCompleteClasses = false; - - if (areAnimationsAllowed) { - if (options.transitionStyle) { - temporaryStyles.push([PREFIX + 'transition', options.transitionStyle]); - } - - if (options.keyframeStyle) { - temporaryStyles.push([PREFIX + 'animation', options.keyframeStyle]); - } - - if (options.delay) { - temporaryStyles.push([PREFIX + 'transition-delay', options.delay + 's']); - } - - if (options.duration) { - temporaryStyles.push([PREFIX + 'transition-duration', options.duration + 's']); - } - - hasCompleteStyles = options.keyframeStyle || - (options.to && (options.duration > 0 || options.transitionStyle)); - hasCompleteClasses = !!options.addClass || !!options.removeClass; - - blockTransition(element, true); - } - - var hasCompleteAnimation = areAnimationsAllowed && (hasCompleteStyles || hasCompleteClasses); - - applyAnimationFromStyles(element, options); - - var animationClosed = false; - var events, eventFn; - - return { - close: $window.close, - start: function() { - var runner = new $$AnimateRunner(); - waitUntilQuiet(function() { - blockTransition(element, false); - if (!hasCompleteAnimation) { - return close(); - } - - forEach(temporaryStyles, function(entry) { - var key = entry[0]; - var value = entry[1]; - node.style[camelCase(key)] = value; - }); - - applyClasses(element, options); - - var timings = computeTimings(element); - if (timings.duration === 0) { - return close(); - } - - var moreStyles = []; - - if (options.easing) { - if (timings.transitionDuration) { - moreStyles.push([PREFIX + 'transition-timing-function', options.easing]); - } - if (timings.animationDuration) { - moreStyles.push([PREFIX + 'animation-timing-function', options.easing]); - } - } - - if (options.delay && timings.animationDelay) { - moreStyles.push([PREFIX + 'animation-delay', options.delay + 's']); - } - - if (options.duration && timings.animationDuration) { - moreStyles.push([PREFIX + 'animation-duration', options.duration + 's']); - } - - forEach(moreStyles, function(entry) { - var key = entry[0]; - var value = entry[1]; - node.style[camelCase(key)] = value; - temporaryStyles.push(entry); - }); - - var maxDelay = timings.delay; - var maxDelayTime = maxDelay * 1000; - var maxDuration = timings.duration; - var maxDurationTime = maxDuration * 1000; - var startTime = Date.now(); - - events = []; - if (timings.transitionDuration) { - events.push(TRANSITION_EVENTS); - } - if (timings.animationDuration) { - events.push(ANIMATION_EVENTS); - } - events = events.join(' '); - eventFn = function(event) { - event.stopPropagation(); - var ev = event.originalEvent || event; - var timeStamp = ev.timeStamp || Date.now(); - var elapsedTime = parseFloat(ev.elapsedTime.toFixed(3)); - if (Math.max(timeStamp - startTime, 0) >= maxDelayTime && elapsedTime >= maxDuration) { - close(); - } - }; - element.on(events, eventFn); - - applyAnimationToStyles(element, options); - - $timeout(close, maxDelayTime + maxDurationTime * 1.5, false); - }); - - return runner; - - function close() { - if (animationClosed) return; - animationClosed = true; - - if (events && eventFn) { - element.off(events, eventFn); - } - applyClasses(element, options); - applyAnimationStyles(element, options); - forEach(temporaryStyles, function(entry) { - node.style[camelCase(entry[0])] = ''; - }); - runner.complete(true); - return runner; - } - } - }; - } - - function applyClasses(element, options) { - if (options.addClass) { - $$jqLite.addClass(element, options.addClass); - options.addClass = null; - } - if (options.removeClass) { - $$jqLite.removeClass(element, options.removeClass); - options.removeClass = null; - } - } - - function computeTimings(element) { - var node = getDomNode(element); - var cs = $window.getComputedStyle(node); - var tdr = parseMaxTime(cs[prop('transitionDuration')]); - var adr = parseMaxTime(cs[prop('animationDuration')]); - var tdy = parseMaxTime(cs[prop('transitionDelay')]); - var ady = parseMaxTime(cs[prop('animationDelay')]); - - adr *= (parseInt(cs[prop('animationIterationCount')], 10) || 1); - var duration = Math.max(adr, tdr); - var delay = Math.max(ady, tdy); - - return { - duration: duration, - delay: delay, - animationDuration: adr, - transitionDuration: tdr, - animationDelay: ady, - transitionDelay: tdy - }; - - function prop(key) { - return WEBKIT ? 'Webkit' + key.charAt(0).toUpperCase() + key.substr(1) - : key; - } - } - - function parseMaxTime(str) { - var maxValue = 0; - var values = (str || "").split(/\s*,\s*/); - forEach(values, function(value) { - // it's always safe to consider only second values and omit `ms` values since - // getComputedStyle will always handle the conversion for us - if (value.charAt(value.length - 1) == 's') { - value = value.substring(0, value.length - 1); - } - value = parseFloat(value) || 0; - maxValue = maxValue ? Math.max(value, maxValue) : value; - }); - return maxValue; - } - - var cancelLastRAFRequest; - var rafWaitQueue = []; - function waitUntilQuiet(callback) { - if (cancelLastRAFRequest) { - cancelLastRAFRequest(); // cancels the request - } - rafWaitQueue.push(callback); - cancelLastRAFRequest = $$rAF(function() { - cancelLastRAFRequest = null; - - // DO NOT REMOVE THIS LINE OR REFACTOR OUT THE `pageWidth` variable. - // PLEASE EXAMINE THE `$$forceReflow` service to understand why. - var pageWidth = $$forceReflow(); - - // we use a for loop to ensure that if the queue is changed - // during this looping then it will consider new requests - for (var i = 0; i < rafWaitQueue.length; i++) { - rafWaitQueue[i](pageWidth); - } - rafWaitQueue.length = 0; - }); - } - - function applyAnimationStyles(element, options) { - applyAnimationFromStyles(element, options); - applyAnimationToStyles(element, options); - } - - function applyAnimationFromStyles(element, options) { - if (options.from) { - element.css(options.from); - options.from = null; - } - } - - function applyAnimationToStyles(element, options) { - if (options.to) { - element.css(options.to); - options.to = null; - } - } - - function getDomNode(element) { - for (var i = 0; i < element.length; i++) { - if (element[i].nodeType === 1) return element[i]; - } - } - - function blockTransition(element, bool) { - var node = getDomNode(element); - var key = camelCase(PREFIX + 'transition-delay'); - node.style[key] = bool ? '-9999s' : ''; - } - - return init; - }]); - - /** - * Older browsers [FF31] expect camelCase - * property keys. - * e.g. - * animation-duration --> animationDuration - */ - function camelCase(str) { - return str.replace(/-[a-z]/g, function(str) { - return str.charAt(1).toUpperCase(); - }); - } - -})(); - -} - -})(); -(function(){ -"use strict"; - -/** - * @ngdoc module - * @name material.core.aria - * @description - * Aria Expectations for AngularJS Material components. - */ -MdAriaService.$inject = ["$$rAF", "$log", "$window", "$interpolate"]; -angular - .module('material.core') - .provider('$mdAria', MdAriaProvider); - -/** - * @ngdoc service - * @name $mdAriaProvider - * @module material.core.aria - * - * @description - * - * Modify options of the `$mdAria` service, which will be used by most of the AngularJS Material - * components. - * - * You are able to disable `$mdAria` warnings, by using the following markup. - * - * - * app.config(function($mdAriaProvider) { - * // Globally disables all ARIA warnings. - * $mdAriaProvider.disableWarnings(); - * }); - * - * - */ -function MdAriaProvider() { - - var config = { - /** Whether we should show ARIA warnings in the console if labels are missing on the element */ - showWarnings: true - }; - - return { - disableWarnings: disableWarnings, - $get: ["$$rAF", "$log", "$window", "$interpolate", function($$rAF, $log, $window, $interpolate) { - return MdAriaService.apply(config, arguments); - }] - }; - - /** - * @ngdoc method - * @name $mdAriaProvider#disableWarnings - * @description Disables all ARIA warnings generated by AngularJS Material. - */ - function disableWarnings() { - config.showWarnings = false; - } -} - -/* - * @ngInject - */ -function MdAriaService($$rAF, $log, $window, $interpolate) { - - // Load the showWarnings option from the current context and store it inside of a scope variable, - // because the context will be probably lost in some function calls. - var showWarnings = this.showWarnings; - - return { - expect: expect, - expectAsync: expectAsync, - expectWithText: expectWithText, - expectWithoutText: expectWithoutText, - getText: getText, - hasAriaLabel: hasAriaLabel, - parentHasAriaLabel: parentHasAriaLabel - }; - - /** - * Check if expected attribute has been specified on the target element or child - * @param {string|JQLite} element - * @param {string} attrName - * @param {string=} defaultValue What to set the attr to if no value is found - */ - function expect(element, attrName, defaultValue) { - - var node = angular.element(element)[0] || element; - - // if node exists and neither it nor its children have the attribute - if (node && - ((!node.hasAttribute(attrName) || - node.getAttribute(attrName).length === 0) && - !childHasAttribute(node, attrName))) { - - defaultValue = angular.isString(defaultValue) ? defaultValue.trim() : ''; - if (defaultValue.length) { - element.attr(attrName, defaultValue); - } else if (showWarnings) { - $log.warn('ARIA: Attribute "', attrName, '", required for accessibility, is missing on node:', node); - } - - } - } - - function expectAsync(element, attrName, defaultValueGetter) { - // Problem: when retrieving the element's contents synchronously to find the label, - // the text may not be defined yet in the case of a binding. - // There is a higher chance that a binding will be defined if we wait one frame. - $$rAF(function() { - expect(element, attrName, defaultValueGetter()); - }); - } - - function expectWithText(element, attrName) { - var content = getText(element) || ""; - var hasBinding = content.indexOf($interpolate.startSymbol()) > -1; - - if (hasBinding) { - expectAsync(element, attrName, function() { - return getText(element); - }); - } else { - expect(element, attrName, content); - } - } - - function expectWithoutText(element, attrName) { - var content = getText(element); - var hasBinding = content.indexOf($interpolate.startSymbol()) > -1; - - if (!hasBinding && !content) { - expect(element, attrName, content); - } - } - - /** - * @param {Element|JQLite} element - * @returns {string} - */ - function getText(element) { - element = element[0] || element; - var walker = document.createTreeWalker(element, NodeFilter.SHOW_TEXT, null, false); - var text = ''; - - var node; - while (node = walker.nextNode()) { - if (!isAriaHiddenNode(node)) { - text += node.textContent; - } - } - - return text.trim() || ''; - - /** - * @param {Node} node - * @returns {boolean} - */ - function isAriaHiddenNode(node) { - while (node.parentNode && (node = node.parentNode) !== element) { - if (node.getAttribute && node.getAttribute('aria-hidden') === 'true') { - return true; - } - } - } - } - - function childHasAttribute(node, attrName) { - var hasChildren = node.hasChildNodes(), - hasAttr = false; - - function isHidden(el) { - var style = el.currentStyle ? el.currentStyle : $window.getComputedStyle(el); - return (style.display === 'none'); - } - - if (hasChildren) { - var children = node.childNodes; - for (var i=0; i < children.length; i++) { - var child = children[i]; - if (child.nodeType === 1 && child.hasAttribute(attrName)) { - if (!isHidden(child)) { - hasAttr = true; - } - } - } - } - return hasAttr; - } - - /** - * Check if expected element has aria label attribute - * @param element - */ - function hasAriaLabel(element) { - var node = angular.element(element)[0] || element; - - /* Check if compatible node type (ie: not HTML Document node) */ - if (!node.hasAttribute) { - return false; - } - - /* Check label or description attributes */ - return node.hasAttribute('aria-label') || node.hasAttribute('aria-labelledby') || node.hasAttribute('aria-describedby'); - } - - /** - * Check if expected element's parent has aria label attribute and has valid role and tagName - * @param {string|JQLite|Node & ParentNode} element - * @param {number=} level Number of levels deep search should be performed - */ - function parentHasAriaLabel(element, level) { - level = level || 1; - var node = angular.element(element)[0] || element; - if (!node.parentNode) { - return false; - } - if (performCheck(node.parentNode)) { - return true; - } - level--; - if (level) { - return parentHasAriaLabel(node.parentNode, level); - } - return false; - - function performCheck(parentNode) { - if (!hasAriaLabel(parentNode)) { - return false; - } - /* Perform role block-list check */ - if (parentNode.hasAttribute('role')) { - switch (parentNode.getAttribute('role').toLowerCase()) { - case 'command': - case 'definition': - case 'directory': - case 'grid': - case 'list': - case 'listitem': - case 'log': - case 'marquee': - case 'menu': - case 'menubar': - case 'note': - case 'presentation': - case 'separator': - case 'scrollbar': - case 'status': - case 'tablist': - return false; - } - } - /* Perform tagName block-list check */ - switch (parentNode.tagName.toLowerCase()) { - case 'abbr': - case 'acronym': - case 'address': - case 'applet': - case 'audio': - case 'b': - case 'bdi': - case 'bdo': - case 'big': - case 'blockquote': - case 'br': - case 'canvas': - case 'caption': - case 'center': - case 'cite': - case 'code': - case 'col': - case 'data': - case 'dd': - case 'del': - case 'dfn': - case 'dir': - case 'div': - case 'dl': - case 'em': - case 'embed': - case 'fieldset': - case 'figcaption': - case 'font': - case 'h1': - case 'h2': - case 'h3': - case 'h4': - case 'h5': - case 'h6': - case 'hgroup': - case 'html': - case 'i': - case 'ins': - case 'isindex': - case 'kbd': - case 'keygen': - case 'label': - case 'legend': - case 'li': - case 'map': - case 'mark': - case 'menu': - case 'object': - case 'ol': - case 'output': - case 'pre': - case 'presentation': - case 'q': - case 'rt': - case 'ruby': - case 'samp': - case 'small': - case 'source': - case 'span': - case 'status': - case 'strike': - case 'strong': - case 'sub': - case 'sup': - case 'svg': - case 'tbody': - case 'td': - case 'th': - case 'thead': - case 'time': - case 'tr': - case 'track': - case 'tt': - case 'ul': - case 'var': - return false; - } - return true; - } - } -} - -})(); -(function(){ -"use strict"; - -/** - * @ngdoc module - * @name material.core.compiler - * @description - * AngularJS Material template and element compiler. - */ -angular - .module('material.core') - .provider('$mdCompiler', MdCompilerProvider); - -MdCompilerProvider.$inject = ['$compileProvider']; -function MdCompilerProvider() { - - this.$get = ["$q", "$templateRequest", "$injector", "$compile", "$controller", - function($q, $templateRequest, $injector, $compile, $controller) { - return new MdCompilerService($q, $templateRequest, $injector, $compile, $controller); - }]; - - /** - * @ngdoc service - * @name $mdCompiler - * @module material.core.compiler - * @description - * The $mdCompiler service is an abstraction of AngularJS's compiler, that allows developers - * to compile an element with options like in a Directive Definition Object. - * - * > The compiler powers a lot of components inside of AngularJS Material. - * > Like the `$mdPanel` or `$mdDialog` services. - * - * @usage - * - * Basic Usage with a template - * - * - * $mdCompiler.compile({ - * templateUrl: 'modal.html', - * controller: 'ModalCtrl', - * locals: { - * modal: myModalInstance; - * } - * }).then(function (compileData) { - * compileData.element; // Compiled DOM element - * compileData.link(myScope); // Instantiate controller and link element to scope. - * }); - * - * - * Example with a content element - * - * - * - * // Create a virtual element and link it manually. - * // The compiler doesn't need to recompile the element each time. - * var myElement = $compile('Test')(myScope); - * - * $mdCompiler.compile({ - * contentElement: myElement - * }).then(function (compileData) { - * compileData.element // Content Element (same as above) - * compileData.link // This does nothing when using a contentElement. - * }); - * - * - * > Content Element is a significant performance improvement when the developer already knows - * > that the compiled element will be always the same and the scope will not change either. - * - * The `contentElement` option also supports DOM elements which will be temporary removed and - * restored at its old position. - * - * - * var domElement = document.querySelector('#myElement'); - * - * $mdCompiler.compile({ - * contentElement: myElement - * }).then(function (compileData) { - * compileData.element // Content Element (same as above) - * compileData.link // This does nothing when using a contentElement. - * }); - * - * - * The `$mdCompiler` can also query for the element in the DOM itself. - * - * - * $mdCompiler.compile({ - * contentElement: '#myElement' - * }).then(function (compileData) { - * compileData.element // Content Element (same as above) - * compileData.link // This does nothing when using a contentElement. - * }); - * - * - */ - function MdCompilerService($q, $templateRequest, $injector, $compile, $controller) { - - /** - * @private @const - * @type {!IQService} - */ - this.$q = $q; - - /** - * @private @const - * @type {!ITemplateRequestService} - */ - this.$templateRequest = $templateRequest; - - /** - * @private @const - * @type {!IInjectorService} - */ - this.$injector = $injector; - - /** - * @private @const - * @type{!ICompileService} - */ - this.$compile = $compile; - - /** - * @private @const - * @type {!IControllerService} - */ - this.$controller = $controller; - } - - /** - * @ngdoc method - * @name $mdCompiler#compile - * @description - * - * A method to compile a HTML template with the AngularJS compiler. - * The `$mdCompiler` is wrapper around the AngularJS compiler and provides extra functionality - * like controller instantiation or async resolves. - * - * @param {!Object} options An options object, with the following properties: - * - * - `controller` - `{string|function}` Controller fn that should be associated with - * newly created scope or the name of a registered controller if passed as a string. - * - `controllerAs` - `{string=}` A controller alias name. If present the controller will be - * published to scope under the `controllerAs` name. - * - `contentElement` - `{string|Element}`: Instead of using a template, which will be - * compiled each time, you can also use a DOM element.
    - * - `template` - `{string=}` An html template as a string. - * - `templateUrl` - `{string=}` A path to an html template. - * - `transformTemplate` - `{function(template)=}` A function which transforms the template after - * it is loaded. It will be given the template string as a parameter, and should - * return a a new string representing the transformed template. - * - `resolve` - `{Object.=}` - An optional map of dependencies which should - * be injected into the controller. If any of these dependencies are promises, the compiler - * will wait for them all to be resolved, or if one is rejected before the controller is - * instantiated `compile()` will fail.. - * * `key` - `{string}`: a name of a dependency to be injected into the controller. - * * `factory` - `{string|function}`: If `string` then it is an alias for a service. - * Otherwise if function, then it is injected and the return value is treated as the - * dependency. If the result is a promise, it is resolved before its value is - * injected into the controller. - * - * @returns {Q.Promise<{element: JQLite, link: Function, locals: Object, cleanup: any, - * controller: Object=}>} promise A promise, which will be resolved with a `compileData` object. - * `compileData` has the following properties: - * - * - `element` - `{JQLite}`: an uncompiled element matching the provided template. - * - `link` - `{function(scope)}`: A link function, which, when called, will compile - * the element and instantiate the provided controller (if given). - * - `locals` - `{Object}`: The locals which will be passed into the controller once `link` is - * called. If `bindToController` is true, they will be copied to the ctrl instead - */ - MdCompilerService.prototype.compile = function(options) { - if (options.contentElement) { - return this._prepareContentElement(options); - } else { - return this._compileTemplate(options); - } - }; - - /** - * Instead of compiling any template, the compiler just fetches an existing HTML element from the - * DOM and provides a restore function to put the element back it old DOM position. - * @param {!Object} options Options to be used for the compiler. - * @returns {Q.Promise<{element: JQLite, link: Function, locals: Object, cleanup: any}>} - */ - MdCompilerService.prototype._prepareContentElement = function(options) { - - var contentElement = this._fetchContentElement(options); - - return this.$q.resolve({ - element: contentElement.element, - cleanup: contentElement.restore, - locals: {}, - link: function() { - return contentElement.element; - } - }); - - }; - - /** - * Compiles a template by considering all options and waiting for all resolves to be ready. - * @param {!Object} options Compile options - * @returns {!Q.Promise<{element: JQLite, link: Function, locals: Object, cleanup: any}>} Compile - * data with link function. - */ - MdCompilerService.prototype._compileTemplate = function(options) { - - var self = this; - var templateUrl = options.templateUrl; - var template = options.template || ''; - var resolve = angular.extend({}, options.resolve); - var locals = angular.extend({}, options.locals); - var transformTemplate = options.transformTemplate || angular.identity; - - // Take resolve values and invoke them. - // Resolves can either be a string (value: 'MyRegisteredAngularConst'), - // or an invokable 'factory' of sorts: (value: function ValueGetter($dependency) {}) - angular.forEach(resolve, function(value, key) { - if (angular.isString(value)) { - resolve[key] = self.$injector.get(value); - } else { - resolve[key] = self.$injector.invoke(value); - } - }); - - // Add the locals, which are just straight values to inject - // eg locals: { three: 3 }, will inject three into the controller - angular.extend(resolve, locals); - - if (templateUrl) { - resolve.$$ngTemplate = this.$templateRequest(templateUrl); - } else { - resolve.$$ngTemplate = this.$q.when(template); - } - - - // Wait for all the resolves to finish if they are promises - return this.$q.all(resolve).then(function(locals) { - - var template = transformTemplate(locals.$$ngTemplate, options); - var element = options.element || angular.element('
    ').html(template.trim()).contents(); - - return self._compileElement(locals, element, options); - }); - - }; - - /** - * Method to compile an element with the given options. - * @param {!Object} locals Locals to be injected to the controller if present - * @param {!JQLite} element Element to be compiled and linked - * @param {!Object} options Options to be used for linking. - * @returns {!{element: JQLite, link: Function, locals: Object, cleanup: any, controller: Object}} Compile data with link function. - */ - MdCompilerService.prototype._compileElement = function(locals, element, options) { - var self = this; - var ngLinkFn = this.$compile(element); - - var compileData = { - element: element, - cleanup: element.remove.bind(element), - locals: locals, - link: linkFn - }; - - function linkFn(scope) { - locals.$scope = scope; - - // Instantiate controller if the developer provided one. - if (options.controller) { - - var injectLocals = angular.extend({}, locals, { - $element: element - }); - - // Create the specified controller instance. - var ctrl = self._createController(options, injectLocals, locals); - - // Registering extra $destroy listeners should be avoided. - // Only register the listener if the controller implements a $onDestroy hook. - if (angular.isFunction(ctrl.$onDestroy)) { - scope.$on('$destroy', function() { - // Call the $onDestroy hook if it's present on the controller. - angular.isFunction(ctrl.$onDestroy) && ctrl.$onDestroy(); - }); - } - - // Unique identifier for AngularJS Route ngView controllers. - element.data('$ngControllerController', ctrl); - element.children().data('$ngControllerController', ctrl); - - // Expose the instantiated controller to the compile data - compileData.controller = ctrl; - } - - // Invoke the AngularJS $compile link function. - return ngLinkFn(scope); - } - - return compileData; - - }; - - /** - * Creates and instantiates a new controller with the specified options. - * @param {!Object} options Options that include the controller function or string. - * @param {!Object} injectLocals Locals to to be provided in the controller DI. - * @param {!Object} locals Locals to be injected to the controller. - * @returns {!Object} Created controller instance. - */ - MdCompilerService.prototype._createController = function(options, injectLocals, locals) { - var ctrl = this.$controller(options.controller, injectLocals); - - if (options.bindToController) { - angular.extend(ctrl, locals); - } - - if (options.controllerAs) { - injectLocals.$scope[options.controllerAs] = ctrl; - } - - // Call the $onInit hook if it's present on the controller. - angular.isFunction(ctrl.$onInit) && ctrl.$onInit(); - - return ctrl; - }; - - /** - * Fetches an element removing it from the DOM and using it temporary for the compiler. - * Elements which were fetched will be restored after use. - * @param {!Object} options Options to be used for the compilation. - * @returns {{element: !JQLite, restore: !function}} - */ - MdCompilerService.prototype._fetchContentElement = function(options) { - var contentEl = options.contentElement; - var restoreFn; - - if (angular.isString(contentEl)) { - contentEl = document.querySelector(contentEl); - restoreFn = createRestoreFn(contentEl); - } else { - contentEl = contentEl[0] || contentEl; - - // When the element is visible in the DOM, then we restore it at close of the dialog. - // Otherwise it will be removed from the DOM after close. - if (document.contains(contentEl)) { - restoreFn = createRestoreFn(contentEl); - } else { - restoreFn = function() { - if (contentEl.parentNode) { - contentEl.parentNode.removeChild(contentEl); - } - }; - } - } - - return { - element: angular.element(contentEl), - restore: restoreFn - }; - - function createRestoreFn(element) { - var parent = element.parentNode; - var nextSibling = element.nextElementSibling; - - return function() { - if (!nextSibling) { - // When the element didn't had any sibling, then it can be simply appended to the - // parent, because it plays no role, which index it had before. - parent.appendChild(element); - } else { - // When the element had a sibling, which marks the previous position of the element - // in the DOM, we insert it correctly before the sibling, to have the same index as - // before. - parent.insertBefore(element, nextSibling); - } - }; - } - }; -} - - -})(); -(function(){ -"use strict"; - - -MdGesture.$inject = ["$$MdGestureHandler", "$$rAF", "$timeout", "$mdUtil"]; -attachToDocument.$inject = ["$mdGesture", "$$MdGestureHandler", "$mdUtil"];var HANDLERS = {}; - -/** - * The state of the current 'pointer'. The pointer represents the state of the current touch. - * It contains normalized x and y coordinates from DOM events, - * as well as other information abstracted from the DOM. - */ -var pointer, lastPointer, maxClickDistance = 6; -var forceSkipClickHijack = false, disableAllGestures = false; - -/** - * The position of the most recent click if that click was on a label element. - * @type {{x: number, y: number}|null} - */ -var lastLabelClickPos = null; - -/** - * Used to attach event listeners once when multiple ng-apps are running. - * @type {boolean} - */ -var isInitialized = false; - -/** - * @ngdoc module - * @name material.core.gestures - * @description - * AngularJS Material Gesture handling for touch devices. - * This module replaced the usage of the HammerJS library. - */ -angular - .module('material.core.gestures', []) - .provider('$mdGesture', MdGestureProvider) - .factory('$$MdGestureHandler', MdGestureHandler) - .run(attachToDocument); - -/** - * @ngdoc service - * @name $mdGestureProvider - * @module material.core.gestures - * - * @description - * In some scenarios on mobile devices (without jQuery), the click events should NOT be hijacked. - * `$mdGestureProvider` is used to configure the Gesture module to ignore or skip click hijacking - * on mobile devices. - * - * You can also change the max click distance, `6px` by default, if you have issues on some touch - * screens. - * - * - * app.config(function($mdGestureProvider) { - * - * // For mobile devices without jQuery loaded, do not - * // intercept click events during the capture phase. - * $mdGestureProvider.skipClickHijack(); - * - * // If hijacking clicks, you may want to change the default click distance - * $mdGestureProvider.setMaxClickDistance(12); - * }); - * - * - */ -function MdGestureProvider() { } - -MdGestureProvider.prototype = { - - /** - * @ngdoc method - * @name $mdGestureProvider#disableAll - * - * @description - * Disable all gesture detection. This can be beneficial to application performance - * and memory usage. - */ - disableAll: function () { - disableAllGestures = true; - }, - - // Publish access to setter to configure a variable BEFORE the - // $mdGesture service is instantiated... - /** - * @ngdoc method - * @name $mdGestureProvider#skipClickHijack - * - * @description - * Tell the AngularJS Material Gesture module to skip (or ignore) click hijacking on mobile devices. - */ - skipClickHijack: function() { - return forceSkipClickHijack = true; - }, - - /** - * @ngdoc method - * @name $mdGestureProvider#setMaxClickDistance - * @param clickDistance {string} Distance in pixels. I.e. `12px`. - * @description - * Set the max distance from the origin of the touch event to trigger touch handlers. - */ - setMaxClickDistance: function(clickDistance) { - maxClickDistance = parseInt(clickDistance); - }, - - /** - * $get is used to build an instance of $mdGesture - * @ngInject - */ - $get : ["$$MdGestureHandler", "$$rAF", "$timeout", "$mdUtil", function($$MdGestureHandler, $$rAF, $timeout, $mdUtil) { - return new MdGesture($$MdGestureHandler, $$rAF, $timeout, $mdUtil); - }] -}; - - - -/** - * MdGesture factory construction function - * @ngInject - */ -function MdGesture($$MdGestureHandler, $$rAF, $timeout, $mdUtil) { - var touchActionProperty = $mdUtil.getTouchAction(); - var hasJQuery = (typeof __webpack_provided_window_dot_jQuery !== 'undefined') && (angular.element === __webpack_provided_window_dot_jQuery); - - var self = { - handler: addHandler, - register: register, - isAndroid: $mdUtil.isAndroid, - isIos: $mdUtil.isIos, - // On mobile w/out jQuery, we normally intercept clicks. Should we skip that? - isHijackingClicks: ($mdUtil.isIos || $mdUtil.isAndroid) && !hasJQuery && !forceSkipClickHijack - }; - - if (self.isHijackingClicks) { - self.handler('click', { - options: { - maxDistance: maxClickDistance - }, - onEnd: checkDistanceAndEmit('click') - }); - - self.handler('focus', { - options: { - maxDistance: maxClickDistance - }, - onEnd: function(ev, pointer) { - if (pointer.distance < this.state.options.maxDistance && canFocus(ev.target)) { - this.dispatchEvent(ev, 'focus', pointer); - ev.target.focus(); - } - } - }); - - self.handler('mouseup', { - options: { - maxDistance: maxClickDistance - }, - onEnd: checkDistanceAndEmit('mouseup') - }); - - self.handler('mousedown', { - onStart: function(ev) { - this.dispatchEvent(ev, 'mousedown'); - } - }); - } - - function checkDistanceAndEmit(eventName) { - return function(ev, pointer) { - if (pointer.distance < this.state.options.maxDistance) { - this.dispatchEvent(ev, eventName, pointer); - } - }; - } - - /** - * Register an element to listen for a handler. - * This allows an element to override the default options for a handler. - * Additionally, some handlers like drag and hold only dispatch events if - * the domEvent happens inside an element that's registered to listen for these events. - * - * @see GestureHandler for how overriding of default options works. - * @example $mdGesture.register(myElement, 'drag', { minDistance: 20, horizontal: false }) - */ - function register(element, handlerName, options) { - var handler = HANDLERS[handlerName.replace(/^\$md./, '')]; - if (!handler) { - throw new Error('Failed to register element with handler ' + handlerName + '. ' + - 'Available handlers: ' + Object.keys(HANDLERS).join(', ')); - } - return handler.registerElement(element, options); - } - - /* - * add a handler to $mdGesture. see below. - */ - function addHandler(name, definition) { - var handler = new $$MdGestureHandler(name); - angular.extend(handler, definition); - HANDLERS[name] = handler; - - return self; - } - - /** - * Register handlers. These listen to touch/start/move events, interpret them, - * and dispatch gesture events depending on options & conditions. These are all - * instances of GestureHandler. - * @see GestureHandler - */ - return self - /* - * The press handler dispatches an event on touchdown/touchend. - * It's a simple abstraction of touch/mouse/pointer start and end. - */ - .handler('press', { - onStart: function (ev, pointer) { - this.dispatchEvent(ev, '$md.pressdown'); - }, - onEnd: function (ev, pointer) { - this.dispatchEvent(ev, '$md.pressup'); - } - }) - - /* - * The hold handler dispatches an event if the user keeps their finger within - * the same area for ms. - * The hold handler will only run if a parent of the touch target is registered - * to listen for hold events through $mdGesture.register() - */ - .handler('hold', { - options: { - maxDistance: 6, - delay: 500 - }, - onCancel: function () { - $timeout.cancel(this.state.timeout); - }, - onStart: function (ev, pointer) { - // For hold, require a parent to be registered with $mdGesture.register() - // Because we prevent scroll events, this is necessary. - if (!this.state.registeredParent) return this.cancel(); - - this.state.pos = {x: pointer.x, y: pointer.y}; - this.state.timeout = $timeout(angular.bind(this, function holdDelayFn() { - this.dispatchEvent(ev, '$md.hold'); - this.cancel(); // we're done! - }), this.state.options.delay, false); - }, - onMove: function (ev, pointer) { - // Don't scroll while waiting for hold. - // If we don't preventDefault touchmove events here, Android will assume we don't - // want to listen to anymore touch events. It will start scrolling and stop sending - // touchmove events. - if (!touchActionProperty && ev.type === 'touchmove') ev.preventDefault(); - - // If the user moves greater than pixels, stop the hold timer - // set in onStart - var dx = this.state.pos.x - pointer.x; - var dy = this.state.pos.y - pointer.y; - if (Math.sqrt(dx * dx + dy * dy) > this.options.maxDistance) { - this.cancel(); - } - }, - onEnd: function () { - this.onCancel(); - } - }) - - /* - * The drag handler dispatches a drag event if the user holds and moves his finger greater than - * px in the x or y direction, depending on options.horizontal. - * The drag will be cancelled if the user moves his finger greater than * in - * the perpendicular direction. Eg if the drag is horizontal and the user moves his finger * - * pixels vertically, this handler won't consider the move part of a drag. - */ - .handler('drag', { - options: { - minDistance: 6, - horizontal: true, - cancelMultiplier: 1.5 - }, - /** - * @param {angular.JQLite} element where touch action styles need to be adjusted - * @param {{horizontal: boolean}=} options object whose horizontal property can specify to - * apply 'pan-y' or 'pan-x' touch actions. - */ - onSetup: function(element, options) { - if (touchActionProperty) { - // We check for horizontal to be false, because otherwise we would overwrite the default opts. - this.oldTouchAction = element[0].style[touchActionProperty]; - element[0].style[touchActionProperty] = options.horizontal ? 'pan-y' : 'pan-x'; - } - }, - /** - * @param {angular.JQLite} element where styles need to be cleaned up - */ - onCleanup: function(element) { - if (this.oldTouchAction) { - element[0].style[touchActionProperty] = this.oldTouchAction; - } else { - element[0].style[touchActionProperty] = null; - } - }, - onStart: function (ev) { - // For drag, require a parent to be registered with $mdGesture.register() - if (!this.state.registeredParent) this.cancel(); - }, - onMove: function (ev, pointer) { - var shouldStartDrag, shouldCancel; - // Don't scroll while deciding if this touchmove qualifies as a drag event. - // If we don't preventDefault touchmove events here, Android will assume we don't - // want to listen to anymore touch events. It will start scrolling and stop sending - // touchmove events. - if (!touchActionProperty && ev.type === 'touchmove') ev.preventDefault(); - - if (!this.state.dragPointer) { - if (this.state.options.horizontal) { - shouldStartDrag = Math.abs(pointer.distanceX) > this.state.options.minDistance; - shouldCancel = Math.abs(pointer.distanceY) > this.state.options.minDistance * this.state.options.cancelMultiplier; - } else { - shouldStartDrag = Math.abs(pointer.distanceY) > this.state.options.minDistance; - shouldCancel = Math.abs(pointer.distanceX) > this.state.options.minDistance * this.state.options.cancelMultiplier; - } - - if (shouldStartDrag) { - // Create a new pointer representing this drag, starting at this point where the drag started. - this.state.dragPointer = makeStartPointer(ev); - updatePointerState(ev, this.state.dragPointer); - this.dispatchEvent(ev, '$md.dragstart', this.state.dragPointer); - - } else if (shouldCancel) { - this.cancel(); - } - } else { - this.dispatchDragMove(ev); - } - }, - // Only dispatch dragmove events every frame; any more is unnecessary - dispatchDragMove: $$rAF.throttle(function (ev) { - // Make sure the drag didn't stop while waiting for the next frame - if (this.state.isRunning) { - updatePointerState(ev, this.state.dragPointer); - this.dispatchEvent(ev, '$md.drag', this.state.dragPointer); - } - }), - onEnd: function (ev, pointer) { - if (this.state.dragPointer) { - updatePointerState(ev, this.state.dragPointer); - this.dispatchEvent(ev, '$md.dragend', this.state.dragPointer); - } - } - }) - - /* - * The swipe handler will dispatch a swipe event if, on the end of a touch, - * the velocity and distance were high enough. - */ - .handler('swipe', { - options: { - minVelocity: 0.65, - minDistance: 10 - }, - onEnd: function (ev, pointer) { - var eventType; - - if (Math.abs(pointer.velocityX) > this.state.options.minVelocity && - Math.abs(pointer.distanceX) > this.state.options.minDistance) { - eventType = pointer.directionX == 'left' ? '$md.swipeleft' : '$md.swiperight'; - this.dispatchEvent(ev, eventType); - } - else if (Math.abs(pointer.velocityY) > this.state.options.minVelocity && - Math.abs(pointer.distanceY) > this.state.options.minDistance) { - eventType = pointer.directionY == 'up' ? '$md.swipeup' : '$md.swipedown'; - this.dispatchEvent(ev, eventType); - } - } - }); -} - -/** - * MdGestureHandler - * A GestureHandler is an object which is able to dispatch custom dom events - * based on native dom {touch,pointer,mouse}{start,move,end} events. - * - * A gesture will manage its lifecycle through the start,move,end, and cancel - * functions, which are called by native dom events. - * - * A gesture has the concept of 'options' (eg. a swipe's required velocity), which can be - * overridden by elements registering through $mdGesture.register(). - */ -function GestureHandler (name) { - this.name = name; - this.state = {}; -} - -function MdGestureHandler() { - var hasJQuery = (typeof __webpack_provided_window_dot_jQuery !== 'undefined') && (angular.element === __webpack_provided_window_dot_jQuery); - - GestureHandler.prototype = { - options: {}, - // jQuery listeners don't work with custom DOMEvents, so we have to dispatch events - // differently when jQuery is loaded - dispatchEvent: hasJQuery ? jQueryDispatchEvent : nativeDispatchEvent, - - // These are overridden by the registered handler - onSetup: angular.noop, - onCleanup: angular.noop, - onStart: angular.noop, - onMove: angular.noop, - onEnd: angular.noop, - onCancel: angular.noop, - - // onStart sets up a new state for the handler, which includes options from the - // nearest registered parent element of ev.target. - start: function (ev, pointer) { - if (this.state.isRunning) return; - var parentTarget = this.getNearestParent(ev.target); - // Get the options from the nearest registered parent - var parentTargetOptions = parentTarget && parentTarget.$mdGesture[this.name] || {}; - - this.state = { - isRunning: true, - // Override the default options with the nearest registered parent's options - options: angular.extend({}, this.options, parentTargetOptions), - // Pass in the registered parent node to the state so the onStart listener can use - registeredParent: parentTarget - }; - this.onStart(ev, pointer); - }, - move: function (ev, pointer) { - if (!this.state.isRunning) return; - this.onMove(ev, pointer); - }, - end: function (ev, pointer) { - if (!this.state.isRunning) return; - this.state.isRunning = false; - this.onEnd(ev, pointer); - }, - cancel: function (ev, pointer) { - this.onCancel(ev, pointer); - this.state = {}; - }, - - // Find and return the nearest parent element that has been registered to - // listen for this handler via $mdGesture.register(element, 'handlerName'). - getNearestParent: function (node) { - var current = node; - while (current) { - if ((current.$mdGesture || {})[this.name]) { - return current; - } - current = current.parentNode; - } - return null; - }, - - // Called from $mdGesture.register when an element registers itself with a handler. - // Store the options the user gave on the DOMElement itself. These options will - // be retrieved with getNearestParent when the handler starts. - registerElement: function (element, options) { - var self = this; - element[0].$mdGesture = element[0].$mdGesture || {}; - element[0].$mdGesture[this.name] = options || {}; - element.on('$destroy', onDestroy); - - self.onSetup(element, options || {}); - - return onDestroy; - - function onDestroy() { - delete element[0].$mdGesture[self.name]; - element.off('$destroy', onDestroy); - - self.onCleanup(element, options || {}); - } - } - }; - - return GestureHandler; - - /** - * Dispatch an event with jQuery - * TODO: Make sure this sends bubbling events - * - * @param srcEvent the original DOM touch event that started this. - * @param eventType the name of the custom event to send (eg 'click' or '$md.drag') - * @param eventPointer the pointer object that matches this event. - */ - function jQueryDispatchEvent(srcEvent, eventType, eventPointer) { - eventPointer = eventPointer || pointer; - var eventObj = new angular.element.Event(eventType); - - eventObj.$material = true; - eventObj.pointer = eventPointer; - eventObj.srcEvent = srcEvent; - - angular.extend(eventObj, { - clientX: eventPointer.x, - clientY: eventPointer.y, - screenX: eventPointer.x, - screenY: eventPointer.y, - pageX: eventPointer.x, - pageY: eventPointer.y, - ctrlKey: srcEvent.ctrlKey, - altKey: srcEvent.altKey, - shiftKey: srcEvent.shiftKey, - metaKey: srcEvent.metaKey - }); - angular.element(eventPointer.target).trigger(eventObj); - } - - /** - * NOTE: nativeDispatchEvent is very performance sensitive. - * @param srcEvent the original DOM touch event that started this. - * @param eventType the name of the custom event to send (eg 'click' or '$md.drag') - * @param eventPointer the pointer object that matches this event. - */ - function nativeDispatchEvent(srcEvent, eventType, eventPointer) { - eventPointer = eventPointer || pointer; - var eventObj; - - if (eventType === 'click' || eventType === 'mouseup' || eventType === 'mousedown') { - if (typeof window.MouseEvent === "function") { - eventObj = new MouseEvent(eventType, { - bubbles: true, - cancelable: true, - screenX: Number(srcEvent.screenX), - screenY: Number(srcEvent.screenY), - clientX: Number(eventPointer.x), - clientY: Number(eventPointer.y), - ctrlKey: srcEvent.ctrlKey, - altKey: srcEvent.altKey, - shiftKey: srcEvent.shiftKey, - metaKey: srcEvent.metaKey, - button: srcEvent.button, - buttons: srcEvent.buttons, - relatedTarget: srcEvent.relatedTarget || null - }); - } else { - eventObj = document.createEvent('MouseEvents'); - // This has been deprecated - // https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent/initMouseEvent - eventObj.initMouseEvent( - eventType, true, true, window, srcEvent.detail, - eventPointer.x, eventPointer.y, eventPointer.x, eventPointer.y, - srcEvent.ctrlKey, srcEvent.altKey, srcEvent.shiftKey, srcEvent.metaKey, - srcEvent.button, srcEvent.relatedTarget || null - ); - } - } else { - if (typeof window.CustomEvent === "function") { - eventObj = new CustomEvent(eventType, { - bubbles: true, - cancelable: true, - detail: {} - }); - } else { - // This has been deprecated - // https://developer.mozilla.org/en-US/docs/Web/API/CustomEvent/initCustomEvent - eventObj = document.createEvent('CustomEvent'); - eventObj.initCustomEvent(eventType, true, true, {}); - } - } - eventObj.$material = true; - eventObj.pointer = eventPointer; - eventObj.srcEvent = srcEvent; - eventPointer.target.dispatchEvent(eventObj); - } -} - -/** - * Attach Gestures: hook document and check shouldHijack clicks - * @ngInject - */ -function attachToDocument($mdGesture, $$MdGestureHandler, $mdUtil) { - if (disableAllGestures) { - return; - } - - if (!isInitialized && $mdGesture.isHijackingClicks) { - /* - * If hijack clicks is true, we preventDefault any click that wasn't - * sent by AngularJS Material. This is because on older Android & iOS, a false, or 'ghost', - * click event will be sent ~400ms after a touchend event happens. - * The only way to know if this click is real is to prevent any normal - * click events, and add a flag to events sent by material so we know not to prevent those. - * - * Two exceptions to click events that should be prevented are: - * - click events sent by the keyboard (eg form submit) - * - events that originate from an Ionic app - */ - document.addEventListener('click' , clickHijacker , true); - document.addEventListener('mouseup' , mouseInputHijacker, true); - document.addEventListener('mousedown', mouseInputHijacker, true); - document.addEventListener('focus' , mouseInputHijacker, true); - - isInitialized = true; - } - - function mouseInputHijacker(ev) { - var isKeyClick = !ev.clientX && !ev.clientY; - - if ( - !isKeyClick && - !ev.$material && - !ev.isIonicTap && - !isInputEventFromLabelClick(ev) && - (ev.type !== 'mousedown' || (!canFocus(ev.target) && !canFocus(document.activeElement))) - ) { - ev.preventDefault(); - ev.stopPropagation(); - } - } - - /** - * Ignore click events that don't come from AngularJS Material, Ionic, Input Label clicks, - * or key presses that generate click events. This helps to ignore the ghost tap events on - * older mobile browsers that get sent after a 300-400ms delay. - * @param ev MouseEvent or modified MouseEvent with $material, pointer, and other fields - */ - function clickHijacker(ev) { - var isKeyClick; - if ($mdUtil.isIos) { - isKeyClick = angular.isDefined(ev.webkitForce) && ev.webkitForce === 0; - } else { - isKeyClick = ev.clientX === 0 && ev.clientY === 0; - } - if (!isKeyClick && !ev.$material && !ev.isIonicTap && !isInputEventFromLabelClick(ev)) { - ev.preventDefault(); - ev.stopPropagation(); - lastLabelClickPos = null; - } else { - lastLabelClickPos = null; - if (ev.target.tagName.toLowerCase() === 'label') { - lastLabelClickPos = {x: ev.x, y: ev.y}; - } - } - } - - - // Listen to all events to cover all platforms. - var START_EVENTS = 'mousedown touchstart pointerdown'; - var MOVE_EVENTS = 'mousemove touchmove pointermove'; - var END_EVENTS = 'mouseup mouseleave touchend touchcancel pointerup pointercancel'; - - angular.element(document) - .on(START_EVENTS, gestureStart) - .on(MOVE_EVENTS, gestureMove) - .on(END_EVENTS, gestureEnd) - // For testing - .on('$$mdGestureReset', function gestureClearCache () { - lastPointer = pointer = null; - }); - - /** - * When a DOM event happens, run all registered gesture handlers' lifecycle - * methods which match the DOM event. - * Eg. when a 'touchstart' event happens, runHandlers('start') will call and - * run `handler.cancel()` and `handler.start()` on all registered handlers. - */ - function runHandlers(handlerEvent, event) { - var handler; - for (var name in HANDLERS) { - handler = HANDLERS[name]; - if (handler instanceof $$MdGestureHandler) { - - if (handlerEvent === 'start') { - // Run cancel to reset any handlers' state - handler.cancel(); - } - handler[handlerEvent](event, pointer); - } - } - } - - /* - * gestureStart vets if a start event is legitimate (and not part of a 'ghost click' from iOS/Android) - * If it is legitimate, we initiate the pointer state and mark the current pointer's type - * For example, for a touchstart event, mark the current pointer as a 'touch' pointer, so mouse events - * won't effect it. - */ - function gestureStart(ev) { - // If we're already touched down, abort - if (pointer) return; - - var now = +Date.now(); - - // iOS & old android bug: after a touch event, a click event is sent 350 ms later. - // If <400ms have passed, don't allow an event of a different type than the previous event - if (lastPointer && !typesMatch(ev, lastPointer) && (now - lastPointer.endTime < 1500)) { - return; - } - - pointer = makeStartPointer(ev); - - runHandlers('start', ev); - } - - /** - * If a move event happens of the right type, update the pointer and run all the move handlers. - * "of the right type": if a mousemove happens but our pointer started with a touch event, do - * nothing. - */ - function gestureMove(ev) { - if (!pointer || !typesMatch(ev, pointer)) return; - - updatePointerState(ev, pointer); - runHandlers('move', ev); - } - - /** - * If an end event happens of the right type, update the pointer, run endHandlers, and save the - * pointer as 'lastPointer'. - */ - function gestureEnd(ev) { - if (!pointer || !typesMatch(ev, pointer)) return; - - updatePointerState(ev, pointer); - pointer.endTime = +Date.now(); - - if (ev.type !== 'pointercancel') { - runHandlers('end', ev); - } - - lastPointer = pointer; - pointer = null; - } - -} - -// ******************** -// Module Functions -// ******************** - -/* - * Initiate the pointer. x, y, and the pointer's type. - */ -function makeStartPointer(ev) { - var point = getEventPoint(ev); - var startPointer = { - startTime: +Date.now(), - target: ev.target, - // 'p' for pointer events, 'm' for mouse, 't' for touch - type: ev.type.charAt(0) - }; - startPointer.startX = startPointer.x = point.pageX; - startPointer.startY = startPointer.y = point.pageY; - return startPointer; -} - -/* - * return whether the pointer's type matches the event's type. - * Eg if a touch event happens but the pointer has a mouse type, return false. - */ -function typesMatch(ev, pointer) { - return ev && pointer && ev.type.charAt(0) === pointer.type; -} - -/** - * Gets whether the given event is an input event that was caused by clicking on an - * associated label element. - * - * This is necessary because the browser will, upon clicking on a label element, fire an - * *extra* click event on its associated input (if any). mdGesture is able to flag the label - * click as with `$material` correctly, but not the second input click. - * - * In order to determine whether an input event is from a label click, we compare the (x, y) for - * the event to the (x, y) for the most recent label click (which is cleared whenever a non-label - * click occurs). Unfortunately, there are no event properties that tie the input and the label - * together (such as relatedTarget). - * - * @param {MouseEvent} event - * @returns {boolean} - */ -function isInputEventFromLabelClick(event) { - return lastLabelClickPos - && lastLabelClickPos.x === event.x - && lastLabelClickPos.y === event.y; -} - -/* - * Update the given pointer based upon the given DOMEvent. - * Distance, velocity, direction, duration, etc - */ -function updatePointerState(ev, pointer) { - var point = getEventPoint(ev); - var x = pointer.x = point.pageX; - var y = pointer.y = point.pageY; - - pointer.distanceX = x - pointer.startX; - pointer.distanceY = y - pointer.startY; - pointer.distance = Math.sqrt( - pointer.distanceX * pointer.distanceX + pointer.distanceY * pointer.distanceY - ); - - pointer.directionX = pointer.distanceX > 0 ? 'right' : pointer.distanceX < 0 ? 'left' : ''; - pointer.directionY = pointer.distanceY > 0 ? 'down' : pointer.distanceY < 0 ? 'up' : ''; - - pointer.duration = +Date.now() - pointer.startTime; - pointer.velocityX = pointer.distanceX / pointer.duration; - pointer.velocityY = pointer.distanceY / pointer.duration; -} - -/** - * Normalize the point where the DOM event happened whether it's touch or mouse. - * @returns point event obj with pageX and pageY on it. - */ -function getEventPoint(ev) { - ev = ev.originalEvent || ev; // support jQuery events - return (ev.touches && ev.touches[0]) || - (ev.changedTouches && ev.changedTouches[0]) || - ev; -} - -/** Checks whether an element can be focused. */ -function canFocus(element) { - return ( - !!element && - element.getAttribute('tabindex') !== '-1' && - !element.hasAttribute('disabled') && - ( - element.hasAttribute('tabindex') || - element.hasAttribute('href') || - element.isContentEditable || - ['INPUT', 'SELECT', 'BUTTON', 'TEXTAREA', 'VIDEO', 'AUDIO'].indexOf(element.nodeName) !== -1 - ) - ); -} - -})(); -(function(){ -"use strict"; - -/** - * @ngdoc module - * @name material.core.interaction - * @description - * User interaction detection to provide proper accessibility. - */ -MdInteractionService.$inject = ["$timeout", "$mdUtil", "$rootScope"]; -angular - .module('material.core.interaction', []) - .service('$mdInteraction', MdInteractionService); - - -/** - * @ngdoc service - * @name $mdInteraction - * @module material.core.interaction - * - * @description - * - * Service which keeps track of the last interaction type and validates them for several browsers. - * The service hooks into the document's body and listens for touch, mouse and keyboard events. - * - * The most recent interaction type can be retrieved by calling the `getLastInteractionType` method. - * - * Here is an example markup for using the interaction service. - * - * - * var lastType = $mdInteraction.getLastInteractionType(); - * - * if (lastType === 'keyboard') { - * // We only restore the focus for keyboard users. - * restoreFocus(); - * } - * - * - */ -function MdInteractionService($timeout, $mdUtil, $rootScope) { - this.$timeout = $timeout; - this.$mdUtil = $mdUtil; - this.$rootScope = $rootScope; - - // IE browsers can also trigger pointer events, which also leads to an interaction. - this.pointerEvent = 'MSPointerEvent' in window ? 'MSPointerDown' : 'PointerEvent' in window ? 'pointerdown' : null; - this.bodyElement = angular.element(document.body); - this.isBuffering = false; - this.bufferTimeout = null; - this.lastInteractionType = null; - this.lastInteractionTime = null; - this.inputHandler = this.onInputEvent.bind(this); - this.bufferedInputHandler = this.onBufferInputEvent.bind(this); - - // Type Mappings for the different events - // There will be three three interaction types - // `keyboard`, `mouse` and `touch` - // type `pointer` will be evaluated in `pointerMap` for IE Browser events - this.inputEventMap = { - 'keydown': 'keyboard', - 'mousedown': 'mouse', - 'mouseenter': 'mouse', - 'touchstart': 'touch', - 'pointerdown': 'pointer', - 'MSPointerDown': 'pointer' - }; - - // IE PointerDown events will be validated in `touch` or `mouse` - // Index numbers referenced here: https://msdn.microsoft.com/library/windows/apps/hh466130.aspx - this.iePointerMap = { - 2: 'touch', - 3: 'touch', - 4: 'mouse' - }; - - this.initializeEvents(); - this.$rootScope.$on('$destroy', this.deregister.bind(this)); -} - -/** - * Removes all event listeners created by $mdInteration on the - * body element. - */ -MdInteractionService.prototype.deregister = function() { - - this.bodyElement.off('keydown mousedown', this.inputHandler); - - if ('ontouchstart' in document.documentElement) { - this.bodyElement.off('touchstart', this.bufferedInputHandler); - } - - if (this.pointerEvent) { - this.bodyElement.off(this.pointerEvent, this.inputHandler); - } - -}; - -/** - * Initializes the interaction service, by registering all interaction events to the - * body element. - */ -MdInteractionService.prototype.initializeEvents = function() { - - this.bodyElement.on('keydown mousedown', this.inputHandler); - - if ('ontouchstart' in document.documentElement) { - this.bodyElement.on('touchstart', this.bufferedInputHandler); - } - - if (this.pointerEvent) { - this.bodyElement.on(this.pointerEvent, this.inputHandler); - } - -}; - -/** - * Event listener for normal interaction events, which should be tracked. - * @param event {MouseEvent|KeyboardEvent|PointerEvent|TouchEvent} - */ -MdInteractionService.prototype.onInputEvent = function(event) { - if (this.isBuffering) { - return; - } - - var type = this.inputEventMap[event.type]; - - if (type === 'pointer') { - type = this.iePointerMap[event.pointerType] || event.pointerType; - } - - this.lastInteractionType = type; - this.lastInteractionTime = this.$mdUtil.now(); -}; - -/** - * Event listener for interaction events which should be buffered (touch events). - * @param event {TouchEvent} - */ -MdInteractionService.prototype.onBufferInputEvent = function(event) { - this.$timeout.cancel(this.bufferTimeout); - - this.onInputEvent(event); - this.isBuffering = true; - - // The timeout of 650ms is needed to delay the touchstart, because otherwise the touch will call - // the `onInput` function multiple times. - this.bufferTimeout = this.$timeout(function() { - this.isBuffering = false; - }.bind(this), 650, false); - -}; - -/** - * @ngdoc method - * @name $mdInteraction#getLastInteractionType - * @description Retrieves the last interaction type triggered in body. - * @returns {string|null} Last interaction type. - */ -MdInteractionService.prototype.getLastInteractionType = function() { - return this.lastInteractionType; -}; - -/** - * @ngdoc method - * @name $mdInteraction#isUserInvoked - * @description Method to detect whether any interaction happened recently or not. - * @param {number=} checkDelay Time to check for any interaction to have been triggered. - * @returns {boolean} Whether there was any interaction or not. - */ -MdInteractionService.prototype.isUserInvoked = function(checkDelay) { - var delay = angular.isNumber(checkDelay) ? checkDelay : 15; - - // Check for any interaction to be within the specified check time. - return this.lastInteractionTime >= this.$mdUtil.now() - delay; -}; - -})(); -(function(){ -"use strict"; - -angular.module('material.core') - .provider('$$interimElement', InterimElementProvider); - -/** - * @ngdoc service - * @name $$interimElementProvider - * @module material.core.interimElement - * - * @description - * - * Factory that constructs `$$interimElement.$service` services. - * Used internally in material design for elements that appear on screen temporarily. - * The service provides a promise-like API for interacting with the temporary - * elements. - * - * - * app.service('$mdToast', function($$interimElement) { - * var $mdToast = $$interimElement(toastDefaultOptions); - * return $mdToast; - * }); - * - * - * @param {object=} defaultOptions Options used by default for the `show` method on the service. - * - * @returns {$$interimElement.$service} - */ - -function InterimElementProvider() { - InterimElementFactory.$inject = ["$document", "$q", "$rootScope", "$timeout", "$rootElement", "$animate", "$mdUtil", "$mdCompiler", "$mdTheming", "$injector", "$exceptionHandler"]; - createInterimElementProvider.$get = InterimElementFactory; - return createInterimElementProvider; - - /** - * Returns a new provider which allows configuration of a new interimElement - * service. Allows configuration of default options & methods for options, - * as well as configuration of 'preset' methods (eg dialog.basic(): basic is a preset method) - */ - function createInterimElementProvider(interimFactoryName) { - factory.$inject = ["$$interimElement", "$injector"]; - var EXPOSED_METHODS = ['onHide', 'onShow', 'onRemove']; - - var customMethods = {}; - var providerConfig = { - presets: {} - }; - - var provider = { - setDefaults: setDefaults, - addPreset: addPreset, - addMethod: addMethod, - $get: factory - }; - - /** - * all interim elements will come with the 'build' preset - */ - provider.addPreset('build', { - methods: ['controller', 'controllerAs', 'resolve', 'multiple', - 'template', 'templateUrl', 'themable', 'transformTemplate', 'parent', 'contentElement'] - }); - - return provider; - - /** - * Save the configured defaults to be used when the factory is instantiated - */ - function setDefaults(definition) { - providerConfig.optionsFactory = definition.options; - providerConfig.methods = (definition.methods || []).concat(EXPOSED_METHODS); - return provider; - } - - /** - * Add a method to the factory that isn't specific to any interim element operations - */ - function addMethod(name, fn) { - customMethods[name] = fn; - return provider; - } - - /** - * Save the configured preset to be used when the factory is instantiated - */ - function addPreset(name, definition) { - definition = definition || {}; - definition.methods = definition.methods || []; - definition.options = definition.options || function() { return {}; }; - - if (/^cancel|hide|show$/.test(name)) { - throw new Error("Preset '" + name + "' in " + interimFactoryName + " is reserved!"); - } - if (definition.methods.indexOf('_options') > -1) { - throw new Error("Method '_options' in " + interimFactoryName + " is reserved!"); - } - providerConfig.presets[name] = { - methods: definition.methods.concat(EXPOSED_METHODS), - optionsFactory: definition.options, - argOption: definition.argOption - }; - return provider; - } - - function addPresetMethod(presetName, methodName, method) { - providerConfig.presets[presetName][methodName] = method; - } - - /** - * Create a factory that has the given methods & defaults implementing interimElement - */ - /* @ngInject */ - function factory($$interimElement, $injector) { - var defaultMethods; - var defaultOptions; - var interimElementService = $$interimElement(); - - /* - * publicService is what the developer will be using. - * It has methods hide(), cancel(), show(), build(), and any other - * presets which were set during the config phase. - */ - var publicService = { - hide: interimElementService.hide, - cancel: interimElementService.cancel, - show: showInterimElement, - - // Special internal method to destroy an interim element without animations - // used when navigation changes causes a $scope.$destroy() action - destroy : destroyInterimElement - }; - - - defaultMethods = providerConfig.methods || []; - // This must be invoked after the publicService is initialized - defaultOptions = invokeFactory(providerConfig.optionsFactory, {}); - - // Copy over the simple custom methods - angular.forEach(customMethods, function(fn, name) { - publicService[name] = fn; - }); - - angular.forEach(providerConfig.presets, function(definition, name) { - var presetDefaults = invokeFactory(definition.optionsFactory, {}); - var presetMethods = (definition.methods || []).concat(defaultMethods); - - // Every interimElement built with a preset has a field called `$type`, - // which matches the name of the preset. - // Eg in preset 'confirm', options.$type === 'confirm' - angular.extend(presetDefaults, { $type: name }); - - // This creates a preset class which has setter methods for every - // method given in the `.addPreset()` function, as well as every - // method given in the `.setDefaults()` function. - // - // @example - // .setDefaults({ - // methods: ['hasBackdrop', 'clickOutsideToClose', 'escapeToClose', 'targetEvent'], - // options: dialogDefaultOptions - // }) - // .addPreset('alert', { - // methods: ['title', 'ok'], - // options: alertDialogOptions - // }) - // - // Set values will be passed to the options when interimElement.show() is called. - function Preset(opts) { - this._options = angular.extend({}, presetDefaults, opts); - } - angular.forEach(presetMethods, function(name) { - Preset.prototype[name] = function(value) { - this._options[name] = value; - return this; - }; - }); - - // Create shortcut method for one-linear methods - if (definition.argOption) { - var methodName = 'show' + name.charAt(0).toUpperCase() + name.slice(1); - publicService[methodName] = function(arg) { - var config = publicService[name](arg); - return publicService.show(config); - }; - } - - // eg $mdDialog.alert() will return a new alert preset - publicService[name] = function(arg) { - // If argOption is supplied, eg `argOption: 'content'`, then we assume - // if the argument is not an options object then it is the `argOption` option. - // - // @example `$mdToast.simple('hello')` // sets options.content to hello - // // because argOption === 'content' - if (arguments.length && definition.argOption && - !angular.isObject(arg) && !angular.isArray(arg)) { - - return (new Preset())[definition.argOption](arg); - - } else { - return new Preset(arg); - } - - }; - }); - - return publicService; - - /** - * - */ - function showInterimElement(opts) { - // opts is either a preset which stores its options on an _options field, - // or just an object made up of options - opts = opts || { }; - if (opts._options) opts = opts._options; - - return interimElementService.show( - angular.extend({}, defaultOptions, opts) - ); - } - - /** - * Special method to hide and destroy an interimElement WITHOUT - * any 'leave` or hide animations ( an immediate force hide/remove ) - * - * NOTE: This calls the onRemove() subclass method for each component... - * which must have code to respond to `options.$destroy == true` - */ - function destroyInterimElement(opts) { - return interimElementService.destroy(opts); - } - - /** - * Helper to call $injector.invoke with a local of the factory name for - * this provider. - * If an $mdDialog is providing options for a dialog and tries to inject - * $mdDialog, a circular dependency error will happen. - * We get around that by manually injecting $mdDialog as a local. - */ - function invokeFactory(factory, defaultVal) { - var locals = {}; - locals[interimFactoryName] = publicService; - return $injector.invoke(factory || function() { return defaultVal; }, {}, locals); - } - } - } - - /* @ngInject */ - function InterimElementFactory($document, $q, $rootScope, $timeout, $rootElement, $animate, - $mdUtil, $mdCompiler, $mdTheming, $injector, $exceptionHandler) { - return function createInterimElementService() { - var SHOW_CANCELLED = false; - - /** - * @ngdoc service - * @name $$interimElementProvider.$service - * - * @description - * A service used to control inserting and removing of an element from the DOM. - * It is used by $mdBottomSheet, $mdDialog, $mdToast, $mdMenu, $mdPanel, and $mdSelect. - */ - var service; - - var showPromises = []; // Promises for the interim's which are currently opening. - var hidePromises = []; // Promises for the interim's which are currently hiding. - var showingInterims = []; // Interim elements which are currently showing up. - - // Publish instance $$interimElement service; - return service = { - show: show, - hide: waitForInterim(hide), - cancel: waitForInterim(cancel), - destroy : destroy, - $injector_: $injector - }; - - /** - * @ngdoc method - * @name $$interimElementProvider.$service#show - * @kind function - * - * @description - * Adds the `$interimElement` to the DOM and returns a special promise that will be resolved - * or rejected with hide or cancel, respectively. - * - * @param {Object} options map of options and values - * @returns {Promise} a Promise that will be resolved when hide() is called or rejected when - * cancel() is called. - */ - function show(options) { - options = options || {}; - var interimElement = new InterimElement(options || {}); - - // When an interim element is currently showing, we have to cancel it. - // Just hiding it, will resolve the InterimElement's promise, the promise should be - // rejected instead. - var hideAction = options.multiple ? $q.resolve() : $q.all(showPromises); - - if (!options.multiple) { - // Wait for all opening interim's to finish their transition. - hideAction = hideAction.then(function() { - // Wait for all closing and showing interim's to be completely closed. - var promiseArray = hidePromises.concat(showingInterims.map(service.cancel)); - return $q.all(promiseArray); - }); - } - - var showAction = hideAction.then(function() { - - return interimElement - .show() - .then(function () { - showingInterims.push(interimElement); - }) - .catch(function (reason) { - return reason; - }) - .finally(function() { - showPromises.splice(showPromises.indexOf(showAction), 1); - }); - - }); - - showPromises.push(showAction); - - // In AngularJS 1.6+, exceptions inside promises will cause a rejection. We need to handle - // the rejection and only log it if it's an error. - interimElement.deferred.promise.catch(function(fault) { - if (fault instanceof Error) { - $exceptionHandler(fault); - } - - return fault; - }); - - // Return a promise that will be resolved when the interim - // element is hidden or cancelled... - return interimElement.deferred.promise; - } - - /** - * @ngdoc method - * @name $$interimElementProvider.$service#hide - * @kind function - * - * @description - * Removes the `$interimElement` from the DOM and resolves the Promise returned from `show()`. - * - * @param {*} reason Data used to resolve the Promise - * @param {object} options map of options and values - * @returns {Promise} a Promise that will be resolved after the element has been removed - * from the DOM. - */ - function hide(reason, options) { - options = options || {}; - - if (options.closeAll) { - // We have to make a shallow copy of the array, because otherwise the map will break. - return $q.all(showingInterims.slice().reverse().map(closeElement)); - } else if (options.closeTo !== undefined) { - return $q.all(showingInterims.slice(options.closeTo).map(closeElement)); - } - - // Hide the latest showing interim element. - return closeElement(showingInterims[showingInterims.length - 1]); - - /** - * @param {InterimElement} interim element to close - * @returns {Promise} - */ - function closeElement(interim) { - if (!interim) { - return $q.when(reason); - } - - var hideAction = interim - .remove(reason, false, options || { }) - .catch(function(reason) { return reason; }) - .finally(function() { - hidePromises.splice(hidePromises.indexOf(hideAction), 1); - }); - - showingInterims.splice(showingInterims.indexOf(interim), 1); - hidePromises.push(hideAction); - - return interim.deferred.promise; - } - } - - /** - * @ngdoc method - * @name $$interimElementProvider.$service#cancel - * @kind function - * - * @description - * Removes the `$interimElement` from the DOM and rejects the Promise returned from `show()`. - * - * @param {*} reason Data used to resolve the Promise - * @param {object} options map of options and values - * @returns {Promise} Promise that will be resolved after the element has been removed - * from the DOM. - */ - function cancel(reason, options) { - var interim = showingInterims.pop(); - if (!interim) { - return $q.when(reason); - } - - var cancelAction = interim - .remove(reason, true, options || {}) - .catch(function(reason) { return reason; }) - .finally(function() { - hidePromises.splice(hidePromises.indexOf(cancelAction), 1); - }); - - hidePromises.push(cancelAction); - - // Since AngularJS 1.6.7, promises will be logged to $exceptionHandler when the promise - // is not handling the rejection. We create a pseudo catch handler, which will prevent the - // promise from being logged to the $exceptionHandler. - return interim.deferred.promise.catch(angular.noop); - } - - /** - * Creates a function to wait for at least one interim element to be available. - * @param callbackFn Function to be used as callback - * @returns {Function} - */ - function waitForInterim(callbackFn) { - return function() { - var fnArguments = arguments; - - if (!showingInterims.length) { - // When there are still interim's opening, then wait for the first interim element to - // finish its open animation. - if (showPromises.length) { - return showPromises[0].finally(function () { - return callbackFn.apply(service, fnArguments); - }); - } - - return $q.when("No interim elements currently showing up."); - } - - return callbackFn.apply(service, fnArguments); - }; - } - - /** - * @ngdoc method - * @name $$interimElementProvider.$service#destroy - * @kind function - * - * Special method to quick-remove the interim element without running animations. This is - * useful when the parent component has been or is being destroyed. - * - * Note: interim elements are in "interim containers". - */ - function destroy(targetEl) { - var interim = !targetEl ? showingInterims.shift() : null; - - var parentEl = angular.element(targetEl).length && angular.element(targetEl)[0].parentNode; - - if (parentEl) { - // Try to find the interim in the stack which corresponds to the supplied DOM element. - var filtered = showingInterims.filter(function(entry) { - return entry.options.element[0] === parentEl; - }); - - // Note: This function might be called when the element already has been removed, - // in which case we won't find any matches. - if (filtered.length) { - interim = filtered[0]; - showingInterims.splice(showingInterims.indexOf(interim), 1); - } - } - - return interim ? interim.remove(SHOW_CANCELLED, false, { '$destroy': true }) : - $q.when(SHOW_CANCELLED); - } - - /* - * Internal Interim Element Object - * Used internally to manage the DOM element and related data - */ - function InterimElement(options) { - var self, element, showAction = $q.when(true); - - options = configureScopeAndTransitions(options); - - return self = { - options : options, - deferred: $q.defer(), - show : createAndTransitionIn, - remove : transitionOutAndRemove - }; - - /** - * Compile, link, and show this interim element. Use optional autoHide and transition-in - * effects. - * @return {Q.Promise} - */ - function createAndTransitionIn() { - return $q(function(resolve, reject) { - - // Trigger onCompiling callback before the compilation starts. - // This is useful, when modifying options, which can be influenced by developers. - options.onCompiling && options.onCompiling(options); - - compileElement(options) - .then(function(compiledData) { - element = linkElement(compiledData, options); - - // Expose the cleanup function from the compiler. - options.cleanupElement = compiledData.cleanup; - - showAction = showElement(element, options, compiledData.controller) - .then(resolve, rejectAll); - }).catch(rejectAll); - - function rejectAll(fault) { - // Force the '$md.show()' promise to reject - self.deferred.reject(fault); - - // Continue rejection propagation - reject(fault); - } - }); - } - - /** - * After the show process has finished/rejected: - * - announce 'removing', - * - perform the transition-out, and - * - perform optional clean up scope. - */ - function transitionOutAndRemove(response, isCancelled, opts) { - - // abort if the show() and compile failed - if (!element) return $q.when(false); - - options = angular.extend(options || {}, opts || {}); - options.cancelAutoHide && options.cancelAutoHide(); - options.element.triggerHandler('$mdInterimElementRemove'); - - if (options.$destroy === true) { - - return hideElement(options.element, options).then(function(){ - (isCancelled && rejectAll(response)) || resolveAll(response); - }); - - } else { - $q.when(showAction).finally(function() { - hideElement(options.element, options).then(function() { - isCancelled ? rejectAll(response) : resolveAll(response); - }, rejectAll); - }); - - return self.deferred.promise; - } - - - /** - * The `show()` returns a promise that will be resolved when the interim - * element is hidden or cancelled... - */ - function resolveAll(response) { - self.deferred.resolve(response); - } - - /** - * Force the '$md.show()' promise to reject - */ - function rejectAll(fault) { - self.deferred.reject(fault); - } - } - - /** - * Prepare optional isolated scope and prepare $animate with default enter and leave - * transitions for the new element instance. - */ - function configureScopeAndTransitions(options) { - options = options || { }; - if (options.template) { - options.template = $mdUtil.processTemplate(options.template); - } - - return angular.extend({ - preserveScope: false, - cancelAutoHide : angular.noop, - scope: options.scope || $rootScope.$new(options.isolateScope), - - /** - * Default usage to enable $animate to transition-in; can be easily overridden via 'options' - */ - onShow: function transitionIn(scope, element, options) { - return $animate.enter(element, options.parent); - }, - - /** - * Default usage to enable $animate to transition-out; can be easily overridden via 'options' - */ - onRemove: function transitionOut(scope, element) { - // Element could be undefined if a new element is shown before - // the old one finishes compiling. - return element && $animate.leave(element) || $q.when(); - } - }, options); - - } - - /** - * Compile an element with a templateUrl, controller, and locals - * @param {Object} options - * @return {Q.Promise<{element: JQLite=, link: Function, locals: Object, cleanup: any=, - * controller: Object=}>} - */ - function compileElement(options) { - - var compiled = !options.skipCompile ? $mdCompiler.compile(options) : null; - - return compiled || $q(function (resolve) { - resolve({ - locals: {}, - link: function () { - return options.element; - } - }); - }); - } - - /** - * Link an element with compiled configuration - * @param {{element: JQLite=, link: Function, locals: Object, controller: Object=}} compileData - * @param {Object} options - * @return {JQLite} - */ - function linkElement(compileData, options) { - angular.extend(compileData.locals, options); - - var element = compileData.link(options.scope); - - // Search for parent at insertion time, if not specified - options.element = element; - options.parent = findParent(element, options); - if (options.themable) $mdTheming(element); - - return element; - } - - /** - * Search for parent at insertion time, if not specified. - * @param {JQLite} element - * @param {Object} options - * @return {JQLite} - */ - function findParent(element, options) { - var parent = options.parent; - - // Search for parent at insertion time, if not specified - if (angular.isFunction(parent)) { - parent = parent(options.scope, element, options); - } else if (angular.isString(parent)) { - parent = angular.element($document[0].querySelector(parent)); - } else { - parent = angular.element(parent); - } - - // If parent querySelector/getter function fails, or it's just null, - // find a default. - if (!(parent || {}).length) { - var el; - if ($rootElement[0] && $rootElement[0].querySelector) { - el = $rootElement[0].querySelector(':not(svg) > body'); - } - if (!el) el = $rootElement[0]; - if (el.nodeName === '#comment') { - el = $document[0].body; - } - return angular.element(el); - } - - return parent; - } - - /** - * If auto-hide is enabled, start timer and prepare cancel function - */ - function startAutoHide() { - var autoHideTimer, cancelAutoHide = angular.noop; - - if (options.hideDelay) { - autoHideTimer = $timeout(service.hide, options.hideDelay) ; - cancelAutoHide = function() { - $timeout.cancel(autoHideTimer); - }; - } - - // Cache for subsequent use - options.cancelAutoHide = function() { - cancelAutoHide(); - options.cancelAutoHide = undefined; - }; - } - - /** - * Show the element (with transitions), notify complete and start optional auto hiding - * timer. - * @param {JQLite} element - * @param {Object} options - * @param {Object} controller - * @return {Q.Promise} - */ - function showElement(element, options, controller) { - // Trigger onShowing callback before the `show()` starts - var notifyShowing = options.onShowing || angular.noop; - // Trigger onComplete callback when the `show()` finishes - var notifyComplete = options.onComplete || angular.noop; - - // Necessary for consistency between AngularJS 1.5 and 1.6. - try { - // This fourth controller parameter is used by $mdDialog in beforeShow(). - notifyShowing(options.scope, element, options, controller); - } catch (e) { - return $q.reject(e); - } - - return $q(function (resolve, reject) { - try { - // Start transitionIn - $q.when(options.onShow(options.scope, element, options)) - .then(function () { - notifyComplete(options.scope, element, options); - startAutoHide(); - - resolve(element); - }, reject); - - } catch (e) { - reject(e.message); - } - }); - } - - function hideElement(element, options) { - var announceRemoving = options.onRemoving || angular.noop; - - return $q(function (resolve, reject) { - try { - // Start transitionIn - var action = $q.when(options.onRemove(options.scope, element, options) || true); - - // Trigger callback *before* the remove operation starts - announceRemoving(element, action); - - if (options.$destroy) { - // For $destroy, onRemove should be synchronous - resolve(element); - - if (!options.preserveScope && options.scope) { - // scope destroy should still be be done after the current digest is done - action.then(function() { options.scope.$destroy(); }); - } - } else { - // Wait until transition-out is done - action.then(function () { - if (!options.preserveScope && options.scope) { - options.scope.$destroy(); - } - - resolve(element); - }, reject); - } - } catch (e) { - reject(e.message); - } - }); - } - - } - }; - } -} - -})(); -(function(){ -"use strict"; - -(function() { - 'use strict'; - - var $mdUtil, $interpolate, $log; - - var SUFFIXES = /(-gt)?-(sm|md|lg|print)/g; - var WHITESPACE = /\s+/g; - - var FLEX_OPTIONS = ['grow', 'initial', 'auto', 'none', 'noshrink', 'nogrow']; - var LAYOUT_OPTIONS = ['row', 'column']; - var ALIGNMENT_MAIN_AXIS= ["", "start", "center", "end", "stretch", "space-around", "space-between"]; - var ALIGNMENT_CROSS_AXIS= ["", "start", "center", "end", "stretch"]; - - var config = { - /** - * Enable directive attribute-to-class conversions - * Developers can use `` to quickly - * disable the Layout directives and prohibit the injection of Layout classNames - */ - enabled: true, - - /** - * List of mediaQuery breakpoints and associated suffixes - * [ - * { suffix: "sm", mediaQuery: "screen and (max-width: 599px)" }, - * { suffix: "md", mediaQuery: "screen and (min-width: 600px) and (max-width: 959px)" } - * ] - */ - breakpoints: [] - }; - - registerLayoutAPI(angular.module('material.core.layout', ['ng'])); - - /** - * registerLayoutAPI() - * - * The original AngularJS Material Layout solution used attribute selectors and CSS. - * - * ```html - *
    My Content
    - * ``` - * - * ```css - * [layout] { - * box-sizing: border-box; - * display:flex; - * } - * [layout=column] { - * flex-direction : column - * } - * ``` - * - * Use of attribute selectors creates significant performance impacts in some - * browsers... mainly IE. - * - * This module registers directives that allow the same layout attributes to be - * interpreted and converted to class selectors. The directive will add equivalent classes to - * each element that contains a Layout directive. - * - * ```html - *
    My Content
    - * ``` - * - * ```css - * .layout { - * box-sizing: border-box; - * display:flex; - * } - * .layout-column { - * flex-direction : column - * } - * ``` - */ - function registerLayoutAPI(module){ - var PREFIX_REGEXP = /^((?:x|data)[:\-_])/i; - var SPECIAL_CHARS_REGEXP = /([:\-_]+(.))/g; - - // NOTE: these are also defined in constants::MEDIA_PRIORITY and constants::MEDIA - var BREAKPOINTS = ["", "xs", "gt-xs", "sm", "gt-sm", "md", "gt-md", "lg", "gt-lg", "xl", "print"]; - var API_WITH_VALUES = ["layout", "flex", "flex-order", "flex-offset", "layout-align"]; - var API_NO_VALUES = ["show", "hide", "layout-padding", "layout-margin"]; - - - // Build directive registration functions for the standard Layout API... for all breakpoints. - angular.forEach(BREAKPOINTS, function(mqb) { - - // Attribute directives with expected, observable value(s) - angular.forEach(API_WITH_VALUES, function(name){ - var fullName = mqb ? name + "-" + mqb : name; - module.directive(directiveNormalize(fullName), attributeWithObserve(fullName)); - }); - - // Attribute directives with no expected value(s) - angular.forEach(API_NO_VALUES, function(name){ - var fullName = mqb ? name + "-" + mqb : name; - module.directive(directiveNormalize(fullName), attributeWithoutValue(fullName)); - }); - - }); - - // Register other, special directive functions for the Layout features: - module - .provider('$$mdLayout', function() { - // Publish internal service for Layouts - return { - $get : angular.noop, - validateAttributeValue : validateAttributeValue, - validateAttributeUsage : validateAttributeUsage, - /** - * Easy way to disable/enable the Layout API. - * When disabled, this stops all attribute-to-classname generations - */ - disableLayouts : function(isDisabled) { - config.enabled = (isDisabled !== true); - } - }; - }) - - .directive('mdLayoutCss' , disableLayoutDirective) - .directive('ngCloak' , buildCloakInterceptor('ng-cloak')) - - .directive('layoutWrap' , attributeWithoutValue('layout-wrap')) - .directive('layoutNowrap' , attributeWithoutValue('layout-nowrap')) - .directive('layoutNoWrap' , attributeWithoutValue('layout-no-wrap')) - .directive('layoutFill' , attributeWithoutValue('layout-fill')) - - // Determine if - .config(detectDisabledLayouts); - - /** - * Converts snake_case to camelCase. - * Also there is special case for Moz prefix starting with upper case letter. - * @param name Name to normalize - */ - function directiveNormalize(name) { - return name - .replace(PREFIX_REGEXP, '') - .replace(SPECIAL_CHARS_REGEXP, function(_, separator, letter, offset) { - return offset ? letter.toUpperCase() : letter; - }); - } - } - - - /** - * Detect if any of the HTML tags has a [md-layouts-disabled] attribute; - * If yes, then immediately disable all layout API features - * - * Note: this attribute should be specified on either the HTML or BODY tags - * @ngInject - */ - function detectDisabledLayouts() { - var isDisabled = !!document.querySelector('[md-layouts-disabled]'); - config.enabled = !isDisabled; - } - - /** - * Special directive that will disable ALL Layout conversions of layout - * attribute(s) to classname(s). - * - * - * - * - * - * ... - * - * - * Note: Using md-layout-css directive requires the developer to load the Material - * Layout Attribute stylesheet (which only uses attribute selectors): - * - * `angular-material.layout.css` - * - * Another option is to use the LayoutProvider to configure and disable the attribute - * conversions; this would obviate the use of the `md-layout-css` directive - */ - function disableLayoutDirective() { - // Return a 1x-only, first-match attribute directive - config.enabled = false; - - return { - restrict : 'A', - priority : '900' - }; - } - - /** - * Tail-hook ngCloak to delay the uncloaking while Layout transformers - * finish processing. Eliminates flicker with Material.Layouts - */ - function buildCloakInterceptor(className) { - return ['$timeout', function($timeout){ - return { - restrict : 'A', - priority : -10, // run after normal ng-cloak - compile : function(element) { - if (!config.enabled) return angular.noop; - - // Re-add the cloak - element.addClass(className); - - return function(scope, element) { - // Wait while layout injectors configure, then uncloak - // NOTE: $rAF does not delay enough... and this is a 1x-only event, - // $timeout is acceptable. - $timeout(function(){ - element.removeClass(className); - }, 10, false); - }; - } - }; - }]; - } - - - // ********************************************************************************* - // - // These functions create registration functions for AngularJS Material Layout attribute - // directives. This provides easy translation to switch AngularJS Material attribute selectors to - // CLASS selectors and directives; which has huge performance implications for IE Browsers. - // - // ********************************************************************************* - - /** - * Creates a directive registration function where a possible dynamic attribute - * value will be observed/watched. - * @param {string} className attribute name; eg `layout-gt-md` with value ="row" - */ - function attributeWithObserve(className) { - - return ['$mdUtil', '$interpolate', "$log", function(_$mdUtil_, _$interpolate_, _$log_) { - $mdUtil = _$mdUtil_; - $interpolate = _$interpolate_; - $log = _$log_; - - return { - restrict: 'A', - compile: function(element, attr) { - var linkFn; - if (config.enabled) { - // immediately replace static (non-interpolated) invalid values... - - validateAttributeUsage(className, attr, element, $log); - - validateAttributeValue(className, - getNormalizedAttrValue(className, attr, ""), - buildUpdateFn(element, className, attr) - ); - - linkFn = translateWithValueToCssClass; - } - - // Use for postLink to account for transforms after ng-transclude. - return linkFn || angular.noop; - } - }; - }]; - - /** - * Observe deprecated layout attributes and update the element's layout classes to match. - */ - function translateWithValueToCssClass(scope, element, attrs) { - var updateFn = updateClassWithValue(element, className, attrs); - var unwatch = attrs.$observe(attrs.$normalize(className), updateFn); - - updateFn(getNormalizedAttrValue(className, attrs, "")); - scope.$on("$destroy", function() { unwatch(); }); - } - } - - /** - * Creates a registration function for AngularJS Material Layout attribute directive. - * This is a `simple` transpose of attribute usage to class usage; where we ignore - * any attribute value. - */ - function attributeWithoutValue(className) { - return ['$mdUtil', '$interpolate', "$log", function(_$mdUtil_, _$interpolate_, _$log_) { - $mdUtil = _$mdUtil_; - $interpolate = _$interpolate_; - $log = _$log_; - - return { - restrict: 'A', - compile: function(element, attr) { - var linkFn; - if (config.enabled) { - // immediately replace static (non-interpolated) invalid values... - - validateAttributeValue(className, - getNormalizedAttrValue(className, attr, ""), - buildUpdateFn(element, className, attr) - ); - - translateToCssClass(null, element); - - // Use for postLink to account for transforms after ng-transclude. - linkFn = translateToCssClass; - } - - return linkFn || angular.noop; - } - }; - }]; - - /** - * Add transformed class selector. - */ - function translateToCssClass(scope, element) { - element.addClass(className); - } - } - - /** - * After link-phase, do NOT remove deprecated layout attribute selector. - * Instead watch the attribute so interpolated data-bindings to layout - * selectors will continue to be supported. - * - * $observe() the className and update with new class (after removing the last one) - * - * e.g. `layout="{{layoutDemo.direction}}"` will update... - * - * NOTE: The value must match one of the specified styles in the CSS. - * For example `flex-gt-md="{{size}}` where `scope.size == 47` will NOT work since - * only breakpoints for 0, 5, 10, 15... 100, 33, 34, 66, 67 are defined. - */ - function updateClassWithValue(element, className) { - var lastClass; - - return function updateClassFn(newValue) { - var value = validateAttributeValue(className, newValue || ""); - if (angular.isDefined(value)) { - if (lastClass) element.removeClass(lastClass); - lastClass = !value ? className : className + "-" + value.trim().replace(WHITESPACE, "-"); - element.addClass(lastClass); - } - }; - } - - /** - * Centralize warnings for known flexbox issues (especially IE-related issues) - */ - function validateAttributeUsage(className, attr, element, $log){ - var message, usage, url; - var nodeName = element[0].nodeName.toLowerCase(); - - switch (className.replace(SUFFIXES,"")) { - case "flex": - if ((nodeName === "md-button") || (nodeName === "fieldset")){ - // @see https://github.com/philipwalton/flexbugs#9-some-html-elements-cant-be-flex-containers - // Use
    wrapper inside (preferred) or outside - - usage = "<" + nodeName + " " + className + ">"; - url = "https://github.com/philipwalton/flexbugs#9-some-html-elements-cant-be-flex-containers"; - message = "Markup '{0}' may not work as expected in IE Browsers. Consult '{1}' for details."; - - $log.warn($mdUtil.supplant(message, [usage, url])); - } - } - } - - - /** - * For the Layout attribute value, validate or replace with default fallback value. - */ - function validateAttributeValue(className, value, updateFn) { - var origValue = value; - - if (!needsInterpolation(value)) { - switch (className.replace(SUFFIXES,"")) { - case 'layout' : - if (!findIn(value, LAYOUT_OPTIONS)) { - value = LAYOUT_OPTIONS[0]; // 'row'; - } - break; - - case 'flex' : - if (!findIn(value, FLEX_OPTIONS)) { - if (isNaN(value)) { - value = ''; - } - } - break; - - case 'flex-offset' : - case 'flex-order' : - if (!value || isNaN(+value)) { - value = '0'; - } - break; - - case 'layout-align' : - var axis = extractAlignAxis(value); - value = $mdUtil.supplant("{main}-{cross}",axis); - break; - - case 'layout-padding' : - case 'layout-margin' : - case 'layout-fill' : - case 'layout-wrap' : - case 'layout-nowrap' : - value = ''; - break; - } - - if (value !== origValue) { - (updateFn || angular.noop)(value); - } - } - - return value ? value.trim() : ""; - } - - /** - * Replace current attribute value with fallback value - */ - function buildUpdateFn(element, className, attrs) { - return function updateAttrValue(fallback) { - if (!needsInterpolation(fallback)) { - // Do not modify the element's attribute value; so - // uses '' will not - // be affected. Just update the attrs value. - attrs[attrs.$normalize(className)] = fallback; - } - }; - } - - /** - * See if the original value has interpolation symbols: - * e.g. flex-gt-md="{{triggerPoint}}" - */ - function needsInterpolation(value) { - return (value || "").indexOf($interpolate.startSymbol()) > -1; - } - - function getNormalizedAttrValue(className, attrs, defaultVal) { - var normalizedAttr = attrs.$normalize(className); - return attrs[normalizedAttr] ? attrs[normalizedAttr].trim().replace(WHITESPACE, "-") : - defaultVal || null; - } - - function findIn(item, list, replaceWith) { - item = replaceWith && item ? item.replace(WHITESPACE, replaceWith) : item; - - var found = false; - if (item) { - list.forEach(function(it) { - it = replaceWith ? it.replace(WHITESPACE, replaceWith) : it; - found = found || (it === item); - }); - } - return found; - } - - function extractAlignAxis(attrValue) { - var axis = { - main : "start", - cross: "stretch" - }, values; - - attrValue = (attrValue || ""); - - if (attrValue.indexOf("-") === 0 || attrValue.indexOf(" ") === 0) { - // For missing main-axis values - attrValue = "none" + attrValue; - } - - values = attrValue.toLowerCase().trim().replace(WHITESPACE, "-").split("-"); - if (values.length && (values[0] === "space")) { - // for main-axis values of "space-around" or "space-between" - values = [values[0]+"-"+values[1],values[2]]; - } - - if (values.length > 0) axis.main = values[0] || axis.main; - if (values.length > 1) axis.cross = values[1] || axis.cross; - - if (ALIGNMENT_MAIN_AXIS.indexOf(axis.main) < 0) axis.main = "start"; - if (ALIGNMENT_CROSS_AXIS.indexOf(axis.cross) < 0) axis.cross = "stretch"; - - return axis; - } -})(); - -})(); -(function(){ -"use strict"; - -/** - * @ngdoc module - * @name material.core.liveannouncer - * @description - * AngularJS Material Live Announcer to provide accessibility for Voice Readers. - */ -MdLiveAnnouncer.$inject = ["$timeout"]; -angular - .module('material.core') - .service('$mdLiveAnnouncer', MdLiveAnnouncer); - -/** - * @ngdoc service - * @name $mdLiveAnnouncer - * @module material.core.liveannouncer - * - * @description - * - * Service to announce messages to supported screenreaders. - * - * > The `$mdLiveAnnouncer` service is internally used for components to provide proper accessibility. - * - * - * module.controller('AppCtrl', function($mdLiveAnnouncer) { - * // Basic announcement (Polite Mode) - * $mdLiveAnnouncer.announce('Hey Google'); - * - * // Custom announcement (Assertive Mode) - * $mdLiveAnnouncer.announce('Hey Google', 'assertive'); - * }); - * - * - */ -function MdLiveAnnouncer($timeout) { - /** @private @const @type {!angular.$timeout} */ - this._$timeout = $timeout; - - /** @private @const @type {!HTMLElement} */ - this._liveElement = this._createLiveElement(); - - /** @private @const @type {!number} */ - this._announceTimeout = 100; -} - -/** - * @ngdoc method - * @name $mdLiveAnnouncer#announce - * @description Announces messages to supported screenreaders. - * @param {string} message Message to be announced to the screenreader - * @param {'off'|'polite'|'assertive'} politeness The politeness of the announcer element. - */ -MdLiveAnnouncer.prototype.announce = function(message, politeness) { - if (!politeness) { - politeness = 'polite'; - } - - var self = this; - - self._liveElement.textContent = ''; - self._liveElement.setAttribute('aria-live', politeness); - - // This 100ms timeout is necessary for some browser + screen-reader combinations: - // - Both JAWS and NVDA over IE11 will not announce anything without a non-zero timeout. - // - With Chrome and IE11 with NVDA or JAWS, a repeated (identical) message won't be read a - // second time without clearing and then using a non-zero delay. - // (using JAWS 17 at time of this writing). - self._$timeout(function() { - self._liveElement.textContent = message; - }, self._announceTimeout, false); -}; - -/** - * Creates a live announcer element, which listens for DOM changes and announces them - * to the screenreaders. - * @returns {!HTMLElement} - * @private - */ -MdLiveAnnouncer.prototype._createLiveElement = function() { - var liveEl = document.createElement('div'); - - liveEl.classList.add('md-visually-hidden'); - liveEl.setAttribute('role', 'status'); - liveEl.setAttribute('aria-atomic', 'true'); - liveEl.setAttribute('aria-live', 'polite'); - - document.body.appendChild(liveEl); - - return liveEl; -}; - -})(); -(function(){ -"use strict"; - -/** - * @ngdoc service - * @name $$mdMeta - * @module material.core.meta - * - * @description - * - * A provider and a service that simplifies meta tags access - * - * Note: This is intended only for use with dynamic meta tags such as browser color and title. - * Tags that are only processed when the page is rendered (such as `charset`, and `http-equiv`) - * will not work since `$$mdMeta` adds the tags after the page has already been loaded. - * - * ```js - * app.config(function($$mdMetaProvider) { - * var removeMeta = $$mdMetaProvider.setMeta('meta-name', 'content'); - * var metaValue = $$mdMetaProvider.getMeta('meta-name'); // -> 'content' - * - * removeMeta(); - * }); - * - * app.controller('myController', function($$mdMeta) { - * var removeMeta = $$mdMeta.setMeta('meta-name', 'content'); - * var metaValue = $$mdMeta.getMeta('meta-name'); // -> 'content' - * - * removeMeta(); - * }); - * ``` - * - * @returns {$$mdMeta.$service} - * - */ -angular.module('material.core.meta', []) - .provider('$$mdMeta', function () { - var head = angular.element(document.head); - var metaElements = {}; - - /** - * Checks if the requested element was written manually and maps it - * - * @param {string} name meta tag 'name' attribute value - * @returns {boolean} returns true if there is an element with the requested name - */ - function mapExistingElement(name) { - if (metaElements[name]) { - return true; - } - - var element = document.getElementsByName(name)[0]; - - if (!element) { - return false; - } - - metaElements[name] = angular.element(element); - - return true; - } - - /** - * @ngdoc method - * @name $$mdMeta#setMeta - * - * @description - * Creates meta element with the 'name' and 'content' attributes, - * if the meta tag is already created than we replace the 'content' value - * - * @param {string} name meta tag 'name' attribute value - * @param {string} content meta tag 'content' attribute value - * @returns {function} remove function - * - */ - function setMeta(name, content) { - mapExistingElement(name); - - if (!metaElements[name]) { - var newMeta = angular.element(''); - head.append(newMeta); - metaElements[name] = newMeta; - } - else { - metaElements[name].attr('content', content); - } - - return function () { - metaElements[name].attr('content', ''); - metaElements[name].remove(); - delete metaElements[name]; - }; - } - - /** - * @ngdoc method - * @name $$mdMeta#getMeta - * - * @description - * Gets the 'content' attribute value of the wanted meta element - * - * @param {string} name meta tag 'name' attribute value - * @returns {string} content attribute value - */ - function getMeta(name) { - if (!mapExistingElement(name)) { - throw Error('$$mdMeta: could not find a meta tag with the name \'' + name + '\''); - } - - return metaElements[name].attr('content'); - } - - var module = { - setMeta: setMeta, - getMeta: getMeta - }; - - return angular.extend({}, module, { - $get: function () { - return module; - } - }); - }); -})(); -(function(){ -"use strict"; - - /** - * @ngdoc module - * @name material.core.componentRegistry - * - * @description - * A component instance registration service. - * Note: currently this as a private service in the SideNav component. - */ - ComponentRegistry.$inject = ["$log", "$q"]; - angular.module('material.core') - .factory('$mdComponentRegistry', ComponentRegistry); - - /* - * @private - * @ngdoc factory - * @name ComponentRegistry - * @module material.core.componentRegistry - * - */ - function ComponentRegistry($log, $q) { - - var self; - var instances = []; - var pendings = { }; - - return self = { - /** - * Used to print an error when an instance for a handle isn't found. - */ - notFoundError: function(handle, msgContext) { - $log.error((msgContext || "") + 'No instance found for handle', handle); - }, - /** - * Return all registered instances as an array. - */ - getInstances: function() { - return instances; - }, - - /** - * Get a registered instance. - * @param handle the String handle to look up for a registered instance. - */ - get: function(handle) { - if (!isValidID(handle)) return null; - - var i, j, instance; - for (i = 0, j = instances.length; i < j; i++) { - instance = instances[i]; - if (instance.$$mdHandle === handle) { - return instance; - } - } - return null; - }, - - /** - * Register an instance. - * @param instance the instance to register - * @param handle the handle to identify the instance under. - */ - register: function(instance, handle) { - if (!handle) return angular.noop; - - instance.$$mdHandle = handle; - instances.push(instance); - resolveWhen(); - - return deregister; - - /** - * Remove registration for an instance - */ - function deregister() { - var index = instances.indexOf(instance); - if (index !== -1) { - instances.splice(index, 1); - } - } - - /** - * Resolve any pending promises for this instance - */ - function resolveWhen() { - var dfd = pendings[handle]; - if (dfd) { - dfd.forEach(function (promise) { - promise.resolve(instance); - }); - delete pendings[handle]; - } - } - }, - - /** - * Async accessor to registered component instance - * If not available then a promise is created to notify - * all listeners when the instance is registered. - */ - when : function(handle) { - if (isValidID(handle)) { - var deferred = $q.defer(); - var instance = self.get(handle); - - if (instance) { - deferred.resolve(instance); - } else { - if (pendings[handle] === undefined) { - pendings[handle] = []; - } - pendings[handle].push(deferred); - } - - return deferred.promise; - } - return $q.reject("Invalid `md-component-id` value."); - } - - }; - - function isValidID(handle){ - return handle && (handle !== ""); - } - - } - -})(); -(function(){ -"use strict"; - -(function() { - 'use strict'; - - /** - * @ngdoc service - * @name $mdButtonInkRipple - * @module material.core - * - * @description - * Provides ripple effects for md-button. See $mdInkRipple service for all possible configuration options. - * - * @param {object=} scope Scope within the current context - * @param {object=} element The element the ripple effect should be applied to - * @param {object=} options (Optional) Configuration options to override the default ripple configuration - */ - - MdButtonInkRipple.$inject = ["$mdInkRipple"]; - angular.module('material.core') - .factory('$mdButtonInkRipple', MdButtonInkRipple); - - function MdButtonInkRipple($mdInkRipple) { - return { - attach: function attachRipple(scope, element, options) { - options = angular.extend(optionsForElement(element), options); - - return $mdInkRipple.attach(scope, element, options); - } - }; - - function optionsForElement(element) { - if (element.hasClass('md-icon-button')) { - return { - isMenuItem: element.hasClass('md-menu-item'), - fitRipple: true, - center: true - }; - } else { - return { - isMenuItem: element.hasClass('md-menu-item'), - dimBackground: true - }; - } - } - } -})(); - -})(); -(function(){ -"use strict"; - -(function() { - 'use strict'; - - /** - * @ngdoc service - * @name $mdCheckboxInkRipple - * @module material.core - * - * @description - * Provides ripple effects for md-checkbox. See $mdInkRipple service for all possible configuration options. - * - * @param {object=} scope Scope within the current context - * @param {object=} element The element the ripple effect should be applied to - * @param {object=} options (Optional) Configuration options to override the defaultripple configuration - */ - - MdCheckboxInkRipple.$inject = ["$mdInkRipple"]; - angular.module('material.core') - .factory('$mdCheckboxInkRipple', MdCheckboxInkRipple); - - function MdCheckboxInkRipple($mdInkRipple) { - return { - attach: attach - }; - - function attach(scope, element, options) { - return $mdInkRipple.attach(scope, element, angular.extend({ - center: true, - dimBackground: false, - fitRipple: true - }, options)); - } - } -})(); - -})(); -(function(){ -"use strict"; - -(function() { - 'use strict'; - - /** - * @ngdoc service - * @name $mdListInkRipple - * @module material.core - * - * @description - * Provides ripple effects for md-list. See $mdInkRipple service for all possible configuration options. - * - * @param {object=} scope Scope within the current context - * @param {object=} element The element the ripple effect should be applied to - * @param {object=} options (Optional) Configuration options to override the defaultripple configuration - */ - - MdListInkRipple.$inject = ["$mdInkRipple"]; - angular.module('material.core') - .factory('$mdListInkRipple', MdListInkRipple); - - function MdListInkRipple($mdInkRipple) { - return { - attach: attach - }; - - function attach(scope, element, options) { - return $mdInkRipple.attach(scope, element, angular.extend({ - center: false, - dimBackground: true, - outline: false, - rippleSize: 'full' - }, options)); - } - } -})(); - -})(); -(function(){ -"use strict"; - -/** - * @ngdoc module - * @name material.core.ripple - * @description - * Ripple - */ -InkRippleCtrl.$inject = ["$scope", "$element", "rippleOptions", "$window", "$timeout", "$mdUtil", "$mdColorUtil"]; -InkRippleDirective.$inject = ["$mdButtonInkRipple", "$mdCheckboxInkRipple"]; -angular.module('material.core') - .provider('$mdInkRipple', InkRippleProvider) - .directive('mdInkRipple', InkRippleDirective) - .directive('mdNoInk', attrNoDirective) - .directive('mdNoBar', attrNoDirective) - .directive('mdNoStretch', attrNoDirective); - -var DURATION = 450; - -/** - * @ngdoc directive - * @name mdInkRipple - * @module material.core.ripple - * - * @description - * The `md-ink-ripple` directive allows you to specify the ripple color or if a ripple is allowed. - * - * @param {string|boolean} md-ink-ripple A color string `#FF0000` or boolean (`false` or `0`) for - * preventing ripple - * - * @usage - * ### String values - * - * - * Ripples in red - * - * - * - * Not rippling - * - * - * - * ### Interpolated values - * - * - * Ripples with the return value of 'randomColor' function - * - * - * - * Ripples if 'canRipple' function return value is not 'false' or '0' - * - * - */ -function InkRippleDirective ($mdButtonInkRipple, $mdCheckboxInkRipple) { - return { - controller: angular.noop, - link: function (scope, element, attr) { - attr.hasOwnProperty('mdInkRippleCheckbox') - ? $mdCheckboxInkRipple.attach(scope, element) - : $mdButtonInkRipple.attach(scope, element); - } - }; -} - -/** - * @ngdoc service - * @name $mdInkRipple - * @module material.core.ripple - * - * @description - * `$mdInkRipple` is a service for adding ripples to any element. - * - * @usage - * - * app.factory('$myElementInkRipple', function($mdInkRipple) { - * return { - * attach: function (scope, element, options) { - * return $mdInkRipple.attach(scope, element, angular.extend({ - * center: false, - * dimBackground: true - * }, options)); - * } - * }; - * }); - * - * app.controller('myController', function ($scope, $element, $myElementInkRipple) { - * $scope.onClick = function (ev) { - * $myElementInkRipple.attach($scope, angular.element(ev.target), { center: true }); - * } - * }); - * - */ - -/** - * @ngdoc service - * @name $mdInkRippleProvider - * @module material.core.ripple - * - * @description - * If you want to disable ink ripples globally, for all components, you can call the - * `disableInkRipple` method in your app's config. - * - * - * @usage - * - * app.config(function ($mdInkRippleProvider) { - * $mdInkRippleProvider.disableInkRipple(); - * }); - * - */ - -function InkRippleProvider () { - var isDisabledGlobally = false; - - return { - disableInkRipple: disableInkRipple, - $get: ["$injector", function($injector) { - return { attach: attach }; - - /** - * @ngdoc method - * @name $mdInkRipple#attach - * - * @description - * Attaching given scope, element and options to inkRipple controller - * - * @param {object=} scope Scope within the current context - * @param {object=} element The element the ripple effect should be applied to - * @param {object=} options (Optional) Configuration options to override the defaultRipple configuration - * * `center` - Whether the ripple should start from the center of the container element - * * `dimBackground` - Whether the background should be dimmed with the ripple color - * * `colorElement` - The element the ripple should take its color from, defined by css property `color` - * * `fitRipple` - Whether the ripple should fill the element - */ - function attach (scope, element, options) { - if (isDisabledGlobally || element.controller('mdNoInk')) return angular.noop; - return $injector.instantiate(InkRippleCtrl, { - $scope: scope, - $element: element, - rippleOptions: options - }); - } - }] - }; - - /** - * @ngdoc method - * @name $mdInkRippleProvider#disableInkRipple - * - * @description - * A config-time method that, when called, disables ripples globally. - */ - function disableInkRipple () { - isDisabledGlobally = true; - } -} - -/** - * Controller used by the ripple service in order to apply ripples - * @ngInject - */ -function InkRippleCtrl ($scope, $element, rippleOptions, $window, $timeout, $mdUtil, $mdColorUtil) { - this.$window = $window; - this.$timeout = $timeout; - this.$mdUtil = $mdUtil; - this.$mdColorUtil = $mdColorUtil; - this.$scope = $scope; - this.$element = $element; - this.options = rippleOptions; - this.mousedown = false; - this.ripples = []; - this.timeout = null; // Stores a reference to the most-recent ripple timeout - this.lastRipple = null; - - $mdUtil.valueOnUse(this, 'container', this.createContainer); - - this.$element.addClass('md-ink-ripple'); - - // attach method for unit tests - ($element.controller('mdInkRipple') || {}).createRipple = angular.bind(this, this.createRipple); - ($element.controller('mdInkRipple') || {}).setColor = angular.bind(this, this.color); - - this.bindEvents(); -} - - -/** - * Either remove or unlock any remaining ripples when the user mouses off of the element (either by - * mouseup or mouseleave event) - */ -function autoCleanup (self, cleanupFn) { - if (self.mousedown || self.lastRipple) { - self.mousedown = false; - self.$mdUtil.nextTick(angular.bind(self, cleanupFn), false); - } -} - - -/** - * Returns the color that the ripple should be (either based on CSS or hard-coded) - * @returns {string} - */ -InkRippleCtrl.prototype.color = function (value) { - var self = this; - - // If assigning a color value, apply it to background and the ripple color - if (angular.isDefined(value)) { - self._color = self._parseColor(value); - } - - // If color lookup, use assigned, defined, or inherited - return self._color || self._parseColor(self.inkRipple()) || self._parseColor(getElementColor()); - - /** - * Finds the color element and returns its text color for use as default ripple color - * @returns {string} - */ - function getElementColor () { - var items = self.options && self.options.colorElement ? self.options.colorElement : []; - var elem = items.length ? items[ 0 ] : self.$element[ 0 ]; - - return elem ? self.$window.getComputedStyle(elem).color : 'rgb(0,0,0)'; - } -}; - -/** - * Updating the ripple colors based on the current inkRipple value - * or the element's computed style color - */ -InkRippleCtrl.prototype.calculateColor = function () { - return this.color(); -}; - - -/** - * Takes a string color and converts it to RGBA format - * @param {string} color - * @param {number} multiplier - * @returns {string} - */ -InkRippleCtrl.prototype._parseColor = function parseColor (color, multiplier) { - multiplier = multiplier || 1; - var colorUtil = this.$mdColorUtil; - - if (!color) return; - if (color.indexOf('rgba') === 0) return color.replace(/\d?\.?\d*\s*\)\s*$/, (0.1 * multiplier).toString() + ')'); - if (color.indexOf('rgb') === 0) return colorUtil.rgbToRgba(color); - if (color.indexOf('#') === 0) return colorUtil.hexToRgba(color); - -}; - -/** - * Binds events to the root element for - */ -InkRippleCtrl.prototype.bindEvents = function () { - this.$element.on('mousedown', angular.bind(this, this.handleMousedown)); - this.$element.on('mouseup touchend', angular.bind(this, this.handleMouseup)); - this.$element.on('mouseleave', angular.bind(this, this.handleMouseup)); - this.$element.on('touchmove', angular.bind(this, this.handleTouchmove)); -}; - -/** - * Create a new ripple on every mousedown event from the root element - * @param event {MouseEvent} - */ -InkRippleCtrl.prototype.handleMousedown = function (event) { - if (this.mousedown) return; - - // When jQuery is loaded, we have to get the original event - if (event.hasOwnProperty('originalEvent')) event = event.originalEvent; - this.mousedown = true; - if (this.options.center) { - this.createRipple(this.container.prop('clientWidth') / 2, this.container.prop('clientWidth') / 2); - } else { - - // We need to calculate the relative coordinates if the target is a sublayer of the ripple element - if (event.srcElement !== this.$element[0]) { - var layerRect = this.$element[0].getBoundingClientRect(); - var layerX = event.clientX - layerRect.left; - var layerY = event.clientY - layerRect.top; - - this.createRipple(layerX, layerY); - } else { - this.createRipple(event.offsetX, event.offsetY); - } - } -}; - -/** - * Either remove or unlock any remaining ripples when the user mouses off of the element (either by - * mouseup, touchend or mouseleave event) - */ -InkRippleCtrl.prototype.handleMouseup = function () { - this.$timeout(function () { - autoCleanup(this, this.clearRipples); - }.bind(this)); -}; - -/** - * Either remove or unlock any remaining ripples when the user mouses off of the element (by - * touchmove) - */ -InkRippleCtrl.prototype.handleTouchmove = function () { - autoCleanup(this, this.deleteRipples); -}; - -/** - * Cycles through all ripples and attempts to remove them. - */ -InkRippleCtrl.prototype.deleteRipples = function () { - for (var i = 0; i < this.ripples.length; i++) { - this.ripples[ i ].remove(); - } -}; - -/** - * Cycles through all ripples and attempts to remove them with fade. - * Depending on logic within `fadeInComplete`, some removals will be postponed. - */ -InkRippleCtrl.prototype.clearRipples = function () { - for (var i = 0; i < this.ripples.length; i++) { - this.fadeInComplete(this.ripples[ i ]); - } -}; - -/** - * Creates the ripple container element - * @returns {*} - */ -InkRippleCtrl.prototype.createContainer = function () { - var container = angular.element('
    '); - this.$element.append(container); - return container; -}; - -InkRippleCtrl.prototype.clearTimeout = function () { - if (this.timeout) { - this.$timeout.cancel(this.timeout); - this.timeout = null; - } -}; - -InkRippleCtrl.prototype.isRippleAllowed = function () { - var element = this.$element[0]; - do { - if (!element.tagName || element.tagName === 'BODY') break; - - if (element && angular.isFunction(element.hasAttribute)) { - if (element.hasAttribute('disabled')) return false; - if (this.inkRipple() === 'false' || this.inkRipple() === '0') return false; - } - - } while (element = element.parentNode); - return true; -}; - -/** - * The attribute `md-ink-ripple` may be a static or interpolated - * color value OR a boolean indicator (used to disable ripples) - */ -InkRippleCtrl.prototype.inkRipple = function () { - return this.$element.attr('md-ink-ripple'); -}; - -/** - * Creates a new ripple and adds it to the container. Also tracks ripple in `this.ripples`. - * @param left - * @param top - */ -InkRippleCtrl.prototype.createRipple = function (left, top) { - if (!this.isRippleAllowed()) return; - - var ctrl = this; - var colorUtil = ctrl.$mdColorUtil; - var ripple = angular.element('
    '); - var width = this.$element.prop('clientWidth'); - var height = this.$element.prop('clientHeight'); - var x = Math.max(Math.abs(width - left), left) * 2; - var y = Math.max(Math.abs(height - top), top) * 2; - var size = getSize(this.options.fitRipple, x, y); - var color = this.calculateColor(); - - ripple.css({ - left: left + 'px', - top: top + 'px', - background: 'black', - width: size + 'px', - height: size + 'px', - backgroundColor: colorUtil.rgbaToRgb(color), - borderColor: colorUtil.rgbaToRgb(color) - }); - this.lastRipple = ripple; - - // we only want one timeout to be running at a time - this.clearTimeout(); - this.timeout = this.$timeout(function () { - ctrl.clearTimeout(); - if (!ctrl.mousedown) ctrl.fadeInComplete(ripple); - }, DURATION * 0.35, false); - - if (this.options.dimBackground) this.container.css({ backgroundColor: color }); - this.container.append(ripple); - this.ripples.push(ripple); - ripple.addClass('md-ripple-placed'); - - this.$mdUtil.nextTick(function () { - - ripple.addClass('md-ripple-scaled md-ripple-active'); - ctrl.$timeout(function () { - ctrl.clearRipples(); - }, DURATION, false); - - }, false); - - function getSize (fit, x, y) { - return fit - ? Math.max(x, y) - : Math.sqrt(Math.pow(x, 2) + Math.pow(y, 2)); - } -}; - - - -/** - * After fadeIn finishes, either kicks off the fade-out animation or queues the element for removal on mouseup - * @param ripple - */ -InkRippleCtrl.prototype.fadeInComplete = function (ripple) { - if (this.lastRipple === ripple) { - if (!this.timeout && !this.mousedown) { - this.removeRipple(ripple); - } - } else { - this.removeRipple(ripple); - } -}; - -/** - * Kicks off the animation for removing a ripple - * @param ripple {Element} - */ -InkRippleCtrl.prototype.removeRipple = function (ripple) { - var ctrl = this; - var index = this.ripples.indexOf(ripple); - if (index < 0) return; - this.ripples.splice(this.ripples.indexOf(ripple), 1); - ripple.removeClass('md-ripple-active'); - ripple.addClass('md-ripple-remove'); - if (this.ripples.length === 0) this.container.css({ backgroundColor: '' }); - // use a 2-second timeout in order to allow for the animation to finish - // we don't actually care how long the animation takes - this.$timeout(function () { - ctrl.fadeOutComplete(ripple); - }, DURATION, false); -}; - -/** - * Removes the provided ripple from the DOM - * @param ripple - */ -InkRippleCtrl.prototype.fadeOutComplete = function (ripple) { - ripple.remove(); - this.lastRipple = null; -}; - -/** - * Used to create an empty directive. This is used to track flag-directives whose children may have - * functionality based on them. - * - * Example: `md-no-ink` will potentially be used by all child directives. - */ -function attrNoDirective () { - return { controller: angular.noop }; -} - -})(); -(function(){ -"use strict"; - -(function() { - 'use strict'; - - /** - * @ngdoc service - * @name $mdTabInkRipple - * @module material.core - * - * @description - * Provides ripple effects for md-tabs. See $mdInkRipple service for all possible configuration options. - * - * @param {object=} scope Scope within the current context - * @param {object=} element The element the ripple effect should be applied to - * @param {object=} options (Optional) Configuration options to override the defaultripple configuration - */ - - MdTabInkRipple.$inject = ["$mdInkRipple"]; - angular.module('material.core') - .factory('$mdTabInkRipple', MdTabInkRipple); - - function MdTabInkRipple($mdInkRipple) { - return { - attach: attach - }; - - function attach(scope, element, options) { - return $mdInkRipple.attach(scope, element, angular.extend({ - center: false, - dimBackground: true, - outline: false, - rippleSize: 'full' - }, options)); - } - } -})(); - -})(); -(function(){ -"use strict"; - -angular.module('material.core.theming.palette', []) -.constant('$mdColorPalette', { - 'red': { - '50': '#ffebee', - '100': '#ffcdd2', - '200': '#ef9a9a', - '300': '#e57373', - '400': '#ef5350', - '500': '#f44336', - '600': '#e53935', - '700': '#d32f2f', - '800': '#c62828', - '900': '#b71c1c', - 'A100': '#ff8a80', - 'A200': '#ff5252', - 'A400': '#ff1744', - 'A700': '#d50000', - 'contrastDefaultColor': 'light', - 'contrastDarkColors': '50 100 200 300 400 500 600 A100 A200 A400', - 'contrastStrongLightColors': '700 800 900 A700' - }, - 'pink': { - '50': '#fce4ec', - '100': '#f8bbd0', - '200': '#f48fb1', - '300': '#f06292', - '400': '#ec407a', - '500': '#e91e63', - '600': '#d81b60', - '700': '#c2185b', - '800': '#ad1457', - '900': '#880e4f', - 'A100': '#ff80ab', - 'A200': '#ff4081', - 'A400': '#f50057', - 'A700': '#c51162', - 'contrastDefaultColor': 'light', - 'contrastDarkColors': '50 100 200 300 400 A100 A200 A400', - // White on 500 does not meet the minimum 4.5 contrast ratio (at 4.34), - // but it's worse with a dark foreground (3.61). - 'contrastStrongLightColors': '500 600 700 800 900 A700' - }, - 'purple': { - '50': '#f3e5f5', - '100': '#e1bee7', - '200': '#ce93d8', - '300': '#ba68c8', - '400': '#ab47bc', - '500': '#9c27b0', - '600': '#8e24aa', - '700': '#7b1fa2', - '800': '#6a1b9a', - '900': '#4a148c', - 'A100': '#ea80fc', - 'A200': '#e040fb', - 'A400': '#d500f9', - 'A700': '#aa00ff', - 'contrastDefaultColor': 'light', - 'contrastDarkColors': '50 100 200 300 A100 A200 A400', - 'contrastStrongLightColors': '400 500 600 700 800 900 A700' - }, - 'deep-purple': { - '50': '#ede7f6', - '100': '#d1c4e9', - '200': '#b39ddb', - '300': '#9575cd', - '400': '#7e57c2', - '500': '#673ab7', - '600': '#5e35b1', - '700': '#512da8', - '800': '#4527a0', - '900': '#311b92', - 'A100': '#b388ff', - 'A200': '#7c4dff', - 'A400': '#651fff', - 'A700': '#6200ea', - 'contrastDefaultColor': 'light', - 'contrastDarkColors': '50 100 200 300 A100', - 'contrastStrongLightColors': '400 500 600 700 800 900 A200 A400 A700' - }, - 'indigo': { - '50': '#e8eaf6', - '100': '#c5cae9', - '200': '#9fa8da', - '300': '#7986cb', - '400': '#5c6bc0', - '500': '#3f51b5', - '600': '#3949ab', - '700': '#303f9f', - '800': '#283593', - '900': '#1a237e', - 'A100': '#8c9eff', - 'A200': '#536dfe', - 'A400': '#3d5afe', - 'A700': '#304ffe', - 'contrastDefaultColor': 'light', - 'contrastDarkColors': '50 100 200 300 A100 A200', - 'contrastStrongLightColors': '400 500 600 700 800 900 A400 A700' - }, - 'blue': { - '50': '#e3f2fd', - '100': '#bbdefb', - '200': '#90caf9', - '300': '#64b5f6', - '400': '#42a5f5', - '500': '#2196f3', - '600': '#1e88e5', - '700': '#1976d2', - '800': '#1565c0', - '900': '#0d47a1', - 'A100': '#82b1ff', - 'A200': '#448aff', - 'A400': '#2979ff', - 'A700': '#2962ff', - 'contrastDefaultColor': 'light', - // White on A400 does not meet the minimum 4.5 contrast ratio (at 3.98), - // but it's worse with a dark foreground (3.94). - 'contrastDarkColors': '50 100 200 300 400 500 600 A100 A200', - 'contrastStrongLightColors': '700 800 900 A400 A700' - }, - 'light-blue': { - '50': '#e1f5fe', - '100': '#b3e5fc', - '200': '#81d4fa', - '300': '#4fc3f7', - '400': '#29b6f6', - '500': '#03a9f4', - '600': '#039be5', - '700': '#0288d1', - '800': '#0277bd', - '900': '#01579b', - 'A100': '#80d8ff', - 'A200': '#40c4ff', - 'A400': '#00b0ff', - 'A700': '#0091ea', - 'contrastDefaultColor': 'dark', - // Dark on 700 does not meet the minimum 4.5 contrast ratio (at 4.07), - // but it's worse with a white foreground (3.85). - 'contrastStrongLightColors': '800 900 A700' - }, - 'cyan': { - '50': '#e0f7fa', - '100': '#b2ebf2', - '200': '#80deea', - '300': '#4dd0e1', - '400': '#26c6da', - '500': '#00bcd4', - '600': '#00acc1', - '700': '#0097a7', - '800': '#00838f', - '900': '#006064', - 'A100': '#84ffff', - 'A200': '#18ffff', - 'A400': '#00e5ff', - 'A700': '#00b8d4', - 'contrastDefaultColor': 'dark', - // Dark on 700 does not meet the minimum 4.5 contrast ratio (at 4.47), - // but it's worse with a white foreground (3.5). - 'contrastStrongLightColors': '800 900' - }, - 'teal': { - '50': '#e0f2f1', - '100': '#b2dfdb', - '200': '#80cbc4', - '300': '#4db6ac', - '400': '#26a69a', - '500': '#009688', - '600': '#00897b', - '700': '#00796b', - '800': '#00695c', - '900': '#004d40', - 'A100': '#a7ffeb', - 'A200': '#64ffda', - 'A400': '#1de9b6', - 'A700': '#00bfa5', - 'contrastDefaultColor': 'dark', - // Dark on 500 does not meet the minimum 4.5 contrast ratio (at 4.27), - // but it's worse with a white foreground (3.67). - // White on 600 does not meet the minimum 4.5 contrast ratio (at 4.31), - // but it's worse with a dark foreground (3.64). - 'contrastStrongLightColors': '600 700 800 900' - }, - 'green': { - '50': '#e8f5e9', - '100': '#c8e6c9', - '200': '#a5d6a7', - '300': '#81c784', - '400': '#66bb6a', - '500': '#4caf50', - '600': '#43a047', - '700': '#388e3c', - '800': '#2e7d32', - '900': '#1b5e20', - 'A100': '#b9f6ca', - 'A200': '#69f0ae', - 'A400': '#00e676', - 'A700': '#00c853', - 'contrastDefaultColor': 'dark', - // White on 700 does not meet the minimum 4.5 contrast ratio (at 4.11), - // but it's worse with a dark foreground (3.81). - 'contrastStrongLightColors': '700 800 900' - }, - 'light-green': { - '50': '#f1f8e9', - '100': '#dcedc8', - '200': '#c5e1a5', - '300': '#aed581', - '400': '#9ccc65', - '500': '#8bc34a', - '600': '#7cb342', - '700': '#689f38', - '800': '#558b2f', - '900': '#33691e', - 'A100': '#ccff90', - 'A200': '#b2ff59', - 'A400': '#76ff03', - 'A700': '#64dd17', - 'contrastDefaultColor': 'dark', - 'contrastStrongLightColors': '800 900' - }, - 'lime': { - '50': '#f9fbe7', - '100': '#f0f4c3', - '200': '#e6ee9c', - '300': '#dce775', - '400': '#d4e157', - '500': '#cddc39', - '600': '#c0ca33', - '700': '#afb42b', - '800': '#9e9d24', - '900': '#827717', - 'A100': '#f4ff81', - 'A200': '#eeff41', - 'A400': '#c6ff00', - 'A700': '#aeea00', - 'contrastDefaultColor': 'dark', - 'contrastStrongLightColors': '900' - }, - 'yellow': { - '50': '#fffde7', - '100': '#fff9c4', - '200': '#fff59d', - '300': '#fff176', - '400': '#ffee58', - '500': '#ffeb3b', - '600': '#fdd835', - '700': '#fbc02d', - '800': '#f9a825', - '900': '#f57f17', - 'A100': '#ffff8d', - 'A200': '#ffff00', - 'A400': '#ffea00', - 'A700': '#ffd600', - 'contrastDefaultColor': 'dark' - }, - 'amber': { - '50': '#fff8e1', - '100': '#ffecb3', - '200': '#ffe082', - '300': '#ffd54f', - '400': '#ffca28', - '500': '#ffc107', - '600': '#ffb300', - '700': '#ffa000', - '800': '#ff8f00', - '900': '#ff6f00', - 'A100': '#ffe57f', - 'A200': '#ffd740', - 'A400': '#ffc400', - 'A700': '#ffab00', - 'contrastDefaultColor': 'dark' - }, - 'orange': { - '50': '#fff3e0', - '100': '#ffe0b2', - '200': '#ffcc80', - '300': '#ffb74d', - '400': '#ffa726', - '500': '#ff9800', - '600': '#fb8c00', - '700': '#f57c00', - '800': '#ef6c00', - '900': '#e65100', - 'A100': '#ffd180', - 'A200': '#ffab40', - 'A400': '#ff9100', - 'A700': '#ff6d00', - 'contrastDefaultColor': 'dark', - 'contrastStrongLightColors': '900' - }, - 'deep-orange': { - '50': '#fbe9e7', - '100': '#ffccbc', - '200': '#ffab91', - '300': '#ff8a65', - '400': '#ff7043', - '500': '#ff5722', - '600': '#f4511e', - '700': '#e64a19', - '800': '#d84315', - '900': '#bf360c', - 'A100': '#ff9e80', - 'A200': '#ff6e40', - 'A400': '#ff3d00', - 'A700': '#dd2c00', - 'contrastDefaultColor': 'dark', - // Dark on 700 does not meet the minimum 4.5 contrast ratio (at 4.01), - // but it's worse with a white foreground (3.91). - // White on 800 does not meet the minimum 4.5 contrast ratio (at 4.43), - // but it's worse with a dark foreground (3.54). - 'contrastStrongLightColors': '800 900 A400 A700', - }, - 'brown': { - '50': '#efebe9', - '100': '#d7ccc8', - '200': '#bcaaa4', - '300': '#a1887f', - '400': '#8d6e63', - '500': '#795548', - '600': '#6d4c41', - '700': '#5d4037', - '800': '#4e342e', - '900': '#3e2723', - 'A100': '#d7ccc8', - 'A200': '#bcaaa4', - 'A400': '#8d6e63', - 'A700': '#5d4037', - 'contrastDefaultColor': 'light', - 'contrastDarkColors': '50 100 200 300 A100 A200', - 'contrastStrongLightColors': '400 500 600 700 800 900 A400 A700' - }, - 'grey': { - '50': '#fafafa', - '100': '#f5f5f5', - '200': '#eeeeee', - '300': '#e0e0e0', - '400': '#bdbdbd', - '500': '#9e9e9e', - '600': '#757575', - '700': '#616161', - '800': '#424242', - '900': '#212121', - 'A100': '#ffffff', - 'A200': '#000000', - 'A400': '#303030', - 'A700': '#616161', - 'contrastDefaultColor': 'dark', - 'contrastLightColors': '700 800 900 A200 A400 A700', - 'contrastStrongLightColors': '600' - }, - 'blue-grey': { - '50': '#eceff1', - '100': '#cfd8dc', - '200': '#b0bec5', - '300': '#90a4ae', - '400': '#78909c', - '500': '#607d8b', - '600': '#546e7a', - '700': '#455a64', - '800': '#37474f', - '900': '#263238', - 'A100': '#cfd8dc', - 'A200': '#b0bec5', - 'A400': '#78909c', - 'A700': '#455a64', - 'contrastDefaultColor': 'light', - 'contrastDarkColors': '50 100 200 300 400 A100 A200 A400', - // White on 500 does not meet the minimum 4.5 contrast ratio (at 4.37), - // but it's worse with a dark foreground. - 'contrastStrongLightColors': '500 600 700 800 900 A700' - } -}); - -})(); -(function(){ -"use strict"; - -(function(angular) { - 'use strict'; -/** - * @ngdoc module - * @name material.core.theming - * @description - * Theming - */ -detectDisabledThemes.$inject = ["$mdThemingProvider"]; -ThemingDirective.$inject = ["$mdTheming", "$interpolate", "$parse", "$mdUtil", "$q", "$log"]; -ThemableDirective.$inject = ["$mdTheming"]; -ThemingProvider.$inject = ["$mdColorPalette", "$$mdMetaProvider"]; -generateAllThemes.$inject = ["$injector", "$mdTheming"]; -angular.module('material.core.theming', ['material.core.theming.palette', 'material.core.meta']) - .directive('mdTheme', ThemingDirective) - .directive('mdThemable', ThemableDirective) - .directive('mdThemesDisabled', disableThemesDirective) - .provider('$mdTheming', ThemingProvider) - .config(detectDisabledThemes) - .run(generateAllThemes); - -/** - * Detect if the HTML or the BODY tags has a [md-themes-disabled] attribute - * If yes, then immediately disable all theme stylesheet generation and DOM injection - */ -/** - * @ngInject - */ -function detectDisabledThemes($mdThemingProvider) { - var isDisabled = !!document.querySelector('[md-themes-disabled]'); - $mdThemingProvider.disableTheming(isDisabled); -} - -/** - * @ngdoc service - * @name $mdThemingProvider - * @module material.core.theming - * - * @description Provider to configure the `$mdTheming` service. - * - * ### Default Theme - * The `$mdThemingProvider` uses by default the following theme configuration: - * - * - Primary Palette: `Blue` - * - Accent Palette: `Pink` - * - Warn Palette: `Deep-Orange` - * - Background Palette: `Grey` - * - * If you don't want to use the `md-theme` directive on the elements itself, you may want to overwrite - * the default theme.
    - * This can be done by using the following markup. - * - * - * myAppModule.config(function($mdThemingProvider) { - * $mdThemingProvider - * .theme('default') - * .primaryPalette('blue') - * .accentPalette('teal') - * .warnPalette('red') - * .backgroundPalette('grey'); - * }); - * - * - - * ### Dynamic Themes - * - * By default, if you change a theme at runtime, the `$mdTheming` service will not detect those changes.
    - * If you have an application, which changes its theme on runtime, you have to enable theme watching. - * - * - * myAppModule.config(function($mdThemingProvider) { - * // Enable theme watching. - * $mdThemingProvider.alwaysWatchTheme(true); - * }); - * - * - * ### Custom Theme Styles - * - * Sometimes you may want to use your own theme styles for some custom components.
    - * You are able to register your own styles by using the following markup. - * - * - * myAppModule.config(function($mdThemingProvider) { - * // Register our custom stylesheet into the theming provider. - * $mdThemingProvider.registerStyles(STYLESHEET); - * }); - * - * - * The `registerStyles` method only accepts strings as value, so you're actually not able to load an external - * stylesheet file into the `$mdThemingProvider`. - * - * If it's necessary to load an external stylesheet, we suggest using a bundler, which supports including raw content, - * like [raw-loader](https://github.com/webpack/raw-loader) for `webpack`. - * - * - * myAppModule.config(function($mdThemingProvider) { - * // Register your custom stylesheet into the theming provider. - * $mdThemingProvider.registerStyles(require('../styles/my-component.theme.css')); - * }); - * - * - * ### Browser color - * - * Enables browser header coloring - * for more info please visit: - * https://developers.google.com/web/fundamentals/design-and-ui/browser-customization/theme-color - * - * Options parameter:
    - * `theme` - A defined theme via `$mdThemeProvider` to use the palettes from. Default is `default` theme.
    - * `palette` - Can be any one of the basic material design palettes, extended defined palettes and 'primary', - * 'accent', 'background' and 'warn'. Default is `primary`.
    - * `hue` - The hue from the selected palette. Default is `800`
    - * - * - * myAppModule.config(function($mdThemingProvider) { - * // Enable browser color - * $mdThemingProvider.enableBrowserColor({ - * theme: 'myTheme', // Default is 'default' - * palette: 'accent', // Default is 'primary', any basic material palette and extended palettes are available - * hue: '200' // Default is '800' - * }); - * }); - * - */ - -/** - * Some Example Valid Theming Expressions - * ======================================= - * - * Intention group expansion: (valid for primary, accent, warn, background) - * - * {{primary-100}} - grab shade 100 from the primary palette - * {{primary-100-0.7}} - grab shade 100, apply opacity of 0.7 - * {{primary-100-contrast}} - grab shade 100's contrast color - * {{primary-hue-1}} - grab the shade assigned to hue-1 from the primary palette - * {{primary-hue-1-0.7}} - apply 0.7 opacity to primary-hue-1 - * {{primary-color}} - Generates .md-hue-1, .md-hue-2, .md-hue-3 with configured shades set for each hue - * {{primary-color-0.7}} - Apply 0.7 opacity to each of the above rules - * {{primary-contrast}} - Generates .md-hue-1, .md-hue-2, .md-hue-3 with configured contrast (ie. text) color shades set for each hue - * {{primary-contrast-0.7}} - Apply 0.7 opacity to each of the above rules - * {{primary-contrast-divider}} - Apply divider opacity to contrast color - * - * Foreground expansion: Applies rgba to black/white foreground text - * - * Old Foreground Expressions: - * {{foreground-1}} - used for primary text - * {{foreground-2}} - used for secondary text/divider - * {{foreground-3}} - used for disabled text - * {{foreground-4}} - used for dividers - * - * New Foreground Expressions: - * - * Apply primary text color for contrasting with default background - * {{background-default-contrast}} - default opacity - * {{background-default-contrast-secondary}} - opacity for secondary text - * {{background-default-contrast-hint}} - opacity for hints and placeholders - * {{background-default-contrast-disabled}} - opacity for disabled text - * {{background-default-contrast-divider}} - opacity for dividers - * - * Apply contrast color for specific shades - * {{background-50-contrast-icon}} - Apply contrast color for icon on background's shade 50 hue - */ - -// In memory generated CSS rules; registered by theme.name -var GENERATED = { }; - -// In memory storage of defined themes and color palettes (both loaded by CSS, and user specified) -var PALETTES; - -// Text colors are automatically generated based on background color when not specified -// Custom palettes can provide override colors -// @see https://material.io/archive/guidelines/style/color.html#color-usability -var DARK_FOREGROUND = { - name: 'dark', -}; -var LIGHT_FOREGROUND = { - name: 'light', -}; - -var DARK_SHADOW = '1px 1px 0px rgba(0,0,0,0.4), -1px -1px 0px rgba(0,0,0,0.4)'; -var LIGHT_SHADOW = ''; - -var DARK_CONTRAST_COLOR = colorToRgbaArray('rgba(0,0,0,0.87)'); -var LIGHT_CONTRAST_COLOR = colorToRgbaArray('rgba(255,255,255,0.87)'); -var STRONG_LIGHT_CONTRAST_COLOR = colorToRgbaArray('rgb(255,255,255)'); - -var THEME_COLOR_TYPES = ['primary', 'accent', 'warn', 'background']; -var DEFAULT_COLOR_TYPE = 'primary'; - -// A color in a theme will use these hues by default, if not specified by user. -var LIGHT_DEFAULT_HUES = { - 'accent': { - 'default': 'A200', - 'hue-1': 'A100', - 'hue-2': 'A400', - 'hue-3': 'A700' - }, - 'background': { - 'default': '50', - 'hue-1': 'A100', - 'hue-2': '100', - 'hue-3': '300' - } -}; - -var DARK_DEFAULT_HUES = { - 'background': { - 'default': 'A400', - 'hue-1': '800', - 'hue-2': '900', - 'hue-3': 'A200' - } -}; - -// Icon opacity values (active/inactive) from -// https://material.io/archive/guidelines/style/color.html#color-usability -var DARK_CONTRAST_OPACITY = { - 'icon': 0.54, - 'secondary': 0.54, - 'disabled': 0.38, - 'hint': 0.38, - 'divider': 0.12, -}; - -var LIGHT_CONTRAST_OPACITY = { - 'icon': 0.87, - 'secondary': 0.7, - 'disabled': 0.5, - 'hint': 0.5, - 'divider': 0.12 -}; - -// Icon opacity values (active/inactive) from -// https://material.io/archive/guidelines/style/color.html#color-usability -var STRONG_LIGHT_CONTRAST_OPACITY = { - 'icon': 1.0, - 'secondary': 0.7, - 'disabled': 0.5, - 'hint': 0.5, - 'divider': 0.12 -}; - -THEME_COLOR_TYPES.forEach(function(colorType) { - // Color types with unspecified default hues will use these default hue values - var defaultDefaultHues = { - 'default': '500', - 'hue-1': '300', - 'hue-2': '800', - 'hue-3': 'A100' - }; - if (!LIGHT_DEFAULT_HUES[colorType]) LIGHT_DEFAULT_HUES[colorType] = defaultDefaultHues; - if (!DARK_DEFAULT_HUES[colorType]) DARK_DEFAULT_HUES[colorType] = defaultDefaultHues; -}); - -var VALID_HUE_VALUES = [ - '50', '100', '200', '300', '400', '500', '600', - '700', '800', '900', 'A100', 'A200', 'A400', 'A700' -]; - -var themeConfig = { - disableTheming : false, // Generate our themes at run time; also disable stylesheet DOM injection - generateOnDemand : false, // Whether or not themes are to be generated on-demand (vs. eagerly). - registeredStyles : [], // Custom styles registered to be used in the theming of custom components. - nonce : null // Nonce to be added as an attribute to the generated themes style tags. -}; - -/** - * - */ -function ThemingProvider($mdColorPalette, $$mdMetaProvider) { - ThemingService.$inject = ["$rootScope", "$mdUtil", "$q", "$log"]; - PALETTES = { }; - var THEMES = { }; - - var themingProvider; - - var alwaysWatchTheme = false; - var defaultTheme = 'default'; - - // Load JS Defined Palettes - angular.extend(PALETTES, $mdColorPalette); - - // Default theme defined in core.js - - /** - * Adds `theme-color` and `msapplication-navbutton-color` meta tags with the color parameter - * @param {string} color Hex value of the wanted browser color - * @returns {function} Remove function of the meta tags - */ - var setBrowserColor = function (color) { - // Chrome, Firefox OS and Opera - var removeChrome = $$mdMetaProvider.setMeta('theme-color', color); - // Windows Phone - var removeWindows = $$mdMetaProvider.setMeta('msapplication-navbutton-color', color); - - return function () { - removeChrome(); - removeWindows(); - }; - }; - - /** - * @ngdoc method - * @name $mdThemingProvider#enableBrowserColor - * @description - * Enables browser header coloring. For more info please visit - * - * Web Fundamentals. - * @param {object=} options Options for the browser color, which include:
    - * - `theme` - `{string}`: A defined theme via `$mdThemeProvider` to use the palettes from. Default is `default` theme.
    - * - `palette` - `{string}`: Can be any one of the basic material design palettes, extended defined palettes, or `primary`, - * `accent`, `background`, and `warn`. Default is `primary`.
    - * - `hue` - `{string}`: The hue from the selected palette. Default is `800`.
    - * @returns {function} Function that removes the browser coloring when called. - */ - var enableBrowserColor = function (options) { - options = angular.isObject(options) ? options : {}; - - var theme = options.theme || 'default'; - var hue = options.hue || '800'; - - var palette = PALETTES[options.palette] || - PALETTES[THEMES[theme].colors[options.palette || 'primary'].name]; - - var color = angular.isObject(palette[hue]) ? palette[hue].hex : palette[hue]; - if (color.substr(0, 1) !== '#') color = '#' + color; - - return setBrowserColor(color); - }; - - return themingProvider = { - definePalette: definePalette, - extendPalette: extendPalette, - theme: registerTheme, - - /** - * return a read-only clone of the current theme configuration - */ - configuration : function() { - return angular.extend({ }, themeConfig, { - defaultTheme : defaultTheme, - alwaysWatchTheme : alwaysWatchTheme, - registeredStyles : [].concat(themeConfig.registeredStyles) - }); - }, - - /** - * @ngdoc method - * @name $mdThemingProvider#disableTheming - * @description - * An easier way to disable theming without having to use `.constant("$MD_THEME_CSS","");`. - * This disables all dynamic theme style sheet generations and injections. - * @param {boolean=} isDisabled Disable all dynamic theme style sheet generations and injections - * if `true` or `undefined`. - */ - disableTheming: function(isDisabled) { - themeConfig.disableTheming = angular.isUndefined(isDisabled) || !!isDisabled; - }, - - /** - * @ngdoc method - * @name $mdThemingProvider#registerStyles - * @param {string} styles The styles to be appended to AngularJS Material's built in theme CSS. - */ - registerStyles: function(styles) { - themeConfig.registeredStyles.push(styles); - }, - - /** - * @ngdoc method - * @name $mdThemingProvider#setNonce - * @param {string} nonceValue The nonce to be added as an attribute to the theme style tags. - * Setting a value allows the use of CSP policy without using the `'unsafe-inline'` directive. - * The string must already be base64 encoded. You can use `btoa(string)` to do this encoding. - * In your CSP's `style-src`, you would then add an entry for `'nonce-nonceValue'`. - */ - setNonce: function(nonceValue) { - themeConfig.nonce = nonceValue; - }, - - generateThemesOnDemand: function(onDemand) { - themeConfig.generateOnDemand = onDemand; - }, - - /** - * @ngdoc method - * @name $mdThemingProvider#setDefaultTheme - * @param {string} theme Default theme name to be applied to elements. - * Default value is `default`. - */ - setDefaultTheme: function(theme) { - defaultTheme = theme; - }, - - /** - * @ngdoc method - * @name $mdThemingProvider#alwaysWatchTheme - * @param {boolean} alwaysWatch Whether or not to always watch themes for changes and re-apply - * classes when they change. Default is `false`. Enabling can reduce performance. - */ - alwaysWatchTheme: function(alwaysWatch) { - alwaysWatchTheme = alwaysWatch; - }, - - enableBrowserColor: enableBrowserColor, - - $get: ThemingService, - _LIGHT_DEFAULT_HUES: LIGHT_DEFAULT_HUES, - _DARK_DEFAULT_HUES: DARK_DEFAULT_HUES, - _PALETTES: PALETTES, - _THEMES: THEMES, - _parseRules: parseRules, - _rgba: rgba - }; - - /** - * @ngdoc method - * @name $mdThemingProvider#definePalette - * @description - * In the event that you need to define a custom color palette, you can use this function to - * make it available to your theme for use in its intention groups.
    - * Note that you must specify all hues in the definition map. - * @param {string} name Name of palette being defined - * @param {object} map Palette definition that includes hue definitions and contrast colors: - * - `'50'` - `{string}`: HEX color - * - `'100'` - `{string}`: HEX color - * - `'200'` - `{string}`: HEX color - * - `'300'` - `{string}`: HEX color - * - `'400'` - `{string}`: HEX color - * - `'500'` - `{string}`: HEX color - * - `'600'` - `{string}`: HEX color - * - `'700'` - `{string}`: HEX color - * - `'800'` - `{string}`: HEX color - * - `'900'` - `{string}`: HEX color - * - `'A100'` - `{string}`: HEX color - * - `'A200'` - `{string}`: HEX color - * - `'A400'` - `{string}`: HEX color - * - `'A700'` - `{string}`: HEX color - * - `'contrastDefaultColor'` - `{string}`: `light` or `dark` - * - `'contrastDarkColors'` - `{string[]}`: Hues which should use dark contrast colors (i.e. raised button text). - * For example: `['50', '100', '200', '300', '400', 'A100']`. - * - `'contrastLightColors'` - `{string[]}`: Hues which should use light contrast colors (i.e. raised button text). - * For example: `['500', '600', '700', '800', '900', 'A200', 'A400', 'A700']`. - */ - function definePalette(name, map) { - map = map || {}; - PALETTES[name] = checkPaletteValid(name, map); - return themingProvider; - } - - /** - * @ngdoc method - * @name $mdThemingProvider#extendPalette - * @description - * Sometimes it is easier to extend an existing color palette and then change a few properties, - * rather than defining a whole new palette. - * @param {string} name Name of palette being extended - * @param {object} map Palette definition that includes optional hue definitions and contrast colors: - * - `'50'` - `{string}`: HEX color - * - `'100'` - `{string}`: HEX color - * - `'200'` - `{string}`: HEX color - * - `'300'` - `{string}`: HEX color - * - `'400'` - `{string}`: HEX color - * - `'500'` - `{string}`: HEX color - * - `'600'` - `{string}`: HEX color - * - `'700'` - `{string}`: HEX color - * - `'800'` - `{string}`: HEX color - * - `'900'` - `{string}`: HEX color - * - `'A100'` - `{string}`: HEX color - * - `'A200'` - `{string}`: HEX color - * - `'A400'` - `{string}`: HEX color - * - `'A700'` - `{string}`: HEX color - * - `'contrastDefaultColor'` - `{string}`: `light` or `dark` - * - `'contrastDarkColors'` - `{string[]}`: Hues which should use dark contrast colors (i.e. raised button text). - * For example: `['50', '100', '200', '300', '400', 'A100']`. - * - `'contrastLightColors'` - `{string[]}`: Hues which should use light contrast colors (i.e. raised button text). - * For example: `['500', '600', '700', '800', '900', 'A200', 'A400', 'A700']`. - * @returns {object} A new object which is a copy of the given palette, `name`, - * with variables from `map` overwritten. - */ - function extendPalette(name, map) { - return checkPaletteValid(name, angular.extend({}, PALETTES[name] || {}, map)); - } - - // Make sure that palette has all required hues - function checkPaletteValid(name, map) { - var missingColors = VALID_HUE_VALUES.filter(function(field) { - return !map[field]; - }); - if (missingColors.length) { - throw new Error("Missing colors %1 in palette %2!" - .replace('%1', missingColors.join(', ')) - .replace('%2', name)); - } - - return map; - } - - /** - * @ngdoc method - * @name $mdThemingProvider#theme - * @description - * Register a theme (which is a collection of color palettes); i.e. `warn`, `accent`, - * `background`, and `primary`.
    - * Optionally inherit from an existing theme. - * @param {string} name Name of theme being registered - * @param {string=} inheritFrom Existing theme name to inherit from - */ - function registerTheme(name, inheritFrom) { - if (THEMES[name]) return THEMES[name]; - - inheritFrom = inheritFrom || 'default'; - - var parentTheme = typeof inheritFrom === 'string' ? THEMES[inheritFrom] : inheritFrom; - var theme = new Theme(name); - - if (parentTheme) { - angular.forEach(parentTheme.colors, function(color, colorType) { - theme.colors[colorType] = { - name: color.name, - // Make sure a COPY of the hues is given to the child color, - // not the same reference. - hues: angular.extend({}, color.hues) - }; - }); - } - THEMES[name] = theme; - - return theme; - } - - function Theme(name) { - var self = this; - self.name = name; - self.colors = {}; - - self.dark = setDark; - setDark(false); - - function setDark(isDark) { - isDark = arguments.length === 0 ? true : !!isDark; - - // If no change, abort - if (isDark === self.isDark) return; - - self.isDark = isDark; - - self.foregroundPalette = self.isDark ? LIGHT_FOREGROUND : DARK_FOREGROUND; - self.foregroundShadow = self.isDark ? DARK_SHADOW : LIGHT_SHADOW; - - // Light and dark themes have different default hues. - // Go through each existing color type for this theme, and for every - // hue value that is still the default hue value from the previous light/dark setting, - // set it to the default hue value from the new light/dark setting. - var newDefaultHues = self.isDark ? DARK_DEFAULT_HUES : LIGHT_DEFAULT_HUES; - var oldDefaultHues = self.isDark ? LIGHT_DEFAULT_HUES : DARK_DEFAULT_HUES; - angular.forEach(newDefaultHues, function(newDefaults, colorType) { - var color = self.colors[colorType]; - var oldDefaults = oldDefaultHues[colorType]; - if (color) { - for (var hueName in color.hues) { - if (color.hues[hueName] === oldDefaults[hueName]) { - color.hues[hueName] = newDefaults[hueName]; - } - } - } - }); - - return self; - } - - THEME_COLOR_TYPES.forEach(function(colorType) { - var defaultHues = (self.isDark ? DARK_DEFAULT_HUES : LIGHT_DEFAULT_HUES)[colorType]; - self[colorType + 'Palette'] = function setPaletteType(paletteName, hues) { - var color = self.colors[colorType] = { - name: paletteName, - hues: angular.extend({}, defaultHues, hues) - }; - - Object.keys(color.hues).forEach(function(name) { - if (!defaultHues[name]) { - throw new Error("Invalid hue name '%1' in theme %2's %3 color %4. Available hue names: %4" - .replace('%1', name) - .replace('%2', self.name) - .replace('%3', paletteName) - .replace('%4', Object.keys(defaultHues).join(', ')) - ); - } - }); - Object.keys(color.hues).map(function(key) { - return color.hues[key]; - }).forEach(function(hueValue) { - if (VALID_HUE_VALUES.indexOf(hueValue) === -1) { - throw new Error("Invalid hue value '%1' in theme %2's %3 color %4. Available hue values: %5" - .replace('%1', hueValue) - .replace('%2', self.name) - .replace('%3', colorType) - .replace('%4', paletteName) - .replace('%5', VALID_HUE_VALUES.join(', ')) - ); - } - }); - return self; - }; - }); - } - - /** - * @ngdoc service - * @name $mdTheming - * @module material.core.theming - * @description - * Service that makes an element apply theming related classes to itself. - * - * For more information on the hue objects, their default values, as well as valid hue values, please visit the custom hues section of Configuring a Theme. - * - * - * // Example component directive that we want to apply theming classes to. - * app.directive('myFancyDirective', function($mdTheming) { - * return { - * restrict: 'AE', - * link: function(scope, element, attrs) { - * // Initialize the service using our directive's element - * $mdTheming(element); - * - * $mdTheming.defineTheme('myTheme', { - * primary: 'blue', - * primaryHues: { - * default: '500', - * hue-1: '300', - * hue-2: '900', - * hue-3: 'A100' - * }, - * accent: 'pink', - * accentHues: { - * default: '600', - * hue-1: '300', - * hue-2: '200', - * hue-3: 'A500' - * }, - * warn: 'red', - * // It's not necessary to specify all hues in the object. - * warnHues: { - * default: '200', - * hue-3: 'A100' - * }, - * // It's not necessary to specify custom hues at all. - * background: 'grey', - * dark: true - * }); - * // Your directive's custom code here. - * } - * }; - * }); - * - * @param {element=} element Element that will have theming classes applied to it. - */ - - /** - * @ngdoc property - * @name $mdTheming#THEMES - * @description - * Property to get all the themes defined - * @returns {object} All the themes defined with their properties. - */ - - /** - * @ngdoc property - * @name $mdTheming#PALETTES - * @description - * Property to get all the palettes defined - * @returns {object} All the palettes defined with their colors. - */ - - /** - * @ngdoc method - * @name $mdTheming#registered - * @description - * Determine is specified theme name is a valid, registered theme - * @param {string} themeName the theme to check if registered - * @returns {boolean} whether the theme is registered or not - */ - - /** - * @ngdoc method - * @name $mdTheming#defaultTheme - * @description - * Returns the default theme - * @returns {string} The default theme - */ - - /** - * @ngdoc method - * @name $mdTheming#generateTheme - * @description - * Lazy generate themes - by default, every theme is generated when defined. - * You can disable this in the configuration section using the - * `$mdThemingProvider.generateThemesOnDemand(true);` - * - * The theme name that is passed in must match the name of the theme that was defined as part of - * the configuration block. - * - * @param {string} name theme name to generate - */ - - /** - * @ngdoc method - * @name $mdTheming#setBrowserColor - * @description - * Enables browser header coloring. For more info please visit - * - * Web Fundamentals. - * @param {object=} options Options for the browser color, which include:
    - * - `theme` - `{string}`: A defined theme via `$mdThemeProvider` to use the palettes from. - * Default is `default` theme.
    - * - `palette` - `{string}`: Can be any one of the basic material design palettes, extended - * defined palettes, or `primary`, `accent`, `background`, and `warn`. Default is `primary`. - *
    - * - `hue` - `{string}`: The hue from the selected palette. Default is `800`.
    - * @returns {function} Function that removes the browser coloring when called. - */ - - /** - * @ngdoc method - * @name $mdTheming#defineTheme - * @description - * Dynamically define a theme by using an options object that contains palette names. - * - * @param {string} name Theme name to define - * @param {object} options Theme definition options - * - * Options are:
    - * - `primary` - `{string}`: The name of the primary palette to use in the theme.
    - * - `primaryHues` - `{object=}`: Override hues for primary palette.
    - * - `accent` - `{string}`: The name of the accent palette to use in the theme.
    - * - `accentHues` - `{object=}`: Override hues for accent palette.
    - * - `warn` - `{string}`: The name of the warn palette to use in the theme.
    - * - `warnHues` - `{object=}`: Override hues for warn palette.
    - * - `background` - `{string}`: The name of the background palette to use in the theme.
    - * - `backgroundHues` - `{object=}`: Override hues for background palette.
    - * - `dark` - `{boolean}`: Indicates if it's a dark theme.
    - * @returns {Promise} A resolved promise with the new theme name. - */ - - /* @ngInject */ - function ThemingService($rootScope, $mdUtil, $q, $log) { - // Allow us to be invoked via a linking function signature. - var applyTheme = function (scope, el) { - if (el === undefined) { el = scope; scope = undefined; } - if (scope === undefined) { scope = $rootScope; } - applyTheme.inherit(el, el); - }; - - Object.defineProperty(applyTheme, 'THEMES', { - get: function () { - return angular.extend({}, THEMES); - } - }); - Object.defineProperty(applyTheme, 'PALETTES', { - get: function () { - return angular.extend({}, PALETTES); - } - }); - Object.defineProperty(applyTheme, 'ALWAYS_WATCH', { - get: function () { - return alwaysWatchTheme; - } - }); - applyTheme.inherit = inheritTheme; - applyTheme.registered = registered; - applyTheme.defaultTheme = function() { return defaultTheme; }; - applyTheme.generateTheme = function(name) { generateTheme(THEMES[name], name, themeConfig.nonce); }; - applyTheme.defineTheme = function(name, options) { - options = options || {}; - - var theme = registerTheme(name); - - if (options.primary) { - theme.primaryPalette(options.primary, options.primaryHues); - } - if (options.accent) { - theme.accentPalette(options.accent, options.accentHues); - } - if (options.warn) { - theme.warnPalette(options.warn, options.warnHues); - } - if (options.background) { - theme.backgroundPalette(options.background, options.backgroundHues); - } - if (options.dark){ - theme.dark(); - } - - this.generateTheme(name); - - return $q.resolve(name); - }; - applyTheme.setBrowserColor = enableBrowserColor; - - return applyTheme; - - /** - * Determine is specified theme name is a valid, registered theme - */ - function registered(themeName) { - if (themeName === undefined || themeName === '') return true; - return applyTheme.THEMES[themeName] !== undefined; - } - - /** - * Get theme name for the element, then update with Theme CSS class - */ - function inheritTheme (el, parent) { - var ctrl = parent.controller('mdTheme') || el.data('$mdThemeController'); - var scope = el.scope(); - - updateThemeClass(lookupThemeName()); - - if (ctrl) { - var watchTheme = alwaysWatchTheme || - ctrl.$shouldWatch || - $mdUtil.parseAttributeBoolean(el.attr('md-theme-watch')); - - if (watchTheme || ctrl.isAsyncTheme) { - var clearNameWatcher = function () { - if (unwatch) { - unwatch(); - unwatch = undefined; - } - }; - - var unwatch = ctrl.registerChanges(function(name) { - updateThemeClass(name); - - if (!watchTheme) { - clearNameWatcher(); - } - }); - - if (scope) { - scope.$on('$destroy', clearNameWatcher); - } else { - el.on('$destroy', clearNameWatcher); - } - } - } - - /** - * Find the theme name from the parent controller or element data - */ - function lookupThemeName() { - // As a few components (dialog) add their controllers later, we should also watch for a controller init. - return ctrl && ctrl.$mdTheme || (defaultTheme === 'default' ? '' : defaultTheme); - } - - /** - * Remove old theme class and apply a new one - * NOTE: if not a valid theme name, then the current name is not changed - */ - function updateThemeClass(theme) { - if (!theme) return; - if (!registered(theme)) { - $log.warn('Attempted to use unregistered theme \'' + theme + '\'. ' + - 'Register it with $mdThemingProvider.theme().'); - } - - var oldTheme = el.data('$mdThemeName'); - if (oldTheme) el.removeClass('md-' + oldTheme +'-theme'); - el.addClass('md-' + theme + '-theme'); - el.data('$mdThemeName', theme); - if (ctrl) { - el.data('$mdThemeController', ctrl); - } - } - } - - } -} - -function ThemingDirective($mdTheming, $interpolate, $parse, $mdUtil, $q, $log) { - return { - priority: 101, // has to be more than 100 to be before interpolation (issue on IE) - link: { - pre: function(scope, el, attrs) { - var registeredCallbacks = []; - - var startSymbol = $interpolate.startSymbol(); - var endSymbol = $interpolate.endSymbol(); - - var theme = attrs.mdTheme.trim(); - - var hasInterpolation = - theme.substr(0, startSymbol.length) === startSymbol && - theme.lastIndexOf(endSymbol) === theme.length - endSymbol.length; - - var oneTimeOperator = '::'; - var oneTimeBind = attrs.mdTheme - .split(startSymbol).join('') - .split(endSymbol).join('') - .trim() - .substr(0, oneTimeOperator.length) === oneTimeOperator; - - var getTheme = function () { - var interpolation = $interpolate(attrs.mdTheme)(scope); - return $parse(interpolation)(scope) || interpolation; - }; - - var ctrl = { - isAsyncTheme: angular.isFunction(getTheme()) || angular.isFunction(getTheme().then), - registerChanges: function (cb, context) { - if (context) { - cb = angular.bind(context, cb); - } - - registeredCallbacks.push(cb); - - return function () { - var index = registeredCallbacks.indexOf(cb); - - if (index > -1) { - registeredCallbacks.splice(index, 1); - } - }; - }, - $setTheme: function (theme) { - if (!$mdTheming.registered(theme)) { - $log.warn('attempted to use unregistered theme \'' + theme + '\''); - } - - ctrl.$mdTheme = theme; - - // Iterating backwards to support unregistering during iteration - // http://stackoverflow.com/a/9882349/890293 - // we don't use `reverse()` of array because it mutates the array and we don't want it - // to get re-indexed - for (var i = registeredCallbacks.length; i--;) { - registeredCallbacks[i](theme); - } - }, - $shouldWatch: $mdUtil.parseAttributeBoolean(el.attr('md-theme-watch')) || - $mdTheming.ALWAYS_WATCH || - (hasInterpolation && !oneTimeBind) - }; - - el.data('$mdThemeController', ctrl); - - var setParsedTheme = function (theme) { - if (typeof theme === 'string') { - return ctrl.$setTheme(theme); - } - - $q.when(angular.isFunction(theme) ? theme() : theme) - .then(function(name) { - ctrl.$setTheme(name); - }); - }; - - setParsedTheme(getTheme()); - - var unwatch = scope.$watch(getTheme, function(theme) { - if (theme) { - setParsedTheme(theme); - - if (!ctrl.$shouldWatch) { - unwatch(); - } - } - }); - } - } - }; -} - -/** - * Special directive that will disable ALL runtime Theme style generation and DOM injection - * - * - * - * - * - * ... - * - * - * Note: Using md-themes-css directive requires the developer to load external - * theme stylesheets; e.g. custom themes from Material-Tools: - * - * `angular-material.themes.css` - * - * Another option is to use the ThemingProvider to configure and disable the attribute - * conversions; this would obviate the use of the `md-themes-css` directive - * - */ -function disableThemesDirective() { - themeConfig.disableTheming = true; - - // Return a 1x-only, first-match attribute directive - return { - restrict : 'A', - priority : '900' - }; -} - -function ThemableDirective($mdTheming) { - return $mdTheming; -} - -function parseRules(theme, colorType, rules) { - checkValidPalette(theme, colorType); - - rules = rules.replace(/THEME_NAME/g, theme.name); - var themeNameRegex = new RegExp('\\.md-' + theme.name + '-theme', 'g'); - // Matches '{{ primary-color }}', etc - var hueRegex = new RegExp('([\'"])?{{\\s*([a-zA-Z]+)-?(color|default)?-?(contrast)?-?((?:\\d\\.?\\d*)|(?:[a-zA-Z]+))?\\s*}}(["\'])?','g'); - var simpleVariableRegex = /'?"?{{\s*([a-zA-Z]+)-(A?\d+|hue-[0-3]|shadow|default)-?(contrast)?-?((?:\d\.?\d*)|(?:[a-zA-Z]+))?\s*}}'?"?/g; - var defaultBgHue = theme.colors['background'].hues['default']; - var defaultBgContrastType = PALETTES[theme.colors['background'].name][defaultBgHue].contrastType; - - // find and replace simple variables where we use a specific hue, not an entire palette - // eg. "{{primary-100}}" - // \(' + THEME_COLOR_TYPES.join('\|') + '\)' - rules = rules.replace(simpleVariableRegex, function(match, colorType, hue, contrast, opacity) { - var regexColorType = colorType; - if (colorType === 'foreground') { - if (hue === 'shadow') { - return theme.foregroundShadow; - } else if (theme.foregroundPalette[hue]) { - // Use user defined palette number (ie: foreground-2) - return rgba(colorToRgbaArray(theme.foregroundPalette[hue])); - } else if (theme.foregroundPalette['1']){ - return rgba(colorToRgbaArray(theme.foregroundPalette['1'])); - } - // Default to background-default-contrast-{opacity} - colorType = 'background'; - contrast = 'contrast'; - if (!opacity && hue) { - // Convert references to legacy hues to opacities (i.e. foreground-4 to *-divider) - switch (hue) { - // hue-1 uses default opacity - case '2': - opacity = 'secondary'; - break; - case '3': - opacity = 'disabled'; - break; - case '4': - opacity = 'divider'; - } - } - hue = 'default'; - } - - // `default` is also accepted as a hue-value, because the background palettes are - // using it as a name for the default hue. - if (hue.indexOf('hue') === 0 || hue === 'default') { - hue = theme.colors[colorType].hues[hue]; - } - - var colorDetails = (PALETTES[ theme.colors[colorType].name ][hue] || ''); - - // If user has specified a foreground color, use those - if (colorType === 'background' && contrast && regexColorType !== 'foreground' && - colorDetails.contrastType === defaultBgContrastType) { - // Don't process if colorType was changed - switch (opacity) { - case 'secondary': - case 'icon': - if (theme.foregroundPalette['2']) { - return rgba(colorToRgbaArray(theme.foregroundPalette['2'])); - } - break; - case 'disabled': - case 'hint': - if (theme.foregroundPalette['3']) { - return rgba(colorToRgbaArray(theme.foregroundPalette['3'])); - } - break; - case 'divider': - if (theme.foregroundPalette['4']) { - return rgba(colorToRgbaArray(theme.foregroundPalette['4'])); - } - break; - default: - if (theme.foregroundPalette['1']) { - return rgba(colorToRgbaArray(theme.foregroundPalette['1'])); - } - break; - } - } - - if (contrast && opacity) { - opacity = colorDetails.opacity[opacity] || opacity; - } - - return rgba(colorDetails[contrast ? 'contrast' : 'value'], opacity); - }); - - var generatedRules = []; - - // For each type, generate rules for each hue (ie. default, md-hue-1, md-hue-2, md-hue-3) - angular.forEach(['default', 'hue-1', 'hue-2', 'hue-3'], function(hueName) { - var newRule = rules - .replace(hueRegex, function(match, _, matchedColorType, hueType, contrast, opacity) { - var color = theme.colors[matchedColorType]; - var palette = PALETTES[color.name]; - var hueValue = color.hues[hueName]; - if (contrast && opacity) { - opacity = palette[hueValue].opacity[opacity] || opacity; - } - return rgba(palette[hueValue][hueType === 'color' ? 'value' : 'contrast'], opacity); - }); - if (hueName !== 'default') { - newRule = newRule.replace(themeNameRegex, '.md-' + theme.name + '-theme.md-' + hueName); - } - - // Don't apply a selector rule to the default theme, making it easier to override - // styles of the base-component - if (theme.name === 'default') { - var themeRuleRegex = /((?:\s|>|\.|\w|-|:|\(|\)|\[|]|"|'|=)*)\.md-default-theme((?:\s|>|\.|\w|-|:|\(|\)|\[|]|"|'|=)*)/g; - - newRule = newRule.replace(themeRuleRegex, function(match, start, end) { - return match + ', ' + start + end; - }); - } - generatedRules.push(newRule); - }); - - return generatedRules; -} - -var rulesByType = {}; - -// Generate our themes at run time given the state of THEMES and PALETTES -function generateAllThemes($injector, $mdTheming) { - var head = document.head; - var firstChild = head ? head.firstElementChild : null; - var themeCss = !themeConfig.disableTheming && $injector.has('$MD_THEME_CSS') ? $injector.get('$MD_THEME_CSS') : ''; - - // Append our custom registered styles to the theme stylesheet. - themeCss += themeConfig.registeredStyles.join(''); - - if (!firstChild) return; - if (themeCss.length === 0) return; // no rules, so no point in running this expensive task - - // Expose contrast colors for palettes to ensure that text is always readable - angular.forEach(PALETTES, sanitizePalette); - - // MD_THEME_CSS is a string generated by the build process that includes all the themeable - // components as templates - - // Break the CSS into individual rules - var rules = splitCss(themeCss).map(function(rule) { - return rule.trim(); - }); - - THEME_COLOR_TYPES.forEach(function(type) { - rulesByType[type] = ''; - }); - - // Sort the rules based on type, allowing us to do color substitution on a per-type basis - rules.forEach(function(rule) { - // First: test that if the rule has '.md-accent', it goes into the accent set of rules - for (var i = 0, type; type = THEME_COLOR_TYPES[i]; i++) { - if (rule.indexOf('.md-' + type) > -1) { - return rulesByType[type] += rule; - } - } - - // If no eg 'md-accent' class is found, try to just find 'accent' in the rule and guess from - // there - for (i = 0; type = THEME_COLOR_TYPES[i]; i++) { - if (rule.indexOf(type) > -1) { - return rulesByType[type] += rule; - } - } - - // Default to the primary array - return rulesByType[DEFAULT_COLOR_TYPE] += rule; - }); - - // If themes are being generated on-demand, quit here. The user will later manually - // call generateTheme to do this on a theme-by-theme basis. - if (themeConfig.generateOnDemand) return; - - angular.forEach($mdTheming.THEMES, function(theme) { - if (!GENERATED[theme.name] && !($mdTheming.defaultTheme() !== 'default' && theme.name === 'default')) { - generateTheme(theme, theme.name, themeConfig.nonce); - } - }); - - - // ************************* - // Internal functions - // ************************* - - /** - * The user specifies a 'default' contrast color as either light or dark, then explicitly lists - * which hues are the opposite contrast (eg. A100 has dark, A200 has light). - * @param {!object} palette to sanitize - */ - function sanitizePalette(palette) { - var defaultContrast = palette.contrastDefaultColor; - var lightColors = palette.contrastLightColors || []; - var strongLightColors = palette.contrastStrongLightColors || []; - var darkColors = palette.contrastDarkColors || []; - - // These colors are provided as space-separated lists - if (typeof lightColors === 'string') lightColors = lightColors.split(' '); - if (typeof strongLightColors === 'string') strongLightColors = strongLightColors.split(' '); - if (typeof darkColors === 'string') darkColors = darkColors.split(' '); - - // Cleanup after ourselves - delete palette.contrastDefaultColor; - delete palette.contrastLightColors; - delete palette.contrastStrongLightColors; - delete palette.contrastDarkColors; - - /** - * @param {string} hueName - * @return {'dark'|'light'|'strongLight'} - */ - function getContrastType(hueName) { - if (defaultContrast === 'light' ? darkColors.indexOf(hueName) !== -1 : - (lightColors.indexOf(hueName) === -1 && strongLightColors.indexOf(hueName) === -1)) { - return 'dark'; - } - if (strongLightColors.indexOf(hueName) !== -1) { - return 'strongLight'; - } - return 'light'; - } - - /** - * @param {'dark'|'light'|'strongLight'} contrastType - * @return {[number, number, number]} [red, green, blue] array - */ - function getContrastColor(contrastType) { - switch (contrastType) { - default: - case 'strongLight': - return STRONG_LIGHT_CONTRAST_COLOR; - case 'light': - return LIGHT_CONTRAST_COLOR; - case 'dark': - return DARK_CONTRAST_COLOR; - } - } - - /** - * @param {'dark'|'light'|'strongLight'} contrastType - * @return {{secondary: number, divider: number, hint: number, icon: number, disabled: number}} - */ - function getOpacityValues(contrastType) { - switch (contrastType) { - default: - case 'strongLight': - return STRONG_LIGHT_CONTRAST_OPACITY; - case 'light': - return LIGHT_CONTRAST_OPACITY; - case 'dark': - return DARK_CONTRAST_OPACITY; - } - } - // Change { 'A100': '#fffeee' } to { 'A100': { value: '#fffeee', contrast:DARK_CONTRAST_COLOR } - angular.forEach(palette, function(hueValue, hueName) { - if (angular.isObject(hueValue)) return; // Already converted - // Map everything to rgb colors - var rgbValue = colorToRgbaArray(hueValue); - if (!rgbValue) { - throw new Error("Color %1, in palette %2's hue %3, is invalid. Hex or rgb(a) color expected." - .replace('%1', hueValue) - .replace('%2', palette.name) - .replace('%3', hueName)); - } - - var contrastType = getContrastType(hueName); - palette[hueName] = { - hex: palette[hueName], - value: rgbValue, - contrastType: contrastType, - contrast: getContrastColor(contrastType), - opacity: getOpacityValues(contrastType) - }; - }); - } - - /** - * @param {string} themeCss - * @returns {[]} a string representing a CSS file that is split, producing an array with a rule - * at each index. - */ - function splitCss(themeCss) { - var result = []; - var currentRule = ''; - var openedCurlyBrackets = 0; - var closedCurlyBrackets = 0; - - for (var i = 0; i < themeCss.length; i++) { - var character = themeCss.charAt(i); - - // Check for content in quotes - if (character === '\'' || character === '"') { - // Append text in quotes to current rule - var textInQuotes = themeCss.substring(i, themeCss.indexOf(character, i + 1)); - currentRule += textInQuotes; - - // Jump to the closing quote char - i += textInQuotes.length; - } else { - currentRule += character; - - if (character === '}') { - closedCurlyBrackets++; - if (closedCurlyBrackets === openedCurlyBrackets) { - closedCurlyBrackets = 0; - openedCurlyBrackets = 0; - result.push(currentRule); - currentRule = ''; - } - } else if (character === '{') { - openedCurlyBrackets++; - } - } - } - // Add comments added after last valid rule. - if (currentRule !== '') { - result.push(currentRule); - } - - return result; - } -} - -function generateTheme(theme, name, nonce) { - var head = document.head; - var firstChild = head ? head.firstElementChild : null; - - if (!GENERATED[name]) { - // For each theme, use the color palettes specified for - // `primary`, `warn` and `accent` to generate CSS rules. - THEME_COLOR_TYPES.forEach(function(colorType) { - var styleStrings = parseRules(theme, colorType, rulesByType[colorType]); - while (styleStrings.length) { - var styleContent = styleStrings.shift(); - if (styleContent) { - var style = document.createElement('style'); - style.setAttribute('md-theme-style', ''); - if (nonce) { - style.setAttribute('nonce', nonce); - } - style.appendChild(document.createTextNode(styleContent)); - head.insertBefore(style, firstChild); - } - } - }); - - GENERATED[theme.name] = true; - } - -} - - -function checkValidPalette(theme, colorType) { - // If theme attempts to use a palette that doesnt exist, throw error - if (!PALETTES[ (theme.colors[colorType] || {}).name ]) { - throw new Error( - "You supplied an invalid color palette for theme %1's %2 palette. Available palettes: %3" - .replace('%1', theme.name) - .replace('%2', colorType) - .replace('%3', Object.keys(PALETTES).join(', ')) - ); - } -} - -/** - * @param {string} clr rbg or rgba color - * @return {number[]|undefined} [red, green, blue] array if it can be computed - */ -function colorToRgbaArray(clr) { - if (angular.isArray(clr) && clr.length === 3) return clr; - if (/^rgb/.test(clr)) { - return clr.replace(/(^\s*rgba?\(|\)\s*$)/g, '').split(',').map(function(value, i) { - return i === 3 ? parseFloat(value) : parseInt(value, 10); - }); - } - if (clr.charAt(0) === '#') clr = clr.substring(1); - if (!/^([a-fA-F0-9]{3}){1,2}$/g.test(clr)) return; - - var dig = clr.length / 3; - var red = clr.substr(0, dig); - var grn = clr.substr(dig, dig); - var blu = clr.substr(dig * 2); - if (dig === 1) { - red += red; - grn += grn; - blu += blu; - } - return [parseInt(red, 16), parseInt(grn, 16), parseInt(blu, 16)]; -} - -function rgba(rgbArray, opacity) { - if (!rgbArray) return "rgb('0,0,0')"; - - if (rgbArray.length === 4) { - rgbArray = angular.copy(rgbArray); - opacity ? rgbArray.pop() : opacity = rgbArray.pop(); - } - return opacity && (typeof opacity == 'number' || (typeof opacity == 'string' && opacity.length)) ? - 'rgba(' + rgbArray.join(',') + ',' + opacity + ')' : - 'rgb(' + rgbArray.join(',') + ')'; -} - - -})(window.angular); - -})(); -(function(){ -"use strict"; - -/** - * @ngdoc module - * @name material.components.autocomplete - */ -/* - * @see js folder for autocomplete implementation - */ -angular.module('material.components.autocomplete', [ - 'material.core', - 'material.components.icon', - 'material.components.virtualRepeat' -]); - -})(); -(function(){ -"use strict"; - - -MdAutocompleteCtrl.$inject = ["$scope", "$element", "$mdUtil", "$mdConstant", "$mdTheming", "$window", "$animate", "$rootElement", "$attrs", "$q", "$log", "$mdLiveAnnouncer"];angular - .module('material.components.autocomplete') - .controller('MdAutocompleteCtrl', MdAutocompleteCtrl); - -var ITEM_HEIGHT = 48, - MAX_ITEMS = 5, - MENU_PADDING = 8, - INPUT_PADDING = 2, // Padding provided by `md-input-container` - MODE_STANDARD = 'standard', - MODE_VIRTUAL = 'virtual'; - -function MdAutocompleteCtrl ($scope, $element, $mdUtil, $mdConstant, $mdTheming, $window, - $animate, $rootElement, $attrs, $q, $log, $mdLiveAnnouncer) { - - // Internal Variables. - var ctrl = this, - itemParts = $scope.itemsExpr.split(/ in /i), - itemExpr = itemParts[ 1 ], - elements = null, - cache = {}, - noBlur = false, - selectedItemWatchers = [], - hasFocus = false, - fetchesInProgress = 0, - enableWrapScroll = null, - inputModelCtrl = null, - debouncedOnResize = $mdUtil.debounce(onWindowResize), - mode = MODE_VIRTUAL; // default - - /** - * The root document element. This is used for attaching a top-level click handler to - * close the options panel when a click outside said panel occurs. We use `documentElement` - * instead of body because, when scrolling is disabled, some browsers consider the body element - * to be completely off the screen and propagate events directly to the html element. - * @type {!Object} angular.JQLite - */ - ctrl.documentElement = angular.element(document.documentElement); - - // Public Exported Variables with handlers - defineProperty('hidden', handleHiddenChange, true); - - // Public Exported Variables - ctrl.scope = $scope; - ctrl.parent = $scope.$parent; - ctrl.itemName = itemParts[0]; - ctrl.matches = []; - ctrl.loading = false; - ctrl.hidden = true; - ctrl.index = -1; - ctrl.activeOption = null; - ctrl.id = $mdUtil.nextUid(); - ctrl.isDisabled = null; - ctrl.isRequired = null; - ctrl.isReadonly = null; - ctrl.hasNotFound = false; - ctrl.selectedMessage = $scope.selectedMessage || 'selected'; - ctrl.noMatchMessage = $scope.noMatchMessage || 'There are no matches available.'; - ctrl.singleMatchMessage = $scope.singleMatchMessage || 'There is 1 match available.'; - ctrl.multipleMatchStartMessage = $scope.multipleMatchStartMessage || 'There are '; - ctrl.multipleMatchEndMessage = $scope.multipleMatchEndMessage || ' matches available.'; - ctrl.defaultEscapeOptions = 'clear'; - - // Public Exported Methods - ctrl.keydown = keydown; - ctrl.blur = blur; - ctrl.focus = focus; - ctrl.clear = clearValue; - ctrl.select = select; - ctrl.listEnter = onListEnter; - ctrl.listLeave = onListLeave; - ctrl.focusInput = focusInputElement; - ctrl.getCurrentDisplayValue = getCurrentDisplayValue; - ctrl.registerSelectedItemWatcher = registerSelectedItemWatcher; - ctrl.unregisterSelectedItemWatcher = unregisterSelectedItemWatcher; - ctrl.notFoundVisible = notFoundVisible; - ctrl.loadingIsVisible = loadingIsVisible; - ctrl.positionDropdown = positionDropdown; - - /** - * Report types to be used for the $mdLiveAnnouncer - * @enum {number} Unique flag id. - */ - var ReportType = { - Count: 1, - Selected: 2 - }; - - return init(); - - // initialization methods - - /** - * Initialize the controller, setup watchers, gather elements - */ - function init () { - - $mdUtil.initOptionalProperties($scope, $attrs, { - searchText: '', - selectedItem: null, - clearButton: false, - disableVirtualRepeat: false, - }); - - $mdTheming($element); - configureWatchers(); - $mdUtil.nextTick(function () { - - gatherElements(); - moveDropdown(); - - // Touch devices often do not send a click event on tap. We still want to focus the input - // and open the options pop-up in these cases. - $element.on('touchstart', focusInputElement); - - // Forward all focus events to the input element when autofocus is enabled - if ($scope.autofocus) { - $element.on('focus', focusInputElement); - } - if ($scope.inputAriaDescribedBy) { - elements.input.setAttribute('aria-describedby', $scope.inputAriaDescribedBy); - } - if (!$scope.floatingLabel) { - if ($scope.inputAriaLabel) { - elements.input.setAttribute('aria-label', $scope.inputAriaLabel); - } else if ($scope.inputAriaLabelledBy) { - elements.input.setAttribute('aria-labelledby', $scope.inputAriaLabelledBy); - } else if ($scope.placeholder) { - // If no aria-label or aria-labelledby references are defined, then just label using the - // placeholder. - elements.input.setAttribute('aria-label', $scope.placeholder); - } - } - }); - } - - function updateModelValidators() { - if (!$scope.requireMatch || !inputModelCtrl) return; - - inputModelCtrl.$setValidity('md-require-match', !!$scope.selectedItem || !$scope.searchText); - } - - /** - * Calculates the dropdown's position and applies the new styles to the menu element - * @returns {*} - */ - function positionDropdown () { - if (!elements) { - return $mdUtil.nextTick(positionDropdown, false, $scope); - } - - var dropdownHeight = ($scope.dropdownItems || MAX_ITEMS) * ITEM_HEIGHT; - var hrect = elements.wrap.getBoundingClientRect(), - vrect = elements.snap.getBoundingClientRect(), - root = elements.root.getBoundingClientRect(), - top = vrect.bottom - root.top, - bot = root.bottom - vrect.top, - left = hrect.left - root.left, - width = hrect.width, - offset = getVerticalOffset(), - position = $scope.dropdownPosition, - styles, enoughBottomSpace, enoughTopSpace; - var bottomSpace = root.bottom - vrect.bottom - MENU_PADDING + $mdUtil.getViewportTop(); - var topSpace = vrect.top - MENU_PADDING; - - // Automatically determine dropdown placement based on available space in viewport. - if (!position) { - enoughTopSpace = topSpace > dropdownHeight; - enoughBottomSpace = bottomSpace > dropdownHeight; - if (enoughBottomSpace) { - position = 'bottom'; - } else if (enoughTopSpace) { - position = 'top'; - } else { - position = topSpace > bottomSpace ? 'top' : 'bottom'; - } - } - // Adjust the width to account for the padding provided by `md-input-container` - if ($attrs.mdFloatingLabel) { - left += INPUT_PADDING; - width -= INPUT_PADDING * 2; - } - styles = { - left: left + 'px', - minWidth: width + 'px', - maxWidth: Math.max(hrect.right - root.left, root.right - hrect.left) - MENU_PADDING + 'px' - }; - - if (position === 'top') { - styles.top = 'auto'; - styles.bottom = bot + 'px'; - styles.maxHeight = Math.min(dropdownHeight, topSpace) + 'px'; - } else { - bottomSpace = root.bottom - hrect.bottom - MENU_PADDING + $mdUtil.getViewportTop(); - - styles.top = (top - offset) + 'px'; - styles.bottom = 'auto'; - styles.maxHeight = Math.min(dropdownHeight, bottomSpace) + 'px'; - } - - elements.$.scrollContainer.css(styles); - $mdUtil.nextTick(correctHorizontalAlignment, false, $scope); - - /** - * Calculates the vertical offset for floating label examples to account for ngMessages - * @returns {number} - */ - function getVerticalOffset () { - var offset = 0; - var inputContainer = $element.find('md-input-container'); - if (inputContainer.length) { - var input = inputContainer.find('input'); - offset = inputContainer.prop('offsetHeight'); - offset -= input.prop('offsetTop'); - offset -= input.prop('offsetHeight'); - // add in the height left up top for the floating label text - offset += inputContainer.prop('offsetTop'); - } - return offset; - } - - /** - * Makes sure that the menu doesn't go off of the screen on either side. - */ - function correctHorizontalAlignment () { - var dropdown = elements.scrollContainer.getBoundingClientRect(), - styles = {}; - if (dropdown.right > root.right) { - styles.left = (hrect.right - dropdown.width) + 'px'; - } - elements.$.scrollContainer.css(styles); - } - } - - /** - * Moves the dropdown menu to the body tag in order to avoid z-index and overflow issues. - */ - function moveDropdown () { - if (!elements.$.root.length) return; - $mdTheming(elements.$.scrollContainer); - elements.$.scrollContainer.detach(); - elements.$.root.append(elements.$.scrollContainer); - if ($animate.pin) $animate.pin(elements.$.scrollContainer, $rootElement); - } - - /** - * Sends focus to the input element. - */ - function focusInputElement () { - elements.input.focus(); - } - - /** - * Update the activeOption based on the selected item in the listbox. - * The activeOption is used in the template to set the aria-activedescendant attribute, which - * enables screen readers to properly handle visual focus within the listbox and announce the - * item's place in the list. I.e. "List item 3 of 50". Anytime that `ctrl.index` changes, this - * function needs to be called to update the activeOption. - */ - function updateActiveOption() { - var selectedOption = elements.scroller.querySelector('.selected'); - if (selectedOption) { - ctrl.activeOption = selectedOption.id; - } else { - ctrl.activeOption = null; - } - } - - /** - * Sets up any watchers used by autocomplete - */ - function configureWatchers () { - var wait = parseInt($scope.delay, 10) || 0; - - $attrs.$observe('disabled', function (value) { ctrl.isDisabled = $mdUtil.parseAttributeBoolean(value, false); }); - $attrs.$observe('required', function (value) { ctrl.isRequired = $mdUtil.parseAttributeBoolean(value, false); }); - $attrs.$observe('readonly', function (value) { ctrl.isReadonly = $mdUtil.parseAttributeBoolean(value, false); }); - - $scope.$watch('searchText', wait ? $mdUtil.debounce(handleSearchText, wait) : handleSearchText); - $scope.$watch('selectedItem', selectedItemChange); - - angular.element($window).on('resize', debouncedOnResize); - - $scope.$on('$destroy', cleanup); - } - - /** - * Removes any events or leftover elements created by this controller - */ - function cleanup () { - if (!ctrl.hidden) { - $mdUtil.enableScrolling(); - } - - angular.element($window).off('resize', debouncedOnResize); - - if (elements){ - var items = ['ul', 'scroller', 'scrollContainer', 'input']; - angular.forEach(items, function(key){ - elements.$[key].remove(); - }); - } - } - - /** - * Event handler to be called whenever the window resizes. - */ - function onWindowResize() { - if (!ctrl.hidden) { - positionDropdown(); - } - } - - /** - * Gathers all of the elements needed for this controller - */ - function gatherElements () { - - var snapWrap = gatherSnapWrap(); - - elements = { - main: $element[0], - scrollContainer: $element[0].querySelector('.md-virtual-repeat-container, .md-standard-list-container'), - scroller: $element[0].querySelector('.md-virtual-repeat-scroller, .md-standard-list-scroller'), - ul: $element.find('ul')[0], - input: $element.find('input')[0], - wrap: snapWrap.wrap, - snap: snapWrap.snap, - root: document.body, - }; - - elements.li = elements.ul.getElementsByTagName('li'); - elements.$ = getAngularElements(elements); - mode = elements.scrollContainer.classList.contains('md-standard-list-container') ? MODE_STANDARD : MODE_VIRTUAL; - inputModelCtrl = elements.$.input.controller('ngModel'); - } - - /** - * Gathers the snap and wrap elements - * - */ - function gatherSnapWrap() { - var element; - var value; - for (element = $element; element.length; element = element.parent()) { - value = element.attr('md-autocomplete-snap'); - if (angular.isDefined(value)) break; - } - - if (element.length) { - return { - snap: element[0], - wrap: (value.toLowerCase() === 'width') ? element[0] : $element.find('md-autocomplete-wrap')[0] - }; - } - - var wrap = $element.find('md-autocomplete-wrap')[0]; - return { - snap: wrap, - wrap: wrap - }; - } - - /** - * Gathers angular-wrapped versions of each element - * @param elements - * @returns {{}} - */ - function getAngularElements (elements) { - var obj = {}; - for (var key in elements) { - if (elements.hasOwnProperty(key)) obj[ key ] = angular.element(elements[ key ]); - } - return obj; - } - - // event/change handlers - - /** - * @param {Event} $event - */ - function preventDefault($event) { - $event.preventDefault(); - } - - /** - * @param {Event} $event - */ - function stopPropagation($event) { - $event.stopPropagation(); - } - - /** - * Handles changes to the `hidden` property. - * @param {boolean} hidden true to hide the options pop-up, false to show it. - * @param {boolean} oldHidden the previous value of hidden - */ - function handleHiddenChange (hidden, oldHidden) { - var scrollContainerElement; - - if (elements) { - scrollContainerElement = angular.element(elements.scrollContainer); - } - if (!hidden && oldHidden) { - positionDropdown(); - - // Report in polite mode, because the screen reader should finish the default description of - // the input element. - reportMessages(true, ReportType.Count | ReportType.Selected); - - if (elements) { - $mdUtil.disableScrollAround(elements.scrollContainer); - enableWrapScroll = disableElementScrollEvents(elements.wrap); - if ($mdUtil.isIos) { - ctrl.documentElement.on('touchend', handleTouchOutsidePanel); - if (scrollContainerElement) { - scrollContainerElement.on('touchstart touchmove touchend', stopPropagation); - } - } - ctrl.index = getDefaultIndex(); - $mdUtil.nextTick(function() { - updateActiveOption(); - updateScroll(); - }); - } - } else if (hidden && !oldHidden) { - if ($mdUtil.isIos) { - ctrl.documentElement.off('touchend', handleTouchOutsidePanel); - if (scrollContainerElement) { - scrollContainerElement.off('touchstart touchmove touchend', stopPropagation); - } - } - $mdUtil.enableScrolling(); - - if (enableWrapScroll) { - enableWrapScroll(); - enableWrapScroll = null; - } - } - } - - /** - * Handling touch events that bubble up to the document is required for closing the dropdown - * panel on touch outside of the options pop-up panel on iOS. - * @param {Event} $event - */ - function handleTouchOutsidePanel($event) { - ctrl.hidden = true; - // iOS does not blur the pop-up for touches on the scroll mask, so we have to do it. - doBlur(true); - } - - /** - * Disables scrolling for a specific element. - * @param {!string|!DOMElement} element to disable scrolling - * @return {Function} function to call to re-enable scrolling for the element - */ - function disableElementScrollEvents(element) { - var elementToDisable = angular.element(element); - elementToDisable.on('wheel touchmove', preventDefault); - - return function() { - elementToDisable.off('wheel touchmove', preventDefault); - }; - } - - /** - * When the user mouses over the dropdown menu, ignore blur events. - */ - function onListEnter () { - noBlur = true; - } - - /** - * When the user's mouse leaves the menu, blur events may hide the menu again. - */ - function onListLeave () { - if (!hasFocus && !ctrl.hidden) elements.input.focus(); - noBlur = false; - ctrl.hidden = shouldHide(); - } - - /** - * Handles changes to the selected item. - * @param selectedItem - * @param previousSelectedItem - */ - function selectedItemChange (selectedItem, previousSelectedItem) { - - updateModelValidators(); - - if (selectedItem) { - getDisplayValue(selectedItem).then(function (val) { - $scope.searchText = val; - handleSelectedItemChange(selectedItem, previousSelectedItem); - }); - } else if (previousSelectedItem && $scope.searchText) { - getDisplayValue(previousSelectedItem).then(function(displayValue) { - // Clear the searchText, when the selectedItem is set to null. - // Do not clear the searchText, when the searchText isn't matching with the previous - // selected item. - if (angular.isString($scope.searchText) - && displayValue.toString().toLowerCase() === $scope.searchText.toLowerCase()) { - $scope.searchText = ''; - } - }); - } - - if (selectedItem !== previousSelectedItem) { - announceItemChange(); - } - } - - /** - * Use the user-defined expression to announce changes each time a new item is selected - */ - function announceItemChange () { - angular.isFunction($scope.itemChange) && - $scope.itemChange(getItemAsNameVal($scope.selectedItem)); - } - - /** - * Use the user-defined expression to announce changes each time the search text is changed - */ - function announceTextChange () { - angular.isFunction($scope.textChange) && $scope.textChange(); - } - - /** - * Calls any external watchers listening for the selected item. Used in conjunction with - * `registerSelectedItemWatcher`. - * @param selectedItem - * @param previousSelectedItem - */ - function handleSelectedItemChange (selectedItem, previousSelectedItem) { - selectedItemWatchers.forEach(function (watcher) { - watcher(selectedItem, previousSelectedItem); - }); - } - - /** - * Register a function to be called when the selected item changes. - * @param cb - */ - function registerSelectedItemWatcher (cb) { - if (selectedItemWatchers.indexOf(cb) === -1) { - selectedItemWatchers.push(cb); - } - } - - /** - * Unregister a function previously registered for selected item changes. - * @param cb - */ - function unregisterSelectedItemWatcher (cb) { - var i = selectedItemWatchers.indexOf(cb); - if (i !== -1) { - selectedItemWatchers.splice(i, 1); - } - } - - /** - * Handles changes to the searchText property. - * @param {string} searchText - * @param {string} previousSearchText - */ - function handleSearchText (searchText, previousSearchText) { - ctrl.index = getDefaultIndex(); - - // do nothing on init - if (searchText === previousSearchText) return; - - updateModelValidators(); - - getDisplayValue($scope.selectedItem).then(function (val) { - // clear selected item if search text no longer matches it - if (searchText !== val) { - $scope.selectedItem = null; - - // trigger change event if available - if (searchText !== previousSearchText) { - announceTextChange(); - } - - // cancel results if search text is not long enough - if (!isMinLengthMet()) { - ctrl.matches = []; - - setLoading(false); - reportMessages(true, ReportType.Count); - - } else { - handleQuery(); - } - } - }); - - } - - /** - * Handles input blur event, determines if the dropdown should hide. - * @param {Event=} $event - */ - function blur($event) { - hasFocus = false; - - if (!noBlur) { - ctrl.hidden = shouldHide(); - evalAttr('ngBlur', { $event: $event }); - } else if (angular.isObject($event)) { - $event.stopImmediatePropagation(); - } - } - - /** - * Force blur on input element - * @param {boolean} forceBlur - */ - function doBlur(forceBlur) { - if (forceBlur) { - noBlur = false; - hasFocus = false; - } - elements.input.blur(); - } - - /** - * Handles input focus event, determines if the dropdown should show. - */ - function focus($event) { - hasFocus = true; - - if (isSearchable() && isMinLengthMet()) { - handleQuery(); - } - - ctrl.hidden = shouldHide(); - - evalAttr('ngFocus', { $event: $event }); - } - - /** - * Handles keyboard input. - * @param event - */ - function keydown (event) { - switch (event.keyCode) { - case $mdConstant.KEY_CODE.DOWN_ARROW: - if (ctrl.loading || hasSelection()) return; - event.stopPropagation(); - event.preventDefault(); - ctrl.index = ctrl.index + 1 > ctrl.matches.length - 1 ? 0 : Math.min(ctrl.index + 1, ctrl.matches.length - 1); - $mdUtil.nextTick(updateActiveOption); - updateScroll(); - break; - case $mdConstant.KEY_CODE.UP_ARROW: - if (ctrl.loading || hasSelection()) return; - event.stopPropagation(); - event.preventDefault(); - ctrl.index = ctrl.index - 1 < 0 ? ctrl.matches.length - 1 : Math.max(0, ctrl.index - 1); - $mdUtil.nextTick(updateActiveOption); - updateScroll(); - break; - case $mdConstant.KEY_CODE.TAB: - // If we hit tab, assume that we've left the list so it will close - onListLeave(); - - if (ctrl.hidden || ctrl.loading || ctrl.index < 0 || ctrl.matches.length < 1) return; - select(ctrl.index); - break; - case $mdConstant.KEY_CODE.ENTER: - if (ctrl.hidden || ctrl.loading || ctrl.index < 0 || ctrl.matches.length < 1) return; - if (hasSelection()) return; - event.stopImmediatePropagation(); - event.preventDefault(); - select(ctrl.index); - break; - case $mdConstant.KEY_CODE.ESCAPE: - event.preventDefault(); // Prevent browser from always clearing input - if (!shouldProcessEscape()) return; - event.stopPropagation(); - - clearSelectedItem(); - if ($scope.searchText && hasEscapeOption('clear')) { - clearSearchText(); - } - - // Manually hide (needed for mdNotFound support) - ctrl.hidden = true; - - if (hasEscapeOption('blur')) { - // Force the component to blur if they hit escape - doBlur(true); - } - - break; - default: - } - } - - // getters - - /** - * Returns the minimum length needed to display the dropdown. - * @returns {*} - */ - function getMinLength () { - return angular.isNumber($scope.minLength) ? $scope.minLength : 1; - } - - /** - * Returns the display value for an item. - * @param {*} item - * @returns {*} - */ - function getDisplayValue (item) { - return $q.when(getItemText(item) || item).then(function(itemText) { - if (itemText && !angular.isString(itemText)) { - $log.warn('md-autocomplete: Could not resolve display value to a string. ' + - 'Please check the `md-item-text` attribute.'); - } - - return itemText; - }); - - /** - * Getter function to invoke user-defined expression (in the directive) - * to convert your object to a single string. - * @param {*} item - * @returns {string|null} - */ - function getItemText (item) { - return (item && $scope.itemText) ? $scope.itemText(getItemAsNameVal(item)) : null; - } - } - - /** - * Returns the locals object for compiling item templates. - * @param {*} item - * @returns {Object|undefined} - */ - function getItemAsNameVal (item) { - if (!item) { - return undefined; - } - - var locals = {}; - if (ctrl.itemName) { - locals[ ctrl.itemName ] = item; - } - - return locals; - } - - /** - * Returns the default index based on whether or not autoselect is enabled. - * @returns {number} 0 if autoselect is enabled, -1 if not. - */ - function getDefaultIndex () { - return $scope.autoselect ? 0 : -1; - } - - /** - * Sets the loading parameter and updates the hidden state. - * @param value {boolean} Whether or not the component is currently loading. - */ - function setLoading(value) { - if (ctrl.loading !== value) { - ctrl.loading = value; - } - - // Always refresh the hidden variable as something else might have changed - ctrl.hidden = shouldHide(); - } - - /** - * Determines if the menu should be hidden. - * @returns {boolean} true if the menu should be hidden - */ - function shouldHide () { - return !shouldShow(); - } - - /** - * Determines whether the autocomplete is able to query within the current state. - * @returns {boolean} true if the query can be run - */ - function isSearchable() { - if (ctrl.loading && !hasMatches()) { - // No query when query is in progress. - return false; - } else if (hasSelection()) { - // No query if there is already a selection - return false; - } - else if (!hasFocus) { - // No query if the input does not have focus - return false; - } - return true; - } - - /** - * @returns {boolean} if the escape keydown should be processed, return true. - * Otherwise return false. - */ - function shouldProcessEscape() { - return hasEscapeOption('blur') || !ctrl.hidden || ctrl.loading || hasEscapeOption('clear') && $scope.searchText; - } - - /** - * @param {string} option check if this option is set - * @returns {boolean} if the specified escape option is set, return true. Return false otherwise. - */ - function hasEscapeOption(option) { - if (!angular.isString($scope.escapeOptions)) { - return ctrl.defaultEscapeOptions.indexOf(option) !== -1; - } else { - return $scope.escapeOptions.toLowerCase().indexOf(option) !== -1; - } - } - - /** - * Determines if the menu should be shown. - * @returns {boolean} true if the menu should be shown - */ - function shouldShow() { - if (ctrl.isReadonly) { - // Don't show if read only is set - return false; - } else if (!isSearchable()) { - // Don't show if a query is in progress, there is already a selection, - // or the input is not focused. - return false; - } - return (isMinLengthMet() && hasMatches()) || notFoundVisible(); - } - - /** - * @returns {boolean} true if the search text has matches. - */ - function hasMatches() { - return ctrl.matches.length ? true : false; - } - - /** - * @returns {boolean} true if the autocomplete has a valid selection. - */ - function hasSelection() { - return ctrl.scope.selectedItem ? true : false; - } - - /** - * @returns {boolean} true if the loading indicator is, or should be, visible. - */ - function loadingIsVisible() { - return ctrl.loading && !hasSelection(); - } - - /** - * @returns {*} the display value of the current item. - */ - function getCurrentDisplayValue () { - return getDisplayValue(ctrl.matches[ ctrl.index ]); - } - - /** - * Determines if the minimum length is met by the search text. - * @returns {*} true if the minimum length is met by the search text - */ - function isMinLengthMet () { - return ($scope.searchText || '').length >= getMinLength(); - } - - // actions - - /** - * Defines a public property with a handler and a default value. - * @param {string} key - * @param {Function} handler function - * @param {*} defaultValue default value - */ - function defineProperty (key, handler, defaultValue) { - Object.defineProperty(ctrl, key, { - get: function () { return defaultValue; }, - set: function (newValue) { - var oldValue = defaultValue; - defaultValue = newValue; - handler(newValue, oldValue); - } - }); - } - - /** - * Selects the item at the given index. - * @param {number} index to select - */ - function select (index) { - // force form to update state for validation - $mdUtil.nextTick(function () { - getDisplayValue(ctrl.matches[ index ]).then(function (val) { - var ngModel = elements.$.input.controller('ngModel'); - $mdLiveAnnouncer.announce(val + ' ' + ctrl.selectedMessage, 'assertive'); - ngModel.$setViewValue(val); - ngModel.$render(); - }).finally(function () { - $scope.selectedItem = ctrl.matches[ index ]; - setLoading(false); - }); - }, false); - } - - /** - * Clears the searchText value and selected item. - * @param {Event} $event - */ - function clearValue ($event) { - if ($event) { - $event.stopPropagation(); - } - clearSelectedItem(); - clearSearchText(); - } - - /** - * Clears the selected item - */ - function clearSelectedItem () { - // Reset our variables - ctrl.index = -1; - $mdUtil.nextTick(updateActiveOption); - ctrl.matches = []; - } - - /** - * Clears the searchText value - */ - function clearSearchText () { - // Set the loading to true so we don't see flashes of content. - // The flashing will only occur when an async request is running. - // So the loading process will stop when the results had been retrieved. - setLoading(true); - - $scope.searchText = ''; - - // Normally, triggering the change / input event is unnecessary, because the browser detects it properly. - // But some browsers are not detecting it properly, which means that we have to trigger the event. - // Using the `input` is not working properly, because for example IE11 is not supporting the `input` event. - // The `change` event is a good alternative and is supported by all supported browsers. - var eventObj = document.createEvent('CustomEvent'); - eventObj.initCustomEvent('change', true, true, { value: '' }); - elements.input.dispatchEvent(eventObj); - - // For some reason, firing the above event resets the value of $scope.searchText if - // $scope.searchText has a space character at the end, so we blank it one more time and then - // focus. - elements.input.blur(); - $scope.searchText = ''; - elements.input.focus(); - } - - /** - * Fetches the results for the provided search text. - * @param searchText - */ - function fetchResults (searchText) { - var items = $scope.$parent.$eval(itemExpr), - term = searchText.toLowerCase(), - isList = angular.isArray(items), - isPromise = !!items.then; // Every promise should contain a `then` property - - if (isList) onResultsRetrieved(items); - else if (isPromise) handleAsyncResults(items); - - function handleAsyncResults(items) { - if (!items) return; - - items = $q.when(items); - fetchesInProgress++; - setLoading(true); - - $mdUtil.nextTick(function () { - items - .then(onResultsRetrieved) - .finally(function(){ - if (--fetchesInProgress === 0) { - setLoading(false); - } - }); - },true, $scope); - } - - function onResultsRetrieved(matches) { - cache[term] = matches; - - // Just cache the results if the request is now outdated. - // The request becomes outdated, when the new searchText has changed during the result fetching. - if ((searchText || '') !== ($scope.searchText || '')) { - return; - } - - handleResults(matches); - } - } - - - /** - * Reports given message types to supported screen readers. - * @param {boolean} isPolite Whether the announcement should be polite. - * @param {!number} types Message flags to be reported to the screen reader. - */ - function reportMessages(isPolite, types) { - var politeness = isPolite ? 'polite' : 'assertive'; - var messages = []; - - if (types & ReportType.Selected && ctrl.index !== -1) { - messages.push(getCurrentDisplayValue()); - } - - if (types & ReportType.Count) { - messages.push($q.resolve(getCountMessage())); - } - - $q.all(messages).then(function(data) { - $mdLiveAnnouncer.announce(data.join(' '), politeness); - }); - } - - /** - * @returns {string} the ARIA message for how many results match the current query. - */ - function getCountMessage () { - switch (ctrl.matches.length) { - case 0: - return ctrl.noMatchMessage; - case 1: - return ctrl.singleMatchMessage; - default: - return ctrl.multipleMatchStartMessage + ctrl.matches.length + ctrl.multipleMatchEndMessage; - } - } - - /** - * Makes sure that the focused element is within view. - */ - function updateScroll () { - if (!elements.li[0]) return; - if (mode === MODE_STANDARD) { - updateStandardScroll(); - } else { - updateVirtualScroll(); - } - } - - function updateVirtualScroll() { - // elements in virtual scroll have consistent heights - var optionHeight = elements.li[0].offsetHeight, - top = optionHeight * Math.max(0, ctrl.index), - bottom = top + optionHeight, - containerHeight = elements.scroller.clientHeight, - scrollTop = elements.scroller.scrollTop; - - if (top < scrollTop) { - scrollTo(top); - } else if (bottom > scrollTop + containerHeight) { - scrollTo(bottom - containerHeight); - } - } - - function updateStandardScroll() { - // elements in standard scroll have variable heights - var selected = elements.li[Math.max(0, ctrl.index)]; - var containerHeight = elements.scrollContainer.offsetHeight, - top = selected && selected.offsetTop || 0, - bottom = top + selected.clientHeight, - scrollTop = elements.scrollContainer.scrollTop; - - if (top < scrollTop) { - scrollTo(top); - } else if (bottom > scrollTop + containerHeight) { - scrollTo(bottom - containerHeight); - } - } - - function isPromiseFetching() { - return fetchesInProgress !== 0; - } - - function scrollTo (offset) { - if (mode === MODE_STANDARD) { - elements.scrollContainer.scrollTop = offset; - } else { - elements.$.scrollContainer.controller('mdVirtualRepeatContainer').scrollTo(offset); - } - } - - function notFoundVisible () { - var textLength = (ctrl.scope.searchText || '').length; - - return ctrl.hasNotFound && !hasMatches() && (!ctrl.loading || isPromiseFetching()) && textLength >= getMinLength() && (hasFocus || noBlur) && !hasSelection(); - } - - /** - * Starts the query to gather the results for the current searchText. Attempts to return cached - * results first, then forwards the process to `fetchResults` if necessary. - */ - function handleQuery () { - var searchText = $scope.searchText || ''; - var term = searchText.toLowerCase(); - - // If caching is enabled and the current searchText is stored in the cache - if (!$scope.noCache && cache[term]) { - // The results should be handled as same as a normal un-cached request does. - handleResults(cache[term]); - } else { - fetchResults(searchText); - } - - ctrl.hidden = shouldHide(); - } - - /** - * Handles the retrieved results by showing them in the autocompletes dropdown. - * @param results Retrieved results - */ - function handleResults(results) { - ctrl.matches = results; - ctrl.hidden = shouldHide(); - - // If loading is in progress, then we'll end the progress. This is needed for example, - // when the `clear` button was clicked, because there we always show the loading process, to prevent flashing. - if (ctrl.loading) setLoading(false); - - if ($scope.selectOnMatch) selectItemOnMatch(); - - positionDropdown(); - reportMessages(true, ReportType.Count); - } - - /** - * If there is only one matching item and the search text matches its display value exactly, - * automatically select that item. Note: This function is only called if the user uses the - * `md-select-on-match` flag. - */ - function selectItemOnMatch () { - var searchText = $scope.searchText, - matches = ctrl.matches, - item = matches[ 0 ]; - if (matches.length === 1) getDisplayValue(item).then(function (displayValue) { - var isMatching = searchText === displayValue; - if ($scope.matchInsensitive && !isMatching) { - isMatching = searchText.toLowerCase() === displayValue.toLowerCase(); - } - - if (isMatching) { - select(0); - } - }); - } - - /** - * Evaluates an attribute expression against the parent scope. - * @param {String} attr Name of the attribute to be evaluated. - * @param {Object?} locals Properties to be injected into the evaluation context. - */ - function evalAttr(attr, locals) { - if ($attrs[attr]) { - $scope.$parent.$eval($attrs[attr], locals || {}); - } - } - -} - -})(); -(function(){ -"use strict"; - - -MdAutocomplete.$inject = ["$$mdSvgRegistry"];angular - .module('material.components.autocomplete') - .directive('mdAutocomplete', MdAutocomplete); - -/** - * @ngdoc directive - * @name mdAutocomplete - * @module material.components.autocomplete - * - * @description - * `` is a special input component with a drop-down of all possible matches to a - * custom query. This component allows you to provide real-time suggestions as the user types - * in the input area. - * - * To start, you will need to specify the required parameters and provide a template for your - * results. The content inside `md-autocomplete` will be treated as a template. - * - * In more complex cases, you may want to include other content such as a message to display when - * no matches were found. You can do this by wrapping your template in `md-item-template` and - * adding a tag for `md-not-found`. An example of this is shown below. - * - * To reset the displayed value you must clear both values for `md-search-text` and - * `md-selected-item`. - * - * ### Validation - * - * You can use `ng-messages` to include validation the same way that you would normally validate; - * however, if you want to replicate a standard input with a floating label, you will have to - * do the following: - * - * - Make sure that your template is wrapped in `md-item-template` - * - Add your `ng-messages` code inside of `md-autocomplete` - * - Add your validation properties to `md-autocomplete` (ie. `required`) - * - Add a `name` to `md-autocomplete` (to be used on the generated `input`) - * - * There is an example below of how this should look. - * - * ### Snapping Drop-Down - * - * You can cause the autocomplete drop-down to snap to an ancestor element by applying the - * `md-autocomplete-snap` attribute to that element. You can also snap to the width of - * the `md-autocomplete-snap` element by setting the attribute's value to `width` - * (ie. `md-autocomplete-snap="width"`). - * - * ### Notes - * - * **Autocomplete Dropdown Items Rendering** - * - * The `md-autocomplete` uses the the - * mdVirtualRepeat directive for displaying the results inside of the dropdown.
    - * - * > When encountering issues regarding the item template please take a look at the - * VirtualRepeatContainer documentation. - * - * **Autocomplete inside of a Virtual Repeat** - * - * When using the `md-autocomplete` directive inside of a - * VirtualRepeatContainer the dropdown items - * might not update properly, because caching of the results is enabled by default. - * - * The autocomplete will then show invalid dropdown items, because the Virtual Repeat only updates - * the scope bindings rather than re-creating the `md-autocomplete`. This means that the previous - * cached results will be used. - * - * > To avoid such problems, ensure that the autocomplete does not cache any results via - * `md-no-cache="true"`: - * - * - * - * {{ item.display }} - * - * - * - * - * @param {expression} md-items An expression in the format of `item in results` to iterate over - * matches for your search.

    - * The `results` expression can be also a function, which returns the results synchronously - * or asynchronously (per Promise). - * @param {expression=} md-selected-item-change An expression to be run each time a new item is - * selected. - * @param {expression=} md-search-text-change An expression to be run each time the search text - * updates. - * @param {expression=} md-search-text A model to bind the search query text to. - * @param {object=} md-selected-item A model to bind the selected item to. - * @param {expression=} md-item-text An expression that will convert your object to a single string. - * @param {string=} placeholder Placeholder text that will be forwarded to the input. - * @param {boolean=} md-no-cache Disables the internal caching that happens in autocomplete. - * @param {boolean=} ng-disabled Determines whether or not to disable the input field. - * @param {boolean=} md-require-match When set to true, the autocomplete will add a validator, - * which will evaluate to false, when no item is currently selected. - * @param {number=} md-min-length Specifies the minimum length of text before autocomplete will - * make suggestions. - * @param {number=} md-delay Specifies the amount of time (in milliseconds) to wait before looking - * for results. - * @param {boolean=} md-clear-button Whether the clear button for the autocomplete input should show - * up or not. When `md-floating-label` is set, defaults to false, defaults to true otherwise. - * @param {boolean=} md-autofocus If true, the autocomplete will be automatically focused when a - * `$mdDialog`, `$mdBottomsheet` or `$mdSidenav`, which contains the autocomplete, is opening. - *

    - * Also the autocomplete will immediately focus the input element. - * @param {boolean=} md-no-asterisk When present, asterisk will not be appended to the floating - * label. - * @param {boolean=} md-autoselect If set to true, the first item will be automatically selected - * in the dropdown upon open. - * @param {string=} md-input-name The name attribute given to the input element to be used with - * FormController. - * @param {string=} md-menu-class This class will be applied to the dropdown menu for styling. - * @param {string=} md-menu-container-class This class will be applied to the parent container - * of the dropdown panel. - * @param {string=} md-input-class This will be applied to the input for styling. This attribute - * is only valid when a `md-floating-label` is defined. - * @param {string=} md-floating-label This will add a floating label to autocomplete and wrap it in - * `md-input-container`. - * @param {string=} md-select-on-focus When present the input's text will be automatically selected - * on focus. - * @param {string=} md-input-id An ID to be added to the input element. - * @param {number=} md-input-minlength The minimum length for the input's value for validation. - * @param {number=} md-input-maxlength The maximum length for the input's value for validation. - * @param {boolean=} md-select-on-match When set, autocomplete will automatically select - * the item if the search text is an exact match.

    - * An exact match is when only one match is displayed. - * @param {boolean=} md-match-case-insensitive When set and using `md-select-on-match`, autocomplete - * will select on case-insensitive match. - * @param {string=} md-escape-options Override escape key logic. Default is `clear`.
    - * Options: `blur`, `clear`, `none`. - * @param {string=} md-dropdown-items Specifies the maximum amount of items to be shown in - * the dropdown.

    - * When the dropdown doesn't fit into the viewport, the dropdown will shrink - * as much as possible. - * @param {string=} md-dropdown-position Overrides the default dropdown position. Options: `top`, - * `bottom`. - * @param {string=} input-aria-describedby A space-separated list of element IDs. This should - * contain the IDs of any elements that describe this autocomplete. Screen readers will read the - * content of these elements at the end of announcing that the autocomplete has been selected - * and describing its current state. The descriptive elements do not need to be visible on the - * page. - * @param {string=} input-aria-labelledby A space-separated list of element IDs. The ideal use case - * is that this would contain the ID of a `
    ' : ''; - } - - function getRepeatType(repeatMode) { - return isVirtualRepeatDisabled(repeatMode) ? - 'ng-repeat' : 'md-virtual-repeat'; - } - - function isVirtualRepeatDisabled(repeatMode) { - // ensure we have a valid repeat mode - var correctedRepeatMode = getRepeatMode(repeatMode); - return correctedRepeatMode !== REPEAT_VIRTUAL; - } - - function getInputElement () { - if (attr.mdFloatingLabel) { - return '\ - \ - \ - \ -
    ' + leftover + '
    \ -
    '; - } else { - return '\ - '; - } - } - - function getClearButton() { - return '' + - ''; - } - } - }; -} - -})(); -(function(){ -"use strict"; - - -MdAutocompleteItemScopeDirective.$inject = ["$compile", "$mdUtil"];angular - .module('material.components.autocomplete') - .directive('mdAutocompleteParentScope', MdAutocompleteItemScopeDirective); - -function MdAutocompleteItemScopeDirective($compile, $mdUtil) { - return { - restrict: 'AE', - compile: compile, - terminal: true, - transclude: 'element' - }; - - function compile(tElement, tAttr, transclude) { - return function postLink(scope, element, attr) { - var ctrl = scope.$mdAutocompleteCtrl; - var newScope = ctrl.parent.$new(); - var itemName = ctrl.itemName; - - // Watch for changes to our scope's variables and copy them to the new scope - watchVariable('$index', '$index'); - watchVariable('item', itemName); - - // Ensure that $digest calls on our scope trigger $digest on newScope. - connectScopes(); - - // Link the element against newScope. - transclude(newScope, function(clone) { - element.after(clone); - }); - - /** - * Creates a watcher for variables that are copied from the parent scope - * @param variable - * @param alias - */ - function watchVariable(variable, alias) { - newScope[alias] = scope[variable]; - - scope.$watch(variable, function(value) { - $mdUtil.nextTick(function() { - newScope[alias] = value; - }); - }); - } - - /** - * Creates watchers on scope and newScope that ensure that for any - * $digest of scope, newScope is also $digested. - */ - function connectScopes() { - var scopeDigesting = false; - var newScopeDigesting = false; - - scope.$watch(function() { - if (newScopeDigesting || scopeDigesting) { - return; - } - - scopeDigesting = true; - scope.$$postDigest(function() { - if (!newScopeDigesting) { - newScope.$digest(); - } - - scopeDigesting = newScopeDigesting = false; - }); - }); - - newScope.$watch(function() { - newScopeDigesting = true; - }); - } - }; - } -} -})(); -(function(){ -"use strict"; - - -MdHighlightCtrl.$inject = ["$scope", "$element", "$attrs", "$mdUtil"];angular - .module('material.components.autocomplete') - .controller('MdHighlightCtrl', MdHighlightCtrl); - -function MdHighlightCtrl ($scope, $element, $attrs, $mdUtil) { - this.$scope = $scope; - this.$element = $element; - this.$attrs = $attrs; - this.$mdUtil = $mdUtil; - - // Cache the Regex to avoid rebuilding each time. - this.regex = null; -} - -MdHighlightCtrl.prototype.init = function(unsafeTermFn, unsafeContentFn) { - - this.flags = this.$attrs.mdHighlightFlags || ''; - - this.unregisterFn = this.$scope.$watch(function($scope) { - return { - term: unsafeTermFn($scope), - contentText: unsafeContentFn($scope) - }; - }.bind(this), this.onRender.bind(this), true); - - this.$element.on('$destroy', this.unregisterFn); -}; - -/** - * Triggered once a new change has been recognized and the highlighted - * text needs to be updated. - */ -MdHighlightCtrl.prototype.onRender = function(state, prevState) { - - var contentText = state.contentText; - - /* Update the regex if it's outdated, because we don't want to rebuilt it constantly. */ - if (this.regex === null || state.term !== prevState.term) { - this.regex = this.createRegex(state.term, this.flags); - } - - /* If a term is available apply the regex to the content */ - if (state.term) { - this.applyRegex(contentText); - } else { - this.$element.text(contentText); - } - -}; - -/** - * Decomposes the specified text into different tokens (whether match or not). - * Breaking down the string guarantees proper XSS protection due to the native browser - * escaping of unsafe text. - */ -MdHighlightCtrl.prototype.applyRegex = function(text) { - var tokens = this.resolveTokens(text); - - this.$element.empty(); - - tokens.forEach(function (token) { - - if (token.isMatch) { - var tokenEl = angular.element('').text(token.text); - - this.$element.append(tokenEl); - } else { - this.$element.append(document.createTextNode(token)); - } - - }.bind(this)); - -}; - - /** - * Decomposes the specified text into different tokens by running the regex against the text. - */ -MdHighlightCtrl.prototype.resolveTokens = function(string) { - var tokens = []; - var lastIndex = 0; - - // Use replace here, because it supports global and single regular expressions at same time. - string.replace(this.regex, function(match, index) { - appendToken(lastIndex, index); - - tokens.push({ - text: match, - isMatch: true - }); - - lastIndex = index + match.length; - }); - - // Append the missing text as a token. - appendToken(lastIndex); - - return tokens; - - function appendToken(from, to) { - var targetText = string.slice(from, to); - targetText && tokens.push(targetText); - } -}; - -/** Creates a regex for the specified text with the given flags. */ -MdHighlightCtrl.prototype.createRegex = function(term, flags) { - var startFlag = '', endFlag = ''; - var regexTerm = this.$mdUtil.sanitize(term); - - if (flags.indexOf('^') >= 0) startFlag = '^'; - if (flags.indexOf('$') >= 0) endFlag = '$'; - - return new RegExp(startFlag + regexTerm + endFlag, flags.replace(/[$^]/g, '')); -}; - -})(); -(function(){ -"use strict"; - - -MdHighlight.$inject = ["$interpolate", "$parse"];angular - .module('material.components.autocomplete') - .directive('mdHighlightText', MdHighlight); - -/** - * @ngdoc directive - * @name mdHighlightText - * @module material.components.autocomplete - * - * @description - * The `md-highlight-text` directive allows you to specify text that should be highlighted within - * an element. Highlighted text will be wrapped in `` which can - * be styled through CSS. Please note that child elements may not be used with this directive. - * - * @param {string} md-highlight-text A model to be searched for - * @param {string=} md-highlight-flags A list of flags (loosely based on JavaScript RexExp flags). - * #### **Supported flags**: - * - `g`: Find all matches within the provided text - * - `i`: Ignore case when searching for matches - * - `$`: Only match if the text ends with the search term - * - `^`: Only match if the text begins with the search term - * - * @usage - * - * - *
      - *
    • - * {{result.text}} - *
    • - *
    - *
    - */ - -function MdHighlight ($interpolate, $parse) { - return { - terminal: true, - controller: 'MdHighlightCtrl', - compile: function mdHighlightCompile(tElement, tAttr) { - var termExpr = $parse(tAttr.mdHighlightText); - var unsafeContentExpr = $interpolate(tElement.html()); - - return function mdHighlightLink(scope, element, attr, ctrl) { - ctrl.init(termExpr, unsafeContentExpr); - }; - } - }; -} - -})(); -(function(){ -"use strict"; - -/* - * @ngdoc module - * @name material.components.backdrop - * @description Backdrop - */ - -/** - * @ngdoc directive - * @name mdBackdrop - * @module material.components.backdrop - * - * @restrict E - * - * @description - * `` is a backdrop element used by other components, such as dialog and bottom sheet. - * Apply class `opaque` to make the backdrop use the theme backdrop color. - * - */ - -angular - .module('material.components.backdrop', ['material.core']) - .directive('mdBackdrop', ["$mdTheming", "$mdUtil", "$animate", "$rootElement", "$window", "$log", "$$rAF", "$document", function BackdropDirective($mdTheming, $mdUtil, $animate, $rootElement, $window, $log, $$rAF, $document) { - var ERROR_CSS_POSITION = ' may not work properly in a scrolled, static-positioned parent container.'; - - return { - restrict: 'E', - link: postLink - }; - - function postLink(scope, element, attrs) { - // backdrop may be outside the $rootElement, tell ngAnimate to animate regardless - if ($animate.pin) $animate.pin(element, $rootElement); - - var bodyStyles; - - $$rAF(function() { - // If body scrolling has been disabled using mdUtil.disableBodyScroll(), - // adjust the 'backdrop' height to account for the fixed 'body' top offset. - // Note that this can be pretty expensive and is better done inside the $$rAF. - bodyStyles = $window.getComputedStyle($document[0].body); - - if (bodyStyles.position === 'fixed') { - var resizeHandler = $mdUtil.debounce(function(){ - bodyStyles = $window.getComputedStyle($document[0].body); - resize(); - }, 60, null, false); - - resize(); - angular.element($window).on('resize', resizeHandler); - - scope.$on('$destroy', function() { - angular.element($window).off('resize', resizeHandler); - }); - } - - // Often $animate.enter() is used to append the backDrop element - // so let's wait until $animate is done... - var parent = element.parent(); - - if (parent.length) { - if (parent[0].nodeName === 'BODY') { - element.css('position', 'fixed'); - } - - var styles = $window.getComputedStyle(parent[0]); - - if (styles.position === 'static') { - // backdrop uses position:absolute and will not work properly with parent position:static (default) - $log.warn(ERROR_CSS_POSITION); - } - - // Only inherit the parent if the backdrop has a parent. - $mdTheming.inherit(element, parent); - } - }); - - function resize() { - var viewportHeight = parseInt(bodyStyles.height, 10) + Math.abs(parseInt(bodyStyles.top, 10)); - element.css('height', viewportHeight + 'px'); - } - } - - }]); - -})(); -(function(){ -"use strict"; - -/** - * @ngdoc module - * @name material.components.bottomSheet - * @description - * BottomSheet - */ -MdBottomSheetDirective.$inject = ["$mdBottomSheet"]; -MdBottomSheetProvider.$inject = ["$$interimElementProvider"]; -angular - .module('material.components.bottomSheet', [ - 'material.core', - 'material.components.backdrop' - ]) - .directive('mdBottomSheet', MdBottomSheetDirective) - .provider('$mdBottomSheet', MdBottomSheetProvider); - -/* @ngInject */ -function MdBottomSheetDirective($mdBottomSheet) { - return { - restrict: 'E', - link : function postLink(scope, element) { - element.addClass('_md'); // private md component indicator for styling - - // When navigation force destroys an interimElement, then - // listen and $destroy() that interim instance... - scope.$on('$destroy', function() { - $mdBottomSheet.destroy(); - }); - } - }; -} - - -/** - * @ngdoc service - * @name $mdBottomSheet - * @module material.components.bottomSheet - * - * @description - * `$mdBottomSheet` opens a bottom sheet over the app and provides a simple promise API. - * - * ## Restrictions - * - * - The bottom sheet's template must have an outer `` element. - * - Add the `md-grid` class to the bottom sheet for a grid layout. - * - Add the `md-list` class to the bottom sheet for a list layout. - * - * @usage - * - *
    - * - * Open a Bottom Sheet! - * - *
    - *
    - * - * var app = angular.module('app', ['ngMaterial']); - * app.controller('MyController', function($scope, $mdBottomSheet) { - * $scope.openBottomSheet = function() { - * $mdBottomSheet.show({ - * template: '' + - * 'Hello! Close' + - * '' - * }) - * - * // Fires when the hide() method is used - * .then(function() { - * console.log('You clicked the button to close the bottom sheet!'); - * }) - * - * // Fires when the cancel() method is used - * .catch(function() { - * console.log('You hit escape or clicked the backdrop to close.'); - * }); - * }; - * - * $scope.closeBottomSheet = function($scope, $mdBottomSheet) { - * $mdBottomSheet.hide(); - * } - * - * }); - * - * - * ### Custom Presets - * Developers are also able to create their own preset, which can be easily used without repeating - * their options each time. - * - * - * $mdBottomSheetProvider.addPreset('testPreset', { - * options: function() { - * return { - * template: - * '' + - * 'This is a custom preset' + - * '', - * controllerAs: 'bottomSheet', - * bindToController: true, - * clickOutsideToClose: true, - * escapeToClose: true - * }; - * } - * }); - * - * - * After you create your preset during the config phase, you can easily access it. - * - * - * $mdBottomSheet.show( - * $mdBottomSheet.testPreset() - * ); - * - */ - -/** - * @ngdoc method - * @name $mdBottomSheet#show - * - * @description - * Show a bottom sheet with the specified options. - * - * Note: You should always provide a `.catch()` method in case the user hits the - * `esc` key or clicks the background to close. In this case, the `cancel()` method will - * automatically be called on the bottom sheet which will `reject()` the promise. See the @usage - * section above for an example. - * - * Newer versions of Angular will throw a `Possibly unhandled rejection` exception if you forget - * this. - * - * @param {Object} optionsOrPreset Either provide an `$mdBottomSheetPreset` defined during the - * config phase or an options object, with the following properties: - * - * - `templateUrl` - `{string=}`: The url of an html template file that will - * be used as the content of the bottom sheet. Restrictions: the template must - * have an outer `md-bottom-sheet` element. - * - `template` - `{string=}`: Same as templateUrl, except this is an actual - * template string. - * - `scope` - `{Object=}`: the scope to link the template / controller to. If none is specified, - * it will create a new child scope. This scope will be destroyed when the bottom sheet is - * removed unless `preserveScope` is set to true. - * - `preserveScope` - `{boolean=}`: whether to preserve the scope when the element is removed. - * Default is false - * - `controller` - `{string=}`: The controller to associate with this bottom sheet. - * - `locals` - `{string=}`: An object containing key/value pairs. The keys will be used as names - * of values to inject into the controller. For example, `locals: {three: 3}` would inject - * `three` into the controller with the value of 3. - * - `clickOutsideToClose` - `{boolean=}`: Whether the user can click outside the bottom sheet to - * close it. Default true. - * - `bindToController` - `{boolean=}`: When set to true, the locals will be bound to the - * controller instance and available in it's $onInit function. - * - `disableBackdrop` - `{boolean=}`: When set to true, the bottomsheet will not show a backdrop. - * - `escapeToClose` - `{boolean=}`: Whether the user can press escape to close the bottom sheet. - * Default true. - * - `isLockedOpen` - `{boolean=}`: Disables all default ways of closing the bottom sheet. - * **Note:** this will override the `clickOutsideToClose` and `escapeToClose` options, leaving - * only the `hide` and `cancel` methods as ways of closing the bottom sheet. Defaults to false. - * - `resolve` - `{Object=}`: Similar to locals, except it takes promises as values - * and the bottom sheet will not open until the promises resolve. - * - `controllerAs` - `{string=}`: An alias to assign the controller to on the scope. - * - `parent` - `{element=}`: The element to append the bottom sheet to. The `parent` may be a - * `function`, `string`, `Object`, or null. Defaults to appending to the body of the root element - * (or the root element) of the application. - * e.g. angular.element(document.getElementById('content')) or "#content" - * - `disableParentScroll` - `{boolean=}`: Whether to disable scrolling while the bottom sheet is - * open. Default true. - * - * @returns {promise} A promise that can be resolved with `$mdBottomSheet.hide()` or - * rejected with `$mdBottomSheet.cancel()`. - */ - -/** - * @ngdoc method - * @name $mdBottomSheet#hide - * - * @description - * Hide the existing bottom sheet and resolve the promise returned from - * `$mdBottomSheet.show()`. This call will close the most recently opened/current bottom sheet (if - * any). - * - * Note: Use a `.then()` on your `.show()` to handle this callback. - * - * @param {*=} response An argument for the resolved promise. - * - */ - -/** - * @ngdoc method - * @name $mdBottomSheet#cancel - * - * @description - * Hide the existing bottom sheet and reject the promise returned from - * `$mdBottomSheet.show()`. - * - * Note: Use a `.catch()` on your `.show()` to handle this callback. - * - * @param {*=} response An argument for the rejected promise. - * - */ - -function MdBottomSheetProvider($$interimElementProvider) { - // how fast we need to flick down to close the sheet, pixels/ms - bottomSheetDefaults.$inject = ["$animate", "$mdConstant", "$mdUtil", "$mdTheming", "$mdBottomSheet", "$rootElement", "$mdGesture", "$log"]; - var CLOSING_VELOCITY = 0.5; - var PADDING = 80; // same as css - - return $$interimElementProvider('$mdBottomSheet') - .setDefaults({ - methods: ['disableParentScroll', 'escapeToClose', 'clickOutsideToClose'], - options: bottomSheetDefaults - }); - - /* @ngInject */ - function bottomSheetDefaults($animate, $mdConstant, $mdUtil, $mdTheming, $mdBottomSheet, $rootElement, - $mdGesture, $log) { - var backdrop; - - return { - themable: true, - onShow: onShow, - onRemove: onRemove, - disableBackdrop: false, - escapeToClose: true, - clickOutsideToClose: true, - disableParentScroll: true, - isLockedOpen: false - }; - - function onShow(scope, element, options) { - element = $mdUtil.extractElementByName(element, 'md-bottom-sheet'); - - // prevent tab focus or click focus on the bottom-sheet container - element.attr('tabindex', '-1'); - - // Once the md-bottom-sheet has `ng-cloak` applied on his template the opening animation will not work properly. - // This is a very common problem, so we have to notify the developer about this. - if (element.hasClass('ng-cloak')) { - var message = '$mdBottomSheet: using `` will affect the bottom-sheet opening animations.'; - $log.warn(message, element[0]); - } - - if (options.isLockedOpen) { - options.clickOutsideToClose = false; - options.escapeToClose = false; - } else { - options.cleanupGestures = registerGestures(element, options.parent); - } - - if (!options.disableBackdrop) { - // Add a backdrop that will close on click - backdrop = $mdUtil.createBackdrop(scope, "md-bottom-sheet-backdrop md-opaque"); - - // Prevent mouse focus on backdrop; ONLY programmatic focus allowed. - // This allows clicks on backdrop to propagate to the $rootElement and - // ESC key events to be detected properly. - backdrop[0].tabIndex = -1; - - if (options.clickOutsideToClose) { - backdrop.on('click', function() { - $mdUtil.nextTick($mdBottomSheet.cancel, true); - }); - } - - $mdTheming.inherit(backdrop, options.parent); - - $animate.enter(backdrop, options.parent, null); - } - - $mdTheming.inherit(element, options.parent); - - if (options.disableParentScroll) { - options.restoreScroll = $mdUtil.disableScrollAround(element, options.parent); - } - - return $animate.enter(element, options.parent, backdrop) - .then(function() { - var focusable = $mdUtil.findFocusTarget(element) || angular.element( - element[0].querySelector('button') || - element[0].querySelector('a') || - element[0].querySelector($mdUtil.prefixer('ng-click', true)) - ) || backdrop; - - if (options.escapeToClose) { - options.rootElementKeyupCallback = function(e) { - if (e.keyCode === $mdConstant.KEY_CODE.ESCAPE) { - $mdUtil.nextTick($mdBottomSheet.cancel, true); - } - }; - - $rootElement.on('keyup', options.rootElementKeyupCallback); - focusable && focusable.focus(); - } - }); - - } - - function onRemove(scope, element, options) { - if (!options.disableBackdrop) $animate.leave(backdrop); - - return $animate.leave(element).then(function() { - if (options.disableParentScroll) { - options.restoreScroll(); - delete options.restoreScroll; - } - - options.cleanupGestures && options.cleanupGestures(); - }); - } - - /** - * Adds the drag gestures to the bottom sheet. - * @param {JQLite} element where CSS transitions will be applied - * @param {JQLite} parent used for registering gesture listeners - * @return {Function} function that removes gesture listeners that were set up by - * registerGestures() - */ - function registerGestures(element, parent) { - var deregister = $mdGesture.register(parent, 'drag', { horizontal: false }); - parent.on('$md.dragstart', onDragStart) - .on('$md.drag', onDrag) - .on('$md.dragend', onDragEnd); - - return function cleanupGestures() { - deregister(); - parent.off('$md.dragstart', onDragStart); - parent.off('$md.drag', onDrag); - parent.off('$md.dragend', onDragEnd); - }; - - function onDragStart() { - // Disable transitions on transform so that it feels fast - element.css($mdConstant.CSS.TRANSITION_DURATION, '0ms'); - } - - function onDrag(ev) { - var transform = ev.pointer.distanceY; - if (transform < 5) { - // Slow down drag when trying to drag up, and stop after PADDING - transform = Math.max(-PADDING, transform / 2); - } - element.css($mdConstant.CSS.TRANSFORM, 'translate3d(0,' + (PADDING + transform) + 'px,0)'); - } - - function onDragEnd(ev) { - if (ev.pointer.distanceY > 0 && - (ev.pointer.distanceY > 20 || Math.abs(ev.pointer.velocityY) > CLOSING_VELOCITY)) { - var distanceRemaining = element.prop('offsetHeight') - ev.pointer.distanceY; - var transitionDuration = Math.min(distanceRemaining / ev.pointer.velocityY * 0.75, 500); - element.css($mdConstant.CSS.TRANSITION_DURATION, transitionDuration + 'ms'); - $mdUtil.nextTick($mdBottomSheet.cancel, true); - } else { - element.css($mdConstant.CSS.TRANSITION_DURATION, ''); - element.css($mdConstant.CSS.TRANSFORM, ''); - } - } - } - } -} - -})(); -(function(){ -"use strict"; - -/** - * @ngdoc module - * @name material.components.button - * @description - * - * Button - */ -MdButtonDirective.$inject = ["$mdButtonInkRipple", "$mdTheming", "$mdAria", "$mdInteraction"]; -MdAnchorDirective.$inject = ["$mdTheming"]; -angular - .module('material.components.button', ['material.core']) - .directive('mdButton', MdButtonDirective) - .directive('a', MdAnchorDirective); - - -/** - * @private - * @restrict E - * - * @description - * `a` is an anchor directive used to inherit theme colors for md-primary, md-accent, etc. - * - * @usage - * - * - * - * - * - * - */ -function MdAnchorDirective($mdTheming) { - return { - restrict : 'E', - link : function postLink(scope, element) { - // Make sure to inherit theme so stand-alone anchors - // support theme colors for md-primary, md-accent, etc. - $mdTheming(element); - } - }; -} - - -/** - * @ngdoc directive - * @name mdButton - * @module material.components.button - * - * @restrict E - * - * @description - * `` is a button directive with optional ink ripples (default enabled). - * - * If you supply a `href` or `ng-href` attribute, it will become an `` element. Otherwise, it - * will become a `'; - } - } - - function postLink(scope, element, attr) { - $mdTheming(element); - $mdButtonInkRipple.attach(scope, element); - - // Use async expect to support possible bindings in the button label - $mdAria.expectWithoutText(element, 'aria-label'); - - // For anchor elements, we have to set tabindex manually when the element is disabled. - // We don't do this for md-nav-bar anchors as the component manages its own tabindex values. - if (isAnchor(attr) && angular.isDefined(attr.ngDisabled) && - !element.hasClass('_md-nav-button')) { - scope.$watch(attr.ngDisabled, function(isDisabled) { - element.attr('tabindex', isDisabled ? -1 : 0); - }); - } - - // disabling click event when disabled is true - element.on('click', function(e){ - if (attr.disabled === true) { - e.preventDefault(); - e.stopImmediatePropagation(); - } - }); - - if (!element.hasClass('md-no-focus')) { - - element.on('focus', function() { - - // Only show the focus effect when being focused through keyboard interaction or programmatically - if (!$mdInteraction.isUserInvoked() || $mdInteraction.getLastInteractionType() === 'keyboard') { - element.addClass('md-focused'); - } - - }); - - element.on('blur', function() { - element.removeClass('md-focused'); - }); - } - - } - -} - -})(); -(function(){ -"use strict"; - -/** - * @ngdoc module - * @name material.components.card - * - * @description - * Card components. - */ -mdCardDirective.$inject = ["$mdTheming"]; -angular.module('material.components.card', [ - 'material.core' - ]) - .directive('mdCard', mdCardDirective); - - -/** - * @ngdoc directive - * @name mdCard - * @module material.components.card - * - * @restrict E - * - * @description - * The `` directive is a container element used within `` containers. - * - * An image included as a direct descendant will fill the card's width. If you want to avoid this, - * you can add the `md-image-no-fill` class to the parent element. The `` - * container will wrap text content and provide padding. An `` element can be - * optionally included to put content flush against the bottom edge of the card. - * - * Action buttons can be included in an `` element, similar to ``. - * You can then position buttons using layout attributes. - * - * Card is built with: - * * `` - Header for the card, holds avatar, text and squared image - * - `` - Card avatar - * - `md-user-avatar` - Class for user image - * - `` - * - `` - Contains elements for the card description - * - `md-title` - Class for the card title - * - `md-subhead` - Class for the card sub header - * * `` - Image for the card - * * `` - Card content title - * - `` - * - `md-headline` - Class for the card content title - * - `md-subhead` - Class for the card content sub header - * - `` - Squared image within the title - * - `md-media-sm` - Class for small image - * - `md-media-md` - Class for medium image - * - `md-media-lg` - Class for large image - * - `md-media-xl` - Class for extra large image - * * `` - Card content - * * `` - Card actions - * - `` - Icon actions - * - * Cards have constant width and variable heights; where the maximum height is limited to what can - * fit within a single view on a platform, but it can temporarily expand as needed. - * - * @usage - * ### Card with optional footer - * - * - * image caption - * - *

    Card headline

    - *

    Card content

    - *
    - * - * Card footer - * - *
    - *
    - * - * ### Card with actions - * - * - * image caption - * - *

    Card headline

    - *

    Card content

    - *
    - * - * Action 1 - * Action 2 - * - *
    - *
    - * - * ### Card with header, image, title actions and content - * - * - * - * - * - * - * - * Title - * Sub header - * - * - * image caption - * - * - * Card headline - * Card subheader - * - * - * - * Action 1 - * Action 2 - * - * - * - * - * - * - * - *

    - * Card content - *

    - *
    - *
    - *
    - */ -function mdCardDirective($mdTheming) { - return { - restrict: 'E', - link: function ($scope, $element, attr) { - $element.addClass('_md'); // private md component indicator for styling - $mdTheming($element); - } - }; -} - -})(); -(function(){ -"use strict"; - -/** - * @ngdoc module - * @name material.components.checkbox - * @description Checkbox module! - */ -MdCheckboxDirective.$inject = ["inputDirective", "$mdAria", "$mdConstant", "$mdTheming", "$mdUtil", "$mdInteraction"]; -angular - .module('material.components.checkbox', ['material.core']) - .directive('mdCheckbox', MdCheckboxDirective); - -/** - * @ngdoc directive - * @name mdCheckbox - * @module material.components.checkbox - * @restrict E - * - * @description - * The checkbox directive is used like the normal - * [angular checkbox](https://docs.angularjs.org/api/ng/input/input%5Bcheckbox%5D). - * - * As per the [Material Design spec](https://material.io/archive/guidelines/style/color.html#color-color-palette) - * the checkbox is in the accent color by default. The primary color palette may be used with - * the `md-primary` class. - * - * @param {expression} ng-model Assignable angular expression to data-bind to. - * @param {string=} name Property name of the form under which the control is published. - * @param {expression=} ng-true-value The value to which the expression should be set when selected. - * @param {expression=} ng-false-value The value to which the expression should be set when not - * selected. - * @param {expression=} ng-change Expression to be executed when the model value changes. - * @param {boolean=} md-no-ink If present, disable ink ripple effects. - * @param {string=} aria-label Adds label to checkbox for accessibility. - * Defaults to checkbox's text. If no default text is found, a warning will be logged. - * @param {expression=} md-indeterminate This determines when the checkbox should be rendered as - * 'indeterminate'. If a truthy expression or no value is passed in the checkbox renders in the - * md-indeterminate state. If falsy expression is passed in it just looks like a normal unchecked - * checkbox. The indeterminate, checked, and unchecked states are mutually exclusive. A box - * cannot be in any two states at the same time. Adding the 'md-indeterminate' attribute - * overrides any checked/unchecked rendering logic. When using the 'md-indeterminate' attribute - * use 'ng-checked' to define rendering logic instead of using 'ng-model'. - * @param {expression=} ng-checked If this expression evaluates as truthy, the 'md-checked' css - * class is added to the checkbox and it will appear checked. - * - * @usage - * - * - * Finished ? - * - * - * - * No Ink Effects - * - * - * - * Disabled - * - * - * - * - */ -function MdCheckboxDirective(inputDirective, $mdAria, $mdConstant, $mdTheming, $mdUtil, $mdInteraction) { - inputDirective = inputDirective[0]; - - return { - restrict: 'E', - transclude: true, - require: ['^?mdInputContainer', '?ngModel', '?^form'], - priority: $mdConstant.BEFORE_NG_ARIA, - template: - '
    ' + - '
    ' + - '
    ' + - '
    ', - compile: compile - }; - - // ********************************************************** - // Private Methods - // ********************************************************** - - function compile (tElement, tAttrs) { - tAttrs.$set('tabindex', tAttrs.tabindex || '0'); - tAttrs.$set('type', 'checkbox'); - tAttrs.$set('role', tAttrs.type); - tElement.addClass('md-auto-horizontal-margin'); - - return { - pre: function(scope, element) { - // Attach a click handler during preLink, in order to immediately stop propagation - // (especially for ng-click) when the checkbox is disabled. - element.on('click', function(e) { - if (this.hasAttribute('disabled')) { - e.stopImmediatePropagation(); - } - }); - }, - post: postLink - }; - - function postLink(scope, element, attr, ctrls) { - var isIndeterminate; - var containerCtrl = ctrls[0]; - var ngModelCtrl = ctrls[1] || $mdUtil.fakeNgModel(); - var formCtrl = ctrls[2]; - var labelHasLink = element.find('a').length > 0; - - // The original component structure is not accessible when the checkbox's label contains a link. - // In order to keep backwards compatibility, we're only changing the structure of the component - // when we detect a link within the label. Using a span after the md-checkbox and attaching it - // via aria-labelledby allows screen readers to find and work with the link within the label. - if (labelHasLink) { - var labelId = 'label-' + $mdUtil.nextUid(); - attr.$set('aria-labelledby', labelId); - - var label = element.children()[1]; - // Use jQLite here since ChildNode.remove() is not supported in IE11. - angular.element(label).remove(); - label.removeAttribute('ng-transclude'); - label.className = 'md-checkbox-link-label'; - label.setAttribute('id', labelId); - element.after(label); - // Make sure that clicking on the label still causes the checkbox to be toggled, when appropriate. - var externalLabel = element.next(); - externalLabel.on('click', listener); - } - - if (containerCtrl) { - var isErrorGetter = containerCtrl.isErrorGetter || function() { - return ngModelCtrl.$invalid && (ngModelCtrl.$touched || (formCtrl && formCtrl.$submitted)); - }; - - containerCtrl.input = element; - - scope.$watch(isErrorGetter, containerCtrl.setInvalid); - } - - $mdTheming(element); - - // Redirect focus events to the root element, because IE11 is always focusing the container element instead - // of the md-checkbox element. This causes issues when using ngModelOptions: `updateOnBlur` - element.children().on('focus', function() { - element.focus(); - }); - - if ($mdUtil.parseAttributeBoolean(attr.mdIndeterminate)) { - setIndeterminateState(); - scope.$watch(attr.mdIndeterminate, setIndeterminateState); - } - - if (attr.ngChecked) { - scope.$watch(scope.$eval.bind(scope, attr.ngChecked), function(value) { - ngModelCtrl.$setViewValue(value); - ngModelCtrl.$render(); - }); - } - - $$watchExpr('ngDisabled', 'tabindex', { - true: '-1', - false: attr.tabindex - }); - - // Don't emit a warning when the label has a link within it. In that case we'll use - // aria-labelledby to point to another span that should be read as the label. - if (!labelHasLink) { - $mdAria.expectWithText(element, 'aria-label'); - } - - // Reuse the original input[type=checkbox] directive from AngularJS core. - // This is a bit hacky as we need our own event listener and own render - // function. - inputDirective.link.pre(scope, { - on: angular.noop, - 0: {} - }, attr, [ngModelCtrl]); - - element.on('click', listener) - .on('keypress', keypressHandler) - .on('focus', function() { - if ($mdInteraction.getLastInteractionType() === 'keyboard') { - element.addClass('md-focused'); - } - }) - .on('blur', function() { - element.removeClass('md-focused'); - }); - - ngModelCtrl.$render = render; - - function $$watchExpr(expr, htmlAttr, valueOpts) { - if (attr[expr]) { - scope.$watch(attr[expr], function(val) { - if (valueOpts[val]) { - element.attr(htmlAttr, valueOpts[val]); - } - }); - } - } - - /** - * @param {KeyboardEvent} ev 'keypress' event to handle - */ - function keypressHandler(ev) { - var keyCode = ev.which || ev.keyCode; - var submit, form; - - ev.preventDefault(); - switch (keyCode) { - case $mdConstant.KEY_CODE.SPACE: - element.addClass('md-focused'); - listener(ev); - break; - case $mdConstant.KEY_CODE.ENTER: - // Match the behavior of the native . - // When the enter key is pressed while focusing a native checkbox inside a form, - // the browser will trigger a `click` on the first non-disabled submit button/input - // in the form. Note that this is different from text inputs, which - // will directly submit the form without needing a submit button/input to be present. - form = $mdUtil.getClosest(ev.target, 'form'); - if (form) { - submit = form.querySelector('button[type="submit"]:enabled, input[type="submit"]:enabled'); - if (submit) { - submit.click(); - } - } - break; - } - } - - function listener(ev) { - // skipToggle boolean is used by the switch directive to prevent the click event - // when releasing the drag. There will be always a click if releasing the drag over the checkbox. - // If the click came from a link in the checkbox, don't toggle the value. - // We want the link to be opened without changing the value in this case. - if (element[0].hasAttribute('disabled') || scope.skipToggle || ev.target.tagName === 'A') { - return; - } - - scope.$apply(function() { - // Toggle the checkbox value... - var viewValue = attr.ngChecked && attr.ngClick ? attr.checked : !ngModelCtrl.$viewValue; - - ngModelCtrl.$setViewValue(viewValue, ev && ev.type); - ngModelCtrl.$render(); - }); - } - - function render() { - // Cast the $viewValue to a boolean since it could be undefined - var checked = !!ngModelCtrl.$viewValue && !isIndeterminate; - element.toggleClass('md-checked', checked); - if (!isIndeterminate) { - if (checked) { - element.attr('aria-checked', 'true'); - } else { - element.attr('aria-checked', 'false'); - } - } - } - - /** - * @param {string=} newValue - */ - function setIndeterminateState(newValue) { - isIndeterminate = newValue !== false; - if (isIndeterminate) { - element.attr('aria-checked', 'mixed'); - } - element.toggleClass('md-indeterminate', isIndeterminate); - ngModelCtrl.$render(); - } - } - } -} - -})(); -(function(){ -"use strict"; - -/** - * @ngdoc module - * @name material.components.chips - */ -/* - * @see js folder for chips implementation - */ -angular.module('material.components.chips', [ - 'material.core', - 'material.components.autocomplete' -]); - -})(); -(function(){ -"use strict"; - - -MdChipCtrl.$inject = ["$scope", "$element", "$mdConstant", "$timeout", "$mdUtil"];angular - .module('material.components.chips') - .controller('MdChipCtrl', MdChipCtrl); - -/** - * Controller for the MdChip component. Responsible for handling keyboard - * events and editing the chip if needed. - * - * @param $scope - * @param $element - * @param $mdConstant - * @param $timeout - * @param $mdUtil - * @constructor - */ -function MdChipCtrl ($scope, $element, $mdConstant, $timeout, $mdUtil) { - /** - * @type {$scope} - */ - this.$scope = $scope; - - /** - * @type {$element} - */ - this.$element = $element; - - /** - * @type {$mdConstant} - */ - this.$mdConstant = $mdConstant; - - /** - * @type {$timeout} - */ - this.$timeout = $timeout; - - /** - * @type {$mdUtil} - */ - this.$mdUtil = $mdUtil; - - /** - * @type {boolean} - */ - this.isEditing = false; - - /** - * @type {MdChipsCtrl} - */ - this.parentController = undefined; - - /** - * @type {boolean} - */ - this.enableChipEdit = false; -} - - -/** - * @param {MdChipsCtrl} controller - */ -MdChipCtrl.prototype.init = function(controller) { - this.parentController = controller; - this.enableChipEdit = this.parentController.enableChipEdit; - - if (this.enableChipEdit) { - this.$element.on('keydown', this.chipKeyDown.bind(this)); - this.$element.on('dblclick', this.chipMouseDoubleClick.bind(this)); - this.getChipContent().addClass('_md-chip-content-edit-is-enabled'); - } -}; - - -/** - * @return {Object} first element with the md-chip-content class - */ -MdChipCtrl.prototype.getChipContent = function() { - var chipContents = this.$element[0].getElementsByClassName('md-chip-content'); - return angular.element(chipContents[0]); -}; - - -/** - * When editing the chip, if the user modifies the existing contents, we'll get a span back and - * need to ignore text elements as they only contain blank space. - * `children()` ignores text elements. - * - * When editing the chip, if the user deletes the contents and then enters some new content - * we'll only get a text element back. - * @return {Object} jQuery object representing the content element of the chip - */ -MdChipCtrl.prototype.getContentElement = function() { - var contentElement = angular.element(this.getChipContent().children()[0]); - if (!contentElement || contentElement.length === 0) { - contentElement = angular.element(this.getChipContent().contents()[0]); - } - return contentElement; -}; - - -/** - * @return {number} index of this chip - */ -MdChipCtrl.prototype.getChipIndex = function() { - return parseInt(this.$element.attr('index')); -}; - - -/** - * Update the chip's contents, focus the chip if it's selected, and exit edit mode. - * If the contents were updated to be empty, remove the chip and re-focus the input element. - */ -MdChipCtrl.prototype.goOutOfEditMode = function() { - if (!this.isEditing) { - return; - } - - this.isEditing = false; - this.$element.removeClass('_md-chip-editing'); - this.getChipContent()[0].contentEditable = 'false'; - var chipIndex = this.getChipIndex(); - - var content = this.getContentElement().text(); - if (content) { - this.parentController.updateChipContents(chipIndex, content); - - this.$mdUtil.nextTick(function() { - if (this.parentController.selectedChip === chipIndex) { - this.parentController.focusChip(chipIndex); - } - }.bind(this)); - } else { - this.parentController.removeChipAndFocusInput(chipIndex); - } -}; - - -/** - * Given an HTML element. Selects contents of it. - * @param {Element} node - */ -MdChipCtrl.prototype.selectNodeContents = function(node) { - var range, selection; - if (document.body.createTextRange) { - range = document.body.createTextRange(); - range.moveToElementText(node); - range.select(); - } else if (window.getSelection) { - selection = window.getSelection(); - range = document.createRange(); - range.selectNodeContents(node); - selection.removeAllRanges(); - selection.addRange(range); - } -}; - - -/** - * Presents an input element to edit the contents of the chip. - */ -MdChipCtrl.prototype.goInEditMode = function() { - this.isEditing = true; - this.$element.addClass('_md-chip-editing'); - this.getChipContent()[0].contentEditable = 'true'; - this.getChipContent().on('blur', function() { - this.goOutOfEditMode(); - }.bind(this)); - - this.selectNodeContents(this.getChipContent()[0]); -}; - - -/** - * Handles the keydown event on the chip element. If enable-chip-edit attribute is - * set to true, space or enter keys can trigger going into edit mode. Enter can also - * trigger submitting if the chip is already being edited. - * @param {KeyboardEvent} event - */ -MdChipCtrl.prototype.chipKeyDown = function(event) { - if (!this.isEditing && - (event.keyCode === this.$mdConstant.KEY_CODE.ENTER || - event.keyCode === this.$mdConstant.KEY_CODE.SPACE)) { - event.preventDefault(); - this.goInEditMode(); - } else if (this.isEditing && event.keyCode === this.$mdConstant.KEY_CODE.ENTER) { - event.preventDefault(); - this.goOutOfEditMode(); - } -}; - - -/** - * Enter edit mode if we're not already editing and the enable-chip-edit attribute is enabled. - */ -MdChipCtrl.prototype.chipMouseDoubleClick = function() { - if (this.enableChipEdit && !this.isEditing) { - this.goInEditMode(); - } -}; - -})(); -(function(){ -"use strict"; - - -MdChip.$inject = ["$mdTheming", "$mdUtil", "$compile", "$timeout"];angular - .module('material.components.chips') - .directive('mdChip', MdChip); - -/** - * @ngdoc directive - * @name mdChip - * @module material.components.chips - * - * @description - * `` is a component used within ``. It is responsible for rendering an - * individual chip. - * - * - * @usage - * - * - * {{$chip}} - * - * - * - */ - -/** - * MDChip Directive Definition - * - * @param $mdTheming - * @param $mdUtil - * @param $compile - * @param $timeout - * @ngInject - */ -function MdChip($mdTheming, $mdUtil, $compile, $timeout) { - return { - restrict: 'E', - require: ['^?mdChips', 'mdChip'], - link: postLink, - controller: 'MdChipCtrl' - }; - - function postLink(scope, element, attr, ctrls) { - var chipsController = ctrls.shift(); - var chipController = ctrls.shift(); - var chipContentElement = angular.element(element[0].querySelector('.md-chip-content')); - - $mdTheming(element); - - if (chipsController) { - chipController.init(chipsController); - - // When a chip is blurred, make sure to unset (or reset) the selected chip so that tabbing - // through elements works properly - chipContentElement.on('blur', function() { - chipsController.resetSelectedChip(); - chipsController.$scope.$applyAsync(); - }); - } - - // Use $timeout to ensure we run AFTER the element has been added to the DOM so we can focus it. - $timeout(function() { - if (!chipsController) { - return; - } - - if (chipsController.shouldFocusLastChip) { - chipsController.focusLastChipThenInput(); - } - }); - } -} - -})(); -(function(){ -"use strict"; - - -MdChipRemove.$inject = ["$timeout"];angular - .module('material.components.chips') - .directive('mdChipRemove', MdChipRemove); - -/** - * @ngdoc directive - * @name mdChipRemove - * @restrict A - * @module material.components.chips - * - * @description - * Indicates that the associated element should be used as the delete button template for all chips. - * The associated element must be a child of `md-chips`. - * - * The provided button template will be appended to each chip and will remove the associated chip - * on click. - * - * The button is not styled or themed based on the theme set on the `md-chips` component. A theme - * class and custom icon can be specified in your template. - * - * You can also specify the `type` of the button in your template. - * - * @usage - * ### With Standard Chips - * - * - * - * - * - * - * ### With Object Chips - * - * - * - * - * - */ - - -/** - * MdChipRemove Directive Definition. - * - * @param $timeout - * @returns {{restrict: string, require: string[], link: Function, scope: boolean}} - * @constructor - */ -function MdChipRemove ($timeout) { - return { - restrict: 'A', - require: '^mdChips', - scope: false, - link: postLink - }; - - function postLink(scope, element, attr, ctrl) { - element.on('click', function() { - scope.$apply(function() { - ctrl.removeChip(scope.$$replacedScope.$index); - }); - }); - - // Child elements aren't available until after a $timeout tick as they are hidden by an - // `ng-if`. see http://goo.gl/zIWfuw - $timeout(function() { - element.attr({ 'tabindex': '-1', 'aria-hidden': 'true' }); - element.find('button').attr('tabindex', '-1'); - }); - } -} - -})(); -(function(){ -"use strict"; - - -MdChipTransclude.$inject = ["$compile"];angular - .module('material.components.chips') - .directive('mdChipTransclude', MdChipTransclude); - -function MdChipTransclude ($compile) { - return { - restrict: 'EA', - terminal: true, - link: link, - scope: false - }; - function link (scope, element, attr) { - var ctrl = scope.$parent.$mdChipsCtrl, - newScope = ctrl.parent.$new(false, ctrl.parent); - newScope.$$replacedScope = scope; - newScope.$chip = scope.$chip; - newScope.$index = scope.$index; - newScope.$mdChipsCtrl = ctrl; - - var newHtml = ctrl.$scope.$eval(attr.mdChipTransclude); - - element.html(newHtml); - $compile(element.contents())(newScope); - } -} - -})(); -(function(){ -"use strict"; - -/** - * The default chip append delay. - * - * @type {number} - */ -MdChipsCtrl.$inject = ["$scope", "$attrs", "$mdConstant", "$log", "$element", "$timeout", "$mdUtil", "$mdLiveAnnouncer", "$exceptionHandler"]; -var DEFAULT_CHIP_APPEND_DELAY = 300; - -angular - .module('material.components.chips') - .controller('MdChipsCtrl', MdChipsCtrl); - -/** - * Controller for the MdChips component. Responsible for adding to and - * removing from the list of chips, marking chips as selected, and binding to - * the models of various input components. - * - * @param $scope - * @param $attrs - * @param $mdConstant - * @param $log - * @param $element - * @param $timeout - * @param $mdUtil - * @param $mdLiveAnnouncer - * @param $exceptionHandler - * @constructor - */ -function MdChipsCtrl ($scope, $attrs, $mdConstant, $log, $element, $timeout, $mdUtil, - $mdLiveAnnouncer, $exceptionHandler) { - /** @type {Function} **/ - this.$timeout = $timeout; - - /** @type {Object} */ - this.$mdConstant = $mdConstant; - - /** @type {angular.$scope} */ - this.$scope = $scope; - - /** @type {angular.$scope} */ - this.parent = $scope.$parent; - - /** @type {$mdUtil} */ - this.$mdUtil = $mdUtil; - - /** @type {$log} */ - this.$log = $log; - - /** @type {$mdLiveAnnouncer} */ - this.$mdLiveAnnouncer = $mdLiveAnnouncer; - - /** @type {$exceptionHandler} */ - this.$exceptionHandler = $exceptionHandler; - - /** @type {$element} */ - this.$element = $element; - - /** @type {$attrs} */ - this.$attrs = $attrs; - - /** @type {angular.NgModelController} */ - this.ngModelCtrl = null; - - /** @type {angular.NgModelController} */ - this.userInputNgModelCtrl = null; - - /** @type {MdAutocompleteCtrl} */ - this.autocompleteCtrl = null; - - /** @type {Element} */ - this.userInputElement = null; - - /** @type {Array.} */ - this.items = []; - - /** @type {number} */ - this.selectedChip = -1; - - /** @type {string} */ - this.enableChipEdit = $mdUtil.parseAttributeBoolean($attrs.mdEnableChipEdit); - - /** @type {string} */ - this.addOnBlur = $mdUtil.parseAttributeBoolean($attrs.mdAddOnBlur); - - /** - * The class names to apply to the autocomplete or input. - * @type {string} - */ - this.inputClass = ''; - - /** - * The text to be used as the aria-label for the input. - * @type {string} - */ - this.inputAriaLabel = 'Chips input.'; - - /** - * Label text to describe the chips container. Used to give context and instructions to screen - * reader users when the chips container is selected. - * @type {string} - */ - this.containerHint = 'Chips container. Use arrow keys to select chips.'; - - /** - * Label text to describe the chips container when it is empty. Used to give context and - * instructions to screen reader users when the chips container is selected and it contains - * no chips. - * @type {string} - */ - this.containerEmptyHint = - 'Chips container. Enter the text area, then type text, and press enter to add a chip.'; - - /** - * Hidden hint text for how to delete a chip. Used to give context to screen readers. - * @type {string} - */ - this.deleteHint = 'Press delete to remove this chip.'; - - /** - * Hidden label for the delete button. Used to give context to screen readers. - * @type {string} - */ - this.deleteButtonLabel = 'Remove'; - - /** - * Model used by the input element. - * @type {string} - */ - this.chipBuffer = ''; - - /** - * Whether to use the transformChip expression to transform the chip buffer - * before appending it to the list. - * @type {boolean} - */ - this.useTransformChip = false; - - /** - * Whether to use the onAdd expression to notify of chip additions. - * @type {boolean} - */ - this.useOnAdd = false; - - /** - * Whether to use the onRemove expression to notify of chip removals. - * @type {boolean} - */ - this.useOnRemove = false; - - /** - * The ID of the chips wrapper which is used to build unique IDs for the chips and the aria-owns - * attribute. - * - * Defaults to '_md-chips-wrapper-' plus a unique number. - * - * @type {string} - */ - this.wrapperId = ''; - - /** - * Array of unique numbers which will be auto-generated any time the items change, and is used to - * create unique IDs for the aria-owns attribute. - * - * @type {Array} - */ - this.contentIds = []; - - /** - * The index of the chip that should have it's `tabindex` property set to `0` so it is selectable - * via the keyboard. - * - * @type {number|null} - */ - this.ariaTabIndex = null; - - /** - * After appending a chip, the chip will be focused for this number of milliseconds before the - * input is refocused. - * - * **Note:** This is **required** for compatibility with certain screen readers in order for - * them to properly allow keyboard access. - * - * @type {number} - */ - this.chipAppendDelay = DEFAULT_CHIP_APPEND_DELAY; - - /** - * Collection of functions to call to un-register watchers - * - * @type {Array} - */ - this.deRegister = []; - - /** - * The screen reader will announce the chip content followed by this message when a chip is added. - * @type {string} - */ - this.addedMessage = 'added'; - - /** - * The screen reader will announce the chip content followed by this message when a chip is - * removed. - * @type {string} - */ - this.removedMessage = 'removed'; - - this.init(); -} - -/** - * Initializes variables and sets up watchers - */ -MdChipsCtrl.prototype.init = function() { - var ctrl = this; - - // Set the wrapper ID - this.wrapperId = '_md-chips-wrapper-' + this.$mdUtil.nextUid(); - - // If we're using static chips, then we need to initialize a few things. - if (!this.$element.attr('ng-model')) { - this.setupStaticChips(); - } - - // Setup a watcher which manages the role and aria-owns attributes. - // This is never called for static chips since items is not defined. - this.deRegister.push( - this.$scope.$watchCollection('$mdChipsCtrl.items', function() { - // Make sure our input and wrapper have the correct ARIA attributes - ctrl.setupInputAria(); - ctrl.setupWrapperAria(); - }) - ); - - this.deRegister.push( - this.$attrs.$observe('mdChipAppendDelay', function(newValue) { - ctrl.chipAppendDelay = parseInt(newValue) || DEFAULT_CHIP_APPEND_DELAY; - }) - ); -}; - -/** - * Destructor for cleanup - */ -MdChipsCtrl.prototype.$onDestroy = function $onDestroy() { - var $destroyFn; - while (($destroyFn = this.deRegister.pop())) { - $destroyFn.call(this); - } -}; - -/** - * If we have an input, ensure it has the appropriate ARIA attributes. - */ -MdChipsCtrl.prototype.setupInputAria = function() { - var input = this.$element.find('input'); - - // If we have no input, just return - if (!input) { - return; - } - - input.attr('role', 'textbox'); - input.attr('aria-multiline', true); - if (this.inputAriaDescribedBy) { - input.attr('aria-describedby', this.inputAriaDescribedBy); - } - if (this.inputAriaLabelledBy) { - input.attr('aria-labelledby', this.inputAriaLabelledBy); - input.removeAttr('aria-label'); - } else { - input.attr('aria-label', this.inputAriaLabel); - } -}; - -/** - * Ensure our wrapper has the appropriate ARIA attributes. - */ -MdChipsCtrl.prototype.setupWrapperAria = function() { - var ctrl = this, - wrapper = this.$element.find('md-chips-wrap'); - - if (this.items && this.items.length) { - // Dynamically add the listbox role on every change because it must be removed when there are - // no items. - wrapper.attr('role', 'listbox'); - - // Generate some random (but unique) IDs for each chip - this.contentIds = this.items.map(function() { - return ctrl.wrapperId + '-chip-' + ctrl.$mdUtil.nextUid(); - }); - - // Use the contentIDs above to generate the aria-owns attribute - wrapper.attr('aria-owns', this.contentIds.join(' ')); - wrapper.attr('aria-label', this.containerHint); - } else { - // If we have no items, then the role and aria-owns attributes MUST be removed - wrapper.removeAttr('role'); - wrapper.removeAttr('aria-owns'); - wrapper.attr('aria-label', this.containerEmptyHint); - } -}; - -/** - * Apply specific roles and aria attributes for static chips - */ -MdChipsCtrl.prototype.setupStaticChips = function() { - var ctrl = this, i, staticChips; - var wrapper = this.$element.find('md-chips-wrap'); - - this.$timeout(function() { - wrapper.attr('role', 'list'); - staticChips = wrapper[0].children; - for (i = 0; i < staticChips.length; i++) { - staticChips[i].setAttribute('role', 'listitem'); - staticChips[i].setAttribute('aria-setsize', staticChips.length); - } - if (ctrl.inputAriaDescribedBy) { - wrapper.attr('aria-describedby', ctrl.inputAriaDescribedBy); - } - if (ctrl.inputAriaLabelledBy) { - wrapper.attr('aria-labelledby', ctrl.inputAriaLabelledBy); - wrapper.removeAttr('aria-label'); - } else { - wrapper.attr('aria-label', ctrl.inputAriaLabel); - } - }, 10); -}; - -/** - * Handles the keydown event on the input element: by default appends - * the buffer to the chip list, while backspace removes the last chip in the - * list if the current buffer is empty. - * @param {jQuery.Event|KeyboardEvent} event - */ -MdChipsCtrl.prototype.inputKeydown = function(event) { - var chipBuffer = this.getChipBuffer(); - - // If we have an autocomplete, and it handled the event, we have nothing to do - if (this.autocompleteCtrl && event.isDefaultPrevented && event.isDefaultPrevented()) { - return; - } - - if (event.keyCode === this.$mdConstant.KEY_CODE.BACKSPACE) { - // Only select and focus the previous chip, if the current caret position of the - // input element is at the beginning. - if (this.getCursorPosition(event.target) !== 0) { - return; - } - - event.preventDefault(); - event.stopPropagation(); - - if (this.items.length) { - this.selectAndFocusChipSafe(this.items.length - 1); - } - - return; - } - - // By default appends the buffer to the chip list. - if (!this.separatorKeys || this.separatorKeys.length < 1) { - this.separatorKeys = [this.$mdConstant.KEY_CODE.ENTER]; - } - - // Support additional separator key codes in an array of `md-separator-keys`. - if (this.separatorKeys.indexOf(event.keyCode) !== -1) { - if ((this.autocompleteCtrl && this.requireMatch) || !chipBuffer) return; - event.preventDefault(); - - // Only append the chip and reset the chip buffer if the max chips limit isn't reached. - if (this.hasMaxChipsReached()) return; - - this.appendChip(chipBuffer.trim()); - this.resetChipBuffer(); - - return false; - } -}; - -/** - * Returns the cursor position of the specified input element. - * @param {HTMLInputElement} element relevant input element - * @returns {Number} Cursor Position of the input. - */ -MdChipsCtrl.prototype.getCursorPosition = function(element) { - /* - * Figure out whether the current input for the chips buffer is valid for using - * the selectionStart / end property to retrieve the cursor position. - * Some browsers do not allow the use of those attributes, on different input types. - */ - try { - if (element.selectionStart === element.selectionEnd) { - return element.selectionStart; - } - } catch (e) { - if (!element.value) { - return 0; - } - } -}; - - -/** - * Updates the content of the chip at given index - * @param {number} chipIndex - * @param {string} chipContents - */ -MdChipsCtrl.prototype.updateChipContents = function(chipIndex, chipContents) { - if (chipIndex >= 0 && chipIndex < this.items.length) { - this.items[chipIndex] = chipContents; - this.updateNgModel(true); - } -}; - - -/** - * @return {boolean} true if a chip is currently being edited. False otherwise. - */ -MdChipsCtrl.prototype.isEditingChip = function() { - return !!this.$element[0].querySelector('._md-chip-editing'); -}; - -/** - * @param {string|Object} chip contents of a single chip - * @returns {boolean} true if the chip is an Object, false otherwise. - * @private - */ -MdChipsCtrl.prototype._isChipObject = function(chip) { - return angular.isObject(chip); -}; - -/** - * @returns {boolean} true if chips can be removed, false otherwise. - */ -MdChipsCtrl.prototype.isRemovable = function() { - // Return false if we have static chips - if (!this.ngModelCtrl) { - return false; - } - - return this.readonly ? this.removable : - angular.isDefined(this.removable) ? this.removable : true; -}; - -/** - * Handles the keydown event on the chip elements: backspace removes the selected chip, arrow - * keys switch which chip is active. - * @param {KeyboardEvent} event - */ -MdChipsCtrl.prototype.chipKeydown = function (event) { - if (this.getChipBuffer()) return; - if (this.isEditingChip()) return; - - switch (event.keyCode) { - case this.$mdConstant.KEY_CODE.BACKSPACE: - case this.$mdConstant.KEY_CODE.DELETE: - if (this.selectedChip < 0) return; - event.preventDefault(); - // Cancel the delete action only after the event cancel. Otherwise the page will go back. - if (!this.isRemovable()) return; - this.removeAndSelectAdjacentChip(this.selectedChip, event); - break; - case this.$mdConstant.KEY_CODE.LEFT_ARROW: - event.preventDefault(); - // By default, allow selection of -1 which will focus the input; if we're readonly, don't go - // below 0. - if (this.selectedChip < 0 || (this.readonly && this.selectedChip === 0)) { - this.selectedChip = this.items.length; - } - if (this.items.length) this.selectAndFocusChipSafe(this.selectedChip - 1); - break; - case this.$mdConstant.KEY_CODE.RIGHT_ARROW: - event.preventDefault(); - this.selectAndFocusChipSafe(this.selectedChip + 1); - break; - case this.$mdConstant.KEY_CODE.ESCAPE: - case this.$mdConstant.KEY_CODE.TAB: - if (this.selectedChip < 0) return; - event.preventDefault(); - this.onFocus(); - break; - } -}; - -/** - * Get the input's placeholder - uses `placeholder` when list is empty and `secondary-placeholder` - * when the list is non-empty. If `secondary-placeholder` is not provided, `placeholder` is used - * always. - * @returns {string} - */ -MdChipsCtrl.prototype.getPlaceholder = function() { - // Allow `secondary-placeholder` to be blank. - var useSecondary = (this.items && this.items.length && - (this.secondaryPlaceholder === '' || this.secondaryPlaceholder)); - return useSecondary ? this.secondaryPlaceholder : this.placeholder; -}; - -/** - * Removes chip at {@code index} and selects the adjacent chip. - * @param {number} index adjacent chip to select - * @param {Event=} event - */ -MdChipsCtrl.prototype.removeAndSelectAdjacentChip = function(index, event) { - var self = this; - var selIndex = self.getAdjacentChipIndex(index); - var wrap = this.$element[0].querySelector('md-chips-wrap'); - var chip = this.$element[0].querySelector('md-chip[index="' + index + '"]'); - - self.removeChip(index, event); - - // The double-timeout is currently necessary to ensure that the DOM has finalized and the select() - // will find the proper chip since the selection is index-based. - // - // TODO: Investigate calling from within chip $scope.$on('$destroy') to reduce/remove timeouts - self.$timeout(function() { - self.$timeout(function() { - self.selectAndFocusChipSafe(selIndex); - }); - }); -}; - -/** - * Sets the selected chip index to -1. - */ -MdChipsCtrl.prototype.resetSelectedChip = function() { - this.selectedChip = -1; - this.ariaTabIndex = null; -}; - -/** - * Gets the index of an adjacent chip to select after deletion. Adjacency is - * determined as the next chip in the list, unless the target chip is the - * last in the list, then it is the chip immediately preceding the target. If - * there is only one item in the list, -1 is returned (select none). - * The number returned is the index to select AFTER the target has been removed. - * If the current chip is not selected, then -1 is returned to select none. - * @param {number} index - * @returns {number} - */ -MdChipsCtrl.prototype.getAdjacentChipIndex = function(index) { - var len = this.items.length - 1; - return (len === 0) ? -1 : - (index === len) ? index - 1 : index; -}; - -/** - * Append the contents of the buffer to the chip list. This method will first - * call out to the md-transform-chip method, if provided. - * @param {string} newChip chip buffer contents that will be used to create the new chip - */ -MdChipsCtrl.prototype.appendChip = function(newChip) { - this.shouldFocusLastChip = !this.addOnBlur; - if (this.useTransformChip && this.transformChip) { - var transformedChip = this.transformChip({'$chip': newChip}); - - // Check to make sure the chip is defined before assigning it, otherwise, we'll just assume - // they want the string version. - if (angular.isDefined(transformedChip)) { - newChip = transformedChip; - } - } - - // If items contains an identical object to newChip, do not append - if (angular.isObject(newChip)) { - var identical = this.items.some(function(item) { - return angular.equals(newChip, item); - }); - if (identical) return; - } - - // Check for a null (but not undefined), or existing chip and cancel appending - if (newChip == null || this.items.indexOf(newChip) + 1) return; - - // Append the new chip onto our list - var length = this.items.push(newChip); - var index = length - 1; - - this.updateNgModel(); - - // Tell screen reader users that the chip was successfully added. - // TODO add a way for developers to specify which field of the object should be announced here. - var chipContent = angular.isObject(newChip) ? '' : newChip; - this.$mdLiveAnnouncer.announce(chipContent + ' ' + this.addedMessage, 'assertive'); - - // If the md-on-add attribute is specified, send a chip addition event - if (this.useOnAdd && this.onAdd) { - this.onAdd({ '$chip': newChip, '$index': index }); - } -}; - -/** - * Sets whether to use the md-transform-chip expression. This expression is - * bound to scope and controller in {@code MdChipsDirective} as - * {@code transformChip}. Due to the nature of directive scope bindings, the - * controller cannot know on its own/from the scope whether an expression was - * actually provided. - */ -MdChipsCtrl.prototype.useTransformChipExpression = function() { - this.useTransformChip = true; -}; - -/** - * Sets whether to use the md-on-add expression. This expression is - * bound to scope and controller in {@code MdChipsDirective} as - * {@code onAdd}. Due to the nature of directive scope bindings, the - * controller cannot know on its own/from the scope whether an expression was - * actually provided. - */ -MdChipsCtrl.prototype.useOnAddExpression = function() { - this.useOnAdd = true; -}; - -/** - * Sets whether to use the md-on-remove expression. This expression is - * bound to scope and controller in {@code MdChipsDirective} as - * {@code onRemove}. Due to the nature of directive scope bindings, the - * controller cannot know on its own/from the scope whether an expression was - * actually provided. - */ -MdChipsCtrl.prototype.useOnRemoveExpression = function() { - this.useOnRemove = true; -}; - -/** - * Sets whether to use the md-on-select expression. This expression is - * bound to scope and controller in {@code MdChipsDirective} as - * {@code onSelect}. Due to the nature of directive scope bindings, the - * controller cannot know on its own/from the scope whether an expression was - * actually provided. - */ -MdChipsCtrl.prototype.useOnSelectExpression = function() { - this.useOnSelect = true; -}; - -/** - * Gets the input buffer. The input buffer can be the model bound to the - * default input item {@code this.chipBuffer}, the {@code selectedItem} - * model of an {@code md-autocomplete}, or, through some magic, the model - * bound to any input or text area element found within a - * {@code md-input-container} element. - * @return {string} the input buffer - */ -MdChipsCtrl.prototype.getChipBuffer = function() { - var chipBuffer = !this.userInputElement ? this.chipBuffer : - this.userInputNgModelCtrl ? this.userInputNgModelCtrl.$viewValue : - this.userInputElement[0].value; - - // Ensure that the chip buffer is always a string. For example, the input element buffer - // might be falsy. - return angular.isString(chipBuffer) ? chipBuffer : ''; -}; - -/** - * Resets the input buffer for either the internal input or user provided input element. - */ -MdChipsCtrl.prototype.resetChipBuffer = function() { - if (this.userInputElement) { - if (this.userInputNgModelCtrl) { - this.userInputNgModelCtrl.$setViewValue(''); - this.userInputNgModelCtrl.$render(); - } else { - this.userInputElement[0].value = ''; - } - } else { - this.chipBuffer = ''; - } -}; - -/** - * @returns {boolean} true if the max chips limit has been reached, false otherwise. - */ -MdChipsCtrl.prototype.hasMaxChipsReached = function() { - if (angular.isString(this.maxChips)) { - this.maxChips = parseInt(this.maxChips, 10) || 0; - } - - return this.maxChips > 0 && this.items.length >= this.maxChips; -}; - -/** - * Updates the validity properties for the ngModel. - * - * TODO add the md-max-chips validator to this.ngModelCtrl.validators so that the validation will - * be performed automatically. - */ -MdChipsCtrl.prototype.validateModel = function() { - this.ngModelCtrl.$setValidity('md-max-chips', !this.hasMaxChipsReached()); - this.ngModelCtrl.$validate(); // rerun any registered validators -}; - -/** - * Function to handle updating the model, validation, and change notification when a chip - * is added, removed, or changed. - * @param {boolean=} skipValidation true to skip calling validateModel() - */ -MdChipsCtrl.prototype.updateNgModel = function(skipValidation) { - if (!skipValidation) { - this.validateModel(); - } - // This will trigger ng-change to fire, even in cases where $setViewValue() would not. - angular.forEach(this.ngModelCtrl.$viewChangeListeners, function(listener) { - try { - listener(); - } catch (e) { - this.$exceptionHandler(e); - } - }); -}; - -/** - * Removes the chip at the given index. - * @param {number} index of chip to remove - * @param {Event=} event optionally passed to the onRemove callback - */ -MdChipsCtrl.prototype.removeChip = function(index, event) { - var removed = this.items.splice(index, 1); - - this.updateNgModel(); - this.ngModelCtrl.$setDirty(); - - // Tell screen reader users that the chip was successfully removed. - // TODO add a way for developers to specify which field of the object should be announced here. - var chipContent = angular.isObject(removed[0]) ? '' : removed[0]; - this.$mdLiveAnnouncer.announce(chipContent + ' ' + this.removedMessage, 'assertive'); - - if (removed && removed.length && this.useOnRemove && this.onRemove) { - this.onRemove({ '$chip': removed[0], '$index': index, '$event': event }); - } -}; - -/** - * @param {number} index location of chip to remove - * @param {Event=} $event - */ -MdChipsCtrl.prototype.removeChipAndFocusInput = function (index, $event) { - this.removeChip(index, $event); - - if (this.autocompleteCtrl) { - // Always hide the autocomplete dropdown before focusing the autocomplete input. - // Wait for the input to move horizontally, because the chip was removed. - // This can lead to an incorrect dropdown position. - this.autocompleteCtrl.hidden = true; - this.$mdUtil.nextTick(this.onFocus.bind(this)); - } else { - this.onFocus(); - } - -}; -/** - * Selects the chip at `index`, - * @param {number} index location of chip to select and focus - */ -MdChipsCtrl.prototype.selectAndFocusChipSafe = function(index) { - // If we have no chips, or are asked to select a chip before the first, just focus the input - if (!this.items.length || index === -1) { - return this.focusInput(); - } - - // If we are asked to select a chip greater than the number of chips... - if (index >= this.items.length) { - if (this.readonly) { - // If we are readonly, jump back to the start (because we have no input) - index = 0; - } else { - // If we are not readonly, we should attempt to focus the input - return this.onFocus(); - } - } - - index = Math.max(index, 0); - index = Math.min(index, this.items.length - 1); - - this.selectChip(index); - this.focusChip(index); -}; - -/** - * Focus last chip, then focus the input. This is needed for screen reader support. - */ -MdChipsCtrl.prototype.focusLastChipThenInput = function() { - var ctrl = this; - - ctrl.shouldFocusLastChip = false; - - ctrl.focusChip(this.items.length - 1); - - ctrl.$timeout(function() { - ctrl.focusInput(); - }, ctrl.chipAppendDelay); -}; - -/** - * Focus the input element. - */ -MdChipsCtrl.prototype.focusInput = function() { - this.selectChip(-1); - this.onFocus(); -}; - -/** - * Marks the chip at the given index as selected. - * @param {number} index location of chip to select - */ -MdChipsCtrl.prototype.selectChip = function(index) { - if (index >= -1 && index <= this.items.length) { - this.selectedChip = index; - - // Fire the onSelect if provided - if (this.useOnSelect && this.onSelect) { - this.onSelect({'$chip': this.items[index] }); - } - } else { - this.$log.warn('Selected Chip index out of bounds; ignoring.'); - } -}; - -/** - * Call {@code focus()} on the chip at {@code index} - * @param {number} index location of chip to focus - */ -MdChipsCtrl.prototype.focusChip = function(index) { - var chipContent = this.$element[0].querySelector( - 'md-chip[index="' + index + '"] .md-chip-content' - ); - - this.ariaTabIndex = index; - - chipContent.focus(); -}; - -/** - * Configures the required interactions with the ngModel Controller. - * Specifically, set {@code this.items} to the {@code NgModelController#$viewValue}. - * @param {NgModelController} ngModelCtrl - */ -MdChipsCtrl.prototype.configureNgModel = function(ngModelCtrl) { - this.ngModelCtrl = ngModelCtrl; - - var self = this; - - // in chips the meaning of $isEmpty changes - ngModelCtrl.$isEmpty = function(value) { - return !value || value.length === 0; - }; - - ngModelCtrl.$render = function() { - // model is updated. do something. - self.items = self.ngModelCtrl.$viewValue; - }; -}; - -MdChipsCtrl.prototype.onFocus = function () { - var input = this.$element[0].querySelector('input'); - input && input.focus(); - this.resetSelectedChip(); -}; - -MdChipsCtrl.prototype.onInputFocus = function () { - this.inputHasFocus = true; - - // Make sure we have the appropriate ARIA attributes - this.setupInputAria(); - - // Make sure we don't have any chips selected - this.resetSelectedChip(); -}; - -MdChipsCtrl.prototype.onInputBlur = function () { - this.inputHasFocus = false; - - if (this.shouldAddOnBlur()) { - this.appendChip(this.getChipBuffer().trim()); - this.resetChipBuffer(); - } -}; - -/** - * Configure event bindings on input element. - * @param {angular.element} inputElement - */ -MdChipsCtrl.prototype.configureInput = function configureInput(inputElement) { - // Find the NgModelCtrl for the input element - var ngModelCtrl = inputElement.controller('ngModel'); - var ctrl = this; - - if (ngModelCtrl) { - - // sync touched-state from inner input to chips-element - this.deRegister.push( - this.$scope.$watch( - function() { - return ngModelCtrl.$touched; - }, - function(isTouched) { - isTouched && ctrl.ngModelCtrl.$setTouched(); - } - ) - ); - - // sync dirty-state from inner input to chips-element - this.deRegister.push( - this.$scope.$watch( - function() { - return ngModelCtrl.$dirty; - }, - function(isDirty) { - isDirty && ctrl.ngModelCtrl.$setDirty(); - } - ) - ); - } -}; - -/** - * Configure event bindings on a user-provided input element. - * @param {angular.element} inputElement - */ -MdChipsCtrl.prototype.configureUserInput = function(inputElement) { - this.userInputElement = inputElement; - - // Find the NgModelCtrl for the input element - var ngModelCtrl = inputElement.controller('ngModel'); - // `.controller` will look in the parent as well. - if (ngModelCtrl !== this.ngModelCtrl) { - this.userInputNgModelCtrl = ngModelCtrl; - } - - var scope = this.$scope; - var ctrl = this; - - // Run all of the events using evalAsync because a focus may fire a blur in the same digest loop - var scopeApplyFn = function(event, fn) { - scope.$evalAsync(angular.bind(ctrl, fn, event)); - }; - - // Bind to keydown and focus events of input - inputElement - .attr({ tabindex: 0 }) - .on('keydown', function(event) { scopeApplyFn(event, ctrl.inputKeydown); }) - .on('focus', function(event) { scopeApplyFn(event, ctrl.onInputFocus); }) - .on('blur', function(event) { scopeApplyFn(event, ctrl.onInputBlur); }); -}; - -/** - * @param {MdAutocompleteCtrl} ctrl controller from the autocomplete component - */ -MdChipsCtrl.prototype.configureAutocomplete = function(ctrl) { - if (ctrl) { - this.autocompleteCtrl = ctrl; - // Update the default container empty hint when we're inside of an autocomplete. - if (!this.$element.attr('container-empty-hint')) { - this.containerEmptyHint = 'Chips container with autocompletion. Enter the text area, ' + - 'type text to search, and then use the up and down arrow keys to select an option. ' + - 'Press enter to add the selected option as a chip.'; - this.setupWrapperAria(); - } - - ctrl.registerSelectedItemWatcher(angular.bind(this, function (item) { - if (item) { - // Only append the chip and reset the chip buffer if the max chips limit isn't reached. - if (this.hasMaxChipsReached()) return; - - this.appendChip(item); - this.resetChipBuffer(); - } - })); - - this.$element.find('input') - .on('focus',angular.bind(this, this.onInputFocus)) - .on('blur', angular.bind(this, this.onInputBlur)); - } -}; - -/** - * @returns {boolean} Whether the current chip buffer should be added on input blur or not. - */ -MdChipsCtrl.prototype.shouldAddOnBlur = function() { - - // Update the custom ngModel validators from the chips component. - this.validateModel(); - - var chipBuffer = this.getChipBuffer().trim(); - // If the model value is empty and required is set on the element, then the model will be invalid. - // In that case, we still want to allow adding the chip. The main (but not only) case we want - // to disallow is adding a chip on blur when md-max-chips validation fails. - var isModelValid = this.ngModelCtrl.$isEmpty(this.ngModelCtrl.$modelValue) || - this.ngModelCtrl.$valid; - var isAutocompleteShowing = this.autocompleteCtrl && !this.autocompleteCtrl.hidden; - - if (this.userInputNgModelCtrl) { - isModelValid = isModelValid && this.userInputNgModelCtrl.$valid; - } - - return this.addOnBlur && !this.requireMatch && chipBuffer && isModelValid && - !isAutocompleteShowing; -}; - -/** - * @returns {boolean} true if the input or a chip is focused. False otherwise. - */ -MdChipsCtrl.prototype.hasFocus = function () { - return this.inputHasFocus || this.selectedChip >= 0; -}; - -/** - * @param {number} index location of content id - * @returns {number} unique id for the aria-owns attribute - */ -MdChipsCtrl.prototype.contentIdFor = function(index) { - return this.contentIds[index]; -}; - -})(); -(function(){ -"use strict"; - - - MdChips.$inject = ["$mdTheming", "$mdUtil", "$compile", "$log", "$timeout", "$$mdSvgRegistry"];angular - .module('material.components.chips') - .directive('mdChips', MdChips); - - /** - * @ngdoc directive - * @name mdChips - * @module material.components.chips - * - * @description - * `` is an input component for building lists of strings or objects. The list items are - * displayed as 'chips'. This component can make use of an `` element or an - * `` element. - * - * ### Custom templates - * A custom template may be provided to render the content of each chip. This is achieved by - * specifying an `` element containing the custom content as a child of - * ``. - * - * Note: Any attributes on - * `` will be dropped as only the innerHTML is used for the chip template. The - * variables `$chip` and `$index` are available in the scope of ``, representing - * the chip object and its index in the list of chips, respectively. - * To override the chip delete control, include an element (ideally a button) with the attribute - * `md-chip-remove`. A click listener to remove the chip will be added automatically. The element - * is also placed as a sibling to the chip content (on which there are also click listeners) to - * avoid a nested ng-click situation. - * - * - * - * Sometimes developers want to limit the amount of possible chips.
    - * You can specify the maximum amount of chips by using the following markup. - * - * - * - * - * - * - * In some cases, you have an autocomplete inside of the `md-chips`.
    - * When the maximum amount of chips has been reached, you can also disable the autocomplete - * selection.
    - * Here is an example markup. - * - * - * - * - * - * - * - * ### Accessibility - * - * The `md-chips` component supports keyboard and screen reader users since Version 1.1.2. In - * order to achieve this, we modified the chips behavior to select newly appended chips for - * `300ms` before re-focusing the input and allowing the user to type. - * - * For most users, this delay is small enough that it will not be noticeable but allows certain - * screen readers to function properly (JAWS and NVDA in particular). - * - * We introduced a new `md-chip-append-delay` option to allow developers to better control this - * behavior. - * - * Please refer to the documentation of this option (below) for more information. - * - * @param {expression} ng-model Assignable AngularJS expression to be data-bound to the list of - * chips. The expression should evaluate to a `string` or `Object` Array. The type of this - * array should align with the return value of `md-transform-chip`. - * @param {expression=} ng-change AngularJS expression to be executed on chip addition, removal, - * or content change. - * @param {string=} placeholder Placeholder text that will be forwarded to the input. - * @param {string=} secondary-placeholder Placeholder text that will be forwarded to the input, - * displayed when there is at least one item in the list - * @param {boolean=} md-removable Enables or disables the deletion of chips through the - * removal icon or the Delete/Backspace key. Defaults to true. - * @param {boolean=} readonly Disables list manipulation (deleting or adding list items), hiding - * the input and delete buttons. If no `ng-model` is provided, the chips will automatically be - * marked as readonly.

    - * When `md-removable` is not defined, the `md-remove` behavior will be overwritten and - * disabled. - * @param {boolean=} md-enable-chip-edit Set this to `"true"` to enable editing of chip contents. - * The user can go into edit mode by pressing the `space` or `enter` keys, or by double - * clicking on the chip. Chip editing is only supported for chips using the basic template. - * **Note:** This attribute is only evaluated once; it is not watched. - * @param {boolean=} ng-required Whether ng-model is allowed to be empty or not. - * @param {number=} md-max-chips The maximum number of chips allowed to add through user input. - *

    The validation property `md-max-chips` can be used when the max chips - * amount is reached. - * @param {boolean=} md-add-on-blur When set to `"true"`, the remaining text inside of the input - * will be converted into a new chip on blur. - * **Note:** This attribute is only evaluated once; it is not watched. - * @param {expression} md-transform-chip An expression of form `myFunction($chip)` that when - * called expects one of the following return values: - * - an object representing the `$chip` input string - * - `undefined` to simply add the `$chip` input string, or - * - `null` to prevent the chip from being appended - * @param {expression=} md-on-add An expression which will be called when a chip has been - * added with `$chip` and `$index` available as parameters. - * @param {expression=} md-on-remove An expression which will be called when a chip has been - * removed with `$chip`, `$index`, and `$event` available as parameters. - * @param {expression=} md-on-select An expression which will be called when a chip is selected. - * @param {boolean=} md-require-match If true, and the chips template contains an autocomplete, - * only allow selection of pre-defined chips (i.e. you cannot add new ones). - * @param {string=} md-input-class This class will be applied to the child input for custom - * styling. If you are using an `md-autocomplete`, then you need to put this attribute on the - * `md-autocomplete` rather than the `md-chips`. - * @param {string=} input-aria-describedby A space-separated list of element IDs. This should - * contain the IDs of any elements that describe this autocomplete. Screen readers will read - * the content of these elements at the end of announcing that the chips input has been - * selected and describing its current state. The descriptive elements do not need to be - * visible on the page. - * @param {string=} input-aria-labelledby A space-separated list of element IDs. The ideal use - * case is that this would contain the ID of a `
    \ - \ -
    \ - {{$chip[$mdContactChipsCtrl.contactName]}}\ -
    \ -
    \ - {{$chip[$mdContactChipsCtrl.contactName]}}\ -
    \ -
    \ -
    '; - - -/** - * MDContactChips Directive Definition - * - * @param $mdTheming - * @param $mdUtil - * @returns {*} - * @ngInject - */ -function MdContactChips($mdTheming, $mdUtil) { - return { - template: function(element, attrs) { - return MD_CONTACT_CHIPS_TEMPLATE; - }, - restrict: 'E', - controller: 'MdContactChipsCtrl', - controllerAs: '$mdContactChipsCtrl', - bindToController: true, - compile: compile, - scope: { - contactQuery: '&mdContacts', - placeholder: '@?', - secondaryPlaceholder: '@?', - contactName: '@mdContactName', - contactImage: '@mdContactImage', - contactEmail: '@mdContactEmail', - contacts: '=ngModel', - ngChange: '&?', - requireMatch: '=?mdRequireMatch', - minLength: '=?mdMinLength', - maxChips: '=?mdMaxChips', - highlightFlags: '@?mdHighlightFlags', - chipAppendDelay: '@?mdChipAppendDelay', - separatorKeys: '=?mdSeparatorKeys', - removedMessage: '@?mdRemovedMessage', - inputClass: '@?mdInputClass', - inputAriaDescribedBy: '@?inputAriaDescribedby', - inputAriaLabelledBy: '@?inputAriaLabelledby', - inputAriaLabel: '@?', - containerHint: '@?', - containerEmptyHint: '@?', - deleteHint: '@?' - } - }; - - function compile(element, attr) { - return function postLink(scope, element, attrs, controllers) { - var contactChipsController = controllers; - - $mdUtil.initOptionalProperties(scope, attr); - $mdTheming(element); - - element.attr('tabindex', '-1'); - - attrs.$observe('mdChipAppendDelay', function(newValue) { - contactChipsController.chipAppendDelay = newValue; - }); - }; - } -} - -})(); -(function(){ -"use strict"; - -(function () { - "use strict"; - - /** - * Use a RegExp to check if the `md-colors=""` is static string - * or one that should be observed and dynamically interpolated. - */ - MdColorsDirective.$inject = ["$mdColors", "$mdUtil", "$log", "$parse"]; - MdColorsService.$inject = ["$mdTheming", "$mdUtil", "$log"]; - var STATIC_COLOR_EXPRESSION = /^{((\s|,)*?["'a-zA-Z-]+?\s*?:\s*?(['"])[a-zA-Z0-9-.]*(['"]))+\s*}$/; - var colorPalettes = null; - - /** - * @ngdoc module - * @name material.components.colors - * - * @description - * Define $mdColors service and a `md-colors=""` attribute directive - */ - angular - .module('material.components.colors', ['material.core']) - .directive('mdColors', MdColorsDirective) - .service('$mdColors', MdColorsService); - - /** - * @ngdoc service - * @name $mdColors - * @module material.components.colors - * - * @description - * By default, defining a theme does not make its colors available for applying to non AngularJS - * Material elements. The `$mdColors` service is used by the `md-color` directive to convert a - * set of color expressions to RGBA values and then apply those values to the element as CSS - * property values. - * - * @usage - * Getting a color based on a theme - * - * - * angular.controller('myCtrl', function ($mdColors) { - * var color = $mdColors.getThemeColor('myTheme-primary-900-0.5'); - * ... - * }); - * - * - * Applying a color from a palette to an element - * - * app.directive('myDirective', function($mdColors) { - * return { - * ... - * link: function (scope, elem) { - * $mdColors.applyThemeColors(elem, {color: 'red-A200-0.2'}); - * } - * } - * }); - * - */ - function MdColorsService($mdTheming, $mdUtil, $log) { - colorPalettes = colorPalettes || Object.keys($mdTheming.PALETTES); - - // Publish service instance - return { - applyThemeColors: applyThemeColors, - getThemeColor: getThemeColor, - hasTheme: hasTheme - }; - - // ******************************************** - // Internal Methods - // ******************************************** - - /** - * @ngdoc method - * @name $mdColors#applyThemeColors - * - * @description - * Lookup a set of colors by hue, theme, and palette, then apply those colors - * with the provided opacity (via `rgba()`) to the specified CSS property. - * - * @param {angular.element} element the element to apply the styles to - * @param {Object} colorExpression Keys are CSS properties and values are strings representing - * the `theme-palette-hue-opacity` of the desired color. For example: - * `{'color': 'red-A200-0.3', 'background-color': 'myTheme-primary-700-0.8'}`. Theme, hue, and - * opacity are optional. - */ - function applyThemeColors(element, colorExpression) { - try { - if (colorExpression) { - // Assign the calculate RGBA color values directly as inline CSS - element.css(interpolateColors(colorExpression)); - } - } catch (e) { - $log.error(e.message); - } - } - - /** - * @ngdoc method - * @name $mdColors#getThemeColor - * - * @description - * Get a parsed RGBA color using a string representing the `theme-palette-hue-opacity` of the - * desired color. - * - * @param {string} expression color expression like `'red-A200-0.3'` or - * `'myTheme-primary-700-0.8'`. Theme, hue, and opacity are optional. - * @returns {string} a CSS color value like `rgba(211, 47, 47, 0.8)` - */ - function getThemeColor(expression) { - var color = extractColorOptions(expression); - - return parseColor(color); - } - - /** - * Return the parsed color - * @param {{hue: *, theme: any, palette: *, opacity: (*|string|number)}} color hash map of color - * definitions - * @param {boolean=} contrast whether use contrast color for foreground. Defaults to false. - * @returns {string} rgba color string - */ - function parseColor(color, contrast) { - contrast = contrast || false; - var rgbValues = $mdTheming.PALETTES[color.palette][color.hue]; - - rgbValues = contrast ? rgbValues.contrast : rgbValues.value; - - return $mdUtil.supplant('rgba({0}, {1}, {2}, {3})', - [rgbValues[0], rgbValues[1], rgbValues[2], rgbValues[3] || color.opacity] - ); - } - - /** - * Convert the color expression into an object with scope-interpolated values - * Then calculate the rgba() values based on the theme color parts - * @param {Object} themeColors json object, keys are css properties and values are string of - * the wanted color, for example: `{color: 'red-A200-0.3'}`. - * @return {Object} Hashmap of CSS properties with associated `rgba()` string values - */ - function interpolateColors(themeColors) { - var rgbColors = {}; - - var hasColorProperty = themeColors.hasOwnProperty('color'); - - angular.forEach(themeColors, function (value, key) { - var color = extractColorOptions(value); - var hasBackground = key.indexOf('background') > -1; - - rgbColors[key] = parseColor(color); - if (hasBackground && !hasColorProperty) { - rgbColors.color = parseColor(color, true); - } - }); - - return rgbColors; - } - - /** - * Check if expression has defined theme - * For instance: - * 'myTheme-primary' => true - * 'red-800' => false - * @param {string} expression color expression like 'red-800', 'red-A200-0.3', - * 'myTheme-primary', or 'myTheme-primary-400' - * @return {boolean} true if the expression has a theme part, false otherwise. - */ - function hasTheme(expression) { - return angular.isDefined($mdTheming.THEMES[expression.split('-')[0]]); - } - - /** - * For the evaluated expression, extract the color parts into a hash map - * @param {string} expression color expression like 'red-800', 'red-A200-0.3', - * 'myTheme-primary', or 'myTheme-primary-400' - * @returns {{hue: *, theme: any, palette: *, opacity: (*|string|number)}} - */ - function extractColorOptions(expression) { - var parts = expression.split('-'); - var hasTheme = angular.isDefined($mdTheming.THEMES[parts[0]]); - var theme = hasTheme ? parts.splice(0, 1)[0] : $mdTheming.defaultTheme(); - - return { - theme: theme, - palette: extractPalette(parts, theme), - hue: extractHue(parts, theme), - opacity: parts[2] || 1 - }; - } - - /** - * Calculate the theme palette name - * @param {Array} parts - * @param {string} theme name - * @return {string} - */ - function extractPalette(parts, theme) { - // If the next section is one of the palettes we assume it's a two word palette - // Two word palette can be also written in camelCase, forming camelCase to dash-case - - var isTwoWord = parts.length > 1 && colorPalettes.indexOf(parts[1]) !== -1; - var palette = parts[0].replace(/([a-z])([A-Z])/g, '$1-$2').toLowerCase(); - - if (isTwoWord) palette = parts[0] + '-' + parts.splice(1, 1); - - if (colorPalettes.indexOf(palette) === -1) { - // If the palette is not in the palette list it's one of primary/accent/warn/background - var scheme = $mdTheming.THEMES[theme].colors[palette]; - if (!scheme) { - throw new Error($mdUtil.supplant( - 'mdColors: couldn\'t find \'{palette}\' in the palettes.', - {palette: palette})); - } - palette = scheme.name; - } - - return palette; - } - - /** - * @param {Array} parts - * @param {string} theme name - * @return {*} - */ - function extractHue(parts, theme) { - var themeColors = $mdTheming.THEMES[theme].colors; - - if (parts[1] === 'hue') { - var hueNumber = parseInt(parts.splice(2, 1)[0], 10); - - if (hueNumber < 1 || hueNumber > 3) { - throw new Error($mdUtil.supplant( - 'mdColors: \'hue-{hueNumber}\' is not a valid hue, can be only \'hue-1\', \'hue-2\' and \'hue-3\'', - {hueNumber: hueNumber})); - } - parts[1] = 'hue-' + hueNumber; - - if (!(parts[0] in themeColors)) { - throw new Error($mdUtil.supplant( - 'mdColors: \'hue-x\' can only be used with [{availableThemes}], but was used with \'{usedTheme}\'', - { - availableThemes: Object.keys(themeColors).join(', '), - usedTheme: parts[0] - })); - } - - return themeColors[parts[0]].hues[parts[1]]; - } - - return parts[1] || themeColors[parts[0] in themeColors ? parts[0] : 'primary'].hues['default']; - } - } - - /** - * @ngdoc directive - * @name mdColors - * @module material.components.colors - * - * @restrict A - * - * @description - * `mdColors` directive will apply the theme-based color expression as RGBA CSS style values. - * - * The format will be similar to the colors defined in the Sass files: - * - * ## `[?theme]-[palette]-[?hue]-[?opacity]` - * - [theme] - default value is the default theme - * - [palette] - can be either palette name or primary/accent/warn/background - * - [hue] - default is 500 (hue-x can be used with primary/accent/warn/background) - * - [opacity] - default is 1 - * - * - * > `?` indicates optional parameter - * - * @usage - * - *
    - *
    - * Color demo - *
    - *
    - *
    - * - * The `mdColors` directive will automatically watch for changes in the expression if it recognizes - * an interpolation expression or a function. For performance options, you can use `::` prefix to - * the `md-colors` expression to indicate a one-time data binding. - * - * - * - * - * - */ - function MdColorsDirective($mdColors, $mdUtil, $log, $parse) { - return { - restrict: 'A', - require: ['^?mdTheme'], - compile: function (tElem, tAttrs) { - var shouldWatch = shouldColorsWatch(); - - return function (scope, element, attrs, ctrl) { - var mdThemeController = ctrl[0]; - - var lastColors = {}; - - /** - * @param {string=} theme - * @return {Object} colors found in the specified theme - */ - var parseColors = function (theme) { - if (typeof theme !== 'string') { - theme = ''; - } - - if (!attrs.mdColors) { - attrs.mdColors = '{}'; - } - - /** - * Json.parse() does not work because the keys are not quoted; - * use $parse to convert to a hash map - */ - var colors = $parse(attrs.mdColors)(scope); - - /** - * If mdTheme is defined higher up the DOM tree, - * we add mdTheme's theme to the colors which don't specify a theme. - * - * @example - * - *
    - *
    - * Color demo - *
    - *
    - *
    - * - * 'primary-600' will be changed to 'myTheme-primary-600', - * but 'mySecondTheme-accent-200' will not be changed since it has a theme defined. - */ - if (mdThemeController) { - Object.keys(colors).forEach(function (prop) { - var color = colors[prop]; - if (!$mdColors.hasTheme(color)) { - colors[prop] = (theme || mdThemeController.$mdTheme) + '-' + color; - } - }); - } - - cleanElement(colors); - - return colors; - }; - - /** - * @param {Object} colors - */ - var cleanElement = function (colors) { - if (!angular.equals(colors, lastColors)) { - var keys = Object.keys(lastColors); - - if (lastColors.background && !keys.color) { - keys.push('color'); - } - - keys.forEach(function (key) { - element.css(key, ''); - }); - } - - lastColors = colors; - }; - - /** - * Registering for mgTheme changes and asking mdTheme controller run our callback whenever - * a theme changes. - */ - var unregisterChanges = angular.noop; - - if (mdThemeController) { - unregisterChanges = mdThemeController.registerChanges(function (theme) { - $mdColors.applyThemeColors(element, parseColors(theme)); - }); - } - - scope.$on('$destroy', function () { - unregisterChanges(); - }); - - try { - if (shouldWatch) { - scope.$watch(parseColors, angular.bind(this, - $mdColors.applyThemeColors, element - ), true); - } - else { - $mdColors.applyThemeColors(element, parseColors()); - } - - } - catch (e) { - $log.error(e.message); - } - - }; - - /** - * @return {boolean} - */ - function shouldColorsWatch() { - // Simulate 1x binding and mark mdColorsWatch == false - var rawColorExpression = tAttrs.mdColors; - var bindOnce = rawColorExpression.indexOf('::') > -1; - var isStatic = bindOnce ? true : STATIC_COLOR_EXPRESSION.test(tAttrs.mdColors); - - // Remove it for the postLink... - tAttrs.mdColors = rawColorExpression.replace('::', ''); - - var hasWatchAttr = angular.isDefined(tAttrs.mdColorsWatch); - - return (bindOnce || isStatic) ? false : - hasWatchAttr ? $mdUtil.parseAttributeBoolean(tAttrs.mdColorsWatch) : true; - } - } - }; - } -})(); - -})(); -(function(){ -"use strict"; - -/** - * @ngdoc module - * @name material.components.content - * - * @description - * Scrollable content - */ -mdContentDirective.$inject = ["$mdTheming"]; -angular.module('material.components.content', [ - 'material.core' -]) - .directive('mdContent', mdContentDirective); - -/** - * @ngdoc directive - * @name mdContent - * @module material.components.content - * - * @restrict E - * - * @description - * - * The `` directive is a container element useful for scrollable content. It achieves - * this by setting the CSS `overflow` property to `auto` so that content can properly scroll. - * - * In general, `` components are not designed to be nested inside one another. If - * possible, it is better to make them siblings. This often results in a better user experience as - * having nested scrollbars may confuse the user. - * - * ## Troubleshooting - * - * In some cases, you may wish to apply the `md-no-momentum` class to ensure that Safari's - * momentum scrolling is disabled. Momentum scrolling can cause flickering issues while scrolling - * SVG icons and some other components. - * - * Additionally, we now also offer the `md-no-flicker` class which can be applied to any element - * and uses a Webkit-specific filter of `blur(0px)` that forces GPU rendering of all elements - * inside (which eliminates the flicker on iOS devices). - * - * _Note: Forcing an element to render on the GPU can have unintended side-effects, especially - * related to the z-index of elements. Please use with caution and only on the elements needed._ - * - * @usage - * - * Add the `[layout-padding]` attribute to make the content padded. - * - * - * - * Lorem ipsum dolor sit amet, ne quod novum mei. - * - * - */ - -function mdContentDirective($mdTheming) { - return { - restrict: 'E', - controller: ['$scope', '$element', ContentController], - link: function(scope, element) { - element.addClass('_md'); // private md component indicator for styling - - $mdTheming(element); - scope.$broadcast('$mdContentLoaded', element); - - iosScrollFix(element[0]); - } - }; - - function ContentController($scope, $element) { - this.$scope = $scope; - this.$element = $element; - } -} - -function iosScrollFix(node) { - // IOS FIX: - // If we scroll where there is no more room for the webview to scroll, - // by default the webview itself will scroll up and down, this looks really - // bad. So if we are scrolling to the very top or bottom, add/subtract one - angular.element(node).on('$md.pressdown', function(ev) { - // Only touch events - if (ev.pointer.type !== 't') return; - // Don't let a child content's touchstart ruin it for us. - if (ev.$materialScrollFixed) return; - ev.$materialScrollFixed = true; - - if (node.scrollTop === 0) { - node.scrollTop = 1; - } else if (node.scrollHeight === node.scrollTop + node.offsetHeight) { - node.scrollTop -= 1; - } - }); -} - -})(); -(function(){ -"use strict"; - -/** - * @ngdoc module - * @name material.components.datepicker - * @description Module for the datepicker component. - */ - -angular.module('material.components.datepicker', [ - 'material.core', - 'material.components.icon', - 'material.components.virtualRepeat' -]); - -})(); -(function(){ -"use strict"; - -(function() { - 'use strict'; - - /** - * @ngdoc directive - * @name mdCalendar - * @module material.components.datepicker - * - * @param {Date} ng-model The component's model. Should be a Date object. - * @param {Object=} ng-model-options Allows tuning of the way in which `ng-model` is being - * updated. Also allows for a timezone to be specified. - * Read more at the - * ngModelOptions docs. - * @param {Date=} md-min-date Expression representing the minimum date. - * @param {Date=} md-max-date Expression representing the maximum date. - * @param {(function(Date): boolean)=} md-date-filter Function expecting a date and returning a - * boolean whether it can be selected in "day" mode or not. - * @param {(function(Date): boolean)=} md-month-filter Function expecting a date and returning a - * boolean whether it can be selected in "month" mode or not. - * @param {String=} md-current-view Current view of the calendar. Can be either "month" or "year". - * @param {String=} md-mode Restricts the user to only selecting a value from a particular view. - * This option can be used if the user is only supposed to choose from a certain date type - * (e.g. only selecting the month). Can be either "month" or "day". **Note** that this will - * overwrite the `md-current-view` value. - * - * @description - * `` is a component that renders a calendar that can be used to select a date. - * It is a part of the `` pane, however it can also be used on it's own. - * - * @usage - * - * - * - * - */ - CalendarCtrl.$inject = ["$element", "$scope", "$$mdDateUtil", "$mdUtil", "$mdConstant", "$mdTheming", "$$rAF", "$attrs", "$mdDateLocale", "$filter", "$document"]; - calendarDirective.$inject = ["inputDirective"]; - angular.module('material.components.datepicker') - .directive('mdCalendar', calendarDirective); - - // TODO(jelbourn): Mac Cmd + left / right == Home / End - // TODO(jelbourn): Refactor month element creation to use cloneNode (performance). - // TODO(jelbourn): Define virtual scrolling constants (compactness) users can override. - // TODO(jelbourn): Animated month transition on ng-model change (virtual-repeat) - // TODO(jelbourn): Scroll snapping (virtual repeat) - // TODO(jelbourn): Remove superfluous row from short months (virtual-repeat) - // TODO(jelbourn): Month headers stick to top when scrolling. - // TODO(jelbourn): Previous month opacity is lowered when partially scrolled out of view. - // TODO(jelbourn): Support md-calendar standalone on a page (as a tabstop w/ aria-live - // announcement and key handling). - // TODO Read-only calendar (not just date-picker). - - function calendarDirective(inputDirective) { - return { - template: function(tElement, tAttr) { - // This allows the calendar to work, without a datepicker. This ensures that the virtual - // repeater scrolls to the proper place on load by deferring the execution until the next - // digest. It's necessary only if the calendar is used without a datepicker, otherwise it's - // already wrapped in an ngIf. - var extraAttrs = tAttr.hasOwnProperty('ngIf') ? '' : 'ng-if="calendarCtrl.isInitialized"'; - return '' + - '
    ' + - '' + - '' + - '
    '; - }, - scope: { - minDate: '=mdMinDate', - maxDate: '=mdMaxDate', - dateFilter: '=mdDateFilter', - monthFilter: '=mdMonthFilter', - - // These need to be prefixed, because Angular resets - // any changes to the value due to bindToController. - _mode: '@mdMode', - _currentView: '@mdCurrentView' - }, - require: ['ngModel', 'mdCalendar'], - controller: CalendarCtrl, - controllerAs: 'calendarCtrl', - bindToController: true, - link: function(scope, element, attrs, controllers) { - var ngModelCtrl = controllers[0]; - var mdCalendarCtrl = controllers[1]; - mdCalendarCtrl.configureNgModel(ngModelCtrl, inputDirective); - } - }; - } - - /** - * Occasionally the hideVerticalScrollbar method might read an element's - * width as 0, because it hasn't been laid out yet. This value will be used - * as a fallback, in order to prevent scenarios where the element's width - * would otherwise have been set to 0. This value is the "usual" width of a - * calendar within a floating calendar pane. - */ - var FALLBACK_WIDTH = 340; - - /** Next identifier for calendar instance. */ - var nextUniqueId = 0; - - /** Maps the `md-mode` values to their corresponding calendar views. */ - var MODE_MAP = { - day: 'month', - month: 'year' - }; - - /** - * Controller for the mdCalendar component. - * @ngInject @constructor - */ - function CalendarCtrl($element, $scope, $$mdDateUtil, $mdUtil, $mdConstant, $mdTheming, $$rAF, - $attrs, $mdDateLocale, $filter, $document) { - $mdTheming($element); - - /** - * @final - * @type {!JQLite} - */ - this.$element = $element; - - /** - * @final - * @type {!angular.Scope} - */ - this.$scope = $scope; - - /** - * @final - * @type {!angular.$attrs} Current attributes object for the element - */ - this.$attrs = $attrs; - - /** @final */ - this.dateUtil = $$mdDateUtil; - - /** @final */ - this.$mdUtil = $mdUtil; - - /** @final */ - this.keyCode = $mdConstant.KEY_CODE; - - /** @final */ - this.$$rAF = $$rAF; - - /** @final */ - this.$mdDateLocale = $mdDateLocale; - - /** @final The built-in Angular date filter. */ - this.ngDateFilter = $filter('date'); - - /** - * @final - * @type {Date} - */ - this.today = this.dateUtil.createDateAtMidnight(); - - /** @type {!ngModel.NgModelController} */ - this.ngModelCtrl = undefined; - - /** @type {string} Class applied to the selected date cell. */ - this.SELECTED_DATE_CLASS = 'md-calendar-selected-date'; - - /** @type {string} Class applied to the cell for today. */ - this.TODAY_CLASS = 'md-calendar-date-today'; - - /** @type {string} Class applied to the focused cell. */ - this.FOCUSED_DATE_CLASS = 'md-focus'; - - /** - * @final - * @type {number} Unique ID for this calendar instance. - */ - this.id = nextUniqueId++; - - /** - * The date that is currently focused or showing in the calendar. This will initially be set - * to the ng-model value if set, otherwise to today. It will be updated as the user navigates - * to other months. The cell corresponding to the displayDate does not necessarily always have - * focus in the document (such as for cases when the user is scrolling the calendar). - * @type {Date} - */ - this.displayDate = null; - - /** - * Allows restricting the calendar to only allow selecting a month or a day. - * @type {'month'|'day'|null} - */ - this.mode = null; - - /** - * The selected date. Keep track of this separately from the ng-model value so that we - * can know, when the ng-model value changes, what the previous value was before it's updated - * in the component's UI. - * - * @type {Date} - */ - this.selectedDate = null; - - /** - * The first date that can be rendered by the calendar. The default is taken - * from the mdDateLocale provider and is limited by the mdMinDate. - * @type {Date} - */ - this.firstRenderableDate = null; - - /** - * The last date that can be rendered by the calendar. The default comes - * from the mdDateLocale provider and is limited by the maxDate. - * @type {Date} - */ - this.lastRenderableDate = null; - - /** - * Used to toggle initialize the root element in the next digest. - * @type {boolean} - */ - this.isInitialized = false; - - /** - * Cache for the width of the element without a scrollbar. Used to hide the scrollbar later on - * and to avoid extra reflows when switching between views. - * @type {number} - */ - this.width = 0; - - /** - * Caches the width of the scrollbar in order to be used when hiding it and to avoid extra reflows. - * @type {number} - */ - this.scrollbarWidth = 0; - - /** - * @type {boolean} set to true if the calendar is being used "standalone" (outside of a - * md-datepicker). - */ - this.standaloneMode = false; - - // Unless the user specifies so, the calendar should not be a tab stop. - // This is necessary because ngAria might add a tabindex to anything with an ng-model - // (based on whether or not the user has turned that particular feature on/off). - if (!$attrs.tabindex) { - $element.attr('tabindex', '-1'); - } - - var boundKeyHandler = angular.bind(this, this.handleKeyEvent); - - // If use the md-calendar directly in the body without datepicker, - // handleKeyEvent will disable other inputs on the page. - // So only apply the handleKeyEvent on the body when the md-calendar inside datepicker, - // otherwise apply on the calendar element only. - - var handleKeyElement; - if ($element.parent().hasClass('md-datepicker-calendar')) { - handleKeyElement = angular.element($document[0].body); - } else { - this.standaloneMode = true; - handleKeyElement = $element; - } - - // Bind the keydown handler to the body, in order to handle cases where the focused - // element gets removed from the DOM and stops propagating click events. - handleKeyElement.on('keydown', boundKeyHandler); - - $scope.$on('$destroy', function() { - handleKeyElement.off('keydown', boundKeyHandler); - }); - - // For AngularJS 1.4 and older, where there are no lifecycle hooks but bindings are pre-assigned, - // manually call the $onInit hook. - if (angular.version.major === 1 && angular.version.minor <= 4) { - this.$onInit(); - } - } - - /** - * AngularJS Lifecycle hook for newer AngularJS versions. - * Bindings are not guaranteed to have been assigned in the controller, but they are in the - * $onInit hook. - */ - CalendarCtrl.prototype.$onInit = function() { - /** - * The currently visible calendar view. Note the prefix on the scope value, - * which is necessary, because the datepicker seems to reset the real one value if the - * calendar is open, but the `currentView` on the datepicker's scope is empty. - * @type {String} - */ - if (this._mode && MODE_MAP.hasOwnProperty(this._mode)) { - this.currentView = MODE_MAP[this._mode]; - this.mode = this._mode; - } else { - this.currentView = this._currentView || 'month'; - this.mode = null; - } - - if (this.minDate && this.minDate > this.$mdDateLocale.firstRenderableDate) { - this.firstRenderableDate = this.minDate; - } else { - this.firstRenderableDate = this.$mdDateLocale.firstRenderableDate; - } - - if (this.maxDate && this.maxDate < this.$mdDateLocale.lastRenderableDate) { - this.lastRenderableDate = this.maxDate; - } else { - this.lastRenderableDate = this.$mdDateLocale.lastRenderableDate; - } - }; - - /** - * Sets up the controller's reference to ngModelController. - * @param {!ngModel.NgModelController} ngModelCtrl Instance of the ngModel controller. - * @param {Object} inputDirective Config for AngularJS's `input` directive. - */ - CalendarCtrl.prototype.configureNgModel = function(ngModelCtrl, inputDirective) { - var self = this; - self.ngModelCtrl = ngModelCtrl; - - // The component needs to be [type="date"] in order to be picked up by AngularJS. - this.$attrs.$set('type', 'date'); - - // Invoke the `input` directive link function, adding a stub for the element. - // This allows us to re-use AngularJS' logic for setting the timezone via ng-model-options. - // It works by calling the link function directly which then adds the proper `$parsers` and - // `$formatters` to the NgModelController. - inputDirective[0].link.pre(this.$scope, { - on: angular.noop, - val: angular.noop, - 0: {} - }, this.$attrs, [ngModelCtrl]); - - ngModelCtrl.$render = function() { - var value = this.$viewValue, convertedDate; - - // In the case where a conversion is needed, the $viewValue here will be a string like - // "2020-05-10" instead of a Date object. - if (!self.dateUtil.isValidDate(value)) { - convertedDate = self.dateUtil.removeLocalTzAndReparseDate(new Date(value)); - if (self.dateUtil.isValidDate(convertedDate)) { - value = convertedDate; - } - } - - // Notify the child scopes of any changes. - self.$scope.$broadcast('md-calendar-parent-changed', value); - - // Set up the selectedDate if it hasn't been already. - if (!self.selectedDate) { - self.selectedDate = value; - } - - // Also set up the displayDate. - if (!self.displayDate) { - self.displayDate = self.selectedDate || self.today; - } - }; - - self.$mdUtil.nextTick(function() { - self.isInitialized = true; - }); - }; - - /** - * Sets the ng-model value for the calendar and emits a change event. - * @param {Date} date new value for the calendar - */ - CalendarCtrl.prototype.setNgModelValue = function(date) { - var timezone = this.$mdUtil.getModelOption(this.ngModelCtrl, 'timezone'); - var value = this.dateUtil.createDateAtMidnight(date); - this.focusDate(value); - this.$scope.$emit('md-calendar-change', value); - // Using the timezone when the offset is negative (GMT+X) causes the previous day to be - // selected here. This check avoids that. - if (timezone == null || value.getTimezoneOffset() < 0) { - this.ngModelCtrl.$setViewValue(this.ngDateFilter(value, 'yyyy-MM-dd'), 'default'); - } else { - this.ngModelCtrl.$setViewValue(this.ngDateFilter(value, 'yyyy-MM-dd', timezone), 'default'); - } - this.ngModelCtrl.$render(); - return value; - }; - - /** - * Sets the current view that should be visible in the calendar - * @param {string} newView View name to be set. - * @param {number|Date} time Date object or a timestamp for the new display date. - */ - CalendarCtrl.prototype.setCurrentView = function(newView, time) { - var self = this; - - self.$mdUtil.nextTick(function() { - self.currentView = newView; - - if (time) { - self.displayDate = angular.isDate(time) ? time : new Date(time); - } - }); - }; - - /** - * Focus the cell corresponding to the given date. - * @param {Date=} date The date to be focused. - */ - CalendarCtrl.prototype.focusDate = function(date) { - if (this.dateUtil.isValidDate(date)) { - var previousFocus = this.$element[0].querySelector('.' + this.FOCUSED_DATE_CLASS); - if (previousFocus) { - previousFocus.classList.remove(this.FOCUSED_DATE_CLASS); - } - - var cellId = this.getDateId(date, this.currentView); - var cell = document.getElementById(cellId); - if (cell) { - cell.classList.add(this.FOCUSED_DATE_CLASS); - cell.focus(); - this.displayDate = date; - } - } else { - var rootElement = this.$element[0].querySelector('[ng-switch]'); - - if (rootElement) { - rootElement.focus(); - } - } - }; - - /** - * Highlights a date cell on the calendar and changes the selected date. - * @param {Date=} date Date to be marked as selected. - */ - CalendarCtrl.prototype.changeSelectedDate = function(date) { - var selectedDateClass = this.SELECTED_DATE_CLASS; - var prevDateCell = this.$element[0].querySelector('.' + selectedDateClass); - - // Remove the selected class from the previously selected date, if any. - if (prevDateCell) { - prevDateCell.classList.remove(selectedDateClass); - prevDateCell.setAttribute('aria-selected', 'false'); - } - - // Apply the select class to the new selected date if it is set. - if (date) { - var dateCell = document.getElementById(this.getDateId(date, this.currentView)); - if (dateCell) { - dateCell.classList.add(selectedDateClass); - dateCell.setAttribute('aria-selected', 'true'); - } - } - - this.selectedDate = date; - }; - - /** - * Normalizes the key event into an action name. The action will be broadcast - * to the child controllers. - * @param {KeyboardEvent} event - * @returns {string} The action that should be taken, or null if the key - * does not match a calendar shortcut. - */ - CalendarCtrl.prototype.getActionFromKeyEvent = function(event) { - var keyCode = this.keyCode; - - switch (event.which) { - case keyCode.ENTER: return 'select'; - - case keyCode.RIGHT_ARROW: return 'move-right'; - case keyCode.LEFT_ARROW: return 'move-left'; - - case keyCode.DOWN_ARROW: return event.metaKey ? 'move-page-down' : 'move-row-down'; - case keyCode.UP_ARROW: return event.metaKey ? 'move-page-up' : 'move-row-up'; - - case keyCode.PAGE_DOWN: return 'move-page-down'; - case keyCode.PAGE_UP: return 'move-page-up'; - - case keyCode.HOME: return 'start'; - case keyCode.END: return 'end'; - - default: return null; - } - }; - - /** - * Handles a key event in the calendar with the appropriate action. - * The action will either - * - select the focused date - * - navigate to focus a new date - * - emit a md-calendar-close event if in a md-datepicker panel - * - emit a md-calendar-parent-action - * - delegate to normal tab order if the TAB key is pressed in standalone mode - * @param {KeyboardEvent} event - */ - CalendarCtrl.prototype.handleKeyEvent = function(event) { - var self = this; - - this.$scope.$apply(function() { - // Capture escape and emit back up so that a wrapping component - // (such as a date-picker) can decide to close. - if (event.which === self.keyCode.ESCAPE || - (event.which === self.keyCode.TAB && !self.standaloneMode)) { - self.$scope.$emit('md-calendar-close'); - - if (event.which === self.keyCode.TAB) { - event.preventDefault(); - } - - return; - } else if (event.which === self.keyCode.TAB && self.standaloneMode) { - // delegate to the normal tab order if the TAB key is pressed in standalone mode - return; - } - - // Broadcast the action that any child controllers should take. - var action = self.getActionFromKeyEvent(event); - if (action) { - event.preventDefault(); - event.stopPropagation(); - self.$scope.$broadcast('md-calendar-parent-action', action); - } - }); - }; - - /** - * Hides the vertical scrollbar on the calendar scroller of a child controller by - * setting the width on the calendar scroller and the `overflow: hidden` wrapper - * around the scroller, and then setting a padding-right on the scroller equal - * to the width of the browser's scrollbar. - * - * This will cause a reflow. - * - * @param {object} childCtrl The child controller whose scrollbar should be hidden. - */ - CalendarCtrl.prototype.hideVerticalScrollbar = function(childCtrl) { - var self = this; - var element = childCtrl.$element[0]; - var scrollMask = element.querySelector('.md-calendar-scroll-mask'); - - if (self.width > 0) { - setWidth(); - } else { - self.$$rAF(function() { - var scroller = childCtrl.calendarScroller; - - self.scrollbarWidth = scroller.offsetWidth - scroller.clientWidth; - self.width = element.querySelector('table').offsetWidth; - setWidth(); - }); - } - - function setWidth() { - var width = self.width || FALLBACK_WIDTH; - var scrollbarWidth = self.scrollbarWidth; - var scroller = childCtrl.calendarScroller; - - scrollMask.style.width = width + 'px'; - scroller.style.width = (width + scrollbarWidth) + 'px'; - scroller.style.paddingRight = scrollbarWidth + 'px'; - } - }; - - /** - * Gets an identifier for a date unique to the calendar instance for internal - * purposes. Not to be displayed. - * @param {Date} date The date for which the id is being generated - * @param {string} namespace Namespace for the id. (month, year etc.) - * @returns {string} - */ - CalendarCtrl.prototype.getDateId = function(date, namespace) { - if (!namespace) { - throw new Error('A namespace for the date id has to be specified.'); - } - - return [ - 'md', - this.id, - namespace, - date.getFullYear(), - date.getMonth(), - date.getDate() - ].join('-'); - }; - - /** - * Util to trigger an extra digest on a parent scope, in order to to ensure that - * any child virtual repeaters have updated. This is necessary, because the virtual - * repeater doesn't update the $index the first time around since the content isn't - * in place yet. The case, in which this is an issue, is when the repeater has less - * than a page of content (e.g. a month or year view has a min or max date). - */ - CalendarCtrl.prototype.updateVirtualRepeat = function() { - var scope = this.$scope; - var virtualRepeatResizeListener = scope.$on('$md-resize-enable', function() { - if (!scope.$$phase) { - scope.$apply(); - } - - virtualRepeatResizeListener(); - }); - }; -})(); - -})(); -(function(){ -"use strict"; - -(function() { - 'use strict'; - - CalendarMonthCtrl.$inject = ["$element", "$scope", "$animate", "$q", "$$mdDateUtil", "$mdDateLocale"]; - angular.module('material.components.datepicker') - .directive('mdCalendarMonth', calendarDirective); - - /** - * Height of one calendar month tbody. This must be made known to the virtual-repeat and is - * subsequently used for scrolling to specific months. - */ - var TBODY_HEIGHT = 265; - - /** - * Height of a calendar month with a single row. This is needed to calculate the offset for - * rendering an extra month in virtual-repeat that only contains one row. - */ - var TBODY_SINGLE_ROW_HEIGHT = 45; - - /** Private directive that represents a list of months inside the calendar. */ - function calendarDirective() { - return { - template: - '' + - '
    ' + - '' + - '' + - '' + - - // The ensures that the will always have the - // proper height, even if it's empty. If it's content is - // compiled, the will be overwritten. - '' + - '' + - '
    ' + - '
    ' + - '
    ', - require: ['^^mdCalendar', 'mdCalendarMonth'], - controller: CalendarMonthCtrl, - controllerAs: 'monthCtrl', - bindToController: true, - link: function(scope, element, attrs, controllers) { - var calendarCtrl = controllers[0]; - var monthCtrl = controllers[1]; - monthCtrl.initialize(calendarCtrl); - } - }; - } - - /** - * Controller for the calendar month component. - * @ngInject @constructor - */ - function CalendarMonthCtrl($element, $scope, $animate, $q, - $$mdDateUtil, $mdDateLocale) { - - /** @final {!angular.JQLite} */ - this.$element = $element; - - /** @final {!angular.Scope} */ - this.$scope = $scope; - - /** @final {!angular.$animate} */ - this.$animate = $animate; - - /** @final {!angular.$q} */ - this.$q = $q; - - /** @final */ - this.dateUtil = $$mdDateUtil; - - /** @final */ - this.dateLocale = $mdDateLocale; - - /** @final {HTMLElement} */ - this.calendarScroller = $element[0].querySelector('.md-virtual-repeat-scroller'); - - /** @type {boolean} */ - this.isInitialized = false; - - /** @type {boolean} */ - this.isMonthTransitionInProgress = false; - - var self = this; - - /** - * Handles a click event on a date cell. - * Created here so that every cell can use the same function instance. - * @this {HTMLTableCellElement} The cell that was clicked. - */ - this.cellClickHandler = function() { - var timestamp = $$mdDateUtil.getTimestampFromNode(this); - self.$scope.$apply(function() { - // The timestamp has to be converted to a valid date. - self.calendarCtrl.setNgModelValue(new Date(timestamp)); - }); - }; - - /** - * Handles click events on the month headers. Switches - * the calendar to the year view. - * @this {HTMLTableCellElement} The cell that was clicked. - */ - this.headerClickHandler = function() { - self.calendarCtrl.setCurrentView('year', $$mdDateUtil.getTimestampFromNode(this)); - }; - } - - /** Initialization **/ - - /** - * Initialize the controller by saving a reference to the calendar and - * setting up the object that will be iterated by the virtual repeater. - */ - CalendarMonthCtrl.prototype.initialize = function(calendarCtrl) { - /** - * Dummy array-like object for virtual-repeat to iterate over. The length is the total - * number of months that can be viewed. We add 2 months: one to include the current month - * and one for the last dummy month. - * - * This is shorter than ideal because of a (potential) Firefox bug - * https://bugzilla.mozilla.org/show_bug.cgi?id=1181658. - */ - - this.items = { - length: this.dateUtil.getMonthDistance( - calendarCtrl.firstRenderableDate, - calendarCtrl.lastRenderableDate - ) + 2 - }; - - this.calendarCtrl = calendarCtrl; - this.attachScopeListeners(); - calendarCtrl.updateVirtualRepeat(); - - // Fire the initial render, since we might have missed it the first time it fired. - calendarCtrl.ngModelCtrl && calendarCtrl.ngModelCtrl.$render(); - }; - - /** - * Gets the "index" of the currently selected date as it would be in the virtual-repeat. - * @returns {number} the "index" of the currently selected date - */ - CalendarMonthCtrl.prototype.getSelectedMonthIndex = function() { - var calendarCtrl = this.calendarCtrl; - - return this.dateUtil.getMonthDistance( - calendarCtrl.firstRenderableDate, - calendarCtrl.displayDate || calendarCtrl.selectedDate || calendarCtrl.today - ); - }; - - /** - * Change the date that is being shown in the calendar. If the given date is in a different - * month, the displayed month will be transitioned. - * @param {Date} date - */ - CalendarMonthCtrl.prototype.changeDisplayDate = function(date) { - // Initialization is deferred until this function is called because we want to reflect - // the starting value of ngModel. - if (!this.isInitialized) { - this.buildWeekHeader(); - this.calendarCtrl.hideVerticalScrollbar(this); - this.isInitialized = true; - return this.$q.when(); - } - - // If trying to show an invalid date or a transition is in progress, do nothing. - if (!this.dateUtil.isValidDate(date) || this.isMonthTransitionInProgress) { - return this.$q.when(); - } - - this.isMonthTransitionInProgress = true; - var animationPromise = this.animateDateChange(date); - - this.calendarCtrl.displayDate = date; - - var self = this; - animationPromise.then(function() { - self.isMonthTransitionInProgress = false; - }); - - return animationPromise; - }; - - /** - * Animates the transition from the calendar's current month to the given month. - * @param {Date} date - * @returns {angular.$q.Promise} The animation promise. - */ - CalendarMonthCtrl.prototype.animateDateChange = function(date) { - if (this.dateUtil.isValidDate(date)) { - var monthDistance = this.dateUtil.getMonthDistance(this.calendarCtrl.firstRenderableDate, date); - this.calendarScroller.scrollTop = monthDistance * TBODY_HEIGHT; - } - - return this.$q.when(); - }; - - /** - * Builds and appends a day-of-the-week header to the calendar. - * This should only need to be called once during initialization. - */ - CalendarMonthCtrl.prototype.buildWeekHeader = function() { - var firstDayOfWeek = this.dateLocale.firstDayOfWeek; - var shortDays = this.dateLocale.shortDays; - - var row = document.createElement('tr'); - for (var i = 0; i < 7; i++) { - var th = document.createElement('th'); - th.textContent = shortDays[(i + firstDayOfWeek) % 7]; - row.appendChild(th); - } - - this.$element.find('thead').append(row); - }; - - /** - * Attaches listeners for the scope events that are broadcast by the calendar. - */ - CalendarMonthCtrl.prototype.attachScopeListeners = function() { - var self = this; - - self.$scope.$on('md-calendar-parent-changed', function(event, value) { - self.calendarCtrl.changeSelectedDate(value); - self.changeDisplayDate(value); - }); - - self.$scope.$on('md-calendar-parent-action', angular.bind(this, this.handleKeyEvent)); - }; - - /** - * Handles the month-specific keyboard interactions. - * @param {Object} event Scope event object passed by the calendar. - * @param {String} action Action, corresponding to the key that was pressed. - */ - CalendarMonthCtrl.prototype.handleKeyEvent = function(event, action) { - var calendarCtrl = this.calendarCtrl; - var displayDate = calendarCtrl.displayDate; - - if (action === 'select') { - calendarCtrl.setNgModelValue(displayDate); - } else { - var date = null; - var dateUtil = this.dateUtil; - - switch (action) { - case 'move-right': date = dateUtil.incrementDays(displayDate, 1); break; - case 'move-left': date = dateUtil.incrementDays(displayDate, -1); break; - - case 'move-page-down': date = dateUtil.incrementMonths(displayDate, 1); break; - case 'move-page-up': date = dateUtil.incrementMonths(displayDate, -1); break; - - case 'move-row-down': date = dateUtil.incrementDays(displayDate, 7); break; - case 'move-row-up': date = dateUtil.incrementDays(displayDate, -7); break; - - case 'start': date = dateUtil.getFirstDateOfMonth(displayDate); break; - case 'end': date = dateUtil.getLastDateOfMonth(displayDate); break; - } - - if (date) { - date = this.dateUtil.clampDate(date, calendarCtrl.minDate, calendarCtrl.maxDate); - - this.changeDisplayDate(date).then(function() { - calendarCtrl.focusDate(date); - }); - } - } - }; -})(); - -})(); -(function(){ -"use strict"; - -(function() { - 'use strict'; - - mdCalendarMonthBodyDirective.$inject = ["$compile", "$$mdSvgRegistry"]; - CalendarMonthBodyCtrl.$inject = ["$element", "$$mdDateUtil", "$mdDateLocale"]; - angular.module('material.components.datepicker') - .directive('mdCalendarMonthBody', mdCalendarMonthBodyDirective); - - /** - * Private directive consumed by md-calendar-month. Having this directive lets the calender use - * md-virtual-repeat and also cleanly separates the month DOM construction functions from - * the rest of the calendar controller logic. - * @ngInject - */ - function mdCalendarMonthBodyDirective($compile, $$mdSvgRegistry) { - var ARROW_ICON = $compile('')({})[0]; - - return { - require: ['^^mdCalendar', '^^mdCalendarMonth', 'mdCalendarMonthBody'], - scope: { offset: '=mdMonthOffset' }, - controller: CalendarMonthBodyCtrl, - controllerAs: 'mdMonthBodyCtrl', - bindToController: true, - link: function(scope, element, attrs, controllers) { - var calendarCtrl = controllers[0]; - var monthCtrl = controllers[1]; - var monthBodyCtrl = controllers[2]; - - monthBodyCtrl.calendarCtrl = calendarCtrl; - monthBodyCtrl.monthCtrl = monthCtrl; - monthBodyCtrl.arrowIcon = ARROW_ICON.cloneNode(true); - - // The virtual-repeat re-uses the same DOM elements, so there are only a limited number - // of repeated items that are linked, and then those elements have their bindings updated. - // Since the months are not generated by bindings, we simply regenerate the entire thing - // when the binding (offset) changes. - scope.$watch(function() { return monthBodyCtrl.offset; }, function(offset) { - if (angular.isNumber(offset)) { - monthBodyCtrl.generateContent(); - } - }); - } - }; - } - - /** - * Controller for a single calendar month. - * @ngInject @constructor - */ - function CalendarMonthBodyCtrl($element, $$mdDateUtil, $mdDateLocale) { - /** - * @final - * @type {!JQLite} - */ - this.$element = $element; - - /** @final */ - this.dateUtil = $$mdDateUtil; - - /** @final */ - this.dateLocale = $mdDateLocale; - - /** @type {Object} Reference to the month view. */ - this.monthCtrl = null; - - /** @type {Object} Reference to the calendar. */ - this.calendarCtrl = null; - - /** - * Number of months from the start of the month "items" that the currently rendered month - * occurs. Set via angular data binding. - * @type {number|null} - */ - this.offset = null; - - /** - * Date cell to focus after appending the month to the document. - * @type {HTMLElement} - */ - this.focusAfterAppend = null; - } - - /** Generate and append the content for this month to the directive element. */ - CalendarMonthBodyCtrl.prototype.generateContent = function() { - var date = this.dateUtil.incrementMonths(this.calendarCtrl.firstRenderableDate, this.offset); - - this.$element - .empty() - .append(this.buildCalendarForMonth(date)); - - if (this.focusAfterAppend) { - this.focusAfterAppend.classList.add(this.calendarCtrl.FOCUSED_DATE_CLASS); - this.focusAfterAppend = null; - } - }; - - /** - * Creates a single cell to contain a date in the calendar with all appropriate - * attributes and classes added. If a date is given, the cell content will be set - * based on the date. - * @param {Date=} opt_date - * @returns {HTMLElement} - */ - CalendarMonthBodyCtrl.prototype.buildDateCell = function(opt_date) { - var monthCtrl = this.monthCtrl; - var calendarCtrl = this.calendarCtrl; - - // TODO(jelbourn): cloneNode is likely a faster way of doing this. - var cell = document.createElement('td'); - cell.tabIndex = -1; - cell.classList.add('md-calendar-date'); - cell.setAttribute('role', 'gridcell'); - - if (opt_date) { - cell.setAttribute('tabindex', '-1'); - cell.setAttribute('aria-label', this.dateLocale.longDateFormatter(opt_date)); - cell.id = calendarCtrl.getDateId(opt_date, 'month'); - - // Use `data-timestamp` attribute because IE10 does not support the `dataset` property. - cell.setAttribute('data-timestamp', opt_date.getTime()); - - // TODO(jelourn): Doing these comparisons for class addition during generation might be slow. - // It may be better to finish the construction and then query the node and add the class. - if (this.dateUtil.isSameDay(opt_date, calendarCtrl.today)) { - cell.classList.add(calendarCtrl.TODAY_CLASS); - } - - if (this.dateUtil.isValidDate(calendarCtrl.selectedDate) && - this.dateUtil.isSameDay(opt_date, calendarCtrl.selectedDate)) { - cell.classList.add(calendarCtrl.SELECTED_DATE_CLASS); - cell.setAttribute('aria-selected', 'true'); - } - - var cellText = this.dateLocale.dates[opt_date.getDate()]; - - if (this.isDateEnabled(opt_date)) { - // Add a indicator for select, hover, and focus states. - var selectionIndicator = document.createElement('span'); - selectionIndicator.classList.add('md-calendar-date-selection-indicator'); - selectionIndicator.textContent = cellText; - cell.appendChild(selectionIndicator); - cell.addEventListener('click', monthCtrl.cellClickHandler); - - if (calendarCtrl.displayDate && this.dateUtil.isSameDay(opt_date, calendarCtrl.displayDate)) { - this.focusAfterAppend = cell; - } - } else { - cell.classList.add('md-calendar-date-disabled'); - cell.textContent = cellText; - } - } - - return cell; - }; - - /** - * Check whether date is in range and enabled - * @param {Date=} opt_date - * @return {boolean} Whether the date is enabled. - */ - CalendarMonthBodyCtrl.prototype.isDateEnabled = function(opt_date) { - return this.dateUtil.isDateWithinRange(opt_date, - this.calendarCtrl.minDate, this.calendarCtrl.maxDate) && - (!angular.isFunction(this.calendarCtrl.dateFilter) - || this.calendarCtrl.dateFilter(opt_date)); - }; - - /** - * Builds a `tr` element for the calendar grid. - * @param rowNumber The week number within the month. - * @returns {HTMLElement} - */ - CalendarMonthBodyCtrl.prototype.buildDateRow = function(rowNumber) { - var row = document.createElement('tr'); - row.setAttribute('role', 'row'); - - // Because of an NVDA bug (with Firefox), the row needs an aria-label in order - // to prevent the entire row being read aloud when the user moves between rows. - // See http://community.nvda-project.org/ticket/4643. - row.setAttribute('aria-label', this.dateLocale.weekNumberFormatter(rowNumber)); - - return row; - }; - - /** - * Builds the content for the given date's month. - * @param {Date=} opt_dateInMonth - * @returns {DocumentFragment} A document fragment containing the elements. - */ - CalendarMonthBodyCtrl.prototype.buildCalendarForMonth = function(opt_dateInMonth) { - var date = this.dateUtil.isValidDate(opt_dateInMonth) ? opt_dateInMonth : new Date(); - - var firstDayOfMonth = this.dateUtil.getFirstDateOfMonth(date); - var firstDayOfTheWeek = this.getLocaleDay_(firstDayOfMonth); - var numberOfDaysInMonth = this.dateUtil.getNumberOfDaysInMonth(date); - - // Store rows for the month in a document fragment so that we can append them all at once. - var monthBody = document.createDocumentFragment(); - - var rowNumber = 1; - var row = this.buildDateRow(rowNumber); - monthBody.appendChild(row); - - // If this is the final month in the list of items, only the first week should render, - // so we should return immediately after the first row is complete and has been - // attached to the body. - var isFinalMonth = this.offset === this.monthCtrl.items.length - 1; - - // Add a label for the month. If the month starts on a Sun/Mon/Tues, the month label - // goes on a row above the first of the month. Otherwise, the month label takes up the first - // two cells of the first row. - var blankCellOffset = 0; - var monthLabelCell = document.createElement('td'); - var monthLabelCellContent = document.createElement('span'); - var calendarCtrl = this.calendarCtrl; - - monthLabelCellContent.textContent = this.dateLocale.monthHeaderFormatter(date); - monthLabelCell.appendChild(monthLabelCellContent); - monthLabelCell.classList.add('md-calendar-month-label'); - // If the entire month is after the max date, render the label as a disabled state. - if (calendarCtrl.maxDate && firstDayOfMonth > calendarCtrl.maxDate) { - monthLabelCell.classList.add('md-calendar-month-label-disabled'); - // If the user isn't supposed to be able to change views, render the - // label as usual, but disable the clicking functionality. - } else if (!calendarCtrl.mode) { - monthLabelCell.addEventListener('click', this.monthCtrl.headerClickHandler); - monthLabelCell.setAttribute('data-timestamp', firstDayOfMonth.getTime()); - monthLabelCell.setAttribute('aria-label', this.dateLocale.monthFormatter(date)); - monthLabelCell.classList.add('md-calendar-label-clickable'); - monthLabelCell.appendChild(this.arrowIcon.cloneNode(true)); - } - - if (firstDayOfTheWeek <= 2) { - monthLabelCell.setAttribute('colspan', '7'); - - var monthLabelRow = this.buildDateRow(); - monthLabelRow.appendChild(monthLabelCell); - monthBody.insertBefore(monthLabelRow, row); - - if (isFinalMonth) { - return monthBody; - } - } else { - blankCellOffset = 3; - monthLabelCell.setAttribute('colspan', '3'); - row.appendChild(monthLabelCell); - } - - // Add a blank cell for each day of the week that occurs before the first of the month. - // For example, if the first day of the month is a Tuesday, add blank cells for Sun and Mon. - // The blankCellOffset is needed in cases where the first N cells are used by the month label. - for (var i = blankCellOffset; i < firstDayOfTheWeek; i++) { - row.appendChild(this.buildDateCell()); - } - - // Add a cell for each day of the month, keeping track of the day of the week so that - // we know when to start a new row. - var dayOfWeek = firstDayOfTheWeek; - var iterationDate = firstDayOfMonth; - for (var d = 1; d <= numberOfDaysInMonth; d++) { - // If we've reached the end of the week, start a new row. - if (dayOfWeek === 7) { - // We've finished the first row, so we're done if this is the final month. - if (isFinalMonth) { - return monthBody; - } - dayOfWeek = 0; - rowNumber++; - row = this.buildDateRow(rowNumber); - monthBody.appendChild(row); - } - - iterationDate.setDate(d); - var cell = this.buildDateCell(iterationDate); - row.appendChild(cell); - - dayOfWeek++; - } - - // Ensure that the last row of the month has 7 cells. - while (row.childNodes.length < 7) { - row.appendChild(this.buildDateCell()); - } - - // Ensure that all months have 6 rows. This is necessary for now because the virtual-repeat - // requires that all items have exactly the same height. - while (monthBody.childNodes.length < 6) { - var whitespaceRow = this.buildDateRow(); - for (var j = 0; j < 7; j++) { - whitespaceRow.appendChild(this.buildDateCell()); - } - monthBody.appendChild(whitespaceRow); - } - - return monthBody; - }; - - /** - * Gets the day-of-the-week index for a date for the current locale. - * @private - * @param {Date} date - * @returns {number} The column index of the date in the calendar. - */ - CalendarMonthBodyCtrl.prototype.getLocaleDay_ = function(date) { - return (date.getDay() + (7 - this.dateLocale.firstDayOfWeek)) % 7; - }; -})(); - -})(); -(function(){ -"use strict"; - -(function() { - 'use strict'; - - CalendarYearCtrl.$inject = ["$element", "$scope", "$animate", "$q", "$$mdDateUtil", "$mdUtil"]; - angular.module('material.components.datepicker') - .directive('mdCalendarYear', calendarDirective); - - /** - * Height of one calendar year tbody. This must be made known to the virtual-repeat and is - * subsequently used for scrolling to specific years. - */ - var TBODY_HEIGHT = 88; - - /** Private component, representing a list of years in the calendar. */ - function calendarDirective() { - return { - template: - '
    ' + - '' + - '' + - '' + - // The ensures that the will have the proper - // height, even though it may be empty. - '' + - '' + - '
    ' + - '
    ' + - '
    ', - require: ['^^mdCalendar', 'mdCalendarYear'], - controller: CalendarYearCtrl, - controllerAs: 'yearCtrl', - bindToController: true, - link: function(scope, element, attrs, controllers) { - var calendarCtrl = controllers[0]; - var yearCtrl = controllers[1]; - yearCtrl.initialize(calendarCtrl); - } - }; - } - - /** - * Controller for the mdCalendar component. - * @ngInject @constructor - */ - function CalendarYearCtrl($element, $scope, $animate, $q, $$mdDateUtil, $mdUtil) { - - /** @final {!angular.JQLite} */ - this.$element = $element; - - /** @final {!angular.Scope} */ - this.$scope = $scope; - - /** @final {!angular.$animate} */ - this.$animate = $animate; - - /** @final {!angular.$q} */ - this.$q = $q; - - /** @final */ - this.dateUtil = $$mdDateUtil; - - /** @final {HTMLElement} */ - this.calendarScroller = $element[0].querySelector('.md-virtual-repeat-scroller'); - - /** @type {boolean} */ - this.isInitialized = false; - - /** @type {boolean} */ - this.isMonthTransitionInProgress = false; - - /** @final */ - this.$mdUtil = $mdUtil; - - var self = this; - - /** - * Handles a click event on a date cell. - * Created here so that every cell can use the same function instance. - * @this {HTMLTableCellElement} The cell that was clicked. - */ - this.cellClickHandler = function() { - self.onTimestampSelected($$mdDateUtil.getTimestampFromNode(this)); - }; - } - - /** - * Initialize the controller by saving a reference to the calendar and - * setting up the object that will be iterated by the virtual repeater. - */ - CalendarYearCtrl.prototype.initialize = function(calendarCtrl) { - /** - * Dummy array-like object for virtual-repeat to iterate over. The length is the total - * number of years that can be viewed. We add 1 extra in order to include the current year. - */ - - this.items = { - length: this.dateUtil.getYearDistance( - calendarCtrl.firstRenderableDate, - calendarCtrl.lastRenderableDate - ) + 1 - }; - - this.calendarCtrl = calendarCtrl; - this.attachScopeListeners(); - calendarCtrl.updateVirtualRepeat(); - - // Fire the initial render, since we might have missed it the first time it fired. - calendarCtrl.ngModelCtrl && calendarCtrl.ngModelCtrl.$render(); - }; - - /** - * Gets the "index" of the currently selected date as it would be in the virtual-repeat. - * @returns {number} - */ - CalendarYearCtrl.prototype.getFocusedYearIndex = function() { - var calendarCtrl = this.calendarCtrl; - - return this.dateUtil.getYearDistance( - calendarCtrl.firstRenderableDate, - calendarCtrl.displayDate || calendarCtrl.selectedDate || calendarCtrl.today - ); - }; - - /** - * Change the date that is highlighted in the calendar. - * @param {Date} date - */ - CalendarYearCtrl.prototype.changeDate = function(date) { - // Initialization is deferred until this function is called because we want to reflect - // the starting value of ngModel. - if (!this.isInitialized) { - this.calendarCtrl.hideVerticalScrollbar(this); - this.isInitialized = true; - return this.$q.when(); - } else if (this.dateUtil.isValidDate(date) && !this.isMonthTransitionInProgress) { - var self = this; - var animationPromise = this.animateDateChange(date); - - self.isMonthTransitionInProgress = true; - self.calendarCtrl.displayDate = date; - - return animationPromise.then(function() { - self.isMonthTransitionInProgress = false; - }); - } - }; - - /** - * Animates the transition from the calendar's current month to the given month. - * @param {Date} date - * @returns {angular.$q.Promise} The animation promise. - */ - CalendarYearCtrl.prototype.animateDateChange = function(date) { - if (this.dateUtil.isValidDate(date)) { - var monthDistance = this.dateUtil.getYearDistance(this.calendarCtrl.firstRenderableDate, date); - this.calendarScroller.scrollTop = monthDistance * TBODY_HEIGHT; - } - - return this.$q.when(); - }; - - /** - * Handles the year-view-specific keyboard interactions. - * @param {Object} event Scope event object passed by the calendar. - * @param {String} action Action, corresponding to the key that was pressed. - */ - CalendarYearCtrl.prototype.handleKeyEvent = function(event, action) { - var self = this; - var calendarCtrl = self.calendarCtrl; - var displayDate = calendarCtrl.displayDate; - - if (action === 'select') { - self.changeDate(displayDate).then(function() { - self.onTimestampSelected(displayDate); - }); - } else { - var date = null; - var dateUtil = self.dateUtil; - - switch (action) { - case 'move-right': date = dateUtil.incrementMonths(displayDate, 1); break; - case 'move-left': date = dateUtil.incrementMonths(displayDate, -1); break; - - case 'move-row-down': date = dateUtil.incrementMonths(displayDate, 6); break; - case 'move-row-up': date = dateUtil.incrementMonths(displayDate, -6); break; - } - - if (date) { - var min = calendarCtrl.minDate ? dateUtil.getFirstDateOfMonth(calendarCtrl.minDate) : null; - var max = calendarCtrl.maxDate ? dateUtil.getFirstDateOfMonth(calendarCtrl.maxDate) : null; - date = dateUtil.getFirstDateOfMonth(self.dateUtil.clampDate(date, min, max)); - - self.changeDate(date).then(function() { - calendarCtrl.focusDate(date); - }); - } - } - }; - - /** - * Attaches listeners for the scope events that are broadcast by the calendar. - */ - CalendarYearCtrl.prototype.attachScopeListeners = function() { - var self = this; - - self.$scope.$on('md-calendar-parent-changed', function(event, value) { - self.calendarCtrl.changeSelectedDate(value ? self.dateUtil.getFirstDateOfMonth(value) : value); - self.changeDate(value); - }); - - self.$scope.$on('md-calendar-parent-action', angular.bind(self, self.handleKeyEvent)); - }; - - /** - * Handles the behavior when a date is selected. Depending on the `mode` - * of the calendar, this can either switch back to the calendar view or - * set the model value. - * @param {number} timestamp The selected timestamp. - */ - CalendarYearCtrl.prototype.onTimestampSelected = function(timestamp) { - var calendarCtrl = this.calendarCtrl; - - if (calendarCtrl.mode) { - this.$mdUtil.nextTick(function() { - // The timestamp has to be converted to a valid date. - calendarCtrl.setNgModelValue(new Date(timestamp)); - }); - } else { - calendarCtrl.setCurrentView('month', timestamp); - } - }; -})(); - -})(); -(function(){ -"use strict"; - -(function() { - 'use strict'; - - CalendarYearBodyCtrl.$inject = ["$element", "$$mdDateUtil", "$mdDateLocale"]; - angular.module('material.components.datepicker') - .directive('mdCalendarYearBody', mdCalendarYearDirective); - - /** - * Private component, consumed by the md-calendar-year, which separates the DOM construction logic - * and allows for the year view to use md-virtual-repeat. - */ - function mdCalendarYearDirective() { - return { - require: ['^^mdCalendar', '^^mdCalendarYear', 'mdCalendarYearBody'], - scope: { offset: '=mdYearOffset' }, - controller: CalendarYearBodyCtrl, - controllerAs: 'mdYearBodyCtrl', - bindToController: true, - link: function(scope, element, attrs, controllers) { - var calendarCtrl = controllers[0]; - var yearCtrl = controllers[1]; - var yearBodyCtrl = controllers[2]; - - yearBodyCtrl.calendarCtrl = calendarCtrl; - yearBodyCtrl.yearCtrl = yearCtrl; - - scope.$watch(function() { return yearBodyCtrl.offset; }, function(offset) { - if (angular.isNumber(offset)) { - yearBodyCtrl.generateContent(); - } - }); - } - }; - } - - /** - * Controller for a single year. - * @ngInject @constructor - */ - function CalendarYearBodyCtrl($element, $$mdDateUtil, $mdDateLocale) { - /** - * @final - * @type {!JQLite} - */ - this.$element = $element; - - /** @final */ - this.dateUtil = $$mdDateUtil; - - /** @final */ - this.dateLocale = $mdDateLocale; - - /** @type {Object} Reference to the calendar. */ - this.calendarCtrl = null; - - /** @type {Object} Reference to the year view. */ - this.yearCtrl = null; - - /** - * Number of months from the start of the month "items" that the currently rendered month - * occurs. Set via angular data binding. - * @type {number|null} - */ - this.offset = null; - - /** - * Date cell to focus after appending the month to the document. - * @type {HTMLElement} - */ - this.focusAfterAppend = null; - } - - /** Generate and append the content for this year to the directive element. */ - CalendarYearBodyCtrl.prototype.generateContent = function() { - var date = this.dateUtil.incrementYears(this.calendarCtrl.firstRenderableDate, this.offset); - - this.$element - .empty() - .append(this.buildCalendarForYear(date)); - - if (this.focusAfterAppend) { - this.focusAfterAppend.classList.add(this.calendarCtrl.FOCUSED_DATE_CLASS); - this.focusAfterAppend = null; - } - }; - - /** - * Creates a single cell to contain a year in the calendar. - * @param {number} year Four-digit year. - * @param {number} month Zero-indexed month. - * @returns {HTMLElement} - */ - CalendarYearBodyCtrl.prototype.buildMonthCell = function(year, month) { - var calendarCtrl = this.calendarCtrl; - var yearCtrl = this.yearCtrl; - var cell = this.buildBlankCell(); - - // Represent this month/year as a date. - var firstOfMonth = new Date(year, month, 1); - cell.setAttribute('aria-label', this.dateLocale.monthFormatter(firstOfMonth)); - cell.id = calendarCtrl.getDateId(firstOfMonth, 'year'); - - // Use `data-timestamp` attribute because IE10 does not support the `dataset` property. - cell.setAttribute('data-timestamp', String(firstOfMonth.getTime())); - - if (this.dateUtil.isSameMonthAndYear(firstOfMonth, calendarCtrl.today)) { - cell.classList.add(calendarCtrl.TODAY_CLASS); - } - - if (this.dateUtil.isValidDate(calendarCtrl.selectedDate) && - this.dateUtil.isSameMonthAndYear(firstOfMonth, calendarCtrl.selectedDate)) { - cell.classList.add(calendarCtrl.SELECTED_DATE_CLASS); - cell.setAttribute('aria-selected', 'true'); - } - - var cellText = this.dateLocale.shortMonths[month]; - - if (this.dateUtil.isMonthWithinRange( - firstOfMonth, calendarCtrl.minDate, calendarCtrl.maxDate) && - (!angular.isFunction(calendarCtrl.monthFilter) || - calendarCtrl.monthFilter(firstOfMonth))) { - var selectionIndicator = document.createElement('span'); - selectionIndicator.classList.add('md-calendar-date-selection-indicator'); - selectionIndicator.textContent = cellText; - cell.appendChild(selectionIndicator); - cell.addEventListener('click', yearCtrl.cellClickHandler); - - if (calendarCtrl.displayDate && - this.dateUtil.isSameMonthAndYear(firstOfMonth, calendarCtrl.displayDate)) { - this.focusAfterAppend = cell; - } - } else { - cell.classList.add('md-calendar-date-disabled'); - cell.textContent = cellText; - } - - return cell; - }; - - /** - * Builds a blank cell. - * @return {HTMLElement} - */ - CalendarYearBodyCtrl.prototype.buildBlankCell = function() { - var cell = document.createElement('td'); - cell.tabIndex = -1; - cell.classList.add('md-calendar-date'); - cell.setAttribute('role', 'gridcell'); - - cell.setAttribute('tabindex', '-1'); - return cell; - }; - - /** - * Builds the content for the given year. - * @param {Date} date Date for which the content should be built. - * @returns {DocumentFragment} A document fragment containing the months within the year. - */ - CalendarYearBodyCtrl.prototype.buildCalendarForYear = function(date) { - // Store rows for the month in a document fragment so that we can append them all at once. - var year = date.getFullYear(); - var yearBody = document.createDocumentFragment(); - - var monthCell, i; - // First row contains label and Jan-Jun. - var firstRow = document.createElement('tr'); - var labelCell = document.createElement('td'); - labelCell.className = 'md-calendar-month-label'; - labelCell.textContent = String(year); - firstRow.appendChild(labelCell); - - for (i = 0; i < 6; i++) { - firstRow.appendChild(this.buildMonthCell(year, i)); - } - yearBody.appendChild(firstRow); - - // Second row contains a blank cell and Jul-Dec. - var secondRow = document.createElement('tr'); - secondRow.appendChild(this.buildBlankCell()); - for (i = 6; i < 12; i++) { - secondRow.appendChild(this.buildMonthCell(year, i)); - } - yearBody.appendChild(secondRow); - - return yearBody; - }; -})(); - -})(); -(function(){ -"use strict"; - -(function() { - 'use strict'; - - /** - * @ngdoc service - * @name $mdDateLocaleProvider - * @module material.components.datepicker - * - * @description - * The `$mdDateLocaleProvider` is the provider that creates the `$mdDateLocale` service. - * This provider that allows the user to specify messages, formatters, and parsers for date - * internationalization. The `$mdDateLocale` service itself is consumed by AngularJS Material - * components that deal with dates - * (i.e. mdDatepicker). - * - * @property {Array} months Array of month names (in order). - * @property {Array} shortMonths Array of abbreviated month names. - * @property {Array} days Array of the days of the week (in order). - * @property {Array} shortDays Array of abbreviated days of the week. - * @property {Array} dates Array of dates of the month. Only necessary for locales - * using a numeral system other than [1, 2, 3...]. - * @property {Array} firstDayOfWeek The first day of the week. Sunday = 0, Monday = 1, - * etc. - * @property {function(string): Date} parseDate Function that converts a date string to a Date - * object (the date portion). - * @property {function(Date, string): string} formatDate Function to format a date object to a - * string. The datepicker directive also provides the time zone, if it was specified. - * @property {function(Date): string} monthHeaderFormatter Function that returns the label for - * a month given a date. - * @property {function(Date): string} monthFormatter Function that returns the full name of a month - * for a given date. - * @property {function(number): string} weekNumberFormatter Function that returns a label for - * a week given the week number. - * @property {function(Date): string} longDateFormatter Function that formats a date into a long - * `aria-label` that is read by the screen reader when the focused date changes. - * @property {string} msgCalendar Translation of the label "Calendar" for the current locale. - * @property {string} msgOpenCalendar Translation of the button label "Open calendar" for the - * current locale. - * @property {Date} firstRenderableDate The date from which the datepicker calendar will begin - * rendering. Note that this will be ignored if a minimum date is set. - * Defaults to January 1st 1880. - * @property {Date} lastRenderableDate The last date that will be rendered by the datepicker - * calendar. Note that this will be ignored if a maximum date is set. - * Defaults to January 1st 2130. - * @property {function(string): boolean} isDateComplete Function to determine whether a string - * makes sense to be parsed to a `Date` object. Returns `true` if the date appears to be complete - * and parsing should occur. By default, this checks for 3 groups of text or numbers separated - * by delimiters. This means that by default, date strings must include a month, day, and year - * to be parsed and for the model to be updated. - * - * @usage - * - * myAppModule.config(function($mdDateLocaleProvider) { - * - * // Example of a French localization. - * $mdDateLocaleProvider.months = ['janvier', 'février', 'mars', ...]; - * $mdDateLocaleProvider.shortMonths = ['janv', 'févr', 'mars', ...]; - * $mdDateLocaleProvider.days = ['dimanche', 'lundi', 'mardi', ...]; - * $mdDateLocaleProvider.shortDays = ['Di', 'Lu', 'Ma', ...]; - * - * // Can change week display to start on Monday. - * $mdDateLocaleProvider.firstDayOfWeek = 1; - * - * // Optional. - * $mdDateLocaleProvider.dates = [1, 2, 3, 4, 5, 6, ...]; - * - * // Example uses moment.js to parse and format dates. - * $mdDateLocaleProvider.parseDate = function(dateString) { - * var m = moment(dateString, 'L', true); - * return m.isValid() ? m.toDate() : new Date(NaN); - * }; - * - * $mdDateLocaleProvider.formatDate = function(date) { - * var m = moment(date); - * return m.isValid() ? m.format('L') : ''; - * }; - * - * // Allow only a day and month to be specified. - * // This is required if using the 'M/D' format with moment.js. - * $mdDateLocaleProvider.isDateComplete = function(dateString) { - * dateString = dateString.trim(); - * - * // Look for two chunks of content (either numbers or text) separated by delimiters. - * var re = /^(([a-zA-Z]{3,}|[0-9]{1,4})([ .,]+|[/-]))([a-zA-Z]{3,}|[0-9]{1,4})/; - * return re.test(dateString); - * }; - * - * $mdDateLocaleProvider.monthHeaderFormatter = function(date) { - * return myShortMonths[date.getMonth()] + ' ' + date.getFullYear(); - * }; - * - * // In addition to date display, date components also need localized messages - * // for aria-labels for screen-reader users. - * - * $mdDateLocaleProvider.weekNumberFormatter = function(weekNumber) { - * return 'Semaine ' + weekNumber; - * }; - * - * $mdDateLocaleProvider.msgCalendar = 'Calendrier'; - * $mdDateLocaleProvider.msgOpenCalendar = 'Ouvrir le calendrier'; - * - * // You can also set when your calendar begins and ends. - * $mdDateLocaleProvider.firstRenderableDate = new Date(1776, 6, 4); - * $mdDateLocaleProvider.lastRenderableDate = new Date(2012, 11, 21); - * }); - * - * - */ - angular.module('material.components.datepicker').config(["$provide", function($provide) { - // TODO(jelbourn): Assert provided values are correctly formatted. Need assertions. - - /** @constructor */ - function DateLocaleProvider() { - /** Array of full month names. E.g., ['January', 'February', ...] */ - this.months = null; - - /** Array of abbreviated month names. E.g., ['Jan', 'Feb', ...] */ - this.shortMonths = null; - - /** Array of full day of the week names. E.g., ['Monday', 'Tuesday', ...] */ - this.days = null; - - /** Array of abbreviated dat of the week names. E.g., ['M', 'T', ...] */ - this.shortDays = null; - - /** Array of dates of a month (1 - 31). Characters might be different in some locales. */ - this.dates = null; - - /** Index of the first day of the week. 0 = Sunday, 1 = Monday, etc. */ - this.firstDayOfWeek = 0; - - /** - * Function that converts the date portion of a Date to a string. - * @type {(function(Date): string)} - */ - this.formatDate = null; - - /** - * Function that converts a date string to a Date object (the date portion) - * @type {function(string): Date} - */ - this.parseDate = null; - - /** - * Function that formats a Date into a month header string. - * @type {function(Date): string} - */ - this.monthHeaderFormatter = null; - - /** - * Function that formats a week number into a label for the week. - * @type {function(number): string} - */ - this.weekNumberFormatter = null; - - /** - * Function that formats a date into a long aria-label that is read - * when the focused date changes. - * @type {function(Date): string} - */ - this.longDateFormatter = null; - - /** - * Function to determine whether a string makes sense to be - * parsed to a Date object. - * @type {function(string): boolean} - */ - this.isDateComplete = null; - - /** - * ARIA label for the calendar "dialog" used in the datepicker. - * @type {string} - */ - this.msgCalendar = ''; - - /** - * ARIA label for the datepicker's "Open calendar" buttons. - * @type {string} - */ - this.msgOpenCalendar = ''; - } - - /** - * Factory function that returns an instance of the dateLocale service. - * @ngInject - * @param $locale - * @param $filter - * @returns {DateLocale} - */ - DateLocaleProvider.prototype.$get = function($locale, $filter) { - /** - * Default date-to-string formatting function. - * @param {!Date} date - * @param {string=} timezone - * @returns {string} - */ - function defaultFormatDate(date, timezone) { - if (!date) { - return ''; - } - - // All of the dates created through ng-material *should* be set to midnight. - // If we encounter a date where the localeTime shows at 11pm instead of midnight, - // we have run into an issue with DST where we need to increment the hour by one: - // var d = new Date(1992, 9, 8, 0, 0, 0); - // d.toLocaleString(); // == "10/7/1992, 11:00:00 PM" - var localeTime = date.toLocaleTimeString(); - var formatDate = date; - if (date.getHours() === 0 && - (localeTime.indexOf('11:') !== -1 || localeTime.indexOf('23:') !== -1)) { - formatDate = new Date(date.getFullYear(), date.getMonth(), date.getDate(), 1, 0, 0); - } - - return $filter('date')(formatDate, 'M/d/yyyy', timezone); - } - - /** - * Default string-to-date parsing function. - * @param {string|number} dateString - * @returns {!Date} - */ - function defaultParseDate(dateString) { - return new Date(dateString); - } - - /** - * Default function to determine whether a string makes sense to be - * parsed to a Date object. - * - * This is very permissive and is just a basic check to ensure that - * things like single integers aren't able to be parsed into dates. - * @param {string} dateString - * @returns {boolean} - */ - function defaultIsDateComplete(dateString) { - dateString = dateString.trim(); - - // Looks for three chunks of content (either numbers or text) separated - // by delimiters. - var re = /^(([a-zA-Z]{3,}|[0-9]{1,4})([ .,]+|[/-])){2}([a-zA-Z]{3,}|[0-9]{1,4})$/; - return re.test(dateString); - } - - /** - * Default date-to-string formatter to get a month header. - * @param {!Date} date - * @returns {string} - */ - function defaultMonthHeaderFormatter(date) { - return service.shortMonths[date.getMonth()] + ' ' + date.getFullYear(); - } - - /** - * Default formatter for a month. - * @param {!Date} date - * @returns {string} - */ - function defaultMonthFormatter(date) { - return service.months[date.getMonth()] + ' ' + date.getFullYear(); - } - - /** - * Default week number formatter. - * @param number - * @returns {string} - */ - function defaultWeekNumberFormatter(number) { - return 'Week ' + number; - } - - /** - * Default formatter for date cell aria-labels. - * @param {!Date} date - * @returns {string} - */ - function defaultLongDateFormatter(date) { - // Example: 'Thursday June 18 2015' - return [ - service.days[date.getDay()], - service.months[date.getMonth()], - service.dates[date.getDate()], - date.getFullYear() - ].join(' '); - } - - // The default "short" day strings are the first character of each day, - // e.g., "Monday" => "M". - var defaultShortDays = $locale.DATETIME_FORMATS.SHORTDAY.map(function(day) { - return day.substring(0, 1); - }); - - // The default dates are simply the numbers 1 through 31. - var defaultDates = Array(32); - for (var i = 1; i <= 31; i++) { - defaultDates[i] = i; - } - - // Default ARIA messages are in English (US). - var defaultMsgCalendar = 'Calendar'; - var defaultMsgOpenCalendar = 'Open calendar'; - - // Default start/end dates that are rendered in the calendar. - var defaultFirstRenderableDate = new Date(1880, 0, 1); - var defaultLastRendereableDate = new Date(defaultFirstRenderableDate.getFullYear() + 250, 0, 1); - - var service = { - months: this.months || $locale.DATETIME_FORMATS.MONTH, - shortMonths: this.shortMonths || $locale.DATETIME_FORMATS.SHORTMONTH, - days: this.days || $locale.DATETIME_FORMATS.DAY, - shortDays: this.shortDays || defaultShortDays, - dates: this.dates || defaultDates, - firstDayOfWeek: this.firstDayOfWeek || 0, - formatDate: this.formatDate || defaultFormatDate, - parseDate: this.parseDate || defaultParseDate, - isDateComplete: this.isDateComplete || defaultIsDateComplete, - monthHeaderFormatter: this.monthHeaderFormatter || defaultMonthHeaderFormatter, - monthFormatter: this.monthFormatter || defaultMonthFormatter, - weekNumberFormatter: this.weekNumberFormatter || defaultWeekNumberFormatter, - longDateFormatter: this.longDateFormatter || defaultLongDateFormatter, - msgCalendar: this.msgCalendar || defaultMsgCalendar, - msgOpenCalendar: this.msgOpenCalendar || defaultMsgOpenCalendar, - firstRenderableDate: this.firstRenderableDate || defaultFirstRenderableDate, - lastRenderableDate: this.lastRenderableDate || defaultLastRendereableDate - }; - - return service; - }; - DateLocaleProvider.prototype.$get.$inject = ["$locale", "$filter"]; - - $provide.provider('$mdDateLocale', new DateLocaleProvider()); - }]); -})(); - -})(); -(function(){ -"use strict"; - -(function() { - 'use strict'; - - /** - * Utility for performing date calculations to facilitate operation of the calendar and - * datepicker. - */ - angular.module('material.components.datepicker').factory('$$mdDateUtil', ["$mdDateLocale", function($mdDateLocale) { - return { - getFirstDateOfMonth: getFirstDateOfMonth, - getNumberOfDaysInMonth: getNumberOfDaysInMonth, - getDateInNextMonth: getDateInNextMonth, - getDateInPreviousMonth: getDateInPreviousMonth, - isInNextMonth: isInNextMonth, - isInPreviousMonth: isInPreviousMonth, - getDateMidpoint: getDateMidpoint, - isSameMonthAndYear: isSameMonthAndYear, - getWeekOfMonth: getWeekOfMonth, - incrementDays: incrementDays, - incrementMonths: incrementMonths, - getLastDateOfMonth: getLastDateOfMonth, - isSameDay: isSameDay, - getMonthDistance: getMonthDistance, - isValidDate: isValidDate, - setDateTimeToMidnight: setDateTimeToMidnight, - createDateAtMidnight: createDateAtMidnight, - isDateWithinRange: isDateWithinRange, - incrementYears: incrementYears, - getYearDistance: getYearDistance, - clampDate: clampDate, - getTimestampFromNode: getTimestampFromNode, - isMonthWithinRange: isMonthWithinRange, - removeLocalTzAndReparseDate: removeLocalTzAndReparseDate - }; - - /** - * Gets the first day of the month for the given date's month. - * @param {Date} date - * @returns {Date} - */ - function getFirstDateOfMonth(date) { - return new Date(date.getFullYear(), date.getMonth(), 1); - } - - /** - * Gets the number of days in the month for the given date's month. - * @param date - * @returns {number} - */ - function getNumberOfDaysInMonth(date) { - return new Date(date.getFullYear(), date.getMonth() + 1, 0).getDate(); - } - - /** - * Get an arbitrary date in the month after the given date's month. - * @param date - * @returns {Date} - */ - function getDateInNextMonth(date) { - return new Date(date.getFullYear(), date.getMonth() + 1, 1); - } - - /** - * Get an arbitrary date in the month before the given date's month. - * @param date - * @returns {Date} - */ - function getDateInPreviousMonth(date) { - return new Date(date.getFullYear(), date.getMonth() - 1, 1); - } - - /** - * Gets whether two dates have the same month and year. - * @param {Date} d1 - * @param {Date} d2 - * @returns {boolean} - */ - function isSameMonthAndYear(d1, d2) { - return d1.getFullYear() === d2.getFullYear() && d1.getMonth() === d2.getMonth(); - } - - /** - * Gets whether two dates are the same day (not not necessarily the same time). - * @param {Date} d1 - * @param {Date} d2 - * @returns {boolean} - */ - function isSameDay(d1, d2) { - return d1.getDate() == d2.getDate() && isSameMonthAndYear(d1, d2); - } - - /** - * Gets whether a date is in the month immediately after some date. - * @param {Date} startDate The date from which to compare. - * @param {Date} endDate The date to check. - * @returns {boolean} - */ - function isInNextMonth(startDate, endDate) { - var nextMonth = getDateInNextMonth(startDate); - return isSameMonthAndYear(nextMonth, endDate); - } - - /** - * Gets whether a date is in the month immediately before some date. - * @param {Date} startDate The date from which to compare. - * @param {Date} endDate The date to check. - * @returns {boolean} - */ - function isInPreviousMonth(startDate, endDate) { - var previousMonth = getDateInPreviousMonth(startDate); - return isSameMonthAndYear(endDate, previousMonth); - } - - /** - * Gets the midpoint between two dates. - * @param {Date} d1 - * @param {Date} d2 - * @returns {Date} - */ - function getDateMidpoint(d1, d2) { - return createDateAtMidnight((d1.getTime() + d2.getTime()) / 2); - } - - /** - * Gets the week of the month that a given date occurs in. - * @param {Date} date - * @returns {number} Index of the week of the month (zero-based). - */ - function getWeekOfMonth(date) { - var firstDayOfMonth = getFirstDateOfMonth(date); - return Math.floor((firstDayOfMonth.getDay() + date.getDate() - 1) / 7); - } - - /** - * Gets a new date incremented by the given number of days. Number of days can be negative. - * @param {Date} date - * @param {number} numberOfDays - * @returns {Date} - */ - function incrementDays(date, numberOfDays) { - return new Date(date.getFullYear(), date.getMonth(), date.getDate() + numberOfDays); - } - - /** - * Gets a new date incremented by the given number of months. Number of months can be negative. - * If the date of the given month does not match the target month, the date will be set to the - * last day of the month. - * @param {Date} date - * @param {number} numberOfMonths - * @returns {Date} - */ - function incrementMonths(date, numberOfMonths) { - // If the same date in the target month does not actually exist, the Date object will - // automatically advance *another* month by the number of missing days. - // For example, if you try to go from Jan. 30 to Feb. 30, you'll end up on March 2. - // So, we check if the month overflowed and go to the last day of the target month instead. - var dateInTargetMonth = new Date(date.getFullYear(), date.getMonth() + numberOfMonths, 1); - var numberOfDaysInMonth = getNumberOfDaysInMonth(dateInTargetMonth); - if (numberOfDaysInMonth < date.getDate()) { - dateInTargetMonth.setDate(numberOfDaysInMonth); - } else { - dateInTargetMonth.setDate(date.getDate()); - } - - return dateInTargetMonth; - } - - /** - * Get the integer distance between two months. This *only* considers the month and year - * portion of the Date instances. - * - * @param {Date} start - * @param {Date} end - * @returns {number} Number of months between `start` and `end`. If `end` is before `start` - * chronologically, this number will be negative. - */ - function getMonthDistance(start, end) { - return (12 * (end.getFullYear() - start.getFullYear())) + (end.getMonth() - start.getMonth()); - } - - /** - * Gets the last day of the month for the given date. - * @param {Date} date - * @returns {Date} - */ - function getLastDateOfMonth(date) { - return new Date(date.getFullYear(), date.getMonth(), getNumberOfDaysInMonth(date)); - } - - /** - * Checks whether a date is valid. - * @param {Date} date - * @return {boolean} Whether the date is a valid Date. - */ - function isValidDate(date) { - return date && date.getTime && !isNaN(date.getTime()); - } - - /** - * Sets a date's time to midnight. - * @param {Date} date - */ - function setDateTimeToMidnight(date) { - if (isValidDate(date)) { - date.setHours(0, 0, 0, 0); - } - } - - /** - * Creates a date with the time set to midnight. - * Drop-in replacement for two forms of the Date constructor via opt_value. - * @param {number|Date=} opt_value Leave undefined for a Date representing now. Or use a - * single value representing the number of seconds since the Unix Epoch or a Date object. - * @return {Date} New date with time set to midnight. - */ - function createDateAtMidnight(opt_value) { - var date; - if (angular.isDate(opt_value)) { - date = opt_value; - } else if (angular.isNumber(opt_value)) { - date = new Date(opt_value); - } else { - date = new Date(); - } - setDateTimeToMidnight(date); - return date; - } - - /** - * Checks if a date is within a min and max range, ignoring the time component. - * If minDate or maxDate are not dates, they are ignored. - * @param {Date} date - * @param {Date} minDate - * @param {Date} maxDate - */ - function isDateWithinRange(date, minDate, maxDate) { - var dateAtMidnight = createDateAtMidnight(date); - var minDateAtMidnight = isValidDate(minDate) ? createDateAtMidnight(minDate) : null; - var maxDateAtMidnight = isValidDate(maxDate) ? createDateAtMidnight(maxDate) : null; - return (!minDateAtMidnight || minDateAtMidnight <= dateAtMidnight) && - (!maxDateAtMidnight || maxDateAtMidnight >= dateAtMidnight); - } - - /** - * Gets a new date incremented by the given number of years. Number of years can be negative. - * See `incrementMonths` for notes on overflow for specific dates. - * @param {Date} date - * @param {number} numberOfYears - * @returns {Date} - */ - function incrementYears(date, numberOfYears) { - return incrementMonths(date, numberOfYears * 12); - } - - /** - * Get the integer distance between two years. This *only* considers the year portion of the - * Date instances. - * - * @param {Date} start - * @param {Date} end - * @returns {number} Number of months between `start` and `end`. If `end` is before `start` - * chronologically, this number will be negative. - */ - function getYearDistance(start, end) { - return end.getFullYear() - start.getFullYear(); - } - - /** - * Clamps a date between a minimum and a maximum date. - * @param {Date} date Date to be clamped - * @param {Date=} minDate Minimum date - * @param {Date=} maxDate Maximum date - * @return {Date} - */ - function clampDate(date, minDate, maxDate) { - var boundDate = date; - if (minDate && date < minDate) { - boundDate = new Date(minDate.getTime()); - } - if (maxDate && date > maxDate) { - boundDate = new Date(maxDate.getTime()); - } - return boundDate; - } - - /** - * Extracts and parses the timestamp from a DOM node. - * @param {HTMLElement} node Node from which the timestamp will be extracted. - * @return {number} Time since epoch. - */ - function getTimestampFromNode(node) { - if (node && node.hasAttribute('data-timestamp')) { - return Number(node.getAttribute('data-timestamp')); - } - } - - /** - * Checks if a month is within a min and max range, ignoring the date and time components. - * If minDate or maxDate are not dates, they are ignored. - * @param {Date} date - * @param {Date} minDate - * @param {Date} maxDate - */ - function isMonthWithinRange(date, minDate, maxDate) { - var month = date.getMonth(); - var year = date.getFullYear(); - - return (!minDate || minDate.getFullYear() < year || minDate.getMonth() <= month) && - (!maxDate || maxDate.getFullYear() > year || maxDate.getMonth() >= month); - } - - /** - * @param {Date} value date in local timezone - * @return {Date} date with local timezone offset removed - */ - function removeLocalTzAndReparseDate(value) { - var dateValue, formattedDate; - // Remove the local timezone offset before calling formatDate. - dateValue = new Date(value.getTime() + 60000 * value.getTimezoneOffset()); - formattedDate = $mdDateLocale.formatDate(dateValue); - // parseDate only works with a date formatted by formatDate when using Moment validation. - return $mdDateLocale.parseDate(formattedDate); - } - }]); -})(); - -})(); -(function(){ -"use strict"; - -(function() { - 'use strict'; - - // TODO(jelbourn): forward more attributes to the internal input (required, autofocus, etc.) - // TODO(jelbourn): something better for mobile (calendar panel takes up entire screen?) - // TODO(jelbourn): input behavior (masking? auto-complete?) - - DatePickerCtrl.$inject = ["$scope", "$element", "$attrs", "$window", "$mdConstant", "$mdTheming", "$mdUtil", "$mdDateLocale", "$$mdDateUtil", "$$rAF", "$filter", "$timeout"]; - datePickerDirective.$inject = ["$$mdSvgRegistry", "$mdUtil", "$mdAria", "inputDirective"]; - angular.module('material.components.datepicker') - .directive('mdDatepicker', datePickerDirective); - - /** - * @ngdoc directive - * @name mdDatepicker - * @module material.components.datepicker - * - * @param {Date} ng-model The component's model. Expects either a JavaScript Date object or a - * value that can be parsed into one (e.g. a ISO 8601 string). - * @param {Object=} ng-model-options Allows tuning of the way in which `ng-model` is being - * updated. Also allows for a timezone to be specified. - * - * Read more at the ngModelOptions docs. - * @param {expression=} ng-change Expression evaluated when the model value changes. - * @param {expression=} ng-focus Expression evaluated when the input is focused or the calendar - * is opened. - * @param {expression=} ng-blur Expression evaluated when focus is removed from the input or the - * calendar is closed. - * @param {boolean=} ng-disabled Whether the datepicker is disabled. - * @param {boolean=} ng-required Whether a value is required for the datepicker. - * @param {Date=} md-min-date Expression representing a min date (inclusive). - * @param {Date=} md-max-date Expression representing a max date (inclusive). - * @param {(function(Date): boolean)=} md-date-filter Function expecting a date and returning a - * boolean whether it can be selected in "day" mode or not. Returning false will also trigger a - * `filtered` model validation error. - * @param {(function(Date): boolean)=} md-month-filter Function expecting a date and returning a - * boolean whether it can be selected in "month" mode or not. Returning false will also trigger a - * `filtered` model validation error. - * @param {string=} md-placeholder The date input placeholder value. - * @param {string=} md-open-on-focus When present, the calendar will be opened when the input - * is focused. - * @param {Boolean=} md-is-open Expression that can be used to open the datepicker's calendar - * on-demand. - * @param {string=} md-current-view Default open view of the calendar pane. Can be either - * "month" or "year". - * @param {string=} md-mode Restricts the user to only selecting a value from a particular view. - * This option can be used if the user is only supposed to choose from a certain date type - * (e.g. only selecting the month). - * Can be either "month" or "day". **Note** that this will overwrite the `md-current-view` value. - * @param {string=} md-hide-icons Determines which datepicker icons should be hidden. Note that - * this may cause the datepicker to not align properly with other components. - * **Use at your own risk.** Possible values are: - * * `"all"` - Hides all icons. - * * `"calendar"` - Only hides the calendar icon. - * * `"triangle"` - Only hides the triangle icon. - * @param {Object=} md-date-locale Allows for the values from the `$mdDateLocaleProvider` to be - * overwritten on a per-element basis (e.g. `msgOpenCalendar` can be overwritten with - * `md-date-locale="{ msgOpenCalendar: 'Open a special calendar' }"`). - * @param {string=} input-aria-describedby A space-separated list of element IDs. This should - * contain the IDs of any elements that describe this datepicker. Screen readers will read the - * content of these elements at the end of announcing that the datepicker has been selected - * and describing its current state. The descriptive elements do not need to be visible on the - * page. - * @param {string=} input-aria-labelledby A space-separated list of element IDs. The ideal use - * case is that this would contain the ID of a `